@servicetitan/anvil2 1.1.2 → 1.2.0
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-149d9037.js → Alert-017471de.js} +19 -20
- package/Alert-017471de.js.map +1 -0
- package/Alert-3ae85e66.cjs +2 -0
- package/{Alert-149d9037.js.map → Alert-3ae85e66.cjs.map} +1 -1
- package/Alert.cjs +1 -1
- package/Alert.js +1 -1
- package/{Announcement-f14d030c.js → Announcement-0ef0c8f7.js} +26 -27
- package/{Announcement-f14d030c.js.map → Announcement-0ef0c8f7.js.map} +1 -1
- package/Announcement-3540ab95.cjs +2 -0
- package/{Announcement-9d19ebaa.cjs.map → Announcement-3540ab95.cjs.map} +1 -1
- package/Announcement.cjs +1 -1
- package/Announcement.js +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 +1 -1
- package/Badge-29ed0c9e.cjs +2 -0
- package/{Badge-7a10a62b.cjs.map → Badge-29ed0c9e.cjs.map} +1 -1
- package/{Badge-bc79fd97.js → Badge-2dc92a40.js} +9 -9
- package/{Badge-bc79fd97.js.map → Badge-2dc92a40.js.map} +1 -1
- package/Badge.cjs +1 -1
- package/Badge.js +1 -1
- package/{Button-6c5781ad.js → Button-dbbb8dc0.js} +135 -125
- package/Button-dbbb8dc0.js.map +1 -0
- package/Button-df4be721.cjs +2 -0
- package/Button-df4be721.cjs.map +1 -0
- package/Button.cjs +1 -1
- package/Button.cjs.map +1 -1
- package/Button.js +9 -9
- package/Button.js.map +1 -1
- package/ButtonCompound.cjs +1 -1
- package/ButtonCompound.cjs.map +1 -1
- package/ButtonCompound.js +7 -7
- package/ButtonCompound.js.map +1 -1
- package/ButtonLink.cjs +1 -1
- package/ButtonLink.cjs.map +1 -1
- package/ButtonLink.js +8 -8
- package/ButtonLink.js.map +1 -1
- package/ButtonToggle.cjs +1 -1
- package/ButtonToggle.cjs.map +1 -1
- package/ButtonToggle.js +6 -6
- package/ButtonToggle.js.map +1 -1
- package/{Calendar-43e494d5.cjs → Calendar-e0743dcf.cjs} +2 -2
- package/{Calendar-43e494d5.cjs.map → Calendar-e0743dcf.cjs.map} +1 -1
- package/{Calendar-485d6695.js → Calendar-fc2373b7.js} +81 -81
- package/{Calendar-485d6695.js.map → Calendar-fc2373b7.js.map} +1 -1
- package/Calendar.cjs +1 -1
- package/Calendar.js +1 -1
- package/{Card-bd9bce0c.cjs → Card-42198f6c.cjs} +2 -2
- package/{Card-bd9bce0c.cjs.map → Card-42198f6c.cjs.map} +1 -1
- package/{Card-8c481846.js → Card-d7d23388.js} +9 -9
- package/{Card-8c481846.js.map → Card-d7d23388.js.map} +1 -1
- package/Card.cjs +1 -1
- package/Card.js +1 -1
- package/Checkbox-949d5f00.cjs +2 -0
- package/{Checkbox-68e81b7f.cjs.map → Checkbox-949d5f00.cjs.map} +1 -1
- package/{Checkbox-34dd779e.js → Checkbox-e2b0e7d0.js} +22 -22
- package/{Checkbox-34dd779e.js.map → Checkbox-e2b0e7d0.js.map} +1 -1
- package/Checkbox.cjs +1 -1
- package/Checkbox.js +1 -1
- package/Chip-c1c9ff14.cjs +2 -0
- package/{Chip-f0c9f7a2.js.map → Chip-c1c9ff14.cjs.map} +1 -1
- package/{Chip-f0c9f7a2.js → Chip-dbc470f4.js} +14 -14
- package/Chip-dbc470f4.js.map +1 -0
- package/Chip.cjs +1 -1
- package/Chip.js +1 -1
- package/Combobox.cjs +1 -1
- package/Combobox.cjs.map +1 -1
- package/Combobox.js +2 -2
- package/Combobox.js.map +1 -1
- package/Details.cjs +1 -1
- package/Details.cjs.map +1 -1
- package/Details.js +11 -11
- package/Details.js.map +1 -1
- package/Dialog.cjs +1 -1
- package/Dialog.cjs.map +1 -1
- package/Dialog.js +14 -14
- package/Dialog.js.map +1 -1
- package/{Divider-bb317cfa.js → Divider-6e94652c.js} +15 -15
- package/{Divider-bb317cfa.js.map → Divider-6e94652c.js.map} +1 -1
- package/Divider-9719b490.cjs +2 -0
- package/{Divider-054344df.cjs.map → Divider-9719b490.cjs.map} +1 -1
- package/Divider.cjs +1 -1
- package/Divider.js +1 -1
- package/Drawer-989d1d8a.cjs +2 -0
- package/Drawer-989d1d8a.cjs.map +1 -0
- package/Drawer-b81924d3.js +200 -0
- package/Drawer-b81924d3.js.map +1 -0
- package/Drawer.cjs +1 -1
- package/Drawer.js +1 -1
- package/{Flex-8986d95b.js → Flex-15fbb5a2.js} +8 -8
- package/{Flex-8986d95b.js.map → Flex-15fbb5a2.js.map} +1 -1
- package/{Flex-2c1b5dac.cjs → Flex-740ea6ba.cjs} +2 -2
- package/{Flex-2c1b5dac.cjs.map → Flex-740ea6ba.cjs.map} +1 -1
- package/Flex.cjs +1 -1
- package/Flex.js +1 -1
- package/{Grid-082b0fe7.js → Grid-043bde66.js} +12 -12
- package/{Grid-082b0fe7.js.map → Grid-043bde66.js.map} +1 -1
- package/{Grid-758a3a1a.cjs → Grid-674805a9.cjs} +2 -2
- package/{Grid-758a3a1a.cjs.map → Grid-674805a9.cjs.map} +1 -1
- package/Grid.cjs +1 -1
- package/Grid.js +1 -1
- package/{Helper-74a1f07f-13255568.js → Helper-74a1f07f-18441e16.js} +3 -3
- package/{Helper-74a1f07f-13255568.js.map → Helper-74a1f07f-18441e16.js.map} +1 -1
- package/{Helper-74a1f07f-18d0650d.cjs → Helper-74a1f07f-2aeadeae.cjs} +2 -2
- package/{Helper-74a1f07f-18d0650d.cjs.map → Helper-74a1f07f-2aeadeae.cjs.map} +1 -1
- package/{Icon-fe240903.js → Icon-7dc0db59.js} +14 -14
- package/{Icon-fe240903.js.map → Icon-7dc0db59.js.map} +1 -1
- package/Icon-d02abfdd.cjs +2 -0
- package/{Icon-cc1f63c3.cjs.map → Icon-d02abfdd.cjs.map} +1 -1
- package/Icon.cjs +1 -1
- package/Icon.js +1 -1
- package/Layout.cjs +1 -1
- package/Layout.cjs.map +1 -1
- package/Layout.js +20 -20
- package/Layout.js.map +1 -1
- package/Link.cjs +1 -1
- package/Link.cjs.map +1 -1
- package/Link.js +8 -8
- package/Link.js.map +1 -1
- package/ListView-b33a9948.cjs +2 -0
- package/ListView-b33a9948.cjs.map +1 -0
- package/{ListView-4c587048.js → ListView-dac3c924.js} +110 -103
- package/ListView-dac3c924.js.map +1 -0
- package/ListView.cjs +1 -1
- package/ListView.js +1 -1
- package/Listbox-7a43984b.js +394 -0
- package/Listbox-7a43984b.js.map +1 -0
- package/Listbox-873403e9.cjs +2 -0
- package/{Listbox-415bb4d7.cjs.map → Listbox-873403e9.cjs.map} +1 -1
- package/Listbox.cjs +1 -1
- package/Listbox.js +1 -1
- package/LocalizationProvider.cjs +1 -1
- package/LocalizationProvider.js +1 -1
- package/{Menu-5543f2ba.js → Menu-0a24f1ba.js} +41 -41
- package/{Menu-5543f2ba.js.map → Menu-0a24f1ba.js.map} +1 -1
- package/{Menu-a1e56e6b.cjs → Menu-869a24e2.cjs} +2 -2
- package/{Menu-a1e56e6b.cjs.map → Menu-869a24e2.cjs.map} +1 -1
- package/Menu.cjs +1 -1
- package/Menu.js +1 -1
- package/Overflow.cjs +1 -1
- package/Overflow.cjs.map +1 -1
- package/Overflow.js +23 -257
- package/Overflow.js.map +1 -1
- package/Page.cjs +1 -1
- package/Page.cjs.map +1 -1
- package/Page.d.ts +8 -5
- package/Page.js +166 -110
- package/Page.js.map +1 -1
- package/Popover.cjs +1 -1
- package/Popover.cjs.map +1 -1
- package/Popover.js +16 -16
- package/Popover.js.map +1 -1
- package/ProgressBar-2589ad1b.cjs +2 -0
- package/ProgressBar-2589ad1b.cjs.map +1 -0
- package/ProgressBar-f9325dbe.js +295 -0
- package/ProgressBar-f9325dbe.js.map +1 -0
- package/ProgressBar.cjs +1 -1
- package/ProgressBar.css +1 -1
- package/ProgressBar.js +1 -1
- package/{Radio-67ac4216.js → Radio-c81308ef.js} +11 -11
- package/{Radio-67ac4216.js.map → Radio-c81308ef.js.map} +1 -1
- package/Radio-e11ee699.cjs +2 -0
- package/{Radio-470d07a0.cjs.map → Radio-e11ee699.cjs.map} +1 -1
- package/Radio.cjs +1 -1
- package/Radio.js +1 -1
- package/SideNav-369bf761.cjs +21 -0
- package/SideNav-369bf761.cjs.map +1 -0
- package/SideNav-94ab00f0.js +935 -0
- package/SideNav-94ab00f0.js.map +1 -0
- package/SideNav.cjs +5 -5
- package/SideNav.cjs.map +1 -1
- package/SideNav.js +78 -80
- package/SideNav.js.map +1 -1
- package/SrOnly-0c13a721.js +13 -0
- package/{SrOnly-8b5e28e8.js.map → SrOnly-0c13a721.js.map} +1 -1
- package/SrOnly-ecf7240b.cjs +2 -0
- package/{SrOnly-d8f3425a.cjs.map → SrOnly-ecf7240b.cjs.map} +1 -1
- package/SrOnly.cjs +1 -1
- package/SrOnly.js +1 -1
- package/{Stepper-5bd46b4f.js → Stepper-54e47376.js} +25 -25
- package/{Stepper-5bd46b4f.js.map → Stepper-54e47376.js.map} +1 -1
- package/Stepper-e26d5bac.cjs +2 -0
- package/{Stepper-b4e986d2.cjs.map → Stepper-e26d5bac.cjs.map} +1 -1
- package/Stepper.cjs +1 -1
- package/Stepper.js +1 -1
- package/{Switch-5dbf0a8f.js → Switch-c4977b9b.js} +9 -9
- package/{Switch-5dbf0a8f.js.map → Switch-c4977b9b.js.map} +1 -1
- package/Switch-f1d54e52.cjs +2 -0
- package/{Switch-cb344773.cjs.map → Switch-f1d54e52.cjs.map} +1 -1
- package/Switch.cjs +1 -1
- package/Switch.js +1 -1
- package/{Tab-2e6cd67f.js → Tab-120468a3.js} +13 -13
- package/{Tab-2e6cd67f.js.map → Tab-120468a3.js.map} +1 -1
- package/Tab-3de6894a.cjs +10 -0
- package/{Tab-3d8a05c4.cjs.map → Tab-3de6894a.cjs.map} +1 -1
- package/Tab.cjs +1 -1
- package/Tab.js +1 -1
- package/{Text-ba9bbdb2.js → Text-a7747376.js} +9 -9
- package/{Text-ba9bbdb2.js.map → Text-a7747376.js.map} +1 -1
- package/Text-eefa573a.cjs +2 -0
- package/{Text-559b1249.cjs.map → Text-eefa573a.cjs.map} +1 -1
- package/Text.cjs +1 -1
- package/Text.js +1 -1
- package/TextField.cjs +1 -1
- package/TextField.cjs.map +1 -1
- package/TextField.js +17 -17
- package/TextField.js.map +1 -1
- package/Textarea.cjs +1 -1
- package/Textarea.cjs.map +1 -1
- package/Textarea.js +9 -9
- package/Textarea.js.map +1 -1
- package/ThemeProvider.cjs +1 -1
- package/ThemeProvider.js +1 -1
- package/Toast-4bab713a.cjs +9 -0
- package/{Toast-7681ec28.cjs.map → Toast-4bab713a.cjs.map} +1 -1
- package/{Toast-1ea8f149.js → Toast-5b02b7c0.js} +42 -42
- package/{Toast-1ea8f149.js.map → Toast-5b02b7c0.js.map} +1 -1
- package/Toast.cjs +1 -1
- package/Toast.js +1 -1
- package/Tooltip.cjs +1 -1
- package/Tooltip.cjs.map +1 -1
- package/Tooltip.js +19 -19
- package/Tooltip.js.map +1 -1
- package/anvil2.cjs +1 -1
- package/anvil2.d.ts +8 -5
- package/anvil2.js +184 -190
- package/anvil2.js.map +1 -1
- package/check_circle-48e002d3-0554de7d.js +8 -0
- package/check_circle-48e002d3-0554de7d.js.map +1 -0
- package/check_circle-48e002d3-57364fcd.cjs +2 -0
- package/check_circle-48e002d3-57364fcd.cjs.map +1 -0
- package/{floating-ui.react-b6b33700.js → floating-ui.react-3f85fcd1.js} +24 -24
- package/{floating-ui.react-b6b33700.js.map → floating-ui.react-3f85fcd1.js.map} +1 -1
- package/{index-f42fb342.cjs → index-0c3dd58b.cjs} +2 -2
- package/{index-f42fb342.cjs.map → index-0c3dd58b.cjs.map} +1 -1
- package/index-30317fba.cjs +2 -0
- package/{index-54bf6a94.cjs.map → index-30317fba.cjs.map} +1 -1
- package/index-43f4d750.cjs +23 -0
- package/index-43f4d750.cjs.map +1 -0
- package/{index-47be8b32.js → index-5654965e.js} +18 -18
- package/{index-47be8b32.js.map → index-5654965e.js.map} +1 -1
- package/{index-ef2e9d11.cjs → index-67d20edb.cjs} +2 -2
- package/{index-ef2e9d11.cjs.map → index-67d20edb.cjs.map} +1 -1
- package/index-91597e0a.js +4589 -0
- package/index-91597e0a.js.map +1 -0
- package/{index-e1f04536-df16a5fd.js → index-d46fa8de-997b6b08.js} +5 -5
- package/index-d46fa8de-997b6b08.js.map +1 -0
- package/{index-e1f04536-fde0e811.cjs → index-d46fa8de-cc49032b.cjs} +2 -2
- package/index-d46fa8de-cc49032b.cjs.map +1 -0
- package/{index-c6e22bb9.js → index-e0f6271a.js} +6 -6
- package/{index-c6e22bb9.js.map → index-e0f6271a.js.map} +1 -1
- package/{index-e54f92d0.js → index-ebc2776c.js} +4 -4
- package/{index-e54f92d0.js.map → index-ebc2776c.js.map} +1 -1
- package/{Avatar-6c7f18b3.js → index-f3ce3681-94450aba.js} +32 -32
- package/index-f3ce3681-94450aba.js.map +1 -0
- package/index-f3ce3681-b0bee9d9.cjs +2 -0
- package/index-f3ce3681-b0bee9d9.cjs.map +1 -0
- package/index2.css +1 -1
- package/index3.css +1 -1
- package/package.json +4 -4
- package/{primitive-430182c9.cjs → primitive-898a5f6f.cjs} +2 -2
- package/{primitive-430182c9.cjs.map → primitive-898a5f6f.cjs.map} +1 -1
- package/{primitive-51a35076.js → primitive-90e4e69c.js} +7 -6
- package/{primitive-51a35076.js.map → primitive-90e4e69c.js.map} +1 -1
- package/token.cjs +1 -1
- package/token.js +1 -1
- package/ui-react-c38ec008.js +53 -0
- package/ui-react-c38ec008.js.map +1 -0
- package/ui-react-ec7c804b.cjs +2 -0
- package/ui-react-ec7c804b.cjs.map +1 -0
- package/useAccessibleColor.cjs +1 -1
- package/useAccessibleColor.js +35 -44
- package/useAccessibleColor.js.map +1 -1
- package/{useLayoutPropsUtil-e307abc7-9cffb4b6.cjs → useLayoutPropsUtil-e307abc7-3826ee09.cjs} +2 -2
- package/{useLayoutPropsUtil-e307abc7-9cffb4b6.cjs.map → useLayoutPropsUtil-e307abc7-3826ee09.cjs.map} +1 -1
- package/{useLayoutPropsUtil-e307abc7-053ab281.js → useLayoutPropsUtil-e307abc7-cbe2fb6d.js} +2 -2
- package/{useLayoutPropsUtil-e307abc7-053ab281.js.map → useLayoutPropsUtil-e307abc7-cbe2fb6d.js.map} +1 -1
- package/useLinkStyles.cjs +1 -1
- package/useLinkStyles.js +34 -41
- package/useLinkStyles.js.map +1 -1
- package/useMergeRefs.cjs +1 -1
- package/useMergeRefs.js +35 -42
- package/useMergeRefs.js.map +1 -1
- package/{usePrefersColorScheme-129544ad-8a88962d.cjs → usePrefersColorScheme-129544ad-59e2e284.cjs} +2 -2
- package/{usePrefersColorScheme-129544ad-8a88962d.cjs.map → usePrefersColorScheme-129544ad-59e2e284.cjs.map} +1 -1
- package/{usePrefersColorScheme-129544ad-d4fd2894.js → usePrefersColorScheme-129544ad-cab6fc3f.js} +2 -2
- package/{usePrefersColorScheme-129544ad-d4fd2894.js.map → usePrefersColorScheme-129544ad-cab6fc3f.js.map} +1 -1
- package/usePrefersColorScheme.cjs +1 -1
- package/usePrefersColorScheme.js +35 -41
- package/usePrefersColorScheme.js.map +1 -1
- package/useSwipe.cjs +1 -1
- package/useSwipe.js +35 -42
- package/useSwipe.js.map +1 -1
- package/Alert-7d5182e8.cjs +0 -2
- package/Alert-7d5182e8.cjs.map +0 -1
- package/Announcement-9d19ebaa.cjs +0 -2
- package/Avatar-4c63ee62.cjs +0 -2
- package/Avatar-4c63ee62.cjs.map +0 -1
- package/Avatar-6c7f18b3.js.map +0 -1
- package/Badge-7a10a62b.cjs +0 -2
- package/Button-6c5781ad.js.map +0 -1
- package/Button-c99ab366.cjs +0 -2
- package/Button-c99ab366.cjs.map +0 -1
- package/Checkbox-68e81b7f.cjs +0 -2
- package/Chip-1cf2342f.cjs +0 -2
- package/Chip-1cf2342f.cjs.map +0 -1
- package/Combobox-8f603bb1.js +0 -3411
- package/Combobox-8f603bb1.js.map +0 -1
- package/Combobox-d05b6240.cjs +0 -23
- package/Combobox-d05b6240.cjs.map +0 -1
- package/Combobox.css +0 -1
- package/Details-b9417257.cjs +0 -2
- package/Details-b9417257.cjs.map +0 -1
- package/Details-fc119a54.js +0 -123
- package/Details-fc119a54.js.map +0 -1
- package/Details.css +0 -1
- package/Dialog-a43a0c3e.cjs +0 -2
- package/Dialog-a43a0c3e.cjs.map +0 -1
- package/Dialog-b677386c.js +0 -193
- package/Dialog-b677386c.js.map +0 -1
- package/Dialog.css +0 -1
- package/Divider-054344df.cjs +0 -2
- package/Drawer-04434c29.cjs +0 -2
- package/Drawer-04434c29.cjs.map +0 -1
- package/Drawer-adf9e6ba.js +0 -190
- package/Drawer-adf9e6ba.js.map +0 -1
- package/Icon-cc1f63c3.cjs +0 -2
- package/Label-71d61154.js +0 -47
- package/Label-71d61154.js.map +0 -1
- package/Label-dc809b80.cjs +0 -2
- package/Label-dc809b80.cjs.map +0 -1
- package/Label.css +0 -1
- package/Link-0073e9fb.cjs +0 -2
- package/Link-0073e9fb.cjs.map +0 -1
- package/Link-60e4b146.js +0 -58
- package/Link-60e4b146.js.map +0 -1
- package/Link.css +0 -1
- package/ListView-216f9c1f.cjs +0 -2
- package/ListView-216f9c1f.cjs.map +0 -1
- package/ListView-4c587048.js.map +0 -1
- package/ListView.module-3868990a-7ce1f78e.js +0 -11
- package/ListView.module-3868990a-7ce1f78e.js.map +0 -1
- package/ListView.module-3868990a-95f714ae.cjs +0 -2
- package/ListView.module-3868990a-95f714ae.cjs.map +0 -1
- package/Listbox-415bb4d7.cjs +0 -2
- package/Listbox-e8a20120.js +0 -386
- package/Listbox-e8a20120.js.map +0 -1
- package/Listbox.module-98274ee1-1a954c60.js +0 -13
- package/Listbox.module-98274ee1-1a954c60.js.map +0 -1
- package/Listbox.module-98274ee1-cacb3419.cjs +0 -2
- package/Listbox.module-98274ee1-cacb3419.cjs.map +0 -1
- package/Popover-69c5fcac.cjs +0 -2
- package/Popover-69c5fcac.cjs.map +0 -1
- package/Popover-825e44a8.js +0 -247
- package/Popover-825e44a8.js.map +0 -1
- package/Popover.css +0 -1
- package/ProgressBar-62c48252.js +0 -119
- package/ProgressBar-62c48252.js.map +0 -1
- package/ProgressBar-65cfdc86.cjs +0 -2
- package/ProgressBar-65cfdc86.cjs.map +0 -1
- package/Radio-470d07a0.cjs +0 -2
- package/SideNav-144e66fa.js +0 -236
- package/SideNav-144e66fa.js.map +0 -1
- package/SideNav-7715e11e.cjs +0 -2
- package/SideNav-7715e11e.cjs.map +0 -1
- package/Spinner-e6a0837b-26d0d1e9.cjs +0 -2
- package/Spinner-e6a0837b-26d0d1e9.cjs.map +0 -1
- package/Spinner-e6a0837b-33d456d3.js +0 -17
- package/Spinner-e6a0837b-33d456d3.js.map +0 -1
- package/SrOnly-8b5e28e8.js +0 -13
- package/SrOnly-d8f3425a.cjs +0 -2
- package/Stepper-b4e986d2.cjs +0 -2
- package/Switch-cb344773.cjs +0 -2
- package/Tab-3d8a05c4.cjs +0 -10
- package/Text-559b1249.cjs +0 -2
- package/TextField-3fb2612b.js +0 -133
- package/TextField-3fb2612b.js.map +0 -1
- package/TextField-eea0cce9.cjs +0 -2
- package/TextField-eea0cce9.cjs.map +0 -1
- package/TextField.css +0 -1
- package/Textarea-1abf4541.js +0 -246
- package/Textarea-1abf4541.js.map +0 -1
- package/Textarea-68aa3b5b.cjs +0 -2
- package/Textarea-68aa3b5b.cjs.map +0 -1
- package/Textarea.css +0 -1
- package/Toast-7681ec28.cjs +0 -9
- package/Tooltip-41f8b278.js +0 -149
- package/Tooltip-41f8b278.js.map +0 -1
- package/Tooltip-4ae8e730.cjs +0 -2
- package/Tooltip-4ae8e730.cjs.map +0 -1
- package/Tooltip.css +0 -1
- package/check_circle-48e002d3-0d49b2da.cjs +0 -2
- package/check_circle-48e002d3-0d49b2da.cjs.map +0 -1
- package/check_circle-48e002d3-5838521c.js +0 -7
- package/check_circle-48e002d3-5838521c.js.map +0 -1
- package/chevron_right-5b0931b5-96f8a9c6.cjs +0 -2
- package/chevron_right-5b0931b5-96f8a9c6.cjs.map +0 -1
- package/chevron_right-5b0931b5-ac35ad56.js +0 -6
- package/chevron_right-5b0931b5-ac35ad56.js.map +0 -1
- package/extends-459a4c4f.cjs +0 -2
- package/extends-459a4c4f.cjs.map +0 -1
- package/extends-c44c2a9d.js +0 -27
- package/extends-c44c2a9d.js.map +0 -1
- package/getKeyboardFocusableElements-ea0e208d-58a00025.js +0 -14
- package/getKeyboardFocusableElements-ea0e208d-58a00025.js.map +0 -1
- package/getKeyboardFocusableElements-ea0e208d-aba1bd01.cjs +0 -2
- package/getKeyboardFocusableElements-ea0e208d-aba1bd01.cjs.map +0 -1
- package/getLabelFromChildren-42ea107c.cjs +0 -2
- package/getLabelFromChildren-42ea107c.cjs.map +0 -1
- package/getLabelFromChildren-8fd8adc7.js +0 -11
- package/getLabelFromChildren-8fd8adc7.js.map +0 -1
- package/index-54bf6a94.cjs +0 -2
- package/index-8f87ccce.js +0 -678
- package/index-8f87ccce.js.map +0 -1
- package/index-9367b3ff.cjs +0 -21
- package/index-9367b3ff.cjs.map +0 -1
- package/index-e1f04536-df16a5fd.js.map +0 -1
- package/index-e1f04536-fde0e811.cjs.map +0 -1
- package/info-af4c0112-9f16129f.cjs +0 -2
- package/info-af4c0112-9f16129f.cjs.map +0 -1
- package/info-af4c0112-f73c8f68.js +0 -6
- package/info-af4c0112-f73c8f68.js.map +0 -1
- /package/{Avatar.css → index-f3ce3681.css} +0 -0
package/Layout.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Layout.js","sources":["../src/components/Layout/Layout.tsx"],"sourcesContent":["import { ComponentPropsWithoutRef, forwardRef } from \"react\";\nimport cx from \"classnames\";\nimport styles from \"./Layout.module.scss\";\n\nexport type LayoutProps = ComponentPropsWithoutRef<\"div\"> & {\n fluid?: boolean;\n variant?: \"default\" | \"wide\" | \"narrow\";\n};\n\nexport const LayoutElement = forwardRef<HTMLDivElement, LayoutProps>(\n (props, ref) => {\n const {\n children,\n className,\n fluid = false,\n variant = \"default\",\n ...rest\n } = props;\n\n return (\n <div className={cx(styles.container, { [styles.fluid]: fluid })}>\n <div\n className={cx(\n styles.grid,\n {\n [styles.wide]: variant === \"wide\",\n [styles.narrow]: variant === \"narrow\",\n },\n className\n )}\n ref={ref}\n {...rest}\n >\n {children}\n </div>\n </div>\n );\n }\n);\n\nLayoutElement.displayName = \"Layout\";\n\nexport type LayoutItemProps = ComponentPropsWithoutRef<\"div\"> & {\n span?: number;\n xs?: number;\n sm?: number;\n md?: number;\n lg?: number;\n xl?: number;\n xxl?: number;\n};\n\n// TODO: clamp span numbers higher than 12\nexport const LayoutItem = forwardRef<HTMLDivElement, LayoutItemProps>(\n (\n { children, className, span = 12, xs, sm, md, lg, xl, xxl, ...props },\n ref\n ) => {\n return (\n <div\n ref={ref}\n {...props}\n className={cx(\n styles.cell,\n styles[`xs${xs || span}`],\n {\n [styles[`sm${sm}`]]: sm,\n [styles[`md${md}`]]: md,\n [styles[`lg${lg}`]]: lg,\n [styles[`xl${xl}`]]: xl,\n [styles[`xxl${xxl}`]]: xxl,\n },\n className\n )}\n >\n {children}\n </div>\n );\n }\n);\n\nLayoutItem.displayName = \"LayoutItem\";\n\nexport const Layout = Object.assign(LayoutElement, {\n Item: LayoutItem,\n});\n"],"names":["LayoutElement","forwardRef","props","ref","children","className","fluid","variant","rest","jsxRuntimeExports","
|
|
1
|
+
{"version":3,"file":"Layout.js","sources":["../src/components/Layout/Layout.tsx"],"sourcesContent":["import { ComponentPropsWithoutRef, forwardRef } from \"react\";\nimport cx from \"classnames\";\nimport styles from \"./Layout.module.scss\";\n\nexport type LayoutProps = ComponentPropsWithoutRef<\"div\"> & {\n fluid?: boolean;\n variant?: \"default\" | \"wide\" | \"narrow\";\n};\n\nexport const LayoutElement = forwardRef<HTMLDivElement, LayoutProps>(\n (props, ref) => {\n const {\n children,\n className,\n fluid = false,\n variant = \"default\",\n ...rest\n } = props;\n\n return (\n <div className={cx(styles.container, { [styles.fluid]: fluid })}>\n <div\n className={cx(\n styles.grid,\n {\n [styles.wide]: variant === \"wide\",\n [styles.narrow]: variant === \"narrow\",\n },\n className\n )}\n ref={ref}\n {...rest}\n >\n {children}\n </div>\n </div>\n );\n }\n);\n\nLayoutElement.displayName = \"Layout\";\n\nexport type LayoutItemProps = ComponentPropsWithoutRef<\"div\"> & {\n span?: number;\n xs?: number;\n sm?: number;\n md?: number;\n lg?: number;\n xl?: number;\n xxl?: number;\n};\n\n// TODO: clamp span numbers higher than 12\nexport const LayoutItem = forwardRef<HTMLDivElement, LayoutItemProps>(\n (\n { children, className, span = 12, xs, sm, md, lg, xl, xxl, ...props },\n ref\n ) => {\n return (\n <div\n ref={ref}\n {...props}\n className={cx(\n styles.cell,\n styles[`xs${xs || span}`],\n {\n [styles[`sm${sm}`]]: sm,\n [styles[`md${md}`]]: md,\n [styles[`lg${lg}`]]: lg,\n [styles[`xl${xl}`]]: xl,\n [styles[`xxl${xxl}`]]: xxl,\n },\n className\n )}\n >\n {children}\n </div>\n );\n }\n);\n\nLayoutItem.displayName = \"LayoutItem\";\n\nexport const Layout = Object.assign(LayoutElement, {\n Item: LayoutItem,\n});\n"],"names":["LayoutElement","forwardRef","props","ref","children","className","fluid","variant","rest","jsxRuntimeExports","cx","styles","LayoutItem","span","xs","sm","md","lg","xl","xxl","Layout"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GASOA,IAAAC;AAAA,EAAsB,CAAAC,GAAAC,MAAA;AAEzB,UAAA;AAAA,MAAM,UAAAC;AAAA,MACJ,WAAAC;AAAA,MACA,OAAAC,IAAA;AAAA,MACQ,SAAAC,IAAA;AAAA,MACE,GAAAC;AAAA,IACP,IAAAN;AAGL,WAAA,gBAAAO,EAAA,IAAA,OAAA,EAAA,WAAAC,EAAAC,EAAA,WAAA,EAAA,CAAAA,EAAA,KAAA,GAAAL,EAAA,CAAA,GAAA,UAAA,gBAA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
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("./jsx-runtime-494437bb.cjs"),c=require("./
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("./jsx-runtime-494437bb.cjs"),c=require("./index-43f4d750.cjs"),u=require("react"),s=require("./useTrackingId.cjs"),d=require("./ui-react-ec7c804b.cjs"),t=u.forwardRef((e,i)=>{const r={appearance:e.appearance,quiet:e.quiet,children:d.n(e.children)},n=s.useTrackingId({name:"Link",data:r,hasOverride:!!e["data-tracking-id"]});return a.jsxRuntimeExports.jsx(c.q,{ref:i,"data-tracking-id":n,...e})});exports.Link=t;exports.default=t;
|
|
2
2
|
//# sourceMappingURL=Link.cjs.map
|
package/Link.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.cjs","sources":["../src/components/Link/Link.tsx"],"sourcesContent":["import {\n LinkProps as CoreLinkProps,\n Link as CoreLink,\n} from \"@servicetitan/hammer-react/dist/Link\";\nimport { Ref, forwardRef } from \"react\";\nimport { useTrackingId } from \"../../hooks/useTrackingId\";\nimport { DataTrackingId } from \"../../types/DataTrackingId\";\nimport {
|
|
1
|
+
{"version":3,"file":"Link.cjs","sources":["../src/components/Link/Link.tsx"],"sourcesContent":["import {\n LinkProps as CoreLinkProps,\n Link as CoreLink,\n} from \"@servicetitan/hammer-react/dist/Link\";\nimport { Ref, forwardRef } from \"react\";\nimport { useTrackingId } from \"../../hooks/useTrackingId\";\nimport { DataTrackingId } from \"../../types/DataTrackingId\";\nimport { childrenToString } from \"@servicetitan/hammer-react\";\n\nexport type LinkProps = CoreLinkProps & DataTrackingId;\n\nexport const Link = forwardRef(\n (props: LinkProps, ref: Ref<HTMLAnchorElement>) => {\n const data = {\n appearance: props.appearance,\n quiet: props.quiet,\n children: childrenToString(props.children),\n };\n\n const trackingId = useTrackingId({\n name: \"Link\",\n data,\n hasOverride: !!props[\"data-tracking-id\"],\n });\n return <CoreLink ref={ref} data-tracking-id={trackingId} {...props} />;\n }\n);\n"],"names":["Link","forwardRef","props","ref","data","childrenToString","trackingId","useTrackingId","CoreLink"],"mappings":"qRAWaA,EAAOC,EAAA,WAClB,CAACC,EAAkBC,IAAgC,CACjD,MAAMC,EAAO,CACX,WAAYF,EAAM,WAClB,MAAOA,EAAM,MACb,SAAUG,EAAAA,EAAiBH,EAAM,QAAQ,CAAA,EAGrCI,EAAaC,EAAAA,cAAc,CAC/B,KAAM,OACN,KAAAH,EACA,YAAa,CAAC,CAACF,EAAM,kBAAkB,CAAA,CACxC,EACD,+BAAQM,EAAS,EAAA,CAAA,IAAAL,EAAU,mBAAkBG,EAAa,GAAGJ,CAAO,CAAA,CACtE,CACF"}
|
package/Link.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { q as n } from "./
|
|
1
|
+
import { j as e } from "./jsx-runtime-82a9ddf6.js";
|
|
2
|
+
import { q as n } from "./index-91597e0a.js";
|
|
3
3
|
import { forwardRef as d } from "react";
|
|
4
4
|
import { useTrackingId as m } from "./useTrackingId.js";
|
|
5
|
-
import {
|
|
6
|
-
const
|
|
5
|
+
import { n as o } from "./ui-react-c38ec008.js";
|
|
6
|
+
const g = d(
|
|
7
7
|
(a, r) => {
|
|
8
8
|
const t = {
|
|
9
9
|
appearance: a.appearance,
|
|
10
10
|
quiet: a.quiet,
|
|
11
11
|
children: o(a.children)
|
|
12
|
-
},
|
|
12
|
+
}, i = m({
|
|
13
13
|
name: "Link",
|
|
14
14
|
data: t,
|
|
15
15
|
hasOverride: !!a["data-tracking-id"]
|
|
16
16
|
});
|
|
17
|
-
return /* @__PURE__ */
|
|
17
|
+
return /* @__PURE__ */ e.jsx(n, { ref: r, "data-tracking-id": i, ...a });
|
|
18
18
|
}
|
|
19
19
|
);
|
|
20
20
|
export {
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
g as Link,
|
|
22
|
+
g as default
|
|
23
23
|
};
|
|
24
24
|
//# sourceMappingURL=Link.js.map
|
package/Link.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.js","sources":["../src/components/Link/Link.tsx"],"sourcesContent":["import {\n LinkProps as CoreLinkProps,\n Link as CoreLink,\n} from \"@servicetitan/hammer-react/dist/Link\";\nimport { Ref, forwardRef } from \"react\";\nimport { useTrackingId } from \"../../hooks/useTrackingId\";\nimport { DataTrackingId } from \"../../types/DataTrackingId\";\nimport {
|
|
1
|
+
{"version":3,"file":"Link.js","sources":["../src/components/Link/Link.tsx"],"sourcesContent":["import {\n LinkProps as CoreLinkProps,\n Link as CoreLink,\n} from \"@servicetitan/hammer-react/dist/Link\";\nimport { Ref, forwardRef } from \"react\";\nimport { useTrackingId } from \"../../hooks/useTrackingId\";\nimport { DataTrackingId } from \"../../types/DataTrackingId\";\nimport { childrenToString } from \"@servicetitan/hammer-react\";\n\nexport type LinkProps = CoreLinkProps & DataTrackingId;\n\nexport const Link = forwardRef(\n (props: LinkProps, ref: Ref<HTMLAnchorElement>) => {\n const data = {\n appearance: props.appearance,\n quiet: props.quiet,\n children: childrenToString(props.children),\n };\n\n const trackingId = useTrackingId({\n name: \"Link\",\n data,\n hasOverride: !!props[\"data-tracking-id\"],\n });\n return <CoreLink ref={ref} data-tracking-id={trackingId} {...props} />;\n }\n);\n"],"names":["Link","forwardRef","props","ref","data","childrenToString","trackingId","useTrackingId","CoreLink"],"mappings":";;;;;AAWO,MAAMA,IAAOC;AAAA,EAClB,CAACC,GAAkBC,MAAgC;AACjD,UAAMC,IAAO;AAAA,MACX,YAAYF,EAAM;AAAA,MAClB,OAAOA,EAAM;AAAA,MACb,UAAUG,EAAiBH,EAAM,QAAQ;AAAA,IAAA,GAGrCI,IAAaC,EAAc;AAAA,MAC/B,MAAM;AAAA,MACN,MAAAH;AAAA,MACA,aAAa,CAAC,CAACF,EAAM,kBAAkB;AAAA,IAAA,CACxC;AACD,iCAAQM,GAAS,EAAA,KAAAL,GAAU,oBAAkBG,GAAa,GAAGJ,EAAO,CAAA;AAAA,EACtE;AACF;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var le=require("./ListView.css");const h=require("./jsx-runtime-944c88e2-2b81c205.cjs"),o=require("react"),M=require("./index-67d20edb.cjs"),W=require("./useLayoutPropsUtil-e307abc7-3826ee09.cjs"),Y=require("./floating-ui.react-518bb704.cjs"),z=require("./Checkbox-949d5f00.cjs");require("./Helper-74a1f07f-2aeadeae.cjs");/* empty css */const H="_listview_b40yx_4",Q="_cell_b40yx_61",C={listview:H,"listview-option":"_listview-option_b40yx_17",cell:Q,"cell-children":"_cell-children_b40yx_92"};function F(s,t,e){return s.sort(function(d,n){const w=d[e],i=n[e];return t.indexOf(w)>t.indexOf(i)?1:-1}),s}const T=(s,t,e,d,n,w)=>{if(t)switch(s.code){case"Enter":case"Space":t[e.row].focusables[e.col].click(),document.activeElement.click(),s.preventDefault();break;case"ArrowDown":if(n==null||n.focus(),t[e.row].focusables[e.col].removeAttribute("data-interactive"),e.row===t.length-1){t[0].focusables[e.col].setAttribute("data-interactive","focus-visible"),w(t[0].focusables[e.col].id),d(i=>({...i,row:0}));break}t[e.row+1].focusables[e.col].setAttribute("data-interactive","focus-visible"),w(t[e.row+1].focusables[e.col].id),d(i=>({...i,row:e.row+1}));break;case"ArrowUp":if(n==null||n.focus(),t[e.row].focusables[e.col].removeAttribute("data-interactive"),e.row===0){t[t.length-1].focusables[e.col].setAttribute("data-interactive","focus-visible"),w(t[t.length-1].focusables[e.col].id),d(i=>({...i,row:t.length-1}));break}t[e.row-1].focusables[e.col].setAttribute("data-interactive","focus-visible"),w(t[e.row-1].focusables[e.col].id),d(i=>({...i,row:e.row-1}));break;case"ArrowRight":if(n==null||n.focus(),t[e.row].focusables[e.col].removeAttribute("data-interactive"),e.col===t[e.row].focusables.length-1){t[e.row].focusables[0].setAttribute("data-interactive","focus-visible"),w(t[e.row].focusables[0].id),d(i=>({...i,col:0}));break}t[e.row].focusables[e.col+1].setAttribute("data-interactive","focus-visible"),w(t[e.row].focusables[e.col+1].id),d(i=>({...i,col:e.col+1}));break;case"ArrowLeft":if(n==null||n.focus(),t[e.row].focusables[e.col].removeAttribute("data-interactive"),e.col===0){t[e.row].focusables[t[e.row].focusables.length-1].setAttribute("data-interactive","focus-visible"),w(t[e.row].focusables[t[e.row].focusables.length-1].id),d(i=>({...i,col:t[e.row].focusables.length-1}));break}t[e.row].focusables[e.col-1].setAttribute("data-interactive","focus-visible"),w(t[e.row].focusables[e.col-1].id),d(i=>({...i,col:e.col-1}));break}},U=o.forwardRef((s,t)=>{const{className:e,children:d,onClick:n,onKeyDown:w,onKeyUp:i,onBlur:$,onChange:q,style:L,disabled:A,id:S,...a}=s,O=o.useRef(null),r=Y.useMergeRefs([t,O]),I=o.useRef(),N=o.useRef(null),D=o.useId(),[p,x]=o.useState(!1),{selectedItems:v,setSelectedItems:g,controlled:R}=ee(),y="item"in a?A||a.item.disabled:A;o.useEffect(()=>{var l;const f=(l=O.current)==null?void 0:l.querySelectorAll("button:not(:disabled):not([aria-disabled='true']), input:not(:disabled):not([aria-disabled='true']), [tabindex='0']:not(:disabled):not([aria-disabled='true'])");f==null||f.forEach((V,J)=>{V.setAttribute("tabindex","-1"),!V.hasAttribute("id")&&V.setAttribute("id",`${D}-${J}`)})},[D]),o.useEffect(()=>{if("item"in a){const l=v.some(f=>f.label===a.item.label);x(l)}else{const l=v.includes(a.label);x(l)}},[R,a,v]);const j=l=>{q==null||q(l,{checked:p})},_=()=>{R||E()};function E(){"item"in a?v.some(l=>l.label===a.item.label)?(g(l=>l.filter(f=>(f==null?void 0:f.label)!==a.item.label)),x(!1)):(g(l=>[...l,a.item]),x(!0)):v.some(l=>l===a.label)?(g(l=>l.filter(f=>f!==a.label)),x(!1)):(g(l=>[...l,a.label]),x(!0))}if("item"in a){I.current=a.item;const{item:l,...f}=a;return h.fr.jsxs("div",{className:M.cx([C["listview-option"]],e),"data-anv":"ListViewOption",style:L,ref:r,"aria-disabled":y,"aria-selected":p,"aria-label":l.label,role:"row",...f,children:[h.fr.jsx("div",{className:C.cell,ref:N,role:"gridcell",children:h.fr.jsx(z.re,{disabled:y,checked:p,"aria-label":l.label,onChange:j,onClick:_})}),d]})}return h.fr.jsxs("div",{className:M.cx([C["listview-option"]],e),"data-anv":"ListViewOption",style:L,ref:r,"aria-disabled":y,"aria-selected":p,"aria-label":"label"in s?s.label:"Select",role:"row",...a,children:[h.fr.jsx("div",{className:C.cell,ref:N,role:"gridcell",children:h.fr.jsx(z.re,{disabled:y,checked:p,"aria-label":"label"in s?s.label:"Select",onChange:j,onClick:_})}),d]})});U.displayName="ListViewOption";const B=o.forwardRef((s,t)=>{const{...e}=s;return h.fr.jsx("div",{role:"gridcell",...e,ref:t})});B.displayName="ListViewOptionCell";const P=o.createContext(null),X=s=>s.querySelectorAll("button:not(:disabled):not([aria-disabled='true']), input:not(:disabled):not([aria-disabled='true']), [tabindex='0']:not(:disabled):not([aria-disabled='true'])"),Z=function(s,t){const{layoutStyles:e,componentProps:d}=W.J(s),{onSelectionChange:n,className:w,selected:i,defaultSelected:$,style:q,onKeyDown:L,...A}=d,S=o.useRef(null),a=o.useRef(!0),O=Y.useMergeRefs([t,S]),[r,I]=o.useState(),[N,D]=o.useState(),[p,x]=o.useState(i??$??[]),[v,g]=o.useState({row:0,col:0}),R={...q,...e},y=c=>{a.current&&r&&r[v.row].focusables[v.col].setAttribute("data-interactive","focus-visible")},j=()=>{var c;r&&((c=r[v.row].focusables[v.col])==null||c.removeAttribute("data-interactive"))},_=c=>{L==null||L(c),r&&(a.current=!0,T(c,r,v,g,S.current,b=>D(b)))},E=c=>{var b;if(a.current=!1,r&&S.current){(b=r[v.row].focusables[v.col])==null||b.removeAttribute("data-interactive");const u=c.target.closest("button:not(:disabled):not([aria-disabled='true']), input:not(:disabled):not([aria-disabled='true']), [data-anv='Checkbox']"),m=c.target.closest('[data-anv="ListViewOption"]');if(!m||m.ariaDisabled)return;const k=r.findIndex(G=>G.node===m);if(!u){r[k].focusables[0].click();return}const K=Array.prototype.indexOf.call(r[k].focusables,(u==null?void 0:u.getAttribute("data-anv"))==="Checkbox"?u.children[0]:u);g({row:k,col:K})}};o.useEffect(()=>{if(!S.current)return;const c=S.current.querySelectorAll("div[data-anv='ListViewOption']:not([aria-disabled='true'])"),b=Array.from(c).map(u=>{const m=X(u);return{node:u,focusables:m}});I(b)},[s.children]);const l=o.useRef();o.useEffect(()=>{if(!r)return;const c=r.map(u=>u.node.ariaLabel),b=F(p,c,"label");JSON.stringify(l.current)!==JSON.stringify(b)&&(n==null||n(b),l.current=b)},[n,r,p]),o.useEffect(()=>{if(!i)return;const c=i.reduce((m,k)=>m.find(K=>K.label===k.label)?m:m.concat([k]),[]);if(!r)return;const b=r.map(m=>m.node.ariaLabel),u=F(c,b,"label");JSON.stringify(l.current)!==JSON.stringify(u)&&(n==null||n(u),x(u),l.current=u)},[n,r,i]);const f=M.cx([C.listview],w);if("items"in A){const{children:c,items:b,...u}=A;return h.fr.jsx(P.Provider,{value:{options:r,onSelectionChange:n,selectedItems:p,setSelectedItems:x,items:b,controlled:!!i},children:h.fr.jsx("div",{ref:O,className:f,style:R,"data-anv":"ListView",role:"grid","aria-multiselectable":"true",onFocus:y,onBlur:j,onKeyDown:_,onMouseDown:E,"aria-activedescendant":N,tabIndex:0,...u,children:c==null?void 0:c({items:b.map(m=>m)})})})}const{children:V,...J}=A;return h.fr.jsx(P.Provider,{value:{options:r,onSelectionChange:n,selectedItems:p,setSelectedItems:x,controlled:!!i},children:h.fr.jsx("div",{ref:O,className:f,style:R,"data-anv":"ListView",role:"grid",onFocus:y,onBlur:j,onKeyDown:_,onMouseDown:E,"aria-activedescendant":N,tabIndex:0,...J,children:V})})};function ee(){const s=o.useContext(P);if(s==null)throw new Error("useListView must be wrapped in <ListView />");return s}Z.displayName="ListView";const te=Object.assign(o.forwardRef(Z),{Option:U,OptionCell:B});exports.Ae=te;exports.Y=U;exports.Z=B;exports.t=C;
|
|
2
|
+
//# sourceMappingURL=ListView-b33a9948.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListView-b33a9948.cjs","sources":["../node_modules/@servicetitan/hammer-react/dist/ListView.module-3868990a.js","../node_modules/@servicetitan/hammer-react/dist/ListView.js"],"sourcesContent":["import \"./ListView.css\";\nconst l = \"_listview_b40yx_4\", i = \"_cell_b40yx_61\", t = {\n listview: l,\n \"listview-option\": \"_listview-option_b40yx_17\",\n cell: i,\n \"cell-children\": \"_cell-children_b40yx_92\"\n};\nexport {\n t as s\n};\n//# sourceMappingURL=ListView.module-3868990a.js.map\n","import { j as m } from \"./jsx-runtime-944c88e2.js\";\nimport { forwardRef as T, useRef as V, useId as F, useState as E, useEffect as B, createContext as I, useContext as ee } from \"react\";\nimport U from \"classnames\";\nimport \"tinycolor2\";\nimport \"@servicetitan/hammer-token\";\nimport { a as te } from \"./useLayoutPropsUtil-e307abc7.js\";\nimport { useMergeRefs as X } from \"@floating-ui/react\";\nimport { s as H } from \"./ListView.module-3868990a.js\";\nimport { Checkbox as Q } from \"./Checkbox.js\";\nimport \"./Helper-74a1f07f.js\";\nimport \"./Spinner.module-618b582c.js\";\nfunction W(a, t, e) {\n return a.sort(function(u, r) {\n const f = u[e], i = r[e];\n return t.indexOf(f) > t.indexOf(i) ? 1 : -1;\n }), a;\n}\nconst re = (a, t, e, u, r, f) => {\n if (t)\n switch (a.code) {\n case \"Enter\":\n case \"Space\":\n t[e.row].focusables[e.col].click(), document.activeElement.click(), a.preventDefault();\n break;\n case \"ArrowDown\":\n if (r == null || r.focus(), t[e.row].focusables[e.col].removeAttribute(\n \"data-interactive\"\n ), e.row === t.length - 1) {\n t[0].focusables[e.col].setAttribute(\n \"data-interactive\",\n \"focus-visible\"\n ), f(t[0].focusables[e.col].id), u((i) => ({ ...i, row: 0 }));\n break;\n }\n t[e.row + 1].focusables[e.col].setAttribute(\n \"data-interactive\",\n \"focus-visible\"\n ), f(\n t[e.row + 1].focusables[e.col].id\n ), u((i) => ({ ...i, row: e.row + 1 }));\n break;\n case \"ArrowUp\":\n if (r == null || r.focus(), t[e.row].focusables[e.col].removeAttribute(\n \"data-interactive\"\n ), e.row === 0) {\n t[t.length - 1].focusables[e.col].setAttribute(\n \"data-interactive\",\n \"focus-visible\"\n ), f(\n t[t.length - 1].focusables[e.col].id\n ), u((i) => ({ ...i, row: t.length - 1 }));\n break;\n }\n t[e.row - 1].focusables[e.col].setAttribute(\n \"data-interactive\",\n \"focus-visible\"\n ), f(\n t[e.row - 1].focusables[e.col].id\n ), u((i) => ({ ...i, row: e.row - 1 }));\n break;\n case \"ArrowRight\":\n if (r == null || r.focus(), t[e.row].focusables[e.col].removeAttribute(\n \"data-interactive\"\n ), e.col === t[e.row].focusables.length - 1) {\n t[e.row].focusables[0].setAttribute(\n \"data-interactive\",\n \"focus-visible\"\n ), f(t[e.row].focusables[0].id), u((i) => ({\n ...i,\n col: 0\n }));\n break;\n }\n t[e.row].focusables[e.col + 1].setAttribute(\n \"data-interactive\",\n \"focus-visible\"\n ), f(\n t[e.row].focusables[e.col + 1].id\n ), u((i) => ({ ...i, col: e.col + 1 }));\n break;\n case \"ArrowLeft\":\n if (r == null || r.focus(), t[e.row].focusables[e.col].removeAttribute(\n \"data-interactive\"\n ), e.col === 0) {\n t[e.row].focusables[t[e.row].focusables.length - 1].setAttribute(\"data-interactive\", \"focus-visible\"), f(\n t[e.row].focusables[t[e.row].focusables.length - 1].id\n ), u((i) => ({\n ...i,\n col: t[e.row].focusables.length - 1\n }));\n break;\n }\n t[e.row].focusables[e.col - 1].setAttribute(\n \"data-interactive\",\n \"focus-visible\"\n ), f(\n t[e.row].focusables[e.col - 1].id\n ), u((i) => ({ ...i, col: e.col - 1 }));\n break;\n }\n}, Y = T(\n (a, t) => {\n const {\n className: e,\n children: u,\n onClick: r,\n onKeyDown: f,\n onKeyUp: i,\n onBlur: z,\n onChange: N,\n style: y,\n disabled: S,\n id: L,\n ...s\n } = a, C = V(null), l = X([t, C]), M = V(), j = V(null), K = F(), [x, h] = E(!1), { selectedItems: w, setSelectedItems: g, controlled: P } = le(), O = \"item\" in s ? S || s.item.disabled : S;\n B(() => {\n var n;\n const o = (n = C.current) == null ? void 0 : n.querySelectorAll(\n \"button:not(:disabled):not([aria-disabled='true']), input:not(:disabled):not([aria-disabled='true']), [tabindex='0']:not(:disabled):not([aria-disabled='true'])\"\n );\n o == null || o.forEach((A, p) => {\n A.setAttribute(\"tabindex\", \"-1\"), !A.hasAttribute(\"id\") && A.setAttribute(\"id\", `${K}-${p}`);\n });\n }, [K]), B(() => {\n if (\"item\" in s) {\n const o = w.some((n) => n.label === s.item.label);\n h(o);\n } else {\n const o = w.includes(\n s.label\n );\n h(o);\n }\n }, [P, s, w]);\n const D = (o) => {\n N == null || N(o, { checked: x });\n }, R = () => {\n P || J();\n };\n function J() {\n \"item\" in s ? w.some((n) => n.label === s.item.label) ? (g(\n (n) => n.filter(\n (A) => (A == null ? void 0 : A.label) !== s.item.label\n )\n ), h(!1)) : (g((n) => [...n, s.item]), h(!0)) : w.some((n) => n === s.label) ? (g(\n (n) => n.filter((A) => A !== s.label)\n ), h(!1)) : (g((n) => [...n, s.label]), h(!0));\n }\n if (\"item\" in s) {\n M.current = s.item;\n const { item: o, ...n } = s;\n return /* @__PURE__ */ m.jsxs(\n \"div\",\n {\n className: U([H[\"listview-option\"]], e),\n \"data-anv\": \"ListViewOption\",\n style: y,\n ref: l,\n \"aria-disabled\": O,\n \"aria-selected\": x,\n \"aria-label\": o.label,\n role: \"row\",\n ...n,\n children: [\n /* @__PURE__ */ m.jsx(\"div\", { className: H.cell, ref: j, role: \"gridcell\", children: /* @__PURE__ */ m.jsx(\n Q,\n {\n disabled: O,\n checked: x,\n \"aria-label\": o.label,\n onChange: D,\n onClick: R\n }\n ) }),\n u\n ]\n }\n );\n }\n return /* @__PURE__ */ m.jsxs(\n \"div\",\n {\n className: U([H[\"listview-option\"]], e),\n \"data-anv\": \"ListViewOption\",\n style: y,\n ref: l,\n \"aria-disabled\": O,\n \"aria-selected\": x,\n \"aria-label\": \"label\" in a ? a.label : \"Select\",\n role: \"row\",\n ...s,\n children: [\n /* @__PURE__ */ m.jsx(\"div\", { className: H.cell, ref: j, role: \"gridcell\", children: /* @__PURE__ */ m.jsx(\n Q,\n {\n disabled: O,\n checked: x,\n \"aria-label\": \"label\" in a ? a.label : \"Select\",\n onChange: D,\n onClick: R\n }\n ) }),\n u\n ]\n }\n );\n }\n);\nY.displayName = \"ListViewOption\";\nconst Z = T((a, t) => {\n const { ...e } = a;\n return /* @__PURE__ */ m.jsx(\"div\", { role: \"gridcell\", ...e, ref: t });\n});\nZ.displayName = \"ListViewOptionCell\";\nconst $ = I(null), ie = (a) => a.querySelectorAll(\n \"button:not(:disabled):not([aria-disabled='true']), input:not(:disabled):not([aria-disabled='true']), [tabindex='0']:not(:disabled):not([aria-disabled='true'])\"\n), _ = function(a, t) {\n const { layoutStyles: e, componentProps: u } = te(a), {\n onSelectionChange: r,\n className: f,\n selected: i,\n defaultSelected: z,\n style: N,\n onKeyDown: y,\n ...S\n } = u, L = V(null), s = V(!0), C = X([t, L]), [l, M] = E(), [j, K] = E(), [x, h] = E(\n i ?? z ?? []\n ), [w, g] = E({\n row: 0,\n col: 0\n }), P = {\n ...N,\n ...e\n }, O = (c) => {\n s.current && l && l[w.row].focusables[w.col].setAttribute(\n \"data-interactive\",\n \"focus-visible\"\n );\n }, D = () => {\n var c;\n l && ((c = l[w.row].focusables[w.col]) == null || c.removeAttribute(\n \"data-interactive\"\n ));\n }, R = (c) => {\n y == null || y(c), l && (s.current = !0, re(\n c,\n l,\n w,\n g,\n L.current,\n (d) => K(d)\n ));\n }, J = (c) => {\n var d;\n if (s.current = !1, l && L.current) {\n (d = l[w.row].focusables[w.col]) == null || d.removeAttribute(\n \"data-interactive\"\n );\n const b = c.target.closest(\n \"button:not(:disabled):not([aria-disabled='true']), input:not(:disabled):not([aria-disabled='true']), [data-anv='Checkbox']\"\n ), v = c.target.closest(\n '[data-anv=\"ListViewOption\"]'\n );\n if (!v || v.ariaDisabled)\n return;\n const k = l.findIndex((q) => q.node === v);\n if (!b) {\n l[k].focusables[0].click();\n return;\n }\n const G = Array.prototype.indexOf.call(\n l[k].focusables,\n (b == null ? void 0 : b.getAttribute(\"data-anv\")) === \"Checkbox\" ? b.children[0] : b\n );\n g({ row: k, col: G });\n }\n };\n B(() => {\n if (!L.current)\n return;\n const c = L.current.querySelectorAll(\n \"div[data-anv='ListViewOption']:not([aria-disabled='true'])\"\n ), d = Array.from(c).map((b) => {\n const v = ie(b);\n return {\n node: b,\n focusables: v\n };\n });\n M(d);\n }, [a.children]);\n const o = V();\n B(() => {\n if (!l)\n return;\n const c = l.map((b) => b.node.ariaLabel), d = W(x, c, \"label\");\n JSON.stringify(o.current) !== JSON.stringify(d) && (r == null || r(d), o.current = d);\n }, [r, l, x]), B(() => {\n if (!i)\n return;\n const c = i.reduce(\n (v, k) => v.find((q) => q.label === k.label) ? v : v.concat([k]),\n []\n );\n if (!l)\n return;\n const d = l.map((v) => v.node.ariaLabel), b = W(c, d, \"label\");\n JSON.stringify(o.current) !== JSON.stringify(b) && (r == null || r(b), h(b), o.current = b);\n }, [r, l, i]);\n const n = U([H.listview], f);\n if (\"items\" in S) {\n const { children: c, items: d, ...b } = S;\n return /* @__PURE__ */ m.jsx(\n $.Provider,\n {\n value: {\n options: l,\n onSelectionChange: r,\n selectedItems: x,\n setSelectedItems: h,\n items: d,\n controlled: !!i\n },\n children: /* @__PURE__ */ m.jsx(\n \"div\",\n {\n ref: C,\n className: n,\n style: P,\n \"data-anv\": \"ListView\",\n role: \"grid\",\n \"aria-multiselectable\": \"true\",\n onFocus: O,\n onBlur: D,\n onKeyDown: R,\n onMouseDown: J,\n \"aria-activedescendant\": j,\n tabIndex: 0,\n ...b,\n children: c == null ? void 0 : c({\n items: d.map((v) => v)\n })\n }\n )\n }\n );\n }\n const { children: A, ...p } = S;\n return /* @__PURE__ */ m.jsx(\n $.Provider,\n {\n value: {\n options: l,\n onSelectionChange: r,\n selectedItems: x,\n setSelectedItems: h,\n controlled: !!i\n },\n children: /* @__PURE__ */ m.jsx(\n \"div\",\n {\n ref: C,\n className: n,\n style: P,\n \"data-anv\": \"ListView\",\n role: \"grid\",\n onFocus: O,\n onBlur: D,\n onKeyDown: R,\n onMouseDown: J,\n \"aria-activedescendant\": j,\n tabIndex: 0,\n ...p,\n children: A\n }\n )\n }\n );\n};\nfunction le() {\n const a = ee($);\n if (a == null)\n throw new Error(\"useListView must be wrapped in <ListView />\");\n return a;\n}\n_.displayName = \"ListView\";\nconst Ae = Object.assign(\n T(_),\n {\n Option: Y,\n OptionCell: Z\n }\n);\nexport {\n Ae as ListView,\n Y as ListViewOption,\n Z as ListViewOptionCell\n};\n//# sourceMappingURL=ListView.js.map\n"],"names":["l","i","t","W","a","u","r","f","re","Y","React","t$1","z","N","y","S","L","s","C","floatingUi_react","M","j","K","x","h","w","P","le","O","n","o","A","p","D","R","J","jsxRuntime944c88e2","index","Checkbox","Z","$","ie","_","useLayoutPropsUtilE307abc7","d","b","v","q","G","Ae"],"mappings":"oWACK,MAAAA,EAAA,oBAAAC,EAAA,iBAAAC,EAAA,CACL,SAAAF,EACA,kBAAA,4BACA,KAAAC,EACA,gBAAA,yBACA,ECKA,SAAAE,EAAAC,EAAA,EAAA,EAAA,CACA,OAAAA,EAAA,KAAA,SAAAC,EAAAC,EAAA,CACA,MAAAC,EAAAF,EAAA,CAAA,EAAA,EAAAC,EAAA,CAAA,EACA,OAAA,EAAA,QAAAC,CAAA,EAAA,EAAA,QAAA,CAAA,EAAA,EAAA,EACA,CAAA,EAAAH,CACA,CACK,MAAAI,EAAA,CAAAJ,EAAA,EAAA,EAAAC,EAAAC,EAAAC,IAAA,CACL,GAAA,EACA,OAAAH,EAAA,KAAA,CACA,IAAA,QACA,IAAA,QACA,EAAA,EAAA,GAAA,EAAA,WAAA,EAAA,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,EACA,WAAA,CAAA,CAAA,CACA,EACA,SAAAR,EAAA,GAAA,IACA,MACA,CACA,IAAAlB,EACA,UAAAW,EACA,MAAAH,EACA,WAAA,WACA,KAAA,OACA,uBAAA,OACA,QAAAE,EACA,OAAAK,EACA,UAAAC,EACA,YAAAC,EACA,wBAAAd,EACA,SAAA,EACA,GAAAwB,EACA,SAAA,GAAA,KAAA,OAAA,EAAA,CACA,MAAAD,EAAA,IAAAE,GAAAA,CAAA,CACA,CAAA,CACA,CACA,CACA,CACA,CACA,CACA,KAAA,CAAA,SAAAf,EAAA,GAAAC,CAAA,EAAAjB,EACA,OAAAqB,EAAA,GAAA,IACAI,EAAA,SACA,CACA,MAAA,CACA,QAAAxC,EACA,kBAAAM,EACA,cAAAiB,EACA,iBAAAC,EACA,WAAA,CAAA,CAAA,CACA,EACA,SAAAY,EAAA,GAAA,IACA,MACA,CACA,IAAAlB,EACA,UAAAW,EACA,MAAAH,EACA,WAAA,WACA,KAAA,OACA,QAAAE,EACA,OAAAK,EACA,UAAAC,EACA,YAAAC,EACA,wBAAAd,EACA,SAAA,EACA,GAAAW,EACA,SAAAD,CACA,CACA,CACA,CACA,CACA,EACA,SAAAJ,IAAA,CACA,MAAAvB,EAAAM,EAAA,WAAA8B,CAAA,EACA,GAAApC,GAAA,KACA,MAAA,IAAA,MAAA,6CAAA,EACA,OAAAA,CACA,CACAsC,EAAA,YAAA,WACK,MAAAO,GAAA,OAAA,OACLvC,EAAA,WAAAgC,CAAA,EACA,CACA,OAAAjC,EACA,WAAA8B,CACA,CACA","x_google_ignoreList":[0,1]}
|
|
@@ -1,18 +1,24 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { r as U } from "./Checkbox-
|
|
8
|
-
import "./Helper-74a1f07f-
|
|
9
|
-
/* empty css */
|
|
1
|
+
import "./ListView.css";
|
|
2
|
+
import { f as m } from "./jsx-runtime-944c88e2-e73fa629.js";
|
|
3
|
+
import { forwardRef as z, useRef as k, useId as T, useState as D, useEffect as J, createContext as X, useContext as ee } from "react";
|
|
4
|
+
import { c as q } from "./index-e0f6271a.js";
|
|
5
|
+
import { J as te } from "./useLayoutPropsUtil-e307abc7-cbe2fb6d.js";
|
|
6
|
+
import { u as W } from "./floating-ui.react-3f85fcd1.js";
|
|
7
|
+
import { r as U } from "./Checkbox-e2b0e7d0.js";
|
|
8
|
+
import "./Helper-74a1f07f-18441e16.js";
|
|
9
|
+
/* empty css */const le = "_listview_b40yx_4", ie = "_cell_b40yx_61", I = {
|
|
10
|
+
listview: le,
|
|
11
|
+
"listview-option": "_listview-option_b40yx_17",
|
|
12
|
+
cell: ie,
|
|
13
|
+
"cell-children": "_cell-children_b40yx_92"
|
|
14
|
+
};
|
|
15
|
+
function G(r, t, e) {
|
|
10
16
|
return r.sort(function(d, s) {
|
|
11
17
|
const f = d[e], i = s[e];
|
|
12
18
|
return t.indexOf(f) > t.indexOf(i) ? 1 : -1;
|
|
13
19
|
}), r;
|
|
14
20
|
}
|
|
15
|
-
const
|
|
21
|
+
const oe = (r, t, e, d, s, f) => {
|
|
16
22
|
if (t)
|
|
17
23
|
switch (r.code) {
|
|
18
24
|
case "Enter":
|
|
@@ -95,7 +101,7 @@ const le = (r, t, e, d, s, f) => {
|
|
|
95
101
|
), d((i) => ({ ...i, col: e.col - 1 }));
|
|
96
102
|
break;
|
|
97
103
|
}
|
|
98
|
-
},
|
|
104
|
+
}, Y = z(
|
|
99
105
|
(r, t) => {
|
|
100
106
|
const {
|
|
101
107
|
className: e,
|
|
@@ -103,22 +109,22 @@ const le = (r, t, e, d, s, f) => {
|
|
|
103
109
|
onClick: s,
|
|
104
110
|
onKeyDown: f,
|
|
105
111
|
onKeyUp: i,
|
|
106
|
-
onBlur:
|
|
107
|
-
onChange:
|
|
112
|
+
onBlur: F,
|
|
113
|
+
onChange: K,
|
|
108
114
|
style: O,
|
|
109
|
-
disabled:
|
|
110
|
-
id:
|
|
115
|
+
disabled: g,
|
|
116
|
+
id: A,
|
|
111
117
|
...a
|
|
112
|
-
} = r, C = k(null), o =
|
|
113
|
-
|
|
118
|
+
} = r, C = k(null), o = W([t, C]), M = k(), L = k(null), R = T(), [p, h] = D(!1), { selectedItems: w, setSelectedItems: x, controlled: N } = ae(), y = "item" in a ? g || a.item.disabled : g;
|
|
119
|
+
J(() => {
|
|
114
120
|
var l;
|
|
115
121
|
const b = (l = C.current) == null ? void 0 : l.querySelectorAll(
|
|
116
122
|
"button:not(:disabled):not([aria-disabled='true']), input:not(:disabled):not([aria-disabled='true']), [tabindex='0']:not(:disabled):not([aria-disabled='true'])"
|
|
117
123
|
);
|
|
118
|
-
b == null || b.forEach((V,
|
|
119
|
-
V.setAttribute("tabindex", "-1"), !V.hasAttribute("id") && V.setAttribute("id", `${
|
|
124
|
+
b == null || b.forEach((V, P) => {
|
|
125
|
+
V.setAttribute("tabindex", "-1"), !V.hasAttribute("id") && V.setAttribute("id", `${R}-${P}`);
|
|
120
126
|
});
|
|
121
|
-
}, [
|
|
127
|
+
}, [R]), J(() => {
|
|
122
128
|
if ("item" in a) {
|
|
123
129
|
const l = w.some((b) => b.label === a.item.label);
|
|
124
130
|
h(l);
|
|
@@ -128,28 +134,28 @@ const le = (r, t, e, d, s, f) => {
|
|
|
128
134
|
);
|
|
129
135
|
h(l);
|
|
130
136
|
}
|
|
131
|
-
}, [
|
|
137
|
+
}, [N, a, w]);
|
|
132
138
|
const j = (l) => {
|
|
133
|
-
|
|
134
|
-
},
|
|
135
|
-
|
|
139
|
+
K == null || K(l, { checked: p });
|
|
140
|
+
}, _ = () => {
|
|
141
|
+
N || E();
|
|
136
142
|
};
|
|
137
|
-
function
|
|
138
|
-
"item" in a ? w.some((l) => l.label === a.item.label) ? (
|
|
143
|
+
function E() {
|
|
144
|
+
"item" in a ? w.some((l) => l.label === a.item.label) ? (x(
|
|
139
145
|
(l) => l.filter(
|
|
140
146
|
(b) => (b == null ? void 0 : b.label) !== a.item.label
|
|
141
147
|
)
|
|
142
|
-
), h(!1)) : (
|
|
148
|
+
), h(!1)) : (x((l) => [...l, a.item]), h(!0)) : w.some((l) => l === a.label) ? (x(
|
|
143
149
|
(l) => l.filter((b) => b !== a.label)
|
|
144
|
-
), h(!1)) : (
|
|
150
|
+
), h(!1)) : (x((l) => [...l, a.label]), h(!0));
|
|
145
151
|
}
|
|
146
152
|
if ("item" in a) {
|
|
147
|
-
|
|
153
|
+
M.current = a.item;
|
|
148
154
|
const { item: l, ...b } = a;
|
|
149
|
-
return /* @__PURE__ */
|
|
155
|
+
return /* @__PURE__ */ m.jsxs(
|
|
150
156
|
"div",
|
|
151
157
|
{
|
|
152
|
-
className:
|
|
158
|
+
className: q([I["listview-option"]], e),
|
|
153
159
|
"data-anv": "ListViewOption",
|
|
154
160
|
style: O,
|
|
155
161
|
ref: o,
|
|
@@ -159,14 +165,14 @@ const le = (r, t, e, d, s, f) => {
|
|
|
159
165
|
role: "row",
|
|
160
166
|
...b,
|
|
161
167
|
children: [
|
|
162
|
-
/* @__PURE__ */
|
|
168
|
+
/* @__PURE__ */ m.jsx("div", { className: I.cell, ref: L, role: "gridcell", children: /* @__PURE__ */ m.jsx(
|
|
163
169
|
U,
|
|
164
170
|
{
|
|
165
171
|
disabled: y,
|
|
166
172
|
checked: p,
|
|
167
173
|
"aria-label": l.label,
|
|
168
174
|
onChange: j,
|
|
169
|
-
onClick:
|
|
175
|
+
onClick: _
|
|
170
176
|
}
|
|
171
177
|
) }),
|
|
172
178
|
d
|
|
@@ -174,10 +180,10 @@ const le = (r, t, e, d, s, f) => {
|
|
|
174
180
|
}
|
|
175
181
|
);
|
|
176
182
|
}
|
|
177
|
-
return /* @__PURE__ */
|
|
183
|
+
return /* @__PURE__ */ m.jsxs(
|
|
178
184
|
"div",
|
|
179
185
|
{
|
|
180
|
-
className:
|
|
186
|
+
className: q([I["listview-option"]], e),
|
|
181
187
|
"data-anv": "ListViewOption",
|
|
182
188
|
style: O,
|
|
183
189
|
ref: o,
|
|
@@ -187,14 +193,14 @@ const le = (r, t, e, d, s, f) => {
|
|
|
187
193
|
role: "row",
|
|
188
194
|
...a,
|
|
189
195
|
children: [
|
|
190
|
-
/* @__PURE__ */
|
|
196
|
+
/* @__PURE__ */ m.jsx("div", { className: I.cell, ref: L, role: "gridcell", children: /* @__PURE__ */ m.jsx(
|
|
191
197
|
U,
|
|
192
198
|
{
|
|
193
199
|
disabled: y,
|
|
194
200
|
checked: p,
|
|
195
201
|
"aria-label": "label" in r ? r.label : "Select",
|
|
196
202
|
onChange: j,
|
|
197
|
-
onClick:
|
|
203
|
+
onClick: _
|
|
198
204
|
}
|
|
199
205
|
) }),
|
|
200
206
|
d
|
|
@@ -203,30 +209,30 @@ const le = (r, t, e, d, s, f) => {
|
|
|
203
209
|
);
|
|
204
210
|
}
|
|
205
211
|
);
|
|
206
|
-
|
|
207
|
-
const
|
|
212
|
+
Y.displayName = "ListViewOption";
|
|
213
|
+
const Z = z((r, t) => {
|
|
208
214
|
const { ...e } = r;
|
|
209
|
-
return /* @__PURE__ */
|
|
215
|
+
return /* @__PURE__ */ m.jsx("div", { role: "gridcell", ...e, ref: t });
|
|
210
216
|
});
|
|
211
|
-
|
|
212
|
-
const
|
|
217
|
+
Z.displayName = "ListViewOptionCell";
|
|
218
|
+
const B = X(null), re = (r) => r.querySelectorAll(
|
|
213
219
|
"button:not(:disabled):not([aria-disabled='true']), input:not(:disabled):not([aria-disabled='true']), [tabindex='0']:not(:disabled):not([aria-disabled='true'])"
|
|
214
220
|
), H = function(r, t) {
|
|
215
221
|
const { layoutStyles: e, componentProps: d } = te(r), {
|
|
216
222
|
onSelectionChange: s,
|
|
217
223
|
className: f,
|
|
218
224
|
selected: i,
|
|
219
|
-
defaultSelected:
|
|
220
|
-
style:
|
|
225
|
+
defaultSelected: F,
|
|
226
|
+
style: K,
|
|
221
227
|
onKeyDown: O,
|
|
222
|
-
...
|
|
223
|
-
} = d,
|
|
224
|
-
i ??
|
|
225
|
-
), [w,
|
|
228
|
+
...g
|
|
229
|
+
} = d, A = k(null), a = k(!0), C = W([t, A]), [o, M] = D(), [L, R] = D(), [p, h] = D(
|
|
230
|
+
i ?? F ?? []
|
|
231
|
+
), [w, x] = D({
|
|
226
232
|
row: 0,
|
|
227
233
|
col: 0
|
|
228
|
-
}),
|
|
229
|
-
...
|
|
234
|
+
}), N = {
|
|
235
|
+
...K,
|
|
230
236
|
...e
|
|
231
237
|
}, y = (n) => {
|
|
232
238
|
a.current && o && o[w.row].focusables[w.col].setAttribute(
|
|
@@ -238,77 +244,77 @@ const z = X(null), ie = (r) => r.querySelectorAll(
|
|
|
238
244
|
o && ((n = o[w.row].focusables[w.col]) == null || n.removeAttribute(
|
|
239
245
|
"data-interactive"
|
|
240
246
|
));
|
|
241
|
-
},
|
|
242
|
-
O == null || O(n), o && (a.current = !0,
|
|
247
|
+
}, _ = (n) => {
|
|
248
|
+
O == null || O(n), o && (a.current = !0, oe(
|
|
243
249
|
n,
|
|
244
250
|
o,
|
|
245
251
|
w,
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
(u) =>
|
|
252
|
+
x,
|
|
253
|
+
A.current,
|
|
254
|
+
(u) => R(u)
|
|
249
255
|
));
|
|
250
|
-
},
|
|
256
|
+
}, E = (n) => {
|
|
251
257
|
var u;
|
|
252
|
-
if (a.current = !1, o &&
|
|
258
|
+
if (a.current = !1, o && A.current) {
|
|
253
259
|
(u = o[w.row].focusables[w.col]) == null || u.removeAttribute(
|
|
254
260
|
"data-interactive"
|
|
255
261
|
);
|
|
256
262
|
const c = n.target.closest(
|
|
257
263
|
"button:not(:disabled):not([aria-disabled='true']), input:not(:disabled):not([aria-disabled='true']), [data-anv='Checkbox']"
|
|
258
|
-
),
|
|
264
|
+
), v = n.target.closest(
|
|
259
265
|
'[data-anv="ListViewOption"]'
|
|
260
266
|
);
|
|
261
|
-
if (!
|
|
267
|
+
if (!v || v.ariaDisabled)
|
|
262
268
|
return;
|
|
263
|
-
const S = o.findIndex((Q) => Q.node ===
|
|
269
|
+
const S = o.findIndex((Q) => Q.node === v);
|
|
264
270
|
if (!c) {
|
|
265
271
|
o[S].focusables[0].click();
|
|
266
272
|
return;
|
|
267
273
|
}
|
|
268
|
-
const
|
|
274
|
+
const $ = Array.prototype.indexOf.call(
|
|
269
275
|
o[S].focusables,
|
|
270
276
|
(c == null ? void 0 : c.getAttribute("data-anv")) === "Checkbox" ? c.children[0] : c
|
|
271
277
|
);
|
|
272
|
-
|
|
278
|
+
x({ row: S, col: $ });
|
|
273
279
|
}
|
|
274
280
|
};
|
|
275
|
-
|
|
276
|
-
if (!
|
|
281
|
+
J(() => {
|
|
282
|
+
if (!A.current)
|
|
277
283
|
return;
|
|
278
|
-
const n =
|
|
284
|
+
const n = A.current.querySelectorAll(
|
|
279
285
|
"div[data-anv='ListViewOption']:not([aria-disabled='true'])"
|
|
280
286
|
), u = Array.from(n).map((c) => {
|
|
281
|
-
const
|
|
287
|
+
const v = re(c);
|
|
282
288
|
return {
|
|
283
289
|
node: c,
|
|
284
|
-
focusables:
|
|
290
|
+
focusables: v
|
|
285
291
|
};
|
|
286
292
|
});
|
|
287
|
-
|
|
293
|
+
M(u);
|
|
288
294
|
}, [r.children]);
|
|
289
295
|
const l = k();
|
|
290
|
-
|
|
296
|
+
J(() => {
|
|
291
297
|
if (!o)
|
|
292
298
|
return;
|
|
293
|
-
const n = o.map((c) => c.node.ariaLabel), u =
|
|
299
|
+
const n = o.map((c) => c.node.ariaLabel), u = G(p, n, "label");
|
|
294
300
|
JSON.stringify(l.current) !== JSON.stringify(u) && (s == null || s(u), l.current = u);
|
|
295
|
-
}, [s, o, p]),
|
|
301
|
+
}, [s, o, p]), J(() => {
|
|
296
302
|
if (!i)
|
|
297
303
|
return;
|
|
298
304
|
const n = i.reduce(
|
|
299
|
-
(
|
|
305
|
+
(v, S) => v.find(($) => $.label === S.label) ? v : v.concat([S]),
|
|
300
306
|
[]
|
|
301
307
|
);
|
|
302
308
|
if (!o)
|
|
303
309
|
return;
|
|
304
|
-
const u = o.map((
|
|
310
|
+
const u = o.map((v) => v.node.ariaLabel), c = G(n, u, "label");
|
|
305
311
|
JSON.stringify(l.current) !== JSON.stringify(c) && (s == null || s(c), h(c), l.current = c);
|
|
306
312
|
}, [s, o, i]);
|
|
307
|
-
const b =
|
|
308
|
-
if ("items" in
|
|
309
|
-
const { children: n, items: u, ...c } =
|
|
310
|
-
return /* @__PURE__ */
|
|
311
|
-
|
|
313
|
+
const b = q([I.listview], f);
|
|
314
|
+
if ("items" in g) {
|
|
315
|
+
const { children: n, items: u, ...c } = g;
|
|
316
|
+
return /* @__PURE__ */ m.jsx(
|
|
317
|
+
B.Provider,
|
|
312
318
|
{
|
|
313
319
|
value: {
|
|
314
320
|
options: o,
|
|
@@ -318,33 +324,33 @@ const z = X(null), ie = (r) => r.querySelectorAll(
|
|
|
318
324
|
items: u,
|
|
319
325
|
controlled: !!i
|
|
320
326
|
},
|
|
321
|
-
children: /* @__PURE__ */
|
|
327
|
+
children: /* @__PURE__ */ m.jsx(
|
|
322
328
|
"div",
|
|
323
329
|
{
|
|
324
330
|
ref: C,
|
|
325
331
|
className: b,
|
|
326
|
-
style:
|
|
332
|
+
style: N,
|
|
327
333
|
"data-anv": "ListView",
|
|
328
334
|
role: "grid",
|
|
329
335
|
"aria-multiselectable": "true",
|
|
330
336
|
onFocus: y,
|
|
331
337
|
onBlur: j,
|
|
332
|
-
onKeyDown:
|
|
333
|
-
onMouseDown:
|
|
334
|
-
"aria-activedescendant":
|
|
338
|
+
onKeyDown: _,
|
|
339
|
+
onMouseDown: E,
|
|
340
|
+
"aria-activedescendant": L,
|
|
335
341
|
tabIndex: 0,
|
|
336
342
|
...c,
|
|
337
343
|
children: n == null ? void 0 : n({
|
|
338
|
-
items: u.map((
|
|
344
|
+
items: u.map((v) => v)
|
|
339
345
|
})
|
|
340
346
|
}
|
|
341
347
|
)
|
|
342
348
|
}
|
|
343
349
|
);
|
|
344
350
|
}
|
|
345
|
-
const { children: V,
|
|
346
|
-
return /* @__PURE__ */
|
|
347
|
-
|
|
351
|
+
const { children: V, ...P } = g;
|
|
352
|
+
return /* @__PURE__ */ m.jsx(
|
|
353
|
+
B.Provider,
|
|
348
354
|
{
|
|
349
355
|
value: {
|
|
350
356
|
options: o,
|
|
@@ -353,44 +359,45 @@ const z = X(null), ie = (r) => r.querySelectorAll(
|
|
|
353
359
|
setSelectedItems: h,
|
|
354
360
|
controlled: !!i
|
|
355
361
|
},
|
|
356
|
-
children: /* @__PURE__ */
|
|
362
|
+
children: /* @__PURE__ */ m.jsx(
|
|
357
363
|
"div",
|
|
358
364
|
{
|
|
359
365
|
ref: C,
|
|
360
366
|
className: b,
|
|
361
|
-
style:
|
|
367
|
+
style: N,
|
|
362
368
|
"data-anv": "ListView",
|
|
363
369
|
role: "grid",
|
|
364
370
|
onFocus: y,
|
|
365
371
|
onBlur: j,
|
|
366
|
-
onKeyDown:
|
|
367
|
-
onMouseDown:
|
|
368
|
-
"aria-activedescendant":
|
|
372
|
+
onKeyDown: _,
|
|
373
|
+
onMouseDown: E,
|
|
374
|
+
"aria-activedescendant": L,
|
|
369
375
|
tabIndex: 0,
|
|
370
|
-
|
|
376
|
+
...P,
|
|
371
377
|
children: V
|
|
372
378
|
}
|
|
373
379
|
)
|
|
374
380
|
}
|
|
375
381
|
);
|
|
376
382
|
};
|
|
377
|
-
function
|
|
378
|
-
const r = ee(
|
|
383
|
+
function ae() {
|
|
384
|
+
const r = ee(B);
|
|
379
385
|
if (r == null)
|
|
380
386
|
throw new Error("useListView must be wrapped in <ListView />");
|
|
381
387
|
return r;
|
|
382
388
|
}
|
|
383
389
|
H.displayName = "ListView";
|
|
384
|
-
const
|
|
385
|
-
|
|
390
|
+
const me = Object.assign(
|
|
391
|
+
z(H),
|
|
386
392
|
{
|
|
387
|
-
Option:
|
|
388
|
-
OptionCell:
|
|
393
|
+
Option: Y,
|
|
394
|
+
OptionCell: Z
|
|
389
395
|
}
|
|
390
396
|
);
|
|
391
397
|
export {
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
398
|
+
me as A,
|
|
399
|
+
Y,
|
|
400
|
+
Z,
|
|
401
|
+
I as t
|
|
395
402
|
};
|
|
396
|
-
//# sourceMappingURL=ListView-
|
|
403
|
+
//# sourceMappingURL=ListView-dac3c924.js.map
|