@jfrader/ui 0.3.0 → 0.5.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 (264) hide show
  1. package/README.md +2 -0
  2. package/dist/{accordion-Bd-j04hW.js → accordion-xCI_u0BV.js} +2 -2
  3. package/dist/accordion.js +1 -1
  4. package/dist/{alert-BBqaKI4k.js → alert-DS_einpy.js} +1 -1
  5. package/dist/alert.js +1 -1
  6. package/dist/announcement-bar-B58xempt.js +382 -0
  7. package/dist/announcement-bar.js +2 -0
  8. package/dist/avatar-group-DOQQuV51.js +138 -0
  9. package/dist/avatar-group.js +2 -0
  10. package/dist/bottom-sheet-DPJBFkie.js +673 -0
  11. package/dist/bottom-sheet.js +2 -0
  12. package/dist/{breadcrumbs-DVAOxfvL.js → breadcrumbs-Cfw_hgt2.js} +1 -1
  13. package/dist/breadcrumbs.js +1 -1
  14. package/dist/{button-P2e7_44z.js → button-C92uYFJW.js} +1 -1
  15. package/dist/button.js +1 -1
  16. package/dist/calendar-B3Svu0X2.js +447 -0
  17. package/dist/calendar.js +1 -1
  18. package/dist/carousel-IvPqN-oM.js +472 -0
  19. package/dist/carousel.js +2 -0
  20. package/dist/{checkbox-COYG6L7d.js → checkbox-cFquiSdy.js} +1 -1
  21. package/dist/checkbox.js +1 -1
  22. package/dist/chip-group-DTQd_M-G.js +289 -0
  23. package/dist/chip-group.js +2 -0
  24. package/dist/code-block/shiki.js +147 -0
  25. package/dist/code-block-ahnRi-g8.js +292 -0
  26. package/dist/code-block.js +2 -0
  27. package/dist/collection-registry-k6JcD3Jr.js +44 -0
  28. package/dist/combobox-Bhzvu9ma.js +334 -0
  29. package/dist/combobox.js +1 -1
  30. package/dist/command-palette-BQ5LleGb.js +384 -0
  31. package/dist/command-palette.js +1 -1
  32. package/dist/copy-button-ByiA6D3R.js +252 -0
  33. package/dist/copy-button.js +2 -0
  34. package/dist/countdown-Dp_TD1VP.js +293 -0
  35. package/dist/countdown.js +2 -0
  36. package/dist/date-picker-5zKSSuFF.js +255 -0
  37. package/dist/date-picker.js +1 -1
  38. package/dist/date-range-picker-B5uFWsm-.js +562 -0
  39. package/dist/date-range-picker.js +2 -0
  40. package/dist/{dialog-xaydbXl2.js → dialog-ciiv9H2b.js} +19 -19
  41. package/dist/dialog.js +1 -1
  42. package/dist/drawer-DsASTiP-.js +553 -0
  43. package/dist/drawer.js +2 -0
  44. package/dist/empty-state-CDgrjPPf.js +142 -0
  45. package/dist/empty-state.js +2 -0
  46. package/dist/expandable-card-C-qJcZ14.js +340 -0
  47. package/dist/expandable-card.js +2 -0
  48. package/dist/field-anatomy-COVdNpf5.js +84 -0
  49. package/dist/file-dropzone-pR4v7owg.js +457 -0
  50. package/dist/file-dropzone.js +2 -0
  51. package/dist/filter-toolbar-D5KEKTSe.js +312 -0
  52. package/dist/filter-toolbar.js +2 -0
  53. package/dist/hold-to-confirm-DjB2EVjM.js +294 -0
  54. package/dist/hold-to-confirm.js +2 -0
  55. package/dist/hover-card-B-nrCIy2.js +347 -0
  56. package/dist/hover-card.js +2 -0
  57. package/dist/image-compare-ciuhPtQZ.js +415 -0
  58. package/dist/image-compare.js +2 -0
  59. package/dist/index.js +79 -38
  60. package/dist/inline-edit-C0eeml65.js +535 -0
  61. package/dist/inline-edit.js +2 -0
  62. package/dist/input-control-DmMuAuPS.js +34 -0
  63. package/dist/json-viewer-BcySQfjZ.js +798 -0
  64. package/dist/json-viewer.js +2 -0
  65. package/dist/listbox-style-WX-RASp1.js +59 -0
  66. package/dist/{media-D_eA_I-e.js → media-8yrN85VT.js} +2 -2
  67. package/dist/mention-input-BcQKX2EJ.js +599 -0
  68. package/dist/mention-input.js +2 -0
  69. package/dist/menu-xwOOUtWP.js +275 -0
  70. package/dist/menu.js +1 -1
  71. package/dist/metric-card-Bh9K4fZs.js +118 -0
  72. package/dist/metric-card.js +2 -0
  73. package/dist/multi-select-Pce_IYnz.js +590 -0
  74. package/dist/multi-select.js +2 -0
  75. package/dist/{navigation-DhnKriOp.js → navigation-sP5fiuQS.js} +4 -4
  76. package/dist/navigation.js +1 -1
  77. package/dist/overlay-layer-SeUyyEPD.js +64 -0
  78. package/dist/overlay-portal-C4JZFq2M.js +15 -0
  79. package/dist/{pagination-DYdwsxwe.js → pagination-DmXZ8E85.js} +1 -1
  80. package/dist/pagination.js +1 -1
  81. package/dist/password-field-03pWRkuY.js +250 -0
  82. package/dist/password-field.js +2 -0
  83. package/dist/popover-QHcEvf9c.js +119 -0
  84. package/dist/popover.js +1 -1
  85. package/dist/{progress-BpJswTG4.js → progress-CbOWBUdA.js} +4 -4
  86. package/dist/progress.js +1 -1
  87. package/dist/radio-cards-D2QZENI_.js +455 -0
  88. package/dist/radio-cards.js +2 -0
  89. package/dist/{radio-group-Ce0_IWQr.js → radio-group-E6mMRgo7.js} +4 -4
  90. package/dist/radio-group.js +1 -1
  91. package/dist/resizable-panels-BhjUVXZZ.js +519 -0
  92. package/dist/resizable-panels.js +2 -0
  93. package/dist/scroll-area-CcZyiSOQ.js +371 -0
  94. package/dist/scroll-area.js +2 -0
  95. package/dist/search-field-IxF0IJXm.js +274 -0
  96. package/dist/search-field.js +2 -0
  97. package/dist/segmented-control-yO1K1nbi.js +326 -0
  98. package/dist/segmented-control.js +2 -0
  99. package/dist/select-n_H52W1Z.js +292 -0
  100. package/dist/select.js +1 -1
  101. package/dist/signature-pad-q2SAsrdD.js +640 -0
  102. package/dist/signature-pad.js +2 -0
  103. package/dist/{skeleton-OoFlOEXO.js → skeleton-XQQDkCHd.js} +1 -1
  104. package/dist/skeleton.js +1 -1
  105. package/dist/slider-t0B5cecO.js +477 -0
  106. package/dist/slider.js +2 -0
  107. package/dist/sortable-data-table-tirqlLY2.js +365 -0
  108. package/dist/sortable-data-table.js +2 -0
  109. package/dist/{spinner-C2YDoiMn.js → spinner-DtxvDPdM.js} +1 -1
  110. package/dist/spinner.js +1 -1
  111. package/dist/split-button-Cb3EHs64.js +268 -0
  112. package/dist/split-button.js +2 -0
  113. package/dist/stepper-CruHbXxX.js +480 -0
  114. package/dist/stepper.js +2 -0
  115. package/dist/swipe-actions-DiZC57-3.js +418 -0
  116. package/dist/swipe-actions.js +2 -0
  117. package/dist/{switch-Dr-qjmT4.js → switch-qwv8jQnR.js} +1 -1
  118. package/dist/switch.js +1 -1
  119. package/dist/{tabs-CK_g1RKa.js → tabs-CAVJndX1.js} +2 -2
  120. package/dist/tabs.js +1 -1
  121. package/dist/tag-input-DSRCyrX2.js +418 -0
  122. package/dist/tag-input.js +2 -0
  123. package/dist/{text-field-D60ok14S.js → text-field-C8TWG-tY.js} +6 -5
  124. package/dist/text-field.js +1 -1
  125. package/dist/{textarea-DyfjtP0A.js → textarea-BrW0XcG_.js} +6 -5
  126. package/dist/textarea.js +1 -1
  127. package/dist/theme-root-BbTBuLMQ.js +46 -0
  128. package/dist/theme-root.js +1 -1
  129. package/dist/theme-scope-t7nAKc2c.js +27 -0
  130. package/dist/time-picker-Db8D49cP.js +305 -0
  131. package/dist/time-picker.js +2 -0
  132. package/dist/timeline-k3nURuCP.js +618 -0
  133. package/dist/timeline.js +2 -0
  134. package/dist/toast-BHxI32ZA.js +352 -0
  135. package/dist/toast-stack-DqrAzdg5.js +183 -0
  136. package/dist/toast-stack.js +2 -0
  137. package/dist/toast.js +1 -1
  138. package/dist/{toggle-group-CI0e7hFm.js → toggle-group-fcjzpifI.js} +4 -4
  139. package/dist/toggle-group.js +1 -1
  140. package/dist/tooltip-CkeiW9C1.js +113 -0
  141. package/dist/tooltip.js +1 -1
  142. package/dist/tree-view-C2liIxqy.js +360 -0
  143. package/dist/tree-view.js +2 -0
  144. package/dist/types/components/announcement-bar/announcement-bar.d.ts +75 -0
  145. package/dist/types/components/announcement-bar/index.d.ts +2 -0
  146. package/dist/types/components/avatar-group/avatar-group.d.ts +43 -0
  147. package/dist/types/components/avatar-group/index.d.ts +2 -0
  148. package/dist/types/components/bottom-sheet/bottom-sheet.d.ts +60 -0
  149. package/dist/types/components/bottom-sheet/index.d.ts +2 -0
  150. package/dist/types/components/calendar/calendar.d.ts +25 -1
  151. package/dist/types/components/calendar/index.d.ts +1 -1
  152. package/dist/types/components/carousel/carousel.d.ts +73 -0
  153. package/dist/types/components/carousel/index.d.ts +2 -0
  154. package/dist/types/components/chip-group/chip-group.d.ts +54 -0
  155. package/dist/types/components/chip-group/index.d.ts +1 -0
  156. package/dist/types/components/code-block/code-block.d.ts +58 -0
  157. package/dist/types/components/code-block/index.d.ts +1 -0
  158. package/dist/types/components/code-block/shiki.d.ts +3 -0
  159. package/dist/types/components/combobox/combobox.d.ts +1 -1
  160. package/dist/types/components/command-palette/command-palette.d.ts +1 -1
  161. package/dist/types/components/copy-button/copy-button.d.ts +49 -0
  162. package/dist/types/components/copy-button/index.d.ts +2 -0
  163. package/dist/types/components/countdown/countdown.d.ts +37 -0
  164. package/dist/types/components/countdown/index.d.ts +1 -0
  165. package/dist/types/components/date-picker/date-picker.d.ts +1 -1
  166. package/dist/types/components/date-range-picker/date-range-picker.d.ts +103 -0
  167. package/dist/types/components/date-range-picker/index.d.ts +2 -0
  168. package/dist/types/components/drawer/drawer.d.ts +59 -0
  169. package/dist/types/components/drawer/index.d.ts +2 -0
  170. package/dist/types/components/empty-state/empty-state.d.ts +36 -0
  171. package/dist/types/components/empty-state/index.d.ts +2 -0
  172. package/dist/types/components/expandable-card/expandable-card.d.ts +28 -0
  173. package/dist/types/components/expandable-card/index.d.ts +2 -0
  174. package/dist/types/components/field/field-anatomy.d.ts +4 -2
  175. package/dist/types/components/file-dropzone/file-dropzone.d.ts +93 -0
  176. package/dist/types/components/file-dropzone/index.d.ts +2 -0
  177. package/dist/types/components/filter-toolbar/filter-toolbar.d.ts +70 -0
  178. package/dist/types/components/filter-toolbar/index.d.ts +1 -0
  179. package/dist/types/components/hold-to-confirm/hold-to-confirm.d.ts +32 -0
  180. package/dist/types/components/hold-to-confirm/index.d.ts +2 -0
  181. package/dist/types/components/hover-card/hover-card.d.ts +97 -0
  182. package/dist/types/components/hover-card/index.d.ts +2 -0
  183. package/dist/types/components/image-compare/image-compare.d.ts +54 -0
  184. package/dist/types/components/image-compare/index.d.ts +1 -0
  185. package/dist/types/components/inline-edit/index.d.ts +2 -0
  186. package/dist/types/components/inline-edit/inline-edit.d.ts +93 -0
  187. package/dist/types/components/json-viewer/index.d.ts +2 -0
  188. package/dist/types/components/json-viewer/json-viewer.d.ts +82 -0
  189. package/dist/types/components/mention-input/index.d.ts +2 -0
  190. package/dist/types/components/mention-input/mention-input.d.ts +87 -0
  191. package/dist/types/components/menu/menu.d.ts +23 -5
  192. package/dist/types/components/metric-card/index.d.ts +1 -0
  193. package/dist/types/components/metric-card/metric-card.d.ts +37 -0
  194. package/dist/types/components/multi-select/index.d.ts +2 -0
  195. package/dist/types/components/multi-select/multi-select.d.ts +73 -0
  196. package/dist/types/components/password-field/index.d.ts +2 -0
  197. package/dist/types/components/password-field/password-field.d.ts +34 -0
  198. package/dist/types/components/popover/popover.d.ts +1 -1
  199. package/dist/types/components/radio-cards/index.d.ts +1 -0
  200. package/dist/types/components/radio-cards/radio-cards.d.ts +42 -0
  201. package/dist/types/components/resizable-panels/index.d.ts +2 -0
  202. package/dist/types/components/resizable-panels/resizable-panels.d.ts +42 -0
  203. package/dist/types/components/scroll-area/index.d.ts +2 -0
  204. package/dist/types/components/scroll-area/scroll-area.d.ts +34 -0
  205. package/dist/types/components/search-field/index.d.ts +1 -0
  206. package/dist/types/components/search-field/search-field.d.ts +31 -0
  207. package/dist/types/components/segmented-control/index.d.ts +2 -0
  208. package/dist/types/components/segmented-control/segmented-control.d.ts +32 -0
  209. package/dist/types/components/select/select.d.ts +1 -1
  210. package/dist/types/components/signature-pad/index.d.ts +2 -0
  211. package/dist/types/components/signature-pad/signature-pad.d.ts +104 -0
  212. package/dist/types/components/slider/index.d.ts +1 -0
  213. package/dist/types/components/slider/slider.d.ts +70 -0
  214. package/dist/types/components/sortable-data-table/index.d.ts +1 -0
  215. package/dist/types/components/sortable-data-table/sortable-data-table.d.ts +76 -0
  216. package/dist/types/components/split-button/index.d.ts +2 -0
  217. package/dist/types/components/split-button/split-button.d.ts +55 -0
  218. package/dist/types/components/stepper/index.d.ts +2 -0
  219. package/dist/types/components/stepper/stepper.d.ts +85 -0
  220. package/dist/types/components/swipe-actions/index.d.ts +2 -0
  221. package/dist/types/components/swipe-actions/swipe-actions.d.ts +44 -0
  222. package/dist/types/components/tag-input/index.d.ts +2 -0
  223. package/dist/types/components/tag-input/tag-input.d.ts +66 -0
  224. package/dist/types/components/theme-root/theme-root.d.ts +9 -3
  225. package/dist/types/components/time-picker/index.d.ts +2 -0
  226. package/dist/types/components/time-picker/time-picker.d.ts +48 -0
  227. package/dist/types/components/timeline/index.d.ts +2 -0
  228. package/dist/types/components/timeline/timeline.d.ts +66 -0
  229. package/dist/types/components/toast/toast.d.ts +37 -2
  230. package/dist/types/components/toast-stack/index.d.ts +2 -0
  231. package/dist/types/components/toast-stack/toast-stack.d.ts +28 -0
  232. package/dist/types/components/tooltip/tooltip.d.ts +1 -1
  233. package/dist/types/components/tree-view/index.d.ts +1 -0
  234. package/dist/types/components/tree-view/tree-view.d.ts +47 -0
  235. package/dist/types/components/usage-meter/index.d.ts +2 -0
  236. package/dist/types/components/usage-meter/usage-meter.d.ts +83 -0
  237. package/dist/types/index.d.ts +40 -0
  238. package/dist/types/overlay/overlay-layer.d.ts +33 -0
  239. package/dist/types/overlay/overlay-portal.d.ts +7 -0
  240. package/dist/types/overlay/use-overlay-floating.d.ts +11 -1
  241. package/dist/types/styling/media.d.ts +1 -0
  242. package/dist/types/styling/theme-scope.d.ts +19 -0
  243. package/dist/types/styling/theme.d.ts +12 -0
  244. package/dist/types/utils/use-controlled-state.d.ts +2 -1
  245. package/dist/usage-meter-qyQ3rYVv.js +463 -0
  246. package/dist/usage-meter.js +2 -0
  247. package/dist/use-controlled-state-DpeVQZNR.js +20 -0
  248. package/dist/use-latest-callback-cj1OOQL6.js +11 -0
  249. package/dist/use-overlay-floating-DvJifLpF.js +31 -0
  250. package/package.json +175 -3
  251. package/dist/calendar-C9Yad_-w.js +0 -394
  252. package/dist/collection-registry-BTYi6zGh.js +0 -98
  253. package/dist/combobox-DrmjBbo7.js +0 -327
  254. package/dist/command-palette-V_2pEay7.js +0 -379
  255. package/dist/date-picker-ClUYBIBh.js +0 -250
  256. package/dist/field-anatomy-D2ToMeRa.js +0 -109
  257. package/dist/menu-DU60SMdt.js +0 -216
  258. package/dist/popover-BtN_0ejj.js +0 -113
  259. package/dist/select-BCS0-LVW.js +0 -286
  260. package/dist/theme-root-BiXXvQvr.js +0 -42
  261. package/dist/toast-iqelR-r0.js +0 -282
  262. package/dist/tooltip-CB-HC1js.js +0 -108
  263. package/dist/use-controlled-state-CVXDa-qM.js +0 -21
  264. package/dist/use-overlay-floating-efeqppiw.js +0 -19
