@spear-ai/spectral 1.3.67 → 1.3.68

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 (306) hide show
  1. package/dist/Accordion.js +7 -31
  2. package/dist/Alert/AlertBase.d.ts +10 -1
  3. package/dist/Alert/AlertBase.js +25 -42
  4. package/dist/Alert.d.ts +5 -5
  5. package/dist/Alert.js +43 -54
  6. package/dist/Avatar.js +4 -33
  7. package/dist/Badge.js +1 -6
  8. package/dist/Button.d.ts +1 -1
  9. package/dist/Button.js +32 -67
  10. package/dist/ButtonGroup/ButtonGroupButton.js +1 -10
  11. package/dist/ButtonGroup.js +6 -42
  12. package/dist/ButtonIcon.d.ts +4 -4
  13. package/dist/ButtonIcon.js +44 -53
  14. package/dist/Card.js +6 -13
  15. package/dist/Checkbox/CheckboxBase.js +4 -15
  16. package/dist/Checkbox.js +24 -40
  17. package/dist/Dialog/DialogBase.d.ts +17 -17
  18. package/dist/Dialog/DialogBase.js +13 -62
  19. package/dist/Dialog.d.ts +1 -1
  20. package/dist/Dialog.js +6 -44
  21. package/dist/Drawer.d.ts +6 -6
  22. package/dist/Drawer.js +6 -14
  23. package/dist/HoverCard.d.ts +5 -4
  24. package/dist/HoverCard.js +148 -138
  25. package/dist/Icons/AnalyzeIcon.js +52 -64
  26. package/dist/Icons/AnnotationsIcon.js +8 -20
  27. package/dist/Icons/ApprovedIcon.js +13 -34
  28. package/dist/Icons/CalendarIcon.js +15 -54
  29. package/dist/Icons/CheckCircleIcon.js +5 -21
  30. package/dist/Icons/CheckSquareIcon.js +5 -21
  31. package/dist/Icons/CheckmarkIcon.js +4 -20
  32. package/dist/Icons/ChevronDownIcon.js +4 -20
  33. package/dist/Icons/ChevronUpIcon.js +4 -20
  34. package/dist/Icons/ClockIcon.js +13 -34
  35. package/dist/Icons/CloseCircleIcon.js +5 -21
  36. package/dist/Icons/CloseIcon.js +4 -20
  37. package/dist/Icons/DashboardIcon.js +5 -44
  38. package/dist/Icons/DatabaseIcon.js +14 -44
  39. package/dist/Icons/DeleteIcon.js +14 -44
  40. package/dist/Icons/DurationIcon.js +17 -74
  41. package/dist/Icons/EmailIcon.js +5 -21
  42. package/dist/Icons/EraserIcon.js +16 -37
  43. package/dist/Icons/ErrorIcon.js +6 -22
  44. package/dist/Icons/EyeClosedIcon.js +8 -24
  45. package/dist/Icons/EyeClosedIcon2.js +6 -22
  46. package/dist/Icons/EyeOpenIcon.js +4 -20
  47. package/dist/Icons/GoToFirstIcon.js +4 -34
  48. package/dist/Icons/GoToLastIcon.js +4 -34
  49. package/dist/Icons/HarmonicCursorsIcon.js +4 -31
  50. package/dist/Icons/IconBase.js +5 -22
  51. package/dist/Icons/InfoIcon.js +5 -26
  52. package/dist/Icons/LabelIcon.js +7 -19
  53. package/dist/Icons/LassoIcon.js +23 -44
  54. package/dist/Icons/LineToolIcon.js +5 -17
  55. package/dist/Icons/LineToolIcon2.js +43 -64
  56. package/dist/Icons/LiveViewIcon.js +7 -64
  57. package/dist/Icons/LoaderIcon.js +18 -42
  58. package/dist/Icons/LocationIcon.js +22 -34
  59. package/dist/Icons/LogoutIcon.js +8 -20
  60. package/dist/Icons/MessagesIcon.js +13 -25
  61. package/dist/Icons/MetadataIcon.js +8 -20
  62. package/dist/Icons/MinusIcon.js +1 -17
  63. package/dist/Icons/OntologyIcon.js +66 -78
  64. package/dist/Icons/PanelIconClose.js +5 -21
  65. package/dist/Icons/PanelIconOpen.js +5 -21
  66. package/dist/Icons/PlayIcon.js +1 -22
  67. package/dist/Icons/PlusIcon.js +7 -20
  68. package/dist/Icons/ResetIcon.js +5 -17
  69. package/dist/Icons/ReviewedIcon.js +14 -35
  70. package/dist/Icons/ScissorsIcon.js +12 -30
  71. package/dist/Icons/SettingsIcon.js +22 -34
  72. package/dist/Icons/SortAscendingIcon.js +7 -64
  73. package/dist/Icons/SortDescendingIcon.js +7 -64
  74. package/dist/Icons/StackIcon.js +4 -34
  75. package/dist/Icons/StarIcon.js +1 -22
  76. package/dist/Icons/TrashIcon.js +5 -17
  77. package/dist/Icons/UndoIcon.js +8 -20
  78. package/dist/Icons/UserIcon.js +7 -19
  79. package/dist/Icons/WarningIcon.js +7 -19
  80. package/dist/Icons/ZoomAllIcon.js +10 -94
  81. package/dist/Icons/ZoomXIcon.js +5 -35
  82. package/dist/Icons/ZoomYIcon.js +5 -44
  83. package/dist/Input.d.ts +22 -20
  84. package/dist/Input.js +52 -92
  85. package/dist/InputGroup.js +2 -47
  86. package/dist/InputOTP.js +63 -99
  87. package/dist/Label.js +1 -12
  88. package/dist/MultiSelect/MultiSelectBase.d.ts +24 -24
  89. package/dist/MultiSelect/MultiSelectBase.js +82 -151
  90. package/dist/MultiSelect/MutiSelect.d.ts +6 -6
  91. package/dist/MultiSelect/MutiSelect.js +9 -21
  92. package/dist/Popover.js +2 -9
  93. package/dist/RadioButtonGroup/RadioButtonGroupBase.d.ts +8 -8
  94. package/dist/RadioButtonGroup/RadioButtonGroupBase.js +1 -27
  95. package/dist/RadioButtonGroup.d.ts +1 -1
  96. package/dist/RadioButtonGroup.js +1 -11
  97. package/dist/RadioGroup.d.ts +16 -16
  98. package/dist/RadioGroup.js +40 -92
  99. package/dist/Select.d.ts +7 -6
  100. package/dist/Select.js +81 -135
  101. package/dist/Separator.js +13 -15
  102. package/dist/Slider/SliderBase.js +129 -188
  103. package/dist/Slider.js +4 -41
  104. package/dist/Switch/SwitchBase.js +84 -106
  105. package/dist/Switch.d.ts +6 -6
  106. package/dist/Switch.js +34 -49
  107. package/dist/Tabs/TabsBase.d.ts +18 -18
  108. package/dist/Tabs/TabsBase.js +12 -71
  109. package/dist/Tabs/tabsStoryData.js +2 -2
  110. package/dist/Tabs/tabsUtils.d.ts +17 -17
  111. package/dist/Tabs.d.ts +14 -14
  112. package/dist/Tabs.js +67 -130
  113. package/dist/Textarea/TextareaUtils.d.ts +1 -1
  114. package/dist/Textarea.d.ts +9 -8
  115. package/dist/Textarea.js +49 -84
  116. package/dist/Toggle/ToggleBase.d.ts +4 -4
  117. package/dist/Toggle/ToggleBase.js +2 -27
  118. package/dist/Toggle.js +1 -11
  119. package/dist/ToggleGroup/ToggleGroupBase.d.ts +8 -8
  120. package/dist/ToggleGroup/ToggleGroupBase.js +6 -35
  121. package/dist/ToggleGroup.js +1 -1
  122. package/dist/Tooltip/TooltipBase.d.ts +1 -1
  123. package/dist/Tooltip/TooltipBase.js +5 -47
  124. package/dist/Tray/TrayStoriesData.d.ts +1 -1
  125. package/dist/Tray/TrayStoriesData.js +22 -134
  126. package/dist/Tray.d.ts +6 -2
  127. package/dist/Tray.js +55 -68
  128. package/dist/components/Accordion/Accordion.d.ts.map +1 -1
  129. package/dist/components/Alert/Alert.d.ts +5 -5
  130. package/dist/components/Alert/Alert.d.ts.map +1 -1
  131. package/dist/components/Alert/AlertBase.d.ts +10 -1
  132. package/dist/components/Alert/AlertBase.d.ts.map +1 -1
  133. package/dist/components/Avatar/Avatar.d.ts.map +1 -1
  134. package/dist/components/Badge/Badge.d.ts.map +1 -1
  135. package/dist/components/Button/Button.d.ts +1 -1
  136. package/dist/components/Button/Button.d.ts.map +1 -1
  137. package/dist/components/ButtonGroup/ButtonGroup.d.ts.map +1 -1
  138. package/dist/components/ButtonGroup/ButtonGroupButton.d.ts.map +1 -1
  139. package/dist/components/ButtonIcon/ButtonIcon.d.ts +4 -4
  140. package/dist/components/ButtonIcon/ButtonIcon.d.ts.map +1 -1
  141. package/dist/components/Card/Card.d.ts.map +1 -1
  142. package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
  143. package/dist/components/Checkbox/CheckboxBase.d.ts.map +1 -1
  144. package/dist/components/Dialog/Dialog.d.ts +1 -1
  145. package/dist/components/Dialog/Dialog.d.ts.map +1 -1
  146. package/dist/components/Dialog/DialogBase.d.ts +17 -17
  147. package/dist/components/Dialog/DialogBase.d.ts.map +1 -1
  148. package/dist/components/Drawer/Drawer.d.ts +6 -6
  149. package/dist/components/Drawer/Drawer.d.ts.map +1 -1
  150. package/dist/components/HoverCard/HoverCard.d.ts +5 -4
  151. package/dist/components/HoverCard/HoverCard.d.ts.map +1 -1
  152. package/dist/components/Icons/AnalyzeIcon.d.ts.map +1 -1
  153. package/dist/components/Icons/AnnotationsIcon.d.ts.map +1 -1
  154. package/dist/components/Icons/ApprovedIcon.d.ts.map +1 -1
  155. package/dist/components/Icons/CalendarIcon.d.ts.map +1 -1
  156. package/dist/components/Icons/CheckCircleIcon.d.ts.map +1 -1
  157. package/dist/components/Icons/CheckSquareIcon.d.ts.map +1 -1
  158. package/dist/components/Icons/CheckmarkIcon.d.ts.map +1 -1
  159. package/dist/components/Icons/ChevronDownIcon.d.ts.map +1 -1
  160. package/dist/components/Icons/ChevronUpIcon.d.ts.map +1 -1
  161. package/dist/components/Icons/ClockIcon.d.ts.map +1 -1
  162. package/dist/components/Icons/CloseCircleIcon.d.ts.map +1 -1
  163. package/dist/components/Icons/CloseIcon.d.ts.map +1 -1
  164. package/dist/components/Icons/DashboardIcon.d.ts.map +1 -1
  165. package/dist/components/Icons/DatabaseIcon.d.ts.map +1 -1
  166. package/dist/components/Icons/DeleteIcon.d.ts.map +1 -1
  167. package/dist/components/Icons/DurationIcon.d.ts.map +1 -1
  168. package/dist/components/Icons/EmailIcon.d.ts.map +1 -1
  169. package/dist/components/Icons/EraserIcon.d.ts.map +1 -1
  170. package/dist/components/Icons/ErrorIcon.d.ts.map +1 -1
  171. package/dist/components/Icons/EyeClosedIcon.d.ts.map +1 -1
  172. package/dist/components/Icons/EyeClosedIcon2.d.ts.map +1 -1
  173. package/dist/components/Icons/EyeOpenIcon.d.ts.map +1 -1
  174. package/dist/components/Icons/GoToFirstIcon.d.ts.map +1 -1
  175. package/dist/components/Icons/GoToLastIcon.d.ts.map +1 -1
  176. package/dist/components/Icons/HarmonicCursorsIcon.d.ts.map +1 -1
  177. package/dist/components/Icons/IconBase.d.ts.map +1 -1
  178. package/dist/components/Icons/InfoIcon.d.ts.map +1 -1
  179. package/dist/components/Icons/LabelIcon.d.ts.map +1 -1
  180. package/dist/components/Icons/LassoIcon.d.ts.map +1 -1
  181. package/dist/components/Icons/LineToolIcon.d.ts.map +1 -1
  182. package/dist/components/Icons/LineToolIcon2.d.ts.map +1 -1
  183. package/dist/components/Icons/LiveViewIcon.d.ts.map +1 -1
  184. package/dist/components/Icons/LoaderIcon.d.ts.map +1 -1
  185. package/dist/components/Icons/LocationIcon.d.ts.map +1 -1
  186. package/dist/components/Icons/LogoutIcon.d.ts.map +1 -1
  187. package/dist/components/Icons/MessagesIcon.d.ts.map +1 -1
  188. package/dist/components/Icons/MetadataIcon.d.ts.map +1 -1
  189. package/dist/components/Icons/MinusIcon.d.ts.map +1 -1
  190. package/dist/components/Icons/OntologyIcon.d.ts.map +1 -1
  191. package/dist/components/Icons/PanelIconClose.d.ts.map +1 -1
  192. package/dist/components/Icons/PanelIconOpen.d.ts.map +1 -1
  193. package/dist/components/Icons/PlayIcon.d.ts.map +1 -1
  194. package/dist/components/Icons/PlusIcon.d.ts.map +1 -1
  195. package/dist/components/Icons/ResetIcon.d.ts.map +1 -1
  196. package/dist/components/Icons/ReviewedIcon.d.ts.map +1 -1
  197. package/dist/components/Icons/ScissorsIcon.d.ts.map +1 -1
  198. package/dist/components/Icons/SettingsIcon.d.ts.map +1 -1
  199. package/dist/components/Icons/SortAscendingIcon.d.ts.map +1 -1
  200. package/dist/components/Icons/SortDescendingIcon.d.ts.map +1 -1
  201. package/dist/components/Icons/StackIcon.d.ts.map +1 -1
  202. package/dist/components/Icons/StarIcon.d.ts.map +1 -1
  203. package/dist/components/Icons/TrashIcon.d.ts.map +1 -1
  204. package/dist/components/Icons/UndoIcon.d.ts.map +1 -1
  205. package/dist/components/Icons/UserIcon.d.ts.map +1 -1
  206. package/dist/components/Icons/WarningIcon.d.ts.map +1 -1
  207. package/dist/components/Icons/ZoomAllIcon.d.ts.map +1 -1
  208. package/dist/components/Icons/ZoomXIcon.d.ts.map +1 -1
  209. package/dist/components/Icons/ZoomYIcon.d.ts.map +1 -1
  210. package/dist/components/Input/Input.d.ts +22 -20
  211. package/dist/components/Input/Input.d.ts.map +1 -1
  212. package/dist/components/Input/InputUtils.d.ts.map +1 -1
  213. package/dist/components/InputGroup/InputGroup.d.ts.map +1 -1
  214. package/dist/components/InputOTP/InputOTP.d.ts.map +1 -1
  215. package/dist/components/Label/Label.d.ts.map +1 -1
  216. package/dist/components/MultiSelect/MultiSelectBase.d.ts +24 -24
  217. package/dist/components/MultiSelect/MultiSelectBase.d.ts.map +1 -1
  218. package/dist/components/MultiSelect/MutiSelect.d.ts +6 -6
  219. package/dist/components/MultiSelect/MutiSelect.d.ts.map +1 -1
  220. package/dist/components/Popover/Popover.d.ts.map +1 -1
  221. package/dist/components/RadioButtonGroup/RadioButtonGroup.d.ts +1 -1
  222. package/dist/components/RadioButtonGroup/RadioButtonGroup.d.ts.map +1 -1
  223. package/dist/components/RadioButtonGroup/RadioButtonGroupBase.d.ts +8 -8
  224. package/dist/components/RadioButtonGroup/RadioButtonGroupBase.d.ts.map +1 -1
  225. package/dist/components/RadioGroup/RadioGroup.d.ts +16 -16
  226. package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -1
  227. package/dist/components/Select/Select.d.ts +7 -6
  228. package/dist/components/Select/Select.d.ts.map +1 -1
  229. package/dist/components/Separator/Separator.d.ts.map +1 -1
  230. package/dist/components/Slider/Slider.d.ts.map +1 -1
  231. package/dist/components/Slider/SliderBase.d.ts.map +1 -1
  232. package/dist/components/Switch/Switch.d.ts +6 -6
  233. package/dist/components/Switch/Switch.d.ts.map +1 -1
  234. package/dist/components/Switch/SwitchBase.d.ts.map +1 -1
  235. package/dist/components/Tabs/Tabs.d.ts +14 -14
  236. package/dist/components/Tabs/Tabs.d.ts.map +1 -1
  237. package/dist/components/Tabs/TabsBase.d.ts +18 -18
  238. package/dist/components/Tabs/TabsBase.d.ts.map +1 -1
  239. package/dist/components/Tabs/tabsStoryData.d.ts.map +1 -1
  240. package/dist/components/Tabs/tabsUtils.d.ts +17 -17
  241. package/dist/components/Tabs/tabsUtils.d.ts.map +1 -1
  242. package/dist/components/Textarea/Textarea.d.ts +9 -8
  243. package/dist/components/Textarea/Textarea.d.ts.map +1 -1
  244. package/dist/components/Textarea/TextareaUtils.d.ts +1 -1
  245. package/dist/components/Textarea/TextareaUtils.d.ts.map +1 -1
  246. package/dist/components/Toggle/Toggle.d.ts.map +1 -1
  247. package/dist/components/Toggle/ToggleBase.d.ts +4 -4
  248. package/dist/components/Toggle/ToggleBase.d.ts.map +1 -1
  249. package/dist/components/ToggleGroup/ToggleGroup.d.ts.map +1 -1
  250. package/dist/components/ToggleGroup/ToggleGroupBase.d.ts +8 -8
  251. package/dist/components/ToggleGroup/ToggleGroupBase.d.ts.map +1 -1
  252. package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
  253. package/dist/components/Tooltip/TooltipBase.d.ts +1 -1
  254. package/dist/components/Tooltip/TooltipBase.d.ts.map +1 -1
  255. package/dist/components/Tray/Tray.d.ts +6 -2
  256. package/dist/components/Tray/Tray.d.ts.map +1 -1
  257. package/dist/components/Tray/TrayStoriesData.d.ts +1 -1
  258. package/dist/components/Tray/TrayStoriesData.d.ts.map +1 -1
  259. package/dist/features/AuthCard/AuthCard.d.ts.map +1 -1
  260. package/dist/features/AuthCard/AuthToggle.d.ts.map +1 -1
  261. package/dist/features/AuthCard/AuthToggle.js +4 -20
  262. package/dist/features/AuthCard/ForgotPasswordEmailForm.d.ts +1 -1
  263. package/dist/features/AuthCard/ForgotPasswordEmailForm.d.ts.map +1 -1
  264. package/dist/features/AuthCard/ForgotPasswordEmailForm.js +5 -21
  265. package/dist/features/AuthCard/ForgotPasswordResetForm.d.ts +1 -1
  266. package/dist/features/AuthCard/ForgotPasswordResetForm.d.ts.map +1 -1
  267. package/dist/features/AuthCard/ForgotPasswordResetForm.js +5 -50
  268. package/dist/features/AuthCard/OTPInput.d.ts +1 -1
  269. package/dist/features/AuthCard/OTPInput.d.ts.map +1 -1
  270. package/dist/features/AuthCard/OTPInput.js +3 -21
  271. package/dist/features/AuthCard/PasswordInput.d.ts +1 -1
  272. package/dist/features/AuthCard/PasswordInput.d.ts.map +1 -1
  273. package/dist/features/AuthCard/PasswordInput.js +9 -50
  274. package/dist/features/AuthCard/SignInForm.d.ts.map +1 -1
  275. package/dist/features/AuthCard/SignInForm.js +7 -51
  276. package/dist/features/AuthCard/SignUpForm.d.ts.map +1 -1
  277. package/dist/features/AuthCard/SignUpForm.js +10 -55
  278. package/dist/features/AuthCard.js +144 -248
  279. package/dist/features/ClearDialog/ClearDialog.d.ts.map +1 -1
  280. package/dist/features/ClearDialog.js +10 -10
  281. package/dist/features/LabelingTools/LabelingTools.d.ts.map +1 -1
  282. package/dist/features/LabelingTools.js +21 -56
  283. package/dist/features/SensorMetadata/SensorMetadata.d.ts.map +1 -1
  284. package/dist/features/SensorMetadata.js +20 -20
  285. package/dist/features/SettingsPopover/SettingsPopover.d.ts.map +1 -1
  286. package/dist/features/SettingsPopover.js +14 -14
  287. package/dist/hooks/useAccordionAutoScroll.d.ts.map +1 -1
  288. package/dist/hooks/useControllableState.d.ts.map +1 -1
  289. package/dist/index.d.ts +2 -2
  290. package/dist/index.d.ts.map +1 -1
  291. package/dist/primitives/button.d.ts.map +1 -1
  292. package/dist/primitives/input.d.ts.map +1 -1
  293. package/dist/primitives/input.js +4 -1
  294. package/dist/primitives/select.d.ts +1 -1
  295. package/dist/primitives/select.d.ts.map +1 -1
  296. package/dist/primitives/select.js +7 -55
  297. package/dist/primitives/slot.d.ts.map +1 -1
  298. package/dist/primitives/slot.js +1 -4
  299. package/dist/primitives/textarea.d.ts.map +1 -1
  300. package/dist/primitives/textarea.js +3 -1
  301. package/dist/styles/main.css +1 -1
  302. package/dist/utils/formFieldUtils.d.ts +4 -2
  303. package/dist/utils/formFieldUtils.d.ts.map +1 -1
  304. package/dist/utils/formFieldUtils.js +3 -34
  305. package/dist/utils/refs.d.ts.map +1 -1
  306. package/package.json +23 -16
