twenty-ui 2.51.3 → 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-ayl8BCtV.js → AllIcons-B9FfQJ70.js} +1 -1
- package/dist/{AllIcons-1tBWXXrE.cjs → AllIcons-HGLkp696.cjs} +1 -1
- package/dist/{Button-CU8BS-Yd.js → Button-Dd8cNsn1.js} +2 -2
- package/dist/{Button-iVyxlrwO.cjs → Button-Du8T-dOv.cjs} +1 -1
- package/dist/Dropdown-COpO_G9D.js +1164 -0
- package/dist/Dropdown-DaSktKdb.cjs +1 -0
- package/dist/Input-BKRR1xlO.js +26 -0
- package/dist/Input-DS19vWhl.cjs +1 -0
- package/dist/{ListItem-B-SFWJZb.cjs → ListItem-Br5oDPc-.cjs} +1 -1
- package/dist/{ListItem-WLONJMo5.js → ListItem-txrdGXhb.js} +3 -3
- package/dist/{Loader-Bb72CUQ9.cjs → Loader-Dau0YQpY.cjs} +1 -1
- package/dist/{Loader-DtHWQH8w.js → Loader-U1LuZtJf.js} +1 -1
- package/dist/{OverflowingTextWithTooltip-D4eZc-7P.js → OverflowingTextWithTooltip-CAQ-5aUp.js} +35 -34
- package/dist/OverflowingTextWithTooltip-CuWHF8_e.cjs +1 -0
- package/dist/{Popover-CneCJTvD.cjs → Popover-B-VIhr5g.cjs} +1 -1
- package/dist/{Popover-CWeCV7X9.js → Popover-DhFCYRtv.js} +1 -1
- package/dist/{ProgressBar-goqxS9NE.cjs → ProgressBar-BG38LPgC.cjs} +1 -1
- package/dist/{ProgressBar-8pjpGrmZ.js → ProgressBar-CPm791xc.js} +10 -10
- package/dist/Radio-BdbEXBOH.cjs +1 -0
- package/dist/Radio-D1PpZdqz.js +176 -0
- package/dist/{Shortcut-N8TELGPI.cjs → Shortcut-CbbRd1uM.cjs} +1 -1
- package/dist/{Shortcut-Bp9iDdQg.js → Shortcut-YMhkp7f6.js} +1 -1
- package/dist/TablerIcons-B6BhOlW_.js +463 -0
- package/dist/{Tooltip-08dDawT_.cjs → Tooltip-BXeUFCdb.cjs} +1 -1
- package/dist/{Tooltip-C7zc16gI.js → Tooltip-CT9YCDaV.js} +1 -1
- package/dist/components/code-editor.cjs +1 -1
- package/dist/components/code-editor.mjs +2 -2
- package/dist/components/data-display.cjs +1 -1
- 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/SegmentedControl/SegmentedControl.d.ts +1 -1
- package/dist/components/input/SegmentedControl/types/SegmentedControlProps.d.ts +1 -0
- package/dist/components/input.cjs +1 -1
- package/dist/components/input.mjs +6 -6
- package/dist/components/layout.cjs +1 -1
- package/dist/components/layout.mjs +1 -1
- package/dist/components/navigation/Dropdown/Dropdown.d.ts +1 -1
- package/dist/components/navigation/Dropdown/__stories__/DropdownPlacementExample.d.ts +6 -0
- package/dist/components/navigation/Dropdown/hooks/useDropdownPlacementOrThrow.d.ts +1 -0
- package/dist/components/navigation/Dropdown/internal/DropdownContent.d.ts +1 -1
- package/dist/components/navigation/Dropdown/internal/DropdownContentRenderer.d.ts +10 -0
- package/dist/components/navigation/Dropdown/internal/DropdownPlacementContext.d.ts +1 -0
- package/dist/components/navigation/Dropdown/internal/compareDropdownElementOrder.d.ts +4 -0
- package/dist/components/navigation/Dropdown/internal/getDropdownTabNavigation.d.ts +7 -0
- package/dist/components/navigation/Dropdown/internal/getDropdownTriggerTabTarget.d.ts +1 -0
- package/dist/components/navigation/index.d.ts +1 -0
- package/dist/components/navigation.cjs +1 -1
- package/dist/components/navigation.mjs +8 -7
- package/dist/components/settings.cjs +1 -1
- package/dist/components/settings.mjs +1 -1
- package/dist/components.cjs +1 -1
- package/dist/components.mjs +27 -26
- package/dist/{data-display-DUMj_z1t.js → data-display-BhQyFKeZ.js} +54 -54
- package/dist/{data-display-DzHM5j7j.cjs → data-display-CZEwUZlM.cjs} +1 -1
- package/dist/{data-display-b-9s0RTe.js → data-display-DVEhI2Rt.js} +37 -37
- package/dist/{data-display-D_kbXJJd.cjs → data-display-VghHkQY5.cjs} +1 -1
- package/dist/{feedback-EaZszoXf.js → feedback-B3Qc_Igx.js} +34 -34
- package/dist/{feedback-BzR4ggrP.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-ICz2_dVB.js → icon-BlUO7C4w.js} +3 -3
- package/dist/{icon-TSBamkxk.cjs → icon-C688lfSq.cjs} +1 -1
- package/dist/icon.cjs +1 -1
- package/dist/icon.mjs +509 -506
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +660 -656
- package/dist/input-B8_4jnPT.cjs +1 -0
- package/dist/{input-DxoXgI5-.js → input-Btg-WsT6.js} +122 -121
- package/dist/{input-CuySKbhm.js → input-BwQqV8Wf.js} +730 -727
- package/dist/input-CEiXoyRz.cjs +1 -0
- package/dist/{layout-B2KvJ900.js → layout-4p7UQD7l.js} +30 -29
- package/dist/{layout-B1Iwc9ku.cjs → layout-DHW99Ejj.cjs} +1 -1
- package/dist/navigation-CP1g7ng9.cjs +1 -0
- package/dist/navigation-DQe6WaUF.js +140 -0
- package/dist/primitives/data-display.cjs +1 -1
- package/dist/primitives/data-display.mjs +1 -1
- package/dist/primitives/feedback.cjs +1 -1
- package/dist/primitives/feedback.mjs +2 -2
- package/dist/primitives/input/Input/Input.d.ts +1 -1
- package/dist/primitives/input/Input/types/InputProps.d.ts +1 -0
- package/dist/primitives/input.cjs +1 -1
- package/dist/primitives/input.mjs +6 -6
- package/dist/primitives/navigation.cjs +1 -1
- package/dist/primitives/navigation.mjs +1 -1
- package/dist/primitives/surfaces/Card/Card.d.ts +1 -1
- package/dist/primitives/surfaces/Card/internal/CardRoot.d.ts +1 -1
- package/dist/primitives/surfaces/Card/types/CardRootProps.d.ts +1 -0
- package/dist/primitives/surfaces.cjs +1 -1
- package/dist/primitives/surfaces.mjs +3 -3
- package/dist/primitives/typography.cjs +1 -1
- package/dist/primitives/typography.mjs +3 -3
- package/dist/primitives.cjs +1 -1
- package/dist/primitives.mjs +14 -14
- package/dist/{settings-BTFAqYrD.js → settings-D3AWPKyH.js} +1 -1
- package/dist/{settings-D_iT1ngl.cjs → settings-RYocb2Xg.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/surfaces-C70biBA8.js +225 -0
- package/dist/surfaces-DcGz8LO-.cjs +1 -0
- package/dist/testing.cjs +1 -1
- package/dist/testing.mjs +1 -1
- package/dist/theme/constants/ThemeLight.d.ts +1 -0
- package/dist/theme/themeCssVariables.d.ts +1 -0
- package/dist/theme/themeTypes.d.ts +1 -0
- package/dist/theme-BJRNJNPO.cjs +1 -0
- package/dist/{theme-B2EaXhye.js → theme-CuGIQBsJ.js} +7 -4
- package/dist/theme-dark.css +1 -0
- package/dist/theme-light.css +1 -0
- package/dist/theme.cjs +1 -1
- package/dist/theme.mjs +1 -1
- package/dist/{typography-BwyZEDDi.js → typography-BisXuVpu.js} +2 -2
- package/dist/{typography-B05olPwL.cjs → typography-D7VnzZiR.cjs} +1 -1
- package/dist/{useIsMobile-D1ImfQnE.js → useIsMobile-CZeJLJJN.js} +1 -1
- package/dist/{useIsMobile-Byp9AIq-.cjs → useIsMobile-VmnhfE8g.cjs} +1 -1
- package/dist/utilities/internal/formatCssLength.d.ts +1 -0
- package/dist/{utilities-xZh8D2gd.cjs → utilities-Bfnz_GAC.cjs} +1 -1
- package/dist/{utilities-BKCMZyqZ.js → utilities-D0KcLLtO.js} +2 -2
- package/dist/utilities.cjs +1 -1
- package/dist/utilities.mjs +2 -2
- package/package.json +8 -8
- package/dist/Dropdown-D_hFndP5.cjs +0 -1
- package/dist/Dropdown-xXsGBv57.js +0 -1056
- package/dist/Input-D1sIHUZ5.js +0 -25
- package/dist/Input-D69M4UwD.cjs +0 -1
- package/dist/OverflowingTextWithTooltip-ClpPsdpP.cjs +0 -1
- package/dist/Radio-CpQPRHXa.cjs +0 -1
- package/dist/Radio-VTjpEz8M.js +0 -175
- package/dist/TablerIcons-B-5Ua_Ne.js +0 -460
- package/dist/input-BQABEELu.cjs +0 -1
- package/dist/input-ExCbk62Y.cjs +0 -1
- package/dist/navigation-DP5Edsq_.cjs +0 -1
- package/dist/navigation-DXMjQMPm.js +0 -134
- package/dist/surfaces-DtZwsfms.cjs +0 -1
- package/dist/surfaces-v0kQLZYO.js +0 -224
- package/dist/theme-1XkFz8Qu.cjs +0 -1
|
@@ -1,54 +1,54 @@
|
|
|
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
|
|
6
|
-
import { t as
|
|
5
|
+
import { l as zr, r as Rt } from "./theme-CuGIQBsJ.js";
|
|
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 {
|
|
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
|
|
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
17
|
import { clsx as G } from "clsx";
|
|
18
|
-
import { Fragment as
|
|
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
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
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),
|
|
28
|
-
const c =
|
|
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
|
+
const c = oe(), [l, u] = Dt({
|
|
29
29
|
controlled: t,
|
|
30
30
|
default: r,
|
|
31
31
|
name: P("CountrySelect"),
|
|
32
32
|
state: "value"
|
|
33
|
-
}), h =
|
|
33
|
+
}), h = he(() => e.map((m) => ({
|
|
34
34
|
...m,
|
|
35
|
-
selectionValue:
|
|
35
|
+
selectionValue: $t(m.value),
|
|
36
36
|
searchText: be(m.label)
|
|
37
|
-
})), [e]), d =
|
|
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
|
-
noCountryLabel:
|
|
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,47 +74,47 @@ 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:
|
|
78
|
-
const { selectedCountry: w, disabled:
|
|
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
|
-
disabled:
|
|
85
|
-
}), re =
|
|
84
|
+
disabled: p
|
|
85
|
+
}), re = ge(G(Fe.input, Fe.md, We.trigger), n);
|
|
86
86
|
return /* @__PURE__ */ I("div", {
|
|
87
87
|
...t,
|
|
88
88
|
className: G(je.root, t?.className),
|
|
89
89
|
children: [
|
|
90
90
|
/* @__PURE__ */ i(Mt, {
|
|
91
|
-
disabled:
|
|
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(
|
|
107
|
-
"aria-disabled":
|
|
108
|
-
openOnHover:
|
|
109
|
-
"data-disabled":
|
|
110
|
-
onClick:
|
|
111
|
-
onMouseDown:
|
|
112
|
-
onPointerDown:
|
|
113
|
-
onKeyDown:
|
|
114
|
-
onKeyUp:
|
|
106
|
+
"aria-describedby": Pe(H) ? H.join(" ") : void 0,
|
|
107
|
+
"aria-disabled": p || void 0,
|
|
108
|
+
openOnHover: p ? !1 : d,
|
|
109
|
+
"data-disabled": p ? "" : void 0,
|
|
110
|
+
onClick: p ? we : s,
|
|
111
|
+
onMouseDown: p ? we : c,
|
|
112
|
+
onPointerDown: p ? we : l,
|
|
113
|
+
onKeyDown: p ? we : u,
|
|
114
|
+
onKeyUp: p ? we : h,
|
|
115
115
|
className: (Y) => re(A(Y)),
|
|
116
|
-
style: Ve(
|
|
117
|
-
render: Ve(
|
|
116
|
+
style: Ve(o) ? (Y) => o(A(Y)) : o,
|
|
117
|
+
render: Ve(a) ? (Y, ve) => a(Y, A(ve)) : a,
|
|
118
118
|
children: r ?? /* @__PURE__ */ I(Z, { children: [
|
|
119
119
|
/* @__PURE__ */ i("span", {
|
|
120
120
|
className: je.flag,
|
|
@@ -122,12 +122,12 @@ var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries
|
|
|
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:
|
|
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
149
|
return /* @__PURE__ */ I(Z, { children: [
|
|
150
|
-
/* @__PURE__ */ i(
|
|
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(
|
|
160
|
-
...
|
|
161
|
-
"aria-labelledby":
|
|
162
|
-
render: Ve(n) ? (
|
|
158
|
+
k && /* @__PURE__ */ i(T.Separator, {}),
|
|
159
|
+
/* @__PURE__ */ I(T.SelectionGroup, {
|
|
160
|
+
...o,
|
|
161
|
+
"aria-labelledby": o["aria-labelledby"] ?? m,
|
|
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
|
-
|
|
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
|
-
const { open: t } = Ne(), [r, n] = K(t), [
|
|
192
|
-
return r !== t && (n(t), t && o
|
|
192
|
+
const { open: t } = Ne(), [r, n] = K(t), [o, a] = K(0);
|
|
193
|
+
return r !== t && (n(t), t && a(o + 1)), /* @__PURE__ */ en(vn, {
|
|
193
194
|
...e,
|
|
194
|
-
key:
|
|
195
|
+
key: o
|
|
195
196
|
});
|
|
196
|
-
}, fn = ({ open: e, defaultOpen: t = !1, onOpenChange: r, onEscapeKeyDown: n, onInteractOutside:
|
|
197
|
-
const { disabled: m } = nt(), [
|
|
198
|
-
|
|
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 }) => {
|
|
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
201
|
return /* @__PURE__ */ I(Z, { children: [/* @__PURE__ */ i(Mt, {
|
|
201
202
|
disabled: m,
|
|
202
203
|
open: y,
|
|
203
|
-
onOpenChange:
|
|
204
|
-
}), /* @__PURE__ */ I(
|
|
204
|
+
onOpenChange: p
|
|
205
|
+
}), /* @__PURE__ */ I(T.Root, {
|
|
205
206
|
type: "picker",
|
|
206
207
|
open: w,
|
|
207
|
-
onOpenChange:
|
|
208
|
+
onOpenChange: p,
|
|
208
209
|
onEscapeKeyDown: n,
|
|
209
|
-
onInteractOutside:
|
|
210
|
-
defaultPage:
|
|
211
|
-
children: [/* @__PURE__ */ i(Ft, { ...g }), /* @__PURE__ */ i(
|
|
210
|
+
onInteractOutside: o,
|
|
211
|
+
defaultPage: a,
|
|
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,29 +224,29 @@ 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,
|
|
230
231
|
onValueChange: n,
|
|
231
|
-
disabled:
|
|
232
|
-
noCountryLabel:
|
|
232
|
+
disabled: o,
|
|
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
|
-
}, Ut = ({ disabled: e = !1, searchable: t = !0, searchLabel: r = P("Search"), listLabel: n, emptyLabel:
|
|
248
|
-
const { state: h, groupId: d, options: g, selectionProps: m } = zt(), { titleId:
|
|
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 }) => {
|
|
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,
|
|
@@ -253,46 +254,46 @@ var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries
|
|
|
253
254
|
...u,
|
|
254
255
|
className: G(ze.options, s),
|
|
255
256
|
children: /* @__PURE__ */ I(Z, { children: [
|
|
256
|
-
t && /* @__PURE__ */ I(Z, { children: [/* @__PURE__ */ i(
|
|
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 =
|
|
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
|
-
closeOnSelect:
|
|
293
|
-
}, b =
|
|
293
|
+
closeOnSelect: o
|
|
294
|
+
}, b = Br({
|
|
294
295
|
props: {
|
|
295
|
-
...
|
|
296
|
+
...f,
|
|
296
297
|
id: d
|
|
297
298
|
},
|
|
298
299
|
storedState: g.get(d)
|
|
@@ -300,89 +301,89 @@ var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries
|
|
|
300
301
|
currency: C,
|
|
301
302
|
label: c(C),
|
|
302
303
|
searchText: l(C).toLowerCase()
|
|
303
|
-
})),
|
|
304
|
+
})), p = w.find(({ currency: C }) => C.code === y), j = s && S(p) ? [p, ...w.filter((C) => C !== p)] : w, k = {
|
|
304
305
|
value: y,
|
|
305
|
-
selectedCurrency:
|
|
306
|
-
disabled:
|
|
306
|
+
selectedCurrency: p?.currency,
|
|
307
|
+
disabled: a
|
|
307
308
|
};
|
|
308
309
|
return /* @__PURE__ */ I(Lt.Provider, {
|
|
309
310
|
value: {
|
|
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
|
-
const { state:
|
|
324
|
-
return /* @__PURE__ */ I(
|
|
325
|
-
...
|
|
326
|
-
disabled:
|
|
327
|
-
className:
|
|
328
|
-
children: [e ?? (S(s) ? s(
|
|
323
|
+
}, Wt = ({ children: e, placeholder: t, disabled: r = !1, className: n, ...o }) => {
|
|
324
|
+
const { state: a, renderValue: s } = zt(), c = S(a.value) ? a.value : t;
|
|
325
|
+
return /* @__PURE__ */ I(T.Trigger, {
|
|
326
|
+
...o,
|
|
327
|
+
disabled: a.disabled || r,
|
|
328
|
+
className: ge(ze.trigger, n),
|
|
329
|
+
children: [e ?? (S(s) ? s(a) : c), /* @__PURE__ */ i(tt, {
|
|
329
330
|
"aria-hidden": "true",
|
|
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,
|
|
344
345
|
onValueChange: n,
|
|
345
|
-
closeOnSelect:
|
|
346
|
-
disabled:
|
|
346
|
+
closeOnSelect: o,
|
|
347
|
+
disabled: a,
|
|
347
348
|
selectedFirst: s,
|
|
348
349
|
getOptionLabel: c,
|
|
349
350
|
getSearchText: l,
|
|
350
351
|
renderValue: u,
|
|
351
|
-
children: [/* @__PURE__ */ i(
|
|
352
|
-
...
|
|
352
|
+
children: [/* @__PURE__ */ i(Wt, {
|
|
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
383
|
return /* @__PURE__ */ I(Q.Root, {
|
|
383
384
|
value: e,
|
|
384
385
|
items: t,
|
|
385
|
-
disabled:
|
|
386
|
+
disabled: o,
|
|
386
387
|
onOpenChange: (l) => {
|
|
387
388
|
l && (c.current = !0, s?.(!0));
|
|
388
389
|
},
|
|
@@ -390,10 +391,10 @@ 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
|
}),
|
|
@@ -402,7 +403,7 @@ var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries
|
|
|
402
403
|
children: [/* @__PURE__ */ i(Q.Value, {}), /* @__PURE__ */ i(Q.Icon, {})]
|
|
403
404
|
}),
|
|
404
405
|
/* @__PURE__ */ i(Q.Portal, {
|
|
405
|
-
container:
|
|
406
|
+
container: a,
|
|
406
407
|
children: /* @__PURE__ */ i(Q.Positioner, {
|
|
407
408
|
sideOffset: zr.spacingMultiplicator,
|
|
408
409
|
alignItemWithTrigger: !1,
|
|
@@ -418,39 +419,39 @@ 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 !==
|
|
424
|
-
const [, r, n,
|
|
425
|
-
if (l.setUTCFullYear(
|
|
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.") });
|
|
425
|
+
const [, r, n, o] = t, a = Number(r), s = Number(n), c = Number(o), l = /* @__PURE__ */ new Date(0);
|
|
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
|
-
const b = Ue(`${e}-01`), y = b.getUTCFullYear(), w = b.getUTCMonth() + 1,
|
|
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 }) => {
|
|
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:
|
|
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
|
});
|
|
445
446
|
return /* @__PURE__ */ I("div", {
|
|
446
|
-
className:
|
|
447
|
+
className: se.header,
|
|
447
448
|
children: [
|
|
448
449
|
/* @__PURE__ */ i("div", {
|
|
449
|
-
className:
|
|
450
|
-
children: /* @__PURE__ */ i(
|
|
450
|
+
className: se.monthSelect,
|
|
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?.({
|
|
@@ -461,43 +462,43 @@ var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries
|
|
|
461
462
|
})
|
|
462
463
|
}),
|
|
463
464
|
/* @__PURE__ */ i("div", {
|
|
464
|
-
className:
|
|
465
|
-
children: /* @__PURE__ */ i(
|
|
465
|
+
className: se.yearSelect,
|
|
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?.({
|
|
472
473
|
open: _,
|
|
473
474
|
control: "year"
|
|
474
475
|
}),
|
|
475
|
-
onValueChange:
|
|
476
|
+
onValueChange: o
|
|
476
477
|
})
|
|
477
478
|
}),
|
|
478
479
|
/* @__PURE__ */ I("div", {
|
|
479
|
-
className:
|
|
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
|
-
children: /* @__PURE__ */ i(
|
|
492
|
+
children: /* @__PURE__ */ i(Mr, { className: se.chevron })
|
|
492
493
|
})]
|
|
493
494
|
})
|
|
494
495
|
]
|
|
495
496
|
});
|
|
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
|
-
t.current !== r && (e.current?.setPreSelection(
|
|
500
|
+
}, On = ({ calendarRef: e, engineViewedMonthRef: t, viewedMonth: r }) => (te(() => {
|
|
501
|
+
t.current !== r && (e.current?.setPreSelection(ce(`${r}-01`)), t.current = r);
|
|
501
502
|
}, [
|
|
502
503
|
e,
|
|
503
504
|
t,
|
|
@@ -506,82 +507,82 @@ 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(
|
|
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
|
-
s ||
|
|
522
|
+
s || p || !S(D) || t(_e(D));
|
|
522
523
|
}, Y = {
|
|
523
524
|
ref: M,
|
|
524
525
|
open: !0,
|
|
525
526
|
onClickOutside: (D) => {
|
|
526
527
|
O.current === D && D.preventDefault();
|
|
527
528
|
},
|
|
528
|
-
minDate:
|
|
529
|
-
maxDate:
|
|
530
|
-
disabled:
|
|
529
|
+
minDate: ce("0001-01-01"),
|
|
530
|
+
maxDate: ce("9999-12-31"),
|
|
531
|
+
disabled: p,
|
|
531
532
|
disabledKeyboardNavigation: j,
|
|
532
|
-
openToDate:
|
|
533
|
+
openToDate: ce(`${n}-01`),
|
|
533
534
|
calendarStartDay: l,
|
|
534
535
|
onMonthChange: A,
|
|
535
536
|
onYearChange: A,
|
|
536
537
|
filterDate: (D) => !w?.(_e(D)),
|
|
537
538
|
onSelect: (D) => {
|
|
538
|
-
if (s ||
|
|
539
|
-
const
|
|
540
|
-
S(
|
|
539
|
+
if (s || p || !S(D)) return;
|
|
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
|
-
isPreviousMonthDisabled:
|
|
561
|
-
isNextMonthDisabled:
|
|
561
|
+
isPreviousMonthDisabled: p || Tr,
|
|
562
|
+
isNextMonthDisabled: p || Pr
|
|
562
563
|
};
|
|
563
|
-
return S(k) ? /* @__PURE__ */ i(Z, { children: k(st) }) : /* @__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
|
-
disabled:
|
|
573
|
+
disabled: p
|
|
573
574
|
});
|
|
574
575
|
}
|
|
575
|
-
},
|
|
576
|
+
}, ve = () => S(a) ? /* @__PURE__ */ i(gt, {
|
|
576
577
|
...Y,
|
|
577
578
|
selectsRange: !0,
|
|
578
|
-
startDate:
|
|
579
|
-
endDate:
|
|
579
|
+
startDate: ce(a.start),
|
|
580
|
+
endDate: ce(a.end),
|
|
580
581
|
onChange: () => {
|
|
581
582
|
}
|
|
582
|
-
}) : /* @__PURE__ */ i(
|
|
583
|
+
}) : /* @__PURE__ */ i(gt, {
|
|
583
584
|
...Y,
|
|
584
|
-
selected: S(e) ?
|
|
585
|
+
selected: S(e) ? ce(e) : null,
|
|
585
586
|
onChange: re
|
|
586
587
|
});
|
|
587
588
|
return Te({
|
|
@@ -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: G(
|
|
598
|
+
className: G(se.calendar, N),
|
|
598
599
|
"data-readonly": s || void 0,
|
|
599
600
|
"data-hide-grid": c || void 0,
|
|
600
|
-
children: /* @__PURE__ */ I(
|
|
601
|
-
fallback: C ?? /* @__PURE__ */ i(Kr, { height:
|
|
602
|
-
children: [/* @__PURE__ */ i(
|
|
601
|
+
children: /* @__PURE__ */ I(Qr, {
|
|
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
|
-
|
|
616
|
+
}, ue = {};
|
|
617
|
+
Mn(ue, {
|
|
617
618
|
ActiveEmoji: () => _r,
|
|
618
619
|
Empty: () => wr,
|
|
619
620
|
List: () => pr,
|
|
@@ -624,7 +625,7 @@ $n(ce, {
|
|
|
624
625
|
SkinToneSelector: () => br,
|
|
625
626
|
Viewport: () => mr
|
|
626
627
|
});
|
|
627
|
-
var Gt = "'Apple Color Emoji', 'Noto Color Emoji', 'Twemoji Mozilla', 'Android Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', EmojiSymbols, sans-serif",
|
|
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",
|
|
@@ -636,7 +637,7 @@ 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 {
|
|
@@ -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}".`);
|
|
@@ -678,13 +679,13 @@ function Jt(e) {
|
|
|
678
679
|
if (typeof e != "boolean") throw new Error();
|
|
679
680
|
return e;
|
|
680
681
|
}
|
|
681
|
-
function
|
|
682
|
+
function de(e) {
|
|
682
683
|
return (t) => {
|
|
683
684
|
if (typeof t != "object" || t === null) throw new Error();
|
|
684
685
|
let r = {};
|
|
685
686
|
for (let n in e) {
|
|
686
|
-
let
|
|
687
|
-
|
|
687
|
+
let o = t[n];
|
|
688
|
+
o === void 0 && e[n](void 0), r[n] = e[n](o);
|
|
688
689
|
}
|
|
689
690
|
return r;
|
|
690
691
|
};
|
|
@@ -695,9 +696,9 @@ 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
|
-
emojis: Ie(
|
|
701
|
+
emojis: Ie(de({
|
|
701
702
|
emoji: F,
|
|
702
703
|
category: Me,
|
|
703
704
|
label: F,
|
|
@@ -705,7 +706,7 @@ var Mn = "frimousse/data", Fn = ue({
|
|
|
705
706
|
tags: Ie(F),
|
|
706
707
|
aliases: Re(Ie(F)),
|
|
707
708
|
countryFlag: Re(Jt),
|
|
708
|
-
skins: Re(
|
|
709
|
+
skins: Re(de({
|
|
709
710
|
light: F,
|
|
710
711
|
"medium-light": F,
|
|
711
712
|
medium: F,
|
|
@@ -713,11 +714,11 @@ var Mn = "frimousse/data", Fn = ue({
|
|
|
713
714
|
dark: F
|
|
714
715
|
}))
|
|
715
716
|
})),
|
|
716
|
-
categories: Ie(
|
|
717
|
+
categories: Ie(de({
|
|
717
718
|
index: Me,
|
|
718
719
|
label: F
|
|
719
720
|
})),
|
|
720
|
-
skinTones:
|
|
721
|
+
skinTones: de({
|
|
721
722
|
light: F,
|
|
722
723
|
"medium-light": F,
|
|
723
724
|
medium: F,
|
|
@@ -725,24 +726,24 @@ var Mn = "frimousse/data", Fn = ue({
|
|
|
725
726
|
dark: F
|
|
726
727
|
})
|
|
727
728
|
});
|
|
728
|
-
function
|
|
729
|
-
let t = `${e}/`, r =
|
|
730
|
-
data:
|
|
729
|
+
function Ln({ name: e = Fn } = {}) {
|
|
730
|
+
let t = `${e}/`, r = de({
|
|
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
|
}
|
|
740
741
|
},
|
|
741
|
-
set(n,
|
|
742
|
+
set(n, o, ...[a]) {
|
|
742
743
|
try {
|
|
743
744
|
Kt(localStorage, `${t}${n}`, {
|
|
744
|
-
data:
|
|
745
|
-
metadata:
|
|
745
|
+
data: o,
|
|
746
|
+
metadata: a
|
|
746
747
|
});
|
|
747
748
|
} catch {
|
|
748
749
|
}
|
|
@@ -761,19 +762,19 @@ function Vn({ name: e = Mn } = {}) {
|
|
|
761
762
|
}
|
|
762
763
|
};
|
|
763
764
|
}
|
|
764
|
-
var Xt = /* @__PURE__ */ new Map(), Ze = /* @__PURE__ */ new WeakMap(),
|
|
765
|
+
var Xt = /* @__PURE__ */ new Map(), Ze = /* @__PURE__ */ new WeakMap(), zn = /* @__PURE__ */ new Set();
|
|
765
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
|
+
function Un(e, t) {
|
|
769
770
|
return (t.resolveEmojiData ? Ze.get(t.resolveEmojiData) : Xt)?.get(er(e, t))?.data;
|
|
770
771
|
}
|
|
771
772
|
function Qt(e, t, r) {
|
|
772
|
-
let n =
|
|
773
|
-
n.data = r, n.load = void 0,
|
|
774
|
-
for (let
|
|
773
|
+
let n = Bn(e, t), o = n.load?.status === "pending" ? n.load : void 0;
|
|
774
|
+
n.data = r, n.load = void 0, o?.complete();
|
|
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
780
|
return r.signal?.throwIfAborted(), Qt(t, {
|
|
@@ -788,16 +789,16 @@ function er(e, t) {
|
|
|
788
789
|
t.emojiVersion
|
|
789
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
|
|
795
|
-
r =
|
|
795
|
+
let a = Ze.get(t.resolveEmojiData);
|
|
796
|
+
r = a ?? /* @__PURE__ */ new Map(), a || Ze.set(t.resolveEmojiData, r);
|
|
796
797
|
}
|
|
797
|
-
let n = er(e, t),
|
|
798
|
-
return
|
|
798
|
+
let n = er(e, t), o = r.get(n);
|
|
799
|
+
return o || (o = {}, r.set(n, o)), o;
|
|
799
800
|
}
|
|
800
|
-
var
|
|
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 at = (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,8 +841,8 @@ async function vt(e, t) {
|
|
|
840
841
|
return null;
|
|
841
842
|
}
|
|
842
843
|
}
|
|
843
|
-
async function
|
|
844
|
-
let [{ emojis: n, emojisEtag:
|
|
844
|
+
async function Gn(e, t, r) {
|
|
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")
|
|
847
848
|
})), fetch(tr(e, t), { signal: r }).then(async (c) => ({
|
|
@@ -850,34 +851,34 @@ async function Bn(e, t, r) {
|
|
|
850
851
|
}))]);
|
|
851
852
|
return {
|
|
852
853
|
emojis: n,
|
|
853
|
-
messages:
|
|
854
|
-
emojisEtag:
|
|
854
|
+
messages: a,
|
|
855
|
+
emojisEtag: o,
|
|
855
856
|
messagesEtag: s
|
|
856
857
|
};
|
|
857
858
|
}
|
|
858
|
-
async function
|
|
859
|
-
let [n,
|
|
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
|
-
messagesEtag:
|
|
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
|
-
let n =
|
|
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:
|
|
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
|
-
let c =
|
|
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
877
|
label: Ge(m.message)
|
|
877
|
-
})), d =
|
|
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,
|
|
@@ -885,65 +886,65 @@ async function pt(e, t, r) {
|
|
|
885
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,
|
|
893
894
|
skinTones: d
|
|
894
895
|
};
|
|
895
896
|
return nr(e).set(t, g, {
|
|
896
|
-
emojisEtag:
|
|
897
|
+
emojisEtag: o,
|
|
897
898
|
messagesEtag: s
|
|
898
899
|
}), g;
|
|
899
900
|
}
|
|
900
|
-
function
|
|
901
|
+
function Jn(e) {
|
|
901
902
|
let t = /* @__PURE__ */ new Map();
|
|
902
|
-
for (let
|
|
903
|
-
let r = [...t.keys()].sort((
|
|
904
|
-
for (let
|
|
905
|
-
emojiVersion:
|
|
906
|
-
countryFlags:
|
|
903
|
+
for (let a of e) t.has(a.version) || t.set(a.version, a.emoji);
|
|
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 {
|
|
906
|
+
emojiVersion: a,
|
|
907
|
+
countryFlags: o
|
|
907
908
|
};
|
|
908
909
|
return {
|
|
909
910
|
emojiVersion: n,
|
|
910
|
-
countryFlags:
|
|
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
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
|
}
|
|
924
925
|
}
|
|
925
|
-
function
|
|
926
|
+
function ar(e, t) {
|
|
926
927
|
try {
|
|
927
928
|
Kt(sessionStorage, rr(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 =
|
|
934
|
-
if (
|
|
935
|
-
let
|
|
936
|
-
if (!
|
|
937
|
-
let l = new AbortController(), u =
|
|
934
|
+
let n = ot(e, t), o = Un(t, { emojibaseUrl: e });
|
|
935
|
+
if (o) return Promise.resolve(o);
|
|
936
|
+
let a = Ce.get(n);
|
|
937
|
+
if (!a || a.controller.signal.aborted) {
|
|
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 = {
|
|
941
942
|
promise: u,
|
|
942
943
|
controller: l,
|
|
943
944
|
callers: 0
|
|
944
|
-
}, Ce.set(n,
|
|
945
|
+
}, Ce.set(n, a);
|
|
945
946
|
}
|
|
946
|
-
let s =
|
|
947
|
+
let s = a;
|
|
947
948
|
s.callers++;
|
|
948
949
|
let c;
|
|
949
950
|
return new Promise((l, u) => {
|
|
@@ -952,38 +953,38 @@ function Xn(e, t, r) {
|
|
|
952
953
|
r?.removeEventListener("abort", c), s.callers--, s.callers === 0 && Ce.get(n) === s && s.controller.abort();
|
|
953
954
|
});
|
|
954
955
|
}
|
|
955
|
-
async function
|
|
956
|
-
let n = Qe(e),
|
|
957
|
-
if (!
|
|
958
|
-
else if (n?.revalidated.includes(t))
|
|
956
|
+
async function Qn(e, t, r) {
|
|
957
|
+
let n = Qe(e), o = nr(e).get(t), a;
|
|
958
|
+
if (!o) a = await bt(e, t, r);
|
|
959
|
+
else if (n?.revalidated.includes(t)) a = o.data;
|
|
959
960
|
else try {
|
|
960
|
-
let { emojisEtag: l, messagesEtag: u } = await
|
|
961
|
-
r.throwIfAborted(),
|
|
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
|
-
r.throwIfAborted(),
|
|
964
|
+
r.throwIfAborted(), a = o.data;
|
|
964
965
|
}
|
|
965
966
|
r.throwIfAborted();
|
|
966
967
|
let s = Qe(e), c = s?.revalidated ?? [];
|
|
967
|
-
return
|
|
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
|
|
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 = Qe(
|
|
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
|
-
return
|
|
982
|
+
} : Jn(s.emojis);
|
|
983
|
+
return ar(a, {
|
|
983
984
|
...l,
|
|
984
|
-
revalidated: c?.revalidated ?? [
|
|
985
|
+
revalidated: c?.revalidated ?? [o]
|
|
985
986
|
}), {
|
|
986
|
-
locale:
|
|
987
|
+
locale: o,
|
|
987
988
|
emojis: s.emojis.filter((u) => {
|
|
988
989
|
let h = u.version <= (t ?? l.emojiVersion);
|
|
989
990
|
return u.countryFlag ? h && l.countryFlags : h;
|
|
@@ -992,76 +993,76 @@ var We = 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
|
-
return
|
|
999
|
+
function yt(e) {
|
|
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
|
-
for (let n = 0,
|
|
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
|
-
return e.filter((
|
|
1011
|
-
let
|
|
1012
|
-
|
|
1013
|
-
for (let s of
|
|
1014
|
-
return
|
|
1015
|
-
}).sort((
|
|
1016
|
-
}
|
|
1017
|
-
function
|
|
1018
|
-
let
|
|
1019
|
-
for (let d of
|
|
1011
|
+
return e.filter((o) => {
|
|
1012
|
+
let a = 0;
|
|
1013
|
+
o.label.toLowerCase().includes(r) && (a += 10);
|
|
1014
|
+
for (let s of o.tags) s.toLowerCase().includes(r) && (a += 1);
|
|
1015
|
+
return a > 0 ? (n.set(o, a), !0) : !1;
|
|
1016
|
+
}).sort((o, a) => (n.get(a) ?? 0) - (n.get(o) ?? 0));
|
|
1017
|
+
}
|
|
1018
|
+
function na(e, t, r, n) {
|
|
1019
|
+
let o = ra(e.emojis, n), a = [], s = [], c = [], l = {}, u = 0, h = 0;
|
|
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
|
|
1022
1023
|
});
|
|
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,
|
|
1032
1033
|
rowsCount: m.length,
|
|
1033
1034
|
startRowIndex: h
|
|
1034
1035
|
}), c.push(h), u++, h += m.length;
|
|
1035
1036
|
}
|
|
1036
1037
|
return {
|
|
1037
|
-
count:
|
|
1038
|
+
count: o.length,
|
|
1038
1039
|
categories: s,
|
|
1039
1040
|
categoriesStartRowIndices: c,
|
|
1040
|
-
rows:
|
|
1041
|
+
rows: a,
|
|
1041
1042
|
skinTones: e.skinTones
|
|
1042
1043
|
};
|
|
1043
1044
|
}
|
|
1044
|
-
function
|
|
1045
|
-
let t = {}, r = null, n = null,
|
|
1045
|
+
function aa(e) {
|
|
1046
|
+
let t = {}, r = null, n = null, o = /* @__PURE__ */ new Set(), a = () => {
|
|
1046
1047
|
if (r) {
|
|
1047
1048
|
t = r, r = null;
|
|
1048
|
-
for (let u of
|
|
1049
|
+
for (let u of o) u(t);
|
|
1049
1050
|
}
|
|
1050
1051
|
n = null;
|
|
1051
1052
|
}, s = () => r ?? t, c = (u) => {
|
|
1052
|
-
r ??= t, Object.assign(r, typeof u == "function" ? u(s()) : u), n || (n = requestAnimationFrame(
|
|
1053
|
-
}, l = (u) => (
|
|
1053
|
+
r ??= t, Object.assign(r, typeof u == "function" ? u(s()) : u), n || (n = requestAnimationFrame(a));
|
|
1054
|
+
}, l = (u) => (o.add(u), () => o.delete(u));
|
|
1054
1055
|
return t = e(c, s), {
|
|
1055
1056
|
get: s,
|
|
1056
1057
|
set: c,
|
|
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,28 +1076,28 @@ function ao(e) {
|
|
|
1075
1076
|
})
|
|
1076
1077
|
};
|
|
1077
1078
|
}
|
|
1078
|
-
function
|
|
1079
|
-
let [n,
|
|
1079
|
+
function q(e, t, r = Object.is) {
|
|
1080
|
+
let [n, o] = K(() => t(e.get()));
|
|
1080
1081
|
return te(() => e.subscribe(() => {
|
|
1081
|
-
let
|
|
1082
|
-
|
|
1082
|
+
let a = t(e.get());
|
|
1083
|
+
o((s) => r(s, a) ? s : a);
|
|
1083
1084
|
}), [
|
|
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
|
|
1094
|
-
let
|
|
1095
|
-
return
|
|
1093
|
+
var wt = 2;
|
|
1094
|
+
function la(e, t, r, n, o) {
|
|
1095
|
+
let a = 0;
|
|
1096
|
+
return aa((s, c) => ({
|
|
1096
1097
|
locale: t,
|
|
1097
1098
|
columns: r,
|
|
1098
1099
|
sticky: n,
|
|
1099
|
-
skinTone:
|
|
1100
|
+
skinTone: o,
|
|
1100
1101
|
onEmojiSelect: e,
|
|
1101
1102
|
data: null,
|
|
1102
1103
|
search: "",
|
|
@@ -1123,15 +1124,15 @@ function io(e, t, r, n, a) {
|
|
|
1123
1124
|
viewportStartRowIndex: 0,
|
|
1124
1125
|
viewportEndRowIndex: 0
|
|
1125
1126
|
});
|
|
1126
|
-
let
|
|
1127
|
-
for (let _ of h.categories) if (b++ * d + _.startRowIndex * g <
|
|
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,20 +1154,20 @@ function io(e, t, r, n, a) {
|
|
|
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 || !
|
|
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
|
-
j === 0 &&
|
|
1160
|
+
j === 0 && p.scrollTo({
|
|
1160
1161
|
top: 0,
|
|
1161
1162
|
behavior: "instant"
|
|
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 <
|
|
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
|
},
|
|
@@ -1190,71 +1191,71 @@ function io(e, t, r, n, a) {
|
|
|
1190
1191
|
});
|
|
1191
1192
|
},
|
|
1192
1193
|
onViewportScroll: (l) => {
|
|
1193
|
-
|
|
1194
|
+
a = l, c().updateViewportState();
|
|
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
|
-
function
|
|
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(
|
|
1238
|
-
return t === "none" ? r : r.split(Ee).map((n,
|
|
1239
|
-
let s =
|
|
1240
|
-
return !
|
|
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);
|
|
1239
|
+
return t === "none" ? r : r.split(Ee).map((n, o, a) => {
|
|
1240
|
+
let s = a.length > 1;
|
|
1241
|
+
return !_t.test(n) || s && n === "🤝" ? n : n.replace(fa, "") + ba[t];
|
|
1241
1242
|
}).join(Ee);
|
|
1242
1243
|
}
|
|
1243
|
-
function
|
|
1244
|
-
return
|
|
1244
|
+
function wa(e) {
|
|
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
|
-
z((
|
|
1257
|
-
t.set({ skinTone:
|
|
1257
|
+
z((o) => {
|
|
1258
|
+
t.set({ skinTone: o });
|
|
1258
1259
|
}, []),
|
|
1259
1260
|
n
|
|
1260
1261
|
];
|
|
@@ -1263,11 +1264,11 @@ function lt(e, t) {
|
|
|
1263
1264
|
if (Object.is(e, t)) return !0;
|
|
1264
1265
|
if (typeof e != "object" || typeof t != "object" || e === null || t === null || Array.isArray(e) !== Array.isArray(t)) return !1;
|
|
1265
1266
|
let r = Object.keys(e), n = Object.keys(t);
|
|
1266
|
-
return r.length !== n.length ? !1 : r.every((
|
|
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 Co(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,
|
|
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, {
|
|
@@ -1299,7 +1300,7 @@ function Eo({ emojiVersion: e, emojibaseUrl: t, resolveEmojiData: r = We }) {
|
|
|
1299
1300
|
emojibaseUrl: t,
|
|
1300
1301
|
signal: g
|
|
1301
1302
|
})).then((m) => {
|
|
1302
|
-
g.aborted ||
|
|
1303
|
+
g.aborted || o(m);
|
|
1303
1304
|
}).catch((m) => {
|
|
1304
1305
|
g.aborted || console.error(m);
|
|
1305
1306
|
}), () => {
|
|
@@ -1311,8 +1312,8 @@ function Eo({ emojiVersion: e, emojibaseUrl: t, resolveEmojiData: r = We }) {
|
|
|
1311
1312
|
s,
|
|
1312
1313
|
h
|
|
1313
1314
|
]), te(() => {
|
|
1314
|
-
if (n) return
|
|
1315
|
-
|
|
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 Eo({ emojiVersion: e, emojibaseUrl: t, resolveEmojiData: r = We }) {
|
|
|
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
|
-
|
|
1392
|
-
}), { viewportWidth: M, viewportHeight: O, rowHeight:
|
|
1393
|
-
return M &&
|
|
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": "",
|
|
@@ -1402,30 +1403,30 @@ var ur = xe(({ locale: e = "en", columns: t = 9, skinTone: r = "none", onEmojiSe
|
|
|
1402
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
|
-
emojibaseUrl:
|
|
1409
|
-
emojiVersion:
|
|
1408
|
+
children: [i(Ea, {
|
|
1409
|
+
emojibaseUrl: a,
|
|
1410
|
+
emojiVersion: o,
|
|
1410
1411
|
resolveEmojiData: s
|
|
1411
1412
|
}), u]
|
|
1412
1413
|
})
|
|
1413
1414
|
});
|
|
1414
|
-
}), dr = xe(({ value: e, defaultValue: t, onChange: r, ...n },
|
|
1415
|
-
let
|
|
1416
|
-
d && (s.current = d,
|
|
1415
|
+
}), dr = xe(({ value: e, defaultValue: t, onChange: r, ...n }, o) => {
|
|
1416
|
+
let a = B(), s = U(null), c = z((d) => {
|
|
1417
|
+
d && (s.current = d, a.set({ searchRef: s }));
|
|
1417
1418
|
}, []), l = typeof e == "string", u = U(l);
|
|
1418
1419
|
te(() => {
|
|
1419
1420
|
process.env.NODE_ENV !== "production" && u.current !== l && console.warn(`EmojiPicker.Search is changing from ${u ? "controlled" : "uncontrolled"} to ${l ? "controlled" : "uncontrolled"}.`), u.current = l;
|
|
1420
1421
|
}, [l]), X(() => {
|
|
1421
|
-
|
|
1422
|
+
a.set({ search: typeof e == "string" ? e : typeof t == "string" ? t : "" });
|
|
1422
1423
|
}, []), X(() => {
|
|
1423
|
-
typeof e == "string" &&
|
|
1424
|
+
typeof e == "string" && a.get().onSearchChange(e);
|
|
1424
1425
|
}, [e]);
|
|
1425
1426
|
let h = z((d) => {
|
|
1426
|
-
r?.(d), d.isDefaultPrevented() ||
|
|
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",
|
|
@@ -1458,24 +1459,24 @@ var ur = xe(({ locale: e = "en", columns: t = 9, skinTone: r = "none", onEmojiSe
|
|
|
1458
1459
|
},
|
|
1459
1460
|
children: e.label
|
|
1460
1461
|
}) : null;
|
|
1461
|
-
}), mr = xe(({ children: e, onScroll: t, onKeyDown: r, style: n, ...
|
|
1462
|
-
let s =
|
|
1462
|
+
}), mr = xe(({ children: e, onScroll: t, onKeyDown: r, style: n, ...o }, a) => {
|
|
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 ||
|
|
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,
|
|
1480
1481
|
ref: l,
|
|
1481
1482
|
style: {
|
|
@@ -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,57 +1570,57 @@ 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
|
|
1577
|
-
|
|
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(() => {
|
|
1578
|
+
o.get().onEmojiSelect(t);
|
|
1578
1579
|
}, [t]), c = z(() => {
|
|
1579
|
-
|
|
1580
|
+
o.get().onActiveEmojiChange("pointer", r, n);
|
|
1580
1581
|
}, [r, n]), l = z(() => {
|
|
1581
|
-
|
|
1582
|
+
o.get().onActiveEmojiReset();
|
|
1582
1583
|
}, []);
|
|
1583
1584
|
return i(e, {
|
|
1584
|
-
...hr(t, r,
|
|
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((
|
|
1595
|
-
columnIndex:
|
|
1595
|
+
children: n.emojis.map((o, a) => i(ja, {
|
|
1596
|
+
columnIndex: a,
|
|
1596
1597
|
Emoji: t,
|
|
1597
|
-
emoji:
|
|
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),
|
|
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
|
|
1617
|
-
let y = b.contentRect.height, { onRowHeightChange: w, onCategoryHeaderHeightChange:
|
|
1618
|
-
b.target === l.current && j !== y && w(y), b.target === u.current && k !== y &&
|
|
1616
|
+
let d = new ResizeObserver((f) => {
|
|
1617
|
+
for (let b of f) {
|
|
1618
|
+
let y = b.contentRect.height, { onRowHeightChange: w, onCategoryHeaderHeightChange: p, rowHeight: j, categoryHeaderHeight: k } = o.get();
|
|
1619
|
+
b.target === l.current && j !== y && w(y), b.target === u.current && k !== y && p(y);
|
|
1619
1620
|
}
|
|
1620
1621
|
});
|
|
1621
1622
|
d.observe(h), d.observe(l.current), d.observe(u.current);
|
|
1622
|
-
let { onRowHeightChange: g, onCategoryHeaderHeightChange: m } =
|
|
1623
|
+
let { onRowHeightChange: g, onCategoryHeaderHeightChange: m } = o.get();
|
|
1623
1624
|
return g(l.current.clientHeight), m(u.current.clientHeight), () => {
|
|
1624
1625
|
d.disconnect();
|
|
1625
1626
|
};
|
|
@@ -1638,76 +1639,76 @@ var jo = 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
|
|
1668
|
-
w && (
|
|
1669
|
-
}, []), c = t?.CategoryHeader ??
|
|
1670
|
-
return
|
|
1671
|
-
...
|
|
1668
|
+
let o = B(), a = U(null), s = z((w) => {
|
|
1669
|
+
w && (a.current = w, o.set({ listRef: a }));
|
|
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
|
-
Array.from({ length: g - d + 1 }, (w,
|
|
1694
|
-
let j = d +
|
|
1695
|
-
return I(
|
|
1694
|
+
Array.from({ length: g - d + 1 }, (w, p) => {
|
|
1695
|
+
let j = d + p;
|
|
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,
|
|
1702
|
+
Array.from({ length: y }, (w, p) => i(Ra, {
|
|
1702
1703
|
CategoryHeader: c,
|
|
1703
|
-
categoryIndex:
|
|
1704
|
-
},
|
|
1704
|
+
categoryIndex: p
|
|
1705
|
+
}, p))
|
|
1705
1706
|
]
|
|
1706
1707
|
})
|
|
1707
1708
|
});
|
|
1708
|
-
}), br = xe(({ emoji: e, onClick: t, "aria-label": r = "Change skin tone", ...n },
|
|
1709
|
-
let
|
|
1710
|
-
t?.(
|
|
1709
|
+
}), br = xe(({ emoji: e, onClick: t, "aria-label": r = "Change skin tone", ...n }, o) => {
|
|
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,
|
|
@@ -1720,36 +1721,36 @@ var pr = xe(({ style: e, components: t, ...r }, n) => {
|
|
|
1720
1721
|
"aria-live": "polite",
|
|
1721
1722
|
"frimousse-skin-tone-selector": "",
|
|
1722
1723
|
onClick: m,
|
|
1723
|
-
ref:
|
|
1724
|
+
ref: o,
|
|
1724
1725
|
children: h.emoji
|
|
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 }) {
|
|
1745
1746
|
return e({ emoji: lr() });
|
|
1746
1747
|
}
|
|
1747
1748
|
function Cr({ children: e, emoji: t }) {
|
|
1748
|
-
let [r, n,
|
|
1749
|
+
let [r, n, o] = sr(t);
|
|
1749
1750
|
return e({
|
|
1750
1751
|
skinTone: r,
|
|
1751
1752
|
setSkinTone: n,
|
|
1752
|
-
skinToneVariations:
|
|
1753
|
+
skinToneVariations: o
|
|
1753
1754
|
});
|
|
1754
1755
|
}
|
|
1755
1756
|
ur.displayName = "EmojiPicker.Root";
|
|
@@ -1761,111 +1762,112 @@ 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:
|
|
1769
|
-
},
|
|
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
|
|
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(),
|
|
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
|
-
const c =
|
|
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
|
-
|
|
1795
|
+
}, o = (a) => {
|
|
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
|
-
return /* @__PURE__ */ I(
|
|
1807
|
+
return /* @__PURE__ */ I(ue.Root, {
|
|
1807
1808
|
...h,
|
|
1808
1809
|
ref: g,
|
|
1809
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
|
-
render: /* @__PURE__ */ i(
|
|
1818
|
+
children: /* @__PURE__ */ i(Tt, {
|
|
1819
|
+
render: /* @__PURE__ */ i(ue.Search, {}),
|
|
1819
1820
|
"aria-label": r,
|
|
1820
1821
|
placeholder: n,
|
|
1821
1822
|
autoFocus: c
|
|
1822
1823
|
})
|
|
1823
1824
|
}),
|
|
1824
|
-
/* @__PURE__ */ I(
|
|
1825
|
+
/* @__PURE__ */ I(ue.Viewport, {
|
|
1825
1826
|
className: Se.viewport,
|
|
1826
1827
|
tabIndex: 0,
|
|
1827
1828
|
children: [
|
|
1828
|
-
/* @__PURE__ */ i(
|
|
1829
|
+
/* @__PURE__ */ i(ue.Loading, {
|
|
1829
1830
|
className: Se.message,
|
|
1830
|
-
children:
|
|
1831
|
+
children: o
|
|
1831
1832
|
}),
|
|
1832
|
-
/* @__PURE__ */ i(
|
|
1833
|
+
/* @__PURE__ */ i(ue.Empty, {
|
|
1833
1834
|
className: Se.message,
|
|
1834
|
-
children:
|
|
1835
|
+
children: a
|
|
1835
1836
|
}),
|
|
1836
|
-
/* @__PURE__ */ i(
|
|
1837
|
-
Row:
|
|
1838
|
-
Emoji:
|
|
1837
|
+
/* @__PURE__ */ i(ue.List, { components: {
|
|
1838
|
+
Row: Ma,
|
|
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: G(ie.root,
|
|
1868
|
-
style:
|
|
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,
|
|
1869
1871
|
children: /* @__PURE__ */ I(Z, { children: [/* @__PURE__ */ I("div", {
|
|
1870
1872
|
className: ie.surface,
|
|
1871
1873
|
children: [
|
|
@@ -1885,7 +1887,7 @@ var Do = "_root_1elk3_1", Oo = "_search_1elk3_29", Ao = "_viewport_1elk3_33", Ho
|
|
|
1885
1887
|
}),
|
|
1886
1888
|
/* @__PURE__ */ i("div", {
|
|
1887
1889
|
className: ie.content,
|
|
1888
|
-
children:
|
|
1890
|
+
children: o
|
|
1889
1891
|
}),
|
|
1890
1892
|
pe(r) && /* @__PURE__ */ i("div", {
|
|
1891
1893
|
...n,
|
|
@@ -1893,24 +1895,24 @@ var Do = "_root_1elk3_1", Oo = "_search_1elk3_29", Ao = "_viewport_1elk3_33", Ho
|
|
|
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
|
-
},
|
|
1903
|
-
root:
|
|
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(
|
|
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 = {
|
|
1905
|
+
root: Qa,
|
|
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,39 +1921,39 @@ var Do = "_root_1elk3_1", Oo = "_search_1elk3_29", Ao = "_viewport_1elk3_33", Ho
|
|
|
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
|
};
|
|
1938
1940
|
return Te({
|
|
1939
|
-
render:
|
|
1941
|
+
render: p,
|
|
1940
1942
|
ref: j,
|
|
1941
1943
|
props: {
|
|
1942
1944
|
className: G(ne.root, b),
|
|
1943
1945
|
style: y,
|
|
1944
1946
|
dir: w,
|
|
1945
|
-
"aria-busy":
|
|
1947
|
+
"aria-busy": a || k["aria-busy"],
|
|
1946
1948
|
children: /* @__PURE__ */ I(Z, { children: [/* @__PURE__ */ i("button", {
|
|
1947
1949
|
className: ne.preview,
|
|
1948
1950
|
type: "button",
|
|
1949
|
-
disabled:
|
|
1950
|
-
"aria-disabled":
|
|
1951
|
+
disabled: H,
|
|
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 Do = "_root_1elk3_1", Oo = "_search_1elk3_29", Ao = "_viewport_1elk3_33", Ho
|
|
|
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,
|
|
@@ -1976,29 +1978,29 @@ var Do = "_root_1elk3_1", Oo = "_search_1elk3_29", Ao = "_viewport_1elk3_33", Ho
|
|
|
1976
1978
|
hidden: !0,
|
|
1977
1979
|
onChange: D
|
|
1978
1980
|
}),
|
|
1979
|
-
re ? /* @__PURE__ */ i(
|
|
1981
|
+
re ? /* @__PURE__ */ i(ae, {
|
|
1980
1982
|
type: "button",
|
|
1981
|
-
startIcon: /* @__PURE__ */ i(
|
|
1983
|
+
startIcon: /* @__PURE__ */ i($r, {}),
|
|
1982
1984
|
onClick: n,
|
|
1983
|
-
disabled:
|
|
1985
|
+
disabled: o,
|
|
1984
1986
|
variant: "outline",
|
|
1985
1987
|
children: h
|
|
1986
|
-
}) : /* @__PURE__ */ i(
|
|
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:
|
|
1993
|
+
focusableWhenDisabled: a && !H,
|
|
1992
1994
|
"aria-describedby": Y,
|
|
1993
1995
|
variant: "outline",
|
|
1994
1996
|
children: l
|
|
1995
1997
|
}),
|
|
1996
|
-
/* @__PURE__ */ i(
|
|
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
|
-
focusableWhenDisabled:
|
|
2003
|
+
focusableWhenDisabled: a && !x,
|
|
2002
2004
|
variant: "outline",
|
|
2003
2005
|
children: u
|
|
2004
2006
|
})
|
|
@@ -2011,7 +2013,7 @@ var Do = "_root_1elk3_1", Oo = "_search_1elk3_29", Ao = "_viewport_1elk3_33", Ho
|
|
|
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 Do = "_root_1elk3_1", Oo = "_search_1elk3_29", Ao = "_viewport_1elk3_33", Ho
|
|
|
2019
2021
|
})] })
|
|
2020
2022
|
}
|
|
2021
2023
|
});
|
|
2022
|
-
},
|
|
2023
|
-
const
|
|
2024
|
-
return /* @__PURE__ */ i(
|
|
2025
|
-
...
|
|
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";
|
|
2026
|
+
return /* @__PURE__ */ i(ae, {
|
|
2027
|
+
...o,
|
|
2026
2028
|
size: s,
|
|
2027
2029
|
variant: c,
|
|
2028
2030
|
"data-emphasis": t,
|
|
2029
|
-
className:
|
|
2031
|
+
className: ge(uo.button, e)
|
|
2030
2032
|
});
|
|
2031
|
-
},
|
|
2032
|
-
const
|
|
2033
|
-
return /* @__PURE__ */ i(
|
|
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";
|
|
2035
|
+
return /* @__PURE__ */ i(ae, {
|
|
2034
2036
|
...n,
|
|
2035
2037
|
elevated: t,
|
|
2036
|
-
variant:
|
|
2037
|
-
className:
|
|
2038
|
+
variant: a,
|
|
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
|
-
valueInput:
|
|
2046
|
-
button:
|
|
2047
|
-
icon:
|
|
2048
|
-
},
|
|
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,
|
|
2047
|
+
valueInput: fo,
|
|
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,13 +2066,13 @@ var Do = "_root_1elk3_1", Oo = "_search_1elk3_29", Ao = "_viewport_1elk3_33", Ho
|
|
|
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
|
-
min:
|
|
2073
|
+
min: a,
|
|
2072
2074
|
max: s,
|
|
2073
|
-
allowOutOfRange:
|
|
2075
|
+
allowOutOfRange: o,
|
|
2074
2076
|
step: c,
|
|
2075
2077
|
smallStep: c,
|
|
2076
2078
|
largeStep: c,
|
|
@@ -2083,26 +2085,26 @@ var Do = "_root_1elk3_1", Oo = "_search_1elk3_29", Ao = "_viewport_1elk3_33", Ho
|
|
|
2083
2085
|
format: et,
|
|
2084
2086
|
className: fe.root,
|
|
2085
2087
|
children: [
|
|
2086
|
-
|
|
2088
|
+
f && /* @__PURE__ */ i(He.Decrement, {
|
|
2087
2089
|
"aria-label": b,
|
|
2088
|
-
render: /* @__PURE__ */ i(
|
|
2090
|
+
render: /* @__PURE__ */ i(ae, {
|
|
2089
2091
|
type: "button",
|
|
2090
2092
|
size: "sm",
|
|
2091
2093
|
className: fe.button,
|
|
2092
2094
|
startIcon: /* @__PURE__ */ i("span", {
|
|
2093
2095
|
className: fe.icon,
|
|
2094
|
-
children: /* @__PURE__ */ i(
|
|
2096
|
+
children: /* @__PURE__ */ i(Or, {})
|
|
2095
2097
|
})
|
|
2096
2098
|
})
|
|
2097
2099
|
}),
|
|
2098
|
-
/* @__PURE__ */ i(
|
|
2099
|
-
...
|
|
2100
|
+
/* @__PURE__ */ i(He.Input, {
|
|
2101
|
+
...p,
|
|
2100
2102
|
form: g,
|
|
2101
|
-
className:
|
|
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
|
-
render: /* @__PURE__ */ i(
|
|
2107
|
+
render: /* @__PURE__ */ i(ae, {
|
|
2106
2108
|
type: "button",
|
|
2107
2109
|
size: "sm",
|
|
2108
2110
|
className: fe.button,
|
|
@@ -2114,82 +2116,82 @@ var Do = "_root_1elk3_1", Oo = "_search_1elk3_29", Ao = "_viewport_1elk3_33", Ho
|
|
|
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
|
-
}, Ir = ({ searchLabel: e = P("Search"), listLabel: t = P("Countries"), emptyLabel: r = P("No results"), disabled: n = !1, className:
|
|
2130
|
-
const { countries: l, value: u, onValueChange: h, disabled: d, closeOnSelect: g } = Sr(), m = d || n,
|
|
2131
|
-
country:
|
|
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 }) => {
|
|
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
|
-
callingCodeSearch:
|
|
2134
|
-
})), k = j.find((
|
|
2135
|
+
callingCodeSearch: p
|
|
2136
|
+
})), k = j.find((v) => v.value === u), C = S(k) ? [k, ...j.filter((v) => v.value !== u)] : j;
|
|
2135
2137
|
return Te({
|
|
2136
|
-
render:
|
|
2138
|
+
render: a,
|
|
2137
2139
|
ref: s,
|
|
2138
2140
|
props: {
|
|
2139
2141
|
...c,
|
|
2140
|
-
className: G(
|
|
2142
|
+
className: G(me.options, o),
|
|
2141
2143
|
children: /* @__PURE__ */ I(Z, { children: [
|
|
2142
|
-
/* @__PURE__ */ i(
|
|
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
|
-
className:
|
|
2167
|
+
className: me.optionFlag,
|
|
2166
2168
|
"aria-hidden": !0,
|
|
2167
|
-
children:
|
|
2169
|
+
children: v.flag
|
|
2168
2170
|
}),
|
|
2169
2171
|
children: /* @__PURE__ */ i(rt, {
|
|
2170
2172
|
text: /* @__PURE__ */ I(Z, { children: [
|
|
2171
|
-
|
|
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(
|
|
2186
|
-
className:
|
|
2187
|
+
/* @__PURE__ */ i(T.Empty, {
|
|
2188
|
+
className: me.emptyStatus,
|
|
2187
2189
|
children: Pe(C) ? null : r
|
|
2188
2190
|
})
|
|
2189
2191
|
] })
|
|
2190
2192
|
}
|
|
2191
2193
|
});
|
|
2192
|
-
}, jr = ({ children: e, countries: t, value: r, defaultValue: n = null, onValueChange:
|
|
2194
|
+
}, jr = ({ children: e, countries: t, value: r, defaultValue: n = null, onValueChange: o, disabled: a = !1, closeOnSelect: s = !0 }) => {
|
|
2193
2195
|
const [c, l] = K(n), u = Le(r) ? c : r, h = t.map((d) => ({
|
|
2194
2196
|
...d,
|
|
2195
2197
|
searchLabel: be(d.label),
|
|
@@ -2199,68 +2201,68 @@ var Do = "_root_1elk3_1", Oo = "_search_1elk3_29", Ao = "_viewport_1elk3_33", Ho
|
|
|
2199
2201
|
value: {
|
|
2200
2202
|
countries: h,
|
|
2201
2203
|
value: u,
|
|
2202
|
-
disabled:
|
|
2204
|
+
disabled: a,
|
|
2203
2205
|
closeOnSelect: s,
|
|
2204
2206
|
onValueChange: (d, g) => {
|
|
2205
|
-
|
|
2207
|
+
o?.(d, g), !g.isCanceled && Le(r) && l(d);
|
|
2206
2208
|
}
|
|
2207
2209
|
},
|
|
2208
2210
|
children: e
|
|
2209
2211
|
});
|
|
2210
|
-
}, kr = ({ children: e, disabled: t = !1, className: r, "aria-describedby": n, ...
|
|
2211
|
-
const { countries:
|
|
2212
|
-
return /* @__PURE__ */ I(
|
|
2213
|
-
...
|
|
2212
|
+
}, kr = ({ children: e, disabled: t = !1, className: r, "aria-describedby": n, ...o }) => {
|
|
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;
|
|
2214
|
+
return /* @__PURE__ */ I(T.Trigger, {
|
|
2215
|
+
...o,
|
|
2214
2216
|
disabled: c || t,
|
|
2215
2217
|
"aria-describedby": h,
|
|
2216
|
-
className:
|
|
2218
|
+
className: ge(me.trigger, r),
|
|
2217
2219
|
children: [e ?? /* @__PURE__ */ I(Z, { children: [/* @__PURE__ */ i("span", {
|
|
2218
|
-
className:
|
|
2220
|
+
className: me.triggerFlag,
|
|
2219
2221
|
"aria-hidden": !0,
|
|
2220
2222
|
children: l?.flag ?? /* @__PURE__ */ i(Lr, {})
|
|
2221
2223
|
}), /* @__PURE__ */ i(tt, {
|
|
2222
|
-
className:
|
|
2224
|
+
className: me.chevron,
|
|
2223
2225
|
"aria-hidden": !0
|
|
2224
2226
|
})] }), S(l) && /* @__PURE__ */ i("span", {
|
|
2225
2227
|
id: u,
|
|
2226
|
-
className:
|
|
2228
|
+
className: me.selectedCountryLabel,
|
|
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
|
-
disabled:
|
|
2236
|
-
closeOnSelect:
|
|
2237
|
-
children: /* @__PURE__ */ I(
|
|
2237
|
+
disabled: o,
|
|
2238
|
+
closeOnSelect: a,
|
|
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: G(Ke.button,
|
|
2263
|
+
className: G(Ke.button, a),
|
|
2262
2264
|
onClick: (c) => {
|
|
2263
|
-
|
|
2265
|
+
o?.(c), !c.defaultPrevented && n(!r);
|
|
2264
2266
|
},
|
|
2265
2267
|
children: /* @__PURE__ */ I("span", {
|
|
2266
2268
|
className: Ke.content,
|
|
@@ -2270,87 +2272,88 @@ var Do = "_root_1elk3_1", Oo = "_search_1elk3_29", Ao = "_viewport_1elk3_33", Ho
|
|
|
2270
2272
|
children: e
|
|
2271
2273
|
}), /* @__PURE__ */ i("span", { children: t })]
|
|
2272
2274
|
})
|
|
2273
|
-
}),
|
|
2274
|
-
wrapper:
|
|
2275
|
-
inputGroup:
|
|
2276
|
-
searchIcon:
|
|
2277
|
-
},
|
|
2278
|
-
const l =
|
|
2275
|
+
}), Ao = "_wrapper_c0mqd_1", $o = "_inputGroup_c0mqd_8", Ho = "_searchIcon_c0mqd_14", Je = {
|
|
2276
|
+
wrapper: Ao,
|
|
2277
|
+
inputGroup: $o,
|
|
2278
|
+
searchIcon: Ho
|
|
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
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,
|
|
2294
|
-
"aria-label": L(s) ? void 0 :
|
|
2296
|
+
"aria-label": L(s) ? void 0 : a ?? e,
|
|
2295
2297
|
"aria-labelledby": s
|
|
2296
2298
|
})
|
|
2297
2299
|
}), t]
|
|
2298
2300
|
});
|
|
2299
|
-
},
|
|
2300
|
-
container:
|
|
2301
|
-
item:
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
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 }) => {
|
|
2311
|
+
const c = oe();
|
|
2312
|
+
return /* @__PURE__ */ i(sn, {
|
|
2313
|
+
...s,
|
|
2314
|
+
className: ge(G(le.container, le[o], t && le.fullWidth), e),
|
|
2315
|
+
"data-item-width": r,
|
|
2313
2316
|
"data-variant": a,
|
|
2314
|
-
children:
|
|
2315
|
-
const
|
|
2316
|
-
return /* @__PURE__ */ I(
|
|
2317
|
-
value:
|
|
2318
|
-
disabled:
|
|
2319
|
-
"aria-labelledby":
|
|
2320
|
-
className: G(
|
|
2317
|
+
children: n.map(({ "aria-label": l, disabled: u, label: h, startIcon: d, value: g }, m) => {
|
|
2318
|
+
const f = `${c}-${m}`, b = L(l);
|
|
2319
|
+
return /* @__PURE__ */ I(qr.Root, {
|
|
2320
|
+
value: g,
|
|
2321
|
+
disabled: u,
|
|
2322
|
+
"aria-labelledby": f,
|
|
2323
|
+
className: G(le.item, !pe(h) && le.iconOnly),
|
|
2321
2324
|
children: [
|
|
2322
|
-
pe(
|
|
2323
|
-
className:
|
|
2325
|
+
pe(d) && /* @__PURE__ */ i("span", {
|
|
2326
|
+
className: le.icon,
|
|
2324
2327
|
"aria-hidden": !0,
|
|
2325
|
-
children:
|
|
2328
|
+
children: d
|
|
2326
2329
|
}),
|
|
2327
|
-
pe(
|
|
2328
|
-
id:
|
|
2329
|
-
className:
|
|
2330
|
-
children:
|
|
2330
|
+
pe(h) && /* @__PURE__ */ i("span", {
|
|
2331
|
+
id: b ? void 0 : f,
|
|
2332
|
+
className: le.label,
|
|
2333
|
+
children: h
|
|
2331
2334
|
}),
|
|
2332
|
-
|
|
2333
|
-
id:
|
|
2335
|
+
b && /* @__PURE__ */ i("span", {
|
|
2336
|
+
id: f,
|
|
2334
2337
|
hidden: !0,
|
|
2335
|
-
children:
|
|
2338
|
+
children: l
|
|
2336
2339
|
})
|
|
2337
2340
|
]
|
|
2338
|
-
},
|
|
2341
|
+
}, g);
|
|
2339
2342
|
})
|
|
2340
2343
|
});
|
|
2341
2344
|
};
|
|
2342
2345
|
export {
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
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
|
|
2356
2359
|
};
|