@bikdotai/bik-component-library 0.0.5-beta → 0.0.5-beta.1
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/cjs/_virtual/_tslib.js +1 -0
- package/dist/cjs/assets/icons/alert.svg.js +1 -0
- package/dist/cjs/assets/icons/check.svg.js +1 -0
- package/dist/cjs/assets/icons/cross.svg.js +1 -0
- package/dist/cjs/assets/icons/errorInfo.svg.js +1 -0
- package/dist/cjs/assets/icons/question-mark.svg.js +1 -0
- package/dist/cjs/assets/icons/search.svg.js +1 -0
- package/dist/cjs/bundle.css +628 -0
- package/dist/cjs/components/TypographyStyle.d.ts +15 -0
- package/dist/cjs/components/TypographyStyle.js +88 -0
- package/dist/cjs/components/button/Button.d.ts +3 -0
- package/dist/cjs/components/button/Button.js +1 -0
- package/dist/cjs/components/button/Button.styled.d.ts +13 -0
- package/dist/cjs/components/button/Button.styled.js +1 -0
- package/dist/cjs/components/button/index.d.ts +1 -0
- package/dist/cjs/components/button/model.d.ts +57 -0
- package/dist/cjs/components/button/themes.d.ts +18 -0
- package/dist/cjs/components/button/themes.js +1 -0
- package/dist/cjs/components/checkBox/CheckBox.d.ts +9 -0
- package/dist/cjs/components/checkBox/CheckBox.js +1 -0
- package/dist/cjs/components/checkBox/CheckBox.styled.d.ts +7 -0
- package/dist/cjs/components/checkBox/CheckBox.styled.js +26 -0
- package/dist/cjs/components/checkBox/index.d.ts +1 -0
- package/dist/cjs/components/dropdown/Common.styled.d.ts +2 -0
- package/dist/cjs/components/dropdown/Dropdown.d.ts +8 -0
- package/dist/cjs/components/dropdown/UnChildDropdown/UnChildDropdown.d.ts +10 -0
- package/dist/cjs/components/dropdown/index.d.ts +1 -0
- package/dist/cjs/components/dropdown/opennedDropdown/components/OpennedDropdown.d.ts +3 -0
- package/dist/cjs/components/dropdown/opennedDropdown/components/OpennedDropdown.js +1 -0
- package/dist/cjs/components/dropdown/opennedDropdown/components/OpennedDropdown.styled.d.ts +5 -0
- package/dist/cjs/components/dropdown/opennedDropdown/components/OpennedDropdown.styled.js +24 -0
- package/dist/cjs/components/dropdown/opennedDropdown/components/description/Description.d.ts +6 -0
- package/dist/cjs/components/dropdown/opennedDropdown/components/description/Description.js +1 -0
- package/dist/cjs/components/dropdown/opennedDropdown/components/description/Description.styled.d.ts +1 -0
- package/dist/cjs/components/dropdown/opennedDropdown/components/description/Description.styled.js +5 -0
- package/dist/cjs/components/dropdown/opennedDropdown/components/menu/FreeFormMenu.d.ts +6 -0
- package/dist/cjs/components/dropdown/opennedDropdown/components/menu/FreeFormMenu.js +1 -0
- package/dist/cjs/components/dropdown/opennedDropdown/components/menu/FreeFormMenu.styled.d.ts +1 -0
- package/dist/cjs/components/dropdown/opennedDropdown/components/menu/FreeFormMenu.styled.js +6 -0
- package/dist/cjs/components/dropdown/opennedDropdown/components/menu/MenuItem.d.ts +8 -0
- package/dist/cjs/components/dropdown/opennedDropdown/components/menu/MenuItem.js +1 -0
- package/dist/cjs/components/dropdown/opennedDropdown/components/menu/MenuList.d.ts +8 -0
- package/dist/cjs/components/dropdown/opennedDropdown/components/menu/MenuList.js +1 -0
- package/dist/cjs/components/dropdown/opennedDropdown/components/menu/MenuList.styled.d.ts +1 -0
- package/dist/cjs/components/dropdown/opennedDropdown/components/menu/MenuList.styled.js +6 -0
- package/dist/cjs/components/dropdown/opennedDropdown/components/menu/SelectAllMenu.d.ts +7 -0
- package/dist/cjs/components/dropdown/opennedDropdown/components/menu/SelectAllMenu.js +1 -0
- package/dist/cjs/components/dropdown/opennedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.d.ts +8 -0
- package/dist/cjs/components/dropdown/opennedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.js +1 -0
- package/dist/cjs/components/dropdown/opennedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.d.ts +1 -0
- package/dist/cjs/components/dropdown/opennedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js +8 -0
- package/dist/cjs/components/dropdown/opennedDropdown/components/searchbox/SearchBox.d.ts +4 -0
- package/dist/cjs/components/dropdown/opennedDropdown/components/searchbox/SearchBox.js +1 -0
- package/dist/cjs/components/dropdown/opennedDropdown/components/searchbox/ZeroState.d.ts +4 -0
- package/dist/cjs/components/dropdown/opennedDropdown/components/searchbox/ZeroState.js +1 -0
- package/dist/cjs/components/dropdown/opennedDropdown/index.d.ts +1 -0
- package/dist/cjs/components/dropdown/opennedDropdown/utils/iterationOnOptions.d.ts +31 -0
- package/dist/cjs/components/dropdown/opennedDropdown/utils/iterationOnOptions.js +1 -0
- package/dist/cjs/components/dropdown/type.d.ts +26 -0
- package/dist/cjs/components/fab-menu/FABMenu.d.ts +18 -0
- package/dist/cjs/components/fab-menu/FABMenu.js +1 -0
- package/dist/cjs/components/fab-menu/index.d.ts +1 -0
- package/dist/cjs/components/floating-action-button/FloatingActionButton.d.ts +16 -0
- package/dist/cjs/components/floating-action-button/FloatingActionButton.js +1 -0
- package/dist/cjs/components/floating-action-button/FloatingActionButton.styles.d.ts +33 -0
- package/dist/cjs/components/floating-action-button/FloatingActionButton.styles.js +83 -0
- package/dist/cjs/components/floating-action-button/index.d.ts +2 -0
- package/dist/cjs/components/icon-button/IconButton.d.ts +3 -0
- package/dist/cjs/components/icon-button/IconButton.js +1 -0
- package/dist/cjs/components/icon-button/IconButton.styled.d.ts +6 -0
- package/dist/cjs/components/icon-button/IconButton.styled.js +3 -0
- package/dist/cjs/components/icon-button/index.d.ts +1 -0
- package/dist/cjs/components/icon-button/model.d.ts +37 -0
- package/dist/cjs/components/icon-button/theme.d.ts +3 -0
- package/dist/cjs/components/icon-button/theme.js +1 -0
- package/dist/cjs/components/image-compress/ImageCompress.d.ts +7 -0
- package/dist/cjs/components/image-compress/ImageCompress.js +1 -0
- package/dist/cjs/components/image-compress/index.d.ts +1 -0
- package/dist/cjs/components/input/Input.d.ts +38 -0
- package/dist/cjs/components/input/Input.js +1 -0
- package/dist/cjs/components/input/Input.styled.d.ts +114 -0
- package/dist/cjs/components/input/Input.styled.js +1 -0
- package/dist/cjs/components/input/context/InputStyleProvider.d.ts +7 -0
- package/dist/cjs/components/input/context/InputStyleProvider.js +1 -0
- package/dist/cjs/components/input/index.d.ts +1 -0
- package/dist/cjs/components/list-item/ListItem.d.ts +16 -0
- package/dist/cjs/components/list-item/ListItem.js +1 -0
- package/dist/cjs/components/list-item/ListItem.styled.d.ts +9 -0
- package/dist/cjs/components/list-item/ListItem.styled.js +1 -0
- package/dist/cjs/components/list-item/index.d.ts +1 -0
- package/dist/cjs/components/list-item/themes.d.ts +3 -0
- package/dist/cjs/components/list-item/themes.js +1 -0
- package/dist/cjs/components/pagination/Pagination.d.ts +9 -0
- package/dist/cjs/components/pagination/Pagination.js +1 -0
- package/dist/cjs/components/pagination/Pagination.styled.d.ts +5 -0
- package/dist/cjs/components/pagination/Pagination.styled.js +1 -0
- package/dist/cjs/components/pagination/index.d.ts +1 -0
- package/dist/cjs/components/radioButton/RadioButton.d.ts +8 -0
- package/dist/cjs/components/radioButton/RadioButton.js +1 -0
- package/dist/cjs/components/radioButton/RadioButton.styled.d.ts +7 -0
- package/dist/cjs/components/radioButton/RadioButton.styled.js +20 -0
- package/dist/cjs/components/radioButton/index.d.ts +1 -0
- package/dist/cjs/components/sample-button/SampleButton.d.ts +18 -0
- package/dist/cjs/components/sample-button/SampleButton.styled.d.ts +9 -0
- package/dist/cjs/components/sample-button/index.d.ts +1 -0
- package/dist/cjs/components/sample-button/themes.d.ts +2 -0
- package/dist/cjs/components/spinner/Spinner.d.ts +6 -0
- package/dist/cjs/components/spinner/Spinner.js +1 -0
- package/dist/cjs/components/spinner/index.d.ts +1 -0
- package/dist/cjs/components/spinner/lotties/black.json.js +1 -0
- package/dist/cjs/components/spinner/lotties/brand.json.js +1 -0
- package/dist/cjs/components/spinner/lotties/red.json.js +1 -0
- package/dist/cjs/components/spinner/lotties/white.json.js +1 -0
- package/dist/cjs/components/spinner/model.d.ts +13 -0
- package/dist/cjs/components/spinner/themes.d.ts +3 -0
- package/dist/cjs/components/spinner/themes.js +1 -0
- package/dist/cjs/components/stepper/Stepper.d.ts +22 -0
- package/dist/cjs/components/stepper/Stepper.js +1 -0
- package/dist/cjs/components/stepper/Stepper.styled.d.ts +6 -0
- package/dist/cjs/components/stepper/Stepper.styled.js +83 -0
- package/dist/cjs/components/stepper/StepperService.d.ts +4 -0
- package/dist/cjs/components/stepper/WorkingStepper.d.ts +14 -0
- package/dist/cjs/components/stepper/index.d.ts +1 -0
- package/dist/cjs/components/stepper/themes.d.ts +18 -0
- package/dist/cjs/components/stepper/themes.js +1 -0
- package/dist/cjs/components/tag/Tag.d.ts +6 -0
- package/dist/cjs/components/tag/Tag.js +1 -0
- package/dist/cjs/components/tag/Tag.styled.d.ts +6 -0
- package/dist/cjs/components/tag/Tag.styled.js +26 -0
- package/dist/cjs/components/tag/index.d.ts +1 -0
- package/dist/cjs/components/tag/model.d.ts +34 -0
- package/dist/cjs/components/tag/themes.d.ts +6 -0
- package/dist/cjs/components/tag/themes.js +1 -0
- package/dist/cjs/components/toaster/Toaster.d.ts +27 -0
- package/dist/cjs/components/toaster/Toaster.js +1 -0
- package/dist/cjs/components/toaster/Toaster.styled.d.ts +4 -0
- package/dist/cjs/components/toaster/Toaster.styled.js +35 -0
- package/dist/cjs/components/toaster/index.d.ts +1 -0
- package/dist/cjs/components/tooltips/CustomisedTooltip.d.ts +25 -0
- package/dist/cjs/components/tooltips/CustomisedTooltip.js +1 -0
- package/dist/cjs/components/tooltips/Tooltip.d.ts +10 -0
- package/dist/cjs/components/tooltips/Tooltip.js +1 -0
- package/dist/cjs/components/tooltips/TooltipInternal.d.ts +10 -0
- package/dist/cjs/components/tooltips/TooltipInternal.js +1 -0
- package/dist/cjs/components/tooltips/index.d.ts +2 -0
- package/dist/cjs/components/zeroState/ZeroState.d.ts +7 -0
- package/dist/cjs/components/zeroState/ZeroState.js +17 -0
- package/dist/cjs/constants/Theme.d.ts +587 -0
- package/dist/cjs/constants/Theme.js +1 -0
- package/dist/cjs/constants/breakpoints.d.ts +6 -0
- package/dist/cjs/constants/colors.d.ts +7 -0
- package/dist/cjs/constants/spacing.d.ts +2 -0
- package/dist/cjs/hooks/useOutside.d.ts +1 -0
- package/dist/cjs/hooks/useOutside.js +1 -0
- package/dist/cjs/index.d.ts +15 -0
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/utils/classNames.d.ts +7 -0
- package/dist/cjs/utils/rgba.d.ts +8 -0
- package/dist/esm/_virtual/_tslib.js +1 -0
- package/dist/esm/assets/icons/alert.svg.js +1 -0
- package/dist/esm/assets/icons/check.svg.js +1 -0
- package/dist/esm/assets/icons/cross.svg.js +1 -0
- package/dist/esm/assets/icons/errorInfo.svg.js +1 -0
- package/dist/esm/assets/icons/question-mark.svg.js +1 -0
- package/dist/esm/assets/icons/search.svg.js +1 -0
- package/dist/esm/bundle.css +628 -0
- package/dist/esm/components/TypographyStyle.d.ts +15 -0
- package/dist/esm/components/TypographyStyle.js +88 -0
- package/dist/esm/components/button/Button.d.ts +3 -0
- package/dist/esm/components/button/Button.js +1 -0
- package/dist/esm/components/button/Button.styled.d.ts +13 -0
- package/dist/esm/components/button/Button.styled.js +1 -0
- package/dist/esm/components/button/index.d.ts +1 -0
- package/dist/esm/components/button/model.d.ts +57 -0
- package/dist/esm/components/button/themes.d.ts +18 -0
- package/dist/esm/components/button/themes.js +1 -0
- package/dist/esm/components/checkBox/CheckBox.d.ts +9 -0
- package/dist/esm/components/checkBox/CheckBox.js +1 -0
- package/dist/esm/components/checkBox/CheckBox.styled.d.ts +7 -0
- package/dist/esm/components/checkBox/CheckBox.styled.js +26 -0
- package/dist/esm/components/checkBox/index.d.ts +1 -0
- package/dist/esm/components/dropdown/Common.styled.d.ts +2 -0
- package/dist/esm/components/dropdown/Dropdown.d.ts +8 -0
- package/dist/esm/components/dropdown/UnChildDropdown/UnChildDropdown.d.ts +10 -0
- package/dist/esm/components/dropdown/index.d.ts +1 -0
- package/dist/esm/components/dropdown/opennedDropdown/components/OpennedDropdown.d.ts +3 -0
- package/dist/esm/components/dropdown/opennedDropdown/components/OpennedDropdown.js +1 -0
- package/dist/esm/components/dropdown/opennedDropdown/components/OpennedDropdown.styled.d.ts +5 -0
- package/dist/esm/components/dropdown/opennedDropdown/components/OpennedDropdown.styled.js +24 -0
- package/dist/esm/components/dropdown/opennedDropdown/components/description/Description.d.ts +6 -0
- package/dist/esm/components/dropdown/opennedDropdown/components/description/Description.js +1 -0
- package/dist/esm/components/dropdown/opennedDropdown/components/description/Description.styled.d.ts +1 -0
- package/dist/esm/components/dropdown/opennedDropdown/components/description/Description.styled.js +5 -0
- package/dist/esm/components/dropdown/opennedDropdown/components/menu/FreeFormMenu.d.ts +6 -0
- package/dist/esm/components/dropdown/opennedDropdown/components/menu/FreeFormMenu.js +1 -0
- package/dist/esm/components/dropdown/opennedDropdown/components/menu/FreeFormMenu.styled.d.ts +1 -0
- package/dist/esm/components/dropdown/opennedDropdown/components/menu/FreeFormMenu.styled.js +6 -0
- package/dist/esm/components/dropdown/opennedDropdown/components/menu/MenuItem.d.ts +8 -0
- package/dist/esm/components/dropdown/opennedDropdown/components/menu/MenuItem.js +1 -0
- package/dist/esm/components/dropdown/opennedDropdown/components/menu/MenuList.d.ts +8 -0
- package/dist/esm/components/dropdown/opennedDropdown/components/menu/MenuList.js +1 -0
- package/dist/esm/components/dropdown/opennedDropdown/components/menu/MenuList.styled.d.ts +1 -0
- package/dist/esm/components/dropdown/opennedDropdown/components/menu/MenuList.styled.js +6 -0
- package/dist/esm/components/dropdown/opennedDropdown/components/menu/SelectAllMenu.d.ts +7 -0
- package/dist/esm/components/dropdown/opennedDropdown/components/menu/SelectAllMenu.js +1 -0
- package/dist/esm/components/dropdown/opennedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.d.ts +8 -0
- package/dist/esm/components/dropdown/opennedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.js +1 -0
- package/dist/esm/components/dropdown/opennedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.d.ts +1 -0
- package/dist/esm/components/dropdown/opennedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js +8 -0
- package/dist/esm/components/dropdown/opennedDropdown/components/searchbox/SearchBox.d.ts +4 -0
- package/dist/esm/components/dropdown/opennedDropdown/components/searchbox/SearchBox.js +1 -0
- package/dist/esm/components/dropdown/opennedDropdown/components/searchbox/ZeroState.d.ts +4 -0
- package/dist/esm/components/dropdown/opennedDropdown/components/searchbox/ZeroState.js +1 -0
- package/dist/esm/components/dropdown/opennedDropdown/index.d.ts +1 -0
- package/dist/esm/components/dropdown/opennedDropdown/utils/iterationOnOptions.d.ts +31 -0
- package/dist/esm/components/dropdown/opennedDropdown/utils/iterationOnOptions.js +1 -0
- package/dist/esm/components/dropdown/type.d.ts +26 -0
- package/dist/esm/components/fab-menu/FABMenu.d.ts +18 -0
- package/dist/esm/components/fab-menu/FABMenu.js +1 -0
- package/dist/esm/components/fab-menu/index.d.ts +1 -0
- package/dist/esm/components/floating-action-button/FloatingActionButton.d.ts +16 -0
- package/dist/esm/components/floating-action-button/FloatingActionButton.js +1 -0
- package/dist/esm/components/floating-action-button/FloatingActionButton.styles.d.ts +33 -0
- package/dist/esm/components/floating-action-button/FloatingActionButton.styles.js +83 -0
- package/dist/esm/components/floating-action-button/index.d.ts +2 -0
- package/dist/esm/components/icon-button/IconButton.d.ts +3 -0
- package/dist/esm/components/icon-button/IconButton.js +1 -0
- package/dist/esm/components/icon-button/IconButton.styled.d.ts +6 -0
- package/dist/esm/components/icon-button/IconButton.styled.js +3 -0
- package/dist/esm/components/icon-button/index.d.ts +1 -0
- package/dist/esm/components/icon-button/model.d.ts +37 -0
- package/dist/esm/components/icon-button/theme.d.ts +3 -0
- package/dist/esm/components/icon-button/theme.js +1 -0
- package/dist/esm/components/image-compress/ImageCompress.d.ts +7 -0
- package/dist/esm/components/image-compress/ImageCompress.js +1 -0
- package/dist/esm/components/image-compress/index.d.ts +1 -0
- package/dist/esm/components/input/Input.d.ts +38 -0
- package/dist/esm/components/input/Input.js +1 -0
- package/dist/esm/components/input/Input.styled.d.ts +114 -0
- package/dist/esm/components/input/Input.styled.js +1 -0
- package/dist/esm/components/input/context/InputStyleProvider.d.ts +7 -0
- package/dist/esm/components/input/context/InputStyleProvider.js +1 -0
- package/dist/esm/components/input/index.d.ts +1 -0
- package/dist/esm/components/list-item/ListItem.d.ts +16 -0
- package/dist/esm/components/list-item/ListItem.js +1 -0
- package/dist/esm/components/list-item/ListItem.styled.d.ts +9 -0
- package/dist/esm/components/list-item/ListItem.styled.js +1 -0
- package/dist/esm/components/list-item/index.d.ts +1 -0
- package/dist/esm/components/list-item/themes.d.ts +3 -0
- package/dist/esm/components/list-item/themes.js +1 -0
- package/dist/esm/components/pagination/Pagination.d.ts +9 -0
- package/dist/esm/components/pagination/Pagination.js +1 -0
- package/dist/esm/components/pagination/Pagination.styled.d.ts +5 -0
- package/dist/esm/components/pagination/Pagination.styled.js +1 -0
- package/dist/esm/components/pagination/index.d.ts +1 -0
- package/dist/esm/components/radioButton/RadioButton.d.ts +8 -0
- package/dist/esm/components/radioButton/RadioButton.js +1 -0
- package/dist/esm/components/radioButton/RadioButton.styled.d.ts +7 -0
- package/dist/esm/components/radioButton/RadioButton.styled.js +20 -0
- package/dist/esm/components/radioButton/index.d.ts +1 -0
- package/dist/esm/components/sample-button/SampleButton.d.ts +18 -0
- package/dist/esm/components/sample-button/SampleButton.styled.d.ts +9 -0
- package/dist/esm/components/sample-button/index.d.ts +1 -0
- package/dist/esm/components/sample-button/themes.d.ts +2 -0
- package/dist/esm/components/spinner/Spinner.d.ts +6 -0
- package/dist/esm/components/spinner/Spinner.js +1 -0
- package/dist/esm/components/spinner/index.d.ts +1 -0
- package/dist/esm/components/spinner/lotties/black.json.js +1 -0
- package/dist/esm/components/spinner/lotties/brand.json.js +1 -0
- package/dist/esm/components/spinner/lotties/red.json.js +1 -0
- package/dist/esm/components/spinner/lotties/white.json.js +1 -0
- package/dist/esm/components/spinner/model.d.ts +13 -0
- package/dist/esm/components/spinner/themes.d.ts +3 -0
- package/dist/esm/components/spinner/themes.js +1 -0
- package/dist/esm/components/stepper/Stepper.d.ts +22 -0
- package/dist/esm/components/stepper/Stepper.js +1 -0
- package/dist/esm/components/stepper/Stepper.styled.d.ts +6 -0
- package/dist/esm/components/stepper/Stepper.styled.js +83 -0
- package/dist/esm/components/stepper/StepperService.d.ts +4 -0
- package/dist/esm/components/stepper/WorkingStepper.d.ts +14 -0
- package/dist/esm/components/stepper/index.d.ts +1 -0
- package/dist/esm/components/stepper/themes.d.ts +18 -0
- package/dist/esm/components/stepper/themes.js +1 -0
- package/dist/esm/components/tag/Tag.d.ts +6 -0
- package/dist/esm/components/tag/Tag.js +1 -0
- package/dist/esm/components/tag/Tag.styled.d.ts +6 -0
- package/dist/esm/components/tag/Tag.styled.js +26 -0
- package/dist/esm/components/tag/index.d.ts +1 -0
- package/dist/esm/components/tag/model.d.ts +34 -0
- package/dist/esm/components/tag/themes.d.ts +6 -0
- package/dist/esm/components/tag/themes.js +1 -0
- package/dist/esm/components/toaster/Toaster.d.ts +27 -0
- package/dist/esm/components/toaster/Toaster.js +1 -0
- package/dist/esm/components/toaster/Toaster.styled.d.ts +4 -0
- package/dist/esm/components/toaster/Toaster.styled.js +35 -0
- package/dist/esm/components/toaster/index.d.ts +1 -0
- package/dist/esm/components/tooltips/CustomisedTooltip.d.ts +25 -0
- package/dist/esm/components/tooltips/CustomisedTooltip.js +1 -0
- package/dist/esm/components/tooltips/Tooltip.d.ts +10 -0
- package/dist/esm/components/tooltips/Tooltip.js +1 -0
- package/dist/esm/components/tooltips/TooltipInternal.d.ts +10 -0
- package/dist/esm/components/tooltips/TooltipInternal.js +1 -0
- package/dist/esm/components/tooltips/index.d.ts +2 -0
- package/dist/esm/components/zeroState/ZeroState.d.ts +7 -0
- package/dist/esm/components/zeroState/ZeroState.js +17 -0
- package/dist/esm/constants/Theme.d.ts +587 -0
- package/dist/esm/constants/Theme.js +1 -0
- package/dist/esm/constants/breakpoints.d.ts +6 -0
- package/dist/esm/constants/colors.d.ts +7 -0
- package/dist/esm/constants/spacing.d.ts +2 -0
- package/dist/esm/hooks/useOutside.d.ts +1 -0
- package/dist/esm/hooks/useOutside.js +1 -0
- package/dist/esm/index.d.ts +15 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/utils/classNames.d.ts +7 -0
- package/dist/esm/utils/rgba.d.ts +8 -0
- package/package.json +6 -5
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const TitleLarge: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export declare const TitleMedium: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
+
export declare const TitleRegular: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
|
+
export declare const TitleSmall: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
|
+
export declare const Display: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
|
+
export declare const BodyLarge: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
7
|
+
export declare const BodyPrimary: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
8
|
+
export declare const BodySecondary: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
9
|
+
export declare const BodyPrimaryLink: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
10
|
+
export declare const BodySecondaryLink: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
11
|
+
export declare const BodyCaption: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
12
|
+
export declare const BodyTiny: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
13
|
+
export declare const ButtonLarge: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
14
|
+
export declare const ButtonRegular: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
15
|
+
export declare const SubHeading: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import t from"styled-components";import{COLORS as e,FONTS as i}from"../constants/Theme.js";const o=t=>t+"px";t.div`
|
|
2
|
+
font-family: Inter;
|
|
3
|
+
color: ${t=>t.color||e.text.primary};
|
|
4
|
+
font-weight: ${t=>i.titleLarge.fontWeight};
|
|
5
|
+
font-size: ${t=>o(i.titleLarge.fontSize)};
|
|
6
|
+
line-height: ${t=>o(i.titleLarge.lineHeight)};
|
|
7
|
+
`,t.div`
|
|
8
|
+
font-family: Inter;
|
|
9
|
+
color: ${t=>t.color||e.text.primary};
|
|
10
|
+
font-weight: ${t=>i.titleMedium.fontWeight};
|
|
11
|
+
font-size: ${t=>o(i.titleMedium.fontSize)};
|
|
12
|
+
line-height: ${t=>o(i.titleMedium.lineHeight)};
|
|
13
|
+
`;const n=t.div`
|
|
14
|
+
font-family: Inter;
|
|
15
|
+
color: ${t=>t.color||e.text.primary};
|
|
16
|
+
font-weight: ${t=>i.titleRegular.fontWeight};
|
|
17
|
+
font-size: ${t=>o(i.titleRegular.fontSize)};
|
|
18
|
+
line-height: ${t=>o(i.titleRegular.lineHeight)};
|
|
19
|
+
`,r=t.div`
|
|
20
|
+
font-family: Inter;
|
|
21
|
+
color: ${t=>t.color||e.text.primary};
|
|
22
|
+
font-weight: ${t=>i.titleSmall.fontWeight};
|
|
23
|
+
font-size: ${t=>o(i.titleSmall.fontSize)};
|
|
24
|
+
line-height: ${t=>o(i.titleSmall.lineHeight)};
|
|
25
|
+
`;t.div`
|
|
26
|
+
font-family: Inter;
|
|
27
|
+
color: ${t=>t.color||e.text.primary};
|
|
28
|
+
font-weight: ${t=>i.display.fontWeight};
|
|
29
|
+
font-size: ${t=>o(i.display.fontSize)};
|
|
30
|
+
line-height: ${t=>o(i.display.lineHeight)};
|
|
31
|
+
`,t.div`
|
|
32
|
+
font-family: Inter;
|
|
33
|
+
color: ${t=>t.color||e.text.primary};
|
|
34
|
+
font-weight: ${t=>i.bodyPrimary.fontWeight};
|
|
35
|
+
font-size: ${t=>o(i.bodyLarge.fontSize)};
|
|
36
|
+
line-height: ${t=>o(i.bodyLarge.lineHeight)};
|
|
37
|
+
`;const l=t.div`
|
|
38
|
+
font-family: Inter;
|
|
39
|
+
color: ${t=>t.color||e.text.primary};
|
|
40
|
+
font-weight: ${t=>i.bodyPrimary.fontWeight};
|
|
41
|
+
font-size: ${t=>o(i.bodyPrimary.fontSize)};
|
|
42
|
+
line-height: ${t=>o(i.bodyPrimary.lineHeight)};
|
|
43
|
+
`,f=t.div`
|
|
44
|
+
font-family: Inter;
|
|
45
|
+
color: ${t=>e.content.primary};
|
|
46
|
+
font-weight: ${t=>i.bodySecondary.fontWeight};
|
|
47
|
+
font-size: ${t=>o(i.bodySecondary.fontSize)};
|
|
48
|
+
line-height: ${t=>o(i.bodySecondary.lineHeight)};
|
|
49
|
+
`;t(l)`
|
|
50
|
+
text-decoration: underline;
|
|
51
|
+
color: ${t=>e.content.brand};
|
|
52
|
+
text-decoration-color: ${t=>e.content.brand};
|
|
53
|
+
cursor: pointer;
|
|
54
|
+
`,t(f)`
|
|
55
|
+
text-decoration: underline;
|
|
56
|
+
color: ${t=>e.content.brand};
|
|
57
|
+
text-decoration-color: ${t=>e.content.brand};
|
|
58
|
+
cursor: pointer;
|
|
59
|
+
`;const g=t.div`
|
|
60
|
+
font-family: Inter;
|
|
61
|
+
color: ${t=>t.color||e.text.primary};
|
|
62
|
+
font-weight: ${t=>i.caption.fontWeight};
|
|
63
|
+
font-size: ${t=>o(i.caption.fontSize)};
|
|
64
|
+
line-height: ${t=>o(i.caption.lineHeight)};
|
|
65
|
+
`;t.div`
|
|
66
|
+
color: ${t=>t.color||e.text.primary};
|
|
67
|
+
font-weight: ${t=>i.tiny.fontWeight};
|
|
68
|
+
font-size: ${t=>o(i.tiny.fontSize)};
|
|
69
|
+
line-height: ${t=>o(i.tiny.lineHeight)};
|
|
70
|
+
`;const a=t.div`
|
|
71
|
+
font-family: Inter;
|
|
72
|
+
color: ${t=>t.color||e.text.primary};
|
|
73
|
+
font-weight: ${t=>i.buttonLarge.fontWeight};
|
|
74
|
+
font-size: ${t=>o(i.buttonLarge.fontSize)};
|
|
75
|
+
line-height: ${t=>o(i.buttonLarge.lineHeight)};
|
|
76
|
+
`,h=t.div`
|
|
77
|
+
font-family: Inter;
|
|
78
|
+
color: ${t=>t.color||e.text.primary};
|
|
79
|
+
font-weight: ${t=>i.buttonRegular.fontWeight};
|
|
80
|
+
font-size: ${t=>o(i.buttonRegular.fontSize)};
|
|
81
|
+
line-height: ${t=>o(i.buttonRegular.lineHeight)};
|
|
82
|
+
`;t.div`
|
|
83
|
+
font-family: Inter;
|
|
84
|
+
color: ${t=>t.color||e.text.primary};
|
|
85
|
+
font-weight: ${t=>i.subHeading.fontWeight};
|
|
86
|
+
font-size: ${t=>o(i.subHeading.fontSize)};
|
|
87
|
+
line-height: ${t=>o(i.subHeading.lineHeight)};
|
|
88
|
+
`;export{g as BodyCaption,l as BodyPrimary,f as BodySecondary,a as ButtonLarge,h as ButtonRegular,n as TitleRegular,r as TitleSmall};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__rest as e}from"../../_virtual/_tslib.js";import{jsx as i,jsxs as n}from"react/jsx-runtime";import s,{forwardRef as t}from"react";import{Spinner as a}from"../spinner/Spinner.js";import{Button as o,ButtonCustomDashedBorder as c}from"./Button.styled.js";import{getButtonIconColor as r,SpinnerColorMap as l,GetButtonTextComponent as d}from"./themes.js";const m=t(((t,m)=>{var{id:p,buttonType:b="primary",size:g="small",buttonText:h,disabled:j,IconComponent:y,LeadingIcon:u,TrailingIcon:v,style:N,isLoading:f,inverse:O,onClick:T}=t,I=e(t,["id","buttonType","size","buttonText","disabled","IconComponent","LeadingIcon","TrailingIcon","style","isLoading","inverse","onClick"]);const x=d(g),C="chip"===g?16:20,L={height:C,width:C,color:r(g,b,O,j,f),style:{display:"block"},className:"icon"};return i(o,Object.assign({onClick:T,ref:m,id:p,disabled:j,style:N,size:g,buttonType:b,isLoading:f,inverse:O},I,{children:n("div",Object.assign({className:"container"},{children:["dash"===b&&i(c,{}),i("div",Object.assign({className:"overlay-container"},{children:f&&i(a,{className:"spinner",size:"small",color:l(b,O)})})),y&&i("div",Object.assign({className:"icon-component"},{children:s.createElement(y,L)})),v&&i("div",Object.assign({className:"icon-trailing"},{children:s.createElement(v,L)})),i(x,Object.assign({className:"text"},{children:h})),u&&i("div",Object.assign({className:"icon-leading"},{children:s.createElement(u,L)}))]}))}))}));m.displayName="Button";export{m as Button};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Size, Type } from './model';
|
|
3
|
+
export declare const Button: import("@emotion/styled").StyledComponent<{
|
|
4
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
5
|
+
as?: import("react").ElementType<any> | undefined;
|
|
6
|
+
} & {
|
|
7
|
+
size: Size;
|
|
8
|
+
buttonType: Type;
|
|
9
|
+
isLoading?: boolean | undefined;
|
|
10
|
+
inverse?: boolean | undefined;
|
|
11
|
+
disabled?: boolean | undefined;
|
|
12
|
+
}, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
|
|
13
|
+
export declare const ButtonCustomDashedBorder: () => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"@emotion/styled/base";import{jsxs as c,Fragment as d,jsx as n}from"react/jsx-runtime";import{COLORS as X}from"../../constants/Theme.js";import{getBackgroundColor as H,getPadding as l,getBorder as b,getColor as x,getDashedBorderStyling as i,generateDisabledStyling as e,getDisabledTextColor as R,getClickEffect as G,getHoverButtonBackground as p,generateInverseHoverBackground as o,getLoadingBorder as a,getLoadingBackground as I}from"./themes.js";const u=t("button","production"===process.env.NODE_ENV?{target:"exlualr0"}:{target:"exlualr0",label:"Button"})("all:unset;cursor:pointer;display:flex;gap:8.83px;border-radius:4px;overflow:hidden;background-color:",(t=>H(t.buttonType,t.size,t.inverse)),";",(t=>"dash"===t.buttonType?`.container {\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\twidth: 100%;\n\t\t\t\t\tposition: relative;\n\t\t\t\t\tborder-radius: 4px;\n\t\t\t\t\toverflow: hidden;\n\t\t\t\t\tpadding: ${l(t.buttonType,t.size)};\n\t\t\t\t}`:`padding: ${l(t.buttonType,t.size)};\n\t${b(t.buttonType,t.size,t.inverse)}`)," .icon-component{height:",(t=>"chip"===t.size?"16px":"20px"),";width:",(t=>"chip"===t.size?"16px":"20px"),";}.icon-trailing{height:",(t=>"chip"===t.size?"16px":"20px"),";width:",(t=>"chip"===t.size?"16px":"20px"),";}.text{color:",(t=>x(t.buttonType,t.size,t.inverse)),";}.icon-leading{height:",(t=>"chip"===t.size?"16px":"20px"),";width:",(t=>"chip"===t.size?"16px":"20px"),";}",(t=>i(t.buttonType,t.size,t.isLoading?X.content.brand:void 0))," .overlay-container{display:none;}:disabled{cursor:not-allowed;",(t=>i(t.buttonType,t.size,X.stroke.primary)),";.overlay-container{display:none!important;}",(t=>e(t.buttonType,t.size,t.inverse))," .text{color:",(t=>R(t.inverse)),"!important;}}",(t=>!t.disabled&&!t.isLoading&&`:active {\n\t\t\t\t.container {\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\tposition: relative;\n\t\t\t\t\twidth: 100%;\n\t\t\t\t\t.overlay-container {\n\t\t\t\t\t\tdisplay: none !important;\n\t\t\t\t\t}\n\t\t\t\t\t${"chip"===t.size&&`.text {\n\t\t\t\t\t\tcolor: ${X.background.inverseLight} !important;\n\t\t\t\t\t}\n\t\t\t\t\t.icon {\n\t\t\t\t\t\tcolor: ${X.background.inverseLight};\n\t\t\t\t\t}\n\t\t\t\t\t`}\n\t\t\t\t}\n\n\n\t\t\t${G(t.buttonType,t.size,t.inverse)}\n\t\t\t${i(t.buttonType,t.size,X.content.brand)}\n\t\t}`)," ",(t=>t.isLoading?`cursor: not-allowed;\n\t\tpadding: 0;\n\t\t${a(t.buttonType,t.size,t.inverse)}\n\n\t\t.container {\n\t\t\tdisplay: flex;\n\t\t\tposition: relative;\n\t\t\twidth: 100%;\n\t\t\t.text {\n\t\t\t\topacity: 0;\n\t\t\t}\n\t\t\tpadding: ${l(t.buttonType,t.size)};\n\t\t\t.overlay-container {\n\t\t\t\tdisplay: block;\n\t\t\t\tposition: absolute;\n\t\t\t\tpadding: 0;\n\t\t\t\tpadding-top: 1px;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\t${I(t.buttonType,t.size,t.inverse)}\n\t\t\t\t.spinner {\n\t\t\t\t\tposition: absolute;\n\t\t\t\t\ttop: calc(50% - 9px);\n\t\t\t\t\tleft: calc(50% - 7px);\n\t\t\t\t}\n\n\t\t\t}\n\t\t}`:`:not(:active):not(:disabled):hover {\n\t\t\tpadding: 0;\n\t\t\t.container {\n\t\t\t\tdisplay: flex;\n\t\t\t\tposition: relative;\n\t\t\t\twidth: 100%;\n\t\t\t\tpadding: ${l(t.buttonType,t.size)};\n\t\t\t\t.overlay-container {\n\t\t\t\t\tdisplay: block;\n\t\t\t\t\tposition: absolute;\n\t\t\t\t\tpadding: 0;\n\t\t\t\t\ttop: 0;\n\t\t\t\t\tleft: 0;\n\t\t\t\t\twidth: 100%;\n\t\t\t\t\theight: 100%;\n\t\t\t\t\t${p(t.buttonType,t.inverse)}\n\t\t\t\t}\n\t\t\t\t${"chip"===t.size?`background-color: ${X.surface.hovered};`:""}\n\t\t\t\t${"primary"!==t.buttonType||"chip"===t.size||t.inverse?"":`background-color: ${X.background.inverseLight};`}\n\t\t\t}\n\t\t\t${t.inverse?o(t.buttonType,t.disabled):""}\n\t\t}`)," .container{display:flex;gap:8.33px;}"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkJ1dHRvbi5zdHlsZWQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUlvQyIsImZpbGUiOiJCd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gO1xyXG5leHBvcnQgY29uc3QgQnV0dG9uQ3VzdG9tRGFzaGVkQm9yZGVyID0gKCkgPT4ge1xyXG4gICAgcmV0dXJuIChfanN4cyhfRnJhZ21lbnQsIHsgY2hpbGRyZW46IFtfanN4KFwiZGl2XCIsIHsgY2xhc3NOYW1lOiBcImxpbmUtdG9wXCIgfSksIF9qc3goXCJkaXZcIiwgeyBjbGFzc05hbWU6IFwibGluZS1sZWZ0XCIgfSksIF9qc3goXCJkaXZcIiwgeyBjbGFzc05hbWU6IFwibGluZS1ib3R0b21cIiB9KSwgX2pzeChcImRpdlwiLCB7IGNsYXNzTmFtZTogXCJsaW5lLXJpZ2h0XCIgfSldIH0pKTtcclxufTtcclxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9QnV0dG9uLnN0eWxlZC5qcy5tYXAiXX0= */")),m=()=>c(d,{children:[n("div",{className:"line-top"}),n("div",{className:"line-left"}),n("div",{className:"line-bottom"}),n("div",{className:"line-right"})]});export{u as Button,m as ButtonCustomDashedBorder};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Button';
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export type Size = 'chip' | 'small' | 'medium' | 'large';
|
|
3
|
+
export type Type = 'primary' | 'secondary' | 'tertiary' | 'tertiaryGray' | 'destructive' | 'dash';
|
|
4
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
5
|
+
/**
|
|
6
|
+
* Font fize of the text
|
|
7
|
+
* @default default 'small'
|
|
8
|
+
*/
|
|
9
|
+
size?: Size;
|
|
10
|
+
/**
|
|
11
|
+
* Text to render inside the button
|
|
12
|
+
* @default ''
|
|
13
|
+
*/
|
|
14
|
+
buttonText: string;
|
|
15
|
+
/**
|
|
16
|
+
* Whether the button is pressable or not
|
|
17
|
+
* @default true
|
|
18
|
+
*/
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Type of the button
|
|
22
|
+
* @default 'primary'
|
|
23
|
+
*/
|
|
24
|
+
buttonType?: Type;
|
|
25
|
+
/**
|
|
26
|
+
* The icon component that needs to be render, if text also exists, this would be Trailing component
|
|
27
|
+
* Referred to https://ozzie.sh/passing-icons-as-props-in-a-consistent-way-using-react
|
|
28
|
+
* @default undefined
|
|
29
|
+
*/
|
|
30
|
+
IconComponent?: React.FunctionComponent<React.SVGAttributes<SVGElement>>;
|
|
31
|
+
/**
|
|
32
|
+
* The icon component that is to the right of the buttonText
|
|
33
|
+
* Referred to https://ozzie.sh/passing-icons-as-props-in-a-consistent-way-using-react
|
|
34
|
+
* @default undefined
|
|
35
|
+
*/
|
|
36
|
+
LeadingIcon?: React.FunctionComponent<React.SVGAttributes<SVGElement>>;
|
|
37
|
+
/**
|
|
38
|
+
* The icon component that is the left of the buttonText
|
|
39
|
+
* Referred to https://ozzie.sh/passing-icons-as-props-in-a-consistent-way-using-react
|
|
40
|
+
* @default undefined
|
|
41
|
+
*/
|
|
42
|
+
TrailingIcon?: React.FunctionComponent<React.SVGAttributes<SVGElement>>;
|
|
43
|
+
/**
|
|
44
|
+
* the button container styling that needs to be override the default one
|
|
45
|
+
* @default null
|
|
46
|
+
*/
|
|
47
|
+
style?: React.CSSProperties;
|
|
48
|
+
/**
|
|
49
|
+
* Indicates if button is loading and a loading indicator should be shown.
|
|
50
|
+
* When the button is loading the width of the button should not change.
|
|
51
|
+
*/
|
|
52
|
+
isLoading?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Indicates if the styling of the button should be inverse
|
|
55
|
+
*/
|
|
56
|
+
inverse?: boolean;
|
|
57
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Size, Type } from './model';
|
|
2
|
+
export declare const getBackgroundColor: (type: Type, size: Size, inverse?: boolean) => string;
|
|
3
|
+
export declare const getColor: (type: Type, size: Size, inverse?: boolean) => string;
|
|
4
|
+
export declare const getDisabledTextColor: (inverse?: boolean) => string;
|
|
5
|
+
export declare const getPadding: (type: Type, size: Size) => "4px 8px" | "6px 4px" | "6px 12px" | "10px 4px" | "10px 12px" | "14px 4px" | "14px 12px" | undefined;
|
|
6
|
+
export declare const GetButtonTextComponent: (size: Size) => import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
7
|
+
export declare const getBorderColor: (type: Type, inverse?: boolean) => string;
|
|
8
|
+
export declare const getBorder: (type: Type, size: Size, inverse?: boolean) => string;
|
|
9
|
+
export declare const getLinearGradientValue: (size: Size) => string;
|
|
10
|
+
export declare const getHoverButtonBackground: (type: Type, inverse?: boolean) => "background-color: #000000;\n\t\t\t\topacity: 0.03;" | "";
|
|
11
|
+
export declare const generateInverseHoverBackground: (type: Type, disabled?: boolean) => string;
|
|
12
|
+
export declare const generateDisabledStyling: (type: Type, size: Size, inverse?: boolean) => string;
|
|
13
|
+
export declare const getDashedBorderStyling: (type: Type, size: Size, borderColor?: string) => string;
|
|
14
|
+
export declare const getClickEffect: (type: Type, size: Size, inverse?: boolean) => string | undefined;
|
|
15
|
+
export declare const getLoadingBackground: (type: Type, size: Size, inverse?: boolean) => string;
|
|
16
|
+
export declare const getLoadingBorder: (type: Type, size: Size, inverse?: boolean) => string;
|
|
17
|
+
export declare const SpinnerColorMap: (type: Type, inverse?: boolean) => string;
|
|
18
|
+
export declare const getButtonIconColor: (size: Size, type: Type, inverse?: boolean, disabled?: boolean, isLoading?: boolean) => string | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{COLORS as t}from"../../constants/Theme.js";import{BodyCaption as r,ButtonRegular as n,ButtonLarge as e}from"../TypographyStyle.js";const a=(r,n,e)=>{if("chip"===n)return t.surface.subdued;switch(r){case"primary":return e?t.background.warning.vibrant:t.background.brand;case"destructive":return t.background.negative.vibrant;default:return"transparent"}},o=(r,n,e)=>{if("chip"===n)return t.content.secondary;switch(r){case"primary":return e?t.content.primary:t.content.primaryInverse;case"tertiaryGray":case"dash":return t.content.secondary;case"destructive":return t.content.primaryInverse;default:return e?t.content.primaryInverse:t.stroke.brand}},i=r=>r?"rgba(255, 255, 255, 0.5)":t.content.inactive,c=(t,r)=>{if("chip"===r)return"4px 8px";if("small"===r)switch(t){case"tertiary":case"tertiaryGray":return"6px 4px";default:return"6px 12px"}else if("medium"===r)switch(t){case"tertiary":case"tertiaryGray":return"10px 4px";default:return"10px 12px"}else if("large"===r)switch(t){case"tertiary":case"tertiaryGray":return"14px 4px";default:return"14px 12px"}},d=t=>"chip"===t?r:"small"===t?n:e,p=(r,n)=>n?t.surface.standard:"secondary"==r?t.stroke.brand:t.content.placeholder,s=(r,n,e)=>"chip"===n?`border: 1px solid ${t.stroke.primary};`:e?"secondary"===r?`border: 1px solid ${p(r,e)};`:"border: none;":"secondary"===r?`border: 1px solid ${p(r)};`:"border: none;",b=t=>"medium"===t?"5px,\n\t\ttransparent 5px,\n\t\ttransparent 10px":"6px,\n\t\ttransparent 6px,\n\t\ttransparent 12px",g=(t,r)=>r||"primary"===t?"":"background-color: #000000;\n\t\t\t\topacity: 0.03;",u=(r,n)=>n?"":"primary"===r?`background-color: ${t.stroke.warning.lightAlt};`:"background-color: rgba(255, 255, 255, 0.1)",l=(r,n,e)=>"chip"===n?"background-color: transparent;":"primary"===r||"destructive"===r?e?"background-color: rgba(255,255,255,0.3);":`background-color: ${t.background.inactive};`:"secondary"===r?e?"border: 1px solid rgba(255, 255, 255, 0.5);":`border: 1px solid ${t.stroke.primary};`:"",y=function(t,r){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p(t);return`\n\t.line-top {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\ttop: 0;\n\t\theight: 1px;\n\t\twidth: 100%;\n\t\tbackground: repeating-linear-gradient(\n\t\t\tto right,\n\t\t\t${n},\n\t\t\t${n}\n\t\t\t\t${b(r)}\n\t\t);\n\t}\n\t.line-right {\n\t\tposition: absolute;\n\t\tright: 0;\n\t\ttop: 0;\n\t\twidth: 1px;\n\t\theight: 100%;\n\t\tbackground: repeating-linear-gradient(\n\t\t\tto bottom,\n\t\t\t${n},\n\t\t\t${n}\n\t\t\t\t${b(r)}\n\t\t);\n\t}\n\t.line-bottom {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\tbottom: 0;\n\t\theight: 1px;\n\t\twidth: 100%;\n\t\tbackground: repeating-linear-gradient(\n\t\t\tto right,\n\t\t\t${n},\n\t\t\t${n}\n\t\t\t\t${b(r)}\n\t\t);\n\t}\n\t.line-left {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\ttop: 0;\n\t\twidth: 1px;\n\t\theight: 100%;\n\t\tbackground: repeating-linear-gradient(\n\t\t\tto bottom,\n\t\t\t${n},\n\t\t\t${n}\n\t\t\t\t${b(r)}\n\t\t);\n\t}\n\t`},h=(r,n,e)=>"chip"===n?`border: 1px solid ${t.stroke.brandLightAlt};\n\t\tbackground-color: ${t.background.brandLight};`:"primary"===r||"destructive"===r?e?`background-color: ${t.background.warning.vibrant} !important;\n\t\t\tbox-shadow: inset 0px 4px 12px rgba(0, 0, 0, 0.35);\n\t\t\t`:"box-shadow: inset 0px 4px 12px rgba(0, 0, 0, 0.35);":"secondary"===r||"tertiary"===r||"tertiaryGray"===r||"dash"===r?e?`background-color: ${t.background.inverseLight} !important;`:`background-color: ${t.background.brandLight};`:void 0,x=(r,n,e)=>"chip"===n?`background-color: ${t.background.base};`:"primary"===r?`background-color: ${e?t.background.warning.vibrant:t.background.brandLight};`:"destructive"===r?`background-color: ${t.background.negative.light};`:"background-color: transparent;",k=(r,n,e)=>"chip"===n?"border: none;":"secondary"===r?e?`border: 1px solid ${t.content.secondary};`:`border: 1px solid ${t.stroke.brandLightAlt};`:"",m=(r,n)=>n?"primary"===r?t.content.primary:t.content.primaryInverse:"destructive"===r?t.content.negative:t.content.brand,v=(r,n,e,a,o)=>"chip"===r?a?t.content.inactive:t.content.secondary:o?"transparent":"primary"===n||"destructive"===n?e?a?"rgba(255, 255, 255, 0.5)":t.content.primary:a?t.content.inactive:t.content.primaryInverse:"secondary"===n||"tertiary"===n?e?a?"rgba(255, 255, 255, 0.5)":t.content.primaryInverse:a?t.content.inactive:t.content.brand:"tertiaryGray"===n||"dash"===n?a?t.content.inactive:t.content.secondary:void 0;export{d as GetButtonTextComponent,m as SpinnerColorMap,l as generateDisabledStyling,u as generateInverseHoverBackground,a as getBackgroundColor,s as getBorder,p as getBorderColor,v as getButtonIconColor,h as getClickEffect,o as getColor,y as getDashedBorderStyling,i as getDisabledTextColor,g as getHoverButtonBackground,b as getLinearGradientValue,x as getLoadingBackground,k as getLoadingBorder,c as getPadding};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type CheckBoxProps = {
|
|
3
|
+
isChecked: boolean;
|
|
4
|
+
isPartiallyChecked?: boolean;
|
|
5
|
+
isDisabled?: boolean;
|
|
6
|
+
value?: string;
|
|
7
|
+
onValueChange: (checked: boolean, value?: string) => void;
|
|
8
|
+
};
|
|
9
|
+
export declare const CheckBox: React.FC<CheckBoxProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e,jsxs as i}from"react/jsx-runtime";import{useState as s,useEffect as t}from"react";import{CheckboxContainer as l,CheckboxIcon as n}from"./CheckBox.styled.js";import{COLORS as o}from"../../constants/Theme.js";const r=s=>i("svg",Object.assign({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[e("rect",{x:"0",y:"0",width:"18",height:"18",rx:"4",fill:s.isDisabled?o.content.inactive:o.background.positive.vibrant}),!s.isPartial&&e("svg",Object.assign({width:"10",height:"9",x:"4",y:"4",viewBox:"0 0 10 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:e("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.68189 1.06043C10.0724 1.45096 10.0724 2.08412 9.68189 2.47464L4.02501 8.13152C3.63449 8.52205 3.00132 8.52205 2.6108 8.13152L0.489684 6.01041C0.0991601 5.61988 0.0991598 4.98672 0.489684 4.59619C0.880209 4.20567 1.51337 4.20567 1.9039 4.59619L3.31791 6.0102L8.26768 1.06043C8.6582 0.669907 9.29137 0.669907 9.68189 1.06043Z",fill:"white"})})),s.isPartial&&e("rect",{x:"5",y:"8",width:"8",height:"2",rx:"1",fill:o.surface.standard})]})),a=i=>{var o;const[a,c]=s(i.isChecked||!1),[d,h]=s(!1),[v,g]=s(!1);return t((()=>{c(i.isChecked)}),[i.isChecked]),e(l,Object.assign({onClick:()=>{var e;if(!i.isDisabled){const s=!a;c(s),null===(e=i.onValueChange)||void 0===e||e.call(i,s,i.value)}},onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),onMouseDown:()=>g(!0),onMouseUp:()=>g(!1)},{children:e(n,Object.assign({checked:a,hovered:d,clicked:v,isDisabled:i.isDisabled||!1},{children:a&&e(r,{isPartial:null!==(o=i.isPartiallyChecked)&&void 0!==o&&o,isDisabled:i.isDisabled||!1})}))}))};export{a as CheckBox};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const CheckboxContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export declare const CheckboxIcon: import("styled-components").StyledComponent<"div", any, {
|
|
3
|
+
checked: boolean;
|
|
4
|
+
hovered: boolean;
|
|
5
|
+
clicked: boolean;
|
|
6
|
+
isDisabled: boolean;
|
|
7
|
+
}, never>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import e,{css as i}from"styled-components";import{COLORS as t}from"../../constants/Theme.js";const o=e.div`
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
cursor: pointer;
|
|
5
|
+
`,r=e.div`
|
|
6
|
+
width: 14px;
|
|
7
|
+
height: 14px;
|
|
8
|
+
border-radius: 4px;
|
|
9
|
+
border: 2px solid black;
|
|
10
|
+
display: flex;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
align-items: center;
|
|
13
|
+
${e=>e.checked&&i`
|
|
14
|
+
border: 0px;
|
|
15
|
+
width: 18px;
|
|
16
|
+
height: 18px;
|
|
17
|
+
`}
|
|
18
|
+
${e=>e.hovered&&i`
|
|
19
|
+
outline: 3px solid ${t.surface.hovered};
|
|
20
|
+
`}
|
|
21
|
+
${e=>e.clicked&&!e.isDisabled&&i`
|
|
22
|
+
outline: 3px solid
|
|
23
|
+
${e.checked?t.stroke.positive.lightAlt:t.surface.hovered};
|
|
24
|
+
outline-offset: 2px;
|
|
25
|
+
`}
|
|
26
|
+
`;export{o as CheckboxContainer,r as CheckboxIcon};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CheckBox';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { OpenDropdownProps } from '../type';
|
|
3
|
+
export type DropdownProps = OpenDropdownProps & {
|
|
4
|
+
isLoading?: boolean;
|
|
5
|
+
size?: 'default' | 'small';
|
|
6
|
+
};
|
|
7
|
+
export declare const UnChildDropdown: React.ForwardRefExoticComponent<OpenDropdownProps & {
|
|
8
|
+
isLoading?: boolean | undefined;
|
|
9
|
+
size?: "small" | "default" | undefined;
|
|
10
|
+
} & React.RefAttributes<{}>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Dropdown';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as l,useRef as o,useEffect as n}from"react";import{useOutside as i}from"../../../../hooks/useOutside.js";import{iterateOnOptions as s}from"../utils/iterationOnOptions.js";import{Description as r}from"./description/Description.js";import{FreeFormMenu as c}from"./menu/FreeFormMenu.js";import{MenuList as u}from"./menu/MenuList.js";import{SelectAllMenu as a}from"./menu/SelectAllMenu.js";import p from"./multiSelect/MultiSelectDropdownBottomBar.js";import{OpennedDropdownContainer as d,MenuListContainer as m}from"./OpennedDropdown.styled.js";import{SearchBox as f}from"./searchbox/SearchBox.js";import{SearchZeroState as h}from"./searchbox/ZeroState.js";const b=304,j=290,S=S=>{let{options:g,isSearchable:v,isMultiSelect:O,width:x,allowFreeForm:F,height:w,onClose:M,onSelect:y}=S;const[D,A]=l(null!=g?g:[]),[B,C]=l(null!=x?x:j),[k,E]=l(""),[H,L]=l(null),W=o(null);i(W,(()=>{L(null),null==M||M()}));const Z=null!=w?w:b,q="number"==typeof Z&&v&&O?Z-96:v&&!O||!v&&O?Z-48:Z;function z(e){if(O){const t=s(D,{selected:e.selected},(t=>t.value===e.value));A([...t])}else null==y||y(e)}n((()=>{const e=null!=x?x:j;C(null===H?e:2*e)}),[H]);const G=D.map((e=>{var t;if(k){if(e.options){const t=Object.assign({},e);return t.options=t.options.filter((e=>{var t;return!!(null===(t=e.label)||void 0===t?void 0:t.includes(k))})),t.options.length>0?t:null}return(null===(t=e.label)||void 0===t?void 0:t.includes(k))?e:null}return e})).filter((e=>null!==e)),I=!!v&&k&&0===G.length;return e(d,Object.assign({ref:W,style:{maxWidth:H?800:400,width:B,height:Z}},{children:[e("div",Object.assign({style:{width:H?"50%":"100%",display:"flex",flexDirection:"column"}},{children:[!!v&&t(f,{options:g,onSearch:function(e){E(e)}}),e(m,Object.assign({maxHeight:q},{children:[!!O&&!I&&t(a,{options:D,onSelect:function(e){if("selectAll"===e){const e=s(D,{selected:!0},(e=>!e.disabled));A([...e])}else if("notSelected"===e){const e=s(D,{selected:!1},(e=>!e.disabled));A([...e])}}}),!F&&I&&t(h,{searchedString:k}),F&&I&&t(c,{isMultiSelect:O,onSelect:function(e){if(!O)return void z({label:k,value:k,isFreeForm:!0,selected:!0});const t=D.map((t=>t.options?t:Object.assign(Object.assign({},t),{selected:t.label===k&&t.value===k&&e})));e&&(t.some((e=>e.label===k&&e.value===k))||t.unshift({label:k,value:k,isFreeForm:!0,selected:!0})),A([...t])},searchedString:k}),t(u,{onSelect:z,showDescription:function(e,t){L(e&&t?{title:e,description:t}:null)},isMultiSelect:O,options:G})]})),!!O&&t(p,{onClear:function(){const e=s(D,{selected:!1});A([...e])},onApply:function(){const e=[];D.forEach((t=>{if(t.options){const l=t.options.filter((e=>!0===e.selected));e.push(Object.assign(Object.assign({},t),{options:[...l]}))}else t.selected&&e.push(Object.assign({},t))})),null==y||y([...e])},list:D})]})),!!H&&t(r,{title:H.title,description:H.description})]}))};export{S as OpennedDropdown};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const OpennedDropdownContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export declare const ItemContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
+
export declare const MenuListContainer: import("styled-components").StyledComponent<"div", any, {
|
|
4
|
+
maxHeight: number;
|
|
5
|
+
}, never>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import o from"styled-components";import{COLORS as e}from"../../../../constants/Theme.js";const r=o.div`
|
|
2
|
+
border-radius: 4px;
|
|
3
|
+
border: 1px solid ${e.stroke.primary};
|
|
4
|
+
max-height: 640px;
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: row;
|
|
8
|
+
position: relative;
|
|
9
|
+
`;o.div`
|
|
10
|
+
padding: 14px 16px 14px 18px;
|
|
11
|
+
flex-direction: row;
|
|
12
|
+
align-items: center;
|
|
13
|
+
border-bottom-width: 1px;
|
|
14
|
+
border-bottom-style: solid;
|
|
15
|
+
border-bottom-color: ${e.stroke.primary};
|
|
16
|
+
width: 100%;
|
|
17
|
+
heigth: 100%;
|
|
18
|
+
`;const t=o.div`
|
|
19
|
+
max-height: ${o=>o.maxHeight}px;
|
|
20
|
+
overflow-y: auto;
|
|
21
|
+
flex: 1;
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
`;export{t as MenuListContainer,r as OpennedDropdownContainer};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as t,jsxs as e}from"react/jsx-runtime";import{TitleRegular as r,BodySecondary as i}from"../../../../TypographyStyle.js";import{COLORS as o}from"../../../../../constants/Theme.js";import{DescriptionContainer as n}from"./Description.styled.js";const s=s=>{let{title:c,description:l,visible:m}=s;return t(n,{children:e("div",Object.assign({style:{padding:24}},{children:[t(r,Object.assign({style:{color:o.content.primary,marginBottom:4}},{children:c})),t(i,Object.assign({style:{color:o.content.secondary}},{children:l}))]}))})};export{s as Description};
|
package/dist/esm/components/dropdown/opennedDropdown/components/description/Description.styled.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DescriptionContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e,Fragment as t}from"react/jsx-runtime";import{useState as o}from"react";import r from"styled-components";import{CheckBox as n}from"../../../../checkBox/CheckBox.js";import{ListItem as i}from"../../../../list-item/ListItem.js";import{BodyCaption as m}from"../../../../TypographyStyle.js";import{COLORS as c}from"../../../../../constants/Theme.js";import{FreeFormContainer as s}from"./FreeFormMenu.styled.js";const l=r(i)``,a=r=>{let{searchedString:i,onSelect:a,isMultiSelect:p}=r;const[f,h]=o(!1);function d(){h(!f),a(!f)}return e(l,{onClick:e=>{e.preventDefault(),d()},listItem:{label:i,value:i},trailingIcon:p?e(n,{isChecked:f,onValueChange:d}):e(t,{}),leadingIcon:e(s,{children:e(m,Object.assign({style:{color:c.content.secondary}},{children:"Freeform"}))})})};export{a as FreeFormMenu};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const FreeFormContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MultiSelectOption, SingleOption } from '../../../type';
|
|
3
|
+
export declare const MenuItem: React.FC<{
|
|
4
|
+
option: SingleOption | MultiSelectOption;
|
|
5
|
+
isMultiSelect?: boolean;
|
|
6
|
+
showDescription: (title?: string, description?: string) => void;
|
|
7
|
+
onSelect: (option: SingleOption) => void;
|
|
8
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e,Fragment as t}from"react/jsx-runtime";import o from"styled-components";import{CheckBox as i}from"../../../../checkBox/CheckBox.js";import{ListItem as s}from"../../../../list-item/ListItem.js";import{BodyCaption as r}from"../../../../TypographyStyle.js";import{COLORS as n}from"../../../../../constants/Theme.js";import{FreeFormContainer as c}from"./FreeFormMenu.styled.js";const l=o(s)``,m=o=>{let{option:s,isMultiSelect:m,showDescription:a,onSelect:d}=o;var p;function f(e){s.disabled||d(Object.assign(Object.assign({},s),{selected:e}))}return e(l,{onClick:e=>{e.preventDefault(),f(!s.selected)},onMouseOver:function(){s.descriptions?a(s.label,s.descriptions):a()},listItem:s,trailingIcon:m?e(i,{isDisabled:null!==(p=s.disabled)&&void 0!==p&&p,isChecked:s.selected,onValueChange:f}):e(t,{}),leadingIcon:s.isFreeForm?e(c,{children:e(r,Object.assign({style:{color:n.content.secondary}},{children:"Freeform"}))}):e(t,{}),variant:s.disabled?"inactive":"default"})};export{m as MenuItem};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DropdownOption, SingleOption } from '../../../type';
|
|
3
|
+
export declare const MenuList: React.FC<{
|
|
4
|
+
options: DropdownOption[];
|
|
5
|
+
isMultiSelect?: boolean;
|
|
6
|
+
showDescription: (title?: string, description?: string) => void;
|
|
7
|
+
onSelect: (optionSelect: SingleOption) => void;
|
|
8
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as t,Fragment as e,jsxs as o}from"react/jsx-runtime";import{MenuItem as i}from"./MenuItem.js";import{StyledGroupedLabel as n}from"./MenuList.styled.js";const r=r=>{let{options:s,isMultiSelect:l,showDescription:c,onSelect:p}=r;return t(e,{children:s.map(((e,r)=>{if(e.options){const s=e;return o("div",{children:[t(n,{children:s.label}),s.options.map(((e,o)=>t(i,{onSelect:p,showDescription:c,isMultiSelect:l,option:e},o)))]},r)}return t(i,{onSelect:p,showDescription:c,isMultiSelect:l,option:e},r)}))})};export{r as MenuList};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const StyledGroupedLabel: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import o from"styled-components";import{BodyCaption as r}from"../../../../TypographyStyle.js";import{COLORS as t}from"../../../../../constants/Theme.js";const n=o(r)`
|
|
2
|
+
padding: 8px 16px;
|
|
3
|
+
height: 16px;
|
|
4
|
+
color: ${t.content.secondary};
|
|
5
|
+
background-color: ${t.background.base};
|
|
6
|
+
`;export{n as StyledGroupedLabel};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DropdownOption } from '../../../type';
|
|
3
|
+
export type SelectAllCheckboxState = 'notSelected' | 'selectAll' | 'partiallySelected';
|
|
4
|
+
export declare const SelectAllMenu: React.FC<{
|
|
5
|
+
options: DropdownOption[];
|
|
6
|
+
onSelect: (newState: SelectAllCheckboxState) => void;
|
|
7
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useState as l,useEffect as t}from"react";import n from"styled-components";import{CheckBox as i}from"../../../../checkBox/CheckBox.js";import{ListItem as r}from"../../../../list-item/ListItem.js";const o=n(r)``,a=n=>{let{options:r,onSelect:a}=n;const[c,s]=l("notSelected");function d(){"partiallySelected"===c&&a("notSelected"),"selectAll"===c&&a("notSelected"),"notSelected"===c&&a("selectAll")}return t((()=>{var e;if("all"===(r[0].options?!0===(null===(e=r[0].options)||void 0===e?void 0:e[0].selected)?"all":"none":!0===r[0].selected?"all":"none")){const e=r.filter((e=>!e.disabled)).reduce(((e,l)=>{if("all"===e){if(!l.options)return l.selected?"all":"partial";{const e=l.options.filter((e=>!e.disabled)),t=e.filter((e=>!0===e.selected));if(t.length===e.length)return"all";if(t.length<e.length)return"partial"}}return e}),"all");"all"===e&&s("selectAll"),"partial"===e&&s("partiallySelected")}else{const e=r.filter((e=>!e.disabled)).reduce(((e,l)=>{if("none"===e){if(!l.options)return l.selected?"partial":"none";{const e=l.options.filter((e=>!e.disabled)),t=e.filter((e=>!e.selected));if(t.length===e.length)return"none";if(t.length<e.length)return"partial"}}return e}),"none");"none"===e&&s("notSelected"),"partial"===e&&s("partiallySelected")}}),[r]),e(o,{onClick:e=>{e.preventDefault(),d()},listItem:{label:"Select All",value:"All"},trailingIcon:e(i,{isChecked:"selectAll"===c||"partiallySelected"===c,isPartiallyChecked:"partiallySelected"===c,onValueChange:d}),variant:"default"})};export{a as SelectAllMenu};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsxs as t,jsx as e}from"react/jsx-runtime";import{Button as o}from"../../../../button/Button.js";import{BodySecondary as r}from"../../../../TypographyStyle.js";import{COLORS as l}from"../../../../../constants/Theme.js";import{BottomBarContainer as n}from"./MultiSelectDropdownBottomBar.styled.js";const s=s=>{let{onApply:i,onClear:c,list:p}=s;const a=p.reduce(((t,e)=>{if(e.options){return t+e.options.filter((t=>!0===t.selected)).length}return e.selected?t+1:t}),0);return t(n,Object.assign({style:{justifyContent:"space-between"}},{children:[e(r,Object.assign({style:{flex:1,color:l.content.primary}},{children:a?`${a} selected`:""})),t("div",Object.assign({style:{flexDirection:"row",display:"flex",gap:12}},{children:[e(o,{size:"small",buttonType:"tertiaryGray",buttonText:"Clear",onClick:c}),e(o,{size:"small",buttonText:"Apply",onClick:i})]}))]}))};export{s as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const BottomBarContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as r,Fragment as o}from"react/jsx-runtime";import{useRef as t}from"react";import{Input as e}from"../../../../input/Input.js";import{InputStyleContext as n}from"../../../../input/context/InputStyleProvider.js";import{COLORS as i}from"../../../../../constants/Theme.js";import c from"../../../../../assets/icons/cross.svg.js";import s from"../../../../../assets/icons/search.svg.js";const a=a=>{let{onSearch:l}=a;const p=t();return r(n.Provider,Object.assign({value:{InputWrapper:{borderRadius:0,border:0,borderBottom:"1px solid "+i.stroke.primary,padding:"12px 16px"},IconHolder:{marginLeft:0},input:{marginLeft:4,minHeight:"100%"}}},{children:r(e,{ref:p,variant:"small",placeholder:"Search",leftIcon:{icon:()=>r(s,{width:24,height:24,color:i.content.placeholder})},rightIcon:{icon:()=>{var t;return(null===(t=null==p?void 0:p.current)||void 0===t?void 0:t.value)?r(c,{onClick:()=>{p.current.value="",l("")},width:24,height:24,color:i.content.placeholder}):r(o,{})}},onChangeText:l})}))};export{a as SearchBox};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{ZeroState as r}from"../../../../zeroState/ZeroState.js";const e=e=>{let{searchedString:o}=e;return t(r,{title:"No results found",subTitle:`\tSorry we could not find any results for "${null!=o?o:""}"`})};export{e as SearchZeroState};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/OpennedDropdown';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { DropdownOption, SingleOption } from '../../type';
|
|
2
|
+
export declare function iterateOnOptions(options: DropdownOption[], newVal: SingleOption, checkCB?: (optionForValidation: SingleOption) => boolean): ({
|
|
3
|
+
options: {
|
|
4
|
+
label?: string | undefined;
|
|
5
|
+
value?: string | undefined;
|
|
6
|
+
descriptions?: string | undefined;
|
|
7
|
+
selected?: boolean | undefined;
|
|
8
|
+
disabled?: boolean | undefined;
|
|
9
|
+
isFreeForm?: boolean | undefined;
|
|
10
|
+
}[];
|
|
11
|
+
label?: string | undefined;
|
|
12
|
+
value?: string | undefined;
|
|
13
|
+
descriptions?: string | undefined;
|
|
14
|
+
selected?: boolean | undefined;
|
|
15
|
+
disabled?: boolean | undefined;
|
|
16
|
+
isFreeForm?: boolean | undefined;
|
|
17
|
+
} | {
|
|
18
|
+
label?: string | undefined;
|
|
19
|
+
value?: string | undefined;
|
|
20
|
+
descriptions?: string | undefined;
|
|
21
|
+
selected?: boolean | undefined;
|
|
22
|
+
disabled?: boolean | undefined;
|
|
23
|
+
isFreeForm?: boolean | undefined;
|
|
24
|
+
} | {
|
|
25
|
+
label?: string | undefined;
|
|
26
|
+
value?: string | undefined;
|
|
27
|
+
descriptions?: string | undefined;
|
|
28
|
+
selected?: boolean | undefined;
|
|
29
|
+
disabled?: boolean | undefined;
|
|
30
|
+
options: (SingleOption | import("../../type").MultiSelectOption)[];
|
|
31
|
+
})[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function s(s,n,t){return s.map((s=>{if(s.options){const i=s.options.map((s=>!t||t(s)?Object.assign(Object.assign({},s),n):Object.assign({},s)));return Object.assign(Object.assign({},s),{options:[...i]})}return!t||t(s)?Object.assign(Object.assign({},s),n):Object.assign({},s)}))}export{s as iterateOnOptions};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface OpenDropdownProps {
|
|
2
|
+
options: DropdownOption[];
|
|
3
|
+
isSearchable?: boolean;
|
|
4
|
+
error?: string;
|
|
5
|
+
isMultiSelect?: boolean;
|
|
6
|
+
width?: number | string;
|
|
7
|
+
height?: number | string;
|
|
8
|
+
allowFreeForm?: boolean;
|
|
9
|
+
onClose?: () => void;
|
|
10
|
+
onSelect?: (option: SingleOption | SingleOption[]) => void;
|
|
11
|
+
}
|
|
12
|
+
export type GroupedOption = {
|
|
13
|
+
label?: string;
|
|
14
|
+
options: (SingleOption | MultiSelectOption)[];
|
|
15
|
+
};
|
|
16
|
+
export type SingleOption = {
|
|
17
|
+
label?: string;
|
|
18
|
+
value?: string;
|
|
19
|
+
descriptions?: string;
|
|
20
|
+
selected?: boolean;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
};
|
|
23
|
+
export type MultiSelectOption = SingleOption & {
|
|
24
|
+
isFreeForm?: boolean;
|
|
25
|
+
};
|
|
26
|
+
export type DropdownOption = MultiSelectOption | SingleOption | GroupedOption;
|