mirror of
https://github.com/suitenumerique/meet.git
synced 2026-11-17 13:22:51 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 56c92a270f | |||
| 9ee68d9ddf |
@@ -51,6 +51,8 @@ and this project adheres to
|
||||
- ♿️(frontend) show the focus ring on connection test detail cards
|
||||
- ♿️(frontend) use a heading for every connection test card title
|
||||
- ♿️(frontend) put the ProConnect link label inside the link
|
||||
- ⚡️(frontend) animate floating reactions without rendering each frame
|
||||
- 🐛(frontend) subscribe useRoomData to the query cache
|
||||
|
||||
## [1.37.0] - 2026-11-01
|
||||
|
||||
|
||||
@@ -73,9 +73,9 @@ export default tseslint.config(
|
||||
},
|
||||
},
|
||||
|
||||
// CJS, root-level JS config files (postcss.config.js, etc.) and Node scripts
|
||||
// CJS and root-level JS config files (postcss.config.js, etc.)
|
||||
{
|
||||
files: ['**/*.cjs', '*.config.js', 'scripts/**/*.mjs'],
|
||||
files: ['**/*.cjs', '*.config.js'],
|
||||
languageOptions: {
|
||||
globals: {
|
||||
...globals.node,
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
"lint:fix": "eslint . --fix",
|
||||
"preview": "vite preview",
|
||||
"i18n:extract": "npx i18next -c i18next-parser.config.json",
|
||||
"theme:sync": "node scripts/sync-ui-kit-tokens.mjs",
|
||||
"format": "prettier --write ./src",
|
||||
"check": "prettier --check ./src"
|
||||
},
|
||||
|
||||
@@ -1,18 +1,431 @@
|
||||
import { defineConfig } from '@pandacss/dev'
|
||||
import { conditions, theme } from './src/styles/theme'
|
||||
import pandaPreset from '@pandacss/preset-panda'
|
||||
import {
|
||||
Config,
|
||||
Tokens,
|
||||
defineConfig,
|
||||
defineSemanticTokens,
|
||||
defineTextStyles,
|
||||
defineTokens,
|
||||
} from '@pandacss/dev'
|
||||
|
||||
export default defineConfig({
|
||||
const spacing: Tokens['spacing'] = {
|
||||
0: { value: '0rem' },
|
||||
0.125: { value: '0.125rem' },
|
||||
0.25: { value: '0.25rem' },
|
||||
0.375: { value: '0.375rem' },
|
||||
0.5: { value: '0.5rem' },
|
||||
0.625: { value: '0.625rem' },
|
||||
0.75: { value: '0.75rem' },
|
||||
1: { value: '1rem' },
|
||||
1.25: { value: '1.25rem' },
|
||||
1.5: { value: '1.5rem' },
|
||||
1.75: { value: '1.75rem' },
|
||||
2: { value: '2rem' },
|
||||
2.25: { value: '2.25rem' },
|
||||
2.5: { value: '2.5rem' },
|
||||
2.75: { value: '2.75rem' },
|
||||
3: { value: '3rem' },
|
||||
3.5: { value: '3.5rem' },
|
||||
4: { value: '4rem' },
|
||||
}
|
||||
|
||||
const config: Config = {
|
||||
preflight: true,
|
||||
include: ['./src/**/*.{js,jsx,ts,tsx}'],
|
||||
exclude: [],
|
||||
jsxFramework: 'react',
|
||||
outdir: 'src/styled-system',
|
||||
globalFontface: {},
|
||||
// The document font follows the `sans` token on every page: this is the
|
||||
// variable custom themes and the accessibility fonts override.
|
||||
globalVars: {
|
||||
'--global-font-body': 'var(--fonts-sans)',
|
||||
},
|
||||
conditions,
|
||||
theme,
|
||||
})
|
||||
theme: {
|
||||
...pandaPreset.theme,
|
||||
// media queries are defined in em so that zooming with text-only mode triggers breakpoints
|
||||
breakpoints: {
|
||||
xs: '22.6em', // 360px (we assume less than that are old/entry level mobile phones)
|
||||
xsm: '31.25em', // 500px,
|
||||
sm: '40em', // 640px
|
||||
md: '48em', // 768px
|
||||
lg: '64em', // 1024px
|
||||
xl: '80em', // 1280px
|
||||
'2xl': '96em', // 1536px
|
||||
},
|
||||
keyframes: {
|
||||
slide: {
|
||||
from: {
|
||||
transform: 'var(--origin)',
|
||||
opacity: 0,
|
||||
},
|
||||
to: {
|
||||
transform: 'translateY(0)',
|
||||
opacity: 1,
|
||||
},
|
||||
},
|
||||
fade: { from: { opacity: 0 }, to: { opacity: 1 } },
|
||||
pulse: {
|
||||
'0%': { boxShadow: '0 0 0 0 rgba(255, 255, 255, 0.7)' },
|
||||
'75%': { boxShadow: '0 0 0 30px rgba(255, 255, 255, 0)' },
|
||||
'100%': { boxShadow: '0 0 0 0 rgba(255, 255, 255, 0)' },
|
||||
},
|
||||
active_speaker: {
|
||||
'0%': { height: '25%' },
|
||||
'25%': { height: '45%' },
|
||||
'50%': { height: '20%' },
|
||||
'100%': { height: '55%' },
|
||||
},
|
||||
active_speaker_small: {
|
||||
'0%': { height: '20%' },
|
||||
'25%': { height: '25%' },
|
||||
'50%': { height: '18%' },
|
||||
'100%': { height: '25%' },
|
||||
},
|
||||
wave_hand: {
|
||||
'0%': { transform: 'rotate(0deg)' },
|
||||
'20%': { transform: 'rotate(-20deg)' },
|
||||
'80%': { transform: 'rotate(20deg)' },
|
||||
'100%': { transform: 'rotate(0)' },
|
||||
},
|
||||
pulse_background: {
|
||||
'0%': { opacity: '1' },
|
||||
'50%': { opacity: '0.65' },
|
||||
'100%': { opacity: '1' },
|
||||
},
|
||||
rotate: {
|
||||
'0%': {
|
||||
transform: 'rotate(0deg)',
|
||||
},
|
||||
'100%': {
|
||||
transform: 'rotate(360deg)',
|
||||
},
|
||||
},
|
||||
prixClipFix: {
|
||||
'0%': {
|
||||
clipPath: 'polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0)',
|
||||
},
|
||||
'25%': {
|
||||
clipPath: 'polygon(50% 50%, 0 0, 100% 0, 100% 0, 100% 0, 100% 0)',
|
||||
},
|
||||
'50%': {
|
||||
clipPath:
|
||||
'polygon(50% 50%, 0 0, 100% 0, 100% 100%, 100% 100%, 100% 100%)',
|
||||
},
|
||||
'75%': {
|
||||
clipPath: 'polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 100%)',
|
||||
},
|
||||
'100%': {
|
||||
clipPath: 'polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 0)',
|
||||
},
|
||||
},
|
||||
overlayIn: {
|
||||
from: { opacity: 0 },
|
||||
to: { opacity: 0.6 },
|
||||
},
|
||||
},
|
||||
tokens: defineTokens({
|
||||
/* we take a few things from the panda preset but for now we clear out some stuff.
|
||||
* This way we'll only add the things we need step by step and prevent using lots of different things.
|
||||
*/
|
||||
...pandaPreset.theme.tokens,
|
||||
colors: defineTokens.colors({
|
||||
...pandaPreset.theme.tokens.colors,
|
||||
primaryDark: {
|
||||
50: { value: '#161622' },
|
||||
75: { value: '#222234' },
|
||||
100: { value: '#2D2D46' },
|
||||
200: { value: '#43436A' },
|
||||
300: { value: '#5A5A8F' },
|
||||
400: { value: '#7070B3' },
|
||||
500: { value: '#8787D7' },
|
||||
600: { value: '#9D9DDF' },
|
||||
700: { value: '#B3B3E7' },
|
||||
800: { value: '#C9C9EE' },
|
||||
900: { value: '#DFDFF6' },
|
||||
950: { value: '#F5F5FE' },
|
||||
action: { value: '#C1C1FB' },
|
||||
},
|
||||
primary: {
|
||||
50: { value: '#F5F5FE' },
|
||||
100: { value: '#ECECFE' },
|
||||
200: { value: '#E3E3FB' },
|
||||
300: { value: '#CACAFB' },
|
||||
400: { value: '#8585F6' },
|
||||
500: { value: '#6A6AF4' },
|
||||
600: { value: '#313178' },
|
||||
700: { value: '#272747' },
|
||||
800: { value: '#000091' },
|
||||
900: { value: '#21213F' },
|
||||
950: { value: '#1B1B35' },
|
||||
action: { value: '#1212FF' },
|
||||
},
|
||||
greyscale: {
|
||||
'000': { value: '#FFFFFF' },
|
||||
50: { value: '#F6F6F6' },
|
||||
100: { value: '#EEEEEE' },
|
||||
200: { value: '#E5E5E5' },
|
||||
250: { value: '#DDDDDD' },
|
||||
300: { value: '#CECECE' },
|
||||
400: { value: '#929292' },
|
||||
500: { value: '#7C7C7C' },
|
||||
600: { value: '#666666' },
|
||||
700: { value: '#3A3A3A' },
|
||||
750: { value: '#353535' },
|
||||
800: { value: '#2A2A2A' },
|
||||
900: { value: '#242424' },
|
||||
950: { value: '#1E1E1E' },
|
||||
1000: { value: '#161616' },
|
||||
},
|
||||
error: {
|
||||
100: { value: '#261212' },
|
||||
200: { value: '#6C302E' },
|
||||
300: { value: '#983533' },
|
||||
400: { value: '#CA3632' },
|
||||
500: { value: '#EF413D' },
|
||||
600: { value: '#EE6A66' },
|
||||
700: { value: '#F28D8A' },
|
||||
800: { value: '#F6AFAD' },
|
||||
900: { value: '#FAD2D1' },
|
||||
950: { value: '#FFF4F4' },
|
||||
},
|
||||
}),
|
||||
animations: {},
|
||||
blurs: {},
|
||||
/* just directly use values as tokens. This allows us to follow a specific design scale,
|
||||
* without having to remember what 'sm' or '2xl' actually means.
|
||||
*
|
||||
* see semanticTokens for tokens targeting specific usages
|
||||
*/
|
||||
fonts: {
|
||||
sans: {
|
||||
value: [
|
||||
'ui-sans-serif',
|
||||
'system-ui',
|
||||
'-apple-system',
|
||||
'BlinkMacSystemFont',
|
||||
'"Segoe UI"',
|
||||
'Roboto',
|
||||
'"Helvetica Neue"',
|
||||
'Arial',
|
||||
'"Noto Sans"',
|
||||
'sans-serif',
|
||||
'"Apple Color Emoji"',
|
||||
'"Segoe UI Emoji"',
|
||||
'"Segoe UI Symbol"',
|
||||
'"Noto Color Emoji"',
|
||||
],
|
||||
},
|
||||
serif: {
|
||||
value: [
|
||||
'ui-serif',
|
||||
'Georgia',
|
||||
'Cambria',
|
||||
'"Times New Roman"',
|
||||
'Times',
|
||||
'serif',
|
||||
],
|
||||
},
|
||||
mono: {
|
||||
value: [
|
||||
'Source Code Pro',
|
||||
'ui-monospace',
|
||||
'SFMono-Regular',
|
||||
'Menlo',
|
||||
'Monaco',
|
||||
'Consolas',
|
||||
'"Liberation Mono"',
|
||||
'"Courier New"',
|
||||
'monospace',
|
||||
],
|
||||
},
|
||||
},
|
||||
fontSizes: {
|
||||
10: { value: '0.625rem' },
|
||||
12: { value: '0.75rem' },
|
||||
14: { value: '0.875rem' },
|
||||
16: { value: '1rem' },
|
||||
20: { value: '1.25rem' },
|
||||
24: { value: '1.5rem' },
|
||||
28: { value: '1.75rem' },
|
||||
32: { value: '2rem' },
|
||||
40: { value: '2.375rem' },
|
||||
48: { value: '3rem' },
|
||||
64: { value: '4rem' },
|
||||
},
|
||||
letterSpacings: {},
|
||||
shadows: {
|
||||
sm: {
|
||||
value: [
|
||||
'0 1px 3px 0 rgb(0 0 0 / 0.1)',
|
||||
'0 1px 2px -1px rgb(0 0 0 / 0.1)',
|
||||
],
|
||||
},
|
||||
},
|
||||
lineHeights: {
|
||||
1: { value: '1' },
|
||||
1.25: { value: '1.25' },
|
||||
1.375: { value: '1.375' },
|
||||
1.5: { value: '1.5' },
|
||||
1.625: { value: '1.625' },
|
||||
2: { value: '2' },
|
||||
},
|
||||
radii: {
|
||||
4: { value: '0.25rem' },
|
||||
6: { value: '0.375rem' },
|
||||
8: { value: '0.5rem' },
|
||||
16: { value: '1rem' },
|
||||
full: { value: '9999px' },
|
||||
},
|
||||
sizes: {
|
||||
...spacing,
|
||||
full: { value: '100%' },
|
||||
min: { value: 'min-content' },
|
||||
max: { value: 'max-content' },
|
||||
fit: { value: 'fit-content' },
|
||||
// room layout
|
||||
'room-side-panel': { value: '360px' },
|
||||
'room-side-panel-margin': { value: '1.5rem' },
|
||||
'room-control-bar': { value: '80px' },
|
||||
'room-reaction-toolbar-height': { value: '42px' },
|
||||
'tooltip-spacing': { value: '8px' },
|
||||
},
|
||||
spacing,
|
||||
}),
|
||||
semanticTokens: defineSemanticTokens({
|
||||
colors: {
|
||||
default: {
|
||||
text: { value: '{colors.greyscale.1000}' },
|
||||
bg: { value: 'white' },
|
||||
subtle: { value: '{colors.gray.100}' },
|
||||
'subtle-text': { value: '{colors.gray.600}' },
|
||||
},
|
||||
box: {
|
||||
text: { value: '{colors.default.text}' },
|
||||
bg: { value: '{colors.white}' },
|
||||
border: { value: '{colors.gray.300}' },
|
||||
},
|
||||
control: {
|
||||
DEFAULT: { value: '{colors.gray.100}' },
|
||||
hover: { value: '{colors.gray.200}' },
|
||||
active: { value: '{colors.gray.300}' },
|
||||
text: { value: '{colors.default.text}' },
|
||||
border: { value: '{colors.gray.500}' },
|
||||
subtle: { value: '{colors.gray.400}' },
|
||||
},
|
||||
primary: {
|
||||
DEFAULT: { value: '{colors.blue.700}' },
|
||||
hover: { value: '{colors.blue.800}' },
|
||||
active: { value: '{colors.blue.900}' },
|
||||
text: { value: '{colors.white}' },
|
||||
warm: { value: '{colors.blue.300}' },
|
||||
subtle: { value: '{colors.blue.100}' },
|
||||
'subtle-text': { value: '{colors.blue.700}' },
|
||||
},
|
||||
danger: {
|
||||
DEFAULT: { value: '{colors.red.600}' },
|
||||
hover: { value: '{colors.red.700}' },
|
||||
active: { value: '{colors.red.800}' },
|
||||
text: { value: '{colors.white}' },
|
||||
subtle: { value: '{colors.red.100}' },
|
||||
'subtle-text': { value: '{colors.red.700}' },
|
||||
...pandaPreset.theme.tokens.colors.red,
|
||||
},
|
||||
alert: {
|
||||
DEFAULT: { value: '{colors.blue.700}' },
|
||||
notification: { value: '{colors.red.600}' },
|
||||
},
|
||||
success: {
|
||||
DEFAULT: { value: '{colors.green.700}' },
|
||||
hover: { value: '{colors.green.800}' },
|
||||
active: { value: '{colors.green.900}' },
|
||||
text: { value: '{colors.white}' },
|
||||
subtle: { value: '{colors.green.100}' },
|
||||
'subtle-text': { value: '{colors.green.800}' },
|
||||
...pandaPreset.theme.tokens.colors.green,
|
||||
},
|
||||
warning: {
|
||||
DEFAULT: { value: '{colors.amber.700}' },
|
||||
hover: { value: '{colors.amber.800}' },
|
||||
active: { value: '{colors.amber.900}' },
|
||||
text: { value: '{colors.white}' },
|
||||
subtle: { value: '{colors.amber.100}' },
|
||||
'subtle-text': { value: '{colors.amber.700}' },
|
||||
},
|
||||
focusRing: { value: 'rgb(74, 121, 199)' },
|
||||
},
|
||||
shadows: {
|
||||
box: { value: '{shadows.sm}' },
|
||||
},
|
||||
spacing: {
|
||||
boxPadding: {
|
||||
DEFAULT: { value: '{spacing.2}' },
|
||||
sm: { value: '{spacing.1}' },
|
||||
xs: { value: '{spacing.0.5}' },
|
||||
},
|
||||
boxMargin: {
|
||||
xs: { value: '{spacing.0.5}' },
|
||||
DEFAULT: { value: '{spacing.1}' },
|
||||
lg: { value: '{spacing.2}' },
|
||||
},
|
||||
paragraph: { value: '{spacing.0.5}' },
|
||||
heading: { value: '{spacing.1}' },
|
||||
gutter: { value: '{spacing.1}' },
|
||||
textfield: { value: '{spacing.1}' },
|
||||
},
|
||||
}),
|
||||
textStyles: defineTextStyles({
|
||||
display: {
|
||||
value: {
|
||||
fontSize: '3rem',
|
||||
lineHeight: '2rem',
|
||||
fontWeight: 700,
|
||||
},
|
||||
},
|
||||
h1: {
|
||||
value: {
|
||||
fontSize: '1.5rem',
|
||||
lineHeight: '2rem',
|
||||
fontWeight: 700,
|
||||
},
|
||||
},
|
||||
h2: {
|
||||
value: {
|
||||
fontSize: '1.25rem',
|
||||
lineHeight: '1.75rem',
|
||||
fontWeight: 700,
|
||||
},
|
||||
},
|
||||
h3: {
|
||||
value: {
|
||||
fontSize: '1.125rem',
|
||||
lineHeight: '1.75rem',
|
||||
},
|
||||
},
|
||||
body: {
|
||||
value: {
|
||||
fontSize: '1rem',
|
||||
lineHeight: '1.5',
|
||||
},
|
||||
},
|
||||
sm: {
|
||||
value: {
|
||||
fontSize: '0.875rem',
|
||||
lineHeight: '1.25rem',
|
||||
},
|
||||
},
|
||||
xs: {
|
||||
value: {
|
||||
fontSize: '0.825rem',
|
||||
lineHeight: '1.15rem',
|
||||
},
|
||||
},
|
||||
badge: {
|
||||
value: {
|
||||
fontSize: '0.75rem',
|
||||
lineHeight: '1rem',
|
||||
},
|
||||
},
|
||||
}),
|
||||
},
|
||||
}
|
||||
|
||||
export default defineConfig(config)
|
||||
|
||||
@@ -1,284 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
/**
|
||||
* Mirrors the colors of the La Suite UI kit into Panda token files.
|
||||
*
|
||||
* The UI kit (https://github.com/suitenumerique/ui-kit) is the source of truth
|
||||
* for our design tokens. It publishes them as CSS custom properties in the
|
||||
* stylesheet of `@gouvfr-lasuite/ui-components`, one block per theme. This
|
||||
* script reads one theme out of that stylesheet and rewrites:
|
||||
*
|
||||
* src/styles/theme/ui-kit/colors.ts the kit's `globals.colors`
|
||||
* src/styles/theme/ui-kit/contextuals.ts the kit's `contextuals` (light/dark)
|
||||
*
|
||||
* Usage:
|
||||
* npm run theme:sync re-generate from the pinned release
|
||||
* npm run theme:sync -- --version 1.6.0 move to another release of the kit
|
||||
* npm run theme:sync -- --theme default mirror another theme of the kit
|
||||
* npm run theme:sync -- --css ./style.css read a stylesheet from disk
|
||||
*
|
||||
* When moving to another release, also update UI_KIT_VERSION below so that the
|
||||
* next run stays on it.
|
||||
*/
|
||||
import { execFileSync } from 'node:child_process'
|
||||
import { mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs'
|
||||
import { tmpdir } from 'node:os'
|
||||
import { dirname, join, relative, resolve } from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
import { parseArgs } from 'node:util'
|
||||
import prettier from 'prettier'
|
||||
|
||||
const UI_KIT_PACKAGE = '@gouvfr-lasuite/ui-components'
|
||||
const UI_KIT_VERSION = '1.5.0'
|
||||
/** `default` is the white-label theme of the kit, `dsfr` and `anct` the others. */
|
||||
const UI_KIT_THEME = 'dsfr'
|
||||
|
||||
const FRONTEND_DIR = resolve(dirname(fileURLToPath(import.meta.url)), '..')
|
||||
const OUTPUT_DIR = join(FRONTEND_DIR, 'src/styles/theme/ui-kit')
|
||||
|
||||
const GLOBAL_COLOR_PREFIX = '--c--globals--colors--'
|
||||
const CONTEXTUAL_PREFIX = '--c--contextuals--'
|
||||
|
||||
/** Downloads the published package and returns the content of its stylesheet. */
|
||||
function fetchStylesheet(version) {
|
||||
const workdir = mkdtempSync(join(tmpdir(), 'ui-kit-'))
|
||||
try {
|
||||
const [{ filename }] = JSON.parse(
|
||||
execFileSync(
|
||||
'npm',
|
||||
[
|
||||
'pack',
|
||||
`${UI_KIT_PACKAGE}@${version}`,
|
||||
'--pack-destination',
|
||||
workdir,
|
||||
'--json',
|
||||
'--loglevel=error',
|
||||
],
|
||||
{ encoding: 'utf8', stdio: ['ignore', 'pipe', 'inherit'] }
|
||||
)
|
||||
)
|
||||
execFileSync('tar', [
|
||||
'-xzf',
|
||||
join(workdir, filename),
|
||||
'-C',
|
||||
workdir,
|
||||
'package/dist/style.css',
|
||||
])
|
||||
return readFileSync(join(workdir, 'package/dist/style.css'), 'utf8')
|
||||
} finally {
|
||||
rmSync(workdir, { recursive: true, force: true })
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the custom properties each theme declares, keyed by theme name.
|
||||
*
|
||||
* The kit declares its default theme on `:root` (the bare token engine also
|
||||
* ships one on `html`, which `:root` out-specifies) and the other themes in
|
||||
* `.cunningham-theme--<name>` blocks. These blocks are flat, a regex is enough.
|
||||
*/
|
||||
function parseThemes(css) {
|
||||
const themeClassPrefix = '.cunningham-theme--'
|
||||
const themes = {}
|
||||
for (const [, selector, body] of css.matchAll(
|
||||
/(:root|html|\.cunningham-theme--[a-z0-9-]+)\s*\{([^{}]*)\}/g
|
||||
)) {
|
||||
const declarations = Object.fromEntries(
|
||||
[...body.matchAll(/(--c--[\w-]+)\s*:\s*([^;}]+)/g)].map(
|
||||
([, name, value]) => [name, value.trim()]
|
||||
)
|
||||
)
|
||||
if (Object.keys(declarations).length === 0) continue
|
||||
const theme = selector.startsWith(themeClassPrefix)
|
||||
? selector.slice(themeClassPrefix.length)
|
||||
: 'default'
|
||||
themes[theme] = { ...themes[theme], ...declarations }
|
||||
}
|
||||
return themes
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns what the browser resolves for the light and dark variants of a theme.
|
||||
*
|
||||
* A theme class only re-declares what it changes: the rest cascades from the
|
||||
* default theme, hence the merge.
|
||||
*/
|
||||
function resolveVariants(themes, theme) {
|
||||
const [lightName, darkName] =
|
||||
theme === 'default'
|
||||
? ['default', 'dark']
|
||||
: [`${theme}-light`, `${theme}-dark`]
|
||||
for (const name of [lightName, darkName]) {
|
||||
if (!themes[name]) {
|
||||
throw new Error(
|
||||
`theme "${name}" not found, the stylesheet declares: ` +
|
||||
Object.keys(themes).join(', ')
|
||||
)
|
||||
}
|
||||
}
|
||||
return {
|
||||
light: { ...themes.default, ...themes[lightName] },
|
||||
dark: { ...themes.default, ...themes[darkName] },
|
||||
}
|
||||
}
|
||||
|
||||
/** `brand-550` -> `['brand', '550']`, `blue-1-050` -> `['blue-1', '050']` */
|
||||
function splitColorName(name) {
|
||||
const match = name.match(/^(.+)-(\d{3,4})$/)
|
||||
return match ? [match[1], match[2]] : [name]
|
||||
}
|
||||
|
||||
/**
|
||||
* Trees are Maps rather than objects: an object would move the integer-like
|
||||
* keys first ('100' before '050'), and we want to keep the order of the kit.
|
||||
*/
|
||||
function setIn(tree, path, value) {
|
||||
let node = tree
|
||||
for (const key of path.slice(0, -1)) {
|
||||
if (!node.has(key)) node.set(key, new Map())
|
||||
node = node.get(key)
|
||||
}
|
||||
node.set(path.at(-1), value)
|
||||
}
|
||||
|
||||
function collectColors({ light, dark }) {
|
||||
const colors = new Map()
|
||||
for (const [name, value] of Object.entries(light)) {
|
||||
if (!name.startsWith(GLOBAL_COLOR_PREFIX)) continue
|
||||
if (dark[name] !== value) {
|
||||
throw new Error(
|
||||
`${name} differs between the light and dark variants, ` +
|
||||
'while both are expected to share their palettes'
|
||||
)
|
||||
}
|
||||
setIn(colors, splitColorName(name.slice(GLOBAL_COLOR_PREFIX.length)), value)
|
||||
}
|
||||
return colors
|
||||
}
|
||||
|
||||
/** `var(--c--globals--colors--brand-550)` -> `brand.550` */
|
||||
function toColorReference(name, value) {
|
||||
const match = value?.match(/^var\(--c--globals--colors--([\w-]+)\)$/)
|
||||
if (!match) {
|
||||
throw new Error(`${name} should refer to a color, got "${value}"`)
|
||||
}
|
||||
return splitColorName(match[1]).join('.')
|
||||
}
|
||||
|
||||
function collectContextuals({ light, dark }) {
|
||||
const contextuals = new Map()
|
||||
for (const [name, value] of Object.entries(light)) {
|
||||
if (!name.startsWith(CONTEXTUAL_PREFIX)) continue
|
||||
setIn(contextuals, name.slice(CONTEXTUAL_PREFIX.length).split('--'), {
|
||||
light: toColorReference(name, value),
|
||||
dark: toColorReference(name, dark[name]),
|
||||
})
|
||||
}
|
||||
return contextuals
|
||||
}
|
||||
|
||||
const formatKey = (key) => (/^[a-zA-Z_$][\w$]*$/.test(key) ? key : `'${key}'`)
|
||||
|
||||
/** Serializes a tree of tokens, `leaf` rendering what sits at the end of a path. */
|
||||
function serialize(tree, leaf) {
|
||||
const entries = [...tree].map(([key, node]) => {
|
||||
const value = node instanceof Map ? serialize(node, leaf) : leaf(node)
|
||||
return `${formatKey(key)}: ${value}`
|
||||
})
|
||||
return `{ ${entries.join(', ')} }`
|
||||
}
|
||||
|
||||
const count = (tree) =>
|
||||
[...tree.values()].reduce(
|
||||
(total, node) => total + (node instanceof Map ? count(node) : 1),
|
||||
0
|
||||
)
|
||||
|
||||
const renderHeader = ({ theme, source }) => `/**
|
||||
* GENERATED FILE, do not edit by hand.
|
||||
*
|
||||
* Mirrors the "${theme}" theme of the La Suite UI kit.
|
||||
* Source: ${source}
|
||||
* To update it, run \`npm run theme:sync\` (see scripts/sync-ui-kit-tokens.mjs).
|
||||
*/`
|
||||
|
||||
const renderColors = (origin, colors) => `${renderHeader(origin)}
|
||||
import { defineTokens } from '@pandacss/dev'
|
||||
|
||||
/**
|
||||
* The palettes of the UI kit, its \`globals.colors\`.
|
||||
*
|
||||
* Prefer the contextual tokens in components: they carry a role and follow the
|
||||
* light/dark theme, where a palette step is a fixed color.
|
||||
*/
|
||||
export const colors = defineTokens.colors(
|
||||
${serialize(colors, (hex) => `{ value: '${hex}' }`)}
|
||||
)
|
||||
`
|
||||
|
||||
const renderContextuals = (origin, contextuals) => `${renderHeader(origin)}
|
||||
import { defineSemanticTokens } from '@pandacss/dev'
|
||||
|
||||
/**
|
||||
* A token whose color depends on the theme: the light value applies by
|
||||
* default, \`data-theme\` scopes switch it (see ../conditions.ts).
|
||||
*/
|
||||
const themed = (light: string, dark: string) => ({
|
||||
value: {
|
||||
base: \`{colors.\${light}}\`,
|
||||
_light: \`{colors.\${light}}\`,
|
||||
_dark: \`{colors.\${dark}}\`,
|
||||
},
|
||||
})
|
||||
|
||||
/**
|
||||
* The contextual tokens of the UI kit, its \`contextuals\`.
|
||||
*
|
||||
* They read as \`<what is painted>.<family>.<role>.<emphasis>\`, for instance
|
||||
* \`background.semantic.brand.primary\` or \`content.semantic.neutral.secondary\`.
|
||||
*/
|
||||
export const contextuals = defineSemanticTokens.colors(
|
||||
${serialize(contextuals, ({ light, dark }) => `themed('${light}', '${dark}')`)}
|
||||
)
|
||||
`
|
||||
|
||||
async function write(filename, code) {
|
||||
const filepath = join(OUTPUT_DIR, filename)
|
||||
const options = await prettier.resolveConfig(filepath)
|
||||
writeFileSync(filepath, await prettier.format(code, { ...options, filepath }))
|
||||
console.log(` wrote ${relative(FRONTEND_DIR, filepath)}`)
|
||||
}
|
||||
|
||||
async function main() {
|
||||
const { values: args } = parseArgs({
|
||||
options: {
|
||||
version: { type: 'string', default: UI_KIT_VERSION },
|
||||
theme: { type: 'string', default: UI_KIT_THEME },
|
||||
css: { type: 'string' },
|
||||
},
|
||||
})
|
||||
const origin = {
|
||||
theme: args.theme,
|
||||
source: args.css
|
||||
? `a local stylesheet (${relative(FRONTEND_DIR, resolve(args.css))})`
|
||||
: `${UI_KIT_PACKAGE}@${args.version}`,
|
||||
}
|
||||
console.log(`Reading the "${origin.theme}" theme from ${origin.source}`)
|
||||
|
||||
const stylesheet = args.css
|
||||
? readFileSync(args.css, 'utf8')
|
||||
: fetchStylesheet(args.version)
|
||||
const variants = resolveVariants(parseThemes(stylesheet), args.theme)
|
||||
const colors = collectColors(variants)
|
||||
const contextuals = collectContextuals(variants)
|
||||
|
||||
await write('colors.ts', renderColors(origin, colors))
|
||||
await write('contextuals.ts', renderContextuals(origin, contextuals))
|
||||
console.log(
|
||||
`Done: ${count(colors)} colors, ${count(contextuals)} contextual tokens.`
|
||||
)
|
||||
}
|
||||
|
||||
main().catch((error) => {
|
||||
console.error(`\nCould not sync the UI kit tokens: ${error.message}`)
|
||||
process.exit(1)
|
||||
})
|
||||
@@ -14,8 +14,8 @@ export const FeedbackBanner = () => {
|
||||
<div
|
||||
className={css({
|
||||
width: '100%',
|
||||
backgroundColor: 'brand.050',
|
||||
color: 'brand.700',
|
||||
backgroundColor: 'primary.50',
|
||||
color: 'primary.600',
|
||||
display: { base: 'none', sm: 'flex' },
|
||||
justifyContent: 'center',
|
||||
padding: '0.5rem 0',
|
||||
@@ -36,7 +36,7 @@ export const FeedbackBanner = () => {
|
||||
className={css({
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
gap: '3xs',
|
||||
gap: 0.25,
|
||||
})}
|
||||
>
|
||||
<A href={data?.feedback?.url} target="_blank" size="sm">
|
||||
|
||||
@@ -47,9 +47,7 @@ export const SoundTester = () => {
|
||||
isDisabled={isPlaying}
|
||||
fullWidth
|
||||
style={{
|
||||
color: isPlaying
|
||||
? 'var(--colors-content-semantic-brand-tertiary)'
|
||||
: undefined,
|
||||
color: isPlaying ? 'var(--colors-primary)' : undefined,
|
||||
}}
|
||||
>
|
||||
{isPlaying ? t('audio.speakers.ongoingTest') : t('audio.speakers.test')}
|
||||
|
||||
@@ -27,7 +27,7 @@ const TextContainer = styled('div', {
|
||||
base: {
|
||||
display: 'flex',
|
||||
padding: '0.75rem',
|
||||
backgroundColor: 'gray.025',
|
||||
backgroundColor: 'greyscale.50',
|
||||
borderRadius: 4,
|
||||
marginBottom: '0.75rem',
|
||||
},
|
||||
|
||||
@@ -15,7 +15,7 @@ const StyledContainer = styled('div', {
|
||||
display: 'flex',
|
||||
margin: '0.75rem 0 1.5rem',
|
||||
padding: '0.5rem',
|
||||
backgroundColor: 'gray.050',
|
||||
backgroundColor: 'gray.100',
|
||||
borderRadius: 4,
|
||||
},
|
||||
})
|
||||
|
||||
@@ -16,7 +16,7 @@ import { StepStatusIndicator } from './StepStatusIndicator'
|
||||
|
||||
/** Each step is its own bounded card, collapsed or not. */
|
||||
const cardClass = css({
|
||||
border: '1px solid {colors.gray.850}',
|
||||
border: '1px solid {colors.greyscale.900}',
|
||||
borderRadius: '5px',
|
||||
backgroundColor: 'white',
|
||||
overflow: 'hidden',
|
||||
@@ -47,7 +47,7 @@ const identityClass = css({
|
||||
const triggerClass = css({
|
||||
cursor: 'pointer',
|
||||
transition: 'background-color 120ms',
|
||||
_hover: { backgroundColor: 'gray.025' },
|
||||
_hover: { backgroundColor: 'greyscale.50' },
|
||||
'&[data-focus-visible]': {
|
||||
outline: '2px solid {colors.focusRing}',
|
||||
outlineOffset: '-2px!',
|
||||
@@ -56,13 +56,13 @@ const triggerClass = css({
|
||||
|
||||
/** Expanded headers stay tinted so the open card reads as one block. */
|
||||
const triggerExpandedClass = css({
|
||||
backgroundColor: 'gray.050',
|
||||
_hover: { backgroundColor: 'gray.050' },
|
||||
backgroundColor: 'greyscale.100',
|
||||
_hover: { backgroundColor: 'greyscale.100' },
|
||||
})
|
||||
|
||||
const labelClass = css({
|
||||
textStyle: 'body',
|
||||
color: 'gray.850',
|
||||
color: 'greyscale.1000',
|
||||
fontWeight: 'medium',
|
||||
})
|
||||
|
||||
@@ -74,7 +74,7 @@ const valueClass = css({
|
||||
})
|
||||
|
||||
const chevronClass = css({
|
||||
color: 'brand.550',
|
||||
color: 'primary.800',
|
||||
justifySelf: 'end',
|
||||
transition: 'transform 150ms',
|
||||
})
|
||||
@@ -103,7 +103,7 @@ const logListClass = css({
|
||||
const logItemClass = css({
|
||||
fontFamily: 'mono',
|
||||
textStyle: 'xs',
|
||||
color: 'gray.750',
|
||||
color: 'greyscale.700',
|
||||
overflowWrap: 'anywhere',
|
||||
})
|
||||
|
||||
|
||||
@@ -17,12 +17,12 @@ type SummaryState =
|
||||
|
||||
/** Only a failure or a degraded route earns a colour: everything else stays near-black. */
|
||||
const stateColorClass: Record<SummaryState, string> = {
|
||||
idle: css({ color: 'gray.850' }),
|
||||
running: css({ color: 'gray.850' }),
|
||||
passed: css({ color: 'gray.850' }),
|
||||
partial: css({ color: 'gray.850' }),
|
||||
failed: css({ color: 'content.semantic.error.secondary' }),
|
||||
warning: css({ color: 'content.semantic.warning.secondary' }),
|
||||
idle: css({ color: 'greyscale.1000' }),
|
||||
running: css({ color: 'greyscale.1000' }),
|
||||
passed: css({ color: 'greyscale.1000' }),
|
||||
partial: css({ color: 'greyscale.1000' }),
|
||||
failed: css({ color: 'danger.600' }),
|
||||
warning: css({ color: 'warning' }),
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -45,7 +45,7 @@ const getSummaryState = (
|
||||
const cardClass = css({
|
||||
width: '100%',
|
||||
borderRadius: '5px',
|
||||
border: '1px solid {colors.gray.850}',
|
||||
border: '1px solid {colors.greyscale.900}',
|
||||
backgroundColor: 'white',
|
||||
padding: { base: '1.25rem', xsm: '1.75rem' },
|
||||
display: 'flex',
|
||||
@@ -63,14 +63,14 @@ const headerClass = css({
|
||||
const eyebrowClass = css({
|
||||
textStyle: 'sm',
|
||||
fontWeight: 'medium',
|
||||
color: 'gray.600',
|
||||
color: 'greyscale.600',
|
||||
margin: 0,
|
||||
})
|
||||
|
||||
const headlineClass = css({
|
||||
// Sized for the longest state string ("N vérifications en échec"), not for
|
||||
// the shortest one.
|
||||
fontSize: { base: 'h2', xsm: '2.375rem' },
|
||||
fontSize: { base: '28', xsm: '40' },
|
||||
lineHeight: '1.1',
|
||||
fontWeight: 'bold',
|
||||
letterSpacing: '-0.02em',
|
||||
@@ -80,14 +80,14 @@ const headlineClass = css({
|
||||
|
||||
const hintClass = css({
|
||||
textStyle: 'sm',
|
||||
color: 'gray.600',
|
||||
color: 'greyscale.600',
|
||||
margin: 0,
|
||||
maxWidth: '34rem',
|
||||
})
|
||||
|
||||
const dividerClass = css({
|
||||
// Lighter than the card border: an inner rule should never compete with it.
|
||||
borderTop: '1px solid {colors.gray.050}',
|
||||
borderTop: '1px solid {colors.greyscale.100}',
|
||||
paddingTop: '1.25rem',
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
@@ -104,21 +104,21 @@ const trackClass = css({
|
||||
height: '0.375rem',
|
||||
width: '100%',
|
||||
borderRadius: 'full',
|
||||
backgroundColor: 'gray.100',
|
||||
backgroundColor: 'greyscale.200',
|
||||
overflow: 'hidden',
|
||||
})
|
||||
|
||||
const fillClass = css({
|
||||
height: '100%',
|
||||
borderRadius: 'full',
|
||||
backgroundColor: 'brand.550',
|
||||
backgroundColor: 'primary.800',
|
||||
transition: 'width 200ms ease-out',
|
||||
})
|
||||
|
||||
const progressValueClass = css({
|
||||
textStyle: 'sm',
|
||||
fontVariantNumeric: 'tabular-nums',
|
||||
color: 'gray.750',
|
||||
color: 'greyscale.700',
|
||||
whiteSpace: 'nowrap',
|
||||
// Reserved width so the bar does not resize when the digits change.
|
||||
minWidth: '3rem',
|
||||
@@ -136,7 +136,7 @@ const counterClass = css({
|
||||
alignItems: 'center',
|
||||
gap: '0.5rem',
|
||||
textStyle: 'sm',
|
||||
color: 'gray.600',
|
||||
color: 'greyscale.600',
|
||||
})
|
||||
|
||||
const counterSquareClass = css({
|
||||
@@ -149,14 +149,14 @@ const counterSquareClass = css({
|
||||
const counterValueClass = css({
|
||||
fontWeight: 'medium',
|
||||
fontVariantNumeric: 'tabular-nums',
|
||||
color: 'gray.850',
|
||||
color: 'greyscale.1000',
|
||||
})
|
||||
|
||||
/** A zero count is context, not a result: it recedes instead of shouting. */
|
||||
const emptyCounterClass = css({ color: 'greyscale.600' })
|
||||
const emptySquareClass = css({
|
||||
backgroundColor: 'transparent!',
|
||||
border: '1px solid {colors.gray.100}',
|
||||
border: '1px solid {colors.greyscale.250}',
|
||||
})
|
||||
|
||||
const actionsClass = css({
|
||||
|
||||
@@ -8,16 +8,16 @@ import type { ConnectionTestStepStatus } from '../types'
|
||||
export const statusSquareClass: Record<ConnectionTestStepStatus, string> = {
|
||||
pending: css({
|
||||
backgroundColor: 'transparent',
|
||||
border: '1px solid {colors.gray.150}',
|
||||
border: '1px solid {colors.greyscale.300}',
|
||||
}),
|
||||
running: css({
|
||||
backgroundColor: 'brand.550',
|
||||
backgroundColor: 'primary.800',
|
||||
animation: 'pulse_background 1.2s ease-in-out infinite',
|
||||
}),
|
||||
success: css({ backgroundColor: 'background.semantic.success.primary' }),
|
||||
warning: css({ backgroundColor: 'background.semantic.warning.primary' }),
|
||||
failed: css({ backgroundColor: 'background.semantic.error.primary' }),
|
||||
skipped: css({ backgroundColor: 'gray.150' }),
|
||||
success: css({ backgroundColor: 'success.600' }),
|
||||
warning: css({ backgroundColor: 'warning' }),
|
||||
failed: css({ backgroundColor: 'danger.600' }),
|
||||
skipped: css({ backgroundColor: 'greyscale.300' }),
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,13 +24,13 @@ const HIDE_LIVEKIT_VIDEO_CLASS = 'connection-test-hide-livekit-video'
|
||||
|
||||
const sectionClass = css({
|
||||
width: '100%',
|
||||
borderTop: '2px solid {colors.gray.850}',
|
||||
borderTop: '2px solid {colors.greyscale.900}',
|
||||
paddingTop: '1rem',
|
||||
})
|
||||
|
||||
const sectionTitleClass = css({
|
||||
textStyle: 'h2',
|
||||
color: 'gray.850',
|
||||
color: 'greyscale.1000',
|
||||
margin: 0,
|
||||
})
|
||||
|
||||
@@ -47,15 +47,15 @@ const helpClass = css({
|
||||
gap: '0.5rem',
|
||||
width: '100%',
|
||||
borderRadius: 8,
|
||||
border: '1px solid {colors.gray.100}',
|
||||
border: '1px solid {colors.greyscale.200}',
|
||||
backgroundColor: 'white',
|
||||
padding: '0.75rem 1rem',
|
||||
textStyle: 'sm',
|
||||
color: 'gray.850',
|
||||
color: 'greyscale.800',
|
||||
})
|
||||
|
||||
const helpIconClass = css({
|
||||
color: 'content.semantic.error.secondary',
|
||||
color: 'danger.600',
|
||||
flexShrink: 0,
|
||||
marginTop: '2px',
|
||||
})
|
||||
|
||||
@@ -154,7 +154,7 @@ const carouselNavButton = css({
|
||||
outlineOffset: '1px',
|
||||
},
|
||||
_disabled: {
|
||||
color: 'gray.400',
|
||||
color: 'greyscale.400',
|
||||
cursor: 'default',
|
||||
pointerEvents: 'none',
|
||||
_pressed: {
|
||||
|
||||
@@ -42,7 +42,7 @@ export const LaterMeetingDialog = ({
|
||||
<div
|
||||
className={css({
|
||||
width: '100%',
|
||||
backgroundColor: 'gray.025',
|
||||
backgroundColor: 'gray.50',
|
||||
borderRadius: '0.75rem',
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
@@ -176,7 +176,7 @@ export const LaterMeetingDialog = ({
|
||||
<HStack>
|
||||
<div
|
||||
className={css({
|
||||
backgroundColor: 'brand.150',
|
||||
backgroundColor: 'primary.200',
|
||||
borderRadius: '50%',
|
||||
padding: '4px',
|
||||
marginTop: '1rem',
|
||||
@@ -185,7 +185,7 @@ export const LaterMeetingDialog = ({
|
||||
<RiSpam2Fill
|
||||
size={22}
|
||||
className={css({
|
||||
fill: 'brand.500',
|
||||
fill: 'primary.500',
|
||||
})}
|
||||
aria-hidden="true"
|
||||
/>
|
||||
|
||||
@@ -109,7 +109,7 @@ const RightColumn = ({ children }: { children?: ReactNode }) => {
|
||||
const Separator = styled('div', {
|
||||
base: {
|
||||
borderBottom: '1px solid',
|
||||
borderColor: 'gray.500',
|
||||
borderColor: 'greyscale.500',
|
||||
marginTop: '2.5rem',
|
||||
maxWidth: '30rem',
|
||||
width: '100%',
|
||||
@@ -188,7 +188,7 @@ const Home = () => {
|
||||
<div
|
||||
className={css({
|
||||
display: 'flex',
|
||||
gap: 'xs',
|
||||
gap: 0.5,
|
||||
flexDirection: { base: 'column', xsm: 'row' },
|
||||
flexWrap: 'wrap',
|
||||
alignItems: { base: 'center', xsm: 'items-start' },
|
||||
|
||||
@@ -10,10 +10,10 @@ const paginationToolbar = cva({
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
gap: '0.125rem',
|
||||
backgroundColor: 'gray.900',
|
||||
backgroundColor: 'primaryDark.50',
|
||||
borderRadius: '2rem',
|
||||
border: '1px solid',
|
||||
borderColor: 'gray.650',
|
||||
borderColor: 'primaryDark.200',
|
||||
padding: '0.375rem',
|
||||
},
|
||||
variants: {
|
||||
|
||||
@@ -2,10 +2,10 @@ import { styled } from '@/styled-system/jsx'
|
||||
|
||||
export const StyledToastContainer = styled('div', {
|
||||
base: {
|
||||
margin: 'xs',
|
||||
margin: 0.5,
|
||||
boxShadow:
|
||||
'rgba(0, 0, 0, 0.5) 0px 4px 8px 0px, rgba(0, 0, 0, 0.3) 0px 6px 20px 4px',
|
||||
backgroundColor: 'gray.750',
|
||||
backgroundColor: 'greyscale.700',
|
||||
color: 'white',
|
||||
borderRadius: '8px',
|
||||
'&[data-entering]': { animation: 'fade 200ms' },
|
||||
|
||||
@@ -42,7 +42,7 @@ export function ToastAutoMuteLargeRoom({
|
||||
size="sm"
|
||||
variant="text"
|
||||
className={css({
|
||||
color: 'brand.150',
|
||||
color: 'primary.300',
|
||||
})}
|
||||
onPress={() => handleDismiss()}
|
||||
>
|
||||
|
||||
@@ -34,7 +34,7 @@ export function ToastLowerHand({ state, ...props }: Readonly<ToastProps>) {
|
||||
size="sm"
|
||||
variant="text"
|
||||
className={css({
|
||||
color: 'brand.150',
|
||||
color: 'primary.300',
|
||||
marginLeft: '0.5rem',
|
||||
})}
|
||||
onPress={() => handleDismiss()}
|
||||
|
||||
@@ -61,7 +61,7 @@ export function ToastMessageReceived({
|
||||
<RiMessage2Line
|
||||
size={20}
|
||||
className={css({
|
||||
color: 'brand.150',
|
||||
color: 'primary.300',
|
||||
marginTop: '3px',
|
||||
})}
|
||||
aria-hidden="true"
|
||||
|
||||
@@ -41,7 +41,7 @@ export function ToastRaised({ state, ...props }: Readonly<ToastProps>) {
|
||||
animationIterationCount: '2',
|
||||
}}
|
||||
/>
|
||||
<Div {...titleProps} marginRight="xs">
|
||||
<Div {...titleProps} marginRight={0.5}>
|
||||
{t('raised.description', {
|
||||
name: participant.name || t('defaultName'),
|
||||
})}
|
||||
@@ -51,7 +51,7 @@ export function ToastRaised({ state, ...props }: Readonly<ToastProps>) {
|
||||
size="sm"
|
||||
variant="text"
|
||||
className={css({
|
||||
color: 'brand.150',
|
||||
color: 'primary.300',
|
||||
})}
|
||||
onPress={(e) => {
|
||||
toggleParticipants()
|
||||
|
||||
@@ -76,7 +76,7 @@ export function ToastRecordingRequest({
|
||||
size="sm"
|
||||
variant="text"
|
||||
className={css({
|
||||
color: 'brand.150',
|
||||
color: 'primary.300',
|
||||
})}
|
||||
onPress={options.openMenu}
|
||||
>
|
||||
|
||||
@@ -37,7 +37,7 @@ export function ToastRecordingSaving({
|
||||
alignItems="center"
|
||||
{...contentProps}
|
||||
padding={14}
|
||||
gap="base"
|
||||
gap={1}
|
||||
>
|
||||
<Text
|
||||
margin={false}
|
||||
|
||||
+4
-4
@@ -132,7 +132,7 @@ export const WaitingParticipantNotification = () => {
|
||||
size="sm"
|
||||
variant="text"
|
||||
className={css({
|
||||
color: 'brand.150',
|
||||
color: 'primary.300',
|
||||
})}
|
||||
onPress={async () => {
|
||||
await handleParticipantEntry(waitingParticipants[0], true)
|
||||
@@ -145,7 +145,7 @@ export const WaitingParticipantNotification = () => {
|
||||
size="sm"
|
||||
variant="text"
|
||||
className={css({
|
||||
color: 'brand.150',
|
||||
color: 'primary.300',
|
||||
})}
|
||||
onPress={() => {
|
||||
toggleParticipants()
|
||||
@@ -187,7 +187,7 @@ export const WaitingParticipantNotification = () => {
|
||||
borderRadius: '50%',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
background: 'gray.700',
|
||||
background: 'primaryDark.100',
|
||||
border: '2px solid white',
|
||||
marginLeft: '-10px',
|
||||
})}
|
||||
@@ -215,7 +215,7 @@ export const WaitingParticipantNotification = () => {
|
||||
size="sm"
|
||||
variant="text"
|
||||
className={css({
|
||||
color: 'brand.150',
|
||||
color: 'primary.300',
|
||||
})}
|
||||
onPress={() => {
|
||||
toggleParticipants()
|
||||
|
||||
@@ -93,7 +93,7 @@ export const FullScreenShareWarning = ({
|
||||
position: 'absolute',
|
||||
height: '100%',
|
||||
width: '100%',
|
||||
backgroundColor: 'gray.900/90',
|
||||
backgroundColor: 'rgba(22, 22, 34, 0.9)',
|
||||
padding: '2rem',
|
||||
})}
|
||||
>
|
||||
|
||||
@@ -21,9 +21,9 @@ export const MutedMicIndicator = ({
|
||||
return (
|
||||
<div
|
||||
className={css({
|
||||
backgroundColor: 'error.550',
|
||||
backgroundColor: 'red.600',
|
||||
borderRadius: '4px',
|
||||
padding: '3xs',
|
||||
padding: 0.25,
|
||||
})}
|
||||
>
|
||||
<RiMicOffFill size={16} color="white" />
|
||||
|
||||
@@ -23,7 +23,7 @@ export const ParticipantMetadata = ({
|
||||
|
||||
return (
|
||||
<div className="lk-participant-metadata">
|
||||
<HStack gap="3xs">
|
||||
<HStack gap={0.25}>
|
||||
{!isScreenShare && <MutedMicIndicator participant={participant} />}
|
||||
<RaisedHandMetadataWrapper
|
||||
participant={participant}
|
||||
|
||||
+2
-2
@@ -104,7 +104,7 @@ export const ParticipantTileFocus = ({
|
||||
<FadeOverlay hasKeyboardFocus={hasKeyboardFocus} tileRef={tileRef}>
|
||||
<div
|
||||
className={css({
|
||||
backgroundColor: 'gray.900',
|
||||
backgroundColor: 'primaryDark.50',
|
||||
zIndex: 1,
|
||||
borderRadius: '0.25rem',
|
||||
display: 'flex',
|
||||
@@ -116,7 +116,7 @@ export const ParticipantTileFocus = ({
|
||||
},
|
||||
})}
|
||||
>
|
||||
<HStack gap="xs" padding="xs">
|
||||
<HStack gap={0.5} padding={0.5}>
|
||||
<FocusButton trackRef={trackRef} />
|
||||
{!isScreenShare && (
|
||||
<>
|
||||
|
||||
@@ -67,7 +67,7 @@ const MicIndicator = ({ participant }: MicIndicatorProps) => {
|
||||
) : (
|
||||
<RiMicFill
|
||||
className={css({
|
||||
color: isSpeaking ? 'gray.550' : 'gray.900',
|
||||
color: isSpeaking ? 'primaryDark.300' : 'primaryDark.50',
|
||||
animation: isSpeaking
|
||||
? 'pulse_background 800ms infinite'
|
||||
: undefined,
|
||||
|
||||
+6
-6
@@ -5,8 +5,8 @@ import { styled, HStack, VStack } from '@/styled-system/jsx'
|
||||
const Container = styled('div', {
|
||||
base: {
|
||||
border: '1px solid',
|
||||
borderColor: 'gray.100',
|
||||
borderRadius: 4,
|
||||
borderColor: 'greyscale.250',
|
||||
borderRadius: '8px',
|
||||
margin: '0 .625rem 0.9375rem',
|
||||
},
|
||||
})
|
||||
@@ -24,11 +24,11 @@ const Header = styled('button', {
|
||||
width: '100%',
|
||||
fontSize: '1rem',
|
||||
transition: 'background 200ms',
|
||||
borderTopRadius: '3px', // container radius (4) minus its 1px border
|
||||
_hover: { backgroundColor: 'background.semantic.contextual.primary' },
|
||||
borderTopRadius: '7px', // container radius (8) minus its 1px border
|
||||
_hover: { backgroundColor: 'greyscale.50' },
|
||||
},
|
||||
variants: {
|
||||
isOpen: { false: { borderRadius: '3px' } },
|
||||
isOpen: { false: { borderRadius: '7px' } },
|
||||
},
|
||||
})
|
||||
|
||||
@@ -42,7 +42,7 @@ const Chevron = styled(RiArrowUpSLine, {
|
||||
const List = styled(VStack, {
|
||||
base: {
|
||||
borderTop: '1px solid',
|
||||
borderTopColor: 'gray.100',
|
||||
borderTopColor: 'greyscale.250',
|
||||
alignItems: 'start',
|
||||
minHeight: 0,
|
||||
flexGrow: 1,
|
||||
|
||||
@@ -89,7 +89,7 @@ export const ParticipantsList = () => {
|
||||
className={css({
|
||||
fontSize: '0.875rem',
|
||||
fontWeight: 'bold',
|
||||
color: 'gray.600',
|
||||
color: 'greyscale.600',
|
||||
padding: '0 1.5rem',
|
||||
marginBottom: '0.83em',
|
||||
})}
|
||||
|
||||
@@ -25,8 +25,8 @@ export const UnauthenticatedBadge = ({
|
||||
height: '18px',
|
||||
width: '18px',
|
||||
borderRadius: '100%',
|
||||
background: 'warning.100',
|
||||
color: 'warning.600',
|
||||
background: 'orange.200',
|
||||
color: 'orange.800',
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
|
||||
@@ -14,7 +14,7 @@ export const ParticipantMenuButton = ({
|
||||
<Menu>
|
||||
<Button
|
||||
square
|
||||
variant="tertiaryNeutral"
|
||||
variant="tertiaryText"
|
||||
size="sm"
|
||||
aria-label={t('moreOptions')}
|
||||
tooltip={t('moreOptions')}
|
||||
|
||||
@@ -32,7 +32,7 @@ export const PinMenuItem = ({ participant }: { participant: Participant }) => {
|
||||
className={menuRecipe({ icon: true }).item}
|
||||
onAction={() => (inFocus ? clearPinnedTrack() : setPinnedTrack(trackRef))}
|
||||
>
|
||||
<HStack gap="3xs">
|
||||
<HStack gap={0.25}>
|
||||
{inFocus ? (
|
||||
<>
|
||||
<RiUnpinLine size={20} aria-hidden />
|
||||
|
||||
@@ -35,7 +35,7 @@ export const PromoteMenuItem = React.memo(
|
||||
className={menuRecipe({ icon: true }).item}
|
||||
onAction={toggleRole}
|
||||
>
|
||||
<HStack gap="3xs" minWidth={280}>
|
||||
<HStack gap={0.25} minWidth={280}>
|
||||
<Icon size={20} aria-hidden />
|
||||
{t(`${label}.label`)}
|
||||
</HStack>
|
||||
|
||||
@@ -23,7 +23,7 @@ export const RemoveMenuItem = React.memo(
|
||||
className={menuRecipe({ icon: true }).item}
|
||||
onAction={() => removeParticipant(identity)}
|
||||
>
|
||||
<HStack gap="3xs">
|
||||
<HStack gap={0.25}>
|
||||
<RiCloseLine size={20} aria-hidden />
|
||||
{t('label')}
|
||||
</HStack>
|
||||
|
||||
@@ -14,7 +14,7 @@ const Container = styled('div', {
|
||||
height: '100%',
|
||||
display: 'grid',
|
||||
gridTemplateRows: 'minmax(0, 1fr) auto auto',
|
||||
backgroundColor: 'gray.900',
|
||||
backgroundColor: 'primaryDark.50',
|
||||
transition: 'padding .5s cubic-bezier(0.4,0,0.2,1) 5ms',
|
||||
// Disable LiveKit's own border-radius on tiles so our containers
|
||||
// (GridCell, Thumbnail, StageFrame) own the clipping exclusively.
|
||||
|
||||
@@ -52,7 +52,7 @@ const FocusContainer = styled('div', {
|
||||
height: '100%',
|
||||
borderRadius: '8px',
|
||||
overflow: 'hidden',
|
||||
backgroundColor: 'gray.700',
|
||||
backgroundColor: 'primaryDark.100',
|
||||
boxSizing: 'border-box',
|
||||
},
|
||||
})
|
||||
|
||||
@@ -66,7 +66,7 @@ const GridCell = styled('div', {
|
||||
minHeight: 0,
|
||||
borderRadius: '8px',
|
||||
overflow: 'hidden',
|
||||
backgroundColor: 'gray.700',
|
||||
backgroundColor: 'primaryDark.100',
|
||||
// Paint on own layer so FLIP transforms don't trigger layout thrash.
|
||||
willChange: 'transform',
|
||||
'& .lk-participant-tile': {
|
||||
|
||||
@@ -70,7 +70,7 @@ const CameraTile = styled('div', {
|
||||
minWidth: 0,
|
||||
borderRadius: '8px',
|
||||
overflow: 'hidden',
|
||||
backgroundColor: 'gray.700',
|
||||
backgroundColor: 'primaryDark.100',
|
||||
'& .lk-participant-tile': {
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
@@ -85,7 +85,7 @@ const ScreenShareSlot = styled('div', {
|
||||
minHeight: 0,
|
||||
borderRadius: '8px',
|
||||
overflow: 'hidden',
|
||||
backgroundColor: 'gray.700',
|
||||
backgroundColor: 'primaryDark.100',
|
||||
'& .lk-participant-tile': {
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { createPortal } from 'react-dom'
|
||||
import { useState, useEffect } from 'react'
|
||||
import { useState, useEffect, useRef } from 'react'
|
||||
import { Text } from '@/primitives'
|
||||
import { css } from '@/styled-system/css'
|
||||
import { useSnapshot } from 'valtio'
|
||||
@@ -29,39 +29,35 @@ export function FloatingReaction({
|
||||
speed = 1,
|
||||
scale = 1,
|
||||
}: FloatingReactionProps) {
|
||||
const [deltaY, setDeltaY] = useState(0)
|
||||
const [opacity, setOpacity] = useState(1)
|
||||
const elementRef = useRef<HTMLDivElement>(null)
|
||||
|
||||
const [left] = useState(
|
||||
() => Math.random() * window.innerWidth * REACTION_SPAWN_WIDTH_RATIO
|
||||
)
|
||||
|
||||
useEffect(() => {
|
||||
let start: number | null = null
|
||||
function animate(timestamp: number) {
|
||||
if (start === null) start = timestamp
|
||||
const elapsed = timestamp - start
|
||||
if (elapsed < 0) {
|
||||
setOpacity(0)
|
||||
} else {
|
||||
const progress = Math.min(elapsed / ANIMATION_DURATION, 1)
|
||||
const distance = ANIMATION_DISTANCE * speed
|
||||
const newY = progress * distance
|
||||
setDeltaY(newY)
|
||||
if (progress > FADE_OUT_THRESHOLD) {
|
||||
setOpacity(1 - (progress - FADE_OUT_THRESHOLD) / 0.3)
|
||||
}
|
||||
}
|
||||
if (elapsed < ANIMATION_DURATION) {
|
||||
requestAnimationFrame(animate)
|
||||
}
|
||||
}
|
||||
const req = requestAnimationFrame(animate)
|
||||
return () => cancelAnimationFrame(req)
|
||||
const element = elementRef.current
|
||||
if (!element) return
|
||||
|
||||
const distance = ANIMATION_DISTANCE * speed
|
||||
const animation = element.animate(
|
||||
[
|
||||
{ transform: 'translateY(0)', opacity: 1 },
|
||||
{
|
||||
transform: `translateY(${-distance * FADE_OUT_THRESHOLD}px)`,
|
||||
opacity: 1,
|
||||
offset: FADE_OUT_THRESHOLD,
|
||||
},
|
||||
{ transform: `translateY(${-distance}px)`, opacity: 0 },
|
||||
],
|
||||
{ duration: ANIMATION_DURATION, easing: 'linear', fill: 'forwards' }
|
||||
)
|
||||
return () => animation.cancel()
|
||||
}, [speed])
|
||||
|
||||
return (
|
||||
<div
|
||||
ref={elementRef}
|
||||
className={css({
|
||||
position: 'absolute',
|
||||
display: 'flex',
|
||||
@@ -70,8 +66,7 @@ export function FloatingReaction({
|
||||
})}
|
||||
style={{
|
||||
left: left,
|
||||
bottom: INITIAL_POSITION + deltaY,
|
||||
opacity: opacity,
|
||||
bottom: INITIAL_POSITION,
|
||||
}}
|
||||
>
|
||||
<img
|
||||
@@ -89,7 +84,7 @@ export function FloatingReaction({
|
||||
<Text
|
||||
variant="sm"
|
||||
className={css({
|
||||
backgroundColor: isLocal ? 'brand.100' : 'gray.700',
|
||||
backgroundColor: isLocal ? 'primary.100' : 'primaryDark.100',
|
||||
color: isLocal ? 'black' : 'white',
|
||||
fontWeight: 500,
|
||||
textAlign: 'center',
|
||||
|
||||
@@ -23,7 +23,7 @@ const StyledContainer = styled('div', {
|
||||
alignItems: 'center',
|
||||
gap: '0.2rem',
|
||||
borderRadius: '21px',
|
||||
backgroundColor: 'gray.700',
|
||||
backgroundColor: 'primaryDark.100',
|
||||
maxWidth: '100%',
|
||||
opacity: 0,
|
||||
translate: '0 3.25rem',
|
||||
|
||||
@@ -122,9 +122,9 @@ export const ControlsButton = ({
|
||||
{statuses.isAnotherModeStarted && (
|
||||
<RACButton
|
||||
className={css({
|
||||
backgroundColor: 'brand.050',
|
||||
backgroundColor: 'primary.50',
|
||||
border: '1px solid',
|
||||
borderColor: 'brand.150',
|
||||
borderColor: 'primary.200',
|
||||
borderRadius: '6px',
|
||||
padding: '0.75rem',
|
||||
marginBottom: '0.75rem',
|
||||
@@ -135,15 +135,15 @@ export const ControlsButton = ({
|
||||
width: '100%',
|
||||
cursor: 'pointer',
|
||||
_hover: {
|
||||
backgroundColor: 'brand.100',
|
||||
borderColor: 'brand.400',
|
||||
backgroundColor: 'primary.100',
|
||||
borderColor: 'primary.400',
|
||||
},
|
||||
})}
|
||||
onPress={() => openSidePanel()}
|
||||
>
|
||||
<Icon
|
||||
className={css({
|
||||
color: 'brand.500',
|
||||
color: 'primary.500',
|
||||
marginRight: '1rem',
|
||||
})}
|
||||
name="info"
|
||||
@@ -153,7 +153,7 @@ export const ControlsButton = ({
|
||||
</Text>
|
||||
<Icon
|
||||
className={css({
|
||||
color: 'brand.500',
|
||||
color: 'primary.500',
|
||||
marginLeft: 'auto',
|
||||
})}
|
||||
name="chevron_right"
|
||||
|
||||
@@ -65,7 +65,7 @@ const LimitReachedAlertDialogContent = () => {
|
||||
return (
|
||||
<Dialog isOpen={isOpen} role="alertdialog" title={t('title')}>
|
||||
<LimitDescription />
|
||||
<HStack gap="base">
|
||||
<HStack gap={1}>
|
||||
<Button variant="text" size="sm" onPress={() => setIsOpen(false)}>
|
||||
{t('button')}
|
||||
</Button>
|
||||
|
||||
@@ -12,10 +12,10 @@ export const LoginPrompt = ({ heading, body }: LoginPromptProps) => {
|
||||
return (
|
||||
<div
|
||||
className={css({
|
||||
backgroundColor: 'brand.050',
|
||||
backgroundColor: 'primary.50',
|
||||
borderRadius: '5px',
|
||||
border: '1px solid',
|
||||
borderColor: 'brand.150',
|
||||
borderColor: 'primary.200',
|
||||
paddingY: '1rem',
|
||||
paddingX: '1rem',
|
||||
marginTop: '1rem',
|
||||
|
||||
@@ -8,9 +8,9 @@ import { HStack, VStack } from '@/styled-system/jsx'
|
||||
|
||||
const Divider = ({ label }: { label: string }) => (
|
||||
<HStack gap="1rem" alignItems="center" width="100%" marginY="1rem">
|
||||
<div className={css({ flex: 1, height: '1px', bg: 'gray.100' })} />
|
||||
<div className={css({ flex: 1, height: '1px', bg: 'neutral.200' })} />
|
||||
<Text variant="xsNote">{label}</Text>
|
||||
<div className={css({ flex: 1, height: '1px', bg: 'gray.100' })} />
|
||||
<div className={css({ flex: 1, height: '1px', bg: 'neutral.200' })} />
|
||||
</HStack>
|
||||
)
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ export const RecordingStateToast = () => {
|
||||
left: '10px',
|
||||
paddingY: '0.25rem',
|
||||
paddingX: '0.75rem 0.75rem',
|
||||
backgroundColor: 'background.semantic.error.primary',
|
||||
backgroundColor: 'danger.700',
|
||||
borderColor: 'white',
|
||||
border: '1px solid',
|
||||
color: 'white',
|
||||
|
||||
@@ -47,10 +47,10 @@ export const RequestRecording = ({
|
||||
return (
|
||||
<div
|
||||
className={css({
|
||||
backgroundColor: 'gray.025',
|
||||
backgroundColor: 'neutral.50',
|
||||
borderRadius: '5px',
|
||||
border: '1px solid',
|
||||
borderColor: 'gray.100',
|
||||
borderColor: 'neutral.200',
|
||||
paddingY: '1rem',
|
||||
paddingX: '1rem',
|
||||
display: 'flex',
|
||||
|
||||
@@ -29,7 +29,7 @@ export const RowWrapper = ({
|
||||
}}
|
||||
className={css({
|
||||
width: '100%',
|
||||
background: 'gray.050',
|
||||
background: 'gray.100',
|
||||
paddingBlock: '0.5rem',
|
||||
paddingInline: '0',
|
||||
display: 'flex',
|
||||
|
||||
@@ -26,7 +26,7 @@ const BetaBadge = () => (
|
||||
display: 'block',
|
||||
letterSpacing: '-0.02rem',
|
||||
padding: '0 0.25rem',
|
||||
backgroundColor: 'brand.050',
|
||||
backgroundColor: 'primary.100',
|
||||
color: '#0063CB',
|
||||
fontSize: '14px',
|
||||
fontWeight: 500,
|
||||
@@ -155,7 +155,7 @@ const RecordingDownload = () => {
|
||||
</LinkButton>
|
||||
<div
|
||||
className={css({
|
||||
backgroundColor: 'gray.025',
|
||||
backgroundColor: 'greyscale.50',
|
||||
borderRadius: '5px',
|
||||
paddingY: '1rem',
|
||||
paddingX: '1rem',
|
||||
|
||||
@@ -6,7 +6,7 @@ const StyledContainer = styled('div', {
|
||||
width: '24px',
|
||||
height: '24px',
|
||||
boxSizing: 'border-box',
|
||||
backgroundColor: 'background.semantic.brand.primary',
|
||||
backgroundColor: 'primary',
|
||||
borderRadius: '100%',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
@@ -20,8 +20,8 @@ const StyledContainer = styled('div', {
|
||||
width: '58px',
|
||||
borderLeftRadius: 8,
|
||||
borderRightRadius: 0,
|
||||
backgroundColor: 'brand.150',
|
||||
border: '1px solid brand.500',
|
||||
backgroundColor: 'primary.200',
|
||||
border: '1px solid primary.500',
|
||||
gap: '3px',
|
||||
},
|
||||
},
|
||||
@@ -55,7 +55,7 @@ const StyledChild = styled('div', {
|
||||
},
|
||||
pushToTalk: {
|
||||
true: {
|
||||
backgroundColor: 'background.semantic.brand.primary',
|
||||
backgroundColor: 'primary',
|
||||
width: '6px',
|
||||
height: '6px',
|
||||
},
|
||||
|
||||
@@ -318,7 +318,7 @@ export const Conference = ({
|
||||
}
|
||||
connectOptions={connectOptions}
|
||||
className={css({
|
||||
backgroundColor: 'gray.900 !important',
|
||||
backgroundColor: 'primaryDark.50 !important',
|
||||
})}
|
||||
onError={handleError}
|
||||
onConnected={handleConnected}
|
||||
|
||||
@@ -92,7 +92,8 @@ export const InviteDialog = ({ mode }: { mode: 'join' | 'create' }) => {
|
||||
</Heading>
|
||||
<Div position="absolute" top="5" right="5">
|
||||
<Button
|
||||
variant="tertiaryNeutral"
|
||||
invisible
|
||||
variant="tertiaryText"
|
||||
size="xs"
|
||||
onPress={dismiss}
|
||||
aria-label={t('closeDialog')}
|
||||
@@ -211,7 +212,7 @@ export const InviteDialog = ({ mode }: { mode: 'join' | 'create' }) => {
|
||||
<HStack>
|
||||
<div
|
||||
className={css({
|
||||
backgroundColor: 'brand.150',
|
||||
backgroundColor: 'primary.200',
|
||||
borderRadius: '50%',
|
||||
padding: '4px',
|
||||
marginTop: '1rem',
|
||||
@@ -220,7 +221,7 @@ export const InviteDialog = ({ mode }: { mode: 'join' | 'create' }) => {
|
||||
<RiSpam2Fill
|
||||
size={22}
|
||||
className={css({
|
||||
fill: 'brand.500',
|
||||
fill: 'primary.500',
|
||||
})}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -149,7 +149,7 @@ export const Lobby = ({
|
||||
fullWidth: true,
|
||||
}}
|
||||
>
|
||||
<VStack marginBottom="base">
|
||||
<VStack marginBottom={1}>
|
||||
<H lvl={1} margin="sm" centered>
|
||||
{t('heading')}
|
||||
</H>
|
||||
|
||||
@@ -10,7 +10,7 @@ import { captureEvent } from '@/features/analytics/telemetry'
|
||||
const Card = styled('div', {
|
||||
base: {
|
||||
border: '1px solid',
|
||||
borderColor: 'gray.150',
|
||||
borderColor: 'gray.300',
|
||||
padding: '1rem',
|
||||
marginTop: '1.5rem',
|
||||
borderRadius: '0.25rem',
|
||||
@@ -25,7 +25,7 @@ const Bar = styled('div', {
|
||||
base: {
|
||||
display: 'flex',
|
||||
border: '2px solid',
|
||||
borderColor: 'gray.150',
|
||||
borderColor: 'gray.300',
|
||||
borderRadius: '8px',
|
||||
overflowY: 'hidden',
|
||||
scrollbar: 'hidden',
|
||||
@@ -48,19 +48,19 @@ const ratingButtonRecipe = cva({
|
||||
variants: {
|
||||
selected: {
|
||||
true: {
|
||||
backgroundColor: 'brand.550',
|
||||
backgroundColor: 'primary.800',
|
||||
color: 'white',
|
||||
},
|
||||
false: {
|
||||
'&[data-hovered]': {
|
||||
backgroundColor: 'gray.050',
|
||||
backgroundColor: 'gray.100',
|
||||
},
|
||||
},
|
||||
},
|
||||
borderLeft: {
|
||||
true: {
|
||||
borderLeft: '1px solid',
|
||||
borderColor: 'gray.150',
|
||||
borderColor: 'gray.300',
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -118,7 +118,7 @@ const OpenFeedback = ({
|
||||
marginBottom: '1rem',
|
||||
}}
|
||||
/>
|
||||
<VStack gap="xs">
|
||||
<VStack gap="0.5">
|
||||
<Button
|
||||
variant="primary"
|
||||
size="sm"
|
||||
|
||||
@@ -78,7 +78,7 @@ export const Admin = () => {
|
||||
border: 'none',
|
||||
height: '1px',
|
||||
width: '100%',
|
||||
background: 'gray.100',
|
||||
background: 'greyscale.250',
|
||||
})}
|
||||
/>
|
||||
<H
|
||||
@@ -165,7 +165,7 @@ export const Admin = () => {
|
||||
border: 'none',
|
||||
height: '1px',
|
||||
width: '100%',
|
||||
background: 'gray.100',
|
||||
background: 'greyscale.250',
|
||||
})}
|
||||
/>
|
||||
<H
|
||||
|
||||
@@ -70,13 +70,13 @@ const VisualCountDown = () => {
|
||||
className={css({
|
||||
height: '50px',
|
||||
width: '50px',
|
||||
backgroundColor: 'brand.100',
|
||||
backgroundColor: 'blue.100',
|
||||
borderRadius: '25px',
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
fontWeight: '500',
|
||||
color: 'brand.700',
|
||||
color: 'blue.800',
|
||||
margin: 'auto',
|
||||
})}
|
||||
aria-hidden="true"
|
||||
|
||||
@@ -23,7 +23,7 @@ export const MuteAlertDialog = ({
|
||||
aria-label={t('heading', { name })}
|
||||
>
|
||||
<P>{t('description', { name })}</P>
|
||||
<HStack gap="base">
|
||||
<HStack gap={1}>
|
||||
<Button variant="text" size="sm" onPress={onClose}>
|
||||
{t('cancel')}
|
||||
</Button>
|
||||
|
||||
@@ -64,7 +64,7 @@ export const ScreenShareZoomControls = ({
|
||||
className={css({
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
backgroundColor: 'gray.900',
|
||||
backgroundColor: 'primaryDark.50',
|
||||
borderRadius: '2rem',
|
||||
padding: '0.5rem',
|
||||
opacity: 0.7,
|
||||
|
||||
@@ -56,9 +56,9 @@ const StyledSidePanel = React.forwardRef<HTMLElement, StyledSidePanelProps>(
|
||||
className={css({
|
||||
borderWidth: '1px',
|
||||
borderStyle: 'solid',
|
||||
borderColor: 'border.surface.primary',
|
||||
backgroundColor: 'background.surface.primary',
|
||||
color: 'content.semantic.neutral.primary',
|
||||
borderColor: 'box.border',
|
||||
backgroundColor: 'box.bg',
|
||||
color: 'box.text',
|
||||
borderRadius: 8,
|
||||
flex: 1,
|
||||
position: 'absolute',
|
||||
@@ -130,7 +130,8 @@ const StyledSidePanel = React.forwardRef<HTMLElement, StyledSidePanelProps>(
|
||||
}}
|
||||
>
|
||||
<Button
|
||||
variant="tertiaryNeutral"
|
||||
invisible
|
||||
variant="tertiaryText"
|
||||
size="xs"
|
||||
onPress={onClose}
|
||||
aria-label={closeButtonTooltip}
|
||||
|
||||
@@ -37,10 +37,10 @@ const ToolButton = ({
|
||||
paddingX: '0.75rem 1.5rem',
|
||||
borderRadius: '30px',
|
||||
width: 'full',
|
||||
backgroundColor: 'gray.025',
|
||||
backgroundColor: 'gray.50',
|
||||
textAlign: 'start',
|
||||
'&[data-hovered]': {
|
||||
backgroundColor: 'brand.050',
|
||||
backgroundColor: 'primary.50',
|
||||
cursor: 'pointer',
|
||||
},
|
||||
})}
|
||||
@@ -56,7 +56,7 @@ const ToolButton = ({
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
position: 'relative',
|
||||
background: 'brand.550',
|
||||
background: 'primary.800',
|
||||
color: 'white',
|
||||
})}
|
||||
>
|
||||
@@ -68,8 +68,8 @@ const ToolButton = ({
|
||||
as="h2"
|
||||
className={css({
|
||||
display: 'flex',
|
||||
gap: '3xs',
|
||||
fontWeight: 'bold',
|
||||
gap: 0.25,
|
||||
fontWeight: 'semibold',
|
||||
})}
|
||||
>
|
||||
{title}
|
||||
@@ -146,7 +146,7 @@ export const Tools = () => {
|
||||
flexGrow={1}
|
||||
flexDirection="column"
|
||||
alignItems="start"
|
||||
gap="xs"
|
||||
gap={0.5}
|
||||
>
|
||||
<Text
|
||||
variant="note"
|
||||
|
||||
@@ -55,11 +55,11 @@ export const ChatToggle = ({
|
||||
right: '-.25rem',
|
||||
width: '1rem',
|
||||
height: '1rem',
|
||||
backgroundColor: 'background.semantic.error.primary',
|
||||
backgroundColor: 'alert.notification',
|
||||
borderRadius: '50%',
|
||||
zIndex: 1,
|
||||
border: '2px solid',
|
||||
borderColor: 'gray.100',
|
||||
borderColor: 'greyscale.250',
|
||||
})}
|
||||
/>
|
||||
)}
|
||||
|
||||
+6
-6
@@ -19,11 +19,11 @@ const StyledContainer = styled('div', {
|
||||
variants: {
|
||||
theme: {
|
||||
light: {
|
||||
borderColor: 'gray.100',
|
||||
color: 'gray.600',
|
||||
borderColor: 'gray.200',
|
||||
color: 'greyscale.600',
|
||||
},
|
||||
dark: {
|
||||
borderColor: 'gray.550',
|
||||
borderColor: 'primaryDark.300',
|
||||
color: 'rgba(255 255 255 / 0.7)',
|
||||
},
|
||||
},
|
||||
@@ -40,7 +40,7 @@ const StyledGaugeContainer = styled('div', {
|
||||
variants: {
|
||||
theme: {
|
||||
light: {
|
||||
backgroundColor: 'gray.100',
|
||||
backgroundColor: 'greyscale.250',
|
||||
},
|
||||
dark: {
|
||||
backgroundColor: 'rgba(255 255 255 / 0.25)',
|
||||
@@ -61,10 +61,10 @@ const StyledGauge = styled('div', {
|
||||
variants: {
|
||||
theme: {
|
||||
light: {
|
||||
backgroundColor: 'brand.500',
|
||||
backgroundColor: 'primary.500',
|
||||
},
|
||||
dark: {
|
||||
backgroundColor: 'gray.150',
|
||||
backgroundColor: 'primaryDark.800',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
+2
-2
@@ -29,10 +29,10 @@ const StyledContainer = styled('div', {
|
||||
variants: {
|
||||
theme: {
|
||||
light: {
|
||||
borderColor: 'gray.100',
|
||||
borderColor: 'gray.200',
|
||||
},
|
||||
dark: {
|
||||
borderColor: 'gray.550',
|
||||
borderColor: 'primaryDark.300',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -46,7 +46,7 @@ const isSupported = BackgroundProcessorFactory.isSupported()
|
||||
|
||||
const Information = styled('div', {
|
||||
base: {
|
||||
backgroundColor: 'warning.050',
|
||||
backgroundColor: 'orange.50',
|
||||
borderRadius: '4px',
|
||||
padding: '0.75rem 0.75rem',
|
||||
alignItems: 'start',
|
||||
@@ -621,7 +621,7 @@ export const EffectsConfiguration = ({
|
||||
layout === 'horizontal'
|
||||
? {
|
||||
md: {
|
||||
borderLeft: '1px solid gray.100',
|
||||
borderLeft: '1px solid greyscale.250',
|
||||
paddingLeft: '1.5rem',
|
||||
width: '420px',
|
||||
flexShrink: 0,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { useCallback, useSyncExternalStore } from 'react'
|
||||
import { hashKey } from '@tanstack/react-query'
|
||||
import type { ApiRoom } from '@/features/rooms/api/ApiRoom'
|
||||
import { useParams } from 'wouter'
|
||||
import { keys } from '@/api/queryKeys'
|
||||
@@ -5,6 +7,21 @@ import { queryClient } from '@/api/queryClient'
|
||||
|
||||
export const useRoomData = (): ApiRoom | undefined => {
|
||||
const { roomId } = useParams()
|
||||
const queryKey = [keys.room, roomId]
|
||||
return queryClient.getQueryData<ApiRoom>(queryKey)
|
||||
|
||||
const subscribe = useCallback(
|
||||
(onStoreChange: () => void) => {
|
||||
const queryHash = hashKey([keys.room, roomId])
|
||||
return queryClient.getQueryCache().subscribe((event) => {
|
||||
if (event.query.queryHash === queryHash) onStoreChange()
|
||||
})
|
||||
},
|
||||
[roomId]
|
||||
)
|
||||
|
||||
const getSnapshot = useCallback(
|
||||
() => queryClient.getQueryData<ApiRoom>([keys.room, roomId]),
|
||||
[roomId]
|
||||
)
|
||||
|
||||
return useSyncExternalStore(subscribe, getSnapshot)
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ export const LateralMenu = () => {
|
||||
<Dialog
|
||||
className={css({
|
||||
width: '65px',
|
||||
backgroundColor: 'gray.900',
|
||||
backgroundColor: 'primaryDark.50',
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
alignItems: 'center',
|
||||
|
||||
@@ -37,7 +37,7 @@ export function ResponsiveMenu({
|
||||
>
|
||||
<Modal
|
||||
className={css({
|
||||
backgroundColor: 'gray.650',
|
||||
backgroundColor: 'primaryDark.200',
|
||||
borderRadius: '20px',
|
||||
flexGrow: 1,
|
||||
padding: '1.5rem',
|
||||
|
||||
@@ -152,7 +152,7 @@ const CreateMeetingButton = () => {
|
||||
}}
|
||||
>
|
||||
{roomUrl && room?.slug ? (
|
||||
<VStack justify={'start'} alignItems={'start'} gap="3xs">
|
||||
<VStack justify={'start'} alignItems={'start'} gap={0.25}>
|
||||
<HStack>
|
||||
<Link
|
||||
className={buttonRecipe({ size: 'sm' })}
|
||||
@@ -197,7 +197,7 @@ const CreateMeetingButton = () => {
|
||||
)}
|
||||
</HStack>
|
||||
</HStack>
|
||||
<VStack justify={'start'} alignItems="start" gap="3xs">
|
||||
<VStack justify={'start'} alignItems="start" gap={0.25}>
|
||||
<Text variant={'smNote'} margin={false} centered={false}>
|
||||
{roomUrl.replace('https://', '')}
|
||||
</Text>
|
||||
|
||||
@@ -22,13 +22,13 @@ type Source = Track.Source
|
||||
const SectionHeader = ({ children }: { children: ReactNode }) => (
|
||||
<div
|
||||
className={css({
|
||||
backgroundColor: 'gray.025',
|
||||
backgroundColor: 'greyscale.50',
|
||||
borderTopWidth: '1px',
|
||||
borderTopStyle: 'solid',
|
||||
borderTopColor: 'gray.100',
|
||||
borderTopColor: 'greyscale.250',
|
||||
borderBottomWidth: '1px',
|
||||
borderBottomStyle: 'solid',
|
||||
borderBottomColor: 'gray.100',
|
||||
borderBottomColor: 'greyscale.250',
|
||||
padding: '0.75rem 1.5rem',
|
||||
})}
|
||||
>
|
||||
@@ -205,7 +205,7 @@ const SettingsPopup = () => {
|
||||
padding: '1.5rem',
|
||||
borderBottomWidth: '1px',
|
||||
borderBottomStyle: 'solid',
|
||||
borderBottomColor: 'gray.100',
|
||||
borderBottomColor: 'greyscale.250',
|
||||
})}
|
||||
>
|
||||
<img
|
||||
@@ -361,7 +361,7 @@ const SettingsPopup = () => {
|
||||
padding: '1rem 1.5rem',
|
||||
borderTopWidth: '1px',
|
||||
borderTopStyle: 'solid',
|
||||
borderTopColor: 'gray.100',
|
||||
borderTopColor: 'greyscale.250',
|
||||
})}
|
||||
>
|
||||
<Button size="sm" onPress={() => window.close()}>
|
||||
|
||||
@@ -121,7 +121,7 @@ export const RoomsTab = ({ id }: RoomsTabProps) => {
|
||||
height: '1px',
|
||||
width: '100%',
|
||||
flexShrink: 0,
|
||||
background: 'gray.100',
|
||||
background: 'greyscale.250',
|
||||
})}
|
||||
/>
|
||||
<H
|
||||
@@ -179,7 +179,7 @@ export const RoomsTab = ({ id }: RoomsTabProps) => {
|
||||
width: '100%',
|
||||
flexShrink: 0,
|
||||
marginY: '1rem',
|
||||
background: 'gray.100',
|
||||
background: 'greyscale.250',
|
||||
})}
|
||||
/>
|
||||
<H
|
||||
|
||||
@@ -49,7 +49,7 @@ export const SupportWidget = () => {
|
||||
<RiCheckboxCircleFill
|
||||
size={24}
|
||||
aria-hidden="true"
|
||||
className={css({ color: 'success.150', flexShrink: 0 })}
|
||||
className={css({ color: 'success.300', flexShrink: 0 })}
|
||||
/>
|
||||
<div>
|
||||
<Text margin={false} bold>
|
||||
|
||||
@@ -20,7 +20,7 @@ export const CenteredContent = ({
|
||||
)}
|
||||
{children}
|
||||
{!!withBackButton && (
|
||||
<Center marginTop="lg">
|
||||
<Center marginTop={2}>
|
||||
<BackToHome size="sm" />
|
||||
</Center>
|
||||
)}
|
||||
|
||||
@@ -45,7 +45,7 @@ const LoginHint = () => {
|
||||
maxWidth: 'min(350px, calc(100vw - 2rem))',
|
||||
boxShadow: '0 2px 5px rgba(0 0 0 / 0.1)',
|
||||
borderRadius: '1rem',
|
||||
backgroundColor: 'brand.150',
|
||||
backgroundColor: 'primary.200',
|
||||
_after: {
|
||||
content: '""',
|
||||
position: 'absolute',
|
||||
@@ -53,7 +53,7 @@ const LoginHint = () => {
|
||||
right: '1.5rem',
|
||||
borderWidth: '0 10px 10px 10px',
|
||||
borderStyle: 'solid',
|
||||
borderColor: 'transparent transparent {colors.brand.150} transparent',
|
||||
borderColor: 'transparent transparent #E3E3FB transparent',
|
||||
},
|
||||
})}
|
||||
>
|
||||
@@ -109,15 +109,15 @@ export const Header = () => {
|
||||
<FeedbackBanner />
|
||||
<div
|
||||
className={css({
|
||||
paddingBottom: 'base',
|
||||
paddingX: 'base',
|
||||
paddingTop: '3xs',
|
||||
paddingBottom: 1,
|
||||
paddingX: 1,
|
||||
paddingTop: 0.25,
|
||||
flexShrink: 0,
|
||||
})}
|
||||
>
|
||||
<HStack gap={0} justify="space-between" alignItems="center">
|
||||
<header>
|
||||
<Stack gap="2.25rem" direction="row" align="center">
|
||||
<Stack gap={2.25} direction="row" align="center">
|
||||
<Link
|
||||
className={css({
|
||||
display: 'flex',
|
||||
@@ -126,7 +126,7 @@ export const Header = () => {
|
||||
gap: { base: '0', sm: '2rem' },
|
||||
padding: { base: '0.5rem', sm: '1rem' },
|
||||
_hover: {
|
||||
backgroundColor: 'gray.050',
|
||||
backgroundColor: 'greyscale.100',
|
||||
borderRadius: '4px',
|
||||
},
|
||||
})}
|
||||
@@ -153,7 +153,7 @@ export const Header = () => {
|
||||
</Stack>
|
||||
</header>
|
||||
<nav>
|
||||
<Stack gap="base" direction="row" align="center">
|
||||
<Stack gap={1} direction="row" align="center">
|
||||
<SupportButton />
|
||||
{isLoggedIn === false &&
|
||||
!isHome &&
|
||||
|
||||
@@ -29,7 +29,7 @@ export const Layout = ({ children }: { children: ReactNode }) => {
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
backgroundColor: 'white',
|
||||
color: 'content.semantic.neutral.primary',
|
||||
color: 'default.text',
|
||||
flex: '1',
|
||||
})}
|
||||
style={{
|
||||
|
||||
@@ -41,7 +41,7 @@ export const Screen = ({
|
||||
{headerTitle && (
|
||||
<div
|
||||
className={css({
|
||||
backgroundColor: 'brand.100',
|
||||
backgroundColor: 'primary.100',
|
||||
width: '100%',
|
||||
})}
|
||||
>
|
||||
|
||||
@@ -31,11 +31,11 @@ const StyledSkipLink = styled('a', {
|
||||
whiteSpace: 'normal',
|
||||
zIndex: 9999,
|
||||
backgroundColor: 'white',
|
||||
color: 'brand.550',
|
||||
color: 'primary.800',
|
||||
fontWeight: 500,
|
||||
fontSize: '0.875rem',
|
||||
border: '1px solid',
|
||||
borderColor: 'brand.550',
|
||||
borderColor: 'primary.800',
|
||||
borderRadius: 4,
|
||||
outline: '2px solid',
|
||||
outlineColor: 'focusRing',
|
||||
|
||||
@@ -56,7 +56,7 @@ const link = cva({
|
||||
color: 'blue',
|
||||
},
|
||||
note: {
|
||||
color: 'content.semantic.neutral.secondary',
|
||||
color: 'default.subtle-text',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -4,8 +4,8 @@ const badge = cva({
|
||||
base: {
|
||||
display: 'inline-block',
|
||||
padding: '0.25rem 0.5rem',
|
||||
backgroundColor: 'background.semantic.brand.secondary',
|
||||
color: 'content.semantic.brand.secondary',
|
||||
backgroundColor: 'primary.subtle',
|
||||
color: 'primary.subtle-text',
|
||||
borderRadius: '6',
|
||||
},
|
||||
variants: {
|
||||
|
||||
@@ -37,22 +37,22 @@ const box = cva({
|
||||
light: {
|
||||
borderWidth: '1px',
|
||||
borderStyle: 'solid',
|
||||
borderColor: 'border.surface.primary',
|
||||
backgroundColor: 'background.surface.primary',
|
||||
color: 'content.semantic.neutral.primary',
|
||||
borderColor: 'box.border',
|
||||
backgroundColor: 'box.bg',
|
||||
color: 'box.text',
|
||||
},
|
||||
subtle: {
|
||||
color: 'content.semantic.neutral.secondary',
|
||||
backgroundColor: 'background.semantic.neutral.tertiary',
|
||||
color: 'default.subtle-text',
|
||||
backgroundColor: 'default.subtle',
|
||||
},
|
||||
control: {
|
||||
border: '1px solid {colors.border.semantic.neutral.primary}',
|
||||
backgroundColor: 'background.surface.primary',
|
||||
color: 'content.semantic.neutral.primary',
|
||||
border: '1px solid {colors.control.border}',
|
||||
backgroundColor: 'box.bg',
|
||||
color: 'control.text',
|
||||
},
|
||||
dark: {
|
||||
backgroundColor: 'gray.900',
|
||||
borderColord: 'gray.900',
|
||||
backgroundColor: 'primaryDark.50',
|
||||
borderColord: 'primaryDark.50',
|
||||
},
|
||||
},
|
||||
size: {
|
||||
|
||||
@@ -9,33 +9,28 @@ import { styled } from '@/styled-system/jsx'
|
||||
import { FieldErrors } from './FieldErrors'
|
||||
import { FieldDescription } from './FieldDescription'
|
||||
|
||||
// Follows the checkbox of the UI kit (its `forms-checkbox` component tokens).
|
||||
// styled taken from example at https://react-spectrum.adobe.com/react-aria/Checkbox.html
|
||||
const StyledCheckbox = styled(RACCheckbox, {
|
||||
base: {
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
gap: 'xs',
|
||||
gap: 0.375,
|
||||
forcedColorAdjust: 'none',
|
||||
width: 'fit-content',
|
||||
cursor: 'pointer',
|
||||
color: 'content.semantic.neutral.primary',
|
||||
fontSize: 'sm',
|
||||
fontWeight: 'medium',
|
||||
'& .mt-Checkbox-checkbox': {
|
||||
borderColor: 'control.border',
|
||||
flexShrink: 0,
|
||||
width: '1.5rem',
|
||||
height: '1.5rem',
|
||||
border: '1.5px solid',
|
||||
borderColor: 'content.semantic.neutral.tertiary',
|
||||
borderRadius: 2,
|
||||
backgroundColor: 'background.surface.primary',
|
||||
width: '1.375rem',
|
||||
height: '1.375rem',
|
||||
border: '1px solid',
|
||||
borderRadius: 4,
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
transition: 'border 250ms, box-shadow 250ms, background-color 250ms',
|
||||
transition: 'all 200ms',
|
||||
},
|
||||
'& svg': {
|
||||
stroke: 'content.semantic.contextual.primary',
|
||||
stroke: 'primary.text',
|
||||
width: '0.875rem',
|
||||
height: '0.875rem',
|
||||
flexShrink: 0,
|
||||
@@ -45,39 +40,30 @@ const StyledCheckbox = styled(RACCheckbox, {
|
||||
strokeDashoffset: '66',
|
||||
transition: 'all 200ms',
|
||||
},
|
||||
'&[data-hovered] .mt-Checkbox-checkbox': {
|
||||
boxShadow: '0 0 0 1px {colors.content.semantic.neutral.tertiary}',
|
||||
'&[data-pressed] .mt-Checkbox-checkbox': {
|
||||
borderColor: 'focusRing',
|
||||
},
|
||||
'&[data-focus-visible] .mt-Checkbox-checkbox': {
|
||||
borderColor: 'content.semantic.brand.primary',
|
||||
boxShadow: '0 0 0 1px {colors.content.semantic.brand.primary}',
|
||||
outline: '2px solid!',
|
||||
outlineColor: 'focusRing!',
|
||||
outlineOffset: '2px!',
|
||||
},
|
||||
'&[data-selected] .mt-Checkbox-checkbox': {
|
||||
borderColor: 'content.semantic.brand.tertiary',
|
||||
backgroundColor: 'content.semantic.brand.tertiary',
|
||||
borderColor: 'primary',
|
||||
backgroundColor: 'primary',
|
||||
},
|
||||
'&[data-selected][data-hovered] .mt-Checkbox-checkbox': {
|
||||
boxShadow: '0 0 0 1px {colors.content.semantic.brand.tertiary}',
|
||||
'&[data-selected][data-pressed] .mt-Checkbox-checkbox': {
|
||||
borderColor: 'primary.active',
|
||||
backgroundColor: 'primary.active',
|
||||
},
|
||||
'&[data-selected] svg': {
|
||||
strokeDashoffset: '44',
|
||||
},
|
||||
'&[data-mt-checkbox-invalid="true"] .mt-Checkbox-checkbox': {
|
||||
borderColor: 'border.semantic.error.primary',
|
||||
borderColor: 'danger',
|
||||
},
|
||||
'&[data-selected][data-mt-checkbox-invalid="true"] .mt-Checkbox-checkbox': {
|
||||
backgroundColor: 'background.semantic.error.primary',
|
||||
},
|
||||
'&[data-disabled]': {
|
||||
cursor: 'not-allowed',
|
||||
color: 'content.semantic.disabled.primary',
|
||||
},
|
||||
'&[data-disabled][data-selected] .mt-Checkbox-checkbox': {
|
||||
borderColor: 'content.semantic.disabled.primary',
|
||||
backgroundColor: 'content.semantic.disabled.primary',
|
||||
backgroundColor: 'danger',
|
||||
},
|
||||
},
|
||||
variants: {
|
||||
|
||||
@@ -148,7 +148,7 @@ export const Dialog = ({
|
||||
{!isAlert && (
|
||||
<Div position="absolute" top="5" right="5">
|
||||
<Button
|
||||
variant="tertiaryNeutral"
|
||||
variant="tertiaryText"
|
||||
invisible
|
||||
size="xs"
|
||||
onPress={() => close()}
|
||||
|
||||
@@ -188,7 +188,7 @@ export const Field = <T extends object>({
|
||||
{...(props as PartialCheckboxGroupProps)}
|
||||
>
|
||||
{LabelAndDescription}
|
||||
<Div marginTop="3xs">
|
||||
<Div marginTop={0.25}>
|
||||
{items.map((item, index) => (
|
||||
<FieldItem last={index === items.length - 1} key={item.value}>
|
||||
<Checkbox size="sm" value={item.value}>
|
||||
@@ -298,5 +298,5 @@ const FieldItem = ({
|
||||
children: ReactNode
|
||||
last?: boolean
|
||||
}) => {
|
||||
return <Div {...(!last ? { marginBottom: '3xs' } : {})}>{children}</Div>
|
||||
return <Div {...(!last ? { marginBottom: 0.25 } : {})}>{children}</Div>
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@ const StyledDescription = styled(Text, {
|
||||
base: {
|
||||
display: 'block',
|
||||
textStyle: 'sm',
|
||||
color: 'content.semantic.neutral.secondary',
|
||||
marginBottom: '4xs',
|
||||
color: 'default.subtle-text',
|
||||
marginBottom: 0.125,
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ const StyledErrors = styled('div', {
|
||||
base: {
|
||||
display: 'block',
|
||||
textStyle: 'sm',
|
||||
color: 'content.semantic.error.secondary',
|
||||
marginTop: '4xs',
|
||||
color: 'danger',
|
||||
marginTop: 0.125,
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@ export const Hr = (props: React.HTMLAttributes<HTMLHRElement>) => {
|
||||
return (
|
||||
<hr
|
||||
className={css({
|
||||
marginY: 'base',
|
||||
borderColor: 'gray.150',
|
||||
marginY: 1,
|
||||
borderColor: 'neutral.300',
|
||||
})}
|
||||
{...props}
|
||||
/>
|
||||
|
||||
@@ -9,11 +9,11 @@ import { Input as RACInput } from 'react-aria-components'
|
||||
export const Input = styled(RACInput, {
|
||||
base: {
|
||||
width: 'full',
|
||||
paddingY: '3xs',
|
||||
paddingX: 'xs',
|
||||
paddingY: 0.25,
|
||||
paddingX: 0.5,
|
||||
border: '1px solid',
|
||||
borderColor: 'border.semantic.neutral.primary',
|
||||
color: 'content.semantic.neutral.primary',
|
||||
borderColor: 'control.border',
|
||||
color: 'control.text',
|
||||
borderRadius: 4,
|
||||
transition: 'all 200ms',
|
||||
},
|
||||
|
||||
@@ -12,8 +12,8 @@ import { StyledPopover } from './StyledPopover'
|
||||
const StyledOverlayArrow = styled(OverlayArrow, {
|
||||
base: {
|
||||
display: 'block',
|
||||
fill: 'background.surface.primary',
|
||||
stroke: 'border.surface.primary',
|
||||
fill: 'box.bg',
|
||||
stroke: 'box.border',
|
||||
strokeWidth: 1,
|
||||
'&[data-placement="bottom"] svg': {
|
||||
transform: 'rotate(180deg) translateY(-1px)',
|
||||
@@ -23,8 +23,8 @@ const StyledOverlayArrow = styled(OverlayArrow, {
|
||||
variant: {
|
||||
light: {},
|
||||
dark: {
|
||||
fill: 'gray.900',
|
||||
stroke: 'gray.900',
|
||||
fill: 'primaryDark.50',
|
||||
stroke: 'primaryDark.50',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -12,19 +12,15 @@ const StyledRadio = styled(RACRadio, {
|
||||
// anchor the visually hidden input, so it scrolls with the radio
|
||||
position: 'relative',
|
||||
alignItems: 'center',
|
||||
gap: '2xs',
|
||||
gap: 0.375,
|
||||
forcedColorAdjust: 'none',
|
||||
width: 'fit-content',
|
||||
cursor: 'pointer',
|
||||
'&[data-disabled]': {
|
||||
cursor: 'default',
|
||||
},
|
||||
'& .mt-Radio': {
|
||||
borderRadius: 'full',
|
||||
flexShrink: 0,
|
||||
width: '1.125rem',
|
||||
height: '1.125rem',
|
||||
border: '1px solid {colors.border.semantic.neutral.primary}',
|
||||
border: '1px solid {colors.control.border}',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
@@ -38,7 +34,7 @@ const StyledRadio = styled(RACRadio, {
|
||||
transition: 'all 200ms',
|
||||
},
|
||||
'&[data-pressed] .mt-Radio': {
|
||||
borderColor: 'background.semantic.brand.primary-hover',
|
||||
borderColor: 'primary.active',
|
||||
},
|
||||
'&[data-focus-visible] .mt-Radio': {
|
||||
outline: '2px solid!',
|
||||
@@ -46,13 +42,13 @@ const StyledRadio = styled(RACRadio, {
|
||||
outlineOffset: '2px!',
|
||||
},
|
||||
'&[data-selected] .mt-Radio': {
|
||||
borderColor: 'border.semantic.brand.primary',
|
||||
borderColor: 'primary',
|
||||
},
|
||||
'&[data-selected] .mt-Radio-check': {
|
||||
backgroundColor: 'background.semantic.brand.primary',
|
||||
backgroundColor: 'primary',
|
||||
},
|
||||
'&[data-selected][data-pressed] .mt-Radio-check': {
|
||||
backgroundColor: 'background.semantic.brand.primary-hover',
|
||||
backgroundColor: 'primary.active',
|
||||
},
|
||||
},
|
||||
variants: {
|
||||
|
||||
@@ -22,11 +22,11 @@ const StyledButton = styled(Button, {
|
||||
display: 'flex',
|
||||
justifyContent: 'space-between',
|
||||
alignItems: 'center',
|
||||
paddingY: '4xs',
|
||||
paddingX: '3xs',
|
||||
paddingY: 0.125,
|
||||
paddingX: 0.25,
|
||||
border: '1px solid',
|
||||
borderColor: 'border.semantic.neutral.primary',
|
||||
color: 'content.semantic.neutral.primary',
|
||||
borderColor: 'control.border',
|
||||
color: 'control.text',
|
||||
borderRadius: 4,
|
||||
boxShadow: '0 1px 2px rgba(0 0 0 / 0.1)',
|
||||
'&[data-focus-visible]': {
|
||||
@@ -34,12 +34,12 @@ const StyledButton = styled(Button, {
|
||||
outlineOffset: '-1px',
|
||||
},
|
||||
'&[data-pressed]': {
|
||||
backgroundColor: 'background.semantic.neutral.tertiary-hover',
|
||||
backgroundColor: 'control.hover',
|
||||
},
|
||||
// fixme disabled style is being overridden by placeholder one and needs refinement.
|
||||
'&[data-disabled]': {
|
||||
color: 'content.semantic.neutral.secondary',
|
||||
borderColor: 'gray.100',
|
||||
color: 'default.subtle-text',
|
||||
borderColor: 'gray.200',
|
||||
boxShadow: '0 1px 2px rgba(0 0 0 / 0.02)',
|
||||
},
|
||||
},
|
||||
@@ -47,20 +47,20 @@ const StyledButton = styled(Button, {
|
||||
variant: {
|
||||
light: {},
|
||||
dark: {
|
||||
backgroundColor: 'gray.700',
|
||||
backgroundColor: 'primaryDark.100',
|
||||
fontWeight: 'medium !important',
|
||||
color: 'white',
|
||||
'&[data-pressed]': {
|
||||
backgroundColor: 'gray.100',
|
||||
color: 'gray.700',
|
||||
backgroundColor: 'primaryDark.900',
|
||||
color: 'primaryDark.100',
|
||||
},
|
||||
'&[data-hovered]': {
|
||||
backgroundColor: 'gray.550',
|
||||
backgroundColor: 'primaryDark.300',
|
||||
color: 'white',
|
||||
},
|
||||
'&[data-selected]': {
|
||||
backgroundColor: 'gray.250 !important',
|
||||
color: 'gray.700 !important',
|
||||
backgroundColor: 'primaryDark.700 !important',
|
||||
color: 'primaryDark.100 !important',
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -76,7 +76,7 @@ const StyledSelectValue = styled(SelectValue, {
|
||||
overflow: 'hidden',
|
||||
textWrap: 'nowrap',
|
||||
'&[data-placeholder]': {
|
||||
color: 'content.semantic.neutral.secondary',
|
||||
color: 'default.subtle-text',
|
||||
fontStyle: 'italic',
|
||||
},
|
||||
},
|
||||
|
||||
@@ -4,7 +4,7 @@ import { Separator as RACSeparator } from 'react-aria-components'
|
||||
export const Separator = styled(RACSeparator, {
|
||||
base: {
|
||||
height: '1px',
|
||||
background: 'gray.650',
|
||||
background: 'primaryDark.200',
|
||||
margin: '4px 0',
|
||||
},
|
||||
})
|
||||
|
||||
@@ -53,7 +53,7 @@ export const Spinner = ({
|
||||
strokeDashoffset={0}
|
||||
strokeLinecap="round"
|
||||
className={css({
|
||||
stroke: variant == 'light' ? 'brand.100' : 'transparent',
|
||||
stroke: variant == 'light' ? 'primary.100' : 'transparent',
|
||||
})}
|
||||
/>
|
||||
<circle
|
||||
@@ -70,7 +70,7 @@ export const Spinner = ({
|
||||
className={cx(
|
||||
rotatingArcClassName,
|
||||
css({
|
||||
stroke: variant == 'light' ? 'brand.550' : 'white',
|
||||
stroke: variant == 'light' ? 'primary.800' : 'white',
|
||||
})
|
||||
)}
|
||||
/>
|
||||
@@ -90,7 +90,7 @@ export const Spinner = ({
|
||||
style={{
|
||||
display: 'block',
|
||||
transform: 'translateY(1px)',
|
||||
color: variant == 'light' ? 'brand.550' : 'white',
|
||||
color: variant == 'light' ? 'primary.800' : 'white',
|
||||
}}
|
||||
/>
|
||||
</span>
|
||||
|
||||
@@ -11,7 +11,7 @@ export const StyledPopover = styled(RACPopover, {
|
||||
animation: 'slide 200ms reverse ease-in',
|
||||
},
|
||||
'&[data-placement="bottom"]': {
|
||||
marginTop: '3xs',
|
||||
marginTop: 0.25,
|
||||
},
|
||||
'&[data-placement=top]': {
|
||||
'--origin': 'translateY(8px)',
|
||||
|
||||
@@ -21,7 +21,7 @@ const StyledSwitch = styled(RACSwitch, {
|
||||
width: '2.6rem',
|
||||
height: '1.563rem',
|
||||
border: '0.125rem solid',
|
||||
borderColor: 'brand.550',
|
||||
borderColor: 'primary.800',
|
||||
borderRadius: '1.143rem',
|
||||
transition: 'all 200ms, outline 200ms',
|
||||
_before: {
|
||||
@@ -32,7 +32,7 @@ const StyledSwitch = styled(RACSwitch, {
|
||||
width: '1.063rem',
|
||||
height: '1.063rem',
|
||||
borderRadius: '1.063rem',
|
||||
background: 'brand.550',
|
||||
background: 'primary.800',
|
||||
transition: 'transform 200ms, background-color 200ms',
|
||||
transitionDelay: '0ms',
|
||||
},
|
||||
@@ -54,7 +54,7 @@ const StyledSwitch = styled(RACSwitch, {
|
||||
},
|
||||
'& .checkmark': {
|
||||
right: 0,
|
||||
color: 'brand.550',
|
||||
color: 'primary.800',
|
||||
opacity: 0,
|
||||
},
|
||||
'& .cross': {
|
||||
@@ -65,8 +65,8 @@ const StyledSwitch = styled(RACSwitch, {
|
||||
transitionDelay: '0ms',
|
||||
},
|
||||
'&[data-selected] .indicator': {
|
||||
borderColor: 'brand.550',
|
||||
background: 'brand.550',
|
||||
borderColor: 'primary.800',
|
||||
background: 'primary.800',
|
||||
_before: {
|
||||
background: 'white',
|
||||
transform: 'translateX(100%)',
|
||||
@@ -86,14 +86,14 @@ const StyledSwitch = styled(RACSwitch, {
|
||||
cursor: 'not-allowed',
|
||||
},
|
||||
'&[data-disabled] .indicator': {
|
||||
borderColor: 'brand.150',
|
||||
borderColor: 'primary.200',
|
||||
background: 'transparent',
|
||||
_before: {
|
||||
background: 'brand.150',
|
||||
background: 'primary.200',
|
||||
},
|
||||
},
|
||||
'&[data-disabled] .cross': {
|
||||
color: 'brand.500',
|
||||
color: 'primary.500',
|
||||
},
|
||||
'&[data-focus-visible] .indicator': {
|
||||
outline: '2px solid!',
|
||||
|
||||
@@ -15,6 +15,7 @@ import React from 'react'
|
||||
const StyledTabs = styled(RACTabs, {
|
||||
base: {
|
||||
display: 'flex',
|
||||
color: 'colorPalette.text',
|
||||
'&[data-orientation=horizontal]': {
|
||||
flexDirection: 'column',
|
||||
'--horizontal': '3px',
|
||||
@@ -41,7 +42,7 @@ const StyledTab = styled(RACTab, {
|
||||
cursor: 'pointer',
|
||||
outline: 'none',
|
||||
position: 'relative',
|
||||
color: 'content.semantic.neutral.primary',
|
||||
color: 'box.text',
|
||||
borderColor: 'transparent',
|
||||
forcedColorAdjust: 'none',
|
||||
},
|
||||
@@ -49,7 +50,7 @@ const StyledTab = styled(RACTab, {
|
||||
border: {
|
||||
true: {
|
||||
'&[data-selected]': {
|
||||
borderColor: 'border.semantic.brand.primary',
|
||||
borderColor: 'primary',
|
||||
},
|
||||
borderBottom: 'var(--horizontal) solid',
|
||||
borderInlineEnd: 'var(--vertical) solid',
|
||||
@@ -61,13 +62,14 @@ const StyledTab = styled(RACTab, {
|
||||
highlight: {
|
||||
true: {
|
||||
borderRadius: 4,
|
||||
backgroundColor: 'colorPalette.active',
|
||||
transition: 'background 200ms, color 200ms',
|
||||
'&[data-hovered]': {
|
||||
backgroundColor: 'gray.050',
|
||||
color: 'content.semantic.neutral.primary',
|
||||
backgroundColor: 'gray.100',
|
||||
color: 'box.text',
|
||||
},
|
||||
'&[data-selected]': {
|
||||
backgroundColor: 'brand.550',
|
||||
backgroundColor: 'primary.800',
|
||||
color: 'white',
|
||||
},
|
||||
},
|
||||
@@ -115,11 +117,11 @@ const StyledTabList = styled(RACTabList, {
|
||||
true: {
|
||||
'&[data-orientation=horizontal]': {
|
||||
borderBottom: '1px solid',
|
||||
borderColor: 'gray.150',
|
||||
borderColor: 'gray.300',
|
||||
},
|
||||
'&[data-orientation=vertical]': {
|
||||
borderInlineEnd: '1px solid',
|
||||
borderColor: 'gray.150',
|
||||
borderColor: 'gray.300',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -30,7 +30,7 @@ export const text = cva({
|
||||
},
|
||||
subTitle: {
|
||||
fontSize: '1rem',
|
||||
color: 'gray.600',
|
||||
color: 'greyscale.600',
|
||||
},
|
||||
bodyXsBold: {
|
||||
textStyle: 'body',
|
||||
@@ -55,17 +55,17 @@ export const text = cva({
|
||||
textStyle: 'sm',
|
||||
},
|
||||
note: {
|
||||
color: 'content.semantic.neutral.secondary',
|
||||
color: 'default.subtle-text',
|
||||
},
|
||||
warning: {
|
||||
color: 'content.semantic.error.secondary',
|
||||
color: 'danger.subtle-text',
|
||||
},
|
||||
smNote: {
|
||||
color: 'content.semantic.neutral.secondary',
|
||||
color: 'default.subtle-text',
|
||||
textStyle: 'sm',
|
||||
},
|
||||
xsNote: {
|
||||
color: 'content.semantic.neutral.secondary',
|
||||
color: 'default.subtle-text',
|
||||
textStyle: 'xs',
|
||||
},
|
||||
inherits: {},
|
||||
@@ -107,10 +107,10 @@ export const text = cva({
|
||||
margin: '0!',
|
||||
},
|
||||
sm: {
|
||||
marginBottom: 'xs',
|
||||
marginBottom: 0.5,
|
||||
},
|
||||
md: {
|
||||
marginBottom: 'base',
|
||||
marginBottom: 1,
|
||||
},
|
||||
},
|
||||
padding: {
|
||||
|
||||
@@ -7,11 +7,11 @@ import { styled } from '@/styled-system/jsx'
|
||||
export const TextArea = styled(RACTextArea, {
|
||||
base: {
|
||||
width: 'full',
|
||||
paddingY: '3xs',
|
||||
paddingX: 'xs',
|
||||
paddingY: 0.25,
|
||||
paddingX: 0.5,
|
||||
border: '1px solid',
|
||||
borderColor: 'border.semantic.neutral.primary',
|
||||
color: 'content.semantic.neutral.primary',
|
||||
borderColor: 'control.border',
|
||||
color: 'control.text',
|
||||
borderRadius: 4,
|
||||
transition: 'all 200ms',
|
||||
},
|
||||
|
||||
@@ -50,14 +50,14 @@ const StyledTooltip = styled(RACTooltip, {
|
||||
base: {
|
||||
boxShadow: '0 var(--sizes-tooltip-spacing) 20px rgba(0 0 0 / 0.1)',
|
||||
borderRadius: '4px',
|
||||
backgroundColor: 'gray.700',
|
||||
color: 'gray.050',
|
||||
backgroundColor: 'primaryDark.100',
|
||||
color: 'gray.100',
|
||||
forcedColorAdjust: 'none',
|
||||
outline: 'none',
|
||||
padding: '2px var(--sizes-tooltip-spacing)',
|
||||
maxWidth: '200px',
|
||||
textAlign: 'center',
|
||||
fontSize: 'sm',
|
||||
fontSize: 14,
|
||||
transform: 'translate3d(0, 0, 0)',
|
||||
'&[data-placement=top]': {
|
||||
marginBottom: 'var(--sizes-tooltip-spacing)',
|
||||
@@ -88,7 +88,7 @@ const StyledOverlayArrow = styled(OverlayArrow, {
|
||||
base: {
|
||||
'& svg': {
|
||||
display: 'block',
|
||||
fill: 'gray.700',
|
||||
fill: 'gray.800',
|
||||
},
|
||||
'&[data-placement=bottom] svg': {
|
||||
transform: 'rotate(180deg)',
|
||||
|
||||
@@ -3,6 +3,6 @@ import { styled } from '@/styled-system/jsx'
|
||||
export const Ul = styled('ul', {
|
||||
base: {
|
||||
listStyle: 'disc',
|
||||
paddingLeft: 'base',
|
||||
paddingLeft: 1,
|
||||
},
|
||||
})
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user