@konstructio/ui 0.1.2-alpha.101 → 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-BGo_acd5.js +109 -0
- package/dist/{Breadcrumb-Bmv0vzgt.js → Breadcrumb-Cp3abB2w.js} +1 -1
- package/dist/Checkbox-B_ngk9Dj.js +249 -0
- package/dist/{Combination-cjXRJS03.js → Combination-CnMM05mt.js} +51 -45
- package/dist/{CommandInput-CYYsk_31.js → CommandInput-BLq69pOT.js} +2 -2
- package/dist/Counter-BV680M5r.js +195 -0
- package/dist/{DayPicker-CwO8Zff5.js → DayPicker-kweJz134.js} +750 -746
- package/dist/DropdownButton-DfNojmCW.js +493 -0
- package/dist/FlagSelectorList-CkTR3j6O.js +856 -0
- package/dist/{HamburgerTrigger-7a4POUaM.js → HamburgerTrigger-DRylBL2d.js} +2 -2
- package/dist/{ImageUpload-DZTm4SBB.js → ImageUpload-DiwymQcU.js} +1 -1
- package/dist/{Input-DG3snJf_.js → Input-Cf44DzfE.js} +19 -19
- 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-BegZ5yd7.js → Spinner-CUwE2bLm.js} +1 -1
- package/dist/Switch-aPhL5rNG.js +196 -0
- package/dist/Toast-3NEz7LLa.js +460 -0
- package/dist/Wrapper-BhqUVI1G.js +171 -0
- package/dist/Wrapper-CVJSuYWx.js +114 -0
- package/dist/{Wrapper-DtT29fc5.js → Wrapper-DP6Sxngx.js} +185 -180
- package/dist/components/Alert/Alert.js +22 -22
- 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/Breadcrumb/Breadcrumb.js +1 -1
- 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 +3 -3
- 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 +2 -2
- 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 +15 -16
- 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 +25 -23
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.js +42 -57
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +60 -65
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +29 -50
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +40 -45
- package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.hook.js +35 -49
- package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.js +45 -51
- package/dist/components/Filter/components/FilterDropdown/FilterDropdown.js +28 -0
- package/dist/components/Filter/components/ResetButton/ResetButton.js +21 -18
- package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +56 -61
- package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.hook.js +35 -50
- package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.js +70 -75
- package/dist/components/Filter/contexts/filter.provider.js +15 -7
- 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/Filter/utils/index.js +1 -1
- package/dist/components/ImageUpload/ImageUpload.js +1 -1
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/LineChart/LineChart.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 +2 -2
- 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 +2 -2
- package/dist/components/PhoneNumberInput/components/Wrapper.js +1 -1
- package/dist/components/PhoneNumberInput/components/index.js +2 -2
- package/dist/components/PhoneNumberInput/contexts/index.js +1 -1
- package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +1 -1
- 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 +3 -3
- 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 +92 -89
- package/dist/components/VirtualizedTable/components/Actions/Actions.js +19 -21
- package/dist/components/VirtualizedTable/components/Body/Body.js +50 -49
- package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +67 -21
- package/dist/components/VirtualizedTable/components/ExpandableRow/ExpandableRow.js +1 -1
- package/dist/components/VirtualizedTable/components/Filter/Filter.js +67 -75
- package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +10 -10
- package/dist/components/VirtualizedTable/components/Header/Header.js +47 -34
- package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +19 -15
- package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +10 -10
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +1 -1
- package/dist/components/VirtualizedTable/components/WrapperBody/WrapperBody.js +8 -8
- package/dist/components/VirtualizedTable/contexts/index.js +1 -1
- package/dist/components/VirtualizedTable/contexts/table.context.js +1 -0
- 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 +96 -90
- package/dist/{components-CYt24H4n.js → components-Cf345jTv.js} +45 -41
- package/dist/constants-CxJJRVK3.js +31 -0
- package/dist/{debounce-KoeGNmnW.js → debounce-C5Ycjilj.js} +14 -14
- package/dist/dist-BUocnzkM.js +99 -0
- package/dist/{dist-DGO9opgu.js → dist-BZNE2Tnx.js} +51 -51
- package/dist/dist-BaPW7qXd2.js +166 -0
- package/dist/dist-BdobXn93.js +192 -0
- package/dist/dist-BlPTJNIm.js +118 -0
- package/dist/dist-C3YVLapk.js +194 -0
- 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-DFCz63oC2.js +1320 -0
- package/dist/dist-DGOjiAnB2.js +14 -0
- package/dist/dist-DKryKPmP.js +193 -0
- package/dist/dist-DX0sBG3Q.js +31 -0
- package/dist/dist-DYIabsrY.js +17 -0
- package/dist/dist-pWlMx4Fi2.js +36 -0
- package/dist/dist-tGUUcv8n.js +359 -0
- package/dist/dist-xCbHbMLA.js +116 -0
- package/dist/es2015-CoHq2g4y.js +231 -0
- 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 +147 -139
- package/dist/{isObject-1ZmdWuhC.js → isObject-BeFFiVJK.js} +8 -8
- package/dist/lib/components/Alert/Alert.types.d.ts +1 -1
- package/dist/lib/components/AlertDialog/AlertDialog.types.d.ts +1 -1
- package/dist/lib/components/AlertDialog/components/AlertDialogTrigger.types.d.ts +2 -2
- package/dist/lib/components/Autocomplete/Autocomplete.types.d.ts +1 -1
- package/dist/lib/components/Autocomplete/components/List/List.variants.d.ts +0 -1
- package/dist/lib/components/Breadcrumb/Breadcrumb.types.d.ts +1 -1
- package/dist/lib/components/Breadcrumb/components/BackButton/BackButton.types.d.ts +1 -1
- package/dist/lib/components/Breadcrumb/components/Item/Item.types.d.ts +1 -1
- package/dist/lib/components/Button/Button.types.d.ts +1 -1
- package/dist/lib/components/ButtonGroup/ButtonGroup.types.d.ts +1 -1
- package/dist/lib/components/Card/Card.types.d.ts +1 -1
- package/dist/lib/components/Checkbox/Checkbox.types.d.ts +1 -1
- package/dist/lib/components/Command/Command.types.d.ts +1 -1
- package/dist/lib/components/Counter/Counter.types.d.ts +1 -1
- package/dist/lib/components/DateRangePicker/DateRangePicker.types.d.ts +1 -1
- package/dist/lib/components/Drawer/Drawer.types.d.ts +1 -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 +3 -1
- package/dist/lib/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.d.ts +2 -3
- package/dist/lib/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.d.ts +1 -2
- package/dist/lib/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.hook.d.ts +2 -3
- package/dist/lib/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.types.d.ts +1 -1
- package/dist/lib/components/Filter/components/FilterDropdown/FilterDropdown.d.ts +3 -0
- package/dist/lib/components/Filter/components/FilterDropdown/FilterDropdown.types.d.ts +9 -0
- package/dist/lib/components/Filter/components/ResetButton/ResetButton.types.d.ts +1 -1
- package/dist/lib/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.hook.d.ts +1 -2
- package/dist/lib/components/Filter/contexts/filter.context.d.ts +2 -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/ImageUpload/ImageUpload.types.d.ts +1 -1
- package/dist/lib/components/Input/Input.types.d.ts +1 -1
- package/dist/lib/components/LineChart/LineChart.types.d.ts +1 -1
- package/dist/lib/components/Loading/Loading.types.d.ts +1 -1
- package/dist/lib/components/Modal/Modal.types.d.ts +1 -1
- package/dist/lib/components/Modal/components/Wrapper/Wrapper.types.d.ts +1 -1
- package/dist/lib/components/MultiSelectDropdown/components/Item/Item.types.d.ts +1 -1
- package/dist/lib/components/MultiSelectDropdown/components/List/List.types.d.ts +1 -1
- package/dist/lib/components/MultiSelectDropdown/components/Wrapper/Wrapper.types.d.ts +1 -1
- package/dist/lib/components/PieChart/PieChart.types.d.ts +4 -4
- package/dist/lib/components/ProgressBar/ProgressBar.types.d.ts +3 -1
- package/dist/lib/components/Radio/Radio.types.d.ts +1 -1
- package/dist/lib/components/RadioCard/RadioCard.types.d.ts +1 -1
- package/dist/lib/components/RadioCardGroup/RadioCardGroup.types.d.ts +1 -1
- package/dist/lib/components/RadioGroup/RadioGroup.types.d.ts +1 -1
- package/dist/lib/components/Range/Range.types.d.ts +1 -1
- package/dist/lib/components/Select/Select.types.d.ts +1 -1
- 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 +8 -7
- 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/Label/Label.types.d.ts +1 -1
- 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/Slider/Slider.types.d.ts +1 -1
- package/dist/lib/components/Spinner/Spinner.types.d.ts +2 -2
- package/dist/lib/components/Stepper/Stepper.types.d.ts +1 -1
- package/dist/lib/components/Stepper/components/StepItem/StepItem.types.d.ts +1 -1
- package/dist/lib/components/Switch/Switch.types.d.ts +1 -1
- package/dist/lib/components/Table/Table.types.d.ts +1 -1
- package/dist/lib/components/Tabs/Tabs.types.d.ts +1 -1
- package/dist/lib/components/TagSelect/TagSelect.types.d.ts +1 -1
- package/dist/lib/components/TagSelect/components/Item/Item.types.d.ts +2 -2
- package/dist/lib/components/TagSelect/components/List/List.types.d.ts +1 -1
- package/dist/lib/components/TagSelect/components/Wrapper/Wrapper.types.d.ts +1 -1
- package/dist/lib/components/TagSelect/contexts/TagSelect.types.d.ts +1 -1
- package/dist/lib/components/TextArea/TextArea.types.d.ts +1 -1
- package/dist/lib/components/Toast/Toast.types.d.ts +1 -1
- package/dist/lib/components/Typography/Typography.types.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/VirtualizedTable.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/VirtualizedTable.types.d.ts +27 -3
- package/dist/lib/components/VirtualizedTable/components/Body/Body.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/components/Body/Body.types.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.types.d.ts +2 -0
- package/dist/lib/components/VirtualizedTable/components/Filter/Filter.types.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/components/Header/Header.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/components/Header/Header.types.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/components/Pagination/Pagination.types.d.ts +2 -0
- package/dist/lib/components/VirtualizedTable/components/TruncateText/TruncateText.types.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/contexts/table.context.d.ts +2 -0
- package/dist/lib/components/VirtualizedTable/contexts/table.provider.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/contexts/table.types.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/contexts/theme.context.d.ts +1 -1
- package/dist/lib/contexts/theme.hook.d.ts +1 -1
- package/dist/lib/hooks/index.d.ts +1 -0
- package/dist/lib/hooks/useClickOutside.d.ts +2 -0
- package/dist/package.json +38 -37
- package/dist/{phone-number.provider-CJJOFYk-.js → phone-number.provider-BxQCTxp8.js} +457 -457
- package/dist/{prop-types-CaJpPVsa.js → prop-types-CfEYxTbR.js} +52 -52
- package/dist/styles.css +1 -1
- package/dist/{table.provider-9uUt5a-s.js → table.provider-B0BafHuU.js} +429 -388
- package/dist/ui/civo-theme.css +4 -0
- package/dist/ui/kubefirst-theme.css +4 -0
- package/dist/{utils-B6A9pnrH.js → utils-B-BTGYA5.js} +193 -193
- package/dist/{x-CESTrenk.js → x-BI9jmc7e.js} +1 -1
- package/package.json +38 -37
- package/dist/AlertDialogTrigger-HhbFOOUE.js +0 -124
- package/dist/Checkbox-B1rTwzR3.js +0 -240
- package/dist/Counter-DWKyr569.js +0 -208
- package/dist/DropdownButton-Beel5_gN.js +0 -92
- package/dist/FlagSelectorList-BARhzfj2.js +0 -848
- package/dist/Modal-Bcu6LLAp.js +0 -76
- package/dist/Switch-1RGhhTtg.js +0 -178
- package/dist/Toast-CS-igZor.js +0 -467
- package/dist/Wrapper-DNEn4fef.js +0 -161
- package/dist/Wrapper-DwxJAkNQ.js +0 -110
- package/dist/constants-DXrF9vV4.js +0 -31
- package/dist/dist-7edduNXi.js +0 -398
- package/dist/dist-B-Aoze_D.js +0 -10
- package/dist/dist-BkYHh2kH.js +0 -408
- package/dist/dist-C6Cif8-U.js +0 -28
- package/dist/dist-C8NWUTUh.js +0 -62
- package/dist/dist-CVy-ulDZ.js +0 -42
- package/dist/dist-CeuUxVmT.js +0 -13
- package/dist/dist-CfYOvauX.js +0 -125
- package/dist/dist-CktbIsHq.js +0 -264
- package/dist/dist-DGqWMRtc.js +0 -183
- package/dist/dist-DdFwUrO22.js +0 -11
- package/dist/dist-DnGj9MTf.js +0 -1692
- package/dist/dist-DqKFpce5.js +0 -98
- package/dist/dist-DvoMuWKO2.js +0 -31
- package/dist/dist-eAwtFCCA.js +0 -87
- package/dist/dist-ppXKUlVt.js +0 -10
- /package/dist/{dist-AihTpWdF2.js → dist-AihTpWdF.js} +0 -0
- /package/dist/{x-a_LpoXzG.js → x-a_LpoXzG2.js} +0 -0
|
@@ -1,67 +1,68 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { useClickOutside as E } from "../../../hooks/useClickOutside.js";
|
|
2
|
+
import { useSelectContext as w } from "../contexts/select.hook.js";
|
|
3
|
+
import { useCallback as p, useEffect as l, useRef as v } from "react";
|
|
4
|
+
var k = ({ ulRef: d, inputRef: o, searchInputRef: m, disabled: b, internalValue: i, onBlur: f }) => {
|
|
5
|
+
const n = v(null), a = v(null), { value: c, setSearchTerm: g, setCanFilter: u, toggleOpen: r } = w();
|
|
6
|
+
return E(n, p(() => {
|
|
7
|
+
r(!1);
|
|
8
|
+
}, [r])), l(() => {
|
|
9
|
+
const e = new AbortController(), s = (t) => {
|
|
10
|
+
t.key === "Escape" && r(!1);
|
|
10
11
|
};
|
|
11
|
-
return document.addEventListener("keydown", s, { signal: e.signal }), document.addEventListener("
|
|
12
|
-
document.hidden &&
|
|
13
|
-
}, { signal: e.signal }), a.current?.addEventListener("focusin", (
|
|
14
|
-
!
|
|
12
|
+
return document.addEventListener("keydown", s, { signal: e.signal }), document.addEventListener("visibilitychange", () => {
|
|
13
|
+
document.hidden && r(!1);
|
|
14
|
+
}, { signal: e.signal }), a.current?.addEventListener("focusin", (t) => {
|
|
15
|
+
!b && t.target?.matches(":focus-visible") && r(!0);
|
|
15
16
|
}, { signal: e.signal }), () => {
|
|
16
17
|
e.abort();
|
|
17
18
|
};
|
|
18
|
-
}, [
|
|
19
|
+
}, [r, n]), l(() => {
|
|
19
20
|
const e = new AbortController();
|
|
20
21
|
return a.current?.addEventListener("keydown", (s) => {
|
|
21
22
|
if (s.key === "ArrowDown") {
|
|
22
|
-
const
|
|
23
|
-
|
|
23
|
+
const t = d.current?.querySelector("li");
|
|
24
|
+
t && t.focus();
|
|
24
25
|
}
|
|
25
26
|
}, { signal: e.signal }), () => {
|
|
26
27
|
e.abort();
|
|
27
28
|
};
|
|
28
|
-
}, [a,
|
|
29
|
+
}, [a, d]), l(() => {
|
|
29
30
|
const e = new AbortController();
|
|
30
|
-
return
|
|
31
|
-
|
|
32
|
-
}, { signal: e.signal }),
|
|
33
|
-
|
|
31
|
+
return o?.current?.addEventListener("focusin", () => {
|
|
32
|
+
g(i?.value ?? ""), u(!1);
|
|
33
|
+
}, { signal: e.signal }), o?.current?.addEventListener("focusout", () => {
|
|
34
|
+
u(!0);
|
|
34
35
|
}, { signal: e.signal }), a.current?.addEventListener("focus", () => {
|
|
35
|
-
|
|
36
|
-
}, { signal: e.signal }),
|
|
37
|
-
|
|
36
|
+
u(!1);
|
|
37
|
+
}, { signal: e.signal }), n.current?.addEventListener("focusout", (s) => {
|
|
38
|
+
n.current?.contains(s.relatedTarget) || r(!1);
|
|
38
39
|
}, { signal: e.signal }), () => {
|
|
39
40
|
e.abort();
|
|
40
41
|
};
|
|
41
|
-
}, [
|
|
42
|
-
|
|
43
|
-
}, [
|
|
42
|
+
}, [c]), l(() => {
|
|
43
|
+
o?.current && (o.current.value = c && i?.value || "");
|
|
44
|
+
}, [i, c]), l(() => {
|
|
44
45
|
const e = new AbortController();
|
|
45
|
-
return
|
|
46
|
-
const
|
|
47
|
-
(!
|
|
46
|
+
return n.current?.addEventListener("focusout", (s) => {
|
|
47
|
+
const t = s.relatedTarget;
|
|
48
|
+
(!t || !n.current?.contains(t)) && (o?.current?.value || f?.());
|
|
48
49
|
}), () => {
|
|
49
50
|
e.abort();
|
|
50
51
|
};
|
|
51
52
|
}, [
|
|
53
|
+
r,
|
|
52
54
|
n,
|
|
53
|
-
t,
|
|
54
|
-
v,
|
|
55
55
|
g,
|
|
56
|
-
|
|
56
|
+
f,
|
|
57
|
+
c
|
|
57
58
|
]), {
|
|
58
|
-
wrapperRef:
|
|
59
|
+
wrapperRef: n,
|
|
59
60
|
wrapperInputRef: a,
|
|
60
|
-
handleOpen:
|
|
61
|
-
|
|
62
|
-
}
|
|
61
|
+
handleOpen: () => {
|
|
62
|
+
r(!0), requestAnimationFrame(() => m?.current?.focus());
|
|
63
|
+
}
|
|
63
64
|
};
|
|
64
65
|
};
|
|
65
66
|
export {
|
|
66
|
-
|
|
67
|
+
k as useSelect
|
|
67
68
|
};
|
|
@@ -1,29 +1,32 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { CollapseTrigger as i } from "./components/CollapseTrigger/CollapseTrigger.js";
|
|
3
|
+
import { Footer as a } from "./components/Footer/Footer.js";
|
|
4
|
+
import { Label as t } from "./components/Label/Label.js";
|
|
5
|
+
import { Logo as p } from "./components/Logo/Logo.js";
|
|
5
6
|
import { NavigationGroup as m } from "./components/NavigationGroup/NavigationGroup.js";
|
|
6
|
-
import { NavigationOption as
|
|
7
|
-
import { NavigationSeparator as
|
|
7
|
+
import { NavigationOption as e } from "./components/NavigationOption/NavigationOption.js";
|
|
8
|
+
import { NavigationSeparator as g } from "./components/NavigationSeparator/NavigationSeparator.js";
|
|
8
9
|
import { Navigation as n } from "./components/Navigation/Navigation.js";
|
|
9
|
-
import { Wrapper as
|
|
10
|
-
import { jsx as
|
|
11
|
-
import '../../Sidebar.css';var o = (r) => /* @__PURE__ */ f
|
|
10
|
+
import { Wrapper as f } from "./components/Wrapper/Wrapper.js";
|
|
11
|
+
import { jsx as v } from "react/jsx-runtime";
|
|
12
|
+
import '../../Sidebar.css';var o = (r) => /* @__PURE__ */ v(f, { ...r });
|
|
12
13
|
o.displayName = "KonstructSidebar";
|
|
13
|
-
o.
|
|
14
|
-
o.
|
|
15
|
-
o.
|
|
14
|
+
o.CollapseTrigger = i;
|
|
15
|
+
o.Footer = a;
|
|
16
|
+
o.Label = t;
|
|
17
|
+
o.Logo = p;
|
|
16
18
|
o.Navigation = n;
|
|
17
19
|
o.NavigationGroup = m;
|
|
18
|
-
o.NavigationOption =
|
|
19
|
-
o.NavigationSeparator =
|
|
20
|
+
o.NavigationOption = e;
|
|
21
|
+
o.NavigationSeparator = g;
|
|
20
22
|
export {
|
|
21
|
-
i as
|
|
22
|
-
a as
|
|
23
|
-
t as
|
|
23
|
+
i as CollapseTrigger,
|
|
24
|
+
a as Footer,
|
|
25
|
+
t as Label,
|
|
26
|
+
p as Logo,
|
|
24
27
|
n as Navigation,
|
|
25
28
|
m as NavigationGroup,
|
|
26
|
-
|
|
27
|
-
|
|
29
|
+
e as NavigationOption,
|
|
30
|
+
g as NavigationSeparator,
|
|
28
31
|
o as Sidebar
|
|
29
32
|
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { t as n } from "../../../../utils-Cx-WzRZF.js";
|
|
2
|
+
import { ArrowLeftIcon as l } from "../../../../assets/icons/components/ArrowLeft.js";
|
|
3
|
+
import { ArrowRightIcon as s } from "../../../../assets/icons/components/ArrowRight.js";
|
|
4
|
+
import { useSidebarContext as p } from "../../contexts/SidebarContext.js";
|
|
5
|
+
import { collapseTriggerVariants as g } from "./CollapseTrigger.variants.js";
|
|
6
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
7
|
+
var d = ({ className: a }) => {
|
|
8
|
+
const { isCollapsed: r, canToggle: e, toggleMode: t } = p();
|
|
9
|
+
return e ? /* @__PURE__ */ o("button", {
|
|
10
|
+
type: "button",
|
|
11
|
+
"data-konstruct-sidebar-collapse-trigger": "",
|
|
12
|
+
"aria-label": r ? "Expand navigation" : "Collapse navigation",
|
|
13
|
+
"aria-expanded": !r,
|
|
14
|
+
className: n(g({ className: a })),
|
|
15
|
+
onClick: (i) => {
|
|
16
|
+
i.stopPropagation(), t();
|
|
17
|
+
},
|
|
18
|
+
children: r ? /* @__PURE__ */ o(s, {
|
|
19
|
+
size: 24,
|
|
20
|
+
"aria-hidden": "true"
|
|
21
|
+
}) : /* @__PURE__ */ o(l, {
|
|
22
|
+
size: 24,
|
|
23
|
+
"aria-hidden": "true"
|
|
24
|
+
})
|
|
25
|
+
}) : null;
|
|
26
|
+
};
|
|
27
|
+
d.displayName = "KonstructSidebarCollapseTrigger";
|
|
28
|
+
export {
|
|
29
|
+
d as CollapseTrigger
|
|
30
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { t as e } from "../../../../dist-B9GE4SXf.js";
|
|
2
|
+
var i = e([
|
|
3
|
+
"inline-flex",
|
|
4
|
+
"items-center",
|
|
5
|
+
"justify-center",
|
|
6
|
+
"shrink-0",
|
|
7
|
+
"p-1",
|
|
8
|
+
"rounded",
|
|
9
|
+
"border",
|
|
10
|
+
"border-metal-700",
|
|
11
|
+
"text-metal-50",
|
|
12
|
+
"cursor-pointer",
|
|
13
|
+
"hover:bg-metal-800",
|
|
14
|
+
"focus:outline-none",
|
|
15
|
+
"focus-visible:ring-2",
|
|
16
|
+
"focus-visible:ring-white/40"
|
|
17
|
+
]);
|
|
18
|
+
export {
|
|
19
|
+
i as collapseTriggerVariants
|
|
20
|
+
};
|
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import { useSidebarContext as
|
|
1
|
+
import { t as e } from "../../../../utils-Cx-WzRZF.js";
|
|
2
|
+
import { useSidebarContext as i } from "../../contexts/SidebarContext.js";
|
|
3
3
|
import { logoVariants as s } from "./Logo.variants.js";
|
|
4
|
-
import { jsx as
|
|
5
|
-
var
|
|
6
|
-
const { closeDrawer: t } =
|
|
7
|
-
return /* @__PURE__ */
|
|
4
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
5
|
+
var d = ({ children: r, className: a, showOnCollapse: o = !1 }) => {
|
|
6
|
+
const { closeDrawer: t } = i();
|
|
7
|
+
return /* @__PURE__ */ m("header", {
|
|
8
8
|
"data-konstruct-sidebar-logo": "",
|
|
9
|
-
|
|
9
|
+
"data-hide-on-collapse": o ? void 0 : "",
|
|
10
|
+
className: e(s({
|
|
11
|
+
showOnCollapse: o,
|
|
12
|
+
className: a
|
|
13
|
+
})),
|
|
10
14
|
onClick: () => t(),
|
|
11
|
-
children:
|
|
15
|
+
children: r
|
|
12
16
|
});
|
|
13
17
|
};
|
|
14
|
-
|
|
18
|
+
d.displayName = "KonstructSidebarLogo";
|
|
15
19
|
export {
|
|
16
|
-
|
|
20
|
+
d as Logo
|
|
17
21
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
var
|
|
1
|
+
import { t as a } from "../../../../dist-B9GE4SXf.js";
|
|
2
|
+
var d = a([
|
|
3
3
|
"group-data-[mode=expanded]/sidebar:px-4",
|
|
4
4
|
"group-data-[mode=expanded]/sidebar:py-5",
|
|
5
5
|
"flex",
|
|
@@ -21,7 +21,17 @@ var p = e([
|
|
|
21
21
|
"[&>*>p]:-mt-2",
|
|
22
22
|
"[&>*>img]:pt-3",
|
|
23
23
|
"cursor-pointer"
|
|
24
|
-
]
|
|
24
|
+
], {
|
|
25
|
+
variants: { showOnCollapse: {
|
|
26
|
+
true: null,
|
|
27
|
+
false: [
|
|
28
|
+
"group-data-[mode=collapsed]/sidebar:[&>*:not([data-konstruct-sidebar-collapse-trigger])]:hidden",
|
|
29
|
+
"group-data-[mode=collapsed]/sidebar:py-5",
|
|
30
|
+
"group-data-[mode=collapsed]/sidebar:mb-0"
|
|
31
|
+
]
|
|
32
|
+
} },
|
|
33
|
+
defaultVariants: { showOnCollapse: !1 }
|
|
34
|
+
});
|
|
25
35
|
export {
|
|
26
|
-
|
|
36
|
+
d as logoVariants
|
|
27
37
|
};
|
|
@@ -1,54 +1,58 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import { a as
|
|
3
|
-
import { useSidebarContext as
|
|
4
|
-
import { NavigationOptionContext as
|
|
5
|
-
import { navigationOptionVariants as
|
|
6
|
-
import { Children as
|
|
7
|
-
import { jsx as t, jsxs as
|
|
8
|
-
var
|
|
9
|
-
const o =
|
|
10
|
-
return o.length === 1 &&
|
|
1
|
+
import { t as u } from "../../../../utils-Cx-WzRZF.js";
|
|
2
|
+
import { a as j, i as P, n as V, o as A, r as D, t as E } from "../../../../dist-tGUUcv8n.js";
|
|
3
|
+
import { useSidebarContext as H } from "../../contexts/SidebarContext.js";
|
|
4
|
+
import { NavigationOptionContext as R } from "./NavigationOption.context.js";
|
|
5
|
+
import { navigationOptionVariants as z } from "./NavigationOption.variants.js";
|
|
6
|
+
import { Children as B, isValidElement as K, useCallback as M, useMemo as q, useState as F } from "react";
|
|
7
|
+
import { jsx as t, jsxs as p } from "react/jsx-runtime";
|
|
8
|
+
var G = (e) => {
|
|
9
|
+
const o = B.toArray(e);
|
|
10
|
+
return o.length === 1 && K(o[0]) ? o[0] : /* @__PURE__ */ t("span", {
|
|
11
11
|
className: "flex w-full items-center justify-center gap-2",
|
|
12
12
|
children: e
|
|
13
13
|
});
|
|
14
|
-
},
|
|
15
|
-
const { isCollapsed:
|
|
16
|
-
|
|
17
|
-
}, []),
|
|
18
|
-
hasOwnTooltip:
|
|
19
|
-
registerTooltipContent:
|
|
20
|
-
}), [
|
|
21
|
-
if (!
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
},
|
|
14
|
+
}, I = ({ children: e, className: o, closeDrawerOnClick: m = !0, isVisible: f = !0, isActive: r, role: a, tooltip: C, tooltipBgClassName: g = "bg-kubefirst-dark-blue-900", tooltipArrowClassName: h = "fill-kubefirst-dark-blue-900", tooltipTextClassName: b = "text-white", tooltipClassName: v, ...i }) => {
|
|
15
|
+
const { isCollapsed: x, expandOnHover: k, closeDrawer: w } = H(), n = x && k, [N, y] = F(null), s = M((T) => {
|
|
16
|
+
y(T);
|
|
17
|
+
}, []), O = q(() => ({
|
|
18
|
+
hasOwnTooltip: n,
|
|
19
|
+
registerTooltipContent: s
|
|
20
|
+
}), [n, s]);
|
|
21
|
+
if (!f) return null;
|
|
22
|
+
const S = "onClick" in i ? i.onClick : void 0, l = () => {
|
|
23
|
+
m && w(), S?.();
|
|
24
|
+
}, c = C ?? N, d = n && c ? /* @__PURE__ */ t(P, {
|
|
25
25
|
delayDuration: 0,
|
|
26
|
-
children: /* @__PURE__ */
|
|
26
|
+
children: /* @__PURE__ */ p(j, { children: [/* @__PURE__ */ t(A, {
|
|
27
27
|
asChild: !0,
|
|
28
|
-
children:
|
|
29
|
-
}), /* @__PURE__ */ t(
|
|
28
|
+
children: G(e)
|
|
29
|
+
}), /* @__PURE__ */ t(D, { children: /* @__PURE__ */ p(V, {
|
|
30
30
|
side: "right",
|
|
31
31
|
sideOffset: 12,
|
|
32
|
-
className:
|
|
33
|
-
children: [
|
|
32
|
+
className: u("z-60 flex w-fit items-center gap-2 rounded px-3 py-2 text-sm shadow-lg whitespace-nowrap", "animate-in fade-in-0", g, b, v),
|
|
33
|
+
children: [c, /* @__PURE__ */ t(E, { className: h })]
|
|
34
34
|
}) })] })
|
|
35
35
|
}) : e;
|
|
36
|
-
return /* @__PURE__ */ t(
|
|
37
|
-
value:
|
|
36
|
+
return /* @__PURE__ */ t(R.Provider, {
|
|
37
|
+
value: O,
|
|
38
38
|
children: /* @__PURE__ */ t("li", {
|
|
39
|
-
...
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
className: l(R({
|
|
39
|
+
...i,
|
|
40
|
+
"data-active": r ? "true" : void 0,
|
|
41
|
+
onClick: a === "button" ? void 0 : l,
|
|
42
|
+
className: u(z({
|
|
44
43
|
className: o,
|
|
45
|
-
isActive:
|
|
44
|
+
isActive: r
|
|
46
45
|
})),
|
|
47
|
-
children:
|
|
46
|
+
children: a === "button" ? /* @__PURE__ */ t("button", {
|
|
47
|
+
type: "button",
|
|
48
|
+
onClick: l,
|
|
49
|
+
className: "flex w-full cursor-pointer items-center gap-2",
|
|
50
|
+
children: d
|
|
51
|
+
}) : d
|
|
48
52
|
})
|
|
49
53
|
});
|
|
50
54
|
};
|
|
51
|
-
|
|
55
|
+
I.displayName = "KonstructSidebarNavigationOption";
|
|
52
56
|
export {
|
|
53
|
-
|
|
57
|
+
I as NavigationOption
|
|
54
58
|
};
|
|
@@ -12,16 +12,15 @@ var t = e([
|
|
|
12
12
|
"cursor-pointer",
|
|
13
13
|
"flex",
|
|
14
14
|
"font-normal",
|
|
15
|
-
"font-normal",
|
|
16
15
|
"gap-4",
|
|
17
16
|
"rounded",
|
|
17
|
+
"shrink-0",
|
|
18
18
|
"group-data-[mode=collapsed]/sidebar:justify-center",
|
|
19
19
|
"group-data-[mode=collapsed]/sidebar:[&>a]:justify-center",
|
|
20
|
-
"text-black",
|
|
21
20
|
"w-full",
|
|
22
|
-
"text-
|
|
21
|
+
"text-kubefirst-dark-blue-300",
|
|
23
22
|
"hover:text-white",
|
|
24
|
-
"hover:bg-
|
|
23
|
+
"hover:bg-kubefirst-dark-blue-800",
|
|
25
24
|
"selection:bg-powder-500",
|
|
26
25
|
"selection:text-white"
|
|
27
26
|
], {
|
|
@@ -31,7 +30,7 @@ var t = e([
|
|
|
31
30
|
} },
|
|
32
31
|
compoundVariants: [{
|
|
33
32
|
isActive: !0,
|
|
34
|
-
class: ["text-white", "
|
|
33
|
+
class: ["data-[active=true]:text-white", "data-[active=true]:bg-kubefirst-dark-blue-800"]
|
|
35
34
|
}]
|
|
36
35
|
});
|
|
37
36
|
export {
|
|
@@ -1,114 +1,121 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import { t as
|
|
3
|
-
import { Drawer as
|
|
4
|
-
import { SidebarContext as
|
|
5
|
-
import { useSidebarMode as
|
|
6
|
-
import { dragVariants as
|
|
7
|
-
import { useCallback as
|
|
8
|
-
import { Fragment as
|
|
9
|
-
var
|
|
10
|
-
const
|
|
1
|
+
import { t as Q } from "../../../../HamburgerTrigger-DRylBL2d.js";
|
|
2
|
+
import { t as l } from "../../../../utils-Cx-WzRZF.js";
|
|
3
|
+
import { Drawer as Y } from "../../../Drawer/Drawer.js";
|
|
4
|
+
import { SidebarContext as k } from "../../contexts/SidebarContext.js";
|
|
5
|
+
import { useSidebarMode as Z } from "../../hooks/useSidebarMode.js";
|
|
6
|
+
import { dragVariants as ee, wrapperSiderbarVariants as A } from "../../Sidebar.variants.js";
|
|
7
|
+
import { useCallback as p, useEffect as f, useRef as m, useState as M } from "react";
|
|
8
|
+
import { Fragment as re, jsx as o, jsxs as F } from "react/jsx-runtime";
|
|
9
|
+
var te = 280, ne = ({ animateOnHover: I = !0, canResize: N = !0, children: y, dividerClassName: P, drawerBreakpoint: _, drawerClassNames: i, drawerMaxWidth: b = te, expandedBreakpoint: $, expandOnHover: j = !0, initialMode: C, initialWidth: x = 256, maxWith: s = 300, minWith: a = 240, mode: U = "auto", separatorClassName: D, style: L, theme: E, triggerClassName: X, wrapperClassName: O }) => {
|
|
10
|
+
const t = Z(U, $, _, C), [R, v] = M(!1), [S, W] = M(null), [z, T] = M(null), u = t === "drawer" ? "drawer" : z ?? t, n = m(null), r = m(null), w = m(!1), H = m(!1);
|
|
11
11
|
f(() => {
|
|
12
|
-
if (
|
|
13
|
-
const
|
|
14
|
-
|
|
12
|
+
if (t !== "drawer") return;
|
|
13
|
+
const e = () => {
|
|
14
|
+
W(window.innerWidth);
|
|
15
15
|
};
|
|
16
|
-
return
|
|
17
|
-
window.removeEventListener("resize",
|
|
16
|
+
return e(), window.addEventListener("resize", e), () => {
|
|
17
|
+
window.removeEventListener("resize", e);
|
|
18
18
|
};
|
|
19
|
-
}, [
|
|
20
|
-
const
|
|
19
|
+
}, [t]);
|
|
20
|
+
const g = p((e) => {
|
|
21
21
|
if (!w.current) {
|
|
22
22
|
n.current && (n.current.style.opacity = "0");
|
|
23
23
|
return;
|
|
24
24
|
}
|
|
25
|
-
let c =
|
|
26
|
-
c < a && (c = a), c > s && (c = s),
|
|
27
|
-
}, [s, a]),
|
|
28
|
-
w.current = !1, n.current && n.current.classList.remove("opacity-100"),
|
|
29
|
-
}, [
|
|
30
|
-
|
|
31
|
-
}
|
|
25
|
+
let c = e.clientX;
|
|
26
|
+
c < a && (c = a), c > s && (c = s), r.current && n.current && (r.current.style.width = `${c}px`, n.current.classList.add("opacity-100"));
|
|
27
|
+
}, [s, a]), V = p(() => {
|
|
28
|
+
w.current = !1, n.current && n.current.classList.remove("opacity-100"), r.current && r.current.classList.remove("transition-none"), document.body.style.userSelect = "", document.body.style.cursor = "", document.removeEventListener("mousemove", g), document.removeEventListener("mouseup", V);
|
|
29
|
+
}, [g]), q = (e) => {
|
|
30
|
+
e.preventDefault(), e.stopPropagation(), w.current = !0, r.current && r.current.classList.add("transition-none"), document.body.style.userSelect = "none", document.body.style.cursor = "col-resize", document.addEventListener("mousemove", g), document.addEventListener("mouseup", V);
|
|
31
|
+
};
|
|
32
32
|
f(() => {
|
|
33
|
-
|
|
34
|
-
}, [
|
|
35
|
-
|
|
36
|
-
}, [
|
|
37
|
-
if (
|
|
38
|
-
const
|
|
39
|
-
|
|
33
|
+
u !== "expanded" && r.current && (r.current.style.width = "");
|
|
34
|
+
}, [u]), f(() => {
|
|
35
|
+
t !== "drawer" && v(!1), T(null);
|
|
36
|
+
}, [t]), f(() => {
|
|
37
|
+
if (H.current || u !== "expanded" || !r.current) return;
|
|
38
|
+
const e = Math.min(Math.max(x, a), s);
|
|
39
|
+
r.current.style.width = `${e}px`, H.current = !0;
|
|
40
40
|
}, [
|
|
41
|
-
|
|
41
|
+
x,
|
|
42
42
|
s,
|
|
43
43
|
a,
|
|
44
|
-
|
|
44
|
+
u
|
|
45
45
|
]);
|
|
46
|
-
const
|
|
46
|
+
const B = () => {
|
|
47
47
|
v(!0);
|
|
48
|
-
},
|
|
48
|
+
}, h = p(() => {
|
|
49
49
|
v(!1);
|
|
50
|
-
}, [])
|
|
51
|
-
|
|
50
|
+
}, []), G = p(() => {
|
|
51
|
+
T((e) => (e ?? t) === "collapsed" ? "expanded" : "collapsed");
|
|
52
|
+
}, [t]);
|
|
53
|
+
if (t === "drawer") return /* @__PURE__ */ F(re, { children: [/* @__PURE__ */ o(Q, {
|
|
52
54
|
isOpen: R,
|
|
53
|
-
onClick:
|
|
54
|
-
className:
|
|
55
|
-
}), /* @__PURE__ */ o(
|
|
55
|
+
onClick: B,
|
|
56
|
+
className: X
|
|
57
|
+
}), /* @__PURE__ */ o(Y, {
|
|
56
58
|
isOpen: R,
|
|
57
|
-
onClose:
|
|
59
|
+
onClose: h,
|
|
58
60
|
position: "left",
|
|
59
|
-
defaultWidth:
|
|
60
|
-
theme:
|
|
61
|
+
defaultWidth: S !== null ? Math.min(S, b) : b,
|
|
62
|
+
theme: E,
|
|
61
63
|
classNames: {
|
|
62
|
-
...
|
|
63
|
-
root:
|
|
64
|
-
panel:
|
|
65
|
-
content:
|
|
64
|
+
...i,
|
|
65
|
+
root: l("z-60", i?.root),
|
|
66
|
+
panel: l(A({ mode: "expanded" }), "h-full border-r-0", O, i?.panel),
|
|
67
|
+
content: l("gap-0", i?.content)
|
|
66
68
|
},
|
|
67
|
-
children: /* @__PURE__ */ o(
|
|
69
|
+
children: /* @__PURE__ */ o(k.Provider, {
|
|
68
70
|
value: {
|
|
69
71
|
mode: "expanded",
|
|
70
72
|
isCollapsed: !1,
|
|
71
73
|
expandOnHover: !1,
|
|
72
74
|
animateOnHover: !1,
|
|
73
|
-
separatorClassName:
|
|
74
|
-
closeDrawer:
|
|
75
|
+
separatorClassName: D,
|
|
76
|
+
closeDrawer: h,
|
|
77
|
+
canToggle: !1,
|
|
78
|
+
toggleMode: () => {
|
|
79
|
+
}
|
|
75
80
|
},
|
|
76
81
|
children: /* @__PURE__ */ o("div", {
|
|
77
82
|
className: "konstruct-sidebar group/sidebar flex flex-col flex-1 min-h-0",
|
|
78
83
|
"data-mode": "expanded",
|
|
79
84
|
style: L,
|
|
80
|
-
children:
|
|
85
|
+
children: y
|
|
81
86
|
})
|
|
82
87
|
})
|
|
83
88
|
})] });
|
|
84
|
-
const d =
|
|
89
|
+
const d = z ?? t, J = N && d === "expanded", K = {
|
|
85
90
|
mode: d,
|
|
86
91
|
isCollapsed: d === "collapsed",
|
|
87
|
-
expandOnHover:
|
|
88
|
-
animateOnHover:
|
|
89
|
-
separatorClassName:
|
|
90
|
-
closeDrawer:
|
|
92
|
+
expandOnHover: j,
|
|
93
|
+
animateOnHover: I,
|
|
94
|
+
separatorClassName: D,
|
|
95
|
+
closeDrawer: h,
|
|
96
|
+
canToggle: !0,
|
|
97
|
+
toggleMode: G
|
|
91
98
|
};
|
|
92
|
-
return /* @__PURE__ */ o(
|
|
93
|
-
value:
|
|
94
|
-
children: /* @__PURE__ */
|
|
95
|
-
ref:
|
|
96
|
-
className:
|
|
99
|
+
return /* @__PURE__ */ o(k.Provider, {
|
|
100
|
+
value: K,
|
|
101
|
+
children: /* @__PURE__ */ F("aside", {
|
|
102
|
+
ref: r,
|
|
103
|
+
className: l("konstruct-sidebar", A({
|
|
97
104
|
mode: d,
|
|
98
|
-
className:
|
|
105
|
+
className: O
|
|
99
106
|
})),
|
|
100
|
-
"data-theme":
|
|
107
|
+
"data-theme": E,
|
|
101
108
|
"data-mode": d,
|
|
102
109
|
style: L,
|
|
103
|
-
children: [
|
|
110
|
+
children: [y, J && /* @__PURE__ */ o("div", {
|
|
104
111
|
ref: n,
|
|
105
|
-
className:
|
|
106
|
-
onMouseDown:
|
|
112
|
+
className: l(ee({ className: P })),
|
|
113
|
+
onMouseDown: q
|
|
107
114
|
})]
|
|
108
115
|
})
|
|
109
116
|
});
|
|
110
117
|
};
|
|
111
|
-
|
|
118
|
+
ne.displayName = "Sidebar.Wrapper";
|
|
112
119
|
export {
|
|
113
|
-
|
|
120
|
+
ne as Wrapper
|
|
114
121
|
};
|