@nanahoshi/mona-ui 0.45.1 → 0.46.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 (42) hide show
  1. package/THIRD_PARTY_NOTICES.md +34 -0
  2. package/docs/api/index.json +1 -1
  3. package/docs/api/theme.json +1 -1
  4. package/docs/api/theme.md +14 -6
  5. package/docs/installation.md +1 -1
  6. package/docs/manifest.json +1 -1
  7. package/docs/theming-built-in-themes.md +25 -12
  8. package/docs/theming-custom-themes.md +19 -0
  9. package/docs/theming.md +2 -1
  10. package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +6 -6
  11. package/fesm2022/nanahoshi-mona-ui-button-group.mjs +1 -1
  12. package/fesm2022/nanahoshi-mona-ui-calendar.mjs +4 -4
  13. package/fesm2022/nanahoshi-mona-ui-chat.mjs +1 -1
  14. package/fesm2022/nanahoshi-mona-ui-check-box.mjs +6 -6
  15. package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +1 -1
  16. package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +1 -1
  17. package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +5 -5
  18. package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +4 -4
  19. package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +5 -5
  20. package/fesm2022/nanahoshi-mona-ui-date-range-picker.mjs +5 -5
  21. package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +5 -5
  22. package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +4 -4
  23. package/fesm2022/nanahoshi-mona-ui-editor.mjs +3 -3
  24. package/fesm2022/nanahoshi-mona-ui-internal-indicator-icon.mjs +1 -1
  25. package/fesm2022/nanahoshi-mona-ui-masked-text-box.mjs +3 -3
  26. package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +4 -4
  27. package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +4 -4
  28. package/fesm2022/nanahoshi-mona-ui-otp-input.mjs +3 -3
  29. package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +94 -16
  30. package/fesm2022/nanahoshi-mona-ui-radio-button.mjs +6 -6
  31. package/fesm2022/nanahoshi-mona-ui-segmented.mjs +1 -1
  32. package/fesm2022/nanahoshi-mona-ui-slider.mjs +4 -4
  33. package/fesm2022/nanahoshi-mona-ui-switch.mjs +3 -3
  34. package/fesm2022/nanahoshi-mona-ui-text-area.mjs +3 -3
  35. package/fesm2022/nanahoshi-mona-ui-text-box.mjs +6 -6
  36. package/fesm2022/nanahoshi-mona-ui-theme.mjs +295 -51
  37. package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +5 -5
  38. package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +1 -1
  39. package/llms.txt +2 -2
  40. package/package.json +1 -1
  41. package/types/nanahoshi-mona-ui-chat.d.ts +1 -1
  42. package/types/nanahoshi-mona-ui-theme.d.ts +71 -1
@@ -1,8 +1,8 @@
1
1
  # Built-in Themes
2
2
 
3
- > Mona, Luna and Anna side by side, and when to use each one.
3
+ > Mona, Luna, Anna and Rena side by side, and when to use each one.
4
4
 
5
- Mona UI comes with three themes: Mona, Luna and Anna. Each one is complete, from colors and shadows to corner radii, motion and materials, and is tested for WCAG AA contrast.
5
+ Mona UI comes with four themes: Mona, Luna, Anna and Rena. Each one is complete, from colors and shadows to corner radii, motion and materials, and is tested for WCAG AA contrast.
6
6
 
7
7
  The previews below are real components, each drawn in its own theme, whatever theme this site is in. Hover, click and tab through them to see each theme's states.
8
8
 
@@ -42,21 +42,34 @@ Anna Dark has charcoal surfaces, near-black borders and a solid violet for selec
42
42
 
43
43
  Anna Light has soft gray surfaces and off-white controls that darken gently on hover. Selection is a violet tint rather than a solid fill, so secondary text in a selected row stays readable. The deep violet stands out well on the light surface, so it draws slider ranges, switches and the rest as it is.
44
44
 
45
+ ## Rena
46
+
47
+ Rena takes its colors from Tailwind CSS's default palette: cool grays with an indigo primary. Rena Light puts white panels on a very light, cool gray page, and Rena Dark puts slightly lighter panels on a deep blue-gray page. Controls cast a small, crisp shadow, and menus and popups a larger, softer one. Animations are quick, at 150 ms and 200 ms.
48
+
49
+ ```typescript
50
+ provideThemeOptions({ initialTheme: { name: "rena", variant: "system" } });
51
+ ```
52
+
53
+ Where the other themes draw a soft, translucent halo around a focused or invalid control, Rena draws a solid line: the control's border takes the focus color, with a 1 px ring of the same color around it. [Custom Themes](theming-custom-themes.md#focus-rings) shows how a theme of your own can do the same.
54
+
55
+ Selection is an indigo tint in both variants. Main actions keep the same indigo in Rena Dark, under white text, but on its own it would be hard to see against the dark surface. So where a color alone shows a value, as in slider ranges, progress bars, switches, radio buttons, tabs and steps, and where the primary color is text, Rena Dark uses a lighter indigo instead.
56
+
45
57
  ## Compare the Themes
46
58
 
