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