@servicetitan/anvil2 1.0.0 → 1.0.2
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/Alert-9b9be403.js +89 -0
- package/Alert-9b9be403.js.map +1 -0
- package/Alert-f8312c73.cjs +2 -0
- package/Alert-f8312c73.cjs.map +1 -0
- package/Alert.cjs +1 -1
- package/Alert.css +1 -1
- package/Alert.js +1 -1
- package/Announcement-01964ff1.js +88 -0
- package/Announcement-01964ff1.js.map +1 -0
- package/Announcement-2da2a353.cjs +2 -0
- package/Announcement-2da2a353.cjs.map +1 -0
- package/Announcement.cjs +1 -1
- package/Announcement.css +1 -1
- package/Announcement.js +1 -1
- package/AnvilProvider.cjs +1 -1
- package/AnvilProvider.js +1 -1
- package/Avatar-68eccd63.cjs +2 -0
- package/Avatar-68eccd63.cjs.map +1 -0
- package/Avatar-bff54b28.js +120 -0
- package/Avatar-bff54b28.js.map +1 -0
- package/Avatar.cjs +1 -1
- package/Avatar.css +1 -1
- package/Avatar.js +9 -9
- package/Badge-1c0d0287.js +35 -0
- package/Badge-1c0d0287.js.map +1 -0
- package/Badge-a5e78d6e.cjs +2 -0
- package/Badge-a5e78d6e.cjs.map +1 -0
- package/Badge.cjs +1 -1
- package/Badge.css +1 -1
- package/Badge.js +1 -1
- package/{Button-830a1db0.js → Button-6054b7d9.js} +106 -107
- package/Button-6054b7d9.js.map +1 -0
- package/Button-a947c7df.cjs +2 -0
- package/Button-a947c7df.cjs.map +1 -0
- package/Button.cjs +1 -1
- package/Button.css +1 -1
- package/Button.js +1 -1
- package/ButtonCompound.cjs +1 -1
- package/ButtonCompound.js +1 -1
- package/ButtonLink.cjs +1 -1
- package/ButtonLink.js +1 -1
- package/ButtonToggle.cjs +1 -1
- package/ButtonToggle.js +1 -1
- package/Calendar-46cd1f54.cjs +2 -0
- package/{Calendar-9eb0d3bf.cjs.map → Calendar-46cd1f54.cjs.map} +1 -1
- package/{Calendar-88da97c5.js → Calendar-db99f08b.js} +243 -244
- package/{Calendar-88da97c5.js.map → Calendar-db99f08b.js.map} +1 -1
- package/Calendar.cjs +1 -1
- package/Calendar.css +1 -1
- package/Calendar.js +1 -1
- package/Card-365760fb.js +51 -0
- package/Card-365760fb.js.map +1 -0
- package/Card-4212dc8d.cjs +2 -0
- package/Card-4212dc8d.cjs.map +1 -0
- package/Card.cjs +1 -1
- package/Card.css +1 -1
- package/Card.js +1 -1
- package/Checkbox-1fac1f11.cjs +2 -0
- package/Checkbox-1fac1f11.cjs.map +1 -0
- package/{Checkbox-8520e116.js → Checkbox-f9806cbc.js} +58 -59
- package/Checkbox-f9806cbc.js.map +1 -0
- package/Checkbox.cjs +1 -1
- package/Checkbox.css +1 -1
- package/Checkbox.js +4 -4
- package/Chip-61edfd39.js +90 -0
- package/Chip-61edfd39.js.map +1 -0
- package/Chip-a9be7ed4.cjs +2 -0
- package/Chip-a9be7ed4.cjs.map +1 -0
- package/Chip.cjs +1 -1
- package/Chip.css +1 -1
- package/Chip.js +1 -1
- package/{Combobox-e540feb6.js → Combobox-15edb0b7.js} +978 -966
- package/{Combobox-e540feb6.js.map → Combobox-15edb0b7.js.map} +1 -1
- package/Combobox-2c631320.cjs +23 -0
- package/{Combobox-fb7ea5f1.cjs.map → Combobox-2c631320.cjs.map} +1 -1
- package/Combobox.cjs +1 -1
- package/Combobox.js +7 -7
- package/Details-5aae3aa8.js +123 -0
- package/Details-5aae3aa8.js.map +1 -0
- package/Details-efb16082.cjs +2 -0
- package/Details-efb16082.cjs.map +1 -0
- package/Details.cjs +1 -1
- package/Details.css +1 -1
- package/Details.js +1 -1
- package/Dialog-4253cce0.cjs +2 -0
- package/Dialog-4253cce0.cjs.map +1 -0
- package/Dialog-f72622c3.js +193 -0
- package/Dialog-f72622c3.js.map +1 -0
- package/Dialog.cjs +1 -1
- package/Dialog.css +1 -1
- package/Dialog.js +1 -1
- package/{Divider-a686c1f1.js → Divider-3c208037.js} +20 -21
- package/Divider-3c208037.js.map +1 -0
- package/Divider-74679695.cjs +2 -0
- package/Divider-74679695.cjs.map +1 -0
- package/Divider.cjs +1 -1
- package/Divider.css +1 -1
- package/Divider.js +1 -1
- package/Drawer-4a93f21b.js +190 -0
- package/Drawer-4a93f21b.js.map +1 -0
- package/Drawer-e55378d2.cjs +2 -0
- package/Drawer-e55378d2.cjs.map +1 -0
- package/Drawer.cjs +1 -1
- package/Drawer.css +1 -1
- package/Drawer.js +1 -1
- package/Flex-7e74d309.cjs +2 -0
- package/{Flex-29c4ffce.cjs.map → Flex-7e74d309.cjs.map} +1 -1
- package/{Flex-9956f1b3.js → Flex-88f1d8d1.js} +21 -22
- package/Flex-88f1d8d1.js.map +1 -0
- package/Flex.cjs +1 -1
- package/Flex.css +1 -1
- package/Flex.js +1 -1
- package/Grid-250cb165.cjs +2 -0
- package/{Grid-5fbf04d4.cjs.map → Grid-250cb165.cjs.map} +1 -1
- package/{Grid-9c813cf7.js → Grid-88d82e23.js} +10 -11
- package/Grid-88d82e23.js.map +1 -0
- package/Grid.cjs +1 -1
- package/Grid.css +1 -1
- package/Grid.js +1 -1
- package/{Helper-74a1f07f-3909b3ee.cjs → Helper-74a1f07f-2e0f4273.cjs} +2 -2
- package/{Helper-74a1f07f-3909b3ee.cjs.map → Helper-74a1f07f-2e0f4273.cjs.map} +1 -1
- package/{Helper-74a1f07f-afa4e958.js → Helper-74a1f07f-56e7c8de.js} +3 -3
- package/{Helper-74a1f07f-afa4e958.js.map → Helper-74a1f07f-56e7c8de.js.map} +1 -1
- package/Icon-52e14d4e.js +47 -0
- package/Icon-52e14d4e.js.map +1 -0
- package/Icon-f1045beb.cjs +2 -0
- package/Icon-f1045beb.cjs.map +1 -0
- package/Icon.cjs +1 -1
- package/Icon.css +1 -1
- package/Icon.js +1 -1
- package/Label-1e720bb8.cjs +2 -0
- package/Label-1e720bb8.cjs.map +1 -0
- package/Label-a8c57a5d.js +47 -0
- package/Label-a8c57a5d.js.map +1 -0
- package/Label.css +1 -1
- package/Layout.cjs +1 -1
- package/Layout.js +1 -1
- package/{Link-a593ba6b.js → Link-9d24095b.js} +18 -19
- package/Link-9d24095b.js.map +1 -0
- package/Link-bb64defc.cjs +2 -0
- package/Link-bb64defc.cjs.map +1 -0
- package/Link.cjs +1 -1
- package/Link.css +1 -1
- package/Link.js +1 -1
- package/ListView-02c0eee3.cjs +2 -0
- package/{ListView-74bad83a.cjs.map → ListView-02c0eee3.cjs.map} +1 -1
- package/{ListView-af0da517.js → ListView-5325f570.js} +33 -34
- package/{ListView-af0da517.js.map → ListView-5325f570.js.map} +1 -1
- package/ListView.cjs +1 -1
- package/ListView.css +1 -1
- package/ListView.js +1 -1
- package/ListView.module-3868990a-7ce1f78e.js +11 -0
- package/ListView.module-3868990a-7ce1f78e.js.map +1 -0
- package/ListView.module-3868990a-95f714ae.cjs +2 -0
- package/ListView.module-3868990a-95f714ae.cjs.map +1 -0
- package/Listbox-7cd1c816.cjs +2 -0
- package/{Listbox-4db34d85.cjs.map → Listbox-7cd1c816.cjs.map} +1 -1
- package/{Listbox-92b706c2.js → Listbox-a34f738b.js} +53 -54
- package/{Listbox-92b706c2.js.map → Listbox-a34f738b.js.map} +1 -1
- package/Listbox.cjs +1 -1
- package/Listbox.css +1 -1
- package/Listbox.js +1 -1
- package/Listbox.module-98274ee1-1a954c60.js +13 -0
- package/Listbox.module-98274ee1-1a954c60.js.map +1 -0
- package/Listbox.module-98274ee1-cacb3419.cjs +2 -0
- package/Listbox.module-98274ee1-cacb3419.cjs.map +1 -0
- package/LocalizationProvider.cjs +1 -1
- package/LocalizationProvider.cjs.map +1 -1
- package/LocalizationProvider.js +25 -28
- package/LocalizationProvider.js.map +1 -1
- package/{Menu-7fd2dc23.js → Menu-b4ffc0bd.js} +56 -55
- package/Menu-b4ffc0bd.js.map +1 -0
- package/Menu-c8bf4232.cjs +2 -0
- package/{Menu-76939bdb.cjs.map → Menu-c8bf4232.cjs.map} +1 -1
- package/Menu.cjs +1 -1
- package/Menu.css +1 -1
- package/Menu.js +7 -7
- package/Overflow.cjs +1 -1
- package/Overflow.cjs.map +1 -1
- package/Overflow.js +68 -69
- package/Overflow.js.map +1 -1
- package/Page.cjs +1 -1
- package/Page.js +68 -68
- package/{Popover-a163d0aa.js → Popover-0dcd0e5b.js} +80 -79
- package/Popover-0dcd0e5b.js.map +1 -0
- package/Popover-0f5f9062.cjs +2 -0
- package/Popover-0f5f9062.cjs.map +1 -0
- package/Popover.cjs +1 -1
- package/Popover.css +1 -1
- package/Popover.js +7 -7
- package/ProgressBar-4dcc2f0f.cjs +2 -0
- package/ProgressBar-4dcc2f0f.cjs.map +1 -0
- package/{ProgressBar-49e1e48e.js → ProgressBar-544184e3.js} +40 -41
- package/ProgressBar-544184e3.js.map +1 -0
- package/ProgressBar.cjs +1 -1
- package/ProgressBar.css +1 -1
- package/ProgressBar.js +1 -1
- package/Radio-38ca63a4.cjs +2 -0
- package/Radio-38ca63a4.cjs.map +1 -0
- package/Radio-6cffbb08.js +124 -0
- package/Radio-6cffbb08.js.map +1 -0
- package/Radio.cjs +1 -1
- package/Radio.css +1 -1
- package/Radio.js +1 -1
- package/SideNav-404b894d.cjs +2 -0
- package/SideNav-404b894d.cjs.map +1 -0
- package/SideNav-6933fe8a.js +236 -0
- package/SideNav-6933fe8a.js.map +1 -0
- package/SideNav.cjs +3 -3
- package/SideNav.cjs.map +1 -1
- package/SideNav.css +1 -1
- package/SideNav.js +3 -3
- package/{Spinner-e6a0837b-a4cbf304.cjs → Spinner-e6a0837b-f93c6099.cjs} +2 -2
- package/{Spinner-e6a0837b-a4cbf304.cjs.map → Spinner-e6a0837b-f93c6099.cjs.map} +1 -1
- package/{Spinner-e6a0837b-9a5e00e0.js → Spinner-e6a0837b-facaafc6.js} +2 -2
- package/{Spinner-e6a0837b-9a5e00e0.js.map → Spinner-e6a0837b-facaafc6.js.map} +1 -1
- package/{SrOnly-f331a0ad.js → SrOnly-6b9efe73.js} +2 -2
- package/{SrOnly-f331a0ad.js.map → SrOnly-6b9efe73.js.map} +1 -1
- package/{SrOnly-69d90781.cjs → SrOnly-bbef7e22.cjs} +2 -2
- package/{SrOnly-69d90781.cjs.map → SrOnly-bbef7e22.cjs.map} +1 -1
- package/SrOnly.cjs +1 -1
- package/SrOnly.js +1 -1
- package/{Stepper-0b488606.js → Stepper-68017e2a.js} +142 -142
- package/Stepper-68017e2a.js.map +1 -0
- package/Stepper-9d249c75.cjs +2 -0
- package/Stepper-9d249c75.cjs.map +1 -0
- package/Stepper.cjs +1 -1
- package/Stepper.cjs.map +1 -1
- package/Stepper.css +1 -1
- package/Stepper.d.ts +6 -0
- package/Stepper.js +19 -15
- package/Stepper.js.map +1 -1
- package/Switch-4692c583.js +54 -0
- package/Switch-4692c583.js.map +1 -0
- package/Switch-64d3899f.cjs +2 -0
- package/Switch-64d3899f.cjs.map +1 -0
- package/Switch.cjs +1 -1
- package/Switch.css +1 -1
- package/Switch.js +1 -1
- package/{Tab-7bc38f7f.js → Tab-6284f9f4.js} +117 -118
- package/Tab-6284f9f4.js.map +1 -0
- package/Tab-cce7124e.cjs +10 -0
- package/Tab-cce7124e.cjs.map +1 -0
- package/Tab.cjs +1 -1
- package/Tab.css +1 -1
- package/Tab.js +1 -1
- package/Text-5cc984cd.js +107 -0
- package/Text-5cc984cd.js.map +1 -0
- package/Text-d18dce57.cjs +2 -0
- package/Text-d18dce57.cjs.map +1 -0
- package/Text.cjs +1 -1
- package/Text.css +1 -1
- package/Text.js +1 -1
- package/TextField-c5be914c.cjs +2 -0
- package/TextField-c5be914c.cjs.map +1 -0
- package/TextField-e1f03333.js +133 -0
- package/TextField-e1f03333.js.map +1 -0
- package/TextField.cjs +1 -1
- package/TextField.cjs.map +1 -1
- package/TextField.css +1 -1
- package/TextField.d.ts +7 -30
- package/TextField.js +1 -1
- package/TextField.js.map +1 -1
- package/{Textarea-7c5259de.js → Textarea-3a8cd093.js} +49 -50
- package/{Textarea-7c5259de.js.map → Textarea-3a8cd093.js.map} +1 -1
- package/Textarea-aa63a45e.cjs +2 -0
- package/{Textarea-925aeb0b.cjs.map → Textarea-aa63a45e.cjs.map} +1 -1
- package/Textarea.cjs +1 -1
- package/Textarea.css +1 -1
- package/Textarea.js +1 -1
- package/ThemeProvider.cjs +1 -1
- package/ThemeProvider.js +1 -1
- package/{Toast-3e277d81.js → Toast-12784d2f.js} +74 -74
- package/{Toast-3e277d81.js.map → Toast-12784d2f.js.map} +1 -1
- package/Toast-a72a1b01.cjs +9 -0
- package/{Toast-8446ca9d.cjs.map → Toast-a72a1b01.cjs.map} +1 -1
- package/Toast.cjs +1 -1
- package/Toast.css +1 -1
- package/Toast.js +1 -1
- package/Tooltip-46963b9c.cjs +2 -0
- package/Tooltip-46963b9c.cjs.map +1 -0
- package/Tooltip-727d82b1.js +149 -0
- package/Tooltip-727d82b1.js.map +1 -0
- package/Tooltip.cjs +1 -1
- package/Tooltip.css +1 -1
- package/Tooltip.js +4 -4
- package/anvil2.cjs +1 -1
- package/anvil2.d.ts +135 -102
- package/anvil2.js +158 -153
- package/anvil2.js.map +1 -1
- package/assets/icons/st/batch.svg +1 -0
- package/assets/icons/st/call.svg +1 -0
- package/assets/icons/st/call_inbound.svg +1 -0
- package/assets/icons/st/call_outbound.svg +1 -0
- package/assets/icons/st/customer.svg +1 -0
- package/assets/icons/st/equipment.svg +1 -0
- package/assets/icons/st/estimate.svg +1 -0
- package/assets/icons/st/form.svg +1 -0
- package/assets/icons/st/invoice.svg +1 -0
- package/assets/icons/st/job.svg +1 -0
- package/assets/icons/st/local_settings.svg +1 -11
- package/assets/icons/st/location.svg +1 -0
- package/assets/icons/st/memberships.svg +1 -6
- package/assets/icons/st/payment.svg +1 -0
- package/assets/icons/st/pro_tip.svg +1 -0
- package/assets/icons/st/project.svg +1 -0
- package/assets/icons/st/proposal.svg +1 -0
- package/assets/icons/st/purchase_order.svg +1 -0
- package/assets/icons/st/service_agreements.svg +1 -6
- package/assets/icons/st/sms.svg +1 -0
- package/assets/icons/st/text_inbound.svg +1 -0
- package/assets/icons/st/text_outbound.svg +1 -0
- package/assets/icons/st/upsell.svg +1 -0
- package/assets/icons/st/virtual_agent.svg +1 -0
- package/assets/icons/st/web_chat.svg +1 -0
- package/{index-a062ce5a.js → index-0fcc8f2c.js} +2 -2
- package/{index-a062ce5a.js.map → index-0fcc8f2c.js.map} +1 -1
- package/index-2bd62884.cjs +6 -0
- package/{index-d3c6e880.cjs.map → index-2bd62884.cjs.map} +1 -1
- package/index-3a42c2f5.cjs +2 -0
- package/{index-1f072fda.cjs.map → index-3a42c2f5.cjs.map} +1 -1
- package/index-6c0d3173.js +48 -0
- package/{index-39087e81.js.map → index-6c0d3173.js.map} +1 -1
- package/{index-92baae54.cjs → index-88f64542.cjs} +6 -6
- package/{index-92baae54.cjs.map → index-88f64542.cjs.map} +1 -1
- package/index-a8953a8d.cjs +2 -0
- package/index-a8953a8d.cjs.map +1 -0
- package/index-b5a703ca.js +57 -0
- package/index-b5a703ca.js.map +1 -0
- package/{index-09d89a47.js → index-d92d2eb5.js} +2 -2
- package/{index-09d89a47.js.map → index-d92d2eb5.js.map} +1 -1
- package/index-e1f04536-33ebb65b.js +62 -0
- package/index-e1f04536-33ebb65b.js.map +1 -0
- package/index-e1f04536-67254699.cjs +2 -0
- package/index-e1f04536-67254699.cjs.map +1 -0
- package/{index-6142d9b8.js → index-e54f92d0.js} +3 -3
- package/{index-6142d9b8.js.map → index-e54f92d0.js.map} +1 -1
- package/{index-1cf3540f.cjs → index-f42fb342.cjs} +2 -2
- package/{index-1cf3540f.cjs.map → index-f42fb342.cjs.map} +1 -1
- package/index2.css +1 -1
- package/index3.css +1 -1
- package/package.json +3 -3
- package/token.cjs +1 -1
- package/token.js +1 -1
- package/useAccessibleColor.cjs +1 -1
- package/useAccessibleColor.js +40 -40
- package/useLayoutPropsUtil-e307abc7-053ab281.js +869 -0
- package/useLayoutPropsUtil-e307abc7-053ab281.js.map +1 -0
- package/useLayoutPropsUtil-e307abc7-9cffb4b6.cjs +2 -0
- package/useLayoutPropsUtil-e307abc7-9cffb4b6.cjs.map +1 -0
- package/useLinkStyles.cjs +1 -1
- package/useLinkStyles.js +39 -39
- package/useMergeRefs.cjs +1 -1
- package/useMergeRefs.js +39 -39
- package/usePrefersColorScheme-129544ad-8a88962d.cjs +2 -0
- package/{usePrefersColorScheme-129544ad-96356659.cjs.map → usePrefersColorScheme-129544ad-8a88962d.cjs.map} +1 -1
- package/{usePrefersColorScheme-129544ad-3ba4632b.js → usePrefersColorScheme-129544ad-d4fd2894.js} +2 -2
- package/{usePrefersColorScheme-129544ad-3ba4632b.js.map → usePrefersColorScheme-129544ad-d4fd2894.js.map} +1 -1
- package/usePrefersColorScheme.cjs +1 -1
- package/usePrefersColorScheme.js +39 -39
- package/useSize.cjs +1 -1
- package/useSize.cjs.map +1 -1
- package/useSize.js +56 -342
- package/useSize.js.map +1 -1
- package/useSwipe.cjs +1 -1
- package/useSwipe.js +39 -39
- package/Alert-344183ea.js +0 -90
- package/Alert-344183ea.js.map +0 -1
- package/Alert-62672ace.cjs +0 -2
- package/Alert-62672ace.cjs.map +0 -1
- package/Announcement-9851a347.cjs +0 -2
- package/Announcement-9851a347.cjs.map +0 -1
- package/Announcement-bc49dcda.js +0 -89
- package/Announcement-bc49dcda.js.map +0 -1
- package/Avatar-3631c6ec.js +0 -121
- package/Avatar-3631c6ec.js.map +0 -1
- package/Avatar-4f12215a.cjs +0 -2
- package/Avatar-4f12215a.cjs.map +0 -1
- package/Badge-4341cdd7.cjs +0 -2
- package/Badge-4341cdd7.cjs.map +0 -1
- package/Badge-53f22ef2.js +0 -33
- package/Badge-53f22ef2.js.map +0 -1
- package/Button-1a971c5a.cjs +0 -2
- package/Button-1a971c5a.cjs.map +0 -1
- package/Button-830a1db0.js.map +0 -1
- package/Calendar-9eb0d3bf.cjs +0 -2
- package/Card-3b826e9c.js +0 -52
- package/Card-3b826e9c.js.map +0 -1
- package/Card-a93a5f83.cjs +0 -2
- package/Card-a93a5f83.cjs.map +0 -1
- package/Checkbox-639ce252.cjs +0 -2
- package/Checkbox-639ce252.cjs.map +0 -1
- package/Checkbox-8520e116.js.map +0 -1
- package/Chip-6bedca94.js +0 -91
- package/Chip-6bedca94.js.map +0 -1
- package/Chip-da8c6362.cjs +0 -2
- package/Chip-da8c6362.cjs.map +0 -1
- package/Combobox-fb7ea5f1.cjs +0 -23
- package/Details-4b2021ec.cjs +0 -2
- package/Details-4b2021ec.cjs.map +0 -1
- package/Details-b28ee573.js +0 -124
- package/Details-b28ee573.js.map +0 -1
- package/Dialog-6eb58365.js +0 -193
- package/Dialog-6eb58365.js.map +0 -1
- package/Dialog-a919dea4.cjs +0 -2
- package/Dialog-a919dea4.cjs.map +0 -1
- package/Divider-7ef2a224.cjs +0 -2
- package/Divider-7ef2a224.cjs.map +0 -1
- package/Divider-a686c1f1.js.map +0 -1
- package/Drawer-1b273181.cjs +0 -2
- package/Drawer-1b273181.cjs.map +0 -1
- package/Drawer-b33f5343.js +0 -190
- package/Drawer-b33f5343.js.map +0 -1
- package/Flex-29c4ffce.cjs +0 -2
- package/Flex-9956f1b3.js.map +0 -1
- package/Grid-5fbf04d4.cjs +0 -2
- package/Grid-9c813cf7.js.map +0 -1
- package/Icon-2d4ee439.cjs +0 -2
- package/Icon-2d4ee439.cjs.map +0 -1
- package/Icon-f2b149cf.js +0 -48
- package/Icon-f2b149cf.js.map +0 -1
- package/Label-3ad0b0ab.js +0 -47
- package/Label-3ad0b0ab.js.map +0 -1
- package/Label-eb7ce922.cjs +0 -2
- package/Label-eb7ce922.cjs.map +0 -1
- package/Link-a593ba6b.js.map +0 -1
- package/Link-ec7cbdf8.cjs +0 -2
- package/Link-ec7cbdf8.cjs.map +0 -1
- package/ListView-74bad83a.cjs +0 -2
- package/ListView.module-79d72342-d7aa9dc4.js +0 -11
- package/ListView.module-79d72342-d7aa9dc4.js.map +0 -1
- package/ListView.module-79d72342-d9f4290e.cjs +0 -2
- package/ListView.module-79d72342-d9f4290e.cjs.map +0 -1
- package/Listbox-4db34d85.cjs +0 -2
- package/Listbox.module-c63c1bfa-5ebe4039.cjs +0 -2
- package/Listbox.module-c63c1bfa-5ebe4039.cjs.map +0 -1
- package/Listbox.module-c63c1bfa-9824a4a9.js +0 -13
- package/Listbox.module-c63c1bfa-9824a4a9.js.map +0 -1
- package/Menu-76939bdb.cjs +0 -2
- package/Menu-7fd2dc23.js.map +0 -1
- package/Popover-a163d0aa.js.map +0 -1
- package/Popover-da69669e.cjs +0 -2
- package/Popover-da69669e.cjs.map +0 -1
- package/ProgressBar-49e1e48e.js.map +0 -1
- package/ProgressBar-ae651373.cjs +0 -2
- package/ProgressBar-ae651373.cjs.map +0 -1
- package/Radio-51163e05.cjs +0 -2
- package/Radio-51163e05.cjs.map +0 -1
- package/Radio-8da19f8d.js +0 -125
- package/Radio-8da19f8d.js.map +0 -1
- package/SideNav-55cdec93.cjs +0 -2
- package/SideNav-55cdec93.cjs.map +0 -1
- package/SideNav-ad0fff00.js +0 -237
- package/SideNav-ad0fff00.js.map +0 -1
- package/Stepper-0b488606.js.map +0 -1
- package/Stepper-582e737c.cjs +0 -2
- package/Stepper-582e737c.cjs.map +0 -1
- package/Switch-4fd76a55.cjs +0 -2
- package/Switch-4fd76a55.cjs.map +0 -1
- package/Switch-5e5f3da5.js +0 -55
- package/Switch-5e5f3da5.js.map +0 -1
- package/Tab-7bc38f7f.js.map +0 -1
- package/Tab-dc80fe7e.cjs +0 -10
- package/Tab-dc80fe7e.cjs.map +0 -1
- package/Text-317031b1.cjs +0 -2
- package/Text-317031b1.cjs.map +0 -1
- package/Text-796fd2cb.js +0 -108
- package/Text-796fd2cb.js.map +0 -1
- package/TextField-d1447bda.js +0 -134
- package/TextField-d1447bda.js.map +0 -1
- package/TextField-dc7293ad.cjs +0 -2
- package/TextField-dc7293ad.cjs.map +0 -1
- package/Textarea-925aeb0b.cjs +0 -2
- package/Toast-8446ca9d.cjs +0 -9
- package/Tooltip-3e04d2a9.js +0 -148
- package/Tooltip-3e04d2a9.js.map +0 -1
- package/Tooltip-881868fb.cjs +0 -2
- package/Tooltip-881868fb.cjs.map +0 -1
- package/_commonjsHelpers-10dfc225.js +0 -9
- package/_commonjsHelpers-10dfc225.js.map +0 -1
- package/_commonjsHelpers-87b0abe8.cjs +0 -2
- package/_commonjsHelpers-87b0abe8.cjs.map +0 -1
- package/index-1f072fda.cjs +0 -2
- package/index-22a2f39b.js +0 -38
- package/index-22a2f39b.js.map +0 -1
- package/index-39087e81.js +0 -43
- package/index-8b24e154.cjs +0 -2
- package/index-8b24e154.cjs.map +0 -1
- package/index-cb90cd0a-1857e934.js +0 -58
- package/index-cb90cd0a-1857e934.js.map +0 -1
- package/index-cb90cd0a-821182f5.cjs +0 -2
- package/index-cb90cd0a-821182f5.cjs.map +0 -1
- package/index-d3c6e880.cjs +0 -6
- package/tinycolor-3b50a250.cjs +0 -2
- package/tinycolor-3b50a250.cjs.map +0 -1
- package/tinycolor-d415b1fd.js +0 -712
- package/tinycolor-d415b1fd.js.map +0 -1
- package/useBreakpoint-8f3e3792-1a3ca6bd.js +0 -68
- package/useBreakpoint-8f3e3792-1a3ca6bd.js.map +0 -1
- package/useBreakpoint-8f3e3792-7746c47f.cjs +0 -2
- package/useBreakpoint-8f3e3792-7746c47f.cjs.map +0 -1
- package/useLayoutPropsUtil-4361a49d-a262cd66.cjs +0 -2
- package/useLayoutPropsUtil-4361a49d-a262cd66.cjs.map +0 -1
- package/useLayoutPropsUtil-4361a49d-f9f6e64c.js +0 -99
- package/useLayoutPropsUtil-4361a49d-f9f6e64c.js.map +0 -1
- package/usePrefersColorScheme-129544ad-96356659.cjs +0 -2
|
@@ -1,30 +1,29 @@
|
|
|
1
1
|
import "./Tab.css";
|
|
2
2
|
import { f as g } from "./jsx-runtime-944c88e2-e73fa629.js";
|
|
3
3
|
import * as x from "react";
|
|
4
|
-
import { useRef as
|
|
5
|
-
import { u as
|
|
6
|
-
import { K
|
|
7
|
-
import {
|
|
8
|
-
import "./
|
|
9
|
-
import {
|
|
10
|
-
import { u as U } from "./
|
|
11
|
-
import { u as V, f as le, M as se, a as ie, P as ae, L as ce, i as ue, m as q } from "./motion-1dee7c9a.js";
|
|
4
|
+
import { useRef as N, useState as q, useCallback as M, useId as O, useContext as T, useInsertionEffect as Z, useMemo as $, useEffect as A, cloneElement as ee, Children as te, isValidElement as ne, forwardRef as F, createContext as re } from "react";
|
|
5
|
+
import { u as S } from "./floating-ui.react-20365654.js";
|
|
6
|
+
import { K } from "./index-6c0d3173.js";
|
|
7
|
+
import { I as H } from "./Icon-52e14d4e.js";
|
|
8
|
+
import { J as oe } from "./useLayoutPropsUtil-e307abc7-053ab281.js";
|
|
9
|
+
import { u as W } from "./use-reduced-motion-fa02c531.js";
|
|
10
|
+
import { u as U, f as se, M as le, a as ie, P as ae, L as ce, i as ue, m as V } from "./motion-1dee7c9a.js";
|
|
12
11
|
function G() {
|
|
13
|
-
const n =
|
|
14
|
-
return
|
|
12
|
+
const n = N(!1);
|
|
13
|
+
return U(() => (n.current = !0, () => {
|
|
15
14
|
n.current = !1;
|
|
16
15
|
}), []), n;
|
|
17
16
|
}
|
|
18
17
|
function de() {
|
|
19
|
-
const n = G(), [
|
|
20
|
-
n.current && t(
|
|
21
|
-
}, [
|
|
22
|
-
return [
|
|
18
|
+
const n = G(), [s, t] = q(0), r = M(() => {
|
|
19
|
+
n.current && t(s + 1);
|
|
20
|
+
}, [s]);
|
|
21
|
+
return [M(() => se.postRender(r), [r]), s];
|
|
23
22
|
}
|
|
24
23
|
class fe extends x.Component {
|
|
25
|
-
getSnapshotBeforeUpdate(
|
|
24
|
+
getSnapshotBeforeUpdate(s) {
|
|
26
25
|
const t = this.props.childRef.current;
|
|
27
|
-
if (t &&
|
|
26
|
+
if (t && s.isPresent && !this.props.isPresent) {
|
|
28
27
|
const r = this.props.sizeRef.current;
|
|
29
28
|
r.height = t.offsetHeight || 0, r.width = t.offsetWidth || 0, r.top = t.offsetTop, r.left = t.offsetLeft;
|
|
30
29
|
}
|
|
@@ -39,16 +38,16 @@ class fe extends x.Component {
|
|
|
39
38
|
return this.props.children;
|
|
40
39
|
}
|
|
41
40
|
}
|
|
42
|
-
function pe({ children: n, isPresent:
|
|
43
|
-
const t =
|
|
41
|
+
function pe({ children: n, isPresent: s }) {
|
|
42
|
+
const t = O(), r = N(null), b = N({
|
|
44
43
|
width: 0,
|
|
45
44
|
height: 0,
|
|
46
45
|
top: 0,
|
|
47
46
|
left: 0
|
|
48
|
-
}), { nonce: i } =
|
|
47
|
+
}), { nonce: i } = T(le);
|
|
49
48
|
return Z(() => {
|
|
50
49
|
const { width: f, height: u, top: m, left: d } = b.current;
|
|
51
|
-
if (
|
|
50
|
+
if (s || !r.current || !f || !u)
|
|
52
51
|
return;
|
|
53
52
|
r.current.dataset.motionPopId = t;
|
|
54
53
|
const e = document.createElement("style");
|
|
@@ -63,13 +62,13 @@ function pe({ children: n, isPresent: l }) {
|
|
|
63
62
|
`), () => {
|
|
64
63
|
document.head.removeChild(e);
|
|
65
64
|
};
|
|
66
|
-
}, [
|
|
65
|
+
}, [s]), x.createElement(fe, { isPresent: s, childRef: r, sizeRef: b }, x.cloneElement(n, { ref: r }));
|
|
67
66
|
}
|
|
68
|
-
const
|
|
69
|
-
const u = ie(me), m =
|
|
67
|
+
const B = ({ children: n, initial: s, isPresent: t, onExitComplete: r, custom: b, presenceAffectsLayout: i, mode: f }) => {
|
|
68
|
+
const u = ie(me), m = O(), d = $(
|
|
70
69
|
() => ({
|
|
71
70
|
id: m,
|
|
72
|
-
initial:
|
|
71
|
+
initial: s,
|
|
73
72
|
isPresent: t,
|
|
74
73
|
custom: b,
|
|
75
74
|
onExitComplete: (e) => {
|
|
@@ -88,7 +87,7 @@ const O = ({ children: n, initial: l, isPresent: t, onExitComplete: r, custom: b
|
|
|
88
87
|
*/
|
|
89
88
|
i ? void 0 : [t]
|
|
90
89
|
);
|
|
91
|
-
return
|
|
90
|
+
return $(() => {
|
|
92
91
|
u.forEach((e, a) => u.set(a, !1));
|
|
93
92
|
}, [t]), x.useEffect(() => {
|
|
94
93
|
!t && !u.size && r && r();
|
|
@@ -98,32 +97,32 @@ function me() {
|
|
|
98
97
|
return /* @__PURE__ */ new Map();
|
|
99
98
|
}
|
|
100
99
|
function he(n) {
|
|
101
|
-
return
|
|
100
|
+
return A(() => () => n(), []);
|
|
102
101
|
}
|
|
103
102
|
const j = (n) => n.key || "";
|
|
104
|
-
function ve(n,
|
|
103
|
+
function ve(n, s) {
|
|
105
104
|
n.forEach((t) => {
|
|
106
105
|
const r = j(t);
|
|
107
|
-
|
|
106
|
+
s.set(r, t);
|
|
108
107
|
});
|
|
109
108
|
}
|
|
110
109
|
function xe(n) {
|
|
111
|
-
const
|
|
110
|
+
const s = [];
|
|
112
111
|
return te.forEach(n, (t) => {
|
|
113
|
-
ne(t) &&
|
|
114
|
-
}),
|
|
112
|
+
ne(t) && s.push(t);
|
|
113
|
+
}), s;
|
|
115
114
|
}
|
|
116
|
-
const be = ({ children: n, custom:
|
|
115
|
+
const be = ({ children: n, custom: s, initial: t = !0, onExitComplete: r, exitBeforeEnter: b, presenceAffectsLayout: i = !0, mode: f = "sync" }) => {
|
|
117
116
|
ue(!b, "Replace exitBeforeEnter with mode='wait'");
|
|
118
|
-
const u =
|
|
117
|
+
const u = T(ce).forceRender || de()[0], m = G(), d = xe(n);
|
|
119
118
|
let e = d;
|
|
120
|
-
const a =
|
|
121
|
-
if (
|
|
122
|
-
|
|
119
|
+
const a = N(/* @__PURE__ */ new Map()).current, w = N(e), h = N(/* @__PURE__ */ new Map()).current, l = N(!0);
|
|
120
|
+
if (U(() => {
|
|
121
|
+
l.current = !1, ve(d, h), w.current = e;
|
|
123
122
|
}), he(() => {
|
|
124
|
-
|
|
125
|
-
}),
|
|
126
|
-
return x.createElement(x.Fragment, null, e.map((o) => x.createElement(
|
|
123
|
+
l.current = !0, h.clear(), a.clear();
|
|
124
|
+
}), l.current)
|
|
125
|
+
return x.createElement(x.Fragment, null, e.map((o) => x.createElement(B, { key: j(o), isPresent: !0, initial: t ? void 0 : !1, presenceAffectsLayout: i, mode: f }, o)));
|
|
127
126
|
e = [...e];
|
|
128
127
|
const v = w.current.map(j), y = d.map(j), I = v.length;
|
|
129
128
|
for (let o = 0; o < I; o++) {
|
|
@@ -133,21 +132,21 @@ const be = ({ children: n, custom: l, initial: t = !0, onExitComplete: r, exitBe
|
|
|
133
132
|
return f === "wait" && a.size && (e = []), a.forEach((o, c) => {
|
|
134
133
|
if (y.indexOf(c) !== -1)
|
|
135
134
|
return;
|
|
136
|
-
const
|
|
137
|
-
if (!
|
|
135
|
+
const R = h.get(c);
|
|
136
|
+
if (!R)
|
|
138
137
|
return;
|
|
139
138
|
const L = v.indexOf(c);
|
|
140
139
|
let _ = o;
|
|
141
140
|
if (!_) {
|
|
142
141
|
const C = () => {
|
|
143
142
|
a.delete(c);
|
|
144
|
-
const
|
|
145
|
-
if (
|
|
143
|
+
const k = Array.from(h.keys()).filter((P) => !y.includes(P));
|
|
144
|
+
if (k.forEach((P) => h.delete(P)), w.current = d.filter((P) => {
|
|
146
145
|
const p = j(P);
|
|
147
146
|
return (
|
|
148
147
|
// filter out the node exiting
|
|
149
148
|
p === c || // filter out the leftover children
|
|
150
|
-
|
|
149
|
+
k.includes(p)
|
|
151
150
|
);
|
|
152
151
|
}), !a.size) {
|
|
153
152
|
if (m.current === !1)
|
|
@@ -155,30 +154,30 @@ const be = ({ children: n, custom: l, initial: t = !0, onExitComplete: r, exitBe
|
|
|
155
154
|
u(), r && r();
|
|
156
155
|
}
|
|
157
156
|
};
|
|
158
|
-
_ = x.createElement(
|
|
157
|
+
_ = x.createElement(B, { key: j(R), isPresent: !1, onExitComplete: C, custom: s, presenceAffectsLayout: i, mode: f }, R), a.set(c, _);
|
|
159
158
|
}
|
|
160
159
|
e.splice(L, 0, _);
|
|
161
160
|
}), e = e.map((o) => {
|
|
162
161
|
const c = o.key;
|
|
163
|
-
return a.has(c) ? o : x.createElement(
|
|
162
|
+
return a.has(c) ? o : x.createElement(B, { key: j(o), isPresent: !0, presenceAffectsLayout: i, mode: f }, o);
|
|
164
163
|
}), process.env.NODE_ENV !== "production" && f === "wait" && e.length > 1 && console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`), x.createElement(x.Fragment, null, a.size ? e : e.map((o) => ee(o)));
|
|
165
164
|
};
|
|
166
|
-
const ye = "
|
|
165
|
+
const ye = "_tab_sqv8x_4", ge = "_inner_sqv8x_70", we = "_indicator_sqv8x_83", _e = "_scroller_sqv8x_117", Ce = "_right_sqv8x_125", Ee = "_left_sqv8x_125", Ne = "_fill_sqv8x_145", E = {
|
|
167
166
|
tab: ye,
|
|
168
|
-
"tab-panel": "_tab-
|
|
169
|
-
"tab-button": "_tab-
|
|
170
|
-
"tab-list": "_tab-
|
|
171
|
-
"overflow-prev": "_overflow-
|
|
172
|
-
"overflow-next": "_overflow-
|
|
167
|
+
"tab-panel": "_tab-panel_sqv8x_17",
|
|
168
|
+
"tab-button": "_tab-button_sqv8x_18",
|
|
169
|
+
"tab-list": "_tab-list_sqv8x_19",
|
|
170
|
+
"overflow-prev": "_overflow-prev_sqv8x_32",
|
|
171
|
+
"overflow-next": "_overflow-next_sqv8x_33",
|
|
173
172
|
inner: ge,
|
|
174
173
|
indicator: we,
|
|
175
174
|
scroller: _e,
|
|
176
175
|
right: Ce,
|
|
177
176
|
left: Ee,
|
|
178
|
-
fill:
|
|
179
|
-
}, J =
|
|
180
|
-
(n,
|
|
181
|
-
const t =
|
|
177
|
+
fill: Ne
|
|
178
|
+
}, J = F(
|
|
179
|
+
(n, s) => {
|
|
180
|
+
const t = N(null), r = W(), {
|
|
182
181
|
current: b,
|
|
183
182
|
items: i,
|
|
184
183
|
setCurrent: f,
|
|
@@ -186,20 +185,20 @@ const ye = "_tab_1l02n_4", ge = "_inner_1l02n_70", we = "_indicator_1l02n_83", _
|
|
|
186
185
|
setFocus: m,
|
|
187
186
|
uid: d,
|
|
188
187
|
onKeyDownHandler: e
|
|
189
|
-
} = D
|
|
188
|
+
} = T(D), {
|
|
190
189
|
onClick: a,
|
|
191
190
|
children: w,
|
|
192
191
|
onFocus: h,
|
|
193
|
-
onKeyDown:
|
|
192
|
+
onKeyDown: l,
|
|
194
193
|
controls: v,
|
|
195
194
|
id: y,
|
|
196
195
|
className: I,
|
|
197
196
|
...o
|
|
198
|
-
} = n, c = i && Array.prototype.indexOf.call(i, t.current),
|
|
197
|
+
} = n, c = i && Array.prototype.indexOf.call(i, t.current), R = (C) => {
|
|
199
198
|
c !== void 0 && (a == null || a(C, c), f == null || f(c), m == null || m(c), i == null || i[c].focus());
|
|
200
199
|
}, L = (C) => {
|
|
201
|
-
e == null || e(C),
|
|
202
|
-
}, _ =
|
|
200
|
+
e == null || e(C), l == null || l(C);
|
|
201
|
+
}, _ = K(E["tab-button"], I);
|
|
203
202
|
return /* @__PURE__ */ g.jsxs(
|
|
204
203
|
"button",
|
|
205
204
|
{
|
|
@@ -210,15 +209,15 @@ const ye = "_tab_1l02n_4", ge = "_inner_1l02n_70", we = "_indicator_1l02n_83", _
|
|
|
210
209
|
className: _,
|
|
211
210
|
"aria-selected": (i == null ? void 0 : i[b].id) === y,
|
|
212
211
|
"aria-controls": v,
|
|
213
|
-
onClick:
|
|
212
|
+
onClick: R,
|
|
214
213
|
onKeyDown: L,
|
|
215
214
|
tabIndex: (i == null ? void 0 : i[u].id) === y ? 0 : -1,
|
|
216
215
|
...o,
|
|
217
|
-
ref:
|
|
216
|
+
ref: S([t, s]),
|
|
218
217
|
children: [
|
|
219
218
|
/* @__PURE__ */ g.jsx("span", { className: E.inner, children: w }),
|
|
220
219
|
(i == null ? void 0 : i[b].id) === y && /* @__PURE__ */ g.jsx(
|
|
221
|
-
|
|
220
|
+
V.span,
|
|
222
221
|
{
|
|
223
222
|
layoutId: d,
|
|
224
223
|
className: E.indicator,
|
|
@@ -231,26 +230,26 @@ const ye = "_tab_1l02n_4", ge = "_inner_1l02n_70", we = "_indicator_1l02n_83", _
|
|
|
231
230
|
}
|
|
232
231
|
);
|
|
233
232
|
J.displayName = "TabButton";
|
|
234
|
-
const
|
|
235
|
-
(n,
|
|
236
|
-
const { className: t, children: r, onKeyDown: b, ...i } = n, { goToPrev: f, gotoNext: u, dir: m } = D
|
|
233
|
+
const Re = (n) => /* @__PURE__ */ x.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...n }, /* @__PURE__ */ x.createElement("path", { d: "M19 11H7.83l4.88-4.88c.39-.39.39-1.03 0-1.42a.996.996 0 0 0-1.41 0l-6.59 6.59a.996.996 0 0 0 0 1.41l6.59 6.59a.996.996 0 1 0 1.41-1.41L7.83 13H19c.55 0 1-.45 1-1s-.45-1-1-1z" })), Ie = (n) => /* @__PURE__ */ x.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...n }, /* @__PURE__ */ x.createElement("path", { d: "M5 13h11.17l-4.88 4.88c-.39.39-.39 1.03 0 1.42.39.39 1.02.39 1.41 0l6.59-6.59a.996.996 0 0 0 0-1.41l-6.58-6.6a.996.996 0 1 0-1.41 1.41L16.17 11H5c-.55 0-1 .45-1 1s.45 1 1 1z" })), Y = F(
|
|
234
|
+
(n, s) => {
|
|
235
|
+
const { className: t, children: r, onKeyDown: b, ...i } = n, { goToPrev: f, gotoNext: u, dir: m } = T(D), [d, e] = q(!1), [a, w] = q(!1), h = N(null), l = M(
|
|
237
236
|
(o) => {
|
|
238
|
-
const c = m === "ltr" ? o.scrollLeft > 0 : o.scrollLeft > o.offsetWidth - o.scrollWidth + 1,
|
|
239
|
-
e(c), w(
|
|
237
|
+
const c = m === "ltr" ? o.scrollLeft > 0 : o.scrollLeft > o.offsetWidth - o.scrollWidth + 1, R = m === "ltr" ? o.scrollLeft < o.scrollWidth - o.offsetWidth : o.scrollLeft < 0;
|
|
238
|
+
e(c), w(R);
|
|
240
239
|
},
|
|
241
240
|
[m]
|
|
242
241
|
);
|
|
243
|
-
|
|
244
|
-
h.current &&
|
|
245
|
-
}, [
|
|
242
|
+
A(() => {
|
|
243
|
+
h.current && l(h.current);
|
|
244
|
+
}, [l]);
|
|
246
245
|
const v = (o) => {
|
|
247
246
|
const c = o.target;
|
|
248
|
-
|
|
249
|
-
}, y =
|
|
247
|
+
l(c);
|
|
248
|
+
}, y = K(E["tab-list"], t), I = K(E.scroller, {
|
|
250
249
|
[E.left]: d,
|
|
251
250
|
[E.right]: a
|
|
252
251
|
});
|
|
253
|
-
return /* @__PURE__ */ g.jsxs("div", { ...i, className: y, "data-anv": "TabList", ref:
|
|
252
|
+
return /* @__PURE__ */ g.jsxs("div", { ...i, className: y, "data-anv": "TabList", ref: s, children: [
|
|
254
253
|
(m === "ltr" ? d : a) && /* @__PURE__ */ g.jsx(
|
|
255
254
|
"button",
|
|
256
255
|
{
|
|
@@ -258,7 +257,7 @@ const Ne = (n) => /* @__PURE__ */ x.createElement("svg", { xmlns: "http://www.w3
|
|
|
258
257
|
onClick: () => f == null ? void 0 : f(!1),
|
|
259
258
|
className: E["overflow-prev"],
|
|
260
259
|
"aria-label": "Previous tab",
|
|
261
|
-
children: /* @__PURE__ */ g.jsx(
|
|
260
|
+
children: /* @__PURE__ */ g.jsx(H, { svg: Re, "aria-hidden": !0, size: "medium" })
|
|
262
261
|
}
|
|
263
262
|
),
|
|
264
263
|
/* @__PURE__ */ g.jsx(
|
|
@@ -278,19 +277,19 @@ const Ne = (n) => /* @__PURE__ */ x.createElement("svg", { xmlns: "http://www.w3
|
|
|
278
277
|
onClick: () => u == null ? void 0 : u(!1),
|
|
279
278
|
className: E["overflow-next"],
|
|
280
279
|
"aria-label": "Next tab",
|
|
281
|
-
children: /* @__PURE__ */ g.jsx(
|
|
280
|
+
children: /* @__PURE__ */ g.jsx(H, { svg: Ie, "aria-hidden": !0, size: "medium" })
|
|
282
281
|
}
|
|
283
282
|
)
|
|
284
283
|
] });
|
|
285
284
|
}
|
|
286
285
|
);
|
|
287
286
|
Y.displayName = "TabList";
|
|
288
|
-
const Q =
|
|
289
|
-
(n,
|
|
287
|
+
const Q = F(
|
|
288
|
+
(n, s) => {
|
|
290
289
|
var t;
|
|
291
|
-
const { id: r, className: b, ...i } = n, { current: f, items: u } = D
|
|
290
|
+
const { id: r, className: b, ...i } = n, { current: f, items: u } = T(D), m = W();
|
|
292
291
|
let d;
|
|
293
|
-
u == null || u.forEach((h,
|
|
292
|
+
u == null || u.forEach((h, l) => {
|
|
294
293
|
h.getAttribute("aria-controls") === r && (d = h.id);
|
|
295
294
|
});
|
|
296
295
|
const e = ((t = u == null ? void 0 : u[f]) == null ? void 0 : t.getAttribute("aria-controls")) === r, a = m ? {
|
|
@@ -320,9 +319,9 @@ const Q = K(
|
|
|
320
319
|
y: -50,
|
|
321
320
|
opacity: 0
|
|
322
321
|
}
|
|
323
|
-
}, w =
|
|
322
|
+
}, w = K(E["tab-panel"], b);
|
|
324
323
|
return e ? /* @__PURE__ */ g.jsx(
|
|
325
|
-
|
|
324
|
+
V.div,
|
|
326
325
|
{
|
|
327
326
|
variants: a,
|
|
328
327
|
initial: "enter",
|
|
@@ -343,7 +342,7 @@ const Q = K(
|
|
|
343
342
|
id: r,
|
|
344
343
|
"aria-labelledby": d,
|
|
345
344
|
tabIndex: 0,
|
|
346
|
-
ref:
|
|
345
|
+
ref: s
|
|
347
346
|
}
|
|
348
347
|
) : /* @__PURE__ */ g.jsx(g.Fragment, {});
|
|
349
348
|
}
|
|
@@ -352,18 +351,18 @@ Q.displayName = "TabPanel";
|
|
|
352
351
|
const Le = {
|
|
353
352
|
current: 0,
|
|
354
353
|
focus: 0
|
|
355
|
-
},
|
|
356
|
-
const { layoutStyles: t, componentProps: r } = oe(n), { defaultIndex: b, className: i, style: f, fill: u, ...m } = r, d =
|
|
354
|
+
}, D = re(Le), X = F((n, s) => {
|
|
355
|
+
const { layoutStyles: t, componentProps: r } = oe(n), { defaultIndex: b, className: i, style: f, fill: u, ...m } = r, d = N(null), [e, a] = q(), [w, h] = q(b ?? 0), [l, v] = q(b ?? 0), [y, I] = q("ltr"), o = K(E.tab, i, {
|
|
357
356
|
[E.fill]: u
|
|
358
|
-
}), c =
|
|
359
|
-
|
|
357
|
+
}), c = O();
|
|
358
|
+
A(() => {
|
|
360
359
|
var p;
|
|
361
360
|
a((p = d.current) == null ? void 0 : p.querySelectorAll("[role=tab]:not([disabled])"));
|
|
362
|
-
}, [d]),
|
|
363
|
-
var p,
|
|
364
|
-
((
|
|
361
|
+
}, [d]), A(() => {
|
|
362
|
+
var p, z;
|
|
363
|
+
((z = (p = d.current) == null ? void 0 : p.closest("[dir]")) == null ? void 0 : z.getAttribute("dir")) === "rtl" ? I("rtl") : I("ltr");
|
|
365
364
|
}, []);
|
|
366
|
-
const
|
|
365
|
+
const R = {
|
|
367
366
|
...f,
|
|
368
367
|
...t
|
|
369
368
|
}, L = (p) => {
|
|
@@ -372,31 +371,31 @@ const Le = {
|
|
|
372
371
|
block: "nearest",
|
|
373
372
|
inline: "center"
|
|
374
373
|
});
|
|
375
|
-
}, _ =
|
|
374
|
+
}, _ = M(
|
|
376
375
|
(p = !0) => {
|
|
377
|
-
if (
|
|
376
|
+
if (l + 1 === (e == null ? void 0 : e.length)) {
|
|
378
377
|
v == null || v(0), e == null || e[0].focus(), L(e == null ? void 0 : e[0]);
|
|
379
378
|
return;
|
|
380
379
|
}
|
|
381
|
-
v == null || v(
|
|
380
|
+
v == null || v(l + 1), e == null || e[l + 1].focus(), L(e == null ? void 0 : e[l + 1]);
|
|
382
381
|
},
|
|
383
|
-
[
|
|
384
|
-
), C =
|
|
382
|
+
[l, e]
|
|
383
|
+
), C = M(
|
|
385
384
|
(p = !0) => {
|
|
386
|
-
if (
|
|
387
|
-
const
|
|
388
|
-
v == null || v(
|
|
385
|
+
if (l === 0) {
|
|
386
|
+
const z = e ? (e == null ? void 0 : e.length) - 1 : 0;
|
|
387
|
+
v == null || v(z), e == null || e[z].focus(), L(e == null ? void 0 : e[z]);
|
|
389
388
|
return;
|
|
390
389
|
}
|
|
391
|
-
v == null || v(
|
|
390
|
+
v == null || v(l - 1), e == null || e[l - 1].focus(), L(e == null ? void 0 : e[l - 1]);
|
|
392
391
|
},
|
|
393
|
-
[
|
|
394
|
-
),
|
|
392
|
+
[l, e]
|
|
393
|
+
), k = M(
|
|
395
394
|
(p) => {
|
|
396
395
|
switch (console.log("working", p), p.code) {
|
|
397
396
|
case "Enter":
|
|
398
397
|
case "Space":
|
|
399
|
-
p.preventDefault(), h == null || h(
|
|
398
|
+
p.preventDefault(), h == null || h(l);
|
|
400
399
|
break;
|
|
401
400
|
case "ArrowRight":
|
|
402
401
|
p.preventDefault(), y === "ltr" ? _() : C();
|
|
@@ -406,43 +405,43 @@ const Le = {
|
|
|
406
405
|
break;
|
|
407
406
|
}
|
|
408
407
|
},
|
|
409
|
-
[y,
|
|
410
|
-
), P =
|
|
408
|
+
[y, l, C, _]
|
|
409
|
+
), P = $(
|
|
411
410
|
() => ({
|
|
412
411
|
current: w,
|
|
413
412
|
setCurrent: h,
|
|
414
|
-
focus:
|
|
413
|
+
focus: l,
|
|
415
414
|
setFocus: v,
|
|
416
415
|
items: e,
|
|
417
416
|
uid: c,
|
|
418
|
-
onKeyDownHandler:
|
|
417
|
+
onKeyDownHandler: k,
|
|
419
418
|
gotoNext: _,
|
|
420
419
|
goToPrev: C,
|
|
421
420
|
dir: y
|
|
422
421
|
}),
|
|
423
|
-
[w,
|
|
422
|
+
[w, l, C, _, e, k, c, y]
|
|
424
423
|
);
|
|
425
|
-
return /* @__PURE__ */ g.jsx(
|
|
424
|
+
return /* @__PURE__ */ g.jsx(D.Provider, { value: P, children: /* @__PURE__ */ g.jsx(be, { initial: !1, children: /* @__PURE__ */ g.jsx(
|
|
426
425
|
"div",
|
|
427
426
|
{
|
|
428
427
|
className: o,
|
|
429
428
|
"data-anv": "Tab",
|
|
430
|
-
style:
|
|
429
|
+
style: R,
|
|
431
430
|
...m,
|
|
432
|
-
ref:
|
|
431
|
+
ref: S([d, s])
|
|
433
432
|
}
|
|
434
433
|
) }) });
|
|
435
434
|
});
|
|
436
435
|
X.displayName = "Tab";
|
|
437
|
-
const
|
|
436
|
+
const Fe = Object.assign(X, {
|
|
438
437
|
Button: J,
|
|
439
438
|
List: Y,
|
|
440
439
|
Panel: Q
|
|
441
440
|
});
|
|
442
441
|
export {
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
442
|
+
J as K,
|
|
443
|
+
Q as V,
|
|
444
|
+
Y as W,
|
|
445
|
+
Fe as m
|
|
447
446
|
};
|
|
448
|
-
//# sourceMappingURL=Tab-
|
|
447
|
+
//# sourceMappingURL=Tab-6284f9f4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tab-6284f9f4.js","sources":["../node_modules/framer-motion/dist/es/utils/use-is-mounted.mjs","../node_modules/framer-motion/dist/es/utils/use-force-update.mjs","../node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs","../node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs","../node_modules/framer-motion/dist/es/utils/use-unmount-effect.mjs","../node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs","../node_modules/@servicetitan/hammer-react/dist/Tab.js"],"sourcesContent":["import { useRef } from 'react';\nimport { useIsomorphicLayoutEffect } from './use-isomorphic-effect.mjs';\n\nfunction useIsMounted() {\n const isMounted = useRef(false);\n useIsomorphicLayoutEffect(() => {\n isMounted.current = true;\n return () => {\n isMounted.current = false;\n };\n }, []);\n return isMounted;\n}\n\nexport { useIsMounted };\n","import { useState, useCallback } from 'react';\nimport { useIsMounted } from './use-is-mounted.mjs';\nimport { frame } from '../frameloop/frame.mjs';\n\nfunction useForceUpdate() {\n const isMounted = useIsMounted();\n const [forcedRenderCount, setForcedRenderCount] = useState(0);\n const forceRender = useCallback(() => {\n isMounted.current && setForcedRenderCount(forcedRenderCount + 1);\n }, [forcedRenderCount]);\n /**\n * Defer this to the end of the next animation frame in case there are multiple\n * synchronous calls.\n */\n const deferredForceRender = useCallback(() => frame.postRender(forceRender), [forceRender]);\n return [deferredForceRender, forcedRenderCount];\n}\n\nexport { useForceUpdate };\n","import * as React from 'react';\nimport { useId, useRef, useContext, useInsertionEffect } from 'react';\nimport { MotionConfigContext } from '../../context/MotionConfigContext.mjs';\n\n/**\n * Measurement functionality has to be within a separate component\n * to leverage snapshot lifecycle.\n */\nclass PopChildMeasure extends React.Component {\n getSnapshotBeforeUpdate(prevProps) {\n const element = this.props.childRef.current;\n if (element && prevProps.isPresent && !this.props.isPresent) {\n const size = this.props.sizeRef.current;\n size.height = element.offsetHeight || 0;\n size.width = element.offsetWidth || 0;\n size.top = element.offsetTop;\n size.left = element.offsetLeft;\n }\n return null;\n }\n /**\n * Required with getSnapshotBeforeUpdate to stop React complaining.\n */\n componentDidUpdate() { }\n render() {\n return this.props.children;\n }\n}\nfunction PopChild({ children, isPresent }) {\n const id = useId();\n const ref = useRef(null);\n const size = useRef({\n width: 0,\n height: 0,\n top: 0,\n left: 0,\n });\n const { nonce } = useContext(MotionConfigContext);\n /**\n * We create and inject a style block so we can apply this explicit\n * sizing in a non-destructive manner by just deleting the style block.\n *\n * We can't apply size via render as the measurement happens\n * in getSnapshotBeforeUpdate (post-render), likewise if we apply the\n * styles directly on the DOM node, we might be overwriting\n * styles set via the style prop.\n */\n useInsertionEffect(() => {\n const { width, height, top, left } = size.current;\n if (isPresent || !ref.current || !width || !height)\n return;\n ref.current.dataset.motionPopId = id;\n const style = document.createElement(\"style\");\n if (nonce)\n style.nonce = nonce;\n document.head.appendChild(style);\n if (style.sheet) {\n style.sheet.insertRule(`\n [data-motion-pop-id=\"${id}\"] {\n position: absolute !important;\n width: ${width}px !important;\n height: ${height}px !important;\n top: ${top}px !important;\n left: ${left}px !important;\n }\n `);\n }\n return () => {\n document.head.removeChild(style);\n };\n }, [isPresent]);\n return (React.createElement(PopChildMeasure, { isPresent: isPresent, childRef: ref, sizeRef: size }, React.cloneElement(children, { ref })));\n}\n\nexport { PopChild };\n","import * as React from 'react';\nimport { useId, useMemo } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { useConstant } from '../../utils/use-constant.mjs';\nimport { PopChild } from './PopChild.mjs';\n\nconst PresenceChild = ({ children, initial, isPresent, onExitComplete, custom, presenceAffectsLayout, mode, }) => {\n const presenceChildren = useConstant(newChildrenMap);\n const id = useId();\n const context = useMemo(() => ({\n id,\n initial,\n isPresent,\n custom,\n onExitComplete: (childId) => {\n presenceChildren.set(childId, true);\n for (const isComplete of presenceChildren.values()) {\n if (!isComplete)\n return; // can stop searching when any is incomplete\n }\n onExitComplete && onExitComplete();\n },\n register: (childId) => {\n presenceChildren.set(childId, false);\n return () => presenceChildren.delete(childId);\n },\n }), \n /**\n * If the presence of a child affects the layout of the components around it,\n * we want to make a new context value to ensure they get re-rendered\n * so they can detect that layout change.\n */\n presenceAffectsLayout ? undefined : [isPresent]);\n useMemo(() => {\n presenceChildren.forEach((_, key) => presenceChildren.set(key, false));\n }, [isPresent]);\n /**\n * If there's no `motion` components to fire exit animations, we want to remove this\n * component immediately.\n */\n React.useEffect(() => {\n !isPresent &&\n !presenceChildren.size &&\n onExitComplete &&\n onExitComplete();\n }, [isPresent]);\n if (mode === \"popLayout\") {\n children = React.createElement(PopChild, { isPresent: isPresent }, children);\n }\n return (React.createElement(PresenceContext.Provider, { value: context }, children));\n};\nfunction newChildrenMap() {\n return new Map();\n}\n\nexport { PresenceChild };\n","import { useEffect } from 'react';\n\nfunction useUnmountEffect(callback) {\n return useEffect(() => () => callback(), []);\n}\n\nexport { useUnmountEffect };\n","import * as React from 'react';\nimport { useContext, useRef, cloneElement, Children, isValidElement } from 'react';\nimport { useForceUpdate } from '../../utils/use-force-update.mjs';\nimport { useIsMounted } from '../../utils/use-is-mounted.mjs';\nimport { PresenceChild } from './PresenceChild.mjs';\nimport { LayoutGroupContext } from '../../context/LayoutGroupContext.mjs';\nimport { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.mjs';\nimport { useUnmountEffect } from '../../utils/use-unmount-effect.mjs';\nimport { invariant } from '../../utils/errors.mjs';\n\nconst getChildKey = (child) => child.key || \"\";\nfunction updateChildLookup(children, allChildren) {\n children.forEach((child) => {\n const key = getChildKey(child);\n allChildren.set(key, child);\n });\n}\nfunction onlyElements(children) {\n const filtered = [];\n // We use forEach here instead of map as map mutates the component key by preprending `.$`\n Children.forEach(children, (child) => {\n if (isValidElement(child))\n filtered.push(child);\n });\n return filtered;\n}\n/**\n * `AnimatePresence` enables the animation of components that have been removed from the tree.\n *\n * When adding/removing more than a single child, every child **must** be given a unique `key` prop.\n *\n * Any `motion` components that have an `exit` property defined will animate out when removed from\n * the tree.\n *\n * ```jsx\n * import { motion, AnimatePresence } from 'framer-motion'\n *\n * export const Items = ({ items }) => (\n * <AnimatePresence>\n * {items.map(item => (\n * <motion.div\n * key={item.id}\n * initial={{ opacity: 0 }}\n * animate={{ opacity: 1 }}\n * exit={{ opacity: 0 }}\n * />\n * ))}\n * </AnimatePresence>\n * )\n * ```\n *\n * You can sequence exit animations throughout a tree using variants.\n *\n * If a child contains multiple `motion` components with `exit` props, it will only unmount the child\n * once all `motion` components have finished animating out. Likewise, any components using\n * `usePresence` all need to call `safeToRemove`.\n *\n * @public\n */\nconst AnimatePresence = ({ children, custom, initial = true, onExitComplete, exitBeforeEnter, presenceAffectsLayout = true, mode = \"sync\", }) => {\n invariant(!exitBeforeEnter, \"Replace exitBeforeEnter with mode='wait'\");\n // We want to force a re-render once all exiting animations have finished. We\n // either use a local forceRender function, or one from a parent context if it exists.\n const forceRender = useContext(LayoutGroupContext).forceRender || useForceUpdate()[0];\n const isMounted = useIsMounted();\n // Filter out any children that aren't ReactElements. We can only track ReactElements with a props.key\n const filteredChildren = onlyElements(children);\n let childrenToRender = filteredChildren;\n const exitingChildren = useRef(new Map()).current;\n // Keep a living record of the children we're actually rendering so we\n // can diff to figure out which are entering and exiting\n const presentChildren = useRef(childrenToRender);\n // A lookup table to quickly reference components by key\n const allChildren = useRef(new Map()).current;\n // If this is the initial component render, just deal with logic surrounding whether\n // we play onMount animations or not.\n const isInitialRender = useRef(true);\n useIsomorphicLayoutEffect(() => {\n isInitialRender.current = false;\n updateChildLookup(filteredChildren, allChildren);\n presentChildren.current = childrenToRender;\n });\n useUnmountEffect(() => {\n isInitialRender.current = true;\n allChildren.clear();\n exitingChildren.clear();\n });\n if (isInitialRender.current) {\n return (React.createElement(React.Fragment, null, childrenToRender.map((child) => (React.createElement(PresenceChild, { key: getChildKey(child), isPresent: true, initial: initial ? undefined : false, presenceAffectsLayout: presenceAffectsLayout, mode: mode }, child)))));\n }\n // If this is a subsequent render, deal with entering and exiting children\n childrenToRender = [...childrenToRender];\n // Diff the keys of the currently-present and target children to update our\n // exiting list.\n const presentKeys = presentChildren.current.map(getChildKey);\n const targetKeys = filteredChildren.map(getChildKey);\n // Diff the present children with our target children and mark those that are exiting\n const numPresent = presentKeys.length;\n for (let i = 0; i < numPresent; i++) {\n const key = presentKeys[i];\n if (targetKeys.indexOf(key) === -1 && !exitingChildren.has(key)) {\n exitingChildren.set(key, undefined);\n }\n }\n // If we currently have exiting children, and we're deferring rendering incoming children\n // until after all current children have exiting, empty the childrenToRender array\n if (mode === \"wait\" && exitingChildren.size) {\n childrenToRender = [];\n }\n // Loop through all currently exiting components and clone them to overwrite `animate`\n // with any `exit` prop they might have defined.\n exitingChildren.forEach((component, key) => {\n // If this component is actually entering again, early return\n if (targetKeys.indexOf(key) !== -1)\n return;\n const child = allChildren.get(key);\n if (!child)\n return;\n const insertionIndex = presentKeys.indexOf(key);\n let exitingComponent = component;\n if (!exitingComponent) {\n const onExit = () => {\n // clean up the exiting children map\n exitingChildren.delete(key);\n // compute the keys of children that were rendered once but are no longer present\n // this could happen in case of too many fast consequent renderings\n // @link https://github.com/framer/motion/issues/2023\n const leftOverKeys = Array.from(allChildren.keys()).filter((childKey) => !targetKeys.includes(childKey));\n // clean up the all children map\n leftOverKeys.forEach((leftOverKey) => allChildren.delete(leftOverKey));\n // make sure to render only the children that are actually visible\n presentChildren.current = filteredChildren.filter((presentChild) => {\n const presentChildKey = getChildKey(presentChild);\n return (\n // filter out the node exiting\n presentChildKey === key ||\n // filter out the leftover children\n leftOverKeys.includes(presentChildKey));\n });\n // Defer re-rendering until all exiting children have indeed left\n if (!exitingChildren.size) {\n if (isMounted.current === false)\n return;\n forceRender();\n onExitComplete && onExitComplete();\n }\n };\n exitingComponent = (React.createElement(PresenceChild, { key: getChildKey(child), isPresent: false, onExitComplete: onExit, custom: custom, presenceAffectsLayout: presenceAffectsLayout, mode: mode }, child));\n exitingChildren.set(key, exitingComponent);\n }\n childrenToRender.splice(insertionIndex, 0, exitingComponent);\n });\n // Add `MotionContext` even to children that don't need it to ensure we're rendering\n // the same tree between renders\n childrenToRender = childrenToRender.map((child) => {\n const key = child.key;\n return exitingChildren.has(key) ? (child) : (React.createElement(PresenceChild, { key: getChildKey(child), isPresent: true, presenceAffectsLayout: presenceAffectsLayout, mode: mode }, child));\n });\n if (process.env.NODE_ENV !== \"production\" &&\n mode === \"wait\" &&\n childrenToRender.length > 1) {\n console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to \"wait\". This will lead to odd visual behaviour.`);\n }\n return (React.createElement(React.Fragment, null, exitingChildren.size\n ? childrenToRender\n : childrenToRender.map((child) => cloneElement(child))));\n};\n\nexport { AnimatePresence };\n","import \"./index29.css\";\nimport { j as s } from \"./jsx-runtime-944c88e2.js\";\nimport { useReducedMotion as S, motion as H, AnimatePresence as J } from \"framer-motion\";\nimport * as P from \"react\";\nimport { forwardRef as k, useRef as O, useContext as z, useState as T, useCallback as C, useEffect as E, createContext as Q, useId as X, useMemo as Y } from \"react\";\nimport { useMergeRefs as M } from \"@floating-ui/react\";\nimport R from \"classnames\";\nimport { Icon as D } from \"./Icon.js\";\nimport \"tinycolor2\";\nimport \"@servicetitan/hammer-token\";\nimport { a as Z } from \"./useLayoutPropsUtil-e307abc7.js\";\nconst $ = \"_tab_sqv8x_4\", F = \"_inner_sqv8x_70\", tt = \"_indicator_sqv8x_83\", et = \"_scroller_sqv8x_117\", rt = \"_right_sqv8x_125\", ot = \"_left_sqv8x_125\", nt = \"_fill_sqv8x_145\", u = {\n tab: $,\n \"tab-panel\": \"_tab-panel_sqv8x_17\",\n \"tab-button\": \"_tab-button_sqv8x_18\",\n \"tab-list\": \"_tab-list_sqv8x_19\",\n \"overflow-prev\": \"_overflow-prev_sqv8x_32\",\n \"overflow-next\": \"_overflow-next_sqv8x_33\",\n inner: F,\n indicator: tt,\n scroller: et,\n right: rt,\n left: ot,\n fill: nt\n}, K = k(\n (b, g) => {\n const p = O(null), y = S(), {\n current: w,\n items: r,\n setCurrent: a,\n focus: m,\n setFocus: l,\n uid: x,\n onKeyDownHandler: t\n } = z(A), {\n onClick: v,\n children: _,\n onFocus: d,\n onKeyDown: e,\n controls: o,\n id: i,\n className: I,\n ...c\n } = b, f = r && Array.prototype.indexOf.call(r, p.current), q = (h) => {\n f !== void 0 && (v == null || v(h, f), a == null || a(f), l == null || l(f), r == null || r[f].focus());\n }, j = (h) => {\n t == null || t(h), e == null || e(h);\n }, N = R(u[\"tab-button\"], I);\n return /* @__PURE__ */ s.jsxs(\n \"button\",\n {\n type: \"button\",\n role: \"tab\",\n \"data-anv\": \"TabButton\",\n id: i,\n className: N,\n \"aria-selected\": (r == null ? void 0 : r[w].id) === i,\n \"aria-controls\": o,\n onClick: q,\n onKeyDown: j,\n tabIndex: (r == null ? void 0 : r[m].id) === i ? 0 : -1,\n ...c,\n ref: M([p, g]),\n children: [\n /* @__PURE__ */ s.jsx(\"span\", { className: u.inner, children: _ }),\n (r == null ? void 0 : r[w].id) === i && /* @__PURE__ */ s.jsx(\n H.span,\n {\n layoutId: x,\n className: u.indicator,\n transition: { duration: y ? 0 : 0.2 }\n }\n )\n ]\n }\n );\n }\n);\nK.displayName = \"TabButton\";\nconst at = (b) => /* @__PURE__ */ P.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: \"1em\", height: \"1em\", viewBox: \"0 0 24 24\", ...b }, /* @__PURE__ */ P.createElement(\"path\", { d: \"M19 11H7.83l4.88-4.88c.39-.39.39-1.03 0-1.42a.996.996 0 0 0-1.41 0l-6.59 6.59a.996.996 0 0 0 0 1.41l6.59 6.59a.996.996 0 1 0 1.41-1.41L7.83 13H19c.55 0 1-.45 1-1s-.45-1-1-1z\" })), st = (b) => /* @__PURE__ */ P.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: \"1em\", height: \"1em\", viewBox: \"0 0 24 24\", ...b }, /* @__PURE__ */ P.createElement(\"path\", { d: \"M5 13h11.17l-4.88 4.88c-.39.39-.39 1.03 0 1.42.39.39 1.02.39 1.41 0l6.59-6.59a.996.996 0 0 0 0-1.41l-6.58-6.6a.996.996 0 1 0-1.41 1.41L16.17 11H5c-.55 0-1 .45-1 1s.45 1 1 1z\" })), W = k(\n (b, g) => {\n const { className: p, children: y, onKeyDown: w, ...r } = b, { goToPrev: a, gotoNext: m, dir: l } = z(A), [x, t] = T(!1), [v, _] = T(!1), d = O(null), e = C(\n (c) => {\n const f = l === \"ltr\" ? c.scrollLeft > 0 : c.scrollLeft > c.offsetWidth - c.scrollWidth + 1, q = l === \"ltr\" ? c.scrollLeft < c.scrollWidth - c.offsetWidth : c.scrollLeft < 0;\n t(f), _(q);\n },\n [l]\n );\n E(() => {\n d.current && e(d.current);\n }, [e]);\n const o = (c) => {\n const f = c.target;\n e(f);\n }, i = R(u[\"tab-list\"], p), I = R(u.scroller, {\n [u.left]: x,\n [u.right]: v\n });\n return /* @__PURE__ */ s.jsxs(\"div\", { ...r, className: i, \"data-anv\": \"TabList\", ref: g, children: [\n (l === \"ltr\" ? x : v) && /* @__PURE__ */ s.jsx(\n \"button\",\n {\n tabIndex: -1,\n onClick: () => a == null ? void 0 : a(!1),\n className: u[\"overflow-prev\"],\n \"aria-label\": \"Previous tab\",\n children: /* @__PURE__ */ s.jsx(D, { svg: at, \"aria-hidden\": !0, size: \"medium\" })\n }\n ),\n /* @__PURE__ */ s.jsx(\n \"div\",\n {\n onScroll: o,\n className: I,\n role: \"tablist\",\n ref: d,\n children: y\n }\n ),\n (l === \"ltr\" ? v : x) && /* @__PURE__ */ s.jsx(\n \"button\",\n {\n tabIndex: -1,\n onClick: () => m == null ? void 0 : m(!1),\n className: u[\"overflow-next\"],\n \"aria-label\": \"Next tab\",\n children: /* @__PURE__ */ s.jsx(D, { svg: st, \"aria-hidden\": !0, size: \"medium\" })\n }\n )\n ] });\n }\n);\nW.displayName = \"TabList\";\nconst V = k(\n (b, g) => {\n var d;\n const { id: p, className: y, ...w } = b, { current: r, items: a } = z(A), m = S();\n let l;\n a == null || a.forEach((e, o) => {\n e.getAttribute(\"aria-controls\") === p && (l = e.id);\n });\n const t = ((d = a == null ? void 0 : a[r]) == null ? void 0 : d.getAttribute(\"aria-controls\")) === p, v = m ? {\n enter: {\n opacity: 0\n },\n center: {\n zIndex: 1,\n opacity: 1\n },\n exit: {\n zIndex: 0,\n opacity: 0\n }\n } : {\n enter: {\n y: 50,\n opacity: 0\n },\n center: {\n zIndex: 1,\n y: 0,\n opacity: 1\n },\n exit: {\n zIndex: 0,\n y: -50,\n opacity: 0\n }\n }, _ = R(u[\"tab-panel\"], y);\n return t ? /* @__PURE__ */ s.jsx(\n H.div,\n {\n variants: v,\n initial: \"enter\",\n animate: \"center\",\n exit: \"exit\",\n className: _,\n transition: {\n x: {\n type: \"spring\",\n stiffness: 300,\n damping: 30\n },\n opacity: { duration: 1 }\n },\n ...w,\n role: \"tabpanel\",\n \"data-anv\": \"TabPanel\",\n id: p,\n \"aria-labelledby\": l,\n tabIndex: 0,\n ref: g\n }\n ) : /* @__PURE__ */ s.jsx(s.Fragment, {});\n }\n);\nV.displayName = \"TabPanel\";\nconst lt = {\n current: 0,\n focus: 0\n}, A = Q(lt), U = k((b, g) => {\n const { layoutStyles: p, componentProps: y } = Z(b), { defaultIndex: w, className: r, style: a, fill: m, ...l } = y, x = O(null), [t, v] = T(), [_, d] = T(w ?? 0), [e, o] = T(w ?? 0), [i, I] = T(\"ltr\"), c = R(u.tab, r, {\n [u.fill]: m\n }), f = X();\n E(() => {\n var n;\n v((n = x.current) == null ? void 0 : n.querySelectorAll(\"[role=tab]:not([disabled])\"));\n }, [x]), E(() => {\n var n, L;\n ((L = (n = x.current) == null ? void 0 : n.closest(\"[dir]\")) == null ? void 0 : L.getAttribute(\"dir\")) === \"rtl\" ? I(\"rtl\") : I(\"ltr\");\n }, []);\n const q = {\n ...a,\n ...p\n }, j = (n) => {\n n == null || n.scrollIntoView({\n behavior: \"smooth\",\n block: \"nearest\",\n inline: \"center\"\n });\n }, N = C(\n (n = !0) => {\n if (e + 1 === (t == null ? void 0 : t.length)) {\n o == null || o(0), t == null || t[0].focus(), j(t == null ? void 0 : t[0]);\n return;\n }\n o == null || o(e + 1), t == null || t[e + 1].focus(), j(t == null ? void 0 : t[e + 1]);\n },\n [e, t]\n ), h = C(\n (n = !0) => {\n if (e === 0) {\n const L = t ? (t == null ? void 0 : t.length) - 1 : 0;\n o == null || o(L), t == null || t[L].focus(), j(t == null ? void 0 : t[L]);\n return;\n }\n o == null || o(e - 1), t == null || t[e - 1].focus(), j(t == null ? void 0 : t[e - 1]);\n },\n [e, t]\n ), B = C(\n (n) => {\n switch (console.log(\"working\", n), n.code) {\n case \"Enter\":\n case \"Space\":\n n.preventDefault(), d == null || d(e);\n break;\n case \"ArrowRight\":\n n.preventDefault(), i === \"ltr\" ? N() : h();\n break;\n case \"ArrowLeft\":\n n.preventDefault(), i === \"ltr\" ? h() : N();\n break;\n }\n },\n [i, e, h, N]\n ), G = Y(\n () => ({\n current: _,\n setCurrent: d,\n focus: e,\n setFocus: o,\n items: t,\n uid: f,\n onKeyDownHandler: B,\n gotoNext: N,\n goToPrev: h,\n dir: i\n }),\n [_, e, h, N, t, B, f, i]\n );\n return /* @__PURE__ */ s.jsx(A.Provider, { value: G, children: /* @__PURE__ */ s.jsx(J, { initial: !1, children: /* @__PURE__ */ s.jsx(\n \"div\",\n {\n className: c,\n \"data-anv\": \"Tab\",\n style: q,\n ...l,\n ref: M([x, g])\n }\n ) }) });\n});\nU.displayName = \"Tab\";\nconst mt = Object.assign(U, {\n Button: K,\n List: W,\n Panel: V\n});\nexport {\n mt as Tab,\n K as TabButton,\n W as TabList,\n V as TabPanel\n};\n//# sourceMappingURL=Tab.js.map\n"],"names":["useIsMounted","isMounted","useRef","useIsomorphicLayoutEffect","useForceUpdate","forcedRenderCount","setForcedRenderCount","useState","forceRender","useCallback","frame","PopChildMeasure","React","prevProps","element","size","PopChild","children","isPresent","id","useId","ref","nonce","useContext","MotionConfigContext","useInsertionEffect","width","height","top","left","style","PresenceChild","initial","onExitComplete","custom","presenceAffectsLayout","mode","presenceChildren","useConstant","newChildrenMap","context","useMemo","childId","isComplete","_","key","PresenceContext","useUnmountEffect","callback","useEffect","getChildKey","child","updateChildLookup","allChildren","onlyElements","filtered","Children","isValidElement","AnimatePresence","exitBeforeEnter","invariant","LayoutGroupContext","filteredChildren","childrenToRender","exitingChildren","presentChildren","isInitialRender","presentKeys","targetKeys","numPresent","i","component","insertionIndex","exitingComponent","onExit","leftOverKeys","childKey","leftOverKey","presentChild","presentChildKey","cloneElement","$","F","tt","et","rt","ot","nt","u","K","forwardRef","b","g","p","y","useReducedMotion","w","r","a","m","l","x","t","A","v","d","e","o","c","f","q","h","j","N","K$1","fr","useMergeRefs","motion","at","st","W","I$1","I","V","lt","createContext","U","J","n","L","B","G","mt"],"mappings":";;;;;;;;;;AAGA,SAAAA,IAAA;AACA,QAAAC,IAAAC,EAAA,EAAA;AACA,SAAAC,EAAA,OACAF,EAAA,UAAA,IACA,MAAA;AACA,IAAAA,EAAA,UAAA;AAAA,EACA,IACA,CAAA,CAAA,GACAA;AACA;ACRA,SAAAG,KAAA;AACA,QAAAH,IAAAD,EAAA,GACA,CAAAK,GAAAC,CAAA,IAAAC,EAAA,CAAA,GACAC,IAAAC,EAA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,OAAA4B,GAAA,UAAA,gBAAAhB,EAAA,IAAAzD,IAAA,EAAA,SAAA,IAAA,UAAA,gBAAAyD,EAAA;AAAA,IACA;AAAA,IACA;AAAA,MACA,WAAAP;AAAA,MACA,YAAA;AAAA,MACA,OAAAE;AAAA,MACA,GAAAV;AAAA,MACA,KAAAgB,EAAA,CAAAf,GAAAT,CAAA,CAAA;AAAA,IACA;AAAA,EACA,EAAA,CAAA,EAAA,CAAA;AACA,CAAA;AACAkC,EAAA,cAAA;AACK,MAAAM,KAAA,OAAA,OAAAN,GAAA;AAAA,EACL,QAAArC;AAAA,EACA,MAAA+B;AAAA,EACA,OAAAG;AACA,CAAA;","x_google_ignoreList":[0,1,2,3,4,5,6]}
|
package/Tab-cce7124e.cjs
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
var fe=require("./Tab.css");const w=require("./jsx-runtime-944c88e2-2b81c205.cjs"),t=require("react"),F=require("./floating-ui.react-34d1b069.cjs"),z=require("./index-2bd62884.cjs"),O=require("./Icon-f1045beb.cjs"),H=require("./useLayoutPropsUtil-e307abc7-9cffb4b6.cjs"),B=require("./use-reduced-motion-00575ab2.cjs"),I=require("./motion-f7215751.cjs");function $(n){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const r in n)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(s,r,o.get?o:{enumerable:!0,get:()=>n[r]})}}return s.default=n,Object.freeze(s)}const b=$(t);function U(){const n=t.useRef(!1);return I.useIsomorphicLayoutEffect(()=>(n.current=!0,()=>{n.current=!1}),[]),n}function V(){const n=U(),[s,r]=t.useState(0),o=t.useCallback(()=>{n.current&&r(s+1)},[s]);return[t.useCallback(()=>I.frame.postRender(o),[o]),s]}class G extends b.Component{getSnapshotBeforeUpdate(s){const r=this.props.childRef.current;if(r&&s.isPresent&&!this.props.isPresent){const o=this.props.sizeRef.current;o.height=r.offsetHeight||0,o.width=r.offsetWidth||0,o.top=r.offsetTop,o.left=r.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function J({children:n,isPresent:s}){const r=t.useId(),o=t.useRef(null),y=t.useRef({width:0,height:0,top:0,left:0}),{nonce:a}=t.useContext(I.MotionConfigContext);return t.useInsertionEffect(()=>{const{width:p,height:d,top:h,left:f}=y.current;if(s||!o.current||!p||!d)return;o.current.dataset.motionPopId=r;const e=document.createElement("style");return a&&(e.nonce=a),document.head.appendChild(e),e.sheet&&e.sheet.insertRule(`
|
|
2
|
+
[data-motion-pop-id="${r}"] {
|
|
3
|
+
position: absolute !important;
|
|
4
|
+
width: ${p}px !important;
|
|
5
|
+
height: ${d}px !important;
|
|
6
|
+
top: ${h}px !important;
|
|
7
|
+
left: ${f}px !important;
|
|
8
|
+
}
|
|
9
|
+
`),()=>{document.head.removeChild(e)}},[s]),b.createElement(G,{isPresent:s,childRef:o,sizeRef:y},b.cloneElement(n,{ref:o}))}const S=({children:n,initial:s,isPresent:r,onExitComplete:o,custom:y,presenceAffectsLayout:a,mode:p})=>{const d=I.useConstant(Y),h=t.useId(),f=t.useMemo(()=>({id:h,initial:s,isPresent:r,custom:y,onExitComplete:e=>{d.set(e,!0);for(const c of d.values())if(!c)return;o&&o()},register:e=>(d.set(e,!1),()=>d.delete(e))}),a?void 0:[r]);return t.useMemo(()=>{d.forEach((e,c)=>d.set(c,!1))},[r]),b.useEffect(()=>{!r&&!d.size&&o&&o()},[r]),p==="popLayout"&&(n=b.createElement(J,{isPresent:r},n)),b.createElement(I.PresenceContext.Provider,{value:f},n)};function Y(){return new Map}function Q(n){return t.useEffect(()=>()=>n(),[])}const M=n=>n.key||"";function X(n,s){n.forEach(r=>{const o=M(r);s.set(o,r)})}function Z(n){const s=[];return t.Children.forEach(n,r=>{t.isValidElement(r)&&s.push(r)}),s}const ee=({children:n,custom:s,initial:r=!0,onExitComplete:o,exitBeforeEnter:y,presenceAffectsLayout:a=!0,mode:p="sync"})=>{I.invariant(!y,"Replace exitBeforeEnter with mode='wait'");const d=t.useContext(I.LayoutGroupContext).forceRender||V()[0],h=U(),f=Z(n);let e=f;const c=t.useRef(new Map).current,_=t.useRef(e),v=t.useRef(new Map).current,i=t.useRef(!0);if(I.useIsomorphicLayoutEffect(()=>{i.current=!1,X(f,v),_.current=e}),Q(()=>{i.current=!0,v.clear(),c.clear()}),i.current)return b.createElement(b.Fragment,null,e.map(l=>b.createElement(S,{key:M(l),isPresent:!0,initial:r?void 0:!1,presenceAffectsLayout:a,mode:p},l)));e=[...e];const x=_.current.map(M),g=f.map(M),q=x.length;for(let l=0;l<q;l++){const u=x[l];g.indexOf(u)===-1&&!c.has(u)&&c.set(u,void 0)}return p==="wait"&&c.size&&(e=[]),c.forEach((l,u)=>{if(g.indexOf(u)!==-1)return;const N=v.get(u);if(!N)return;const j=x.indexOf(u);let C=l;if(!C){const R=()=>{c.delete(u);const P=Array.from(v.keys()).filter(k=>!g.includes(k));if(P.forEach(k=>v.delete(k)),_.current=f.filter(k=>{const m=M(k);return m===u||P.includes(m)}),!c.size){if(h.current===!1)return;d(),o&&o()}};C=b.createElement(S,{key:M(N),isPresent:!1,onExitComplete:R,custom:s,presenceAffectsLayout:a,mode:p},N),c.set(u,C)}e.splice(j,0,C)}),e=e.map(l=>{const u=l.key;return c.has(u)?l:b.createElement(S,{key:M(l),isPresent:!0,presenceAffectsLayout:a,mode:p},l)}),process.env.NODE_ENV!=="production"&&p==="wait"&&e.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),b.createElement(b.Fragment,null,c.size?e:e.map(l=>t.cloneElement(l)))};const te="_tab_sqv8x_4",ne="_inner_sqv8x_70",re="_indicator_sqv8x_83",oe="_scroller_sqv8x_117",se="_right_sqv8x_125",le="_left_sqv8x_125",ie="_fill_sqv8x_145",E={tab:te,"tab-panel":"_tab-panel_sqv8x_17","tab-button":"_tab-button_sqv8x_18","tab-list":"_tab-list_sqv8x_19","overflow-prev":"_overflow-prev_sqv8x_32","overflow-next":"_overflow-next_sqv8x_33",inner:ne,indicator:re,scroller:oe,right:se,left:le,fill:ie},T=t.forwardRef((n,s)=>{const r=t.useRef(null),o=B.useReducedMotion(),{current:y,items:a,setCurrent:p,focus:d,setFocus:h,uid:f,onKeyDownHandler:e}=t.useContext(K),{onClick:c,children:_,onFocus:v,onKeyDown:i,controls:x,id:g,className:q,...l}=n,u=a&&Array.prototype.indexOf.call(a,r.current),N=R=>{u!==void 0&&(c==null||c(R,u),p==null||p(u),h==null||h(u),a==null||a[u].focus())},j=R=>{e==null||e(R),i==null||i(R)},C=z.K(E["tab-button"],q);return w.fr.jsxs("button",{type:"button",role:"tab","data-anv":"TabButton",id:g,className:C,"aria-selected":(a==null?void 0:a[y].id)===g,"aria-controls":x,onClick:N,onKeyDown:j,tabIndex:(a==null?void 0:a[d].id)===g?0:-1,...l,ref:F.useMergeRefs([r,s]),children:[w.fr.jsx("span",{className:E.inner,children:_}),(a==null?void 0:a[y].id)===g&&w.fr.jsx(I.motion.span,{layoutId:f,className:E.indicator,transition:{duration:o?0:.2}})]})});T.displayName="TabButton";const ae=n=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...n},b.createElement("path",{d:"M19 11H7.83l4.88-4.88c.39-.39.39-1.03 0-1.42a.996.996 0 0 0-1.41 0l-6.59 6.59a.996.996 0 0 0 0 1.41l6.59 6.59a.996.996 0 1 0 1.41-1.41L7.83 13H19c.55 0 1-.45 1-1s-.45-1-1-1z"})),ce=n=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...n},b.createElement("path",{d:"M5 13h11.17l-4.88 4.88c-.39.39-.39 1.03 0 1.42.39.39 1.02.39 1.41 0l6.59-6.59a.996.996 0 0 0 0-1.41l-6.58-6.6a.996.996 0 1 0-1.41 1.41L16.17 11H5c-.55 0-1 .45-1 1s.45 1 1 1z"})),A=t.forwardRef((n,s)=>{const{className:r,children:o,onKeyDown:y,...a}=n,{goToPrev:p,gotoNext:d,dir:h}=t.useContext(K),[f,e]=t.useState(!1),[c,_]=t.useState(!1),v=t.useRef(null),i=t.useCallback(l=>{const u=h==="ltr"?l.scrollLeft>0:l.scrollLeft>l.offsetWidth-l.scrollWidth+1,N=h==="ltr"?l.scrollLeft<l.scrollWidth-l.offsetWidth:l.scrollLeft<0;e(u),_(N)},[h]);t.useEffect(()=>{v.current&&i(v.current)},[i]);const x=l=>{const u=l.target;i(u)},g=z.K(E["tab-list"],r),q=z.K(E.scroller,{[E.left]:f,[E.right]:c});return w.fr.jsxs("div",{...a,className:g,"data-anv":"TabList",ref:s,children:[(h==="ltr"?f:c)&&w.fr.jsx("button",{tabIndex:-1,onClick:()=>p==null?void 0:p(!1),className:E["overflow-prev"],"aria-label":"Previous tab",children:w.fr.jsx(O.I,{svg:ae,"aria-hidden":!0,size:"medium"})}),w.fr.jsx("div",{onScroll:x,className:q,role:"tablist",ref:v,children:o}),(h==="ltr"?c:f)&&w.fr.jsx("button",{tabIndex:-1,onClick:()=>d==null?void 0:d(!1),className:E["overflow-next"],"aria-label":"Next tab",children:w.fr.jsx(O.I,{svg:ce,"aria-hidden":!0,size:"medium"})})]})});A.displayName="TabList";const D=t.forwardRef((n,s)=>{var r;const{id:o,className:y,...a}=n,{current:p,items:d}=t.useContext(K),h=B.useReducedMotion();let f;d==null||d.forEach((v,i)=>{v.getAttribute("aria-controls")===o&&(f=v.id)});const e=((r=d==null?void 0:d[p])==null?void 0:r.getAttribute("aria-controls"))===o,c=h?{enter:{opacity:0},center:{zIndex:1,opacity:1},exit:{zIndex:0,opacity:0}}:{enter:{y:50,opacity:0},center:{zIndex:1,y:0,opacity:1},exit:{zIndex:0,y:-50,opacity:0}},_=z.K(E["tab-panel"],y);return e?w.fr.jsx(I.motion.div,{variants:c,initial:"enter",animate:"center",exit:"exit",className:_,transition:{x:{type:"spring",stiffness:300,damping:30},opacity:{duration:1}},...a,role:"tabpanel","data-anv":"TabPanel",id:o,"aria-labelledby":f,tabIndex:0,ref:s}):w.fr.jsx(w.fr.Fragment,{})});D.displayName="TabPanel";const ue={current:0,focus:0},K=t.createContext(ue),W=t.forwardRef((n,s)=>{const{layoutStyles:r,componentProps:o}=H.J(n),{defaultIndex:y,className:a,style:p,fill:d,...h}=o,f=t.useRef(null),[e,c]=t.useState(),[_,v]=t.useState(y??0),[i,x]=t.useState(y??0),[g,q]=t.useState("ltr"),l=z.K(E.tab,a,{[E.fill]:d}),u=t.useId();t.useEffect(()=>{var m;c((m=f.current)==null?void 0:m.querySelectorAll("[role=tab]:not([disabled])"))},[f]),t.useEffect(()=>{var m,L;((L=(m=f.current)==null?void 0:m.closest("[dir]"))==null?void 0:L.getAttribute("dir"))==="rtl"?q("rtl"):q("ltr")},[]);const N={...p,...r},j=m=>{m==null||m.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})},C=t.useCallback((m=!0)=>{if(i+1===(e==null?void 0:e.length)){x==null||x(0),e==null||e[0].focus(),j(e==null?void 0:e[0]);return}x==null||x(i+1),e==null||e[i+1].focus(),j(e==null?void 0:e[i+1])},[i,e]),R=t.useCallback((m=!0)=>{if(i===0){const L=e?(e==null?void 0:e.length)-1:0;x==null||x(L),e==null||e[L].focus(),j(e==null?void 0:e[L]);return}x==null||x(i-1),e==null||e[i-1].focus(),j(e==null?void 0:e[i-1])},[i,e]),P=t.useCallback(m=>{switch(console.log("working",m),m.code){case"Enter":case"Space":m.preventDefault(),v==null||v(i);break;case"ArrowRight":m.preventDefault(),g==="ltr"?C():R();break;case"ArrowLeft":m.preventDefault(),g==="ltr"?R():C();break}},[g,i,R,C]),k=t.useMemo(()=>({current:_,setCurrent:v,focus:i,setFocus:x,items:e,uid:u,onKeyDownHandler:P,gotoNext:C,goToPrev:R,dir:g}),[_,i,R,C,e,P,u,g]);return w.fr.jsx(K.Provider,{value:k,children:w.fr.jsx(ee,{initial:!1,children:w.fr.jsx("div",{className:l,"data-anv":"Tab",style:N,...h,ref:F.useMergeRefs([f,s])})})})});W.displayName="Tab";const de=Object.assign(W,{Button:T,List:A,Panel:D});exports.K=T;exports.V=D;exports.W=A;exports.mt=de;
|
|
10
|
+
//# sourceMappingURL=Tab-cce7124e.cjs.map
|