@konstructio/ui 0.1.2-alpha.76 → 0.1.2-alpha.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AdditionalOptions-DiXvUzhu.js +42 -0
- package/dist/Modal-h5H4yxYg.js +128 -0
- package/dist/assets/icons/components/Accounts.js +23 -35
- package/dist/assets/icons/components/AddChart.js +20 -26
- package/dist/assets/icons/components/AlertOutline.js +20 -26
- package/dist/assets/icons/components/AppRepo.js +20 -26
- package/dist/assets/icons/components/Apps.js +20 -26
- package/dist/assets/icons/components/Archives.js +20 -26
- package/dist/assets/icons/components/ArrowDown.js +20 -26
- package/dist/assets/icons/components/ArrowLeft.js +20 -26
- package/dist/assets/icons/components/ArrowRight.js +20 -26
- package/dist/assets/icons/components/ArrowUp.js +19 -25
- package/dist/assets/icons/components/BarChart.js +24 -36
- package/dist/assets/icons/components/BookOpen.js +20 -30
- package/dist/assets/icons/components/CalendarMonth.js +20 -26
- package/dist/assets/icons/components/Check.js +20 -26
- package/dist/assets/icons/components/CheckCircleFilled.js +25 -29
- package/dist/assets/icons/components/CheckCircleOutline.js +20 -26
- package/dist/assets/icons/components/CheckboxMarkedCircleOutline.js +20 -24
- package/dist/assets/icons/components/ClockAlert.js +20 -26
- package/dist/assets/icons/components/ClockOutline.js +20 -26
- package/dist/assets/icons/components/Close.js +20 -26
- package/dist/assets/icons/components/Cloud.js +20 -20
- package/dist/assets/icons/components/CloudLockOutline.js +20 -26
- package/dist/assets/icons/components/Clusters.js +24 -42
- package/dist/assets/icons/components/CogOutline.js +20 -26
- package/dist/assets/icons/components/Copy.js +20 -26
- package/dist/assets/icons/components/Cpu.js +23 -39
- package/dist/assets/icons/components/Cube.js +20 -26
- package/dist/assets/icons/components/Datacenter.js +20 -26
- package/dist/assets/icons/components/Delete.js +20 -26
- package/dist/assets/icons/components/DollarSign.js +20 -28
- package/dist/assets/icons/components/Download.js +20 -26
- package/dist/assets/icons/components/Edit.js +20 -26
- package/dist/assets/icons/components/Ellipses.js +20 -26
- package/dist/assets/icons/components/Environments.js +20 -28
- package/dist/assets/icons/components/Error.js +20 -26
- package/dist/assets/icons/components/ErrorOutline.js +20 -26
- package/dist/assets/icons/components/Exclamation.js +20 -26
- package/dist/assets/icons/components/Git.js +20 -26
- package/dist/assets/icons/components/GitOpsCatalog.js +23 -39
- package/dist/assets/icons/components/GridView.js +20 -20
- package/dist/assets/icons/components/Help.js +25 -23
- package/dist/assets/icons/components/HideOutline.js +23 -35
- package/dist/assets/icons/components/Home.js +20 -26
- package/dist/assets/icons/components/Home2.js +20 -26
- package/dist/assets/icons/components/Id.js +19 -25
- package/dist/assets/icons/components/InfoCircle.js +25 -29
- package/dist/assets/icons/components/InformationOutline.js +20 -26
- package/dist/assets/icons/components/InvoiceList.js +20 -26
- package/dist/assets/icons/components/Key.js +20 -26
- package/dist/assets/icons/components/LightBulb.js +23 -41
- package/dist/assets/icons/components/Loader.js +20 -26
- package/dist/assets/icons/components/Network.js +20 -26
- package/dist/assets/icons/components/PagesStack.js +25 -23
- package/dist/assets/icons/components/Pageview.js +20 -26
- package/dist/assets/icons/components/People.js +20 -26
- package/dist/assets/icons/components/PhotoLibrary.js +19 -25
- package/dist/assets/icons/components/Pipeline.js +20 -28
- package/dist/assets/icons/components/Plus.js +20 -26
- package/dist/assets/icons/components/PowerSettings.js +20 -26
- package/dist/assets/icons/components/Preview.js +20 -26
- package/dist/assets/icons/components/ReceiptLong.js +20 -20
- package/dist/assets/icons/components/Refresh.js +20 -26
- package/dist/assets/icons/components/ScatterPlot.js +20 -20
- package/dist/assets/icons/components/Search.js +25 -30
- package/dist/assets/icons/components/Server.js +20 -26
- package/dist/assets/icons/components/Start.js +20 -26
- package/dist/assets/icons/components/TabNew.js +24 -48
- package/dist/assets/icons/components/Teams.js +20 -26
- package/dist/assets/icons/components/Upload.js +19 -25
- package/dist/assets/icons/components/Warning.js +20 -26
- package/dist/assets/icons/components/WarningTriangle.js +20 -26
- package/dist/assets/icons/components/X.js +20 -26
- package/dist/compiler-runtime-DA41awpA.js +36 -0
- package/dist/components/Alert/Alert.js +78 -61
- package/dist/components/Alert/Alert.variants.js +30 -85
- package/dist/components/AlertDialog/AlertDialog.js +102 -128
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +3 -2
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/AlertDialog/hooks/useAlertDialog.js +25 -7
- package/dist/components/Autocomplete/Autocomplete.js +55 -83
- package/dist/components/Autocomplete/Autocomplete.variants.js +1 -21
- package/dist/components/Autocomplete/components/List/List.js +48 -45
- package/dist/components/Autocomplete/components/List/List.variants.js +1 -29
- package/dist/components/Autocomplete/hooks/useAutocomplete.js +74 -58
- package/dist/components/Autocomplete/hooks/useNavigationList.js +68 -62
- package/dist/components/Badge/Badge.js +66 -77
- package/dist/components/Badge/Badge.variants.js +33 -96
- package/dist/components/Breadcrumb/Breadcrumb.js +78 -70
- package/dist/components/Breadcrumb/Breadcrumb.variants.js +1 -7
- package/dist/components/Breadcrumb/components/Item/Item.js +33 -47
- package/dist/components/Breadcrumb/components/Item/Item.variants.js +26 -63
- package/dist/components/Button/Button.js +37 -40
- package/dist/components/Button/Button.variants.js +96 -292
- package/dist/components/ButtonGroup/ButtonGroup.js +101 -138
- package/dist/components/ButtonGroup/ButtonGroup.variants.js +9 -31
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.js +105 -113
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.variants.js +48 -94
- package/dist/components/ButtonGroup/components/ButtonGroupLabel/ButtonGroupLabel.js +26 -43
- package/dist/components/ButtonGroup/components/ButtonGroupMessage/ButtonGroupMessage.js +28 -35
- package/dist/components/ButtonGroup/hooks/useButtonGroup.js +63 -61
- package/dist/components/Card/Card.js +35 -35
- package/dist/components/Card/Card.variants.js +25 -37
- package/dist/components/Checkbox/Checkbox.js +247 -268
- package/dist/components/Checkbox/Checkbox.variants.js +18 -65
- package/dist/components/Command/Command.js +46 -38
- package/dist/components/Command/Command.variants.js +1 -44
- package/dist/components/Command/components/Command.js +19 -6
- package/dist/components/Command/components/CommandEmpty.js +11 -13
- package/dist/components/Command/components/CommandGroup.js +19 -17
- package/dist/components/Command/components/CommandInput.js +60 -52
- package/dist/components/Command/components/CommandItem.js +28 -26
- package/dist/components/Command/components/CommandList.js +19 -14
- package/dist/components/Command/components/CommandSeparator.js +19 -14
- package/dist/components/Command/components/CommandShortcut.js +16 -16
- package/dist/components/Command/components/DialogContent.js +35 -29
- package/dist/components/Command/components/DialogOverlay.js +18 -16
- package/dist/components/Command/contexts/Command.provider.js +23 -21
- package/dist/components/Counter/Counter.js +151 -154
- package/dist/components/Counter/Counter.variants.js +6 -53
- package/dist/components/DateRangePicker/DateRangePicker.js +93 -162
- package/dist/components/DateRangePicker/DateRangePicker.variants.js +1 -20
- package/dist/components/DateRangePicker/components/CalendarPanel/CalendarPanel.js +81 -115
- package/dist/components/DateRangePicker/components/CalendarPanel/CalendarPanel.variants.js +1 -45
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarDivider/CalendarDivider.js +14 -20
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.js +50 -57
- package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +56 -251
- package/dist/components/DateRangePicker/components/CalendarPanel/components/NavigationButton/NavigationButton.js +33 -37
- package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +30 -95
- package/dist/components/DateRangePicker/components/CalendarPanel/constants/index.js +10 -126
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useIndependentCarousel.js +138 -113
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useTogetherCarousel.js +2 -16
- package/dist/components/DateRangePicker/components/DateTimeInputs/DateTimeInputs.js +68 -102
- package/dist/components/DateRangePicker/components/DateTimeInputs/DateTimeInputs.variants.js +1 -22
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.js +55 -90
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.js +55 -90
- package/dist/components/DateRangePicker/components/DateTimeInputs/hooks/useDateTimeInputs.js +204 -177
- package/dist/components/DateRangePicker/components/PresetPanel/PresetPanel.js +58 -63
- package/dist/components/DateRangePicker/components/PresetPanel/PresetPanel.variants.js +1 -19
- package/dist/components/DateRangePicker/constants/presets.js +16 -7
- package/dist/components/DateRangePicker/contexts/date-range-picker.hook.js +1 -3
- package/dist/components/DateRangePicker/contexts/date-range-picker.provider.js +187 -171
- package/dist/components/DateRangePicker/utils/disabled-dates.js +16 -22
- package/dist/components/DateRangePicker/utils/validation.js +2 -17
- package/dist/components/Datepicker/DatePicker.js +80 -135
- package/dist/components/Divider/Divider.js +18 -7
- package/dist/components/Drawer/Drawer.js +108 -130
- package/dist/components/Drawer/Drawer.variants.js +17 -81
- package/dist/components/Drawer/components/Body/Body.js +18 -21
- package/dist/components/Drawer/components/Footer/Footer.js +18 -23
- package/dist/components/Drawer/components/Header/Header.js +20 -24
- package/dist/components/Drawer/contexts/Drawer.context.js +2 -2
- package/dist/components/Drawer/hooks/useDrawer.js +81 -57
- package/dist/components/DropdownButton/DropdownButton.js +99 -114
- package/dist/components/Filter/Filter.js +40 -29
- package/dist/components/Filter/Filter.variants.js +1 -17
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.js +128 -94
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +83 -144
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +87 -81
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +66 -120
- package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.hook.js +22 -34
- package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.js +74 -117
- package/dist/components/Filter/components/ResetButton/ResetButton.js +24 -29
- package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +83 -135
- package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.hook.js +83 -69
- package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.js +80 -151
- package/dist/components/Filter/contexts/filter.provider.js +16 -4
- package/dist/components/Filter/events/index.js +3 -3
- package/dist/components/ImageUpload/ImageUpload.js +48 -150
- package/dist/components/ImageUpload/ImageUpload.variants.js +41 -93
- package/dist/components/Input/Input.js +43 -168
- package/dist/components/Input/Input.variants.js +9 -51
- package/dist/components/LineChart/LineChart.js +83 -120
- package/dist/components/Loading/Loading.js +22 -18
- package/dist/components/Loading/Loading.variants.js +1 -8
- package/dist/components/Modal/Modal.js +3 -2
- package/dist/components/Modal/components/Body/Body.js +16 -5
- package/dist/components/Modal/components/Footer/Footer.js +16 -11
- package/dist/components/Modal/components/Header/Header.js +16 -11
- package/dist/components/Modal/components/Wrapper/Wrapper.js +4 -3
- package/dist/components/Modal/components/Wrapper/Wrapper.variants.js +1 -28
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/Modal/contexts/Modal.context.js +1 -3
- package/dist/components/Modal/contexts/Modal.provider.js +33 -23
- package/dist/components/Modal/hooks/useModal.js +29 -18
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.js +26 -32
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.variants.js +1 -25
- package/dist/components/MultiSelectDropdown/components/Item/Item.js +32 -27
- package/dist/components/MultiSelectDropdown/components/Item/Item.variants.js +13 -32
- package/dist/components/MultiSelectDropdown/components/List/List.js +26 -27
- package/dist/components/MultiSelectDropdown/components/List/List.variants.js +1 -21
- package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.js +73 -123
- package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.hook.js +1 -3
- package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.provider.js +128 -131
- package/dist/components/MultiSelectDropdown/hooks/useMultiSelectDropdown.js +30 -26
- package/dist/components/PhoneNumberInput/PhoneNumberInput.js +19 -6
- package/dist/components/PhoneNumberInput/PhoneNumberInput.variants.js +9 -39
- package/dist/components/PhoneNumberInput/components/FlagContent/FlagContent.js +28 -33
- package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +171 -231
- package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +7 -41
- package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +47 -36
- package/dist/components/PhoneNumberInput/components/Wrapper.js +465 -503
- package/dist/components/PhoneNumberInput/contexts/phone-number.hook.js +1 -3
- package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +1163 -1135
- package/dist/components/PieChart/PieChart.js +82 -72
- package/dist/components/ProgressBar/ProgressBar.js +47 -38
- package/dist/components/ProgressBar/ProgressBar.variants.js +11 -28
- package/dist/components/Radio/Radio.js +71 -95
- package/dist/components/Radio/Radio.variants.js +33 -85
- package/dist/components/RadioCard/RadioCard.js +32 -36
- package/dist/components/RadioCardGroup/RadioCardGroup.js +42 -43
- package/dist/components/RadioGroup/RadioGroup.js +48 -48
- package/dist/components/Range/Range.js +83 -61
- package/dist/components/Range/Range.variants.js +19 -49
- package/dist/components/Select/Select.js +52 -65
- package/dist/components/Select/Select.variants.js +13 -66
- package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.js +3 -2
- package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.variants.js +1 -22
- package/dist/components/Select/components/EmptyList.js +8 -3
- package/dist/components/Select/components/List/List.js +89 -168
- package/dist/components/Select/components/List/List.variants.js +1 -41
- package/dist/components/Select/components/ListItem/ListItem.js +41 -96
- package/dist/components/Select/components/ListItem/ListItem.variants.js +1 -19
- package/dist/components/Select/components/Wrapper.js +110 -233
- package/dist/components/Select/components/index.js +1 -1
- package/dist/components/Select/contexts/select.provider.js +34 -41
- package/dist/components/Select/hooks/useNavigationList.js +50 -44
- package/dist/components/Select/hooks/useSelect.js +104 -94
- package/dist/components/Sidebar/Sidebar.js +26 -21
- package/dist/components/Sidebar/Sidebar.variants.js +1 -27
- package/dist/components/Sidebar/components/Footer/Footer.js +18 -6
- package/dist/components/Sidebar/components/Footer/Footer.variants.js +1 -8
- package/dist/components/Sidebar/components/Logo/Logo.js +18 -6
- package/dist/components/Sidebar/components/Logo/Logo.variants.js +1 -19
- package/dist/components/Sidebar/components/Navigation/Navigation.js +26 -17
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.js +33 -24
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +24 -24
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.js +12 -39
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.js +17 -6
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.variants.js +1 -5
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.js +20 -5
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.variants.js +1 -10
- package/dist/components/Sidebar/components/Wrapper/Wrapper.js +21 -60
- package/dist/components/Slider/Slider.js +70 -56
- package/dist/components/Slider/Slider.variants.js +19 -41
- package/dist/components/Spinner/Spinner.js +56 -55
- package/dist/components/Spinner/Spinner.variants.js +19 -45
- package/dist/components/Stepper/Stepper.js +56 -72
- package/dist/components/Stepper/Stepper.variants.js +132 -188
- package/dist/components/Stepper/components/HorizontalStepItem/HorizontalStepItem.js +151 -197
- package/dist/components/Stepper/components/StepConnector/StepConnector.js +24 -27
- package/dist/components/Stepper/components/StepIndicatorContent/StepIndicatorContent.js +39 -20
- package/dist/components/Stepper/components/StepItem/StepItem.js +15 -6
- package/dist/components/Stepper/components/VerticalStepItem/VerticalStepItem.js +93 -111
- package/dist/components/Stepper/hooks/useStepItemLogic.js +3 -6
- package/dist/components/Switch/Switch.js +135 -178
- package/dist/components/Switch/Switch.variants.js +1 -40
- package/dist/components/Table/Table.js +29 -25
- package/dist/components/Table/Table.variants.js +6 -30
- package/dist/components/Table/components/Body.js +20 -16
- package/dist/components/Table/components/Filter.js +21 -7
- package/dist/components/Table/components/Head.js +20 -16
- package/dist/components/Table/components/Row.js +28 -26
- package/dist/components/Tabs/Tabs.js +34 -26
- package/dist/components/Tabs/Tabs.variants.js +10 -39
- package/dist/components/Tabs/components/Content.js +23 -14
- package/dist/components/Tabs/components/List.js +28 -19
- package/dist/components/Tabs/components/Trigger.js +25 -21
- package/dist/components/Tag/Tag.js +33 -17
- package/dist/components/Tag/Tag.variants.js +23 -36
- package/dist/components/TagSelect/TagSelect.js +19 -8
- package/dist/components/TagSelect/TagSelect.variants.js +1 -22
- package/dist/components/TagSelect/components/Item/Item.js +24 -18
- package/dist/components/TagSelect/components/Item/Item.variants.js +13 -26
- package/dist/components/TagSelect/components/List/List.js +22 -9
- package/dist/components/TagSelect/components/List/List.variants.js +1 -19
- package/dist/components/TagSelect/components/Wrapper/Wrapper.js +68 -84
- package/dist/components/TagSelect/contexts/TagSelect.provider.js +75 -65
- package/dist/components/TagSelect/hooks/useTagSelect.js +30 -26
- package/dist/components/TextArea/TextArea.js +35 -34
- package/dist/components/TextArea/TextArea.variants.js +1 -16
- package/dist/components/TimePicker/TimePicker.js +21 -11
- package/dist/components/TimePicker/TimePicker.variants.js +1 -64
- package/dist/components/TimePicker/components/HoursList/HoursList.js +77 -116
- package/dist/components/TimePicker/components/MeridianList/MeridianList.js +79 -88
- package/dist/components/TimePicker/components/MinutesList/MinutesList.js +66 -89
- package/dist/components/TimePicker/components/Wrapper/Wrapper.js +144 -228
- package/dist/components/TimePicker/components/WrapperList/WrapperList.js +44 -75
- package/dist/components/TimePicker/contexts/time-picker.hook.js +1 -3
- package/dist/components/TimePicker/contexts/time-picker.provider.js +76 -58
- package/dist/components/Toast/Toast.js +374 -338
- package/dist/components/Toast/Toast.variants.js +10 -43
- package/dist/components/Tooltip/Tooltip.js +36 -35
- package/dist/components/Typography/Typography.js +26 -23
- package/dist/components/Typography/Typography.variants.js +24 -59
- package/dist/components/VirtualizedTable/VirtualizedTable.js +9 -91
- package/dist/components/VirtualizedTable/assets/chevron-down.js +13 -23
- package/dist/components/VirtualizedTable/assets/chevron-up.js +12 -22
- package/dist/components/VirtualizedTable/components/Actions/Actions.js +62 -115
- package/dist/components/VirtualizedTable/components/Body/Body.js +29 -83
- package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.js +104 -165
- package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +13 -19
- package/dist/components/VirtualizedTable/components/ExpandableRow/ExpandableRow.js +43 -49
- package/dist/components/VirtualizedTable/components/Filter/Filter.js +116 -174
- package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +32 -57
- package/dist/components/VirtualizedTable/components/Header/Header.js +61 -98
- package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +65 -63
- package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +32 -102
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +51 -58
- package/dist/components/VirtualizedTable/components/WrapperBody/WrapperBody.js +20 -24
- package/dist/components/VirtualizedTable/contexts/table.provider.js +129 -158
- package/dist/components/VirtualizedTable/events/index.js +18 -18
- package/dist/components/index.js +1 -1
- package/dist/contexts/theme.provider.js +61 -49
- package/dist/hooks/useToggle.js +10 -8
- package/dist/index-0g-eSmV1.js +142 -0
- package/dist/{index-Jr0cra7i.js → index-B9v5VxE2.js} +6 -6
- package/dist/{index-DWyM654o.js → index-C6mt--X_.js} +5 -5
- package/dist/{index-mPinF0Ho.js → index-CiACf4ao.js} +3 -3
- package/dist/{index-CrCTywU1.js → index-Dy4FVowi.js} +1 -1
- package/dist/{index-Cmf-IG4l.js → index-kTGTSLpq.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/package.json +12 -11
- package/dist/{proxy-BvdTb_6B.js → proxy-BGrSEZuV.js} +2001 -1929
- package/dist/utils/index.js +1 -3
- package/package.json +12 -11
- package/dist/AdditionalOptions-C2FDVZhu.js +0 -45
- package/dist/Modal-BTOXCb0Y.js +0 -120
- package/dist/index-C7zAY3xv.js +0 -139
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as A } from "react/jsx-runtime";
|
|
2
|
-
import { V as
|
|
3
|
-
import { useQuery as
|
|
4
|
-
import { u as
|
|
5
|
-
import { useState as o, useMemo as g, useCallback as c, useEffect as
|
|
6
|
-
import { cn as
|
|
7
|
-
import { VirtualizedTableEvent as
|
|
8
|
-
import { TableContext as
|
|
9
|
-
import { C as
|
|
10
|
-
import { DEFAULT_PAGE_SIZE as
|
|
2
|
+
import { V as qe } from "../../../index-BKjcReYh.js";
|
|
3
|
+
import { useQuery as ze } from "@tanstack/react-query";
|
|
4
|
+
import { u as Ne, g as ve, a as Re } from "../../../index-CSWGJT-v.js";
|
|
5
|
+
import { useState as o, useMemo as g, useCallback as c, useEffect as Q } from "react";
|
|
6
|
+
import { cn as K } from "../../../utils/index.js";
|
|
7
|
+
import { VirtualizedTableEvent as _ } from "../events/index.js";
|
|
8
|
+
import { TableContext as We } from "./table.context.js";
|
|
9
|
+
import { C as Ge } from "../../../chevron-right-DvXGOiS_.js";
|
|
10
|
+
import { DEFAULT_PAGE_SIZE as Qe } from "../constants/pagination.js";
|
|
11
11
|
const et = ({
|
|
12
12
|
children: J,
|
|
13
13
|
classNameExpandedCell: Y,
|
|
@@ -16,7 +16,7 @@ const et = ({
|
|
|
16
16
|
classNameExpandedHeader: ne,
|
|
17
17
|
classNameActiveExpandedRow: oe,
|
|
18
18
|
classNameHoverRow: re,
|
|
19
|
-
columns:
|
|
19
|
+
columns: M = [],
|
|
20
20
|
data: k = [],
|
|
21
21
|
defaultExpanded: se,
|
|
22
22
|
enableExpandedRow: d,
|
|
@@ -29,16 +29,13 @@ const et = ({
|
|
|
29
29
|
getRowId: h,
|
|
30
30
|
fetchData: u,
|
|
31
31
|
onExpandedChange: H,
|
|
32
|
-
renderExpandedRow:
|
|
32
|
+
renderExpandedRow: C,
|
|
33
33
|
keepExpandColumnVisible: l
|
|
34
34
|
}) => {
|
|
35
|
-
const [U, V] = o([]), [ce, de] = o(!!u), [
|
|
36
|
-
() => Math.ceil(P / y),
|
|
37
|
-
[P, y]
|
|
38
|
-
), [O, pe] = o({}), [x, ye] = o({}), [F, Se] = o({}), [E, be] = o({}), $ = qe({
|
|
35
|
+
const [U, V] = o([]), [ce, de] = o(!!u), [P, p] = o(0), [I, ue] = o(), [y, me] = o(Qe), [fe, ge] = o(D), $ = u ? fe : D, he = g(() => Math.ceil($ / y), [$, y]), [O, pe] = o({}), [x, ye] = o({}), [F, Se] = o({}), [E, be] = o({}), q = ze({
|
|
39
36
|
queryKey: (() => {
|
|
40
37
|
const e = typeof i == "string" || typeof i == "number" ? [i] : i;
|
|
41
|
-
return ie && e.push(
|
|
38
|
+
return ie && e.push(P, y), I && e.push(I), Object.entries(O).forEach(([t, n]) => {
|
|
42
39
|
e.push(`${t}:${n.join(",")}`);
|
|
43
40
|
}), Object.entries(x).forEach(([t, n]) => {
|
|
44
41
|
n && e.push(`${t}:${n}`);
|
|
@@ -53,16 +50,19 @@ const et = ({
|
|
|
53
50
|
initialData: k,
|
|
54
51
|
enabled: !!u,
|
|
55
52
|
queryFn: async () => u({
|
|
56
|
-
page: Math.max(
|
|
53
|
+
page: Math.max(P + 1, 1),
|
|
57
54
|
pageSize: y,
|
|
58
55
|
termOfSearch: I,
|
|
59
56
|
...Object.keys(O).length > 0 ? O : {},
|
|
60
57
|
...Object.keys(x).length > 0 ? x : {},
|
|
61
58
|
...Object.keys(F).length > 0 ? F : {},
|
|
62
59
|
...Object.keys(E).length > 0 ? E : {}
|
|
63
|
-
}).then(({
|
|
60
|
+
}).then(({
|
|
61
|
+
data: e,
|
|
62
|
+
totalItemsCount: t
|
|
63
|
+
}) => (de(!1), t && ge(t), e)),
|
|
64
64
|
...le
|
|
65
|
-
}), S = u ?
|
|
65
|
+
}), S = u ? q.data : k, we = u ? q.isLoading : !1, z = u ? q.isFetching : !1, Ce = c((e) => {
|
|
66
66
|
ue(e), p(0);
|
|
67
67
|
}, []), Ie = c((e, t) => {
|
|
68
68
|
const n = e.toLowerCase().replace(/\s+/g, "_");
|
|
@@ -76,83 +76,80 @@ const et = ({
|
|
|
76
76
|
...a,
|
|
77
77
|
[n]: t?.toISOString()
|
|
78
78
|
})), p(0);
|
|
79
|
-
}, []), xe = c(
|
|
80
|
-
(
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
), Fe = c((e, t) => {
|
|
79
|
+
}, []), xe = c((e, t) => {
|
|
80
|
+
const n = e.toLowerCase().replace(/\s+/g, "_");
|
|
81
|
+
Se((a) => ({
|
|
82
|
+
...a,
|
|
83
|
+
[n]: t ? {
|
|
84
|
+
from: t.from?.toISOString(),
|
|
85
|
+
to: t.to?.toISOString()
|
|
86
|
+
} : void 0
|
|
87
|
+
})), p(0);
|
|
88
|
+
}, []), Fe = c((e, t) => {
|
|
89
89
|
const n = e.toLowerCase().replace(/\s+/g, "_");
|
|
90
90
|
be((a) => ({
|
|
91
91
|
...a,
|
|
92
92
|
[n]: t?.toISOString()
|
|
93
93
|
})), p(0);
|
|
94
|
-
}, []), Ee = c((e) => p(e), []), Le = c(
|
|
95
|
-
(
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
), z = B !== void 0, m = z ? B : je, b = c(
|
|
100
|
-
(e) => {
|
|
101
|
-
const t = typeof e == "function" ? e(m) : e;
|
|
102
|
-
z || Te(t), H?.(e);
|
|
103
|
-
},
|
|
104
|
-
[m, z, H]
|
|
105
|
-
);
|
|
106
|
-
G(() => {
|
|
94
|
+
}, []), Ee = c((e) => p(e), []), Le = c((e) => me(e), []), [je, Te] = o(se ?? {}), N = B !== void 0, m = N ? B : je, b = c((e) => {
|
|
95
|
+
const t = typeof e == "function" ? e(m) : e;
|
|
96
|
+
N || Te(t), H?.(e);
|
|
97
|
+
}, [m, N, H]);
|
|
98
|
+
Q(() => {
|
|
107
99
|
if (!d) return;
|
|
108
|
-
const e = Array.isArray(i) ? i.join(",") : String(i), t = new AbortController(), n = (
|
|
109
|
-
const {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
100
|
+
const e = Array.isArray(i) ? i.join(",") : String(i), t = new AbortController(), n = (w) => {
|
|
101
|
+
const {
|
|
102
|
+
detail: r
|
|
103
|
+
} = w;
|
|
104
|
+
r.tableId === e && b((s) => typeof s == "boolean" ? {
|
|
105
|
+
[r.rowId]: !0
|
|
106
|
+
} : {
|
|
107
|
+
...s,
|
|
108
|
+
[r.rowId]: !0
|
|
109
|
+
});
|
|
110
|
+
}, a = (w) => {
|
|
111
|
+
const {
|
|
112
|
+
detail: r
|
|
113
|
+
} = w;
|
|
113
114
|
r.tableId === e && b((s) => {
|
|
114
115
|
if (typeof s == "boolean") return {};
|
|
115
|
-
const T = {
|
|
116
|
+
const T = {
|
|
117
|
+
...s
|
|
118
|
+
};
|
|
116
119
|
return delete T[r.rowId], T;
|
|
117
120
|
});
|
|
118
|
-
},
|
|
119
|
-
const {
|
|
121
|
+
}, $e = (w) => {
|
|
122
|
+
const {
|
|
123
|
+
detail: r
|
|
124
|
+
} = w;
|
|
120
125
|
r.tableId === e && b((s) => {
|
|
121
|
-
if (typeof s == "boolean") return {
|
|
122
|
-
|
|
123
|
-
|
|
126
|
+
if (typeof s == "boolean") return {
|
|
127
|
+
[r.rowId]: !s
|
|
128
|
+
};
|
|
129
|
+
const T = !!s[r.rowId], G = {
|
|
130
|
+
...s
|
|
131
|
+
};
|
|
132
|
+
return T ? delete G[r.rowId] : G[r.rowId] = !0, G;
|
|
124
133
|
});
|
|
125
134
|
};
|
|
126
|
-
return document.addEventListener(
|
|
135
|
+
return document.addEventListener(_.EXPAND_ROW, n, {
|
|
136
|
+
signal: t.signal
|
|
137
|
+
}), document.addEventListener(_.COLLAPSE_ROW, a, {
|
|
127
138
|
signal: t.signal
|
|
128
|
-
}), document.addEventListener(
|
|
129
|
-
Q.COLLAPSE_ROW,
|
|
130
|
-
a,
|
|
131
|
-
{ signal: t.signal }
|
|
132
|
-
), document.addEventListener(Q.TOGGLE_ROW, Pe, {
|
|
139
|
+
}), document.addEventListener(_.TOGGLE_ROW, $e, {
|
|
133
140
|
signal: t.signal
|
|
134
141
|
}), () => t.abort();
|
|
135
142
|
}, [d, i, b]);
|
|
136
|
-
const
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
), L = g(
|
|
140
|
-
() => q ? [] : S.map(
|
|
141
|
-
(e, t) => h ? h(e, t) : String(t)
|
|
142
|
-
),
|
|
143
|
-
[S, h, q]
|
|
144
|
-
), Ae = g(() => typeof m == "boolean" ? m : L.some((e) => !!m[e]), [m, L]), _e = g(() => typeof l == "boolean" ? l : typeof l == "object" ? L.some((e) => !!l[e]) : !1, [l, L]), v = N || w && (Ae || _e), [f, X] = o(!!v);
|
|
145
|
-
G(() => {
|
|
146
|
-
if (v) {
|
|
143
|
+
const v = g(() => S.some((e) => !!e.meta?.expandedRow), [S]), L = g(() => z ? [] : S.map((e, t) => h ? h(e, t) : String(t)), [S, h, z]), Ae = g(() => typeof m == "boolean" ? m : L.some((e) => !!m[e]), [m, L]), Ke = g(() => typeof l == "boolean" ? l : typeof l == "object" ? L.some((e) => !!l[e]) : !1, [l, L]), R = v || C && (Ae || Ke), [f, X] = o(!!R);
|
|
144
|
+
Q(() => {
|
|
145
|
+
if (R) {
|
|
147
146
|
const e = requestAnimationFrame(() => X(!0));
|
|
148
147
|
return () => cancelAnimationFrame(e);
|
|
149
148
|
} else
|
|
150
149
|
X(!1);
|
|
151
|
-
}, [
|
|
152
|
-
const [j, Z] = o(
|
|
153
|
-
|
|
154
|
-
);
|
|
155
|
-
G(() => {
|
|
150
|
+
}, [R]);
|
|
151
|
+
const [j, Z] = o(!f);
|
|
152
|
+
Q(() => {
|
|
156
153
|
if (f)
|
|
157
154
|
Z(!1);
|
|
158
155
|
else {
|
|
@@ -160,110 +157,84 @@ const et = ({
|
|
|
160
157
|
return () => clearTimeout(e);
|
|
161
158
|
}
|
|
162
159
|
}, [f]);
|
|
163
|
-
const
|
|
160
|
+
const W = g(() => !d || !v && !C ? null : {
|
|
164
161
|
id: "__expand",
|
|
165
|
-
header: () => /* @__PURE__ */ A(
|
|
166
|
-
cell: ({
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
children: /* @__PURE__ */ A(
|
|
176
|
-
We,
|
|
177
|
-
{
|
|
178
|
-
className: _(
|
|
179
|
-
"size-4 transition-transform text-slate-400 dark:text-metal-400",
|
|
180
|
-
{
|
|
181
|
-
"-rotate-90": e.getIsExpanded()
|
|
182
|
-
}
|
|
183
|
-
)
|
|
184
|
-
}
|
|
185
|
-
)
|
|
186
|
-
}
|
|
187
|
-
);
|
|
162
|
+
header: () => /* @__PURE__ */ A(qe, { children: "Expand Column" }),
|
|
163
|
+
cell: ({
|
|
164
|
+
row: e
|
|
165
|
+
}) => {
|
|
166
|
+
const {
|
|
167
|
+
meta: t
|
|
168
|
+
} = e.original, n = typeof l == "object" && !!l[e.id];
|
|
169
|
+
return !t?.expandedRow && !e.getIsExpanded() && !n ? null : /* @__PURE__ */ A("button", { type: "button", className: "hover:cursor-pointer", onClick: () => e.toggleExpanded(), "aria-label": e.getIsExpanded() ? "Collapse row" : "Expand row", children: /* @__PURE__ */ A(Ge, { className: K("size-4 transition-transform text-slate-400 dark:text-metal-400", {
|
|
170
|
+
"-rotate-90": e.getIsExpanded()
|
|
171
|
+
}) }) });
|
|
188
172
|
},
|
|
189
173
|
enableSorting: !1,
|
|
190
174
|
meta: {
|
|
191
|
-
headerClassName:
|
|
175
|
+
headerClassName: K(
|
|
192
176
|
"transition-[width,max-width,padding] duration-300 ease-in-out overflow-hidden",
|
|
193
177
|
// Width: immediate change, CSS transition handles animation
|
|
194
178
|
f ? "w-10 max-w-10 px-2" : "w-0 max-w-0 !p-0",
|
|
195
179
|
// Border/radius: deferred on collapse so border stays during exit
|
|
196
180
|
j && "!border-0 !rounded-none [&+th]:rounded-tl-lg dark:[&+th]:border-l"
|
|
197
181
|
),
|
|
198
|
-
className:
|
|
199
|
-
"transition-[width,max-width,padding] duration-300 ease-in-out overflow-hidden",
|
|
200
|
-
f ? _("w-10 max-w-10 px-1 text-center", ne) : "w-0 max-w-0 !p-0",
|
|
201
|
-
j && "!border-0 dark:[&+td]:border-l"
|
|
202
|
-
)
|
|
182
|
+
className: K("transition-[width,max-width,padding] duration-300 ease-in-out overflow-hidden", f ? K("w-10 max-w-10 px-1 text-center", ne) : "w-0 max-w-0 !p-0", j && "!border-0 dark:[&+td]:border-l")
|
|
203
183
|
}
|
|
204
|
-
}, [
|
|
205
|
-
d,
|
|
206
|
-
N,
|
|
207
|
-
w,
|
|
208
|
-
f,
|
|
209
|
-
j,
|
|
210
|
-
l
|
|
211
|
-
]), Ke = g(() => R ? [R, ...K] : K, [K, R]), Me = ze({
|
|
184
|
+
}, [d, v, C, f, j, l]), Me = g(() => W ? [W, ...M] : M, [M, W]), Pe = Ne({
|
|
212
185
|
data: S,
|
|
213
|
-
columns:
|
|
214
|
-
...h ? {
|
|
186
|
+
columns: Me,
|
|
187
|
+
...h ? {
|
|
188
|
+
getRowId: h
|
|
189
|
+
} : {},
|
|
215
190
|
state: {
|
|
216
191
|
sorting: U,
|
|
217
|
-
...d ? {
|
|
192
|
+
...d ? {
|
|
193
|
+
expanded: m
|
|
194
|
+
} : {}
|
|
218
195
|
},
|
|
219
196
|
onSortingChange: V,
|
|
220
197
|
...d ? {
|
|
221
198
|
onExpandedChange: b,
|
|
222
199
|
manualExpanding: !0
|
|
223
200
|
} : {},
|
|
224
|
-
getCoreRowModel:
|
|
225
|
-
getSortedRowModel:
|
|
201
|
+
getCoreRowModel: Re(),
|
|
202
|
+
getSortedRowModel: ve()
|
|
226
203
|
});
|
|
227
|
-
return /* @__PURE__ */ A(
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
onSorting: V,
|
|
262
|
-
renderExpandedRow: w
|
|
263
|
-
},
|
|
264
|
-
children: J
|
|
265
|
-
}
|
|
266
|
-
);
|
|
204
|
+
return /* @__PURE__ */ A(We.Provider, { value: {
|
|
205
|
+
classNameActiveExpandedRow: oe,
|
|
206
|
+
classNameExpandedCell: Y,
|
|
207
|
+
classNameExpandedContent: ee,
|
|
208
|
+
classNameExpandedRow: te,
|
|
209
|
+
classNameHoverRow: re,
|
|
210
|
+
enableExpandedRow: d,
|
|
211
|
+
enableHoverRow: ae,
|
|
212
|
+
isBorderOnAdjacentCell: j,
|
|
213
|
+
isExpandColumnVisible: f,
|
|
214
|
+
isFirstLoad: ce,
|
|
215
|
+
multiselectSelected: O,
|
|
216
|
+
dateFilters: x,
|
|
217
|
+
dateRangeFilters: F,
|
|
218
|
+
timeFilters: E,
|
|
219
|
+
page: P,
|
|
220
|
+
pageSize: y,
|
|
221
|
+
sortedData: U,
|
|
222
|
+
table: Pe,
|
|
223
|
+
tableFetching: z,
|
|
224
|
+
tableLoading: we,
|
|
225
|
+
termOfSearch: I,
|
|
226
|
+
totalItems: $,
|
|
227
|
+
totalPages: he,
|
|
228
|
+
handlePage: Ee,
|
|
229
|
+
onChangeTermOfSearch: Ce,
|
|
230
|
+
onPageSize: Le,
|
|
231
|
+
onSelectMultiselect: Ie,
|
|
232
|
+
onSelectDateFilter: Oe,
|
|
233
|
+
onSelectDateRangeFilter: xe,
|
|
234
|
+
onSelectTimeFilter: Fe,
|
|
235
|
+
onSorting: V,
|
|
236
|
+
renderExpandedRow: C
|
|
237
|
+
}, children: J });
|
|
267
238
|
};
|
|
268
239
|
export {
|
|
269
240
|
et as TableProvider
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
var n = /* @__PURE__ */ ((t) => (t.EXPAND_ROW = "@konstructio/VirtualizedTable/event-EXPAND_ROW", t.COLLAPSE_ROW = "@konstructio/VirtualizedTable/event-COLLAPSE_ROW", t.TOGGLE_ROW = "@konstructio/VirtualizedTable/event-TOGGLE_ROW", t))(n || {});
|
|
2
2
|
const o = (t, e) => {
|
|
3
|
-
document.dispatchEvent(
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
);
|
|
3
|
+
document.dispatchEvent(new CustomEvent("@konstructio/VirtualizedTable/event-EXPAND_ROW", {
|
|
4
|
+
detail: {
|
|
5
|
+
tableId: t,
|
|
6
|
+
rowId: e
|
|
7
|
+
}
|
|
8
|
+
}));
|
|
9
9
|
}, i = (t, e) => {
|
|
10
|
-
document.dispatchEvent(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
);
|
|
10
|
+
document.dispatchEvent(new CustomEvent("@konstructio/VirtualizedTable/event-COLLAPSE_ROW", {
|
|
11
|
+
detail: {
|
|
12
|
+
tableId: t,
|
|
13
|
+
rowId: e
|
|
14
|
+
}
|
|
15
|
+
}));
|
|
16
16
|
}, s = (t, e) => {
|
|
17
|
-
document.dispatchEvent(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
);
|
|
17
|
+
document.dispatchEvent(new CustomEvent("@konstructio/VirtualizedTable/event-TOGGLE_ROW", {
|
|
18
|
+
detail: {
|
|
19
|
+
tableId: t,
|
|
20
|
+
rowId: e
|
|
21
|
+
}
|
|
22
|
+
}));
|
|
23
23
|
};
|
|
24
24
|
export {
|
|
25
25
|
n as VirtualizedTableEvent,
|
package/dist/components/index.js
CHANGED
|
@@ -18,7 +18,7 @@ import { ImageUpload as k } from "./ImageUpload/ImageUpload.js";
|
|
|
18
18
|
import { Input as G } from "./Input/Input.js";
|
|
19
19
|
import { LineChart as y } from "./LineChart/LineChart.js";
|
|
20
20
|
import { Loading as U } from "./Loading/Loading.js";
|
|
21
|
-
import { M as j } from "../Modal-
|
|
21
|
+
import { M as j } from "../Modal-h5H4yxYg.js";
|
|
22
22
|
import { MultiSelectDropdown as H } from "./MultiSelectDropdown/MultiSelectDropdown.js";
|
|
23
23
|
import { PhoneNumberInput as K } from "./PhoneNumberInput/PhoneNumberInput.js";
|
|
24
24
|
import { PieChart as X } from "./PieChart/PieChart.js";
|
|
@@ -1,86 +1,98 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { c as h } from "../compiler-runtime-DA41awpA.js";
|
|
3
|
+
import { useState as v, useEffect as a } from "react";
|
|
4
|
+
import { isClient as g } from "../utils/index.js";
|
|
4
5
|
import { ThemeContext as C } from "./theme.context.js";
|
|
5
|
-
function
|
|
6
|
-
for (var
|
|
7
|
-
var
|
|
8
|
-
for (var
|
|
9
|
-
|
|
6
|
+
function m(n) {
|
|
7
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
8
|
+
var f = arguments[e];
|
|
9
|
+
for (var s in f)
|
|
10
|
+
n[s] = f[s];
|
|
10
11
|
}
|
|
11
|
-
return
|
|
12
|
+
return n;
|
|
12
13
|
}
|
|
13
|
-
var
|
|
14
|
-
read: function(
|
|
15
|
-
return
|
|
14
|
+
var x = {
|
|
15
|
+
read: function(n) {
|
|
16
|
+
return n[0] === '"' && (n = n.slice(1, -1)), n.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
16
17
|
},
|
|
17
|
-
write: function(
|
|
18
|
-
return encodeURIComponent(
|
|
18
|
+
write: function(n) {
|
|
19
|
+
return encodeURIComponent(n).replace(
|
|
19
20
|
/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
|
|
20
21
|
decodeURIComponent
|
|
21
22
|
);
|
|
22
23
|
}
|
|
23
24
|
};
|
|
24
|
-
function
|
|
25
|
-
function
|
|
25
|
+
function d(n, e) {
|
|
26
|
+
function f(r, o, t) {
|
|
26
27
|
if (!(typeof document > "u")) {
|
|
27
|
-
|
|
28
|
+
t = m({}, e, t), typeof t.expires == "number" && (t.expires = new Date(Date.now() + t.expires * 864e5)), t.expires && (t.expires = t.expires.toUTCString()), r = encodeURIComponent(r).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
28
29
|
var i = "";
|
|
29
|
-
for (var c in
|
|
30
|
-
|
|
31
|
-
return document.cookie =
|
|
30
|
+
for (var c in t)
|
|
31
|
+
t[c] && (i += "; " + c, t[c] !== !0 && (i += "=" + t[c].split(";")[0]));
|
|
32
|
+
return document.cookie = r + "=" + n.write(o, r) + i;
|
|
32
33
|
}
|
|
33
34
|
}
|
|
34
|
-
function
|
|
35
|
-
if (!(typeof document > "u" || arguments.length && !
|
|
36
|
-
for (var
|
|
37
|
-
var c =
|
|
35
|
+
function s(r) {
|
|
36
|
+
if (!(typeof document > "u" || arguments.length && !r)) {
|
|
37
|
+
for (var o = document.cookie ? document.cookie.split("; ") : [], t = {}, i = 0; i < o.length; i++) {
|
|
38
|
+
var c = o[i].split("="), p = c.slice(1).join("=");
|
|
38
39
|
try {
|
|
39
|
-
var
|
|
40
|
-
if (
|
|
40
|
+
var u = decodeURIComponent(c[0]);
|
|
41
|
+
if (t[u] = n.read(p, u), r === u)
|
|
41
42
|
break;
|
|
42
43
|
} catch {
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
|
-
return
|
|
46
|
+
return r ? t[r] : t;
|
|
46
47
|
}
|
|
47
48
|
}
|
|
48
49
|
return Object.create(
|
|
49
50
|
{
|
|
50
|
-
set:
|
|
51
|
-
get:
|
|
52
|
-
remove: function(
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
set: f,
|
|
52
|
+
get: s,
|
|
53
|
+
remove: function(r, o) {
|
|
54
|
+
f(
|
|
55
|
+
r,
|
|
55
56
|
"",
|
|
56
|
-
|
|
57
|
+
m({}, o, {
|
|
57
58
|
expires: -1
|
|
58
59
|
})
|
|
59
60
|
);
|
|
60
61
|
},
|
|
61
|
-
withAttributes: function(
|
|
62
|
-
return
|
|
62
|
+
withAttributes: function(r) {
|
|
63
|
+
return d(this.converter, m({}, this.attributes, r));
|
|
63
64
|
},
|
|
64
|
-
withConverter: function(
|
|
65
|
-
return
|
|
65
|
+
withConverter: function(r) {
|
|
66
|
+
return d(m({}, this.converter, r), this.attributes);
|
|
66
67
|
}
|
|
67
68
|
},
|
|
68
69
|
{
|
|
69
|
-
attributes: { value: Object.freeze(
|
|
70
|
-
converter: { value: Object.freeze(
|
|
70
|
+
attributes: { value: Object.freeze(e) },
|
|
71
|
+
converter: { value: Object.freeze(n) }
|
|
71
72
|
}
|
|
72
73
|
);
|
|
73
74
|
}
|
|
74
|
-
var
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
75
|
+
var R = d(x, { path: "/" });
|
|
76
|
+
const A = (n) => {
|
|
77
|
+
const e = h.c(10), {
|
|
78
|
+
children: f,
|
|
79
|
+
theme: s
|
|
80
|
+
} = n;
|
|
81
|
+
let r;
|
|
82
|
+
e[0] !== s ? (r = () => s || (g ? R.get("konstruct-theme") : "kubefirst"), e[0] = s, e[1] = r) : r = e[1];
|
|
83
|
+
const [o, t] = v(r);
|
|
84
|
+
let i, c;
|
|
85
|
+
e[2] !== o ? (i = () => {
|
|
86
|
+
document.querySelector("body")?.setAttribute("data-theme", o);
|
|
87
|
+
}, c = [o], e[2] = o, e[3] = i, e[4] = c) : (i = e[3], c = e[4]), a(i, c);
|
|
88
|
+
let p;
|
|
89
|
+
e[5] !== o ? (p = {
|
|
90
|
+
theme: o,
|
|
91
|
+
setTheme: t
|
|
92
|
+
}, e[5] = o, e[6] = p) : p = e[6];
|
|
93
|
+
let u;
|
|
94
|
+
return e[7] !== f || e[8] !== p ? (u = /* @__PURE__ */ l(C.Provider, { value: p, children: f }), e[7] = f, e[8] = p, e[9] = u) : u = e[9], u;
|
|
83
95
|
};
|
|
84
96
|
export {
|
|
85
|
-
|
|
97
|
+
A as ThemeProvider
|
|
86
98
|
};
|
package/dist/hooks/useToggle.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
);
|
|
7
|
-
|
|
1
|
+
import { c as n } from "../compiler-runtime-DA41awpA.js";
|
|
2
|
+
import { useState as m } from "react";
|
|
3
|
+
const p = (i) => {
|
|
4
|
+
const t = n.c(5), r = i === void 0 ? !1 : i, [e, a] = m(r);
|
|
5
|
+
let o;
|
|
6
|
+
t[0] !== e ? (o = (c) => a(c ?? !e), t[0] = e, t[1] = o) : o = t[1];
|
|
7
|
+
const l = o;
|
|
8
|
+
let s;
|
|
9
|
+
return t[2] !== l || t[3] !== e ? (s = [e, l], t[2] = l, t[3] = e, t[4] = s) : s = t[4], s;
|
|
8
10
|
};
|
|
9
11
|
export {
|
|
10
|
-
|
|
12
|
+
p as useToggle
|
|
11
13
|
};
|