twenty-ui 2.51.3 → 2.52.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-1tBWXXrE.cjs → AllIcons-HGLkp696.cjs} +1 -1
- package/dist/{AllIcons-ayl8BCtV.js → AllIcons-fCCVOqoJ.js} +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-D3LPyrQI.js +1163 -0
- package/dist/Dropdown-h5-yIsU7.cjs +1 -0
- package/dist/Input-BKRR1xlO.js +26 -0
- package/dist/Input-DS19vWhl.cjs +1 -0
- package/dist/{ListItem-WLONJMo5.js → ListItem-DR7Xh2WV.js} +3 -3
- package/dist/{ListItem-B-SFWJZb.cjs → ListItem-g1B--M70.cjs} +1 -1
- 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-Cky5WlIk.js} +1 -1
- package/dist/{OverflowingTextWithTooltip-ClpPsdpP.cjs → OverflowingTextWithTooltip-Dmsmy-9g.cjs} +1 -1
- 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-BO0MkswY.js} +14 -14
- package/dist/{Radio-CpQPRHXa.cjs → Radio-BK47Ig6J.cjs} +1 -1
- package/dist/{Radio-VTjpEz8M.js → Radio-WuoC3hJ5.js} +4 -4
- package/dist/{Shortcut-N8TELGPI.cjs → Shortcut-CbbRd1uM.cjs} +1 -1
- package/dist/{Shortcut-Bp9iDdQg.js → Shortcut-YMhkp7f6.js} +1 -1
- package/dist/TablerIcons-CqzhliLC.js +462 -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/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-B7beM2yK.js} +54 -54
- package/dist/{data-display-DzHM5j7j.cjs → data-display-C3Q_8G-N.cjs} +1 -1
- package/dist/{data-display-b-9s0RTe.js → data-display-CHKKTmH_.js} +63 -63
- package/dist/{data-display-D_kbXJJd.cjs → data-display-VghHkQY5.cjs} +1 -1
- package/dist/{feedback-BzR4ggrP.cjs → feedback-3S9S-Xi9.cjs} +1 -1
- package/dist/{feedback-EaZszoXf.js → feedback-DHATp8in.js} +51 -51
- package/dist/icon/components/TablerIcons.d.ts +1 -1
- package/dist/icon/index.d.ts +1 -1
- package/dist/{icon-ICz2_dVB.js → icon-C3fz8p3W.js} +3 -3
- package/dist/{icon-TSBamkxk.cjs → icon-C688lfSq.cjs} +1 -1
- package/dist/icon.cjs +1 -1
- package/dist/icon.mjs +505 -503
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +658 -655
- package/dist/{input-CuySKbhm.js → input-BLU0vrJM.js} +585 -584
- package/dist/{input-ExCbk62Y.cjs → input-BLUZOGq8.cjs} +1 -1
- package/dist/{input-BQABEELu.cjs → input-DRIIJ4Zd.cjs} +1 -1
- package/dist/{input-DxoXgI5-.js → input-jkwxjdtI.js} +6 -6
- package/dist/{layout-B2KvJ900.js → layout-4nLOjbJA.js} +2 -2
- package/dist/{layout-B1Iwc9ku.cjs → layout-DEoY3Qd0.cjs} +1 -1
- package/dist/navigation-CSSOuhFm.cjs +1 -0
- package/dist/navigation-iP54gZTV.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 +4 -4
- 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-BmsLbd-g.js} +1 -1
- package/dist/{settings-D_iT1ngl.cjs → settings-DGwyi63i.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-B05olPwL.cjs → typography-DeFnsH3k.cjs} +1 -1
- package/dist/{typography-BwyZEDDi.js → typography-sorTYmvG.js} +2 -2
- package/dist/{useIsMobile-D1ImfQnE.js → useIsMobile-CZeJLJJN.js} +1 -1
- package/dist/{useIsMobile-Byp9AIq-.cjs → useIsMobile-VmnhfE8g.cjs} +1 -1
- 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 +7 -7
- 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/TablerIcons-B-5Ua_Ne.js +0 -460
- 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 { Cc as xr,
|
|
3
|
+
import { Cc as xr, Dt as tt, It as jt, Ot as Dr, Qa as Or, Qs as Ar, Tc as Hr, ka as $r, kt as Mr, lo as Fr, oc as Vr, zo as Lr } from "./TablerIcons-CqzhliLC.js";
|
|
4
4
|
import { t as P } from "./doNotTranslate-BSVT8Xyd.js";
|
|
5
|
-
import { l as zr, r as kt } from "./theme-
|
|
6
|
-
import { t as
|
|
5
|
+
import { l as zr, r as kt } 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 Rt, t as
|
|
9
|
-
import { r as Ur, t as rt } from "./OverflowingTextWithTooltip-
|
|
8
|
+
import { r as Rt, t as ae } from "./Button-Dd8cNsn1.js";
|
|
9
|
+
import { r as Ur, t as rt } from "./OverflowingTextWithTooltip-Cky5WlIk.js";
|
|
10
10
|
import { t as Yr } from "./Separator-0LzwPfOn.js";
|
|
11
|
-
import {
|
|
12
|
-
import { n as Fe, t as Nt } from "./Input-
|
|
13
|
-
import { a as Be, i as
|
|
11
|
+
import { a as ct, n as qr, r as Br, s as Ne, t as N } from "./Dropdown-D3LPyrQI.js";
|
|
12
|
+
import { n as Fe, t as Nt } from "./Input-BKRR1xlO.js";
|
|
13
|
+
import { a as Be, i as Z, n as Wr, r as $e, t as Gr } from "./Radio-WuoC3hJ5.js";
|
|
14
14
|
import { t as Kr } from "./Skeleton-BbIF780H.js";
|
|
15
15
|
import { useRender as Te } from "@base-ui/react/use-render";
|
|
16
16
|
import { isFunction as Ve, isNonEmptyArray as Pe, isNonEmptyString as L, isNull as Tt, isNumber as Pt, isString as Jr, isUndefined as Le } from "@sniptt/guards";
|
|
17
|
-
import { clsx as
|
|
18
|
-
import { Fragment as Xr, Suspense as
|
|
19
|
-
import { Fragment as
|
|
17
|
+
import { clsx as W } from "clsx";
|
|
18
|
+
import { Fragment as Xr, Suspense as Qr, createContext as Ye, createElement as Zr, forwardRef as xe, lazy as en, memo as De, useCallback as z, useContext as ye, useDebugValue as tn, useDeferredValue as rn, useEffect as te, useId as oe, useImperativeHandle as qe, useLayoutEffect as nn, useMemo as he, useRef as U, useState as K } from "react";
|
|
19
|
+
import { Fragment as Q, jsx as i, jsxs as I } from "react/jsx-runtime";
|
|
20
20
|
import { useMergedRefs as xt } from "@base-ui/utils/useMergedRefs";
|
|
21
21
|
import { useControlled as Dt } from "@base-ui/utils/useControlled";
|
|
22
|
-
import { useDirection as
|
|
22
|
+
import { useDirection as an } from "@base-ui/react/direction-provider";
|
|
23
23
|
import { useStableCallback as Ot } from "@base-ui/utils/useStableCallback";
|
|
24
|
-
import { useValueAsRef as
|
|
24
|
+
import { useValueAsRef as on } from "@base-ui/utils/useValueAsRef";
|
|
25
25
|
import { formatNumber as ut } from "@base-ui/utils/formatNumber";
|
|
26
26
|
import { RadioGroup as ln } from "@base-ui/react/radio-group";
|
|
27
|
-
var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries: e, value: t, defaultValue: r = null, onValueChange: n, disabled:
|
|
28
|
-
const c =
|
|
27
|
+
var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ 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
35
|
selectionValue: Ht(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
41
|
selectedCountry: Tt(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, v) => {
|
|
47
47
|
if (g) {
|
|
48
|
-
|
|
48
|
+
v.cancel();
|
|
49
49
|
return;
|
|
50
50
|
}
|
|
51
|
-
n?.(m,
|
|
51
|
+
n?.(m, v), v.isCanceled || u(m);
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
54
|
children: s
|
|
@@ -74,21 +74,21 @@ 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": v, "aria-describedby": b, ...y }) => {
|
|
78
|
+
const { selectedCountry: w, disabled: p, noCountryLabel: j } = nt(), { open: k, setOpen: C } = Ne(), f = oe(), E = g ?? f, _ = `${f}-label`, T = `${f}-value`, H = L(e), M = L(m) ? m : void 0, O = mn({
|
|
79
|
+
ariaLabelledBy: v,
|
|
80
80
|
ariaLabel: M,
|
|
81
81
|
visibleLabelId: H ? _ : void 0
|
|
82
82
|
}), $ = [b, (S(O) || S(M)) && !S(r) ? T : void 0].filter(L), x = w?.label ?? j, R = S(w) ? w.flag : /* @__PURE__ */ i(jt, {}), A = (Y) => ({
|
|
83
83
|
...Y,
|
|
84
|
-
disabled:
|
|
85
|
-
}), re =
|
|
84
|
+
disabled: p
|
|
85
|
+
}), re = ge(W(Fe.input, Fe.md, Be.trigger), n);
|
|
86
86
|
return /* @__PURE__ */ I("div", {
|
|
87
87
|
...t,
|
|
88
|
-
className:
|
|
88
|
+
className: W(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
|
}),
|
|
@@ -104,18 +104,18 @@ var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries
|
|
|
104
104
|
"aria-label": M,
|
|
105
105
|
"aria-labelledby": O,
|
|
106
106
|
"aria-describedby": Pe($) ? $.join(" ") : void 0,
|
|
107
|
-
"aria-disabled":
|
|
108
|
-
openOnHover:
|
|
109
|
-
"data-disabled":
|
|
110
|
-
onClick:
|
|
111
|
-
onMouseDown:
|
|
112
|
-
onPointerDown:
|
|
113
|
-
onKeyDown:
|
|
114
|
-
onKeyUp:
|
|
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(
|
|
118
|
-
children: r ?? /* @__PURE__ */ I(
|
|
116
|
+
style: Ve(o) ? (Y) => o(A(Y)) : o,
|
|
117
|
+
render: Ve(a) ? (Y, fe) => a(Y, A(fe)) : a,
|
|
118
|
+
children: r ?? /* @__PURE__ */ I(Q, { children: [
|
|
119
119
|
/* @__PURE__ */ i("span", {
|
|
120
120
|
className: je.flag,
|
|
121
121
|
"aria-hidden": "true",
|
|
@@ -135,8 +135,8 @@ var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries
|
|
|
135
135
|
})
|
|
136
136
|
]
|
|
137
137
|
});
|
|
138
|
-
}, hn = "no-country", gn = ({ searchLabel: e = P("Search"), noResultsLabel: t = P("No results"), searchProps: r, render: n, ...
|
|
139
|
-
const { countries:
|
|
138
|
+
}, hn = "no-country", gn = ({ 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, [v, b] = K(""), y = be(v.trim()), w = L(y), p = a.filter((f) => f.searchText.includes(y)), j = be(u).includes(y), k = j || Pe(p), C = j && /* @__PURE__ */ i(N.OptionItem, {
|
|
140
140
|
value: "no-country",
|
|
141
141
|
disabled: l,
|
|
142
142
|
startIcon: /* @__PURE__ */ i("span", {
|
|
@@ -146,19 +146,19 @@ var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries
|
|
|
146
146
|
}),
|
|
147
147
|
children: u
|
|
148
148
|
});
|
|
149
|
-
return /* @__PURE__ */ I(
|
|
149
|
+
return /* @__PURE__ */ I(Q, { children: [
|
|
150
150
|
/* @__PURE__ */ i(N.Search, {
|
|
151
151
|
placeholder: e,
|
|
152
152
|
"aria-label": e,
|
|
153
153
|
...r,
|
|
154
|
-
value:
|
|
154
|
+
value: v,
|
|
155
155
|
onValueChange: b,
|
|
156
156
|
disabled: l || r?.disabled
|
|
157
157
|
}),
|
|
158
158
|
k && /* @__PURE__ */ i(N.Separator, {}),
|
|
159
159
|
/* @__PURE__ */ I(N.SelectionGroup, {
|
|
160
|
-
...
|
|
161
|
-
"aria-labelledby":
|
|
160
|
+
...o,
|
|
161
|
+
"aria-labelledby": o["aria-labelledby"] ?? m,
|
|
162
162
|
render: Ve(n) ? (f) => n(f, {
|
|
163
163
|
value: s,
|
|
164
164
|
multiple: !1
|
|
@@ -166,13 +166,13 @@ var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries
|
|
|
166
166
|
id: h,
|
|
167
167
|
value: Tt(s) ? hn : Ht(s),
|
|
168
168
|
onValueChange: (f, E) => {
|
|
169
|
-
c(
|
|
169
|
+
c(a.find((_) => _.selectionValue === f)?.value ?? null, E);
|
|
170
170
|
},
|
|
171
171
|
children: [k && /* @__PURE__ */ I(N.Section, {
|
|
172
172
|
scrollable: !0,
|
|
173
173
|
children: [
|
|
174
174
|
!w && C,
|
|
175
|
-
|
|
175
|
+
p.map((f) => /* @__PURE__ */ i(N.OptionItem, {
|
|
176
176
|
value: f.selectionValue,
|
|
177
177
|
disabled: l || f.disabled,
|
|
178
178
|
startIcon: /* @__PURE__ */ i("span", {
|
|
@@ -188,26 +188,26 @@ var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries
|
|
|
188
188
|
})
|
|
189
189
|
] });
|
|
190
190
|
}, Vt = (e) => {
|
|
191
|
-
const { open: t } = Ne(), [r, n] = K(t), [
|
|
192
|
-
return r !== t && (n(t), t && o
|
|
191
|
+
const { open: t } = Ne(), [r, n] = K(t), [o, a] = K(0);
|
|
192
|
+
return r !== t && (n(t), t && a(o + 1)), /* @__PURE__ */ Zr(gn, {
|
|
193
193
|
...e,
|
|
194
|
-
key:
|
|
194
|
+
key: o
|
|
195
195
|
});
|
|
196
|
-
}, fn = ({ open: e, defaultOpen: t = !1, onOpenChange: r, onEscapeKeyDown: n, onInteractOutside:
|
|
197
|
-
const { disabled: m } = nt(), [
|
|
196
|
+
}, fn = ({ open: e, defaultOpen: t = !1, onOpenChange: r, onEscapeKeyDown: n, onInteractOutside: o, defaultPage: a, popupProps: s, optionsProps: c, searchLabel: l, noResultsLabel: u, searchProps: h, closeOnSelect: d, ...g }) => {
|
|
197
|
+
const { disabled: m } = nt(), [v, b] = K(t), y = e ?? v, w = !m && y, p = (f) => {
|
|
198
198
|
f && m || (b(f), r?.(f));
|
|
199
199
|
}, j = [g["aria-label"], g.label].find(L), k = S(s?.["aria-label"]) || S(s?.["aria-labelledby"]), C = S(c?.["aria-label"]) || S(c?.["aria-labelledby"]);
|
|
200
|
-
return /* @__PURE__ */ I(
|
|
200
|
+
return /* @__PURE__ */ I(Q, { children: [/* @__PURE__ */ i(Mt, {
|
|
201
201
|
disabled: m,
|
|
202
202
|
open: y,
|
|
203
|
-
onOpenChange:
|
|
203
|
+
onOpenChange: p
|
|
204
204
|
}), /* @__PURE__ */ I(N.Root, {
|
|
205
205
|
type: "picker",
|
|
206
206
|
open: w,
|
|
207
|
-
onOpenChange:
|
|
207
|
+
onOpenChange: p,
|
|
208
208
|
onEscapeKeyDown: n,
|
|
209
|
-
onInteractOutside:
|
|
210
|
-
defaultPage:
|
|
209
|
+
onInteractOutside: o,
|
|
210
|
+
defaultPage: a,
|
|
211
211
|
children: [/* @__PURE__ */ i(Ft, { ...g }), /* @__PURE__ */ i(N.Content, {
|
|
212
212
|
"aria-label": k ? void 0 : j,
|
|
213
213
|
"aria-labelledby": k ? void 0 : g["aria-labelledby"],
|
|
@@ -223,15 +223,15 @@ var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries
|
|
|
223
223
|
})
|
|
224
224
|
})]
|
|
225
225
|
})] });
|
|
226
|
-
}, vn = ({ countries: e, value: t, defaultValue: r, onValueChange: n, disabled:
|
|
226
|
+
}, vn = ({ countries: e, value: t, defaultValue: r, onValueChange: n, disabled: o, noCountryLabel: a, ...s }) => /* @__PURE__ */ i($t, {
|
|
227
227
|
countries: e,
|
|
228
228
|
value: t,
|
|
229
229
|
defaultValue: r,
|
|
230
230
|
onValueChange: n,
|
|
231
|
-
disabled:
|
|
232
|
-
noCountryLabel:
|
|
231
|
+
disabled: o,
|
|
232
|
+
noCountryLabel: a,
|
|
233
233
|
children: /* @__PURE__ */ i(fn, { ...s })
|
|
234
|
-
}),
|
|
234
|
+
}), bi = Object.assign(vn, {
|
|
235
235
|
Root: $t,
|
|
236
236
|
Trigger: Ft,
|
|
237
237
|
Options: Vt
|
|
@@ -244,24 +244,24 @@ var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries
|
|
|
244
244
|
const e = ye(Lt);
|
|
245
245
|
if (!S(e)) throw new Error(P("CurrencyPicker parts must be inside CurrencyPicker.Root"));
|
|
246
246
|
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:
|
|
247
|
+
}, Ut = ({ disabled: e = !1, searchable: t = !0, searchLabel: r = P("Search"), listLabel: n, emptyLabel: o = P("No results"), searchProps: a, className: s, render: c, ref: l, ...u }) => {
|
|
248
|
+
const { state: h, groupId: d, options: g, selectionProps: m } = zt(), { titleId: v, triggerId: b } = Ne(), { value: y, defaultValue: w = "", onValueChange: p, ...j } = a ?? {}, [k, C] = K(w), f = y ?? k, E = t ? String(f).trim().toLowerCase() : "", _ = g.filter(({ searchText: O }) => O.includes(E)), T = Pe(_), H = h.disabled || e, M = S(n) ? void 0 : v ?? b;
|
|
249
249
|
return Te({
|
|
250
250
|
render: c,
|
|
251
251
|
ref: l,
|
|
252
252
|
props: {
|
|
253
253
|
...u,
|
|
254
|
-
className:
|
|
255
|
-
children: /* @__PURE__ */ I(
|
|
256
|
-
t && /* @__PURE__ */ I(
|
|
254
|
+
className: W(ze.options, s),
|
|
255
|
+
children: /* @__PURE__ */ I(Q, { children: [
|
|
256
|
+
t && /* @__PURE__ */ I(Q, { children: [/* @__PURE__ */ i(N.Search, {
|
|
257
257
|
placeholder: r,
|
|
258
258
|
"aria-label": r,
|
|
259
259
|
...j,
|
|
260
260
|
value: f,
|
|
261
261
|
onValueChange: (O) => {
|
|
262
|
-
|
|
262
|
+
p?.(O), Le(y) && C(O);
|
|
263
263
|
},
|
|
264
|
-
disabled: H ||
|
|
264
|
+
disabled: H || a?.disabled
|
|
265
265
|
}), /* @__PURE__ */ i(N.Separator, {})] }),
|
|
266
266
|
/* @__PURE__ */ i(N.SelectionGroup, {
|
|
267
267
|
...m,
|
|
@@ -279,20 +279,20 @@ var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries
|
|
|
279
279
|
}),
|
|
280
280
|
/* @__PURE__ */ i(N.Empty, {
|
|
281
281
|
className: ze.emptyStatus,
|
|
282
|
-
children: T ? null :
|
|
282
|
+
children: T ? null : o
|
|
283
283
|
})
|
|
284
284
|
] })
|
|
285
285
|
}
|
|
286
286
|
});
|
|
287
|
-
}, Yt = ({ code: e, name: t }) => `${t} (${e})`, _n = (e) => `${Yt(e)} ${e.symbol ?? ""}`, qt = ({ currencies: e, value: t, defaultValue: r = null, onValueChange: n, closeOnSelect:
|
|
288
|
-
const d =
|
|
287
|
+
}, Yt = ({ code: e, name: t }) => `${t} (${e})`, _n = (e) => `${Yt(e)} ${e.symbol ?? ""}`, qt = ({ currencies: e, value: t, defaultValue: r = null, onValueChange: n, closeOnSelect: o, disabled: a = !1, selectedFirst: s = !1, getOptionLabel: c = Yt, getSearchText: l = _n, renderValue: u, children: h }) => {
|
|
288
|
+
const d = oe(), { selections: g, initializeSelection: m } = Ne(), v = {
|
|
289
289
|
value: t,
|
|
290
290
|
defaultValue: r,
|
|
291
291
|
onValueChange: n,
|
|
292
|
-
closeOnSelect:
|
|
292
|
+
closeOnSelect: o
|
|
293
293
|
}, b = qr({
|
|
294
294
|
props: {
|
|
295
|
-
...
|
|
295
|
+
...v,
|
|
296
296
|
id: d
|
|
297
297
|
},
|
|
298
298
|
storedState: g.get(d)
|
|
@@ -300,17 +300,17 @@ var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries
|
|
|
300
300
|
currency: C,
|
|
301
301
|
label: c(C),
|
|
302
302
|
searchText: l(C).toLowerCase()
|
|
303
|
-
})),
|
|
303
|
+
})), p = w.find(({ currency: C }) => C.code === y), j = s && S(p) ? [p, ...w.filter((C) => C !== p)] : w, k = {
|
|
304
304
|
value: y,
|
|
305
|
-
selectedCurrency:
|
|
306
|
-
disabled:
|
|
305
|
+
selectedCurrency: p?.currency,
|
|
306
|
+
disabled: a
|
|
307
307
|
};
|
|
308
308
|
return /* @__PURE__ */ I(Lt.Provider, {
|
|
309
309
|
value: {
|
|
310
310
|
state: k,
|
|
311
311
|
groupId: d,
|
|
312
312
|
options: j,
|
|
313
|
-
selectionProps:
|
|
313
|
+
selectionProps: v,
|
|
314
314
|
renderValue: u
|
|
315
315
|
},
|
|
316
316
|
children: [Le(t) && /* @__PURE__ */ i(Br, {
|
|
@@ -319,48 +319,48 @@ var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries
|
|
|
319
319
|
initializeSelection: m
|
|
320
320
|
}), Ve(h) ? h(k) : h]
|
|
321
321
|
});
|
|
322
|
-
}, Bt = ({ children: e, placeholder: t, disabled: r = !1, className: n, ...
|
|
323
|
-
const { state:
|
|
322
|
+
}, Bt = ({ children: e, placeholder: t, disabled: r = !1, className: n, ...o }) => {
|
|
323
|
+
const { state: a, renderValue: s } = zt(), c = S(a.value) ? a.value : t;
|
|
324
324
|
return /* @__PURE__ */ I(N.Trigger, {
|
|
325
|
-
...
|
|
326
|
-
disabled:
|
|
327
|
-
className:
|
|
328
|
-
children: [e ?? (S(s) ? s(
|
|
325
|
+
...o,
|
|
326
|
+
disabled: a.disabled || r,
|
|
327
|
+
className: ge(ze.trigger, n),
|
|
328
|
+
children: [e ?? (S(s) ? s(a) : c), /* @__PURE__ */ i(tt, {
|
|
329
329
|
"aria-hidden": "true",
|
|
330
330
|
className: ze.chevron
|
|
331
331
|
})]
|
|
332
332
|
});
|
|
333
|
-
}, Cn = ({ currencies: e, value: t, defaultValue: r, onValueChange: n, closeOnSelect:
|
|
333
|
+
}, Cn = ({ 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: v, triggerProps: b, contentProps: y, optionsProps: w, ...p }) => /* @__PURE__ */ i(N.Root, {
|
|
334
334
|
type: "picker",
|
|
335
335
|
open: h,
|
|
336
336
|
defaultOpen: d,
|
|
337
337
|
onOpenChange: g,
|
|
338
338
|
onEscapeKeyDown: m,
|
|
339
|
-
onInteractOutside:
|
|
339
|
+
onInteractOutside: v,
|
|
340
340
|
children: /* @__PURE__ */ I(qt, {
|
|
341
341
|
currencies: e,
|
|
342
342
|
value: t,
|
|
343
343
|
defaultValue: r,
|
|
344
344
|
onValueChange: n,
|
|
345
|
-
closeOnSelect:
|
|
346
|
-
disabled:
|
|
345
|
+
closeOnSelect: o,
|
|
346
|
+
disabled: a,
|
|
347
347
|
selectedFirst: s,
|
|
348
348
|
getOptionLabel: c,
|
|
349
349
|
getSearchText: l,
|
|
350
350
|
renderValue: u,
|
|
351
351
|
children: [/* @__PURE__ */ i(Bt, {
|
|
352
|
-
...
|
|
352
|
+
...p,
|
|
353
353
|
...b
|
|
354
354
|
}), /* @__PURE__ */ i(N.Content, {
|
|
355
355
|
...y,
|
|
356
356
|
children: /* @__PURE__ */ i(Ut, { ...w })
|
|
357
357
|
})]
|
|
358
358
|
})
|
|
359
|
-
}),
|
|
359
|
+
}), yi = Object.assign(Cn, {
|
|
360
360
|
Root: qt,
|
|
361
361
|
Trigger: Bt,
|
|
362
362
|
Options: Ut
|
|
363
|
-
}), En = "_calendar_s1e8i_1", Sn = "_header_s1e8i_9", In = "_monthSelect_s1e8i_18", jn = "_yearSelect_s1e8i_23", kn = "_navigation_s1e8i_28", Rn = "_chevron_s1e8i_33",
|
|
363
|
+
}), En = "_calendar_s1e8i_1", Sn = "_header_s1e8i_9", In = "_monthSelect_s1e8i_18", jn = "_yearSelect_s1e8i_23", kn = "_navigation_s1e8i_28", Rn = "_chevron_s1e8i_33", se = {
|
|
364
364
|
calendar: En,
|
|
365
365
|
header: Sn,
|
|
366
366
|
monthSelect: In,
|
|
@@ -377,12 +377,12 @@ var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries
|
|
|
377
377
|
return te(() => () => {
|
|
378
378
|
e.current && (e.current = !1, r(!1));
|
|
379
379
|
}, [e, r]), null;
|
|
380
|
-
}, dt = ({ value: e, items: t, onValueChange: r, label: n, disabled:
|
|
380
|
+
}, dt = ({ value: e, items: t, onValueChange: r, label: n, disabled: o, portalContainer: a, onOpenChange: s }) => {
|
|
381
381
|
const c = U(!1);
|
|
382
|
-
return /* @__PURE__ */ I(
|
|
382
|
+
return /* @__PURE__ */ I(Z.Root, {
|
|
383
383
|
value: e,
|
|
384
384
|
items: t,
|
|
385
|
-
disabled:
|
|
385
|
+
disabled: o,
|
|
386
386
|
onOpenChange: (l) => {
|
|
387
387
|
l && (c.current = !0, s?.(!0));
|
|
388
388
|
},
|
|
@@ -397,18 +397,18 @@ var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries
|
|
|
397
397
|
isOpenRef: c,
|
|
398
398
|
onOpenChange: s
|
|
399
399
|
}),
|
|
400
|
-
/* @__PURE__ */ I(
|
|
400
|
+
/* @__PURE__ */ I(Z.Trigger, {
|
|
401
401
|
"aria-label": n,
|
|
402
|
-
children: [/* @__PURE__ */ i(
|
|
402
|
+
children: [/* @__PURE__ */ i(Z.Value, {}), /* @__PURE__ */ i(Z.Icon, {})]
|
|
403
403
|
}),
|
|
404
|
-
/* @__PURE__ */ i(
|
|
405
|
-
container:
|
|
406
|
-
children: /* @__PURE__ */ i(
|
|
404
|
+
/* @__PURE__ */ i(Z.Portal, {
|
|
405
|
+
container: a,
|
|
406
|
+
children: /* @__PURE__ */ i(Z.Positioner, {
|
|
407
407
|
sideOffset: zr.spacingMultiplicator,
|
|
408
408
|
alignItemWithTrigger: !1,
|
|
409
|
-
children: /* @__PURE__ */ i(
|
|
409
|
+
children: /* @__PURE__ */ i(Z.Popup, { children: t.map(({ value: l, label: u }) => /* @__PURE__ */ I(Z.Item, {
|
|
410
410
|
value: l,
|
|
411
|
-
children: [/* @__PURE__ */ i(
|
|
411
|
+
children: [/* @__PURE__ */ i(Z.ItemText, { children: u }), /* @__PURE__ */ i(Z.ItemIndicator, {})]
|
|
412
412
|
}, l)) })
|
|
413
413
|
})
|
|
414
414
|
})
|
|
@@ -421,11 +421,11 @@ var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries
|
|
|
421
421
|
}, Tn = /^(\d{4})-(\d{2})-(\d{2})$/, Pn = 10, Ue = (e) => {
|
|
422
422
|
const t = e.match(Tn);
|
|
423
423
|
if (!S(t) || e.length !== Pn) throw new Xe({ message: P("Calendar dates must use the YYYY-MM-DD format.") });
|
|
424
|
-
const [, r, n,
|
|
425
|
-
if (l.setUTCFullYear(
|
|
424
|
+
const [, r, n, o] = t, a = Number(r), s = Number(n), c = Number(o), l = /* @__PURE__ */ new Date(0);
|
|
425
|
+
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
426
|
return l;
|
|
427
|
-
}, mt = 100, xn = ({ viewedMonth: e, onPreviousMonth: t, onNextMonth: r, onMonthChange: n, onYearChange:
|
|
428
|
-
const b = Ue(`${e}-01`), y = b.getUTCFullYear(), w = b.getUTCMonth() + 1,
|
|
427
|
+
}, mt = 100, xn = ({ 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: v }) => {
|
|
428
|
+
const b = Ue(`${e}-01`), y = b.getUTCFullYear(), w = b.getUTCMonth() + 1, p = new Intl.DateTimeFormat(c, {
|
|
429
429
|
month: "long",
|
|
430
430
|
calendar: "gregory",
|
|
431
431
|
timeZone: P("UTC")
|
|
@@ -434,7 +434,7 @@ var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries
|
|
|
434
434
|
const T = new Date(b);
|
|
435
435
|
T.setUTCMonth(_ - 1), k.push({
|
|
436
436
|
value: _,
|
|
437
|
-
label:
|
|
437
|
+
label: p.format(T)
|
|
438
438
|
});
|
|
439
439
|
}
|
|
440
440
|
const C = [], f = Math.max(ke.MIN_YEAR, y - mt), E = Math.min(ke.MAX_YEAR, y + mt);
|
|
@@ -443,14 +443,14 @@ var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries
|
|
|
443
443
|
label: j.format(_)
|
|
444
444
|
});
|
|
445
445
|
return /* @__PURE__ */ I("div", {
|
|
446
|
-
className:
|
|
446
|
+
className: se.header,
|
|
447
447
|
children: [
|
|
448
448
|
/* @__PURE__ */ i("div", {
|
|
449
|
-
className:
|
|
449
|
+
className: se.monthSelect,
|
|
450
450
|
children: /* @__PURE__ */ i(dt, {
|
|
451
451
|
value: w,
|
|
452
452
|
items: k,
|
|
453
|
-
disabled:
|
|
453
|
+
disabled: v,
|
|
454
454
|
label: h,
|
|
455
455
|
portalContainer: g,
|
|
456
456
|
onOpenChange: (_) => m?.({
|
|
@@ -461,43 +461,43 @@ var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries
|
|
|
461
461
|
})
|
|
462
462
|
}),
|
|
463
463
|
/* @__PURE__ */ i("div", {
|
|
464
|
-
className:
|
|
464
|
+
className: se.yearSelect,
|
|
465
465
|
children: /* @__PURE__ */ i(dt, {
|
|
466
466
|
value: y,
|
|
467
467
|
items: C,
|
|
468
|
-
disabled:
|
|
468
|
+
disabled: v,
|
|
469
469
|
label: d,
|
|
470
470
|
portalContainer: g,
|
|
471
471
|
onOpenChange: (_) => m?.({
|
|
472
472
|
open: _,
|
|
473
473
|
control: "year"
|
|
474
474
|
}),
|
|
475
|
-
onValueChange:
|
|
475
|
+
onValueChange: o
|
|
476
476
|
})
|
|
477
477
|
}),
|
|
478
478
|
/* @__PURE__ */ I("div", {
|
|
479
|
-
className:
|
|
479
|
+
className: se.navigation,
|
|
480
480
|
children: [/* @__PURE__ */ i(ct, {
|
|
481
481
|
size: "md",
|
|
482
|
-
disabled:
|
|
482
|
+
disabled: v || a,
|
|
483
483
|
"aria-label": l,
|
|
484
484
|
onClick: t,
|
|
485
|
-
children: /* @__PURE__ */ i(
|
|
485
|
+
children: /* @__PURE__ */ i(Dr, { className: se.chevron })
|
|
486
486
|
}), /* @__PURE__ */ i(ct, {
|
|
487
487
|
size: "md",
|
|
488
|
-
disabled:
|
|
488
|
+
disabled: v || s,
|
|
489
489
|
"aria-label": u,
|
|
490
490
|
onClick: r,
|
|
491
|
-
children: /* @__PURE__ */ i(
|
|
491
|
+
children: /* @__PURE__ */ i(Mr, { className: se.chevron })
|
|
492
492
|
})]
|
|
493
493
|
})
|
|
494
494
|
]
|
|
495
495
|
});
|
|
496
|
-
},
|
|
496
|
+
}, ce = (e) => {
|
|
497
497
|
const t = Ue(e), r = /* @__PURE__ */ new Date(0);
|
|
498
498
|
return r.setFullYear(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate()), r.setHours(0, 0, 0, 0), r;
|
|
499
499
|
}, Dn = ({ calendarRef: e, engineViewedMonthRef: t, viewedMonth: r }) => (te(() => {
|
|
500
|
-
t.current !== r && (e.current?.setPreSelection(
|
|
500
|
+
t.current !== r && (e.current?.setPreSelection(ce(`${r}-01`)), t.current = r);
|
|
501
501
|
}, [
|
|
502
502
|
e,
|
|
503
503
|
t,
|
|
@@ -511,33 +511,33 @@ var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries
|
|
|
511
511
|
return { default: "default" in e ? e.default : e };
|
|
512
512
|
}), On = ({ start: e, end: t }) => {
|
|
513
513
|
if (Ue(e), Ue(t), e > t) throw new Xe({ message: P("Calendar highlighted ranges must end on or after their start date.") });
|
|
514
|
-
}, An = 300,
|
|
515
|
-
const M = U(null), O = U(null), $ = U(e?.slice(0, 7) ?? n), x =
|
|
516
|
-
S(
|
|
514
|
+
}, An = 300, wi = ({ 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: v, portalContainer: b, onNavigationOpenChange: y, isDateUnavailable: w, disabled: p = !1, isKeyboardNavigationDisabled: j = !1, renderHeader: k, loadingFallback: C, dir: f, render: E, ref: _, className: T, ...H }) => {
|
|
515
|
+
const M = U(null), O = U(null), $ = U(e?.slice(0, 7) ?? n), x = an(), R = f === "rtl" || f === "ltr" ? f : x;
|
|
516
|
+
S(a) && On(a);
|
|
517
517
|
const A = (D) => {
|
|
518
518
|
const B = _e(D).slice(0, 7);
|
|
519
|
-
$.current = B, B !== n &&
|
|
519
|
+
$.current = B, B !== n && o(B);
|
|
520
520
|
}, re = (D) => {
|
|
521
|
-
s ||
|
|
521
|
+
s || p || !S(D) || t(_e(D));
|
|
522
522
|
}, Y = {
|
|
523
523
|
ref: M,
|
|
524
524
|
open: !0,
|
|
525
525
|
onClickOutside: (D) => {
|
|
526
526
|
O.current === D && D.preventDefault();
|
|
527
527
|
},
|
|
528
|
-
minDate:
|
|
529
|
-
maxDate:
|
|
530
|
-
disabled:
|
|
528
|
+
minDate: ce("0001-01-01"),
|
|
529
|
+
maxDate: ce("9999-12-31"),
|
|
530
|
+
disabled: p,
|
|
531
531
|
disabledKeyboardNavigation: j,
|
|
532
|
-
openToDate:
|
|
532
|
+
openToDate: ce(`${n}-01`),
|
|
533
533
|
calendarStartDay: l,
|
|
534
534
|
onMonthChange: A,
|
|
535
535
|
onYearChange: A,
|
|
536
536
|
filterDate: (D) => !w?.(_e(D)),
|
|
537
537
|
onSelect: (D) => {
|
|
538
|
-
if (s ||
|
|
538
|
+
if (s || p || !S(D)) return;
|
|
539
539
|
const B = _e(D);
|
|
540
|
-
S(
|
|
540
|
+
S(a) && B !== e && t(B), r?.(B);
|
|
541
541
|
},
|
|
542
542
|
renderCustomDayName: S(h) ? ({ day: D }) => /* @__PURE__ */ i("span", {
|
|
543
543
|
title: new Intl.DateTimeFormat(u, { weekday: "long" }).format(D),
|
|
@@ -557,31 +557,31 @@ var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries
|
|
|
557
557
|
}
|
|
558
558
|
He.setDate(0), M.current?.setPreSelection(He);
|
|
559
559
|
},
|
|
560
|
-
isPreviousMonthDisabled:
|
|
561
|
-
isNextMonthDisabled:
|
|
560
|
+
isPreviousMonthDisabled: p || Tr,
|
|
561
|
+
isNextMonthDisabled: p || Pr
|
|
562
562
|
};
|
|
563
|
-
return S(k) ? /* @__PURE__ */ i(
|
|
563
|
+
return S(k) ? /* @__PURE__ */ i(Q, { children: k(st) }) : /* @__PURE__ */ i(xn, {
|
|
564
564
|
...st,
|
|
565
565
|
locale: u,
|
|
566
566
|
previousMonthLabel: d,
|
|
567
567
|
nextMonthLabel: g,
|
|
568
568
|
monthLabel: m,
|
|
569
|
-
yearLabel:
|
|
569
|
+
yearLabel: v,
|
|
570
570
|
portalContainer: b,
|
|
571
571
|
onNavigationOpenChange: y,
|
|
572
|
-
disabled:
|
|
572
|
+
disabled: p
|
|
573
573
|
});
|
|
574
574
|
}
|
|
575
|
-
},
|
|
575
|
+
}, fe = () => S(a) ? /* @__PURE__ */ i(ht, {
|
|
576
576
|
...Y,
|
|
577
577
|
selectsRange: !0,
|
|
578
|
-
startDate:
|
|
579
|
-
endDate:
|
|
578
|
+
startDate: ce(a.start),
|
|
579
|
+
endDate: ce(a.end),
|
|
580
580
|
onChange: () => {
|
|
581
581
|
}
|
|
582
582
|
}) : /* @__PURE__ */ i(ht, {
|
|
583
583
|
...Y,
|
|
584
|
-
selected: S(e) ?
|
|
584
|
+
selected: S(e) ? ce(e) : null,
|
|
585
585
|
onChange: re
|
|
586
586
|
});
|
|
587
587
|
return Te({
|
|
@@ -594,16 +594,16 @@ var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries
|
|
|
594
594
|
onMouseDownCapture: (D) => {
|
|
595
595
|
H.onMouseDownCapture?.(D), O.current = D.nativeEvent;
|
|
596
596
|
},
|
|
597
|
-
className:
|
|
597
|
+
className: W(se.calendar, T),
|
|
598
598
|
"data-readonly": s || void 0,
|
|
599
599
|
"data-hide-grid": c || void 0,
|
|
600
|
-
children: /* @__PURE__ */ I(
|
|
600
|
+
children: /* @__PURE__ */ I(Qr, {
|
|
601
601
|
fallback: C ?? /* @__PURE__ */ i(Kr, { height: An }),
|
|
602
602
|
children: [/* @__PURE__ */ i(Dn, {
|
|
603
603
|
calendarRef: M,
|
|
604
604
|
engineViewedMonthRef: $,
|
|
605
605
|
viewedMonth: n
|
|
606
|
-
}),
|
|
606
|
+
}), fe()]
|
|
607
607
|
})
|
|
608
608
|
}
|
|
609
609
|
});
|
|
@@ -612,8 +612,8 @@ var At = Ye(void 0), sn = "country:", Ht = (e) => `${sn}${e}`, $t = ({ countries
|
|
|
612
612
|
get: t[r],
|
|
613
613
|
enumerable: !0
|
|
614
614
|
});
|
|
615
|
-
},
|
|
616
|
-
$n(
|
|
615
|
+
}, ue = {};
|
|
616
|
+
$n(ue, {
|
|
617
617
|
ActiveEmoji: () => _r,
|
|
618
618
|
Empty: () => wr,
|
|
619
619
|
List: () => pr,
|
|
@@ -624,7 +624,7 @@ $n(ce, {
|
|
|
624
624
|
SkinToneSelector: () => br,
|
|
625
625
|
Viewport: () => mr
|
|
626
626
|
});
|
|
627
|
-
var
|
|
627
|
+
var Wt = "'Apple Color Emoji', 'Noto Color Emoji', 'Twemoji Mozilla', 'Android Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', EmojiSymbols, sans-serif", at = [
|
|
628
628
|
"none",
|
|
629
629
|
"light",
|
|
630
630
|
"medium-light",
|
|
@@ -632,7 +632,7 @@ var Gt = "'Apple Color Emoji', 'Noto Color Emoji', 'Twemoji Mozilla', 'Android E
|
|
|
632
632
|
"medium-dark",
|
|
633
633
|
"dark"
|
|
634
634
|
];
|
|
635
|
-
function
|
|
635
|
+
function We(e) {
|
|
636
636
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
637
637
|
}
|
|
638
638
|
var J = 2, V = null;
|
|
@@ -643,7 +643,7 @@ function gt(e) {
|
|
|
643
643
|
}
|
|
644
644
|
if (!V || (queueMicrotask(() => {
|
|
645
645
|
V && (V = null);
|
|
646
|
-
}), V.canvas.width = J, V.canvas.height = J, V.font = `2px ${
|
|
646
|
+
}), V.canvas.width = J, V.canvas.height = J, V.font = `2px ${Wt}`, V.textBaseline = "middle", V.measureText(e).width >= J * 2)) return !1;
|
|
647
647
|
V.fillStyle = "#00f", V.fillText(e, 0, 0);
|
|
648
648
|
let t = V.getImageData(0, 0, J, J).data;
|
|
649
649
|
V.clearRect(0, 0, J, J), V.fillStyle = "#f00", V.fillText(e, 0, 0);
|
|
@@ -651,7 +651,7 @@ function gt(e) {
|
|
|
651
651
|
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
652
|
return !0;
|
|
653
653
|
}
|
|
654
|
-
function
|
|
654
|
+
function Gt(e, t, r) {
|
|
655
655
|
try {
|
|
656
656
|
let n = e.getItem(t);
|
|
657
657
|
if (!n) throw new Error(`No value found for "${t}".`);
|
|
@@ -678,13 +678,13 @@ function Jt(e) {
|
|
|
678
678
|
if (typeof e != "boolean") throw new Error();
|
|
679
679
|
return e;
|
|
680
680
|
}
|
|
681
|
-
function
|
|
681
|
+
function de(e) {
|
|
682
682
|
return (t) => {
|
|
683
683
|
if (typeof t != "object" || t === null) throw new Error();
|
|
684
684
|
let r = {};
|
|
685
685
|
for (let n in e) {
|
|
686
|
-
let
|
|
687
|
-
|
|
686
|
+
let o = t[n];
|
|
687
|
+
o === void 0 && e[n](void 0), r[n] = e[n](o);
|
|
688
688
|
}
|
|
689
689
|
return r;
|
|
690
690
|
};
|
|
@@ -695,9 +695,9 @@ function Ie(e) {
|
|
|
695
695
|
return t.length > 0 && e(t[0]), t;
|
|
696
696
|
};
|
|
697
697
|
}
|
|
698
|
-
var Mn = "frimousse/data", Fn =
|
|
698
|
+
var Mn = "frimousse/data", Fn = de({
|
|
699
699
|
locale: F,
|
|
700
|
-
emojis: Ie(
|
|
700
|
+
emojis: Ie(de({
|
|
701
701
|
emoji: F,
|
|
702
702
|
category: Me,
|
|
703
703
|
label: F,
|
|
@@ -705,7 +705,7 @@ var Mn = "frimousse/data", Fn = ue({
|
|
|
705
705
|
tags: Ie(F),
|
|
706
706
|
aliases: Re(Ie(F)),
|
|
707
707
|
countryFlag: Re(Jt),
|
|
708
|
-
skins: Re(
|
|
708
|
+
skins: Re(de({
|
|
709
709
|
light: F,
|
|
710
710
|
"medium-light": F,
|
|
711
711
|
medium: F,
|
|
@@ -713,11 +713,11 @@ var Mn = "frimousse/data", Fn = ue({
|
|
|
713
713
|
dark: F
|
|
714
714
|
}))
|
|
715
715
|
})),
|
|
716
|
-
categories: Ie(
|
|
716
|
+
categories: Ie(de({
|
|
717
717
|
index: Me,
|
|
718
718
|
label: F
|
|
719
719
|
})),
|
|
720
|
-
skinTones:
|
|
720
|
+
skinTones: de({
|
|
721
721
|
light: F,
|
|
722
722
|
"medium-light": F,
|
|
723
723
|
medium: F,
|
|
@@ -726,23 +726,23 @@ var Mn = "frimousse/data", Fn = ue({
|
|
|
726
726
|
})
|
|
727
727
|
});
|
|
728
728
|
function Vn({ name: e = Mn } = {}) {
|
|
729
|
-
let t = `${e}/`, r =
|
|
729
|
+
let t = `${e}/`, r = de({
|
|
730
730
|
data: Fn,
|
|
731
731
|
metadata: (n) => n
|
|
732
732
|
});
|
|
733
733
|
return {
|
|
734
734
|
get(n) {
|
|
735
735
|
try {
|
|
736
|
-
return
|
|
736
|
+
return Gt(localStorage, `${t}${n}`, r);
|
|
737
737
|
} catch {
|
|
738
738
|
return null;
|
|
739
739
|
}
|
|
740
740
|
},
|
|
741
|
-
set(n,
|
|
741
|
+
set(n, o, ...[a]) {
|
|
742
742
|
try {
|
|
743
743
|
Kt(localStorage, `${t}${n}`, {
|
|
744
|
-
data:
|
|
745
|
-
metadata:
|
|
744
|
+
data: o,
|
|
745
|
+
metadata: a
|
|
746
746
|
});
|
|
747
747
|
} catch {
|
|
748
748
|
}
|
|
@@ -761,22 +761,22 @@ function Vn({ name: e = Mn } = {}) {
|
|
|
761
761
|
}
|
|
762
762
|
};
|
|
763
763
|
}
|
|
764
|
-
var Xt = /* @__PURE__ */ new Map(),
|
|
765
|
-
function
|
|
764
|
+
var Xt = /* @__PURE__ */ new Map(), Qe = /* @__PURE__ */ new WeakMap(), Ln = /* @__PURE__ */ new Set();
|
|
765
|
+
function Qt({ emojiVersion: e, emojibaseUrl: t }) {
|
|
766
766
|
return t ?? (typeof e == "number" ? `https://cdn.jsdelivr.net/npm/emojibase-data@${Math.floor(e)}` : "https://cdn.jsdelivr.net/npm/emojibase-data@latest");
|
|
767
767
|
}
|
|
768
768
|
function zn(e, t) {
|
|
769
|
-
return (t.resolveEmojiData ?
|
|
769
|
+
return (t.resolveEmojiData ? Qe.get(t.resolveEmojiData) : Xt)?.get(er(e, t))?.data;
|
|
770
770
|
}
|
|
771
|
-
function
|
|
772
|
-
let n = Yn(e, t),
|
|
773
|
-
n.data = r, n.load = void 0,
|
|
774
|
-
for (let
|
|
771
|
+
function Zt(e, t, r) {
|
|
772
|
+
let n = Yn(e, t), o = n.load?.status === "pending" ? n.load : void 0;
|
|
773
|
+
n.data = r, n.load = void 0, o?.complete();
|
|
774
|
+
for (let a of Ln) a();
|
|
775
775
|
}
|
|
776
776
|
async function Un(e, t, r) {
|
|
777
777
|
r.signal?.throwIfAborted();
|
|
778
778
|
let n = await e(t, r);
|
|
779
|
-
return r.signal?.throwIfAborted(),
|
|
779
|
+
return r.signal?.throwIfAborted(), Zt(t, {
|
|
780
780
|
...r,
|
|
781
781
|
resolveEmojiData: e
|
|
782
782
|
}, n), n;
|
|
@@ -786,18 +786,18 @@ function er(e, t) {
|
|
|
786
786
|
e,
|
|
787
787
|
t.emojibaseUrl,
|
|
788
788
|
t.emojiVersion
|
|
789
|
-
]) : JSON.stringify([e,
|
|
789
|
+
]) : JSON.stringify([e, Qt(t)]);
|
|
790
790
|
}
|
|
791
791
|
function Yn(e, t) {
|
|
792
792
|
let r = Xt;
|
|
793
793
|
if (t.resolveEmojiData) {
|
|
794
|
-
let
|
|
795
|
-
r =
|
|
794
|
+
let a = Qe.get(t.resolveEmojiData);
|
|
795
|
+
r = a ?? /* @__PURE__ */ new Map(), a || Qe.set(t.resolveEmojiData, r);
|
|
796
796
|
}
|
|
797
|
-
let n = er(e, t),
|
|
798
|
-
return
|
|
797
|
+
let n = er(e, t), o = r.get(n);
|
|
798
|
+
return o || (o = {}, r.set(n, o)), o;
|
|
799
799
|
}
|
|
800
|
-
var
|
|
800
|
+
var ot = (e, t) => `${e}/${t}/data.json`, tr = (e, t) => `${e}/${t}/messages.json`, qn = [
|
|
801
801
|
"bn",
|
|
802
802
|
"da",
|
|
803
803
|
"de",
|
|
@@ -841,7 +841,7 @@ async function vt(e, t) {
|
|
|
841
841
|
}
|
|
842
842
|
}
|
|
843
843
|
async function Bn(e, t, r) {
|
|
844
|
-
let [{ emojis: n, emojisEtag:
|
|
844
|
+
let [{ emojis: n, emojisEtag: o }, { messages: a, messagesEtag: s }] = await Promise.all([fetch(ot(e, t), { signal: r }).then(async (c) => ({
|
|
845
845
|
emojis: await c.json(),
|
|
846
846
|
emojisEtag: c.headers.get("etag")
|
|
847
847
|
})), fetch(tr(e, t), { signal: r }).then(async (c) => ({
|
|
@@ -850,79 +850,79 @@ async function Bn(e, t, r) {
|
|
|
850
850
|
}))]);
|
|
851
851
|
return {
|
|
852
852
|
emojis: n,
|
|
853
|
-
messages:
|
|
854
|
-
emojisEtag:
|
|
853
|
+
messages: a,
|
|
854
|
+
emojisEtag: o,
|
|
855
855
|
messagesEtag: s
|
|
856
856
|
};
|
|
857
857
|
}
|
|
858
|
-
async function
|
|
859
|
-
let [n,
|
|
858
|
+
async function Wn(e, t, r) {
|
|
859
|
+
let [n, o] = await Promise.all([vt(ot(e, t), r), vt(tr(e, t), r)]);
|
|
860
860
|
return {
|
|
861
861
|
emojisEtag: n,
|
|
862
|
-
messagesEtag:
|
|
862
|
+
messagesEtag: o
|
|
863
863
|
};
|
|
864
864
|
}
|
|
865
|
-
function
|
|
865
|
+
function Gn(e) {
|
|
866
866
|
return e.skins ? e.skins.filter((t) => typeof t.tone == "number").reduce((t, r) => {
|
|
867
|
-
let n =
|
|
867
|
+
let n = at[r.tone];
|
|
868
868
|
return t[n] = r.emoji, t;
|
|
869
869
|
}, {}) : void 0;
|
|
870
870
|
}
|
|
871
871
|
async function pt(e, t, r) {
|
|
872
|
-
let { emojis: n, emojisEtag:
|
|
872
|
+
let { emojis: n, emojisEtag: o, messages: a, messagesEtag: s } = await Bn(e, t, r);
|
|
873
873
|
r?.throwIfAborted();
|
|
874
|
-
let c =
|
|
874
|
+
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
875
|
index: m.order,
|
|
876
|
-
label:
|
|
877
|
-
})), d =
|
|
876
|
+
label: We(m.message)
|
|
877
|
+
})), d = a.skinTones.reduce((m, v) => (m[v.key] = We(v.message), m), {}), g = {
|
|
878
878
|
locale: t,
|
|
879
879
|
emojis: u.map((m) => {
|
|
880
|
-
let
|
|
880
|
+
let v = m.skins?.filter((b) => Array.isArray(b.tone)).map((b) => b.emoji);
|
|
881
881
|
return {
|
|
882
882
|
emoji: m.emoji,
|
|
883
883
|
category: m.group,
|
|
884
884
|
version: m.version,
|
|
885
|
-
label:
|
|
885
|
+
label: We(m.label),
|
|
886
886
|
tags: m.tags ?? [],
|
|
887
887
|
countryFlag: c && m.subgroup === c.order || void 0,
|
|
888
|
-
skins:
|
|
889
|
-
aliases:
|
|
888
|
+
skins: Gn(m),
|
|
889
|
+
aliases: v?.length ? v : void 0
|
|
890
890
|
};
|
|
891
891
|
}),
|
|
892
892
|
categories: h,
|
|
893
893
|
skinTones: d
|
|
894
894
|
};
|
|
895
895
|
return nr(e).set(t, g, {
|
|
896
|
-
emojisEtag:
|
|
896
|
+
emojisEtag: o,
|
|
897
897
|
messagesEtag: s
|
|
898
898
|
}), g;
|
|
899
899
|
}
|
|
900
900
|
function Kn(e) {
|
|
901
901
|
let t = /* @__PURE__ */ new Map();
|
|
902
|
-
for (let
|
|
903
|
-
let r = [...t.keys()].sort((
|
|
904
|
-
for (let
|
|
905
|
-
emojiVersion:
|
|
906
|
-
countryFlags:
|
|
902
|
+
for (let a of e) t.has(a.version) || t.set(a.version, a.emoji);
|
|
903
|
+
let r = [...t.keys()].sort((a, s) => s - a), n = r[0] ?? 0, o = gt("🇪🇺");
|
|
904
|
+
for (let a of r) if (gt(t.get(a))) return {
|
|
905
|
+
emojiVersion: a,
|
|
906
|
+
countryFlags: o
|
|
907
907
|
};
|
|
908
908
|
return {
|
|
909
909
|
emojiVersion: n,
|
|
910
|
-
countryFlags:
|
|
910
|
+
countryFlags: o
|
|
911
911
|
};
|
|
912
912
|
}
|
|
913
|
-
var Jn =
|
|
913
|
+
var Jn = de({
|
|
914
914
|
emojiVersion: Re(Me),
|
|
915
915
|
countryFlags: Re(Jt),
|
|
916
916
|
revalidated: Ie(F)
|
|
917
917
|
});
|
|
918
|
-
function
|
|
918
|
+
function Ze(e) {
|
|
919
919
|
try {
|
|
920
|
-
return
|
|
920
|
+
return Gt(sessionStorage, rr(e), Jn);
|
|
921
921
|
} catch {
|
|
922
922
|
return null;
|
|
923
923
|
}
|
|
924
924
|
}
|
|
925
|
-
function
|
|
925
|
+
function ar(e, t) {
|
|
926
926
|
try {
|
|
927
927
|
Kt(sessionStorage, rr(e), t);
|
|
928
928
|
} catch {
|
|
@@ -930,20 +930,20 @@ function or(e, t) {
|
|
|
930
930
|
}
|
|
931
931
|
function Xn(e, t, r) {
|
|
932
932
|
if (r?.aborted) return Promise.reject(r.reason);
|
|
933
|
-
let n =
|
|
934
|
-
if (
|
|
935
|
-
let
|
|
936
|
-
if (!
|
|
937
|
-
let l = new AbortController(), u =
|
|
933
|
+
let n = ot(e, t), o = zn(t, { emojibaseUrl: e });
|
|
934
|
+
if (o) return Promise.resolve(o);
|
|
935
|
+
let a = Ce.get(n);
|
|
936
|
+
if (!a || a.controller.signal.aborted) {
|
|
937
|
+
let l = new AbortController(), u = Qn(e, t, l.signal).then((h) => (l.signal.throwIfAborted(), Zt(t, { emojibaseUrl: e }, h), h)).finally(() => {
|
|
938
938
|
Ce.get(n)?.promise === u && Ce.delete(n);
|
|
939
939
|
});
|
|
940
|
-
|
|
940
|
+
a = {
|
|
941
941
|
promise: u,
|
|
942
942
|
controller: l,
|
|
943
943
|
callers: 0
|
|
944
|
-
}, Ce.set(n,
|
|
944
|
+
}, Ce.set(n, a);
|
|
945
945
|
}
|
|
946
|
-
let s =
|
|
946
|
+
let s = a;
|
|
947
947
|
s.callers++;
|
|
948
948
|
let c;
|
|
949
949
|
return new Promise((l, u) => {
|
|
@@ -952,38 +952,38 @@ function Xn(e, t, r) {
|
|
|
952
952
|
r?.removeEventListener("abort", c), s.callers--, s.callers === 0 && Ce.get(n) === s && s.controller.abort();
|
|
953
953
|
});
|
|
954
954
|
}
|
|
955
|
-
async function
|
|
956
|
-
let n =
|
|
957
|
-
if (!
|
|
958
|
-
else if (n?.revalidated.includes(t))
|
|
955
|
+
async function Qn(e, t, r) {
|
|
956
|
+
let n = Ze(e), o = nr(e).get(t), a;
|
|
957
|
+
if (!o) a = await pt(e, t, r);
|
|
958
|
+
else if (n?.revalidated.includes(t)) a = o.data;
|
|
959
959
|
else try {
|
|
960
|
-
let { emojisEtag: l, messagesEtag: u } = await
|
|
961
|
-
r.throwIfAborted(),
|
|
960
|
+
let { emojisEtag: l, messagesEtag: u } = await Wn(e, t, r);
|
|
961
|
+
r.throwIfAborted(), a = !l || !u || l !== o.metadata?.emojisEtag || u !== o.metadata?.messagesEtag ? await pt(e, t, r) : o.data;
|
|
962
962
|
} catch {
|
|
963
|
-
r.throwIfAborted(),
|
|
963
|
+
r.throwIfAborted(), a = o.data;
|
|
964
964
|
}
|
|
965
965
|
r.throwIfAborted();
|
|
966
|
-
let s =
|
|
967
|
-
return
|
|
966
|
+
let s = Ze(e), c = s?.revalidated ?? [];
|
|
967
|
+
return ar(e, {
|
|
968
968
|
...s,
|
|
969
969
|
revalidated: c.includes(t) ? c : [...c, t]
|
|
970
|
-
}),
|
|
970
|
+
}), a;
|
|
971
971
|
}
|
|
972
|
-
var
|
|
973
|
-
let
|
|
972
|
+
var Ge = async (e, { emojiVersion: t, emojibaseUrl: r, signal: n } = {}) => {
|
|
973
|
+
let o = Zn(e), a = Qt({
|
|
974
974
|
emojiVersion: t,
|
|
975
975
|
emojibaseUrl: r
|
|
976
|
-
}), s = await Xn(
|
|
976
|
+
}), s = await Xn(a, o, n);
|
|
977
977
|
n?.throwIfAborted();
|
|
978
|
-
let c =
|
|
978
|
+
let c = Ze(a), l = c?.emojiVersion !== void 0 && c.countryFlags !== void 0 ? {
|
|
979
979
|
emojiVersion: c.emojiVersion,
|
|
980
980
|
countryFlags: c.countryFlags
|
|
981
981
|
} : Kn(s.emojis);
|
|
982
|
-
return
|
|
982
|
+
return ar(a, {
|
|
983
983
|
...l,
|
|
984
|
-
revalidated: c?.revalidated ?? [
|
|
984
|
+
revalidated: c?.revalidated ?? [o]
|
|
985
985
|
}), {
|
|
986
|
-
locale:
|
|
986
|
+
locale: o,
|
|
987
987
|
emojis: s.emojis.filter((u) => {
|
|
988
988
|
let h = u.version <= (t ?? l.emojiVersion);
|
|
989
989
|
return u.countryFlag ? h && l.countryFlags : h;
|
|
@@ -992,76 +992,76 @@ var We = async (e, { emojiVersion: t, emojibaseUrl: r, signal: n } = {}) => {
|
|
|
992
992
|
skinTones: s.skinTones
|
|
993
993
|
};
|
|
994
994
|
};
|
|
995
|
-
function
|
|
995
|
+
function Zn(e) {
|
|
996
996
|
return qn.find((t) => t === e) || (console.warn(`Locale "${e}" is not supported, using "${ft}" instead.`), ft);
|
|
997
997
|
}
|
|
998
998
|
function bt(e) {
|
|
999
|
-
return
|
|
999
|
+
return at.includes(e) ? e : (console.warn(`Skin tone "${e}" is not valid, using "none" instead.`), "none");
|
|
1000
1000
|
}
|
|
1001
|
-
function
|
|
1001
|
+
function ea(e, t) {
|
|
1002
1002
|
let r = [];
|
|
1003
1003
|
if (t <= 0) return r;
|
|
1004
|
-
for (let n = 0,
|
|
1004
|
+
for (let n = 0, o = e.length; n < o; n += t) r.push(e.slice(n, n + t));
|
|
1005
1005
|
return r;
|
|
1006
1006
|
}
|
|
1007
|
-
function
|
|
1007
|
+
function ta(e, t) {
|
|
1008
1008
|
if (!t) return e;
|
|
1009
1009
|
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
|
|
1010
|
+
return e.filter((o) => {
|
|
1011
|
+
let a = 0;
|
|
1012
|
+
o.label.toLowerCase().includes(r) && (a += 10);
|
|
1013
|
+
for (let s of o.tags) s.toLowerCase().includes(r) && (a += 1);
|
|
1014
|
+
return a > 0 ? (n.set(o, a), !0) : !1;
|
|
1015
|
+
}).sort((o, a) => (n.get(a) ?? 0) - (n.get(o) ?? 0));
|
|
1016
|
+
}
|
|
1017
|
+
function ra(e, t, r, n) {
|
|
1018
|
+
let o = ta(e.emojis, n), a = [], s = [], c = [], l = {}, u = 0, h = 0;
|
|
1019
|
+
for (let d of o) l[d.category] || (l[d.category] = []), l[d.category].push({
|
|
1020
1020
|
emoji: r && r !== "none" && d.skins ? d.skins[r] : d.emoji,
|
|
1021
1021
|
label: d.label
|
|
1022
1022
|
});
|
|
1023
1023
|
for (let d of e.categories) {
|
|
1024
1024
|
let g = l[d.index];
|
|
1025
1025
|
if (!g || g.length === 0) continue;
|
|
1026
|
-
let m =
|
|
1026
|
+
let m = ea(Array.from(g), t).map((v) => ({
|
|
1027
1027
|
categoryIndex: u,
|
|
1028
|
-
emojis:
|
|
1028
|
+
emojis: v
|
|
1029
1029
|
}));
|
|
1030
|
-
|
|
1030
|
+
a.push(...m), s.push({
|
|
1031
1031
|
label: d.label,
|
|
1032
1032
|
rowsCount: m.length,
|
|
1033
1033
|
startRowIndex: h
|
|
1034
1034
|
}), c.push(h), u++, h += m.length;
|
|
1035
1035
|
}
|
|
1036
1036
|
return {
|
|
1037
|
-
count:
|
|
1037
|
+
count: o.length,
|
|
1038
1038
|
categories: s,
|
|
1039
1039
|
categoriesStartRowIndices: c,
|
|
1040
|
-
rows:
|
|
1040
|
+
rows: a,
|
|
1041
1041
|
skinTones: e.skinTones
|
|
1042
1042
|
};
|
|
1043
1043
|
}
|
|
1044
|
-
function
|
|
1045
|
-
let t = {}, r = null, n = null,
|
|
1044
|
+
function na(e) {
|
|
1045
|
+
let t = {}, r = null, n = null, o = /* @__PURE__ */ new Set(), a = () => {
|
|
1046
1046
|
if (r) {
|
|
1047
1047
|
t = r, r = null;
|
|
1048
|
-
for (let u of
|
|
1048
|
+
for (let u of o) u(t);
|
|
1049
1049
|
}
|
|
1050
1050
|
n = null;
|
|
1051
1051
|
}, s = () => r ?? t, c = (u) => {
|
|
1052
|
-
r ??= t, Object.assign(r, typeof u == "function" ? u(s()) : u), n || (n = requestAnimationFrame(
|
|
1053
|
-
}, l = (u) => (
|
|
1052
|
+
r ??= t, Object.assign(r, typeof u == "function" ? u(s()) : u), n || (n = requestAnimationFrame(a));
|
|
1053
|
+
}, l = (u) => (o.add(u), () => o.delete(u));
|
|
1054
1054
|
return t = e(c, s), {
|
|
1055
1055
|
get: s,
|
|
1056
1056
|
set: c,
|
|
1057
1057
|
subscribe: l
|
|
1058
1058
|
};
|
|
1059
1059
|
}
|
|
1060
|
-
function
|
|
1060
|
+
function aa(e) {
|
|
1061
1061
|
let [t] = K(e);
|
|
1062
1062
|
return t;
|
|
1063
1063
|
}
|
|
1064
|
-
function
|
|
1064
|
+
function oa(e) {
|
|
1065
1065
|
let t = Ye(null);
|
|
1066
1066
|
return {
|
|
1067
1067
|
useStore: () => {
|
|
@@ -1075,11 +1075,11 @@ function ao(e) {
|
|
|
1075
1075
|
})
|
|
1076
1076
|
};
|
|
1077
1077
|
}
|
|
1078
|
-
function
|
|
1079
|
-
let [n,
|
|
1078
|
+
function G(e, t, r = Object.is) {
|
|
1079
|
+
let [n, o] = K(() => t(e.get()));
|
|
1080
1080
|
return te(() => e.subscribe(() => {
|
|
1081
|
-
let
|
|
1082
|
-
|
|
1081
|
+
let a = t(e.get());
|
|
1082
|
+
o((s) => r(s, a) ? s : a);
|
|
1083
1083
|
}), [
|
|
1084
1084
|
e,
|
|
1085
1085
|
t,
|
|
@@ -1087,16 +1087,16 @@ function W(e, t, r = Object.is) {
|
|
|
1087
1087
|
]), tn(n), n;
|
|
1088
1088
|
}
|
|
1089
1089
|
function ee(e, t, r) {
|
|
1090
|
-
return
|
|
1090
|
+
return G(e, z((n) => n[t], [t]), r);
|
|
1091
1091
|
}
|
|
1092
1092
|
var yt = 2;
|
|
1093
|
-
function
|
|
1094
|
-
let
|
|
1095
|
-
return
|
|
1093
|
+
function ia(e, t, r, n, o) {
|
|
1094
|
+
let a = 0;
|
|
1095
|
+
return na((s, c) => ({
|
|
1096
1096
|
locale: t,
|
|
1097
1097
|
columns: r,
|
|
1098
1098
|
sticky: n,
|
|
1099
|
-
skinTone:
|
|
1099
|
+
skinTone: o,
|
|
1100
1100
|
onEmojiSelect: e,
|
|
1101
1101
|
data: null,
|
|
1102
1102
|
search: "",
|
|
@@ -1123,10 +1123,10 @@ function io(e, t, r, n, a) {
|
|
|
1123
1123
|
viewportStartRowIndex: 0,
|
|
1124
1124
|
viewportEndRowIndex: 0
|
|
1125
1125
|
});
|
|
1126
|
-
let
|
|
1127
|
-
for (let _ of h.categories) if (b++ * d + _.startRowIndex * g <
|
|
1126
|
+
let v = 0, b = 0;
|
|
1127
|
+
for (let _ of h.categories) if (b++ * d + _.startRowIndex * g < a) v += d;
|
|
1128
1128
|
else break;
|
|
1129
|
-
let y = h.categories.length * d + h.rows.length * g, w = Math.floor(yt * g / 2),
|
|
1129
|
+
let y = h.categories.length * d + h.rows.length * g, w = Math.floor(yt * g / 2), p = Math.ceil(yt * g / 2), j = Math.min(a - v - w, y - m), k = j + m + p, C = Math.max(0, Math.floor(j / g)), f = Math.min(h.rows.length - 1, Math.ceil(k / g)), E = h.rows[C]?.categoryIndex;
|
|
1130
1130
|
return s(E === void 0 && l ? l : {
|
|
1131
1131
|
...l,
|
|
1132
1132
|
viewportStartCategoryIndex: E,
|
|
@@ -1153,20 +1153,20 @@ function io(e, t, r, n, a) {
|
|
|
1153
1153
|
activeColumnIndex: u,
|
|
1154
1154
|
activeRowIndex: h
|
|
1155
1155
|
}), l !== "keyboard") return;
|
|
1156
|
-
let { listRef: d, viewportRef: g, sticky: m, rowHeight:
|
|
1157
|
-
if (!w || !
|
|
1156
|
+
let { listRef: d, viewportRef: g, sticky: m, rowHeight: v, viewportHeight: b, categoryHeaderHeight: y } = c(), w = d?.current, p = g?.current;
|
|
1157
|
+
if (!w || !p || !v || !y || !b) return;
|
|
1158
1158
|
let j = h;
|
|
1159
|
-
j === 0 &&
|
|
1159
|
+
j === 0 && p.scrollTo({
|
|
1160
1160
|
top: 0,
|
|
1161
1161
|
behavior: "instant"
|
|
1162
1162
|
});
|
|
1163
1163
|
let k = w.querySelector(`[aria-rowindex="${j}"]`);
|
|
1164
1164
|
if (!(k instanceof HTMLElement)) return;
|
|
1165
|
-
let C = k.offsetTop, f = getComputedStyle(k), E = Number.parseFloat(f.scrollMarginTop), _ = Number.parseFloat(f.scrollMarginBottom), T =
|
|
1166
|
-
m && C <
|
|
1165
|
+
let C = k.offsetTop, f = getComputedStyle(k), E = Number.parseFloat(f.scrollMarginTop), _ = Number.parseFloat(f.scrollMarginBottom), T = a + E;
|
|
1166
|
+
m && C < a + b / 2 && (T += y);
|
|
1167
1167
|
let H = T + b - _;
|
|
1168
|
-
(C < T || C +
|
|
1169
|
-
top: Math.max(C < T + y ? C - Math.max(m ? y : 0, E) : C - b +
|
|
1168
|
+
(C < T || C + v > H) && p.scrollTo({
|
|
1169
|
+
top: Math.max(C < T + y ? C - Math.max(m ? y : 0, E) : C - b + v + _, 0),
|
|
1170
1170
|
behavior: "instant"
|
|
1171
1171
|
});
|
|
1172
1172
|
},
|
|
@@ -1190,71 +1190,71 @@ function io(e, t, r, n, a) {
|
|
|
1190
1190
|
});
|
|
1191
1191
|
},
|
|
1192
1192
|
onViewportScroll: (l) => {
|
|
1193
|
-
|
|
1193
|
+
a = l, c().updateViewportState();
|
|
1194
1194
|
}
|
|
1195
1195
|
}));
|
|
1196
1196
|
}
|
|
1197
|
-
var { useStore: q, Provider:
|
|
1198
|
-
function
|
|
1197
|
+
var { useStore: q, Provider: la } = oa("EmojiPicker.Root is missing.");
|
|
1198
|
+
function sa(e) {
|
|
1199
1199
|
return e.search;
|
|
1200
1200
|
}
|
|
1201
1201
|
function it(e) {
|
|
1202
1202
|
return e.interaction === "none" ? void 0 : e.data?.rows[e.activeRowIndex]?.emojis[e.activeColumnIndex];
|
|
1203
1203
|
}
|
|
1204
|
-
function
|
|
1204
|
+
function ca(e) {
|
|
1205
1205
|
return e.data === void 0 || typeof e.data?.count == "number" && e.data.count === 0;
|
|
1206
1206
|
}
|
|
1207
|
-
function
|
|
1207
|
+
function ua(e) {
|
|
1208
1208
|
return e.data === null || e.viewportHeight === null || e.rowHeight === null || e.categoryHeaderHeight === null;
|
|
1209
1209
|
}
|
|
1210
|
-
function
|
|
1210
|
+
function or(e) {
|
|
1211
1211
|
return e.data?.rows.length;
|
|
1212
1212
|
}
|
|
1213
|
-
function
|
|
1213
|
+
function da(e) {
|
|
1214
1214
|
return e.data?.categories.length;
|
|
1215
1215
|
}
|
|
1216
|
-
function
|
|
1216
|
+
function ma(e) {
|
|
1217
1217
|
return e.data?.categoriesStartRowIndices;
|
|
1218
1218
|
}
|
|
1219
|
-
function
|
|
1219
|
+
function ha(e) {
|
|
1220
1220
|
return e.data?.skinTones;
|
|
1221
1221
|
}
|
|
1222
1222
|
function ir(e, t) {
|
|
1223
1223
|
return e?.emoji === t?.emoji;
|
|
1224
1224
|
}
|
|
1225
|
-
function
|
|
1225
|
+
function ga(e, t) {
|
|
1226
1226
|
return e?.categoryIndex !== t?.categoryIndex || e?.emojis.length !== t?.emojis.length ? !1 : !!e?.emojis.every((r, n) => ir(r, t?.emojis[n]));
|
|
1227
1227
|
}
|
|
1228
|
-
var Ee = "", wt = new RegExp("\\p{Emoji_Modifier_Base}", "u"),
|
|
1228
|
+
var Ee = "", wt = new RegExp("\\p{Emoji_Modifier_Base}", "u"), fa = /\uFE0F$/, va = /\u{1F3FB}|\u{1F3FC}|\u{1F3FD}|\u{1F3FE}|\u{1F3FF}/gu, pa = {
|
|
1229
1229
|
light: "🏻",
|
|
1230
1230
|
"medium-light": "🏼",
|
|
1231
1231
|
medium: "🏽",
|
|
1232
1232
|
"medium-dark": "🏾",
|
|
1233
1233
|
dark: "🏿"
|
|
1234
1234
|
};
|
|
1235
|
-
function
|
|
1235
|
+
function ba(e, t) {
|
|
1236
1236
|
if (!e.split(Ee).some((n) => wt.test(n))) return e;
|
|
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 !wt.test(n) || s && n === "🤝" ? n : n.replace(
|
|
1237
|
+
let r = e.split(Ee).map((n) => n.replace(va, "")).join(Ee);
|
|
1238
|
+
return t === "none" ? r : r.split(Ee).map((n, o, a) => {
|
|
1239
|
+
let s = a.length > 1;
|
|
1240
|
+
return !wt.test(n) || s && n === "🤝" ? n : n.replace(fa, "") + pa[t];
|
|
1241
1241
|
}).join(Ee);
|
|
1242
1242
|
}
|
|
1243
|
-
function
|
|
1244
|
-
return
|
|
1243
|
+
function ya(e) {
|
|
1244
|
+
return at.map((t) => ({
|
|
1245
1245
|
skinTone: t,
|
|
1246
|
-
emoji:
|
|
1246
|
+
emoji: ba(e, t)
|
|
1247
1247
|
}));
|
|
1248
1248
|
}
|
|
1249
1249
|
function lr() {
|
|
1250
|
-
return rn(
|
|
1250
|
+
return rn(G(q(), it, ir));
|
|
1251
1251
|
}
|
|
1252
1252
|
function sr(e = "✋") {
|
|
1253
|
-
let t = q(), r = ee(t, "skinTone"), n =
|
|
1253
|
+
let t = q(), r = ee(t, "skinTone"), n = he(() => ya(e), [e]);
|
|
1254
1254
|
return [
|
|
1255
1255
|
r,
|
|
1256
|
-
z((
|
|
1257
|
-
t.set({ skinTone:
|
|
1256
|
+
z((o) => {
|
|
1257
|
+
t.set({ skinTone: o });
|
|
1258
1258
|
}, []),
|
|
1259
1259
|
n
|
|
1260
1260
|
];
|
|
@@ -1263,11 +1263,11 @@ function lt(e, t) {
|
|
|
1263
1263
|
if (Object.is(e, t)) return !0;
|
|
1264
1264
|
if (typeof e != "object" || typeof t != "object" || e === null || t === null || Array.isArray(e) !== Array.isArray(t)) return !1;
|
|
1265
1265
|
let r = Object.keys(e), n = Object.keys(t);
|
|
1266
|
-
return r.length !== n.length ? !1 : r.every((
|
|
1266
|
+
return r.length !== n.length ? !1 : r.every((o) => o in t && e[o] === t[o]);
|
|
1267
1267
|
}
|
|
1268
|
-
function
|
|
1268
|
+
function wa(...e) {
|
|
1269
1269
|
}
|
|
1270
|
-
function
|
|
1270
|
+
function _a(e, t) {
|
|
1271
1271
|
let r = null;
|
|
1272
1272
|
if (typeof window.requestIdleCallback == "function") r = window.requestIdleCallback(e, t);
|
|
1273
1273
|
else {
|
|
@@ -1290,8 +1290,8 @@ function cr(e) {
|
|
|
1290
1290
|
t.current = e;
|
|
1291
1291
|
}), z((...r) => t.current(...r), []);
|
|
1292
1292
|
}
|
|
1293
|
-
function
|
|
1294
|
-
let [n,
|
|
1293
|
+
function Ca({ emojiVersion: e, emojibaseUrl: t, resolveEmojiData: r = Ge }) {
|
|
1294
|
+
let [n, o] = K(void 0), a = q(), s = ee(a, "locale"), c = ee(a, "columns"), l = ee(a, "skinTone"), u = ee(a, "search"), h = cr((d, g) => r === Ge ? Ge(d, g) : Un(r, d, g));
|
|
1295
1295
|
return te(() => {
|
|
1296
1296
|
let d = new AbortController(), g = d.signal;
|
|
1297
1297
|
return Promise.resolve().then(() => h(s, {
|
|
@@ -1299,7 +1299,7 @@ function Eo({ emojiVersion: e, emojibaseUrl: t, resolveEmojiData: r = We }) {
|
|
|
1299
1299
|
emojibaseUrl: t,
|
|
1300
1300
|
signal: g
|
|
1301
1301
|
})).then((m) => {
|
|
1302
|
-
g.aborted ||
|
|
1302
|
+
g.aborted || o(m);
|
|
1303
1303
|
}).catch((m) => {
|
|
1304
1304
|
g.aborted || console.error(m);
|
|
1305
1305
|
}), () => {
|
|
@@ -1311,8 +1311,8 @@ function Eo({ emojiVersion: e, emojibaseUrl: t, resolveEmojiData: r = We }) {
|
|
|
1311
1311
|
s,
|
|
1312
1312
|
h
|
|
1313
1313
|
]), te(() => {
|
|
1314
|
-
if (n) return
|
|
1315
|
-
|
|
1314
|
+
if (n) return _a(() => {
|
|
1315
|
+
a.get().onDataChange(ra(n, c, l, u));
|
|
1316
1316
|
}, { timeout: 100 });
|
|
1317
1317
|
}, [
|
|
1318
1318
|
n,
|
|
@@ -1321,9 +1321,9 @@ function Eo({ emojiVersion: e, emojibaseUrl: t, resolveEmojiData: r = We }) {
|
|
|
1321
1321
|
u
|
|
1322
1322
|
]), null;
|
|
1323
1323
|
}
|
|
1324
|
-
var ur = xe(({ locale: e = "en", columns: t = 9, skinTone: r = "none", onEmojiSelect: n =
|
|
1325
|
-
let
|
|
1326
|
-
f && (
|
|
1324
|
+
var ur = xe(({ locale: e = "en", columns: t = 9, skinTone: r = "none", onEmojiSelect: n = wa, emojiVersion: o, emojibaseUrl: a, resolveEmojiData: s, onFocusCapture: c, onBlurCapture: l, children: u, style: h, sticky: d = !0, ...g }, m) => {
|
|
1325
|
+
let v = cr(n), b = aa(() => ia(v, e, t, d, bt(r))), [y, w] = K(!1), p = U(null), j = z((f) => {
|
|
1326
|
+
f && (p.current = f, b.set({ rootRef: p }));
|
|
1327
1327
|
}, []);
|
|
1328
1328
|
X(() => {
|
|
1329
1329
|
b.set({ locale: e });
|
|
@@ -1343,7 +1343,7 @@ var ur = xe(({ locale: e = "en", columns: t = 9, skinTone: r = "none", onEmojiSe
|
|
|
1343
1343
|
}, [l]);
|
|
1344
1344
|
return X(() => {
|
|
1345
1345
|
y || b.get().onActiveEmojiReset();
|
|
1346
|
-
}, [y]), qe(m, () =>
|
|
1346
|
+
}, [y]), qe(m, () => p.current), te(() => {
|
|
1347
1347
|
if (!y) return;
|
|
1348
1348
|
function f(E) {
|
|
1349
1349
|
if (E.defaultPrevented || !E.key.startsWith("Arrow") && E.key !== "Enter") return;
|
|
@@ -1388,9 +1388,9 @@ var ur = xe(({ locale: e = "en", columns: t = 9, skinTone: r = "none", onEmojiSe
|
|
|
1388
1388
|
};
|
|
1389
1389
|
}, [y]), X(() => {
|
|
1390
1390
|
let f = null, E = null, _ = null, T = null, H = b.subscribe((R) => {
|
|
1391
|
-
|
|
1391
|
+
p.current && (f !== R.viewportWidth && (f = 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`)), T !== R.categoryHeaderHeight && (T = R.categoryHeaderHeight, p.current.style.setProperty("--frimousse-category-header-height", `${R.categoryHeaderHeight}px`)));
|
|
1392
1392
|
}), { viewportWidth: M, viewportHeight: O, rowHeight: $, categoryHeaderHeight: x } = b.get();
|
|
1393
|
-
return M &&
|
|
1393
|
+
return M && p.current.style.setProperty("--frimousse-viewport-width", `${M}px`), O && p.current.style.setProperty("--frimousse-viewport-height", `${O}px`), $ && p.current.style.setProperty("--frimousse-row-height", `${$}px`), x && p.current.style.setProperty("--frimousse-category-header-height", `${x}px`), H;
|
|
1394
1394
|
}, []), i("div", {
|
|
1395
1395
|
"data-focused": y ? "" : void 0,
|
|
1396
1396
|
"frimousse-root": "",
|
|
@@ -1399,33 +1399,33 @@ var ur = xe(({ locale: e = "en", columns: t = 9, skinTone: r = "none", onEmojiSe
|
|
|
1399
1399
|
...g,
|
|
1400
1400
|
ref: j,
|
|
1401
1401
|
style: {
|
|
1402
|
-
"--frimousse-emoji-font":
|
|
1402
|
+
"--frimousse-emoji-font": Wt,
|
|
1403
1403
|
...h
|
|
1404
1404
|
},
|
|
1405
|
-
children: I(
|
|
1405
|
+
children: I(la, {
|
|
1406
1406
|
store: b,
|
|
1407
|
-
children: [i(
|
|
1408
|
-
emojibaseUrl:
|
|
1409
|
-
emojiVersion:
|
|
1407
|
+
children: [i(Ca, {
|
|
1408
|
+
emojibaseUrl: a,
|
|
1409
|
+
emojiVersion: o,
|
|
1410
1410
|
resolveEmojiData: s
|
|
1411
1411
|
}), u]
|
|
1412
1412
|
})
|
|
1413
1413
|
});
|
|
1414
|
-
}), dr = xe(({ value: e, defaultValue: t, onChange: r, ...n },
|
|
1415
|
-
let
|
|
1416
|
-
d && (s.current = d,
|
|
1414
|
+
}), dr = xe(({ value: e, defaultValue: t, onChange: r, ...n }, o) => {
|
|
1415
|
+
let a = q(), s = U(null), c = z((d) => {
|
|
1416
|
+
d && (s.current = d, a.set({ searchRef: s }));
|
|
1417
1417
|
}, []), l = typeof e == "string", u = U(l);
|
|
1418
1418
|
te(() => {
|
|
1419
1419
|
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
1420
|
}, [l]), X(() => {
|
|
1421
|
-
|
|
1421
|
+
a.set({ search: typeof e == "string" ? e : typeof t == "string" ? t : "" });
|
|
1422
1422
|
}, []), X(() => {
|
|
1423
|
-
typeof e == "string" &&
|
|
1423
|
+
typeof e == "string" && a.get().onSearchChange(e);
|
|
1424
1424
|
}, [e]);
|
|
1425
1425
|
let h = z((d) => {
|
|
1426
|
-
r?.(d), d.isDefaultPrevented() ||
|
|
1426
|
+
r?.(d), d.isDefaultPrevented() || a.get().onSearchChange(d.target.value);
|
|
1427
1427
|
}, [r]);
|
|
1428
|
-
return qe(
|
|
1428
|
+
return qe(o, () => s.current), i("input", {
|
|
1429
1429
|
autoCapitalize: "off",
|
|
1430
1430
|
autoComplete: "off",
|
|
1431
1431
|
autoCorrect: "off",
|
|
@@ -1440,7 +1440,7 @@ var ur = xe(({ locale: e = "en", columns: t = 9, skinTone: r = "none", onEmojiSe
|
|
|
1440
1440
|
ref: c,
|
|
1441
1441
|
value: e
|
|
1442
1442
|
});
|
|
1443
|
-
}),
|
|
1443
|
+
}), Ea = De(() => {
|
|
1444
1444
|
let e = lr();
|
|
1445
1445
|
return e ? i("div", {
|
|
1446
1446
|
"aria-live": "polite",
|
|
@@ -1458,24 +1458,24 @@ var ur = xe(({ locale: e = "en", columns: t = 9, skinTone: r = "none", onEmojiSe
|
|
|
1458
1458
|
},
|
|
1459
1459
|
children: e.label
|
|
1460
1460
|
}) : null;
|
|
1461
|
-
}), mr = xe(({ children: e, onScroll: t, onKeyDown: r, style: n, ...
|
|
1461
|
+
}), mr = xe(({ children: e, onScroll: t, onKeyDown: r, style: n, ...o }, a) => {
|
|
1462
1462
|
let s = q(), c = U(null), l = z((g) => {
|
|
1463
1463
|
g && (c.current = g, s.set({ viewportRef: c }));
|
|
1464
|
-
}, []), u =
|
|
1464
|
+
}, []), u = G(s, or), h = G(s, da), d = z((g) => {
|
|
1465
1465
|
t?.(g), s.get().onViewportScroll(g.currentTarget.scrollTop);
|
|
1466
1466
|
}, [t]);
|
|
1467
1467
|
return X(() => {
|
|
1468
1468
|
if (!c.current) return;
|
|
1469
1469
|
let g = new ResizeObserver(([m]) => {
|
|
1470
|
-
let
|
|
1471
|
-
(w !== b ||
|
|
1470
|
+
let v = m?.borderBoxSize[0]?.inlineSize ?? 0, b = m?.borderBoxSize[0]?.blockSize ?? 0, { onViewportSizeChange: y, viewportHeight: w, viewportWidth: p } = s.get();
|
|
1471
|
+
(w !== b || p !== v) && y(v, b);
|
|
1472
1472
|
});
|
|
1473
1473
|
return g.observe(c.current), s.get().onViewportSizeChange(c.current.offsetWidth, c.current.clientHeight), () => {
|
|
1474
1474
|
g.disconnect();
|
|
1475
1475
|
};
|
|
1476
|
-
}, []), qe(
|
|
1476
|
+
}, []), qe(a, () => c.current), I("div", {
|
|
1477
1477
|
"frimousse-viewport": "",
|
|
1478
|
-
...
|
|
1478
|
+
...o,
|
|
1479
1479
|
onScroll: d,
|
|
1480
1480
|
ref: l,
|
|
1481
1481
|
style: {
|
|
@@ -1489,7 +1489,7 @@ var ur = xe(({ locale: e = "en", columns: t = 9, skinTone: r = "none", onEmojiSe
|
|
|
1489
1489
|
willChange: "scroll-position",
|
|
1490
1490
|
...n
|
|
1491
1491
|
},
|
|
1492
|
-
children: [i(
|
|
1492
|
+
children: [i(Ea, {}), e]
|
|
1493
1493
|
});
|
|
1494
1494
|
});
|
|
1495
1495
|
function hr(e, t, r) {
|
|
@@ -1569,57 +1569,57 @@ function Ct(e, t, r) {
|
|
|
1569
1569
|
role: "grid"
|
|
1570
1570
|
};
|
|
1571
1571
|
}
|
|
1572
|
-
function
|
|
1572
|
+
function Sa(e) {
|
|
1573
1573
|
e.preventDefault();
|
|
1574
1574
|
}
|
|
1575
|
-
var
|
|
1576
|
-
let
|
|
1577
|
-
|
|
1575
|
+
var Ia = De(({ Emoji: e, emoji: t, columnIndex: r, rowIndex: n }) => {
|
|
1576
|
+
let o = q(), a = G(o, (u) => it(u)?.emoji === t.emoji), s = z(() => {
|
|
1577
|
+
o.get().onEmojiSelect(t);
|
|
1578
1578
|
}, [t]), c = z(() => {
|
|
1579
|
-
|
|
1579
|
+
o.get().onActiveEmojiChange("pointer", r, n);
|
|
1580
1580
|
}, [r, n]), l = z(() => {
|
|
1581
|
-
|
|
1581
|
+
o.get().onActiveEmojiReset();
|
|
1582
1582
|
}, []);
|
|
1583
1583
|
return i(e, {
|
|
1584
|
-
...hr(t, r,
|
|
1584
|
+
...hr(t, r, a),
|
|
1585
1585
|
onClick: s,
|
|
1586
|
-
onPointerDown:
|
|
1586
|
+
onPointerDown: Sa,
|
|
1587
1587
|
onPointerEnter: c,
|
|
1588
1588
|
onPointerLeave: l
|
|
1589
1589
|
});
|
|
1590
|
-
}),
|
|
1591
|
-
let n =
|
|
1590
|
+
}), ja = De(({ Row: e, Emoji: t, rowIndex: r }) => {
|
|
1591
|
+
let n = G(q(), (o) => o.data?.rows[r], ga);
|
|
1592
1592
|
return n ? i(e, {
|
|
1593
1593
|
...gr(r),
|
|
1594
|
-
children: n.emojis.map((
|
|
1595
|
-
columnIndex:
|
|
1594
|
+
children: n.emojis.map((o, a) => i(Ia, {
|
|
1595
|
+
columnIndex: a,
|
|
1596
1596
|
Emoji: t,
|
|
1597
|
-
emoji:
|
|
1597
|
+
emoji: o,
|
|
1598
1598
|
rowIndex: r
|
|
1599
|
-
},
|
|
1599
|
+
}, o.label))
|
|
1600
1600
|
}) : null;
|
|
1601
|
-
}),
|
|
1602
|
-
let r = q(), n =
|
|
1601
|
+
}), ka = De(({ CategoryHeader: e, categoryIndex: t }) => {
|
|
1602
|
+
let r = q(), n = G(r, (a) => a.data?.categories[t], lt), o = ee(r, "sticky");
|
|
1603
1603
|
return n ? i("div", {
|
|
1604
1604
|
...fr(t, n),
|
|
1605
|
-
children: i(e, { ...vr({ label: n.label }, !1,
|
|
1605
|
+
children: i(e, { ...vr({ label: n.label }, !1, o) })
|
|
1606
1606
|
}) : null;
|
|
1607
1607
|
}), Et = De(({ CategoryHeader: e, Row: t, Emoji: r }) => {
|
|
1608
|
-
let n = U(null),
|
|
1608
|
+
let n = U(null), o = q(), a = ee(o, "columns"), s = he(() => Array(a).fill({
|
|
1609
1609
|
emoji: "🙂",
|
|
1610
1610
|
label: ""
|
|
1611
|
-
}), [
|
|
1611
|
+
}), [a]), c = he(() => ({ label: "Category" }), []), l = U(null), u = U(null);
|
|
1612
1612
|
return X(() => {
|
|
1613
1613
|
let h = n.current?.parentElement?.parentElement;
|
|
1614
1614
|
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 &&
|
|
1615
|
+
let d = new ResizeObserver((v) => {
|
|
1616
|
+
for (let b of v) {
|
|
1617
|
+
let y = b.contentRect.height, { onRowHeightChange: w, onCategoryHeaderHeightChange: p, rowHeight: j, categoryHeaderHeight: k } = o.get();
|
|
1618
|
+
b.target === l.current && j !== y && w(y), b.target === u.current && k !== y && p(y);
|
|
1619
1619
|
}
|
|
1620
1620
|
});
|
|
1621
1621
|
d.observe(h), d.observe(l.current), d.observe(u.current);
|
|
1622
|
-
let { onRowHeightChange: g, onCategoryHeaderHeightChange: m } =
|
|
1622
|
+
let { onRowHeightChange: g, onCategoryHeaderHeightChange: m } = o.get();
|
|
1623
1623
|
return g(l.current.clientHeight), m(u.current.clientHeight), () => {
|
|
1624
1624
|
d.disconnect();
|
|
1625
1625
|
};
|
|
@@ -1647,27 +1647,27 @@ var jo = De(({ Emoji: e, emoji: t, columnIndex: r, rowIndex: n }) => {
|
|
|
1647
1647
|
})]
|
|
1648
1648
|
});
|
|
1649
1649
|
});
|
|
1650
|
-
function
|
|
1650
|
+
function Ra({ category: e, ...t }) {
|
|
1651
1651
|
return i("div", {
|
|
1652
1652
|
...t,
|
|
1653
1653
|
children: e.label
|
|
1654
1654
|
});
|
|
1655
1655
|
}
|
|
1656
|
-
function
|
|
1656
|
+
function Na({ emoji: e, ...t }) {
|
|
1657
1657
|
return i("button", {
|
|
1658
1658
|
type: "button",
|
|
1659
1659
|
...t,
|
|
1660
1660
|
children: e.emoji
|
|
1661
1661
|
});
|
|
1662
1662
|
}
|
|
1663
|
-
function
|
|
1663
|
+
function Ta({ ...e }) {
|
|
1664
1664
|
return i("div", { ...e });
|
|
1665
1665
|
}
|
|
1666
1666
|
var pr = xe(({ style: e, components: t, ...r }, n) => {
|
|
1667
|
-
let
|
|
1668
|
-
w && (
|
|
1669
|
-
}, []), c = t?.CategoryHeader ??
|
|
1670
|
-
return qe(n, () =>
|
|
1667
|
+
let o = q(), a = U(null), s = z((w) => {
|
|
1668
|
+
w && (a.current = w, o.set({ listRef: a }));
|
|
1669
|
+
}, []), c = t?.CategoryHeader ?? Ra, l = t?.Emoji ?? Na, u = t?.Row ?? Ta, h = ee(o, "columns"), d = ee(o, "viewportStartRowIndex"), g = ee(o, "viewportEndRowIndex"), m = G(o, or), v = G(o, ma, lt), b = he(() => v?.filter((w) => w < d).length ?? 0, [v, d]), y = v?.length ?? 0;
|
|
1670
|
+
return qe(n, () => a.current), !m || !v || y === 0 ? i("div", {
|
|
1671
1671
|
...Ct(h, 0, e),
|
|
1672
1672
|
...r,
|
|
1673
1673
|
children: i("div", {
|
|
@@ -1690,24 +1690,24 @@ var pr = xe(({ style: e, components: t, ...r }, n) => {
|
|
|
1690
1690
|
Emoji: l,
|
|
1691
1691
|
Row: u
|
|
1692
1692
|
}),
|
|
1693
|
-
Array.from({ length: g - d + 1 }, (w,
|
|
1694
|
-
let j = d +
|
|
1695
|
-
return I(Xr, { children: [
|
|
1693
|
+
Array.from({ length: g - d + 1 }, (w, p) => {
|
|
1694
|
+
let j = d + p;
|
|
1695
|
+
return I(Xr, { children: [v.indexOf(j) >= 0 && i("div", { style: { height: "var(--frimousse-category-header-height)" } }), i(ja, {
|
|
1696
1696
|
Emoji: l,
|
|
1697
1697
|
Row: u,
|
|
1698
1698
|
rowIndex: j
|
|
1699
1699
|
})] }, j);
|
|
1700
1700
|
}),
|
|
1701
|
-
Array.from({ length: y }, (w,
|
|
1701
|
+
Array.from({ length: y }, (w, p) => i(ka, {
|
|
1702
1702
|
CategoryHeader: c,
|
|
1703
|
-
categoryIndex:
|
|
1704
|
-
},
|
|
1703
|
+
categoryIndex: p
|
|
1704
|
+
}, p))
|
|
1705
1705
|
]
|
|
1706
1706
|
})
|
|
1707
1707
|
});
|
|
1708
|
-
}), br = xe(({ emoji: e, onClick: t, "aria-label": r = "Change skin tone", ...n },
|
|
1709
|
-
let
|
|
1710
|
-
t?.(
|
|
1708
|
+
}), br = xe(({ emoji: e, onClick: t, "aria-label": r = "Change skin tone", ...n }, o) => {
|
|
1709
|
+
let a = G(q(), ha, lt), [s, c, l] = sr(e), u = he(() => Math.max(0, l.findIndex((v) => v.skinTone === s)), [s, l]), h = l[u], d = l[(u + 1) % l.length].skinTone, g = d === "none" ? void 0 : a?.[d], m = z((v) => {
|
|
1710
|
+
t?.(v), v.isDefaultPrevented() || c(d);
|
|
1711
1711
|
}, [
|
|
1712
1712
|
t,
|
|
1713
1713
|
c,
|
|
@@ -1720,36 +1720,36 @@ var pr = xe(({ style: e, components: t, ...r }, n) => {
|
|
|
1720
1720
|
"aria-live": "polite",
|
|
1721
1721
|
"frimousse-skin-tone-selector": "",
|
|
1722
1722
|
onClick: m,
|
|
1723
|
-
ref:
|
|
1723
|
+
ref: o,
|
|
1724
1724
|
children: h.emoji
|
|
1725
1725
|
});
|
|
1726
1726
|
});
|
|
1727
1727
|
function yr({ children: e, ...t }) {
|
|
1728
|
-
return
|
|
1728
|
+
return G(q(), ua) ? i("span", {
|
|
1729
1729
|
"frimousse-loading": "",
|
|
1730
1730
|
...t,
|
|
1731
1731
|
children: e
|
|
1732
1732
|
}) : null;
|
|
1733
1733
|
}
|
|
1734
|
-
function
|
|
1735
|
-
return e({ search:
|
|
1734
|
+
function Pa({ children: e }) {
|
|
1735
|
+
return e({ search: G(q(), sa) });
|
|
1736
1736
|
}
|
|
1737
1737
|
function wr({ children: e, ...t }) {
|
|
1738
|
-
return
|
|
1738
|
+
return G(q(), ca) ? i("span", {
|
|
1739
1739
|
"frimousse-empty": "",
|
|
1740
1740
|
...t,
|
|
1741
|
-
children: typeof e == "function" ? i(
|
|
1741
|
+
children: typeof e == "function" ? i(Pa, { children: e }) : e
|
|
1742
1742
|
}) : null;
|
|
1743
1743
|
}
|
|
1744
1744
|
function _r({ children: e }) {
|
|
1745
1745
|
return e({ emoji: lr() });
|
|
1746
1746
|
}
|
|
1747
1747
|
function Cr({ children: e, emoji: t }) {
|
|
1748
|
-
let [r, n,
|
|
1748
|
+
let [r, n, o] = sr(t);
|
|
1749
1749
|
return e({
|
|
1750
1750
|
skinTone: r,
|
|
1751
1751
|
setSkinTone: n,
|
|
1752
|
-
skinToneVariations:
|
|
1752
|
+
skinToneVariations: o
|
|
1753
1753
|
});
|
|
1754
1754
|
}
|
|
1755
1755
|
ur.displayName = "EmojiPicker.Root";
|
|
@@ -1761,98 +1761,98 @@ wr.displayName = "EmojiPicker.Empty";
|
|
|
1761
1761
|
br.displayName = "EmojiPicker.SkinToneSelector";
|
|
1762
1762
|
_r.displayName = "EmojiPicker.ActiveEmoji";
|
|
1763
1763
|
Cr.displayName = "EmojiPicker.SkinTone";
|
|
1764
|
-
var
|
|
1765
|
-
root:
|
|
1766
|
-
search:
|
|
1767
|
-
viewport:
|
|
1768
|
-
message:
|
|
1769
|
-
},
|
|
1764
|
+
var xa = "_root_1elk3_1", Da = "_search_1elk3_29", Oa = "_viewport_1elk3_33", Aa = "_message_1elk3_42", Se = {
|
|
1765
|
+
root: xa,
|
|
1766
|
+
search: Da,
|
|
1767
|
+
viewport: Oa,
|
|
1768
|
+
message: Aa
|
|
1769
|
+
}, Ha = ({ emoji: e, "aria-colindex": t, ...r }) => /* @__PURE__ */ i("button", {
|
|
1770
1770
|
...r,
|
|
1771
1771
|
type: "button",
|
|
1772
1772
|
role: "gridcell",
|
|
1773
1773
|
"aria-colindex": S(t) ? t + 1 : void 0,
|
|
1774
1774
|
children: e.emoji
|
|
1775
|
-
}),
|
|
1775
|
+
}), $a = ({ "aria-rowindex": e, ...t }) => /* @__PURE__ */ i("div", {
|
|
1776
1776
|
...t,
|
|
1777
1777
|
"aria-rowindex": S(e) ? e + 1 : void 0
|
|
1778
|
-
}),
|
|
1779
|
-
const t = e.querySelector(
|
|
1778
|
+
}), Ma = "[frimousse-viewport]", Fa = "[frimousse-emoji][data-active]", Va = "--frimousse-category-header-height", La = (e) => {
|
|
1779
|
+
const t = e.querySelector(Ma), r = t?.querySelector(Fa);
|
|
1780
1780
|
if (!S(t) || !S(r)) return;
|
|
1781
|
-
const n = t.getBoundingClientRect(),
|
|
1781
|
+
const n = t.getBoundingClientRect(), o = r.getBoundingClientRect(), a = Number.parseFloat(getComputedStyle(t).getPropertyValue(Va)), s = o.top - n.top - a;
|
|
1782
1782
|
if (s < 0) {
|
|
1783
1783
|
t.scrollTop += s;
|
|
1784
1784
|
return;
|
|
1785
1785
|
}
|
|
1786
|
-
const c =
|
|
1786
|
+
const c = o.bottom - n.bottom;
|
|
1787
1787
|
c > 0 && (t.scrollTop += c);
|
|
1788
|
-
},
|
|
1788
|
+
}, za = P("Arrow"), St = P("keydown"), It = P("pointerover"), Ua = ({ rootRef: e }) => (te(() => {
|
|
1789
1789
|
const t = e.current;
|
|
1790
1790
|
if (!S(t)) return;
|
|
1791
1791
|
let r;
|
|
1792
1792
|
const n = () => {
|
|
1793
1793
|
S(r) && (cancelAnimationFrame(r), r = void 0);
|
|
1794
|
-
},
|
|
1795
|
-
|
|
1794
|
+
}, o = (a) => {
|
|
1795
|
+
a.defaultPrevented || !a.key.startsWith(za) || (n(), r = requestAnimationFrame(() => {
|
|
1796
1796
|
r = requestAnimationFrame(() => {
|
|
1797
|
-
r = void 0,
|
|
1797
|
+
r = void 0, La(t);
|
|
1798
1798
|
});
|
|
1799
1799
|
}));
|
|
1800
1800
|
};
|
|
1801
|
-
return t.addEventListener(St,
|
|
1802
|
-
n(), t.removeEventListener(St,
|
|
1801
|
+
return t.addEventListener(St, o, !0), t.addEventListener(It, n, !0), () => {
|
|
1802
|
+
n(), t.removeEventListener(St, o, !0), t.removeEventListener(It, n, !0);
|
|
1803
1803
|
};
|
|
1804
|
-
}, [e]), null),
|
|
1804
|
+
}, [e]), null), Ya = 8, _i = ({ 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
1805
|
const d = U(null), g = xt(d, u);
|
|
1806
|
-
return /* @__PURE__ */ I(
|
|
1806
|
+
return /* @__PURE__ */ I(ue.Root, {
|
|
1807
1807
|
...h,
|
|
1808
1808
|
ref: g,
|
|
1809
|
-
className:
|
|
1809
|
+
className: W(Se.root, l),
|
|
1810
1810
|
emojibaseUrl: e,
|
|
1811
1811
|
locale: t,
|
|
1812
|
-
columns:
|
|
1812
|
+
columns: Ya,
|
|
1813
1813
|
onEmojiSelect: ({ emoji: m }) => s(m),
|
|
1814
1814
|
children: [
|
|
1815
1815
|
/* @__PURE__ */ i("div", {
|
|
1816
1816
|
className: Se.search,
|
|
1817
1817
|
children: /* @__PURE__ */ i(Nt, {
|
|
1818
|
-
render: /* @__PURE__ */ i(
|
|
1818
|
+
render: /* @__PURE__ */ i(ue.Search, {}),
|
|
1819
1819
|
"aria-label": r,
|
|
1820
1820
|
placeholder: n,
|
|
1821
1821
|
autoFocus: c
|
|
1822
1822
|
})
|
|
1823
1823
|
}),
|
|
1824
|
-
/* @__PURE__ */ I(
|
|
1824
|
+
/* @__PURE__ */ I(ue.Viewport, {
|
|
1825
1825
|
className: Se.viewport,
|
|
1826
1826
|
tabIndex: 0,
|
|
1827
1827
|
children: [
|
|
1828
|
-
/* @__PURE__ */ i(
|
|
1828
|
+
/* @__PURE__ */ i(ue.Loading, {
|
|
1829
1829
|
className: Se.message,
|
|
1830
|
-
children:
|
|
1830
|
+
children: o
|
|
1831
1831
|
}),
|
|
1832
|
-
/* @__PURE__ */ i(
|
|
1832
|
+
/* @__PURE__ */ i(ue.Empty, {
|
|
1833
1833
|
className: Se.message,
|
|
1834
|
-
children:
|
|
1834
|
+
children: a
|
|
1835
1835
|
}),
|
|
1836
|
-
/* @__PURE__ */ i(
|
|
1837
|
-
Row:
|
|
1838
|
-
Emoji:
|
|
1836
|
+
/* @__PURE__ */ i(ue.List, { components: {
|
|
1837
|
+
Row: $a,
|
|
1838
|
+
Emoji: Ha
|
|
1839
1839
|
} })
|
|
1840
1840
|
]
|
|
1841
1841
|
}),
|
|
1842
|
-
/* @__PURE__ */ i(
|
|
1842
|
+
/* @__PURE__ */ i(Ua, { rootRef: d })
|
|
1843
1843
|
]
|
|
1844
1844
|
});
|
|
1845
|
-
},
|
|
1846
|
-
root:
|
|
1847
|
-
surface:
|
|
1848
|
-
icon:
|
|
1849
|
-
label:
|
|
1850
|
-
content:
|
|
1851
|
-
trailing:
|
|
1852
|
-
divider:
|
|
1853
|
-
},
|
|
1845
|
+
}, qa = "_root_138q3_1", Ba = "_surface_138q3_17", Wa = "_icon_138q3_28", Ga = "_label_138q3_35", Ka = "_content_138q3_42", Ja = "_trailing_138q3_53", Xa = "_divider_138q3_60", ie = {
|
|
1846
|
+
root: qa,
|
|
1847
|
+
surface: Ba,
|
|
1848
|
+
icon: Wa,
|
|
1849
|
+
label: Ga,
|
|
1850
|
+
content: Ka,
|
|
1851
|
+
trailing: Ja,
|
|
1852
|
+
divider: Xa
|
|
1853
|
+
}, Ci = ({ label: e, startIcon: t, trailing: r, trailingProps: n, children: o, labelWidth: a = 80, isHoverable: s = !1, hasDivider: c = !0, render: l, ref: u, className: h, style: d, ...g }) => {
|
|
1854
1854
|
const m = {
|
|
1855
|
-
"--form-field-row-label-width": Pt(
|
|
1855
|
+
"--form-field-row-label-width": Pt(a) ? `${a}px` : a,
|
|
1856
1856
|
...d
|
|
1857
1857
|
};
|
|
1858
1858
|
return Te({
|
|
@@ -1864,9 +1864,9 @@ var Do = "_root_1elk3_1", Oo = "_search_1elk3_29", Ao = "_viewport_1elk3_33", Ho
|
|
|
1864
1864
|
...g,
|
|
1865
1865
|
"data-clickable": S(g.onClick) || void 0,
|
|
1866
1866
|
"data-hoverable": s || void 0,
|
|
1867
|
-
className:
|
|
1867
|
+
className: W(ie.root, h),
|
|
1868
1868
|
style: m,
|
|
1869
|
-
children: /* @__PURE__ */ I(
|
|
1869
|
+
children: /* @__PURE__ */ I(Q, { children: [/* @__PURE__ */ I("div", {
|
|
1870
1870
|
className: ie.surface,
|
|
1871
1871
|
children: [
|
|
1872
1872
|
pe(t) && /* @__PURE__ */ i("span", {
|
|
@@ -1885,11 +1885,11 @@ var Do = "_root_1elk3_1", Oo = "_search_1elk3_29", Ao = "_viewport_1elk3_33", Ho
|
|
|
1885
1885
|
}),
|
|
1886
1886
|
/* @__PURE__ */ i("div", {
|
|
1887
1887
|
className: ie.content,
|
|
1888
|
-
children:
|
|
1888
|
+
children: o
|
|
1889
1889
|
}),
|
|
1890
1890
|
pe(r) && /* @__PURE__ */ i("div", {
|
|
1891
1891
|
...n,
|
|
1892
|
-
className:
|
|
1892
|
+
className: W(ie.trailing, n?.className),
|
|
1893
1893
|
children: r
|
|
1894
1894
|
})
|
|
1895
1895
|
]
|
|
@@ -1899,18 +1899,18 @@ var Do = "_root_1elk3_1", Oo = "_search_1elk3_29", Ao = "_viewport_1elk3_33", Ho
|
|
|
1899
1899
|
})] })
|
|
1900
1900
|
}
|
|
1901
1901
|
});
|
|
1902
|
-
},
|
|
1903
|
-
root:
|
|
1904
|
-
preview:
|
|
1905
|
-
image:
|
|
1906
|
-
fileInput:
|
|
1907
|
-
content:
|
|
1908
|
-
actions:
|
|
1909
|
-
helperText:
|
|
1910
|
-
errorMessage:
|
|
1911
|
-
},
|
|
1902
|
+
}, Qa = "_root_u3myi_1", Za = "_preview_u3myi_6", eo = "_image_u3myi_35", to = "_fileInput_u3myi_48", ro = "_content_u3myi_58", no = "_actions_u3myi_67", ao = "_helperText_u3myi_73", oo = "_errorMessage_u3myi_78", ne = {
|
|
1903
|
+
root: Qa,
|
|
1904
|
+
preview: Za,
|
|
1905
|
+
image: eo,
|
|
1906
|
+
fileInput: to,
|
|
1907
|
+
content: ro,
|
|
1908
|
+
actions: no,
|
|
1909
|
+
helperText: ao,
|
|
1910
|
+
errorMessage: oo
|
|
1911
|
+
}, io = ({ src: e }) => {
|
|
1912
1912
|
const t = kt(), [r, n] = K(!1);
|
|
1913
|
-
return !L(e) || r ? /* @__PURE__ */ i(
|
|
1913
|
+
return !L(e) || r ? /* @__PURE__ */ i(Or, {
|
|
1914
1914
|
size: t.icon.size.lg,
|
|
1915
1915
|
"aria-hidden": !0
|
|
1916
1916
|
}) : /* @__PURE__ */ i("img", {
|
|
@@ -1919,12 +1919,12 @@ var Do = "_root_1elk3_1", Oo = "_search_1elk3_29", Ao = "_viewport_1elk3_33", Ho
|
|
|
1919
1919
|
alt: "",
|
|
1920
1920
|
onError: () => n(!0)
|
|
1921
1921
|
});
|
|
1922
|
-
},
|
|
1923
|
-
const C = U(null), f = xt(C, g), E =
|
|
1924
|
-
|
|
1922
|
+
}, lo = "image/*", Ei = ({ 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 = lo, inputRef: g, onChange: m, "aria-describedby": v, className: b, style: y, dir: w, render: p, ref: j, ...k }) => {
|
|
1923
|
+
const C = U(null), f = xt(C, g), E = oe(), _ = `${E}-helper`, T = `${E}-error`, H = L(e), M = L(s), O = L(c), $ = o || !S(t), x = o || !H || !S(r), R = $ || a, A = x || a, re = a && S(n), Y = [
|
|
1924
|
+
v,
|
|
1925
1925
|
M && _,
|
|
1926
1926
|
O && T
|
|
1927
|
-
].filter(L).join(" ") || void 0,
|
|
1927
|
+
].filter(L).join(" ") || void 0, fe = () => {
|
|
1928
1928
|
R || C.current?.click();
|
|
1929
1929
|
}, D = (B) => {
|
|
1930
1930
|
const Oe = B.currentTarget.files?.[0];
|
|
@@ -1936,22 +1936,22 @@ var Do = "_root_1elk3_1", Oo = "_search_1elk3_29", Ao = "_viewport_1elk3_33", Ho
|
|
|
1936
1936
|
R || !S(Oe) || t?.(Oe);
|
|
1937
1937
|
};
|
|
1938
1938
|
return Te({
|
|
1939
|
-
render:
|
|
1939
|
+
render: p,
|
|
1940
1940
|
ref: j,
|
|
1941
1941
|
props: {
|
|
1942
|
-
className:
|
|
1942
|
+
className: W(ne.root, b),
|
|
1943
1943
|
style: y,
|
|
1944
1944
|
dir: w,
|
|
1945
|
-
"aria-busy":
|
|
1946
|
-
children: /* @__PURE__ */ I(
|
|
1945
|
+
"aria-busy": a || k["aria-busy"],
|
|
1946
|
+
children: /* @__PURE__ */ I(Q, { children: [/* @__PURE__ */ i("button", {
|
|
1947
1947
|
className: ne.preview,
|
|
1948
1948
|
type: "button",
|
|
1949
1949
|
disabled: $,
|
|
1950
|
-
"aria-disabled":
|
|
1950
|
+
"aria-disabled": a || void 0,
|
|
1951
1951
|
"aria-label": l,
|
|
1952
1952
|
"aria-describedby": Y,
|
|
1953
|
-
onClick:
|
|
1954
|
-
children: /* @__PURE__ */ i(
|
|
1953
|
+
onClick: fe,
|
|
1954
|
+
children: /* @__PURE__ */ i(io, { src: e }, e)
|
|
1955
1955
|
}), /* @__PURE__ */ I("div", {
|
|
1956
1956
|
className: ne.content,
|
|
1957
1957
|
children: [
|
|
@@ -1976,29 +1976,29 @@ var Do = "_root_1elk3_1", Oo = "_search_1elk3_29", Ao = "_viewport_1elk3_33", Ho
|
|
|
1976
1976
|
hidden: !0,
|
|
1977
1977
|
onChange: D
|
|
1978
1978
|
}),
|
|
1979
|
-
re ? /* @__PURE__ */ i(
|
|
1979
|
+
re ? /* @__PURE__ */ i(ae, {
|
|
1980
1980
|
type: "button",
|
|
1981
|
-
startIcon: /* @__PURE__ */ i(
|
|
1981
|
+
startIcon: /* @__PURE__ */ i(Hr, {}),
|
|
1982
1982
|
onClick: n,
|
|
1983
|
-
disabled:
|
|
1983
|
+
disabled: o,
|
|
1984
1984
|
variant: "outline",
|
|
1985
1985
|
children: h
|
|
1986
|
-
}) : /* @__PURE__ */ i(
|
|
1986
|
+
}) : /* @__PURE__ */ i(ae, {
|
|
1987
1987
|
type: "button",
|
|
1988
|
-
startIcon: /* @__PURE__ */ i(
|
|
1989
|
-
onClick:
|
|
1988
|
+
startIcon: /* @__PURE__ */ i(Vr, {}),
|
|
1989
|
+
onClick: fe,
|
|
1990
1990
|
disabled: R,
|
|
1991
|
-
focusableWhenDisabled:
|
|
1991
|
+
focusableWhenDisabled: a && !$,
|
|
1992
1992
|
"aria-describedby": Y,
|
|
1993
1993
|
variant: "outline",
|
|
1994
1994
|
children: l
|
|
1995
1995
|
}),
|
|
1996
|
-
/* @__PURE__ */ i(
|
|
1996
|
+
/* @__PURE__ */ i(ae, {
|
|
1997
1997
|
type: "button",
|
|
1998
|
-
startIcon: /* @__PURE__ */ i(
|
|
1998
|
+
startIcon: /* @__PURE__ */ i(Ar, {}),
|
|
1999
1999
|
onClick: r,
|
|
2000
2000
|
disabled: A,
|
|
2001
|
-
focusableWhenDisabled:
|
|
2001
|
+
focusableWhenDisabled: a && !x,
|
|
2002
2002
|
variant: "outline",
|
|
2003
2003
|
children: u
|
|
2004
2004
|
})
|
|
@@ -2019,41 +2019,41 @@ var Do = "_root_1elk3_1", Oo = "_search_1elk3_29", Ao = "_viewport_1elk3_33", Ho
|
|
|
2019
2019
|
})] })
|
|
2020
2020
|
}
|
|
2021
2021
|
});
|
|
2022
|
-
},
|
|
2023
|
-
const
|
|
2024
|
-
return /* @__PURE__ */ i(
|
|
2025
|
-
...
|
|
2022
|
+
}, so = "_button_k3e4y_1", co = { button: so }, Si = ({ className: e, emphasis: t = "standard", size: r, variant: n, ...o }) => {
|
|
2023
|
+
const a = ye(Rt), s = r ?? a?.size ?? "sm", c = n ?? a?.variant ?? "ghost";
|
|
2024
|
+
return /* @__PURE__ */ i(ae, {
|
|
2025
|
+
...o,
|
|
2026
2026
|
size: s,
|
|
2027
2027
|
variant: c,
|
|
2028
2028
|
"data-emphasis": t,
|
|
2029
|
-
className:
|
|
2029
|
+
className: ge(co.button, e)
|
|
2030
2030
|
});
|
|
2031
|
-
},
|
|
2032
|
-
const
|
|
2033
|
-
return /* @__PURE__ */ i(
|
|
2031
|
+
}, uo = "_button_1mfb6_1", mo = { button: uo }, Ii = ({ className: e, elevated: t = !0, variant: r, ...n }) => {
|
|
2032
|
+
const o = ye(Rt), a = r ?? o?.variant ?? "solid";
|
|
2033
|
+
return /* @__PURE__ */ i(ae, {
|
|
2034
2034
|
...n,
|
|
2035
2035
|
elevated: t,
|
|
2036
|
-
variant:
|
|
2037
|
-
className:
|
|
2036
|
+
variant: a,
|
|
2037
|
+
className: ge(mo.button, e)
|
|
2038
2038
|
});
|
|
2039
2039
|
}, et = {
|
|
2040
2040
|
maximumFractionDigits: 15,
|
|
2041
2041
|
numberingSystem: "latn",
|
|
2042
2042
|
useGrouping: "min2"
|
|
2043
|
-
},
|
|
2044
|
-
root:
|
|
2045
|
-
valueInput:
|
|
2046
|
-
button:
|
|
2047
|
-
icon:
|
|
2048
|
-
},
|
|
2043
|
+
}, ho = ({ nextValue: e, currentValue: t, reason: r }) => r === "input-blur" && ut(e, void 0, et) === ut(t, void 0, et), go = "_root_17bio_1", fo = "_valueInput_17bio_7", vo = "_button_17bio_14", po = "_icon_17bio_32", ve = {
|
|
2044
|
+
root: go,
|
|
2045
|
+
valueInput: fo,
|
|
2046
|
+
button: vo,
|
|
2047
|
+
icon: po
|
|
2048
|
+
}, ji = ({ 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: v = !0, decrementLabel: b = P("Decrease value"), incrementLabel: y = P("Increase value"), className: w, ...p }) => {
|
|
2049
2049
|
const [j, k] = Dt({
|
|
2050
2050
|
controlled: e,
|
|
2051
2051
|
default: t ?? null,
|
|
2052
2052
|
name: P("NumberStepper"),
|
|
2053
2053
|
state: "value"
|
|
2054
|
-
}), C =
|
|
2054
|
+
}), C = on(j), f = (E, _) => {
|
|
2055
2055
|
if (E !== C.current) {
|
|
2056
|
-
if (
|
|
2056
|
+
if (ho({
|
|
2057
2057
|
nextValue: E,
|
|
2058
2058
|
currentValue: C.current,
|
|
2059
2059
|
reason: _.reason
|
|
@@ -2068,9 +2068,9 @@ var Do = "_root_1elk3_1", Oo = "_search_1elk3_29", Ao = "_viewport_1elk3_33", Ho
|
|
|
2068
2068
|
value: j,
|
|
2069
2069
|
onValueChange: f,
|
|
2070
2070
|
onValueCommitted: n,
|
|
2071
|
-
min:
|
|
2071
|
+
min: a,
|
|
2072
2072
|
max: s,
|
|
2073
|
-
allowOutOfRange:
|
|
2073
|
+
allowOutOfRange: o,
|
|
2074
2074
|
step: c,
|
|
2075
2075
|
smallStep: c,
|
|
2076
2076
|
largeStep: c,
|
|
@@ -2081,64 +2081,64 @@ var Do = "_root_1elk3_1", Oo = "_search_1elk3_29", Ao = "_viewport_1elk3_33", Ho
|
|
|
2081
2081
|
form: g,
|
|
2082
2082
|
id: m,
|
|
2083
2083
|
format: et,
|
|
2084
|
-
className:
|
|
2084
|
+
className: ve.root,
|
|
2085
2085
|
children: [
|
|
2086
|
-
|
|
2086
|
+
v && /* @__PURE__ */ i($e.Decrement, {
|
|
2087
2087
|
"aria-label": b,
|
|
2088
|
-
render: /* @__PURE__ */ i(
|
|
2088
|
+
render: /* @__PURE__ */ i(ae, {
|
|
2089
2089
|
type: "button",
|
|
2090
2090
|
size: "sm",
|
|
2091
|
-
className:
|
|
2091
|
+
className: ve.button,
|
|
2092
2092
|
startIcon: /* @__PURE__ */ i("span", {
|
|
2093
|
-
className:
|
|
2094
|
-
children: /* @__PURE__ */ i(
|
|
2093
|
+
className: ve.icon,
|
|
2094
|
+
children: /* @__PURE__ */ i($r, {})
|
|
2095
2095
|
})
|
|
2096
2096
|
})
|
|
2097
2097
|
}),
|
|
2098
2098
|
/* @__PURE__ */ i($e.Input, {
|
|
2099
|
-
...
|
|
2099
|
+
...p,
|
|
2100
2100
|
form: g,
|
|
2101
|
-
className:
|
|
2101
|
+
className: ge(W(Fe.input, Fe.sm, ve.valueInput), w)
|
|
2102
2102
|
}),
|
|
2103
|
-
|
|
2103
|
+
v && /* @__PURE__ */ i($e.Increment, {
|
|
2104
2104
|
"aria-label": y,
|
|
2105
|
-
render: /* @__PURE__ */ i(
|
|
2105
|
+
render: /* @__PURE__ */ i(ae, {
|
|
2106
2106
|
type: "button",
|
|
2107
2107
|
size: "sm",
|
|
2108
|
-
className:
|
|
2108
|
+
className: ve.button,
|
|
2109
2109
|
startIcon: /* @__PURE__ */ i("span", {
|
|
2110
|
-
className:
|
|
2111
|
-
children: /* @__PURE__ */ i(
|
|
2110
|
+
className: ve.icon,
|
|
2111
|
+
children: /* @__PURE__ */ i(Fr, {})
|
|
2112
2112
|
})
|
|
2113
2113
|
})
|
|
2114
2114
|
})
|
|
2115
2115
|
]
|
|
2116
2116
|
});
|
|
2117
|
-
},
|
|
2118
|
-
trigger:
|
|
2119
|
-
triggerFlag:
|
|
2120
|
-
optionFlag:
|
|
2121
|
-
chevron:
|
|
2122
|
-
selectedCountryLabel:
|
|
2123
|
-
options:
|
|
2124
|
-
emptyStatus:
|
|
2125
|
-
},
|
|
2117
|
+
}, bo = "_trigger_kh8iq_1", yo = "_triggerFlag_kh8iq_35", wo = "_optionFlag_kh8iq_36", _o = "_chevron_kh8iq_56", Co = "_selectedCountryLabel_kh8iq_61", Eo = "_options_kh8iq_70", So = "_emptyStatus_kh8iq_76", me = {
|
|
2118
|
+
trigger: bo,
|
|
2119
|
+
triggerFlag: yo,
|
|
2120
|
+
optionFlag: wo,
|
|
2121
|
+
chevron: _o,
|
|
2122
|
+
selectedCountryLabel: Co,
|
|
2123
|
+
options: Eo,
|
|
2124
|
+
emptyStatus: So
|
|
2125
|
+
}, Io = ({ label: e, callingCode: t }) => `${e} (+${t})`, jo = "", ko = "", Ro = ({ label: e, callingCode: t }) => `${e} (${jo}+${t}${ko})`, No = ({ 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
2126
|
const e = ye(Er);
|
|
2127
2127
|
if (!S(e)) throw new Error(P("PhoneCountryPicker parts require PhoneCountryPicker.Root."));
|
|
2128
2128
|
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,
|
|
2129
|
+
}, Ir = ({ searchLabel: e = P("Search"), listLabel: t = P("Countries"), emptyLabel: r = P("No results"), disabled: n = !1, className: o, render: a, ref: s, ...c }) => {
|
|
2130
|
+
const { countries: l, value: u, onValueChange: h, disabled: d, closeOnSelect: g } = Sr(), m = d || n, v = oe(), [b, y] = K(""), w = be(b).trim(), p = w.startsWith("+") ? w.slice(1) : w, j = l.filter((f) => No({
|
|
2131
2131
|
country: f,
|
|
2132
2132
|
normalizedSearch: w,
|
|
2133
|
-
callingCodeSearch:
|
|
2133
|
+
callingCodeSearch: p
|
|
2134
2134
|
})), k = j.find((f) => f.value === u), C = S(k) ? [k, ...j.filter((f) => f.value !== u)] : j;
|
|
2135
2135
|
return Te({
|
|
2136
|
-
render:
|
|
2136
|
+
render: a,
|
|
2137
2137
|
ref: s,
|
|
2138
2138
|
props: {
|
|
2139
2139
|
...c,
|
|
2140
|
-
className:
|
|
2141
|
-
children: /* @__PURE__ */ I(
|
|
2140
|
+
className: W(me.options, o),
|
|
2141
|
+
children: /* @__PURE__ */ I(Q, { children: [
|
|
2142
2142
|
/* @__PURE__ */ i(N.Search, {
|
|
2143
2143
|
value: b,
|
|
2144
2144
|
onValueChange: y,
|
|
@@ -2150,24 +2150,24 @@ var Do = "_root_1elk3_1", Oo = "_search_1elk3_29", Ao = "_viewport_1elk3_33", Ho
|
|
|
2150
2150
|
/* @__PURE__ */ i(N.Section, {
|
|
2151
2151
|
scrollable: !0,
|
|
2152
2152
|
children: /* @__PURE__ */ i(N.SelectionGroup, {
|
|
2153
|
-
id:
|
|
2153
|
+
id: v,
|
|
2154
2154
|
"aria-label": t,
|
|
2155
2155
|
value: u,
|
|
2156
2156
|
onValueChange: h,
|
|
2157
2157
|
closeOnSelect: g,
|
|
2158
2158
|
children: C.map((f) => {
|
|
2159
|
-
const E =
|
|
2159
|
+
const E = Io(f);
|
|
2160
2160
|
return /* @__PURE__ */ i(N.OptionItem, {
|
|
2161
2161
|
value: f.value,
|
|
2162
2162
|
"aria-label": E,
|
|
2163
2163
|
disabled: m || f.disabled,
|
|
2164
2164
|
startIcon: /* @__PURE__ */ i("span", {
|
|
2165
|
-
className:
|
|
2165
|
+
className: me.optionFlag,
|
|
2166
2166
|
"aria-hidden": !0,
|
|
2167
2167
|
children: f.flag
|
|
2168
2168
|
}),
|
|
2169
2169
|
children: /* @__PURE__ */ i(rt, {
|
|
2170
|
-
text: /* @__PURE__ */ I(
|
|
2170
|
+
text: /* @__PURE__ */ I(Q, { children: [
|
|
2171
2171
|
f.label,
|
|
2172
2172
|
" (",
|
|
2173
2173
|
/* @__PURE__ */ I("bdi", {
|
|
@@ -2176,20 +2176,20 @@ var Do = "_root_1elk3_1", Oo = "_search_1elk3_29", Ao = "_viewport_1elk3_33", Ho
|
|
|
2176
2176
|
}),
|
|
2177
2177
|
")"
|
|
2178
2178
|
] }),
|
|
2179
|
-
tooltipContent:
|
|
2179
|
+
tooltipContent: Ro(f)
|
|
2180
2180
|
})
|
|
2181
2181
|
}, f.value);
|
|
2182
2182
|
})
|
|
2183
2183
|
})
|
|
2184
2184
|
}),
|
|
2185
2185
|
/* @__PURE__ */ i(N.Empty, {
|
|
2186
|
-
className:
|
|
2186
|
+
className: me.emptyStatus,
|
|
2187
2187
|
children: Pe(C) ? null : r
|
|
2188
2188
|
})
|
|
2189
2189
|
] })
|
|
2190
2190
|
}
|
|
2191
2191
|
});
|
|
2192
|
-
}, jr = ({ children: e, countries: t, value: r, defaultValue: n = null, onValueChange:
|
|
2192
|
+
}, jr = ({ children: e, countries: t, value: r, defaultValue: n = null, onValueChange: o, disabled: a = !1, closeOnSelect: s = !0 }) => {
|
|
2193
2193
|
const [c, l] = K(n), u = Le(r) ? c : r, h = t.map((d) => ({
|
|
2194
2194
|
...d,
|
|
2195
2195
|
searchLabel: be(d.label),
|
|
@@ -2199,41 +2199,41 @@ var Do = "_root_1elk3_1", Oo = "_search_1elk3_29", Ao = "_viewport_1elk3_33", Ho
|
|
|
2199
2199
|
value: {
|
|
2200
2200
|
countries: h,
|
|
2201
2201
|
value: u,
|
|
2202
|
-
disabled:
|
|
2202
|
+
disabled: a,
|
|
2203
2203
|
closeOnSelect: s,
|
|
2204
2204
|
onValueChange: (d, g) => {
|
|
2205
|
-
|
|
2205
|
+
o?.(d, g), !g.isCanceled && Le(r) && l(d);
|
|
2206
2206
|
}
|
|
2207
2207
|
},
|
|
2208
2208
|
children: e
|
|
2209
2209
|
});
|
|
2210
|
-
}, kr = ({ children: e, disabled: t = !1, className: r, "aria-describedby": n, ...
|
|
2211
|
-
const { countries:
|
|
2210
|
+
}, kr = ({ children: e, disabled: t = !1, className: r, "aria-describedby": n, ...o }) => {
|
|
2211
|
+
const { countries: a, value: s, disabled: c } = Sr(), l = a.find((d) => d.value === s), u = oe(), h = [S(l) && u, n].filter(L).join(" ") || void 0;
|
|
2212
2212
|
return /* @__PURE__ */ I(N.Trigger, {
|
|
2213
|
-
...
|
|
2213
|
+
...o,
|
|
2214
2214
|
disabled: c || t,
|
|
2215
2215
|
"aria-describedby": h,
|
|
2216
|
-
className:
|
|
2217
|
-
children: [e ?? /* @__PURE__ */ I(
|
|
2218
|
-
className:
|
|
2216
|
+
className: ge(me.trigger, r),
|
|
2217
|
+
children: [e ?? /* @__PURE__ */ I(Q, { children: [/* @__PURE__ */ i("span", {
|
|
2218
|
+
className: me.triggerFlag,
|
|
2219
2219
|
"aria-hidden": !0,
|
|
2220
|
-
children: l?.flag ?? /* @__PURE__ */ i(
|
|
2220
|
+
children: l?.flag ?? /* @__PURE__ */ i(xr, {})
|
|
2221
2221
|
}), /* @__PURE__ */ i(tt, {
|
|
2222
|
-
className:
|
|
2222
|
+
className: me.chevron,
|
|
2223
2223
|
"aria-hidden": !0
|
|
2224
2224
|
})] }), S(l) && /* @__PURE__ */ i("span", {
|
|
2225
2225
|
id: u,
|
|
2226
|
-
className:
|
|
2226
|
+
className: me.selectedCountryLabel,
|
|
2227
2227
|
children: l.label
|
|
2228
2228
|
})]
|
|
2229
2229
|
});
|
|
2230
|
-
},
|
|
2230
|
+
}, To = ({ countries: e, value: t, defaultValue: r, onValueChange: n, disabled: o, closeOnSelect: a, dropdownProps: s, contentProps: c, optionsProps: l, ...u }) => /* @__PURE__ */ i(jr, {
|
|
2231
2231
|
countries: e,
|
|
2232
2232
|
value: t,
|
|
2233
2233
|
defaultValue: r,
|
|
2234
2234
|
onValueChange: n,
|
|
2235
|
-
disabled:
|
|
2236
|
-
closeOnSelect:
|
|
2235
|
+
disabled: o,
|
|
2236
|
+
closeOnSelect: a,
|
|
2237
2237
|
children: /* @__PURE__ */ I(N.Root, {
|
|
2238
2238
|
...s,
|
|
2239
2239
|
type: "picker",
|
|
@@ -2243,24 +2243,24 @@ var Do = "_root_1elk3_1", Oo = "_search_1elk3_29", Ao = "_viewport_1elk3_33", Ho
|
|
|
2243
2243
|
children: /* @__PURE__ */ i(Ir, { ...l })
|
|
2244
2244
|
})]
|
|
2245
2245
|
})
|
|
2246
|
-
}),
|
|
2246
|
+
}), ki = Object.assign(To, {
|
|
2247
2247
|
Root: jr,
|
|
2248
2248
|
Trigger: kr,
|
|
2249
2249
|
Options: Ir
|
|
2250
|
-
}),
|
|
2251
|
-
button:
|
|
2252
|
-
content:
|
|
2253
|
-
emoji:
|
|
2254
|
-
},
|
|
2250
|
+
}), Po = "_button_arlbx_1", xo = "_content_arlbx_15", Do = "_emoji_arlbx_21", Ke = {
|
|
2251
|
+
button: Po,
|
|
2252
|
+
content: xo,
|
|
2253
|
+
emoji: Do
|
|
2254
|
+
}, Ri = ({ emoji: e, count: t, pressed: r, onPressedChange: n, onClick: o, className: a, ...s }) => /* @__PURE__ */ i(ae, {
|
|
2255
2255
|
...s,
|
|
2256
2256
|
type: "button",
|
|
2257
2257
|
size: "sm",
|
|
2258
2258
|
variant: "ghost",
|
|
2259
2259
|
color: "neutral",
|
|
2260
2260
|
"aria-pressed": r,
|
|
2261
|
-
className:
|
|
2261
|
+
className: W(Ke.button, a),
|
|
2262
2262
|
onClick: (c) => {
|
|
2263
|
-
|
|
2263
|
+
o?.(c), !c.defaultPrevented && n(!r);
|
|
2264
2264
|
},
|
|
2265
2265
|
children: /* @__PURE__ */ I("span", {
|
|
2266
2266
|
className: Ke.content,
|
|
@@ -2270,19 +2270,19 @@ var Do = "_root_1elk3_1", Oo = "_search_1elk3_29", Ao = "_viewport_1elk3_33", Ho
|
|
|
2270
2270
|
children: e
|
|
2271
2271
|
}), /* @__PURE__ */ i("span", { children: t })]
|
|
2272
2272
|
})
|
|
2273
|
-
}),
|
|
2274
|
-
wrapper:
|
|
2275
|
-
inputGroup:
|
|
2276
|
-
searchIcon:
|
|
2277
|
-
},
|
|
2278
|
-
const l = kt(), u =
|
|
2273
|
+
}), Oo = "_wrapper_c0mqd_1", Ao = "_inputGroup_c0mqd_8", Ho = "_searchIcon_c0mqd_14", Je = {
|
|
2274
|
+
wrapper: Oo,
|
|
2275
|
+
inputGroup: Ao,
|
|
2276
|
+
searchIcon: Ho
|
|
2277
|
+
}, Ni = ({ placeholder: e, actions: t, size: r = "md", hasFocusRing: n = !1, id: o, "aria-label": a, "aria-labelledby": s, ...c }) => {
|
|
2278
|
+
const l = kt(), u = oe(), h = o ?? u;
|
|
2279
2279
|
return /* @__PURE__ */ I("div", {
|
|
2280
2280
|
className: Je.wrapper,
|
|
2281
|
-
children: [/* @__PURE__ */ i(
|
|
2281
|
+
children: [/* @__PURE__ */ i(Wr, {
|
|
2282
2282
|
className: Je.inputGroup,
|
|
2283
2283
|
size: r,
|
|
2284
2284
|
hasFocusRing: n,
|
|
2285
|
-
startElement: /* @__PURE__ */ i(
|
|
2285
|
+
startElement: /* @__PURE__ */ i(Lr, {
|
|
2286
2286
|
className: Je.searchIcon,
|
|
2287
2287
|
size: l.icon.size.md,
|
|
2288
2288
|
"aria-hidden": !0
|
|
@@ -2291,66 +2291,67 @@ var Do = "_root_1elk3_1", Oo = "_search_1elk3_29", Ao = "_viewport_1elk3_33", Ho
|
|
|
2291
2291
|
...c,
|
|
2292
2292
|
id: h,
|
|
2293
2293
|
placeholder: e,
|
|
2294
|
-
"aria-label": L(s) ? void 0 :
|
|
2294
|
+
"aria-label": L(s) ? void 0 : a ?? e,
|
|
2295
2295
|
"aria-labelledby": s
|
|
2296
2296
|
})
|
|
2297
2297
|
}), t]
|
|
2298
2298
|
});
|
|
2299
|
-
}, $
|
|
2300
|
-
container: $
|
|
2301
|
-
item:
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2299
|
+
}, $o = "_container_44p06_1", Mo = "_item_44p06_24", Fo = "_fullWidth_44p06_38", Vo = "_sm_44p06_42", Lo = "_md_44p06_48", zo = "_iconOnly_44p06_94", Uo = "_icon_44p06_94", Yo = "_label_44p06_113", le = {
|
|
2300
|
+
container: $o,
|
|
2301
|
+
item: Mo,
|
|
2302
|
+
fullWidth: Fo,
|
|
2303
|
+
sm: Vo,
|
|
2304
|
+
md: Lo,
|
|
2305
|
+
iconOnly: zo,
|
|
2306
|
+
icon: Uo,
|
|
2307
|
+
label: Yo
|
|
2308
|
+
}, Ti = ({ className: e, fullWidth: t = !1, itemWidth: r = "equal", options: n, size: o = "md", variant: a = "round", ...s }) => {
|
|
2309
|
+
const c = oe();
|
|
2309
2310
|
return /* @__PURE__ */ i(ln, {
|
|
2310
|
-
...
|
|
2311
|
-
className:
|
|
2312
|
-
"data-item-width":
|
|
2311
|
+
...s,
|
|
2312
|
+
className: ge(W(le.container, le[o], t && le.fullWidth), e),
|
|
2313
|
+
"data-item-width": r,
|
|
2313
2314
|
"data-variant": a,
|
|
2314
|
-
children:
|
|
2315
|
-
const
|
|
2316
|
-
return /* @__PURE__ */ I(
|
|
2317
|
-
value:
|
|
2318
|
-
disabled:
|
|
2319
|
-
"aria-labelledby":
|
|
2320
|
-
className:
|
|
2315
|
+
children: n.map(({ "aria-label": l, disabled: u, label: h, startIcon: d, value: g }, m) => {
|
|
2316
|
+
const v = `${c}-${m}`, b = L(l);
|
|
2317
|
+
return /* @__PURE__ */ I(Gr.Root, {
|
|
2318
|
+
value: g,
|
|
2319
|
+
disabled: u,
|
|
2320
|
+
"aria-labelledby": v,
|
|
2321
|
+
className: W(le.item, !pe(h) && le.iconOnly),
|
|
2321
2322
|
children: [
|
|
2322
|
-
pe(
|
|
2323
|
-
className:
|
|
2323
|
+
pe(d) && /* @__PURE__ */ i("span", {
|
|
2324
|
+
className: le.icon,
|
|
2324
2325
|
"aria-hidden": !0,
|
|
2325
|
-
children:
|
|
2326
|
+
children: d
|
|
2326
2327
|
}),
|
|
2327
|
-
pe(
|
|
2328
|
-
id:
|
|
2329
|
-
className:
|
|
2330
|
-
children:
|
|
2328
|
+
pe(h) && /* @__PURE__ */ i("span", {
|
|
2329
|
+
id: b ? void 0 : v,
|
|
2330
|
+
className: le.label,
|
|
2331
|
+
children: h
|
|
2331
2332
|
}),
|
|
2332
|
-
|
|
2333
|
-
id:
|
|
2333
|
+
b && /* @__PURE__ */ i("span", {
|
|
2334
|
+
id: v,
|
|
2334
2335
|
hidden: !0,
|
|
2335
|
-
children:
|
|
2336
|
+
children: l
|
|
2336
2337
|
})
|
|
2337
2338
|
]
|
|
2338
|
-
},
|
|
2339
|
+
}, g);
|
|
2339
2340
|
})
|
|
2340
2341
|
});
|
|
2341
2342
|
};
|
|
2342
2343
|
export {
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2344
|
+
ji as a,
|
|
2345
|
+
Ei as c,
|
|
2346
|
+
wi as d,
|
|
2347
|
+
yi as f,
|
|
2348
|
+
ki as i,
|
|
2349
|
+
Ci as l,
|
|
2350
|
+
Ni as n,
|
|
2351
|
+
Ii as o,
|
|
2352
|
+
bi as p,
|
|
2353
|
+
Ri as r,
|
|
2354
|
+
Si as s,
|
|
2355
|
+
Ti as t,
|
|
2356
|
+
_i as u
|
|
2356
2357
|
};
|