@czi-sds/components 15.1.1 → 15.2.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 +5 -3
- package/dist/index.cjs.js +73 -31
- package/dist/index.esm.d.ts +5 -3
- package/dist/index.esm.js +73 -31
- package/dist/src/common/helpers/scrollStop.d.ts +8 -0
- package/dist/src/common/helpers/scrollStop.js +54 -0
- package/dist/src/common/storybookConstants.d.ts +3 -0
- package/dist/src/common/storybookConstants.js +2 -0
- package/dist/src/common/utils.d.ts +2 -0
- package/dist/src/common/utils.js +9 -0
- package/dist/src/common/warnings.d.ts +10 -0
- package/dist/src/common/warnings.js +60 -0
- package/dist/src/common/warnings.test.d.ts +1 -0
- package/dist/src/common/warnings.test.js +19 -0
- package/dist/src/core/Accordion/Accordion.namespace-test.d.ts +1 -0
- package/dist/src/core/Accordion/Accordion.namespace-test.js +18 -0
- package/dist/src/core/Accordion/__snapshots__/index.test.js.snap +64 -0
- package/dist/src/core/Accordion/components/AccordionDetails/index.d.ts +3 -0
- package/dist/src/core/Accordion/components/AccordionDetails/index.js +9 -0
- package/dist/src/core/Accordion/components/AccordionDetails/style.d.ts +2 -0
- package/dist/src/core/Accordion/components/AccordionDetails/style.js +16 -0
- package/dist/src/core/Accordion/components/AccordionHeader/index.d.ts +7 -0
- package/dist/src/core/Accordion/components/AccordionHeader/index.js +13 -0
- package/dist/src/core/Accordion/components/AccordionHeader/style.d.ts +27 -0
- package/dist/src/core/Accordion/components/AccordionHeader/style.js +21 -0
- package/dist/src/core/Accordion/index.d.ts +12 -0
- package/dist/src/core/Accordion/index.js +38 -0
- package/dist/src/core/Accordion/index.stories.d.ts +28 -0
- package/dist/src/core/Accordion/index.stories.js +82 -0
- package/dist/src/core/Accordion/index.test.d.ts +1 -0
- package/dist/src/core/Accordion/index.test.js +58 -0
- package/dist/src/core/Accordion/style.d.ts +30 -0
- package/dist/src/core/Accordion/style.js +28 -0
- package/dist/src/core/Alert/index.d.ts +7 -0
- package/dist/src/core/Alert/index.js +22 -0
- package/dist/src/core/Alert/index.stories.d.ts +19 -0
- package/dist/src/core/Alert/index.stories.js +70 -0
- package/dist/src/core/Alert/style.d.ts +1 -0
- package/dist/src/core/Alert/style.js +23 -0
- package/dist/src/core/Banner/Banner.namespace-test.d.ts +1 -0
- package/dist/src/core/Banner/Banner.namespace-test.js +18 -0
- package/dist/src/core/Banner/banner.test.d.ts +1 -0
- package/dist/src/core/Banner/banner.test.js +126 -0
- package/dist/src/core/Banner/index.d.ts +11 -0
- package/dist/src/core/Banner/index.js +47 -0
- package/dist/src/core/Banner/index.stories.d.ts +46 -0
- package/dist/src/core/Banner/index.stories.js +106 -0
- package/dist/src/core/Banner/style.d.ts +13 -0
- package/dist/src/core/Banner/style.js +55 -0
- package/dist/src/core/Button/Button.namespace-test.d.ts +1 -0
- package/dist/src/core/Button/Button.namespace-test.js +18 -0
- package/dist/src/core/Button/index.d.ts +18 -0
- package/dist/src/core/Button/index.js +54 -0
- package/dist/src/core/Button/index.stories.d.ts +72 -0
- package/dist/src/core/Button/index.stories.js +215 -0
- package/dist/src/core/Button/index.test.d.ts +1 -0
- package/dist/src/core/Button/index.test.js +40 -0
- package/dist/src/core/Button/style.d.ts +180 -0
- package/dist/src/core/Button/style.js +59 -0
- package/dist/src/core/ButtonDropdown/ButtonDropdown.namespace-test.d.ts +1 -0
- package/dist/src/core/ButtonDropdown/ButtonDropdown.namespace-test.js +18 -0
- package/dist/src/core/ButtonDropdown/index.d.ts +18 -0
- package/dist/src/core/ButtonDropdown/index.js +30 -0
- package/dist/src/core/ButtonDropdown/index.stories.d.ts +35 -0
- package/dist/src/core/ButtonDropdown/index.stories.js +79 -0
- package/dist/src/core/ButtonDropdown/index.test.d.ts +1 -0
- package/dist/src/core/ButtonDropdown/index.test.js +41 -0
- package/dist/src/core/ButtonIcon/ButtonIcon.namespace-test.d.ts +1 -0
- package/dist/src/core/ButtonIcon/ButtonIcon.namespace-test.js +18 -0
- package/dist/src/core/ButtonIcon/index.d.ts +15 -0
- package/dist/src/core/ButtonIcon/index.js +34 -0
- package/dist/src/core/ButtonIcon/index.stories.d.ts +39 -0
- package/dist/src/core/ButtonIcon/index.stories.js +239 -0
- package/dist/src/core/ButtonIcon/index.test.d.ts +1 -0
- package/dist/src/core/ButtonIcon/index.test.js +41 -0
- package/dist/src/core/ButtonIcon/style.d.ts +41 -0
- package/dist/src/core/ButtonIcon/style.js +68 -0
- package/dist/src/core/Callout/Callout.namespace-test.d.ts +1 -0
- package/dist/src/core/Callout/Callout.namespace-test.js +18 -0
- package/dist/src/core/Callout/components/CalloutTitle/index.d.ts +3 -0
- package/dist/src/core/Callout/components/CalloutTitle/index.js +9 -0
- package/dist/src/core/Callout/components/CalloutTitle/style.d.ts +1 -0
- package/dist/src/core/Callout/components/CalloutTitle/style.js +16 -0
- package/dist/src/core/Callout/index.d.ts +18 -0
- package/dist/src/core/Callout/index.js +89 -0
- package/dist/src/core/Callout/index.stories.d.ts +14 -0
- package/dist/src/core/Callout/index.stories.js +80 -0
- package/dist/src/core/Callout/style.d.ts +7 -0
- package/dist/src/core/Callout/style.js +31 -0
- package/dist/src/core/CellBasic/CellBasic.namespace-test.d.ts +1 -0
- package/dist/src/core/CellBasic/CellBasic.namespace-test.js +7 -0
- package/dist/src/core/CellBasic/index.d.ts +21 -0
- package/dist/src/core/CellBasic/index.js +32 -0
- package/dist/src/core/CellBasic/index.stories.d.ts +33 -0
- package/dist/src/core/CellBasic/index.stories.js +143 -0
- package/dist/src/core/CellBasic/index.test.d.ts +1 -0
- package/dist/src/core/CellBasic/index.test.js +124 -0
- package/dist/src/core/CellBasic/style.d.ts +18 -0
- package/dist/src/core/CellBasic/style.js +86 -0
- package/dist/src/core/CellComponent/CellComponent.namespace-test.d.ts +1 -0
- package/dist/src/core/CellComponent/CellComponent.namespace-test.js +7 -0
- package/dist/src/core/CellComponent/index.d.ts +8 -0
- package/dist/src/core/CellComponent/index.js +21 -0
- package/dist/src/core/CellComponent/index.stories.d.ts +21 -0
- package/dist/src/core/CellComponent/index.stories.js +92 -0
- package/dist/src/core/CellComponent/index.test.d.ts +1 -0
- package/dist/src/core/CellComponent/index.test.js +110 -0
- package/dist/src/core/CellComponent/style.d.ts +9 -0
- package/dist/src/core/CellComponent/style.js +32 -0
- package/dist/src/core/CellHeader/CellHeader.namespace-test.d.ts +1 -0
- package/dist/src/core/CellHeader/CellHeader.namespace-test.js +8 -0
- package/dist/src/core/CellHeader/index.d.ts +20 -0
- package/dist/src/core/CellHeader/index.js +47 -0
- package/dist/src/core/CellHeader/index.stories.d.ts +26 -0
- package/dist/src/core/CellHeader/index.stories.js +128 -0
- package/dist/src/core/CellHeader/index.test.d.ts +1 -0
- package/dist/src/core/CellHeader/index.test.js +112 -0
- package/dist/src/core/CellHeader/style.d.ts +9 -0
- package/dist/src/core/CellHeader/style.js +50 -0
- package/dist/src/core/Chip/index.d.ts +9 -0
- package/dist/src/core/Chip/index.js +29 -0
- package/dist/src/core/Chip/index.stories.d.ts +58 -0
- package/dist/src/core/Chip/index.stories.js +90 -0
- package/dist/src/core/Chip/style.d.ts +26 -0
- package/dist/src/core/Chip/style.js +95 -0
- package/dist/src/core/ComplexFilter/ComplexFilter.namespace-test.d.ts +1 -0
- package/dist/src/core/ComplexFilter/ComplexFilter.namespace-test.js +20 -0
- package/dist/src/core/ComplexFilter/components/Chips/index.d.ts +8 -0
- package/dist/src/core/ComplexFilter/components/Chips/index.js +21 -0
- package/dist/src/core/ComplexFilter/index.d.ts +23 -0
- package/dist/src/core/ComplexFilter/index.js +119 -0
- package/dist/src/core/ComplexFilter/index.stories.d.ts +33 -0
- package/dist/src/core/ComplexFilter/index.stories.js +126 -0
- package/dist/src/core/ComplexFilter/index.test.d.ts +1 -0
- package/dist/src/core/ComplexFilter/index.test.js +51 -0
- package/dist/src/core/ComplexFilter/style.d.ts +3 -0
- package/dist/src/core/ComplexFilter/style.js +15 -0
- package/dist/src/core/Dialog/Dialog.namespace-test.d.ts +1 -0
- package/dist/src/core/Dialog/Dialog.namespace-test.js +8 -0
- package/dist/src/core/Dialog/__snapshots__/index.test.js.snap +382 -0
- package/dist/src/core/Dialog/components/common.d.ts +6 -0
- package/dist/src/core/Dialog/components/common.js +5 -0
- package/dist/src/core/Dialog/index.d.ts +18 -0
- package/dist/src/core/Dialog/index.js +50 -0
- package/dist/src/core/Dialog/index.stories.d.ts +46 -0
- package/dist/src/core/Dialog/index.stories.js +147 -0
- package/dist/src/core/Dialog/index.test.d.ts +1 -0
- package/dist/src/core/Dialog/index.test.js +62 -0
- package/dist/src/core/DialogActions/index.d.ts +9 -0
- package/dist/src/core/DialogActions/index.js +23 -0
- package/dist/src/core/DialogActions/style.d.ts +5 -0
- package/dist/src/core/DialogActions/style.js +20 -0
- package/dist/src/core/DialogContent/index.d.ts +5 -0
- package/dist/src/core/DialogContent/index.js +23 -0
- package/dist/src/core/DialogContent/style.d.ts +1 -0
- package/dist/src/core/DialogContent/style.js +11 -0
- package/dist/src/core/DialogPaper/index.d.ts +8 -0
- package/dist/src/core/DialogPaper/index.js +27 -0
- package/dist/src/core/DialogPaper/style.d.ts +16 -0
- package/dist/src/core/DialogPaper/style.js +44 -0
- package/dist/src/core/DialogTitle/components/CloseButton/index.d.ts +5 -0
- package/dist/src/core/DialogTitle/components/CloseButton/index.js +31 -0
- package/dist/src/core/DialogTitle/components/CloseButton/style.d.ts +2 -0
- package/dist/src/core/DialogTitle/components/CloseButton/style.js +18 -0
- package/dist/src/core/DialogTitle/index.d.ts +14 -0
- package/dist/src/core/DialogTitle/index.js +42 -0
- package/dist/src/core/DialogTitle/style.d.ts +46 -0
- package/dist/src/core/DialogTitle/style.js +20 -0
- package/dist/src/core/Dropdown/Dropdown.namespace-test.d.ts +1 -0
- package/dist/src/core/Dropdown/Dropdown.namespace-test.js +20 -0
- package/dist/src/core/Dropdown/index.d.ts +31 -0
- package/dist/src/core/Dropdown/index.js +160 -0
- package/dist/src/core/Dropdown/index.stories.d.ts +68 -0
- package/dist/src/core/Dropdown/index.stories.js +215 -0
- package/dist/src/core/Dropdown/index.test.d.ts +1 -0
- package/dist/src/core/Dropdown/index.test.js +229 -0
- package/dist/src/core/Dropdown/style.d.ts +5 -0
- package/dist/src/core/Dropdown/style.js +19 -0
- package/dist/src/core/DropdownMenu/DropdownMenu.namespace-test.d.ts +1 -0
- package/dist/src/core/DropdownMenu/DropdownMenu.namespace-test.js +20 -0
- package/dist/src/core/DropdownMenu/GITHUB_LABELS.d.ts +2 -0
- package/dist/src/core/DropdownMenu/GITHUB_LABELS.js +83 -0
- package/dist/src/core/DropdownMenu/index.d.ts +42 -0
- package/dist/src/core/DropdownMenu/index.js +83 -0
- package/dist/src/core/DropdownMenu/index.stories.d.ts +55 -0
- package/dist/src/core/DropdownMenu/index.stories.js +438 -0
- package/dist/src/core/DropdownMenu/index.test.d.ts +1 -0
- package/dist/src/core/DropdownMenu/index.test.js +51 -0
- package/dist/src/core/DropdownMenu/style.d.ts +40 -0
- package/dist/src/core/DropdownMenu/style.js +85 -0
- package/dist/src/core/Icon/Icon.namespace-test.d.ts +1 -0
- package/dist/src/core/Icon/Icon.namespace-test.js +7 -0
- package/dist/src/core/Icon/index.d.ts +14 -0
- package/dist/src/core/Icon/index.js +25 -0
- package/dist/src/core/Icon/index.stories.d.ts +34 -0
- package/dist/src/core/Icon/index.stories.js +171 -0
- package/dist/src/core/Icon/map.d.ts +98 -0
- package/dist/src/core/Icon/map.js +476 -0
- package/dist/src/core/Icon/style.d.ts +36 -0
- package/dist/src/core/Icon/style.js +42 -0
- package/dist/src/core/InputCheckbox/InputCheckbox.namespace-test.d.ts +1 -0
- package/dist/src/core/InputCheckbox/InputCheckbox.namespace-test.js +9 -0
- package/dist/src/core/InputCheckbox/index.d.ts +13 -0
- package/dist/src/core/InputCheckbox/index.js +55 -0
- package/dist/src/core/InputCheckbox/index.stories.d.ts +35 -0
- package/dist/src/core/InputCheckbox/index.stories.js +119 -0
- package/dist/src/core/InputCheckbox/index.test.d.ts +1 -0
- package/dist/src/core/InputCheckbox/index.test.js +62 -0
- package/dist/src/core/InputCheckbox/styles.d.ts +6 -0
- package/dist/src/core/InputCheckbox/styles.js +24 -0
- package/dist/src/core/InputDropdown/InputDropdown.namespace-test.d.ts +1 -0
- package/dist/src/core/InputDropdown/InputDropdown.namespace-test.js +8 -0
- package/dist/src/core/InputDropdown/index.d.ts +8 -0
- package/dist/src/core/InputDropdown/index.js +83 -0
- package/dist/src/core/InputDropdown/index.stories.d.ts +59 -0
- package/dist/src/core/InputDropdown/index.stories.js +264 -0
- package/dist/src/core/InputDropdown/index.test.d.ts +1 -0
- package/dist/src/core/InputDropdown/index.test.js +58 -0
- package/dist/src/core/InputDropdown/style.d.ts +38 -0
- package/dist/src/core/InputDropdown/style.js +130 -0
- package/dist/src/core/InputRadio/InputRadio.namespace-test.d.ts +1 -0
- package/dist/src/core/InputRadio/InputRadio.namespace-test.js +8 -0
- package/dist/src/core/InputRadio/index.d.ts +14 -0
- package/dist/src/core/InputRadio/index.js +40 -0
- package/dist/src/core/InputRadio/index.stories.d.ts +32 -0
- package/dist/src/core/InputRadio/index.stories.js +64 -0
- package/dist/src/core/InputRadio/index.test.d.ts +1 -0
- package/dist/src/core/InputRadio/index.test.js +92 -0
- package/dist/src/core/InputRadio/style.d.ts +6 -0
- package/dist/src/core/InputRadio/style.js +24 -0
- package/dist/src/core/InputSearch/InputSearch.namespace-test.d.ts +1 -0
- package/dist/src/core/InputSearch/InputSearch.namespace-test.js +8 -0
- package/dist/src/core/InputSearch/index.d.ts +16 -0
- package/dist/src/core/InputSearch/index.js +75 -0
- package/dist/src/core/InputSearch/index.stories.d.ts +35 -0
- package/dist/src/core/InputSearch/index.stories.js +104 -0
- package/dist/src/core/InputSearch/index.test.d.ts +1 -0
- package/dist/src/core/InputSearch/index.test.js +70 -0
- package/dist/src/core/InputSearch/style.d.ts +12 -0
- package/dist/src/core/InputSearch/style.js +47 -0
- package/dist/src/core/InputSlider/InputSlider.namespace-test.d.ts +1 -0
- package/dist/src/core/InputSlider/InputSlider.namespace-test.js +7 -0
- package/dist/src/core/InputSlider/__snapshots__/index.test.js.snap +124 -0
- package/dist/src/core/InputSlider/index.d.ts +8 -0
- package/dist/src/core/InputSlider/index.js +23 -0
- package/dist/src/core/InputSlider/index.stories.d.ts +43 -0
- package/dist/src/core/InputSlider/index.stories.js +160 -0
- package/dist/src/core/InputSlider/index.test.d.ts +1 -0
- package/dist/src/core/InputSlider/index.test.js +52 -0
- package/dist/src/core/InputSlider/style.d.ts +76 -0
- package/dist/src/core/InputSlider/style.js +34 -0
- package/dist/src/core/InputText/InputText.namespace-test.d.ts +1 -0
- package/dist/src/core/InputText/InputText.namespace-test.js +7 -0
- package/dist/src/core/InputText/__snapshots__/index.test.js.snap +10 -0
- package/dist/src/core/InputText/index.d.ts +14 -0
- package/dist/src/core/InputText/index.js +52 -0
- package/dist/src/core/InputText/index.stories.d.ts +29 -0
- package/dist/src/core/InputText/index.stories.js +100 -0
- package/dist/src/core/InputText/index.test.d.ts +1 -0
- package/dist/src/core/InputText/index.test.js +67 -0
- package/dist/src/core/InputText/style.d.ts +13 -0
- package/dist/src/core/InputText/style.js +45 -0
- package/dist/src/core/InputToggle/InputToggle.namespace-test.d.ts +1 -0
- package/dist/src/core/InputToggle/InputToggle.namespace-test.js +7 -0
- package/dist/src/core/InputToggle/__snapshots__/index.test.js.snap +26 -0
- package/dist/src/core/InputToggle/index.d.ts +7 -0
- package/dist/src/core/InputToggle/index.js +42 -0
- package/dist/src/core/InputToggle/index.stories.d.ts +20 -0
- package/dist/src/core/InputToggle/index.stories.js +63 -0
- package/dist/src/core/InputToggle/index.test.d.ts +1 -0
- package/dist/src/core/InputToggle/index.test.js +52 -0
- package/dist/src/core/InputToggle/style.d.ts +9 -0
- package/dist/src/core/InputToggle/style.js +38 -0
- package/dist/src/core/Link/Link.namespace-test.d.ts +1 -0
- package/dist/src/core/Link/Link.namespace-test.js +7 -0
- package/dist/src/core/Link/index.d.ts +8 -0
- package/dist/src/core/Link/index.js +28 -0
- package/dist/src/core/Link/index.stories.d.ts +27 -0
- package/dist/src/core/Link/index.stories.js +99 -0
- package/dist/src/core/Link/style.d.ts +9 -0
- package/dist/src/core/Link/style.js +30 -0
- package/dist/src/core/List/List.namespace-test.d.ts +1 -0
- package/dist/src/core/List/List.namespace-test.js +7 -0
- package/dist/src/core/List/index.d.ts +8 -0
- package/dist/src/core/List/index.js +23 -0
- package/dist/src/core/List/index.stories.d.ts +4 -0
- package/dist/src/core/List/index.stories.js +30 -0
- package/dist/src/core/List/style.d.ts +17 -0
- package/dist/src/core/List/style.js +33 -0
- package/dist/src/core/ListItem/ListItem.namespace-test.d.ts +1 -0
- package/dist/src/core/ListItem/ListItem.namespace-test.js +7 -0
- package/dist/src/core/ListItem/index.d.ts +9 -0
- package/dist/src/core/ListItem/index.js +24 -0
- package/dist/src/core/ListItem/style.d.ts +26 -0
- package/dist/src/core/ListItem/style.js +56 -0
- package/dist/src/core/ListSubheader/ListSubheader.namespace-test.d.ts +1 -0
- package/dist/src/core/ListSubheader/ListSubheader.namespace-test.js +7 -0
- package/dist/src/core/ListSubheader/index.d.ts +7 -0
- package/dist/src/core/ListSubheader/index.js +22 -0
- package/dist/src/core/ListSubheader/style.d.ts +12 -0
- package/dist/src/core/ListSubheader/style.js +16 -0
- package/dist/src/core/LoadingIndicator/LoadingIndicator.namespace-test.d.ts +1 -0
- package/dist/src/core/LoadingIndicator/LoadingIndicator.namespace-test.js +7 -0
- package/dist/src/core/LoadingIndicator/index.d.ts +4 -0
- package/dist/src/core/LoadingIndicator/index.js +13 -0
- package/dist/src/core/LoadingIndicator/index.stories.d.ts +24 -0
- package/dist/src/core/LoadingIndicator/index.stories.js +77 -0
- package/dist/src/core/LoadingIndicator/index.test.d.ts +1 -0
- package/dist/src/core/LoadingIndicator/index.test.js +41 -0
- package/dist/src/core/LoadingIndicator/style.d.ts +7 -0
- package/dist/src/core/LoadingIndicator/style.js +36 -0
- package/dist/src/core/Menu/Menu.namespace-test.d.ts +1 -0
- package/dist/src/core/Menu/Menu.namespace-test.js +8 -0
- package/dist/src/core/Menu/index.d.ts +7 -0
- package/dist/src/core/Menu/index.js +30 -0
- package/dist/src/core/Menu/index.stories.d.ts +17 -0
- package/dist/src/core/Menu/index.stories.js +55 -0
- package/dist/src/core/Menu/style.d.ts +1 -0
- package/dist/src/core/Menu/style.js +15 -0
- package/dist/src/core/MenuItem/MenuItem.namespace-test.d.ts +1 -0
- package/dist/src/core/MenuItem/MenuItem.namespace-test.js +8 -0
- package/dist/src/core/MenuItem/index.d.ts +21 -0
- package/dist/src/core/MenuItem/index.js +42 -0
- package/dist/src/core/MenuItem/index.stories.d.ts +35 -0
- package/dist/src/core/MenuItem/index.stories.js +188 -0
- package/dist/src/core/MenuItem/index.test.d.ts +1 -0
- package/dist/src/core/MenuItem/index.test.js +41 -0
- package/dist/src/core/MenuItem/style.d.ts +65 -0
- package/dist/src/core/MenuItem/style.js +58 -0
- package/dist/src/core/MenuSelect/index.d.ts +19 -0
- package/dist/src/core/MenuSelect/index.js +70 -0
- package/dist/src/core/MenuSelect/index.stories.d.ts +34 -0
- package/dist/src/core/MenuSelect/index.stories.js +154 -0
- package/dist/src/core/MenuSelect/style.d.ts +12 -0
- package/dist/src/core/MenuSelect/style.js +45 -0
- package/dist/src/core/NavigationJumpTo/NavigationJumpTo.namespace-test.d.ts +1 -0
- package/dist/src/core/NavigationJumpTo/NavigationJumpTo.namespace-test.js +13 -0
- package/dist/src/core/NavigationJumpTo/__snapshots__/index.test.js.snap +319 -0
- package/dist/src/core/NavigationJumpTo/index.d.ts +13 -0
- package/dist/src/core/NavigationJumpTo/index.js +111 -0
- package/dist/src/core/NavigationJumpTo/index.stories.d.ts +56 -0
- package/dist/src/core/NavigationJumpTo/index.stories.js +216 -0
- package/dist/src/core/NavigationJumpTo/index.test.d.ts +1 -0
- package/dist/src/core/NavigationJumpTo/index.test.js +87 -0
- package/dist/src/core/NavigationJumpTo/style.d.ts +106 -0
- package/dist/src/core/NavigationJumpTo/style.js +27 -0
- package/dist/src/core/NavigationJumpTo/useIntersection.d.ts +19 -0
- package/dist/src/core/NavigationJumpTo/useIntersection.js +67 -0
- package/dist/src/core/Notification/Notification.namespace-test.d.ts +1 -0
- package/dist/src/core/Notification/Notification.namespace-test.js +8 -0
- package/dist/src/core/Notification/index.d.ts +17 -0
- package/dist/src/core/Notification/index.js +70 -0
- package/dist/src/core/Notification/index.stories.d.ts +43 -0
- package/dist/src/core/Notification/index.stories.js +186 -0
- package/dist/src/core/Notification/index.test.d.ts +1 -0
- package/dist/src/core/Notification/index.test.js +115 -0
- package/dist/src/core/Notification/style.d.ts +1 -0
- package/dist/src/core/Notification/style.js +26 -0
- package/dist/src/core/Pagination/Pagination.namespace-test.d.ts +1 -0
- package/dist/src/core/Pagination/Pagination.namespace-test.js +8 -0
- package/dist/src/core/Pagination/components/PageListDropdown/index.d.ts +7 -0
- package/dist/src/core/Pagination/components/PageListDropdown/index.js +27 -0
- package/dist/src/core/Pagination/components/PageListDropdown/style.d.ts +1 -0
- package/dist/src/core/Pagination/components/PageListDropdown/style.js +14 -0
- package/dist/src/core/Pagination/index.d.ts +15 -0
- package/dist/src/core/Pagination/index.js +47 -0
- package/dist/src/core/Pagination/index.stories.d.ts +21 -0
- package/dist/src/core/Pagination/index.stories.js +99 -0
- package/dist/src/core/Pagination/index.test.d.ts +1 -0
- package/dist/src/core/Pagination/index.test.js +128 -0
- package/dist/src/core/Pagination/style.d.ts +13 -0
- package/dist/src/core/Pagination/style.js +62 -0
- package/dist/src/core/Pagination/usePagination.d.ts +9 -0
- package/dist/src/core/Pagination/usePagination.js +69 -0
- package/dist/src/core/SegmentedControl/SegmentedControl.namespace-test.d.ts +1 -0
- package/dist/src/core/SegmentedControl/SegmentedControl.namespace-test.js +12 -0
- package/dist/src/core/SegmentedControl/index.d.ts +15 -0
- package/dist/src/core/SegmentedControl/index.js +38 -0
- package/dist/src/core/SegmentedControl/index.stories.d.ts +49 -0
- package/dist/src/core/SegmentedControl/index.stories.js +128 -0
- package/dist/src/core/SegmentedControl/index.test.d.ts +1 -0
- package/dist/src/core/SegmentedControl/index.test.js +41 -0
- package/dist/src/core/SegmentedControl/style.d.ts +2 -0
- package/dist/src/core/SegmentedControl/style.js +23 -0
- package/dist/src/core/Table/Table.namespace-test.d.ts +1 -0
- package/dist/src/core/Table/Table.namespace-test.js +7 -0
- package/dist/src/core/Table/components/common.d.ts +6 -0
- package/dist/src/core/Table/components/common.js +5 -0
- package/dist/src/core/Table/index.d.ts +7 -0
- package/dist/src/core/Table/index.js +21 -0
- package/dist/src/core/Table/index.stories.d.ts +18 -0
- package/dist/src/core/Table/index.stories.js +64 -0
- package/dist/src/core/Table/index.test.d.ts +1 -0
- package/dist/src/core/Table/index.test.js +89 -0
- package/dist/src/core/Table/style.d.ts +2 -0
- package/dist/src/core/Table/style.js +10 -0
- package/dist/src/core/TableHeader/TableHeader.namespace-test.d.ts +1 -0
- package/dist/src/core/TableHeader/TableHeader.namespace-test.js +7 -0
- package/dist/src/core/TableHeader/index.d.ts +6 -0
- package/dist/src/core/TableHeader/index.js +25 -0
- package/dist/src/core/TableHeader/index.stories.d.ts +12 -0
- package/dist/src/core/TableHeader/index.stories.js +38 -0
- package/dist/src/core/TableHeader/index.test.d.ts +1 -0
- package/dist/src/core/TableHeader/index.test.js +41 -0
- package/dist/src/core/TableHeader/style.d.ts +2 -0
- package/dist/src/core/TableHeader/style.js +14 -0
- package/dist/src/core/TableRow/TableRow.namespace-test.d.ts +1 -0
- package/dist/src/core/TableRow/TableRow.namespace-test.js +7 -0
- package/dist/src/core/TableRow/__snapshots__/index.test.js.snap +100 -0
- package/dist/src/core/TableRow/index.d.ts +13 -0
- package/dist/src/core/TableRow/index.js +28 -0
- package/dist/src/core/TableRow/index.stories.d.ts +24 -0
- package/dist/src/core/TableRow/index.stories.js +77 -0
- package/dist/src/core/TableRow/index.test.d.ts +1 -0
- package/dist/src/core/TableRow/index.test.js +92 -0
- package/dist/src/core/TableRow/style.d.ts +10 -0
- package/dist/src/core/TableRow/style.js +34 -0
- package/dist/src/core/Tabs/Tabs.namespace-test.d.ts +1 -0
- package/dist/src/core/Tabs/Tabs.namespace-test.js +8 -0
- package/dist/src/core/Tabs/__snapshots__/index.test.js.snap +46 -0
- package/dist/src/core/Tabs/components/LabelWithCount/index.d.ts +7 -0
- package/dist/src/core/Tabs/components/LabelWithCount/index.js +11 -0
- package/dist/src/core/Tabs/components/LabelWithCount/style.d.ts +10 -0
- package/dist/src/core/Tabs/components/LabelWithCount/style.js +43 -0
- package/dist/src/core/Tabs/components/common.d.ts +5 -0
- package/dist/src/core/Tabs/components/common.js +5 -0
- package/dist/src/core/Tabs/index.d.ts +13 -0
- package/dist/src/core/Tabs/index.js +89 -0
- package/dist/src/core/Tabs/index.stories.d.ts +38 -0
- package/dist/src/core/Tabs/index.stories.js +154 -0
- package/dist/src/core/Tabs/index.test.d.ts +1 -0
- package/dist/src/core/Tabs/index.test.js +48 -0
- package/dist/src/core/Tabs/style.d.ts +115 -0
- package/dist/src/core/Tabs/style.js +53 -0
- package/dist/src/core/Tag/Tag.namespace-test.d.ts +1 -0
- package/dist/src/core/Tag/Tag.namespace-test.js +7 -0
- package/dist/src/core/Tag/index.d.ts +17 -0
- package/dist/src/core/Tag/index.js +27 -0
- package/dist/src/core/Tag/index.stories.d.ts +98 -0
- package/dist/src/core/Tag/index.stories.js +238 -0
- package/dist/src/core/Tag/index.test.d.ts +1 -0
- package/dist/src/core/Tag/index.test.js +40 -0
- package/dist/src/core/Tag/index.testUtils.d.ts +8 -0
- package/dist/src/core/Tag/index.testUtils.js +108 -0
- package/dist/src/core/Tag/style.d.ts +29 -0
- package/dist/src/core/Tag/style.js +100 -0
- package/dist/src/core/TagFilter/TagFilter.namespace-test.d.ts +1 -0
- package/dist/src/core/TagFilter/TagFilter.namespace-test.js +8 -0
- package/dist/src/core/TagFilter/__snapshots__/index.test.js.snap +46 -0
- package/dist/src/core/TagFilter/index.d.ts +12 -0
- package/dist/src/core/TagFilter/index.js +23 -0
- package/dist/src/core/TagFilter/index.stories.d.ts +44 -0
- package/dist/src/core/TagFilter/index.stories.js +121 -0
- package/dist/src/core/TagFilter/index.test.d.ts +1 -0
- package/dist/src/core/TagFilter/index.test.js +40 -0
- package/dist/src/core/TagFilter/style.d.ts +7 -0
- package/dist/src/core/TagFilter/style.js +19 -0
- package/dist/src/core/Tooltip/Tooltip.namespace-test.d.ts +1 -0
- package/dist/src/core/Tooltip/Tooltip.namespace-test.js +7 -0
- package/dist/src/core/Tooltip/index.d.ts +14 -0
- package/dist/src/core/Tooltip/index.js +87 -0
- package/dist/src/core/Tooltip/index.stories.d.ts +48 -0
- package/dist/src/core/Tooltip/index.stories.js +257 -0
- package/dist/src/core/Tooltip/index.test.d.ts +1 -0
- package/dist/src/core/Tooltip/index.test.js +102 -0
- package/dist/src/core/Tooltip/style.d.ts +23 -0
- package/dist/src/core/Tooltip/style.js +47 -0
- package/dist/src/core/TooltipCondensed/TooltipCondensed.namespace-test.d.ts +1 -0
- package/dist/src/core/TooltipCondensed/TooltipCondensed.namespace-test.js +7 -0
- package/dist/src/core/TooltipCondensed/index.d.ts +13 -0
- package/dist/src/core/TooltipCondensed/index.js +43 -0
- package/dist/src/core/TooltipCondensed/index.stories.d.ts +27 -0
- package/dist/src/core/TooltipCondensed/index.stories.js +72 -0
- package/dist/src/core/TooltipCondensed/index.test.d.ts +1 -0
- package/dist/src/core/TooltipCondensed/index.test.js +85 -0
- package/dist/src/core/TooltipCondensed/style.d.ts +6 -0
- package/dist/src/core/TooltipCondensed/style.js +22 -0
- package/dist/src/core/TooltipTable/TooltipTable.namespace-test.d.ts +1 -0
- package/dist/src/core/TooltipTable/TooltipTable.namespace-test.js +23 -0
- package/dist/src/core/TooltipTable/__snapshots__/index.test.js.snap +272 -0
- package/dist/src/core/TooltipTable/index.d.ts +8 -0
- package/dist/src/core/TooltipTable/index.js +35 -0
- package/dist/src/core/TooltipTable/index.stories.d.ts +32 -0
- package/dist/src/core/TooltipTable/index.stories.js +128 -0
- package/dist/src/core/TooltipTable/index.test.d.ts +1 -0
- package/dist/src/core/TooltipTable/index.test.js +109 -0
- package/dist/src/core/TooltipTable/style.d.ts +25 -0
- package/dist/src/core/TooltipTable/style.js +46 -0
- package/dist/src/core/styles/common/constants/black.d.ts +3 -0
- package/dist/src/core/styles/common/constants/black.js +7 -0
- package/dist/src/core/styles/common/constants/boxShadows.d.ts +5 -0
- package/dist/src/core/styles/common/constants/boxShadows.js +9 -0
- package/dist/src/core/styles/common/constants/fontWeights.d.ts +7 -0
- package/dist/src/core/styles/common/constants/fontWeights.js +11 -0
- package/dist/src/core/styles/common/constants/gray.d.ts +8 -0
- package/dist/src/core/styles/common/constants/gray.js +12 -0
- package/dist/src/core/styles/common/constants/spaces.d.ts +11 -0
- package/dist/src/core/styles/common/constants/spaces.js +15 -0
- package/dist/src/core/styles/common/constants/white.d.ts +3 -0
- package/dist/src/core/styles/common/constants/white.js +7 -0
- package/dist/src/core/styles/common/defaultTheme.d.ts +129 -0
- package/dist/src/core/styles/common/defaultTheme.js +414 -0
- package/dist/src/core/styles/common/mixins/fonts.d.ts +27 -0
- package/dist/src/core/styles/common/mixins/fonts.js +60 -0
- package/dist/src/core/styles/common/selectors/theme.d.ts +15 -0
- package/dist/src/core/styles/common/selectors/theme.js +63 -0
- package/dist/src/core/styles/index.d.ts +3 -0
- package/dist/src/core/styles/index.js +19 -0
- package/dist/src/index.d.ts +100 -0
- package/dist/src/index.js +170 -0
- package/dist/tsconfig-namespace-check.tsbuildinfo +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,55 @@
|
|
|
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 material_1 = require("@mui/material");
|
|
27
|
+
var IconCheckboxChecked_svg_1 = require("../../common/svgs/IconCheckboxChecked.svg");
|
|
28
|
+
var IconCheckboxIndeterminate_svg_1 = require("../../common/svgs/IconCheckboxIndeterminate.svg");
|
|
29
|
+
var IconCheckboxUnchecked_svg_1 = require("../../common/svgs/IconCheckboxUnchecked.svg");
|
|
30
|
+
var styles_1 = require("./styles");
|
|
31
|
+
/**
|
|
32
|
+
* @see https://mui.com/material-ui/react-checkbox/
|
|
33
|
+
*/
|
|
34
|
+
var InputCheckbox = function (props) {
|
|
35
|
+
var caption = props.caption, checkboxProps = props.checkboxProps, disabled = props.disabled, label = props.label, stage = props.stage, value = props.value, rest = __rest(props, ["caption", "checkboxProps", "disabled", "label", "stage", "value"]);
|
|
36
|
+
if (label === undefined || stage !== undefined) {
|
|
37
|
+
var newProps = void 0;
|
|
38
|
+
switch (stage) {
|
|
39
|
+
case "checked":
|
|
40
|
+
newProps = __assign(__assign({}, props), { checked: true, color: "primary" });
|
|
41
|
+
break;
|
|
42
|
+
case "unchecked":
|
|
43
|
+
newProps = __assign(__assign({}, props), { checked: false, color: "default" });
|
|
44
|
+
break;
|
|
45
|
+
case "indeterminate":
|
|
46
|
+
newProps = __assign(__assign({}, props), { checked: true, color: "primary", indeterminate: true });
|
|
47
|
+
break;
|
|
48
|
+
default:
|
|
49
|
+
newProps = props;
|
|
50
|
+
}
|
|
51
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.StyledCheckbox, __assign({}, newProps, { checkedIcon: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { fillcontrast: "white", component: IconCheckboxChecked_svg_1.ReactComponent, viewBox: "0 0 16 16" }), icon: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { fillcontrast: "white", component: IconCheckboxUnchecked_svg_1.ReactComponent, viewBox: "0 0 16 16" }), indeterminateIcon: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { fillcontrast: "white", component: IconCheckboxIndeterminate_svg_1.ReactComponent, viewBox: "0 0 16 16" }) })));
|
|
52
|
+
}
|
|
53
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.StyledFormControlLabel, { caption: caption, control: (0, jsx_runtime_1.jsx)(styles_1.StyledCheckbox, __assign({ disabled: disabled, checkedIcon: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { fillcontrast: "white", component: IconCheckboxChecked_svg_1.ReactComponent, viewBox: "0 0 16 16" }), icon: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { fillcontrast: "white", component: IconCheckboxUnchecked_svg_1.ReactComponent, viewBox: "0 0 16 16" }), indeterminateIcon: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { fillcontrast: "white", component: IconCheckboxIndeterminate_svg_1.ReactComponent, viewBox: "0 0 16 16" }) }, checkboxProps, rest)), label: label, value: value, children: (0, jsx_runtime_1.jsx)("div", { children: "Content" }) }));
|
|
54
|
+
};
|
|
55
|
+
exports.default = InputCheckbox;
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
caption: string;
|
|
7
|
+
id: string;
|
|
8
|
+
label: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export declare const LivePreview: {
|
|
12
|
+
parameters: {
|
|
13
|
+
controls: {
|
|
14
|
+
exclude: string[];
|
|
15
|
+
};
|
|
16
|
+
snapshot: {
|
|
17
|
+
skip: boolean;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
render: (args: Args) => JSX.Element;
|
|
21
|
+
};
|
|
22
|
+
export declare const Test: {
|
|
23
|
+
args: {
|
|
24
|
+
id: string;
|
|
25
|
+
};
|
|
26
|
+
parameters: {
|
|
27
|
+
controls: {
|
|
28
|
+
exclude: string[];
|
|
29
|
+
};
|
|
30
|
+
snapshot: {
|
|
31
|
+
skip: boolean;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
render: (args: Args) => JSX.Element;
|
|
35
|
+
};
|
|
@@ -0,0 +1,119 @@
|
|
|
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 react_1 = __importDefault(require("react"));
|
|
21
|
+
var index_1 = __importDefault(require("./index"));
|
|
22
|
+
var testId = "test-story";
|
|
23
|
+
var InputCheckbox = function (props) {
|
|
24
|
+
var disabled = props.disabled;
|
|
25
|
+
var _a = react_1.default.useState(true), checked = _a[0], setChecked = _a[1];
|
|
26
|
+
var handleChange = function () { return setChecked(function (prevState) { return !prevState; }); };
|
|
27
|
+
return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { control: (0, jsx_runtime_1.jsx)(index_1.default, __assign({ disabled: disabled, onChange: handleChange, stage: checked ? "unchecked" : "checked" }, props)), label: "Label", value: "Demo" }) }));
|
|
28
|
+
};
|
|
29
|
+
exports.default = {
|
|
30
|
+
argTypes: {
|
|
31
|
+
Caption: {
|
|
32
|
+
control: { type: "string" },
|
|
33
|
+
},
|
|
34
|
+
Label: {
|
|
35
|
+
control: { type: "string" },
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
component: InputCheckbox,
|
|
39
|
+
title: "Inputs/InputCheckbox",
|
|
40
|
+
};
|
|
41
|
+
// Default
|
|
42
|
+
exports.Default = {
|
|
43
|
+
args: {
|
|
44
|
+
caption: "Caption",
|
|
45
|
+
id: testId,
|
|
46
|
+
label: "Label",
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
var CheckboxLabelDemo = function (props) {
|
|
50
|
+
var caption = props.caption, label = props.label, disabled = props.disabled;
|
|
51
|
+
return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(index_1.default, __assign({ caption: caption, label: label, disabled: disabled, value: "Demo" }, props)) }));
|
|
52
|
+
};
|
|
53
|
+
var IndeterminateDemo = function () {
|
|
54
|
+
var _a = react_1.default.useState([true, false]), checked = _a[0], setChecked = _a[1];
|
|
55
|
+
var handleChange1 = function (event) {
|
|
56
|
+
setChecked([event.target.checked, event.target.checked]);
|
|
57
|
+
};
|
|
58
|
+
var handleChange2 = function (event) {
|
|
59
|
+
setChecked([event.target.checked, checked[1]]);
|
|
60
|
+
};
|
|
61
|
+
var handleChange3 = function (event) {
|
|
62
|
+
setChecked([checked[0], event.target.checked]);
|
|
63
|
+
};
|
|
64
|
+
var children = ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { display: "flex", flexDirection: "column", ml: 3 }, children: [(0, jsx_runtime_1.jsx)(index_1.default, { label: "Child 1", checkboxProps: {
|
|
65
|
+
checked: checked[0],
|
|
66
|
+
onChange: handleChange2,
|
|
67
|
+
} }), (0, jsx_runtime_1.jsx)(index_1.default, { label: "Child 2", checkboxProps: {
|
|
68
|
+
checked: checked[1],
|
|
69
|
+
onChange: handleChange3,
|
|
70
|
+
} })] }));
|
|
71
|
+
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(index_1.default, { label: "Parent", checkboxProps: {
|
|
72
|
+
checked: checked[0] && checked[1],
|
|
73
|
+
indeterminate: checked[0] !== checked[1],
|
|
74
|
+
onChange: handleChange1,
|
|
75
|
+
} }), children] }));
|
|
76
|
+
};
|
|
77
|
+
// Live Preview
|
|
78
|
+
var LivePreviewDemo = function () {
|
|
79
|
+
var livePreviewStyles = {
|
|
80
|
+
display: "grid",
|
|
81
|
+
gridColumnGap: "24px",
|
|
82
|
+
gridRowGap: "0px",
|
|
83
|
+
gridTemplateColumns: "repeat(3, 70px)",
|
|
84
|
+
gridTemplateRows: "1fr",
|
|
85
|
+
};
|
|
86
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: livePreviewStyles, children: [(0, jsx_runtime_1.jsx)("div", { style: { gridArea: "1 / 1 / 1 / 2" }, children: (0, jsx_runtime_1.jsx)(CheckboxLabelDemo, { label: "Label", disabled: false }) }), (0, jsx_runtime_1.jsx)("div", { style: { gridArea: "1 / 2 / 1 / 2" }, children: (0, jsx_runtime_1.jsx)(InputCheckbox, { disabled: true }) }), (0, jsx_runtime_1.jsx)("div", { style: { gridArea: "1 / 3 / 1 / 3" }, children: (0, jsx_runtime_1.jsx)(IndeterminateDemo, {}) })] }));
|
|
87
|
+
};
|
|
88
|
+
exports.LivePreview = {
|
|
89
|
+
parameters: {
|
|
90
|
+
controls: { exclude: ["caption", "label"] },
|
|
91
|
+
snapshot: {
|
|
92
|
+
skip: true,
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
render: function (args) { return (0, jsx_runtime_1.jsx)(LivePreviewDemo, __assign({}, args)); },
|
|
96
|
+
};
|
|
97
|
+
// Test
|
|
98
|
+
var TestDemo = function () {
|
|
99
|
+
var testStyles = {
|
|
100
|
+
display: "grid",
|
|
101
|
+
gridColumnGap: "10px",
|
|
102
|
+
gridRowGap: "0px",
|
|
103
|
+
gridTemplateColumns: "repeat(2, 100px)",
|
|
104
|
+
gridTemplateRows: "1fr",
|
|
105
|
+
};
|
|
106
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: testStyles, children: [(0, jsx_runtime_1.jsx)("div", { style: { gridArea: "1 / 1 / 1 / 2" }, children: (0, jsx_runtime_1.jsx)(CheckboxLabelDemo, { caption: "Caption", label: "Lable A", disabled: false, "data-testid": "labelCheckbox" }) }), (0, jsx_runtime_1.jsx)("div", { style: { gridArea: "1 / 2 / 1 / 2" }, children: (0, jsx_runtime_1.jsx)(InputCheckbox, { "data-testid": "checkbox" }) })] }));
|
|
107
|
+
};
|
|
108
|
+
exports.Test = {
|
|
109
|
+
args: {
|
|
110
|
+
id: testId,
|
|
111
|
+
},
|
|
112
|
+
parameters: {
|
|
113
|
+
controls: { exclude: ["caption", "label", "id"] },
|
|
114
|
+
snapshot: {
|
|
115
|
+
skip: true,
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
render: function (args) { return (0, jsx_runtime_1.jsx)(TestDemo, __assign({}, args, { "data-testid": "input-checkbox" })); },
|
|
119
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,62 @@
|
|
|
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("<InputCheckbox />", function () {
|
|
46
|
+
(0, story_utils_1.generateSnapshots)(snapshotTestStoryFile);
|
|
47
|
+
it("renders checkbox component", function () {
|
|
48
|
+
(0, react_2.render)((0, jsx_runtime_1.jsx)(Test, __assign({}, Test.args)));
|
|
49
|
+
var checkboxElement = react_2.screen.getByTestId("checkbox");
|
|
50
|
+
expect(checkboxElement).not.toBeNull();
|
|
51
|
+
});
|
|
52
|
+
it("renders checkbox with label component", function () {
|
|
53
|
+
(0, react_2.render)((0, jsx_runtime_1.jsx)(Test, __assign({}, Test.args)));
|
|
54
|
+
var checkboxElement = react_2.screen.getByTestId("labelCheckbox");
|
|
55
|
+
expect(checkboxElement).not.toBeNull();
|
|
56
|
+
});
|
|
57
|
+
it("renders checkbox with caption", function () {
|
|
58
|
+
(0, react_2.render)((0, jsx_runtime_1.jsx)(Test, __assign({}, Test.args)));
|
|
59
|
+
var captionElement = react_2.screen.findAllByText("Caption");
|
|
60
|
+
expect(captionElement).not.toBeNull();
|
|
61
|
+
});
|
|
62
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CommonThemeProps } from "../styles/common/selectors/theme";
|
|
2
|
+
export interface CheckboxExtraProps 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> & CheckboxExtraProps, {}, {}>;
|
|
6
|
+
export declare const StyledCheckbox: import("@emotion/styled").StyledComponent<import("@mui/material").CheckboxProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -0,0 +1,24 @@
|
|
|
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.StyledCheckbox = 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
|
+
var theme_1 = require("../styles/common/selectors/theme");
|
|
12
|
+
exports.StyledFormControlLabel = (0, styles_1.styled)(material_1.FormControlLabel)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n z-index: 0;\n\n &:after {\n ", "\n left:34px;\n position: absolute;\n top: 30px;\n z-index: -1;\n\n ", "\n }\n"], ["\n position: relative;\n z-index: 0;\n\n &:after {\n ", "\n left:34px;\n position: absolute;\n top: 30px;\n z-index: -1;\n\n ", "\n }\n"])), styles_2.fontBodyXxs, function (props) {
|
|
13
|
+
var caption = props.caption;
|
|
14
|
+
var content = caption !== undefined ? caption : "";
|
|
15
|
+
var typography = (0, theme_1.getTypography)(props);
|
|
16
|
+
var colors = (0, theme_1.getColors)(props);
|
|
17
|
+
return "\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 ");
|
|
18
|
+
});
|
|
19
|
+
exports.StyledCheckbox = (0, styles_1.styled)(material_1.Checkbox)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (props) {
|
|
20
|
+
var colors = (0, theme_1.getColors)(props);
|
|
21
|
+
var iconSizes = (0, theme_1.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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
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 InputDropdownNameSpaceTest = function (props) {
|
|
7
|
+
return ((0, jsx_runtime_1.jsx)(components_1.InputDropdown, { disabled: false, label: "Label", onClick: utils_1.noop, sdsStage: "userInput", sdsStyle: "minimal", multiple: false, sdsType: "label", counter: "2", details: "Details", intent: "warning", shouldPutAColonAfterLabel: true }));
|
|
8
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { InputDropdownProps as SdsInputDropdownProps } from "./style";
|
|
3
|
+
export type InputDropdownProps = SdsInputDropdownProps & React.HTMLAttributes<HTMLButtonElement>;
|
|
4
|
+
/**
|
|
5
|
+
* @see https://mui.com/material-ui/react-button/
|
|
6
|
+
*/
|
|
7
|
+
declare const InputDropdown: (props: InputDropdownProps) => JSX.Element;
|
|
8
|
+
export default InputDropdown;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
18
|
+
var Icon_1 = __importDefault(require("../Icon"));
|
|
19
|
+
var style_1 = require("./style");
|
|
20
|
+
/**
|
|
21
|
+
* @see https://mui.com/material-ui/react-button/
|
|
22
|
+
*/
|
|
23
|
+
var InputDropdown = function (props) {
|
|
24
|
+
var label = props.label, open = props.open, _a = props.multiple, multiple = _a === void 0 ? false : _a, sdsStyle = props.sdsStyle, _b = props.sdsType, sdsType = _b === void 0 ? "label" : _b, details = props.details, counter = props.counter, shouldTruncateMinimalDetails = props.shouldTruncateMinimalDetails, _c = props.shouldPutAColonAfterLabel, shouldPutAColonAfterLabel = _c === void 0 ? true : _c, value = props.value;
|
|
25
|
+
var isMinimal = sdsStyle === "minimal";
|
|
26
|
+
if (open !== undefined) {
|
|
27
|
+
// eslint-disable-next-line no-console
|
|
28
|
+
console.warn("Warning: InputDropdown prop `open` has been replaced by `sdsStage` and will be deprecated.");
|
|
29
|
+
}
|
|
30
|
+
var shouldRenderDetails = !multiple && (details || value) && !isMinimal;
|
|
31
|
+
var shouldRenderInlineMinimalDetails = isMinimal && sdsType === "value" && !multiple;
|
|
32
|
+
var shouldRenderMinimalDetails = isMinimal && sdsType === "label";
|
|
33
|
+
var shouldRenderCounter = multiple && counter !== undefined && counter !== "0" && !isMinimal;
|
|
34
|
+
return ((0, jsx_runtime_1.jsxs)(style_1.StyledInputDropdown, __assign({}, props, { children: [(0, jsx_runtime_1.jsxs)(style_1.LabelWrapper, { isMinimal: isMinimal, children: [(0, jsx_runtime_1.jsx)(style_1.StyledLabel, { className: "styled-label", details: details, counter: counter, sdsType: sdsType, children: renderLabelText({
|
|
35
|
+
counter: counter,
|
|
36
|
+
details: details,
|
|
37
|
+
isMinimal: isMinimal,
|
|
38
|
+
label: label,
|
|
39
|
+
multiple: multiple,
|
|
40
|
+
sdsType: sdsType,
|
|
41
|
+
shouldPutAColonAfterLabel: shouldPutAColonAfterLabel,
|
|
42
|
+
value: value,
|
|
43
|
+
}) }), shouldRenderDetails && ((0, jsx_runtime_1.jsx)(style_1.StyledDetail, { children: renderDetailsText({ details: details, sdsType: sdsType, value: value }) })), shouldRenderInlineMinimalDetails && ((0, jsx_runtime_1.jsx)(style_1.StyledDetail, { children: renderDetailsText({ details: details, sdsType: sdsType, value: value }) })), shouldRenderCounter && (0, jsx_runtime_1.jsx)(style_1.StyledCounter, { children: counter }), (0, jsx_runtime_1.jsx)(style_1.IconWrapper, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { sdsIcon: "chevronDown", sdsSize: "s", sdsType: "interactive" }) })] }), shouldRenderMinimalDetails && ((0, jsx_runtime_1.jsx)(style_1.MinimalDetails, { shouldTruncateMinimalDetails: shouldTruncateMinimalDetails, children: renderDetailsText({ details: details, sdsType: sdsType, value: value }) }))] })));
|
|
44
|
+
};
|
|
45
|
+
function renderLabelText(props) {
|
|
46
|
+
var sdsType = props.sdsType;
|
|
47
|
+
if (sdsType === "label") {
|
|
48
|
+
return renderLabelTypeLabelText(props);
|
|
49
|
+
}
|
|
50
|
+
if (sdsType === "value") {
|
|
51
|
+
return renderValueTypeLabelText(props);
|
|
52
|
+
}
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
function renderLabelTypeLabelText(_a) {
|
|
56
|
+
var isMinimal = _a.isMinimal, label = _a.label, counter = _a.counter, value = _a.value, shouldPutAColonAfterLabel = _a.shouldPutAColonAfterLabel;
|
|
57
|
+
if (isMinimal)
|
|
58
|
+
return label;
|
|
59
|
+
return (counter || value) && shouldPutAColonAfterLabel ? "".concat(label, ":") : label;
|
|
60
|
+
}
|
|
61
|
+
function renderValueTypeLabelText(_a) {
|
|
62
|
+
var value = _a.value, multiple = _a.multiple, isMinimal = _a.isMinimal, label = _a.label, counter = _a.counter, details = _a.details, shouldPutAColonAfterLabel = _a.shouldPutAColonAfterLabel;
|
|
63
|
+
if (!value || multiple) {
|
|
64
|
+
if (isMinimal)
|
|
65
|
+
return label;
|
|
66
|
+
return counter && shouldPutAColonAfterLabel ? "".concat(label, ":") : label;
|
|
67
|
+
}
|
|
68
|
+
if (isMinimal)
|
|
69
|
+
return value;
|
|
70
|
+
return (counter || details) && shouldPutAColonAfterLabel
|
|
71
|
+
? "".concat(value, ":")
|
|
72
|
+
: value;
|
|
73
|
+
}
|
|
74
|
+
function renderDetailsText(_a) {
|
|
75
|
+
var details = _a.details, sdsType = _a.sdsType, value = _a.value;
|
|
76
|
+
if (sdsType === "label" && value) {
|
|
77
|
+
return value;
|
|
78
|
+
}
|
|
79
|
+
else if (sdsType === "value") {
|
|
80
|
+
return details;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
exports.default = InputDropdown;
|
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
label: string;
|
|
8
|
+
sdsStyle: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export declare const RoundLivePreview: {
|
|
12
|
+
args: {
|
|
13
|
+
fullWidth: boolean;
|
|
14
|
+
sdsStyle: string;
|
|
15
|
+
};
|
|
16
|
+
parameters: {
|
|
17
|
+
snapshot: {
|
|
18
|
+
skip: boolean;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
render: (args: Args) => JSX.Element;
|
|
22
|
+
};
|
|
23
|
+
export declare const SquareLivePreview: {
|
|
24
|
+
args: {
|
|
25
|
+
fullWidth: boolean;
|
|
26
|
+
sdsStyle: string;
|
|
27
|
+
};
|
|
28
|
+
parameters: {
|
|
29
|
+
snapshot: {
|
|
30
|
+
skip: boolean;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
render: (args: Args) => JSX.Element;
|
|
34
|
+
};
|
|
35
|
+
export declare const MinimalLivePreview: {
|
|
36
|
+
args: {
|
|
37
|
+
sdsStyle: string;
|
|
38
|
+
};
|
|
39
|
+
parameters: {
|
|
40
|
+
snapshot: {
|
|
41
|
+
skip: boolean;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
render: (args: Args) => JSX.Element;
|
|
45
|
+
};
|
|
46
|
+
export declare const Test: {
|
|
47
|
+
args: {
|
|
48
|
+
disabled: boolean;
|
|
49
|
+
label: string;
|
|
50
|
+
multiple: boolean;
|
|
51
|
+
sdsStyle: string;
|
|
52
|
+
};
|
|
53
|
+
parameters: {
|
|
54
|
+
snapshot: {
|
|
55
|
+
skip: boolean;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
render: (args: Args) => JSX.Element;
|
|
59
|
+
};
|