@spear-ai/spectral 1.9.0 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (237) hide show
  1. package/README.md +6 -5
  2. package/dist/.js +112 -239
  3. package/dist/Accordion-CDXdSAST.js +363 -0
  4. package/dist/Accordion.js +3 -498
  5. package/dist/Alert/AlertBase.js +69 -152
  6. package/dist/Alert.js +58 -106
  7. package/dist/AnimatePresence-D-9jXfgI.js +178 -0
  8. package/dist/App.js +6 -6
  9. package/dist/Avatar.js +83 -65
  10. package/dist/Badge.d.ts +1 -3
  11. package/dist/Badge.js +21 -25
  12. package/dist/Button.js +102 -178
  13. package/dist/ButtonGroup/ButtonGroupButton.js +38 -40
  14. package/dist/ButtonGroup.js +55 -59
  15. package/dist/ButtonIcon.js +58 -134
  16. package/dist/Calendar-s4lyijkn.js +3109 -0
  17. package/dist/Checkbox/CheckboxBase.js +94 -126
  18. package/dist/Checkbox.d.ts +1 -1
  19. package/dist/Checkbox.js +40 -105
  20. package/dist/Combobox/ComboboxBase.js +2 -79
  21. package/dist/Combobox.js +106 -172
  22. package/dist/ComboboxBase-D8Nf4xC-.js +491 -0
  23. package/dist/ControlGroup/ControlGroupSelect.d.ts +1 -1
  24. package/dist/ControlGroup/ControlGroupSelect.js +85 -101
  25. package/dist/ControlGroup.js +45 -48
  26. package/dist/DataCard/Card.js +37 -12
  27. package/dist/DataCard.d.ts +1 -1
  28. package/dist/DataCard.js +36 -16
  29. package/dist/DateTimePicker/Calendar.js +2 -2967
  30. package/dist/DateTimePicker/DateTimeDisplayInput.d.ts +1 -1
  31. package/dist/DateTimePicker/DateTimeDisplayInput.js +379 -274
  32. package/dist/DateTimePicker/DateTimeInput.d.ts +5 -3
  33. package/dist/DateTimePicker/DateTimeInput.js +133 -88
  34. package/dist/DateTimePicker/DateTimeUtils.js +2 -2193
  35. package/dist/DateTimePicker/TimePeriodSelect.d.ts +1 -1
  36. package/dist/DateTimePicker/TimePeriodSelect.js +45 -20
  37. package/dist/DateTimePicker/TimePicker.d.ts +1 -1
  38. package/dist/DateTimePicker/TimePicker.js +76 -60
  39. package/dist/DateTimePicker.d.ts +2 -2
  40. package/dist/DateTimePicker.js +87 -205
  41. package/dist/DateTimeUtils-DVvG6H-p.js +2098 -0
  42. package/dist/Dialog.js +74 -74
  43. package/dist/Drawer.js +67 -37
  44. package/dist/HoverCard-CYDsIiVK.js +201 -0
  45. package/dist/HoverCard.d.ts +1 -1
  46. package/dist/HoverCard.js +2 -218
  47. package/dist/Icons/AnalyzeIcon.js +50 -57
  48. package/dist/Icons/AnnotationsIcon.js +20 -15
  49. package/dist/Icons/ApprovedIcon.js +26 -18
  50. package/dist/Icons/ArrowDownIcon.js +20 -6
  51. package/dist/Icons/ArrowUpIcon.js +20 -6
  52. package/dist/Icons/BoxToolIcon.js +17 -12
  53. package/dist/Icons/CalendarIcon.js +43 -20
  54. package/dist/Icons/CheckCircleIcon.js +26 -10
  55. package/dist/Icons/CheckSquareIcon.js +26 -10
  56. package/dist/Icons/CheckmarkIcon.js +22 -9
  57. package/dist/Icons/ChevronDownIcon.js +22 -9
  58. package/dist/Icons/ChevronUpIcon.js +22 -9
  59. package/dist/Icons/ClockIcon.js +26 -18
  60. package/dist/Icons/CloseCircleIcon.js +26 -10
  61. package/dist/Icons/CloseIcon.js +18 -9
  62. package/dist/Icons/DashboardIcon.js +36 -10
  63. package/dist/Icons/DatabaseIcon.js +36 -19
  64. package/dist/Icons/DeleteIcon.js +36 -19
  65. package/dist/Icons/DurationIcon.js +57 -22
  66. package/dist/Icons/EditIcon.js +26 -27
  67. package/dist/Icons/EmailIcon.js +26 -10
  68. package/dist/Icons/EraserIcon.js +41 -25
  69. package/dist/Icons/ErrorIcon.js +27 -11
  70. package/dist/Icons/EyeClosedIcon.js +29 -13
  71. package/dist/Icons/EyeClosedIcon2.js +27 -11
  72. package/dist/Icons/EyeOpenIcon.js +22 -9
  73. package/dist/Icons/FileDownloadIcon.js +43 -20
  74. package/dist/Icons/GoToFirstIcon.js +26 -9
  75. package/dist/Icons/GoToLastIcon.js +26 -9
  76. package/dist/Icons/HarmonicCursorsIcon.js +23 -9
  77. package/dist/Icons/IconBase.d.ts +3 -3
  78. package/dist/Icons/IconBase.js +49 -23
  79. package/dist/Icons/InfoIcon.js +36 -10
  80. package/dist/Icons/KeyboardIcon.js +26 -27
  81. package/dist/Icons/LabelIcon.js +19 -14
  82. package/dist/Icons/LassoIcon.js +36 -28
  83. package/dist/Icons/LineToolIcon.js +48 -39
  84. package/dist/Icons/LiveViewIcon.js +50 -12
  85. package/dist/Icons/LoaderIcon.js +67 -27
  86. package/dist/Icons/LocationIcon.js +26 -27
  87. package/dist/Icons/LogoutIcon.js +20 -15
  88. package/dist/Icons/MeasureIcon.js +78 -25
  89. package/dist/Icons/MessagesIcon.js +33 -18
  90. package/dist/Icons/MetadataIcon.js +20 -15
  91. package/dist/Icons/MinusIcon.d.ts +1 -1
  92. package/dist/Icons/MinusIcon.js +18 -6
  93. package/dist/Icons/OntologyIcon.js +87 -71
  94. package/dist/Icons/PanelIconClose.js +28 -10
  95. package/dist/Icons/PanelIconOpen.js +28 -10
  96. package/dist/Icons/PlayIcon.js +20 -6
  97. package/dist/Icons/PlusIcon.js +20 -14
  98. package/dist/Icons/PolygonIcon.js +50 -39
  99. package/dist/Icons/ProgressCheckIcon.d.ts +5 -0
  100. package/dist/Icons/ProgressCheckIcon.js +58 -0
  101. package/dist/Icons/ResetIcon.js +17 -12
  102. package/dist/Icons/ReviewedIcon.js +36 -19
  103. package/dist/Icons/ScissorsIcon.js +22 -17
  104. package/dist/Icons/SearchIcon.js +26 -9
  105. package/dist/Icons/SettingsIcon.js +26 -27
  106. package/dist/Icons/SortAscendingIcon.js +50 -12
  107. package/dist/Icons/SortAtoZIcon.js +50 -12
  108. package/dist/Icons/SortDescendingIcon.js +50 -12
  109. package/dist/Icons/SortZtoAIcon.js +50 -12
  110. package/dist/Icons/StackIcon.js +26 -9
  111. package/dist/Icons/StarIcon.js +20 -6
  112. package/dist/Icons/TrashIcon.js +17 -12
  113. package/dist/Icons/UndoIcon.js +20 -15
  114. package/dist/Icons/User2Icon.js +26 -10
  115. package/dist/Icons/UserIcon.js +19 -14
  116. package/dist/Icons/WarningIcon.js +19 -14
  117. package/dist/Icons/ZoomAllIcon.js +71 -15
  118. package/dist/Icons/ZoomXIcon.js +36 -10
  119. package/dist/Icons/ZoomYIcon.js +36 -10
  120. package/dist/Icons/index.d.ts +1 -0
  121. package/dist/Icons.js +68 -136
  122. package/dist/IconsAnimated/PanelLeftCloseIcon.js +66 -36
  123. package/dist/IconsAnimated/PanelLeftOpenIcon.js +66 -36
  124. package/dist/IconsAnimated.js +3 -6
  125. package/dist/Input/InputUtils.js +51 -52
  126. package/dist/Input.js +132 -185
  127. package/dist/InputOTP-XUWW9xcI.js +461 -0
  128. package/dist/InputOTP.js +2 -382
  129. package/dist/Kbd.d.ts +1 -1
  130. package/dist/Kbd.js +182 -86
  131. package/dist/Label.js +12 -14
  132. package/dist/MultiSelect/MultiSelectBase.js +331 -403
  133. package/dist/MultiSelect.d.ts +1 -1
  134. package/dist/MultiSelect.js +23 -23
  135. package/dist/Popover.js +28 -32
  136. package/dist/RadioButton.d.ts +17 -0
  137. package/dist/RadioButton.js +33 -0
  138. package/dist/RadioButtonGroup/RadioButtonGroupBase.d.ts +3 -1
  139. package/dist/RadioButtonGroup/RadioButtonGroupBase.js +49 -46
  140. package/dist/RadioButtonGroup.d.ts +1 -1
  141. package/dist/RadioButtonGroup.js +11 -8
  142. package/dist/RadioGroup-w_q6RGEK.js +447 -0
  143. package/dist/RadioGroup.js +2 -505
  144. package/dist/Select.js +163 -186
  145. package/dist/Separator.js +16 -19
  146. package/dist/Skeleton.js +10 -6
  147. package/dist/Slider-BzzZT3Zm.js +490 -0
  148. package/dist/Slider.js +2 -562
  149. package/dist/SpectralProvider.js +8 -5
  150. package/dist/Switch/SwitchBase.js +91 -95
  151. package/dist/Switch-CVzRJ-0n.js +126 -0
  152. package/dist/Switch.d.ts +1 -1
  153. package/dist/Switch.js +2 -134
  154. package/dist/Tabs/TabsBase.js +242 -250
  155. package/dist/Tabs/tabsUtils.js +65 -73
  156. package/dist/Tabs.d.ts +1 -1
  157. package/dist/Tabs.js +73 -103
  158. package/dist/Textarea/TextareaUtils.js +35 -46
  159. package/dist/Textarea.js +83 -160
  160. package/dist/Toast-9zqXxKKO.js +711 -0
  161. package/dist/Toast.js +2 -885
  162. package/dist/Toggle/ToggleBase.js +46 -56
  163. package/dist/Toggle.d.ts +1 -1
  164. package/dist/Toggle.js +52 -62
  165. package/dist/ToggleGroup/ToggleGroupBase.js +128 -104
  166. package/dist/ToggleGroup.d.ts +1 -1
  167. package/dist/ToggleGroup.js +52 -63
  168. package/dist/Tooltip-D1K8kY1y.js +389 -0
  169. package/dist/Tooltip.js +2 -365
  170. package/dist/Tray.js +174 -217
  171. package/dist/chunk-h9knIhTc.js +20 -0
  172. package/dist/clsx-jM1GlMvB.js +16 -0
  173. package/dist/dist-3Af8168y.js +913 -0
  174. package/dist/dist-7HRQ5IKN.js +249 -0
  175. package/dist/dist-B2k1iWFp.js +129 -0
  176. package/dist/dist-B4FgboI8.js +122 -0
  177. package/dist/dist-B4g6zpUF.js +33 -0
  178. package/dist/dist-B9tup-4O.js +216 -0
  179. package/dist/dist-BK1K0g9W.js +29 -0
  180. package/dist/dist-Bfjk-jx9.js +28 -0
  181. package/dist/dist-Bft31cJh.js +65 -0
  182. package/dist/dist-BtdmHAzK.js +190 -0
  183. package/dist/dist-C0Hifjgh.js +1287 -0
  184. package/dist/dist-CGzgmYB9.js +68 -0
  185. package/dist/dist-ClmepHp4.js +10 -0
  186. package/dist/dist-D8Wb_MX9.js +6 -0
  187. package/dist/dist-Dtvmk11N.js +12 -0
  188. package/dist/dist-fW81qjVl.js +677 -0
  189. package/dist/dist-s1uWaZYZ.js +11 -0
  190. package/dist/es2015-YHaMV-St.js +701 -0
  191. package/dist/hooks/useAccordionAutoScroll.js +66 -67
  192. package/dist/hooks/useControllableState.js +14 -13
  193. package/dist/hooks/useTheme.js +21 -17
  194. package/dist/index.d.ts +2 -1
  195. package/dist/index.d.ts.map +1 -1
  196. package/dist/main.js +18954 -27224
  197. package/dist/primitives/button.js +39 -41
  198. package/dist/primitives/input-group.js +57 -73
  199. package/dist/primitives/input.js +11 -20
  200. package/dist/primitives/popover.d.ts.map +1 -1
  201. package/dist/primitives/popover.js +34 -25
  202. package/dist/primitives/select.js +70 -138
  203. package/dist/primitives/slot.js +32 -31
  204. package/dist/primitives/textarea.js +10 -16
  205. package/dist/proxy-Dn10Pl_g.js +4920 -0
  206. package/dist/styles/main.css +2 -1
  207. package/dist/styles/spectral.css +1 -1
  208. package/dist/twUtils-VNWgstKL.js +1673 -0
  209. package/dist/use-animation-CBUDycyW.js +57 -0
  210. package/dist/utils/constants.js +4 -4
  211. package/dist/utils/formFieldUtils.js +136 -148
  212. package/dist/utils/sharedUtils.js +26 -7
  213. package/dist/utils/twUtils.js +2 -2919
  214. package/package.json +24 -28
  215. package/dist/ComboboxBase-CxNxYtdT.js +0 -408
  216. package/dist/clsx-OuTLNxxd.js +0 -16
  217. package/dist/index-0ioNhtNM.js +0 -10
  218. package/dist/index-6oYKCvIn.js +0 -677
  219. package/dist/index-BFOf48AQ.js +0 -69
  220. package/dist/index-BZPx6jYI.js +0 -8
  221. package/dist/index-BlHU_t18.js +0 -142
  222. package/dist/index-Bm1RbF6w.js +0 -1037
  223. package/dist/index-Bv2OIg5P.js +0 -225
  224. package/dist/index-CKEI0pDv.js +0 -56
  225. package/dist/index-CM_hWgfC.js +0 -32
  226. package/dist/index-C_YVr64u.js +0 -1538
  227. package/dist/index-Cl8VeY0o.js +0 -149
  228. package/dist/index-CwSyIPrv.js +0 -13
  229. package/dist/index-D29mdTf5.js +0 -34
  230. package/dist/index-DEYs15GP.js +0 -66
  231. package/dist/index-Dc0No4pV.js +0 -233
  232. package/dist/index-T6XEa11q.js +0 -822
  233. package/dist/index-pBCLb6Gr.js +0 -240
  234. package/dist/index-psiVrsnE.js +0 -27
  235. package/dist/index-rKs9bXHr.js +0 -6
  236. package/dist/proxy-CO_-Vget.js +0 -4975
  237. package/dist/use-animation-DhEPRwZ3.js +0 -62
