@spear-ai/spectral 1.11.1 → 1.11.3

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 (204) hide show
  1. package/dist/.js +3 -2
  2. package/dist/ButtonIcon.js +2 -2
  3. package/dist/Checkbox/CheckboxBase.js +1 -1
  4. package/dist/Combobox/ComboboxBase.js +1 -1
  5. package/dist/Combobox.d.ts +5 -2
  6. package/dist/Combobox.js +105 -72
  7. package/dist/{ComboboxBase-Dn8Lz9mG.js → ComboboxBase-qX-mQhT6.js} +2 -2
  8. package/dist/ControlGroup/ControlGroupSelect.d.ts +3 -2
  9. package/dist/ControlGroup/ControlGroupSelect.js +79 -71
  10. package/dist/DateTimePicker/DateTimeDisplayInput.js +1 -1
  11. package/dist/DateTimePicker.js +1 -1
  12. package/dist/Icons/AnalyzeIcon.d.ts +1 -1
  13. package/dist/Icons/AnalyzeIcon.js +5 -6
  14. package/dist/Icons/AnnotationsIcon.d.ts +1 -1
  15. package/dist/Icons/AnnotationsIcon.js +5 -6
  16. package/dist/Icons/ApprovedIcon.d.ts +1 -1
  17. package/dist/Icons/ApprovedIcon.js +5 -6
  18. package/dist/Icons/ArrowDownIcon.d.ts +1 -1
  19. package/dist/Icons/ArrowDownIcon.js +5 -6
  20. package/dist/Icons/ArrowUpIcon.d.ts +1 -1
  21. package/dist/Icons/ArrowUpIcon.js +5 -6
  22. package/dist/Icons/BoxToolIcon.d.ts +1 -1
  23. package/dist/Icons/BoxToolIcon.js +5 -6
  24. package/dist/Icons/CalendarIcon.d.ts +1 -1
  25. package/dist/Icons/CalendarIcon.js +5 -6
  26. package/dist/Icons/CheckCircleIcon.d.ts +1 -1
  27. package/dist/Icons/CheckCircleIcon.js +5 -6
  28. package/dist/Icons/CheckSquareIcon.d.ts +1 -1
  29. package/dist/Icons/CheckSquareIcon.js +5 -6
  30. package/dist/Icons/CheckmarkIcon.d.ts +1 -1
  31. package/dist/Icons/CheckmarkIcon.js +6 -7
  32. package/dist/Icons/ChevronDownIcon.d.ts +1 -1
  33. package/dist/Icons/ChevronDownIcon.js +5 -6
  34. package/dist/Icons/ChevronUpIcon.d.ts +1 -1
  35. package/dist/Icons/ChevronUpIcon.js +5 -6
  36. package/dist/Icons/ClockIcon.d.ts +1 -1
  37. package/dist/Icons/ClockIcon.js +5 -6
  38. package/dist/Icons/CloseCircleIcon.d.ts +1 -1
  39. package/dist/Icons/CloseCircleIcon.js +5 -6
  40. package/dist/Icons/CloseIcon.d.ts +1 -1
  41. package/dist/Icons/CloseIcon.js +5 -6
  42. package/dist/Icons/Crosshairs2Icon.d.ts +1 -1
  43. package/dist/Icons/Crosshairs2Icon.js +5 -6
  44. package/dist/Icons/CrosshairsIcon.d.ts +1 -1
  45. package/dist/Icons/CrosshairsIcon.js +5 -6
  46. package/dist/Icons/DashboardIcon.d.ts +1 -1
  47. package/dist/Icons/DashboardIcon.js +5 -6
  48. package/dist/Icons/DatabaseIcon.d.ts +1 -1
  49. package/dist/Icons/DatabaseIcon.js +5 -6
  50. package/dist/Icons/DeleteIcon.d.ts +1 -1
  51. package/dist/Icons/DeleteIcon.js +5 -6
  52. package/dist/Icons/DurationIcon.d.ts +1 -1
  53. package/dist/Icons/DurationIcon.js +5 -6
  54. package/dist/Icons/EditIcon.d.ts +1 -1
  55. package/dist/Icons/EditIcon.js +5 -6
  56. package/dist/Icons/EmailIcon.d.ts +1 -1
  57. package/dist/Icons/EmailIcon.js +5 -6
  58. package/dist/Icons/EraserIcon.d.ts +1 -1
  59. package/dist/Icons/EraserIcon.js +8 -9
  60. package/dist/Icons/ErrorIcon.d.ts +1 -1
  61. package/dist/Icons/ErrorIcon.js +5 -6
  62. package/dist/Icons/EyeClosedIcon.d.ts +1 -1
  63. package/dist/Icons/EyeClosedIcon.js +5 -6
  64. package/dist/Icons/EyeClosedIcon2.d.ts +1 -1
  65. package/dist/Icons/EyeClosedIcon2.js +5 -6
  66. package/dist/Icons/EyeOpenIcon.d.ts +1 -1
  67. package/dist/Icons/EyeOpenIcon.js +5 -6
  68. package/dist/Icons/FileDownloadIcon.d.ts +1 -1
  69. package/dist/Icons/FileDownloadIcon.js +5 -6
  70. package/dist/Icons/GoToFirstIcon.d.ts +1 -1
  71. package/dist/Icons/GoToFirstIcon.js +5 -6
  72. package/dist/Icons/GoToLastIcon.d.ts +1 -1
  73. package/dist/Icons/GoToLastIcon.js +5 -6
  74. package/dist/Icons/HarmonicCursorsIcon.d.ts +1 -1
  75. package/dist/Icons/HarmonicCursorsIcon.js +5 -6
  76. package/dist/Icons/IconBase.d.ts +2 -1
  77. package/dist/Icons/IconBase.js +26 -26
  78. package/dist/Icons/InfoIcon.d.ts +1 -1
  79. package/dist/Icons/InfoIcon.js +5 -6
  80. package/dist/Icons/KeyboardIcon.d.ts +1 -1
  81. package/dist/Icons/KeyboardIcon.js +5 -6
  82. package/dist/Icons/LabelIcon.d.ts +1 -1
  83. package/dist/Icons/LabelIcon.js +5 -6
  84. package/dist/Icons/LassoIcon.d.ts +1 -1
  85. package/dist/Icons/LassoIcon.js +5 -6
  86. package/dist/Icons/LineToolIcon.d.ts +1 -1
  87. package/dist/Icons/LineToolIcon.js +5 -6
  88. package/dist/Icons/LiveViewIcon.d.ts +1 -1
  89. package/dist/Icons/LiveViewIcon.js +5 -6
  90. package/dist/Icons/LoaderIcon.d.ts +1 -1
  91. package/dist/Icons/LoaderIcon.js +10 -11
  92. package/dist/Icons/LocationIcon.d.ts +1 -1
  93. package/dist/Icons/LocationIcon.js +5 -6
  94. package/dist/Icons/LogoutIcon.d.ts +1 -1
  95. package/dist/Icons/LogoutIcon.js +5 -6
  96. package/dist/Icons/MaximizeIcon.d.ts +1 -1
  97. package/dist/Icons/MaximizeIcon.js +5 -6
  98. package/dist/Icons/MeasureIcon.d.ts +1 -1
  99. package/dist/Icons/MeasureIcon.js +5 -6
  100. package/dist/Icons/MessagesIcon.d.ts +1 -1
  101. package/dist/Icons/MessagesIcon.js +5 -6
  102. package/dist/Icons/MetadataIcon.d.ts +1 -1
  103. package/dist/Icons/MetadataIcon.js +5 -6
  104. package/dist/Icons/MinimizeIcon.d.ts +1 -1
  105. package/dist/Icons/MinimizeIcon.js +5 -6
  106. package/dist/Icons/MinusIcon.d.ts +1 -1
  107. package/dist/Icons/MinusIcon.js +5 -6
  108. package/dist/Icons/OntologyIcon.d.ts +1 -1
  109. package/dist/Icons/OntologyIcon.js +5 -6
  110. package/dist/Icons/PanelIconClose.d.ts +1 -1
  111. package/dist/Icons/PanelIconClose.js +5 -6
  112. package/dist/Icons/PanelIconOpen.d.ts +1 -1
  113. package/dist/Icons/PanelIconOpen.js +5 -6
  114. package/dist/Icons/PauseIcon.d.ts +1 -1
  115. package/dist/Icons/PauseIcon.js +5 -6
  116. package/dist/Icons/PlayIcon.d.ts +1 -1
  117. package/dist/Icons/PlayIcon.js +5 -6
  118. package/dist/Icons/PlusIcon.d.ts +1 -1
  119. package/dist/Icons/PlusIcon.js +5 -6
  120. package/dist/Icons/PolygonIcon.d.ts +1 -1
  121. package/dist/Icons/PolygonIcon.js +5 -6
  122. package/dist/Icons/PrinterIcon.d.ts +1 -1
  123. package/dist/Icons/PrinterIcon.js +5 -6
  124. package/dist/Icons/ProgressCheckIcon.d.ts +1 -1
  125. package/dist/Icons/ProgressCheckIcon.js +5 -6
  126. package/dist/Icons/ResetIcon.d.ts +1 -1
  127. package/dist/Icons/ResetIcon.js +5 -6
  128. package/dist/Icons/ReviewedIcon.d.ts +1 -1
  129. package/dist/Icons/ReviewedIcon.js +5 -6
  130. package/dist/Icons/ScissorsIcon.d.ts +1 -1
  131. package/dist/Icons/ScissorsIcon.js +5 -6
  132. package/dist/Icons/SearchIcon.d.ts +1 -1
  133. package/dist/Icons/SearchIcon.js +5 -6
  134. package/dist/Icons/SettingsIcon.d.ts +1 -1
  135. package/dist/Icons/SettingsIcon.js +5 -6
  136. package/dist/Icons/SortAscendingIcon.d.ts +1 -1
  137. package/dist/Icons/SortAscendingIcon.js +5 -6
  138. package/dist/Icons/SortAtoZIcon.d.ts +1 -1
  139. package/dist/Icons/SortAtoZIcon.js +5 -6
  140. package/dist/Icons/SortDescendingIcon.d.ts +1 -1
  141. package/dist/Icons/SortDescendingIcon.js +5 -6
  142. package/dist/Icons/SortZtoAIcon.d.ts +1 -1
  143. package/dist/Icons/SortZtoAIcon.js +5 -6
  144. package/dist/Icons/SparklesIcon.d.ts +1 -1
  145. package/dist/Icons/SparklesIcon.js +5 -6
  146. package/dist/Icons/StackIcon.d.ts +1 -1
  147. package/dist/Icons/StackIcon.js +5 -6
  148. package/dist/Icons/StarIcon.d.ts +1 -1
  149. package/dist/Icons/StarIcon.js +5 -6
  150. package/dist/Icons/TrashIcon.d.ts +1 -1
  151. package/dist/Icons/TrashIcon.js +5 -6
  152. package/dist/Icons/UndoIcon.d.ts +1 -1
  153. package/dist/Icons/UndoIcon.js +5 -6
  154. package/dist/Icons/UploadIcon.d.ts +1 -1
  155. package/dist/Icons/UploadIcon.js +5 -6
  156. package/dist/Icons/User2Icon.d.ts +1 -1
  157. package/dist/Icons/User2Icon.js +5 -6
  158. package/dist/Icons/UserIcon.d.ts +1 -1
  159. package/dist/Icons/UserIcon.js +5 -6
  160. package/dist/Icons/WarningIcon.d.ts +1 -1
  161. package/dist/Icons/WarningIcon.js +5 -6
  162. package/dist/Icons/ZoomAllIcon.d.ts +1 -1
  163. package/dist/Icons/ZoomAllIcon.js +5 -6
  164. package/dist/Icons/ZoomXIcon.d.ts +1 -1
  165. package/dist/Icons/ZoomXIcon.js +5 -6
  166. package/dist/Icons/ZoomYIcon.d.ts +1 -1
  167. package/dist/Icons/ZoomYIcon.js +5 -6
  168. package/dist/Input.d.ts +1 -1
  169. package/dist/Input.js +95 -90
  170. package/dist/InputNumeric.d.ts +1 -1
  171. package/dist/InputNumeric.js +70 -65
  172. package/dist/MultiSelect/MultiSelectBase.d.ts +6 -3
  173. package/dist/MultiSelect/MultiSelectBase.js +153 -141
  174. package/dist/MultiSelect.d.ts +3 -2
  175. package/dist/MultiSelect.js +12 -11
  176. package/dist/Select.d.ts +2 -1
  177. package/dist/Select.js +90 -81
  178. package/dist/Switch/SwitchBase.js +1 -1
  179. package/dist/Textarea.d.ts +1 -1
  180. package/dist/Textarea.js +54 -49
  181. package/dist/Toggle/ToggleBase.js +1 -1
  182. package/dist/ToggleGroup/ToggleGroupBase.js +5 -2
  183. package/dist/hooks/useControllableState.d.ts +6 -1
  184. package/dist/hooks/useControllableState.d.ts.map +1 -1
  185. package/dist/hooks/useControllableState.js +2 -2
  186. package/dist/hooks/useUncontrolledState.d.ts +9 -0
  187. package/dist/hooks/useUncontrolledState.d.ts.map +1 -0
  188. package/dist/hooks/useUncontrolledState.js +16 -0
  189. package/dist/index.d.ts +1 -0
  190. package/dist/index.d.ts.map +1 -1
  191. package/dist/primitives/select.d.ts +6 -1
  192. package/dist/primitives/select.d.ts.map +1 -1
  193. package/dist/primitives/select.js +90 -38
  194. package/dist/styles/spectral.css +1 -1
  195. package/dist/utils/dropdownPositioning.d.ts +13 -0
  196. package/dist/utils/dropdownPositioning.d.ts.map +1 -0
  197. package/dist/utils/dropdownPositioning.js +43 -0
  198. package/dist/utils/dropdownPositioning.test.d.ts +2 -0
  199. package/dist/utils/dropdownPositioning.test.d.ts.map +1 -0
  200. package/dist/utils/dropdownPositioning.test.js +21 -0
  201. package/dist/utils/formFieldUtils.d.ts +2 -0
  202. package/dist/utils/formFieldUtils.d.ts.map +1 -1
  203. package/dist/utils/formFieldUtils.js +18 -15
  204. package/package.json +1 -1
