@adea-ai/ui 0.105.0 → 0.106.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -8
- package/dist/components/composites/action-button/action-button.d.ts.map +1 -1
- package/dist/components/composites/action-button/action-button.js +6 -8
- package/dist/components/composites/action-button/action-button.js.map +1 -1
- package/dist/components/composites/appearance-editor/accent-swatch-groups.d.ts +16 -0
- package/dist/components/composites/appearance-editor/accent-swatch-groups.d.ts.map +1 -0
- package/dist/components/composites/appearance-editor/accent-swatch-groups.js +151 -0
- package/dist/components/composites/appearance-editor/accent-swatch-groups.js.map +1 -0
- package/dist/components/composites/appearance-editor/appearance-choices.d.ts.map +1 -1
- package/dist/components/composites/appearance-editor/appearance-choices.js +24 -84
- package/dist/components/composites/appearance-editor/appearance-choices.js.map +1 -1
- package/dist/components/composites/appearance-editor/appearance-editor.d.ts +2 -2
- package/dist/components/composites/appearance-editor/appearance-editor.d.ts.map +1 -1
- package/dist/components/composites/appearance-editor/appearance-editor.js +25 -7
- package/dist/components/composites/appearance-editor/appearance-editor.js.map +1 -1
- package/dist/components/composites/appearance-editor/appearance-types.d.ts +9 -0
- package/dist/components/composites/appearance-editor/appearance-types.d.ts.map +1 -1
- package/dist/components/composites/appearance-editor/font-settings-group.d.ts +10 -0
- package/dist/components/composites/appearance-editor/font-settings-group.d.ts.map +1 -0
- package/dist/components/composites/appearance-editor/font-settings-group.js +310 -0
- package/dist/components/composites/appearance-editor/font-settings-group.js.map +1 -0
- package/dist/components/composites/appearance-editor/index.d.ts +2 -0
- package/dist/components/composites/appearance-editor/index.d.ts.map +1 -1
- package/dist/components/composites/appearance-editor/index.js +3 -1
- package/dist/components/composites/update-dialog/update-dialog.js +2 -2
- package/dist/components/composites/update-dialog/update-dialog.js.map +1 -1
- package/dist/components/conversation/message-row.d.ts.map +1 -1
- package/dist/components/conversation/message-row.js +3 -3
- package/dist/components/conversation/message-row.js.map +1 -1
- package/dist/components/conversation/paste-token-editor.js +1 -1
- package/dist/components/conversation/paste-token-editor.js.map +1 -1
- package/dist/components/layout/side-rail/side-rail.js +2 -2
- package/dist/components/layout/side-rail/side-rail.js.map +1 -1
- package/dist/components/layout/top-bar/top-bar.js +1 -1
- package/dist/components/layout/top-bar/top-bar.js.map +1 -1
- package/dist/components/theme/appearance-panel.d.ts +1 -1
- package/dist/components/theme/appearance-panel.d.ts.map +1 -1
- package/dist/components/theme/appearance-panel.js +45 -105
- package/dist/components/theme/appearance-panel.js.map +1 -1
- package/dist/components/theme/theme-provider.d.ts +5 -2
- package/dist/components/theme/theme-provider.d.ts.map +1 -1
- package/dist/components/theme/theme-provider.js +38 -19
- package/dist/components/theme/theme-provider.js.map +1 -1
- package/dist/components/ui/code-block/code-block.d.ts +3 -3
- package/dist/components/ui/code-block/code-block.js +6 -6
- package/dist/components/ui/code-block/code-block.js.map +1 -1
- package/dist/components/ui/command/command.js +1 -1
- package/dist/components/ui/command/command.js.map +1 -1
- package/dist/components/ui/context-menu/context-menu.js +1 -1
- package/dist/components/ui/context-menu/context-menu.js.map +1 -1
- package/dist/components/ui/diff-block/diff-block.js +5 -5
- package/dist/components/ui/diff-block/diff-block.js.map +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu.js +101 -8
- package/dist/components/ui/dropdown-menu/dropdown-menu.js.map +1 -1
- package/dist/components/ui/kbd/kbd.js +1 -1
- package/dist/components/ui/kbd/kbd.js.map +1 -1
- package/dist/components/ui/menubar/menubar.js +1 -1
- package/dist/components/ui/menubar/menubar.js.map +1 -1
- package/dist/components/ui/typography/typography.d.ts +3 -5
- package/dist/components/ui/typography/typography.d.ts.map +1 -1
- package/dist/components/ui/typography/typography.js +6 -8
- package/dist/components/ui/typography/typography.js.map +1 -1
- package/dist/index.js +6 -3
- package/dist/lib/appearance-font-settings.d.ts +53 -0
- package/dist/lib/appearance-font-settings.d.ts.map +1 -0
- package/dist/lib/appearance-font-settings.js +160 -0
- package/dist/lib/appearance-font-settings.js.map +1 -0
- package/dist/lib/font-catalog.d.ts +72 -0
- package/dist/lib/font-catalog.d.ts.map +1 -0
- package/dist/lib/font-catalog.js +71 -0
- package/dist/lib/font-catalog.js.map +1 -0
- package/dist/lib/safe-script.d.ts +3 -0
- package/dist/lib/safe-script.d.ts.map +1 -0
- package/dist/lib/safe-script.js +9 -0
- package/dist/lib/safe-script.js.map +1 -0
- package/dist/lib/tokens.d.ts +2 -19
- package/dist/lib/tokens.d.ts.map +1 -1
- package/dist/lib/tokens.js +63 -39
- package/dist/lib/tokens.js.map +1 -1
- package/dist/r/appearance-editor.json +12 -1
- package/dist/r/lib.json +16 -1
- package/dist/r/registry.json +36 -3
- package/dist/r/src/components/composites/action-button/action-button.tsx +2 -1
- package/dist/r/src/components/composites/appearance-editor/accent-swatch-groups.tsx +147 -0
- package/dist/r/src/components/composites/appearance-editor/appearance-choices.tsx +17 -74
- package/dist/r/src/components/composites/appearance-editor/appearance-editor.tsx +19 -6
- package/dist/r/src/components/composites/appearance-editor/appearance-types.ts +9 -0
- package/dist/r/src/components/composites/appearance-editor/font-settings-group.tsx +350 -0
- package/dist/r/src/components/composites/appearance-editor/index.ts +19 -0
- package/dist/r/src/components/composites/update-dialog/update-dialog.tsx +2 -2
- package/dist/r/src/components/conversation/message-row.tsx +7 -3
- package/dist/r/src/components/conversation/paste-token-editor.tsx +1 -1
- package/dist/r/src/components/layout/side-rail/side-rail.tsx +3 -3
- package/dist/r/src/components/layout/top-bar/top-bar.tsx +1 -1
- package/dist/r/src/components/theme/appearance-panel.tsx +34 -83
- package/dist/r/src/components/theme/theme-provider.tsx +50 -20
- package/dist/r/src/components/ui/code-block/code-block.tsx +6 -6
- package/dist/r/src/components/ui/command/command.tsx +1 -1
- package/dist/r/src/components/ui/context-menu/context-menu.tsx +1 -1
- package/dist/r/src/components/ui/diff-block/diff-block.tsx +7 -7
- package/dist/r/src/components/ui/dropdown-menu/dropdown-menu.tsx +145 -7
- package/dist/r/src/components/ui/kbd/kbd.tsx +1 -1
- package/dist/r/src/components/ui/menubar/menubar.tsx +1 -1
- package/dist/r/src/components/ui/typography/typography.tsx +6 -8
- package/dist/r/src/lib/appearance-font-settings.ts +233 -0
- package/dist/r/src/lib/font-catalog.ts +80 -0
- package/dist/r/src/lib/safe-script.ts +7 -0
- package/dist/r/src/lib/tokens.ts +64 -59
- package/dist/r/src/styles/appearance-font-settings.css +110 -0
- package/dist/r/src/styles/fonts.css +4 -5
- package/dist/r/src/styles/globals.css +4 -1
- package/dist/r/src/styles/theme.css +14 -0
- package/dist/r/theme.json +5 -0
- package/dist/r/theming.json +3 -1
- package/package.json +3 -2
- package/registry.json +36 -3
- package/src/components/composites/action-button/action-button.tsx +2 -1
- package/src/components/composites/appearance-editor/accent-swatch-groups.tsx +147 -0
- package/src/components/composites/appearance-editor/appearance-choices.tsx +17 -74
- package/src/components/composites/appearance-editor/appearance-editor.tsx +19 -6
- package/src/components/composites/appearance-editor/appearance-types.ts +9 -0
- package/src/components/composites/appearance-editor/font-settings-group.tsx +350 -0
- package/src/components/composites/appearance-editor/index.ts +19 -0
- package/src/components/composites/update-dialog/update-dialog.tsx +2 -2
- package/src/components/conversation/message-row.tsx +7 -3
- package/src/components/conversation/paste-token-editor.tsx +1 -1
- package/src/components/layout/side-rail/side-rail.tsx +3 -3
- package/src/components/layout/top-bar/top-bar.tsx +1 -1
- package/src/components/theme/appearance-panel.tsx +34 -83
- package/src/components/theme/theme-provider.tsx +50 -20
- package/src/components/ui/code-block/code-block.tsx +6 -6
- package/src/components/ui/command/command.tsx +1 -1
- package/src/components/ui/context-menu/context-menu.tsx +1 -1
- package/src/components/ui/diff-block/diff-block.tsx +7 -7
- package/src/components/ui/dropdown-menu/dropdown-menu.tsx +145 -7
- package/src/components/ui/kbd/kbd.tsx +1 -1
- package/src/components/ui/menubar/menubar.tsx +1 -1
- package/src/components/ui/typography/typography.tsx +6 -8
- package/src/lib/appearance-font-settings.ts +233 -0
- package/src/lib/font-catalog.ts +80 -0
- package/src/lib/safe-script.ts +7 -0
- package/src/lib/tokens.ts +64 -59
- package/src/styles/appearance-font-settings.css +110 -0
- package/src/styles/fonts.css +4 -5
- package/src/styles/globals.css +4 -1
- package/src/styles/theme.css +14 -0
package/dist/lib/tokens.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.js","names":[],"sources":["../../src/lib/tokens.ts"],"sourcesContent":["/**\n * The design system's token manifest.\n *\n * `theme.css` is the source of truth for token *values*. This file is the\n * source of truth for token *names and meaning* — what each one is for, and\n * which ones a theme may vary.\n *\n * It exists because a manifest that is only documentation rots. Two things read\n * it instead:\n *\n * - the token galleries in Storybook, so the review surface shows every token\n * rather than the ones an author remembered;\n * - `tests/tokens.test.ts`, which parses `theme.css` and fails when a token\n * is declared in one place and missing from the other.\n *\n * That pairing is what makes \"every token is documented and every documented\n * token exists\" a property the build enforces rather than a promise.\n */\n\nimport { ACCENTS } from '@adea-ai/themes'\n\nexport type TokenKind =\n | 'color'\n | 'dimension'\n | 'font-family'\n | 'number'\n | 'duration'\n | 'easing'\n | 'shadow'\n | 'text'\n\nexport type TokenDefinition = {\n /** The custom property name, without the leading `--`. */\n name: string\n kind: TokenKind\n /** One line: what this token is for. Shown in the gallery. */\n description: string\n /** True when the light and dark themes give it different values. */\n themed?: boolean\n}\n\n/**\n * Colour roles, in the order they appear in a page: surfaces first, then text,\n * then the lines between them, then the semantic fills. The order is the\n * documentation — reading the gallery top to bottom walks the surface ladder.\n */\nexport const colorTokens: TokenDefinition[] = [\n // Surfaces\n {\n name: 'background',\n kind: 'color',\n themed: true,\n description: 'The canvas every panel sits on.',\n },\n {\n name: 'foreground',\n kind: 'color',\n themed: true,\n description: 'Default body text on the canvas.',\n },\n {\n name: 'card',\n kind: 'color',\n themed: true,\n description: 'A panel or card raised one rung above the canvas.',\n },\n { name: 'card-foreground', kind: 'color', themed: true, description: 'Text on `card`.' },\n {\n name: 'popover',\n kind: 'color',\n themed: true,\n description: 'A floating surface: dialog, menu, popover, tooltip-free.',\n },\n { name: 'popover-foreground', kind: 'color', themed: true, description: 'Text on `popover`.' },\n {\n name: 'surface',\n kind: 'color',\n themed: true,\n description: 'Alias of `background`, for code that means \"a surface\" not \"the page\".',\n },\n {\n name: 'surface-sunken',\n kind: 'color',\n themed: true,\n description: 'A well: code blocks, inset lists, empty states.',\n },\n {\n name: 'surface-raised',\n kind: 'color',\n themed: true,\n description: 'Alias of `card`, for panels that sit on the canvas.',\n },\n {\n name: 'surface-overlay',\n kind: 'color',\n themed: true,\n description: 'Alias of `popover`, for floating layers.',\n },\n {\n name: 'surface-hover',\n kind: 'color',\n themed: true,\n description: 'The hover fill shared by rows, menu items and ghost controls.',\n },\n {\n name: 'surface-active',\n kind: 'color',\n themed: true,\n description: 'The pressed/selected fill, one rung past hover.',\n },\n {\n name: 'chrome',\n kind: 'color',\n themed: true,\n description: 'Window chrome: the top bar and its frosted fill.',\n },\n {\n name: 'chrome-alpha',\n kind: 'number',\n themed: true,\n description: 'Opacity of the chrome fill behind a blur.',\n },\n\n // The brand action\n {\n name: 'primary',\n kind: 'color',\n themed: true,\n description: 'The Adea emerald. The one primary action in a view.',\n },\n {\n name: 'primary-foreground',\n kind: 'color',\n themed: true,\n description: 'Label on `primary`. Black in dark, white in light — the accent flips polarity.',\n },\n {\n name: 'primary-hover',\n kind: 'color',\n themed: true,\n description: 'Hover rung for a primary action.',\n },\n {\n name: 'primary-subtle',\n kind: 'color',\n themed: true,\n description: 'Tinted primary fill: selected rows, focus rings, subtle buttons.',\n },\n\n {\n name: 'secondary',\n kind: 'color',\n themed: true,\n description: 'A quieter filled surface for a secondary action.',\n },\n {\n name: 'secondary-foreground',\n kind: 'color',\n themed: true,\n description: 'Label on `secondary`.',\n },\n {\n name: 'muted',\n kind: 'color',\n themed: true,\n description: 'A neutral fill: skeletons, inert chips, table footers.',\n },\n {\n name: 'muted-foreground',\n kind: 'color',\n themed: true,\n description: 'De-emphasised text. Measured to clear 4.5:1 on both `background` and `card`.',\n },\n {\n name: 'accent',\n kind: 'color',\n themed: true,\n description: \"shadcn's hover-surface accent. Not the brand colour — that is `primary`.\",\n },\n { name: 'accent-foreground', kind: 'color', themed: true, description: 'Text on `accent`.' },\n\n // Status\n {\n name: 'destructive',\n kind: 'color',\n themed: true,\n description: 'The canonical error hue for semantic status indicators and tinted notices.',\n },\n {\n name: 'destructive-foreground',\n kind: 'color',\n themed: true,\n description:\n 'Text on the canonical error hue; solid actions use `destructive-action-foreground`.',\n },\n {\n name: 'destructive-subtle',\n kind: 'color',\n themed: true,\n description: 'Opaque destructive tint against the canvas; subtle labels use foreground.',\n },\n {\n name: 'destructive-action',\n kind: 'color',\n themed: true,\n description: 'Contrast-safe solid fill for destructive actions, derived from the error role.',\n },\n {\n name: 'destructive-action-foreground',\n kind: 'color',\n themed: true,\n description: 'Text on the destructive action fill and its 90% hover composition.',\n },\n { name: 'success', kind: 'color', themed: true, description: 'A completed or healthy state.' },\n { name: 'success-foreground', kind: 'color', themed: true, description: 'Label on `success`.' },\n {\n name: 'success-subtle',\n kind: 'color',\n themed: true,\n description: 'Opaque success tint against the canvas; subtle labels use foreground.',\n },\n {\n name: 'warning',\n kind: 'color',\n themed: true,\n description: 'Something needs attention but is not broken.',\n },\n { name: 'warning-foreground', kind: 'color', themed: true, description: 'Label on `warning`.' },\n {\n name: 'warning-subtle',\n kind: 'color',\n themed: true,\n description: 'Opaque warning tint against the canvas; subtle labels use foreground.',\n },\n { name: 'info', kind: 'color', themed: true, description: 'Neutral information.' },\n { name: 'info-foreground', kind: 'color', themed: true, description: 'Label on `info`.' },\n {\n name: 'info-subtle',\n kind: 'color',\n themed: true,\n description: 'Opaque info tint against the canvas; subtle labels use foreground.',\n },\n\n // Lines\n {\n name: 'border',\n kind: 'color',\n themed: true,\n description: 'Every hairline: panel edges, dividers, card outlines.',\n },\n {\n name: 'input',\n kind: 'color',\n themed: true,\n description:\n 'The edge of an editable control. A rung stronger than `border` so a field is findable.',\n },\n {\n name: 'ring',\n kind: 'color',\n themed: true,\n description: 'The focus ring. Always paired with `primary-subtle` as its glow.',\n },\n\n // Theme-invariant glass\n {\n name: 'scrim',\n kind: 'color',\n description: 'Dark glass for overlays and on-screen controls. Same in both themes.',\n },\n { name: 'scrim-foreground', kind: 'color', description: 'Text drawn on `scrim`.' },\n { name: 'scrim-edge', kind: 'color', description: 'The hairline drawn on `scrim`.' },\n\n // Diff and code\n { name: 'diff-add', kind: 'color', themed: true, description: 'Background of an added line.' },\n {\n name: 'diff-add-foreground',\n kind: 'color',\n themed: true,\n description: 'Text of an added line.',\n },\n {\n name: 'diff-delete',\n kind: 'color',\n themed: true,\n description: 'Background of a removed line.',\n },\n {\n name: 'diff-delete-foreground',\n kind: 'color',\n themed: true,\n description: 'Text of a removed line.',\n },\n { name: 'diff-hunk', kind: 'color', themed: true, description: 'Background of a hunk header.' },\n {\n name: 'diff-hunk-foreground',\n kind: 'color',\n themed: true,\n description: 'Text of a hunk header.',\n },\n {\n name: 'diff-meta-foreground',\n kind: 'color',\n themed: true,\n description: 'File headers and line numbers in a diff.',\n },\n\n // Charts\n {\n name: 'chart-1',\n kind: 'color',\n themed: true,\n description: 'Categorical series 1. The set is closed at six.',\n },\n { name: 'chart-2', kind: 'color', themed: true, description: 'Categorical series 2.' },\n { name: 'chart-3', kind: 'color', themed: true, description: 'Categorical series 3.' },\n { name: 'chart-4', kind: 'color', themed: true, description: 'Categorical series 4.' },\n { name: 'chart-5', kind: 'color', themed: true, description: 'Categorical series 5.' },\n { name: 'chart-6', kind: 'color', themed: true, description: 'Categorical series 6.' },\n\n // Sidebar (the shadcn contract, kept whole)\n {\n name: 'sidebar',\n kind: 'color',\n themed: true,\n description: 'The rail and sidebar surface, tinted against the canvas.',\n },\n {\n name: 'sidebar-foreground',\n kind: 'color',\n themed: true,\n description: 'Default text in the rail and sidebar.',\n },\n {\n name: 'sidebar-primary',\n kind: 'color',\n themed: true,\n description: 'The active destination in the rail.',\n },\n {\n name: 'sidebar-primary-foreground',\n kind: 'color',\n themed: true,\n description: 'Text on the active rail destination.',\n },\n {\n name: 'sidebar-accent',\n kind: 'color',\n themed: true,\n description: 'Hover and selected fill for rail and sidebar rows.',\n },\n {\n name: 'sidebar-accent-foreground',\n kind: 'color',\n themed: true,\n description: 'Text on `sidebar-accent`.',\n },\n {\n name: 'sidebar-border',\n kind: 'color',\n themed: true,\n description: 'The rule between the rail and the canvas.',\n },\n { name: 'sidebar-ring', kind: 'color', themed: true, description: 'Focus ring inside the rail.' },\n {\n name: 'sidebar-muted-foreground',\n kind: 'color',\n themed: true,\n description: 'Rail labels that are not the current destination.',\n },\n]\n\nexport const radiusTokens: TokenDefinition[] = [\n {\n name: 'radius-lg',\n kind: 'dimension',\n description:\n '10px — cards and panels. Also the knob: move this one value to re-round the whole system.',\n },\n { name: 'radius-sm', kind: 'dimension', description: '6px — badges, keyboard keys, menu items.' },\n {\n name: 'radius-md',\n kind: 'dimension',\n description: '8px — every control: buttons, inputs, selects.',\n },\n { name: 'radius-xl', kind: 'dimension', description: '14px — dialogs, menus, sheets.' },\n { name: 'radius-2xl', kind: 'dimension', description: '18px — full-window surfaces and media.' },\n]\n\nexport const typographyTokens: TokenDefinition[] = [\n {\n name: 'font-sans',\n kind: 'font-family',\n description: 'The selected interface face. Space Grotesk unless the font axis says otherwise.',\n },\n {\n name: 'font-mono',\n kind: 'font-family',\n description: 'The selected monospace face. Code, terminals, ids, paths.',\n },\n {\n name: 'font-family-space-grotesk',\n kind: 'font-family',\n description: 'The interface default, and the face the visual language was drawn against.',\n },\n {\n name: 'font-family-jetbrains-mono',\n kind: 'font-family',\n description: 'The monospace default. Code, terminals, diffs.',\n },\n {\n name: 'font-family-geist',\n kind: 'font-family',\n description: 'An alternative interface face. cortana already ships it.',\n },\n {\n name: 'font-family-geist-mono',\n kind: 'font-family',\n description: 'The monospace counterpart to Geist.',\n },\n {\n name: 'font-family-system',\n kind: 'font-family',\n description: \"The platform's own interface face. First-class, not a fallback.\",\n },\n {\n name: 'font-family-system-mono',\n kind: 'font-family',\n description: \"The platform's own monospace face.\",\n },\n {\n name: 'ui-tracking',\n kind: 'text',\n description:\n 'Letter spacing for measured chrome. `normal` on a proportional face, tightened when the UI font is monospace — which is roughly 20% wider at the same size.',\n },\n {\n name: 'ui-word-spacing',\n kind: 'text',\n description:\n \"Word spacing for measured chrome. Mono's space is a full advance-width cell, so a two-word label reads as two floating words without this.\",\n },\n {\n name: 'text-2xs',\n kind: 'text',\n description: '11px — the smallest label the system permits: kbd keys, status bar.',\n },\n { name: 'text-xs', kind: 'text', description: '12px — metadata, badges, secondary rows.' },\n {\n name: 'text-sm',\n kind: 'text',\n description: '14px — the interface default. Body copy, labels, controls.',\n },\n { name: 'text-base', kind: 'text', description: '16px — card titles and dialog titles.' },\n { name: 'text-lg', kind: 'text', description: '18px — a section heading inside a page.' },\n { name: 'text-xl', kind: 'text', description: '20px — a page title.' },\n { name: 'text-2xl', kind: 'text', description: '24px — a display figure.' },\n {\n name: 'text-3xl',\n kind: 'text',\n description: '30px — the largest size in the system. Reserved for an empty-state headline.',\n },\n]\n\n/** Height tokens also size both axes of icon controls through Tailwind's --size\n * namespace. Padding has its own --spacing mapping. Nominal pixel descriptions\n * use a 16px rem; rendered dimensions follow the consumer's root font size. */\nexport const densityTokens: TokenDefinition[] = [\n { name: 'control-height-2xs', kind: 'dimension', description: '20px — an inline chip control.' },\n { name: 'control-height-xs', kind: 'dimension', description: '24px — a dense table row action.' },\n { name: 'control-height-sm', kind: 'dimension', description: '28px — the toolbar default.' },\n {\n name: 'control-height-md',\n kind: 'dimension',\n description: '32px — the form default. Button and Input are this size unless told otherwise.',\n },\n { name: 'control-height-lg', kind: 'dimension', description: '36px — a primary form action.' },\n {\n name: 'control-height-xl',\n kind: 'dimension',\n description: '40px — a hero control in an empty state.',\n },\n {\n name: 'control-height-2xl',\n kind: 'dimension',\n description: '48px — a stable touch target, unchanged by compact density.',\n },\n {\n name: 'control-padding-2xs',\n kind: 'dimension',\n description: 'Inline padding that pairs with the 20px control.',\n },\n {\n name: 'control-padding-xs',\n kind: 'dimension',\n description: 'Inline padding that pairs with the 24px control.',\n },\n {\n name: 'control-padding-sm',\n kind: 'dimension',\n description: 'Inline padding that pairs with the 28px control.',\n },\n {\n name: 'control-padding-md',\n kind: 'dimension',\n description: 'Inline padding that pairs with the 32px control.',\n },\n {\n name: 'control-padding-lg',\n kind: 'dimension',\n description: 'Inline padding that pairs with the 36px control.',\n },\n {\n name: 'control-padding-xl',\n kind: 'dimension',\n description: 'Inline padding that pairs with the 40px control.',\n },\n {\n name: 'control-padding-2xl',\n kind: 'dimension',\n description: 'Inline padding that pairs with the stable 48px touch target.',\n },\n { name: 'row-height-sm', kind: 'dimension', description: '28px — a dense list row.' },\n { name: 'row-height-md', kind: 'dimension', description: '32px — the default list row.' },\n { name: 'row-height-lg', kind: 'dimension', description: '36px — a two-line list row.' },\n { name: 'rail-width', kind: 'dimension', description: '56px — the icon-only rail.' },\n { name: 'rail-width-expanded', kind: 'dimension', description: '236px — the labelled rail.' },\n {\n name: 'rail-item-height',\n kind: 'dimension',\n description: '36px — a rail or sidebar destination.',\n },\n {\n name: 'sidebar-width',\n kind: 'dimension',\n description: '256px — the secondary navigation column.',\n },\n {\n name: 'sidebar-width-compact',\n kind: 'dimension',\n description: '48px — the collapsed secondary column.',\n },\n { name: 'topbar-height', kind: 'dimension', description: '48px — the window title row.' },\n { name: 'statusbar-height', kind: 'dimension', description: '28px — the bottom readout strip.' },\n {\n name: 'tooltip-max-width',\n kind: 'dimension',\n description:\n 'The lesser of the 16rem readable measure and one viewport minus a gutter — a tip wraps before it can push its document wider than itself.',\n },\n]\n\nexport const elevationTokens: TokenDefinition[] = [\n {\n name: 'shadow-2xs',\n kind: 'shadow',\n themed: true,\n description: 'Barely there: a chip resting on a card.',\n },\n {\n name: 'shadow-xs',\n kind: 'shadow',\n themed: true,\n description: 'A card or panel on the canvas.',\n },\n {\n name: 'shadow-sm',\n kind: 'shadow',\n themed: true,\n description: 'A control that lifts: a pressed toggle, a thumb.',\n },\n { name: 'shadow-md', kind: 'shadow', themed: true, description: 'A menu or popover.' },\n { name: 'shadow-lg', kind: 'shadow', themed: true, description: 'A dialog or sheet.' },\n {\n name: 'shadow-xl',\n kind: 'shadow',\n themed: true,\n description: 'The command palette, above everything.',\n },\n]\n\nexport const motionTokens: TokenDefinition[] = [\n {\n name: 'duration-fast',\n kind: 'duration',\n description: '120ms — a state change the user is already watching.',\n },\n { name: 'duration-normal', kind: 'duration', description: '200ms — an entrance.' },\n { name: 'duration-slow', kind: 'duration', description: '320ms — a layout settle.' },\n {\n name: 'ease-out',\n kind: 'easing',\n description: 'A fast start and a long settle. Reads as decisive rather than floaty.',\n },\n {\n name: 'ease-in-out',\n kind: 'easing',\n description: 'For a loop that has no start or end, such as a shimmer.',\n },\n]\n\nexport const zIndexTokens: TokenDefinition[] = [\n { name: 'z-base', kind: 'number', description: 'In flow, at the document order.' },\n {\n name: 'z-docked',\n kind: 'number',\n description: 'A sticky table header standing above its own scroll body.',\n },\n { name: 'z-sticky', kind: 'number', description: 'The top bar and any other pinned chrome.' },\n { name: 'z-drawer', kind: 'number', description: 'A drawer, below a modal dialog.' },\n { name: 'z-dialog', kind: 'number', description: 'A modal dialog and its scrim.' },\n {\n name: 'z-menu',\n kind: 'number',\n description: 'Menus, popovers and comboboxes. Above dialogs, because a dialog can contain one.',\n },\n {\n name: 'z-tooltip',\n kind: 'number',\n description: 'Tooltips. Above menus, because a menu item can carry one.',\n },\n {\n name: 'z-toast',\n kind: 'number',\n description: 'Notifications. Above everything, so they are never hidden by a dialog.',\n },\n]\n\n/**\n * The accent axis.\n *\n * adea's accent presets, as a selection rather than a constant. `theme` is the\n * default and means \"the variant's own primary\" — monochrome in adea's palette —\n * and each named preset overrides the interactive roles through the\n * `[data-accent]` blocks in `theme.css`.\n *\n * These are the same six presets `accentPresets` exports in adea's own\n * `appearance.ts`, and the values match. A consumer's appearance picker and the\n * workshop's theme toolbar read this one list, so the two cannot disagree about\n * what a preset is called or what colour it is.\n */\nexport type AccentPreset = {\n /** The `data-accent` value. `theme` is the variant's own primary. */\n id: string\n label: string\n /** What the preset is for, in the gallery and in a picker. */\n description: string\n /** The accent as it appears in the light theme. Absent for `theme`. */\n light?: string\n /** The accent as it appears in the dark theme. Absent for `theme`. */\n dark?: string\n}\n\nexport const accentPresets: readonly AccentPreset[] = Object.freeze([\n {\n id: 'theme',\n label: 'Theme',\n description:\n \"The variant's own primary. Neutral in adea's palette, so the interface stays monochrome.\",\n },\n ...ACCENTS,\n])\n\n/**\n * The font axis.\n *\n * The family is a selection, like the accent: `data-font` sits on the same element\n * and each option swaps the interface face. `space-grotesk` is the default because\n * it is the face the visual language was drawn against, and `system` is a\n * first-class option rather than a fallback — an application that wants the\n * platform's own face should be able to say so without losing the rest of the\n * system.\n */\nexport type FontOption = {\n /** The `data-font` value. `space-grotesk` is the default and needs no attribute. */\n id: string\n label: string\n description: string\n /** Which of the two stacks this option sets. */\n stack: 'sans' | 'mono' | 'both'\n}\n\nexport const fontOptions: readonly FontOption[] = Object.freeze([\n {\n id: 'space-grotesk',\n label: 'Space Grotesk',\n description: 'The default, and the face the visual language was drawn against.',\n stack: 'both',\n },\n {\n id: 'system',\n label: 'System',\n description: \"The platform's own face. What a terminal or editor usually wants.\",\n stack: 'both',\n },\n {\n id: 'geist',\n label: 'Geist',\n description: 'The face cortana already ships. Neutral and wide.',\n stack: 'both',\n },\n {\n id: 'geist-mono',\n label: 'Geist Mono',\n description: 'Monospace throughout, for someone who wants a uniform texture.',\n stack: 'both',\n },\n {\n id: 'jetbrains-mono',\n label: 'JetBrains Mono',\n description: 'Monospace throughout, with coding ligatures off.',\n stack: 'both',\n },\n])\n\n/** Every token, in gallery order. */\nexport const designTokens = {\n color: colorTokens,\n radius: radiusTokens,\n typography: typographyTokens,\n density: densityTokens,\n elevation: elevationTokens,\n motion: motionTokens,\n zIndex: zIndexTokens,\n} as const\n\n/** Flat list, for completeness checks and for search. */\nexport const allTokens: TokenDefinition[] = Object.values(designTokens).flat()\n\n/**\n * Aliases that exist only to make a call site read better, and which therefore\n * have no gallery row of their own. Kept explicit so the completeness check\n * below can tell \"deliberately absent\" from \"forgotten\".\n */\nexport const undocumentedTokenAliases: string[] = ['radius']\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA8CA,IAAa,cAAiC;CAE5C;EACE,MAAM;EACN,MAAM;EACN,QAAQ;EACR,aAAa;CACf;CACA;EACE,MAAM;EACN,MAAM;EACN,QAAQ;EACR,aAAa;CACf;CACA;EACE,MAAM;EACN,MAAM;EACN,QAAQ;EACR,aAAa;CACf;CACA;EAAE,MAAM;EAAmB,MAAM;EAAS,QAAQ;EAAM,aAAa;CAAkB;CACvF;EACE,MAAM;EACN,MAAM;EACN,QAAQ;EACR,aAAa;CACf;CACA;EAAE,MAAM;EAAsB,MAAM;EAAS,QAAQ;EAAM,aAAa;CAAqB;CAC7F;EACE,MAAM;EACN,MAAM;EACN,QAAQ;EACR,aAAa;CACf;CACA;EACE,MAAM;EACN,MAAM;EACN,QAAQ;EACR,aAAa;CACf;CACA;EACE,MAAM;EACN,MAAM;EACN,QAAQ;EACR,aAAa;CACf;CACA;EACE,MAAM;EACN,MAAM;EACN,QAAQ;EACR,aAAa;CACf;CACA;EACE,MAAM;EACN,MAAM;EACN,QAAQ;EACR,aAAa;CACf;CACA;EACE,MAAM;EACN,MAAM;EACN,QAAQ;EACR,aAAa;CACf;CACA;EACE,MAAM;EACN,MAAM;EACN,QAAQ;EACR,aAAa;CACf;CACA;EACE,MAAM;EACN,MAAM;EACN,QAAQ;EACR,aAAa;CACf;CAGA;EACE,MAAM;EACN,MAAM;EACN,QAAQ;EACR,aAAa;CACf;CACA;EACE,MAAM;EACN,MAAM;EACN,QAAQ;EACR,aAAa;CACf;CACA;EACE,MAAM;EACN,MAAM;EACN,QAAQ;EACR,aAAa;CACf;CACA;EACE,MAAM;EACN,MAA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O,OAAO;CAC9D;EACE,IAAI;EACJ,OAAO;EACP,aAAa;EACb,OAAO;CACT;CACA;EACE,IAAI;EACJ,OAAO;EACP,aAAa;EACb,OAAO;CACT;CACA;EACE,IAAI;EACJ,OAAO;EACP,aAAa;EACb,OAAO;CACT;CACA;EACE,IAAI;EACJ,OAAO;EACP,aAAa;EACb,OAAO;CACT;CACA;EACE,IAAI;EACJ,OAAO;EACP,aAAa;EACb,OAAO;CACT;AACF,CAAC;;AAGD,IAAa,eAAe;CAC1B,OAAO;CACP,QAAQ;CACR,YAAY;CACZ,SAAS;CACT,WAAW;CACX,QAAQ;CACR,QAAQ;AACV;;AAGA,IAAa,YAA+B,OAAO,OAAO,YAAY,CAAC,CAAC,KAAK;;;;;;AAO7E,IAAa,2BAAqC,CAAC,QAAQ"}
|
|
1
|
+
{"version":3,"file":"tokens.js","names":[],"sources":["../../src/lib/tokens.ts"],"sourcesContent":["/**\n * The design system's token manifest.\n *\n * `theme.css` is the source of truth for token *values*. This file is the\n * source of truth for token *names and meaning* — what each one is for, and\n * which ones a theme may vary.\n *\n * It exists because a manifest that is only documentation rots. Two things read\n * it instead:\n *\n * - the token galleries in Storybook, so the review surface shows every token\n * rather than the ones an author remembered;\n * - `tests/tokens.test.ts`, which parses `theme.css` and fails when a token\n * is declared in one place and missing from the other.\n *\n * That pairing is what makes \"every token is documented and every documented\n * token exists\" a property the build enforces rather than a promise.\n */\n\nimport { ACCENTS } from '@adea-ai/themes'\nexport { fontOptions } from './font-catalog'\nexport type { FontOption } from './font-catalog'\n\nexport type TokenKind =\n | 'color'\n | 'dimension'\n | 'font-family'\n | 'number'\n | 'duration'\n | 'easing'\n | 'shadow'\n | 'text'\n\nexport type TokenDefinition = {\n /** The custom property name, without the leading `--`. */\n name: string\n kind: TokenKind\n /** One line: what this token is for. Shown in the gallery. */\n description: string\n /** True when the light and dark themes give it different values. */\n themed?: boolean\n}\n\n/**\n * Colour roles, in the order they appear in a page: surfaces first, then text,\n * then the lines between them, then the semantic fills. The order is the\n * documentation — reading the gallery top to bottom walks the surface ladder.\n */\nexport const colorTokens: TokenDefinition[] = [\n // Surfaces\n {\n name: 'background',\n kind: 'color',\n themed: true,\n description: 'The canvas every panel sits on.',\n },\n {\n name: 'foreground',\n kind: 'color',\n themed: true,\n description: 'Default body text on the canvas.',\n },\n {\n name: 'card',\n kind: 'color',\n themed: true,\n description: 'A panel or card raised one rung above the canvas.',\n },\n { name: 'card-foreground', kind: 'color', themed: true, description: 'Text on `card`.' },\n {\n name: 'popover',\n kind: 'color',\n themed: true,\n description: 'A floating surface: dialog, menu, popover, tooltip-free.',\n },\n { name: 'popover-foreground', kind: 'color', themed: true, description: 'Text on `popover`.' },\n {\n name: 'surface',\n kind: 'color',\n themed: true,\n description: 'Alias of `background`, for code that means \"a surface\" not \"the page\".',\n },\n {\n name: 'surface-sunken',\n kind: 'color',\n themed: true,\n description: 'A well: code blocks, inset lists, empty states.',\n },\n {\n name: 'surface-raised',\n kind: 'color',\n themed: true,\n description: 'Alias of `card`, for panels that sit on the canvas.',\n },\n {\n name: 'surface-overlay',\n kind: 'color',\n themed: true,\n description: 'Alias of `popover`, for floating layers.',\n },\n {\n name: 'surface-hover',\n kind: 'color',\n themed: true,\n description: 'The hover fill shared by rows, menu items and ghost controls.',\n },\n {\n name: 'surface-active',\n kind: 'color',\n themed: true,\n description: 'The pressed/selected fill, one rung past hover.',\n },\n {\n name: 'chrome',\n kind: 'color',\n themed: true,\n description: 'Window chrome: the top bar and its frosted fill.',\n },\n {\n name: 'chrome-alpha',\n kind: 'number',\n themed: true,\n description: 'Opacity of the chrome fill behind a blur.',\n },\n\n // The brand action\n {\n name: 'primary',\n kind: 'color',\n themed: true,\n description: 'The Adea emerald. The one primary action in a view.',\n },\n {\n name: 'primary-foreground',\n kind: 'color',\n themed: true,\n description: 'Label on `primary`. Black in dark, white in light — the accent flips polarity.',\n },\n {\n name: 'primary-hover',\n kind: 'color',\n themed: true,\n description: 'Hover rung for a primary action.',\n },\n {\n name: 'primary-subtle',\n kind: 'color',\n themed: true,\n description: 'Tinted primary fill: selected rows, focus rings, subtle buttons.',\n },\n\n {\n name: 'secondary',\n kind: 'color',\n themed: true,\n description: 'A quieter filled surface for a secondary action.',\n },\n {\n name: 'secondary-foreground',\n kind: 'color',\n themed: true,\n description: 'Label on `secondary`.',\n },\n {\n name: 'muted',\n kind: 'color',\n themed: true,\n description: 'A neutral fill: skeletons, inert chips, table footers.',\n },\n {\n name: 'muted-foreground',\n kind: 'color',\n themed: true,\n description: 'De-emphasised text. Measured to clear 4.5:1 on both `background` and `card`.',\n },\n {\n name: 'accent',\n kind: 'color',\n themed: true,\n description: \"shadcn's hover-surface accent. Not the brand colour — that is `primary`.\",\n },\n { name: 'accent-foreground', kind: 'color', themed: true, description: 'Text on `accent`.' },\n\n // Status\n {\n name: 'destructive',\n kind: 'color',\n themed: true,\n description: 'The canonical error hue for semantic status indicators and tinted notices.',\n },\n {\n name: 'destructive-foreground',\n kind: 'color',\n themed: true,\n description:\n 'Text on the canonical error hue; solid actions use `destructive-action-foreground`.',\n },\n {\n name: 'destructive-subtle',\n kind: 'color',\n themed: true,\n description: 'Opaque destructive tint against the canvas; subtle labels use foreground.',\n },\n {\n name: 'destructive-action',\n kind: 'color',\n themed: true,\n description: 'Contrast-safe solid fill for destructive actions, derived from the error role.',\n },\n {\n name: 'destructive-action-foreground',\n kind: 'color',\n themed: true,\n description: 'Text on the destructive action fill and its 90% hover composition.',\n },\n { name: 'success', kind: 'color', themed: true, description: 'A completed or healthy state.' },\n { name: 'success-foreground', kind: 'color', themed: true, description: 'Label on `success`.' },\n {\n name: 'success-subtle',\n kind: 'color',\n themed: true,\n description: 'Opaque success tint against the canvas; subtle labels use foreground.',\n },\n {\n name: 'warning',\n kind: 'color',\n themed: true,\n description: 'Something needs attention but is not broken.',\n },\n { name: 'warning-foreground', kind: 'color', themed: true, description: 'Label on `warning`.' },\n {\n name: 'warning-subtle',\n kind: 'color',\n themed: true,\n description: 'Opaque warning tint against the canvas; subtle labels use foreground.',\n },\n { name: 'info', kind: 'color', themed: true, description: 'Neutral information.' },\n { name: 'info-foreground', kind: 'color', themed: true, description: 'Label on `info`.' },\n {\n name: 'info-subtle',\n kind: 'color',\n themed: true,\n description: 'Opaque info tint against the canvas; subtle labels use foreground.',\n },\n\n // Lines\n {\n name: 'border',\n kind: 'color',\n themed: true,\n description: 'Every hairline: panel edges, dividers, card outlines.',\n },\n {\n name: 'input',\n kind: 'color',\n themed: true,\n description:\n 'The edge of an editable control. A rung stronger than `border` so a field is findable.',\n },\n {\n name: 'ring',\n kind: 'color',\n themed: true,\n description: 'The focus ring. Always paired with `primary-subtle` as its glow.',\n },\n\n // Theme-invariant glass\n {\n name: 'scrim',\n kind: 'color',\n description: 'Dark glass for overlays and on-screen controls. Same in both themes.',\n },\n { name: 'scrim-foreground', kind: 'color', description: 'Text drawn on `scrim`.' },\n { name: 'scrim-edge', kind: 'color', description: 'The hairline drawn on `scrim`.' },\n\n // Diff and code\n { name: 'diff-add', kind: 'color', themed: true, description: 'Background of an added line.' },\n {\n name: 'diff-add-foreground',\n kind: 'color',\n themed: true,\n description: 'Text of an added line.',\n },\n {\n name: 'diff-delete',\n kind: 'color',\n themed: true,\n description: 'Background of a removed line.',\n },\n {\n name: 'diff-delete-foreground',\n kind: 'color',\n themed: true,\n description: 'Text of a removed line.',\n },\n { name: 'diff-hunk', kind: 'color', themed: true, description: 'Background of a hunk header.' },\n {\n name: 'diff-hunk-foreground',\n kind: 'color',\n themed: true,\n description: 'Text of a hunk header.',\n },\n {\n name: 'diff-meta-foreground',\n kind: 'color',\n themed: true,\n description: 'File headers and line numbers in a diff.',\n },\n\n // Charts\n {\n name: 'chart-1',\n kind: 'color',\n themed: true,\n description: 'Categorical series 1. The set is closed at six.',\n },\n { name: 'chart-2', kind: 'color', themed: true, description: 'Categorical series 2.' },\n { name: 'chart-3', kind: 'color', themed: true, description: 'Categorical series 3.' },\n { name: 'chart-4', kind: 'color', themed: true, description: 'Categorical series 4.' },\n { name: 'chart-5', kind: 'color', themed: true, description: 'Categorical series 5.' },\n { name: 'chart-6', kind: 'color', themed: true, description: 'Categorical series 6.' },\n\n // Sidebar (the shadcn contract, kept whole)\n {\n name: 'sidebar',\n kind: 'color',\n themed: true,\n description: 'The rail and sidebar surface, tinted against the canvas.',\n },\n {\n name: 'sidebar-foreground',\n kind: 'color',\n themed: true,\n description: 'Default text in the rail and sidebar.',\n },\n {\n name: 'sidebar-primary',\n kind: 'color',\n themed: true,\n description: 'The active destination in the rail.',\n },\n {\n name: 'sidebar-primary-foreground',\n kind: 'color',\n themed: true,\n description: 'Text on the active rail destination.',\n },\n {\n name: 'sidebar-accent',\n kind: 'color',\n themed: true,\n description: 'Hover and selected fill for rail and sidebar rows.',\n },\n {\n name: 'sidebar-accent-foreground',\n kind: 'color',\n themed: true,\n description: 'Text on `sidebar-accent`.',\n },\n {\n name: 'sidebar-border',\n kind: 'color',\n themed: true,\n description: 'The rule between the rail and the canvas.',\n },\n { name: 'sidebar-ring', kind: 'color', themed: true, description: 'Focus ring inside the rail.' },\n {\n name: 'sidebar-muted-foreground',\n kind: 'color',\n themed: true,\n description: 'Rail labels that are not the current destination.',\n },\n]\n\nexport const radiusTokens: TokenDefinition[] = [\n {\n name: 'radius-lg',\n kind: 'dimension',\n description:\n '10px — cards and panels. Also the knob: move this one value to re-round the whole system.',\n },\n { name: 'radius-sm', kind: 'dimension', description: '6px — badges, keyboard keys, menu items.' },\n {\n name: 'radius-md',\n kind: 'dimension',\n description: '8px — every control: buttons, inputs, selects.',\n },\n { name: 'radius-xl', kind: 'dimension', description: '14px — dialogs, menus, sheets.' },\n { name: 'radius-2xl', kind: 'dimension', description: '18px — full-window surfaces and media.' },\n]\n\nexport const typographyTokens: TokenDefinition[] = [\n {\n name: 'font-ui',\n kind: 'font-family',\n description: 'The selected family for interface controls, labels and headings.',\n },\n {\n name: 'font-content',\n kind: 'font-family',\n description: 'The selected family for prose, transcripts and long-form reading.',\n },\n {\n name: 'font-code',\n kind: 'font-family',\n description: 'The selected family for code, terminals, keyboard keys, ids and paths.',\n },\n {\n name: 'font-sans',\n kind: 'font-family',\n description: 'Compatibility alias for the selected UI family.',\n },\n {\n name: 'font-mono',\n kind: 'font-family',\n description: 'Compatibility alias for the selected code family.',\n },\n {\n name: 'font-family-space-grotesk',\n kind: 'font-family',\n description: 'The self-hosted Space Grotesk family.',\n },\n {\n name: 'font-family-jetbrains-mono',\n kind: 'font-family',\n description: 'The monospace default. Code, terminals, diffs.',\n },\n {\n name: 'font-family-geist',\n kind: 'font-family',\n description: 'An alternative interface face. cortana already ships it.',\n },\n {\n name: 'font-family-geist-mono',\n kind: 'font-family',\n description: 'The monospace counterpart to Geist.',\n },\n {\n name: 'font-family-system',\n kind: 'font-family',\n description: \"The platform's own interface face. First-class, not a fallback.\",\n },\n {\n name: 'font-family-system-mono',\n kind: 'font-family',\n description: \"The platform's own monospace face.\",\n },\n {\n name: 'font-ui-size',\n kind: 'dimension',\n description: 'Runtime-projected interface size in pixels; scales the shared UI text ladder.',\n },\n {\n name: 'font-content-size',\n kind: 'dimension',\n description: 'Runtime-projected prose and transcript size in pixels.',\n },\n {\n name: 'font-code-size',\n kind: 'dimension',\n description: 'Runtime-projected code, terminal and keyboard-key size in pixels.',\n },\n {\n name: 'font-ui-scale',\n kind: 'number',\n description: 'The UI size ratio applied to the interface text ladder.',\n },\n {\n name: 'font-content-scale',\n kind: 'number',\n description: 'The content size ratio applied to rem-relative prose text.',\n },\n {\n name: 'font-code-scale',\n kind: 'number',\n description: 'The code size ratio applied to rem-relative code text.',\n },\n {\n name: 'ui-tracking',\n kind: 'text',\n description:\n 'Letter spacing for measured chrome. `normal` on a proportional face, tightened when the UI font is monospace — which is roughly 20% wider at the same size.',\n },\n {\n name: 'ui-word-spacing',\n kind: 'text',\n description:\n \"Word spacing for measured chrome. Mono's space is a full advance-width cell, so a two-word label reads as two floating words without this.\",\n },\n {\n name: 'text-2xs',\n kind: 'text',\n description: 'The smallest UI-scaled label: status bar and compact metadata.',\n },\n { name: 'text-xs', kind: 'text', description: 'UI-scaled metadata, badges and secondary rows.' },\n {\n name: 'text-sm',\n kind: 'text',\n description: 'The UI-scaled interface default for labels and controls.',\n },\n { name: 'text-base', kind: 'text', description: '16px — card titles and dialog titles.' },\n { name: 'text-lg', kind: 'text', description: '18px — a section heading inside a page.' },\n { name: 'text-xl', kind: 'text', description: '20px — a page title.' },\n { name: 'text-2xl', kind: 'text', description: '24px — a display figure.' },\n {\n name: 'text-3xl',\n kind: 'text',\n description: 'The largest UI-scaled rung. Reserved for an empty-state headline.',\n },\n {\n name: 'text-content',\n kind: 'text',\n description: 'The selected content size with the prose line-height.',\n },\n {\n name: 'text-code',\n kind: 'text',\n description: 'The selected code size with the code line-height.',\n },\n]\n\n/** Height tokens also size both axes of icon controls through Tailwind's --size\n * namespace. Padding has its own --spacing mapping. Nominal pixel descriptions\n * use a 16px rem; rendered dimensions follow the consumer's root font size. */\nexport const densityTokens: TokenDefinition[] = [\n { name: 'control-height-2xs', kind: 'dimension', description: '20px — an inline chip control.' },\n { name: 'control-height-xs', kind: 'dimension', description: '24px — a dense table row action.' },\n { name: 'control-height-sm', kind: 'dimension', description: '28px — the toolbar default.' },\n {\n name: 'control-height-md',\n kind: 'dimension',\n description: '32px — the form default. Button and Input are this size unless told otherwise.',\n },\n { name: 'control-height-lg', kind: 'dimension', description: '36px — a primary form action.' },\n {\n name: 'control-height-xl',\n kind: 'dimension',\n description: '40px — a hero control in an empty state.',\n },\n {\n name: 'control-height-2xl',\n kind: 'dimension',\n description: '48px — a stable touch target, unchanged by compact density.',\n },\n {\n name: 'control-padding-2xs',\n kind: 'dimension',\n description: 'Inline padding that pairs with the 20px control.',\n },\n {\n name: 'control-padding-xs',\n kind: 'dimension',\n description: 'Inline padding that pairs with the 24px control.',\n },\n {\n name: 'control-padding-sm',\n kind: 'dimension',\n description: 'Inline padding that pairs with the 28px control.',\n },\n {\n name: 'control-padding-md',\n kind: 'dimension',\n description: 'Inline padding that pairs with the 32px control.',\n },\n {\n name: 'control-padding-lg',\n kind: 'dimension',\n description: 'Inline padding that pairs with the 36px control.',\n },\n {\n name: 'control-padding-xl',\n kind: 'dimension',\n description: 'Inline padding that pairs with the 40px control.',\n },\n {\n name: 'control-padding-2xl',\n kind: 'dimension',\n description: 'Inline padding that pairs with the stable 48px touch target.',\n },\n { name: 'row-height-sm', kind: 'dimension', description: '28px — a dense list row.' },\n { name: 'row-height-md', kind: 'dimension', description: '32px — the default list row.' },\n { name: 'row-height-lg', kind: 'dimension', description: '36px — a two-line list row.' },\n { name: 'rail-width', kind: 'dimension', description: '56px — the icon-only rail.' },\n { name: 'rail-width-expanded', kind: 'dimension', description: '236px — the labelled rail.' },\n {\n name: 'rail-item-height',\n kind: 'dimension',\n description: '36px — a rail or sidebar destination.',\n },\n {\n name: 'sidebar-width',\n kind: 'dimension',\n description: '256px — the secondary navigation column.',\n },\n {\n name: 'sidebar-width-compact',\n kind: 'dimension',\n description: '48px — the collapsed secondary column.',\n },\n { name: 'topbar-height', kind: 'dimension', description: '48px — the window title row.' },\n { name: 'statusbar-height', kind: 'dimension', description: '28px — the bottom readout strip.' },\n {\n name: 'tooltip-max-width',\n kind: 'dimension',\n description:\n 'The lesser of the 16rem readable measure and one viewport minus a gutter — a tip wraps before it can push its document wider than itself.',\n },\n]\n\nexport const elevationTokens: TokenDefinition[] = [\n {\n name: 'shadow-2xs',\n kind: 'shadow',\n themed: true,\n description: 'Barely there: a chip resting on a card.',\n },\n {\n name: 'shadow-xs',\n kind: 'shadow',\n themed: true,\n description: 'A card or panel on the canvas.',\n },\n {\n name: 'shadow-sm',\n kind: 'shadow',\n themed: true,\n description: 'A control that lifts: a pressed toggle, a thumb.',\n },\n { name: 'shadow-md', kind: 'shadow', themed: true, description: 'A menu or popover.' },\n { name: 'shadow-lg', kind: 'shadow', themed: true, description: 'A dialog or sheet.' },\n {\n name: 'shadow-xl',\n kind: 'shadow',\n themed: true,\n description: 'The command palette, above everything.',\n },\n]\n\nexport const motionTokens: TokenDefinition[] = [\n {\n name: 'duration-fast',\n kind: 'duration',\n description: '120ms — a state change the user is already watching.',\n },\n { name: 'duration-normal', kind: 'duration', description: '200ms — an entrance.' },\n { name: 'duration-slow', kind: 'duration', description: '320ms — a layout settle.' },\n {\n name: 'ease-out',\n kind: 'easing',\n description: 'A fast start and a long settle. Reads as decisive rather than floaty.',\n },\n {\n name: 'ease-in-out',\n kind: 'easing',\n description: 'For a loop that has no start or end, such as a shimmer.',\n },\n]\n\nexport const zIndexTokens: TokenDefinition[] = [\n { name: 'z-base', kind: 'number', description: 'In flow, at the document order.' },\n {\n name: 'z-docked',\n kind: 'number',\n description: 'A sticky table header standing above its own scroll body.',\n },\n { name: 'z-sticky', kind: 'number', description: 'The top bar and any other pinned chrome.' },\n { name: 'z-drawer', kind: 'number', description: 'A drawer, below a modal dialog.' },\n { name: 'z-dialog', kind: 'number', description: 'A modal dialog and its scrim.' },\n {\n name: 'z-menu',\n kind: 'number',\n description: 'Menus, popovers and comboboxes. Above dialogs, because a dialog can contain one.',\n },\n {\n name: 'z-tooltip',\n kind: 'number',\n description: 'Tooltips. Above menus, because a menu item can carry one.',\n },\n {\n name: 'z-toast',\n kind: 'number',\n description: 'Notifications. Above everything, so they are never hidden by a dialog.',\n },\n]\n\n/**\n * The accent axis.\n *\n * adea's accent presets, as a selection rather than a constant. `theme` is the\n * default and means \"the variant's own primary\" — monochrome in adea's palette —\n * and each named preset overrides the interactive roles through the\n * `[data-accent]` blocks in `theme.css`.\n *\n * These are the same six presets `accentPresets` exports in adea's own\n * `appearance.ts`, and the values match. A consumer's appearance picker and the\n * workshop's theme toolbar read this one list, so the two cannot disagree about\n * what a preset is called or what colour it is.\n */\nexport type AccentPreset = {\n /** The `data-accent` value. `theme` is the variant's own primary. */\n id: string\n label: string\n /** What the preset is for, in the gallery and in a picker. */\n description: string\n /** The accent as it appears in the light theme. Absent for `theme`. */\n light?: string\n /** The accent as it appears in the dark theme. Absent for `theme`. */\n dark?: string\n}\n\nexport const accentPresets: readonly AccentPreset[] = Object.freeze([\n {\n id: 'theme',\n label: 'Theme',\n description:\n \"The variant's own primary. Neutral in adea's palette, so the interface stays monochrome.\",\n },\n ...ACCENTS,\n])\n\n/** Every token, in gallery order. */\nexport const designTokens = {\n color: colorTokens,\n radius: radiusTokens,\n typography: typographyTokens,\n density: densityTokens,\n elevation: elevationTokens,\n motion: motionTokens,\n zIndex: zIndexTokens,\n} as const\n\n/** Flat list, for completeness checks and for search. */\nexport const allTokens: TokenDefinition[] = Object.values(designTokens).flat()\n\n/**\n * Aliases that exist only to make a call site read better, and which therefore\n * have no gallery row of their own. Kept explicit so the completeness check\n * below can tell \"deliberately absent\" from \"forgotten\".\n */\nexport const undocumentedTokenAliases: string[] = ['radius']\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAgDA,IAAa,cAAiC;CAE5C;EACE,MAAM;EACN,MAAM;EACN,QAAQ;EACR,aAAa;CACf;CACA;EACE,MAAM;EACN,MAAM;EACN,QAAQ;EACR,aAAa;CACf;CACA;EACE,MAAM;EACN,MAAM;EACN,QAAQ;EACR,aAAa;CACf;CACA;EAAE,MAAM;EAAmB,MAAM;EAAS,QAAQ;EAAM,aAAa;CAAkB;CACvF;EACE,MAAM;EACN,MAAM;EACN,QAAQ;EACR,aAAa;CACf;CACA;EAAE,MAAM;EAAsB,MAAM;EAAS,QAAQ;EAAM,aAAa;CAAqB;CAC7F;EACE,MAAM;EACN,MAAM;EACN,QAAQ;EACR,aAAa;CACf;CACA;EACE,MAAM;EACN,MAAM;EACN,QAAQ;EACR,aAAa;CACf;CACA;EACE,MAAM;EACN,MAAM;EACN,QAAQ;EACR,aAAa;CACf;CACA;EACE,MAAM;EACN,MAAM;EACN,QAAQ;EACR,aAAa;CACf;CACA;EACE,MAAM;EACN,MAAM;EACN,QAAQ;EACR,aAAa;CACf;CACA;EACE,MAAM;EACN,MAAM;EACN,QAAQ;EACR,aAAa;CACf;CACA;E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C;CAC7C;EACE,MAAM;EACN,MAAM;EACN,aAAa;CACf;CACA;EAAE,MAAM;EAAmB,MAAM;EAAY,aAAa;CAAuB;CACjF;EAAE,MAAM;EAAiB,MAAM;EAAY,aAAa;CAA2B;CACnF;EACE,MAAM;EACN,MAAM;EACN,aAAa;CACf;CACA;EACE,MAAM;EACN,MAAM;EACN,aAAa;CACf;AACF;AAEA,IAAa,eAAkC;CAC7C;EAAE,MAAM;EAAU,MAAM;EAAU,aAAa;CAAkC;CACjF;EACE,MAAM;EACN,MAAM;EACN,aAAa;CACf;CACA;EAAE,MAAM;EAAY,MAAM;EAAU,aAAa;CAA2C;CAC5F;EAAE,MAAM;EAAY,MAAM;EAAU,aAAa;CAAkC;CACnF;EAAE,MAAM;EAAY,MAAM;EAAU,aAAa;CAAgC;CACjF;EACE,MAAM;EACN,MAAM;EACN,aAAa;CACf;CACA;EACE,MAAM;EACN,MAAM;EACN,aAAa;CACf;CACA;EACE,MAAM;EACN,MAAM;EACN,aAAa;CACf;AACF;AA2BA,IAAa,gBAAyC,OAAO,OAAO,CAClE;CACE,IAAI;CACJ,OAAO;CACP,aACE;AACJ,GACA,GAAG,OACL,CAAC;;AAGD,IAAa,eAAe;CAC1B,OAAO;CACP,QAAQ;CACR,YAAY;CACZ,SAAS;CACT,WAAW;CACX,QAAQ;CACR,QAAQ;AACV;;AAGA,IAAa,YAA+B,OAAO,OAAO,YAAY,CAAC,CAAC,KAAK;;;;;;AAO7E,IAAa,2BAAqC,CAAC,QAAQ"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"title": "Appearance Editor",
|
|
5
5
|
"description": "",
|
|
6
6
|
"dependencies": [
|
|
7
|
-
"@adea-ai/themes@^0.9.
|
|
7
|
+
"@adea-ai/themes@^0.9.7",
|
|
8
8
|
"@kobalte/core@^0.13.14",
|
|
9
9
|
"lucide-solid@^1.51.0"
|
|
10
10
|
],
|
|
@@ -14,9 +14,15 @@
|
|
|
14
14
|
"@adea-ai/ui/input",
|
|
15
15
|
"@adea-ai/ui/popover",
|
|
16
16
|
"@adea-ai/ui/switch",
|
|
17
|
+
"@adea-ai/ui/theme",
|
|
17
18
|
"lib"
|
|
18
19
|
],
|
|
19
20
|
"files": [
|
|
21
|
+
{
|
|
22
|
+
"path": "src/components/composites/appearance-editor/accent-swatch-groups.tsx",
|
|
23
|
+
"type": "registry:ui",
|
|
24
|
+
"target": "components/composites/appearance-editor/accent-swatch-groups.tsx"
|
|
25
|
+
},
|
|
20
26
|
{
|
|
21
27
|
"path": "src/components/composites/appearance-editor/appearance-choices.tsx",
|
|
22
28
|
"type": "registry:ui",
|
|
@@ -37,6 +43,11 @@
|
|
|
37
43
|
"type": "registry:ui",
|
|
38
44
|
"target": "components/composites/appearance-editor/appearance-types.ts"
|
|
39
45
|
},
|
|
46
|
+
{
|
|
47
|
+
"path": "src/components/composites/appearance-editor/font-settings-group.tsx",
|
|
48
|
+
"type": "registry:ui",
|
|
49
|
+
"target": "components/composites/appearance-editor/font-settings-group.tsx"
|
|
50
|
+
},
|
|
40
51
|
{
|
|
41
52
|
"path": "src/components/composites/appearance-editor/index.ts",
|
|
42
53
|
"type": "registry:ui",
|
package/dist/r/lib.json
CHANGED
|
@@ -4,12 +4,17 @@
|
|
|
4
4
|
"title": "Class-name and token helpers",
|
|
5
5
|
"description": "The private helpers the components import: the class-name merge, the variant recipes, the token manifest and the theme bridge. Installed automatically as a peer of any component that needs it.",
|
|
6
6
|
"dependencies": [
|
|
7
|
-
"@adea-ai/themes@^0.9.
|
|
7
|
+
"@adea-ai/themes@^0.9.7",
|
|
8
8
|
"class-variance-authority@^0.7.1",
|
|
9
9
|
"cn@^0.4.0"
|
|
10
10
|
],
|
|
11
11
|
"registryDependencies": [],
|
|
12
12
|
"files": [
|
|
13
|
+
{
|
|
14
|
+
"path": "src/lib/appearance-font-settings.ts",
|
|
15
|
+
"type": "registry:lib",
|
|
16
|
+
"target": "lib/appearance-font-settings.ts"
|
|
17
|
+
},
|
|
13
18
|
{
|
|
14
19
|
"path": "src/lib/clipboard.ts",
|
|
15
20
|
"type": "registry:lib",
|
|
@@ -25,6 +30,11 @@
|
|
|
25
30
|
"type": "registry:lib",
|
|
26
31
|
"target": "lib/download.ts"
|
|
27
32
|
},
|
|
33
|
+
{
|
|
34
|
+
"path": "src/lib/font-catalog.ts",
|
|
35
|
+
"type": "registry:lib",
|
|
36
|
+
"target": "lib/font-catalog.ts"
|
|
37
|
+
},
|
|
28
38
|
{
|
|
29
39
|
"path": "src/lib/form-field.ts",
|
|
30
40
|
"type": "registry:lib",
|
|
@@ -40,6 +50,11 @@
|
|
|
40
50
|
"type": "registry:lib",
|
|
41
51
|
"target": "lib/overlay.ts"
|
|
42
52
|
},
|
|
53
|
+
{
|
|
54
|
+
"path": "src/lib/safe-script.ts",
|
|
55
|
+
"type": "registry:lib",
|
|
56
|
+
"target": "lib/safe-script.ts"
|
|
57
|
+
},
|
|
43
58
|
{
|
|
44
59
|
"path": "src/lib/theme-accents.ts",
|
|
45
60
|
"type": "registry:lib",
|
package/dist/r/registry.json
CHANGED
|
@@ -1910,7 +1910,7 @@
|
|
|
1910
1910
|
"title": "Appearance Editor",
|
|
1911
1911
|
"description": "",
|
|
1912
1912
|
"dependencies": [
|
|
1913
|
-
"@adea-ai/themes@^0.9.
|
|
1913
|
+
"@adea-ai/themes@^0.9.7",
|
|
1914
1914
|
"@kobalte/core@^0.13.14",
|
|
1915
1915
|
"lucide-solid@^1.51.0"
|
|
1916
1916
|
],
|
|
@@ -1920,9 +1920,15 @@
|
|
|
1920
1920
|
"@adea-ai/ui/input",
|
|
1921
1921
|
"@adea-ai/ui/popover",
|
|
1922
1922
|
"@adea-ai/ui/switch",
|
|
1923
|
+
"@adea-ai/ui/theme",
|
|
1923
1924
|
"lib"
|
|
1924
1925
|
],
|
|
1925
1926
|
"files": [
|
|
1927
|
+
{
|
|
1928
|
+
"path": "src/components/composites/appearance-editor/accent-swatch-groups.tsx",
|
|
1929
|
+
"type": "registry:ui",
|
|
1930
|
+
"target": "components/composites/appearance-editor/accent-swatch-groups.tsx"
|
|
1931
|
+
},
|
|
1926
1932
|
{
|
|
1927
1933
|
"path": "src/components/composites/appearance-editor/appearance-choices.tsx",
|
|
1928
1934
|
"type": "registry:ui",
|
|
@@ -1943,6 +1949,11 @@
|
|
|
1943
1949
|
"type": "registry:ui",
|
|
1944
1950
|
"target": "components/composites/appearance-editor/appearance-types.ts"
|
|
1945
1951
|
},
|
|
1952
|
+
{
|
|
1953
|
+
"path": "src/components/composites/appearance-editor/font-settings-group.tsx",
|
|
1954
|
+
"type": "registry:ui",
|
|
1955
|
+
"target": "components/composites/appearance-editor/font-settings-group.tsx"
|
|
1956
|
+
},
|
|
1946
1957
|
{
|
|
1947
1958
|
"path": "src/components/composites/appearance-editor/index.ts",
|
|
1948
1959
|
"type": "registry:ui",
|
|
@@ -2357,10 +2368,12 @@
|
|
|
2357
2368
|
"title": "Theming",
|
|
2358
2369
|
"description": "",
|
|
2359
2370
|
"dependencies": [
|
|
2360
|
-
"@adea-ai/themes@^0.9.
|
|
2371
|
+
"@adea-ai/themes@^0.9.7",
|
|
2372
|
+
"@kobalte/core@^0.13.14",
|
|
2361
2373
|
"lucide-solid@^1.51.0"
|
|
2362
2374
|
],
|
|
2363
2375
|
"registryDependencies": [
|
|
2376
|
+
"@adea-ai/ui/appearance-editor",
|
|
2364
2377
|
"@adea-ai/ui/button",
|
|
2365
2378
|
"@adea-ai/ui/radio-group",
|
|
2366
2379
|
"@adea-ai/ui/toggle-group",
|
|
@@ -2452,6 +2465,11 @@
|
|
|
2452
2465
|
"type": "registry:style",
|
|
2453
2466
|
"target": "styles/base.css"
|
|
2454
2467
|
},
|
|
2468
|
+
{
|
|
2469
|
+
"path": "src/styles/appearance-font-settings.css",
|
|
2470
|
+
"type": "registry:style",
|
|
2471
|
+
"target": "styles/appearance-font-settings.css"
|
|
2472
|
+
},
|
|
2455
2473
|
{
|
|
2456
2474
|
"path": "src/styles/fonts.css",
|
|
2457
2475
|
"type": "registry:style",
|
|
@@ -2465,12 +2483,17 @@
|
|
|
2465
2483
|
"title": "Class-name and token helpers",
|
|
2466
2484
|
"description": "The private helpers the components import: the class-name merge, the variant recipes, the token manifest and the theme bridge. Installed automatically as a peer of any component that needs it.",
|
|
2467
2485
|
"dependencies": [
|
|
2468
|
-
"@adea-ai/themes@^0.9.
|
|
2486
|
+
"@adea-ai/themes@^0.9.7",
|
|
2469
2487
|
"class-variance-authority@^0.7.1",
|
|
2470
2488
|
"cn@^0.4.0"
|
|
2471
2489
|
],
|
|
2472
2490
|
"registryDependencies": [],
|
|
2473
2491
|
"files": [
|
|
2492
|
+
{
|
|
2493
|
+
"path": "src/lib/appearance-font-settings.ts",
|
|
2494
|
+
"type": "registry:lib",
|
|
2495
|
+
"target": "lib/appearance-font-settings.ts"
|
|
2496
|
+
},
|
|
2474
2497
|
{
|
|
2475
2498
|
"path": "src/lib/clipboard.ts",
|
|
2476
2499
|
"type": "registry:lib",
|
|
@@ -2486,6 +2509,11 @@
|
|
|
2486
2509
|
"type": "registry:lib",
|
|
2487
2510
|
"target": "lib/download.ts"
|
|
2488
2511
|
},
|
|
2512
|
+
{
|
|
2513
|
+
"path": "src/lib/font-catalog.ts",
|
|
2514
|
+
"type": "registry:lib",
|
|
2515
|
+
"target": "lib/font-catalog.ts"
|
|
2516
|
+
},
|
|
2489
2517
|
{
|
|
2490
2518
|
"path": "src/lib/form-field.ts",
|
|
2491
2519
|
"type": "registry:lib",
|
|
@@ -2501,6 +2529,11 @@
|
|
|
2501
2529
|
"type": "registry:lib",
|
|
2502
2530
|
"target": "lib/overlay.ts"
|
|
2503
2531
|
},
|
|
2532
|
+
{
|
|
2533
|
+
"path": "src/lib/safe-script.ts",
|
|
2534
|
+
"type": "registry:lib",
|
|
2535
|
+
"target": "lib/safe-script.ts"
|
|
2536
|
+
},
|
|
2504
2537
|
{
|
|
2505
2538
|
"path": "src/lib/theme-accents.ts",
|
|
2506
2539
|
"type": "registry:lib",
|
|
@@ -161,6 +161,7 @@ export function ActionButton<T extends ValidComponent = 'button'>(props: ActionB
|
|
|
161
161
|
}
|
|
162
162
|
>
|
|
163
163
|
<Tooltip
|
|
164
|
+
placement={local.tooltipSide ?? 'bottom'}
|
|
164
165
|
open={tooltipOpen()}
|
|
165
166
|
onOpenChange={(open) => {
|
|
166
167
|
if (open && tooltipSuppression()) return
|
|
@@ -174,7 +175,7 @@ export function ActionButton<T extends ValidComponent = 'button'>(props: ActionB
|
|
|
174
175
|
>
|
|
175
176
|
{contents()}
|
|
176
177
|
</TooltipTrigger>
|
|
177
|
-
<TooltipContent
|
|
178
|
+
<TooltipContent>{local.tooltip}</TooltipContent>
|
|
178
179
|
</Tooltip>
|
|
179
180
|
</Show>
|
|
180
181
|
<Show when={busy()}>
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* MIT License
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2026 Wing
|
|
5
|
+
*
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
* furnished to do so, subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
* copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
* SOFTWARE.
|
|
23
|
+
*/
|
|
24
|
+
import { RadioGroup as Radio } from '@kobalte/core/radio-group'
|
|
25
|
+
import { For, Show } from 'solid-js'
|
|
26
|
+
import { cn } from '../../../lib/utils'
|
|
27
|
+
|
|
28
|
+
export const PRIMARY_ACCENT_IDS = ['blue', 'green', 'amber', 'cyan', 'pink'] as const
|
|
29
|
+
const primaryAccentIds: ReadonlySet<string> = new Set(PRIMARY_ACCENT_IDS)
|
|
30
|
+
|
|
31
|
+
type AccentOption = Readonly<{
|
|
32
|
+
id: string
|
|
33
|
+
label: string
|
|
34
|
+
light?: string
|
|
35
|
+
dark?: string
|
|
36
|
+
}>
|
|
37
|
+
|
|
38
|
+
type AccentSwatchGroupsProps = {
|
|
39
|
+
accentOptions: readonly AccentOption[]
|
|
40
|
+
themeAccentOptions: readonly AccentOption[]
|
|
41
|
+
resolvedAppearance: 'light' | 'dark'
|
|
42
|
+
themeDefaultColor: string
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function AccentSwatchGroups(props: AccentSwatchGroupsProps) {
|
|
46
|
+
const primaryAccents = () =>
|
|
47
|
+
PRIMARY_ACCENT_IDS.flatMap((id) => {
|
|
48
|
+
const option = props.accentOptions.find((candidate) => candidate.id === id)
|
|
49
|
+
return option ? [option] : []
|
|
50
|
+
})
|
|
51
|
+
const additionalAccents = () =>
|
|
52
|
+
props.accentOptions.filter(
|
|
53
|
+
(option) => option.id !== 'theme' && !primaryAccentIds.has(option.id)
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<>
|
|
58
|
+
<div class="grid grid-cols-3 gap-2" data-primary-accent-grid>
|
|
59
|
+
<AccentSwatch
|
|
60
|
+
id="theme"
|
|
61
|
+
label="Theme default"
|
|
62
|
+
color={props.themeDefaultColor}
|
|
63
|
+
group="primary"
|
|
64
|
+
/>
|
|
65
|
+
<For each={primaryAccents()}>
|
|
66
|
+
{(option) => (
|
|
67
|
+
<AccentSwatch
|
|
68
|
+
id={option.id}
|
|
69
|
+
label={option.label}
|
|
70
|
+
color={(props.resolvedAppearance === 'light' ? option.light : option.dark) ?? ''}
|
|
71
|
+
group="primary"
|
|
72
|
+
/>
|
|
73
|
+
)}
|
|
74
|
+
</For>
|
|
75
|
+
</div>
|
|
76
|
+
<Show when={additionalAccents().length > 0}>
|
|
77
|
+
<div class="flex flex-col gap-1">
|
|
78
|
+
<span class="text-xs font-medium text-muted-foreground">Additional colors</span>
|
|
79
|
+
<div class="flex flex-wrap gap-2">
|
|
80
|
+
<For each={additionalAccents()}>
|
|
81
|
+
{(option) => (
|
|
82
|
+
<AccentSwatch
|
|
83
|
+
id={option.id}
|
|
84
|
+
label={option.label}
|
|
85
|
+
color={(props.resolvedAppearance === 'light' ? option.light : option.dark) ?? ''}
|
|
86
|
+
group="additional"
|
|
87
|
+
/>
|
|
88
|
+
)}
|
|
89
|
+
</For>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
</Show>
|
|
93
|
+
<Show when={props.themeAccentOptions.length > 0}>
|
|
94
|
+
<div class="flex flex-col gap-1">
|
|
95
|
+
<span class="text-xs font-medium text-muted-foreground">Theme accents</span>
|
|
96
|
+
<div class="grid grid-cols-3 gap-2">
|
|
97
|
+
<For each={props.themeAccentOptions}>
|
|
98
|
+
{(option) => (
|
|
99
|
+
<AccentSwatch
|
|
100
|
+
id={option.id}
|
|
101
|
+
label={'Theme ' + option.label.toLowerCase()}
|
|
102
|
+
color={(props.resolvedAppearance === 'light' ? option.light : option.dark) ?? ''}
|
|
103
|
+
group="theme"
|
|
104
|
+
dashed
|
|
105
|
+
/>
|
|
106
|
+
)}
|
|
107
|
+
</For>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
</Show>
|
|
111
|
+
</>
|
|
112
|
+
)
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function AccentSwatch(props: {
|
|
116
|
+
id: string
|
|
117
|
+
label: string
|
|
118
|
+
color: string
|
|
119
|
+
group: 'primary' | 'additional' | 'theme'
|
|
120
|
+
dashed?: boolean
|
|
121
|
+
}) {
|
|
122
|
+
return (
|
|
123
|
+
<Radio.Item
|
|
124
|
+
value={props.id}
|
|
125
|
+
data-accent-option={props.id}
|
|
126
|
+
data-primary-accent={props.group === 'primary' ? props.id : undefined}
|
|
127
|
+
data-additional-accent={props.group === 'additional' ? props.id : undefined}
|
|
128
|
+
data-theme-accent={props.group === 'theme' ? props.id : undefined}
|
|
129
|
+
class="rounded-full focus-within:ring-3 focus-within:ring-ring/50"
|
|
130
|
+
>
|
|
131
|
+
<Radio.ItemInput />
|
|
132
|
+
<Radio.ItemLabel
|
|
133
|
+
class={cn(
|
|
134
|
+
'block size-7 cursor-pointer rounded-full border p-0.5 data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary',
|
|
135
|
+
{ 'border-dashed data-[checked]:border-solid': props.dashed }
|
|
136
|
+
)}
|
|
137
|
+
>
|
|
138
|
+
<span
|
|
139
|
+
class="block size-full rounded-full"
|
|
140
|
+
aria-hidden="true"
|
|
141
|
+
style={{ 'background-color': props.color }}
|
|
142
|
+
/>
|
|
143
|
+
<span class="sr-only">{props.label}</span>
|
|
144
|
+
</Radio.ItemLabel>
|
|
145
|
+
</Radio.Item>
|
|
146
|
+
)
|
|
147
|
+
}
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
import { RadioGroup as Radio } from '@kobalte/core/radio-group'
|
|
27
27
|
import { For, Show } from 'solid-js'
|
|
28
28
|
import { isThemeAccentId } from '../../../lib/theme-accents'
|
|
29
|
+
import { AccentSwatchGroups } from './accent-swatch-groups'
|
|
29
30
|
import type { AppearanceEditorProps } from './appearance-types'
|
|
30
31
|
import { ThemeMiniature, ThemeMiniatureSplit } from './theme-preview'
|
|
31
32
|
|
|
@@ -39,7 +40,6 @@ const SURFACES = [
|
|
|
39
40
|
{ value: 'frosted', label: 'Frosted' },
|
|
40
41
|
{ value: 'opaque', label: 'Opaque' },
|
|
41
42
|
] as const
|
|
42
|
-
|
|
43
43
|
export function ModeChoices(props: AppearanceEditorProps) {
|
|
44
44
|
return (
|
|
45
45
|
<Radio
|
|
@@ -113,89 +113,32 @@ export function AccentChoices(props: AppearanceEditorProps) {
|
|
|
113
113
|
disabled={props.saving}
|
|
114
114
|
orientation="horizontal"
|
|
115
115
|
aria-label="Accent"
|
|
116
|
-
|
|
117
|
-
// beside a full-width swatch line overflowed the settings sidebar's
|
|
118
|
-
// control column, so the pair stays a narrow chip plus a wrapped grid.
|
|
119
|
-
class="flex items-center gap-3"
|
|
116
|
+
class="flex flex-col items-start gap-3"
|
|
120
117
|
onChange={(accent) =>
|
|
121
118
|
props.onChange({
|
|
122
119
|
accent: accent === 'custom' ? (props.customAccentValue ?? '') : accent,
|
|
123
120
|
})
|
|
124
121
|
}
|
|
125
122
|
>
|
|
126
|
-
<
|
|
127
|
-
{
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
123
|
+
<AccentSwatchGroups
|
|
124
|
+
accentOptions={props.accentOptions}
|
|
125
|
+
themeAccentOptions={themeAccents()}
|
|
126
|
+
resolvedAppearance={resolvedAppearance()}
|
|
127
|
+
themeDefaultColor={
|
|
128
|
+
resolvedAppearance() === 'light'
|
|
129
|
+
? props.lightTheme.colors.accent
|
|
130
|
+
: props.darkTheme.colors.accent
|
|
131
|
+
}
|
|
132
|
+
/>
|
|
133
|
+
<div class="flex flex-col gap-1">
|
|
134
|
+
<span class="text-xs font-medium text-muted-foreground">Custom</span>
|
|
135
|
+
<Radio.Item value="custom">
|
|
134
136
|
<Radio.ItemInput />
|
|
135
|
-
<Radio.ItemLabel class="
|
|
136
|
-
|
|
137
|
-
class="block size-full rounded-full"
|
|
138
|
-
aria-hidden="true"
|
|
139
|
-
style={{
|
|
140
|
-
'background-color':
|
|
141
|
-
resolvedAppearance() === 'light'
|
|
142
|
-
? props.lightTheme.colors.accent
|
|
143
|
-
: props.darkTheme.colors.accent,
|
|
144
|
-
}}
|
|
145
|
-
/>
|
|
146
|
-
<span class="sr-only">Theme default</span>
|
|
137
|
+
<Radio.ItemLabel class="flex h-7 cursor-pointer items-center rounded-md border px-2 text-xs whitespace-nowrap data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary">
|
|
138
|
+
Custom
|
|
147
139
|
</Radio.ItemLabel>
|
|
148
140
|
</Radio.Item>
|
|
149
|
-
<For each={props.accentOptions}>
|
|
150
|
-
{(option) => (
|
|
151
|
-
<Radio.Item
|
|
152
|
-
value={option.id}
|
|
153
|
-
class="rounded-full focus-within:ring-3 focus-within:ring-ring/50"
|
|
154
|
-
>
|
|
155
|
-
<Radio.ItemInput />
|
|
156
|
-
<Radio.ItemLabel class="block size-7 cursor-pointer rounded-full border p-0.5 data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary">
|
|
157
|
-
<span
|
|
158
|
-
class="block size-full rounded-full"
|
|
159
|
-
aria-hidden="true"
|
|
160
|
-
style={{
|
|
161
|
-
'background-color':
|
|
162
|
-
resolvedAppearance() === 'light' ? option.light : option.dark,
|
|
163
|
-
}}
|
|
164
|
-
/>
|
|
165
|
-
<span class="sr-only">{option.label}</span>
|
|
166
|
-
</Radio.ItemLabel>
|
|
167
|
-
</Radio.Item>
|
|
168
|
-
)}
|
|
169
|
-
</For>
|
|
170
|
-
<For each={themeAccents()}>
|
|
171
|
-
{(option) => (
|
|
172
|
-
<Radio.Item
|
|
173
|
-
value={option.id}
|
|
174
|
-
data-theme-accent={option.id}
|
|
175
|
-
class="rounded-full focus-within:ring-3 focus-within:ring-ring/50"
|
|
176
|
-
>
|
|
177
|
-
<Radio.ItemInput />
|
|
178
|
-
<Radio.ItemLabel class="block size-7 cursor-pointer rounded-full border border-dashed p-0.5 data-[checked]:border-solid data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary">
|
|
179
|
-
<span
|
|
180
|
-
class="block size-full rounded-full"
|
|
181
|
-
aria-hidden="true"
|
|
182
|
-
style={{
|
|
183
|
-
'background-color':
|
|
184
|
-
resolvedAppearance() === 'light' ? option.light : option.dark,
|
|
185
|
-
}}
|
|
186
|
-
/>
|
|
187
|
-
<span class="sr-only">{`Theme ${option.label.toLowerCase()}`}</span>
|
|
188
|
-
</Radio.ItemLabel>
|
|
189
|
-
</Radio.Item>
|
|
190
|
-
)}
|
|
191
|
-
</For>
|
|
192
141
|
</div>
|
|
193
|
-
<Radio.Item value="custom">
|
|
194
|
-
<Radio.ItemInput />
|
|
195
|
-
<Radio.ItemLabel class="flex h-7 cursor-pointer items-center rounded-md border px-2 text-xs whitespace-nowrap data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary">
|
|
196
|
-
Custom
|
|
197
|
-
</Radio.ItemLabel>
|
|
198
|
-
</Radio.Item>
|
|
199
142
|
</Radio>
|
|
200
143
|
)
|
|
201
144
|
}
|