@easypost/easy-ui 1.0.0-alpha.7 → 1.0.0-alpha.71
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/Badge/index.js +16 -16
- package/Badge/index.mjs +14 -14
- package/Banner/index.js +7 -7
- package/Banner/index.mjs +5 -5
- package/Button/Button.d.ts +12 -10
- package/Button/Button.d.ts.map +1 -1
- package/Button/Button.stories.d.ts +11 -9
- package/Button/Button.stories.d.ts.map +1 -1
- package/Button/index.js +2 -92
- package/Button/index.mjs +2 -92
- package/Button/utilities.d.ts +4 -0
- package/Button/utilities.d.ts.map +1 -1
- package/CHANGELOG.md +552 -0
- package/Calendar/Calendar.d.ts +67 -0
- package/Calendar/Calendar.d.ts.map +1 -0
- package/Calendar/Calendar.stories.d.ts +15 -0
- package/Calendar/Calendar.stories.d.ts.map +1 -0
- package/Calendar/Calendar.test.d.ts +2 -0
- package/Calendar/Calendar.test.d.ts.map +1 -0
- package/Calendar/CalendarBase.d.ts +57 -0
- package/Calendar/CalendarBase.d.ts.map +1 -0
- package/Calendar/CalendarCell.d.ts +12 -0
- package/Calendar/CalendarCell.d.ts.map +1 -0
- package/Calendar/CalendarGrid.d.ts +9 -0
- package/Calendar/CalendarGrid.d.ts.map +1 -0
- package/Calendar/CalendarHeader.d.ts +20 -0
- package/Calendar/CalendarHeader.d.ts.map +1 -0
- package/Calendar/index.d.ts +2 -0
- package/Calendar/index.d.ts.map +1 -0
- package/Calendar/index.js +4 -0
- package/Calendar/index.mjs +4 -0
- package/Card/Card.d.ts +62 -5
- package/Card/Card.d.ts.map +1 -1
- package/Card/Card.stories.d.ts +5 -0
- package/Card/Card.stories.d.ts.map +1 -1
- package/Card/index.js +3 -84
- package/Card/index.mjs +3 -84
- package/CheckableCard/CheckableCard.d.ts +28 -0
- package/CheckableCard/CheckableCard.d.ts.map +1 -0
- package/CheckableCard/CheckableCard.stories.d.ts +7 -0
- package/CheckableCard/CheckableCard.stories.d.ts.map +1 -0
- package/CheckableCard/CheckableCard.test.d.ts +2 -0
- package/CheckableCard/CheckableCard.test.d.ts.map +1 -0
- package/CheckableCard/index.d.ts +2 -0
- package/CheckableCard/index.d.ts.map +1 -0
- package/CheckableCard/index.js +65 -0
- package/CheckableCard/index.mjs +65 -0
- package/Checkbox/Checkbox.d.ts +1 -1
- package/Checkbox/Checkbox.d.ts.map +1 -1
- package/Checkbox/Checkbox.stories.d.ts +1 -0
- package/Checkbox/Checkbox.stories.d.ts.map +1 -1
- package/Checkbox/Checkbox.test.d.ts +1 -2
- package/Checkbox/Checkbox.test.d.ts.map +1 -1
- package/Checkbox/index.js +3 -231
- package/Checkbox/index.mjs +3 -215
- package/CodeBlock/CodeBlock.d.ts +6 -0
- package/CodeBlock/CodeBlock.d.ts.map +1 -1
- package/CodeBlock/CodeBlock.stories.d.ts.map +1 -1
- package/CodeBlock/LanguageMenu.d.ts.map +1 -1
- package/CodeBlock/index.js +177 -177
- package/CodeBlock/index.mjs +160 -160
- package/CodeSnippet/CodeSnippet.d.ts +3 -3
- package/CodeSnippet/CodeSnippet.d.ts.map +1 -1
- package/CodeSnippet/CodeSnippet.stories.d.ts.map +1 -1
- package/CodeSnippet/SyntaxHighlighter.d.ts +7 -0
- package/CodeSnippet/SyntaxHighlighter.d.ts.map +1 -1
- package/CodeSnippet/index.js +2 -9
- package/CodeSnippet/index.mjs +2 -9
- package/CodeSnippet/theme.d.ts +0 -1
- package/CodeSnippet/theme.d.ts.map +1 -1
- package/DataGrid/ActionsCellContent.d.ts +8 -0
- package/DataGrid/ActionsCellContent.d.ts.map +1 -0
- package/DataGrid/Cell.d.ts +15 -0
- package/DataGrid/Cell.d.ts.map +1 -0
- package/DataGrid/ColumnHeader.d.ts +10 -0
- package/DataGrid/ColumnHeader.d.ts.map +1 -0
- package/DataGrid/DataGrid.d.ts +39 -0
- package/DataGrid/DataGrid.d.ts.map +1 -0
- package/DataGrid/DataGrid.stories.d.ts +19 -0
- package/DataGrid/DataGrid.stories.d.ts.map +1 -0
- package/DataGrid/DataGrid.test.d.ts +2 -0
- package/DataGrid/DataGrid.test.d.ts.map +1 -0
- package/DataGrid/ExpandCellContent.d.ts +8 -0
- package/DataGrid/ExpandCellContent.d.ts.map +1 -0
- package/DataGrid/ExpandedRowContent.d.ts +7 -0
- package/DataGrid/ExpandedRowContent.d.ts.map +1 -0
- package/DataGrid/HeaderRow.d.ts +11 -0
- package/DataGrid/HeaderRow.d.ts.map +1 -0
- package/DataGrid/Row.d.ts +16 -0
- package/DataGrid/Row.d.ts.map +1 -0
- package/DataGrid/RowGroup.d.ts +8 -0
- package/DataGrid/RowGroup.d.ts.map +1 -0
- package/DataGrid/SortIndicator.d.ts +7 -0
- package/DataGrid/SortIndicator.d.ts.map +1 -0
- package/DataGrid/Table.d.ts +8 -0
- package/DataGrid/Table.d.ts.map +1 -0
- package/DataGrid/VisuallyHiddenCellContent.d.ts +7 -0
- package/DataGrid/VisuallyHiddenCellContent.d.ts.map +1 -0
- package/DataGrid/constants.d.ts +5 -0
- package/DataGrid/constants.d.ts.map +1 -0
- package/DataGrid/context.d.ts +31 -0
- package/DataGrid/context.d.ts.map +1 -0
- package/DataGrid/index.d.ts +2 -0
- package/DataGrid/index.d.ts.map +1 -0
- package/DataGrid/index.js +2738 -0
- package/DataGrid/index.mjs +2738 -0
- package/DataGrid/useEdgeInterceptors.d.ts +15 -0
- package/DataGrid/useEdgeInterceptors.d.ts.map +1 -0
- package/DataGrid/useExpandedRow.d.ts +14 -0
- package/DataGrid/useExpandedRow.d.ts.map +1 -0
- package/DataGrid/useGridTemplate.d.ts +14 -0
- package/DataGrid/useGridTemplate.d.ts.map +1 -0
- package/DatePicker/DateField.d.ts +14 -0
- package/DatePicker/DateField.d.ts.map +1 -0
- package/DatePicker/DatePicker.d.ts +91 -0
- package/DatePicker/DatePicker.d.ts.map +1 -0
- package/DatePicker/DatePicker.stories.d.ts +14 -0
- package/DatePicker/DatePicker.stories.d.ts.map +1 -0
- package/DatePicker/DatePicker.test.d.ts +2 -0
- package/DatePicker/DatePicker.test.d.ts.map +1 -0
- package/DatePicker/DatePickerBase.d.ts +32 -0
- package/DatePicker/DatePickerBase.d.ts.map +1 -0
- package/DatePicker/DatePickerOverlay.d.ts +12 -0
- package/DatePicker/DatePickerOverlay.d.ts.map +1 -0
- package/DatePicker/DatePickerTrigger.d.ts +20 -0
- package/DatePicker/DatePickerTrigger.d.ts.map +1 -0
- package/DatePicker/index.d.ts +2 -0
- package/DatePicker/index.d.ts.map +1 -0
- package/DatePicker/index.js +275 -0
- package/DatePicker/index.mjs +275 -0
- package/DateRangePicker/DateRangePicker.d.ts +89 -0
- package/DateRangePicker/DateRangePicker.d.ts.map +1 -0
- package/DateRangePicker/DateRangePicker.stories.d.ts +14 -0
- package/DateRangePicker/DateRangePicker.stories.d.ts.map +1 -0
- package/DateRangePicker/DateRangePicker.test.d.ts +2 -0
- package/DateRangePicker/DateRangePicker.test.d.ts.map +1 -0
- package/DateRangePicker/index.d.ts +2 -0
- package/DateRangePicker/index.d.ts.map +1 -0
- package/DateRangePicker/index.js +434 -0
- package/DateRangePicker/index.mjs +434 -0
- package/Drawer/Drawer.d.ts +53 -0
- package/Drawer/Drawer.d.ts.map +1 -0
- package/Drawer/Drawer.stories.d.ts +14 -0
- package/Drawer/Drawer.stories.d.ts.map +1 -0
- package/Drawer/Drawer.test.d.ts +2 -0
- package/Drawer/Drawer.test.d.ts.map +1 -0
- package/Drawer/DrawerBanner.d.ts +9 -0
- package/Drawer/DrawerBanner.d.ts.map +1 -0
- package/Drawer/DrawerBody.d.ts +10 -0
- package/Drawer/DrawerBody.d.ts.map +1 -0
- package/Drawer/DrawerCloseButton.d.ts +3 -0
- package/Drawer/DrawerCloseButton.d.ts.map +1 -0
- package/Drawer/DrawerContainer.d.ts +18 -0
- package/Drawer/DrawerContainer.d.ts.map +1 -0
- package/Drawer/DrawerContentArea.d.ts +17 -0
- package/Drawer/DrawerContentArea.d.ts.map +1 -0
- package/Drawer/DrawerHeader.d.ts +12 -0
- package/Drawer/DrawerHeader.d.ts.map +1 -0
- package/Drawer/DrawerTrigger.d.ts +26 -0
- package/Drawer/DrawerTrigger.d.ts.map +1 -0
- package/Drawer/DrawerUnderlay.d.ts +23 -0
- package/Drawer/DrawerUnderlay.d.ts.map +1 -0
- package/Drawer/context.d.ts +21 -0
- package/Drawer/context.d.ts.map +1 -0
- package/Drawer/index.d.ts +2 -0
- package/Drawer/index.d.ts.map +1 -0
- package/Drawer/index.js +2068 -0
- package/Drawer/index.mjs +2052 -0
- package/Drawer/useIntersectionDetection.d.ts +10 -0
- package/Drawer/useIntersectionDetection.d.ts.map +1 -0
- package/DropdownButton/DropdownButton.d.ts +3 -3
- package/DropdownButton/DropdownButton.d.ts.map +1 -1
- package/DropdownButton/DropdownButton.stories.d.ts +5 -5
- package/DropdownButton/DropdownButton.stories.d.ts.map +1 -1
- package/DropdownButton/index.js +17 -20
- package/DropdownButton/index.mjs +14 -17
- package/EmptyStateCard/EmptyStateCard.d.ts +87 -0
- package/EmptyStateCard/EmptyStateCard.d.ts.map +1 -0
- package/EmptyStateCard/EmptyStateCard.stories.d.ts +10 -0
- package/EmptyStateCard/EmptyStateCard.stories.d.ts.map +1 -0
- package/EmptyStateCard/EmptyStateCard.test.d.ts +2 -0
- package/EmptyStateCard/EmptyStateCard.test.d.ts.map +1 -0
- package/EmptyStateCard/index.d.ts +2 -0
- package/EmptyStateCard/index.d.ts.map +1 -0
- package/EmptyStateCard/index.js +127 -0
- package/EmptyStateCard/index.mjs +127 -0
- package/EmptyStateCard/utilities.d.ts +3 -0
- package/EmptyStateCard/utilities.d.ts.map +1 -0
- package/FocusedProductLayout/BackArrow.d.ts +4 -0
- package/FocusedProductLayout/BackArrow.d.ts.map +1 -0
- package/FocusedProductLayout/Content.d.ts +10 -0
- package/FocusedProductLayout/Content.d.ts.map +1 -0
- package/FocusedProductLayout/FocusedProductLayout.d.ts +111 -0
- package/FocusedProductLayout/FocusedProductLayout.d.ts.map +1 -0
- package/FocusedProductLayout/FocusedProductLayout.stories.d.ts +12 -0
- package/FocusedProductLayout/FocusedProductLayout.stories.d.ts.map +1 -0
- package/FocusedProductLayout/FocusedProductLayout.test.d.ts +2 -0
- package/FocusedProductLayout/FocusedProductLayout.test.d.ts.map +1 -0
- package/FocusedProductLayout/HeaderAtTopOfPage.d.ts +11 -0
- package/FocusedProductLayout/HeaderAtTopOfPage.d.ts.map +1 -0
- package/FocusedProductLayout/HeaderInContentArea.d.ts +11 -0
- package/FocusedProductLayout/HeaderInContentArea.d.ts.map +1 -0
- package/FocusedProductLayout/SidePanel.d.ts +13 -0
- package/FocusedProductLayout/SidePanel.d.ts.map +1 -0
- package/FocusedProductLayout/WizardContent.d.ts +49 -0
- package/FocusedProductLayout/WizardContent.d.ts.map +1 -0
- package/FocusedProductLayout/index.d.ts +2 -0
- package/FocusedProductLayout/index.d.ts.map +1 -0
- package/FocusedProductLayout/index.js +186 -0
- package/FocusedProductLayout/index.mjs +186 -0
- package/ForgeLayout/ForgeLayout.d.ts +138 -0
- package/ForgeLayout/ForgeLayout.d.ts.map +1 -0
- package/ForgeLayout/ForgeLayout.stories.d.ts +9 -0
- package/ForgeLayout/ForgeLayout.stories.d.ts.map +1 -0
- package/ForgeLayout/ForgeLayout.test.d.ts +2 -0
- package/ForgeLayout/ForgeLayout.test.d.ts.map +1 -0
- package/ForgeLayout/ForgeLayoutActions.d.ts +50 -0
- package/ForgeLayout/ForgeLayoutActions.d.ts.map +1 -0
- package/ForgeLayout/ForgeLayoutControls.d.ts +38 -0
- package/ForgeLayout/ForgeLayoutControls.d.ts.map +1 -0
- package/ForgeLayout/ForgeLayoutHeader.d.ts +18 -0
- package/ForgeLayout/ForgeLayoutHeader.d.ts.map +1 -0
- package/ForgeLayout/ForgeLayoutNav.d.ts +35 -0
- package/ForgeLayout/ForgeLayoutNav.d.ts.map +1 -0
- package/ForgeLayout/index.d.ts +2 -0
- package/ForgeLayout/index.d.ts.map +1 -0
- package/ForgeLayout/index.js +500 -0
- package/ForgeLayout/index.mjs +500 -0
- package/FormLayout/FormLayout.d.ts +55 -0
- package/FormLayout/FormLayout.d.ts.map +1 -0
- package/FormLayout/FormLayout.stories.d.ts +13 -0
- package/FormLayout/FormLayout.stories.d.ts.map +1 -0
- package/FormLayout/FormLayout.test.d.ts +2 -0
- package/FormLayout/FormLayout.test.d.ts.map +1 -0
- package/FormLayout/Grid.d.ts +19 -0
- package/FormLayout/Grid.d.ts.map +1 -0
- package/FormLayout/Header.d.ts +9 -0
- package/FormLayout/Header.d.ts.map +1 -0
- package/FormLayout/HelperText.d.ts +13 -0
- package/FormLayout/HelperText.d.ts.map +1 -0
- package/FormLayout/Section.d.ts +12 -0
- package/FormLayout/Section.d.ts.map +1 -0
- package/FormLayout/Title.d.ts +23 -0
- package/FormLayout/Title.d.ts.map +1 -0
- package/FormLayout/context.d.ts +2 -0
- package/FormLayout/context.d.ts.map +1 -0
- package/FormLayout/index.d.ts +2 -0
- package/FormLayout/index.d.ts.map +1 -0
- package/FormLayout/index.js +126 -0
- package/FormLayout/index.mjs +126 -0
- package/HorizontalGrid/index.js +2 -62
- package/HorizontalGrid/index.mjs +2 -62
- package/HorizontalStack/index.js +2 -48
- package/HorizontalStack/index.mjs +2 -48
- package/Icon/Icon.d.ts +19 -4
- package/Icon/Icon.d.ts.map +1 -1
- package/Icon/Icon.stories.d.ts.map +1 -1
- package/Icon/index.js +2 -38
- package/Icon/index.mjs +2 -38
- package/IconButton/IconButton.d.ts +3 -3
- package/IconButton/IconButton.d.ts.map +1 -1
- package/IconButton/IconButton.stories.d.ts +5 -5
- package/IconButton/IconButton.stories.d.ts.map +1 -1
- package/IconButton/index.js +17 -20
- package/IconButton/index.mjs +13 -16
- package/InputField/InputField.d.ts +7 -4
- package/InputField/InputField.d.ts.map +1 -1
- package/InputField/InputField.test.d.ts.map +1 -1
- package/InputField/Label.d.ts +0 -5
- package/InputField/Label.d.ts.map +1 -1
- package/InputField/index.js +2 -283
- package/InputField/index.mjs +2 -267
- package/InputField/inputText.d.ts +24 -0
- package/InputField/inputText.d.ts.map +1 -0
- package/InputField/utilities.d.ts +3 -1
- package/InputField/utilities.d.ts.map +1 -1
- package/KebabButton/KebabButton.d.ts +19 -0
- package/KebabButton/KebabButton.d.ts.map +1 -0
- package/KebabButton/KebabButton.stories.d.ts +7 -0
- package/KebabButton/KebabButton.stories.d.ts.map +1 -0
- package/KebabButton/KebabButton.test.d.ts +2 -0
- package/KebabButton/KebabButton.test.d.ts.map +1 -0
- package/KebabButton/index.d.ts +2 -0
- package/KebabButton/index.d.ts.map +1 -0
- package/KebabButton/index.js +4 -0
- package/KebabButton/index.mjs +4 -0
- package/Menu/Menu.stories.d.ts +4 -0
- package/Menu/Menu.stories.d.ts.map +1 -1
- package/Menu/MenuItem.d.ts.map +1 -1
- package/Menu/MenuOverlay.d.ts +18 -2
- package/Menu/MenuOverlay.d.ts.map +1 -1
- package/Menu/MenuSection.d.ts +2 -0
- package/Menu/MenuSection.d.ts.map +1 -1
- package/Menu/MenuTrigger.d.ts.map +1 -1
- package/Menu/index.js +2 -394
- package/Menu/index.mjs +2 -394
- package/Menu/utilities.d.ts +17 -1
- package/Menu/utilities.d.ts.map +1 -1
- package/Modal/Modal.d.ts +53 -0
- package/Modal/Modal.d.ts.map +1 -0
- package/Modal/Modal.stories.d.ts +15 -0
- package/Modal/Modal.stories.d.ts.map +1 -0
- package/Modal/Modal.test.d.ts +2 -0
- package/Modal/Modal.test.d.ts.map +1 -0
- package/Modal/ModalBody.d.ts +10 -0
- package/Modal/ModalBody.d.ts.map +1 -0
- package/Modal/ModalContainer.d.ts +26 -0
- package/Modal/ModalContainer.d.ts.map +1 -0
- package/Modal/ModalFooter.d.ts +25 -0
- package/Modal/ModalFooter.d.ts.map +1 -0
- package/Modal/ModalHeader.d.ts +35 -0
- package/Modal/ModalHeader.d.ts.map +1 -0
- package/Modal/ModalTrigger.d.ts +26 -0
- package/Modal/ModalTrigger.d.ts.map +1 -0
- package/Modal/ModalUnderlay.d.ts +19 -0
- package/Modal/ModalUnderlay.d.ts.map +1 -0
- package/Modal/context.d.ts +23 -0
- package/Modal/context.d.ts.map +1 -0
- package/Modal/index.d.ts +2 -0
- package/Modal/index.d.ts.map +1 -0
- package/Modal/index.js +292 -0
- package/Modal/index.mjs +292 -0
- package/Modal/useIntersectionDetection.d.ts +10 -0
- package/Modal/useIntersectionDetection.d.ts.map +1 -0
- package/MultiSelect/MultiSelect.d.ts +123 -0
- package/MultiSelect/MultiSelect.d.ts.map +1 -0
- package/MultiSelect/MultiSelect.stories.d.ts +11 -0
- package/MultiSelect/MultiSelect.stories.d.ts.map +1 -0
- package/MultiSelect/MultiSelect.test.d.ts +2 -0
- package/MultiSelect/MultiSelect.test.d.ts.map +1 -0
- package/MultiSelect/MultiSelectDropdown.d.ts +22 -0
- package/MultiSelect/MultiSelectDropdown.d.ts.map +1 -0
- package/MultiSelect/index.d.ts +2 -0
- package/MultiSelect/index.d.ts.map +1 -0
- package/MultiSelect/index.js +1987 -0
- package/MultiSelect/index.mjs +1972 -0
- package/MultiSelect/utilities.d.ts +3 -0
- package/MultiSelect/utilities.d.ts.map +1 -0
- package/NexusLayout/NexusLayout.d.ts +97 -0
- package/NexusLayout/NexusLayout.d.ts.map +1 -0
- package/NexusLayout/NexusLayout.stories.d.ts +8 -0
- package/NexusLayout/NexusLayout.stories.d.ts.map +1 -0
- package/NexusLayout/NexusLayout.test.d.ts +2 -0
- package/NexusLayout/NexusLayout.test.d.ts.map +1 -0
- package/NexusLayout/NexusLayoutActions.d.ts +38 -0
- package/NexusLayout/NexusLayoutActions.d.ts.map +1 -0
- package/NexusLayout/NexusLayoutMultipage.d.ts +27 -0
- package/NexusLayout/NexusLayoutMultipage.d.ts.map +1 -0
- package/NexusLayout/NexusLayoutMultipageSidebarNav.d.ts +31 -0
- package/NexusLayout/NexusLayoutMultipageSidebarNav.d.ts.map +1 -0
- package/NexusLayout/NexusLayoutNav.d.ts +28 -0
- package/NexusLayout/NexusLayoutNav.d.ts.map +1 -0
- package/NexusLayout/index.d.ts +2 -0
- package/NexusLayout/index.d.ts.map +1 -0
- package/NexusLayout/index.js +353 -0
- package/NexusLayout/index.mjs +353 -0
- package/Notification/index.js +5 -1535
- package/Notification/index.mjs +5 -1519
- package/Pagination/Pagination.d.ts +81 -0
- package/Pagination/Pagination.d.ts.map +1 -0
- package/Pagination/Pagination.stories.d.ts +9 -0
- package/Pagination/Pagination.stories.d.ts.map +1 -0
- package/Pagination/Pagination.test.d.ts +2 -0
- package/Pagination/Pagination.test.d.ts.map +1 -0
- package/Pagination/PaginationButton.d.ts +9 -0
- package/Pagination/PaginationButton.d.ts.map +1 -0
- package/Pagination/PaginationDropdown.d.ts +24 -0
- package/Pagination/PaginationDropdown.d.ts.map +1 -0
- package/Pagination/index.d.ts +2 -0
- package/Pagination/index.d.ts.map +1 -0
- package/Pagination/index.js +119 -0
- package/Pagination/index.mjs +119 -0
- package/PillGroup/PillGroup.d.ts +80 -0
- package/PillGroup/PillGroup.d.ts.map +1 -0
- package/PillGroup/PillGroup.stories.d.ts +11 -0
- package/PillGroup/PillGroup.stories.d.ts.map +1 -0
- package/PillGroup/PillGroup.test.d.ts +2 -0
- package/PillGroup/PillGroup.test.d.ts.map +1 -0
- package/PillGroup/index.d.ts +2 -0
- package/PillGroup/index.d.ts.map +1 -0
- package/PillGroup/index.js +5 -0
- package/PillGroup/index.mjs +5 -0
- package/ProductLayout/HelpMenu.d.ts +8 -0
- package/ProductLayout/HelpMenu.d.ts.map +1 -0
- package/ProductLayout/LayoutScreenSizeRenderer.d.ts +21 -0
- package/ProductLayout/LayoutScreenSizeRenderer.d.ts.map +1 -0
- package/ProductLayout/ProductLayout.d.ts +75 -0
- package/ProductLayout/ProductLayout.d.ts.map +1 -0
- package/ProductLayout/ProductLayout.stories.d.ts +8 -0
- package/ProductLayout/ProductLayout.stories.d.ts.map +1 -0
- package/ProductLayout/ProductLayout.test.d.ts +2 -0
- package/ProductLayout/ProductLayout.test.d.ts.map +1 -0
- package/ProductLayout/ProductLayoutContent.d.ts +9 -0
- package/ProductLayout/ProductLayoutContent.d.ts.map +1 -0
- package/ProductLayout/ProductLayoutHeader.d.ts +44 -0
- package/ProductLayout/ProductLayoutHeader.d.ts.map +1 -0
- package/ProductLayout/ProductLayoutSidebar.d.ts +9 -0
- package/ProductLayout/ProductLayoutSidebar.d.ts.map +1 -0
- package/ProductLayout/ProductLayoutTabbedContent.d.ts +15 -0
- package/ProductLayout/ProductLayoutTabbedContent.d.ts.map +1 -0
- package/ProductLayout/constants.d.ts +2 -0
- package/ProductLayout/constants.d.ts.map +1 -0
- package/ProductLayout/context.d.ts +13 -0
- package/ProductLayout/context.d.ts.map +1 -0
- package/ProductLayout/index.d.ts +2 -0
- package/ProductLayout/index.d.ts.map +1 -0
- package/ProductLayout/index.js +278 -0
- package/ProductLayout/index.mjs +278 -0
- package/Provider/Provider.d.ts +22 -5
- package/Provider/Provider.d.ts.map +1 -1
- package/Provider/index.js +20 -18
- package/Provider/index.mjs +19 -17
- package/README.md +20 -14
- package/RadioButtonGroup/RadioButtonGroup.d.ts +103 -0
- package/RadioButtonGroup/RadioButtonGroup.d.ts.map +1 -0
- package/RadioButtonGroup/RadioButtonGroup.stories.d.ts +11 -0
- package/RadioButtonGroup/RadioButtonGroup.stories.d.ts.map +1 -0
- package/RadioButtonGroup/RadioButtonGroup.test.d.ts +2 -0
- package/RadioButtonGroup/RadioButtonGroup.test.d.ts.map +1 -0
- package/RadioButtonGroup/index.d.ts +2 -0
- package/RadioButtonGroup/index.d.ts.map +1 -0
- package/RadioButtonGroup/index.js +260 -0
- package/RadioButtonGroup/index.mjs +260 -0
- package/RadioGroup/index.js +3 -297
- package/RadioGroup/index.mjs +3 -297
- package/RangeCalendar/RangeCalendar.d.ts +71 -0
- package/RangeCalendar/RangeCalendar.d.ts.map +1 -0
- package/RangeCalendar/RangeCalendar.stories.d.ts +15 -0
- package/RangeCalendar/RangeCalendar.stories.d.ts.map +1 -0
- package/RangeCalendar/RangeCalendar.test.d.ts +3 -0
- package/RangeCalendar/RangeCalendar.test.d.ts.map +1 -0
- package/RangeCalendar/index.d.ts +2 -0
- package/RangeCalendar/index.d.ts.map +1 -0
- package/RangeCalendar/index.js +4 -0
- package/RangeCalendar/index.mjs +4 -0
- package/SearchNav/CTAGroup.d.ts +21 -0
- package/SearchNav/CTAGroup.d.ts.map +1 -0
- package/SearchNav/CondensedSearchNav.d.ts +9 -0
- package/SearchNav/CondensedSearchNav.d.ts.map +1 -0
- package/SearchNav/Logo.d.ts +13 -0
- package/SearchNav/Logo.d.ts.map +1 -0
- package/SearchNav/LogoGroup.d.ts +21 -0
- package/SearchNav/LogoGroup.d.ts.map +1 -0
- package/SearchNav/PrimaryCTAItem.d.ts +14 -0
- package/SearchNav/PrimaryCTAItem.d.ts.map +1 -0
- package/SearchNav/Search.d.ts +13 -0
- package/SearchNav/Search.d.ts.map +1 -0
- package/SearchNav/SearchNav.d.ts +105 -0
- package/SearchNav/SearchNav.d.ts.map +1 -0
- package/SearchNav/SearchNav.stories.d.ts +14 -0
- package/SearchNav/SearchNav.stories.d.ts.map +1 -0
- package/SearchNav/SearchNav.test.d.ts +2 -0
- package/SearchNav/SearchNav.test.d.ts.map +1 -0
- package/SearchNav/SecondaryCTAItem.d.ts +23 -0
- package/SearchNav/SecondaryCTAItem.d.ts.map +1 -0
- package/SearchNav/Selector.d.ts +15 -0
- package/SearchNav/Selector.d.ts.map +1 -0
- package/SearchNav/SelectorTrigger.d.ts +14 -0
- package/SearchNav/SelectorTrigger.d.ts.map +1 -0
- package/SearchNav/Separator.d.ts +9 -0
- package/SearchNav/Separator.d.ts.map +1 -0
- package/SearchNav/Title.d.ts +12 -0
- package/SearchNav/Title.d.ts.map +1 -0
- package/SearchNav/context.d.ts +20 -0
- package/SearchNav/context.d.ts.map +1 -0
- package/SearchNav/index.d.ts +2 -0
- package/SearchNav/index.d.ts.map +1 -0
- package/SearchNav/index.js +476 -0
- package/SearchNav/index.mjs +460 -0
- package/SearchNav/utilities.d.ts +14 -0
- package/SearchNav/utilities.d.ts.map +1 -0
- package/SectionCard/SectionCard.d.ts +53 -0
- package/SectionCard/SectionCard.d.ts.map +1 -0
- package/SectionCard/SectionCard.stories.d.ts +11 -0
- package/SectionCard/SectionCard.stories.d.ts.map +1 -0
- package/SectionCard/SectionCard.test.d.ts +2 -0
- package/SectionCard/SectionCard.test.d.ts.map +1 -0
- package/SectionCard/index.d.ts +2 -0
- package/SectionCard/index.d.ts.map +1 -0
- package/SectionCard/index.js +103 -0
- package/SectionCard/index.mjs +103 -0
- package/Select/Select.d.ts +4 -3
- package/Select/Select.d.ts.map +1 -1
- package/Select/Select.stories.d.ts.map +1 -1
- package/Select/SelectField.d.ts +3 -4
- package/Select/SelectField.d.ts.map +1 -1
- package/Select/SelectOverlay.d.ts.map +1 -1
- package/Select/index.js +28 -722
- package/Select/index.mjs +13 -707
- package/SelectorErrorTooltip/index.js +2 -104
- package/SelectorErrorTooltip/index.mjs +2 -88
- package/Spinner/Spinner.d.ts +73 -0
- package/Spinner/Spinner.d.ts.map +1 -0
- package/Spinner/Spinner.stories.d.ts +11 -0
- package/Spinner/Spinner.stories.d.ts.map +1 -0
- package/Spinner/Spinner.test.d.ts +2 -0
- package/Spinner/Spinner.test.d.ts.map +1 -0
- package/Spinner/index.d.ts +2 -0
- package/Spinner/index.d.ts.map +1 -0
- package/Spinner/index.js +4 -0
- package/Spinner/index.mjs +4 -0
- package/SplitToggleCard/SplitToggleCard.d.ts +57 -0
- package/SplitToggleCard/SplitToggleCard.d.ts.map +1 -0
- package/SplitToggleCard/SplitToggleCard.stories.d.ts +11 -0
- package/SplitToggleCard/SplitToggleCard.stories.d.ts.map +1 -0
- package/SplitToggleCard/SplitToggleCard.test.d.ts +2 -0
- package/SplitToggleCard/SplitToggleCard.test.d.ts.map +1 -0
- package/SplitToggleCard/index.d.ts +2 -0
- package/SplitToggleCard/index.d.ts.map +1 -0
- package/SplitToggleCard/index.js +50 -0
- package/SplitToggleCard/index.mjs +50 -0
- package/Stepper/Step.d.ts +33 -0
- package/Stepper/Step.d.ts.map +1 -0
- package/Stepper/StepButton.d.ts +25 -0
- package/Stepper/StepButton.d.ts.map +1 -0
- package/Stepper/Stepper.d.ts +104 -0
- package/Stepper/Stepper.d.ts.map +1 -0
- package/Stepper/Stepper.stories.d.ts +10 -0
- package/Stepper/Stepper.stories.d.ts.map +1 -0
- package/Stepper/Stepper.test.d.ts +2 -0
- package/Stepper/Stepper.test.d.ts.map +1 -0
- package/Stepper/StepperContext.d.ts +11 -0
- package/Stepper/StepperContext.d.ts.map +1 -0
- package/Stepper/index.d.ts +2 -0
- package/Stepper/index.d.ts.map +1 -0
- package/Stepper/index.js +4 -0
- package/Stepper/index.mjs +4 -0
- package/TabNav/TabNav.d.ts +29 -0
- package/TabNav/TabNav.d.ts.map +1 -0
- package/TabNav/TabNav.stories.d.ts +9 -0
- package/TabNav/TabNav.stories.d.ts.map +1 -0
- package/TabNav/TabNav.test.d.ts +2 -0
- package/TabNav/TabNav.test.d.ts.map +1 -0
- package/TabNav/TabNavItem.d.ts +12 -0
- package/TabNav/TabNavItem.d.ts.map +1 -0
- package/TabNav/index.d.ts +2 -0
- package/TabNav/index.d.ts.map +1 -0
- package/TabNav/index.js +4 -0
- package/TabNav/index.mjs +4 -0
- package/TabPanels/TabPanels.d.ts +68 -0
- package/TabPanels/TabPanels.d.ts.map +1 -0
- package/TabPanels/TabPanels.stories.d.ts +14 -0
- package/TabPanels/TabPanels.stories.d.ts.map +1 -0
- package/TabPanels/TabPanels.test.d.ts +2 -0
- package/TabPanels/TabPanels.test.d.ts.map +1 -0
- package/TabPanels/TabPanelsItem.d.ts +15 -0
- package/TabPanels/TabPanelsItem.d.ts.map +1 -0
- package/TabPanels/TabPanelsPanels.d.ts +14 -0
- package/TabPanels/TabPanelsPanels.d.ts.map +1 -0
- package/TabPanels/TabPanelsTabs.d.ts +15 -0
- package/TabPanels/TabPanelsTabs.d.ts.map +1 -0
- package/TabPanels/context.d.ts +10 -0
- package/TabPanels/context.d.ts.map +1 -0
- package/TabPanels/index.d.ts +2 -0
- package/TabPanels/index.d.ts.map +1 -0
- package/TabPanels/index.js +316 -0
- package/TabPanels/index.mjs +316 -0
- package/Tabs/Edge.d.ts +8 -0
- package/Tabs/Edge.d.ts.map +1 -0
- package/Tabs/Tabs.d.ts +23 -0
- package/Tabs/Tabs.d.ts.map +1 -0
- package/Tabs/TabsItem.d.ts +13 -0
- package/Tabs/TabsItem.d.ts.map +1 -0
- package/Tabs/context.d.ts +7 -0
- package/Tabs/context.d.ts.map +1 -0
- package/Tabs/index.d.ts +2 -0
- package/Tabs/index.d.ts.map +1 -0
- package/Tabs/index.js +4 -0
- package/Tabs/index.mjs +4 -0
- package/Tabs/useIndicatorSizing.d.ts +11 -0
- package/Tabs/useIndicatorSizing.d.ts.map +1 -0
- package/Tabs/useScrollIntoViewIfNeeded.d.ts +11 -0
- package/Tabs/useScrollIntoViewIfNeeded.d.ts.map +1 -0
- package/Tabs/useScrollbar.d.ts +6 -0
- package/Tabs/useScrollbar.d.ts.map +1 -0
- package/Tabs/util.d.ts +9 -0
- package/Tabs/util.d.ts.map +1 -0
- package/Text/Text.d.ts +13 -5
- package/Text/Text.d.ts.map +1 -1
- package/Text/Text.stories.d.ts +1 -0
- package/Text/Text.stories.d.ts.map +1 -1
- package/Text/index.js +2 -85
- package/Text/index.mjs +2 -85
- package/TextField/TextField.d.ts +3 -3
- package/TextField/TextField.d.ts.map +1 -1
- package/TextField/TextField.stories.d.ts +1 -0
- package/TextField/TextField.stories.d.ts.map +1 -1
- package/TextField/index.js +2 -33
- package/TextField/index.mjs +2 -33
- package/Textarea/Textarea.d.ts +3 -3
- package/Textarea/Textarea.d.ts.map +1 -1
- package/Textarea/Textarea.stories.d.ts.map +1 -1
- package/Textarea/index.js +32 -20
- package/Textarea/index.mjs +32 -20
- package/Theme/index.js +5 -145
- package/Theme/index.mjs +5 -145
- package/Toggle/Toggle.d.ts +34 -1
- package/Toggle/Toggle.d.ts.map +1 -1
- package/Toggle/index.js +2 -117
- package/Toggle/index.mjs +2 -117
- package/ToggleCard/ToggleCard.d.ts +88 -0
- package/ToggleCard/ToggleCard.d.ts.map +1 -0
- package/ToggleCard/ToggleCard.stories.d.ts +12 -0
- package/ToggleCard/ToggleCard.stories.d.ts.map +1 -0
- package/ToggleCard/ToggleCard.test.d.ts +2 -0
- package/ToggleCard/ToggleCard.test.d.ts.map +1 -0
- package/ToggleCard/index.d.ts +2 -0
- package/ToggleCard/index.d.ts.map +1 -0
- package/ToggleCard/index.js +47 -0
- package/ToggleCard/index.mjs +47 -0
- package/Tooltip/Tooltip.stories.d.ts +2 -0
- package/Tooltip/Tooltip.stories.d.ts.map +1 -1
- package/Tooltip/index.js +2 -11
- package/Tooltip/index.mjs +1 -10
- package/UnstyledButton/UnstyledButton.d.ts +2 -2
- package/UnstyledButton/UnstyledButton.d.ts.map +1 -1
- package/UnstyledButton/UnstyledPressButton.d.ts +10 -0
- package/UnstyledButton/UnstyledPressButton.d.ts.map +1 -0
- package/UnstyledButton/index.js +2 -7
- package/UnstyledButton/index.mjs +1 -6
- package/VerticalNav/Container.d.ts +4 -0
- package/VerticalNav/Container.d.ts.map +1 -0
- package/VerticalNav/ExpandButton.d.ts +7 -0
- package/VerticalNav/ExpandButton.d.ts.map +1 -0
- package/VerticalNav/Item.d.ts +37 -0
- package/VerticalNav/Item.d.ts.map +1 -0
- package/VerticalNav/ListVerticalNav.d.ts +29 -0
- package/VerticalNav/ListVerticalNav.d.ts.map +1 -0
- package/VerticalNav/NavItem.d.ts +13 -0
- package/VerticalNav/NavItem.d.ts.map +1 -0
- package/VerticalNav/Subnav.d.ts +18 -0
- package/VerticalNav/Subnav.d.ts.map +1 -0
- package/VerticalNav/SubnavItem.d.ts +9 -0
- package/VerticalNav/SubnavItem.d.ts.map +1 -0
- package/VerticalNav/SubnavItemDot.d.ts +7 -0
- package/VerticalNav/SubnavItemDot.d.ts.map +1 -0
- package/VerticalNav/SupplementaryAction.d.ts +26 -0
- package/VerticalNav/SupplementaryAction.d.ts.map +1 -0
- package/VerticalNav/TreeVerticalNav.d.ts +58 -0
- package/VerticalNav/TreeVerticalNav.d.ts.map +1 -0
- package/VerticalNav/VerticalNav.d.ts +29 -0
- package/VerticalNav/VerticalNav.d.ts.map +1 -0
- package/VerticalNav/VerticalNav.stories.d.ts +13 -0
- package/VerticalNav/VerticalNav.stories.d.ts.map +1 -0
- package/VerticalNav/VerticalNav.test.d.ts +2 -0
- package/VerticalNav/VerticalNav.test.d.ts.map +1 -0
- package/VerticalNav/context.d.ts +4 -0
- package/VerticalNav/context.d.ts.map +1 -0
- package/VerticalNav/index.d.ts +2 -0
- package/VerticalNav/index.d.ts.map +1 -0
- package/VerticalNav/index.js +293 -0
- package/VerticalNav/index.mjs +293 -0
- package/VerticalStack/VerticalStack.d.ts +2 -3
- package/VerticalStack/VerticalStack.d.ts.map +1 -1
- package/VerticalStack/index.js +2 -53
- package/VerticalStack/index.mjs +2 -53
- package/__chunks__/ArrowBack-BFS-tCpV.mjs +41 -0
- package/__chunks__/ArrowBack-C_LSatif.js +57 -0
- package/__chunks__/ArrowForwardIos-DSeLeLhY.mjs +41 -0
- package/__chunks__/ArrowForwardIos-DpRiDPNZ.js +57 -0
- package/__chunks__/Button-BoPQ-Fx9.js +161 -0
- package/__chunks__/Button-Cbv2rnYl.js +96 -0
- package/__chunks__/Button-DDDdq1jy.mjs +97 -0
- package/__chunks__/Button-DHEZ4A2s.mjs +162 -0
- package/__chunks__/Calendar-6J28aEN6.js +41 -0
- package/__chunks__/Calendar-IH-Hdju1.mjs +42 -0
- package/__chunks__/CalendarBase-Cn_m810l.js +3494 -0
- package/__chunks__/CalendarBase-NkfY0ZZQ.mjs +3495 -0
- package/__chunks__/Card-BHov7_vu.js +278 -0
- package/__chunks__/Card-Cfs_61bW.mjs +279 -0
- package/__chunks__/CheckCircle-C9h2PNWU.mjs +41 -0
- package/__chunks__/CheckCircle-lgmtkEe6.js +57 -0
- package/__chunks__/Checkbox-5_dirQJ7.js +254 -0
- package/__chunks__/Checkbox-PjSuOA8S.mjs +239 -0
- package/__chunks__/Close-BQ2IlPyf.js +57 -0
- package/__chunks__/Close-Cq6Q6MN6.mjs +41 -0
- package/__chunks__/CodeSnippet--gFmAN9i.js +5703 -0
- package/__chunks__/CodeSnippet-BvZT69UG.mjs +5704 -0
- package/__chunks__/DatePickerBase-B5DTXN8_.mjs +3108 -0
- package/__chunks__/DatePickerBase-DFxPgoc8.js +3122 -0
- package/__chunks__/Dialog-CuqmbMC4.js +291 -0
- package/__chunks__/Dialog-D9aIj4DH.mjs +292 -0
- package/__chunks__/{ExpandMore400-7c5263a4.mjs → ExpandMore400-CH7GNxqk.mjs} +9 -17
- package/__chunks__/{ExpandMore400-92646971.js → ExpandMore400-CJpvxyJm.js} +9 -17
- package/__chunks__/FocusScope-CUJV-jWH.mjs +706 -0
- package/__chunks__/FocusScope-Djtxzznf.js +705 -0
- package/__chunks__/HelpMenu-CnMDuzfD.js +125 -0
- package/__chunks__/HelpMenu-D8fqyHN6.mjs +110 -0
- package/__chunks__/HorizontalGrid-C0WrCjxa.js +61 -0
- package/__chunks__/HorizontalGrid-DXgJ4dXw.mjs +62 -0
- package/__chunks__/HorizontalStack-4-woUNq_.js +49 -0
- package/__chunks__/HorizontalStack-hi_QrrZB.mjs +50 -0
- package/__chunks__/Icon-C5tHQyHr.mjs +40 -0
- package/__chunks__/Icon-YEBBOjcK.js +39 -0
- package/__chunks__/InputCaption-DYZkvdQw.js +60 -0
- package/__chunks__/InputCaption-DiSkdAGZ.mjs +61 -0
- package/__chunks__/InputField-ErsDNt4h.mjs +224 -0
- package/__chunks__/InputField-ISqVunp5.js +239 -0
- package/__chunks__/InputIcon-MAaUXGCr.mjs +112 -0
- package/__chunks__/InputIcon-x3fs2oAT.js +111 -0
- package/__chunks__/Item-BhrTPNN2.mjs +80 -0
- package/__chunks__/Item-CfWjPrxx.js +79 -0
- package/__chunks__/KebabButton-C2L-OC4Y.mjs +106 -0
- package/__chunks__/KebabButton-K9NaCoId.js +121 -0
- package/__chunks__/KeyboardDoubleArrowRight-AAMLvGk-.mjs +79 -0
- package/__chunks__/KeyboardDoubleArrowRight-Ber8mUIO.js +95 -0
- package/__chunks__/LiveAnnouncer-BSV5-C0m.mjs +81 -0
- package/__chunks__/LiveAnnouncer-CzeNwq2D.js +80 -0
- package/__chunks__/Menu-BR1eZSkl.js +505 -0
- package/__chunks__/Menu-Bh10IFV1.mjs +506 -0
- package/__chunks__/Menu-OacI_98l.js +57 -0
- package/__chunks__/Menu-qMqvSorL.mjs +41 -0
- package/__chunks__/Notification-BVk1cbKv.mjs +1367 -0
- package/__chunks__/Notification-BYzidkwf.js +1382 -0
- package/__chunks__/NumberFormatter-CXW1Iqpu.js +153 -0
- package/__chunks__/NumberFormatter-p5KNJNTT.mjs +154 -0
- package/__chunks__/Overlay-CwJbrICR.js +164 -0
- package/__chunks__/Overlay-zuiAML3I.mjs +165 -0
- package/__chunks__/PillGroup-Cw7NxHK1.mjs +2146 -0
- package/__chunks__/PillGroup-DHGP8AdT.js +2145 -0
- package/__chunks__/RadioGroup-BRCEngTq.js +331 -0
- package/__chunks__/RadioGroup-NZKo5DhW.mjs +332 -0
- package/__chunks__/RangeCalendar-CbbQ0oO-.mjs +228 -0
- package/__chunks__/RangeCalendar-Ccn11Hi1.js +227 -0
- package/__chunks__/Search-BY7IgEyX.js +57 -0
- package/__chunks__/Search-Cyblmqo5.mjs +41 -0
- package/__chunks__/SelectOverlay-Od1KotbU.mjs +414 -0
- package/__chunks__/SelectOverlay-QpThRYAk.js +413 -0
- package/__chunks__/SelectionManager-DCO_d3m1.mjs +708 -0
- package/__chunks__/SelectionManager-DuX6geJg.js +707 -0
- package/__chunks__/SelectorErrorTooltip-B6N15DSq.js +90 -0
- package/__chunks__/SelectorErrorTooltip-DZK9TYeX.mjs +75 -0
- package/__chunks__/Spinner-DWNM6vOK.mjs +100 -0
- package/__chunks__/Spinner-idiilXrq.js +99 -0
- package/__chunks__/Stepper-Dip3LHZb.mjs +169 -0
- package/__chunks__/Stepper-Dt63049f.js +168 -0
- package/__chunks__/TabNav-BCal_o_e.mjs +58 -0
- package/__chunks__/TabNav-D_4bqwZ5.js +57 -0
- package/__chunks__/Tabs-D5YHkBYr.mjs +254 -0
- package/__chunks__/Tabs-DL53NmLt.js +253 -0
- package/__chunks__/Text-DAilskpC.mjs +110 -0
- package/__chunks__/Text-DKSomTmh.js +109 -0
- package/__chunks__/TextField-Co7_GAzT.js +44 -0
- package/__chunks__/TextField-gPC5-arj.mjs +45 -0
- package/__chunks__/Theme-BTOgcCP2.js +146 -0
- package/__chunks__/Theme-ByVPHaBx.mjs +147 -0
- package/__chunks__/Toggle-B6b2-C7T.mjs +135 -0
- package/__chunks__/Toggle-D89AeiqA.js +134 -0
- package/__chunks__/{index-affe5510.js → Tooltip-5lz6tVdi.js} +134 -142
- package/__chunks__/{index-e989a741.mjs → Tooltip-BAlARvJi.mjs} +123 -131
- package/__chunks__/{index-45f05366.mjs → UnstyledButton-D_DzFe67.mjs} +17 -72
- package/__chunks__/UnstyledButton-yd6ZL2Yi.js +77 -0
- package/__chunks__/VerticalStack-Dw2YBdjg.js +54 -0
- package/__chunks__/VerticalStack-yZwmajIO.mjs +55 -0
- package/__chunks__/VisuallyHidden-DcUrMWfu.js +74 -0
- package/__chunks__/VisuallyHidden-cQCgS6_a.mjs +75 -0
- package/__chunks__/_commonjsHelpers-Bc2YnDe1.js +7 -0
- package/__chunks__/_commonjsHelpers-DWwsNxpa.mjs +8 -0
- package/__chunks__/ariaHideOutside-CvJKAP9c.mjs +377 -0
- package/__chunks__/ariaHideOutside-DkYn-eBq.js +376 -0
- package/__chunks__/context-BZCcafjG.mjs +92 -0
- package/__chunks__/context-CYcq9Zvo.js +120 -0
- package/__chunks__/context-D3NeXov7.js +91 -0
- package/__chunks__/context-EpOG85wC.mjs +121 -0
- package/__chunks__/filterDOMProps-D3iOHP0H.js +27 -0
- package/__chunks__/filterDOMProps-EDDcM64A.mjs +28 -0
- package/__chunks__/focusSafely-CCOEuEpK.mjs +15 -0
- package/__chunks__/focusSafely-wmTq_iKq.js +14 -0
- package/__chunks__/getScrollParent-B5CCP-yO.mjs +10 -0
- package/__chunks__/getScrollParent-DNz2ReWu.js +9 -0
- package/__chunks__/index-CTw89HMx.js +198 -0
- package/__chunks__/index-CUcRN4NO.js +311 -0
- package/__chunks__/index-DCSYt1ke.mjs +199 -0
- package/__chunks__/index-Izk6uvQC.mjs +312 -0
- package/__chunks__/isScrollable-CE3Xdlg4.js +9 -0
- package/__chunks__/isScrollable-DwbLAiO0.mjs +10 -0
- package/__chunks__/isVirtualEvent-B_Z4yzgm.mjs +75 -0
- package/__chunks__/isVirtualEvent-C-tB2MCl.js +74 -0
- package/__chunks__/lodash-B19QVK6q.mjs +5492 -0
- package/__chunks__/lodash-CS8bkZ7S.js +5491 -0
- package/__chunks__/mergeProps-DSi85raC.mjs +227 -0
- package/__chunks__/mergeProps-DniMwM6P.js +226 -0
- package/__chunks__/mergeRefs-CCV6itCY.mjs +12 -0
- package/__chunks__/mergeRefs-CQsNYO0P.js +11 -0
- package/__chunks__/number-C4N6pKyl.js +6 -0
- package/__chunks__/number-CLRm_tTs.mjs +7 -0
- package/__chunks__/objectWithoutPropertiesLoose-3GpnIKeG.js +29 -0
- package/__chunks__/objectWithoutPropertiesLoose-ij10PUAf.mjs +30 -0
- package/__chunks__/omit-CC3uE8z5.js +2245 -0
- package/__chunks__/omit-CYoLXTjq.mjs +2246 -0
- package/__chunks__/{overlayscrollbars-react.es-f2a0bcff.js → overlayscrollbars-react-BFy4nomP.js} +982 -880
- package/__chunks__/{overlayscrollbars-react.es-7f332a3b.mjs → overlayscrollbars-react-BiRJpzDY.mjs} +982 -880
- package/__chunks__/scrollIntoView-BN4yt25y.js +114 -0
- package/__chunks__/scrollIntoView-wURtlgJt.mjs +115 -0
- package/__chunks__/{tokens-ad06cd2c.js → tokens-BmCk-Bk0.js} +153 -126
- package/__chunks__/{tokens-3c27019b.mjs → tokens-BolVbjJp.mjs} +153 -126
- package/__chunks__/useButton-B_VJe1i5.js +70 -0
- package/__chunks__/useButton-CdgRb7pd.mjs +71 -0
- package/__chunks__/useCollator-B-keb3wA.mjs +13 -0
- package/__chunks__/useCollator-DGrSWVh4.js +12 -0
- package/__chunks__/{import-6a831ca1.mjs → useControlledState-CFWhSD5C.mjs} +5 -14
- package/__chunks__/{import-dea5a24d.js → useControlledState-mnKBd6Uc.js} +4 -13
- package/__chunks__/useDialog-Bxep5NaV.mjs +72 -0
- package/__chunks__/useDialog-DJ-g6m8Y.js +71 -0
- package/__chunks__/useEdgeInterceptors-B2OWg9dT.js +48 -0
- package/__chunks__/useEdgeInterceptors-YaV-ot5j.mjs +49 -0
- package/__chunks__/useEvent-B0fsKtsf.mjs +23 -0
- package/__chunks__/useEvent-DY7dR7Mi.js +22 -0
- package/__chunks__/useField-B6VplZ_n.mjs +39 -0
- package/__chunks__/useField-BJW_bXVD.js +38 -0
- package/__chunks__/useFilter-D-K0Oj-7.mjs +65 -0
- package/__chunks__/useFilter-DpnZ54nd.js +64 -0
- package/__chunks__/useFocus-l6ZlVMHW.js +37 -0
- package/__chunks__/useFocus-lnK5BCt2.mjs +38 -0
- package/__chunks__/useFocusRing-KIEn23AD.mjs +43 -0
- package/__chunks__/useFocusRing-f5StfjhA.js +42 -0
- package/__chunks__/useFocusVisible-Bb3k4_O_.mjs +272 -0
- package/__chunks__/useFocusVisible-CiIrKjuz.js +271 -0
- package/__chunks__/useFocusWithin-BGNdxo9d.mjs +48 -0
- package/__chunks__/useFocusWithin-C-45XiL1.js +47 -0
- package/__chunks__/useFocusable-BQyiwtXU.js +99 -0
- package/__chunks__/useFocusable-DxcU91xN.mjs +100 -0
- package/__chunks__/useFormReset-Bgj93eR3.js +21 -0
- package/__chunks__/useFormReset-DA1Lwdha.mjs +22 -0
- package/__chunks__/useFormValidation-BeqiYVJN.js +262 -0
- package/__chunks__/useFormValidation-CCe1AoIX.mjs +263 -0
- package/__chunks__/useHasTabbableChild-CepF5tQS.js +36 -0
- package/__chunks__/useHasTabbableChild-DOO1szWv.mjs +37 -0
- package/__chunks__/useHighlightSelectionDescription-B_YjQEPD.mjs +572 -0
- package/__chunks__/useHighlightSelectionDescription-nSfKxNPA.js +570 -0
- package/__chunks__/useHover-BIKwjrCT.js +109 -0
- package/__chunks__/useHover-BOYR4wqI.mjs +110 -0
- package/__chunks__/useIntersectionDetection-BvUmtDgl.mjs +22 -0
- package/__chunks__/useIntersectionDetection-DI5n4zwA.js +21 -0
- package/__chunks__/useLabel-D37VV43W.mjs +27 -0
- package/__chunks__/useLabel-t-N6anB8.js +26 -0
- package/__chunks__/useLabels-5f58TiCH.mjs +23 -0
- package/__chunks__/useLabels-KmwewLTv.js +22 -0
- package/__chunks__/useLink-BGK9UEQW.mjs +95 -0
- package/__chunks__/useLink-CQhl3ZGL.js +94 -0
- package/__chunks__/useListBoxSection-Dl15OiHe.mjs +195 -0
- package/__chunks__/useListBoxSection-TdoNdwIM.js +194 -0
- package/__chunks__/useListState-AFrlkW73.mjs +182 -0
- package/__chunks__/useListState-I5rva0Fq.js +181 -0
- package/__chunks__/useLocalizedStringFormatter-BHXy3Wtu.mjs +122 -0
- package/__chunks__/useLocalizedStringFormatter-CaF1VsOH.js +121 -0
- package/__chunks__/useMenuTrigger-DDKy3dcp.mjs +264 -0
- package/__chunks__/useMenuTrigger-DhSBxWW5.js +263 -0
- package/__chunks__/useMenuTriggerState-BJJ3WdLH.mjs +67 -0
- package/__chunks__/useMenuTriggerState-DTZmPbSP.js +66 -0
- package/__chunks__/useModalOverlay-BeCxNyVY.mjs +48 -0
- package/__chunks__/useModalOverlay-gSHY_FAb.js +47 -0
- package/__chunks__/useObjectRef-BOGMJ5vM.js +18 -0
- package/__chunks__/useObjectRef-wU82Pkgx.mjs +19 -0
- package/__chunks__/useOverlayPosition-CTTQ0gZN.mjs +473 -0
- package/__chunks__/useOverlayPosition-DJGEWKwM.js +472 -0
- package/__chunks__/useOverlayTrigger-BvP35sYf.mjs +28 -0
- package/__chunks__/useOverlayTrigger-CiUR_pLO.js +27 -0
- package/__chunks__/usePress-CqfuY_T7.mjs +800 -0
- package/__chunks__/usePress-DTGD4Sub.js +799 -0
- package/__chunks__/useResizeObserver-BsbT3mjh.js +34 -0
- package/__chunks__/useResizeObserver-Dyb4wvuA.mjs +35 -0
- package/__chunks__/useSelectableItem-BEkjpB_K.js +615 -0
- package/__chunks__/useSelectableItem-DeFiKyU1.mjs +616 -0
- package/__chunks__/useSelectableList-DPJUwWwV.mjs +280 -0
- package/__chunks__/useSelectableList-Dk3TxzYJ.js +279 -0
- package/__chunks__/useSingleSelectListState-5RB1w9vv.js +55 -0
- package/__chunks__/useSingleSelectListState-DuCUY6dR.mjs +56 -0
- package/__chunks__/useTextField-CspDdKaL.mjs +110 -0
- package/__chunks__/useTextField-DM-ZTn9j.js +109 -0
- package/__chunks__/{import-eb35a9b9.mjs → useToggle-CbrJW7jr.mjs} +22 -29
- package/__chunks__/useToggle-Cu5EqIJD.js +74 -0
- package/__chunks__/useToggleState-CdbEMLRz.js +18 -0
- package/__chunks__/useToggleState-kFojjzgV.mjs +19 -0
- package/__chunks__/useTreeState-D6aHf9kN.js +142 -0
- package/__chunks__/useTreeState-w_raYfy2.mjs +143 -0
- package/__chunks__/useTriggerWidth-74VNM0k9.mjs +133 -0
- package/__chunks__/useTriggerWidth-B-IM2wNY.js +132 -0
- package/__chunks__/useUpdateEffect-BLgGnNgL.mjs +19 -0
- package/__chunks__/useUpdateEffect-CssYIsWI.js +18 -0
- package/__chunks__/utilities-CczOI9Hn.mjs +358 -0
- package/__chunks__/utilities-DIZYscJV.js +357 -0
- package/__chunks__/utils-BIfsWYLR.mjs +148 -0
- package/__chunks__/utils-BlKqJM2_.js +147 -0
- package/package.json +17 -15
- package/style.css +5239 -1686
- package/styles/_accessibility.scss +54 -0
- package/styles/_common.scss +8 -0
- package/styles/_media-queries.scss +25 -0
- package/styles/_poppins-fallback.scss +73 -0
- package/styles/_responsive-props.scss +90 -0
- package/styles/_scrollbars.scss +52 -0
- package/styles/_string-functions.scss +26 -0
- package/styles/_token-helpers.scss +41 -0
- package/styles/_typography.scss +53 -0
- package/styles/_unstyled.scss +32 -0
- package/styles/global.scss +32 -0
- package/types.d.ts +10 -4
- package/types.d.ts.map +1 -1
- package/utilities/EasyPostLogo.d.ts +3 -0
- package/utilities/EasyPostLogo.d.ts.map +1 -0
- package/utilities/css.d.ts +1 -0
- package/utilities/css.d.ts.map +1 -1
- package/utilities/css.js +20 -1
- package/utilities/css.mjs +20 -1
- package/utilities/react.d.ts +17 -1
- package/utilities/react.d.ts.map +1 -1
- package/utilities/react.js +44 -307
- package/utilities/react.mjs +43 -306
- package/utilities/storybook.d.ts +60 -2
- package/utilities/storybook.d.ts.map +1 -1
- package/utilities/test.d.ts +21 -3
- package/utilities/test.d.ts.map +1 -1
- package/utilities/tokens.d.ts.map +1 -1
- package/{Menu → utilities}/useScrollbar.d.ts +2 -4
- package/utilities/useScrollbar.d.ts.map +1 -0
- package/utilities/useScrollbar.js +22 -0
- package/utilities/useScrollbar.mjs +22 -0
- package/Menu/useScrollbar.d.ts.map +0 -1
- package/__chunks__/InputIcon-1f2ed127.mjs +0 -148
- package/__chunks__/InputIcon-f456e366.js +0 -147
- package/__chunks__/import-0f8555a4.js +0 -1121
- package/__chunks__/import-19bc38ac.mjs +0 -679
- package/__chunks__/import-24a482e1.js +0 -59
- package/__chunks__/import-26676303.js +0 -1436
- package/__chunks__/import-29af6941.mjs +0 -60
- package/__chunks__/import-3faba3a6.mjs +0 -1437
- package/__chunks__/import-890ae60e.js +0 -81
- package/__chunks__/import-a1e0f814.js +0 -678
- package/__chunks__/import-c4caaddf.mjs +0 -1122
- package/__chunks__/index-5f429325.js +0 -132
- package/__chunks__/index-72137376.mjs +0 -5421
- package/__chunks__/index-a7b6b429.js +0 -5420
- package/__chunks__/omit-f17deb8f.mjs +0 -1296
- package/__chunks__/omit-fca26542.js +0 -1295
- package/__chunks__/real-module-515df21d.mjs +0 -216
- package/__chunks__/real-module-e36b1436.js +0 -215
- package/__chunks__/useTriggerWidth-b554acaf.mjs +0 -2031
- package/__chunks__/useTriggerWidth-e11bf6d6.js +0 -2030
|
@@ -1,2031 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __knownSymbol = (name, symbol) => {
|
|
8
|
-
if (symbol = Symbol[name])
|
|
9
|
-
return symbol;
|
|
10
|
-
throw Error("Symbol." + name + " is not defined");
|
|
11
|
-
};
|
|
12
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
-
var __spreadValues = (a, b) => {
|
|
14
|
-
for (var prop in b || (b = {}))
|
|
15
|
-
if (__hasOwnProp.call(b, prop))
|
|
16
|
-
__defNormalProp(a, prop, b[prop]);
|
|
17
|
-
if (__getOwnPropSymbols)
|
|
18
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
-
if (__propIsEnum.call(b, prop))
|
|
20
|
-
__defNormalProp(a, prop, b[prop]);
|
|
21
|
-
}
|
|
22
|
-
return a;
|
|
23
|
-
};
|
|
24
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
|
-
var __objRest = (source, exclude) => {
|
|
26
|
-
var target = {};
|
|
27
|
-
for (var prop in source)
|
|
28
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
29
|
-
target[prop] = source[prop];
|
|
30
|
-
if (source != null && __getOwnPropSymbols)
|
|
31
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
32
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
33
|
-
target[prop] = source[prop];
|
|
34
|
-
}
|
|
35
|
-
return target;
|
|
36
|
-
};
|
|
37
|
-
var __await = function(promise, isYieldStar) {
|
|
38
|
-
this[0] = promise;
|
|
39
|
-
this[1] = isYieldStar;
|
|
40
|
-
};
|
|
41
|
-
var __yieldStar = (value) => {
|
|
42
|
-
var obj = value[__knownSymbol("asyncIterator")];
|
|
43
|
-
var isAwait = false;
|
|
44
|
-
var method;
|
|
45
|
-
var it = {};
|
|
46
|
-
if (obj == null) {
|
|
47
|
-
obj = value[__knownSymbol("iterator")]();
|
|
48
|
-
method = (k) => it[k] = (x) => obj[k](x);
|
|
49
|
-
} else {
|
|
50
|
-
obj = obj.call(value);
|
|
51
|
-
method = (k) => it[k] = (v) => {
|
|
52
|
-
if (isAwait) {
|
|
53
|
-
isAwait = false;
|
|
54
|
-
if (k === "throw")
|
|
55
|
-
throw v;
|
|
56
|
-
return v;
|
|
57
|
-
}
|
|
58
|
-
isAwait = true;
|
|
59
|
-
return {
|
|
60
|
-
done: false,
|
|
61
|
-
value: new __await(new Promise((resolve) => {
|
|
62
|
-
var x = obj[k](v);
|
|
63
|
-
if (!(x instanceof Object))
|
|
64
|
-
throw TypeError("Object expected");
|
|
65
|
-
resolve(x);
|
|
66
|
-
}), 1)
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
return it[__knownSymbol("iterator")] = () => it, method("next"), "throw" in obj ? method("throw") : it.throw = (x) => {
|
|
71
|
-
throw x;
|
|
72
|
-
}, "return" in obj && method("return"), it;
|
|
73
|
-
};
|
|
74
|
-
import { t as $62d8ded9296f3872$export$2bb74740c4e19def, u as $e9faafb641e167db$export$90fc3a17d93f704c, v as $2f04cbc44ee30ce0$export$53a0910f038337bd, w as $2f04cbc44ee30ce0$export$c826860796309d1b, a as $3ef42575df84b30b$export$9d1611c77c2fe928, x as $c87311424ea30a05$export$e1865c3bedcd822b, p as $c87311424ea30a05$export$9ac100e40613ea10, i as $7215afc6de606d6b$export$de79e2c695e052f3, b as $bdb11010cef70236$export$f680877a34711e37, d as $65484d02dcb7eb3e$export$457c3d6518dd4c6f, g as $8ae05eaa5c114e9c$export$7f54fc3180508a52, o as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, $ as $bdb11010cef70236$export$b4cc09c592e8fdb8, q as $9daab02d461809db$export$683480f191c0e3ea } from "./import-19bc38ac.mjs";
|
|
75
|
-
import { h as $6a99195332edec8b$export$80f3e147d781571c, $ as $f6c31cce2adf654f$export$45712eceda6fad21, i as $8a26561d2877236e$export$c24ed0104d07eab9, j as $507fabe10e71c6fb$export$630ff653c5ada6a9, g as $9bf71ea28793e738$export$2d6ec8fc375ceafa, f as $6179b936705e76d3$export$ae780daf29e6d456, k as $507fabe10e71c6fb$export$b9b3dfddab17db27, l as $46d819fcbaf35654$export$8f71654801c2f7cd } from "./import-3faba3a6.mjs";
|
|
76
|
-
import { $ as $628037886ba31236$export$f9d5c8beee7d008d, a as $fc909762b330b746$export$61c6a8c84e605fb6 } from "./import-c4caaddf.mjs";
|
|
77
|
-
import React__default, { useRef, useMemo, useEffect, useCallback, useState } from "react";
|
|
78
|
-
import { b as $325a3faab7a68acd$export$a16aca283550c30d, $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7, a as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "./real-module-515df21d.mjs";
|
|
79
|
-
import { $ as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "./import-6a831ca1.mjs";
|
|
80
|
-
import { getComponentToken, pxToRem, getResponsiveValue } from "../utilities/css.mjs";
|
|
81
|
-
function $feb5ffebff200149$export$d3e3bd3e26688c04(e) {
|
|
82
|
-
return $c87311424ea30a05$export$e1865c3bedcd822b() ? e.altKey : e.ctrlKey;
|
|
83
|
-
}
|
|
84
|
-
function $feb5ffebff200149$export$16792effe837dba3(e) {
|
|
85
|
-
if ($c87311424ea30a05$export$9ac100e40613ea10())
|
|
86
|
-
return e.metaKey;
|
|
87
|
-
return e.ctrlKey;
|
|
88
|
-
}
|
|
89
|
-
const $fb3050f43d946246$var$TYPEAHEAD_DEBOUNCE_WAIT_MS = 1e3;
|
|
90
|
-
function $fb3050f43d946246$export$e32c88dfddc6e1d8(options) {
|
|
91
|
-
let { keyboardDelegate, selectionManager, onTypeSelect } = options;
|
|
92
|
-
let state = useRef({
|
|
93
|
-
search: "",
|
|
94
|
-
timeout: null
|
|
95
|
-
}).current;
|
|
96
|
-
let onKeyDown = (e) => {
|
|
97
|
-
let character = $fb3050f43d946246$var$getStringForKey(e.key);
|
|
98
|
-
if (!character || e.ctrlKey || e.metaKey || !e.currentTarget.contains(e.target))
|
|
99
|
-
return;
|
|
100
|
-
if (character === " " && state.search.trim().length > 0) {
|
|
101
|
-
e.preventDefault();
|
|
102
|
-
if (!("continuePropagation" in e))
|
|
103
|
-
e.stopPropagation();
|
|
104
|
-
}
|
|
105
|
-
state.search += character;
|
|
106
|
-
let key = keyboardDelegate.getKeyForSearch(state.search, selectionManager.focusedKey);
|
|
107
|
-
if (key == null)
|
|
108
|
-
key = keyboardDelegate.getKeyForSearch(state.search);
|
|
109
|
-
if (key != null) {
|
|
110
|
-
selectionManager.setFocusedKey(key);
|
|
111
|
-
if (onTypeSelect)
|
|
112
|
-
onTypeSelect(key);
|
|
113
|
-
}
|
|
114
|
-
clearTimeout(state.timeout);
|
|
115
|
-
state.timeout = setTimeout(() => {
|
|
116
|
-
state.search = "";
|
|
117
|
-
}, $fb3050f43d946246$var$TYPEAHEAD_DEBOUNCE_WAIT_MS);
|
|
118
|
-
};
|
|
119
|
-
return {
|
|
120
|
-
typeSelectProps: {
|
|
121
|
-
// Using a capturing listener to catch the keydown event before
|
|
122
|
-
// other hooks in order to handle the Spacebar event.
|
|
123
|
-
onKeyDownCapture: keyboardDelegate.getKeyForSearch ? onKeyDown : null
|
|
124
|
-
}
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
function $fb3050f43d946246$var$getStringForKey(key) {
|
|
128
|
-
if (key.length === 1 || !/^[A-Z]/i.test(key))
|
|
129
|
-
return key;
|
|
130
|
-
return "";
|
|
131
|
-
}
|
|
132
|
-
function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
133
|
-
let { selectionManager: manager, keyboardDelegate: delegate, ref, autoFocus = false, shouldFocusWrap = false, disallowEmptySelection = false, disallowSelectAll = false, selectOnFocus = manager.selectionBehavior === "replace", disallowTypeAhead = false, shouldUseVirtualFocus, allowsTabNavigation = false, isVirtualized, scrollRef = ref } = options;
|
|
134
|
-
let { direction } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7();
|
|
135
|
-
let onKeyDown = (e) => {
|
|
136
|
-
if (e.altKey && e.key === "Tab")
|
|
137
|
-
e.preventDefault();
|
|
138
|
-
if (!ref.current.contains(e.target))
|
|
139
|
-
return;
|
|
140
|
-
const navigateToKey = (key, childFocus) => {
|
|
141
|
-
if (key != null) {
|
|
142
|
-
manager.setFocusedKey(key, childFocus);
|
|
143
|
-
if (e.shiftKey && manager.selectionMode === "multiple")
|
|
144
|
-
manager.extendSelection(key);
|
|
145
|
-
else if (selectOnFocus && !$feb5ffebff200149$export$d3e3bd3e26688c04(e))
|
|
146
|
-
manager.replaceSelection(key);
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
switch (e.key) {
|
|
150
|
-
case "ArrowDown":
|
|
151
|
-
if (delegate.getKeyBelow) {
|
|
152
|
-
var _delegate_getFirstKey, _delegate_getFirstKey1;
|
|
153
|
-
e.preventDefault();
|
|
154
|
-
let nextKey = manager.focusedKey != null ? delegate.getKeyBelow(manager.focusedKey) : (_delegate_getFirstKey = delegate.getFirstKey) === null || _delegate_getFirstKey === void 0 ? void 0 : _delegate_getFirstKey.call(delegate);
|
|
155
|
-
if (nextKey == null && shouldFocusWrap)
|
|
156
|
-
nextKey = (_delegate_getFirstKey1 = delegate.getFirstKey) === null || _delegate_getFirstKey1 === void 0 ? void 0 : _delegate_getFirstKey1.call(delegate, manager.focusedKey);
|
|
157
|
-
navigateToKey(nextKey);
|
|
158
|
-
}
|
|
159
|
-
break;
|
|
160
|
-
case "ArrowUp":
|
|
161
|
-
if (delegate.getKeyAbove) {
|
|
162
|
-
var _delegate_getLastKey, _delegate_getLastKey1;
|
|
163
|
-
e.preventDefault();
|
|
164
|
-
let nextKey = manager.focusedKey != null ? delegate.getKeyAbove(manager.focusedKey) : (_delegate_getLastKey = delegate.getLastKey) === null || _delegate_getLastKey === void 0 ? void 0 : _delegate_getLastKey.call(delegate);
|
|
165
|
-
if (nextKey == null && shouldFocusWrap)
|
|
166
|
-
nextKey = (_delegate_getLastKey1 = delegate.getLastKey) === null || _delegate_getLastKey1 === void 0 ? void 0 : _delegate_getLastKey1.call(delegate, manager.focusedKey);
|
|
167
|
-
navigateToKey(nextKey);
|
|
168
|
-
}
|
|
169
|
-
break;
|
|
170
|
-
case "ArrowLeft":
|
|
171
|
-
if (delegate.getKeyLeftOf) {
|
|
172
|
-
var _delegate_getFirstKey2, _delegate_getLastKey2;
|
|
173
|
-
e.preventDefault();
|
|
174
|
-
let nextKey = delegate.getKeyLeftOf(manager.focusedKey);
|
|
175
|
-
if (nextKey == null && shouldFocusWrap)
|
|
176
|
-
nextKey = direction === "rtl" ? (_delegate_getFirstKey2 = delegate.getFirstKey) === null || _delegate_getFirstKey2 === void 0 ? void 0 : _delegate_getFirstKey2.call(delegate, manager.focusedKey) : (_delegate_getLastKey2 = delegate.getLastKey) === null || _delegate_getLastKey2 === void 0 ? void 0 : _delegate_getLastKey2.call(delegate, manager.focusedKey);
|
|
177
|
-
navigateToKey(nextKey, direction === "rtl" ? "first" : "last");
|
|
178
|
-
}
|
|
179
|
-
break;
|
|
180
|
-
case "ArrowRight":
|
|
181
|
-
if (delegate.getKeyRightOf) {
|
|
182
|
-
var _delegate_getLastKey3, _delegate_getFirstKey3;
|
|
183
|
-
e.preventDefault();
|
|
184
|
-
let nextKey = delegate.getKeyRightOf(manager.focusedKey);
|
|
185
|
-
if (nextKey == null && shouldFocusWrap)
|
|
186
|
-
nextKey = direction === "rtl" ? (_delegate_getLastKey3 = delegate.getLastKey) === null || _delegate_getLastKey3 === void 0 ? void 0 : _delegate_getLastKey3.call(delegate, manager.focusedKey) : (_delegate_getFirstKey3 = delegate.getFirstKey) === null || _delegate_getFirstKey3 === void 0 ? void 0 : _delegate_getFirstKey3.call(delegate, manager.focusedKey);
|
|
187
|
-
navigateToKey(nextKey, direction === "rtl" ? "last" : "first");
|
|
188
|
-
}
|
|
189
|
-
break;
|
|
190
|
-
case "Home":
|
|
191
|
-
if (delegate.getFirstKey) {
|
|
192
|
-
e.preventDefault();
|
|
193
|
-
let firstKey = delegate.getFirstKey(manager.focusedKey, $feb5ffebff200149$export$16792effe837dba3(e));
|
|
194
|
-
manager.setFocusedKey(firstKey);
|
|
195
|
-
if ($feb5ffebff200149$export$16792effe837dba3(e) && e.shiftKey && manager.selectionMode === "multiple")
|
|
196
|
-
manager.extendSelection(firstKey);
|
|
197
|
-
else if (selectOnFocus)
|
|
198
|
-
manager.replaceSelection(firstKey);
|
|
199
|
-
}
|
|
200
|
-
break;
|
|
201
|
-
case "End":
|
|
202
|
-
if (delegate.getLastKey) {
|
|
203
|
-
e.preventDefault();
|
|
204
|
-
let lastKey = delegate.getLastKey(manager.focusedKey, $feb5ffebff200149$export$16792effe837dba3(e));
|
|
205
|
-
manager.setFocusedKey(lastKey);
|
|
206
|
-
if ($feb5ffebff200149$export$16792effe837dba3(e) && e.shiftKey && manager.selectionMode === "multiple")
|
|
207
|
-
manager.extendSelection(lastKey);
|
|
208
|
-
else if (selectOnFocus)
|
|
209
|
-
manager.replaceSelection(lastKey);
|
|
210
|
-
}
|
|
211
|
-
break;
|
|
212
|
-
case "PageDown":
|
|
213
|
-
if (delegate.getKeyPageBelow) {
|
|
214
|
-
e.preventDefault();
|
|
215
|
-
let nextKey = delegate.getKeyPageBelow(manager.focusedKey);
|
|
216
|
-
navigateToKey(nextKey);
|
|
217
|
-
}
|
|
218
|
-
break;
|
|
219
|
-
case "PageUp":
|
|
220
|
-
if (delegate.getKeyPageAbove) {
|
|
221
|
-
e.preventDefault();
|
|
222
|
-
let nextKey = delegate.getKeyPageAbove(manager.focusedKey);
|
|
223
|
-
navigateToKey(nextKey);
|
|
224
|
-
}
|
|
225
|
-
break;
|
|
226
|
-
case "a":
|
|
227
|
-
if ($feb5ffebff200149$export$16792effe837dba3(e) && manager.selectionMode === "multiple" && disallowSelectAll !== true) {
|
|
228
|
-
e.preventDefault();
|
|
229
|
-
manager.selectAll();
|
|
230
|
-
}
|
|
231
|
-
break;
|
|
232
|
-
case "Escape":
|
|
233
|
-
e.preventDefault();
|
|
234
|
-
if (!disallowEmptySelection)
|
|
235
|
-
manager.clearSelection();
|
|
236
|
-
break;
|
|
237
|
-
case "Tab":
|
|
238
|
-
if (!allowsTabNavigation) {
|
|
239
|
-
if (e.shiftKey)
|
|
240
|
-
ref.current.focus();
|
|
241
|
-
else {
|
|
242
|
-
let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(ref.current, {
|
|
243
|
-
tabbable: true
|
|
244
|
-
});
|
|
245
|
-
let next;
|
|
246
|
-
let last;
|
|
247
|
-
do {
|
|
248
|
-
last = walker.lastChild();
|
|
249
|
-
if (last)
|
|
250
|
-
next = last;
|
|
251
|
-
} while (last);
|
|
252
|
-
if (next && !next.contains(document.activeElement))
|
|
253
|
-
$7215afc6de606d6b$export$de79e2c695e052f3(next);
|
|
254
|
-
}
|
|
255
|
-
break;
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
};
|
|
259
|
-
let scrollPos = useRef({
|
|
260
|
-
top: 0,
|
|
261
|
-
left: 0
|
|
262
|
-
});
|
|
263
|
-
$e9faafb641e167db$export$90fc3a17d93f704c(scrollRef, "scroll", isVirtualized ? null : () => {
|
|
264
|
-
scrollPos.current = {
|
|
265
|
-
top: scrollRef.current.scrollTop,
|
|
266
|
-
left: scrollRef.current.scrollLeft
|
|
267
|
-
};
|
|
268
|
-
});
|
|
269
|
-
let onFocus = (e) => {
|
|
270
|
-
if (manager.isFocused) {
|
|
271
|
-
if (!e.currentTarget.contains(e.target))
|
|
272
|
-
manager.setFocused(false);
|
|
273
|
-
return;
|
|
274
|
-
}
|
|
275
|
-
if (!e.currentTarget.contains(e.target))
|
|
276
|
-
return;
|
|
277
|
-
manager.setFocused(true);
|
|
278
|
-
if (manager.focusedKey == null) {
|
|
279
|
-
let navigateToFirstKey = (key) => {
|
|
280
|
-
if (key != null) {
|
|
281
|
-
manager.setFocusedKey(key);
|
|
282
|
-
if (selectOnFocus)
|
|
283
|
-
manager.replaceSelection(key);
|
|
284
|
-
}
|
|
285
|
-
};
|
|
286
|
-
let relatedTarget = e.relatedTarget;
|
|
287
|
-
var _manager_lastSelectedKey, _manager_firstSelectedKey;
|
|
288
|
-
if (relatedTarget && e.currentTarget.compareDocumentPosition(relatedTarget) & Node.DOCUMENT_POSITION_FOLLOWING)
|
|
289
|
-
navigateToFirstKey((_manager_lastSelectedKey = manager.lastSelectedKey) !== null && _manager_lastSelectedKey !== void 0 ? _manager_lastSelectedKey : delegate.getLastKey());
|
|
290
|
-
else
|
|
291
|
-
navigateToFirstKey((_manager_firstSelectedKey = manager.firstSelectedKey) !== null && _manager_firstSelectedKey !== void 0 ? _manager_firstSelectedKey : delegate.getFirstKey());
|
|
292
|
-
} else if (!isVirtualized) {
|
|
293
|
-
scrollRef.current.scrollTop = scrollPos.current.top;
|
|
294
|
-
scrollRef.current.scrollLeft = scrollPos.current.left;
|
|
295
|
-
}
|
|
296
|
-
if (!isVirtualized && manager.focusedKey != null) {
|
|
297
|
-
let element = scrollRef.current.querySelector(`[data-key="${manager.focusedKey}"]`);
|
|
298
|
-
if (element) {
|
|
299
|
-
$7215afc6de606d6b$export$de79e2c695e052f3(element);
|
|
300
|
-
let modality = $507fabe10e71c6fb$export$630ff653c5ada6a9();
|
|
301
|
-
if (modality === "keyboard")
|
|
302
|
-
$2f04cbc44ee30ce0$export$c826860796309d1b(element, {
|
|
303
|
-
containingElement: ref.current
|
|
304
|
-
});
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
};
|
|
308
|
-
let onBlur = (e) => {
|
|
309
|
-
if (!e.currentTarget.contains(e.relatedTarget))
|
|
310
|
-
manager.setFocused(false);
|
|
311
|
-
};
|
|
312
|
-
const autoFocusRef = useRef(autoFocus);
|
|
313
|
-
useEffect(() => {
|
|
314
|
-
if (autoFocusRef.current) {
|
|
315
|
-
let focusedKey = null;
|
|
316
|
-
if (autoFocus === "first")
|
|
317
|
-
focusedKey = delegate.getFirstKey();
|
|
318
|
-
if (autoFocus === "last")
|
|
319
|
-
focusedKey = delegate.getLastKey();
|
|
320
|
-
let selectedKeys = manager.selectedKeys;
|
|
321
|
-
if (selectedKeys.size)
|
|
322
|
-
focusedKey = selectedKeys.values().next().value;
|
|
323
|
-
manager.setFocused(true);
|
|
324
|
-
manager.setFocusedKey(focusedKey);
|
|
325
|
-
if (focusedKey == null && !shouldUseVirtualFocus)
|
|
326
|
-
$6a99195332edec8b$export$80f3e147d781571c(ref.current);
|
|
327
|
-
}
|
|
328
|
-
autoFocusRef.current = false;
|
|
329
|
-
}, []);
|
|
330
|
-
let lastFocusedKey = useRef(manager.focusedKey);
|
|
331
|
-
useEffect(() => {
|
|
332
|
-
let modality = $507fabe10e71c6fb$export$630ff653c5ada6a9();
|
|
333
|
-
if (manager.isFocused && manager.focusedKey != null && (scrollRef === null || scrollRef === void 0 ? void 0 : scrollRef.current)) {
|
|
334
|
-
let element = scrollRef.current.querySelector(`[data-key="${manager.focusedKey}"]`);
|
|
335
|
-
if (element && modality === "keyboard") {
|
|
336
|
-
if (!isVirtualized)
|
|
337
|
-
$2f04cbc44ee30ce0$export$53a0910f038337bd(scrollRef.current, element);
|
|
338
|
-
$2f04cbc44ee30ce0$export$c826860796309d1b(element, {
|
|
339
|
-
containingElement: ref.current
|
|
340
|
-
});
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
if (manager.isFocused && manager.focusedKey == null && lastFocusedKey.current != null)
|
|
344
|
-
$6a99195332edec8b$export$80f3e147d781571c(ref.current);
|
|
345
|
-
lastFocusedKey.current = manager.focusedKey;
|
|
346
|
-
}, [
|
|
347
|
-
isVirtualized,
|
|
348
|
-
scrollRef,
|
|
349
|
-
manager.focusedKey,
|
|
350
|
-
manager.isFocused,
|
|
351
|
-
ref
|
|
352
|
-
]);
|
|
353
|
-
let handlers = {
|
|
354
|
-
onKeyDown,
|
|
355
|
-
onFocus,
|
|
356
|
-
onBlur,
|
|
357
|
-
onMouseDown(e) {
|
|
358
|
-
if (scrollRef.current === e.target)
|
|
359
|
-
e.preventDefault();
|
|
360
|
-
}
|
|
361
|
-
};
|
|
362
|
-
let { typeSelectProps } = $fb3050f43d946246$export$e32c88dfddc6e1d8({
|
|
363
|
-
keyboardDelegate: delegate,
|
|
364
|
-
selectionManager: manager
|
|
365
|
-
});
|
|
366
|
-
if (!disallowTypeAhead)
|
|
367
|
-
handlers = $3ef42575df84b30b$export$9d1611c77c2fe928(typeSelectProps, handlers);
|
|
368
|
-
let tabIndex;
|
|
369
|
-
if (!shouldUseVirtualFocus)
|
|
370
|
-
tabIndex = manager.focusedKey == null ? 0 : -1;
|
|
371
|
-
return {
|
|
372
|
-
collectionProps: __spreadProps(__spreadValues({}, handlers), {
|
|
373
|
-
tabIndex
|
|
374
|
-
})
|
|
375
|
-
};
|
|
376
|
-
}
|
|
377
|
-
function $880e95eb8b93ba9a$export$ecf600387e221c37(options) {
|
|
378
|
-
let { selectionManager: manager, key, ref, shouldSelectOnPressUp, shouldUseVirtualFocus, focus, isDisabled, onAction, allowsDifferentPressOrigin } = options;
|
|
379
|
-
let onSelect = (e) => {
|
|
380
|
-
if (e.pointerType === "keyboard" && $feb5ffebff200149$export$d3e3bd3e26688c04(e))
|
|
381
|
-
manager.toggleSelection(key);
|
|
382
|
-
else {
|
|
383
|
-
if (manager.selectionMode === "none")
|
|
384
|
-
return;
|
|
385
|
-
if (manager.selectionMode === "single") {
|
|
386
|
-
if (manager.isSelected(key) && !manager.disallowEmptySelection)
|
|
387
|
-
manager.toggleSelection(key);
|
|
388
|
-
else
|
|
389
|
-
manager.replaceSelection(key);
|
|
390
|
-
} else if (e && e.shiftKey)
|
|
391
|
-
manager.extendSelection(key);
|
|
392
|
-
else if (manager.selectionBehavior === "toggle" || e && ($feb5ffebff200149$export$16792effe837dba3(e) || e.pointerType === "touch" || e.pointerType === "virtual"))
|
|
393
|
-
manager.toggleSelection(key);
|
|
394
|
-
else
|
|
395
|
-
manager.replaceSelection(key);
|
|
396
|
-
}
|
|
397
|
-
};
|
|
398
|
-
useEffect(() => {
|
|
399
|
-
let isFocused = key === manager.focusedKey;
|
|
400
|
-
if (isFocused && manager.isFocused && !shouldUseVirtualFocus) {
|
|
401
|
-
if (focus)
|
|
402
|
-
focus();
|
|
403
|
-
else if (document.activeElement !== ref.current)
|
|
404
|
-
$6a99195332edec8b$export$80f3e147d781571c(ref.current);
|
|
405
|
-
}
|
|
406
|
-
}, [
|
|
407
|
-
ref,
|
|
408
|
-
key,
|
|
409
|
-
manager.focusedKey,
|
|
410
|
-
manager.childFocusStrategy,
|
|
411
|
-
manager.isFocused,
|
|
412
|
-
shouldUseVirtualFocus
|
|
413
|
-
]);
|
|
414
|
-
isDisabled = isDisabled || manager.isDisabled(key);
|
|
415
|
-
let itemProps = {};
|
|
416
|
-
if (!shouldUseVirtualFocus && !isDisabled)
|
|
417
|
-
itemProps = {
|
|
418
|
-
tabIndex: key === manager.focusedKey ? 0 : -1,
|
|
419
|
-
onFocus(e) {
|
|
420
|
-
if (e.target === ref.current)
|
|
421
|
-
manager.setFocusedKey(key);
|
|
422
|
-
}
|
|
423
|
-
};
|
|
424
|
-
else if (isDisabled)
|
|
425
|
-
itemProps.onMouseDown = (e) => {
|
|
426
|
-
e.preventDefault();
|
|
427
|
-
};
|
|
428
|
-
let allowsSelection = !isDisabled && manager.canSelectItem(key);
|
|
429
|
-
let allowsActions = onAction && !isDisabled;
|
|
430
|
-
let hasPrimaryAction = allowsActions && (manager.selectionBehavior === "replace" ? !allowsSelection : manager.isEmpty);
|
|
431
|
-
let hasSecondaryAction = allowsActions && allowsSelection && manager.selectionBehavior === "replace";
|
|
432
|
-
let hasAction = hasPrimaryAction || hasSecondaryAction;
|
|
433
|
-
let modality = useRef(null);
|
|
434
|
-
let longPressEnabled = hasAction && allowsSelection;
|
|
435
|
-
let longPressEnabledOnPressStart = useRef(false);
|
|
436
|
-
let hadPrimaryActionOnPressStart = useRef(false);
|
|
437
|
-
let itemPressProps = {};
|
|
438
|
-
if (shouldSelectOnPressUp) {
|
|
439
|
-
itemPressProps.onPressStart = (e) => {
|
|
440
|
-
modality.current = e.pointerType;
|
|
441
|
-
longPressEnabledOnPressStart.current = longPressEnabled;
|
|
442
|
-
if (e.pointerType === "keyboard" && (!hasAction || $880e95eb8b93ba9a$var$isSelectionKey()))
|
|
443
|
-
onSelect(e);
|
|
444
|
-
};
|
|
445
|
-
if (!allowsDifferentPressOrigin)
|
|
446
|
-
itemPressProps.onPress = (e) => {
|
|
447
|
-
if (hasPrimaryAction || hasSecondaryAction && e.pointerType !== "mouse") {
|
|
448
|
-
if (e.pointerType === "keyboard" && !$880e95eb8b93ba9a$var$isActionKey())
|
|
449
|
-
return;
|
|
450
|
-
onAction();
|
|
451
|
-
} else if (e.pointerType !== "keyboard")
|
|
452
|
-
onSelect(e);
|
|
453
|
-
};
|
|
454
|
-
else {
|
|
455
|
-
itemPressProps.onPressUp = (e) => {
|
|
456
|
-
if (e.pointerType !== "keyboard")
|
|
457
|
-
onSelect(e);
|
|
458
|
-
};
|
|
459
|
-
itemPressProps.onPress = hasPrimaryAction ? () => onAction() : null;
|
|
460
|
-
}
|
|
461
|
-
} else {
|
|
462
|
-
itemPressProps.onPressStart = (e) => {
|
|
463
|
-
modality.current = e.pointerType;
|
|
464
|
-
longPressEnabledOnPressStart.current = longPressEnabled;
|
|
465
|
-
hadPrimaryActionOnPressStart.current = hasPrimaryAction;
|
|
466
|
-
if (e.pointerType === "mouse" && !hasPrimaryAction || e.pointerType === "keyboard" && (!onAction || $880e95eb8b93ba9a$var$isSelectionKey()))
|
|
467
|
-
onSelect(e);
|
|
468
|
-
};
|
|
469
|
-
itemPressProps.onPress = (e) => {
|
|
470
|
-
if (e.pointerType === "touch" || e.pointerType === "pen" || e.pointerType === "virtual" || e.pointerType === "keyboard" && hasAction && $880e95eb8b93ba9a$var$isActionKey() || e.pointerType === "mouse" && hadPrimaryActionOnPressStart.current) {
|
|
471
|
-
if (hasAction)
|
|
472
|
-
onAction();
|
|
473
|
-
else
|
|
474
|
-
onSelect(e);
|
|
475
|
-
}
|
|
476
|
-
};
|
|
477
|
-
}
|
|
478
|
-
itemProps["data-key"] = key;
|
|
479
|
-
itemPressProps.preventFocusOnPress = shouldUseVirtualFocus;
|
|
480
|
-
let { pressProps, isPressed } = $f6c31cce2adf654f$export$45712eceda6fad21(itemPressProps);
|
|
481
|
-
let onDoubleClick = hasSecondaryAction ? (e) => {
|
|
482
|
-
if (modality.current === "mouse") {
|
|
483
|
-
e.stopPropagation();
|
|
484
|
-
e.preventDefault();
|
|
485
|
-
onAction();
|
|
486
|
-
}
|
|
487
|
-
} : void 0;
|
|
488
|
-
let { longPressProps } = $8a26561d2877236e$export$c24ed0104d07eab9({
|
|
489
|
-
isDisabled: !longPressEnabled,
|
|
490
|
-
onLongPress(e) {
|
|
491
|
-
if (e.pointerType === "touch") {
|
|
492
|
-
onSelect(e);
|
|
493
|
-
manager.setSelectionBehavior("toggle");
|
|
494
|
-
}
|
|
495
|
-
}
|
|
496
|
-
});
|
|
497
|
-
let onDragStartCapture = (e) => {
|
|
498
|
-
if (modality.current === "touch" && longPressEnabledOnPressStart.current)
|
|
499
|
-
e.preventDefault();
|
|
500
|
-
};
|
|
501
|
-
return {
|
|
502
|
-
itemProps: $3ef42575df84b30b$export$9d1611c77c2fe928(itemProps, allowsSelection || hasPrimaryAction ? pressProps : {}, longPressEnabled ? longPressProps : {}, {
|
|
503
|
-
onDoubleClick,
|
|
504
|
-
onDragStartCapture
|
|
505
|
-
}),
|
|
506
|
-
isPressed,
|
|
507
|
-
isSelected: manager.isSelected(key),
|
|
508
|
-
isFocused: manager.isFocused && manager.focusedKey === key,
|
|
509
|
-
isDisabled,
|
|
510
|
-
allowsSelection,
|
|
511
|
-
hasAction
|
|
512
|
-
};
|
|
513
|
-
}
|
|
514
|
-
function $880e95eb8b93ba9a$var$isActionKey() {
|
|
515
|
-
let event = window.event;
|
|
516
|
-
return (event === null || event === void 0 ? void 0 : event.key) === "Enter";
|
|
517
|
-
}
|
|
518
|
-
function $880e95eb8b93ba9a$var$isSelectionKey() {
|
|
519
|
-
let event = window.event;
|
|
520
|
-
return (event === null || event === void 0 ? void 0 : event.key) === " " || (event === null || event === void 0 ? void 0 : event.code) === "Space";
|
|
521
|
-
}
|
|
522
|
-
class $2a25aae57d74318e$export$a05409b8bb224a5a {
|
|
523
|
-
getNextKey(key) {
|
|
524
|
-
key = this.collection.getKeyAfter(key);
|
|
525
|
-
while (key != null) {
|
|
526
|
-
let item = this.collection.getItem(key);
|
|
527
|
-
if (item.type === "item" && !this.disabledKeys.has(key))
|
|
528
|
-
return key;
|
|
529
|
-
key = this.collection.getKeyAfter(key);
|
|
530
|
-
}
|
|
531
|
-
return null;
|
|
532
|
-
}
|
|
533
|
-
getPreviousKey(key) {
|
|
534
|
-
key = this.collection.getKeyBefore(key);
|
|
535
|
-
while (key != null) {
|
|
536
|
-
let item = this.collection.getItem(key);
|
|
537
|
-
if (item.type === "item" && !this.disabledKeys.has(key))
|
|
538
|
-
return key;
|
|
539
|
-
key = this.collection.getKeyBefore(key);
|
|
540
|
-
}
|
|
541
|
-
return null;
|
|
542
|
-
}
|
|
543
|
-
findKey(key, nextKey, shouldSkip) {
|
|
544
|
-
let item = this.getItem(key);
|
|
545
|
-
if (!item)
|
|
546
|
-
return null;
|
|
547
|
-
let prevRect = item.getBoundingClientRect();
|
|
548
|
-
do {
|
|
549
|
-
key = nextKey(key);
|
|
550
|
-
item = this.getItem(key);
|
|
551
|
-
} while (item && shouldSkip(prevRect, item.getBoundingClientRect()));
|
|
552
|
-
return key;
|
|
553
|
-
}
|
|
554
|
-
isSameRow(prevRect, itemRect) {
|
|
555
|
-
return prevRect.top === itemRect.top || prevRect.left !== itemRect.left;
|
|
556
|
-
}
|
|
557
|
-
isSameColumn(prevRect, itemRect) {
|
|
558
|
-
return prevRect.left === itemRect.left || prevRect.top !== itemRect.top;
|
|
559
|
-
}
|
|
560
|
-
getKeyBelow(key) {
|
|
561
|
-
if (this.layout === "grid" && this.orientation === "vertical")
|
|
562
|
-
return this.findKey(key, (key2) => this.getNextKey(key2), this.isSameRow);
|
|
563
|
-
else
|
|
564
|
-
return this.getNextKey(key);
|
|
565
|
-
}
|
|
566
|
-
getKeyAbove(key) {
|
|
567
|
-
if (this.layout === "grid" && this.orientation === "vertical")
|
|
568
|
-
return this.findKey(key, (key2) => this.getPreviousKey(key2), this.isSameRow);
|
|
569
|
-
else
|
|
570
|
-
return this.getPreviousKey(key);
|
|
571
|
-
}
|
|
572
|
-
getNextColumn(key, right) {
|
|
573
|
-
return right ? this.getPreviousKey(key) : this.getNextKey(key);
|
|
574
|
-
}
|
|
575
|
-
getKeyRightOf(key) {
|
|
576
|
-
if (this.layout === "grid") {
|
|
577
|
-
if (this.orientation === "vertical")
|
|
578
|
-
return this.getNextColumn(key, this.direction === "rtl");
|
|
579
|
-
else
|
|
580
|
-
return this.findKey(key, (key2) => this.getNextColumn(key2, this.direction === "rtl"), this.isSameColumn);
|
|
581
|
-
} else if (this.orientation === "horizontal")
|
|
582
|
-
return this.getNextColumn(key, this.direction === "rtl");
|
|
583
|
-
return null;
|
|
584
|
-
}
|
|
585
|
-
getKeyLeftOf(key) {
|
|
586
|
-
if (this.layout === "grid") {
|
|
587
|
-
if (this.orientation === "vertical")
|
|
588
|
-
return this.getNextColumn(key, this.direction === "ltr");
|
|
589
|
-
else
|
|
590
|
-
return this.findKey(key, (key2) => this.getNextColumn(key2, this.direction === "ltr"), this.isSameColumn);
|
|
591
|
-
} else if (this.orientation === "horizontal")
|
|
592
|
-
return this.getNextColumn(key, this.direction === "ltr");
|
|
593
|
-
return null;
|
|
594
|
-
}
|
|
595
|
-
getFirstKey() {
|
|
596
|
-
let key = this.collection.getFirstKey();
|
|
597
|
-
while (key != null) {
|
|
598
|
-
let item = this.collection.getItem(key);
|
|
599
|
-
if (item.type === "item" && !this.disabledKeys.has(key))
|
|
600
|
-
return key;
|
|
601
|
-
key = this.collection.getKeyAfter(key);
|
|
602
|
-
}
|
|
603
|
-
return null;
|
|
604
|
-
}
|
|
605
|
-
getLastKey() {
|
|
606
|
-
let key = this.collection.getLastKey();
|
|
607
|
-
while (key != null) {
|
|
608
|
-
let item = this.collection.getItem(key);
|
|
609
|
-
if (item.type === "item" && !this.disabledKeys.has(key))
|
|
610
|
-
return key;
|
|
611
|
-
key = this.collection.getKeyBefore(key);
|
|
612
|
-
}
|
|
613
|
-
return null;
|
|
614
|
-
}
|
|
615
|
-
getItem(key) {
|
|
616
|
-
return this.ref.current.querySelector(`[data-key="${key}"]`);
|
|
617
|
-
}
|
|
618
|
-
getKeyPageAbove(key) {
|
|
619
|
-
let menu = this.ref.current;
|
|
620
|
-
let item = this.getItem(key);
|
|
621
|
-
if (!item)
|
|
622
|
-
return null;
|
|
623
|
-
if (!$62d8ded9296f3872$export$2bb74740c4e19def(menu))
|
|
624
|
-
return this.getFirstKey();
|
|
625
|
-
let containerRect = menu.getBoundingClientRect();
|
|
626
|
-
let itemRect = item.getBoundingClientRect();
|
|
627
|
-
if (this.orientation === "horizontal") {
|
|
628
|
-
let containerX = containerRect.x - menu.scrollLeft;
|
|
629
|
-
let pageX = Math.max(0, itemRect.x - containerX + itemRect.width - containerRect.width);
|
|
630
|
-
while (item && itemRect.x - containerX > pageX) {
|
|
631
|
-
key = this.getKeyAbove(key);
|
|
632
|
-
item = key == null ? null : this.getItem(key);
|
|
633
|
-
itemRect = item === null || item === void 0 ? void 0 : item.getBoundingClientRect();
|
|
634
|
-
}
|
|
635
|
-
} else {
|
|
636
|
-
let containerY = containerRect.y - menu.scrollTop;
|
|
637
|
-
let pageY = Math.max(0, itemRect.y - containerY + itemRect.height - containerRect.height);
|
|
638
|
-
while (item && itemRect.y - containerY > pageY) {
|
|
639
|
-
key = this.getKeyAbove(key);
|
|
640
|
-
item = key == null ? null : this.getItem(key);
|
|
641
|
-
itemRect = item === null || item === void 0 ? void 0 : item.getBoundingClientRect();
|
|
642
|
-
}
|
|
643
|
-
}
|
|
644
|
-
return key !== null && key !== void 0 ? key : this.getFirstKey();
|
|
645
|
-
}
|
|
646
|
-
getKeyPageBelow(key) {
|
|
647
|
-
let menu = this.ref.current;
|
|
648
|
-
let item = this.getItem(key);
|
|
649
|
-
if (!item)
|
|
650
|
-
return null;
|
|
651
|
-
if (!$62d8ded9296f3872$export$2bb74740c4e19def(menu))
|
|
652
|
-
return this.getLastKey();
|
|
653
|
-
let containerRect = menu.getBoundingClientRect();
|
|
654
|
-
let itemRect = item.getBoundingClientRect();
|
|
655
|
-
if (this.orientation === "horizontal") {
|
|
656
|
-
let containerX = containerRect.x - menu.scrollLeft;
|
|
657
|
-
let pageX = Math.min(menu.scrollWidth, itemRect.x - containerX - itemRect.width + containerRect.width);
|
|
658
|
-
while (item && itemRect.x - containerX < pageX) {
|
|
659
|
-
key = this.getKeyBelow(key);
|
|
660
|
-
item = key == null ? null : this.getItem(key);
|
|
661
|
-
itemRect = item === null || item === void 0 ? void 0 : item.getBoundingClientRect();
|
|
662
|
-
}
|
|
663
|
-
} else {
|
|
664
|
-
let containerY = containerRect.y - menu.scrollTop;
|
|
665
|
-
let pageY = Math.min(menu.scrollHeight, itemRect.y - containerY - itemRect.height + containerRect.height);
|
|
666
|
-
while (item && itemRect.y - containerY < pageY) {
|
|
667
|
-
key = this.getKeyBelow(key);
|
|
668
|
-
item = key == null ? null : this.getItem(key);
|
|
669
|
-
itemRect = item === null || item === void 0 ? void 0 : item.getBoundingClientRect();
|
|
670
|
-
}
|
|
671
|
-
}
|
|
672
|
-
return key !== null && key !== void 0 ? key : this.getLastKey();
|
|
673
|
-
}
|
|
674
|
-
getKeyForSearch(search, fromKey) {
|
|
675
|
-
if (!this.collator)
|
|
676
|
-
return null;
|
|
677
|
-
let collection = this.collection;
|
|
678
|
-
let key = fromKey || this.getFirstKey();
|
|
679
|
-
while (key != null) {
|
|
680
|
-
let item = collection.getItem(key);
|
|
681
|
-
let substring = item.textValue.slice(0, search.length);
|
|
682
|
-
if (item.textValue && this.collator.compare(substring, search) === 0)
|
|
683
|
-
return key;
|
|
684
|
-
key = this.getKeyBelow(key);
|
|
685
|
-
}
|
|
686
|
-
return null;
|
|
687
|
-
}
|
|
688
|
-
constructor(...args) {
|
|
689
|
-
if (args.length === 1) {
|
|
690
|
-
let opts = args[0];
|
|
691
|
-
this.collection = opts.collection;
|
|
692
|
-
this.ref = opts.ref;
|
|
693
|
-
this.disabledKeys = opts.disabledKeys || /* @__PURE__ */ new Set();
|
|
694
|
-
this.orientation = opts.orientation;
|
|
695
|
-
this.direction = opts.direction;
|
|
696
|
-
this.layout = opts.layout || "stack";
|
|
697
|
-
} else {
|
|
698
|
-
this.collection = args[0];
|
|
699
|
-
this.disabledKeys = args[1];
|
|
700
|
-
this.ref = args[2];
|
|
701
|
-
this.collator = args[3];
|
|
702
|
-
this.layout = "stack";
|
|
703
|
-
this.orientation = "vertical";
|
|
704
|
-
}
|
|
705
|
-
if (this.layout === "stack" && this.orientation === "vertical") {
|
|
706
|
-
this.getKeyLeftOf = void 0;
|
|
707
|
-
this.getKeyRightOf = void 0;
|
|
708
|
-
}
|
|
709
|
-
}
|
|
710
|
-
}
|
|
711
|
-
function $982254629710d113$export$b95089534ab7c1fd(props) {
|
|
712
|
-
let { selectionManager, collection, disabledKeys, ref, keyboardDelegate, autoFocus, shouldFocusWrap, isVirtualized, disallowEmptySelection, selectOnFocus = selectionManager.selectionBehavior === "replace", disallowTypeAhead, shouldUseVirtualFocus, allowsTabNavigation } = props;
|
|
713
|
-
let collator = $325a3faab7a68acd$export$a16aca283550c30d({
|
|
714
|
-
usage: "search",
|
|
715
|
-
sensitivity: "base"
|
|
716
|
-
});
|
|
717
|
-
let disabledBehavior = selectionManager.disabledBehavior;
|
|
718
|
-
let delegate = useMemo(() => keyboardDelegate || new $2a25aae57d74318e$export$a05409b8bb224a5a(collection, disabledBehavior === "selection" ? /* @__PURE__ */ new Set() : disabledKeys, ref, collator), [
|
|
719
|
-
keyboardDelegate,
|
|
720
|
-
collection,
|
|
721
|
-
disabledKeys,
|
|
722
|
-
ref,
|
|
723
|
-
collator,
|
|
724
|
-
disabledBehavior
|
|
725
|
-
]);
|
|
726
|
-
let { collectionProps } = $ae20dd8cbca75726$export$d6daf82dcd84e87c({
|
|
727
|
-
ref,
|
|
728
|
-
selectionManager,
|
|
729
|
-
keyboardDelegate: delegate,
|
|
730
|
-
autoFocus,
|
|
731
|
-
shouldFocusWrap,
|
|
732
|
-
disallowEmptySelection,
|
|
733
|
-
selectOnFocus,
|
|
734
|
-
disallowTypeAhead,
|
|
735
|
-
shouldUseVirtualFocus,
|
|
736
|
-
allowsTabNavigation,
|
|
737
|
-
isVirtualized,
|
|
738
|
-
scrollRef: ref
|
|
739
|
-
});
|
|
740
|
-
return {
|
|
741
|
-
listProps: collectionProps
|
|
742
|
-
};
|
|
743
|
-
}
|
|
744
|
-
function $c1d7fb2ec91bae71$var$Item(props) {
|
|
745
|
-
return null;
|
|
746
|
-
}
|
|
747
|
-
$c1d7fb2ec91bae71$var$Item.getCollectionNode = function* getCollectionNode(props, context) {
|
|
748
|
-
let { childItems, title, children } = props;
|
|
749
|
-
let rendered = props.title || props.children;
|
|
750
|
-
let textValue = props.textValue || (typeof rendered === "string" ? rendered : "") || props["aria-label"] || "";
|
|
751
|
-
if (!textValue && !(context === null || context === void 0 ? void 0 : context.suppressTextValueWarning))
|
|
752
|
-
console.warn("<Item> with non-plain text contents is unsupported by type to select for accessibility. Please add a `textValue` prop.");
|
|
753
|
-
yield {
|
|
754
|
-
type: "item",
|
|
755
|
-
props,
|
|
756
|
-
rendered,
|
|
757
|
-
textValue,
|
|
758
|
-
"aria-label": props["aria-label"],
|
|
759
|
-
hasChildNodes: $c1d7fb2ec91bae71$var$hasChildItems(props),
|
|
760
|
-
*childNodes() {
|
|
761
|
-
if (childItems)
|
|
762
|
-
for (let child of childItems)
|
|
763
|
-
yield {
|
|
764
|
-
type: "item",
|
|
765
|
-
value: child
|
|
766
|
-
};
|
|
767
|
-
else if (title) {
|
|
768
|
-
let items = [];
|
|
769
|
-
React__default.Children.forEach(children, (child) => {
|
|
770
|
-
items.push({
|
|
771
|
-
type: "item",
|
|
772
|
-
element: child
|
|
773
|
-
});
|
|
774
|
-
});
|
|
775
|
-
yield* __yieldStar(items);
|
|
776
|
-
}
|
|
777
|
-
}
|
|
778
|
-
};
|
|
779
|
-
};
|
|
780
|
-
function $c1d7fb2ec91bae71$var$hasChildItems(props) {
|
|
781
|
-
if (props.hasChildItems != null)
|
|
782
|
-
return props.hasChildItems;
|
|
783
|
-
if (props.childItems)
|
|
784
|
-
return true;
|
|
785
|
-
if (props.title && React__default.Children.count(props.children) > 0)
|
|
786
|
-
return true;
|
|
787
|
-
return false;
|
|
788
|
-
}
|
|
789
|
-
let $c1d7fb2ec91bae71$export$6d08773d2e66f8f2 = $c1d7fb2ec91bae71$var$Item;
|
|
790
|
-
function $9fc4852771d079eb$var$Section(props) {
|
|
791
|
-
return null;
|
|
792
|
-
}
|
|
793
|
-
$9fc4852771d079eb$var$Section.getCollectionNode = function* getCollectionNode2(props) {
|
|
794
|
-
let { children, title, items } = props;
|
|
795
|
-
yield {
|
|
796
|
-
type: "section",
|
|
797
|
-
props,
|
|
798
|
-
hasChildNodes: true,
|
|
799
|
-
rendered: title,
|
|
800
|
-
"aria-label": props["aria-label"],
|
|
801
|
-
*childNodes() {
|
|
802
|
-
if (typeof children === "function") {
|
|
803
|
-
if (!items)
|
|
804
|
-
throw new Error("props.children was a function but props.items is missing");
|
|
805
|
-
for (let item of items)
|
|
806
|
-
yield {
|
|
807
|
-
type: "item",
|
|
808
|
-
value: item,
|
|
809
|
-
renderer: children
|
|
810
|
-
};
|
|
811
|
-
} else {
|
|
812
|
-
let items2 = [];
|
|
813
|
-
React__default.Children.forEach(children, (child) => {
|
|
814
|
-
items2.push({
|
|
815
|
-
type: "item",
|
|
816
|
-
element: child
|
|
817
|
-
});
|
|
818
|
-
});
|
|
819
|
-
yield* __yieldStar(items2);
|
|
820
|
-
}
|
|
821
|
-
}
|
|
822
|
-
};
|
|
823
|
-
};
|
|
824
|
-
let $9fc4852771d079eb$export$6e2c8f0811a474ce = $9fc4852771d079eb$var$Section;
|
|
825
|
-
class $eb2240fc39a57fa5$export$bf788dd355e3a401 {
|
|
826
|
-
build(props, context) {
|
|
827
|
-
this.context = context;
|
|
828
|
-
return $eb2240fc39a57fa5$var$iterable(() => this.iterateCollection(props));
|
|
829
|
-
}
|
|
830
|
-
*iterateCollection(props) {
|
|
831
|
-
let { children, items } = props;
|
|
832
|
-
if (typeof children === "function") {
|
|
833
|
-
if (!items)
|
|
834
|
-
throw new Error("props.children was a function but props.items is missing");
|
|
835
|
-
for (let item of props.items)
|
|
836
|
-
yield* __yieldStar(this.getFullNode({
|
|
837
|
-
value: item
|
|
838
|
-
}, {
|
|
839
|
-
renderer: children
|
|
840
|
-
}));
|
|
841
|
-
} else {
|
|
842
|
-
let items2 = [];
|
|
843
|
-
React__default.Children.forEach(children, (child) => {
|
|
844
|
-
items2.push(child);
|
|
845
|
-
});
|
|
846
|
-
let index = 0;
|
|
847
|
-
for (let item of items2) {
|
|
848
|
-
let nodes = this.getFullNode({
|
|
849
|
-
element: item,
|
|
850
|
-
index
|
|
851
|
-
}, {});
|
|
852
|
-
for (let node of nodes) {
|
|
853
|
-
index++;
|
|
854
|
-
yield node;
|
|
855
|
-
}
|
|
856
|
-
}
|
|
857
|
-
}
|
|
858
|
-
}
|
|
859
|
-
getKey(item, partialNode, state, parentKey) {
|
|
860
|
-
if (item.key != null)
|
|
861
|
-
return item.key;
|
|
862
|
-
if (partialNode.type === "cell" && partialNode.key != null)
|
|
863
|
-
return `${parentKey}${partialNode.key}`;
|
|
864
|
-
let v = partialNode.value;
|
|
865
|
-
if (v != null) {
|
|
866
|
-
var _v_key;
|
|
867
|
-
let key = (_v_key = v.key) !== null && _v_key !== void 0 ? _v_key : v.id;
|
|
868
|
-
if (key == null)
|
|
869
|
-
throw new Error("No key found for item");
|
|
870
|
-
return key;
|
|
871
|
-
}
|
|
872
|
-
return parentKey ? `${parentKey}.${partialNode.index}` : `$.${partialNode.index}`;
|
|
873
|
-
}
|
|
874
|
-
getChildState(state, partialNode) {
|
|
875
|
-
return {
|
|
876
|
-
renderer: partialNode.renderer || state.renderer
|
|
877
|
-
};
|
|
878
|
-
}
|
|
879
|
-
*getFullNode(partialNode, state, parentKey, parentNode) {
|
|
880
|
-
let element = partialNode.element;
|
|
881
|
-
if (!element && partialNode.value && state && state.renderer) {
|
|
882
|
-
let cached = this.cache.get(partialNode.value);
|
|
883
|
-
if (cached && (!cached.shouldInvalidate || !cached.shouldInvalidate(this.context))) {
|
|
884
|
-
cached.index = partialNode.index;
|
|
885
|
-
cached.parentKey = parentNode ? parentNode.key : null;
|
|
886
|
-
yield cached;
|
|
887
|
-
return;
|
|
888
|
-
}
|
|
889
|
-
element = state.renderer(partialNode.value);
|
|
890
|
-
}
|
|
891
|
-
if (React__default.isValidElement(element)) {
|
|
892
|
-
let type = element.type;
|
|
893
|
-
if (typeof type !== "function" && typeof type.getCollectionNode !== "function") {
|
|
894
|
-
let name = typeof element.type === "function" ? element.type.name : element.type;
|
|
895
|
-
throw new Error(`Unknown element <${name}> in collection.`);
|
|
896
|
-
}
|
|
897
|
-
let childNodes = type.getCollectionNode(element.props, this.context);
|
|
898
|
-
let index = partialNode.index;
|
|
899
|
-
let result = childNodes.next();
|
|
900
|
-
while (!result.done && result.value) {
|
|
901
|
-
let childNode = result.value;
|
|
902
|
-
partialNode.index = index;
|
|
903
|
-
let nodeKey = childNode.key;
|
|
904
|
-
if (!nodeKey)
|
|
905
|
-
nodeKey = childNode.element ? null : this.getKey(element, partialNode, state, parentKey);
|
|
906
|
-
let nodes = this.getFullNode(__spreadProps(__spreadValues({}, childNode), {
|
|
907
|
-
key: nodeKey,
|
|
908
|
-
index,
|
|
909
|
-
wrapper: $eb2240fc39a57fa5$var$compose(partialNode.wrapper, childNode.wrapper)
|
|
910
|
-
}), this.getChildState(state, childNode), parentKey ? `${parentKey}${element.key}` : element.key, parentNode);
|
|
911
|
-
let children = [
|
|
912
|
-
...nodes
|
|
913
|
-
];
|
|
914
|
-
for (let node2 of children) {
|
|
915
|
-
node2.value = childNode.value || partialNode.value;
|
|
916
|
-
if (node2.value)
|
|
917
|
-
this.cache.set(node2.value, node2);
|
|
918
|
-
if (partialNode.type && node2.type !== partialNode.type)
|
|
919
|
-
throw new Error(`Unsupported type <${$eb2240fc39a57fa5$var$capitalize(node2.type)}> in <${$eb2240fc39a57fa5$var$capitalize(parentNode.type)}>. Only <${$eb2240fc39a57fa5$var$capitalize(partialNode.type)}> is supported.`);
|
|
920
|
-
index++;
|
|
921
|
-
yield node2;
|
|
922
|
-
}
|
|
923
|
-
result = childNodes.next(children);
|
|
924
|
-
}
|
|
925
|
-
return;
|
|
926
|
-
}
|
|
927
|
-
if (partialNode.key == null)
|
|
928
|
-
return;
|
|
929
|
-
let builder = this;
|
|
930
|
-
let node = {
|
|
931
|
-
type: partialNode.type,
|
|
932
|
-
props: partialNode.props,
|
|
933
|
-
key: partialNode.key,
|
|
934
|
-
parentKey: parentNode ? parentNode.key : null,
|
|
935
|
-
value: partialNode.value,
|
|
936
|
-
level: parentNode ? parentNode.level + 1 : 0,
|
|
937
|
-
index: partialNode.index,
|
|
938
|
-
rendered: partialNode.rendered,
|
|
939
|
-
textValue: partialNode.textValue,
|
|
940
|
-
"aria-label": partialNode["aria-label"],
|
|
941
|
-
wrapper: partialNode.wrapper,
|
|
942
|
-
shouldInvalidate: partialNode.shouldInvalidate,
|
|
943
|
-
hasChildNodes: partialNode.hasChildNodes,
|
|
944
|
-
childNodes: $eb2240fc39a57fa5$var$iterable(function* () {
|
|
945
|
-
if (!partialNode.hasChildNodes)
|
|
946
|
-
return;
|
|
947
|
-
let index = 0;
|
|
948
|
-
for (let child of partialNode.childNodes()) {
|
|
949
|
-
if (child.key != null)
|
|
950
|
-
child.key = `${node.key}${child.key}`;
|
|
951
|
-
child.index = index;
|
|
952
|
-
let nodes = builder.getFullNode(child, builder.getChildState(state, child), node.key, node);
|
|
953
|
-
for (let node2 of nodes) {
|
|
954
|
-
index++;
|
|
955
|
-
yield node2;
|
|
956
|
-
}
|
|
957
|
-
}
|
|
958
|
-
})
|
|
959
|
-
};
|
|
960
|
-
yield node;
|
|
961
|
-
}
|
|
962
|
-
constructor() {
|
|
963
|
-
this.cache = /* @__PURE__ */ new WeakMap();
|
|
964
|
-
}
|
|
965
|
-
}
|
|
966
|
-
function $eb2240fc39a57fa5$var$iterable(iterator) {
|
|
967
|
-
let cache = [];
|
|
968
|
-
let iterable = null;
|
|
969
|
-
return {
|
|
970
|
-
*[Symbol.iterator]() {
|
|
971
|
-
for (let item of cache)
|
|
972
|
-
yield item;
|
|
973
|
-
if (!iterable)
|
|
974
|
-
iterable = iterator();
|
|
975
|
-
for (let item of iterable) {
|
|
976
|
-
cache.push(item);
|
|
977
|
-
yield item;
|
|
978
|
-
}
|
|
979
|
-
}
|
|
980
|
-
};
|
|
981
|
-
}
|
|
982
|
-
function $eb2240fc39a57fa5$var$compose(outer, inner) {
|
|
983
|
-
if (outer && inner)
|
|
984
|
-
return (element) => outer(inner(element));
|
|
985
|
-
if (outer)
|
|
986
|
-
return outer;
|
|
987
|
-
if (inner)
|
|
988
|
-
return inner;
|
|
989
|
-
}
|
|
990
|
-
function $eb2240fc39a57fa5$var$capitalize(str) {
|
|
991
|
-
return str[0].toUpperCase() + str.slice(1);
|
|
992
|
-
}
|
|
993
|
-
function $7613b1592d41b092$export$6cd28814d92fa9c9(props, factory, context) {
|
|
994
|
-
let builder = useMemo(() => new $eb2240fc39a57fa5$export$bf788dd355e3a401(), []);
|
|
995
|
-
let { children, items, collection } = props;
|
|
996
|
-
let result = useMemo(() => {
|
|
997
|
-
if (collection)
|
|
998
|
-
return collection;
|
|
999
|
-
let nodes = builder.build({
|
|
1000
|
-
children,
|
|
1001
|
-
items
|
|
1002
|
-
}, context);
|
|
1003
|
-
return factory(nodes);
|
|
1004
|
-
}, [
|
|
1005
|
-
builder,
|
|
1006
|
-
children,
|
|
1007
|
-
items,
|
|
1008
|
-
collection,
|
|
1009
|
-
context,
|
|
1010
|
-
factory
|
|
1011
|
-
]);
|
|
1012
|
-
return result;
|
|
1013
|
-
}
|
|
1014
|
-
function $c5a24bc478652b5f$export$1005530eda016c13(node, collection) {
|
|
1015
|
-
if (typeof collection.getChildren === "function")
|
|
1016
|
-
return collection.getChildren(node.key);
|
|
1017
|
-
return node.childNodes;
|
|
1018
|
-
}
|
|
1019
|
-
function $c5a24bc478652b5f$export$fbdeaa6a76694f71(iterable) {
|
|
1020
|
-
return $c5a24bc478652b5f$export$5f3398f8733f90e2(iterable, 0);
|
|
1021
|
-
}
|
|
1022
|
-
function $c5a24bc478652b5f$export$5f3398f8733f90e2(iterable, index) {
|
|
1023
|
-
if (index < 0)
|
|
1024
|
-
return void 0;
|
|
1025
|
-
let i = 0;
|
|
1026
|
-
for (let item of iterable) {
|
|
1027
|
-
if (i === index)
|
|
1028
|
-
return item;
|
|
1029
|
-
i++;
|
|
1030
|
-
}
|
|
1031
|
-
}
|
|
1032
|
-
function $c5a24bc478652b5f$export$8c434b3a7a4dad6(collection, a, b) {
|
|
1033
|
-
if (a.parentKey === b.parentKey)
|
|
1034
|
-
return a.index - b.index;
|
|
1035
|
-
let aAncestors = $c5a24bc478652b5f$var$getAncestors(collection, a);
|
|
1036
|
-
let bAncestors = $c5a24bc478652b5f$var$getAncestors(collection, b);
|
|
1037
|
-
let firstNonMatchingAncestor = aAncestors.slice(0, bAncestors.length).findIndex((a2, i) => a2 !== bAncestors[i]);
|
|
1038
|
-
if (firstNonMatchingAncestor !== -1) {
|
|
1039
|
-
a = aAncestors[firstNonMatchingAncestor];
|
|
1040
|
-
b = bAncestors[firstNonMatchingAncestor];
|
|
1041
|
-
return a.index - b.index;
|
|
1042
|
-
}
|
|
1043
|
-
return -1;
|
|
1044
|
-
}
|
|
1045
|
-
function $c5a24bc478652b5f$var$getAncestors(collection, node) {
|
|
1046
|
-
let parents = [];
|
|
1047
|
-
while ((node === null || node === void 0 ? void 0 : node.parentKey) != null) {
|
|
1048
|
-
node = collection.getItem(node.parentKey);
|
|
1049
|
-
parents.unshift(node);
|
|
1050
|
-
}
|
|
1051
|
-
return parents;
|
|
1052
|
-
}
|
|
1053
|
-
const $453cc9f0df89c0a5$var$cache = /* @__PURE__ */ new WeakMap();
|
|
1054
|
-
function $453cc9f0df89c0a5$export$77d5aafae4e095b2(collection) {
|
|
1055
|
-
let count = $453cc9f0df89c0a5$var$cache.get(collection);
|
|
1056
|
-
if (count != null)
|
|
1057
|
-
return count;
|
|
1058
|
-
count = 0;
|
|
1059
|
-
let countItems = (items) => {
|
|
1060
|
-
for (let item of items)
|
|
1061
|
-
if (item.type === "section")
|
|
1062
|
-
countItems($c5a24bc478652b5f$export$1005530eda016c13(item, collection));
|
|
1063
|
-
else
|
|
1064
|
-
count++;
|
|
1065
|
-
};
|
|
1066
|
-
countItems(collection);
|
|
1067
|
-
$453cc9f0df89c0a5$var$cache.set(collection, count);
|
|
1068
|
-
return count;
|
|
1069
|
-
}
|
|
1070
|
-
function $parcel$interopDefault(a) {
|
|
1071
|
-
return a && a.__esModule ? a.default : a;
|
|
1072
|
-
}
|
|
1073
|
-
var $2cbb7ca666678a14$exports = {};
|
|
1074
|
-
var $c0398ad35c3639b7$exports = {};
|
|
1075
|
-
$c0398ad35c3639b7$exports = {
|
|
1076
|
-
"longPressMessage": `اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة`
|
|
1077
|
-
};
|
|
1078
|
-
var $7af657c4165927c3$exports = {};
|
|
1079
|
-
$7af657c4165927c3$exports = {
|
|
1080
|
-
"longPressMessage": `Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто`
|
|
1081
|
-
};
|
|
1082
|
-
var $d95d4da6d531ab81$exports = {};
|
|
1083
|
-
$d95d4da6d531ab81$exports = {
|
|
1084
|
-
"longPressMessage": `Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku`
|
|
1085
|
-
};
|
|
1086
|
-
var $24ebda9c775dca17$exports = {};
|
|
1087
|
-
$24ebda9c775dca17$exports = {
|
|
1088
|
-
"longPressMessage": `Langt tryk eller tryk på Alt + pil ned for at åbne menuen`
|
|
1089
|
-
};
|
|
1090
|
-
var $743e0dfca6cab1e9$exports = {};
|
|
1091
|
-
$743e0dfca6cab1e9$exports = {
|
|
1092
|
-
"longPressMessage": `Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen`
|
|
1093
|
-
};
|
|
1094
|
-
var $a2f41026e05f1c84$exports = {};
|
|
1095
|
-
$a2f41026e05f1c84$exports = {
|
|
1096
|
-
"longPressMessage": `Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού`
|
|
1097
|
-
};
|
|
1098
|
-
var $43b800e97c901737$exports = {};
|
|
1099
|
-
$43b800e97c901737$exports = {
|
|
1100
|
-
"longPressMessage": `Long press or press Alt + ArrowDown to open menu`
|
|
1101
|
-
};
|
|
1102
|
-
var $442f5f6ac211e29f$exports = {};
|
|
1103
|
-
$442f5f6ac211e29f$exports = {
|
|
1104
|
-
"longPressMessage": `Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú`
|
|
1105
|
-
};
|
|
1106
|
-
var $dff280acfeb2d8ac$exports = {};
|
|
1107
|
-
$dff280acfeb2d8ac$exports = {
|
|
1108
|
-
"longPressMessage": `Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool`
|
|
1109
|
-
};
|
|
1110
|
-
var $51608325613944d7$exports = {};
|
|
1111
|
-
$51608325613944d7$exports = {
|
|
1112
|
-
"longPressMessage": `Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli`
|
|
1113
|
-
};
|
|
1114
|
-
var $c4a1b1eabeaa87be$exports = {};
|
|
1115
|
-
$c4a1b1eabeaa87be$exports = {
|
|
1116
|
-
"longPressMessage": `Appuyez de manière prolongée ou appuyez sur Alt + Flèche vers le bas pour ouvrir le menu.`
|
|
1117
|
-
};
|
|
1118
|
-
var $8c74815cdee18d1b$exports = {};
|
|
1119
|
-
$8c74815cdee18d1b$exports = {
|
|
1120
|
-
"longPressMessage": `לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט`
|
|
1121
|
-
};
|
|
1122
|
-
var $fd0e9ef6a7fe0ec9$exports = {};
|
|
1123
|
-
$fd0e9ef6a7fe0ec9$exports = {
|
|
1124
|
-
"longPressMessage": `Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika`
|
|
1125
|
-
};
|
|
1126
|
-
var $a89a74a39eba465a$exports = {};
|
|
1127
|
-
$a89a74a39eba465a$exports = {
|
|
1128
|
-
"longPressMessage": `Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához`
|
|
1129
|
-
};
|
|
1130
|
-
var $edc7c66594a0ae8a$exports = {};
|
|
1131
|
-
$edc7c66594a0ae8a$exports = {
|
|
1132
|
-
"longPressMessage": `Premere a lungo o premere Alt + Freccia giù per aprire il menu`
|
|
1133
|
-
};
|
|
1134
|
-
var $f1ab51510712db52$exports = {};
|
|
1135
|
-
$f1ab51510712db52$exports = {
|
|
1136
|
-
"longPressMessage": `長押しまたは Alt+下矢印キーでメニューを開く`
|
|
1137
|
-
};
|
|
1138
|
-
var $f9b672d9b82fa3d6$exports = {};
|
|
1139
|
-
$f9b672d9b82fa3d6$exports = {
|
|
1140
|
-
"longPressMessage": `길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기`
|
|
1141
|
-
};
|
|
1142
|
-
var $a385f3910feda499$exports = {};
|
|
1143
|
-
$a385f3910feda499$exports = {
|
|
1144
|
-
"longPressMessage": `Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“.`
|
|
1145
|
-
};
|
|
1146
|
-
var $4f1bde932c441789$exports = {};
|
|
1147
|
-
$4f1bde932c441789$exports = {
|
|
1148
|
-
"longPressMessage": `Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa`
|
|
1149
|
-
};
|
|
1150
|
-
var $914a51a8a594d5be$exports = {};
|
|
1151
|
-
$914a51a8a594d5be$exports = {
|
|
1152
|
-
"longPressMessage": `Langt trykk eller trykk Alt + PilNed for å åpne menyen`
|
|
1153
|
-
};
|
|
1154
|
-
var $89aaf803103bb500$exports = {};
|
|
1155
|
-
$89aaf803103bb500$exports = {
|
|
1156
|
-
"longPressMessage": `Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen`
|
|
1157
|
-
};
|
|
1158
|
-
var $c685891476dbaaca$exports = {};
|
|
1159
|
-
$c685891476dbaaca$exports = {
|
|
1160
|
-
"longPressMessage": `Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu`
|
|
1161
|
-
};
|
|
1162
|
-
var $885879b9b10c2959$exports = {};
|
|
1163
|
-
$885879b9b10c2959$exports = {
|
|
1164
|
-
"longPressMessage": `Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu`
|
|
1165
|
-
};
|
|
1166
|
-
var $6b39616688a51692$exports = {};
|
|
1167
|
-
$6b39616688a51692$exports = {
|
|
1168
|
-
"longPressMessage": `Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu`
|
|
1169
|
-
};
|
|
1170
|
-
var $f26362aed63f47e2$exports = {};
|
|
1171
|
-
$f26362aed63f47e2$exports = {
|
|
1172
|
-
"longPressMessage": `Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul`
|
|
1173
|
-
};
|
|
1174
|
-
var $06cbade644558bf0$exports = {};
|
|
1175
|
-
$06cbade644558bf0$exports = {
|
|
1176
|
-
"longPressMessage": `Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню`
|
|
1177
|
-
};
|
|
1178
|
-
var $0a391ff68f9d59b1$exports = {};
|
|
1179
|
-
$0a391ff68f9d59b1$exports = {
|
|
1180
|
-
"longPressMessage": `Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol`
|
|
1181
|
-
};
|
|
1182
|
-
var $8193cf0e649c7928$exports = {};
|
|
1183
|
-
$8193cf0e649c7928$exports = {
|
|
1184
|
-
"longPressMessage": `Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol`
|
|
1185
|
-
};
|
|
1186
|
-
var $f398debcce5a5c55$exports = {};
|
|
1187
|
-
$f398debcce5a5c55$exports = {
|
|
1188
|
-
"longPressMessage": `Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni`
|
|
1189
|
-
};
|
|
1190
|
-
var $9e9fef000aa4c013$exports = {};
|
|
1191
|
-
$9e9fef000aa4c013$exports = {
|
|
1192
|
-
"longPressMessage": `Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn`
|
|
1193
|
-
};
|
|
1194
|
-
var $c016c8183bbe3d68$exports = {};
|
|
1195
|
-
$c016c8183bbe3d68$exports = {
|
|
1196
|
-
"longPressMessage": `Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın`
|
|
1197
|
-
};
|
|
1198
|
-
var $ca4f6c8462244e62$exports = {};
|
|
1199
|
-
$ca4f6c8462244e62$exports = {
|
|
1200
|
-
"longPressMessage": `Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню`
|
|
1201
|
-
};
|
|
1202
|
-
var $2d9960c02ccac927$exports = {};
|
|
1203
|
-
$2d9960c02ccac927$exports = {
|
|
1204
|
-
"longPressMessage": `长按或按 Alt + 向下方向键以打开菜单`
|
|
1205
|
-
};
|
|
1206
|
-
var $f1b682a4c8c5631c$exports = {};
|
|
1207
|
-
$f1b682a4c8c5631c$exports = {
|
|
1208
|
-
"longPressMessage": `長按或按 Alt+向下鍵以開啟功能表`
|
|
1209
|
-
};
|
|
1210
|
-
$2cbb7ca666678a14$exports = {
|
|
1211
|
-
"ar-AE": $c0398ad35c3639b7$exports,
|
|
1212
|
-
"bg-BG": $7af657c4165927c3$exports,
|
|
1213
|
-
"cs-CZ": $d95d4da6d531ab81$exports,
|
|
1214
|
-
"da-DK": $24ebda9c775dca17$exports,
|
|
1215
|
-
"de-DE": $743e0dfca6cab1e9$exports,
|
|
1216
|
-
"el-GR": $a2f41026e05f1c84$exports,
|
|
1217
|
-
"en-US": $43b800e97c901737$exports,
|
|
1218
|
-
"es-ES": $442f5f6ac211e29f$exports,
|
|
1219
|
-
"et-EE": $dff280acfeb2d8ac$exports,
|
|
1220
|
-
"fi-FI": $51608325613944d7$exports,
|
|
1221
|
-
"fr-FR": $c4a1b1eabeaa87be$exports,
|
|
1222
|
-
"he-IL": $8c74815cdee18d1b$exports,
|
|
1223
|
-
"hr-HR": $fd0e9ef6a7fe0ec9$exports,
|
|
1224
|
-
"hu-HU": $a89a74a39eba465a$exports,
|
|
1225
|
-
"it-IT": $edc7c66594a0ae8a$exports,
|
|
1226
|
-
"ja-JP": $f1ab51510712db52$exports,
|
|
1227
|
-
"ko-KR": $f9b672d9b82fa3d6$exports,
|
|
1228
|
-
"lt-LT": $a385f3910feda499$exports,
|
|
1229
|
-
"lv-LV": $4f1bde932c441789$exports,
|
|
1230
|
-
"nb-NO": $914a51a8a594d5be$exports,
|
|
1231
|
-
"nl-NL": $89aaf803103bb500$exports,
|
|
1232
|
-
"pl-PL": $c685891476dbaaca$exports,
|
|
1233
|
-
"pt-BR": $885879b9b10c2959$exports,
|
|
1234
|
-
"pt-PT": $6b39616688a51692$exports,
|
|
1235
|
-
"ro-RO": $f26362aed63f47e2$exports,
|
|
1236
|
-
"ru-RU": $06cbade644558bf0$exports,
|
|
1237
|
-
"sk-SK": $0a391ff68f9d59b1$exports,
|
|
1238
|
-
"sl-SI": $8193cf0e649c7928$exports,
|
|
1239
|
-
"sr-SP": $f398debcce5a5c55$exports,
|
|
1240
|
-
"sv-SE": $9e9fef000aa4c013$exports,
|
|
1241
|
-
"tr-TR": $c016c8183bbe3d68$exports,
|
|
1242
|
-
"uk-UA": $ca4f6c8462244e62$exports,
|
|
1243
|
-
"zh-CN": $2d9960c02ccac927$exports,
|
|
1244
|
-
"zh-TW": $f1b682a4c8c5631c$exports
|
|
1245
|
-
};
|
|
1246
|
-
function $168583247155ddda$export$dc9c12ed27dd1b49(props, state, ref) {
|
|
1247
|
-
let { type = "menu", isDisabled, trigger = "press" } = props;
|
|
1248
|
-
let menuTriggerId = $bdb11010cef70236$export$f680877a34711e37();
|
|
1249
|
-
let { triggerProps, overlayProps } = $628037886ba31236$export$f9d5c8beee7d008d({
|
|
1250
|
-
type
|
|
1251
|
-
}, state, ref);
|
|
1252
|
-
let onKeyDown = (e) => {
|
|
1253
|
-
if (isDisabled)
|
|
1254
|
-
return;
|
|
1255
|
-
if (trigger === "longPress" && !e.altKey)
|
|
1256
|
-
return;
|
|
1257
|
-
if (ref && ref.current)
|
|
1258
|
-
switch (e.key) {
|
|
1259
|
-
case "Enter":
|
|
1260
|
-
case " ":
|
|
1261
|
-
if (trigger === "longPress")
|
|
1262
|
-
return;
|
|
1263
|
-
case "ArrowDown":
|
|
1264
|
-
if (!("continuePropagation" in e))
|
|
1265
|
-
e.stopPropagation();
|
|
1266
|
-
e.preventDefault();
|
|
1267
|
-
state.toggle("first");
|
|
1268
|
-
break;
|
|
1269
|
-
case "ArrowUp":
|
|
1270
|
-
if (!("continuePropagation" in e))
|
|
1271
|
-
e.stopPropagation();
|
|
1272
|
-
e.preventDefault();
|
|
1273
|
-
state.toggle("last");
|
|
1274
|
-
break;
|
|
1275
|
-
}
|
|
1276
|
-
};
|
|
1277
|
-
let stringFormatter = $fca6afa0e843324b$export$f12b703ca79dfbb1(/* @__PURE__ */ $parcel$interopDefault($2cbb7ca666678a14$exports));
|
|
1278
|
-
let { longPressProps } = $8a26561d2877236e$export$c24ed0104d07eab9({
|
|
1279
|
-
isDisabled: isDisabled || trigger !== "longPress",
|
|
1280
|
-
accessibilityDescription: stringFormatter.format("longPressMessage"),
|
|
1281
|
-
onLongPressStart() {
|
|
1282
|
-
state.close();
|
|
1283
|
-
},
|
|
1284
|
-
onLongPress() {
|
|
1285
|
-
state.open("first");
|
|
1286
|
-
}
|
|
1287
|
-
});
|
|
1288
|
-
let pressProps = {
|
|
1289
|
-
onPressStart(e) {
|
|
1290
|
-
if (e.pointerType !== "touch" && e.pointerType !== "keyboard" && !isDisabled)
|
|
1291
|
-
state.toggle(e.pointerType === "virtual" ? "first" : null);
|
|
1292
|
-
},
|
|
1293
|
-
onPress(e) {
|
|
1294
|
-
if (e.pointerType === "touch" && !isDisabled)
|
|
1295
|
-
state.toggle();
|
|
1296
|
-
}
|
|
1297
|
-
};
|
|
1298
|
-
delete triggerProps.onPress;
|
|
1299
|
-
return {
|
|
1300
|
-
menuTriggerProps: __spreadProps(__spreadValues(__spreadValues({}, triggerProps), trigger === "press" ? pressProps : longPressProps), {
|
|
1301
|
-
id: menuTriggerId,
|
|
1302
|
-
onKeyDown
|
|
1303
|
-
}),
|
|
1304
|
-
menuProps: __spreadProps(__spreadValues({}, overlayProps), {
|
|
1305
|
-
"aria-labelledby": menuTriggerId,
|
|
1306
|
-
autoFocus: state.focusStrategy || true,
|
|
1307
|
-
onClose: state.close
|
|
1308
|
-
})
|
|
1309
|
-
};
|
|
1310
|
-
}
|
|
1311
|
-
const $d5336fe17ce95402$export$6f49b4016bfc8d56 = /* @__PURE__ */ new WeakMap();
|
|
1312
|
-
function $d5336fe17ce95402$export$38eaa17faae8f579(props, state, ref) {
|
|
1313
|
-
let _a = props, { shouldFocusWrap = true } = _a, otherProps = __objRest(_a, ["shouldFocusWrap"]);
|
|
1314
|
-
if (!props["aria-label"] && !props["aria-labelledby"])
|
|
1315
|
-
console.warn("An aria-label or aria-labelledby prop is required for accessibility.");
|
|
1316
|
-
let domProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
|
|
1317
|
-
labelable: true
|
|
1318
|
-
});
|
|
1319
|
-
let { listProps } = $982254629710d113$export$b95089534ab7c1fd(__spreadProps(__spreadValues({}, otherProps), {
|
|
1320
|
-
ref,
|
|
1321
|
-
selectionManager: state.selectionManager,
|
|
1322
|
-
collection: state.collection,
|
|
1323
|
-
disabledKeys: state.disabledKeys,
|
|
1324
|
-
shouldFocusWrap
|
|
1325
|
-
}));
|
|
1326
|
-
$d5336fe17ce95402$export$6f49b4016bfc8d56.set(state, {
|
|
1327
|
-
onClose: props.onClose,
|
|
1328
|
-
onAction: props.onAction
|
|
1329
|
-
});
|
|
1330
|
-
return {
|
|
1331
|
-
menuProps: $3ef42575df84b30b$export$9d1611c77c2fe928(domProps, __spreadProps(__spreadValues({
|
|
1332
|
-
role: "menu",
|
|
1333
|
-
// this forces AT to move their cursors into any open sub dialogs, the sub dialogs contain hidden close buttons in order to come back to this level of the menu
|
|
1334
|
-
"aria-hidden": state.expandedKeys.size > 0 ? true : void 0
|
|
1335
|
-
}, listProps), {
|
|
1336
|
-
onKeyDown: (e) => {
|
|
1337
|
-
if (e.key !== "Escape")
|
|
1338
|
-
listProps.onKeyDown(e);
|
|
1339
|
-
}
|
|
1340
|
-
}))
|
|
1341
|
-
};
|
|
1342
|
-
}
|
|
1343
|
-
function $a2e5df62f93c7633$export$9d32628fc2aea7da(props, state, ref) {
|
|
1344
|
-
let { key, closeOnSelect, isVirtualized, "aria-haspopup": hasPopup } = props;
|
|
1345
|
-
let { direction } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7();
|
|
1346
|
-
let isTrigger = !!hasPopup;
|
|
1347
|
-
let isOpen = state.expandedKeys.has(key);
|
|
1348
|
-
var _props_isDisabled;
|
|
1349
|
-
let isDisabled = (_props_isDisabled = props.isDisabled) !== null && _props_isDisabled !== void 0 ? _props_isDisabled : state.disabledKeys.has(key);
|
|
1350
|
-
var _props_isSelected;
|
|
1351
|
-
let isSelected = (_props_isSelected = props.isSelected) !== null && _props_isSelected !== void 0 ? _props_isSelected : state.selectionManager.isSelected(key);
|
|
1352
|
-
let openTimeout = useRef();
|
|
1353
|
-
let cancelOpenTimeout = useCallback(() => {
|
|
1354
|
-
if (openTimeout.current) {
|
|
1355
|
-
clearTimeout(openTimeout.current);
|
|
1356
|
-
openTimeout.current = void 0;
|
|
1357
|
-
}
|
|
1358
|
-
}, [
|
|
1359
|
-
openTimeout
|
|
1360
|
-
]);
|
|
1361
|
-
let onSubmenuOpen = $8ae05eaa5c114e9c$export$7f54fc3180508a52(() => {
|
|
1362
|
-
cancelOpenTimeout();
|
|
1363
|
-
state.setExpandedKeys(/* @__PURE__ */ new Set([
|
|
1364
|
-
key
|
|
1365
|
-
]));
|
|
1366
|
-
});
|
|
1367
|
-
$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
|
|
1368
|
-
return () => cancelOpenTimeout();
|
|
1369
|
-
}, [
|
|
1370
|
-
cancelOpenTimeout
|
|
1371
|
-
]);
|
|
1372
|
-
let data = $d5336fe17ce95402$export$6f49b4016bfc8d56.get(state);
|
|
1373
|
-
let onClose = props.onClose || data.onClose;
|
|
1374
|
-
let onActionMenuDialogTrigger = useCallback(() => {
|
|
1375
|
-
onSubmenuOpen();
|
|
1376
|
-
}, []);
|
|
1377
|
-
let onAction = isTrigger ? onActionMenuDialogTrigger : props.onAction || data.onAction;
|
|
1378
|
-
let role = "menuitem";
|
|
1379
|
-
if (state.selectionManager.selectionMode === "single")
|
|
1380
|
-
role = "menuitemradio";
|
|
1381
|
-
else if (state.selectionManager.selectionMode === "multiple")
|
|
1382
|
-
role = "menuitemcheckbox";
|
|
1383
|
-
let labelId = $bdb11010cef70236$export$b4cc09c592e8fdb8();
|
|
1384
|
-
let descriptionId = $bdb11010cef70236$export$b4cc09c592e8fdb8();
|
|
1385
|
-
let keyboardId = $bdb11010cef70236$export$b4cc09c592e8fdb8();
|
|
1386
|
-
let ariaProps = {
|
|
1387
|
-
"aria-disabled": isDisabled || void 0,
|
|
1388
|
-
role,
|
|
1389
|
-
"aria-label": props["aria-label"],
|
|
1390
|
-
"aria-labelledby": labelId,
|
|
1391
|
-
"aria-describedby": [
|
|
1392
|
-
descriptionId,
|
|
1393
|
-
keyboardId
|
|
1394
|
-
].filter(Boolean).join(" ") || void 0
|
|
1395
|
-
};
|
|
1396
|
-
if (state.selectionManager.selectionMode !== "none")
|
|
1397
|
-
ariaProps["aria-checked"] = isSelected;
|
|
1398
|
-
if (isVirtualized) {
|
|
1399
|
-
ariaProps["aria-posinset"] = state.collection.getItem(key).index;
|
|
1400
|
-
ariaProps["aria-setsize"] = $453cc9f0df89c0a5$export$77d5aafae4e095b2(state.collection);
|
|
1401
|
-
}
|
|
1402
|
-
if (hasPopup != null) {
|
|
1403
|
-
ariaProps["aria-haspopup"] = hasPopup;
|
|
1404
|
-
ariaProps["aria-expanded"] = isOpen ? "true" : "false";
|
|
1405
|
-
}
|
|
1406
|
-
let onPressStart = (e) => {
|
|
1407
|
-
if (e.pointerType === "keyboard" && onAction)
|
|
1408
|
-
onAction(key);
|
|
1409
|
-
};
|
|
1410
|
-
let onPressUp = (e) => {
|
|
1411
|
-
if (e.pointerType !== "keyboard") {
|
|
1412
|
-
if (onAction)
|
|
1413
|
-
onAction(key);
|
|
1414
|
-
if (!isTrigger && onClose && (closeOnSelect !== null && closeOnSelect !== void 0 ? closeOnSelect : state.selectionManager.selectionMode !== "multiple"))
|
|
1415
|
-
onClose();
|
|
1416
|
-
}
|
|
1417
|
-
};
|
|
1418
|
-
let { itemProps, isFocused } = $880e95eb8b93ba9a$export$ecf600387e221c37({
|
|
1419
|
-
selectionManager: state.selectionManager,
|
|
1420
|
-
key,
|
|
1421
|
-
ref,
|
|
1422
|
-
shouldSelectOnPressUp: true,
|
|
1423
|
-
allowsDifferentPressOrigin: true
|
|
1424
|
-
});
|
|
1425
|
-
let { pressProps, isPressed } = $f6c31cce2adf654f$export$45712eceda6fad21({
|
|
1426
|
-
onPressStart,
|
|
1427
|
-
onPressUp,
|
|
1428
|
-
isDisabled: isDisabled || isTrigger && state.expandedKeys.has(key)
|
|
1429
|
-
});
|
|
1430
|
-
let { hoverProps } = $6179b936705e76d3$export$ae780daf29e6d456({
|
|
1431
|
-
isDisabled,
|
|
1432
|
-
onHoverStart() {
|
|
1433
|
-
if (!$507fabe10e71c6fb$export$b9b3dfddab17db27() && !(isTrigger && state.expandedKeys.has(key))) {
|
|
1434
|
-
state.selectionManager.setFocused(true);
|
|
1435
|
-
state.selectionManager.setFocusedKey(key);
|
|
1436
|
-
let isFocused2 = key === state.selectionManager.focusedKey;
|
|
1437
|
-
if (isFocused2 && state.selectionManager.isFocused && document.activeElement !== ref.current)
|
|
1438
|
-
$6a99195332edec8b$export$80f3e147d781571c(ref.current);
|
|
1439
|
-
}
|
|
1440
|
-
},
|
|
1441
|
-
onHoverChange: (isHovered) => {
|
|
1442
|
-
if (isHovered && isTrigger && !state.expandedKeys.has(key)) {
|
|
1443
|
-
if (!openTimeout.current)
|
|
1444
|
-
openTimeout.current = setTimeout(() => {
|
|
1445
|
-
onSubmenuOpen();
|
|
1446
|
-
}, 200);
|
|
1447
|
-
} else if (!isHovered)
|
|
1448
|
-
cancelOpenTimeout();
|
|
1449
|
-
}
|
|
1450
|
-
});
|
|
1451
|
-
let { keyboardProps } = $46d819fcbaf35654$export$8f71654801c2f7cd({
|
|
1452
|
-
onKeyDown: (e) => {
|
|
1453
|
-
if (e.repeat) {
|
|
1454
|
-
e.continuePropagation();
|
|
1455
|
-
return;
|
|
1456
|
-
}
|
|
1457
|
-
switch (e.key) {
|
|
1458
|
-
case " ":
|
|
1459
|
-
if (!isDisabled && state.selectionManager.selectionMode === "none" && !isTrigger && closeOnSelect !== false && onClose)
|
|
1460
|
-
onClose();
|
|
1461
|
-
break;
|
|
1462
|
-
case "Enter":
|
|
1463
|
-
if (!isDisabled && closeOnSelect !== false && !isTrigger && onClose)
|
|
1464
|
-
onClose();
|
|
1465
|
-
break;
|
|
1466
|
-
case "ArrowRight":
|
|
1467
|
-
if (isTrigger && direction === "ltr")
|
|
1468
|
-
onSubmenuOpen();
|
|
1469
|
-
else
|
|
1470
|
-
e.continuePropagation();
|
|
1471
|
-
break;
|
|
1472
|
-
case "ArrowLeft":
|
|
1473
|
-
if (isTrigger && direction === "rtl")
|
|
1474
|
-
onSubmenuOpen();
|
|
1475
|
-
else
|
|
1476
|
-
e.continuePropagation();
|
|
1477
|
-
break;
|
|
1478
|
-
default:
|
|
1479
|
-
e.continuePropagation();
|
|
1480
|
-
break;
|
|
1481
|
-
}
|
|
1482
|
-
}
|
|
1483
|
-
});
|
|
1484
|
-
return {
|
|
1485
|
-
menuItemProps: __spreadValues(__spreadValues({}, ariaProps), $3ef42575df84b30b$export$9d1611c77c2fe928(itemProps, pressProps, hoverProps, keyboardProps)),
|
|
1486
|
-
labelProps: {
|
|
1487
|
-
id: labelId
|
|
1488
|
-
},
|
|
1489
|
-
descriptionProps: {
|
|
1490
|
-
id: descriptionId
|
|
1491
|
-
},
|
|
1492
|
-
keyboardShortcutProps: {
|
|
1493
|
-
id: keyboardId
|
|
1494
|
-
},
|
|
1495
|
-
isFocused,
|
|
1496
|
-
isSelected,
|
|
1497
|
-
isPressed,
|
|
1498
|
-
isDisabled
|
|
1499
|
-
};
|
|
1500
|
-
}
|
|
1501
|
-
function $3e5eb2498db5b506$export$73f7a44322579622(props) {
|
|
1502
|
-
let { heading, "aria-label": ariaLabel } = props;
|
|
1503
|
-
let headingId = $bdb11010cef70236$export$f680877a34711e37();
|
|
1504
|
-
return {
|
|
1505
|
-
itemProps: {
|
|
1506
|
-
role: "presentation"
|
|
1507
|
-
},
|
|
1508
|
-
headingProps: heading ? {
|
|
1509
|
-
// Techincally, menus cannot contain headings according to ARIA.
|
|
1510
|
-
// We hide the heading from assistive technology, using role="presentation",
|
|
1511
|
-
// and only use it as a label for the nested group.
|
|
1512
|
-
id: headingId,
|
|
1513
|
-
role: "presentation"
|
|
1514
|
-
} : {},
|
|
1515
|
-
groupProps: {
|
|
1516
|
-
role: "group",
|
|
1517
|
-
"aria-label": ariaLabel,
|
|
1518
|
-
"aria-labelledby": heading ? headingId : void 0
|
|
1519
|
-
}
|
|
1520
|
-
};
|
|
1521
|
-
}
|
|
1522
|
-
function $f4b273590fab9f93$export$52210f68a14655d0(props) {
|
|
1523
|
-
let domProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
|
|
1524
|
-
labelable: true
|
|
1525
|
-
});
|
|
1526
|
-
let ariaOrientation;
|
|
1527
|
-
if (props.orientation === "vertical")
|
|
1528
|
-
ariaOrientation = "vertical";
|
|
1529
|
-
if (props.elementType !== "hr")
|
|
1530
|
-
return {
|
|
1531
|
-
separatorProps: __spreadProps(__spreadValues({}, domProps), {
|
|
1532
|
-
role: "separator",
|
|
1533
|
-
"aria-orientation": ariaOrientation
|
|
1534
|
-
})
|
|
1535
|
-
};
|
|
1536
|
-
return {
|
|
1537
|
-
separatorProps: domProps
|
|
1538
|
-
};
|
|
1539
|
-
}
|
|
1540
|
-
class $e40ea825a81a3709$export$52baac22726c72bf extends Set {
|
|
1541
|
-
constructor(keys, anchorKey, currentKey) {
|
|
1542
|
-
super(keys);
|
|
1543
|
-
if (keys instanceof $e40ea825a81a3709$export$52baac22726c72bf) {
|
|
1544
|
-
this.anchorKey = anchorKey || keys.anchorKey;
|
|
1545
|
-
this.currentKey = currentKey || keys.currentKey;
|
|
1546
|
-
} else {
|
|
1547
|
-
this.anchorKey = anchorKey;
|
|
1548
|
-
this.currentKey = currentKey;
|
|
1549
|
-
}
|
|
1550
|
-
}
|
|
1551
|
-
}
|
|
1552
|
-
function $7af3f5b51489e0b5$var$equalSets(setA, setB) {
|
|
1553
|
-
if (setA.size !== setB.size)
|
|
1554
|
-
return false;
|
|
1555
|
-
for (let item of setA) {
|
|
1556
|
-
if (!setB.has(item))
|
|
1557
|
-
return false;
|
|
1558
|
-
}
|
|
1559
|
-
return true;
|
|
1560
|
-
}
|
|
1561
|
-
function $7af3f5b51489e0b5$export$253fe78d46329472(props) {
|
|
1562
|
-
let { selectionMode = "none", disallowEmptySelection, allowDuplicateSelectionEvents, selectionBehavior: selectionBehaviorProp = "toggle", disabledBehavior = "all" } = props;
|
|
1563
|
-
let isFocusedRef = useRef(false);
|
|
1564
|
-
let [, setFocused] = useState(false);
|
|
1565
|
-
let focusedKeyRef = useRef(null);
|
|
1566
|
-
let childFocusStrategyRef = useRef(null);
|
|
1567
|
-
let [, setFocusedKey] = useState(null);
|
|
1568
|
-
let selectedKeysProp = useMemo(() => $7af3f5b51489e0b5$var$convertSelection(props.selectedKeys), [
|
|
1569
|
-
props.selectedKeys
|
|
1570
|
-
]);
|
|
1571
|
-
let defaultSelectedKeys = useMemo(() => $7af3f5b51489e0b5$var$convertSelection(props.defaultSelectedKeys, new $e40ea825a81a3709$export$52baac22726c72bf()), [
|
|
1572
|
-
props.defaultSelectedKeys
|
|
1573
|
-
]);
|
|
1574
|
-
let [selectedKeys, setSelectedKeys] = $458b0a5536c1a7cf$export$40bfa8c7b0832715(selectedKeysProp, defaultSelectedKeys, props.onSelectionChange);
|
|
1575
|
-
let disabledKeysProp = useMemo(() => props.disabledKeys ? new Set(props.disabledKeys) : /* @__PURE__ */ new Set(), [
|
|
1576
|
-
props.disabledKeys
|
|
1577
|
-
]);
|
|
1578
|
-
let [selectionBehavior, setSelectionBehavior] = useState(selectionBehaviorProp);
|
|
1579
|
-
if (selectionBehaviorProp === "replace" && selectionBehavior === "toggle" && typeof selectedKeys === "object" && selectedKeys.size === 0)
|
|
1580
|
-
setSelectionBehavior("replace");
|
|
1581
|
-
let lastSelectionBehavior = useRef(selectionBehaviorProp);
|
|
1582
|
-
useEffect(() => {
|
|
1583
|
-
if (selectionBehaviorProp !== lastSelectionBehavior.current) {
|
|
1584
|
-
setSelectionBehavior(selectionBehaviorProp);
|
|
1585
|
-
lastSelectionBehavior.current = selectionBehaviorProp;
|
|
1586
|
-
}
|
|
1587
|
-
}, [
|
|
1588
|
-
selectionBehaviorProp
|
|
1589
|
-
]);
|
|
1590
|
-
return {
|
|
1591
|
-
selectionMode,
|
|
1592
|
-
disallowEmptySelection,
|
|
1593
|
-
selectionBehavior,
|
|
1594
|
-
setSelectionBehavior,
|
|
1595
|
-
get isFocused() {
|
|
1596
|
-
return isFocusedRef.current;
|
|
1597
|
-
},
|
|
1598
|
-
setFocused(f) {
|
|
1599
|
-
isFocusedRef.current = f;
|
|
1600
|
-
setFocused(f);
|
|
1601
|
-
},
|
|
1602
|
-
get focusedKey() {
|
|
1603
|
-
return focusedKeyRef.current;
|
|
1604
|
-
},
|
|
1605
|
-
get childFocusStrategy() {
|
|
1606
|
-
return childFocusStrategyRef.current;
|
|
1607
|
-
},
|
|
1608
|
-
setFocusedKey(k, childFocusStrategy = "first") {
|
|
1609
|
-
focusedKeyRef.current = k;
|
|
1610
|
-
childFocusStrategyRef.current = childFocusStrategy;
|
|
1611
|
-
setFocusedKey(k);
|
|
1612
|
-
},
|
|
1613
|
-
selectedKeys,
|
|
1614
|
-
setSelectedKeys(keys) {
|
|
1615
|
-
if (allowDuplicateSelectionEvents || !$7af3f5b51489e0b5$var$equalSets(keys, selectedKeys))
|
|
1616
|
-
setSelectedKeys(keys);
|
|
1617
|
-
},
|
|
1618
|
-
disabledKeys: disabledKeysProp,
|
|
1619
|
-
disabledBehavior
|
|
1620
|
-
};
|
|
1621
|
-
}
|
|
1622
|
-
function $7af3f5b51489e0b5$var$convertSelection(selection, defaultValue) {
|
|
1623
|
-
if (!selection)
|
|
1624
|
-
return defaultValue;
|
|
1625
|
-
return selection === "all" ? "all" : new $e40ea825a81a3709$export$52baac22726c72bf(selection);
|
|
1626
|
-
}
|
|
1627
|
-
class $d496c0a20b6e58ec$export$6c8a5aaad13c9852 {
|
|
1628
|
-
/**
|
|
1629
|
-
* The type of selection that is allowed in the collection.
|
|
1630
|
-
*/
|
|
1631
|
-
get selectionMode() {
|
|
1632
|
-
return this.state.selectionMode;
|
|
1633
|
-
}
|
|
1634
|
-
/**
|
|
1635
|
-
* Whether the collection allows empty selection.
|
|
1636
|
-
*/
|
|
1637
|
-
get disallowEmptySelection() {
|
|
1638
|
-
return this.state.disallowEmptySelection;
|
|
1639
|
-
}
|
|
1640
|
-
/**
|
|
1641
|
-
* The selection behavior for the collection.
|
|
1642
|
-
*/
|
|
1643
|
-
get selectionBehavior() {
|
|
1644
|
-
return this.state.selectionBehavior;
|
|
1645
|
-
}
|
|
1646
|
-
/**
|
|
1647
|
-
* Sets the selection behavior for the collection.
|
|
1648
|
-
*/
|
|
1649
|
-
setSelectionBehavior(selectionBehavior) {
|
|
1650
|
-
this.state.setSelectionBehavior(selectionBehavior);
|
|
1651
|
-
}
|
|
1652
|
-
/**
|
|
1653
|
-
* Whether the collection is currently focused.
|
|
1654
|
-
*/
|
|
1655
|
-
get isFocused() {
|
|
1656
|
-
return this.state.isFocused;
|
|
1657
|
-
}
|
|
1658
|
-
/**
|
|
1659
|
-
* Sets whether the collection is focused.
|
|
1660
|
-
*/
|
|
1661
|
-
setFocused(isFocused) {
|
|
1662
|
-
this.state.setFocused(isFocused);
|
|
1663
|
-
}
|
|
1664
|
-
/**
|
|
1665
|
-
* The current focused key in the collection.
|
|
1666
|
-
*/
|
|
1667
|
-
get focusedKey() {
|
|
1668
|
-
return this.state.focusedKey;
|
|
1669
|
-
}
|
|
1670
|
-
/** Whether the first or last child of the focused key should receive focus. */
|
|
1671
|
-
get childFocusStrategy() {
|
|
1672
|
-
return this.state.childFocusStrategy;
|
|
1673
|
-
}
|
|
1674
|
-
/**
|
|
1675
|
-
* Sets the focused key.
|
|
1676
|
-
*/
|
|
1677
|
-
setFocusedKey(key, childFocusStrategy) {
|
|
1678
|
-
if (key == null || this.collection.getItem(key))
|
|
1679
|
-
this.state.setFocusedKey(key, childFocusStrategy);
|
|
1680
|
-
}
|
|
1681
|
-
/**
|
|
1682
|
-
* The currently selected keys in the collection.
|
|
1683
|
-
*/
|
|
1684
|
-
get selectedKeys() {
|
|
1685
|
-
return this.state.selectedKeys === "all" ? new Set(this.getSelectAllKeys()) : this.state.selectedKeys;
|
|
1686
|
-
}
|
|
1687
|
-
/**
|
|
1688
|
-
* The raw selection value for the collection.
|
|
1689
|
-
* Either 'all' for select all, or a set of keys.
|
|
1690
|
-
*/
|
|
1691
|
-
get rawSelection() {
|
|
1692
|
-
return this.state.selectedKeys;
|
|
1693
|
-
}
|
|
1694
|
-
/**
|
|
1695
|
-
* Returns whether a key is selected.
|
|
1696
|
-
*/
|
|
1697
|
-
isSelected(key) {
|
|
1698
|
-
if (this.state.selectionMode === "none")
|
|
1699
|
-
return false;
|
|
1700
|
-
key = this.getKey(key);
|
|
1701
|
-
return this.state.selectedKeys === "all" ? this.canSelectItem(key) : this.state.selectedKeys.has(key);
|
|
1702
|
-
}
|
|
1703
|
-
/**
|
|
1704
|
-
* Whether the selection is empty.
|
|
1705
|
-
*/
|
|
1706
|
-
get isEmpty() {
|
|
1707
|
-
return this.state.selectedKeys !== "all" && this.state.selectedKeys.size === 0;
|
|
1708
|
-
}
|
|
1709
|
-
/**
|
|
1710
|
-
* Whether all items in the collection are selected.
|
|
1711
|
-
*/
|
|
1712
|
-
get isSelectAll() {
|
|
1713
|
-
if (this.isEmpty)
|
|
1714
|
-
return false;
|
|
1715
|
-
if (this.state.selectedKeys === "all")
|
|
1716
|
-
return true;
|
|
1717
|
-
if (this._isSelectAll != null)
|
|
1718
|
-
return this._isSelectAll;
|
|
1719
|
-
let allKeys = this.getSelectAllKeys();
|
|
1720
|
-
let selectedKeys = this.state.selectedKeys;
|
|
1721
|
-
this._isSelectAll = allKeys.every((k) => selectedKeys.has(k));
|
|
1722
|
-
return this._isSelectAll;
|
|
1723
|
-
}
|
|
1724
|
-
get firstSelectedKey() {
|
|
1725
|
-
let first = null;
|
|
1726
|
-
for (let key of this.state.selectedKeys) {
|
|
1727
|
-
let item = this.collection.getItem(key);
|
|
1728
|
-
if (!first || item && $c5a24bc478652b5f$export$8c434b3a7a4dad6(this.collection, item, first) < 0)
|
|
1729
|
-
first = item;
|
|
1730
|
-
}
|
|
1731
|
-
return first === null || first === void 0 ? void 0 : first.key;
|
|
1732
|
-
}
|
|
1733
|
-
get lastSelectedKey() {
|
|
1734
|
-
let last = null;
|
|
1735
|
-
for (let key of this.state.selectedKeys) {
|
|
1736
|
-
let item = this.collection.getItem(key);
|
|
1737
|
-
if (!last || item && $c5a24bc478652b5f$export$8c434b3a7a4dad6(this.collection, item, last) > 0)
|
|
1738
|
-
last = item;
|
|
1739
|
-
}
|
|
1740
|
-
return last === null || last === void 0 ? void 0 : last.key;
|
|
1741
|
-
}
|
|
1742
|
-
get disabledKeys() {
|
|
1743
|
-
return this.state.disabledKeys;
|
|
1744
|
-
}
|
|
1745
|
-
get disabledBehavior() {
|
|
1746
|
-
return this.state.disabledBehavior;
|
|
1747
|
-
}
|
|
1748
|
-
/**
|
|
1749
|
-
* Extends the selection to the given key.
|
|
1750
|
-
*/
|
|
1751
|
-
extendSelection(toKey) {
|
|
1752
|
-
if (this.selectionMode === "none")
|
|
1753
|
-
return;
|
|
1754
|
-
if (this.selectionMode === "single") {
|
|
1755
|
-
this.replaceSelection(toKey);
|
|
1756
|
-
return;
|
|
1757
|
-
}
|
|
1758
|
-
toKey = this.getKey(toKey);
|
|
1759
|
-
let selection;
|
|
1760
|
-
if (this.state.selectedKeys === "all")
|
|
1761
|
-
selection = new $e40ea825a81a3709$export$52baac22726c72bf([
|
|
1762
|
-
toKey
|
|
1763
|
-
], toKey, toKey);
|
|
1764
|
-
else {
|
|
1765
|
-
let selectedKeys = this.state.selectedKeys;
|
|
1766
|
-
let anchorKey = selectedKeys.anchorKey || toKey;
|
|
1767
|
-
selection = new $e40ea825a81a3709$export$52baac22726c72bf(selectedKeys, anchorKey, toKey);
|
|
1768
|
-
for (let key of this.getKeyRange(anchorKey, selectedKeys.currentKey || toKey))
|
|
1769
|
-
selection.delete(key);
|
|
1770
|
-
for (let key of this.getKeyRange(toKey, anchorKey))
|
|
1771
|
-
if (this.canSelectItem(key))
|
|
1772
|
-
selection.add(key);
|
|
1773
|
-
}
|
|
1774
|
-
this.state.setSelectedKeys(selection);
|
|
1775
|
-
}
|
|
1776
|
-
getKeyRange(from, to) {
|
|
1777
|
-
let fromItem = this.collection.getItem(from);
|
|
1778
|
-
let toItem = this.collection.getItem(to);
|
|
1779
|
-
if (fromItem && toItem) {
|
|
1780
|
-
if ($c5a24bc478652b5f$export$8c434b3a7a4dad6(this.collection, fromItem, toItem) <= 0)
|
|
1781
|
-
return this.getKeyRangeInternal(from, to);
|
|
1782
|
-
return this.getKeyRangeInternal(to, from);
|
|
1783
|
-
}
|
|
1784
|
-
return [];
|
|
1785
|
-
}
|
|
1786
|
-
getKeyRangeInternal(from, to) {
|
|
1787
|
-
let keys = [];
|
|
1788
|
-
let key = from;
|
|
1789
|
-
while (key) {
|
|
1790
|
-
let item = this.collection.getItem(key);
|
|
1791
|
-
if (item && item.type === "item" || item.type === "cell" && this.allowsCellSelection)
|
|
1792
|
-
keys.push(key);
|
|
1793
|
-
if (key === to)
|
|
1794
|
-
return keys;
|
|
1795
|
-
key = this.collection.getKeyAfter(key);
|
|
1796
|
-
}
|
|
1797
|
-
return [];
|
|
1798
|
-
}
|
|
1799
|
-
getKey(key) {
|
|
1800
|
-
let item = this.collection.getItem(key);
|
|
1801
|
-
if (!item)
|
|
1802
|
-
return key;
|
|
1803
|
-
if (item.type === "cell" && this.allowsCellSelection)
|
|
1804
|
-
return key;
|
|
1805
|
-
while (item.type !== "item" && item.parentKey != null)
|
|
1806
|
-
item = this.collection.getItem(item.parentKey);
|
|
1807
|
-
if (!item || item.type !== "item")
|
|
1808
|
-
return null;
|
|
1809
|
-
return item.key;
|
|
1810
|
-
}
|
|
1811
|
-
/**
|
|
1812
|
-
* Toggles whether the given key is selected.
|
|
1813
|
-
*/
|
|
1814
|
-
toggleSelection(key) {
|
|
1815
|
-
if (this.selectionMode === "none")
|
|
1816
|
-
return;
|
|
1817
|
-
if (this.selectionMode === "single" && !this.isSelected(key)) {
|
|
1818
|
-
this.replaceSelection(key);
|
|
1819
|
-
return;
|
|
1820
|
-
}
|
|
1821
|
-
key = this.getKey(key);
|
|
1822
|
-
if (key == null)
|
|
1823
|
-
return;
|
|
1824
|
-
let keys = new $e40ea825a81a3709$export$52baac22726c72bf(this.state.selectedKeys === "all" ? this.getSelectAllKeys() : this.state.selectedKeys);
|
|
1825
|
-
if (keys.has(key))
|
|
1826
|
-
keys.delete(key);
|
|
1827
|
-
else if (this.canSelectItem(key)) {
|
|
1828
|
-
keys.add(key);
|
|
1829
|
-
keys.anchorKey = key;
|
|
1830
|
-
keys.currentKey = key;
|
|
1831
|
-
}
|
|
1832
|
-
if (this.disallowEmptySelection && keys.size === 0)
|
|
1833
|
-
return;
|
|
1834
|
-
this.state.setSelectedKeys(keys);
|
|
1835
|
-
}
|
|
1836
|
-
/**
|
|
1837
|
-
* Replaces the selection with only the given key.
|
|
1838
|
-
*/
|
|
1839
|
-
replaceSelection(key) {
|
|
1840
|
-
if (this.selectionMode === "none")
|
|
1841
|
-
return;
|
|
1842
|
-
key = this.getKey(key);
|
|
1843
|
-
if (key == null)
|
|
1844
|
-
return;
|
|
1845
|
-
let selection = this.canSelectItem(key) ? new $e40ea825a81a3709$export$52baac22726c72bf([
|
|
1846
|
-
key
|
|
1847
|
-
], key, key) : new $e40ea825a81a3709$export$52baac22726c72bf();
|
|
1848
|
-
this.state.setSelectedKeys(selection);
|
|
1849
|
-
}
|
|
1850
|
-
/**
|
|
1851
|
-
* Replaces the selection with the given keys.
|
|
1852
|
-
*/
|
|
1853
|
-
setSelectedKeys(keys) {
|
|
1854
|
-
if (this.selectionMode === "none")
|
|
1855
|
-
return;
|
|
1856
|
-
let selection = new $e40ea825a81a3709$export$52baac22726c72bf();
|
|
1857
|
-
for (let key of keys) {
|
|
1858
|
-
key = this.getKey(key);
|
|
1859
|
-
if (key != null) {
|
|
1860
|
-
selection.add(key);
|
|
1861
|
-
if (this.selectionMode === "single")
|
|
1862
|
-
break;
|
|
1863
|
-
}
|
|
1864
|
-
}
|
|
1865
|
-
this.state.setSelectedKeys(selection);
|
|
1866
|
-
}
|
|
1867
|
-
getSelectAllKeys() {
|
|
1868
|
-
let keys = [];
|
|
1869
|
-
let addKeys = (key) => {
|
|
1870
|
-
while (key) {
|
|
1871
|
-
if (this.canSelectItem(key)) {
|
|
1872
|
-
let item = this.collection.getItem(key);
|
|
1873
|
-
if (item.type === "item")
|
|
1874
|
-
keys.push(key);
|
|
1875
|
-
if (item.hasChildNodes && (this.allowsCellSelection || item.type !== "item"))
|
|
1876
|
-
addKeys($c5a24bc478652b5f$export$fbdeaa6a76694f71($c5a24bc478652b5f$export$1005530eda016c13(item, this.collection)).key);
|
|
1877
|
-
}
|
|
1878
|
-
key = this.collection.getKeyAfter(key);
|
|
1879
|
-
}
|
|
1880
|
-
};
|
|
1881
|
-
addKeys(this.collection.getFirstKey());
|
|
1882
|
-
return keys;
|
|
1883
|
-
}
|
|
1884
|
-
/**
|
|
1885
|
-
* Selects all items in the collection.
|
|
1886
|
-
*/
|
|
1887
|
-
selectAll() {
|
|
1888
|
-
if (!this.isSelectAll && this.selectionMode === "multiple")
|
|
1889
|
-
this.state.setSelectedKeys("all");
|
|
1890
|
-
}
|
|
1891
|
-
/**
|
|
1892
|
-
* Removes all keys from the selection.
|
|
1893
|
-
*/
|
|
1894
|
-
clearSelection() {
|
|
1895
|
-
if (!this.disallowEmptySelection && (this.state.selectedKeys === "all" || this.state.selectedKeys.size > 0))
|
|
1896
|
-
this.state.setSelectedKeys(new $e40ea825a81a3709$export$52baac22726c72bf());
|
|
1897
|
-
}
|
|
1898
|
-
/**
|
|
1899
|
-
* Toggles between select all and an empty selection.
|
|
1900
|
-
*/
|
|
1901
|
-
toggleSelectAll() {
|
|
1902
|
-
if (this.isSelectAll)
|
|
1903
|
-
this.clearSelection();
|
|
1904
|
-
else
|
|
1905
|
-
this.selectAll();
|
|
1906
|
-
}
|
|
1907
|
-
select(key, e) {
|
|
1908
|
-
if (this.selectionMode === "none")
|
|
1909
|
-
return;
|
|
1910
|
-
if (this.selectionMode === "single") {
|
|
1911
|
-
if (this.isSelected(key) && !this.disallowEmptySelection)
|
|
1912
|
-
this.toggleSelection(key);
|
|
1913
|
-
else
|
|
1914
|
-
this.replaceSelection(key);
|
|
1915
|
-
} else if (this.selectionBehavior === "toggle" || e && (e.pointerType === "touch" || e.pointerType === "virtual"))
|
|
1916
|
-
this.toggleSelection(key);
|
|
1917
|
-
else
|
|
1918
|
-
this.replaceSelection(key);
|
|
1919
|
-
}
|
|
1920
|
-
/**
|
|
1921
|
-
* Returns whether the current selection is equal to the given selection.
|
|
1922
|
-
*/
|
|
1923
|
-
isSelectionEqual(selection) {
|
|
1924
|
-
if (selection === this.state.selectedKeys)
|
|
1925
|
-
return true;
|
|
1926
|
-
let selectedKeys = this.selectedKeys;
|
|
1927
|
-
if (selection.size !== selectedKeys.size)
|
|
1928
|
-
return false;
|
|
1929
|
-
for (let key of selection) {
|
|
1930
|
-
if (!selectedKeys.has(key))
|
|
1931
|
-
return false;
|
|
1932
|
-
}
|
|
1933
|
-
for (let key of selectedKeys) {
|
|
1934
|
-
if (!selection.has(key))
|
|
1935
|
-
return false;
|
|
1936
|
-
}
|
|
1937
|
-
return true;
|
|
1938
|
-
}
|
|
1939
|
-
canSelectItem(key) {
|
|
1940
|
-
if (this.state.selectionMode === "none" || this.state.disabledKeys.has(key))
|
|
1941
|
-
return false;
|
|
1942
|
-
let item = this.collection.getItem(key);
|
|
1943
|
-
if (!item || item.type === "cell" && !this.allowsCellSelection)
|
|
1944
|
-
return false;
|
|
1945
|
-
return true;
|
|
1946
|
-
}
|
|
1947
|
-
isDisabled(key) {
|
|
1948
|
-
return this.state.disabledKeys.has(key) && this.state.disabledBehavior === "all";
|
|
1949
|
-
}
|
|
1950
|
-
constructor(collection, state, options) {
|
|
1951
|
-
this.collection = collection;
|
|
1952
|
-
this.state = state;
|
|
1953
|
-
var _options_allowsCellSelection;
|
|
1954
|
-
this.allowsCellSelection = (_options_allowsCellSelection = options === null || options === void 0 ? void 0 : options.allowsCellSelection) !== null && _options_allowsCellSelection !== void 0 ? _options_allowsCellSelection : false;
|
|
1955
|
-
this._isSelectAll = null;
|
|
1956
|
-
}
|
|
1957
|
-
}
|
|
1958
|
-
function $a28c903ee9ad8dc5$export$79fefeb1c2091ac3(props) {
|
|
1959
|
-
let overlayTriggerState = $fc909762b330b746$export$61c6a8c84e605fb6(props);
|
|
1960
|
-
let [focusStrategy, setFocusStrategy] = useState(null);
|
|
1961
|
-
return __spreadProps(__spreadValues({
|
|
1962
|
-
focusStrategy
|
|
1963
|
-
}, overlayTriggerState), {
|
|
1964
|
-
open(focusStrategy2 = null) {
|
|
1965
|
-
setFocusStrategy(focusStrategy2);
|
|
1966
|
-
overlayTriggerState.open();
|
|
1967
|
-
},
|
|
1968
|
-
toggle(focusStrategy2 = null) {
|
|
1969
|
-
setFocusStrategy(focusStrategy2);
|
|
1970
|
-
overlayTriggerState.toggle();
|
|
1971
|
-
}
|
|
1972
|
-
});
|
|
1973
|
-
}
|
|
1974
|
-
const DEFAULT_MAX_ITEMS_UNTIL_SCROLL = 5;
|
|
1975
|
-
const DEFAULT_PLACEMENT = "bottom";
|
|
1976
|
-
const DEFAULT_WIDTH = "auto";
|
|
1977
|
-
const ITEM_HEIGHT = 32;
|
|
1978
|
-
const Y_PADDING_INSIDE_OVERLAY = 8;
|
|
1979
|
-
const OVERLAY_OFFSET = 8;
|
|
1980
|
-
const OVERLAY_PADDING_FROM_CONTAINER = 12;
|
|
1981
|
-
function getUnmergedPopoverStyles(width, triggerWidth) {
|
|
1982
|
-
return __spreadValues(__spreadValues(__spreadValues(__spreadValues({}, getComponentToken("menu", "item_height", `${pxToRem(ITEM_HEIGHT)}rem`)), getComponentToken("menu", "padding.y", `${pxToRem(Y_PADDING_INSIDE_OVERLAY)}rem`)), getComponentToken("menu", "min-width", width === "auto" ? `${triggerWidth}px` : void 0)), getResponsiveValue("menu", "width", width !== "auto" && width !== "fit-content" ? width : "auto"));
|
|
1983
|
-
}
|
|
1984
|
-
function useTriggerWidth(triggerRef) {
|
|
1985
|
-
const [triggerWidth, setTriggerWidth] = useState(null);
|
|
1986
|
-
$9daab02d461809db$export$683480f191c0e3ea({
|
|
1987
|
-
ref: triggerRef,
|
|
1988
|
-
onResize: () => {
|
|
1989
|
-
if (triggerRef.current) {
|
|
1990
|
-
const { width } = triggerRef.current.getBoundingClientRect();
|
|
1991
|
-
setTriggerWidth(width);
|
|
1992
|
-
}
|
|
1993
|
-
}
|
|
1994
|
-
});
|
|
1995
|
-
const initialRef = useRef(false);
|
|
1996
|
-
useEffect(() => {
|
|
1997
|
-
if (triggerRef.current && !initialRef.current) {
|
|
1998
|
-
const { width } = triggerRef.current.getBoundingClientRect();
|
|
1999
|
-
setTriggerWidth(width);
|
|
2000
|
-
initialRef.current = true;
|
|
2001
|
-
}
|
|
2002
|
-
}, [triggerRef]);
|
|
2003
|
-
return triggerWidth;
|
|
2004
|
-
}
|
|
2005
|
-
export {
|
|
2006
|
-
$982254629710d113$export$b95089534ab7c1fd as $,
|
|
2007
|
-
DEFAULT_WIDTH as D,
|
|
2008
|
-
ITEM_HEIGHT as I,
|
|
2009
|
-
OVERLAY_PADDING_FROM_CONTAINER as O,
|
|
2010
|
-
Y_PADDING_INSIDE_OVERLAY as Y,
|
|
2011
|
-
$453cc9f0df89c0a5$export$77d5aafae4e095b2 as a,
|
|
2012
|
-
$880e95eb8b93ba9a$export$ecf600387e221c37 as b,
|
|
2013
|
-
$2a25aae57d74318e$export$a05409b8bb224a5a as c,
|
|
2014
|
-
$168583247155ddda$export$dc9c12ed27dd1b49 as d,
|
|
2015
|
-
$fb3050f43d946246$export$e32c88dfddc6e1d8 as e,
|
|
2016
|
-
$7af3f5b51489e0b5$export$253fe78d46329472 as f,
|
|
2017
|
-
$7613b1592d41b092$export$6cd28814d92fa9c9 as g,
|
|
2018
|
-
$d496c0a20b6e58ec$export$6c8a5aaad13c9852 as h,
|
|
2019
|
-
$a28c903ee9ad8dc5$export$79fefeb1c2091ac3 as i,
|
|
2020
|
-
$c1d7fb2ec91bae71$export$6d08773d2e66f8f2 as j,
|
|
2021
|
-
$9fc4852771d079eb$export$6e2c8f0811a474ce as k,
|
|
2022
|
-
$f4b273590fab9f93$export$52210f68a14655d0 as l,
|
|
2023
|
-
getUnmergedPopoverStyles as m,
|
|
2024
|
-
OVERLAY_OFFSET as n,
|
|
2025
|
-
DEFAULT_PLACEMENT as o,
|
|
2026
|
-
$a2e5df62f93c7633$export$9d32628fc2aea7da as p,
|
|
2027
|
-
$3e5eb2498db5b506$export$73f7a44322579622 as q,
|
|
2028
|
-
$d5336fe17ce95402$export$38eaa17faae8f579 as r,
|
|
2029
|
-
DEFAULT_MAX_ITEMS_UNTIL_SCROLL as s,
|
|
2030
|
-
useTriggerWidth as u
|
|
2031
|
-
};
|