@adamosuiteservices/ui 1.0.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/README.md +1 -0
- package/dist/accordion-rounded.cjs +6 -0
- package/dist/accordion-rounded.js +85 -0
- package/dist/accordion.cjs +1 -0
- package/dist/accordion.js +65 -0
- package/dist/alert.cjs +1 -0
- package/dist/alert.js +69 -0
- package/dist/avatar.cjs +17 -0
- package/dist/avatar.js +248 -0
- package/dist/badge.cjs +1 -0
- package/dist/badge.js +54 -0
- package/dist/button-BFK0LYE1.js +58 -0
- package/dist/button-BnuVhhWO.cjs +1 -0
- package/dist/button-group.cjs +1 -0
- package/dist/button-group.js +76 -0
- package/dist/button.cjs +1 -0
- package/dist/button.js +5 -0
- package/dist/calendar.cjs +1 -0
- package/dist/calendar.js +2852 -0
- package/dist/card.cjs +1 -0
- package/dist/card.js +112 -0
- package/dist/check-CLxNVljQ.cjs +6 -0
- package/dist/check-Ci0GjV-B.js +11 -0
- package/dist/checkbox-BlfeC4MI.js +271 -0
- package/dist/checkbox-uByYIkZe.cjs +1 -0
- package/dist/checkbox.cjs +1 -0
- package/dist/checkbox.js +4 -0
- package/dist/chevron-down-BqEHzml5.cjs +6 -0
- package/dist/chevron-down-CpVS2Z7w.js +11 -0
- package/dist/chevron-left-B8QsBNvc.cjs +6 -0
- package/dist/chevron-left-Eal-WYLp.js +11 -0
- package/dist/chevron-right-BpzggHsr.cjs +6 -0
- package/dist/chevron-right-Cnc2tB4-.js +11 -0
- package/dist/circle-CX7JIirj.cjs +6 -0
- package/dist/circle-DYv-7Qb9.js +11 -0
- package/dist/collapsible.cjs +1 -0
- package/dist/collapsible.js +34 -0
- package/dist/colors.css +1 -0
- package/dist/combobox.cjs +6 -0
- package/dist/combobox.js +515 -0
- package/dist/components/layout/sidebar/index.d.ts +1 -0
- package/dist/components/layout/sidebar/sidebar.d.ts +17 -0
- package/dist/components/layout/sidebar/sidebar.stories.d.ts +6 -0
- package/dist/components/layout/toaster/index.d.ts +2 -0
- package/dist/components/layout/toaster/toaster.d.ts +26 -0
- package/dist/components/layout/toaster/toaster.stories.d.ts +15 -0
- package/dist/components/layout/toaster/use-toast.d.ts +1 -0
- package/dist/components/ui/accordion/accordion.d.ts +7 -0
- package/dist/components/ui/accordion/accordion.stories.d.ts +17 -0
- package/dist/components/ui/accordion/index.d.ts +1 -0
- package/dist/components/ui/accordion-rounded/accordion-rounded.d.ts +11 -0
- package/dist/components/ui/accordion-rounded/accordion-rounded.stories.d.ts +21 -0
- package/dist/components/ui/accordion-rounded/index.d.ts +1 -0
- package/dist/components/ui/alert/alert.d.ts +9 -0
- package/dist/components/ui/alert/alert.stories.d.ts +24 -0
- package/dist/components/ui/alert/index.d.ts +1 -0
- package/dist/components/ui/avatar/avatar.d.ts +6 -0
- package/dist/components/ui/avatar/avatar.stories.d.ts +14 -0
- package/dist/components/ui/avatar/index.d.ts +1 -0
- package/dist/components/ui/badge/badge.d.ts +10 -0
- package/dist/components/ui/badge/badge.stories.d.ts +41 -0
- package/dist/components/ui/badge/index.d.ts +1 -0
- package/dist/components/ui/button/button.d.ts +10 -0
- package/dist/components/ui/button/button.stories.d.ts +38 -0
- package/dist/components/ui/button/index.d.ts +1 -0
- package/dist/components/ui/button-group/button-group.d.ts +11 -0
- package/dist/components/ui/button-group/button-group.stories.d.ts +19 -0
- package/dist/components/ui/button-group/index.d.ts +1 -0
- package/dist/components/ui/calendar/calendar.d.ts +8 -0
- package/dist/components/ui/calendar/calendar.stories.d.ts +27 -0
- package/dist/components/ui/calendar/index.d.ts +1 -0
- package/dist/components/ui/card/card.d.ts +13 -0
- package/dist/components/ui/card/card.stories.d.ts +18 -0
- package/dist/components/ui/card/index.d.ts +1 -0
- package/dist/components/ui/checkbox/checkbox.d.ts +4 -0
- package/dist/components/ui/checkbox/checkbox.stories.d.ts +15 -0
- package/dist/components/ui/checkbox/index.d.ts +1 -0
- package/dist/components/ui/collapsible/collapsible.d.ts +5 -0
- package/dist/components/ui/collapsible/collapsible.stories.d.ts +12 -0
- package/dist/components/ui/collapsible/index.d.ts +1 -0
- package/dist/components/ui/combobox/combobox.d.ts +35 -0
- package/dist/components/ui/combobox/combobox.stories.d.ts +27 -0
- package/dist/components/ui/combobox/index.d.ts +1 -0
- package/dist/components/ui/command/command.d.ts +18 -0
- package/dist/components/ui/command/index.d.ts +1 -0
- package/dist/components/ui/context-menu/context-menu.d.ts +25 -0
- package/dist/components/ui/context-menu/context-menu.stories.d.ts +10 -0
- package/dist/components/ui/context-menu/index.d.ts +1 -0
- package/dist/components/ui/dialog/dialog.d.ts +17 -0
- package/dist/components/ui/dialog/dialog.stories.d.ts +13 -0
- package/dist/components/ui/dialog/index.d.ts +1 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts +25 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu.stories.d.ts +14 -0
- package/dist/components/ui/dropdown-menu/index.d.ts +1 -0
- package/dist/components/ui/field/field.d.ts +24 -0
- package/dist/components/ui/field/field.stories.d.ts +18 -0
- package/dist/components/ui/field/index.d.ts +1 -0
- package/dist/components/ui/hover-card/hover-card.d.ts +6 -0
- package/dist/components/ui/hover-card/hover-card.stories.d.ts +25 -0
- package/dist/components/ui/hover-card/index.d.ts +1 -0
- package/dist/components/ui/input/index.d.ts +1 -0
- package/dist/components/ui/input/input.d.ts +3 -0
- package/dist/components/ui/input/input.stories.d.ts +23 -0
- package/dist/components/ui/input-group/Input-group.stories.d.ts +28 -0
- package/dist/components/ui/input-group/index.d.ts +1 -0
- package/dist/components/ui/input-group/input-group.d.ts +16 -0
- package/dist/components/ui/kbd/index.d.ts +1 -0
- package/dist/components/ui/kbd/kbd.d.ts +3 -0
- package/dist/components/ui/kbd/kbd.stories.d.ts +26 -0
- package/dist/components/ui/label/index.d.ts +1 -0
- package/dist/components/ui/label/label.d.ts +4 -0
- package/dist/components/ui/label/label.stories.d.ts +24 -0
- package/dist/components/ui/pagination/index.d.ts +1 -0
- package/dist/components/ui/pagination/pagination.d.ts +13 -0
- package/dist/components/ui/pagination/pagination.stories.d.ts +28 -0
- package/dist/components/ui/popover/index.d.ts +1 -0
- package/dist/components/ui/popover/popover.d.ts +7 -0
- package/dist/components/ui/popover/popover.stories.d.ts +26 -0
- package/dist/components/ui/progress/index.d.ts +1 -0
- package/dist/components/ui/progress/progress.d.ts +9 -0
- package/dist/components/ui/progress/progress.stories.d.ts +29 -0
- package/dist/components/ui/radio-group/index.d.ts +1 -0
- package/dist/components/ui/radio-group/radio-group.d.ts +5 -0
- package/dist/components/ui/radio-group/radio-group.stories.d.ts +18 -0
- package/dist/components/ui/select/index.d.ts +1 -0
- package/dist/components/ui/select/select.d.ts +15 -0
- package/dist/components/ui/select/select.stories.d.ts +19 -0
- package/dist/components/ui/separator/index.d.ts +1 -0
- package/dist/components/ui/separator/separator.d.ts +4 -0
- package/dist/components/ui/separator/separator.stories.d.ts +18 -0
- package/dist/components/ui/sheet/index.d.ts +1 -0
- package/dist/components/ui/sheet/sheet.d.ts +14 -0
- package/dist/components/ui/sheet/sheet.stories.d.ts +17 -0
- package/dist/components/ui/skeleton/index.d.ts +1 -0
- package/dist/components/ui/skeleton/skeleton.d.ts +2 -0
- package/dist/components/ui/skeleton/skeleton.stories.d.ts +22 -0
- package/dist/components/ui/slider/index.d.ts +1 -0
- package/dist/components/ui/slider/slider.d.ts +7 -0
- package/dist/components/ui/slider/slider.stories.d.ts +21 -0
- package/dist/components/ui/spinner/index.d.ts +1 -0
- package/dist/components/ui/spinner/spinner.d.ts +2 -0
- package/dist/components/ui/spinner/spinner.stories.d.ts +20 -0
- package/dist/components/ui/switch/index.d.ts +1 -0
- package/dist/components/ui/switch/switch.d.ts +4 -0
- package/dist/components/ui/switch/switch.stories.d.ts +17 -0
- package/dist/components/ui/table/index.d.ts +1 -0
- package/dist/components/ui/table/table.d.ts +10 -0
- package/dist/components/ui/table/table.stories.d.ts +11 -0
- package/dist/components/ui/tabs/index.d.ts +1 -0
- package/dist/components/ui/tabs/tabs.d.ts +7 -0
- package/dist/components/ui/tabs/tabs.stories.d.ts +16 -0
- package/dist/components/ui/tabs-underline/index.d.ts +1 -0
- package/dist/components/ui/tabs-underline/tabs-underline.d.ts +7 -0
- package/dist/components/ui/tabs-underline/tabs-underline.stories.d.ts +16 -0
- package/dist/components/ui/textarea/index.d.ts +1 -0
- package/dist/components/ui/textarea/textarea.d.ts +3 -0
- package/dist/components/ui/textarea/textarea.stories.d.ts +21 -0
- package/dist/components/ui/toggle/index.d.ts +1 -0
- package/dist/components/ui/toggle/toggle.d.ts +9 -0
- package/dist/components/ui/toggle/toggle.stories.d.ts +21 -0
- package/dist/components/ui/tooltip/index.d.ts +1 -0
- package/dist/components/ui/tooltip/tooltip.d.ts +7 -0
- package/dist/components/ui/tooltip/tooltip.stories.d.ts +19 -0
- package/dist/components/ui/typography/index.d.ts +1 -0
- package/dist/components/ui/typography/typography.d.ts +8 -0
- package/dist/components/ui/typography/typography.stories.d.ts +33 -0
- package/dist/context-menu.cjs +1 -0
- package/dist/context-menu.js +427 -0
- package/dist/createLucideIcon-B_8CJpcQ.js +94 -0
- package/dist/createLucideIcon-CAtnV-yz.cjs +21 -0
- package/dist/custom-layered-styles.css +1 -0
- package/dist/dialog.cjs +1 -0
- package/dist/dialog.js +139 -0
- package/dist/dropdown-menu.cjs +1 -0
- package/dist/dropdown-menu.js +423 -0
- package/dist/field.cjs +1 -0
- package/dist/field.js +221 -0
- package/dist/fonts.css +1 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/use-portal-container.d.ts +31 -0
- package/dist/hover-card.cjs +1 -0
- package/dist/hover-card.js +210 -0
- package/dist/index-0ioNhtNM.js +10 -0
- package/dist/index-6oTEokEx.js +82 -0
- package/dist/index-B-NyefE0.js +243 -0
- package/dist/index-B-ZRqW0J.js +118 -0
- package/dist/index-B-cHTKrs.js +158 -0
- package/dist/index-BGQepRFJ.js +27 -0
- package/dist/index-BGiGvaq8.cjs +1 -0
- package/dist/index-BKbK2GzY.cjs +1 -0
- package/dist/index-BMitW9UR.cjs +1 -0
- package/dist/index-BRLtxFFr.cjs +1 -0
- package/dist/index-BWaO7kQK.cjs +1 -0
- package/dist/index-BZPx6jYI.js +8 -0
- package/dist/index-BpvjJ_T6.cjs +5 -0
- package/dist/index-C0UREtMP.js +59 -0
- package/dist/index-C329e3yQ.js +134 -0
- package/dist/index-C5wjudc-.js +36 -0
- package/dist/index-C8ni3LLa.cjs +1 -0
- package/dist/index-CAOY367Y.js +1540 -0
- package/dist/index-CCKe-Mpx.js +6 -0
- package/dist/index-CQhYMnjT.js +34 -0
- package/dist/index-Ce3QBKyj.cjs +1 -0
- package/dist/index-CezwiPd_.js +615 -0
- package/dist/index-Cv867SGx.js +13 -0
- package/dist/index-CwUFT-GQ.js +228 -0
- package/dist/index-CzY-WZXL.cjs +1 -0
- package/dist/index-D02K8KOB.js +54 -0
- package/dist/index-D3S7dBDI.cjs +1 -0
- package/dist/index-D3wSWKST.cjs +1 -0
- package/dist/index-D7hQvndv.cjs +1 -0
- package/dist/index-DQvx1rG_.cjs +1 -0
- package/dist/index-DXQ-7kNJ.cjs +41 -0
- package/dist/index-DYxWvftI.cjs +1 -0
- package/dist/index-DnS_sBBe.cjs +1 -0
- package/dist/index-DulPG3F9.js +179 -0
- package/dist/index-EUea2gfp.js +70 -0
- package/dist/index-FxyLF8MY.js +68 -0
- package/dist/index-IKJMQref.cjs +1 -0
- package/dist/index-MQ0c3ZX_.cjs +1 -0
- package/dist/index-P1sVIHE3.js +32 -0
- package/dist/index-VIUqZjyP.cjs +1 -0
- package/dist/index-WIv2ndLu.cjs +1 -0
- package/dist/index-bSPhqlcX.cjs +1 -0
- package/dist/index-cwZN7ZY3.cjs +1 -0
- package/dist/index-gO_QEiaK.cjs +1 -0
- package/dist/index-iAvn1gzj.cjs +1 -0
- package/dist/index-o0sNTcKe.js +674 -0
- package/dist/index-rKs9bXHr.js +6 -0
- package/dist/index-yR-v1A4G.js +15 -0
- package/dist/input-3MDa_DYk.cjs +1 -0
- package/dist/input-Cl7xmQYQ.js +22 -0
- package/dist/input-group.cjs +1 -0
- package/dist/input-group.js +152 -0
- package/dist/input.cjs +1 -0
- package/dist/input.js +4 -0
- package/dist/jsx-runtime-BB_1_6y_.cjs +22 -0
- package/dist/jsx-runtime-BzflLqGi.js +282 -0
- package/dist/kbd.cjs +1 -0
- package/dist/kbd.js +31 -0
- package/dist/label-MxqN87DQ.cjs +1 -0
- package/dist/label-hg_jN6Y8.js +35 -0
- package/dist/label.cjs +1 -0
- package/dist/label.js +4 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/minus-C0pHPx21.cjs +6 -0
- package/dist/minus-DE-onYs2.js +11 -0
- package/dist/pagination.cjs +6 -0
- package/dist/pagination.js +134 -0
- package/dist/popover-BBXe2myL.cjs +1 -0
- package/dist/popover-DNiRNCdn.js +263 -0
- package/dist/popover.cjs +1 -0
- package/dist/popover.js +7 -0
- package/dist/progress.cjs +6 -0
- package/dist/progress.js +137 -0
- package/dist/radio-group.cjs +1 -0
- package/dist/radio-group.js +271 -0
- package/dist/radius.css +1 -0
- package/dist/select.cjs +6 -0
- package/dist/select.js +987 -0
- package/dist/separator-C9kqOQR-.js +44 -0
- package/dist/separator-Dbx-SVIs.cjs +1 -0
- package/dist/separator.cjs +1 -0
- package/dist/separator.js +4 -0
- package/dist/sheet-0jRbqkzj.cjs +1 -0
- package/dist/sheet-RAbg4M5A.js +128 -0
- package/dist/sheet.cjs +1 -0
- package/dist/sheet.js +11 -0
- package/dist/sidebar.cjs +6 -0
- package/dist/sidebar.js +139 -0
- package/dist/skeleton.cjs +1 -0
- package/dist/skeleton.js +15 -0
- package/dist/slider.cjs +1 -0
- package/dist/slider.js +486 -0
- package/dist/space.css +1 -0
- package/dist/spinner.cjs +6 -0
- package/dist/spinner.js +24 -0
- package/dist/styles.css +1 -0
- package/dist/switch.cjs +1 -0
- package/dist/switch.js +154 -0
- package/dist/table.cjs +1 -0
- package/dist/table.js +115 -0
- package/dist/tabs-underline.cjs +1 -0
- package/dist/tabs-underline.js +68 -0
- package/dist/tabs.cjs +1 -0
- package/dist/tabs.js +68 -0
- package/dist/tailwind-animations.css +1 -0
- package/dist/tailwind-colors.css +1 -0
- package/dist/tailwind-fonts.css +1 -0
- package/dist/tailwind-radius.css +1 -0
- package/dist/tailwind-spacing.css +1 -0
- package/dist/tailwind-theme.css +1 -0
- package/dist/textarea-D76719tg.js +19 -0
- package/dist/textarea-UdELO_Jn.cjs +1 -0
- package/dist/textarea.cjs +1 -0
- package/dist/textarea.js +4 -0
- package/dist/themes.css +1 -0
- package/dist/toaster.cjs +1 -0
- package/dist/toaster.js +87 -0
- package/dist/toggle.cjs +1 -0
- package/dist/toggle.js +69 -0
- package/dist/tooltip.cjs +1 -0
- package/dist/tooltip.js +375 -0
- package/dist/types/theme.type.d.ts +2 -0
- package/dist/typography.cjs +1 -0
- package/dist/typography.js +34 -0
- package/dist/use-portal-container.cjs +1 -0
- package/dist/use-portal-container.js +21 -0
- package/dist/utils-CRiPKpXj.js +2743 -0
- package/dist/utils-DoxiiusW.cjs +1 -0
- package/dist/x-CBKgg4YL.cjs +6 -0
- package/dist/x-Dl66o_vF.js +14 -0
- package/package.json +275 -0
package/dist/select.js
ADDED
|
@@ -0,0 +1,987 @@
|
|
|
1
|
+
import { j as n } from "./jsx-runtime-BzflLqGi.js";
|
|
2
|
+
import * as r from "react";
|
|
3
|
+
import * as Ne from "react-dom";
|
|
4
|
+
import { c as Te } from "./index-rKs9bXHr.js";
|
|
5
|
+
import { u as Pe, c as P } from "./index-C0UREtMP.js";
|
|
6
|
+
import { u as at, c as st } from "./index-D02K8KOB.js";
|
|
7
|
+
import { u as L, a as lt } from "./index-6oTEokEx.js";
|
|
8
|
+
import { c as ct } from "./index-FxyLF8MY.js";
|
|
9
|
+
import { D as it } from "./index-C329e3yQ.js";
|
|
10
|
+
import { h as dt, u as ut, R as pt, F as mt } from "./index-o0sNTcKe.js";
|
|
11
|
+
import { u as Ie } from "./index-Cv867SGx.js";
|
|
12
|
+
import { c as Re, R as ft, A as ht, C as vt, a as gt } from "./index-CAOY367Y.js";
|
|
13
|
+
import { P as xt } from "./index-yR-v1A4G.js";
|
|
14
|
+
import { P as j } from "./index-C5wjudc-.js";
|
|
15
|
+
import { u as St } from "./index-0ioNhtNM.js";
|
|
16
|
+
import { u as $ } from "./index-CCKe-Mpx.js";
|
|
17
|
+
import { u as wt } from "./index-BZPx6jYI.js";
|
|
18
|
+
import { a as Ct } from "./index-P1sVIHE3.js";
|
|
19
|
+
import { c as G } from "./utils-CRiPKpXj.js";
|
|
20
|
+
import { C as yt } from "./check-Ci0GjV-B.js";
|
|
21
|
+
import { C as _e } from "./chevron-down-CpVS2Z7w.js";
|
|
22
|
+
import { c as It } from "./createLucideIcon-B_8CJpcQ.js";
|
|
23
|
+
/**
|
|
24
|
+
* @license lucide-react v0.546.0 - ISC
|
|
25
|
+
*
|
|
26
|
+
* This source code is licensed under the ISC license.
|
|
27
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
28
|
+
*/
|
|
29
|
+
const bt = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]], Tt = It("chevron-up", bt);
|
|
30
|
+
var Pt = [" ", "Enter", "ArrowUp", "ArrowDown"], Nt = [" ", "Enter"], Q = "Select", [ie, de, Rt] = st(Q), [oe] = ct(Q, [
|
|
31
|
+
Rt,
|
|
32
|
+
Re
|
|
33
|
+
]), ue = Re(), [_t, Y] = oe(Q), [Et, jt] = oe(Q), Ee = (t) => {
|
|
34
|
+
const {
|
|
35
|
+
__scopeSelect: o,
|
|
36
|
+
children: e,
|
|
37
|
+
open: c,
|
|
38
|
+
defaultOpen: s,
|
|
39
|
+
onOpenChange: u,
|
|
40
|
+
value: a,
|
|
41
|
+
defaultValue: l,
|
|
42
|
+
onValueChange: i,
|
|
43
|
+
dir: m,
|
|
44
|
+
name: g,
|
|
45
|
+
autoComplete: w,
|
|
46
|
+
disabled: N,
|
|
47
|
+
required: b,
|
|
48
|
+
form: y
|
|
49
|
+
} = t, d = ue(o), [h, x] = r.useState(null), [f, v] = r.useState(null), [U, M] = r.useState(!1), ne = at(m), [R, O] = Pe({
|
|
50
|
+
prop: c,
|
|
51
|
+
defaultProp: s ?? !1,
|
|
52
|
+
onChange: u,
|
|
53
|
+
caller: Q
|
|
54
|
+
}), [W, X] = Pe({
|
|
55
|
+
prop: a,
|
|
56
|
+
defaultProp: l,
|
|
57
|
+
onChange: i,
|
|
58
|
+
caller: Q
|
|
59
|
+
}), k = r.useRef(null), B = h ? y || !!h.closest("form") : !0, [z, V] = r.useState(/* @__PURE__ */ new Set()), H = Array.from(z).map((_) => _.props.value).join(";");
|
|
60
|
+
return /* @__PURE__ */ n.jsx(ft, { ...d, children: /* @__PURE__ */ n.jsxs(
|
|
61
|
+
_t,
|
|
62
|
+
{
|
|
63
|
+
required: b,
|
|
64
|
+
scope: o,
|
|
65
|
+
trigger: h,
|
|
66
|
+
onTriggerChange: x,
|
|
67
|
+
valueNode: f,
|
|
68
|
+
onValueNodeChange: v,
|
|
69
|
+
valueNodeHasChildren: U,
|
|
70
|
+
onValueNodeHasChildrenChange: M,
|
|
71
|
+
contentId: Ie(),
|
|
72
|
+
value: W,
|
|
73
|
+
onValueChange: X,
|
|
74
|
+
open: R,
|
|
75
|
+
onOpenChange: O,
|
|
76
|
+
dir: ne,
|
|
77
|
+
triggerPointerDownPosRef: k,
|
|
78
|
+
disabled: N,
|
|
79
|
+
children: [
|
|
80
|
+
/* @__PURE__ */ n.jsx(ie.Provider, { scope: o, children: /* @__PURE__ */ n.jsx(
|
|
81
|
+
Et,
|
|
82
|
+
{
|
|
83
|
+
scope: t.__scopeSelect,
|
|
84
|
+
onNativeOptionAdd: r.useCallback((_) => {
|
|
85
|
+
V((D) => new Set(D).add(_));
|
|
86
|
+
}, []),
|
|
87
|
+
onNativeOptionRemove: r.useCallback((_) => {
|
|
88
|
+
V((D) => {
|
|
89
|
+
const F = new Set(D);
|
|
90
|
+
return F.delete(_), F;
|
|
91
|
+
});
|
|
92
|
+
}, []),
|
|
93
|
+
children: e
|
|
94
|
+
}
|
|
95
|
+
) }),
|
|
96
|
+
B ? /* @__PURE__ */ n.jsxs(
|
|
97
|
+
tt,
|
|
98
|
+
{
|
|
99
|
+
"aria-hidden": !0,
|
|
100
|
+
required: b,
|
|
101
|
+
tabIndex: -1,
|
|
102
|
+
name: g,
|
|
103
|
+
autoComplete: w,
|
|
104
|
+
value: W,
|
|
105
|
+
onChange: (_) => X(_.target.value),
|
|
106
|
+
disabled: N,
|
|
107
|
+
form: y,
|
|
108
|
+
children: [
|
|
109
|
+
W === void 0 ? /* @__PURE__ */ n.jsx("option", { value: "" }) : null,
|
|
110
|
+
Array.from(z)
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
H
|
|
114
|
+
) : null
|
|
115
|
+
]
|
|
116
|
+
}
|
|
117
|
+
) });
|
|
118
|
+
};
|
|
119
|
+
Ee.displayName = Q;
|
|
120
|
+
var je = "SelectTrigger", Me = r.forwardRef(
|
|
121
|
+
(t, o) => {
|
|
122
|
+
const { __scopeSelect: e, disabled: c = !1, ...s } = t, u = ue(e), a = Y(je, e), l = a.disabled || c, i = L(o, a.onTriggerChange), m = de(e), g = r.useRef("touch"), [w, N, b] = nt((d) => {
|
|
123
|
+
const h = m().filter((v) => !v.disabled), x = h.find((v) => v.value === a.value), f = rt(h, d, x);
|
|
124
|
+
f !== void 0 && a.onValueChange(f.value);
|
|
125
|
+
}), y = (d) => {
|
|
126
|
+
l || (a.onOpenChange(!0), b()), d && (a.triggerPointerDownPosRef.current = {
|
|
127
|
+
x: Math.round(d.pageX),
|
|
128
|
+
y: Math.round(d.pageY)
|
|
129
|
+
});
|
|
130
|
+
};
|
|
131
|
+
return /* @__PURE__ */ n.jsx(ht, { asChild: !0, ...u, children: /* @__PURE__ */ n.jsx(
|
|
132
|
+
j.button,
|
|
133
|
+
{
|
|
134
|
+
type: "button",
|
|
135
|
+
role: "combobox",
|
|
136
|
+
"aria-controls": a.contentId,
|
|
137
|
+
"aria-expanded": a.open,
|
|
138
|
+
"aria-required": a.required,
|
|
139
|
+
"aria-autocomplete": "none",
|
|
140
|
+
dir: a.dir,
|
|
141
|
+
"data-state": a.open ? "open" : "closed",
|
|
142
|
+
disabled: l,
|
|
143
|
+
"data-disabled": l ? "" : void 0,
|
|
144
|
+
"data-placeholder": ot(a.value) ? "" : void 0,
|
|
145
|
+
...s,
|
|
146
|
+
ref: i,
|
|
147
|
+
onClick: P(s.onClick, (d) => {
|
|
148
|
+
d.currentTarget.focus(), g.current !== "mouse" && y(d);
|
|
149
|
+
}),
|
|
150
|
+
onPointerDown: P(s.onPointerDown, (d) => {
|
|
151
|
+
g.current = d.pointerType;
|
|
152
|
+
const h = d.target;
|
|
153
|
+
h.hasPointerCapture(d.pointerId) && h.releasePointerCapture(d.pointerId), d.button === 0 && d.ctrlKey === !1 && d.pointerType === "mouse" && (y(d), d.preventDefault());
|
|
154
|
+
}),
|
|
155
|
+
onKeyDown: P(s.onKeyDown, (d) => {
|
|
156
|
+
const h = w.current !== "";
|
|
157
|
+
!(d.ctrlKey || d.altKey || d.metaKey) && d.key.length === 1 && N(d.key), !(h && d.key === " ") && Pt.includes(d.key) && (y(), d.preventDefault());
|
|
158
|
+
})
|
|
159
|
+
}
|
|
160
|
+
) });
|
|
161
|
+
}
|
|
162
|
+
);
|
|
163
|
+
Me.displayName = je;
|
|
164
|
+
var Ae = "SelectValue", Oe = r.forwardRef(
|
|
165
|
+
(t, o) => {
|
|
166
|
+
const { __scopeSelect: e, className: c, style: s, children: u, placeholder: a = "", ...l } = t, i = Y(Ae, e), { onValueNodeHasChildrenChange: m } = i, g = u !== void 0, w = L(o, i.onValueNodeChange);
|
|
167
|
+
return $(() => {
|
|
168
|
+
m(g);
|
|
169
|
+
}, [m, g]), /* @__PURE__ */ n.jsx(
|
|
170
|
+
j.span,
|
|
171
|
+
{
|
|
172
|
+
...l,
|
|
173
|
+
ref: w,
|
|
174
|
+
style: { pointerEvents: "none" },
|
|
175
|
+
children: ot(i.value) ? /* @__PURE__ */ n.jsx(n.Fragment, { children: a }) : u
|
|
176
|
+
}
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
);
|
|
180
|
+
Oe.displayName = Ae;
|
|
181
|
+
var Mt = "SelectIcon", De = r.forwardRef(
|
|
182
|
+
(t, o) => {
|
|
183
|
+
const { __scopeSelect: e, children: c, ...s } = t;
|
|
184
|
+
return /* @__PURE__ */ n.jsx(j.span, { "aria-hidden": !0, ...s, ref: o, children: c || "▼" });
|
|
185
|
+
}
|
|
186
|
+
);
|
|
187
|
+
De.displayName = Mt;
|
|
188
|
+
var At = "SelectPortal", Le = (t) => /* @__PURE__ */ n.jsx(xt, { asChild: !0, ...t });
|
|
189
|
+
Le.displayName = At;
|
|
190
|
+
var ee = "SelectContent", ke = r.forwardRef(
|
|
191
|
+
(t, o) => {
|
|
192
|
+
const e = Y(ee, t.__scopeSelect), [c, s] = r.useState();
|
|
193
|
+
if ($(() => {
|
|
194
|
+
s(new DocumentFragment());
|
|
195
|
+
}, []), !e.open) {
|
|
196
|
+
const u = c;
|
|
197
|
+
return u ? Ne.createPortal(
|
|
198
|
+
/* @__PURE__ */ n.jsx(Be, { scope: t.__scopeSelect, children: /* @__PURE__ */ n.jsx(ie.Slot, { scope: t.__scopeSelect, children: /* @__PURE__ */ n.jsx("div", { children: t.children }) }) }),
|
|
199
|
+
u
|
|
200
|
+
) : null;
|
|
201
|
+
}
|
|
202
|
+
return /* @__PURE__ */ n.jsx(Ve, { ...t, ref: o });
|
|
203
|
+
}
|
|
204
|
+
);
|
|
205
|
+
ke.displayName = ee;
|
|
206
|
+
var A = 10, [Be, q] = oe(ee), Ot = "SelectContentImpl", Dt = lt("SelectContent.RemoveScroll"), Ve = r.forwardRef(
|
|
207
|
+
(t, o) => {
|
|
208
|
+
const {
|
|
209
|
+
__scopeSelect: e,
|
|
210
|
+
position: c = "item-aligned",
|
|
211
|
+
onCloseAutoFocus: s,
|
|
212
|
+
onEscapeKeyDown: u,
|
|
213
|
+
onPointerDownOutside: a,
|
|
214
|
+
//
|
|
215
|
+
// PopperContent props
|
|
216
|
+
side: l,
|
|
217
|
+
sideOffset: i,
|
|
218
|
+
align: m,
|
|
219
|
+
alignOffset: g,
|
|
220
|
+
arrowPadding: w,
|
|
221
|
+
collisionBoundary: N,
|
|
222
|
+
collisionPadding: b,
|
|
223
|
+
sticky: y,
|
|
224
|
+
hideWhenDetached: d,
|
|
225
|
+
avoidCollisions: h,
|
|
226
|
+
//
|
|
227
|
+
...x
|
|
228
|
+
} = t, f = Y(ee, e), [v, U] = r.useState(null), [M, ne] = r.useState(null), R = L(o, (p) => U(p)), [O, W] = r.useState(null), [X, k] = r.useState(
|
|
229
|
+
null
|
|
230
|
+
), B = de(e), [z, V] = r.useState(!1), H = r.useRef(!1);
|
|
231
|
+
r.useEffect(() => {
|
|
232
|
+
if (v) return dt(v);
|
|
233
|
+
}, [v]), ut();
|
|
234
|
+
const _ = r.useCallback(
|
|
235
|
+
(p) => {
|
|
236
|
+
const [I, ...E] = B().map((T) => T.ref.current), [S] = E.slice(-1), C = document.activeElement;
|
|
237
|
+
for (const T of p)
|
|
238
|
+
if (T === C || (T?.scrollIntoView({ block: "nearest" }), T === I && M && (M.scrollTop = 0), T === S && M && (M.scrollTop = M.scrollHeight), T?.focus(), document.activeElement !== C)) return;
|
|
239
|
+
},
|
|
240
|
+
[B, M]
|
|
241
|
+
), D = r.useCallback(
|
|
242
|
+
() => _([O, v]),
|
|
243
|
+
[_, O, v]
|
|
244
|
+
);
|
|
245
|
+
r.useEffect(() => {
|
|
246
|
+
z && D();
|
|
247
|
+
}, [z, D]);
|
|
248
|
+
const { onOpenChange: F, triggerPointerDownPosRef: K } = f;
|
|
249
|
+
r.useEffect(() => {
|
|
250
|
+
if (v) {
|
|
251
|
+
let p = { x: 0, y: 0 };
|
|
252
|
+
const I = (S) => {
|
|
253
|
+
p = {
|
|
254
|
+
x: Math.abs(Math.round(S.pageX) - (K.current?.x ?? 0)),
|
|
255
|
+
y: Math.abs(Math.round(S.pageY) - (K.current?.y ?? 0))
|
|
256
|
+
};
|
|
257
|
+
}, E = (S) => {
|
|
258
|
+
p.x <= 10 && p.y <= 10 ? S.preventDefault() : v.contains(S.target) || F(!1), document.removeEventListener("pointermove", I), K.current = null;
|
|
259
|
+
};
|
|
260
|
+
return K.current !== null && (document.addEventListener("pointermove", I), document.addEventListener("pointerup", E, { capture: !0, once: !0 })), () => {
|
|
261
|
+
document.removeEventListener("pointermove", I), document.removeEventListener("pointerup", E, { capture: !0 });
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
}, [v, F, K]), r.useEffect(() => {
|
|
265
|
+
const p = () => F(!1);
|
|
266
|
+
return window.addEventListener("blur", p), window.addEventListener("resize", p), () => {
|
|
267
|
+
window.removeEventListener("blur", p), window.removeEventListener("resize", p);
|
|
268
|
+
};
|
|
269
|
+
}, [F]);
|
|
270
|
+
const [pe, se] = nt((p) => {
|
|
271
|
+
const I = B().filter((C) => !C.disabled), E = I.find((C) => C.ref.current === document.activeElement), S = rt(I, p, E);
|
|
272
|
+
S && setTimeout(() => S.ref.current.focus());
|
|
273
|
+
}), me = r.useCallback(
|
|
274
|
+
(p, I, E) => {
|
|
275
|
+
const S = !H.current && !E;
|
|
276
|
+
(f.value !== void 0 && f.value === I || S) && (W(p), S && (H.current = !0));
|
|
277
|
+
},
|
|
278
|
+
[f.value]
|
|
279
|
+
), fe = r.useCallback(() => v?.focus(), [v]), te = r.useCallback(
|
|
280
|
+
(p, I, E) => {
|
|
281
|
+
const S = !H.current && !E;
|
|
282
|
+
(f.value !== void 0 && f.value === I || S) && k(p);
|
|
283
|
+
},
|
|
284
|
+
[f.value]
|
|
285
|
+
), le = c === "popper" ? xe : He, re = le === xe ? {
|
|
286
|
+
side: l,
|
|
287
|
+
sideOffset: i,
|
|
288
|
+
align: m,
|
|
289
|
+
alignOffset: g,
|
|
290
|
+
arrowPadding: w,
|
|
291
|
+
collisionBoundary: N,
|
|
292
|
+
collisionPadding: b,
|
|
293
|
+
sticky: y,
|
|
294
|
+
hideWhenDetached: d,
|
|
295
|
+
avoidCollisions: h
|
|
296
|
+
} : {};
|
|
297
|
+
return /* @__PURE__ */ n.jsx(
|
|
298
|
+
Be,
|
|
299
|
+
{
|
|
300
|
+
scope: e,
|
|
301
|
+
content: v,
|
|
302
|
+
viewport: M,
|
|
303
|
+
onViewportChange: ne,
|
|
304
|
+
itemRefCallback: me,
|
|
305
|
+
selectedItem: O,
|
|
306
|
+
onItemLeave: fe,
|
|
307
|
+
itemTextRefCallback: te,
|
|
308
|
+
focusSelectedItem: D,
|
|
309
|
+
selectedItemText: X,
|
|
310
|
+
position: c,
|
|
311
|
+
isPositioned: z,
|
|
312
|
+
searchRef: pe,
|
|
313
|
+
children: /* @__PURE__ */ n.jsx(pt, { as: Dt, allowPinchZoom: !0, children: /* @__PURE__ */ n.jsx(
|
|
314
|
+
mt,
|
|
315
|
+
{
|
|
316
|
+
asChild: !0,
|
|
317
|
+
trapped: f.open,
|
|
318
|
+
onMountAutoFocus: (p) => {
|
|
319
|
+
p.preventDefault();
|
|
320
|
+
},
|
|
321
|
+
onUnmountAutoFocus: P(s, (p) => {
|
|
322
|
+
f.trigger?.focus({ preventScroll: !0 }), p.preventDefault();
|
|
323
|
+
}),
|
|
324
|
+
children: /* @__PURE__ */ n.jsx(
|
|
325
|
+
it,
|
|
326
|
+
{
|
|
327
|
+
asChild: !0,
|
|
328
|
+
disableOutsidePointerEvents: !0,
|
|
329
|
+
onEscapeKeyDown: u,
|
|
330
|
+
onPointerDownOutside: a,
|
|
331
|
+
onFocusOutside: (p) => p.preventDefault(),
|
|
332
|
+
onDismiss: () => f.onOpenChange(!1),
|
|
333
|
+
children: /* @__PURE__ */ n.jsx(
|
|
334
|
+
le,
|
|
335
|
+
{
|
|
336
|
+
role: "listbox",
|
|
337
|
+
id: f.contentId,
|
|
338
|
+
"data-state": f.open ? "open" : "closed",
|
|
339
|
+
dir: f.dir,
|
|
340
|
+
onContextMenu: (p) => p.preventDefault(),
|
|
341
|
+
...x,
|
|
342
|
+
...re,
|
|
343
|
+
onPlaced: () => V(!0),
|
|
344
|
+
ref: R,
|
|
345
|
+
style: {
|
|
346
|
+
// flex layout so we can place the scroll buttons properly
|
|
347
|
+
display: "flex",
|
|
348
|
+
flexDirection: "column",
|
|
349
|
+
// reset the outline by default as the content MAY get focused
|
|
350
|
+
outline: "none",
|
|
351
|
+
...x.style
|
|
352
|
+
},
|
|
353
|
+
onKeyDown: P(x.onKeyDown, (p) => {
|
|
354
|
+
const I = p.ctrlKey || p.altKey || p.metaKey;
|
|
355
|
+
if (p.key === "Tab" && p.preventDefault(), !I && p.key.length === 1 && se(p.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(p.key)) {
|
|
356
|
+
let S = B().filter((C) => !C.disabled).map((C) => C.ref.current);
|
|
357
|
+
if (["ArrowUp", "End"].includes(p.key) && (S = S.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(p.key)) {
|
|
358
|
+
const C = p.target, T = S.indexOf(C);
|
|
359
|
+
S = S.slice(T + 1);
|
|
360
|
+
}
|
|
361
|
+
setTimeout(() => _(S)), p.preventDefault();
|
|
362
|
+
}
|
|
363
|
+
})
|
|
364
|
+
}
|
|
365
|
+
)
|
|
366
|
+
}
|
|
367
|
+
)
|
|
368
|
+
}
|
|
369
|
+
) })
|
|
370
|
+
}
|
|
371
|
+
);
|
|
372
|
+
}
|
|
373
|
+
);
|
|
374
|
+
Ve.displayName = Ot;
|
|
375
|
+
var Lt = "SelectItemAlignedPosition", He = r.forwardRef((t, o) => {
|
|
376
|
+
const { __scopeSelect: e, onPlaced: c, ...s } = t, u = Y(ee, e), a = q(ee, e), [l, i] = r.useState(null), [m, g] = r.useState(null), w = L(o, (R) => g(R)), N = de(e), b = r.useRef(!1), y = r.useRef(!0), { viewport: d, selectedItem: h, selectedItemText: x, focusSelectedItem: f } = a, v = r.useCallback(() => {
|
|
377
|
+
if (u.trigger && u.valueNode && l && m && d && h && x) {
|
|
378
|
+
const R = u.trigger.getBoundingClientRect(), O = m.getBoundingClientRect(), W = u.valueNode.getBoundingClientRect(), X = x.getBoundingClientRect();
|
|
379
|
+
if (u.dir !== "rtl") {
|
|
380
|
+
const C = X.left - O.left, T = W.left - C, Z = R.left - T, J = R.width + Z, he = Math.max(J, O.width), ve = window.innerWidth - A, ge = Te(T, [
|
|
381
|
+
A,
|
|
382
|
+
// Prevents the content from going off the starting edge of the
|
|
383
|
+
// viewport. It may still go off the ending edge, but this can be
|
|
384
|
+
// controlled by the user since they may want to manage overflow in a
|
|
385
|
+
// specific way.
|
|
386
|
+
// https://github.com/radix-ui/primitives/issues/2049
|
|
387
|
+
Math.max(A, ve - he)
|
|
388
|
+
]);
|
|
389
|
+
l.style.minWidth = J + "px", l.style.left = ge + "px";
|
|
390
|
+
} else {
|
|
391
|
+
const C = O.right - X.right, T = window.innerWidth - W.right - C, Z = window.innerWidth - R.right - T, J = R.width + Z, he = Math.max(J, O.width), ve = window.innerWidth - A, ge = Te(T, [
|
|
392
|
+
A,
|
|
393
|
+
Math.max(A, ve - he)
|
|
394
|
+
]);
|
|
395
|
+
l.style.minWidth = J + "px", l.style.right = ge + "px";
|
|
396
|
+
}
|
|
397
|
+
const k = N(), B = window.innerHeight - A * 2, z = d.scrollHeight, V = window.getComputedStyle(m), H = parseInt(V.borderTopWidth, 10), _ = parseInt(V.paddingTop, 10), D = parseInt(V.borderBottomWidth, 10), F = parseInt(V.paddingBottom, 10), K = H + _ + z + F + D, pe = Math.min(h.offsetHeight * 5, K), se = window.getComputedStyle(d), me = parseInt(se.paddingTop, 10), fe = parseInt(se.paddingBottom, 10), te = R.top + R.height / 2 - A, le = B - te, re = h.offsetHeight / 2, p = h.offsetTop + re, I = H + _ + p, E = K - I;
|
|
398
|
+
if (I <= te) {
|
|
399
|
+
const C = k.length > 0 && h === k[k.length - 1].ref.current;
|
|
400
|
+
l.style.bottom = "0px";
|
|
401
|
+
const T = m.clientHeight - d.offsetTop - d.offsetHeight, Z = Math.max(
|
|
402
|
+
le,
|
|
403
|
+
re + // viewport might have padding bottom, include it to avoid a scrollable viewport
|
|
404
|
+
(C ? fe : 0) + T + D
|
|
405
|
+
), J = I + Z;
|
|
406
|
+
l.style.height = J + "px";
|
|
407
|
+
} else {
|
|
408
|
+
const C = k.length > 0 && h === k[0].ref.current;
|
|
409
|
+
l.style.top = "0px";
|
|
410
|
+
const Z = Math.max(
|
|
411
|
+
te,
|
|
412
|
+
H + d.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
|
|
413
|
+
(C ? me : 0) + re
|
|
414
|
+
) + E;
|
|
415
|
+
l.style.height = Z + "px", d.scrollTop = I - te + d.offsetTop;
|
|
416
|
+
}
|
|
417
|
+
l.style.margin = `${A}px 0`, l.style.minHeight = pe + "px", l.style.maxHeight = B + "px", c?.(), requestAnimationFrame(() => b.current = !0);
|
|
418
|
+
}
|
|
419
|
+
}, [
|
|
420
|
+
N,
|
|
421
|
+
u.trigger,
|
|
422
|
+
u.valueNode,
|
|
423
|
+
l,
|
|
424
|
+
m,
|
|
425
|
+
d,
|
|
426
|
+
h,
|
|
427
|
+
x,
|
|
428
|
+
u.dir,
|
|
429
|
+
c
|
|
430
|
+
]);
|
|
431
|
+
$(() => v(), [v]);
|
|
432
|
+
const [U, M] = r.useState();
|
|
433
|
+
$(() => {
|
|
434
|
+
m && M(window.getComputedStyle(m).zIndex);
|
|
435
|
+
}, [m]);
|
|
436
|
+
const ne = r.useCallback(
|
|
437
|
+
(R) => {
|
|
438
|
+
R && y.current === !0 && (v(), f?.(), y.current = !1);
|
|
439
|
+
},
|
|
440
|
+
[v, f]
|
|
441
|
+
);
|
|
442
|
+
return /* @__PURE__ */ n.jsx(
|
|
443
|
+
Bt,
|
|
444
|
+
{
|
|
445
|
+
scope: e,
|
|
446
|
+
contentWrapper: l,
|
|
447
|
+
shouldExpandOnScrollRef: b,
|
|
448
|
+
onScrollButtonChange: ne,
|
|
449
|
+
children: /* @__PURE__ */ n.jsx(
|
|
450
|
+
"div",
|
|
451
|
+
{
|
|
452
|
+
ref: i,
|
|
453
|
+
style: {
|
|
454
|
+
display: "flex",
|
|
455
|
+
flexDirection: "column",
|
|
456
|
+
position: "fixed",
|
|
457
|
+
zIndex: U
|
|
458
|
+
},
|
|
459
|
+
children: /* @__PURE__ */ n.jsx(
|
|
460
|
+
j.div,
|
|
461
|
+
{
|
|
462
|
+
...s,
|
|
463
|
+
ref: w,
|
|
464
|
+
style: {
|
|
465
|
+
// When we get the height of the content, it includes borders. If we were to set
|
|
466
|
+
// the height without having `boxSizing: 'border-box'` it would be too big.
|
|
467
|
+
boxSizing: "border-box",
|
|
468
|
+
// We need to ensure the content doesn't get taller than the wrapper
|
|
469
|
+
maxHeight: "100%",
|
|
470
|
+
...s.style
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
)
|
|
474
|
+
}
|
|
475
|
+
)
|
|
476
|
+
}
|
|
477
|
+
);
|
|
478
|
+
});
|
|
479
|
+
He.displayName = Lt;
|
|
480
|
+
var kt = "SelectPopperPosition", xe = r.forwardRef((t, o) => {
|
|
481
|
+
const {
|
|
482
|
+
__scopeSelect: e,
|
|
483
|
+
align: c = "start",
|
|
484
|
+
collisionPadding: s = A,
|
|
485
|
+
...u
|
|
486
|
+
} = t, a = ue(e);
|
|
487
|
+
return /* @__PURE__ */ n.jsx(
|
|
488
|
+
vt,
|
|
489
|
+
{
|
|
490
|
+
...a,
|
|
491
|
+
...u,
|
|
492
|
+
ref: o,
|
|
493
|
+
align: c,
|
|
494
|
+
collisionPadding: s,
|
|
495
|
+
style: {
|
|
496
|
+
// Ensure border-box for floating-ui calculations
|
|
497
|
+
boxSizing: "border-box",
|
|
498
|
+
...u.style,
|
|
499
|
+
"--radix-select-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
500
|
+
"--radix-select-content-available-width": "var(--radix-popper-available-width)",
|
|
501
|
+
"--radix-select-content-available-height": "var(--radix-popper-available-height)",
|
|
502
|
+
"--radix-select-trigger-width": "var(--radix-popper-anchor-width)",
|
|
503
|
+
"--radix-select-trigger-height": "var(--radix-popper-anchor-height)"
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
);
|
|
507
|
+
});
|
|
508
|
+
xe.displayName = kt;
|
|
509
|
+
var [Bt, be] = oe(ee, {}), Se = "SelectViewport", Fe = r.forwardRef(
|
|
510
|
+
(t, o) => {
|
|
511
|
+
const { __scopeSelect: e, nonce: c, ...s } = t, u = q(Se, e), a = be(Se, e), l = L(o, u.onViewportChange), i = r.useRef(0);
|
|
512
|
+
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
513
|
+
/* @__PURE__ */ n.jsx(
|
|
514
|
+
"style",
|
|
515
|
+
{
|
|
516
|
+
dangerouslySetInnerHTML: {
|
|
517
|
+
__html: "[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"
|
|
518
|
+
},
|
|
519
|
+
nonce: c
|
|
520
|
+
}
|
|
521
|
+
),
|
|
522
|
+
/* @__PURE__ */ n.jsx(ie.Slot, { scope: e, children: /* @__PURE__ */ n.jsx(
|
|
523
|
+
j.div,
|
|
524
|
+
{
|
|
525
|
+
"data-radix-select-viewport": "",
|
|
526
|
+
role: "presentation",
|
|
527
|
+
...s,
|
|
528
|
+
ref: l,
|
|
529
|
+
style: {
|
|
530
|
+
// we use position: 'relative' here on the `viewport` so that when we call
|
|
531
|
+
// `selectedItem.offsetTop` in calculations, the offset is relative to the viewport
|
|
532
|
+
// (independent of the scrollUpButton).
|
|
533
|
+
position: "relative",
|
|
534
|
+
flex: 1,
|
|
535
|
+
// Viewport should only be scrollable in the vertical direction.
|
|
536
|
+
// This won't work in vertical writing modes, so we'll need to
|
|
537
|
+
// revisit this if/when that is supported
|
|
538
|
+
// https://developer.chrome.com/blog/vertical-form-controls
|
|
539
|
+
overflow: "hidden auto",
|
|
540
|
+
...s.style
|
|
541
|
+
},
|
|
542
|
+
onScroll: P(s.onScroll, (m) => {
|
|
543
|
+
const g = m.currentTarget, { contentWrapper: w, shouldExpandOnScrollRef: N } = a;
|
|
544
|
+
if (N?.current && w) {
|
|
545
|
+
const b = Math.abs(i.current - g.scrollTop);
|
|
546
|
+
if (b > 0) {
|
|
547
|
+
const y = window.innerHeight - A * 2, d = parseFloat(w.style.minHeight), h = parseFloat(w.style.height), x = Math.max(d, h);
|
|
548
|
+
if (x < y) {
|
|
549
|
+
const f = x + b, v = Math.min(y, f), U = f - v;
|
|
550
|
+
w.style.height = v + "px", w.style.bottom === "0px" && (g.scrollTop = U > 0 ? U : 0, w.style.justifyContent = "flex-end");
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
i.current = g.scrollTop;
|
|
555
|
+
})
|
|
556
|
+
}
|
|
557
|
+
) })
|
|
558
|
+
] });
|
|
559
|
+
}
|
|
560
|
+
);
|
|
561
|
+
Fe.displayName = Se;
|
|
562
|
+
var Ue = "SelectGroup", [Vt, Ht] = oe(Ue), We = r.forwardRef(
|
|
563
|
+
(t, o) => {
|
|
564
|
+
const { __scopeSelect: e, ...c } = t, s = Ie();
|
|
565
|
+
return /* @__PURE__ */ n.jsx(Vt, { scope: e, id: s, children: /* @__PURE__ */ n.jsx(j.div, { role: "group", "aria-labelledby": s, ...c, ref: o }) });
|
|
566
|
+
}
|
|
567
|
+
);
|
|
568
|
+
We.displayName = Ue;
|
|
569
|
+
var ze = "SelectLabel", Ke = r.forwardRef(
|
|
570
|
+
(t, o) => {
|
|
571
|
+
const { __scopeSelect: e, ...c } = t, s = Ht(ze, e);
|
|
572
|
+
return /* @__PURE__ */ n.jsx(j.div, { id: s.id, ...c, ref: o });
|
|
573
|
+
}
|
|
574
|
+
);
|
|
575
|
+
Ke.displayName = ze;
|
|
576
|
+
var ce = "SelectItem", [Ft, $e] = oe(ce), Ge = r.forwardRef(
|
|
577
|
+
(t, o) => {
|
|
578
|
+
const {
|
|
579
|
+
__scopeSelect: e,
|
|
580
|
+
value: c,
|
|
581
|
+
disabled: s = !1,
|
|
582
|
+
textValue: u,
|
|
583
|
+
...a
|
|
584
|
+
} = t, l = Y(ce, e), i = q(ce, e), m = l.value === c, [g, w] = r.useState(u ?? ""), [N, b] = r.useState(!1), y = L(
|
|
585
|
+
o,
|
|
586
|
+
(f) => i.itemRefCallback?.(f, c, s)
|
|
587
|
+
), d = Ie(), h = r.useRef("touch"), x = () => {
|
|
588
|
+
s || (l.onValueChange(c), l.onOpenChange(!1));
|
|
589
|
+
};
|
|
590
|
+
if (c === "")
|
|
591
|
+
throw new Error(
|
|
592
|
+
"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."
|
|
593
|
+
);
|
|
594
|
+
return /* @__PURE__ */ n.jsx(
|
|
595
|
+
Ft,
|
|
596
|
+
{
|
|
597
|
+
scope: e,
|
|
598
|
+
value: c,
|
|
599
|
+
disabled: s,
|
|
600
|
+
textId: d,
|
|
601
|
+
isSelected: m,
|
|
602
|
+
onItemTextChange: r.useCallback((f) => {
|
|
603
|
+
w((v) => v || (f?.textContent ?? "").trim());
|
|
604
|
+
}, []),
|
|
605
|
+
children: /* @__PURE__ */ n.jsx(
|
|
606
|
+
ie.ItemSlot,
|
|
607
|
+
{
|
|
608
|
+
scope: e,
|
|
609
|
+
value: c,
|
|
610
|
+
disabled: s,
|
|
611
|
+
textValue: g,
|
|
612
|
+
children: /* @__PURE__ */ n.jsx(
|
|
613
|
+
j.div,
|
|
614
|
+
{
|
|
615
|
+
role: "option",
|
|
616
|
+
"aria-labelledby": d,
|
|
617
|
+
"data-highlighted": N ? "" : void 0,
|
|
618
|
+
"aria-selected": m && N,
|
|
619
|
+
"data-state": m ? "checked" : "unchecked",
|
|
620
|
+
"aria-disabled": s || void 0,
|
|
621
|
+
"data-disabled": s ? "" : void 0,
|
|
622
|
+
tabIndex: s ? void 0 : -1,
|
|
623
|
+
...a,
|
|
624
|
+
ref: y,
|
|
625
|
+
onFocus: P(a.onFocus, () => b(!0)),
|
|
626
|
+
onBlur: P(a.onBlur, () => b(!1)),
|
|
627
|
+
onClick: P(a.onClick, () => {
|
|
628
|
+
h.current !== "mouse" && x();
|
|
629
|
+
}),
|
|
630
|
+
onPointerUp: P(a.onPointerUp, () => {
|
|
631
|
+
h.current === "mouse" && x();
|
|
632
|
+
}),
|
|
633
|
+
onPointerDown: P(a.onPointerDown, (f) => {
|
|
634
|
+
h.current = f.pointerType;
|
|
635
|
+
}),
|
|
636
|
+
onPointerMove: P(a.onPointerMove, (f) => {
|
|
637
|
+
h.current = f.pointerType, s ? i.onItemLeave?.() : h.current === "mouse" && f.currentTarget.focus({ preventScroll: !0 });
|
|
638
|
+
}),
|
|
639
|
+
onPointerLeave: P(a.onPointerLeave, (f) => {
|
|
640
|
+
f.currentTarget === document.activeElement && i.onItemLeave?.();
|
|
641
|
+
}),
|
|
642
|
+
onKeyDown: P(a.onKeyDown, (f) => {
|
|
643
|
+
i.searchRef?.current !== "" && f.key === " " || (Nt.includes(f.key) && x(), f.key === " " && f.preventDefault());
|
|
644
|
+
})
|
|
645
|
+
}
|
|
646
|
+
)
|
|
647
|
+
}
|
|
648
|
+
)
|
|
649
|
+
}
|
|
650
|
+
);
|
|
651
|
+
}
|
|
652
|
+
);
|
|
653
|
+
Ge.displayName = ce;
|
|
654
|
+
var ae = "SelectItemText", Ye = r.forwardRef(
|
|
655
|
+
(t, o) => {
|
|
656
|
+
const { __scopeSelect: e, className: c, style: s, ...u } = t, a = Y(ae, e), l = q(ae, e), i = $e(ae, e), m = jt(ae, e), [g, w] = r.useState(null), N = L(
|
|
657
|
+
o,
|
|
658
|
+
(x) => w(x),
|
|
659
|
+
i.onItemTextChange,
|
|
660
|
+
(x) => l.itemTextRefCallback?.(x, i.value, i.disabled)
|
|
661
|
+
), b = g?.textContent, y = r.useMemo(
|
|
662
|
+
() => /* @__PURE__ */ n.jsx("option", { value: i.value, disabled: i.disabled, children: b }, i.value),
|
|
663
|
+
[i.disabled, i.value, b]
|
|
664
|
+
), { onNativeOptionAdd: d, onNativeOptionRemove: h } = m;
|
|
665
|
+
return $(() => (d(y), () => h(y)), [d, h, y]), /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
666
|
+
/* @__PURE__ */ n.jsx(j.span, { id: i.textId, ...u, ref: N }),
|
|
667
|
+
i.isSelected && a.valueNode && !a.valueNodeHasChildren ? Ne.createPortal(u.children, a.valueNode) : null
|
|
668
|
+
] });
|
|
669
|
+
}
|
|
670
|
+
);
|
|
671
|
+
Ye.displayName = ae;
|
|
672
|
+
var qe = "SelectItemIndicator", Xe = r.forwardRef(
|
|
673
|
+
(t, o) => {
|
|
674
|
+
const { __scopeSelect: e, ...c } = t;
|
|
675
|
+
return $e(qe, e).isSelected ? /* @__PURE__ */ n.jsx(j.span, { "aria-hidden": !0, ...c, ref: o }) : null;
|
|
676
|
+
}
|
|
677
|
+
);
|
|
678
|
+
Xe.displayName = qe;
|
|
679
|
+
var we = "SelectScrollUpButton", Ze = r.forwardRef((t, o) => {
|
|
680
|
+
const e = q(we, t.__scopeSelect), c = be(we, t.__scopeSelect), [s, u] = r.useState(!1), a = L(o, c.onScrollButtonChange);
|
|
681
|
+
return $(() => {
|
|
682
|
+
if (e.viewport && e.isPositioned) {
|
|
683
|
+
let l = function() {
|
|
684
|
+
const m = i.scrollTop > 0;
|
|
685
|
+
u(m);
|
|
686
|
+
};
|
|
687
|
+
const i = e.viewport;
|
|
688
|
+
return l(), i.addEventListener("scroll", l), () => i.removeEventListener("scroll", l);
|
|
689
|
+
}
|
|
690
|
+
}, [e.viewport, e.isPositioned]), s ? /* @__PURE__ */ n.jsx(
|
|
691
|
+
Qe,
|
|
692
|
+
{
|
|
693
|
+
...t,
|
|
694
|
+
ref: a,
|
|
695
|
+
onAutoScroll: () => {
|
|
696
|
+
const { viewport: l, selectedItem: i } = e;
|
|
697
|
+
l && i && (l.scrollTop = l.scrollTop - i.offsetHeight);
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
) : null;
|
|
701
|
+
});
|
|
702
|
+
Ze.displayName = we;
|
|
703
|
+
var Ce = "SelectScrollDownButton", Je = r.forwardRef((t, o) => {
|
|
704
|
+
const e = q(Ce, t.__scopeSelect), c = be(Ce, t.__scopeSelect), [s, u] = r.useState(!1), a = L(o, c.onScrollButtonChange);
|
|
705
|
+
return $(() => {
|
|
706
|
+
if (e.viewport && e.isPositioned) {
|
|
707
|
+
let l = function() {
|
|
708
|
+
const m = i.scrollHeight - i.clientHeight, g = Math.ceil(i.scrollTop) < m;
|
|
709
|
+
u(g);
|
|
710
|
+
};
|
|
711
|
+
const i = e.viewport;
|
|
712
|
+
return l(), i.addEventListener("scroll", l), () => i.removeEventListener("scroll", l);
|
|
713
|
+
}
|
|
714
|
+
}, [e.viewport, e.isPositioned]), s ? /* @__PURE__ */ n.jsx(
|
|
715
|
+
Qe,
|
|
716
|
+
{
|
|
717
|
+
...t,
|
|
718
|
+
ref: a,
|
|
719
|
+
onAutoScroll: () => {
|
|
720
|
+
const { viewport: l, selectedItem: i } = e;
|
|
721
|
+
l && i && (l.scrollTop = l.scrollTop + i.offsetHeight);
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
) : null;
|
|
725
|
+
});
|
|
726
|
+
Je.displayName = Ce;
|
|
727
|
+
var Qe = r.forwardRef((t, o) => {
|
|
728
|
+
const { __scopeSelect: e, onAutoScroll: c, ...s } = t, u = q("SelectScrollButton", e), a = r.useRef(null), l = de(e), i = r.useCallback(() => {
|
|
729
|
+
a.current !== null && (window.clearInterval(a.current), a.current = null);
|
|
730
|
+
}, []);
|
|
731
|
+
return r.useEffect(() => () => i(), [i]), $(() => {
|
|
732
|
+
l().find((g) => g.ref.current === document.activeElement)?.ref.current?.scrollIntoView({ block: "nearest" });
|
|
733
|
+
}, [l]), /* @__PURE__ */ n.jsx(
|
|
734
|
+
j.div,
|
|
735
|
+
{
|
|
736
|
+
"aria-hidden": !0,
|
|
737
|
+
...s,
|
|
738
|
+
ref: o,
|
|
739
|
+
style: { flexShrink: 0, ...s.style },
|
|
740
|
+
onPointerDown: P(s.onPointerDown, () => {
|
|
741
|
+
a.current === null && (a.current = window.setInterval(c, 50));
|
|
742
|
+
}),
|
|
743
|
+
onPointerMove: P(s.onPointerMove, () => {
|
|
744
|
+
u.onItemLeave?.(), a.current === null && (a.current = window.setInterval(c, 50));
|
|
745
|
+
}),
|
|
746
|
+
onPointerLeave: P(s.onPointerLeave, () => {
|
|
747
|
+
i();
|
|
748
|
+
})
|
|
749
|
+
}
|
|
750
|
+
);
|
|
751
|
+
}), Ut = "SelectSeparator", et = r.forwardRef(
|
|
752
|
+
(t, o) => {
|
|
753
|
+
const { __scopeSelect: e, ...c } = t;
|
|
754
|
+
return /* @__PURE__ */ n.jsx(j.div, { "aria-hidden": !0, ...c, ref: o });
|
|
755
|
+
}
|
|
756
|
+
);
|
|
757
|
+
et.displayName = Ut;
|
|
758
|
+
var ye = "SelectArrow", Wt = r.forwardRef(
|
|
759
|
+
(t, o) => {
|
|
760
|
+
const { __scopeSelect: e, ...c } = t, s = ue(e), u = Y(ye, e), a = q(ye, e);
|
|
761
|
+
return u.open && a.position === "popper" ? /* @__PURE__ */ n.jsx(gt, { ...s, ...c, ref: o }) : null;
|
|
762
|
+
}
|
|
763
|
+
);
|
|
764
|
+
Wt.displayName = ye;
|
|
765
|
+
var zt = "SelectBubbleInput", tt = r.forwardRef(
|
|
766
|
+
({ __scopeSelect: t, value: o, ...e }, c) => {
|
|
767
|
+
const s = r.useRef(null), u = L(c, s), a = wt(o);
|
|
768
|
+
return r.useEffect(() => {
|
|
769
|
+
const l = s.current;
|
|
770
|
+
if (!l) return;
|
|
771
|
+
const i = window.HTMLSelectElement.prototype, g = Object.getOwnPropertyDescriptor(
|
|
772
|
+
i,
|
|
773
|
+
"value"
|
|
774
|
+
).set;
|
|
775
|
+
if (a !== o && g) {
|
|
776
|
+
const w = new Event("change", { bubbles: !0 });
|
|
777
|
+
g.call(l, o), l.dispatchEvent(w);
|
|
778
|
+
}
|
|
779
|
+
}, [a, o]), /* @__PURE__ */ n.jsx(
|
|
780
|
+
j.select,
|
|
781
|
+
{
|
|
782
|
+
...e,
|
|
783
|
+
style: { ...Ct, ...e.style },
|
|
784
|
+
ref: u,
|
|
785
|
+
defaultValue: o
|
|
786
|
+
}
|
|
787
|
+
);
|
|
788
|
+
}
|
|
789
|
+
);
|
|
790
|
+
tt.displayName = zt;
|
|
791
|
+
function ot(t) {
|
|
792
|
+
return t === "" || t === void 0;
|
|
793
|
+
}
|
|
794
|
+
function nt(t) {
|
|
795
|
+
const o = St(t), e = r.useRef(""), c = r.useRef(0), s = r.useCallback(
|
|
796
|
+
(a) => {
|
|
797
|
+
const l = e.current + a;
|
|
798
|
+
o(l), (function i(m) {
|
|
799
|
+
e.current = m, window.clearTimeout(c.current), m !== "" && (c.current = window.setTimeout(() => i(""), 1e3));
|
|
800
|
+
})(l);
|
|
801
|
+
},
|
|
802
|
+
[o]
|
|
803
|
+
), u = r.useCallback(() => {
|
|
804
|
+
e.current = "", window.clearTimeout(c.current);
|
|
805
|
+
}, []);
|
|
806
|
+
return r.useEffect(() => () => window.clearTimeout(c.current), []), [e, s, u];
|
|
807
|
+
}
|
|
808
|
+
function rt(t, o, e) {
|
|
809
|
+
const s = o.length > 1 && Array.from(o).every((m) => m === o[0]) ? o[0] : o, u = e ? t.indexOf(e) : -1;
|
|
810
|
+
let a = Kt(t, Math.max(u, 0));
|
|
811
|
+
s.length === 1 && (a = a.filter((m) => m !== e));
|
|
812
|
+
const i = a.find(
|
|
813
|
+
(m) => m.textValue.toLowerCase().startsWith(s.toLowerCase())
|
|
814
|
+
);
|
|
815
|
+
return i !== e ? i : void 0;
|
|
816
|
+
}
|
|
817
|
+
function Kt(t, o) {
|
|
818
|
+
return t.map((e, c) => t[(o + c) % t.length]);
|
|
819
|
+
}
|
|
820
|
+
var $t = Ee, Gt = Me, Yt = Oe, qt = De, Xt = Le, Zt = ke, Jt = Fe, Qt = We, eo = Ke, to = Ge, oo = Ye, no = Xe, ro = Ze, ao = Je, so = et;
|
|
821
|
+
function Eo({
|
|
822
|
+
...t
|
|
823
|
+
}) {
|
|
824
|
+
return /* @__PURE__ */ n.jsx($t, { "data-slot": "select", ...t });
|
|
825
|
+
}
|
|
826
|
+
function jo({
|
|
827
|
+
...t
|
|
828
|
+
}) {
|
|
829
|
+
return /* @__PURE__ */ n.jsx(Qt, { "data-slot": "select-group", ...t });
|
|
830
|
+
}
|
|
831
|
+
function Mo({
|
|
832
|
+
...t
|
|
833
|
+
}) {
|
|
834
|
+
return /* @__PURE__ */ n.jsx(Yt, { "data-slot": "select-value", ...t });
|
|
835
|
+
}
|
|
836
|
+
function Ao({
|
|
837
|
+
className: t,
|
|
838
|
+
size: o = "default",
|
|
839
|
+
children: e,
|
|
840
|
+
...c
|
|
841
|
+
}) {
|
|
842
|
+
return /* @__PURE__ */ n.jsxs(
|
|
843
|
+
Gt,
|
|
844
|
+
{
|
|
845
|
+
"data-slot": "select-trigger",
|
|
846
|
+
"data-size": o,
|
|
847
|
+
className: G(
|
|
848
|
+
"adm:border-input adm:data-[placeholder]:text-muted-foreground adm:[&_svg:not([class*=text-])]:text-muted-foreground adm:focus-visible:border-ring adm:focus-visible:ring-ring/50 adm:aria-invalid:ring-destructive/20 adm:dark:aria-invalid:ring-destructive/40 adm:aria-invalid:border-destructive adm:dark:bg-input/30 adm:dark:hover:bg-input/50 adm:flex adm:w-fit adm:items-center adm:justify-between adm:gap-2 adm:rounded-md adm:border adm:bg-transparent adm:px-3 adm:py-2 adm:text-sm adm:whitespace-nowrap adm:shadow-xs adm:transition-[color,box-shadow] adm:outline-none adm:focus-visible:ring-[3px] adm:disabled:cursor-not-allowed adm:disabled:opacity-50 adm:data-[size=default]:h-9 adm:data-[size=sm]:h-8 adm:*:data-[slot=select-value]:line-clamp-1 adm:*:data-[slot=select-value]:flex adm:*:data-[slot=select-value]:items-center adm:*:data-[slot=select-value]:gap-2 adm:[&_svg]:pointer-events-none adm:[&_svg]:shrink-0 adm:[&_svg:not([class*=size-])]:size-4",
|
|
849
|
+
t
|
|
850
|
+
),
|
|
851
|
+
...c,
|
|
852
|
+
children: [
|
|
853
|
+
e,
|
|
854
|
+
/* @__PURE__ */ n.jsx(qt, { asChild: !0, children: /* @__PURE__ */ n.jsx(_e, { className: "adm:size-4 adm:opacity-50" }) })
|
|
855
|
+
]
|
|
856
|
+
}
|
|
857
|
+
);
|
|
858
|
+
}
|
|
859
|
+
function Oo({
|
|
860
|
+
className: t,
|
|
861
|
+
children: o,
|
|
862
|
+
position: e = "popper",
|
|
863
|
+
align: c = "center",
|
|
864
|
+
...s
|
|
865
|
+
}) {
|
|
866
|
+
return /* @__PURE__ */ n.jsx(Xt, { children: /* @__PURE__ */ n.jsxs(
|
|
867
|
+
Zt,
|
|
868
|
+
{
|
|
869
|
+
"data-slot": "select-content",
|
|
870
|
+
className: G(
|
|
871
|
+
"adm:bg-popover adm:text-popover-foreground adm:data-[state=open]:animate-in adm:data-[state=closed]:animate-out adm:data-[state=closed]:fade-out-0 adm:data-[state=open]:fade-in-0 adm:data-[state=closed]:zoom-out-95 adm:data-[state=open]:zoom-in-95 adm:data-[side=bottom]:slide-in-from-top-2 adm:data-[side=left]:slide-in-from-right-2 adm:data-[side=right]:slide-in-from-left-2 adm:data-[side=top]:slide-in-from-bottom-2 adm:relative adm:z-50 adm:max-h-(--radix-select-content-available-height) adm:min-w-[8rem] adm:origin-(--radix-select-content-transform-origin) adm:overflow-x-hidden adm:overflow-y-auto adm:rounded-md adm:border adm:shadow-md",
|
|
872
|
+
e === "popper" && "adm:data-[side=bottom]:translate-y-1 adm:data-[side=left]:-translate-x-1 adm:data-[side=right]:translate-x-1 adm:data-[side=top]:-translate-y-1",
|
|
873
|
+
t
|
|
874
|
+
),
|
|
875
|
+
position: e,
|
|
876
|
+
align: c,
|
|
877
|
+
...s,
|
|
878
|
+
children: [
|
|
879
|
+
/* @__PURE__ */ n.jsx(lo, {}),
|
|
880
|
+
/* @__PURE__ */ n.jsx(
|
|
881
|
+
Jt,
|
|
882
|
+
{
|
|
883
|
+
className: G(
|
|
884
|
+
"adm:p-1",
|
|
885
|
+
e === "popper" && "adm:h-[var(--radix-select-trigger-height)] adm:w-full adm:min-w-[var(--radix-select-trigger-width)] adm:scroll-my-1"
|
|
886
|
+
),
|
|
887
|
+
children: o
|
|
888
|
+
}
|
|
889
|
+
),
|
|
890
|
+
/* @__PURE__ */ n.jsx(co, {})
|
|
891
|
+
]
|
|
892
|
+
}
|
|
893
|
+
) });
|
|
894
|
+
}
|
|
895
|
+
function Do({
|
|
896
|
+
className: t,
|
|
897
|
+
...o
|
|
898
|
+
}) {
|
|
899
|
+
return /* @__PURE__ */ n.jsx(
|
|
900
|
+
eo,
|
|
901
|
+
{
|
|
902
|
+
"data-slot": "select-label",
|
|
903
|
+
className: G("adm:text-muted-foreground adm:px-2 adm:py-1.5 adm:text-xs", t),
|
|
904
|
+
...o
|
|
905
|
+
}
|
|
906
|
+
);
|
|
907
|
+
}
|
|
908
|
+
function Lo({
|
|
909
|
+
className: t,
|
|
910
|
+
children: o,
|
|
911
|
+
...e
|
|
912
|
+
}) {
|
|
913
|
+
return /* @__PURE__ */ n.jsxs(
|
|
914
|
+
to,
|
|
915
|
+
{
|
|
916
|
+
"data-slot": "select-item",
|
|
917
|
+
className: G(
|
|
918
|
+
"adm:focus:bg-accent adm:focus:text-accent-foreground adm:[&_svg:not([class*=text-])]:text-muted-foreground adm:relative adm:flex adm:w-full adm:cursor-default adm:items-center adm:gap-2 adm:rounded-sm adm:py-1.5 adm:pr-8 adm:pl-2 adm:text-sm adm:outline-hidden adm:select-none adm:data-[disabled]:pointer-events-none adm:data-[disabled]:opacity-50 adm:[&_svg]:pointer-events-none adm:[&_svg]:shrink-0 adm:[&_svg:not([class*=size-])]:size-4 adm:*:[span]:last:flex adm:*:[span]:last:items-center adm:*:[span]:last:gap-2",
|
|
919
|
+
t
|
|
920
|
+
),
|
|
921
|
+
...e,
|
|
922
|
+
children: [
|
|
923
|
+
/* @__PURE__ */ n.jsx("span", { className: "adm:absolute adm:right-2 adm:flex adm:size-3.5 adm:items-center adm:justify-center", children: /* @__PURE__ */ n.jsx(no, { children: /* @__PURE__ */ n.jsx(yt, { className: "adm:size-4" }) }) }),
|
|
924
|
+
/* @__PURE__ */ n.jsx(oo, { children: o })
|
|
925
|
+
]
|
|
926
|
+
}
|
|
927
|
+
);
|
|
928
|
+
}
|
|
929
|
+
function ko({
|
|
930
|
+
className: t,
|
|
931
|
+
...o
|
|
932
|
+
}) {
|
|
933
|
+
return /* @__PURE__ */ n.jsx(
|
|
934
|
+
so,
|
|
935
|
+
{
|
|
936
|
+
"data-slot": "select-separator",
|
|
937
|
+
className: G("adm:bg-border adm:pointer-events-none adm:-mx-1 adm:my-1 adm:h-px", t),
|
|
938
|
+
...o
|
|
939
|
+
}
|
|
940
|
+
);
|
|
941
|
+
}
|
|
942
|
+
function lo({
|
|
943
|
+
className: t,
|
|
944
|
+
...o
|
|
945
|
+
}) {
|
|
946
|
+
return /* @__PURE__ */ n.jsx(
|
|
947
|
+
ro,
|
|
948
|
+
{
|
|
949
|
+
"data-slot": "select-scroll-up-button",
|
|
950
|
+
className: G(
|
|
951
|
+
"adm:flex adm:cursor-default adm:items-center adm:justify-center adm:py-1",
|
|
952
|
+
t
|
|
953
|
+
),
|
|
954
|
+
...o,
|
|
955
|
+
children: /* @__PURE__ */ n.jsx(Tt, { className: "adm:size-4" })
|
|
956
|
+
}
|
|
957
|
+
);
|
|
958
|
+
}
|
|
959
|
+
function co({
|
|
960
|
+
className: t,
|
|
961
|
+
...o
|
|
962
|
+
}) {
|
|
963
|
+
return /* @__PURE__ */ n.jsx(
|
|
964
|
+
ao,
|
|
965
|
+
{
|
|
966
|
+
"data-slot": "select-scroll-down-button",
|
|
967
|
+
className: G(
|
|
968
|
+
"adm:flex adm:cursor-default adm:items-center adm:justify-center adm:py-1",
|
|
969
|
+
t
|
|
970
|
+
),
|
|
971
|
+
...o,
|
|
972
|
+
children: /* @__PURE__ */ n.jsx(_e, { className: "adm:size-4" })
|
|
973
|
+
}
|
|
974
|
+
);
|
|
975
|
+
}
|
|
976
|
+
export {
|
|
977
|
+
Eo as Select,
|
|
978
|
+
Oo as SelectContent,
|
|
979
|
+
jo as SelectGroup,
|
|
980
|
+
Lo as SelectItem,
|
|
981
|
+
Do as SelectLabel,
|
|
982
|
+
co as SelectScrollDownButton,
|
|
983
|
+
lo as SelectScrollUpButton,
|
|
984
|
+
ko as SelectSeparator,
|
|
985
|
+
Ao as SelectTrigger,
|
|
986
|
+
Mo as SelectValue
|
|
987
|
+
};
|