welcome-ui 10.0.0-alpha.1 → 10.0.0-alpha.10

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 (176) hide show
  1. package/README.md +1 -1
  2. package/dist/2W3RN7C5-DMC82gDP.js +61 -0
  3. package/dist/4I4MLMKD-BO6Lcy7s.js +150 -0
  4. package/dist/Accordion.js +20 -18
  5. package/dist/Alert.css +1 -1
  6. package/dist/Alert.js +93 -87
  7. package/dist/AspectRatio.js +2 -1
  8. package/dist/Avatar.js +14 -12
  9. package/dist/{B7UTNDHN-BlIblHCu.js → B7UTNDHN-BghjolIs.js} +30 -30
  10. package/dist/Badge.js +2 -1
  11. package/dist/Breadcrumb.css +1 -1
  12. package/dist/Breadcrumb.js +175 -154
  13. package/dist/Button.css +1 -1
  14. package/dist/Button.js +43 -41
  15. package/dist/ButtonGroup.js +7 -5
  16. package/dist/Card.css +1 -1
  17. package/dist/Card.js +68 -15
  18. package/dist/Checkbox.js +30 -29
  19. package/dist/CloseButton.css +1 -1
  20. package/dist/CloseButton.js +15 -13
  21. package/dist/{CustomPopper-vwbOQq72.js → CustomPopper-C1wIDHbM.js} +5 -4
  22. package/dist/{DSAASPLT-BaaCUKsb.js → DSAASPLT-Fx1kuAsk.js} +3 -3
  23. package/dist/DatePicker.js +82 -78
  24. package/dist/DateTimePicker.js +23 -22
  25. package/dist/Drawer.js +141 -96
  26. package/dist/DropdownMenu.css +1 -1
  27. package/dist/DropdownMenu.js +902 -462
  28. package/dist/Field.js +2 -1
  29. package/dist/FieldGroup.js +9 -7
  30. package/dist/FileDrop.css +1 -1
  31. package/dist/FileDrop.js +427 -398
  32. package/dist/FileUpload.js +44 -41
  33. package/dist/GVVKDT6A-CF9ejW_c.js +619 -0
  34. package/dist/Hint.js +10 -8
  35. package/dist/Icon.css +1 -1
  36. package/dist/Icon.js +36 -22
  37. package/dist/InputText.css +1 -1
  38. package/dist/InputText.js +59 -57
  39. package/dist/{KPUWHTQJ-D2TPji47.js → KPUWHTQJ-Dv3cAqjP.js} +33 -31
  40. package/dist/Label.js +9 -7
  41. package/dist/Link.css +1 -1
  42. package/dist/Link.js +54 -49
  43. package/dist/Loader.js +13 -11
  44. package/dist/Logo.js +21 -13
  45. package/dist/Modal.js +145 -114
  46. package/dist/{NI3IVY7K-Ztb3-XAv.js → NI3IVY7K-Dy240mkD.js} +53 -53
  47. package/dist/{NMGNQVTG-C6TqBngP.js → NMGNQVTG-DRO2uXZT.js} +8 -8
  48. package/dist/{OE2EFRVA-C3721cM3.js → OE2EFRVA-Dg1R6gaC.js} +186 -170
  49. package/dist/{OLVWQA7U-DysaSaZj.js → OLVWQA7U-Dia3UUnG.js} +51 -51
  50. package/dist/Pagination.css +1 -1
  51. package/dist/Pagination.js +157 -76
  52. package/dist/PasswordInput.js +20 -17
  53. package/dist/Popover.js +89 -72
  54. package/dist/{RTNCFSKZ-qpPg689E.js → RTNCFSKZ-BywELldk.js} +47 -47
  55. package/dist/Radio.css +1 -1
  56. package/dist/Radio.js +39 -40
  57. package/dist/RadioGroup.js +29 -27
  58. package/dist/RadioTab.js +3 -2
  59. package/dist/{SBSPVDDI-DJKkC1eb.js → SBSPVDDI-CmtnvvUX.js} +42 -42
  60. package/dist/SQZLCNLX-Dg4KKdNJ.js +83 -0
  61. package/dist/Search.css +1 -1
  62. package/dist/Search.js +136 -129
  63. package/dist/Select.css +1 -1
  64. package/dist/Select.js +259 -257
  65. package/dist/Slider.js +67 -62
  66. package/dist/Stepper.js +34 -27
  67. package/dist/StickyNote.css +1 -0
  68. package/dist/StickyNote.js +49 -0
  69. package/dist/Swiper.js +53 -51
  70. package/dist/{T22PY7TE-C1N0q8Kn.js → T22PY7TE-gLuJpoOm.js} +46 -46
  71. package/dist/Table.js +34 -21
  72. package/dist/Tabs.js +165 -156
  73. package/dist/Tag.css +1 -1
  74. package/dist/Tag.js +67 -62
  75. package/dist/Text.js +5 -3
  76. package/dist/Textarea.css +1 -1
  77. package/dist/Textarea.js +26 -18
  78. package/dist/TimePicker.js +24 -23
  79. package/dist/Toast.css +1 -1
  80. package/dist/Toast.js +275 -165
  81. package/dist/Toggle.js +16 -14
  82. package/dist/Tooltip.css +1 -1
  83. package/dist/Tooltip.js +120 -129
  84. package/dist/VariantIcon.js +8 -6
  85. package/dist/VisuallyHidden.js +9 -7
  86. package/dist/WelcomeLoader.js +4 -3
  87. package/dist/XCKGTAUF-CJwwVibW.js +25 -0
  88. package/dist/{Y67KZUMI-DFEgrUv2.js → Y67KZUMI-BwLWwpNF.js} +5 -5
  89. package/dist/{ZTXFEM5L-CkrIQCN1.js → ZTXFEM5L-WGHY_jqg.js} +3 -3
  90. package/dist/{downshift.esm-D_6pHXkq.js → downshift.esm-xtYanIDi.js} +1 -1
  91. package/dist/scss/breakpoints.scss +9 -0
  92. package/dist/scss/text-ellipsis.scss +5 -0
  93. package/dist/scss/texts.scss +108 -0
  94. package/dist/theme.css +1 -1
  95. package/dist/theme.js +1 -0
  96. package/dist/{tslib.es6-DpB4Y59c.js → tslib.es6-C80jYMbM.js} +1 -1
  97. package/dist/types/components/Alert/components/Buttons.d.ts +3 -0
  98. package/dist/types/components/Alert/components/Title.d.ts +5 -0
  99. package/dist/types/components/Alert/index.d.ts +7 -3
  100. package/dist/types/components/Alert/types.d.ts +3 -9
  101. package/dist/types/components/Breadcrumb/Item.d.ts +2 -2
  102. package/dist/types/components/Breadcrumb/index.d.ts +1 -1
  103. package/dist/types/components/Breadcrumb/types.d.ts +6 -3
  104. package/dist/types/components/Card/Body.d.ts +2 -3
  105. package/dist/types/components/Card/Footer.d.ts +6 -0
  106. package/dist/types/components/Card/Header.d.ts +5 -0
  107. package/dist/types/components/Card/index.d.ts +7 -8
  108. package/dist/types/components/Card/types.d.ts +16 -3
  109. package/dist/types/components/Checkbox/index.d.ts +1 -2
  110. package/dist/types/components/Checkbox/types.d.ts +3 -1
  111. package/dist/types/components/DateTimePickerCommon/CustomHeader.d.ts +4 -1
  112. package/dist/types/components/DateTimePickerCommon/CustomPopper.d.ts +6 -3
  113. package/dist/types/components/Drawer/AssetDrawer/Header.d.ts +4 -1
  114. package/dist/types/components/Drawer/AssetDrawer/IconBlock.d.ts +4 -1
  115. package/dist/types/components/Drawer/AssetDrawer/types.d.ts +3 -0
  116. package/dist/types/components/Drawer/components/Backdrop.d.ts +1 -1
  117. package/dist/types/components/Drawer/components/Close.d.ts +4 -1
  118. package/dist/types/components/Drawer/components/Title.d.ts +4 -1
  119. package/dist/types/components/Drawer/index.d.ts +13 -4
  120. package/dist/types/components/DropdownMenu/Action.d.ts +2 -0
  121. package/dist/types/components/DropdownMenu/Group.d.ts +4 -0
  122. package/dist/types/components/DropdownMenu/Item.d.ts +7 -0
  123. package/dist/types/components/DropdownMenu/Search.d.ts +2 -0
  124. package/dist/types/components/DropdownMenu/Submenu.d.ts +4 -0
  125. package/dist/types/components/DropdownMenu/index.d.ts +11 -0
  126. package/dist/types/components/DropdownMenu/types.d.ts +26 -5
  127. package/dist/types/components/FileDrop/components/FilePreview.d.ts +4 -1
  128. package/dist/types/components/FileDrop/components/Message.d.ts +4 -1
  129. package/dist/types/components/FileDrop/types.d.ts +2 -0
  130. package/dist/types/components/Icon/icons.d.ts +6 -6
  131. package/dist/types/components/Icon/types.d.ts +2 -0
  132. package/dist/types/components/Loader/index.d.ts +4 -1
  133. package/dist/types/components/Modal/Assets/AssetContent.d.ts +4 -1
  134. package/dist/types/components/Modal/Assets/AssetTitle.d.ts +4 -1
  135. package/dist/types/components/Modal/Assets/CloseButton.d.ts +4 -1
  136. package/dist/types/components/Modal/Assets/Dialog.d.ts +4 -1
  137. package/dist/types/components/Modal/Assets/Iframe.d.ts +4 -1
  138. package/dist/types/components/Modal/Assets/index.d.ts +16 -4
  139. package/dist/types/components/Modal/components/Close.d.ts +4 -1
  140. package/dist/types/components/Modal/index.d.ts +16 -4
  141. package/dist/types/components/Pagination/types.d.ts +11 -0
  142. package/dist/types/components/PasswordInput/ToggleButton.d.ts +4 -1
  143. package/dist/types/components/Popover/Arrow.d.ts +4 -1
  144. package/dist/types/components/Popover/ContentWrapper.d.ts +4 -1
  145. package/dist/types/components/Radio/types.d.ts +1 -1
  146. package/dist/types/components/RadioGroup/index.d.ts +4 -1
  147. package/dist/types/components/Stepper/index.d.ts +8 -2
  148. package/dist/types/components/StickyNote/components/Button.d.ts +5 -0
  149. package/dist/types/components/StickyNote/components/Title.d.ts +5 -0
  150. package/dist/types/components/StickyNote/index.d.ts +11 -0
  151. package/dist/types/components/StickyNote/index.test.d.ts +1 -0
  152. package/dist/types/components/StickyNote/types.d.ts +15 -0
  153. package/dist/types/components/Swiper/index.d.ts +4 -1
  154. package/dist/types/components/Table/index.d.ts +20 -5
  155. package/dist/types/components/Tabs/components/ActiveBar/index.d.ts +4 -1
  156. package/dist/types/components/Tag/types.d.ts +4 -2
  157. package/dist/types/components/Textarea/types.d.ts +1 -0
  158. package/dist/types/components/Toast/components/Growl.d.ts +2 -0
  159. package/dist/types/components/Toast/index.d.ts +8 -2
  160. package/dist/types/components/Toast/types.d.ts +8 -9
  161. package/dist/types/components/Tooltip/types.d.ts +1 -1
  162. package/dist/types/theme/types.d.ts +255 -218
  163. package/dist/types/utils/index.d.ts +0 -1
  164. package/dist/{utils-DileZjMm.js → utils-BD597oo6.js} +1 -1
  165. package/dist/utils.js +3 -2
  166. package/package.json +3 -2
  167. package/dist/2W3RN7C5-bkX-rIa3.js +0 -61
  168. package/dist/4I4MLMKD-BLxAidnq.js +0 -43
  169. package/dist/GVVKDT6A-bET6V7Py.js +0 -724
  170. package/dist/SQZLCNLX-CHDXnZ16.js +0 -82
  171. package/dist/XCKGTAUF-DkxWCbaW.js +0 -25
  172. package/dist/index.css +0 -0
  173. package/dist/types/components/Icon/Icon.d.ts +0 -2
  174. package/dist/types/utils/theme/index.d.ts +0 -0
  175. /package/dist/{index-CdiHdiVB.js → index-PAaZGbyz.js} +0 -0
  176. /package/dist/types/components/Icon/{Icon.test.d.ts → index.test.d.ts} +0 -0