@@ -2,7 +2,7 @@ import { ChangeEvent, ClipboardEvent, FocusEvent } from 'react';
2
2
  export type UseTextareaOptions = {
3
3
  maxLength: number;
4
4
  value: string;
5
- onChange?: (value: string) => void;
5
+ onChange: (value: string) => void;
6
6
  onFocus?: (e: FocusEvent<HTMLTextAreaElement>) => void;
7
7
  onBlur?: (e: FocusEvent<HTMLTextAreaElement>) => void;
8
8
  };
@@ -2,17 +2,18 @@ import { FormFieldState } from '../../utils/formFieldUtils';
2
2
  import { ComponentProps, FocusEvent } from 'react';
3
3
  export type TextareaState = FormFieldState;
4
4
  export type TextareaProps = Omit<ComponentProps<'textarea'>, 'onChange'> & {
5
+ className?: string | undefined;
6
+ errorMessage?: string | undefined;
7
+ id?: string | undefined;
8
+ label: string;
9
+ labelClassName?: string;
10
+ maxLength?: number | undefined;
11
+ name: string;
5
12
  onBlur?: (e: FocusEvent<HTMLTextAreaElement>) => void;
6
13
  onChange?: (value: string) => void;
7
14
  onFocus?: (e: FocusEvent<HTMLTextAreaElement>) => void;
8
- readonly className?: string | undefined;
9
- readonly errorMessage?: string | undefined;
10
- readonly id?: string | undefined;
11
- readonly label: string;
12
- readonly maxLength?: number | undefined;
13
- readonly name: string;
14
- readonly placeholder?: string | undefined;
15
- readonly state?: TextareaState;
15
+ placeholder?: string | undefined;
16
+ state?: TextareaState;
16
17
  value?: string | undefined;
17
18
  };
