impact-nova 2.1.0-alpha.7 → 2.1.0-alpha.8

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 (106) hide show
  1. package/dist/components/data/ag-grid-react/ag-grid.types.d.ts +6 -0
  2. package/dist/components/data/ag-grid-react/build-ag-grid-theme.d.ts +3 -0
  3. package/dist/components/data/ag-grid-react/cell-renderers/editors/input-cell-editor.js +58 -58
  4. package/dist/components/data/ag-grid-react/column-indicator-sync-bus.d.ts +9 -0
  5. package/dist/components/data/ag-grid-react/column-indicator-sync-bus.js +15 -0
  6. package/dist/components/data/ag-grid-react/headers/column-menu/column-settings-menu.js +78 -73
  7. package/dist/components/data/ag-grid-react/headers/custom-header.js +3 -1
  8. package/dist/components/data/ag-grid-react/headers/header-search-input.js +87 -91
  9. package/dist/components/data/ag-grid-react/index.d.ts +1 -1
  10. package/dist/components/data/ag-grid-react/index.js +109 -100
  11. package/dist/components/data/ag-grid-react/notify-column-indicator-sync.d.ts +3 -2
  12. package/dist/components/data/ag-grid-react/notify-column-indicator-sync.js +4 -3
  13. package/dist/components/data/ag-grid-react/sync-ag-grid-theme-mode.d.ts +3 -0
  14. package/dist/components/data/ag-grid-react/sync-ag-grid-theme-mode.js +10 -0
  15. package/dist/components/data/ag-grid-react/theme.d.ts +1 -0
  16. package/dist/components/data/ag-grid-react/theme.js +93 -21
  17. package/dist/components/data/data-table/column-indicator.d.ts +1 -1
  18. package/dist/components/data/data-table/column-indicator.js +15 -11
  19. package/dist/components/data/data-table/data-table-column-def-pin.d.ts +9 -4
  20. package/dist/components/data/data-table/data-table-column-def-pin.js +38 -38
  21. package/dist/components/data/data-table/data-table-saved-views.js +37 -37
  22. package/dist/components/data/data-table/data-table.js +78 -73
  23. package/dist/components/data/data-table/data-table.types.d.ts +7 -1
  24. package/dist/components/data/data-table/indicator-legend.d.ts +13 -2
  25. package/dist/components/data/data-table/indicator-legend.js +20 -17
  26. package/dist/components/data/data-table/pin-switch.js +9 -9
  27. package/dist/components/data/data-table/use-data-table-column-list-sync.js +92 -89
  28. package/dist/components/data/nested-list/nested-list-change-detection.d.ts +11 -0
  29. package/dist/components/data/nested-list/nested-list-change-detection.js +13 -0
  30. package/dist/components/data/nested-list/nested-list.js +107 -97
  31. package/dist/components/data-display/calendar/calendar.d.ts +1 -1
  32. package/dist/components/data-display/calendar/calendar.js +194 -189
  33. package/dist/components/data-display/chart/chart-palette.d.ts +16 -0
  34. package/dist/components/data-display/chart/chart-palette.js +28 -0
  35. package/dist/components/data-display/chart/chart.js +121 -115
  36. package/dist/components/data-display/chart/chart.utils.js +9 -6
  37. package/dist/components/data-display/chart/index.d.ts +1 -0
  38. package/dist/components/data-display/chart/index.js +15 -9
  39. package/dist/components/data-display/chart/resolve-highcharts-options.d.ts +3 -0
  40. package/dist/components/data-display/chart/resolve-highcharts-options.js +35 -0
  41. package/dist/components/data-display/statistics-card/statistics-card.color.d.ts +6 -0
  42. package/dist/components/data-display/statistics-card/statistics-card.color.js +19 -0
  43. package/dist/components/data-display/statistics-card/statistics-card.hooks.js +50 -48
  44. package/dist/components/data-display/statistics-card/statistics-card.js +127 -146
  45. package/dist/components/feedback/alert-dialog/alert-dialog.js +15 -15
  46. package/dist/components/feedback/dialog/dialog.js +3 -3
  47. package/dist/components/feedback/drawer/drawer.js +32 -32
  48. package/dist/components/feedback/sheet/sheet.js +8 -8
  49. package/dist/components/feedback/sheet/sheet.variants.js +1 -1
  50. package/dist/components/feedback/toast/toast.js +83 -92
  51. package/dist/components/flows/command-palette/command-palette-context.types.d.ts +5 -0
  52. package/dist/components/flows/command-palette/command-palette.d.ts +4 -16
  53. package/dist/components/flows/command-palette/command-palette.js +245 -258
  54. package/dist/components/flows/command-palette/command-palette.types.d.ts +9 -0
  55. package/dist/components/flows/command-palette/shortcut-overlay.js +6 -6
  56. package/dist/components/flows/filter-panel/filter-panel.d.ts +3 -2
  57. package/dist/components/flows/filter-panel/filter-panel.js +99 -104
  58. package/dist/components/flows/filter-strip/filter-summary.js +41 -41
  59. package/dist/components/flows/filter-strip/filter-tag-list.js +48 -48
  60. package/dist/components/flows/wizard/wizard.js +32 -32
  61. package/dist/components/forms/choice-card/choice-card.d.ts +2 -2
  62. package/dist/components/forms/choice-card/choice-card.js +156 -166
  63. package/dist/components/forms/combobox/combobox.js +70 -70
  64. package/dist/components/forms/date-picker/date-picker.js +31 -30
  65. package/dist/components/forms/file-upload/file-upload.js +146 -168
  66. package/dist/components/forms/prompt/prompt.js +47 -48
  67. package/dist/components/forms/select/components/SelectAllRow.js +14 -14
  68. package/dist/components/forms/select/components/SelectMenuFooter.js +12 -12
  69. package/dist/components/forms/select/components/SelectMenuHeader.js +44 -44
  70. package/dist/components/forms/select/components/SelectMenuListBody.js +22 -22
  71. package/dist/components/forms/select/components/SelectMenuPanel.js +8 -8
  72. package/dist/components/forms/select/components/SelectOptionRow.js +62 -62
  73. package/dist/components/forms/select/select.d.ts +5 -4
  74. package/dist/components/forms/select/select.js +123 -120
  75. package/dist/components/forms/select/select.types.d.ts +95 -204
  76. package/dist/components/forms/slider/slider.js +17 -17
  77. package/dist/components/forms/smart-input/smart-input.js +49 -49
  78. package/dist/components/forms/textarea/textarea.js +25 -25
  79. package/dist/components/layout/breadcrumb/breadcrumb.js +112 -118
  80. package/dist/components/layout/header/header.d.ts +5 -17
  81. package/dist/components/layout/header/header.js +113 -116
  82. package/dist/components/layout/header/header.types.d.ts +3 -0
  83. package/dist/components/layout/sidebar/sidebar.js +5 -5
  84. package/dist/components/layout/sidebar/sidebar.variants.js +1 -1
  85. package/dist/components/primitives/accordion/accordion.js +38 -41
  86. package/dist/components/primitives/kbd/kbd.variants.js +1 -1
  87. package/dist/i18n/defaultMessages.d.ts +2 -0
  88. package/dist/i18n/defaultMessages.js +6 -4
  89. package/dist/i18n/locales/de.js +2 -0
  90. package/dist/i18n/locales/es.js +2 -0
  91. package/dist/i18n/locales/hi.js +2 -0
  92. package/dist/i18n/locales/kn.js +2 -0
  93. package/dist/impact-nova-base.scss +8 -5
  94. package/dist/impact-nova-components.css +2 -2
  95. package/dist/impact-nova-tokens.scss +346 -189
  96. package/dist/impact-nova.css +1 -1
  97. package/dist/index.js +505 -499
  98. package/dist/lib/resolve-design-token-color.d.ts +5 -0
  99. package/dist/lib/resolve-design-token-color.js +12 -0
  100. package/dist/llms/rules/ag-grid.js +1 -1
  101. package/dist/llms/rules/installation.js +1 -1
  102. package/dist/llms/rules/requirements.js +1 -1
  103. package/dist/theme/tokens/chart-series-palette.json.d.ts +53 -0
  104. package/dist/theme/tokens/chart-series-palette.json.js +7 -0
  105. package/package.json +22 -254
  106. package/tailwind.config.js +10 -229
