@konstructio/ui 0.1.2-alpha.112 → 0.1.2-alpha.114
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/Breadcrumb-CpXRb08J.js +93 -0
- 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/Breadcrumb.js +1 -1
- 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/Radio/Radio.js +16 -16
- package/dist/components/Radio/Radio.variants.js +4 -1
- 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 +181 -155
- 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/Breadcrumb-CHi5-wVa.js +0 -81
- 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,365 @@
|
|
|
1
|
+
import { a as k, r as J } from "./dist-CK8FUUUn.js";
|
|
2
|
+
import { t as Q } from "./dist-CYuWoi9I.js";
|
|
3
|
+
import { t as W } from "./dist-C_jtUTU9.js";
|
|
4
|
+
import { i as Z, n as ee, r as w, t as te } from "./dist-DbeY0Pzx.js";
|
|
5
|
+
import { n as oe } from "./dist-C0OhTLFV.js";
|
|
6
|
+
import { a as re, r as ne } from "./dist-Bh7M0KDN.js";
|
|
7
|
+
import { t as se } from "./dist-BbJP2Efh.js";
|
|
8
|
+
import { t as F } from "./dist-uuWgjOcO.js";
|
|
9
|
+
import { a as G, i as ie, n as ae, r as ce, t as le } from "./dist-1AtWkIZ4.js";
|
|
10
|
+
import * as s from "react";
|
|
11
|
+
import { jsx as m, jsxs as ue } from "react/jsx-runtime";
|
|
12
|
+
var pe = Object.defineProperty, d = (r, e) => pe(r, "name", {
|
|
13
|
+
value: e,
|
|
14
|
+
configurable: !0
|
|
15
|
+
}), [S, Ae] = Z("Tooltip", [G]), _ = G(), de = "TooltipProvider", fe = 700, A = "tooltip.open", [ve, M] = S(de), Ie = /* @__PURE__ */ d((r) => {
|
|
16
|
+
const { __scopeTooltip: e, delayDuration: t = fe, skipDelayDuration: o = 300, disableHoverableContent: i = !1, children: a } = r, n = s.useRef(!0), v = s.useRef(!1), l = s.useRef(0);
|
|
17
|
+
return s.useEffect(() => {
|
|
18
|
+
const u = l.current;
|
|
19
|
+
return () => window.clearTimeout(u);
|
|
20
|
+
}, []), /* @__PURE__ */ m(ve, {
|
|
21
|
+
scope: e,
|
|
22
|
+
isOpenDelayedRef: n,
|
|
23
|
+
delayDuration: t,
|
|
24
|
+
onOpen: s.useCallback(() => {
|
|
25
|
+
o <= 0 || (window.clearTimeout(l.current), n.current = !1);
|
|
26
|
+
}, [o]),
|
|
27
|
+
onClose: s.useCallback(() => {
|
|
28
|
+
o <= 0 || (window.clearTimeout(l.current), l.current = window.setTimeout(() => n.current = !0, o));
|
|
29
|
+
}, [o]),
|
|
30
|
+
isPointerInTransitRef: v,
|
|
31
|
+
onPointerInTransitChange: s.useCallback((u) => {
|
|
32
|
+
v.current = u;
|
|
33
|
+
}, []),
|
|
34
|
+
disableHoverableContent: i,
|
|
35
|
+
children: a
|
|
36
|
+
});
|
|
37
|
+
}, "TooltipProvider"), I = "Tooltip", [he, R] = S(I), ke = /* @__PURE__ */ d((r) => {
|
|
38
|
+
const { __scopeTooltip: e, children: t, open: o, defaultOpen: i, onOpenChange: a, disableHoverableContent: n, delayDuration: v } = r, l = M(I, r.__scopeTooltip), u = _(e), [f, h] = s.useState(null), [p, C] = s.useState(void 0), x = oe(), c = s.useRef(0), T = n ?? l.disableHoverableContent, g = v ?? l.delayDuration, y = s.useRef(!1), [P, b] = te({
|
|
39
|
+
prop: o,
|
|
40
|
+
defaultProp: i ?? !1,
|
|
41
|
+
onChange: /* @__PURE__ */ d((N) => {
|
|
42
|
+
N ? (l.onOpen(), document.dispatchEvent(new CustomEvent(A))) : l.onClose(), a?.(N);
|
|
43
|
+
}, "onChange"),
|
|
44
|
+
caller: I
|
|
45
|
+
}), D = s.useMemo(() => P ? y.current ? "delayed-open" : "instant-open" : "closed", [P]), L = s.useCallback(() => {
|
|
46
|
+
window.clearTimeout(c.current), c.current = 0, y.current = !1, b(!0);
|
|
47
|
+
}, [b]), O = s.useCallback(() => {
|
|
48
|
+
window.clearTimeout(c.current), c.current = 0, b(!1);
|
|
49
|
+
}, [b]), H = s.useCallback(() => {
|
|
50
|
+
window.clearTimeout(c.current), c.current = window.setTimeout(() => {
|
|
51
|
+
y.current = !0, b(!0), c.current = 0;
|
|
52
|
+
}, g);
|
|
53
|
+
}, [g, b]);
|
|
54
|
+
return s.useEffect(() => () => {
|
|
55
|
+
c.current && (window.clearTimeout(c.current), c.current = 0);
|
|
56
|
+
}, []), /* @__PURE__ */ m(le, {
|
|
57
|
+
...u,
|
|
58
|
+
children: /* @__PURE__ */ m(he, {
|
|
59
|
+
scope: e,
|
|
60
|
+
contentId: p ?? x,
|
|
61
|
+
setContentId: C,
|
|
62
|
+
open: P,
|
|
63
|
+
stateAttribute: D,
|
|
64
|
+
trigger: f,
|
|
65
|
+
onTriggerChange: h,
|
|
66
|
+
onTriggerEnter: s.useCallback(() => {
|
|
67
|
+
l.isOpenDelayedRef.current ? H() : L();
|
|
68
|
+
}, [
|
|
69
|
+
l.isOpenDelayedRef,
|
|
70
|
+
H,
|
|
71
|
+
L
|
|
72
|
+
]),
|
|
73
|
+
onTriggerLeave: s.useCallback(() => {
|
|
74
|
+
T ? O() : (window.clearTimeout(c.current), c.current = 0);
|
|
75
|
+
}, [O, T]),
|
|
76
|
+
onOpen: L,
|
|
77
|
+
onClose: O,
|
|
78
|
+
disableHoverableContent: T,
|
|
79
|
+
children: t
|
|
80
|
+
})
|
|
81
|
+
});
|
|
82
|
+
}, "Tooltip"), j = "TooltipTrigger", Se = /* @__PURE__ */ s.forwardRef(/* @__PURE__ */ d(function(e, t) {
|
|
83
|
+
const { __scopeTooltip: o, "aria-describedby": i, ...a } = e, n = R(j, o), v = M(j, o), l = _(o), u = s.useRef(null), f = k(t, u, n.onTriggerChange), h = s.useRef(!1), p = s.useRef(!1), C = s.useCallback(() => h.current = !1, []);
|
|
84
|
+
return s.useEffect(() => () => document.removeEventListener("pointerup", C), [C]), /* @__PURE__ */ m(ae, {
|
|
85
|
+
asChild: !0,
|
|
86
|
+
...l,
|
|
87
|
+
children: /* @__PURE__ */ m(Q.button, {
|
|
88
|
+
"aria-describedby": n.open ? K(i, n.contentId) : i,
|
|
89
|
+
"data-state": n.stateAttribute,
|
|
90
|
+
...a,
|
|
91
|
+
ref: f,
|
|
92
|
+
onPointerMove: w(e.onPointerMove, (x) => {
|
|
93
|
+
x.pointerType !== "touch" && !p.current && !v.isPointerInTransitRef.current && (n.onTriggerEnter(), p.current = !0);
|
|
94
|
+
}),
|
|
95
|
+
onPointerLeave: w(e.onPointerLeave, () => {
|
|
96
|
+
n.onTriggerLeave(), p.current = !1;
|
|
97
|
+
}),
|
|
98
|
+
onPointerDown: w(e.onPointerDown, () => {
|
|
99
|
+
n.open && n.onClose(), h.current = !0, document.addEventListener("pointerup", C, { once: !0 });
|
|
100
|
+
}),
|
|
101
|
+
onFocus: w(e.onFocus, () => {
|
|
102
|
+
h.current || n.onOpen();
|
|
103
|
+
}),
|
|
104
|
+
onBlur: w(e.onBlur, n.onClose),
|
|
105
|
+
onClick: w(e.onClick, n.onClose)
|
|
106
|
+
})
|
|
107
|
+
});
|
|
108
|
+
}, "TooltipTrigger")), B = "TooltipPortal", [Te, ge] = S(B, { forceMount: void 0 }), Me = /* @__PURE__ */ d((r) => {
|
|
109
|
+
const { __scopeTooltip: e, forceMount: t, children: o, container: i } = r, a = R(B, e);
|
|
110
|
+
return /* @__PURE__ */ m(Te, {
|
|
111
|
+
scope: e,
|
|
112
|
+
forceMount: t,
|
|
113
|
+
children: /* @__PURE__ */ m(F, {
|
|
114
|
+
present: t || a.open,
|
|
115
|
+
children: /* @__PURE__ */ m(se, {
|
|
116
|
+
asChild: !0,
|
|
117
|
+
container: i,
|
|
118
|
+
children: o
|
|
119
|
+
})
|
|
120
|
+
})
|
|
121
|
+
});
|
|
122
|
+
}, "TooltipPortal"), E = "TooltipContent", He = /* @__PURE__ */ s.forwardRef(/* @__PURE__ */ d(function(e, t) {
|
|
123
|
+
const o = ge(E, e.__scopeTooltip), { forceMount: i = o.forceMount, side: a = "top", ...n } = e, v = R(E, e.__scopeTooltip);
|
|
124
|
+
return /* @__PURE__ */ m(F, {
|
|
125
|
+
present: i || v.open,
|
|
126
|
+
children: v.disableHoverableContent ? /* @__PURE__ */ m(U, {
|
|
127
|
+
side: a,
|
|
128
|
+
...n,
|
|
129
|
+
ref: t
|
|
130
|
+
}) : /* @__PURE__ */ m(me, {
|
|
131
|
+
side: a,
|
|
132
|
+
...n,
|
|
133
|
+
ref: t
|
|
134
|
+
})
|
|
135
|
+
});
|
|
136
|
+
}, "TooltipContent")), me = /* @__PURE__ */ s.forwardRef(/* @__PURE__ */ d(function(e, t) {
|
|
137
|
+
const o = R(E, e.__scopeTooltip), i = M(E, e.__scopeTooltip), a = s.useRef(null), n = k(t, a), [v, l] = s.useState(null), { trigger: u, onClose: f } = o, h = a.current, { onPointerInTransitChange: p } = i, C = s.useCallback(() => {
|
|
138
|
+
l(null), p(!1);
|
|
139
|
+
}, [p]), x = s.useCallback((c, T) => {
|
|
140
|
+
const g = c.currentTarget, y = {
|
|
141
|
+
x: c.clientX,
|
|
142
|
+
y: c.clientY
|
|
143
|
+
}, P = q(y, Y(y, g.getBoundingClientRect())), b = V(T.getBoundingClientRect()), D = $([...P, ...b]);
|
|
144
|
+
l(D), p(!0);
|
|
145
|
+
}, [p]);
|
|
146
|
+
return s.useEffect(() => () => C(), [C]), s.useEffect(() => {
|
|
147
|
+
if (u && h) {
|
|
148
|
+
const c = /* @__PURE__ */ d((g) => x(g, h), "handleTriggerLeave"), T = /* @__PURE__ */ d((g) => x(g, u), "handleContentLeave");
|
|
149
|
+
return u.addEventListener("pointerleave", c), h.addEventListener("pointerleave", T), () => {
|
|
150
|
+
u.removeEventListener("pointerleave", c), h.removeEventListener("pointerleave", T);
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
}, [
|
|
154
|
+
u,
|
|
155
|
+
h,
|
|
156
|
+
x,
|
|
157
|
+
C
|
|
158
|
+
]), s.useEffect(() => {
|
|
159
|
+
if (v) {
|
|
160
|
+
const c = /* @__PURE__ */ d((T) => {
|
|
161
|
+
const g = T.target, y = {
|
|
162
|
+
x: T.clientX,
|
|
163
|
+
y: T.clientY
|
|
164
|
+
}, P = u?.contains(g) || h?.contains(g), b = !X(y, v);
|
|
165
|
+
P ? C() : b && (C(), f());
|
|
166
|
+
}, "handleTrackPointerGrace");
|
|
167
|
+
return document.addEventListener("pointermove", c), () => document.removeEventListener("pointermove", c);
|
|
168
|
+
}
|
|
169
|
+
}, [
|
|
170
|
+
u,
|
|
171
|
+
h,
|
|
172
|
+
v,
|
|
173
|
+
f,
|
|
174
|
+
C
|
|
175
|
+
]), /* @__PURE__ */ m(U, {
|
|
176
|
+
...e,
|
|
177
|
+
ref: n
|
|
178
|
+
});
|
|
179
|
+
}, "TooltipContentHoverable")), Ce = J("TooltipContent"), U = /* @__PURE__ */ s.forwardRef(/* @__PURE__ */ d(function(e, t) {
|
|
180
|
+
const { __scopeTooltip: o, children: i, "aria-label": a, id: n, onEscapeKeyDown: v, onPointerDownOutside: l, ...u } = e, f = R(E, o), h = _(o), { onClose: p } = f, [C, x] = s.useState(null), c = k(t, x);
|
|
181
|
+
ne(C), s.useEffect(() => (document.addEventListener(A, p), () => document.removeEventListener(A, p)), [p]), s.useEffect(() => {
|
|
182
|
+
if (f.trigger) {
|
|
183
|
+
const g = /* @__PURE__ */ d((y) => {
|
|
184
|
+
y.target instanceof Node && y.target.contains(f.trigger) && p();
|
|
185
|
+
}, "handleScroll");
|
|
186
|
+
return window.addEventListener("scroll", g, { capture: !0 }), () => window.removeEventListener("scroll", g, { capture: !0 });
|
|
187
|
+
}
|
|
188
|
+
}, [f.trigger, p]);
|
|
189
|
+
const { setContentId: T } = f;
|
|
190
|
+
return ee(() => (T(n), () => {
|
|
191
|
+
T(void 0);
|
|
192
|
+
}), [n, T]), /* @__PURE__ */ m(re, {
|
|
193
|
+
asChild: !0,
|
|
194
|
+
disableOutsidePointerEvents: !1,
|
|
195
|
+
onEscapeKeyDown: v,
|
|
196
|
+
onPointerDownOutside: l,
|
|
197
|
+
onFocusOutside: (g) => g.preventDefault(),
|
|
198
|
+
onDismiss: p,
|
|
199
|
+
children: /* @__PURE__ */ ue(ie, {
|
|
200
|
+
"data-state": f.stateAttribute,
|
|
201
|
+
role: a ? void 0 : "tooltip",
|
|
202
|
+
id: a ? void 0 : f.contentId,
|
|
203
|
+
...h,
|
|
204
|
+
...u,
|
|
205
|
+
ref: c,
|
|
206
|
+
style: {
|
|
207
|
+
...u.style,
|
|
208
|
+
"--radix-tooltip-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
209
|
+
"--radix-tooltip-content-available-width": "var(--radix-popper-available-width)",
|
|
210
|
+
"--radix-tooltip-content-available-height": "var(--radix-popper-available-height)",
|
|
211
|
+
"--radix-tooltip-trigger-width": "var(--radix-popper-anchor-width)",
|
|
212
|
+
"--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
|
|
213
|
+
},
|
|
214
|
+
children: [/* @__PURE__ */ m(Ce, { children: i }), a ? /* @__PURE__ */ m(W, {
|
|
215
|
+
id: f.contentId,
|
|
216
|
+
role: "tooltip",
|
|
217
|
+
children: a
|
|
218
|
+
}) : null]
|
|
219
|
+
})
|
|
220
|
+
});
|
|
221
|
+
}, "TooltipContentImpl")), Ne = /* @__PURE__ */ s.forwardRef(/* @__PURE__ */ d(function(e, t) {
|
|
222
|
+
const { __scopeTooltip: o, ...i } = e, a = _(o);
|
|
223
|
+
return /* @__PURE__ */ m(ce, {
|
|
224
|
+
...a,
|
|
225
|
+
...i,
|
|
226
|
+
ref: t
|
|
227
|
+
});
|
|
228
|
+
}, "TooltipArrow"));
|
|
229
|
+
function Y(r, e) {
|
|
230
|
+
const t = Math.abs(e.top - r.y), o = Math.abs(e.bottom - r.y), i = Math.abs(e.right - r.x), a = Math.abs(e.left - r.x);
|
|
231
|
+
switch (Math.min(t, o, i, a)) {
|
|
232
|
+
case a:
|
|
233
|
+
return "left";
|
|
234
|
+
case i:
|
|
235
|
+
return "right";
|
|
236
|
+
case t:
|
|
237
|
+
return "top";
|
|
238
|
+
case o:
|
|
239
|
+
return "bottom";
|
|
240
|
+
default:
|
|
241
|
+
throw new Error("unreachable");
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
d(Y, "getExitSideFromRect");
|
|
245
|
+
function q(r, e, t = 5) {
|
|
246
|
+
const o = [];
|
|
247
|
+
switch (e) {
|
|
248
|
+
case "top":
|
|
249
|
+
o.push({
|
|
250
|
+
x: r.x - t,
|
|
251
|
+
y: r.y + t
|
|
252
|
+
}, {
|
|
253
|
+
x: r.x + t,
|
|
254
|
+
y: r.y + t
|
|
255
|
+
});
|
|
256
|
+
break;
|
|
257
|
+
case "bottom":
|
|
258
|
+
o.push({
|
|
259
|
+
x: r.x - t,
|
|
260
|
+
y: r.y - t
|
|
261
|
+
}, {
|
|
262
|
+
x: r.x + t,
|
|
263
|
+
y: r.y - t
|
|
264
|
+
});
|
|
265
|
+
break;
|
|
266
|
+
case "left":
|
|
267
|
+
o.push({
|
|
268
|
+
x: r.x + t,
|
|
269
|
+
y: r.y - t
|
|
270
|
+
}, {
|
|
271
|
+
x: r.x + t,
|
|
272
|
+
y: r.y + t
|
|
273
|
+
});
|
|
274
|
+
break;
|
|
275
|
+
case "right":
|
|
276
|
+
o.push({
|
|
277
|
+
x: r.x - t,
|
|
278
|
+
y: r.y - t
|
|
279
|
+
}, {
|
|
280
|
+
x: r.x - t,
|
|
281
|
+
y: r.y + t
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
return o;
|
|
285
|
+
}
|
|
286
|
+
d(q, "getPaddedExitPoints");
|
|
287
|
+
function V(r) {
|
|
288
|
+
const { top: e, right: t, bottom: o, left: i } = r;
|
|
289
|
+
return [
|
|
290
|
+
{
|
|
291
|
+
x: i,
|
|
292
|
+
y: e
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
x: t,
|
|
296
|
+
y: e
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
x: t,
|
|
300
|
+
y: o
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
x: i,
|
|
304
|
+
y: o
|
|
305
|
+
}
|
|
306
|
+
];
|
|
307
|
+
}
|
|
308
|
+
d(V, "getPointsFromRect");
|
|
309
|
+
function X(r, e) {
|
|
310
|
+
const { x: t, y: o } = r;
|
|
311
|
+
let i = !1;
|
|
312
|
+
for (let a = 0, n = e.length - 1; a < e.length; n = a++) {
|
|
313
|
+
const v = e[a], l = e[n], u = v.x, f = v.y, h = l.x, p = l.y;
|
|
314
|
+
f > o != p > o && t < (h - u) * (o - f) / (p - f) + u && (i = !i);
|
|
315
|
+
}
|
|
316
|
+
return i;
|
|
317
|
+
}
|
|
318
|
+
d(X, "isPointInPolygon");
|
|
319
|
+
function $(r) {
|
|
320
|
+
const e = r.slice();
|
|
321
|
+
return e.sort((t, o) => t.x < o.x ? -1 : t.x > o.x ? 1 : t.y < o.y ? -1 : t.y > o.y ? 1 : 0), z(e);
|
|
322
|
+
}
|
|
323
|
+
d($, "getHull");
|
|
324
|
+
function z(r) {
|
|
325
|
+
if (r.length <= 1) return r.slice();
|
|
326
|
+
const e = [];
|
|
327
|
+
for (let o = 0; o < r.length; o++) {
|
|
328
|
+
const i = r[o];
|
|
329
|
+
for (; e.length >= 2; ) {
|
|
330
|
+
const a = e[e.length - 1], n = e[e.length - 2];
|
|
331
|
+
if ((a.x - n.x) * (i.y - n.y) >= (a.y - n.y) * (i.x - n.x)) e.pop();
|
|
332
|
+
else break;
|
|
333
|
+
}
|
|
334
|
+
e.push(i);
|
|
335
|
+
}
|
|
336
|
+
e.pop();
|
|
337
|
+
const t = [];
|
|
338
|
+
for (let o = r.length - 1; o >= 0; o--) {
|
|
339
|
+
const i = r[o];
|
|
340
|
+
for (; t.length >= 2; ) {
|
|
341
|
+
const a = t[t.length - 1], n = t[t.length - 2];
|
|
342
|
+
if ((a.x - n.x) * (i.y - n.y) >= (a.y - n.y) * (i.x - n.x)) t.pop();
|
|
343
|
+
else break;
|
|
344
|
+
}
|
|
345
|
+
t.push(i);
|
|
346
|
+
}
|
|
347
|
+
return t.pop(), e.length === 1 && t.length === 1 && e[0].x === t[0].x && e[0].y === t[0].y ? e : e.concat(t);
|
|
348
|
+
}
|
|
349
|
+
d(z, "getHullPresorted");
|
|
350
|
+
function K(...r) {
|
|
351
|
+
const e = /* @__PURE__ */ new Set();
|
|
352
|
+
for (const t of r)
|
|
353
|
+
if (typeof t == "string")
|
|
354
|
+
for (const o of String(t).trim().split(/\s+/)) o && e.add(o);
|
|
355
|
+
return e.size > 0 ? Array.from(e).join(" ") : void 0;
|
|
356
|
+
}
|
|
357
|
+
d(K, "concatAriaDescribedby");
|
|
358
|
+
export {
|
|
359
|
+
Ie as a,
|
|
360
|
+
Me as i,
|
|
361
|
+
Ne as n,
|
|
362
|
+
Se as o,
|
|
363
|
+
He as r,
|
|
364
|
+
ke as t
|
|
365
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import * as C from "react";
|
|
2
|
+
var P = Object.defineProperty, m = (e, a) => P(e, "name", {
|
|
3
|
+
value: a,
|
|
4
|
+
configurable: !0
|
|
5
|
+
}), l = 0, o = null;
|
|
6
|
+
function S(e) {
|
|
7
|
+
return G(), e.children;
|
|
8
|
+
}
|
|
9
|
+
m(S, "FocusGuards");
|
|
10
|
+
function G() {
|
|
11
|
+
C.useEffect(() => {
|
|
12
|
+
o || (o = {
|
|
13
|
+
start: y(),
|
|
14
|
+
end: y()
|
|
15
|
+
});
|
|
16
|
+
const { start: e, end: a } = o;
|
|
17
|
+
return document.body.firstElementChild !== e && document.body.insertAdjacentElement("afterbegin", e), document.body.lastElementChild !== a && document.body.insertAdjacentElement("beforeend", a), l++, () => {
|
|
18
|
+
l === 1 && (o?.start.remove(), o?.end.remove(), o = null), l = Math.max(0, l - 1);
|
|
19
|
+
};
|
|
20
|
+
}, []);
|
|
21
|
+
}
|
|
22
|
+
m(G, "useFocusGuards");
|
|
23
|
+
function y() {
|
|
24
|
+
const e = document.createElement("span");
|
|
25
|
+
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
|
|
26
|
+
}
|
|
27
|
+
m(y, "createFocusGuard");
|
|
28
|
+
var _ = function(e) {
|
|
29
|
+
return typeof document > "u" ? null : (Array.isArray(e) ? e[0] : e).ownerDocument.body;
|
|
30
|
+
}, s = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), p = {}, h = 0, W = function(e) {
|
|
31
|
+
return e && (e.host || W(e.parentNode));
|
|
32
|
+
}, j = function(e, a) {
|
|
33
|
+
return a.map(function(r) {
|
|
34
|
+
if (e.contains(r)) return r;
|
|
35
|
+
var u = W(r);
|
|
36
|
+
return u && e.contains(u) ? u : (console.error("aria-hidden", r, "in not contained inside", e, ". Doing nothing"), null);
|
|
37
|
+
}).filter(function(r) {
|
|
38
|
+
return !!r;
|
|
39
|
+
});
|
|
40
|
+
}, D = function(e, a, r, u) {
|
|
41
|
+
var i = j(a, Array.isArray(e) ? e : [e]);
|
|
42
|
+
p[r] || (p[r] = /* @__PURE__ */ new WeakMap());
|
|
43
|
+
var f = p[r], A = [], d = /* @__PURE__ */ new Set(), x = new Set(i), b = function(t) {
|
|
44
|
+
!t || d.has(t) || (d.add(t), b(t.parentNode));
|
|
45
|
+
};
|
|
46
|
+
i.forEach(b);
|
|
47
|
+
var w = function(t) {
|
|
48
|
+
!t || x.has(t) || Array.prototype.forEach.call(t.children, function(n) {
|
|
49
|
+
if (d.has(n)) w(n);
|
|
50
|
+
else try {
|
|
51
|
+
var c = n.getAttribute(u), E = c !== null && c !== "false", M = (s.get(n) || 0) + 1, F = (f.get(n) || 0) + 1;
|
|
52
|
+
s.set(n, M), f.set(n, F), A.push(n), M === 1 && E && v.set(n, !0), F === 1 && n.setAttribute(r, "true"), E || n.setAttribute(u, "true");
|
|
53
|
+
} catch (k) {
|
|
54
|
+
console.error("aria-hidden: cannot operate on ", n, k);
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
return w(a), d.clear(), h++, function() {
|
|
59
|
+
A.forEach(function(t) {
|
|
60
|
+
var n = s.get(t) - 1, c = f.get(t) - 1;
|
|
61
|
+
s.set(t, n), f.set(t, c), n || (v.has(t) || t.removeAttribute(u), v.delete(t)), c || t.removeAttribute(r);
|
|
62
|
+
}), h--, h || (s = /* @__PURE__ */ new WeakMap(), s = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), p = {});
|
|
63
|
+
};
|
|
64
|
+
}, O = function(e, a, r) {
|
|
65
|
+
r === void 0 && (r = "data-aria-hidden");
|
|
66
|
+
var u = Array.from(Array.isArray(e) ? e : [e]), i = a || _(e);
|
|
67
|
+
return i ? (u.push.apply(u, Array.from(i.querySelectorAll("[aria-live], script"))), D(u, i, r, "aria-hidden")) : function() {
|
|
68
|
+
return null;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
export {
|
|
72
|
+
G as n,
|
|
73
|
+
O as t
|
|
74
|
+
};
|