47
- | | Mona | Luna | Anna |
48
- | ------------- | --------------------------------------- | --------------------------------------- | ------------------------------------ |
49
- | Variants | Light, dark | Light, dark | Light, dark |
50
- | Primary color | Near-black in light, near-white in dark | Blue | Deep violet |
51
- | Selection | Gray tint | Blue tint | Violet tint in light, violet in dark |
52
- | Materials | Opaque | Translucent glass, or opaque if reduced | Opaque |
53
- | Shadows | Subtle | Soft and wide | None on controls |
54
- | Motion | 200 ms and 300 ms | 180 ms and 320 ms | 150 ms |
55
- | Corner radii | 4, 6 and 8 px | 4, 6 and 8 px | 4, 6 and 8 px |
59
+ | | Mona | Luna | Anna | Rena |
60
+ | ------------- | --------------------------------------- | --------------------------------------- | ------------------------------------ | ----------------- |
61
+ | Variants | Light, dark | Light, dark | Light, dark | Light, dark |
62
+ | Primary color | Near-black in light, near-white in dark | Blue | Deep violet | Indigo |
63
+ | Selection | Gray tint | Blue tint | Violet tint in light, violet in dark | Indigo tint |
64
+ | Materials | Opaque | Translucent glass, or opaque if reduced | Opaque | Opaque |
65
+ | Shadows | Subtle | Soft and wide | None on controls | Small and crisp |
66
+ | Focus ring | Soft halo | Soft halo | Soft halo | Solid line |
67
+ | Motion | 200 ms and 300 ms | 180 ms and 320 ms | 150 ms | 150 ms and 200 ms |
68
+ | Corner radii | 4, 6 and 8 px | 4, 6 and 8 px | 4, 6 and 8 px | 4, 6 and 8 px |
56
69
 
57
70
  ## Start from a Built-in Theme
58
71
 
59
- The themes are exported, as `monaTheme`, `lunaTheme` and `annaTheme`, and together as `builtInThemes`, so you can read their tokens or build on them:
72
+ The themes are exported, as `monaTheme`, `lunaTheme`, `annaTheme` and `renaTheme`, and together as `builtInThemes`, so you can read their tokens or build on them:
60
73
 
61
74
  ```typescript
62
75
  import { monaTheme } from "@nanahoshi/mona-ui/theme";
@@ -114,6 +114,24 @@ custom: {
114
114
  }
115
115
  ```
116
116
 
117
+ ### Focus Rings
118
+
119
+ A focused control's border takes `--color-focus-indicator`, with a ring of the same color around it. An invalid control does the same in `--color-error`. Two variables shape the ring, and a theme sets them in `custom`:
120
+
121
+ - `--mona-focus-ring-width` is how wide the ring is. It falls back to `2px`.
122
+ - `--mona-focus-ring-opacity` is how strong the ring's color is, as a percentage. It falls back to `35%`, a soft halo.
123
+
124
+ For a solid line, as Rena draws, make the ring narrower and opaque. With the border, it reads as one 2 px line:
125
+
126
+ ```typescript
127
+ custom: {
128
+ "--mona-focus-ring-width": "1px",
129
+ "--mona-focus-ring-opacity": "100%"
130
+ }
131
+ ```
132
+
133
+ The ring and a control's shadow are drawn together, as one `box-shadow`. So for no shadow, write `0 0 #0000`, as Anna does for its flat controls, not `none`: a shadow token set to `none` hides the ring of every control that uses it.
134
+
117
135
  ### Contrast Borders
118
136
 
119
137
  `--color-border-control-contrast` and `--color-border-control-contrast-hover` are the only optional colors. When the user asks for more contrast, the theme service uses them in place of `--color-border-control` and `--color-border-control-hover`, for fields, buttons, chips, chart gridlines and everything else that shares those borders. Give them at least 3:1 against `--color-input-background`. A theme without them keeps its usual borders.
@@ -133,6 +151,7 @@ In development, custom themes and overrides are also checked, and each problem l
133
151
 
134
152
  - A value that isn't a color.
135
153
  - A custom variable whose name doesn't start with `--`.
