@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
|
@@ -0,0 +1,451 @@
|
|
|
1
|
+
import { a as D } from "./dist-xCbHbMLA.js";
|
|
2
|
+
import { t as B } from "./dist-CCdbu9GU.js";
|
|
3
|
+
import { i as we, r as T, t as Pe } from "./dist-D-yS0HN8.js";
|
|
4
|
+
import { t as Re } from "./dist-pWlMx4Fi2.js";
|
|
5
|
+
import { t as _e } from "./dist-CzKqHuqJ2.js";
|
|
6
|
+
import { t as xe } from "./dist-DGOjiAnB2.js";
|
|
7
|
+
import * as u from "react";
|
|
8
|
+
import { Fragment as Ee, jsx as S, jsxs as ye } from "react/jsx-runtime";
|
|
9
|
+
var Ce = Object.defineProperty, Me = (t, e) => Ce(t, "name", {
|
|
10
|
+
value: e,
|
|
11
|
+
configurable: !0
|
|
12
|
+
});
|
|
13
|
+
function j(t, [e, r]) {
|
|
14
|
+
return Math.min(r, Math.max(e, t));
|
|
15
|
+
}
|
|
16
|
+
Me(j, "clamp");
|
|
17
|
+
var Te = Object.defineProperty, De = (t, e) => Te(t, "name", {
|
|
18
|
+
value: e,
|
|
19
|
+
configurable: !0
|
|
20
|
+
});
|
|
21
|
+
function te(t) {
|
|
22
|
+
const e = u.useRef({
|
|
23
|
+
value: t,
|
|
24
|
+
previous: t
|
|
25
|
+
});
|
|
26
|
+
return u.useMemo(() => (e.current.value !== t && (e.current.previous = e.current.value, e.current.value = t), e.current.previous), [t]);
|
|
27
|
+
}
|
|
28
|
+
De(te, "usePrevious");
|
|
29
|
+
var Ve = Object.defineProperty, c = (t, e) => Ve(t, "name", {
|
|
30
|
+
value: e,
|
|
31
|
+
configurable: !0
|
|
32
|
+
}), ne = ["PageUp", "PageDown"], re = [
|
|
33
|
+
"ArrowUp",
|
|
34
|
+
"ArrowDown",
|
|
35
|
+
"ArrowLeft",
|
|
36
|
+
"ArrowRight"
|
|
37
|
+
], oe = {
|
|
38
|
+
"from-left": [
|
|
39
|
+
"Home",
|
|
40
|
+
"PageDown",
|
|
41
|
+
"ArrowDown",
|
|
42
|
+
"ArrowLeft"
|
|
43
|
+
],
|
|
44
|
+
"from-right": [
|
|
45
|
+
"Home",
|
|
46
|
+
"PageDown",
|
|
47
|
+
"ArrowDown",
|
|
48
|
+
"ArrowRight"
|
|
49
|
+
],
|
|
50
|
+
"from-bottom": [
|
|
51
|
+
"Home",
|
|
52
|
+
"PageDown",
|
|
53
|
+
"ArrowDown",
|
|
54
|
+
"ArrowLeft"
|
|
55
|
+
],
|
|
56
|
+
"from-top": [
|
|
57
|
+
"Home",
|
|
58
|
+
"PageDown",
|
|
59
|
+
"ArrowUp",
|
|
60
|
+
"ArrowLeft"
|
|
61
|
+
]
|
|
62
|
+
}, A = "Slider", [U, Ie, Be] = _e(A), [Y, qe] = we(A, [Be]), [Ae, K] = Y(A), Je = /* @__PURE__ */ u.forwardRef(/* @__PURE__ */ c(function(e, r) {
|
|
63
|
+
const { name: o, min: i = 0, max: n = 100, step: l = 1, orientation: s = "horizontal", disabled: d = !1, minStepsBetweenThumbs: f = 0, defaultValue: h = [i], value: p, onValueChange: a = /* @__PURE__ */ c(() => {
|
|
64
|
+
}, "onValueChange"), onValueCommit: m = /* @__PURE__ */ c(() => {
|
|
65
|
+
}, "onValueCommit"), inverted: P = !1, form: g, ...v } = e, w = u.useRef(/* @__PURE__ */ new Set()), R = u.useRef(0), x = u.useRef(!1), E = s === "horizontal" ? Ke : Fe, [_, k] = u.useState(null), ve = D(r, k), [y = [], z] = Pe({
|
|
66
|
+
prop: p,
|
|
67
|
+
defaultProp: h,
|
|
68
|
+
onChange: /* @__PURE__ */ c((b) => {
|
|
69
|
+
[...w.current][R.current]?.focus({
|
|
70
|
+
preventScroll: !0,
|
|
71
|
+
focusVisible: x.current
|
|
72
|
+
}), x.current = !1, a(b);
|
|
73
|
+
}, "onChange")
|
|
74
|
+
}), W = u.useRef(y), be = u.useRef(y);
|
|
75
|
+
u.useEffect(() => {
|
|
76
|
+
const b = g ? _?.ownerDocument.getElementById(g) : _?.closest("form");
|
|
77
|
+
if (b instanceof HTMLFormElement) {
|
|
78
|
+
const M = /* @__PURE__ */ c(() => z(be.current), "reset");
|
|
79
|
+
return b.addEventListener("reset", M), () => b.removeEventListener("reset", M);
|
|
80
|
+
}
|
|
81
|
+
}, [
|
|
82
|
+
_,
|
|
83
|
+
g,
|
|
84
|
+
z
|
|
85
|
+
]);
|
|
86
|
+
function q(b) {
|
|
87
|
+
C(b, fe(y, b));
|
|
88
|
+
}
|
|
89
|
+
c(q, "handleSlideStart");
|
|
90
|
+
function J(b) {
|
|
91
|
+
C(b, R.current);
|
|
92
|
+
}
|
|
93
|
+
c(J, "handleSlideMove");
|
|
94
|
+
function Q() {
|
|
95
|
+
String(y) !== String(W.current) && m(y);
|
|
96
|
+
}
|
|
97
|
+
c(Q, "handleSlideEnd");
|
|
98
|
+
function C(b, M, { commit: L } = { commit: !1 }) {
|
|
99
|
+
const F = X(l), N = j(I(Math.round((b - i) / l) * l + i, F), [i, n]);
|
|
100
|
+
z((H = []) => {
|
|
101
|
+
const V = ue(H, N, M);
|
|
102
|
+
if (he(V, f * l)) {
|
|
103
|
+
R.current = V.indexOf(N);
|
|
104
|
+
const Z = String(V) !== String(H);
|
|
105
|
+
return Z && L && m(V), Z ? V : H;
|
|
106
|
+
} else return H;
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
return c(C, "updateValues"), /* @__PURE__ */ S(Ae, {
|
|
110
|
+
scope: e.__scopeSlider,
|
|
111
|
+
name: o,
|
|
112
|
+
disabled: d,
|
|
113
|
+
min: i,
|
|
114
|
+
max: n,
|
|
115
|
+
valueIndexToChangeRef: R,
|
|
116
|
+
thumbs: w.current,
|
|
117
|
+
values: y,
|
|
118
|
+
orientation: s,
|
|
119
|
+
form: g,
|
|
120
|
+
children: /* @__PURE__ */ S(U.Provider, {
|
|
121
|
+
scope: e.__scopeSlider,
|
|
122
|
+
children: /* @__PURE__ */ S(U.Slot, {
|
|
123
|
+
scope: e.__scopeSlider,
|
|
124
|
+
children: /* @__PURE__ */ S(E, {
|
|
125
|
+
"aria-disabled": d,
|
|
126
|
+
"data-disabled": d ? "" : void 0,
|
|
127
|
+
...v,
|
|
128
|
+
ref: ve,
|
|
129
|
+
onPointerDown: T(v.onPointerDown, () => {
|
|
130
|
+
d || (W.current = y, x.current = !1);
|
|
131
|
+
}),
|
|
132
|
+
min: i,
|
|
133
|
+
max: n,
|
|
134
|
+
inverted: P,
|
|
135
|
+
onSlideStart: d ? void 0 : q,
|
|
136
|
+
onSlideMove: d ? void 0 : J,
|
|
137
|
+
onSlideEnd: d ? void 0 : Q,
|
|
138
|
+
onHomeKeyDown: () => {
|
|
139
|
+
d || (x.current = !0, C(i, 0, { commit: !0 }));
|
|
140
|
+
},
|
|
141
|
+
onEndKeyDown: () => {
|
|
142
|
+
d || (x.current = !0, C(n, y.length - 1, { commit: !0 }));
|
|
143
|
+
},
|
|
144
|
+
onStepKeyDown: ({ event: b, direction: M }) => {
|
|
145
|
+
if (!d) {
|
|
146
|
+
x.current = !0;
|
|
147
|
+
const L = ne.includes(b.key) || b.shiftKey && re.includes(b.key) ? 10 : 1, F = R.current, N = y[F];
|
|
148
|
+
C(pe(N, {
|
|
149
|
+
min: i,
|
|
150
|
+
step: l,
|
|
151
|
+
direction: M,
|
|
152
|
+
multiplier: L
|
|
153
|
+
}), F, { commit: !0 });
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
})
|
|
157
|
+
})
|
|
158
|
+
})
|
|
159
|
+
});
|
|
160
|
+
}, "Slider")), [ie, ae] = Y(A, {
|
|
161
|
+
startEdge: "left",
|
|
162
|
+
endEdge: "right",
|
|
163
|
+
size: "width",
|
|
164
|
+
direction: 1
|
|
165
|
+
}), Ke = /* @__PURE__ */ u.forwardRef(/* @__PURE__ */ c(function(e, r) {
|
|
166
|
+
const { min: o, max: i, dir: n, inverted: l, onSlideStart: s, onSlideMove: d, onSlideEnd: f, onStepKeyDown: h, ...p } = e, [a, m] = u.useState(null), P = D(r, m), g = u.useRef(void 0), v = xe(n), w = v === "ltr", R = w && !l || !w && l;
|
|
167
|
+
function x(E) {
|
|
168
|
+
const _ = g.current || a.getBoundingClientRect(), k = O([0, _.width], R ? [o, i] : [i, o]);
|
|
169
|
+
return g.current = _, k(E - _.left);
|
|
170
|
+
}
|
|
171
|
+
return c(x, "getValueFromPointer"), /* @__PURE__ */ S(ie, {
|
|
172
|
+
scope: e.__scopeSlider,
|
|
173
|
+
startEdge: R ? "left" : "right",
|
|
174
|
+
endEdge: R ? "right" : "left",
|
|
175
|
+
direction: R ? 1 : -1,
|
|
176
|
+
size: "width",
|
|
177
|
+
children: /* @__PURE__ */ S(se, {
|
|
178
|
+
dir: v,
|
|
179
|
+
"data-orientation": "horizontal",
|
|
180
|
+
...p,
|
|
181
|
+
ref: P,
|
|
182
|
+
style: {
|
|
183
|
+
...p.style,
|
|
184
|
+
"--radix-slider-thumb-transform": "translateX(-50%)"
|
|
185
|
+
},
|
|
186
|
+
onSlideStart: (E) => {
|
|
187
|
+
const _ = x(E.clientX);
|
|
188
|
+
s?.(_);
|
|
189
|
+
},
|
|
190
|
+
onSlideMove: (E) => {
|
|
191
|
+
const _ = x(E.clientX);
|
|
192
|
+
d?.(_);
|
|
193
|
+
},
|
|
194
|
+
onSlideEnd: () => {
|
|
195
|
+
g.current = void 0, f?.();
|
|
196
|
+
},
|
|
197
|
+
onStepKeyDown: (E) => {
|
|
198
|
+
const _ = oe[R ? "from-left" : "from-right"].includes(E.key);
|
|
199
|
+
h?.({
|
|
200
|
+
event: E,
|
|
201
|
+
direction: _ ? -1 : 1
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
})
|
|
205
|
+
});
|
|
206
|
+
}, "SliderHorizontal")), Fe = /* @__PURE__ */ u.forwardRef(/* @__PURE__ */ c(function(e, r) {
|
|
207
|
+
const { min: o, max: i, inverted: n, onSlideStart: l, onSlideMove: s, onSlideEnd: d, onStepKeyDown: f, ...h } = e, p = u.useRef(null), a = D(r, p), m = u.useRef(void 0), P = !n;
|
|
208
|
+
function g(v) {
|
|
209
|
+
const w = m.current || p.current.getBoundingClientRect(), R = O([0, w.height], P ? [i, o] : [o, i]);
|
|
210
|
+
return m.current = w, R(v - w.top);
|
|
211
|
+
}
|
|
212
|
+
return c(g, "getValueFromPointer"), /* @__PURE__ */ S(ie, {
|
|
213
|
+
scope: e.__scopeSlider,
|
|
214
|
+
startEdge: P ? "bottom" : "top",
|
|
215
|
+
endEdge: P ? "top" : "bottom",
|
|
216
|
+
size: "height",
|
|
217
|
+
direction: P ? 1 : -1,
|
|
218
|
+
children: /* @__PURE__ */ S(se, {
|
|
219
|
+
"data-orientation": "vertical",
|
|
220
|
+
...h,
|
|
221
|
+
ref: a,
|
|
222
|
+
style: {
|
|
223
|
+
...h.style,
|
|
224
|
+
"--radix-slider-thumb-transform": "translateY(50%)"
|
|
225
|
+
},
|
|
226
|
+
onSlideStart: (v) => {
|
|
227
|
+
const w = g(v.clientY);
|
|
228
|
+
l?.(w);
|
|
229
|
+
},
|
|
230
|
+
onSlideMove: (v) => {
|
|
231
|
+
const w = g(v.clientY);
|
|
232
|
+
s?.(w);
|
|
233
|
+
},
|
|
234
|
+
onSlideEnd: () => {
|
|
235
|
+
m.current = void 0, d?.();
|
|
236
|
+
},
|
|
237
|
+
onStepKeyDown: (v) => {
|
|
238
|
+
const w = oe[P ? "from-bottom" : "from-top"].includes(v.key);
|
|
239
|
+
f?.({
|
|
240
|
+
event: v,
|
|
241
|
+
direction: w ? -1 : 1
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
})
|
|
245
|
+
});
|
|
246
|
+
}, "SliderVertical")), se = /* @__PURE__ */ u.forwardRef(/* @__PURE__ */ c(function(e, r) {
|
|
247
|
+
const { __scopeSlider: o, onSlideStart: i, onSlideMove: n, onSlideEnd: l, onHomeKeyDown: s, onEndKeyDown: d, onStepKeyDown: f, ...h } = e, p = K(A, o);
|
|
248
|
+
return /* @__PURE__ */ S(B.span, {
|
|
249
|
+
...h,
|
|
250
|
+
ref: r,
|
|
251
|
+
onKeyDown: T(e.onKeyDown, (a) => {
|
|
252
|
+
a.key === "Home" ? (s(a), a.preventDefault()) : a.key === "End" ? (d(a), a.preventDefault()) : ne.concat(re).includes(a.key) && (f(a), a.preventDefault());
|
|
253
|
+
}),
|
|
254
|
+
onPointerDown: T(e.onPointerDown, (a) => {
|
|
255
|
+
const m = a.target;
|
|
256
|
+
m.setPointerCapture(a.pointerId), a.preventDefault(), p.thumbs.has(m) ? m.focus({
|
|
257
|
+
preventScroll: !0,
|
|
258
|
+
focusVisible: !1
|
|
259
|
+
}) : i(a);
|
|
260
|
+
}),
|
|
261
|
+
onPointerMove: T(e.onPointerMove, (a) => {
|
|
262
|
+
a.target.hasPointerCapture(a.pointerId) && n(a);
|
|
263
|
+
}),
|
|
264
|
+
onPointerUp: T(e.onPointerUp, (a) => {
|
|
265
|
+
const m = a.target;
|
|
266
|
+
m.hasPointerCapture(a.pointerId) && (m.releasePointerCapture(a.pointerId), l(a));
|
|
267
|
+
})
|
|
268
|
+
});
|
|
269
|
+
}, "SliderImpl")), Ne = "SliderTrack", Qe = /* @__PURE__ */ u.forwardRef(/* @__PURE__ */ c(function(e, r) {
|
|
270
|
+
const { __scopeSlider: o, ...i } = e, n = K(Ne, o);
|
|
271
|
+
return /* @__PURE__ */ S(B.span, {
|
|
272
|
+
"data-disabled": n.disabled ? "" : void 0,
|
|
273
|
+
"data-orientation": n.orientation,
|
|
274
|
+
...i,
|
|
275
|
+
ref: r
|
|
276
|
+
});
|
|
277
|
+
}, "SliderTrack")), ee = "SliderRange", Ze = /* @__PURE__ */ u.forwardRef(/* @__PURE__ */ c(function(e, r) {
|
|
278
|
+
const { __scopeSlider: o, ...i } = e, n = K(ee, o), l = ae(ee, o), s = D(r, u.useRef(null)), d = n.values.length, f = n.values.map((a) => G(a, n.min, n.max)), h = d > 1 ? Math.min(...f) : 0, p = 100 - Math.max(...f);
|
|
279
|
+
return /* @__PURE__ */ S(B.span, {
|
|
280
|
+
"data-orientation": n.orientation,
|
|
281
|
+
"data-disabled": n.disabled ? "" : void 0,
|
|
282
|
+
...i,
|
|
283
|
+
ref: s,
|
|
284
|
+
style: {
|
|
285
|
+
...e.style,
|
|
286
|
+
[l.startEdge]: h + "%",
|
|
287
|
+
[l.endEdge]: p + "%"
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
}, "SliderRange")), [He, le] = Y("SliderThumb"), Oe = "SliderThumbProvider";
|
|
291
|
+
function ce(t) {
|
|
292
|
+
const { __scopeSlider: e, name: r, children: o, internal_do_not_use_render: i } = t, n = K(Oe, e), l = Ie(e), [s, d] = u.useState(null), f = u.useMemo(() => s ? l().findIndex((v) => v.ref.current === s) : -1, [l, s]), h = Re(s), p = s ? !!n.form || !!s.closest("form") : !0, a = n.values[f], m = r ?? (n.name ? n.name + (n.values.length > 1 ? "[]" : "") : void 0), P = a === void 0 ? 0 : G(a, n.min, n.max);
|
|
293
|
+
u.useEffect(() => {
|
|
294
|
+
if (s)
|
|
295
|
+
return n.thumbs.add(s), () => {
|
|
296
|
+
n.thumbs.delete(s);
|
|
297
|
+
};
|
|
298
|
+
}, [s, n.thumbs]);
|
|
299
|
+
const g = {
|
|
300
|
+
value: a,
|
|
301
|
+
name: m,
|
|
302
|
+
form: n.form,
|
|
303
|
+
isFormControl: p,
|
|
304
|
+
index: f,
|
|
305
|
+
thumb: s,
|
|
306
|
+
onThumbChange: d,
|
|
307
|
+
percent: P,
|
|
308
|
+
size: h
|
|
309
|
+
};
|
|
310
|
+
return /* @__PURE__ */ S(He, {
|
|
311
|
+
scope: e,
|
|
312
|
+
...g,
|
|
313
|
+
children: ge(i) ? i(g) : o
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
c(ce, "SliderThumbProvider");
|
|
317
|
+
var $ = "SliderThumbTrigger", ke = /* @__PURE__ */ u.forwardRef(/* @__PURE__ */ c(function(e, r) {
|
|
318
|
+
const { __scopeSlider: o, ...i } = e, n = K($, o), l = ae($, o), { index: s, value: d, percent: f, size: h, onThumbChange: p } = le($, o), a = D(r, p), m = de(s, n.values.length), P = h?.[l.size], g = P ? me(P, f, l.direction) : 0;
|
|
319
|
+
return /* @__PURE__ */ S("span", {
|
|
320
|
+
style: {
|
|
321
|
+
transform: "var(--radix-slider-thumb-transform)",
|
|
322
|
+
position: "absolute",
|
|
323
|
+
[l.startEdge]: `calc(${f}% + ${g}px)`
|
|
324
|
+
},
|
|
325
|
+
children: /* @__PURE__ */ S(U.ItemSlot, {
|
|
326
|
+
scope: o,
|
|
327
|
+
children: /* @__PURE__ */ S(B.span, {
|
|
328
|
+
role: "slider",
|
|
329
|
+
"aria-label": e["aria-label"] || m,
|
|
330
|
+
"aria-valuemin": n.min,
|
|
331
|
+
"aria-valuenow": d,
|
|
332
|
+
"aria-valuemax": n.max,
|
|
333
|
+
"aria-orientation": n.orientation,
|
|
334
|
+
"data-orientation": n.orientation,
|
|
335
|
+
"data-disabled": n.disabled ? "" : void 0,
|
|
336
|
+
tabIndex: n.disabled ? void 0 : 0,
|
|
337
|
+
...i,
|
|
338
|
+
ref: a,
|
|
339
|
+
style: d === void 0 ? { display: "none" } : e.style,
|
|
340
|
+
onFocus: T(e.onFocus, () => {
|
|
341
|
+
n.valueIndexToChangeRef.current = s;
|
|
342
|
+
})
|
|
343
|
+
})
|
|
344
|
+
})
|
|
345
|
+
});
|
|
346
|
+
}, "SliderThumbTrigger")), et = /* @__PURE__ */ u.forwardRef(/* @__PURE__ */ c(function(e, r) {
|
|
347
|
+
const { __scopeSlider: o, name: i, ...n } = e;
|
|
348
|
+
return /* @__PURE__ */ S(ce, {
|
|
349
|
+
__scopeSlider: o,
|
|
350
|
+
name: i,
|
|
351
|
+
internal_do_not_use_render: ({ index: l, isFormControl: s }) => /* @__PURE__ */ ye(Ee, { children: [/* @__PURE__ */ S(ke, {
|
|
352
|
+
...n,
|
|
353
|
+
ref: r,
|
|
354
|
+
__scopeSlider: o
|
|
355
|
+
}), s ? /* @__PURE__ */ S(Le, { __scopeSlider: o }, l) : null] })
|
|
356
|
+
});
|
|
357
|
+
}, "SliderThumb")), ze = "SliderBubbleInput", Le = /* @__PURE__ */ u.forwardRef(/* @__PURE__ */ c(function({ __scopeSlider: e, ...r }, o) {
|
|
358
|
+
const { value: i, name: n, form: l } = le(ze, e), s = u.useRef(null), d = D(s, o), f = te(i);
|
|
359
|
+
return u.useEffect(() => {
|
|
360
|
+
const h = s.current;
|
|
361
|
+
if (!h) return;
|
|
362
|
+
const p = window.HTMLInputElement.prototype, a = Object.getOwnPropertyDescriptor(p, "value").set;
|
|
363
|
+
if (f !== i && a) {
|
|
364
|
+
const m = new Event("input", { bubbles: !0 });
|
|
365
|
+
a.call(h, i), h.dispatchEvent(m);
|
|
366
|
+
}
|
|
367
|
+
}, [f, i]), /* @__PURE__ */ S(B.input, {
|
|
368
|
+
style: { display: "none" },
|
|
369
|
+
name: n,
|
|
370
|
+
form: l,
|
|
371
|
+
...r,
|
|
372
|
+
ref: d,
|
|
373
|
+
defaultValue: i
|
|
374
|
+
});
|
|
375
|
+
}, "SliderBubbleInput"));
|
|
376
|
+
function ue(t = [], e, r) {
|
|
377
|
+
const o = [...t];
|
|
378
|
+
return o[r] = e, o.sort((i, n) => i - n);
|
|
379
|
+
}
|
|
380
|
+
c(ue, "getNextSortedValues");
|
|
381
|
+
function G(t, e, r) {
|
|
382
|
+
return j(100 / (r - e) * (t - e), [0, 100]);
|
|
383
|
+
}
|
|
384
|
+
c(G, "convertValueToPercentage");
|
|
385
|
+
function de(t, e) {
|
|
386
|
+
return e > 2 ? `Value ${t + 1} of ${e}` : e === 2 ? ["Minimum", "Maximum"][t] : void 0;
|
|
387
|
+
}
|
|
388
|
+
c(de, "getLabel");
|
|
389
|
+
function fe(t, e) {
|
|
390
|
+
if (t.length === 1) return 0;
|
|
391
|
+
const r = t.map((i) => Math.abs(i - e)), o = Math.min(...r);
|
|
392
|
+
return r.indexOf(o);
|
|
393
|
+
}
|
|
394
|
+
c(fe, "getClosestValueIndex");
|
|
395
|
+
function me(t, e, r) {
|
|
396
|
+
const o = t / 2;
|
|
397
|
+
return (o - O([0, 50], [0, o])(e) * r) * r;
|
|
398
|
+
}
|
|
399
|
+
c(me, "getThumbInBoundsOffset");
|
|
400
|
+
function Se(t) {
|
|
401
|
+
return t.slice(0, -1).map((e, r) => t[r + 1] - e);
|
|
402
|
+
}
|
|
403
|
+
c(Se, "getStepsBetweenValues");
|
|
404
|
+
function he(t, e) {
|
|
405
|
+
if (e > 0) {
|
|
406
|
+
const r = Se(t);
|
|
407
|
+
return Math.min(...r) >= e;
|
|
408
|
+
}
|
|
409
|
+
return !0;
|
|
410
|
+
}
|
|
411
|
+
c(he, "hasMinStepsBetweenValues");
|
|
412
|
+
function O(t, e) {
|
|
413
|
+
return (r) => {
|
|
414
|
+
if (t[0] === t[1] || e[0] === e[1]) return e[0];
|
|
415
|
+
const o = (e[1] - e[0]) / (t[1] - t[0]);
|
|
416
|
+
return e[0] + o * (r - t[0]);
|
|
417
|
+
};
|
|
418
|
+
}
|
|
419
|
+
c(O, "linearScale");
|
|
420
|
+
function X(t) {
|
|
421
|
+
if (!Number.isFinite(t)) return 0;
|
|
422
|
+
const e = t.toString();
|
|
423
|
+
if (e.includes("e")) {
|
|
424
|
+
const [o, i] = e.split("e"), n = o.split(".")[1] || "", l = Number(i);
|
|
425
|
+
return Math.max(0, n.length - l);
|
|
426
|
+
}
|
|
427
|
+
const r = e.split(".")[1];
|
|
428
|
+
return r ? r.length : 0;
|
|
429
|
+
}
|
|
430
|
+
c(X, "getDecimalCount");
|
|
431
|
+
function I(t, e) {
|
|
432
|
+
const r = Math.pow(10, e);
|
|
433
|
+
return Math.round(t * r) / r;
|
|
434
|
+
}
|
|
435
|
+
c(I, "roundValue");
|
|
436
|
+
function pe(t, { min: e, step: r, direction: o, multiplier: i }) {
|
|
437
|
+
const n = X(r), l = (t - e) / r, s = Math.round(l), d = I(s * r + e, n) === I(t, n);
|
|
438
|
+
let f;
|
|
439
|
+
return d ? f = s + i * o : o > 0 ? f = Math.ceil(l) : f = Math.floor(l), I(f * r + e, n);
|
|
440
|
+
}
|
|
441
|
+
c(pe, "getNextStepValue");
|
|
442
|
+
function ge(t) {
|
|
443
|
+
return typeof t == "function";
|
|
444
|
+
}
|
|
445
|
+
c(ge, "isFunction");
|
|
446
|
+
export {
|
|
447
|
+
Qe as i,
|
|
448
|
+
Ze as n,
|
|
449
|
+
et as r,
|
|
450
|
+
Je as t
|
|
451
|
+
};
|