@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
|
@@ -1,80 +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.LivePreview = exports.Default = void 0;
|
|
18
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
-
var material_1 = require("@mui/material");
|
|
20
|
-
var addon_actions_1 = require("@storybook/addon-actions");
|
|
21
|
-
var react_1 = __importDefault(require("react"));
|
|
22
|
-
var Button_1 = __importDefault(require("../Button"));
|
|
23
|
-
var CalloutTitle_1 = __importDefault(require("./components/CalloutTitle"));
|
|
24
|
-
var index_1 = __importDefault(require("./index"));
|
|
25
|
-
var Callout = function (props) {
|
|
26
|
-
var intent = props.intent, onClose = props.onClose, calloutTitle = props.calloutTitle, autoDismiss = props.autoDismiss;
|
|
27
|
-
var _a = react_1.default.useState(false), dismissed = _a[0], setDismissed = _a[1];
|
|
28
|
-
var handleChange = function () {
|
|
29
|
-
setDismissed(function (prev) { return !prev; });
|
|
30
|
-
};
|
|
31
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [!autoDismiss && ((0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { control: (0, jsx_runtime_1.jsx)(material_1.Switch, { checked: dismissed, onChange: handleChange }), label: "Hide" })), (0, jsx_runtime_1.jsxs)(index_1.default, __assign({ autoDismiss: autoDismiss, intent: intent, dismissed: dismissed, onClose: onClose }, props, { children: [calloutTitle && (0, jsx_runtime_1.jsx)(CalloutTitle_1.default, { children: calloutTitle }), "This is a callout!"] })), (0, jsx_runtime_1.jsx)(Button_1.default, { onClick: handleChange, sdsType: "primary", sdsStyle: "rounded", children: "Reset Callout" })] }));
|
|
32
|
-
};
|
|
33
|
-
exports.default = {
|
|
34
|
-
argTypes: {
|
|
35
|
-
autoDismiss: {
|
|
36
|
-
control: { type: "select" },
|
|
37
|
-
options: [true, false, 4000, 12000, 20000],
|
|
38
|
-
},
|
|
39
|
-
intent: {
|
|
40
|
-
control: { type: "radio" },
|
|
41
|
-
options: ["info", "error", "success", "warning"],
|
|
42
|
-
},
|
|
43
|
-
onClose: {
|
|
44
|
-
control: {
|
|
45
|
-
labels: {
|
|
46
|
-
"() => {}": true,
|
|
47
|
-
undefined: undefined,
|
|
48
|
-
},
|
|
49
|
-
type: "select",
|
|
50
|
-
},
|
|
51
|
-
options: [(0, addon_actions_1.action)("onClick"), undefined],
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
component: Callout,
|
|
55
|
-
title: "Callout",
|
|
56
|
-
};
|
|
57
|
-
// Default
|
|
58
|
-
exports.Default = {
|
|
59
|
-
args: {
|
|
60
|
-
autoDismiss: false,
|
|
61
|
-
calloutTitle: "this is a title",
|
|
62
|
-
intent: "success",
|
|
63
|
-
onClose: false,
|
|
64
|
-
},
|
|
65
|
-
};
|
|
66
|
-
// Live Preview
|
|
67
|
-
var storyRow = {
|
|
68
|
-
alignItems: "flex-start",
|
|
69
|
-
display: "flex",
|
|
70
|
-
flexDirection: "row",
|
|
71
|
-
gap: "20px",
|
|
72
|
-
};
|
|
73
|
-
var LivePreviewDemo = function (props) {
|
|
74
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: storyRow, children: [(0, jsx_runtime_1.jsx)(index_1.default, __assign({ intent: "info" }, props, { style: { width: "180px" }, children: "Title" })), (0, jsx_runtime_1.jsxs)(index_1.default, __assign({ intent: "info" }, props, { style: { width: "180px" }, children: [(0, jsx_runtime_1.jsx)(CalloutTitle_1.default, { children: "Title" }), "Lorem ipsum dolor sit amet, consectetur adipiscing elit"] })), (0, jsx_runtime_1.jsxs)(index_1.default, __assign({ intent: "info", expandable: true, sdsStage: "closed" }, props, { style: { width: "180px" }, children: [(0, jsx_runtime_1.jsx)(CalloutTitle_1.default, { children: "Title" }), "Lorem ipsum dolor sit amet, consectetur adipiscing elit"] })), (0, jsx_runtime_1.jsxs)(index_1.default, __assign({ intent: "info" }, props, {
|
|
75
|
-
// eslint-disable-next-line no-alert
|
|
76
|
-
onClose: function () { return alert("callout closed"); }, style: { width: "180px" }, children: [(0, jsx_runtime_1.jsx)(CalloutTitle_1.default, { children: "Title" }), "Lorem ipsum dolor sit amet, consectetur adipiscing elit"] }))] }));
|
|
77
|
-
};
|
|
78
|
-
exports.LivePreview = {
|
|
79
|
-
render: function (args) { return (0, jsx_runtime_1.jsx)(LivePreviewDemo, __assign({}, args)); },
|
|
80
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { AlertProps } from "@mui/material";
|
|
2
|
-
import { CommonThemeProps } from "../styles";
|
|
3
|
-
interface CalloutExtraProps extends CommonThemeProps {
|
|
4
|
-
collapsed?: boolean;
|
|
5
|
-
}
|
|
6
|
-
export declare const StyledCallout: import("@emotion/styled").StyledComponent<AlertProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & CalloutExtraProps, {}, {}>;
|
|
7
|
-
export {};
|
|
@@ -1,31 +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.StyledCallout = void 0;
|
|
8
|
-
var material_1 = require("@mui/material");
|
|
9
|
-
var styles_1 = require("@mui/material/styles");
|
|
10
|
-
var styles_2 = require("../styles");
|
|
11
|
-
var defaultTheme_1 = require("../styles/common/defaultTheme");
|
|
12
|
-
var fontBodyXs = (0, styles_2.fontBody)("xs");
|
|
13
|
-
var doNotForwardProps = ["calloutTitle", "collapsed"];
|
|
14
|
-
exports.StyledCallout = (0, styles_1.styled)(material_1.Alert, {
|
|
15
|
-
shouldForwardProp: function (prop) { return !doNotForwardProps.includes(prop); },
|
|
16
|
-
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n ", "\n"], ["\n ", "\n ", "\n"])), fontBodyXs, function (props) {
|
|
17
|
-
var colors = (0, styles_2.getColors)(props);
|
|
18
|
-
var spacings = (0, styles_2.getSpaces)(props);
|
|
19
|
-
var _a = props.severity, severity = _a === void 0 ? "success" : _a;
|
|
20
|
-
var corners = (0, styles_2.getCorners)(props);
|
|
21
|
-
var iconSizes = (0, styles_2.getIconSizes)(props);
|
|
22
|
-
var iconColor = (colors && colors[severity][400]) || "black";
|
|
23
|
-
var calloutColor = (colors && colors[severity][100]) || "white";
|
|
24
|
-
var backgroundColor = colors && colors[severity][100];
|
|
25
|
-
// when a title is present Mui's default styling has vertical margin,
|
|
26
|
-
// but for an expandable callout that is collapsed, we do not want
|
|
27
|
-
// any buttom margin
|
|
28
|
-
var titleBottomMargin = props.collapsed ? "margin-bottom: 0;" : "";
|
|
29
|
-
return "\n background-color: ".concat(backgroundColor, ";\n width: 360px;\n margin: ").concat(spacings === null || spacings === void 0 ? void 0 : spacings.m, "px 0;\n border-radius: ").concat(corners === null || corners === void 0 ? void 0 : corners.m, "px;\n color: ").concat(defaultTheme_1.defaultTheme.palette.text.primary, ";\n padding: ").concat(spacings === null || spacings === void 0 ? void 0 : spacings.m, "px;\n background-color: ").concat(calloutColor, ";\n\n .MuiAlert-icon {\n height: ").concat(iconSizes === null || iconSizes === void 0 ? void 0 : iconSizes.l.height, "px;\n width: ").concat(iconSizes === null || iconSizes === void 0 ? void 0 : iconSizes.l.width, "px;\n margin-right: ").concat(spacings === null || spacings === void 0 ? void 0 : spacings.m, "px;\n padding: 0;\n path {\n fill: ").concat(iconColor, ";\n }\n }\n\n .MuiAlert-message {\n padding: 0;\n margin-right: ").concat(spacings === null || spacings === void 0 ? void 0 : spacings.m, "px;\n\n .MuiAlertTitle-root{\n margin-top: 0;\n ").concat(titleBottomMargin, "\n }\n }\n\n .MuiAlert-action {\n margin-right: 0;\n padding: 0;\n align-items: flex-start;\n margin-top: ").concat(spacings === null || spacings === void 0 ? void 0 : spacings.xxs, "px;\n\n > button {\n padding: 0;\n }\n }\n ");
|
|
30
|
-
});
|
|
31
|
-
var templateObject_1;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,7 +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 CellBasicNameSpaceTest = function (props) {
|
|
6
|
-
return ((0, jsx_runtime_1.jsx)("table", { children: (0, jsx_runtime_1.jsx)("tbody", { children: (0, jsx_runtime_1.jsx)("tr", { children: (0, jsx_runtime_1.jsx)(components_1.CellBasic, { horizontalAlign: "center", verticalAlign: "center", icon: (0, jsx_runtime_1.jsx)(components_1.Icon, { sdsIcon: "download", sdsSize: "l", sdsType: "button" }), iconVerticalAlign: "center", primaryText: "Primary Text", primaryTextWrapLineCount: 2, secondaryText: "Secondary Text", secondaryTextWrapLineCount: 1, tertiaryText: "Tertiary Text", tertiaryTextWrapLineCount: 1, shouldShowTooltipOnHover: true, tooltipProps: { sdsStyle: "light" }, shouldTextWrap: true }) }) }) }));
|
|
7
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { TooltipProps } from "../Tooltip";
|
|
3
|
-
import { CellBasicExtraProps } from "./style";
|
|
4
|
-
interface CellBasicContentProps extends Omit<React.HTMLProps<HTMLTableCellElement>, "as" | "nonce" | "rev" | "rel" | "autoFocus" | "content"> {
|
|
5
|
-
primaryText: string;
|
|
6
|
-
primaryTextWrapLineCount?: number;
|
|
7
|
-
secondaryText?: string;
|
|
8
|
-
secondaryTextWrapLineCount?: number;
|
|
9
|
-
tertiaryText?: string;
|
|
10
|
-
tertiaryTextWrapLineCount?: number;
|
|
11
|
-
shouldTextWrap?: boolean;
|
|
12
|
-
icon?: JSX.Element;
|
|
13
|
-
iconVerticalAlign?: "top" | "center" | "bottom";
|
|
14
|
-
}
|
|
15
|
-
export interface CellBasicRawProps {
|
|
16
|
-
shouldShowTooltipOnHover?: boolean;
|
|
17
|
-
tooltipProps?: Partial<TooltipProps>;
|
|
18
|
-
}
|
|
19
|
-
export type CellBasicProps = CellBasicRawProps & CellBasicExtraProps & CellBasicContentProps;
|
|
20
|
-
declare const CellBasic: React.ForwardRefExoticComponent<Pick<CellBasicProps, "className" | "style" | "onChange" | "children" | "color" | "height" | "translate" | "verticalAlign" | "width" | "disabled" | "cite" | "data" | "form" | "label" | "slot" | "span" | "summary" | "title" | "pattern" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "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" | "theme" | "list" | "step" | "action" | "href" | "size" | "max" | "media" | "method" | "min" | "name" | "target" | "type" | "crossOrigin" | "classID" | "useMap" | "wmode" | "scoped" | "download" | "hrefLang" | "alt" | "coords" | "shape" | "autoPlay" | "controls" | "loop" | "mediaGroup" | "muted" | "playsInline" | "preload" | "src" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "value" | "dateTime" | "open" | "acceptCharset" | "autoComplete" | "encType" | "noValidate" | "manifest" | "allowFullScreen" | "allowTransparency" | "frameBorder" | "marginHeight" | "marginWidth" | "sandbox" | "scrolling" | "seamless" | "srcDoc" | "sizes" | "srcSet" | "accept" | "capture" | "checked" | "maxLength" | "minLength" | "multiple" | "readOnly" | "required" | "challenge" | "keyType" | "keyParams" | "htmlFor" | "integrity" | "charSet" | "httpEquiv" | "high" | "low" | "optimum" | "reversed" | "start" | "selected" | "async" | "defer" | "cellPadding" | "cellSpacing" | "colSpan" | "headers" | "rowSpan" | "scope" | "cols" | "rows" | "wrap" | "default" | "kind" | "srcLang" | "poster" | "icon" | "horizontalAlign" | "iconVerticalAlign" | "shouldTextWrap" | "primaryTextWrapLineCount" | "secondaryTextWrapLineCount" | "tertiaryTextWrapLineCount" | "primaryText" | "secondaryText" | "tertiaryText" | "shouldShowTooltipOnHover" | "tooltipProps"> & React.RefAttributes<HTMLTableCellElement>>;
|
|
21
|
-
export default CellBasic;
|
|
@@ -1,32 +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
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
18
|
-
var react_1 = require("react");
|
|
19
|
-
var Tooltip_1 = __importDefault(require("../Tooltip"));
|
|
20
|
-
var style_1 = require("./style");
|
|
21
|
-
var CellBasicContent = function (props) {
|
|
22
|
-
var primaryText = props.primaryText, primaryTextWrapLineCount = props.primaryTextWrapLineCount, secondaryText = props.secondaryText, secondaryTextWrapLineCount = props.secondaryTextWrapLineCount, tertiaryText = props.tertiaryText, tertiaryTextWrapLineCount = props.tertiaryTextWrapLineCount, _a = props.shouldTextWrap, shouldTextWrap = _a === void 0 ? true : _a, icon = props.icon, iconVerticalAlign = props.iconVerticalAlign;
|
|
23
|
-
return ((0, jsx_runtime_1.jsxs)(style_1.StyledCellContent, { children: [icon && ((0, jsx_runtime_1.jsx)(style_1.StyledCellIconWrapper, { iconVerticalAlign: iconVerticalAlign, children: icon })), (0, jsx_runtime_1.jsxs)(style_1.StyledCellContentWrapper, { children: [(0, jsx_runtime_1.jsx)(style_1.PrimaryText, { shouldTextWrap: shouldTextWrap, primaryTextWrapLineCount: primaryTextWrapLineCount, children: primaryText }), secondaryText && ((0, jsx_runtime_1.jsx)(style_1.SecondaryText, { shouldTextWrap: shouldTextWrap, secondaryTextWrapLineCount: secondaryTextWrapLineCount, children: secondaryText })), tertiaryText && ((0, jsx_runtime_1.jsx)(style_1.TertiaryText, { shouldTextWrap: shouldTextWrap, tertiaryTextWrapLineCount: tertiaryTextWrapLineCount, children: tertiaryText }))] })] }));
|
|
24
|
-
};
|
|
25
|
-
var CellBasic = (0, react_1.forwardRef)(function (props, ref) {
|
|
26
|
-
var primaryText = props.primaryText, secondaryText = props.secondaryText, _a = props.shouldShowTooltipOnHover, shouldShowTooltipOnHover = _a === void 0 ? true : _a, tooltipProps = props.tooltipProps;
|
|
27
|
-
if (shouldShowTooltipOnHover) {
|
|
28
|
-
return ((0, jsx_runtime_1.jsx)(Tooltip_1.default, __assign({ title: primaryText, subtitle: secondaryText, arrow: true, leaveDelay: 0, leaveTouchDelay: 0, sdsStyle: "dark" }, tooltipProps, { children: (0, jsx_runtime_1.jsx)(style_1.StyledTableData, __assign({ ref: ref }, props, { children: (0, jsx_runtime_1.jsx)(CellBasicContent, __assign({}, props)) })) })));
|
|
29
|
-
}
|
|
30
|
-
return ((0, jsx_runtime_1.jsx)(style_1.StyledTableData, __assign({ ref: ref }, props, { children: (0, jsx_runtime_1.jsx)(CellBasicContent, __assign({}, props)) })));
|
|
31
|
-
});
|
|
32
|
-
exports.default = CellBasic;
|
|
@@ -1,33 +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
|
-
primaryText: string;
|
|
7
|
-
primaryTextWrapLineCount: number;
|
|
8
|
-
secondaryText: string;
|
|
9
|
-
secondaryTextWrapLineCount: number;
|
|
10
|
-
shouldShowTooltipOnHover: boolean;
|
|
11
|
-
shouldTextWrap: boolean;
|
|
12
|
-
tertiaryText: string;
|
|
13
|
-
tertiaryTextWrapLineCount: number;
|
|
14
|
-
tooltipProps: {
|
|
15
|
-
sdsStyle: string;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
export declare const Test: {
|
|
20
|
-
args: {
|
|
21
|
-
primaryText: string;
|
|
22
|
-
secondaryText: string;
|
|
23
|
-
};
|
|
24
|
-
parameters: {
|
|
25
|
-
controls: {
|
|
26
|
-
exclude: string[];
|
|
27
|
-
};
|
|
28
|
-
snapshot: {
|
|
29
|
-
skip: boolean;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
render: (args: Args) => JSX.Element;
|
|
33
|
-
};
|
|
@@ -1,143 +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.Default = void 0;
|
|
18
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
-
var Icon_1 = __importDefault(require("../Icon"));
|
|
20
|
-
var index_1 = __importDefault(require("./index"));
|
|
21
|
-
var CellBasic = function (props) {
|
|
22
|
-
return ((0, jsx_runtime_1.jsx)("table", { children: (0, jsx_runtime_1.jsx)("tbody", { children: (0, jsx_runtime_1.jsx)("tr", { style: {
|
|
23
|
-
display: "block",
|
|
24
|
-
maxWidth: "200px",
|
|
25
|
-
}, children: (0, jsx_runtime_1.jsx)(index_1.default, __assign({ "data-testid": "CellBasic", primaryText: "Primary Text", tooltipProps: { sdsStyle: "light" } }, props)) }) }) }));
|
|
26
|
-
};
|
|
27
|
-
var availableIconOptions = [
|
|
28
|
-
undefined,
|
|
29
|
-
(0, jsx_runtime_1.jsx)(Icon_1.default, { sdsSize: "xs", sdsIcon: "download", sdsType: "static" }, "download"),
|
|
30
|
-
(0, jsx_runtime_1.jsx)(Icon_1.default, { sdsSize: "s", sdsIcon: "lightBulb", sdsType: "static" }, "lightBulb"),
|
|
31
|
-
(0, jsx_runtime_1.jsx)(Icon_1.default, { sdsSize: "l", sdsIcon: "bacteria", sdsType: "static" }, "bacteria"),
|
|
32
|
-
(0, jsx_runtime_1.jsx)(Icon_1.default, { sdsSize: "xl", sdsIcon: "flask", sdsType: "static" }, "flask"),
|
|
33
|
-
];
|
|
34
|
-
exports.default = {
|
|
35
|
-
argTypes: {
|
|
36
|
-
horizontalAlign: {
|
|
37
|
-
control: { type: "select" },
|
|
38
|
-
options: ["left", "center", "right"],
|
|
39
|
-
},
|
|
40
|
-
icon: {
|
|
41
|
-
control: {
|
|
42
|
-
labels: [
|
|
43
|
-
"No Icon",
|
|
44
|
-
"XS Download",
|
|
45
|
-
"S Light bulb",
|
|
46
|
-
"L Bacteria",
|
|
47
|
-
"XL Flask",
|
|
48
|
-
],
|
|
49
|
-
type: "select",
|
|
50
|
-
},
|
|
51
|
-
mapping: availableIconOptions,
|
|
52
|
-
options: Object.keys(availableIconOptions),
|
|
53
|
-
},
|
|
54
|
-
iconVerticalAlign: {
|
|
55
|
-
control: { type: "select" },
|
|
56
|
-
options: ["top", "center", "bottom"],
|
|
57
|
-
},
|
|
58
|
-
primaryText: {
|
|
59
|
-
control: { type: "text" },
|
|
60
|
-
},
|
|
61
|
-
primaryTextWrapLineCount: {
|
|
62
|
-
control: { type: "number" },
|
|
63
|
-
},
|
|
64
|
-
secondaryText: {
|
|
65
|
-
control: { type: "text" },
|
|
66
|
-
},
|
|
67
|
-
secondaryTextWrapLineCount: {
|
|
68
|
-
control: { type: "number" },
|
|
69
|
-
},
|
|
70
|
-
shouldShowTooltipOnHover: {
|
|
71
|
-
control: { type: "boolean" },
|
|
72
|
-
},
|
|
73
|
-
shouldTextWrap: {
|
|
74
|
-
control: { type: "boolean" },
|
|
75
|
-
},
|
|
76
|
-
tertiaryText: {
|
|
77
|
-
control: { type: "text" },
|
|
78
|
-
},
|
|
79
|
-
tertiaryTextWrapLineCount: {
|
|
80
|
-
control: { type: "number" },
|
|
81
|
-
},
|
|
82
|
-
tooltipProps: {
|
|
83
|
-
control: { type: "object" },
|
|
84
|
-
},
|
|
85
|
-
verticalAlign: {
|
|
86
|
-
control: { type: "select" },
|
|
87
|
-
options: ["top", "center", "bottom"],
|
|
88
|
-
},
|
|
89
|
-
},
|
|
90
|
-
component: CellBasic,
|
|
91
|
-
title: "Table/CellBasic",
|
|
92
|
-
};
|
|
93
|
-
// Default
|
|
94
|
-
exports.Default = {
|
|
95
|
-
args: {
|
|
96
|
-
primaryText: "Primary Text",
|
|
97
|
-
primaryTextWrapLineCount: 3,
|
|
98
|
-
secondaryText: "Secondary Text",
|
|
99
|
-
secondaryTextWrapLineCount: 1,
|
|
100
|
-
shouldShowTooltipOnHover: true,
|
|
101
|
-
shouldTextWrap: true,
|
|
102
|
-
tertiaryText: "Tertiary Text",
|
|
103
|
-
tertiaryTextWrapLineCount: 1,
|
|
104
|
-
tooltipProps: { sdsStyle: "dark" },
|
|
105
|
-
},
|
|
106
|
-
};
|
|
107
|
-
// Test
|
|
108
|
-
var TableCellStyle = {
|
|
109
|
-
border: "dashed 1px #eee",
|
|
110
|
-
height: 100,
|
|
111
|
-
maxWidth: 160,
|
|
112
|
-
width: 160,
|
|
113
|
-
};
|
|
114
|
-
var TestDemo = function () { return ((0, jsx_runtime_1.jsx)("table", { children: (0, jsx_runtime_1.jsx)("tbody", { children: (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)(index_1.default, { "data-testid": "CellBasicVerticalAlignTest", primaryText: "Primary Text", secondaryText: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.", secondaryTextWrapLineCount: 2, shouldTextWrap: true, verticalAlign: "bottom", shouldShowTooltipOnHover: false, style: TableCellStyle }), (0, jsx_runtime_1.jsx)(index_1.default, { "data-testid": "CellBasicCenterAlignTest", primaryText: "Primary Text", secondaryText: "Secondary Text", verticalAlign: "center", horizontalAlign: "center", shouldShowTooltipOnHover: false, style: TableCellStyle }), (0, jsx_runtime_1.jsx)(index_1.default, { "data-testid": "CellBasic", primaryText: "Primary Text", secondaryText: "Secondary Text", tertiaryText: "Tertiary Text", horizontalAlign: "right", tooltipProps: { sdsStyle: "dark", title: "testTooltipTitle" }, style: TableCellStyle }), (0, jsx_runtime_1.jsx)(index_1.default, { "data-testid": "CellBasicWithIcon", primaryText: "Primary Text", secondaryText: "Secondary Text", tertiaryText: "Tertiary Text", icon: (0, jsx_runtime_1.jsx)(Icon_1.default, { sdsSize: "l", sdsIcon: "bacteria", sdsType: "static" }), style: TableCellStyle })] }) }) })); };
|
|
115
|
-
exports.Test = {
|
|
116
|
-
args: {
|
|
117
|
-
primaryText: "Primary text",
|
|
118
|
-
secondaryText: "Secondary Text",
|
|
119
|
-
},
|
|
120
|
-
parameters: {
|
|
121
|
-
controls: {
|
|
122
|
-
exclude: [
|
|
123
|
-
"icon",
|
|
124
|
-
"iconVerticalAlign",
|
|
125
|
-
"primaryText",
|
|
126
|
-
"primaryTextWrapLineCount",
|
|
127
|
-
"secondaryText",
|
|
128
|
-
"secondaryTextWrapLineCount",
|
|
129
|
-
"tertiaryText",
|
|
130
|
-
"tertiaryTextWrapLineCount",
|
|
131
|
-
"shouldShowTooltipOnHover",
|
|
132
|
-
"shouldTextWrap",
|
|
133
|
-
"tooltipProps",
|
|
134
|
-
"horizontalAlign",
|
|
135
|
-
"verticalAlign",
|
|
136
|
-
],
|
|
137
|
-
},
|
|
138
|
-
snapshot: {
|
|
139
|
-
skip: true,
|
|
140
|
-
},
|
|
141
|
-
},
|
|
142
|
-
render: function (args) { return (0, jsx_runtime_1.jsx)(TestDemo, __assign({}, args)); },
|
|
143
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
35
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
36
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
37
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
38
|
-
function step(op) {
|
|
39
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
40
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
41
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
42
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
43
|
-
switch (op[0]) {
|
|
44
|
-
case 0: case 1: t = op; break;
|
|
45
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
46
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
47
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
48
|
-
default:
|
|
49
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
50
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
51
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
52
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
53
|
-
if (t[2]) _.ops.pop();
|
|
54
|
-
_.trys.pop(); continue;
|
|
55
|
-
}
|
|
56
|
-
op = body.call(thisArg, _);
|
|
57
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
58
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
62
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
63
|
-
var story_utils_1 = require("@chanzuckerberg/story-utils");
|
|
64
|
-
var react_1 = require("@storybook/react");
|
|
65
|
-
var react_2 = require("@testing-library/react");
|
|
66
|
-
var snapshotTestStoryFile = __importStar(require("./index.stories"));
|
|
67
|
-
var index_stories_1 = __importStar(require("./index.stories"));
|
|
68
|
-
// Returns a component that already contain all decorators from story level, meta level and global level.
|
|
69
|
-
var Test = (0, react_1.composeStory)(index_stories_1.Test, index_stories_1.default);
|
|
70
|
-
describe("<CellBasic />", function () {
|
|
71
|
-
(0, story_utils_1.generateSnapshots)(snapshotTestStoryFile);
|
|
72
|
-
it("renders cell basic component", function () {
|
|
73
|
-
(0, react_2.render)((0, jsx_runtime_1.jsx)(Test, {}));
|
|
74
|
-
var elements = react_2.screen.getAllByTestId("CellBasic");
|
|
75
|
-
expect(elements).toBeTruthy();
|
|
76
|
-
});
|
|
77
|
-
it("renders tooltip on hover", function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
78
|
-
var cellBasicElement;
|
|
79
|
-
return __generator(this, function (_a) {
|
|
80
|
-
switch (_a.label) {
|
|
81
|
-
case 0:
|
|
82
|
-
(0, react_2.render)((0, jsx_runtime_1.jsx)(Test, {}));
|
|
83
|
-
cellBasicElement = react_2.screen.getByTestId("CellBasic");
|
|
84
|
-
react_2.fireEvent.mouseOver(cellBasicElement);
|
|
85
|
-
return [4 /*yield*/, react_2.screen.findByText("testTooltipTitle")];
|
|
86
|
-
case 1:
|
|
87
|
-
_a.sent();
|
|
88
|
-
return [2 /*return*/];
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
}); });
|
|
92
|
-
it("renders text at right side", function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
93
|
-
var cellBasicElement, renderedElement, style;
|
|
94
|
-
return __generator(this, function (_a) {
|
|
95
|
-
(0, react_2.render)((0, jsx_runtime_1.jsx)(Test, {}));
|
|
96
|
-
cellBasicElement = react_2.screen.getByTestId("CellBasic");
|
|
97
|
-
renderedElement = document.getElementsByClassName(cellBasicElement.className)[0];
|
|
98
|
-
style = window.getComputedStyle(renderedElement);
|
|
99
|
-
expect(style.textAlign).toBe("right");
|
|
100
|
-
return [2 /*return*/];
|
|
101
|
-
});
|
|
102
|
-
}); });
|
|
103
|
-
it("renders text at the bottom", function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
104
|
-
var cellBasicElement, renderedElement, style;
|
|
105
|
-
return __generator(this, function (_a) {
|
|
106
|
-
(0, react_2.render)((0, jsx_runtime_1.jsx)(Test, {}));
|
|
107
|
-
cellBasicElement = react_2.screen.getByTestId("CellBasicVerticalAlignTest");
|
|
108
|
-
renderedElement = document.getElementsByClassName(cellBasicElement.className)[0];
|
|
109
|
-
style = window.getComputedStyle(renderedElement);
|
|
110
|
-
expect(style.verticalAlign).toBe("bottom");
|
|
111
|
-
return [2 /*return*/];
|
|
112
|
-
});
|
|
113
|
-
}); });
|
|
114
|
-
it("renders icon with a basic cell", function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
115
|
-
var cellBasicElement, iconElement;
|
|
116
|
-
return __generator(this, function (_a) {
|
|
117
|
-
(0, react_2.render)((0, jsx_runtime_1.jsx)(Test, {}));
|
|
118
|
-
cellBasicElement = react_2.screen.getByTestId("CellBasicWithIcon");
|
|
119
|
-
iconElement = cellBasicElement.getElementsByTagName("svg");
|
|
120
|
-
expect(iconElement).toBeTruthy();
|
|
121
|
-
return [2 /*return*/];
|
|
122
|
-
});
|
|
123
|
-
}); });
|
|
124
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { CommonThemeProps } from "../styles";
|
|
3
|
-
export interface CellBasicExtraProps extends CommonThemeProps {
|
|
4
|
-
horizontalAlign?: "left" | "center" | "right";
|
|
5
|
-
verticalAlign?: "top" | "center" | "bottom";
|
|
6
|
-
iconVerticalAlign?: "top" | "center" | "bottom";
|
|
7
|
-
shouldTextWrap?: boolean;
|
|
8
|
-
primaryTextWrapLineCount?: number;
|
|
9
|
-
secondaryTextWrapLineCount?: number;
|
|
10
|
-
tertiaryTextWrapLineCount?: number;
|
|
11
|
-
}
|
|
12
|
-
export declare const StyledTableData: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & CellBasicExtraProps, import("react").DetailedHTMLProps<import("react").TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, {}>;
|
|
13
|
-
export declare const StyledCellContent: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
14
|
-
export declare const StyledCellContentWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
15
|
-
export declare const StyledCellIconWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & CellBasicExtraProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
16
|
-
export declare const PrimaryText: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & CellBasicExtraProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
17
|
-
export declare const SecondaryText: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & CellBasicExtraProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
18
|
-
export declare const TertiaryText: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & CellBasicExtraProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
@@ -1,86 +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.TertiaryText = exports.SecondaryText = exports.PrimaryText = exports.StyledCellIconWrapper = exports.StyledCellContentWrapper = exports.StyledCellContent = exports.StyledTableData = void 0;
|
|
8
|
-
var styles_1 = require("@mui/material/styles");
|
|
9
|
-
var styles_2 = require("../styles");
|
|
10
|
-
var doNotForwardProps = [
|
|
11
|
-
"icon",
|
|
12
|
-
"iconVerticalAlign",
|
|
13
|
-
"horizontalAlign",
|
|
14
|
-
"verticalAlign",
|
|
15
|
-
"primaryText",
|
|
16
|
-
"secondaryText",
|
|
17
|
-
"tertiaryText",
|
|
18
|
-
"shouldTextWrap",
|
|
19
|
-
"shouldShowTooltipOnHover",
|
|
20
|
-
"tooltipProps",
|
|
21
|
-
"primaryTextWrapLineCount",
|
|
22
|
-
"secondaryTextWrapLineCount",
|
|
23
|
-
"tertiaryTextWrapLineCount",
|
|
24
|
-
];
|
|
25
|
-
var verticalAlignCSSMap = {
|
|
26
|
-
bottom: "bottom",
|
|
27
|
-
center: "middle",
|
|
28
|
-
top: "top",
|
|
29
|
-
};
|
|
30
|
-
var verticalAlignToFlexMap = {
|
|
31
|
-
bottom: "flex-end",
|
|
32
|
-
center: "center",
|
|
33
|
-
top: "flex-start",
|
|
34
|
-
};
|
|
35
|
-
exports.StyledTableData = (0, styles_1.styled)("td", {
|
|
36
|
-
shouldForwardProp: function (prop) { return !doNotForwardProps.includes(prop); },
|
|
37
|
-
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (props) {
|
|
38
|
-
var _a = props.horizontalAlign, horizontalAlign = _a === void 0 ? "left" : _a, _b = props.verticalAlign, verticalAlign = _b === void 0 ? "top" : _b;
|
|
39
|
-
var spacings = (0, styles_2.getSpaces)(props);
|
|
40
|
-
var typography = (0, styles_2.getTypography)(props);
|
|
41
|
-
return "\n font-family: ".concat(typography === null || typography === void 0 ? void 0 : typography.fontFamily, ";\n padding: ").concat(spacings === null || spacings === void 0 ? void 0 : spacings.l, "px ").concat(spacings === null || spacings === void 0 ? void 0 : spacings.s, "px;\n text-align: ").concat(horizontalAlign, ";\n vertical-align: ").concat(verticalAlignCSSMap[verticalAlign], ";\n width: 96px;\n overflow: hidden;\n ");
|
|
42
|
-
});
|
|
43
|
-
var ShouldWrap = function (lineCount) {
|
|
44
|
-
return "\n overflow: hidden;\n display: -webkit-box;\n -webkit-line-clamp: ".concat(lineCount, ";\n -webkit-box-orient: vertical; \n ");
|
|
45
|
-
};
|
|
46
|
-
var ShouldTruncate = function () {
|
|
47
|
-
return "\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n ";
|
|
48
|
-
};
|
|
49
|
-
exports.StyledCellContent = (0, styles_1.styled)("div")(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
|
|
50
|
-
exports.StyledCellContentWrapper = (0, styles_1.styled)("div")(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n width: 100%;\n"], ["\n width: 100%;\n"])));
|
|
51
|
-
exports.StyledCellIconWrapper = (0, styles_1.styled)("div", {
|
|
52
|
-
shouldForwardProp: function (prop) { return !doNotForwardProps.includes(prop); },
|
|
53
|
-
})(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (props) {
|
|
54
|
-
var _a = props.iconVerticalAlign, iconVerticalAlign = _a === void 0 ? "top" : _a;
|
|
55
|
-
var spacings = (0, styles_2.getSpaces)(props);
|
|
56
|
-
return "\n padding-right: ".concat(spacings === null || spacings === void 0 ? void 0 : spacings.l, "px;\n display: flex;\n flex-direction: column;\n justify-content: ").concat(verticalAlignToFlexMap[iconVerticalAlign], ";\n ");
|
|
57
|
-
});
|
|
58
|
-
exports.PrimaryText = (0, styles_1.styled)("span", {
|
|
59
|
-
shouldForwardProp: function (prop) { return !doNotForwardProps.includes(prop); },
|
|
60
|
-
})(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n ", "\n\n ", "\n"], ["\n ", "\n\n ", "\n"])), styles_2.fontBodyS, function (props) {
|
|
61
|
-
var _a = props.primaryTextWrapLineCount, primaryTextWrapLineCount = _a === void 0 ? 3 : _a;
|
|
62
|
-
return "\n display: block;\n line-height: 20px;\n ".concat(props.shouldTextWrap
|
|
63
|
-
? ShouldWrap(primaryTextWrapLineCount)
|
|
64
|
-
: ShouldTruncate(), "\n ");
|
|
65
|
-
});
|
|
66
|
-
exports.SecondaryText = (0, styles_1.styled)("span", {
|
|
67
|
-
shouldForwardProp: function (prop) { return !doNotForwardProps.includes(prop); },
|
|
68
|
-
})(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n ", "\n\n ", "\n"], ["\n ", "\n\n ", "\n"])), styles_2.fontBodyXxs, function (props) {
|
|
69
|
-
var _a = props.secondaryTextWrapLineCount, secondaryTextWrapLineCount = _a === void 0 ? 1 : _a;
|
|
70
|
-
var colors = (0, styles_2.getColors)(props);
|
|
71
|
-
var spaces = (0, styles_2.getSpaces)(props);
|
|
72
|
-
return "\n display: block;\n color: ".concat(colors === null || colors === void 0 ? void 0 : colors.gray[600], ";\n padding-top: ").concat(spaces === null || spaces === void 0 ? void 0 : spaces.xxxs, "px;\n\n ").concat(props.shouldTextWrap
|
|
73
|
-
? ShouldWrap(secondaryTextWrapLineCount)
|
|
74
|
-
: ShouldTruncate(), "\n ");
|
|
75
|
-
});
|
|
76
|
-
exports.TertiaryText = (0, styles_1.styled)("span", {
|
|
77
|
-
shouldForwardProp: function (prop) { return !doNotForwardProps.includes(prop); },
|
|
78
|
-
})(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n ", "\n\n ", "\n"], ["\n ", "\n\n ", "\n"])), styles_2.fontBodyXxs, function (props) {
|
|
79
|
-
var _a = props.tertiaryTextWrapLineCount, tertiaryTextWrapLineCount = _a === void 0 ? 1 : _a;
|
|
80
|
-
var colors = (0, styles_2.getColors)(props);
|
|
81
|
-
var spaces = (0, styles_2.getSpaces)(props);
|
|
82
|
-
return "\n display: block;\n color: ".concat(colors === null || colors === void 0 ? void 0 : colors.gray[500], ";\n padding-top: ").concat(spaces === null || spaces === void 0 ? void 0 : spaces.s, "px;\n\n ").concat(props.shouldTextWrap
|
|
83
|
-
? ShouldWrap(tertiaryTextWrapLineCount)
|
|
84
|
-
: ShouldTruncate(), "\n ");
|
|
85
|
-
});
|
|
86
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,7 +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 CellBasicNameSpaceTest = function (props) {
|
|
6
|
-
return ((0, jsx_runtime_1.jsx)("table", { children: (0, jsx_runtime_1.jsx)("tbody", { children: (0, jsx_runtime_1.jsx)("tr", { children: (0, jsx_runtime_1.jsx)(components_1.CellComponent, { horizontalAlign: "center", verticalAlign: "center", children: (0, jsx_runtime_1.jsx)(components_1.Icon, { sdsIcon: "download", sdsSize: "l", sdsType: "button" }) }) }) }) }));
|
|
7
|
-
};
|