@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,61 +1,65 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as
|
|
3
|
-
import {
|
|
4
|
-
import { t
|
|
5
|
-
import { CheckCircleFilledIcon as
|
|
6
|
-
import { ErrorIcon as
|
|
7
|
-
import { InfoCircleIcon as
|
|
8
|
-
import { WarningTriangleIcon as
|
|
9
|
-
import { alertVariants as
|
|
10
|
-
import { useEffect as
|
|
11
|
-
import { jsx as
|
|
12
|
-
var
|
|
13
|
-
success:
|
|
14
|
-
info:
|
|
15
|
-
warning:
|
|
16
|
-
danger:
|
|
17
|
-
},
|
|
18
|
-
const a =
|
|
19
|
-
const
|
|
20
|
-
|
|
2
|
+
import { t as v } from "../../x-Vur_9PXW.js";
|
|
3
|
+
import { t as I } from "../../dist-C_jtUTU9.js";
|
|
4
|
+
import { t } from "../../utils-DnIJruo0.js";
|
|
5
|
+
import { CheckCircleFilledIcon as N } from "../../assets/icons/components/CheckCircleFilled.js";
|
|
6
|
+
import { ErrorIcon as g } from "../../assets/icons/components/Error.js";
|
|
7
|
+
import { InfoCircleIcon as b } from "../../assets/icons/components/InfoCircle.js";
|
|
8
|
+
import { WarningTriangleIcon as x } from "../../assets/icons/components/WarningTriangle.js";
|
|
9
|
+
import { alertVariants as V, closeButtonVariants as k, descriptionVariants as w, iconVariants as A, titleVariants as E } from "./Alert.variants.js";
|
|
10
|
+
import { useEffect as j, useRef as P, useState as R } from "react";
|
|
11
|
+
import { jsx as e, jsxs as l } from "react/jsx-runtime";
|
|
12
|
+
var B = {
|
|
13
|
+
success: N,
|
|
14
|
+
info: b,
|
|
15
|
+
warning: x,
|
|
16
|
+
danger: g
|
|
17
|
+
}, _ = ({ action: o, icon: d, theme: f, type: r, title: i, description: c, isVisible: s = !0, showCloseButton: u = !1 }) => {
|
|
18
|
+
const a = P(null), [p, h] = R(s), C = () => {
|
|
19
|
+
const n = a.current;
|
|
20
|
+
n && n.setAttribute("data-state", "hidden");
|
|
21
21
|
};
|
|
22
|
-
if (
|
|
23
|
-
const
|
|
22
|
+
if (j(() => {
|
|
23
|
+
const n = new AbortController();
|
|
24
24
|
return a.current?.addEventListener("animationend", () => {
|
|
25
|
-
a.current?.style.setProperty("display", "none"),
|
|
26
|
-
}, { signal:
|
|
27
|
-
}, []), !
|
|
28
|
-
const
|
|
29
|
-
return /* @__PURE__ */
|
|
25
|
+
a.current?.style.setProperty("display", "none"), h(!1);
|
|
26
|
+
}, { signal: n.signal }), () => n.abort();
|
|
27
|
+
}, []), !p) return null;
|
|
28
|
+
const m = r ? B[r] : null;
|
|
29
|
+
return /* @__PURE__ */ l("div", {
|
|
30
30
|
ref: a,
|
|
31
|
-
className:
|
|
31
|
+
className: t(V({
|
|
32
32
|
type: r,
|
|
33
|
-
isVisible:
|
|
33
|
+
isVisible: s
|
|
34
34
|
})),
|
|
35
|
-
"data-state":
|
|
36
|
-
"data-theme":
|
|
35
|
+
"data-state": s ? "visible" : "hidden",
|
|
36
|
+
"data-theme": f,
|
|
37
37
|
role: "alert",
|
|
38
38
|
"aria-live": "polite",
|
|
39
39
|
children: [
|
|
40
|
-
|
|
41
|
-
/* @__PURE__ */
|
|
40
|
+
d ?? (m && /* @__PURE__ */ e(m, { className: t(A({ type: r })) })),
|
|
41
|
+
/* @__PURE__ */ l("div", {
|
|
42
42
|
className: "flex flex-col gap-1 flex-1",
|
|
43
|
-
children: [i && /* @__PURE__ */
|
|
44
|
-
className:
|
|
43
|
+
children: [i && /* @__PURE__ */ e("p", {
|
|
44
|
+
className: t(E({ type: r })),
|
|
45
45
|
children: i
|
|
46
|
-
}),
|
|
47
|
-
className:
|
|
48
|
-
children:
|
|
46
|
+
}), c && /* @__PURE__ */ e("div", {
|
|
47
|
+
className: t(w({ type: r })),
|
|
48
|
+
children: c
|
|
49
49
|
})]
|
|
50
50
|
}),
|
|
51
|
-
|
|
51
|
+
o ? /* @__PURE__ */ e("div", {
|
|
52
|
+
className: "shrink-0 self-center",
|
|
53
|
+
children: o
|
|
54
|
+
}) : null,
|
|
55
|
+
u && /* @__PURE__ */ l("button", {
|
|
52
56
|
type: "button",
|
|
53
|
-
onClick:
|
|
54
|
-
children: [/* @__PURE__ */
|
|
57
|
+
onClick: C,
|
|
58
|
+
children: [/* @__PURE__ */ e(v, { className: t(k({ type: r })) }), /* @__PURE__ */ e(I, { children: "Dismiss alert" })]
|
|
55
59
|
})
|
|
56
60
|
]
|
|
57
61
|
});
|
|
58
62
|
};
|
|
59
63
|
export {
|
|
60
|
-
|
|
64
|
+
_ as Alert
|
|
61
65
|
};
|
|
@@ -1,63 +1,63 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as
|
|
3
|
-
import { a as T, c as z, i as B, l as E, n as P, o as S, r as
|
|
4
|
-
import { Button as
|
|
5
|
-
import { useAlertDialog as
|
|
6
|
-
import { useEffect as
|
|
7
|
-
import { jsx as e, jsxs as
|
|
8
|
-
var
|
|
9
|
-
const r =
|
|
10
|
-
return
|
|
11
|
-
if (!r.current ||
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
}, []), /* @__PURE__ */
|
|
2
|
+
import { t as l } from "../../utils-DnIJruo0.js";
|
|
3
|
+
import { a as T, c as z, i as B, l as E, n as P, o as S, r as $, s as q, t as F } from "../../AlertDialogTrigger-C9xoCZrZ.js";
|
|
4
|
+
import { Button as s } from "../Button/Button.js";
|
|
5
|
+
import { useAlertDialog as G } from "./hooks/useAlertDialog.js";
|
|
6
|
+
import { useEffect as H, useRef as I, useState as J } from "react";
|
|
7
|
+
import { jsx as e, jsxs as a } from "react/jsx-runtime";
|
|
8
|
+
var L = ({ buttonCancel: { className: o, text: c = "Cancel", ...d } = {}, buttonConfirm: { className: m, text: f = "OK", ...p } = {}, buttonTriggerClassName: u, buttonTriggerText: g, buttonTriggerVariant: h, description: x, isDescriptionChild: b, isTitleChild: C, showCancelButton: A = !0, theme: t, title: D, wrapperClassName: N, onClick: y, onConfirm: k, ...n }) => {
|
|
9
|
+
const r = I(null), [v, O] = J(null), { isOpen: j, handleCancel: w, handleConfirm: K, handleOpen: R } = G({ onConfirm: k });
|
|
10
|
+
return H(() => {
|
|
11
|
+
if (!r.current || t) return;
|
|
12
|
+
const i = r.current.closest("[data-theme]");
|
|
13
|
+
i && O(i);
|
|
14
|
+
}, []), /* @__PURE__ */ a(P, {
|
|
15
15
|
open: j,
|
|
16
|
-
...
|
|
17
|
-
children: [/* @__PURE__ */ e(
|
|
16
|
+
...n,
|
|
17
|
+
children: [/* @__PURE__ */ e(F, {
|
|
18
18
|
ref: r,
|
|
19
19
|
className: u,
|
|
20
|
-
variant:
|
|
21
|
-
text:
|
|
22
|
-
"data-theme":
|
|
23
|
-
onOpen:
|
|
24
|
-
onClick:
|
|
25
|
-
...
|
|
26
|
-
}), /* @__PURE__ */
|
|
27
|
-
container:
|
|
28
|
-
children: [/* @__PURE__ */ e(
|
|
29
|
-
"data-theme":
|
|
30
|
-
className:
|
|
20
|
+
variant: h,
|
|
21
|
+
text: g,
|
|
22
|
+
"data-theme": t,
|
|
23
|
+
onOpen: R,
|
|
24
|
+
onClick: y,
|
|
25
|
+
...n
|
|
26
|
+
}), /* @__PURE__ */ a(z, {
|
|
27
|
+
container: v,
|
|
28
|
+
children: [/* @__PURE__ */ e(q, { className: "bg-black opacity-70 dark:opacity-85 inset-0 fixed animate-in fade-in-0" }), /* @__PURE__ */ a(T, {
|
|
29
|
+
"data-theme": t,
|
|
30
|
+
className: l("bg-white", "rounded-md", "fixed", "top-1/2", "left-1/2", "-translate-y-2/4", "-translate-x-2/4", "flex", "flex-col", "gap-6", "p-8", "animate-in", "fade-in-0", "zoom-in-85", "border", "border-transparent", "dark:bg-metal-800", "dark:border-metal-700", "dark:border-slate-700", N),
|
|
31
31
|
children: [
|
|
32
32
|
/* @__PURE__ */ e(E, {
|
|
33
|
-
asChild:
|
|
33
|
+
asChild: C,
|
|
34
34
|
className: "text-base text-slate-700 font-semibold",
|
|
35
|
-
children:
|
|
35
|
+
children: D
|
|
36
36
|
}),
|
|
37
|
-
/* @__PURE__ */ e(
|
|
38
|
-
asChild:
|
|
37
|
+
/* @__PURE__ */ e(S, {
|
|
38
|
+
asChild: b,
|
|
39
39
|
className: "text-sm text-slate-800",
|
|
40
|
-
children:
|
|
40
|
+
children: x
|
|
41
41
|
}),
|
|
42
|
-
/* @__PURE__ */
|
|
42
|
+
/* @__PURE__ */ a("div", {
|
|
43
43
|
className: "flex flex-row gap-2 justify-end",
|
|
44
|
-
children: [
|
|
44
|
+
children: [A && /* @__PURE__ */ e(B, {
|
|
45
45
|
asChild: !0,
|
|
46
|
-
children: /* @__PURE__ */ e(
|
|
46
|
+
children: /* @__PURE__ */ e(s, {
|
|
47
47
|
type: "button",
|
|
48
48
|
variant: "secondary",
|
|
49
|
-
className:
|
|
50
|
-
onClick:
|
|
49
|
+
className: l(o),
|
|
50
|
+
onClick: w,
|
|
51
51
|
...d,
|
|
52
52
|
children: c
|
|
53
53
|
})
|
|
54
|
-
}), /* @__PURE__ */ e(
|
|
54
|
+
}), /* @__PURE__ */ e($, {
|
|
55
55
|
asChild: !0,
|
|
56
|
-
children: /* @__PURE__ */ e(
|
|
56
|
+
children: /* @__PURE__ */ e(s, {
|
|
57
57
|
type: "button",
|
|
58
58
|
variant: "primary",
|
|
59
|
-
className:
|
|
60
|
-
onClick:
|
|
59
|
+
className: l(m),
|
|
60
|
+
onClick: K,
|
|
61
61
|
...p,
|
|
62
62
|
children: f
|
|
63
63
|
})
|
|
@@ -68,7 +68,7 @@ var M = ({ buttonCancel: { className: o, text: c = "Cancel", ...d } = {}, button
|
|
|
68
68
|
})]
|
|
69
69
|
});
|
|
70
70
|
};
|
|
71
|
-
|
|
71
|
+
L.displayName = "KonstructAlertDialog";
|
|
72
72
|
export {
|
|
73
|
-
|
|
73
|
+
L as AlertDialog
|
|
74
74
|
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { t as u } from "../../utils-DnIJruo0.js";
|
|
2
|
+
import { ProfileIcon as f } from "../../assets/icons/components/Profile.js";
|
|
3
|
+
import { avatarVariants as g } from "./Avatar.variants.js";
|
|
4
|
+
import { useGravatarUrl as h } from "./hooks/use-gravatar-url.js";
|
|
5
|
+
import { useState as U } from "react";
|
|
6
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
7
|
+
var N = {
|
|
8
|
+
sm: 28,
|
|
9
|
+
md: 40,
|
|
10
|
+
lg: 56
|
|
11
|
+
}, E = ({ alt: m, className: s, email: i, fallback: t, icon: l, size: e = "md", src: o, theme: n }) => {
|
|
12
|
+
const d = h(o ? void 0 : i, N[e ?? "md"] * 2), r = o ?? d, [c, p] = U(null), v = !!r && c !== r;
|
|
13
|
+
return /* @__PURE__ */ a("span", {
|
|
14
|
+
role: "img",
|
|
15
|
+
"aria-label": m,
|
|
16
|
+
"data-theme": n,
|
|
17
|
+
className: u(g({ size: e }), s),
|
|
18
|
+
children: v ? /* @__PURE__ */ a("img", {
|
|
19
|
+
src: r,
|
|
20
|
+
alt: "",
|
|
21
|
+
className: "size-full object-cover",
|
|
22
|
+
onError: () => {
|
|
23
|
+
p(r);
|
|
24
|
+
}
|
|
25
|
+
}) : t ? /* @__PURE__ */ a("span", {
|
|
26
|
+
"aria-hidden": "true",
|
|
27
|
+
children: t
|
|
28
|
+
}) : l ?? /* @__PURE__ */ a(f, {
|
|
29
|
+
"aria-hidden": "true",
|
|
30
|
+
className: "size-1/2"
|
|
31
|
+
})
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
E.displayName = "KonstructAvatar";
|
|
35
|
+
export {
|
|
36
|
+
E as Avatar
|
|
37
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { t as e } from "../../dist-B9GE4SXf.js";
|
|
2
|
+
var s = e([
|
|
3
|
+
"inline-flex",
|
|
4
|
+
"shrink-0",
|
|
5
|
+
"items-center",
|
|
6
|
+
"justify-center",
|
|
7
|
+
"overflow-hidden",
|
|
8
|
+
"rounded-full",
|
|
9
|
+
"bg-sky-400/15",
|
|
10
|
+
"font-medium",
|
|
11
|
+
"uppercase",
|
|
12
|
+
"text-sky-600",
|
|
13
|
+
"select-none",
|
|
14
|
+
"dark:text-sky-400"
|
|
15
|
+
], {
|
|
16
|
+
variants: { size: {
|
|
17
|
+
sm: ["size-7", "text-[10px]"],
|
|
18
|
+
md: ["size-10", "text-sm"],
|
|
19
|
+
lg: ["size-14", "text-lg"]
|
|
20
|
+
} },
|
|
21
|
+
defaultVariants: { size: "md" }
|
|
22
|
+
});
|
|
23
|
+
export {
|
|
24
|
+
s as avatarVariants
|
|
25
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { useEffect as s, useState as l } from "react";
|
|
2
|
+
var u = "https://gravatar.com/avatar", c = (r) => Array.from(new Uint8Array(r)).map((t) => t.toString(16).padStart(2, "0")).join(""), i = async (r, t) => {
|
|
3
|
+
const a = globalThis.crypto?.subtle;
|
|
4
|
+
if (!a) return null;
|
|
5
|
+
const e = new TextEncoder().encode(r.trim().toLowerCase()), n = c(await a.digest("SHA-256", e));
|
|
6
|
+
return `${u}/${n}?d=404&s=${t}`;
|
|
7
|
+
}, f = (r, t) => {
|
|
8
|
+
const [a, e] = l(null);
|
|
9
|
+
return s(() => {
|
|
10
|
+
if (!r) {
|
|
11
|
+
e(null);
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
let n = !1;
|
|
15
|
+
return i(r, t).then((o) => {
|
|
16
|
+
n || e(o);
|
|
17
|
+
}), () => {
|
|
18
|
+
n = !0;
|
|
19
|
+
};
|
|
20
|
+
}, [r, t]), a;
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
i as buildGravatarUrl,
|
|
24
|
+
f as useGravatarUrl
|
|
25
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { t as r } from "../../utils-DnIJruo0.js";
|
|
2
|
+
import { avatarVariants as i } from "../Avatar/Avatar.variants.js";
|
|
3
|
+
import { Avatar as v } from "../Avatar/Avatar.js";
|
|
4
|
+
import { jsx as l, jsxs as b } from "react/jsx-runtime";
|
|
5
|
+
var x = 5, f = ({ className: s, emptyLabel: c = "No members yet", items: a, label: h = (e) => `${e} members`, max: g = x, overflowLabel: p = (e) => `${e} more members`, size: t = "sm", theme: d }) => {
|
|
6
|
+
if (a.length === 0) return /* @__PURE__ */ l("span", {
|
|
7
|
+
role: "img",
|
|
8
|
+
"aria-label": c,
|
|
9
|
+
"data-theme": d,
|
|
10
|
+
className: r(i({ size: t }), "border border-dashed border-metal-500 bg-metal-300/15 text-metal-400", s),
|
|
11
|
+
children: "?"
|
|
12
|
+
});
|
|
13
|
+
const e = a.slice(0, g), m = a.length - e.length;
|
|
14
|
+
return /* @__PURE__ */ b("ul", {
|
|
15
|
+
"aria-label": h(a.length),
|
|
16
|
+
"data-theme": d,
|
|
17
|
+
className: r("flex list-none items-center p-0", s),
|
|
18
|
+
children: [e.map((o, n) => /* @__PURE__ */ l("li", {
|
|
19
|
+
className: r("relative flex", n > 0 && "-ml-2"),
|
|
20
|
+
style: { zIndex: e.length - n },
|
|
21
|
+
children: /* @__PURE__ */ l(v, {
|
|
22
|
+
...o,
|
|
23
|
+
size: t,
|
|
24
|
+
className: r("border-2 border-white dark:border-metal-800", o.className)
|
|
25
|
+
})
|
|
26
|
+
}, o.id)), m > 0 ? /* @__PURE__ */ l("li", {
|
|
27
|
+
className: "relative -ml-2 flex",
|
|
28
|
+
children: /* @__PURE__ */ b("span", {
|
|
29
|
+
role: "img",
|
|
30
|
+
"aria-label": p(m),
|
|
31
|
+
className: r(i({ size: t }), "border-2 border-white bg-gray-200 text-gray-600 dark:border-metal-800 dark:bg-metal-700 dark:text-metal-300"),
|
|
32
|
+
children: ["+", m]
|
|
33
|
+
})
|
|
34
|
+
}) : null]
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
f.displayName = "KonstructAvatarGroup";
|
|
38
|
+
export {
|
|
39
|
+
f as AvatarGroup
|
|
40
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as c } from "../../dist-
|
|
1
|
+
import { t as c } from "../../dist-CK8FUUUn.js";
|
|
2
2
|
import { t as p } from "../../utils-DnIJruo0.js";
|
|
3
3
|
import { LoaderIcon as x } from "../../assets/icons/components/Loader.js";
|
|
4
4
|
import { t as D } from "../../x-C8O1IsaM.js";
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { t as c } from "../../utils-DnIJruo0.js";
|
|
2
|
+
import { Badge as f } from "../Badge/Badge.js";
|
|
3
|
+
import { Tooltip as w } from "../Tooltip/Tooltip.js";
|
|
4
|
+
import { useVisibleBadgeCount as _ } from "./hooks/use-visible-badge-count/use-visible-badge-count.js";
|
|
5
|
+
import { useRef as v } from "react";
|
|
6
|
+
import { Fragment as T, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
7
|
+
var k = 8, A = 16, B = 4, E = (a, t) => {
|
|
8
|
+
const e = [];
|
|
9
|
+
for (let r = 0; r < a.length; r += t) e.push(a.slice(r, r + t));
|
|
10
|
+
return e;
|
|
11
|
+
}, G = ({ badgeClassName: a, className: t, items: e, itemsPerTooltipLine: r = B, maxVisible: b, maxWidth: i, overflowLabel: g = (s) => `Show ${s} more`, renderOverflow: N, size: d, variant: p }) => {
|
|
12
|
+
const s = v(null), h = v(null), x = _({
|
|
13
|
+
containerRef: s,
|
|
14
|
+
gapPx: k,
|
|
15
|
+
horizontalPaddingPx: A,
|
|
16
|
+
items: e,
|
|
17
|
+
maxWidth: i,
|
|
18
|
+
probeRef: h
|
|
19
|
+
});
|
|
20
|
+
if (e.length === 0) return null;
|
|
21
|
+
const m = Math.max(1, Math.min(x, b ?? e.length)), I = e.slice(0, m), o = e.slice(m);
|
|
22
|
+
return /* @__PURE__ */ u("div", {
|
|
23
|
+
ref: s,
|
|
24
|
+
className: c("relative min-w-0", t),
|
|
25
|
+
style: i !== void 0 ? { maxWidth: i } : void 0,
|
|
26
|
+
children: [/* @__PURE__ */ l("span", {
|
|
27
|
+
ref: h,
|
|
28
|
+
"aria-hidden": "true",
|
|
29
|
+
className: "invisible absolute text-xs leading-4"
|
|
30
|
+
}), /* @__PURE__ */ u("div", {
|
|
31
|
+
className: "flex items-center gap-2 overflow-hidden",
|
|
32
|
+
children: [I.map((n) => /* @__PURE__ */ l(f, {
|
|
33
|
+
label: n.label,
|
|
34
|
+
leftIcon: n.leftIcon,
|
|
35
|
+
size: d,
|
|
36
|
+
variant: n.variant ?? p,
|
|
37
|
+
className: c("shrink-0 whitespace-nowrap", a)
|
|
38
|
+
}, n.id)), o.length > 0 ? /* @__PURE__ */ u(T, { children: [/* @__PURE__ */ l("span", {
|
|
39
|
+
className: "sr-only",
|
|
40
|
+
children: e.map((n) => n.label).join(", ")
|
|
41
|
+
}), /* @__PURE__ */ l(w, {
|
|
42
|
+
className: "max-w-80 text-center",
|
|
43
|
+
content: N?.(o) ?? E(o, r).map((n) => /* @__PURE__ */ l("div", { children: n.map((P) => P.label).join(", ") }, n[0].id)),
|
|
44
|
+
children: /* @__PURE__ */ l("button", {
|
|
45
|
+
type: "button",
|
|
46
|
+
"aria-label": g(o.length),
|
|
47
|
+
className: "shrink-0 cursor-pointer rounded focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-aurora-500",
|
|
48
|
+
children: /* @__PURE__ */ l(f, {
|
|
49
|
+
label: `+${o.length}`,
|
|
50
|
+
size: d,
|
|
51
|
+
variant: p,
|
|
52
|
+
className: c("shrink-0 whitespace-nowrap", a)
|
|
53
|
+
})
|
|
54
|
+
})
|
|
55
|
+
})] }) : null]
|
|
56
|
+
})]
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
G.displayName = "KonstructBadgeGroup";
|
|
60
|
+
export {
|
|
61
|
+
G as BadgeGroup
|
|
62
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { useLayoutEffect as p, useState as E } from "react";
|
|
2
|
+
var d = null, T = () => (d || (d = document.createElement("canvas")?.getContext("2d")), d), V = (t) => !t.fontSize || !t.fontFamily ? "" : `${t.fontStyle} ${t.fontWeight} ${t.fontSize} ${t.fontFamily}`, x = ({ containerRef: t, gapPx: r, horizontalPaddingPx: f, items: e, maxWidth: o, probeRef: h }) => {
|
|
3
|
+
const [$, u] = E(e.length);
|
|
4
|
+
return p(() => {
|
|
5
|
+
const v = h.current, i = t.current, c = T();
|
|
6
|
+
if (o === void 0 || !v || !i || !c || e.length === 0) {
|
|
7
|
+
u(e.length);
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
const l = () => {
|
|
11
|
+
const C = V(getComputedStyle(v));
|
|
12
|
+
if (!C) {
|
|
13
|
+
u(e.length);
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
c.font = C;
|
|
17
|
+
const m = Math.min(i.offsetWidth || o, o), w = e.map((n) => c.measureText(n.label).width + f), F = c.measureText(`+${e.length}`).width + f;
|
|
18
|
+
if (w.reduce((n, s, W) => n + s + (W > 0 ? r : 0), 0) <= m) {
|
|
19
|
+
u(e.length);
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
const M = m - F - r;
|
|
23
|
+
let S = 0, a = 0;
|
|
24
|
+
for (const n of w) {
|
|
25
|
+
const s = S + n + (a > 0 ? r : 0);
|
|
26
|
+
if (s > M) break;
|
|
27
|
+
S = s, a += 1;
|
|
28
|
+
}
|
|
29
|
+
u(Math.max(1, a));
|
|
30
|
+
};
|
|
31
|
+
l();
|
|
32
|
+
let b = !1;
|
|
33
|
+
const g = new ResizeObserver(l);
|
|
34
|
+
return g.observe(i), document.fonts?.ready.then(() => {
|
|
35
|
+
b || l();
|
|
36
|
+
}), () => {
|
|
37
|
+
b = !0, g.disconnect();
|
|
38
|
+
};
|
|
39
|
+
}, [
|
|
40
|
+
t,
|
|
41
|
+
r,
|
|
42
|
+
f,
|
|
43
|
+
e,
|
|
44
|
+
o,
|
|
45
|
+
h
|
|
46
|
+
]), $;
|
|
47
|
+
};
|
|
48
|
+
export {
|
|
49
|
+
x as useVisibleBadgeCount
|
|
50
|
+
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { t } from "../../../CollapsedSteps-CR7oCTRC.js";
|
|
2
|
+
import { BackButton as r } from "./BackButton/BackButton.js";
|
|
3
|
+
import { Item as e } from "./Item/Item.js";
|
|
3
4
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
r as BackButton,
|
|
6
|
+
t as CollapsedSteps,
|
|
7
|
+
e as Item
|
|
6
8
|
};
|
|
@@ -1,23 +1,29 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import { t as
|
|
3
|
-
import { buttonVariants as
|
|
4
|
-
import { forwardRef as
|
|
1
|
+
import { t as x } from "../../dist-CK8FUUUn.js";
|
|
2
|
+
import { t as b } from "../../utils-DnIJruo0.js";
|
|
3
|
+
import { buttonVariants as l } from "./Button.variants.js";
|
|
4
|
+
import { forwardRef as v } from "react";
|
|
5
5
|
import { jsx as B } from "react/jsx-runtime";
|
|
6
|
-
var N =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
6
|
+
var N = v(({ appearance: r, asChild: o = !1, className: n, disabled: t = !1, shape: a, size: e, theme: m, variant: s, version: p, ...f }, u) => {
|
|
7
|
+
const i = o ? x : "button", c = o && t ? {
|
|
8
|
+
"aria-disabled": !0,
|
|
9
|
+
tabIndex: -1
|
|
10
|
+
} : { disabled: t };
|
|
11
|
+
return /* @__PURE__ */ B(i, {
|
|
12
|
+
ref: u,
|
|
13
|
+
"data-theme": m,
|
|
14
|
+
className: b(l({
|
|
15
|
+
appearance: r,
|
|
16
|
+
className: n,
|
|
17
|
+
disabled: t,
|
|
18
|
+
shape: a,
|
|
19
|
+
size: e,
|
|
20
|
+
variant: s,
|
|
21
|
+
version: p
|
|
22
|
+
}), o && t && "pointer-events-none"),
|
|
23
|
+
...c,
|
|
24
|
+
...f
|
|
25
|
+
});
|
|
26
|
+
});
|
|
21
27
|
N.displayName = "KonstructButton";
|
|
22
28
|
export {
|
|
23
29
|
N as Button
|