package/dist/.js CHANGED
@@ -86,7 +86,7 @@ import { Button as je } from "./Button.js";
86
86
  import { Separator as Me } from "./Separator.js";
87
87
  import { ButtonGroup as Ne, ButtonGroupItem as Pe, ButtonGroupSeparator as Fe } from "./ButtonGroup.js";
88
88
  import { ButtonIcon as Ie } from "./ButtonIcon.js";
89
- import { useControllableState as Le } from "./hooks/useControllableState.js";
89
+ import { useUncontrolledState as Le } from "./hooks/useUncontrolledState.js";
90
90
  import { Checkbox as Re } from "./Checkbox.js";
91
91
  import { Label as ze } from "./Label.js";
92
92
  import { InputGroup as Be, InputGroupAddon as Ve, InputGroupButton as He, InputGroupInput as Ue, InputGroupText as We, InputGroupTextarea as Ge } from "./primitives/input-group.js";
@@ -118,4 +118,5 @@ import { Toggle as wt } from "./Toggle.js";
118
118
  import { ToggleGroup as Tt, ToggleGroupItem as Et } from "./ToggleGroup.js";
119
119
  import { i as Dt, n as Ot, t as kt } from "./Tooltip-D1K8kY1y.js";
120
120
  import { Tray as At } from "./Tray.js";