@@ -0,0 +1,480 @@
1
+ 'use client';
2
+ import { r as e, t } from "./sx-Dx9JUKp5.js";
3
+ import { n } from "./focus-ring-BK5W5_NY.js";
4
+ import { n as r, r as i } from "./media-8yrN85VT.js";
5
+ import { t as a } from "./use-controlled-state-DpeVQZNR.js";
6
+ import { t as o } from "./visually-hidden-BJdvqqvn.js";
7
+ import { t as s } from "./renderable-DzcIj1Lo.js";
8
+ import { t as c } from "./part-id-D0zksy32.js";
9
+ import { useId as l, useLayoutEffect as u, useRef as d, useState as f } from "react";
10
+ import { vars as p } from "@jfrader/tokens/vars";
11
+ import { Fragment as m, jsx as h, jsxs as g } from "@emotion/react/jsx-runtime";
12
+ //#region src/components/stepper/stepper.tsx
13
+ var _ = "Progress", v = "All steps complete", y = {
14
+ complete: "completed",
15
+ current: "current step",
16
+ upcoming: "upcoming",
17
+ error: "error"
18
+ }, ee = (e) => (t, n, r, i) => `${t.label}, step ${e.format(n + 1)} of ${e.format(r)}, ${y[i]}`, b = (e) => (t, n, r) => t ? `Step ${e.format(n + 1)} of ${e.format(r)}: ${t.label}` : v, x = "2px", S = "--stepper-marker-size", C = "--stepper-marker-font", w = "--stepper-detail-font", T = `var(${S})`, E = "@container stepper (max-width: 30rem)", D = (e) => ({
19
+ "[data-compact] &": e,
20
+ [E]: { "[data-auto-compact] &": e }
21
+ });
22
+ function O(e, t) {
23
+ if (e !== void 0) return Number.isFinite(e) ? Math.min(Math.max(Math.floor(e), 0), t) : 0;
24
+ }
25
+ function te(e, t, n) {
26
+ return s(e.error) ? "error" : t < n ? "complete" : t === n ? "current" : "upcoming";
27
+ }
28
+ var ne = (...e) => e.filter(Boolean).join(" ") || void 0;
29
+ function re() {
30
+ return /* @__PURE__ */ h("svg", {
31
+ viewBox: "0 0 16 16",
32
+ width: "1em",
33
+ height: "1em",
34
+ fill: "none",
35
+ stroke: "currentColor",
36
+ strokeWidth: "2",
37
+ strokeLinecap: "round",
38
+ strokeLinejoin: "round",
39
+ children: /* @__PURE__ */ h("path", { d: "M3.5 8.5l3 3 6-6.5" })
40
+ });
41
+ }
42
+ function ie() {
43
+ return /* @__PURE__ */ g("svg", {
44
+ viewBox: "0 0 16 16",
45
+ width: "1em",
46
+ height: "1em",
47
+ fill: "none",
48
+ stroke: "currentColor",
49
+ strokeWidth: "2",
50
+ strokeLinecap: "round",
51
+ children: [/* @__PURE__ */ h("path", { d: "M8 3.5v5.5" }), /* @__PURE__ */ h("circle", {
52
+ cx: "8",
53
+ cy: "12.5",
54
+ r: "1",
55
+ fill: "currentColor",
56
+ stroke: "none"
57
+ })]
58
+ });
59
+ }
60
+ var ae = e({
61
+ label: "stepper",
62
+ boxSizing: "border-box",
63
+ inlineSize: "100%",
64
+ minInlineSize: 0,
65
+ containerType: "inline-size",
66
+ containerName: "stepper",
67
+ fontFamily: p.font.sans,
68
+ lineHeight: p.lineHeight.base,
69
+ color: p.color.text
70
+ }), oe = {
71
+ sm: e({
72
+ [S]: p.space[6],
73
+ [C]: p.textSize.xs,
74
+ [w]: p.textSize.xs,
75
+ fontSize: p.textSize.sm
76
+ }),
77
+ md: e({
78
+ [S]: p.space[8],
79
+ [C]: p.textSize.sm,
80
+ [w]: p.textSize.sm,
81
+ fontSize: p.textSize.md
82
+ })
83
+ }, se = {
84
+ horizontal: e({
85
+ display: "flex",
86
+ margin: 0,
87
+ padding: 0,
88
+ listStyle: "none"
89
+ }),
90
+ vertical: e({
91
+ display: "flex",
92
+ flexDirection: "column",
93
+ margin: 0,
94
+ padding: 0,
95
+ listStyle: "none"
96
+ })
97
+ }, ce = {
98
+ horizontal: e({
99
+ display: "grid",
100
+ gridTemplateColumns: `minmax(0, max-content) minmax(${p.space[4]}, 1fr)`,
101
+ alignItems: "start",
102
+ flex: "1 1 0",
103
+ minInlineSize: 0,
104
+ "&:last-of-type": {
105
+ gridTemplateColumns: "minmax(0, max-content)",
106
+ flex: "0 1 auto"
107
+ }
108
+ }),
109
+ vertical: e({
110
+ display: "grid",
111
+ gridTemplateColumns: `calc(${T} + 2 * ${p.space[1]}) minmax(0, 1fr)`,
112
+ minInlineSize: 0
113
+ })
114
+ }, k = e({
115
+ boxSizing: "border-box",
116
+ gridRow: 1,
117
+ justifySelf: "start",
118
+ display: "inline-flex",
119
+ alignItems: "flex-start",
120
+ gap: p.space[3],
121
+ maxInlineSize: "100%",
122
+ minInlineSize: p.space[8],
123
+ minBlockSize: p.space[8],
124
+ margin: 0,
125
+ padding: p.space[1],
126
+ border: 0,
127
+ borderRadius: p.radius.sm,
128
+ backgroundColor: "transparent",
129
+ color: "inherit",
130
+ font: "inherit",
131
+ textAlign: "start",
132
+ transitionProperty: "background-color, transform",
133
+ transitionDuration: p.motion.duration.base,
134
+ transitionTimingFunction: p.motion.easeStandard,
135
+ [i]: { transitionDuration: "0s" }
136
+ }), A = {
137
+ horizontal: e({ gridColumn: 1 }),
138
+ vertical: e({ gridColumn: "1 / -1" })
139
+ }, le = e({
140
+ cursor: "pointer",
141
+ "&[aria-disabled=\"true\"]": { cursor: "default" },
142
+ "&:not([aria-disabled=\"true\"]):hover": { backgroundColor: p.color.surfaceHover },
143
+ "&:not([aria-disabled=\"true\"]):active": { transform: "scale(0.98)" },
144
+ "&:focus-visible": n,
145
+ [i]: { "&:not([aria-disabled=\"true\"]):active": { transform: "none" } }
146
+ }), j = e({
147
+ boxSizing: "border-box",
148
+ display: "inline-flex",
149
+ alignItems: "center",
150
+ justifyContent: "center",
151
+ flexShrink: 0,
152
+ minInlineSize: T,
153
+ blockSize: T,
154
+ paddingInline: p.space[1],
155
+ border: `${x} solid ${p.color.borderControl}`,
156
+ borderRadius: p.radius.full,
157
+ backgroundColor: "transparent",
158
+ color: p.color.textMuted,
159
+ fontSize: `var(${C})`,
160
+ fontWeight: p.fontWeight.medium,
161
+ fontVariantNumeric: "tabular-nums",
162
+ lineHeight: 1,
163
+ whiteSpace: "nowrap",
164
+ transitionProperty: "background-color, border-color, color",
165
+ transitionDuration: p.motion.duration.base,
166
+ transitionTimingFunction: p.motion.easeStandard,
167
+ "& svg": {
168
+ inlineSize: "1em",
169
+ blockSize: "1em"
170
+ },
171
+ "&[data-numeral]::before": { content: "attr(data-numeral)" },
172
+ "&[data-state=\"complete\"]": {
173
+ borderColor: p.color.accent,
174
+ backgroundColor: p.color.accent,
175
+ color: p.color.accentContrast
176
+ },
177
+ "&[data-state=\"current\"]": {
178
+ borderColor: p.color.accent,
179
+ backgroundColor: p.color.accentSoft,
180
+ color: p.color.text,
181
+ fontWeight: p.fontWeight.semibold,
182
+ outline: `${x} solid ${p.color.accent}`,
183
+ outlineOffset: x
184
+ },
185
+ "&[data-state=\"error\"]": {
186
+ borderColor: p.color.dangerText,
187
+ backgroundColor: p.color.dangerSoft,
188
+ color: p.color.dangerText
189
+ },
190
+ [i]: { transitionDuration: "0s" },
191
+ [r]: {
192
+ borderColor: "CanvasText",
193
+ "&[data-state=\"current\"], &[data-state=\"error\"]": {
194
+ borderColor: "Highlight",
195
+ outlineColor: "Highlight"
196
+ },
197
+ "&[data-state=\"complete\"]": {
198
+ forcedColorAdjust: "none",
199
+ borderColor: "Highlight",
200
+ backgroundColor: "Highlight",
201
+ color: "HighlightText"
202
+ }
203
+ }
204
+ }), ue = e({
205
+ display: "flex",
206
+ alignItems: "center",
207
+ minBlockSize: T,
208
+ minInlineSize: 0,
209
+ fontWeight: p.fontWeight.medium,
210
+ overflowWrap: "anywhere",
211
+ "&[data-state=\"current\"]": { fontWeight: p.fontWeight.semibold },
212
+ "&[data-state=\"upcoming\"]": { color: p.color.textMuted },
213
+ "&[data-state=\"error\"]": { color: p.color.dangerText },
214
+ ...D({ "&:not([data-state=\"error\"])": { display: "none" } })
215
+ }), de = e({
216
+ gridRow: 2,
217
+ minInlineSize: 0,
218
+ paddingInlineEnd: p.space[2],
219
+ fontSize: `var(${w})`,
220
+ color: p.color.textMuted,
221
+ overflowWrap: "anywhere",
222
+ "&[data-state=\"error\"]": { color: p.color.dangerText },
223
+ ...D({ "&:not([data-state=\"error\"])": o })
224
+ }), fe = {
225
+ horizontal: e({
226
+ gridColumn: "1 / -1",
227
+ paddingInlineStart: `calc(${p.space[1]} + ${T} + ${p.space[3]})`
228
+ }),
229
+ vertical: e({
230
+ gridColumn: 2,
231
+ paddingInlineStart: p.space[2],
232
+ paddingBlockEnd: p.space[2]
233
+ })
234
+ }, pe = e({
235
+ position: "relative",
236
+ overflow: "hidden",
237
+ backgroundColor: p.color.border,
238
+ "&::after": {
239
+ content: "\"\"",
240
+ position: "absolute",
241
+ inset: 0,
242
+ backgroundColor: p.color.accent,
243
+ transitionProperty: "transform",
244
+ transitionDuration: p.motion.duration.base,
245
+ transitionTimingFunction: p.motion.easeStandard
246
+ },
247
+ "&[data-state=\"complete\"]::after": { transform: "none" },
248
+ [i]: { "&::after": { transitionDuration: "0s" } },
249
+ [r]: {
250
+ forcedColorAdjust: "none",
251
+ backgroundColor: "CanvasText",
252
+ "&::after": { backgroundColor: "Highlight" }
253
+ }
254
+ }), me = {
255
+ horizontal: e({
256
+ gridColumn: 2,
257
+ gridRow: 1,
258
+ blockSize: x,
259
+ marginInline: p.space[2],
260
+ marginBlockStart: `calc(${p.space[1]} + ${T} / 2 - ${x} / 2)`,
261
+ "&:not([data-state=\"complete\"])::after": { transform: "scaleX(0)" },
262
+ "&::after": { transformOrigin: "left" },
263
+ "&:dir(rtl)::after": { transformOrigin: "right" }
264
+ }),
265
+ vertical: e({
266
+ gridColumn: 1,
267
+ gridRow: 2,
268
+ justifySelf: "center",
269
+ inlineSize: x,
270
+ minBlockSize: p.space[6],
271
+ marginBlock: p.space[1],
272
+ "&:not([data-state=\"complete\"])::after": { transform: "scaleY(0)" },
273
+ "&::after": { transformOrigin: "top" }
274
+ })
275
+ }, M = e({
276
+ marginBlockStart: p.space[3],
277
+ fontSize: p.textSize.sm,
278
+ color: p.color.textMuted,
279
+ overflowWrap: "anywhere",
280
+ "&[data-complete]": {
281
+ color: p.color.text,
282
+ fontWeight: p.fontWeight.medium
283
+ },
284
+ "&:not([data-complete])": { display: "none" },
285
+ ...D({ "&:not([data-complete])": { display: "block" } })
286
+ }), he = e({
287
+ display: "block",
288
+ color: p.color.text,
289
+ fontWeight: p.fontWeight.medium
290
+ });
291
+ function N(e) {
292
+ let { ref: n, steps: r, value: i, defaultValue: p = 0, onValueChange: y, interactive: x = !1, orientation: S = "horizontal", details: C = "all", compact: w = !1, responsive: T = !0, size: E = "md", label: D = _, completeLabel: N = v, locale: P, getStepLabel: F, getChangeLabel: I, announceChanges: L = !1, slotProps: R, className: ge, sx: _e, "aria-label": ve, "aria-labelledby": z, ...ye } = e, B = r.length, be = l(), [xe, Se] = a(O(i, B), O(p, B), y), V = O(xe, B) ?? 0, H = r[V] ?? null, Ce = B > 0 && H === null, U = new Intl.NumberFormat(P), W = F ?? ee(U), we = I ?? b(U), [Te, Ee] = f(V), [De, Oe] = f("");
293
+ Te !== V && (Ee(V), L && Oe(we(H, V, B)));
294
+ let ke = (e) => e === V || e < V && r[e]?.disabled !== !0, G = x ? r.flatMap((e, t) => ke(t) ? [t] : []) : [], [Ae, je] = f(null), K = r.findIndex((e) => e.id === Ae), q = G.includes(K) ? K : G.includes(V) ? V : G[0], J = d(/* @__PURE__ */ new Map()), Y = d(!1);
295
+ u(() => {
296
+ if (!Y.current) return;
297
+ Y.current = !1;
298
+ let e = q === void 0 ? void 0 : J.current.get(r[q]?.id ?? ""), t = e?.ownerDocument.activeElement;
299
+ e && (!t || t === e.ownerDocument.body) && e.focus();
300
+ });
301
+ let Me = (e, t) => {
302
+ let n = getComputedStyle(e.currentTarget).direction === "rtl", [i, a] = S === "vertical" ? ["ArrowUp", "ArrowDown"] : n ? ["ArrowRight", "ArrowLeft"] : ["ArrowLeft", "ArrowRight"], o = G.indexOf(G.includes(t) ? t : q ?? -1), s = {
303
+ [i]: G[Math.max(o - 1, 0)],
304
+ [a]: G[Math.min(o + 1, G.length - 1)],
305
+ Home: G[0],
306
+ End: G.at(-1)
307
+ };
308
+ if (!(e.key in s)) return;
309
+ e.preventDefault();
310
+ let c = s[e.key], l = c === void 0 ? void 0 : r[c];
311
+ l && J.current.get(l.id)?.focus();
312
+ }, Ne = (e) => {
313
+ e < V && r[e]?.disabled !== !0 && Se(e);
314
+ }, { className: X, css: Z, onClick: Pe, onKeyDown: Fe, onFocus: Ie, "aria-describedby": Le, ...Re } = R?.head ?? {}, ze = /* @__PURE__ */ h("ol", {
315
+ role: "list",
316
+ "data-ui": "stepper-list",
317
+ className: R?.list?.className,
318
+ css: [se[S], R?.list?.css],
319
+ children: r.map((e, t) => {
320
+ let n = te(e, t, V), r = t === V, i = W(e, t, B, n), a = n === "error", l = a || s(e.description) && (C === "all" || r), u = c(be, "detail", e.id), d = s(e.icon), f = n === "complete" ? /* @__PURE__ */ h(re, {}) : a ? /* @__PURE__ */ h(ie, {}) : null, p = d || f ? void 0 : U.format(t + 1), _ = /* @__PURE__ */ g(m, { children: [
321
+ /* @__PURE__ */ h("span", {
322
+ "aria-hidden": "true",
323
+ "data-ui": "stepper-marker",
324
+ "data-state": n,
325
+ "data-numeral": p,
326
+ className: R?.marker?.className,
327
+ css: [j, R?.marker?.css],
328
+ children: d ? e.icon : f
329
+ }),
330
+ /* @__PURE__ */ h("span", {
331
+ "aria-hidden": !x || void 0,
332
+ "data-ui": "stepper-label",
333
+ "data-state": n,
334
+ className: R?.label?.className,
335
+ css: [ue, R?.label?.css],
336
+ children: e.label
337
+ }),
338
+ !x && /* @__PURE__ */ h("span", {
339
+ css: o,
340
+ children: i
341
+ })
342
+ ] });
343
+ return /* @__PURE__ */ g("li", {
344
+ role: "listitem",
345
+ "data-ui": "stepper-item",
346
+ "data-state": n,
347
+ "aria-current": r ? "step" : void 0,
348
+ "aria-label": i,
349
+ className: R?.item?.className,
350
+ css: [ce[S], R?.item?.css],
351
+ children: [
352
+ x ? /* @__PURE__ */ h("button", {
353
+ ...Re,
354
+ ref: (t) => {
355
+ if (t) return J.current.set(e.id, t), () => {
356
+ J.current.delete(e.id), t.ownerDocument.activeElement === t && (Y.current = !0);
357
+ };
358
+ },
359
+ type: "button",
360
+ "data-ui": "stepper-head",
361
+ "data-state": n,
362
+ tabIndex: t === q ? 0 : -1,
363
+ "aria-current": r ? "step" : void 0,
364
+ "aria-disabled": t < V && !e.disabled ? void 0 : !0,
365
+ "aria-label": i,
366
+ "aria-describedby": ne(Le, l && u),
367
+ className: X,
368
+ css: [
369
+ k,
370
+ A[S],
371
+ le,
372
+ Z
373
+ ],
374
+ onFocus: (t) => {
375
+ Ie?.(t), je(e.id);
376
+ },
377
+ onKeyDown: (e) => {
378
+ Fe?.(e), e.defaultPrevented || Me(e, t);
379
+ },
380
+ onClick: (e) => {
381
+ Pe?.(e), e.defaultPrevented || Ne(t);
382
+ },
383
+ children: _
384
+ }) : /* @__PURE__ */ h("span", {
385
+ "data-ui": "stepper-head",
386
+ "data-state": n,
387
+ className: X,
388
+ css: [
389
+ k,
390
+ A[S],
391
+ Z
392
+ ],
393
+ children: _
394
+ }),
395
+ l && /* @__PURE__ */ h("span", {
396
+ id: u,
397
+ "data-ui": "stepper-description",
398
+ "data-state": n,
399
+ className: R?.description?.className,
400
+ css: [
401
+ de,
402
+ fe[S],
403
+ R?.description?.css
404
+ ],
405
+ children: a ? e.error : e.description
406
+ }),
407
+ t < B - 1 && /* @__PURE__ */ h("span", {
408
+ "aria-hidden": "true",
409
+ "data-ui": "stepper-connector",
410
+ "data-state": t < V ? "complete" : "upcoming",
411
+ className: R?.connector?.className,
412
+ css: [
413
+ pe,
414
+ me[S],
415
+ R?.connector?.css
416
+ ]
417
+ })
418
+ ]
419
+ }, e.id);
420
+ })
421
+ }), Be = Ce ? s(N) && /* @__PURE__ */ h("div", {
422
+ "data-ui": "stepper-caption",
423
+ "data-complete": "",
424
+ className: R?.caption?.className,
425
+ css: [M, R?.caption?.css],
426
+ children: N
427
+ }) : H && /* @__PURE__ */ g("div", {
428
+ "aria-hidden": "true",
429
+ "data-ui": "stepper-caption",
430
+ className: R?.caption?.className,
431
+ css: [M, R?.caption?.css],
432
+ children: [/* @__PURE__ */ h("span", {
433
+ css: he,
434
+ children: H.label
435
+ }), !s(H.error) && s(H.description) && H.description]
436
+ }), Q = {
437
+ ...ye,
438
+ "data-ui": "stepper",
439
+ "data-orientation": S,
440
+ "data-size": E,
441
+ "data-compact": w ? "" : void 0,
442
+ "data-auto-compact": T && S === "horizontal" ? "" : void 0,
443
+ "aria-label": ve ?? (z === void 0 ? D : void 0),
444
+ "aria-labelledby": z
445
+ }, $ = /* @__PURE__ */ g(m, { children: [
446
+ ze,
447
+ Be,
448
+ L && /* @__PURE__ */ h("span", {
449
+ "aria-live": "polite",
450
+ "aria-atomic": "true",
451
+ "data-ui": "stepper-live",
452
+ css: o,
453
+ children: De
454
+ })
455
+ ] });
456
+ return /* @__PURE__ */ h(t, {
457
+ className: [R?.root?.className, ge].filter(Boolean).join(" ") || void 0,
458
+ styles: [
459
+ ae,
460
+ oe[E],
461
+ R?.root?.css
462
+ ],
463
+ sx: _e,
464
+ children: (e) => x ? /* @__PURE__ */ h("nav", {
465
+ ...Q,
466
+ ref: n,
467
+ className: e,
468
+ children: $
469
+ }) : /* @__PURE__ */ h("div", {
470
+ ...Q,
471
+ ref: n,
472
+ role: "group",
473
+ className: e,
474
+ children: $
475
+ })
476
+ });
477
+ }
478
+ N.displayName = "Stepper";
479
+ //#endregion
480
+ export { N as t };
@@ -0,0 +1,2 @@
1
+ 'use client';
2
+ export { t as Stepper } from "./stepper-CruHbXxX.js";