@spark-ui/components 17.2.3 → 17.2.4

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 (302) hide show
  1. package/dist/DialogContent.styles-BSxCCi-u.mjs +62 -0
  2. package/dist/DialogContent.styles-BSxCCi-u.mjs.map +1 -0
  3. package/dist/DialogContent.styles-CAhJtUud.js +2 -0
  4. package/dist/DialogContent.styles-CAhJtUud.js.map +1 -0
  5. package/dist/FormFieldRequiredIndicator-CtgkvPZo.js +2 -0
  6. package/dist/FormFieldRequiredIndicator-CtgkvPZo.js.map +1 -0
  7. package/dist/FormFieldRequiredIndicator-DOGQ_HxO.mjs +14 -0
  8. package/dist/FormFieldRequiredIndicator-DOGQ_HxO.mjs.map +1 -0
  9. package/dist/accordion/index.js +2 -2
  10. package/dist/accordion/index.js.map +1 -1
  11. package/dist/accordion/index.mjs +99 -161
  12. package/dist/accordion/index.mjs.map +1 -1
  13. package/dist/alert-dialog/index.js +2 -2
  14. package/dist/alert-dialog/index.js.map +1 -1
  15. package/dist/alert-dialog/index.mjs +169 -235
  16. package/dist/alert-dialog/index.mjs.map +1 -1
  17. package/dist/avatar/index.js +2 -2
  18. package/dist/avatar/index.js.map +1 -1
  19. package/dist/avatar/index.mjs +187 -224
  20. package/dist/avatar/index.mjs.map +1 -1
  21. package/dist/badge/index.js +2 -2
  22. package/dist/badge/index.js.map +1 -1
  23. package/dist/badge/index.mjs +115 -81
  24. package/dist/badge/index.mjs.map +1 -1
  25. package/dist/breadcrumb/index.js +2 -2
  26. package/dist/breadcrumb/index.js.map +1 -1
  27. package/dist/breadcrumb/index.mjs +73 -106
  28. package/dist/breadcrumb/index.mjs.map +1 -1
  29. package/dist/button/index.js +1 -2
  30. package/dist/button/index.mjs +2 -5
  31. package/dist/button-BTDRzvpB.js +2 -0
  32. package/dist/button-BTDRzvpB.js.map +1 -0
  33. package/dist/button-_YZ_4J42.mjs +643 -0
  34. package/dist/button-_YZ_4J42.mjs.map +1 -0
  35. package/dist/card/index.js +2 -2
  36. package/dist/card/index.js.map +1 -1
  37. package/dist/card/index.mjs +327 -394
  38. package/dist/card/index.mjs.map +1 -1
  39. package/dist/carousel/index.js +2 -2
  40. package/dist/carousel/index.js.map +1 -1
  41. package/dist/carousel/index.mjs +515 -618
  42. package/dist/carousel/index.mjs.map +1 -1
  43. package/dist/checkbox/index.js +2 -2
  44. package/dist/checkbox/index.js.map +1 -1
  45. package/dist/checkbox/index.mjs +213 -246
  46. package/dist/checkbox/index.mjs.map +1 -1
  47. package/dist/chip/index.js +2 -2
  48. package/dist/chip/index.js.map +1 -1
  49. package/dist/chip/index.mjs +601 -652
  50. package/dist/chip/index.mjs.map +1 -1
  51. package/dist/chunk-C91j1N6u.js +1 -0
  52. package/dist/circular-meter/index.js +2 -2
  53. package/dist/circular-meter/index.js.map +1 -1
  54. package/dist/circular-meter/index.mjs +354 -309
  55. package/dist/circular-meter/index.mjs.map +1 -1
  56. package/dist/collapsible/index.js +2 -2
  57. package/dist/collapsible/index.js.map +1 -1
  58. package/dist/collapsible/index.mjs +53 -53
  59. package/dist/collapsible/index.mjs.map +1 -1
  60. package/dist/combobox/index.js +2 -2
  61. package/dist/combobox/index.js.map +1 -1
  62. package/dist/combobox/index.mjs +721 -876
  63. package/dist/combobox/index.mjs.map +1 -1
  64. package/dist/dialog/index.js +2 -2
  65. package/dist/dialog/index.js.map +1 -1
  66. package/dist/dialog/index.mjs +181 -206
  67. package/dist/dialog/index.mjs.map +1 -1
  68. package/dist/divider/index.js +2 -2
  69. package/dist/divider/index.js.map +1 -1
  70. package/dist/divider/index.mjs +178 -183
  71. package/dist/divider/index.mjs.map +1 -1
  72. package/dist/drawer/index.js +2 -2
  73. package/dist/drawer/index.js.map +1 -1
  74. package/dist/drawer/index.mjs +277 -309
  75. package/dist/drawer/index.mjs.map +1 -1
  76. package/dist/dropdown/index.js +2 -2
  77. package/dist/dropdown/index.js.map +1 -1
  78. package/dist/dropdown/index.mjs +429 -492
  79. package/dist/dropdown/index.mjs.map +1 -1
  80. package/dist/file-upload/index.js +2 -2
  81. package/dist/file-upload/index.js.map +1 -1
  82. package/dist/file-upload/index.mjs +540 -677
  83. package/dist/file-upload/index.mjs.map +1 -1
  84. package/dist/form-field/index.js +1 -2
  85. package/dist/form-field/index.mjs +2 -284
  86. package/dist/form-field-B8QzM655.mjs +231 -0
  87. package/dist/form-field-B8QzM655.mjs.map +1 -0
  88. package/dist/form-field-Bu_0E9tb.js +2 -0
  89. package/dist/form-field-Bu_0E9tb.js.map +1 -0
  90. package/dist/icon/index.js +1 -2
  91. package/dist/icon/index.mjs +2 -5
  92. package/dist/icon-CRPcdgYp.js +2 -0
  93. package/dist/icon-CRPcdgYp.js.map +1 -0
  94. package/dist/icon-D05Uqh8_.mjs +41 -0
  95. package/dist/icon-D05Uqh8_.mjs.map +1 -0
  96. package/dist/icon-button/index.js +1 -2
  97. package/dist/icon-button/index.mjs +2 -5
  98. package/dist/icon-button-6p3O7NIm.mjs +28 -0
  99. package/dist/icon-button-6p3O7NIm.mjs.map +1 -0
  100. package/dist/icon-button-CykysbgJ.js +2 -0
  101. package/dist/icon-button-CykysbgJ.js.map +1 -0
  102. package/dist/input/index.js +1 -2
  103. package/dist/input/index.mjs +2 -455
  104. package/dist/input-CmYeHYWQ.mjs +355 -0
  105. package/dist/input-CmYeHYWQ.mjs.map +1 -0
  106. package/dist/input-DNr40G2Z.js +2 -0
  107. package/dist/input-DNr40G2Z.js.map +1 -0
  108. package/dist/input-otp/index.js +2 -2
  109. package/dist/input-otp/index.js.map +1 -1
  110. package/dist/input-otp/index.mjs +344 -407
  111. package/dist/input-otp/index.mjs.map +1 -1
  112. package/dist/kbd/index.js +2 -2
  113. package/dist/kbd/index.js.map +1 -1
  114. package/dist/kbd/index.mjs +12 -17
  115. package/dist/kbd/index.mjs.map +1 -1
  116. package/dist/label/index.js +1 -2
  117. package/dist/label/index.mjs +2 -40
  118. package/dist/label-BqRlrca0.mjs +31 -0
  119. package/dist/label-BqRlrca0.mjs.map +1 -0
  120. package/dist/label-DU0p0d-f.js +2 -0
  121. package/dist/label-DU0p0d-f.js.map +1 -0
  122. package/dist/link-box/index.js +2 -2
  123. package/dist/link-box/index.js.map +1 -1
  124. package/dist/link-box/index.mjs +36 -34
  125. package/dist/link-box/index.mjs.map +1 -1
  126. package/dist/meter/index.js +2 -2
  127. package/dist/meter/index.js.map +1 -1
  128. package/dist/meter/index.mjs +149 -171
  129. package/dist/meter/index.mjs.map +1 -1
  130. package/dist/pagination/index.js +2 -2
  131. package/dist/pagination/index.js.map +1 -1
  132. package/dist/pagination/index.mjs +253 -214
  133. package/dist/pagination/index.mjs.map +1 -1
  134. package/dist/popover/index.js +1 -2
  135. package/dist/popover/index.mjs +2 -239
  136. package/dist/popover-CxZAQmw6.mjs +211 -0
  137. package/dist/popover-CxZAQmw6.mjs.map +1 -0
  138. package/dist/popover-GOovJ27J.js +2 -0
  139. package/dist/popover-GOovJ27J.js.map +1 -0
  140. package/dist/portal/index.js +2 -2
  141. package/dist/portal/index.js.map +1 -1
  142. package/dist/portal/index.mjs +8 -7
  143. package/dist/portal/index.mjs.map +1 -1
  144. package/dist/progress/index.js +1 -2
  145. package/dist/progress/index.mjs +2 -178
  146. package/dist/progress-cEf3tFbn.mjs +132 -0
  147. package/dist/progress-cEf3tFbn.mjs.map +1 -0
  148. package/dist/progress-rJZcPJsZ.js +2 -0
  149. package/dist/progress-rJZcPJsZ.js.map +1 -0
  150. package/dist/progress-tracker/index.js +2 -2
  151. package/dist/progress-tracker/index.js.map +1 -1
  152. package/dist/progress-tracker/index.mjs +303 -380
  153. package/dist/progress-tracker/index.mjs.map +1 -1
  154. package/dist/radio-group/index.js +2 -2
  155. package/dist/radio-group/index.js.map +1 -1
  156. package/dist/radio-group/index.mjs +204 -213
  157. package/dist/radio-group/index.mjs.map +1 -1
  158. package/dist/rating/index.js +2 -2
  159. package/dist/rating/index.js.map +1 -1
  160. package/dist/rating/index.mjs +189 -244
  161. package/dist/rating/index.mjs.map +1 -1
  162. package/dist/rating-display/index.js +2 -2
  163. package/dist/rating-display/index.js.map +1 -1
  164. package/dist/rating-display/index.mjs +165 -166
  165. package/dist/rating-display/index.mjs.map +1 -1
  166. package/dist/scrolling-list/index.js +2 -2
  167. package/dist/scrolling-list/index.js.map +1 -1
  168. package/dist/scrolling-list/index.mjs +216 -273
  169. package/dist/scrolling-list/index.mjs.map +1 -1
  170. package/dist/segmented-control/index.js +2 -2
  171. package/dist/segmented-control/index.js.map +1 -1
  172. package/dist/segmented-control/index.mjs +146 -180
  173. package/dist/segmented-control/index.mjs.map +1 -1
  174. package/dist/segmented-gauge/index.js +2 -2
  175. package/dist/segmented-gauge/index.js.map +1 -1
  176. package/dist/segmented-gauge/index.mjs +146 -195
  177. package/dist/segmented-gauge/index.mjs.map +1 -1
  178. package/dist/select/index.js +2 -2
  179. package/dist/select/index.js.map +1 -1
  180. package/dist/select/index.mjs +279 -327
  181. package/dist/select/index.mjs.map +1 -1
  182. package/dist/skeleton/index.js +2 -2
  183. package/dist/skeleton/index.js.map +1 -1
  184. package/dist/skeleton/index.mjs +92 -114
  185. package/dist/skeleton/index.mjs.map +1 -1
  186. package/dist/slider/index.js +2 -2
  187. package/dist/slider/index.js.map +1 -1
  188. package/dist/slider/index.mjs +259 -326
  189. package/dist/slider/index.mjs.map +1 -1
  190. package/dist/slot/index.js +2 -2
  191. package/dist/slot/index.js.map +1 -1
  192. package/dist/slot/index.mjs +12 -7
  193. package/dist/slot/index.mjs.map +1 -1
  194. package/dist/snackbar/index.js +2 -2
  195. package/dist/snackbar/index.js.map +1 -1
  196. package/dist/snackbar/index.mjs +404 -529
  197. package/dist/snackbar/index.mjs.map +1 -1
  198. package/dist/spinner/index.js +1 -2
  199. package/dist/spinner/index.mjs +2 -5
  200. package/dist/spinner-DFUoYvmm.js +2 -0
  201. package/dist/spinner-DFUoYvmm.js.map +1 -0
  202. package/dist/spinner-DULLiM6a.mjs +56 -0
  203. package/dist/spinner-DULLiM6a.mjs.map +1 -0
  204. package/dist/src/avatar/index.d.mts +2 -2
  205. package/dist/src/avatar/index.d.ts +2 -2
  206. package/dist/src/file-upload/index.d.mts +1 -1
  207. package/dist/src/file-upload/index.d.ts +1 -1
  208. package/dist/stepper/index.js +2 -2
  209. package/dist/stepper/index.js.map +1 -1
  210. package/dist/stepper/index.mjs +139 -176
  211. package/dist/stepper/index.mjs.map +1 -1
  212. package/dist/switch/index.js +2 -2
  213. package/dist/switch/index.js.map +1 -1
  214. package/dist/switch/index.mjs +194 -197
  215. package/dist/switch/index.mjs.map +1 -1
  216. package/dist/tabs/index.js +2 -2
  217. package/dist/tabs/index.js.map +1 -1
  218. package/dist/tabs/index.mjs +337 -389
  219. package/dist/tabs/index.mjs.map +1 -1
  220. package/dist/tag/index.js +2 -2
  221. package/dist/tag/index.js.map +1 -1
  222. package/dist/tag/index.mjs +192 -211
  223. package/dist/tag/index.mjs.map +1 -1
  224. package/dist/text-link/index.js +2 -2
  225. package/dist/text-link/index.js.map +1 -1
  226. package/dist/text-link/index.mjs +44 -5
  227. package/dist/text-link/index.mjs.map +1 -1
  228. package/dist/textarea/index.js +2 -2
  229. package/dist/textarea/index.js.map +1 -1
  230. package/dist/textarea/index.mjs +51 -50
  231. package/dist/textarea/index.mjs.map +1 -1
  232. package/dist/toast/index.js +2 -2
  233. package/dist/toast/index.js.map +1 -1
  234. package/dist/toast/index.mjs +314 -367
  235. package/dist/toast/index.mjs.map +1 -1
  236. package/dist/useRenderSlot-DP4fYerF.mjs +11 -0
  237. package/dist/useRenderSlot-DP4fYerF.mjs.map +1 -0
  238. package/dist/useRenderSlot-Xxf_s88b.js +2 -0
  239. package/dist/useRenderSlot-Xxf_s88b.js.map +1 -0
  240. package/dist/visually-hidden/index.js +2 -2
  241. package/dist/visually-hidden/index.js.map +1 -1
  242. package/dist/visually-hidden/index.mjs +25 -5
  243. package/dist/visually-hidden/index.mjs.map +1 -1
  244. package/package.json +4 -4
  245. package/dist/Button-1M9DcZl0.mjs +0 -704
  246. package/dist/Button-1M9DcZl0.mjs.map +0 -1
  247. package/dist/Button-FZceRWG2.js +0 -2
  248. package/dist/Button-FZceRWG2.js.map +0 -1
  249. package/dist/DialogContent.styles-CziMQtYr.js +0 -2
  250. package/dist/DialogContent.styles-CziMQtYr.js.map +0 -1
  251. package/dist/DialogContent.styles-Du7_Dkde.mjs +0 -60
  252. package/dist/DialogContent.styles-Du7_Dkde.mjs.map +0 -1
  253. package/dist/FormFieldRequiredIndicator-CHfcoT2y.js +0 -2
  254. package/dist/FormFieldRequiredIndicator-CHfcoT2y.js.map +0 -1
  255. package/dist/FormFieldRequiredIndicator-DTnCGiX2.mjs +0 -13
  256. package/dist/FormFieldRequiredIndicator-DTnCGiX2.mjs.map +0 -1
  257. package/dist/Icon-BO327oHU.mjs +0 -57
  258. package/dist/Icon-BO327oHU.mjs.map +0 -1
  259. package/dist/Icon-C-cNTnzd.js +0 -2
  260. package/dist/Icon-C-cNTnzd.js.map +0 -1
  261. package/dist/IconButton-BR1bJSQA.js +0 -2
  262. package/dist/IconButton-BR1bJSQA.js.map +0 -1
  263. package/dist/IconButton-DdB3Pq13.mjs +0 -43
  264. package/dist/IconButton-DdB3Pq13.mjs.map +0 -1
  265. package/dist/Slot-DLY1rJrG.mjs +0 -14
  266. package/dist/Slot-DLY1rJrG.mjs.map +0 -1
  267. package/dist/Slot-DQ8z2zsy.js +0 -2
  268. package/dist/Slot-DQ8z2zsy.js.map +0 -1
  269. package/dist/Spinner-Br4Rp9V2.js +0 -2
  270. package/dist/Spinner-Br4Rp9V2.js.map +0 -1
  271. package/dist/Spinner-Co3AjkQV.mjs +0 -68
  272. package/dist/Spinner-Co3AjkQV.mjs.map +0 -1
  273. package/dist/TextLink-5MvP0P8D.js +0 -2
  274. package/dist/TextLink-5MvP0P8D.js.map +0 -1
  275. package/dist/TextLink-Cc_LeVcx.mjs +0 -57
  276. package/dist/TextLink-Cc_LeVcx.mjs.map +0 -1
  277. package/dist/VisuallyHidden-CB6Nx76j.js +0 -2
  278. package/dist/VisuallyHidden-CB6Nx76j.js.map +0 -1
  279. package/dist/VisuallyHidden-DjlV0-CW.mjs +0 -28
  280. package/dist/VisuallyHidden-DjlV0-CW.mjs.map +0 -1
  281. package/dist/button/index.js.map +0 -1
  282. package/dist/button/index.mjs.map +0 -1
  283. package/dist/form-field/index.js.map +0 -1
  284. package/dist/form-field/index.mjs.map +0 -1
  285. package/dist/icon/index.js.map +0 -1
  286. package/dist/icon/index.mjs.map +0 -1
  287. package/dist/icon-button/index.js.map +0 -1
  288. package/dist/icon-button/index.mjs.map +0 -1
  289. package/dist/input/index.js.map +0 -1
  290. package/dist/input/index.mjs.map +0 -1
  291. package/dist/label/index.js.map +0 -1
  292. package/dist/label/index.mjs.map +0 -1
  293. package/dist/popover/index.js.map +0 -1
  294. package/dist/popover/index.mjs.map +0 -1
  295. package/dist/progress/index.js.map +0 -1
  296. package/dist/progress/index.mjs.map +0 -1
  297. package/dist/spinner/index.js.map +0 -1
  298. package/dist/spinner/index.mjs.map +0 -1
  299. package/dist/useRenderSlot-Bta2kdp4.mjs +0 -10
  300. package/dist/useRenderSlot-Bta2kdp4.mjs.map +0 -1
  301. package/dist/useRenderSlot-DATwjgpo.js +0 -2
  302. package/dist/useRenderSlot-DATwjgpo.js.map +0 -1
