@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
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
import { a as G } from "./dist-CK8FUUUn.js";
|
|
2
|
+
import { n as ue, t as J } from "./dist-CYuWoi9I.js";
|
|
3
|
+
import { r as U } from "./dist-DbeY0Pzx.js";
|
|
4
|
+
import { t as I } from "./dist-C0OhTLFV.js";
|
|
5
|
+
import * as o from "react";
|
|
6
|
+
import { jsx as M } from "react/jsx-runtime";
|
|
7
|
+
var ce = Object.defineProperty, m = (e, t) => ce(e, "name", {
|
|
8
|
+
value: t,
|
|
9
|
+
configurable: !0
|
|
10
|
+
}), B = "dismissableLayer.update", ae = "dismissableLayer.pointerDownOutside", de = "dismissableLayer.focusOutside", $, Q = o.createContext({
|
|
11
|
+
layers: /* @__PURE__ */ new Set(),
|
|
12
|
+
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
13
|
+
branches: /* @__PURE__ */ new Set(),
|
|
14
|
+
dismissableSurfaces: /* @__PURE__ */ new Set()
|
|
15
|
+
}), Pe = /* @__PURE__ */ o.forwardRef(/* @__PURE__ */ m(function(t, n) {
|
|
16
|
+
const { disableOutsidePointerEvents: r = !1, deferPointerDownOutside: c = !1, onEscapeKeyDown: h, onPointerDownOutside: L, onFocusOutside: T, onInteractOutside: D, onDismiss: i, ...P } = t, u = o.useContext(Q), [a, S] = o.useState(null), v = a?.ownerDocument ?? globalThis?.document, [, F] = o.useState({}), C = G(n, S), p = Array.from(u.layers), [g] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), s = g ? p.indexOf(g) : -1, d = a ? p.indexOf(a) : -1, E = u.layersWithOutsidePointerEventsDisabled.size > 0, b = d >= s, O = o.useRef(!1), y = Y((l) => {
|
|
17
|
+
L?.(l), D?.(l), l.defaultPrevented || i?.();
|
|
18
|
+
}, {
|
|
19
|
+
ownerDocument: v,
|
|
20
|
+
deferPointerDownOutside: c,
|
|
21
|
+
isDeferredPointerDownOutsideRef: O,
|
|
22
|
+
dismissableSurfaces: u.dismissableSurfaces,
|
|
23
|
+
shouldHandlePointerDownOutside: o.useCallback((l) => {
|
|
24
|
+
if (!(l instanceof Node)) return !1;
|
|
25
|
+
const N = [...u.branches].some((k) => k.contains(l));
|
|
26
|
+
return b && !N;
|
|
27
|
+
}, [u.branches, b])
|
|
28
|
+
}), j = Z((l) => {
|
|
29
|
+
if (c && O.current) return;
|
|
30
|
+
const N = l.target;
|
|
31
|
+
[...u.branches].some((k) => k.contains(N)) || (T?.(l), D?.(l), l.defaultPrevented || i?.());
|
|
32
|
+
}, v), z = a ? d === p.length - 1 : !1, R = I((l) => {
|
|
33
|
+
l.key === "Escape" && (h?.(l), !l.defaultPrevented && i && (l.preventDefault(), i()));
|
|
34
|
+
});
|
|
35
|
+
return o.useEffect(() => {
|
|
36
|
+
if (z)
|
|
37
|
+
return v.addEventListener("keydown", R, { capture: !0 }), () => v.removeEventListener("keydown", R, { capture: !0 });
|
|
38
|
+
}, [
|
|
39
|
+
v,
|
|
40
|
+
z,
|
|
41
|
+
R
|
|
42
|
+
]), o.useEffect(() => {
|
|
43
|
+
if (a)
|
|
44
|
+
return r && (u.layersWithOutsidePointerEventsDisabled.size === 0 && ($ = v.body.style.pointerEvents, v.body.style.pointerEvents = "none"), u.layersWithOutsidePointerEventsDisabled.add(a)), u.layers.add(a), A(), () => {
|
|
45
|
+
r && (u.layersWithOutsidePointerEventsDisabled.delete(a), u.layersWithOutsidePointerEventsDisabled.size === 0 && (v.body.style.pointerEvents = $));
|
|
46
|
+
};
|
|
47
|
+
}, [
|
|
48
|
+
a,
|
|
49
|
+
v,
|
|
50
|
+
r,
|
|
51
|
+
u
|
|
52
|
+
]), o.useEffect(() => () => {
|
|
53
|
+
a && (u.layers.delete(a), u.layersWithOutsidePointerEventsDisabled.delete(a), A());
|
|
54
|
+
}, [a, u]), o.useEffect(() => {
|
|
55
|
+
const l = /* @__PURE__ */ m(() => F({}), "handleUpdate");
|
|
56
|
+
return document.addEventListener(B, l), () => document.removeEventListener(B, l);
|
|
57
|
+
}, []), /* @__PURE__ */ M(J.div, {
|
|
58
|
+
...P,
|
|
59
|
+
ref: C,
|
|
60
|
+
style: {
|
|
61
|
+
pointerEvents: E ? b ? "auto" : "none" : void 0,
|
|
62
|
+
...t.style
|
|
63
|
+
},
|
|
64
|
+
onFocusCapture: U(t.onFocusCapture, j.onFocusCapture),
|
|
65
|
+
onBlurCapture: U(t.onBlurCapture, j.onBlurCapture),
|
|
66
|
+
onPointerDownCapture: U(t.onPointerDownCapture, y.onPointerDownCapture)
|
|
67
|
+
});
|
|
68
|
+
}, "DismissableLayer"));
|
|
69
|
+
function fe() {
|
|
70
|
+
const e = o.useContext(Q), [t, n] = o.useState(null);
|
|
71
|
+
return o.useEffect(() => {
|
|
72
|
+
if (t)
|
|
73
|
+
return e.dismissableSurfaces.add(t), () => {
|
|
74
|
+
e.dismissableSurfaces.delete(t);
|
|
75
|
+
};
|
|
76
|
+
}, [t, e.dismissableSurfaces]), n;
|
|
77
|
+
}
|
|
78
|
+
m(fe, "useDismissableLayerSurface");
|
|
79
|
+
var le = /* @__PURE__ */ m(() => !0, "IS_TRUE");
|
|
80
|
+
function Y(e, t) {
|
|
81
|
+
const { ownerDocument: n = globalThis?.document, deferPointerDownOutside: r = !1, isDeferredPointerDownOutsideRef: c, dismissableSurfaces: h, shouldHandlePointerDownOutside: L = le } = t, T = I(e), D = o.useRef(!1), i = o.useRef(!1), P = o.useRef(/* @__PURE__ */ new Map()), u = o.useRef(() => {
|
|
82
|
+
});
|
|
83
|
+
return o.useEffect(() => {
|
|
84
|
+
function a() {
|
|
85
|
+
i.current = !1, c.current = !1, P.current.clear();
|
|
86
|
+
}
|
|
87
|
+
m(a, "resetOutsideInteraction");
|
|
88
|
+
function S() {
|
|
89
|
+
return Array.from(P.current.values()).some(Boolean);
|
|
90
|
+
}
|
|
91
|
+
m(S, "isOutsideInteractionIntercepted");
|
|
92
|
+
function v(s) {
|
|
93
|
+
if (!i.current) return;
|
|
94
|
+
const d = s.target;
|
|
95
|
+
d instanceof Node && [...h].some((E) => E.contains(d)) || P.current.set(s.type, !0), s.type === "click" && window.setTimeout(() => {
|
|
96
|
+
i.current && u.current();
|
|
97
|
+
}, 0);
|
|
98
|
+
}
|
|
99
|
+
m(v, "handleInteractionCapture");
|
|
100
|
+
function F(s) {
|
|
101
|
+
i.current && P.current.set(s.type, !1);
|
|
102
|
+
}
|
|
103
|
+
m(F, "handleInteractionBubble");
|
|
104
|
+
const C = /* @__PURE__ */ m((s) => {
|
|
105
|
+
if (s.target && !D.current) {
|
|
106
|
+
let d = function() {
|
|
107
|
+
n.removeEventListener("click", u.current);
|
|
108
|
+
const b = S();
|
|
109
|
+
a(), b || V(ae, T, E, { discrete: !0 });
|
|
110
|
+
};
|
|
111
|
+
if (m(d, "handleAndDispatchPointerDownOutsideEvent"), !L(s.target)) {
|
|
112
|
+
n.removeEventListener("click", u.current), a(), D.current = !1;
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
const E = { originalEvent: s };
|
|
116
|
+
i.current = !0, c.current = r && s.button === 0, P.current.clear(), !r || s.button !== 0 ? d() : (n.removeEventListener("click", u.current), u.current = d, n.addEventListener("click", u.current, { once: !0 }));
|
|
117
|
+
} else
|
|
118
|
+
n.removeEventListener("click", u.current), a();
|
|
119
|
+
D.current = !1;
|
|
120
|
+
}, "handlePointerDown"), p = [
|
|
121
|
+
"pointerup",
|
|
122
|
+
"mousedown",
|
|
123
|
+
"mouseup",
|
|
124
|
+
"touchstart",
|
|
125
|
+
"touchend",
|
|
126
|
+
"click"
|
|
127
|
+
];
|
|
128
|
+
for (const s of p)
|
|
129
|
+
n.addEventListener(s, v, !0), n.addEventListener(s, F);
|
|
130
|
+
const g = window.setTimeout(() => {
|
|
131
|
+
n.addEventListener("pointerdown", C);
|
|
132
|
+
}, 0);
|
|
133
|
+
return () => {
|
|
134
|
+
window.clearTimeout(g), n.removeEventListener("pointerdown", C), n.removeEventListener("click", u.current);
|
|
135
|
+
for (const s of p)
|
|
136
|
+
n.removeEventListener(s, v, !0), n.removeEventListener(s, F);
|
|
137
|
+
};
|
|
138
|
+
}, [
|
|
139
|
+
n,
|
|
140
|
+
T,
|
|
141
|
+
r,
|
|
142
|
+
c,
|
|
143
|
+
h,
|
|
144
|
+
L
|
|
145
|
+
]), { onPointerDownCapture: /* @__PURE__ */ m(() => D.current = !0, "onPointerDownCapture") };
|
|
146
|
+
}
|
|
147
|
+
m(Y, "usePointerDownOutside");
|
|
148
|
+
function Z(e, t = globalThis?.document) {
|
|
149
|
+
const n = I(e), r = o.useRef(!1);
|
|
150
|
+
return o.useEffect(() => {
|
|
151
|
+
const c = /* @__PURE__ */ m((h) => {
|
|
152
|
+
h.target && !r.current && V(de, n, { originalEvent: h }, { discrete: !1 });
|
|
153
|
+
}, "handleFocus");
|
|
154
|
+
return t.addEventListener("focusin", c), () => t.removeEventListener("focusin", c);
|
|
155
|
+
}, [t, n]), {
|
|
156
|
+
onFocusCapture: /* @__PURE__ */ m(() => r.current = !0, "onFocusCapture"),
|
|
157
|
+
onBlurCapture: /* @__PURE__ */ m(() => r.current = !1, "onBlurCapture")
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
m(Z, "useFocusOutside");
|
|
161
|
+
function A() {
|
|
162
|
+
const e = new CustomEvent(B);
|
|
163
|
+
document.dispatchEvent(e);
|
|
164
|
+
}
|
|
165
|
+
m(A, "dispatchUpdate");
|
|
166
|
+
function V(e, t, n, { discrete: r }) {
|
|
167
|
+
const c = n.originalEvent.target, h = new CustomEvent(e, {
|
|
168
|
+
bubbles: !1,
|
|
169
|
+
cancelable: !0,
|
|
170
|
+
detail: n
|
|
171
|
+
});
|
|
172
|
+
t && c.addEventListener(e, t, { once: !0 }), r ? ue(c, h) : c.dispatchEvent(h);
|
|
173
|
+
}
|
|
174
|
+
m(V, "handleAndDispatchCustomEvent");
|
|
175
|
+
var me = Object.defineProperty, f = (e, t) => me(e, "name", {
|
|
176
|
+
value: t,
|
|
177
|
+
configurable: !0
|
|
178
|
+
}), _ = "focusScope.autoFocusOnMount", x = "focusScope.autoFocusOnUnmount", X = {
|
|
179
|
+
bubbles: !1,
|
|
180
|
+
cancelable: !0
|
|
181
|
+
}, we = /* @__PURE__ */ o.forwardRef(/* @__PURE__ */ f(function(t, n) {
|
|
182
|
+
const { loop: r = !1, trapped: c = !1, branches: h, onMountAutoFocus: L, onUnmountAutoFocus: T, ...D } = t, [i, P] = o.useState(null), u = I(L), a = I(T), S = o.useRef(null), v = G(n, P), F = o.useRef(h);
|
|
183
|
+
o.useEffect(() => {
|
|
184
|
+
F.current = h;
|
|
185
|
+
});
|
|
186
|
+
const C = o.useCallback((s) => s ? i?.contains(s) ? !0 : !!F.current?.some((d) => d.contains(s)) : !1, [i]), p = o.useRef({
|
|
187
|
+
paused: !1,
|
|
188
|
+
pause() {
|
|
189
|
+
this.paused = !0;
|
|
190
|
+
},
|
|
191
|
+
resume() {
|
|
192
|
+
this.paused = !1;
|
|
193
|
+
}
|
|
194
|
+
}).current;
|
|
195
|
+
o.useEffect(() => {
|
|
196
|
+
if (c) {
|
|
197
|
+
let s = function(O) {
|
|
198
|
+
if (p.paused || !i) return;
|
|
199
|
+
const y = O.target;
|
|
200
|
+
C(y) ? S.current = y : w(S.current, { select: !0 });
|
|
201
|
+
}, d = function(O) {
|
|
202
|
+
if (p.paused || !i) return;
|
|
203
|
+
const y = O.relatedTarget;
|
|
204
|
+
y !== null && (C(y) || w(S.current, { select: !0 }));
|
|
205
|
+
}, E = function(O) {
|
|
206
|
+
if (document.activeElement === document.body)
|
|
207
|
+
for (const y of O) y.removedNodes.length > 0 && w(i);
|
|
208
|
+
};
|
|
209
|
+
f(s, "handleFocusIn"), f(d, "handleFocusOut"), f(E, "handleMutations"), document.addEventListener("focusin", s), document.addEventListener("focusout", d);
|
|
210
|
+
const b = new MutationObserver(E);
|
|
211
|
+
return i && b.observe(i, {
|
|
212
|
+
childList: !0,
|
|
213
|
+
subtree: !0
|
|
214
|
+
}), () => {
|
|
215
|
+
document.removeEventListener("focusin", s), document.removeEventListener("focusout", d), b.disconnect();
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
}, [
|
|
219
|
+
c,
|
|
220
|
+
i,
|
|
221
|
+
p.paused,
|
|
222
|
+
C
|
|
223
|
+
]), o.useEffect(() => {
|
|
224
|
+
if (i) {
|
|
225
|
+
q.add(p);
|
|
226
|
+
const s = document.activeElement;
|
|
227
|
+
if (!i.contains(s)) {
|
|
228
|
+
const d = new CustomEvent(_, X);
|
|
229
|
+
i.addEventListener(_, u), i.dispatchEvent(d), d.defaultPrevented || (te(ie(H(i)), { select: !0 }), document.activeElement === s && w(i));
|
|
230
|
+
}
|
|
231
|
+
return () => {
|
|
232
|
+
i.removeEventListener(_, u);
|
|
233
|
+
const d = i.ownerDocument, E = CustomEvent;
|
|
234
|
+
setTimeout(() => {
|
|
235
|
+
const b = new E(x, X);
|
|
236
|
+
i.addEventListener(x, a), i.dispatchEvent(b), b.defaultPrevented || w(s ?? d.body, { select: !0 }), i.removeEventListener(x, a), q.remove(p);
|
|
237
|
+
}, 0);
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
}, [
|
|
241
|
+
i,
|
|
242
|
+
u,
|
|
243
|
+
a,
|
|
244
|
+
p
|
|
245
|
+
]);
|
|
246
|
+
const g = o.useCallback((s) => {
|
|
247
|
+
if (!r && !c || p.paused) return;
|
|
248
|
+
const d = s.key === "Tab" && !s.altKey && !s.ctrlKey && !s.metaKey, E = document.activeElement;
|
|
249
|
+
if (d && E) {
|
|
250
|
+
const b = s.currentTarget, [O, y] = ne(b);
|
|
251
|
+
O && y ? !s.shiftKey && E === y ? (s.preventDefault(), r && w(O, { select: !0 })) : s.shiftKey && E === O && (s.preventDefault(), r && w(y, { select: !0 })) : E === b && s.preventDefault();
|
|
252
|
+
}
|
|
253
|
+
}, [
|
|
254
|
+
r,
|
|
255
|
+
c,
|
|
256
|
+
p.paused
|
|
257
|
+
]);
|
|
258
|
+
return /* @__PURE__ */ M(J.div, {
|
|
259
|
+
tabIndex: -1,
|
|
260
|
+
...D,
|
|
261
|
+
ref: v,
|
|
262
|
+
onKeyDown: g
|
|
263
|
+
});
|
|
264
|
+
}, "FocusScope")), ee = o.createContext(null);
|
|
265
|
+
function ve({ registry: e, children: t }) {
|
|
266
|
+
return e ? /* @__PURE__ */ M(ee.Provider, {
|
|
267
|
+
value: e,
|
|
268
|
+
children: t
|
|
269
|
+
}) : t;
|
|
270
|
+
}
|
|
271
|
+
f(ve, "FocusScopeBranchProvider");
|
|
272
|
+
function pe() {
|
|
273
|
+
const [e, t] = o.useState([]);
|
|
274
|
+
return {
|
|
275
|
+
nodes: e,
|
|
276
|
+
registry: o.useMemo(() => ({
|
|
277
|
+
add: /* @__PURE__ */ f((n) => t((r) => r.includes(n) ? r : [...r, n]), "add"),
|
|
278
|
+
remove: /* @__PURE__ */ f((n) => t((r) => r.filter((c) => c !== n)), "remove")
|
|
279
|
+
}), [])
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
f(pe, "useFocusScopeBranchRegistry");
|
|
283
|
+
function Ee(e) {
|
|
284
|
+
const t = o.useContext(ee);
|
|
285
|
+
o.useEffect(() => {
|
|
286
|
+
if (!(!e || !t))
|
|
287
|
+
return t.add(e), () => t.remove(e);
|
|
288
|
+
}, [e, t]);
|
|
289
|
+
}
|
|
290
|
+
f(Ee, "useFocusScopeBranch");
|
|
291
|
+
function te(e, { select: t = !1 } = {}) {
|
|
292
|
+
const n = document.activeElement;
|
|
293
|
+
for (const r of e)
|
|
294
|
+
if (w(r, { select: t }), document.activeElement !== n) return;
|
|
295
|
+
}
|
|
296
|
+
f(te, "focusFirst");
|
|
297
|
+
function ne(e) {
|
|
298
|
+
const t = H(e);
|
|
299
|
+
return [W(t, e), W(t.reverse(), e)];
|
|
300
|
+
}
|
|
301
|
+
f(ne, "getTabbableEdges");
|
|
302
|
+
function H(e) {
|
|
303
|
+
const t = [], n = e.ownerDocument.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: /* @__PURE__ */ f((r) => {
|
|
304
|
+
const c = r.tagName === "INPUT" && r.type === "hidden";
|
|
305
|
+
return r.disabled || r.hidden || c ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
306
|
+
}, "acceptNode") });
|
|
307
|
+
for (; n.nextNode(); ) t.push(n.currentNode);
|
|
308
|
+
return t;
|
|
309
|
+
}
|
|
310
|
+
f(H, "getTabbableCandidates");
|
|
311
|
+
function W(e, t) {
|
|
312
|
+
const n = typeof t.checkVisibility == "function" && t.checkVisibility({ checkVisibilityCSS: !0 });
|
|
313
|
+
for (const r of e) if (!(n ? !r.checkVisibility({ checkVisibilityCSS: !0 }) : se(r, { upTo: t }))) return r;
|
|
314
|
+
}
|
|
315
|
+
f(W, "findVisible");
|
|
316
|
+
function se(e, { upTo: t }) {
|
|
317
|
+
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
318
|
+
for (; e; ) {
|
|
319
|
+
if (t !== void 0 && e === t) return !1;
|
|
320
|
+
if (getComputedStyle(e).display === "none") return !0;
|
|
321
|
+
e = e.parentElement;
|
|
322
|
+
}
|
|
323
|
+
return !1;
|
|
324
|
+
}
|
|
325
|
+
f(se, "isHidden");
|
|
326
|
+
function re(e) {
|
|
327
|
+
return e.tagName === "INPUT" && typeof e.select == "function";
|
|
328
|
+
}
|
|
329
|
+
f(re, "isSelectableInput");
|
|
330
|
+
function w(e, { select: t = !1 } = {}) {
|
|
331
|
+
if (e && e.focus) {
|
|
332
|
+
const n = (e.ownerDocument ?? document).activeElement;
|
|
333
|
+
e.focus({ preventScroll: !0 }), e !== n && re(e) && t && e.select();
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
f(w, "focus");
|
|
337
|
+
var q = oe();
|
|
338
|
+
function oe() {
|
|
339
|
+
let e = [];
|
|
340
|
+
return {
|
|
341
|
+
add(t) {
|
|
342
|
+
const n = e[0];
|
|
343
|
+
t !== n && n?.pause(), e = K(e, t), e.unshift(t);
|
|
344
|
+
},
|
|
345
|
+
remove(t) {
|
|
346
|
+
e = K(e, t), e[0]?.resume();
|
|
347
|
+
}
|
|
348
|
+
};
|
|
349
|
+
}
|
|
350
|
+
f(oe, "createFocusScopesStack");
|
|
351
|
+
function K(e, t) {
|
|
352
|
+
const n = [...e], r = n.indexOf(t);
|
|
353
|
+
return r !== -1 && n.splice(r, 1), n;
|
|
354
|
+
}
|
|
355
|
+
f(K, "arrayRemove");
|
|
356
|
+
function ie(e) {
|
|
357
|
+
return e.filter((t) => t.tagName !== "A");
|
|
358
|
+
}
|
|
359
|
+
f(ie, "removeLinks");
|
|
360
|
+
export {
|
|
361
|
+
Pe as a,
|
|
362
|
+
pe as i,
|
|
363
|
+
ve as n,
|
|
364
|
+
fe as o,
|
|
365
|
+
Ee as r,
|
|
366
|
+
we as t
|
|
367
|
+
};
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import { a as h, n as k } from "./dist-CK8FUUUn.js";
|
|
2
|
+
import { t as v } from "./dist-CYuWoi9I.js";
|
|
3
|
+
import { i as G, n as y, r as p, t as j } from "./dist-DbeY0Pzx.js";
|
|
4
|
+
import { n as _ } from "./dist-C0OhTLFV.js";
|
|
5
|
+
import { a as B, i as $, n as z, o as H, t as K } from "./dist-Bh7M0KDN.js";
|
|
6
|
+
import { t as U } from "./dist-BbJP2Efh.js";
|
|
7
|
+
import { t as O } from "./dist-uuWgjOcO.js";
|
|
8
|
+
import { n as V, t as Y } from "./es2015-ChhQTsb4.js";
|
|
9
|
+
import { t as Z } from "./Combination-CnMM05mt.js";
|
|
10
|
+
import * as i from "react";
|
|
11
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
12
|
+
var q = Object.defineProperty, u = (l, o) => q(l, "name", {
|
|
13
|
+
value: o,
|
|
14
|
+
configurable: !0
|
|
15
|
+
}), b = "Dialog", [I, pe] = G(b), [J, d] = I(b), De = /* @__PURE__ */ u((l) => {
|
|
16
|
+
const { __scopeDialog: o, children: r, open: n, defaultOpen: a, onOpenChange: t, modal: e = !0 } = l, s = i.useRef(null), g = i.useRef(null), { nodes: C, registry: f } = $(), [S, R] = j({
|
|
17
|
+
prop: n,
|
|
18
|
+
defaultProp: a ?? !1,
|
|
19
|
+
onChange: t,
|
|
20
|
+
caller: b
|
|
21
|
+
}), [F, T] = i.useState(0), [w, N] = i.useState(0);
|
|
22
|
+
return /* @__PURE__ */ c(J, {
|
|
23
|
+
scope: o,
|
|
24
|
+
triggerRef: s,
|
|
25
|
+
contentRef: g,
|
|
26
|
+
contentId: _(),
|
|
27
|
+
titleId: _(),
|
|
28
|
+
descriptionId: _(),
|
|
29
|
+
titlePresent: F > 0,
|
|
30
|
+
descriptionPresent: w > 0,
|
|
31
|
+
setTitleCount: T,
|
|
32
|
+
setDescriptionCount: N,
|
|
33
|
+
open: S,
|
|
34
|
+
onOpenChange: R,
|
|
35
|
+
onOpenToggle: i.useCallback(() => R((L) => !L), [R]),
|
|
36
|
+
modal: e,
|
|
37
|
+
branchNodes: C,
|
|
38
|
+
branchRegistry: f,
|
|
39
|
+
children: r
|
|
40
|
+
});
|
|
41
|
+
}, "Dialog"), Q = "DialogTrigger", ve = /* @__PURE__ */ i.forwardRef(/* @__PURE__ */ u(function(o, r) {
|
|
42
|
+
const { __scopeDialog: n, ...a } = o, t = d(Q, n), e = h(r, t.triggerRef);
|
|
43
|
+
return /* @__PURE__ */ c(v.button, {
|
|
44
|
+
type: "button",
|
|
45
|
+
"aria-haspopup": "dialog",
|
|
46
|
+
"aria-expanded": t.open,
|
|
47
|
+
"aria-controls": t.open ? t.contentId : void 0,
|
|
48
|
+
"data-state": m(t.open),
|
|
49
|
+
...a,
|
|
50
|
+
ref: e,
|
|
51
|
+
onClick: p(o.onClick, t.onOpenToggle)
|
|
52
|
+
});
|
|
53
|
+
}, "DialogTrigger")), x = "DialogPortal", [W, A] = I(x, { forceMount: void 0 }), me = /* @__PURE__ */ u((l) => {
|
|
54
|
+
const { __scopeDialog: o, forceMount: r, children: n, container: a } = l, t = d(x, o);
|
|
55
|
+
return /* @__PURE__ */ c(W, {
|
|
56
|
+
scope: o,
|
|
57
|
+
forceMount: r,
|
|
58
|
+
children: i.Children.map(n, (e) => /* @__PURE__ */ c(O, {
|
|
59
|
+
present: r || t.open,
|
|
60
|
+
children: /* @__PURE__ */ c(U, {
|
|
61
|
+
asChild: !0,
|
|
62
|
+
container: a,
|
|
63
|
+
children: e
|
|
64
|
+
})
|
|
65
|
+
}))
|
|
66
|
+
});
|
|
67
|
+
}, "DialogPortal"), P = "DialogOverlay", Ce = /* @__PURE__ */ i.forwardRef(/* @__PURE__ */ u(function(o, r) {
|
|
68
|
+
const n = A(P, o.__scopeDialog), { forceMount: a = n.forceMount, ...t } = o, e = d(P, o.__scopeDialog);
|
|
69
|
+
return e.modal ? /* @__PURE__ */ c(O, {
|
|
70
|
+
present: a || e.open,
|
|
71
|
+
children: /* @__PURE__ */ c(ee, {
|
|
72
|
+
...t,
|
|
73
|
+
ref: r
|
|
74
|
+
})
|
|
75
|
+
}) : null;
|
|
76
|
+
}, "DialogOverlay")), X = k("DialogOverlay.RemoveScroll"), ee = /* @__PURE__ */ i.forwardRef(/* @__PURE__ */ u(function(o, r) {
|
|
77
|
+
const { __scopeDialog: n, ...a } = o, t = d(P, n), e = H(), s = h(r, e);
|
|
78
|
+
return /* @__PURE__ */ c(Z, {
|
|
79
|
+
as: X,
|
|
80
|
+
allowPinchZoom: !0,
|
|
81
|
+
shards: i.useMemo(() => [t.contentRef, ...t.branchNodes.map((g) => ({ current: g }))], [t.contentRef, t.branchNodes]),
|
|
82
|
+
children: /* @__PURE__ */ c(v.div, {
|
|
83
|
+
"data-state": m(t.open),
|
|
84
|
+
...a,
|
|
85
|
+
ref: s,
|
|
86
|
+
style: {
|
|
87
|
+
pointerEvents: "auto",
|
|
88
|
+
...a.style
|
|
89
|
+
}
|
|
90
|
+
})
|
|
91
|
+
});
|
|
92
|
+
}, "DialogOverlayImpl")), D = "DialogContent", Re = /* @__PURE__ */ i.forwardRef(/* @__PURE__ */ u(function(o, r) {
|
|
93
|
+
const n = A(D, o.__scopeDialog), { forceMount: a = n.forceMount, ...t } = o, e = d(D, o.__scopeDialog);
|
|
94
|
+
return /* @__PURE__ */ c(O, {
|
|
95
|
+
present: a || e.open,
|
|
96
|
+
children: e.modal ? /* @__PURE__ */ c(oe, {
|
|
97
|
+
...t,
|
|
98
|
+
ref: r
|
|
99
|
+
}) : /* @__PURE__ */ c(te, {
|
|
100
|
+
...t,
|
|
101
|
+
ref: r
|
|
102
|
+
})
|
|
103
|
+
});
|
|
104
|
+
}, "DialogContent")), oe = /* @__PURE__ */ i.forwardRef(/* @__PURE__ */ u(function(o, r) {
|
|
105
|
+
const n = d(D, o.__scopeDialog), a = i.useRef(null), t = h(r, n.contentRef, a);
|
|
106
|
+
return i.useEffect(() => {
|
|
107
|
+
const e = a.current;
|
|
108
|
+
if (e) return Y(e);
|
|
109
|
+
}, []), /* @__PURE__ */ c(E, {
|
|
110
|
+
...o,
|
|
111
|
+
ref: t,
|
|
112
|
+
trapFocus: n.open,
|
|
113
|
+
disableOutsidePointerEvents: n.open,
|
|
114
|
+
onCloseAutoFocus: p(o.onCloseAutoFocus, (e) => {
|
|
115
|
+
e.preventDefault(), n.triggerRef.current?.focus();
|
|
116
|
+
}),
|
|
117
|
+
onPointerDownOutside: p(o.onPointerDownOutside, (e) => {
|
|
118
|
+
const s = e.detail.originalEvent, g = s.button === 0 && s.ctrlKey === !0;
|
|
119
|
+
(s.button === 2 || g) && e.preventDefault();
|
|
120
|
+
}),
|
|
121
|
+
onFocusOutside: p(o.onFocusOutside, (e) => e.preventDefault())
|
|
122
|
+
});
|
|
123
|
+
}, "DialogContentModal")), te = /* @__PURE__ */ i.forwardRef(/* @__PURE__ */ u(function(o, r) {
|
|
124
|
+
const n = d(D, o.__scopeDialog), a = i.useRef(!1), t = i.useRef(!1);
|
|
125
|
+
return /* @__PURE__ */ c(E, {
|
|
126
|
+
...o,
|
|
127
|
+
ref: r,
|
|
128
|
+
trapFocus: !1,
|
|
129
|
+
disableOutsidePointerEvents: !1,
|
|
130
|
+
onCloseAutoFocus: (e) => {
|
|
131
|
+
o.onCloseAutoFocus?.(e), e.defaultPrevented || (a.current || n.triggerRef.current?.focus(), e.preventDefault()), a.current = !1, t.current = !1;
|
|
132
|
+
},
|
|
133
|
+
onInteractOutside: (e) => {
|
|
134
|
+
o.onInteractOutside?.(e), e.defaultPrevented || (a.current = !0, e.detail.originalEvent.type === "pointerdown" && (t.current = !0));
|
|
135
|
+
const s = e.target;
|
|
136
|
+
n.triggerRef.current?.contains(s) && e.preventDefault(), e.detail.originalEvent.type === "focusin" && t.current && e.preventDefault();
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
}, "DialogContentNonModal")), E = /* @__PURE__ */ i.forwardRef(/* @__PURE__ */ u(function(o, r) {
|
|
140
|
+
const { __scopeDialog: n, trapFocus: a, onOpenAutoFocus: t, onCloseAutoFocus: e, "aria-describedby": s, children: g, ...C } = o, f = d(D, n);
|
|
141
|
+
return V(), /* @__PURE__ */ c(z, {
|
|
142
|
+
registry: f.branchRegistry,
|
|
143
|
+
children: /* @__PURE__ */ c(K, {
|
|
144
|
+
asChild: !0,
|
|
145
|
+
loop: !0,
|
|
146
|
+
trapped: a,
|
|
147
|
+
branches: f.branchNodes,
|
|
148
|
+
onMountAutoFocus: t,
|
|
149
|
+
onUnmountAutoFocus: e,
|
|
150
|
+
children: /* @__PURE__ */ c(B, {
|
|
151
|
+
role: "dialog",
|
|
152
|
+
id: f.contentId,
|
|
153
|
+
"aria-labelledby": f.titlePresent ? f.titleId : void 0,
|
|
154
|
+
"aria-describedby": f.descriptionPresent ? M(s, f.descriptionId) : s,
|
|
155
|
+
"data-state": m(f.open),
|
|
156
|
+
...C,
|
|
157
|
+
ref: r,
|
|
158
|
+
deferPointerDownOutside: !0,
|
|
159
|
+
onDismiss: () => f.onOpenChange(!1),
|
|
160
|
+
children: g
|
|
161
|
+
})
|
|
162
|
+
})
|
|
163
|
+
});
|
|
164
|
+
}, "DialogContentImpl")), _e = /* @__PURE__ */ i.forwardRef(/* @__PURE__ */ u(function(o, r) {
|
|
165
|
+
const { __scopeDialog: n, ...a } = o, t = d("DialogTitle", n), { setTitleCount: e } = t;
|
|
166
|
+
return y(() => (e((s) => s + 1), () => e((s) => s - 1)), [e]), /* @__PURE__ */ c(v.h2, {
|
|
167
|
+
id: t.titleId,
|
|
168
|
+
...a,
|
|
169
|
+
ref: r
|
|
170
|
+
});
|
|
171
|
+
}, "DialogTitle")), Pe = /* @__PURE__ */ i.forwardRef(/* @__PURE__ */ u(function(o, r) {
|
|
172
|
+
const { __scopeDialog: n, ...a } = o, t = d("DialogDescription", n), { setDescriptionCount: e } = t;
|
|
173
|
+
return y(() => (e((s) => s + 1), () => e((s) => s - 1)), [e]), /* @__PURE__ */ c(v.p, {
|
|
174
|
+
id: t.descriptionId,
|
|
175
|
+
...a,
|
|
176
|
+
ref: r
|
|
177
|
+
});
|
|
178
|
+
}, "DialogDescription")), ne = "DialogClose", he = /* @__PURE__ */ i.forwardRef(/* @__PURE__ */ u(function(o, r) {
|
|
179
|
+
const { __scopeDialog: n, ...a } = o, t = d(ne, n);
|
|
180
|
+
return /* @__PURE__ */ c(v.button, {
|
|
181
|
+
type: "button",
|
|
182
|
+
...a,
|
|
183
|
+
ref: r,
|
|
184
|
+
onClick: p(o.onClick, () => t.onOpenChange(!1))
|
|
185
|
+
});
|
|
186
|
+
}, "DialogClose"));
|
|
187
|
+
function M(...l) {
|
|
188
|
+
const o = /* @__PURE__ */ new Set();
|
|
189
|
+
for (const r of l)
|
|
190
|
+
if (typeof r == "string")
|
|
191
|
+
for (const n of String(r).trim().split(/\s+/)) n && o.add(n);
|
|
192
|
+
return o.size > 0 ? Array.from(o).join(" ") : void 0;
|
|
193
|
+
}
|
|
194
|
+
u(M, "concatAriaDescribedby");
|
|
195
|
+
function m(l) {
|
|
196
|
+
return l ? "open" : "closed";
|
|
197
|
+
}
|
|
198
|
+
u(m, "getState");
|
|
199
|
+
export {
|
|
200
|
+
Ce as a,
|
|
201
|
+
ve as c,
|
|
202
|
+
Pe as i,
|
|
203
|
+
pe as l,
|
|
204
|
+
he as n,
|
|
205
|
+
me as o,
|
|
206
|
+
Re as r,
|
|
207
|
+
_e as s,
|
|
208
|
+
De as t
|
|
209
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { n as a } from "./dist-DbeY0Pzx.js";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
var f = Object.defineProperty, s = (e, r) => f(e, "name", {
|
|
4
|
+
value: r,
|
|
5
|
+
configurable: !0
|
|
6
|
+
}), c = t[" useId ".trim().toString()] || (() => {
|
|
7
|
+
}), i = 0;
|
|
8
|
+
function m(e) {
|
|
9
|
+
const [r, n] = t.useState(c());
|
|
10
|
+
return a(() => {
|
|
11
|
+
e || n((o) => o ?? String(i++));
|
|
12
|
+
}, [e]), e || (r ? `radix-${r}` : "");
|
|
13
|
+
}
|
|
14
|
+
s(m, "useId");
|
|
15
|
+
var d = Object.defineProperty, p = (e, r) => d(e, "name", {
|
|
16
|
+
value: r,
|
|
17
|
+
configurable: !0
|
|
18
|
+
}), u = t[" useInsertionEffect ".trim().toString()];
|
|
19
|
+
function v(e) {
|
|
20
|
+
const r = t.useRef(e);
|
|
21
|
+
return typeof u == "function" ? u(() => {
|
|
22
|
+
r.current = e;
|
|
23
|
+
}) : a(() => {
|
|
24
|
+
r.current = e;
|
|
25
|
+
}), t.useMemo(() => ((...n) => r.current?.(...n)), []);
|
|
26
|
+
}
|
|
27
|
+
p(v, "useCallbackRef");
|
|
28
|
+
export {
|
|
29
|
+
m as n,
|
|
30
|
+
v as t
|
|
31
|
+
};
|