@gv-tech/ui-web 2.20.0 → 2.21.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/accordion-Be1vGv6M.js +1 -0
- package/dist/accordion-DXnU0LgU.mjs +221 -0
- package/dist/accordion.cjs +1 -1
- package/dist/accordion.mjs +3 -259
- package/dist/alert-dialog-BXRY0Ghq.js +7 -0
- package/dist/alert-dialog-fcZ-sL7h.mjs +164 -0
- package/dist/alert-dialog.cjs +1 -7
- package/dist/alert-dialog.mjs +4 -171
- package/dist/alert.cjs +1 -1
- package/dist/alert.mjs +35 -32
- package/dist/aspect-ratio-BP5HarYZ.js +1 -0
- package/dist/aspect-ratio-Bp8HMg-1.mjs +33 -0
- package/dist/aspect-ratio.cjs +1 -1
- package/dist/aspect-ratio.mjs +3 -43
- package/dist/avatar-klFl8Sqa.js +1 -0
- package/dist/avatar-vGm9JN1a.mjs +184 -0
- package/dist/avatar.cjs +1 -1
- package/dist/avatar.mjs +3 -205
- package/dist/badge.cjs +1 -1
- package/dist/badge.mjs +21 -24
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.mjs +60 -68
- package/dist/button.cjs +1 -1
- package/dist/button.mjs +40 -40
- package/dist/calendar-aIuSXzs7.js +1 -0
- package/dist/calendar-oitID53a.mjs +3154 -0
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.mjs +4 -2976
- package/dist/card.cjs +1 -1
- package/dist/card.mjs +42 -32
- package/dist/carousel-BjTSkVh9.js +1 -0
- package/dist/carousel-CENzZCXN.mjs +1178 -0
- package/dist/carousel.cjs +1 -1
- package/dist/carousel.mjs +4 -1403
- package/dist/chart.cjs +4 -4
- package/dist/chart.d.ts +3 -35
- package/dist/chart.mjs +123 -182
- package/dist/checkbox-Bwq7mXA2.mjs +170 -0
- package/dist/checkbox-DzEO1q4R.js +1 -0
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.mjs +3 -258
- package/dist/collapsible.cjs +1 -1
- package/dist/collapsible.mjs +6 -7
- package/dist/command-D7hksKY6.js +1 -0
- package/dist/command-Ws_iF1hM.mjs +531 -0
- package/dist/command.cjs +1 -1
- package/dist/command.mjs +3 -396
- package/dist/context-menu-DJbgNJ7N.js +1 -0
- package/dist/context-menu-fu39gePi.mjs +292 -0
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.mjs +3 -328
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.mjs +50 -66
- package/dist/dist-0FXx-pUX.js +1 -0
- package/dist/dist-4A0ut6a8.mjs +10 -0
- package/dist/dist-ALQAoSGx.mjs +10 -0
- package/dist/dist-B4N_7Tps.js +1 -0
- package/dist/dist-B5776DvK.js +5 -0
- package/dist/dist-B57mzJP3.mjs +28 -0
- package/dist/dist-B5VmV2K7.js +1 -0
- package/dist/dist-BBRD-Qfb.js +1 -0
- package/dist/dist-BC_VB6JL.mjs +25 -0
- package/dist/dist-BKFtvTm8.mjs +6 -0
- package/dist/dist-BUS_s_6N.js +1 -0
- package/dist/dist-BVKPqhkg.js +1 -0
- package/dist/dist-Ba7mQG9D.mjs +117 -0
- package/dist/dist-BeFCyPgD.js +1 -0
- package/dist/dist-Bf4P28CV.js +1 -0
- package/dist/dist-BfFVoFJN.js +1 -0
- package/dist/dist-BhtQH_6Z.js +1 -0
- package/dist/dist-BmjFh8i_.mjs +5 -0
- package/dist/dist-BrCTkQXt.mjs +62 -0
- package/dist/dist-BxmpAHsT.mjs +219 -0
- package/dist/dist-C2ArLRnq.js +1 -0
- package/dist/dist-C2pRTcV_.mjs +62 -0
- package/dist/dist-C9wnUiS4.mjs +27 -0
- package/dist/dist-CIRItnqs.js +1 -0
- package/dist/dist-CL1DhkaL.js +1 -0
- package/dist/dist-CRe7xawr.js +1 -0
- package/dist/dist-CUFjt0cI.js +1 -0
- package/dist/dist-CaaGWewc.mjs +557 -0
- package/dist/dist-Ci2whnVp.js +1 -0
- package/dist/dist-CmBtqW5f.js +1 -0
- package/dist/dist-CsEsK2jW.js +1 -0
- package/dist/dist-CscAxhT8.js +1 -0
- package/dist/dist-CvtF5JdF.mjs +95 -0
- package/dist/dist-Cvwtowos.mjs +77 -0
- package/dist/dist-D2f83VMO.mjs +73 -0
- package/dist/dist-Dh_jWJh-.mjs +11 -0
- package/dist/dist-DikyKBU3.mjs +12 -0
- package/dist/dist-DmmUjo_P.js +1 -0
- package/dist/dist-DqvQ5UFr.mjs +38 -0
- package/dist/dist-FGQAMrhH.mjs +29 -0
- package/dist/dist-Jtk3jeb9.mjs +18 -0
- package/dist/dist-Kqk0oQYU.js +1 -0
- package/dist/dist-VI9bl_Wk.mjs +45 -0
- package/dist/dist-Z7lEV5Nx.mjs +1282 -0
- package/dist/dist-_Osar3kp.js +1 -0
- package/dist/dist-bDoR0CBU.mjs +112 -0
- package/dist/dist-cRjbOZRf.js +1 -0
- package/dist/dist-d_pecHgw.mjs +66 -0
- package/dist/dist-r36zVVcK.js +1 -0
- package/dist/dist-sRlXdzvf.mjs +152 -0
- package/dist/drawer.cjs +1 -1
- package/dist/drawer.mjs +48 -54
- package/dist/dropdown-menu-BGkQXJ-r.mjs +288 -0
- package/dist/dropdown-menu-uGMnmGL-.js +1 -0
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.mjs +3 -316
- package/dist/es2015-Cx0gpR1a.js +41 -0
- package/dist/es2015-a1b8kENC.mjs +701 -0
- package/dist/form.cjs +1 -1
- package/dist/form.mjs +76 -67
- package/dist/hover-card-DdIYJP-Q.mjs +167 -0
- package/dist/hover-card-Ua-2KlY-.js +1 -0
- package/dist/hover-card.cjs +1 -1
- package/dist/hover-card.mjs +3 -188
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +3 -35
- package/dist/index.mjs +56 -296
- package/dist/input.cjs +1 -1
- package/dist/input.mjs +14 -19
- package/dist/jsx-runtime-CN3qjQQx.js +6 -0
- package/dist/jsx-runtime-CW53Uo-e.mjs +189 -0
- package/dist/label-8YSUv4kt.js +1 -0
- package/dist/label-Bur66PVg.mjs +22 -0
- package/dist/label.cjs +1 -1
- package/dist/label.mjs +3 -22
- package/dist/menubar-Bq1Sfbf5.js +1 -0
- package/dist/menubar-D2fY6zkQ.mjs +410 -0
- package/dist/menubar.cjs +1 -1
- package/dist/menubar.mjs +3 -473
- package/dist/navigation-menu-BuOakbgA.mjs +602 -0
- package/dist/navigation-menu-so6EvLAY.js +1 -0
- package/dist/navigation-menu.cjs +1 -1
- package/dist/navigation-menu.mjs +3 -673
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.mjs +63 -68
- package/dist/popover-BUADXRkO.mjs +201 -0
- package/dist/popover-nBrSPqHk.js +1 -0
- package/dist/popover.cjs +1 -1
- package/dist/popover.mjs +3 -242
- package/dist/progress-BTApMbqg.js +6 -0
- package/dist/progress-BbN-RNvs.mjs +81 -0
- package/dist/progress.cjs +1 -6
- package/dist/progress.mjs +3 -99
- package/dist/radio-group-C5oprOrt.mjs +193 -0
- package/dist/radio-group-FDXr6VLM.js +1 -0
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.mjs +3 -253
- package/dist/resizable-ChdgCzzx.mjs +1534 -0
- package/dist/resizable-ztiFzq_y.js +1 -0
- package/dist/resizable.cjs +1 -1
- package/dist/resizable.mjs +3 -1990
- package/dist/scroll-area-3o0-cc3n.mjs +520 -0
- package/dist/scroll-area-DXZqIKXN.js +1 -0
- package/dist/scroll-area.cjs +1 -1
- package/dist/scroll-area.mjs +3 -546
- package/dist/scroll-to-top.cjs +1 -1
- package/dist/scroll-to-top.mjs +71 -84
- package/dist/search.cjs +1 -1
- package/dist/search.mjs +53 -63
- package/dist/select-B2qM503G.mjs +744 -0
- package/dist/select-BHCeW-MD.js +1 -0
- package/dist/select.cjs +1 -1
- package/dist/select.mjs +3 -908
- package/dist/separator-BZJ-SDvg.js +1 -0
- package/dist/separator-DJ_IwKUQ.mjs +31 -0
- package/dist/separator.cjs +1 -1
- package/dist/separator.mjs +3 -35
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.mjs +59 -66
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.mjs +13 -7
- package/dist/slider-CJJPQ0fH.mjs +366 -0
- package/dist/slider-DHccqrW2.js +1 -0
- package/dist/slider.cjs +1 -1
- package/dist/slider.mjs +3 -442
- package/dist/sonner.cjs +1 -1
- package/dist/sonner.mjs +21 -24
- package/dist/support-fab.cjs +1 -1
- package/dist/support-fab.mjs +81 -117
- package/dist/switch-BbcAUYjl.mjs +103 -0
- package/dist/switch-DZfRzgWs.js +1 -0
- package/dist/switch.cjs +1 -1
- package/dist/switch.mjs +3 -149
- package/dist/table-of-contents.cjs +1 -1
- package/dist/table-of-contents.mjs +159 -155
- package/dist/table.cjs +1 -1
- package/dist/table.mjs +58 -57
- package/dist/tabs-BEy0IIV0.js +1 -0
- package/dist/tabs-DqAKyl9T.mjs +136 -0
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.mjs +3 -195
- package/dist/text.cjs +1 -1
- package/dist/text.mjs +41 -42
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.mjs +12 -17
- package/dist/theme-provider.cjs +1 -1
- package/dist/theme-provider.mjs +15 -7
- package/dist/theme-toggle-DKQmD-FO.js +1 -0
- package/dist/theme-toggle-dQbFWNI8.mjs +65 -0
- package/dist/theme-toggle.cjs +1 -1
- package/dist/theme-toggle.mjs +3 -8
- package/dist/toast-C84Cpidq.js +1 -0
- package/dist/toast-CQbUslcw.mjs +427 -0
- package/dist/toast.cjs +1 -1
- package/dist/toast.mjs +3 -494
- package/dist/toaster-BpcpNRz1.js +1 -0
- package/dist/toaster-i6giQYiq.mjs +126 -0
- package/dist/toaster.cjs +1 -1
- package/dist/toaster.mjs +3 -6
- package/dist/toggle-group-B2S7fkhA.mjs +155 -0
- package/dist/toggle-group-BNn6MNiJ.js +1 -0
- package/dist/toggle-group.cjs +1 -1
- package/dist/toggle-group.mjs +3 -170
- package/dist/toggle.cjs +1 -1
- package/dist/toggle.mjs +19 -14
- package/dist/tooltip-CElrNodA.js +1 -0
- package/dist/tooltip-oKfTBTbv.mjs +364 -0
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.mjs +3 -342
- package/dist/utils-BxDanjP7.js +1 -0
- package/dist/utils-yc5uc46c.mjs +11 -0
- package/package.json +2 -2
- package/src/chart.tsx +7 -7
- package/src/setupTests.ts +5 -4
- package/dist/index-0ioNhtNM.mjs +0 -10
- package/dist/index-3j-XAIXT.mjs +0 -55
- package/dist/index-B2XtpfGY.js +0 -1
- package/dist/index-B39Lzq0v.js +0 -1
- package/dist/index-B7n6fy75.js +0 -1
- package/dist/index-B8dxbSWX.js +0 -41
- package/dist/index-BGIK9FQF.js +0 -1
- package/dist/index-BZPx6jYI.mjs +0 -8
- package/dist/index-BoNjHhm4.js +0 -1
- package/dist/index-BtZvtDmp.js +0 -1
- package/dist/index-Bv7qrYW6.mjs +0 -180
- package/dist/index-ByiPJW53.js +0 -5
- package/dist/index-C0dlIQIi.js +0 -1
- package/dist/index-C1qb0595.mjs +0 -27
- package/dist/index-C7HEunrh.mjs +0 -15
- package/dist/index-C8ni3LLa.js +0 -1
- package/dist/index-CCKe-Mpx.mjs +0 -6
- package/dist/index-CD6_IrA-.mjs +0 -10
- package/dist/index-CRyCZJLa.mjs +0 -677
- package/dist/index-CVx1AgNG.mjs +0 -615
- package/dist/index-Ce5TOFAK.js +0 -1
- package/dist/index-CeSLNJ60.mjs +0 -32
- package/dist/index-CefEQe_4.js +0 -1
- package/dist/index-Cj5hzyBi.js +0 -1
- package/dist/index-Cjj_rUPu.js +0 -1
- package/dist/index-Cl3G0jzM.js +0 -1
- package/dist/index-CwfE56Ep.mjs +0 -1545
- package/dist/index-CwyAfCwY.js +0 -1
- package/dist/index-CzY-WZXL.js +0 -1
- package/dist/index-D2HnlO3y.js +0 -1
- package/dist/index-DFdF7K7v.mjs +0 -50
- package/dist/index-DIsg7zU7.js +0 -1
- package/dist/index-DKN_vhyX.mjs +0 -32
- package/dist/index-DLcqcWxM.mjs +0 -29
- package/dist/index-DSxf1gN6.mjs +0 -118
- package/dist/index-DYxWvftI.js +0 -1
- package/dist/index-DaILh3TV.mjs +0 -32
- package/dist/index-Dfzl8TxY.mjs +0 -136
- package/dist/index-Dko2XdTk.js +0 -1
- package/dist/index-DlY82G31.mjs +0 -245
- package/dist/index-DnFcfnA9.mjs +0 -13
- package/dist/index-IZ2gq03c.mjs +0 -68
- package/dist/index-K9FzbxYw.mjs +0 -93
- package/dist/index-Le8p9oP4.mjs +0 -60
- package/dist/index-MQ0c3ZX_.js +0 -1
- package/dist/index-_XxjJPRD.js +0 -1
- package/dist/index-_wdrnYim.js +0 -1
- package/dist/index-jv3B4mTd.js +0 -1
- package/dist/index-kaM0u2Q1.js +0 -1
- package/dist/index-p6xVFRb4.mjs +0 -52
- package/dist/index-rKs9bXHr.mjs +0 -6
- package/dist/index-vuPgkS0V.mjs +0 -70
- package/dist/jsx-runtime-nZSsnGb7.js +0 -6
- package/dist/jsx-runtime-tc70JA_2.mjs +0 -264
- package/dist/theme-toggle-DXQGNfCe.js +0 -1
- package/dist/theme-toggle-tHXIbr8W.mjs +0 -79
- package/dist/toaster-C_S9hnXa.js +0 -1
- package/dist/toaster-k5DnQSsh.mjs +0 -118
- package/dist/utils-DY6fhrgS.mjs +0 -12
- package/dist/utils-cdbZV8DZ.js +0 -1
|
@@ -0,0 +1,744 @@
|
|
|
1
|
+
import { t as e } from "./jsx-runtime-CW53Uo-e.mjs";
|
|
2
|
+
import { t } from "./utils-yc5uc46c.mjs";
|
|
3
|
+
import { n } from "./dist-Cvwtowos.mjs";
|
|
4
|
+
import { n as r } from "./dist-BC_VB6JL.mjs";
|
|
5
|
+
import { i, r as a, t as o } from "./dist-bDoR0CBU.mjs";
|
|
6
|
+
import { t as s } from "./dist-BrCTkQXt.mjs";
|
|
7
|
+
import { t as c } from "./dist-BmjFh8i_.mjs";
|
|
8
|
+
import { t as l } from "./dist-VI9bl_Wk.mjs";
|
|
9
|
+
import { t as u } from "./dist-DikyKBU3.mjs";
|
|
10
|
+
import { t as d } from "./dist-4A0ut6a8.mjs";
|
|
11
|
+
import { t as f } from "./dist-ALQAoSGx.mjs";
|
|
12
|
+
import { n as p } from "./dist-Ba7mQG9D.mjs";
|
|
13
|
+
import { i as m, n as h, r as g, t as _ } from "./es2015-a1b8kENC.mjs";
|
|
14
|
+
import { t as v } from "./dist-Jtk3jeb9.mjs";
|
|
15
|
+
import { t as y } from "./dist-Dh_jWJh-.mjs";
|
|
16
|
+
import { a as b, i as x, n as S, r as C, t as w } from "./dist-Z7lEV5Nx.mjs";
|
|
17
|
+
import { n as T } from "./dist-C9wnUiS4.mjs";
|
|
18
|
+
import { t as E } from "./dist-BKFtvTm8.mjs";
|
|
19
|
+
import * as D from "react";
|
|
20
|
+
import * as O from "react-dom";
|
|
21
|
+
import { Check as k, ChevronDown as A, ChevronUp as j } from "lucide-react";
|
|
22
|
+
//#region ../../node_modules/.bun/@radix-ui+react-select@2.2.6+2d3f272c3a65784a/node_modules/@radix-ui/react-select/dist/index.mjs
|
|
23
|
+
var M = e(), N = [
|
|
24
|
+
" ",
|
|
25
|
+
"Enter",
|
|
26
|
+
"ArrowUp",
|
|
27
|
+
"ArrowDown"
|
|
28
|
+
], ee = [" ", "Enter"], P = "Select", [F, I, L] = s(P), [R, te] = n(P, [L, b]), z = b(), [B, V] = R(P), [H, U] = R(P), W = (e) => {
|
|
29
|
+
let { __scopeSelect: t, children: n, open: r, defaultOpen: i, onOpenChange: a, value: o, defaultValue: s, onValueChange: c, dir: f, name: p, autoComplete: m, disabled: h, required: g, form: _ } = e, v = z(t), [y, b] = D.useState(null), [S, C] = D.useState(null), [w, T] = D.useState(!1), E = d(f), [O, k] = l({
|
|
30
|
+
prop: r,
|
|
31
|
+
defaultProp: i ?? !1,
|
|
32
|
+
onChange: a,
|
|
33
|
+
caller: P
|
|
34
|
+
}), [A, j] = l({
|
|
35
|
+
prop: o,
|
|
36
|
+
defaultProp: s,
|
|
37
|
+
onChange: c,
|
|
38
|
+
caller: P
|
|
39
|
+
}), N = D.useRef(null), ee = y ? _ || !!y.closest("form") : !0, [I, L] = D.useState(/* @__PURE__ */ new Set()), R = Array.from(I).map((e) => e.props.value).join(";");
|
|
40
|
+
return /* @__PURE__ */ (0, M.jsx)(x, {
|
|
41
|
+
...v,
|
|
42
|
+
children: /* @__PURE__ */ (0, M.jsxs)(B, {
|
|
43
|
+
required: g,
|
|
44
|
+
scope: t,
|
|
45
|
+
trigger: y,
|
|
46
|
+
onTriggerChange: b,
|
|
47
|
+
valueNode: S,
|
|
48
|
+
onValueNodeChange: C,
|
|
49
|
+
valueNodeHasChildren: w,
|
|
50
|
+
onValueNodeHasChildrenChange: T,
|
|
51
|
+
contentId: u(),
|
|
52
|
+
value: A,
|
|
53
|
+
onValueChange: j,
|
|
54
|
+
open: O,
|
|
55
|
+
onOpenChange: k,
|
|
56
|
+
dir: E,
|
|
57
|
+
triggerPointerDownPosRef: N,
|
|
58
|
+
disabled: h,
|
|
59
|
+
children: [/* @__PURE__ */ (0, M.jsx)(F.Provider, {
|
|
60
|
+
scope: t,
|
|
61
|
+
children: /* @__PURE__ */ (0, M.jsx)(H, {
|
|
62
|
+
scope: e.__scopeSelect,
|
|
63
|
+
onNativeOptionAdd: D.useCallback((e) => {
|
|
64
|
+
L((t) => new Set(t).add(e));
|
|
65
|
+
}, []),
|
|
66
|
+
onNativeOptionRemove: D.useCallback((e) => {
|
|
67
|
+
L((t) => {
|
|
68
|
+
let n = new Set(t);
|
|
69
|
+
return n.delete(e), n;
|
|
70
|
+
});
|
|
71
|
+
}, []),
|
|
72
|
+
children: n
|
|
73
|
+
})
|
|
74
|
+
}), ee ? /* @__PURE__ */ (0, M.jsxs)(Ve, {
|
|
75
|
+
"aria-hidden": !0,
|
|
76
|
+
required: g,
|
|
77
|
+
tabIndex: -1,
|
|
78
|
+
name: p,
|
|
79
|
+
autoComplete: m,
|
|
80
|
+
value: A,
|
|
81
|
+
onChange: (e) => j(e.target.value),
|
|
82
|
+
disabled: h,
|
|
83
|
+
form: _,
|
|
84
|
+
children: [A === void 0 ? /* @__PURE__ */ (0, M.jsx)("option", { value: "" }) : null, Array.from(I)]
|
|
85
|
+
}, R) : null]
|
|
86
|
+
})
|
|
87
|
+
});
|
|
88
|
+
};
|
|
89
|
+
W.displayName = P;
|
|
90
|
+
var G = "SelectTrigger", K = D.forwardRef((e, t) => {
|
|
91
|
+
let { __scopeSelect: n, disabled: i = !1, ...s } = e, c = z(n), l = V(G, n), u = l.disabled || i, d = r(t, l.onTriggerChange), f = I(n), p = D.useRef("touch"), [m, h, g] = Ue((e) => {
|
|
92
|
+
let t = f().filter((e) => !e.disabled), n = We(t, e, t.find((e) => e.value === l.value));
|
|
93
|
+
n !== void 0 && l.onValueChange(n.value);
|
|
94
|
+
}), _ = (e) => {
|
|
95
|
+
u || (l.onOpenChange(!0), g()), e && (l.triggerPointerDownPosRef.current = {
|
|
96
|
+
x: Math.round(e.pageX),
|
|
97
|
+
y: Math.round(e.pageY)
|
|
98
|
+
});
|
|
99
|
+
};
|
|
100
|
+
return /* @__PURE__ */ (0, M.jsx)(w, {
|
|
101
|
+
asChild: !0,
|
|
102
|
+
...c,
|
|
103
|
+
children: /* @__PURE__ */ (0, M.jsx)(o.button, {
|
|
104
|
+
type: "button",
|
|
105
|
+
role: "combobox",
|
|
106
|
+
"aria-controls": l.contentId,
|
|
107
|
+
"aria-expanded": l.open,
|
|
108
|
+
"aria-required": l.required,
|
|
109
|
+
"aria-autocomplete": "none",
|
|
110
|
+
dir: l.dir,
|
|
111
|
+
"data-state": l.open ? "open" : "closed",
|
|
112
|
+
disabled: u,
|
|
113
|
+
"data-disabled": u ? "" : void 0,
|
|
114
|
+
"data-placeholder": He(l.value) ? "" : void 0,
|
|
115
|
+
...s,
|
|
116
|
+
ref: d,
|
|
117
|
+
onClick: a(s.onClick, (e) => {
|
|
118
|
+
e.currentTarget.focus(), p.current !== "mouse" && _(e);
|
|
119
|
+
}),
|
|
120
|
+
onPointerDown: a(s.onPointerDown, (e) => {
|
|
121
|
+
p.current = e.pointerType;
|
|
122
|
+
let t = e.target;
|
|
123
|
+
t.hasPointerCapture(e.pointerId) && t.releasePointerCapture(e.pointerId), e.button === 0 && e.ctrlKey === !1 && e.pointerType === "mouse" && (_(e), e.preventDefault());
|
|
124
|
+
}),
|
|
125
|
+
onKeyDown: a(s.onKeyDown, (e) => {
|
|
126
|
+
let t = m.current !== "";
|
|
127
|
+
!(e.ctrlKey || e.altKey || e.metaKey) && e.key.length === 1 && h(e.key), !(t && e.key === " ") && N.includes(e.key) && (_(), e.preventDefault());
|
|
128
|
+
})
|
|
129
|
+
})
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
K.displayName = G;
|
|
133
|
+
var q = "SelectValue", ne = D.forwardRef((e, t) => {
|
|
134
|
+
let { __scopeSelect: n, className: i, style: a, children: s, placeholder: l = "", ...u } = e, d = V(q, n), { onValueNodeHasChildrenChange: f } = d, p = s !== void 0, m = r(t, d.onValueNodeChange);
|
|
135
|
+
return c(() => {
|
|
136
|
+
f(p);
|
|
137
|
+
}, [f, p]), /* @__PURE__ */ (0, M.jsx)(o.span, {
|
|
138
|
+
...u,
|
|
139
|
+
ref: m,
|
|
140
|
+
style: { pointerEvents: "none" },
|
|
141
|
+
children: He(d.value) ? /* @__PURE__ */ (0, M.jsx)(M.Fragment, { children: l }) : s
|
|
142
|
+
});
|
|
143
|
+
});
|
|
144
|
+
ne.displayName = q;
|
|
145
|
+
var re = "SelectIcon", J = D.forwardRef((e, t) => {
|
|
146
|
+
let { __scopeSelect: n, children: r, ...i } = e;
|
|
147
|
+
return /* @__PURE__ */ (0, M.jsx)(o.span, {
|
|
148
|
+
"aria-hidden": !0,
|
|
149
|
+
...i,
|
|
150
|
+
ref: t,
|
|
151
|
+
children: r || "▼"
|
|
152
|
+
});
|
|
153
|
+
});
|
|
154
|
+
J.displayName = re;
|
|
155
|
+
var ie = "SelectPortal", ae = (e) => /* @__PURE__ */ (0, M.jsx)(v, {
|
|
156
|
+
asChild: !0,
|
|
157
|
+
...e
|
|
158
|
+
});
|
|
159
|
+
ae.displayName = ie;
|
|
160
|
+
var Y = "SelectContent", oe = D.forwardRef((e, t) => {
|
|
161
|
+
let n = V(Y, e.__scopeSelect), [r, i] = D.useState();
|
|
162
|
+
if (c(() => {
|
|
163
|
+
i(new DocumentFragment());
|
|
164
|
+
}, []), !n.open) {
|
|
165
|
+
let t = r;
|
|
166
|
+
return t ? O.createPortal(/* @__PURE__ */ (0, M.jsx)(se, {
|
|
167
|
+
scope: e.__scopeSelect,
|
|
168
|
+
children: /* @__PURE__ */ (0, M.jsx)(F.Slot, {
|
|
169
|
+
scope: e.__scopeSelect,
|
|
170
|
+
children: /* @__PURE__ */ (0, M.jsx)("div", { children: e.children })
|
|
171
|
+
})
|
|
172
|
+
}), t) : null;
|
|
173
|
+
}
|
|
174
|
+
return /* @__PURE__ */ (0, M.jsx)(ue, {
|
|
175
|
+
...e,
|
|
176
|
+
ref: t
|
|
177
|
+
});
|
|
178
|
+
});
|
|
179
|
+
oe.displayName = Y;
|
|
180
|
+
var X = 10, [se, Z] = R(Y), ce = "SelectContentImpl", le = i("SelectContent.RemoveScroll"), ue = D.forwardRef((e, t) => {
|
|
181
|
+
let { __scopeSelect: n, position: i = "item-aligned", onCloseAutoFocus: o, onEscapeKeyDown: s, onPointerDownOutside: c, side: l, sideOffset: u, align: d, alignOffset: f, arrowPadding: v, collisionBoundary: y, collisionPadding: b, sticky: x, hideWhenDetached: S, avoidCollisions: C, ...w } = e, T = V(Y, n), [E, O] = D.useState(null), [k, A] = D.useState(null), j = r(t, (e) => O(e)), [N, ee] = D.useState(null), [P, F] = D.useState(null), L = I(n), [R, te] = D.useState(!1), z = D.useRef(!1);
|
|
182
|
+
D.useEffect(() => {
|
|
183
|
+
if (E) return _(E);
|
|
184
|
+
}, [E]), g();
|
|
185
|
+
let B = D.useCallback((e) => {
|
|
186
|
+
let [t, ...n] = L().map((e) => e.ref.current), [r] = n.slice(-1), i = document.activeElement;
|
|
187
|
+
for (let n of e) if (n === i || (n?.scrollIntoView({ block: "nearest" }), n === t && k && (k.scrollTop = 0), n === r && k && (k.scrollTop = k.scrollHeight), n?.focus(), document.activeElement !== i)) return;
|
|
188
|
+
}, [L, k]), H = D.useCallback(() => B([N, E]), [
|
|
189
|
+
B,
|
|
190
|
+
N,
|
|
191
|
+
E
|
|
192
|
+
]);
|
|
193
|
+
D.useEffect(() => {
|
|
194
|
+
R && H();
|
|
195
|
+
}, [R, H]);
|
|
196
|
+
let { onOpenChange: U, triggerPointerDownPosRef: W } = T;
|
|
197
|
+
D.useEffect(() => {
|
|
198
|
+
if (E) {
|
|
199
|
+
let e = {
|
|
200
|
+
x: 0,
|
|
201
|
+
y: 0
|
|
202
|
+
}, t = (t) => {
|
|
203
|
+
e = {
|
|
204
|
+
x: Math.abs(Math.round(t.pageX) - (W.current?.x ?? 0)),
|
|
205
|
+
y: Math.abs(Math.round(t.pageY) - (W.current?.y ?? 0))
|
|
206
|
+
};
|
|
207
|
+
}, n = (n) => {
|
|
208
|
+
e.x <= 10 && e.y <= 10 ? n.preventDefault() : E.contains(n.target) || U(!1), document.removeEventListener("pointermove", t), W.current = null;
|
|
209
|
+
};
|
|
210
|
+
return W.current !== null && (document.addEventListener("pointermove", t), document.addEventListener("pointerup", n, {
|
|
211
|
+
capture: !0,
|
|
212
|
+
once: !0
|
|
213
|
+
})), () => {
|
|
214
|
+
document.removeEventListener("pointermove", t), document.removeEventListener("pointerup", n, { capture: !0 });
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
}, [
|
|
218
|
+
E,
|
|
219
|
+
U,
|
|
220
|
+
W
|
|
221
|
+
]), D.useEffect(() => {
|
|
222
|
+
let e = () => U(!1);
|
|
223
|
+
return window.addEventListener("blur", e), window.addEventListener("resize", e), () => {
|
|
224
|
+
window.removeEventListener("blur", e), window.removeEventListener("resize", e);
|
|
225
|
+
};
|
|
226
|
+
}, [U]);
|
|
227
|
+
let [G, K] = Ue((e) => {
|
|
228
|
+
let t = L().filter((e) => !e.disabled), n = We(t, e, t.find((e) => e.ref.current === document.activeElement));
|
|
229
|
+
n && setTimeout(() => n.ref.current.focus());
|
|
230
|
+
}), q = D.useCallback((e, t, n) => {
|
|
231
|
+
let r = !z.current && !n;
|
|
232
|
+
(T.value !== void 0 && T.value === t || r) && (ee(e), r && (z.current = !0));
|
|
233
|
+
}, [T.value]), ne = D.useCallback(() => E?.focus(), [E]), re = D.useCallback((e, t, n) => {
|
|
234
|
+
let r = !z.current && !n;
|
|
235
|
+
(T.value !== void 0 && T.value === t || r) && F(e);
|
|
236
|
+
}, [T.value]), J = i === "popper" ? me : fe, ie = J === me ? {
|
|
237
|
+
side: l,
|
|
238
|
+
sideOffset: u,
|
|
239
|
+
align: d,
|
|
240
|
+
alignOffset: f,
|
|
241
|
+
arrowPadding: v,
|
|
242
|
+
collisionBoundary: y,
|
|
243
|
+
collisionPadding: b,
|
|
244
|
+
sticky: x,
|
|
245
|
+
hideWhenDetached: S,
|
|
246
|
+
avoidCollisions: C
|
|
247
|
+
} : {};
|
|
248
|
+
return /* @__PURE__ */ (0, M.jsx)(se, {
|
|
249
|
+
scope: n,
|
|
250
|
+
content: E,
|
|
251
|
+
viewport: k,
|
|
252
|
+
onViewportChange: A,
|
|
253
|
+
itemRefCallback: q,
|
|
254
|
+
selectedItem: N,
|
|
255
|
+
onItemLeave: ne,
|
|
256
|
+
itemTextRefCallback: re,
|
|
257
|
+
focusSelectedItem: H,
|
|
258
|
+
selectedItemText: P,
|
|
259
|
+
position: i,
|
|
260
|
+
isPositioned: R,
|
|
261
|
+
searchRef: G,
|
|
262
|
+
children: /* @__PURE__ */ (0, M.jsx)(h, {
|
|
263
|
+
as: le,
|
|
264
|
+
allowPinchZoom: !0,
|
|
265
|
+
children: /* @__PURE__ */ (0, M.jsx)(m, {
|
|
266
|
+
asChild: !0,
|
|
267
|
+
trapped: T.open,
|
|
268
|
+
onMountAutoFocus: (e) => {
|
|
269
|
+
e.preventDefault();
|
|
270
|
+
},
|
|
271
|
+
onUnmountAutoFocus: a(o, (e) => {
|
|
272
|
+
T.trigger?.focus({ preventScroll: !0 }), e.preventDefault();
|
|
273
|
+
}),
|
|
274
|
+
children: /* @__PURE__ */ (0, M.jsx)(p, {
|
|
275
|
+
asChild: !0,
|
|
276
|
+
disableOutsidePointerEvents: !0,
|
|
277
|
+
onEscapeKeyDown: s,
|
|
278
|
+
onPointerDownOutside: c,
|
|
279
|
+
onFocusOutside: (e) => e.preventDefault(),
|
|
280
|
+
onDismiss: () => T.onOpenChange(!1),
|
|
281
|
+
children: /* @__PURE__ */ (0, M.jsx)(J, {
|
|
282
|
+
role: "listbox",
|
|
283
|
+
id: T.contentId,
|
|
284
|
+
"data-state": T.open ? "open" : "closed",
|
|
285
|
+
dir: T.dir,
|
|
286
|
+
onContextMenu: (e) => e.preventDefault(),
|
|
287
|
+
...w,
|
|
288
|
+
...ie,
|
|
289
|
+
onPlaced: () => te(!0),
|
|
290
|
+
ref: j,
|
|
291
|
+
style: {
|
|
292
|
+
display: "flex",
|
|
293
|
+
flexDirection: "column",
|
|
294
|
+
outline: "none",
|
|
295
|
+
...w.style
|
|
296
|
+
},
|
|
297
|
+
onKeyDown: a(w.onKeyDown, (e) => {
|
|
298
|
+
let t = e.ctrlKey || e.altKey || e.metaKey;
|
|
299
|
+
if (e.key === "Tab" && e.preventDefault(), !t && e.key.length === 1 && K(e.key), [
|
|
300
|
+
"ArrowUp",
|
|
301
|
+
"ArrowDown",
|
|
302
|
+
"Home",
|
|
303
|
+
"End"
|
|
304
|
+
].includes(e.key)) {
|
|
305
|
+
let t = L().filter((e) => !e.disabled).map((e) => e.ref.current);
|
|
306
|
+
if (["ArrowUp", "End"].includes(e.key) && (t = t.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(e.key)) {
|
|
307
|
+
let n = e.target, r = t.indexOf(n);
|
|
308
|
+
t = t.slice(r + 1);
|
|
309
|
+
}
|
|
310
|
+
setTimeout(() => B(t)), e.preventDefault();
|
|
311
|
+
}
|
|
312
|
+
})
|
|
313
|
+
})
|
|
314
|
+
})
|
|
315
|
+
})
|
|
316
|
+
})
|
|
317
|
+
});
|
|
318
|
+
});
|
|
319
|
+
ue.displayName = ce;
|
|
320
|
+
var de = "SelectItemAlignedPosition", fe = D.forwardRef((e, t) => {
|
|
321
|
+
let { __scopeSelect: n, onPlaced: i, ...a } = e, s = V(Y, n), l = Z(Y, n), [u, d] = D.useState(null), [f, p] = D.useState(null), m = r(t, (e) => p(e)), h = I(n), g = D.useRef(!1), _ = D.useRef(!0), { viewport: v, selectedItem: y, selectedItemText: b, focusSelectedItem: x } = l, S = D.useCallback(() => {
|
|
322
|
+
if (s.trigger && s.valueNode && u && f && v && y && b) {
|
|
323
|
+
let e = s.trigger.getBoundingClientRect(), t = f.getBoundingClientRect(), n = s.valueNode.getBoundingClientRect(), r = b.getBoundingClientRect();
|
|
324
|
+
if (s.dir !== "rtl") {
|
|
325
|
+
let i = r.left - t.left, a = n.left - i, o = e.left - a, s = e.width + o, c = Math.max(s, t.width), l = window.innerWidth - X, d = E(a, [X, Math.max(X, l - c)]);
|
|
326
|
+
u.style.minWidth = s + "px", u.style.left = d + "px";
|
|
327
|
+
} else {
|
|
328
|
+
let i = t.right - r.right, a = window.innerWidth - n.right - i, o = window.innerWidth - e.right - a, s = e.width + o, c = Math.max(s, t.width), l = window.innerWidth - X, d = E(a, [X, Math.max(X, l - c)]);
|
|
329
|
+
u.style.minWidth = s + "px", u.style.right = d + "px";
|
|
330
|
+
}
|
|
331
|
+
let a = h(), o = window.innerHeight - X * 2, c = v.scrollHeight, l = window.getComputedStyle(f), d = parseInt(l.borderTopWidth, 10), p = parseInt(l.paddingTop, 10), m = parseInt(l.borderBottomWidth, 10), _ = parseInt(l.paddingBottom, 10), x = d + p + c + _ + m, S = Math.min(y.offsetHeight * 5, x), C = window.getComputedStyle(v), w = parseInt(C.paddingTop, 10), T = parseInt(C.paddingBottom, 10), D = e.top + e.height / 2 - X, O = o - D, k = y.offsetHeight / 2, A = y.offsetTop + k, j = d + p + A, M = x - j;
|
|
332
|
+
if (j <= D) {
|
|
333
|
+
let e = a.length > 0 && y === a[a.length - 1].ref.current;
|
|
334
|
+
u.style.bottom = "0px";
|
|
335
|
+
let t = f.clientHeight - v.offsetTop - v.offsetHeight, n = j + Math.max(O, k + (e ? T : 0) + t + m);
|
|
336
|
+
u.style.height = n + "px";
|
|
337
|
+
} else {
|
|
338
|
+
let e = a.length > 0 && y === a[0].ref.current;
|
|
339
|
+
u.style.top = "0px";
|
|
340
|
+
let t = Math.max(D, d + v.offsetTop + (e ? w : 0) + k) + M;
|
|
341
|
+
u.style.height = t + "px", v.scrollTop = j - D + v.offsetTop;
|
|
342
|
+
}
|
|
343
|
+
u.style.margin = `${X}px 0`, u.style.minHeight = S + "px", u.style.maxHeight = o + "px", i?.(), requestAnimationFrame(() => g.current = !0);
|
|
344
|
+
}
|
|
345
|
+
}, [
|
|
346
|
+
h,
|
|
347
|
+
s.trigger,
|
|
348
|
+
s.valueNode,
|
|
349
|
+
u,
|
|
350
|
+
f,
|
|
351
|
+
v,
|
|
352
|
+
y,
|
|
353
|
+
b,
|
|
354
|
+
s.dir,
|
|
355
|
+
i
|
|
356
|
+
]);
|
|
357
|
+
c(() => S(), [S]);
|
|
358
|
+
let [C, w] = D.useState();
|
|
359
|
+
return c(() => {
|
|
360
|
+
f && w(window.getComputedStyle(f).zIndex);
|
|
361
|
+
}, [f]), /* @__PURE__ */ (0, M.jsx)(he, {
|
|
362
|
+
scope: n,
|
|
363
|
+
contentWrapper: u,
|
|
364
|
+
shouldExpandOnScrollRef: g,
|
|
365
|
+
onScrollButtonChange: D.useCallback((e) => {
|
|
366
|
+
e && _.current === !0 && (S(), x?.(), _.current = !1);
|
|
367
|
+
}, [S, x]),
|
|
368
|
+
children: /* @__PURE__ */ (0, M.jsx)("div", {
|
|
369
|
+
ref: d,
|
|
370
|
+
style: {
|
|
371
|
+
display: "flex",
|
|
372
|
+
flexDirection: "column",
|
|
373
|
+
position: "fixed",
|
|
374
|
+
zIndex: C
|
|
375
|
+
},
|
|
376
|
+
children: /* @__PURE__ */ (0, M.jsx)(o.div, {
|
|
377
|
+
...a,
|
|
378
|
+
ref: m,
|
|
379
|
+
style: {
|
|
380
|
+
boxSizing: "border-box",
|
|
381
|
+
maxHeight: "100%",
|
|
382
|
+
...a.style
|
|
383
|
+
}
|
|
384
|
+
})
|
|
385
|
+
})
|
|
386
|
+
});
|
|
387
|
+
});
|
|
388
|
+
fe.displayName = de;
|
|
389
|
+
var pe = "SelectPopperPosition", me = D.forwardRef((e, t) => {
|
|
390
|
+
let { __scopeSelect: n, align: r = "start", collisionPadding: i = X, ...a } = e, o = z(n);
|
|
391
|
+
return /* @__PURE__ */ (0, M.jsx)(C, {
|
|
392
|
+
...o,
|
|
393
|
+
...a,
|
|
394
|
+
ref: t,
|
|
395
|
+
align: r,
|
|
396
|
+
collisionPadding: i,
|
|
397
|
+
style: {
|
|
398
|
+
boxSizing: "border-box",
|
|
399
|
+
...a.style,
|
|
400
|
+
"--radix-select-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
401
|
+
"--radix-select-content-available-width": "var(--radix-popper-available-width)",
|
|
402
|
+
"--radix-select-content-available-height": "var(--radix-popper-available-height)",
|
|
403
|
+
"--radix-select-trigger-width": "var(--radix-popper-anchor-width)",
|
|
404
|
+
"--radix-select-trigger-height": "var(--radix-popper-anchor-height)"
|
|
405
|
+
}
|
|
406
|
+
});
|
|
407
|
+
});
|
|
408
|
+
me.displayName = pe;
|
|
409
|
+
var [he, ge] = R(Y, {}), _e = "SelectViewport", ve = D.forwardRef((e, t) => {
|
|
410
|
+
let { __scopeSelect: n, nonce: i, ...s } = e, c = Z(_e, n), l = ge(_e, n), u = r(t, c.onViewportChange), d = D.useRef(0);
|
|
411
|
+
return /* @__PURE__ */ (0, M.jsxs)(M.Fragment, { children: [/* @__PURE__ */ (0, M.jsx)("style", {
|
|
412
|
+
dangerouslySetInnerHTML: { __html: "[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}" },
|
|
413
|
+
nonce: i
|
|
414
|
+
}), /* @__PURE__ */ (0, M.jsx)(F.Slot, {
|
|
415
|
+
scope: n,
|
|
416
|
+
children: /* @__PURE__ */ (0, M.jsx)(o.div, {
|
|
417
|
+
"data-radix-select-viewport": "",
|
|
418
|
+
role: "presentation",
|
|
419
|
+
...s,
|
|
420
|
+
ref: u,
|
|
421
|
+
style: {
|
|
422
|
+
position: "relative",
|
|
423
|
+
flex: 1,
|
|
424
|
+
overflow: "hidden auto",
|
|
425
|
+
...s.style
|
|
426
|
+
},
|
|
427
|
+
onScroll: a(s.onScroll, (e) => {
|
|
428
|
+
let t = e.currentTarget, { contentWrapper: n, shouldExpandOnScrollRef: r } = l;
|
|
429
|
+
if (r?.current && n) {
|
|
430
|
+
let e = Math.abs(d.current - t.scrollTop);
|
|
431
|
+
if (e > 0) {
|
|
432
|
+
let r = window.innerHeight - X * 2, i = parseFloat(n.style.minHeight), a = parseFloat(n.style.height), o = Math.max(i, a);
|
|
433
|
+
if (o < r) {
|
|
434
|
+
let i = o + e, a = Math.min(r, i), s = i - a;
|
|
435
|
+
n.style.height = a + "px", n.style.bottom === "0px" && (t.scrollTop = s > 0 ? s : 0, n.style.justifyContent = "flex-end");
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
d.current = t.scrollTop;
|
|
440
|
+
})
|
|
441
|
+
})
|
|
442
|
+
})] });
|
|
443
|
+
});
|
|
444
|
+
ve.displayName = _e;
|
|
445
|
+
var ye = "SelectGroup", [be, xe] = R(ye), Se = D.forwardRef((e, t) => {
|
|
446
|
+
let { __scopeSelect: n, ...r } = e, i = u();
|
|
447
|
+
return /* @__PURE__ */ (0, M.jsx)(be, {
|
|
448
|
+
scope: n,
|
|
449
|
+
id: i,
|
|
450
|
+
children: /* @__PURE__ */ (0, M.jsx)(o.div, {
|
|
451
|
+
role: "group",
|
|
452
|
+
"aria-labelledby": i,
|
|
453
|
+
...r,
|
|
454
|
+
ref: t
|
|
455
|
+
})
|
|
456
|
+
});
|
|
457
|
+
});
|
|
458
|
+
Se.displayName = ye;
|
|
459
|
+
var Ce = "SelectLabel", we = D.forwardRef((e, t) => {
|
|
460
|
+
let { __scopeSelect: n, ...r } = e, i = xe(Ce, n);
|
|
461
|
+
return /* @__PURE__ */ (0, M.jsx)(o.div, {
|
|
462
|
+
id: i.id,
|
|
463
|
+
...r,
|
|
464
|
+
ref: t
|
|
465
|
+
});
|
|
466
|
+
});
|
|
467
|
+
we.displayName = Ce;
|
|
468
|
+
var Q = "SelectItem", [Te, Ee] = R(Q), De = D.forwardRef((e, t) => {
|
|
469
|
+
let { __scopeSelect: n, value: i, disabled: s = !1, textValue: c, ...l } = e, d = V(Q, n), f = Z(Q, n), p = d.value === i, [m, h] = D.useState(c ?? ""), [g, _] = D.useState(!1), v = r(t, (e) => f.itemRefCallback?.(e, i, s)), y = u(), b = D.useRef("touch"), x = () => {
|
|
470
|
+
s || (d.onValueChange(i), d.onOpenChange(!1));
|
|
471
|
+
};
|
|
472
|
+
if (i === "") throw Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");
|
|
473
|
+
return /* @__PURE__ */ (0, M.jsx)(Te, {
|
|
474
|
+
scope: n,
|
|
475
|
+
value: i,
|
|
476
|
+
disabled: s,
|
|
477
|
+
textId: y,
|
|
478
|
+
isSelected: p,
|
|
479
|
+
onItemTextChange: D.useCallback((e) => {
|
|
480
|
+
h((t) => t || (e?.textContent ?? "").trim());
|
|
481
|
+
}, []),
|
|
482
|
+
children: /* @__PURE__ */ (0, M.jsx)(F.ItemSlot, {
|
|
483
|
+
scope: n,
|
|
484
|
+
value: i,
|
|
485
|
+
disabled: s,
|
|
486
|
+
textValue: m,
|
|
487
|
+
children: /* @__PURE__ */ (0, M.jsx)(o.div, {
|
|
488
|
+
role: "option",
|
|
489
|
+
"aria-labelledby": y,
|
|
490
|
+
"data-highlighted": g ? "" : void 0,
|
|
491
|
+
"aria-selected": p && g,
|
|
492
|
+
"data-state": p ? "checked" : "unchecked",
|
|
493
|
+
"aria-disabled": s || void 0,
|
|
494
|
+
"data-disabled": s ? "" : void 0,
|
|
495
|
+
tabIndex: s ? void 0 : -1,
|
|
496
|
+
...l,
|
|
497
|
+
ref: v,
|
|
498
|
+
onFocus: a(l.onFocus, () => _(!0)),
|
|
499
|
+
onBlur: a(l.onBlur, () => _(!1)),
|
|
500
|
+
onClick: a(l.onClick, () => {
|
|
501
|
+
b.current !== "mouse" && x();
|
|
502
|
+
}),
|
|
503
|
+
onPointerUp: a(l.onPointerUp, () => {
|
|
504
|
+
b.current === "mouse" && x();
|
|
505
|
+
}),
|
|
506
|
+
onPointerDown: a(l.onPointerDown, (e) => {
|
|
507
|
+
b.current = e.pointerType;
|
|
508
|
+
}),
|
|
509
|
+
onPointerMove: a(l.onPointerMove, (e) => {
|
|
510
|
+
b.current = e.pointerType, s ? f.onItemLeave?.() : b.current === "mouse" && e.currentTarget.focus({ preventScroll: !0 });
|
|
511
|
+
}),
|
|
512
|
+
onPointerLeave: a(l.onPointerLeave, (e) => {
|
|
513
|
+
e.currentTarget === document.activeElement && f.onItemLeave?.();
|
|
514
|
+
}),
|
|
515
|
+
onKeyDown: a(l.onKeyDown, (e) => {
|
|
516
|
+
f.searchRef?.current !== "" && e.key === " " || (ee.includes(e.key) && x(), e.key === " " && e.preventDefault());
|
|
517
|
+
})
|
|
518
|
+
})
|
|
519
|
+
})
|
|
520
|
+
});
|
|
521
|
+
});
|
|
522
|
+
De.displayName = Q;
|
|
523
|
+
var $ = "SelectItemText", Oe = D.forwardRef((e, t) => {
|
|
524
|
+
let { __scopeSelect: n, className: i, style: a, ...s } = e, l = V($, n), u = Z($, n), d = Ee($, n), f = U($, n), [p, m] = D.useState(null), h = r(t, (e) => m(e), d.onItemTextChange, (e) => u.itemTextRefCallback?.(e, d.value, d.disabled)), g = p?.textContent, _ = D.useMemo(() => /* @__PURE__ */ (0, M.jsx)("option", {
|
|
525
|
+
value: d.value,
|
|
526
|
+
disabled: d.disabled,
|
|
527
|
+
children: g
|
|
528
|
+
}, d.value), [
|
|
529
|
+
d.disabled,
|
|
530
|
+
d.value,
|
|
531
|
+
g
|
|
532
|
+
]), { onNativeOptionAdd: v, onNativeOptionRemove: y } = f;
|
|
533
|
+
return c(() => (v(_), () => y(_)), [
|
|
534
|
+
v,
|
|
535
|
+
y,
|
|
536
|
+
_
|
|
537
|
+
]), /* @__PURE__ */ (0, M.jsxs)(M.Fragment, { children: [/* @__PURE__ */ (0, M.jsx)(o.span, {
|
|
538
|
+
id: d.textId,
|
|
539
|
+
...s,
|
|
540
|
+
ref: h
|
|
541
|
+
}), d.isSelected && l.valueNode && !l.valueNodeHasChildren ? O.createPortal(s.children, l.valueNode) : null] });
|
|
542
|
+
});
|
|
543
|
+
Oe.displayName = $;
|
|
544
|
+
var ke = "SelectItemIndicator", Ae = D.forwardRef((e, t) => {
|
|
545
|
+
let { __scopeSelect: n, ...r } = e;
|
|
546
|
+
return Ee(ke, n).isSelected ? /* @__PURE__ */ (0, M.jsx)(o.span, {
|
|
547
|
+
"aria-hidden": !0,
|
|
548
|
+
...r,
|
|
549
|
+
ref: t
|
|
550
|
+
}) : null;
|
|
551
|
+
});
|
|
552
|
+
Ae.displayName = ke;
|
|
553
|
+
var je = "SelectScrollUpButton", Me = D.forwardRef((e, t) => {
|
|
554
|
+
let n = Z(je, e.__scopeSelect), i = ge(je, e.__scopeSelect), [a, o] = D.useState(!1), s = r(t, i.onScrollButtonChange);
|
|
555
|
+
return c(() => {
|
|
556
|
+
if (n.viewport && n.isPositioned) {
|
|
557
|
+
let e = function() {
|
|
558
|
+
o(t.scrollTop > 0);
|
|
559
|
+
}, t = n.viewport;
|
|
560
|
+
return e(), t.addEventListener("scroll", e), () => t.removeEventListener("scroll", e);
|
|
561
|
+
}
|
|
562
|
+
}, [n.viewport, n.isPositioned]), a ? /* @__PURE__ */ (0, M.jsx)(Fe, {
|
|
563
|
+
...e,
|
|
564
|
+
ref: s,
|
|
565
|
+
onAutoScroll: () => {
|
|
566
|
+
let { viewport: e, selectedItem: t } = n;
|
|
567
|
+
e && t && (e.scrollTop -= t.offsetHeight);
|
|
568
|
+
}
|
|
569
|
+
}) : null;
|
|
570
|
+
});
|
|
571
|
+
Me.displayName = je;
|
|
572
|
+
var Ne = "SelectScrollDownButton", Pe = D.forwardRef((e, t) => {
|
|
573
|
+
let n = Z(Ne, e.__scopeSelect), i = ge(Ne, e.__scopeSelect), [a, o] = D.useState(!1), s = r(t, i.onScrollButtonChange);
|
|
574
|
+
return c(() => {
|
|
575
|
+
if (n.viewport && n.isPositioned) {
|
|
576
|
+
let e = function() {
|
|
577
|
+
let e = t.scrollHeight - t.clientHeight;
|
|
578
|
+
o(Math.ceil(t.scrollTop) < e);
|
|
579
|
+
}, t = n.viewport;
|
|
580
|
+
return e(), t.addEventListener("scroll", e), () => t.removeEventListener("scroll", e);
|
|
581
|
+
}
|
|
582
|
+
}, [n.viewport, n.isPositioned]), a ? /* @__PURE__ */ (0, M.jsx)(Fe, {
|
|
583
|
+
...e,
|
|
584
|
+
ref: s,
|
|
585
|
+
onAutoScroll: () => {
|
|
586
|
+
let { viewport: e, selectedItem: t } = n;
|
|
587
|
+
e && t && (e.scrollTop += t.offsetHeight);
|
|
588
|
+
}
|
|
589
|
+
}) : null;
|
|
590
|
+
});
|
|
591
|
+
Pe.displayName = Ne;
|
|
592
|
+
var Fe = D.forwardRef((e, t) => {
|
|
593
|
+
let { __scopeSelect: n, onAutoScroll: r, ...i } = e, s = Z("SelectScrollButton", n), l = D.useRef(null), u = I(n), d = D.useCallback(() => {
|
|
594
|
+
l.current !== null && (window.clearInterval(l.current), l.current = null);
|
|
595
|
+
}, []);
|
|
596
|
+
return D.useEffect(() => () => d(), [d]), c(() => {
|
|
597
|
+
u().find((e) => e.ref.current === document.activeElement)?.ref.current?.scrollIntoView({ block: "nearest" });
|
|
598
|
+
}, [u]), /* @__PURE__ */ (0, M.jsx)(o.div, {
|
|
599
|
+
"aria-hidden": !0,
|
|
600
|
+
...i,
|
|
601
|
+
ref: t,
|
|
602
|
+
style: {
|
|
603
|
+
flexShrink: 0,
|
|
604
|
+
...i.style
|
|
605
|
+
},
|
|
606
|
+
onPointerDown: a(i.onPointerDown, () => {
|
|
607
|
+
l.current === null && (l.current = window.setInterval(r, 50));
|
|
608
|
+
}),
|
|
609
|
+
onPointerMove: a(i.onPointerMove, () => {
|
|
610
|
+
s.onItemLeave?.(), l.current === null && (l.current = window.setInterval(r, 50));
|
|
611
|
+
}),
|
|
612
|
+
onPointerLeave: a(i.onPointerLeave, () => {
|
|
613
|
+
d();
|
|
614
|
+
})
|
|
615
|
+
});
|
|
616
|
+
}), Ie = "SelectSeparator", Le = D.forwardRef((e, t) => {
|
|
617
|
+
let { __scopeSelect: n, ...r } = e;
|
|
618
|
+
return /* @__PURE__ */ (0, M.jsx)(o.div, {
|
|
619
|
+
"aria-hidden": !0,
|
|
620
|
+
...r,
|
|
621
|
+
ref: t
|
|
622
|
+
});
|
|
623
|
+
});
|
|
624
|
+
Le.displayName = Ie;
|
|
625
|
+
var Re = "SelectArrow", ze = D.forwardRef((e, t) => {
|
|
626
|
+
let { __scopeSelect: n, ...r } = e, i = z(n), a = V(Re, n), o = Z(Re, n);
|
|
627
|
+
return a.open && o.position === "popper" ? /* @__PURE__ */ (0, M.jsx)(S, {
|
|
628
|
+
...i,
|
|
629
|
+
...r,
|
|
630
|
+
ref: t
|
|
631
|
+
}) : null;
|
|
632
|
+
});
|
|
633
|
+
ze.displayName = Re;
|
|
634
|
+
var Be = "SelectBubbleInput", Ve = D.forwardRef(({ __scopeSelect: e, value: t, ...n }, i) => {
|
|
635
|
+
let a = D.useRef(null), s = r(i, a), c = y(t);
|
|
636
|
+
return D.useEffect(() => {
|
|
637
|
+
let e = a.current;
|
|
638
|
+
if (!e) return;
|
|
639
|
+
let n = window.HTMLSelectElement.prototype, r = Object.getOwnPropertyDescriptor(n, "value").set;
|
|
640
|
+
if (c !== t && r) {
|
|
641
|
+
let n = new Event("change", { bubbles: !0 });
|
|
642
|
+
r.call(e, t), e.dispatchEvent(n);
|
|
643
|
+
}
|
|
644
|
+
}, [c, t]), /* @__PURE__ */ (0, M.jsx)(o.select, {
|
|
645
|
+
...n,
|
|
646
|
+
style: {
|
|
647
|
+
...T,
|
|
648
|
+
...n.style
|
|
649
|
+
},
|
|
650
|
+
ref: s,
|
|
651
|
+
defaultValue: t
|
|
652
|
+
});
|
|
653
|
+
});
|
|
654
|
+
Ve.displayName = Be;
|
|
655
|
+
function He(e) {
|
|
656
|
+
return e === "" || e === void 0;
|
|
657
|
+
}
|
|
658
|
+
function Ue(e) {
|
|
659
|
+
let t = f(e), n = D.useRef(""), r = D.useRef(0), i = D.useCallback((e) => {
|
|
660
|
+
let i = n.current + e;
|
|
661
|
+
t(i), (function e(t) {
|
|
662
|
+
n.current = t, window.clearTimeout(r.current), t !== "" && (r.current = window.setTimeout(() => e(""), 1e3));
|
|
663
|
+
})(i);
|
|
664
|
+
}, [t]), a = D.useCallback(() => {
|
|
665
|
+
n.current = "", window.clearTimeout(r.current);
|
|
666
|
+
}, []);
|
|
667
|
+
return D.useEffect(() => () => window.clearTimeout(r.current), []), [
|
|
668
|
+
n,
|
|
669
|
+
i,
|
|
670
|
+
a
|
|
671
|
+
];
|
|
672
|
+
}
|
|
673
|
+
function We(e, t, n) {
|
|
674
|
+
let r = t.length > 1 && Array.from(t).every((e) => e === t[0]) ? t[0] : t, i = n ? e.indexOf(n) : -1, a = Ge(e, Math.max(i, 0));
|
|
675
|
+
r.length === 1 && (a = a.filter((e) => e !== n));
|
|
676
|
+
let o = a.find((e) => e.textValue.toLowerCase().startsWith(r.toLowerCase()));
|
|
677
|
+
return o === n ? void 0 : o;
|
|
678
|
+
}
|
|
679
|
+
function Ge(e, t) {
|
|
680
|
+
return e.map((n, r) => e[(t + r) % e.length]);
|
|
681
|
+
}
|
|
682
|
+
var Ke = W, qe = K, Je = ne, Ye = J, Xe = ae, Ze = oe, Qe = ve, $e = Se, et = we, tt = De, nt = Oe, rt = Ae, it = Me, at = Pe, ot = Le, st = Ke, ct = $e, lt = Je, ut = D.forwardRef(({ className: e, children: n, ...r }, i) => /* @__PURE__ */ (0, M.jsxs)(qe, {
|
|
683
|
+
ref: i,
|
|
684
|
+
className: t("border-input ring-offset-background data-[placeholder]:text-muted-foreground focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-sm focus:ring-1 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1", e),
|
|
685
|
+
...r,
|
|
686
|
+
children: [n, /* @__PURE__ */ (0, M.jsx)(Ye, {
|
|
687
|
+
asChild: !0,
|
|
688
|
+
children: /* @__PURE__ */ (0, M.jsx)(A, { className: "h-4 w-4 opacity-50" })
|
|
689
|
+
})]
|
|
690
|
+
}));
|
|
691
|
+
ut.displayName = qe?.displayName || "SelectTrigger";
|
|
692
|
+
var dt = D.forwardRef(({ className: e, ...n }, r) => /* @__PURE__ */ (0, M.jsx)(it, {
|
|
693
|
+
ref: r,
|
|
694
|
+
className: t("flex cursor-default items-center justify-center py-1", e),
|
|
695
|
+
...n,
|
|
696
|
+
children: /* @__PURE__ */ (0, M.jsx)(j, { className: "h-4 w-4" })
|
|
697
|
+
}));
|
|
698
|
+
dt.displayName = it?.displayName || "SelectScrollUpButton";
|
|
699
|
+
var ft = D.forwardRef(({ className: e, ...n }, r) => /* @__PURE__ */ (0, M.jsx)(at, {
|
|
700
|
+
ref: r,
|
|
701
|
+
className: t("flex cursor-default items-center justify-center py-1", e),
|
|
702
|
+
...n,
|
|
703
|
+
children: /* @__PURE__ */ (0, M.jsx)(A, { className: "h-4 w-4" })
|
|
704
|
+
}));
|
|
705
|
+
ft.displayName = at?.displayName || "SelectScrollDownButton";
|
|
706
|
+
var pt = D.forwardRef(({ className: e, children: n, position: r = "popper", ...i }, a) => /* @__PURE__ */ (0, M.jsx)(Xe, { children: /* @__PURE__ */ (0, M.jsxs)(Ze, {
|
|
707
|
+
ref: a,
|
|
708
|
+
className: t("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] origin-[--radix-select-content-transform-origin] overflow-x-hidden overflow-y-auto rounded-md border shadow-md", r === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", e),
|
|
709
|
+
position: r,
|
|
710
|
+
...i,
|
|
711
|
+
children: [
|
|
712
|
+
/* @__PURE__ */ (0, M.jsx)(dt, {}),
|
|
713
|
+
/* @__PURE__ */ (0, M.jsx)(Qe, {
|
|
714
|
+
className: t("p-1", r === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),
|
|
715
|
+
children: n
|
|
716
|
+
}),
|
|
717
|
+
/* @__PURE__ */ (0, M.jsx)(ft, {})
|
|
718
|
+
]
|
|
719
|
+
}) }));
|
|
720
|
+
pt.displayName = Ze?.displayName || "SelectContent";
|
|
721
|
+
var mt = D.forwardRef(({ className: e, ...n }, r) => /* @__PURE__ */ (0, M.jsx)(et, {
|
|
722
|
+
ref: r,
|
|
723
|
+
className: t("px-2 py-1.5 text-sm font-semibold", e),
|
|
724
|
+
...n
|
|
725
|
+
}));
|
|
726
|
+
mt.displayName = et?.displayName || "SelectLabel";
|
|
727
|
+
var ht = D.forwardRef(({ className: e, children: n, ...r }, i) => /* @__PURE__ */ (0, M.jsxs)(tt, {
|
|
728
|
+
ref: i,
|
|
729
|
+
className: t("focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-default items-center rounded-sm py-1.5 pr-8 pl-2 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50", e),
|
|
730
|
+
...r,
|
|
731
|
+
children: [/* @__PURE__ */ (0, M.jsx)("span", {
|
|
732
|
+
className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center",
|
|
733
|
+
children: /* @__PURE__ */ (0, M.jsx)(rt, { children: /* @__PURE__ */ (0, M.jsx)(k, { className: "h-4 w-4" }) })
|
|
734
|
+
}), /* @__PURE__ */ (0, M.jsx)(nt, { children: n })]
|
|
735
|
+
}));
|
|
736
|
+
ht.displayName = tt?.displayName || "SelectItem";
|
|
737
|
+
var gt = D.forwardRef(({ className: e, ...n }, r) => /* @__PURE__ */ (0, M.jsx)(ot, {
|
|
738
|
+
ref: r,
|
|
739
|
+
className: t("bg-muted -mx-1 my-1 h-px", e),
|
|
740
|
+
...n
|
|
741
|
+
}));
|
|
742
|
+
gt.displayName = ot?.displayName || "SelectSeparator";
|
|
743
|
+
//#endregion
|
|
744
|
+
export { mt as a, gt as c, ht as i, ut as l, pt as n, ft as o, ct as r, dt as s, st as t, lt as u };
|