@konstructio/ui 0.1.2-alpha.112 → 0.1.2-alpha.113
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-D3SZ2WFJ.js → AdditionalOptions-ClcR_Kf7.js} +1 -1
- package/dist/{AlertDialogTrigger-Cdw3C2Tv.js → AlertDialogTrigger-C9xoCZrZ.js} +33 -33
- package/dist/Checkbox-DRdyrKjk.js +252 -0
- package/dist/CollapsedSteps-CR7oCTRC.js +112 -0
- package/dist/{CommandInput-DiRv6fEA.js → CommandInput-Du2o616y.js} +1 -1
- package/dist/Counter-DMkXIsOO.js +229 -0
- package/dist/DropdownButton-JilCRLJY.js +92 -0
- package/dist/FlagSelectorList-iZ3gUVpf.js +954 -0
- package/dist/{HamburgerTrigger-DjHmNEJD.js → HamburgerTrigger-BgeS_nBA.js} +15 -15
- package/dist/Modal-CysTe3zL.js +83 -0
- package/dist/Spinner-CTonkSzG.js +47 -0
- package/dist/Switch-5cdUxbhX.js +215 -0
- package/dist/{Wrapper-MmlrJppS.js → Wrapper-BCi_pLOr.js} +38 -38
- package/dist/{Wrapper-BxfB3BDa.js → Wrapper-ThpRi_Gg.js} +9 -9
- package/dist/components/Alert/Alert.js +45 -41
- package/dist/components/AlertDialog/AlertDialog.js +42 -42
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/Avatar/Avatar.js +37 -0
- package/dist/components/Avatar/Avatar.variants.js +25 -0
- package/dist/components/Avatar/hooks/index.js +5 -0
- package/dist/components/Avatar/hooks/use-gravatar-url.js +25 -0
- package/dist/components/AvatarGroup/AvatarGroup.js +40 -0
- package/dist/components/Badge/Badge.js +1 -1
- package/dist/components/BadgeGroup/BadgeGroup.js +62 -0
- package/dist/components/BadgeGroup/hooks/index.js +4 -0
- package/dist/components/BadgeGroup/hooks/use-visible-badge-count/use-visible-badge-count.js +50 -0
- package/dist/components/Breadcrumb/components/CollapsedSteps/CollapsedSteps.js +4 -0
- package/dist/components/Breadcrumb/components/index.js +6 -4
- package/dist/components/Button/Button.js +25 -19
- package/dist/components/Button/Button.variants.js +4 -1
- package/dist/components/ButtonGroup/ButtonGroup.js +16 -16
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.js +8 -8
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/CheckboxCard/CheckboxCard.js +52 -0
- package/dist/components/Collapse/Collapse.js +63 -0
- package/dist/components/Command/Command.js +5 -5
- package/dist/components/Command/components/Command.js +1 -1
- 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 +1 -1
- package/dist/components/Command/components/CommandSeparator.js +1 -1
- package/dist/components/Command/components/DialogContent.js +1 -1
- package/dist/components/Command/components/DialogOverlay.js +1 -1
- package/dist/components/Command/components/index.js +1 -1
- package/dist/components/ConfirmDialog/ConfirmDialog.js +110 -0
- package/dist/components/CopyButton/CopyButton.js +29 -29
- package/dist/components/Counter/Counter.js +1 -1
- package/dist/components/Counter/Counter.variants.js +73 -16
- package/dist/components/DateRangePicker/components/CalendarPanel/CalendarPanel.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.js +23 -31
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/components/CalendarMonthContent/CalendarMonthContent.js +26 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +8 -8
- package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +13 -13
- package/dist/components/DateRangePicker/components/RightPanel/RightPanel.js +15 -16
- package/dist/components/Datepicker/DatePicker.js +14 -49
- package/dist/components/Datepicker/components/DatePickerContent/DatePickerContent.js +51 -0
- package/dist/components/Drawer/Drawer.js +18 -18
- package/dist/components/DropdownButton/DropdownButton.js +1 -1
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +1 -1
- package/dist/components/Filter/components/CustomDateRangeFilterDropdown/components/Actions/Actions.js +10 -11
- package/dist/components/Filter/components/CustomDateRangeFilterDropdown/hooks/useFormattedDateRange/useFormattedDateRange.js +25 -22
- package/dist/components/Filter/components/DateFilterDropdown/hooks/useDateFilterDropdown/useDateFilterDropdown.js +16 -16
- package/dist/components/Filter/components/DateRangeFilterDropdown/hooks/useDateRangeFilterDropdown/useDateRangeFilterDropdown.js +29 -29
- package/dist/components/Filter/components/FilterDropdown/FilterDropdown.js +10 -10
- package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +1 -1
- package/dist/components/Filter/hooks/index.js +3 -1
- package/dist/components/Filter/hooks/useLocale.js +16 -0
- package/dist/components/Filter/utils/index.js +6 -2
- package/dist/components/LineChart/LineChart.js +18 -125
- package/dist/components/LineChart/components/LineChartContent/LineChartContent.js +127 -0
- 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/MultiSelectDropdown/MultiSelectDropdown.js +1 -1
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.variants.js +22 -3
- 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/OtpInput/OtpInput.js +103 -0
- package/dist/components/PasswordRules/PasswordRules.js +51 -0
- package/dist/components/PhoneNumberInput/PhoneNumberInput.js +39 -10
- package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +1 -1
- package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +4 -4
- package/dist/components/PhoneNumberInput/components/PhoneNumberInputContent.js +15 -0
- package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +15 -15
- 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 +4 -4
- package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +1 -1
- package/dist/components/PieChart/PieChart.js +10 -53
- package/dist/components/PieChart/components/PieChartContent/PieChartContent.js +56 -0
- package/dist/components/ProgressBar/ProgressBar.js +10 -10
- package/dist/components/RadioCard/RadioCard.js +36 -18
- package/dist/components/RadioCard/RadioCard.variants.js +9 -3
- package/dist/components/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/Range/Range.js +1 -1
- 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 +10 -10
- package/dist/components/Select/components/Wrapper.js +1 -1
- package/dist/components/Select/components/index.js +2 -2
- package/dist/components/Sidebar/components/CollapseTrigger/CollapseTrigger.js +15 -15
- package/dist/components/Sidebar/components/HamburgerTrigger/HamburgerTrigger.js +1 -1
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +66 -42
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.js +10 -4
- package/dist/components/Sidebar/components/Wrapper/Wrapper.js +91 -86
- package/dist/components/Sidebar/components/index.js +1 -1
- package/dist/components/Skeleton/Skeleton.js +18 -0
- package/dist/components/Skeleton/Skeleton.variants.js +25 -0
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/Spinner/Spinner.js +1 -1
- package/dist/components/Stepper/Stepper.js +38 -29
- package/dist/components/Stepper/Stepper.variants.js +55 -19
- package/dist/components/Stepper/hooks/useStepItemLogic.js +1 -1
- package/dist/components/Switch/Switch.js +1 -1
- package/dist/components/Tabs/Tabs.js +52 -24
- package/dist/components/Tabs/Tabs.variants.js +15 -6
- package/dist/components/Tabs/components/Content.js +6 -6
- package/dist/components/Tabs/components/List.js +10 -10
- package/dist/components/Tabs/components/Trigger.js +11 -10
- package/dist/components/Tag/Tag.js +1 -1
- package/dist/components/TagsInput/TagsInput.js +159 -0
- package/dist/components/Toast/Toast.js +68 -2
- package/dist/components/Toast/components/ToastCard/ToastCard.js +32 -32
- package/dist/components/Tooltip/Tooltip.js +32 -16
- package/dist/components/VirtualizedTable/VirtualizedTable.js +32 -101
- package/dist/components/VirtualizedTable/components/Actions/Actions.variants.js +18 -5
- package/dist/components/VirtualizedTable/components/Actions/components/ActionsList/ActionsList.js +29 -19
- package/dist/components/VirtualizedTable/components/Actions/components/InlineActions/InlineActions.js +66 -33
- package/dist/components/VirtualizedTable/components/Actions/components/PortalActions/PortalActions.js +31 -29
- package/dist/components/VirtualizedTable/components/Actions/components/PortalActions/hooks/use-actions-menu/use-actions-menu.js +23 -20
- package/dist/components/VirtualizedTable/components/Actions/components/PortalActions/hooks/use-menu-interactions/use-menu-interactions.js +51 -45
- package/dist/components/VirtualizedTable/components/Body/Body.js +6 -6
- package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +22 -22
- package/dist/components/VirtualizedTable/components/EmptyResults/EmptyResults.js +30 -0
- package/dist/components/VirtualizedTable/components/EmptyState/EmptyState.js +32 -0
- package/dist/components/VirtualizedTable/components/ErrorState/ErrorState.js +35 -0
- package/dist/components/VirtualizedTable/components/Filter/Filter.js +5 -5
- package/dist/components/VirtualizedTable/components/Header/Header.js +4 -4
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +46 -39
- package/dist/components/VirtualizedTable/components/VirtualizedTableContent/VirtualizedTableContent.js +91 -0
- package/dist/components/VirtualizedTable/components/index.js +18 -12
- package/dist/components/VirtualizedTable/contexts/index.js +6 -6
- package/dist/components/VirtualizedTable/contexts/table.context.js +1 -0
- package/dist/components/VirtualizedTable/contexts/table.provider.js +1 -1
- package/dist/components/VirtualizedTable/utils/index.js +4 -4
- package/dist/components/index.js +180 -154
- package/dist/components-B_SWqhCL.js +147 -0
- package/dist/{utils-DVYdP0CJ.js → country-locale-map-DbrJ3bEE.js} +373 -373
- package/dist/{debounce-BdyZeJQk.js → debounce-dMRJxNsT.js} +3 -3
- package/dist/{dist-DcFwF4XM.js → dist-1AtWkIZ4.js} +268 -260
- package/dist/{dist-CgzF5_J6.js → dist-4IVGO6ZT.js} +4 -4
- package/dist/dist-BCoDIdCt.js +429 -0
- package/dist/{dist-Bi8Y5nEx.js → dist-BXv-jY2v.js} +60 -55
- package/dist/{dist-C4j75TwZ.js → dist-BbJP2Efh.js} +2 -2
- package/dist/dist-Bh7M0KDN.js +367 -0
- package/dist/dist-BqDJX7m1.js +209 -0
- package/dist/dist-C0OhTLFV.js +31 -0
- package/dist/dist-C1a-68Kb.js +120 -0
- package/dist/dist-CK8FUUUn.js +125 -0
- package/dist/dist-CQSCPpFc.js +196 -0
- package/dist/{dist-CCdbu9GU.js → dist-CYuWoi9I.js} +1 -1
- package/dist/{dist-DX0sBG3Q.js → dist-C_jtUTU9.js} +5 -6
- package/dist/{dist-D-yS0HN8.js → dist-DbeY0Pzx.js} +6 -6
- package/dist/dist-fPYIsxyx.js +465 -0
- package/dist/dist-rsFD9q_X.js +484 -0
- package/dist/{dist-BUocnzkM.js → dist-uuWgjOcO.js} +1 -1
- package/dist/dist-vDSmnSS_.js +41 -0
- package/dist/dist-vUCyiTQy.js +365 -0
- package/dist/es2015-ChhQTsb4.js +74 -0
- package/dist/index.js +194 -168
- package/dist/{isObject-pLoSfdr0.js → isSymbol-BG9higgO.js} +14 -14
- package/dist/lib/components/Alert/Alert.types.d.ts +4 -0
- package/dist/lib/components/Avatar/Avatar.d.ts +14 -0
- package/dist/lib/components/Avatar/Avatar.types.d.ts +21 -0
- package/dist/lib/components/Avatar/Avatar.variants.d.ts +3 -0
- package/dist/lib/components/Avatar/hooks/index.d.ts +1 -0
- package/dist/lib/components/Avatar/hooks/use-gravatar-url.d.ts +2 -0
- package/dist/lib/components/AvatarGroup/AvatarGroup.d.ts +16 -0
- package/dist/lib/components/AvatarGroup/AvatarGroup.types.d.ts +19 -0
- package/dist/lib/components/BadgeGroup/BadgeGroup.d.ts +15 -0
- package/dist/lib/components/BadgeGroup/BadgeGroup.types.d.ts +25 -0
- package/dist/lib/components/BadgeGroup/hooks/index.d.ts +1 -0
- package/dist/lib/components/BadgeGroup/hooks/use-visible-badge-count/use-visible-badge-count.d.ts +2 -0
- package/dist/lib/components/BadgeGroup/hooks/use-visible-badge-count/use-visible-badge-count.types.d.ts +10 -0
- package/dist/lib/components/Breadcrumb/Breadcrumb.types.d.ts +4 -0
- package/dist/lib/components/Breadcrumb/components/CollapsedSteps/CollapsedSteps.d.ts +3 -0
- package/dist/lib/components/Breadcrumb/components/CollapsedSteps/CollapsedSteps.types.d.ts +5 -0
- package/dist/lib/components/Breadcrumb/components/index.d.ts +1 -0
- package/dist/lib/components/Button/Button.variants.d.ts +1 -1
- package/dist/lib/components/CheckboxCard/CheckboxCard.d.ts +20 -0
- package/dist/lib/components/CheckboxCard/CheckboxCard.types.d.ts +13 -0
- package/dist/lib/components/Collapse/Collapse.d.ts +19 -0
- package/dist/lib/components/Collapse/Collapse.types.d.ts +17 -0
- package/dist/lib/components/ConfirmDialog/ConfirmDialog.d.ts +23 -0
- package/dist/lib/components/ConfirmDialog/ConfirmDialog.types.d.ts +46 -0
- package/dist/lib/components/Counter/Counter.d.ts +7 -4
- package/dist/lib/components/Counter/Counter.types.d.ts +23 -0
- package/dist/lib/components/Counter/Counter.variants.d.ts +10 -1
- package/dist/lib/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/components/CalendarMonthContent/CalendarMonthContent.d.ts +3 -0
- package/dist/lib/components/Datepicker/components/DatePickerContent/DatePickerContent.d.ts +3 -0
- package/dist/lib/components/DropdownButton/DropdownButton.types.d.ts +11 -0
- package/dist/lib/components/Filter/hooks/index.d.ts +1 -0
- package/dist/lib/components/Filter/hooks/useLocale.d.ts +1 -0
- package/dist/lib/components/Filter/utils/index.d.ts +1 -0
- package/dist/lib/components/LineChart/components/LineChartContent/LineChartContent.d.ts +3 -0
- package/dist/lib/components/Modal/Modal.types.d.ts +2 -0
- package/dist/lib/components/Modal/components/Wrapper/Wrapper.types.d.ts +2 -0
- package/dist/lib/components/MultiSelectDropdown/MultiSelectDropdown.types.d.ts +10 -0
- package/dist/lib/components/MultiSelectDropdown/MultiSelectDropdown.variants.d.ts +4 -1
- package/dist/lib/components/OtpInput/OtpInput.d.ts +19 -0
- package/dist/lib/components/OtpInput/OtpInput.types.d.ts +32 -0
- package/dist/lib/components/PasswordRules/PasswordRules.d.ts +20 -0
- package/dist/lib/components/PasswordRules/PasswordRules.types.d.ts +24 -0
- package/dist/lib/components/PhoneNumberInput/components/PhoneNumberInputContent.d.ts +18 -0
- package/dist/lib/components/PieChart/components/PieChartContent/PieChartContent.d.ts +3 -0
- package/dist/lib/components/RadioCard/RadioCard.d.ts +11 -0
- package/dist/lib/components/RadioCard/RadioCard.types.d.ts +10 -1
- package/dist/lib/components/RadioCard/RadioCard.variants.d.ts +3 -1
- package/dist/lib/components/Sidebar/Sidebar.types.d.ts +4 -0
- package/dist/lib/components/Sidebar/components/CollapseTrigger/CollapseTrigger.types.d.ts +2 -0
- package/dist/lib/components/Sidebar/components/NavigationOption/NavigationOption.types.d.ts +6 -0
- package/dist/lib/components/Sidebar/components/NavigationOption/NavigationOption.variants.d.ts +1 -0
- package/dist/lib/components/Skeleton/Skeleton.d.ts +14 -0
- package/dist/lib/components/Skeleton/Skeleton.types.d.ts +16 -0
- package/dist/lib/components/Skeleton/Skeleton.variants.d.ts +3 -0
- package/dist/lib/components/Stepper/Stepper.types.d.ts +2 -0
- package/dist/lib/components/Stepper/Stepper.variants.d.ts +7 -4
- package/dist/lib/components/Switch/Switch.types.d.ts +7 -0
- package/dist/lib/components/Tabs/Tabs.d.ts +13 -13
- package/dist/lib/components/Tabs/Tabs.types.d.ts +14 -3
- package/dist/lib/components/Tabs/Tabs.variants.d.ts +1 -1
- package/dist/lib/components/TagsInput/TagsInput.d.ts +20 -0
- package/dist/lib/components/TagsInput/TagsInput.types.d.ts +37 -0
- package/dist/lib/components/Tooltip/Tooltip.d.ts +4 -0
- package/dist/lib/components/Tooltip/Tooltip.types.d.ts +10 -0
- package/dist/lib/components/VirtualizedTable/VirtualizedTable.d.ts +8 -2
- package/dist/lib/components/VirtualizedTable/components/Actions/Actions.types.d.ts +6 -0
- package/dist/lib/components/VirtualizedTable/components/Actions/Actions.variants.d.ts +3 -1
- package/dist/lib/components/VirtualizedTable/components/Actions/components/ActionsList/ActionsList.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/components/Actions/components/ActionsList/ActionsList.types.d.ts +2 -0
- package/dist/lib/components/VirtualizedTable/components/Actions/components/InlineActions/InlineActions.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/components/Actions/components/PortalActions/PortalActions.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/components/Actions/components/PortalActions/hooks/use-actions-menu/use-actions-menu.d.ts +4 -1
- package/dist/lib/components/VirtualizedTable/components/Actions/components/PortalActions/hooks/use-actions-menu/use-actions-menu.types.d.ts +3 -0
- package/dist/lib/components/VirtualizedTable/components/Actions/components/PortalActions/hooks/use-menu-interactions/use-menu-interactions.d.ts +3 -1
- package/dist/lib/components/VirtualizedTable/components/Actions/components/PortalActions/hooks/use-menu-interactions/use-menu-interactions.types.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/components/EmptyResults/EmptyResults.d.ts +3 -0
- package/dist/lib/components/VirtualizedTable/components/EmptyResults/EmptyResults.types.d.ts +9 -0
- package/dist/lib/components/VirtualizedTable/components/EmptyState/EmptyState.d.ts +3 -0
- package/dist/lib/components/VirtualizedTable/components/EmptyState/EmptyState.types.d.ts +8 -0
- package/dist/lib/components/VirtualizedTable/components/ErrorState/ErrorState.d.ts +3 -0
- package/dist/lib/components/VirtualizedTable/components/ErrorState/ErrorState.types.d.ts +9 -0
- package/dist/lib/components/VirtualizedTable/components/TruncateText/TruncateText.d.ts +2 -1
- package/dist/lib/components/VirtualizedTable/components/TruncateText/TruncateText.types.d.ts +8 -3
- package/dist/lib/components/VirtualizedTable/components/VirtualizedTableContent/VirtualizedTableContent.d.ts +3 -0
- package/dist/lib/components/VirtualizedTable/components/index.d.ts +3 -0
- package/dist/lib/components/VirtualizedTable/contexts/table.context.d.ts +1 -0
- package/dist/lib/components/index.d.ts +10 -0
- package/dist/package.json +31 -30
- package/dist/{phone-number.provider-BASl9fGG.js → phone-number.provider-DnuL-yYF.js} +4 -4
- package/dist/styles.css +1 -1
- package/dist/{table.provider-MQ4T5Xb5.js → table.provider-CW1fpZcF.js} +80 -79
- package/package.json +31 -30
- package/dist/AnimatePresence-BsUYG9bm.js +0 -186
- package/dist/Checkbox-CrNxsm3G.js +0 -247
- package/dist/Counter-DN50BVq6.js +0 -194
- package/dist/DropdownButton-Blhkj-Oi.js +0 -490
- package/dist/FlagSelectorList-ClKGwDpS.js +0 -918
- package/dist/Modal-Bk1I_NCC.js +0 -81
- package/dist/Spinner-smR3esbL.js +0 -47
- package/dist/Switch-CPE8v6Zh.js +0 -199
- package/dist/Toast-CRPLONv9.js +0 -77
- package/dist/components-z-LYRWfq.js +0 -124
- package/dist/dist-CNui_Egg.js +0 -451
- package/dist/dist-CR3FMRzF.js +0 -118
- package/dist/dist-D5Q2IYuC.js +0 -358
- package/dist/dist-D70ZJkHf.js +0 -29
- package/dist/dist-DZ_SU77k.js +0 -437
- package/dist/dist-LRkZdylX.js +0 -174
- package/dist/dist-f8EwfITY.js +0 -194
- package/dist/dist-pWlMx4Fi.js +0 -36
- package/dist/dist-uerXivvM.js +0 -178
- package/dist/dist-xCbHbMLA.js +0 -116
- package/dist/es2015-Hhb87ipX.js +0 -231
- package/dist/react-C685EsYG.js +0 -4730
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
import { d as j, f as U, l as V, n as W, r as _, s as S, u as T } from "./react-C685EsYG.js";
|
|
2
|
-
import * as I from "react";
|
|
3
|
-
import { Children as B, isValidElement as G, useContext as K, useId as N, useInsertionEffect as Y, useMemo as k, useRef as E, useState as A } from "react";
|
|
4
|
-
import { Fragment as q, jsx as M } from "react/jsx-runtime";
|
|
5
|
-
function D(e, o) {
|
|
6
|
-
if (typeof e == "function") return e(o);
|
|
7
|
-
e != null && (e.current = o);
|
|
8
|
-
}
|
|
9
|
-
function J(...e) {
|
|
10
|
-
return (o) => {
|
|
11
|
-
let t = !1;
|
|
12
|
-
const s = e.map((f) => {
|
|
13
|
-
const r = D(f, o);
|
|
14
|
-
return !t && typeof r == "function" && (t = !0), r;
|
|
15
|
-
});
|
|
16
|
-
if (t) return () => {
|
|
17
|
-
for (let f = 0; f < s.length; f++) {
|
|
18
|
-
const r = s[f];
|
|
19
|
-
typeof r == "function" ? r() : D(e[f], null);
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
function Q(...e) {
|
|
25
|
-
return I.useCallback(J(...e), e);
|
|
26
|
-
}
|
|
27
|
-
var X = class extends I.Component {
|
|
28
|
-
getSnapshotBeforeUpdate(e) {
|
|
29
|
-
const o = this.props.childRef.current;
|
|
30
|
-
if (S(o) && e.isPresent && !this.props.isPresent && this.props.pop !== !1) {
|
|
31
|
-
const t = o.offsetParent, s = S(t) && t.offsetWidth || 0, f = S(t) && t.offsetHeight || 0, r = getComputedStyle(o), n = this.props.sizeRef.current;
|
|
32
|
-
n.height = parseFloat(r.height), n.width = parseFloat(r.width), n.top = o.offsetTop, n.left = o.offsetLeft, n.right = s - n.width - n.left, n.bottom = f - n.height - n.top, n.direction = r.direction;
|
|
33
|
-
}
|
|
34
|
-
return null;
|
|
35
|
-
}
|
|
36
|
-
componentDidUpdate() {
|
|
37
|
-
}
|
|
38
|
-
render() {
|
|
39
|
-
return this.props.children;
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
function Z({ children: e, isPresent: o, anchorX: t, anchorY: s, root: f, pop: r }) {
|
|
43
|
-
const n = N(), m = E(null), v = E({
|
|
44
|
-
width: 0,
|
|
45
|
-
height: 0,
|
|
46
|
-
top: 0,
|
|
47
|
-
left: 0,
|
|
48
|
-
right: 0,
|
|
49
|
-
bottom: 0,
|
|
50
|
-
direction: "ltr"
|
|
51
|
-
}), { nonce: w } = K(_), i = r !== !1 ? e.props?.ref ?? e?.ref : void 0, y = Q(m, i);
|
|
52
|
-
return Y(() => {
|
|
53
|
-
const { width: u, height: h, top: R, left: a, right: d, bottom: x, direction: P } = v.current;
|
|
54
|
-
if (o || r === !1 || !m.current || !u || !h) return;
|
|
55
|
-
const p = P === "rtl", L = t === "left" ? p ? `right: ${d}` : `left: ${a}` : p ? `left: ${a}` : `right: ${d}`, $ = s === "bottom" ? `bottom: ${x}` : `top: ${R}`;
|
|
56
|
-
m.current.dataset.motionPopId = n;
|
|
57
|
-
const C = document.createElement("style");
|
|
58
|
-
w && (C.nonce = w);
|
|
59
|
-
const l = f ?? document.head;
|
|
60
|
-
return l.appendChild(C), C.sheet && C.sheet.insertRule(`
|
|
61
|
-
[data-motion-pop-id="${n}"] {
|
|
62
|
-
position: absolute !important;
|
|
63
|
-
width: ${u}px !important;
|
|
64
|
-
height: ${h}px !important;
|
|
65
|
-
${L}px !important;
|
|
66
|
-
${$}px !important;
|
|
67
|
-
}
|
|
68
|
-
`), () => {
|
|
69
|
-
m.current?.removeAttribute("data-motion-pop-id"), l.contains(C) && l.removeChild(C);
|
|
70
|
-
};
|
|
71
|
-
}, [o]), M(X, {
|
|
72
|
-
isPresent: o,
|
|
73
|
-
childRef: m,
|
|
74
|
-
sizeRef: v,
|
|
75
|
-
pop: r,
|
|
76
|
-
children: r === !1 ? e : I.cloneElement(e, { ref: y })
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
var ee = ({ children: e, initial: o, isPresent: t, onExitComplete: s, custom: f, presenceAffectsLayout: r, mode: n, anchorX: m, anchorY: v, root: w }) => {
|
|
80
|
-
const i = j(te), y = N(), u = E(t), h = E(s);
|
|
81
|
-
T(() => {
|
|
82
|
-
u.current = t, h.current = s;
|
|
83
|
-
});
|
|
84
|
-
let R = !0, a = k(() => (R = !1, {
|
|
85
|
-
id: y,
|
|
86
|
-
initial: o,
|
|
87
|
-
isPresent: t,
|
|
88
|
-
custom: f,
|
|
89
|
-
onExitComplete: (d) => {
|
|
90
|
-
i.set(d, !0);
|
|
91
|
-
for (const x of i.values()) if (!x) return;
|
|
92
|
-
s && s();
|
|
93
|
-
},
|
|
94
|
-
register: (d) => (i.set(d, !1), () => {
|
|
95
|
-
i.delete(d), !u.current && !i.size && h.current?.();
|
|
96
|
-
})
|
|
97
|
-
}), [
|
|
98
|
-
t,
|
|
99
|
-
i,
|
|
100
|
-
s
|
|
101
|
-
]);
|
|
102
|
-
return r && R && (a = { ...a }), k(() => {
|
|
103
|
-
i.forEach((d, x) => i.set(x, !1));
|
|
104
|
-
}, [t]), I.useEffect(() => {
|
|
105
|
-
!t && !i.size && s && s();
|
|
106
|
-
}, [t]), e = M(Z, {
|
|
107
|
-
pop: n === "popLayout",
|
|
108
|
-
isPresent: t,
|
|
109
|
-
anchorX: m,
|
|
110
|
-
anchorY: v,
|
|
111
|
-
root: w,
|
|
112
|
-
children: e
|
|
113
|
-
}), M(V.Provider, {
|
|
114
|
-
value: a,
|
|
115
|
-
children: e
|
|
116
|
-
});
|
|
117
|
-
};
|
|
118
|
-
function te() {
|
|
119
|
-
return /* @__PURE__ */ new Map();
|
|
120
|
-
}
|
|
121
|
-
var b = (e) => e.key || "";
|
|
122
|
-
function H(e) {
|
|
123
|
-
const o = [];
|
|
124
|
-
return B.forEach(e, (t) => {
|
|
125
|
-
G(t) && o.push(t);
|
|
126
|
-
}), o;
|
|
127
|
-
}
|
|
128
|
-
var se = ({ children: e, custom: o, initial: t = !0, onExitComplete: s, presenceAffectsLayout: f = !0, mode: r = "sync", propagate: n = !1, anchorX: m = "left", anchorY: v = "top", root: w }) => {
|
|
129
|
-
const [i, y] = W(n), u = k(() => H(e), [e]), h = n && !i ? [] : u.map(b), R = E(!0), a = j(() => /* @__PURE__ */ new Map()), d = E(/* @__PURE__ */ new Set()), [x, P] = A(u), [p, L] = A(u);
|
|
130
|
-
T(() => {
|
|
131
|
-
n && !i && !p.length && y?.();
|
|
132
|
-
}, [
|
|
133
|
-
i,
|
|
134
|
-
n,
|
|
135
|
-
p.length,
|
|
136
|
-
y
|
|
137
|
-
]), T(() => {
|
|
138
|
-
R.current = !1;
|
|
139
|
-
for (let l = 0; l < p.length; l++) {
|
|
140
|
-
const c = b(p[l]);
|
|
141
|
-
h.includes(c) ? (a.delete(c), d.current.delete(c)) : a.get(c) !== !0 && a.set(c, !1);
|
|
142
|
-
}
|
|
143
|
-
}, [
|
|
144
|
-
p,
|
|
145
|
-
h.length,
|
|
146
|
-
h.join("-")
|
|
147
|
-
]);
|
|
148
|
-
const $ = [];
|
|
149
|
-
if (u !== x) {
|
|
150
|
-
let l = [...u], c = 0;
|
|
151
|
-
for (const g of p) {
|
|
152
|
-
const z = h.indexOf(b(g));
|
|
153
|
-
z === -1 ? (l.splice(c++, 0, g), $.push(g)) : c = z + $.length + 1;
|
|
154
|
-
}
|
|
155
|
-
return $.every((g) => a.get(b(g))) ? l = u : r === "wait" && (l = $), L(H(l)), P(u), null;
|
|
156
|
-
}
|
|
157
|
-
process.env.NODE_ENV !== "production" && r === "wait" && p.length > 1 && console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);
|
|
158
|
-
const { forceRender: C } = K(U);
|
|
159
|
-
return M(q, { children: p.map((l) => {
|
|
160
|
-
const c = b(l), g = n && !i ? !1 : u === p || h.includes(c), z = () => {
|
|
161
|
-
if (d.current.has(c)) return;
|
|
162
|
-
if (a.has(c))
|
|
163
|
-
d.current.add(c), a.set(c, !0);
|
|
164
|
-
else return;
|
|
165
|
-
let F = !0;
|
|
166
|
-
a.forEach((O) => {
|
|
167
|
-
O || (F = !1);
|
|
168
|
-
}), F && (C?.(), P([]), n && y?.(), s && s());
|
|
169
|
-
};
|
|
170
|
-
return M(ee, {
|
|
171
|
-
isPresent: g,
|
|
172
|
-
initial: !R.current || t ? void 0 : !1,
|
|
173
|
-
custom: o,
|
|
174
|
-
presenceAffectsLayout: f,
|
|
175
|
-
mode: r,
|
|
176
|
-
root: w,
|
|
177
|
-
onExitComplete: g ? void 0 : z,
|
|
178
|
-
anchorX: m,
|
|
179
|
-
anchorY: v,
|
|
180
|
-
children: l
|
|
181
|
-
}, c);
|
|
182
|
-
}) });
|
|
183
|
-
};
|
|
184
|
-
export {
|
|
185
|
-
se as t
|
|
186
|
-
};
|
|
@@ -1,247 +0,0 @@
|
|
|
1
|
-
import { o as X } from "./rolldown-runtime-Dw9YIBcH.js";
|
|
2
|
-
import { t as J } from "./prop-types-BCUW56rg.js";
|
|
3
|
-
import { a as U } from "./dist-xCbHbMLA.js";
|
|
4
|
-
import { t as N } from "./dist-CCdbu9GU.js";
|
|
5
|
-
import { t as O } from "./utils-DnIJruo0.js";
|
|
6
|
-
import { i as Q, r as S, t as Y } from "./dist-D-yS0HN8.js";
|
|
7
|
-
import { t as Z } from "./dist-BUocnzkM.js";
|
|
8
|
-
import { useToggle as ee } from "./hooks/useToggle.js";
|
|
9
|
-
import { t as te } from "./dist-pWlMx4Fi.js";
|
|
10
|
-
import { checkboxVariants as re, labelVariants as oe } from "./components/Checkbox/Checkbox.variants.js";
|
|
11
|
-
import * as u from "react";
|
|
12
|
-
import q, { forwardRef as A, useId as ne } from "react";
|
|
13
|
-
import { Fragment as ce, jsx as p, jsxs as $ } from "react/jsx-runtime";
|
|
14
|
-
var w = /* @__PURE__ */ X(J());
|
|
15
|
-
function j() {
|
|
16
|
-
return j = Object.assign || function(e) {
|
|
17
|
-
for (var o = 1; o < arguments.length; o++) {
|
|
18
|
-
var n = arguments[o];
|
|
19
|
-
for (var t in n) Object.prototype.hasOwnProperty.call(n, t) && (e[t] = n[t]);
|
|
20
|
-
}
|
|
21
|
-
return e;
|
|
22
|
-
}, j.apply(this, arguments);
|
|
23
|
-
}
|
|
24
|
-
function ae(e, o) {
|
|
25
|
-
if (e == null) return {};
|
|
26
|
-
var n = se(e, o), t, r;
|
|
27
|
-
if (Object.getOwnPropertySymbols) {
|
|
28
|
-
var c = Object.getOwnPropertySymbols(e);
|
|
29
|
-
for (r = 0; r < c.length; r++)
|
|
30
|
-
t = c[r], !(o.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(e, t) && (n[t] = e[t]);
|
|
31
|
-
}
|
|
32
|
-
return n;
|
|
33
|
-
}
|
|
34
|
-
function se(e, o) {
|
|
35
|
-
if (e == null) return {};
|
|
36
|
-
for (var n = {}, t = Object.keys(e), r, c = 0; c < t.length; c++)
|
|
37
|
-
r = t[c], !(o.indexOf(r) >= 0) && (n[r] = e[r]);
|
|
38
|
-
return n;
|
|
39
|
-
}
|
|
40
|
-
var B = A(function(e, o) {
|
|
41
|
-
var n = e.color, t = n === void 0 ? "currentColor" : n, r = e.size, c = r === void 0 ? 24 : r, a = ae(e, ["color", "size"]);
|
|
42
|
-
return /* @__PURE__ */ q.createElement("svg", j({
|
|
43
|
-
ref: o,
|
|
44
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
45
|
-
width: c,
|
|
46
|
-
height: c,
|
|
47
|
-
viewBox: "0 0 24 24",
|
|
48
|
-
fill: "none",
|
|
49
|
-
stroke: t,
|
|
50
|
-
strokeWidth: "2",
|
|
51
|
-
strokeLinecap: "round",
|
|
52
|
-
strokeLinejoin: "round"
|
|
53
|
-
}, a), /* @__PURE__ */ q.createElement("polyline", { points: "20 6 9 17 4 12" }));
|
|
54
|
-
});
|
|
55
|
-
B.propTypes = {
|
|
56
|
-
color: w.default.string,
|
|
57
|
-
size: w.default.oneOfType([w.default.string, w.default.number])
|
|
58
|
-
};
|
|
59
|
-
B.displayName = "Check";
|
|
60
|
-
var ie = Object.defineProperty, x = (e, o) => ie(e, "name", {
|
|
61
|
-
value: o,
|
|
62
|
-
configurable: !0
|
|
63
|
-
}), T = "Checkbox", [ue, je] = Q(T), [le, z] = ue(T);
|
|
64
|
-
function D(e) {
|
|
65
|
-
const { __scopeCheckbox: o, checked: n, children: t, defaultChecked: r, disabled: c, form: a, name: l, onCheckedChange: s, required: d, value: C = "on", internal_do_not_use_render: m } = e, [h, k] = Y({
|
|
66
|
-
prop: n,
|
|
67
|
-
defaultProp: r ?? !1,
|
|
68
|
-
onChange: s,
|
|
69
|
-
caller: T
|
|
70
|
-
}), [v, I] = u.useState(null), [y, R] = u.useState(null), _ = u.useRef(!1), [i, f] = u.useReducer((b) => b + 1, 0), P = v ? !!a || !!v.closest("form") : !0, E = {
|
|
71
|
-
checked: h,
|
|
72
|
-
disabled: c,
|
|
73
|
-
setChecked: k,
|
|
74
|
-
control: v,
|
|
75
|
-
setControl: I,
|
|
76
|
-
name: l,
|
|
77
|
-
form: a,
|
|
78
|
-
value: C,
|
|
79
|
-
hasConsumerStoppedPropagationRef: _,
|
|
80
|
-
userInteractionCount: i,
|
|
81
|
-
onUserInteraction: f,
|
|
82
|
-
required: d,
|
|
83
|
-
defaultChecked: g(r) ? !1 : r,
|
|
84
|
-
isFormControl: P,
|
|
85
|
-
bubbleInput: y,
|
|
86
|
-
setBubbleInput: R
|
|
87
|
-
};
|
|
88
|
-
return /* @__PURE__ */ p(le, {
|
|
89
|
-
scope: o,
|
|
90
|
-
...E,
|
|
91
|
-
children: H(m) ? m(E) : t
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
x(D, "CheckboxProvider");
|
|
95
|
-
var de = "CheckboxTrigger", fe = /* @__PURE__ */ u.forwardRef(/* @__PURE__ */ x(function({ __scopeCheckbox: o, onKeyDown: n, onClick: t, ...r }, c) {
|
|
96
|
-
const { control: a, value: l, disabled: s, checked: d, required: C, setControl: m, setChecked: h, hasConsumerStoppedPropagationRef: k, onUserInteraction: v, isFormControl: I, bubbleInput: y } = z(de, o), R = U(c, m), _ = u.useRef(d);
|
|
97
|
-
return u.useEffect(() => {
|
|
98
|
-
const i = a?.form;
|
|
99
|
-
if (i) {
|
|
100
|
-
const f = /* @__PURE__ */ x(() => h(_.current), "reset");
|
|
101
|
-
return i.addEventListener("reset", f), () => i.removeEventListener("reset", f);
|
|
102
|
-
}
|
|
103
|
-
}, [a, h]), /* @__PURE__ */ p(N.button, {
|
|
104
|
-
type: "button",
|
|
105
|
-
role: "checkbox",
|
|
106
|
-
"aria-checked": g(d) ? "mixed" : d,
|
|
107
|
-
"aria-required": C,
|
|
108
|
-
"data-state": F(d),
|
|
109
|
-
"data-disabled": s ? "" : void 0,
|
|
110
|
-
disabled: s,
|
|
111
|
-
value: l,
|
|
112
|
-
...r,
|
|
113
|
-
ref: R,
|
|
114
|
-
onKeyDown: S(n, (i) => {
|
|
115
|
-
i.key === "Enter" && i.preventDefault();
|
|
116
|
-
}),
|
|
117
|
-
onClick: S(t, (i) => {
|
|
118
|
-
v(), h((f) => g(f) ? !0 : !f), y && I && (k.current = i.isPropagationStopped(), k.current || i.stopPropagation());
|
|
119
|
-
})
|
|
120
|
-
});
|
|
121
|
-
}, "CheckboxTrigger")), pe = /* @__PURE__ */ u.forwardRef(/* @__PURE__ */ x(function(o, n) {
|
|
122
|
-
const { __scopeCheckbox: t, name: r, checked: c, defaultChecked: a, required: l, disabled: s, value: d, onCheckedChange: C, form: m, ...h } = o;
|
|
123
|
-
return /* @__PURE__ */ p(D, {
|
|
124
|
-
__scopeCheckbox: t,
|
|
125
|
-
checked: c,
|
|
126
|
-
defaultChecked: a,
|
|
127
|
-
disabled: s,
|
|
128
|
-
required: l,
|
|
129
|
-
onCheckedChange: C,
|
|
130
|
-
name: r,
|
|
131
|
-
form: m,
|
|
132
|
-
value: d,
|
|
133
|
-
internal_do_not_use_render: ({ isFormControl: k }) => /* @__PURE__ */ $(ce, { children: [/* @__PURE__ */ p(fe, {
|
|
134
|
-
...h,
|
|
135
|
-
ref: n,
|
|
136
|
-
__scopeCheckbox: t
|
|
137
|
-
}), k && /* @__PURE__ */ p(ke, { __scopeCheckbox: t })] })
|
|
138
|
-
});
|
|
139
|
-
}, "Checkbox")), he = "CheckboxIndicator", be = /* @__PURE__ */ u.forwardRef(/* @__PURE__ */ x(function(o, n) {
|
|
140
|
-
const { __scopeCheckbox: t, forceMount: r, ...c } = o, a = z(he, t);
|
|
141
|
-
return /* @__PURE__ */ p(Z, {
|
|
142
|
-
present: r || g(a.checked) || a.checked === !0,
|
|
143
|
-
children: /* @__PURE__ */ p(N.span, {
|
|
144
|
-
"data-state": F(a.checked),
|
|
145
|
-
"data-disabled": a.disabled ? "" : void 0,
|
|
146
|
-
...c,
|
|
147
|
-
ref: n,
|
|
148
|
-
style: {
|
|
149
|
-
pointerEvents: "none",
|
|
150
|
-
...o.style
|
|
151
|
-
}
|
|
152
|
-
})
|
|
153
|
-
});
|
|
154
|
-
}, "CheckboxIndicator")), me = "CheckboxBubbleInput", ke = /* @__PURE__ */ u.forwardRef(/* @__PURE__ */ x(function({ __scopeCheckbox: o, onClick: n, ...t }, r) {
|
|
155
|
-
const { control: c, hasConsumerStoppedPropagationRef: a, userInteractionCount: l, checked: s, defaultChecked: d, required: C, disabled: m, name: h, value: k, form: v, bubbleInput: I, setBubbleInput: y } = z(me, o), R = U(r, y), _ = te(c), i = u.useRef(!1), f = u.useRef(s), P = u.useRef(l);
|
|
156
|
-
u.useEffect(() => {
|
|
157
|
-
const b = I;
|
|
158
|
-
if (!b) return;
|
|
159
|
-
const K = window.HTMLInputElement.prototype, L = Object.getOwnPropertyDescriptor(K, "checked").set, M = l !== P.current;
|
|
160
|
-
P.current = l;
|
|
161
|
-
const W = f.current !== s;
|
|
162
|
-
f.current = s;
|
|
163
|
-
const G = !(M && a.current);
|
|
164
|
-
if (W && L) {
|
|
165
|
-
i.current = !M;
|
|
166
|
-
const V = new Event("click", { bubbles: G });
|
|
167
|
-
b.indeterminate = g(s), L.call(b, g(s) ? !1 : s), b.dispatchEvent(V), i.current = !1;
|
|
168
|
-
}
|
|
169
|
-
}, [
|
|
170
|
-
I,
|
|
171
|
-
s,
|
|
172
|
-
a,
|
|
173
|
-
l
|
|
174
|
-
]);
|
|
175
|
-
const E = u.useRef(g(s) ? !1 : s);
|
|
176
|
-
return /* @__PURE__ */ p(N.input, {
|
|
177
|
-
type: "checkbox",
|
|
178
|
-
"aria-hidden": !0,
|
|
179
|
-
defaultChecked: d ?? E.current,
|
|
180
|
-
required: C,
|
|
181
|
-
disabled: m,
|
|
182
|
-
name: h,
|
|
183
|
-
value: k,
|
|
184
|
-
form: v,
|
|
185
|
-
...t,
|
|
186
|
-
tabIndex: -1,
|
|
187
|
-
ref: R,
|
|
188
|
-
onClick: S(n, (b) => {
|
|
189
|
-
i.current && b.stopPropagation();
|
|
190
|
-
}),
|
|
191
|
-
style: {
|
|
192
|
-
...t.style,
|
|
193
|
-
..._,
|
|
194
|
-
position: "absolute",
|
|
195
|
-
pointerEvents: "none",
|
|
196
|
-
opacity: 0,
|
|
197
|
-
margin: 0,
|
|
198
|
-
transform: "translateX(-100%)"
|
|
199
|
-
}
|
|
200
|
-
});
|
|
201
|
-
}, "CheckboxBubbleInput"));
|
|
202
|
-
function H(e) {
|
|
203
|
-
return typeof e == "function";
|
|
204
|
-
}
|
|
205
|
-
x(H, "isFunction");
|
|
206
|
-
function g(e) {
|
|
207
|
-
return e === "indeterminate";
|
|
208
|
-
}
|
|
209
|
-
x(g, "isIndeterminate");
|
|
210
|
-
function F(e) {
|
|
211
|
-
return g(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
212
|
-
}
|
|
213
|
-
x(F, "getState");
|
|
214
|
-
var Ce = A(({ ariaLabelledBy: e, checked: o, className: n, defaultChecked: t, disabled: r, id: c, label: a, labelClassName: l, labelWrapperClassName: s, name: d, theme: C, title: m, variant: h, onChange: k, ...v }, I) => {
|
|
215
|
-
const [y, R] = ee(t ?? !1), _ = o !== void 0, i = _ ? o : y, f = ne(), P = c ?? f, E = (b) => {
|
|
216
|
-
_ || R(b), k?.(b);
|
|
217
|
-
};
|
|
218
|
-
return /* @__PURE__ */ $("div", {
|
|
219
|
-
className: O("flex items-center gap-4", s),
|
|
220
|
-
"data-theme": C,
|
|
221
|
-
children: [/* @__PURE__ */ p(pe, {
|
|
222
|
-
id: P,
|
|
223
|
-
checked: i,
|
|
224
|
-
ref: I,
|
|
225
|
-
name: d,
|
|
226
|
-
disabled: r,
|
|
227
|
-
"aria-labelledby": e,
|
|
228
|
-
title: m,
|
|
229
|
-
className: O(re({
|
|
230
|
-
className: n,
|
|
231
|
-
variant: h,
|
|
232
|
-
checked: i
|
|
233
|
-
})),
|
|
234
|
-
onCheckedChange: E,
|
|
235
|
-
...v,
|
|
236
|
-
children: /* @__PURE__ */ p(be, { children: /* @__PURE__ */ p(B, { className: "w-4 h-4 stroke-2" }) })
|
|
237
|
-
}), a ? /* @__PURE__ */ p("label", {
|
|
238
|
-
htmlFor: P,
|
|
239
|
-
className: O(oe({ className: l }), { "cursor-not-allowed": r }),
|
|
240
|
-
children: a
|
|
241
|
-
}) : null]
|
|
242
|
-
});
|
|
243
|
-
});
|
|
244
|
-
Ce.displayName = "KonstructCheckbox";
|
|
245
|
-
export {
|
|
246
|
-
Ce as t
|
|
247
|
-
};
|
package/dist/Counter-DN50BVq6.js
DELETED
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { o as D } from "./rolldown-runtime-Dw9YIBcH.js";
|
|
3
|
-
import { t as R } from "./prop-types-BCUW56rg.js";
|
|
4
|
-
import { t as P } from "./dist-DX0sBG3Q.js";
|
|
5
|
-
import { t as f } from "./utils-DnIJruo0.js";
|
|
6
|
-
import { Typography as F } from "./components/Typography/Typography.js";
|
|
7
|
-
import { buttonVariants as _, counterVariants as q, labelVariants as A } from "./components/Counter/Counter.variants.js";
|
|
8
|
-
import m, { forwardRef as x, useId as G, useState as H } from "react";
|
|
9
|
-
import { jsx as u, jsxs as p } from "react/jsx-runtime";
|
|
10
|
-
var s = /* @__PURE__ */ D(R());
|
|
11
|
-
function O() {
|
|
12
|
-
return O = Object.assign || function(t) {
|
|
13
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
14
|
-
var n = arguments[i];
|
|
15
|
-
for (var e in n) Object.prototype.hasOwnProperty.call(n, e) && (t[e] = n[e]);
|
|
16
|
-
}
|
|
17
|
-
return t;
|
|
18
|
-
}, O.apply(this, arguments);
|
|
19
|
-
}
|
|
20
|
-
function J(t, i) {
|
|
21
|
-
if (t == null) return {};
|
|
22
|
-
var n = K(t, i), e, r;
|
|
23
|
-
if (Object.getOwnPropertySymbols) {
|
|
24
|
-
var o = Object.getOwnPropertySymbols(t);
|
|
25
|
-
for (r = 0; r < o.length; r++)
|
|
26
|
-
e = o[r], !(i.indexOf(e) >= 0) && Object.prototype.propertyIsEnumerable.call(t, e) && (n[e] = t[e]);
|
|
27
|
-
}
|
|
28
|
-
return n;
|
|
29
|
-
}
|
|
30
|
-
function K(t, i) {
|
|
31
|
-
if (t == null) return {};
|
|
32
|
-
for (var n = {}, e = Object.keys(t), r, o = 0; o < e.length; o++)
|
|
33
|
-
r = e[o], !(i.indexOf(r) >= 0) && (n[r] = t[r]);
|
|
34
|
-
return n;
|
|
35
|
-
}
|
|
36
|
-
var j = x(function(t, i) {
|
|
37
|
-
var n = t.color, e = n === void 0 ? "currentColor" : n, r = t.size, o = r === void 0 ? 24 : r, c = J(t, ["color", "size"]);
|
|
38
|
-
return /* @__PURE__ */ m.createElement("svg", O({
|
|
39
|
-
ref: i,
|
|
40
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
41
|
-
width: o,
|
|
42
|
-
height: o,
|
|
43
|
-
viewBox: "0 0 24 24",
|
|
44
|
-
fill: "none",
|
|
45
|
-
stroke: e,
|
|
46
|
-
strokeWidth: "2",
|
|
47
|
-
strokeLinecap: "round",
|
|
48
|
-
strokeLinejoin: "round"
|
|
49
|
-
}, c), /* @__PURE__ */ m.createElement("line", {
|
|
50
|
-
x1: "5",
|
|
51
|
-
y1: "12",
|
|
52
|
-
x2: "19",
|
|
53
|
-
y2: "12"
|
|
54
|
-
}));
|
|
55
|
-
});
|
|
56
|
-
j.propTypes = {
|
|
57
|
-
color: s.default.string,
|
|
58
|
-
size: s.default.oneOfType([s.default.string, s.default.number])
|
|
59
|
-
};
|
|
60
|
-
j.displayName = "Minus";
|
|
61
|
-
function w() {
|
|
62
|
-
return w = Object.assign || function(t) {
|
|
63
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
64
|
-
var n = arguments[i];
|
|
65
|
-
for (var e in n) Object.prototype.hasOwnProperty.call(n, e) && (t[e] = n[e]);
|
|
66
|
-
}
|
|
67
|
-
return t;
|
|
68
|
-
}, w.apply(this, arguments);
|
|
69
|
-
}
|
|
70
|
-
function Q(t, i) {
|
|
71
|
-
if (t == null) return {};
|
|
72
|
-
var n = U(t, i), e, r;
|
|
73
|
-
if (Object.getOwnPropertySymbols) {
|
|
74
|
-
var o = Object.getOwnPropertySymbols(t);
|
|
75
|
-
for (r = 0; r < o.length; r++)
|
|
76
|
-
e = o[r], !(i.indexOf(e) >= 0) && Object.prototype.propertyIsEnumerable.call(t, e) && (n[e] = t[e]);
|
|
77
|
-
}
|
|
78
|
-
return n;
|
|
79
|
-
}
|
|
80
|
-
function U(t, i) {
|
|
81
|
-
if (t == null) return {};
|
|
82
|
-
for (var n = {}, e = Object.keys(t), r, o = 0; o < e.length; o++)
|
|
83
|
-
r = e[o], !(i.indexOf(r) >= 0) && (n[r] = t[r]);
|
|
84
|
-
return n;
|
|
85
|
-
}
|
|
86
|
-
var N = x(function(t, i) {
|
|
87
|
-
var n = t.color, e = n === void 0 ? "currentColor" : n, r = t.size, o = r === void 0 ? 24 : r, c = Q(t, ["color", "size"]);
|
|
88
|
-
return /* @__PURE__ */ m.createElement("svg", w({
|
|
89
|
-
ref: i,
|
|
90
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
91
|
-
width: o,
|
|
92
|
-
height: o,
|
|
93
|
-
viewBox: "0 0 24 24",
|
|
94
|
-
fill: "none",
|
|
95
|
-
stroke: e,
|
|
96
|
-
strokeWidth: "2",
|
|
97
|
-
strokeLinecap: "round",
|
|
98
|
-
strokeLinejoin: "round"
|
|
99
|
-
}, c), /* @__PURE__ */ m.createElement("line", {
|
|
100
|
-
x1: "12",
|
|
101
|
-
y1: "5",
|
|
102
|
-
x2: "12",
|
|
103
|
-
y2: "19"
|
|
104
|
-
}), /* @__PURE__ */ m.createElement("line", {
|
|
105
|
-
x1: "5",
|
|
106
|
-
y1: "12",
|
|
107
|
-
x2: "19",
|
|
108
|
-
y2: "12"
|
|
109
|
-
}));
|
|
110
|
-
});
|
|
111
|
-
N.propTypes = {
|
|
112
|
-
color: s.default.string,
|
|
113
|
-
size: s.default.oneOfType([s.default.string, s.default.number])
|
|
114
|
-
};
|
|
115
|
-
N.displayName = "Plus";
|
|
116
|
-
var ot = x(({ canDecrement: t = !0, canIncrement: i = !0, className: n, decrementButtonClassName: e, editable: r = !1, incrementButtonClassName: o, isRequired: c, label: d, labelWrapperClassName: z, max: y = -1 / 0, min: h = 1 / 0, name: k, theme: E, value: L, onChange: v }, M) => {
|
|
117
|
-
const $ = G(), l = L ?? 0, [W, g] = H(null), S = W ?? String(l), T = () => {
|
|
118
|
-
let a = 0;
|
|
119
|
-
h === 1 / 0 ? a = l - 1 : a = Math.max(h, l - 1), g(null), v?.({ target: { value: a } });
|
|
120
|
-
}, V = () => {
|
|
121
|
-
let a = 0;
|
|
122
|
-
y === -1 / 0 ? a = l + 1 : a = Math.min(y, l + 1), g(null), v?.({ target: { value: a } });
|
|
123
|
-
}, B = (a) => {
|
|
124
|
-
const b = a.target.value;
|
|
125
|
-
if (g(b), b === "") return;
|
|
126
|
-
const I = Number(b);
|
|
127
|
-
Number.isFinite(I) && v?.({ target: { value: I } });
|
|
128
|
-
}, C = () => {
|
|
129
|
-
g(null);
|
|
130
|
-
const a = Math.min(y === -1 / 0 ? 1 / 0 : y, Math.max(h === 1 / 0 ? -1 / 0 : h, l));
|
|
131
|
-
a !== l && v?.({ target: { value: a } });
|
|
132
|
-
};
|
|
133
|
-
return /* @__PURE__ */ p("div", {
|
|
134
|
-
className: "flex flex-col gap-2",
|
|
135
|
-
"data-theme": E,
|
|
136
|
-
children: [d ? /* @__PURE__ */ u("div", {
|
|
137
|
-
className: f(z),
|
|
138
|
-
children: /* @__PURE__ */ p(F, {
|
|
139
|
-
component: "label",
|
|
140
|
-
htmlFor: k ?? $,
|
|
141
|
-
variant: "labelLarge",
|
|
142
|
-
className: f(A()),
|
|
143
|
-
children: [
|
|
144
|
-
d,
|
|
145
|
-
" ",
|
|
146
|
-
c && /* @__PURE__ */ u("span", {
|
|
147
|
-
className: "text-red-600 dark:text-red-500",
|
|
148
|
-
children: "*"
|
|
149
|
-
})
|
|
150
|
-
]
|
|
151
|
-
})
|
|
152
|
-
}) : null, /* @__PURE__ */ p("div", {
|
|
153
|
-
className: "flex items-center",
|
|
154
|
-
role: "presentation",
|
|
155
|
-
children: [
|
|
156
|
-
/* @__PURE__ */ p("button", {
|
|
157
|
-
type: "button",
|
|
158
|
-
onClick: T,
|
|
159
|
-
className: f(_({
|
|
160
|
-
button: "rigth",
|
|
161
|
-
className: e
|
|
162
|
-
})),
|
|
163
|
-
disabled: !t,
|
|
164
|
-
children: [/* @__PURE__ */ u(j, { className: "w-4 h-4" }), /* @__PURE__ */ u(P, { children: "Decrement" })]
|
|
165
|
-
}),
|
|
166
|
-
/* @__PURE__ */ u("input", {
|
|
167
|
-
ref: M,
|
|
168
|
-
type: "number",
|
|
169
|
-
value: r ? S : l,
|
|
170
|
-
name: k,
|
|
171
|
-
className: f(q({ className: n })),
|
|
172
|
-
...r ? {
|
|
173
|
-
onChange: B,
|
|
174
|
-
onBlur: C
|
|
175
|
-
} : { readOnly: !0 },
|
|
176
|
-
"aria-label": typeof d == "string" ? d : "number input"
|
|
177
|
-
}),
|
|
178
|
-
/* @__PURE__ */ p("button", {
|
|
179
|
-
type: "button",
|
|
180
|
-
onClick: V,
|
|
181
|
-
className: f(_({
|
|
182
|
-
button: "left",
|
|
183
|
-
className: o
|
|
184
|
-
})),
|
|
185
|
-
disabled: !i,
|
|
186
|
-
children: [/* @__PURE__ */ u(N, { className: "w-4 h-4" }), /* @__PURE__ */ u(P, { children: "Increment" })]
|
|
187
|
-
})
|
|
188
|
-
]
|
|
189
|
-
})]
|
|
190
|
-
});
|
|
191
|
-
});
|
|
192
|
-
export {
|
|
193
|
-
ot as t
|
|
194
|
-
};
|