@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/Combobox-8f603bb1.js
DELETED
|
@@ -1,3411 +0,0 @@
|
|
|
1
|
-
import "./Combobox.css";
|
|
2
|
-
import { f as j } from "./jsx-runtime-944c88e2-e73fa629.js";
|
|
3
|
-
import Ue, { useRef as ie, useCallback as X, useEffect as ue, useMemo as Qe, cloneElement as Jn, Component as Qn, useLayoutEffect as sn, useReducer as Zn, createContext as er, useState as le, useId as Kt, useContext as tr } from "react";
|
|
4
|
-
import { a as T, _ as fe } from "./extends-c44c2a9d.js";
|
|
5
|
-
import { P as g, _ as nr } from "./index-8f87ccce.js";
|
|
6
|
-
import { G as Pe } from "./index-c6e22bb9.js";
|
|
7
|
-
import { g as rr } from "./_commonjsHelpers-c5d32002.js";
|
|
8
|
-
import { j as or } from "./Flex-8986d95b.js";
|
|
9
|
-
import { z as nt, w as ir } from "./Popover-825e44a8.js";
|
|
10
|
-
import { u as sr } from "./Label-71d61154.js";
|
|
11
|
-
import { C as jt } from "./Button-6c5781ad.js";
|
|
12
|
-
import { $ as $t } from "./Chip-f0c9f7a2.js";
|
|
13
|
-
import { I as ur } from "./Icon-fe240903.js";
|
|
14
|
-
import { r as lr } from "./Checkbox-34dd779e.js";
|
|
15
|
-
import { E as ar } from "./Text-ba9bbdb2.js";
|
|
16
|
-
import { a as cr } from "./close-064c8acc-7e0b4df7.js";
|
|
17
|
-
import { a as dr } from "./chevron_right-5b0931b5-ac35ad56.js";
|
|
18
|
-
import { a as pr } from "./check-5f087ea0-b5474547.js";
|
|
19
|
-
import { v as fr } from "./Helper-74a1f07f-13255568.js";
|
|
20
|
-
/* empty css */import { a as un } from "./Listbox.module-98274ee1-1a954c60.js";
|
|
21
|
-
import { t as Ze } from "./ListView.module-3868990a-7ce1f78e.js";
|
|
22
|
-
import { J as ln } from "./useLayoutPropsUtil-e307abc7-053ab281.js";
|
|
23
|
-
function Ft(t) {
|
|
24
|
-
if (t === void 0)
|
|
25
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
26
|
-
return t;
|
|
27
|
-
}
|
|
28
|
-
var et = { exports: {} }, U = {};
|
|
29
|
-
/**
|
|
30
|
-
* @license React
|
|
31
|
-
* react-is.production.min.js
|
|
32
|
-
*
|
|
33
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
34
|
-
*
|
|
35
|
-
* This source code is licensed under the MIT license found in the
|
|
36
|
-
* LICENSE file in the root directory of this source tree.
|
|
37
|
-
*/
|
|
38
|
-
var Lt;
|
|
39
|
-
function gr() {
|
|
40
|
-
if (Lt)
|
|
41
|
-
return U;
|
|
42
|
-
Lt = 1;
|
|
43
|
-
var t = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), e = Symbol.for("react.provider"), s = Symbol.for("react.context"), u = Symbol.for("react.server_context"), c = Symbol.for("react.forward_ref"), a = Symbol.for("react.suspense"), l = Symbol.for("react.suspense_list"), m = Symbol.for("react.memo"), O = Symbol.for("react.lazy"), x = Symbol.for("react.offscreen"), E;
|
|
44
|
-
E = Symbol.for("react.module.reference");
|
|
45
|
-
function R(h) {
|
|
46
|
-
if (typeof h == "object" && h !== null) {
|
|
47
|
-
var $ = h.$$typeof;
|
|
48
|
-
switch ($) {
|
|
49
|
-
case t:
|
|
50
|
-
switch (h = h.type, h) {
|
|
51
|
-
case r:
|
|
52
|
-
case o:
|
|
53
|
-
case i:
|
|
54
|
-
case a:
|
|
55
|
-
case l:
|
|
56
|
-
return h;
|
|
57
|
-
default:
|
|
58
|
-
switch (h = h && h.$$typeof, h) {
|
|
59
|
-
case u:
|
|
60
|
-
case s:
|
|
61
|
-
case c:
|
|
62
|
-
case O:
|
|
63
|
-
case m:
|
|
64
|
-
case e:
|
|
65
|
-
return h;
|
|
66
|
-
default:
|
|
67
|
-
return $;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
case n:
|
|
71
|
-
return $;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
return U.ContextConsumer = s, U.ContextProvider = e, U.Element = t, U.ForwardRef = c, U.Fragment = r, U.Lazy = O, U.Memo = m, U.Portal = n, U.Profiler = o, U.StrictMode = i, U.Suspense = a, U.SuspenseList = l, U.isAsyncMode = function() {
|
|
76
|
-
return !1;
|
|
77
|
-
}, U.isConcurrentMode = function() {
|
|
78
|
-
return !1;
|
|
79
|
-
}, U.isContextConsumer = function(h) {
|
|
80
|
-
return R(h) === s;
|
|
81
|
-
}, U.isContextProvider = function(h) {
|
|
82
|
-
return R(h) === e;
|
|
83
|
-
}, U.isElement = function(h) {
|
|
84
|
-
return typeof h == "object" && h !== null && h.$$typeof === t;
|
|
85
|
-
}, U.isForwardRef = function(h) {
|
|
86
|
-
return R(h) === c;
|
|
87
|
-
}, U.isFragment = function(h) {
|
|
88
|
-
return R(h) === r;
|
|
89
|
-
}, U.isLazy = function(h) {
|
|
90
|
-
return R(h) === O;
|
|
91
|
-
}, U.isMemo = function(h) {
|
|
92
|
-
return R(h) === m;
|
|
93
|
-
}, U.isPortal = function(h) {
|
|
94
|
-
return R(h) === n;
|
|
95
|
-
}, U.isProfiler = function(h) {
|
|
96
|
-
return R(h) === o;
|
|
97
|
-
}, U.isStrictMode = function(h) {
|
|
98
|
-
return R(h) === i;
|
|
99
|
-
}, U.isSuspense = function(h) {
|
|
100
|
-
return R(h) === a;
|
|
101
|
-
}, U.isSuspenseList = function(h) {
|
|
102
|
-
return R(h) === l;
|
|
103
|
-
}, U.isValidElementType = function(h) {
|
|
104
|
-
return typeof h == "string" || typeof h == "function" || h === r || h === o || h === i || h === a || h === l || h === x || typeof h == "object" && h !== null && (h.$$typeof === O || h.$$typeof === m || h.$$typeof === e || h.$$typeof === s || h.$$typeof === c || h.$$typeof === E || h.getModuleId !== void 0);
|
|
105
|
-
}, U.typeOf = R, U;
|
|
106
|
-
}
|
|
107
|
-
var W = {};
|
|
108
|
-
/**
|
|
109
|
-
* @license React
|
|
110
|
-
* react-is.development.js
|
|
111
|
-
*
|
|
112
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
113
|
-
*
|
|
114
|
-
* This source code is licensed under the MIT license found in the
|
|
115
|
-
* LICENSE file in the root directory of this source tree.
|
|
116
|
-
*/
|
|
117
|
-
var Bt;
|
|
118
|
-
function hr() {
|
|
119
|
-
return Bt || (Bt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
120
|
-
var t = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), e = Symbol.for("react.provider"), s = Symbol.for("react.context"), u = Symbol.for("react.server_context"), c = Symbol.for("react.forward_ref"), a = Symbol.for("react.suspense"), l = Symbol.for("react.suspense_list"), m = Symbol.for("react.memo"), O = Symbol.for("react.lazy"), x = Symbol.for("react.offscreen"), E = !1, R = !1, h = !1, $ = !1, d = !1, f;
|
|
121
|
-
f = Symbol.for("react.module.reference");
|
|
122
|
-
function p(I) {
|
|
123
|
-
return !!(typeof I == "string" || typeof I == "function" || I === r || I === o || d || I === i || I === a || I === l || $ || I === x || E || R || h || typeof I == "object" && I !== null && (I.$$typeof === O || I.$$typeof === m || I.$$typeof === e || I.$$typeof === s || I.$$typeof === c || // This needs to include all possible module reference object
|
|
124
|
-
// types supported by any Flight configuration anywhere since
|
|
125
|
-
// we don't know which Flight build this will end up being used
|
|
126
|
-
// with.
|
|
127
|
-
I.$$typeof === f || I.getModuleId !== void 0));
|
|
128
|
-
}
|
|
129
|
-
function _(I) {
|
|
130
|
-
if (typeof I == "object" && I !== null) {
|
|
131
|
-
var ce = I.$$typeof;
|
|
132
|
-
switch (ce) {
|
|
133
|
-
case t:
|
|
134
|
-
var Z = I.type;
|
|
135
|
-
switch (Z) {
|
|
136
|
-
case r:
|
|
137
|
-
case o:
|
|
138
|
-
case i:
|
|
139
|
-
case a:
|
|
140
|
-
case l:
|
|
141
|
-
return Z;
|
|
142
|
-
default:
|
|
143
|
-
var xe = Z && Z.$$typeof;
|
|
144
|
-
switch (xe) {
|
|
145
|
-
case u:
|
|
146
|
-
case s:
|
|
147
|
-
case c:
|
|
148
|
-
case O:
|
|
149
|
-
case m:
|
|
150
|
-
case e:
|
|
151
|
-
return xe;
|
|
152
|
-
default:
|
|
153
|
-
return ce;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
case n:
|
|
157
|
-
return ce;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
var y = s, V = e, b = t, A = c, P = r, w = O, S = m, k = n, H = o, q = i, Y = a, K = l, ee = !1, re = !1;
|
|
162
|
-
function N(I) {
|
|
163
|
-
return ee || (ee = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")), !1;
|
|
164
|
-
}
|
|
165
|
-
function z(I) {
|
|
166
|
-
return re || (re = !0, console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")), !1;
|
|
167
|
-
}
|
|
168
|
-
function G(I) {
|
|
169
|
-
return _(I) === s;
|
|
170
|
-
}
|
|
171
|
-
function se(I) {
|
|
172
|
-
return _(I) === e;
|
|
173
|
-
}
|
|
174
|
-
function D(I) {
|
|
175
|
-
return typeof I == "object" && I !== null && I.$$typeof === t;
|
|
176
|
-
}
|
|
177
|
-
function C(I) {
|
|
178
|
-
return _(I) === c;
|
|
179
|
-
}
|
|
180
|
-
function v(I) {
|
|
181
|
-
return _(I) === r;
|
|
182
|
-
}
|
|
183
|
-
function M(I) {
|
|
184
|
-
return _(I) === O;
|
|
185
|
-
}
|
|
186
|
-
function L(I) {
|
|
187
|
-
return _(I) === m;
|
|
188
|
-
}
|
|
189
|
-
function B(I) {
|
|
190
|
-
return _(I) === n;
|
|
191
|
-
}
|
|
192
|
-
function F(I) {
|
|
193
|
-
return _(I) === o;
|
|
194
|
-
}
|
|
195
|
-
function te(I) {
|
|
196
|
-
return _(I) === i;
|
|
197
|
-
}
|
|
198
|
-
function ne(I) {
|
|
199
|
-
return _(I) === a;
|
|
200
|
-
}
|
|
201
|
-
function oe(I) {
|
|
202
|
-
return _(I) === l;
|
|
203
|
-
}
|
|
204
|
-
W.ContextConsumer = y, W.ContextProvider = V, W.Element = b, W.ForwardRef = A, W.Fragment = P, W.Lazy = w, W.Memo = S, W.Portal = k, W.Profiler = H, W.StrictMode = q, W.Suspense = Y, W.SuspenseList = K, W.isAsyncMode = N, W.isConcurrentMode = z, W.isContextConsumer = G, W.isContextProvider = se, W.isElement = D, W.isForwardRef = C, W.isFragment = v, W.isLazy = M, W.isMemo = L, W.isPortal = B, W.isProfiler = F, W.isStrictMode = te, W.isSuspense = ne, W.isSuspenseList = oe, W.isValidElementType = p, W.typeOf = _;
|
|
205
|
-
}()), W;
|
|
206
|
-
}
|
|
207
|
-
process.env.NODE_ENV === "production" ? et.exports = gr() : et.exports = hr();
|
|
208
|
-
var Ut = et.exports;
|
|
209
|
-
const Wt = (t) => typeof t == "object" && t != null && t.nodeType === 1, qt = (t, n) => (!n || t !== "hidden") && t !== "visible" && t !== "clip", Je = (t, n) => {
|
|
210
|
-
if (t.clientHeight < t.scrollHeight || t.clientWidth < t.scrollWidth) {
|
|
211
|
-
const r = getComputedStyle(t, null);
|
|
212
|
-
return qt(r.overflowY, n) || qt(r.overflowX, n) || ((i) => {
|
|
213
|
-
const o = ((e) => {
|
|
214
|
-
if (!e.ownerDocument || !e.ownerDocument.defaultView)
|
|
215
|
-
return null;
|
|
216
|
-
try {
|
|
217
|
-
return e.ownerDocument.defaultView.frameElement;
|
|
218
|
-
} catch {
|
|
219
|
-
return null;
|
|
220
|
-
}
|
|
221
|
-
})(i);
|
|
222
|
-
return !!o && (o.clientHeight < i.scrollHeight || o.clientWidth < i.scrollWidth);
|
|
223
|
-
})(t);
|
|
224
|
-
}
|
|
225
|
-
return !1;
|
|
226
|
-
}, $e = (t, n, r, i, o, e, s, u) => e < t && s > n || e > t && s < n ? 0 : e <= t && u <= r || s >= n && u >= r ? e - t - i : s > n && u < r || e < t && u > r ? s - n + o : 0, mr = (t) => {
|
|
227
|
-
const n = t.parentElement;
|
|
228
|
-
return n ?? (t.getRootNode().host || null);
|
|
229
|
-
}, vr = (t, n) => {
|
|
230
|
-
var r, i, o, e;
|
|
231
|
-
if (typeof document > "u")
|
|
232
|
-
return [];
|
|
233
|
-
const { scrollMode: s, block: u, inline: c, boundary: a, skipOverflowHiddenElements: l } = n, m = typeof a == "function" ? a : (Y) => Y !== a;
|
|
234
|
-
if (!Wt(t))
|
|
235
|
-
throw new TypeError("Invalid target");
|
|
236
|
-
const O = document.scrollingElement || document.documentElement, x = [];
|
|
237
|
-
let E = t;
|
|
238
|
-
for (; Wt(E) && m(E); ) {
|
|
239
|
-
if (E = mr(E), E === O) {
|
|
240
|
-
x.push(E);
|
|
241
|
-
break;
|
|
242
|
-
}
|
|
243
|
-
E != null && E === document.body && Je(E) && !Je(document.documentElement) || E != null && Je(E, l) && x.push(E);
|
|
244
|
-
}
|
|
245
|
-
const R = (i = (r = window.visualViewport) == null ? void 0 : r.width) != null ? i : innerWidth, h = (e = (o = window.visualViewport) == null ? void 0 : o.height) != null ? e : innerHeight, { scrollX: $, scrollY: d } = window, { height: f, width: p, top: _, right: y, bottom: V, left: b } = t.getBoundingClientRect(), { top: A, right: P, bottom: w, left: S } = ((Y) => {
|
|
246
|
-
const K = window.getComputedStyle(Y);
|
|
247
|
-
return { top: parseFloat(K.scrollMarginTop) || 0, right: parseFloat(K.scrollMarginRight) || 0, bottom: parseFloat(K.scrollMarginBottom) || 0, left: parseFloat(K.scrollMarginLeft) || 0 };
|
|
248
|
-
})(t);
|
|
249
|
-
let k = u === "start" || u === "nearest" ? _ - A : u === "end" ? V + w : _ + f / 2 - A + w, H = c === "center" ? b + p / 2 - S + P : c === "end" ? y + P : b - S;
|
|
250
|
-
const q = [];
|
|
251
|
-
for (let Y = 0; Y < x.length; Y++) {
|
|
252
|
-
const K = x[Y], { height: ee, width: re, top: N, right: z, bottom: G, left: se } = K.getBoundingClientRect();
|
|
253
|
-
if (s === "if-needed" && _ >= 0 && b >= 0 && V <= h && y <= R && _ >= N && V <= G && b >= se && y <= z)
|
|
254
|
-
return q;
|
|
255
|
-
const D = getComputedStyle(K), C = parseInt(D.borderLeftWidth, 10), v = parseInt(D.borderTopWidth, 10), M = parseInt(D.borderRightWidth, 10), L = parseInt(D.borderBottomWidth, 10);
|
|
256
|
-
let B = 0, F = 0;
|
|
257
|
-
const te = "offsetWidth" in K ? K.offsetWidth - K.clientWidth - C - M : 0, ne = "offsetHeight" in K ? K.offsetHeight - K.clientHeight - v - L : 0, oe = "offsetWidth" in K ? K.offsetWidth === 0 ? 0 : re / K.offsetWidth : 0, I = "offsetHeight" in K ? K.offsetHeight === 0 ? 0 : ee / K.offsetHeight : 0;
|
|
258
|
-
if (O === K)
|
|
259
|
-
B = u === "start" ? k : u === "end" ? k - h : u === "nearest" ? $e(d, d + h, h, v, L, d + k, d + k + f, f) : k - h / 2, F = c === "start" ? H : c === "center" ? H - R / 2 : c === "end" ? H - R : $e($, $ + R, R, C, M, $ + H, $ + H + p, p), B = Math.max(0, B + d), F = Math.max(0, F + $);
|
|
260
|
-
else {
|
|
261
|
-
B = u === "start" ? k - N - v : u === "end" ? k - G + L + ne : u === "nearest" ? $e(N, G, ee, v, L + ne, k, k + f, f) : k - (N + ee / 2) + ne / 2, F = c === "start" ? H - se - C : c === "center" ? H - (se + re / 2) + te / 2 : c === "end" ? H - z + M + te : $e(se, z, re, C, M + te, H, H + p, p);
|
|
262
|
-
const { scrollLeft: ce, scrollTop: Z } = K;
|
|
263
|
-
B = I === 0 ? 0 : Math.max(0, Math.min(Z + B / I, K.scrollHeight - ee / I + ne)), F = oe === 0 ? 0 : Math.max(0, Math.min(ce + F / oe, K.scrollWidth - re / oe + te)), k += Z - B, H += ce - F;
|
|
264
|
-
}
|
|
265
|
-
q.push({ el: K, top: B, left: F });
|
|
266
|
-
}
|
|
267
|
-
return q;
|
|
268
|
-
};
|
|
269
|
-
var De = function() {
|
|
270
|
-
return De = Object.assign || function(n) {
|
|
271
|
-
for (var r, i = 1, o = arguments.length; i < o; i++) {
|
|
272
|
-
r = arguments[i];
|
|
273
|
-
for (var e in r)
|
|
274
|
-
Object.prototype.hasOwnProperty.call(r, e) && (n[e] = r[e]);
|
|
275
|
-
}
|
|
276
|
-
return n;
|
|
277
|
-
}, De.apply(this, arguments);
|
|
278
|
-
};
|
|
279
|
-
var Ir = 0;
|
|
280
|
-
function Yt(t) {
|
|
281
|
-
return typeof t == "function" ? t : pe;
|
|
282
|
-
}
|
|
283
|
-
function pe() {
|
|
284
|
-
}
|
|
285
|
-
function an(t, n) {
|
|
286
|
-
if (t) {
|
|
287
|
-
var r = vr(t, {
|
|
288
|
-
boundary: n,
|
|
289
|
-
block: "nearest",
|
|
290
|
-
scrollMode: "if-needed"
|
|
291
|
-
});
|
|
292
|
-
r.forEach(function(i) {
|
|
293
|
-
var o = i.el, e = i.top, s = i.left;
|
|
294
|
-
o.scrollTop = e, o.scrollLeft = s;
|
|
295
|
-
});
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
function zt(t, n, r) {
|
|
299
|
-
var i = t === n || n instanceof r.Node && t.contains && t.contains(n);
|
|
300
|
-
return i;
|
|
301
|
-
}
|
|
302
|
-
function rt(t, n) {
|
|
303
|
-
var r;
|
|
304
|
-
function i() {
|
|
305
|
-
r && clearTimeout(r);
|
|
306
|
-
}
|
|
307
|
-
function o() {
|
|
308
|
-
for (var e = arguments.length, s = new Array(e), u = 0; u < e; u++)
|
|
309
|
-
s[u] = arguments[u];
|
|
310
|
-
i(), r = setTimeout(function() {
|
|
311
|
-
r = null, t.apply(void 0, s);
|
|
312
|
-
}, n);
|
|
313
|
-
}
|
|
314
|
-
return o.cancel = i, o;
|
|
315
|
-
}
|
|
316
|
-
function Q() {
|
|
317
|
-
for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++)
|
|
318
|
-
n[r] = arguments[r];
|
|
319
|
-
return function(i) {
|
|
320
|
-
for (var o = arguments.length, e = new Array(o > 1 ? o - 1 : 0), s = 1; s < o; s++)
|
|
321
|
-
e[s - 1] = arguments[s];
|
|
322
|
-
return n.some(function(u) {
|
|
323
|
-
return u && u.apply(void 0, [i].concat(e)), i.preventDownshiftDefault || i.hasOwnProperty("nativeEvent") && i.nativeEvent.preventDownshiftDefault;
|
|
324
|
-
});
|
|
325
|
-
};
|
|
326
|
-
}
|
|
327
|
-
function Ee() {
|
|
328
|
-
for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++)
|
|
329
|
-
n[r] = arguments[r];
|
|
330
|
-
return function(i) {
|
|
331
|
-
n.forEach(function(o) {
|
|
332
|
-
typeof o == "function" ? o(i) : o && (o.current = i);
|
|
333
|
-
});
|
|
334
|
-
};
|
|
335
|
-
}
|
|
336
|
-
function cn() {
|
|
337
|
-
return String(Ir++);
|
|
338
|
-
}
|
|
339
|
-
function dn(t) {
|
|
340
|
-
var n = t.isOpen, r = t.resultCount, i = t.previousResultCount;
|
|
341
|
-
return n ? r ? r !== i ? r + " result" + (r === 1 ? " is" : "s are") + " available, use up and down arrow keys to navigate. Press Enter key to select." : "" : "No results are available." : "";
|
|
342
|
-
}
|
|
343
|
-
function Gt(t, n) {
|
|
344
|
-
return t = Array.isArray(t) ? (
|
|
345
|
-
/* istanbul ignore next (preact) */
|
|
346
|
-
t[0]
|
|
347
|
-
) : t, !t && n ? n : t;
|
|
348
|
-
}
|
|
349
|
-
function pn(t) {
|
|
350
|
-
return typeof t.type == "string";
|
|
351
|
-
}
|
|
352
|
-
function fn(t) {
|
|
353
|
-
return t.props;
|
|
354
|
-
}
|
|
355
|
-
function _r(t, n) {
|
|
356
|
-
console.error('The property "' + n + '" is required in "' + t + '"');
|
|
357
|
-
}
|
|
358
|
-
var yr = ["highlightedIndex", "inputValue", "isOpen", "selectedItem", "type"];
|
|
359
|
-
function Fe(t) {
|
|
360
|
-
t === void 0 && (t = {});
|
|
361
|
-
var n = {};
|
|
362
|
-
return yr.forEach(function(r) {
|
|
363
|
-
t.hasOwnProperty(r) && (n[r] = t[r]);
|
|
364
|
-
}), n;
|
|
365
|
-
}
|
|
366
|
-
function Ve(t, n) {
|
|
367
|
-
return !t || !n ? t : Object.keys(t).reduce(function(r, i) {
|
|
368
|
-
return r[i] = We(n, i) ? n[i] : t[i], r;
|
|
369
|
-
}, {});
|
|
370
|
-
}
|
|
371
|
-
function We(t, n) {
|
|
372
|
-
return t[n] !== void 0;
|
|
373
|
-
}
|
|
374
|
-
function ke(t) {
|
|
375
|
-
var n = t.key, r = t.keyCode;
|
|
376
|
-
return r >= 37 && r <= 40 && n.indexOf("Arrow") !== 0 ? "Arrow" + n : n;
|
|
377
|
-
}
|
|
378
|
-
function Er(t) {
|
|
379
|
-
return Object.prototype.toString.call(t) === "[object Object]";
|
|
380
|
-
}
|
|
381
|
-
function be(t, n, r, i, o) {
|
|
382
|
-
o === void 0 && (o = !1);
|
|
383
|
-
var e = r.length;
|
|
384
|
-
if (e === 0)
|
|
385
|
-
return -1;
|
|
386
|
-
var s = e - 1;
|
|
387
|
-
(typeof t != "number" || t < 0 || t > s) && (t = n > 0 ? -1 : s + 1);
|
|
388
|
-
var u = t + n;
|
|
389
|
-
u < 0 ? u = o ? s : 0 : u > s && (u = o ? 0 : s);
|
|
390
|
-
var c = Se(u, n < 0, r, i, o);
|
|
391
|
-
return c === -1 ? t >= e ? -1 : t : c;
|
|
392
|
-
}
|
|
393
|
-
function Se(t, n, r, i, o) {
|
|
394
|
-
o === void 0 && (o = !1);
|
|
395
|
-
var e = r.length;
|
|
396
|
-
if (n) {
|
|
397
|
-
for (var s = t; s >= 0; s--)
|
|
398
|
-
if (!i(r[s], s))
|
|
399
|
-
return s;
|
|
400
|
-
} else
|
|
401
|
-
for (var u = t; u < e; u++)
|
|
402
|
-
if (!i(r[u], u))
|
|
403
|
-
return u;
|
|
404
|
-
return o ? Se(n ? e - 1 : 0, n, r, i) : -1;
|
|
405
|
-
}
|
|
406
|
-
function qe(t, n, r, i) {
|
|
407
|
-
return i === void 0 && (i = !0), r && n.some(function(o) {
|
|
408
|
-
return o && (zt(o, t, r) || i && zt(o, r.document.activeElement, r));
|
|
409
|
-
});
|
|
410
|
-
}
|
|
411
|
-
var ot = pe;
|
|
412
|
-
process.env.NODE_ENV !== "production" && (ot = function(n, r, i) {
|
|
413
|
-
var o = "This prop should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled Downshift element for the lifetime of the component. More info: https://github.com/downshift-js/downshift#control-props";
|
|
414
|
-
Object.keys(n).forEach(function(e) {
|
|
415
|
-
r[e] !== void 0 && i[e] === void 0 ? console.error('downshift: A component has changed the controlled prop "' + e + '" to be uncontrolled. ' + o) : r[e] === void 0 && i[e] !== void 0 && console.error('downshift: A component has changed the uncontrolled prop "' + e + '" to be controlled. ' + o);
|
|
416
|
-
});
|
|
417
|
-
});
|
|
418
|
-
var wr = rt(function(t) {
|
|
419
|
-
gn(t).textContent = "";
|
|
420
|
-
}, 500);
|
|
421
|
-
function gn(t) {
|
|
422
|
-
var n = t.getElementById("a11y-status-message");
|
|
423
|
-
return n || (n = t.createElement("div"), n.setAttribute("id", "a11y-status-message"), n.setAttribute("role", "status"), n.setAttribute("aria-live", "polite"), n.setAttribute("aria-relevant", "additions text"), Object.assign(n.style, {
|
|
424
|
-
border: "0",
|
|
425
|
-
clip: "rect(0 0 0 0)",
|
|
426
|
-
height: "1px",
|
|
427
|
-
margin: "-1px",
|
|
428
|
-
overflow: "hidden",
|
|
429
|
-
padding: "0",
|
|
430
|
-
position: "absolute",
|
|
431
|
-
width: "1px"
|
|
432
|
-
}), t.body.appendChild(n), n);
|
|
433
|
-
}
|
|
434
|
-
function it(t, n) {
|
|
435
|
-
if (!(!t || !n)) {
|
|
436
|
-
var r = gn(n);
|
|
437
|
-
r.textContent = t, wr(n);
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
var hn = process.env.NODE_ENV !== "production" ? "__autocomplete_unknown__" : 0, mn = process.env.NODE_ENV !== "production" ? "__autocomplete_mouseup__" : 1, vn = process.env.NODE_ENV !== "production" ? "__autocomplete_item_mouseenter__" : 2, Le = process.env.NODE_ENV !== "production" ? "__autocomplete_keydown_arrow_up__" : 3, Be = process.env.NODE_ENV !== "production" ? "__autocomplete_keydown_arrow_down__" : 4, In = process.env.NODE_ENV !== "production" ? "__autocomplete_keydown_escape__" : 5, _n = process.env.NODE_ENV !== "production" ? "__autocomplete_keydown_enter__" : 6, yn = process.env.NODE_ENV !== "production" ? "__autocomplete_keydown_home__" : 7, En = process.env.NODE_ENV !== "production" ? "__autocomplete_keydown_end__" : 8, wn = process.env.NODE_ENV !== "production" ? "__autocomplete_click_item__" : 9, bn = process.env.NODE_ENV !== "production" ? "__autocomplete_blur_input__" : 10, xn = process.env.NODE_ENV !== "production" ? "__autocomplete_change_input__" : 11, On = process.env.NODE_ENV !== "production" ? "__autocomplete_keydown_space_button__" : 12, tt = process.env.NODE_ENV !== "production" ? "__autocomplete_click_button__" : 13, Cn = process.env.NODE_ENV !== "production" ? "__autocomplete_blur_button__" : 14, Dn = process.env.NODE_ENV !== "production" ? "__autocomplete_controlled_prop_updated_selected_item__" : 15, Sn = process.env.NODE_ENV !== "production" ? "__autocomplete_touchend__" : 16, br = /* @__PURE__ */ Object.freeze({
|
|
441
|
-
__proto__: null,
|
|
442
|
-
unknown: hn,
|
|
443
|
-
mouseUp: mn,
|
|
444
|
-
itemMouseEnter: vn,
|
|
445
|
-
keyDownArrowUp: Le,
|
|
446
|
-
keyDownArrowDown: Be,
|
|
447
|
-
keyDownEscape: In,
|
|
448
|
-
keyDownEnter: _n,
|
|
449
|
-
keyDownHome: yn,
|
|
450
|
-
keyDownEnd: En,
|
|
451
|
-
clickItem: wn,
|
|
452
|
-
blurInput: bn,
|
|
453
|
-
changeInput: xn,
|
|
454
|
-
keyDownSpaceButton: On,
|
|
455
|
-
clickButton: tt,
|
|
456
|
-
blurButton: Cn,
|
|
457
|
-
controlledPropUpdatedSelectedItem: Dn,
|
|
458
|
-
touchEnd: Sn
|
|
459
|
-
}), xr = ["refKey", "ref"], Or = ["onClick", "onPress", "onKeyDown", "onKeyUp", "onBlur"], Cr = ["onKeyDown", "onBlur", "onChange", "onInput", "onChangeText"], Dr = ["refKey", "ref"], Sr = ["onMouseMove", "onMouseDown", "onClick", "onPress", "index", "item"], Nr = /* @__PURE__ */ function() {
|
|
460
|
-
var t = /* @__PURE__ */ function(n) {
|
|
461
|
-
nr(r, n);
|
|
462
|
-
function r(o) {
|
|
463
|
-
var e;
|
|
464
|
-
e = n.call(this, o) || this, e.id = e.props.id || "downshift-" + cn(), e.menuId = e.props.menuId || e.id + "-menu", e.labelId = e.props.labelId || e.id + "-label", e.inputId = e.props.inputId || e.id + "-input", e.getItemId = e.props.getItemId || function(d) {
|
|
465
|
-
return e.id + "-item-" + d;
|
|
466
|
-
}, e.items = [], e.itemCount = null, e.previousResultCount = 0, e.timeoutIds = [], e.internalSetTimeout = function(d, f) {
|
|
467
|
-
var p = setTimeout(function() {
|
|
468
|
-
e.timeoutIds = e.timeoutIds.filter(function(_) {
|
|
469
|
-
return _ !== p;
|
|
470
|
-
}), d();
|
|
471
|
-
}, f);
|
|
472
|
-
e.timeoutIds.push(p);
|
|
473
|
-
}, e.setItemCount = function(d) {
|
|
474
|
-
e.itemCount = d;
|
|
475
|
-
}, e.unsetItemCount = function() {
|
|
476
|
-
e.itemCount = null;
|
|
477
|
-
}, e.isItemDisabled = function(d, f) {
|
|
478
|
-
var p = e.getItemNodeFromIndex(f);
|
|
479
|
-
return p && p.hasAttribute("disabled");
|
|
480
|
-
}, e.setHighlightedIndex = function(d, f) {
|
|
481
|
-
d === void 0 && (d = e.props.defaultHighlightedIndex), f === void 0 && (f = {}), f = Fe(f), e.internalSetState(T({
|
|
482
|
-
highlightedIndex: d
|
|
483
|
-
}, f));
|
|
484
|
-
}, e.clearSelection = function(d) {
|
|
485
|
-
e.internalSetState({
|
|
486
|
-
selectedItem: null,
|
|
487
|
-
inputValue: "",
|
|
488
|
-
highlightedIndex: e.props.defaultHighlightedIndex,
|
|
489
|
-
isOpen: e.props.defaultIsOpen
|
|
490
|
-
}, d);
|
|
491
|
-
}, e.selectItem = function(d, f, p) {
|
|
492
|
-
f = Fe(f), e.internalSetState(T({
|
|
493
|
-
isOpen: e.props.defaultIsOpen,
|
|
494
|
-
highlightedIndex: e.props.defaultHighlightedIndex,
|
|
495
|
-
selectedItem: d,
|
|
496
|
-
inputValue: e.props.itemToString(d)
|
|
497
|
-
}, f), p);
|
|
498
|
-
}, e.selectItemAtIndex = function(d, f, p) {
|
|
499
|
-
var _ = e.items[d];
|
|
500
|
-
_ != null && e.selectItem(_, f, p);
|
|
501
|
-
}, e.selectHighlightedItem = function(d, f) {
|
|
502
|
-
return e.selectItemAtIndex(e.getState().highlightedIndex, d, f);
|
|
503
|
-
}, e.internalSetState = function(d, f) {
|
|
504
|
-
var p, _, y = {}, V = typeof d == "function";
|
|
505
|
-
return !V && d.hasOwnProperty("inputValue") && e.props.onInputValueChange(d.inputValue, T({}, e.getStateAndHelpers(), d)), e.setState(function(b) {
|
|
506
|
-
var A;
|
|
507
|
-
b = e.getState(b);
|
|
508
|
-
var P = V ? d(b) : d;
|
|
509
|
-
P = e.props.stateReducer(b, P), p = P.hasOwnProperty("selectedItem");
|
|
510
|
-
var w = {};
|
|
511
|
-
return p && P.selectedItem !== b.selectedItem && (_ = P.selectedItem), (A = P).type || (A.type = hn), Object.keys(P).forEach(function(S) {
|
|
512
|
-
b[S] !== P[S] && (y[S] = P[S]), S !== "type" && (P[S], We(e.props, S) || (w[S] = P[S]));
|
|
513
|
-
}), V && P.hasOwnProperty("inputValue") && e.props.onInputValueChange(P.inputValue, T({}, e.getStateAndHelpers(), P)), w;
|
|
514
|
-
}, function() {
|
|
515
|
-
Yt(f)();
|
|
516
|
-
var b = Object.keys(y).length > 1;
|
|
517
|
-
b && e.props.onStateChange(y, e.getStateAndHelpers()), p && e.props.onSelect(d.selectedItem, e.getStateAndHelpers()), _ !== void 0 && e.props.onChange(_, e.getStateAndHelpers()), e.props.onUserAction(y, e.getStateAndHelpers());
|
|
518
|
-
});
|
|
519
|
-
}, e.rootRef = function(d) {
|
|
520
|
-
return e._rootNode = d;
|
|
521
|
-
}, e.getRootProps = function(d, f) {
|
|
522
|
-
var p, _ = d === void 0 ? {} : d, y = _.refKey, V = y === void 0 ? "ref" : y, b = _.ref, A = fe(_, xr), P = f === void 0 ? {} : f, w = P.suppressRefError, S = w === void 0 ? !1 : w;
|
|
523
|
-
e.getRootProps.called = !0, e.getRootProps.refKey = V, e.getRootProps.suppressRefError = S;
|
|
524
|
-
var k = e.getState(), H = k.isOpen;
|
|
525
|
-
return T((p = {}, p[V] = Ee(b, e.rootRef), p.role = "combobox", p["aria-expanded"] = H, p["aria-haspopup"] = "listbox", p["aria-owns"] = H ? e.menuId : void 0, p["aria-labelledby"] = e.labelId, p), A);
|
|
526
|
-
}, e.keyDownHandlers = {
|
|
527
|
-
ArrowDown: function(f) {
|
|
528
|
-
var p = this;
|
|
529
|
-
if (f.preventDefault(), this.getState().isOpen) {
|
|
530
|
-
var _ = f.shiftKey ? 5 : 1;
|
|
531
|
-
this.moveHighlightedIndex(_, {
|
|
532
|
-
type: Be
|
|
533
|
-
});
|
|
534
|
-
} else
|
|
535
|
-
this.internalSetState({
|
|
536
|
-
isOpen: !0,
|
|
537
|
-
type: Be
|
|
538
|
-
}, function() {
|
|
539
|
-
var y = p.getItemCount();
|
|
540
|
-
if (y > 0) {
|
|
541
|
-
var V = p.getState(), b = V.highlightedIndex, A = be(b, 1, {
|
|
542
|
-
length: y
|
|
543
|
-
}, p.isItemDisabled, !0);
|
|
544
|
-
p.setHighlightedIndex(A, {
|
|
545
|
-
type: Be
|
|
546
|
-
});
|
|
547
|
-
}
|
|
548
|
-
});
|
|
549
|
-
},
|
|
550
|
-
ArrowUp: function(f) {
|
|
551
|
-
var p = this;
|
|
552
|
-
if (f.preventDefault(), this.getState().isOpen) {
|
|
553
|
-
var _ = f.shiftKey ? -5 : -1;
|
|
554
|
-
this.moveHighlightedIndex(_, {
|
|
555
|
-
type: Le
|
|
556
|
-
});
|
|
557
|
-
} else
|
|
558
|
-
this.internalSetState({
|
|
559
|
-
isOpen: !0,
|
|
560
|
-
type: Le
|
|
561
|
-
}, function() {
|
|
562
|
-
var y = p.getItemCount();
|
|
563
|
-
if (y > 0) {
|
|
564
|
-
var V = p.getState(), b = V.highlightedIndex, A = be(b, -1, {
|
|
565
|
-
length: y
|
|
566
|
-
}, p.isItemDisabled, !0);
|
|
567
|
-
p.setHighlightedIndex(A, {
|
|
568
|
-
type: Le
|
|
569
|
-
});
|
|
570
|
-
}
|
|
571
|
-
});
|
|
572
|
-
},
|
|
573
|
-
Enter: function(f) {
|
|
574
|
-
if (f.which !== 229) {
|
|
575
|
-
var p = this.getState(), _ = p.isOpen, y = p.highlightedIndex;
|
|
576
|
-
if (_ && y != null) {
|
|
577
|
-
f.preventDefault();
|
|
578
|
-
var V = this.items[y], b = this.getItemNodeFromIndex(y);
|
|
579
|
-
if (V == null || b && b.hasAttribute("disabled"))
|
|
580
|
-
return;
|
|
581
|
-
this.selectHighlightedItem({
|
|
582
|
-
type: _n
|
|
583
|
-
});
|
|
584
|
-
}
|
|
585
|
-
}
|
|
586
|
-
},
|
|
587
|
-
Escape: function(f) {
|
|
588
|
-
f.preventDefault(), this.reset(T({
|
|
589
|
-
type: In
|
|
590
|
-
}, !this.state.isOpen && {
|
|
591
|
-
selectedItem: null,
|
|
592
|
-
inputValue: ""
|
|
593
|
-
}));
|
|
594
|
-
}
|
|
595
|
-
}, e.buttonKeyDownHandlers = T({}, e.keyDownHandlers, {
|
|
596
|
-
" ": function(f) {
|
|
597
|
-
f.preventDefault(), this.toggleMenu({
|
|
598
|
-
type: On
|
|
599
|
-
});
|
|
600
|
-
}
|
|
601
|
-
}), e.inputKeyDownHandlers = T({}, e.keyDownHandlers, {
|
|
602
|
-
Home: function(f) {
|
|
603
|
-
var p = this.getState(), _ = p.isOpen;
|
|
604
|
-
if (_) {
|
|
605
|
-
f.preventDefault();
|
|
606
|
-
var y = this.getItemCount();
|
|
607
|
-
if (!(y <= 0 || !_)) {
|
|
608
|
-
var V = Se(0, !1, {
|
|
609
|
-
length: y
|
|
610
|
-
}, this.isItemDisabled);
|
|
611
|
-
this.setHighlightedIndex(V, {
|
|
612
|
-
type: yn
|
|
613
|
-
});
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
},
|
|
617
|
-
End: function(f) {
|
|
618
|
-
var p = this.getState(), _ = p.isOpen;
|
|
619
|
-
if (_) {
|
|
620
|
-
f.preventDefault();
|
|
621
|
-
var y = this.getItemCount();
|
|
622
|
-
if (!(y <= 0 || !_)) {
|
|
623
|
-
var V = Se(y - 1, !0, {
|
|
624
|
-
length: y
|
|
625
|
-
}, this.isItemDisabled);
|
|
626
|
-
this.setHighlightedIndex(V, {
|
|
627
|
-
type: En
|
|
628
|
-
});
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
|
-
}
|
|
632
|
-
}), e.getToggleButtonProps = function(d) {
|
|
633
|
-
var f = d === void 0 ? {} : d, p = f.onClick;
|
|
634
|
-
f.onPress;
|
|
635
|
-
var _ = f.onKeyDown, y = f.onKeyUp, V = f.onBlur, b = fe(f, Or), A = e.getState(), P = A.isOpen, w = {
|
|
636
|
-
onClick: Q(p, e.buttonHandleClick),
|
|
637
|
-
onKeyDown: Q(_, e.buttonHandleKeyDown),
|
|
638
|
-
onKeyUp: Q(y, e.buttonHandleKeyUp),
|
|
639
|
-
onBlur: Q(V, e.buttonHandleBlur)
|
|
640
|
-
}, S = b.disabled ? {} : w;
|
|
641
|
-
return T({
|
|
642
|
-
type: "button",
|
|
643
|
-
role: "button",
|
|
644
|
-
"aria-label": P ? "close menu" : "open menu",
|
|
645
|
-
"aria-haspopup": !0,
|
|
646
|
-
"data-toggle": !0
|
|
647
|
-
}, S, b);
|
|
648
|
-
}, e.buttonHandleKeyUp = function(d) {
|
|
649
|
-
d.preventDefault();
|
|
650
|
-
}, e.buttonHandleKeyDown = function(d) {
|
|
651
|
-
var f = ke(d);
|
|
652
|
-
e.buttonKeyDownHandlers[f] && e.buttonKeyDownHandlers[f].call(Ft(e), d);
|
|
653
|
-
}, e.buttonHandleClick = function(d) {
|
|
654
|
-
if (d.preventDefault(), e.props.environment) {
|
|
655
|
-
var f = e.props.environment.document, p = f.body, _ = f.activeElement;
|
|
656
|
-
p && p === _ && d.target.focus();
|
|
657
|
-
}
|
|
658
|
-
process.env.NODE_ENV === "test" ? e.toggleMenu({
|
|
659
|
-
type: tt
|
|
660
|
-
}) : e.internalSetTimeout(function() {
|
|
661
|
-
return e.toggleMenu({
|
|
662
|
-
type: tt
|
|
663
|
-
});
|
|
664
|
-
});
|
|
665
|
-
}, e.buttonHandleBlur = function(d) {
|
|
666
|
-
var f = d.target;
|
|
667
|
-
e.internalSetTimeout(function() {
|
|
668
|
-
if (!(e.isMouseDown || !e.props.environment)) {
|
|
669
|
-
var p = e.props.environment.document.activeElement;
|
|
670
|
-
(p == null || p.id !== e.inputId) && p !== f && e.reset({
|
|
671
|
-
type: Cn
|
|
672
|
-
});
|
|
673
|
-
}
|
|
674
|
-
});
|
|
675
|
-
}, e.getLabelProps = function(d) {
|
|
676
|
-
return T({
|
|
677
|
-
htmlFor: e.inputId,
|
|
678
|
-
id: e.labelId
|
|
679
|
-
}, d);
|
|
680
|
-
}, e.getInputProps = function(d) {
|
|
681
|
-
var f = d === void 0 ? {} : d, p = f.onKeyDown, _ = f.onBlur, y = f.onChange, V = f.onInput;
|
|
682
|
-
f.onChangeText;
|
|
683
|
-
var b = fe(f, Cr), A, P = {};
|
|
684
|
-
A = "onChange";
|
|
685
|
-
var w = e.getState(), S = w.inputValue, k = w.isOpen, H = w.highlightedIndex;
|
|
686
|
-
if (!b.disabled) {
|
|
687
|
-
var q;
|
|
688
|
-
P = (q = {}, q[A] = Q(y, V, e.inputHandleChange), q.onKeyDown = Q(p, e.inputHandleKeyDown), q.onBlur = Q(_, e.inputHandleBlur), q);
|
|
689
|
-
}
|
|
690
|
-
return T({
|
|
691
|
-
"aria-autocomplete": "list",
|
|
692
|
-
"aria-activedescendant": k && typeof H == "number" && H >= 0 ? e.getItemId(H) : void 0,
|
|
693
|
-
"aria-controls": k ? e.menuId : void 0,
|
|
694
|
-
"aria-labelledby": b && b["aria-label"] ? void 0 : e.labelId,
|
|
695
|
-
// https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion
|
|
696
|
-
// revert back since autocomplete="nope" is ignored on latest Chrome and Opera
|
|
697
|
-
autoComplete: "off",
|
|
698
|
-
value: S,
|
|
699
|
-
id: e.inputId
|
|
700
|
-
}, P, b);
|
|
701
|
-
}, e.inputHandleKeyDown = function(d) {
|
|
702
|
-
var f = ke(d);
|
|
703
|
-
f && e.inputKeyDownHandlers[f] && e.inputKeyDownHandlers[f].call(Ft(e), d);
|
|
704
|
-
}, e.inputHandleChange = function(d) {
|
|
705
|
-
e.internalSetState({
|
|
706
|
-
type: xn,
|
|
707
|
-
isOpen: !0,
|
|
708
|
-
inputValue: d.target.value,
|
|
709
|
-
highlightedIndex: e.props.defaultHighlightedIndex
|
|
710
|
-
});
|
|
711
|
-
}, e.inputHandleBlur = function() {
|
|
712
|
-
e.internalSetTimeout(function() {
|
|
713
|
-
var d;
|
|
714
|
-
if (!(e.isMouseDown || !e.props.environment)) {
|
|
715
|
-
var f = e.props.environment.document.activeElement, p = (f == null || (d = f.dataset) == null ? void 0 : d.toggle) && e._rootNode && e._rootNode.contains(f);
|
|
716
|
-
p || e.reset({
|
|
717
|
-
type: bn
|
|
718
|
-
});
|
|
719
|
-
}
|
|
720
|
-
});
|
|
721
|
-
}, e.menuRef = function(d) {
|
|
722
|
-
e._menuNode = d;
|
|
723
|
-
}, e.getMenuProps = function(d, f) {
|
|
724
|
-
var p, _ = d === void 0 ? {} : d, y = _.refKey, V = y === void 0 ? "ref" : y, b = _.ref, A = fe(_, Dr), P = f === void 0 ? {} : f, w = P.suppressRefError, S = w === void 0 ? !1 : w;
|
|
725
|
-
return e.getMenuProps.called = !0, e.getMenuProps.refKey = V, e.getMenuProps.suppressRefError = S, T((p = {}, p[V] = Ee(b, e.menuRef), p.role = "listbox", p["aria-labelledby"] = A && A["aria-label"] ? void 0 : e.labelId, p.id = e.menuId, p), A);
|
|
726
|
-
}, e.getItemProps = function(d) {
|
|
727
|
-
var f, p = d === void 0 ? {} : d, _ = p.onMouseMove, y = p.onMouseDown, V = p.onClick;
|
|
728
|
-
p.onPress;
|
|
729
|
-
var b = p.index, A = p.item, P = A === void 0 ? process.env.NODE_ENV === "production" ? (
|
|
730
|
-
/* istanbul ignore next */
|
|
731
|
-
void 0
|
|
732
|
-
) : _r("getItemProps", "item") : A, w = fe(p, Sr);
|
|
733
|
-
b === void 0 ? (e.items.push(P), b = e.items.indexOf(P)) : e.items[b] = P;
|
|
734
|
-
var S = "onClick", k = V, H = (f = {
|
|
735
|
-
// onMouseMove is used over onMouseEnter here. onMouseMove
|
|
736
|
-
// is only triggered on actual mouse movement while onMouseEnter
|
|
737
|
-
// can fire on DOM changes, interrupting keyboard navigation
|
|
738
|
-
onMouseMove: Q(_, function() {
|
|
739
|
-
b !== e.getState().highlightedIndex && (e.setHighlightedIndex(b, {
|
|
740
|
-
type: vn
|
|
741
|
-
}), e.avoidScrolling = !0, e.internalSetTimeout(function() {
|
|
742
|
-
return e.avoidScrolling = !1;
|
|
743
|
-
}, 250));
|
|
744
|
-
}),
|
|
745
|
-
onMouseDown: Q(y, function(Y) {
|
|
746
|
-
Y.preventDefault();
|
|
747
|
-
})
|
|
748
|
-
}, f[S] = Q(k, function() {
|
|
749
|
-
e.selectItemAtIndex(b, {
|
|
750
|
-
type: wn
|
|
751
|
-
});
|
|
752
|
-
}), f), q = w.disabled ? {
|
|
753
|
-
onMouseDown: H.onMouseDown
|
|
754
|
-
} : H;
|
|
755
|
-
return T({
|
|
756
|
-
id: e.getItemId(b),
|
|
757
|
-
role: "option",
|
|
758
|
-
"aria-selected": e.getState().highlightedIndex === b
|
|
759
|
-
}, q, w);
|
|
760
|
-
}, e.clearItems = function() {
|
|
761
|
-
e.items = [];
|
|
762
|
-
}, e.reset = function(d, f) {
|
|
763
|
-
d === void 0 && (d = {}), d = Fe(d), e.internalSetState(function(p) {
|
|
764
|
-
var _ = p.selectedItem;
|
|
765
|
-
return T({
|
|
766
|
-
isOpen: e.props.defaultIsOpen,
|
|
767
|
-
highlightedIndex: e.props.defaultHighlightedIndex,
|
|
768
|
-
inputValue: e.props.itemToString(_)
|
|
769
|
-
}, d);
|
|
770
|
-
}, f);
|
|
771
|
-
}, e.toggleMenu = function(d, f) {
|
|
772
|
-
d === void 0 && (d = {}), d = Fe(d), e.internalSetState(function(p) {
|
|
773
|
-
var _ = p.isOpen;
|
|
774
|
-
return T({
|
|
775
|
-
isOpen: !_
|
|
776
|
-
}, _ && {
|
|
777
|
-
highlightedIndex: e.props.defaultHighlightedIndex
|
|
778
|
-
}, d);
|
|
779
|
-
}, function() {
|
|
780
|
-
var p = e.getState(), _ = p.isOpen, y = p.highlightedIndex;
|
|
781
|
-
_ && e.getItemCount() > 0 && typeof y == "number" && e.setHighlightedIndex(y, d), Yt(f)();
|
|
782
|
-
});
|
|
783
|
-
}, e.openMenu = function(d) {
|
|
784
|
-
e.internalSetState({
|
|
785
|
-
isOpen: !0
|
|
786
|
-
}, d);
|
|
787
|
-
}, e.closeMenu = function(d) {
|
|
788
|
-
e.internalSetState({
|
|
789
|
-
isOpen: !1
|
|
790
|
-
}, d);
|
|
791
|
-
}, e.updateStatus = rt(function() {
|
|
792
|
-
var d;
|
|
793
|
-
if ((d = e.props) != null && (d = d.environment) != null && d.document) {
|
|
794
|
-
var f = e.getState(), p = e.items[f.highlightedIndex], _ = e.getItemCount(), y = e.props.getA11yStatusMessage(T({
|
|
795
|
-
itemToString: e.props.itemToString,
|
|
796
|
-
previousResultCount: e.previousResultCount,
|
|
797
|
-
resultCount: _,
|
|
798
|
-
highlightedItem: p
|
|
799
|
-
}, f));
|
|
800
|
-
e.previousResultCount = _, it(y, e.props.environment.document);
|
|
801
|
-
}
|
|
802
|
-
}, 200);
|
|
803
|
-
var s = e.props, u = s.defaultHighlightedIndex, c = s.initialHighlightedIndex, a = c === void 0 ? u : c, l = s.defaultIsOpen, m = s.initialIsOpen, O = m === void 0 ? l : m, x = s.initialInputValue, E = x === void 0 ? "" : x, R = s.initialSelectedItem, h = R === void 0 ? null : R, $ = e.getState({
|
|
804
|
-
highlightedIndex: a,
|
|
805
|
-
isOpen: O,
|
|
806
|
-
inputValue: E,
|
|
807
|
-
selectedItem: h
|
|
808
|
-
});
|
|
809
|
-
return $.selectedItem != null && e.props.initialInputValue === void 0 && ($.inputValue = e.props.itemToString($.selectedItem)), e.state = $, e;
|
|
810
|
-
}
|
|
811
|
-
var i = r.prototype;
|
|
812
|
-
return i.internalClearTimeouts = function() {
|
|
813
|
-
this.timeoutIds.forEach(function(e) {
|
|
814
|
-
clearTimeout(e);
|
|
815
|
-
}), this.timeoutIds = [];
|
|
816
|
-
}, i.getState = function(e) {
|
|
817
|
-
return e === void 0 && (e = this.state), Ve(e, this.props);
|
|
818
|
-
}, i.getItemCount = function() {
|
|
819
|
-
var e = this.items.length;
|
|
820
|
-
return this.itemCount != null ? e = this.itemCount : this.props.itemCount !== void 0 && (e = this.props.itemCount), e;
|
|
821
|
-
}, i.getItemNodeFromIndex = function(e) {
|
|
822
|
-
return this.props.environment ? this.props.environment.document.getElementById(this.getItemId(e)) : null;
|
|
823
|
-
}, i.scrollHighlightedItemIntoView = function() {
|
|
824
|
-
{
|
|
825
|
-
var e = this.getItemNodeFromIndex(this.getState().highlightedIndex);
|
|
826
|
-
this.props.scrollIntoView(e, this._menuNode);
|
|
827
|
-
}
|
|
828
|
-
}, i.moveHighlightedIndex = function(e, s) {
|
|
829
|
-
var u = this.getItemCount(), c = this.getState(), a = c.highlightedIndex;
|
|
830
|
-
if (u > 0) {
|
|
831
|
-
var l = be(a, e, {
|
|
832
|
-
length: u
|
|
833
|
-
}, this.isItemDisabled, !0);
|
|
834
|
-
this.setHighlightedIndex(l, s);
|
|
835
|
-
}
|
|
836
|
-
}, i.getStateAndHelpers = function() {
|
|
837
|
-
var e = this.getState(), s = e.highlightedIndex, u = e.inputValue, c = e.selectedItem, a = e.isOpen, l = this.props.itemToString, m = this.id, O = this.getRootProps, x = this.getToggleButtonProps, E = this.getLabelProps, R = this.getMenuProps, h = this.getInputProps, $ = this.getItemProps, d = this.openMenu, f = this.closeMenu, p = this.toggleMenu, _ = this.selectItem, y = this.selectItemAtIndex, V = this.selectHighlightedItem, b = this.setHighlightedIndex, A = this.clearSelection, P = this.clearItems, w = this.reset, S = this.setItemCount, k = this.unsetItemCount, H = this.internalSetState;
|
|
838
|
-
return {
|
|
839
|
-
// prop getters
|
|
840
|
-
getRootProps: O,
|
|
841
|
-
getToggleButtonProps: x,
|
|
842
|
-
getLabelProps: E,
|
|
843
|
-
getMenuProps: R,
|
|
844
|
-
getInputProps: h,
|
|
845
|
-
getItemProps: $,
|
|
846
|
-
// actions
|
|
847
|
-
reset: w,
|
|
848
|
-
openMenu: d,
|
|
849
|
-
closeMenu: f,
|
|
850
|
-
toggleMenu: p,
|
|
851
|
-
selectItem: _,
|
|
852
|
-
selectItemAtIndex: y,
|
|
853
|
-
selectHighlightedItem: V,
|
|
854
|
-
setHighlightedIndex: b,
|
|
855
|
-
clearSelection: A,
|
|
856
|
-
clearItems: P,
|
|
857
|
-
setItemCount: S,
|
|
858
|
-
unsetItemCount: k,
|
|
859
|
-
setState: H,
|
|
860
|
-
// props
|
|
861
|
-
itemToString: l,
|
|
862
|
-
// derived
|
|
863
|
-
id: m,
|
|
864
|
-
// state
|
|
865
|
-
highlightedIndex: s,
|
|
866
|
-
inputValue: u,
|
|
867
|
-
isOpen: a,
|
|
868
|
-
selectedItem: c
|
|
869
|
-
};
|
|
870
|
-
}, i.componentDidMount = function() {
|
|
871
|
-
var e = this;
|
|
872
|
-
if (process.env.NODE_ENV !== "production" && this.getMenuProps.called && !this.getMenuProps.suppressRefError && Xt(this._menuNode, this.getMenuProps), !this.props.environment)
|
|
873
|
-
this.cleanup = function() {
|
|
874
|
-
e.internalClearTimeouts();
|
|
875
|
-
};
|
|
876
|
-
else {
|
|
877
|
-
var s = function() {
|
|
878
|
-
e.isMouseDown = !0;
|
|
879
|
-
}, u = function(x) {
|
|
880
|
-
e.isMouseDown = !1;
|
|
881
|
-
var E = qe(x.target, [e._rootNode, e._menuNode], e.props.environment);
|
|
882
|
-
!E && e.getState().isOpen && e.reset({
|
|
883
|
-
type: mn
|
|
884
|
-
}, function() {
|
|
885
|
-
return e.props.onOuterClick(e.getStateAndHelpers());
|
|
886
|
-
});
|
|
887
|
-
}, c = function() {
|
|
888
|
-
e.isTouchMove = !1;
|
|
889
|
-
}, a = function() {
|
|
890
|
-
e.isTouchMove = !0;
|
|
891
|
-
}, l = function(x) {
|
|
892
|
-
var E = qe(x.target, [e._rootNode, e._menuNode], e.props.environment, !1);
|
|
893
|
-
!e.isTouchMove && !E && e.getState().isOpen && e.reset({
|
|
894
|
-
type: Sn
|
|
895
|
-
}, function() {
|
|
896
|
-
return e.props.onOuterClick(e.getStateAndHelpers());
|
|
897
|
-
});
|
|
898
|
-
}, m = this.props.environment;
|
|
899
|
-
m.addEventListener("mousedown", s), m.addEventListener("mouseup", u), m.addEventListener("touchstart", c), m.addEventListener("touchmove", a), m.addEventListener("touchend", l), this.cleanup = function() {
|
|
900
|
-
e.internalClearTimeouts(), e.updateStatus.cancel(), m.removeEventListener("mousedown", s), m.removeEventListener("mouseup", u), m.removeEventListener("touchstart", c), m.removeEventListener("touchmove", a), m.removeEventListener("touchend", l);
|
|
901
|
-
};
|
|
902
|
-
}
|
|
903
|
-
}, i.shouldScroll = function(e, s) {
|
|
904
|
-
var u = this.props.highlightedIndex === void 0 ? this.getState() : this.props, c = u.highlightedIndex, a = s.highlightedIndex === void 0 ? e : s, l = a.highlightedIndex, m = c && this.getState().isOpen && !e.isOpen, O = c !== l;
|
|
905
|
-
return m || O;
|
|
906
|
-
}, i.componentDidUpdate = function(e, s) {
|
|
907
|
-
process.env.NODE_ENV !== "production" && (ot(this.state, e, this.props), this.getMenuProps.called && !this.getMenuProps.suppressRefError && Xt(this._menuNode, this.getMenuProps)), We(this.props, "selectedItem") && this.props.selectedItemChanged(e.selectedItem, this.props.selectedItem) && this.internalSetState({
|
|
908
|
-
type: Dn,
|
|
909
|
-
inputValue: this.props.itemToString(this.props.selectedItem)
|
|
910
|
-
}), !this.avoidScrolling && this.shouldScroll(s, e) && this.scrollHighlightedItemIntoView(), this.updateStatus();
|
|
911
|
-
}, i.componentWillUnmount = function() {
|
|
912
|
-
this.cleanup();
|
|
913
|
-
}, i.render = function() {
|
|
914
|
-
var e = Gt(this.props.children, pe);
|
|
915
|
-
this.clearItems(), this.getRootProps.called = !1, this.getRootProps.refKey = void 0, this.getRootProps.suppressRefError = void 0, this.getMenuProps.called = !1, this.getMenuProps.refKey = void 0, this.getMenuProps.suppressRefError = void 0, this.getLabelProps.called = !1, this.getInputProps.called = !1;
|
|
916
|
-
var s = Gt(e(this.getStateAndHelpers()));
|
|
917
|
-
if (!s)
|
|
918
|
-
return null;
|
|
919
|
-
if (this.getRootProps.called || this.props.suppressRefError)
|
|
920
|
-
return process.env.NODE_ENV !== "production" && !this.getRootProps.suppressRefError && !this.props.suppressRefError && Rr(s, this.getRootProps), s;
|
|
921
|
-
if (pn(s))
|
|
922
|
-
return /* @__PURE__ */ Jn(s, this.getRootProps(fn(s)));
|
|
923
|
-
if (process.env.NODE_ENV !== "production")
|
|
924
|
-
throw new Error("downshift: If you return a non-DOM element, you must apply the getRootProps function");
|
|
925
|
-
}, r;
|
|
926
|
-
}(Qn);
|
|
927
|
-
return t.defaultProps = {
|
|
928
|
-
defaultHighlightedIndex: null,
|
|
929
|
-
defaultIsOpen: !1,
|
|
930
|
-
getA11yStatusMessage: dn,
|
|
931
|
-
itemToString: function(r) {
|
|
932
|
-
return r == null ? "" : (process.env.NODE_ENV !== "production" && Er(r) && !r.hasOwnProperty("toString") && console.warn("downshift: An object was passed to the default implementation of `itemToString`. You should probably provide your own `itemToString` implementation. Please refer to the `itemToString` API documentation.", "The object that was passed:", r), String(r));
|
|
933
|
-
},
|
|
934
|
-
onStateChange: pe,
|
|
935
|
-
onInputValueChange: pe,
|
|
936
|
-
onUserAction: pe,
|
|
937
|
-
onChange: pe,
|
|
938
|
-
onSelect: pe,
|
|
939
|
-
onOuterClick: pe,
|
|
940
|
-
selectedItemChanged: function(r, i) {
|
|
941
|
-
return r !== i;
|
|
942
|
-
},
|
|
943
|
-
environment: (
|
|
944
|
-
/* istanbul ignore next (ssr) */
|
|
945
|
-
typeof window > "u" ? void 0 : window
|
|
946
|
-
),
|
|
947
|
-
stateReducer: function(r, i) {
|
|
948
|
-
return i;
|
|
949
|
-
},
|
|
950
|
-
suppressRefError: !1,
|
|
951
|
-
scrollIntoView: an
|
|
952
|
-
}, t.stateChangeTypes = br, t;
|
|
953
|
-
}();
|
|
954
|
-
process.env.NODE_ENV !== "production" && (Nr.propTypes = {
|
|
955
|
-
children: g.func,
|
|
956
|
-
defaultHighlightedIndex: g.number,
|
|
957
|
-
defaultIsOpen: g.bool,
|
|
958
|
-
initialHighlightedIndex: g.number,
|
|
959
|
-
initialSelectedItem: g.any,
|
|
960
|
-
initialInputValue: g.string,
|
|
961
|
-
initialIsOpen: g.bool,
|
|
962
|
-
getA11yStatusMessage: g.func,
|
|
963
|
-
itemToString: g.func,
|
|
964
|
-
onChange: g.func,
|
|
965
|
-
onSelect: g.func,
|
|
966
|
-
onStateChange: g.func,
|
|
967
|
-
onInputValueChange: g.func,
|
|
968
|
-
onUserAction: g.func,
|
|
969
|
-
onOuterClick: g.func,
|
|
970
|
-
selectedItemChanged: g.func,
|
|
971
|
-
stateReducer: g.func,
|
|
972
|
-
itemCount: g.number,
|
|
973
|
-
id: g.string,
|
|
974
|
-
environment: g.shape({
|
|
975
|
-
addEventListener: g.func.isRequired,
|
|
976
|
-
removeEventListener: g.func.isRequired,
|
|
977
|
-
document: g.shape({
|
|
978
|
-
createElement: g.func.isRequired,
|
|
979
|
-
getElementById: g.func.isRequired,
|
|
980
|
-
activeElement: g.any.isRequired,
|
|
981
|
-
body: g.any.isRequired
|
|
982
|
-
}).isRequired,
|
|
983
|
-
Node: g.func.isRequired
|
|
984
|
-
}),
|
|
985
|
-
suppressRefError: g.bool,
|
|
986
|
-
scrollIntoView: g.func,
|
|
987
|
-
// things we keep in state for uncontrolled components
|
|
988
|
-
// but can accept as props for controlled components
|
|
989
|
-
/* eslint-disable react/no-unused-prop-types */
|
|
990
|
-
selectedItem: g.any,
|
|
991
|
-
isOpen: g.bool,
|
|
992
|
-
inputValue: g.string,
|
|
993
|
-
highlightedIndex: g.number,
|
|
994
|
-
labelId: g.string,
|
|
995
|
-
inputId: g.string,
|
|
996
|
-
menuId: g.string,
|
|
997
|
-
getItemId: g.func
|
|
998
|
-
/* eslint-enable react/no-unused-prop-types */
|
|
999
|
-
});
|
|
1000
|
-
function Xt(t, n) {
|
|
1001
|
-
var r = n.refKey;
|
|
1002
|
-
t || console.error('downshift: The ref prop "' + r + '" from getMenuProps was not applied correctly on your menu element.');
|
|
1003
|
-
}
|
|
1004
|
-
function Rr(t, n) {
|
|
1005
|
-
var r = n.refKey, i = r !== "ref", o = !pn(t);
|
|
1006
|
-
o && !i && !Ut.isForwardRef(t) ? console.error("downshift: You returned a non-DOM element. You must specify a refKey in getRootProps") : !o && i && console.error('downshift: You returned a DOM element. You should not specify a refKey in getRootProps. You specified "' + r + '"'), !Ut.isForwardRef(t) && !fn(t)[r] && console.error('downshift: You must apply the ref prop "' + r + '" from getRootProps onto your root element.');
|
|
1007
|
-
}
|
|
1008
|
-
var Mr = ["highlightedIndex", "items", "environment"], Nn = {
|
|
1009
|
-
highlightedIndex: -1,
|
|
1010
|
-
isOpen: !1,
|
|
1011
|
-
selectedItem: null,
|
|
1012
|
-
inputValue: ""
|
|
1013
|
-
};
|
|
1014
|
-
function Pr(t, n, r) {
|
|
1015
|
-
var i = t.props, o = t.type, e = {};
|
|
1016
|
-
Object.keys(n).forEach(function(s) {
|
|
1017
|
-
Vr(s, t, n, r), r[s] !== n[s] && (e[s] = r[s]);
|
|
1018
|
-
}), i.onStateChange && Object.keys(e).length && i.onStateChange(T({
|
|
1019
|
-
type: o
|
|
1020
|
-
}, e));
|
|
1021
|
-
}
|
|
1022
|
-
function Vr(t, n, r, i) {
|
|
1023
|
-
var o = n.props, e = n.type, s = "on" + st(t) + "Change";
|
|
1024
|
-
o[s] && i[t] !== void 0 && i[t] !== r[t] && o[s](T({
|
|
1025
|
-
type: e
|
|
1026
|
-
}, i));
|
|
1027
|
-
}
|
|
1028
|
-
function kr(t, n) {
|
|
1029
|
-
return n.changes;
|
|
1030
|
-
}
|
|
1031
|
-
function Tr(t) {
|
|
1032
|
-
var n = t.selectedItem, r = t.itemToString;
|
|
1033
|
-
return n ? r(n) + " has been selected." : "";
|
|
1034
|
-
}
|
|
1035
|
-
var Ar = rt(function(t, n) {
|
|
1036
|
-
it(t(), n);
|
|
1037
|
-
}, 200), Hr = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u" ? sn : ue, Kr = "useId" in Ue ? function(n) {
|
|
1038
|
-
var r = n.id, i = n.labelId, o = n.menuId, e = n.getItemId, s = n.toggleButtonId, u = n.inputId, c = "downshift-" + Ue.useId();
|
|
1039
|
-
r || (r = c);
|
|
1040
|
-
var a = ie({
|
|
1041
|
-
labelId: i || r + "-label",
|
|
1042
|
-
menuId: o || r + "-menu",
|
|
1043
|
-
getItemId: e || function(l) {
|
|
1044
|
-
return r + "-item-" + l;
|
|
1045
|
-
},
|
|
1046
|
-
toggleButtonId: s || r + "-toggle-button",
|
|
1047
|
-
inputId: u || r + "-input"
|
|
1048
|
-
});
|
|
1049
|
-
return a.current;
|
|
1050
|
-
} : function(n) {
|
|
1051
|
-
var r = n.id, i = r === void 0 ? "downshift-" + cn() : r, o = n.labelId, e = n.menuId, s = n.getItemId, u = n.toggleButtonId, c = n.inputId, a = ie({
|
|
1052
|
-
labelId: o || i + "-label",
|
|
1053
|
-
menuId: e || i + "-menu",
|
|
1054
|
-
getItemId: s || function(l) {
|
|
1055
|
-
return i + "-item-" + l;
|
|
1056
|
-
},
|
|
1057
|
-
toggleButtonId: u || i + "-toggle-button",
|
|
1058
|
-
inputId: c || i + "-input"
|
|
1059
|
-
});
|
|
1060
|
-
return a.current;
|
|
1061
|
-
};
|
|
1062
|
-
function Rn(t, n, r, i) {
|
|
1063
|
-
var o, e;
|
|
1064
|
-
if (t === void 0) {
|
|
1065
|
-
if (n === void 0)
|
|
1066
|
-
throw new Error(i);
|
|
1067
|
-
o = r[n], e = n;
|
|
1068
|
-
} else
|
|
1069
|
-
e = n === void 0 ? r.indexOf(t) : n, o = t;
|
|
1070
|
-
return [o, e];
|
|
1071
|
-
}
|
|
1072
|
-
function st(t) {
|
|
1073
|
-
return "" + t.slice(0, 1).toUpperCase() + t.slice(1);
|
|
1074
|
-
}
|
|
1075
|
-
function ut(t) {
|
|
1076
|
-
var n = ie(t);
|
|
1077
|
-
return n.current = t, n;
|
|
1078
|
-
}
|
|
1079
|
-
function Mn(t, n, r, i) {
|
|
1080
|
-
var o = ie(), e = ie(), s = X(function(x, E) {
|
|
1081
|
-
e.current = E, x = Ve(x, E.props);
|
|
1082
|
-
var R = t(x, E), h = E.props.stateReducer(x, T({}, E, {
|
|
1083
|
-
changes: R
|
|
1084
|
-
}));
|
|
1085
|
-
return h;
|
|
1086
|
-
}, [t]), u = Zn(s, n, r), c = u[0], a = u[1], l = ut(n), m = X(function(x) {
|
|
1087
|
-
return a(T({
|
|
1088
|
-
props: l.current
|
|
1089
|
-
}, x));
|
|
1090
|
-
}, [l]), O = e.current;
|
|
1091
|
-
return ue(function() {
|
|
1092
|
-
var x = Ve(o.current, O == null ? void 0 : O.props), E = O && o.current && !i(x, c);
|
|
1093
|
-
E && Pr(O, x, c), o.current = c;
|
|
1094
|
-
}, [c, O, i]), [c, m];
|
|
1095
|
-
}
|
|
1096
|
-
function jr(t, n, r, i) {
|
|
1097
|
-
var o = Mn(t, n, r, i), e = o[0], s = o[1];
|
|
1098
|
-
return [Ve(e, n), s];
|
|
1099
|
-
}
|
|
1100
|
-
var Oe = {
|
|
1101
|
-
itemToString: function(n) {
|
|
1102
|
-
return n ? String(n) : "";
|
|
1103
|
-
},
|
|
1104
|
-
itemToKey: function(n) {
|
|
1105
|
-
return n;
|
|
1106
|
-
},
|
|
1107
|
-
stateReducer: kr,
|
|
1108
|
-
getA11ySelectionMessage: Tr,
|
|
1109
|
-
scrollIntoView: an,
|
|
1110
|
-
environment: (
|
|
1111
|
-
/* istanbul ignore next (ssr) */
|
|
1112
|
-
typeof window > "u" ? void 0 : window
|
|
1113
|
-
)
|
|
1114
|
-
};
|
|
1115
|
-
function he(t, n, r) {
|
|
1116
|
-
r === void 0 && (r = Nn);
|
|
1117
|
-
var i = t["default" + st(n)];
|
|
1118
|
-
return i !== void 0 ? i : r[n];
|
|
1119
|
-
}
|
|
1120
|
-
function Ce(t, n, r) {
|
|
1121
|
-
r === void 0 && (r = Nn);
|
|
1122
|
-
var i = t[n];
|
|
1123
|
-
if (i !== void 0)
|
|
1124
|
-
return i;
|
|
1125
|
-
var o = t["initial" + st(n)];
|
|
1126
|
-
return o !== void 0 ? o : he(t, n, r);
|
|
1127
|
-
}
|
|
1128
|
-
function $r(t) {
|
|
1129
|
-
var n = Ce(t, "selectedItem"), r = Ce(t, "isOpen"), i = Ce(t, "highlightedIndex"), o = Ce(t, "inputValue");
|
|
1130
|
-
return {
|
|
1131
|
-
highlightedIndex: i < 0 && n && r ? t.items.findIndex(function(e) {
|
|
1132
|
-
return t.itemToKey(e) === t.itemToKey(n);
|
|
1133
|
-
}) : i,
|
|
1134
|
-
isOpen: r,
|
|
1135
|
-
selectedItem: n,
|
|
1136
|
-
inputValue: o
|
|
1137
|
-
};
|
|
1138
|
-
}
|
|
1139
|
-
function Me(t, n, r) {
|
|
1140
|
-
var i = t.items, o = t.initialHighlightedIndex, e = t.defaultHighlightedIndex, s = t.itemToKey, u = n.selectedItem, c = n.highlightedIndex;
|
|
1141
|
-
return i.length === 0 ? -1 : o !== void 0 && c === o ? o : e !== void 0 ? e : u ? i.findIndex(function(a) {
|
|
1142
|
-
return s(u) === s(a);
|
|
1143
|
-
}) : r === 0 ? -1 : r < 0 ? i.length - 1 : 0;
|
|
1144
|
-
}
|
|
1145
|
-
function Fr(t, n, r) {
|
|
1146
|
-
var i = ie({
|
|
1147
|
-
isMouseDown: !1,
|
|
1148
|
-
isTouchMove: !1,
|
|
1149
|
-
isTouchEnd: !1
|
|
1150
|
-
});
|
|
1151
|
-
return ue(function() {
|
|
1152
|
-
if (!t)
|
|
1153
|
-
return pe;
|
|
1154
|
-
var o = n.map(function(l) {
|
|
1155
|
-
return l.current;
|
|
1156
|
-
});
|
|
1157
|
-
function e() {
|
|
1158
|
-
i.current.isTouchEnd = !1, i.current.isMouseDown = !0;
|
|
1159
|
-
}
|
|
1160
|
-
function s(l) {
|
|
1161
|
-
i.current.isMouseDown = !1, qe(l.target, o, t) || r();
|
|
1162
|
-
}
|
|
1163
|
-
function u() {
|
|
1164
|
-
i.current.isTouchEnd = !1, i.current.isTouchMove = !1;
|
|
1165
|
-
}
|
|
1166
|
-
function c() {
|
|
1167
|
-
i.current.isTouchMove = !0;
|
|
1168
|
-
}
|
|
1169
|
-
function a(l) {
|
|
1170
|
-
i.current.isTouchEnd = !0, !i.current.isTouchMove && !qe(l.target, o, t, !1) && r();
|
|
1171
|
-
}
|
|
1172
|
-
return t.addEventListener("mousedown", e), t.addEventListener("mouseup", s), t.addEventListener("touchstart", u), t.addEventListener("touchmove", c), t.addEventListener("touchend", a), function() {
|
|
1173
|
-
t.removeEventListener("mousedown", e), t.removeEventListener("mouseup", s), t.removeEventListener("touchstart", u), t.removeEventListener("touchmove", c), t.removeEventListener("touchend", a);
|
|
1174
|
-
};
|
|
1175
|
-
}, [t, r]), i.current;
|
|
1176
|
-
}
|
|
1177
|
-
var lt = function() {
|
|
1178
|
-
return pe;
|
|
1179
|
-
};
|
|
1180
|
-
process.env.NODE_ENV !== "production" && (lt = function() {
|
|
1181
|
-
for (var n = ie(!0), r = arguments.length, i = new Array(r), o = 0; o < r; o++)
|
|
1182
|
-
i[o] = arguments[o];
|
|
1183
|
-
var e = ie(i.reduce(function(u, c) {
|
|
1184
|
-
return u[c] = {}, u;
|
|
1185
|
-
}, {}));
|
|
1186
|
-
ue(function() {
|
|
1187
|
-
Object.keys(e.current).forEach(function(u) {
|
|
1188
|
-
var c = e.current[u];
|
|
1189
|
-
if (n.current && !Object.keys(c).length) {
|
|
1190
|
-
console.error("downshift: You forgot to call the " + u + " getter function on your component / element.");
|
|
1191
|
-
return;
|
|
1192
|
-
}
|
|
1193
|
-
var a = c.suppressRefError, l = c.refKey, m = c.elementRef;
|
|
1194
|
-
(!m || !m.current) && !a && console.error('downshift: The ref prop "' + l + '" from ' + u + " was not applied correctly on your element.");
|
|
1195
|
-
}), n.current = !1;
|
|
1196
|
-
});
|
|
1197
|
-
var s = X(function(u, c, a, l) {
|
|
1198
|
-
e.current[u] = {
|
|
1199
|
-
suppressRefError: c,
|
|
1200
|
-
refKey: a,
|
|
1201
|
-
elementRef: l
|
|
1202
|
-
};
|
|
1203
|
-
}, []);
|
|
1204
|
-
return s;
|
|
1205
|
-
});
|
|
1206
|
-
function Jt(t, n, r) {
|
|
1207
|
-
var i = r.highlightedIndex, o = r.items, e = r.environment, s = fe(r, Mr), u = Te();
|
|
1208
|
-
ue(function() {
|
|
1209
|
-
u || !(e != null && e.document) || Ar(function() {
|
|
1210
|
-
return t(T({
|
|
1211
|
-
highlightedIndex: i,
|
|
1212
|
-
highlightedItem: o[i],
|
|
1213
|
-
resultCount: o.length
|
|
1214
|
-
}, s));
|
|
1215
|
-
}, e.document);
|
|
1216
|
-
}, n);
|
|
1217
|
-
}
|
|
1218
|
-
function Lr(t) {
|
|
1219
|
-
var n = t.highlightedIndex, r = t.isOpen, i = t.itemRefs, o = t.getItemNodeFromIndex, e = t.menuElement, s = t.scrollIntoView, u = ie(!0);
|
|
1220
|
-
return Hr(function() {
|
|
1221
|
-
n < 0 || !r || !Object.keys(i.current).length || (u.current === !1 ? u.current = !0 : s(o(n), e));
|
|
1222
|
-
}, [n]), u;
|
|
1223
|
-
}
|
|
1224
|
-
var at = pe;
|
|
1225
|
-
process.env.NODE_ENV !== "production" && (at = function(n) {
|
|
1226
|
-
var r = n.props, i = n.state, o = ie(r), e = Te();
|
|
1227
|
-
ue(function() {
|
|
1228
|
-
e || (ot(i, o.current, r), o.current = r);
|
|
1229
|
-
}, [i, r, e]);
|
|
1230
|
-
});
|
|
1231
|
-
function Qt(t, n, r) {
|
|
1232
|
-
var i;
|
|
1233
|
-
r === void 0 && (r = !0);
|
|
1234
|
-
var o = ((i = t.items) == null ? void 0 : i.length) && n >= 0;
|
|
1235
|
-
return T({
|
|
1236
|
-
isOpen: !1,
|
|
1237
|
-
highlightedIndex: -1
|
|
1238
|
-
}, o && T({
|
|
1239
|
-
selectedItem: t.items[n],
|
|
1240
|
-
isOpen: he(t, "isOpen"),
|
|
1241
|
-
highlightedIndex: he(t, "highlightedIndex")
|
|
1242
|
-
}, r && {
|
|
1243
|
-
inputValue: t.itemToString(t.items[n])
|
|
1244
|
-
}));
|
|
1245
|
-
}
|
|
1246
|
-
function Br(t, n) {
|
|
1247
|
-
return t.isOpen === n.isOpen && t.inputValue === n.inputValue && t.highlightedIndex === n.highlightedIndex && t.selectedItem === n.selectedItem;
|
|
1248
|
-
}
|
|
1249
|
-
function Te() {
|
|
1250
|
-
var t = Ue.useRef(!0);
|
|
1251
|
-
return Ue.useEffect(function() {
|
|
1252
|
-
return t.current = !1, function() {
|
|
1253
|
-
t.current = !0;
|
|
1254
|
-
};
|
|
1255
|
-
}, []), t.current;
|
|
1256
|
-
}
|
|
1257
|
-
var Pn = {
|
|
1258
|
-
environment: g.shape({
|
|
1259
|
-
addEventListener: g.func.isRequired,
|
|
1260
|
-
removeEventListener: g.func.isRequired,
|
|
1261
|
-
document: g.shape({
|
|
1262
|
-
createElement: g.func.isRequired,
|
|
1263
|
-
getElementById: g.func.isRequired,
|
|
1264
|
-
activeElement: g.any.isRequired,
|
|
1265
|
-
body: g.any.isRequired
|
|
1266
|
-
}).isRequired,
|
|
1267
|
-
Node: g.func.isRequired
|
|
1268
|
-
}),
|
|
1269
|
-
itemToString: g.func,
|
|
1270
|
-
itemToKey: g.func,
|
|
1271
|
-
stateReducer: g.func
|
|
1272
|
-
}, Vn = T({}, Pn, {
|
|
1273
|
-
getA11yStatusMessage: g.func,
|
|
1274
|
-
highlightedIndex: g.number,
|
|
1275
|
-
defaultHighlightedIndex: g.number,
|
|
1276
|
-
initialHighlightedIndex: g.number,
|
|
1277
|
-
isOpen: g.bool,
|
|
1278
|
-
defaultIsOpen: g.bool,
|
|
1279
|
-
initialIsOpen: g.bool,
|
|
1280
|
-
selectedItem: g.any,
|
|
1281
|
-
initialSelectedItem: g.any,
|
|
1282
|
-
defaultSelectedItem: g.any,
|
|
1283
|
-
id: g.string,
|
|
1284
|
-
labelId: g.string,
|
|
1285
|
-
menuId: g.string,
|
|
1286
|
-
getItemId: g.func,
|
|
1287
|
-
toggleButtonId: g.string,
|
|
1288
|
-
onSelectedItemChange: g.func,
|
|
1289
|
-
onHighlightedIndexChange: g.func,
|
|
1290
|
-
onStateChange: g.func,
|
|
1291
|
-
onIsOpenChange: g.func,
|
|
1292
|
-
scrollIntoView: g.func
|
|
1293
|
-
});
|
|
1294
|
-
function Ur(t, n, r) {
|
|
1295
|
-
var i = n.type, o = n.props, e;
|
|
1296
|
-
switch (i) {
|
|
1297
|
-
case r.ItemMouseMove:
|
|
1298
|
-
e = {
|
|
1299
|
-
highlightedIndex: n.disabled ? -1 : n.index
|
|
1300
|
-
};
|
|
1301
|
-
break;
|
|
1302
|
-
case r.MenuMouseLeave:
|
|
1303
|
-
e = {
|
|
1304
|
-
highlightedIndex: -1
|
|
1305
|
-
};
|
|
1306
|
-
break;
|
|
1307
|
-
case r.ToggleButtonClick:
|
|
1308
|
-
case r.FunctionToggleMenu:
|
|
1309
|
-
e = {
|
|
1310
|
-
isOpen: !t.isOpen,
|
|
1311
|
-
highlightedIndex: t.isOpen ? -1 : Me(o, t, 0)
|
|
1312
|
-
};
|
|
1313
|
-
break;
|
|
1314
|
-
case r.FunctionOpenMenu:
|
|
1315
|
-
e = {
|
|
1316
|
-
isOpen: !0,
|
|
1317
|
-
highlightedIndex: Me(o, t, 0)
|
|
1318
|
-
};
|
|
1319
|
-
break;
|
|
1320
|
-
case r.FunctionCloseMenu:
|
|
1321
|
-
e = {
|
|
1322
|
-
isOpen: !1
|
|
1323
|
-
};
|
|
1324
|
-
break;
|
|
1325
|
-
case r.FunctionSetHighlightedIndex:
|
|
1326
|
-
e = {
|
|
1327
|
-
highlightedIndex: n.highlightedIndex
|
|
1328
|
-
};
|
|
1329
|
-
break;
|
|
1330
|
-
case r.FunctionSetInputValue:
|
|
1331
|
-
e = {
|
|
1332
|
-
inputValue: n.inputValue
|
|
1333
|
-
};
|
|
1334
|
-
break;
|
|
1335
|
-
case r.FunctionReset:
|
|
1336
|
-
e = {
|
|
1337
|
-
highlightedIndex: he(o, "highlightedIndex"),
|
|
1338
|
-
isOpen: he(o, "isOpen"),
|
|
1339
|
-
selectedItem: he(o, "selectedItem"),
|
|
1340
|
-
inputValue: he(o, "inputValue")
|
|
1341
|
-
};
|
|
1342
|
-
break;
|
|
1343
|
-
default:
|
|
1344
|
-
throw new Error("Reducer called without proper action type.");
|
|
1345
|
-
}
|
|
1346
|
-
return T({}, t, e);
|
|
1347
|
-
}
|
|
1348
|
-
De(De({}, Vn), { items: g.array.isRequired, isItemDisabled: g.func, getA11ySelectionMessage: g.func });
|
|
1349
|
-
function Wr(t) {
|
|
1350
|
-
var n = t.isOpen, r = t.resultCount, i = t.previousResultCount;
|
|
1351
|
-
return n ? r ? r !== i ? "".concat(r, " result").concat(r === 1 ? " is" : "s are", " available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select.") : "" : "No results are available." : "";
|
|
1352
|
-
}
|
|
1353
|
-
De(De({}, Oe), { getA11yStatusMessage: Wr, isItemDisabled: function() {
|
|
1354
|
-
return !1;
|
|
1355
|
-
} });
|
|
1356
|
-
process.env.NODE_ENV;
|
|
1357
|
-
process.env.NODE_ENV;
|
|
1358
|
-
process.env.NODE_ENV;
|
|
1359
|
-
process.env.NODE_ENV;
|
|
1360
|
-
process.env.NODE_ENV;
|
|
1361
|
-
process.env.NODE_ENV;
|
|
1362
|
-
process.env.NODE_ENV;
|
|
1363
|
-
process.env.NODE_ENV;
|
|
1364
|
-
process.env.NODE_ENV;
|
|
1365
|
-
process.env.NODE_ENV;
|
|
1366
|
-
process.env.NODE_ENV;
|
|
1367
|
-
process.env.NODE_ENV;
|
|
1368
|
-
process.env.NODE_ENV;
|
|
1369
|
-
process.env.NODE_ENV;
|
|
1370
|
-
process.env.NODE_ENV;
|
|
1371
|
-
process.env.NODE_ENV;
|
|
1372
|
-
process.env.NODE_ENV;
|
|
1373
|
-
process.env.NODE_ENV;
|
|
1374
|
-
process.env.NODE_ENV;
|
|
1375
|
-
process.env.NODE_ENV;
|
|
1376
|
-
process.env.NODE_ENV;
|
|
1377
|
-
process.env.NODE_ENV;
|
|
1378
|
-
process.env.NODE_ENV;
|
|
1379
|
-
var ct = process.env.NODE_ENV !== "production" ? "__input_keydown_arrow_down__" : 0, dt = process.env.NODE_ENV !== "production" ? "__input_keydown_arrow_up__" : 1, pt = process.env.NODE_ENV !== "production" ? "__input_keydown_escape__" : 2, ft = process.env.NODE_ENV !== "production" ? "__input_keydown_home__" : 3, gt = process.env.NODE_ENV !== "production" ? "__input_keydown_end__" : 4, ht = process.env.NODE_ENV !== "production" ? "__input_keydown_page_up__" : 5, mt = process.env.NODE_ENV !== "production" ? "__input_keydown_page_down__" : 6, vt = process.env.NODE_ENV !== "production" ? "__input_keydown_enter__" : 7, It = process.env.NODE_ENV !== "production" ? "__input_change__" : 8, Ye = process.env.NODE_ENV !== "production" ? "__input_blur__" : 9, _t = process.env.NODE_ENV !== "production" ? "__input_click__" : 10, kn = process.env.NODE_ENV !== "production" ? "__menu_mouse_leave__" : 11, Tn = process.env.NODE_ENV !== "production" ? "__item_mouse_move__" : 12, yt = process.env.NODE_ENV !== "production" ? "__item_click__" : 13, An = process.env.NODE_ENV !== "production" ? "__togglebutton_click__" : 14, Hn = process.env.NODE_ENV !== "production" ? "__function_toggle_menu__" : 15, Kn = process.env.NODE_ENV !== "production" ? "__function_open_menu__" : 16, jn = process.env.NODE_ENV !== "production" ? "__function_close_menu__" : 17, $n = process.env.NODE_ENV !== "production" ? "__function_set_highlighted_index__" : 18, Et = process.env.NODE_ENV !== "production" ? "__function_select_item__" : 19, Fn = process.env.NODE_ENV !== "production" ? "__function_set_input_value__" : 20, Ln = process.env.NODE_ENV !== "production" ? "__function_reset__" : 21, wt = process.env.NODE_ENV !== "production" ? "__controlled_prop_updated_selected_item__" : 22, Bn = /* @__PURE__ */ Object.freeze({
|
|
1380
|
-
__proto__: null,
|
|
1381
|
-
InputKeyDownArrowDown: ct,
|
|
1382
|
-
InputKeyDownArrowUp: dt,
|
|
1383
|
-
InputKeyDownEscape: pt,
|
|
1384
|
-
InputKeyDownHome: ft,
|
|
1385
|
-
InputKeyDownEnd: gt,
|
|
1386
|
-
InputKeyDownPageUp: ht,
|
|
1387
|
-
InputKeyDownPageDown: mt,
|
|
1388
|
-
InputKeyDownEnter: vt,
|
|
1389
|
-
InputChange: It,
|
|
1390
|
-
InputBlur: Ye,
|
|
1391
|
-
InputClick: _t,
|
|
1392
|
-
MenuMouseLeave: kn,
|
|
1393
|
-
ItemMouseMove: Tn,
|
|
1394
|
-
ItemClick: yt,
|
|
1395
|
-
ToggleButtonClick: An,
|
|
1396
|
-
FunctionToggleMenu: Hn,
|
|
1397
|
-
FunctionOpenMenu: Kn,
|
|
1398
|
-
FunctionCloseMenu: jn,
|
|
1399
|
-
FunctionSetHighlightedIndex: $n,
|
|
1400
|
-
FunctionSelectItem: Et,
|
|
1401
|
-
FunctionSetInputValue: Fn,
|
|
1402
|
-
FunctionReset: Ln,
|
|
1403
|
-
ControlledPropUpdatedSelectedItem: wt
|
|
1404
|
-
});
|
|
1405
|
-
function qr(t) {
|
|
1406
|
-
var n = $r(t), r = n.selectedItem, i = n.inputValue;
|
|
1407
|
-
return i === "" && r && t.defaultInputValue === void 0 && t.initialInputValue === void 0 && t.inputValue === void 0 && (i = t.itemToString(r)), T({}, n, {
|
|
1408
|
-
inputValue: i
|
|
1409
|
-
});
|
|
1410
|
-
}
|
|
1411
|
-
var Yr = T({}, Vn, {
|
|
1412
|
-
items: g.array.isRequired,
|
|
1413
|
-
isItemDisabled: g.func,
|
|
1414
|
-
selectedItemChanged: g.func,
|
|
1415
|
-
getA11ySelectionMessage: g.func,
|
|
1416
|
-
inputValue: g.string,
|
|
1417
|
-
defaultInputValue: g.string,
|
|
1418
|
-
initialInputValue: g.string,
|
|
1419
|
-
inputId: g.string,
|
|
1420
|
-
onInputValueChange: g.func
|
|
1421
|
-
});
|
|
1422
|
-
function zr(t, n, r, i) {
|
|
1423
|
-
var o = ie(), e = Mn(t, n, r, i), s = e[0], u = e[1], c = Te();
|
|
1424
|
-
return ue(function() {
|
|
1425
|
-
if (We(n, "selectedItem")) {
|
|
1426
|
-
if (!c) {
|
|
1427
|
-
var a;
|
|
1428
|
-
n.selectedItemChanged === void 0 ? a = n.itemToKey(n.selectedItem) !== n.itemToKey(o.current) : (console.warn('The "selectedItemChanged" is deprecated. Please use "itemToKey instead". https://github.com/downshift-js/downshift/blob/master/src/hooks/useCombobox/README.md#selecteditemchanged'), a = n.selectedItemChanged(o.current, n.selectedItem)), a && u({
|
|
1429
|
-
type: wt,
|
|
1430
|
-
inputValue: n.itemToString(n.selectedItem)
|
|
1431
|
-
});
|
|
1432
|
-
}
|
|
1433
|
-
o.current = s.selectedItem === o.current ? n.selectedItem : s.selectedItem;
|
|
1434
|
-
}
|
|
1435
|
-
}, [s.selectedItem, n.selectedItem]), [Ve(s, n), u];
|
|
1436
|
-
}
|
|
1437
|
-
var Un = pe;
|
|
1438
|
-
process.env.NODE_ENV !== "production" && (Un = function(n, r) {
|
|
1439
|
-
g.checkPropTypes(Yr, n, "prop", r.name);
|
|
1440
|
-
});
|
|
1441
|
-
var Gr = T({}, Oe, {
|
|
1442
|
-
getA11yStatusMessage: dn,
|
|
1443
|
-
isItemDisabled: function() {
|
|
1444
|
-
return !1;
|
|
1445
|
-
}
|
|
1446
|
-
});
|
|
1447
|
-
function Xr(t, n) {
|
|
1448
|
-
var r, i = n.type, o = n.props, e = n.altKey, s;
|
|
1449
|
-
switch (i) {
|
|
1450
|
-
case yt:
|
|
1451
|
-
s = {
|
|
1452
|
-
isOpen: he(o, "isOpen"),
|
|
1453
|
-
highlightedIndex: he(o, "highlightedIndex"),
|
|
1454
|
-
selectedItem: o.items[n.index],
|
|
1455
|
-
inputValue: o.itemToString(o.items[n.index])
|
|
1456
|
-
};
|
|
1457
|
-
break;
|
|
1458
|
-
case ct:
|
|
1459
|
-
t.isOpen ? s = {
|
|
1460
|
-
highlightedIndex: be(t.highlightedIndex, 1, o.items, o.isItemDisabled, !0)
|
|
1461
|
-
} : s = {
|
|
1462
|
-
highlightedIndex: e && t.selectedItem == null ? -1 : Me(o, t, 1),
|
|
1463
|
-
isOpen: o.items.length >= 0
|
|
1464
|
-
};
|
|
1465
|
-
break;
|
|
1466
|
-
case dt:
|
|
1467
|
-
t.isOpen ? e ? s = Qt(o, t.highlightedIndex) : s = {
|
|
1468
|
-
highlightedIndex: be(t.highlightedIndex, -1, o.items, o.isItemDisabled, !0)
|
|
1469
|
-
} : s = {
|
|
1470
|
-
highlightedIndex: Me(o, t, -1),
|
|
1471
|
-
isOpen: o.items.length >= 0
|
|
1472
|
-
};
|
|
1473
|
-
break;
|
|
1474
|
-
case vt:
|
|
1475
|
-
s = Qt(o, t.highlightedIndex);
|
|
1476
|
-
break;
|
|
1477
|
-
case pt:
|
|
1478
|
-
s = T({
|
|
1479
|
-
isOpen: !1,
|
|
1480
|
-
highlightedIndex: -1
|
|
1481
|
-
}, !t.isOpen && {
|
|
1482
|
-
selectedItem: null,
|
|
1483
|
-
inputValue: ""
|
|
1484
|
-
});
|
|
1485
|
-
break;
|
|
1486
|
-
case ht:
|
|
1487
|
-
s = {
|
|
1488
|
-
highlightedIndex: be(t.highlightedIndex, -10, o.items, o.isItemDisabled, !0)
|
|
1489
|
-
};
|
|
1490
|
-
break;
|
|
1491
|
-
case mt:
|
|
1492
|
-
s = {
|
|
1493
|
-
highlightedIndex: be(t.highlightedIndex, 10, o.items, o.isItemDisabled, !0)
|
|
1494
|
-
};
|
|
1495
|
-
break;
|
|
1496
|
-
case ft:
|
|
1497
|
-
s = {
|
|
1498
|
-
highlightedIndex: Se(0, !1, o.items, o.isItemDisabled)
|
|
1499
|
-
};
|
|
1500
|
-
break;
|
|
1501
|
-
case gt:
|
|
1502
|
-
s = {
|
|
1503
|
-
highlightedIndex: Se(o.items.length - 1, !0, o.items, o.isItemDisabled)
|
|
1504
|
-
};
|
|
1505
|
-
break;
|
|
1506
|
-
case Ye:
|
|
1507
|
-
s = T({
|
|
1508
|
-
isOpen: !1,
|
|
1509
|
-
highlightedIndex: -1
|
|
1510
|
-
}, t.highlightedIndex >= 0 && ((r = o.items) == null ? void 0 : r.length) && n.selectItem && {
|
|
1511
|
-
selectedItem: o.items[t.highlightedIndex],
|
|
1512
|
-
inputValue: o.itemToString(o.items[t.highlightedIndex])
|
|
1513
|
-
});
|
|
1514
|
-
break;
|
|
1515
|
-
case It:
|
|
1516
|
-
s = {
|
|
1517
|
-
isOpen: !0,
|
|
1518
|
-
highlightedIndex: he(o, "highlightedIndex"),
|
|
1519
|
-
inputValue: n.inputValue
|
|
1520
|
-
};
|
|
1521
|
-
break;
|
|
1522
|
-
case _t:
|
|
1523
|
-
s = {
|
|
1524
|
-
isOpen: !t.isOpen,
|
|
1525
|
-
highlightedIndex: t.isOpen ? -1 : Me(o, t, 0)
|
|
1526
|
-
};
|
|
1527
|
-
break;
|
|
1528
|
-
case Et:
|
|
1529
|
-
s = {
|
|
1530
|
-
selectedItem: n.selectedItem,
|
|
1531
|
-
inputValue: o.itemToString(n.selectedItem)
|
|
1532
|
-
};
|
|
1533
|
-
break;
|
|
1534
|
-
case wt:
|
|
1535
|
-
s = {
|
|
1536
|
-
inputValue: n.inputValue
|
|
1537
|
-
};
|
|
1538
|
-
break;
|
|
1539
|
-
default:
|
|
1540
|
-
return Ur(t, n, Bn);
|
|
1541
|
-
}
|
|
1542
|
-
return T({}, t, s);
|
|
1543
|
-
}
|
|
1544
|
-
var Jr = ["onMouseLeave", "refKey", "ref"], Qr = ["item", "index", "refKey", "ref", "onMouseMove", "onMouseDown", "onClick", "onPress", "disabled"], Zr = ["onClick", "onPress", "refKey", "ref"], eo = ["onKeyDown", "onChange", "onInput", "onBlur", "onChangeText", "onClick", "refKey", "ref"];
|
|
1545
|
-
de.stateChangeTypes = Bn;
|
|
1546
|
-
function de(t) {
|
|
1547
|
-
t === void 0 && (t = {}), Un(t, de);
|
|
1548
|
-
var n = T({}, Gr, t), r = n.items, i = n.scrollIntoView, o = n.environment, e = n.getA11yStatusMessage, s = n.getA11ySelectionMessage, u = n.itemToString, c = zr(Xr, n, qr, Br), a = c[0], l = c[1], m = a.isOpen, O = a.highlightedIndex, x = a.selectedItem, E = a.inputValue, R = ie(null), h = ie({}), $ = ie(null), d = ie(null), f = Te(), p = Kr(n), _ = ie(), y = ut({
|
|
1549
|
-
state: a,
|
|
1550
|
-
props: n
|
|
1551
|
-
}), V = X(function(D) {
|
|
1552
|
-
return h.current[p.getItemId(D)];
|
|
1553
|
-
}, [p]);
|
|
1554
|
-
Jt(e, [m, O, E, r], T({
|
|
1555
|
-
previousResultCount: _.current,
|
|
1556
|
-
items: r,
|
|
1557
|
-
environment: o,
|
|
1558
|
-
itemToString: u
|
|
1559
|
-
}, a)), Jt(s, [x], T({
|
|
1560
|
-
previousResultCount: _.current,
|
|
1561
|
-
items: r,
|
|
1562
|
-
environment: o,
|
|
1563
|
-
itemToString: u
|
|
1564
|
-
}, a));
|
|
1565
|
-
var b = Lr({
|
|
1566
|
-
menuElement: R.current,
|
|
1567
|
-
highlightedIndex: O,
|
|
1568
|
-
isOpen: m,
|
|
1569
|
-
itemRefs: h,
|
|
1570
|
-
scrollIntoView: i,
|
|
1571
|
-
getItemNodeFromIndex: V
|
|
1572
|
-
});
|
|
1573
|
-
at({
|
|
1574
|
-
props: n,
|
|
1575
|
-
state: a
|
|
1576
|
-
}), ue(function() {
|
|
1577
|
-
var D = Ce(n, "isOpen");
|
|
1578
|
-
D && $.current && $.current.focus();
|
|
1579
|
-
}, []), ue(function() {
|
|
1580
|
-
f || (_.current = r.length);
|
|
1581
|
-
});
|
|
1582
|
-
var A = Fr(o, [d, R, $], X(function() {
|
|
1583
|
-
y.current.state.isOpen && l({
|
|
1584
|
-
type: Ye,
|
|
1585
|
-
selectItem: !1
|
|
1586
|
-
});
|
|
1587
|
-
}, [l, y])), P = lt("getInputProps", "getMenuProps");
|
|
1588
|
-
ue(function() {
|
|
1589
|
-
m || (h.current = {});
|
|
1590
|
-
}, [m]), ue(function() {
|
|
1591
|
-
var D;
|
|
1592
|
-
!m || !(o != null && o.document) || !($ != null && (D = $.current) != null && D.focus) || o.document.activeElement !== $.current && $.current.focus();
|
|
1593
|
-
}, [m, o]);
|
|
1594
|
-
var w = Qe(function() {
|
|
1595
|
-
return {
|
|
1596
|
-
ArrowDown: function(C) {
|
|
1597
|
-
C.preventDefault(), l({
|
|
1598
|
-
type: ct,
|
|
1599
|
-
altKey: C.altKey
|
|
1600
|
-
});
|
|
1601
|
-
},
|
|
1602
|
-
ArrowUp: function(C) {
|
|
1603
|
-
C.preventDefault(), l({
|
|
1604
|
-
type: dt,
|
|
1605
|
-
altKey: C.altKey
|
|
1606
|
-
});
|
|
1607
|
-
},
|
|
1608
|
-
Home: function(C) {
|
|
1609
|
-
y.current.state.isOpen && (C.preventDefault(), l({
|
|
1610
|
-
type: ft
|
|
1611
|
-
}));
|
|
1612
|
-
},
|
|
1613
|
-
End: function(C) {
|
|
1614
|
-
y.current.state.isOpen && (C.preventDefault(), l({
|
|
1615
|
-
type: gt
|
|
1616
|
-
}));
|
|
1617
|
-
},
|
|
1618
|
-
Escape: function(C) {
|
|
1619
|
-
var v = y.current.state;
|
|
1620
|
-
(v.isOpen || v.inputValue || v.selectedItem || v.highlightedIndex > -1) && (C.preventDefault(), l({
|
|
1621
|
-
type: pt
|
|
1622
|
-
}));
|
|
1623
|
-
},
|
|
1624
|
-
Enter: function(C) {
|
|
1625
|
-
var v = y.current.state;
|
|
1626
|
-
!v.isOpen || C.which === 229 || (C.preventDefault(), l({
|
|
1627
|
-
type: vt
|
|
1628
|
-
}));
|
|
1629
|
-
},
|
|
1630
|
-
PageUp: function(C) {
|
|
1631
|
-
y.current.state.isOpen && (C.preventDefault(), l({
|
|
1632
|
-
type: ht
|
|
1633
|
-
}));
|
|
1634
|
-
},
|
|
1635
|
-
PageDown: function(C) {
|
|
1636
|
-
y.current.state.isOpen && (C.preventDefault(), l({
|
|
1637
|
-
type: mt
|
|
1638
|
-
}));
|
|
1639
|
-
}
|
|
1640
|
-
};
|
|
1641
|
-
}, [l, y]), S = X(function(D) {
|
|
1642
|
-
return T({
|
|
1643
|
-
id: p.labelId,
|
|
1644
|
-
htmlFor: p.inputId
|
|
1645
|
-
}, D);
|
|
1646
|
-
}, [p]), k = X(function(D, C) {
|
|
1647
|
-
var v, M = D === void 0 ? {} : D, L = M.onMouseLeave, B = M.refKey, F = B === void 0 ? "ref" : B, te = M.ref, ne = fe(M, Jr), oe = C === void 0 ? {} : C, I = oe.suppressRefError, ce = I === void 0 ? !1 : I;
|
|
1648
|
-
return P("getMenuProps", ce, F, R), T((v = {}, v[F] = Ee(te, function(Z) {
|
|
1649
|
-
R.current = Z;
|
|
1650
|
-
}), v.id = p.menuId, v.role = "listbox", v["aria-labelledby"] = ne && ne["aria-label"] ? void 0 : "" + p.labelId, v.onMouseLeave = Q(L, function() {
|
|
1651
|
-
l({
|
|
1652
|
-
type: kn
|
|
1653
|
-
});
|
|
1654
|
-
}), v), ne);
|
|
1655
|
-
}, [l, P, p]), H = X(function(D) {
|
|
1656
|
-
var C, v, M = D === void 0 ? {} : D, L = M.item, B = M.index, F = M.refKey, te = F === void 0 ? "ref" : F, ne = M.ref, oe = M.onMouseMove, I = M.onMouseDown, ce = M.onClick;
|
|
1657
|
-
M.onPress;
|
|
1658
|
-
var Z = M.disabled, xe = fe(M, Qr);
|
|
1659
|
-
Z !== void 0 && console.warn('Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useCombobox.');
|
|
1660
|
-
var Ne = y.current, He = Ne.props, me = Ne.state, Ke = Rn(L, B, He.items, "Pass either item or index to getItemProps!"), Ge = Ke[0], ve = Ke[1], Re = He.isItemDisabled(Ge, ve), Xe = "onClick", je = ce, Ie = function() {
|
|
1661
|
-
A.isTouchEnd || ve === me.highlightedIndex || (b.current = !1, l({
|
|
1662
|
-
type: Tn,
|
|
1663
|
-
index: ve,
|
|
1664
|
-
disabled: Re
|
|
1665
|
-
}));
|
|
1666
|
-
}, we = function() {
|
|
1667
|
-
l({
|
|
1668
|
-
type: yt,
|
|
1669
|
-
index: ve
|
|
1670
|
-
});
|
|
1671
|
-
}, _e = function(Xn) {
|
|
1672
|
-
return Xn.preventDefault();
|
|
1673
|
-
};
|
|
1674
|
-
return T((C = {}, C[te] = Ee(ne, function(ge) {
|
|
1675
|
-
ge && (h.current[p.getItemId(ve)] = ge);
|
|
1676
|
-
}), C["aria-disabled"] = Re, C["aria-selected"] = "" + (ve === me.highlightedIndex), C.id = p.getItemId(ve), C.role = "option", C), !Re && (v = {}, v[Xe] = Q(je, we), v), {
|
|
1677
|
-
onMouseMove: Q(oe, Ie),
|
|
1678
|
-
onMouseDown: Q(I, _e)
|
|
1679
|
-
}, xe);
|
|
1680
|
-
}, [l, p, y, A, b]), q = X(function(D) {
|
|
1681
|
-
var C, v = D === void 0 ? {} : D, M = v.onClick;
|
|
1682
|
-
v.onPress;
|
|
1683
|
-
var L = v.refKey, B = L === void 0 ? "ref" : L, F = v.ref, te = fe(v, Zr), ne = y.current.state, oe = function() {
|
|
1684
|
-
l({
|
|
1685
|
-
type: An
|
|
1686
|
-
});
|
|
1687
|
-
};
|
|
1688
|
-
return T((C = {}, C[B] = Ee(F, function(I) {
|
|
1689
|
-
d.current = I;
|
|
1690
|
-
}), C["aria-controls"] = p.menuId, C["aria-expanded"] = ne.isOpen, C.id = p.toggleButtonId, C.tabIndex = -1, C), !te.disabled && T({}, {
|
|
1691
|
-
onClick: Q(M, oe)
|
|
1692
|
-
}), te);
|
|
1693
|
-
}, [l, y, p]), Y = X(function(D, C) {
|
|
1694
|
-
var v, M = D === void 0 ? {} : D, L = M.onKeyDown, B = M.onChange, F = M.onInput, te = M.onBlur;
|
|
1695
|
-
M.onChangeText;
|
|
1696
|
-
var ne = M.onClick, oe = M.refKey, I = oe === void 0 ? "ref" : oe, ce = M.ref, Z = fe(M, eo), xe = C === void 0 ? {} : C, Ne = xe.suppressRefError, He = Ne === void 0 ? !1 : Ne;
|
|
1697
|
-
P("getInputProps", He, I, $);
|
|
1698
|
-
var me = y.current.state, Ke = function(_e) {
|
|
1699
|
-
var ge = ke(_e);
|
|
1700
|
-
ge && w[ge] && w[ge](_e);
|
|
1701
|
-
}, Ge = function(_e) {
|
|
1702
|
-
l({
|
|
1703
|
-
type: It,
|
|
1704
|
-
inputValue: _e.target.value
|
|
1705
|
-
});
|
|
1706
|
-
}, ve = function(_e) {
|
|
1707
|
-
if (o != null && o.document && me.isOpen && !A.isMouseDown) {
|
|
1708
|
-
var ge = _e.relatedTarget === null && o.document.activeElement !== o.document.body;
|
|
1709
|
-
l({
|
|
1710
|
-
type: Ye,
|
|
1711
|
-
selectItem: !ge
|
|
1712
|
-
});
|
|
1713
|
-
}
|
|
1714
|
-
}, Re = function() {
|
|
1715
|
-
l({
|
|
1716
|
-
type: _t
|
|
1717
|
-
});
|
|
1718
|
-
}, Xe = "onChange", je = {};
|
|
1719
|
-
if (!Z.disabled) {
|
|
1720
|
-
var Ie;
|
|
1721
|
-
je = (Ie = {}, Ie[Xe] = Q(B, F, Ge), Ie.onKeyDown = Q(L, Ke), Ie.onBlur = Q(te, ve), Ie.onClick = Q(ne, Re), Ie);
|
|
1722
|
-
}
|
|
1723
|
-
return T((v = {}, v[I] = Ee(ce, function(we) {
|
|
1724
|
-
$.current = we;
|
|
1725
|
-
}), v["aria-activedescendant"] = me.isOpen && me.highlightedIndex > -1 ? p.getItemId(me.highlightedIndex) : "", v["aria-autocomplete"] = "list", v["aria-controls"] = p.menuId, v["aria-expanded"] = me.isOpen, v["aria-labelledby"] = Z && Z["aria-label"] ? void 0 : p.labelId, v.autoComplete = "off", v.id = p.inputId, v.role = "combobox", v.value = me.inputValue, v), je, Z);
|
|
1726
|
-
}, [l, p, o, w, y, A, P]), K = X(function() {
|
|
1727
|
-
l({
|
|
1728
|
-
type: Hn
|
|
1729
|
-
});
|
|
1730
|
-
}, [l]), ee = X(function() {
|
|
1731
|
-
l({
|
|
1732
|
-
type: jn
|
|
1733
|
-
});
|
|
1734
|
-
}, [l]), re = X(function() {
|
|
1735
|
-
l({
|
|
1736
|
-
type: Kn
|
|
1737
|
-
});
|
|
1738
|
-
}, [l]), N = X(function(D) {
|
|
1739
|
-
l({
|
|
1740
|
-
type: $n,
|
|
1741
|
-
highlightedIndex: D
|
|
1742
|
-
});
|
|
1743
|
-
}, [l]), z = X(function(D) {
|
|
1744
|
-
l({
|
|
1745
|
-
type: Et,
|
|
1746
|
-
selectedItem: D
|
|
1747
|
-
});
|
|
1748
|
-
}, [l]), G = X(function(D) {
|
|
1749
|
-
l({
|
|
1750
|
-
type: Fn,
|
|
1751
|
-
inputValue: D
|
|
1752
|
-
});
|
|
1753
|
-
}, [l]), se = X(function() {
|
|
1754
|
-
l({
|
|
1755
|
-
type: Ln
|
|
1756
|
-
});
|
|
1757
|
-
}, [l]);
|
|
1758
|
-
return {
|
|
1759
|
-
// prop getters.
|
|
1760
|
-
getItemProps: H,
|
|
1761
|
-
getLabelProps: S,
|
|
1762
|
-
getMenuProps: k,
|
|
1763
|
-
getInputProps: Y,
|
|
1764
|
-
getToggleButtonProps: q,
|
|
1765
|
-
// actions.
|
|
1766
|
-
toggleMenu: K,
|
|
1767
|
-
openMenu: re,
|
|
1768
|
-
closeMenu: ee,
|
|
1769
|
-
setHighlightedIndex: N,
|
|
1770
|
-
setInputValue: G,
|
|
1771
|
-
selectItem: z,
|
|
1772
|
-
reset: se,
|
|
1773
|
-
// state.
|
|
1774
|
-
highlightedIndex: O,
|
|
1775
|
-
isOpen: m,
|
|
1776
|
-
selectedItem: x,
|
|
1777
|
-
inputValue: E
|
|
1778
|
-
};
|
|
1779
|
-
}
|
|
1780
|
-
var Wn = {
|
|
1781
|
-
activeIndex: -1,
|
|
1782
|
-
selectedItems: []
|
|
1783
|
-
};
|
|
1784
|
-
function Zt(t, n) {
|
|
1785
|
-
return Ce(t, n, Wn);
|
|
1786
|
-
}
|
|
1787
|
-
function en(t, n) {
|
|
1788
|
-
return he(t, n, Wn);
|
|
1789
|
-
}
|
|
1790
|
-
function to(t) {
|
|
1791
|
-
var n = Zt(t, "activeIndex"), r = Zt(t, "selectedItems");
|
|
1792
|
-
return {
|
|
1793
|
-
activeIndex: n,
|
|
1794
|
-
selectedItems: r
|
|
1795
|
-
};
|
|
1796
|
-
}
|
|
1797
|
-
function tn(t) {
|
|
1798
|
-
if (t.shiftKey || t.metaKey || t.ctrlKey || t.altKey)
|
|
1799
|
-
return !1;
|
|
1800
|
-
var n = t.target;
|
|
1801
|
-
return !(n instanceof HTMLInputElement && // if element is a text input
|
|
1802
|
-
n.value !== "" && // and we have text in it
|
|
1803
|
-
// and cursor is either not at the start or is currently highlighting text.
|
|
1804
|
-
(n.selectionStart !== 0 || n.selectionEnd !== 0));
|
|
1805
|
-
}
|
|
1806
|
-
function no(t) {
|
|
1807
|
-
var n = t.removedSelectedItem, r = t.itemToString;
|
|
1808
|
-
return r(n) + " has been removed.";
|
|
1809
|
-
}
|
|
1810
|
-
function ro(t, n) {
|
|
1811
|
-
return t.selectedItems === n.selectedItems && t.activeIndex === n.activeIndex;
|
|
1812
|
-
}
|
|
1813
|
-
var oo = T({}, Pn, {
|
|
1814
|
-
selectedItems: g.array,
|
|
1815
|
-
initialSelectedItems: g.array,
|
|
1816
|
-
defaultSelectedItems: g.array,
|
|
1817
|
-
getA11yRemovalMessage: g.func,
|
|
1818
|
-
activeIndex: g.number,
|
|
1819
|
-
initialActiveIndex: g.number,
|
|
1820
|
-
defaultActiveIndex: g.number,
|
|
1821
|
-
onActiveIndexChange: g.func,
|
|
1822
|
-
onSelectedItemsChange: g.func,
|
|
1823
|
-
keyNavigationNext: g.string,
|
|
1824
|
-
keyNavigationPrevious: g.string
|
|
1825
|
-
}), io = {
|
|
1826
|
-
itemToString: Oe.itemToString,
|
|
1827
|
-
itemToKey: Oe.itemToKey,
|
|
1828
|
-
stateReducer: Oe.stateReducer,
|
|
1829
|
-
environment: Oe.environment,
|
|
1830
|
-
getA11yRemovalMessage: no,
|
|
1831
|
-
keyNavigationNext: "ArrowRight",
|
|
1832
|
-
keyNavigationPrevious: "ArrowLeft"
|
|
1833
|
-
}, qn = pe;
|
|
1834
|
-
process.env.NODE_ENV !== "production" && (qn = function(n, r) {
|
|
1835
|
-
g.checkPropTypes(oo, n, "prop", r.name);
|
|
1836
|
-
});
|
|
1837
|
-
var bt = process.env.NODE_ENV !== "production" ? "__selected_item_click__" : 0, xt = process.env.NODE_ENV !== "production" ? "__selected_item_keydown_delete__" : 1, Ot = process.env.NODE_ENV !== "production" ? "__selected_item_keydown_backspace__" : 2, Ct = process.env.NODE_ENV !== "production" ? "__selected_item_keydown_navigation_next__" : 3, Dt = process.env.NODE_ENV !== "production" ? "__selected_item_keydown_navigation_previous__" : 4, St = process.env.NODE_ENV !== "production" ? "__dropdown_keydown_navigation_previous__" : 5, Nt = process.env.NODE_ENV !== "production" ? "__dropdown_keydown_backspace__" : 6, Rt = process.env.NODE_ENV !== "production" ? "__dropdown_click__" : 7, Mt = process.env.NODE_ENV !== "production" ? "__function_add_selected_item__" : 8, Pt = process.env.NODE_ENV !== "production" ? "__function_remove_selected_item__" : 9, Vt = process.env.NODE_ENV !== "production" ? "__function_set_selected_items__" : 10, kt = process.env.NODE_ENV !== "production" ? "__function_set_active_index__" : 11, Tt = process.env.NODE_ENV !== "production" ? "__function_reset__" : 12, so = /* @__PURE__ */ Object.freeze({
|
|
1838
|
-
__proto__: null,
|
|
1839
|
-
SelectedItemClick: bt,
|
|
1840
|
-
SelectedItemKeyDownDelete: xt,
|
|
1841
|
-
SelectedItemKeyDownBackspace: Ot,
|
|
1842
|
-
SelectedItemKeyDownNavigationNext: Ct,
|
|
1843
|
-
SelectedItemKeyDownNavigationPrevious: Dt,
|
|
1844
|
-
DropdownKeyDownNavigationPrevious: St,
|
|
1845
|
-
DropdownKeyDownBackspace: Nt,
|
|
1846
|
-
DropdownClick: Rt,
|
|
1847
|
-
FunctionAddSelectedItem: Mt,
|
|
1848
|
-
FunctionRemoveSelectedItem: Pt,
|
|
1849
|
-
FunctionSetSelectedItems: Vt,
|
|
1850
|
-
FunctionSetActiveIndex: kt,
|
|
1851
|
-
FunctionReset: Tt
|
|
1852
|
-
});
|
|
1853
|
-
function uo(t, n) {
|
|
1854
|
-
var r = n.type, i = n.index, o = n.props, e = n.selectedItem, s = t.activeIndex, u = t.selectedItems, c;
|
|
1855
|
-
switch (r) {
|
|
1856
|
-
case bt:
|
|
1857
|
-
c = {
|
|
1858
|
-
activeIndex: i
|
|
1859
|
-
};
|
|
1860
|
-
break;
|
|
1861
|
-
case Dt:
|
|
1862
|
-
c = {
|
|
1863
|
-
activeIndex: s - 1 < 0 ? 0 : s - 1
|
|
1864
|
-
};
|
|
1865
|
-
break;
|
|
1866
|
-
case Ct:
|
|
1867
|
-
c = {
|
|
1868
|
-
activeIndex: s + 1 >= u.length ? -1 : s + 1
|
|
1869
|
-
};
|
|
1870
|
-
break;
|
|
1871
|
-
case Ot:
|
|
1872
|
-
case xt: {
|
|
1873
|
-
if (s < 0)
|
|
1874
|
-
break;
|
|
1875
|
-
var a = s;
|
|
1876
|
-
u.length === 1 ? a = -1 : s === u.length - 1 && (a = u.length - 2), c = T({
|
|
1877
|
-
selectedItems: [].concat(u.slice(0, s), u.slice(s + 1))
|
|
1878
|
-
}, {
|
|
1879
|
-
activeIndex: a
|
|
1880
|
-
});
|
|
1881
|
-
break;
|
|
1882
|
-
}
|
|
1883
|
-
case St:
|
|
1884
|
-
c = {
|
|
1885
|
-
activeIndex: u.length - 1
|
|
1886
|
-
};
|
|
1887
|
-
break;
|
|
1888
|
-
case Nt:
|
|
1889
|
-
c = {
|
|
1890
|
-
selectedItems: u.slice(0, u.length - 1)
|
|
1891
|
-
};
|
|
1892
|
-
break;
|
|
1893
|
-
case Mt:
|
|
1894
|
-
c = {
|
|
1895
|
-
selectedItems: [].concat(u, [e])
|
|
1896
|
-
};
|
|
1897
|
-
break;
|
|
1898
|
-
case Rt:
|
|
1899
|
-
c = {
|
|
1900
|
-
activeIndex: -1
|
|
1901
|
-
};
|
|
1902
|
-
break;
|
|
1903
|
-
case Pt: {
|
|
1904
|
-
var l = s, m = u.findIndex(function(E) {
|
|
1905
|
-
return o.itemToKey(E) === o.itemToKey(e);
|
|
1906
|
-
});
|
|
1907
|
-
if (m < 0)
|
|
1908
|
-
break;
|
|
1909
|
-
u.length === 1 ? l = -1 : m === u.length - 1 && (l = u.length - 2), c = {
|
|
1910
|
-
selectedItems: [].concat(u.slice(0, m), u.slice(m + 1)),
|
|
1911
|
-
activeIndex: l
|
|
1912
|
-
};
|
|
1913
|
-
break;
|
|
1914
|
-
}
|
|
1915
|
-
case Vt: {
|
|
1916
|
-
var O = n.selectedItems;
|
|
1917
|
-
c = {
|
|
1918
|
-
selectedItems: O
|
|
1919
|
-
};
|
|
1920
|
-
break;
|
|
1921
|
-
}
|
|
1922
|
-
case kt: {
|
|
1923
|
-
var x = n.activeIndex;
|
|
1924
|
-
c = {
|
|
1925
|
-
activeIndex: x
|
|
1926
|
-
};
|
|
1927
|
-
break;
|
|
1928
|
-
}
|
|
1929
|
-
case Tt:
|
|
1930
|
-
c = {
|
|
1931
|
-
activeIndex: en(o, "activeIndex"),
|
|
1932
|
-
selectedItems: en(o, "selectedItems")
|
|
1933
|
-
};
|
|
1934
|
-
break;
|
|
1935
|
-
default:
|
|
1936
|
-
throw new Error("Reducer called without proper action type.");
|
|
1937
|
-
}
|
|
1938
|
-
return T({}, t, c);
|
|
1939
|
-
}
|
|
1940
|
-
var lo = ["refKey", "ref", "onClick", "onKeyDown", "selectedItem", "index"], ao = ["refKey", "ref", "onKeyDown", "onClick", "preventKeyAction"];
|
|
1941
|
-
ye.stateChangeTypes = so;
|
|
1942
|
-
function ye(t) {
|
|
1943
|
-
t === void 0 && (t = {}), qn(t, ye);
|
|
1944
|
-
var n = T({}, io, t), r = n.getA11yRemovalMessage, i = n.itemToString, o = n.environment, e = n.keyNavigationNext, s = n.keyNavigationPrevious, u = jr(uo, n, to, ro), c = u[0], a = u[1], l = c.activeIndex, m = c.selectedItems, O = Te(), x = ie(null), E = ie(m), R = ie();
|
|
1945
|
-
R.current = [];
|
|
1946
|
-
var h = ut({
|
|
1947
|
-
state: c,
|
|
1948
|
-
props: n
|
|
1949
|
-
});
|
|
1950
|
-
ue(function() {
|
|
1951
|
-
if (!(O || !(o != null && o.document))) {
|
|
1952
|
-
if (m.length < E.current.length) {
|
|
1953
|
-
var w = E.current.find(function(S) {
|
|
1954
|
-
return m.findIndex(function(k) {
|
|
1955
|
-
return n.itemToKey(k) === n.itemToKey(S);
|
|
1956
|
-
}) < 0;
|
|
1957
|
-
});
|
|
1958
|
-
it(r({
|
|
1959
|
-
itemToString: i,
|
|
1960
|
-
resultCount: m.length,
|
|
1961
|
-
removedSelectedItem: w,
|
|
1962
|
-
activeIndex: l,
|
|
1963
|
-
activeSelectedItem: m[l]
|
|
1964
|
-
}), o.document);
|
|
1965
|
-
}
|
|
1966
|
-
E.current = m;
|
|
1967
|
-
}
|
|
1968
|
-
}, [m.length]), ue(function() {
|
|
1969
|
-
O || (l === -1 && x.current ? x.current.focus() : R.current[l] && R.current[l].focus());
|
|
1970
|
-
}, [l]), at({
|
|
1971
|
-
props: n,
|
|
1972
|
-
state: c
|
|
1973
|
-
});
|
|
1974
|
-
var $ = lt("getDropdownProps"), d = Qe(function() {
|
|
1975
|
-
var w;
|
|
1976
|
-
return w = {}, w[s] = function() {
|
|
1977
|
-
a({
|
|
1978
|
-
type: Dt
|
|
1979
|
-
});
|
|
1980
|
-
}, w[e] = function() {
|
|
1981
|
-
a({
|
|
1982
|
-
type: Ct
|
|
1983
|
-
});
|
|
1984
|
-
}, w.Delete = function() {
|
|
1985
|
-
a({
|
|
1986
|
-
type: xt
|
|
1987
|
-
});
|
|
1988
|
-
}, w.Backspace = function() {
|
|
1989
|
-
a({
|
|
1990
|
-
type: Ot
|
|
1991
|
-
});
|
|
1992
|
-
}, w;
|
|
1993
|
-
}, [a, e, s]), f = Qe(function() {
|
|
1994
|
-
var w;
|
|
1995
|
-
return w = {}, w[s] = function(S) {
|
|
1996
|
-
tn(S) && a({
|
|
1997
|
-
type: St
|
|
1998
|
-
});
|
|
1999
|
-
}, w.Backspace = function(k) {
|
|
2000
|
-
tn(k) && a({
|
|
2001
|
-
type: Nt
|
|
2002
|
-
});
|
|
2003
|
-
}, w;
|
|
2004
|
-
}, [a, s]), p = X(function(w) {
|
|
2005
|
-
var S, k = w === void 0 ? {} : w, H = k.refKey, q = H === void 0 ? "ref" : H, Y = k.ref, K = k.onClick, ee = k.onKeyDown, re = k.selectedItem, N = k.index, z = fe(k, lo), G = h.current.state, se = Rn(re, N, G.selectedItems, "Pass either item or index to getSelectedItemProps!"), D = se[1], C = D > -1 && D === G.activeIndex, v = function() {
|
|
2006
|
-
a({
|
|
2007
|
-
type: bt,
|
|
2008
|
-
index: D
|
|
2009
|
-
});
|
|
2010
|
-
}, M = function(B) {
|
|
2011
|
-
var F = ke(B);
|
|
2012
|
-
F && d[F] && d[F](B);
|
|
2013
|
-
};
|
|
2014
|
-
return T((S = {}, S[q] = Ee(Y, function(L) {
|
|
2015
|
-
L && R.current.push(L);
|
|
2016
|
-
}), S.tabIndex = C ? 0 : -1, S.onClick = Q(K, v), S.onKeyDown = Q(ee, M), S), z);
|
|
2017
|
-
}, [a, h, d]), _ = X(function(w, S) {
|
|
2018
|
-
var k, H = w === void 0 ? {} : w, q = H.refKey, Y = q === void 0 ? "ref" : q, K = H.ref, ee = H.onKeyDown, re = H.onClick, N = H.preventKeyAction, z = N === void 0 ? !1 : N, G = fe(H, ao), se = S === void 0 ? {} : S, D = se.suppressRefError, C = D === void 0 ? !1 : D;
|
|
2019
|
-
$("getDropdownProps", C, Y, x);
|
|
2020
|
-
var v = function(B) {
|
|
2021
|
-
var F = ke(B);
|
|
2022
|
-
F && f[F] && f[F](B);
|
|
2023
|
-
}, M = function() {
|
|
2024
|
-
a({
|
|
2025
|
-
type: Rt
|
|
2026
|
-
});
|
|
2027
|
-
};
|
|
2028
|
-
return T((k = {}, k[Y] = Ee(K, function(L) {
|
|
2029
|
-
L && (x.current = L);
|
|
2030
|
-
}), k), !z && {
|
|
2031
|
-
onKeyDown: Q(ee, v),
|
|
2032
|
-
onClick: Q(re, M)
|
|
2033
|
-
}, G);
|
|
2034
|
-
}, [a, f, $]), y = X(function(w) {
|
|
2035
|
-
a({
|
|
2036
|
-
type: Mt,
|
|
2037
|
-
selectedItem: w
|
|
2038
|
-
});
|
|
2039
|
-
}, [a]), V = X(function(w) {
|
|
2040
|
-
a({
|
|
2041
|
-
type: Pt,
|
|
2042
|
-
selectedItem: w
|
|
2043
|
-
});
|
|
2044
|
-
}, [a]), b = X(function(w) {
|
|
2045
|
-
a({
|
|
2046
|
-
type: Vt,
|
|
2047
|
-
selectedItems: w
|
|
2048
|
-
});
|
|
2049
|
-
}, [a]), A = X(function(w) {
|
|
2050
|
-
a({
|
|
2051
|
-
type: kt,
|
|
2052
|
-
activeIndex: w
|
|
2053
|
-
});
|
|
2054
|
-
}, [a]), P = X(function() {
|
|
2055
|
-
a({
|
|
2056
|
-
type: Tt
|
|
2057
|
-
});
|
|
2058
|
-
}, [a]);
|
|
2059
|
-
return {
|
|
2060
|
-
getSelectedItemProps: p,
|
|
2061
|
-
getDropdownProps: _,
|
|
2062
|
-
addSelectedItem: y,
|
|
2063
|
-
removeSelectedItem: V,
|
|
2064
|
-
setSelectedItems: b,
|
|
2065
|
-
setActiveIndex: A,
|
|
2066
|
-
reset: P,
|
|
2067
|
-
selectedItems: m,
|
|
2068
|
-
activeIndex: l
|
|
2069
|
-
};
|
|
2070
|
-
}
|
|
2071
|
-
var ze = { exports: {} }, Yn = {
|
|
2072
|
-
À: "A",
|
|
2073
|
-
Á: "A",
|
|
2074
|
-
Â: "A",
|
|
2075
|
-
Ã: "A",
|
|
2076
|
-
Ä: "A",
|
|
2077
|
-
Å: "A",
|
|
2078
|
-
Ấ: "A",
|
|
2079
|
-
Ắ: "A",
|
|
2080
|
-
Ẳ: "A",
|
|
2081
|
-
Ẵ: "A",
|
|
2082
|
-
Ặ: "A",
|
|
2083
|
-
Æ: "AE",
|
|
2084
|
-
Ầ: "A",
|
|
2085
|
-
Ằ: "A",
|
|
2086
|
-
Ȃ: "A",
|
|
2087
|
-
Ả: "A",
|
|
2088
|
-
Ạ: "A",
|
|
2089
|
-
Ẩ: "A",
|
|
2090
|
-
Ẫ: "A",
|
|
2091
|
-
Ậ: "A",
|
|
2092
|
-
Ç: "C",
|
|
2093
|
-
Ḉ: "C",
|
|
2094
|
-
È: "E",
|
|
2095
|
-
É: "E",
|
|
2096
|
-
Ê: "E",
|
|
2097
|
-
Ë: "E",
|
|
2098
|
-
Ế: "E",
|
|
2099
|
-
Ḗ: "E",
|
|
2100
|
-
Ề: "E",
|
|
2101
|
-
Ḕ: "E",
|
|
2102
|
-
Ḝ: "E",
|
|
2103
|
-
Ȇ: "E",
|
|
2104
|
-
Ẻ: "E",
|
|
2105
|
-
Ẽ: "E",
|
|
2106
|
-
Ẹ: "E",
|
|
2107
|
-
Ể: "E",
|
|
2108
|
-
Ễ: "E",
|
|
2109
|
-
Ệ: "E",
|
|
2110
|
-
Ì: "I",
|
|
2111
|
-
Í: "I",
|
|
2112
|
-
Î: "I",
|
|
2113
|
-
Ï: "I",
|
|
2114
|
-
Ḯ: "I",
|
|
2115
|
-
Ȋ: "I",
|
|
2116
|
-
Ỉ: "I",
|
|
2117
|
-
Ị: "I",
|
|
2118
|
-
Ð: "D",
|
|
2119
|
-
Ñ: "N",
|
|
2120
|
-
Ò: "O",
|
|
2121
|
-
Ó: "O",
|
|
2122
|
-
Ô: "O",
|
|
2123
|
-
Õ: "O",
|
|
2124
|
-
Ö: "O",
|
|
2125
|
-
Ø: "O",
|
|
2126
|
-
Ố: "O",
|
|
2127
|
-
Ṍ: "O",
|
|
2128
|
-
Ṓ: "O",
|
|
2129
|
-
Ȏ: "O",
|
|
2130
|
-
Ỏ: "O",
|
|
2131
|
-
Ọ: "O",
|
|
2132
|
-
Ổ: "O",
|
|
2133
|
-
Ỗ: "O",
|
|
2134
|
-
Ộ: "O",
|
|
2135
|
-
Ờ: "O",
|
|
2136
|
-
Ở: "O",
|
|
2137
|
-
Ỡ: "O",
|
|
2138
|
-
Ớ: "O",
|
|
2139
|
-
Ợ: "O",
|
|
2140
|
-
Ù: "U",
|
|
2141
|
-
Ú: "U",
|
|
2142
|
-
Û: "U",
|
|
2143
|
-
Ü: "U",
|
|
2144
|
-
Ủ: "U",
|
|
2145
|
-
Ụ: "U",
|
|
2146
|
-
Ử: "U",
|
|
2147
|
-
Ữ: "U",
|
|
2148
|
-
Ự: "U",
|
|
2149
|
-
Ý: "Y",
|
|
2150
|
-
à: "a",
|
|
2151
|
-
á: "a",
|
|
2152
|
-
â: "a",
|
|
2153
|
-
ã: "a",
|
|
2154
|
-
ä: "a",
|
|
2155
|
-
å: "a",
|
|
2156
|
-
ấ: "a",
|
|
2157
|
-
ắ: "a",
|
|
2158
|
-
ẳ: "a",
|
|
2159
|
-
ẵ: "a",
|
|
2160
|
-
ặ: "a",
|
|
2161
|
-
æ: "ae",
|
|
2162
|
-
ầ: "a",
|
|
2163
|
-
ằ: "a",
|
|
2164
|
-
ȃ: "a",
|
|
2165
|
-
ả: "a",
|
|
2166
|
-
ạ: "a",
|
|
2167
|
-
ẩ: "a",
|
|
2168
|
-
ẫ: "a",
|
|
2169
|
-
ậ: "a",
|
|
2170
|
-
ç: "c",
|
|
2171
|
-
ḉ: "c",
|
|
2172
|
-
è: "e",
|
|
2173
|
-
é: "e",
|
|
2174
|
-
ê: "e",
|
|
2175
|
-
ë: "e",
|
|
2176
|
-
ế: "e",
|
|
2177
|
-
ḗ: "e",
|
|
2178
|
-
ề: "e",
|
|
2179
|
-
ḕ: "e",
|
|
2180
|
-
ḝ: "e",
|
|
2181
|
-
ȇ: "e",
|
|
2182
|
-
ẻ: "e",
|
|
2183
|
-
ẽ: "e",
|
|
2184
|
-
ẹ: "e",
|
|
2185
|
-
ể: "e",
|
|
2186
|
-
ễ: "e",
|
|
2187
|
-
ệ: "e",
|
|
2188
|
-
ì: "i",
|
|
2189
|
-
í: "i",
|
|
2190
|
-
î: "i",
|
|
2191
|
-
ï: "i",
|
|
2192
|
-
ḯ: "i",
|
|
2193
|
-
ȋ: "i",
|
|
2194
|
-
ỉ: "i",
|
|
2195
|
-
ị: "i",
|
|
2196
|
-
ð: "d",
|
|
2197
|
-
ñ: "n",
|
|
2198
|
-
ò: "o",
|
|
2199
|
-
ó: "o",
|
|
2200
|
-
ô: "o",
|
|
2201
|
-
õ: "o",
|
|
2202
|
-
ö: "o",
|
|
2203
|
-
ø: "o",
|
|
2204
|
-
ố: "o",
|
|
2205
|
-
ṍ: "o",
|
|
2206
|
-
ṓ: "o",
|
|
2207
|
-
ȏ: "o",
|
|
2208
|
-
ỏ: "o",
|
|
2209
|
-
ọ: "o",
|
|
2210
|
-
ổ: "o",
|
|
2211
|
-
ỗ: "o",
|
|
2212
|
-
ộ: "o",
|
|
2213
|
-
ờ: "o",
|
|
2214
|
-
ở: "o",
|
|
2215
|
-
ỡ: "o",
|
|
2216
|
-
ớ: "o",
|
|
2217
|
-
ợ: "o",
|
|
2218
|
-
ù: "u",
|
|
2219
|
-
ú: "u",
|
|
2220
|
-
û: "u",
|
|
2221
|
-
ü: "u",
|
|
2222
|
-
ủ: "u",
|
|
2223
|
-
ụ: "u",
|
|
2224
|
-
ử: "u",
|
|
2225
|
-
ữ: "u",
|
|
2226
|
-
ự: "u",
|
|
2227
|
-
ý: "y",
|
|
2228
|
-
ÿ: "y",
|
|
2229
|
-
Ā: "A",
|
|
2230
|
-
ā: "a",
|
|
2231
|
-
Ă: "A",
|
|
2232
|
-
ă: "a",
|
|
2233
|
-
Ą: "A",
|
|
2234
|
-
ą: "a",
|
|
2235
|
-
Ć: "C",
|
|
2236
|
-
ć: "c",
|
|
2237
|
-
Ĉ: "C",
|
|
2238
|
-
ĉ: "c",
|
|
2239
|
-
Ċ: "C",
|
|
2240
|
-
ċ: "c",
|
|
2241
|
-
Č: "C",
|
|
2242
|
-
č: "c",
|
|
2243
|
-
C̆: "C",
|
|
2244
|
-
c̆: "c",
|
|
2245
|
-
Ď: "D",
|
|
2246
|
-
ď: "d",
|
|
2247
|
-
Đ: "D",
|
|
2248
|
-
đ: "d",
|
|
2249
|
-
Ē: "E",
|
|
2250
|
-
ē: "e",
|
|
2251
|
-
Ĕ: "E",
|
|
2252
|
-
ĕ: "e",
|
|
2253
|
-
Ė: "E",
|
|
2254
|
-
ė: "e",
|
|
2255
|
-
Ę: "E",
|
|
2256
|
-
ę: "e",
|
|
2257
|
-
Ě: "E",
|
|
2258
|
-
ě: "e",
|
|
2259
|
-
Ĝ: "G",
|
|
2260
|
-
Ǵ: "G",
|
|
2261
|
-
ĝ: "g",
|
|
2262
|
-
ǵ: "g",
|
|
2263
|
-
Ğ: "G",
|
|
2264
|
-
ğ: "g",
|
|
2265
|
-
Ġ: "G",
|
|
2266
|
-
ġ: "g",
|
|
2267
|
-
Ģ: "G",
|
|
2268
|
-
ģ: "g",
|
|
2269
|
-
Ĥ: "H",
|
|
2270
|
-
ĥ: "h",
|
|
2271
|
-
Ħ: "H",
|
|
2272
|
-
ħ: "h",
|
|
2273
|
-
Ḫ: "H",
|
|
2274
|
-
ḫ: "h",
|
|
2275
|
-
Ĩ: "I",
|
|
2276
|
-
ĩ: "i",
|
|
2277
|
-
Ī: "I",
|
|
2278
|
-
ī: "i",
|
|
2279
|
-
Ĭ: "I",
|
|
2280
|
-
ĭ: "i",
|
|
2281
|
-
Į: "I",
|
|
2282
|
-
į: "i",
|
|
2283
|
-
İ: "I",
|
|
2284
|
-
ı: "i",
|
|
2285
|
-
IJ: "IJ",
|
|
2286
|
-
ij: "ij",
|
|
2287
|
-
Ĵ: "J",
|
|
2288
|
-
ĵ: "j",
|
|
2289
|
-
Ķ: "K",
|
|
2290
|
-
ķ: "k",
|
|
2291
|
-
Ḱ: "K",
|
|
2292
|
-
ḱ: "k",
|
|
2293
|
-
K̆: "K",
|
|
2294
|
-
k̆: "k",
|
|
2295
|
-
Ĺ: "L",
|
|
2296
|
-
ĺ: "l",
|
|
2297
|
-
Ļ: "L",
|
|
2298
|
-
ļ: "l",
|
|
2299
|
-
Ľ: "L",
|
|
2300
|
-
ľ: "l",
|
|
2301
|
-
Ŀ: "L",
|
|
2302
|
-
ŀ: "l",
|
|
2303
|
-
Ł: "l",
|
|
2304
|
-
ł: "l",
|
|
2305
|
-
Ḿ: "M",
|
|
2306
|
-
ḿ: "m",
|
|
2307
|
-
M̆: "M",
|
|
2308
|
-
m̆: "m",
|
|
2309
|
-
Ń: "N",
|
|
2310
|
-
ń: "n",
|
|
2311
|
-
Ņ: "N",
|
|
2312
|
-
ņ: "n",
|
|
2313
|
-
Ň: "N",
|
|
2314
|
-
ň: "n",
|
|
2315
|
-
ʼn: "n",
|
|
2316
|
-
N̆: "N",
|
|
2317
|
-
n̆: "n",
|
|
2318
|
-
Ō: "O",
|
|
2319
|
-
ō: "o",
|
|
2320
|
-
Ŏ: "O",
|
|
2321
|
-
ŏ: "o",
|
|
2322
|
-
Ő: "O",
|
|
2323
|
-
ő: "o",
|
|
2324
|
-
Œ: "OE",
|
|
2325
|
-
œ: "oe",
|
|
2326
|
-
P̆: "P",
|
|
2327
|
-
p̆: "p",
|
|
2328
|
-
Ŕ: "R",
|
|
2329
|
-
ŕ: "r",
|
|
2330
|
-
Ŗ: "R",
|
|
2331
|
-
ŗ: "r",
|
|
2332
|
-
Ř: "R",
|
|
2333
|
-
ř: "r",
|
|
2334
|
-
R̆: "R",
|
|
2335
|
-
r̆: "r",
|
|
2336
|
-
Ȓ: "R",
|
|
2337
|
-
ȓ: "r",
|
|
2338
|
-
Ś: "S",
|
|
2339
|
-
ś: "s",
|
|
2340
|
-
Ŝ: "S",
|
|
2341
|
-
ŝ: "s",
|
|
2342
|
-
Ş: "S",
|
|
2343
|
-
Ș: "S",
|
|
2344
|
-
ș: "s",
|
|
2345
|
-
ş: "s",
|
|
2346
|
-
Š: "S",
|
|
2347
|
-
š: "s",
|
|
2348
|
-
Ţ: "T",
|
|
2349
|
-
ţ: "t",
|
|
2350
|
-
ț: "t",
|
|
2351
|
-
Ț: "T",
|
|
2352
|
-
Ť: "T",
|
|
2353
|
-
ť: "t",
|
|
2354
|
-
Ŧ: "T",
|
|
2355
|
-
ŧ: "t",
|
|
2356
|
-
T̆: "T",
|
|
2357
|
-
t̆: "t",
|
|
2358
|
-
Ũ: "U",
|
|
2359
|
-
ũ: "u",
|
|
2360
|
-
Ū: "U",
|
|
2361
|
-
ū: "u",
|
|
2362
|
-
Ŭ: "U",
|
|
2363
|
-
ŭ: "u",
|
|
2364
|
-
Ů: "U",
|
|
2365
|
-
ů: "u",
|
|
2366
|
-
Ű: "U",
|
|
2367
|
-
ű: "u",
|
|
2368
|
-
Ų: "U",
|
|
2369
|
-
ų: "u",
|
|
2370
|
-
Ȗ: "U",
|
|
2371
|
-
ȗ: "u",
|
|
2372
|
-
V̆: "V",
|
|
2373
|
-
v̆: "v",
|
|
2374
|
-
Ŵ: "W",
|
|
2375
|
-
ŵ: "w",
|
|
2376
|
-
Ẃ: "W",
|
|
2377
|
-
ẃ: "w",
|
|
2378
|
-
X̆: "X",
|
|
2379
|
-
x̆: "x",
|
|
2380
|
-
Ŷ: "Y",
|
|
2381
|
-
ŷ: "y",
|
|
2382
|
-
Ÿ: "Y",
|
|
2383
|
-
Y̆: "Y",
|
|
2384
|
-
y̆: "y",
|
|
2385
|
-
Ź: "Z",
|
|
2386
|
-
ź: "z",
|
|
2387
|
-
Ż: "Z",
|
|
2388
|
-
ż: "z",
|
|
2389
|
-
Ž: "Z",
|
|
2390
|
-
ž: "z",
|
|
2391
|
-
ſ: "s",
|
|
2392
|
-
ƒ: "f",
|
|
2393
|
-
Ơ: "O",
|
|
2394
|
-
ơ: "o",
|
|
2395
|
-
Ư: "U",
|
|
2396
|
-
ư: "u",
|
|
2397
|
-
Ǎ: "A",
|
|
2398
|
-
ǎ: "a",
|
|
2399
|
-
Ǐ: "I",
|
|
2400
|
-
ǐ: "i",
|
|
2401
|
-
Ǒ: "O",
|
|
2402
|
-
ǒ: "o",
|
|
2403
|
-
Ǔ: "U",
|
|
2404
|
-
ǔ: "u",
|
|
2405
|
-
Ǖ: "U",
|
|
2406
|
-
ǖ: "u",
|
|
2407
|
-
Ǘ: "U",
|
|
2408
|
-
ǘ: "u",
|
|
2409
|
-
Ǚ: "U",
|
|
2410
|
-
ǚ: "u",
|
|
2411
|
-
Ǜ: "U",
|
|
2412
|
-
ǜ: "u",
|
|
2413
|
-
Ứ: "U",
|
|
2414
|
-
ứ: "u",
|
|
2415
|
-
Ṹ: "U",
|
|
2416
|
-
ṹ: "u",
|
|
2417
|
-
Ǻ: "A",
|
|
2418
|
-
ǻ: "a",
|
|
2419
|
-
Ǽ: "AE",
|
|
2420
|
-
ǽ: "ae",
|
|
2421
|
-
Ǿ: "O",
|
|
2422
|
-
ǿ: "o",
|
|
2423
|
-
Þ: "TH",
|
|
2424
|
-
þ: "th",
|
|
2425
|
-
Ṕ: "P",
|
|
2426
|
-
ṕ: "p",
|
|
2427
|
-
Ṥ: "S",
|
|
2428
|
-
ṥ: "s",
|
|
2429
|
-
X́: "X",
|
|
2430
|
-
x́: "x",
|
|
2431
|
-
Ѓ: "Г",
|
|
2432
|
-
ѓ: "г",
|
|
2433
|
-
Ќ: "К",
|
|
2434
|
-
ќ: "к",
|
|
2435
|
-
A̋: "A",
|
|
2436
|
-
a̋: "a",
|
|
2437
|
-
E̋: "E",
|
|
2438
|
-
e̋: "e",
|
|
2439
|
-
I̋: "I",
|
|
2440
|
-
i̋: "i",
|
|
2441
|
-
Ǹ: "N",
|
|
2442
|
-
ǹ: "n",
|
|
2443
|
-
Ồ: "O",
|
|
2444
|
-
ồ: "o",
|
|
2445
|
-
Ṑ: "O",
|
|
2446
|
-
ṑ: "o",
|
|
2447
|
-
Ừ: "U",
|
|
2448
|
-
ừ: "u",
|
|
2449
|
-
Ẁ: "W",
|
|
2450
|
-
ẁ: "w",
|
|
2451
|
-
Ỳ: "Y",
|
|
2452
|
-
ỳ: "y",
|
|
2453
|
-
Ȁ: "A",
|
|
2454
|
-
ȁ: "a",
|
|
2455
|
-
Ȅ: "E",
|
|
2456
|
-
ȅ: "e",
|
|
2457
|
-
Ȉ: "I",
|
|
2458
|
-
ȉ: "i",
|
|
2459
|
-
Ȍ: "O",
|
|
2460
|
-
ȍ: "o",
|
|
2461
|
-
Ȑ: "R",
|
|
2462
|
-
ȑ: "r",
|
|
2463
|
-
Ȕ: "U",
|
|
2464
|
-
ȕ: "u",
|
|
2465
|
-
B̌: "B",
|
|
2466
|
-
b̌: "b",
|
|
2467
|
-
Č̣: "C",
|
|
2468
|
-
č̣: "c",
|
|
2469
|
-
Ê̌: "E",
|
|
2470
|
-
ê̌: "e",
|
|
2471
|
-
F̌: "F",
|
|
2472
|
-
f̌: "f",
|
|
2473
|
-
Ǧ: "G",
|
|
2474
|
-
ǧ: "g",
|
|
2475
|
-
Ȟ: "H",
|
|
2476
|
-
ȟ: "h",
|
|
2477
|
-
J̌: "J",
|
|
2478
|
-
ǰ: "j",
|
|
2479
|
-
Ǩ: "K",
|
|
2480
|
-
ǩ: "k",
|
|
2481
|
-
M̌: "M",
|
|
2482
|
-
m̌: "m",
|
|
2483
|
-
P̌: "P",
|
|
2484
|
-
p̌: "p",
|
|
2485
|
-
Q̌: "Q",
|
|
2486
|
-
q̌: "q",
|
|
2487
|
-
Ř̩: "R",
|
|
2488
|
-
ř̩: "r",
|
|
2489
|
-
Ṧ: "S",
|
|
2490
|
-
ṧ: "s",
|
|
2491
|
-
V̌: "V",
|
|
2492
|
-
v̌: "v",
|
|
2493
|
-
W̌: "W",
|
|
2494
|
-
w̌: "w",
|
|
2495
|
-
X̌: "X",
|
|
2496
|
-
x̌: "x",
|
|
2497
|
-
Y̌: "Y",
|
|
2498
|
-
y̌: "y",
|
|
2499
|
-
A̧: "A",
|
|
2500
|
-
a̧: "a",
|
|
2501
|
-
B̧: "B",
|
|
2502
|
-
b̧: "b",
|
|
2503
|
-
Ḑ: "D",
|
|
2504
|
-
ḑ: "d",
|
|
2505
|
-
Ȩ: "E",
|
|
2506
|
-
ȩ: "e",
|
|
2507
|
-
Ɛ̧: "E",
|
|
2508
|
-
ɛ̧: "e",
|
|
2509
|
-
Ḩ: "H",
|
|
2510
|
-
ḩ: "h",
|
|
2511
|
-
I̧: "I",
|
|
2512
|
-
i̧: "i",
|
|
2513
|
-
Ɨ̧: "I",
|
|
2514
|
-
ɨ̧: "i",
|
|
2515
|
-
M̧: "M",
|
|
2516
|
-
m̧: "m",
|
|
2517
|
-
O̧: "O",
|
|
2518
|
-
o̧: "o",
|
|
2519
|
-
Q̧: "Q",
|
|
2520
|
-
q̧: "q",
|
|
2521
|
-
U̧: "U",
|
|
2522
|
-
u̧: "u",
|
|
2523
|
-
X̧: "X",
|
|
2524
|
-
x̧: "x",
|
|
2525
|
-
Z̧: "Z",
|
|
2526
|
-
z̧: "z",
|
|
2527
|
-
й: "и",
|
|
2528
|
-
Й: "И",
|
|
2529
|
-
ё: "е",
|
|
2530
|
-
Ё: "Е"
|
|
2531
|
-
}, zn = Object.keys(Yn).join("|"), co = new RegExp(zn, "g"), po = new RegExp(zn, "");
|
|
2532
|
-
function fo(t) {
|
|
2533
|
-
return Yn[t];
|
|
2534
|
-
}
|
|
2535
|
-
var Gn = function(t) {
|
|
2536
|
-
return t.replace(co, fo);
|
|
2537
|
-
}, go = function(t) {
|
|
2538
|
-
return !!t.match(po);
|
|
2539
|
-
};
|
|
2540
|
-
ze.exports = Gn;
|
|
2541
|
-
ze.exports.has = go;
|
|
2542
|
-
ze.exports.remove = Gn;
|
|
2543
|
-
var ho = ze.exports;
|
|
2544
|
-
const mo = /* @__PURE__ */ rr(ho);
|
|
2545
|
-
/**
|
|
2546
|
-
* @name match-sorter
|
|
2547
|
-
* @license MIT license.
|
|
2548
|
-
* @copyright (c) 2020 Kent C. Dodds
|
|
2549
|
-
* @author Kent C. Dodds <me@kentcdodds.com> (https://kentcdodds.com)
|
|
2550
|
-
*/
|
|
2551
|
-
const ae = {
|
|
2552
|
-
CASE_SENSITIVE_EQUAL: 7,
|
|
2553
|
-
EQUAL: 6,
|
|
2554
|
-
STARTS_WITH: 5,
|
|
2555
|
-
WORD_STARTS_WITH: 4,
|
|
2556
|
-
CONTAINS: 3,
|
|
2557
|
-
ACRONYM: 2,
|
|
2558
|
-
MATCHES: 1,
|
|
2559
|
-
NO_MATCH: 0
|
|
2560
|
-
}, vo = (t, n) => String(t.rankedValue).localeCompare(String(n.rankedValue));
|
|
2561
|
-
function At(t, n, r) {
|
|
2562
|
-
r === void 0 && (r = {});
|
|
2563
|
-
const {
|
|
2564
|
-
keys: i,
|
|
2565
|
-
threshold: o = ae.MATCHES,
|
|
2566
|
-
baseSort: e = vo,
|
|
2567
|
-
sorter: s = (a) => a.sort((l, m) => Eo(l, m, e))
|
|
2568
|
-
} = r, u = t.reduce(c, []);
|
|
2569
|
-
return s(u).map((a) => {
|
|
2570
|
-
let {
|
|
2571
|
-
item: l
|
|
2572
|
-
} = a;
|
|
2573
|
-
return l;
|
|
2574
|
-
});
|
|
2575
|
-
function c(a, l, m) {
|
|
2576
|
-
const O = Io(l, i, n, r), {
|
|
2577
|
-
rank: x,
|
|
2578
|
-
keyThreshold: E = o
|
|
2579
|
-
} = O;
|
|
2580
|
-
return x >= E && a.push({
|
|
2581
|
-
...O,
|
|
2582
|
-
item: l,
|
|
2583
|
-
index: m
|
|
2584
|
-
}), a;
|
|
2585
|
-
}
|
|
2586
|
-
}
|
|
2587
|
-
At.rankings = ae;
|
|
2588
|
-
function Io(t, n, r, i) {
|
|
2589
|
-
if (!n) {
|
|
2590
|
-
const e = t;
|
|
2591
|
-
return {
|
|
2592
|
-
// ends up being duplicate of 'item' in matches but consistent
|
|
2593
|
-
rankedValue: e,
|
|
2594
|
-
rank: nn(e, r, i),
|
|
2595
|
-
keyIndex: -1,
|
|
2596
|
-
keyThreshold: i.threshold
|
|
2597
|
-
};
|
|
2598
|
-
}
|
|
2599
|
-
return xo(t, n).reduce((e, s, u) => {
|
|
2600
|
-
let {
|
|
2601
|
-
rank: c,
|
|
2602
|
-
rankedValue: a,
|
|
2603
|
-
keyIndex: l,
|
|
2604
|
-
keyThreshold: m
|
|
2605
|
-
} = e, {
|
|
2606
|
-
itemValue: O,
|
|
2607
|
-
attributes: x
|
|
2608
|
-
} = s, E = nn(O, r, i), R = a;
|
|
2609
|
-
const {
|
|
2610
|
-
minRanking: h,
|
|
2611
|
-
maxRanking: $,
|
|
2612
|
-
threshold: d
|
|
2613
|
-
} = x;
|
|
2614
|
-
return E < h && E >= ae.MATCHES ? E = h : E > $ && (E = $), E > c && (c = E, l = u, m = d, R = O), {
|
|
2615
|
-
rankedValue: R,
|
|
2616
|
-
rank: c,
|
|
2617
|
-
keyIndex: l,
|
|
2618
|
-
keyThreshold: m
|
|
2619
|
-
};
|
|
2620
|
-
}, {
|
|
2621
|
-
rankedValue: t,
|
|
2622
|
-
rank: ae.NO_MATCH,
|
|
2623
|
-
keyIndex: -1,
|
|
2624
|
-
keyThreshold: i.threshold
|
|
2625
|
-
});
|
|
2626
|
-
}
|
|
2627
|
-
function nn(t, n, r) {
|
|
2628
|
-
return t = rn(t, r), n = rn(n, r), n.length > t.length ? ae.NO_MATCH : t === n ? ae.CASE_SENSITIVE_EQUAL : (t = t.toLowerCase(), n = n.toLowerCase(), t === n ? ae.EQUAL : t.startsWith(n) ? ae.STARTS_WITH : t.includes(` ${n}`) ? ae.WORD_STARTS_WITH : t.includes(n) ? ae.CONTAINS : n.length === 1 ? ae.NO_MATCH : _o(t).includes(n) ? ae.ACRONYM : yo(t, n));
|
|
2629
|
-
}
|
|
2630
|
-
function _o(t) {
|
|
2631
|
-
let n = "";
|
|
2632
|
-
return t.split(" ").forEach((i) => {
|
|
2633
|
-
i.split("-").forEach((e) => {
|
|
2634
|
-
n += e.substr(0, 1);
|
|
2635
|
-
});
|
|
2636
|
-
}), n;
|
|
2637
|
-
}
|
|
2638
|
-
function yo(t, n) {
|
|
2639
|
-
let r = 0, i = 0;
|
|
2640
|
-
function o(c, a, l) {
|
|
2641
|
-
for (let m = l, O = a.length; m < O; m++)
|
|
2642
|
-
if (a[m] === c)
|
|
2643
|
-
return r += 1, m + 1;
|
|
2644
|
-
return -1;
|
|
2645
|
-
}
|
|
2646
|
-
function e(c) {
|
|
2647
|
-
const a = 1 / c, l = r / n.length;
|
|
2648
|
-
return ae.MATCHES + l * a;
|
|
2649
|
-
}
|
|
2650
|
-
const s = o(n[0], t, 0);
|
|
2651
|
-
if (s < 0)
|
|
2652
|
-
return ae.NO_MATCH;
|
|
2653
|
-
i = s;
|
|
2654
|
-
for (let c = 1, a = n.length; c < a; c++) {
|
|
2655
|
-
const l = n[c];
|
|
2656
|
-
if (i = o(l, t, i), !(i > -1))
|
|
2657
|
-
return ae.NO_MATCH;
|
|
2658
|
-
}
|
|
2659
|
-
const u = i - s;
|
|
2660
|
-
return e(u);
|
|
2661
|
-
}
|
|
2662
|
-
function Eo(t, n, r) {
|
|
2663
|
-
const {
|
|
2664
|
-
rank: e,
|
|
2665
|
-
keyIndex: s
|
|
2666
|
-
} = t, {
|
|
2667
|
-
rank: u,
|
|
2668
|
-
keyIndex: c
|
|
2669
|
-
} = n;
|
|
2670
|
-
return e === u ? s === c ? r(t, n) : s < c ? -1 : 1 : e > u ? -1 : 1;
|
|
2671
|
-
}
|
|
2672
|
-
function rn(t, n) {
|
|
2673
|
-
let {
|
|
2674
|
-
keepDiacritics: r
|
|
2675
|
-
} = n;
|
|
2676
|
-
return t = `${t}`, r || (t = mo(t)), t;
|
|
2677
|
-
}
|
|
2678
|
-
function wo(t, n) {
|
|
2679
|
-
typeof n == "object" && (n = n.key);
|
|
2680
|
-
let r;
|
|
2681
|
-
if (typeof n == "function")
|
|
2682
|
-
r = n(t);
|
|
2683
|
-
else if (t == null)
|
|
2684
|
-
r = null;
|
|
2685
|
-
else if (Object.hasOwnProperty.call(t, n))
|
|
2686
|
-
r = t[n];
|
|
2687
|
-
else {
|
|
2688
|
-
if (n.includes("."))
|
|
2689
|
-
return bo(n, t);
|
|
2690
|
-
r = null;
|
|
2691
|
-
}
|
|
2692
|
-
return r == null ? [] : Array.isArray(r) ? r : [String(r)];
|
|
2693
|
-
}
|
|
2694
|
-
function bo(t, n) {
|
|
2695
|
-
const r = t.split(".");
|
|
2696
|
-
let i = [n];
|
|
2697
|
-
for (let o = 0, e = r.length; o < e; o++) {
|
|
2698
|
-
const s = r[o];
|
|
2699
|
-
let u = [];
|
|
2700
|
-
for (let c = 0, a = i.length; c < a; c++) {
|
|
2701
|
-
const l = i[c];
|
|
2702
|
-
if (l != null)
|
|
2703
|
-
if (Object.hasOwnProperty.call(l, s)) {
|
|
2704
|
-
const m = l[s];
|
|
2705
|
-
m != null && u.push(m);
|
|
2706
|
-
} else
|
|
2707
|
-
s === "*" && (u = u.concat(l));
|
|
2708
|
-
}
|
|
2709
|
-
i = u;
|
|
2710
|
-
}
|
|
2711
|
-
return Array.isArray(i[0]) ? [].concat(...i) : i;
|
|
2712
|
-
}
|
|
2713
|
-
function xo(t, n) {
|
|
2714
|
-
const r = [];
|
|
2715
|
-
for (let i = 0, o = n.length; i < o; i++) {
|
|
2716
|
-
const e = n[i], s = Oo(e), u = wo(t, e);
|
|
2717
|
-
for (let c = 0, a = u.length; c < a; c++)
|
|
2718
|
-
r.push({
|
|
2719
|
-
itemValue: u[c],
|
|
2720
|
-
attributes: s
|
|
2721
|
-
});
|
|
2722
|
-
}
|
|
2723
|
-
return r;
|
|
2724
|
-
}
|
|
2725
|
-
const on = {
|
|
2726
|
-
maxRanking: 1 / 0,
|
|
2727
|
-
minRanking: -1 / 0
|
|
2728
|
-
};
|
|
2729
|
-
function Oo(t) {
|
|
2730
|
-
return typeof t == "string" ? on : {
|
|
2731
|
-
...on,
|
|
2732
|
-
...t
|
|
2733
|
-
};
|
|
2734
|
-
}
|
|
2735
|
-
const Co = "_combobox_1jt3w_2", Do = "_input_1jt3w_30", So = "_error_1jt3w_61", No = "_small_1jt3w_86", Ro = "_large_1jt3w_89", Mo = "_disabled_1jt3w_113", Po = "_chip_1jt3w_162", Vo = "_prefix_1jt3w_217", ko = "_suffix_1jt3w_218", To = "_empty_1jt3w_260", J = {
|
|
2736
|
-
combobox: Co,
|
|
2737
|
-
"search-field": "_search-field_1jt3w_6",
|
|
2738
|
-
"popover-content": "_popover-content_1jt3w_21",
|
|
2739
|
-
"input-wrapper": "_input-wrapper_1jt3w_30",
|
|
2740
|
-
input: Do,
|
|
2741
|
-
error: So,
|
|
2742
|
-
"buttons-wrapper": "_buttons-wrapper_1jt3w_69",
|
|
2743
|
-
small: No,
|
|
2744
|
-
large: Ro,
|
|
2745
|
-
"close-button-wrapper": "_close-button-wrapper_1jt3w_93",
|
|
2746
|
-
"close-button": "_close-button_1jt3w_93",
|
|
2747
|
-
"loading-infinite": "_loading-infinite_1jt3w_113",
|
|
2748
|
-
"loading-progress": "_loading-progress_1jt3w_113",
|
|
2749
|
-
disabled: Mo,
|
|
2750
|
-
"toggle-button-wrapper": "_toggle-button-wrapper_1jt3w_117",
|
|
2751
|
-
"toggle-button": "_toggle-button_1jt3w_117",
|
|
2752
|
-
"rows-wrapper": "_rows-wrapper_1jt3w_151",
|
|
2753
|
-
"chip-wrapper": "_chip-wrapper_1jt3w_162",
|
|
2754
|
-
chip: Po,
|
|
2755
|
-
prefix: Vo,
|
|
2756
|
-
suffix: ko,
|
|
2757
|
-
"listview-option": "_listview-option_1jt3w_255",
|
|
2758
|
-
empty: To
|
|
2759
|
-
}, Ht = er(null), Ae = function() {
|
|
2760
|
-
const t = tr(
|
|
2761
|
-
Ht
|
|
2762
|
-
);
|
|
2763
|
-
if (t == null)
|
|
2764
|
-
throw new Error("useCombobox must be wrapped in <Combobox />");
|
|
2765
|
-
return t;
|
|
2766
|
-
}, Ao = function(t) {
|
|
2767
|
-
const { multiple: n = !1, ...r } = t;
|
|
2768
|
-
return n ? /* @__PURE__ */ j.jsx(Ko, { ...r }) : /* @__PURE__ */ j.jsx(Ho, { ...r });
|
|
2769
|
-
}, Ho = function(t) {
|
|
2770
|
-
const { layoutStyles: n, componentProps: r } = ln(t), {
|
|
2771
|
-
className: i,
|
|
2772
|
-
style: o,
|
|
2773
|
-
children: e,
|
|
2774
|
-
open: s,
|
|
2775
|
-
items: u,
|
|
2776
|
-
itemToString: c,
|
|
2777
|
-
onChange: a,
|
|
2778
|
-
onSelectedItemChange: l,
|
|
2779
|
-
disableCloseOnClickOutside: m = !1,
|
|
2780
|
-
filterOptions: O,
|
|
2781
|
-
...x
|
|
2782
|
-
} = r, [E, R] = le(u), [h, $] = le(!1), [d, f] = le(!1), [p, _] = le(!1), [y, V] = le([]);
|
|
2783
|
-
function b(N) {
|
|
2784
|
-
return c && N ? c(N) : N ? String(N) : "";
|
|
2785
|
-
}
|
|
2786
|
-
const {
|
|
2787
|
-
isOpen: A,
|
|
2788
|
-
getLabelProps: P,
|
|
2789
|
-
getInputProps: w,
|
|
2790
|
-
getToggleButtonProps: S,
|
|
2791
|
-
getMenuProps: k,
|
|
2792
|
-
getItemProps: H,
|
|
2793
|
-
highlightedIndex: q,
|
|
2794
|
-
selectedItem: Y,
|
|
2795
|
-
selectItem: K,
|
|
2796
|
-
setInputValue: ee,
|
|
2797
|
-
inputValue: re
|
|
2798
|
-
} = de({
|
|
2799
|
-
...x,
|
|
2800
|
-
items: E,
|
|
2801
|
-
itemToString(N) {
|
|
2802
|
-
return b(N);
|
|
2803
|
-
},
|
|
2804
|
-
onInputValueChange({ inputValue: N, type: z }) {
|
|
2805
|
-
z === de.stateChangeTypes.InputKeyDownEnter || z === de.stateChangeTypes.ItemClick ? R(u) : N != null && N !== "" ? R(At(u, N, O)) : R(u);
|
|
2806
|
-
},
|
|
2807
|
-
onSelectedItemChange({ selectedItem: N, ...z }) {
|
|
2808
|
-
a != null && a(N || null), l != null && l({ selectedItem: N, ...z });
|
|
2809
|
-
},
|
|
2810
|
-
onIsOpenChange({ isOpen: N, inputValue: z, selectedItem: G }) {
|
|
2811
|
-
N === !1 && z === "" ? K(null) : N === !1 && ee(G != null ? b(G) : "");
|
|
2812
|
-
},
|
|
2813
|
-
stateReducer(N, { type: z, changes: G }) {
|
|
2814
|
-
switch (z) {
|
|
2815
|
-
case de.stateChangeTypes.InputBlur:
|
|
2816
|
-
return m ? {
|
|
2817
|
-
...G,
|
|
2818
|
-
isOpen: N.isOpen,
|
|
2819
|
-
highlightedIndex: N.highlightedIndex
|
|
2820
|
-
} : G;
|
|
2821
|
-
default:
|
|
2822
|
-
return G;
|
|
2823
|
-
}
|
|
2824
|
-
},
|
|
2825
|
-
isItemDisabled(N) {
|
|
2826
|
-
return h || !!(N && N instanceof Object && "disabled" in N && N.disabled || N && N instanceof Object && "readOnly" in N && N.readOnly || y.includes(N));
|
|
2827
|
-
}
|
|
2828
|
-
});
|
|
2829
|
-
return /* @__PURE__ */ j.jsx(
|
|
2830
|
-
Ht.Provider,
|
|
2831
|
-
{
|
|
2832
|
-
value: {
|
|
2833
|
-
multiple: !1,
|
|
2834
|
-
items: E,
|
|
2835
|
-
itemToString: b,
|
|
2836
|
-
isOpen: A,
|
|
2837
|
-
getLabelProps: P,
|
|
2838
|
-
getInputProps: w,
|
|
2839
|
-
getToggleButtonProps: S,
|
|
2840
|
-
getMenuProps: k,
|
|
2841
|
-
getItemProps: H,
|
|
2842
|
-
highlightedIndex: q,
|
|
2843
|
-
selectedItem: Y,
|
|
2844
|
-
selectedItems: [],
|
|
2845
|
-
disabledItems: y,
|
|
2846
|
-
setDisabledItems: V,
|
|
2847
|
-
getSelectedItemProps: void 0,
|
|
2848
|
-
getDropdownProps: void 0,
|
|
2849
|
-
reset: void 0,
|
|
2850
|
-
removeSelectedItem: void 0,
|
|
2851
|
-
selectItem: K,
|
|
2852
|
-
inputValue: re,
|
|
2853
|
-
isDisabledOrReadOnly: h,
|
|
2854
|
-
setIsDisabledOrReadOnly: $,
|
|
2855
|
-
hasDisabledPopover: d,
|
|
2856
|
-
setHasDisabledPopover: f,
|
|
2857
|
-
hasEmpty: p,
|
|
2858
|
-
setHasEmpty: _
|
|
2859
|
-
},
|
|
2860
|
-
children: /* @__PURE__ */ j.jsx("div", { className: i, style: { ...o, ...n }, children: /* @__PURE__ */ j.jsx(
|
|
2861
|
-
nt,
|
|
2862
|
-
{
|
|
2863
|
-
open: s === !0 ? s : A,
|
|
2864
|
-
noPadding: !0,
|
|
2865
|
-
disableCaret: !0,
|
|
2866
|
-
fillAvailableHeight: !0,
|
|
2867
|
-
disableFlipFallback: !0,
|
|
2868
|
-
matchReferenceWidth: !0,
|
|
2869
|
-
children: e
|
|
2870
|
-
}
|
|
2871
|
-
) })
|
|
2872
|
-
}
|
|
2873
|
-
);
|
|
2874
|
-
}, Ko = function(t) {
|
|
2875
|
-
const { layoutStyles: n, componentProps: r } = ln(t), {
|
|
2876
|
-
className: i,
|
|
2877
|
-
style: o,
|
|
2878
|
-
children: e,
|
|
2879
|
-
open: s,
|
|
2880
|
-
items: u,
|
|
2881
|
-
itemToString: c,
|
|
2882
|
-
onChange: a,
|
|
2883
|
-
onSelectedItemChange: l,
|
|
2884
|
-
disableCloseOnClickOutside: m = !1,
|
|
2885
|
-
filterOptions: O,
|
|
2886
|
-
...x
|
|
2887
|
-
} = r, [E, R] = le(u), [h, $] = le(!1), [d, f] = le(!1), [p, _] = le(!1), [y, V] = le(""), [b, A] = le([]), [P, w] = le([]), { getSelectedItemProps: S, getDropdownProps: k, reset: H, removeSelectedItem: q } = ye({
|
|
2888
|
-
selectedItems: b,
|
|
2889
|
-
onStateChange({ selectedItems: v, type: M }) {
|
|
2890
|
-
switch (M) {
|
|
2891
|
-
case ye.stateChangeTypes.SelectedItemKeyDownBackspace:
|
|
2892
|
-
case ye.stateChangeTypes.SelectedItemKeyDownDelete:
|
|
2893
|
-
case ye.stateChangeTypes.DropdownKeyDownBackspace:
|
|
2894
|
-
case ye.stateChangeTypes.FunctionRemoveSelectedItem:
|
|
2895
|
-
a != null && a(v ?? []), A(v ?? []);
|
|
2896
|
-
break;
|
|
2897
|
-
case ye.stateChangeTypes.FunctionReset:
|
|
2898
|
-
a != null && a([]), A([]), V("");
|
|
2899
|
-
break;
|
|
2900
|
-
}
|
|
2901
|
-
}
|
|
2902
|
-
});
|
|
2903
|
-
function Y(v) {
|
|
2904
|
-
return c && v ? c(v) : v ? String(v) : "";
|
|
2905
|
-
}
|
|
2906
|
-
const {
|
|
2907
|
-
isOpen: K,
|
|
2908
|
-
getLabelProps: ee,
|
|
2909
|
-
getInputProps: re,
|
|
2910
|
-
getToggleButtonProps: N,
|
|
2911
|
-
getMenuProps: z,
|
|
2912
|
-
getItemProps: G,
|
|
2913
|
-
highlightedIndex: se,
|
|
2914
|
-
selectedItem: D,
|
|
2915
|
-
selectItem: C
|
|
2916
|
-
} = de({
|
|
2917
|
-
...x,
|
|
2918
|
-
items: E,
|
|
2919
|
-
itemToString(v) {
|
|
2920
|
-
return Y(v);
|
|
2921
|
-
},
|
|
2922
|
-
selectedItem: null,
|
|
2923
|
-
inputValue: y,
|
|
2924
|
-
onInputValueChange({ inputValue: v, type: M }) {
|
|
2925
|
-
M === de.stateChangeTypes.InputKeyDownEnter || M === de.stateChangeTypes.ItemClick ? R(u) : v != null && v !== "" ? R(At(u, v, O)) : R(u);
|
|
2926
|
-
},
|
|
2927
|
-
onIsOpenChange({ isOpen: v }) {
|
|
2928
|
-
v === !1 && V("");
|
|
2929
|
-
},
|
|
2930
|
-
stateReducer(v, { type: M, changes: L }) {
|
|
2931
|
-
switch (M) {
|
|
2932
|
-
case de.stateChangeTypes.InputBlur:
|
|
2933
|
-
return m ? {
|
|
2934
|
-
...L,
|
|
2935
|
-
isOpen: v.isOpen,
|
|
2936
|
-
highlightedIndex: v.highlightedIndex
|
|
2937
|
-
} : L;
|
|
2938
|
-
default:
|
|
2939
|
-
return L;
|
|
2940
|
-
}
|
|
2941
|
-
},
|
|
2942
|
-
isItemDisabled(v) {
|
|
2943
|
-
return h || !!(v && v instanceof Object && "disabled" in v && v.disabled || v && v instanceof Object && "readOnly" in v && v.readOnly || P.includes(v));
|
|
2944
|
-
},
|
|
2945
|
-
onStateChange({
|
|
2946
|
-
inputValue: v = "",
|
|
2947
|
-
type: M,
|
|
2948
|
-
selectedItem: L
|
|
2949
|
-
}) {
|
|
2950
|
-
switch (M) {
|
|
2951
|
-
case de.stateChangeTypes.InputKeyDownEnter:
|
|
2952
|
-
case de.stateChangeTypes.ItemClick:
|
|
2953
|
-
case de.stateChangeTypes.InputBlur:
|
|
2954
|
-
if (L) {
|
|
2955
|
-
const B = b.includes(L) ? b.filter((F) => F !== L) : [...b, L];
|
|
2956
|
-
a != null && a(B), A(B), V("");
|
|
2957
|
-
}
|
|
2958
|
-
break;
|
|
2959
|
-
case de.stateChangeTypes.InputChange:
|
|
2960
|
-
V(v);
|
|
2961
|
-
break;
|
|
2962
|
-
}
|
|
2963
|
-
}
|
|
2964
|
-
});
|
|
2965
|
-
return /* @__PURE__ */ j.jsx(
|
|
2966
|
-
Ht.Provider,
|
|
2967
|
-
{
|
|
2968
|
-
value: {
|
|
2969
|
-
multiple: !0,
|
|
2970
|
-
items: E,
|
|
2971
|
-
itemToString: Y,
|
|
2972
|
-
isOpen: K,
|
|
2973
|
-
getLabelProps: ee,
|
|
2974
|
-
getInputProps: re,
|
|
2975
|
-
getToggleButtonProps: N,
|
|
2976
|
-
getMenuProps: z,
|
|
2977
|
-
getItemProps: G,
|
|
2978
|
-
highlightedIndex: se,
|
|
2979
|
-
selectedItem: D,
|
|
2980
|
-
selectedItems: b,
|
|
2981
|
-
disabledItems: P,
|
|
2982
|
-
setDisabledItems: w,
|
|
2983
|
-
getSelectedItemProps: S,
|
|
2984
|
-
getDropdownProps: k,
|
|
2985
|
-
reset: H,
|
|
2986
|
-
removeSelectedItem: q,
|
|
2987
|
-
selectItem: C,
|
|
2988
|
-
inputValue: y,
|
|
2989
|
-
isDisabledOrReadOnly: h,
|
|
2990
|
-
setIsDisabledOrReadOnly: $,
|
|
2991
|
-
hasDisabledPopover: d,
|
|
2992
|
-
setHasDisabledPopover: f,
|
|
2993
|
-
hasEmpty: p,
|
|
2994
|
-
setHasEmpty: _
|
|
2995
|
-
},
|
|
2996
|
-
children: /* @__PURE__ */ j.jsx("div", { className: i, style: { ...o, ...n }, children: /* @__PURE__ */ j.jsx(
|
|
2997
|
-
nt,
|
|
2998
|
-
{
|
|
2999
|
-
open: s === !0 ? s : K,
|
|
3000
|
-
noPadding: !0,
|
|
3001
|
-
disableCaret: !0,
|
|
3002
|
-
fillAvailableHeight: !0,
|
|
3003
|
-
disableFlipFallback: !0,
|
|
3004
|
-
matchReferenceWidth: !0,
|
|
3005
|
-
children: e
|
|
3006
|
-
}
|
|
3007
|
-
) })
|
|
3008
|
-
}
|
|
3009
|
-
);
|
|
3010
|
-
}, jo = ({
|
|
3011
|
-
className: t,
|
|
3012
|
-
label: n,
|
|
3013
|
-
size: r,
|
|
3014
|
-
error: i,
|
|
3015
|
-
hint: o,
|
|
3016
|
-
description: e,
|
|
3017
|
-
required: s,
|
|
3018
|
-
moreInfo: u,
|
|
3019
|
-
openMoreInfo: c,
|
|
3020
|
-
disabled: a,
|
|
3021
|
-
readOnly: l,
|
|
3022
|
-
prefix: m,
|
|
3023
|
-
suffix: O,
|
|
3024
|
-
maxRows: x,
|
|
3025
|
-
...E
|
|
3026
|
-
}) => {
|
|
3027
|
-
const {
|
|
3028
|
-
isOpen: R,
|
|
3029
|
-
itemToString: h,
|
|
3030
|
-
getLabelProps: $,
|
|
3031
|
-
getInputProps: d,
|
|
3032
|
-
getToggleButtonProps: f,
|
|
3033
|
-
selectedItems: p,
|
|
3034
|
-
getSelectedItemProps: _,
|
|
3035
|
-
getDropdownProps: y,
|
|
3036
|
-
reset: V,
|
|
3037
|
-
removeSelectedItem: b,
|
|
3038
|
-
selectItem: A,
|
|
3039
|
-
inputValue: P,
|
|
3040
|
-
setIsDisabledOrReadOnly: w,
|
|
3041
|
-
hasDisabledPopover: S
|
|
3042
|
-
} = Ae(), k = ir(), H = Pe(J["input-wrapper"], {
|
|
3043
|
-
[J.small]: r === "small",
|
|
3044
|
-
[J.large]: r === "large"
|
|
3045
|
-
}), q = Kt(), Y = Kt(), K = Pe(J.input, t, {
|
|
3046
|
-
[J.error]: i
|
|
3047
|
-
});
|
|
3048
|
-
ue(() => (w(!!(a || l)), () => {
|
|
3049
|
-
w(!1);
|
|
3050
|
-
}), [a, l, w]);
|
|
3051
|
-
let ee = `label${q} `;
|
|
3052
|
-
ee += ` helper${Y}`;
|
|
3053
|
-
const re = typeof i != "boolean" ? i : void 0, N = ie(null), [z, G] = le(!1), [se, D] = le(!1), [C, v] = le(
|
|
3054
|
-
null
|
|
3055
|
-
), [M, L] = le(0);
|
|
3056
|
-
sn(() => {
|
|
3057
|
-
var F, te;
|
|
3058
|
-
if (x !== void 0) {
|
|
3059
|
-
if (z === !1)
|
|
3060
|
-
G(!0), D(!1), v(null), L((ne) => ne + 1);
|
|
3061
|
-
else if ((F = N == null ? void 0 : N.current) != null && F.children) {
|
|
3062
|
-
const ne = (te = N == null ? void 0 : N.current) == null ? void 0 : te.children, oe = Array.from(ne).reduce(
|
|
3063
|
-
(I, ce) => {
|
|
3064
|
-
const Z = ce.getBoundingClientRect().top;
|
|
3065
|
-
return I.length ? I[I.length - 1].top === Z ? [
|
|
3066
|
-
...I.slice(0, -1),
|
|
3067
|
-
{ count: I[I.length - 1].count + 1, top: Z }
|
|
3068
|
-
] : I[I.length - 1].top !== Z ? [...I, { count: 1, top: Z }] : I : [{ count: 1, top: Z }];
|
|
3069
|
-
},
|
|
3070
|
-
[]
|
|
3071
|
-
);
|
|
3072
|
-
if (!oe[1] || C === 0)
|
|
3073
|
-
G(!1);
|
|
3074
|
-
else {
|
|
3075
|
-
if (D(!0), C == null) {
|
|
3076
|
-
const I = Math.max(
|
|
3077
|
-
oe[0].count + oe[1].count - 2,
|
|
3078
|
-
0
|
|
3079
|
-
);
|
|
3080
|
-
v(I);
|
|
3081
|
-
} else
|
|
3082
|
-
v(C - 1);
|
|
3083
|
-
L((I) => I + 1);
|
|
3084
|
-
}
|
|
3085
|
-
}
|
|
3086
|
-
}
|
|
3087
|
-
}, [p.length, x, M]);
|
|
3088
|
-
const B = se && x != null && C !== null ? C : p.length;
|
|
3089
|
-
return /* @__PURE__ */ j.jsxs("div", { className: J["search-field"], children: [
|
|
3090
|
-
/* @__PURE__ */ j.jsxs("div", { children: [
|
|
3091
|
-
/* @__PURE__ */ j.jsx(
|
|
3092
|
-
sr,
|
|
3093
|
-
{
|
|
3094
|
-
...$({
|
|
3095
|
-
id: q,
|
|
3096
|
-
required: s,
|
|
3097
|
-
moreInfo: u,
|
|
3098
|
-
openMoreInfo: c
|
|
3099
|
-
}),
|
|
3100
|
-
children: n
|
|
3101
|
-
}
|
|
3102
|
-
),
|
|
3103
|
-
/* @__PURE__ */ j.jsxs(
|
|
3104
|
-
"div",
|
|
3105
|
-
{
|
|
3106
|
-
className: H,
|
|
3107
|
-
ref: k.refs.setReference,
|
|
3108
|
-
children: [
|
|
3109
|
-
/* @__PURE__ */ j.jsxs("div", { className: J["buttons-wrapper"], children: [
|
|
3110
|
-
P || p.length ? /* @__PURE__ */ j.jsx("div", { className: J["close-button-wrapper"], children: /* @__PURE__ */ j.jsx(
|
|
3111
|
-
jt,
|
|
3112
|
-
{
|
|
3113
|
-
"aria-label": "clear selection",
|
|
3114
|
-
appearance: "ghost",
|
|
3115
|
-
size: "small",
|
|
3116
|
-
icon: cr,
|
|
3117
|
-
className: J["close-button"],
|
|
3118
|
-
onClick: () => {
|
|
3119
|
-
V != null ? V() : A(null);
|
|
3120
|
-
},
|
|
3121
|
-
tabIndex: -1,
|
|
3122
|
-
disabled: a || l
|
|
3123
|
-
}
|
|
3124
|
-
) }) : null,
|
|
3125
|
-
S ? null : /* @__PURE__ */ j.jsx("div", { className: J["toggle-button-wrapper"], children: /* @__PURE__ */ j.jsx(
|
|
3126
|
-
jt,
|
|
3127
|
-
{
|
|
3128
|
-
"aria-label": "toggle menu",
|
|
3129
|
-
...f({
|
|
3130
|
-
icon: dr,
|
|
3131
|
-
className: J["toggle-button"],
|
|
3132
|
-
disabled: a || l
|
|
3133
|
-
}),
|
|
3134
|
-
appearance: "ghost",
|
|
3135
|
-
size: "small"
|
|
3136
|
-
}
|
|
3137
|
-
) })
|
|
3138
|
-
] }),
|
|
3139
|
-
/* @__PURE__ */ j.jsxs("div", { className: J["rows-wrapper"], ref: N, children: [
|
|
3140
|
-
p.length && b != null && _ != null ? p.slice(0, B).map((F, te) => {
|
|
3141
|
-
const { onClick: ne, ...oe } = _({
|
|
3142
|
-
selectedItem: F,
|
|
3143
|
-
index: te
|
|
3144
|
-
});
|
|
3145
|
-
return /* @__PURE__ */ j.jsx(
|
|
3146
|
-
"div",
|
|
3147
|
-
{
|
|
3148
|
-
className: J["chip-wrapper"],
|
|
3149
|
-
children: /* @__PURE__ */ j.jsx(
|
|
3150
|
-
$t,
|
|
3151
|
-
{
|
|
3152
|
-
...oe,
|
|
3153
|
-
label: h(F),
|
|
3154
|
-
onClose: () => b(F),
|
|
3155
|
-
className: J.chip,
|
|
3156
|
-
title: h(F)
|
|
3157
|
-
}
|
|
3158
|
-
)
|
|
3159
|
-
},
|
|
3160
|
-
`selected-item-${te}`
|
|
3161
|
-
);
|
|
3162
|
-
}) : null,
|
|
3163
|
-
se && x != null ? /* @__PURE__ */ j.jsx("div", { className: J["chip-wrapper"], children: /* @__PURE__ */ j.jsx(
|
|
3164
|
-
$t,
|
|
3165
|
-
{
|
|
3166
|
-
label: `+${p.length - B}`,
|
|
3167
|
-
className: J.chip,
|
|
3168
|
-
title: p.slice(B).map((F) => h(F)).join(", ")
|
|
3169
|
-
}
|
|
3170
|
-
) }) : null,
|
|
3171
|
-
/* @__PURE__ */ j.jsxs(
|
|
3172
|
-
or,
|
|
3173
|
-
{
|
|
3174
|
-
flex: "1 1 100px",
|
|
3175
|
-
alignItems: "center",
|
|
3176
|
-
style: { width: "100px" },
|
|
3177
|
-
children: [
|
|
3178
|
-
m ? /* @__PURE__ */ j.jsx("div", { className: J.prefix, children: m }) : null,
|
|
3179
|
-
/* @__PURE__ */ j.jsx(
|
|
3180
|
-
"input",
|
|
3181
|
-
{
|
|
3182
|
-
...y != null ? d(
|
|
3183
|
-
y({
|
|
3184
|
-
...E,
|
|
3185
|
-
className: K,
|
|
3186
|
-
disabled: a,
|
|
3187
|
-
readOnly: l,
|
|
3188
|
-
required: s,
|
|
3189
|
-
autoComplete: "off",
|
|
3190
|
-
"aria-labelledby": ee,
|
|
3191
|
-
preventKeyAction: R
|
|
3192
|
-
})
|
|
3193
|
-
) : d({
|
|
3194
|
-
...E,
|
|
3195
|
-
className: K,
|
|
3196
|
-
disabled: a,
|
|
3197
|
-
readOnly: l,
|
|
3198
|
-
required: s,
|
|
3199
|
-
autoComplete: "off",
|
|
3200
|
-
"aria-labelledby": ee
|
|
3201
|
-
})
|
|
3202
|
-
}
|
|
3203
|
-
),
|
|
3204
|
-
O ? /* @__PURE__ */ j.jsx("div", { className: J.suffix, children: O }) : null
|
|
3205
|
-
]
|
|
3206
|
-
}
|
|
3207
|
-
)
|
|
3208
|
-
] })
|
|
3209
|
-
]
|
|
3210
|
-
}
|
|
3211
|
-
)
|
|
3212
|
-
] }),
|
|
3213
|
-
o || re || e ? /* @__PURE__ */ j.jsx(
|
|
3214
|
-
fr,
|
|
3215
|
-
{
|
|
3216
|
-
id: Y,
|
|
3217
|
-
errorMessage: re,
|
|
3218
|
-
hint: o,
|
|
3219
|
-
description: e
|
|
3220
|
-
}
|
|
3221
|
-
) : null
|
|
3222
|
-
] });
|
|
3223
|
-
}, $o = function({
|
|
3224
|
-
children: t,
|
|
3225
|
-
className: n,
|
|
3226
|
-
disablePopover: r = !1,
|
|
3227
|
-
...i
|
|
3228
|
-
}) {
|
|
3229
|
-
const {
|
|
3230
|
-
items: o,
|
|
3231
|
-
highlightedIndex: e,
|
|
3232
|
-
selectedItem: s,
|
|
3233
|
-
selectedItems: u,
|
|
3234
|
-
setHasDisabledPopover: c,
|
|
3235
|
-
getMenuProps: a,
|
|
3236
|
-
getItemProps: l,
|
|
3237
|
-
isDisabledOrReadOnly: m
|
|
3238
|
-
} = Ae(), O = Pe(
|
|
3239
|
-
J["popover-content"],
|
|
3240
|
-
n
|
|
3241
|
-
);
|
|
3242
|
-
return ue(() => (c(r), () => {
|
|
3243
|
-
c(!1);
|
|
3244
|
-
}), [r, c]), r ? /* @__PURE__ */ j.jsx("div", { ...i, className: O, children: t ? t({
|
|
3245
|
-
items: o,
|
|
3246
|
-
highlightedIndex: e,
|
|
3247
|
-
selectedItem: s,
|
|
3248
|
-
getMenuProps: a,
|
|
3249
|
-
getItemProps: l,
|
|
3250
|
-
listProps: {
|
|
3251
|
-
...a({}, { suppressRefError: !0 }),
|
|
3252
|
-
style: {
|
|
3253
|
-
display: o.length ? "" : "none",
|
|
3254
|
-
overflow: "auto"
|
|
3255
|
-
}
|
|
3256
|
-
},
|
|
3257
|
-
options: o.map((x, E) => ({
|
|
3258
|
-
optionProps: {
|
|
3259
|
-
...l({
|
|
3260
|
-
item: x,
|
|
3261
|
-
index: E
|
|
3262
|
-
}),
|
|
3263
|
-
selected: s === x || u.includes(x),
|
|
3264
|
-
disabled: m
|
|
3265
|
-
// also see "isItemDisabled" function
|
|
3266
|
-
},
|
|
3267
|
-
item: x,
|
|
3268
|
-
index: E
|
|
3269
|
-
}))
|
|
3270
|
-
}) : null }) : /* @__PURE__ */ j.jsx(nt.Content, { ...i, className: O, children: t ? t({
|
|
3271
|
-
items: o,
|
|
3272
|
-
highlightedIndex: e,
|
|
3273
|
-
selectedItem: s,
|
|
3274
|
-
getMenuProps: a,
|
|
3275
|
-
getItemProps: l,
|
|
3276
|
-
listProps: {
|
|
3277
|
-
...a({}, { suppressRefError: !0 }),
|
|
3278
|
-
style: {
|
|
3279
|
-
display: o.length ? void 0 : "none",
|
|
3280
|
-
overflow: "auto"
|
|
3281
|
-
}
|
|
3282
|
-
},
|
|
3283
|
-
options: o.map((x, E) => ({
|
|
3284
|
-
optionProps: {
|
|
3285
|
-
...l({
|
|
3286
|
-
item: x,
|
|
3287
|
-
index: E
|
|
3288
|
-
}),
|
|
3289
|
-
selected: s === x || u.includes(x),
|
|
3290
|
-
disabled: m
|
|
3291
|
-
// also see "isItemDisabled" function
|
|
3292
|
-
},
|
|
3293
|
-
item: x,
|
|
3294
|
-
index: E
|
|
3295
|
-
}))
|
|
3296
|
-
}) : null });
|
|
3297
|
-
}, Fo = function({
|
|
3298
|
-
children: t,
|
|
3299
|
-
...n
|
|
3300
|
-
}) {
|
|
3301
|
-
const { getMenuProps: r, multiple: i, items: o, hasEmpty: e } = Ae();
|
|
3302
|
-
return i ? /* @__PURE__ */ j.jsx(
|
|
3303
|
-
"div",
|
|
3304
|
-
{
|
|
3305
|
-
...r(n),
|
|
3306
|
-
className: Ze.listview,
|
|
3307
|
-
style: {
|
|
3308
|
-
display: o.length ? void 0 : "none",
|
|
3309
|
-
overflow: "scroll"
|
|
3310
|
-
},
|
|
3311
|
-
children: t
|
|
3312
|
-
}
|
|
3313
|
-
) : /* @__PURE__ */ j.jsxs(j.Fragment, { children: [
|
|
3314
|
-
/* @__PURE__ */ j.jsx(
|
|
3315
|
-
"ul",
|
|
3316
|
-
{
|
|
3317
|
-
...r(n),
|
|
3318
|
-
className: un.listbox,
|
|
3319
|
-
style: {
|
|
3320
|
-
display: o.length ? void 0 : "none",
|
|
3321
|
-
overflow: "scroll"
|
|
3322
|
-
},
|
|
3323
|
-
children: t
|
|
3324
|
-
}
|
|
3325
|
-
),
|
|
3326
|
-
!o.length && !e ? /* @__PURE__ */ j.jsx("div", { className: J.empty, children: /* @__PURE__ */ j.jsx(ar, { subdued: !0, size: "small", children: "No results found" }) }) : null
|
|
3327
|
-
] });
|
|
3328
|
-
}, Lo = function({
|
|
3329
|
-
children: t,
|
|
3330
|
-
disabled: n,
|
|
3331
|
-
item: r,
|
|
3332
|
-
index: i,
|
|
3333
|
-
...o
|
|
3334
|
-
}) {
|
|
3335
|
-
const {
|
|
3336
|
-
getItemProps: e,
|
|
3337
|
-
multiple: s,
|
|
3338
|
-
selectedItem: u,
|
|
3339
|
-
selectedItems: c,
|
|
3340
|
-
disabledItems: a,
|
|
3341
|
-
setDisabledItems: l
|
|
3342
|
-
} = Ae(), m = n || r && r instanceof Object && "disabled" in r && r.disabled;
|
|
3343
|
-
return ue(() => (n && !a.includes(r) ? l([...a, r]) : a.includes(r) && l(a.filter((O) => O === r)), () => {
|
|
3344
|
-
a.includes(r) && l(a.filter((O) => O === r));
|
|
3345
|
-
}), [r, n, l]), s ? /* @__PURE__ */ j.jsx(
|
|
3346
|
-
"div",
|
|
3347
|
-
{
|
|
3348
|
-
...e({
|
|
3349
|
-
item: r,
|
|
3350
|
-
index: i,
|
|
3351
|
-
...o
|
|
3352
|
-
}),
|
|
3353
|
-
className: Pe(
|
|
3354
|
-
J["listview-option"],
|
|
3355
|
-
Ze["listview-option"]
|
|
3356
|
-
),
|
|
3357
|
-
children: /* @__PURE__ */ j.jsxs("div", { className: Pe(J.cell, Ze.cell), children: [
|
|
3358
|
-
/* @__PURE__ */ j.jsx(
|
|
3359
|
-
lr,
|
|
3360
|
-
{
|
|
3361
|
-
checked: c.includes(r),
|
|
3362
|
-
"aria-label": "Select",
|
|
3363
|
-
...m ? { disabled: !0 } : {}
|
|
3364
|
-
}
|
|
3365
|
-
),
|
|
3366
|
-
t
|
|
3367
|
-
] })
|
|
3368
|
-
}
|
|
3369
|
-
) : /* @__PURE__ */ j.jsxs(
|
|
3370
|
-
"li",
|
|
3371
|
-
{
|
|
3372
|
-
...e({
|
|
3373
|
-
item: r,
|
|
3374
|
-
index: i,
|
|
3375
|
-
...o
|
|
3376
|
-
}),
|
|
3377
|
-
className: un.option,
|
|
3378
|
-
...m ? { "aria-disabled": !0 } : {},
|
|
3379
|
-
children: [
|
|
3380
|
-
/* @__PURE__ */ j.jsx("span", { children: t }),
|
|
3381
|
-
/* @__PURE__ */ j.jsx(
|
|
3382
|
-
ur,
|
|
3383
|
-
{
|
|
3384
|
-
"aria-hidden": !0,
|
|
3385
|
-
svg: pr,
|
|
3386
|
-
inherit: !0,
|
|
3387
|
-
className: J.Icon,
|
|
3388
|
-
style: { opacity: u === r ? 1 : 0 }
|
|
3389
|
-
}
|
|
3390
|
-
)
|
|
3391
|
-
]
|
|
3392
|
-
}
|
|
3393
|
-
);
|
|
3394
|
-
}, Bo = function({
|
|
3395
|
-
children: t
|
|
3396
|
-
}) {
|
|
3397
|
-
const { items: n, setHasEmpty: r } = Ae();
|
|
3398
|
-
return ue(() => (r(!0), () => {
|
|
3399
|
-
r(!1);
|
|
3400
|
-
})), n.length ? null : t;
|
|
3401
|
-
}, fi = Object.assign(Ao, {
|
|
3402
|
-
SearchField: jo,
|
|
3403
|
-
Content: $o,
|
|
3404
|
-
List: Fo,
|
|
3405
|
-
Item: Lo,
|
|
3406
|
-
Empty: Bo
|
|
3407
|
-
});
|
|
3408
|
-
export {
|
|
3409
|
-
fi as x
|
|
3410
|
-
};
|
|
3411
|
-
//# sourceMappingURL=Combobox-8f603bb1.js.map
|