@adea-ai/ui 0.110.1 → 0.112.0

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.
Files changed (94) hide show
  1. package/dist/components/composites/action-button/action-button.d.ts +8 -0
  2. package/dist/components/composites/action-button/action-button.d.ts.map +1 -1
  3. package/dist/components/composites/action-button/action-button.js +9 -3
  4. package/dist/components/composites/action-button/action-button.js.map +1 -1
  5. package/dist/components/composites/appearance-editor/accent-swatch-groups.d.ts +17 -2
  6. package/dist/components/composites/appearance-editor/accent-swatch-groups.d.ts.map +1 -1
  7. package/dist/components/composites/appearance-editor/accent-swatch-groups.js +47 -122
  8. package/dist/components/composites/appearance-editor/accent-swatch-groups.js.map +1 -1
  9. package/dist/components/composites/appearance-editor/appearance-choices.d.ts.map +1 -1
  10. package/dist/components/composites/appearance-editor/appearance-choices.js +0 -4
  11. package/dist/components/composites/appearance-editor/appearance-choices.js.map +1 -1
  12. package/dist/components/composites/appearance-editor/appearance-editor.js +1 -1
  13. package/dist/components/composites/appearance-editor/font-settings-group.d.ts.map +1 -1
  14. package/dist/components/composites/appearance-editor/font-settings-group.js +60 -68
  15. package/dist/components/composites/appearance-editor/font-settings-group.js.map +1 -1
  16. package/dist/components/composites/appearance-editor/index.js +1 -1
  17. package/dist/components/theme/appearance-panel.d.ts.map +1 -1
  18. package/dist/components/theme/appearance-panel.js +0 -3
  19. package/dist/components/theme/appearance-panel.js.map +1 -1
  20. package/dist/components/ui/alert-dialog/alert-dialog.js +2 -2
  21. package/dist/components/ui/alert-dialog/alert-dialog.js.map +1 -1
  22. package/dist/components/ui/combobox/combobox.d.ts.map +1 -1
  23. package/dist/components/ui/combobox/combobox.js +1 -1
  24. package/dist/components/ui/combobox/combobox.js.map +1 -1
  25. package/dist/components/ui/context-menu/context-menu.d.ts.map +1 -1
  26. package/dist/components/ui/context-menu/context-menu.js +2 -2
  27. package/dist/components/ui/context-menu/context-menu.js.map +1 -1
  28. package/dist/components/ui/dialog/dialog.js +2 -2
  29. package/dist/components/ui/dialog/dialog.js.map +1 -1
  30. package/dist/components/ui/drawer/drawer.js +1 -1
  31. package/dist/components/ui/drawer/drawer.js.map +1 -1
  32. package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts +22 -2
  33. package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts.map +1 -1
  34. package/dist/components/ui/dropdown-menu/dropdown-menu.js +79 -30
  35. package/dist/components/ui/dropdown-menu/dropdown-menu.js.map +1 -1
  36. package/dist/components/ui/dropdown-menu/index.d.ts +1 -0
  37. package/dist/components/ui/dropdown-menu/index.d.ts.map +1 -1
  38. package/dist/components/ui/menubar/menubar.d.ts.map +1 -1
  39. package/dist/components/ui/menubar/menubar.js +2 -2
  40. package/dist/components/ui/menubar/menubar.js.map +1 -1
  41. package/dist/components/ui/select/index.d.ts +1 -0
  42. package/dist/components/ui/select/index.d.ts.map +1 -1
  43. package/dist/components/ui/select/select.d.ts +7 -1
  44. package/dist/components/ui/select/select.d.ts.map +1 -1
  45. package/dist/components/ui/select/select.js +34 -20
  46. package/dist/components/ui/select/select.js.map +1 -1
  47. package/dist/components/ui/sheet/sheet.js +1 -1
  48. package/dist/components/ui/sheet/sheet.js.map +1 -1
  49. package/dist/components/ui/tooltip/tooltip.d.ts +16 -6
  50. package/dist/components/ui/tooltip/tooltip.d.ts.map +1 -1
  51. package/dist/components/ui/tooltip/tooltip.js +15 -4
  52. package/dist/components/ui/tooltip/tooltip.js.map +1 -1
  53. package/dist/index.js +1 -1
  54. package/dist/lib/overlay.d.ts +30 -1
  55. package/dist/lib/overlay.d.ts.map +1 -1
  56. package/dist/lib/overlay.js +37 -2
  57. package/dist/lib/overlay.js.map +1 -1
  58. package/dist/r/src/components/composites/action-button/action-button.tsx +10 -1
  59. package/dist/r/src/components/composites/appearance-editor/accent-swatch-groups.tsx +33 -86
  60. package/dist/r/src/components/composites/appearance-editor/appearance-choices.tsx +0 -3
  61. package/dist/r/src/components/composites/appearance-editor/font-settings-group.tsx +20 -7
  62. package/dist/r/src/components/theme/appearance-panel.tsx +0 -1
  63. package/dist/r/src/components/ui/alert-dialog/alert-dialog.tsx +2 -2
  64. package/dist/r/src/components/ui/combobox/combobox.tsx +3 -1
  65. package/dist/r/src/components/ui/context-menu/context-menu.tsx +6 -2
  66. package/dist/r/src/components/ui/dialog/dialog.tsx +2 -2
  67. package/dist/r/src/components/ui/drawer/drawer.tsx +1 -1
  68. package/dist/r/src/components/ui/dropdown-menu/dropdown-menu.tsx +44 -6
  69. package/dist/r/src/components/ui/dropdown-menu/index.ts +1 -0
  70. package/dist/r/src/components/ui/menubar/menubar.tsx +6 -2
  71. package/dist/r/src/components/ui/select/index.ts +1 -0
  72. package/dist/r/src/components/ui/select/select.tsx +31 -6
  73. package/dist/r/src/components/ui/sheet/sheet.tsx +1 -1
  74. package/dist/r/src/components/ui/tooltip/tooltip.tsx +28 -2
  75. package/dist/r/src/lib/overlay.ts +45 -1
  76. package/package.json +1 -1
  77. package/src/components/composites/action-button/action-button.tsx +10 -1
  78. package/src/components/composites/appearance-editor/accent-swatch-groups.tsx +33 -86
  79. package/src/components/composites/appearance-editor/appearance-choices.tsx +0 -3
  80. package/src/components/composites/appearance-editor/font-settings-group.tsx +20 -7
  81. package/src/components/theme/appearance-panel.tsx +0 -1
  82. package/src/components/ui/alert-dialog/alert-dialog.tsx +2 -2
  83. package/src/components/ui/combobox/combobox.tsx +3 -1
  84. package/src/components/ui/context-menu/context-menu.tsx +6 -2
  85. package/src/components/ui/dialog/dialog.tsx +2 -2
  86. package/src/components/ui/drawer/drawer.tsx +1 -1
  87. package/src/components/ui/dropdown-menu/dropdown-menu.tsx +44 -6
  88. package/src/components/ui/dropdown-menu/index.ts +1 -0
  89. package/src/components/ui/menubar/menubar.tsx +6 -2
  90. package/src/components/ui/select/index.ts +1 -0
  91. package/src/components/ui/select/select.tsx +31 -6
  92. package/src/components/ui/sheet/sheet.tsx +1 -1
  93. package/src/components/ui/tooltip/tooltip.tsx +28 -2
  94. package/src/lib/overlay.ts +45 -1