18
19
  export declare const Textarea: import('react').ForwardRefExoticComponent<Omit<TextareaProps, "ref"> & import('react').RefAttributes<HTMLTextAreaElement>>;
package/dist/Textarea.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import "./styles/main.css";
3
- import { jsxs as l, jsx as e } from "react/jsx-runtime";
4
- import { useTextarea as z } from "./Textarea/TextareaUtils.js";
3
+ import { jsxs as n, jsx as e } from "react/jsx-runtime";
4
+ import { useTextarea as B } from "./Textarea/TextareaUtils.js";
5
5
  import "./Icons/AnalyzeIcon.js";
6
6
  import "./Icons/AnnotationsIcon.js";
7
7
  import "./Icons/ApprovedIcon.js";
@@ -33,7 +33,7 @@ import "./Icons/LassoIcon.js";
33
33
  import "./Icons/LineToolIcon.js";
34
34
  import "./Icons/LineToolIcon2.js";
35
35
  import "./Icons/LiveViewIcon.js";
36
- import { LoaderIcon as B } from "./Icons/LoaderIcon.js";
36
+ import { LoaderIcon as D } from "./Icons/LoaderIcon.js";
37
37
  import "./Icons/LocationIcon.js";
38
38
  import "./Icons/LogoutIcon.js";