@@ -0,0 +1,619 @@
1
+ "use client";
2
+ import { a as Ye, c as He, b as Ie, d as We } from "./NI3IVY7K-Dy240mkD.js";
3
+ import { P as Me, b as Xe, a as Ce } from "./Y67KZUMI-BwLWwpNF.js";
4
+ import { e as Ue, c as pe, _ as ne, i as se, ag as Re, u as U, m as ce, k as le, d as $, a as x, f as me, b as ve, o as Fe, p as de, V as Se, aa as L, Y as Ge, v as Te, E as Ze, w as fe, q as Je, F as Ke, Z as Qe, M as et, A as Y, B as F, z as M, C as tt } from "./OE2EFRVA-Dg1R6gaC.js";
5
+ import { B as ot, N as rt, L as nt, A as st, O as it, g as ut, C as at, a as ct } from "./floating-ui.dom.browser.min-Bza9K_UR.js";
6
+ import { useRef as I, useState as he, useEffect as T, useContext as lt, createContext as dt, useCallback as $e } from "react";
7
+ import { jsx as re } from "react/jsx-runtime";
8
+ import { d as ft, m as pt, o as mt, t as vt, c as _e, a as oe, u as De } from "./RTNCFSKZ-BywELldk.js";
9
+ var G = Ue(
10
+ [Xe],
11
+ [Me]
12
+ );
13
+ G.useContext;
14
+ G.useScopedContext;
15
+ var Pe = G.useProviderContext, zt = G.ContextProvider, ht = G.ScopedContextProvider;
16
+ function ae(t) {
17
+ return [t.clientX, t.clientY];
18
+ }
19
+ function xe(t, r) {
20
+ const [o, e] = t;
21
+ let n = !1;
22
+ const s = r.length;
23
+ for (let u = s, c = 0, a = u - 1; c < u; a = c++) {
24
+ const [i, d] = r[c], [g, P] = r[a], [, S] = r[a === 0 ? u - 1 : a - 1] || [0, 0], h = (d - P) * (o - i) - (i - g) * (e - d);
25
+ if (P < d) {
26
+ if (e >= P && e < d) {
27
+ if (h === 0) return !0;
28
+ h > 0 && (e === P ? e > S && (n = !n) : n = !n);
29
+ }
30
+ } else if (d < P) {
31
+ if (e > d && e <= P) {
32
+ if (h === 0) return !0;
33
+ h < 0 && (e === P ? e < S && (n = !n) : n = !n);
34
+ }
35
+ } else if (e === d && (o >= g && o <= i || o >= i && o <= g))
36
+ return !0;
37
+ }
38
+ return n;
39
+ }
40
+ function Pt(t, r) {
41
+ const { top: o, right: e, bottom: n, left: s } = r, [u, c] = t, a = u < s ? "left" : u > e ? "right" : null, i = c < o ? "top" : c > n ? "bottom" : null;
42
+ return [a, i];
43
+ }
44
+ function ye(t, r) {
45
+ const o = t.getBoundingClientRect(), { top: e, right: n, bottom: s, left: u } = o, [c, a] = Pt(r, o), i = [r];
46
+ return c ? (a !== "top" && i.push([c === "left" ? u : n, e]), i.push([c === "left" ? n : u, e]), i.push([c === "left" ? n : u, s]), a !== "bottom" && i.push([c === "left" ? u : n, s])) : a === "top" ? (i.push([u, e]), i.push([u, s]), i.push([n, s]), i.push([n, e])) : (i.push([u, s]), i.push([u, e]), i.push([n, e]), i.push([n, s])), i;
47
+ }
48
+ var gt = "div";
49
+ function Oe(t = 0, r = 0, o = 0, e = 0) {
50
+ if (typeof DOMRect == "function")
51
+ return new DOMRect(t, r, o, e);
52
+ const n = {
53
+ x: t,
54
+ y: r,
55
+ width: o,
56
+ height: e,
57
+ top: r,
58
+ right: t + o,
59
+ bottom: r + e,
60
+ left: t
61
+ };
62
+ return $(x({}, n), { toJSON: () => n });
63
+ }
64
+ function wt(t) {
65
+ if (!t) return Oe();
66
+ const { x: r, y: o, width: e, height: n } = t;
67
+ return Oe(r, o, e, n);
68
+ }
69
+ function Et(t, r) {
70
+ return {
71
+ contextElement: t || void 0,
72
+ getBoundingClientRect: () => {
73
+ const e = t, n = r == null ? void 0 : r(e);
74
+ return n || !e ? wt(n) : e.getBoundingClientRect();
75
+ }
76
+ };
77
+ }
78
+ function St(t) {
79
+ return /^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(t);
80
+ }
81
+ function be(t) {
82
+ const r = window.devicePixelRatio || 1;
83
+ return Math.round(t * r) / r;
84
+ }
85
+ function xt(t, r) {
86
+ return nt(({ placement: o }) => {
87
+ var e;
88
+ const n = ((t == null ? void 0 : t.clientHeight) || 0) / 2, s = typeof r.gutter == "number" ? r.gutter + n : (e = r.gutter) != null ? e : n;
89
+ return {
90
+ crossAxis: !!o.split("-")[1] ? void 0 : r.shift,
91
+ mainAxis: s,
92
+ alignmentAxis: r.shift
93
+ };
94
+ });
95
+ }
96
+ function yt(t) {
97
+ if (t.flip === !1) return;
98
+ const r = typeof t.flip == "string" ? t.flip.split(" ") : void 0;
99
+ return se(
100
+ !r || r.every(St),
101
+ process.env.NODE_ENV !== "production" && "`flip` expects a spaced-delimited list of placements"
102
+ ), st({
103
+ padding: t.overflowPadding,
104
+ fallbackPlacements: r
105
+ });
106
+ }
107
+ function Ot(t) {
108
+ if (!(!t.slide && !t.overlap))
109
+ return it({
110
+ mainAxis: t.slide,
111
+ crossAxis: t.overlap,
112
+ padding: t.overflowPadding,
113
+ limiter: ct()
114
+ });
115
+ }
116
+ function bt(t) {
117
+ return at({
118
+ padding: t.overflowPadding,
119
+ apply({ elements: r, availableWidth: o, availableHeight: e, rects: n }) {
120
+ const s = r.floating, u = Math.round(n.reference.width);
121
+ o = Math.floor(o), e = Math.floor(e), s.style.setProperty(
122
+ "--popover-anchor-width",
123
+ `${u}px`
124
+ ), s.style.setProperty(
125
+ "--popover-available-width",
126
+ `${o}px`
127
+ ), s.style.setProperty(
128
+ "--popover-available-height",
129
+ `${e}px`
130
+ ), t.sameWidth && (s.style.width = `${u}px`), t.fitViewport && (s.style.maxWidth = `${o}px`, s.style.maxHeight = `${e}px`);
131
+ }
132
+ });
133
+ }
134
+ function At(t, r) {
135
+ if (t)
136
+ return ut({
137
+ element: t,
138
+ padding: r.arrowPadding
139
+ });
140
+ }
141
+ var Ne = pe(
142
+ function(r) {
143
+ var o = r, {
144
+ store: e,
145
+ modal: n = !1,
146
+ portal: s = !!n,
147
+ preserveTabOrder: u = !0,
148
+ autoFocusOnShow: c = !0,
149
+ wrapperProps: a,
150
+ fixed: i = !1,
151
+ flip: d = !0,
152
+ shift: g = 0,
153
+ slide: P = !0,
154
+ overlap: S = !1,
155
+ sameWidth: h = !1,
156
+ fitViewport: b = !1,
157
+ gutter: w,
158
+ arrowPadding: f = 4,
159
+ overflowPadding: E = 8,
160
+ getAnchorRect: N,
161
+ updatePosition: C
162
+ } = o, p = ne(o, [
163
+ "store",
164
+ "modal",
165
+ "portal",
166
+ "preserveTabOrder",
167
+ "autoFocusOnShow",
168
+ "wrapperProps",
169
+ "fixed",
170
+ "flip",
171
+ "shift",
172
+ "slide",
173
+ "overlap",
174
+ "sameWidth",
175
+ "fitViewport",
176
+ "gutter",
177
+ "arrowPadding",
178
+ "overflowPadding",
179
+ "getAnchorRect",
180
+ "updatePosition"
181
+ ]);
182
+ const V = Ce();
183
+ e = e || V, se(
184
+ e,
185
+ process.env.NODE_ENV !== "production" && "Popover must receive a `store` prop or be wrapped in a PopoverProvider component."
186
+ );
187
+ const _ = e.useState("arrowElement"), y = e.useState("anchorElement"), ie = e.useState("disclosureElement"), m = e.useState("popoverElement"), D = e.useState("contentElement"), Z = e.useState("placement"), l = e.useState("mounted"), O = e.useState("rendered"), v = I(null), [A, R] = he(!1), { portalRef: ue, domReady: k } = Re(s, p.portalRef), B = U(N), j = U(C), W = !!C;
188
+ ce(() => {
189
+ if (!(m != null && m.isConnected)) return;
190
+ m.style.setProperty(
191
+ "--popover-overflow-padding",
192
+ `${E}px`
193
+ );
194
+ const H = Et(y, B), X = async () => {
195
+ if (!l) return;
196
+ _ || (v.current = v.current || document.createElement("div"));
197
+ const q = _ || v.current, qe = [
198
+ xt(q, { gutter: w, shift: g }),
199
+ yt({ flip: d, overflowPadding: E }),
200
+ Ot({ slide: P, overlap: S, overflowPadding: E }),
201
+ At(q, { arrowPadding: f }),
202
+ bt({
203
+ sameWidth: h,
204
+ fitViewport: b,
205
+ overflowPadding: E
206
+ })
207
+ ], z = await rt(H, m, {
208
+ placement: Z,
209
+ strategy: i ? "fixed" : "absolute",
210
+ middleware: qe
211
+ });
212
+ e == null || e.setState("currentPlacement", z.placement), R(!0);
213
+ const ze = be(z.x), Le = be(z.y);
214
+ if (Object.assign(m.style, {
215
+ top: "0",
216
+ left: "0",
217
+ transform: `translate3d(${ze}px,${Le}px,0)`
218
+ }), q && z.middlewareData.arrow) {
219
+ const { x: K, y: Q } = z.middlewareData.arrow, ge = z.placement.split("-")[0], ee = q.clientWidth / 2, te = q.clientHeight / 2, we = K != null ? K + ee : -ee, Ee = Q != null ? Q + te : -te;
220
+ m.style.setProperty(
221
+ "--popover-transform-origin",
222
+ {
223
+ top: `${we}px calc(100% + ${te}px)`,
224
+ bottom: `${we}px ${-te}px`,
225
+ left: `calc(100% + ${ee}px) ${Ee}px`,
226
+ right: `${-ee}px ${Ee}px`
227
+ }[ge]
228
+ ), Object.assign(q.style, {
229
+ left: K != null ? `${K}px` : "",
230
+ top: Q != null ? `${Q}px` : "",
231
+ [ge]: "100%"
232
+ });
233
+ }
234
+ }, je = ot(H, m, async () => {
235
+ W ? (await j({ updatePosition: X }), R(!0)) : await X();
236
+ }, {
237
+ // JSDOM doesn't support ResizeObserver
238
+ elementResize: typeof ResizeObserver == "function"
239
+ });
240
+ return () => {
241
+ R(!1), je();
242
+ };
243
+ }, [
244
+ e,
245
+ O,
246
+ m,
247
+ _,
248
+ y,
249
+ m,
250
+ Z,
251
+ l,
252
+ k,
253
+ i,
254
+ d,
255
+ g,
256
+ P,
257
+ S,
258
+ h,
259
+ b,
260
+ w,
261
+ f,
262
+ E,
263
+ B,
264
+ W,
265
+ j
266
+ ]), ce(() => {
267
+ if (!l || !k || !(m != null && m.isConnected) || !(D != null && D.isConnected)) return;
268
+ const H = () => {
269
+ m.style.zIndex = getComputedStyle(D).zIndex;
270
+ };
271
+ H();
272
+ let X = requestAnimationFrame(() => {
273
+ X = requestAnimationFrame(H);
274
+ });
275
+ return () => cancelAnimationFrame(X);
276
+ }, [l, k, m, D]);
277
+ const J = i ? "fixed" : "absolute";
278
+ return p = le(
279
+ p,
280
+ (H) => /* @__PURE__ */ re(
281
+ "div",
282
+ $(x({}, a), {
283
+ style: x({
284
+ // https://floating-ui.com/docs/computeposition#initial-layout
285
+ position: J,
286
+ top: 0,
287
+ left: 0,
288
+ width: "max-content"
289
+ }, a == null ? void 0 : a.style),
290
+ ref: e == null ? void 0 : e.setPopoverElement,
291
+ children: H
292
+ })
293
+ ),
294
+ [e, J, a]
295
+ ), p = le(
296
+ p,
297
+ (H) => /* @__PURE__ */ re(Me, { value: e, children: H }),
298
+ [e]
299
+ ), p = $(x({
300
+ // data-placing is not part of the public API. We're setting this here so
301
+ // we can wait for the popover to be positioned before other components
302
+ // move focus into it. For example, this attribute is observed by the
303
+ // Combobox component with the autoSelect behavior.
304
+ "data-placing": !A || void 0
305
+ }, p), {
306
+ style: x({
307
+ position: "relative"
308
+ }, p.style)
309
+ }), p = Ye($(x({
310
+ store: e,
311
+ modal: n,
312
+ portal: s,
313
+ preserveTabOrder: u,
314
+ preserveTabOrderAnchor: ie || y,
315
+ autoFocusOnShow: A && c
316
+ }, p), {
317
+ portalRef: ue
318
+ })), p;
319
+ }
320
+ ), Lt = He(
321
+ me(function(r) {
322
+ const o = Ne(r);
323
+ return ve(gt, o);
324
+ }),
325
+ Ce
326
+ ), Ht = "div";
327
+ function Ve(t, r, o, e) {
328
+ return Je(r) ? !0 : t ? !!(fe(r, t) || o && fe(o, t) || e != null && e.some((n) => Ve(t, n, o))) : !1;
329
+ }
330
+ function Mt(t) {
331
+ var r = t, {
332
+ store: o
333
+ } = r, e = ne(r, [
334
+ "store"
335
+ ]);
336
+ const [n, s] = he(!1), u = o.useState("mounted");
337
+ T(() => {
338
+ u || s(!1);
339
+ }, [u]);
340
+ const c = e.onFocus, a = U((d) => {
341
+ c == null || c(d), !d.defaultPrevented && s(!0);
342
+ }), i = I(null);
343
+ return T(() => ft(o, ["anchorElement"], (d) => {
344
+ i.current = d.anchorElement;
345
+ }), []), e = $(x({
346
+ autoFocusOnHide: n,
347
+ finalFocus: i
348
+ }, e), {
349
+ onFocus: a
350
+ }), e;
351
+ }
352
+ var Ae = dt(null), Ct = pe(
353
+ function(r) {
354
+ var o = r, {
355
+ store: e,
356
+ modal: n = !1,
357
+ portal: s = !!n,
358
+ hideOnEscape: u = !0,
359
+ hideOnHoverOutside: c = !0,
360
+ disablePointerEventsOnApproach: a = !!c
361
+ } = o, i = ne(o, [
362
+ "store",
363
+ "modal",
364
+ "portal",
365
+ "hideOnEscape",
366
+ "hideOnHoverOutside",
367
+ "disablePointerEventsOnApproach"
368
+ ]);
369
+ const d = Pe();
370
+ e = e || d, se(
371
+ e,
372
+ process.env.NODE_ENV !== "production" && "Hovercard must receive a `store` prop or be wrapped in a HovercardProvider component."
373
+ );
374
+ const g = I(null), [P, S] = he([]), h = I(0), b = I(null), { portalRef: w, domReady: f } = Re(s, i.portalRef), E = Fe(), N = !!c, C = de(c), p = !!a, V = de(
375
+ a
376
+ ), _ = e.useState("open"), y = e.useState("mounted");
377
+ T(() => {
378
+ if (!f || !y || !N && !p) return;
379
+ const l = g.current;
380
+ return l ? Se(
381
+ L("mousemove", (v) => {
382
+ if (!e || !E()) return;
383
+ const { anchorElement: A, hideTimeout: R, timeout: ue } = e.getState(), k = b.current, [B] = v.composedPath(), j = A;
384
+ if (Ve(B, l, j, P)) {
385
+ b.current = B && j && fe(j, B) ? ae(v) : null, window.clearTimeout(h.current), h.current = 0;
386
+ return;
387
+ }
388
+ if (!h.current) {
389
+ if (k) {
390
+ const W = ae(v), J = ye(l, k);
391
+ if (xe(W, J)) {
392
+ if (b.current = W, !V(v)) return;
393
+ v.preventDefault(), v.stopPropagation();
394
+ return;
395
+ }
396
+ }
397
+ C(v) && (h.current = window.setTimeout(() => {
398
+ h.current = 0, e == null || e.hide();
399
+ }, R ?? ue));
400
+ }
401
+ }, !0),
402
+ () => clearTimeout(h.current)
403
+ ) : void 0;
404
+ }, [
405
+ e,
406
+ E,
407
+ f,
408
+ y,
409
+ N,
410
+ p,
411
+ P,
412
+ V,
413
+ C
414
+ ]), T(() => {
415
+ if (!f || !y || !p) return;
416
+ const l = (O) => {
417
+ const v = g.current;
418
+ if (!v) return;
419
+ const A = b.current;
420
+ if (!A) return;
421
+ const R = ye(v, A);
422
+ if (xe(ae(O), R)) {
423
+ if (!V(O)) return;
424
+ O.preventDefault(), O.stopPropagation();
425
+ }
426
+ };
427
+ return Se(
428
+ // Note: we may need to add pointer events here in the future.
429
+ L("mouseenter", l, !0),
430
+ L("mouseover", l, !0),
431
+ L("mouseout", l, !0),
432
+ L("mouseleave", l, !0)
433
+ );
434
+ }, [f, y, p, V]), T(() => {
435
+ f && (_ || e == null || e.setAutoFocusOnShow(!1));
436
+ }, [e, f, _]);
437
+ const ie = Ge(_);
438
+ T(() => {
439
+ if (f)
440
+ return () => {
441
+ ie.current || e == null || e.setAutoFocusOnShow(!1);
442
+ };
443
+ }, [e, f]);
444
+ const m = lt(Ae);
445
+ ce(() => {
446
+ if (n || !s || !y || !f) return;
447
+ const l = g.current;
448
+ if (l)
449
+ return m == null ? void 0 : m(l);
450
+ }, [n, s, y, f]);
451
+ const D = $e(
452
+ (l) => {
453
+ S((v) => [...v, l]);
454
+ const O = m == null ? void 0 : m(l);
455
+ return () => {
456
+ S(
457
+ (v) => v.filter((A) => A !== l)
458
+ ), O == null || O();
459
+ };
460
+ },
461
+ [m]
462
+ );
463
+ i = le(
464
+ i,
465
+ (l) => /* @__PURE__ */ re(ht, { value: e, children: /* @__PURE__ */ re(Ae.Provider, { value: D, children: l }) }),
466
+ [e, D]
467
+ ), i = $(x({}, i), {
468
+ ref: Te(g, i.ref)
469
+ }), i = Mt(x({ store: e }, i));
470
+ const Z = e.useState(
471
+ (l) => n || l.autoFocusOnShow
472
+ );
473
+ return i = Ne($(x({
474
+ store: e,
475
+ modal: n,
476
+ portal: s,
477
+ autoFocusOnShow: Z
478
+ }, i), {
479
+ portalRef: w,
480
+ hideOnEscape(l) {
481
+ return Ze(u, l) ? !1 : (requestAnimationFrame(() => {
482
+ requestAnimationFrame(() => {
483
+ e == null || e.hide();
484
+ });
485
+ }), !0);
486
+ }
487
+ })), i;
488
+ }
489
+ ), Yt = He(
490
+ me(function(r) {
491
+ const o = Ct(r);
492
+ return ve(Ht, o);
493
+ }),
494
+ Pe
495
+ ), Rt = "a", Ft = pe(
496
+ function(r) {
497
+ var o = r, { store: e, showOnHover: n = !0 } = o, s = ne(o, ["store", "showOnHover"]);
498
+ const u = Pe();
499
+ e = e || u, se(
500
+ e,
501
+ process.env.NODE_ENV !== "production" && "HovercardAnchor must receive a `store` prop or be wrapped in a HovercardProvider component."
502
+ );
503
+ const c = Ke(s), a = I(0);
504
+ T(() => () => window.clearTimeout(a.current), []), T(() => L("mouseleave", (f) => {
505
+ if (!e) return;
506
+ const { anchorElement: E } = e.getState();
507
+ E && f.target === E && (window.clearTimeout(a.current), a.current = 0);
508
+ }, !0), [e]);
509
+ const i = s.onMouseMove, d = de(n), g = Fe(), P = U((w) => {
510
+ if (i == null || i(w), c || !e || w.defaultPrevented || a.current || !g() || !d(w)) return;
511
+ const f = w.currentTarget;
512
+ e.setAnchorElement(f), e.setDisclosureElement(f);
513
+ const { showTimeout: E, timeout: N } = e.getState(), C = () => {
514
+ a.current = 0, g() && (e == null || e.setAnchorElement(f), e == null || e.show(), queueMicrotask(() => {
515
+ e == null || e.setDisclosureElement(f);
516
+ }));
517
+ }, p = E ?? N;
518
+ p === 0 ? C() : a.current = window.setTimeout(C, p);
519
+ }), S = s.onClick, h = U((w) => {
520
+ S == null || S(w), e && (window.clearTimeout(a.current), a.current = 0);
521
+ }), b = $e(
522
+ (w) => {
523
+ if (!e) return;
524
+ const { anchorElement: f } = e.getState();
525
+ f != null && f.isConnected || e.setAnchorElement(w);
526
+ },
527
+ [e]
528
+ );
529
+ return s = $(x({}, s), {
530
+ ref: Te(b, s.ref),
531
+ onMouseMove: P,
532
+ onClick: h
533
+ }), s = Qe(s), s;
534
+ }
535
+ ), It = me(function(r) {
536
+ const o = Ft(r);
537
+ return ve(Rt, o);
538
+ });
539
+ function ke(t = {}) {
540
+ var r = t, {
541
+ popover: o
542
+ } = r, e = et(r, [
543
+ "popover"
544
+ ]);
545
+ const n = pt(
546
+ e.store,
547
+ mt(o, [
548
+ "arrowElement",
549
+ "anchorElement",
550
+ "contentElement",
551
+ "popoverElement",
552
+ "disclosureElement"
553
+ ])
554
+ );
555
+ vt(e, n);
556
+ const s = n == null ? void 0 : n.getState(), u = Ie(Y(F({}, e), { store: n })), c = M(
557
+ e.placement,
558
+ s == null ? void 0 : s.placement,
559
+ "bottom"
560
+ ), a = Y(F({}, u.getState()), {
561
+ placement: c,
562
+ currentPlacement: c,
563
+ anchorElement: M(s == null ? void 0 : s.anchorElement, null),
564
+ popoverElement: M(s == null ? void 0 : s.popoverElement, null),
565
+ arrowElement: M(s == null ? void 0 : s.arrowElement, null),
566
+ rendered: Symbol("rendered")
567
+ }), i = _e(a, u, n);
568
+ return Y(F(F({}, u), i), {
569
+ setAnchorElement: (d) => i.setState("anchorElement", d),
570
+ setPopoverElement: (d) => i.setState("popoverElement", d),
571
+ setArrowElement: (d) => i.setState("arrowElement", d),
572
+ render: () => i.setState("rendered", Symbol("rendered"))
573
+ });
574
+ }
575
+ function Be(t, r, o) {
576
+ return tt(r, [o.popover]), oe(t, o, "placement"), We(t, r, o);
577
+ }
578
+ function Wt(t = {}) {
579
+ const [r, o] = De(ke, t);
580
+ return Be(r, o, t);
581
+ }
582
+ function Tt(t = {}) {
583
+ var r;
584
+ const o = (r = t.store) == null ? void 0 : r.getState(), e = ke(Y(F({}, t), {
585
+ placement: M(
586
+ t.placement,
587
+ o == null ? void 0 : o.placement,
588
+ "bottom"
589
+ )
590
+ })), n = M(t.timeout, o == null ? void 0 : o.timeout, 500), s = Y(F({}, e.getState()), {
591
+ timeout: n,
592
+ showTimeout: M(t.showTimeout, o == null ? void 0 : o.showTimeout),
593
+ hideTimeout: M(t.hideTimeout, o == null ? void 0 : o.hideTimeout),
594
+ autoFocusOnShow: M(o == null ? void 0 : o.autoFocusOnShow, !1)
595
+ }), u = _e(s, e, t.store);
596
+ return Y(F(F({}, e), u), {
597
+ setAutoFocusOnShow: (c) => u.setState("autoFocusOnShow", c)
598
+ });
599
+ }
600
+ function $t(t, r, o) {
601
+ return oe(t, o, "timeout"), oe(t, o, "showTimeout"), oe(t, o, "hideTimeout"), Be(t, r, o);
602
+ }
603
+ function Xt(t = {}) {
604
+ const [r, o] = De(Tt, t);
605
+ return $t(r, o, t);
606
+ }
607
+ export {
608
+ ht as H,
609
+ Lt as P,
610
+ zt as a,
611
+ Ft as b,
612
+ Tt as c,
613
+ $t as d,
614
+ It as e,
615
+ Yt as f,
616
+ Wt as g,
617
+ Xt as h,
618
+ Ct as u
619
+ };
package/dist/Hint.js CHANGED
@@ -1,16 +1,17 @@
1
1
  "use client";
