@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,33 +1,33 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
import { t as
|
|
3
|
-
import { LoaderIcon as
|
|
4
|
-
import { t as C } from "./x-
|
|
1
|
+
import { n as I } from "./Wrapper-CVJSuYWx.js";
|
|
2
|
+
import { t as i } from "./utils-Cx-WzRZF.js";
|
|
3
|
+
import { LoaderIcon as L } from "./assets/icons/components/Loader.js";
|
|
4
|
+
import { t as C } from "./x-a_LpoXzG2.js";
|
|
5
5
|
import { Badge as R } from "./components/Badge/Badge.js";
|
|
6
6
|
import { Typography as N } from "./components/Typography/Typography.js";
|
|
7
|
-
import { useMultiSelectDropdown as
|
|
7
|
+
import { useMultiSelectDropdown as g } from "./components/MultiSelectDropdown/contexts/MultiSelectDropdown.hook.js";
|
|
8
8
|
import { MultiSelectDropdownProvider as V } from "./components/MultiSelectDropdown/contexts/MultiSelectDropdown.provider.js";
|
|
9
|
-
import { Item as
|
|
10
|
-
import { listVariants as
|
|
11
|
-
import { useMultiSelectDropdown as
|
|
12
|
-
import { labelVariants as
|
|
13
|
-
import { forwardRef as
|
|
14
|
-
import { jsx as e, jsxs as
|
|
9
|
+
import { Item as b } from "./components/MultiSelectDropdown/components/Item/Item.js";
|
|
10
|
+
import { listVariants as $ } from "./components/MultiSelectDropdown/components/List/List.variants.js";
|
|
11
|
+
import { useMultiSelectDropdown as j } from "./components/MultiSelectDropdown/hooks/useMultiSelectDropdown.js";
|
|
12
|
+
import { labelVariants as T, multiSelectDropdownVariants as W, wrapperVariants as z } from "./components/MultiSelectDropdown/MultiSelectDropdown.variants.js";
|
|
13
|
+
import { forwardRef as w, useId as B, useImperativeHandle as F } from "react";
|
|
14
|
+
import { jsx as e, jsxs as f } from "react/jsx-runtime";
|
|
15
15
|
var H = ({ theme: n }) => {
|
|
16
|
-
const { options: a, selectedOptions: r, isLoading:
|
|
16
|
+
const { options: a, selectedOptions: r, isLoading: o, noOptionsText: l } = g();
|
|
17
17
|
return /* @__PURE__ */ e("ul", {
|
|
18
18
|
role: "listbox",
|
|
19
19
|
"data-theme": n,
|
|
20
|
-
className:
|
|
21
|
-
children:
|
|
20
|
+
className: i($()),
|
|
21
|
+
children: o ? /* @__PURE__ */ e(b, {
|
|
22
22
|
option: {
|
|
23
23
|
id: "loading",
|
|
24
24
|
label: "Loading..."
|
|
25
25
|
},
|
|
26
26
|
className: "select-none pointer-events-none",
|
|
27
27
|
isSelected: !1
|
|
28
|
-
}, "loading") : a.length > 0 ? a.map((t) => /* @__PURE__ */ e(
|
|
28
|
+
}, "loading") : a.length > 0 ? a.map((t) => /* @__PURE__ */ e(b, {
|
|
29
29
|
option: t,
|
|
30
|
-
isSelected: r.some((
|
|
30
|
+
isSelected: r.some((s) => s.id === t.id)
|
|
31
31
|
}, t.id)) : /* @__PURE__ */ e("li", {
|
|
32
32
|
className: "select-none",
|
|
33
33
|
children: /* @__PURE__ */ e(N, {
|
|
@@ -37,20 +37,21 @@ var H = ({ theme: n }) => {
|
|
|
37
37
|
})
|
|
38
38
|
})
|
|
39
39
|
});
|
|
40
|
-
}, y =
|
|
41
|
-
const
|
|
42
|
-
return F(
|
|
40
|
+
}, y = w(({ isRequired: n, label: a, labelClassName: r, labelWrapperClassName: o, name: l, placeholder: t = "", theme: s, wrapperClassName: c }, p) => {
|
|
41
|
+
const d = B(), x = l ? `${d}-name` : "id", { inputRef: u, isLoading: S, isOpen: h, selectedOptions: v, onOpen: O, onRemoveOption: D } = g(), { wrapperRef: M, handleOpen: k } = j();
|
|
42
|
+
return F(p, () => u.current, [u]), /* @__PURE__ */ f("div", {
|
|
43
43
|
ref: M,
|
|
44
|
-
className:
|
|
45
|
-
"data-theme":
|
|
44
|
+
className: i(z({ className: c })),
|
|
45
|
+
"data-theme": s,
|
|
46
46
|
children: [
|
|
47
47
|
a ? /* @__PURE__ */ e("div", {
|
|
48
|
-
className: o
|
|
49
|
-
children: /* @__PURE__ */
|
|
48
|
+
className: i(o),
|
|
49
|
+
children: /* @__PURE__ */ f(N, {
|
|
50
50
|
component: "label",
|
|
51
51
|
variant: "labelLarge",
|
|
52
|
+
id: `${d}-label`,
|
|
52
53
|
htmlFor: x,
|
|
53
|
-
className:
|
|
54
|
+
className: i(T({ className: r })),
|
|
54
55
|
onClick: () => O(!0),
|
|
55
56
|
children: [
|
|
56
57
|
a,
|
|
@@ -63,53 +64,56 @@ var H = ({ theme: n }) => {
|
|
|
63
64
|
]
|
|
64
65
|
})
|
|
65
66
|
}) : null,
|
|
66
|
-
/* @__PURE__ */
|
|
67
|
+
/* @__PURE__ */ f("div", {
|
|
67
68
|
id: x,
|
|
68
|
-
className:
|
|
69
|
+
className: i(W()),
|
|
69
70
|
role: "combobox",
|
|
70
71
|
onClick: k,
|
|
71
|
-
"aria-expanded":
|
|
72
|
+
"aria-expanded": h,
|
|
73
|
+
"aria-labelledby": a ? `${d}-label` : void 0,
|
|
72
74
|
children: [v.length === 0 ? /* @__PURE__ */ e("span", {
|
|
73
75
|
className: "text-base text-inherit select-none",
|
|
74
76
|
children: t
|
|
75
77
|
}) : /* @__PURE__ */ e("div", {
|
|
76
78
|
className: "flex flex-wrap gap-2",
|
|
77
|
-
children: v.map((
|
|
78
|
-
"data-value":
|
|
79
|
-
label:
|
|
79
|
+
children: v.map((m) => /* @__PURE__ */ e(R, {
|
|
80
|
+
"data-value": m.label,
|
|
81
|
+
label: m.value ?? m.label ?? "",
|
|
80
82
|
className: "select-none",
|
|
81
|
-
rightIcon: /* @__PURE__ */ e(C, { onClick: () => D(
|
|
82
|
-
},
|
|
83
|
-
}), S ? /* @__PURE__ */ e(
|
|
83
|
+
rightIcon: /* @__PURE__ */ e(C, { onClick: () => D(m) })
|
|
84
|
+
}, m.id))
|
|
85
|
+
}), S ? /* @__PURE__ */ e(L, {
|
|
84
86
|
size: 16,
|
|
85
87
|
className: "animate-spin shrink-0 text-gray-400"
|
|
86
|
-
}) : /* @__PURE__ */ e(
|
|
88
|
+
}) : /* @__PURE__ */ e(I, { className: i("w-4 h-4 transition-all duration-50 shrink-0 text-gray-400", h ? "rotate-0" : "rotate-180") })]
|
|
87
89
|
}),
|
|
88
90
|
/* @__PURE__ */ e("input", {
|
|
89
91
|
ref: u,
|
|
90
92
|
type: "text",
|
|
91
93
|
name: l,
|
|
92
94
|
className: "hidden",
|
|
95
|
+
tabIndex: -1,
|
|
96
|
+
"aria-hidden": "true",
|
|
93
97
|
readOnly: !0
|
|
94
98
|
}),
|
|
95
|
-
|
|
99
|
+
h ? /* @__PURE__ */ e(H, {}) : null
|
|
96
100
|
]
|
|
97
101
|
});
|
|
98
102
|
});
|
|
99
103
|
y.displayName = "MultiSelectDropdownWrapper";
|
|
100
|
-
var K =
|
|
104
|
+
var K = w(({ isLoading: n, multiselect: a, name: r, noOptionsText: o, options: l, value: t, onChange: s, onBlur: c, ...p }, d) => /* @__PURE__ */ e(V, {
|
|
101
105
|
defaultOptions: l,
|
|
102
106
|
multiselect: a,
|
|
103
107
|
value: t,
|
|
104
|
-
onChange:
|
|
105
|
-
onBlur:
|
|
108
|
+
onChange: s,
|
|
109
|
+
onBlur: c,
|
|
106
110
|
name: r,
|
|
107
111
|
isLoading: n,
|
|
108
|
-
noOptionsText:
|
|
112
|
+
noOptionsText: o,
|
|
109
113
|
children: /* @__PURE__ */ e(y, {
|
|
110
|
-
ref:
|
|
114
|
+
ref: d,
|
|
111
115
|
name: r,
|
|
112
|
-
...
|
|
116
|
+
...p
|
|
113
117
|
})
|
|
114
118
|
}));
|
|
115
119
|
K.displayName = "KonstructMultiSelectDropdown";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { t } from "./utils-Cx-WzRZF.js";
|
|
2
|
+
var o = (e) => ({
|
|
3
|
+
root: t("w-fit", e?.root),
|
|
4
|
+
months: t("flex", e?.months),
|
|
5
|
+
month: t("flex flex-col w-[259px]", e?.month),
|
|
6
|
+
month_caption: "hidden",
|
|
7
|
+
nav: "hidden",
|
|
8
|
+
day_button: t("size-7.5", "flex", "items-center", "justify-center", "text-sm", "font-semibold", "cursor-pointer", "rounded-full", "hover:bg-slate-100", "dark:hover:bg-metal-700", "transition-colors", "text-slate-700", "dark:text-white", "focus:outline-none", "focus-visible:outline-none", e?.dayButton),
|
|
9
|
+
day: t("p-0", "w-[37px]", "h-9.5", "text-center", "align-middle", e?.day),
|
|
10
|
+
selected: t("[&>button]:bg-blue-600", "[&>button]:text-white", "[&>button]:hover:bg-blue-700", "dark:[&>button]:bg-aurora-500", "dark:[&>button]:hover:bg-aurora-500", "dark:[&>button]:text-metal-900", e?.selected),
|
|
11
|
+
range_start: t("drp-range-start", "[&>button]:!bg-blue-600", "[&>button]:!text-white", "[&>button]:!rounded-full", "[&>button]:hover:!bg-blue-700", "[&>button]:relative", "[&>button]:z-10", "dark:[&>button]:!bg-aurora-500", "dark:[&>button]:hover:!bg-aurora-500", "dark:[&>button]:!text-metal-900", "!relative", "before:absolute", "before:top-1", "before:bottom-1", "before:left-1/2", "before:right-0", "before:!bg-blue-50", "dark:before:!bg-aurora-500/10", "last:before:!hidden", e?.rangeStart),
|
|
12
|
+
range_end: t("drp-range-end", "[&>button]:!bg-blue-600", "[&>button]:!text-white", "[&>button]:!rounded-full", "[&>button]:hover:!bg-blue-700", "[&>button]:relative", "[&>button]:z-10", "dark:[&>button]:!bg-aurora-500", "dark:[&>button]:hover:!bg-aurora-500", "dark:[&>button]:!text-metal-900", "!relative", "before:absolute", "before:top-1", "before:bottom-1", "before:left-0", "before:right-1/2", "before:!bg-blue-50", "dark:before:!bg-aurora-500/10", "first:before:!hidden", e?.rangeEnd),
|
|
13
|
+
range_middle: t("drp-range-middle", "!relative", "before:absolute", "before:top-1", "before:bottom-1", "before:left-0", "before:right-0", "before:!bg-blue-50", "dark:before:!bg-aurora-500/10", "first:before:rounded-l-full", "last:before:rounded-r-full", "[&>button]:!text-slate-700", "[&>button]:!bg-transparent", "[&>button]:!rounded-full", "[&>button]:relative", "[&>button]:z-10", "[&>button]:hover:!bg-blue-100", "dark:[&>button]:!text-white", "dark:[&>button]:hover:!bg-aurora-500/20", e?.rangeMiddle),
|
|
14
|
+
table: t("w-full border-collapse table-fixed", e?.table),
|
|
15
|
+
weekdays: t("text-slate-500", "dark:text-metal-400", e?.weekdays),
|
|
16
|
+
weeks: t("[&>tr>td]:p-0", "[&>tr]:h-9.5", e?.weeks),
|
|
17
|
+
weekday: t("font-semibold", "text-xs", "uppercase", "text-slate-500", "dark:text-metal-400", "pb-4", "w-[37px]", e?.weekday),
|
|
18
|
+
today: t("[&>button]:text-blue-600", "dark:[&>button]:text-aurora-500", e?.today),
|
|
19
|
+
month_grid: "w-full",
|
|
20
|
+
disabled: t("[&>button]:opacity-50", "[&>button]:cursor-not-allowed", e?.disabled),
|
|
21
|
+
outside: t("[&>button]:!text-slate-400", "dark:[&>button]:!text-metal-500", e?.outside)
|
|
22
|
+
}), a = 259, b = 32, n = 720 * 60 * 60 * 1e3, l = 56, d = 28, u = 38;
|
|
23
|
+
export {
|
|
24
|
+
d as a,
|
|
25
|
+
a as i,
|
|
26
|
+
l as n,
|
|
27
|
+
u as o,
|
|
28
|
+
n as r,
|
|
29
|
+
o as s,
|
|
30
|
+
b as t
|
|
31
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { i as j } from "./dist-
|
|
2
|
-
import { t as R } from "./dist-
|
|
3
|
-
import { t as q } from "./dist-
|
|
4
|
-
import { a as Ee, o as ke, r as Se, t as Ie } from "./dist-
|
|
1
|
+
import { i as j } from "./dist-xCbHbMLA.js";
|
|
2
|
+
import { t as R } from "./dist-CCdbu9GU.js";
|
|
3
|
+
import { t as q } from "./dist-DYIabsrY.js";
|
|
4
|
+
import { a as Ee, o as ke, r as Se, t as Ie } from "./dist-C3YVLapk.js";
|
|
5
5
|
import * as n from "react";
|
|
6
6
|
var ce = 1, xe = 0.9, Ce = 0.8, Re = 0.17, Y = 0.1, Q = 0.999, Ae = 0.9999, Me = 0.99, $e = /[\\\/_+.#"@\[\(\{&]/, De = /[\\\/_+.#"@\[\(\{&]/g, Fe = /[\s-]/, fe = /[\s-]/g;
|
|
7
7
|
function _(t, l, r, f, u, c, d) {
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { a as _, n as D } from "./dist-
|
|
2
|
-
import { t as M } from "./dist-
|
|
3
|
-
import { i as I, r as
|
|
4
|
-
import { t as k } from "./dist-
|
|
5
|
-
import {
|
|
6
|
-
import { n as
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import {
|
|
1
|
+
import { a as _, n as D } from "./dist-xCbHbMLA.js";
|
|
2
|
+
import { t as M } from "./dist-CCdbu9GU.js";
|
|
3
|
+
import { i as I, r as m, t as T } from "./dist-D-yS0HN8.js";
|
|
4
|
+
import { t as k } from "./dist-DYIabsrY.js";
|
|
5
|
+
import { n as y } from "./dist-DKryKPmP.js";
|
|
6
|
+
import { n as N, r as $, t as G } from "./es2015-CoHq2g4y.js";
|
|
7
|
+
import { t as L } from "./dist-C4j75TwZ.js";
|
|
8
|
+
import { t as A } from "./dist-BUocnzkM.js";
|
|
9
|
+
import { t as j } from "./Combination-CnMM05mt.js";
|
|
10
|
+
import { a as b, i as H, r as K, t as U } from "./dist-DFCz63oC2.js";
|
|
10
11
|
import * as i from "react";
|
|
11
12
|
import { jsx as s } from "react/jsx-runtime";
|
|
12
13
|
var V = Object.defineProperty, l = (p, e) => V(p, "name", {
|
|
13
14
|
value: e,
|
|
14
15
|
configurable: !0
|
|
15
|
-
}), R = "Popover", [F,
|
|
16
|
-
const { __scopePopover: e, children: c, open: r, defaultOpen: n, onOpenChange: t, modal: o = !1 } = p, a = O(e), u = i.useRef(null), [P, d] = i.useState(!1), [
|
|
16
|
+
}), R = "Popover", [F, fe] = I(R, [b]), O = b(), [Z, v] = F(R), q = /* @__PURE__ */ l((p) => {
|
|
17
|
+
const { __scopePopover: e, children: c, open: r, defaultOpen: n, onOpenChange: t, modal: o = !1 } = p, a = O(e), u = i.useRef(null), [P, d] = i.useState(!1), [C, f] = T({
|
|
17
18
|
prop: r,
|
|
18
19
|
defaultProp: n ?? !1,
|
|
19
20
|
onChange: t,
|
|
@@ -25,7 +26,7 @@ var V = Object.defineProperty, l = (p, e) => V(p, "name", {
|
|
|
25
26
|
scope: e,
|
|
26
27
|
contentId: k(),
|
|
27
28
|
triggerRef: u,
|
|
28
|
-
open:
|
|
29
|
+
open: C,
|
|
29
30
|
onOpenChange: f,
|
|
30
31
|
onOpenToggle: i.useCallback(() => f((g) => !g), [f]),
|
|
31
32
|
hasCustomAnchor: P,
|
|
@@ -44,7 +45,7 @@ var V = Object.defineProperty, l = (p, e) => V(p, "name", {
|
|
|
44
45
|
"data-state": x(t.open),
|
|
45
46
|
...n,
|
|
46
47
|
ref: a,
|
|
47
|
-
onClick:
|
|
48
|
+
onClick: m(e.onClick, t.onOpenToggle)
|
|
48
49
|
});
|
|
49
50
|
return t.hasCustomAnchor ? u : /* @__PURE__ */ s(U, {
|
|
50
51
|
asChild: !0,
|
|
@@ -58,7 +59,7 @@ var V = Object.defineProperty, l = (p, e) => V(p, "name", {
|
|
|
58
59
|
forceMount: c,
|
|
59
60
|
children: /* @__PURE__ */ s(A, {
|
|
60
61
|
present: c || t.open,
|
|
61
|
-
children: /* @__PURE__ */ s(
|
|
62
|
+
children: /* @__PURE__ */ s(L, {
|
|
62
63
|
asChild: !0,
|
|
63
64
|
container: n,
|
|
64
65
|
children: r
|
|
@@ -81,7 +82,7 @@ var V = Object.defineProperty, l = (p, e) => V(p, "name", {
|
|
|
81
82
|
const r = v(h, e.__scopePopover), n = i.useRef(null), t = _(c, n), o = i.useRef(!1);
|
|
82
83
|
return i.useEffect(() => {
|
|
83
84
|
const a = n.current;
|
|
84
|
-
if (a) return
|
|
85
|
+
if (a) return G(a);
|
|
85
86
|
}, []), /* @__PURE__ */ s(j, {
|
|
86
87
|
as: Y,
|
|
87
88
|
allowPinchZoom: !0,
|
|
@@ -90,14 +91,14 @@ var V = Object.defineProperty, l = (p, e) => V(p, "name", {
|
|
|
90
91
|
ref: t,
|
|
91
92
|
trapFocus: r.open,
|
|
92
93
|
disableOutsidePointerEvents: !0,
|
|
93
|
-
onCloseAutoFocus:
|
|
94
|
+
onCloseAutoFocus: m(e.onCloseAutoFocus, (a) => {
|
|
94
95
|
a.preventDefault(), o.current || r.triggerRef.current?.focus();
|
|
95
96
|
}),
|
|
96
|
-
onPointerDownOutside:
|
|
97
|
+
onPointerDownOutside: m(e.onPointerDownOutside, (a) => {
|
|
97
98
|
const u = a.detail.originalEvent, P = u.button === 0 && u.ctrlKey === !0, d = u.button === 2 || P;
|
|
98
99
|
o.current = d;
|
|
99
100
|
}, { checkForDefaultPrevented: !1 }),
|
|
100
|
-
onFocusOutside:
|
|
101
|
+
onFocusOutside: m(e.onFocusOutside, (a) => a.preventDefault(), { checkForDefaultPrevented: !1 })
|
|
101
102
|
})
|
|
102
103
|
});
|
|
103
104
|
}, "PopoverContentModal")), oe = /* @__PURE__ */ i.forwardRef(/* @__PURE__ */ l(function(e, c) {
|
|
@@ -117,8 +118,8 @@ var V = Object.defineProperty, l = (p, e) => V(p, "name", {
|
|
|
117
118
|
}
|
|
118
119
|
});
|
|
119
120
|
}, "PopoverContentNonModal")), w = /* @__PURE__ */ i.forwardRef(/* @__PURE__ */ l(function(e, c) {
|
|
120
|
-
const { __scopePopover: r, trapFocus: n, onOpenAutoFocus: t, onCloseAutoFocus: o, disableOutsidePointerEvents: a, onEscapeKeyDown: u, onPointerDownOutside: P, onFocusOutside: d, onInteractOutside:
|
|
121
|
-
return
|
|
121
|
+
const { __scopePopover: r, trapFocus: n, onOpenAutoFocus: t, onCloseAutoFocus: o, disableOutsidePointerEvents: a, onEscapeKeyDown: u, onPointerDownOutside: P, onFocusOutside: d, onInteractOutside: C, ...f } = e, g = v(h, r), S = O(r);
|
|
122
|
+
return N(), /* @__PURE__ */ s($, {
|
|
122
123
|
asChild: !0,
|
|
123
124
|
loop: !0,
|
|
124
125
|
trapped: n,
|
|
@@ -127,7 +128,7 @@ var V = Object.defineProperty, l = (p, e) => V(p, "name", {
|
|
|
127
128
|
children: /* @__PURE__ */ s(y, {
|
|
128
129
|
asChild: !0,
|
|
129
130
|
disableOutsidePointerEvents: a,
|
|
130
|
-
onInteractOutside:
|
|
131
|
+
onInteractOutside: C,
|
|
131
132
|
onEscapeKeyDown: u,
|
|
132
133
|
onPointerDownOutside: P,
|
|
133
134
|
onFocusOutside: d,
|
|
@@ -156,10 +157,10 @@ function x(p) {
|
|
|
156
157
|
return p ? "open" : "closed";
|
|
157
158
|
}
|
|
158
159
|
l(x, "getState");
|
|
159
|
-
var
|
|
160
|
+
var ve = q, Pe = B, ge = W, he = X;
|
|
160
161
|
export {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
162
|
+
Pe as i,
|
|
163
|
+
ge as n,
|
|
164
|
+
ve as r,
|
|
165
|
+
he as t
|
|
165
166
|
};
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { a as J } from "./dist-xCbHbMLA.js";
|
|
2
|
+
import { t as L } from "./dist-CCdbu9GU.js";
|
|
3
|
+
import { i as Q, n as W, r as F, t as X } from "./dist-D-yS0HN8.js";
|
|
4
|
+
import { t as Z } from "./dist-DYIabsrY.js";
|
|
5
|
+
import { t as ee } from "./dist-D5XYRjmR.js";
|
|
6
|
+
import { t as te } from "./dist-CzKqHuqJ2.js";
|
|
7
|
+
import { t as oe } from "./dist-DGOjiAnB2.js";
|
|
8
|
+
import * as r from "react";
|
|
9
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
10
|
+
var re = Object.defineProperty, O = (t, e) => re(t, "name", {
|
|
11
|
+
value: e,
|
|
12
|
+
configurable: !0
|
|
13
|
+
}), P = !1;
|
|
14
|
+
function N() {
|
|
15
|
+
const [t, e] = r.useState(P);
|
|
16
|
+
return r.useEffect(() => {
|
|
17
|
+
P || (P = !0, e(!0));
|
|
18
|
+
}, []), t;
|
|
19
|
+
}
|
|
20
|
+
O(N, "useIsHydrated");
|
|
21
|
+
var k = r[" useSyncExternalStore ".trim().toString()];
|
|
22
|
+
function U() {
|
|
23
|
+
return () => {
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
O(U, "subscribe");
|
|
27
|
+
function B() {
|
|
28
|
+
return k(U, () => !0, () => !1);
|
|
29
|
+
}
|
|
30
|
+
O(B, "useIsHydratedModern");
|
|
31
|
+
var ne = typeof k == "function" ? B : N, se = Object.defineProperty, v = (t, e) => se(t, "name", {
|
|
32
|
+
value: e,
|
|
33
|
+
configurable: !0
|
|
34
|
+
}), x = "rovingFocusGroup.onEntryFocus", ue = {
|
|
35
|
+
bubbles: !1,
|
|
36
|
+
cancelable: !0
|
|
37
|
+
}, w = "RovingFocusGroup", [D, j, ce] = te(w), [ae, we] = Q(w, [ce]), [ie, fe] = ae(w), le = /* @__PURE__ */ r.forwardRef(/* @__PURE__ */ v(function(e, u) {
|
|
38
|
+
return /* @__PURE__ */ m(D.Provider, {
|
|
39
|
+
scope: e.__scopeRovingFocusGroup,
|
|
40
|
+
children: /* @__PURE__ */ m(D.Slot, {
|
|
41
|
+
scope: e.__scopeRovingFocusGroup,
|
|
42
|
+
children: /* @__PURE__ */ m(de, {
|
|
43
|
+
...e,
|
|
44
|
+
ref: u
|
|
45
|
+
})
|
|
46
|
+
})
|
|
47
|
+
});
|
|
48
|
+
}, "RovingFocusGroup")), de = /* @__PURE__ */ r.forwardRef(/* @__PURE__ */ v(function(e, u) {
|
|
49
|
+
const { __scopeRovingFocusGroup: n, orientation: i, loop: T = !1, dir: _, currentTabStopId: R, defaultCurrentTabStopId: C, onCurrentTabStopIdChange: h, onEntryFocus: I, preventScrollOnEntryFocus: c = !1, ...y } = e, S = r.useRef(null), b = J(u, S), g = oe(_), [E, d] = X({
|
|
50
|
+
prop: R,
|
|
51
|
+
defaultProp: C ?? null,
|
|
52
|
+
onChange: h,
|
|
53
|
+
caller: w
|
|
54
|
+
}), [o, f] = r.useState(!1), a = ee(I), l = j(n), A = r.useRef(!1), [z, K] = r.useState(0);
|
|
55
|
+
return r.useEffect(() => {
|
|
56
|
+
const s = S.current;
|
|
57
|
+
if (s)
|
|
58
|
+
return s.addEventListener(x, a), () => s.removeEventListener(x, a);
|
|
59
|
+
}, [a]), /* @__PURE__ */ m(ie, {
|
|
60
|
+
scope: n,
|
|
61
|
+
orientation: i,
|
|
62
|
+
dir: g,
|
|
63
|
+
loop: T,
|
|
64
|
+
currentTabStopId: E,
|
|
65
|
+
onItemFocus: r.useCallback((s) => d(s), [d]),
|
|
66
|
+
onItemShiftTab: r.useCallback(() => f(!0), []),
|
|
67
|
+
onFocusableItemAdd: r.useCallback(() => K((s) => s + 1), []),
|
|
68
|
+
onFocusableItemRemove: r.useCallback(() => K((s) => s - 1), []),
|
|
69
|
+
children: /* @__PURE__ */ m(L.div, {
|
|
70
|
+
tabIndex: o || z === 0 ? -1 : 0,
|
|
71
|
+
"data-orientation": i,
|
|
72
|
+
...y,
|
|
73
|
+
ref: b,
|
|
74
|
+
style: {
|
|
75
|
+
outline: "none",
|
|
76
|
+
...e.style
|
|
77
|
+
},
|
|
78
|
+
onMouseDown: F(e.onMouseDown, () => {
|
|
79
|
+
A.current = !0;
|
|
80
|
+
}),
|
|
81
|
+
onFocus: F(e.onFocus, (s) => {
|
|
82
|
+
const q = !A.current;
|
|
83
|
+
if (s.target === s.currentTarget && q && !o) {
|
|
84
|
+
const M = new CustomEvent(x, ue);
|
|
85
|
+
if (s.currentTarget.dispatchEvent(M), !M.defaultPrevented) {
|
|
86
|
+
const G = l().filter((p) => p.focusable);
|
|
87
|
+
H([
|
|
88
|
+
G.find((p) => p.active),
|
|
89
|
+
G.find((p) => p.id === E),
|
|
90
|
+
...G
|
|
91
|
+
].filter(Boolean).map((p) => p.ref.current), c);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
A.current = !1;
|
|
95
|
+
}),
|
|
96
|
+
onBlur: F(e.onBlur, () => f(!1))
|
|
97
|
+
})
|
|
98
|
+
});
|
|
99
|
+
}, "RovingFocusGroupImpl")), pe = "RovingFocusGroupItem", me = /* @__PURE__ */ r.forwardRef(/* @__PURE__ */ v(function(e, u) {
|
|
100
|
+
const { __scopeRovingFocusGroup: n, focusable: i = !0, active: T = !1, tabStopId: _, children: R, ...C } = e, h = Z(), I = _ || h, c = fe(pe, n), y = c.currentTabStopId === I, S = j(n), { onFocusableItemAdd: b, onFocusableItemRemove: g, currentTabStopId: E } = c, d = ne();
|
|
101
|
+
return W(() => {
|
|
102
|
+
if (!(!d || !i))
|
|
103
|
+
return b(), () => g();
|
|
104
|
+
}, [
|
|
105
|
+
d,
|
|
106
|
+
i,
|
|
107
|
+
b,
|
|
108
|
+
g
|
|
109
|
+
]), r.useEffect(() => {
|
|
110
|
+
if (!(d || !i))
|
|
111
|
+
return b(), () => g();
|
|
112
|
+
}, [
|
|
113
|
+
d,
|
|
114
|
+
i,
|
|
115
|
+
b,
|
|
116
|
+
g
|
|
117
|
+
]), /* @__PURE__ */ m(D.ItemSlot, {
|
|
118
|
+
scope: n,
|
|
119
|
+
id: I,
|
|
120
|
+
focusable: i,
|
|
121
|
+
active: T,
|
|
122
|
+
children: /* @__PURE__ */ m(L.span, {
|
|
123
|
+
tabIndex: y ? 0 : -1,
|
|
124
|
+
"data-orientation": c.orientation,
|
|
125
|
+
...C,
|
|
126
|
+
ref: u,
|
|
127
|
+
onMouseDown: F(e.onMouseDown, (o) => {
|
|
128
|
+
i ? c.onItemFocus(I) : o.preventDefault();
|
|
129
|
+
}),
|
|
130
|
+
onFocus: F(e.onFocus, () => c.onItemFocus(I)),
|
|
131
|
+
onKeyDown: F(e.onKeyDown, (o) => {
|
|
132
|
+
if (o.key === "Tab" && o.shiftKey) {
|
|
133
|
+
c.onItemShiftTab();
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
if (o.target !== o.currentTarget) return;
|
|
137
|
+
const f = $(o, c.orientation, c.dir);
|
|
138
|
+
if (f !== void 0) {
|
|
139
|
+
if (o.metaKey || o.ctrlKey || o.altKey || o.shiftKey) return;
|
|
140
|
+
o.preventDefault();
|
|
141
|
+
let a = S().filter((l) => l.focusable).map((l) => l.ref.current);
|
|
142
|
+
if (f === "last") a.reverse();
|
|
143
|
+
else if (f === "prev" || f === "next") {
|
|
144
|
+
f === "prev" && a.reverse();
|
|
145
|
+
const l = a.indexOf(o.currentTarget);
|
|
146
|
+
a = c.loop ? V(a, l + 1) : a.slice(l + 1);
|
|
147
|
+
}
|
|
148
|
+
setTimeout(() => H(a));
|
|
149
|
+
}
|
|
150
|
+
}),
|
|
151
|
+
children: typeof R == "function" ? R({
|
|
152
|
+
isCurrentTabStop: y,
|
|
153
|
+
hasTabStop: E != null
|
|
154
|
+
}) : R
|
|
155
|
+
})
|
|
156
|
+
});
|
|
157
|
+
}, "RovingFocusGroupItem")), ve = {
|
|
158
|
+
ArrowLeft: "prev",
|
|
159
|
+
ArrowUp: "prev",
|
|
160
|
+
ArrowRight: "next",
|
|
161
|
+
ArrowDown: "next",
|
|
162
|
+
PageUp: "first",
|
|
163
|
+
Home: "first",
|
|
164
|
+
PageDown: "last",
|
|
165
|
+
End: "last"
|
|
166
|
+
};
|
|
167
|
+
function Y(t, e) {
|
|
168
|
+
return e !== "rtl" ? t : t === "ArrowLeft" ? "ArrowRight" : t === "ArrowRight" ? "ArrowLeft" : t;
|
|
169
|
+
}
|
|
170
|
+
v(Y, "getDirectionAwareKey");
|
|
171
|
+
function $(t, e, u) {
|
|
172
|
+
const n = Y(t.key, u);
|
|
173
|
+
if (!(e === "vertical" && ["ArrowLeft", "ArrowRight"].includes(n)) && !(e === "horizontal" && ["ArrowUp", "ArrowDown"].includes(n)))
|
|
174
|
+
return ve[n];
|
|
175
|
+
}
|
|
176
|
+
v($, "getFocusIntent");
|
|
177
|
+
function H(t, e = !1) {
|
|
178
|
+
const u = document.activeElement;
|
|
179
|
+
for (const n of t)
|
|
180
|
+
if (n === u || (n.focus({ preventScroll: e }), document.activeElement !== u)) return;
|
|
181
|
+
}
|
|
182
|
+
v(H, "focusFirst");
|
|
183
|
+
function V(t, e) {
|
|
184
|
+
return t.map((u, n) => t[(e + n) % t.length]);
|
|
185
|
+
}
|
|
186
|
+
v(V, "wrapArray");
|
|
187
|
+
var Te = le, _e = me;
|
|
188
|
+
export {
|
|
189
|
+
Te as n,
|
|
190
|
+
we as r,
|
|
191
|
+
_e as t
|
|
192
|
+
};
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { t as m } from "./dist-CCdbu9GU.js";
|
|
2
|
+
import { i as P, r as p, t as S } from "./dist-D-yS0HN8.js";
|
|
3
|
+
import { t as M } from "./dist-DYIabsrY.js";
|
|
4
|
+
import { t as x } from "./dist-BUocnzkM.js";
|
|
5
|
+
import { t as y } from "./dist-DGOjiAnB2.js";
|
|
6
|
+
import { n as E, r as R, t as F } from "./dist-BdobXn93.js";
|
|
7
|
+
import * as f from "react";
|
|
8
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
9
|
+
var w = Object.defineProperty, v = (i, e) => w(i, "name", {
|
|
10
|
+
value: e,
|
|
11
|
+
configurable: !0
|
|
12
|
+
}), C = "Tabs", [D, U] = P(C, [R]), A = R(), [V, I] = D(C), G = /* @__PURE__ */ f.forwardRef(/* @__PURE__ */ v(function(e, l) {
|
|
13
|
+
const { __scopeTabs: s, value: t, onValueChange: r, defaultValue: c, orientation: a = "horizontal", dir: u, activationMode: T = "automatic", ...g } = e, n = y(u), [o, b] = S({
|
|
14
|
+
prop: t,
|
|
15
|
+
onChange: r,
|
|
16
|
+
defaultProp: c ?? "",
|
|
17
|
+
caller: C
|
|
18
|
+
});
|
|
19
|
+
return /* @__PURE__ */ d(V, {
|
|
20
|
+
scope: s,
|
|
21
|
+
baseId: M(),
|
|
22
|
+
value: o,
|
|
23
|
+
onValueChange: b,
|
|
24
|
+
orientation: a,
|
|
25
|
+
dir: n,
|
|
26
|
+
activationMode: T,
|
|
27
|
+
children: /* @__PURE__ */ d(m.div, {
|
|
28
|
+
dir: n,
|
|
29
|
+
"data-orientation": a,
|
|
30
|
+
...g,
|
|
31
|
+
ref: l
|
|
32
|
+
})
|
|
33
|
+
});
|
|
34
|
+
}, "Tabs")), L = "TabsList", N = /* @__PURE__ */ f.forwardRef(/* @__PURE__ */ v(function(e, l) {
|
|
35
|
+
const { __scopeTabs: s, loop: t = !0, ...r } = e, c = I(L, s), a = A(s);
|
|
36
|
+
return /* @__PURE__ */ d(E, {
|
|
37
|
+
asChild: !0,
|
|
38
|
+
...a,
|
|
39
|
+
orientation: c.orientation,
|
|
40
|
+
dir: c.dir,
|
|
41
|
+
loop: t,
|
|
42
|
+
children: /* @__PURE__ */ d(m.div, {
|
|
43
|
+
role: "tablist",
|
|
44
|
+
"aria-orientation": c.orientation,
|
|
45
|
+
...r,
|
|
46
|
+
ref: l
|
|
47
|
+
})
|
|
48
|
+
});
|
|
49
|
+
}, "TabsList")), $ = "TabsTrigger", k = /* @__PURE__ */ f.forwardRef(/* @__PURE__ */ v(function(e, l) {
|
|
50
|
+
const { __scopeTabs: s, value: t, disabled: r = !1, ...c } = e, a = I($, s), u = A(s), T = _(a.baseId, t), g = h(a.baseId, t), n = t === a.value;
|
|
51
|
+
return /* @__PURE__ */ d(F, {
|
|
52
|
+
asChild: !0,
|
|
53
|
+
...u,
|
|
54
|
+
focusable: !r,
|
|
55
|
+
active: n,
|
|
56
|
+
children: /* @__PURE__ */ d(m.button, {
|
|
57
|
+
type: "button",
|
|
58
|
+
role: "tab",
|
|
59
|
+
"aria-selected": n,
|
|
60
|
+
"aria-controls": g,
|
|
61
|
+
"data-state": n ? "active" : "inactive",
|
|
62
|
+
"data-disabled": r ? "" : void 0,
|
|
63
|
+
disabled: r,
|
|
64
|
+
id: T,
|
|
65
|
+
...c,
|
|
66
|
+
ref: l,
|
|
67
|
+
onMouseDown: p(e.onMouseDown, (o) => {
|
|
68
|
+
!r && o.button === 0 && o.ctrlKey === !1 ? a.onValueChange(t) : o.preventDefault();
|
|
69
|
+
}),
|
|
70
|
+
onKeyDown: p(e.onKeyDown, (o) => {
|
|
71
|
+
r || o.target !== o.currentTarget || [" ", "Enter"].includes(o.key) && a.onValueChange(t);
|
|
72
|
+
}),
|
|
73
|
+
onFocus: p(e.onFocus, () => {
|
|
74
|
+
const o = a.activationMode !== "manual";
|
|
75
|
+
!n && !r && o && a.onValueChange(t);
|
|
76
|
+
})
|
|
77
|
+
})
|
|
78
|
+
});
|
|
79
|
+
}, "TabsTrigger")), K = "TabsContent", j = /* @__PURE__ */ f.forwardRef(/* @__PURE__ */ v(function(e, l) {
|
|
80
|
+
const { __scopeTabs: s, value: t, forceMount: r, children: c, ...a } = e, u = I(K, s), T = _(u.baseId, t), g = h(u.baseId, t), n = t === u.value, o = f.useRef(n);
|
|
81
|
+
return f.useEffect(() => {
|
|
82
|
+
const b = requestAnimationFrame(() => o.current = !1);
|
|
83
|
+
return () => cancelAnimationFrame(b);
|
|
84
|
+
}, []), /* @__PURE__ */ d(x, {
|
|
85
|
+
present: r || n,
|
|
86
|
+
children: ({ present: b }) => /* @__PURE__ */ d(m.div, {
|
|
87
|
+
"data-state": n ? "active" : "inactive",
|
|
88
|
+
"data-orientation": u.orientation,
|
|
89
|
+
role: "tabpanel",
|
|
90
|
+
"aria-labelledby": T,
|
|
91
|
+
hidden: !b,
|
|
92
|
+
id: g,
|
|
93
|
+
tabIndex: 0,
|
|
94
|
+
...a,
|
|
95
|
+
ref: l,
|
|
96
|
+
style: {
|
|
97
|
+
...e.style,
|
|
98
|
+
animationDuration: o.current ? "0s" : void 0
|
|
99
|
+
},
|
|
100
|
+
children: b && c
|
|
101
|
+
})
|
|
102
|
+
});
|
|
103
|
+
}, "TabsContent"));
|
|
104
|
+
function _(i, e) {
|
|
105
|
+
return `${i}-trigger-${e}`;
|
|
106
|
+
}
|
|
107
|
+
v(_, "makeTriggerId");
|
|
108
|
+
function h(i, e) {
|
|
109
|
+
return `${i}-content-${e}`;
|
|
110
|
+
}
|
|
111
|
+
v(h, "makeContentId");
|
|
112
|
+
var W = G, X = N, Y = k, Z = j;
|
|
113
|
+
export {
|
|
114
|
+
Y as i,
|
|
115
|
+
X as n,
|
|
116
|
+
W as r,
|
|
117
|
+
Z as t
|
|
118
|
+
};
|