@servicetitan/anvil2 1.3.2 → 1.3.4
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-673d75aa.cjs +2 -0
- package/Alert-673d75aa.cjs.map +1 -0
- package/{Alert-012e475c.js → Alert-85a791c2.js} +29 -27
- package/Alert-85a791c2.js.map +1 -0
- package/Alert.cjs +1 -1
- package/Alert.js +1 -1
- package/Announcement.cjs +1 -1
- package/Announcement.cjs.map +1 -1
- package/Announcement.js +99 -15
- package/Announcement.js.map +1 -1
- package/AnvilProvider.cjs +1 -1
- package/AnvilProvider.js +1 -1
- package/Avatar.cjs +1 -1
- package/Avatar.cjs.map +1 -1
- package/Avatar.js +127 -12
- package/Avatar.js.map +1 -1
- package/Badge.cjs +1 -1
- package/Badge.cjs.map +1 -1
- package/Badge.js +47 -7
- package/Badge.js.map +1 -1
- package/Button.cjs +1 -1
- package/Button.cjs.map +1 -1
- package/Button.js +14 -40
- package/Button.js.map +1 -1
- package/ButtonCompound.cjs +1 -1
- package/ButtonCompound.cjs.map +1 -1
- package/ButtonCompound.js +13 -39
- package/ButtonCompound.js.map +1 -1
- package/ButtonLink.cjs +1 -1
- package/ButtonLink.cjs.map +1 -1
- package/ButtonLink.js +14 -40
- package/ButtonLink.js.map +1 -1
- package/ButtonToggle.cjs +1 -1
- package/ButtonToggle.cjs.map +1 -1
- package/ButtonToggle.js +14 -40
- package/ButtonToggle.js.map +1 -1
- package/Calendar.cjs +1 -1
- package/Calendar.cjs.map +1 -1
- package/Calendar.js +5812 -24
- package/Calendar.js.map +1 -1
- package/Card.cjs +1 -1
- package/Card.cjs.map +1 -1
- package/Card.js +52 -6
- package/Card.js.map +1 -1
- package/Checkbox-634c4d3d.js +164 -0
- package/Checkbox-634c4d3d.js.map +1 -0
- package/Checkbox-d1db5a71.cjs +2 -0
- package/Checkbox-d1db5a71.cjs.map +1 -0
- package/Checkbox.cjs +1 -1
- package/Checkbox.cjs.map +1 -1
- package/Checkbox.css +1 -0
- package/Checkbox.js +23 -49
- package/Checkbox.js.map +1 -1
- package/{Chip-6dde28bc.js → Chip-73b032eb.js} +36 -34
- package/Chip-73b032eb.js.map +1 -0
- package/Chip-88873569.cjs +2 -0
- package/Chip-88873569.cjs.map +1 -0
- package/Chip.cjs +1 -1
- package/Chip.js +1 -1
- package/Combobox.cjs +41 -1
- package/Combobox.cjs.map +1 -1
- package/Combobox.js +4177 -76
- package/Combobox.js.map +1 -1
- package/Details.cjs +1 -1
- package/Details.cjs.map +1 -1
- package/Details.js +153 -50
- package/Details.js.map +1 -1
- package/Dialog-1984afe2.js +214 -0
- package/Dialog-1984afe2.js.map +1 -0
- package/Dialog-de6969a2.cjs +2 -0
- package/Dialog-de6969a2.cjs.map +1 -0
- package/Dialog.cjs +1 -1
- package/Dialog.cjs.map +1 -1
- package/Dialog.css +1 -0
- package/Dialog.js +38 -64
- package/Dialog.js.map +1 -1
- package/Divider.cjs +1 -1
- package/Divider.cjs.map +1 -1
- package/Divider.js +76 -7
- package/Divider.js.map +1 -1
- package/Drawer.cjs +1 -1
- package/Drawer.cjs.map +1 -1
- package/Drawer.js +242 -70
- package/Drawer.js.map +1 -1
- package/{Flex-d338e855.js → Flex-d06c75c0.js} +18 -17
- package/Flex-d06c75c0.js.map +1 -0
- package/Flex-da1ad9db.cjs +2 -0
- package/Flex-da1ad9db.cjs.map +1 -0
- package/Flex.cjs +1 -1
- package/Flex.js +1 -1
- package/Grid.cjs +1 -1
- package/Grid.cjs.map +1 -1
- package/Grid.js +90 -6
- package/Grid.js.map +1 -1
- package/{Helper-74a1f07f-61317df2.cjs → Helper-74a1f07f-8fcd0721.cjs} +2 -2
- package/{Helper-74a1f07f-61317df2.cjs.map → Helper-74a1f07f-8fcd0721.cjs.map} +1 -1
- package/{Helper-74a1f07f-092263c4.js → Helper-74a1f07f-d017affe.js} +3 -3
- package/{Helper-74a1f07f-092263c4.js.map → Helper-74a1f07f-d017affe.js.map} +1 -1
- package/Icon-847b3515.cjs +2 -0
- package/Icon-847b3515.cjs.map +1 -0
- package/{Icon-b94f924c.js → Icon-be690f0b.js} +13 -12
- package/Icon-be690f0b.js.map +1 -0
- package/Icon.cjs +1 -1
- package/Icon.js +1 -1
- package/Label-854a39e4.js +47 -0
- package/Label-854a39e4.js.map +1 -0
- package/Label-e2593298.cjs +2 -0
- package/Label-e2593298.cjs.map +1 -0
- package/Label.css +1 -0
- package/Layout.cjs +1 -1
- package/Layout.cjs.map +1 -1
- package/Layout.js +21 -21
- package/Layout.js.map +1 -1
- package/Link.cjs +1 -1
- package/Link.cjs.map +1 -1
- package/Link.js +17 -43
- package/Link.js.map +1 -1
- package/ListView.cjs +1 -1
- package/ListView.cjs.map +1 -1
- package/ListView.css +1 -1
- package/ListView.js +412 -24
- package/ListView.js.map +1 -1
- package/ListView.module-854f2491-1f87d388.cjs +2 -0
- package/ListView.module-854f2491-1f87d388.cjs.map +1 -0
- package/ListView.module-854f2491-c5eba193.js +11 -0
- package/ListView.module-854f2491-c5eba193.js.map +1 -0
- package/Listbox.cjs +1 -1
- package/Listbox.cjs.map +1 -1
- package/Listbox.js +403 -25
- package/Listbox.js.map +1 -1
- package/Listbox.module-2120a0a7-794d64a0.cjs +2 -0
- package/Listbox.module-2120a0a7-794d64a0.cjs.map +1 -0
- package/Listbox.module-2120a0a7-aa22f0ed.js +13 -0
- package/Listbox.module-2120a0a7-aa22f0ed.js.map +1 -0
- package/LocalizationProvider.cjs +1 -1
- package/LocalizationProvider.cjs.map +1 -1
- package/LocalizationProvider.js +11 -10
- package/LocalizationProvider.js.map +1 -1
- package/Menu.cjs +1 -1
- package/Menu.cjs.map +1 -1
- package/Menu.js +320 -51
- package/Menu.js.map +1 -1
- package/Overflow-057bbf4e.cjs +2 -0
- package/Overflow-057bbf4e.cjs.map +1 -0
- package/Overflow-a026904d.js +249 -0
- package/Overflow-a026904d.js.map +1 -0
- package/Overflow.cjs +1 -1
- package/Overflow.cjs.map +1 -1
- package/Overflow.css +1 -0
- package/Overflow.js +23 -49
- package/Overflow.js.map +1 -1
- package/Page.cjs +1 -1
- package/Page.cjs.map +1 -1
- package/Page.js +8 -8
- package/Page.js.map +1 -1
- package/Popover-aaeea980.js +272 -0
- package/Popover-aaeea980.js.map +1 -0
- package/Popover-e336dabc.cjs +2 -0
- package/Popover-e336dabc.cjs.map +1 -0
- package/Popover.cjs +1 -1
- package/Popover.cjs.map +1 -1
- package/Popover.css +1 -0
- package/Popover.js +38 -64
- package/Popover.js.map +1 -1
- package/ProgressBar.cjs +1 -1
- package/ProgressBar.cjs.map +1 -1
- package/ProgressBar.js +121 -7
- package/ProgressBar.js.map +1 -1
- package/Radio.cjs +1 -1
- package/Radio.cjs.map +1 -1
- package/Radio.js +142 -50
- package/Radio.js.map +1 -1
- package/SegmentedControl.cjs +1 -1
- package/SegmentedControl.cjs.map +1 -1
- package/SegmentedControl.js +133 -58
- package/SegmentedControl.js.map +1 -1
- package/SideNav.cjs +1 -29
- package/SideNav.cjs.map +1 -1
- package/SideNav.js +258 -1139
- package/SideNav.js.map +1 -1
- package/SrOnly-0c7fd87a.js +13 -0
- package/{SrOnly-864bd4cb.js.map → SrOnly-0c7fd87a.js.map} +1 -1
- package/SrOnly-91a467dc.cjs +2 -0
- package/{SrOnly-88e8fca6.cjs.map → SrOnly-91a467dc.cjs.map} +1 -1
- package/SrOnly.cjs +1 -1
- package/SrOnly.js +1 -1
- package/Stepper.cjs +1 -1
- package/Stepper.cjs.map +1 -1
- package/Stepper.js +430 -47
- package/Stepper.js.map +1 -1
- package/Switch.cjs +1 -1
- package/Switch.cjs.map +1 -1
- package/Switch.js +67 -44
- package/Switch.js.map +1 -1
- package/Tab.cjs +9 -1
- package/Tab.cjs.map +1 -1
- package/Tab.js +436 -24
- package/Tab.js.map +1 -1
- package/{Text-465104f6.js → Text-08c90c22.js} +30 -29
- package/Text-08c90c22.js.map +1 -0
- package/Text-8ed03ac7.cjs +2 -0
- package/Text-8ed03ac7.cjs.map +1 -0
- package/Text.cjs +1 -1
- package/Text.js +1 -1
- package/TextField.cjs +1 -1
- package/TextField.cjs.map +1 -1
- package/TextField.js +156 -47
- package/TextField.js.map +1 -1
- package/Textarea.cjs +1 -1
- package/Textarea.cjs.map +1 -1
- package/Textarea.js +260 -45
- package/Textarea.js.map +1 -1
- package/ThemeProvider.cjs +1 -1
- package/ThemeProvider.js +1 -1
- package/Toast.cjs +8 -1
- package/Toast.cjs.map +1 -1
- package/Toast.js +568 -9
- package/Toast.js.map +1 -1
- package/Tooltip-2ecbf35e.cjs +2 -0
- package/Tooltip-2ecbf35e.cjs.map +1 -0
- package/Tooltip-dcc5d45c.js +157 -0
- package/Tooltip-dcc5d45c.js.map +1 -0
- package/Tooltip.cjs +1 -1
- package/Tooltip.cjs.map +1 -1
- package/Tooltip.css +1 -0
- package/Tooltip.js +18 -44
- package/Tooltip.js.map +1 -1
- package/anvil2.cjs +1 -1
- package/anvil2.d.ts +6 -6
- package/anvil2.js +158 -183
- package/anvil2.js.map +1 -1
- package/check_circle-48e002d3-0d49b2da.cjs +2 -0
- package/check_circle-48e002d3-0d49b2da.cjs.map +1 -0
- package/check_circle-48e002d3-5838521c.js +7 -0
- package/check_circle-48e002d3-5838521c.js.map +1 -0
- package/chevron_right-5b0931b5-96f8a9c6.cjs +2 -0
- package/chevron_right-5b0931b5-96f8a9c6.cjs.map +1 -0
- package/chevron_right-5b0931b5-ac35ad56.js +6 -0
- package/chevron_right-5b0931b5-ac35ad56.js.map +1 -0
- package/childrenToString-0cd30a27.cjs +2 -0
- package/childrenToString-0cd30a27.cjs.map +1 -0
- package/childrenToString-416df522.js +19 -0
- package/childrenToString-416df522.js.map +1 -0
- package/extends-31d75778.js +27 -0
- package/extends-31d75778.js.map +1 -0
- package/extends-60b54772.cjs +2 -0
- package/extends-60b54772.cjs.map +1 -0
- package/getKeyboardFocusableElements-58a00025.js +14 -0
- package/getKeyboardFocusableElements-58a00025.js.map +1 -0
- package/getKeyboardFocusableElements-aba1bd01.cjs +2 -0
- package/getKeyboardFocusableElements-aba1bd01.cjs.map +1 -0
- package/index-04060912.js +3677 -0
- package/index-04060912.js.map +1 -0
- package/index-06c0bdf0.js +480 -0
- package/index-06c0bdf0.js.map +1 -0
- package/index-11b6ca91-14b4e485.js +63 -0
- package/index-11b6ca91-14b4e485.js.map +1 -0
- package/index-11b6ca91-d30fd1d3.cjs +2 -0
- package/index-11b6ca91-d30fd1d3.cjs.map +1 -0
- package/{index-acdc415f.cjs → index-1f4f169d.cjs} +2 -2
- package/{index-acdc415f.cjs.map → index-1f4f169d.cjs.map} +1 -1
- package/index-40821bc4.cjs +2 -0
- package/index-40821bc4.cjs.map +1 -0
- package/{index-ab05dabf.js → index-47e4931c.js} +3 -3
- package/{index-ab05dabf.js.map → index-47e4931c.js.map} +1 -1
- package/index-49242812.js +59 -0
- package/index-49242812.js.map +1 -0
- package/index-69174413.cjs +5 -0
- package/index-69174413.cjs.map +1 -0
- package/index-902bf2b0.js +56 -0
- package/index-902bf2b0.js.map +1 -0
- package/index-a53df036.cjs +2 -0
- package/index-a53df036.cjs.map +1 -0
- package/{index-e0f6271a.js → index-c6e22bb9.js} +6 -6
- package/{index-e0f6271a.js.map → index-c6e22bb9.js.map} +1 -1
- package/index-dcf78e3f.cjs +2 -0
- package/index-dcf78e3f.cjs.map +1 -0
- package/{index-3a4e28a9-3d7ba14f.js → index-eb2e706f-03380994.js} +19 -18
- package/index-eb2e706f-03380994.js.map +1 -0
- package/index-eb2e706f-ff6c4157.cjs +2 -0
- package/index-eb2e706f-ff6c4157.cjs.map +1 -0
- package/{index-67d20edb.cjs → index-ef2e9d11.cjs} +2 -2
- package/{index-67d20edb.cjs.map → index-ef2e9d11.cjs.map} +1 -1
- package/index.css +1 -1
- package/index11.css +1 -0
- package/index12.css +1 -0
- package/index13.css +1 -0
- package/index14.css +1 -0
- package/index15.css +1 -0
- package/index16.css +1 -0
- package/index18.css +1 -0
- package/index19.css +1 -0
- package/index2.css +1 -1
- package/index21.css +1 -0
- package/index22.css +1 -0
- package/index24.css +1 -0
- package/index3.css +1 -1
- package/index6.css +1 -0
- package/index7.css +1 -0
- package/index9.css +1 -0
- package/info-af4c0112-9f16129f.cjs +2 -0
- package/info-af4c0112-9f16129f.cjs.map +1 -0
- package/info-af4c0112-f73c8f68.js +6 -0
- package/info-af4c0112-f73c8f68.js.map +1 -0
- package/package.json +3 -3
- package/tinycolor-3b50a250.cjs +2 -0
- package/tinycolor-3b50a250.cjs.map +1 -0
- package/tinycolor-d415b1fd.js +712 -0
- package/tinycolor-d415b1fd.js.map +1 -0
- package/token.cjs +1 -1
- package/token.js +1 -1
- package/useAccessibleColor.cjs +1 -1
- package/useAccessibleColor.cjs.map +1 -1
- package/useAccessibleColor.d.ts +1 -1
- package/useAccessibleColor.js +36 -32
- package/useAccessibleColor.js.map +1 -1
- package/useLayoutPropsUtil-cd33328b.cjs +2 -0
- package/useLayoutPropsUtil-cd33328b.cjs.map +1 -0
- package/useLayoutPropsUtil-f34e9597.js +160 -0
- package/useLayoutPropsUtil-f34e9597.js.map +1 -0
- package/useLinkStyles.cjs +1 -1
- package/useLinkStyles.d.ts +2 -2
- package/useLinkStyles.js +3 -31
- package/useLinkStyles.js.map +1 -1
- package/useMergeRefs.cjs +1 -1
- package/useMergeRefs.d.ts +1 -1
- package/useMergeRefs.js +3 -32
- package/useMergeRefs.js.map +1 -1
- package/usePrefersColorScheme.cjs +1 -1
- package/usePrefersColorScheme.cjs.map +1 -1
- package/usePrefersColorScheme.d.ts +1 -1
- package/usePrefersColorScheme.js +19 -32
- package/usePrefersColorScheme.js.map +1 -1
- package/useSwipe.cjs +1 -1
- package/useSwipe.cjs.map +1 -1
- package/useSwipe.d.ts +1 -1
- package/useSwipe.js +15 -32
- package/useSwipe.js.map +1 -1
- package/Alert-012e475c.js.map +0 -1
- package/Alert-066f00f2.cjs +0 -2
- package/Alert-066f00f2.cjs.map +0 -1
- package/Announcement-cd9602ed.cjs +0 -2
- package/Announcement-cd9602ed.cjs.map +0 -1
- package/Announcement-f9b09ba3.js +0 -88
- package/Announcement-f9b09ba3.js.map +0 -1
- package/Announcement.css +0 -1
- package/Badge-b8764640.cjs +0 -2
- package/Badge-b8764640.cjs.map +0 -1
- package/Badge-df96f15a.js +0 -45
- package/Badge-df96f15a.js.map +0 -1
- package/Badge.css +0 -1
- package/Calendar-31bcb381.js +0 -5797
- package/Calendar-31bcb381.js.map +0 -1
- package/Calendar-d0baf4b1.cjs +0 -2
- package/Calendar-d0baf4b1.cjs.map +0 -1
- package/Card-20628287.cjs +0 -2
- package/Card-20628287.cjs.map +0 -1
- package/Card-bb358803.js +0 -51
- package/Card-bb358803.js.map +0 -1
- package/Chip-5b63e48c.cjs +0 -2
- package/Chip-5b63e48c.cjs.map +0 -1
- package/Chip-6dde28bc.js.map +0 -1
- package/Divider-6646eeb8.cjs +0 -2
- package/Divider-6646eeb8.cjs.map +0 -1
- package/Divider-b3bff73a.js +0 -74
- package/Divider-b3bff73a.js.map +0 -1
- package/Flex-971b5295.cjs +0 -2
- package/Flex-971b5295.cjs.map +0 -1
- package/Flex-d338e855.js.map +0 -1
- package/Grid-37ded954.cjs +0 -2
- package/Grid-37ded954.cjs.map +0 -1
- package/Grid-5bad450f.js +0 -89
- package/Grid-5bad450f.js.map +0 -1
- package/Icon-57c31c9b.cjs +0 -2
- package/Icon-57c31c9b.cjs.map +0 -1
- package/Icon-b94f924c.js.map +0 -1
- package/ListView-3b1adecb.js +0 -557
- package/ListView-3b1adecb.js.map +0 -1
- package/ListView-88e49b19.cjs +0 -2
- package/ListView-88e49b19.cjs.map +0 -1
- package/Listbox-60fbdaa1.js +0 -394
- package/Listbox-60fbdaa1.js.map +0 -1
- package/Listbox-cd5c4185.cjs +0 -2
- package/Listbox-cd5c4185.cjs.map +0 -1
- package/ProgressBar-c1b5c7c3.js +0 -516
- package/ProgressBar-c1b5c7c3.js.map +0 -1
- package/ProgressBar-fa511478.cjs +0 -2
- package/ProgressBar-fa511478.cjs.map +0 -1
- package/ProgressBar.css +0 -1
- package/SideNav-33a404ec.js +0 -935
- package/SideNav-33a404ec.js.map +0 -1
- package/SideNav-47435e45.cjs +0 -21
- package/SideNav-47435e45.cjs.map +0 -1
- package/SrOnly-864bd4cb.js +0 -13
- package/SrOnly-88e8fca6.cjs +0 -2
- package/Stepper-7e3a130c.js +0 -633
- package/Stepper-7e3a130c.js.map +0 -1
- package/Stepper-8675700c.cjs +0 -2
- package/Stepper-8675700c.cjs.map +0 -1
- package/Stepper.css +0 -1
- package/Tab-9d3d7922.cjs +0 -10
- package/Tab-9d3d7922.cjs.map +0 -1
- package/Tab-dd4ab045.js +0 -422
- package/Tab-dd4ab045.js.map +0 -1
- package/Text-465104f6.js.map +0 -1
- package/Text-631c229a.cjs +0 -2
- package/Text-631c229a.cjs.map +0 -1
- package/Toast-32a4ab22.cjs +0 -9
- package/Toast-32a4ab22.cjs.map +0 -1
- package/Toast-6cd7d2e1.js +0 -566
- package/Toast-6cd7d2e1.js.map +0 -1
- package/check_circle-48e002d3-0554de7d.js +0 -8
- package/check_circle-48e002d3-0554de7d.js.map +0 -1
- package/check_circle-48e002d3-57364fcd.cjs +0 -2
- package/check_circle-48e002d3-57364fcd.cjs.map +0 -1
- package/floating-ui.react-51a3fa68.js +0 -23242
- package/floating-ui.react-51a3fa68.js.map +0 -1
- package/floating-ui.react-5347095a.cjs +0 -178
- package/floating-ui.react-5347095a.cjs.map +0 -1
- package/index-3a4e28a9-3d7ba14f.js.map +0 -1
- package/index-3a4e28a9-b649e635.cjs +0 -2
- package/index-3a4e28a9-b649e635.cjs.map +0 -1
- package/index-3f218083.js +0 -58
- package/index-3f218083.js.map +0 -1
- package/index-63e13299.cjs +0 -2
- package/index-63e13299.cjs.map +0 -1
- package/index-c41dc41a.js +0 -4972
- package/index-c41dc41a.js.map +0 -1
- package/index-ca7c66ae.cjs +0 -23
- package/index-ca7c66ae.cjs.map +0 -1
- package/index-d46fa8de-c02f7a12.cjs +0 -2
- package/index-d46fa8de-c02f7a12.cjs.map +0 -1
- package/index-d46fa8de-f8bf17b6.js +0 -540
- package/index-d46fa8de-f8bf17b6.js.map +0 -1
- package/index-f7658447-1cfbda8f.js +0 -120
- package/index-f7658447-1cfbda8f.js.map +0 -1
- package/index-f7658447-f447ade8.cjs +0 -2
- package/index-f7658447-f447ade8.cjs.map +0 -1
- package/index-f7658447.css +0 -1
- package/useLayoutPropsUtil-e307abc7-3826ee09.cjs +0 -2
- package/useLayoutPropsUtil-e307abc7-3826ee09.cjs.map +0 -1
- package/useLayoutPropsUtil-e307abc7-cbe2fb6d.js +0 -869
- package/useLayoutPropsUtil-e307abc7-cbe2fb6d.js.map +0 -1
- package/usePrefersColorScheme-129544ad-59e2e284.cjs +0 -2
- package/usePrefersColorScheme-129544ad-59e2e284.cjs.map +0 -1
- package/usePrefersColorScheme-129544ad-cab6fc3f.js +0 -55
- package/usePrefersColorScheme-129544ad-cab6fc3f.js.map +0 -1
- package/useSwipe-82769b09-835234e6.js +0 -17
- package/useSwipe-82769b09-835234e6.js.map +0 -1
- package/useSwipe-82769b09-dba26ed2.cjs +0 -2
- package/useSwipe-82769b09-dba26ed2.cjs.map +0 -1
- /package/{index-3a4e28a9.css → index-eb2e706f.css} +0 -0
- /package/{Grid.css → index10.css} +0 -0
- /package/{SideNav.css → index17.css} +0 -0
- /package/{Tab.css → index20.css} +0 -0
- /package/{Toast.css → index23.css} +0 -0
- /package/{Calendar.css → index4.css} +0 -0
- /package/{Card.css → index5.css} +0 -0
- /package/{Divider.css → index8.css} +0 -0
package/SegmentedControl.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
var G=require("./index16.css");Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const x=require("./jsx-runtime-494437bb.cjs"),s=require("./jsx-runtime-944c88e2-2b81c205.cjs"),r=require("react"),j=require("./index-ef2e9d11.cjs"),y=require("./Icon-847b3515.cjs"),I=require("./index-69174413.cjs"),N=require("./use-reduced-motion-a766a46b.cjs"),M=require("./motion-dae3950e.cjs");require("./tinycolor-3b50a250.cjs");require("./index-dcf78e3f.cjs");const v=require("./useTrackingId.cjs");const O="_legend_1w0sh_5",b="_children_1w0sh_6",E="_segment_1w0sh_4",T="_fill_1w0sh_82",P="_small_1w0sh_85",p="_medium_1w0sh_94",a={"segmented-control":"_segmented-control_1w0sh_4",legend:O,children:b,"select-indicator":"_select-indicator_1w0sh_7",segment:E,fill:T,small:P,"icon-only":"_icon-only_1w0sh_91",medium:p},S=r.forwardRef((e,o)=>{const{icon:t,value:n,children:d,className:m,...g}=e,_=N.useReducedMotion(),{current:i,setCurrent:c,name:l,onChange:u}=r.useContext(R),f=r.useRef(null),h=()=>{c==null||c(n),u==null||u(n)},C=j.G(a.segment,m,{[a["icon-only"]]:t&&!d});return s.fr.jsx(s.fr.Fragment,{children:s.fr.jsxs("label",{className:C,ref:I.useMergeRefs([f,o]),"data-anv":"segmented-control-segment",...g,children:[s.fr.jsx("input",{type:"radio",name:l,value:n,onChange:h,checked:i===n,"aria-checked":i===n}),t?s.fr.jsx(y.C,{svg:t,"aria-hidden":!0}):null,d,i===n&&s.fr.jsx(M.motion.span,{layoutId:l,transition:{duration:_?0:.2},className:a["select-indicator"]})]})})});S.displayName="Segmented Control Segment";const R=r.createContext({}),w=r.forwardRef((e,o)=>{const{className:t,onClick:n,onChange:d,children:m,size:g="medium",defaultSelected:_,name:i,fill:c,...l}=e,[u,f]=r.useState(_),h=j.G(a["segmented-control"],a[g],t,{[a.fill]:c}),C=r.useId();return s.fr.jsx("div",{role:"radiogroup",className:h,"data-anv":"segmented-control",ref:o,...l,children:s.fr.jsx(R.Provider,{value:{current:u,setCurrent:f,name:i??C,onChange:d},children:m})})});w.displayName="Segmented Control";const z=Object.assign(w,{Segment:S}),F=r.forwardRef((e,o)=>{const t={name:e.name},n=v.useTrackingId({name:"SegmentedControl",data:t,hasOverride:!!e["data-tracking-id"]});return x.jsxRuntimeExports.jsx(z,{ref:o,"data-tracking-id":n,...e})}),k=r.forwardRef((e,o)=>{const t={value:e.value},n=v.useTrackingId({name:"SegmentedControlSegment",data:t,hasOverride:!!e["data-tracking-id"]});return x.jsxRuntimeExports.jsx(S,{ref:o,"data-tracking-id":n,...e})}),q=Object.assign(F,{Segment:k});exports.SegmentedControl=q;exports.SegmentedControlSegment=k;exports.default=q;
|
|
2
2
|
//# sourceMappingURL=SegmentedControl.cjs.map
|
package/SegmentedControl.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentedControl.cjs","sources":["../src/components/SegmentedControl/SegmentedControl.tsx"],"sourcesContent":["import {\n SegmentedControlProps as CoreSegmentedControlProps,\n SegmentedControl as CoreSegmentedControl,\n SegmentedControlSegmentProps as CoreSegmentedControlSegmentProps,\n SegmentedControlSegment as CoreSegmentedControlSegment,\n} from \"@servicetitan/hammer-react/dist/SegmentedControl\";\nimport { Ref, forwardRef } from \"react\";\nimport { useTrackingId } from \"../../hooks\";\nimport { DataTrackingId } from \"../../types/DataTrackingId\";\n\nexport type SegmentedControlProps = CoreSegmentedControlProps & DataTrackingId;\nexport type SegmentedControlSegmentProps = CoreSegmentedControlSegmentProps &\n DataTrackingId;\n\nconst SegmentedControlElement = forwardRef(\n (props: SegmentedControlProps, ref: Ref<HTMLDivElement>) => {\n const data = {\n name: props.name,\n };\n\n const trackingId = useTrackingId({\n name: \"SegmentedControl\",\n data,\n hasOverride: !!props[\"data-tracking-id\"],\n });\n\n return (\n <CoreSegmentedControl\n ref={ref}\n data-tracking-id={trackingId}\n {...props}\n />\n );\n }\n);\n\nexport const SegmentedControlSegment = forwardRef(\n (props: SegmentedControlSegmentProps, ref: Ref<HTMLLabelElement>) => {\n const data = {\n value: props.value,\n };\n\n const trackingId = useTrackingId({\n name: \"SegmentedControlSegment\",\n data,\n hasOverride: !!props[\"data-tracking-id\"],\n });\n return (\n <CoreSegmentedControlSegment\n ref={ref}\n data-tracking-id={trackingId}\n {...props}\n />\n );\n }\n);\n\nexport const SegmentedControl = Object.assign(SegmentedControlElement, {\n Segment: SegmentedControlSegment,\n});\n"],"names":["
|
|
1
|
+
{"version":3,"file":"SegmentedControl.cjs","sources":["../node_modules/@servicetitan/hammer-react/dist/SegmentedControl.js","../src/components/SegmentedControl/SegmentedControl.tsx"],"sourcesContent":["import \"./index25.css\";\nimport { j as e } from \"./jsx-runtime-944c88e2.js\";\nimport { forwardRef as p, useContext as w, useRef as N, createContext as y, useState as v, useId as R } from \"react\";\nimport x from \"classnames\";\nimport { useReducedMotion as b, motion as k } from \"framer-motion\";\nimport { Icon as I } from \"./Icon.js\";\nimport { useMergeRefs as M } from \"@floating-ui/react\";\nconst E = \"_legend_1w0sh_5\", z = \"_children_1w0sh_6\", F = \"_segment_1w0sh_4\", H = \"_fill_1w0sh_82\", O = \"_small_1w0sh_85\", P = \"_medium_1w0sh_94\", t = {\n \"segmented-control\": \"_segmented-control_1w0sh_4\",\n legend: E,\n children: z,\n \"select-indicator\": \"_select-indicator_1w0sh_7\",\n segment: F,\n fill: H,\n small: O,\n \"icon-only\": \"_icon-only_1w0sh_91\",\n medium: P\n}, C = p((a, i) => {\n const { icon: o, value: n, children: c, className: d, ...g } = a, u = b(), { current: s, setCurrent: l, name: m, onChange: r } = w(\n S\n ), _ = N(null), h = () => {\n l == null || l(n), r == null || r(n);\n }, f = x(t.segment, d, {\n [t[\"icon-only\"]]: o && !c\n });\n return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs(\n \"label\",\n {\n className: f,\n ref: M([_, i]),\n \"data-anv\": \"segmented-control-segment\",\n ...g,\n children: [\n /* @__PURE__ */ e.jsx(\n \"input\",\n {\n type: \"radio\",\n name: m,\n value: n,\n onChange: h,\n checked: s === n,\n \"aria-checked\": s === n\n }\n ),\n o ? /* @__PURE__ */ e.jsx(I, { svg: o, \"aria-hidden\": !0 }) : null,\n c,\n s === n && /* @__PURE__ */ e.jsx(\n k.span,\n {\n layoutId: m,\n transition: {\n duration: u ? 0 : 0.2\n },\n className: t[\"select-indicator\"]\n }\n )\n ]\n }\n ) });\n});\nC.displayName = \"Segmented Control Segment\";\nconst S = y({}), j = p((a, i) => {\n const {\n className: o,\n onClick: n,\n onChange: c,\n children: d,\n size: g = \"medium\",\n defaultSelected: u,\n name: s,\n fill: l,\n ...m\n } = a, [r, _] = v(u), h = x(\n t[\"segmented-control\"],\n t[g],\n o,\n {\n [t.fill]: l\n }\n ), f = R();\n return /* @__PURE__ */ e.jsx(\n \"div\",\n {\n role: \"radiogroup\",\n className: h,\n \"data-anv\": \"segmented-control\",\n ref: i,\n ...m,\n children: /* @__PURE__ */ e.jsx(\n S.Provider,\n {\n value: { current: r, setCurrent: _, name: s ?? f, onChange: c },\n children: d\n }\n )\n }\n );\n});\nj.displayName = \"Segmented Control\";\nconst L = Object.assign(j, {\n Segment: C\n});\nexport {\n L as SegmentedControl,\n C as SegmentedControlSegment\n};\n//# sourceMappingURL=SegmentedControl.js.map\n","import {\n SegmentedControlProps as CoreSegmentedControlProps,\n SegmentedControl as CoreSegmentedControl,\n SegmentedControlSegmentProps as CoreSegmentedControlSegmentProps,\n SegmentedControlSegment as CoreSegmentedControlSegment,\n} from \"@servicetitan/hammer-react/dist/SegmentedControl\";\nimport { Ref, forwardRef } from \"react\";\nimport { useTrackingId } from \"../../hooks\";\nimport { DataTrackingId } from \"../../types/DataTrackingId\";\n\nexport type SegmentedControlProps = CoreSegmentedControlProps & DataTrackingId;\nexport type SegmentedControlSegmentProps = CoreSegmentedControlSegmentProps &\n DataTrackingId;\n\nconst SegmentedControlElement = forwardRef(\n (props: SegmentedControlProps, ref: Ref<HTMLDivElement>) => {\n const data = {\n name: props.name,\n };\n\n const trackingId = useTrackingId({\n name: \"SegmentedControl\",\n data,\n hasOverride: !!props[\"data-tracking-id\"],\n });\n\n return (\n <CoreSegmentedControl\n ref={ref}\n data-tracking-id={trackingId}\n {...props}\n />\n );\n }\n);\n\nexport const SegmentedControlSegment = forwardRef(\n (props: SegmentedControlSegmentProps, ref: Ref<HTMLLabelElement>) => {\n const data = {\n value: props.value,\n };\n\n const trackingId = useTrackingId({\n name: \"SegmentedControlSegment\",\n data,\n hasOverride: !!props[\"data-tracking-id\"],\n });\n return (\n <CoreSegmentedControlSegment\n ref={ref}\n data-tracking-id={trackingId}\n {...props}\n />\n );\n }\n);\n\nexport const SegmentedControl = Object.assign(SegmentedControlElement, {\n Segment: SegmentedControlSegment,\n});\n"],"names":["E","z","F","H","O","P","t","C","React","a","i","o","c","d","u","useReducedMotion","s","l","m","r","S","_","f","index","jsxRuntime944c88e2","useMergeRefs","Icon","motion","j","L","SegmentedControlElement","props","ref","data","trackingId","useTrackingId","jsxRuntime","SegmentedControlSegment","SegmentedControl"],"mappings":"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","x_google_ignoreList":[0]}
|
package/SegmentedControl.js
CHANGED
|
@@ -1,76 +1,151 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import "
|
|
5
|
-
import "./
|
|
6
|
-
import "./
|
|
7
|
-
import "./
|
|
8
|
-
import "./
|
|
9
|
-
import "./
|
|
10
|
-
import "./
|
|
11
|
-
import "./
|
|
12
|
-
import "./
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
1
|
+
import "./index16.css";
|
|
2
|
+
import { j as S } from "./jsx-runtime-82a9ddf6.js";
|
|
3
|
+
import { f as a } from "./jsx-runtime-944c88e2-e73fa629.js";
|
|
4
|
+
import { forwardRef as c, useContext as w, useRef as y, createContext as N, useState as I, useId as O } from "react";
|
|
5
|
+
import { G as j } from "./index-c6e22bb9.js";
|
|
6
|
+
import { C as R } from "./Icon-be690f0b.js";
|
|
7
|
+
import { u as b } from "./index-04060912.js";
|
|
8
|
+
import { u as E } from "./use-reduced-motion-b359504d.js";
|
|
9
|
+
import { m as z } from "./motion-a0a946d6.js";
|
|
10
|
+
import "./tinycolor-d415b1fd.js";
|
|
11
|
+
import "./index-902bf2b0.js";
|
|
12
|
+
import { useTrackingId as p } from "./useTrackingId.js";
|
|
13
|
+
const F = "_legend_1w0sh_5", M = "_children_1w0sh_6", P = "_segment_1w0sh_4", G = "_fill_1w0sh_82", H = "_small_1w0sh_85", L = "_medium_1w0sh_94", o = {
|
|
14
|
+
"segmented-control": "_segmented-control_1w0sh_4",
|
|
15
|
+
legend: F,
|
|
16
|
+
children: M,
|
|
17
|
+
"select-indicator": "_select-indicator_1w0sh_7",
|
|
18
|
+
segment: P,
|
|
19
|
+
fill: G,
|
|
20
|
+
small: H,
|
|
21
|
+
"icon-only": "_icon-only_1w0sh_91",
|
|
22
|
+
medium: L
|
|
23
|
+
}, x = c((e, r) => {
|
|
24
|
+
const { icon: t, value: n, children: m, className: g, ...u } = e, _ = E(), { current: s, setCurrent: i, name: l, onChange: d } = w(
|
|
25
|
+
v
|
|
26
|
+
), h = y(null), f = () => {
|
|
27
|
+
i == null || i(n), d == null || d(n);
|
|
28
|
+
}, C = j(o.segment, g, {
|
|
29
|
+
[o["icon-only"]]: t && !m
|
|
30
|
+
});
|
|
31
|
+
return /* @__PURE__ */ a.jsx(a.Fragment, { children: /* @__PURE__ */ a.jsxs(
|
|
32
|
+
"label",
|
|
33
|
+
{
|
|
34
|
+
className: C,
|
|
35
|
+
ref: b([h, r]),
|
|
36
|
+
"data-anv": "segmented-control-segment",
|
|
37
|
+
...u,
|
|
38
|
+
children: [
|
|
39
|
+
/* @__PURE__ */ a.jsx(
|
|
40
|
+
"input",
|
|
41
|
+
{
|
|
42
|
+
type: "radio",
|
|
43
|
+
name: l,
|
|
44
|
+
value: n,
|
|
45
|
+
onChange: f,
|
|
46
|
+
checked: s === n,
|
|
47
|
+
"aria-checked": s === n
|
|
48
|
+
}
|
|
49
|
+
),
|
|
50
|
+
t ? /* @__PURE__ */ a.jsx(R, { svg: t, "aria-hidden": !0 }) : null,
|
|
51
|
+
m,
|
|
52
|
+
s === n && /* @__PURE__ */ a.jsx(
|
|
53
|
+
z.span,
|
|
54
|
+
{
|
|
55
|
+
layoutId: l,
|
|
56
|
+
transition: {
|
|
57
|
+
duration: _ ? 0 : 0.2
|
|
58
|
+
},
|
|
59
|
+
className: o["select-indicator"]
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
) });
|
|
65
|
+
});
|
|
66
|
+
x.displayName = "Segmented Control Segment";
|
|
67
|
+
const v = N({}), k = c((e, r) => {
|
|
68
|
+
const {
|
|
69
|
+
className: t,
|
|
70
|
+
onClick: n,
|
|
71
|
+
onChange: m,
|
|
72
|
+
children: g,
|
|
73
|
+
size: u = "medium",
|
|
74
|
+
defaultSelected: _,
|
|
75
|
+
name: s,
|
|
76
|
+
fill: i,
|
|
77
|
+
...l
|
|
78
|
+
} = e, [d, h] = I(_), f = j(
|
|
79
|
+
o["segmented-control"],
|
|
80
|
+
o[u],
|
|
81
|
+
t,
|
|
82
|
+
{
|
|
83
|
+
[o.fill]: i
|
|
84
|
+
}
|
|
85
|
+
), C = O();
|
|
86
|
+
return /* @__PURE__ */ a.jsx(
|
|
87
|
+
"div",
|
|
88
|
+
{
|
|
89
|
+
role: "radiogroup",
|
|
90
|
+
className: f,
|
|
91
|
+
"data-anv": "segmented-control",
|
|
92
|
+
ref: r,
|
|
93
|
+
...l,
|
|
94
|
+
children: /* @__PURE__ */ a.jsx(
|
|
95
|
+
v.Provider,
|
|
96
|
+
{
|
|
97
|
+
value: { current: d, setCurrent: h, name: s ?? C, onChange: m },
|
|
98
|
+
children: g
|
|
99
|
+
}
|
|
100
|
+
)
|
|
101
|
+
}
|
|
102
|
+
);
|
|
103
|
+
});
|
|
104
|
+
k.displayName = "Segmented Control";
|
|
105
|
+
const T = Object.assign(k, {
|
|
106
|
+
Segment: x
|
|
107
|
+
}), $ = c(
|
|
108
|
+
(e, r) => {
|
|
109
|
+
const t = {
|
|
110
|
+
name: e.name
|
|
111
|
+
}, n = p({
|
|
37
112
|
name: "SegmentedControl",
|
|
38
|
-
data:
|
|
39
|
-
hasOverride: !!
|
|
113
|
+
data: t,
|
|
114
|
+
hasOverride: !!e["data-tracking-id"]
|
|
40
115
|
});
|
|
41
|
-
return /* @__PURE__ */
|
|
42
|
-
|
|
116
|
+
return /* @__PURE__ */ S.jsx(
|
|
117
|
+
T,
|
|
43
118
|
{
|
|
44
119
|
ref: r,
|
|
45
|
-
"data-tracking-id":
|
|
46
|
-
...
|
|
120
|
+
"data-tracking-id": n,
|
|
121
|
+
...e
|
|
47
122
|
}
|
|
48
123
|
);
|
|
49
124
|
}
|
|
50
|
-
),
|
|
51
|
-
(
|
|
52
|
-
const
|
|
53
|
-
value:
|
|
54
|
-
},
|
|
125
|
+
), q = c(
|
|
126
|
+
(e, r) => {
|
|
127
|
+
const t = {
|
|
128
|
+
value: e.value
|
|
129
|
+
}, n = p({
|
|
55
130
|
name: "SegmentedControlSegment",
|
|
56
|
-
data:
|
|
57
|
-
hasOverride: !!
|
|
131
|
+
data: t,
|
|
132
|
+
hasOverride: !!e["data-tracking-id"]
|
|
58
133
|
});
|
|
59
|
-
return /* @__PURE__ */
|
|
60
|
-
|
|
134
|
+
return /* @__PURE__ */ S.jsx(
|
|
135
|
+
x,
|
|
61
136
|
{
|
|
62
137
|
ref: r,
|
|
63
|
-
"data-tracking-id":
|
|
64
|
-
...
|
|
138
|
+
"data-tracking-id": n,
|
|
139
|
+
...e
|
|
65
140
|
}
|
|
66
141
|
);
|
|
67
142
|
}
|
|
68
|
-
),
|
|
69
|
-
Segment:
|
|
143
|
+
), ee = Object.assign($, {
|
|
144
|
+
Segment: q
|
|
70
145
|
});
|
|
71
146
|
export {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
147
|
+
ee as SegmentedControl,
|
|
148
|
+
q as SegmentedControlSegment,
|
|
149
|
+
ee as default
|
|
75
150
|
};
|
|
76
151
|
//# sourceMappingURL=SegmentedControl.js.map
|
package/SegmentedControl.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentedControl.js","sources":["../src/components/SegmentedControl/SegmentedControl.tsx"],"sourcesContent":["import {\n SegmentedControlProps as CoreSegmentedControlProps,\n SegmentedControl as CoreSegmentedControl,\n SegmentedControlSegmentProps as CoreSegmentedControlSegmentProps,\n SegmentedControlSegment as CoreSegmentedControlSegment,\n} from \"@servicetitan/hammer-react/dist/SegmentedControl\";\nimport { Ref, forwardRef } from \"react\";\nimport { useTrackingId } from \"../../hooks\";\nimport { DataTrackingId } from \"../../types/DataTrackingId\";\n\nexport type SegmentedControlProps = CoreSegmentedControlProps & DataTrackingId;\nexport type SegmentedControlSegmentProps = CoreSegmentedControlSegmentProps &\n DataTrackingId;\n\nconst SegmentedControlElement = forwardRef(\n (props: SegmentedControlProps, ref: Ref<HTMLDivElement>) => {\n const data = {\n name: props.name,\n };\n\n const trackingId = useTrackingId({\n name: \"SegmentedControl\",\n data,\n hasOverride: !!props[\"data-tracking-id\"],\n });\n\n return (\n <CoreSegmentedControl\n ref={ref}\n data-tracking-id={trackingId}\n {...props}\n />\n );\n }\n);\n\nexport const SegmentedControlSegment = forwardRef(\n (props: SegmentedControlSegmentProps, ref: Ref<HTMLLabelElement>) => {\n const data = {\n value: props.value,\n };\n\n const trackingId = useTrackingId({\n name: \"SegmentedControlSegment\",\n data,\n hasOverride: !!props[\"data-tracking-id\"],\n });\n return (\n <CoreSegmentedControlSegment\n ref={ref}\n data-tracking-id={trackingId}\n {...props}\n />\n );\n }\n);\n\nexport const SegmentedControl = Object.assign(SegmentedControlElement, {\n Segment: SegmentedControlSegment,\n});\n"],"names":["
|
|
1
|
+
{"version":3,"file":"SegmentedControl.js","sources":["../node_modules/@servicetitan/hammer-react/dist/SegmentedControl.js","../src/components/SegmentedControl/SegmentedControl.tsx"],"sourcesContent":["import \"./index25.css\";\nimport { j as e } from \"./jsx-runtime-944c88e2.js\";\nimport { forwardRef as p, useContext as w, useRef as N, createContext as y, useState as v, useId as R } from \"react\";\nimport x from \"classnames\";\nimport { useReducedMotion as b, motion as k } from \"framer-motion\";\nimport { Icon as I } from \"./Icon.js\";\nimport { useMergeRefs as M } from \"@floating-ui/react\";\nconst E = \"_legend_1w0sh_5\", z = \"_children_1w0sh_6\", F = \"_segment_1w0sh_4\", H = \"_fill_1w0sh_82\", O = \"_small_1w0sh_85\", P = \"_medium_1w0sh_94\", t = {\n \"segmented-control\": \"_segmented-control_1w0sh_4\",\n legend: E,\n children: z,\n \"select-indicator\": \"_select-indicator_1w0sh_7\",\n segment: F,\n fill: H,\n small: O,\n \"icon-only\": \"_icon-only_1w0sh_91\",\n medium: P\n}, C = p((a, i) => {\n const { icon: o, value: n, children: c, className: d, ...g } = a, u = b(), { current: s, setCurrent: l, name: m, onChange: r } = w(\n S\n ), _ = N(null), h = () => {\n l == null || l(n), r == null || r(n);\n }, f = x(t.segment, d, {\n [t[\"icon-only\"]]: o && !c\n });\n return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs(\n \"label\",\n {\n className: f,\n ref: M([_, i]),\n \"data-anv\": \"segmented-control-segment\",\n ...g,\n children: [\n /* @__PURE__ */ e.jsx(\n \"input\",\n {\n type: \"radio\",\n name: m,\n value: n,\n onChange: h,\n checked: s === n,\n \"aria-checked\": s === n\n }\n ),\n o ? /* @__PURE__ */ e.jsx(I, { svg: o, \"aria-hidden\": !0 }) : null,\n c,\n s === n && /* @__PURE__ */ e.jsx(\n k.span,\n {\n layoutId: m,\n transition: {\n duration: u ? 0 : 0.2\n },\n className: t[\"select-indicator\"]\n }\n )\n ]\n }\n ) });\n});\nC.displayName = \"Segmented Control Segment\";\nconst S = y({}), j = p((a, i) => {\n const {\n className: o,\n onClick: n,\n onChange: c,\n children: d,\n size: g = \"medium\",\n defaultSelected: u,\n name: s,\n fill: l,\n ...m\n } = a, [r, _] = v(u), h = x(\n t[\"segmented-control\"],\n t[g],\n o,\n {\n [t.fill]: l\n }\n ), f = R();\n return /* @__PURE__ */ e.jsx(\n \"div\",\n {\n role: \"radiogroup\",\n className: h,\n \"data-anv\": \"segmented-control\",\n ref: i,\n ...m,\n children: /* @__PURE__ */ e.jsx(\n S.Provider,\n {\n value: { current: r, setCurrent: _, name: s ?? f, onChange: c },\n children: d\n }\n )\n }\n );\n});\nj.displayName = \"Segmented Control\";\nconst L = Object.assign(j, {\n Segment: C\n});\nexport {\n L as SegmentedControl,\n C as SegmentedControlSegment\n};\n//# sourceMappingURL=SegmentedControl.js.map\n","import {\n SegmentedControlProps as CoreSegmentedControlProps,\n SegmentedControl as CoreSegmentedControl,\n SegmentedControlSegmentProps as CoreSegmentedControlSegmentProps,\n SegmentedControlSegment as CoreSegmentedControlSegment,\n} from \"@servicetitan/hammer-react/dist/SegmentedControl\";\nimport { Ref, forwardRef } from \"react\";\nimport { useTrackingId } from \"../../hooks\";\nimport { DataTrackingId } from \"../../types/DataTrackingId\";\n\nexport type SegmentedControlProps = CoreSegmentedControlProps & DataTrackingId;\nexport type SegmentedControlSegmentProps = CoreSegmentedControlSegmentProps &\n DataTrackingId;\n\nconst SegmentedControlElement = forwardRef(\n (props: SegmentedControlProps, ref: Ref<HTMLDivElement>) => {\n const data = {\n name: props.name,\n };\n\n const trackingId = useTrackingId({\n name: \"SegmentedControl\",\n data,\n hasOverride: !!props[\"data-tracking-id\"],\n });\n\n return (\n <CoreSegmentedControl\n ref={ref}\n data-tracking-id={trackingId}\n {...props}\n />\n );\n }\n);\n\nexport const SegmentedControlSegment = forwardRef(\n (props: SegmentedControlSegmentProps, ref: Ref<HTMLLabelElement>) => {\n const data = {\n value: props.value,\n };\n\n const trackingId = useTrackingId({\n name: \"SegmentedControlSegment\",\n data,\n hasOverride: !!props[\"data-tracking-id\"],\n });\n return (\n <CoreSegmentedControlSegment\n ref={ref}\n data-tracking-id={trackingId}\n {...props}\n />\n );\n }\n);\n\nexport const SegmentedControl = Object.assign(SegmentedControlElement, {\n Segment: SegmentedControlSegment,\n});\n"],"names":["E","z","F","H","O","P","t","C","forwardRef","a","i","o","c","d","g","u","useReducedMotion","l","m","r","useContext","S","_","useRef","h","f","G","fr","useMergeRefs","C$1","motion","createContext","j","useState","useId","L","SegmentedControlElement","props","ref","data","trackingId","useTrackingId","jsxRuntimeExports","SegmentedControlSegment","SegmentedControl"],"mappings":"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","x_google_ignoreList":[0]}
|
package/SideNav.cjs
CHANGED
|
@@ -1,30 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* react-is.production.min.js
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
5
|
-
*
|
|
6
|
-
* This source code is licensed under the MIT license found in the
|
|
7
|
-
* LICENSE file in the root directory of this source tree.
|
|
8
|
-
*/var Me;function Tr(){if(Me)return x;Me=1;var e=typeof Symbol=="function"&&Symbol.for,r=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,t=e?Symbol.for("react.strict_mode"):60108,c=e?Symbol.for("react.profiler"):60114,l=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,d=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,a=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,M=e?Symbol.for("react.block"):60121,C=e?Symbol.for("react.fundamental"):60117,N=e?Symbol.for("react.responder"):60118,D=e?Symbol.for("react.scope"):60119;function _(i){if(typeof i=="object"&&i!==null){var $=i.$$typeof;switch($){case r:switch(i=i.type,i){case d:case p:case o:case c:case t:case f:return i;default:switch(i=i&&i.$$typeof,i){case u:case a:case y:case m:case l:return i;default:return $}}case n:return $}}}function E(i){return _(i)===p}return x.AsyncMode=d,x.ConcurrentMode=p,x.ContextConsumer=u,x.ContextProvider=l,x.Element=r,x.ForwardRef=a,x.Fragment=o,x.Lazy=y,x.Memo=m,x.Portal=n,x.Profiler=c,x.StrictMode=t,x.Suspense=f,x.isAsyncMode=function(i){return E(i)||_(i)===d},x.isConcurrentMode=E,x.isContextConsumer=function(i){return _(i)===u},x.isContextProvider=function(i){return _(i)===l},x.isElement=function(i){return typeof i=="object"&&i!==null&&i.$$typeof===r},x.isForwardRef=function(i){return _(i)===a},x.isFragment=function(i){return _(i)===o},x.isLazy=function(i){return _(i)===y},x.isMemo=function(i){return _(i)===m},x.isPortal=function(i){return _(i)===n},x.isProfiler=function(i){return _(i)===c},x.isStrictMode=function(i){return _(i)===t},x.isSuspense=function(i){return _(i)===f},x.isValidElementType=function(i){return typeof i=="string"||typeof i=="function"||i===o||i===p||i===c||i===t||i===f||i===h||typeof i=="object"&&i!==null&&(i.$$typeof===y||i.$$typeof===m||i.$$typeof===l||i.$$typeof===u||i.$$typeof===a||i.$$typeof===C||i.$$typeof===N||i.$$typeof===D||i.$$typeof===M)},x.typeOf=_,x}var T={};/** @license React v16.13.1
|
|
9
|
-
* react-is.development.js
|
|
10
|
-
*
|
|
11
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
12
|
-
*
|
|
13
|
-
* This source code is licensed under the MIT license found in the
|
|
14
|
-
* LICENSE file in the root directory of this source tree.
|
|
15
|
-
*/var we;function Rr(){return we||(we=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,r=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,t=e?Symbol.for("react.strict_mode"):60108,c=e?Symbol.for("react.profiler"):60114,l=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,d=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,a=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,M=e?Symbol.for("react.block"):60121,C=e?Symbol.for("react.fundamental"):60117,N=e?Symbol.for("react.responder"):60118,D=e?Symbol.for("react.scope"):60119;function _(s){return typeof s=="string"||typeof s=="function"||s===o||s===p||s===c||s===t||s===f||s===h||typeof s=="object"&&s!==null&&(s.$$typeof===y||s.$$typeof===m||s.$$typeof===l||s.$$typeof===u||s.$$typeof===a||s.$$typeof===C||s.$$typeof===N||s.$$typeof===D||s.$$typeof===M)}function E(s){if(typeof s=="object"&&s!==null){var j=s.$$typeof;switch(j){case r:var U=s.type;switch(U){case d:case p:case o:case c:case t:case f:return U;default:var K=U&&U.$$typeof;switch(K){case u:case a:case y:case m:case l:return K;default:return j}}case n:return j}}}var i=d,$=p,P=u,g=l,w=r,I=a,O=o,Y=y,H=m,F=n,V=c,ne=t,ie=f,B=!1;function se(s){return B||(B=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),G(s)||E(s)===d}function G(s){return E(s)===p}function ae(s){return E(s)===u}function ce(s){return E(s)===l}function ue(s){return typeof s=="object"&&s!==null&&s.$$typeof===r}function pe(s){return E(s)===a}function fe(s){return E(s)===o}function le(s){return E(s)===y}function de(s){return E(s)===m}function ve(s){return E(s)===n}function he(s){return E(s)===c}function me(s){return E(s)===t}function ye(s){return E(s)===f}T.AsyncMode=i,T.ConcurrentMode=$,T.ContextConsumer=P,T.ContextProvider=g,T.Element=w,T.ForwardRef=I,T.Fragment=O,T.Lazy=Y,T.Memo=H,T.Portal=F,T.Profiler=V,T.StrictMode=ne,T.Suspense=ie,T.isAsyncMode=se,T.isConcurrentMode=G,T.isContextConsumer=ae,T.isContextProvider=ce,T.isElement=ue,T.isForwardRef=pe,T.isFragment=fe,T.isLazy=le,T.isMemo=de,T.isPortal=ve,T.isProfiler=he,T.isStrictMode=me,T.isSuspense=ye,T.isValidElementType=_,T.typeOf=E}()),T}process.env.NODE_ENV==="production"?Re.exports=Tr():Re.exports=Rr();var br=Re.exports,be={exports:{}},R={};/** @license React v16.13.1
|
|
16
|
-
* react-is.production.min.js
|
|
17
|
-
*
|
|
18
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
19
|
-
*
|
|
20
|
-
* This source code is licensed under the MIT license found in the
|
|
21
|
-
* LICENSE file in the root directory of this source tree.
|
|
22
|
-
*/var Oe;function Sr(){if(Oe)return R;Oe=1;var e=typeof Symbol=="function"&&Symbol.for,r=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,t=e?Symbol.for("react.strict_mode"):60108,c=e?Symbol.for("react.profiler"):60114,l=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,d=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,a=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,M=e?Symbol.for("react.block"):60121,C=e?Symbol.for("react.fundamental"):60117,N=e?Symbol.for("react.responder"):60118,D=e?Symbol.for("react.scope"):60119;function _(i){if(typeof i=="object"&&i!==null){var $=i.$$typeof;switch($){case r:switch(i=i.type,i){case d:case p:case o:case c:case t:case f:return i;default:switch(i=i&&i.$$typeof,i){case u:case a:case y:case m:case l:return i;default:return $}}case n:return $}}}function E(i){return _(i)===p}return R.AsyncMode=d,R.ConcurrentMode=p,R.ContextConsumer=u,R.ContextProvider=l,R.Element=r,R.ForwardRef=a,R.Fragment=o,R.Lazy=y,R.Memo=m,R.Portal=n,R.Profiler=c,R.StrictMode=t,R.Suspense=f,R.isAsyncMode=function(i){return E(i)||_(i)===d},R.isConcurrentMode=E,R.isContextConsumer=function(i){return _(i)===u},R.isContextProvider=function(i){return _(i)===l},R.isElement=function(i){return typeof i=="object"&&i!==null&&i.$$typeof===r},R.isForwardRef=function(i){return _(i)===a},R.isFragment=function(i){return _(i)===o},R.isLazy=function(i){return _(i)===y},R.isMemo=function(i){return _(i)===m},R.isPortal=function(i){return _(i)===n},R.isProfiler=function(i){return _(i)===c},R.isStrictMode=function(i){return _(i)===t},R.isSuspense=function(i){return _(i)===f},R.isValidElementType=function(i){return typeof i=="string"||typeof i=="function"||i===o||i===p||i===c||i===t||i===f||i===h||typeof i=="object"&&i!==null&&(i.$$typeof===y||i.$$typeof===m||i.$$typeof===l||i.$$typeof===u||i.$$typeof===a||i.$$typeof===C||i.$$typeof===N||i.$$typeof===D||i.$$typeof===M)},R.typeOf=_,R}var b={};/** @license React v16.13.1
|
|
23
|
-
* react-is.development.js
|
|
24
|
-
*
|
|
25
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
26
|
-
*
|
|
27
|
-
* This source code is licensed under the MIT license found in the
|
|
28
|
-
* LICENSE file in the root directory of this source tree.
|
|
29
|
-
*/var De;function gr(){return De||(De=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,r=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,t=e?Symbol.for("react.strict_mode"):60108,c=e?Symbol.for("react.profiler"):60114,l=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,d=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,a=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,M=e?Symbol.for("react.block"):60121,C=e?Symbol.for("react.fundamental"):60117,N=e?Symbol.for("react.responder"):60118,D=e?Symbol.for("react.scope"):60119;function _(s){return typeof s=="string"||typeof s=="function"||s===o||s===p||s===c||s===t||s===f||s===h||typeof s=="object"&&s!==null&&(s.$$typeof===y||s.$$typeof===m||s.$$typeof===l||s.$$typeof===u||s.$$typeof===a||s.$$typeof===C||s.$$typeof===N||s.$$typeof===D||s.$$typeof===M)}function E(s){if(typeof s=="object"&&s!==null){var j=s.$$typeof;switch(j){case r:var U=s.type;switch(U){case d:case p:case o:case c:case t:case f:return U;default:var K=U&&U.$$typeof;switch(K){case u:case a:case y:case m:case l:return K;default:return j}}case n:return j}}}var i=d,$=p,P=u,g=l,w=r,I=a,O=o,Y=y,H=m,F=n,V=c,ne=t,ie=f,B=!1;function se(s){return B||(B=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),G(s)||E(s)===d}function G(s){return E(s)===p}function ae(s){return E(s)===u}function ce(s){return E(s)===l}function ue(s){return typeof s=="object"&&s!==null&&s.$$typeof===r}function pe(s){return E(s)===a}function fe(s){return E(s)===o}function le(s){return E(s)===y}function de(s){return E(s)===m}function ve(s){return E(s)===n}function he(s){return E(s)===c}function me(s){return E(s)===t}function ye(s){return E(s)===f}b.AsyncMode=i,b.ConcurrentMode=$,b.ContextConsumer=P,b.ContextProvider=g,b.Element=w,b.ForwardRef=I,b.Fragment=O,b.Lazy=Y,b.Memo=H,b.Portal=F,b.Profiler=V,b.StrictMode=ne,b.Suspense=ie,b.isAsyncMode=se,b.isConcurrentMode=G,b.isContextConsumer=ae,b.isContextProvider=ce,b.isElement=ue,b.isForwardRef=pe,b.isFragment=fe,b.isLazy=le,b.isMemo=de,b.isPortal=ve,b.isProfiler=he,b.isStrictMode=me,b.isSuspense=ye,b.isValidElementType=_,b.typeOf=E}()),b}process.env.NODE_ENV==="production"?be.exports=Sr():be.exports=gr();var Pr=be.exports,Xe=Pr,Cr={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Nr={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Je={};Je[Xe.ForwardRef]=Cr;Je[Xe.Memo]=Nr;var Z=1073741823,Ie=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:{};function $r(){var e="__global_unique_id__";return Ie[e]=(Ie[e]||0)+1}function Ar(e,r){return e===r?e!==0||1/e===1/r:e!==e&&r!==r}function Mr(e){var r=[];return{on:function(o){r.push(o)},off:function(o){r=r.filter(function(t){return t!==o})},get:function(){return e},set:function(o,t){e=o,r.forEach(function(c){return c(e,t)})}}}function wr(e){return Array.isArray(e)?e[0]:e}function Or(e,r){var n,o,t="__create-react-context-"+$r()+"__",c=function(u){v._inheritsLoose(d,u);function d(){for(var a,f=arguments.length,h=new Array(f),m=0;m<f;m++)h[m]=arguments[m];return a=u.call.apply(u,[this].concat(h))||this,a.emitter=Mr(a.props.value),a}var p=d.prototype;return p.getChildContext=function(){var f;return f={},f[t]=this.emitter,f},p.componentWillReceiveProps=function(f){if(this.props.value!==f.value){var h=this.props.value,m=f.value,y;Ar(h,m)?y=0:(y=typeof r=="function"?r(h,m):Z,process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="production"&&A((y&Z)===y,"calculateChangedBits: Expected the return value to be a 31-bit integer. Instead received: "+y),y|=0,y!==0&&this.emitter.set(f.value,y))}},p.render=function(){return this.props.children},d}(S.Component);c.childContextTypes=(n={},n[t]=v.PropTypes.object.isRequired,n);var l=function(u){v._inheritsLoose(d,u);function d(){for(var a,f=arguments.length,h=new Array(f),m=0;m<f;m++)h[m]=arguments[m];return a=u.call.apply(u,[this].concat(h))||this,a.observedBits=void 0,a.state={value:a.getValue()},a.onUpdate=function(y,M){var C=a.observedBits|0;C&M&&a.setState({value:a.getValue()})},a}var p=d.prototype;return p.componentWillReceiveProps=function(f){var h=f.observedBits;this.observedBits=h??Z},p.componentDidMount=function(){this.context[t]&&this.context[t].on(this.onUpdate);var f=this.props.observedBits;this.observedBits=f??Z},p.componentWillUnmount=function(){this.context[t]&&this.context[t].off(this.onUpdate)},p.getValue=function(){return this.context[t]?this.context[t].get():e},p.render=function(){return wr(this.props.children)(this.state.value)},d}(S.Component);return l.contextTypes=(o={},o[t]=v.PropTypes.object,o),{Provider:c,Consumer:l}}var Dr=S.createContext||Or,Ze=function(r){var n=Dr();return n.displayName=r,n},Qe=Ze("Router-History"),X=Ze("Router"),te=function(e){v._inheritsLoose(r,e),r.computeRootMatch=function(t){return{path:"/",url:"/",params:{},isExact:t==="/"}};function r(o){var t;return t=e.call(this,o)||this,t.state={location:o.history.location},t._isMounted=!1,t._pendingLocation=null,o.staticContext||(t.unlisten=o.history.listen(function(c){t._pendingLocation=c})),t}var n=r.prototype;return n.componentDidMount=function(){var t=this;this._isMounted=!0,this.unlisten&&this.unlisten(),this.props.staticContext||(this.unlisten=this.props.history.listen(function(c){t._isMounted&&t.setState({location:c})})),this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},n.render=function(){return S.createElement(X.Provider,{value:{history:this.props.history,location:this.state.location,match:r.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},S.createElement(Qe.Provider,{children:this.props.children||null,value:this.props.history}))},r}(S.Component);process.env.NODE_ENV!=="production"&&(te.propTypes={children:v.PropTypes.node,history:v.PropTypes.object.isRequired,staticContext:v.PropTypes.object},te.prototype.componentDidUpdate=function(e){process.env.NODE_ENV!=="production"&&A(e.history===this.props.history,"You cannot change <Router history>")});var Le=function(e){v._inheritsLoose(r,e);function r(){for(var o,t=arguments.length,c=new Array(t),l=0;l<t;l++)c[l]=arguments[l];return o=e.call.apply(e,[this].concat(c))||this,o.history=ur(o.props),o}var n=r.prototype;return n.render=function(){return S.createElement(te,{history:this.history,children:this.props.children})},r}(S.Component);process.env.NODE_ENV!=="production"&&(Le.propTypes={initialEntries:v.PropTypes.array,initialIndex:v.PropTypes.number,getUserConfirmation:v.PropTypes.func,keyLength:v.PropTypes.number,children:v.PropTypes.node},Le.prototype.componentDidMount=function(){process.env.NODE_ENV!=="production"&&A(!this.props.history,"<MemoryRouter> ignores the history prop. To use a custom history, use `import { Router }` instead of `import { MemoryRouter as Router }`.")});S.Component;if(process.env.NODE_ENV!=="production"){var Ir=v.PropTypes.oneOfType([v.PropTypes.func,v.PropTypes.string]);v.PropTypes.bool,Ir.isRequired}process.env.NODE_ENV!=="production"&&(v.PropTypes.bool,v.PropTypes.string,v.PropTypes.oneOfType([v.PropTypes.string,v.PropTypes.object]).isRequired);var Ye={},Lr=1e4,Ve=0;function Yr(e,r){var n=""+r.end+r.strict+r.sensitive,o=Ye[n]||(Ye[n]={});if(o[e])return o[e];var t=[],c=xr(e,t,r),l={regexp:c,keys:t};return Ve<Lr&&(o[e]=l,Ve++),l}function Ne(e,r){r===void 0&&(r={}),(typeof r=="string"||Array.isArray(r))&&(r={path:r});var n=r,o=n.path,t=n.exact,c=t===void 0?!1:t,l=n.strict,u=l===void 0?!1:l,d=n.sensitive,p=d===void 0?!1:d,a=[].concat(o);return a.reduce(function(f,h){if(!h&&h!=="")return null;if(f)return f;var m=Yr(h,{end:c,strict:u,sensitive:p}),y=m.regexp,M=m.keys,C=y.exec(e);if(!C)return null;var N=C[0],D=C.slice(1),_=e===N;return c&&!_?null:{path:h,url:h==="/"&&N===""?"/":N,isExact:_,params:M.reduce(function(E,i,$){return E[i.name]=D[$],E},{})}},null)}function Se(e){return S.Children.count(e)===0}function Ue(e,r,n){var o=e(r);return process.env.NODE_ENV!=="production"&&A(o!==void 0,"You returned `undefined` from the `children` function of "+("<Route"+(n?' path="'+n+'"':"")+">, but you ")+"should have returned a React element or `null`"),o||null}var xe=function(e){v._inheritsLoose(r,e);function r(){return e.apply(this,arguments)||this}var n=r.prototype;return n.render=function(){var t=this;return S.createElement(X.Consumer,null,function(c){c||(process.env.NODE_ENV!=="production"?L(!1,"You should not use <Route> outside a <Router>"):L(!1));var l=t.props.location||c.location,u=t.props.computedMatch?t.props.computedMatch:t.props.path?Ne(l.pathname,t.props):c.match,d=v._extends({},c,{location:l,match:u}),p=t.props,a=p.children,f=p.component,h=p.render;return Array.isArray(a)&&Se(a)&&(a=null),S.createElement(X.Provider,{value:d},d.match?a?typeof a=="function"?process.env.NODE_ENV!=="production"?Ue(a,d,t.props.path):a(d):a:f?S.createElement(f,d):h?h(d):null:typeof a=="function"?process.env.NODE_ENV!=="production"?Ue(a,d,t.props.path):a(d):null)})},r}(S.Component);process.env.NODE_ENV!=="production"&&(xe.propTypes={children:v.PropTypes.oneOfType([v.PropTypes.func,v.PropTypes.node]),component:function(r,n){if(r[n]&&!br.isValidElementType(r[n]))return new Error("Invalid prop 'component' supplied to 'Route': the prop is not a valid React component")},exact:v.PropTypes.bool,location:v.PropTypes.object,path:v.PropTypes.oneOfType([v.PropTypes.string,v.PropTypes.arrayOf(v.PropTypes.string)]),render:v.PropTypes.func,sensitive:v.PropTypes.bool,strict:v.PropTypes.bool},xe.prototype.componentDidMount=function(){process.env.NODE_ENV!=="production"&&A(!(this.props.children&&!Se(this.props.children)&&this.props.component),"You should not use <Route component> and <Route children> in the same route; <Route component> will be ignored"),process.env.NODE_ENV!=="production"&&A(!(this.props.children&&!Se(this.props.children)&&this.props.render),"You should not use <Route render> and <Route children> in the same route; <Route render> will be ignored"),process.env.NODE_ENV!=="production"&&A(!(this.props.component&&this.props.render),"You should not use <Route component> and <Route render> in the same route; <Route render> will be ignored")},xe.prototype.componentDidUpdate=function(e){process.env.NODE_ENV!=="production"&&A(!(this.props.location&&!e.location),'<Route> elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),process.env.NODE_ENV!=="production"&&A(!(!this.props.location&&e.location),'<Route> elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.')});function $e(e){return e.charAt(0)==="/"?e:"/"+e}function Vr(e,r){return e?v._extends({},r,{pathname:$e(e)+r.pathname}):r}function Ur(e,r){if(!e)return r;var n=$e(e);return r.pathname.indexOf(n)!==0?r:v._extends({},r,{pathname:r.pathname.substr(n.length)})}function Fe(e){return typeof e=="string"?e:He(e)}function Te(e){return function(){process.env.NODE_ENV!=="production"?L(!1,"You cannot %s with <StaticRouter>"):L(!1)}}function je(){}var qe=function(e){v._inheritsLoose(r,e);function r(){for(var o,t=arguments.length,c=new Array(t),l=0;l<t;l++)c[l]=arguments[l];return o=e.call.apply(e,[this].concat(c))||this,o.handlePush=function(u){return o.navigateTo(u,"PUSH")},o.handleReplace=function(u){return o.navigateTo(u,"REPLACE")},o.handleListen=function(){return je},o.handleBlock=function(){return je},o}var n=r.prototype;return n.navigateTo=function(t,c){var l=this.props,u=l.basename,d=u===void 0?"":u,p=l.context,a=p===void 0?{}:p;a.action=c,a.location=Vr(d,q(t)),a.url=Fe(a.location)},n.render=function(){var t=this.props,c=t.basename,l=c===void 0?"":c,u=t.context,d=u===void 0?{}:u,p=t.location,a=p===void 0?"/":p,f=v._objectWithoutPropertiesLoose(t,["basename","context","location"]),h={createHref:function(y){return $e(l+Fe(y))},action:"POP",location:Ur(l,q(a)),push:this.handlePush,replace:this.handleReplace,go:Te(),goBack:Te(),goForward:Te(),listen:this.handleListen,block:this.handleBlock};return S.createElement(te,v._extends({},f,{history:h,staticContext:d}))},r}(S.Component);process.env.NODE_ENV!=="production"&&(qe.propTypes={basename:v.PropTypes.string,context:v.PropTypes.object,location:v.PropTypes.oneOfType([v.PropTypes.string,v.PropTypes.object])},qe.prototype.componentDidMount=function(){process.env.NODE_ENV!=="production"&&A(!this.props.history,"<StaticRouter> ignores the history prop. To use a custom history, use `import { Router }` instead of `import { StaticRouter as Router }`.")});var We=function(e){v._inheritsLoose(r,e);function r(){return e.apply(this,arguments)||this}var n=r.prototype;return n.render=function(){var t=this;return S.createElement(X.Consumer,null,function(c){c||(process.env.NODE_ENV!=="production"?L(!1,"You should not use <Switch> outside a <Router>"):L(!1));var l=t.props.location||c.location,u,d;return S.Children.forEach(t.props.children,function(p){if(d==null&&S.isValidElement(p)){u=p;var a=p.props.path||p.props.from;d=a?Ne(l.pathname,v._extends({},p.props,{path:a})):c.match}}),d?S.cloneElement(u,{location:l,computedMatch:d}):null})},r}(S.Component);process.env.NODE_ENV!=="production"&&(We.propTypes={children:v.PropTypes.node,location:v.PropTypes.object},We.prototype.componentDidUpdate=function(e){process.env.NODE_ENV!=="production"&&A(!(this.props.location&&!e.location),'<Switch> elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),process.env.NODE_ENV!=="production"&&A(!(!this.props.location&&e.location),'<Switch> elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.')});var oe=S.useContext;function Fr(){return process.env.NODE_ENV!=="production"&&typeof oe!="function"&&(process.env.NODE_ENV!=="production"?L(!1,"You must use React >= 16.8 in order to use useHistory()"):L(!1)),oe(Qe)}function jr(){return process.env.NODE_ENV!=="production"&&typeof oe!="function"&&(process.env.NODE_ENV!=="production"?L(!1,"You must use React >= 16.8 in order to use useLocation()"):L(!1)),oe(X).location}if(process.env.NODE_ENV!=="production"&&typeof window<"u"){var Q=window,k="__react_router_build__",ze={cjs:"CommonJS",esm:"ES modules",umd:"UMD"};if(Q[k]&&Q[k]!=="esm"){var qr=ze[Q[k]],Wr=ze.esm;throw new Error("You are loading the "+Wr+" build of React Router "+("on a page that is already running the "+qr+" ")+"build, so things won't work right.")}Q[k]="esm"}const zr=S.forwardRef((e,r)=>W.jsxRuntimeExports.jsx(v.fe,{ref:r,...e})),ke=S.forwardRef((e,r)=>W.jsxRuntimeExports.jsx(v.O,{ref:r,...e})),er=S.forwardRef((e,r)=>W.jsxRuntimeExports.jsx(v.P,{ref:r,...e})),Hr=S.forwardRef(({href:e,exact:r,pathname:n,search:o,onClick:t,...c},l)=>{const u=Fr(),d=jr(),p=S.useMemo(()=>u.createHref({pathname:n,search:o}),[u,n,o]),a=S.useCallback((...f)=>(f[0].preventDefault(),u.push(n+(o??"")),t==null?void 0:t(...f)),[u,n,o,t]);return W.jsxRuntimeExports.jsx(v.M,{href:n!=null?p:e,active:!!Ne(d.pathname,{exact:r,path:n}),onClick:n!=null?a:t,ref:l,...c})}),rr=S.forwardRef((e,r)=>"pathname"in e?W.jsxRuntimeExports.jsx(Hr,{ref:r,...e}):W.jsxRuntimeExports.jsx(v.M,{ref:r,...e})),tr=Object.assign(zr,{Link:rr,Collapsible:ke,Group:er});exports.SideNav=tr;exports.SideNavCollapsible=ke;exports.SideNavGroup=er;exports.SideNavLink=rr;exports.default=tr;
|
|
1
|
+
var le=require("./index17.css");Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const g=require("./jsx-runtime-494437bb.cjs"),p=require("./jsx-runtime-944c88e2-2b81c205.cjs"),r=require("react"),S=require("./index-ef2e9d11.cjs");require("./tinycolor-3b50a250.cjs");const Q=require("./useLayoutPropsUtil-cd33328b.cjs"),V=require("./index-69174413.cjs"),X=require("./Icon-847b3515.cjs"),q=require("react-router-dom");function Y(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const n=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(e,a,n.get?n:{enumerable:!0,get:()=>t[a]})}}return e.default=t,Object.freeze(e)}const P=Y(r);const Z="_sidenav_12xoe_4",$="_root_12xoe_5",ee="_group_12xoe_9",te="_arrow_12xoe_58",re="_disabled_12xoe_88",v={sidenav:Z,root:$,"sidenav-group":"_sidenav-group_12xoe_6","sidenav-link":"_sidenav-link_12xoe_7","sidenav-collapsible":"_sidenav-collapsible_12xoe_8",group:ee,"group-label":"_group-label_12xoe_32",arrow:te,disabled:re,"not-collapsible":"_not-collapsible_12xoe_110","has-indicator":"_has-indicator_12xoe_118"},I=(t,e,a)=>{const n=Array.prototype.indexOf.call(e,a.current);switch(t.key){case"ArrowDown":if(!e)return;if(t.preventDefault(),e[n].setAttribute("tabindex","-1"),n===e.length-1){e[0].setAttribute("tabindex","0"),e[0].focus();break}e[n+1].setAttribute("tabindex","0"),e[n+1].focus();break;case"ArrowUp":if(t.preventDefault(),!e)return;if(e[n].setAttribute("tabindex","-1"),n===0){e[e.length-1].setAttribute("tabindex","0"),e[e.length-1].focus();break}e[n-1].setAttribute("tabindex","0"),e[n-1].focus();break}},A=r.forwardRef((t,e)=>{const{className:a,children:n,href:i,id:u,active:c,onClick:l,onKeyDown:b,onKeyUp:d,style:h,disabled:f,...x}=t,{links:w}=U(),m=r.useRef(null);function _(o){I(o,w,m),b==null||b(o,u)}function R(o){f||((o.code==="Space"||o.code==="Enter")&&(o.preventDefault(),l&&o.currentTarget.click()),d==null||d(o,u))}function E(o){var y,j;if(f)return;const k=Array.prototype.slice.call(w).filter(L=>L.tabIndex===0)[0];k&&k.setAttribute("tabindex","-1"),(y=m.current)==null||y.setAttribute("tabindex","0"),(j=m.current)==null||j.focus(),l==null||l(o,u)}return p.fr.jsx("li",{className:a,"data-anv":"sidenav-link",style:h,ref:e,children:p.fr.jsx("a",{className:v["sidenav-link"],"aria-current":c?"page":void 0,href:i,ref:m,onClick:E,onKeyDown:_,onKeyUp:R,id:u,"aria-disabled":f,tabIndex:c?0:-1,...x,children:n})})});A.displayName="SideNavLink";const ne=t=>P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},P.createElement("path",{d:"M8.12 9.29 12 13.17l3.88-3.88a.996.996 0 1 1 1.41 1.41l-4.59 4.59a.996.996 0 0 1-1.41 0L6.7 10.7a.996.996 0 0 1 0-1.41c.39-.38 1.03-.39 1.42 0z"})),C=r.forwardRef((t,e)=>{var a;const{className:n,children:i,label:u,onClick:c,onKeyDown:l,defaultExpanded:b=!1,expanded:d,...h}=t,[f,x]=r.useState(b),[w,m]=r.useState(!1),_=r.useRef(null),R=r.useRef(null),E=S.G(v["sidenav-collapsible"],n),{links:o,reCalculateLinks:y}=U(),j=r.useId(),k=s=>{d===void 0&&x(N=>s!==void 0?s:!N)};r.useEffect(()=>{d!==void 0&&x(d)},[d]);function L(s){var N,O;k(),setTimeout(()=>y(),0);const M=Array.prototype.slice.call(o).filter(F=>F.tabIndex===0)[0];M&&M.setAttribute("tabindex","-1"),(N=_.current)==null||N.setAttribute("tabindex","0"),(O=_.current)==null||O.focus(),c==null||c(s)}function W(s){switch(I(s,o,_),s.key){case"ArrowRight":x(!0),setTimeout(()=>y(),0);break;case"ArrowLeft":x(!1),setTimeout(()=>y(),0);break}l==null||l(s)}const D=(a=r.Children.map(i,s=>s.props))==null?void 0:a.some(s=>s.active===!0);return r.useLayoutEffect(()=>{D&&(k(!0),setTimeout(()=>{var s;const N=(s=R.current)==null?void 0:s.querySelector("[active='true']");N==null||N.setAttribute("tabindex","0"),y()},0))},[]),r.useEffect(()=>{if(!D){m(!1);return}m(!0)},[D]),p.fr.jsxs("li",{ref:e,"data-anv":"sidenav-collapsible",...h,className:E,children:[p.fr.jsxs("button",{"aria-expanded":f,"aria-controls":j,type:"button",tabIndex:-1,onClick:L,ref:_,className:S.G(v["sidenav-link"],{[v["has-indicator"]]:w&&!f}),onKeyDown:W,children:[u,p.fr.jsx(X.C,{className:v.arrow,inherit:!0,svg:ne,"aria-hidden":!0})]}),f?p.fr.jsx("ul",{id:j,ref:R,className:v.group,children:i}):null]})});C.displayName="SideNavCollapsible";const G=r.forwardRef((t,e)=>{const{children:a,label:n,...i}=t,u=S.G(v["sidenav-group"]),c=r.useId();return p.fr.jsxs("li",{ref:e,"data-anv":"sidenav-group",...i,children:[p.fr.jsx("label",{id:c,className:v["group-label"],children:n}),p.fr.jsx("ul",{"aria-labelledby":c,className:u,children:a})]})});G.displayName="SideNavGroup";const K=r.createContext(null),T=r.forwardRef((t,e)=>{const{layoutStyles:a,componentProps:n}=Q.J(t),{className:i,children:u,style:c,...l}=n,b=r.useRef(null),[d,h]=r.useState(),f={...c,...a};function x(){if(b.current){const _=b.current.querySelectorAll("li[data-anv='sidenav-link'] a:not([aria-disabled='true']), li[data-anv='sidenav-collapsible'] button[aria-expanded]:not([aria-disabled='true'])");h(_)}}r.useEffect(()=>{x()},[]);const w=S.G([v.sidenav],i),m=r.useMemo(()=>({links:d,reCalculateLinks:x}),[d]);return p.fr.jsx(K.Provider,{value:m,children:p.fr.jsx("nav",{ref:V.useMergeRefs([b,e]),className:w,style:f,"data-anv":"sidenav",...l,children:p.fr.jsx("ul",{className:v.root,children:u})})})}),U=()=>{const t=r.useContext(K);if(t==null)throw new Error("useSideNav must be wrapped in <SideNav />");return t};T.displayName="SideNav";const ae=Object.assign(T,{Link:A,Collapsible:C,Group:G}),se=r.forwardRef((t,e)=>g.jsxRuntimeExports.jsx(ae,{ref:e,...t})),z=r.forwardRef((t,e)=>g.jsxRuntimeExports.jsx(C,{ref:e,...t})),B=r.forwardRef((t,e)=>g.jsxRuntimeExports.jsx(G,{ref:e,...t})),ie=r.forwardRef(({href:t,exact:e,pathname:a,search:n,onClick:i,...u},c)=>{const l=q.useHistory(),b=q.useLocation(),d=r.useMemo(()=>l.createHref({pathname:a,search:n}),[l,a,n]),h=r.useCallback((...f)=>(f[0].preventDefault(),l.push(a+(n??"")),i==null?void 0:i(...f)),[l,a,n,i]);return g.jsxRuntimeExports.jsx(A,{href:a!=null?d:t,active:!!q.matchPath(b.pathname,{exact:e,path:a}),onClick:a!=null?h:i,ref:c,...u})}),H=r.forwardRef((t,e)=>"pathname"in t?g.jsxRuntimeExports.jsx(ie,{ref:e,...t}):g.jsxRuntimeExports.jsx(A,{ref:e,...t})),J=Object.assign(se,{Link:H,Collapsible:z,Group:B});exports.SideNav=J;exports.SideNavCollapsible=z;exports.SideNavGroup=B;exports.SideNavLink=H;exports.default=J;
|
|
30
2
|
//# sourceMappingURL=SideNav.cjs.map
|