@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,146 +1,138 @@
|
|
|
1
|
-
import { t as
|
|
1
|
+
import { t as y } from "../../../../utils-Cx-WzRZF.js";
|
|
2
|
+
import { useClickOutside as Q } from "../../../../hooks/useClickOutside.js";
|
|
2
3
|
import { t as X } from "../../../../chevron-down-DNP-OOAQ.js";
|
|
3
|
-
import { Typography as
|
|
4
|
-
import { parseTimeString as
|
|
4
|
+
import { Typography as w } from "../../../Typography/Typography.js";
|
|
5
|
+
import { parseTimeString as P } from "../../utils/index.js";
|
|
5
6
|
import { useTimePickerContext as Y } from "../../contexts/time-picker.hook.js";
|
|
6
7
|
import { timePickerVariants as Z } from "../../TimePicker.variants.js";
|
|
7
8
|
import { WrapperList as _ } from "../WrapperList/WrapperList.js";
|
|
8
|
-
import { useCallback as
|
|
9
|
-
import { jsx as
|
|
10
|
-
var
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}, [
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
},
|
|
18
|
-
!
|
|
19
|
-
},
|
|
20
|
-
t.target !==
|
|
21
|
-
},
|
|
22
|
-
if (
|
|
23
|
-
|
|
24
|
-
const
|
|
25
|
-
if (
|
|
26
|
-
|
|
9
|
+
import { useCallback as ee, useEffect as S, useId as te, useRef as C, useState as I } from "react";
|
|
10
|
+
import { jsx as s, jsxs as p } from "react/jsx-runtime";
|
|
11
|
+
var ue = ({ name: A, label: N, isRequired: D, scrollBehavior: O, className: R, listClassName: V, listItemClassName: F, listItemButtonClassName: W, disabled: l, mode: T = "select", showList: $ = !0, error: j, placeholder: B }) => {
|
|
12
|
+
const H = te(), [u, a] = I(!1), m = C(!1), b = C(null), M = C(null), { format: f, formattedTime: i, setTimeDirectly: E, setIsTyping: v } = Y(), g = A ?? `time-${H}`, [k, h] = I(i), [L, n] = I(), x = j || L;
|
|
13
|
+
S(() => {
|
|
14
|
+
m.current || (h(i), n(void 0));
|
|
15
|
+
}, [i]);
|
|
16
|
+
const K = () => {
|
|
17
|
+
l || a((t) => !t);
|
|
18
|
+
}, U = () => {
|
|
19
|
+
!l && $ && a(!0), n(void 0);
|
|
20
|
+
}, q = (t) => {
|
|
21
|
+
t.target !== M.current && (m.current = !1, v(!1));
|
|
22
|
+
}, z = (t) => {
|
|
23
|
+
if (b.current?.contains(t.relatedTarget)) return;
|
|
24
|
+
m.current = !1, v(!1), a(!1);
|
|
25
|
+
const r = t.currentTarget.value.trim();
|
|
26
|
+
if (r === "") {
|
|
27
|
+
n(void 0);
|
|
27
28
|
return;
|
|
28
29
|
}
|
|
29
|
-
const e =
|
|
30
|
+
const e = P(r, f);
|
|
30
31
|
if (e) {
|
|
31
|
-
|
|
32
|
-
const
|
|
33
|
-
if (
|
|
32
|
+
n(void 0), E(e);
|
|
33
|
+
const o = e.getHours(), d = e.getMinutes().toString().padStart(2, "0");
|
|
34
|
+
if (f === "24") h(`${o.toString().padStart(2, "0")}:${d}`);
|
|
34
35
|
else {
|
|
35
|
-
const
|
|
36
|
-
|
|
36
|
+
const c = o % 12 || 12;
|
|
37
|
+
h(`${c}:${d} ${o >= 12 ? "PM" : "AM"}`);
|
|
37
38
|
}
|
|
38
|
-
} else
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
x,
|
|
42
|
-
l
|
|
43
|
-
]), J = m((t) => {
|
|
44
|
-
const a = t.target.value;
|
|
39
|
+
} else n("Invalid time");
|
|
40
|
+
}, G = (t) => {
|
|
41
|
+
const r = t.target.value;
|
|
45
42
|
let e = "";
|
|
46
|
-
|
|
47
|
-
const
|
|
48
|
-
if (
|
|
49
|
-
const
|
|
50
|
-
|
|
43
|
+
m.current = !0, v(!0);
|
|
44
|
+
const o = r.length < k.length;
|
|
45
|
+
if (f === "12") {
|
|
46
|
+
const c = r.replace(/[^0-9:apmAPM\s]/g, "").replace(/[apm]/gi, (J) => J.toUpperCase());
|
|
47
|
+
c.match(/^(\d{0,2}):?(\d{0,2})\s?(A|AM|P|PM)?$/i) || c === "" ? (e = c.slice(0, 8), !o && /^\d{2}$/.test(e) && (e = e + ":")) : e = k;
|
|
51
48
|
} else
|
|
52
|
-
e =
|
|
53
|
-
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
return A(() => {
|
|
63
|
-
const t = new AbortController(), a = (r) => {
|
|
64
|
-
r.key === "Escape" && o(!1);
|
|
65
|
-
}, e = (r) => {
|
|
66
|
-
C.current?.contains(r.target) || o(!1);
|
|
49
|
+
e = r.replace(/[^0-9:]/g, "").replace(/:+/g, ":").slice(0, 5), !o && /^\d{2}$/.test(e) && (e = e + ":");
|
|
50
|
+
h(e), n(void 0);
|
|
51
|
+
const d = P(e, f);
|
|
52
|
+
d && E(d);
|
|
53
|
+
};
|
|
54
|
+
return Q(b, ee(() => {
|
|
55
|
+
a(!1);
|
|
56
|
+
}, [])), S(() => {
|
|
57
|
+
const t = new AbortController(), r = (e) => {
|
|
58
|
+
e.key === "Escape" && a(!1);
|
|
67
59
|
};
|
|
68
|
-
return document.addEventListener("
|
|
60
|
+
return document.addEventListener("keydown", r, { signal: t.signal }), () => {
|
|
69
61
|
t.abort();
|
|
70
62
|
};
|
|
71
|
-
}, []), /* @__PURE__ */
|
|
72
|
-
ref:
|
|
73
|
-
onMouseDown:
|
|
74
|
-
className:
|
|
63
|
+
}, []), /* @__PURE__ */ p("div", {
|
|
64
|
+
ref: b,
|
|
65
|
+
onMouseDown: T === "input" ? q : void 0,
|
|
66
|
+
className: y("w-full", "text-slate-800", "text-sm", "flex", "flex-col", "gap-2"),
|
|
75
67
|
children: [
|
|
76
|
-
|
|
68
|
+
N ? /* @__PURE__ */ p(w, {
|
|
77
69
|
component: "label",
|
|
78
70
|
variant: "labelLarge",
|
|
79
|
-
htmlFor:
|
|
71
|
+
htmlFor: g,
|
|
80
72
|
className: "font-medium",
|
|
81
73
|
children: [
|
|
82
|
-
|
|
74
|
+
N,
|
|
83
75
|
" ",
|
|
84
|
-
|
|
76
|
+
D && /* @__PURE__ */ s(w, {
|
|
85
77
|
component: "span",
|
|
86
78
|
className: "text-red-600 dark:text-red-500 text-sm font-normal",
|
|
87
79
|
children: "*"
|
|
88
80
|
})
|
|
89
81
|
]
|
|
90
82
|
}) : null,
|
|
91
|
-
/* @__PURE__ */
|
|
83
|
+
/* @__PURE__ */ p("div", {
|
|
92
84
|
className: "relative",
|
|
93
|
-
children: [
|
|
94
|
-
"aria-label":
|
|
85
|
+
children: [T === "select" ? /* @__PURE__ */ p("button", {
|
|
86
|
+
"aria-label": g,
|
|
95
87
|
"aria-haspopup": "listbox",
|
|
96
88
|
"aria-expanded": "true",
|
|
97
89
|
"aria-controls": "time-options",
|
|
98
|
-
className:
|
|
99
|
-
"data-open":
|
|
100
|
-
onClick:
|
|
101
|
-
disabled:
|
|
102
|
-
children: [
|
|
90
|
+
className: y(Z({ className: R }), l && "opacity-50 cursor-not-allowed"),
|
|
91
|
+
"data-open": u,
|
|
92
|
+
onClick: K,
|
|
93
|
+
disabled: l,
|
|
94
|
+
children: [i, /* @__PURE__ */ s(X, {
|
|
103
95
|
className: "w-4 h-4 transition-all text-gray-400 data-[open=true]:rotate-180",
|
|
104
|
-
"data-open":
|
|
96
|
+
"data-open": u
|
|
105
97
|
})]
|
|
106
|
-
}) : /* @__PURE__ */
|
|
98
|
+
}) : /* @__PURE__ */ p("div", {
|
|
107
99
|
className: "flex flex-col gap-1",
|
|
108
|
-
children: [/* @__PURE__ */
|
|
109
|
-
ref:
|
|
100
|
+
children: [/* @__PURE__ */ s("input", {
|
|
101
|
+
ref: M,
|
|
110
102
|
type: "text",
|
|
111
|
-
"aria-label":
|
|
112
|
-
value:
|
|
113
|
-
onChange:
|
|
114
|
-
onFocus:
|
|
115
|
-
onBlur:
|
|
116
|
-
disabled:
|
|
117
|
-
"data-error": !!
|
|
118
|
-
"data-open":
|
|
119
|
-
placeholder:
|
|
120
|
-
className:
|
|
121
|
-
}),
|
|
103
|
+
"aria-label": g,
|
|
104
|
+
value: k,
|
|
105
|
+
onChange: G,
|
|
106
|
+
onFocus: U,
|
|
107
|
+
onBlur: z,
|
|
108
|
+
disabled: l,
|
|
109
|
+
"data-error": !!x,
|
|
110
|
+
"data-open": u,
|
|
111
|
+
placeholder: B,
|
|
112
|
+
className: y("w-full", "h-10", "px-2.5", "text-sm", "rounded", "border", "border-gray-300", "bg-white", "text-slate-800", "transition-all", "placeholder:text-slate-400", "focus-visible:outline-none", "data-[open=true]:ring-1", "data-[open=true]:ring-aurora-500", "dark:bg-metal-800", "dark:border-metal-700", "dark:text-white", "dark:placeholder:text-metal-300", "dark:data-[open=true]:ring-aurora-500", "disabled:cursor-not-allowed", "disabled:bg-gray-50", "disabled:text-slate-500", "dark:disabled:bg-metal-900", "dark:disabled:text-metal-400", { "border-red-600 data-[open=true]:border-red-600 data-[open=true]:ring-transparent dark:border-red-500": x })
|
|
113
|
+
}), x && /* @__PURE__ */ s(w, {
|
|
122
114
|
component: "span",
|
|
123
115
|
className: "text-red-600 dark:text-red-500 text-xs",
|
|
124
|
-
children:
|
|
116
|
+
children: x
|
|
125
117
|
})]
|
|
126
|
-
}),
|
|
127
|
-
isOpen:
|
|
128
|
-
scrollBehavior:
|
|
129
|
-
listClassName:
|
|
130
|
-
listItemClassName:
|
|
131
|
-
listItemButtonClassName:
|
|
132
|
-
onClose: () =>
|
|
118
|
+
}), $ && /* @__PURE__ */ s(_, {
|
|
119
|
+
isOpen: u,
|
|
120
|
+
scrollBehavior: O,
|
|
121
|
+
listClassName: V,
|
|
122
|
+
listItemClassName: F,
|
|
123
|
+
listItemButtonClassName: W,
|
|
124
|
+
onClose: () => a(!1)
|
|
133
125
|
})]
|
|
134
126
|
}),
|
|
135
|
-
/* @__PURE__ */
|
|
127
|
+
/* @__PURE__ */ s("input", {
|
|
136
128
|
type: "hidden",
|
|
137
|
-
name:
|
|
138
|
-
value:
|
|
129
|
+
name: g,
|
|
130
|
+
value: i,
|
|
139
131
|
className: "hidden"
|
|
140
132
|
})
|
|
141
133
|
]
|
|
142
134
|
});
|
|
143
135
|
};
|
|
144
136
|
export {
|
|
145
|
-
|
|
137
|
+
ue as Wrapper
|
|
146
138
|
};
|
|
@@ -1,41 +1,40 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import { getHours as a, getMinutes as
|
|
3
|
-
import { useTimePickerContext as
|
|
4
|
-
import { HoursList as
|
|
5
|
-
import { MeridianList as
|
|
1
|
+
import { t as c } from "../../../../utils-Cx-WzRZF.js";
|
|
2
|
+
import { getHours as a, getMinutes as s } from "../../utils/index.js";
|
|
3
|
+
import { useTimePickerContext as x } from "../../contexts/time-picker.hook.js";
|
|
4
|
+
import { HoursList as g } from "../HoursList/HoursList.js";
|
|
5
|
+
import { MeridianList as b } from "../MeridianList/MeridianList.js";
|
|
6
6
|
import { MinutesList as h } from "../MinutesList/MinutesList.js";
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return p ? /* @__PURE__ */ k("div", {
|
|
7
|
+
import { jsx as i, jsxs as k } from "react/jsx-runtime";
|
|
8
|
+
var P = ({ isOpen: d, scrollBehavior: t, listClassName: r, listItemClassName: o, listItemButtonClassName: e, onClose: m }) => {
|
|
9
|
+
const { time: n, format: p } = x(), u = a(n), f = s(n);
|
|
10
|
+
return d ? /* @__PURE__ */ k("div", {
|
|
12
11
|
role: "group",
|
|
13
|
-
className:
|
|
12
|
+
className: c("flex", "gap-1.5", "p-2", "rounded-md", "shadow", "w-max", "max-h-54", "absolute", "bg-white", "z-20", "animate-in", "fade-in-0", "zoom-in-95", "dark:bg-metal-800", "dark:border", "dark:border-metal-700", "mt-1"),
|
|
14
13
|
children: [
|
|
15
|
-
/* @__PURE__ */
|
|
16
|
-
hours:
|
|
17
|
-
scrollBehavior:
|
|
18
|
-
listClassName:
|
|
19
|
-
listItemClassName:
|
|
20
|
-
listItemButtonClassName:
|
|
14
|
+
/* @__PURE__ */ i(g, {
|
|
15
|
+
hours: u,
|
|
16
|
+
scrollBehavior: t,
|
|
17
|
+
listClassName: r,
|
|
18
|
+
listItemClassName: o,
|
|
19
|
+
listItemButtonClassName: e
|
|
21
20
|
}),
|
|
22
|
-
/* @__PURE__ */
|
|
23
|
-
minutes:
|
|
24
|
-
scrollBehavior:
|
|
25
|
-
listClassName:
|
|
26
|
-
listItemClassName:
|
|
27
|
-
listItemButtonClassName:
|
|
28
|
-
onClose:
|
|
21
|
+
/* @__PURE__ */ i(h, {
|
|
22
|
+
minutes: f,
|
|
23
|
+
scrollBehavior: t,
|
|
24
|
+
listClassName: r,
|
|
25
|
+
listItemClassName: o,
|
|
26
|
+
listItemButtonClassName: e,
|
|
27
|
+
onClose: p === "24" ? m : void 0
|
|
29
28
|
}),
|
|
30
|
-
/* @__PURE__ */
|
|
31
|
-
listClassName:
|
|
32
|
-
listItemClassName:
|
|
33
|
-
listItemButtonClassName:
|
|
34
|
-
onClose:
|
|
29
|
+
/* @__PURE__ */ i(b, {
|
|
30
|
+
listClassName: r,
|
|
31
|
+
listItemClassName: o,
|
|
32
|
+
listItemButtonClassName: e,
|
|
33
|
+
onClose: m
|
|
35
34
|
})
|
|
36
35
|
]
|
|
37
36
|
}) : null;
|
|
38
37
|
};
|
|
39
38
|
export {
|
|
40
|
-
|
|
39
|
+
P as WrapperList
|
|
41
40
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { getFormattedTime as g } from "../utils/index.js";
|
|
2
2
|
import { TimePickerContext as v } from "./time-picker.context.js";
|
|
3
|
-
import { useCallback as r, useEffect as H,
|
|
4
|
-
import { jsx as
|
|
5
|
-
var
|
|
6
|
-
const [i, w] = u(m), [e, a] = u(() => c), [T, D] = u(!1), n =
|
|
3
|
+
import { useCallback as r, useEffect as H, useState as u } from "react";
|
|
4
|
+
import { jsx as y } from "react/jsx-runtime";
|
|
5
|
+
var h = ({ children: f, time: c, format: m, onChange: l }) => {
|
|
6
|
+
const [i, w] = u(m), [e, a] = u(() => c), [T, D] = u(!1), n = e ? e.getHours() < 12 : !0, o = r((t) => {
|
|
7
7
|
a(t), l?.(t);
|
|
8
|
-
}, [l]),
|
|
8
|
+
}, [l]), S = r((t) => {
|
|
9
9
|
const s = e ? new Date(e) : /* @__PURE__ */ new Date();
|
|
10
10
|
i === "12" ? t === 12 ? s.setHours(n ? 0 : 12) : s.setHours(n ? t : t + 12) : s.setHours(t), e || s.setMinutes(0, 0, 0), o(s);
|
|
11
11
|
}, [
|
|
@@ -13,7 +13,7 @@ var j = ({ children: f, time: c, format: m, onChange: l }) => {
|
|
|
13
13
|
n,
|
|
14
14
|
e,
|
|
15
15
|
o
|
|
16
|
-
]),
|
|
16
|
+
]), M = r((t) => {
|
|
17
17
|
const s = e ? new Date(e) : /* @__PURE__ */ new Date();
|
|
18
18
|
e || s.setHours(0, 0, 0, 0), s.setMinutes(t), o(s);
|
|
19
19
|
}, [e, o]), p = r(() => {
|
|
@@ -37,15 +37,15 @@ var j = ({ children: f, time: c, format: m, onChange: l }) => {
|
|
|
37
37
|
a(c);
|
|
38
38
|
}, [c]), H(() => {
|
|
39
39
|
w(m);
|
|
40
|
-
}, [m]), /* @__PURE__ */
|
|
40
|
+
}, [m]), /* @__PURE__ */ y(v.Provider, {
|
|
41
41
|
value: {
|
|
42
42
|
time: e,
|
|
43
43
|
format: i,
|
|
44
44
|
formattedTime: e ? g(e, i) : "",
|
|
45
45
|
isAM: n,
|
|
46
46
|
isTyping: T,
|
|
47
|
-
onSelectHour:
|
|
48
|
-
onSelectMinute:
|
|
47
|
+
onSelectHour: S,
|
|
48
|
+
onSelectMinute: M,
|
|
49
49
|
onSelectAM: p,
|
|
50
50
|
onSelectPM: d,
|
|
51
51
|
setTimeDirectly: P,
|
|
@@ -55,5 +55,5 @@ var j = ({ children: f, time: c, format: m, onChange: l }) => {
|
|
|
55
55
|
});
|
|
56
56
|
};
|
|
57
57
|
export {
|
|
58
|
-
|
|
58
|
+
h as TimePickerProvider
|
|
59
59
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as p } from "../../utils-Cx-WzRZF.js";
|
|
2
|
-
import { a as c, i as h, n as x, o as f, r as g, t as w } from "../../dist-
|
|
2
|
+
import { a as c, i as h, n as x, o as f, r as g, t as w } from "../../dist-tGUUcv8n.js";
|
|
3
3
|
import { jsx as r, jsxs as a } from "react/jsx-runtime";
|
|
4
4
|
var C = ({ content: t, children: e, side: s = "top", sideOffset: o = 4, bgClassName: i = "bg-slate-700", arrowClassName: l = "fill-slate-700", textClassName: n = "text-white", className: d, delayDuration: m = 0 }) => /* @__PURE__ */ r(h, {
|
|
5
5
|
delayDuration: m,
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { t as l } from "../../utils-Cx-WzRZF.js";
|
|
2
2
|
import { Actions as ee } from "./components/Actions/Actions.js";
|
|
3
|
-
import { t as re } from "../../table.provider-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
3
|
+
import { t as re } from "../../table.provider-B0BafHuU.js";
|
|
4
|
+
import { sendResetFiltersEvent as te } from "./events/filters/filters.js";
|
|
5
|
+
import { sendRefreshEvent as ae } from "./events/refresh/refresh.js";
|
|
6
|
+
import { sendCollapseRowEvent as le, sendExpandRowEvent as oe, sendToggleRowEvent as ie } from "./events/row/row.js";
|
|
7
|
+
import { Body as se } from "./components/Body/Body.js";
|
|
8
|
+
import { Filter as ne } from "./components/Filter/Filter.js";
|
|
9
|
+
import { Header as me } from "./components/Header/Header.js";
|
|
10
|
+
import { Pagination as ce } from "./components/Pagination/Pagination.js";
|
|
11
|
+
import { TruncateText as de } from "./components/TruncateText/TruncateText.js";
|
|
12
|
+
import { WrapperBody as fe } from "./components/WrapperBody/WrapperBody.js";
|
|
11
13
|
import { jsx as e, jsxs as o } from "react/jsx-runtime";
|
|
12
|
-
var pe = ({ id: i, ariaLabel:
|
|
14
|
+
var pe = ({ id: i, ariaLabel: f, columns: p, data: v, totalItems: u = -1 / 0, className: b, classNameHeaderActiveArrows: w, classNameHeaderArrows: E, classNameHeaderTable: T, classNameTable: N, classNameWrapperTable: h, isLoading: a, emptyState: k, errorState: x, headerContent: A, classNameHeaderContent: R, classNameScrollContainer: s, getRowId: y, fetchData: z, queryOptions: B, showPagination: P, showTotalItems: n, showDropdownPagination: m, showDotPagination: c, showFormPagination: d, pageSizes: V, dropdownPaginationDirection: g, showFilter: j = !1, showFilterInput: F, filterSearchPlaceholder: H = "", filters: I, multiSelectFilter: K, filterActions: W, showResetButton: q = !0, resetButtonClassName: C, closeOnApply: G = !0, enableHoverRow: J, classNameHoverRow: M, enableExpandedRow: O, expandedState: Q, defaultExpanded: U, classNameExpandedRow: X, classNameExpandedCell: Y, classNameExpandedContent: Z, classNameExpandedHeader: _, classNameActiveExpandedRow: $, onExpandedChange: L, renderExpandedRow: S, keepExpandColumnVisible: D }) => {
|
|
13
15
|
const r = P || [
|
|
14
16
|
n,
|
|
15
17
|
m,
|
|
@@ -18,10 +20,10 @@ var pe = ({ id: i, ariaLabel: p, columns: f, data: v, totalItems: u = -1 / 0, cl
|
|
|
18
20
|
].some(Boolean);
|
|
19
21
|
return /* @__PURE__ */ e(re, {
|
|
20
22
|
id: i,
|
|
21
|
-
columns:
|
|
23
|
+
columns: p,
|
|
22
24
|
data: v,
|
|
23
25
|
headerContent: A,
|
|
24
|
-
getRowId:
|
|
26
|
+
getRowId: y,
|
|
25
27
|
fetchData: z,
|
|
26
28
|
totalItems: u,
|
|
27
29
|
queryOptions: B,
|
|
@@ -41,7 +43,7 @@ var pe = ({ id: i, ariaLabel: p, columns: f, data: v, totalItems: u = -1 / 0, cl
|
|
|
41
43
|
keepExpandColumnVisible: D,
|
|
42
44
|
children: /* @__PURE__ */ o("section", {
|
|
43
45
|
className: l("kvt", "w-full min-w-fit", b),
|
|
44
|
-
children: [j && /* @__PURE__ */ e(
|
|
46
|
+
children: [j && /* @__PURE__ */ e(ne, {
|
|
45
47
|
id: i,
|
|
46
48
|
actions: W,
|
|
47
49
|
filters: I,
|
|
@@ -55,26 +57,26 @@ var pe = ({ id: i, ariaLabel: p, columns: f, data: v, totalItems: u = -1 / 0, cl
|
|
|
55
57
|
className: l("kvt-scroll", "w-full", s),
|
|
56
58
|
children: /* @__PURE__ */ o("div", {
|
|
57
59
|
className: "kvt-scroll-content w-full min-w-fit",
|
|
58
|
-
children: [/* @__PURE__ */ e(
|
|
60
|
+
children: [/* @__PURE__ */ e(fe, {
|
|
59
61
|
showPagination: r,
|
|
60
|
-
classNameWrapperTable:
|
|
62
|
+
classNameWrapperTable: h,
|
|
61
63
|
isLoading: a,
|
|
62
64
|
children: /* @__PURE__ */ o("table", {
|
|
63
65
|
className: l("kvt-table", "w-full border-collapse table-auto", "dark:border-separate dark:border-spacing-0", N),
|
|
64
|
-
"aria-label":
|
|
65
|
-
children: [/* @__PURE__ */ e(
|
|
66
|
-
className:
|
|
67
|
-
classNameArrows:
|
|
66
|
+
"aria-label": f,
|
|
67
|
+
children: [/* @__PURE__ */ e(me, {
|
|
68
|
+
className: T,
|
|
69
|
+
classNameArrows: E,
|
|
68
70
|
classNameActiveArrows: w,
|
|
69
|
-
classNameHeaderContent:
|
|
70
|
-
}), /* @__PURE__ */ e(
|
|
71
|
+
classNameHeaderContent: R
|
|
72
|
+
}), /* @__PURE__ */ e(se, {
|
|
71
73
|
isLoading: a,
|
|
72
74
|
showPagination: r,
|
|
73
|
-
emptyState:
|
|
74
|
-
errorState:
|
|
75
|
+
emptyState: k,
|
|
76
|
+
errorState: x
|
|
75
77
|
})]
|
|
76
78
|
})
|
|
77
|
-
}), r && /* @__PURE__ */ e(
|
|
79
|
+
}), r && /* @__PURE__ */ e(ce, {
|
|
78
80
|
showTotalItems: n,
|
|
79
81
|
showDropdownPagination: m,
|
|
80
82
|
showDotPagination: c,
|
|
@@ -90,15 +92,16 @@ var pe = ({ id: i, ariaLabel: p, columns: f, data: v, totalItems: u = -1 / 0, cl
|
|
|
90
92
|
});
|
|
91
93
|
}, t = pe;
|
|
92
94
|
t.displayName = "KonstructVirtualizedTable";
|
|
93
|
-
t.TruncateText =
|
|
95
|
+
t.TruncateText = de;
|
|
94
96
|
t.Actions = ee;
|
|
95
97
|
t.Events = {
|
|
96
|
-
sendExpandRowEvent:
|
|
97
|
-
sendCollapseRowEvent:
|
|
98
|
-
sendToggleRowEvent:
|
|
99
|
-
sendResetFiltersEvent:
|
|
98
|
+
sendExpandRowEvent: oe,
|
|
99
|
+
sendCollapseRowEvent: le,
|
|
100
|
+
sendToggleRowEvent: ie,
|
|
101
|
+
sendResetFiltersEvent: te,
|
|
102
|
+
sendRefreshEvent: ae
|
|
100
103
|
};
|
|
101
104
|
export {
|
|
102
|
-
|
|
105
|
+
de as TruncateText,
|
|
103
106
|
t as VirtualizedTable
|
|
104
107
|
};
|
|
@@ -34,7 +34,6 @@ var C = 36, H = 16, D = ({ actions: i, wrapperClassName: h, triggerButtonClassNa
|
|
|
34
34
|
shape: "circle",
|
|
35
35
|
size: "large",
|
|
36
36
|
className: r("text-slate-400", "group-hover:text-slate-800", "group-hover:bg-aurora-50", "dark:text-metal-400", "dark:group-hover:text-aurora-500", "dark:group-hover:bg-aurora-900", v),
|
|
37
|
-
role: "presentation",
|
|
38
37
|
children: [/* @__PURE__ */ n(B, {
|
|
39
38
|
"aria-hidden": "true",
|
|
40
39
|
className: r("w-7 h-7", f)
|
|
@@ -49,7 +48,6 @@ var C = 36, H = 16, D = ({ actions: i, wrapperClassName: h, triggerButtonClassNa
|
|
|
49
48
|
children: i.map(({ id: o, label: t, className: p, component: a = g, componentProps: l, onClick: e }, s) => /* @__PURE__ */ n(a, {
|
|
50
49
|
className: r("w-full", "text-slate-800", "cursor-pointer", "p-0", "h-9", "flex", "gap-2", "text-sm", "font-normal", "justify-start", "rounded-none", "px-6", "hover:bg-gray-50", "hover:text-slate-800", "hover:no-underline", "dark:hover:bg-metal-700", p),
|
|
51
50
|
variant: "link",
|
|
52
|
-
role: "presentation",
|
|
53
51
|
onClick: () => e(x.row.original),
|
|
54
52
|
...l,
|
|
55
53
|
children: t
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { t as r } from "../../../../utils-Cx-WzRZF.js";
|
|
2
|
-
import { n as I } from "../../../../table.provider-
|
|
2
|
+
import { n as I } from "../../../../table.provider-B0BafHuU.js";
|
|
3
3
|
import { useTableContext as T } from "../../contexts/table.hook.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { isPaginationBarVisible as q } from "../../utils/pagination.js";
|
|
5
|
+
import { Skeleton as G } from "../Skeleton/Skeleton.js";
|
|
6
6
|
import { ExpandableRow as J } from "../ExpandableRow/ExpandableRow.js";
|
|
7
7
|
import { Fragment as K } from "react";
|
|
8
8
|
import { jsx as e, jsxs as Q } from "react/jsx-runtime";
|
|
9
9
|
var re = ({ isLoading: v, showPagination: N, emptyState: y, errorState: a }) => {
|
|
10
10
|
const { table: m, pageSize: E, totalItems: R = -1 / 0, tableLoading: C, tableError: c, enableExpandedRow: D, classNameExpandedRow: j, classNameExpandedCell: B, classNameExpandedContent: V, enableHoverRow: u, classNameHoverRow: z, classNameActiveExpandedRow: L, renderExpandedRow: f, isBorderOnAdjacentCell: _, isExpandColumnVisible: A } = T();
|
|
11
|
-
if (v || C) return /* @__PURE__ */ e(
|
|
11
|
+
if (v || C) return /* @__PURE__ */ e(G, {
|
|
12
12
|
numberOfRows: E,
|
|
13
13
|
table: m
|
|
14
14
|
});
|
|
15
|
-
const t = m.getRowModel().rows ?? [], l = N &&
|
|
15
|
+
const t = m.getRowModel().rows ?? [], l = N && q(R), x = t.length === 0 && !!c && !!a, h = t.length > 0 ? null : c && a ? typeof a == "function" ? a(c) : a : y ?? null;
|
|
16
16
|
if (h) {
|
|
17
17
|
const d = m.getVisibleLeafColumns().length;
|
|
18
18
|
return /* @__PURE__ */ e("tbody", {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as o } from "../../../../utils-Cx-WzRZF.js";
|
|
2
2
|
import { t as u } from "../../../../chevron-up-Bjpvg6ui.js";
|
|
3
3
|
import { Typography as c } from "../../../Typography/Typography.js";
|
|
4
|
-
import { i as b, n as v, r as w, t as S } from "../../../../dist-
|
|
4
|
+
import { i as b, n as v, r as w, t as S } from "../../../../dist-BaPW7qXd2.js";
|
|
5
5
|
import { listVariants as k } from "../../../Select/components/List/List.variants.js";
|
|
6
6
|
import { listItemVariants as N } from "../../../Select/components/ListItem/ListItem.variants.js";
|
|
7
7
|
import { selectVariants as C } from "../../../Select/Select.variants.js";
|