package/dist/index.js CHANGED
@@ -103,7 +103,6 @@ import { accentPresets, allTokens, colorTokens, densityTokens, designTokens, ele
103
103
  import { isThemeAccentId } from "./lib/theme-accents.js";
104
104
  import { appearancePreviewThemes, builtinThemes, contrastRatio, defaultDarkThemeId, defaultLightThemeId, resolveAccentPreset, themeAccentsFor, themeById, themeCssVariables, themeFamilies, themeRecordById, themeRecords, themesForAppearance, validateTheme, validateThemeRegistry, withAccent } from "./lib/themes.js";
105
105
  import { APPEARANCE_EDITOR_FONT_AXES, APPEARANCE_EDITOR_FONT_SIZE_MAX, APPEARANCE_EDITOR_FONT_SIZE_MIN, DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS, applyAppearanceFontSettings, fontSettingsBootstrapScript, normalizeAppearanceEditorFontSettings, normalizeAppearanceEditorFontSize } from "./lib/appearance-font-settings.js";
106
- import { PalettePreview, ThemeMiniature, ThemeMiniatureSplit } from "./components/composites/appearance-editor/theme-preview.js";
107
106
  import { AppearanceFontSettingsGroup } from "./components/composites/appearance-editor/font-settings-group.js";
108
107
  import { ThemePicker, ThemePreview, ThemeSwatch } from "./components/theme/theme-picker.js";
109
108
  import { ThemeProvider, defaultThemeSelection, inlineScriptLiteral, resolvedDensity, themeScript, useTheme } from "./components/theme/theme-provider.js";
@@ -122,6 +121,7 @@ import { SettingsNavigation } from "./components/composites/settings/settings-na
122
121
  import { SettingsLayout } from "./components/composites/settings/settings-layout.js";
123
122
  import { SceneControls } from "./components/composites/scene-controls/scene-controls.js";
124
123
  import { PropertyList, PropertyRow, PropertyTerm, PropertyValue, Stat, StatGroup } from "./components/composites/stat/stat.js";
124
+ import { PalettePreview, ThemeMiniature, ThemeMiniatureSplit } from "./components/composites/appearance-editor/theme-preview.js";
125
125
  import { AppearanceEditor, AppearanceEditorActions, AppearancePopover } from "./components/composites/appearance-editor/appearance-editor.js";
126
126
  import { formatBytes, formatReleaseDate, plainTextFromMarkdown } from "./lib/version-notes.js";
127
127
  import { UpdateDialog } from "./components/composites/update-dialog/update-dialog.js";
@@ -9,8 +9,24 @@
9
9
  * library would inherit all three. Declaring the surface once is what makes
10
10
  * "an overlay looks like this" a fact rather than a convention.
11
11
  */
12
- /** The panel itself: fill, hairline edge, radius, elevation. */
12
+ import { type VariantProps } from '#lib/variants';
13
+ /** The panel itself: fill, hairline edge, radius, elevation. Menus, popovers
14
+ * and the command palette float on the elevated overlay rung (`--popover`). */
13
15
  export declare const overlaySurface = "bg-popover text-popover-foreground rounded-xl border border-border shadow-lg";
16
+ /**
17
+ * The modal panel: the same hairline edge, radius and elevation, painted on the
18
+ * *neutral* theme surface instead of the elevated overlay rung.
19
+ *
20
+ * `--popover` is the catalogue's `surfaceElevated`, whose derivation amplifies
21
+ * the canvas hue's chroma on the elevated step. On the dark default's violet
22
+ * canvas that makes the dialog the most chromatic surface in the ladder —
23
+ * `oklch(0.2406 0.0088 300.91)`, red above green in sRGB — and on a full dialog
24
+ * panel that cast reads as a warm tint the canvas never has. shadcn's own
25
+ * convention already splits the two: a Dialog paints `bg-background`, menus and
26
+ * popovers paint `bg-popover`. The veil, the hairline and the elevation shadow
27
+ * carry the separation the lighter fill no longer provides.
28
+ */
29
+ export declare const dialogSurface = "bg-background text-foreground rounded-xl border border-border shadow-lg";
14
30
  /**
15
31
  * Overlay titles have one fixed typography role. Keep this small recipe shared
16
32
  * without loading the configurable Heading component into every dialog.
@@ -53,6 +69,19 @@ export declare const destructiveMenuItem = "border-s-2 border-destructive ps-1.5
53
69
  export declare const menuLabel = "px-2 py-1.5 text-2xs font-medium tracking-wide text-muted-foreground uppercase";
54
70
  /** The rule between menu groups. */
55
71
  export declare const menuSeparator = "bg-border -mx-1 my-1 h-px";
72
+ /**
73
+ * A leading colour swatch on a menu or select row: the sanctioned way to carry
74
+ * a card-tone colour into a list of options. The tones are the system's accent
75
+ * and status roles — the vocabulary a Badge already speaks — so the colour an
76
+ * option shows in a menu is the colour its badge carries on a card, and a
77
+ * caller never passes a raw colour into a list. The dot is `aria-hidden`; the
78
+ * label carries the meaning, so a tone is never the only signal.
79
+ */
80
+ export declare const menuSwatchTone: (props?: ({
81
+ tone?: "destructive" | "success" | "warning" | "info" | "neutral" | "primary" | null | undefined;
82
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
83
+ /** The tones a menu row's swatch can take. */
84
+ export type MenuSwatchTone = NonNullable<VariantProps<typeof menuSwatchTone>['tone']>;
56
85
  /** Padding shared by every menu-list surface. */
57
86
  export declare const menuContentPadding = "p-1";
58
87
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../../src/lib/overlay.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,gEAAgE;AAChE,eAAO,MAAM,cAAc,iFACqD,CAAA;AAEhF;;;GAGG;AACH,eAAO,MAAM,YAAY,wDAAwD,CAAA;AAEjF,yEAAyE;AACzE,eAAO,MAAM,iBAAiB,6DAA6D,CAAA;AAE3F,gDAAgD;AAChD,eAAO,MAAM,YAAY,yFAC+D,CAAA;AAExF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,+FACuE,CAAA;AAE9F;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,QAIf,CAAA;AAEX;qCACqC;AACrC,eAAO,MAAM,aAAa,QAGf,CAAA;AAEX,+DAA+D;AAC/D,eAAO,MAAM,YAAY,+BAA+B,CAAA;AAExD;;;GAGG;AACH,eAAO,MAAM,QAAQ,QAOV,CAAA;AAEX,qFAAqF;AACrF,eAAO,MAAM,mBAAmB,kGACiE,CAAA;AAEjG,4CAA4C;AAC5C,eAAO,MAAM,SAAS,mFAC4D,CAAA;AAElF,oCAAoC;AACpC,eAAO,MAAM,aAAa,8BAA8B,CAAA;AAExD,iDAAiD;AACjD,eAAO,MAAM,kBAAkB,QAAQ,CAAA;AAEvC;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,aAAa;;CAAuC,CAAA"}
1
+ {"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../../src/lib/overlay.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,eAAe,CAAA;AAEtD;+EAC+E;AAC/E,eAAO,MAAM,cAAc,iFACqD,CAAA;AAEhF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,aAAa,4EACiD,CAAA;AAE3E;;;GAGG;AACH,eAAO,MAAM,YAAY,wDAAwD,CAAA;AAEjF,yEAAyE;AACzE,eAAO,MAAM,iBAAiB,6DAA6D,CAAA;AAE3F,gDAAgD;AAChD,eAAO,MAAM,YAAY,yFAC+D,CAAA;AAExF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,+FACuE,CAAA;AAE9F;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,QAIf,CAAA;AAEX;qCACqC;AACrC,eAAO,MAAM,aAAa,QAGf,CAAA;AAEX,+DAA+D;AAC/D,eAAO,MAAM,YAAY,+BAA+B,CAAA;AAExD;;;GAGG;AACH,eAAO,MAAM,QAAQ,QAOV,CAAA;AAEX,qFAAqF;AACrF,eAAO,MAAM,mBAAmB,kGACiE,CAAA;AAEjG,4CAA4C;AAC5C,eAAO,MAAM,SAAS,mFAC4D,CAAA;AAElF,oCAAoC;AACpC,eAAO,MAAM,aAAa,8BAA8B,CAAA;AAExD;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc;;8EAYzB,CAAA;AAEF,8CAA8C;AAC9C,MAAM,MAAM,cAAc,GAAG,WAAW,CAAC,YAAY,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;AAErF,iDAAiD;AACjD,eAAO,MAAM,kBAAkB,QAAQ,CAAA;AAEvC;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,aAAa;;CAAuC,CAAA"}
@@ -1,3 +1,4 @@
1
+ import { cva } from "./variants.js";
1
2
  //#region src/lib/overlay.ts
2
3
  /**
3
4
  * Shared strings for the overlay layer: dialogs, sheets, menus, popovers,
@@ -10,9 +11,24 @@
10
11
  * library would inherit all three. Declaring the surface once is what makes
11
12
  * "an overlay looks like this" a fact rather than a convention.
12
13
  */
13
- /** The panel itself: fill, hairline edge, radius, elevation. */
14
+ /** The panel itself: fill, hairline edge, radius, elevation. Menus, popovers
15
+ * and the command palette float on the elevated overlay rung (`--popover`). */
14
16
  var overlaySurface = "bg-popover text-popover-foreground rounded-xl border border-border shadow-lg";
15
17
  /**
18
+ * The modal panel: the same hairline edge, radius and elevation, painted on the
19
+ * *neutral* theme surface instead of the elevated overlay rung.
20
+ *
21
+ * `--popover` is the catalogue's `surfaceElevated`, whose derivation amplifies
22
+ * the canvas hue's chroma on the elevated step. On the dark default's violet
23
+ * canvas that makes the dialog the most chromatic surface in the ladder —
24
+ * `oklch(0.2406 0.0088 300.91)`, red above green in sRGB — and on a full dialog
25
+ * panel that cast reads as a warm tint the canvas never has. shadcn's own
26
+ * convention already splits the two: a Dialog paints `bg-background`, menus and
27
+ * popovers paint `bg-popover`. The veil, the hairline and the elevation shadow
28
+ * carry the separation the lighter fill no longer provides.
29
+ */
30
+ var dialogSurface = "bg-background text-foreground rounded-xl border border-border shadow-lg";
31
+ /**
16
32
  * Overlay titles have one fixed typography role. Keep this small recipe shared
17
33
  * without loading the configurable Heading component into every dialog.
18
34
  */
@@ -66,6 +82,25 @@ var menuLabel = "px-2 py-1.5 text-2xs font-medium tracking-wide text-muted-foreg
66
82
  /** The rule between menu groups. */
67
83
  var menuSeparator = "bg-border -mx-1 my-1 h-px";
68
84
  /**
85
+ * A leading colour swatch on a menu or select row: the sanctioned way to carry
86
+ * a card-tone colour into a list of options. The tones are the system's accent
87
+ * and status roles — the vocabulary a Badge already speaks — so the colour an
88
+ * option shows in a menu is the colour its badge carries on a card, and a
89
+ * caller never passes a raw colour into a list. The dot is `aria-hidden`; the
90
+ * label carries the meaning, so a tone is never the only signal.
91
+ */
92
+ var menuSwatchTone = cva("size-2 shrink-0 rounded-full", {
93
+ variants: { tone: {
94
+ neutral: "bg-muted-foreground",
95
+ primary: "bg-primary",
96
+ success: "bg-success",
97
+ warning: "bg-warning",
98
+ destructive: "bg-destructive",
99
+ info: "bg-info"
100
+ } },
101
+ defaultVariants: { tone: "neutral" }
102
+ });
103
+ /**
69
104
  * Marks a floating layer — a menu, a listbox, a popover — as part of the top
70
105
  * layer.
71
106
  *
@@ -79,6 +114,6 @@ var menuSeparator = "bg-border -mx-1 my-1 h-px";
79
114
  */
80
115
  var topLayerProps = { "data-kb-top-layer": "" };
81
116
  //#endregion
82
- export { destructiveMenuItem, menuItem, menuLabel, menuSeparator, overlayMotion, overlayPositioner, overlayScrim, overlaySurface, overlayTitle, popoverArrow, popoverMotion, tooltipTip, topLayerProps };
117
+ export { destructiveMenuItem, dialogSurface, menuItem, menuLabel, menuSeparator, menuSwatchTone, overlayMotion, overlayPositioner, overlayScrim, overlaySurface, overlayTitle, popoverArrow, popoverMotion, tooltipTip, topLayerProps };
83
118
 
84
119
  //# sourceMappingURL=overlay.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"overlay.js","names":[],"sources":["../../src/lib/overlay.ts"],"sourcesContent":["/**\n * Shared strings for the overlay layer: dialogs, sheets, menus, popovers,\n * tooltips and the command palette.\n *\n * These live here rather than in each component because the overlay family is\n * where consistency is most visible and least likely to survive duplication.\n * A dialog, a sheet and a dropdown that disagree about their border, radius,\n * motion or shadow read as three different apps — and an app that adopts this\n * library would inherit all three. Declaring the surface once is what makes\n * \"an overlay looks like this\" a fact rather than a convention.\n */\n\n/** The panel itself: fill, hairline edge, radius, elevation. */\nexport const overlaySurface =\n 'bg-popover text-popover-foreground rounded-xl border border-border shadow-lg'\n\n/**\n * Overlay titles have one fixed typography role. Keep this small recipe shared\n * without loading the configurable Heading component into every dialog.\n */\nexport const overlayTitle = 'font-semibold text-base tracking-tight leading-none'\n\n/** The span of the portal wrapper that centres a dialog-like overlay. */\nexport const overlayPositioner = 'fixed inset-0 z-(--z-dialog) grid place-items-center p-4'\n\n/** The dimming layer behind a modal overlay. */\nexport const overlayScrim =\n 'fixed inset-0 z-(--z-dialog) bg-scrim/50 supports-[backdrop-filter]:backdrop-blur-xs'\n\n/**\n * The tip: the card-toned bubble an explanation shows in. The side rail draws\n * it flush to a collapsed row and every floating tooltip composes the same\n * fill, edge, and type, so a control never explains itself in two visual\n * languages.\n */\nexport const tooltipTip =\n 'bg-card text-card-foreground rounded-md border border-border text-sm font-medium shadow-lg'\n\n/**\n * Entrance and exit motion, expressed as data-state classes.\n *\n * `data-expanded` / `data-closed` are Kobalte's; `data-side-*` come from its\n * popper positioning and let a menu slide in from the edge it is anchored to,\n * which is what makes a dropdown feel attached to its trigger rather than\n * dropped on the screen. Exit motion is shorter than entry, because a\n * dismissal should feel immediate while an arrival benefits from being seen.\n */\nexport const overlayMotion = [\n 'data-expanded:animate-in data-expanded:fade-in-0 data-expanded:zoom-in-95',\n 'data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95',\n 'data-expanded:duration-200 data-closed:duration-150',\n].join(' ')\n\n/** Popover-style motion: no zoom, so a panel anchored to a control does not\n * appear to breathe away from it. */\nexport const popoverMotion = [\n 'data-expanded:animate-in data-expanded:fade-in-0 data-closed:animate-out data-closed:fade-out-0',\n 'data-expanded:duration-150 data-closed:duration-100',\n].join(' ')\n\n/** The popper arrow. Sized in the component; coloured here. */\nexport const popoverArrow = 'fill-popover stroke-border'\n\n/**\n * A menu row: the shared height, radius, hover fill and focus treatment for\n * every item inside a menu, listbox or command list.\n */\nexport const menuItem = [\n 'relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none',\n 'transition-colors ease-out',\n 'data-[highlighted]:bg-surface-hover data-[highlighted]:text-foreground',\n 'data-[disabled]:pointer-events-none data-[disabled]:text-muted-foreground',\n '[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:size-4',\n '[&_svg:not([class*=text-])]:text-muted-foreground',\n].join(' ')\n\n/** A destructive action keeps readable text and marks its row with a status edge. */\nexport const destructiveMenuItem =\n 'border-s-2 border-destructive ps-1.5 text-foreground data-[highlighted]:bg-destructive-subtle'\n\n/** The label above a group of menu rows. */\nexport const menuLabel =\n 'px-2 py-1.5 text-2xs font-medium tracking-wide text-muted-foreground uppercase'\n\n/** The rule between menu groups. */\nexport const menuSeparator = 'bg-border -mx-1 my-1 h-px'\n\n/** Padding shared by every menu-list surface. */\nexport const menuContentPadding = 'p-1'\n\n/**\n * Marks a floating layer — a menu, a listbox, a popover — as part of the top\n * layer.\n *\n * A modal dialog hides everything outside itself from assistive technology\n * (`aria-hidden` on its siblings) and keeps watching `<body>` for new nodes.\n * A menu or select opened from inside the dialog portals to `<body>`, so the\n * dialog hid it too: the list was on screen, focused, and invisible to a\n * screen reader, and an outside-click check could treat a click on it as a\n * click away from the dialog. Kobalte exempts nodes carrying this attribute\n * from both, so every floating layer carries it.\n */\nexport const topLayerProps = { 'data-kb-top-layer': '' } as const\n"],"mappings":";;;;;;;;;;;;;AAaA,IAAa,iBACX;;;;;AAMF,IAAa,eAAe;;AAG5B,IAAa,oBAAoB;;AAGjC,IAAa,eACX;;;;;;;AAQF,IAAa,aACX;;;;;;;;;;AAWF,IAAa,gBAAgB;CAC3B;CACA;CACA;AACF,CAAC,CAAC,KAAK,GAAG;;;AAIV,IAAa,gBAAgB,CAC3B,mGACA,qDACF,CAAC,CAAC,KAAK,GAAG;;AAGV,IAAa,eAAe;;;;;AAM5B,IAAa,WAAW;CACtB;CACA;CACA;CACA;CACA;CACA;AACF,CAAC,CAAC,KAAK,GAAG;;AAGV,IAAa,sBACX;;AAGF,IAAa,YACX;;AAGF,IAAa,gBAAgB;;;;;;;;;;;;;AAiB7B,IAAa,gBAAgB,EAAE,qBAAqB,GAAG"}
1
+ {"version":3,"file":"overlay.js","names":[],"sources":["../../src/lib/overlay.ts"],"sourcesContent":["/**\n * Shared strings for the overlay layer: dialogs, sheets, menus, popovers,\n * tooltips and the command palette.\n *\n * These live here rather than in each component because the overlay family is\n * where consistency is most visible and least likely to survive duplication.\n * A dialog, a sheet and a dropdown that disagree about their border, radius,\n * motion or shadow read as three different apps — and an app that adopts this\n * library would inherit all three. Declaring the surface once is what makes\n * \"an overlay looks like this\" a fact rather than a convention.\n */\n\nimport { cva, type VariantProps } from '#lib/variants'\n\n/** The panel itself: fill, hairline edge, radius, elevation. Menus, popovers\n * and the command palette float on the elevated overlay rung (`--popover`). */\nexport const overlaySurface =\n 'bg-popover text-popover-foreground rounded-xl border border-border shadow-lg'\n\n/**\n * The modal panel: the same hairline edge, radius and elevation, painted on the\n * *neutral* theme surface instead of the elevated overlay rung.\n *\n * `--popover` is the catalogue's `surfaceElevated`, whose derivation amplifies\n * the canvas hue's chroma on the elevated step. On the dark default's violet\n * canvas that makes the dialog the most chromatic surface in the ladder —\n * `oklch(0.2406 0.0088 300.91)`, red above green in sRGB — and on a full dialog\n * panel that cast reads as a warm tint the canvas never has. shadcn's own\n * convention already splits the two: a Dialog paints `bg-background`, menus and\n * popovers paint `bg-popover`. The veil, the hairline and the elevation shadow\n * carry the separation the lighter fill no longer provides.\n */\nexport const dialogSurface =\n 'bg-background text-foreground rounded-xl border border-border shadow-lg'\n\n/**\n * Overlay titles have one fixed typography role. Keep this small recipe shared\n * without loading the configurable Heading component into every dialog.\n */\nexport const overlayTitle = 'font-semibold text-base tracking-tight leading-none'\n\n/** The span of the portal wrapper that centres a dialog-like overlay. */\nexport const overlayPositioner = 'fixed inset-0 z-(--z-dialog) grid place-items-center p-4'\n\n/** The dimming layer behind a modal overlay. */\nexport const overlayScrim =\n 'fixed inset-0 z-(--z-dialog) bg-scrim/50 supports-[backdrop-filter]:backdrop-blur-xs'\n\n/**\n * The tip: the card-toned bubble an explanation shows in. The side rail draws\n * it flush to a collapsed row and every floating tooltip composes the same\n * fill, edge, and type, so a control never explains itself in two visual\n * languages.\n */\nexport const tooltipTip =\n 'bg-card text-card-foreground rounded-md border border-border text-sm font-medium shadow-lg'\n\n/**\n * Entrance and exit motion, expressed as data-state classes.\n *\n * `data-expanded` / `data-closed` are Kobalte's; `data-side-*` come from its\n * popper positioning and let a menu slide in from the edge it is anchored to,\n * which is what makes a dropdown feel attached to its trigger rather than\n * dropped on the screen. Exit motion is shorter than entry, because a\n * dismissal should feel immediate while an arrival benefits from being seen.\n */\nexport const overlayMotion = [\n 'data-expanded:animate-in data-expanded:fade-in-0 data-expanded:zoom-in-95',\n 'data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95',\n 'data-expanded:duration-200 data-closed:duration-150',\n].join(' ')\n\n/** Popover-style motion: no zoom, so a panel anchored to a control does not\n * appear to breathe away from it. */\nexport const popoverMotion = [\n 'data-expanded:animate-in data-expanded:fade-in-0 data-closed:animate-out data-closed:fade-out-0',\n 'data-expanded:duration-150 data-closed:duration-100',\n].join(' ')\n\n/** The popper arrow. Sized in the component; coloured here. */\nexport const popoverArrow = 'fill-popover stroke-border'\n\n/**\n * A menu row: the shared height, radius, hover fill and focus treatment for\n * every item inside a menu, listbox or command list.\n */\nexport const menuItem = [\n 'relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none',\n 'transition-colors ease-out',\n 'data-[highlighted]:bg-surface-hover data-[highlighted]:text-foreground',\n 'data-[disabled]:pointer-events-none data-[disabled]:text-muted-foreground',\n '[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:size-4',\n '[&_svg:not([class*=text-])]:text-muted-foreground',\n].join(' ')\n\n/** A destructive action keeps readable text and marks its row with a status edge. */\nexport const destructiveMenuItem =\n 'border-s-2 border-destructive ps-1.5 text-foreground data-[highlighted]:bg-destructive-subtle'\n\n/** The label above a group of menu rows. */\nexport const menuLabel =\n 'px-2 py-1.5 text-2xs font-medium tracking-wide text-muted-foreground uppercase'\n\n/** The rule between menu groups. */\nexport const menuSeparator = 'bg-border -mx-1 my-1 h-px'\n\n/**\n * A leading colour swatch on a menu or select row: the sanctioned way to carry\n * a card-tone colour into a list of options. The tones are the system's accent\n * and status roles — the vocabulary a Badge already speaks — so the colour an\n * option shows in a menu is the colour its badge carries on a card, and a\n * caller never passes a raw colour into a list. The dot is `aria-hidden`; the\n * label carries the meaning, so a tone is never the only signal.\n */\nexport const menuSwatchTone = cva('size-2 shrink-0 rounded-full', {\n variants: {\n tone: {\n neutral: 'bg-muted-foreground',\n primary: 'bg-primary',\n success: 'bg-success',\n warning: 'bg-warning',\n destructive: 'bg-destructive',\n info: 'bg-info',\n },\n },\n defaultVariants: { tone: 'neutral' },\n})\n\n/** The tones a menu row's swatch can take. */\nexport type MenuSwatchTone = NonNullable<VariantProps<typeof menuSwatchTone>['tone']>\n\n/** Padding shared by every menu-list surface. */\nexport const menuContentPadding = 'p-1'\n\n/**\n * Marks a floating layer — a menu, a listbox, a popover — as part of the top\n * layer.\n *\n * A modal dialog hides everything outside itself from assistive technology\n * (`aria-hidden` on its siblings) and keeps watching `<body>` for new nodes.\n * A menu or select opened from inside the dialog portals to `<body>`, so the\n * dialog hid it too: the list was on screen, focused, and invisible to a\n * screen reader, and an outside-click check could treat a click on it as a\n * click away from the dialog. Kobalte exempts nodes carrying this attribute\n * from both, so every floating layer carries it.\n */\nexport const topLayerProps = { 'data-kb-top-layer': '' } as const\n"],"mappings":";;;;;;;;;;;;;;;AAgBA,IAAa,iBACX;;;;;;;;;;;;;;AAeF,IAAa,gBACX;;;;;AAMF,IAAa,eAAe;;AAG5B,IAAa,oBAAoB;;AAGjC,IAAa,eACX;;;;;;;AAQF,IAAa,aACX;;;;;;;;;;AAWF,IAAa,gBAAgB;CAC3B;CACA;CACA;AACF,CAAC,CAAC,KAAK,GAAG;;;AAIV,IAAa,gBAAgB,CAC3B,mGACA,qDACF,CAAC,CAAC,KAAK,GAAG;;AAGV,IAAa,eAAe;;;;;AAM5B,IAAa,WAAW;CACtB;CACA;CACA;CACA;CACA;CACA;AACF,CAAC,CAAC,KAAK,GAAG;;AAGV,IAAa,sBACX;;AAGF,IAAa,YACX;;AAGF,IAAa,gBAAgB;;;;;;;;;AAU7B,IAAa,iBAAiB,IAAI,gCAAgC;CAChE,UAAU,EACR,MAAM;EACJ,SAAS;EACT,SAAS;EACT,SAAS;EACT,SAAS;EACT,aAAa;EACb,MAAM;CACR,EACF;CACA,iBAAiB,EAAE,MAAM,UAAU;AACrC,CAAC;;;;;;;;;;;;;AAoBD,IAAa,gBAAgB,EAAE,qBAAqB,GAAG"}
@@ -29,6 +29,14 @@ export type ActionButtonProps<T extends ValidComponent = 'button'> = ButtonProps
29
29
  tooltip?: string
30
30
  /** Placement of the explanation; icon actions live in bars, so it defaults below the control. */
31
31
  tooltipSide?: 'top' | 'right' | 'bottom' | 'left'
32
+ /**
33
+ * A leading icon repeated inside the explanation, forwarded to the shared
34
+ * tooltip's `icon` slot so a bar of icon actions gets the icon+label tip
35
+ * without hand-composing Button and Tooltip. Decorative by contract: the tip
36
+ * is never the accessible name, so the icon must not carry meaning the label
37
+ * lacks. Size it by leaving the svg bare; the slot fixes it to control size.
38
+ */
39
+ tooltipIcon?: JSX.Element
32
40
  /** Disables the action and announces the busy label through a polite status region. */
33
41
  busy?: boolean
34
42
  /** The activity announced while busy. The Button's accessible name stays unchanged. */
@@ -92,6 +100,7 @@ export function ActionButton<T extends ValidComponent = 'button'>(props: ActionB
92
100
  'aria-busy',
93
101
  'tooltip',
94
102
  'tooltipSide',
103
+ 'tooltipIcon',
95
104
  'busy',
96
105
  'busyLabel',
97
106
  ])
@@ -175,7 +184,7 @@ export function ActionButton<T extends ValidComponent = 'button'>(props: ActionB
175
184
  >
176
185
  {contents()}
177
186
  </TooltipTrigger>
178
- <TooltipContent>{local.tooltip}</TooltipContent>
187
+ <TooltipContent icon={local.tooltipIcon}>{local.tooltip}</TooltipContent>
179
188
  </Tooltip>
180
189
  </Show>
181
190
  <Show when={busy()}>
@@ -22,11 +22,7 @@
22
22
  * SOFTWARE.
23
23
  */
24
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)
25
+ import { For } from 'solid-js'
30
26
 
31
27
  type AccentOption = Readonly<{
32
28
  id: string
@@ -37,104 +33,55 @@ type AccentOption = Readonly<{
37
33
 
38
34
  type AccentSwatchGroupsProps = {
39
35
  accentOptions: readonly AccentOption[]
40
- themeAccentOptions: readonly AccentOption[]
36
+ /**
37
+ * Accepted for host compatibility and no longer rendered. The picker offers
38
+ * one theme-scoped group — the theme's own primary followed by the presets —
39
+ * instead of splitting additional presets and the theme pair's accent slots
40
+ * into labelled groups of their own. A stored theme-accent id still resolves
41
+ * (`resolveAccentPreset`) and is still described by the row; it is just no
42
+ * longer offered as a swatch, and a host can stop feeding this list.
43
+ */
44
+ themeAccentOptions?: readonly AccentOption[]
41
45
  resolvedAppearance: 'light' | 'dark'
42
46
  themeDefaultColor: string
43
47
  }
44
48
 
49
+ /**
50
+ * The accent choices, as ONE group: the theme's own primary first, then every
51
+ * preset the host feeds, each painted with its value for the resolved
52
+ * appearance — which is what makes the group theme-scoped rather than a
53
+ * catalogue table. The custom-color entry is the host's (`AccentChoices`
54
+ * renders it beside this grid), because whether a free-form colour is accepted
55
+ * is the host's validation to own.
56
+ */
45
57
  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
- )
58
+ const presets = () => props.accentOptions.filter((option) => option.id !== 'theme')
55
59
 
56
60
  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
- </>
61
+ <div class="grid grid-cols-4 gap-2" data-accent-grid>
62
+ <AccentSwatch id="theme" label="Theme default" color={props.themeDefaultColor} />
63
+ <For each={presets()}>
64
+ {(option) => (
65
+ <AccentSwatch
66
+ id={option.id}
67
+ label={option.label}
68
+ color={(props.resolvedAppearance === 'light' ? option.light : option.dark) ?? ''}
69
+ />
70
+ )}
71
+ </For>
72
+ </div>
112
73
  )
113
74
  }
114
75
 
115
- function AccentSwatch(props: {
116
- id: string
117
- label: string
118
- color: string
119
- group: 'primary' | 'additional' | 'theme'
120
- dashed?: boolean
121
- }) {
76
+ function AccentSwatch(props: { id: string; label: string; color: string }) {
122
77
  return (
123
78
  <Radio.Item
124
79
  value={props.id}
125
80
  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
81
  class="rounded-full focus-within:ring-3 focus-within:ring-ring/50"
130
82
  >
131
83
  <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
- >
84
+ <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">
138
85
  <span
139
86
  class="block size-full rounded-full"
140
87
  aria-hidden="true"
@@ -104,8 +104,6 @@ export function AccentChoices(props: AppearanceEditorProps) {
104
104
  // user will see it.
105
105
  const resolvedAppearance = () =>
106
106
  props.draft.mode === 'system' ? props.resolvedAppearance : props.draft.mode
107
- // The accents the previewed theme pair carries, offered after the presets.
108
- const themeAccents = () => props.themeAccentOptions ?? []
109
107
  const accentSelection = () => (isCustomAccent(props) ? 'custom' : props.draft.accent)
110
108
  return (
111
109
  <Radio
@@ -122,7 +120,6 @@ export function AccentChoices(props: AppearanceEditorProps) {
122
120
  >
123
121
  <AccentSwatchGroups
124
122
  accentOptions={props.accentOptions}
125
- themeAccentOptions={themeAccents()}
126
123
  resolvedAppearance={resolvedAppearance()}
127
124
  themeDefaultColor={
128
125
  resolvedAppearance() === 'light'
@@ -11,7 +11,6 @@ import {
11
11
  DropdownMenuTrigger,
12
12
  } from '../../ui/dropdown-menu/dropdown-menu'
13
13
  import { InputControl } from '../../ui/input/input-control'
14
- import { SettingsRow } from './appearance-rows'
15
14
  import {
16
15
  APPEARANCE_EDITOR_FONT_SIZE_MAX,
17
16
  APPEARANCE_EDITOR_FONT_SIZE_MIN,
@@ -142,7 +141,7 @@ function FontFamilyMenu(props: {
142
141
  size="sm"
143
142
  aria-label={`${props.label} font family`}
144
143
  disabled={props.disabled}
145
- class="w-40 max-w-full justify-between"
144
+ class="w-32 max-w-full justify-between"
146
145
  >
147
146
  <span class="truncate">{selectedLabel()}</span>
148
147
  <ChevronDown aria-hidden="true" class="ms-2 size-4 shrink-0 text-muted-foreground" />
@@ -298,8 +297,22 @@ export function AppearanceFontSettingsGroup(props: AppearanceFontSettingsGroupPr
298
297
  )
299
298
  }
300
299
  return (
301
- <SettingsRow title={row.label} icon={<Icon />} description={row.description}>
302
- <div class="flex min-w-0 max-w-full flex-wrap items-center gap-2">
300
+ <section class="flex items-center gap-3 px-4 py-4" data-font-settings-row={row.axis}>
301
+ <span
302
+ class="flex size-9 shrink-0 items-center justify-center rounded-lg border bg-foreground/5 text-muted-foreground [&_svg]:size-4"
303
+ aria-hidden="true"
304
+ >
305
+ <Icon />
306
+ </span>
307
+ {/* One line, always: the copy truncates rather than wrapping the
308
+ controls to a second line, so the family menu, the size field
309
+ and the title/subtitle stay aligned. The compact widths keep
310
+ that true at the appearance sheet's own width. */}
311
+ <div class="min-w-0 flex-1">
312
+ <h3 class="text-sm font-medium">{row.label}</h3>
313
+ <div class="mt-0.5 truncate text-xs text-muted-foreground">{row.description}</div>
314
+ </div>
315
+ <div class="flex shrink-0 items-center gap-2">
303
316
  <FontFamilyMenu
304
317
  label={row.label}
305
318
  family={value().family}
@@ -307,7 +320,7 @@ export function AppearanceFontSettingsGroup(props: AppearanceFontSettingsGroupPr
307
320
  disabled={props.disabled}
308
321
  onSelect={(family) => updateAxis(row.axis, { family })}
309
322
  />
310
- <div class="flex shrink-0 items-center gap-1">
323
+ <div class="flex items-center gap-1">
311
324
  <InputControl
312
325
  type="number"
313
326
  min={APPEARANCE_EDITOR_FONT_SIZE_MIN}
@@ -318,7 +331,7 @@ export function AppearanceFontSettingsGroup(props: AppearanceFontSettingsGroupPr
318
331
  aria-label={`${row.label} font size in pixels`}
319
332
  aria-describedby={sizeHintId}
320
333
  aria-invalid={sizeIsInvalid()}
321
- class="w-16"
334
+ class="w-12"
322
335
  onInput={(event) =>
323
336
  setSizeDrafts((current) => ({
324
337
  ...current,
@@ -341,7 +354,7 @@ export function AppearanceFontSettingsGroup(props: AppearanceFontSettingsGroupPr
341
354
  {APPEARANCE_EDITOR_FONT_SIZE_MAX} pixels.
342
355
  </span>
343
356
  </div>
344
- </SettingsRow>
357
+ </section>
345
358
  )
346
359
  }}
347
360
  </For>
@@ -118,7 +118,6 @@ export function AppearancePanel(props: AppearancePanelProps) {
118
118
  >
119
119
  <AccentSwatchGroups
120
120
  accentOptions={accentPresets}
121
- themeAccentOptions={themeAccents()}
122
121
  resolvedAppearance={resolvedAppearance()}
123
122
  themeDefaultColor="var(--primary)"
124
123
  />
@@ -6,10 +6,10 @@ import {
6
6
  import type { ComponentProps } from 'solid-js'
7
7
  import { createEffect, createSignal, splitProps } from 'solid-js'
8
8
  import {
9
+ dialogSurface,
9
10
  overlayMotion,
10
11
  overlayPositioner,
11
12
  overlayScrim,
12
- overlaySurface,
13
13
  overlayTitle,
14
14
  } from '../../../lib/overlay'
15
15
  import { cn } from '../../../lib/utils'
@@ -89,7 +89,7 @@ export function AlertDialogContent(props: ComponentProps<typeof KobalteAlertDial
89
89
  <div class={overlayPositioner}>
90
90
  <KobalteAlertDialogContent
91
91
  {...blockDismissal}
92
- class={cn(overlaySurface, overlayMotion, 'grid w-full max-w-md gap-4 p-5', local.class)}
92
+ class={cn(dialogSurface, overlayMotion, 'grid w-full max-w-md gap-4 p-5', local.class)}
93
93
  {...rest}
94
94
  />
95
95
  </div>
@@ -133,7 +133,9 @@ export function ComboboxItem(props: ComponentProps<typeof KobalteCombobox.Item>)
133
133
  return (
134
134
  <KobalteCombobox.Item class={cn(menuItem, 'pe-8', local.class)} {...rest}>
135
135
  <KobalteCombobox.ItemLabel>{local.children}</KobalteCombobox.ItemLabel>
136
- <KobalteCombobox.ItemIndicator class="absolute end-2 flex size-4 items-center justify-center">
136
+ {/* The indicator reads in the accent, like every other selected state in
137
+ the system. */}
138
+ <KobalteCombobox.ItemIndicator class="absolute end-2 flex size-4 items-center justify-center text-primary">
137
139
  <Check class="size-4" />
138
140
  </KobalteCombobox.ItemIndicator>
139
141
  </KobalteCombobox.Item>
@@ -109,7 +109,9 @@ export function ContextMenuCheckboxItem(
109
109
  return (
110
110
  <KobalteContextMenu.CheckboxItem class={cn(menuItem, 'pe-8', local.class)} {...rest}>
111
111
  {local.children}
112
- <KobalteContextMenu.ItemIndicator class="absolute end-2 flex size-4 items-center justify-center">
112
+ {/* The indicator reads in the accent, like every other selected state in
113
+ the system. */}
114
+ <KobalteContextMenu.ItemIndicator class="absolute end-2 flex size-4 items-center justify-center text-primary">
113
115
  <Check class="size-4" />
114
116
  </KobalteContextMenu.ItemIndicator>
115
117
  </KobalteContextMenu.CheckboxItem>
@@ -126,7 +128,9 @@ export function ContextMenuRadioItem(props: ComponentProps<typeof KobalteContext
126
128
  return (
127
129
  <KobalteContextMenu.RadioItem class={cn(menuItem, 'pe-8', local.class)} {...rest}>
128
130
  {local.children}
129
- <KobalteContextMenu.ItemIndicator class="absolute end-2 flex size-4 items-center justify-center">
131
+ {/* The indicator reads in the accent, like every other selected state in
132
+ the system. */}
133
+ <KobalteContextMenu.ItemIndicator class="absolute end-2 flex size-4 items-center justify-center text-primary">
130
134
  <Circle class="size-2 fill-current" />
131
135
  </KobalteContextMenu.ItemIndicator>
132
136
  </KobalteContextMenu.RadioItem>
@@ -8,10 +8,10 @@ import { X } from 'lucide-solid'
8
8
  import type { Accessor, ComponentProps, JSX } from 'solid-js'
9
9
  import { createRenderEffect, onCleanup, Show, splitProps } from 'solid-js'
10
10
  import {
11
+ dialogSurface,
11
12
  overlayMotion,
12
13
  overlayPositioner,
13
14
  overlayScrim,
14
- overlaySurface,
15
15
  overlayTitle,
16
16
  } from '../../../lib/overlay'
17
17
  import { cn } from '../../../lib/utils'
@@ -282,7 +282,7 @@ export function DialogContent(props: DialogContentProps) {
282
282
  <div class={cn(overlayPositioner, local.positioner === 'inset' && 'inset-4 grid-rows-1 p-0')}>
283
283
  <KobalteDialogContent
284
284
  class={cn(
285
- overlaySurface,
285
+ dialogSurface,
286
286
  overlayMotion,
287
287
  'relative grid w-full max-w-lg gap-4 p-5',
288
288
  local.class
@@ -69,7 +69,7 @@ export function DrawerContent(props: DrawerContentProps) {
69
69
  <DrawerOverlay />
70
70
  <DrawerPrimitive.Content
71
71
  class={cn(
72
- 'group/drawer bg-popover text-popover-foreground fixed z-(--z-drawer) flex flex-col border-border shadow-lg',
72
+ 'group/drawer bg-background text-foreground fixed z-(--z-drawer) flex flex-col border-border shadow-lg',
73
73
  'data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:max-h-[85vh] data-[side=bottom]:rounded-t-xl data-[side=bottom]:border-t',
74
74
  'data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:max-h-[85vh] data-[side=top]:rounded-b-xl data-[side=top]:border-b',
75
75
  'data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:w-80 data-[side=left]:rounded-e-xl data-[side=left]:border-e',