@konstructio/ui 0.1.2-alpha.103 → 0.1.2-alpha.104
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 +15 -21
- package/dist/{AdditionalOptions-Cj29eeMF.js → AdditionalOptions-D0BAS2HG.js} +1 -1
- package/dist/{AlertDialogTrigger-CgcsW_ta.js → AlertDialogTrigger-BGo_acd5.js} +3 -3
- package/dist/{Checkbox-DzAx7n67.js → Checkbox-B_ngk9Dj.js} +56 -56
- package/dist/{Combination-cjXRJS03.js → Combination-CnMM05mt.js} +51 -45
- package/dist/{CommandInput-BnvRMfLI.js → CommandInput-BLq69pOT.js} +1 -1
- package/dist/Counter-BV680M5r.js +195 -0
- package/dist/DropdownButton-DfNojmCW.js +493 -0
- package/dist/{FlagSelectorList-BoYG-_It.js → FlagSelectorList-CkTR3j6O.js} +222 -218
- package/dist/{HamburgerTrigger-1vOTrm8-.js → HamburgerTrigger-DRylBL2d.js} +1 -1
- package/dist/{ImageUpload-DZTm4SBB.js → ImageUpload-DiwymQcU.js} +1 -1
- package/dist/{Input-CW0VwW2T.js → Input-Cf44DzfE.js} +18 -18
- package/dist/{Loading-fD0Xiyeq.js → Loading-DUh9PMJN.js} +3 -1
- package/dist/Modal-Dyn088X7.js +81 -0
- package/dist/Sidebar.css +1 -1
- package/dist/{Spinner-Lw9mZYhg.js → Spinner-CUwE2bLm.js} +1 -1
- package/dist/{Switch-WBRr8uOJ.js → Switch-aPhL5rNG.js} +4 -4
- package/dist/{Toast-ByH-l4XK.js → Toast-3NEz7LLa.js} +149 -148
- package/dist/Wrapper-BhqUVI1G.js +171 -0
- package/dist/Wrapper-CVJSuYWx.js +114 -0
- package/dist/{Wrapper-XeeD3av7.js → Wrapper-DP6Sxngx.js} +185 -180
- package/dist/components/Alert/Alert.js +21 -21
- package/dist/components/AlertDialog/AlertDialog.js +1 -1
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/AlertDialog/hooks/useAlertDialog.js +14 -10
- package/dist/components/Autocomplete/components/List/List.js +22 -26
- package/dist/components/Autocomplete/components/List/List.variants.js +7 -19
- package/dist/components/Autocomplete/hooks/useAutocomplete.js +39 -38
- package/dist/components/Autocomplete/hooks/useNavigationList.js +2 -1
- package/dist/components/Badge/Badge.js +37 -36
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/Command/Command.js +2 -2
- package/dist/components/Command/components/Command.js +6 -6
- package/dist/components/Command/components/CommandEmpty.js +1 -1
- package/dist/components/Command/components/CommandGroup.js +1 -1
- package/dist/components/Command/components/CommandInput.js +1 -1
- package/dist/components/Command/components/CommandItem.js +1 -1
- package/dist/components/Command/components/CommandList.js +2 -2
- package/dist/components/Command/components/CommandSeparator.js +1 -1
- package/dist/components/Command/components/DialogContent.js +2 -2
- package/dist/components/Command/components/DialogOverlay.js +1 -1
- package/dist/components/Command/components/index.js +1 -1
- package/dist/components/Command/contexts/Command.provider.js +16 -12
- package/dist/components/Counter/Counter.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +57 -58
- package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +42 -43
- package/dist/components/DateRangePicker/components/CalendarPanel/constants/dayPickerClassNames.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/constants/index.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/index.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useIndependentCarousel.js +42 -50
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useTogetherCarousel.js +61 -79
- package/dist/components/DateRangePicker/components/CalendarPanel/utils/index.js +1 -1
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.js +1 -1
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.js +1 -1
- package/dist/components/DateRangePicker/components/DateTimeInputs/hooks/useDateTimeInputs.js +89 -122
- package/dist/components/Datepicker/DatePicker.js +13 -13
- package/dist/components/Drawer/Drawer.js +54 -49
- package/dist/components/Drawer/hooks/useDrawer.js +39 -44
- package/dist/components/DropdownButton/DropdownButton.js +1 -1
- package/dist/components/Filter/Filter.js +23 -22
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.js +42 -56
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +1 -1
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +30 -43
- package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.hook.js +36 -49
- package/dist/components/Filter/components/FilterDropdown/FilterDropdown.js +1 -1
- package/dist/components/Filter/components/ResetButton/ResetButton.js +21 -18
- package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +1 -1
- package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.hook.js +31 -45
- package/dist/components/Filter/contexts/filter.provider.js +15 -10
- package/dist/components/Filter/events/index.js +26 -5
- package/dist/components/Filter/hooks/index.js +4 -0
- package/dist/components/Filter/hooks/useFilterDropdownSync.js +26 -0
- package/dist/components/ImageUpload/ImageUpload.js +1 -1
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Loading/Loading.js +1 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Modal/components/Body/Body.js +1 -1
- package/dist/components/Modal/components/Footer/Footer.js +1 -1
- package/dist/components/Modal/components/Header/Header.js +1 -1
- package/dist/components/Modal/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/Modal/contexts/Modal.provider.js +26 -19
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.js +1 -1
- package/dist/components/MultiSelectDropdown/components/List/List.js +1 -1
- package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/MultiSelectDropdown/components/index.js +1 -1
- package/dist/components/MultiSelectDropdown/hooks/useMultiSelectDropdown.js +14 -13
- package/dist/components/PhoneNumberInput/PhoneNumberInput.js +1 -1
- package/dist/components/PhoneNumberInput/components/FlagContent/FlagContent.js +6 -4
- package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +1 -1
- package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +16 -16
- package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +1 -1
- package/dist/components/PhoneNumberInput/components/Wrapper.js +1 -1
- package/dist/components/PhoneNumberInput/components/index.js +2 -2
- package/dist/components/PieChart/PieChart.js +33 -32
- package/dist/components/ProgressBar/ProgressBar.js +26 -20
- package/dist/components/Radio/Radio.js +28 -30
- package/dist/components/RadioCardGroup/RadioCardGroup.js +18 -18
- package/dist/components/RadioGroup/RadioGroup.js +24 -24
- package/dist/components/Range/Range.js +15 -13
- package/dist/components/Select/Select.js +2 -2
- package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.js +1 -1
- package/dist/components/Select/components/List/List.js +2 -2
- package/dist/components/Select/components/ListItem/ListItem.js +30 -30
- package/dist/components/Select/components/Wrapper.js +1 -1
- package/dist/components/Select/components/index.js +2 -2
- package/dist/components/Select/hooks/useSelect.js +39 -38
- package/dist/components/Sidebar/Sidebar.js +21 -18
- package/dist/components/Sidebar/components/CollapseTrigger/CollapseTrigger.js +30 -0
- package/dist/components/Sidebar/components/CollapseTrigger/CollapseTrigger.variants.js +20 -0
- package/dist/components/Sidebar/components/HamburgerTrigger/HamburgerTrigger.js +1 -1
- package/dist/components/Sidebar/components/Logo/Logo.js +14 -10
- package/dist/components/Sidebar/components/Logo/Logo.variants.js +14 -4
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +41 -37
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.js +4 -5
- package/dist/components/Sidebar/components/Wrapper/Wrapper.js +75 -68
- package/dist/components/Sidebar/components/index.js +17 -15
- package/dist/components/Sidebar/contexts/SidebarContext.js +8 -5
- package/dist/components/Slider/Slider.js +17 -15
- package/dist/components/Spinner/Spinner.js +1 -1
- package/dist/components/Stepper/Stepper.variants.js +6 -6
- package/dist/components/Stepper/hooks/useStepItemLogic.js +12 -17
- package/dist/components/Switch/Switch.js +1 -1
- package/dist/components/Table/components/Filter.js +1 -1
- package/dist/components/Tabs/Tabs.js +1 -1
- package/dist/components/Tabs/Tabs.variants.js +1 -1
- package/dist/components/Tabs/components/Content.js +1 -1
- package/dist/components/Tabs/components/List.js +1 -1
- package/dist/components/Tabs/components/Trigger.js +1 -1
- package/dist/components/Tag/Tag.js +1 -1
- package/dist/components/Tag/Tag.variants.js +17 -17
- package/dist/components/TagSelect/TagSelect.js +1 -1
- package/dist/components/TagSelect/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/TagSelect/components/index.js +1 -1
- package/dist/components/TagSelect/hooks/useTagSelect.js +12 -11
- package/dist/components/TimePicker/components/HoursList/HoursList.js +34 -38
- package/dist/components/TimePicker/components/MeridianList/MeridianList.js +25 -29
- package/dist/components/TimePicker/components/MinutesList/MinutesList.js +33 -33
- package/dist/components/TimePicker/components/Wrapper/Wrapper.js +91 -99
- package/dist/components/TimePicker/components/WrapperList/WrapperList.js +29 -30
- package/dist/components/TimePicker/contexts/time-picker.provider.js +10 -10
- package/dist/components/Toast/Toast.js +1 -1
- package/dist/components/Toast/Toast.variants.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/components/VirtualizedTable/VirtualizedTable.js +32 -29
- package/dist/components/VirtualizedTable/components/Actions/Actions.js +0 -2
- package/dist/components/VirtualizedTable/components/Body/Body.js +5 -5
- package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +1 -1
- package/dist/components/VirtualizedTable/components/Filter/Filter.js +55 -53
- package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +1 -1
- package/dist/components/VirtualizedTable/components/Header/Header.js +1 -1
- package/dist/components/VirtualizedTable/contexts/index.js +1 -1
- package/dist/components/VirtualizedTable/contexts/table.provider.js +1 -1
- package/dist/components/VirtualizedTable/events/filters/filters.js +7 -0
- package/dist/components/VirtualizedTable/events/index.js +10 -25
- package/dist/components/VirtualizedTable/events/refresh/refresh.js +7 -0
- package/dist/components/VirtualizedTable/events/row/row.js +22 -0
- package/dist/components/VirtualizedTable/utils/get-table-id.js +4 -0
- package/dist/components/VirtualizedTable/utils/index.js +4 -2
- package/dist/components/index.js +95 -89
- package/dist/{components-BIHlj4yH.js → components-Cf345jTv.js} +45 -41
- package/dist/constants-CxJJRVK3.js +31 -0
- package/dist/{dist-DISvWx7U.js → dist-BUocnzkM.js} +1 -1
- package/dist/{dist-Dse3gSmZ.js → dist-BZNE2Tnx.js} +4 -4
- package/dist/{dist-2bGlmy8N2.js → dist-BaPW7qXd2.js} +27 -26
- package/dist/dist-BdobXn93.js +192 -0
- package/dist/dist-BlPTJNIm.js +118 -0
- package/dist/{dist-BiJrNvNo.js → dist-C3YVLapk.js} +29 -28
- package/dist/dist-C4j75TwZ.js +20 -0
- package/dist/dist-CCdbu9GU.js +46 -0
- package/dist/dist-CzKqHuqJ2.js +427 -0
- package/dist/dist-D-yS0HN8.js +228 -0
- package/dist/dist-D5XYRjmR.js +15 -0
- package/dist/dist-DDck_2lb.js +451 -0
- package/dist/{dist-C2aTw0m62.js → dist-DFCz63oC2.js} +5 -5
- package/dist/dist-DGOjiAnB2.js +14 -0
- package/dist/dist-DKryKPmP.js +193 -0
- package/dist/{dist-CTvBzxW8.js → dist-DX0sBG3Q.js} +1 -1
- package/dist/dist-DYIabsrY.js +17 -0
- package/dist/dist-pWlMx4Fi2.js +36 -0
- package/dist/{dist-CVDFmWf2.js → dist-tGUUcv8n.js} +17 -16
- package/dist/dist-xCbHbMLA.js +116 -0
- package/dist/{es2015-BWf6xQHm.js → es2015-CoHq2g4y.js} +95 -86
- package/dist/es2015-DigR3dar.js +795 -0
- package/dist/events.types-BG1Uh8i6.js +6 -0
- package/dist/hooks/index.js +6 -4
- package/dist/hooks/useClickOutside.js +14 -0
- package/dist/index.js +146 -138
- package/dist/lib/components/Autocomplete/components/List/List.variants.d.ts +0 -1
- package/dist/lib/components/DropdownButton/DropdownButton.d.ts +5 -6
- package/dist/lib/components/DropdownButton/DropdownButton.types.d.ts +2 -0
- package/dist/lib/components/Filter/Filter.types.d.ts +2 -0
- package/dist/lib/components/Filter/contexts/filter.context.d.ts +1 -0
- package/dist/lib/components/Filter/events/index.d.ts +10 -2
- package/dist/lib/components/Filter/hooks/index.d.ts +1 -0
- package/dist/lib/components/Filter/hooks/useFilterDropdownSync.d.ts +2 -0
- package/dist/lib/components/Filter/hooks/useFilterDropdownSync.types.d.ts +5 -0
- package/dist/lib/components/PieChart/PieChart.types.d.ts +4 -4
- package/dist/lib/components/ProgressBar/ProgressBar.types.d.ts +2 -0
- package/dist/lib/components/Select/hooks/useSelect.d.ts +2 -1
- package/dist/lib/components/Sidebar/Sidebar.d.ts +2 -2
- package/dist/lib/components/Sidebar/Sidebar.types.d.ts +6 -5
- package/dist/lib/components/Sidebar/components/CollapseTrigger/CollapseTrigger.d.ts +4 -0
- package/dist/lib/components/Sidebar/components/CollapseTrigger/CollapseTrigger.types.d.ts +4 -0
- package/dist/lib/components/Sidebar/components/CollapseTrigger/CollapseTrigger.variants.d.ts +1 -0
- package/dist/lib/components/Sidebar/components/Logo/Logo.types.d.ts +8 -0
- package/dist/lib/components/Sidebar/components/Logo/Logo.variants.d.ts +3 -1
- package/dist/lib/components/Sidebar/components/index.d.ts +2 -0
- package/dist/lib/components/Sidebar/contexts/SidebarContext.d.ts +12 -0
- package/dist/lib/components/VirtualizedTable/VirtualizedTable.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/events/events.types.d.ts +11 -0
- package/dist/lib/components/VirtualizedTable/events/filters/filters.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/events/index.d.ts +4 -14
- package/dist/lib/components/VirtualizedTable/events/refresh/refresh.d.ts +2 -0
- package/dist/lib/components/VirtualizedTable/events/refresh/refresh.types.d.ts +3 -0
- package/dist/lib/components/VirtualizedTable/events/row/row.d.ts +3 -0
- package/dist/lib/components/VirtualizedTable/utils/get-table-id.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/utils/index.d.ts +1 -0
- package/dist/lib/components/index.d.ts +2 -2
- package/dist/lib/hooks/index.d.ts +1 -0
- package/dist/lib/hooks/useClickOutside.d.ts +2 -0
- package/dist/package.json +24 -24
- package/dist/styles.css +1 -1
- package/dist/{table.provider-2sAkE7z_.js → table.provider-B0BafHuU.js} +395 -381
- package/dist/ui/civo-theme.css +4 -0
- package/dist/ui/kubefirst-theme.css +4 -0
- package/package.json +24 -24
- package/dist/Counter-CY0xGnVM.js +0 -208
- package/dist/DropdownButton-DnlwdPmb.js +0 -92
- package/dist/Modal-Bfzggwlr.js +0 -76
- package/dist/Wrapper-ClJ_Mham.js +0 -110
- package/dist/Wrapper-DNEn4fef.js +0 -161
- package/dist/constants-DXrF9vV4.js +0 -31
- package/dist/dist-B-Aoze_D.js +0 -10
- package/dist/dist-BuFiu480.js +0 -13
- package/dist/dist-C2s4VX-42.js +0 -31
- package/dist/dist-CT6d9xe7.js +0 -441
- package/dist/dist-CVy-ulDZ.js +0 -42
- package/dist/dist-D4FePjTS.js +0 -194
- package/dist/dist-Db6UeFo4.js +0 -291
- package/dist/dist-DqKFpce5.js +0 -98
- package/dist/dist-j7FOUrFU.js +0 -206
- package/dist/dist-l-aDnQZC.js +0 -62
- package/dist/dist-ppXKUlVt.js +0 -10
- /package/dist/{x-a_LpoXzG.js → x-a_LpoXzG2.js} +0 -0
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { a as R, n as S } from "./dist-
|
|
2
|
-
import { t as D } from "./dist-
|
|
3
|
-
import { i as N, n as h, r as d, t as L } from "./dist-
|
|
4
|
-
import { t as m } from "./dist-
|
|
5
|
-
import {
|
|
6
|
-
import { n as
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
1
|
+
import { a as R, n as S } from "./dist-xCbHbMLA.js";
|
|
2
|
+
import { t as D } from "./dist-CCdbu9GU.js";
|
|
3
|
+
import { i as N, n as h, r as d, t as L } from "./dist-D-yS0HN8.js";
|
|
4
|
+
import { t as m } from "./dist-DYIabsrY.js";
|
|
5
|
+
import { i as k, n as G } from "./dist-DKryKPmP.js";
|
|
6
|
+
import { n as $, r as j, t as H } from "./es2015-CoHq2g4y.js";
|
|
7
|
+
import { t as K } from "./dist-C4j75TwZ.js";
|
|
8
|
+
import { t as P } from "./dist-BUocnzkM.js";
|
|
9
|
+
import { t as U } from "./Combination-CnMM05mt.js";
|
|
9
10
|
import * as i from "react";
|
|
10
11
|
import { Fragment as V, jsx as s } from "react/jsx-runtime";
|
|
11
12
|
var Y = Object.defineProperty, u = (l, o) => Y(l, "name", {
|
|
12
13
|
value: o,
|
|
13
14
|
configurable: !0
|
|
14
|
-
}), O = "Dialog", [E,
|
|
15
|
+
}), O = "Dialog", [E, ge] = N(O), [Z, g] = E(O), de = /* @__PURE__ */ u((l) => {
|
|
15
16
|
const { __scopeDialog: o, children: a, open: n, defaultOpen: r, onOpenChange: t, modal: e = !0 } = l, c = i.useRef(null), f = i.useRef(null), [x, C] = L({
|
|
16
17
|
prop: n,
|
|
17
18
|
defaultProp: r ?? !1,
|
|
@@ -35,7 +36,7 @@ var Y = Object.defineProperty, u = (l, o) => Y(l, "name", {
|
|
|
35
36
|
modal: e,
|
|
36
37
|
children: a
|
|
37
38
|
});
|
|
38
|
-
}, "Dialog"), q = "DialogTrigger",
|
|
39
|
+
}, "Dialog"), q = "DialogTrigger", pe = /* @__PURE__ */ i.forwardRef(/* @__PURE__ */ u(function(o, a) {
|
|
39
40
|
const { __scopeDialog: n, ...r } = o, t = g(q, n), e = R(a, t.triggerRef);
|
|
40
41
|
return /* @__PURE__ */ s(D.button, {
|
|
41
42
|
type: "button",
|
|
@@ -47,21 +48,21 @@ var Y = Object.defineProperty, u = (l, o) => Y(l, "name", {
|
|
|
47
48
|
ref: e,
|
|
48
49
|
onClick: d(o.onClick, t.onOpenToggle)
|
|
49
50
|
});
|
|
50
|
-
}, "DialogTrigger")), I = "DialogPortal", [z, y] = E(I, { forceMount: void 0 }),
|
|
51
|
+
}, "DialogTrigger")), I = "DialogPortal", [z, y] = E(I, { forceMount: void 0 }), De = /* @__PURE__ */ u((l) => {
|
|
51
52
|
const { __scopeDialog: o, forceMount: a, children: n, container: r } = l, t = g(I, o);
|
|
52
53
|
return /* @__PURE__ */ s(z, {
|
|
53
54
|
scope: o,
|
|
54
55
|
forceMount: a,
|
|
55
56
|
children: i.Children.map(n, (e) => /* @__PURE__ */ s(P, {
|
|
56
57
|
present: a || t.open,
|
|
57
|
-
children: /* @__PURE__ */ s(
|
|
58
|
+
children: /* @__PURE__ */ s(K, {
|
|
58
59
|
asChild: !0,
|
|
59
60
|
container: r,
|
|
60
61
|
children: e
|
|
61
62
|
})
|
|
62
63
|
}))
|
|
63
64
|
});
|
|
64
|
-
}, "DialogPortal"), _ = "DialogOverlay",
|
|
65
|
+
}, "DialogPortal"), _ = "DialogOverlay", ve = /* @__PURE__ */ i.forwardRef(/* @__PURE__ */ u(function(o, a) {
|
|
65
66
|
const n = y(_, o.__scopeDialog), { forceMount: r = n.forceMount, ...t } = o, e = g(_, o.__scopeDialog);
|
|
66
67
|
return e.modal ? /* @__PURE__ */ s(P, {
|
|
67
68
|
present: r || e.open,
|
|
@@ -86,7 +87,7 @@ var Y = Object.defineProperty, u = (l, o) => Y(l, "name", {
|
|
|
86
87
|
}
|
|
87
88
|
})
|
|
88
89
|
});
|
|
89
|
-
}, "DialogOverlayImpl")), p = "DialogContent",
|
|
90
|
+
}, "DialogOverlayImpl")), p = "DialogContent", Ce = /* @__PURE__ */ i.forwardRef(/* @__PURE__ */ u(function(o, a) {
|
|
90
91
|
const n = y(p, o.__scopeDialog), { forceMount: r = n.forceMount, ...t } = o, e = g(p, o.__scopeDialog);
|
|
91
92
|
return /* @__PURE__ */ s(P, {
|
|
92
93
|
present: r || e.open,
|
|
@@ -102,7 +103,7 @@ var Y = Object.defineProperty, u = (l, o) => Y(l, "name", {
|
|
|
102
103
|
const n = g(p, o.__scopeDialog), r = i.useRef(null), t = R(a, n.contentRef, r);
|
|
103
104
|
return i.useEffect(() => {
|
|
104
105
|
const e = r.current;
|
|
105
|
-
if (e) return
|
|
106
|
+
if (e) return H(e);
|
|
106
107
|
}, []), /* @__PURE__ */ s(M, {
|
|
107
108
|
...o,
|
|
108
109
|
ref: t,
|
|
@@ -135,7 +136,7 @@ var Y = Object.defineProperty, u = (l, o) => Y(l, "name", {
|
|
|
135
136
|
});
|
|
136
137
|
}, "DialogContentNonModal")), M = /* @__PURE__ */ i.forwardRef(/* @__PURE__ */ u(function(o, a) {
|
|
137
138
|
const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: t, onCloseAutoFocus: e, ...c } = o, f = g(p, n);
|
|
138
|
-
return
|
|
139
|
+
return $(), /* @__PURE__ */ s(V, { children: /* @__PURE__ */ s(j, {
|
|
139
140
|
asChild: !0,
|
|
140
141
|
loop: !0,
|
|
141
142
|
trapped: r,
|
|
@@ -153,21 +154,21 @@ var Y = Object.defineProperty, u = (l, o) => Y(l, "name", {
|
|
|
153
154
|
onDismiss: () => f.onOpenChange(!1)
|
|
154
155
|
})
|
|
155
156
|
}) });
|
|
156
|
-
}, "DialogContentImpl")), X = "DialogTitle",
|
|
157
|
+
}, "DialogContentImpl")), X = "DialogTitle", me = /* @__PURE__ */ i.forwardRef(/* @__PURE__ */ u(function(o, a) {
|
|
157
158
|
const { __scopeDialog: n, ...r } = o, t = g(X, n), { setTitleCount: e } = t;
|
|
158
159
|
return h(() => (e((c) => c + 1), () => e((c) => c - 1)), [e]), /* @__PURE__ */ s(D.h2, {
|
|
159
160
|
id: t.titleId,
|
|
160
161
|
...r,
|
|
161
162
|
ref: a
|
|
162
163
|
});
|
|
163
|
-
}, "DialogTitle")), ee = "DialogDescription",
|
|
164
|
+
}, "DialogTitle")), ee = "DialogDescription", _e = /* @__PURE__ */ i.forwardRef(/* @__PURE__ */ u(function(o, a) {
|
|
164
165
|
const { __scopeDialog: n, ...r } = o, t = g(ee, n), { setDescriptionCount: e } = t;
|
|
165
166
|
return h(() => (e((c) => c + 1), () => e((c) => c - 1)), [e]), /* @__PURE__ */ s(D.p, {
|
|
166
167
|
id: t.descriptionId,
|
|
167
168
|
...r,
|
|
168
169
|
ref: a
|
|
169
170
|
});
|
|
170
|
-
}, "DialogDescription")), oe = "DialogClose",
|
|
171
|
+
}, "DialogDescription")), oe = "DialogClose", Re = /* @__PURE__ */ i.forwardRef(/* @__PURE__ */ u(function(o, a) {
|
|
171
172
|
const { __scopeDialog: n, ...r } = o, t = g(oe, n);
|
|
172
173
|
return /* @__PURE__ */ s(D.button, {
|
|
173
174
|
type: "button",
|
|
@@ -181,13 +182,13 @@ function v(l) {
|
|
|
181
182
|
}
|
|
182
183
|
u(v, "getState");
|
|
183
184
|
export {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
185
|
+
ve as a,
|
|
186
|
+
pe as c,
|
|
187
|
+
_e as i,
|
|
188
|
+
ge as l,
|
|
189
|
+
Re as n,
|
|
190
|
+
De as o,
|
|
191
|
+
Ce as r,
|
|
192
|
+
me as s,
|
|
193
|
+
de as t
|
|
193
194
|
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { t as s } from "./dist-CCdbu9GU.js";
|
|
2
|
+
import { n as c } from "./dist-D-yS0HN8.js";
|
|
3
|
+
import * as e from "react";
|
|
4
|
+
import * as u from "react-dom";
|
|
5
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
6
|
+
var p = Object.defineProperty, P = (t, r) => p(t, "name", {
|
|
7
|
+
value: r,
|
|
8
|
+
configurable: !0
|
|
9
|
+
}), _ = /* @__PURE__ */ e.forwardRef(/* @__PURE__ */ P(function(r, a) {
|
|
10
|
+
const { container: n, ...i } = r, [f, m] = e.useState(!1);
|
|
11
|
+
c(() => m(!0), []);
|
|
12
|
+
const o = n || f && globalThis?.document?.body;
|
|
13
|
+
return o ? u.createPortal(/* @__PURE__ */ l(s.div, {
|
|
14
|
+
...i,
|
|
15
|
+
ref: a
|
|
16
|
+
}), o) : null;
|
|
17
|
+
}, "Portal"));
|
|
18
|
+
export {
|
|
19
|
+
_ as t
|
|
20
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { n as c } from "./dist-xCbHbMLA.js";
|
|
2
|
+
import * as f from "react";
|
|
3
|
+
import * as p from "react-dom";
|
|
4
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
5
|
+
var d = Object.defineProperty, l = (i, t) => d(i, "name", {
|
|
6
|
+
value: t,
|
|
7
|
+
configurable: !0
|
|
8
|
+
}), b = [
|
|
9
|
+
"a",
|
|
10
|
+
"button",
|
|
11
|
+
"div",
|
|
12
|
+
"form",
|
|
13
|
+
"h2",
|
|
14
|
+
"h3",
|
|
15
|
+
"img",
|
|
16
|
+
"input",
|
|
17
|
+
"label",
|
|
18
|
+
"li",
|
|
19
|
+
"nav",
|
|
20
|
+
"ol",
|
|
21
|
+
"p",
|
|
22
|
+
"select",
|
|
23
|
+
"span",
|
|
24
|
+
"svg",
|
|
25
|
+
"ul"
|
|
26
|
+
].reduce((i, t) => {
|
|
27
|
+
const r = c(`Primitive.${t}`), e = f.forwardRef((o, a) => {
|
|
28
|
+
const { asChild: s, ...n } = o, m = s ? r : t;
|
|
29
|
+
return typeof window < "u" && (window[/* @__PURE__ */ Symbol.for("radix-ui")] = !0), /* @__PURE__ */ u(m, {
|
|
30
|
+
...n,
|
|
31
|
+
ref: a
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
return e.displayName = `Primitive.${t}`, {
|
|
35
|
+
...i,
|
|
36
|
+
[t]: e
|
|
37
|
+
};
|
|
38
|
+
}, {});
|
|
39
|
+
function v(i, t) {
|
|
40
|
+
i && p.flushSync(() => i.dispatchEvent(t));
|
|
41
|
+
}
|
|
42
|
+
l(v, "dispatchDiscreteCustomEvent");
|
|
43
|
+
export {
|
|
44
|
+
v as n,
|
|
45
|
+
b as t
|
|
46
|
+
};
|
|
@@ -0,0 +1,427 @@
|
|
|
1
|
+
import { a as D, n as z } from "./dist-xCbHbMLA.js";
|
|
2
|
+
import { i as $ } from "./dist-D-yS0HN8.js";
|
|
3
|
+
import * as u from "react";
|
|
4
|
+
import { jsx as M } from "react/jsx-runtime";
|
|
5
|
+
var H = Object.defineProperty, f = (r, e) => H(r, "name", {
|
|
6
|
+
value: e,
|
|
7
|
+
configurable: !0
|
|
8
|
+
});
|
|
9
|
+
// @__NO_SIDE_EFFECTS__
|
|
10
|
+
function J(r) {
|
|
11
|
+
const e = r + "CollectionProvider", [t, o] = $(e), [n, i] = t(e, {
|
|
12
|
+
collectionRef: { current: null },
|
|
13
|
+
itemMap: /* @__PURE__ */ new Map()
|
|
14
|
+
}), c = /* @__PURE__ */ f((p) => {
|
|
15
|
+
const { scope: h, children: I } = p, s = u.useRef(null), l = u.useRef(/* @__PURE__ */ new Map()).current;
|
|
16
|
+
return /* @__PURE__ */ M(n, {
|
|
17
|
+
scope: h,
|
|
18
|
+
itemMap: l,
|
|
19
|
+
collectionRef: s,
|
|
20
|
+
children: I
|
|
21
|
+
});
|
|
22
|
+
}, "CollectionProvider");
|
|
23
|
+
c.displayName = e;
|
|
24
|
+
const a = r + "CollectionSlot", S = z(a), E = u.forwardRef((p, h) => {
|
|
25
|
+
const { scope: I, children: s } = p, l = D(h, i(a, I).collectionRef);
|
|
26
|
+
return /* @__PURE__ */ M(S, {
|
|
27
|
+
ref: l,
|
|
28
|
+
children: s
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
E.displayName = a;
|
|
32
|
+
const y = r + "CollectionItemSlot", v = "data-radix-collection-item", A = z(y), d = u.forwardRef((p, h) => {
|
|
33
|
+
const { scope: I, children: s, ...l } = p, m = u.useRef(null), w = D(h, m), R = i(y, I);
|
|
34
|
+
return u.useEffect(() => (R.itemMap.set(m, {
|
|
35
|
+
ref: m,
|
|
36
|
+
...l
|
|
37
|
+
}), () => {
|
|
38
|
+
R.itemMap.delete(m);
|
|
39
|
+
})), /* @__PURE__ */ M(A, {
|
|
40
|
+
[v]: "",
|
|
41
|
+
ref: w,
|
|
42
|
+
children: s
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
d.displayName = y;
|
|
46
|
+
function x(p) {
|
|
47
|
+
const h = i(r + "CollectionConsumer", p);
|
|
48
|
+
return u.useCallback(() => {
|
|
49
|
+
const I = h.collectionRef.current;
|
|
50
|
+
if (!I) return [];
|
|
51
|
+
const s = Array.from(I.querySelectorAll(`[${v}]`));
|
|
52
|
+
return Array.from(h.itemMap.values()).sort((l, m) => s.indexOf(l.ref.current) - s.indexOf(m.ref.current));
|
|
53
|
+
}, [h.collectionRef, h.itemMap]);
|
|
54
|
+
}
|
|
55
|
+
return f(x, "useCollection"), [
|
|
56
|
+
{
|
|
57
|
+
Provider: c,
|
|
58
|
+
Slot: E,
|
|
59
|
+
ItemSlot: d
|
|
60
|
+
},
|
|
61
|
+
x,
|
|
62
|
+
o
|
|
63
|
+
];
|
|
64
|
+
}
|
|
65
|
+
f(J, "createCollection");
|
|
66
|
+
var K = /* @__PURE__ */ new WeakMap(), b = class P extends Map {
|
|
67
|
+
static {
|
|
68
|
+
f(this, "OrderedDict");
|
|
69
|
+
}
|
|
70
|
+
#e;
|
|
71
|
+
constructor(e) {
|
|
72
|
+
super(e), this.#e = [...super.keys()], K.set(this, !0);
|
|
73
|
+
}
|
|
74
|
+
set(e, t) {
|
|
75
|
+
return K.get(this) && (this.has(e) ? this.#e[this.#e.indexOf(e)] = e : this.#e.push(e)), super.set(e, t), this;
|
|
76
|
+
}
|
|
77
|
+
insert(e, t, o) {
|
|
78
|
+
const n = this.has(t), i = this.#e.length, c = V(e);
|
|
79
|
+
let a = c >= 0 ? c : i + c;
|
|
80
|
+
const S = a < 0 || a >= i ? -1 : a;
|
|
81
|
+
if (S === this.size || n && S === this.size - 1 || S === -1)
|
|
82
|
+
return this.set(t, o), this;
|
|
83
|
+
const E = this.size + (n ? 0 : 1);
|
|
84
|
+
c < 0 && a++;
|
|
85
|
+
const y = [...this.#e];
|
|
86
|
+
let v, A = !1;
|
|
87
|
+
for (let d = a; d < E; d++) if (a === d) {
|
|
88
|
+
let x = y[d];
|
|
89
|
+
y[d] === t && (x = y[d + 1]), n && this.delete(t), v = this.get(x), this.set(t, o);
|
|
90
|
+
} else {
|
|
91
|
+
!A && y[d - 1] === t && (A = !0);
|
|
92
|
+
const x = y[A ? d : d - 1], p = v;
|
|
93
|
+
v = this.get(x), this.delete(x), this.set(x, p);
|
|
94
|
+
}
|
|
95
|
+
return this;
|
|
96
|
+
}
|
|
97
|
+
with(e, t, o) {
|
|
98
|
+
const n = new P(this);
|
|
99
|
+
return n.insert(e, t, o), n;
|
|
100
|
+
}
|
|
101
|
+
before(e) {
|
|
102
|
+
const t = this.#e.indexOf(e) - 1;
|
|
103
|
+
if (!(t < 0))
|
|
104
|
+
return this.entryAt(t);
|
|
105
|
+
}
|
|
106
|
+
setBefore(e, t, o) {
|
|
107
|
+
const n = this.#e.indexOf(e);
|
|
108
|
+
return n === -1 ? this : this.insert(n, t, o);
|
|
109
|
+
}
|
|
110
|
+
after(e) {
|
|
111
|
+
let t = this.#e.indexOf(e);
|
|
112
|
+
if (t = t === -1 || t === this.size - 1 ? -1 : t + 1, t !== -1)
|
|
113
|
+
return this.entryAt(t);
|
|
114
|
+
}
|
|
115
|
+
setAfter(e, t, o) {
|
|
116
|
+
const n = this.#e.indexOf(e);
|
|
117
|
+
return n === -1 ? this : this.insert(n + 1, t, o);
|
|
118
|
+
}
|
|
119
|
+
first() {
|
|
120
|
+
return this.entryAt(0);
|
|
121
|
+
}
|
|
122
|
+
last() {
|
|
123
|
+
return this.entryAt(-1);
|
|
124
|
+
}
|
|
125
|
+
clear() {
|
|
126
|
+
return this.#e = [], super.clear();
|
|
127
|
+
}
|
|
128
|
+
delete(e) {
|
|
129
|
+
const t = super.delete(e);
|
|
130
|
+
return t && this.#e.splice(this.#e.indexOf(e), 1), t;
|
|
131
|
+
}
|
|
132
|
+
deleteAt(e) {
|
|
133
|
+
const t = this.keyAt(e);
|
|
134
|
+
return t !== void 0 ? this.delete(t) : !1;
|
|
135
|
+
}
|
|
136
|
+
at(e) {
|
|
137
|
+
const t = _(this.#e, e);
|
|
138
|
+
if (t !== void 0) return this.get(t);
|
|
139
|
+
}
|
|
140
|
+
entryAt(e) {
|
|
141
|
+
const t = _(this.#e, e);
|
|
142
|
+
if (t !== void 0) return [t, this.get(t)];
|
|
143
|
+
}
|
|
144
|
+
indexOf(e) {
|
|
145
|
+
return this.#e.indexOf(e);
|
|
146
|
+
}
|
|
147
|
+
keyAt(e) {
|
|
148
|
+
return _(this.#e, e);
|
|
149
|
+
}
|
|
150
|
+
from(e, t) {
|
|
151
|
+
const o = this.indexOf(e);
|
|
152
|
+
if (o === -1) return;
|
|
153
|
+
let n = o + t;
|
|
154
|
+
return n < 0 && (n = 0), n >= this.size && (n = this.size - 1), this.at(n);
|
|
155
|
+
}
|
|
156
|
+
keyFrom(e, t) {
|
|
157
|
+
const o = this.indexOf(e);
|
|
158
|
+
if (o === -1) return;
|
|
159
|
+
let n = o + t;
|
|
160
|
+
return n < 0 && (n = 0), n >= this.size && (n = this.size - 1), this.keyAt(n);
|
|
161
|
+
}
|
|
162
|
+
find(e, t) {
|
|
163
|
+
let o = 0;
|
|
164
|
+
for (const n of this) {
|
|
165
|
+
if (Reflect.apply(e, t, [
|
|
166
|
+
n,
|
|
167
|
+
o,
|
|
168
|
+
this
|
|
169
|
+
])) return n;
|
|
170
|
+
o++;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
findIndex(e, t) {
|
|
174
|
+
let o = 0;
|
|
175
|
+
for (const n of this) {
|
|
176
|
+
if (Reflect.apply(e, t, [
|
|
177
|
+
n,
|
|
178
|
+
o,
|
|
179
|
+
this
|
|
180
|
+
])) return o;
|
|
181
|
+
o++;
|
|
182
|
+
}
|
|
183
|
+
return -1;
|
|
184
|
+
}
|
|
185
|
+
filter(e, t) {
|
|
186
|
+
const o = [];
|
|
187
|
+
let n = 0;
|
|
188
|
+
for (const i of this)
|
|
189
|
+
Reflect.apply(e, t, [
|
|
190
|
+
i,
|
|
191
|
+
n,
|
|
192
|
+
this
|
|
193
|
+
]) && o.push(i), n++;
|
|
194
|
+
return new P(o);
|
|
195
|
+
}
|
|
196
|
+
map(e, t) {
|
|
197
|
+
const o = [];
|
|
198
|
+
let n = 0;
|
|
199
|
+
for (const i of this)
|
|
200
|
+
o.push([i[0], Reflect.apply(e, t, [
|
|
201
|
+
i,
|
|
202
|
+
n,
|
|
203
|
+
this
|
|
204
|
+
])]), n++;
|
|
205
|
+
return new P(o);
|
|
206
|
+
}
|
|
207
|
+
reduce(...e) {
|
|
208
|
+
const [t, o] = e;
|
|
209
|
+
let n = 0, i = o ?? this.at(0);
|
|
210
|
+
for (const c of this)
|
|
211
|
+
n === 0 && e.length === 1 ? i = c : i = Reflect.apply(t, this, [
|
|
212
|
+
i,
|
|
213
|
+
c,
|
|
214
|
+
n,
|
|
215
|
+
this
|
|
216
|
+
]), n++;
|
|
217
|
+
return i;
|
|
218
|
+
}
|
|
219
|
+
reduceRight(...e) {
|
|
220
|
+
const [t, o] = e;
|
|
221
|
+
let n = o ?? this.at(-1);
|
|
222
|
+
for (let i = this.size - 1; i >= 0; i--) {
|
|
223
|
+
const c = this.at(i);
|
|
224
|
+
i === this.size - 1 && e.length === 1 ? n = c : n = Reflect.apply(t, this, [
|
|
225
|
+
n,
|
|
226
|
+
c,
|
|
227
|
+
i,
|
|
228
|
+
this
|
|
229
|
+
]);
|
|
230
|
+
}
|
|
231
|
+
return n;
|
|
232
|
+
}
|
|
233
|
+
toSorted(e) {
|
|
234
|
+
const t = [...this.entries()].sort(e);
|
|
235
|
+
return new P(t);
|
|
236
|
+
}
|
|
237
|
+
toReversed() {
|
|
238
|
+
const e = new P();
|
|
239
|
+
for (let t = this.size - 1; t >= 0; t--) {
|
|
240
|
+
const o = this.keyAt(t), n = this.get(o);
|
|
241
|
+
e.set(o, n);
|
|
242
|
+
}
|
|
243
|
+
return e;
|
|
244
|
+
}
|
|
245
|
+
toSpliced(...e) {
|
|
246
|
+
const t = [...this.entries()];
|
|
247
|
+
return t.splice(...e), new P(t);
|
|
248
|
+
}
|
|
249
|
+
slice(e, t) {
|
|
250
|
+
const o = new P();
|
|
251
|
+
let n = this.size - 1;
|
|
252
|
+
if (e === void 0) return o;
|
|
253
|
+
e < 0 && (e = e + this.size), t !== void 0 && t > 0 && (n = t - 1);
|
|
254
|
+
for (let i = e; i <= n; i++) {
|
|
255
|
+
const c = this.keyAt(i), a = this.get(c);
|
|
256
|
+
o.set(c, a);
|
|
257
|
+
}
|
|
258
|
+
return o;
|
|
259
|
+
}
|
|
260
|
+
every(e, t) {
|
|
261
|
+
let o = 0;
|
|
262
|
+
for (const n of this) {
|
|
263
|
+
if (!Reflect.apply(e, t, [
|
|
264
|
+
n,
|
|
265
|
+
o,
|
|
266
|
+
this
|
|
267
|
+
])) return !1;
|
|
268
|
+
o++;
|
|
269
|
+
}
|
|
270
|
+
return !0;
|
|
271
|
+
}
|
|
272
|
+
some(e, t) {
|
|
273
|
+
let o = 0;
|
|
274
|
+
for (const n of this) {
|
|
275
|
+
if (Reflect.apply(e, t, [
|
|
276
|
+
n,
|
|
277
|
+
o,
|
|
278
|
+
this
|
|
279
|
+
])) return !0;
|
|
280
|
+
o++;
|
|
281
|
+
}
|
|
282
|
+
return !1;
|
|
283
|
+
}
|
|
284
|
+
};
|
|
285
|
+
function _(r, e) {
|
|
286
|
+
if ("at" in Array.prototype) return Array.prototype.at.call(r, e);
|
|
287
|
+
const t = F(r, e);
|
|
288
|
+
return t === -1 ? void 0 : r[t];
|
|
289
|
+
}
|
|
290
|
+
f(_, "at");
|
|
291
|
+
function F(r, e) {
|
|
292
|
+
const t = r.length, o = V(e), n = o >= 0 ? o : t + o;
|
|
293
|
+
return n < 0 || n >= t ? -1 : n;
|
|
294
|
+
}
|
|
295
|
+
f(F, "toSafeIndex");
|
|
296
|
+
function V(r) {
|
|
297
|
+
return r !== r || r === 0 ? 0 : Math.trunc(r);
|
|
298
|
+
}
|
|
299
|
+
f(V, "toSafeInteger");
|
|
300
|
+
// @__NO_SIDE_EFFECTS__
|
|
301
|
+
function Q(r) {
|
|
302
|
+
const e = r + "CollectionProvider", [t, o] = $(e), [n, i] = t(e, {
|
|
303
|
+
collectionElement: null,
|
|
304
|
+
collectionRef: { current: null },
|
|
305
|
+
collectionRefObject: { current: null },
|
|
306
|
+
itemMap: new b(),
|
|
307
|
+
setItemMap: /* @__PURE__ */ f(() => {
|
|
308
|
+
}, "setItemMap")
|
|
309
|
+
}), c = /* @__PURE__ */ f(({ state: s, ...l }) => s ? /* @__PURE__ */ M(S, {
|
|
310
|
+
...l,
|
|
311
|
+
state: s
|
|
312
|
+
}) : /* @__PURE__ */ M(a, { ...l }), "CollectionProvider");
|
|
313
|
+
c.displayName = e;
|
|
314
|
+
const a = /* @__PURE__ */ f((s) => {
|
|
315
|
+
const l = h();
|
|
316
|
+
return /* @__PURE__ */ M(S, {
|
|
317
|
+
...s,
|
|
318
|
+
state: l
|
|
319
|
+
});
|
|
320
|
+
}, "CollectionInit");
|
|
321
|
+
a.displayName = e + "Init";
|
|
322
|
+
const S = /* @__PURE__ */ f((s) => {
|
|
323
|
+
const { scope: l, children: m, state: w } = s, R = u.useRef(null), [N, C] = u.useState(null), k = D(R, C), [L, T] = w;
|
|
324
|
+
return u.useEffect(() => {
|
|
325
|
+
if (!N) return;
|
|
326
|
+
const g = W(() => {
|
|
327
|
+
});
|
|
328
|
+
return g.observe(N, {
|
|
329
|
+
childList: !0,
|
|
330
|
+
subtree: !0
|
|
331
|
+
}), () => {
|
|
332
|
+
g.disconnect();
|
|
333
|
+
};
|
|
334
|
+
}, [N]), /* @__PURE__ */ M(n, {
|
|
335
|
+
scope: l,
|
|
336
|
+
itemMap: L,
|
|
337
|
+
setItemMap: T,
|
|
338
|
+
collectionRef: k,
|
|
339
|
+
collectionRefObject: R,
|
|
340
|
+
collectionElement: N,
|
|
341
|
+
children: m
|
|
342
|
+
});
|
|
343
|
+
}, "CollectionProviderImpl");
|
|
344
|
+
S.displayName = e + "Impl";
|
|
345
|
+
const E = r + "CollectionSlot", y = z(E), v = u.forwardRef((s, l) => {
|
|
346
|
+
const { scope: m, children: w } = s, R = D(l, i(E, m).collectionRef);
|
|
347
|
+
return /* @__PURE__ */ M(y, {
|
|
348
|
+
ref: R,
|
|
349
|
+
children: w
|
|
350
|
+
});
|
|
351
|
+
});
|
|
352
|
+
v.displayName = E;
|
|
353
|
+
const A = r + "CollectionItemSlot", d = "data-radix-collection-item", x = z(A), p = u.forwardRef((s, l) => {
|
|
354
|
+
const { scope: m, children: w, ...R } = s, N = u.useRef(null), [C, k] = u.useState(null), L = D(l, N, k), { setItemMap: T } = i(A, m), g = u.useRef(R);
|
|
355
|
+
G(g.current, R) || (g.current = R);
|
|
356
|
+
const B = g.current;
|
|
357
|
+
return u.useEffect(() => {
|
|
358
|
+
const q = B;
|
|
359
|
+
return T((O) => C ? O.has(C) ? O.set(C, {
|
|
360
|
+
...q,
|
|
361
|
+
element: C
|
|
362
|
+
}).toSorted(j) : (O.set(C, {
|
|
363
|
+
...q,
|
|
364
|
+
element: C
|
|
365
|
+
}), O.toSorted(j)) : O), () => {
|
|
366
|
+
T((O) => !C || !O.has(C) ? O : (O.delete(C), new b(O)));
|
|
367
|
+
};
|
|
368
|
+
}, [
|
|
369
|
+
C,
|
|
370
|
+
B,
|
|
371
|
+
T
|
|
372
|
+
]), /* @__PURE__ */ M(x, {
|
|
373
|
+
[d]: "",
|
|
374
|
+
ref: L,
|
|
375
|
+
children: w
|
|
376
|
+
});
|
|
377
|
+
});
|
|
378
|
+
p.displayName = A;
|
|
379
|
+
function h() {
|
|
380
|
+
return u.useState(new b());
|
|
381
|
+
}
|
|
382
|
+
f(h, "useInitCollection");
|
|
383
|
+
function I(s) {
|
|
384
|
+
const { itemMap: l } = i(r + "CollectionConsumer", s);
|
|
385
|
+
return l;
|
|
386
|
+
}
|
|
387
|
+
return f(I, "useCollection"), [{
|
|
388
|
+
Provider: c,
|
|
389
|
+
Slot: v,
|
|
390
|
+
ItemSlot: p
|
|
391
|
+
}, {
|
|
392
|
+
createCollectionScope: o,
|
|
393
|
+
useCollection: I,
|
|
394
|
+
useInitCollection: h
|
|
395
|
+
}];
|
|
396
|
+
}
|
|
397
|
+
f(Q, "createCollection");
|
|
398
|
+
function G(r, e) {
|
|
399
|
+
if (r === e) return !0;
|
|
400
|
+
if (typeof r != "object" || typeof e != "object" || r == null || e == null) return !1;
|
|
401
|
+
const t = Object.keys(r), o = Object.keys(e);
|
|
402
|
+
if (t.length !== o.length) return !1;
|
|
403
|
+
for (const n of t)
|
|
404
|
+
if (!Object.prototype.hasOwnProperty.call(e, n) || r[n] !== e[n]) return !1;
|
|
405
|
+
return !0;
|
|
406
|
+
}
|
|
407
|
+
f(G, "shallowEqual");
|
|
408
|
+
function U(r, e) {
|
|
409
|
+
return !!(e.compareDocumentPosition(r) & Node.DOCUMENT_POSITION_PRECEDING);
|
|
410
|
+
}
|
|
411
|
+
f(U, "isElementPreceding");
|
|
412
|
+
function j(r, e) {
|
|
413
|
+
return !r[1].element || !e[1].element ? 0 : U(r[1].element, e[1].element) ? -1 : 1;
|
|
414
|
+
}
|
|
415
|
+
f(j, "sortByDocumentPosition");
|
|
416
|
+
function W(r) {
|
|
417
|
+
return new MutationObserver((e) => {
|
|
418
|
+
for (const t of e) if (t.type === "childList") {
|
|
419
|
+
r();
|
|
420
|
+
return;
|
|
421
|
+
}
|
|
422
|
+
});
|
|
423
|
+
}
|
|
424
|
+
f(W, "getChildListObserver");
|
|
425
|
+
export {
|
|
426
|
+
J as t
|
|
427
|
+
};
|