121
- export { Ee as Accordion, Oe as Alert, n as AnalyzeIcon, r as AnnotationsIcon, i as ApprovedIcon, a as ArrowDownIcon, o as ArrowUpIcon, ke as Avatar, Ae as Badge, s as BoxToolIcon, je as Button, Ne as ButtonGroup, Pe as ButtonGroupItem, Fe as ButtonGroupSeparator, Ie as ButtonIcon, c as CalendarIcon, l as CheckCircleIcon, u as CheckSquareIcon, Re as Checkbox, d as CheckmarkIcon, f as ChevronDownIcon, p as ChevronUpIcon, m as ClockIcon, h as CloseCircleIcon, g as CloseIcon, Ke as Combobox, qe as ControlGroupSelect, _ as Crosshairs2Icon, v as CrosshairsIcon, y as DashboardIcon, Je as DataCard, b as DatabaseIcon, Qe as DateTimePicker, x as DeleteIcon, $e as Dialog, tt as Drawer, S as DurationIcon, C as EditIcon, w as EmailIcon, T as EraserIcon, E as ErrorIcon, D as EyeClosedIcon, O as EyeClosedIcon2, k as EyeOpenIcon, A as FileDownloadIcon, j as GoToFirstIcon, M as GoToLastIcon, N as HarmonicCursorsIcon, it as HoverCard, nt as HoverCardContent, rt as HoverCardTrigger, e as IconBase, P as InfoIcon, at as Input, Be as InputGroup, Ve as InputGroupAddon, He as InputGroupButton, Ue as InputGroupInput, We as InputGroupText, Ge as InputGroupTextarea, ot as InputNumeric, st as InputOTP, ct as Kbd, lt as KbdGroup, F as KeyboardIcon, ze as Label, I as LabelIcon, L as LassoIcon, R as LineToolIcon, z as LiveViewIcon, B as LoaderIcon, V as LocationIcon, H as LogoutIcon, U as MaximizeIcon, W as MeasureIcon, G as MessagesIcon, K as MetadataIcon, q as MinimizeIcon, J as MinusIcon, ut as MultiSelect, Y as OntologyIcon, X as PanelIconClose, Z as PanelIconOpen, Q as PauseIcon, $ as PlayIcon, ee as PlusIcon, te as PolygonIcon, Ye as Popover, Xe as PopoverContent, Ze as PopoverTrigger, ne as PrinterIcon, re as ProgressCheckIcon, pt as RadioButton, dt as RadioButtonGroup, ft as RadioButtonGroupItem, ht as RadioGroup, mt as RadioGroupItem, ie as ResetIcon, ae as ReviewedIcon, oe as ScissorsIcon, se as SearchIcon, gt as Select, Me as Separator, ce as SettingsIcon, _t as Skeleton, vt as Slider, le as SortAscendingIcon, ue as SortAtoZIcon, de as SortDescendingIcon, fe as SortZtoAIcon, pe as SparklesIcon, et as SpectralProvider, me as StackIcon, he as StarIcon, t as SvgIdContext, yt as Switch, bt as Tabs, xt as Textarea, Ct as Toast, wt as Toggle, Tt as ToggleGroup, Et as ToggleGroupItem, kt as Tooltip, Ot as TooltipContent, Dt as TooltipTrigger, ge as TrashIcon, At as Tray, _e as UndoIcon, ve as UploadIcon, ye as User2Icon, be as UserIcon, xe as WarningIcon, Se as ZoomAllIcon, Ce as ZoomXIcon, we as ZoomYIcon, De as cn, St as toast, Te as useAccordionAutoScroll, Le as useControllableState };
121
+ import { useControllableState as jt } from "./hooks/useControllableState.js";
122
+ export { Ee as Accordion, Oe as Alert, n as AnalyzeIcon, r as AnnotationsIcon, i as ApprovedIcon, a as ArrowDownIcon, o as ArrowUpIcon, ke as Avatar, Ae as Badge, s as BoxToolIcon, je as Button, Ne as ButtonGroup, Pe as ButtonGroupItem, Fe as ButtonGroupSeparator, Ie as ButtonIcon, c as CalendarIcon, l as CheckCircleIcon, u as CheckSquareIcon, Re as Checkbox, d as CheckmarkIcon, f as ChevronDownIcon, p as ChevronUpIcon, m as ClockIcon, h as CloseCircleIcon, g as CloseIcon, Ke as Combobox, qe as ControlGroupSelect, _ as Crosshairs2Icon, v as CrosshairsIcon, y as DashboardIcon, Je as DataCard, b as DatabaseIcon, Qe as DateTimePicker, x as DeleteIcon, $e as Dialog, tt as Drawer, S as DurationIcon, C as EditIcon, w as EmailIcon, T as EraserIcon, E as ErrorIcon, D as EyeClosedIcon, O as EyeClosedIcon2, k as EyeOpenIcon, A as FileDownloadIcon, j as GoToFirstIcon, M as GoToLastIcon, N as HarmonicCursorsIcon, it as HoverCard, nt as HoverCardContent, rt as HoverCardTrigger, e as IconBase, P as InfoIcon, at as Input, Be as InputGroup, Ve as InputGroupAddon, He as InputGroupButton, Ue as InputGroupInput, We as InputGroupText, Ge as InputGroupTextarea, ot as InputNumeric, st as InputOTP, ct as Kbd, lt as KbdGroup, F as KeyboardIcon, ze as Label, I as LabelIcon, L as LassoIcon, R as LineToolIcon, z as LiveViewIcon, B as LoaderIcon, V as LocationIcon, H as LogoutIcon, U as MaximizeIcon, W as MeasureIcon, G as MessagesIcon, K as MetadataIcon, q as MinimizeIcon, J as MinusIcon, ut as MultiSelect, Y as OntologyIcon, X as PanelIconClose, Z as PanelIconOpen, Q as PauseIcon, $ as PlayIcon, ee as PlusIcon, te as PolygonIcon, Ye as Popover, Xe as PopoverContent, Ze as PopoverTrigger, ne as PrinterIcon, re as ProgressCheckIcon, pt as RadioButton, dt as RadioButtonGroup, ft as RadioButtonGroupItem, ht as RadioGroup, mt as RadioGroupItem, ie as ResetIcon, ae as ReviewedIcon, oe as ScissorsIcon, se as SearchIcon, gt as Select, Me as Separator, ce as SettingsIcon, _t as Skeleton, vt as Slider, le as SortAscendingIcon, ue as SortAtoZIcon, de as SortDescendingIcon, fe as SortZtoAIcon, pe as SparklesIcon, et as SpectralProvider, me as StackIcon, he as StarIcon, t as SvgIdContext, yt as Switch, bt as Tabs, xt as Textarea, Ct as Toast, wt as Toggle, Tt as ToggleGroup, Et as ToggleGroupItem, kt as Tooltip, Ot as TooltipContent, Dt as TooltipTrigger, ge as TrashIcon, At as Tray, _e as UndoIcon, ve as UploadIcon, ye as User2Icon, be as UserIcon, xe as WarningIcon, Se as ZoomAllIcon, Ce as ZoomXIcon, we as ZoomYIcon, De as cn, St as toast, Te as useAccordionAutoScroll, jt as useControllableState, Le as useUncontrolledState };
@@ -22,7 +22,7 @@ var a = "bg-transparent hover:bg-level-one text-text-primary inline-flex items-c
22
22
  let _ = (e) => f?.(e), v = u ? `${d} - Loading` : d, y = () => {
23
23
  if (u) return /* @__PURE__ */ i(e, {
24
24
  size: o[h].icon,
25
- ariaHidden: !0
25
+ "aria-hidden": "true"
26
26
  });
27
27
  let a = typeof l == "function" ? l() : l;
28
28
  if (r(a)) {
@@ -34,7 +34,7 @@ var a = "bg-transparent hover:bg-level-one text-text-primary inline-flex items-c
34
34
  "aria-hidden": "true"
35
35
  });
