@servicetitan/anvil2 1.2.7 → 1.3.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 (256) hide show
  1. package/{Alert-2e4d9ed5.js → Alert-49d915aa.js} +3 -3
  2. package/{Alert-2e4d9ed5.js.map → Alert-49d915aa.js.map} +1 -1
  3. package/{Alert-94c37437.cjs → Alert-e48c196e.cjs} +2 -2
  4. package/{Alert-94c37437.cjs.map → Alert-e48c196e.cjs.map} +1 -1
  5. package/Alert.cjs +1 -1
  6. package/Alert.js +1 -1
  7. package/{Announcement-2058bd02.cjs → Announcement-d598ea11.cjs} +2 -2
  8. package/{Announcement-2058bd02.cjs.map → Announcement-d598ea11.cjs.map} +1 -1
  9. package/{Announcement-1db4ac33.js → Announcement-eb5fd003.js} +3 -3
  10. package/{Announcement-1db4ac33.js.map → Announcement-eb5fd003.js.map} +1 -1
  11. package/Announcement.cjs +1 -1
  12. package/Announcement.js +1 -1
  13. package/Avatar.cjs +1 -1
  14. package/Avatar.js +1 -1
  15. package/{Button-3b93bd5d.js → Button-855c7b85.js} +2 -2
  16. package/{Button-3b93bd5d.js.map → Button-855c7b85.js.map} +1 -1
  17. package/{Button-30b35802.cjs → Button-8fe1ed7f.cjs} +2 -2
  18. package/{Button-30b35802.cjs.map → Button-8fe1ed7f.cjs.map} +1 -1
  19. package/Button.cjs +1 -1
  20. package/Button.cjs.map +1 -1
  21. package/Button.js +24 -23
  22. package/Button.js.map +1 -1
  23. package/ButtonCompound.cjs +1 -1
  24. package/ButtonCompound.cjs.map +1 -1
  25. package/ButtonCompound.js +24 -23
  26. package/ButtonCompound.js.map +1 -1
  27. package/ButtonLink.cjs +1 -1
  28. package/ButtonLink.cjs.map +1 -1
  29. package/ButtonLink.js +24 -23
  30. package/ButtonLink.js.map +1 -1
  31. package/ButtonToggle.cjs +1 -1
  32. package/ButtonToggle.cjs.map +1 -1
  33. package/ButtonToggle.js +24 -23
  34. package/ButtonToggle.js.map +1 -1
  35. package/{Calendar-ec151b3b.cjs → Calendar-21727a1d.cjs} +2 -2
  36. package/{Calendar-ec151b3b.cjs.map → Calendar-21727a1d.cjs.map} +1 -1
  37. package/{Calendar-cbfe3c06.js → Calendar-6af49637.js} +2 -2
  38. package/{Calendar-cbfe3c06.js.map → Calendar-6af49637.js.map} +1 -1
  39. package/Calendar.cjs +1 -1
  40. package/Calendar.js +1 -1
  41. package/{Checkbox-d325d851.cjs → Checkbox-28412a96.cjs} +2 -2
  42. package/{Checkbox-d325d851.cjs.map → Checkbox-28412a96.cjs.map} +1 -1
  43. package/{Checkbox-3de9628c.js → Checkbox-54ecbd70.js} +2 -2
  44. package/{Checkbox-3de9628c.js.map → Checkbox-54ecbd70.js.map} +1 -1
  45. package/Checkbox.cjs +1 -1
  46. package/Checkbox.js +1 -1
  47. package/Chip-6dbdbc2e.js +91 -0
  48. package/Chip-6dbdbc2e.js.map +1 -0
  49. package/Chip-de78e3f6.cjs +2 -0
  50. package/Chip-de78e3f6.cjs.map +1 -0
  51. package/Chip.cjs +1 -1
  52. package/Chip.css +1 -1
  53. package/Chip.js +1 -1
  54. package/Combobox.cjs +1 -1
  55. package/Combobox.cjs.map +1 -1
  56. package/Combobox.js +24 -23
  57. package/Combobox.js.map +1 -1
  58. package/Details.cjs +1 -1
  59. package/Details.cjs.map +1 -1
  60. package/Details.js +24 -23
  61. package/Details.js.map +1 -1
  62. package/Dialog.cjs +1 -1
  63. package/Dialog.cjs.map +1 -1
  64. package/Dialog.js +37 -36
  65. package/Dialog.js.map +1 -1
  66. package/Drawer-45208baf.cjs +2 -0
  67. package/Drawer-45208baf.cjs.map +1 -0
  68. package/Drawer-f95784bb.js +209 -0
  69. package/Drawer-f95784bb.js.map +1 -0
  70. package/Drawer.cjs +1 -1
  71. package/Drawer.js +1 -1
  72. package/{Helper-74a1f07f-60547798.js → Helper-74a1f07f-092263c4.js} +2 -2
  73. package/{Helper-74a1f07f-60547798.js.map → Helper-74a1f07f-092263c4.js.map} +1 -1
  74. package/{Helper-74a1f07f-30e4fd46.cjs → Helper-74a1f07f-61317df2.cjs} +2 -2
  75. package/{Helper-74a1f07f-30e4fd46.cjs.map → Helper-74a1f07f-61317df2.cjs.map} +1 -1
  76. package/Icon-57c31c9b.cjs +2 -0
  77. package/Icon-57c31c9b.cjs.map +1 -0
  78. package/{Icon-b443eea4.js → Icon-b94f924c.js} +8 -8
  79. package/Icon-b94f924c.js.map +1 -0
  80. package/Icon.cjs +1 -1
  81. package/Icon.css +1 -1
  82. package/Icon.js +1 -1
  83. package/Link.cjs +1 -1
  84. package/Link.cjs.map +1 -1
  85. package/Link.js +24 -23
  86. package/Link.js.map +1 -1
  87. package/{ListView-482c54ad.js → ListView-ad64a337.js} +3 -3
  88. package/{ListView-482c54ad.js.map → ListView-ad64a337.js.map} +1 -1
  89. package/{ListView-43bbc290.cjs → ListView-fcd88dd1.cjs} +2 -2
  90. package/{ListView-43bbc290.cjs.map → ListView-fcd88dd1.cjs.map} +1 -1
  91. package/ListView.cjs +1 -1
  92. package/ListView.js +1 -1
  93. package/{Listbox-b110c64d.js → Listbox-030b2993.js} +2 -2
  94. package/{Listbox-b110c64d.js.map → Listbox-030b2993.js.map} +1 -1
  95. package/{Listbox-8c610bf2.cjs → Listbox-cd5c4185.cjs} +2 -2
  96. package/{Listbox-8c610bf2.cjs.map → Listbox-cd5c4185.cjs.map} +1 -1
  97. package/Listbox.cjs +1 -1
  98. package/Listbox.js +1 -1
  99. package/Menu.cjs +1 -1
  100. package/Menu.cjs.map +1 -1
  101. package/Menu.js +1 -1
  102. package/Overflow.cjs +1 -1
  103. package/Overflow.cjs.map +1 -1
  104. package/Overflow.js +26 -25
  105. package/Overflow.js.map +1 -1
  106. package/Popover.cjs +1 -1
  107. package/Popover.cjs.map +1 -1
  108. package/Popover.js +29 -28
  109. package/Popover.js.map +1 -1
  110. package/PortalProvider.cjs +2 -0
  111. package/PortalProvider.cjs.map +1 -0
  112. package/PortalProvider.d.ts +15 -0
  113. package/PortalProvider.js +16 -0
  114. package/PortalProvider.js.map +1 -0
  115. package/ProgressBar-0c2b3852.cjs +2 -0
  116. package/ProgressBar-0c2b3852.cjs.map +1 -0
  117. package/{ProgressBar-91240dab.js → ProgressBar-f54440d6.js} +116 -112
  118. package/ProgressBar-f54440d6.js.map +1 -0
  119. package/ProgressBar.cjs +1 -1
  120. package/ProgressBar.css +1 -1
  121. package/ProgressBar.js +1 -1
  122. package/{Radio-ed00ea9d.cjs → Radio-845d1fe6.cjs} +2 -2
  123. package/{Radio-ed00ea9d.cjs.map → Radio-845d1fe6.cjs.map} +1 -1
  124. package/{Radio-a747c89a.js → Radio-8f8e771e.js} +2 -2
  125. package/{Radio-a747c89a.js.map → Radio-8f8e771e.js.map} +1 -1
  126. package/Radio.cjs +1 -1
  127. package/Radio.js +1 -1
  128. package/SegmentedControl-d223643c.js +108 -0
  129. package/SegmentedControl-d223643c.js.map +1 -0
  130. package/SegmentedControl-e5e48c23.cjs +2 -0
  131. package/SegmentedControl-e5e48c23.cjs.map +1 -0
  132. package/SegmentedControl.cjs +2 -0
  133. package/SegmentedControl.cjs.map +1 -0
  134. package/SegmentedControl.css +1 -0
  135. package/SegmentedControl.d.ts +36 -0
  136. package/SegmentedControl.js +16 -0
  137. package/SegmentedControl.js.map +1 -0
  138. package/{SideNav-dbcdf7cb.cjs → SideNav-47435e45.cjs} +3 -3
  139. package/{SideNav-dbcdf7cb.cjs.map → SideNav-47435e45.cjs.map} +1 -1
  140. package/{SideNav-b5ef91d4.js → SideNav-80e5ce2f.js} +68 -68
  141. package/{SideNav-b5ef91d4.js.map → SideNav-80e5ce2f.js.map} +1 -1
  142. package/SideNav.cjs +1 -1
  143. package/SideNav.js +1 -1
  144. package/SrOnly-864bd4cb.js.map +1 -1
  145. package/SrOnly-88e8fca6.cjs.map +1 -1
  146. package/Stepper-51ada533.cjs +2 -0
  147. package/Stepper-51ada533.cjs.map +1 -0
  148. package/Stepper-85a93af9.js +633 -0
  149. package/Stepper-85a93af9.js.map +1 -0
  150. package/Stepper.cjs +1 -1
  151. package/Stepper.css +1 -1
  152. package/Stepper.d.ts +2 -2
  153. package/Stepper.js +10 -10
  154. package/{Switch-c0bea091.cjs → Switch-7bfb6be6.cjs} +2 -2
  155. package/{Switch-c0bea091.cjs.map → Switch-7bfb6be6.cjs.map} +1 -1
  156. package/{Switch-39010760.js → Switch-917c699a.js} +2 -2
  157. package/{Switch-39010760.js.map → Switch-917c699a.js.map} +1 -1
  158. package/Switch.cjs +1 -1
  159. package/Switch.js +1 -1
  160. package/{Tab-f636d6c5.js → Tab-68267c78.js} +2 -2
  161. package/{Tab-f636d6c5.js.map → Tab-68267c78.js.map} +1 -1
  162. package/{Tab-0bcbe9c7.cjs → Tab-9d3d7922.cjs} +2 -2
  163. package/{Tab-0bcbe9c7.cjs.map → Tab-9d3d7922.cjs.map} +1 -1
  164. package/Tab.cjs +1 -1
  165. package/Tab.js +1 -1
  166. package/Text-465104f6.js.map +1 -1
  167. package/Text-631c229a.cjs.map +1 -1
  168. package/TextField.cjs +1 -1
  169. package/TextField.cjs.map +1 -1
  170. package/TextField.js +24 -23
  171. package/TextField.js.map +1 -1
  172. package/Textarea.cjs +1 -1
  173. package/Textarea.cjs.map +1 -1
  174. package/Textarea.js +24 -23
  175. package/Textarea.js.map +1 -1
  176. package/{Toast-36679136.js → Toast-330e28fb.js} +3 -3
  177. package/{Toast-36679136.js.map → Toast-330e28fb.js.map} +1 -1
  178. package/{Toast-44e3ff94.cjs → Toast-f154bebc.cjs} +2 -2
  179. package/{Toast-44e3ff94.cjs.map → Toast-f154bebc.cjs.map} +1 -1
  180. package/Toast.cjs +1 -1
  181. package/Toast.js +1 -1
  182. package/Tooltip.cjs +1 -1
  183. package/Tooltip.cjs.map +1 -1
  184. package/Tooltip.js +29 -28
  185. package/Tooltip.js.map +1 -1
  186. package/anvil2.cjs +1 -1
  187. package/anvil2.d.ts +42 -16
  188. package/anvil2.js +176 -172
  189. package/anvil2.js.map +1 -1
  190. package/getKeyboardFocusableElements-ea0e208d-58a00025.js +14 -0
  191. package/getKeyboardFocusableElements-ea0e208d-58a00025.js.map +1 -0
  192. package/getKeyboardFocusableElements-ea0e208d-aba1bd01.cjs +2 -0
  193. package/getKeyboardFocusableElements-ea0e208d-aba1bd01.cjs.map +1 -0
  194. package/index-09cb022c-28ca3469.js +520 -0
  195. package/index-09cb022c-28ca3469.js.map +1 -0
  196. package/index-09cb022c-f4ddfd52.cjs +2 -0
  197. package/index-09cb022c-f4ddfd52.cjs.map +1 -0
  198. package/index-09cb022c.css +1 -0
  199. package/index-671f29a9.cjs +23 -0
  200. package/index-671f29a9.cjs.map +1 -0
  201. package/index-6ad2779a.js +4227 -0
  202. package/index-6ad2779a.js.map +1 -0
  203. package/index-f7658447-d8b2b888.js +121 -0
  204. package/index-f7658447-d8b2b888.js.map +1 -0
  205. package/index-f7658447-d9ca2747.cjs +2 -0
  206. package/index-f7658447-d9ca2747.cjs.map +1 -0
  207. package/index-f7658447.css +1 -0
  208. package/index3.css +1 -1
  209. package/package.json +2 -2
  210. package/useAccessibleColor.cjs +1 -1
  211. package/useAccessibleColor.js +24 -23
  212. package/useAccessibleColor.js.map +1 -1
  213. package/useLinkStyles.cjs +1 -1
  214. package/useLinkStyles.js +23 -22
  215. package/useLinkStyles.js.map +1 -1
  216. package/useMergeRefs.cjs +1 -1
  217. package/useMergeRefs.js +24 -23
  218. package/useMergeRefs.js.map +1 -1
  219. package/usePrefersColorScheme.cjs +1 -1
  220. package/usePrefersColorScheme.js +24 -23
  221. package/usePrefersColorScheme.js.map +1 -1
  222. package/useSwipe.cjs +1 -1
  223. package/useSwipe.js +24 -23
  224. package/useSwipe.js.map +1 -1
  225. package/Chip-95370241.cjs +0 -2
  226. package/Chip-95370241.cjs.map +0 -1
  227. package/Chip-c0f71a26.js +0 -90
  228. package/Chip-c0f71a26.js.map +0 -1
  229. package/Drawer-9775ed75.js +0 -219
  230. package/Drawer-9775ed75.js.map +0 -1
  231. package/Drawer-dff5abf1.cjs +0 -2
  232. package/Drawer-dff5abf1.cjs.map +0 -1
  233. package/Icon-43ce0e6c.cjs +0 -2
  234. package/Icon-43ce0e6c.cjs.map +0 -1
  235. package/Icon-b443eea4.js.map +0 -1
  236. package/ProgressBar-91240dab.js.map +0 -1
  237. package/ProgressBar-b25b2493.cjs +0 -2
  238. package/ProgressBar-b25b2493.cjs.map +0 -1
  239. package/Stepper-7c787b24.js +0 -391
  240. package/Stepper-7c787b24.js.map +0 -1
  241. package/Stepper-e08b9998.cjs +0 -2
  242. package/Stepper-e08b9998.cjs.map +0 -1
  243. package/index-1dc4c6d3.js +0 -4662
  244. package/index-1dc4c6d3.js.map +0 -1
  245. package/index-25ea279e.cjs +0 -23
  246. package/index-25ea279e.cjs.map +0 -1
  247. package/index-afacb017-0ced4668.cjs +0 -2
  248. package/index-afacb017-0ced4668.cjs.map +0 -1
  249. package/index-afacb017-e81aec1d.js +0 -310
  250. package/index-afacb017-e81aec1d.js.map +0 -1
  251. package/index-afacb017.css +0 -1
  252. package/index-f91265d9-04a0345c.cjs +0 -2
  253. package/index-f91265d9-04a0345c.cjs.map +0 -1
  254. package/index-f91265d9-3d747651.js +0 -121
  255. package/index-f91265d9-3d747651.js.map +0 -1
  256. package/index-f91265d9.css +0 -1
