@czi-sds/components 15.2.0 → 15.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.d.ts +134 -82
- package/dist/index.cjs.js +946 -738
- package/dist/index.esm.d.ts +134 -82
- package/dist/index.esm.js +948 -741
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/dist/src/common/helpers/scrollStop.d.ts +0 -8
- package/dist/src/common/helpers/scrollStop.js +0 -54
- package/dist/src/common/storybookConstants.d.ts +0 -3
- package/dist/src/common/storybookConstants.js +0 -2
- package/dist/src/common/utils.d.ts +0 -2
- package/dist/src/common/utils.js +0 -9
- package/dist/src/common/warnings.d.ts +0 -10
- package/dist/src/common/warnings.js +0 -60
- package/dist/src/common/warnings.test.d.ts +0 -1
- package/dist/src/common/warnings.test.js +0 -19
- package/dist/src/core/Accordion/Accordion.namespace-test.d.ts +0 -1
- package/dist/src/core/Accordion/Accordion.namespace-test.js +0 -18
- package/dist/src/core/Accordion/__snapshots__/index.test.js.snap +0 -64
- package/dist/src/core/Accordion/components/AccordionDetails/index.d.ts +0 -3
- package/dist/src/core/Accordion/components/AccordionDetails/index.js +0 -9
- package/dist/src/core/Accordion/components/AccordionDetails/style.d.ts +0 -2
- package/dist/src/core/Accordion/components/AccordionDetails/style.js +0 -16
- package/dist/src/core/Accordion/components/AccordionHeader/index.d.ts +0 -7
- package/dist/src/core/Accordion/components/AccordionHeader/index.js +0 -13
- package/dist/src/core/Accordion/components/AccordionHeader/style.d.ts +0 -27
- package/dist/src/core/Accordion/components/AccordionHeader/style.js +0 -21
- package/dist/src/core/Accordion/index.d.ts +0 -12
- package/dist/src/core/Accordion/index.js +0 -38
- package/dist/src/core/Accordion/index.stories.d.ts +0 -28
- package/dist/src/core/Accordion/index.stories.js +0 -82
- package/dist/src/core/Accordion/index.test.d.ts +0 -1
- package/dist/src/core/Accordion/index.test.js +0 -58
- package/dist/src/core/Accordion/style.d.ts +0 -30
- package/dist/src/core/Accordion/style.js +0 -28
- package/dist/src/core/Alert/index.d.ts +0 -7
- package/dist/src/core/Alert/index.js +0 -22
- package/dist/src/core/Alert/index.stories.d.ts +0 -19
- package/dist/src/core/Alert/index.stories.js +0 -70
- package/dist/src/core/Alert/style.d.ts +0 -1
- package/dist/src/core/Alert/style.js +0 -23
- package/dist/src/core/Banner/Banner.namespace-test.d.ts +0 -1
- package/dist/src/core/Banner/Banner.namespace-test.js +0 -18
- package/dist/src/core/Banner/banner.test.d.ts +0 -1
- package/dist/src/core/Banner/banner.test.js +0 -126
- package/dist/src/core/Banner/index.d.ts +0 -11
- package/dist/src/core/Banner/index.js +0 -47
- package/dist/src/core/Banner/index.stories.d.ts +0 -46
- package/dist/src/core/Banner/index.stories.js +0 -106
- package/dist/src/core/Banner/style.d.ts +0 -13
- package/dist/src/core/Banner/style.js +0 -55
- package/dist/src/core/Button/Button.namespace-test.d.ts +0 -1
- package/dist/src/core/Button/Button.namespace-test.js +0 -18
- package/dist/src/core/Button/index.d.ts +0 -18
- package/dist/src/core/Button/index.js +0 -54
- package/dist/src/core/Button/index.stories.d.ts +0 -72
- package/dist/src/core/Button/index.stories.js +0 -215
- package/dist/src/core/Button/index.test.d.ts +0 -1
- package/dist/src/core/Button/index.test.js +0 -40
- package/dist/src/core/Button/style.d.ts +0 -180
- package/dist/src/core/Button/style.js +0 -59
- package/dist/src/core/ButtonDropdown/ButtonDropdown.namespace-test.d.ts +0 -1
- package/dist/src/core/ButtonDropdown/ButtonDropdown.namespace-test.js +0 -18
- package/dist/src/core/ButtonDropdown/index.d.ts +0 -18
- package/dist/src/core/ButtonDropdown/index.js +0 -30
- package/dist/src/core/ButtonDropdown/index.stories.d.ts +0 -35
- package/dist/src/core/ButtonDropdown/index.stories.js +0 -79
- package/dist/src/core/ButtonDropdown/index.test.d.ts +0 -1
- package/dist/src/core/ButtonDropdown/index.test.js +0 -41
- package/dist/src/core/ButtonIcon/ButtonIcon.namespace-test.d.ts +0 -1
- package/dist/src/core/ButtonIcon/ButtonIcon.namespace-test.js +0 -18
- package/dist/src/core/ButtonIcon/index.d.ts +0 -15
- package/dist/src/core/ButtonIcon/index.js +0 -34
- package/dist/src/core/ButtonIcon/index.stories.d.ts +0 -39
- package/dist/src/core/ButtonIcon/index.stories.js +0 -239
- package/dist/src/core/ButtonIcon/index.test.d.ts +0 -1
- package/dist/src/core/ButtonIcon/index.test.js +0 -41
- package/dist/src/core/ButtonIcon/style.d.ts +0 -41
- package/dist/src/core/ButtonIcon/style.js +0 -68
- package/dist/src/core/Callout/Callout.namespace-test.d.ts +0 -1
- package/dist/src/core/Callout/Callout.namespace-test.js +0 -18
- package/dist/src/core/Callout/components/CalloutTitle/index.d.ts +0 -3
- package/dist/src/core/Callout/components/CalloutTitle/index.js +0 -9
- package/dist/src/core/Callout/components/CalloutTitle/style.d.ts +0 -1
- package/dist/src/core/Callout/components/CalloutTitle/style.js +0 -16
- package/dist/src/core/Callout/index.d.ts +0 -18
- package/dist/src/core/Callout/index.js +0 -89
- package/dist/src/core/Callout/index.stories.d.ts +0 -14
- package/dist/src/core/Callout/index.stories.js +0 -80
- package/dist/src/core/Callout/style.d.ts +0 -7
- package/dist/src/core/Callout/style.js +0 -31
- package/dist/src/core/CellBasic/CellBasic.namespace-test.d.ts +0 -1
- package/dist/src/core/CellBasic/CellBasic.namespace-test.js +0 -7
- package/dist/src/core/CellBasic/index.d.ts +0 -21
- package/dist/src/core/CellBasic/index.js +0 -32
- package/dist/src/core/CellBasic/index.stories.d.ts +0 -33
- package/dist/src/core/CellBasic/index.stories.js +0 -143
- package/dist/src/core/CellBasic/index.test.d.ts +0 -1
- package/dist/src/core/CellBasic/index.test.js +0 -124
- package/dist/src/core/CellBasic/style.d.ts +0 -18
- package/dist/src/core/CellBasic/style.js +0 -86
- package/dist/src/core/CellComponent/CellComponent.namespace-test.d.ts +0 -1
- package/dist/src/core/CellComponent/CellComponent.namespace-test.js +0 -7
- package/dist/src/core/CellComponent/index.d.ts +0 -8
- package/dist/src/core/CellComponent/index.js +0 -21
- package/dist/src/core/CellComponent/index.stories.d.ts +0 -21
- package/dist/src/core/CellComponent/index.stories.js +0 -92
- package/dist/src/core/CellComponent/index.test.d.ts +0 -1
- package/dist/src/core/CellComponent/index.test.js +0 -110
- package/dist/src/core/CellComponent/style.d.ts +0 -9
- package/dist/src/core/CellComponent/style.js +0 -32
- package/dist/src/core/CellHeader/CellHeader.namespace-test.d.ts +0 -1
- package/dist/src/core/CellHeader/CellHeader.namespace-test.js +0 -8
- package/dist/src/core/CellHeader/index.d.ts +0 -20
- package/dist/src/core/CellHeader/index.js +0 -47
- package/dist/src/core/CellHeader/index.stories.d.ts +0 -26
- package/dist/src/core/CellHeader/index.stories.js +0 -128
- package/dist/src/core/CellHeader/index.test.d.ts +0 -1
- package/dist/src/core/CellHeader/index.test.js +0 -112
- package/dist/src/core/CellHeader/style.d.ts +0 -9
- package/dist/src/core/CellHeader/style.js +0 -50
- package/dist/src/core/Chip/index.d.ts +0 -9
- package/dist/src/core/Chip/index.js +0 -29
- package/dist/src/core/Chip/index.stories.d.ts +0 -58
- package/dist/src/core/Chip/index.stories.js +0 -90
- package/dist/src/core/Chip/style.d.ts +0 -26
- package/dist/src/core/Chip/style.js +0 -95
- package/dist/src/core/ComplexFilter/ComplexFilter.namespace-test.d.ts +0 -1
- package/dist/src/core/ComplexFilter/ComplexFilter.namespace-test.js +0 -20
- package/dist/src/core/ComplexFilter/components/Chips/index.d.ts +0 -8
- package/dist/src/core/ComplexFilter/components/Chips/index.js +0 -21
- package/dist/src/core/ComplexFilter/index.d.ts +0 -23
- package/dist/src/core/ComplexFilter/index.js +0 -119
- package/dist/src/core/ComplexFilter/index.stories.d.ts +0 -33
- package/dist/src/core/ComplexFilter/index.stories.js +0 -126
- package/dist/src/core/ComplexFilter/index.test.d.ts +0 -1
- package/dist/src/core/ComplexFilter/index.test.js +0 -51
- package/dist/src/core/ComplexFilter/style.d.ts +0 -3
- package/dist/src/core/ComplexFilter/style.js +0 -15
- package/dist/src/core/Dialog/Dialog.namespace-test.d.ts +0 -1
- package/dist/src/core/Dialog/Dialog.namespace-test.js +0 -8
- package/dist/src/core/Dialog/__snapshots__/index.test.js.snap +0 -382
- package/dist/src/core/Dialog/components/common.d.ts +0 -6
- package/dist/src/core/Dialog/components/common.js +0 -5
- package/dist/src/core/Dialog/index.d.ts +0 -18
- package/dist/src/core/Dialog/index.js +0 -50
- package/dist/src/core/Dialog/index.stories.d.ts +0 -46
- package/dist/src/core/Dialog/index.stories.js +0 -147
- package/dist/src/core/Dialog/index.test.d.ts +0 -1
- package/dist/src/core/Dialog/index.test.js +0 -62
- package/dist/src/core/DialogActions/index.d.ts +0 -9
- package/dist/src/core/DialogActions/index.js +0 -23
- package/dist/src/core/DialogActions/style.d.ts +0 -5
- package/dist/src/core/DialogActions/style.js +0 -20
- package/dist/src/core/DialogContent/index.d.ts +0 -5
- package/dist/src/core/DialogContent/index.js +0 -23
- package/dist/src/core/DialogContent/style.d.ts +0 -1
- package/dist/src/core/DialogContent/style.js +0 -11
- package/dist/src/core/DialogPaper/index.d.ts +0 -8
- package/dist/src/core/DialogPaper/index.js +0 -27
- package/dist/src/core/DialogPaper/style.d.ts +0 -16
- package/dist/src/core/DialogPaper/style.js +0 -44
- package/dist/src/core/DialogTitle/components/CloseButton/index.d.ts +0 -5
- package/dist/src/core/DialogTitle/components/CloseButton/index.js +0 -31
- package/dist/src/core/DialogTitle/components/CloseButton/style.d.ts +0 -2
- package/dist/src/core/DialogTitle/components/CloseButton/style.js +0 -18
- package/dist/src/core/DialogTitle/index.d.ts +0 -14
- package/dist/src/core/DialogTitle/index.js +0 -42
- package/dist/src/core/DialogTitle/style.d.ts +0 -46
- package/dist/src/core/DialogTitle/style.js +0 -20
- package/dist/src/core/Dropdown/Dropdown.namespace-test.d.ts +0 -1
- package/dist/src/core/Dropdown/Dropdown.namespace-test.js +0 -20
- package/dist/src/core/Dropdown/index.d.ts +0 -31
- package/dist/src/core/Dropdown/index.js +0 -160
- package/dist/src/core/Dropdown/index.stories.d.ts +0 -68
- package/dist/src/core/Dropdown/index.stories.js +0 -215
- package/dist/src/core/Dropdown/index.test.d.ts +0 -1
- package/dist/src/core/Dropdown/index.test.js +0 -229
- package/dist/src/core/Dropdown/style.d.ts +0 -5
- package/dist/src/core/Dropdown/style.js +0 -19
- package/dist/src/core/DropdownMenu/DropdownMenu.namespace-test.d.ts +0 -1
- package/dist/src/core/DropdownMenu/DropdownMenu.namespace-test.js +0 -20
- package/dist/src/core/DropdownMenu/GITHUB_LABELS.d.ts +0 -2
- package/dist/src/core/DropdownMenu/GITHUB_LABELS.js +0 -83
- package/dist/src/core/DropdownMenu/index.d.ts +0 -42
- package/dist/src/core/DropdownMenu/index.js +0 -83
- package/dist/src/core/DropdownMenu/index.stories.d.ts +0 -55
- package/dist/src/core/DropdownMenu/index.stories.js +0 -438
- package/dist/src/core/DropdownMenu/index.test.d.ts +0 -1
- package/dist/src/core/DropdownMenu/index.test.js +0 -51
- package/dist/src/core/DropdownMenu/style.d.ts +0 -40
- package/dist/src/core/DropdownMenu/style.js +0 -85
- package/dist/src/core/Icon/Icon.namespace-test.d.ts +0 -1
- package/dist/src/core/Icon/Icon.namespace-test.js +0 -7
- package/dist/src/core/Icon/index.d.ts +0 -14
- package/dist/src/core/Icon/index.js +0 -25
- package/dist/src/core/Icon/index.stories.d.ts +0 -34
- package/dist/src/core/Icon/index.stories.js +0 -171
- package/dist/src/core/Icon/map.d.ts +0 -98
- package/dist/src/core/Icon/map.js +0 -476
- package/dist/src/core/Icon/style.d.ts +0 -36
- package/dist/src/core/Icon/style.js +0 -42
- package/dist/src/core/InputCheckbox/InputCheckbox.namespace-test.d.ts +0 -1
- package/dist/src/core/InputCheckbox/InputCheckbox.namespace-test.js +0 -9
- package/dist/src/core/InputCheckbox/index.d.ts +0 -13
- package/dist/src/core/InputCheckbox/index.js +0 -55
- package/dist/src/core/InputCheckbox/index.stories.d.ts +0 -35
- package/dist/src/core/InputCheckbox/index.stories.js +0 -119
- package/dist/src/core/InputCheckbox/index.test.d.ts +0 -1
- package/dist/src/core/InputCheckbox/index.test.js +0 -62
- package/dist/src/core/InputCheckbox/styles.d.ts +0 -6
- package/dist/src/core/InputCheckbox/styles.js +0 -24
- package/dist/src/core/InputDropdown/InputDropdown.namespace-test.d.ts +0 -1
- package/dist/src/core/InputDropdown/InputDropdown.namespace-test.js +0 -8
- package/dist/src/core/InputDropdown/index.d.ts +0 -8
- package/dist/src/core/InputDropdown/index.js +0 -83
- package/dist/src/core/InputDropdown/index.stories.d.ts +0 -59
- package/dist/src/core/InputDropdown/index.stories.js +0 -264
- package/dist/src/core/InputDropdown/index.test.d.ts +0 -1
- package/dist/src/core/InputDropdown/index.test.js +0 -58
- package/dist/src/core/InputDropdown/style.d.ts +0 -38
- package/dist/src/core/InputDropdown/style.js +0 -130
- package/dist/src/core/InputRadio/InputRadio.namespace-test.d.ts +0 -1
- package/dist/src/core/InputRadio/InputRadio.namespace-test.js +0 -8
- package/dist/src/core/InputRadio/index.d.ts +0 -14
- package/dist/src/core/InputRadio/index.js +0 -40
- package/dist/src/core/InputRadio/index.stories.d.ts +0 -32
- package/dist/src/core/InputRadio/index.stories.js +0 -64
- package/dist/src/core/InputRadio/index.test.d.ts +0 -1
- package/dist/src/core/InputRadio/index.test.js +0 -92
- package/dist/src/core/InputRadio/style.d.ts +0 -6
- package/dist/src/core/InputRadio/style.js +0 -24
- package/dist/src/core/InputSearch/InputSearch.namespace-test.d.ts +0 -1
- package/dist/src/core/InputSearch/InputSearch.namespace-test.js +0 -8
- package/dist/src/core/InputSearch/index.d.ts +0 -16
- package/dist/src/core/InputSearch/index.js +0 -75
- package/dist/src/core/InputSearch/index.stories.d.ts +0 -35
- package/dist/src/core/InputSearch/index.stories.js +0 -104
- package/dist/src/core/InputSearch/index.test.d.ts +0 -1
- package/dist/src/core/InputSearch/index.test.js +0 -70
- package/dist/src/core/InputSearch/style.d.ts +0 -12
- package/dist/src/core/InputSearch/style.js +0 -47
- package/dist/src/core/InputSlider/InputSlider.namespace-test.d.ts +0 -1
- package/dist/src/core/InputSlider/InputSlider.namespace-test.js +0 -7
- package/dist/src/core/InputSlider/__snapshots__/index.test.js.snap +0 -124
- package/dist/src/core/InputSlider/index.d.ts +0 -8
- package/dist/src/core/InputSlider/index.js +0 -23
- package/dist/src/core/InputSlider/index.stories.d.ts +0 -43
- package/dist/src/core/InputSlider/index.stories.js +0 -160
- package/dist/src/core/InputSlider/index.test.d.ts +0 -1
- package/dist/src/core/InputSlider/index.test.js +0 -52
- package/dist/src/core/InputSlider/style.d.ts +0 -76
- package/dist/src/core/InputSlider/style.js +0 -34
- package/dist/src/core/InputText/InputText.namespace-test.d.ts +0 -1
- package/dist/src/core/InputText/InputText.namespace-test.js +0 -7
- package/dist/src/core/InputText/__snapshots__/index.test.js.snap +0 -10
- package/dist/src/core/InputText/index.d.ts +0 -14
- package/dist/src/core/InputText/index.js +0 -52
- package/dist/src/core/InputText/index.stories.d.ts +0 -29
- package/dist/src/core/InputText/index.stories.js +0 -100
- package/dist/src/core/InputText/index.test.d.ts +0 -1
- package/dist/src/core/InputText/index.test.js +0 -67
- package/dist/src/core/InputText/style.d.ts +0 -13
- package/dist/src/core/InputText/style.js +0 -45
- package/dist/src/core/InputToggle/InputToggle.namespace-test.d.ts +0 -1
- package/dist/src/core/InputToggle/InputToggle.namespace-test.js +0 -7
- package/dist/src/core/InputToggle/__snapshots__/index.test.js.snap +0 -26
- package/dist/src/core/InputToggle/index.d.ts +0 -7
- package/dist/src/core/InputToggle/index.js +0 -42
- package/dist/src/core/InputToggle/index.stories.d.ts +0 -20
- package/dist/src/core/InputToggle/index.stories.js +0 -63
- package/dist/src/core/InputToggle/index.test.d.ts +0 -1
- package/dist/src/core/InputToggle/index.test.js +0 -52
- package/dist/src/core/InputToggle/style.d.ts +0 -9
- package/dist/src/core/InputToggle/style.js +0 -38
- package/dist/src/core/Link/Link.namespace-test.d.ts +0 -1
- package/dist/src/core/Link/Link.namespace-test.js +0 -7
- package/dist/src/core/Link/index.d.ts +0 -8
- package/dist/src/core/Link/index.js +0 -28
- package/dist/src/core/Link/index.stories.d.ts +0 -27
- package/dist/src/core/Link/index.stories.js +0 -99
- package/dist/src/core/Link/style.d.ts +0 -9
- package/dist/src/core/Link/style.js +0 -30
- package/dist/src/core/List/List.namespace-test.d.ts +0 -1
- package/dist/src/core/List/List.namespace-test.js +0 -7
- package/dist/src/core/List/index.d.ts +0 -8
- package/dist/src/core/List/index.js +0 -23
- package/dist/src/core/List/index.stories.d.ts +0 -4
- package/dist/src/core/List/index.stories.js +0 -30
- package/dist/src/core/List/style.d.ts +0 -17
- package/dist/src/core/List/style.js +0 -33
- package/dist/src/core/ListItem/ListItem.namespace-test.d.ts +0 -1
- package/dist/src/core/ListItem/ListItem.namespace-test.js +0 -7
- package/dist/src/core/ListItem/index.d.ts +0 -9
- package/dist/src/core/ListItem/index.js +0 -24
- package/dist/src/core/ListItem/style.d.ts +0 -26
- package/dist/src/core/ListItem/style.js +0 -56
- package/dist/src/core/ListSubheader/ListSubheader.namespace-test.d.ts +0 -1
- package/dist/src/core/ListSubheader/ListSubheader.namespace-test.js +0 -7
- package/dist/src/core/ListSubheader/index.d.ts +0 -7
- package/dist/src/core/ListSubheader/index.js +0 -22
- package/dist/src/core/ListSubheader/style.d.ts +0 -12
- package/dist/src/core/ListSubheader/style.js +0 -16
- package/dist/src/core/LoadingIndicator/LoadingIndicator.namespace-test.d.ts +0 -1
- package/dist/src/core/LoadingIndicator/LoadingIndicator.namespace-test.js +0 -7
- package/dist/src/core/LoadingIndicator/index.d.ts +0 -4
- package/dist/src/core/LoadingIndicator/index.js +0 -13
- package/dist/src/core/LoadingIndicator/index.stories.d.ts +0 -24
- package/dist/src/core/LoadingIndicator/index.stories.js +0 -77
- package/dist/src/core/LoadingIndicator/index.test.d.ts +0 -1
- package/dist/src/core/LoadingIndicator/index.test.js +0 -41
- package/dist/src/core/LoadingIndicator/style.d.ts +0 -7
- package/dist/src/core/LoadingIndicator/style.js +0 -36
- package/dist/src/core/Menu/Menu.namespace-test.d.ts +0 -1
- package/dist/src/core/Menu/Menu.namespace-test.js +0 -8
- package/dist/src/core/Menu/index.d.ts +0 -7
- package/dist/src/core/Menu/index.js +0 -30
- package/dist/src/core/Menu/index.stories.d.ts +0 -17
- package/dist/src/core/Menu/index.stories.js +0 -55
- package/dist/src/core/Menu/style.d.ts +0 -1
- package/dist/src/core/Menu/style.js +0 -15
- package/dist/src/core/MenuItem/MenuItem.namespace-test.d.ts +0 -1
- package/dist/src/core/MenuItem/MenuItem.namespace-test.js +0 -8
- package/dist/src/core/MenuItem/index.d.ts +0 -21
- package/dist/src/core/MenuItem/index.js +0 -42
- package/dist/src/core/MenuItem/index.stories.d.ts +0 -35
- package/dist/src/core/MenuItem/index.stories.js +0 -188
- package/dist/src/core/MenuItem/index.test.d.ts +0 -1
- package/dist/src/core/MenuItem/index.test.js +0 -41
- package/dist/src/core/MenuItem/style.d.ts +0 -65
- package/dist/src/core/MenuItem/style.js +0 -58
- package/dist/src/core/MenuSelect/index.d.ts +0 -19
- package/dist/src/core/MenuSelect/index.js +0 -70
- package/dist/src/core/MenuSelect/index.stories.d.ts +0 -34
- package/dist/src/core/MenuSelect/index.stories.js +0 -154
- package/dist/src/core/MenuSelect/style.d.ts +0 -12
- package/dist/src/core/MenuSelect/style.js +0 -45
- package/dist/src/core/NavigationJumpTo/NavigationJumpTo.namespace-test.d.ts +0 -1
- package/dist/src/core/NavigationJumpTo/NavigationJumpTo.namespace-test.js +0 -13
- package/dist/src/core/NavigationJumpTo/__snapshots__/index.test.js.snap +0 -319
- package/dist/src/core/NavigationJumpTo/index.d.ts +0 -13
- package/dist/src/core/NavigationJumpTo/index.js +0 -111
- package/dist/src/core/NavigationJumpTo/index.stories.d.ts +0 -56
- package/dist/src/core/NavigationJumpTo/index.stories.js +0 -216
- package/dist/src/core/NavigationJumpTo/index.test.d.ts +0 -1
- package/dist/src/core/NavigationJumpTo/index.test.js +0 -87
- package/dist/src/core/NavigationJumpTo/style.d.ts +0 -106
- package/dist/src/core/NavigationJumpTo/style.js +0 -27
- package/dist/src/core/NavigationJumpTo/useIntersection.d.ts +0 -19
- package/dist/src/core/NavigationJumpTo/useIntersection.js +0 -67
- package/dist/src/core/Notification/Notification.namespace-test.d.ts +0 -1
- package/dist/src/core/Notification/Notification.namespace-test.js +0 -8
- package/dist/src/core/Notification/index.d.ts +0 -17
- package/dist/src/core/Notification/index.js +0 -70
- package/dist/src/core/Notification/index.stories.d.ts +0 -43
- package/dist/src/core/Notification/index.stories.js +0 -186
- package/dist/src/core/Notification/index.test.d.ts +0 -1
- package/dist/src/core/Notification/index.test.js +0 -115
- package/dist/src/core/Notification/style.d.ts +0 -1
- package/dist/src/core/Notification/style.js +0 -26
- package/dist/src/core/Pagination/Pagination.namespace-test.d.ts +0 -1
- package/dist/src/core/Pagination/Pagination.namespace-test.js +0 -8
- package/dist/src/core/Pagination/components/PageListDropdown/index.d.ts +0 -7
- package/dist/src/core/Pagination/components/PageListDropdown/index.js +0 -27
- package/dist/src/core/Pagination/components/PageListDropdown/style.d.ts +0 -1
- package/dist/src/core/Pagination/components/PageListDropdown/style.js +0 -14
- package/dist/src/core/Pagination/index.d.ts +0 -15
- package/dist/src/core/Pagination/index.js +0 -47
- package/dist/src/core/Pagination/index.stories.d.ts +0 -21
- package/dist/src/core/Pagination/index.stories.js +0 -99
- package/dist/src/core/Pagination/index.test.d.ts +0 -1
- package/dist/src/core/Pagination/index.test.js +0 -128
- package/dist/src/core/Pagination/style.d.ts +0 -13
- package/dist/src/core/Pagination/style.js +0 -62
- package/dist/src/core/Pagination/usePagination.d.ts +0 -9
- package/dist/src/core/Pagination/usePagination.js +0 -69
- package/dist/src/core/SegmentedControl/SegmentedControl.namespace-test.d.ts +0 -1
- package/dist/src/core/SegmentedControl/SegmentedControl.namespace-test.js +0 -12
- package/dist/src/core/SegmentedControl/index.d.ts +0 -15
- package/dist/src/core/SegmentedControl/index.js +0 -38
- package/dist/src/core/SegmentedControl/index.stories.d.ts +0 -49
- package/dist/src/core/SegmentedControl/index.stories.js +0 -128
- package/dist/src/core/SegmentedControl/index.test.d.ts +0 -1
- package/dist/src/core/SegmentedControl/index.test.js +0 -41
- package/dist/src/core/SegmentedControl/style.d.ts +0 -2
- package/dist/src/core/SegmentedControl/style.js +0 -23
- package/dist/src/core/Table/Table.namespace-test.d.ts +0 -1
- package/dist/src/core/Table/Table.namespace-test.js +0 -7
- package/dist/src/core/Table/components/common.d.ts +0 -6
- package/dist/src/core/Table/components/common.js +0 -5
- package/dist/src/core/Table/index.d.ts +0 -7
- package/dist/src/core/Table/index.js +0 -21
- package/dist/src/core/Table/index.stories.d.ts +0 -18
- package/dist/src/core/Table/index.stories.js +0 -64
- package/dist/src/core/Table/index.test.d.ts +0 -1
- package/dist/src/core/Table/index.test.js +0 -89
- package/dist/src/core/Table/style.d.ts +0 -2
- package/dist/src/core/Table/style.js +0 -10
- package/dist/src/core/TableHeader/TableHeader.namespace-test.d.ts +0 -1
- package/dist/src/core/TableHeader/TableHeader.namespace-test.js +0 -7
- package/dist/src/core/TableHeader/index.d.ts +0 -6
- package/dist/src/core/TableHeader/index.js +0 -25
- package/dist/src/core/TableHeader/index.stories.d.ts +0 -12
- package/dist/src/core/TableHeader/index.stories.js +0 -38
- package/dist/src/core/TableHeader/index.test.d.ts +0 -1
- package/dist/src/core/TableHeader/index.test.js +0 -41
- package/dist/src/core/TableHeader/style.d.ts +0 -2
- package/dist/src/core/TableHeader/style.js +0 -14
- package/dist/src/core/TableRow/TableRow.namespace-test.d.ts +0 -1
- package/dist/src/core/TableRow/TableRow.namespace-test.js +0 -7
- package/dist/src/core/TableRow/__snapshots__/index.test.js.snap +0 -100
- package/dist/src/core/TableRow/index.d.ts +0 -13
- package/dist/src/core/TableRow/index.js +0 -28
- package/dist/src/core/TableRow/index.stories.d.ts +0 -24
- package/dist/src/core/TableRow/index.stories.js +0 -77
- package/dist/src/core/TableRow/index.test.d.ts +0 -1
- package/dist/src/core/TableRow/index.test.js +0 -92
- package/dist/src/core/TableRow/style.d.ts +0 -10
- package/dist/src/core/TableRow/style.js +0 -34
- package/dist/src/core/Tabs/Tabs.namespace-test.d.ts +0 -1
- package/dist/src/core/Tabs/Tabs.namespace-test.js +0 -8
- package/dist/src/core/Tabs/__snapshots__/index.test.js.snap +0 -46
- package/dist/src/core/Tabs/components/LabelWithCount/index.d.ts +0 -7
- package/dist/src/core/Tabs/components/LabelWithCount/index.js +0 -11
- package/dist/src/core/Tabs/components/LabelWithCount/style.d.ts +0 -10
- package/dist/src/core/Tabs/components/LabelWithCount/style.js +0 -43
- package/dist/src/core/Tabs/components/common.d.ts +0 -5
- package/dist/src/core/Tabs/components/common.js +0 -5
- package/dist/src/core/Tabs/index.d.ts +0 -13
- package/dist/src/core/Tabs/index.js +0 -89
- package/dist/src/core/Tabs/index.stories.d.ts +0 -38
- package/dist/src/core/Tabs/index.stories.js +0 -154
- package/dist/src/core/Tabs/index.test.d.ts +0 -1
- package/dist/src/core/Tabs/index.test.js +0 -48
- package/dist/src/core/Tabs/style.d.ts +0 -115
- package/dist/src/core/Tabs/style.js +0 -53
- package/dist/src/core/Tag/Tag.namespace-test.d.ts +0 -1
- package/dist/src/core/Tag/Tag.namespace-test.js +0 -7
- package/dist/src/core/Tag/index.d.ts +0 -17
- package/dist/src/core/Tag/index.js +0 -27
- package/dist/src/core/Tag/index.stories.d.ts +0 -98
- package/dist/src/core/Tag/index.stories.js +0 -238
- package/dist/src/core/Tag/index.test.d.ts +0 -1
- package/dist/src/core/Tag/index.test.js +0 -40
- package/dist/src/core/Tag/index.testUtils.d.ts +0 -8
- package/dist/src/core/Tag/index.testUtils.js +0 -108
- package/dist/src/core/Tag/style.d.ts +0 -29
- package/dist/src/core/Tag/style.js +0 -100
- package/dist/src/core/TagFilter/TagFilter.namespace-test.d.ts +0 -1
- package/dist/src/core/TagFilter/TagFilter.namespace-test.js +0 -8
- package/dist/src/core/TagFilter/__snapshots__/index.test.js.snap +0 -46
- package/dist/src/core/TagFilter/index.d.ts +0 -12
- package/dist/src/core/TagFilter/index.js +0 -23
- package/dist/src/core/TagFilter/index.stories.d.ts +0 -44
- package/dist/src/core/TagFilter/index.stories.js +0 -121
- package/dist/src/core/TagFilter/index.test.d.ts +0 -1
- package/dist/src/core/TagFilter/index.test.js +0 -40
- package/dist/src/core/TagFilter/style.d.ts +0 -7
- package/dist/src/core/TagFilter/style.js +0 -19
- package/dist/src/core/Tooltip/Tooltip.namespace-test.d.ts +0 -1
- package/dist/src/core/Tooltip/Tooltip.namespace-test.js +0 -7
- package/dist/src/core/Tooltip/index.d.ts +0 -14
- package/dist/src/core/Tooltip/index.js +0 -87
- package/dist/src/core/Tooltip/index.stories.d.ts +0 -48
- package/dist/src/core/Tooltip/index.stories.js +0 -257
- package/dist/src/core/Tooltip/index.test.d.ts +0 -1
- package/dist/src/core/Tooltip/index.test.js +0 -102
- package/dist/src/core/Tooltip/style.d.ts +0 -23
- package/dist/src/core/Tooltip/style.js +0 -47
- package/dist/src/core/TooltipCondensed/TooltipCondensed.namespace-test.d.ts +0 -1
- package/dist/src/core/TooltipCondensed/TooltipCondensed.namespace-test.js +0 -7
- package/dist/src/core/TooltipCondensed/index.d.ts +0 -13
- package/dist/src/core/TooltipCondensed/index.js +0 -43
- package/dist/src/core/TooltipCondensed/index.stories.d.ts +0 -27
- package/dist/src/core/TooltipCondensed/index.stories.js +0 -72
- package/dist/src/core/TooltipCondensed/index.test.d.ts +0 -1
- package/dist/src/core/TooltipCondensed/index.test.js +0 -85
- package/dist/src/core/TooltipCondensed/style.d.ts +0 -6
- package/dist/src/core/TooltipCondensed/style.js +0 -22
- package/dist/src/core/TooltipTable/TooltipTable.namespace-test.d.ts +0 -1
- package/dist/src/core/TooltipTable/TooltipTable.namespace-test.js +0 -23
- package/dist/src/core/TooltipTable/__snapshots__/index.test.js.snap +0 -272
- package/dist/src/core/TooltipTable/index.d.ts +0 -8
- package/dist/src/core/TooltipTable/index.js +0 -35
- package/dist/src/core/TooltipTable/index.stories.d.ts +0 -32
- package/dist/src/core/TooltipTable/index.stories.js +0 -128
- package/dist/src/core/TooltipTable/index.test.d.ts +0 -1
- package/dist/src/core/TooltipTable/index.test.js +0 -109
- package/dist/src/core/TooltipTable/style.d.ts +0 -25
- package/dist/src/core/TooltipTable/style.js +0 -46
- package/dist/src/core/styles/common/constants/black.d.ts +0 -3
- package/dist/src/core/styles/common/constants/black.js +0 -7
- package/dist/src/core/styles/common/constants/boxShadows.d.ts +0 -5
- package/dist/src/core/styles/common/constants/boxShadows.js +0 -9
- package/dist/src/core/styles/common/constants/fontWeights.d.ts +0 -7
- package/dist/src/core/styles/common/constants/fontWeights.js +0 -11
- package/dist/src/core/styles/common/constants/gray.d.ts +0 -8
- package/dist/src/core/styles/common/constants/gray.js +0 -12
- package/dist/src/core/styles/common/constants/spaces.d.ts +0 -11
- package/dist/src/core/styles/common/constants/spaces.js +0 -15
- package/dist/src/core/styles/common/constants/white.d.ts +0 -3
- package/dist/src/core/styles/common/constants/white.js +0 -7
- package/dist/src/core/styles/common/defaultTheme.d.ts +0 -129
- package/dist/src/core/styles/common/defaultTheme.js +0 -414
- package/dist/src/core/styles/common/mixins/fonts.d.ts +0 -27
- package/dist/src/core/styles/common/mixins/fonts.js +0 -60
- package/dist/src/core/styles/common/selectors/theme.d.ts +0 -15
- package/dist/src/core/styles/common/selectors/theme.js +0 -63
- package/dist/src/core/styles/index.d.ts +0 -3
- package/dist/src/core/styles/index.js +0 -19
- package/dist/src/index.d.ts +0 -100
- package/dist/src/index.js +0 -170
- package/dist/tsconfig-namespace-check.tsbuildinfo +0 -1
|
@@ -1,64 +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 InputRadio = function (props) {
|
|
22
|
-
var caption = props.caption, label = props.label;
|
|
23
|
-
return ((0, jsx_runtime_1.jsx)(material_1.RadioGroup, { "aria-labelledby": "demo-radio-buttons-group-label", defaultValue: "demo", name: "radio-buttons-group", children: (0, jsx_runtime_1.jsx)(index_1.default, __assign({ caption: caption, label: label, value: "demo" }, props)) }));
|
|
24
|
-
};
|
|
25
|
-
exports.default = {
|
|
26
|
-
component: InputRadio,
|
|
27
|
-
title: "Inputs/InputRadio",
|
|
28
|
-
};
|
|
29
|
-
// Default
|
|
30
|
-
exports.Default = {
|
|
31
|
-
args: {
|
|
32
|
-
caption: "Caption",
|
|
33
|
-
disabled: false,
|
|
34
|
-
label: "Label",
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
// Live Preview
|
|
38
|
-
var LivePreviewDemo = function (props) {
|
|
39
|
-
var label = props.label;
|
|
40
|
-
return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsxs)(material_1.RadioGroup, { "aria-labelledby": "demo-input-radio-group-label", defaultValue: "demo1", name: "input-radio-group", "data-testid": "radioButtonGroup", children: [(0, jsx_runtime_1.jsx)(index_1.default, { "data-testid": "inputRadio", label: label, value: "demo1" }), (0, jsx_runtime_1.jsx)(index_1.default, { caption: "Caption", "data-testid": "inputRadio", label: label, value: "demo2" }), (0, jsx_runtime_1.jsx)(index_1.default, { caption: "Caption", "data-testid": "inputRadio", label: label, value: "demo3" })] }) }));
|
|
41
|
-
};
|
|
42
|
-
exports.LivePreview = {
|
|
43
|
-
args: {
|
|
44
|
-
label: "Label",
|
|
45
|
-
},
|
|
46
|
-
parameters: {
|
|
47
|
-
snapshot: {
|
|
48
|
-
skip: true,
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
render: function (args) { return (0, jsx_runtime_1.jsx)(LivePreviewDemo, __assign({}, args)); },
|
|
52
|
-
};
|
|
53
|
-
// Test
|
|
54
|
-
exports.Test = {
|
|
55
|
-
args: {
|
|
56
|
-
label: "Test Label",
|
|
57
|
-
},
|
|
58
|
-
parameters: {
|
|
59
|
-
snapshot: {
|
|
60
|
-
skip: true,
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
render: function (args) { return (0, jsx_runtime_1.jsx)(LivePreviewDemo, __assign({}, args)); },
|
|
64
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,92 +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
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
39
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
40
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
41
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
42
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
|
-
});
|
|
44
|
-
};
|
|
45
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
46
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
47
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
48
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
49
|
-
function step(op) {
|
|
50
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
51
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
52
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
53
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
54
|
-
switch (op[0]) {
|
|
55
|
-
case 0: case 1: t = op; break;
|
|
56
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
57
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
58
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
59
|
-
default:
|
|
60
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
61
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
62
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
63
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
64
|
-
if (t[2]) _.ops.pop();
|
|
65
|
-
_.trys.pop(); continue;
|
|
66
|
-
}
|
|
67
|
-
op = body.call(thisArg, _);
|
|
68
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
69
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
73
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
74
|
-
var story_utils_1 = require("@chanzuckerberg/story-utils");
|
|
75
|
-
var react_1 = require("@storybook/react");
|
|
76
|
-
var react_2 = require("@testing-library/react");
|
|
77
|
-
var snapshotTestStoryFile = __importStar(require("./index.stories"));
|
|
78
|
-
var index_stories_1 = __importStar(require("./index.stories"));
|
|
79
|
-
// Returns a component that already contain all decorators from story level, meta level and global level.
|
|
80
|
-
var Test = (0, react_1.composeStory)(index_stories_1.Test, index_stories_1.default);
|
|
81
|
-
describe("<InputRadio />", function () {
|
|
82
|
-
(0, story_utils_1.generateSnapshots)(snapshotTestStoryFile);
|
|
83
|
-
it("renders 3 radio buttons", function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
84
|
-
var radio;
|
|
85
|
-
return __generator(this, function (_a) {
|
|
86
|
-
(0, react_2.render)((0, jsx_runtime_1.jsx)(Test, __assign({}, Test.args)));
|
|
87
|
-
radio = react_2.screen.getAllByTestId("inputRadio");
|
|
88
|
-
expect(radio).toHaveLength(3);
|
|
89
|
-
return [2 /*return*/];
|
|
90
|
-
});
|
|
91
|
-
}); });
|
|
92
|
-
});
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { CommonThemeProps } from "../styles";
|
|
2
|
-
export interface RadioExtraProps extends CommonThemeProps {
|
|
3
|
-
caption?: string;
|
|
4
|
-
}
|
|
5
|
-
export declare const StyledFormControlLabel: import("@emotion/styled").StyledComponent<import("@mui/material").FormControlLabelProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & RadioExtraProps, {}, {}>;
|
|
6
|
-
export declare const StyledRadioButton: import("@emotion/styled").StyledComponent<import("@mui/material").RadioProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -1,24 +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.StyledRadioButton = exports.StyledFormControlLabel = void 0;
|
|
8
|
-
var material_1 = require("@mui/material");
|
|
9
|
-
var styles_1 = require("@mui/material/styles");
|
|
10
|
-
var styles_2 = require("../styles");
|
|
11
|
-
exports.StyledFormControlLabel = (0, styles_1.styled)(material_1.FormControlLabel)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (props) {
|
|
12
|
-
var caption = props.caption;
|
|
13
|
-
var content = caption === undefined ? "" : caption;
|
|
14
|
-
var typography = (0, styles_2.getTypography)(props);
|
|
15
|
-
var colors = (0, styles_2.getColors)(props);
|
|
16
|
-
var spaces = (0, styles_2.getSpaces)(props);
|
|
17
|
-
return "\n position: relative;\n z-index: 0;\n padding-bottom: ".concat(caption === undefined ? 0 : spaces === null || spaces === void 0 ? void 0 : spaces.xl, "px;\n \n &:after {\n ").concat(styles_2.fontBodyXxs, "\n font-size: 12px;\n left: 34px;\n position: absolute;\n top: 30px;\n z-index: -1;\n content: \"").concat(content, "\";\n font-family: ").concat(typography === null || typography === void 0 ? void 0 : typography.fontFamily, ";\n color: ").concat(colors === null || colors === void 0 ? void 0 : colors.gray[500], "; \n \n }\n ");
|
|
18
|
-
});
|
|
19
|
-
exports.StyledRadioButton = (0, styles_1.styled)(material_1.Radio)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (props) {
|
|
20
|
-
var colors = (0, styles_2.getColors)(props);
|
|
21
|
-
var iconSizes = (0, styles_2.getIconSizes)(props);
|
|
22
|
-
return "\n color: ".concat(colors === null || colors === void 0 ? void 0 : colors.gray[400], ";\n &:hover {\n color: ").concat(colors === null || colors === void 0 ? void 0 : colors.gray[500], ";\n background-color: transparent;\n }\n &.Mui-disabled {\n color: ").concat(colors === null || colors === void 0 ? void 0 : colors.gray[300], ";\n }\n &.Mui-checked {\n color: ").concat(colors === null || colors === void 0 ? void 0 : colors.primary[400], ";\n &:hover {\n color: ").concat(colors === null || colors === void 0 ? void 0 : colors.primary[500], ";\n background-color: transparent;\n }\n &.Mui-disabled {\n color: ").concat(colors === null || colors === void 0 ? void 0 : colors.primary[300], "\n }\n }\n\n .MuiSvgIcon-root {\n height: ").concat(iconSizes === null || iconSizes === void 0 ? void 0 : iconSizes.input.height, "px;\n width: ").concat(iconSizes === null || iconSizes === void 0 ? void 0 : iconSizes.input.width, "px;\n }\n ");
|
|
23
|
-
});
|
|
24
|
-
var templateObject_1, templateObject_2;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
-
var components_1 = require("@czi-sds/components");
|
|
5
|
-
var utils_1 = require("src/common/utils");
|
|
6
|
-
var InputSearchNameSpaceTest = function (props) {
|
|
7
|
-
return ((0, jsx_runtime_1.jsx)(components_1.InputSearch, { id: "2", placeholder: "Search ...", label: "Search Label", disabled: false, sdsStyle: "rounded", sdsStage: "default", intent: "default", handleSubmit: utils_1.noop, name: "input-search-name" }));
|
|
8
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { TextFieldProps as RawTextFieldSearchProps } from "@mui/material";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { InputSearchExtraProps } from "./style";
|
|
4
|
-
export interface AccessibleInputSearchProps {
|
|
5
|
-
label: string;
|
|
6
|
-
placeholder?: string;
|
|
7
|
-
id: string;
|
|
8
|
-
handleSubmit?: (value: string) => void;
|
|
9
|
-
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
10
|
-
}
|
|
11
|
-
export type InputSearchProps = Omit<RawTextFieldSearchProps, "nonce" | "rev" | "rel" | "content"> & AccessibleInputSearchProps & InputSearchExtraProps;
|
|
12
|
-
/**
|
|
13
|
-
* @see https://mui.com/material-ui/react-text-field/
|
|
14
|
-
*/
|
|
15
|
-
declare const InputSearch: React.ForwardRefExoticComponent<Pick<InputSearchProps, "className" | "style" | "classes" | "children" | "sx" | "variant" | "color" | "translate" | "margin" | "slot" | "select" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "fullWidth" | "size" | "name" | "type" | "value" | "autoComplete" | "required" | "rows" | "error" | "inputProps" | "inputRef" | "focused" | "hiddenLabel" | "InputProps" | "FormHelperTextProps" | "helperText" | "InputLabelProps" | "multiline" | "maxRows" | "minRows" | "SelectProps" | keyof AccessibleInputSearchProps | keyof InputSearchExtraProps> & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
-
export default InputSearch;
|
|
@@ -1,75 +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 style_1 = require("./style");
|
|
33
|
-
/**
|
|
34
|
-
* @see https://mui.com/material-ui/react-text-field/
|
|
35
|
-
*/
|
|
36
|
-
var InputSearch = (0, react_1.forwardRef)(function InputSearch(props, ref) {
|
|
37
|
-
var label = props.label, id = props.id, placeholder = props.placeholder, _a = props.sdsStyle, sdsStyle = _a === void 0 ? "square" : _a, _b = props.intent, intent = _b === void 0 ? "default" : _b, handleSubmit = props.handleSubmit, onChange = props.onChange, rest = __rest(props, ["label", "id", "placeholder", "sdsStyle", "intent", "handleSubmit", "onChange"]);
|
|
38
|
-
var _c = (0, react_1.useState)(false), hasValue = _c[0], setHasValue = _c[1];
|
|
39
|
-
var _d = (0, react_1.useState)(""), value = _d[0], setValue = _d[1];
|
|
40
|
-
var handleChange = function (event) {
|
|
41
|
-
if (event.target.value) {
|
|
42
|
-
setHasValue(true);
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
setHasValue(false);
|
|
46
|
-
}
|
|
47
|
-
setValue(event.target.value);
|
|
48
|
-
if (onChange)
|
|
49
|
-
onChange(event);
|
|
50
|
-
};
|
|
51
|
-
var localHandleSubmit = function () {
|
|
52
|
-
if (handleSubmit)
|
|
53
|
-
handleSubmit(value);
|
|
54
|
-
};
|
|
55
|
-
var handleKeyPress = function (event) {
|
|
56
|
-
if (event.key === "Enter") {
|
|
57
|
-
event.preventDefault();
|
|
58
|
-
if (handleSubmit)
|
|
59
|
-
handleSubmit(value);
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
if (!id || !label) {
|
|
63
|
-
// eslint-disable-next-line no-console
|
|
64
|
-
console.error("Error: @czi-sds/components component InputText requires id and label props for accessibility.");
|
|
65
|
-
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
|
|
66
|
-
}
|
|
67
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(style_1.StyledLabel, { htmlFor: id, children: label }), (0, jsx_runtime_1.jsx)(style_1.StyledSearchBase, __assign({ ref: ref,
|
|
68
|
-
// passed to mui Input
|
|
69
|
-
InputProps: {
|
|
70
|
-
endAdornment: ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, { position: "end", children: (0, jsx_runtime_1.jsx)(ButtonIcon_1.default, { "aria-label": "search-button", onClick: localHandleSubmit, sdsType: "secondary", sdsSize: "small", sdsIconProps: {
|
|
71
|
-
sdsType: "interactive",
|
|
72
|
-
}, sdsIcon: "search" }) })),
|
|
73
|
-
}, type: "search", id: id, variant: "outlined", size: "small", placeholder: placeholder, value: value, sdsStyle: sdsStyle, sdsStage: hasValue ? "userInput" : "default", onChange: handleChange, onKeyPress: handleKeyPress, intent: intent }, rest))] }));
|
|
74
|
-
});
|
|
75
|
-
exports.default = InputSearch;
|
|
@@ -1,35 +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
|
-
id: string;
|
|
8
|
-
label: string;
|
|
9
|
-
placeholder: string;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
export declare const RoundLivePreview: {
|
|
13
|
-
parameters: {
|
|
14
|
-
snapshot: {
|
|
15
|
-
skip: boolean;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
render: (args: Args) => JSX.Element;
|
|
19
|
-
};
|
|
20
|
-
export declare const SquareLivePreview: {
|
|
21
|
-
parameters: {
|
|
22
|
-
snapshot: {
|
|
23
|
-
skip: boolean;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
render: (args: Args) => JSX.Element;
|
|
27
|
-
};
|
|
28
|
-
export declare const Test: {
|
|
29
|
-
parameters: {
|
|
30
|
-
snapshot: {
|
|
31
|
-
skip: boolean;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
render: (args: Args) => JSX.Element;
|
|
35
|
-
};
|
|
@@ -1,104 +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.SquareLivePreview = exports.RoundLivePreview = exports.Default = void 0;
|
|
18
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
-
var addon_actions_1 = require("@storybook/addon-actions");
|
|
20
|
-
var index_1 = __importDefault(require("./index"));
|
|
21
|
-
var InputSearch = function (props) {
|
|
22
|
-
var id = props.id, placeholder = props.placeholder, label = props.label, disabled = props.disabled, sdsStyle = props.sdsStyle, sdsStage = props.sdsStage, intent = props.intent;
|
|
23
|
-
var handleSubmit = function (value) {
|
|
24
|
-
// eslint-disable-next-line no-console
|
|
25
|
-
console.log(value);
|
|
26
|
-
};
|
|
27
|
-
return ((0, jsx_runtime_1.jsx)(index_1.default, { id: id, placeholder: placeholder, label: label, disabled: disabled, sdsStyle: sdsStyle, sdsStage: sdsStage, intent: intent, handleSubmit: handleSubmit, name: "input-search-name" }));
|
|
28
|
-
};
|
|
29
|
-
exports.default = {
|
|
30
|
-
argTypes: {
|
|
31
|
-
disabled: {
|
|
32
|
-
control: { type: "boolean" },
|
|
33
|
-
},
|
|
34
|
-
id: {
|
|
35
|
-
control: { type: "text" },
|
|
36
|
-
required: true,
|
|
37
|
-
},
|
|
38
|
-
intent: {
|
|
39
|
-
control: { type: "radio" },
|
|
40
|
-
options: ["default", "error", "warning"],
|
|
41
|
-
},
|
|
42
|
-
label: {
|
|
43
|
-
control: { type: "text" },
|
|
44
|
-
required: true,
|
|
45
|
-
},
|
|
46
|
-
placeholder: {
|
|
47
|
-
control: { type: "text" },
|
|
48
|
-
},
|
|
49
|
-
sdsStage: {
|
|
50
|
-
control: { type: "radio" },
|
|
51
|
-
options: ["default", "userInput"],
|
|
52
|
-
},
|
|
53
|
-
sdsStyle: {
|
|
54
|
-
control: { type: "radio" },
|
|
55
|
-
options: ["rounded", "square"],
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
component: InputSearch,
|
|
59
|
-
title: "Inputs/InputSearch",
|
|
60
|
-
};
|
|
61
|
-
// Default
|
|
62
|
-
exports.Default = {
|
|
63
|
-
args: {
|
|
64
|
-
disabled: false,
|
|
65
|
-
id: "Test",
|
|
66
|
-
label: "Search",
|
|
67
|
-
placeholder: "Search",
|
|
68
|
-
},
|
|
69
|
-
};
|
|
70
|
-
// Live Preview
|
|
71
|
-
var RoundLivePreviewDemo = function (props) {
|
|
72
|
-
return ((0, jsx_runtime_1.jsx)(index_1.default, __assign({}, props, { id: "squareSearchPreview", label: "Search", sdsStyle: "rounded", placeholder: "Search", handleSubmit: (0, addon_actions_1.action)("onSubmit"), name: "round-input-search" })));
|
|
73
|
-
};
|
|
74
|
-
exports.RoundLivePreview = {
|
|
75
|
-
parameters: {
|
|
76
|
-
snapshot: {
|
|
77
|
-
skip: true,
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
render: function (args) { return (0, jsx_runtime_1.jsx)(RoundLivePreviewDemo, __assign({}, args)); },
|
|
81
|
-
};
|
|
82
|
-
var SquareLivePreviewDemo = function (props) {
|
|
83
|
-
return ((0, jsx_runtime_1.jsx)(index_1.default, __assign({}, props, { id: "squareSearchPreview", label: "Search", sdsStyle: "square", placeholder: "Search", handleSubmit: (0, addon_actions_1.action)("onSubmit"), name: "square-input-search" })));
|
|
84
|
-
};
|
|
85
|
-
exports.SquareLivePreview = {
|
|
86
|
-
parameters: {
|
|
87
|
-
snapshot: {
|
|
88
|
-
skip: true,
|
|
89
|
-
},
|
|
90
|
-
},
|
|
91
|
-
render: function (args) { return (0, jsx_runtime_1.jsx)(SquareLivePreviewDemo, __assign({}, args)); },
|
|
92
|
-
};
|
|
93
|
-
// Test
|
|
94
|
-
var TestDemo = function (props) {
|
|
95
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(index_1.default, __assign({ id: "test-round", sdsStyle: "rounded", label: "Round Search", placeholder: "Search", "data-testid": "inputSearchRound", handleSubmit: (0, addon_actions_1.action)("onSubmit"), name: "round-search" }, props)), (0, jsx_runtime_1.jsx)(index_1.default, __assign({ id: "test-square", sdsStyle: "square", label: "Square Search", placeholder: "Search", "data-testid": "inputSearchSquare", handleSubmit: (0, addon_actions_1.action)("onSubmit"), name: "square-search" }, props)), (0, jsx_runtime_1.jsx)(index_1.default, { sdsStyle: "square", placeholder: "Search", "data-testid": "inputSearchFail", handleSubmit: (0, addon_actions_1.action)("onSubmit"), name: "with-error" })] }));
|
|
96
|
-
};
|
|
97
|
-
exports.Test = {
|
|
98
|
-
parameters: {
|
|
99
|
-
snapshot: {
|
|
100
|
-
skip: true,
|
|
101
|
-
},
|
|
102
|
-
},
|
|
103
|
-
render: function (args) { return (0, jsx_runtime_1.jsx)(TestDemo, __assign({}, args)); },
|
|
104
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,70 +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("<InputSearch />", function () {
|
|
46
|
-
(0, story_utils_1.generateSnapshots)(snapshotTestStoryFile);
|
|
47
|
-
it("renders inputSearch component", function () {
|
|
48
|
-
(0, react_2.render)((0, jsx_runtime_1.jsx)(Test, __assign({}, Test.args)));
|
|
49
|
-
var inputSearchRoundElement = react_2.screen.getByTestId("inputSearchRound");
|
|
50
|
-
expect(inputSearchRoundElement).not.toBeNull();
|
|
51
|
-
var inputSearchSquareElement = react_2.screen.getByTestId("inputSearchSquare");
|
|
52
|
-
expect(inputSearchSquareElement).not.toBeNull();
|
|
53
|
-
});
|
|
54
|
-
it("component fails if missing id or label prop", function () {
|
|
55
|
-
(0, react_2.render)((0, jsx_runtime_1.jsx)(Test, {}));
|
|
56
|
-
var inputTextElement = react_2.screen.queryByTestId("inputSearchFail");
|
|
57
|
-
expect(inputTextElement).toBeNull();
|
|
58
|
-
});
|
|
59
|
-
it("no label is rendered, but component is still accessible", function () {
|
|
60
|
-
(0, react_2.render)((0, jsx_runtime_1.jsx)(Test, {}));
|
|
61
|
-
var inputSearchElement = react_2.screen.getByLabelText("Round Search");
|
|
62
|
-
expect(inputSearchElement).not.toBeNull();
|
|
63
|
-
});
|
|
64
|
-
it("input value updates on change", function () {
|
|
65
|
-
(0, react_2.render)((0, jsx_runtime_1.jsx)(Test, {}));
|
|
66
|
-
var input = react_2.screen.getByLabelText("Round Search");
|
|
67
|
-
react_2.fireEvent.change(input, { target: { value: "apple" } });
|
|
68
|
-
expect(input.value).toBe("apple");
|
|
69
|
-
});
|
|
70
|
-
});
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { CommonThemeProps } from "../styles";
|
|
3
|
-
export interface InputSearchExtraProps extends CommonThemeProps {
|
|
4
|
-
disabled?: boolean;
|
|
5
|
-
intent?: "default" | "error" | "warning";
|
|
6
|
-
sdsStyle?: "rounded" | "square";
|
|
7
|
-
sdsStage?: "default" | "userInput";
|
|
8
|
-
}
|
|
9
|
-
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>, {}>;
|
|
10
|
-
export declare const StyledSearchBase: import("@emotion/styled").StyledComponent<{
|
|
11
|
-
variant?: import("@mui/material").TextFieldVariants | undefined;
|
|
12
|
-
} & Omit<import("@mui/material").OutlinedTextFieldProps | import("@mui/material").FilledTextFieldProps | import("@mui/material").StandardTextFieldProps, "variant"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & InputSearchExtraProps, {}, {}>;
|
|
@@ -1,47 +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.StyledSearchBase = 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", "intent", "handleSubmit"];
|
|
13
|
-
var rounded = function (props) {
|
|
14
|
-
var corners = (0, styles_2.getCorners)(props);
|
|
15
|
-
var borders = (0, styles_2.getBorders)(props);
|
|
16
|
-
return (0, react_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n .", " {\n border-radius: ", "px;\n border: ", ";\n }\n "], ["\n .", " {\n border-radius: ", "px;\n border: ", ";\n }\n "])), material_1.outlinedInputClasses.notchedOutline, corners === null || corners === void 0 ? void 0 : corners.l, borders === null || borders === void 0 ? void 0 : borders.gray[400]);
|
|
17
|
-
};
|
|
18
|
-
var error = function (props) {
|
|
19
|
-
var borders = (0, styles_2.getBorders)(props);
|
|
20
|
-
return (0, react_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n .", " {\n border: ", ";\n }\n "], ["\n .", " {\n border: ", ";\n }\n "])), material_1.outlinedInputClasses.notchedOutline, borders === null || borders === void 0 ? void 0 : borders.error[400]);
|
|
21
|
-
};
|
|
22
|
-
var warning = function (props) {
|
|
23
|
-
var borders = (0, styles_2.getBorders)(props);
|
|
24
|
-
return (0, react_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n .", " {\n border: ", ";\n }\n "], ["\n .", " {\n border: ", ";\n }\n "])), material_1.outlinedInputClasses.notchedOutline, borders === null || borders === void 0 ? void 0 : borders.warning[400]);
|
|
25
|
-
};
|
|
26
|
-
var disabledStyled = function (props) {
|
|
27
|
-
var borders = (0, styles_2.getBorders)(props);
|
|
28
|
-
var colors = (0, styles_2.getColors)(props);
|
|
29
|
-
return (0, react_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n .Mui-disabled {\n .", " {\n border: ", ";\n }\n\n .MuiInputAdornment-root svg {\n color: ", ";\n }\n\n &:hover .", " {\n border: ", ";\n }\n }\n "], ["\n .Mui-disabled {\n .", " {\n border: ", ";\n }\n\n .MuiInputAdornment-root svg {\n color: ", ";\n }\n\n &:hover .", " {\n border: ", ";\n }\n }\n "])), material_1.outlinedInputClasses.notchedOutline, borders === null || borders === void 0 ? void 0 : borders.gray[300], colors === null || colors === void 0 ? void 0 : colors.gray[300], material_1.outlinedInputClasses.notchedOutline, borders === null || borders === void 0 ? void 0 : borders.gray[300]);
|
|
30
|
-
};
|
|
31
|
-
exports.StyledLabel = (0, styles_1.styled)("label")(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n ", "\n ", "\n"], ["\n ", "\n ", "\n"])), styles_2.fontBodyM, function (props) {
|
|
32
|
-
var typography = (0, styles_2.getTypography)(props);
|
|
33
|
-
var spacings = (0, styles_2.getSpaces)(props);
|
|
34
|
-
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 position: absolute;\n overflow: hidden;\n clip: rect(0 0 0 0);\n height: 1px;\n width: 1px;\n margin: -1px; \n padding: 0; \n border: 0;\n ");
|
|
35
|
-
});
|
|
36
|
-
exports.StyledSearchBase = (0, styles_1.styled)(material_1.TextField, {
|
|
37
|
-
shouldForwardProp: function (prop) {
|
|
38
|
-
return !sdsPropNames.includes(prop.toString());
|
|
39
|
-
},
|
|
40
|
-
})(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (props) {
|
|
41
|
-
var intent = props.intent, disabled = props.disabled, sdsStyle = props.sdsStyle;
|
|
42
|
-
var spacings = (0, styles_2.getSpaces)(props);
|
|
43
|
-
var borders = (0, styles_2.getBorders)(props);
|
|
44
|
-
var colors = (0, styles_2.getColors)(props);
|
|
45
|
-
return (0, react_1.css)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n margin-top: ", "px;\n margin-bottom: ", "px;\n margin-right: ", "px;\n min-width: 120px;\n display: block;\n\n .", " {\n .", " {\n border: ", ";\n }\n }\n\n .", " {\n padding: ", "px 0 ", "px ", "px;\n height: 34px;\n box-sizing: border-box;\n background-color: #fff;\n }\n\n .", ":hover\n .", " {\n border: ", ";\n }\n\n .", ".Mui-focused {\n .", " {\n border: ", ";\n }\n\n .", " svg {\n color: ", ";\n }\n }\n\n ", "\n ", "\n ", "\n ", "\n "], ["\n margin-top: ", "px;\n margin-bottom: ", "px;\n margin-right: ", "px;\n min-width: 120px;\n display: block;\n\n .", " {\n .", " {\n border: ", ";\n }\n }\n\n .", " {\n padding: ", "px 0 ", "px ", "px;\n height: 34px;\n box-sizing: border-box;\n background-color: #fff;\n }\n\n .", ":hover\n .", " {\n border: ", ";\n }\n\n .", ".Mui-focused {\n .", " {\n border: ", ";\n }\n\n .", " svg {\n color: ", ";\n }\n }\n\n ", "\n ", "\n ", "\n ", "\n "])), spacings === null || spacings === void 0 ? void 0 : spacings.m, spacings === null || spacings === void 0 ? void 0 : spacings.m, spacings === null || spacings === void 0 ? void 0 : spacings.xl, material_1.outlinedInputClasses.root, material_1.outlinedInputClasses.notchedOutline, borders === null || borders === void 0 ? void 0 : borders.gray[400], material_1.inputBaseClasses.inputSizeSmall, spacings === null || spacings === void 0 ? void 0 : spacings.xs, spacings === null || spacings === void 0 ? void 0 : spacings.xs, spacings === null || spacings === void 0 ? void 0 : spacings.l, material_1.outlinedInputClasses.root, material_1.outlinedInputClasses.notchedOutline, borders === null || borders === void 0 ? void 0 : borders.gray[500], material_1.outlinedInputClasses.root, material_1.outlinedInputClasses.notchedOutline, borders === null || borders === void 0 ? void 0 : borders.primary[400], material_1.inputAdornmentClasses.root, colors === null || colors === void 0 ? void 0 : colors.primary[400], sdsStyle === "rounded" && rounded(props), intent === "error" && error(props), intent === "warning" && warning(props), disabled && disabledStyled(props));
|
|
46
|
-
});
|
|
47
|
-
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 InputSearchNameSpaceTest = function (props) {
|
|
6
|
-
return ((0, jsx_runtime_1.jsx)(components_1.InputSlider, { defaultValue: 10, disabled: false, marks: false, max: 100, min: 0, orientation: "horizontal", step: 1, valueLabelDisplay: "auto" }));
|
|
7
|
-
};
|