@chayns-components/core 5.4.6-alpha.0 → 5.4.6
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/AGENTS.md +0 -12
- package/lib/cjs/components/accordion/Accordion.js +12 -107
- package/lib/cjs/components/accordion/Accordion.js.map +1 -1
- package/lib/cjs/components/accordion/Accordion.styles.js +3 -23
- package/lib/cjs/components/accordion/Accordion.styles.js.map +1 -1
- package/lib/cjs/components/accordion/accordion-body/AccordionBody.styles.js +1 -3
- package/lib/cjs/components/accordion/accordion-body/AccordionBody.styles.js.map +1 -1
- package/lib/cjs/components/accordion/accordion-group/AccordionGroup.js +19 -36
- package/lib/cjs/components/accordion/accordion-group/AccordionGroup.js.map +1 -1
- package/lib/cjs/components/accordion/accordion-head/AccordionHead.js +3 -6
- package/lib/cjs/components/accordion/accordion-head/AccordionHead.js.map +1 -1
- package/lib/cjs/components/accordion/accordion-head/AccordionHead.styles.js +0 -14
- package/lib/cjs/components/accordion/accordion-head/AccordionHead.styles.js.map +1 -1
- package/lib/cjs/components/amount-control/AmountControl.js +17 -31
- package/lib/cjs/components/amount-control/AmountControl.js.map +1 -1
- package/lib/cjs/components/amount-control/AmountControl.styles.js +2 -18
- package/lib/cjs/components/amount-control/AmountControl.styles.js.map +1 -1
- package/lib/cjs/components/button/Button.js +1 -5
- package/lib/cjs/components/button/Button.js.map +1 -1
- package/lib/cjs/components/button/Button.styles.js +0 -10
- package/lib/cjs/components/button/Button.styles.js.map +1 -1
- package/lib/cjs/components/button/Button.types.js.map +1 -1
- package/lib/cjs/components/checkbox/Checkbox.js +1 -5
- package/lib/cjs/components/checkbox/Checkbox.js.map +1 -1
- package/lib/cjs/components/checkbox/Checkbox.styles.js +2 -29
- package/lib/cjs/components/checkbox/Checkbox.styles.js.map +1 -1
- package/lib/cjs/components/color-scheme-provider/ColorSchemeProvider.js +2 -7
- package/lib/cjs/components/color-scheme-provider/ColorSchemeProvider.js.map +1 -1
- package/lib/cjs/components/color-scheme-provider/ColorSchemeProvider.styles.js +2 -8
- package/lib/cjs/components/color-scheme-provider/ColorSchemeProvider.styles.js.map +1 -1
- package/lib/cjs/components/combobox/ComboBox.js +26 -70
- package/lib/cjs/components/combobox/ComboBox.js.map +1 -1
- package/lib/cjs/components/combobox/ComboBox.styles.js +0 -11
- package/lib/cjs/components/combobox/ComboBox.styles.js.map +1 -1
- package/lib/cjs/components/combobox/ComboBox.types.js.map +1 -1
- package/lib/cjs/components/context-menu/ContextMenu.js +42 -146
- package/lib/cjs/components/context-menu/ContextMenu.js.map +1 -1
- package/lib/cjs/components/context-menu/ContextMenu.styles.js +0 -38
- package/lib/cjs/components/context-menu/ContextMenu.styles.js.map +1 -1
- package/lib/cjs/components/context-menu/ContextMenu.types.js.map +1 -1
- package/lib/cjs/components/context-menu/ContextMenu.utils.js +1 -27
- package/lib/cjs/components/context-menu/ContextMenu.utils.js.map +1 -1
- package/lib/cjs/components/context-menu/context-menu-content/ContextMenuContent.js +8 -3
- package/lib/cjs/components/context-menu/context-menu-content/ContextMenuContent.js.map +1 -1
- package/lib/cjs/components/dropdown-body-wrapper/DropdownBodyWrapper.js +11 -1
- package/lib/cjs/components/dropdown-body-wrapper/DropdownBodyWrapper.js.map +1 -1
- package/lib/cjs/components/file-input/FileInput.js +2 -4
- package/lib/cjs/components/file-input/FileInput.js.map +1 -1
- package/lib/cjs/components/file-list/file-item/FileItem.js +25 -48
- package/lib/cjs/components/file-list/file-item/FileItem.js.map +1 -1
- package/lib/cjs/components/file-list/file-item/FileItem.styles.js +1 -25
- package/lib/cjs/components/file-list/file-item/FileItem.styles.js.map +1 -1
- package/lib/cjs/components/file-select/FileSelect.js +4 -27
- package/lib/cjs/components/file-select/FileSelect.js.map +1 -1
- package/lib/cjs/components/file-select/FileSelect.styles.js +0 -10
- package/lib/cjs/components/file-select/FileSelect.styles.js.map +1 -1
- package/lib/cjs/components/filter/Filter.js +16 -51
- package/lib/cjs/components/filter/Filter.js.map +1 -1
- package/lib/cjs/components/filter/Filter.styles.js +0 -9
- package/lib/cjs/components/filter/Filter.styles.js.map +1 -1
- package/lib/cjs/components/filter/filter-content/FilterContent.js +5 -14
- package/lib/cjs/components/filter/filter-content/FilterContent.js.map +1 -1
- package/lib/cjs/components/filter/filter-content/FilterContent.types.js.map +1 -1
- package/lib/cjs/components/filter-buttons/FilterButtons.js +4 -69
- package/lib/cjs/components/filter-buttons/FilterButtons.js.map +1 -1
- package/lib/cjs/components/filter-buttons/filter-button/FilterButton.js +2 -40
- package/lib/cjs/components/filter-buttons/filter-button/FilterButton.js.map +1 -1
- package/lib/cjs/components/filter-buttons/filter-button/FilterButton.styles.js +0 -11
- package/lib/cjs/components/filter-buttons/filter-button/FilterButton.styles.js.map +1 -1
- package/lib/cjs/components/grid-image/GridImage.js +2 -20
- package/lib/cjs/components/grid-image/GridImage.js.map +1 -1
- package/lib/cjs/components/grid-image/GridImage.styles.js +2 -11
- package/lib/cjs/components/grid-image/GridImage.styles.js.map +1 -1
- package/lib/cjs/components/grouped-image/GroupedImage.js +4 -23
- package/lib/cjs/components/grouped-image/GroupedImage.js.map +1 -1
- package/lib/cjs/components/grouped-image/GroupedImage.styles.js +0 -9
- package/lib/cjs/components/grouped-image/GroupedImage.styles.js.map +1 -1
- package/lib/cjs/components/highlight-slider/HighlightSlider.js +3 -13
- package/lib/cjs/components/highlight-slider/HighlightSlider.js.map +1 -1
- package/lib/cjs/components/highlight-slider/highlight-slider-item/HighlightSliderItem.js +4 -21
- package/lib/cjs/components/highlight-slider/highlight-slider-item/HighlightSliderItem.js.map +1 -1
- package/lib/cjs/components/highlight-slider/highlight-slider-item/HighlightSliderItem.styles.js +2 -11
- package/lib/cjs/components/highlight-slider/highlight-slider-item/HighlightSliderItem.styles.js.map +1 -1
- package/lib/cjs/components/icon/Icon.js +5 -24
- package/lib/cjs/components/icon/Icon.js.map +1 -1
- package/lib/cjs/components/icon/Icon.styles.js +0 -23
- package/lib/cjs/components/icon/Icon.styles.js.map +1 -1
- package/lib/cjs/components/input/Input.js +8 -29
- package/lib/cjs/components/input/Input.js.map +1 -1
- package/lib/cjs/components/input/Input.styles.js +3 -38
- package/lib/cjs/components/input/Input.styles.js.map +1 -1
- package/lib/cjs/components/list/List.js +37 -124
- package/lib/cjs/components/list/List.js.map +1 -1
- package/lib/cjs/components/list/List.utils.js +1 -213
- package/lib/cjs/components/list/List.utils.js.map +1 -1
- package/lib/cjs/components/list/list-item/ListItem.js +3 -84
- package/lib/cjs/components/list/list-item/ListItem.js.map +1 -1
- package/lib/cjs/components/list/list-item/ListItem.styles.js +0 -7
- package/lib/cjs/components/list/list-item/ListItem.styles.js.map +1 -1
- package/lib/cjs/components/list/list-item/list-item-head/ListItemHead.js +1 -5
- package/lib/cjs/components/list/list-item/list-item-head/ListItemHead.js.map +1 -1
- package/lib/cjs/components/list/list-item/list-item-head/ListItemHead.styles.js +1 -5
- package/lib/cjs/components/list/list-item/list-item-head/ListItemHead.styles.js.map +1 -1
- package/lib/cjs/components/list/list-item/list-item-head/list-item-right-element/ListItemRightElement.js +0 -1
- package/lib/cjs/components/list/list-item/list-item-head/list-item-right-element/ListItemRightElement.js.map +1 -1
- package/lib/cjs/components/list/list-item/list-item-head/list-item-subtitle/ListItemSubtitle.js +0 -3
- package/lib/cjs/components/list/list-item/list-item-head/list-item-subtitle/ListItemSubtitle.js.map +1 -1
- package/lib/cjs/components/list/list-item/list-item-head/list-item-title/ListItemTitle.js +0 -1
- package/lib/cjs/components/list/list-item/list-item-head/list-item-title/ListItemTitle.js.map +1 -1
- package/lib/cjs/components/mention-finder/MentionFinder.js +5 -43
- package/lib/cjs/components/mention-finder/MentionFinder.js.map +1 -1
- package/lib/cjs/components/mention-finder/mention-finder-item/MentionFinderItem.styles.js.map +1 -1
- package/lib/cjs/components/multi-action-button/MultiActionButton.js +3 -36
- package/lib/cjs/components/multi-action-button/MultiActionButton.js.map +1 -1
- package/lib/cjs/components/multi-action-button/MultiActionButton.styles.js +0 -6
- package/lib/cjs/components/multi-action-button/MultiActionButton.styles.js.map +1 -1
- package/lib/cjs/components/multi-action-button/MultiActionButton.types.js.map +1 -1
- package/lib/cjs/components/multi-action-button/action-button/ActionButton.js +1 -7
- package/lib/cjs/components/multi-action-button/action-button/ActionButton.js.map +1 -1
- package/lib/cjs/components/multi-action-button/action-button/ActionButton.styles.js +0 -12
- package/lib/cjs/components/multi-action-button/action-button/ActionButton.styles.js.map +1 -1
- package/lib/cjs/components/number-input/NumberInput.js +10 -13
- package/lib/cjs/components/number-input/NumberInput.js.map +1 -1
- package/lib/cjs/components/page-provider/PageProvider.js +2 -4
- package/lib/cjs/components/page-provider/PageProvider.js.map +1 -1
- package/lib/cjs/components/popup/Popup.js +1 -8
- package/lib/cjs/components/popup/Popup.js.map +1 -1
- package/lib/cjs/components/radio-button/RadioButton.js +15 -29
- package/lib/cjs/components/radio-button/RadioButton.js.map +1 -1
- package/lib/cjs/components/radio-button/RadioButton.styles.js +8 -19
- package/lib/cjs/components/radio-button/RadioButton.styles.js.map +1 -1
- package/lib/cjs/components/radio-button/radio-button-group/RadioButtonGroup.js +4 -7
- package/lib/cjs/components/radio-button/radio-button-group/RadioButtonGroup.js.map +1 -1
- package/lib/cjs/components/search-box/SearchBox.js +5 -20
- package/lib/cjs/components/search-box/SearchBox.js.map +1 -1
- package/lib/cjs/components/search-input/SearchInput.js +43 -56
- package/lib/cjs/components/search-input/SearchInput.js.map +1 -1
- package/lib/cjs/components/search-input/SearchInput.styles.js +2 -26
- package/lib/cjs/components/search-input/SearchInput.styles.js.map +1 -1
- package/lib/cjs/components/select-button/SelectButton.js +2 -4
- package/lib/cjs/components/select-button/SelectButton.js.map +1 -1
- package/lib/cjs/components/setup-wizard/SetupWizard.js +4 -10
- package/lib/cjs/components/setup-wizard/SetupWizard.js.map +1 -1
- package/lib/cjs/components/setup-wizard/setup-wizard-item/SetupWizardItem.js +3 -5
- package/lib/cjs/components/setup-wizard/setup-wizard-item/SetupWizardItem.js.map +1 -1
- package/lib/cjs/components/sharing-bar/SharingBar.js +6 -31
- package/lib/cjs/components/sharing-bar/SharingBar.js.map +1 -1
- package/lib/cjs/components/sharing-bar/SharingBar.styles.js +0 -5
- package/lib/cjs/components/sharing-bar/SharingBar.styles.js.map +1 -1
- package/lib/cjs/components/sharing-button/SharingButton.js +2 -4
- package/lib/cjs/components/sharing-button/SharingButton.js.map +1 -1
- package/lib/cjs/components/sharing-context-menu/SharingContextMenu.js +1 -3
- package/lib/cjs/components/sharing-context-menu/SharingContextMenu.js.map +1 -1
- package/lib/cjs/components/signature/Signature.js +3 -6
- package/lib/cjs/components/signature/Signature.js.map +1 -1
- package/lib/cjs/components/slider/Slider.js +7 -30
- package/lib/cjs/components/slider/Slider.js.map +1 -1
- package/lib/cjs/components/slider/Slider.styles.js +2 -9
- package/lib/cjs/components/slider/Slider.styles.js.map +1 -1
- package/lib/cjs/components/slider-button/SliderButton.js +6 -63
- package/lib/cjs/components/slider-button/SliderButton.js.map +1 -1
- package/lib/cjs/components/slider-button/SliderButton.styles.js +2 -15
- package/lib/cjs/components/slider-button/SliderButton.styles.js.map +1 -1
- package/lib/cjs/components/tag-input/TagInput.js +36 -92
- package/lib/cjs/components/tag-input/TagInput.js.map +1 -1
- package/lib/cjs/components/tag-input/TagInput.styles.js +3 -29
- package/lib/cjs/components/tag-input/TagInput.styles.js.map +1 -1
- package/lib/cjs/components/text-area/TextArea.js +8 -17
- package/lib/cjs/components/text-area/TextArea.js.map +1 -1
- package/lib/cjs/components/text-area/TextArea.styles.js +1 -15
- package/lib/cjs/components/text-area/TextArea.styles.js.map +1 -1
- package/lib/cjs/components/truncation/Truncation.js +3 -17
- package/lib/cjs/components/truncation/Truncation.js.map +1 -1
- package/lib/cjs/components/truncation/Truncation.styles.js +1 -18
- package/lib/cjs/components/truncation/Truncation.styles.js.map +1 -1
- package/lib/cjs/hooks/dropdown.js +28 -5
- package/lib/cjs/hooks/dropdown.js.map +1 -1
- package/lib/cjs/utils/file.js.map +1 -1
- package/lib/esm/components/accordion/Accordion.js +12 -105
- package/lib/esm/components/accordion/Accordion.js.map +1 -1
- package/lib/esm/components/accordion/Accordion.styles.js +3 -23
- package/lib/esm/components/accordion/Accordion.styles.js.map +1 -1
- package/lib/esm/components/accordion/accordion-body/AccordionBody.styles.js +1 -3
- package/lib/esm/components/accordion/accordion-body/AccordionBody.styles.js.map +1 -1
- package/lib/esm/components/accordion/accordion-group/AccordionGroup.js +19 -33
- package/lib/esm/components/accordion/accordion-group/AccordionGroup.js.map +1 -1
- package/lib/esm/components/accordion/accordion-head/AccordionHead.js +3 -6
- package/lib/esm/components/accordion/accordion-head/AccordionHead.js.map +1 -1
- package/lib/esm/components/accordion/accordion-head/AccordionHead.styles.js +0 -14
- package/lib/esm/components/accordion/accordion-head/AccordionHead.styles.js.map +1 -1
- package/lib/esm/components/amount-control/AmountControl.js +16 -30
- package/lib/esm/components/amount-control/AmountControl.js.map +1 -1
- package/lib/esm/components/amount-control/AmountControl.styles.js +2 -18
- package/lib/esm/components/amount-control/AmountControl.styles.js.map +1 -1
- package/lib/esm/components/button/Button.js +1 -5
- package/lib/esm/components/button/Button.js.map +1 -1
- package/lib/esm/components/button/Button.styles.js +0 -10
- package/lib/esm/components/button/Button.styles.js.map +1 -1
- package/lib/esm/components/button/Button.types.js.map +1 -1
- package/lib/esm/components/checkbox/Checkbox.js +1 -5
- package/lib/esm/components/checkbox/Checkbox.js.map +1 -1
- package/lib/esm/components/checkbox/Checkbox.styles.js +2 -29
- package/lib/esm/components/checkbox/Checkbox.styles.js.map +1 -1
- package/lib/esm/components/color-scheme-provider/ColorSchemeProvider.js +2 -7
- package/lib/esm/components/color-scheme-provider/ColorSchemeProvider.js.map +1 -1
- package/lib/esm/components/color-scheme-provider/ColorSchemeProvider.styles.js +2 -8
- package/lib/esm/components/color-scheme-provider/ColorSchemeProvider.styles.js.map +1 -1
- package/lib/esm/components/combobox/ComboBox.js +22 -63
- package/lib/esm/components/combobox/ComboBox.js.map +1 -1
- package/lib/esm/components/combobox/ComboBox.styles.js +0 -11
- package/lib/esm/components/combobox/ComboBox.styles.js.map +1 -1
- package/lib/esm/components/combobox/ComboBox.types.js.map +1 -1
- package/lib/esm/components/context-menu/ContextMenu.js +42 -145
- package/lib/esm/components/context-menu/ContextMenu.js.map +1 -1
- package/lib/esm/components/context-menu/ContextMenu.styles.js +0 -38
- package/lib/esm/components/context-menu/ContextMenu.styles.js.map +1 -1
- package/lib/esm/components/context-menu/ContextMenu.types.js.map +1 -1
- package/lib/esm/components/context-menu/ContextMenu.utils.js +0 -24
- package/lib/esm/components/context-menu/ContextMenu.utils.js.map +1 -1
- package/lib/esm/components/context-menu/context-menu-content/ContextMenuContent.js +8 -3
- package/lib/esm/components/context-menu/context-menu-content/ContextMenuContent.js.map +1 -1
- package/lib/esm/components/dropdown-body-wrapper/DropdownBodyWrapper.js +11 -1
- package/lib/esm/components/dropdown-body-wrapper/DropdownBodyWrapper.js.map +1 -1
- package/lib/esm/components/file-input/FileInput.js +2 -4
- package/lib/esm/components/file-input/FileInput.js.map +1 -1
- package/lib/esm/components/file-list/file-item/FileItem.js +26 -49
- package/lib/esm/components/file-list/file-item/FileItem.js.map +1 -1
- package/lib/esm/components/file-list/file-item/FileItem.styles.js +0 -24
- package/lib/esm/components/file-list/file-item/FileItem.styles.js.map +1 -1
- package/lib/esm/components/file-select/FileSelect.js +4 -27
- package/lib/esm/components/file-select/FileSelect.js.map +1 -1
- package/lib/esm/components/file-select/FileSelect.styles.js +0 -10
- package/lib/esm/components/file-select/FileSelect.styles.js.map +1 -1
- package/lib/esm/components/filter/Filter.js +16 -52
- package/lib/esm/components/filter/Filter.js.map +1 -1
- package/lib/esm/components/filter/Filter.styles.js +0 -9
- package/lib/esm/components/filter/Filter.styles.js.map +1 -1
- package/lib/esm/components/filter/filter-content/FilterContent.js +5 -15
- package/lib/esm/components/filter/filter-content/FilterContent.js.map +1 -1
- package/lib/esm/components/filter/filter-content/FilterContent.types.js.map +1 -1
- package/lib/esm/components/filter-buttons/FilterButtons.js +5 -69
- package/lib/esm/components/filter-buttons/FilterButtons.js.map +1 -1
- package/lib/esm/components/filter-buttons/filter-button/FilterButton.js +2 -40
- package/lib/esm/components/filter-buttons/filter-button/FilterButton.js.map +1 -1
- package/lib/esm/components/filter-buttons/filter-button/FilterButton.styles.js +0 -11
- package/lib/esm/components/filter-buttons/filter-button/FilterButton.styles.js.map +1 -1
- package/lib/esm/components/grid-image/GridImage.js +2 -20
- package/lib/esm/components/grid-image/GridImage.js.map +1 -1
- package/lib/esm/components/grid-image/GridImage.styles.js +1 -10
- package/lib/esm/components/grid-image/GridImage.styles.js.map +1 -1
- package/lib/esm/components/grouped-image/GroupedImage.js +4 -22
- package/lib/esm/components/grouped-image/GroupedImage.js.map +1 -1
- package/lib/esm/components/grouped-image/GroupedImage.styles.js +0 -9
- package/lib/esm/components/grouped-image/GroupedImage.styles.js.map +1 -1
- package/lib/esm/components/highlight-slider/HighlightSlider.js +3 -13
- package/lib/esm/components/highlight-slider/HighlightSlider.js.map +1 -1
- package/lib/esm/components/highlight-slider/highlight-slider-item/HighlightSliderItem.js +3 -20
- package/lib/esm/components/highlight-slider/highlight-slider-item/HighlightSliderItem.js.map +1 -1
- package/lib/esm/components/highlight-slider/highlight-slider-item/HighlightSliderItem.styles.js +1 -10
- package/lib/esm/components/highlight-slider/highlight-slider-item/HighlightSliderItem.styles.js.map +1 -1
- package/lib/esm/components/icon/Icon.js +7 -26
- package/lib/esm/components/icon/Icon.js.map +1 -1
- package/lib/esm/components/icon/Icon.styles.js +0 -23
- package/lib/esm/components/icon/Icon.styles.js.map +1 -1
- package/lib/esm/components/input/Input.js +4 -24
- package/lib/esm/components/input/Input.js.map +1 -1
- package/lib/esm/components/input/Input.styles.js +3 -38
- package/lib/esm/components/input/Input.styles.js.map +1 -1
- package/lib/esm/components/list/List.js +37 -123
- package/lib/esm/components/list/List.js.map +1 -1
- package/lib/esm/components/list/List.utils.js +0 -202
- package/lib/esm/components/list/List.utils.js.map +1 -1
- package/lib/esm/components/list/list-item/ListItem.js +4 -85
- package/lib/esm/components/list/list-item/ListItem.js.map +1 -1
- package/lib/esm/components/list/list-item/ListItem.styles.js +0 -7
- package/lib/esm/components/list/list-item/ListItem.styles.js.map +1 -1
- package/lib/esm/components/list/list-item/list-item-head/ListItemHead.js +2 -6
- package/lib/esm/components/list/list-item/list-item-head/ListItemHead.js.map +1 -1
- package/lib/esm/components/list/list-item/list-item-head/ListItemHead.styles.js +0 -4
- package/lib/esm/components/list/list-item/list-item-head/ListItemHead.styles.js.map +1 -1
- package/lib/esm/components/list/list-item/list-item-head/list-item-right-element/ListItemRightElement.js +0 -1
- package/lib/esm/components/list/list-item/list-item-head/list-item-right-element/ListItemRightElement.js.map +1 -1
- package/lib/esm/components/list/list-item/list-item-head/list-item-subtitle/ListItemSubtitle.js +1 -4
- package/lib/esm/components/list/list-item/list-item-head/list-item-subtitle/ListItemSubtitle.js.map +1 -1
- package/lib/esm/components/list/list-item/list-item-head/list-item-title/ListItemTitle.js +0 -1
- package/lib/esm/components/list/list-item/list-item-head/list-item-title/ListItemTitle.js.map +1 -1
- package/lib/esm/components/mention-finder/MentionFinder.js +3 -39
- package/lib/esm/components/mention-finder/MentionFinder.js.map +1 -1
- package/lib/esm/components/mention-finder/mention-finder-item/MentionFinderItem.styles.js.map +1 -1
- package/lib/esm/components/multi-action-button/MultiActionButton.js +3 -36
- package/lib/esm/components/multi-action-button/MultiActionButton.js.map +1 -1
- package/lib/esm/components/multi-action-button/MultiActionButton.styles.js +0 -6
- package/lib/esm/components/multi-action-button/MultiActionButton.styles.js.map +1 -1
- package/lib/esm/components/multi-action-button/MultiActionButton.types.js.map +1 -1
- package/lib/esm/components/multi-action-button/action-button/ActionButton.js +1 -7
- package/lib/esm/components/multi-action-button/action-button/ActionButton.js.map +1 -1
- package/lib/esm/components/multi-action-button/action-button/ActionButton.styles.js +0 -12
- package/lib/esm/components/multi-action-button/action-button/ActionButton.styles.js.map +1 -1
- package/lib/esm/components/number-input/NumberInput.js +10 -13
- package/lib/esm/components/number-input/NumberInput.js.map +1 -1
- package/lib/esm/components/page-provider/PageProvider.js +2 -4
- package/lib/esm/components/page-provider/PageProvider.js.map +1 -1
- package/lib/esm/components/popup/Popup.js +1 -8
- package/lib/esm/components/popup/Popup.js.map +1 -1
- package/lib/esm/components/radio-button/RadioButton.js +15 -29
- package/lib/esm/components/radio-button/RadioButton.js.map +1 -1
- package/lib/esm/components/radio-button/RadioButton.styles.js +8 -19
- package/lib/esm/components/radio-button/RadioButton.styles.js.map +1 -1
- package/lib/esm/components/radio-button/radio-button-group/RadioButtonGroup.js +4 -7
- package/lib/esm/components/radio-button/radio-button-group/RadioButtonGroup.js.map +1 -1
- package/lib/esm/components/search-box/SearchBox.js +3 -17
- package/lib/esm/components/search-box/SearchBox.js.map +1 -1
- package/lib/esm/components/search-input/SearchInput.js +44 -56
- package/lib/esm/components/search-input/SearchInput.js.map +1 -1
- package/lib/esm/components/search-input/SearchInput.styles.js +1 -25
- package/lib/esm/components/search-input/SearchInput.styles.js.map +1 -1
- package/lib/esm/components/select-button/SelectButton.js +2 -4
- package/lib/esm/components/select-button/SelectButton.js.map +1 -1
- package/lib/esm/components/setup-wizard/SetupWizard.js +4 -10
- package/lib/esm/components/setup-wizard/SetupWizard.js.map +1 -1
- package/lib/esm/components/setup-wizard/setup-wizard-item/SetupWizardItem.js +3 -5
- package/lib/esm/components/setup-wizard/setup-wizard-item/SetupWizardItem.js.map +1 -1
- package/lib/esm/components/sharing-bar/SharingBar.js +5 -30
- package/lib/esm/components/sharing-bar/SharingBar.js.map +1 -1
- package/lib/esm/components/sharing-bar/SharingBar.styles.js +0 -5
- package/lib/esm/components/sharing-bar/SharingBar.styles.js.map +1 -1
- package/lib/esm/components/sharing-button/SharingButton.js +2 -4
- package/lib/esm/components/sharing-button/SharingButton.js.map +1 -1
- package/lib/esm/components/sharing-context-menu/SharingContextMenu.js +1 -3
- package/lib/esm/components/sharing-context-menu/SharingContextMenu.js.map +1 -1
- package/lib/esm/components/signature/Signature.js +3 -6
- package/lib/esm/components/signature/Signature.js.map +1 -1
- package/lib/esm/components/slider/Slider.js +7 -30
- package/lib/esm/components/slider/Slider.js.map +1 -1
- package/lib/esm/components/slider/Slider.styles.js +1 -8
- package/lib/esm/components/slider/Slider.styles.js.map +1 -1
- package/lib/esm/components/slider-button/SliderButton.js +6 -62
- package/lib/esm/components/slider-button/SliderButton.js.map +1 -1
- package/lib/esm/components/slider-button/SliderButton.styles.js +1 -14
- package/lib/esm/components/slider-button/SliderButton.styles.js.map +1 -1
- package/lib/esm/components/tag-input/TagInput.js +35 -86
- package/lib/esm/components/tag-input/TagInput.js.map +1 -1
- package/lib/esm/components/tag-input/TagInput.styles.js +1 -27
- package/lib/esm/components/tag-input/TagInput.styles.js.map +1 -1
- package/lib/esm/components/text-area/TextArea.js +9 -18
- package/lib/esm/components/text-area/TextArea.js.map +1 -1
- package/lib/esm/components/text-area/TextArea.styles.js +0 -14
- package/lib/esm/components/text-area/TextArea.styles.js.map +1 -1
- package/lib/esm/components/truncation/Truncation.js +4 -18
- package/lib/esm/components/truncation/Truncation.js.map +1 -1
- package/lib/esm/components/truncation/Truncation.styles.js +0 -17
- package/lib/esm/components/truncation/Truncation.styles.js.map +1 -1
- package/lib/esm/hooks/dropdown.js +28 -5
- package/lib/esm/hooks/dropdown.js.map +1 -1
- package/lib/esm/utils/file.js.map +1 -1
- package/lib/types/components/accordion/Accordion.d.ts +0 -5
- package/lib/types/components/accordion/Accordion.styles.d.ts +4 -8
- package/lib/types/components/accordion/accordion-body/AccordionBody.styles.d.ts +2 -2
- package/lib/types/components/accordion/accordion-group/AccordionGroup.d.ts +2 -7
- package/lib/types/components/accordion/accordion-head/AccordionHead.d.ts +0 -1
- package/lib/types/components/accordion/accordion-head/AccordionHead.styles.d.ts +18 -18
- package/lib/types/components/amount-control/AmountControl.d.ts +0 -5
- package/lib/types/components/amount-control/AmountControl.styles.d.ts +4 -8
- package/lib/types/components/button/Button.styles.d.ts +6 -8
- package/lib/types/components/button/Button.types.d.ts +0 -8
- package/lib/types/components/checkbox/Checkbox.d.ts +0 -4
- package/lib/types/components/checkbox/Checkbox.styles.d.ts +1 -5
- package/lib/types/components/color-scheme-provider/ColorSchemeProvider.d.ts +0 -5
- package/lib/types/components/combobox/ComboBox.styles.d.ts +2 -4
- package/lib/types/components/combobox/ComboBox.types.d.ts +0 -5
- package/lib/types/components/context-menu/ContextMenu.styles.d.ts +2 -4
- package/lib/types/components/context-menu/ContextMenu.types.d.ts +0 -6
- package/lib/types/components/context-menu/ContextMenu.utils.d.ts +0 -10
- package/lib/types/components/context-menu/context-menu-content/ContextMenuContent.d.ts +1 -1
- package/lib/types/components/context-menu/context-menu-content/ContextMenuContent.styles.d.ts +2 -2
- package/lib/types/components/dropdown-body-wrapper/DropdownBodyWrapper.d.ts +7 -0
- package/lib/types/components/dropdown-body-wrapper/delayed-dropdown-content/DelayedDropdownContent.styles.d.ts +2 -2
- package/lib/types/components/expandable-content/ExpandableContent.styles.d.ts +2 -2
- package/lib/types/components/file-input/FileInput.d.ts +0 -4
- package/lib/types/components/file-input/FileInput.styles.d.ts +2 -2
- package/lib/types/components/file-list/file-item/FileItem.styles.d.ts +0 -3
- package/lib/types/components/file-select/FileSelect.d.ts +0 -4
- package/lib/types/components/file-select/FileSelect.styles.d.ts +4 -6
- package/lib/types/components/filter/Filter.d.ts +0 -1
- package/lib/types/components/filter/Filter.styles.d.ts +4 -6
- package/lib/types/components/filter/filter-content/FilterContent.types.d.ts +0 -4
- package/lib/types/components/filter-buttons/FilterButtons.d.ts +0 -4
- package/lib/types/components/filter-buttons/filter-button/FilterButton.d.ts +0 -5
- package/lib/types/components/filter-buttons/filter-button/FilterButton.styles.d.ts +8 -12
- package/lib/types/components/grid-image/GridImage.d.ts +0 -4
- package/lib/types/components/grid-image/GridImage.styles.d.ts +2 -4
- package/lib/types/components/grouped-image/GroupedImage.d.ts +0 -4
- package/lib/types/components/grouped-image/GroupedImage.styles.d.ts +6 -8
- package/lib/types/components/highlight-slider/HighlightSlider.d.ts +0 -4
- package/lib/types/components/highlight-slider/highlight-slider-item/HighlightSliderItem.d.ts +0 -3
- package/lib/types/components/highlight-slider/highlight-slider-item/HighlightSliderItem.styles.d.ts +5 -9
- package/lib/types/components/icon/Icon.d.ts +0 -4
- package/lib/types/components/icon/Icon.styles.d.ts +0 -1
- package/lib/types/components/input/Input.d.ts +0 -4
- package/lib/types/components/input/Input.styles.d.ts +9 -17
- package/lib/types/components/list/List.d.ts +0 -11
- package/lib/types/components/list/List.utils.d.ts +1 -32
- package/lib/types/components/list/list-item/ListItem.d.ts +0 -4
- package/lib/types/components/list/list-item/ListItem.styles.d.ts +64 -64
- package/lib/types/components/list/list-item/list-item-body/ListItemBody.styles.d.ts +2 -2
- package/lib/types/components/list/list-item/list-item-head/ListItemHead.styles.d.ts +194 -195
- package/lib/types/components/masonry/masonry-item/MasonryItem.styles.d.ts +2 -2
- package/lib/types/components/mention-finder/MentionFinder.styles.d.ts +4 -4
- package/lib/types/components/multi-action-button/MultiActionButton.styles.d.ts +2 -2
- package/lib/types/components/multi-action-button/MultiActionButton.types.d.ts +0 -7
- package/lib/types/components/multi-action-button/action-button/ActionButton.d.ts +1 -4
- package/lib/types/components/multi-action-button/action-button/ActionButton.styles.d.ts +2 -4
- package/lib/types/components/number-input/NumberInput.d.ts +0 -4
- package/lib/types/components/popup/popup-content-wrapper/PopupContentWrapper.styles.d.ts +2 -2
- package/lib/types/components/progress-bar/ProgressBar.styles.d.ts +6 -6
- package/lib/types/components/radio-button/RadioButton.d.ts +0 -4
- package/lib/types/components/radio-button/RadioButton.styles.d.ts +9 -15
- package/lib/types/components/radio-button/radio-button-group/RadioButtonGroup.d.ts +0 -5
- package/lib/types/components/search-box/SearchBox.d.ts +0 -4
- package/lib/types/components/search-box/SearchBox.styles.d.ts +2 -2
- package/lib/types/components/search-input/SearchInput.d.ts +0 -4
- package/lib/types/components/search-input/SearchInput.styles.d.ts +9 -17
- package/lib/types/components/select-button/SelectButton.d.ts +0 -4
- package/lib/types/components/setup-wizard/SetupWizard.d.ts +0 -5
- package/lib/types/components/sharing-bar/SharingBar.d.ts +0 -4
- package/lib/types/components/sharing-button/SharingButton.d.ts +1 -1
- package/lib/types/components/sharing-context-menu/SharingContextMenu.d.ts +2 -10
- package/lib/types/components/signature/Signature.d.ts +0 -4
- package/lib/types/components/skeleton/base-skeleton/BaseSkeleton.styles.d.ts +4 -4
- package/lib/types/components/slider/Slider.d.ts +0 -8
- package/lib/types/components/slider/Slider.styles.d.ts +14 -18
- package/lib/types/components/slider-button/SliderButton.d.ts +28 -1
- package/lib/types/components/slider-button/SliderButton.styles.d.ts +4 -6
- package/lib/types/components/tag-input/TagInput.d.ts +0 -4
- package/lib/types/components/tag-input/TagInput.styles.d.ts +2 -12
- package/lib/types/components/text-area/TextArea.d.ts +0 -4
- package/lib/types/components/text-area/TextArea.styles.d.ts +0 -1
- package/lib/types/components/truncation/Truncation.d.ts +0 -4
- package/lib/types/components/truncation/Truncation.styles.d.ts +2 -7
- package/lib/types/hooks/dropdown.d.ts +2 -0
- package/lib/types/utils/file.d.ts +1 -1
- package/package.json +3 -3
- package/lib/cjs/components/list/list-item/useListItemFocus.js +0 -47
- package/lib/cjs/components/list/list-item/useListItemFocus.js.map +0 -1
- package/lib/cjs/components/slider-button/SliderButton.types.js +0 -6
- package/lib/cjs/components/slider-button/SliderButton.types.js.map +0 -1
- package/lib/cjs/components/slider-button/useSliderButtonPopupKeyboard.js +0 -66
- package/lib/cjs/components/slider-button/useSliderButtonPopupKeyboard.js.map +0 -1
- package/lib/cjs/components/slider-button/useSliderButtonThumbKeyboard.js +0 -47
- package/lib/cjs/components/slider-button/useSliderButtonThumbKeyboard.js.map +0 -1
- package/lib/cjs/hooks/useKeyboardFocusHighlighting.js +0 -68
- package/lib/cjs/hooks/useKeyboardFocusHighlighting.js.map +0 -1
- package/lib/cjs/utils/keyboardFocusHighlighting.styles.js +0 -29
- package/lib/cjs/utils/keyboardFocusHighlighting.styles.js.map +0 -1
- package/lib/esm/components/list/list-item/useListItemFocus.js +0 -40
- package/lib/esm/components/list/list-item/useListItemFocus.js.map +0 -1
- package/lib/esm/components/slider-button/SliderButton.types.js +0 -2
- package/lib/esm/components/slider-button/SliderButton.types.js.map +0 -1
- package/lib/esm/components/slider-button/useSliderButtonPopupKeyboard.js +0 -56
- package/lib/esm/components/slider-button/useSliderButtonPopupKeyboard.js.map +0 -1
- package/lib/esm/components/slider-button/useSliderButtonThumbKeyboard.js +0 -38
- package/lib/esm/components/slider-button/useSliderButtonThumbKeyboard.js.map +0 -1
- package/lib/esm/hooks/useKeyboardFocusHighlighting.js +0 -61
- package/lib/esm/hooks/useKeyboardFocusHighlighting.js.map +0 -1
- package/lib/esm/utils/keyboardFocusHighlighting.styles.js +0 -24
- package/lib/esm/utils/keyboardFocusHighlighting.styles.js.map +0 -1
- package/lib/types/components/list/list-item/useListItemFocus.d.ts +0 -13
- package/lib/types/components/slider-button/SliderButton.types.d.ts +0 -32
- package/lib/types/components/slider-button/useSliderButtonPopupKeyboard.d.ts +0 -17
- package/lib/types/components/slider-button/useSliderButtonThumbKeyboard.d.ts +0 -13
- package/lib/types/hooks/useKeyboardFocusHighlighting.d.ts +0 -5
- package/lib/types/utils/keyboardFocusHighlighting.styles.d.ts +0 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.styles.js","names":["motion","styled","css","keyboardFocusHighlightingRingCss","StyledInput","div","$isDisabled","StyledInputContentWrapper","theme","$backgroundColor","$isInvalid","$shouldShowTransparentBackground","$borderColor","wrong","colorMode","$size","$shouldShowOnlyBottomBorder","$shouldRoundRightCorners","$shouldShowKeyboardHighlighting","StyledInputContent","StyledInputField","input","$color","text","$placeholderWidth","$shouldShowCenteredContent","StyledMotionInputLabelWrapper","label","StyledMotionInputElement","StyledInputLabel","StyledMotionInputClearIcon","StyledInputIconWrapper","StyledInputRightElement","$isInline"],"sources":["../../../../src/components/input/Input.styles.ts"],"sourcesContent":["import { motion } from 'motion/react';\nimport styled, { css } from 'styled-components';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\nimport type { InputSize } from './Input';\nimport { CSSProperties } from 'react';\nimport { keyboardFocusHighlightingRingCss } from '../../utils/keyboardFocusHighlighting.styles';\n\ntype StyledInputProps = WithTheme<{ $isDisabled?: boolean }>;\n\nexport const StyledInput = styled.div<StyledInputProps>`\n opacity: ${({ $isDisabled }) => ($isDisabled ? 0.5 : 1)};\n display: flex;\n width: 100%;\n`;\n\ntype StyledInputContentWrapperProps = WithTheme<{\n $backgroundColor?: CSSProperties['backgroundColor'];\n $shouldRoundRightCorners: boolean;\n $shouldShowOnlyBottomBorder?: boolean;\n $isInvalid?: boolean;\n $size: InputSize;\n $shouldShowTransparentBackground: boolean;\n $borderColor?: CSSProperties['borderColor'];\n $shouldShowKeyboardHighlighting: boolean;\n}>;\n\nexport const StyledInputContentWrapper = styled.div<StyledInputContentWrapperProps>`\n align-items: center;\n background-color: ${({ theme, $backgroundColor }: StyledInputContentWrapperProps) =>\n $backgroundColor ?? theme['100']};\n border: 1px solid transparent;\n color: ${({ theme }: StyledInputContentWrapperProps) => theme['006']};\n display: flex;\n justify-content: space-between;\n width: 100%;\n transition: opacity 0.3s ease;\n\n ${({ theme, $isInvalid, $shouldShowTransparentBackground, $borderColor }) => {\n if ($borderColor)\n return css`\n border-color: ${$borderColor};\n `;\n if ($isInvalid) {\n return css`\n border-color: ${theme.wrong};\n `;\n }\n\n if ($shouldShowTransparentBackground) {\n if (theme.colorMode === 'dark') {\n return css`\n border-color: rgba(255, 255, 255, 0.5);\n `;\n }\n\n return css`\n border-color: rgba(0, 0, 0, 0.5);\n `;\n }\n\n return css`\n border-color: rgba(160, 160, 160, 0.3);\n `;\n }}\n\n ${({ $size }) =>\n $size === 'small' &&\n css`\n height: 32px;\n `}\n\n ${({ $shouldShowOnlyBottomBorder, $size }) =>\n !$shouldShowOnlyBottomBorder &&\n css`\n min-height: ${$size === 'medium' ? '42px' : '32px'};\n `}\n\n ${({ $shouldRoundRightCorners, $shouldShowOnlyBottomBorder, theme }) => {\n if ($shouldShowOnlyBottomBorder) {\n return css`\n border-top: none;\n border-right: none;\n border-left: none;\n background-color: transparent;\n border-color: ${theme['408']};\n `;\n }\n\n if ($shouldRoundRightCorners) {\n return css`\n border-radius: 3px;\n `;\n }\n\n return css`\n border-bottom-left-radius: 3px;\n border-top-left-radius: 3px;\n border-right: none;\n `;\n }}\n\n ${({ $shouldShowKeyboardHighlighting }) =>\n $shouldShowKeyboardHighlighting &&\n css`\n /* Show highlighting when the input field is focused */\n &:has(input:focus-visible) {\n transition: none;\n ${keyboardFocusHighlightingRingCss}\n }\n `}\n`;\n\ntype StyledInputContentProps = WithTheme<{ $shouldShowOnlyBottomBorder?: boolean }>;\n\nexport const StyledInputContent = styled.div<StyledInputContentProps>`\n display: flex;\n flex: 1 1 auto;\n min-width: 0;\n margin: ${({ $shouldShowOnlyBottomBorder }) =>\n !$shouldShowOnlyBottomBorder ? '8px 10px' : '4px 0'};\n position: relative;\n`;\n\ntype StyledInputFieldProps = WithTheme<{\n $color?: CSSProperties['color'];\n $isInvalid?: boolean;\n $placeholderWidth: number;\n $shouldShowCenteredContent: boolean;\n}>;\n\nexport const StyledInputField = styled.input<StyledInputFieldProps>`\n background: none;\n border: none;\n color: ${({ theme, $color, $isInvalid }: StyledInputFieldProps) =>\n $color ?? ($isInvalid ? theme.wrong : theme.text)};\n padding: 0;\n width: ${({ $placeholderWidth }) => `calc(100% - ${$placeholderWidth}px)`};\n line-height: 1em;\n\n ${({ $shouldShowCenteredContent }) =>\n $shouldShowCenteredContent &&\n css`\n text-align: center;\n `}\n`;\n\nexport const StyledMotionInputLabelWrapper = styled(motion.label)`\n align-items: center;\n display: flex;\n flex: 0 0 auto;\n gap: 4px;\n line-height: 1.3;\n pointer-events: none;\n position: absolute;\n user-select: none;\n max-width: 100%;\n`;\n\nexport const StyledMotionInputElement = styled(motion.div)`\n display: flex;\n`;\n\ntype StyledInputLabelProps = WithTheme<{\n $color?: CSSProperties['color'];\n $isInvalid?: boolean;\n}>;\n\nexport const StyledInputLabel = styled.label<StyledInputLabelProps>`\n line-height: 1.3;\n pointer-events: none;\n width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n color: ${({ theme, $color, $isInvalid }: StyledInputLabelProps) =>\n $color ?? ($isInvalid ? theme.wrong : `rgba(${theme['text-rgb'] ?? ''}, 0.45)`)};\n`;\n\ntype StyledMotionInputClearIconProps = WithTheme<{\n $shouldShowOnlyBottomBorder?: boolean;\n $size: InputSize;\n $shouldShowKeyboardHighlighting: boolean;\n}>;\n\nexport const StyledMotionInputClearIcon = styled(motion.div)<StyledMotionInputClearIconProps>`\n align-items: center;\n border-left: ${({ $shouldShowOnlyBottomBorder }) =>\n $shouldShowOnlyBottomBorder ? 'none' : '1px solid rgba(160, 160, 160, 0.3)'};\n cursor: pointer;\n display: flex;\n flex: 0 0 auto;\n height: ${({ $size }) => ($size === 'medium' ? '40px' : '30px')};\n justify-content: center;\n width: ${({ $size }) => ($size === 'medium' ? '40px' : '30px')};\n\n ${({ $shouldShowKeyboardHighlighting }) =>\n $shouldShowKeyboardHighlighting &&\n css`\n &:focus-visible {\n transition: none;\n ${keyboardFocusHighlightingRingCss}\n }\n `}\n`;\n\nexport const StyledInputIconWrapper = styled.div`\n align-items: baseline;\n display: flex;\n flex: 0 0 auto;\n justify-content: center;\n margin-left: 10px;\n`;\n\ntype StyledInputRightElementProps = {\n $isInline?: boolean;\n};\n\nexport const StyledInputRightElement = styled.div<StyledInputRightElementProps>`\n flex: 0 0 auto;\n overflow: hidden;\n min-width: 28px;\n text-align: center;\n\n ${({ $isInline }) =>\n !$isInline &&\n css`\n border-bottom-right-radius: 3px;\n border-top-right-radius: 3px;\n `}\n\n &:has(*:focus-visible) {\n overflow: visible;\n }\n\n .beta-chayns-icon:focus-visible::after {\n transform: translate(-50%, -50%) scale(0.78);\n }\n`;\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,CAACD,MAAM,CAACK,GAAG,CAAC;AAC1D;AACA,CAAC;AAOD,OAAO,MAAMwB,gBAAgB,GAAG5B,MAAM,CAAC0B,KAA4B;AACnE;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,CAAC;EAAEnB,KAAK;EAAEc,MAAM;EAAEZ;AAAkC,CAAC,KAC1DY,MAAM,KAAKZ,UAAU,GAAGF,KAAK,CAACK,KAAK,GAAG,QAAQL,KAAK,CAAC,UAAU,CAAC,IAAI,EAAE,SAAS,CAAC;AACvF,CAAC;AAQD,OAAO,MAAMsB,0BAA0B,GAAG7B,MAAM,CAACD,MAAM,CAACK,GAAG,CAAkC;AAC7F;AACA,mBAAmB,CAAC;EAAEW;AAA4B,CAAC,KAC3CA,2BAA2B,GAAG,MAAM,GAAG,oCAAoC;AACnF;AACA;AACA;AACA,cAAc,CAAC;EAAED;AAAM,CAAC,KAAMA,KAAK,KAAK,QAAQ,GAAG,MAAM,GAAG,MAAO;AACnE;AACA,aAAa,CAAC;EAAEA;AAAM,CAAC,KAAMA,KAAK,KAAK,QAAQ,GAAG,MAAM,GAAG,MAAO;AAClE;AACA,MAAM,CAAC;EAAEG;AAAgC,CAAC,KAClCA,+BAA+B,IAC/BhB,GAAG;AACX;AACA;AACA,kBAAkBC,gCAAgC;AAClD;AACA,SAAS;AACT,CAAC;AAED,OAAO,MAAM4B,sBAAsB,GAAG9B,MAAM,CAACI,GAAG;AAChD;AACA;AACA;AACA;AACA;AACA,CAAC;AAMD,OAAO,MAAM2B,uBAAuB,GAAG/B,MAAM,CAACI,GAAiC;AAC/E;AACA;AACA;AACA;AACA;AACA,MAAM,CAAC;EAAE4B;AAAU,CAAC,KACZ,CAACA,SAAS,IACV/B,GAAG;AACX;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"Input.styles.js","names":["motion","styled","css","StyledInput","div","$isDisabled","StyledInputContentWrapper","theme","$backgroundColor","$isInvalid","$shouldShowTransparentBackground","$borderColor","wrong","colorMode","$size","$shouldShowOnlyBottomBorder","$shouldRoundRightCorners","StyledInputContent","StyledInputField","input","$color","text","$placeholderWidth","$shouldShowCenteredContent","StyledMotionInputLabelWrapper","label","StyledMotionInputElement","StyledInputLabel","StyledMotionInputClearIcon","StyledInputIconWrapper","StyledInputRightElement"],"sources":["../../../../src/components/input/Input.styles.ts"],"sourcesContent":["import { motion } from 'motion/react';\nimport styled, { css } from 'styled-components';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\nimport type { InputSize } from './Input';\nimport { CSSProperties } from 'react';\n\ntype StyledInputProps = WithTheme<{ $isDisabled?: boolean }>;\n\nexport const StyledInput = styled.div<StyledInputProps>`\n opacity: ${({ $isDisabled }) => ($isDisabled ? 0.5 : 1)};\n display: flex;\n width: 100%;\n`;\n\ntype StyledInputContentWrapperProps = WithTheme<{\n $backgroundColor?: CSSProperties['backgroundColor'];\n $shouldRoundRightCorners: boolean;\n $shouldShowOnlyBottomBorder?: boolean;\n $isInvalid?: boolean;\n $size: InputSize;\n $shouldShowTransparentBackground: boolean;\n $borderColor?: CSSProperties['borderColor'];\n}>;\n\nexport const StyledInputContentWrapper = styled.div<StyledInputContentWrapperProps>`\n align-items: center;\n background-color: ${({ theme, $backgroundColor }: StyledInputContentWrapperProps) =>\n $backgroundColor ?? theme['100']};\n border: 1px solid transparent;\n color: ${({ theme }: StyledInputContentWrapperProps) => theme['006']};\n display: flex;\n justify-content: space-between;\n width: 100%;\n transition: opacity 0.3s ease;\n\n ${({ theme, $isInvalid, $shouldShowTransparentBackground, $borderColor }) => {\n if ($borderColor)\n return css`\n border-color: ${$borderColor};\n `;\n if ($isInvalid) {\n return css`\n border-color: ${theme.wrong};\n `;\n }\n\n if ($shouldShowTransparentBackground) {\n if (theme.colorMode === 'dark') {\n return css`\n border-color: rgba(255, 255, 255, 0.5);\n `;\n }\n\n return css`\n border-color: rgba(0, 0, 0, 0.5);\n `;\n }\n\n return css`\n border-color: rgba(160, 160, 160, 0.3);\n `;\n }}\n\n ${({ $size }) =>\n $size === 'small' &&\n css`\n height: 32px;\n `}\n\n ${({ $shouldShowOnlyBottomBorder, $size }) =>\n !$shouldShowOnlyBottomBorder &&\n css`\n min-height: ${$size === 'medium' ? '42px' : '32px'};\n `}\n\n ${({ $shouldRoundRightCorners, $shouldShowOnlyBottomBorder, theme }) => {\n if ($shouldShowOnlyBottomBorder) {\n return css`\n border-top: none;\n border-right: none;\n border-left: none;\n background-color: transparent;\n border-color: ${theme['408']};\n `;\n }\n\n if ($shouldRoundRightCorners) {\n return css`\n border-radius: 3px;\n `;\n }\n\n return css`\n border-bottom-left-radius: 3px;\n border-top-left-radius: 3px;\n border-right: none;\n `;\n }}\n`;\n\ntype StyledInputContentProps = WithTheme<{ $shouldShowOnlyBottomBorder?: boolean }>;\n\nexport const StyledInputContent = styled.div<StyledInputContentProps>`\n display: flex;\n flex: 1 1 auto;\n min-width: 0;\n margin: ${({ $shouldShowOnlyBottomBorder }) =>\n !$shouldShowOnlyBottomBorder ? '8px 10px' : '4px 0'};\n position: relative;\n`;\n\ntype StyledInputFieldProps = WithTheme<{\n $color?: CSSProperties['color'];\n $isInvalid?: boolean;\n $placeholderWidth: number;\n $shouldShowCenteredContent: boolean;\n}>;\n\nexport const StyledInputField = styled.input<StyledInputFieldProps>`\n background: none;\n border: none;\n color: ${({ theme, $color, $isInvalid }: StyledInputFieldProps) =>\n $color ?? ($isInvalid ? theme.wrong : theme.text)};\n padding: 0;\n width: ${({ $placeholderWidth }) => `calc(100% - ${$placeholderWidth}px)`};\n line-height: 1em;\n\n ${({ $shouldShowCenteredContent }) =>\n $shouldShowCenteredContent &&\n css`\n text-align: center;\n `}\n`;\n\nexport const StyledMotionInputLabelWrapper = styled(motion.label)`\n align-items: center;\n display: flex;\n flex: 0 0 auto;\n gap: 4px;\n line-height: 1.3;\n pointer-events: none;\n position: absolute;\n user-select: none;\n max-width: 100%;\n`;\n\nexport const StyledMotionInputElement = styled(motion.div)`\n display: flex;\n`;\n\ntype StyledInputLabelProps = WithTheme<{\n $color?: CSSProperties['color'];\n $isInvalid?: boolean;\n}>;\n\nexport const StyledInputLabel = styled.label<StyledInputLabelProps>`\n line-height: 1.3;\n pointer-events: none;\n width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n color: ${({ theme, $color, $isInvalid }: StyledInputLabelProps) =>\n $color ?? ($isInvalid ? theme.wrong : `rgba(${theme['text-rgb'] ?? ''}, 0.45)`)};\n`;\n\ntype StyledMotionInputClearIconProps = WithTheme<{\n $shouldShowOnlyBottomBorder?: boolean;\n $size: InputSize;\n}>;\n\nexport const StyledMotionInputClearIcon = styled(motion.div)<StyledMotionInputClearIconProps>`\n align-items: center;\n border-left: ${({ $shouldShowOnlyBottomBorder }) =>\n $shouldShowOnlyBottomBorder ? 'none' : '1px solid rgba(160, 160, 160, 0.3)'};\n cursor: pointer;\n display: flex;\n flex: 0 0 auto;\n height: ${({ $size }) => ($size === 'medium' ? '40px' : '30px')};\n justify-content: center;\n width: ${({ $size }) => ($size === 'medium' ? '40px' : '30px')};\n`;\n\nexport const StyledInputIconWrapper = styled.div`\n align-items: baseline;\n display: flex;\n flex: 0 0 auto;\n justify-content: center;\n margin-left: 10px;\n`;\n\nexport const StyledInputRightElement = styled.div`\n border-bottom-right-radius: 3px;\n border-top-right-radius: 3px;\n overflow: hidden;\n flex: 0 0 auto;\n`;\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,cAAc;AACrC,OAAOC,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAO/C,OAAO,MAAMC,WAAW,GAAGF,MAAM,CAACG,GAAqB;AACvD,eAAe,CAAC;EAAEC;AAAY,CAAC,KAAMA,WAAW,GAAG,GAAG,GAAG,CAAE;AAC3D;AACA;AACA,CAAC;AAYD,OAAO,MAAMC,yBAAyB,GAAGL,MAAM,CAACG,GAAmC;AACnF;AACA,wBAAwB,CAAC;E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AACnF;AACA;AACA;AACA,cAAc,CAAC;EAAED;AAAM,CAAC,KAAMA,KAAK,KAAK,QAAQ,GAAG,MAAM,GAAG,MAAO;AACnE;AACA,aAAa,CAAC;EAAEA;AAAM,CAAC,KAAMA,KAAK,KAAK,QAAQ,GAAG,MAAM,GAAG,MAAO;AAClE,CAAC;AAED,OAAO,MAAMe,sBAAsB,GAAG5B,MAAM,CAACG,GAAG;AAChD;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAM0B,uBAAuB,GAAG7B,MAAM,CAACG,GAAG;AACjD;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
|
|
@@ -1,39 +1,24 @@
|
|
|
1
1
|
import { c as _c } from "react-compiler-runtime";
|
|
2
2
|
import { AnimatePresence, MotionConfig } from 'motion/react';
|
|
3
3
|
import React, { useCallback, useMemo, useState } from 'react';
|
|
4
|
-
import { useColorScheme } from '../color-scheme-provider/ColorSchemeProvider';
|
|
5
|
-
import { useUuid } from '../../hooks/uuid';
|
|
6
4
|
import { shouldShowExpandIndicator } from './List.utils';
|
|
7
5
|
export const ListContext = /*#__PURE__*/React.createContext({
|
|
8
6
|
isAnyItemExpandable: false,
|
|
9
7
|
isWrapped: false,
|
|
10
8
|
openItemUuid: undefined,
|
|
11
|
-
updateOpenItemUuid: () => {}
|
|
12
|
-
shouldEnableKeyboardHighlighting: false,
|
|
13
|
-
listGroupUuid: undefined,
|
|
14
|
-
listItemUuids: undefined,
|
|
15
|
-
registerListItemUuid: undefined,
|
|
16
|
-
unregisterListItemUuid: undefined,
|
|
17
|
-
activeListItemUuid: undefined,
|
|
18
|
-
updateActiveListItemUuid: undefined
|
|
9
|
+
updateOpenItemUuid: () => {}
|
|
19
10
|
});
|
|
20
11
|
ListContext.displayName = 'ListContext';
|
|
21
12
|
const List = t0 => {
|
|
22
13
|
"use memo";
|
|
23
14
|
|
|
24
|
-
const $ = _c(
|
|
15
|
+
const $ = _c(13);
|
|
25
16
|
const {
|
|
26
17
|
children,
|
|
27
|
-
isWrapped: t1
|
|
28
|
-
shouldEnableKeyboardHighlighting
|
|
18
|
+
isWrapped: t1
|
|
29
19
|
} = t0;
|
|
30
20
|
const isWrapped = t1 === undefined ? false : t1;
|
|
31
|
-
const colorScheme = useColorScheme();
|
|
32
|
-
const shouldEnableKeyboardHighlightingEffective = shouldEnableKeyboardHighlighting ?? colorScheme?.shouldEnableKeyboardHighlighting ?? false;
|
|
33
21
|
const [openItemUuid, setOpenItemUuid] = useState(undefined);
|
|
34
|
-
const [listItemUuids, setListItemUuids] = useState();
|
|
35
|
-
const [activeListItemUuid, setActiveListItemUuid] = useState(undefined);
|
|
36
|
-
const listGroupUuid = useUuid();
|
|
37
22
|
let t2;
|
|
38
23
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
39
24
|
t2 = (uuid, t3) => {
|
|
@@ -53,134 +38,63 @@ const List = t0 => {
|
|
|
53
38
|
}
|
|
54
39
|
const updateOpenItemUuid = t2;
|
|
55
40
|
let t3;
|
|
56
|
-
if ($[1] !==
|
|
57
|
-
t3 =
|
|
58
|
-
|
|
59
|
-
return uuids;
|
|
60
|
-
}
|
|
61
|
-
const domOrderedUuids = Array.from(document.querySelectorAll(`[data-uuid^="${listGroupUuid}---"]`)).map(_temp).filter(_temp2);
|
|
62
|
-
return domOrderedUuids.filter(uuid_1 => uuids.includes(uuid_1));
|
|
63
|
-
};
|
|
64
|
-
$[1] = listGroupUuid;
|
|
41
|
+
if ($[1] !== children) {
|
|
42
|
+
t3 = shouldShowExpandIndicator(children);
|
|
43
|
+
$[1] = children;
|
|
65
44
|
$[2] = t3;
|
|
66
45
|
} else {
|
|
67
46
|
t3 = $[2];
|
|
68
47
|
}
|
|
69
|
-
const sortListItemUuidsByDom = t3;
|
|
70
48
|
let t4;
|
|
71
|
-
if ($[3] !==
|
|
72
|
-
t4 =
|
|
73
|
-
|
|
74
|
-
const currentListItemUuids = t5 === undefined ? [] : t5;
|
|
75
|
-
const nextListItemUuids = currentListItemUuids.includes(uuid_2) ? currentListItemUuids : [...currentListItemUuids, uuid_2];
|
|
76
|
-
return sortListItemUuidsByDom(nextListItemUuids);
|
|
77
|
-
});
|
|
78
|
-
};
|
|
79
|
-
$[3] = sortListItemUuidsByDom;
|
|
80
|
-
$[4] = t4;
|
|
81
|
-
} else {
|
|
82
|
-
t4 = $[4];
|
|
83
|
-
}
|
|
84
|
-
const registerListItemUuid = t4;
|
|
85
|
-
let t5;
|
|
86
|
-
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
87
|
-
t5 = uuid_3 => {
|
|
88
|
-
setListItemUuids(t6 => {
|
|
89
|
-
const currentListItemUuids_0 = t6 === undefined ? [] : t6;
|
|
90
|
-
return currentListItemUuids_0.filter(currentUuid => currentUuid !== uuid_3);
|
|
91
|
-
});
|
|
92
|
-
};
|
|
93
|
-
$[5] = t5;
|
|
94
|
-
} else {
|
|
95
|
-
t5 = $[5];
|
|
96
|
-
}
|
|
97
|
-
const unregisterListItemUuid = t5;
|
|
98
|
-
let t6;
|
|
99
|
-
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
100
|
-
t6 = uuid_4 => {
|
|
101
|
-
setActiveListItemUuid(uuid_4);
|
|
102
|
-
};
|
|
103
|
-
$[6] = t6;
|
|
104
|
-
} else {
|
|
105
|
-
t6 = $[6];
|
|
106
|
-
}
|
|
107
|
-
const updateActiveListItemUuid = t6;
|
|
108
|
-
let t7;
|
|
109
|
-
if ($[7] !== children) {
|
|
110
|
-
t7 = shouldShowExpandIndicator(children);
|
|
111
|
-
$[7] = children;
|
|
112
|
-
$[8] = t7;
|
|
113
|
-
} else {
|
|
114
|
-
t7 = $[8];
|
|
115
|
-
}
|
|
116
|
-
let t8;
|
|
117
|
-
if ($[9] !== activeListItemUuid || $[10] !== isWrapped || $[11] !== listGroupUuid || $[12] !== listItemUuids || $[13] !== openItemUuid || $[14] !== registerListItemUuid || $[15] !== shouldEnableKeyboardHighlightingEffective || $[16] !== t7) {
|
|
118
|
-
t8 = {
|
|
119
|
-
isAnyItemExpandable: t7,
|
|
49
|
+
if ($[3] !== isWrapped || $[4] !== openItemUuid || $[5] !== t3) {
|
|
50
|
+
t4 = {
|
|
51
|
+
isAnyItemExpandable: t3,
|
|
120
52
|
isWrapped,
|
|
121
53
|
openItemUuid,
|
|
122
|
-
updateOpenItemUuid
|
|
123
|
-
shouldEnableKeyboardHighlighting: shouldEnableKeyboardHighlightingEffective,
|
|
124
|
-
listGroupUuid,
|
|
125
|
-
listItemUuids,
|
|
126
|
-
registerListItemUuid,
|
|
127
|
-
unregisterListItemUuid,
|
|
128
|
-
activeListItemUuid,
|
|
129
|
-
updateActiveListItemUuid
|
|
54
|
+
updateOpenItemUuid
|
|
130
55
|
};
|
|
131
|
-
$[
|
|
132
|
-
$[
|
|
133
|
-
$[
|
|
134
|
-
$[
|
|
135
|
-
$[13] = openItemUuid;
|
|
136
|
-
$[14] = registerListItemUuid;
|
|
137
|
-
$[15] = shouldEnableKeyboardHighlightingEffective;
|
|
138
|
-
$[16] = t7;
|
|
139
|
-
$[17] = t8;
|
|
56
|
+
$[3] = isWrapped;
|
|
57
|
+
$[4] = openItemUuid;
|
|
58
|
+
$[5] = t3;
|
|
59
|
+
$[6] = t4;
|
|
140
60
|
} else {
|
|
141
|
-
|
|
61
|
+
t4 = $[6];
|
|
142
62
|
}
|
|
143
|
-
const providerValue =
|
|
144
|
-
let
|
|
145
|
-
if ($[
|
|
146
|
-
|
|
63
|
+
const providerValue = t4;
|
|
64
|
+
let t5;
|
|
65
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
66
|
+
t5 = {
|
|
147
67
|
type: "tween"
|
|
148
68
|
};
|
|
149
|
-
$[
|
|
69
|
+
$[7] = t5;
|
|
150
70
|
} else {
|
|
151
|
-
|
|
71
|
+
t5 = $[7];
|
|
152
72
|
}
|
|
153
|
-
let
|
|
154
|
-
if ($[
|
|
155
|
-
|
|
156
|
-
transition:
|
|
73
|
+
let t6;
|
|
74
|
+
if ($[8] !== children) {
|
|
75
|
+
t6 = /*#__PURE__*/React.createElement(MotionConfig, {
|
|
76
|
+
transition: t5
|
|
157
77
|
}, /*#__PURE__*/React.createElement(AnimatePresence, {
|
|
158
78
|
initial: false
|
|
159
79
|
}, children));
|
|
160
|
-
$[
|
|
161
|
-
$[
|
|
80
|
+
$[8] = children;
|
|
81
|
+
$[9] = t6;
|
|
162
82
|
} else {
|
|
163
|
-
|
|
83
|
+
t6 = $[9];
|
|
164
84
|
}
|
|
165
|
-
let
|
|
166
|
-
if ($[
|
|
167
|
-
|
|
85
|
+
let t7;
|
|
86
|
+
if ($[10] !== providerValue || $[11] !== t6) {
|
|
87
|
+
t7 = /*#__PURE__*/React.createElement(ListContext.Provider, {
|
|
168
88
|
value: providerValue
|
|
169
|
-
},
|
|
170
|
-
$[
|
|
171
|
-
$[
|
|
172
|
-
$[
|
|
89
|
+
}, t6);
|
|
90
|
+
$[10] = providerValue;
|
|
91
|
+
$[11] = t6;
|
|
92
|
+
$[12] = t7;
|
|
173
93
|
} else {
|
|
174
|
-
|
|
94
|
+
t7 = $[12];
|
|
175
95
|
}
|
|
176
|
-
return
|
|
96
|
+
return t7;
|
|
177
97
|
};
|
|
178
98
|
List.displayName = 'List';
|
|
179
99
|
export default List;
|
|
180
|
-
function _temp(element) {
|
|
181
|
-
return element.getAttribute("data-uuid")?.split("---")[1];
|
|
182
|
-
}
|
|
183
|
-
function _temp2(uuid_0) {
|
|
184
|
-
return Boolean(uuid_0);
|
|
185
|
-
}
|
|
186
100
|
//# sourceMappingURL=List.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.js","names":["AnimatePresence","MotionConfig","React","useCallback","useMemo","useState","useColorScheme","useUuid","shouldShowExpandIndicator","ListContext","createContext","isAnyItemExpandable","isWrapped","openItemUuid","undefined","updateOpenItemUuid","shouldEnableKeyboardHighlighting","listGroupUuid","listItemUuids","registerListItemUuid","unregisterListItemUuid","activeListItemUuid","updateActiveListItemUuid","displayName","List","t0","$","_c","children","t1","colorScheme","shouldEnableKeyboardHighlightingEffective","setOpenItemUuid","setListItemUuids","setActiveListItemUuid","t2","Symbol","for","uuid","t3","shouldOnlyOpen","currentOpenItemUuid","uuids","document","domOrderedUuids","Array","from","querySelectorAll","map","_temp","filter","_temp2","uuid_1","includes","sortListItemUuidsByDom","t4","uuid_2","t5","currentListItemUuids","nextListItemUuids","uuid_3","t6","currentListItemUuids_0","currentUuid","uuid_4","t7","t8","providerValue","t9","type","t10","createElement","transition","initial","t11","Provider","element","getAttribute","split","uuid_0","Boolean"],"sources":["../../../../src/components/list/List.tsx"],"sourcesContent":["import { AnimatePresence, MotionConfig } from 'motion/react';\nimport React, { FC, ReactNode, useCallback, useMemo, useState } from 'react';\nimport { useColorScheme } from '../color-scheme-provider/ColorSchemeProvider';\nimport { useUuid } from '../../hooks/uuid';\nimport { shouldShowExpandIndicator } from './List.utils';\n\ninterface IListContext {\n isAnyItemExpandable: boolean;\n isWrapped: boolean;\n openItemUuid: string | undefined;\n updateOpenItemUuid: (uuid: string, options?: { shouldOnlyOpen?: boolean }) => void;\n shouldEnableKeyboardHighlighting: boolean;\n listGroupUuid?: string;\n listItemUuids?: string[];\n registerListItemUuid?: (uuid: string) => void;\n unregisterListItemUuid?: (uuid: string) => void;\n activeListItemUuid?: string;\n updateActiveListItemUuid?: (uuid?: string) => void;\n}\n\nexport const ListContext = React.createContext<IListContext>({\n isAnyItemExpandable: false,\n isWrapped: false,\n openItemUuid: undefined,\n updateOpenItemUuid: () => {},\n shouldEnableKeyboardHighlighting: false,\n listGroupUuid: undefined,\n listItemUuids: undefined,\n registerListItemUuid: undefined,\n unregisterListItemUuid: undefined,\n activeListItemUuid: undefined,\n updateActiveListItemUuid: undefined,\n});\n\nListContext.displayName = 'ListContext';\n\ntype ListProps = {\n /**\n * The items of the list\n */\n children: ReactNode;\n /**\n * This value must be set for nested AccordionGroup components. This adjusts the style of\n * the head and the padding of the content accordions.\n */\n isWrapped?: boolean;\n /**\n * Enables keyboard-only focus highlighting and arrow-key navigation within the list.\n */\n shouldEnableKeyboardHighlighting?: boolean;\n};\n\nconst List: FC<ListProps> = ({ children, isWrapped = false, shouldEnableKeyboardHighlighting }) => {\n 'use memo';\n\n const colorScheme = useColorScheme();\n const shouldEnableKeyboardHighlightingEffective =\n shouldEnableKeyboardHighlighting ?? colorScheme?.shouldEnableKeyboardHighlighting ?? false;\n\n const [openItemUuid, setOpenItemUuid] = useState<IListContext['openItemUuid']>(undefined);\n const [listItemUuids, setListItemUuids] = useState<string[]>();\n const [activeListItemUuid, setActiveListItemUuid] =\n useState<IListContext['activeListItemUuid']>(undefined);\n\n const listGroupUuid = useUuid();\n\n const updateOpenItemUuid = useCallback<IListContext['updateOpenItemUuid']>(\n (uuid, { shouldOnlyOpen } = {}) => {\n setOpenItemUuid((currentOpenItemUuid) => {\n if (currentOpenItemUuid === uuid && shouldOnlyOpen !== true) {\n return undefined;\n }\n\n return uuid;\n });\n },\n [setOpenItemUuid],\n );\n\n const sortListItemUuidsByDom = useCallback(\n (uuids: string[]) => {\n if (typeof document === 'undefined') {\n return uuids;\n }\n\n const domOrderedUuids = Array.from(\n document.querySelectorAll<HTMLElement>(`[data-uuid^=\"${listGroupUuid}---\"]`),\n )\n .map((element) => element.getAttribute('data-uuid')?.split('---')[1])\n .filter((uuid): uuid is string => Boolean(uuid));\n\n return domOrderedUuids.filter((uuid) => uuids.includes(uuid));\n },\n [listGroupUuid],\n );\n\n const registerListItemUuid = useCallback(\n (uuid: string) => {\n setListItemUuids((currentListItemUuids = []) => {\n const nextListItemUuids = currentListItemUuids.includes(uuid)\n ? currentListItemUuids\n : [...currentListItemUuids, uuid];\n\n return sortListItemUuidsByDom(nextListItemUuids);\n });\n },\n [sortListItemUuidsByDom],\n );\n\n const unregisterListItemUuid = useCallback((uuid: string) => {\n setListItemUuids((currentListItemUuids = []) =>\n currentListItemUuids.filter((currentUuid) => currentUuid !== uuid),\n );\n }, []);\n\n const updateActiveListItemUuid = useCallback((uuid?: string) => {\n setActiveListItemUuid(uuid);\n }, []);\n\n const providerValue = useMemo<IListContext>(\n () => ({\n isAnyItemExpandable: shouldShowExpandIndicator(children),\n isWrapped,\n openItemUuid,\n updateOpenItemUuid,\n shouldEnableKeyboardHighlighting: shouldEnableKeyboardHighlightingEffective,\n listGroupUuid,\n listItemUuids,\n registerListItemUuid,\n unregisterListItemUuid,\n activeListItemUuid,\n updateActiveListItemUuid,\n }),\n [\n children,\n isWrapped,\n openItemUuid,\n updateOpenItemUuid,\n shouldEnableKeyboardHighlightingEffective,\n listGroupUuid,\n listItemUuids,\n registerListItemUuid,\n unregisterListItemUuid,\n activeListItemUuid,\n updateActiveListItemUuid,\n ],\n );\n\n return (\n <ListContext.Provider value={providerValue}>\n <MotionConfig transition={{ type: 'tween' }}>\n <AnimatePresence initial={false}>{children}</AnimatePresence>\n </MotionConfig>\n </ListContext.Provider>\n );\n};\n\nList.displayName = 'List';\n\nexport default List;\n"],"mappings":";AAAA,SAASA,eAAe,EAAEC,YAAY,QAAQ,cAAc;AAC5D,OAAOC,KAAK,IAAmBC,WAAW,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAC5E,SAASC,cAAc,QAAQ,8CAA8C;AAC7E,SAASC,OAAO,QAAQ,kBAAkB;AAC1C,SAASC,yBAAyB,QAAQ,cAAc;AAgBxD,OAAO,MAAMC,WAAW,gBAAGP,KAAK,CAACQ,aAAa,CAAe;EACzDC,mBAAmB,EAAE,KAAK;EAC1BC,SAAS,EAAE,KAAK;EAChBC,YAAY,EAAEC,SAAS;EACvBC,kBAAkB,EAAEA,CAAA,KAAM,CAAC,CAAC;EAC5BC,gCAAgC,EAAE,KAAK;EACvCC,aAAa,EAAEH,SAAS;EACxBI,aAAa,EAAEJ,SAAS;EACxBK,oBAAoB,EAAEL,SAAS;EAC/BM,sBAAsB,EAAEN,SAAS;EACjCO,kBAAkB,EAAEP,SAAS;EAC7BQ,wBAAwB,E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AQ,CAAC;AAAA;AApCxD,SAAA3B,OAAA4B,MAAA;EAAA,OAqCsBC,OAAO,CAAC1C,MAAI,CAAC;AAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"List.js","names":["AnimatePresence","MotionConfig","React","useCallback","useMemo","useState","shouldShowExpandIndicator","ListContext","createContext","isAnyItemExpandable","isWrapped","openItemUuid","undefined","updateOpenItemUuid","displayName","List","t0","$","_c","children","t1","setOpenItemUuid","t2","Symbol","for","uuid","t3","shouldOnlyOpen","currentOpenItemUuid","t4","providerValue","t5","type","t6","createElement","transition","initial","t7","Provider"],"sources":["../../../../src/components/list/List.tsx"],"sourcesContent":["import { AnimatePresence, MotionConfig } from 'motion/react';\nimport React, { FC, ReactNode, useCallback, useMemo, useState } from 'react';\nimport { shouldShowExpandIndicator } from './List.utils';\n\ninterface IListContext {\n isAnyItemExpandable: boolean;\n isWrapped: boolean;\n openItemUuid: string | undefined;\n updateOpenItemUuid: (uuid: string, options?: { shouldOnlyOpen?: boolean }) => void;\n}\n\nexport const ListContext = React.createContext<IListContext>({\n isAnyItemExpandable: false,\n isWrapped: false,\n openItemUuid: undefined,\n updateOpenItemUuid: () => {},\n});\n\nListContext.displayName = 'ListContext';\n\ntype ListProps = {\n /**\n * The items of the list\n */\n children: ReactNode;\n /**\n * This value must be set for nested AccordionGroup components. This adjusts the style of\n * the head and the padding of the content accordions.\n */\n isWrapped?: boolean;\n};\n\nconst List: FC<ListProps> = ({ children, isWrapped = false }) => {\n 'use memo';\n\n const [openItemUuid, setOpenItemUuid] = useState<IListContext['openItemUuid']>(undefined);\n\n const updateOpenItemUuid = useCallback<IListContext['updateOpenItemUuid']>(\n (uuid, { shouldOnlyOpen } = {}) => {\n setOpenItemUuid((currentOpenItemUuid) => {\n if (currentOpenItemUuid === uuid && shouldOnlyOpen !== true) {\n return undefined;\n }\n\n return uuid;\n });\n },\n [setOpenItemUuid],\n );\n\n const providerValue = useMemo<IListContext>(\n () => ({\n isAnyItemExpandable: shouldShowExpandIndicator(children),\n isWrapped,\n openItemUuid,\n updateOpenItemUuid,\n }),\n [children, isWrapped, openItemUuid, updateOpenItemUuid],\n );\n\n return (\n <ListContext.Provider value={providerValue}>\n <MotionConfig transition={{ type: 'tween' }}>\n <AnimatePresence initial={false}>{children}</AnimatePresence>\n </MotionConfig>\n </ListContext.Provider>\n );\n};\n\nList.displayName = 'List';\n\nexport default List;\n"],"mappings":";AAAA,SAASA,eAAe,EAAEC,YAAY,QAAQ,cAAc;AAC5D,OAAOC,KAAK,IAAmBC,WAAW,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAC5E,SAASC,yBAAyB,QAAQ,cAAc;AASxD,OAAO,MAAMC,WAAW,gBAAGL,KAAK,CAACM,aAAa,CAAe;EACzDC,mBAAmB,EAAE,KAAK;EAC1BC,SAAS,EAAE,KAAK;EAChBC,YAAY,EAAEC,SAAS;EACvBC,kBAAkB,EAAEA,CAAA,KAAM,CAAC;AAC/B,CAAC,CAAC;AAEFN,WAAW,CAACO,WAAW,GAAG,aAAa;AAcvC,MAAMC,IAAmB,GAAGC,EAAA;EAAA;;EAAA,MAAAC,CAAA,GAAAC,EAAA;EAAC;IAAAC,QAAA;IAAAT,SAAA,EAAAU;EAAA,IAAAJ,EAA+B;EAAnB,MAAAN,SAAA,GAAAU,EAAiB,KAAjBR,SAAiB,GAAjB,KAAiB,GAAjBQ,EAAiB;EAGtD,OAAAT,YAAA,EAAAU,eAAA,IAAwChB,QAAQ,CAA+BO,SAAS,CAAC;EAAC,IAAAU,EAAA;EAAA,IAAAL,CAAA,QAAAM,MAAA,CAAAC,GAAA;IAGtFF,EAAA,GAAAA,CAAAG,IAAA,EAAAC,EAAA;MAAO;QAAAC;MAAA,IAAAD,EAAuB,KAAvBd,SAAuB,GAAvB,CAAsB,CAAC,GAAvBc,EAAuB;MAC1BL,eAAe,CAACO,mBAAA;QACZ,IAAIA,mBAAmB,KAAKH,IAA+B,IAAvBE,cAAc,KAAK,IAAI;UAA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AAA;EAAA,IAAAoB,EAAA;EAAA,IAAApB,CAAA,SAAAa,aAAA,IAAAb,CAAA,SAAAgB,EAAA;IAHnBI,EAAA,gBAAAnC,KAAA,CAAAgC,aAAA,CAAA3B,WAAA,CAAA+B,QAAA;MAA6BR,KAAa,EAAbA;IAAa,GACtCG,EAGkB,CAAC;IAAAhB,CAAA,OAAAa,aAAA;IAAAb,CAAA,OAAAgB,EAAA;IAAAhB,CAAA,OAAAoB,EAAA;EAAA;IAAAA,EAAA,GAAApB,CAAA;EAAA;EAAA,OAJvBoB,EAIuB;AAAA,CAE9B;AAEDtB,IAAI,CAACD,WAAW,GAAG,MAAM;AAEzB,eAAeC,IAAI","ignoreList":[]}
|
|
@@ -14,206 +14,4 @@ export const shouldShowExpandIndicator = node => Children.toArray(node).some(chi
|
|
|
14
14
|
}
|
|
15
15
|
return false;
|
|
16
16
|
});
|
|
17
|
-
const LEFT_ELEMENT_FOCUSABLE_SELECTOR = '[data-left-element="true"] a[href], [data-left-element="true"] button, [data-left-element="true"] input, [data-left-element="true"] select, [data-left-element="true"] textarea, [data-left-element="true"] [tabindex], [data-left-element="true"] [contenteditable="true"]';
|
|
18
|
-
const RIGHT_ELEMENT_FOCUSABLE_SELECTOR = '[data-right-element="true"] a[href], [data-right-element="true"] button, [data-right-element="true"] input, [data-right-element="true"] select, [data-right-element="true"] textarea, [data-right-element="true"] [tabindex], [data-right-element="true"] [contenteditable="true"]';
|
|
19
|
-
const getFocusableElements = (root, selector) => Array.from(root.querySelectorAll(selector)).filter(element => !element.hasAttribute('disabled') && element.getAttribute('tabindex') !== '-1');
|
|
20
|
-
const getFocusedElementIndex = (elements, targetElement) => {
|
|
21
|
-
if (!targetElement || elements.length === 0) {
|
|
22
|
-
return -1;
|
|
23
|
-
}
|
|
24
|
-
return elements.findIndex(element => element === targetElement || element.contains(targetElement));
|
|
25
|
-
};
|
|
26
|
-
const getListItemElementByIndex = ({
|
|
27
|
-
index,
|
|
28
|
-
listItemUuids,
|
|
29
|
-
listGroupUuid
|
|
30
|
-
}) => {
|
|
31
|
-
const listItemUuid = listItemUuids[index];
|
|
32
|
-
if (!listItemUuid || typeof listGroupUuid !== 'string') {
|
|
33
|
-
return undefined;
|
|
34
|
-
}
|
|
35
|
-
return document.querySelector(`[data-uuid="${listGroupUuid}---${listItemUuid}"]`);
|
|
36
|
-
};
|
|
37
|
-
const focusListItemByIndex = ({
|
|
38
|
-
index,
|
|
39
|
-
listItemUuids,
|
|
40
|
-
listGroupUuid,
|
|
41
|
-
updateActiveListItemUuid
|
|
42
|
-
}) => {
|
|
43
|
-
const listItemUuid = listItemUuids[index];
|
|
44
|
-
const listItemElement = getListItemElementByIndex({
|
|
45
|
-
index,
|
|
46
|
-
listItemUuids,
|
|
47
|
-
listGroupUuid
|
|
48
|
-
});
|
|
49
|
-
if (!listItemUuid || !listItemElement || typeof updateActiveListItemUuid !== 'function') {
|
|
50
|
-
return false;
|
|
51
|
-
}
|
|
52
|
-
updateActiveListItemUuid(listItemUuid);
|
|
53
|
-
listItemElement.focus();
|
|
54
|
-
return true;
|
|
55
|
-
};
|
|
56
|
-
export const handleHorizontalArrowNavigation = ({
|
|
57
|
-
event,
|
|
58
|
-
currentListItemElement,
|
|
59
|
-
targetElement,
|
|
60
|
-
isCurrentListItemTarget
|
|
61
|
-
}) => {
|
|
62
|
-
if (event.key !== 'ArrowRight' && event.key !== 'ArrowLeft') {
|
|
63
|
-
return false;
|
|
64
|
-
}
|
|
65
|
-
const focusableLeftElements = getFocusableElements(currentListItemElement, LEFT_ELEMENT_FOCUSABLE_SELECTOR);
|
|
66
|
-
const focusableRightElements = getFocusableElements(currentListItemElement, RIGHT_ELEMENT_FOCUSABLE_SELECTOR);
|
|
67
|
-
const focusedLeftElementIndex = getFocusedElementIndex(focusableLeftElements, targetElement);
|
|
68
|
-
if (focusedLeftElementIndex !== -1) {
|
|
69
|
-
event.preventDefault();
|
|
70
|
-
if (event.key === 'ArrowLeft') {
|
|
71
|
-
const previousLeftElement = focusableLeftElements[focusedLeftElementIndex - 1];
|
|
72
|
-
if (previousLeftElement) {
|
|
73
|
-
previousLeftElement.focus();
|
|
74
|
-
} else {
|
|
75
|
-
currentListItemElement.focus();
|
|
76
|
-
}
|
|
77
|
-
return true;
|
|
78
|
-
}
|
|
79
|
-
const nextLeftElement = focusableLeftElements[focusedLeftElementIndex + 1];
|
|
80
|
-
if (nextLeftElement) {
|
|
81
|
-
nextLeftElement.focus();
|
|
82
|
-
} else if (focusableRightElements.length > 0) {
|
|
83
|
-
focusableRightElements[0]?.focus();
|
|
84
|
-
}
|
|
85
|
-
return true;
|
|
86
|
-
}
|
|
87
|
-
const focusedRightElementIndex = getFocusedElementIndex(focusableRightElements, targetElement);
|
|
88
|
-
if (focusedRightElementIndex !== -1) {
|
|
89
|
-
event.preventDefault();
|
|
90
|
-
if (event.key === 'ArrowRight') {
|
|
91
|
-
focusableRightElements[focusedRightElementIndex + 1]?.focus();
|
|
92
|
-
return true;
|
|
93
|
-
}
|
|
94
|
-
const previousRightElement = focusableRightElements[focusedRightElementIndex - 1];
|
|
95
|
-
if (previousRightElement) {
|
|
96
|
-
previousRightElement.focus();
|
|
97
|
-
} else if (focusableLeftElements.length > 0) {
|
|
98
|
-
focusableLeftElements[focusableLeftElements.length - 1]?.focus();
|
|
99
|
-
} else {
|
|
100
|
-
currentListItemElement.focus();
|
|
101
|
-
}
|
|
102
|
-
return true;
|
|
103
|
-
}
|
|
104
|
-
if (isCurrentListItemTarget) {
|
|
105
|
-
if (event.key === 'ArrowLeft' && focusableLeftElements.length > 0) {
|
|
106
|
-
event.preventDefault();
|
|
107
|
-
focusableLeftElements[focusableLeftElements.length - 1]?.focus();
|
|
108
|
-
return true;
|
|
109
|
-
}
|
|
110
|
-
if (event.key === 'ArrowRight' && focusableRightElements.length > 0) {
|
|
111
|
-
event.preventDefault();
|
|
112
|
-
focusableRightElements[0]?.focus();
|
|
113
|
-
return true;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
return false;
|
|
117
|
-
};
|
|
118
|
-
export const handleListItemTabNavigation = ({
|
|
119
|
-
event,
|
|
120
|
-
currentListItemElement,
|
|
121
|
-
targetElement,
|
|
122
|
-
isCurrentListItemTarget,
|
|
123
|
-
isInKeyboardNavigationGroup,
|
|
124
|
-
listItemUuids,
|
|
125
|
-
currentUuid,
|
|
126
|
-
listGroupUuid,
|
|
127
|
-
updateActiveListItemUuid
|
|
128
|
-
}) => {
|
|
129
|
-
if (event.key !== 'Tab' || !isInKeyboardNavigationGroup || !listItemUuids?.length) {
|
|
130
|
-
return false;
|
|
131
|
-
}
|
|
132
|
-
const currentIndex = listItemUuids.indexOf(currentUuid);
|
|
133
|
-
if (currentIndex === -1) {
|
|
134
|
-
return false;
|
|
135
|
-
}
|
|
136
|
-
const focusableRightElements = getFocusableElements(currentListItemElement, RIGHT_ELEMENT_FOCUSABLE_SELECTOR);
|
|
137
|
-
const focusedRightElementIndex = getFocusedElementIndex(focusableRightElements, targetElement);
|
|
138
|
-
if (event.shiftKey) {
|
|
139
|
-
return false;
|
|
140
|
-
}
|
|
141
|
-
if (isCurrentListItemTarget) {
|
|
142
|
-
if (focusableRightElements.length > 0) {
|
|
143
|
-
event.preventDefault();
|
|
144
|
-
focusableRightElements[0]?.focus();
|
|
145
|
-
return true;
|
|
146
|
-
}
|
|
147
|
-
return false;
|
|
148
|
-
}
|
|
149
|
-
if (focusedRightElementIndex === -1) {
|
|
150
|
-
return false;
|
|
151
|
-
}
|
|
152
|
-
const nextRightElement = focusableRightElements[focusedRightElementIndex + 1];
|
|
153
|
-
if (nextRightElement) {
|
|
154
|
-
event.preventDefault();
|
|
155
|
-
nextRightElement.focus();
|
|
156
|
-
return true;
|
|
157
|
-
}
|
|
158
|
-
if (currentIndex < listItemUuids.length - 1) {
|
|
159
|
-
event.preventDefault();
|
|
160
|
-
return focusListItemByIndex({
|
|
161
|
-
index: currentIndex + 1,
|
|
162
|
-
listItemUuids,
|
|
163
|
-
listGroupUuid,
|
|
164
|
-
updateActiveListItemUuid
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
return false;
|
|
168
|
-
};
|
|
169
|
-
export const handleVerticalListGroupNavigation = ({
|
|
170
|
-
event,
|
|
171
|
-
isCurrentListItemTarget,
|
|
172
|
-
isInKeyboardNavigationGroup,
|
|
173
|
-
listItemUuids,
|
|
174
|
-
currentUuid,
|
|
175
|
-
listGroupUuid,
|
|
176
|
-
updateActiveListItemUuid
|
|
177
|
-
}) => {
|
|
178
|
-
if (!isCurrentListItemTarget || !isInKeyboardNavigationGroup || !listItemUuids?.length || event.key !== 'ArrowDown' && event.key !== 'ArrowUp') {
|
|
179
|
-
return false;
|
|
180
|
-
}
|
|
181
|
-
const currentIndex = listItemUuids.indexOf(currentUuid);
|
|
182
|
-
if (currentIndex === -1) {
|
|
183
|
-
return true;
|
|
184
|
-
}
|
|
185
|
-
const isBackward = event.key === 'ArrowUp';
|
|
186
|
-
event.preventDefault();
|
|
187
|
-
const nextIndex = isBackward ? (currentIndex - 1 + listItemUuids.length) % listItemUuids.length : (currentIndex + 1) % listItemUuids.length;
|
|
188
|
-
const nextListItemUuid = listItemUuids[nextIndex];
|
|
189
|
-
if (nextListItemUuid && nextListItemUuid !== currentUuid && typeof listGroupUuid === 'string' && typeof updateActiveListItemUuid === 'function') {
|
|
190
|
-
const nextListItemElement = document.querySelector(`[data-uuid="${listGroupUuid}---${nextListItemUuid}"]`);
|
|
191
|
-
if (nextListItemElement) {
|
|
192
|
-
updateActiveListItemUuid(nextListItemUuid);
|
|
193
|
-
nextListItemElement.focus();
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
return true;
|
|
197
|
-
};
|
|
198
|
-
export const handleListItemToggleKey = ({
|
|
199
|
-
event,
|
|
200
|
-
isCurrentListItemTarget,
|
|
201
|
-
isExpandable,
|
|
202
|
-
isItemOpen,
|
|
203
|
-
shouldEnableKeyboardHighlighting,
|
|
204
|
-
toggleItem
|
|
205
|
-
}) => {
|
|
206
|
-
if (!isCurrentListItemTarget || !shouldEnableKeyboardHighlighting) {
|
|
207
|
-
return false;
|
|
208
|
-
}
|
|
209
|
-
const shouldOpen = isExpandable && event.key === 'ArrowRight' && !isItemOpen;
|
|
210
|
-
const shouldClose = isExpandable && event.key === 'ArrowLeft' && isItemOpen;
|
|
211
|
-
const shouldToggle = event.key === 'Enter' || event.key === ' ';
|
|
212
|
-
if (!shouldOpen && !shouldClose && !shouldToggle) {
|
|
213
|
-
return false;
|
|
214
|
-
}
|
|
215
|
-
event.preventDefault();
|
|
216
|
-
toggleItem();
|
|
217
|
-
return true;
|
|
218
|
-
};
|
|
219
17
|
//# sourceMappingURL=List.utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.utils.js","names":["Children","isValidElement","LIST_ITEM_MARKER","isDirectListItemElement","node","type","displayName","isMarkedListItemElement","$$listItem","shouldShowExpandIndicator","toArray","some","child","props","shouldHideIndicator","children","undefined","isExpandable","LEFT_ELEMENT_FOCUSABLE_SELECTOR","RIGHT_ELEMENT_FOCUSABLE_SELECTOR","getFocusableElements","root","selector","Array","from","querySelectorAll","filter","element","hasAttribute","getAttribute","getFocusedElementIndex","elements","targetElement","length","findIndex","contains","getListItemElementByIndex","index","listItemUuids","listGroupUuid","listItemUuid","document","querySelector","focusListItemByIndex","updateActiveListItemUuid","listItemElement","focus","handleHorizontalArrowNavigation","event","currentListItemElement","isCurrentListItemTarget","key","focusableLeftElements","focusableRightElements","focusedLeftElementIndex","preventDefault","previousLeftElement","nextLeftElement","focusedRightElementIndex","previousRightElement","handleListItemTabNavigation","isInKeyboardNavigationGroup","currentUuid","currentIndex","indexOf","shiftKey","nextRightElement","handleVerticalListGroupNavigation","isBackward","nextIndex","nextListItemUuid","nextListItemElement","handleListItemToggleKey","isItemOpen","shouldEnableKeyboardHighlighting","toggleItem","shouldOpen","shouldClose","shouldToggle"],"sources":["../../../../src/components/list/List.utils.ts"],"sourcesContent":["import {\n Children,\n isValidElement,\n type KeyboardEvent,\n type ReactElement,\n type ReactNode,\n} from 'react';\nimport { LIST_ITEM_MARKER } from './list-item/ListItem.utils';\n\nexport interface ListItemMetaProps {\n isExpandable?: boolean;\n shouldHideIndicator?: boolean;\n children?: ReactNode;\n}\n\ntype ListItemMarkedType = {\n $$listItem?: typeof LIST_ITEM_MARKER;\n};\n\nexport const isDirectListItemElement = (node: ReactNode): node is ReactElement<ListItemMetaProps> =>\n isValidElement(node) && (node.type as { displayName?: string }).displayName === 'ListItem';\n\nexport const isMarkedListItemElement = (node: ReactNode): node is ReactElement<ListItemMetaProps> =>\n isValidElement(node) &&\n typeof node.type !== 'string' &&\n (node.type as ListItemMarkedType).$$listItem === LIST_ITEM_MARKER;\n\nexport const shouldShowExpandIndicator = (node: ReactNode): boolean =>\n Children.toArray(node).some((child) => {\n if (isDirectListItemElement(child)) {\n return child.props.shouldHideIndicator !== true && child.props.children !== undefined;\n }\n\n if (isMarkedListItemElement(child)) {\n return child.props.isExpandable === true && child.props.shouldHideIndicator !== true;\n }\n\n if (isValidElement<{ children?: ReactNode }>(child) && child.props.children !== undefined) {\n return shouldShowExpandIndicator(child.props.children);\n }\n\n return false;\n });\n\nconst LEFT_ELEMENT_FOCUSABLE_SELECTOR =\n '[data-left-element=\"true\"] a[href], [data-left-element=\"true\"] button, [data-left-element=\"true\"] input, [data-left-element=\"true\"] select, [data-left-element=\"true\"] textarea, [data-left-element=\"true\"] [tabindex], [data-left-element=\"true\"] [contenteditable=\"true\"]';\n\nconst RIGHT_ELEMENT_FOCUSABLE_SELECTOR =\n '[data-right-element=\"true\"] a[href], [data-right-element=\"true\"] button, [data-right-element=\"true\"] input, [data-right-element=\"true\"] select, [data-right-element=\"true\"] textarea, [data-right-element=\"true\"] [tabindex], [data-right-element=\"true\"] [contenteditable=\"true\"]';\n\nconst getFocusableElements = (root: HTMLElement, selector: string) =>\n Array.from(root.querySelectorAll<HTMLElement>(selector)).filter(\n (element) => !element.hasAttribute('disabled') && element.getAttribute('tabindex') !== '-1',\n );\n\nconst getFocusedElementIndex = (elements: HTMLElement[], targetElement: HTMLElement | null) => {\n if (!targetElement || elements.length === 0) {\n return -1;\n }\n\n return elements.findIndex(\n (element) => element === targetElement || element.contains(targetElement),\n );\n};\n\ntype ListGroupNavigationParams = {\n event: KeyboardEvent<HTMLDivElement>;\n isCurrentListItemTarget: boolean;\n isInKeyboardNavigationGroup: boolean;\n listItemUuids?: string[];\n currentUuid: string;\n listGroupUuid?: string;\n updateActiveListItemUuid?: (uuid?: string) => void;\n};\n\ntype ListItemTabNavigationParams = ListGroupNavigationParams & {\n currentListItemElement: HTMLDivElement;\n targetElement: HTMLElement | null;\n};\n\ntype ListItemToggleKeyParams = {\n event: KeyboardEvent<HTMLDivElement>;\n isCurrentListItemTarget: boolean;\n isExpandable: boolean;\n isItemOpen: boolean;\n shouldEnableKeyboardHighlighting: boolean;\n toggleItem: VoidFunction;\n};\n\nconst getListItemElementByIndex = ({\n index,\n listItemUuids,\n listGroupUuid,\n}: {\n index: number;\n listItemUuids: string[];\n listGroupUuid?: string;\n}) => {\n const listItemUuid = listItemUuids[index];\n\n if (!listItemUuid || typeof listGroupUuid !== 'string') {\n return undefined;\n }\n\n return document.querySelector<HTMLDivElement>(\n `[data-uuid=\"${listGroupUuid}---${listItemUuid}\"]`,\n );\n};\n\nconst focusListItemByIndex = ({\n index,\n listItemUuids,\n listGroupUuid,\n updateActiveListItemUuid,\n}: {\n index: number;\n listItemUuids: string[];\n listGroupUuid?: string;\n updateActiveListItemUuid?: (uuid?: string) => void;\n}) => {\n const listItemUuid = listItemUuids[index];\n const listItemElement = getListItemElementByIndex({ index, listItemUuids, listGroupUuid });\n\n if (!listItemUuid || !listItemElement || typeof updateActiveListItemUuid !== 'function') {\n return false;\n }\n\n updateActiveListItemUuid(listItemUuid);\n listItemElement.focus();\n return true;\n};\n\nexport const handleHorizontalArrowNavigation = ({\n event,\n currentListItemElement,\n targetElement,\n isCurrentListItemTarget,\n}: {\n event: KeyboardEvent<HTMLDivElement>;\n currentListItemElement: HTMLDivElement;\n targetElement: HTMLElement | null;\n isCurrentListItemTarget: boolean;\n}) => {\n if (event.key !== 'ArrowRight' && event.key !== 'ArrowLeft') {\n return false;\n }\n\n const focusableLeftElements = getFocusableElements(\n currentListItemElement,\n LEFT_ELEMENT_FOCUSABLE_SELECTOR,\n );\n\n const focusableRightElements = getFocusableElements(\n currentListItemElement,\n RIGHT_ELEMENT_FOCUSABLE_SELECTOR,\n );\n\n const focusedLeftElementIndex = getFocusedElementIndex(focusableLeftElements, targetElement);\n\n if (focusedLeftElementIndex !== -1) {\n event.preventDefault();\n\n if (event.key === 'ArrowLeft') {\n const previousLeftElement = focusableLeftElements[focusedLeftElementIndex - 1];\n\n if (previousLeftElement) {\n previousLeftElement.focus();\n } else {\n currentListItemElement.focus();\n }\n\n return true;\n }\n\n const nextLeftElement = focusableLeftElements[focusedLeftElementIndex + 1];\n\n if (nextLeftElement) {\n nextLeftElement.focus();\n } else if (focusableRightElements.length > 0) {\n focusableRightElements[0]?.focus();\n }\n\n return true;\n }\n\n const focusedRightElementIndex = getFocusedElementIndex(focusableRightElements, targetElement);\n\n if (focusedRightElementIndex !== -1) {\n event.preventDefault();\n\n if (event.key === 'ArrowRight') {\n focusableRightElements[focusedRightElementIndex + 1]?.focus();\n return true;\n }\n\n const previousRightElement = focusableRightElements[focusedRightElementIndex - 1];\n\n if (previousRightElement) {\n previousRightElement.focus();\n } else if (focusableLeftElements.length > 0) {\n focusableLeftElements[focusableLeftElements.length - 1]?.focus();\n } else {\n currentListItemElement.focus();\n }\n\n return true;\n }\n\n if (isCurrentListItemTarget) {\n if (event.key === 'ArrowLeft' && focusableLeftElements.length > 0) {\n event.preventDefault();\n focusableLeftElements[focusableLeftElements.length - 1]?.focus();\n return true;\n }\n\n if (event.key === 'ArrowRight' && focusableRightElements.length > 0) {\n event.preventDefault();\n focusableRightElements[0]?.focus();\n return true;\n }\n }\n\n return false;\n};\n\nexport const handleListItemTabNavigation = ({\n event,\n currentListItemElement,\n targetElement,\n isCurrentListItemTarget,\n isInKeyboardNavigationGroup,\n listItemUuids,\n currentUuid,\n listGroupUuid,\n updateActiveListItemUuid,\n}: ListItemTabNavigationParams) => {\n if (event.key !== 'Tab' || !isInKeyboardNavigationGroup || !listItemUuids?.length) {\n return false;\n }\n\n const currentIndex = listItemUuids.indexOf(currentUuid);\n\n if (currentIndex === -1) {\n return false;\n }\n\n const focusableRightElements = getFocusableElements(\n currentListItemElement,\n RIGHT_ELEMENT_FOCUSABLE_SELECTOR,\n );\n const focusedRightElementIndex = getFocusedElementIndex(focusableRightElements, targetElement);\n\n if (event.shiftKey) {\n return false;\n }\n\n if (isCurrentListItemTarget) {\n if (focusableRightElements.length > 0) {\n event.preventDefault();\n focusableRightElements[0]?.focus();\n return true;\n }\n\n return false;\n }\n\n if (focusedRightElementIndex === -1) {\n return false;\n }\n\n const nextRightElement = focusableRightElements[focusedRightElementIndex + 1];\n\n if (nextRightElement) {\n event.preventDefault();\n nextRightElement.focus();\n return true;\n }\n\n if (currentIndex < listItemUuids.length - 1) {\n event.preventDefault();\n return focusListItemByIndex({\n index: currentIndex + 1,\n listItemUuids,\n listGroupUuid,\n updateActiveListItemUuid,\n });\n }\n\n return false;\n};\n\nexport const handleVerticalListGroupNavigation = ({\n event,\n isCurrentListItemTarget,\n isInKeyboardNavigationGroup,\n listItemUuids,\n currentUuid,\n listGroupUuid,\n updateActiveListItemUuid,\n}: ListGroupNavigationParams) => {\n if (\n !isCurrentListItemTarget ||\n !isInKeyboardNavigationGroup ||\n !listItemUuids?.length ||\n (event.key !== 'ArrowDown' && event.key !== 'ArrowUp')\n ) {\n return false;\n }\n\n const currentIndex = listItemUuids.indexOf(currentUuid);\n\n if (currentIndex === -1) {\n return true;\n }\n\n const isBackward = event.key === 'ArrowUp';\n\n event.preventDefault();\n\n const nextIndex = isBackward\n ? (currentIndex - 1 + listItemUuids.length) % listItemUuids.length\n : (currentIndex + 1) % listItemUuids.length;\n\n const nextListItemUuid = listItemUuids[nextIndex];\n\n if (\n nextListItemUuid &&\n nextListItemUuid !== currentUuid &&\n typeof listGroupUuid === 'string' &&\n typeof updateActiveListItemUuid === 'function'\n ) {\n const nextListItemElement = document.querySelector<HTMLDivElement>(\n `[data-uuid=\"${listGroupUuid}---${nextListItemUuid}\"]`,\n );\n\n if (nextListItemElement) {\n updateActiveListItemUuid(nextListItemUuid);\n nextListItemElement.focus();\n }\n }\n\n return true;\n};\n\nexport const handleListItemToggleKey = ({\n event,\n isCurrentListItemTarget,\n isExpandable,\n isItemOpen,\n shouldEnableKeyboardHighlighting,\n toggleItem,\n}: ListItemToggleKeyParams) => {\n if (!isCurrentListItemTarget || !shouldEnableKeyboardHighlighting) {\n return false;\n }\n\n const shouldOpen = isExpandable && event.key === 'ArrowRight' && !isItemOpen;\n const shouldClose = isExpandable && event.key === 'ArrowLeft' && isItemOpen;\n const shouldToggle = event.key === 'Enter' || event.key === ' ';\n\n if (!shouldOpen && !shouldClose && !shouldToggle) {\n return false;\n }\n\n event.preventDefault();\n toggleItem();\n return true;\n};\n"],"mappings":"AAAA,SACIA,QAAQ,EACRC,cAAc,QAIX,OAAO;AACd,SAASC,gBAAgB,QAAQ,4BAA4B;AAY7D,OAAO,MAAMC,uBAAuB,GAAIC,IAAe,IACnD,aAAAH,cAAc,CAACG,IAAI,CAAC,IAAKA,IAAI,CAACC,IAAI,CAA8BC,WAAW,KAAK,UAAU;AAE9F,OAAO,MAAMC,uBAAuB,GAAIH,IAAe,IACnD,aAAAH,cAAc,CAACG,IAAI,CAAC,IACpB,OAAOA,IAAI,CAACC,IAAI,KAAK,QAAQ,IAC5BD,IAAI,CAACC,IAAI,CAAwBG,UAAU,KAAKN,gBAAgB;AAErE,OAAO,MAAMO,yBAAyB,GAAIL,IAAe,IACrDJ,QAAQ,CAACU,OAAO,CAACN,IAAI,CAAC,CAACO,IAAI,CAAEC,KAAK,IAAK;EACnC,IAAIT,uBAAuB,CAACS,KAAK,CAAC,EAAE;IA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AC,CAAC;EACtBoB,UAAU,CAAC,CAAC;EACZ,OAAO,IAAI;AACf,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"List.utils.js","names":["Children","isValidElement","LIST_ITEM_MARKER","isDirectListItemElement","node","type","displayName","isMarkedListItemElement","$$listItem","shouldShowExpandIndicator","toArray","some","child","props","shouldHideIndicator","children","undefined","isExpandable"],"sources":["../../../../src/components/list/List.utils.ts"],"sourcesContent":["import { Children, isValidElement, type ReactElement, type ReactNode } from 'react';\nimport { LIST_ITEM_MARKER } from './list-item/ListItem.utils';\n\nexport interface ListItemMetaProps {\n isExpandable?: boolean;\n shouldHideIndicator?: boolean;\n children?: ReactNode;\n}\n\ntype ListItemMarkedType = {\n $$listItem?: typeof LIST_ITEM_MARKER;\n};\n\nexport const isDirectListItemElement = (node: ReactNode): node is ReactElement<ListItemMetaProps> =>\n isValidElement(node) && (node.type as { displayName?: string }).displayName === 'ListItem';\n\nexport const isMarkedListItemElement = (node: ReactNode): node is ReactElement<ListItemMetaProps> =>\n isValidElement(node) &&\n typeof node.type !== 'string' &&\n (node.type as ListItemMarkedType).$$listItem === LIST_ITEM_MARKER;\n\nexport const shouldShowExpandIndicator = (node: ReactNode): boolean =>\n Children.toArray(node).some((child) => {\n if (isDirectListItemElement(child)) {\n return child.props.shouldHideIndicator !== true && child.props.children !== undefined;\n }\n\n if (isMarkedListItemElement(child)) {\n return child.props.isExpandable === true && child.props.shouldHideIndicator !== true;\n }\n\n if (isValidElement<{ children?: ReactNode }>(child) && child.props.children !== undefined) {\n return shouldShowExpandIndicator(child.props.children);\n }\n\n return false;\n });\n"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,cAAc,QAA2C,OAAO;AACnF,SAASC,gBAAgB,QAAQ,4BAA4B;AAY7D,OAAO,MAAMC,uBAAuB,GAAIC,IAAe,IACnD,aAAAH,cAAc,CAACG,IAAI,CAAC,IAAKA,IAAI,CAACC,IAAI,CAA8BC,WAAW,KAAK,UAAU;AAE9F,OAAO,MAAMC,uBAAuB,GAAIH,IAAe,IACnD,aAAAH,cAAc,CAACG,IAAI,CAAC,IACpB,OAAOA,IAAI,CAACC,IAAI,KAAK,QAAQ,IAC5BD,IAAI,CAACC,IAAI,CAAwBG,UAAU,KAAKN,gBAAgB;AAErE,OAAO,MAAMO,yBAAyB,GAAIL,IAAe,IACrDJ,QAAQ,CAACU,OAAO,CAACN,IAAI,CAAC,CAACO,IAAI,CAAEC,KAAK,IAAK;EACnC,IAAIT,uBAAuB,CAACS,KAAK,CAAC,EAAE;IAChC,OAAOA,KAAK,CAACC,KAAK,CAACC,mBAAmB,KAAK,IAAI,IAAIF,KAAK,CAACC,KAAK,CAACE,QAAQ,KAAKC,SAAS;EACzF;EAEA,IAAIT,uBAAuB,CAACK,KAAK,CAAC,EAAE;IAChC,OAAOA,KAAK,CAACC,KAAK,CAACI,YAAY,KAAK,IAAI,IAAIL,KAAK,CAACC,KAAK,CAACC,mBAAmB,KAAK,IAAI;EACxF;EAEA,IAAI,aAAAb,cAAc,CAA2BW,KAAK,CAAC,IAAIA,KAAK,CAACC,KAAK,CAACE,QAAQ,KAAKC,SAAS,EAAE;IACvF,OAAOP,yBAAyB,CAACG,KAAK,CAACC,KAAK,CAACE,QAAQ,CAAC;EAC1D;EAEA,OAAO,KAAK;AAChB,CAAC,CAAC","ignoreList":[]}
|