@czi-sds/components 15.2.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 +134 -82
- package/dist/index.cjs.js +946 -738
- package/dist/index.esm.d.ts +134 -82
- package/dist/index.esm.js +948 -741
- 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 -111
- package/dist/src/core/NavigationJumpTo/index.stories.d.ts +0 -56
- package/dist/src/core/NavigationJumpTo/index.stories.js +0 -216
- 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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@czi-sds/components",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.4.0",
|
|
4
4
|
"main": "dist/index.cjs.js",
|
|
5
5
|
"module": "dist/index.esm.js",
|
|
6
6
|
"repository": {
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"@types/react": "^17.0.2",
|
|
69
69
|
"@types/react-dom": "^17.0.1"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "3323fd8f1fe30734783d5467492f3863e24bc24e"
|
|
72
72
|
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Custom hook that listens for scroll stop events and triggers a callback function.
|
|
3
|
-
*
|
|
4
|
-
* @param callback - The callback function to be executed when scrolling stops.
|
|
5
|
-
* @param timeout - The duration (in milliseconds) after which the callback is triggered when scrolling stops. Default is 50ms.
|
|
6
|
-
*/
|
|
7
|
-
declare const useScrollStopListener: (callback: () => void, timeout?: number) => void;
|
|
8
|
-
export default useScrollStopListener;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var react_1 = require("react");
|
|
4
|
-
/**
|
|
5
|
-
* Creates a scroll stop listener with a given callback and timeout.
|
|
6
|
-
*
|
|
7
|
-
* @param callback - The callback function to be executed when scrolling stops.
|
|
8
|
-
* @param timeout - The duration (in milliseconds) after which the callback is triggered when scrolling stops. Default is 50ms.
|
|
9
|
-
* @returns A function to destroy the scroll stop listener and clean up the event listener.
|
|
10
|
-
*/
|
|
11
|
-
var createScrollStopListener = function (callback, timeout) {
|
|
12
|
-
if (timeout === void 0) { timeout = 50; }
|
|
13
|
-
var removed = false;
|
|
14
|
-
var handle = null;
|
|
15
|
-
var onScroll = function () {
|
|
16
|
-
if (handle) {
|
|
17
|
-
clearTimeout(handle);
|
|
18
|
-
}
|
|
19
|
-
handle = setTimeout(callback, timeout);
|
|
20
|
-
};
|
|
21
|
-
// Attach scroll event listener to the specified element
|
|
22
|
-
document.addEventListener("scroll", onScroll, true);
|
|
23
|
-
return function () {
|
|
24
|
-
if (removed) {
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
removed = true;
|
|
28
|
-
if (handle) {
|
|
29
|
-
clearTimeout(handle);
|
|
30
|
-
}
|
|
31
|
-
// Remove the scroll event listener from the element
|
|
32
|
-
document.removeEventListener("scroll", onScroll);
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
/**
|
|
36
|
-
* Custom hook that listens for scroll stop events and triggers a callback function.
|
|
37
|
-
*
|
|
38
|
-
* @param callback - The callback function to be executed when scrolling stops.
|
|
39
|
-
* @param timeout - The duration (in milliseconds) after which the callback is triggered when scrolling stops. Default is 50ms.
|
|
40
|
-
*/
|
|
41
|
-
var useScrollStopListener = function (callback, timeout) {
|
|
42
|
-
if (timeout === void 0) { timeout = 50; }
|
|
43
|
-
var callbackRef = (0, react_1.useRef)();
|
|
44
|
-
callbackRef.current = callback;
|
|
45
|
-
(0, react_1.useEffect)(function () {
|
|
46
|
-
var destroyListener = createScrollStopListener(function () {
|
|
47
|
-
if (callbackRef.current) {
|
|
48
|
-
callbackRef.current();
|
|
49
|
-
}
|
|
50
|
-
}, timeout);
|
|
51
|
-
return function () { return destroyListener(); };
|
|
52
|
-
}, []);
|
|
53
|
-
};
|
|
54
|
-
exports.default = useScrollStopListener;
|
package/dist/src/common/utils.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toKebabCase = exports.noop = void 0;
|
|
4
|
-
var noop = function () { };
|
|
5
|
-
exports.noop = noop;
|
|
6
|
-
var toKebabCase = function (str) {
|
|
7
|
-
return str.replace(/[\s_]+/g, "-").toLowerCase();
|
|
8
|
-
};
|
|
9
|
-
exports.toKebabCase = toKebabCase;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare enum SDSWarningTypes {
|
|
2
|
-
ButtonMissingSDSProps = "buttonMissingProps",
|
|
3
|
-
ChipDeprecated = "chipDeprecated",
|
|
4
|
-
MenuSelectDeprecated = "menuSelectDeprecated",
|
|
5
|
-
ButtonIconMediumSize = "buttonIconMediumSize",
|
|
6
|
-
TooltipSubtitle = "tooltipSubtitle",
|
|
7
|
-
TooltipWidth = "tooltipWidth",
|
|
8
|
-
TooltipInverted = "tooltipInverted"
|
|
9
|
-
}
|
|
10
|
-
export declare const showWarningIfFirstOccurence: (warningType: SDSWarningTypes) => void;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var _a;
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.showWarningIfFirstOccurence = exports.SDSWarningTypes = void 0;
|
|
5
|
-
var SDSWarningTypes;
|
|
6
|
-
(function (SDSWarningTypes) {
|
|
7
|
-
SDSWarningTypes["ButtonMissingSDSProps"] = "buttonMissingProps";
|
|
8
|
-
SDSWarningTypes["ChipDeprecated"] = "chipDeprecated";
|
|
9
|
-
SDSWarningTypes["MenuSelectDeprecated"] = "menuSelectDeprecated";
|
|
10
|
-
SDSWarningTypes["ButtonIconMediumSize"] = "buttonIconMediumSize";
|
|
11
|
-
SDSWarningTypes["TooltipSubtitle"] = "tooltipSubtitle";
|
|
12
|
-
SDSWarningTypes["TooltipWidth"] = "tooltipWidth";
|
|
13
|
-
SDSWarningTypes["TooltipInverted"] = "tooltipInverted";
|
|
14
|
-
})(SDSWarningTypes || (exports.SDSWarningTypes = SDSWarningTypes = {}));
|
|
15
|
-
var SDS_WARNINGS = (_a = {},
|
|
16
|
-
_a[SDSWarningTypes.ButtonMissingSDSProps] = {
|
|
17
|
-
hasWarned: false,
|
|
18
|
-
message: "Warning: Buttons without sdsStyle or sdsType props will be deprecated.",
|
|
19
|
-
},
|
|
20
|
-
_a[SDSWarningTypes.ChipDeprecated] = {
|
|
21
|
-
hasWarned: false,
|
|
22
|
-
message: "Warning: <Chip /> will be deprecated and replaced with <Tag />",
|
|
23
|
-
},
|
|
24
|
-
_a[SDSWarningTypes.MenuSelectDeprecated] = {
|
|
25
|
-
hasWarned: false,
|
|
26
|
-
message: "Warning: MenuSelect will be deprecated and replaced with <DropdownMenu />",
|
|
27
|
-
},
|
|
28
|
-
_a[SDSWarningTypes.ButtonIconMediumSize] = {
|
|
29
|
-
hasWarned: false,
|
|
30
|
-
message: "Warning: A medium size ButtonIcon can only be of type tertiary!",
|
|
31
|
-
},
|
|
32
|
-
_a[SDSWarningTypes.TooltipSubtitle] = {
|
|
33
|
-
hasWarned: false,
|
|
34
|
-
message: "Warning: The 'subtitle' text is only available for dark tooltips!",
|
|
35
|
-
},
|
|
36
|
-
_a[SDSWarningTypes.TooltipWidth] = {
|
|
37
|
-
hasWarned: false,
|
|
38
|
-
message: "Warning: The 'wide' width is only available for light tooltips!",
|
|
39
|
-
},
|
|
40
|
-
_a[SDSWarningTypes.TooltipInverted] = {
|
|
41
|
-
hasWarned: false,
|
|
42
|
-
message: "Warning: Tooltips using the inverted prop will be deprecated. Please use sdsStyle: 'dark' | 'light' instead!",
|
|
43
|
-
},
|
|
44
|
-
_a);
|
|
45
|
-
var showWarningIfFirstOccurence = function (warningType) {
|
|
46
|
-
if (!(warningType in SDS_WARNINGS)) {
|
|
47
|
-
// add undefined warning to prevent multiple warnings
|
|
48
|
-
SDS_WARNINGS[warningType] = {
|
|
49
|
-
hasWarned: false,
|
|
50
|
-
message: "Warning: SDSWarningType ".concat(warningType, " is not defined in SDS_WARNINGS"),
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
if (SDS_WARNINGS[warningType].hasWarned) {
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
// eslint-disable-next-line no-console
|
|
57
|
-
console.warn(SDS_WARNINGS[warningType].message);
|
|
58
|
-
SDS_WARNINGS[warningType].hasWarned = true;
|
|
59
|
-
};
|
|
60
|
-
exports.showWarningIfFirstOccurence = showWarningIfFirstOccurence;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var warnings_1 = require("src/common/warnings");
|
|
4
|
-
describe("showWarningIfFirstOccurence", function () {
|
|
5
|
-
var consoleWarnSpy;
|
|
6
|
-
beforeEach(function () {
|
|
7
|
-
consoleWarnSpy = jest.spyOn(console, "warn");
|
|
8
|
-
});
|
|
9
|
-
it("shows warning on first call", function () {
|
|
10
|
-
(0, warnings_1.showWarningIfFirstOccurence)(warnings_1.SDSWarningTypes.ChipDeprecated);
|
|
11
|
-
expect(consoleWarnSpy).toHaveBeenCalledTimes(1);
|
|
12
|
-
});
|
|
13
|
-
it("does not show warning on subsequent calls", function () {
|
|
14
|
-
(0, warnings_1.showWarningIfFirstOccurence)(warnings_1.SDSWarningTypes.ChipDeprecated);
|
|
15
|
-
(0, warnings_1.showWarningIfFirstOccurence)(warnings_1.SDSWarningTypes.ChipDeprecated);
|
|
16
|
-
(0, warnings_1.showWarningIfFirstOccurence)(warnings_1.SDSWarningTypes.ChipDeprecated);
|
|
17
|
-
expect(consoleWarnSpy).toHaveBeenCalledTimes(1);
|
|
18
|
-
});
|
|
19
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,18 +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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
15
|
-
var components_1 = require("@czi-sds/components");
|
|
16
|
-
var AccordionNameSpaceTest = function (props) {
|
|
17
|
-
return ((0, jsx_runtime_1.jsx)(components_1.Accordion, __assign({}, props, { useDivider: true, togglePosition: "right", id: "accordion-id" })));
|
|
18
|
-
};
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`<Accordion /> Default story renders snapshot 1`] = `
|
|
4
|
-
<div
|
|
5
|
-
class="MuiPaper-root MuiPaper-elevation MuiPaper-elevation1 MuiAccordion-root MuiAccordion-gutters css-1x3fmw6-MuiPaper-root-MuiAccordion-root"
|
|
6
|
-
>
|
|
7
|
-
<div
|
|
8
|
-
aria-controls="undefined-header-panel-content"
|
|
9
|
-
aria-expanded="false"
|
|
10
|
-
class="MuiButtonBase-root MuiAccordionSummary-root MuiAccordionSummary-gutters css-q39ari-MuiButtonBase-root-MuiAccordionSummary-root"
|
|
11
|
-
id="undefined-header"
|
|
12
|
-
role="button"
|
|
13
|
-
tabindex="0"
|
|
14
|
-
>
|
|
15
|
-
<div
|
|
16
|
-
class="MuiAccordionSummary-content MuiAccordionSummary-contentGutters css-o4b71y-MuiAccordionSummary-content"
|
|
17
|
-
>
|
|
18
|
-
Accordion Header
|
|
19
|
-
</div>
|
|
20
|
-
<div
|
|
21
|
-
class="MuiAccordionSummary-expandIconWrapper css-yw020d-MuiAccordionSummary-expandIconWrapper"
|
|
22
|
-
>
|
|
23
|
-
<div
|
|
24
|
-
class="css-1ft6wgl"
|
|
25
|
-
>
|
|
26
|
-
<svg
|
|
27
|
-
aria-hidden="true"
|
|
28
|
-
class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-25m3b5-MuiSvgIcon-root"
|
|
29
|
-
data-jest-file-name="IconChevronDownSmall.svg"
|
|
30
|
-
data-jest-svg-name="IconChevronDownSmall"
|
|
31
|
-
data-testid="IconChevronDownSmall"
|
|
32
|
-
fillcontrast="white"
|
|
33
|
-
focusable="false"
|
|
34
|
-
viewBox="0 0 14 14"
|
|
35
|
-
/>
|
|
36
|
-
</div>
|
|
37
|
-
</div>
|
|
38
|
-
</div>
|
|
39
|
-
<div
|
|
40
|
-
class="MuiCollapse-root MuiCollapse-vertical MuiCollapse-hidden css-bz4dnt-MuiCollapse-root"
|
|
41
|
-
style="min-height: 0px;"
|
|
42
|
-
>
|
|
43
|
-
<div
|
|
44
|
-
class="MuiCollapse-wrapper MuiCollapse-vertical css-smkl36-MuiCollapse-wrapper"
|
|
45
|
-
>
|
|
46
|
-
<div
|
|
47
|
-
class="MuiCollapse-wrapperInner MuiCollapse-vertical css-9l5vo-MuiCollapse-wrapperInner"
|
|
48
|
-
>
|
|
49
|
-
<div
|
|
50
|
-
aria-labelledby="undefined-header"
|
|
51
|
-
class="MuiAccordion-region"
|
|
52
|
-
role="region"
|
|
53
|
-
>
|
|
54
|
-
<div
|
|
55
|
-
class="MuiAccordionDetails-root css-rnrgul-MuiAccordionDetails-root"
|
|
56
|
-
>
|
|
57
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo lobortis eget.
|
|
58
|
-
</div>
|
|
59
|
-
</div>
|
|
60
|
-
</div>
|
|
61
|
-
</div>
|
|
62
|
-
</div>
|
|
63
|
-
</div>
|
|
64
|
-
`;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
-
var style_1 = require("./style");
|
|
5
|
-
var AccordionDetails = function (props) {
|
|
6
|
-
var children = props.children;
|
|
7
|
-
return (0, jsx_runtime_1.jsx)(style_1.StyledAccordionDetails, { children: children });
|
|
8
|
-
};
|
|
9
|
-
exports.default = AccordionDetails;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { CommonThemeProps } from "src/core/styles";
|
|
2
|
-
export declare const StyledAccordionDetails: import("@emotion/styled").StyledComponent<import("@mui/material").AccordionDetailsProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & CommonThemeProps, {}, {}>;
|
|
@@ -1,16 +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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.StyledAccordionDetails = void 0;
|
|
8
|
-
var react_1 = require("@emotion/react");
|
|
9
|
-
var material_1 = require("@mui/material");
|
|
10
|
-
var styles_1 = require("@mui/material/styles");
|
|
11
|
-
var styles_2 = require("src/core/styles");
|
|
12
|
-
exports.StyledAccordionDetails = (0, styles_1.styled)(material_1.AccordionDetails)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n\n ", "\n"], ["\n ", "\n\n ", "\n"])), styles_2.fontBodyS, function (props) {
|
|
13
|
-
var spaces = (0, styles_2.getSpaces)(props);
|
|
14
|
-
return (0, react_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: ", "px;\n padding-top: ", "px;\n "], ["\n padding: ", "px;\n padding-top: ", "px;\n "])), spaces === null || spaces === void 0 ? void 0 : spaces.m, spaces === null || spaces === void 0 ? void 0 : spaces.xxs);
|
|
15
|
-
});
|
|
16
|
-
var templateObject_1, templateObject_2;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { AccordionSummaryProps as RawAccordionSummaryProps } from "@mui/material";
|
|
2
|
-
export interface SdsAccordionHeaderProps {
|
|
3
|
-
subtitle?: string;
|
|
4
|
-
}
|
|
5
|
-
export type AccordionHeaderProps = RawAccordionSummaryProps & SdsAccordionHeaderProps;
|
|
6
|
-
declare const AccordionHeader: (props: AccordionHeaderProps) => JSX.Element;
|
|
7
|
-
export default AccordionHeader;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
-
var Icon_1 = __importDefault(require("src/core/Icon"));
|
|
8
|
-
var style_1 = require("./style");
|
|
9
|
-
var AccordionHeader = function (props) {
|
|
10
|
-
var children = props.children, id = props.id, subtitle = props.subtitle;
|
|
11
|
-
return ((0, jsx_runtime_1.jsxs)(style_1.StyledAccordionHeader, { "aria-controls": "".concat(id, "-panel-content"), id: id, expandIcon: (0, jsx_runtime_1.jsx)(Icon_1.default, { sdsIcon: "chevronDown", sdsSize: "s", sdsType: "static" }), children: [children, subtitle && (0, jsx_runtime_1.jsx)(style_1.StyledSubtitle, { children: subtitle })] }));
|
|
12
|
-
};
|
|
13
|
-
exports.default = AccordionHeader;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { CommonThemeProps } from "src/core/styles";
|
|
3
|
-
export declare const StyledAccordionHeader: import("@emotion/styled").StyledComponent<{
|
|
4
|
-
children?: import("react").ReactNode;
|
|
5
|
-
classes?: Partial<import("@mui/material").AccordionSummaryClasses> | undefined;
|
|
6
|
-
expandIcon?: import("react").ReactNode;
|
|
7
|
-
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
8
|
-
} & Omit<{
|
|
9
|
-
action?: import("react").Ref<import("@mui/material").ButtonBaseActions> | undefined;
|
|
10
|
-
centerRipple?: boolean | undefined;
|
|
11
|
-
children?: import("react").ReactNode;
|
|
12
|
-
classes?: Partial<import("@mui/material").ButtonBaseClasses> | undefined;
|
|
13
|
-
disabled?: boolean | undefined;
|
|
14
|
-
disableRipple?: boolean | undefined;
|
|
15
|
-
disableTouchRipple?: boolean | undefined;
|
|
16
|
-
focusRipple?: boolean | undefined;
|
|
17
|
-
focusVisibleClassName?: string | undefined;
|
|
18
|
-
LinkComponent?: import("react").ElementType<any> | undefined;
|
|
19
|
-
onFocusVisible?: import("react").FocusEventHandler<any> | undefined;
|
|
20
|
-
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
21
|
-
tabIndex?: number | undefined;
|
|
22
|
-
TouchRippleProps?: Partial<import("@mui/material/ButtonBase/TouchRipple").TouchRippleProps> | undefined;
|
|
23
|
-
touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
|
|
24
|
-
}, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
|
|
25
|
-
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
26
|
-
}, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "disabled" | "tabIndex" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "expandIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & CommonThemeProps, {}, {}>;
|
|
27
|
-
export declare const StyledSubtitle: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & CommonThemeProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {}>;
|
|
@@ -1,21 +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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.StyledSubtitle = exports.StyledAccordionHeader = void 0;
|
|
8
|
-
var react_1 = require("@emotion/react");
|
|
9
|
-
var material_1 = require("@mui/material");
|
|
10
|
-
var styles_1 = require("@mui/material/styles");
|
|
11
|
-
var styles_2 = require("src/core/styles");
|
|
12
|
-
exports.StyledAccordionHeader = (0, styles_1.styled)(material_1.AccordionSummary)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n ", "\n"], ["\n ", "\n ", "\n"])), styles_2.fontHeaderS, function (props) {
|
|
13
|
-
var spaces = (0, styles_2.getSpaces)(props);
|
|
14
|
-
var colors = (0, styles_2.getColors)(props);
|
|
15
|
-
return (0, react_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: ", "px;\n min-height: 40px;\n align-items: flex-start;\n box-sizing: border-box;\n\n &.Mui-expanded {\n min-height: 40px;\n }\n\n .MuiAccordionSummary-content {\n margin: 0;\n flex-direction: column;\n\n &.Mui-expanded {\n margin: 0;\n }\n }\n\n .MuiAccordionSummary-expandIconWrapper {\n padding: 0px;\n margin-right: 0;\n margin-left: ", "px;\n svg {\n color: ", ";\n }\n }\n "], ["\n padding: ", "px;\n min-height: 40px;\n align-items: flex-start;\n box-sizing: border-box;\n\n &.Mui-expanded {\n min-height: 40px;\n }\n\n .MuiAccordionSummary-content {\n margin: 0;\n flex-direction: column;\n\n &.Mui-expanded {\n margin: 0;\n }\n }\n\n .MuiAccordionSummary-expandIconWrapper {\n padding: 0px;\n margin-right: 0;\n margin-left: ", "px;\n svg {\n color: ", ";\n }\n }\n "])), spaces === null || spaces === void 0 ? void 0 : spaces.m, spaces === null || spaces === void 0 ? void 0 : spaces.m, colors === null || colors === void 0 ? void 0 : colors.gray[500]);
|
|
16
|
-
});
|
|
17
|
-
exports.StyledSubtitle = (0, styles_1.styled)("p")(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n ", "\n\n ", "\n"], ["\n ", "\n\n ", "\n"])), styles_2.fontBodyXxs, function (props) {
|
|
18
|
-
var colors = (0, styles_2.getColors)(props);
|
|
19
|
-
return (0, react_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n color: ", ";\n margin: 0;\n "], ["\n color: ", ";\n margin: 0;\n "])), colors === null || colors === void 0 ? void 0 : colors.gray[500]);
|
|
20
|
-
});
|
|
21
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { AccordionProps as RawAccordionProps } from "@mui/material";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import AccordionDetails from "./components/AccordionDetails";
|
|
4
|
-
import AccordionHeader from "./components/AccordionHeader";
|
|
5
|
-
import { AccordionExtraProps } from "./style";
|
|
6
|
-
export { AccordionDetails, AccordionHeader };
|
|
7
|
-
export type AccordionProps = Omit<RawAccordionProps, "nonce" | "rev" | "rel" | "autoFocus" | "content"> & AccordionExtraProps;
|
|
8
|
-
/**
|
|
9
|
-
* @see https://mui.com/material-ui/react-accordion/
|
|
10
|
-
*/
|
|
11
|
-
declare const Accordion: React.ForwardRefExoticComponent<Pick<AccordionProps, keyof import("@mui/material/OverridableComponent").CommonProps | "onChange" | "children" | "elevation" | "square" | "sx" | "variant" | "color" | "translate" | "defaultExpanded" | "disabled" | "disableGutters" | "expanded" | "TransitionComponent" | "TransitionProps" | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | keyof AccordionExtraProps> & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
-
export default Accordion;
|
|
@@ -1,38 +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 __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.AccordionHeader = exports.AccordionDetails = void 0;
|
|
18
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
-
var react_1 = __importDefault(require("react"));
|
|
20
|
-
var AccordionDetails_1 = __importDefault(require("./components/AccordionDetails"));
|
|
21
|
-
exports.AccordionDetails = AccordionDetails_1.default;
|
|
22
|
-
var AccordionHeader_1 = __importDefault(require("./components/AccordionHeader"));
|
|
23
|
-
exports.AccordionHeader = AccordionHeader_1.default;
|
|
24
|
-
var style_1 = require("./style");
|
|
25
|
-
/**
|
|
26
|
-
* @see https://mui.com/material-ui/react-accordion/
|
|
27
|
-
*/
|
|
28
|
-
var Accordion = react_1.default.forwardRef(function (props, ref) {
|
|
29
|
-
var children = props.children, useDivider = props.useDivider, _a = props.togglePosition, togglePosition = _a === void 0 ? "right" : _a, id = props.id;
|
|
30
|
-
var _b = react_1.default.useState(false), expanded = _b[0], setExpanded = _b[1];
|
|
31
|
-
var handleChange = function (panel) {
|
|
32
|
-
return function (_event, isExpanded) {
|
|
33
|
-
setExpanded(isExpanded ? panel : false);
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
return ((0, jsx_runtime_1.jsx)(style_1.StyledAccordion, __assign({ square: true, useDivider: useDivider, togglePosition: togglePosition, expanded: expanded === id, onChange: handleChange(id), ref: ref }, props, { children: children })));
|
|
37
|
-
});
|
|
38
|
-
exports.default = Accordion;
|
|
@@ -1,28 +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
|
-
togglePosition: string;
|
|
7
|
-
};
|
|
8
|
-
};
|
|
9
|
-
export declare const LivePreview: {
|
|
10
|
-
parameters: {
|
|
11
|
-
snapshot: {
|
|
12
|
-
skip: boolean;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
render: (args: Args) => JSX.Element;
|
|
16
|
-
};
|
|
17
|
-
export declare const Test: {
|
|
18
|
-
args: {
|
|
19
|
-
id: string;
|
|
20
|
-
togglePosition: string;
|
|
21
|
-
};
|
|
22
|
-
parameters: {
|
|
23
|
-
snapshot: {
|
|
24
|
-
skip: boolean;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
render: (props: Args) => JSX.Element;
|
|
28
|
-
};
|
|
@@ -1,82 +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 __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.Test = exports.LivePreview = exports.Default = void 0;
|
|
18
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
-
var AccordionDetails_1 = __importDefault(require("./components/AccordionDetails"));
|
|
20
|
-
var AccordionHeader_1 = __importDefault(require("./components/AccordionHeader"));
|
|
21
|
-
var index_1 = __importDefault(require("./index"));
|
|
22
|
-
var Accordion = function (props) {
|
|
23
|
-
var id = props.id, subtitle = props.subtitle, useDivider = props.useDivider, togglePosition = props.togglePosition;
|
|
24
|
-
return ((0, jsx_runtime_1.jsxs)(index_1.default, __assign({ id: id, useDivider: useDivider, togglePosition: togglePosition }, props, { children: [(0, jsx_runtime_1.jsx)(AccordionHeader_1.default, { id: "".concat(id, "-header"), subtitle: subtitle, children: "Accordion Header" }), (0, jsx_runtime_1.jsx)(AccordionDetails_1.default, { children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo lobortis eget." })] })));
|
|
25
|
-
};
|
|
26
|
-
exports.default = {
|
|
27
|
-
argTypes: {
|
|
28
|
-
id: {
|
|
29
|
-
control: { type: "text" },
|
|
30
|
-
required: true,
|
|
31
|
-
},
|
|
32
|
-
subtitle: {
|
|
33
|
-
control: { type: "text" },
|
|
34
|
-
},
|
|
35
|
-
togglePosition: {
|
|
36
|
-
control: { type: "select" },
|
|
37
|
-
options: ["right", "left"],
|
|
38
|
-
},
|
|
39
|
-
useDivider: {
|
|
40
|
-
control: { type: "boolean" },
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
component: Accordion,
|
|
44
|
-
title: "Accordion",
|
|
45
|
-
};
|
|
46
|
-
// Default
|
|
47
|
-
exports.Default = {
|
|
48
|
-
args: {
|
|
49
|
-
togglePosition: "right",
|
|
50
|
-
},
|
|
51
|
-
};
|
|
52
|
-
// LivePreview
|
|
53
|
-
var livePreviewStyles = {
|
|
54
|
-
display: "grid",
|
|
55
|
-
gridColumnGap: "24px",
|
|
56
|
-
gridRowGap: "50px",
|
|
57
|
-
gridTemplateColumns: "repeat(4, 200px)",
|
|
58
|
-
};
|
|
59
|
-
function LivePreviewDemo(props) {
|
|
60
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: livePreviewStyles, children: [(0, jsx_runtime_1.jsx)(Accordion, __assign({ id: "accordion-1", togglePosition: "right", useDivider: true }, props)), (0, jsx_runtime_1.jsx)(Accordion, __assign({ id: "accordion-2", togglePosition: "right", subtitle: "Optional Subtitle", useDivider: true }, props)), (0, jsx_runtime_1.jsx)(Accordion, __assign({ id: "accordion-3", togglePosition: "left", useDivider: true }, props)), (0, jsx_runtime_1.jsx)(Accordion, __assign({ id: "accordion-4", togglePosition: "left", subtitle: "Optional Subtitle", useDivider: true }, props))] }));
|
|
61
|
-
}
|
|
62
|
-
exports.LivePreview = {
|
|
63
|
-
parameters: {
|
|
64
|
-
snapshot: {
|
|
65
|
-
skip: true,
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
render: function (args) { return (0, jsx_runtime_1.jsx)(LivePreviewDemo, __assign({}, args)); },
|
|
69
|
-
};
|
|
70
|
-
// Test
|
|
71
|
-
exports.Test = {
|
|
72
|
-
args: {
|
|
73
|
-
id: "test-story",
|
|
74
|
-
togglePosition: "right",
|
|
75
|
-
},
|
|
76
|
-
parameters: {
|
|
77
|
-
snapshot: {
|
|
78
|
-
skip: true,
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
render: function (props) { return ((0, jsx_runtime_1.jsx)(Accordion, __assign({}, props, { "data-testid": "accordion" }))); },
|
|
82
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|