@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,52 +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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
26
|
-
var react_1 = require("react");
|
|
27
|
-
var style_1 = require("./style");
|
|
28
|
-
/**
|
|
29
|
-
* @see https://mui.com/material-ui/react-text-field/
|
|
30
|
-
*/
|
|
31
|
-
var InputText = (0, react_1.forwardRef)(function InputText(props, ref) {
|
|
32
|
-
var id = props.id, _a = props.intent, intent = _a === void 0 ? "default" : _a, label = props.label, placeholder = props.placeholder, sdsType = props.sdsType, hideLabel = props.hideLabel, rest = __rest(props, ["id", "intent", "label", "placeholder", "sdsType", "hideLabel"]);
|
|
33
|
-
var _b = (0, react_1.useState)(false), hasValue = _b[0], setHasValue = _b[1];
|
|
34
|
-
var handleChange = function (event) {
|
|
35
|
-
if (event.target.value) {
|
|
36
|
-
setHasValue(true);
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
setHasValue(false);
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
var inputProps = {
|
|
43
|
-
"aria-label": "".concat(label),
|
|
44
|
-
};
|
|
45
|
-
if (!id || !label) {
|
|
46
|
-
// eslint-disable-next-line no-console
|
|
47
|
-
console.error("Error: @czi-sds/components component InputText requires id and label props for accessibility.");
|
|
48
|
-
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
|
|
49
|
-
}
|
|
50
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [!hideLabel && (0, jsx_runtime_1.jsx)(style_1.StyledLabel, { htmlFor: id, children: label }), (0, jsx_runtime_1.jsx)(style_1.StyledInputBase, __assign({ ref: ref, inputProps: inputProps, type: "text", multiline: sdsType === "textArea", minRows: sdsType === "textArea" ? 4 : 2, id: id, intent: intent, variant: "outlined", size: "small", placeholder: placeholder, sdsStage: hasValue ? "userInput" : "default", sdsType: sdsType, onChange: handleChange }, rest))] }));
|
|
51
|
-
});
|
|
52
|
-
exports.default = InputText;
|
|
@@ -1,29 +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
|
-
disabled: boolean;
|
|
7
|
-
hideLabel: boolean;
|
|
8
|
-
id: string;
|
|
9
|
-
label: string;
|
|
10
|
-
placeholder: string;
|
|
11
|
-
sdsType: string;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
export declare const LivePreview: {
|
|
15
|
-
parameters: {
|
|
16
|
-
snapshot: {
|
|
17
|
-
skip: boolean;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
render: (args: Args) => JSX.Element;
|
|
21
|
-
};
|
|
22
|
-
export declare const Test: {
|
|
23
|
-
parameters: {
|
|
24
|
-
snapshot: {
|
|
25
|
-
skip: boolean;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
render: (args: Args) => JSX.Element;
|
|
29
|
-
};
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.Test = exports.LivePreview = exports.Default = void 0;
|
|
18
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
-
var material_1 = require("@mui/material");
|
|
20
|
-
var index_1 = __importDefault(require("./index"));
|
|
21
|
-
var InputText = function (props) {
|
|
22
|
-
var id = props.id, intent = props.intent, disabled = props.disabled, hideLabel = props.hideLabel, placeholder = props.placeholder, label = props.label, sdsType = props.sdsType;
|
|
23
|
-
return ((0, jsx_runtime_1.jsx)(index_1.default, { id: id, sdsType: sdsType, label: label, placeholder: placeholder, intent: intent, hideLabel: hideLabel, disabled: disabled, name: "input-text-name" }));
|
|
24
|
-
};
|
|
25
|
-
exports.default = {
|
|
26
|
-
argTypes: {
|
|
27
|
-
disabled: {
|
|
28
|
-
control: { type: "boolean" },
|
|
29
|
-
},
|
|
30
|
-
hideLabel: {
|
|
31
|
-
control: { type: "boolean" },
|
|
32
|
-
},
|
|
33
|
-
id: {
|
|
34
|
-
control: { type: "text" },
|
|
35
|
-
required: true,
|
|
36
|
-
},
|
|
37
|
-
intent: {
|
|
38
|
-
control: { type: "radio" },
|
|
39
|
-
options: ["default", "error", "warning"],
|
|
40
|
-
},
|
|
41
|
-
label: {
|
|
42
|
-
control: { type: "text" },
|
|
43
|
-
required: true,
|
|
44
|
-
},
|
|
45
|
-
placeholder: {
|
|
46
|
-
control: { type: "text" },
|
|
47
|
-
},
|
|
48
|
-
sdsStage: {
|
|
49
|
-
control: { type: "radio" },
|
|
50
|
-
options: ["default", "userInput"],
|
|
51
|
-
},
|
|
52
|
-
sdsType: {
|
|
53
|
-
control: { type: "radio" },
|
|
54
|
-
options: ["textField", "textArea"],
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
component: InputText,
|
|
58
|
-
title: "Inputs/InputText",
|
|
59
|
-
};
|
|
60
|
-
// Default
|
|
61
|
-
exports.Default = {
|
|
62
|
-
args: {
|
|
63
|
-
disabled: false,
|
|
64
|
-
hideLabel: false,
|
|
65
|
-
id: "Test",
|
|
66
|
-
label: "Label",
|
|
67
|
-
placeholder: "Value",
|
|
68
|
-
sdsType: "textField",
|
|
69
|
-
},
|
|
70
|
-
};
|
|
71
|
-
// Live Preview
|
|
72
|
-
var storyRow = {
|
|
73
|
-
alignItems: "flex-start",
|
|
74
|
-
display: "flex",
|
|
75
|
-
flexDirection: "row",
|
|
76
|
-
gap: "24px",
|
|
77
|
-
};
|
|
78
|
-
var LivePreviewDemo = function (props) {
|
|
79
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: storyRow, children: [(0, jsx_runtime_1.jsx)(index_1.default, __assign({}, props, { id: "textFieldPreview", sdsType: "textField", label: "Label", hideLabel: true, placeholder: "Value", style: { width: "200px" } })), (0, jsx_runtime_1.jsx)(index_1.default, __assign({}, props, { id: "textAreaPreview", sdsType: "textArea", label: "Label", hideLabel: true, placeholder: "Value", style: { minWidth: "200px" }, inputProps: { style: { minWidth: "200px" } } }))] }));
|
|
80
|
-
};
|
|
81
|
-
exports.LivePreview = {
|
|
82
|
-
parameters: {
|
|
83
|
-
snapshot: {
|
|
84
|
-
skip: true,
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
render: function (args) { return (0, jsx_runtime_1.jsx)(LivePreviewDemo, __assign({}, args)); },
|
|
88
|
-
};
|
|
89
|
-
// Test
|
|
90
|
-
var TestDemo = function (props) {
|
|
91
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.FormControl, { children: [(0, jsx_runtime_1.jsx)(index_1.default, __assign({}, props, { id: "test-textField", sdsType: "textField", label: "Label", hideLabel: false, placeholder: "Value", "data-testid": "inputTextBase" })), (0, jsx_runtime_1.jsx)(index_1.default, { sdsType: "textField", hideLabel: false, "data-testid": "inputTextFail" }), (0, jsx_runtime_1.jsx)(index_1.default, { id: "test-hide-label", sdsType: "textField", label: "Hidden Label", hideLabel: true, "data-testid": "inputTextHideLabel" }), (0, jsx_runtime_1.jsx)(index_1.default, { id: "test-textArea", sdsType: "textArea", label: "Label", hideLabel: false, placeholder: "Value", "data-testid": "inputTextArea" })] }));
|
|
92
|
-
};
|
|
93
|
-
exports.Test = {
|
|
94
|
-
parameters: {
|
|
95
|
-
snapshot: {
|
|
96
|
-
skip: true,
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
|
-
render: function (args) { return (0, jsx_runtime_1.jsx)(TestDemo, __assign({}, args)); },
|
|
100
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,67 +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 __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
-
}
|
|
19
|
-
Object.defineProperty(o, k2, desc);
|
|
20
|
-
}) : (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
o[k2] = m[k];
|
|
23
|
-
}));
|
|
24
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
-
}) : function(o, v) {
|
|
27
|
-
o["default"] = v;
|
|
28
|
-
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
-
if (mod && mod.__esModule) return mod;
|
|
31
|
-
var result = {};
|
|
32
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
-
__setModuleDefault(result, mod);
|
|
34
|
-
return result;
|
|
35
|
-
};
|
|
36
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
-
var story_utils_1 = require("@chanzuckerberg/story-utils");
|
|
39
|
-
var react_1 = require("@storybook/react");
|
|
40
|
-
var react_2 = require("@testing-library/react");
|
|
41
|
-
var snapshotTestStoryFile = __importStar(require("./index.stories"));
|
|
42
|
-
var index_stories_1 = __importStar(require("./index.stories"));
|
|
43
|
-
// Returns a component that already contain all decorators from story level, meta level and global level.
|
|
44
|
-
var Test = (0, react_1.composeStory)(index_stories_1.Test, index_stories_1.default);
|
|
45
|
-
describe("<InputText />", function () {
|
|
46
|
-
(0, story_utils_1.generateSnapshots)(snapshotTestStoryFile);
|
|
47
|
-
it("renders inputText component", function () {
|
|
48
|
-
(0, react_2.render)((0, jsx_runtime_1.jsx)(Test, __assign({}, Test.args)));
|
|
49
|
-
var inputTextElement = react_2.screen.getByTestId("inputTextBase");
|
|
50
|
-
expect(inputTextElement).not.toBeNull();
|
|
51
|
-
});
|
|
52
|
-
it("component fails if missing id or label prop", function () {
|
|
53
|
-
(0, react_2.render)((0, jsx_runtime_1.jsx)(Test, {}));
|
|
54
|
-
var inputTextElement = react_2.screen.queryByTestId("inputTextFail");
|
|
55
|
-
expect(inputTextElement).toBeNull();
|
|
56
|
-
});
|
|
57
|
-
it("hides label is hideLabel is true, but aria-label is still set", function () {
|
|
58
|
-
(0, react_2.render)((0, jsx_runtime_1.jsx)(Test, {}));
|
|
59
|
-
var inputTextElement = react_2.screen.getByLabelText("Hidden Label");
|
|
60
|
-
expect(inputTextElement).not.toBeNull();
|
|
61
|
-
});
|
|
62
|
-
it("renders text area if sdsType is set to 'textArea'", function () {
|
|
63
|
-
(0, react_2.render)((0, jsx_runtime_1.jsx)(Test, {}));
|
|
64
|
-
var inputTextAreaElement = react_2.screen.getByTestId("inputTextArea");
|
|
65
|
-
expect(inputTextAreaElement).not.toBeNull();
|
|
66
|
-
});
|
|
67
|
-
});
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { CommonThemeProps } from "../styles";
|
|
3
|
-
export interface InputTextExtraProps extends CommonThemeProps {
|
|
4
|
-
disabled?: boolean;
|
|
5
|
-
intent?: "default" | "error" | "warning";
|
|
6
|
-
sdsType?: "textField" | "textArea";
|
|
7
|
-
sdsStage?: "default" | "userInput";
|
|
8
|
-
hideLabel?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export declare const StyledLabel: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & CommonThemeProps, import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, {}>;
|
|
11
|
-
export declare const StyledInputBase: import("@emotion/styled").StyledComponent<{
|
|
12
|
-
variant?: import("@mui/material").TextFieldVariants | undefined;
|
|
13
|
-
} & Omit<import("@mui/material").OutlinedTextFieldProps | import("@mui/material").FilledTextFieldProps | import("@mui/material").StandardTextFieldProps, "variant"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & InputTextExtraProps, {}, {}>;
|
|
@@ -1,45 +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.StyledInputBase = exports.StyledLabel = void 0;
|
|
8
|
-
var react_1 = require("@emotion/react");
|
|
9
|
-
var material_1 = require("@mui/material");
|
|
10
|
-
var styles_1 = require("@mui/material/styles");
|
|
11
|
-
var styles_2 = require("../styles");
|
|
12
|
-
var sdsPropNames = ["sdsStyle", "sdsStage", "sdsType", "intent", "hideLabel"];
|
|
13
|
-
var error = function (props) {
|
|
14
|
-
var borders = (0, styles_2.getBorders)(props);
|
|
15
|
-
return (0, react_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n .MuiOutlinedInput-notchedOutline {\n border: ", ";\n }\n "], ["\n .MuiOutlinedInput-notchedOutline {\n border: ", ";\n }\n "])), borders === null || borders === void 0 ? void 0 : borders.error[400]);
|
|
16
|
-
};
|
|
17
|
-
var warning = function (props) {
|
|
18
|
-
var borders = (0, styles_2.getBorders)(props);
|
|
19
|
-
return (0, react_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n .MuiOutlinedInput-notchedOutline {\n border: ", ";\n }\n "], ["\n .MuiOutlinedInput-notchedOutline {\n border: ", ";\n }\n "])), borders === null || borders === void 0 ? void 0 : borders.warning[400]);
|
|
20
|
-
};
|
|
21
|
-
var disabledStyled = function (props) {
|
|
22
|
-
var borders = (0, styles_2.getBorders)(props);
|
|
23
|
-
return (0, react_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n .Mui-disabled {\n .MuiOutlinedInput-notchedOutline {\n border: ", ";\n }\n &:hover .MuiOutlinedInput-notchedOutline {\n border: ", ";\n }\n }\n "], ["\n .Mui-disabled {\n .MuiOutlinedInput-notchedOutline {\n border: ", ";\n }\n &:hover .MuiOutlinedInput-notchedOutline {\n border: ", ";\n }\n }\n "])), borders === null || borders === void 0 ? void 0 : borders.gray[300], borders === null || borders === void 0 ? void 0 : borders.gray[300]);
|
|
24
|
-
};
|
|
25
|
-
var textArea = function (props) {
|
|
26
|
-
var spacings = (0, styles_2.getSpaces)(props);
|
|
27
|
-
return (0, react_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n .MuiInputBase-multiline {\n padding: ", "px;\n > .MuiInputBase-inputMultiline {\n padding: ", "px ", "px ", "px;\n resize: both;\n }\n }\n "], ["\n .MuiInputBase-multiline {\n padding: ", "px;\n > .MuiInputBase-inputMultiline {\n padding: ", "px ", "px ", "px;\n resize: both;\n }\n }\n "])), spacings === null || spacings === void 0 ? void 0 : spacings.xxs, spacings === null || spacings === void 0 ? void 0 : spacings.xxs, spacings === null || spacings === void 0 ? void 0 : spacings.m, spacings === null || spacings === void 0 ? void 0 : spacings.m);
|
|
28
|
-
};
|
|
29
|
-
exports.StyledLabel = (0, styles_1.styled)("label")(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: block;\n ", "\n\n ", "\n"], ["\n display: block;\n ", "\n\n ", "\n"])), styles_2.fontBodyS, function (props) {
|
|
30
|
-
var typography = (0, styles_2.getTypography)(props);
|
|
31
|
-
var spacings = (0, styles_2.getSpaces)(props);
|
|
32
|
-
return "\n font-family: ".concat(typography === null || typography === void 0 ? void 0 : typography.fontFamily, ";\n margin-bottom: ").concat(spacings === null || spacings === void 0 ? void 0 : spacings.xxs, "px;\n ");
|
|
33
|
-
});
|
|
34
|
-
exports.StyledInputBase = (0, styles_1.styled)(material_1.TextField, {
|
|
35
|
-
shouldForwardProp: function (prop) {
|
|
36
|
-
return !sdsPropNames.includes(prop.toString());
|
|
37
|
-
},
|
|
38
|
-
})(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (props) {
|
|
39
|
-
var intent = props.intent, sdsType = props.sdsType, disabled = props.disabled;
|
|
40
|
-
var spacings = (0, styles_2.getSpaces)(props);
|
|
41
|
-
var borders = (0, styles_2.getBorders)(props);
|
|
42
|
-
var corners = (0, styles_2.getCorners)(props);
|
|
43
|
-
return (0, react_1.css)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n margin-bottom: ", "px;\n margin-right: ", "px;\n min-width: 160px;\n display: block;\n\n .MuiInputBase-inputSizeSmall {\n padding: ", "px ", "px;\n height: 34px;\n box-sizing: border-box;\n background-color: #fff;\n\n .MuiOutlinedInput-notchedOutline {\n border-radius: ", "px;\n border: ", ";\n }\n }\n\n .MuiOutlinedInput-root:hover .MuiOutlinedInput-notchedOutline {\n border: ", ";\n }\n\n .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline {\n border: ", ";\n }\n\n ", "\n ", "\n ", "\n ", "\n "], ["\n margin-bottom: ", "px;\n margin-right: ", "px;\n min-width: 160px;\n display: block;\n\n .MuiInputBase-inputSizeSmall {\n padding: ", "px ", "px;\n height: 34px;\n box-sizing: border-box;\n background-color: #fff;\n\n .MuiOutlinedInput-notchedOutline {\n border-radius: ", "px;\n border: ", ";\n }\n }\n\n .MuiOutlinedInput-root:hover .MuiOutlinedInput-notchedOutline {\n border: ", ";\n }\n\n .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline {\n border: ", ";\n }\n\n ", "\n ", "\n ", "\n ", "\n "])), spacings === null || spacings === void 0 ? void 0 : spacings.l, spacings === null || spacings === void 0 ? void 0 : spacings.m, spacings === null || spacings === void 0 ? void 0 : spacings.xs, spacings === null || spacings === void 0 ? void 0 : spacings.l, corners === null || corners === void 0 ? void 0 : corners.m, borders === null || borders === void 0 ? void 0 : borders.gray[400], borders === null || borders === void 0 ? void 0 : borders.gray[500], borders === null || borders === void 0 ? void 0 : borders.primary[400], sdsType === "textArea" && textArea(props), intent === "error" && error(props), intent === "warning" && warning(props), disabled && disabledStyled(props));
|
|
44
|
-
});
|
|
45
|
-
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 InputToggleNameSpaceTest = function (props) {
|
|
6
|
-
return (0, jsx_runtime_1.jsx)(components_1.InputToggle, { disabled: false });
|
|
7
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`<InputToggle /> Default story renders snapshot 1`] = `
|
|
4
|
-
<span
|
|
5
|
-
class="MuiSwitch-root MuiSwitch-sizeMedium css-1mglvc-MuiSwitch-root"
|
|
6
|
-
>
|
|
7
|
-
<span
|
|
8
|
-
class="MuiButtonBase-root MuiSwitch-switchBase MuiSwitch-colorPrimary PrivateSwitchBase-root MuiSwitch-switchBase MuiSwitch-colorPrimary css-5ryogn-MuiButtonBase-root-MuiSwitch-switchBase"
|
|
9
|
-
>
|
|
10
|
-
<input
|
|
11
|
-
class="PrivateSwitchBase-input MuiSwitch-input css-1m9pwf3"
|
|
12
|
-
type="checkbox"
|
|
13
|
-
value="Off"
|
|
14
|
-
/>
|
|
15
|
-
<span
|
|
16
|
-
class="MuiSwitch-thumb css-jsexje-MuiSwitch-thumb"
|
|
17
|
-
/>
|
|
18
|
-
<span
|
|
19
|
-
class="MuiTouchRipple-root css-8je8zh-MuiTouchRipple-root"
|
|
20
|
-
/>
|
|
21
|
-
</span>
|
|
22
|
-
<span
|
|
23
|
-
class="MuiSwitch-track css-1yjjitx-MuiSwitch-track"
|
|
24
|
-
/>
|
|
25
|
-
</span>
|
|
26
|
-
`;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { InputToggleExtraProps } from "./style";
|
|
2
|
-
/**
|
|
3
|
-
* @see https://mui.com/material-ui/react-switch/
|
|
4
|
-
*/
|
|
5
|
-
declare const InputToggle: (props: InputToggleExtraProps) => JSX.Element;
|
|
6
|
-
export type { InputToggleExtraProps as InputToggleProps };
|
|
7
|
-
export default InputToggle;
|
|
@@ -1,42 +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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
26
|
-
var react_1 = require("react");
|
|
27
|
-
var style_1 = require("./style");
|
|
28
|
-
/**
|
|
29
|
-
* @see https://mui.com/material-ui/react-switch/
|
|
30
|
-
*/
|
|
31
|
-
var InputToggle = function (props) {
|
|
32
|
-
var _a = (0, react_1.useState)(false), checked = _a[0], setChecked = _a[1];
|
|
33
|
-
var _b = props.offLabel, offLabel = _b === void 0 ? "Off" : _b, onChange = props.onChange, _c = props.onLabel, onLabel = _c === void 0 ? "On" : _c, rest = __rest(props, ["offLabel", "onChange", "onLabel"]);
|
|
34
|
-
var labelValue = checked ? onLabel : offLabel;
|
|
35
|
-
var handleChange = function (e) {
|
|
36
|
-
setChecked(!checked);
|
|
37
|
-
if (onChange)
|
|
38
|
-
onChange(e);
|
|
39
|
-
};
|
|
40
|
-
return ((0, jsx_runtime_1.jsx)(style_1.Toggle, __assign({ checked: checked, color: "primary", onChange: handleChange, value: labelValue }, rest)));
|
|
41
|
-
};
|
|
42
|
-
exports.default = InputToggle;
|
|
@@ -1,20 +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
|
-
export declare const LivePreview: {
|
|
6
|
-
parameters: {
|
|
7
|
-
snapshot: {
|
|
8
|
-
skip: boolean;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
render: (args: Args) => JSX.Element;
|
|
12
|
-
};
|
|
13
|
-
export declare const Test: {
|
|
14
|
-
parameters: {
|
|
15
|
-
snapshot: {
|
|
16
|
-
skip: boolean;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
render: (args: Args) => JSX.Element;
|
|
20
|
-
};
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.Test = exports.LivePreview = exports.Default = void 0;
|
|
18
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
-
var index_1 = __importDefault(require("./index"));
|
|
20
|
-
var InputToggle = function (props) {
|
|
21
|
-
return (0, jsx_runtime_1.jsx)(index_1.default, __assign({}, props));
|
|
22
|
-
};
|
|
23
|
-
exports.default = {
|
|
24
|
-
argTypes: {
|
|
25
|
-
disabled: {
|
|
26
|
-
control: { type: "boolean" },
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
component: InputToggle,
|
|
30
|
-
parameters: {
|
|
31
|
-
axe: {
|
|
32
|
-
disabledRules: [
|
|
33
|
-
// Unfortunately the MUI Switch component renders an input field without a label, which
|
|
34
|
-
// fails an axe check.
|
|
35
|
-
"label",
|
|
36
|
-
],
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
title: "Inputs/InputToggle",
|
|
40
|
-
};
|
|
41
|
-
// Default
|
|
42
|
-
exports.Default = {};
|
|
43
|
-
// Live Preview
|
|
44
|
-
var LivePreviewDemo = function (props) {
|
|
45
|
-
return (0, jsx_runtime_1.jsx)(index_1.default, __assign({}, props, { id: "togglePreview" }));
|
|
46
|
-
};
|
|
47
|
-
exports.LivePreview = {
|
|
48
|
-
parameters: {
|
|
49
|
-
snapshot: {
|
|
50
|
-
skip: true,
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
render: function (args) { return (0, jsx_runtime_1.jsx)(LivePreviewDemo, __assign({}, args)); },
|
|
54
|
-
};
|
|
55
|
-
// Test
|
|
56
|
-
exports.Test = {
|
|
57
|
-
parameters: {
|
|
58
|
-
snapshot: {
|
|
59
|
-
skip: true,
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
render: function (args) { return ((0, jsx_runtime_1.jsx)(index_1.default, __assign({}, args, { "data-testid": "test-toggle" }))); },
|
|
63
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,52 +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 __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
-
}
|
|
19
|
-
Object.defineProperty(o, k2, desc);
|
|
20
|
-
}) : (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
o[k2] = m[k];
|
|
23
|
-
}));
|
|
24
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
-
}) : function(o, v) {
|
|
27
|
-
o["default"] = v;
|
|
28
|
-
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
-
if (mod && mod.__esModule) return mod;
|
|
31
|
-
var result = {};
|
|
32
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
-
__setModuleDefault(result, mod);
|
|
34
|
-
return result;
|
|
35
|
-
};
|
|
36
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
-
var story_utils_1 = require("@chanzuckerberg/story-utils");
|
|
39
|
-
var react_1 = require("@storybook/react");
|
|
40
|
-
var react_2 = require("@testing-library/react");
|
|
41
|
-
var snapshotTestStoryFile = __importStar(require("./index.stories"));
|
|
42
|
-
var index_stories_1 = __importStar(require("./index.stories"));
|
|
43
|
-
// Returns a component that already contain all decorators from story level, meta level and global level.
|
|
44
|
-
var Test = (0, react_1.composeStory)(index_stories_1.Test, index_stories_1.default);
|
|
45
|
-
describe("<InputToggle />", function () {
|
|
46
|
-
(0, story_utils_1.generateSnapshots)(snapshotTestStoryFile);
|
|
47
|
-
it("renders", function () {
|
|
48
|
-
(0, react_2.render)((0, jsx_runtime_1.jsx)(Test, __assign({}, Test.args)));
|
|
49
|
-
var InputToggleElement = react_2.screen.getByTestId("test-toggle");
|
|
50
|
-
expect(InputToggleElement).not.toBeNull();
|
|
51
|
-
});
|
|
52
|
-
});
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { Switch, SwitchProps } from "@mui/material";
|
|
3
|
-
import { CommonThemeProps } from "../styles";
|
|
4
|
-
export interface InputToggleExtraProps extends Omit<SwitchProps, "nonce" | "rev" | "rel" | "autoFocus" | "content">, CommonThemeProps {
|
|
5
|
-
offLabel?: string;
|
|
6
|
-
onChange?(e: React.ChangeEvent): void;
|
|
7
|
-
onLabel?: string;
|
|
8
|
-
}
|
|
9
|
-
export declare const Toggle: typeof Switch;
|
|
@@ -1,38 +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.Toggle = 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 toggle = function (props) {
|
|
12
|
-
var disabled = props.disabled;
|
|
13
|
-
var corners = (0, styles_2.getCorners)(props);
|
|
14
|
-
var spaces = (0, styles_2.getSpaces)(props);
|
|
15
|
-
var TOGGLE_HEIGHT = 18;
|
|
16
|
-
return "\n cursor: ".concat(disabled ? "default" : "pointer", ";\n border-radius: ").concat(corners === null || corners === void 0 ? void 0 : corners.l, "px;\n height: 26px;\n width: 62px;\n line-height: 18px;\n padding: ").concat(spaces === null || spaces === void 0 ? void 0 : spaces.xxs, "px;\n\n .MuiSwitch-switchBase {\n font: inherit;\n margin: ").concat(spaces === null || spaces === void 0 ? void 0 : spaces.xxs, "px;\n padding: 0;\n transform: unset;\n\n &:hover {\n background-color: transparent;\n }\n }\n\n .MuiSwitch-thumb {\n height: ").concat(TOGGLE_HEIGHT, "px;\n width: ").concat(TOGGLE_HEIGHT, "px;\n box-shadow: none;\n }\n\n .MuiSwitch-track {\n background-color: white;\n width: unset;\n }\n ");
|
|
17
|
-
};
|
|
18
|
-
var toggleOn = function (props) {
|
|
19
|
-
var disabled = props.disabled, value = props.value;
|
|
20
|
-
var borders = (0, styles_2.getBorders)(props);
|
|
21
|
-
var colors = (0, styles_2.getColors)(props);
|
|
22
|
-
var spaces = (0, styles_2.getSpaces)(props);
|
|
23
|
-
return "\n outline: ".concat(disabled ? borders === null || borders === void 0 ? void 0 : borders.primary[300] : borders === null || borders === void 0 ? void 0 : borders.primary[400], ";\n\n .MuiSwitch-thumb {\n color: ").concat(disabled ? colors === null || colors === void 0 ? void 0 : colors.primary[300] : colors === null || colors === void 0 ? void 0 : colors.primary[400], ";\n margin-left: ").concat(spaces === null || spaces === void 0 ? void 0 : spaces.s, "px;\n }\n\n .MuiSwitch-switchBase {\n left: unset;\n right: 0;\n transform: unset;\n\n .MuiIconButton-label {\n margin-left: ").concat(spaces === null || spaces === void 0 ? void 0 : spaces.s, "px;\n }\n\n &:before {\n color: ").concat(disabled ? colors === null || colors === void 0 ? void 0 : colors.gray[300] : colors === null || colors === void 0 ? void 0 : colors.gray[600], ";\n content: \"").concat(value, "\";\n font: inherit;\n font-family: 'Open sans';\n }\n }\n\n ").concat(!disabled &&
|
|
24
|
-
"&:hover {\n outline: ".concat(borders === null || borders === void 0 ? void 0 : borders.primary[500], ";\n\n .MuiSwitch-thumb {\n color: ").concat(colors === null || colors === void 0 ? void 0 : colors.primary[500], ";\n }\n }"), "\n ");
|
|
25
|
-
};
|
|
26
|
-
var toggleOff = function (props) {
|
|
27
|
-
var disabled = props.disabled, value = props.value;
|
|
28
|
-
var borders = (0, styles_2.getBorders)(props);
|
|
29
|
-
var colors = (0, styles_2.getColors)(props);
|
|
30
|
-
var spaces = (0, styles_2.getSpaces)(props);
|
|
31
|
-
return "\n & {\n outline: ".concat(disabled ? borders === null || borders === void 0 ? void 0 : borders.gray[300] : borders === null || borders === void 0 ? void 0 : borders.gray[400], ";\n }\n\n .MuiSwitch-thumb {\n color: ").concat(disabled ? colors === null || colors === void 0 ? void 0 : colors.gray[300] : colors === null || colors === void 0 ? void 0 : colors.gray[400], ";\n margin-right: ").concat(spaces === null || spaces === void 0 ? void 0 : spaces.s, "px;\n }\n\n .MuiSwitch-switchBase {\n right: unset;\n left: 0;\n transform: unset;\n\n .MuiIconButton-label {\n margin-right: ").concat(spaces === null || spaces === void 0 ? void 0 : spaces.s, "px;\n }\n\n &:after {\n color: ").concat(disabled ? colors === null || colors === void 0 ? void 0 : colors.gray[300] : colors === null || colors === void 0 ? void 0 : colors.gray[500], ";\n content: \"").concat(value, "\";\n font: inherit;\n font-family: 'Open sans';\n }\n }\n\n ").concat(!disabled &&
|
|
32
|
-
"&:hover {\n outline: ".concat(borders === null || borders === void 0 ? void 0 : borders.gray[500], ";\n\n .MuiSwitch-thumb {\n color: ").concat(colors === null || colors === void 0 ? void 0 : colors.gray[500], ";\n }\n }"), "\n ");
|
|
33
|
-
};
|
|
34
|
-
exports.Toggle = (0, styles_1.styled)(material_1.Switch)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n ", "\n"], ["\n ", "\n ", "\n"])), styles_2.fontBodyXs, function (props) {
|
|
35
|
-
var checked = props.checked;
|
|
36
|
-
return "\n ".concat(toggle(props), "\n ").concat(checked ? toggleOn(props) : toggleOff(props), "\n ");
|
|
37
|
-
});
|
|
38
|
-
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 LinkNameSpaceTest = function (props) {
|
|
6
|
-
return ((0, jsx_runtime_1.jsx)(components_1.Link, { href: "/", sdsStyle: "default", children: "Test Link" }));
|
|
7
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { LinkProps as RawLinkProps } from "./style";
|
|
3
|
-
export type LinkProps<C extends React.ElementType = "a"> = Omit<RawLinkProps<C>, "nonce" | "rev" | "rel" | "autoFocus" | "content">;
|
|
4
|
-
/**
|
|
5
|
-
* @see https://mui.com/material-ui/react-link/
|
|
6
|
-
*/
|
|
7
|
-
declare const Link: React.ForwardRefExoticComponent<Pick<LinkProps<React.ElementType<any>>, string | number | symbol> & React.RefAttributes<HTMLAnchorElement>>;
|
|
8
|
-
export default Link;
|