@@ -1,5 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { FieldControlProps } from '../../../lib/primitives/field.types';
3
+ /** Single select option — use `metadata` for app-specific fields instead of arbitrary keys. */
3
4
  export interface Option {
4
5
  label: string | ReactNode;
5
6
  value: string;
@@ -12,13 +13,15 @@ export interface Option {
12
13
  * Actual sequence is determined by selection order in the array.
13
14
  */
14
15
  sequence?: number;
15
- [key: string]: unknown;
16
+ /** App-specific fields (e.g. SKU codes) — not used by Select internals. */
17
+ metadata?: Record<string, unknown>;
16
18
  }
19
+ /** Option group heading with nested options. */
17
20
  export interface Group {
18
21
  label: string | ReactNode;
19
22
  options: Option[];
20
23
  isParentSelectable?: boolean;
21
- [key: string]: unknown;
24
+ metadata?: Record<string, unknown>;
22
25
  }
23
26
  export type OptionsOrGroups<OptionType, GroupType> = Array<OptionType> | Array<GroupType>;
24
27
  export interface InvertedSelection {
@@ -28,298 +31,186 @@ export interface InvertedSelection {
28
31
  export type SingleValue<OptionType> = OptionType | null;
29
32
  export type MultiValue<OptionType> = readonly OptionType[] | InvertedSelection;
30
33
  export type PropsValue<OptionType> = SingleValue<OptionType> | MultiValue<OptionType>;
31
- export type ActionMeta<OptionType> = {
32
- action: "select-option";
33
- option?: OptionType;
34
+ /** Why the select value changed — narrows `ActionMeta` for autocomplete. */
35
+ export type SelectChangeAction = "select-option" | "deselect-option" | "remove-value" | "pop-value" | "set-value" | "clear" | "create-option";
36
+ export type ActionMeta<OptionType extends Option = Option> = {
37
+ action: SelectChangeAction;
34
38
  name?: string;
35
- } | {
36
- action: "deselect-option";
39
+ } & ({
40
+ action: "select-option" | "deselect-option";
37
41
  option?: OptionType;
38
- name?: string;
39
42
  } | {
40
- action: "remove-value";
43
+ action: "remove-value" | "pop-value";
41
44
  removedValue: OptionType;
42
- name?: string;
43
- } | {
44
- action: "pop-value";
45
- removedValue: OptionType;
46
- name?: string;
47
- } | {
48
- action: "set-value";
49
- name?: string;
50
- } | {
51
- action: "clear";
52
- name?: string;
53
45
  } | {
54
46
  action: "create-option";
55
47
  option: OptionType;
56
- name?: string;
57
- };
48
+ } | {
49
+ action: "set-value" | "clear";
50
+ });
58
51
  export type OnChangeValue<OptionType, IsMulti extends boolean> = IsMulti extends true ? MultiValue<OptionType> : SingleValue<OptionType>;
59
- export interface SelectComponentsConfig {
60
- Option?: React.ComponentType<Record<string, unknown>>;
61
- DropdownIndicator?: React.ComponentType<Record<string, unknown>>;
62
- ClearIndicator?: React.ComponentType<Record<string, unknown>>;
63
- MultiValue?: React.ComponentType<Record<string, unknown>>;
64
- MultiValueRemove?: React.ComponentType<Record<string, unknown>>;
52
+ /**
53
+ * @deprecated Slot overrides are not wired in Select — reserved for a future major.
54
+ * Use `renderOption` for custom option rows.
55
+ */
56
+ export interface SelectComponentsConfig<OptionType extends Option = Option> {
57
+ Option?: React.ComponentType<{
58
+ option: OptionType;
59
+ selected: boolean;
60
+ disabled: boolean;
61
+ onClick: () => void;
62
+ className: string;
63
+ }>;
64
+ DropdownIndicator?: React.ComponentType<{
65
+ className?: string;
66
+ }>;
67
+ ClearIndicator?: React.ComponentType<{
68
+ onClick: () => void;
69
+ className?: string;
70
+ }>;
71
+ MultiValue?: React.ComponentType<{
72
+ option: OptionType;
73
+ onRemove: () => void;
74
+ }>;
75
+ MultiValueRemove?: React.ComponentType<{
76
+ onClick: () => void;
77
+ }>;
65
78
  }
66
- export interface SelectProps<OptionType extends Option = Option, IsMulti extends boolean = boolean, GroupType extends Group = Group> extends FieldControlProps {
67
- /**
68
- * The width of the dropdown menu.
69
- */
79
+ export interface SelectProps<OptionType extends Option = Option, IsMulti extends boolean = false, GroupType extends Group = Group> extends FieldControlProps {
80
+ /** Dropdown menu width (CSS length). */
70
81
  menuWidth?: string;
71
- /**
72
- * The array of options to display. Each option must have a `value` and `label`.
73
- */
82
+ /** Options or grouped options — each leaf needs `value` and `label`. */
74
83
  options: OptionsOrGroups<OptionType, GroupType>;
75
- /**
76
- * The current value of the select. Required for **controlled** components.
77
- */
84
+ /** Controlled value. */
78
85
  value?: PropsValue<OptionType>;
79
- /**
80
- * The initial value. Use this for **uncontrolled** components.
81
- */
86
+ /** Uncontrolled initial value. */
82
87
  defaultValue?: PropsValue<OptionType>;
83
88
  /**
84
- * Callback fired when the value changes.
85
- * Optional - if not provided, the select keeps in-menu edits locally and
86
- * commits through `onMenuClose` when the menu closes (controlled mode).
87
- * Use `onChange` for immediate parent updates on every selection.
89
+ * Fired on each selection change.
90
+ * Omit to batch commits through `onMenuClose` when the menu closes.
88
91
  */
89
92
  onChange?: (newValue: OnChangeValue<OptionType, IsMulti>, actionMeta: ActionMeta<OptionType>) => void;
90
93
  /**
91
- * If `true`, the user can select multiple values.
92
94
  * @deprecated Use `multiple`. Removed in v4.
93
95
  * @default false
94
96
  */
95
97
  isMulti?: IsMulti;
96
- /**
97
- * Canonical multi-select flag (Component API Charter).
98
- * @default false
99
- */
98
+ /** Enable multi-select. @default false */
100
99
  multiple?: IsMulti;
101
100
  /**
102
- * If `true`, the component is disabled.
103
101
  * @deprecated Use `disabled`. Removed in v4.
104
102
  * @default false
105
103
  */
106
104
  isDisabled?: boolean;
107
- /**
108
- * If `true`, the component shows a loading indicator.
109
- * @default false
110
- */
105
+ /** Show loading indicator in the menu. @default false */
111
106
  isLoading?: boolean;
112
- /**
113
- * If `true`, the user can clear the selected value.
114
- * @default true
115
- */
107
+ /** Show clear control when a value is set. @default true */
116
108
  isClearable?: boolean;
117
- /**
118
- * If `true`, the user can search for options.
119
- * @default true
120
- */
109
+ /** Enable typeahead search. @default true */
121
110
  isSearchable?: boolean;
122
- /**
123
- * Callback fired when the input value changes.
124
- */
111
+ /** Search input change (controlled search string). */
125
112
  onInputChange?: (value: string) => void;
126
- /**
127
- * The short hint displayed in the input before the user enters a value.
128
- * @default "Select..."
129
- */
113
+ /** Placeholder when empty. @default i18n "Select..." */
130
114
  placeholder?: string;
131
115
  /**
132
- * The element to portal the menu to.
116
+ * @deprecated Radix handles portalling prop is ignored.
133
117
  * @default document.body
134
118
  */
135
119
  menuPortalTarget?: HTMLElement | null;
136
- /**
137
- * If `true`, the input will be focused on mount.
138
- */
120
+ /** Focus trigger on mount. */
139
121
  autoFocus?: boolean;
140
122
  /**
141
- * If `true`, the menu will close after a selection is made.
142
- * @default !isMulti
123
+ * Close menu after a selection.
124
+ * @default !multiple
143
125
  */
144
126
  closeMenuOnSelect?: boolean;
145
- /**
146
- * If `true`, the menu will be open when the component mounts.
147
- * Useful for cell editors that need the dropdown visible immediately.
148
- * @default false
149
- */
127
+ /** Open menu on mount (e.g. cell editors). @default false */
150
128
  defaultMenuIsOpen?: boolean;
151
- /**
152
- * Callback fired when the component is focused.
153
- */
154
129
  onFocus?: (event: React.FocusEvent<HTMLElement>) => void;
155
- /**
156
- * Callback fired when the component is blurred.
157
- */
158
130
  onBlur?: (event: React.FocusEvent<HTMLElement>) => void;
159
- /**
160
- * If `true`, the menu will scroll to the selected option when opened.
161
- * @default false
162
- */
131
+ /** Scroll to selected option when the menu opens. @default false */
163
132
  scrollToSelectedOnOpen?: boolean;
164
133
  /**
165
- * Custom components to replace the default ones.
166
- */
167
- components?: SelectComponentsConfig;
168
- /**
169
- * The name of the input field.
134
+ * @deprecated Not implemented use `renderOption`.
170
135
  */
136
+ components?: SelectComponentsConfig<OptionType>;
137
+ /** Form field name. */
171
138
  name?: string;
172
- /**
173
- * Additional class name for the trigger.
174
- */
139
+ /** Classes on the trigger. */
175
140
  className?: string;
176
- /**
177
- * Additional class name for the parent container.
178
- */
141
+ /** Classes on the outer field wrapper. */
179
142
  parentClassName?: string;
180
- /**
181
- * Prefix for the class names of the inner components.
182
- */
143
+ /** BEM-style prefix for internal class names. */
183
144
  classNamePrefix?: string;
184
145
  /**
185
- * Maximum number of selectable options.
186
- * **Note**: Disables inverted selection logic.
146
+ * Max selectable options in multi mode.
147
+ * Disables inverted selection when set.
187
148
  */
188
149
  maxSelectableOptions?: number;
189
- /**
190
- * If `true`, displays sequence numbers next to selected items.
191
- * @default false
192
- */
150
+ /** Show sequence numbers for multi selections. @default false */
193
151
  showSequence?: boolean;
194
- /**
195
- * Array of values to determine the order of selection.
196
- */
152
+ /** Custom selection order (value strings). */
197
153
  selectionOrder?: string[];
198
- /**
199
- * @deprecated Use `required`
200
- */
154
+ /** @deprecated Use `required` */
201
155
  isRequired?: boolean;
202
- /**
203
- * Callback fired when the menu is scrolled to the bottom.
204
- */
156
+ /** Infinite scroll / async pagination callback. */
205
157
  onMenuScrollToBottom?: () => void;
206
158
  /**
207
- * Total number of options in the complete dataset, including options that
208
- * have not been fetched yet (async pagination). When provided AND the
209
- * component is in multi-select with `enableInvertedSelection`, the trigger
210
- * label "Selected (N)" uses this value instead of the count of loaded
211
- * options. Leave undefined for non-paginated usage; behaviour is unchanged.
212
- *
213
- * The parent should pass the same total it intends "Select All" to
214
- * represent on the server. During search you may either keep the
215
- * unfiltered total (recommended) or pass the filtered total – the
216
- * component renders whatever is given.
159
+ * Total options in the remote dataset (async pagination).
160
+ * Used for "Selected (N)" when `enableInvertedSelection` is on.
217
161
  */
218
162
  totalCount?: number;
219
- /**
220
- * If `true`, shows the "Select All" option in multi-select mode.
221
- * @default true
222
- */
163
+ /** Show "Select all" in multi mode. @default true */
223
164
  isSelectAllEnabled?: boolean;
224
- /**
225
- * If `true`, the component is read-only.
226
- * @default false
227
- */
165
+ /** Read-only — no edits. @default false */
228
166
  isReadOnly?: boolean;
229
- /**
230
- * The position of the search input.
231
- * @default "menu"
232
- */
167
+ /** Where search renders. @default "menu" */
233
168
  searchPosition?: "trigger" | "menu";
234
- /**
235
- * Content to display in the sticky footer.
236
- */
169
+ /** Sticky menu footer slot. */
237
170
  footerContent?: ReactNode;
238
- /**
239
- * Content to display inside the trigger on the left.
240
- */
171
+ /** Content left of the trigger label. */
241
172
  leftContent?: ReactNode;
242
- /**
243
- * Function to customize the label of an option.
244
- */
173
+ /** Override option label resolution. */
245
174
  getOptionLabel?: (option: OptionType) => string | ReactNode;
246
- /**
247
- * Function to fully customize the rendering of an option.
248
- */
175
+ /** Fully custom option row. */
249
176
  renderOption?: (props: {
250
177
  onClick: () => void;
251
178
  className: string;
252
179
  selected: boolean;
253
180
  disabled: boolean;
254
181
  }, option: OptionType) => ReactNode;
255
- /**
256
- * Callback fired when the menu opens.
257
- */
258
182
  onMenuOpen?: () => void;
259
183
  /**
260
- * Callback fired when the menu closes.
261
- * @param finalValue - The final selected value when the menu closes (useful for batched updates)
262
- * @param finalSelectionOrder - The final selection order (array of values) derived from finalValue array order
184
+ * Menu close use for batched value commits.
185
+ * @param finalValue Final value when the menu closes.
186
+ * @param finalSelectionOrder Value order when applicable.
263
187
  */
264
188
  onMenuClose?: (finalValue?: OnChangeValue<OptionType, IsMulti>, finalSelectionOrder?: string[]) => void;
265
- /**
266
- * Callback fired when the clear button is clicked.
267
- */
268
189
  onClearAll?: () => void;
269
- /**
270
- * If `true`, search will be case-insensitive.
271
- * @default true
272
- */
190
+ /** Case-insensitive search. @default true */
273
191
  ignoreCase?: boolean;
274
- /**
275
- * If `true`, search will ignore accents (e.g., 'e' matches 'é').
276
- * @default true
277
- */
192
+ /** Accent-insensitive search. @default true */
278
193
  ignoreAccents?: boolean;
279
- /**
280
- * Determines where the search match must start.
281
- * @default "any"
282
- */
194
+ /** Match position for search. @default "any" */
283
195
  matchFrom?: "any" | "start";
284
- /**
285
- * Function to convert an option to a string for searching.
286
- * @default label
287
- */
196
+ /** Stringify option for search. @default label */
288
197
  stringify?: (option: OptionType) => string;
289
- /**
290
- * If `true`, search input will be trimmed.
291
- * @default true
292
- */
198
+ /** Trim search input. @default true */
293
199
  trim?: boolean;
294
- /**
295
- * Custom filter function.
296
- * **Note**: Disables Web Worker optimization.
297
- */
200
+ /** Custom filter — disables Web Worker optimization. */
298
201
  filterOption?: (option: OptionType, inputValue: string) => boolean;
299
- /**
300
- * If `true`, enables submenu functionality (options with children).
301
- * @default false
302
- */
202
+ /** Hierarchical options (children). @default false */
303
203
  enableSubMenus?: boolean;
304
- /**
305
- * If `true`, enables group functionality (options with nested options).
306
- * @default false
307
- */
204
+ /** Grouped options. @default false */
308
205
  enableGroups?: boolean;
309
206
  /**
310
- * If `true`, "Select All" will return an InvertedSelection object.
311
- * If `false` (default), it returns an array of all options.
207
+ * "Select all" returns `InvertedSelection` instead of all options.
312
208
  * @default false
313
209
  */
314
210
  enableInvertedSelection?: boolean;
315
- /**
316
- * Error object from query/API call. When provided, shows error state instead of "No options found".
317
- */
211
+ /** Async options error — shows retry UI instead of empty state. */
318
212
  fetchError?: Error | null;
319
- /**
320
- * Callback to refetch options when an error occurs.
321
- * Matches React Query's refetch function signature.
322
- */
213
+ /** Refetch callback when `fetchError` is set. */
323
214
  onRefetch?: (options?: {
324
215
  throwOnError?: boolean;
325
216
  cancelRefetch?: boolean;
@@ -1,29 +1,30 @@
1
1
  import { jsxs as d, jsx as o } from "react/jsx-runtime";
2
- import * as c from "react";
3
- import * as e from "@radix-ui/react-slider";
2
+ import "react";
3
+ import * as a from "@radix-ui/react-slider";
4
+ import { createComponent as c } from "../../../lib/primitives/create-component.js";
4
5
  import { cn as b } from "../../../lib/utils.js";
5
6
  import { useImpactNovaI18n as u } from "../../../i18n/use-impact-nova-i18n.js";
6
- const m = c.forwardRef(({ className: r, "aria-label": i, ...a }, n) => {
7
- const { t: s } = u(), l = i ?? s("aria.slider");
7
+ const w = c("Slider", ({ className: l, "aria-label": i, ...e }, n) => {
8
+ const { t: s } = u(), r = i ?? s("aria.slider");
8
9
  return /* @__PURE__ */ d(
9
- e.Root,
10
+ a.Root,
10
11
  {
11
12
  ref: n,
12
- "aria-label": l,
13
+ "aria-label": r,
13
14
  className: b(
14
15
  "relative flex w-full touch-none select-none items-center",
15
- r
16
+ l
16
17
  ),
17
- ...a,
18
+ ...e,
18
19
  "data-component": "slider",
19
20
  children: [
20
21
  /* @__PURE__ */ o(
21
- e.Track,
22
+ a.Track,
22
23
  {
23
24
  className: "relative h-1.5 w-full grow overflow-hidden rounded-full bg-brand/20",
24
25
  "data-component": "slider-track",
25
26
  children: /* @__PURE__ */ o(
26
- e.Range,
27
+ a.Range,
27
28
  {
28
29
  className: "absolute h-full bg-brand",
29
30
  "data-component": "slider-range"
@@ -31,18 +32,18 @@ const m = c.forwardRef(({ className: r, "aria-label": i, ...a }, n) => {
31
32
  )
32
33
  }
33
34
  ),
34
- Array.isArray(a.value || a.defaultValue) ? (a.value || a.defaultValue || []).map((f, t) => /* @__PURE__ */ o(
35
- e.Thumb,
35
+ Array.isArray(e.value || e.defaultValue) ? (e.value || e.defaultValue || []).map((m, t) => /* @__PURE__ */ o(
36
+ a.Thumb,
36
37
  {
37
- "aria-label": l,
38
+ "aria-label": r,
38
39
  className: "block h-4 w-4 rounded-full border border-brand/50 bg-canvas shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-focus-ring disabled:pointer-events-none disabled:opacity-50",
39
40
  "data-component": "slider-thumb"
40
41
  },
41
42
  t
42
43
  )) : /* @__PURE__ */ o(
43
- e.Thumb,
44
+ a.Thumb,
44
45
  {
45
- "aria-label": l,
46
+ "aria-label": r,
46
47
  className: "block h-4 w-4 rounded-full border border-brand/50 bg-canvas shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-focus-ring disabled:pointer-events-none disabled:opacity-50",
47
48
  "data-component": "slider-thumb"
48
49
  }
@@ -51,7 +52,6 @@ const m = c.forwardRef(({ className: r, "aria-label": i, ...a }, n) => {
51
52
  }
52
53
  );
53
54
  });
54
- m.displayName = e.Root.displayName;
55
55
  export {
56
- m as Slider
56
+ w as Slider
57
57
  };