@czi-sds/components 15.3.0 → 15.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.d.ts +132 -80
- package/dist/index.cjs.js +926 -734
- package/dist/index.esm.d.ts +132 -80
- package/dist/index.esm.js +928 -737
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/dist/src/common/helpers/scrollStop.d.ts +0 -8
- package/dist/src/common/helpers/scrollStop.js +0 -54
- package/dist/src/common/storybookConstants.d.ts +0 -3
- package/dist/src/common/storybookConstants.js +0 -2
- package/dist/src/common/utils.d.ts +0 -2
- package/dist/src/common/utils.js +0 -9
- package/dist/src/common/warnings.d.ts +0 -10
- package/dist/src/common/warnings.js +0 -60
- package/dist/src/common/warnings.test.d.ts +0 -1
- package/dist/src/common/warnings.test.js +0 -19
- package/dist/src/core/Accordion/Accordion.namespace-test.d.ts +0 -1
- package/dist/src/core/Accordion/Accordion.namespace-test.js +0 -18
- package/dist/src/core/Accordion/__snapshots__/index.test.js.snap +0 -64
- package/dist/src/core/Accordion/components/AccordionDetails/index.d.ts +0 -3
- package/dist/src/core/Accordion/components/AccordionDetails/index.js +0 -9
- package/dist/src/core/Accordion/components/AccordionDetails/style.d.ts +0 -2
- package/dist/src/core/Accordion/components/AccordionDetails/style.js +0 -16
- package/dist/src/core/Accordion/components/AccordionHeader/index.d.ts +0 -7
- package/dist/src/core/Accordion/components/AccordionHeader/index.js +0 -13
- package/dist/src/core/Accordion/components/AccordionHeader/style.d.ts +0 -27
- package/dist/src/core/Accordion/components/AccordionHeader/style.js +0 -21
- package/dist/src/core/Accordion/index.d.ts +0 -12
- package/dist/src/core/Accordion/index.js +0 -38
- package/dist/src/core/Accordion/index.stories.d.ts +0 -28
- package/dist/src/core/Accordion/index.stories.js +0 -82
- package/dist/src/core/Accordion/index.test.d.ts +0 -1
- package/dist/src/core/Accordion/index.test.js +0 -58
- package/dist/src/core/Accordion/style.d.ts +0 -30
- package/dist/src/core/Accordion/style.js +0 -28
- package/dist/src/core/Alert/index.d.ts +0 -7
- package/dist/src/core/Alert/index.js +0 -22
- package/dist/src/core/Alert/index.stories.d.ts +0 -19
- package/dist/src/core/Alert/index.stories.js +0 -70
- package/dist/src/core/Alert/style.d.ts +0 -1
- package/dist/src/core/Alert/style.js +0 -23
- package/dist/src/core/Banner/Banner.namespace-test.d.ts +0 -1
- package/dist/src/core/Banner/Banner.namespace-test.js +0 -18
- package/dist/src/core/Banner/banner.test.d.ts +0 -1
- package/dist/src/core/Banner/banner.test.js +0 -126
- package/dist/src/core/Banner/index.d.ts +0 -11
- package/dist/src/core/Banner/index.js +0 -47
- package/dist/src/core/Banner/index.stories.d.ts +0 -46
- package/dist/src/core/Banner/index.stories.js +0 -106
- package/dist/src/core/Banner/style.d.ts +0 -13
- package/dist/src/core/Banner/style.js +0 -55
- package/dist/src/core/Button/Button.namespace-test.d.ts +0 -1
- package/dist/src/core/Button/Button.namespace-test.js +0 -18
- package/dist/src/core/Button/index.d.ts +0 -18
- package/dist/src/core/Button/index.js +0 -54
- package/dist/src/core/Button/index.stories.d.ts +0 -72
- package/dist/src/core/Button/index.stories.js +0 -215
- package/dist/src/core/Button/index.test.d.ts +0 -1
- package/dist/src/core/Button/index.test.js +0 -40
- package/dist/src/core/Button/style.d.ts +0 -180
- package/dist/src/core/Button/style.js +0 -59
- package/dist/src/core/ButtonDropdown/ButtonDropdown.namespace-test.d.ts +0 -1
- package/dist/src/core/ButtonDropdown/ButtonDropdown.namespace-test.js +0 -18
- package/dist/src/core/ButtonDropdown/index.d.ts +0 -18
- package/dist/src/core/ButtonDropdown/index.js +0 -30
- package/dist/src/core/ButtonDropdown/index.stories.d.ts +0 -35
- package/dist/src/core/ButtonDropdown/index.stories.js +0 -79
- package/dist/src/core/ButtonDropdown/index.test.d.ts +0 -1
- package/dist/src/core/ButtonDropdown/index.test.js +0 -41
- package/dist/src/core/ButtonIcon/ButtonIcon.namespace-test.d.ts +0 -1
- package/dist/src/core/ButtonIcon/ButtonIcon.namespace-test.js +0 -18
- package/dist/src/core/ButtonIcon/index.d.ts +0 -15
- package/dist/src/core/ButtonIcon/index.js +0 -34
- package/dist/src/core/ButtonIcon/index.stories.d.ts +0 -39
- package/dist/src/core/ButtonIcon/index.stories.js +0 -239
- package/dist/src/core/ButtonIcon/index.test.d.ts +0 -1
- package/dist/src/core/ButtonIcon/index.test.js +0 -41
- package/dist/src/core/ButtonIcon/style.d.ts +0 -41
- package/dist/src/core/ButtonIcon/style.js +0 -68
- package/dist/src/core/Callout/Callout.namespace-test.d.ts +0 -1
- package/dist/src/core/Callout/Callout.namespace-test.js +0 -18
- package/dist/src/core/Callout/components/CalloutTitle/index.d.ts +0 -3
- package/dist/src/core/Callout/components/CalloutTitle/index.js +0 -9
- package/dist/src/core/Callout/components/CalloutTitle/style.d.ts +0 -1
- package/dist/src/core/Callout/components/CalloutTitle/style.js +0 -16
- package/dist/src/core/Callout/index.d.ts +0 -18
- package/dist/src/core/Callout/index.js +0 -89
- package/dist/src/core/Callout/index.stories.d.ts +0 -14
- package/dist/src/core/Callout/index.stories.js +0 -80
- package/dist/src/core/Callout/style.d.ts +0 -7
- package/dist/src/core/Callout/style.js +0 -31
- package/dist/src/core/CellBasic/CellBasic.namespace-test.d.ts +0 -1
- package/dist/src/core/CellBasic/CellBasic.namespace-test.js +0 -7
- package/dist/src/core/CellBasic/index.d.ts +0 -21
- package/dist/src/core/CellBasic/index.js +0 -32
- package/dist/src/core/CellBasic/index.stories.d.ts +0 -33
- package/dist/src/core/CellBasic/index.stories.js +0 -143
- package/dist/src/core/CellBasic/index.test.d.ts +0 -1
- package/dist/src/core/CellBasic/index.test.js +0 -124
- package/dist/src/core/CellBasic/style.d.ts +0 -18
- package/dist/src/core/CellBasic/style.js +0 -86
- package/dist/src/core/CellComponent/CellComponent.namespace-test.d.ts +0 -1
- package/dist/src/core/CellComponent/CellComponent.namespace-test.js +0 -7
- package/dist/src/core/CellComponent/index.d.ts +0 -8
- package/dist/src/core/CellComponent/index.js +0 -21
- package/dist/src/core/CellComponent/index.stories.d.ts +0 -21
- package/dist/src/core/CellComponent/index.stories.js +0 -92
- package/dist/src/core/CellComponent/index.test.d.ts +0 -1
- package/dist/src/core/CellComponent/index.test.js +0 -110
- package/dist/src/core/CellComponent/style.d.ts +0 -9
- package/dist/src/core/CellComponent/style.js +0 -32
- package/dist/src/core/CellHeader/CellHeader.namespace-test.d.ts +0 -1
- package/dist/src/core/CellHeader/CellHeader.namespace-test.js +0 -8
- package/dist/src/core/CellHeader/index.d.ts +0 -20
- package/dist/src/core/CellHeader/index.js +0 -47
- package/dist/src/core/CellHeader/index.stories.d.ts +0 -26
- package/dist/src/core/CellHeader/index.stories.js +0 -128
- package/dist/src/core/CellHeader/index.test.d.ts +0 -1
- package/dist/src/core/CellHeader/index.test.js +0 -112
- package/dist/src/core/CellHeader/style.d.ts +0 -9
- package/dist/src/core/CellHeader/style.js +0 -50
- package/dist/src/core/Chip/index.d.ts +0 -9
- package/dist/src/core/Chip/index.js +0 -29
- package/dist/src/core/Chip/index.stories.d.ts +0 -58
- package/dist/src/core/Chip/index.stories.js +0 -90
- package/dist/src/core/Chip/style.d.ts +0 -26
- package/dist/src/core/Chip/style.js +0 -95
- package/dist/src/core/ComplexFilter/ComplexFilter.namespace-test.d.ts +0 -1
- package/dist/src/core/ComplexFilter/ComplexFilter.namespace-test.js +0 -20
- package/dist/src/core/ComplexFilter/components/Chips/index.d.ts +0 -8
- package/dist/src/core/ComplexFilter/components/Chips/index.js +0 -21
- package/dist/src/core/ComplexFilter/index.d.ts +0 -23
- package/dist/src/core/ComplexFilter/index.js +0 -119
- package/dist/src/core/ComplexFilter/index.stories.d.ts +0 -33
- package/dist/src/core/ComplexFilter/index.stories.js +0 -126
- package/dist/src/core/ComplexFilter/index.test.d.ts +0 -1
- package/dist/src/core/ComplexFilter/index.test.js +0 -51
- package/dist/src/core/ComplexFilter/style.d.ts +0 -3
- package/dist/src/core/ComplexFilter/style.js +0 -15
- package/dist/src/core/Dialog/Dialog.namespace-test.d.ts +0 -1
- package/dist/src/core/Dialog/Dialog.namespace-test.js +0 -8
- package/dist/src/core/Dialog/__snapshots__/index.test.js.snap +0 -382
- package/dist/src/core/Dialog/components/common.d.ts +0 -6
- package/dist/src/core/Dialog/components/common.js +0 -5
- package/dist/src/core/Dialog/index.d.ts +0 -18
- package/dist/src/core/Dialog/index.js +0 -50
- package/dist/src/core/Dialog/index.stories.d.ts +0 -46
- package/dist/src/core/Dialog/index.stories.js +0 -147
- package/dist/src/core/Dialog/index.test.d.ts +0 -1
- package/dist/src/core/Dialog/index.test.js +0 -62
- package/dist/src/core/DialogActions/index.d.ts +0 -9
- package/dist/src/core/DialogActions/index.js +0 -23
- package/dist/src/core/DialogActions/style.d.ts +0 -5
- package/dist/src/core/DialogActions/style.js +0 -20
- package/dist/src/core/DialogContent/index.d.ts +0 -5
- package/dist/src/core/DialogContent/index.js +0 -23
- package/dist/src/core/DialogContent/style.d.ts +0 -1
- package/dist/src/core/DialogContent/style.js +0 -11
- package/dist/src/core/DialogPaper/index.d.ts +0 -8
- package/dist/src/core/DialogPaper/index.js +0 -27
- package/dist/src/core/DialogPaper/style.d.ts +0 -16
- package/dist/src/core/DialogPaper/style.js +0 -44
- package/dist/src/core/DialogTitle/components/CloseButton/index.d.ts +0 -5
- package/dist/src/core/DialogTitle/components/CloseButton/index.js +0 -31
- package/dist/src/core/DialogTitle/components/CloseButton/style.d.ts +0 -2
- package/dist/src/core/DialogTitle/components/CloseButton/style.js +0 -18
- package/dist/src/core/DialogTitle/index.d.ts +0 -14
- package/dist/src/core/DialogTitle/index.js +0 -42
- package/dist/src/core/DialogTitle/style.d.ts +0 -46
- package/dist/src/core/DialogTitle/style.js +0 -20
- package/dist/src/core/Dropdown/Dropdown.namespace-test.d.ts +0 -1
- package/dist/src/core/Dropdown/Dropdown.namespace-test.js +0 -20
- package/dist/src/core/Dropdown/index.d.ts +0 -31
- package/dist/src/core/Dropdown/index.js +0 -160
- package/dist/src/core/Dropdown/index.stories.d.ts +0 -68
- package/dist/src/core/Dropdown/index.stories.js +0 -215
- package/dist/src/core/Dropdown/index.test.d.ts +0 -1
- package/dist/src/core/Dropdown/index.test.js +0 -229
- package/dist/src/core/Dropdown/style.d.ts +0 -5
- package/dist/src/core/Dropdown/style.js +0 -19
- package/dist/src/core/DropdownMenu/DropdownMenu.namespace-test.d.ts +0 -1
- package/dist/src/core/DropdownMenu/DropdownMenu.namespace-test.js +0 -20
- package/dist/src/core/DropdownMenu/GITHUB_LABELS.d.ts +0 -2
- package/dist/src/core/DropdownMenu/GITHUB_LABELS.js +0 -83
- package/dist/src/core/DropdownMenu/index.d.ts +0 -42
- package/dist/src/core/DropdownMenu/index.js +0 -83
- package/dist/src/core/DropdownMenu/index.stories.d.ts +0 -55
- package/dist/src/core/DropdownMenu/index.stories.js +0 -438
- package/dist/src/core/DropdownMenu/index.test.d.ts +0 -1
- package/dist/src/core/DropdownMenu/index.test.js +0 -51
- package/dist/src/core/DropdownMenu/style.d.ts +0 -40
- package/dist/src/core/DropdownMenu/style.js +0 -85
- package/dist/src/core/Icon/Icon.namespace-test.d.ts +0 -1
- package/dist/src/core/Icon/Icon.namespace-test.js +0 -7
- package/dist/src/core/Icon/index.d.ts +0 -14
- package/dist/src/core/Icon/index.js +0 -25
- package/dist/src/core/Icon/index.stories.d.ts +0 -34
- package/dist/src/core/Icon/index.stories.js +0 -171
- package/dist/src/core/Icon/map.d.ts +0 -98
- package/dist/src/core/Icon/map.js +0 -476
- package/dist/src/core/Icon/style.d.ts +0 -36
- package/dist/src/core/Icon/style.js +0 -42
- package/dist/src/core/InputCheckbox/InputCheckbox.namespace-test.d.ts +0 -1
- package/dist/src/core/InputCheckbox/InputCheckbox.namespace-test.js +0 -9
- package/dist/src/core/InputCheckbox/index.d.ts +0 -13
- package/dist/src/core/InputCheckbox/index.js +0 -55
- package/dist/src/core/InputCheckbox/index.stories.d.ts +0 -35
- package/dist/src/core/InputCheckbox/index.stories.js +0 -119
- package/dist/src/core/InputCheckbox/index.test.d.ts +0 -1
- package/dist/src/core/InputCheckbox/index.test.js +0 -62
- package/dist/src/core/InputCheckbox/styles.d.ts +0 -6
- package/dist/src/core/InputCheckbox/styles.js +0 -24
- package/dist/src/core/InputDropdown/InputDropdown.namespace-test.d.ts +0 -1
- package/dist/src/core/InputDropdown/InputDropdown.namespace-test.js +0 -8
- package/dist/src/core/InputDropdown/index.d.ts +0 -8
- package/dist/src/core/InputDropdown/index.js +0 -83
- package/dist/src/core/InputDropdown/index.stories.d.ts +0 -59
- package/dist/src/core/InputDropdown/index.stories.js +0 -264
- package/dist/src/core/InputDropdown/index.test.d.ts +0 -1
- package/dist/src/core/InputDropdown/index.test.js +0 -58
- package/dist/src/core/InputDropdown/style.d.ts +0 -38
- package/dist/src/core/InputDropdown/style.js +0 -130
- package/dist/src/core/InputRadio/InputRadio.namespace-test.d.ts +0 -1
- package/dist/src/core/InputRadio/InputRadio.namespace-test.js +0 -8
- package/dist/src/core/InputRadio/index.d.ts +0 -14
- package/dist/src/core/InputRadio/index.js +0 -40
- package/dist/src/core/InputRadio/index.stories.d.ts +0 -32
- package/dist/src/core/InputRadio/index.stories.js +0 -64
- package/dist/src/core/InputRadio/index.test.d.ts +0 -1
- package/dist/src/core/InputRadio/index.test.js +0 -92
- package/dist/src/core/InputRadio/style.d.ts +0 -6
- package/dist/src/core/InputRadio/style.js +0 -24
- package/dist/src/core/InputSearch/InputSearch.namespace-test.d.ts +0 -1
- package/dist/src/core/InputSearch/InputSearch.namespace-test.js +0 -8
- package/dist/src/core/InputSearch/index.d.ts +0 -16
- package/dist/src/core/InputSearch/index.js +0 -75
- package/dist/src/core/InputSearch/index.stories.d.ts +0 -35
- package/dist/src/core/InputSearch/index.stories.js +0 -104
- package/dist/src/core/InputSearch/index.test.d.ts +0 -1
- package/dist/src/core/InputSearch/index.test.js +0 -70
- package/dist/src/core/InputSearch/style.d.ts +0 -12
- package/dist/src/core/InputSearch/style.js +0 -47
- package/dist/src/core/InputSlider/InputSlider.namespace-test.d.ts +0 -1
- package/dist/src/core/InputSlider/InputSlider.namespace-test.js +0 -7
- package/dist/src/core/InputSlider/__snapshots__/index.test.js.snap +0 -124
- package/dist/src/core/InputSlider/index.d.ts +0 -8
- package/dist/src/core/InputSlider/index.js +0 -23
- package/dist/src/core/InputSlider/index.stories.d.ts +0 -43
- package/dist/src/core/InputSlider/index.stories.js +0 -160
- package/dist/src/core/InputSlider/index.test.d.ts +0 -1
- package/dist/src/core/InputSlider/index.test.js +0 -52
- package/dist/src/core/InputSlider/style.d.ts +0 -76
- package/dist/src/core/InputSlider/style.js +0 -34
- package/dist/src/core/InputText/InputText.namespace-test.d.ts +0 -1
- package/dist/src/core/InputText/InputText.namespace-test.js +0 -7
- package/dist/src/core/InputText/__snapshots__/index.test.js.snap +0 -10
- package/dist/src/core/InputText/index.d.ts +0 -14
- package/dist/src/core/InputText/index.js +0 -52
- package/dist/src/core/InputText/index.stories.d.ts +0 -29
- package/dist/src/core/InputText/index.stories.js +0 -100
- package/dist/src/core/InputText/index.test.d.ts +0 -1
- package/dist/src/core/InputText/index.test.js +0 -67
- package/dist/src/core/InputText/style.d.ts +0 -13
- package/dist/src/core/InputText/style.js +0 -45
- package/dist/src/core/InputToggle/InputToggle.namespace-test.d.ts +0 -1
- package/dist/src/core/InputToggle/InputToggle.namespace-test.js +0 -7
- package/dist/src/core/InputToggle/__snapshots__/index.test.js.snap +0 -26
- package/dist/src/core/InputToggle/index.d.ts +0 -7
- package/dist/src/core/InputToggle/index.js +0 -42
- package/dist/src/core/InputToggle/index.stories.d.ts +0 -20
- package/dist/src/core/InputToggle/index.stories.js +0 -63
- package/dist/src/core/InputToggle/index.test.d.ts +0 -1
- package/dist/src/core/InputToggle/index.test.js +0 -52
- package/dist/src/core/InputToggle/style.d.ts +0 -9
- package/dist/src/core/InputToggle/style.js +0 -38
- package/dist/src/core/Link/Link.namespace-test.d.ts +0 -1
- package/dist/src/core/Link/Link.namespace-test.js +0 -7
- package/dist/src/core/Link/index.d.ts +0 -8
- package/dist/src/core/Link/index.js +0 -28
- package/dist/src/core/Link/index.stories.d.ts +0 -27
- package/dist/src/core/Link/index.stories.js +0 -99
- package/dist/src/core/Link/style.d.ts +0 -9
- package/dist/src/core/Link/style.js +0 -30
- package/dist/src/core/List/List.namespace-test.d.ts +0 -1
- package/dist/src/core/List/List.namespace-test.js +0 -7
- package/dist/src/core/List/index.d.ts +0 -8
- package/dist/src/core/List/index.js +0 -23
- package/dist/src/core/List/index.stories.d.ts +0 -4
- package/dist/src/core/List/index.stories.js +0 -30
- package/dist/src/core/List/style.d.ts +0 -17
- package/dist/src/core/List/style.js +0 -33
- package/dist/src/core/ListItem/ListItem.namespace-test.d.ts +0 -1
- package/dist/src/core/ListItem/ListItem.namespace-test.js +0 -7
- package/dist/src/core/ListItem/index.d.ts +0 -9
- package/dist/src/core/ListItem/index.js +0 -24
- package/dist/src/core/ListItem/style.d.ts +0 -26
- package/dist/src/core/ListItem/style.js +0 -56
- package/dist/src/core/ListSubheader/ListSubheader.namespace-test.d.ts +0 -1
- package/dist/src/core/ListSubheader/ListSubheader.namespace-test.js +0 -7
- package/dist/src/core/ListSubheader/index.d.ts +0 -7
- package/dist/src/core/ListSubheader/index.js +0 -22
- package/dist/src/core/ListSubheader/style.d.ts +0 -12
- package/dist/src/core/ListSubheader/style.js +0 -16
- package/dist/src/core/LoadingIndicator/LoadingIndicator.namespace-test.d.ts +0 -1
- package/dist/src/core/LoadingIndicator/LoadingIndicator.namespace-test.js +0 -7
- package/dist/src/core/LoadingIndicator/index.d.ts +0 -4
- package/dist/src/core/LoadingIndicator/index.js +0 -13
- package/dist/src/core/LoadingIndicator/index.stories.d.ts +0 -24
- package/dist/src/core/LoadingIndicator/index.stories.js +0 -77
- package/dist/src/core/LoadingIndicator/index.test.d.ts +0 -1
- package/dist/src/core/LoadingIndicator/index.test.js +0 -41
- package/dist/src/core/LoadingIndicator/style.d.ts +0 -7
- package/dist/src/core/LoadingIndicator/style.js +0 -36
- package/dist/src/core/Menu/Menu.namespace-test.d.ts +0 -1
- package/dist/src/core/Menu/Menu.namespace-test.js +0 -8
- package/dist/src/core/Menu/index.d.ts +0 -7
- package/dist/src/core/Menu/index.js +0 -30
- package/dist/src/core/Menu/index.stories.d.ts +0 -17
- package/dist/src/core/Menu/index.stories.js +0 -55
- package/dist/src/core/Menu/style.d.ts +0 -1
- package/dist/src/core/Menu/style.js +0 -15
- package/dist/src/core/MenuItem/MenuItem.namespace-test.d.ts +0 -1
- package/dist/src/core/MenuItem/MenuItem.namespace-test.js +0 -8
- package/dist/src/core/MenuItem/index.d.ts +0 -21
- package/dist/src/core/MenuItem/index.js +0 -42
- package/dist/src/core/MenuItem/index.stories.d.ts +0 -35
- package/dist/src/core/MenuItem/index.stories.js +0 -188
- package/dist/src/core/MenuItem/index.test.d.ts +0 -1
- package/dist/src/core/MenuItem/index.test.js +0 -41
- package/dist/src/core/MenuItem/style.d.ts +0 -65
- package/dist/src/core/MenuItem/style.js +0 -58
- package/dist/src/core/MenuSelect/index.d.ts +0 -19
- package/dist/src/core/MenuSelect/index.js +0 -70
- package/dist/src/core/MenuSelect/index.stories.d.ts +0 -34
- package/dist/src/core/MenuSelect/index.stories.js +0 -154
- package/dist/src/core/MenuSelect/style.d.ts +0 -12
- package/dist/src/core/MenuSelect/style.js +0 -45
- package/dist/src/core/NavigationJumpTo/NavigationJumpTo.namespace-test.d.ts +0 -1
- package/dist/src/core/NavigationJumpTo/NavigationJumpTo.namespace-test.js +0 -13
- package/dist/src/core/NavigationJumpTo/__snapshots__/index.test.js.snap +0 -319
- package/dist/src/core/NavigationJumpTo/index.d.ts +0 -13
- package/dist/src/core/NavigationJumpTo/index.js +0 -122
- package/dist/src/core/NavigationJumpTo/index.stories.d.ts +0 -56
- package/dist/src/core/NavigationJumpTo/index.stories.js +0 -218
- package/dist/src/core/NavigationJumpTo/index.test.d.ts +0 -1
- package/dist/src/core/NavigationJumpTo/index.test.js +0 -87
- package/dist/src/core/NavigationJumpTo/style.d.ts +0 -106
- package/dist/src/core/NavigationJumpTo/style.js +0 -27
- package/dist/src/core/NavigationJumpTo/useIntersection.d.ts +0 -19
- package/dist/src/core/NavigationJumpTo/useIntersection.js +0 -67
- package/dist/src/core/Notification/Notification.namespace-test.d.ts +0 -1
- package/dist/src/core/Notification/Notification.namespace-test.js +0 -8
- package/dist/src/core/Notification/index.d.ts +0 -17
- package/dist/src/core/Notification/index.js +0 -70
- package/dist/src/core/Notification/index.stories.d.ts +0 -43
- package/dist/src/core/Notification/index.stories.js +0 -186
- package/dist/src/core/Notification/index.test.d.ts +0 -1
- package/dist/src/core/Notification/index.test.js +0 -115
- package/dist/src/core/Notification/style.d.ts +0 -1
- package/dist/src/core/Notification/style.js +0 -26
- package/dist/src/core/Pagination/Pagination.namespace-test.d.ts +0 -1
- package/dist/src/core/Pagination/Pagination.namespace-test.js +0 -8
- package/dist/src/core/Pagination/components/PageListDropdown/index.d.ts +0 -7
- package/dist/src/core/Pagination/components/PageListDropdown/index.js +0 -27
- package/dist/src/core/Pagination/components/PageListDropdown/style.d.ts +0 -1
- package/dist/src/core/Pagination/components/PageListDropdown/style.js +0 -14
- package/dist/src/core/Pagination/index.d.ts +0 -15
- package/dist/src/core/Pagination/index.js +0 -47
- package/dist/src/core/Pagination/index.stories.d.ts +0 -21
- package/dist/src/core/Pagination/index.stories.js +0 -99
- package/dist/src/core/Pagination/index.test.d.ts +0 -1
- package/dist/src/core/Pagination/index.test.js +0 -128
- package/dist/src/core/Pagination/style.d.ts +0 -13
- package/dist/src/core/Pagination/style.js +0 -62
- package/dist/src/core/Pagination/usePagination.d.ts +0 -9
- package/dist/src/core/Pagination/usePagination.js +0 -69
- package/dist/src/core/SegmentedControl/SegmentedControl.namespace-test.d.ts +0 -1
- package/dist/src/core/SegmentedControl/SegmentedControl.namespace-test.js +0 -12
- package/dist/src/core/SegmentedControl/index.d.ts +0 -15
- package/dist/src/core/SegmentedControl/index.js +0 -38
- package/dist/src/core/SegmentedControl/index.stories.d.ts +0 -49
- package/dist/src/core/SegmentedControl/index.stories.js +0 -128
- package/dist/src/core/SegmentedControl/index.test.d.ts +0 -1
- package/dist/src/core/SegmentedControl/index.test.js +0 -41
- package/dist/src/core/SegmentedControl/style.d.ts +0 -2
- package/dist/src/core/SegmentedControl/style.js +0 -23
- package/dist/src/core/Table/Table.namespace-test.d.ts +0 -1
- package/dist/src/core/Table/Table.namespace-test.js +0 -7
- package/dist/src/core/Table/components/common.d.ts +0 -6
- package/dist/src/core/Table/components/common.js +0 -5
- package/dist/src/core/Table/index.d.ts +0 -7
- package/dist/src/core/Table/index.js +0 -21
- package/dist/src/core/Table/index.stories.d.ts +0 -18
- package/dist/src/core/Table/index.stories.js +0 -64
- package/dist/src/core/Table/index.test.d.ts +0 -1
- package/dist/src/core/Table/index.test.js +0 -89
- package/dist/src/core/Table/style.d.ts +0 -2
- package/dist/src/core/Table/style.js +0 -10
- package/dist/src/core/TableHeader/TableHeader.namespace-test.d.ts +0 -1
- package/dist/src/core/TableHeader/TableHeader.namespace-test.js +0 -7
- package/dist/src/core/TableHeader/index.d.ts +0 -6
- package/dist/src/core/TableHeader/index.js +0 -25
- package/dist/src/core/TableHeader/index.stories.d.ts +0 -12
- package/dist/src/core/TableHeader/index.stories.js +0 -38
- package/dist/src/core/TableHeader/index.test.d.ts +0 -1
- package/dist/src/core/TableHeader/index.test.js +0 -41
- package/dist/src/core/TableHeader/style.d.ts +0 -2
- package/dist/src/core/TableHeader/style.js +0 -14
- package/dist/src/core/TableRow/TableRow.namespace-test.d.ts +0 -1
- package/dist/src/core/TableRow/TableRow.namespace-test.js +0 -7
- package/dist/src/core/TableRow/__snapshots__/index.test.js.snap +0 -100
- package/dist/src/core/TableRow/index.d.ts +0 -13
- package/dist/src/core/TableRow/index.js +0 -28
- package/dist/src/core/TableRow/index.stories.d.ts +0 -24
- package/dist/src/core/TableRow/index.stories.js +0 -77
- package/dist/src/core/TableRow/index.test.d.ts +0 -1
- package/dist/src/core/TableRow/index.test.js +0 -92
- package/dist/src/core/TableRow/style.d.ts +0 -10
- package/dist/src/core/TableRow/style.js +0 -34
- package/dist/src/core/Tabs/Tabs.namespace-test.d.ts +0 -1
- package/dist/src/core/Tabs/Tabs.namespace-test.js +0 -8
- package/dist/src/core/Tabs/__snapshots__/index.test.js.snap +0 -46
- package/dist/src/core/Tabs/components/LabelWithCount/index.d.ts +0 -7
- package/dist/src/core/Tabs/components/LabelWithCount/index.js +0 -11
- package/dist/src/core/Tabs/components/LabelWithCount/style.d.ts +0 -10
- package/dist/src/core/Tabs/components/LabelWithCount/style.js +0 -43
- package/dist/src/core/Tabs/components/common.d.ts +0 -5
- package/dist/src/core/Tabs/components/common.js +0 -5
- package/dist/src/core/Tabs/index.d.ts +0 -13
- package/dist/src/core/Tabs/index.js +0 -89
- package/dist/src/core/Tabs/index.stories.d.ts +0 -38
- package/dist/src/core/Tabs/index.stories.js +0 -154
- package/dist/src/core/Tabs/index.test.d.ts +0 -1
- package/dist/src/core/Tabs/index.test.js +0 -48
- package/dist/src/core/Tabs/style.d.ts +0 -115
- package/dist/src/core/Tabs/style.js +0 -53
- package/dist/src/core/Tag/Tag.namespace-test.d.ts +0 -1
- package/dist/src/core/Tag/Tag.namespace-test.js +0 -7
- package/dist/src/core/Tag/index.d.ts +0 -17
- package/dist/src/core/Tag/index.js +0 -27
- package/dist/src/core/Tag/index.stories.d.ts +0 -98
- package/dist/src/core/Tag/index.stories.js +0 -238
- package/dist/src/core/Tag/index.test.d.ts +0 -1
- package/dist/src/core/Tag/index.test.js +0 -40
- package/dist/src/core/Tag/index.testUtils.d.ts +0 -8
- package/dist/src/core/Tag/index.testUtils.js +0 -108
- package/dist/src/core/Tag/style.d.ts +0 -29
- package/dist/src/core/Tag/style.js +0 -100
- package/dist/src/core/TagFilter/TagFilter.namespace-test.d.ts +0 -1
- package/dist/src/core/TagFilter/TagFilter.namespace-test.js +0 -8
- package/dist/src/core/TagFilter/__snapshots__/index.test.js.snap +0 -46
- package/dist/src/core/TagFilter/index.d.ts +0 -12
- package/dist/src/core/TagFilter/index.js +0 -23
- package/dist/src/core/TagFilter/index.stories.d.ts +0 -44
- package/dist/src/core/TagFilter/index.stories.js +0 -121
- package/dist/src/core/TagFilter/index.test.d.ts +0 -1
- package/dist/src/core/TagFilter/index.test.js +0 -40
- package/dist/src/core/TagFilter/style.d.ts +0 -7
- package/dist/src/core/TagFilter/style.js +0 -19
- package/dist/src/core/Tooltip/Tooltip.namespace-test.d.ts +0 -1
- package/dist/src/core/Tooltip/Tooltip.namespace-test.js +0 -7
- package/dist/src/core/Tooltip/index.d.ts +0 -14
- package/dist/src/core/Tooltip/index.js +0 -87
- package/dist/src/core/Tooltip/index.stories.d.ts +0 -48
- package/dist/src/core/Tooltip/index.stories.js +0 -257
- package/dist/src/core/Tooltip/index.test.d.ts +0 -1
- package/dist/src/core/Tooltip/index.test.js +0 -102
- package/dist/src/core/Tooltip/style.d.ts +0 -23
- package/dist/src/core/Tooltip/style.js +0 -47
- package/dist/src/core/TooltipCondensed/TooltipCondensed.namespace-test.d.ts +0 -1
- package/dist/src/core/TooltipCondensed/TooltipCondensed.namespace-test.js +0 -7
- package/dist/src/core/TooltipCondensed/index.d.ts +0 -13
- package/dist/src/core/TooltipCondensed/index.js +0 -43
- package/dist/src/core/TooltipCondensed/index.stories.d.ts +0 -27
- package/dist/src/core/TooltipCondensed/index.stories.js +0 -72
- package/dist/src/core/TooltipCondensed/index.test.d.ts +0 -1
- package/dist/src/core/TooltipCondensed/index.test.js +0 -85
- package/dist/src/core/TooltipCondensed/style.d.ts +0 -6
- package/dist/src/core/TooltipCondensed/style.js +0 -22
- package/dist/src/core/TooltipTable/TooltipTable.namespace-test.d.ts +0 -1
- package/dist/src/core/TooltipTable/TooltipTable.namespace-test.js +0 -23
- package/dist/src/core/TooltipTable/__snapshots__/index.test.js.snap +0 -272
- package/dist/src/core/TooltipTable/index.d.ts +0 -8
- package/dist/src/core/TooltipTable/index.js +0 -35
- package/dist/src/core/TooltipTable/index.stories.d.ts +0 -32
- package/dist/src/core/TooltipTable/index.stories.js +0 -128
- package/dist/src/core/TooltipTable/index.test.d.ts +0 -1
- package/dist/src/core/TooltipTable/index.test.js +0 -109
- package/dist/src/core/TooltipTable/style.d.ts +0 -25
- package/dist/src/core/TooltipTable/style.js +0 -46
- package/dist/src/core/styles/common/constants/black.d.ts +0 -3
- package/dist/src/core/styles/common/constants/black.js +0 -7
- package/dist/src/core/styles/common/constants/boxShadows.d.ts +0 -5
- package/dist/src/core/styles/common/constants/boxShadows.js +0 -9
- package/dist/src/core/styles/common/constants/fontWeights.d.ts +0 -7
- package/dist/src/core/styles/common/constants/fontWeights.js +0 -11
- package/dist/src/core/styles/common/constants/gray.d.ts +0 -8
- package/dist/src/core/styles/common/constants/gray.js +0 -12
- package/dist/src/core/styles/common/constants/spaces.d.ts +0 -11
- package/dist/src/core/styles/common/constants/spaces.js +0 -15
- package/dist/src/core/styles/common/constants/white.d.ts +0 -3
- package/dist/src/core/styles/common/constants/white.js +0 -7
- package/dist/src/core/styles/common/defaultTheme.d.ts +0 -129
- package/dist/src/core/styles/common/defaultTheme.js +0 -414
- package/dist/src/core/styles/common/mixins/fonts.d.ts +0 -27
- package/dist/src/core/styles/common/mixins/fonts.js +0 -60
- package/dist/src/core/styles/common/selectors/theme.d.ts +0 -15
- package/dist/src/core/styles/common/selectors/theme.js +0 -63
- package/dist/src/core/styles/index.d.ts +0 -3
- package/dist/src/core/styles/index.js +0 -19
- package/dist/src/index.d.ts +0 -100
- package/dist/src/index.js +0 -170
- package/dist/tsconfig-namespace-check.tsbuildinfo +0 -1
|
@@ -1,239 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
-
var t = {};
|
|
15
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
-
t[p] = s[p];
|
|
17
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
-
t[p[i]] = s[p[i]];
|
|
21
|
-
}
|
|
22
|
-
return t;
|
|
23
|
-
};
|
|
24
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
-
};
|
|
27
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
exports.Test = exports.ScreenshotTest = exports.LivePreview = exports.Default = void 0;
|
|
29
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
30
|
-
var react_1 = __importDefault(require("react"));
|
|
31
|
-
var styles_1 = require("../styles");
|
|
32
|
-
var index_1 = __importDefault(require("./index"));
|
|
33
|
-
var SDS_TYPES = ["primary", "secondary", "tertiary"];
|
|
34
|
-
var SDS_SIZES = ["large", "medium", "small"];
|
|
35
|
-
var ON_OPTIONS = [false, true];
|
|
36
|
-
var DISABLED_OPTIONS = [false, true];
|
|
37
|
-
var PSEUDO_STATES = ["default", "hover", "active", "focus"];
|
|
38
|
-
var ButtonIcon = function (props) {
|
|
39
|
-
var sdsIcon = props.sdsIcon, rest = __rest(props, ["sdsIcon"]);
|
|
40
|
-
var _a = react_1.default.useState(false), on = _a[0], setOn = _a[1];
|
|
41
|
-
var handleButtonClick = function () { return setOn(!on); };
|
|
42
|
-
return ((0, jsx_runtime_1.jsx)(index_1.default, __assign({ onClick: handleButtonClick, on: on, sdsIcon: sdsIcon, sdsSize: "medium", sdsType: "primary" }, rest)));
|
|
43
|
-
};
|
|
44
|
-
exports.default = {
|
|
45
|
-
argTypes: {
|
|
46
|
-
disabled: {
|
|
47
|
-
control: {
|
|
48
|
-
type: "boolean",
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
on: {
|
|
52
|
-
control: {
|
|
53
|
-
type: "boolean",
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
sdsIcon: {
|
|
57
|
-
control: {
|
|
58
|
-
type: "select",
|
|
59
|
-
},
|
|
60
|
-
options: [
|
|
61
|
-
"dotsHorizontal",
|
|
62
|
-
"copy",
|
|
63
|
-
"download",
|
|
64
|
-
"people",
|
|
65
|
-
"treeHorizontal",
|
|
66
|
-
"grid",
|
|
67
|
-
"virus",
|
|
68
|
-
"xMark",
|
|
69
|
-
],
|
|
70
|
-
},
|
|
71
|
-
sdsSize: {
|
|
72
|
-
control: {
|
|
73
|
-
type: "select",
|
|
74
|
-
},
|
|
75
|
-
options: ["small", "medium", "large"],
|
|
76
|
-
},
|
|
77
|
-
sdsType: {
|
|
78
|
-
control: {
|
|
79
|
-
type: "select",
|
|
80
|
-
},
|
|
81
|
-
options: ["primary", "secondary", "tertiary"],
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
component: ButtonIcon,
|
|
85
|
-
title: "ButtonIcon",
|
|
86
|
-
};
|
|
87
|
-
// Default
|
|
88
|
-
exports.Default = {
|
|
89
|
-
args: {
|
|
90
|
-
"aria-label": "info",
|
|
91
|
-
disabled: false,
|
|
92
|
-
sdsIcon: "dotsHorizontal",
|
|
93
|
-
sdsSize: "large",
|
|
94
|
-
sdsType: "primary",
|
|
95
|
-
},
|
|
96
|
-
};
|
|
97
|
-
// Live Preview
|
|
98
|
-
var LivePreviewDemo = function () {
|
|
99
|
-
var spacings = styles_1.defaultAppTheme === null || styles_1.defaultAppTheme === void 0 ? void 0 : styles_1.defaultAppTheme.spacing;
|
|
100
|
-
var livePreviewStyles = {
|
|
101
|
-
alignItems: "center",
|
|
102
|
-
display: "grid",
|
|
103
|
-
gridColumnGap: "24px",
|
|
104
|
-
gridTemplateColumns: "repeat(7, min-content)",
|
|
105
|
-
};
|
|
106
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: livePreviewStyles, children: [(0, jsx_runtime_1.jsxs)("div", { style: { display: "flex" }, children: [(0, jsx_runtime_1.jsx)(ButtonIcon, { "aria-label": "grid", style: { marginRight: spacings === null || spacings === void 0 ? void 0 : spacings.xxs }, sdsIcon: "grid", sdsSize: "large", sdsType: "primary" }), (0, jsx_runtime_1.jsx)(ButtonIcon, { "aria-label": "grid", style: { marginRight: spacings === null || spacings === void 0 ? void 0 : spacings.xxs }, sdsIcon: "grid", sdsSize: "large", sdsType: "primary" })] }), (0, jsx_runtime_1.jsxs)("div", { style: { display: "flex" }, children: [(0, jsx_runtime_1.jsx)(ButtonIcon, { "aria-label": "infoSpeechBubble", style: { marginRight: spacings === null || spacings === void 0 ? void 0 : spacings.m }, sdsIcon: "infoSpeechBubble", sdsSize: "large", sdsType: "secondary" }), (0, jsx_runtime_1.jsx)(ButtonIcon, { "aria-label": "infoSpeechBubble", style: { marginRight: spacings === null || spacings === void 0 ? void 0 : spacings.m }, sdsIcon: "infoSpeechBubble", sdsSize: "large", sdsType: "secondary" })] }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(ButtonIcon, { "aria-label": "xMark", style: { marginRight: spacings === null || spacings === void 0 ? void 0 : spacings.m }, sdsIcon: "xMark", sdsSize: "large", sdsType: "tertiary" }) }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(ButtonIcon, { "aria-label": "xMark", style: { marginRight: spacings === null || spacings === void 0 ? void 0 : spacings.m }, sdsIcon: "xMark", sdsSize: "medium", sdsType: "tertiary" }) }), (0, jsx_runtime_1.jsxs)("div", { style: { display: "flex" }, children: [(0, jsx_runtime_1.jsx)(ButtonIcon, { "aria-label": "barChartVertical3", style: { marginRight: spacings === null || spacings === void 0 ? void 0 : spacings.s }, sdsIcon: "barChartVertical3", sdsSize: "small", sdsType: "primary" }), (0, jsx_runtime_1.jsx)(ButtonIcon, { "aria-label": "barChartVertical3", style: { marginRight: spacings === null || spacings === void 0 ? void 0 : spacings.s }, sdsIcon: "barChartVertical3", sdsSize: "small", sdsType: "primary" })] }), (0, jsx_runtime_1.jsxs)("div", { style: { display: "flex" }, children: [(0, jsx_runtime_1.jsx)(ButtonIcon, { "aria-label": "plusCircle", style: { marginRight: spacings === null || spacings === void 0 ? void 0 : spacings.s }, sdsIcon: "plusCircle", sdsSize: "small", sdsType: "secondary" }), (0, jsx_runtime_1.jsx)(ButtonIcon, { "aria-label": "plusCircle", style: { marginRight: spacings === null || spacings === void 0 ? void 0 : spacings.s }, sdsIcon: "plusCircle", sdsSize: "small", sdsType: "secondary" })] }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(ButtonIcon, { "aria-label": "xMark", style: { marginRight: spacings === null || spacings === void 0 ? void 0 : spacings.s }, sdsIcon: "xMark", sdsSize: "small", sdsType: "tertiary" }) })] }));
|
|
107
|
-
};
|
|
108
|
-
exports.LivePreview = {
|
|
109
|
-
parameters: {
|
|
110
|
-
snapshot: {
|
|
111
|
-
skip: true,
|
|
112
|
-
},
|
|
113
|
-
},
|
|
114
|
-
render: function (args) { return (0, jsx_runtime_1.jsx)(LivePreviewDemo, __assign({}, args)); },
|
|
115
|
-
};
|
|
116
|
-
// Screenshot test
|
|
117
|
-
var ScreenshotTestDemo = function () {
|
|
118
|
-
var DISPLAY_CONTENTS = {
|
|
119
|
-
display: "contents",
|
|
120
|
-
};
|
|
121
|
-
var MID_LABEL = {
|
|
122
|
-
borderStyle: "solid none none none",
|
|
123
|
-
gridColumn: "1 / 6",
|
|
124
|
-
justifySelf: "stretch",
|
|
125
|
-
paddingTop: 10,
|
|
126
|
-
};
|
|
127
|
-
// loop through all SDS_TYPES
|
|
128
|
-
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: SDS_TYPES.map(function (sdsType) {
|
|
129
|
-
return (0, jsx_runtime_1.jsx)(ButtonIconTypeOption, { sdsType: sdsType }, sdsType);
|
|
130
|
-
}) }));
|
|
131
|
-
// loop through all SDS_SIZES + create headers for SDS_TYPES
|
|
132
|
-
function ButtonIconTypeOption(_a) {
|
|
133
|
-
var sdsType = _a.sdsType;
|
|
134
|
-
var LEVEL_STYLE = {
|
|
135
|
-
columnGap: "20px",
|
|
136
|
-
display: "inline-grid",
|
|
137
|
-
fontFamily: "sans-serif",
|
|
138
|
-
marginRight: "50px",
|
|
139
|
-
};
|
|
140
|
-
var LABEL_STYLE = {
|
|
141
|
-
fontSize: "2em",
|
|
142
|
-
gridColumn: "1 / 6",
|
|
143
|
-
marginBottom: 0,
|
|
144
|
-
};
|
|
145
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: LEVEL_STYLE, children: [(0, jsx_runtime_1.jsxs)("p", { style: LABEL_STYLE, children: ["Type: ", (0, jsx_runtime_1.jsx)("b", { children: sdsType })] }), SDS_SIZES.map(function (sdsSize) {
|
|
146
|
-
// primary and secondary types don't have medium size
|
|
147
|
-
if ((sdsType === "primary" || sdsType === "secondary") &&
|
|
148
|
-
sdsSize === "medium") {
|
|
149
|
-
return null;
|
|
150
|
-
}
|
|
151
|
-
return ((0, jsx_runtime_1.jsx)(ButtonIconSizeOption, { sdsType: sdsType, sdsSize: sdsSize }, sdsSize));
|
|
152
|
-
})] }));
|
|
153
|
-
}
|
|
154
|
-
// loop through all ON_OPTIONS + create headers for SDS_SIZES
|
|
155
|
-
function ButtonIconSizeOption(_a) {
|
|
156
|
-
var sdsType = _a.sdsType, sdsSize = _a.sdsSize;
|
|
157
|
-
// establish which combinations have `on` as a prop (used below and passed to next loop)
|
|
158
|
-
var ON_LABEL_NEEDED = (sdsType === "primary" && sdsSize === "large") ||
|
|
159
|
-
(sdsType === "secondary" && sdsSize === "small");
|
|
160
|
-
var LABEL_STYLE = __assign(__assign({}, MID_LABEL), { borderWidth: "2px", fontSize: "1.17em", margin: "20px 0" });
|
|
161
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: DISPLAY_CONTENTS, children: [(0, jsx_runtime_1.jsxs)("p", { style: LABEL_STYLE, children: ["Size: ", (0, jsx_runtime_1.jsx)("b", { children: sdsSize })] }), ON_OPTIONS.map(function (on) {
|
|
162
|
-
return (
|
|
163
|
-
// for the combinations with `on` as a prop, loop through all values for `on`(true, false)
|
|
164
|
-
// for the combinations without `on` as a prop, loop through only once
|
|
165
|
-
(ON_LABEL_NEEDED ||
|
|
166
|
-
((sdsType === "tertiary" ||
|
|
167
|
-
(sdsType === "primary" && sdsSize === "small") ||
|
|
168
|
-
(sdsType === "secondary" && sdsSize === "large")) &&
|
|
169
|
-
on === false)) && ((0, jsx_runtime_1.jsx)(ButtonIconOnOption, { sdsType: sdsType, sdsSize: sdsSize, on: on, onLabelNeeded: ON_LABEL_NEEDED }, String(on))));
|
|
170
|
-
})] }));
|
|
171
|
-
}
|
|
172
|
-
// loop through all DISABLED_OPTIONS + create headers for ON_OPTIONS
|
|
173
|
-
function ButtonIconOnOption(_a) {
|
|
174
|
-
var sdsType = _a.sdsType, sdsSize = _a.sdsSize, on = _a.on, onLabelNeeded = _a.onLabelNeeded;
|
|
175
|
-
var LABEL_STYLE = __assign(__assign({}, MID_LABEL), { alignSelf: "end", borderWidth: "1px", fontSize: "0.83em", fontWeight: "normal", margin: "0 0 5px 0" });
|
|
176
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: DISPLAY_CONTENTS, children: [onLabelNeeded && ((0, jsx_runtime_1.jsxs)("p", { style: LABEL_STYLE, children: ["On: ", (0, jsx_runtime_1.jsx)("b", { children: on ? "true" : "false" })] })), DISABLED_OPTIONS.map(function (disabled) {
|
|
177
|
-
return ((0, jsx_runtime_1.jsx)(ButtonIconDisabledOption, { sdsType: sdsType, sdsSize: sdsSize, on: on, disabled: disabled }, String(disabled)));
|
|
178
|
-
})] }));
|
|
179
|
-
}
|
|
180
|
-
// loop through all PSEUDO_STATES + create headers for DISABLED_OPTIONS, PSEUDO_STATES
|
|
181
|
-
function ButtonIconDisabledOption(_a) {
|
|
182
|
-
var sdsType = _a.sdsType, sdsSize = _a.sdsSize, on = _a.on, disabled = _a.disabled;
|
|
183
|
-
var SDS_ICONS = {
|
|
184
|
-
primary: {
|
|
185
|
-
large: "grid",
|
|
186
|
-
small: "barChartVertical3",
|
|
187
|
-
},
|
|
188
|
-
secondary: {
|
|
189
|
-
large: "infoSpeechBubble",
|
|
190
|
-
small: "plusCircle",
|
|
191
|
-
},
|
|
192
|
-
tertiary: {
|
|
193
|
-
large: "xMark",
|
|
194
|
-
medium: "xMark",
|
|
195
|
-
small: "xMark",
|
|
196
|
-
},
|
|
197
|
-
};
|
|
198
|
-
var DISABLED_LEVEL = {
|
|
199
|
-
display: "contents",
|
|
200
|
-
};
|
|
201
|
-
var PSEUDO_STATE_LEVEL = {
|
|
202
|
-
marginBottom: 10,
|
|
203
|
-
};
|
|
204
|
-
var PSEUDO_STATE_LABEL = {
|
|
205
|
-
fontSize: "0.67em",
|
|
206
|
-
margin: "10px 0",
|
|
207
|
-
};
|
|
208
|
-
return ((0, jsx_runtime_1.jsx)("div", { style: DISABLED_LEVEL, children: PSEUDO_STATES.map(function (state) {
|
|
209
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
210
|
-
// @ts-ignore: invalid `sdsIcon` is skipped in <ButtonIconTypeOption />
|
|
211
|
-
var sdsIcon = SDS_ICONS[sdsType][sdsSize];
|
|
212
|
-
return ((0, jsx_runtime_1.jsx)("div", { style: PSEUDO_STATE_LEVEL, children: (disabled === false ||
|
|
213
|
-
(disabled === true && state === "default")) && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("p", { style: PSEUDO_STATE_LABEL, children: [disabled === false ? "State: " : "Disabled: ", (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("b", { children: disabled === false ? state : "true" })] }), (0, jsx_runtime_1.jsx)(ButtonIcon, { "aria-label": sdsIcon, sdsIcon: sdsIcon, "data-testid": "button-icon", sdsType: sdsType, sdsSize: sdsSize, on: on, disabled: disabled, className: "pseudo-".concat(state) }, state)] })) }, "div-".concat(state)));
|
|
214
|
-
}) }));
|
|
215
|
-
}
|
|
216
|
-
// }, // close render
|
|
217
|
-
}; // close ScreenshotTest
|
|
218
|
-
exports.ScreenshotTest = {
|
|
219
|
-
parameters: {
|
|
220
|
-
controls: {
|
|
221
|
-
exclude: ["disabled", "on", "sdsIcon", "sdsSize", "sdsType"],
|
|
222
|
-
},
|
|
223
|
-
snapshot: {
|
|
224
|
-
skip: true,
|
|
225
|
-
},
|
|
226
|
-
},
|
|
227
|
-
render: function (args) { return (0, jsx_runtime_1.jsx)(ScreenshotTestDemo, __assign({}, args)); },
|
|
228
|
-
};
|
|
229
|
-
// Test
|
|
230
|
-
exports.Test = {
|
|
231
|
-
parameters: {
|
|
232
|
-
snapshot: {
|
|
233
|
-
skip: true,
|
|
234
|
-
},
|
|
235
|
-
},
|
|
236
|
-
render: function () {
|
|
237
|
-
return ((0, jsx_runtime_1.jsx)(index_1.default, { "aria-label": "dotsHorizontal", "data-testid": "iconButton", on: true, sdsIcon: "dotsHorizontal", sdsSize: "medium", sdsType: "primary" }));
|
|
238
|
-
},
|
|
239
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,41 +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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
27
|
-
var story_utils_1 = require("@chanzuckerberg/story-utils");
|
|
28
|
-
var react_1 = require("@storybook/react");
|
|
29
|
-
var react_2 = require("@testing-library/react");
|
|
30
|
-
var snapshotTestStoryFile = __importStar(require("./index.stories"));
|
|
31
|
-
var index_stories_1 = __importStar(require("./index.stories"));
|
|
32
|
-
// Returns a component that already contain all decorators from story level, meta level and global level.
|
|
33
|
-
var Test = (0, react_1.composeStory)(index_stories_1.Test, index_stories_1.default);
|
|
34
|
-
describe("<ButtonIcon />", function () {
|
|
35
|
-
(0, story_utils_1.generateSnapshots)(snapshotTestStoryFile);
|
|
36
|
-
it("renders ButtonIcon component", function () {
|
|
37
|
-
(0, react_2.render)((0, jsx_runtime_1.jsx)(Test, {}));
|
|
38
|
-
var elements = react_2.screen.getAllByTestId("iconButton");
|
|
39
|
-
expect(elements.length).toBeTruthy();
|
|
40
|
-
});
|
|
41
|
-
});
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { CommonThemeProps } from "../styles";
|
|
3
|
-
export interface ButtonIconSizeToTypes {
|
|
4
|
-
small: "primary" | "secondary" | "tertiary";
|
|
5
|
-
medium: "tertiary";
|
|
6
|
-
large: "primary" | "secondary" | "tertiary";
|
|
7
|
-
}
|
|
8
|
-
export interface ButtonIconExtraProps<ButtonIconSize extends keyof ButtonIconSizeToTypes> extends CommonThemeProps {
|
|
9
|
-
on?: boolean;
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
sdsSize?: ButtonIconSize;
|
|
12
|
-
sdsType?: ButtonIconSizeToTypes[ButtonIconSize];
|
|
13
|
-
}
|
|
14
|
-
export declare const StyledButtonIcon: import("@emotion/styled").StyledComponent<{
|
|
15
|
-
children?: import("react").ReactNode;
|
|
16
|
-
classes?: Partial<import("@mui/material").IconButtonClasses> | undefined;
|
|
17
|
-
color?: import("@mui/types").OverridableStringUnion<"inherit" | "primary" | "secondary" | "default" | "error" | "info" | "success" | "warning", import("@mui/material").IconButtonPropsColorOverrides> | undefined;
|
|
18
|
-
disabled?: boolean | undefined;
|
|
19
|
-
disableFocusRipple?: boolean | undefined;
|
|
20
|
-
edge?: false | "end" | "start" | undefined;
|
|
21
|
-
size?: import("@mui/types").OverridableStringUnion<"small" | "medium" | "large", import("@mui/material").IconButtonPropsSizeOverrides> | undefined;
|
|
22
|
-
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
23
|
-
} & Omit<{
|
|
24
|
-
action?: import("react").Ref<import("@mui/material").ButtonBaseActions> | undefined;
|
|
25
|
-
centerRipple?: boolean | undefined;
|
|
26
|
-
children?: import("react").ReactNode;
|
|
27
|
-
classes?: Partial<import("@mui/material").ButtonBaseClasses> | undefined;
|
|
28
|
-
disabled?: boolean | undefined;
|
|
29
|
-
disableRipple?: boolean | undefined;
|
|
30
|
-
disableTouchRipple?: boolean | undefined;
|
|
31
|
-
focusRipple?: boolean | undefined;
|
|
32
|
-
focusVisibleClassName?: string | undefined;
|
|
33
|
-
LinkComponent?: import("react").ElementType<any> | undefined;
|
|
34
|
-
onFocusVisible?: import("react").FocusEventHandler<any> | undefined;
|
|
35
|
-
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
36
|
-
tabIndex?: number | undefined;
|
|
37
|
-
TouchRippleProps?: Partial<import("@mui/material/ButtonBase/TouchRipple").TouchRippleProps> | undefined;
|
|
38
|
-
touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
|
|
39
|
-
}, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "key" | keyof import("react").ButtonHTMLAttributes<HTMLButtonElement>> & {
|
|
40
|
-
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
41
|
-
}, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "color" | "disabled" | "tabIndex" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "size" | "edge"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & ButtonIconExtraProps<keyof ButtonIconSizeToTypes>, {}, {}>;
|
|
@@ -1,68 +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.StyledButtonIcon = 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 warnings_1 = require("src/common/warnings");
|
|
12
|
-
var styles_2 = require("../styles");
|
|
13
|
-
var isOn = function (props) {
|
|
14
|
-
var sdsType = props.sdsType;
|
|
15
|
-
var colors = (0, styles_2.getColors)(props);
|
|
16
|
-
return (0, react_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n "], ["\n ", "\n "])), sdsType !== "tertiary" &&
|
|
17
|
-
"\n color: ".concat(sdsType === "primary" ? colors === null || colors === void 0 ? void 0 : colors.primary[600] : colors === null || colors === void 0 ? void 0 : colors.primary[400], ";\n\n &:hover {\n color: ").concat(colors === null || colors === void 0 ? void 0 : colors.primary[600], ";\n }\n "));
|
|
18
|
-
};
|
|
19
|
-
var isDisabled = function (props) {
|
|
20
|
-
var colors = (0, styles_2.getColors)(props);
|
|
21
|
-
return (0, react_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n color: ", ";\n "], ["\n color: ", ";\n "])), colors === null || colors === void 0 ? void 0 : colors.gray[300]);
|
|
22
|
-
};
|
|
23
|
-
var primary = function (props) {
|
|
24
|
-
var colors = (0, styles_2.getColors)(props);
|
|
25
|
-
var sdsSize = props.sdsSize;
|
|
26
|
-
return (0, react_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n color: ", ";\n\n &:hover {\n background: ", ";\n color: ", ";\n }\n\n &:active {\n color: ", ";\n }\n "], ["\n color: ", ";\n\n &:hover {\n background: ", ";\n color: ", ";\n }\n\n &:active {\n color: ", ";\n }\n "])), colors === null || colors === void 0 ? void 0 : colors.primary[400], colors === null || colors === void 0 ? void 0 : colors.gray[200], sdsSize === "small"
|
|
27
|
-
? colors === null || colors === void 0 ? void 0 : colors.primary[600]
|
|
28
|
-
: colors === null || colors === void 0 ? void 0 : colors.primary[400], colors === null || colors === void 0 ? void 0 : colors.primary[600]);
|
|
29
|
-
};
|
|
30
|
-
var secondary = function (props) {
|
|
31
|
-
var colors = (0, styles_2.getColors)(props);
|
|
32
|
-
return (0, react_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n color: ", ";\n\n &:hover,\n &:active {\n background: none;\n color: ", ";\n }\n "], ["\n color: ", ";\n\n &:hover,\n &:active {\n background: none;\n color: ", ";\n }\n "])), colors === null || colors === void 0 ? void 0 : colors.gray[500], colors === null || colors === void 0 ? void 0 : colors.primary[400]);
|
|
33
|
-
};
|
|
34
|
-
var tertiary = function (props) {
|
|
35
|
-
var colors = (0, styles_2.getColors)(props);
|
|
36
|
-
return (0, react_1.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n color: ", ";\n\n &:hover {\n background: none;\n color: black;\n }\n\n &:active {\n color: black;\n }\n "], ["\n color: ", ";\n\n &:hover {\n background: none;\n color: black;\n }\n\n &:active {\n color: black;\n }\n "])), colors === null || colors === void 0 ? void 0 : colors.gray[500]);
|
|
37
|
-
};
|
|
38
|
-
var small = function (props) {
|
|
39
|
-
var iconSizes = (0, styles_2.getIconSizes)(props);
|
|
40
|
-
return (0, react_1.css)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n &:hover {\n background: none;\n }\n\n .MuiSvgIcon-root {\n height: ", "px;\n width: ", "px;\n }\n "], ["\n &:hover {\n background: none;\n }\n\n .MuiSvgIcon-root {\n height: ", "px;\n width: ", "px;\n }\n "])), iconSizes === null || iconSizes === void 0 ? void 0 : iconSizes.s.height, iconSizes === null || iconSizes === void 0 ? void 0 : iconSizes.s.width);
|
|
41
|
-
};
|
|
42
|
-
var medium = function (props) {
|
|
43
|
-
var sdsType = props.sdsType;
|
|
44
|
-
var iconSizes = (0, styles_2.getIconSizes)(props);
|
|
45
|
-
if (sdsType === "primary" || sdsType === "secondary") {
|
|
46
|
-
(0, warnings_1.showWarningIfFirstOccurence)(warnings_1.SDSWarningTypes.ButtonIconMediumSize);
|
|
47
|
-
}
|
|
48
|
-
return (0, react_1.css)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n &:hover {\n background: none;\n }\n\n .MuiSvgIcon-root {\n height: ", "px;\n width: ", "px;\n }\n "], ["\n &:hover {\n background: none;\n }\n\n .MuiSvgIcon-root {\n height: ", "px;\n width: ", "px;\n }\n "])), iconSizes === null || iconSizes === void 0 ? void 0 : iconSizes.l.height, iconSizes === null || iconSizes === void 0 ? void 0 : iconSizes.l.width);
|
|
49
|
-
};
|
|
50
|
-
var large = function (props) {
|
|
51
|
-
var sdsType = props.sdsType;
|
|
52
|
-
var iconSizes = (0, styles_2.getIconSizes)(props);
|
|
53
|
-
return (0, react_1.css)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n .MuiSvgIcon-root {\n height: ", "px;\n width: ", "px;\n ", "\n }\n "], ["\n .MuiSvgIcon-root {\n height: ", "px;\n width: ", "px;\n ", "\n }\n "])), iconSizes === null || iconSizes === void 0 ? void 0 : iconSizes.xl.height, iconSizes === null || iconSizes === void 0 ? void 0 : iconSizes.xl.height, sdsType === "primary" ? "margin: 5px;" : "");
|
|
54
|
-
};
|
|
55
|
-
var doNotForwardProps = [
|
|
56
|
-
"on",
|
|
57
|
-
"sdsSize",
|
|
58
|
-
"sdsType",
|
|
59
|
-
"sdsIcon",
|
|
60
|
-
"sdsIconProps",
|
|
61
|
-
];
|
|
62
|
-
exports.StyledButtonIcon = (0, styles_1.styled)(material_1.IconButton, {
|
|
63
|
-
shouldForwardProp: function (prop) { return !doNotForwardProps.includes(prop); },
|
|
64
|
-
})(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n padding: 0;\n\n :focus-visible {\n outline: 5px auto Highlight;\n outline: 5px auto -webkit-focus-ring-color;\n }\n\n ", "\n"], ["\n padding: 0;\n\n :focus-visible {\n outline: 5px auto Highlight;\n outline: 5px auto -webkit-focus-ring-color;\n }\n\n ", "\n"])), function (props) {
|
|
65
|
-
var on = props.on, disabled = props.disabled, sdsSize = props.sdsSize, sdsType = props.sdsType;
|
|
66
|
-
return (0, react_1.css)(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n "], ["\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n "])), sdsType === "primary" && primary(props), sdsType === "secondary" && secondary(props), sdsType === "tertiary" && tertiary(props), on && isOn(props), disabled && isDisabled(props), sdsSize === "small" && small(props), sdsSize === "medium" && medium(props), sdsSize === "large" && large(props));
|
|
67
|
-
});
|
|
68
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10;
|
|
@@ -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 CalloutNameSpaceTest = function (props) {
|
|
17
|
-
return ((0, jsx_runtime_1.jsxs)(components_1.Callout, __assign({}, props, { autoDismiss: true, intent: "info", dismissed: true, children: [(0, jsx_runtime_1.jsx)(components_1.CalloutTitle, { children: "Title" }), "This is a callout!"] })));
|
|
18
|
-
};
|
|
@@ -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 CalloutTitle = function (_a) {
|
|
6
|
-
var children = _a.children;
|
|
7
|
-
return (0, jsx_runtime_1.jsx)(style_1.StyledCalloutTitle, { children: children });
|
|
8
|
-
};
|
|
9
|
-
exports.default = CalloutTitle;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const StyledCalloutTitle: import("@emotion/styled").StyledComponent<import("@mui/material").AlertTitleProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & import("src/core/styles").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.StyledCalloutTitle = void 0;
|
|
8
|
-
var material_1 = require("@mui/material");
|
|
9
|
-
var styles_1 = require("@mui/material/styles");
|
|
10
|
-
var styles_2 = require("src/core/styles");
|
|
11
|
-
var fontBodyXs = (0, styles_2.fontBody)("xs");
|
|
12
|
-
exports.StyledCalloutTitle = (0, styles_1.styled)(material_1.AlertTitle)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n\n ", "\n"], ["\n ", "\n\n ", "\n"])), fontBodyXs, function (props) {
|
|
13
|
-
var spacings = (0, styles_2.getSpaces)(props);
|
|
14
|
-
return "\n margin: ".concat(spacings === null || spacings === void 0 ? void 0 : spacings.xxxs, "px 0 ").concat(spacings === null || spacings === void 0 ? void 0 : spacings.xs, "px;\n ");
|
|
15
|
-
});
|
|
16
|
-
var templateObject_1;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { AlertProps } from "@mui/lab";
|
|
2
|
-
import React from "react";
|
|
3
|
-
declare const SDS_STAGE_OPEN = "open";
|
|
4
|
-
declare const SDS_STAGE_CLOSED = "closed";
|
|
5
|
-
export interface CalloutProps {
|
|
6
|
-
autoDismiss?: boolean | number;
|
|
7
|
-
dismissed?: boolean;
|
|
8
|
-
expandable?: boolean;
|
|
9
|
-
icon?: React.ReactNode;
|
|
10
|
-
intent: "info" | "error" | "success" | "warning";
|
|
11
|
-
sdsStage?: typeof SDS_STAGE_CLOSED | typeof SDS_STAGE_OPEN;
|
|
12
|
-
}
|
|
13
|
-
export type ExposedCalloutProps = Omit<AlertProps, "nonce" | "rev" | "rel" | "autoFocus" | "content"> & CalloutProps;
|
|
14
|
-
/**
|
|
15
|
-
* @see https://mui.com/material-ui/react-alert/
|
|
16
|
-
*/
|
|
17
|
-
declare const Callout: ({ autoDismiss, children, dismissed, expandable, onClose, icon, intent, sdsStage, ...rest }: ExposedCalloutProps) => JSX.Element;
|
|
18
|
-
export default Callout;
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
-
var t = {};
|
|
15
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
-
t[p] = s[p];
|
|
17
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
-
t[p[i]] = s[p[i]];
|
|
21
|
-
}
|
|
22
|
-
return t;
|
|
23
|
-
};
|
|
24
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
-
};
|
|
27
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
29
|
-
var material_1 = require("@mui/material");
|
|
30
|
-
var react_1 = require("react");
|
|
31
|
-
var ButtonIcon_1 = __importDefault(require("../ButtonIcon"));
|
|
32
|
-
var Icon_1 = __importDefault(require("../Icon"));
|
|
33
|
-
var style_1 = require("./style");
|
|
34
|
-
var SDS_STAGE_OPEN = "open";
|
|
35
|
-
var SDS_STAGE_CLOSED = "closed";
|
|
36
|
-
/**
|
|
37
|
-
* @see https://mui.com/material-ui/react-alert/
|
|
38
|
-
*/
|
|
39
|
-
var Callout = function (_a) {
|
|
40
|
-
var _b, _c;
|
|
41
|
-
var autoDismiss = _a.autoDismiss, children = _a.children, dismissed = _a.dismissed, expandable = _a.expandable, onClose = _a.onClose, icon = _a.icon, intent = _a.intent, sdsStage = _a.sdsStage, rest = __rest(_a, ["autoDismiss", "children", "dismissed", "expandable", "onClose", "icon", "intent", "sdsStage"]);
|
|
42
|
-
var _d = (0, react_1.useState)(dismissed), hide = _d[0], setHide = _d[1];
|
|
43
|
-
var _e = (0, react_1.useState)(sdsStage || SDS_STAGE_CLOSED), stage = _e[0], setStage = _e[1];
|
|
44
|
-
(0, react_1.useEffect)(function () {
|
|
45
|
-
setHide(dismissed);
|
|
46
|
-
if (autoDismiss) {
|
|
47
|
-
var timeout = typeof autoDismiss === "boolean" ? 8000 : autoDismiss;
|
|
48
|
-
setTimeout(function () {
|
|
49
|
-
setHide(true);
|
|
50
|
-
}, timeout);
|
|
51
|
-
}
|
|
52
|
-
}, [dismissed, autoDismiss]);
|
|
53
|
-
var handleClose = function (event) {
|
|
54
|
-
setHide(true);
|
|
55
|
-
if (onClose)
|
|
56
|
-
onClose(event);
|
|
57
|
-
};
|
|
58
|
-
var getIcon = function () {
|
|
59
|
-
if (icon)
|
|
60
|
-
return icon;
|
|
61
|
-
switch (intent) {
|
|
62
|
-
case "success":
|
|
63
|
-
return (0, jsx_runtime_1.jsx)(Icon_1.default, { sdsSize: "l", sdsIcon: "checkCircle", sdsType: "static" });
|
|
64
|
-
case "info":
|
|
65
|
-
return (0, jsx_runtime_1.jsx)(Icon_1.default, { sdsSize: "l", sdsIcon: "infoCircle", sdsType: "static" });
|
|
66
|
-
default:
|
|
67
|
-
return ((0, jsx_runtime_1.jsx)(Icon_1.default, { sdsSize: "l", sdsIcon: "exclamationMarkCircle", sdsType: "static" }));
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
var getAction = function (collapsed) {
|
|
71
|
-
if (expandable) {
|
|
72
|
-
return ((0, jsx_runtime_1.jsx)(ButtonIcon_1.default, { "aria-label": collapsed ? "open" : "close", onClick: function () {
|
|
73
|
-
setStage(collapsed ? SDS_STAGE_OPEN : SDS_STAGE_CLOSED);
|
|
74
|
-
}, sdsSize: "small", sdsType: "tertiary", sdsIcon: collapsed ? "chevronDown" : "chevronUp" }));
|
|
75
|
-
}
|
|
76
|
-
return onClose ? ((0, jsx_runtime_1.jsx)(ButtonIcon_1.default, { "aria-label": "Dismiss", onClick: handleClose, sdsSize: "small", sdsType: "tertiary", size: "large", sdsIcon: "xMark" })) : null;
|
|
77
|
-
};
|
|
78
|
-
var collapsed = (expandable && stage === SDS_STAGE_CLOSED) || false;
|
|
79
|
-
// when there is no CalloutTitlecomponent, or there is a single child element
|
|
80
|
-
// the contents of children will be used as the title
|
|
81
|
-
var calloutTitle = children;
|
|
82
|
-
var calloutContent;
|
|
83
|
-
var firstChildIsCalloutTitle = Array.isArray(children) && ((_c = (_b = children[0]) === null || _b === void 0 ? void 0 : _b.type) === null || _c === void 0 ? void 0 : _c.name) === "CalloutTitle";
|
|
84
|
-
if (firstChildIsCalloutTitle) {
|
|
85
|
-
calloutTitle = children[0], calloutContent = children.slice(1);
|
|
86
|
-
}
|
|
87
|
-
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(material_1.Grow, { in: !hide, children: (0, jsx_runtime_1.jsxs)(style_1.StyledCallout, __assign({ onClose: onClose ? handleClose : undefined, action: getAction(collapsed), icon: getIcon(), severity: intent, collapsed: collapsed || false }, rest, { children: [calloutTitle, !collapsed && calloutContent] })) }) }));
|
|
88
|
-
};
|
|
89
|
-
exports.default = Callout;
|
|
@@ -1,14 +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
|
-
autoDismiss: boolean;
|
|
7
|
-
calloutTitle: string;
|
|
8
|
-
intent: string;
|
|
9
|
-
onClose: boolean;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
export declare const LivePreview: {
|
|
13
|
-
render: (args: Args) => JSX.Element;
|
|
14
|
-
};
|