36
36
  let r = {
37
- ariaHidden: !0,
37
+ "aria-hidden": "true",
38
38
  className: t("shrink-0", a.props.className)
39
39
  };
40
40
  return a.type.displayName?.endsWith("Icon") ?? !1 ? n(a, {
@@ -2,7 +2,7 @@
2
2
  import "../styles/main.css";
3
3
  import { t as e } from "../twUtils-VNWgstKL.js";
4
4
  import { Slot as t } from "../primitives/slot.js";
5
- import { useControllableState as n } from "../hooks/useControllableState.js";
5
+ import { useUncontrolledState as n } from "../hooks/useUncontrolledState.js";
6
6
  import { createContext as r, useCallback as i, useContext as a, useEffect as o, useId as s, useRef as c } from "react";
7
7
  import { jsx as l, jsxs as u } from "react/jsx-runtime";
8
8
  //#region src/components/Checkbox/CheckboxBase.tsx
@@ -1,3 +1,3 @@
1
1
  import "../primitives/input-group.js";
2
- import { a as e, i as t, n, r, t as i } from "../ComboboxBase-Dn8Lz9mG.js";
2
+ import { a as e, i as t, n, r, t as i } from "../ComboboxBase-qX-mQhT6.js";
3
3
  export { i as ComboboxBase, n as CommandEmpty, r as CommandInput, t as CommandItem, e as CommandList };
@@ -1,8 +1,10 @@
1
- import { BaseFormFieldProps, BaseOption } from './utils/formFieldUtils';
1
+ import { BaseFormFieldProps, BaseOption, DropdownWidth } from './utils/formFieldUtils';
2
2
  import { Ref } from 'react';
3
3
  export type ComboboxOption = BaseOption;
4
4
  export interface ComboboxProps extends Omit<BaseFormFieldProps, 'onChange'> {
5
5
  className?: string;
6
+ defaultValue?: string;
7
+ dropdownWidth?: DropdownWidth;
6
8
  emptyMessage?: string;
7
9
  labelClassName?: string;
8
10
  loadingMessage?: string;
@@ -10,9 +12,10 @@ export interface ComboboxProps extends Omit<BaseFormFieldProps, 'onChange'> {
10
12
  options: ComboboxOption[];
11
13
  placeholder?: string;
12
14
  value?: string;
15
+ warningMessage?: BaseFormFieldProps['errorMessage'];
13
16
  }
14
17
  export declare const Combobox: {
15
- ({ className, disabled, emptyMessage, errorMessage, id, label, labelClassName, loadingMessage, name, onValueChange, options, placeholder, ref, required, state, value, "aria-describedby": ariaDescribedBy, "aria-label": ariaLabel, }: ComboboxProps & {
18
+ ({ className, disabled, defaultValue, dropdownWidth, emptyMessage, errorMessage, id, label, labelClassName, loadingMessage, name, onValueChange, options, placeholder, ref, required, state, value: valueProp, warningMessage, "aria-describedby": ariaDescribedBy, "aria-label": ariaLabel, }: ComboboxProps & {
16
19
  ref?: Ref<HTMLDivElement>;
17
20
  }): import("react/jsx-runtime").JSX.Element;
18
21
  displayName: string;
package/dist/Combobox.js CHANGED
@@ -3,108 +3,141 @@ import "./styles/main.css";
3
3
  import { ChevronDownIcon as e } from "./Icons/ChevronDownIcon.js";
4
4
  import { LoaderIcon as t } from "./Icons/LoaderIcon.js";
5
5
  import { t as n } from "./twUtils-VNWgstKL.js";
6
- import { EmptyState as ee, ErrorMessage as r, LoadingState as i, getAriaProps as a, getErrorMessageId as o, getFormFieldCSSProperties as s, getStateClasses as c, useFormFieldId as l, useFormFieldState as u } from "./utils/formFieldUtils.js";
7
- import { Label as d } from "./Label.js";
8
- import { InputGroup as f, InputGroupAddon as p } from "./primitives/input-group.js";
9
- import { a as m, i as h, n as g, o as _ } from "./ComboboxBase-Dn8Lz9mG.js";
10
- import { useCallback as v, useRef as y, useState as b } from "react";
11
- import { jsx as x, jsxs as S } from "react/jsx-runtime";
6
+ import { EmptyState as ee, ErrorMessage as te, LoadingState as ne, WarningMessage as re, getAriaProps as ie, getDropdownSurfaceClasses as ae, getErrorMessageId as oe, getFormFieldCSSProperties as se, getOptionClasses as ce, getTriggerClasses as r, useFormFieldId as i, useFormFieldState as a } from "./utils/formFieldUtils.js";
7
+ import { useUncontrolledState as o } from "./hooks/useUncontrolledState.js";
8
+ import { Label as s } from "./Label.js";
9
+ import { InputGroup as c, InputGroupAddon as l } from "./primitives/input-group.js";
10
+ import { useAutoDropdownHorizontalShift as u } from "./utils/dropdownPositioning.js";
11
+ import { a as d, i as f, n as p, o as m } from "./ComboboxBase-qX-mQhT6.js";
12
+ import { useCallback as le, useRef as h, useState as g } from "react";
13
+ import { jsx as _, jsxs as v } from "react/jsx-runtime";
12
14
  //#region src/components/Combobox/Combobox.tsx
13
- var C = ({ className: C, disabled: w, emptyMessage: T = "No options found.", errorMessage: E, id: D, label: O, labelClassName: k, loadingMessage: A = "Loading…", name: j, onValueChange: M, options: N = [], placeholder: P = "Search…", ref: F, required: I, state: L = "default", value: R = "", "aria-describedby": z, "aria-label": B }) => {
14
- process.env.NODE_ENV !== "production" && !O && !B && console.warn("Combobox: provide either `label` or `aria-label` for an accessible name.");
15
- let V = y(null), H = y(null), U = l(D, j), W = `${U}-listbox`, G = o(U), { isDisabled: K, isLoading: q, isInvalid: J } = u(w, L), Y = a(L, z, I, G), [X, Z] = b(!1), [Q, $] = b(""), te = N.find((e) => e.value === R), ne = (e) => {
16
- M?.(e === R ? "" : e), $(""), Z(!1);
17
- }, re = (e) => {
18
- e.key === "Escape" && Z(!1);
19
- }, ie = v(() => {
15
+ var y = ({ className: y, disabled: ue, defaultValue: de = "", dropdownWidth: b = "trigger", emptyMessage: x = "No options found.", errorMessage: S, id: C, label: w, labelClassName: T, loadingMessage: E = "Loading…", name: D, onValueChange: O, options: k = [], placeholder: A = "Search…", ref: j, required: M, state: N = "default", value: P, warningMessage: F, "aria-describedby": I, "aria-label": L }) => {
16
+ process.env.NODE_ENV !== "production" && !w && !L && console.warn("Combobox: provide either `label` or `aria-label` for an accessible name.");
17
+ let R = h(null), z = h(null), B = i(C, D), V = `${B}-listbox`, H = oe(B), U = `${B}-warning`, fe = N === "error" ? H : N === "warning" && F ? U : void 0, { isDisabled: W, isLoading: G, isInvalid: pe } = a(ue, N), me = ie(N, I, M, fe), [K, q] = g(!1), { dropdownShiftStyle: he, setDropdownElement: ge } = u(K), [J, Y] = g(""), [X, _e] = o({
18
+ value: P,
19
+ defaultValue: de,
20
+ onChange: O
21
+ }), Z = k.find((e) => e.value === X), ve = !!(Z && J.length === 0), Q = b === "trigger" || b === "content" ? b : "custom", $ = {
22
+ maxWidth: "calc(100vw - 2rem)",
23
+ overflowX: "auto",
24
+ overflowY: "auto"
25
+ }, ye = b === "trigger" ? { width: "100%" } : b === "content" ? {
26
+ minWidth: "max-content",
27
+ width: "max-content",
28
+ ...$
29
+ } : {
30
+ width: b,
31
+ ...$
32
+ }, be = (e) => {
33
+ _e(e === X ? "" : e), Y(""), q(!1);
34
+ }, xe = (e) => {
35
+ e.key === "Escape" && q(!1);
36
+ }, Se = le(() => {
20
37
  requestAnimationFrame(() => {
21
- H.current?.contains(document.activeElement) || (Z(!1), $(""));
38
+ z.current?.contains(document.activeElement) || (q(!1), Y(""));
22
39
  });
23
- }, []), ae = () => {
24
- K || q || (V.current?.focus(), Z(!0));
25
- }, oe = () => q ? /* @__PURE__ */ x("div", {
26
- id: W,
40
+ }, []), Ce = () => {
41
+ W || G || (R.current?.focus(), q(!0));
42
+ }, we = () => G ? /* @__PURE__ */ _("div", {
43
+ id: V,
27
44
  role: "listbox",
28
- children: /* @__PURE__ */ x(i, { message: A })
29
- }) : N.length === 0 ? /* @__PURE__ */ x("div", {
30
- id: W,
45
+ children: /* @__PURE__ */ _(ne, { message: E })
46
+ }) : k.length === 0 ? /* @__PURE__ */ _("div", {
47
+ id: V,
31
48
  role: "listbox",
32
- children: /* @__PURE__ */ x(ee, { message: T })
33
- }) : /* @__PURE__ */ S(m, {
34
- id: W,
35
- children: [/* @__PURE__ */ x(g, { children: T }), N.map((e) => /* @__PURE__ */ x(h, {
36
- "data-checked": R === e.value || void 0,
49
+ children: /* @__PURE__ */ _(ee, { message: x })
50
+ }) : /* @__PURE__ */ v(d, {
51
+ id: V,
52
+ children: [/* @__PURE__ */ _(p, { children: x }), k.map((e) => /* @__PURE__ */ _(f, {
53
+ className: n(ce(!!e.disabled, !1, X === e.value), "group/command-item relative flex w-full items-center data-[selected=true]:bg-input-bg--hover"),
54
+ "data-checked": X === e.value || void 0,
37
55
  disabled: e.disabled,
38
56
  onMouseDown: (e) => e.preventDefault(),
39
- onSelect: () => ne(e.value),
57
+ onSelect: () => be(e.value),
40
58
  value: e.label,
41
- children: e.label
59
+ children: /* @__PURE__ */ _("span", {
60
+ className: "min-w-0 flex-1 truncate whitespace-nowrap",
61
+ children: e.label
62
+ })
42
63
  }, e.value))]
43
64
  });
44
- return /* @__PURE__ */ S("div", {
65
+ return /* @__PURE__ */ v("div", {
45
66
  className: "w-full",
46
- ref: F,
67
+ ref: j,
47
68
  children: [
48
- j && /* @__PURE__ */ x("input", {
69
+ D && /* @__PURE__ */ _("input", {
49
70
  type: "hidden",
50
- name: j,
51
- value: R,
52
- disabled: K
71
+ name: D,
72
+ value: X,
73
+ disabled: W
53
74
  }),
54
- O && /* @__PURE__ */ x(d, {
55
- className: n("mb-2 block text-text-primary", k, K && "text-text-secondary"),
75
+ w && /* @__PURE__ */ _(s, {
76
+ className: n("mb-2 block text-text-primary", T, W && "text-text-secondary"),
56
77
  "data-testid": "spectral-combobox-label",
57
- htmlFor: U,
58
- children: O
78
+ htmlFor: B,
79
+ children: w
59
80
  }),
60
- /* @__PURE__ */ S(_, {
61
- ref: H,
62
- label: B ?? O,
63
- onKeyDown: re,
64
- className: n("relative w-full", C),
65
- children: [/* @__PURE__ */ S(f, {
81
+ /* @__PURE__ */ v(m, {
82
+ ref: z,
83
+ label: L ?? w,
84
+ onKeyDown: xe,
85
+ className: "relative w-full",
86
+ children: [/* @__PURE__ */ v(c, {
66
87
  "data-slot": "combobox-content",
67
- "data-state": L,
88
+ "data-state": N,
68
89
  "data-testid": "spectral-combobox-trigger",
69
- className: n("h-12 cursor-pointer border-2 border-input-border bg-input-bg", "transition duration-200 hover:border-input-border--hover", "focus-within:border-input-border--focus focus-within:outline-none", "ring-0!", c(L), X && "border-input-border--focus", K && "pointer-events-none"),
70
- onClick: ae,
71
- style: s(),
72
- children: [/* @__PURE__ */ x(_.Input, {
73
- ref: V,
90
+ className: n(r(K, N), "ring-0!", W && "pointer-events-none cursor-not-allowed", y),
91
+ onClick: Ce,
92
+ style: se(),
93
+ children: [/* @__PURE__ */ _(m.Input, {
94
+ ref: R,
74
95
  autoComplete: "off",
75
96
  "data-slot": "input-group-control",
76
- "aria-controls": W,
77
- "aria-expanded": X,
78
- "aria-label": B ?? O,
79
- className: "min-w-0 px-3 py-1 text-base flex-1 border-0 bg-transparent text-input-text outline-hidden placeholder:text-input-text! placeholder:opacity-100 focus-visible:ring-0 focus-visible:outline-none",
80
- disabled: K,
81
- id: U,
82
- onBlur: ie,
83
- onFocus: () => !K && !q && Z(!0),
84
- onValueChange: $,
85
- placeholder: te?.label ?? P,
97
+ "aria-controls": V,
98
+ "aria-expanded": K,
99
+ "aria-label": L ?? w,
100
+ className: n("min-w-0 px-3 py-1 text-base flex-1 truncate overflow-hidden border-0 bg-transparent whitespace-nowrap text-input-text outline-hidden placeholder:opacity-100 focus-visible:ring-0 focus-visible:outline-none", ve ? "placeholder:text-input-text!" : "placeholder:text-input-text-placeholder!"),
101
+ disabled: W,
102
+ id: B,
103
+ onBlur: Se,
104
+ onFocus: () => !W && !G && q(!0),
105
+ onValueChange: Y,
106
+ placeholder: Z?.label ?? A,
86
107
  role: "combobox",
87
- value: Q,
88
- ...Y
89
- }), /* @__PURE__ */ x(p, {
108
+ value: J,
109
+ ...me
110
+ }), /* @__PURE__ */ _(l, {
90
111
  align: "inline-end",
91
112
  className: "cursor-pointer",
92
- children: q ? /* @__PURE__ */ x(t, { className: "size-5 motion-safe:animate-spin" }) : /* @__PURE__ */ x(e, { className: n("size-5 shrink-0 transition-transform duration-200", X && "rotate-180") })
113
+ children: G ? /* @__PURE__ */ _(t, { className: "size-5 motion-safe:animate-spin" }) : /* @__PURE__ */ _(e, { className: n("size-5 shrink-0 transition-transform duration-200", K && "rotate-180") })
93
114
  })]
94
- }), /* @__PURE__ */ x("div", {
95
- className: n("left-0 mt-1 rounded-lg p-1 shadow-md absolute top-full z-50 w-full border border-input-border bg-input-bg", "motion-safe:animate-in motion-safe:fade-in-0 motion-safe:slide-in-from-top-2 motion-safe:zoom-in-95", !X && "hidden"),
115
+ }), /* @__PURE__ */ _("div", {
116
+ className: n("left-0 mt-1 p-1 absolute top-full z-50 w-full", ae(), "motion-safe:animate-in motion-safe:fade-in-0 motion-safe:slide-in-from-top-2 motion-safe:zoom-in-95", !K && "hidden"),
117
+ "data-dropdown-width-mode": Q,
118
+ "data-dropdown-width-value": Q === "custom" ? b : void 0,
96
119
  "data-testid": "spectral-combobox-content",
97
- children: oe()
120
+ ref: ge,
121
+ style: {
122
+ ...ye,
123
+ ...he
124
+ },
125
+ children: we()
98
126
  })]
99
127
  }),
100
- J && E && /* @__PURE__ */ x(r, {
128
+ pe && S && /* @__PURE__ */ _(te, {
101
129
  dataTestId: "spectral-combobox-error-message",
102
- id: G,
103
- message: E
130
+ id: H,
131
+ message: S
132
+ }),
133
+ N === "warning" && F && /* @__PURE__ */ _(re, {
134
+ dataTestId: "spectral-combobox-warning-message",
135
+ id: U,
136
+ message: F
104
137
  })
105
138
  ]
106
139
  });
107
140
  };
108
- C.displayName = "Combobox";
141
+ y.displayName = "Combobox";
109
142
  //#endregion
110
- export { C as Combobox };
143
+ export { y as Combobox };
@@ -460,7 +460,7 @@ var le = {
460
460
  borderWidth: "0"
461
461
  }, ue = ({ className: e, ...t }) => /* @__PURE__ */ p(J, {
462
462
  "data-slot": "command",
463
- className: a("rounded-xl! bg-popover p-1 text-popover-foreground flex size-full flex-col overflow-hidden", e),
463
+ className: a("rounded-xl! p-1 flex size-full flex-col overflow-hidden text-input-text", e),
464
464
  ...t
465
465
  }), de = ({ className: e, ...n }) => /* @__PURE__ */ p("div", {
466
466
  "data-slot": "command-input-wrapper",
@@ -483,7 +483,7 @@ var le = {
483
483
  ...t
484
484
  }), me = ({ className: t, children: n, ...r }) => /* @__PURE__ */ m(J.Item, {
485
485
  "data-slot": "command-item",
486
- className: a("group/command-item gap-2 rounded-sm px-2 py-1.5 text-base in-data-[slot=dialog-content]:rounded-lg! relative flex cursor-default items-center text-input-text outline-hidden select-none hover:bg-input-bg--hover data-selected:bg-input-bg--selected data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", t),
486
+ className: a("group/command-item text-base in-data-[slot=dialog-content]:rounded-lg! relative flex text-input-text outline-hidden select-none [&_svg]:pointer-events-none [&_svg]:shrink-0", t),
487
487
  ...r,
488
488
  children: [n, /* @__PURE__ */ p(e, { className: "ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100" })]
489
489
  });
@@ -1,6 +1,6 @@
1
1
  import { Input } from '../primitives/input';
2
2
  import { Select } from '../primitives/select';
3
- import { FormFieldState } from '../utils/formFieldUtils';
3
+ import { DropdownWidth, FormFieldState } from '../utils/formFieldUtils';
4
4
  import { ComponentProps } from 'react';
5
5
  import { ControlGroupProps } from './ControlGroup';
6
6
  export interface SelectOptionType {
@@ -24,6 +24,7 @@ type ControlGroupSelectBaseProps = ComponentProps<typeof Select> & Pick<ControlG
24
24
  className?: string;
25
25
  dataTestId?: string;
26
26
  disabled?: boolean;
27
+ dropdownWidth?: DropdownWidth;
27
28
  errorMessage?: string | string[] | Record<string, unknown> | null;
28
29
  /** When `captionLayout` is `inline`, overrides the input's accessible name (defaults to `inputPlaceholder` when set). */
29
30
  inputAriaLabel?: string;
@@ -38,6 +39,6 @@ type ControlGroupSelectBaseProps = ComponentProps<typeof Select> & Pick<ControlG
38
39
  type?: 'number' | 'text';
39
40
  };
40
41
  export type ControlGroupSelectProps = ControlGroupSelectBaseProps & ControlGroupSelectInputControlProps;
41
- export declare const ControlGroupSelect: ({ amountStep, ariaLabel, captionLayout, className, dataTestId, disabled, errorMessage, inputAriaLabel, inputPlaceholder, inputValue, maxAmount, minAmount, onInputChange, orientation, selectAriaLabel, selectOptions, selectPlaceholder, state, type, ...selectProps }: ControlGroupSelectProps) => import("react/jsx-runtime").JSX.Element;
42
+ export declare const ControlGroupSelect: ({ amountStep, ariaLabel, captionLayout, className, dataTestId, disabled, errorMessage, dropdownWidth, inputAriaLabel, inputPlaceholder, inputValue, maxAmount, minAmount, onInputChange, orientation, selectAriaLabel, selectOptions, selectPlaceholder, state, type, ...selectProps }: ControlGroupSelectProps) => import("react/jsx-runtime").JSX.Element;
42
43
  export {};
43
44
  //# sourceMappingURL=ControlGroupSelect.d.ts.map
@@ -15,102 +15,110 @@ var g = "placeholder:text-small! [appearance:textfield] [&::-webkit-inner-spin-b
15
15
  }, S = (e, t) => {
16
16
  let n = e?.trim();
17
17
  return n && n.length > 0 ? n : t;
18
- }, C = ({ amountStep: e, ariaLabel: t, captionLayout: n = "inline", className: r, dataTestId: i = "spectral-control-group-select", disabled: a, errorMessage: o, inputAriaLabel: s, inputPlaceholder: c, inputValue: u, maxAmount: d = 1e6, minAmount: p = 0, onInputChange: h, orientation: g = "horizontal", selectAriaLabel: y, selectOptions: b, selectPlaceholder: C, state: T = "default", type: E = "number", ...D }) => {
19
- let O = f(), k = `${O}-amount`, A = `${O}-select`, j = `${k}-label`, M = `${A}-label`, N = n === "above", P = N ? void 0 : c, F = N ? void 0 : C, I = S(c, _), L = S(C, v), R = s ?? (N ? void 0 : I), z = y ?? (N ? void 0 : L), B = x(c, 3), V = x(C, 5), H = t ?? `${I} and ${L}`, U = !!a || T === "disabled", W = u !== void 0 && h !== void 0;
18
+ }, C = ({ amountStep: e, ariaLabel: t, captionLayout: n = "inline", className: r, dataTestId: i = "spectral-control-group-select", disabled: a, errorMessage: o, dropdownWidth: s = "trigger", inputAriaLabel: c, inputPlaceholder: u, inputValue: d, maxAmount: p = 1e6, minAmount: h = 0, onInputChange: g, orientation: y = "horizontal", selectAriaLabel: b, selectOptions: C, selectPlaceholder: T, state: E = "default", type: D = "number", ...O }) => {
19
+ let k = f(), A = `${k}-amount`, j = `${k}-select`, M = `${A}-label`, N = `${j}-label`, P = n === "above", F = P ? void 0 : u, I = P ? void 0 : T, L = S(u, _), R = S(T, v), z = c ?? (P ? void 0 : L), B = b ?? (P ? void 0 : R), V = x(u, 3), H = x(T, 5), U = t ?? `${L} and ${R}`, W = !!a || E === "disabled", G = d !== void 0 && g !== void 0;
20
20
  return /* @__PURE__ */ m(l, {
21
- "aria-label": H,
21
+ "aria-label": U,
22
22
  className: r,
23
23
  "data-testid": i,
24
24
  disabled: a,
25
25
  errorMessage: o,
26
- orientation: g,
27
- state: T,
26
+ orientation: y,
27
+ state: E,
28
28
  children: /* @__PURE__ */ m(w, {
29
29
  amountStep: e,
30
30
  dataTestId: i,
31
- inputAccessibleName: R,
32
- inputCaption: P,
33
- inputId: k,
34
- inputLabelId: j,
35
- inputLabelText: I,
36
- inputMinWidth: B,
37
- inputValue: W ? u : void 0,
38
- isDisabled: U,
39
- maxAmount: d,
40
- minAmount: p,
41
- onInputChange: W ? h : void 0,
42
- selectCaption: F,
43
- selectOptions: b,
44
- selectLabelId: M,
45
- selectLabelText: L,
46
- selectProps: D,
47
- selectTriggerAriaLabel: z,
48
- selectTriggerId: A,
49
- selectTriggerMinWidth: V,
50
- type: E,
51
- useAboveLabels: N
31
+ inputAccessibleName: z,
32
+ inputCaption: F,
33
+ inputId: A,
34
+ inputLabelId: M,
35
+ inputLabelText: L,
36
+ inputMinWidth: V,
37
+ inputValue: G ? d : void 0,
38
+ isDisabled: W,
39
+ maxAmount: p,
40
+ minAmount: h,
41
+ onInputChange: G ? g : void 0,
42
+ dropdownWidth: s,
43
+ selectCaption: I,
44
+ selectOptions: C,
45
+ selectLabelId: N,
46
+ selectLabelText: R,
47
+ selectProps: O,
48
+ selectTriggerAriaLabel: B,
49
+ selectTriggerId: j,
50
+ selectTriggerMinWidth: H,
51
+ type: D,
52
+ useAboveLabels: P
52
53
  })
53
54
  });
54
- }, w = ({ amountStep: l, dataTestId: f, inputAccessibleName: _, inputCaption: v, inputId: x, inputLabelId: S, inputLabelText: C, inputMinWidth: w, inputValue: T, isDisabled: E, maxAmount: D, minAmount: O, onInputChange: k, selectCaption: A, selectLabelId: j, selectLabelText: M, selectOptions: N, selectProps: P, selectTriggerAriaLabel: F, selectTriggerId: I, selectTriggerMinWidth: L, type: R, useAboveLabels: z }) => {
55
- let { errorMessageId: B, orientation: V, state: H } = d(), U = V === "horizontal" ? "rounded-s-md rounded-e-none" : "rounded-ss-md rounded-se-md rounded-es-none rounded-ee-none", W = V === "horizontal" ? "rounded-s-none rounded-e-md" : "rounded-ss-none rounded-se-none rounded-es-md rounded-ee-md", G = V === "horizontal" ? "me-0" : "mbe-0", K = V === "horizontal" ? "me-0 [&>*:last-child]:-ms-0.5" : "mbe-0 [&>*:last-child]:-mt-0.5", q = /* @__PURE__ */ m(r, {
56
- "aria-describedby": B,
57
- "aria-label": _,
58
- "aria-labelledby": z ? S : void 0,
59
- className: e(b, U, t(H), R === "number" && g, R === "number" && "tabular-nums"),
55
+ }, w = ({ amountStep: l, dataTestId: f, dropdownWidth: _, inputAccessibleName: v, inputCaption: x, inputId: S, inputLabelId: C, inputLabelText: w, inputMinWidth: T, inputValue: E, isDisabled: D, maxAmount: O, minAmount: k, onInputChange: A, selectCaption: j, selectLabelId: M, selectLabelText: N, selectOptions: P, selectProps: F, selectTriggerAriaLabel: I, selectTriggerId: L, selectTriggerMinWidth: R, type: z, useAboveLabels: B }) => {
56
+ let { errorMessageId: V, orientation: H, state: U } = d(), W = H === "horizontal" ? "rounded-s-md rounded-e-none" : "rounded-ss-md rounded-se-md rounded-es-none rounded-ee-none", G = H === "horizontal" ? "rounded-s-none rounded-e-md" : "rounded-ss-none rounded-se-none rounded-es-md rounded-ee-md", K = H === "horizontal" ? "me-0" : "mbe-0", q = H === "horizontal" ? "me-0 [&>*:last-child]:-ms-0.5" : "mbe-0 [&>*:last-child]:-mt-0.5", J = /* @__PURE__ */ m(r, {
57
+ "aria-describedby": V,
58
+ "aria-label": v,
59
+ "aria-labelledby": B ? C : void 0,
60
+ className: e(b, W, t(U), z === "number" && g, z === "number" && "tabular-nums"),
60
61
  "data-testid": `${f}-input`,
61
- disabled: E,
62
- id: z ? x : void 0,
63
- type: R === "number" ? "number" : "text",
64
- placeholder: v,
65
- style: w ? { minWidth: w } : void 0,
66
- min: O ?? 0,
67
- max: D ?? 1e6,
68
- ...T !== void 0 && k !== void 0 ? {
69
- value: T,
70
- onChange: k
62
+ disabled: D,
63
+ id: B ? S : void 0,
64
+ type: z === "number" ? "number" : "text",
65
+ placeholder: x,
66
+ style: T ? { minWidth: T } : void 0,
67
+ min: k ?? 0,
68
+ max: O ?? 1e6,
69
+ ...E !== void 0 && A !== void 0 ? {
70
+ value: E,
71
+ onChange: A
71
72
  } : {},
72
73
  step: l ?? 1
73
- }), J = /* @__PURE__ */ m(s, {
74
- "aria-describedby": B,
75
- "aria-label": F,
76
- "aria-labelledby": z ? j : void 0,
77
- className: e(b, W, "px-4 w-full justify-between focus-visible:ring-0", t(H)),
74
+ }), Y = /* @__PURE__ */ m(s, {
75
+ "aria-describedby": V,
76
+ "aria-label": I,
77
+ "aria-labelledby": B ? M : void 0,
78
+ className: e(b, G, "px-4 w-full justify-between focus-visible:ring-0", t(U)),
78
79
  "data-testid": `${f}-select-trigger`,
79
- disabled: E,
80
- id: z ? I : void 0,
81
- style: L ? { minWidth: L } : void 0,
82
- children: /* @__PURE__ */ m(c, { placeholder: A })
80
+ disabled: D,
81
+ id: B ? L : void 0,
82
+ style: R ? { minWidth: R } : void 0,
83
+ children: /* @__PURE__ */ m(c, {
84
+ className: "min-w-0 block max-w-full truncate text-left whitespace-nowrap text-input-text! data-placeholder:text-input-text-placeholder!",
85
+ placeholder: j
86
+ })
83
87
  });
84
88
  return /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(u, {
85
- className: z ? G : void 0,
86
- children: z ? /* @__PURE__ */ h("div", {
89
+ className: B ? K : void 0,
90
+ children: B ? /* @__PURE__ */ h("div", {
87
91
  className: y,
88
92
  children: [/* @__PURE__ */ m(n, {
89
93
  className: "text-text-primary",
90
- htmlFor: x,
91
- id: S,
92
- children: C
93
- }), q]
94
- }) : q
94
+ htmlFor: S,
95
+ id: C,
96
+ children: w
97
+ }), J]
98
+ }) : J
95
99
  }), /* @__PURE__ */ h(i, {
96
100
  "data-testid": `${f}-select-root`,
97
- disabled: E,
98
- ...P,
101
+ disabled: D,
102
+ ...F,
99
103
  children: [/* @__PURE__ */ m(u, {
100
- className: z ? K : void 0,
101
- children: z ? /* @__PURE__ */ h("div", {
104
+ className: B ? q : void 0,
105
+ children: B ? /* @__PURE__ */ h("div", {
102
106
  className: y,
103
107
  children: [/* @__PURE__ */ m(n, {
104
108
  className: "text-text-primary",
105
- htmlFor: I,
106
- id: j,
107
- children: M
108
- }), J]
109
- }) : J
110
- }), /* @__PURE__ */ m(a, { children: N.map((e) => /* @__PURE__ */ m(o, {
111
- value: e.value,
112
- children: e.label
113
- }, e.value)) })]
109
+ htmlFor: L,
110
+ id: M,
111
+ children: N
112
+ }), Y]
113
+ }) : Y
114
+ }), /* @__PURE__ */ m(a, {
115
+ "data-testid": `${f}-select-content`,
116
+ dropdownWidth: _,
117
+ children: P.map((e) => /* @__PURE__ */ m(o, {
118
+ value: e.value,
119
+ children: e.label
120
+ }, e.value))
121
+ })]
114
122
  })] });
115
123
  };
116
124
  //#endregion
@@ -2,7 +2,7 @@
2
2
  import "../styles/main.css";
3
3
  import { t as e } from "../twUtils-VNWgstKL.js";
4
4
  import { getInputClasses as t } from "../utils/formFieldUtils.js";
5
- import { useControllableState as n } from "../hooks/useControllableState.js";
5
+ import { useUncontrolledState as n } from "../hooks/useUncontrolledState.js";
6
6
  import { Label as r } from "../Label.js";
7
7
  import { S as i, b as a, f as o } from "../DateTimeUtils-DVvG6H-p.js";
8
8
  import { forwardRef as s, useCallback as c, useEffect as l, useMemo as u, useRef as d } from "react";
@@ -3,7 +3,7 @@ import "./styles/main.css";
3
3
  import { CalendarIcon as e } from "./Icons/CalendarIcon.js";
4
4
  import { t } from "./twUtils-VNWgstKL.js";
5
5
  import { ErrorMessage as n } from "./utils/formFieldUtils.js";
6
- import { useControllableState as r } from "./hooks/useControllableState.js";
6
+ import { useUncontrolledState as r } from "./hooks/useUncontrolledState.js";
7
7
  import { Popover as i, PopoverContent as a, PopoverTrigger as o } from "./Popover.js";
8
8
  import { t as s } from "./Calendar-s4lyijkn.js";
9
9
  import { A as c, C as l, D as u, E as d, F as f, I as p, L as m, M as h, N as g, O as _, P as v, S as y, T as b, _ as x, a as S, b as C, c as w, d as T, f as E, g as D, h as O, i as k, j as A, k as j, l as M, m as N, n as P, o as F, p as I, r as L, s as R, t as z, u as B, v as V, w as H, x as U, y as W } from "./DateTimeUtils-DVvG6H-p.js";
@@ -1,5 +1,5 @@
1
1
  import { IconProps } from './iconTypes';
2
- export declare const AnalyzeIcon: (({ ref, className, ariaHidden, title, description, size, ...rest }: IconProps) => import("react/jsx-runtime").JSX.Element) & {
2
+ export declare const AnalyzeIcon: (({ ref, className, title, description, size, ...rest }: IconProps) => import("react/jsx-runtime").JSX.Element) & {
3
3
  displayName: string;
4
4
  };
5
5
  //# sourceMappingURL=AnalyzeIcon.d.ts.map
@@ -1,14 +1,13 @@
1
1
  import "../styles/main.css";
2
2
  import { IconBase as e } from "./IconBase.js";
3
3
  import { jsx as t, jsxs as n } from "react/jsx-runtime";
4
- var r = Object.assign(({ ref: r, className: i, ariaHidden: a, title: o, description: s, size: c = 24, ...l }) => /* @__PURE__ */ n(e, {
5
- size: c,
4
+ var r = Object.assign(({ ref: r, className: i, title: a, description: o, size: s = 24, ...c }) => /* @__PURE__ */ n(e, {
5
+ size: s,
6
6
  className: i,
7
- title: o,
8
- description: s,
9
- ariaHidden: a,
7
+ title: a,
8
+ description: o,
10
9
  ref: r,
11
- ...l,
10
+ ...c,
12
11
  children: [
13
12
  /* @__PURE__ */ t("path", {
14
13
  d: "M20.8889 10.8889C20.6171 8.93372 19.71 7.12214 18.3074 5.73317C16.9048 4.34421 15.0844 3.4549 13.1267 3.20222C11.3783 2.97471 9.60165 3.26606 8.01753 4.04004C6.43341 4.81403 5.11169 6.03652 4.21667 7.55555",
@@ -1,5 +1,5 @@
1
1
  import { IconProps } from './iconTypes';
2
- export declare const AnnotationsIcon: (({ ref, className, ariaHidden, title, description, size, ...rest }: IconProps) => import("react/jsx-runtime").JSX.Element) & {
2
+ export declare const AnnotationsIcon: (({ ref, className, title, description, size, ...rest }: IconProps) => import("react/jsx-runtime").JSX.Element) & {
3
3
  displayName: string;
4
4
  };
5
5
  //# sourceMappingURL=AnnotationsIcon.d.ts.map
@@ -1,14 +1,13 @@
1
1
  import "../styles/main.css";
2
2
  import { IconBase as e } from "./IconBase.js";
3
3
  import { jsx as t } from "react/jsx-runtime";
4
- var n = Object.assign(({ ref: n, className: r, ariaHidden: i, title: a, description: o, size: s = 24, ...c }) => /* @__PURE__ */ t(e, {
5
- size: s,
4
+ var n = Object.assign(({ ref: n, className: r, title: i, description: a, size: o = 24, ...s }) => /* @__PURE__ */ t(e, {
5
+ size: o,
6
6
  className: r,
7
- title: a,
8
- description: o,
9
- ariaHidden: i,
7
+ title: i,
8
+ description: a,
10
9
  ref: n,
11
- ...c,
10
+ ...s,
12
11
  children: /* @__PURE__ */ t("path", {
13
12
  d: "M13.6952 5.72122L15.8197 3.59668C16.6152 2.80111 17.9052 2.80111 18.7007 3.59668L20.4034 5.29931C21.1989 6.09488 21.1989 7.38475 20.4034 8.18031L18.2788 10.3049M13.6952 5.72122L3.29833 16.118C3.10732 16.309 3 16.5681 3 16.8383V21H7.16173C7.43187 21 7.69096 20.8927 7.88197 20.7017L18.2788 10.3049M13.6952 5.72122L18.2788 10.3049",
14
13
  stroke: "currentColor",