package/dist/Kbd.js CHANGED
@@ -1,88 +1,184 @@
1
1
  import "./styles/main.css";
2
- import { jsxs as w, jsx as t } from "react/jsx-runtime";
3
- import { cn as d } from "./utils/twUtils.js";
4
- const c = {
5
- arrowLeft: /* @__PURE__ */ t("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ t("path", { d: "M10 5.75L3.75 12L10 18.25M4.5 12H20.25", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
6
- arrowRight: /* @__PURE__ */ t("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ t("path", { d: "M14 5.75L20.25 12L14 18.25M19.5 12H3.75", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
7
- arrowUp: /* @__PURE__ */ t("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ t("path", { d: "M5.75 10L12 3.75L18.25 10M12 20.25V4.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
8
- arrowDown: /* @__PURE__ */ t("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ t("path", { d: "M18 14L12 20L6 14M12 19V4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
9
- command: /* @__PURE__ */ t("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ t(
10
- "path",
11
- {
12
- d: "M9.25 9.25V6.5C9.25 4.98122 8.01878 3.75 6.5 3.75C4.98122 3.75 3.75 4.98122 3.75 6.5C3.75 8.01878 4.98122 9.25 6.5 9.25H9.25ZM9.25 9.25H14.75M9.25 9.25V14.75M14.75 9.25V6.5C14.75 4.98122 15.9812 3.75 17.5 3.75C19.0188 3.75 20.25 4.98122 20.25 6.5C20.25 8.01878 19.0188 9.25 17.5 9.25H14.75ZM14.75 9.25V14.75M14.75 14.75H9.25M14.75 14.75V17.5C14.75 19.0188 15.9812 20.25 17.5 20.25C19.0188 20.25 20.25 19.0188 20.25 17.5C20.25 15.9812 19.0188 14.75 17.5 14.75H14.75ZM9.25 14.75V17.5C9.25 19.0188 8.01878 20.25 6.5 20.25C4.98122 20.25 3.75 19.0188 3.75 17.5C3.75 15.9812 4.98122 14.75 6.5 14.75H9.25Z",
13
- stroke: "currentColor",
14
- strokeWidth: "1.5",
15
- strokeLinecap: "square"
16
- }
17
- ) }),
18
- option: /* @__PURE__ */ t("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ t("path", { d: "M3.75 4.75H7.40962C7.77384 4.75 8.10925 4.94802 8.2852 5.26692L15.7148 18.7331C15.8907 19.052 16.2262 19.25 16.5904 19.25H20.25M15.75 4.75H20.25", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
19
- shift: /* @__PURE__ */ t("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ t(
20
- "path",
21
- {
22
- d: "M2.91032 11.5511L11.2848 2.98182C11.6771 2.5804 12.3229 2.5804 12.7152 2.98182L21.0897 11.5511C21.7085 12.1843 21.2599 13.25 20.3745 13.25H17.1316V19.25C17.1316 19.8023 16.6839 20.25 16.1316 20.25H7.86842C7.31614 20.25 6.86842 19.8023 6.86842 19.25V13.25H3.62551C2.74013 13.25 2.2915 12.1843 2.91032 11.5511Z",
23
- stroke: "currentColor",
24
- strokeWidth: "1.5",
25
- strokeLinecap: "square",
26
- strokeLinejoin: "round"
27
- }
28
- ) }),
29
- control: /* @__PURE__ */ t("svg", { className: "-translate-y-0.5", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ t("path", { d: "M8 13.9999L11.6464 10.3535C11.8417 10.1582 12.1583 10.1582 12.3536 10.3535L16 13.9999", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
30
- return: /* @__PURE__ */ t("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ t(
31
- "path",
32
- {
33
- fillRule: "evenodd",
34
- clipRule: "evenodd",
35
- d: "M20.25 4C19.8358 4 19.5 4.33579 19.5 4.75V14.25C19.5 14.3881 19.3881 14.5 19.25 14.5H5.56066L8.28033 11.7803C8.57322 11.4874 8.57322 11.0126 8.28033 10.7197C7.98744 10.4268 7.51256 10.4268 7.21967 10.7197L3.21967 14.7197C2.92678 15.0126 2.92678 15.4874 3.21967 15.7803L7.21967 19.7803C7.51256 20.0732 7.98744 20.0732 8.28033 19.7803C8.57322 19.4874 8.57322 19.0126 8.28033 18.7197L5.56066 16H19.25C20.2165 16 21 15.2165 21 14.25V4.75C21 4.33579 20.6642 4 20.25 4Z",
36
- fill: "currentColor"
37
- }
38
- ) }),
39
- delete: /* @__PURE__ */ t("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ t(
40
- "path",
41
- {
42
- d: "M14.9988 9.75L12.7488 12M12.7488 12L10.4988 14.25M12.7488 12L10.4988 9.75M12.7488 12L14.9988 14.25M6.55509 4.75H20.2488C20.8011 4.75 21.2488 5.19772 21.2488 5.75V18.25C21.2488 18.8023 20.8011 19.25 20.2488 19.25H6.55509C6.2092 19.25 5.88786 19.0712 5.70545 18.7774L1.82614 12.5274C1.62566 12.2044 1.62566 11.7956 1.82614 11.4726L5.70545 5.22264C5.88786 4.92875 6.2092 4.75 6.55509 4.75Z",
43
- stroke: "currentColor",
44
- strokeWidth: "1.5",
45
- strokeLinecap: "round",
46
- strokeLinejoin: "round"
47
- }
48
- ) })
49
- }, p = {
50
- arrowLeft: "Left Arrow",
51
- arrowRight: "Right Arrow",
52
- arrowUp: "Up Arrow",
53
- arrowDown: "Down Arrow",
54
- command: "Command",
55
- option: "Option",
56
- shift: "Shift",
57
- control: "Control",
58
- return: "Return",
59
- delete: "Delete"
60
- }, g = ({ className: r, symbol: e, symbolPosition: n = "start", children: o, ...i }) => {
61
- const l = o != null && o !== "", s = e && /* @__PURE__ */ t("span", { "aria-hidden": "true", children: c[e] }), a = !l && e ? p[e] : void 0, h = i["aria-label"] ?? a;
62
- return /* @__PURE__ */ w(
63
- "kbd",
64
- {
65
- className: d(
66
- "bg-kbd-bg text-kbd-text pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm px-1 font-mono! text-xs font-medium select-none",
67
- "in-data-[slot=tooltip-content]:bg-level-three [&_svg:not([class*='size-'])]:size-3",
68
- r
69
- ),
70
- "data-slot": "kbd",
71
- "data-testid": "spectral-kbd",
72
- ...i,
73
- "aria-label": h,
74
- children: [
75
- n === "start" && s,
76
- o,
77
- n === "end" && s
78
- ]
79
- }
80
- );
81
- };
82
- g.displayName = "Kbd";
83
- const C = ({ className: r, ...e }) => /* @__PURE__ */ t("kbd", { className: d("inline-flex items-center gap-1", r), "data-slot": "kbd-group", "data-testid": "spectral-kbd-group", ...e });
84
- C.displayName = "KbdGroup";
85
- export {
86
- g as Kbd,
87
- C as KbdGroup
2
+ import { t as e } from "./twUtils-VNWgstKL.js";
3
+ import "react";
4
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
5
+ //#region src/components/Kbd/Kbd.tsx
6
+ var r = {
7
+ arrowLeft: /* @__PURE__ */ t("svg", {
8
+ width: "14",
9
+ height: "14",
10
+ viewBox: "0 0 24 24",
11
+ fill: "none",
12
+ xmlns: "http://www.w3.org/2000/svg",
13
+ children: /* @__PURE__ */ t("path", {
14
+ d: "M10 5.75L3.75 12L10 18.25M4.5 12H20.25",
15
+ stroke: "currentColor",
16
+ strokeWidth: "1.5",
17
+ strokeLinecap: "round",
18
+ strokeLinejoin: "round"
19
+ })
20
+ }),
21
+ arrowRight: /* @__PURE__ */ t("svg", {
22
+ width: "14",
23
+ height: "14",
24
+ viewBox: "0 0 24 24",
25
+ fill: "none",
26
+ xmlns: "http://www.w3.org/2000/svg",
27
+ children: /* @__PURE__ */ t("path", {
28
+ d: "M14 5.75L20.25 12L14 18.25M19.5 12H3.75",
29
+ stroke: "currentColor",
30
+ strokeWidth: "1.5",
31
+ strokeLinecap: "round",
32
+ strokeLinejoin: "round"
33
+ })
34
+ }),
35
+ arrowUp: /* @__PURE__ */ t("svg", {
36
+ width: "14",
37
+ height: "14",
38
+ viewBox: "0 0 24 24",
39
+ fill: "none",
40
+ xmlns: "http://www.w3.org/2000/svg",
41
+ children: /* @__PURE__ */ t("path", {
42
+ d: "M5.75 10L12 3.75L18.25 10M12 20.25V4.5",
43
+ stroke: "currentColor",
44
+ strokeWidth: "1.5",
45
+ strokeLinecap: "round",
46
+ strokeLinejoin: "round"
47
+ })
48
+ }),
49
+ arrowDown: /* @__PURE__ */ t("svg", {
50
+ width: "14",
51
+ height: "14",
52
+ viewBox: "0 0 24 24",
53
+ fill: "none",
54
+ xmlns: "http://www.w3.org/2000/svg",
55
+ children: /* @__PURE__ */ t("path", {
56
+ d: "M18 14L12 20L6 14M12 19V4",
57
+ stroke: "currentColor",
58
+ strokeWidth: "1.5",
59
+ strokeLinecap: "round",
60
+ strokeLinejoin: "round"
61
+ })
62
+ }),
63
+ command: /* @__PURE__ */ t("svg", {
64
+ width: "14",
65
+ height: "14",
66
+ viewBox: "0 0 24 24",
67
+ fill: "none",
68
+ xmlns: "http://www.w3.org/2000/svg",
69
+ children: /* @__PURE__ */ t("path", {
70
+ d: "M9.25 9.25V6.5C9.25 4.98122 8.01878 3.75 6.5 3.75C4.98122 3.75 3.75 4.98122 3.75 6.5C3.75 8.01878 4.98122 9.25 6.5 9.25H9.25ZM9.25 9.25H14.75M9.25 9.25V14.75M14.75 9.25V6.5C14.75 4.98122 15.9812 3.75 17.5 3.75C19.0188 3.75 20.25 4.98122 20.25 6.5C20.25 8.01878 19.0188 9.25 17.5 9.25H14.75ZM14.75 9.25V14.75M14.75 14.75H9.25M14.75 14.75V17.5C14.75 19.0188 15.9812 20.25 17.5 20.25C19.0188 20.25 20.25 19.0188 20.25 17.5C20.25 15.9812 19.0188 14.75 17.5 14.75H14.75ZM9.25 14.75V17.5C9.25 19.0188 8.01878 20.25 6.5 20.25C4.98122 20.25 3.75 19.0188 3.75 17.5C3.75 15.9812 4.98122 14.75 6.5 14.75H9.25Z",
71
+ stroke: "currentColor",
72
+ strokeWidth: "1.5",
73
+ strokeLinecap: "square"
74
+ })
75
+ }),
76
+ option: /* @__PURE__ */ t("svg", {
77
+ width: "14",
78
+ height: "14",
79
+ viewBox: "0 0 24 24",
80
+ fill: "none",
81
+ xmlns: "http://www.w3.org/2000/svg",
82
+ children: /* @__PURE__ */ t("path", {
83
+ d: "M3.75 4.75H7.40962C7.77384 4.75 8.10925 4.94802 8.2852 5.26692L15.7148 18.7331C15.8907 19.052 16.2262 19.25 16.5904 19.25H20.25M15.75 4.75H20.25",
84
+ stroke: "currentColor",
85
+ strokeWidth: "1.5",
86
+ strokeLinecap: "round",
87
+ strokeLinejoin: "round"
88
+ })
89
+ }),
90
+ shift: /* @__PURE__ */ t("svg", {
91
+ width: "14",
92
+ height: "14",
93
+ viewBox: "0 0 24 24",
94
+ fill: "none",
95
+ xmlns: "http://www.w3.org/2000/svg",
96
+ children: /* @__PURE__ */ t("path", {
97
+ d: "M2.91032 11.5511L11.2848 2.98182C11.6771 2.5804 12.3229 2.5804 12.7152 2.98182L21.0897 11.5511C21.7085 12.1843 21.2599 13.25 20.3745 13.25H17.1316V19.25C17.1316 19.8023 16.6839 20.25 16.1316 20.25H7.86842C7.31614 20.25 6.86842 19.8023 6.86842 19.25V13.25H3.62551C2.74013 13.25 2.2915 12.1843 2.91032 11.5511Z",
98
+ stroke: "currentColor",
99
+ strokeWidth: "1.5",
100
+ strokeLinecap: "square",
101
+ strokeLinejoin: "round"
102
+ })
103
+ }),
104
+ control: /* @__PURE__ */ t("svg", {
105
+ className: "-translate-y-0.5",
106
+ width: "14",
107
+ height: "14",
108
+ viewBox: "0 0 24 24",
109
+ fill: "none",
110
+ xmlns: "http://www.w3.org/2000/svg",
111
+ children: /* @__PURE__ */ t("path", {
112
+ d: "M8 13.9999L11.6464 10.3535C11.8417 10.1582 12.1583 10.1582 12.3536 10.3535L16 13.9999",
113
+ stroke: "currentColor",
114
+ strokeWidth: "1.5",
115
+ strokeLinecap: "round",
116
+ strokeLinejoin: "round"
117
+ })
118
+ }),
119
+ return: /* @__PURE__ */ t("svg", {
120
+ width: "14",
121
+ height: "14",
122
+ viewBox: "0 0 24 24",
123
+ fill: "none",
124
+ xmlns: "http://www.w3.org/2000/svg",
125
+ children: /* @__PURE__ */ t("path", {
126
+ fillRule: "evenodd",
127
+ clipRule: "evenodd",
128
+ d: "M20.25 4C19.8358 4 19.5 4.33579 19.5 4.75V14.25C19.5 14.3881 19.3881 14.5 19.25 14.5H5.56066L8.28033 11.7803C8.57322 11.4874 8.57322 11.0126 8.28033 10.7197C7.98744 10.4268 7.51256 10.4268 7.21967 10.7197L3.21967 14.7197C2.92678 15.0126 2.92678 15.4874 3.21967 15.7803L7.21967 19.7803C7.51256 20.0732 7.98744 20.0732 8.28033 19.7803C8.57322 19.4874 8.57322 19.0126 8.28033 18.7197L5.56066 16H19.25C20.2165 16 21 15.2165 21 14.25V4.75C21 4.33579 20.6642 4 20.25 4Z",
129
+ fill: "currentColor"
130
+ })
131
+ }),
132
+ delete: /* @__PURE__ */ t("svg", {
133
+ width: "14",
134
+ height: "14",
135
+ viewBox: "0 0 24 24",
136
+ fill: "none",
137
+ xmlns: "http://www.w3.org/2000/svg",
138
+ children: /* @__PURE__ */ t("path", {
139
+ d: "M14.9988 9.75L12.7488 12M12.7488 12L10.4988 14.25M12.7488 12L10.4988 9.75M12.7488 12L14.9988 14.25M6.55509 4.75H20.2488C20.8011 4.75 21.2488 5.19772 21.2488 5.75V18.25C21.2488 18.8023 20.8011 19.25 20.2488 19.25H6.55509C6.2092 19.25 5.88786 19.0712 5.70545 18.7774L1.82614 12.5274C1.62566 12.2044 1.62566 11.7956 1.82614 11.4726L5.70545 5.22264C5.88786 4.92875 6.2092 4.75 6.55509 4.75Z",
140
+ stroke: "currentColor",
141
+ strokeWidth: "1.5",
142
+ strokeLinecap: "round",
143
+ strokeLinejoin: "round"
144
+ })
145
+ })
146
+ }, i = {
147
+ arrowLeft: "Left Arrow",
148
+ arrowRight: "Right Arrow",
149
+ arrowUp: "Up Arrow",
150
+ arrowDown: "Down Arrow",
151
+ command: "Command",
152
+ option: "Option",
153
+ shift: "Shift",
154
+ control: "Control",
155
+ return: "Return",
156
+ delete: "Delete"
157
+ }, a = ({ className: a, symbol: o, symbolPosition: s = "start", children: c, ...l }) => {
158
+ let u = c != null && c !== "", d = o && /* @__PURE__ */ t("span", {
159
+ "aria-hidden": "true",
160
+ children: r[o]
161
+ }), f = !u && o ? i[o] : void 0, p = l["aria-label"] ?? f;
162
+ return /* @__PURE__ */ n("kbd", {
163
+ className: e("h-5 min-w-5 gap-1 rounded-sm px-1 text-xs font-medium pointer-events-none inline-flex w-fit items-center justify-center bg-kbd-bg font-mono! text-kbd-text select-none", "[&_svg:not([class*='size-'])]:size-3 in-data-[slot=tooltip-content]:bg-level-three", a),
164
+ "data-slot": "kbd",
165
+ "data-testid": "spectral-kbd",
166
+ ...l,
167
+ "aria-label": p,
168
+ children: [
169
+ s === "start" && d,
170
+ c,
171
+ s === "end" && d
172
+ ]
173
+ });
88
174
  };
175
+ a.displayName = "Kbd";
176
+ var o = ({ className: n, ...r }) => /* @__PURE__ */ t("kbd", {
177
+ className: e("gap-1 inline-flex items-center", n),
178
+ "data-slot": "kbd-group",
179
+ "data-testid": "spectral-kbd-group",
180
+ ...r
181
+ });
182
+ o.displayName = "KbdGroup";
183
+ //#endregion
184
+ export { a as Kbd, o as KbdGroup };
package/dist/Label.js CHANGED
@@ -1,16 +1,14 @@
1
1
  import "./styles/main.css";
2
- import { jsx as o } from "react/jsx-runtime";
3
- import { cn as t } from "./utils/twUtils.js";
2
+ import { t as e } from "./twUtils-VNWgstKL.js";
4
3
  import "react";
5
- const r = ({
6
- className: e,
7
- ref: a,
8
- ...l
9
- }) => (
10
- // eslint-disable-next-line jsx-a11y/label-has-associated-control
11
- /* @__PURE__ */ o("label", { className: t("text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70", e), "data-slot": "label", ref: a, ...l })
12
- );
13
- r.displayName = "Label";
14
- export {
15
- r as Label
16
- };
4
+ import { jsx as t } from "react/jsx-runtime";
5
+ //#region src/components/Label/Label.tsx
6
+ var n = ({ className: n, ref: r, ...i }) => /* @__PURE__ */ t("label", {
7
+ className: e("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", n),
8
+ "data-slot": "label",
9
+ ref: r,
10
+ ...i
11
+ });
12
+ n.displayName = "Label";
13
+ //#endregion
14
+ export { n as Label };