twenty-ui 2.52.0 → 2.53.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.
- package/dist/{AllIcons-fCCVOqoJ.js → AllIcons-B9FfQJ70.js} +1 -1
- package/dist/{Dropdown-D3LPyrQI.js → Dropdown-COpO_G9D.js} +51 -50
- package/dist/Dropdown-DaSktKdb.cjs +1 -0
- package/dist/{ListItem-g1B--M70.cjs → ListItem-Br5oDPc-.cjs} +1 -1
- package/dist/{ListItem-DR7Xh2WV.js → ListItem-txrdGXhb.js} +2 -2
- package/dist/{OverflowingTextWithTooltip-Cky5WlIk.js → OverflowingTextWithTooltip-CAQ-5aUp.js} +34 -33
- package/dist/OverflowingTextWithTooltip-CuWHF8_e.cjs +1 -0
- package/dist/{ProgressBar-BO0MkswY.js → ProgressBar-CPm791xc.js} +11 -11
- package/dist/Radio-BdbEXBOH.cjs +1 -0
- package/dist/Radio-D1PpZdqz.js +176 -0
- package/dist/TablerIcons-B6BhOlW_.js +463 -0
- package/dist/components/data-display.mjs +1 -1
- package/dist/components/feedback.cjs +1 -1
- package/dist/components/feedback.mjs +1 -1
- package/dist/components/input/FormFieldRow/FormFieldRow.d.ts +1 -1
- package/dist/components/input/FormFieldRow/types/FormFieldRowProps.d.ts +1 -0
- package/dist/components/input.cjs +1 -1
- package/dist/components/input.mjs +2 -2
- package/dist/components/layout.cjs +1 -1
- package/dist/components/layout.mjs +1 -1
- package/dist/components/navigation.cjs +1 -1
- package/dist/components/navigation.mjs +2 -2
- package/dist/components/settings.cjs +1 -1
- package/dist/components/settings.mjs +1 -1
- package/dist/components.cjs +1 -1
- package/dist/components.mjs +7 -7
- package/dist/{data-display-B7beM2yK.js → data-display-BhQyFKeZ.js} +1 -1
- package/dist/{data-display-C3Q_8G-N.cjs → data-display-CZEwUZlM.cjs} +1 -1
- package/dist/{data-display-CHKKTmH_.js → data-display-DVEhI2Rt.js} +89 -89
- package/dist/{feedback-DHATp8in.js → feedback-B3Qc_Igx.js} +65 -65
- package/dist/{feedback-3S9S-Xi9.cjs → feedback-BvCwRZad.cjs} +1 -1
- package/dist/icon/components/TablerIcons.d.ts +1 -1
- package/dist/icon/index.d.ts +1 -1
- package/dist/{icon-C3fz8p3W.js → icon-BlUO7C4w.js} +2 -2
- package/dist/icon.cjs +1 -1
- package/dist/icon.mjs +491 -490
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +639 -638
- package/dist/input-B8_4jnPT.cjs +1 -0
- package/dist/{input-jkwxjdtI.js → input-Btg-WsT6.js} +121 -120
- package/dist/{input-BLU0vrJM.js → input-BwQqV8Wf.js} +538 -536
- package/dist/input-CEiXoyRz.cjs +1 -0
- package/dist/{layout-4nLOjbJA.js → layout-4p7UQD7l.js} +29 -28
- package/dist/{layout-DEoY3Qd0.cjs → layout-DHW99Ejj.cjs} +1 -1
- package/dist/{navigation-CSSOuhFm.cjs → navigation-CP1g7ng9.cjs} +1 -1
- package/dist/{navigation-iP54gZTV.js → navigation-DQe6WaUF.js} +4 -4
- package/dist/primitives/data-display.cjs +1 -1
- package/dist/primitives/data-display.mjs +1 -1
- package/dist/primitives/feedback.mjs +1 -1
- package/dist/primitives/input.cjs +1 -1
- package/dist/primitives/input.mjs +4 -4
- package/dist/primitives/navigation.cjs +1 -1
- package/dist/primitives/navigation.mjs +1 -1
- package/dist/primitives/typography.cjs +1 -1
- package/dist/primitives/typography.mjs +2 -2
- package/dist/primitives.cjs +1 -1
- package/dist/primitives.mjs +7 -7
- package/dist/{settings-BmsLbd-g.js → settings-D3AWPKyH.js} +1 -1
- package/dist/{settings-DGwyi63i.cjs → settings-RYocb2Xg.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/{typography-sorTYmvG.js → typography-BisXuVpu.js} +1 -1
- package/dist/{typography-DeFnsH3k.cjs → typography-D7VnzZiR.cjs} +1 -1
- package/dist/utilities/internal/formatCssLength.d.ts +1 -0
- package/package.json +2 -2
- package/dist/Dropdown-h5-yIsU7.cjs +0 -1
- package/dist/OverflowingTextWithTooltip-Dmsmy-9g.cjs +0 -1
- package/dist/Radio-BK47Ig6J.cjs +0 -1
- package/dist/Radio-WuoC3hJ5.js +0 -175
- package/dist/TablerIcons-CqzhliLC.js +0 -462
- package/dist/input-BLUZOGq8.cjs +0 -1
- package/dist/input-DRIIJ4Zd.cjs +0 -1
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { t as S } from "./isDefined-fMi6eQ4r.js";
|
|
2
2
|
import { t as pe } from "./isRenderableSlot-DT_depzM.js";
|
|
3
|
-
import {
|
|
3
|
+
import { $a as xr, $s as Dr, Aa as Or, Bo as Ar, Dt as tt, Ec as $r, Lt as kt, Ot as Hr, kt as Mr, sc as Fr, uo as Vr, wc as Lr } from "./TablerIcons-B6BhOlW_.js";
|
|
4
4
|
import { t as P } from "./doNotTranslate-BSVT8Xyd.js";
|
|
5
|
-
import { l as zr, r as
|
|
5
|
+
import { l as zr, r as Rt } from "./theme-CuGIQBsJ.js";
|
|
6
6
|
import { t as ge } from "./mergeClassNames-ClFMR1v0.js";
|
|
7
7
|
import { t as be } from "./normalizeSearchText-DLmPiBUZ.js";
|
|
8
|
-
import { r as
|
|
9
|
-
import { r as Ur, t as rt } from "./OverflowingTextWithTooltip-
|
|
8
|
+
import { r as Nt, t as ae } from "./Button-Dd8cNsn1.js";
|
|
9
|
+
import { r as Ur, t as rt } from "./OverflowingTextWithTooltip-CAQ-5aUp.js";
|
|
10
10
|
import { t as Yr } from "./Separator-0LzwPfOn.js";
|
|
11
|
-
import { a as ct, n as
|
|
12
|
-
import { n as Fe, t as
|
|
13
|
-
import { a as
|
|
11
|
+
import { a as ct, n as Br, r as Wr, s as Ne, t as T } from "./Dropdown-COpO_G9D.js";
|
|
12
|
+
import { n as Fe, t as Tt } from "./Input-BKRR1xlO.js";
|
|
13
|
+
import { a as Q, i as ut, n as Gr, o as We, r as He, t as qr } from "./Radio-D1PpZdqz.js";
|
|
14
14
|
import { t as Kr } from "./Skeleton-BbIF780H.js";
|
|
15
15
|
import { useRender as Te } from "@base-ui/react/use-render";
|
|
16
|
-
import { isFunction as Ve, isNonEmptyArray as Pe, isNonEmptyString as L, isNull as
|
|
17
|
-
import { clsx as
|
|
18
|
-
import { Fragment as
|
|
19
|
-
import { Fragment as
|
|
16
|
+
import { isFunction as Ve, isNonEmptyArray as Pe, isNonEmptyString as L, isNull as Pt, isNumber as Jr, isString as Xr, isUndefined as Le } from "@sniptt/guards";
|
|
17
|
+
import { clsx as G } from "clsx";
|
|
18
|
+
import { Fragment as Zr, Suspense as Qr, createContext as Ye, createElement as en, forwardRef as xe, lazy as tn, memo as De, useCallback as z, useContext as ye, useDebugValue as rn, useDeferredValue as nn, useEffect as te, useId as oe, useImperativeHandle as Be, useLayoutEffect as an, useMemo as he, useRef as U, useState as K } from "react";
|
|
19
|
+
import { Fragment as Z, jsx as i, jsxs as I } from "react/jsx-runtime";
|
|
20
20
|
import { useMergedRefs as xt } from "@base-ui/utils/useMergedRefs";
|
|
21
21
|
import { useControlled as Dt } from "@base-ui/utils/useControlled";
|
|
22
|
-
import { useDirection as
|
|
22
|
+
import { useDirection as on } from "@base-ui/react/direction-provider";
|
|
23
23
|
import { useStableCallback as Ot } from "@base-ui/utils/useStableCallback";
|
|
24
|
-
import { useValueAsRef as
|
|
25
|
-
import { formatNumber as
|
|
26
|
-
import { RadioGroup as
|
|
27
|
-
var At = Ye(void 0),
|
|
24
|
+
import { useValueAsRef as ln } from "@base-ui/utils/useValueAsRef";
|
|
25
|
+
import { formatNumber as dt } from "@base-ui/utils/formatNumber";
|
|
26
|
+
import { RadioGroup as sn } from "@base-ui/react/radio-group";
|
|
27
|
+
var At = Ye(void 0), cn = "country:", $t = (e) => `${cn}${e}`, Ht = ({ countries: e, value: t, defaultValue: r = null, onValueChange: n, disabled: o = !1, noCountryLabel: a = P("No country"), children: s }) => {
|
|
28
28
|
const c = oe(), [l, u] = Dt({
|
|
29
29
|
controlled: t,
|
|
30
30
|
default: r,
|
|
@@ -32,23 +32,23 @@ var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries
|
|
|
32
32
|
state: "value"
|
|
33
33
|
}), h = he(() => e.map((m) => ({
|
|
34
34
|
...m,
|
|
35
|
-
selectionValue:
|
|
35
|
+
selectionValue: $t(m.value),
|
|
36
36
|
searchText: be(m.label)
|
|
37
37
|
})), [e]), d = he(() => new Map(h.map((m) => [m.value, m])), [h]), g = o || !Pe(h);
|
|
38
38
|
return /* @__PURE__ */ i(At.Provider, {
|
|
39
39
|
value: {
|
|
40
40
|
countries: h,
|
|
41
|
-
selectedCountry:
|
|
41
|
+
selectedCountry: Pt(l) ? void 0 : d.get(l),
|
|
42
42
|
value: l,
|
|
43
43
|
disabled: g,
|
|
44
44
|
noCountryLabel: a,
|
|
45
45
|
selectionGroupId: c,
|
|
46
|
-
changeValue: (m,
|
|
46
|
+
changeValue: (m, f) => {
|
|
47
47
|
if (g) {
|
|
48
|
-
|
|
48
|
+
f.cancel();
|
|
49
49
|
return;
|
|
50
50
|
}
|
|
51
|
-
n?.(m,
|
|
51
|
+
n?.(m, f), f.isCanceled || u(m);
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
54
|
children: s
|
|
@@ -62,11 +62,11 @@ var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries
|
|
|
62
62
|
t,
|
|
63
63
|
n
|
|
64
64
|
]), null;
|
|
65
|
-
},
|
|
66
|
-
root:
|
|
67
|
-
label:
|
|
68
|
-
flag:
|
|
69
|
-
},
|
|
65
|
+
}, un = "_root_1x3d7_1", dn = "_label_1x3d7_6", mn = "_flag_1x3d7_14", je = {
|
|
66
|
+
root: un,
|
|
67
|
+
label: dn,
|
|
68
|
+
flag: mn
|
|
69
|
+
}, hn = ({ ariaLabelledBy: e, ariaLabel: t, visibleLabelId: r }) => {
|
|
70
70
|
if (L(e)) return e;
|
|
71
71
|
if (!L(t))
|
|
72
72
|
return r;
|
|
@@ -74,36 +74,36 @@ var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries
|
|
|
74
74
|
const e = ye(At);
|
|
75
75
|
if (!S(e)) throw new Error(P("CountrySelect parts must be inside CountrySelect.Root"));
|
|
76
76
|
return e;
|
|
77
|
-
}, we = (e) => e.preventBaseUIHandler?.(), Ft = ({ label: e, wrapperProps: t, children: r, className: n, style: o, render: a, onClick: s, onMouseDown: c, onPointerDown: l, onKeyDown: u, onKeyUp: h, openOnHover: d, id: g, "aria-label": m, "aria-labelledby":
|
|
78
|
-
const { selectedCountry: w, disabled: p, noCountryLabel: j } = nt(), { open: k, setOpen: C } = Ne(),
|
|
79
|
-
ariaLabelledBy:
|
|
77
|
+
}, we = (e) => e.preventBaseUIHandler?.(), Ft = ({ label: e, wrapperProps: t, children: r, className: n, style: o, render: a, onClick: s, onMouseDown: c, onPointerDown: l, onKeyDown: u, onKeyUp: h, openOnHover: d, id: g, "aria-label": m, "aria-labelledby": f, "aria-describedby": b, ...y }) => {
|
|
78
|
+
const { selectedCountry: w, disabled: p, noCountryLabel: j } = nt(), { open: k, setOpen: C } = Ne(), v = oe(), E = g ?? v, _ = `${v}-label`, N = `${v}-value`, $ = L(e), M = L(m) ? m : void 0, O = hn({
|
|
79
|
+
ariaLabelledBy: f,
|
|
80
80
|
ariaLabel: M,
|
|
81
|
-
visibleLabelId:
|
|
82
|
-
}),
|
|
81
|
+
visibleLabelId: $ ? _ : void 0
|
|
82
|
+
}), H = [b, (S(O) || S(M)) && !S(r) ? N : void 0].filter(L), x = w?.label ?? j, R = S(w) ? w.flag : /* @__PURE__ */ i(kt, {}), A = (Y) => ({
|
|
83
83
|
...Y,
|
|
84
84
|
disabled: p
|
|
85
|
-
}), re = ge(
|
|
85
|
+
}), re = ge(G(Fe.input, Fe.md, We.trigger), n);
|
|
86
86
|
return /* @__PURE__ */ I("div", {
|
|
87
87
|
...t,
|
|
88
|
-
className:
|
|
88
|
+
className: G(je.root, t?.className),
|
|
89
89
|
children: [
|
|
90
90
|
/* @__PURE__ */ i(Mt, {
|
|
91
91
|
disabled: p,
|
|
92
92
|
open: k,
|
|
93
93
|
onOpenChange: C
|
|
94
94
|
}),
|
|
95
|
-
|
|
95
|
+
$ && /* @__PURE__ */ i("label", {
|
|
96
96
|
id: _,
|
|
97
97
|
className: je.label,
|
|
98
98
|
htmlFor: E,
|
|
99
99
|
children: e
|
|
100
100
|
}),
|
|
101
|
-
/* @__PURE__ */ i(
|
|
101
|
+
/* @__PURE__ */ i(T.Trigger, {
|
|
102
102
|
...y,
|
|
103
103
|
id: E,
|
|
104
104
|
"aria-label": M,
|
|
105
105
|
"aria-labelledby": O,
|
|
106
|
-
"aria-describedby": Pe(
|
|
106
|
+
"aria-describedby": Pe(H) ? H.join(" ") : void 0,
|
|
107
107
|
"aria-disabled": p || void 0,
|
|
108
108
|
openOnHover: p ? !1 : d,
|
|
109
109
|
"data-disabled": p ? "" : void 0,
|
|
@@ -114,20 +114,20 @@ var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries
|
|
|
114
114
|
onKeyUp: p ? we : h,
|
|
115
115
|
className: (Y) => re(A(Y)),
|
|
116
116
|
style: Ve(o) ? (Y) => o(A(Y)) : o,
|
|
117
|
-
render: Ve(a) ? (Y,
|
|
118
|
-
children: r ?? /* @__PURE__ */ I(
|
|
117
|
+
render: Ve(a) ? (Y, ve) => a(Y, A(ve)) : a,
|
|
118
|
+
children: r ?? /* @__PURE__ */ I(Z, { children: [
|
|
119
119
|
/* @__PURE__ */ i("span", {
|
|
120
120
|
className: je.flag,
|
|
121
121
|
"aria-hidden": "true",
|
|
122
122
|
children: R
|
|
123
123
|
}),
|
|
124
124
|
/* @__PURE__ */ i("span", {
|
|
125
|
-
className:
|
|
126
|
-
id:
|
|
125
|
+
className: We.value,
|
|
126
|
+
id: N,
|
|
127
127
|
children: /* @__PURE__ */ i(rt, { text: x })
|
|
128
128
|
}),
|
|
129
129
|
/* @__PURE__ */ i("span", {
|
|
130
|
-
className:
|
|
130
|
+
className: We.icon,
|
|
131
131
|
"aria-hidden": "true",
|
|
132
132
|
children: /* @__PURE__ */ i(tt, {})
|
|
133
133
|
})
|
|
@@ -135,80 +135,81 @@ var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries
|
|
|
135
135
|
})
|
|
136
136
|
]
|
|
137
137
|
});
|
|
138
|
-
},
|
|
139
|
-
const { countries: a, value: s, changeValue: c, disabled: l, noCountryLabel: u, selectionGroupId: h } = nt(), { titleId: d, triggerId: g } = Ne(), m = S(o["aria-label"]) || S(o["aria-labelledby"]) ? void 0 : d ?? g, [
|
|
138
|
+
}, gn = "no-country", vn = ({ searchLabel: e = P("Search"), noResultsLabel: t = P("No results"), searchProps: r, render: n, ...o }) => {
|
|
139
|
+
const { countries: a, value: s, changeValue: c, disabled: l, noCountryLabel: u, selectionGroupId: h } = nt(), { titleId: d, triggerId: g } = Ne(), m = S(o["aria-label"]) || S(o["aria-labelledby"]) ? void 0 : d ?? g, [f, b] = K(""), y = be(f.trim()), w = L(y), p = a.filter((v) => v.searchText.includes(y)), j = be(u).includes(y), k = j || Pe(p), C = j && /* @__PURE__ */ i(T.OptionItem, {
|
|
140
140
|
value: "no-country",
|
|
141
141
|
disabled: l,
|
|
142
142
|
startIcon: /* @__PURE__ */ i("span", {
|
|
143
143
|
className: je.flag,
|
|
144
144
|
"aria-hidden": "true",
|
|
145
|
-
children: /* @__PURE__ */ i(
|
|
145
|
+
children: /* @__PURE__ */ i(kt, {})
|
|
146
146
|
}),
|
|
147
147
|
children: u
|
|
148
148
|
});
|
|
149
|
-
return /* @__PURE__ */ I(
|
|
150
|
-
/* @__PURE__ */ i(
|
|
149
|
+
return /* @__PURE__ */ I(Z, { children: [
|
|
150
|
+
/* @__PURE__ */ i(T.Search, {
|
|
151
151
|
placeholder: e,
|
|
152
152
|
"aria-label": e,
|
|
153
153
|
...r,
|
|
154
|
-
value:
|
|
154
|
+
value: f,
|
|
155
155
|
onValueChange: b,
|
|
156
156
|
disabled: l || r?.disabled
|
|
157
157
|
}),
|
|
158
|
-
k && /* @__PURE__ */ i(
|
|
159
|
-
/* @__PURE__ */ I(
|
|
158
|
+
k && /* @__PURE__ */ i(T.Separator, {}),
|
|
159
|
+
/* @__PURE__ */ I(T.SelectionGroup, {
|
|
160
160
|
...o,
|
|
161
161
|
"aria-labelledby": o["aria-labelledby"] ?? m,
|
|
162
|
-
render: Ve(n) ? (
|
|
162
|
+
render: Ve(n) ? (v) => n(v, {
|
|
163
163
|
value: s,
|
|
164
164
|
multiple: !1
|
|
165
165
|
}) : n,
|
|
166
166
|
id: h,
|
|
167
|
-
value:
|
|
168
|
-
onValueChange: (
|
|
169
|
-
|
|
167
|
+
value: Pt(s) ? gn : $t(s),
|
|
168
|
+
onValueChange: (v, E) => {
|
|
169
|
+
const _ = a.find((N) => N.selectionValue === v);
|
|
170
|
+
c(_?.value ?? null, E);
|
|
170
171
|
},
|
|
171
|
-
children: [k && /* @__PURE__ */ I(
|
|
172
|
+
children: [k && /* @__PURE__ */ I(T.Section, {
|
|
172
173
|
scrollable: !0,
|
|
173
174
|
children: [
|
|
174
175
|
!w && C,
|
|
175
|
-
p.map((
|
|
176
|
-
value:
|
|
177
|
-
disabled: l ||
|
|
176
|
+
p.map((v) => /* @__PURE__ */ i(T.OptionItem, {
|
|
177
|
+
value: v.selectionValue,
|
|
178
|
+
disabled: l || v.disabled,
|
|
178
179
|
startIcon: /* @__PURE__ */ i("span", {
|
|
179
180
|
className: je.flag,
|
|
180
181
|
"aria-hidden": "true",
|
|
181
|
-
children:
|
|
182
|
+
children: v.flag
|
|
182
183
|
}),
|
|
183
|
-
children:
|
|
184
|
-
},
|
|
184
|
+
children: v.label
|
|
185
|
+
}, v.value)),
|
|
185
186
|
w && C
|
|
186
187
|
]
|
|
187
|
-
}), !k && /* @__PURE__ */ i(
|
|
188
|
+
}), !k && /* @__PURE__ */ i(T.Empty, { children: t })]
|
|
188
189
|
})
|
|
189
190
|
] });
|
|
190
191
|
}, Vt = (e) => {
|
|
191
192
|
const { open: t } = Ne(), [r, n] = K(t), [o, a] = K(0);
|
|
192
|
-
return r !== t && (n(t), t && a(o + 1)), /* @__PURE__ */
|
|
193
|
+
return r !== t && (n(t), t && a(o + 1)), /* @__PURE__ */ en(vn, {
|
|
193
194
|
...e,
|
|
194
195
|
key: o
|
|
195
196
|
});
|
|
196
197
|
}, fn = ({ open: e, defaultOpen: t = !1, onOpenChange: r, onEscapeKeyDown: n, onInteractOutside: o, defaultPage: a, popupProps: s, optionsProps: c, searchLabel: l, noResultsLabel: u, searchProps: h, closeOnSelect: d, ...g }) => {
|
|
197
|
-
const { disabled: m } = nt(), [
|
|
198
|
-
|
|
198
|
+
const { disabled: m } = nt(), [f, b] = K(t), y = e ?? f, w = !m && y, p = (v) => {
|
|
199
|
+
v && m || (b(v), r?.(v));
|
|
199
200
|
}, j = [g["aria-label"], g.label].find(L), k = S(s?.["aria-label"]) || S(s?.["aria-labelledby"]), C = S(c?.["aria-label"]) || S(c?.["aria-labelledby"]);
|
|
200
|
-
return /* @__PURE__ */ I(
|
|
201
|
+
return /* @__PURE__ */ I(Z, { children: [/* @__PURE__ */ i(Mt, {
|
|
201
202
|
disabled: m,
|
|
202
203
|
open: y,
|
|
203
204
|
onOpenChange: p
|
|
204
|
-
}), /* @__PURE__ */ I(
|
|
205
|
+
}), /* @__PURE__ */ I(T.Root, {
|
|
205
206
|
type: "picker",
|
|
206
207
|
open: w,
|
|
207
208
|
onOpenChange: p,
|
|
208
209
|
onEscapeKeyDown: n,
|
|
209
210
|
onInteractOutside: o,
|
|
210
211
|
defaultPage: a,
|
|
211
|
-
children: [/* @__PURE__ */ i(Ft, { ...g }), /* @__PURE__ */ i(
|
|
212
|
+
children: [/* @__PURE__ */ i(Ft, { ...g }), /* @__PURE__ */ i(T.Content, {
|
|
212
213
|
"aria-label": k ? void 0 : j,
|
|
213
214
|
"aria-labelledby": k ? void 0 : g["aria-labelledby"],
|
|
214
215
|
...s,
|
|
@@ -223,7 +224,7 @@ var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries
|
|
|
223
224
|
})
|
|
224
225
|
})]
|
|
225
226
|
})] });
|
|
226
|
-
},
|
|
227
|
+
}, pn = ({ countries: e, value: t, defaultValue: r, onValueChange: n, disabled: o, noCountryLabel: a, ...s }) => /* @__PURE__ */ i(Ht, {
|
|
227
228
|
countries: e,
|
|
228
229
|
value: t,
|
|
229
230
|
defaultValue: r,
|
|
@@ -231,68 +232,68 @@ var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries
|
|
|
231
232
|
disabled: o,
|
|
232
233
|
noCountryLabel: a,
|
|
233
234
|
children: /* @__PURE__ */ i(fn, { ...s })
|
|
234
|
-
}),
|
|
235
|
-
Root:
|
|
235
|
+
}), yi = Object.assign(pn, {
|
|
236
|
+
Root: Ht,
|
|
236
237
|
Trigger: Ft,
|
|
237
238
|
Options: Vt
|
|
238
|
-
}),
|
|
239
|
-
trigger:
|
|
240
|
-
chevron:
|
|
241
|
-
options:
|
|
242
|
-
emptyStatus:
|
|
239
|
+
}), bn = "_trigger_18tlx_1", yn = "_chevron_18tlx_40", wn = "_options_18tlx_45", _n = "_emptyStatus_18tlx_51", ze = {
|
|
240
|
+
trigger: bn,
|
|
241
|
+
chevron: yn,
|
|
242
|
+
options: wn,
|
|
243
|
+
emptyStatus: _n
|
|
243
244
|
}, Lt = Ye(void 0), zt = () => {
|
|
244
245
|
const e = ye(Lt);
|
|
245
246
|
if (!S(e)) throw new Error(P("CurrencyPicker parts must be inside CurrencyPicker.Root"));
|
|
246
247
|
return e;
|
|
247
248
|
}, Ut = ({ disabled: e = !1, searchable: t = !0, searchLabel: r = P("Search"), listLabel: n, emptyLabel: o = P("No results"), searchProps: a, className: s, render: c, ref: l, ...u }) => {
|
|
248
|
-
const { state: h, groupId: d, options: g, selectionProps: m } = zt(), { titleId:
|
|
249
|
+
const { state: h, groupId: d, options: g, selectionProps: m } = zt(), { titleId: f, triggerId: b } = Ne(), { value: y, defaultValue: w = "", onValueChange: p, ...j } = a ?? {}, [k, C] = K(w), v = y ?? k, E = t ? String(v).trim().toLowerCase() : "", _ = g.filter(({ searchText: O }) => O.includes(E)), N = Pe(_), $ = h.disabled || e, M = S(n) ? void 0 : f ?? b;
|
|
249
250
|
return Te({
|
|
250
251
|
render: c,
|
|
251
252
|
ref: l,
|
|
252
253
|
props: {
|
|
253
254
|
...u,
|
|
254
|
-
className:
|
|
255
|
-
children: /* @__PURE__ */ I(
|
|
256
|
-
t && /* @__PURE__ */ I(
|
|
255
|
+
className: G(ze.options, s),
|
|
256
|
+
children: /* @__PURE__ */ I(Z, { children: [
|
|
257
|
+
t && /* @__PURE__ */ I(Z, { children: [/* @__PURE__ */ i(T.Search, {
|
|
257
258
|
placeholder: r,
|
|
258
259
|
"aria-label": r,
|
|
259
260
|
...j,
|
|
260
|
-
value:
|
|
261
|
+
value: v,
|
|
261
262
|
onValueChange: (O) => {
|
|
262
263
|
p?.(O), Le(y) && C(O);
|
|
263
264
|
},
|
|
264
|
-
disabled:
|
|
265
|
-
}), /* @__PURE__ */ i(
|
|
266
|
-
/* @__PURE__ */ i(
|
|
265
|
+
disabled: $ || a?.disabled
|
|
266
|
+
}), /* @__PURE__ */ i(T.Separator, {})] }),
|
|
267
|
+
/* @__PURE__ */ i(T.SelectionGroup, {
|
|
267
268
|
...m,
|
|
268
269
|
id: d,
|
|
269
270
|
"aria-label": n,
|
|
270
271
|
"aria-labelledby": M,
|
|
271
|
-
children:
|
|
272
|
+
children: N && /* @__PURE__ */ i(T.Section, {
|
|
272
273
|
scrollable: !0,
|
|
273
|
-
children: _.map(({ currency: O, label:
|
|
274
|
+
children: _.map(({ currency: O, label: H }) => /* @__PURE__ */ i(T.OptionItem, {
|
|
274
275
|
value: O.code,
|
|
275
|
-
disabled:
|
|
276
|
-
children:
|
|
276
|
+
disabled: $ || O.disabled,
|
|
277
|
+
children: Xr(H) ? /* @__PURE__ */ i(rt, { text: H }) : H
|
|
277
278
|
}, O.code))
|
|
278
279
|
})
|
|
279
280
|
}),
|
|
280
|
-
/* @__PURE__ */ i(
|
|
281
|
+
/* @__PURE__ */ i(T.Empty, {
|
|
281
282
|
className: ze.emptyStatus,
|
|
282
|
-
children:
|
|
283
|
+
children: N ? null : o
|
|
283
284
|
})
|
|
284
285
|
] })
|
|
285
286
|
}
|
|
286
287
|
});
|
|
287
|
-
}, Yt = ({ code: e, name: t }) => `${t} (${e})`,
|
|
288
|
-
const d = oe(), { selections: g, initializeSelection: m } = Ne(),
|
|
288
|
+
}, Yt = ({ code: e, name: t }) => `${t} (${e})`, Cn = (e) => `${Yt(e)} ${e.symbol ?? ""}`, Bt = ({ currencies: e, value: t, defaultValue: r = null, onValueChange: n, closeOnSelect: o, disabled: a = !1, selectedFirst: s = !1, getOptionLabel: c = Yt, getSearchText: l = Cn, renderValue: u, children: h }) => {
|
|
289
|
+
const d = oe(), { selections: g, initializeSelection: m } = Ne(), f = {
|
|
289
290
|
value: t,
|
|
290
291
|
defaultValue: r,
|
|
291
292
|
onValueChange: n,
|
|
292
293
|
closeOnSelect: o
|
|
293
|
-
}, b =
|
|
294
|
+
}, b = Br({
|
|
294
295
|
props: {
|
|
295
|
-
...
|
|
296
|
+
...f,
|
|
296
297
|
id: d
|
|
297
298
|
},
|
|
298
299
|
storedState: g.get(d)
|
|
@@ -310,18 +311,18 @@ var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries
|
|
|
310
311
|
state: k,
|
|
311
312
|
groupId: d,
|
|
312
313
|
options: j,
|
|
313
|
-
selectionProps:
|
|
314
|
+
selectionProps: f,
|
|
314
315
|
renderValue: u
|
|
315
316
|
},
|
|
316
|
-
children: [Le(t) && /* @__PURE__ */ i(
|
|
317
|
+
children: [Le(t) && /* @__PURE__ */ i(Wr, {
|
|
317
318
|
id: d,
|
|
318
319
|
initialState: b,
|
|
319
320
|
initializeSelection: m
|
|
320
321
|
}), Ve(h) ? h(k) : h]
|
|
321
322
|
});
|
|
322
|
-
},
|
|
323
|
+
}, Wt = ({ children: e, placeholder: t, disabled: r = !1, className: n, ...o }) => {
|
|
323
324
|
const { state: a, renderValue: s } = zt(), c = S(a.value) ? a.value : t;
|
|
324
|
-
return /* @__PURE__ */ I(
|
|
325
|
+
return /* @__PURE__ */ I(T.Trigger, {
|
|
325
326
|
...o,
|
|
326
327
|
disabled: a.disabled || r,
|
|
327
328
|
className: ge(ze.trigger, n),
|
|
@@ -330,14 +331,14 @@ var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries
|
|
|
330
331
|
className: ze.chevron
|
|
331
332
|
})]
|
|
332
333
|
});
|
|
333
|
-
},
|
|
334
|
+
}, En = ({ currencies: e, value: t, defaultValue: r, onValueChange: n, closeOnSelect: o, disabled: a, selectedFirst: s, getOptionLabel: c, getSearchText: l, renderValue: u, open: h, defaultOpen: d, onOpenChange: g, onEscapeKeyDown: m, onInteractOutside: f, triggerProps: b, contentProps: y, optionsProps: w, ...p }) => /* @__PURE__ */ i(T.Root, {
|
|
334
335
|
type: "picker",
|
|
335
336
|
open: h,
|
|
336
337
|
defaultOpen: d,
|
|
337
338
|
onOpenChange: g,
|
|
338
339
|
onEscapeKeyDown: m,
|
|
339
|
-
onInteractOutside:
|
|
340
|
-
children: /* @__PURE__ */ I(
|
|
340
|
+
onInteractOutside: f,
|
|
341
|
+
children: /* @__PURE__ */ I(Bt, {
|
|
341
342
|
currencies: e,
|
|
342
343
|
value: t,
|
|
343
344
|
defaultValue: r,
|
|
@@ -348,38 +349,38 @@ var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries
|
|
|
348
349
|
getOptionLabel: c,
|
|
349
350
|
getSearchText: l,
|
|
350
351
|
renderValue: u,
|
|
351
|
-
children: [/* @__PURE__ */ i(
|
|
352
|
+
children: [/* @__PURE__ */ i(Wt, {
|
|
352
353
|
...p,
|
|
353
354
|
...b
|
|
354
|
-
}), /* @__PURE__ */ i(
|
|
355
|
+
}), /* @__PURE__ */ i(T.Content, {
|
|
355
356
|
...y,
|
|
356
357
|
children: /* @__PURE__ */ i(Ut, { ...w })
|
|
357
358
|
})]
|
|
358
359
|
})
|
|
359
|
-
}),
|
|
360
|
-
Root:
|
|
361
|
-
Trigger:
|
|
360
|
+
}), wi = Object.assign(En, {
|
|
361
|
+
Root: Bt,
|
|
362
|
+
Trigger: Wt,
|
|
362
363
|
Options: Ut
|
|
363
|
-
}),
|
|
364
|
-
calendar:
|
|
365
|
-
header:
|
|
366
|
-
monthSelect:
|
|
367
|
-
yearSelect:
|
|
368
|
-
navigation:
|
|
369
|
-
chevron:
|
|
364
|
+
}), Sn = "_calendar_s1e8i_1", In = "_header_s1e8i_9", jn = "_monthSelect_s1e8i_18", kn = "_yearSelect_s1e8i_23", Rn = "_navigation_s1e8i_28", Nn = "_chevron_s1e8i_33", se = {
|
|
365
|
+
calendar: Sn,
|
|
366
|
+
header: In,
|
|
367
|
+
monthSelect: jn,
|
|
368
|
+
yearSelect: kn,
|
|
369
|
+
navigation: Rn,
|
|
370
|
+
chevron: Nn
|
|
370
371
|
}, ke = {
|
|
371
372
|
MIN_YEAR: 1,
|
|
372
373
|
MAX_YEAR: 9999,
|
|
373
374
|
DAYS_PER_WEEK: 7,
|
|
374
375
|
MONTHS_PER_YEAR: 12
|
|
375
|
-
},
|
|
376
|
+
}, Tn = ({ isOpenRef: e, onOpenChange: t }) => {
|
|
376
377
|
const r = Ot(t);
|
|
377
378
|
return te(() => () => {
|
|
378
379
|
e.current && (e.current = !1, r(!1));
|
|
379
380
|
}, [e, r]), null;
|
|
380
|
-
},
|
|
381
|
+
}, mt = ({ value: e, items: t, onValueChange: r, label: n, disabled: o, portalContainer: a, onOpenChange: s }) => {
|
|
381
382
|
const c = U(!1);
|
|
382
|
-
return /* @__PURE__ */ I(
|
|
383
|
+
return /* @__PURE__ */ I(Q.Root, {
|
|
383
384
|
value: e,
|
|
384
385
|
items: t,
|
|
385
386
|
disabled: o,
|
|
@@ -390,25 +391,25 @@ var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries
|
|
|
390
391
|
!l && c.current && (c.current = !1, s?.(!1));
|
|
391
392
|
},
|
|
392
393
|
onValueChange: (l) => {
|
|
393
|
-
|
|
394
|
+
Jr(l) && r(l);
|
|
394
395
|
},
|
|
395
396
|
children: [
|
|
396
|
-
/* @__PURE__ */ i(
|
|
397
|
+
/* @__PURE__ */ i(Tn, {
|
|
397
398
|
isOpenRef: c,
|
|
398
399
|
onOpenChange: s
|
|
399
400
|
}),
|
|
400
|
-
/* @__PURE__ */ I(
|
|
401
|
+
/* @__PURE__ */ I(Q.Trigger, {
|
|
401
402
|
"aria-label": n,
|
|
402
|
-
children: [/* @__PURE__ */ i(
|
|
403
|
+
children: [/* @__PURE__ */ i(Q.Value, {}), /* @__PURE__ */ i(Q.Icon, {})]
|
|
403
404
|
}),
|
|
404
|
-
/* @__PURE__ */ i(
|
|
405
|
+
/* @__PURE__ */ i(Q.Portal, {
|
|
405
406
|
container: a,
|
|
406
|
-
children: /* @__PURE__ */ i(
|
|
407
|
+
children: /* @__PURE__ */ i(Q.Positioner, {
|
|
407
408
|
sideOffset: zr.spacingMultiplicator,
|
|
408
409
|
alignItemWithTrigger: !1,
|
|
409
|
-
children: /* @__PURE__ */ i(
|
|
410
|
+
children: /* @__PURE__ */ i(Q.Popup, { children: t.map(({ value: l, label: u }) => /* @__PURE__ */ I(Q.Item, {
|
|
410
411
|
value: l,
|
|
411
|
-
children: [/* @__PURE__ */ i(
|
|
412
|
+
children: [/* @__PURE__ */ i(Q.ItemText, { children: u }), /* @__PURE__ */ i(Q.ItemIndicator, {})]
|
|
412
413
|
}, l)) })
|
|
413
414
|
})
|
|
414
415
|
})
|
|
@@ -418,27 +419,27 @@ var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries
|
|
|
418
419
|
constructor({ message: e }) {
|
|
419
420
|
super(e), this.name = P("DatePickerException");
|
|
420
421
|
}
|
|
421
|
-
},
|
|
422
|
-
const t = e.match(
|
|
423
|
-
if (!S(t) || e.length !==
|
|
422
|
+
}, Pn = /^(\d{4})-(\d{2})-(\d{2})$/, xn = 10, Ue = (e) => {
|
|
423
|
+
const t = e.match(Pn);
|
|
424
|
+
if (!S(t) || e.length !== xn) throw new Xe({ message: P("Calendar dates must use the YYYY-MM-DD format.") });
|
|
424
425
|
const [, r, n, o] = t, a = Number(r), s = Number(n), c = Number(o), l = /* @__PURE__ */ new Date(0);
|
|
425
426
|
if (l.setUTCFullYear(a, s - 1, c), !(a >= ke.MIN_YEAR && a <= ke.MAX_YEAR && l.getUTCFullYear() === a && l.getUTCMonth() === s - 1 && l.getUTCDate() === c)) throw new Xe({ message: P("Calendar dates must be valid dates in years 0001 through 9999.") });
|
|
426
427
|
return l;
|
|
427
|
-
},
|
|
428
|
+
}, ht = 100, Dn = ({ viewedMonth: e, onPreviousMonth: t, onNextMonth: r, onMonthChange: n, onYearChange: o, isPreviousMonthDisabled: a, isNextMonthDisabled: s, locale: c, previousMonthLabel: l, nextMonthLabel: u, monthLabel: h, yearLabel: d, portalContainer: g, onNavigationOpenChange: m, disabled: f }) => {
|
|
428
429
|
const b = Ue(`${e}-01`), y = b.getUTCFullYear(), w = b.getUTCMonth() + 1, p = new Intl.DateTimeFormat(c, {
|
|
429
430
|
month: "long",
|
|
430
431
|
calendar: "gregory",
|
|
431
432
|
timeZone: P("UTC")
|
|
432
433
|
}), j = new Intl.NumberFormat(c, { useGrouping: !1 }), k = [];
|
|
433
434
|
for (let _ = 1; _ <= ke.MONTHS_PER_YEAR; _++) {
|
|
434
|
-
const
|
|
435
|
-
|
|
435
|
+
const N = new Date(b);
|
|
436
|
+
N.setUTCMonth(_ - 1), k.push({
|
|
436
437
|
value: _,
|
|
437
|
-
label: p.format(
|
|
438
|
+
label: p.format(N)
|
|
438
439
|
});
|
|
439
440
|
}
|
|
440
|
-
const C = [],
|
|
441
|
-
for (let _ =
|
|
441
|
+
const C = [], v = Math.max(ke.MIN_YEAR, y - ht), E = Math.min(ke.MAX_YEAR, y + ht);
|
|
442
|
+
for (let _ = v; _ <= E; _++) C.push({
|
|
442
443
|
value: _,
|
|
443
444
|
label: j.format(_)
|
|
444
445
|
});
|
|
@@ -447,10 +448,10 @@ var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries
|
|
|
447
448
|
children: [
|
|
448
449
|
/* @__PURE__ */ i("div", {
|
|
449
450
|
className: se.monthSelect,
|
|
450
|
-
children: /* @__PURE__ */ i(
|
|
451
|
+
children: /* @__PURE__ */ i(mt, {
|
|
451
452
|
value: w,
|
|
452
453
|
items: k,
|
|
453
|
-
disabled:
|
|
454
|
+
disabled: f,
|
|
454
455
|
label: h,
|
|
455
456
|
portalContainer: g,
|
|
456
457
|
onOpenChange: (_) => m?.({
|
|
@@ -462,10 +463,10 @@ var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries
|
|
|
462
463
|
}),
|
|
463
464
|
/* @__PURE__ */ i("div", {
|
|
464
465
|
className: se.yearSelect,
|
|
465
|
-
children: /* @__PURE__ */ i(
|
|
466
|
+
children: /* @__PURE__ */ i(mt, {
|
|
466
467
|
value: y,
|
|
467
468
|
items: C,
|
|
468
|
-
disabled:
|
|
469
|
+
disabled: f,
|
|
469
470
|
label: d,
|
|
470
471
|
portalContainer: g,
|
|
471
472
|
onOpenChange: (_) => m?.({
|
|
@@ -479,13 +480,13 @@ var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries
|
|
|
479
480
|
className: se.navigation,
|
|
480
481
|
children: [/* @__PURE__ */ i(ct, {
|
|
481
482
|
size: "md",
|
|
482
|
-
disabled:
|
|
483
|
+
disabled: f || a,
|
|
483
484
|
"aria-label": l,
|
|
484
485
|
onClick: t,
|
|
485
|
-
children: /* @__PURE__ */ i(
|
|
486
|
+
children: /* @__PURE__ */ i(Hr, { className: se.chevron })
|
|
486
487
|
}), /* @__PURE__ */ i(ct, {
|
|
487
488
|
size: "md",
|
|
488
|
-
disabled:
|
|
489
|
+
disabled: f || s,
|
|
489
490
|
"aria-label": u,
|
|
490
491
|
onClick: r,
|
|
491
492
|
children: /* @__PURE__ */ i(Mr, { className: se.chevron })
|
|
@@ -496,7 +497,7 @@ var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries
|
|
|
496
497
|
}, ce = (e) => {
|
|
497
498
|
const t = Ue(e), r = /* @__PURE__ */ new Date(0);
|
|
498
499
|
return r.setFullYear(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate()), r.setHours(0, 0, 0, 0), r;
|
|
499
|
-
},
|
|
500
|
+
}, On = ({ calendarRef: e, engineViewedMonthRef: t, viewedMonth: r }) => (te(() => {
|
|
500
501
|
t.current !== r && (e.current?.setPreSelection(ce(`${r}-01`)), t.current = r);
|
|
501
502
|
}, [
|
|
502
503
|
e,
|
|
@@ -506,17 +507,17 @@ var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries
|
|
|
506
507
|
e.getFullYear().toString().padStart(4, "0"),
|
|
507
508
|
(e.getMonth() + 1).toString().padStart(2, "0"),
|
|
508
509
|
e.getDate().toString().padStart(2, "0")
|
|
509
|
-
].join("-"),
|
|
510
|
+
].join("-"), gt = tn(async () => {
|
|
510
511
|
const e = (await import("react-datepicker")).default;
|
|
511
512
|
return { default: "default" in e ? e.default : e };
|
|
512
|
-
}),
|
|
513
|
+
}), An = ({ start: e, end: t }) => {
|
|
513
514
|
if (Ue(e), Ue(t), e > t) throw new Xe({ message: P("Calendar highlighted ranges must end on or after their start date.") });
|
|
514
|
-
},
|
|
515
|
-
const M = U(null), O = U(null),
|
|
516
|
-
S(a) &&
|
|
515
|
+
}, $n = 300, _i = ({ value: e, onValueChange: t, onValueSelect: r, viewedMonth: n, onViewedMonthChange: o, highlightedRange: a, readOnly: s = !1, isGridHidden: c = !1, weekStart: l, locale: u, weekdayLabels: h, previousMonthLabel: d, nextMonthLabel: g, monthLabel: m, yearLabel: f, portalContainer: b, onNavigationOpenChange: y, isDateUnavailable: w, disabled: p = !1, isKeyboardNavigationDisabled: j = !1, renderHeader: k, loadingFallback: C, dir: v, render: E, ref: _, className: N, ...$ }) => {
|
|
516
|
+
const M = U(null), O = U(null), H = U(e?.slice(0, 7) ?? n), x = on(), R = v === "rtl" || v === "ltr" ? v : x;
|
|
517
|
+
S(a) && An(a);
|
|
517
518
|
const A = (D) => {
|
|
518
|
-
const
|
|
519
|
-
|
|
519
|
+
const W = _e(D).slice(0, 7);
|
|
520
|
+
H.current = W, W !== n && o(W);
|
|
520
521
|
}, re = (D) => {
|
|
521
522
|
s || p || !S(D) || t(_e(D));
|
|
522
523
|
}, Y = {
|
|
@@ -536,50 +537,50 @@ var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries
|
|
|
536
537
|
filterDate: (D) => !w?.(_e(D)),
|
|
537
538
|
onSelect: (D) => {
|
|
538
539
|
if (s || p || !S(D)) return;
|
|
539
|
-
const
|
|
540
|
-
S(a) &&
|
|
540
|
+
const W = _e(D);
|
|
541
|
+
S(a) && W !== e && t(W), r?.(W);
|
|
541
542
|
},
|
|
542
543
|
renderCustomDayName: S(h) ? ({ day: D }) => /* @__PURE__ */ i("span", {
|
|
543
544
|
title: new Intl.DateTimeFormat(u, { weekday: "long" }).format(D),
|
|
544
545
|
children: h[D.getDay()]
|
|
545
546
|
}) : void 0,
|
|
546
|
-
renderCustomHeader: ({ monthDate: D, decreaseMonth:
|
|
547
|
+
renderCustomHeader: ({ monthDate: D, decreaseMonth: W, increaseMonth: Oe, changeMonth: Rr, changeYear: Nr, prevMonthButtonDisabled: Tr, nextMonthButtonDisabled: Pr }) => {
|
|
547
548
|
const st = {
|
|
548
549
|
viewedMonth: _e(D).slice(0, 7),
|
|
549
|
-
onPreviousMonth:
|
|
550
|
+
onPreviousMonth: W,
|
|
550
551
|
onNextMonth: Oe,
|
|
551
552
|
onMonthChange: (Ae) => Rr(Ae - 1),
|
|
552
553
|
onYearChange: (Ae) => {
|
|
553
|
-
const
|
|
554
|
-
if (
|
|
554
|
+
const $e = new Date(D);
|
|
555
|
+
if ($e.setFullYear(Ae), $e.getMonth() === D.getMonth()) {
|
|
555
556
|
Nr(Ae);
|
|
556
557
|
return;
|
|
557
558
|
}
|
|
558
|
-
|
|
559
|
+
$e.setDate(0), M.current?.setPreSelection($e);
|
|
559
560
|
},
|
|
560
561
|
isPreviousMonthDisabled: p || Tr,
|
|
561
562
|
isNextMonthDisabled: p || Pr
|
|
562
563
|
};
|
|
563
|
-
return S(k) ? /* @__PURE__ */ i(
|
|
564
|
+
return S(k) ? /* @__PURE__ */ i(Z, { children: k(st) }) : /* @__PURE__ */ i(Dn, {
|
|
564
565
|
...st,
|
|
565
566
|
locale: u,
|
|
566
567
|
previousMonthLabel: d,
|
|
567
568
|
nextMonthLabel: g,
|
|
568
569
|
monthLabel: m,
|
|
569
|
-
yearLabel:
|
|
570
|
+
yearLabel: f,
|
|
570
571
|
portalContainer: b,
|
|
571
572
|
onNavigationOpenChange: y,
|
|
572
573
|
disabled: p
|
|
573
574
|
});
|
|
574
575
|
}
|
|
575
|
-
},
|
|
576
|
+
}, ve = () => S(a) ? /* @__PURE__ */ i(gt, {
|
|
576
577
|
...Y,
|
|
577
578
|
selectsRange: !0,
|
|
578
579
|
startDate: ce(a.start),
|
|
579
580
|
endDate: ce(a.end),
|
|
580
581
|
onChange: () => {
|
|
581
582
|
}
|
|
582
|
-
}) : /* @__PURE__ */ i(
|
|
583
|
+
}) : /* @__PURE__ */ i(gt, {
|
|
583
584
|
...Y,
|
|
584
585
|
selected: S(e) ? ce(e) : null,
|
|
585
586
|
onChange: re
|
|
@@ -589,31 +590,31 @@ var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries
|
|
|
589
590
|
ref: _,
|
|
590
591
|
props: {
|
|
591
592
|
role: "group",
|
|
592
|
-
|
|
593
|
+
...$,
|
|
593
594
|
dir: R,
|
|
594
595
|
onMouseDownCapture: (D) => {
|
|
595
|
-
|
|
596
|
+
$.onMouseDownCapture?.(D), O.current = D.nativeEvent;
|
|
596
597
|
},
|
|
597
|
-
className:
|
|
598
|
+
className: G(se.calendar, N),
|
|
598
599
|
"data-readonly": s || void 0,
|
|
599
600
|
"data-hide-grid": c || void 0,
|
|
600
601
|
children: /* @__PURE__ */ I(Qr, {
|
|
601
|
-
fallback: C ?? /* @__PURE__ */ i(Kr, { height:
|
|
602
|
-
children: [/* @__PURE__ */ i(
|
|
602
|
+
fallback: C ?? /* @__PURE__ */ i(Kr, { height: $n }),
|
|
603
|
+
children: [/* @__PURE__ */ i(On, {
|
|
603
604
|
calendarRef: M,
|
|
604
|
-
engineViewedMonthRef:
|
|
605
|
+
engineViewedMonthRef: H,
|
|
605
606
|
viewedMonth: n
|
|
606
|
-
}),
|
|
607
|
+
}), ve()]
|
|
607
608
|
})
|
|
608
609
|
}
|
|
609
610
|
});
|
|
610
|
-
}, Hn = Object.defineProperty,
|
|
611
|
+
}, Hn = Object.defineProperty, Mn = (e, t) => {
|
|
611
612
|
for (var r in t) Hn(e, r, {
|
|
612
613
|
get: t[r],
|
|
613
614
|
enumerable: !0
|
|
614
615
|
});
|
|
615
616
|
}, ue = {};
|
|
616
|
-
|
|
617
|
+
Mn(ue, {
|
|
617
618
|
ActiveEmoji: () => _r,
|
|
618
619
|
Empty: () => wr,
|
|
619
620
|
List: () => pr,
|
|
@@ -624,7 +625,7 @@ $n(ue, {
|
|
|
624
625
|
SkinToneSelector: () => br,
|
|
625
626
|
Viewport: () => mr
|
|
626
627
|
});
|
|
627
|
-
var
|
|
628
|
+
var Gt = "'Apple Color Emoji', 'Noto Color Emoji', 'Twemoji Mozilla', 'Android Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', EmojiSymbols, sans-serif", at = [
|
|
628
629
|
"none",
|
|
629
630
|
"light",
|
|
630
631
|
"medium-light",
|
|
@@ -632,18 +633,18 @@ var Wt = "'Apple Color Emoji', 'Noto Color Emoji', 'Twemoji Mozilla', 'Android E
|
|
|
632
633
|
"medium-dark",
|
|
633
634
|
"dark"
|
|
634
635
|
];
|
|
635
|
-
function
|
|
636
|
+
function Ge(e) {
|
|
636
637
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
637
638
|
}
|
|
638
639
|
var J = 2, V = null;
|
|
639
|
-
function
|
|
640
|
+
function vt(e) {
|
|
640
641
|
try {
|
|
641
642
|
V ??= document.createElement("canvas").getContext("2d", { willReadFrequently: !0 });
|
|
642
643
|
} catch {
|
|
643
644
|
}
|
|
644
645
|
if (!V || (queueMicrotask(() => {
|
|
645
646
|
V && (V = null);
|
|
646
|
-
}), V.canvas.width = J, V.canvas.height = J, V.font = `2px ${
|
|
647
|
+
}), V.canvas.width = J, V.canvas.height = J, V.font = `2px ${Gt}`, V.textBaseline = "middle", V.measureText(e).width >= J * 2)) return !1;
|
|
647
648
|
V.fillStyle = "#00f", V.fillText(e, 0, 0);
|
|
648
649
|
let t = V.getImageData(0, 0, J, J).data;
|
|
649
650
|
V.clearRect(0, 0, J, J), V.fillStyle = "#f00", V.fillText(e, 0, 0);
|
|
@@ -651,7 +652,7 @@ function gt(e) {
|
|
|
651
652
|
for (let n = 0; n < J * J * 4; n += 4) if (t[n] !== r[n] || t[n + 1] !== r[n + 1] || t[n + 2] !== r[n + 2]) return !1;
|
|
652
653
|
return !0;
|
|
653
654
|
}
|
|
654
|
-
function
|
|
655
|
+
function qt(e, t, r) {
|
|
655
656
|
try {
|
|
656
657
|
let n = e.getItem(t);
|
|
657
658
|
if (!n) throw new Error(`No value found for "${t}".`);
|
|
@@ -695,7 +696,7 @@ function Ie(e) {
|
|
|
695
696
|
return t.length > 0 && e(t[0]), t;
|
|
696
697
|
};
|
|
697
698
|
}
|
|
698
|
-
var
|
|
699
|
+
var Fn = "frimousse/data", Vn = de({
|
|
699
700
|
locale: F,
|
|
700
701
|
emojis: Ie(de({
|
|
701
702
|
emoji: F,
|
|
@@ -725,15 +726,15 @@ var Mn = "frimousse/data", Fn = de({
|
|
|
725
726
|
dark: F
|
|
726
727
|
})
|
|
727
728
|
});
|
|
728
|
-
function
|
|
729
|
+
function Ln({ name: e = Fn } = {}) {
|
|
729
730
|
let t = `${e}/`, r = de({
|
|
730
|
-
data:
|
|
731
|
+
data: Vn,
|
|
731
732
|
metadata: (n) => n
|
|
732
733
|
});
|
|
733
734
|
return {
|
|
734
735
|
get(n) {
|
|
735
736
|
try {
|
|
736
|
-
return
|
|
737
|
+
return qt(localStorage, `${t}${n}`, r);
|
|
737
738
|
} catch {
|
|
738
739
|
return null;
|
|
739
740
|
}
|
|
@@ -761,22 +762,22 @@ function Vn({ name: e = Mn } = {}) {
|
|
|
761
762
|
}
|
|
762
763
|
};
|
|
763
764
|
}
|
|
764
|
-
var Xt = /* @__PURE__ */ new Map(),
|
|
765
|
-
function
|
|
765
|
+
var Xt = /* @__PURE__ */ new Map(), Ze = /* @__PURE__ */ new WeakMap(), zn = /* @__PURE__ */ new Set();
|
|
766
|
+
function Zt({ emojiVersion: e, emojibaseUrl: t }) {
|
|
766
767
|
return t ?? (typeof e == "number" ? `https://cdn.jsdelivr.net/npm/emojibase-data@${Math.floor(e)}` : "https://cdn.jsdelivr.net/npm/emojibase-data@latest");
|
|
767
768
|
}
|
|
768
|
-
function
|
|
769
|
-
return (t.resolveEmojiData ?
|
|
769
|
+
function Un(e, t) {
|
|
770
|
+
return (t.resolveEmojiData ? Ze.get(t.resolveEmojiData) : Xt)?.get(er(e, t))?.data;
|
|
770
771
|
}
|
|
771
|
-
function
|
|
772
|
-
let n =
|
|
772
|
+
function Qt(e, t, r) {
|
|
773
|
+
let n = Bn(e, t), o = n.load?.status === "pending" ? n.load : void 0;
|
|
773
774
|
n.data = r, n.load = void 0, o?.complete();
|
|
774
|
-
for (let a of
|
|
775
|
+
for (let a of zn) a();
|
|
775
776
|
}
|
|
776
|
-
async function
|
|
777
|
+
async function Yn(e, t, r) {
|
|
777
778
|
r.signal?.throwIfAborted();
|
|
778
779
|
let n = await e(t, r);
|
|
779
|
-
return r.signal?.throwIfAborted(),
|
|
780
|
+
return r.signal?.throwIfAborted(), Qt(t, {
|
|
780
781
|
...r,
|
|
781
782
|
resolveEmojiData: e
|
|
782
783
|
}, n), n;
|
|
@@ -786,18 +787,18 @@ function er(e, t) {
|
|
|
786
787
|
e,
|
|
787
788
|
t.emojibaseUrl,
|
|
788
789
|
t.emojiVersion
|
|
789
|
-
]) : JSON.stringify([e,
|
|
790
|
+
]) : JSON.stringify([e, Zt(t)]);
|
|
790
791
|
}
|
|
791
|
-
function
|
|
792
|
+
function Bn(e, t) {
|
|
792
793
|
let r = Xt;
|
|
793
794
|
if (t.resolveEmojiData) {
|
|
794
|
-
let a =
|
|
795
|
-
r = a ?? /* @__PURE__ */ new Map(), a ||
|
|
795
|
+
let a = Ze.get(t.resolveEmojiData);
|
|
796
|
+
r = a ?? /* @__PURE__ */ new Map(), a || Ze.set(t.resolveEmojiData, r);
|
|
796
797
|
}
|
|
797
798
|
let n = er(e, t), o = r.get(n);
|
|
798
799
|
return o || (o = {}, r.set(n, o)), o;
|
|
799
800
|
}
|
|
800
|
-
var ot = (e, t) => `${e}/${t}/data.json`, tr = (e, t) => `${e}/${t}/messages.json`,
|
|
801
|
+
var ot = (e, t) => `${e}/${t}/data.json`, tr = (e, t) => `${e}/${t}/messages.json`, Wn = [
|
|
801
802
|
"bn",
|
|
802
803
|
"da",
|
|
803
804
|
"de",
|
|
@@ -828,9 +829,9 @@ var ot = (e, t) => `${e}/${t}/data.json`, tr = (e, t) => `${e}/${t}/messages.jso
|
|
|
828
829
|
"zh"
|
|
829
830
|
], ft = "en", rr = (e) => `frimousse/metadata/${e}`, Ce = /* @__PURE__ */ new Map();
|
|
830
831
|
function nr(e) {
|
|
831
|
-
return
|
|
832
|
+
return Ln({ name: `frimousse/data/${e}` });
|
|
832
833
|
}
|
|
833
|
-
async function
|
|
834
|
+
async function pt(e, t) {
|
|
834
835
|
try {
|
|
835
836
|
return (await fetch(e, {
|
|
836
837
|
method: "HEAD",
|
|
@@ -840,7 +841,7 @@ async function vt(e, t) {
|
|
|
840
841
|
return null;
|
|
841
842
|
}
|
|
842
843
|
}
|
|
843
|
-
async function
|
|
844
|
+
async function Gn(e, t, r) {
|
|
844
845
|
let [{ emojis: n, emojisEtag: o }, { messages: a, messagesEtag: s }] = await Promise.all([fetch(ot(e, t), { signal: r }).then(async (c) => ({
|
|
845
846
|
emojis: await c.json(),
|
|
846
847
|
emojisEtag: c.headers.get("etag")
|
|
@@ -855,38 +856,38 @@ async function Bn(e, t, r) {
|
|
|
855
856
|
messagesEtag: s
|
|
856
857
|
};
|
|
857
858
|
}
|
|
858
|
-
async function
|
|
859
|
-
let [n, o] = await Promise.all([
|
|
859
|
+
async function qn(e, t, r) {
|
|
860
|
+
let [n, o] = await Promise.all([pt(ot(e, t), r), pt(tr(e, t), r)]);
|
|
860
861
|
return {
|
|
861
862
|
emojisEtag: n,
|
|
862
863
|
messagesEtag: o
|
|
863
864
|
};
|
|
864
865
|
}
|
|
865
|
-
function
|
|
866
|
+
function Kn(e) {
|
|
866
867
|
return e.skins ? e.skins.filter((t) => typeof t.tone == "number").reduce((t, r) => {
|
|
867
868
|
let n = at[r.tone];
|
|
868
869
|
return t[n] = r.emoji, t;
|
|
869
870
|
}, {}) : void 0;
|
|
870
871
|
}
|
|
871
|
-
async function
|
|
872
|
-
let { emojis: n, emojisEtag: o, messages: a, messagesEtag: s } = await
|
|
872
|
+
async function bt(e, t, r) {
|
|
873
|
+
let { emojis: n, emojisEtag: o, messages: a, messagesEtag: s } = await Gn(e, t, r);
|
|
873
874
|
r?.throwIfAborted();
|
|
874
875
|
let c = a.subgroups.find((m) => m.key === "country-flag" || m.key === "subdivision-flag"), l = a.groups.filter((m) => m.key !== "component"), u = n.filter((m) => "group" in m), h = l.map((m) => ({
|
|
875
876
|
index: m.order,
|
|
876
|
-
label:
|
|
877
|
-
})), d = a.skinTones.reduce((m,
|
|
877
|
+
label: Ge(m.message)
|
|
878
|
+
})), d = a.skinTones.reduce((m, f) => (m[f.key] = Ge(f.message), m), {}), g = {
|
|
878
879
|
locale: t,
|
|
879
880
|
emojis: u.map((m) => {
|
|
880
|
-
let
|
|
881
|
+
let f = m.skins?.filter((b) => Array.isArray(b.tone)).map((b) => b.emoji);
|
|
881
882
|
return {
|
|
882
883
|
emoji: m.emoji,
|
|
883
884
|
category: m.group,
|
|
884
885
|
version: m.version,
|
|
885
|
-
label:
|
|
886
|
+
label: Ge(m.label),
|
|
886
887
|
tags: m.tags ?? [],
|
|
887
888
|
countryFlag: c && m.subgroup === c.order || void 0,
|
|
888
|
-
skins:
|
|
889
|
-
aliases:
|
|
889
|
+
skins: Kn(m),
|
|
890
|
+
aliases: f?.length ? f : void 0
|
|
890
891
|
};
|
|
891
892
|
}),
|
|
892
893
|
categories: h,
|
|
@@ -897,11 +898,11 @@ async function pt(e, t, r) {
|
|
|
897
898
|
messagesEtag: s
|
|
898
899
|
}), g;
|
|
899
900
|
}
|
|
900
|
-
function
|
|
901
|
+
function Jn(e) {
|
|
901
902
|
let t = /* @__PURE__ */ new Map();
|
|
902
903
|
for (let a of e) t.has(a.version) || t.set(a.version, a.emoji);
|
|
903
|
-
let r = [...t.keys()].sort((a, s) => s - a), n = r[0] ?? 0, o =
|
|
904
|
-
for (let a of r) if (
|
|
904
|
+
let r = [...t.keys()].sort((a, s) => s - a), n = r[0] ?? 0, o = vt("🇪🇺");
|
|
905
|
+
for (let a of r) if (vt(t.get(a))) return {
|
|
905
906
|
emojiVersion: a,
|
|
906
907
|
countryFlags: o
|
|
907
908
|
};
|
|
@@ -910,14 +911,14 @@ function Kn(e) {
|
|
|
910
911
|
countryFlags: o
|
|
911
912
|
};
|
|
912
913
|
}
|
|
913
|
-
var
|
|
914
|
+
var Xn = de({
|
|
914
915
|
emojiVersion: Re(Me),
|
|
915
916
|
countryFlags: Re(Jt),
|
|
916
917
|
revalidated: Ie(F)
|
|
917
918
|
});
|
|
918
|
-
function
|
|
919
|
+
function Qe(e) {
|
|
919
920
|
try {
|
|
920
|
-
return
|
|
921
|
+
return qt(sessionStorage, rr(e), Xn);
|
|
921
922
|
} catch {
|
|
922
923
|
return null;
|
|
923
924
|
}
|
|
@@ -928,13 +929,13 @@ function ar(e, t) {
|
|
|
928
929
|
} catch {
|
|
929
930
|
}
|
|
930
931
|
}
|
|
931
|
-
function
|
|
932
|
+
function Zn(e, t, r) {
|
|
932
933
|
if (r?.aborted) return Promise.reject(r.reason);
|
|
933
|
-
let n = ot(e, t), o =
|
|
934
|
+
let n = ot(e, t), o = Un(t, { emojibaseUrl: e });
|
|
934
935
|
if (o) return Promise.resolve(o);
|
|
935
936
|
let a = Ce.get(n);
|
|
936
937
|
if (!a || a.controller.signal.aborted) {
|
|
937
|
-
let l = new AbortController(), u = Qn(e, t, l.signal).then((h) => (l.signal.throwIfAborted(),
|
|
938
|
+
let l = new AbortController(), u = Qn(e, t, l.signal).then((h) => (l.signal.throwIfAborted(), Qt(t, { emojibaseUrl: e }, h), h)).finally(() => {
|
|
938
939
|
Ce.get(n)?.promise === u && Ce.delete(n);
|
|
939
940
|
});
|
|
940
941
|
a = {
|
|
@@ -953,32 +954,32 @@ function Xn(e, t, r) {
|
|
|
953
954
|
});
|
|
954
955
|
}
|
|
955
956
|
async function Qn(e, t, r) {
|
|
956
|
-
let n =
|
|
957
|
-
if (!o) a = await
|
|
957
|
+
let n = Qe(e), o = nr(e).get(t), a;
|
|
958
|
+
if (!o) a = await bt(e, t, r);
|
|
958
959
|
else if (n?.revalidated.includes(t)) a = o.data;
|
|
959
960
|
else try {
|
|
960
|
-
let { emojisEtag: l, messagesEtag: u } = await
|
|
961
|
-
r.throwIfAborted(), a = !l || !u || l !== o.metadata?.emojisEtag || u !== o.metadata?.messagesEtag ? await
|
|
961
|
+
let { emojisEtag: l, messagesEtag: u } = await qn(e, t, r);
|
|
962
|
+
r.throwIfAborted(), a = !l || !u || l !== o.metadata?.emojisEtag || u !== o.metadata?.messagesEtag ? await bt(e, t, r) : o.data;
|
|
962
963
|
} catch {
|
|
963
964
|
r.throwIfAborted(), a = o.data;
|
|
964
965
|
}
|
|
965
966
|
r.throwIfAborted();
|
|
966
|
-
let s =
|
|
967
|
+
let s = Qe(e), c = s?.revalidated ?? [];
|
|
967
968
|
return ar(e, {
|
|
968
969
|
...s,
|
|
969
970
|
revalidated: c.includes(t) ? c : [...c, t]
|
|
970
971
|
}), a;
|
|
971
972
|
}
|
|
972
|
-
var
|
|
973
|
-
let o =
|
|
973
|
+
var qe = async (e, { emojiVersion: t, emojibaseUrl: r, signal: n } = {}) => {
|
|
974
|
+
let o = ea(e), a = Zt({
|
|
974
975
|
emojiVersion: t,
|
|
975
976
|
emojibaseUrl: r
|
|
976
|
-
}), s = await
|
|
977
|
+
}), s = await Zn(a, o, n);
|
|
977
978
|
n?.throwIfAborted();
|
|
978
|
-
let c =
|
|
979
|
+
let c = Qe(a), l = c?.emojiVersion !== void 0 && c.countryFlags !== void 0 ? {
|
|
979
980
|
emojiVersion: c.emojiVersion,
|
|
980
981
|
countryFlags: c.countryFlags
|
|
981
|
-
} :
|
|
982
|
+
} : Jn(s.emojis);
|
|
982
983
|
return ar(a, {
|
|
983
984
|
...l,
|
|
984
985
|
revalidated: c?.revalidated ?? [o]
|
|
@@ -992,19 +993,19 @@ var Ge = async (e, { emojiVersion: t, emojibaseUrl: r, signal: n } = {}) => {
|
|
|
992
993
|
skinTones: s.skinTones
|
|
993
994
|
};
|
|
994
995
|
};
|
|
995
|
-
function
|
|
996
|
-
return
|
|
996
|
+
function ea(e) {
|
|
997
|
+
return Wn.find((t) => t === e) || (console.warn(`Locale "${e}" is not supported, using "${ft}" instead.`), ft);
|
|
997
998
|
}
|
|
998
|
-
function
|
|
999
|
+
function yt(e) {
|
|
999
1000
|
return at.includes(e) ? e : (console.warn(`Skin tone "${e}" is not valid, using "none" instead.`), "none");
|
|
1000
1001
|
}
|
|
1001
|
-
function
|
|
1002
|
+
function ta(e, t) {
|
|
1002
1003
|
let r = [];
|
|
1003
1004
|
if (t <= 0) return r;
|
|
1004
1005
|
for (let n = 0, o = e.length; n < o; n += t) r.push(e.slice(n, n + t));
|
|
1005
1006
|
return r;
|
|
1006
1007
|
}
|
|
1007
|
-
function
|
|
1008
|
+
function ra(e, t) {
|
|
1008
1009
|
if (!t) return e;
|
|
1009
1010
|
let r = t.toLowerCase().trim(), n = /* @__PURE__ */ new WeakMap();
|
|
1010
1011
|
return e.filter((o) => {
|
|
@@ -1014,8 +1015,8 @@ function ta(e, t) {
|
|
|
1014
1015
|
return a > 0 ? (n.set(o, a), !0) : !1;
|
|
1015
1016
|
}).sort((o, a) => (n.get(a) ?? 0) - (n.get(o) ?? 0));
|
|
1016
1017
|
}
|
|
1017
|
-
function
|
|
1018
|
-
let o =
|
|
1018
|
+
function na(e, t, r, n) {
|
|
1019
|
+
let o = ra(e.emojis, n), a = [], s = [], c = [], l = {}, u = 0, h = 0;
|
|
1019
1020
|
for (let d of o) l[d.category] || (l[d.category] = []), l[d.category].push({
|
|
1020
1021
|
emoji: r && r !== "none" && d.skins ? d.skins[r] : d.emoji,
|
|
1021
1022
|
label: d.label
|
|
@@ -1023,9 +1024,9 @@ function ra(e, t, r, n) {
|
|
|
1023
1024
|
for (let d of e.categories) {
|
|
1024
1025
|
let g = l[d.index];
|
|
1025
1026
|
if (!g || g.length === 0) continue;
|
|
1026
|
-
let m =
|
|
1027
|
+
let m = ta(Array.from(g), t).map((f) => ({
|
|
1027
1028
|
categoryIndex: u,
|
|
1028
|
-
emojis:
|
|
1029
|
+
emojis: f
|
|
1029
1030
|
}));
|
|
1030
1031
|
a.push(...m), s.push({
|
|
1031
1032
|
label: d.label,
|
|
@@ -1041,7 +1042,7 @@ function ra(e, t, r, n) {
|
|
|
1041
1042
|
skinTones: e.skinTones
|
|
1042
1043
|
};
|
|
1043
1044
|
}
|
|
1044
|
-
function
|
|
1045
|
+
function aa(e) {
|
|
1045
1046
|
let t = {}, r = null, n = null, o = /* @__PURE__ */ new Set(), a = () => {
|
|
1046
1047
|
if (r) {
|
|
1047
1048
|
t = r, r = null;
|
|
@@ -1057,11 +1058,11 @@ function na(e) {
|
|
|
1057
1058
|
subscribe: l
|
|
1058
1059
|
};
|
|
1059
1060
|
}
|
|
1060
|
-
function
|
|
1061
|
+
function oa(e) {
|
|
1061
1062
|
let [t] = K(e);
|
|
1062
1063
|
return t;
|
|
1063
1064
|
}
|
|
1064
|
-
function
|
|
1065
|
+
function ia(e) {
|
|
1065
1066
|
let t = Ye(null);
|
|
1066
1067
|
return {
|
|
1067
1068
|
useStore: () => {
|
|
@@ -1075,7 +1076,7 @@ function oa(e) {
|
|
|
1075
1076
|
})
|
|
1076
1077
|
};
|
|
1077
1078
|
}
|
|
1078
|
-
function
|
|
1079
|
+
function q(e, t, r = Object.is) {
|
|
1079
1080
|
let [n, o] = K(() => t(e.get()));
|
|
1080
1081
|
return te(() => e.subscribe(() => {
|
|
1081
1082
|
let a = t(e.get());
|
|
@@ -1084,15 +1085,15 @@ function G(e, t, r = Object.is) {
|
|
|
1084
1085
|
e,
|
|
1085
1086
|
t,
|
|
1086
1087
|
r
|
|
1087
|
-
]),
|
|
1088
|
+
]), rn(n), n;
|
|
1088
1089
|
}
|
|
1089
1090
|
function ee(e, t, r) {
|
|
1090
|
-
return
|
|
1091
|
+
return q(e, z((n) => n[t], [t]), r);
|
|
1091
1092
|
}
|
|
1092
|
-
var
|
|
1093
|
-
function
|
|
1093
|
+
var wt = 2;
|
|
1094
|
+
function la(e, t, r, n, o) {
|
|
1094
1095
|
let a = 0;
|
|
1095
|
-
return
|
|
1096
|
+
return aa((s, c) => ({
|
|
1096
1097
|
locale: t,
|
|
1097
1098
|
columns: r,
|
|
1098
1099
|
sticky: n,
|
|
@@ -1123,15 +1124,15 @@ function ia(e, t, r, n, o) {
|
|
|
1123
1124
|
viewportStartRowIndex: 0,
|
|
1124
1125
|
viewportEndRowIndex: 0
|
|
1125
1126
|
});
|
|
1126
|
-
let
|
|
1127
|
-
for (let _ of h.categories) if (b++ * d + _.startRowIndex * g < a)
|
|
1127
|
+
let f = 0, b = 0;
|
|
1128
|
+
for (let _ of h.categories) if (b++ * d + _.startRowIndex * g < a) f += d;
|
|
1128
1129
|
else break;
|
|
1129
|
-
let y = h.categories.length * d + h.rows.length * g, w = Math.floor(
|
|
1130
|
+
let y = h.categories.length * d + h.rows.length * g, w = Math.floor(wt * g / 2), p = Math.ceil(wt * g / 2), j = Math.min(a - f - w, y - m), k = j + m + p, C = Math.max(0, Math.floor(j / g)), v = Math.min(h.rows.length - 1, Math.ceil(k / g)), E = h.rows[C]?.categoryIndex;
|
|
1130
1131
|
return s(E === void 0 && l ? l : {
|
|
1131
1132
|
...l,
|
|
1132
1133
|
viewportStartCategoryIndex: E,
|
|
1133
1134
|
viewportStartRowIndex: C,
|
|
1134
|
-
viewportEndRowIndex:
|
|
1135
|
+
viewportEndRowIndex: v
|
|
1135
1136
|
});
|
|
1136
1137
|
},
|
|
1137
1138
|
onDataChange: (l) => {
|
|
@@ -1153,8 +1154,8 @@ function ia(e, t, r, n, o) {
|
|
|
1153
1154
|
activeColumnIndex: u,
|
|
1154
1155
|
activeRowIndex: h
|
|
1155
1156
|
}), l !== "keyboard") return;
|
|
1156
|
-
let { listRef: d, viewportRef: g, sticky: m, rowHeight:
|
|
1157
|
-
if (!w || !p || !
|
|
1157
|
+
let { listRef: d, viewportRef: g, sticky: m, rowHeight: f, viewportHeight: b, categoryHeaderHeight: y } = c(), w = d?.current, p = g?.current;
|
|
1158
|
+
if (!w || !p || !f || !y || !b) return;
|
|
1158
1159
|
let j = h;
|
|
1159
1160
|
j === 0 && p.scrollTo({
|
|
1160
1161
|
top: 0,
|
|
@@ -1162,11 +1163,11 @@ function ia(e, t, r, n, o) {
|
|
|
1162
1163
|
});
|
|
1163
1164
|
let k = w.querySelector(`[aria-rowindex="${j}"]`);
|
|
1164
1165
|
if (!(k instanceof HTMLElement)) return;
|
|
1165
|
-
let C = k.offsetTop,
|
|
1166
|
-
m && C < a + b / 2 && (
|
|
1167
|
-
let
|
|
1168
|
-
(C <
|
|
1169
|
-
top: Math.max(C <
|
|
1166
|
+
let C = k.offsetTop, v = getComputedStyle(k), E = Number.parseFloat(v.scrollMarginTop), _ = Number.parseFloat(v.scrollMarginBottom), N = a + E;
|
|
1167
|
+
m && C < a + b / 2 && (N += y);
|
|
1168
|
+
let $ = N + b - _;
|
|
1169
|
+
(C < N || C + f > $) && p.scrollTo({
|
|
1170
|
+
top: Math.max(C < N + y ? C - Math.max(m ? y : 0, E) : C - b + f + _, 0),
|
|
1170
1171
|
behavior: "instant"
|
|
1171
1172
|
});
|
|
1172
1173
|
},
|
|
@@ -1194,63 +1195,63 @@ function ia(e, t, r, n, o) {
|
|
|
1194
1195
|
}
|
|
1195
1196
|
}));
|
|
1196
1197
|
}
|
|
1197
|
-
var { useStore:
|
|
1198
|
-
function
|
|
1198
|
+
var { useStore: B, Provider: sa } = ia("EmojiPicker.Root is missing.");
|
|
1199
|
+
function ca(e) {
|
|
1199
1200
|
return e.search;
|
|
1200
1201
|
}
|
|
1201
1202
|
function it(e) {
|
|
1202
1203
|
return e.interaction === "none" ? void 0 : e.data?.rows[e.activeRowIndex]?.emojis[e.activeColumnIndex];
|
|
1203
1204
|
}
|
|
1204
|
-
function
|
|
1205
|
+
function ua(e) {
|
|
1205
1206
|
return e.data === void 0 || typeof e.data?.count == "number" && e.data.count === 0;
|
|
1206
1207
|
}
|
|
1207
|
-
function
|
|
1208
|
+
function da(e) {
|
|
1208
1209
|
return e.data === null || e.viewportHeight === null || e.rowHeight === null || e.categoryHeaderHeight === null;
|
|
1209
1210
|
}
|
|
1210
1211
|
function or(e) {
|
|
1211
1212
|
return e.data?.rows.length;
|
|
1212
1213
|
}
|
|
1213
|
-
function
|
|
1214
|
+
function ma(e) {
|
|
1214
1215
|
return e.data?.categories.length;
|
|
1215
1216
|
}
|
|
1216
|
-
function
|
|
1217
|
+
function ha(e) {
|
|
1217
1218
|
return e.data?.categoriesStartRowIndices;
|
|
1218
1219
|
}
|
|
1219
|
-
function
|
|
1220
|
+
function ga(e) {
|
|
1220
1221
|
return e.data?.skinTones;
|
|
1221
1222
|
}
|
|
1222
1223
|
function ir(e, t) {
|
|
1223
1224
|
return e?.emoji === t?.emoji;
|
|
1224
1225
|
}
|
|
1225
|
-
function
|
|
1226
|
+
function va(e, t) {
|
|
1226
1227
|
return e?.categoryIndex !== t?.categoryIndex || e?.emojis.length !== t?.emojis.length ? !1 : !!e?.emojis.every((r, n) => ir(r, t?.emojis[n]));
|
|
1227
1228
|
}
|
|
1228
|
-
var Ee = "",
|
|
1229
|
+
var Ee = "", _t = new RegExp("\\p{Emoji_Modifier_Base}", "u"), fa = /\uFE0F$/, pa = /\u{1F3FB}|\u{1F3FC}|\u{1F3FD}|\u{1F3FE}|\u{1F3FF}/gu, ba = {
|
|
1229
1230
|
light: "🏻",
|
|
1230
1231
|
"medium-light": "🏼",
|
|
1231
1232
|
medium: "🏽",
|
|
1232
1233
|
"medium-dark": "🏾",
|
|
1233
1234
|
dark: "🏿"
|
|
1234
1235
|
};
|
|
1235
|
-
function
|
|
1236
|
-
if (!e.split(Ee).some((n) =>
|
|
1237
|
-
let r = e.split(Ee).map((n) => n.replace(
|
|
1236
|
+
function ya(e, t) {
|
|
1237
|
+
if (!e.split(Ee).some((n) => _t.test(n))) return e;
|
|
1238
|
+
let r = e.split(Ee).map((n) => n.replace(pa, "")).join(Ee);
|
|
1238
1239
|
return t === "none" ? r : r.split(Ee).map((n, o, a) => {
|
|
1239
1240
|
let s = a.length > 1;
|
|
1240
|
-
return !
|
|
1241
|
+
return !_t.test(n) || s && n === "🤝" ? n : n.replace(fa, "") + ba[t];
|
|
1241
1242
|
}).join(Ee);
|
|
1242
1243
|
}
|
|
1243
|
-
function
|
|
1244
|
+
function wa(e) {
|
|
1244
1245
|
return at.map((t) => ({
|
|
1245
1246
|
skinTone: t,
|
|
1246
|
-
emoji:
|
|
1247
|
+
emoji: ya(e, t)
|
|
1247
1248
|
}));
|
|
1248
1249
|
}
|
|
1249
1250
|
function lr() {
|
|
1250
|
-
return
|
|
1251
|
+
return nn(q(B(), it, ir));
|
|
1251
1252
|
}
|
|
1252
1253
|
function sr(e = "✋") {
|
|
1253
|
-
let t =
|
|
1254
|
+
let t = B(), r = ee(t, "skinTone"), n = he(() => wa(e), [e]);
|
|
1254
1255
|
return [
|
|
1255
1256
|
r,
|
|
1256
1257
|
z((o) => {
|
|
@@ -1265,9 +1266,9 @@ function lt(e, t) {
|
|
|
1265
1266
|
let r = Object.keys(e), n = Object.keys(t);
|
|
1266
1267
|
return r.length !== n.length ? !1 : r.every((o) => o in t && e[o] === t[o]);
|
|
1267
1268
|
}
|
|
1268
|
-
function
|
|
1269
|
+
function _a(...e) {
|
|
1269
1270
|
}
|
|
1270
|
-
function
|
|
1271
|
+
function Ca(e, t) {
|
|
1271
1272
|
let r = null;
|
|
1272
1273
|
if (typeof window.requestIdleCallback == "function") r = window.requestIdleCallback(e, t);
|
|
1273
1274
|
else {
|
|
@@ -1283,15 +1284,15 @@ function _a(e, t) {
|
|
|
1283
1284
|
typeof window.cancelIdleCallback == "function" ? window.cancelIdleCallback(r) : window.clearTimeout(r);
|
|
1284
1285
|
};
|
|
1285
1286
|
}
|
|
1286
|
-
var X = typeof window < "u" ?
|
|
1287
|
+
var X = typeof window < "u" ? an : te;
|
|
1287
1288
|
function cr(e) {
|
|
1288
1289
|
let t = U(e);
|
|
1289
1290
|
return X(() => {
|
|
1290
1291
|
t.current = e;
|
|
1291
1292
|
}), z((...r) => t.current(...r), []);
|
|
1292
1293
|
}
|
|
1293
|
-
function
|
|
1294
|
-
let [n, o] = K(void 0), a =
|
|
1294
|
+
function Ea({ emojiVersion: e, emojibaseUrl: t, resolveEmojiData: r = qe }) {
|
|
1295
|
+
let [n, o] = K(void 0), a = B(), s = ee(a, "locale"), c = ee(a, "columns"), l = ee(a, "skinTone"), u = ee(a, "search"), h = cr((d, g) => r === qe ? qe(d, g) : Yn(r, d, g));
|
|
1295
1296
|
return te(() => {
|
|
1296
1297
|
let d = new AbortController(), g = d.signal;
|
|
1297
1298
|
return Promise.resolve().then(() => h(s, {
|
|
@@ -1311,8 +1312,8 @@ function Ca({ emojiVersion: e, emojibaseUrl: t, resolveEmojiData: r = Ge }) {
|
|
|
1311
1312
|
s,
|
|
1312
1313
|
h
|
|
1313
1314
|
]), te(() => {
|
|
1314
|
-
if (n) return
|
|
1315
|
-
a.get().onDataChange(
|
|
1315
|
+
if (n) return Ca(() => {
|
|
1316
|
+
a.get().onDataChange(na(n, c, l, u));
|
|
1316
1317
|
}, { timeout: 100 });
|
|
1317
1318
|
}, [
|
|
1318
1319
|
n,
|
|
@@ -1321,9 +1322,9 @@ function Ca({ emojiVersion: e, emojibaseUrl: t, resolveEmojiData: r = Ge }) {
|
|
|
1321
1322
|
u
|
|
1322
1323
|
]), null;
|
|
1323
1324
|
}
|
|
1324
|
-
var ur = xe(({ locale: e = "en", columns: t = 9, skinTone: r = "none", onEmojiSelect: n =
|
|
1325
|
-
let
|
|
1326
|
-
|
|
1325
|
+
var ur = xe(({ locale: e = "en", columns: t = 9, skinTone: r = "none", onEmojiSelect: n = _a, emojiVersion: o, emojibaseUrl: a, resolveEmojiData: s, onFocusCapture: c, onBlurCapture: l, children: u, style: h, sticky: d = !0, ...g }, m) => {
|
|
1326
|
+
let f = cr(n), b = oa(() => la(f, e, t, d, yt(r))), [y, w] = K(!1), p = U(null), j = z((v) => {
|
|
1327
|
+
v && (p.current = v, b.set({ rootRef: p }));
|
|
1327
1328
|
}, []);
|
|
1328
1329
|
X(() => {
|
|
1329
1330
|
b.set({ locale: e });
|
|
@@ -1332,28 +1333,28 @@ var ur = xe(({ locale: e = "en", columns: t = 9, skinTone: r = "none", onEmojiSe
|
|
|
1332
1333
|
}, [t]), X(() => {
|
|
1333
1334
|
b.set({ sticky: d });
|
|
1334
1335
|
}, [d]), X(() => {
|
|
1335
|
-
b.set({ skinTone:
|
|
1336
|
+
b.set({ skinTone: yt(r) });
|
|
1336
1337
|
}, [r]);
|
|
1337
|
-
let k = z((
|
|
1338
|
-
c?.(
|
|
1339
|
-
let { searchRef: E, viewportRef: _ } = b.get(),
|
|
1340
|
-
|
|
1341
|
-
}, [c]), C = z((
|
|
1342
|
-
l?.(
|
|
1338
|
+
let k = z((v) => {
|
|
1339
|
+
c?.(v);
|
|
1340
|
+
let { searchRef: E, viewportRef: _ } = b.get(), N = v.target === E?.current || v.target.hasAttribute("frimousse-search"), $ = v.target === _?.current || v.target.hasAttribute("frimousse-viewport");
|
|
1341
|
+
v.isDefaultPrevented() || (w(N || $), v.isDefaultPrevented() || (w(N || $), $ ? b.get().onActiveEmojiChange("keyboard", 0, 0) : N && b.get().search === "" && b.set({ interaction: "none" })));
|
|
1342
|
+
}, [c]), C = z((v) => {
|
|
1343
|
+
l?.(v), !v.isDefaultPrevented() && !v.currentTarget.contains(v.relatedTarget) && w(!1);
|
|
1343
1344
|
}, [l]);
|
|
1344
1345
|
return X(() => {
|
|
1345
1346
|
y || b.get().onActiveEmojiReset();
|
|
1346
|
-
}, [y]),
|
|
1347
|
+
}, [y]), Be(m, () => p.current), te(() => {
|
|
1347
1348
|
if (!y) return;
|
|
1348
|
-
function
|
|
1349
|
+
function v(E) {
|
|
1349
1350
|
if (E.defaultPrevented || !E.key.startsWith("Arrow") && E.key !== "Enter") return;
|
|
1350
|
-
let { data: _, onEmojiSelect:
|
|
1351
|
+
let { data: _, onEmojiSelect: N, onActiveEmojiChange: $, interaction: M, activeColumnIndex: O, activeRowIndex: H } = b.get();
|
|
1351
1352
|
if (E.key === "Enter") {
|
|
1352
1353
|
let x = it(b.get());
|
|
1353
|
-
x && (E.preventDefault(),
|
|
1354
|
+
x && (E.preventDefault(), N(x));
|
|
1354
1355
|
}
|
|
1355
1356
|
if (E.key.startsWith("Arrow")) {
|
|
1356
|
-
let x = O, R =
|
|
1357
|
+
let x = O, R = H;
|
|
1357
1358
|
if (E.preventDefault(), M !== "none") {
|
|
1358
1359
|
if (_?.rows && _.rows.length > 0) switch (E.key) {
|
|
1359
1360
|
case "ArrowLeft":
|
|
@@ -1379,18 +1380,18 @@ var ur = xe(({ locale: e = "en", columns: t = 9, skinTone: r = "none", onEmojiSe
|
|
|
1379
1380
|
break;
|
|
1380
1381
|
}
|
|
1381
1382
|
}
|
|
1382
|
-
|
|
1383
|
-
} else
|
|
1383
|
+
$("keyboard", x, R);
|
|
1384
|
+
} else $("keyboard", 0, 0);
|
|
1384
1385
|
}
|
|
1385
1386
|
}
|
|
1386
|
-
return document.addEventListener("keydown",
|
|
1387
|
-
document.removeEventListener("keydown",
|
|
1387
|
+
return document.addEventListener("keydown", v), () => {
|
|
1388
|
+
document.removeEventListener("keydown", v);
|
|
1388
1389
|
};
|
|
1389
1390
|
}, [y]), X(() => {
|
|
1390
|
-
let
|
|
1391
|
-
p.current && (
|
|
1392
|
-
}), { viewportWidth: M, viewportHeight: O, rowHeight:
|
|
1393
|
-
return M && p.current.style.setProperty("--frimousse-viewport-width", `${M}px`), O && p.current.style.setProperty("--frimousse-viewport-height", `${O}px`),
|
|
1391
|
+
let v = null, E = null, _ = null, N = null, $ = b.subscribe((R) => {
|
|
1392
|
+
p.current && (v !== R.viewportWidth && (v = R.viewportWidth, p.current.style.setProperty("--frimousse-viewport-width", `${R.viewportWidth}px`)), E !== R.viewportHeight && (E = R.viewportHeight, p.current.style.setProperty("--frimousse-viewport-height", `${R.viewportHeight}px`)), _ !== R.rowHeight && (_ = R.rowHeight, p.current.style.setProperty("--frimousse-row-height", `${R.rowHeight}px`)), N !== R.categoryHeaderHeight && (N = R.categoryHeaderHeight, p.current.style.setProperty("--frimousse-category-header-height", `${R.categoryHeaderHeight}px`)));
|
|
1393
|
+
}), { viewportWidth: M, viewportHeight: O, rowHeight: H, categoryHeaderHeight: x } = b.get();
|
|
1394
|
+
return M && p.current.style.setProperty("--frimousse-viewport-width", `${M}px`), O && p.current.style.setProperty("--frimousse-viewport-height", `${O}px`), H && p.current.style.setProperty("--frimousse-row-height", `${H}px`), x && p.current.style.setProperty("--frimousse-category-header-height", `${x}px`), $;
|
|
1394
1395
|
}, []), i("div", {
|
|
1395
1396
|
"data-focused": y ? "" : void 0,
|
|
1396
1397
|
"frimousse-root": "",
|
|
@@ -1399,12 +1400,12 @@ var ur = xe(({ locale: e = "en", columns: t = 9, skinTone: r = "none", onEmojiSe
|
|
|
1399
1400
|
...g,
|
|
1400
1401
|
ref: j,
|
|
1401
1402
|
style: {
|
|
1402
|
-
"--frimousse-emoji-font":
|
|
1403
|
+
"--frimousse-emoji-font": Gt,
|
|
1403
1404
|
...h
|
|
1404
1405
|
},
|
|
1405
|
-
children: I(
|
|
1406
|
+
children: I(sa, {
|
|
1406
1407
|
store: b,
|
|
1407
|
-
children: [i(
|
|
1408
|
+
children: [i(Ea, {
|
|
1408
1409
|
emojibaseUrl: a,
|
|
1409
1410
|
emojiVersion: o,
|
|
1410
1411
|
resolveEmojiData: s
|
|
@@ -1412,7 +1413,7 @@ var ur = xe(({ locale: e = "en", columns: t = 9, skinTone: r = "none", onEmojiSe
|
|
|
1412
1413
|
})
|
|
1413
1414
|
});
|
|
1414
1415
|
}), dr = xe(({ value: e, defaultValue: t, onChange: r, ...n }, o) => {
|
|
1415
|
-
let a =
|
|
1416
|
+
let a = B(), s = U(null), c = z((d) => {
|
|
1416
1417
|
d && (s.current = d, a.set({ searchRef: s }));
|
|
1417
1418
|
}, []), l = typeof e == "string", u = U(l);
|
|
1418
1419
|
te(() => {
|
|
@@ -1425,7 +1426,7 @@ var ur = xe(({ locale: e = "en", columns: t = 9, skinTone: r = "none", onEmojiSe
|
|
|
1425
1426
|
let h = z((d) => {
|
|
1426
1427
|
r?.(d), d.isDefaultPrevented() || a.get().onSearchChange(d.target.value);
|
|
1427
1428
|
}, [r]);
|
|
1428
|
-
return
|
|
1429
|
+
return Be(o, () => s.current), i("input", {
|
|
1429
1430
|
autoCapitalize: "off",
|
|
1430
1431
|
autoComplete: "off",
|
|
1431
1432
|
autoCorrect: "off",
|
|
@@ -1440,7 +1441,7 @@ var ur = xe(({ locale: e = "en", columns: t = 9, skinTone: r = "none", onEmojiSe
|
|
|
1440
1441
|
ref: c,
|
|
1441
1442
|
value: e
|
|
1442
1443
|
});
|
|
1443
|
-
}),
|
|
1444
|
+
}), Sa = De(() => {
|
|
1444
1445
|
let e = lr();
|
|
1445
1446
|
return e ? i("div", {
|
|
1446
1447
|
"aria-live": "polite",
|
|
@@ -1459,21 +1460,21 @@ var ur = xe(({ locale: e = "en", columns: t = 9, skinTone: r = "none", onEmojiSe
|
|
|
1459
1460
|
children: e.label
|
|
1460
1461
|
}) : null;
|
|
1461
1462
|
}), mr = xe(({ children: e, onScroll: t, onKeyDown: r, style: n, ...o }, a) => {
|
|
1462
|
-
let s =
|
|
1463
|
+
let s = B(), c = U(null), l = z((g) => {
|
|
1463
1464
|
g && (c.current = g, s.set({ viewportRef: c }));
|
|
1464
|
-
}, []), u =
|
|
1465
|
+
}, []), u = q(s, or), h = q(s, ma), d = z((g) => {
|
|
1465
1466
|
t?.(g), s.get().onViewportScroll(g.currentTarget.scrollTop);
|
|
1466
1467
|
}, [t]);
|
|
1467
1468
|
return X(() => {
|
|
1468
1469
|
if (!c.current) return;
|
|
1469
1470
|
let g = new ResizeObserver(([m]) => {
|
|
1470
|
-
let
|
|
1471
|
-
(w !== b || p !==
|
|
1471
|
+
let f = m?.borderBoxSize[0]?.inlineSize ?? 0, b = m?.borderBoxSize[0]?.blockSize ?? 0, { onViewportSizeChange: y, viewportHeight: w, viewportWidth: p } = s.get();
|
|
1472
|
+
(w !== b || p !== f) && y(f, b);
|
|
1472
1473
|
});
|
|
1473
1474
|
return g.observe(c.current), s.get().onViewportSizeChange(c.current.offsetWidth, c.current.clientHeight), () => {
|
|
1474
1475
|
g.disconnect();
|
|
1475
1476
|
};
|
|
1476
|
-
}, []),
|
|
1477
|
+
}, []), Be(a, () => c.current), I("div", {
|
|
1477
1478
|
"frimousse-viewport": "",
|
|
1478
1479
|
...o,
|
|
1479
1480
|
onScroll: d,
|
|
@@ -1489,7 +1490,7 @@ var ur = xe(({ locale: e = "en", columns: t = 9, skinTone: r = "none", onEmojiSe
|
|
|
1489
1490
|
willChange: "scroll-position",
|
|
1490
1491
|
...n
|
|
1491
1492
|
},
|
|
1492
|
-
children: [i(
|
|
1493
|
+
children: [i(Sa, {}), e]
|
|
1493
1494
|
});
|
|
1494
1495
|
});
|
|
1495
1496
|
function hr(e, t, r) {
|
|
@@ -1520,7 +1521,7 @@ function gr(e, t = !1) {
|
|
|
1520
1521
|
}
|
|
1521
1522
|
};
|
|
1522
1523
|
}
|
|
1523
|
-
function
|
|
1524
|
+
function vr(e, t) {
|
|
1524
1525
|
return {
|
|
1525
1526
|
"frimousse-category": "",
|
|
1526
1527
|
style: {
|
|
@@ -1533,7 +1534,7 @@ function fr(e, t) {
|
|
|
1533
1534
|
}
|
|
1534
1535
|
};
|
|
1535
1536
|
}
|
|
1536
|
-
function
|
|
1537
|
+
function fr(e, t = !1, r = !0) {
|
|
1537
1538
|
return {
|
|
1538
1539
|
category: e,
|
|
1539
1540
|
"frimousse-category-header": "",
|
|
@@ -1546,7 +1547,7 @@ function vr(e, t = !1, r = !0) {
|
|
|
1546
1547
|
}
|
|
1547
1548
|
};
|
|
1548
1549
|
}
|
|
1549
|
-
function
|
|
1550
|
+
function Ct(e, t, r, n) {
|
|
1550
1551
|
return {
|
|
1551
1552
|
"frimousse-list-sizer": "",
|
|
1552
1553
|
style: {
|
|
@@ -1557,7 +1558,7 @@ function _t(e, t, r, n) {
|
|
|
1557
1558
|
}
|
|
1558
1559
|
};
|
|
1559
1560
|
}
|
|
1560
|
-
function
|
|
1561
|
+
function Et(e, t, r) {
|
|
1561
1562
|
return {
|
|
1562
1563
|
"aria-colcount": e,
|
|
1563
1564
|
"aria-rowcount": t,
|
|
@@ -1569,11 +1570,11 @@ function Ct(e, t, r) {
|
|
|
1569
1570
|
role: "grid"
|
|
1570
1571
|
};
|
|
1571
1572
|
}
|
|
1572
|
-
function
|
|
1573
|
+
function Ia(e) {
|
|
1573
1574
|
e.preventDefault();
|
|
1574
1575
|
}
|
|
1575
|
-
var
|
|
1576
|
-
let o =
|
|
1576
|
+
var ja = De(({ Emoji: e, emoji: t, columnIndex: r, rowIndex: n }) => {
|
|
1577
|
+
let o = B(), a = q(o, (u) => it(u)?.emoji === t.emoji), s = z(() => {
|
|
1577
1578
|
o.get().onEmojiSelect(t);
|
|
1578
1579
|
}, [t]), c = z(() => {
|
|
1579
1580
|
o.get().onActiveEmojiChange("pointer", r, n);
|
|
@@ -1583,37 +1584,37 @@ var Ia = De(({ Emoji: e, emoji: t, columnIndex: r, rowIndex: n }) => {
|
|
|
1583
1584
|
return i(e, {
|
|
1584
1585
|
...hr(t, r, a),
|
|
1585
1586
|
onClick: s,
|
|
1586
|
-
onPointerDown:
|
|
1587
|
+
onPointerDown: Ia,
|
|
1587
1588
|
onPointerEnter: c,
|
|
1588
1589
|
onPointerLeave: l
|
|
1589
1590
|
});
|
|
1590
|
-
}),
|
|
1591
|
-
let n =
|
|
1591
|
+
}), ka = De(({ Row: e, Emoji: t, rowIndex: r }) => {
|
|
1592
|
+
let n = q(B(), (o) => o.data?.rows[r], va);
|
|
1592
1593
|
return n ? i(e, {
|
|
1593
1594
|
...gr(r),
|
|
1594
|
-
children: n.emojis.map((o, a) => i(
|
|
1595
|
+
children: n.emojis.map((o, a) => i(ja, {
|
|
1595
1596
|
columnIndex: a,
|
|
1596
1597
|
Emoji: t,
|
|
1597
1598
|
emoji: o,
|
|
1598
1599
|
rowIndex: r
|
|
1599
1600
|
}, o.label))
|
|
1600
1601
|
}) : null;
|
|
1601
|
-
}),
|
|
1602
|
-
let r =
|
|
1602
|
+
}), Ra = De(({ CategoryHeader: e, categoryIndex: t }) => {
|
|
1603
|
+
let r = B(), n = q(r, (a) => a.data?.categories[t], lt), o = ee(r, "sticky");
|
|
1603
1604
|
return n ? i("div", {
|
|
1604
|
-
...
|
|
1605
|
-
children: i(e, { ...
|
|
1605
|
+
...vr(t, n),
|
|
1606
|
+
children: i(e, { ...fr({ label: n.label }, !1, o) })
|
|
1606
1607
|
}) : null;
|
|
1607
|
-
}),
|
|
1608
|
-
let n = U(null), o =
|
|
1608
|
+
}), St = De(({ CategoryHeader: e, Row: t, Emoji: r }) => {
|
|
1609
|
+
let n = U(null), o = B(), a = ee(o, "columns"), s = he(() => Array(a).fill({
|
|
1609
1610
|
emoji: "🙂",
|
|
1610
1611
|
label: ""
|
|
1611
1612
|
}), [a]), c = he(() => ({ label: "Category" }), []), l = U(null), u = U(null);
|
|
1612
1613
|
return X(() => {
|
|
1613
1614
|
let h = n.current?.parentElement?.parentElement;
|
|
1614
1615
|
if (!h || !l.current || !u.current) return;
|
|
1615
|
-
let d = new ResizeObserver((
|
|
1616
|
-
for (let b of
|
|
1616
|
+
let d = new ResizeObserver((f) => {
|
|
1617
|
+
for (let b of f) {
|
|
1617
1618
|
let y = b.contentRect.height, { onRowHeightChange: w, onCategoryHeaderHeightChange: p, rowHeight: j, categoryHeaderHeight: k } = o.get();
|
|
1618
1619
|
b.target === l.current && j !== y && w(y), b.target === u.current && k !== y && p(y);
|
|
1619
1620
|
}
|
|
@@ -1638,67 +1639,67 @@ var Ia = De(({ Emoji: e, emoji: t, columnIndex: r, rowIndex: n }) => {
|
|
|
1638
1639
|
children: s.map((h, d) => i(r, { ...hr(h, d, !1) }, d))
|
|
1639
1640
|
})
|
|
1640
1641
|
}), i("div", {
|
|
1641
|
-
...
|
|
1642
|
+
...vr(-1),
|
|
1642
1643
|
children: i("div", {
|
|
1643
1644
|
"frimousse-category-header-sizer": "",
|
|
1644
1645
|
ref: u,
|
|
1645
|
-
children: i(e, { ...
|
|
1646
|
+
children: i(e, { ...fr(c, !0) })
|
|
1646
1647
|
})
|
|
1647
1648
|
})]
|
|
1648
1649
|
});
|
|
1649
1650
|
});
|
|
1650
|
-
function
|
|
1651
|
+
function Na({ category: e, ...t }) {
|
|
1651
1652
|
return i("div", {
|
|
1652
1653
|
...t,
|
|
1653
1654
|
children: e.label
|
|
1654
1655
|
});
|
|
1655
1656
|
}
|
|
1656
|
-
function
|
|
1657
|
+
function Ta({ emoji: e, ...t }) {
|
|
1657
1658
|
return i("button", {
|
|
1658
1659
|
type: "button",
|
|
1659
1660
|
...t,
|
|
1660
1661
|
children: e.emoji
|
|
1661
1662
|
});
|
|
1662
1663
|
}
|
|
1663
|
-
function
|
|
1664
|
+
function Pa({ ...e }) {
|
|
1664
1665
|
return i("div", { ...e });
|
|
1665
1666
|
}
|
|
1666
1667
|
var pr = xe(({ style: e, components: t, ...r }, n) => {
|
|
1667
|
-
let o =
|
|
1668
|
+
let o = B(), a = U(null), s = z((w) => {
|
|
1668
1669
|
w && (a.current = w, o.set({ listRef: a }));
|
|
1669
|
-
}, []), c = t?.CategoryHeader ??
|
|
1670
|
-
return
|
|
1671
|
-
...
|
|
1670
|
+
}, []), c = t?.CategoryHeader ?? Na, l = t?.Emoji ?? Ta, u = t?.Row ?? Pa, h = ee(o, "columns"), d = ee(o, "viewportStartRowIndex"), g = ee(o, "viewportEndRowIndex"), m = q(o, or), f = q(o, ha, lt), b = he(() => f?.filter((w) => w < d).length ?? 0, [f, d]), y = f?.length ?? 0;
|
|
1671
|
+
return Be(n, () => a.current), !m || !f || y === 0 ? i("div", {
|
|
1672
|
+
...Et(h, 0, e),
|
|
1672
1673
|
...r,
|
|
1673
1674
|
children: i("div", {
|
|
1674
|
-
...
|
|
1675
|
-
children: i(
|
|
1675
|
+
...Ct(0, 0, 0, 0),
|
|
1676
|
+
children: i(St, {
|
|
1676
1677
|
CategoryHeader: c,
|
|
1677
1678
|
Emoji: l,
|
|
1678
1679
|
Row: u
|
|
1679
1680
|
})
|
|
1680
1681
|
})
|
|
1681
1682
|
}) : i("div", {
|
|
1682
|
-
...
|
|
1683
|
+
...Et(h, m, e),
|
|
1683
1684
|
...r,
|
|
1684
1685
|
ref: s,
|
|
1685
1686
|
children: I("div", {
|
|
1686
|
-
...
|
|
1687
|
+
...Ct(m, y, d, b),
|
|
1687
1688
|
children: [
|
|
1688
|
-
i(
|
|
1689
|
+
i(St, {
|
|
1689
1690
|
CategoryHeader: c,
|
|
1690
1691
|
Emoji: l,
|
|
1691
1692
|
Row: u
|
|
1692
1693
|
}),
|
|
1693
1694
|
Array.from({ length: g - d + 1 }, (w, p) => {
|
|
1694
1695
|
let j = d + p;
|
|
1695
|
-
return I(
|
|
1696
|
+
return I(Zr, { children: [f.indexOf(j) >= 0 && i("div", { style: { height: "var(--frimousse-category-header-height)" } }), i(ka, {
|
|
1696
1697
|
Emoji: l,
|
|
1697
1698
|
Row: u,
|
|
1698
1699
|
rowIndex: j
|
|
1699
1700
|
})] }, j);
|
|
1700
1701
|
}),
|
|
1701
|
-
Array.from({ length: y }, (w, p) => i(
|
|
1702
|
+
Array.from({ length: y }, (w, p) => i(Ra, {
|
|
1702
1703
|
CategoryHeader: c,
|
|
1703
1704
|
categoryIndex: p
|
|
1704
1705
|
}, p))
|
|
@@ -1706,8 +1707,8 @@ var pr = xe(({ style: e, components: t, ...r }, n) => {
|
|
|
1706
1707
|
})
|
|
1707
1708
|
});
|
|
1708
1709
|
}), br = xe(({ emoji: e, onClick: t, "aria-label": r = "Change skin tone", ...n }, o) => {
|
|
1709
|
-
let a =
|
|
1710
|
-
t?.(
|
|
1710
|
+
let a = q(B(), ga, lt), [s, c, l] = sr(e), u = he(() => Math.max(0, l.findIndex((f) => f.skinTone === s)), [s, l]), h = l[u], d = l[(u + 1) % l.length].skinTone, g = d === "none" ? void 0 : a?.[d], m = z((f) => {
|
|
1711
|
+
t?.(f), f.isDefaultPrevented() || c(d);
|
|
1711
1712
|
}, [
|
|
1712
1713
|
t,
|
|
1713
1714
|
c,
|
|
@@ -1725,20 +1726,20 @@ var pr = xe(({ style: e, components: t, ...r }, n) => {
|
|
|
1725
1726
|
});
|
|
1726
1727
|
});
|
|
1727
1728
|
function yr({ children: e, ...t }) {
|
|
1728
|
-
return
|
|
1729
|
+
return q(B(), da) ? i("span", {
|
|
1729
1730
|
"frimousse-loading": "",
|
|
1730
1731
|
...t,
|
|
1731
1732
|
children: e
|
|
1732
1733
|
}) : null;
|
|
1733
1734
|
}
|
|
1734
|
-
function
|
|
1735
|
-
return e({ search:
|
|
1735
|
+
function xa({ children: e }) {
|
|
1736
|
+
return e({ search: q(B(), ca) });
|
|
1736
1737
|
}
|
|
1737
1738
|
function wr({ children: e, ...t }) {
|
|
1738
|
-
return
|
|
1739
|
+
return q(B(), ua) ? i("span", {
|
|
1739
1740
|
"frimousse-empty": "",
|
|
1740
1741
|
...t,
|
|
1741
|
-
children: typeof e == "function" ? i(
|
|
1742
|
+
children: typeof e == "function" ? i(xa, { children: e }) : e
|
|
1742
1743
|
}) : null;
|
|
1743
1744
|
}
|
|
1744
1745
|
function _r({ children: e }) {
|
|
@@ -1761,60 +1762,60 @@ wr.displayName = "EmojiPicker.Empty";
|
|
|
1761
1762
|
br.displayName = "EmojiPicker.SkinToneSelector";
|
|
1762
1763
|
_r.displayName = "EmojiPicker.ActiveEmoji";
|
|
1763
1764
|
Cr.displayName = "EmojiPicker.SkinTone";
|
|
1764
|
-
var
|
|
1765
|
-
root:
|
|
1766
|
-
search:
|
|
1767
|
-
viewport:
|
|
1768
|
-
message:
|
|
1765
|
+
var Da = "_root_1elk3_1", Oa = "_search_1elk3_29", Aa = "_viewport_1elk3_33", $a = "_message_1elk3_42", Se = {
|
|
1766
|
+
root: Da,
|
|
1767
|
+
search: Oa,
|
|
1768
|
+
viewport: Aa,
|
|
1769
|
+
message: $a
|
|
1769
1770
|
}, Ha = ({ emoji: e, "aria-colindex": t, ...r }) => /* @__PURE__ */ i("button", {
|
|
1770
1771
|
...r,
|
|
1771
1772
|
type: "button",
|
|
1772
1773
|
role: "gridcell",
|
|
1773
1774
|
"aria-colindex": S(t) ? t + 1 : void 0,
|
|
1774
1775
|
children: e.emoji
|
|
1775
|
-
}),
|
|
1776
|
+
}), Ma = ({ "aria-rowindex": e, ...t }) => /* @__PURE__ */ i("div", {
|
|
1776
1777
|
...t,
|
|
1777
1778
|
"aria-rowindex": S(e) ? e + 1 : void 0
|
|
1778
|
-
}),
|
|
1779
|
-
const t = e.querySelector(
|
|
1779
|
+
}), Fa = "[frimousse-viewport]", Va = "[frimousse-emoji][data-active]", La = "--frimousse-category-header-height", za = (e) => {
|
|
1780
|
+
const t = e.querySelector(Fa), r = t?.querySelector(Va);
|
|
1780
1781
|
if (!S(t) || !S(r)) return;
|
|
1781
|
-
const n = t.getBoundingClientRect(), o = r.getBoundingClientRect(), a = Number.parseFloat(getComputedStyle(t).getPropertyValue(
|
|
1782
|
+
const n = t.getBoundingClientRect(), o = r.getBoundingClientRect(), a = Number.parseFloat(getComputedStyle(t).getPropertyValue(La)), s = o.top - n.top - a;
|
|
1782
1783
|
if (s < 0) {
|
|
1783
1784
|
t.scrollTop += s;
|
|
1784
1785
|
return;
|
|
1785
1786
|
}
|
|
1786
1787
|
const c = o.bottom - n.bottom;
|
|
1787
1788
|
c > 0 && (t.scrollTop += c);
|
|
1788
|
-
},
|
|
1789
|
+
}, Ua = P("Arrow"), It = P("keydown"), jt = P("pointerover"), Ya = ({ rootRef: e }) => (te(() => {
|
|
1789
1790
|
const t = e.current;
|
|
1790
1791
|
if (!S(t)) return;
|
|
1791
1792
|
let r;
|
|
1792
1793
|
const n = () => {
|
|
1793
1794
|
S(r) && (cancelAnimationFrame(r), r = void 0);
|
|
1794
1795
|
}, o = (a) => {
|
|
1795
|
-
a.defaultPrevented || !a.key.startsWith(
|
|
1796
|
+
a.defaultPrevented || !a.key.startsWith(Ua) || (n(), r = requestAnimationFrame(() => {
|
|
1796
1797
|
r = requestAnimationFrame(() => {
|
|
1797
|
-
r = void 0,
|
|
1798
|
+
r = void 0, za(t);
|
|
1798
1799
|
});
|
|
1799
1800
|
}));
|
|
1800
1801
|
};
|
|
1801
|
-
return t.addEventListener(
|
|
1802
|
-
n(), t.removeEventListener(
|
|
1802
|
+
return t.addEventListener(It, o, !0), t.addEventListener(jt, n, !0), () => {
|
|
1803
|
+
n(), t.removeEventListener(It, o, !0), t.removeEventListener(jt, n, !0);
|
|
1803
1804
|
};
|
|
1804
|
-
}, [e]), null),
|
|
1805
|
+
}, [e]), null), Ba = 8, Ci = ({ emojibaseUrl: e, locale: t = "en", searchLabel: r, searchPlaceholder: n = r, loadingLabel: o, emptyLabel: a, onEmojiSelect: s, autoFocus: c = !1, className: l, ref: u, ...h }) => {
|
|
1805
1806
|
const d = U(null), g = xt(d, u);
|
|
1806
1807
|
return /* @__PURE__ */ I(ue.Root, {
|
|
1807
1808
|
...h,
|
|
1808
1809
|
ref: g,
|
|
1809
|
-
className:
|
|
1810
|
+
className: G(Se.root, l),
|
|
1810
1811
|
emojibaseUrl: e,
|
|
1811
1812
|
locale: t,
|
|
1812
|
-
columns:
|
|
1813
|
+
columns: Ba,
|
|
1813
1814
|
onEmojiSelect: ({ emoji: m }) => s(m),
|
|
1814
1815
|
children: [
|
|
1815
1816
|
/* @__PURE__ */ i("div", {
|
|
1816
1817
|
className: Se.search,
|
|
1817
|
-
children: /* @__PURE__ */ i(
|
|
1818
|
+
children: /* @__PURE__ */ i(Tt, {
|
|
1818
1819
|
render: /* @__PURE__ */ i(ue.Search, {}),
|
|
1819
1820
|
"aria-label": r,
|
|
1820
1821
|
placeholder: n,
|
|
@@ -1834,39 +1835,40 @@ var xa = "_root_1elk3_1", Da = "_search_1elk3_29", Oa = "_viewport_1elk3_33", Aa
|
|
|
1834
1835
|
children: a
|
|
1835
1836
|
}),
|
|
1836
1837
|
/* @__PURE__ */ i(ue.List, { components: {
|
|
1837
|
-
Row:
|
|
1838
|
+
Row: Ma,
|
|
1838
1839
|
Emoji: Ha
|
|
1839
1840
|
} })
|
|
1840
1841
|
]
|
|
1841
1842
|
}),
|
|
1842
|
-
/* @__PURE__ */ i(
|
|
1843
|
+
/* @__PURE__ */ i(Ya, { rootRef: d })
|
|
1843
1844
|
]
|
|
1844
1845
|
});
|
|
1845
|
-
},
|
|
1846
|
-
root:
|
|
1847
|
-
surface:
|
|
1848
|
-
icon:
|
|
1849
|
-
label:
|
|
1850
|
-
content:
|
|
1851
|
-
trailing:
|
|
1852
|
-
divider:
|
|
1853
|
-
},
|
|
1854
|
-
const
|
|
1855
|
-
"--form-field-row-label-width":
|
|
1856
|
-
|
|
1846
|
+
}, Wa = "_root_euz6z_1", Ga = "_surface_euz6z_17", qa = "_icon_euz6z_28", Ka = "_label_euz6z_35", Ja = "_content_euz6z_42", Xa = "_trailing_euz6z_53", Za = "_divider_euz6z_60", ie = {
|
|
1847
|
+
root: Wa,
|
|
1848
|
+
surface: Ga,
|
|
1849
|
+
icon: qa,
|
|
1850
|
+
label: Ka,
|
|
1851
|
+
content: Ja,
|
|
1852
|
+
trailing: Xa,
|
|
1853
|
+
divider: Za
|
|
1854
|
+
}, Ei = ({ label: e, startIcon: t, trailing: r, trailingProps: n, children: o, labelWidth: a = 80, contentPaddingInline: s, isHoverable: c = !1, hasDivider: l = !0, render: u, ref: h, className: d, style: g, ...m }) => {
|
|
1855
|
+
const f = {
|
|
1856
|
+
"--form-field-row-label-width": ut(a),
|
|
1857
|
+
"--form-field-row-content-padding-inline": S(s) ? ut(s) : void 0,
|
|
1858
|
+
...g
|
|
1857
1859
|
};
|
|
1858
1860
|
return Te({
|
|
1859
|
-
render:
|
|
1860
|
-
ref:
|
|
1861
|
+
render: u,
|
|
1862
|
+
ref: h,
|
|
1861
1863
|
props: {
|
|
1862
1864
|
role: "group",
|
|
1863
1865
|
"aria-label": e,
|
|
1864
|
-
...
|
|
1865
|
-
"data-clickable": S(
|
|
1866
|
-
"data-hoverable":
|
|
1867
|
-
className:
|
|
1868
|
-
style:
|
|
1869
|
-
children: /* @__PURE__ */ I(
|
|
1866
|
+
...m,
|
|
1867
|
+
"data-clickable": S(m.onClick) || void 0,
|
|
1868
|
+
"data-hoverable": c || void 0,
|
|
1869
|
+
className: G(ie.root, d),
|
|
1870
|
+
style: f,
|
|
1871
|
+
children: /* @__PURE__ */ I(Z, { children: [/* @__PURE__ */ I("div", {
|
|
1870
1872
|
className: ie.surface,
|
|
1871
1873
|
children: [
|
|
1872
1874
|
pe(t) && /* @__PURE__ */ i("span", {
|
|
@@ -1889,28 +1891,28 @@ var xa = "_root_1elk3_1", Da = "_search_1elk3_29", Oa = "_viewport_1elk3_33", Aa
|
|
|
1889
1891
|
}),
|
|
1890
1892
|
pe(r) && /* @__PURE__ */ i("div", {
|
|
1891
1893
|
...n,
|
|
1892
|
-
className:
|
|
1894
|
+
className: G(ie.trailing, n?.className),
|
|
1893
1895
|
children: r
|
|
1894
1896
|
})
|
|
1895
1897
|
]
|
|
1896
|
-
}),
|
|
1898
|
+
}), l && /* @__PURE__ */ i(Yr, {
|
|
1897
1899
|
className: ie.divider,
|
|
1898
1900
|
"aria-hidden": "true"
|
|
1899
1901
|
})] })
|
|
1900
1902
|
}
|
|
1901
1903
|
});
|
|
1902
|
-
}, Qa = "_root_u3myi_1",
|
|
1904
|
+
}, Qa = "_root_u3myi_1", eo = "_preview_u3myi_6", to = "_image_u3myi_35", ro = "_fileInput_u3myi_48", no = "_content_u3myi_58", ao = "_actions_u3myi_67", oo = "_helperText_u3myi_73", io = "_errorMessage_u3myi_78", ne = {
|
|
1903
1905
|
root: Qa,
|
|
1904
|
-
preview:
|
|
1905
|
-
image:
|
|
1906
|
-
fileInput:
|
|
1907
|
-
content:
|
|
1908
|
-
actions:
|
|
1909
|
-
helperText:
|
|
1910
|
-
errorMessage:
|
|
1911
|
-
},
|
|
1912
|
-
const t =
|
|
1913
|
-
return !L(e) || r ? /* @__PURE__ */ i(
|
|
1906
|
+
preview: eo,
|
|
1907
|
+
image: to,
|
|
1908
|
+
fileInput: ro,
|
|
1909
|
+
content: no,
|
|
1910
|
+
actions: ao,
|
|
1911
|
+
helperText: oo,
|
|
1912
|
+
errorMessage: io
|
|
1913
|
+
}, lo = ({ src: e }) => {
|
|
1914
|
+
const t = Rt(), [r, n] = K(!1);
|
|
1915
|
+
return !L(e) || r ? /* @__PURE__ */ i(xr, {
|
|
1914
1916
|
size: t.icon.size.lg,
|
|
1915
1917
|
"aria-hidden": !0
|
|
1916
1918
|
}) : /* @__PURE__ */ i("img", {
|
|
@@ -1919,19 +1921,19 @@ var xa = "_root_1elk3_1", Da = "_search_1elk3_29", Oa = "_viewport_1elk3_33", Aa
|
|
|
1919
1921
|
alt: "",
|
|
1920
1922
|
onError: () => n(!0)
|
|
1921
1923
|
});
|
|
1922
|
-
},
|
|
1923
|
-
const C = U(null),
|
|
1924
|
-
|
|
1924
|
+
}, so = "image/*", Si = ({ src: e, onFileSelect: t, onRemove: r, onAbort: n, disabled: o = !1, isUploading: a = !1, helperText: s, errorMessage: c, uploadLabel: l = P("Upload"), removeLabel: u = P("Remove"), abortLabel: h = P("Abort"), accept: d = so, inputRef: g, onChange: m, "aria-describedby": f, className: b, style: y, dir: w, render: p, ref: j, ...k }) => {
|
|
1925
|
+
const C = U(null), v = xt(C, g), E = oe(), _ = `${E}-helper`, N = `${E}-error`, $ = L(e), M = L(s), O = L(c), H = o || !S(t), x = o || !$ || !S(r), R = H || a, A = x || a, re = a && S(n), Y = [
|
|
1926
|
+
f,
|
|
1925
1927
|
M && _,
|
|
1926
|
-
O &&
|
|
1927
|
-
].filter(L).join(" ") || void 0,
|
|
1928
|
+
O && N
|
|
1929
|
+
].filter(L).join(" ") || void 0, ve = () => {
|
|
1928
1930
|
R || C.current?.click();
|
|
1929
|
-
}, D = (
|
|
1930
|
-
const Oe =
|
|
1931
|
+
}, D = (W) => {
|
|
1932
|
+
const Oe = W.currentTarget.files?.[0];
|
|
1931
1933
|
try {
|
|
1932
|
-
m?.(
|
|
1934
|
+
m?.(W);
|
|
1933
1935
|
} finally {
|
|
1934
|
-
|
|
1936
|
+
W.currentTarget.value = "";
|
|
1935
1937
|
}
|
|
1936
1938
|
R || !S(Oe) || t?.(Oe);
|
|
1937
1939
|
};
|
|
@@ -1939,19 +1941,19 @@ var xa = "_root_1elk3_1", Da = "_search_1elk3_29", Oa = "_viewport_1elk3_33", Aa
|
|
|
1939
1941
|
render: p,
|
|
1940
1942
|
ref: j,
|
|
1941
1943
|
props: {
|
|
1942
|
-
className:
|
|
1944
|
+
className: G(ne.root, b),
|
|
1943
1945
|
style: y,
|
|
1944
1946
|
dir: w,
|
|
1945
1947
|
"aria-busy": a || k["aria-busy"],
|
|
1946
|
-
children: /* @__PURE__ */ I(
|
|
1948
|
+
children: /* @__PURE__ */ I(Z, { children: [/* @__PURE__ */ i("button", {
|
|
1947
1949
|
className: ne.preview,
|
|
1948
1950
|
type: "button",
|
|
1949
|
-
disabled:
|
|
1951
|
+
disabled: H,
|
|
1950
1952
|
"aria-disabled": a || void 0,
|
|
1951
1953
|
"aria-label": l,
|
|
1952
1954
|
"aria-describedby": Y,
|
|
1953
|
-
onClick:
|
|
1954
|
-
children: /* @__PURE__ */ i(
|
|
1955
|
+
onClick: ve,
|
|
1956
|
+
children: /* @__PURE__ */ i(lo, { src: e }, e)
|
|
1955
1957
|
}), /* @__PURE__ */ I("div", {
|
|
1956
1958
|
className: ne.content,
|
|
1957
1959
|
children: [
|
|
@@ -1961,7 +1963,7 @@ var xa = "_root_1elk3_1", Da = "_search_1elk3_29", Oa = "_viewport_1elk3_33", Aa
|
|
|
1961
1963
|
/* @__PURE__ */ i("input", {
|
|
1962
1964
|
"aria-label": l,
|
|
1963
1965
|
...k,
|
|
1964
|
-
ref:
|
|
1966
|
+
ref: v,
|
|
1965
1967
|
className: ne.fileInput,
|
|
1966
1968
|
dir: w,
|
|
1967
1969
|
children: void 0,
|
|
@@ -1978,24 +1980,24 @@ var xa = "_root_1elk3_1", Da = "_search_1elk3_29", Oa = "_viewport_1elk3_33", Aa
|
|
|
1978
1980
|
}),
|
|
1979
1981
|
re ? /* @__PURE__ */ i(ae, {
|
|
1980
1982
|
type: "button",
|
|
1981
|
-
startIcon: /* @__PURE__ */ i(
|
|
1983
|
+
startIcon: /* @__PURE__ */ i($r, {}),
|
|
1982
1984
|
onClick: n,
|
|
1983
1985
|
disabled: o,
|
|
1984
1986
|
variant: "outline",
|
|
1985
1987
|
children: h
|
|
1986
1988
|
}) : /* @__PURE__ */ i(ae, {
|
|
1987
1989
|
type: "button",
|
|
1988
|
-
startIcon: /* @__PURE__ */ i(
|
|
1989
|
-
onClick:
|
|
1990
|
+
startIcon: /* @__PURE__ */ i(Fr, {}),
|
|
1991
|
+
onClick: ve,
|
|
1990
1992
|
disabled: R,
|
|
1991
|
-
focusableWhenDisabled: a &&
|
|
1993
|
+
focusableWhenDisabled: a && !H,
|
|
1992
1994
|
"aria-describedby": Y,
|
|
1993
1995
|
variant: "outline",
|
|
1994
1996
|
children: l
|
|
1995
1997
|
}),
|
|
1996
1998
|
/* @__PURE__ */ i(ae, {
|
|
1997
1999
|
type: "button",
|
|
1998
|
-
startIcon: /* @__PURE__ */ i(
|
|
2000
|
+
startIcon: /* @__PURE__ */ i(Dr, {}),
|
|
1999
2001
|
onClick: r,
|
|
2000
2002
|
disabled: A,
|
|
2001
2003
|
focusableWhenDisabled: a && !x,
|
|
@@ -2011,7 +2013,7 @@ var xa = "_root_1elk3_1", Da = "_search_1elk3_29", Oa = "_viewport_1elk3_33", Aa
|
|
|
2011
2013
|
}),
|
|
2012
2014
|
O && /* @__PURE__ */ i("span", {
|
|
2013
2015
|
className: ne.errorMessage,
|
|
2014
|
-
id:
|
|
2016
|
+
id: N,
|
|
2015
2017
|
role: "alert",
|
|
2016
2018
|
children: c
|
|
2017
2019
|
})
|
|
@@ -2019,41 +2021,41 @@ var xa = "_root_1elk3_1", Da = "_search_1elk3_29", Oa = "_viewport_1elk3_33", Aa
|
|
|
2019
2021
|
})] })
|
|
2020
2022
|
}
|
|
2021
2023
|
});
|
|
2022
|
-
},
|
|
2023
|
-
const a = ye(
|
|
2024
|
+
}, co = "_button_k3e4y_1", uo = { button: co }, Ii = ({ className: e, emphasis: t = "standard", size: r, variant: n, ...o }) => {
|
|
2025
|
+
const a = ye(Nt), s = r ?? a?.size ?? "sm", c = n ?? a?.variant ?? "ghost";
|
|
2024
2026
|
return /* @__PURE__ */ i(ae, {
|
|
2025
2027
|
...o,
|
|
2026
2028
|
size: s,
|
|
2027
2029
|
variant: c,
|
|
2028
2030
|
"data-emphasis": t,
|
|
2029
|
-
className: ge(
|
|
2031
|
+
className: ge(uo.button, e)
|
|
2030
2032
|
});
|
|
2031
|
-
},
|
|
2032
|
-
const o = ye(
|
|
2033
|
+
}, mo = "_button_1mfb6_1", ho = { button: mo }, ji = ({ className: e, elevated: t = !0, variant: r, ...n }) => {
|
|
2034
|
+
const o = ye(Nt), a = r ?? o?.variant ?? "solid";
|
|
2033
2035
|
return /* @__PURE__ */ i(ae, {
|
|
2034
2036
|
...n,
|
|
2035
2037
|
elevated: t,
|
|
2036
2038
|
variant: a,
|
|
2037
|
-
className: ge(
|
|
2039
|
+
className: ge(ho.button, e)
|
|
2038
2040
|
});
|
|
2039
2041
|
}, et = {
|
|
2040
2042
|
maximumFractionDigits: 15,
|
|
2041
2043
|
numberingSystem: "latn",
|
|
2042
2044
|
useGrouping: "min2"
|
|
2043
|
-
},
|
|
2044
|
-
root:
|
|
2045
|
+
}, go = ({ nextValue: e, currentValue: t, reason: r }) => r === "input-blur" && dt(e, void 0, et) === dt(t, void 0, et), vo = "_root_17bio_1", fo = "_valueInput_17bio_7", po = "_button_17bio_14", bo = "_icon_17bio_32", fe = {
|
|
2046
|
+
root: vo,
|
|
2045
2047
|
valueInput: fo,
|
|
2046
|
-
button:
|
|
2047
|
-
icon:
|
|
2048
|
-
},
|
|
2048
|
+
button: po,
|
|
2049
|
+
icon: bo
|
|
2050
|
+
}, ki = ({ value: e, defaultValue: t, onValueChange: r, onValueCommitted: n, allowOutOfRange: o = !1, min: a, max: s, step: c = 1, disabled: l, readOnly: u, required: h, name: d, form: g, id: m, showButtons: f = !0, decrementLabel: b = P("Decrease value"), incrementLabel: y = P("Increase value"), className: w, ...p }) => {
|
|
2049
2051
|
const [j, k] = Dt({
|
|
2050
2052
|
controlled: e,
|
|
2051
2053
|
default: t ?? null,
|
|
2052
2054
|
name: P("NumberStepper"),
|
|
2053
2055
|
state: "value"
|
|
2054
|
-
}), C =
|
|
2056
|
+
}), C = ln(j), v = (E, _) => {
|
|
2055
2057
|
if (E !== C.current) {
|
|
2056
|
-
if (
|
|
2058
|
+
if (go({
|
|
2057
2059
|
nextValue: E,
|
|
2058
2060
|
currentValue: C.current,
|
|
2059
2061
|
reason: _.reason
|
|
@@ -2064,9 +2066,9 @@ var xa = "_root_1elk3_1", Da = "_search_1elk3_29", Oa = "_viewport_1elk3_33", Aa
|
|
|
2064
2066
|
r?.(E, _), !_.isCanceled && (C.current = E, k(E));
|
|
2065
2067
|
}
|
|
2066
2068
|
};
|
|
2067
|
-
return /* @__PURE__ */ I(
|
|
2069
|
+
return /* @__PURE__ */ I(He.Root, {
|
|
2068
2070
|
value: j,
|
|
2069
|
-
onValueChange:
|
|
2071
|
+
onValueChange: v,
|
|
2070
2072
|
onValueCommitted: n,
|
|
2071
2073
|
min: a,
|
|
2072
2074
|
max: s,
|
|
@@ -2081,108 +2083,108 @@ var xa = "_root_1elk3_1", Da = "_search_1elk3_29", Oa = "_viewport_1elk3_33", Aa
|
|
|
2081
2083
|
form: g,
|
|
2082
2084
|
id: m,
|
|
2083
2085
|
format: et,
|
|
2084
|
-
className:
|
|
2086
|
+
className: fe.root,
|
|
2085
2087
|
children: [
|
|
2086
|
-
|
|
2088
|
+
f && /* @__PURE__ */ i(He.Decrement, {
|
|
2087
2089
|
"aria-label": b,
|
|
2088
2090
|
render: /* @__PURE__ */ i(ae, {
|
|
2089
2091
|
type: "button",
|
|
2090
2092
|
size: "sm",
|
|
2091
|
-
className:
|
|
2093
|
+
className: fe.button,
|
|
2092
2094
|
startIcon: /* @__PURE__ */ i("span", {
|
|
2093
|
-
className:
|
|
2094
|
-
children: /* @__PURE__ */ i(
|
|
2095
|
+
className: fe.icon,
|
|
2096
|
+
children: /* @__PURE__ */ i(Or, {})
|
|
2095
2097
|
})
|
|
2096
2098
|
})
|
|
2097
2099
|
}),
|
|
2098
|
-
/* @__PURE__ */ i(
|
|
2100
|
+
/* @__PURE__ */ i(He.Input, {
|
|
2099
2101
|
...p,
|
|
2100
2102
|
form: g,
|
|
2101
|
-
className: ge(
|
|
2103
|
+
className: ge(G(Fe.input, Fe.sm, fe.valueInput), w)
|
|
2102
2104
|
}),
|
|
2103
|
-
|
|
2105
|
+
f && /* @__PURE__ */ i(He.Increment, {
|
|
2104
2106
|
"aria-label": y,
|
|
2105
2107
|
render: /* @__PURE__ */ i(ae, {
|
|
2106
2108
|
type: "button",
|
|
2107
2109
|
size: "sm",
|
|
2108
|
-
className:
|
|
2110
|
+
className: fe.button,
|
|
2109
2111
|
startIcon: /* @__PURE__ */ i("span", {
|
|
2110
|
-
className:
|
|
2111
|
-
children: /* @__PURE__ */ i(
|
|
2112
|
+
className: fe.icon,
|
|
2113
|
+
children: /* @__PURE__ */ i(Vr, {})
|
|
2112
2114
|
})
|
|
2113
2115
|
})
|
|
2114
2116
|
})
|
|
2115
2117
|
]
|
|
2116
2118
|
});
|
|
2117
|
-
},
|
|
2118
|
-
trigger:
|
|
2119
|
-
triggerFlag:
|
|
2120
|
-
optionFlag:
|
|
2121
|
-
chevron:
|
|
2122
|
-
selectedCountryLabel:
|
|
2123
|
-
options:
|
|
2124
|
-
emptyStatus:
|
|
2125
|
-
},
|
|
2119
|
+
}, yo = "_trigger_kh8iq_1", wo = "_triggerFlag_kh8iq_35", _o = "_optionFlag_kh8iq_36", Co = "_chevron_kh8iq_56", Eo = "_selectedCountryLabel_kh8iq_61", So = "_options_kh8iq_70", Io = "_emptyStatus_kh8iq_76", me = {
|
|
2120
|
+
trigger: yo,
|
|
2121
|
+
triggerFlag: wo,
|
|
2122
|
+
optionFlag: _o,
|
|
2123
|
+
chevron: Co,
|
|
2124
|
+
selectedCountryLabel: Eo,
|
|
2125
|
+
options: So,
|
|
2126
|
+
emptyStatus: Io
|
|
2127
|
+
}, jo = ({ label: e, callingCode: t }) => `${e} (+${t})`, ko = "", Ro = "", No = ({ label: e, callingCode: t }) => `${e} (${ko}+${t}${Ro})`, To = ({ country: e, normalizedSearch: t, callingCodeSearch: r }) => e.searchLabel.includes(t) || e.searchValue.includes(t) || L(r) && e.callingCode.includes(r), Er = Ye(null), Sr = () => {
|
|
2126
2128
|
const e = ye(Er);
|
|
2127
2129
|
if (!S(e)) throw new Error(P("PhoneCountryPicker parts require PhoneCountryPicker.Root."));
|
|
2128
2130
|
return e;
|
|
2129
2131
|
}, Ir = ({ searchLabel: e = P("Search"), listLabel: t = P("Countries"), emptyLabel: r = P("No results"), disabled: n = !1, className: o, render: a, ref: s, ...c }) => {
|
|
2130
|
-
const { countries: l, value: u, onValueChange: h, disabled: d, closeOnSelect: g } = Sr(), m = d || n,
|
|
2131
|
-
country:
|
|
2132
|
+
const { countries: l, value: u, onValueChange: h, disabled: d, closeOnSelect: g } = Sr(), m = d || n, f = oe(), [b, y] = K(""), w = be(b).trim(), p = w.startsWith("+") ? w.slice(1) : w, j = l.filter((v) => To({
|
|
2133
|
+
country: v,
|
|
2132
2134
|
normalizedSearch: w,
|
|
2133
2135
|
callingCodeSearch: p
|
|
2134
|
-
})), k = j.find((
|
|
2136
|
+
})), k = j.find((v) => v.value === u), C = S(k) ? [k, ...j.filter((v) => v.value !== u)] : j;
|
|
2135
2137
|
return Te({
|
|
2136
2138
|
render: a,
|
|
2137
2139
|
ref: s,
|
|
2138
2140
|
props: {
|
|
2139
2141
|
...c,
|
|
2140
|
-
className:
|
|
2141
|
-
children: /* @__PURE__ */ I(
|
|
2142
|
-
/* @__PURE__ */ i(
|
|
2142
|
+
className: G(me.options, o),
|
|
2143
|
+
children: /* @__PURE__ */ I(Z, { children: [
|
|
2144
|
+
/* @__PURE__ */ i(T.Search, {
|
|
2143
2145
|
value: b,
|
|
2144
2146
|
onValueChange: y,
|
|
2145
2147
|
placeholder: e,
|
|
2146
2148
|
"aria-label": e,
|
|
2147
2149
|
disabled: m
|
|
2148
2150
|
}),
|
|
2149
|
-
/* @__PURE__ */ i(
|
|
2150
|
-
/* @__PURE__ */ i(
|
|
2151
|
+
/* @__PURE__ */ i(T.Separator, {}),
|
|
2152
|
+
/* @__PURE__ */ i(T.Section, {
|
|
2151
2153
|
scrollable: !0,
|
|
2152
|
-
children: /* @__PURE__ */ i(
|
|
2153
|
-
id:
|
|
2154
|
+
children: /* @__PURE__ */ i(T.SelectionGroup, {
|
|
2155
|
+
id: f,
|
|
2154
2156
|
"aria-label": t,
|
|
2155
2157
|
value: u,
|
|
2156
2158
|
onValueChange: h,
|
|
2157
2159
|
closeOnSelect: g,
|
|
2158
|
-
children: C.map((
|
|
2159
|
-
const E =
|
|
2160
|
-
return /* @__PURE__ */ i(
|
|
2161
|
-
value:
|
|
2160
|
+
children: C.map((v) => {
|
|
2161
|
+
const E = jo(v);
|
|
2162
|
+
return /* @__PURE__ */ i(T.OptionItem, {
|
|
2163
|
+
value: v.value,
|
|
2162
2164
|
"aria-label": E,
|
|
2163
|
-
disabled: m ||
|
|
2165
|
+
disabled: m || v.disabled,
|
|
2164
2166
|
startIcon: /* @__PURE__ */ i("span", {
|
|
2165
2167
|
className: me.optionFlag,
|
|
2166
2168
|
"aria-hidden": !0,
|
|
2167
|
-
children:
|
|
2169
|
+
children: v.flag
|
|
2168
2170
|
}),
|
|
2169
2171
|
children: /* @__PURE__ */ i(rt, {
|
|
2170
|
-
text: /* @__PURE__ */ I(
|
|
2171
|
-
|
|
2172
|
+
text: /* @__PURE__ */ I(Z, { children: [
|
|
2173
|
+
v.label,
|
|
2172
2174
|
" (",
|
|
2173
2175
|
/* @__PURE__ */ I("bdi", {
|
|
2174
2176
|
dir: "ltr",
|
|
2175
|
-
children: ["+",
|
|
2177
|
+
children: ["+", v.callingCode]
|
|
2176
2178
|
}),
|
|
2177
2179
|
")"
|
|
2178
2180
|
] }),
|
|
2179
|
-
tooltipContent:
|
|
2181
|
+
tooltipContent: No(v)
|
|
2180
2182
|
})
|
|
2181
|
-
},
|
|
2183
|
+
}, v.value);
|
|
2182
2184
|
})
|
|
2183
2185
|
})
|
|
2184
2186
|
}),
|
|
2185
|
-
/* @__PURE__ */ i(
|
|
2187
|
+
/* @__PURE__ */ i(T.Empty, {
|
|
2186
2188
|
className: me.emptyStatus,
|
|
2187
2189
|
children: Pe(C) ? null : r
|
|
2188
2190
|
})
|
|
@@ -2209,15 +2211,15 @@ var xa = "_root_1elk3_1", Da = "_search_1elk3_29", Oa = "_viewport_1elk3_33", Aa
|
|
|
2209
2211
|
});
|
|
2210
2212
|
}, kr = ({ children: e, disabled: t = !1, className: r, "aria-describedby": n, ...o }) => {
|
|
2211
2213
|
const { countries: a, value: s, disabled: c } = Sr(), l = a.find((d) => d.value === s), u = oe(), h = [S(l) && u, n].filter(L).join(" ") || void 0;
|
|
2212
|
-
return /* @__PURE__ */ I(
|
|
2214
|
+
return /* @__PURE__ */ I(T.Trigger, {
|
|
2213
2215
|
...o,
|
|
2214
2216
|
disabled: c || t,
|
|
2215
2217
|
"aria-describedby": h,
|
|
2216
2218
|
className: ge(me.trigger, r),
|
|
2217
|
-
children: [e ?? /* @__PURE__ */ I(
|
|
2219
|
+
children: [e ?? /* @__PURE__ */ I(Z, { children: [/* @__PURE__ */ i("span", {
|
|
2218
2220
|
className: me.triggerFlag,
|
|
2219
2221
|
"aria-hidden": !0,
|
|
2220
|
-
children: l?.flag ?? /* @__PURE__ */ i(
|
|
2222
|
+
children: l?.flag ?? /* @__PURE__ */ i(Lr, {})
|
|
2221
2223
|
}), /* @__PURE__ */ i(tt, {
|
|
2222
2224
|
className: me.chevron,
|
|
2223
2225
|
"aria-hidden": !0
|
|
@@ -2227,38 +2229,38 @@ var xa = "_root_1elk3_1", Da = "_search_1elk3_29", Oa = "_viewport_1elk3_33", Aa
|
|
|
2227
2229
|
children: l.label
|
|
2228
2230
|
})]
|
|
2229
2231
|
});
|
|
2230
|
-
},
|
|
2232
|
+
}, Po = ({ countries: e, value: t, defaultValue: r, onValueChange: n, disabled: o, closeOnSelect: a, dropdownProps: s, contentProps: c, optionsProps: l, ...u }) => /* @__PURE__ */ i(jr, {
|
|
2231
2233
|
countries: e,
|
|
2232
2234
|
value: t,
|
|
2233
2235
|
defaultValue: r,
|
|
2234
2236
|
onValueChange: n,
|
|
2235
2237
|
disabled: o,
|
|
2236
2238
|
closeOnSelect: a,
|
|
2237
|
-
children: /* @__PURE__ */ I(
|
|
2239
|
+
children: /* @__PURE__ */ I(T.Root, {
|
|
2238
2240
|
...s,
|
|
2239
2241
|
type: "picker",
|
|
2240
|
-
children: [/* @__PURE__ */ i(kr, { ...u }), /* @__PURE__ */ i(
|
|
2242
|
+
children: [/* @__PURE__ */ i(kr, { ...u }), /* @__PURE__ */ i(T.Content, {
|
|
2241
2243
|
width: 280,
|
|
2242
2244
|
...c,
|
|
2243
2245
|
children: /* @__PURE__ */ i(Ir, { ...l })
|
|
2244
2246
|
})]
|
|
2245
2247
|
})
|
|
2246
|
-
}),
|
|
2248
|
+
}), Ri = Object.assign(Po, {
|
|
2247
2249
|
Root: jr,
|
|
2248
2250
|
Trigger: kr,
|
|
2249
2251
|
Options: Ir
|
|
2250
|
-
}),
|
|
2251
|
-
button:
|
|
2252
|
-
content:
|
|
2253
|
-
emoji:
|
|
2254
|
-
},
|
|
2252
|
+
}), xo = "_button_arlbx_1", Do = "_content_arlbx_15", Oo = "_emoji_arlbx_21", Ke = {
|
|
2253
|
+
button: xo,
|
|
2254
|
+
content: Do,
|
|
2255
|
+
emoji: Oo
|
|
2256
|
+
}, Ni = ({ emoji: e, count: t, pressed: r, onPressedChange: n, onClick: o, className: a, ...s }) => /* @__PURE__ */ i(ae, {
|
|
2255
2257
|
...s,
|
|
2256
2258
|
type: "button",
|
|
2257
2259
|
size: "sm",
|
|
2258
2260
|
variant: "ghost",
|
|
2259
2261
|
color: "neutral",
|
|
2260
2262
|
"aria-pressed": r,
|
|
2261
|
-
className:
|
|
2263
|
+
className: G(Ke.button, a),
|
|
2262
2264
|
onClick: (c) => {
|
|
2263
2265
|
o?.(c), !c.defaultPrevented && n(!r);
|
|
2264
2266
|
},
|
|
@@ -2270,24 +2272,24 @@ var xa = "_root_1elk3_1", Da = "_search_1elk3_29", Oa = "_viewport_1elk3_33", Aa
|
|
|
2270
2272
|
children: e
|
|
2271
2273
|
}), /* @__PURE__ */ i("span", { children: t })]
|
|
2272
2274
|
})
|
|
2273
|
-
}),
|
|
2274
|
-
wrapper:
|
|
2275
|
-
inputGroup:
|
|
2275
|
+
}), Ao = "_wrapper_c0mqd_1", $o = "_inputGroup_c0mqd_8", Ho = "_searchIcon_c0mqd_14", Je = {
|
|
2276
|
+
wrapper: Ao,
|
|
2277
|
+
inputGroup: $o,
|
|
2276
2278
|
searchIcon: Ho
|
|
2277
|
-
},
|
|
2278
|
-
const l =
|
|
2279
|
+
}, Ti = ({ placeholder: e, actions: t, size: r = "md", hasFocusRing: n = !1, id: o, "aria-label": a, "aria-labelledby": s, ...c }) => {
|
|
2280
|
+
const l = Rt(), u = oe(), h = o ?? u;
|
|
2279
2281
|
return /* @__PURE__ */ I("div", {
|
|
2280
2282
|
className: Je.wrapper,
|
|
2281
|
-
children: [/* @__PURE__ */ i(
|
|
2283
|
+
children: [/* @__PURE__ */ i(Gr, {
|
|
2282
2284
|
className: Je.inputGroup,
|
|
2283
2285
|
size: r,
|
|
2284
2286
|
hasFocusRing: n,
|
|
2285
|
-
startElement: /* @__PURE__ */ i(
|
|
2287
|
+
startElement: /* @__PURE__ */ i(Ar, {
|
|
2286
2288
|
className: Je.searchIcon,
|
|
2287
2289
|
size: l.icon.size.md,
|
|
2288
2290
|
"aria-hidden": !0
|
|
2289
2291
|
}),
|
|
2290
|
-
children: /* @__PURE__ */ i(
|
|
2292
|
+
children: /* @__PURE__ */ i(Tt, {
|
|
2291
2293
|
...c,
|
|
2292
2294
|
id: h,
|
|
2293
2295
|
placeholder: e,
|
|
@@ -2296,29 +2298,29 @@ var xa = "_root_1elk3_1", Da = "_search_1elk3_29", Oa = "_viewport_1elk3_33", Aa
|
|
|
2296
2298
|
})
|
|
2297
2299
|
}), t]
|
|
2298
2300
|
});
|
|
2299
|
-
},
|
|
2300
|
-
container:
|
|
2301
|
-
item:
|
|
2302
|
-
fullWidth:
|
|
2303
|
-
sm:
|
|
2304
|
-
md:
|
|
2305
|
-
iconOnly:
|
|
2306
|
-
icon:
|
|
2307
|
-
label:
|
|
2308
|
-
},
|
|
2301
|
+
}, Mo = "_container_44p06_1", Fo = "_item_44p06_24", Vo = "_fullWidth_44p06_38", Lo = "_sm_44p06_42", zo = "_md_44p06_48", Uo = "_iconOnly_44p06_94", Yo = "_icon_44p06_94", Bo = "_label_44p06_113", le = {
|
|
2302
|
+
container: Mo,
|
|
2303
|
+
item: Fo,
|
|
2304
|
+
fullWidth: Vo,
|
|
2305
|
+
sm: Lo,
|
|
2306
|
+
md: zo,
|
|
2307
|
+
iconOnly: Uo,
|
|
2308
|
+
icon: Yo,
|
|
2309
|
+
label: Bo
|
|
2310
|
+
}, Pi = ({ className: e, fullWidth: t = !1, itemWidth: r = "equal", options: n, size: o = "md", variant: a = "round", ...s }) => {
|
|
2309
2311
|
const c = oe();
|
|
2310
|
-
return /* @__PURE__ */ i(
|
|
2312
|
+
return /* @__PURE__ */ i(sn, {
|
|
2311
2313
|
...s,
|
|
2312
|
-
className: ge(
|
|
2314
|
+
className: ge(G(le.container, le[o], t && le.fullWidth), e),
|
|
2313
2315
|
"data-item-width": r,
|
|
2314
2316
|
"data-variant": a,
|
|
2315
2317
|
children: n.map(({ "aria-label": l, disabled: u, label: h, startIcon: d, value: g }, m) => {
|
|
2316
|
-
const
|
|
2317
|
-
return /* @__PURE__ */ I(
|
|
2318
|
+
const f = `${c}-${m}`, b = L(l);
|
|
2319
|
+
return /* @__PURE__ */ I(qr.Root, {
|
|
2318
2320
|
value: g,
|
|
2319
2321
|
disabled: u,
|
|
2320
|
-
"aria-labelledby":
|
|
2321
|
-
className:
|
|
2322
|
+
"aria-labelledby": f,
|
|
2323
|
+
className: G(le.item, !pe(h) && le.iconOnly),
|
|
2322
2324
|
children: [
|
|
2323
2325
|
pe(d) && /* @__PURE__ */ i("span", {
|
|
2324
2326
|
className: le.icon,
|
|
@@ -2326,12 +2328,12 @@ var xa = "_root_1elk3_1", Da = "_search_1elk3_29", Oa = "_viewport_1elk3_33", Aa
|
|
|
2326
2328
|
children: d
|
|
2327
2329
|
}),
|
|
2328
2330
|
pe(h) && /* @__PURE__ */ i("span", {
|
|
2329
|
-
id: b ? void 0 :
|
|
2331
|
+
id: b ? void 0 : f,
|
|
2330
2332
|
className: le.label,
|
|
2331
2333
|
children: h
|
|
2332
2334
|
}),
|
|
2333
2335
|
b && /* @__PURE__ */ i("span", {
|
|
2334
|
-
id:
|
|
2336
|
+
id: f,
|
|
2335
2337
|
hidden: !0,
|
|
2336
2338
|
children: l
|
|
2337
2339
|
})
|
|
@@ -2341,17 +2343,17 @@ var xa = "_root_1elk3_1", Da = "_search_1elk3_29", Oa = "_viewport_1elk3_33", Aa
|
|
|
2341
2343
|
});
|
|
2342
2344
|
};
|
|
2343
2345
|
export {
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2346
|
+
ki as a,
|
|
2347
|
+
Si as c,
|
|
2348
|
+
_i as d,
|
|
2349
|
+
wi as f,
|
|
2350
|
+
Ri as i,
|
|
2351
|
+
Ei as l,
|
|
2352
|
+
Ti as n,
|
|
2353
|
+
ji as o,
|
|
2354
|
+
yi as p,
|
|
2355
|
+
Ni as r,
|
|
2356
|
+
Ii as s,
|
|
2357
|
+
Pi as t,
|
|
2358
|
+
Ci as u
|
|
2357
2359
|
};
|