@@ -1,385 +1,308 @@
1
- import { jsx as e, jsxs as j, Fragment as O } from "react/jsx-runtime";
2
- import { cx as y, cva as x } from "class-variance-authority";
3
- import { createContext as S, useContext as P, useState as $, useId as A, useEffect as E } from "react";
4
- import { Check as F } from "@spark-ui/icons/Check";
5
- import { I as M } from "../Icon-BO327oHU.mjs";
6
- const R = y([
7
- "flex flex-nowrap items-start group/list",
8
- "data-[orientation=horizontal]:flex-row data-[orientation=horizontal]:w-full",
9
- "data-[orientation=vertical]:flex-col"
10
- ]), I = S(
11
- {}
12
- ), T = S(
13
- {}
14
- ), w = () => P(I), N = () => P(T), B = ":progress-tracker", C = ({
15
- stepIndex: t = 0,
16
- onStepClick: a,
17
- readOnly: r = !1,
18
- intent: n = "support",
19
- size: s = "lg",
20
- orientation: l = "horizontal",
21
- children: o,
22
- className: p,
23
- ref: b,
24
- ...d
25
- }) => {
26
- const [g, v] = $(/* @__PURE__ */ new Map()), c = r ? "div" : "nav";
27
- return /* @__PURE__ */ e(
28
- I.Provider,
29
- {
30
- value: { stepIndex: t, onStepClick: a, steps: g, setSteps: v, size: s, intent: n, readOnly: r },
31
- children: /* @__PURE__ */ e(
32
- c,
33
- {
34
- ref: b,
35
- "data-spark-component": "progress-tracker",
36
- className: y("inline-flex", p),
37
- ...d,
38
- children: /* @__PURE__ */ e(
39
- "ol",
40
- {
41
- "data-orientation": l,
42
- className: R,
43
- style: { counterReset: "step" },
44
- children: o
45
- }
46
- )
47
- }
48
- )
49
- }
50
- );
1
+ import { t as e } from "../icon-D05Uqh8_.mjs";
2
+ import { cva as t, cx as n } from "class-variance-authority";
3
+ import { createContext as r, useContext as i, useEffect as a, useId as o, useState as s } from "react";
4
+ import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
5
+ import { Check as d } from "@spark-ui/icons/Check";
6
+ //#region src/progress-tracker/ProgressTracker.styles.ts
7
+ var f = n([
8
+ "flex flex-nowrap items-start group/list",
9
+ "data-[orientation=horizontal]:flex-row data-[orientation=horizontal]:w-full",
10
+ "data-[orientation=vertical]:flex-col"
11
+ ]), p = r({}), m = r({}), h = () => i(p), g = () => i(m), _ = ":progress-tracker", v = ({ stepIndex: e = 0, onStepClick: t, readOnly: r = !1, intent: i = "support", size: a = "lg", orientation: o = "horizontal", children: c, className: u, ref: d, ...m }) => {
12
+ let [h, g] = s(/* @__PURE__ */ new Map()), _ = r ? "div" : "nav";
13
+ return /* @__PURE__ */ l(p.Provider, {
14
+ value: {
15
+ stepIndex: e,
16
+ onStepClick: t,
17
+ steps: h,
18
+ setSteps: g,
19
+ size: a,
20
+ intent: i,
21
+ readOnly: r
22
+ },
23
+ children: /* @__PURE__ */ l(_, {
24
+ ref: d,
25
+ "data-spark-component": "progress-tracker",
26
+ className: n("inline-flex", u),
27
+ ...m,
28
+ children: /* @__PURE__ */ l("ol", {
29
+ "data-orientation": o,
30
+ className: f,
31
+ style: { counterReset: "step" },
32
+ children: c
33
+ })
34
+ })
35
+ });
51
36
  };
52
- C.displayName = "ProgressTracker";
53
- const D = x(
54
- [
55
- "relative inline-flex items-start flex-auto first:grow-0 justify-center group/item",
56
- // Progress Track
57
- "after:absolute after:z-base",
58
- "last:after:content-none",
59
- "after:bg-outline",
60
- "group-data-[orientation=horizontal]/list:before:bg-outline",
61
- // Horizontal orientation
62
- "group-data-[orientation=horizontal]/list:px-[1px]",
63
- "group-data-[orientation=horizontal]/list:before:absolute group-data-[orientation=horizontal]/list:before:z-base",
64
- "group-data-[orientation=horizontal]/list:before:left-0 group-data-[orientation=horizontal]/list:after:right-0",
65
- "group-data-[orientation=horizontal]/list:before:h-[1px] group-data-[orientation=horizontal]/list:after:h-[1px]",
66
- "first:group-data-[orientation=horizontal]/list:before:content-none",
67
- // Vertical orientation
68
- "group-data-[orientation=vertical]/list:py-[1px]",
69
- "group-data-[orientation=vertical]/list:items-start",
70
- "group-data-[orientation=vertical]/list:after:w-[1px] group-data-[orientation=vertical]/list:after:bottom-[-1px]"
71
- ],
72
- {
73
- variants: {
74
- size: {
75
- sm: [
76
- // Horizontal orientation
77
- "group-data-[orientation=horizontal]/list:before:top-[8px] group-data-[orientation=horizontal]/list:after:top-[8px]",
78
- "group-data-[orientation=horizontal]/list:before:right-[calc(50%+12px)] group-data-[orientation=horizontal]/list:after:left-[calc(50%+12px)]",
79
- "first:group-data-[orientation=horizontal]/list:after:left-[calc(50%+10px)]",
80
- "last:group-data-[orientation=horizontal]/list:before:right-[calc(50%+10px)]",
81
- // Vertical orientation
82
- "group-data-[orientation=vertical]/list:after:left-[8px]",
83
- "group-data-[orientation=vertical]/list:after:top-[25px]",
84
- "first:group-data-[orientation=vertical]/list:after:top-[21px]"
85
- ],
86
- md: [
87
- // Horizontal orientation
88
- "group-data-[orientation=horizontal]/list:before:top-[12px] group-data-[orientation=horizontal]/list:after:top-[12px]",
89
- "group-data-[orientation=horizontal]/list:before:right-[calc(50%+16px)] group-data-[orientation=horizontal]/list:after:left-[calc(50%+16px)]",
90
- "first:group-data-[orientation=horizontal]/list:after:left-[calc(50%+14px)]",
91
- "last:group-data-[orientation=horizontal]/list:before:right-[calc(50%+14px)]",
92
- // Vertical orientation
93
- "group-data-[orientation=vertical]/list:after:left-[12px]",
94
- "group-data-[orientation=vertical]/list:after:top-[33px]",
95
- "first:group-data-[orientation=vertical]/list:after:top-[29px]"
96
- ],
97
- lg: [
98
- // Horizontal orientation
99
- "group-data-[orientation=horizontal]/list:before:top-[16px] group-data-[orientation=horizontal]/list:after:top-[16px]",
100
- "group-data-[orientation=horizontal]/list:before:right-[calc(50%+20px)] group-data-[orientation=horizontal]/list:after:left-[calc(50%+20px)]",
101
- "first:group-data-[orientation=horizontal]/list:after:left-[calc(50%+18px)]",
102
- "last:group-data-[orientation=horizontal]/list:before:right-[calc(50%+18px)]",
103
- // Vertical orientation
104
- "group-data-[orientation=vertical]/list:after:left-[16px]",
105
- "group-data-[orientation=vertical]/list:after:top-[41px]",
106
- "first:group-data-[orientation=vertical]/list:after:top-[37px]"
107
- ]
108
- },
109
- intent: {
110
- support: "",
111
- neutral: "",
112
- success: ""
113
- },
114
- disabled: {
115
- true: "before:opacity-dim-3",
116
- false: ""
117
- },
118
- disabledAfter: {
119
- true: "after:opacity-dim-3",
120
- false: ""
121
- }
122
- },
123
- defaultVariants: {
124
- disabled: !1,
125
- disabledAfter: !1,
126
- size: "lg",
127
- intent: "support"
128
- }
129
- }
130
- ), X = x(
131
- [
132
- "relative flex group/btn disabled:cursor-default",
133
- // Horizontal orientation
134
- "group-data-[orientation=horizontal]/list:flex-col group-data-[orientation=horizontal]/list:items-center",
135
- "group-data-[orientation=horizontal]/list:text-center group-data-[orientation=horizontal]/list:mx-sm",
136
- "group-first/item:group-data-[orientation=horizontal]/list:ml-0 group-last/item:group-data-[orientation=horizontal]/list:mr-0",
137
- // Vertical orientation
138
- "group-data-[orientation=vertical]/list:flex-row group-data-[orientation=vertical]/list:items-start",
139
- "group-data-[orientation=vertical]/list:text-left group-data-[orientation=vertical]/list:my-sm",
140
- "group-first/item:group-data-[orientation=vertical]/list:mt-0 group-last/item:group-data-[orientation=vertical]/list:mb-0"
141
- ],
142
- {
143
- variants: {
144
- size: {
145
- sm: [
146
- "group-data-[orientation=horizontal]/list:min-w-sz-16 group-data-[orientation=horizontal]/list:mt-[16px]",
147
- "group-data-[orientation=vertical]/list:min-h-sz-16 group-data-[orientation=vertical]/list:ml-[16px]"
148
- ],
149
- md: [
150
- "group-data-[orientation=horizontal]/list:min-w-sz-24 group-data-[orientation=horizontal]/list:mt-[24px]",
151
- "group-data-[orientation=vertical]/list:min-h-sz-24 group-data-[orientation=vertical]/list:ml-[24px]"
152
- ],
153
- lg: [
154
- "group-data-[orientation=horizontal]/list:min-w-sz-32 group-data-[orientation=horizontal]/list:mt-[32px]",
155
- "group-data-[orientation=vertical]/list:min-h-sz-32 group-data-[orientation=vertical]/list:ml-[32px]"
156
- ]
157
- },
158
- readOnly: {
159
- true: "cursor-default",
160
- false: "cursor-pointer"
161
- }
162
- },
163
- defaultVariants: {
164
- size: "lg",
165
- readOnly: !1
166
- }
167
- }
168
- ), _ = x(
169
- [
170
- "relative flex shrink-0 justify-center items-center",
171
- "rounded-full",
172
- "text-body-2 font-bold",
173
- "group-disabled/btn:opacity-dim-3"
174
- ],
175
- {
176
- variants: {
177
- size: {
178
- sm: [
179
- "w-sz-16 h-sz-16",
180
- "group-data-[orientation=horizontal]/list:mt-[-16px]",
181
- "group-data-[orientation=vertical]/list:ml-[-16px]"
182
- ],
183
- md: [
184
- "w-sz-24 h-sz-24",
185
- "group-data-[orientation=horizontal]/list:mt-[-24px]",
186
- "group-data-[orientation=vertical]/list:ml-[-24px]"
187
- ],
188
- lg: [
189
- "w-sz-32 h-sz-32",
190
- "group-data-[orientation=horizontal]/list:mt-[-32px]",
191
- "group-data-[orientation=vertical]/list:ml-[-32px]"
192
- ]
193
- },
194
- intent: {
195
- support: "",
196
- neutral: "",
197
- success: ""
198
- },
199
- state: {
200
- complete: "",
201
- incomplete: "",
202
- active: ""
203
- }
204
- },
205
- /**
206
- * Known type issue with CVA compoundVariants and VS Code/Intellisense:
207
- * https://github.com/joe-bell/cva/discussions/195#discussioncomment-6750163
208
- * */
209
- /* @ts-ignore */
210
- compoundVariants: [
211
- // Support
212
- {
213
- intent: "support",
214
- state: ["complete", "incomplete"],
215
- class: [
216
- "text-on-support-container bg-support-container",
217
- "group-hover/btn:group-data-[interactive=true]/btn:bg-support-container-hovered",
218
- "group-hover/btn:group-data-[interactive=false]/btn:bg-support-container"
219
- ]
220
- },
221
- {
222
- intent: "support",
223
- state: "active",
224
- class: "text-on-support bg-support"
225
- },
226
- // Neutral
227
- {
228
- intent: "neutral",
229
- state: ["complete", "incomplete"],
230
- class: [
231
- "text-on-neutral-container bg-neutral-container",
232
- "group-hover/btn:group-data-[interactive=true]/btn:bg-neutral-container-hovered",
233
- "group-hover/btn:group-data-[interactive=false]/btn:bg-neutral-container"
234
- ]
235
- },
236
- {
237
- intent: "neutral",
238
- state: "active",
239
- class: "text-on-neutral bg-neutral"
240
- },
241
- // Success
242
- {
243
- intent: "success",
244
- state: ["complete", "incomplete"],
245
- class: [
246
- "text-on-success-container bg-success-container",
247
- "group-hover/btn:group-data-[interactive=true]/btn:bg-success-container-hovered",
248
- "group-hover/btn:group-data-[interactive=false]/btn:bg-success-container"
249
- ]
250
- },
251
- {
252
- intent: "success",
253
- state: "active",
254
- class: "text-on-success bg-success"
255
- }
256
- ],
257
- defaultVariants: {
258
- size: "lg",
259
- state: "incomplete",
260
- intent: "support"
261
- }
262
- }
263
- ), q = () => /* @__PURE__ */ e(M, { size: "sm", children: /* @__PURE__ */ e(F, {}) }), h = ({
264
- complete: t,
265
- incomplete: a,
266
- className: r
267
- }) => {
268
- const { size: n, intent: s } = w(), { index: l, state: o } = N();
269
- return /* @__PURE__ */ e("span", { className: _({ size: n, intent: s, state: o, className: r }), "aria-hidden": "true", children: n !== "sm" && /* @__PURE__ */ j(O, { children: [
270
- o === "complete" && (t === void 0 ? /* @__PURE__ */ e(q, {}) : t),
271
- o !== "complete" && (a === void 0 ? `${l + 1}` : a)
272
- ] }) });
37
+ v.displayName = "ProgressTracker";
38
+ //#endregion
39
+ //#region src/progress-tracker/ProgressTrackerStep.styles.ts
40
+ var y = t([
41
+ "relative inline-flex items-start flex-auto first:grow-0 justify-center group/item",
42
+ "after:absolute after:z-base",
43
+ "last:after:content-none",
44
+ "after:bg-outline",
45
+ "group-data-[orientation=horizontal]/list:before:bg-outline",
46
+ "group-data-[orientation=horizontal]/list:px-[1px]",
47
+ "group-data-[orientation=horizontal]/list:before:absolute group-data-[orientation=horizontal]/list:before:z-base",
48
+ "group-data-[orientation=horizontal]/list:before:left-0 group-data-[orientation=horizontal]/list:after:right-0",
49
+ "group-data-[orientation=horizontal]/list:before:h-[1px] group-data-[orientation=horizontal]/list:after:h-[1px]",
50
+ "first:group-data-[orientation=horizontal]/list:before:content-none",
51
+ "group-data-[orientation=vertical]/list:py-[1px]",
52
+ "group-data-[orientation=vertical]/list:items-start",
53
+ "group-data-[orientation=vertical]/list:after:w-[1px] group-data-[orientation=vertical]/list:after:bottom-[-1px]"
54
+ ], {
55
+ variants: {
56
+ size: {
57
+ sm: [
58
+ "group-data-[orientation=horizontal]/list:before:top-[8px] group-data-[orientation=horizontal]/list:after:top-[8px]",
59
+ "group-data-[orientation=horizontal]/list:before:right-[calc(50%+12px)] group-data-[orientation=horizontal]/list:after:left-[calc(50%+12px)]",
60
+ "first:group-data-[orientation=horizontal]/list:after:left-[calc(50%+10px)]",
61
+ "last:group-data-[orientation=horizontal]/list:before:right-[calc(50%+10px)]",
62
+ "group-data-[orientation=vertical]/list:after:left-[8px]",
63
+ "group-data-[orientation=vertical]/list:after:top-[25px]",
64
+ "first:group-data-[orientation=vertical]/list:after:top-[21px]"
65
+ ],
66
+ md: [
67
+ "group-data-[orientation=horizontal]/list:before:top-[12px] group-data-[orientation=horizontal]/list:after:top-[12px]",
68
+ "group-data-[orientation=horizontal]/list:before:right-[calc(50%+16px)] group-data-[orientation=horizontal]/list:after:left-[calc(50%+16px)]",
69
+ "first:group-data-[orientation=horizontal]/list:after:left-[calc(50%+14px)]",
70
+ "last:group-data-[orientation=horizontal]/list:before:right-[calc(50%+14px)]",
71
+ "group-data-[orientation=vertical]/list:after:left-[12px]",
72
+ "group-data-[orientation=vertical]/list:after:top-[33px]",
73
+ "first:group-data-[orientation=vertical]/list:after:top-[29px]"
74
+ ],
75
+ lg: [
76
+ "group-data-[orientation=horizontal]/list:before:top-[16px] group-data-[orientation=horizontal]/list:after:top-[16px]",
77
+ "group-data-[orientation=horizontal]/list:before:right-[calc(50%+20px)] group-data-[orientation=horizontal]/list:after:left-[calc(50%+20px)]",
78
+ "first:group-data-[orientation=horizontal]/list:after:left-[calc(50%+18px)]",
79
+ "last:group-data-[orientation=horizontal]/list:before:right-[calc(50%+18px)]",
80
+ "group-data-[orientation=vertical]/list:after:left-[16px]",
81
+ "group-data-[orientation=vertical]/list:after:top-[41px]",
82
+ "first:group-data-[orientation=vertical]/list:after:top-[37px]"
83
+ ]
84
+ },
85
+ intent: {
86
+ support: "",
87
+ neutral: "",
88
+ success: ""
89
+ },
90
+ disabled: {
91
+ true: "before:opacity-dim-3",
92
+ false: ""
93
+ },
94
+ disabledAfter: {
95
+ true: "after:opacity-dim-3",
96
+ false: ""
97
+ }
98
+ },
99
+ defaultVariants: {
100
+ disabled: !1,
101
+ disabledAfter: !1,
102
+ size: "lg",
103
+ intent: "support"
104
+ }
105
+ }), b = t([
106
+ "relative flex group/btn disabled:cursor-default",
107
+ "group-data-[orientation=horizontal]/list:flex-col group-data-[orientation=horizontal]/list:items-center",
108
+ "group-data-[orientation=horizontal]/list:text-center group-data-[orientation=horizontal]/list:mx-sm",
109
+ "group-first/item:group-data-[orientation=horizontal]/list:ml-0 group-last/item:group-data-[orientation=horizontal]/list:mr-0",
110
+ "group-data-[orientation=vertical]/list:flex-row group-data-[orientation=vertical]/list:items-start",
111
+ "group-data-[orientation=vertical]/list:text-left group-data-[orientation=vertical]/list:my-sm",
112
+ "group-first/item:group-data-[orientation=vertical]/list:mt-0 group-last/item:group-data-[orientation=vertical]/list:mb-0"
113
+ ], {
114
+ variants: {
115
+ size: {
116
+ sm: ["group-data-[orientation=horizontal]/list:min-w-sz-16 group-data-[orientation=horizontal]/list:mt-[16px]", "group-data-[orientation=vertical]/list:min-h-sz-16 group-data-[orientation=vertical]/list:ml-[16px]"],
117
+ md: ["group-data-[orientation=horizontal]/list:min-w-sz-24 group-data-[orientation=horizontal]/list:mt-[24px]", "group-data-[orientation=vertical]/list:min-h-sz-24 group-data-[orientation=vertical]/list:ml-[24px]"],
118
+ lg: ["group-data-[orientation=horizontal]/list:min-w-sz-32 group-data-[orientation=horizontal]/list:mt-[32px]", "group-data-[orientation=vertical]/list:min-h-sz-32 group-data-[orientation=vertical]/list:ml-[32px]"]
119
+ },
120
+ readOnly: {
121
+ true: "cursor-default",
122
+ false: "cursor-pointer"
123
+ }
124
+ },
125
+ defaultVariants: {
126
+ size: "lg",
127
+ readOnly: !1
128
+ }
129
+ }), x = t([
130
+ "relative flex shrink-0 justify-center items-center",
131
+ "rounded-full",
132
+ "text-body-2 font-bold",
133
+ "group-disabled/btn:opacity-dim-3"
134
+ ], {
135
+ variants: {
136
+ size: {
137
+ sm: [
138
+ "w-sz-16 h-sz-16",
139
+ "group-data-[orientation=horizontal]/list:mt-[-16px]",
140
+ "group-data-[orientation=vertical]/list:ml-[-16px]"
141
+ ],
142
+ md: [
143
+ "w-sz-24 h-sz-24",
144
+ "group-data-[orientation=horizontal]/list:mt-[-24px]",
145
+ "group-data-[orientation=vertical]/list:ml-[-24px]"
146
+ ],
147
+ lg: [
148
+ "w-sz-32 h-sz-32",
149
+ "group-data-[orientation=horizontal]/list:mt-[-32px]",
150
+ "group-data-[orientation=vertical]/list:ml-[-32px]"
151
+ ]
152
+ },
153
+ intent: {
154
+ support: "",
155
+ neutral: "",
156
+ success: ""
157
+ },
158
+ state: {
159
+ complete: "",
160
+ incomplete: "",
161
+ active: ""
162
+ }
163
+ },
164
+ compoundVariants: [
165
+ {
166
+ intent: "support",
167
+ state: ["complete", "incomplete"],
168
+ class: [
169
+ "text-on-support-container bg-support-container",
170
+ "group-hover/btn:group-data-[interactive=true]/btn:bg-support-container-hovered",
171
+ "group-hover/btn:group-data-[interactive=false]/btn:bg-support-container"
172
+ ]
173
+ },
174
+ {
175
+ intent: "support",
176
+ state: "active",
177
+ class: "text-on-support bg-support"
178
+ },
179
+ {
180
+ intent: "neutral",
181
+ state: ["complete", "incomplete"],
182
+ class: [
183
+ "text-on-neutral-container bg-neutral-container",
184
+ "group-hover/btn:group-data-[interactive=true]/btn:bg-neutral-container-hovered",
185
+ "group-hover/btn:group-data-[interactive=false]/btn:bg-neutral-container"
186
+ ]
187
+ },
188
+ {
189
+ intent: "neutral",
190
+ state: "active",
191
+ class: "text-on-neutral bg-neutral"
192
+ },
193
+ {
194
+ intent: "success",
195
+ state: ["complete", "incomplete"],
196
+ class: [
197
+ "text-on-success-container bg-success-container",
198
+ "group-hover/btn:group-data-[interactive=true]/btn:bg-success-container-hovered",
199
+ "group-hover/btn:group-data-[interactive=false]/btn:bg-success-container"
200
+ ]
201
+ },
202
+ {
203
+ intent: "success",
204
+ state: "active",
205
+ class: "text-on-success bg-success"
206
+ }
207
+ ],
208
+ defaultVariants: {
209
+ size: "lg",
210
+ state: "incomplete",
211
+ intent: "support"
212
+ }
213
+ }), S = () => /* @__PURE__ */ l(e, {
214
+ size: "sm",
215
+ children: /* @__PURE__ */ l(d, {})
216
+ }), C = ({ complete: e, incomplete: t, className: n }) => {
217
+ let { size: r, intent: i } = h(), { index: a, state: o } = g();
218
+ return /* @__PURE__ */ l("span", {
219
+ className: x({
220
+ size: r,
221
+ intent: i,
222
+ state: o,
223
+ className: n
224
+ }),
225
+ "aria-hidden": "true",
226
+ children: r !== "sm" && /* @__PURE__ */ u(c, { children: [o === "complete" && (e === void 0 ? /* @__PURE__ */ l(S, {}) : e), o !== "complete" && (t === void 0 ? `${a + 1}` : t)] })
227
+ });
273
228
  };
274
- h.displayName = "ProgressTracker.StepIndicator";
275
- const z = ({
276
- disabled: t = !1,
277
- children: a,
278
- "aria-label": r,
279
- className: n,
280
- ref: s,
281
- ...l
282
- }) => {
283
- const {
284
- stepIndex: o,
285
- steps: p,
286
- onStepClick: b,
287
- setSteps: d,
288
- size: g,
289
- intent: v,
290
- readOnly: c
291
- } = w(), f = `${B}-step-${A()}`, u = [...p.keys()].indexOf(f), V = (() => {
292
- const i = [...p.keys()][u + 1];
293
- return !!(i && p.get(i)?.includes("disabled"));
294
- })(), m = u === o ? "active" : u < o ? "complete" : "incomplete";
295
- return E(() => (d((i) => new Map(i).set(
296
- f,
297
- [m, t ? "disabled" : ""].filter((L) => !!L)
298
- )), () => {
299
- d((i) => (i.delete(f), i));
300
- }), []), /* @__PURE__ */ e(
301
- "li",
302
- {
303
- "data-spark-component": "progress-tracker-step",
304
- id: f,
305
- ref: s,
306
- "data-state": m,
307
- ...m === "active" && {
308
- "aria-current": "step"
309
- },
310
- className: D({
311
- size: g,
312
- intent: v,
313
- disabled: t,
314
- disabledAfter: V
315
- }),
316
- ...l,
317
- children: /* @__PURE__ */ e(
318
- "button",
319
- {
320
- type: "button",
321
- "aria-label": r,
322
- "data-interactive": !t && !c,
323
- ...!t && !c && {
324
- onClick: () => b?.(u)
325
- },
326
- disabled: t,
327
- className: X({
328
- size: g,
329
- readOnly: c,
330
- className: n
331
- }),
332
- children: /* @__PURE__ */ e(
333
- T.Provider,
334
- {
335
- value: {
336
- index: u,
337
- state: m
338
- },
339
- children: a || /* @__PURE__ */ e(h, {})
340
- }
341
- )
342
- }
343
- )
344
- }
345
- );
229
+ C.displayName = "ProgressTracker.StepIndicator";
230
+ //#endregion
231
+ //#region src/progress-tracker/ProgressTrackerStep.tsx
232
+ var w = ({ disabled: e = !1, children: t, "aria-label": n, className: r, ref: i, ...s }) => {
233
+ let { stepIndex: c, steps: u, onStepClick: d, setSteps: f, size: p, intent: g, readOnly: v } = h(), x = `${_}-step-${o()}`, S = [...u.keys()].indexOf(x), w = (() => {
234
+ let e = [...u.keys()][S + 1];
235
+ return !!(e && u.get(e)?.includes("disabled"));
236
+ })(), T = S === c ? "active" : S < c ? "complete" : "incomplete";
237
+ return a(() => (f((t) => new Map(t).set(x, [T, e ? "disabled" : ""].filter((e) => !!e))), () => {
238
+ f((e) => (e.delete(x), e));
239
+ }), []), /* @__PURE__ */ l("li", {
240
+ "data-spark-component": "progress-tracker-step",
241
+ id: x,
242
+ ref: i,
243
+ "data-state": T,
244
+ ...T === "active" && { "aria-current": "step" },
245
+ className: y({
246
+ size: p,
247
+ intent: g,
248
+ disabled: e,
249
+ disabledAfter: w
250
+ }),
251
+ ...s,
252
+ children: /* @__PURE__ */ l("button", {
253
+ type: "button",
254
+ "aria-label": n,
255
+ "data-interactive": !e && !v,
256
+ ...!e && !v && { onClick: () => d?.(S) },
257
+ disabled: e,
258
+ className: b({
259
+ size: p,
260
+ readOnly: v,
261
+ className: r
262
+ }),
263
+ children: /* @__PURE__ */ l(m.Provider, {
264
+ value: {
265
+ index: S,
266
+ state: T
267
+ },
268
+ children: t || /* @__PURE__ */ l(C, {})
269
+ })
270
+ })
271
+ });
346
272
  };
347
- z.displayName = "ProgressTracker.Step";
348
- const G = x(
349
- [
350
- "flex text-body-2 ",
351
- "text-on-surface group-disabled/btn:text-on-surface/dim-1",
352
- "group-data-[orientation=horizontal]/list:mt-md",
353
- "group-data-[orientation=vertical]/list:ml-md",
354
- "group-data-[orientation=vertical]/list:my-auto"
355
- ],
356
- {
357
- variants: {
358
- state: {
359
- complete: "",
360
- incomplete: "",
361
- active: "font-bold"
362
- }
363
- }
364
- }
365
- ), k = ({
366
- className: t,
367
- children: a
368
- }) => {
369
- const { state: r } = N();
370
- return /* @__PURE__ */ e("span", { className: G({ state: r, className: t }), children: a });
273
+ w.displayName = "ProgressTracker.Step";
274
+ //#endregion
275
+ //#region src/progress-tracker/ProgressTrackerStepLabel.tsx
276
+ var T = t([
277
+ "flex text-body-2 ",
278
+ "text-on-surface group-disabled/btn:text-on-surface/dim-1",
279
+ "group-data-[orientation=horizontal]/list:mt-md",
280
+ "group-data-[orientation=vertical]/list:ml-md",
281
+ "group-data-[orientation=vertical]/list:my-auto"
282
+ ], { variants: { state: {
283
+ complete: "",
284
+ incomplete: "",
285
+ active: "font-bold"
286
+ } } }), E = ({ className: e, children: t }) => {
287
+ let { state: n } = g();
288
+ return /* @__PURE__ */ l("span", {
289
+ className: T({
290
+ state: n,
291
+ className: e
292
+ }),
293
+ children: t
294
+ });
371
295
  };
372
- k.displayName = "ProgressTracker.StepLabel";
373
- const H = Object.assign(C, {
374
- Step: z,
375
- StepLabel: k,
376
- StepIndicator: h
296
+ E.displayName = "ProgressTracker.StepLabel";
297
+ //#endregion
298
+ //#region src/progress-tracker/index.ts
299
+ var D = Object.assign(v, {
300
+ Step: w,
301
+ StepLabel: E,
302
+ StepIndicator: C
377
303
  });
378
- H.displayName = "ProgressTracker";
379
- z.displayName = "ProgressTracker.Step";
380
- k.displayName = "ProgressTracker.StepLabel";
381
- h.displayName = "ProgressTracker.StepIndicator";
382
- export {
383
- H as ProgressTracker
384
- };
385
- //# sourceMappingURL=index.mjs.map
304
+ D.displayName = "ProgressTracker", w.displayName = "ProgressTracker.Step", E.displayName = "ProgressTracker.StepLabel", C.displayName = "ProgressTracker.StepIndicator";
305
+ //#endregion
306
+ export { D as ProgressTracker };
307
+
308
+ //# sourceMappingURL=index.mjs.map