154
+ - A shadow set to `none`, which hides the [focus ring](#focus-rings). Use `0 0 #0000` for no shadow.
136
155
  - A pair below the contrast WCAG AA asks for:
137
156
  - 4.5:1 for `--color-foreground` and `--color-muted-foreground` on `--color-surface`, `--color-input-foreground` on `--color-input-background`, and `--color-primary-foreground` on `--color-primary`.
138
157
  - 3:1 for `--color-focus-indicator` and `--color-selected-border` on `--color-surface`, and for the contrast borders on `--color-input-background`, when the theme sets them.
package/docs/theming.md CHANGED
@@ -30,6 +30,7 @@ Most themes have a light and a dark variant. The theme and the variant together,
30
30
  | Mona | Light, dark | Neutral grays, with color kept for status. The default. |
31
31
  | Luna | Light, dark | Clean surfaces with a blue primary, and translucent glass on controls and overlays. |
32
32
  | Anna | Light, dark | Graphite grays with a deep violet primary, and flat controls a shade lighter. |
33
+ | Rena | Light, dark | Tailwind CSS's cool grays and indigo, with crisp shadows and a solid focus ring. |
33
34
 
34
35
  [Built-in Themes](theming-built-in-themes.md) shows each one side by side, with real components.
35
36
 
@@ -315,5 +316,5 @@ Provided in root. It's created by any theme provider at startup, or by the first
315
316
  - **Selections:** `ThemeName`, `ThemeVariant`, `ThemeVariantPreference`, `ThemePreference`, `ThemeSelection`, `ThemeAvailability`.
316
317
  - **Definitions:** `ThemeProfile`, `ThemeFamilyRegistration`, `ThemeOverrideRegistration`, `ThemeOptions`, `ThemeColorPaletteRegistration`, `ThemeColorPaletteSeeds`.
317
318
  - **Extending:** `ThemeStrategy`, `ThemeStorage`, `DefaultThemeStrategy`, `LocalStorageThemeStorage`.
318
- - **Built-in themes:** `monaTheme`, `lunaTheme`, `annaTheme`, `builtInThemes`.
319
+ - **Built-in themes:** `monaTheme`, `lunaTheme`, `annaTheme`, `renaTheme`, `builtInThemes`.
319
320
  - **Helpers:** `generateThemeColorPalette`, `flattenThemeProfile`, `createSidebarColorRoles`.
@@ -20,7 +20,7 @@ const autoCompleteBaseThemeVariants = cva(`
20
20
  border border-input-border shadow-(--shadow-control) outline-none focus-visible:outline-hidden
21
21
  transition-[color,box-shadow,border] duration-(--mona-motion-standard) ease-in-out
22
22
  data-[readonly='true']:cursor-default
23
- focus-within:border-focus-indicator focus-within:ring-2 focus-within:ring-focus-indicator/35
23
+ focus-within:border-focus-indicator focus-within:ring-(length:--mona-focus-ring-width,2px) focus-within:ring-focus-indicator/(--mona-focus-ring-opacity,35%)
24
24
  `, {
25
25
  variants: {
26
26
  disabled: { true: `
@@ -28,10 +28,10 @@ const autoCompleteBaseThemeVariants = cva(`
28
28
  bg-disabled-background text-disabled-foreground
29
29
  border-disabled-border shadow-none
30
30
  ` },
31
- expanded: { true: "border-focus-indicator ring-2 ring-focus-indicator/35" },
32
- focused: { true: "border-focus-indicator ring-2 ring-focus-indicator/35" },
31
+ expanded: { true: "border-focus-indicator ring-(length:--mona-focus-ring-width,2px) ring-focus-indicator/(--mona-focus-ring-opacity,35%)" },
32
+ focused: { true: "border-focus-indicator ring-(length:--mona-focus-ring-width,2px) ring-focus-indicator/(--mona-focus-ring-opacity,35%)" },
33
33
  invalid: {
34
- true: "border-error ring-2 ring-error/35 focus-within:border-error focus-within:ring-error/35",
34
+ true: "border-error ring-(length:--mona-focus-ring-width,2px) ring-error/(--mona-focus-ring-opacity,35%) focus-within:border-error focus-within:ring-error/(--mona-focus-ring-opacity,35%)",
35
35
  false: ""
36
36
  },
37
37
  rounded: {
@@ -50,11 +50,11 @@ const autoCompleteBaseThemeVariants = cva(`
50
50
  compoundVariants: [{
51
51
  expanded: true,
52
52
  invalid: true,
53
- class: "border-error ring-error/35"
53
+ class: "border-error ring-error/(--mona-focus-ring-opacity,35%)"
54
54
  }, {
55
55
  focused: true,
56
56
  invalid: true,
57
- class: "border-error ring-error/35"
57
+ class: "border-error ring-error/(--mona-focus-ring-opacity,35%)"
58
58
  }],
59
59
  defaultVariants: {
60
60
  disabled: false,
@@ -12,7 +12,7 @@ const buttonGroupThemeVariants = cva(`
12
12
  inline-flex items-center justify-center
13
13
  border border-input-border
14
14
  data-[invalid='true']:border-error
15
- data-[invalid='true']:ring-2 data-[invalid='true']:ring-error/35
15
+ data-[invalid='true']:ring-(length:--mona-focus-ring-width,2px) data-[invalid='true']:ring-error/(--mona-focus-ring-opacity,35%)
16
16
  data-[readonly='true']:[&_button[aria-pressed]]:cursor-default
17
17
  [&>button]:border-0
18
18
  [&>button]:shadow-none
@@ -144,7 +144,7 @@ const calendarBaseThemeVariants = cva(`
144
144
  bg-(--mona-calendar-background) ${themeRaisedBackdropClasses} text-foreground
145
145
  border border-border shadow-(--mona-calendar-shadow)
146
146
  data-[invalid='true']:border-error
147
- data-[invalid='true']:ring-2 data-[invalid='true']:ring-error/35
147
+ data-[invalid='true']:ring-(length:--mona-focus-ring-width,2px) data-[invalid='true']:ring-error/(--mona-focus-ring-opacity,35%)
148
148
  `, { variants: {
149
149
  disabled: { true: "pointer-events-none cursor-not-allowed opacity-50" },
150
150
  readonly: { true: "pointer-events-none" },
@@ -171,7 +171,7 @@ const calendarMonthViewDayThemeVariants = cva(`
171
171
  `, {
172
172
  variants: {
173
173
  disabled: { true: "pointer-events-none cursor-not-allowed text-disabled-foreground" },
174
- focused: { true: "bg-hover outline-none focus-visible:outline-hidden ring-2 ring-inset ring-focus-indicator/35" },
174
+ focused: { true: "bg-hover outline-none focus-visible:outline-hidden ring-(length:--mona-focus-ring-width,2px) ring-inset ring-focus-indicator/(--mona-focus-ring-opacity,35%)" },
175
175
  outside: { true: "text-muted-foreground" },
176
176
  rangeMiddle: { true: `
177
177
  bg-(--color-selected) text-(--color-selected-foreground)
@@ -220,7 +220,7 @@ const calendarYearViewCellThemeVariants = cva(`
220
220
  cursor-pointer py-2
221
221
  hover:bg-hover active:bg-active
222
222
  `, { variants: {
223
- focused: { true: "bg-hover outline-none focus-visible:outline-hidden ring-2 ring-inset ring-focus-indicator/35" },
223
+ focused: { true: "bg-hover outline-none focus-visible:outline-hidden ring-(length:--mona-focus-ring-width,2px) ring-inset ring-focus-indicator/(--mona-focus-ring-opacity,35%)" },
224
224
  rounded: {
225
225
  none: "rounded-none",
226
226
  small: "rounded-sm",
@@ -238,7 +238,7 @@ const calendarDecadeViewCellThemeVariants = cva(`
238
238
  cursor-pointer py-2
239
239
  hover:bg-hover active:bg-active
240
240
  `, { variants: {
241
- focused: { true: "bg-hover outline-none focus-visible:outline-hidden ring-2 ring-inset ring-focus-indicator/35" },
241
+ focused: { true: "bg-hover outline-none focus-visible:outline-hidden ring-(length:--mona-focus-ring-width,2px) ring-inset ring-focus-indicator/(--mona-focus-ring-opacity,35%)" },
242
242
  rounded: {
243
243
  none: "rounded-none",
244
244
  small: "rounded-sm",
@@ -225,7 +225,7 @@ const CHAT_FIELD_CLASSES = `
225
225
  ${themeControlSurfaceClasses}
226
226
  border border-input-border shadow-(--shadow-control)
227
227
  transition-[color,box-shadow,border] duration-(--mona-motion-standard) ease-in-out
228
- focus-within:border-focus-indicator focus-within:ring-2 focus-within:ring-focus-indicator/35
228
+ focus-within:border-focus-indicator focus-within:ring-(length:--mona-focus-ring-width,2px) focus-within:ring-focus-indicator/(--mona-focus-ring-opacity,35%)
229
229
  data-[disabled]:cursor-not-allowed data-[disabled]:border-disabled-border data-[disabled]:bg-disabled-background
230
230
  data-[disabled]:shadow-none
231
231
  `;
@@ -20,13 +20,13 @@ const checkmarkThemeVariants = cva(`
20
20
  peer-indeterminate:border-(--color-selected-border) peer-indeterminate:bg-primary peer-indeterminate:text-primary-foreground
21
21
 
22
22
  peer-focus-visible:border-focus-indicator
23
- peer-focus-visible:ring-2 peer-focus-visible:ring-focus-indicator/35
23
+ peer-focus-visible:ring-(length:--mona-focus-ring-width,2px) peer-focus-visible:ring-focus-indicator/(--mona-focus-ring-opacity,35%)
24
24
  peer-focus-visible:outline-hidden
25
25
 
26
26
  data-[invalid='true']:border-error
27
- data-[invalid='true']:ring-2 data-[invalid='true']:ring-error/35
27
+ data-[invalid='true']:ring-(length:--mona-focus-ring-width,2px) data-[invalid='true']:ring-error/(--mona-focus-ring-opacity,35%)
28
28
  data-[invalid='true']:peer-focus-visible:border-error
29
- data-[invalid='true']:peer-focus-visible:ring-error/35
29
+ data-[invalid='true']:peer-focus-visible:ring-error/(--mona-focus-ring-opacity,35%)
30
30
 
31
31
  peer-indeterminate:after:absolute
32
32
  peer-indeterminate:after:inset-0
@@ -72,7 +72,7 @@ const checkboxDirectiveThemeVariants = cva(`
72
72
  indeterminate:border-(--color-selected-border) indeterminate:bg-primary indeterminate:text-primary-foreground
73
73
 
74
74
  focus-visible:border-focus-indicator
75
- focus-visible:ring-2 focus-visible:ring-focus-indicator/35
75
+ focus-visible:ring-(length:--mona-focus-ring-width,2px) focus-visible:ring-focus-indicator/(--mona-focus-ring-opacity,35%)
76
76
 
77
77
  checked:after:absolute
78
78
  checked:after:inset-[1px_0_0_1px]
@@ -93,9 +93,9 @@ const checkboxDirectiveThemeVariants = cva(`
93
93
  indeterminate:after:[mask-size:contain]
94
94
 
95
95
  data-[invalid='true']:border-error
96
- data-[invalid='true']:ring-2 data-[invalid='true']:ring-error/35
96
+ data-[invalid='true']:ring-(length:--mona-focus-ring-width,2px) data-[invalid='true']:ring-error/(--mona-focus-ring-opacity,35%)
97
97
  data-[invalid='true']:focus-visible:border-error
98
- data-[invalid='true']:focus-visible:ring-error/35
98
+ data-[invalid='true']:focus-visible:ring-error/(--mona-focus-ring-opacity,35%)
99
99
  `, { variants: { rounded: {
100
100
  full: "rounded-full",
101
101
  large: "rounded-lg",
@@ -54,7 +54,7 @@ const colorGradientBaseThemeVariants = cva(`
54
54
  data-[invalid='true']:border
55
55
  data-[invalid='true']:border-error
56
56
  data-[invalid='true']:ring-1
57
- data-[invalid='true']:ring-error/35
57
+ data-[invalid='true']:ring-error/(--mona-focus-ring-opacity,35%)
58
58
  `);
59
59
  const colorGradientHsvRectangleThemeVariants = cva(`
60
60
  relative h-40 w-full
@@ -17,7 +17,7 @@ const colorPaletteBaseThemeVariants = cva(`
17
17
  data-[invalid='true']:border
18
18
  data-[invalid='true']:border-error
19
19
  data-[invalid='true']:ring-1
20
- data-[invalid='true']:ring-error/35
20
+ data-[invalid='true']:ring-error/(--mona-focus-ring-opacity,35%)
21
21
  `);
22
22
  const colorPaletteItemThemeVariants = cva(`
23
23
  cursor-pointer
@@ -74,16 +74,16 @@ const colorPickerBaseThemeVariants = cva(`
74
74
  hover:bg-hover active:bg-active
75
75
 
76
76
  focus-within:border-focus-indicator
77
- focus-within:ring-2 focus-within:ring-focus-indicator/35
77
+ focus-within:ring-(length:--mona-focus-ring-width,2px) focus-within:ring-focus-indicator/(--mona-focus-ring-opacity,35%)
78
78
 
79
79
  data-[invalid='true']:border-error
80
- data-[invalid='true']:ring-2 data-[invalid='true']:ring-error/35
80
+ data-[invalid='true']:ring-(length:--mona-focus-ring-width,2px) data-[invalid='true']:ring-error/(--mona-focus-ring-opacity,35%)
81
81
  data-[invalid='true']:focus-within:border-error
82
- data-[invalid='true']:focus-within:ring-error/35
82
+ data-[invalid='true']:focus-within:ring-error/(--mona-focus-ring-opacity,35%)
83
83
  `, {
84
84
  variants: {
85
85
  expanded: {
86
- true: "border-focus-indicator ring-2 ring-focus-indicator/35",
86
+ true: "border-focus-indicator ring-(length:--mona-focus-ring-width,2px) ring-focus-indicator/(--mona-focus-ring-opacity,35%)",
87
87
  false: ""
88
88
  },
89
89
  rounded: {
@@ -101,7 +101,7 @@ const colorPickerBaseThemeVariants = cva(`
101
101
  },
102
102
  compoundVariants: [{
103
103
  expanded: true,
104
- class: "data-[invalid='true']:border-error data-[invalid='true']:ring-error/35"
104
+ class: "data-[invalid='true']:border-error data-[invalid='true']:ring-error/(--mona-focus-ring-opacity,35%)"
105
105
  }]
106
106
  });
107
107
  const colorPickerColorThemeVariants = cva(`
@@ -21,7 +21,7 @@ const comboBoxBaseThemeVariants = cva(`
21
21
  border border-input-border shadow-(--shadow-control) outline-none focus-visible:outline-hidden
22
22
  transition-[color,box-shadow,border] duration-(--mona-motion-standard) ease-in-out
23
23
  data-[readonly='true']:cursor-default
24
- focus-within:border-focus-indicator focus-within:ring-2 focus-within:ring-focus-indicator/35
24
+ focus-within:border-focus-indicator focus-within:ring-(length:--mona-focus-ring-width,2px) focus-within:ring-focus-indicator/(--mona-focus-ring-opacity,35%)
25
25
  `, {
26
26
  variants: {
27
27
  disabled: { true: `
@@ -29,9 +29,9 @@ const comboBoxBaseThemeVariants = cva(`
29
29
  bg-disabled-background text-disabled-foreground
30
30
  border-disabled-border shadow-none
31
31
  ` },
32
- focused: { true: "border-focus-indicator ring-2 ring-focus-indicator/35" },
32
+ focused: { true: "border-focus-indicator ring-(length:--mona-focus-ring-width,2px) ring-focus-indicator/(--mona-focus-ring-opacity,35%)" },
33
33
  invalid: {
34
- true: "border-error ring-2 ring-error/35 focus-within:border-error focus-within:ring-error/35",
34
+ true: "border-error ring-(length:--mona-focus-ring-width,2px) ring-error/(--mona-focus-ring-opacity,35%) focus-within:border-error focus-within:ring-error/(--mona-focus-ring-opacity,35%)",
35
35
  false: ""
36
36
  },
37
37
  rounded: {
@@ -50,7 +50,7 @@ const comboBoxBaseThemeVariants = cva(`
50
50
  compoundVariants: [{
51
51
  focused: true,
52
52
  invalid: true,
53
- class: "border-error ring-error/35"
53
+ class: "border-error ring-error/(--mona-focus-ring-opacity,35%)"
54
54
  }],
55
55
  defaultVariants: {
56
56
  disabled: false,
@@ -33,12 +33,12 @@ const datePickerBaseThemeVariants = cva(`
33
33
  data-[readonly='true']:cursor-default
34
34
 
35
35
  focus-within:border-focus-indicator
36
- focus-within:ring-2 focus-within:ring-focus-indicator/35
36
+ focus-within:ring-(length:--mona-focus-ring-width,2px) focus-within:ring-focus-indicator/(--mona-focus-ring-opacity,35%)
37
37
 
38
38
  data-[invalid='true']:border-error
39
- data-[invalid='true']:ring-2 data-[invalid='true']:ring-error/35
39
+ data-[invalid='true']:ring-(length:--mona-focus-ring-width,2px) data-[invalid='true']:ring-error/(--mona-focus-ring-opacity,35%)
40
40
  data-[invalid='true']:focus-within:border-error
41
- data-[invalid='true']:focus-within:ring-error/35
41
+ data-[invalid='true']:focus-within:ring-error/(--mona-focus-ring-opacity,35%)
42
42
 
43
43
  [&_mona-text-box]:h-full
44
44
  [&_mona-text-box]:border-none
@@ -48,7 +48,7 @@ const datePickerBaseThemeVariants = cva(`
48
48
  `, {
49
49
  variants: {
50
50
  focused: {
51
- true: "border-focus-indicator ring-2 ring-focus-indicator/35",
51
+ true: "border-focus-indicator ring-(length:--mona-focus-ring-width,2px) ring-focus-indicator/(--mona-focus-ring-opacity,35%)",
52
52
  false: ""
53
53
  },
54
54
  rounded: {
@@ -66,7 +66,7 @@ const datePickerBaseThemeVariants = cva(`
66
66
  },
67
67
  compoundVariants: [{
68
68
  focused: true,
69
- class: "data-[invalid='true']:border-error data-[invalid='true']:ring-error/35"
69
+ class: "data-[invalid='true']:border-error data-[invalid='true']:ring-error/(--mona-focus-ring-opacity,35%)"
70
70
  }]
71
71
  });
72
72
  var DatePickerComponent = class DatePickerComponent {
@@ -57,12 +57,12 @@ const dateRangePickerBaseThemeVariants = cva(`
57
57
  data-[readonly='true']:cursor-default
58
58
 
59
59
  focus-within:border-focus-indicator
60
- focus-within:ring-2 focus-within:ring-focus-indicator/35
60
+ focus-within:ring-(length:--mona-focus-ring-width,2px) focus-within:ring-focus-indicator/(--mona-focus-ring-opacity,35%)
61
61
 
62
62
  data-[invalid='true']:border-error
63
- data-[invalid='true']:ring-2 data-[invalid='true']:ring-error/35
63
+ data-[invalid='true']:ring-(length:--mona-focus-ring-width,2px) data-[invalid='true']:ring-error/(--mona-focus-ring-opacity,35%)
64
64
  data-[invalid='true']:focus-within:border-error
65
- data-[invalid='true']:focus-within:ring-error/35
65
+ data-[invalid='true']:focus-within:ring-error/(--mona-focus-ring-opacity,35%)
66
66
 
67
67
  [&_mona-text-box]:h-full
68
68
  [&_mona-text-box]:min-w-0
@@ -74,7 +74,7 @@ const dateRangePickerBaseThemeVariants = cva(`
74
74
  `, {
75
75
  variants: {
76
76
  focused: {
77
- true: "border-focus-indicator ring-2 ring-focus-indicator/35",
77
+ true: "border-focus-indicator ring-(length:--mona-focus-ring-width,2px) ring-focus-indicator/(--mona-focus-ring-opacity,35%)",
78
78
  false: ""
79
79
  },
80
80
  rounded: {
@@ -92,7 +92,7 @@ const dateRangePickerBaseThemeVariants = cva(`
92
92
  },
93
93
  compoundVariants: [{
94
94
  focused: true,
95
- class: "data-[invalid='true']:border-error data-[invalid='true']:ring-error/35"
95
+ class: "data-[invalid='true']:border-error data-[invalid='true']:ring-error/(--mona-focus-ring-opacity,35%)"
96
96
  }]
97
97
  });
98
98
  const dateRangePickerPopupThemeVariants = cva(`flex max-w-[calc(100dvw-1rem)] max-sm:flex-col`);
@@ -42,12 +42,12 @@ const dateTimePickerBaseThemeVariants = cva(`
42
42
  data-[readonly='true']:cursor-default
43
43
 
44
44
  focus-within:border-focus-indicator
45
- focus-within:ring-2 focus-within:ring-focus-indicator/35
45
+ focus-within:ring-(length:--mona-focus-ring-width,2px) focus-within:ring-focus-indicator/(--mona-focus-ring-opacity,35%)
46
46
 
47
47
  data-[invalid='true']:border-error
48
- data-[invalid='true']:ring-2 data-[invalid='true']:ring-error/35
48
+ data-[invalid='true']:ring-(length:--mona-focus-ring-width,2px) data-[invalid='true']:ring-error/(--mona-focus-ring-opacity,35%)
49
49
  data-[invalid='true']:focus-within:border-error
50
- data-[invalid='true']:focus-within:ring-error/35
50
+ data-[invalid='true']:focus-within:ring-error/(--mona-focus-ring-opacity,35%)
51
51
 
52
52
  [&_mona-text-box]:h-full
53
53
  [&_mona-text-box]:border-none
@@ -57,7 +57,7 @@ const dateTimePickerBaseThemeVariants = cva(`
57
57
  `, {
58
58
  variants: {
59
59
  focused: {
60
- true: "border-focus-indicator ring-2 ring-focus-indicator/35",
60
+ true: "border-focus-indicator ring-(length:--mona-focus-ring-width,2px) ring-focus-indicator/(--mona-focus-ring-opacity,35%)",
61
61
  false: ""
62
62
  },
63
63
  rounded: {
@@ -75,7 +75,7 @@ const dateTimePickerBaseThemeVariants = cva(`
75
75
  },
76
76
  compoundVariants: [{
77
77
  focused: true,
78
- class: "data-[invalid='true']:border-error data-[invalid='true']:ring-error/35"
78
+ class: "data-[invalid='true']:border-error data-[invalid='true']:ring-error/(--mona-focus-ring-opacity,35%)"
79
79
  }]
80
80
  });
81
81
  const dateTimePickerHeaderThemeVariants = cva(`
@@ -53,7 +53,7 @@ const dropdownListInputThemeVariants = cva(`
53
53
  transition-[color,box-shadow,border] duration-(--mona-motion-standard) ease-in-out
54
54
  data-[readonly='true']:cursor-default
55
55
  hover:bg-hover active:bg-active
56
- focus-within:border-focus-indicator focus-within:ring-2 focus-within:ring-focus-indicator/35
56
+ focus-within:border-focus-indicator focus-within:ring-(length:--mona-focus-ring-width,2px) focus-within:ring-focus-indicator/(--mona-focus-ring-opacity,35%)
57
57
  `, {
58
58
  variants: {
59
59
  disabled: {
@@ -65,12 +65,12 @@ const dropdownListInputThemeVariants = cva(`
65
65
  false: ""
66
66
  },
67
67
  expanded: {
68
- true: "border-focus-indicator ring-2 ring-focus-indicator/35",
68
+ true: "border-focus-indicator ring-(length:--mona-focus-ring-width,2px) ring-focus-indicator/(--mona-focus-ring-opacity,35%)",
69
69
  false: ""
70
70
  },
71
71
  hasPrefix: { false: "ps-2" },
72
72
  invalid: {
73
- true: "border-error ring-2 ring-error/35 focus-within:border-error focus-within:ring-error/35",
73
+ true: "border-error ring-(length:--mona-focus-ring-width,2px) ring-error/(--mona-focus-ring-opacity,35%) focus-within:border-error focus-within:ring-error/(--mona-focus-ring-opacity,35%)",
74
74
  false: ""
75
75
  },
76
76
  rounded: {
@@ -89,7 +89,7 @@ const dropdownListInputThemeVariants = cva(`
89
89
  compoundVariants: [{
90
90
  expanded: true,
91
91
  invalid: true,
92
- class: "border-error ring-error/35"
92
+ class: "border-error ring-error/(--mona-focus-ring-opacity,35%)"
93
93
  }]
94
94
  });
95
95
  const dropdownListValueContainerThemeVariants = cva(`flex h-full w-full items-center overflow-hidden`, { variants: { hasTemplate: { false: "[&>span]:truncate [&>span]:items-center [&>span]:inline-block" } } });
@@ -251,15 +251,15 @@ const editorBaseThemeVariants = cva(`
251
251
  border border-border
252
252
  transition-[border-color,box-shadow] duration-150 ease-in
253
253
  focus-within:border-focus-indicator
254
- focus-within:ring-2 focus-within:ring-focus-indicator/35
254
+ focus-within:ring-(length:--mona-focus-ring-width,2px) focus-within:ring-focus-indicator/(--mona-focus-ring-opacity,35%)
255
255
 
256
256
  data-[disabled='true']:cursor-not-allowed
257
257
  data-[disabled='true']:border-disabled-border
258
258
  data-[disabled='true']:text-disabled-foreground
259
259
  data-[invalid='true']:border-error
260
- data-[invalid='true']:ring-2 data-[invalid='true']:ring-error/35
260
+ data-[invalid='true']:ring-(length:--mona-focus-ring-width,2px) data-[invalid='true']:ring-error/(--mona-focus-ring-opacity,35%)
261
261
  data-[invalid='true']:focus-within:border-error
262
- data-[invalid='true']:focus-within:ring-error/35
262
+ data-[invalid='true']:focus-within:ring-error/(--mona-focus-ring-opacity,35%)
263
263
 
264
264
  prose prose-neutral max-w-none
265
265
  prose-headings:text-foreground prose-headings:font-bold
@@ -9,7 +9,7 @@ const indicatorIconHostThemeVariants = cva(`h-full aspect-square flex-none inlin
9
9
  true: `
10
10
  text-muted-foreground
11
11
  hover:text-foreground
12
- focus-visible:ring-2 focus-visible:ring-focus-indicator/35 focus-visible:outline-hidden
12
+ focus-visible:ring-(length:--mona-focus-ring-width,2px) focus-visible:ring-focus-indicator/(--mona-focus-ring-opacity,35%) focus-visible:outline-hidden
13
13
  `,
14
14
  false: ""
15
15
  },
@@ -98,12 +98,12 @@ const maskedTextBoxThemeVariants = cva(`
98
98
  data-[readonly='true']:cursor-default
99
99
 
100
100
  focus-within:border-focus-indicator
101
- focus-within:ring-2 focus-within:ring-focus-indicator/35
101
+ focus-within:ring-(length:--mona-focus-ring-width,2px) focus-within:ring-focus-indicator/(--mona-focus-ring-opacity,35%)
102
102
 
103
103
  data-[invalid='true']:border-error
104
- data-[invalid='true']:ring-2 data-[invalid='true']:ring-error/35
104
+ data-[invalid='true']:ring-(length:--mona-focus-ring-width,2px) data-[invalid='true']:ring-error/(--mona-focus-ring-opacity,35%)
105
105
  data-[invalid='true']:focus-within:border-error
106
- data-[invalid='true']:focus-within:ring-error/35
106
+ data-[invalid='true']:focus-within:ring-error/(--mona-focus-ring-opacity,35%)
107
107
  `, { variants: {
108
108
  rounded: {
109
109
  full: "rounded-full",
@@ -92,7 +92,7 @@ const multiSelectBaseThemeVariants = cva(`
92
92
  border border-input-border shadow-(--shadow-control) outline-none focus-visible:outline-hidden
93
93
  transition-[color,box-shadow,border] duration-(--mona-motion-standard) ease-in-out
94
94
  data-[readonly='true']:cursor-default
95
- focus-within:border-focus-indicator focus-within:ring-2 focus-within:ring-focus-indicator/35
95
+ focus-within:border-focus-indicator focus-within:ring-(length:--mona-focus-ring-width,2px) focus-within:ring-focus-indicator/(--mona-focus-ring-opacity,35%)
96
96
  `, {
97
97
  variants: {
98
98
  disabled: { true: `
@@ -100,9 +100,9 @@ const multiSelectBaseThemeVariants = cva(`
100
100
  bg-disabled-background text-disabled-foreground
101
101
  border-disabled-border shadow-none
102
102
  ` },
103
- focused: { true: "border-focus-indicator ring-2 ring-focus-indicator/35" },
103
+ focused: { true: "border-focus-indicator ring-(length:--mona-focus-ring-width,2px) ring-focus-indicator/(--mona-focus-ring-opacity,35%)" },
104
104
  invalid: {
105
- true: "border-error ring-2 ring-error/35 focus-within:border-error focus-within:ring-error/35",
105
+ true: "border-error ring-(length:--mona-focus-ring-width,2px) ring-error/(--mona-focus-ring-opacity,35%) focus-within:border-error focus-within:ring-error/(--mona-focus-ring-opacity,35%)",
106
106
  false: ""
107
107
  },
108
108
  rounded: {
@@ -121,7 +121,7 @@ const multiSelectBaseThemeVariants = cva(`
121
121
  compoundVariants: [{
122
122
  focused: true,
123
123
  invalid: true,
124
- class: "border-error ring-error/35"
124
+ class: "border-error ring-error/(--mona-focus-ring-opacity,35%)"
125
125
  }]
126
126
  });
127
127
  const multiSelectItemContainerThemeVariants = cva(`
@@ -105,7 +105,7 @@ const numericTextboxThemeVariants = cva(`
105
105
  border border-input-border shadow-(--shadow-control)
106
106
  outline-none focus-visible:outline-hidden
107
107
  selection:bg-primary selection:text-primary-foreground
108
- transition-[color,box-shadow,border] duration-300 ease-in-out
108
+ transition-[color,box-shadow,border] duration-(--mona-motion-standard) ease-in-out
109
109
 
110
110
  data-[disabled='true']:pointer-events-none
111
111
  data-[disabled='true']:cursor-not-allowed
@@ -116,12 +116,12 @@ const numericTextboxThemeVariants = cva(`
116
116
  data-[readonly='true']:cursor-default
117
117
 
118
118
  focus-within:border-focus-indicator
119
- focus-within:ring-2 focus-within:ring-focus-indicator/35
119
+ focus-within:ring-(length:--mona-focus-ring-width,2px) focus-within:ring-focus-indicator/(--mona-focus-ring-opacity,35%)
120
120
 
121
121
  data-[invalid='true']:border-error
122
- data-[invalid='true']:ring-2 data-[invalid='true']:ring-error/35
122
+ data-[invalid='true']:ring-(length:--mona-focus-ring-width,2px) data-[invalid='true']:ring-error/(--mona-focus-ring-opacity,35%)
123
123
  data-[invalid='true']:focus-within:border-error
124
- data-[invalid='true']:focus-within:ring-error/35
124
+ data-[invalid='true']:focus-within:ring-error/(--mona-focus-ring-opacity,35%)
125
125
  `, { variants: {
126
126
  rounded: {
127
127
  full: "rounded-full",
@@ -72,7 +72,7 @@ const otpInputSlotThemeVariants = cva(`
72
72
  data-[readonly='true']:cursor-default
73
73
 
74
74
  data-[active='true']:border-focus-indicator
75
- data-[active='true']:ring-2 data-[active='true']:ring-focus-indicator/35
75
+ data-[active='true']:ring-(length:--mona-focus-ring-width,2px) data-[active='true']:ring-focus-indicator/(--mona-focus-ring-opacity,35%)
76
76
  data-[active='true']:z-10
77
77
 
78
78
  data-[selected='true']:bg-primary/10
@@ -81,8 +81,8 @@ const otpInputSlotThemeVariants = cva(`
81
81
 
82
82
  data-[invalid='true']:border-error
83
83
  data-[invalid='true']:data-[active='true']:border-error
84
- data-[invalid='true']:data-[active='true']:ring-2
85
- data-[invalid='true']:data-[active='true']:ring-error/35
84
+ data-[invalid='true']:data-[active='true']:ring-(length:--mona-focus-ring-width,2px)
85
+ data-[invalid='true']:data-[active='true']:ring-error/(--mona-focus-ring-opacity,35%)
86
86
  `, {
87
87
  variants: {
88
88
  rounded: {