2
+ import './Hint.css';
2
3
  import { jsx as s } from "react/jsx-runtime";
3
- import { forwardRef as e } from "react";
4
- import { Text as i } from "./Text.js";
5
- import { c } from "./index-CdiHdiVB.js";
6
- const _ = "_root_1ub92_2", m = {
7
- root: _,
4
+ import { forwardRef as i } from "react";
5
+ import { Text as e } from "./Text.js";
6
+ import { c } from "./index-PAaZGbyz.js";
7
+ const m = "_root_1ub92_2", _ = {
8
+ root: m,
8
9
  "variant-danger": "_variant-danger_1ub92_7",
9
10
  "variant-success": "_variant-success_1ub92_10",
10
11
  "variant-warning": "_variant-warning_1ub92_13"
11
- }, u = c(m), p = e(
12
+ }, u = c(_), d = i(
12
13
  ({ children: a, className: t, variant: r, ...o }, n) => /* @__PURE__ */ s(
13
- i,
14
+ e,
14
15
  {
15
16
  as: "span",
16
17
  className: u("root", r && `variant-${r}`, t),
@@ -22,6 +23,7 @@ const _ = "_root_1ub92_2", m = {
22
23
  }
23
24
  )
24
25
  );
26
+ d.displayName = "Hint";
25
27
  export {
26
- p as Hint
28
+ d as Hint
27
29
  };
package/dist/Icon.css CHANGED
@@ -1 +1 @@
1
- @layer components{._root_1er5i_2{width:var(--size);height:var(--size)}._size-xs_1er5i_7{--size: var(--size-icon-xs)}._size-sm_1er5i_10{--size: var(--size-icon-sm)}._size-md_1er5i_13{--size: var(--size-icon-md)}._size-lg_1er5i_16{--size: var(--size-icon-lg)}._size-xl_1er5i_19{--size: var(--size-icon-xl)}._size-xxl_1er5i_22{--size: var(--size-icon-xxl)}._size-2xl_1er5i_25{--size: var(--size-icon-xl)}._size-3xl_1er5i_28{--size: var(--size-icon-2xl)}}
1
+ @layer components{._root_576cf_2{width:var(--size);height:var(--size)}._size-xs_576cf_7{--size: var(--size-icon-xs)}._size-sm_576cf_10{--size: var(--size-icon-sm)}._size-md_576cf_13{--size: var(--size-icon-md)}._size-lg_576cf_16{--size: var(--size-icon-lg)}._size-xl_576cf_19{--size: var(--size-icon-xl)}._size-xxl_576cf_22{--size: var(--size-icon-xxl)}._size-2xl_576cf_25{--size: var(--size-icon-xl)}._size-3xl_576cf_28{--size: var(--size-icon-2xl)}._name-folder-full_576cf_31{--secondary-color: color-mix(in srgb, currentColor 75%, black 25%)}._name-folder-full_576cf_31.text-background-accent-green-primary{--secondary-color: var(--color-background-accent-green-stronger)}._name-folder-full_576cf_31.text-background-accent-teal-primary{--secondary-color: var(--color-background-accent-teal-stronger)}._name-folder-full_576cf_31.text-background-accent-blue-primary{--secondary-color: var(--color-background-accent-blue-stronger)}._name-folder-full_576cf_31.text-background-accent-violet-primary{--secondary-color: var(--color-background-accent-violet-stronger)}._name-folder-full_576cf_31.text-background-accent-pink-primary{--secondary-color: var(--color-background-accent-pink-stronger)}._name-folder-full_576cf_31.text-background-accent-orange-primary{--secondary-color: var(--color-background-accent-orange-stronger)}._name-folder-full_576cf_31.text-background-warm-stronger{--secondary-color: var(--color-beige-60)}._name-folder-full_576cf_31.text-background-accent-green-strong{--secondary-color: var(--color-background-accent-green-strongest)}._name-folder-full_576cf_31.text-background-accent-teal-strong{--secondary-color: var(--color-background-accent-teal-strongest)}._name-folder-full_576cf_31.text-background-accent-blue-strong{--secondary-color: var(--color-background-accent-blue-strongest)}._name-folder-full_576cf_31.text-background-accent-violet-strong{--secondary-color: var(--color-background-accent-violet-strongest)}._name-folder-full_576cf_31.text-background-accent-pink-strong{--secondary-color: var(--color-background-accent-pink-strongest)}._name-folder-full_576cf_31.text-background-accent-orange-strong{--secondary-color: var(--color-background-accent-orange-strongest)}._name-folder-full_576cf_31.text-beige-60{--secondary-color: var(--color-beige-80)}}