@czi-sds/components 15.3.0 → 15.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.d.ts +132 -80
- package/dist/index.cjs.js +926 -734
- package/dist/index.esm.d.ts +132 -80
- package/dist/index.esm.js +928 -737
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/dist/src/common/helpers/scrollStop.d.ts +0 -8
- package/dist/src/common/helpers/scrollStop.js +0 -54
- package/dist/src/common/storybookConstants.d.ts +0 -3
- package/dist/src/common/storybookConstants.js +0 -2
- package/dist/src/common/utils.d.ts +0 -2
- package/dist/src/common/utils.js +0 -9
- package/dist/src/common/warnings.d.ts +0 -10
- package/dist/src/common/warnings.js +0 -60
- package/dist/src/common/warnings.test.d.ts +0 -1
- package/dist/src/common/warnings.test.js +0 -19
- package/dist/src/core/Accordion/Accordion.namespace-test.d.ts +0 -1
- package/dist/src/core/Accordion/Accordion.namespace-test.js +0 -18
- package/dist/src/core/Accordion/__snapshots__/index.test.js.snap +0 -64
- package/dist/src/core/Accordion/components/AccordionDetails/index.d.ts +0 -3
- package/dist/src/core/Accordion/components/AccordionDetails/index.js +0 -9
- package/dist/src/core/Accordion/components/AccordionDetails/style.d.ts +0 -2
- package/dist/src/core/Accordion/components/AccordionDetails/style.js +0 -16
- package/dist/src/core/Accordion/components/AccordionHeader/index.d.ts +0 -7
- package/dist/src/core/Accordion/components/AccordionHeader/index.js +0 -13
- package/dist/src/core/Accordion/components/AccordionHeader/style.d.ts +0 -27
- package/dist/src/core/Accordion/components/AccordionHeader/style.js +0 -21
- package/dist/src/core/Accordion/index.d.ts +0 -12
- package/dist/src/core/Accordion/index.js +0 -38
- package/dist/src/core/Accordion/index.stories.d.ts +0 -28
- package/dist/src/core/Accordion/index.stories.js +0 -82
- package/dist/src/core/Accordion/index.test.d.ts +0 -1
- package/dist/src/core/Accordion/index.test.js +0 -58
- package/dist/src/core/Accordion/style.d.ts +0 -30
- package/dist/src/core/Accordion/style.js +0 -28
- package/dist/src/core/Alert/index.d.ts +0 -7
- package/dist/src/core/Alert/index.js +0 -22
- package/dist/src/core/Alert/index.stories.d.ts +0 -19
- package/dist/src/core/Alert/index.stories.js +0 -70
- package/dist/src/core/Alert/style.d.ts +0 -1
- package/dist/src/core/Alert/style.js +0 -23
- package/dist/src/core/Banner/Banner.namespace-test.d.ts +0 -1
- package/dist/src/core/Banner/Banner.namespace-test.js +0 -18
- package/dist/src/core/Banner/banner.test.d.ts +0 -1
- package/dist/src/core/Banner/banner.test.js +0 -126
- package/dist/src/core/Banner/index.d.ts +0 -11
- package/dist/src/core/Banner/index.js +0 -47
- package/dist/src/core/Banner/index.stories.d.ts +0 -46
- package/dist/src/core/Banner/index.stories.js +0 -106
- package/dist/src/core/Banner/style.d.ts +0 -13
- package/dist/src/core/Banner/style.js +0 -55
- package/dist/src/core/Button/Button.namespace-test.d.ts +0 -1
- package/dist/src/core/Button/Button.namespace-test.js +0 -18
- package/dist/src/core/Button/index.d.ts +0 -18
- package/dist/src/core/Button/index.js +0 -54
- package/dist/src/core/Button/index.stories.d.ts +0 -72
- package/dist/src/core/Button/index.stories.js +0 -215
- package/dist/src/core/Button/index.test.d.ts +0 -1
- package/dist/src/core/Button/index.test.js +0 -40
- package/dist/src/core/Button/style.d.ts +0 -180
- package/dist/src/core/Button/style.js +0 -59
- package/dist/src/core/ButtonDropdown/ButtonDropdown.namespace-test.d.ts +0 -1
- package/dist/src/core/ButtonDropdown/ButtonDropdown.namespace-test.js +0 -18
- package/dist/src/core/ButtonDropdown/index.d.ts +0 -18
- package/dist/src/core/ButtonDropdown/index.js +0 -30
- package/dist/src/core/ButtonDropdown/index.stories.d.ts +0 -35
- package/dist/src/core/ButtonDropdown/index.stories.js +0 -79
- package/dist/src/core/ButtonDropdown/index.test.d.ts +0 -1
- package/dist/src/core/ButtonDropdown/index.test.js +0 -41
- package/dist/src/core/ButtonIcon/ButtonIcon.namespace-test.d.ts +0 -1
- package/dist/src/core/ButtonIcon/ButtonIcon.namespace-test.js +0 -18
- package/dist/src/core/ButtonIcon/index.d.ts +0 -15
- package/dist/src/core/ButtonIcon/index.js +0 -34
- package/dist/src/core/ButtonIcon/index.stories.d.ts +0 -39
- package/dist/src/core/ButtonIcon/index.stories.js +0 -239
- package/dist/src/core/ButtonIcon/index.test.d.ts +0 -1
- package/dist/src/core/ButtonIcon/index.test.js +0 -41
- package/dist/src/core/ButtonIcon/style.d.ts +0 -41
- package/dist/src/core/ButtonIcon/style.js +0 -68
- package/dist/src/core/Callout/Callout.namespace-test.d.ts +0 -1
- package/dist/src/core/Callout/Callout.namespace-test.js +0 -18
- package/dist/src/core/Callout/components/CalloutTitle/index.d.ts +0 -3
- package/dist/src/core/Callout/components/CalloutTitle/index.js +0 -9
- package/dist/src/core/Callout/components/CalloutTitle/style.d.ts +0 -1
- package/dist/src/core/Callout/components/CalloutTitle/style.js +0 -16
- package/dist/src/core/Callout/index.d.ts +0 -18
- package/dist/src/core/Callout/index.js +0 -89
- package/dist/src/core/Callout/index.stories.d.ts +0 -14
- package/dist/src/core/Callout/index.stories.js +0 -80
- package/dist/src/core/Callout/style.d.ts +0 -7
- package/dist/src/core/Callout/style.js +0 -31
- package/dist/src/core/CellBasic/CellBasic.namespace-test.d.ts +0 -1
- package/dist/src/core/CellBasic/CellBasic.namespace-test.js +0 -7
- package/dist/src/core/CellBasic/index.d.ts +0 -21
- package/dist/src/core/CellBasic/index.js +0 -32
- package/dist/src/core/CellBasic/index.stories.d.ts +0 -33
- package/dist/src/core/CellBasic/index.stories.js +0 -143
- package/dist/src/core/CellBasic/index.test.d.ts +0 -1
- package/dist/src/core/CellBasic/index.test.js +0 -124
- package/dist/src/core/CellBasic/style.d.ts +0 -18
- package/dist/src/core/CellBasic/style.js +0 -86
- package/dist/src/core/CellComponent/CellComponent.namespace-test.d.ts +0 -1
- package/dist/src/core/CellComponent/CellComponent.namespace-test.js +0 -7
- package/dist/src/core/CellComponent/index.d.ts +0 -8
- package/dist/src/core/CellComponent/index.js +0 -21
- package/dist/src/core/CellComponent/index.stories.d.ts +0 -21
- package/dist/src/core/CellComponent/index.stories.js +0 -92
- package/dist/src/core/CellComponent/index.test.d.ts +0 -1
- package/dist/src/core/CellComponent/index.test.js +0 -110
- package/dist/src/core/CellComponent/style.d.ts +0 -9
- package/dist/src/core/CellComponent/style.js +0 -32
- package/dist/src/core/CellHeader/CellHeader.namespace-test.d.ts +0 -1
- package/dist/src/core/CellHeader/CellHeader.namespace-test.js +0 -8
- package/dist/src/core/CellHeader/index.d.ts +0 -20
- package/dist/src/core/CellHeader/index.js +0 -47
- package/dist/src/core/CellHeader/index.stories.d.ts +0 -26
- package/dist/src/core/CellHeader/index.stories.js +0 -128
- package/dist/src/core/CellHeader/index.test.d.ts +0 -1
- package/dist/src/core/CellHeader/index.test.js +0 -112
- package/dist/src/core/CellHeader/style.d.ts +0 -9
- package/dist/src/core/CellHeader/style.js +0 -50
- package/dist/src/core/Chip/index.d.ts +0 -9
- package/dist/src/core/Chip/index.js +0 -29
- package/dist/src/core/Chip/index.stories.d.ts +0 -58
- package/dist/src/core/Chip/index.stories.js +0 -90
- package/dist/src/core/Chip/style.d.ts +0 -26
- package/dist/src/core/Chip/style.js +0 -95
- package/dist/src/core/ComplexFilter/ComplexFilter.namespace-test.d.ts +0 -1
- package/dist/src/core/ComplexFilter/ComplexFilter.namespace-test.js +0 -20
- package/dist/src/core/ComplexFilter/components/Chips/index.d.ts +0 -8
- package/dist/src/core/ComplexFilter/components/Chips/index.js +0 -21
- package/dist/src/core/ComplexFilter/index.d.ts +0 -23
- package/dist/src/core/ComplexFilter/index.js +0 -119
- package/dist/src/core/ComplexFilter/index.stories.d.ts +0 -33
- package/dist/src/core/ComplexFilter/index.stories.js +0 -126
- package/dist/src/core/ComplexFilter/index.test.d.ts +0 -1
- package/dist/src/core/ComplexFilter/index.test.js +0 -51
- package/dist/src/core/ComplexFilter/style.d.ts +0 -3
- package/dist/src/core/ComplexFilter/style.js +0 -15
- package/dist/src/core/Dialog/Dialog.namespace-test.d.ts +0 -1
- package/dist/src/core/Dialog/Dialog.namespace-test.js +0 -8
- package/dist/src/core/Dialog/__snapshots__/index.test.js.snap +0 -382
- package/dist/src/core/Dialog/components/common.d.ts +0 -6
- package/dist/src/core/Dialog/components/common.js +0 -5
- package/dist/src/core/Dialog/index.d.ts +0 -18
- package/dist/src/core/Dialog/index.js +0 -50
- package/dist/src/core/Dialog/index.stories.d.ts +0 -46
- package/dist/src/core/Dialog/index.stories.js +0 -147
- package/dist/src/core/Dialog/index.test.d.ts +0 -1
- package/dist/src/core/Dialog/index.test.js +0 -62
- package/dist/src/core/DialogActions/index.d.ts +0 -9
- package/dist/src/core/DialogActions/index.js +0 -23
- package/dist/src/core/DialogActions/style.d.ts +0 -5
- package/dist/src/core/DialogActions/style.js +0 -20
- package/dist/src/core/DialogContent/index.d.ts +0 -5
- package/dist/src/core/DialogContent/index.js +0 -23
- package/dist/src/core/DialogContent/style.d.ts +0 -1
- package/dist/src/core/DialogContent/style.js +0 -11
- package/dist/src/core/DialogPaper/index.d.ts +0 -8
- package/dist/src/core/DialogPaper/index.js +0 -27
- package/dist/src/core/DialogPaper/style.d.ts +0 -16
- package/dist/src/core/DialogPaper/style.js +0 -44
- package/dist/src/core/DialogTitle/components/CloseButton/index.d.ts +0 -5
- package/dist/src/core/DialogTitle/components/CloseButton/index.js +0 -31
- package/dist/src/core/DialogTitle/components/CloseButton/style.d.ts +0 -2
- package/dist/src/core/DialogTitle/components/CloseButton/style.js +0 -18
- package/dist/src/core/DialogTitle/index.d.ts +0 -14
- package/dist/src/core/DialogTitle/index.js +0 -42
- package/dist/src/core/DialogTitle/style.d.ts +0 -46
- package/dist/src/core/DialogTitle/style.js +0 -20
- package/dist/src/core/Dropdown/Dropdown.namespace-test.d.ts +0 -1
- package/dist/src/core/Dropdown/Dropdown.namespace-test.js +0 -20
- package/dist/src/core/Dropdown/index.d.ts +0 -31
- package/dist/src/core/Dropdown/index.js +0 -160
- package/dist/src/core/Dropdown/index.stories.d.ts +0 -68
- package/dist/src/core/Dropdown/index.stories.js +0 -215
- package/dist/src/core/Dropdown/index.test.d.ts +0 -1
- package/dist/src/core/Dropdown/index.test.js +0 -229
- package/dist/src/core/Dropdown/style.d.ts +0 -5
- package/dist/src/core/Dropdown/style.js +0 -19
- package/dist/src/core/DropdownMenu/DropdownMenu.namespace-test.d.ts +0 -1
- package/dist/src/core/DropdownMenu/DropdownMenu.namespace-test.js +0 -20
- package/dist/src/core/DropdownMenu/GITHUB_LABELS.d.ts +0 -2
- package/dist/src/core/DropdownMenu/GITHUB_LABELS.js +0 -83
- package/dist/src/core/DropdownMenu/index.d.ts +0 -42
- package/dist/src/core/DropdownMenu/index.js +0 -83
- package/dist/src/core/DropdownMenu/index.stories.d.ts +0 -55
- package/dist/src/core/DropdownMenu/index.stories.js +0 -438
- package/dist/src/core/DropdownMenu/index.test.d.ts +0 -1
- package/dist/src/core/DropdownMenu/index.test.js +0 -51
- package/dist/src/core/DropdownMenu/style.d.ts +0 -40
- package/dist/src/core/DropdownMenu/style.js +0 -85
- package/dist/src/core/Icon/Icon.namespace-test.d.ts +0 -1
- package/dist/src/core/Icon/Icon.namespace-test.js +0 -7
- package/dist/src/core/Icon/index.d.ts +0 -14
- package/dist/src/core/Icon/index.js +0 -25
- package/dist/src/core/Icon/index.stories.d.ts +0 -34
- package/dist/src/core/Icon/index.stories.js +0 -171
- package/dist/src/core/Icon/map.d.ts +0 -98
- package/dist/src/core/Icon/map.js +0 -476
- package/dist/src/core/Icon/style.d.ts +0 -36
- package/dist/src/core/Icon/style.js +0 -42
- package/dist/src/core/InputCheckbox/InputCheckbox.namespace-test.d.ts +0 -1
- package/dist/src/core/InputCheckbox/InputCheckbox.namespace-test.js +0 -9
- package/dist/src/core/InputCheckbox/index.d.ts +0 -13
- package/dist/src/core/InputCheckbox/index.js +0 -55
- package/dist/src/core/InputCheckbox/index.stories.d.ts +0 -35
- package/dist/src/core/InputCheckbox/index.stories.js +0 -119
- package/dist/src/core/InputCheckbox/index.test.d.ts +0 -1
- package/dist/src/core/InputCheckbox/index.test.js +0 -62
- package/dist/src/core/InputCheckbox/styles.d.ts +0 -6
- package/dist/src/core/InputCheckbox/styles.js +0 -24
- package/dist/src/core/InputDropdown/InputDropdown.namespace-test.d.ts +0 -1
- package/dist/src/core/InputDropdown/InputDropdown.namespace-test.js +0 -8
- package/dist/src/core/InputDropdown/index.d.ts +0 -8
- package/dist/src/core/InputDropdown/index.js +0 -83
- package/dist/src/core/InputDropdown/index.stories.d.ts +0 -59
- package/dist/src/core/InputDropdown/index.stories.js +0 -264
- package/dist/src/core/InputDropdown/index.test.d.ts +0 -1
- package/dist/src/core/InputDropdown/index.test.js +0 -58
- package/dist/src/core/InputDropdown/style.d.ts +0 -38
- package/dist/src/core/InputDropdown/style.js +0 -130
- package/dist/src/core/InputRadio/InputRadio.namespace-test.d.ts +0 -1
- package/dist/src/core/InputRadio/InputRadio.namespace-test.js +0 -8
- package/dist/src/core/InputRadio/index.d.ts +0 -14
- package/dist/src/core/InputRadio/index.js +0 -40
- package/dist/src/core/InputRadio/index.stories.d.ts +0 -32
- package/dist/src/core/InputRadio/index.stories.js +0 -64
- package/dist/src/core/InputRadio/index.test.d.ts +0 -1
- package/dist/src/core/InputRadio/index.test.js +0 -92
- package/dist/src/core/InputRadio/style.d.ts +0 -6
- package/dist/src/core/InputRadio/style.js +0 -24
- package/dist/src/core/InputSearch/InputSearch.namespace-test.d.ts +0 -1
- package/dist/src/core/InputSearch/InputSearch.namespace-test.js +0 -8
- package/dist/src/core/InputSearch/index.d.ts +0 -16
- package/dist/src/core/InputSearch/index.js +0 -75
- package/dist/src/core/InputSearch/index.stories.d.ts +0 -35
- package/dist/src/core/InputSearch/index.stories.js +0 -104
- package/dist/src/core/InputSearch/index.test.d.ts +0 -1
- package/dist/src/core/InputSearch/index.test.js +0 -70
- package/dist/src/core/InputSearch/style.d.ts +0 -12
- package/dist/src/core/InputSearch/style.js +0 -47
- package/dist/src/core/InputSlider/InputSlider.namespace-test.d.ts +0 -1
- package/dist/src/core/InputSlider/InputSlider.namespace-test.js +0 -7
- package/dist/src/core/InputSlider/__snapshots__/index.test.js.snap +0 -124
- package/dist/src/core/InputSlider/index.d.ts +0 -8
- package/dist/src/core/InputSlider/index.js +0 -23
- package/dist/src/core/InputSlider/index.stories.d.ts +0 -43
- package/dist/src/core/InputSlider/index.stories.js +0 -160
- package/dist/src/core/InputSlider/index.test.d.ts +0 -1
- package/dist/src/core/InputSlider/index.test.js +0 -52
- package/dist/src/core/InputSlider/style.d.ts +0 -76
- package/dist/src/core/InputSlider/style.js +0 -34
- package/dist/src/core/InputText/InputText.namespace-test.d.ts +0 -1
- package/dist/src/core/InputText/InputText.namespace-test.js +0 -7
- package/dist/src/core/InputText/__snapshots__/index.test.js.snap +0 -10
- package/dist/src/core/InputText/index.d.ts +0 -14
- package/dist/src/core/InputText/index.js +0 -52
- package/dist/src/core/InputText/index.stories.d.ts +0 -29
- package/dist/src/core/InputText/index.stories.js +0 -100
- package/dist/src/core/InputText/index.test.d.ts +0 -1
- package/dist/src/core/InputText/index.test.js +0 -67
- package/dist/src/core/InputText/style.d.ts +0 -13
- package/dist/src/core/InputText/style.js +0 -45
- package/dist/src/core/InputToggle/InputToggle.namespace-test.d.ts +0 -1
- package/dist/src/core/InputToggle/InputToggle.namespace-test.js +0 -7
- package/dist/src/core/InputToggle/__snapshots__/index.test.js.snap +0 -26
- package/dist/src/core/InputToggle/index.d.ts +0 -7
- package/dist/src/core/InputToggle/index.js +0 -42
- package/dist/src/core/InputToggle/index.stories.d.ts +0 -20
- package/dist/src/core/InputToggle/index.stories.js +0 -63
- package/dist/src/core/InputToggle/index.test.d.ts +0 -1
- package/dist/src/core/InputToggle/index.test.js +0 -52
- package/dist/src/core/InputToggle/style.d.ts +0 -9
- package/dist/src/core/InputToggle/style.js +0 -38
- package/dist/src/core/Link/Link.namespace-test.d.ts +0 -1
- package/dist/src/core/Link/Link.namespace-test.js +0 -7
- package/dist/src/core/Link/index.d.ts +0 -8
- package/dist/src/core/Link/index.js +0 -28
- package/dist/src/core/Link/index.stories.d.ts +0 -27
- package/dist/src/core/Link/index.stories.js +0 -99
- package/dist/src/core/Link/style.d.ts +0 -9
- package/dist/src/core/Link/style.js +0 -30
- package/dist/src/core/List/List.namespace-test.d.ts +0 -1
- package/dist/src/core/List/List.namespace-test.js +0 -7
- package/dist/src/core/List/index.d.ts +0 -8
- package/dist/src/core/List/index.js +0 -23
- package/dist/src/core/List/index.stories.d.ts +0 -4
- package/dist/src/core/List/index.stories.js +0 -30
- package/dist/src/core/List/style.d.ts +0 -17
- package/dist/src/core/List/style.js +0 -33
- package/dist/src/core/ListItem/ListItem.namespace-test.d.ts +0 -1
- package/dist/src/core/ListItem/ListItem.namespace-test.js +0 -7
- package/dist/src/core/ListItem/index.d.ts +0 -9
- package/dist/src/core/ListItem/index.js +0 -24
- package/dist/src/core/ListItem/style.d.ts +0 -26
- package/dist/src/core/ListItem/style.js +0 -56
- package/dist/src/core/ListSubheader/ListSubheader.namespace-test.d.ts +0 -1
- package/dist/src/core/ListSubheader/ListSubheader.namespace-test.js +0 -7
- package/dist/src/core/ListSubheader/index.d.ts +0 -7
- package/dist/src/core/ListSubheader/index.js +0 -22
- package/dist/src/core/ListSubheader/style.d.ts +0 -12
- package/dist/src/core/ListSubheader/style.js +0 -16
- package/dist/src/core/LoadingIndicator/LoadingIndicator.namespace-test.d.ts +0 -1
- package/dist/src/core/LoadingIndicator/LoadingIndicator.namespace-test.js +0 -7
- package/dist/src/core/LoadingIndicator/index.d.ts +0 -4
- package/dist/src/core/LoadingIndicator/index.js +0 -13
- package/dist/src/core/LoadingIndicator/index.stories.d.ts +0 -24
- package/dist/src/core/LoadingIndicator/index.stories.js +0 -77
- package/dist/src/core/LoadingIndicator/index.test.d.ts +0 -1
- package/dist/src/core/LoadingIndicator/index.test.js +0 -41
- package/dist/src/core/LoadingIndicator/style.d.ts +0 -7
- package/dist/src/core/LoadingIndicator/style.js +0 -36
- package/dist/src/core/Menu/Menu.namespace-test.d.ts +0 -1
- package/dist/src/core/Menu/Menu.namespace-test.js +0 -8
- package/dist/src/core/Menu/index.d.ts +0 -7
- package/dist/src/core/Menu/index.js +0 -30
- package/dist/src/core/Menu/index.stories.d.ts +0 -17
- package/dist/src/core/Menu/index.stories.js +0 -55
- package/dist/src/core/Menu/style.d.ts +0 -1
- package/dist/src/core/Menu/style.js +0 -15
- package/dist/src/core/MenuItem/MenuItem.namespace-test.d.ts +0 -1
- package/dist/src/core/MenuItem/MenuItem.namespace-test.js +0 -8
- package/dist/src/core/MenuItem/index.d.ts +0 -21
- package/dist/src/core/MenuItem/index.js +0 -42
- package/dist/src/core/MenuItem/index.stories.d.ts +0 -35
- package/dist/src/core/MenuItem/index.stories.js +0 -188
- package/dist/src/core/MenuItem/index.test.d.ts +0 -1
- package/dist/src/core/MenuItem/index.test.js +0 -41
- package/dist/src/core/MenuItem/style.d.ts +0 -65
- package/dist/src/core/MenuItem/style.js +0 -58
- package/dist/src/core/MenuSelect/index.d.ts +0 -19
- package/dist/src/core/MenuSelect/index.js +0 -70
- package/dist/src/core/MenuSelect/index.stories.d.ts +0 -34
- package/dist/src/core/MenuSelect/index.stories.js +0 -154
- package/dist/src/core/MenuSelect/style.d.ts +0 -12
- package/dist/src/core/MenuSelect/style.js +0 -45
- package/dist/src/core/NavigationJumpTo/NavigationJumpTo.namespace-test.d.ts +0 -1
- package/dist/src/core/NavigationJumpTo/NavigationJumpTo.namespace-test.js +0 -13
- package/dist/src/core/NavigationJumpTo/__snapshots__/index.test.js.snap +0 -319
- package/dist/src/core/NavigationJumpTo/index.d.ts +0 -13
- package/dist/src/core/NavigationJumpTo/index.js +0 -122
- package/dist/src/core/NavigationJumpTo/index.stories.d.ts +0 -56
- package/dist/src/core/NavigationJumpTo/index.stories.js +0 -218
- package/dist/src/core/NavigationJumpTo/index.test.d.ts +0 -1
- package/dist/src/core/NavigationJumpTo/index.test.js +0 -87
- package/dist/src/core/NavigationJumpTo/style.d.ts +0 -106
- package/dist/src/core/NavigationJumpTo/style.js +0 -27
- package/dist/src/core/NavigationJumpTo/useIntersection.d.ts +0 -19
- package/dist/src/core/NavigationJumpTo/useIntersection.js +0 -67
- package/dist/src/core/Notification/Notification.namespace-test.d.ts +0 -1
- package/dist/src/core/Notification/Notification.namespace-test.js +0 -8
- package/dist/src/core/Notification/index.d.ts +0 -17
- package/dist/src/core/Notification/index.js +0 -70
- package/dist/src/core/Notification/index.stories.d.ts +0 -43
- package/dist/src/core/Notification/index.stories.js +0 -186
- package/dist/src/core/Notification/index.test.d.ts +0 -1
- package/dist/src/core/Notification/index.test.js +0 -115
- package/dist/src/core/Notification/style.d.ts +0 -1
- package/dist/src/core/Notification/style.js +0 -26
- package/dist/src/core/Pagination/Pagination.namespace-test.d.ts +0 -1
- package/dist/src/core/Pagination/Pagination.namespace-test.js +0 -8
- package/dist/src/core/Pagination/components/PageListDropdown/index.d.ts +0 -7
- package/dist/src/core/Pagination/components/PageListDropdown/index.js +0 -27
- package/dist/src/core/Pagination/components/PageListDropdown/style.d.ts +0 -1
- package/dist/src/core/Pagination/components/PageListDropdown/style.js +0 -14
- package/dist/src/core/Pagination/index.d.ts +0 -15
- package/dist/src/core/Pagination/index.js +0 -47
- package/dist/src/core/Pagination/index.stories.d.ts +0 -21
- package/dist/src/core/Pagination/index.stories.js +0 -99
- package/dist/src/core/Pagination/index.test.d.ts +0 -1
- package/dist/src/core/Pagination/index.test.js +0 -128
- package/dist/src/core/Pagination/style.d.ts +0 -13
- package/dist/src/core/Pagination/style.js +0 -62
- package/dist/src/core/Pagination/usePagination.d.ts +0 -9
- package/dist/src/core/Pagination/usePagination.js +0 -69
- package/dist/src/core/SegmentedControl/SegmentedControl.namespace-test.d.ts +0 -1
- package/dist/src/core/SegmentedControl/SegmentedControl.namespace-test.js +0 -12
- package/dist/src/core/SegmentedControl/index.d.ts +0 -15
- package/dist/src/core/SegmentedControl/index.js +0 -38
- package/dist/src/core/SegmentedControl/index.stories.d.ts +0 -49
- package/dist/src/core/SegmentedControl/index.stories.js +0 -128
- package/dist/src/core/SegmentedControl/index.test.d.ts +0 -1
- package/dist/src/core/SegmentedControl/index.test.js +0 -41
- package/dist/src/core/SegmentedControl/style.d.ts +0 -2
- package/dist/src/core/SegmentedControl/style.js +0 -23
- package/dist/src/core/Table/Table.namespace-test.d.ts +0 -1
- package/dist/src/core/Table/Table.namespace-test.js +0 -7
- package/dist/src/core/Table/components/common.d.ts +0 -6
- package/dist/src/core/Table/components/common.js +0 -5
- package/dist/src/core/Table/index.d.ts +0 -7
- package/dist/src/core/Table/index.js +0 -21
- package/dist/src/core/Table/index.stories.d.ts +0 -18
- package/dist/src/core/Table/index.stories.js +0 -64
- package/dist/src/core/Table/index.test.d.ts +0 -1
- package/dist/src/core/Table/index.test.js +0 -89
- package/dist/src/core/Table/style.d.ts +0 -2
- package/dist/src/core/Table/style.js +0 -10
- package/dist/src/core/TableHeader/TableHeader.namespace-test.d.ts +0 -1
- package/dist/src/core/TableHeader/TableHeader.namespace-test.js +0 -7
- package/dist/src/core/TableHeader/index.d.ts +0 -6
- package/dist/src/core/TableHeader/index.js +0 -25
- package/dist/src/core/TableHeader/index.stories.d.ts +0 -12
- package/dist/src/core/TableHeader/index.stories.js +0 -38
- package/dist/src/core/TableHeader/index.test.d.ts +0 -1
- package/dist/src/core/TableHeader/index.test.js +0 -41
- package/dist/src/core/TableHeader/style.d.ts +0 -2
- package/dist/src/core/TableHeader/style.js +0 -14
- package/dist/src/core/TableRow/TableRow.namespace-test.d.ts +0 -1
- package/dist/src/core/TableRow/TableRow.namespace-test.js +0 -7
- package/dist/src/core/TableRow/__snapshots__/index.test.js.snap +0 -100
- package/dist/src/core/TableRow/index.d.ts +0 -13
- package/dist/src/core/TableRow/index.js +0 -28
- package/dist/src/core/TableRow/index.stories.d.ts +0 -24
- package/dist/src/core/TableRow/index.stories.js +0 -77
- package/dist/src/core/TableRow/index.test.d.ts +0 -1
- package/dist/src/core/TableRow/index.test.js +0 -92
- package/dist/src/core/TableRow/style.d.ts +0 -10
- package/dist/src/core/TableRow/style.js +0 -34
- package/dist/src/core/Tabs/Tabs.namespace-test.d.ts +0 -1
- package/dist/src/core/Tabs/Tabs.namespace-test.js +0 -8
- package/dist/src/core/Tabs/__snapshots__/index.test.js.snap +0 -46
- package/dist/src/core/Tabs/components/LabelWithCount/index.d.ts +0 -7
- package/dist/src/core/Tabs/components/LabelWithCount/index.js +0 -11
- package/dist/src/core/Tabs/components/LabelWithCount/style.d.ts +0 -10
- package/dist/src/core/Tabs/components/LabelWithCount/style.js +0 -43
- package/dist/src/core/Tabs/components/common.d.ts +0 -5
- package/dist/src/core/Tabs/components/common.js +0 -5
- package/dist/src/core/Tabs/index.d.ts +0 -13
- package/dist/src/core/Tabs/index.js +0 -89
- package/dist/src/core/Tabs/index.stories.d.ts +0 -38
- package/dist/src/core/Tabs/index.stories.js +0 -154
- package/dist/src/core/Tabs/index.test.d.ts +0 -1
- package/dist/src/core/Tabs/index.test.js +0 -48
- package/dist/src/core/Tabs/style.d.ts +0 -115
- package/dist/src/core/Tabs/style.js +0 -53
- package/dist/src/core/Tag/Tag.namespace-test.d.ts +0 -1
- package/dist/src/core/Tag/Tag.namespace-test.js +0 -7
- package/dist/src/core/Tag/index.d.ts +0 -17
- package/dist/src/core/Tag/index.js +0 -27
- package/dist/src/core/Tag/index.stories.d.ts +0 -98
- package/dist/src/core/Tag/index.stories.js +0 -238
- package/dist/src/core/Tag/index.test.d.ts +0 -1
- package/dist/src/core/Tag/index.test.js +0 -40
- package/dist/src/core/Tag/index.testUtils.d.ts +0 -8
- package/dist/src/core/Tag/index.testUtils.js +0 -108
- package/dist/src/core/Tag/style.d.ts +0 -29
- package/dist/src/core/Tag/style.js +0 -100
- package/dist/src/core/TagFilter/TagFilter.namespace-test.d.ts +0 -1
- package/dist/src/core/TagFilter/TagFilter.namespace-test.js +0 -8
- package/dist/src/core/TagFilter/__snapshots__/index.test.js.snap +0 -46
- package/dist/src/core/TagFilter/index.d.ts +0 -12
- package/dist/src/core/TagFilter/index.js +0 -23
- package/dist/src/core/TagFilter/index.stories.d.ts +0 -44
- package/dist/src/core/TagFilter/index.stories.js +0 -121
- package/dist/src/core/TagFilter/index.test.d.ts +0 -1
- package/dist/src/core/TagFilter/index.test.js +0 -40
- package/dist/src/core/TagFilter/style.d.ts +0 -7
- package/dist/src/core/TagFilter/style.js +0 -19
- package/dist/src/core/Tooltip/Tooltip.namespace-test.d.ts +0 -1
- package/dist/src/core/Tooltip/Tooltip.namespace-test.js +0 -7
- package/dist/src/core/Tooltip/index.d.ts +0 -14
- package/dist/src/core/Tooltip/index.js +0 -87
- package/dist/src/core/Tooltip/index.stories.d.ts +0 -48
- package/dist/src/core/Tooltip/index.stories.js +0 -257
- package/dist/src/core/Tooltip/index.test.d.ts +0 -1
- package/dist/src/core/Tooltip/index.test.js +0 -102
- package/dist/src/core/Tooltip/style.d.ts +0 -23
- package/dist/src/core/Tooltip/style.js +0 -47
- package/dist/src/core/TooltipCondensed/TooltipCondensed.namespace-test.d.ts +0 -1
- package/dist/src/core/TooltipCondensed/TooltipCondensed.namespace-test.js +0 -7
- package/dist/src/core/TooltipCondensed/index.d.ts +0 -13
- package/dist/src/core/TooltipCondensed/index.js +0 -43
- package/dist/src/core/TooltipCondensed/index.stories.d.ts +0 -27
- package/dist/src/core/TooltipCondensed/index.stories.js +0 -72
- package/dist/src/core/TooltipCondensed/index.test.d.ts +0 -1
- package/dist/src/core/TooltipCondensed/index.test.js +0 -85
- package/dist/src/core/TooltipCondensed/style.d.ts +0 -6
- package/dist/src/core/TooltipCondensed/style.js +0 -22
- package/dist/src/core/TooltipTable/TooltipTable.namespace-test.d.ts +0 -1
- package/dist/src/core/TooltipTable/TooltipTable.namespace-test.js +0 -23
- package/dist/src/core/TooltipTable/__snapshots__/index.test.js.snap +0 -272
- package/dist/src/core/TooltipTable/index.d.ts +0 -8
- package/dist/src/core/TooltipTable/index.js +0 -35
- package/dist/src/core/TooltipTable/index.stories.d.ts +0 -32
- package/dist/src/core/TooltipTable/index.stories.js +0 -128
- package/dist/src/core/TooltipTable/index.test.d.ts +0 -1
- package/dist/src/core/TooltipTable/index.test.js +0 -109
- package/dist/src/core/TooltipTable/style.d.ts +0 -25
- package/dist/src/core/TooltipTable/style.js +0 -46
- package/dist/src/core/styles/common/constants/black.d.ts +0 -3
- package/dist/src/core/styles/common/constants/black.js +0 -7
- package/dist/src/core/styles/common/constants/boxShadows.d.ts +0 -5
- package/dist/src/core/styles/common/constants/boxShadows.js +0 -9
- package/dist/src/core/styles/common/constants/fontWeights.d.ts +0 -7
- package/dist/src/core/styles/common/constants/fontWeights.js +0 -11
- package/dist/src/core/styles/common/constants/gray.d.ts +0 -8
- package/dist/src/core/styles/common/constants/gray.js +0 -12
- package/dist/src/core/styles/common/constants/spaces.d.ts +0 -11
- package/dist/src/core/styles/common/constants/spaces.js +0 -15
- package/dist/src/core/styles/common/constants/white.d.ts +0 -3
- package/dist/src/core/styles/common/constants/white.js +0 -7
- package/dist/src/core/styles/common/defaultTheme.d.ts +0 -129
- package/dist/src/core/styles/common/defaultTheme.js +0 -414
- package/dist/src/core/styles/common/mixins/fonts.d.ts +0 -27
- package/dist/src/core/styles/common/mixins/fonts.js +0 -60
- package/dist/src/core/styles/common/selectors/theme.d.ts +0 -15
- package/dist/src/core/styles/common/selectors/theme.js +0 -63
- package/dist/src/core/styles/index.d.ts +0 -3
- package/dist/src/core/styles/index.js +0 -19
- package/dist/src/index.d.ts +0 -100
- package/dist/src/index.js +0 -170
- package/dist/tsconfig-namespace-check.tsbuildinfo +0 -1
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
-
var components_1 = require("@czi-sds/components");
|
|
5
|
-
var utils_1 = require("src/common/utils");
|
|
6
|
-
var OPTIONS = [
|
|
7
|
-
{
|
|
8
|
-
color: "#7057ff",
|
|
9
|
-
description: "Good for newcomers",
|
|
10
|
-
name: "good first issue",
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
color: "#008672",
|
|
14
|
-
description: "Extra attention is needed",
|
|
15
|
-
name: "help wanted",
|
|
16
|
-
},
|
|
17
|
-
];
|
|
18
|
-
var DropdownNameSpaceTest = function (props) {
|
|
19
|
-
return ((0, jsx_runtime_1.jsx)(components_1.Dropdown, { DropdownMenuProps: { loading: true, loadingText: "Loading ..." }, label: "Click Target", onChange: utils_1.noop, options: OPTIONS, buttonPosition: "left", buttons: true, closeOnBlur: true, multiple: true, search: true, onClose: utils_1.noop, InputDropdownProps: { sdsStyle: "square" }, PopperComponent: components_1.DropdownPopper }));
|
|
20
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { AutocompleteValue } from "@mui/material/useAutocomplete";
|
|
2
|
-
import React, { ReactNode } from "react";
|
|
3
|
-
import { DefaultDropdownMenuOption, DropdownMenuProps as SdsDropdownMenuProps } from "../DropdownMenu";
|
|
4
|
-
import { StyledPaper, StyledPopper } from "../DropdownMenu/style";
|
|
5
|
-
import InputDropdown, { InputDropdownProps as InputDropdownPropsType } from "../InputDropdown";
|
|
6
|
-
export { InputDropdown as DropdownInputDropdown, StyledPaper as DropdownPaper, StyledPopper as DropdownPopper, };
|
|
7
|
-
export type Value<T, Multiple> = Multiple extends undefined | false ? T | null : Array<T> | null;
|
|
8
|
-
export type MUIValue<Multiple> = AutocompleteValue<DefaultDropdownMenuOption, Multiple, undefined, undefined>;
|
|
9
|
-
type RenderFunctionType = (props: any) => JSX.Element;
|
|
10
|
-
export interface DropdownProps<Multiple extends boolean | undefined> {
|
|
11
|
-
buttonPosition?: "left" | "right";
|
|
12
|
-
buttons?: boolean;
|
|
13
|
-
closeOnBlur?: boolean;
|
|
14
|
-
disabled?: boolean;
|
|
15
|
-
label: ReactNode;
|
|
16
|
-
options: DefaultDropdownMenuOption[];
|
|
17
|
-
onChange: (options: Value<DefaultDropdownMenuOption, Multiple>) => void;
|
|
18
|
-
onClose?: () => void;
|
|
19
|
-
multiple?: Multiple;
|
|
20
|
-
search?: boolean;
|
|
21
|
-
DropdownMenuProps?: Partial<SdsDropdownMenuProps<DefaultDropdownMenuOption, Multiple, undefined, undefined>>;
|
|
22
|
-
InputDropdownProps?: Partial<InputDropdownPropsType>;
|
|
23
|
-
value?: Value<DefaultDropdownMenuOption, Multiple>;
|
|
24
|
-
style?: React.CSSProperties;
|
|
25
|
-
className?: string;
|
|
26
|
-
PopperComponent?: typeof StyledPopper | RenderFunctionType;
|
|
27
|
-
InputDropdownComponent?: typeof InputDropdown;
|
|
28
|
-
isTriggerChangeOnOptionClick?: boolean;
|
|
29
|
-
}
|
|
30
|
-
declare const Dropdown: <Multiple extends boolean | undefined = false>({ options, label, multiple, search, buttonPosition, buttons, closeOnBlur, onChange, onClose, DropdownMenuProps, InputDropdownProps, value: propValue, PopperComponent, InputDropdownComponent, isTriggerChangeOnOptionClick, disabled, ...rest }: DropdownProps<Multiple>) => JSX.Element;
|
|
31
|
-
export default Dropdown;
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
-
var t = {};
|
|
15
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
-
t[p] = s[p];
|
|
17
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
-
t[p[i]] = s[p[i]];
|
|
21
|
-
}
|
|
22
|
-
return t;
|
|
23
|
-
};
|
|
24
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
-
};
|
|
27
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
exports.DropdownPopper = exports.DropdownPaper = exports.DropdownInputDropdown = void 0;
|
|
29
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
30
|
-
var react_1 = require("react");
|
|
31
|
-
var DropdownMenu_1 = __importDefault(require("../DropdownMenu"));
|
|
32
|
-
var style_1 = require("../DropdownMenu/style");
|
|
33
|
-
Object.defineProperty(exports, "DropdownPaper", { enumerable: true, get: function () { return style_1.StyledPaper; } });
|
|
34
|
-
Object.defineProperty(exports, "DropdownPopper", { enumerable: true, get: function () { return style_1.StyledPopper; } });
|
|
35
|
-
var InputDropdown_1 = __importDefault(require("../InputDropdown"));
|
|
36
|
-
exports.DropdownInputDropdown = InputDropdown_1.default;
|
|
37
|
-
var style_2 = require("./style");
|
|
38
|
-
// eslint-disable-next-line sonarjs/cognitive-complexity
|
|
39
|
-
var Dropdown = function (_a) {
|
|
40
|
-
var options = _a.options, _b = _a.label, label = _b === void 0 ? "" : _b, _c = _a.multiple, multiple = _c === void 0 ? false : _c, _d = _a.search, search = _d === void 0 ? false : _d, _e = _a.buttonPosition, buttonPosition = _e === void 0 ? "right" : _e, _f = _a.buttons, buttons = _f === void 0 ? false : _f,
|
|
41
|
-
// By default, most dropdowns will close when the user clicks outside the dropdown.
|
|
42
|
-
// The exception is the multiple select variant with Apply/Cancel buttons,
|
|
43
|
-
// which by default will not close on blur. If closeOnBlur is enabled, clicking out
|
|
44
|
-
// is equivalent to clicking the Cancel button, closing the dropdown and losing
|
|
45
|
-
// unapplied changes.
|
|
46
|
-
_g = _a.closeOnBlur,
|
|
47
|
-
// By default, most dropdowns will close when the user clicks outside the dropdown.
|
|
48
|
-
// The exception is the multiple select variant with Apply/Cancel buttons,
|
|
49
|
-
// which by default will not close on blur. If closeOnBlur is enabled, clicking out
|
|
50
|
-
// is equivalent to clicking the Cancel button, closing the dropdown and losing
|
|
51
|
-
// unapplied changes.
|
|
52
|
-
closeOnBlur = _g === void 0 ? !buttons : _g, onChange = _a.onChange, onClose = _a.onClose, _h = _a.DropdownMenuProps, DropdownMenuProps = _h === void 0 ? {} : _h, _j = _a.InputDropdownProps, InputDropdownProps = _j === void 0 ? { sdsStyle: "minimal" } : _j, propValue = _a.value, PopperComponent = _a.PopperComponent, _k = _a.InputDropdownComponent, InputDropdownComponent = _k === void 0 ? InputDropdown_1.default : _k, _l = _a.isTriggerChangeOnOptionClick, isTriggerChangeOnOptionClick = _l === void 0 ? false : _l, _m = _a.disabled, disabled = _m === void 0 ? false : _m, rest = __rest(_a, ["options", "label", "multiple", "search", "buttonPosition", "buttons", "closeOnBlur", "onChange", "onClose", "DropdownMenuProps", "InputDropdownProps", "value", "PopperComponent", "InputDropdownComponent", "isTriggerChangeOnOptionClick", "disabled"]);
|
|
53
|
-
if (buttons && !multiple) {
|
|
54
|
-
// eslint-disable-next-line no-console
|
|
55
|
-
console.warn("Warning: buttons are only supported for multiple select dropdowns.");
|
|
56
|
-
}
|
|
57
|
-
var isControlled = propValue !== undefined;
|
|
58
|
-
var _o = (0, react_1.useState)(null), anchorEl = _o[0], setAnchorEl = _o[1];
|
|
59
|
-
var _p = (0, react_1.useState)(getInitialValue), value = _p[0], setValue = _p[1];
|
|
60
|
-
var _q = (0, react_1.useState)([]), pendingValue = _q[0], setPendingValue = _q[1];
|
|
61
|
-
(0, react_1.useEffect)(function () {
|
|
62
|
-
onChange(value);
|
|
63
|
-
}, [value]);
|
|
64
|
-
(0, react_1.useEffect)(function () {
|
|
65
|
-
if (isControlled) {
|
|
66
|
-
setValue(propValue);
|
|
67
|
-
}
|
|
68
|
-
}, [propValue]);
|
|
69
|
-
var _r = (0, react_1.useState)(false), open = _r[0], setOpen = _r[1];
|
|
70
|
-
var shouldShowButtons = buttons && !isTriggerChangeOnOptionClick && multiple;
|
|
71
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(InputDropdownComponent, __assign({ disabled: disabled, label: label, onClick: handleClick, sdsStage: open ? "userInput" : "default" }, InputDropdownProps, rest)), (0, jsx_runtime_1.jsx)(DropdownMenu_1.default, __assign({ anchorEl: anchorEl, open: open, search: search, onClose: handleClose, multiple: multiple, value: (multiple ? pendingValue : value), onChange: handleChange, disableCloseOnSelect: multiple, PopperComponent: PopperComponent, PopperBaseProps: { sx: { minWidth: 250 } }, options: options, onClickAway: handleClickAway }, DropdownMenuProps, { children: shouldShowButtons ? ((0, jsx_runtime_1.jsx)("div", { children: buttonPosition === "left" ? ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(style_2.StyledButton, { onClick: handleClose, sdsStyle: "square", sdsType: "primary", children: "Apply" }), (0, jsx_runtime_1.jsx)(style_2.StyledButton, { onClick: handleCancel, sdsStyle: "square", sdsType: "secondary", children: "Cancel" })] })) : ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(style_2.StyledButton, { onClick: handleCancel, sdsStyle: "square", sdsType: "secondary", children: "Cancel" }), (0, jsx_runtime_1.jsx)(style_2.StyledButton, { onClick: handleClose, sdsStyle: "square", sdsType: "primary", children: "Apply" })] })) })) : null }))] }));
|
|
72
|
-
function handleClickAway() {
|
|
73
|
-
if (open) {
|
|
74
|
-
// (masoudmanson): We want to keep the dropdown menu open in two scenarios:
|
|
75
|
-
// 1. If the dropdown has buttons,
|
|
76
|
-
// 2. When there are no buttons, and the closeOnBlur property is set to false,
|
|
77
|
-
// In all other cases, we close the menu.
|
|
78
|
-
if (closeOnBlur && !shouldShowButtons) {
|
|
79
|
-
setOpen(false);
|
|
80
|
-
}
|
|
81
|
-
if (multiple) {
|
|
82
|
-
setValue(pendingValue);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
function handleClick(event) {
|
|
87
|
-
if (open) {
|
|
88
|
-
if (multiple) {
|
|
89
|
-
setValue(pendingValue);
|
|
90
|
-
}
|
|
91
|
-
setOpen(false);
|
|
92
|
-
if (anchorEl) {
|
|
93
|
-
anchorEl.focus();
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
else {
|
|
97
|
-
if (multiple) {
|
|
98
|
-
setPendingValue(value);
|
|
99
|
-
}
|
|
100
|
-
setAnchorEl(event.currentTarget);
|
|
101
|
-
setOpen(true);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
function handleClose(_, reason) {
|
|
105
|
-
// (thuang): We don't want to close the menu when the input is clicked
|
|
106
|
-
if (reason === "toggleInput") {
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
// (masoudmanson): When the dropdown loses focus, we will not close it immediately. Instead, we will update the values and
|
|
110
|
-
// only close the dropdown at the end of this block by calling setOpen(false).
|
|
111
|
-
if (shouldShowButtons && reason === "blur") {
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
if (multiple) {
|
|
115
|
-
setValue(pendingValue);
|
|
116
|
-
}
|
|
117
|
-
if (anchorEl) {
|
|
118
|
-
anchorEl.focus();
|
|
119
|
-
}
|
|
120
|
-
if (closeOnBlur)
|
|
121
|
-
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
122
|
-
if (shouldShowButtons) {
|
|
123
|
-
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
124
|
-
setOpen(false);
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
function handleChange(_, newValue) {
|
|
128
|
-
if (multiple) {
|
|
129
|
-
if (isTriggerChangeOnOptionClick) {
|
|
130
|
-
setPendingValue(newValue);
|
|
131
|
-
return setValue(newValue);
|
|
132
|
-
}
|
|
133
|
-
return setPendingValue(newValue);
|
|
134
|
-
}
|
|
135
|
-
setValue(newValue);
|
|
136
|
-
setOpen(false);
|
|
137
|
-
}
|
|
138
|
-
function handleCancel() {
|
|
139
|
-
if (multiple) {
|
|
140
|
-
// (masoudmanson): To undo the latest actions made on the selections,
|
|
141
|
-
// we set the value of the selection to the pendingValue. This allows us to
|
|
142
|
-
// cancel any recent changes and restore the previous selection state.
|
|
143
|
-
setPendingValue(value);
|
|
144
|
-
}
|
|
145
|
-
if (anchorEl) {
|
|
146
|
-
anchorEl.focus();
|
|
147
|
-
}
|
|
148
|
-
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
149
|
-
setOpen(false);
|
|
150
|
-
}
|
|
151
|
-
function getInitialValue() {
|
|
152
|
-
if (isControlled) {
|
|
153
|
-
return propValue;
|
|
154
|
-
}
|
|
155
|
-
return multiple
|
|
156
|
-
? []
|
|
157
|
-
: null;
|
|
158
|
-
}
|
|
159
|
-
};
|
|
160
|
-
exports.default = Dropdown;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { Args } from "@storybook/react";
|
|
2
|
-
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, Args>;
|
|
3
|
-
export default _default;
|
|
4
|
-
export declare const Default: {
|
|
5
|
-
args: {
|
|
6
|
-
buttonPosition: string;
|
|
7
|
-
buttons: boolean;
|
|
8
|
-
closeOnBlur: boolean;
|
|
9
|
-
disabled: boolean;
|
|
10
|
-
isTriggerChangeOnOptionClick: boolean;
|
|
11
|
-
label: string;
|
|
12
|
-
multiple: boolean;
|
|
13
|
-
onChange: () => void;
|
|
14
|
-
onClose: () => void;
|
|
15
|
-
search: boolean;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
export declare const LoadingResultsIndicator: {
|
|
19
|
-
args: {
|
|
20
|
-
DropdownMenuProps: {
|
|
21
|
-
loading: boolean;
|
|
22
|
-
loadingText: JSX.Element;
|
|
23
|
-
};
|
|
24
|
-
label: string;
|
|
25
|
-
onChange: () => void;
|
|
26
|
-
options: never[];
|
|
27
|
-
};
|
|
28
|
-
parameters: {
|
|
29
|
-
snapshot: {
|
|
30
|
-
skip: boolean;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
export declare const InsideModal: {
|
|
35
|
-
parameters: {
|
|
36
|
-
axe: {
|
|
37
|
-
disabledRules: string[];
|
|
38
|
-
};
|
|
39
|
-
snapshot: {
|
|
40
|
-
skip: boolean;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
render: () => JSX.Element;
|
|
44
|
-
};
|
|
45
|
-
export declare const ControlledDropdown: {
|
|
46
|
-
args: {
|
|
47
|
-
label: string;
|
|
48
|
-
};
|
|
49
|
-
parameters: {
|
|
50
|
-
snapshot: {
|
|
51
|
-
skip: boolean;
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
render: (args: Args) => JSX.Element;
|
|
55
|
-
};
|
|
56
|
-
export declare const Test: {
|
|
57
|
-
args: {
|
|
58
|
-
buttonPosition: string;
|
|
59
|
-
label: string;
|
|
60
|
-
onChange: () => void;
|
|
61
|
-
};
|
|
62
|
-
parameters: {
|
|
63
|
-
snapshot: {
|
|
64
|
-
skip: boolean;
|
|
65
|
-
};
|
|
66
|
-
};
|
|
67
|
-
render: (args: Args) => JSX.Element;
|
|
68
|
-
};
|
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
|
-
var __assign = (this && this.__assign) || function () {
|
|
7
|
-
__assign = Object.assign || function(t) {
|
|
8
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
-
s = arguments[i];
|
|
10
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
-
t[p] = s[p];
|
|
12
|
-
}
|
|
13
|
-
return t;
|
|
14
|
-
};
|
|
15
|
-
return __assign.apply(this, arguments);
|
|
16
|
-
};
|
|
17
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
18
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
19
|
-
if (ar || !(i in from)) {
|
|
20
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
21
|
-
ar[i] = from[i];
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
25
|
-
};
|
|
26
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
27
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
28
|
-
};
|
|
29
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
exports.Test = exports.ControlledDropdown = exports.InsideModal = exports.LoadingResultsIndicator = exports.Default = void 0;
|
|
31
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
32
|
-
var material_1 = require("@mui/material");
|
|
33
|
-
var react_1 = require("react");
|
|
34
|
-
var utils_1 = require("src/common/utils");
|
|
35
|
-
var Button_1 = __importDefault(require("../Button"));
|
|
36
|
-
var GITHUB_LABELS_1 = require("../DropdownMenu/GITHUB_LABELS");
|
|
37
|
-
var LoadingIndicator_1 = __importDefault(require("../LoadingIndicator"));
|
|
38
|
-
var index_1 = __importDefault(require("./index"));
|
|
39
|
-
var Dropdown = function (props) {
|
|
40
|
-
return ((0, jsx_runtime_1.jsx)(index_1.default, __assign({ label: "Click Target", onChange: utils_1.noop, options: GITHUB_LABELS_1.GITHUB_LABELS, DropdownMenuProps: {
|
|
41
|
-
groupBy: function (option) {
|
|
42
|
-
return option.section;
|
|
43
|
-
},
|
|
44
|
-
} }, props)));
|
|
45
|
-
};
|
|
46
|
-
var onChangeOptions = [
|
|
47
|
-
utils_1.noop,
|
|
48
|
-
function (value) {
|
|
49
|
-
// eslint-disable-next-line no-console
|
|
50
|
-
console.log(value);
|
|
51
|
-
},
|
|
52
|
-
];
|
|
53
|
-
var onCloseOptions = [
|
|
54
|
-
utils_1.noop,
|
|
55
|
-
function () {
|
|
56
|
-
// eslint-disable-next-line no-console
|
|
57
|
-
console.log("Closed!");
|
|
58
|
-
},
|
|
59
|
-
];
|
|
60
|
-
var buttonPositionOptions = ["left", "right"];
|
|
61
|
-
var LABEL = "Click Target";
|
|
62
|
-
exports.default = {
|
|
63
|
-
argTypes: {
|
|
64
|
-
DropdownMenuProps: { control: { type: "object" } },
|
|
65
|
-
buttonPosition: {
|
|
66
|
-
constrol: {
|
|
67
|
-
labels: ["left", "right"],
|
|
68
|
-
type: "select",
|
|
69
|
-
},
|
|
70
|
-
mapping: buttonPositionOptions,
|
|
71
|
-
options: Object.keys(buttonPositionOptions),
|
|
72
|
-
},
|
|
73
|
-
buttons: {
|
|
74
|
-
control: {
|
|
75
|
-
type: "boolean",
|
|
76
|
-
},
|
|
77
|
-
},
|
|
78
|
-
closeOnBlur: {
|
|
79
|
-
control: {
|
|
80
|
-
type: "boolean",
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
disabled: {
|
|
84
|
-
control: {
|
|
85
|
-
type: "boolean",
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
label: { control: { type: "text" } },
|
|
89
|
-
multiple: {
|
|
90
|
-
control: {
|
|
91
|
-
type: "boolean",
|
|
92
|
-
},
|
|
93
|
-
},
|
|
94
|
-
onChange: {
|
|
95
|
-
control: {
|
|
96
|
-
labels: ["NOOP", "Log value on change"],
|
|
97
|
-
type: "select",
|
|
98
|
-
},
|
|
99
|
-
mapping: onChangeOptions,
|
|
100
|
-
options: Object.keys(onChangeOptions),
|
|
101
|
-
},
|
|
102
|
-
onClose: {
|
|
103
|
-
control: {
|
|
104
|
-
labels: ["NOOP", "console.log('Closed!')"],
|
|
105
|
-
type: "select",
|
|
106
|
-
},
|
|
107
|
-
mapping: onCloseOptions,
|
|
108
|
-
options: Object.keys(onCloseOptions),
|
|
109
|
-
},
|
|
110
|
-
search: {
|
|
111
|
-
control: {
|
|
112
|
-
type: "boolean",
|
|
113
|
-
},
|
|
114
|
-
defaulValue: true,
|
|
115
|
-
},
|
|
116
|
-
},
|
|
117
|
-
component: Dropdown,
|
|
118
|
-
title: "Dropdowns/Dropdown",
|
|
119
|
-
};
|
|
120
|
-
exports.Default = {
|
|
121
|
-
args: {
|
|
122
|
-
buttonPosition: "left",
|
|
123
|
-
buttons: false,
|
|
124
|
-
closeOnBlur: true,
|
|
125
|
-
disabled: false,
|
|
126
|
-
isTriggerChangeOnOptionClick: false,
|
|
127
|
-
label: LABEL,
|
|
128
|
-
multiple: true,
|
|
129
|
-
onChange: utils_1.noop,
|
|
130
|
-
onClose: utils_1.noop,
|
|
131
|
-
search: true,
|
|
132
|
-
},
|
|
133
|
-
};
|
|
134
|
-
exports.LoadingResultsIndicator = {
|
|
135
|
-
args: {
|
|
136
|
-
DropdownMenuProps: {
|
|
137
|
-
loading: true,
|
|
138
|
-
loadingText: (0, jsx_runtime_1.jsx)(LoadingIndicator_1.default, { sdsStyle: "minimal" }),
|
|
139
|
-
},
|
|
140
|
-
label: LABEL,
|
|
141
|
-
onChange: utils_1.noop,
|
|
142
|
-
options: [],
|
|
143
|
-
},
|
|
144
|
-
parameters: {
|
|
145
|
-
snapshot: {
|
|
146
|
-
skip: true,
|
|
147
|
-
},
|
|
148
|
-
},
|
|
149
|
-
};
|
|
150
|
-
// Inside Modal
|
|
151
|
-
var StyledPaper = (0, material_1.styled)(material_1.Paper)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 200px;\n padding: 50px;\n"], ["\n width: 200px;\n padding: 50px;\n"])));
|
|
152
|
-
exports.InsideModal = {
|
|
153
|
-
parameters: {
|
|
154
|
-
axe: {
|
|
155
|
-
disabledRules: ["aria-dialog-name"],
|
|
156
|
-
},
|
|
157
|
-
snapshot: {
|
|
158
|
-
skip: true,
|
|
159
|
-
},
|
|
160
|
-
},
|
|
161
|
-
render: function () {
|
|
162
|
-
var _a = (0, react_1.useState)([GITHUB_LABELS_1.GITHUB_LABELS[0], GITHUB_LABELS_1.GITHUB_LABELS[1]]), value = _a[0], setValue = _a[1];
|
|
163
|
-
var FullWidthDropdown = (0, material_1.styled)(index_1.default)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: 100%;\n "], ["\n width: 100%;\n "])));
|
|
164
|
-
return ((0, jsx_runtime_1.jsx)(material_1.Dialog, { open: true, disableEnforceFocus: true, PaperComponent: StyledPaper, children: (0, jsx_runtime_1.jsx)(FullWidthDropdown, { label: "Dropdown", options: GITHUB_LABELS_1.GITHUB_LABELS, onChange: handleChange, value: value, multiple: true, InputDropdownProps: { sdsStyle: "square" } }) }));
|
|
165
|
-
function handleChange(newValue) {
|
|
166
|
-
setValue(newValue);
|
|
167
|
-
}
|
|
168
|
-
},
|
|
169
|
-
};
|
|
170
|
-
// Controlled Dropdown
|
|
171
|
-
var ControlledDropdownDemo = function (props) {
|
|
172
|
-
var _a = (0, react_1.useState)([]), value = _a[0], setValue = _a[1];
|
|
173
|
-
var StyledButton = (0, material_1.styled)(Button_1.default)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n &:focus {\n outline: none;\n }\n\n margin: 0 0 24px 8px;\n "], ["\n &:focus {\n outline: none;\n }\n\n margin: 0 0 24px 8px;\n "])));
|
|
174
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(StyledButton, { onClick: handleClick, sdsStyle: "minimal", sdsType: "primary", children: "Click here to select the first three options" }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)(index_1.default, __assign({ label: "Click Target", options: GITHUB_LABELS_1.GITHUB_LABELS }, props, { value: value, onChange: handleChange, "data-testid": "dropdown", DropdownMenuProps: {
|
|
175
|
-
groupBy: function (option) {
|
|
176
|
-
return option.section;
|
|
177
|
-
},
|
|
178
|
-
title: "Github Labels",
|
|
179
|
-
}, multiple: true }))] }));
|
|
180
|
-
function handleClick() {
|
|
181
|
-
setValue(__spreadArray([], GITHUB_LABELS_1.GITHUB_LABELS.slice(0, 3), true));
|
|
182
|
-
}
|
|
183
|
-
function handleChange(newValue) {
|
|
184
|
-
setValue(newValue);
|
|
185
|
-
}
|
|
186
|
-
};
|
|
187
|
-
exports.ControlledDropdown = {
|
|
188
|
-
args: {
|
|
189
|
-
label: LABEL,
|
|
190
|
-
},
|
|
191
|
-
parameters: {
|
|
192
|
-
snapshot: {
|
|
193
|
-
skip: true,
|
|
194
|
-
},
|
|
195
|
-
},
|
|
196
|
-
render: function (args) { return (0, jsx_runtime_1.jsx)(ControlledDropdownDemo, __assign({}, args)); },
|
|
197
|
-
};
|
|
198
|
-
// Test
|
|
199
|
-
var TestDemo = function (props) {
|
|
200
|
-
return ((0, jsx_runtime_1.jsx)(index_1.default, __assign({ label: "Click Target", onChange: utils_1.noop, options: GITHUB_LABELS_1.GITHUB_LABELS }, props, { "data-testid": "dropdown" })));
|
|
201
|
-
};
|
|
202
|
-
exports.Test = {
|
|
203
|
-
args: {
|
|
204
|
-
buttonPosition: "left",
|
|
205
|
-
label: LABEL,
|
|
206
|
-
onChange: utils_1.noop,
|
|
207
|
-
},
|
|
208
|
-
parameters: {
|
|
209
|
-
snapshot: {
|
|
210
|
-
skip: true,
|
|
211
|
-
},
|
|
212
|
-
},
|
|
213
|
-
render: function (args) { return (0, jsx_runtime_1.jsx)(TestDemo, __assign({}, args)); },
|
|
214
|
-
};
|
|
215
|
-
var templateObject_1, templateObject_2, templateObject_3;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|