@@ -0,0 +1,633 @@
1
+ import "./Stepper.css";
2
+ import { f as t } from "./jsx-runtime-944c88e2-e73fa629.js";
3
+ import { forwardRef as C, useState as S, useRef as E, useEffect as R, useContext as D, createContext as se, useCallback as L, useMemo as ie } from "react";
4
+ import { u as M } from "./floating-ui.react-8d61182d.js";
5
+ import { c as k } from "./index-e0f6271a.js";
6
+ import { C as ce } from "./Icon-b94f924c.js";
7
+ import { a as de } from "./check-5f087ea0-b5474547.js";
8
+ import { j as $ } from "./Flex-d338e855.js";
9
+ import { J as B } from "./useLayoutPropsUtil-e307abc7-cbe2fb6d.js";
10
+ import { B as q } from "./Button-855c7b85.js";
11
+ import { u as G } from "./use-reduced-motion-b359504d.js";
12
+ import { m as Q } from "./motion-a0a946d6.js";
13
+ const pe = "_overflow_4bvd0_2", ue = "_expanded_4bvd0_2", me = "_content_4bvd0_55", xe = "_horizontal_4bvd0_99", fe = "_truncate_4bvd0_102", p = {
14
+ overflow: pe,
15
+ expanded: ue,
16
+ "shadow-top": "_shadow-top_4bvd0_2",
17
+ "shadow-right": "_shadow-right_4bvd0_6",
18
+ "shadow-bottom": "_shadow-bottom_4bvd0_10",
19
+ "shadow-left": "_shadow-left_4bvd0_14",
20
+ "overflow-text": "_overflow-text_4bvd0_21",
21
+ "expand-button": "_expand-button_4bvd0_34",
22
+ content: me,
23
+ horizontal: xe,
24
+ truncate: fe
25
+ }, V = C(
26
+ (v, b) => {
27
+ const { rows: u = 1, ...x } = v, { layoutStyles: o, componentProps: i } = B(x), [a, m] = S(!1), { className: r, style: c, children: l, ...d } = i, s = {
28
+ ...c,
29
+ ...o,
30
+ "--overflow-text-row": a ? "initial" : u
31
+ };
32
+ if ("expandable" in v && v.expandable === !0) {
33
+ const {
34
+ expandable: _,
35
+ expandText: y,
36
+ collapseText: e,
37
+ onExpand: n,
38
+ onCollapse: g,
39
+ ...N
40
+ } = d, A = y ?? "Show more...", P = e ?? "Show less...", h = (j) => {
41
+ if (m((I) => !I), a) {
42
+ g == null || g(j);
43
+ return;
44
+ }
45
+ n == null || n(j);
46
+ }, w = k(
47
+ [p["overflow-text"]],
48
+ [p.expandable],
49
+ {
50
+ [p.expanded]: a
51
+ }
52
+ );
53
+ return /* @__PURE__ */ t.jsxs(
54
+ "div",
55
+ {
56
+ ref: b,
57
+ className: w,
58
+ style: s,
59
+ "data-anv": "overflow-text",
60
+ ...N,
61
+ children: [
62
+ /* @__PURE__ */ t.jsx("div", { className: p.content, children: l }),
63
+ /* @__PURE__ */ t.jsx(
64
+ "button",
65
+ {
66
+ className: p["expand-button"],
67
+ onClick: h,
68
+ "aria-hidden": !0,
69
+ children: a ? P : A
70
+ }
71
+ )
72
+ ]
73
+ }
74
+ );
75
+ }
76
+ const f = k([p["overflow-text"]]);
77
+ return /* @__PURE__ */ t.jsx(
78
+ "div",
79
+ {
80
+ ref: b,
81
+ className: f,
82
+ style: s,
83
+ "data-anv": "overflow-text",
84
+ ...d,
85
+ children: /* @__PURE__ */ t.jsx("div", { className: p.content, children: l })
86
+ }
87
+ );
88
+ }
89
+ );
90
+ V.displayName = "OverflowText";
91
+ const X = C(
92
+ (v, b) => {
93
+ const { layoutStyles: u, componentProps: x } = B(v), {
94
+ children: o,
95
+ className: i,
96
+ direction: a = "column",
97
+ style: m,
98
+ height: r,
99
+ width: c,
100
+ truncate: l,
101
+ gap: d,
102
+ ...s
103
+ } = x, f = E(null), [_, y] = S(!1), [e, n] = S({
104
+ left: !1,
105
+ right: !1,
106
+ top: !1,
107
+ bottom: !1
108
+ });
109
+ R(() => {
110
+ if (!f.current)
111
+ return;
112
+ if (a === "row") {
113
+ const w = f.current.offsetWidth < f.current.scrollWidth;
114
+ n((j) => ({
115
+ ...j,
116
+ right: w
117
+ }));
118
+ return;
119
+ }
120
+ const h = f.current.offsetHeight < f.current.scrollHeight;
121
+ n((w) => ({
122
+ ...w,
123
+ bottom: h
124
+ }));
125
+ }, [a]);
126
+ const g = () => {
127
+ if (!f.current)
128
+ return;
129
+ const h = f.current;
130
+ if (a === "row") {
131
+ const I = h.scrollLeft > 0, T = h.scrollLeft < h.scrollWidth - h.offsetWidth;
132
+ n({
133
+ left: I,
134
+ right: T,
135
+ top: !1,
136
+ bottom: !1
137
+ });
138
+ return;
139
+ }
140
+ const w = h.scrollTop > 0, j = h.scrollTop < h.scrollHeight - h.offsetHeight;
141
+ n({
142
+ top: w,
143
+ bottom: j,
144
+ left: !1,
145
+ right: !1
146
+ });
147
+ }, N = k([p.overflow], {
148
+ [p.vertical]: a === "column",
149
+ [p.horizontal]: a === "row",
150
+ [p.truncate]: !!l,
151
+ [p.expanded]: _
152
+ });
153
+ if (l) {
154
+ const h = {
155
+ ...m,
156
+ ...u
157
+ }, w = {
158
+ height: r ?? void 0
159
+ }, j = typeof l == "object" ? l.expandText : "Show more...", I = typeof l == "object" ? l.collapseText : "Show less...", T = (W) => {
160
+ var J, K;
161
+ if (y((oe) => !oe), setTimeout(() => {
162
+ g();
163
+ }, 100), typeof l == "object") {
164
+ if (_) {
165
+ (J = l.onCollapse) == null || J.call(l, W);
166
+ return;
167
+ }
168
+ (K = l.onExpand) == null || K.call(l, W);
169
+ }
170
+ };
171
+ return /* @__PURE__ */ t.jsxs(
172
+ "div",
173
+ {
174
+ ref: b,
175
+ style: h,
176
+ className: N,
177
+ "data-anv": "overflow",
178
+ ...s,
179
+ children: [
180
+ e.top && !l ? /* @__PURE__ */ t.jsx("div", { className: p["shadow-top"] }) : null,
181
+ e.left && !l ? /* @__PURE__ */ t.jsx("div", { className: p["shadow-left"] }) : null,
182
+ /* @__PURE__ */ t.jsx(
183
+ $,
184
+ {
185
+ className: p.content,
186
+ onScroll: g,
187
+ style: w,
188
+ ref: f,
189
+ direction: a,
190
+ gap: d,
191
+ tabIndex: 0,
192
+ children: o
193
+ }
194
+ ),
195
+ e.bottom && !l ? /* @__PURE__ */ t.jsx("div", { className: p["shadow-bottom"] }) : null,
196
+ e.right && !l ? /* @__PURE__ */ t.jsx("div", { className: p["shadow-right"] }) : null,
197
+ /* @__PURE__ */ t.jsx(
198
+ "button",
199
+ {
200
+ className: p["expand-button"],
201
+ onClick: T,
202
+ children: _ ? I : j
203
+ }
204
+ )
205
+ ]
206
+ }
207
+ );
208
+ }
209
+ const A = {
210
+ ...m,
211
+ ...u
212
+ }, P = {
213
+ height: r ?? void 0
214
+ };
215
+ return /* @__PURE__ */ t.jsxs(
216
+ "div",
217
+ {
218
+ ref: b,
219
+ style: A,
220
+ className: N,
221
+ "data-anv": "overflow",
222
+ ...s,
223
+ children: [
224
+ e.left ? /* @__PURE__ */ t.jsx("div", { className: p["shadow-left"] }) : null,
225
+ e.top ? /* @__PURE__ */ t.jsx("div", { className: p["shadow-top"] }) : null,
226
+ /* @__PURE__ */ t.jsx(
227
+ $,
228
+ {
229
+ className: p.content,
230
+ onScroll: g,
231
+ ref: f,
232
+ style: P,
233
+ direction: a,
234
+ gap: d,
235
+ tabIndex: 0,
236
+ children: o
237
+ }
238
+ ),
239
+ e.bottom ? /* @__PURE__ */ t.jsx("div", { className: p["shadow-bottom"] }) : null,
240
+ e.right ? /* @__PURE__ */ t.jsx("div", { className: p["shadow-right"] }) : null
241
+ ]
242
+ }
243
+ );
244
+ }
245
+ );
246
+ X.displayName = "Overflow";
247
+ const Y = Object.assign(X, {
248
+ Text: V
249
+ });
250
+ const ve = "_bar_ead3t_27", be = "_label_ead3t_43", he = "_circle_ead3t_50", F = {
251
+ "stepper-step": "_stepper-step_ead3t_4",
252
+ bar: ve,
253
+ label: be,
254
+ circle: he,
255
+ "all-completed": "_all-completed_ead3t_81",
256
+ "can-navigate": "_can-navigate_ead3t_84"
257
+ }, Z = C(
258
+ (v, b) => {
259
+ var u;
260
+ const x = E(null), {
261
+ current: o,
262
+ items: i,
263
+ setCurrent: a,
264
+ setFocus: m,
265
+ allCompleted: r,
266
+ allowNavigateToPrevStep: c
267
+ } = D(z), {
268
+ onClick: l,
269
+ children: d,
270
+ onFocus: s,
271
+ onKeyDown: f,
272
+ controls: _,
273
+ className: y,
274
+ ...e
275
+ } = v, n = E(), [g, N] = S(!1), [A, P] = S(
276
+ // Below is to be used for custom overriding
277
+ // completed state for a step
278
+ // Check Stepper.stories.tsx#103 for the use case
279
+ ((u = x.current) == null ? void 0 : u.getAttribute("data-completed")) === "true" ? !0 : void 0
280
+ );
281
+ R(() => {
282
+ i && (n.current = Array.prototype.indexOf.call(i, x.current), P(n.current < o), n.current === o ? N(!0) : N(!1));
283
+ }, [o, i]);
284
+ const h = k(F["stepper-step"], y, {
285
+ [F["can-navigate"]]: c,
286
+ [F["all-completed"]]: r
287
+ }), w = (j) => {
288
+ g || n.current === void 0 || !i || c && (l == null || l(j, n.current), !(n.current > o) && (a == null || a(n.current), m == null || m(n.current), i[n.current].focus()));
289
+ };
290
+ return /* @__PURE__ */ t.jsxs(
291
+ "button",
292
+ {
293
+ type: "button",
294
+ role: "tab",
295
+ "data-anv": "stepper-step",
296
+ className: h,
297
+ "aria-selected": g,
298
+ "aria-controls": _,
299
+ tabIndex: c && g ? 0 : -1,
300
+ "data-completed": A,
301
+ onClick: w,
302
+ ...e,
303
+ ref: M([x, b]),
304
+ children: [
305
+ /* @__PURE__ */ t.jsx("span", { className: F.bar }),
306
+ /* @__PURE__ */ t.jsxs("span", { className: F.label, children: [
307
+ /* @__PURE__ */ t.jsx("span", { className: F.circle, children: /* @__PURE__ */ t.jsx(ce, { svg: de, inherit: !0, "aria-hidden": !0 }) }),
308
+ d
309
+ ] })
310
+ ]
311
+ }
312
+ );
313
+ }
314
+ );
315
+ Z.displayName = "StepperStep";
316
+ const ye = "_label_17lfc_25", O = {
317
+ "stepper-list": "_stepper-list_17lfc_4",
318
+ label: ye
319
+ }, U = C(
320
+ (v, b) => {
321
+ const { className: u, children: x, onKeyDown: o, ...i } = v, {
322
+ current: a,
323
+ setCurrent: m,
324
+ focus: r,
325
+ setFocus: c,
326
+ items: l,
327
+ allowNavigateToPrevStep: d
328
+ } = D(z), s = (y) => {
329
+ if (o == null || o(y), !d)
330
+ return;
331
+ const e = Array.prototype.filter.call(
332
+ l,
333
+ (n) => n.getAttribute("data-completed") === "true" || n.getAttribute("aria-selected") === "true"
334
+ );
335
+ switch (y.code) {
336
+ case "Enter":
337
+ case "Space":
338
+ y.preventDefault(), m == null || m(r);
339
+ break;
340
+ case "ArrowRight":
341
+ if (y.preventDefault(), r + 1 === (e == null ? void 0 : e.length)) {
342
+ c == null || c(0), e == null || e[0].focus(), e == null || e[0].setAttribute("tabindex", "0");
343
+ return;
344
+ }
345
+ e == null || e[r].setAttribute("tabindex", "-1"), c == null || c(r + 1), e == null || e[r + 1].focus(), e == null || e[r + 1].setAttribute("tabindex", "0");
346
+ break;
347
+ case "ArrowLeft":
348
+ if (y.preventDefault(), r === 0) {
349
+ const n = e ? (e == null ? void 0 : e.length) - 1 : 0;
350
+ c == null || c(n), e == null || e[n].focus(), e == null || e[n].setAttribute("tabindex", "0");
351
+ return;
352
+ }
353
+ e == null || e[r].setAttribute("tabindex", "-1"), c == null || c(r - 1), e == null || e[r - 1].focus(), e == null || e[r - 1].setAttribute("tabindex", "0");
354
+ break;
355
+ }
356
+ }, f = k(O["stepper-list"], u), _ = l == null ? void 0 : l[a].querySelectorAll("span")[1].textContent;
357
+ return /* @__PURE__ */ t.jsxs(
358
+ "div",
359
+ {
360
+ ...i,
361
+ tabIndex: 0,
362
+ className: f,
363
+ "data-anv": "stepper-list",
364
+ onKeyDown: s,
365
+ ref: b,
366
+ role: "tablist",
367
+ children: [
368
+ /* @__PURE__ */ t.jsx($, { direction: "row", className: O["stepper-list"], children: x }),
369
+ /* @__PURE__ */ t.jsx("span", { className: O.label, children: _ })
370
+ ]
371
+ }
372
+ );
373
+ }
374
+ );
375
+ U.displayName = "StepperList";
376
+ const ee = {
377
+ "stepper-panel": "_stepper-panel_13grs_4"
378
+ }, te = C(
379
+ (v, b) => {
380
+ var u;
381
+ const { layoutStyles: x, componentProps: o } = B(v), { id: i, className: a, style: m, children: r, ...c } = o, { current: l, items: d, allCompleted: s } = D(z), f = G();
382
+ let _;
383
+ d == null || d.forEach((N, A) => {
384
+ N.getAttribute("aria-controls") === i && (_ = N.id);
385
+ });
386
+ const y = ((u = d == null ? void 0 : d[l]) == null ? void 0 : u.getAttribute("aria-controls")) === i, e = f ? {
387
+ enter: {
388
+ opacity: 0
389
+ },
390
+ center: {
391
+ zIndex: 1,
392
+ opacity: 1
393
+ },
394
+ exit: {
395
+ zIndex: 0,
396
+ opacity: 0
397
+ }
398
+ } : {
399
+ enter: {
400
+ y: 50,
401
+ opacity: 0
402
+ },
403
+ center: {
404
+ zIndex: 1,
405
+ y: 0,
406
+ opacity: 1
407
+ },
408
+ exit: {
409
+ zIndex: 0,
410
+ y: -50,
411
+ opacity: 0
412
+ }
413
+ }, n = k(ee["stepper-panel"], a), g = { ...m, ...x };
414
+ return y && !s ? /* @__PURE__ */ t.jsx(
415
+ Q.div,
416
+ {
417
+ variants: e,
418
+ style: g,
419
+ initial: "enter",
420
+ animate: "center",
421
+ exit: "exit",
422
+ className: n,
423
+ transition: {
424
+ x: {
425
+ type: "spring",
426
+ stiffness: 300,
427
+ damping: 30
428
+ },
429
+ opacity: { duration: 1 }
430
+ },
431
+ ...c,
432
+ role: "tabpanel",
433
+ "data-anv": "stepper-panel",
434
+ id: i,
435
+ "aria-labelledby": _,
436
+ tabIndex: 0,
437
+ ref: b,
438
+ children: /* @__PURE__ */ t.jsx(Y, { children: r })
439
+ }
440
+ ) : /* @__PURE__ */ t.jsx(t.Fragment, {});
441
+ }
442
+ );
443
+ te.displayName = "StepperPanel";
444
+ const _e = "_stepper_1vd1x_4", Ne = {
445
+ stepper: _e
446
+ }, le = C((v, b) => {
447
+ const { goToNext: u, markComplete: x, items: o, current: i, allCompleted: a } = D(z), {
448
+ onClick: m,
449
+ onFocus: r,
450
+ nextLabel: c = "Next",
451
+ completeLabel: l = "Complete",
452
+ appearance: d = "primary",
453
+ ...s
454
+ } = v, f = (_) => {
455
+ if (m == null || m(_), o && i === o.length - 1) {
456
+ x == null || x();
457
+ return;
458
+ }
459
+ u == null || u();
460
+ };
461
+ return a ? null : /* @__PURE__ */ t.jsx(
462
+ q,
463
+ {
464
+ "data-anv": "stepper-next-button",
465
+ onClick: f,
466
+ appearance: d,
467
+ ref: b,
468
+ ...s,
469
+ children: o && i === o.length - 1 ? l : c
470
+ }
471
+ );
472
+ });
473
+ le.displayName = "StepperNextButton";
474
+ const ne = C((v, b) => {
475
+ const { goToPrev: u, allCompleted: x, setAllCompleted: o, items: i, current: a } = D(z), { onClick: m, label: r = "Previous", onFocus: c, ...l } = v, d = (s) => {
476
+ x ? (o == null || o(!1), i == null || i[a].setAttribute("tabindex", "0")) : u == null || u(), m == null || m(s);
477
+ };
478
+ return a === 0 ? null : /* @__PURE__ */ t.jsx(
479
+ q,
480
+ {
481
+ "data-anv": "stepper-prev-button",
482
+ onClick: d,
483
+ ref: b,
484
+ ...l,
485
+ children: r
486
+ }
487
+ );
488
+ });
489
+ ne.displayName = "StepperPrevButton";
490
+ const ae = C((v, b) => {
491
+ const { layoutStyles: u, componentProps: x } = B(v), { id: o, className: i, style: a, children: m, ...r } = x, { allCompleted: c } = D(z), l = G() ? {
492
+ enter: {
493
+ opacity: 0
494
+ },
495
+ center: {
496
+ zIndex: 1,
497
+ opacity: 1
498
+ },
499
+ exit: {
500
+ zIndex: 0,
501
+ opacity: 0
502
+ }
503
+ } : {
504
+ enter: {
505
+ y: 50,
506
+ opacity: 0
507
+ },
508
+ center: {
509
+ zIndex: 1,
510
+ y: 0,
511
+ opacity: 1
512
+ },
513
+ exit: {
514
+ zIndex: 0,
515
+ y: -50,
516
+ opacity: 0
517
+ }
518
+ }, d = k(ee["stepper-panel"], i), s = { ...a, ...u };
519
+ return c ? /* @__PURE__ */ t.jsx(
520
+ Q.div,
521
+ {
522
+ variants: l,
523
+ style: s,
524
+ initial: "enter",
525
+ animate: "center",
526
+ exit: "exit",
527
+ className: d,
528
+ transition: {
529
+ x: {
530
+ type: "spring",
531
+ stiffness: 300,
532
+ damping: 30
533
+ },
534
+ opacity: { duration: 1 }
535
+ },
536
+ ...r,
537
+ role: "tabpanel",
538
+ "data-anv": "stepper-final-panel",
539
+ tabIndex: 0,
540
+ ref: b,
541
+ children: /* @__PURE__ */ t.jsx(Y, { children: m })
542
+ }
543
+ ) : /* @__PURE__ */ t.jsx(t.Fragment, {});
544
+ });
545
+ ae.displayName = "StepperFinalPanel";
546
+ const H = {
547
+ current: 0,
548
+ focus: 0
549
+ }, z = se(H), re = C(
550
+ (v, b) => {
551
+ const { layoutStyles: u, componentProps: x } = B(v), {
552
+ defaultIndex: o,
553
+ className: i,
554
+ allowNavigateToPrevStep: a,
555
+ children: m,
556
+ onComplete: r,
557
+ style: c,
558
+ ...l
559
+ } = x, d = E(null), [s, f] = S(), [_, y] = S(!1), [e, n] = S(
560
+ o ?? H.current
561
+ ), [g, N] = S(
562
+ o ?? H.focus
563
+ ), A = k(Ne.stepper, i);
564
+ R(() => {
565
+ var T;
566
+ f((T = d.current) == null ? void 0 : T.querySelectorAll("[role=tab]:not([disabled])"));
567
+ }, [d]);
568
+ const P = L(() => {
569
+ s && (s.forEach((T) => T.setAttribute("tabindex", "-1")), y(!0), r == null || r());
570
+ }, [s, r]), h = L(() => {
571
+ s && e + 1 !== s.length && (n == null || n(e + 1), N == null || N(e + 1));
572
+ }, [e, s]), w = L(() => {
573
+ e !== 0 && (n == null || n(e - 1), N == null || N(e - 1));
574
+ }, [e]), j = { ...c, ...u }, I = ie(
575
+ () => ({
576
+ current: e,
577
+ setCurrent: n,
578
+ focus: g,
579
+ setFocus: N,
580
+ goToNext: h,
581
+ goToPrev: w,
582
+ markComplete: P,
583
+ items: s,
584
+ allCompleted: _,
585
+ setAllCompleted: y,
586
+ allowNavigateToPrevStep: a
587
+ }),
588
+ [
589
+ e,
590
+ g,
591
+ h,
592
+ w,
593
+ P,
594
+ s,
595
+ _,
596
+ y,
597
+ a
598
+ ]
599
+ );
600
+ return /* @__PURE__ */ t.jsx(z.Provider, { value: I, children: /* @__PURE__ */ t.jsx(
601
+ "div",
602
+ {
603
+ className: A,
604
+ "data-anv": "stepper",
605
+ style: j,
606
+ ...l,
607
+ ref: M([d, b]),
608
+ children: m
609
+ }
610
+ ) });
611
+ }
612
+ );
613
+ re.displayName = "Stepper";
614
+ const De = Object.assign(re, {
615
+ Step: Z,
616
+ List: U,
617
+ Panel: te,
618
+ NextButton: le,
619
+ PrevButton: ne,
620
+ FinalPanel: ae
621
+ });
622
+ export {
623
+ U as G,
624
+ V as I,
625
+ te as Q,
626
+ Z as V,
627
+ le as W,
628
+ ne as X,
629
+ ae as Y,
630
+ De as j,
631
+ Y as o
632
+ };
633
+ //# sourceMappingURL=Stepper-85a93af9.js.map