39
39
  import "./Icons/MessagesIcon.js";
@@ -59,102 +59,67 @@ import "./Icons/WarningIcon.js";
59
59
  import "./Icons/ZoomAllIcon.js";
60
60
  import "./Icons/ZoomXIcon.js";
61
61
  import "./Icons/ZoomYIcon.js";
62
- import { Label as D } from "./Label.js";
63
- import { useFormFieldId as E, getAriaProps as O, getErrorMessageId as _, getTextareaClasses as $, useFormFieldState as G } from "./utils/formFieldUtils.js";
64
- import { cn as h } from "./utils/twUtils.js";
65
- import { forwardRef as M, useRef as V } from "react";
66
- const H = "absolute right-4 top-4", J = (r) => r || "off", K = (r, t) => {
67
- const o = "absolute bottom-2 right-3 text-xs pointer-events-none z-10 tabular-nums", i = r >= t ? "text-danger-400" : "text-text-secondary";
68
- return h(o, i);
69
- }, Q = M(
70
- ({
71
- className: r,
72
- state: t = "default",
73
- errorMessage: o,
74
- name: i,
75
- id: f,
76
- label: n,
77
- placeholder: g,
78
- value: m = "",
79
- onFocus: C,
80
- onBlur: b,
81
- onChange: N,
82
- disabled: F,
83
- required: d,
84
- maxLength: a = 280,
85
- autoComplete: I,
86
- ...c
87
- }, v) => {
88
- const s = E(f, i), u = _(s), S = V(null), y = v || S, { handleFocus: P, handleBlur: w, handleChange: A, handlePaste: R } = z({
89
- maxLength: a,
90
- value: m,
91
- onChange: N,
92
- onFocus: C,
93
- onBlur: b
94
- }), { isDisabled: x, isLoading: T } = G(F, t), L = O(t, d, u, c["aria-describedby"]), p = m?.length || 0, j = $(t, r), k = () => ({
62
+ import { Label as E } from "./Label.js";
63
+ import { useFormFieldId as O, getAriaProps as _, getErrorMessageId as $, getTextareaClasses as G, useFormFieldState as M } from "./utils/formFieldUtils.js";
64
+ import { cn as g } from "./utils/twUtils.js";
65
+ import { forwardRef as V, useRef as H } from "react";
66
+ const J = "absolute right-4 top-4", K = (t) => t || "off", Q = (t, a) => {
67
+ const m = "absolute bottom-2 right-3 text-xs pointer-events-none z-10 tabular-nums", o = t >= a ? "text-danger-400" : "text-text-secondary";
68
+ return g(m, o);
69
+ }, U = V(
70
+ ({ autoComplete: t, className: a, disabled: m, errorMessage: o, id: C, label: d, labelClassName: b, maxLength: i = 280, name: c, onBlur: N, onChange: F, onFocus: I, placeholder: v, required: u, state: r = "default", value: s = "", ...x }, S) => {
71
+ const p = O(C, c), h = $(p), y = H(null), P = S || y, { handleFocus: w, handleBlur: A, handleChange: R, handlePaste: T } = B({
72
+ maxLength: i,
73
+ value: s,
74
+ onChange: F || (() => {
75
+ }),
76
+ onFocus: I,
77
+ onBlur: N
78
+ }), { isDisabled: f, isLoading: L } = M(m, r), j = _(r, u, h, x["aria-describedby"]), l = s?.length || 0, k = G(r, a), z = () => ({
95
79
  "--textarea-min-height": "6rem",
96
80
  "--textarea-max-height": "12rem",
97
81
  "--textarea-border-radius": "0.5rem"
98
82
  });
99
- return /* @__PURE__ */ l("div", { className: "w-full", "data-testid": "textarea-root", children: [
100
- n && /* @__PURE__ */ e(D, { htmlFor: s, className: h("mb-2 block", x && "cursor-not-allowed opacity-50"), children: n }),
101
- /* @__PURE__ */ l("div", { className: "relative", "data-testid": "textarea-wrapper", children: [
83
+ return /* @__PURE__ */ n("div", { className: "w-full", "data-testid": "textarea-root", children: [
84
+ d && /* @__PURE__ */ e(E, { htmlFor: p, className: g("block mb-2", f && "opacity-50 cursor-not-allowed", b), children: d }),
85
+ /* @__PURE__ */ n("div", { className: "relative", "data-testid": "textarea-wrapper", children: [
102
86
  /* @__PURE__ */ e(
103
87
  "textarea",
104
88
  {
105
89
  "aria-multiline": "true",
106
- autoComplete: J(I),
107
- className: j,
108
- "data-state": t,
90
+ autoComplete: K(t),
91
+ className: k,
92
+ "data-state": r,
109
93
  "data-testid": "textarea-textarea",
110
- disabled: x,
111
- id: s,
112
- name: i,
113
- onBlur: w,
114
- onChange: A,
115
- onFocus: P,
116
- onPaste: R,
117
- placeholder: g,
118
- ref: y,
119
- required: d,
94
+ disabled: f,
95
+ id: p,
96
+ name: c,
97
+ onBlur: A,
98
+ onChange: R,
99
+ onFocus: w,
100
+ onPaste: T,
101
+ placeholder: v,
102
+ ref: P,
103
+ required: u,
120
104
  spellCheck: "true",
121
- style: k(),
122
- value: m,
123
- ...L,
124
- ...c
105
+ style: z(),
106
+ value: s,
107
+ ...j,
108
+ ...x
125
109
  }
126
110
  ),
127
- T && /* @__PURE__ */ e("div", { className: H, "data-testid": "textarea-loading-icon", children: /* @__PURE__ */ e(B, { size: 24 }) }),
128
- /* @__PURE__ */ l(
129
- "div",
130
- {
131
- className: K(p, a),
132
- role: "status",
133
- "aria-live": "polite",
134
- "aria-label": `${p} of ${a} characters used`,
135
- children: [
136
- p,
137
- "/",
138
- a
139
- ]
140
- }
141
- )
111
+ L && /* @__PURE__ */ e("div", { className: J, "data-testid": "textarea-loading-icon", children: /* @__PURE__ */ e(D, { size: 24 }) }),
112
+ /* @__PURE__ */ n("div", { className: Q(l, i), role: "status", "aria-live": "polite", "aria-label": `${l} of ${i} characters used`, children: [
113
+ l,
114
+ "/",
115
+ i
116
+ ] })
142
117
  ] }),
143
- t === "error" && o && /* @__PURE__ */ e(
144
- "p",
145
- {
146
- id: u,
147
- className: "!text-danger-300 mt-1.5 text-sm",
148
- "data-testid": "textarea-error-message",
149
- "aria-live": "polite",
150
- "aria-atomic": "true",
151
- children: o
152
- }
153
- )
118
+ r === "error" && o && /* @__PURE__ */ e("p", { id: h, className: "mt-1.5 text-sm !text-danger-300", "data-testid": "textarea-error-message", "aria-live": "polite", "aria-atomic": "true", children: o })
154
119
  ] });
155
120
  }
156
121
  );
157
- Q.displayName = "Textarea";
122
+ U.displayName = "Textarea";
158
123
  export {
159
- Q as Textarea
124
+ U as Textarea
160
125
  };
@@ -2,16 +2,16 @@ import { AsChildProp } from '../../primitives/slot';
2
2
  import { ButtonHTMLAttributes } from 'react';
3
3
  export type ToggleProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onChange'> & Omit<AsChildProp, 'asChild'> & {
4
4
  pressed?: boolean;
5
- readonly defaultPressed?: boolean;
5
+ defaultPressed?: boolean;
6
6
  onPressedChange?: (pressed: boolean) => void;
7
7
  disabled?: boolean;
8
- readonly asChild?: boolean;
8
+ asChild?: boolean;
9
9
  };
10
10
  export declare const ToggleBase: import('react').ForwardRefExoticComponent<Omit<ButtonHTMLAttributes<HTMLButtonElement>, "onChange"> & Omit<AsChildProp, "asChild"> & {
11
11
  pressed?: boolean;
12
- readonly defaultPressed?: boolean;
12
+ defaultPressed?: boolean;
13
13
  onPressedChange?: (pressed: boolean) => void;
14
14
  disabled?: boolean;
15
- readonly asChild?: boolean;
15
+ asChild?: boolean;
16
16
  } & import('react').RefAttributes<HTMLButtonElement>>;
17
17
  //# sourceMappingURL=ToggleBase.d.ts.map
@@ -4,18 +4,7 @@ import { jsx as h } from "react/jsx-runtime";
4
4
  import { useControllableState as k } from "../hooks/useControllableState.js";
5
5
  import { Slot as y } from "../primitives/slot.js";
6
6
  import { forwardRef as P, useCallback as f } from "react";
7
- const B = P(function({
8
- pressed: u,
9
- defaultPressed: d = !1,
10
- onPressedChange: p,
11
- disabled: t,
12
- className: i,
13
- onKeyDown: n,
14
- onClick: a,
15
- type: m = "button",
16
- asChild: s = !1,
17
- ...c
18
- }, g) {
7
+ const B = P(function({ pressed: u, defaultPressed: d = !1, onPressedChange: p, disabled: t, className: i, onKeyDown: n, onClick: a, type: m = "button", asChild: s = !1, ...c }, g) {
19
8
  const [o, l] = k({
20
9
  value: u,
21
10
  defaultValue: d,
@@ -33,21 +22,7 @@ const B = P(function({
33
22
  },
34
23
  [r, a]
35
24
  );
36
- return /* @__PURE__ */ h(
37
- s ? y : "button",
38
- {
39
- ...c,
40
- ref: g,
41
- type: s ? void 0 : m,
42
- "aria-pressed": o,
43
- "data-state": o ? "on" : "off",
44
- "data-disabled": t ? "" : void 0,
45
- disabled: t,
46
- onKeyDown: v,
47
- onClick: C,
48
- className: i
49
- }
50
- );
25
+ return /* @__PURE__ */ h(s ? y : "button", { ...c, ref: g, type: s ? void 0 : m, "aria-pressed": o, "data-state": o ? "on" : "off", "data-disabled": t ? "" : void 0, disabled: t, onKeyDown: v, onClick: C, className: i });
51
26
  });
52
27
  export {
53
28
  B as ToggleBase
package/dist/Toggle.js CHANGED
@@ -35,17 +35,7 @@ const v = d(
35
35
  layout: "default"
36
36
  }
37
37
  }
38
- ), m = l(
39
- ({ className: e, variant: t, size: o, layout: r, ...a }, i) => /* @__PURE__ */ g(
40
- n,
41
- {
42
- ref: i,
43
- "data-slot": "toggle",
44
- className: s(v({ variant: t, size: o, layout: r }), e),
45
- ...a
46
- }
47
- )
48
- );
38
+ ), m = l(({ className: e, variant: t, size: o, layout: r, ...a }, i) => /* @__PURE__ */ g(n, { ref: i, "data-slot": "toggle", className: s(v({ variant: t, size: o, layout: r }), e), ...a }));
49
39
  export {
50
40
  m as Toggle,
51
41
  v as toggleVariants
@@ -1,26 +1,26 @@
1
1
  import { ButtonHTMLAttributes, HTMLAttributes, ReactNode } from 'react';
2
2
  type Orientation = 'horizontal' | 'vertical';
3
3
  export type CommonGroupProps = {
4
- readonly orientation?: Orientation;
5
- readonly loop?: boolean;
4
+ orientation?: Orientation;
5
+ loop?: boolean;
6
6
  disabled?: boolean;
7
- readonly name?: string;
7
+ name?: string;
8
8
  value?: string | string[];
9
- readonly defaultValue?: string | string[];
9
+ defaultValue?: string | string[];
10
10
  onValueChange?: (v: string | string[]) => void;
11
11
  className?: string;
12
12
  };
13
13
  export type SingleProps = CommonGroupProps & {
14
- readonly type?: 'single';
14
+ type?: 'single';
15
15
  };
16
16
  export type MultipleProps = CommonGroupProps & {
17
- readonly type: 'multiple';
17
+ type: 'multiple';
18
18
  };
19
19
  export type ToggleGroupProps = (SingleProps | MultipleProps) & Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>;
20
20
  export type ItemRenderProps = {
21
- readonly value: string;
21
+ value: string;
22
22
  disabled?: boolean;
23
- readonly children?: ReactNode;
23
+ children?: ReactNode;
24
24
  className?: string;
25
25
  };
26
26
  export declare const ToggleGroupBase: (props: ToggleGroupProps & Record<`data-${string}`, any>) => import("react/jsx-runtime").JSX.Element;
@@ -56,25 +56,11 @@ const T = j(null), W = (C) => {
56
56
  }),
57
57
  [I, k, V, d, u, l, e, n, r]
58
58
  ), h = u;
59
- return /* @__PURE__ */ E(
60
- "div",
61
- {
62
- ...G,
63
- role: "group",
64
- "data-orientation": l,
65
- "data-disabled": I ? "" : void 0,
66
- "data-variant": D,
67
- "data-size": v,
68
- "data-slot": c,
69
- "data-layout": b,
70
- className: x,
71
- children: [
72
- /* @__PURE__ */ B(T.Provider, { value: y, children: C.children }),
73
- h && n === "single" && typeof r == "string" ? /* @__PURE__ */ B("input", { type: "hidden", name: h, value: r }) : null,
74
- h && n === "multiple" && Array.isArray(r) ? r.map((t) => /* @__PURE__ */ B("input", { type: "hidden", name: h + "[]", value: t }, t)) : null
75
- ]
76
- }
77
- );
59
+ return /* @__PURE__ */ E("div", { ...G, role: "group", "data-orientation": l, "data-disabled": I ? "" : void 0, "data-variant": D, "data-size": v, "data-slot": c, "data-layout": b, className: x, children: [
60
+ /* @__PURE__ */ B(T.Provider, { value: y, children: C.children }),
61
+ h && n === "single" && typeof r == "string" ? /* @__PURE__ */ B("input", { type: "hidden", name: h, value: r }) : null,
62
+ h && n === "multiple" && Array.isArray(r) ? r.map((t) => /* @__PURE__ */ B("input", { type: "hidden", name: h + "[]", value: t }, t)) : null
63
+ ] });
78
64
  }, X = H(function({ value: n, disabled: l, className: d, children: I, onKeyDown: u, onClick: x, ...z }, A) {
79
65
  const a = K(T);
80
66
  if (!a) throw new Error("ToggleGroupItem must be used within ToggleGroup");
@@ -104,22 +90,7 @@ const T = j(null), W = (C) => {
104
90
  },
105
91
  [x, m]
106
92
  );
107
- return /* @__PURE__ */ B(
108
- "button",
109
- {
110
- ...z,
111
- ref: p,
112
- type: "button",
113
- "aria-pressed": o,
114
- "data-state": o ? "on" : "off",
115
- "data-disabled": c || l ? "" : void 0,
116
- disabled: c || l,
117
- onKeyDown: V,
118
- onClick: k,
119
- className: d,
120
- children: I
121
- }
122
- );
93
+ return /* @__PURE__ */ B("button", { ...z, ref: p, type: "button", "aria-pressed": o, "data-state": o ? "on" : "off", "data-disabled": c || l ? "" : void 0, disabled: c || l, onKeyDown: V, onClick: k, className: d, children: I });
123
94
  });
124
95
  export {
125
96
  W as ToggleGroupBase,
@@ -17,7 +17,7 @@ const g = c({
17
17
  "data-size": o,
18
18
  "data-layout": a,
19
19
  className: l(
20
- "group/toggle-group [&[data-variant='outline']]:bg-toggle-group-bg flex h-fit w-fit items-center rounded-md [&_button:first-of-type]:rounded-l-md [&_button:last-of-type]:rounded-r-md [&[data-layout='expanded']]:w-full [&[data-variant='outline']]:gap-0.25",
20
+ "group/toggle-group [&[data-variant='outline']]:bg-toggle-group-bg flex h-fit w-fit [&[data-layout='expanded']]:w-full items-center rounded-md [&_button:first-of-type]:rounded-l-md [&_button:last-of-type]:rounded-r-md [&[data-variant='outline']]:gap-0.25",
21
21
  n
22
22
  ),
23
23
  ...r,
@@ -20,7 +20,7 @@ export type TooltipRootProps = {
20
20
  side?: Side;
21
21
  sideOffset?: number;
22
22
  };
23
- export declare const TooltipRootBase: ({ children, open: openProp, defaultOpen, onOpenChange, side, align, sideOffset, alignOffset, avoidCollisions, delayDuration, }: TooltipRootProps) => import("react/jsx-runtime").JSX.Element;
23
+ export declare const TooltipRootBase: ({ children, open: openProp, defaultOpen, onOpenChange, side, align, sideOffset, alignOffset, avoidCollisions, delayDuration }: TooltipRootProps) => import("react/jsx-runtime").JSX.Element;
24
24
  export type TooltipTriggerProps = ComponentPropsWithoutRef<'button'> & {
25
25
  asChild?: boolean;
26
26
  };
@@ -5,29 +5,10 @@ import { createForwardedRef as N } from "../utils/refs.js";
5
5
  import { cn as z } from "../utils/twUtils.js";
6
6
  import { createContext as X, forwardRef as L, useMemo as Y, useRef as E, useEffect as k, useCallback as g, useState as I, useContext as M, useId as A } from "react";
7
7
  import { createPortal as S } from "react-dom";
8
- const F = X(null), V = L(function({
9
- children: a,
10
- delayDuration: u = 700,
11
- skipDelayDuration: l = 300,
12
- disableHoverableContent: d = !1
13
- }) {
14
- const c = Y(
15
- () => ({ delayDuration: u, skipDelayDuration: l, disableHoverableContent: d }),
16
- [u, l, d]
17
- );
8
+ const F = X(null), V = L(function({ children: a, delayDuration: u = 700, skipDelayDuration: l = 300, disableHoverableContent: d = !1 }) {
9
+ const c = Y(() => ({ delayDuration: u, skipDelayDuration: l, disableHoverableContent: d }), [u, l, d]);
18
10
  return /* @__PURE__ */ D(F.Provider, { value: c, children: a });
19
- }), K = X(null), Z = ({
20
- children: h,
21
- open: a,
22
- defaultOpen: u,
23
- onOpenChange: l,
24
- side: d = "top",
25
- align: c = "center",
26
- sideOffset: f = 0,
27
- alignOffset: y = 0,
28
- avoidCollisions: p = !0,
29
- delayDuration: t
30
- }) => {
11
+ }), K = X(null), Z = ({ children: h, open: a, defaultOpen: u, onOpenChange: l, side: d = "top", align: c = "center", sideOffset: f = 0, alignOffset: y = 0, avoidCollisions: p = !0, delayDuration: t }) => {
31
12
  const r = M(F) ?? {
32
13
  delayDuration: 700,
33
14
  skipDelayDuration: 300,
@@ -89,31 +70,8 @@ const F = X(null), V = L(function({
89
70
  },
90
71
  [f, T]
91
72
  );
92
- return /* @__PURE__ */ D(
93
- a ? "span" : "button",
94
- {
95
- ...y,
96
- ref: m,
97
- "aria-describedby": t.open ? t.contentId : void 0,
98
- onPointerEnter: b,
99
- onPointerLeave: C,
100
- onFocus: x,
101
- onBlur: B,
102
- onKeyDown: P
103
- }
104
- );
105
- }), tt = L(function({
106
- className: a,
107
- style: u,
108
- forceMount: l,
109
- container: d,
110
- onPointerEnter: c,
111
- onPointerLeave: f,
112
- children: y,
113
- arrowPadding: p = 4,
114
- variant: t = "default",
115
- ...r
116
- }, m) {
73
+ return /* @__PURE__ */ D(a ? "span" : "button", { ...y, ref: m, "aria-describedby": t.open ? t.contentId : void 0, onPointerEnter: b, onPointerLeave: C, onFocus: x, onBlur: B, onKeyDown: P });
74
+ }), tt = L(function({ className: a, style: u, forceMount: l, container: d, onPointerEnter: c, onPointerLeave: f, children: y, arrowPadding: p = 4, variant: t = "default", ...r }, m) {
117
75
  const e = H(), [o, i] = I(null), [w, v] = I(null), T = g(
118
76
  (n) => {
119
77
  i(n), typeof m == "function" ? m(n) : m && "current" in m && (m.current = n);
@@ -3,7 +3,7 @@ export declare function Button({ children, onClick }: {
3
3
  children: ReactNode;
4
4
  onClick: () => void;
5
5
  }): import("react/jsx-runtime").JSX.Element;
6
- export declare function SecondaryButton({ children, onClick, className, }: {
6
+ export declare function SecondaryButton({ children, onClick, className }: {
7
7
  children: ReactNode;
8
8
  onClick: () => void;
9
9
  className: string;