@itcase/ui 1.9.56 → 1.9.57
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/components/Accordion/Accordion.appearance.js +9 -0
- package/dist/components/Accordion/Accordion.interface.js +1 -0
- package/dist/components/Accordion/Accordion.js +57 -0
- package/dist/components/Accordion/AccordionItem.js +36 -0
- package/dist/components/Accordion/appearance/accordionSize.js +52 -0
- package/dist/components/Accordion/appearance/accordionStyle.js +14 -0
- package/dist/components/Accordion/appearance/accordionSurface.js +36 -0
- package/dist/components/Accordion/index.js +4 -0
- package/dist/components/Avatar/Avatar.appearance.js +11 -0
- package/dist/components/Avatar/Avatar.interface.js +1 -0
- package/dist/components/Avatar/Avatar.js +29 -0
- package/dist/components/Avatar/appearance/avatarDefault.js +23 -0
- package/dist/components/Avatar/appearance/avatarShape.js +25 -0
- package/dist/components/Avatar/appearance/avatarSize.js +63 -0
- package/dist/components/Avatar/appearance/avatarStyle.js +16 -0
- package/dist/components/Avatar/index.js +2 -0
- package/dist/components/AvatarStack/AvatarStack.appearance.js +5 -0
- package/dist/components/AvatarStack/AvatarStack.interface.js +1 -0
- package/dist/components/AvatarStack/AvatarStack.js +25 -0
- package/dist/components/AvatarStack/appearance/avatarStackSize.js +21 -0
- package/dist/components/AvatarStack/index.js +2 -0
- package/dist/components/Badge/Badge.appearance.js +29 -0
- package/dist/components/Badge/Badge.interface.js +1 -0
- package/dist/components/Badge/Badge.js +35 -0
- package/dist/components/Badge/appearance/badgeAccent.js +31 -0
- package/dist/components/Badge/appearance/badgeDanger.js +10 -0
- package/dist/components/Badge/appearance/badgeDisabled.js +9 -0
- package/dist/components/Badge/appearance/badgeError.js +9 -0
- package/dist/components/Badge/appearance/badgeExtra.js +10 -0
- package/dist/components/Badge/appearance/badgeInfo.js +16 -0
- package/dist/components/Badge/appearance/badgeShape.js +25 -0
- package/dist/components/Badge/appearance/badgeSize.js +38 -0
- package/dist/components/Badge/appearance/badgeSpecial.js +10 -0
- package/dist/components/Badge/appearance/badgeStyle.js +14 -0
- package/dist/components/Badge/appearance/badgeSuccess.js +10 -0
- package/dist/components/Badge/appearance/badgeSurface.js +25 -0
- package/dist/components/Badge/appearance/badgeWarning.js +10 -0
- package/dist/components/Badge/index.js +2 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.appearance.js +11 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.interface.js +1 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.js +23 -0
- package/dist/components/Breadcrumbs/BreadcrumbsItem.js +24 -0
- package/dist/components/Breadcrumbs/appearance/breadcrumbsAccent.js +9 -0
- package/dist/components/Breadcrumbs/appearance/breadcrumbsSize.js +39 -0
- package/dist/components/Breadcrumbs/appearance/breadcrumbsStyle.js +14 -0
- package/dist/components/Breadcrumbs/appearance/breadcrumbsSurface.js +27 -0
- package/dist/components/Breadcrumbs/index.js +4 -0
- package/dist/components/Button/Button.appearance.js +27 -0
- package/dist/components/Button/Button.interface.js +1 -0
- package/dist/components/Button/Button.js +46 -0
- package/dist/components/Button/appearance/buttonAccent.js +36 -0
- package/dist/components/Button/appearance/buttonDanger.js +24 -0
- package/dist/components/Button/appearance/buttonError.js +24 -0
- package/dist/components/Button/appearance/buttonExtra.js +22 -0
- package/dist/components/Button/appearance/buttonInfo.js +36 -0
- package/dist/components/Button/appearance/buttonShape.js +25 -0
- package/dist/components/Button/appearance/buttonSize.js +52 -0
- package/dist/components/Button/appearance/buttonSpecial.js +22 -0
- package/dist/components/Button/appearance/buttonStyle.js +14 -0
- package/dist/components/Button/appearance/buttonSuccess.js +24 -0
- package/dist/components/Button/appearance/buttonSurface.js +52 -0
- package/dist/components/Button/appearance/buttonWarning.js +24 -0
- package/dist/components/Button/index.js +2 -0
- package/dist/components/Cell/Cell.appearance.js +9 -0
- package/dist/components/Cell/Cell.interface.js +1 -0
- package/dist/components/Cell/Cell.js +36 -0
- package/dist/components/Cell/appearance/cellSize.js +59 -0
- package/dist/components/Cell/appearance/cellStyle.js +14 -0
- package/dist/components/Cell/appearance/cellSurface.js +51 -0
- package/dist/components/Cell/index.js +2 -0
- package/dist/components/Checkbox/Checkbox.appearance.js +19 -0
- package/dist/components/Checkbox/Checkbox.interface.js +1 -0
- package/dist/components/Checkbox/Checkbox.js +39 -0
- package/dist/components/Checkbox/appearance/checkboxDefault.js +16 -0
- package/dist/components/Checkbox/appearance/checkboxDisabled.js +16 -0
- package/dist/components/Checkbox/appearance/checkboxError.js +16 -0
- package/dist/components/Checkbox/appearance/checkboxRequire.js +16 -0
- package/dist/components/Checkbox/appearance/checkboxShape.js +10 -0
- package/dist/components/Checkbox/appearance/checkboxSize.js +23 -0
- package/dist/components/Checkbox/appearance/checkboxStyle.js +22 -0
- package/dist/components/Checkbox/appearance/checkboxSuccess.js +16 -0
- package/dist/components/Checkbox/index.js +2 -0
- package/dist/components/Checkmark/Checkmark.appearance.js +15 -0
- package/dist/components/Checkmark/Checkmark.interface.js +1 -0
- package/dist/components/Checkmark/Checkmark.js +33 -0
- package/dist/components/Checkmark/appearance/checkmarkAccent.js +10 -0
- package/dist/components/Checkmark/appearance/checkmarkDisabled.js +10 -0
- package/dist/components/Checkmark/appearance/checkmarkError.js +10 -0
- package/dist/components/Checkmark/appearance/checkmarkSize.js +32 -0
- package/dist/components/Checkmark/appearance/checkmarkStyle.js +14 -0
- package/dist/components/Checkmark/appearance/checkmarkSurface.js +21 -0
- package/dist/components/Checkmark/index.js +2 -0
- package/dist/components/Chips/Chips.appearance.js +29 -0
- package/dist/components/Chips/Chips.interface.js +1 -0
- package/dist/components/Chips/Chips.js +28 -0
- package/dist/components/Chips/ChipsGroup.js +19 -0
- package/dist/components/Chips/appearance/chipsAccent.js +24 -0
- package/dist/components/Chips/appearance/chipsDanger.js +17 -0
- package/dist/components/Chips/appearance/chipsDisabled.js +14 -0
- package/dist/components/Chips/appearance/chipsError.js +17 -0
- package/dist/components/Chips/appearance/chipsExtra.js +17 -0
- package/dist/components/Chips/appearance/chipsInfo.js +17 -0
- package/dist/components/Chips/appearance/chipsShape.js +25 -0
- package/dist/components/Chips/appearance/chipsSize.js +45 -0
- package/dist/components/Chips/appearance/chipsSpecial.js +17 -0
- package/dist/components/Chips/appearance/chipsStyle.js +14 -0
- package/dist/components/Chips/appearance/chipsSuccess.js +17 -0
- package/dist/components/Chips/appearance/chipsSurface.js +45 -0
- package/dist/components/Chips/appearance/chipsWarning.js +17 -0
- package/dist/components/Chips/index.js +3 -0
- package/dist/components/Choice/Choice.appearance.js +19 -0
- package/dist/components/Choice/Choice.interface.js +1 -0
- package/dist/components/Choice/Choice.js +57 -0
- package/dist/components/Choice/appearance/choiceDefault.js +37 -0
- package/dist/components/Choice/appearance/choiceDisabled.js +18 -0
- package/dist/components/Choice/appearance/choiceError.js +17 -0
- package/dist/components/Choice/appearance/choiceRequire.js +18 -0
- package/dist/components/Choice/appearance/choiceShape.js +25 -0
- package/dist/components/Choice/appearance/choiceSize.js +18 -0
- package/dist/components/Choice/appearance/choiceStyle.js +14 -0
- package/dist/components/Choice/appearance/choiceSuccess.js +18 -0
- package/dist/components/Choice/index.js +2 -0
- package/dist/components/Code/Code.appearance.js +19 -0
- package/dist/components/Code/Code.interface.js +1 -0
- package/dist/components/Code/Code.js +37 -0
- package/dist/components/Code/appearance/codeDefault.js +11 -0
- package/dist/components/Code/appearance/codeDisabled.js +12 -0
- package/dist/components/Code/appearance/codeError.js +12 -0
- package/dist/components/Code/appearance/codeRequire.js +12 -0
- package/dist/components/Code/appearance/codeShape.js +25 -0
- package/dist/components/Code/appearance/codeSize.js +13 -0
- package/dist/components/Code/appearance/codeStyle.js +16 -0
- package/dist/components/Code/appearance/codeSuccess.js +12 -0
- package/dist/components/Code/index.js +2 -0
- package/dist/components/CookiesWarning/CookiesWarning.appearance.js +5 -0
- package/dist/components/CookiesWarning/CookiesWarning.interface.js +1 -0
- package/dist/components/CookiesWarning/CookiesWarning.js +42 -0
- package/dist/components/CookiesWarning/appearance/cookiesWarningDefault.js +12 -0
- package/dist/components/CookiesWarning/index.js +3 -0
- package/dist/components/Dadata/Dadata.interface.js +1 -0
- package/dist/components/Dadata/Dadata.js +35 -0
- package/dist/components/Dadata/index.js +1 -0
- package/dist/components/DatePeriod/DatePeriod.appearance.js +9 -0
- package/dist/components/DatePeriod/DatePeriod.interface.js +1 -0
- package/dist/components/DatePeriod/DatePeriod.js +60 -0
- package/dist/components/DatePeriod/appearance/datePeriodShape.js +35 -0
- package/dist/components/DatePeriod/appearance/datePeriodSize.js +24 -0
- package/dist/components/DatePeriod/appearance/datePeriodSurface.js +17 -0
- package/dist/components/DatePeriod/index.js +2 -0
- package/dist/components/DatePicker/DatePicker.appearance.js +9 -0
- package/dist/components/DatePicker/DatePicker.interface.js +1 -0
- package/dist/components/DatePicker/DatePicker.js +110 -0
- package/dist/components/DatePicker/DatePicker.utils.js +12 -0
- package/dist/components/DatePicker/appearance/datePickerSize.js +31 -0
- package/dist/components/DatePicker/appearance/datePickerStyle.js +20 -0
- package/dist/components/DatePicker/appearance/datePickerSurface.js +14 -0
- package/dist/components/DatePicker/index.js +2 -0
- package/dist/components/Divider/Divider.appearance.js +19 -0
- package/dist/components/Divider/Divider.interface.js +1 -0
- package/dist/components/Divider/Divider.js +25 -0
- package/dist/components/Divider/appearance/dividerAccent.js +6 -0
- package/dist/components/Divider/appearance/dividerError.js +6 -0
- package/dist/components/Divider/appearance/dividerExtra.js +6 -0
- package/dist/components/Divider/appearance/dividerSize.js +12 -0
- package/dist/components/Divider/appearance/dividerSpecial.js +6 -0
- package/dist/components/Divider/appearance/dividerSuccess.js +6 -0
- package/dist/components/Divider/appearance/dividerSurface.js +15 -0
- package/dist/components/Divider/appearance/dividerWarning.js +6 -0
- package/dist/components/Divider/index.js +2 -0
- package/dist/components/Dot/Dot.interface.js +1 -0
- package/dist/components/Dot/Dot.js +12 -0
- package/dist/components/Dot/index.js +1 -0
- package/dist/components/Drawer/Drawer.appearance.js +7 -0
- package/dist/components/Drawer/Drawer.constants.js +16 -0
- package/dist/components/Drawer/Drawer.interface.js +1 -0
- package/dist/components/Drawer/Drawer.js +65 -0
- package/dist/components/Drawer/appearance/drawerSize.js +8 -0
- package/dist/components/Drawer/appearance/drawerSurface.js +10 -0
- package/dist/components/Drawer/index.js +2 -0
- package/dist/components/Dropdown/Dropdown.appearance.js +13 -0
- package/dist/components/Dropdown/Dropdown.interface.js +1 -0
- package/dist/components/Dropdown/Dropdown.js +56 -0
- package/dist/components/Dropdown/DropdownItem.appearance.js +13 -0
- package/dist/components/Dropdown/DropdownItem.js +31 -0
- package/dist/components/Dropdown/appearance/dropdownAccent.js +24 -0
- package/dist/components/Dropdown/appearance/dropdownShape.js +25 -0
- package/dist/components/Dropdown/appearance/dropdownSize.js +39 -0
- package/dist/components/Dropdown/appearance/dropdownStyle.js +14 -0
- package/dist/components/Dropdown/appearance/dropdownSurface.js +32 -0
- package/dist/components/Dropdown/index.js +4 -0
- package/dist/components/Dropzone/Dropzone.appearance.js +15 -0
- package/dist/components/Dropzone/Dropzone.interface.js +1 -0
- package/dist/components/Dropzone/Dropzone.js +131 -0
- package/dist/components/Dropzone/appearance/dropzoneDefault.js +17 -0
- package/dist/components/Dropzone/appearance/dropzoneDisabled.js +17 -0
- package/dist/components/Dropzone/appearance/dropzoneError.js +17 -0
- package/dist/components/Dropzone/appearance/dropzoneRequire.js +17 -0
- package/dist/components/Dropzone/appearance/dropzoneShape.js +25 -0
- package/dist/components/Dropzone/appearance/dropzoneSuccess.js +17 -0
- package/dist/components/Dropzone/index.js +1 -0
- package/dist/components/Flex/Flex.interface.js +1 -0
- package/dist/components/Flex/Flex.js +12 -0
- package/dist/components/Flex/FlexItem.js +13 -0
- package/dist/components/Flex/index.js +3 -0
- package/dist/components/Grid/Grid.interface.js +1 -0
- package/dist/components/Grid/Grid.js +12 -0
- package/dist/components/Grid/GridItem.js +12 -0
- package/dist/components/Grid/GridRow.js +12 -0
- package/dist/components/Grid/index.js +4 -0
- package/dist/components/Group/Group.appearance.js +5 -0
- package/dist/components/Group/Group.interface.js +1 -0
- package/dist/components/Group/Group.js +43 -0
- package/dist/components/Group/appearance/groupSurface.js +8 -0
- package/dist/components/Group/index.js +2 -0
- package/dist/components/HTMLContent/HTMLContent.interface.js +1 -0
- package/dist/components/HTMLContent/HTMLContent.js +12 -0
- package/dist/components/HTMLContent/index.js +1 -0
- package/dist/components/HeroTitle/HeroTitle.appearance.js +5 -0
- package/dist/components/HeroTitle/HeroTitle.interface.js +1 -0
- package/dist/components/HeroTitle/HeroTitle.js +30 -0
- package/dist/components/HeroTitle/appearance/heroTitleSize.js +21 -0
- package/dist/components/HeroTitle/index.js +2 -0
- package/dist/components/Icon/Icon.appearance.js +29 -0
- package/dist/components/Icon/Icon.interface.js +1 -0
- package/dist/components/Icon/Icon.js +69 -0
- package/dist/components/Icon/appearance/iconAccent.js +16 -0
- package/dist/components/Icon/appearance/iconDanger.js +10 -0
- package/dist/components/Icon/appearance/iconDisabled.js +9 -0
- package/dist/components/Icon/appearance/iconError.js +10 -0
- package/dist/components/Icon/appearance/iconExtra.js +10 -0
- package/dist/components/Icon/appearance/iconInfo.js +15 -0
- package/dist/components/Icon/appearance/iconShape.js +25 -0
- package/dist/components/Icon/appearance/iconSize.js +171 -0
- package/dist/components/Icon/appearance/iconSpecial.js +10 -0
- package/dist/components/Icon/appearance/iconStyle.js +14 -0
- package/dist/components/Icon/appearance/iconSuccess.js +10 -0
- package/dist/components/Icon/appearance/iconSurface.js +28 -0
- package/dist/components/Icon/appearance/iconWarning.js +10 -0
- package/dist/components/Icon/index.js +2 -0
- package/dist/components/Image/Image.interface.js +1 -0
- package/dist/components/Image/Image.js +33 -0
- package/dist/components/Image/index.js +1 -0
- package/dist/components/Input/Input.appearance.js +19 -0
- package/dist/components/Input/Input.interface.js +1 -0
- package/dist/components/Input/Input.js +22 -0
- package/dist/components/Input/appearance/inputDefault.js +21 -0
- package/dist/components/Input/appearance/inputDisabled.js +17 -0
- package/dist/components/Input/appearance/inputError.js +18 -0
- package/dist/components/Input/appearance/inputRequire.js +19 -0
- package/dist/components/Input/appearance/inputShape.js +25 -0
- package/dist/components/Input/appearance/inputSize.js +31 -0
- package/dist/components/Input/appearance/inputStyle.js +16 -0
- package/dist/components/Input/appearance/inputSuccess.js +18 -0
- package/dist/components/Input/index.js +2 -0
- package/dist/components/InputNumber/InputNumber.appearance.js +11 -0
- package/dist/components/InputNumber/InputNumber.interfaces.js +1 -0
- package/dist/components/InputNumber/InputNumber.js +44 -0
- package/dist/components/InputNumber/appearance/InputNumberShape.js +25 -0
- package/dist/components/InputNumber/appearance/inputNumberSize.js +28 -0
- package/dist/components/InputNumber/appearance/inputNumberStyle.js +16 -0
- package/dist/components/InputNumber/appearance/inputNumberSurface.js +16 -0
- package/dist/components/InputNumber/index.js +2 -0
- package/dist/components/InputPassword/InputPassword.appearance.js +19 -0
- package/dist/components/InputPassword/InputPassword.interface.js +1 -0
- package/dist/components/InputPassword/InputPassword.js +31 -0
- package/dist/components/InputPassword/appearance/inputPasswordDefault.js +24 -0
- package/dist/components/InputPassword/appearance/inputPasswordDisabled.js +21 -0
- package/dist/components/InputPassword/appearance/inputPasswordError.js +21 -0
- package/dist/components/InputPassword/appearance/inputPasswordRequire.js +21 -0
- package/dist/components/InputPassword/appearance/inputPasswordShape.js +25 -0
- package/dist/components/InputPassword/appearance/inputPasswordSize.js +38 -0
- package/dist/components/InputPassword/appearance/inputPasswordStyle.js +16 -0
- package/dist/components/InputPassword/appearance/inputPasswordSuccess.js +21 -0
- package/dist/components/InputPassword/index.js +2 -0
- package/dist/components/Label/Label.appearance.js +31 -0
- package/dist/components/Label/Label.interface.js +1 -0
- package/dist/components/Label/Label.js +32 -0
- package/dist/components/Label/appearance/labelAccent.js +21 -0
- package/dist/components/Label/appearance/labelDanger.js +17 -0
- package/dist/components/Label/appearance/labelDisabled.js +10 -0
- package/dist/components/Label/appearance/labelError.js +17 -0
- package/dist/components/Label/appearance/labelExtra.js +17 -0
- package/dist/components/Label/appearance/labelGradient.js +10 -0
- package/dist/components/Label/appearance/labelInfo.js +17 -0
- package/dist/components/Label/appearance/labelShape.js +25 -0
- package/dist/components/Label/appearance/labelSize.js +59 -0
- package/dist/components/Label/appearance/labelSpecial.js +17 -0
- package/dist/components/Label/appearance/labelStyle.js +14 -0
- package/dist/components/Label/appearance/labelSuccess.js +17 -0
- package/dist/components/Label/appearance/labelSurface.js +25 -0
- package/dist/components/Label/appearance/labelWarning.js +17 -0
- package/dist/components/Label/index.js +2 -0
- package/dist/components/Link/Link.appearance.js +29 -0
- package/dist/components/Link/Link.interface.js +1 -0
- package/dist/components/Link/Link.js +50 -0
- package/dist/components/Link/appearance/linkAccent.js +15 -0
- package/dist/components/Link/appearance/linkDanger.js +7 -0
- package/dist/components/Link/appearance/linkDisabled.js +13 -0
- package/dist/components/Link/appearance/linkError.js +9 -0
- package/dist/components/Link/appearance/linkExtra.js +8 -0
- package/dist/components/Link/appearance/linkInfo.js +17 -0
- package/dist/components/Link/appearance/linkRequire.js +12 -0
- package/dist/components/Link/appearance/linkSize.js +59 -0
- package/dist/components/Link/appearance/linkSpecial.js +8 -0
- package/dist/components/Link/appearance/linkStyle.js +16 -0
- package/dist/components/Link/appearance/linkSuccess.js +9 -0
- package/dist/components/Link/appearance/linkSurface.js +23 -0
- package/dist/components/Link/appearance/linkWarning.js +9 -0
- package/dist/components/Link/index.js +2 -0
- package/dist/components/List/List.appearance.js +25 -0
- package/dist/components/List/List.interface.js +1 -0
- package/dist/components/List/List.js +22 -0
- package/dist/components/List/ListItem.js +16 -0
- package/dist/components/List/appearance/listAccent.js +8 -0
- package/dist/components/List/appearance/listDanger.js +7 -0
- package/dist/components/List/appearance/listError.js +7 -0
- package/dist/components/List/appearance/listExtra.js +7 -0
- package/dist/components/List/appearance/listInfo.js +13 -0
- package/dist/components/List/appearance/listSize.js +24 -0
- package/dist/components/List/appearance/listSpecial.js +7 -0
- package/dist/components/List/appearance/listStyle.js +16 -0
- package/dist/components/List/appearance/listSuccess.js +7 -0
- package/dist/components/List/appearance/listSurface.js +19 -0
- package/dist/components/List/appearance/listWarning.js +7 -0
- package/dist/components/List/index.js +3 -0
- package/dist/components/Loader/Loader.appearance.js +25 -0
- package/dist/components/Loader/Loader.interface.js +1 -0
- package/dist/components/Loader/Loader.js +22 -0
- package/dist/components/Loader/appearance/loaderAccent.js +13 -0
- package/dist/components/Loader/appearance/loaderDanger.js +8 -0
- package/dist/components/Loader/appearance/loaderError.js +8 -0
- package/dist/components/Loader/appearance/loaderExtra.js +8 -0
- package/dist/components/Loader/appearance/loaderInfo.js +8 -0
- package/dist/components/Loader/appearance/loaderSize.js +15 -0
- package/dist/components/Loader/appearance/loaderSpecial.js +8 -0
- package/dist/components/Loader/appearance/loaderStyle.js +14 -0
- package/dist/components/Loader/appearance/loaderSuccess.js +8 -0
- package/dist/components/Loader/appearance/loaderSurface.js +18 -0
- package/dist/components/Loader/appearance/loaderWarning.js +8 -0
- package/dist/components/Loader/index.js +2 -0
- package/dist/components/Logo/Logo.interface.js +1 -0
- package/dist/components/Logo/Logo.js +23 -0
- package/dist/components/Logo/index.js +1 -0
- package/dist/components/MenuItem/MenuItem.appearance.js +15 -0
- package/dist/components/MenuItem/MenuItem.interface.js +1 -0
- package/dist/components/MenuItem/MenuItem.js +47 -0
- package/dist/components/MenuItem/appearance/menuItemAccent.js +27 -0
- package/dist/components/MenuItem/appearance/menuItemError.js +19 -0
- package/dist/components/MenuItem/appearance/menuItemShape.js +25 -0
- package/dist/components/MenuItem/appearance/menuItemSize.js +47 -0
- package/dist/components/MenuItem/appearance/menuItemStyle.js +14 -0
- package/dist/components/MenuItem/appearance/menuItemSurface.js +45 -0
- package/dist/components/MenuItem/index.js +2 -0
- package/dist/components/Modal/Modal.appearance.js +11 -0
- package/dist/components/Modal/Modal.interface.js +1 -0
- package/dist/components/Modal/Modal.js +139 -0
- package/dist/components/Modal/ModalLoader.js +6 -0
- package/dist/components/Modal/appearance/modalShape.js +25 -0
- package/dist/components/Modal/appearance/modalSize.js +28 -0
- package/dist/components/Modal/appearance/modalStyle.js +14 -0
- package/dist/components/Modal/appearance/modalSurface.js +8 -0
- package/dist/components/Modal/index.js +4 -0
- package/dist/components/ModalSheetBottom/ModalSheetBottom.appearance.js +5 -0
- package/dist/components/ModalSheetBottom/ModalSheetBottom.interface.js +1 -0
- package/dist/components/ModalSheetBottom/ModalSheetBottom.js +38 -0
- package/dist/components/ModalSheetBottom/appearance/modalSheetBottomSize.js +9 -0
- package/dist/components/ModalSheetBottom/index.js +2 -0
- package/dist/components/Notification/Notification.appearance.js +19 -0
- package/dist/components/Notification/Notification.interface.js +1 -0
- package/dist/components/Notification/Notification.js +26 -0
- package/dist/components/Notification/NotificationWrapper.js +11 -0
- package/dist/components/Notification/appearance/notificationDefault.js +16 -0
- package/dist/components/Notification/appearance/notificationError.js +16 -0
- package/dist/components/Notification/appearance/notificationInfo.js +16 -0
- package/dist/components/Notification/appearance/notificationShape.js +25 -0
- package/dist/components/Notification/appearance/notificationSize.js +17 -0
- package/dist/components/Notification/appearance/notificationStyle.js +14 -0
- package/dist/components/Notification/appearance/notificationSuccess.js +16 -0
- package/dist/components/Notification/appearance/notificationWarning.js +16 -0
- package/dist/components/Notification/index.js +4 -0
- package/dist/components/Overlay/Overlay.appearance.js +5 -0
- package/dist/components/Overlay/Overlay.interface.js +1 -0
- package/dist/components/Overlay/Overlay.js +21 -0
- package/dist/components/Overlay/appearance/overlayDefault.js +11 -0
- package/dist/components/Overlay/index.js +2 -0
- package/dist/components/Pagination/Pagination.appearance.js +13 -0
- package/dist/components/Pagination/Pagination.interface.js +1 -0
- package/dist/components/Pagination/Pagination.js +117 -0
- package/dist/components/Pagination/appearance/paginationAccent.js +38 -0
- package/dist/components/Pagination/appearance/paginationShape.js +34 -0
- package/dist/components/Pagination/appearance/paginationSize.js +63 -0
- package/dist/components/Pagination/appearance/paginationStyle.js +14 -0
- package/dist/components/Pagination/appearance/paginationSurface.js +35 -0
- package/dist/components/Pagination/index.js +2 -0
- package/dist/components/Radio/Radio.appearance.js +19 -0
- package/dist/components/Radio/Radio.interface.js +1 -0
- package/dist/components/Radio/Radio.js +33 -0
- package/dist/components/Radio/appearance/radioDefault.js +17 -0
- package/dist/components/Radio/appearance/radioDisabled.js +14 -0
- package/dist/components/Radio/appearance/radioError.js +14 -0
- package/dist/components/Radio/appearance/radioRequire.js +14 -0
- package/dist/components/Radio/appearance/radioShape.js +25 -0
- package/dist/components/Radio/appearance/radioSize.js +18 -0
- package/dist/components/Radio/appearance/radioStyle.js +24 -0
- package/dist/components/Radio/appearance/radioSuccess.js +14 -0
- package/dist/components/Radio/index.js +2 -0
- package/dist/components/RangeSlider/RangeSlider.interface.js +1 -0
- package/dist/components/RangeSlider/RangeSlider.js +16 -0
- package/dist/components/RangeSlider/index.js +1 -0
- package/dist/components/Response/Response.appearance.js +25 -0
- package/dist/components/Response/Response.constant.js +68 -0
- package/dist/components/Response/Response.interface.js +1 -0
- package/dist/components/Response/Response.js +49 -0
- package/dist/components/Response/appearance/responseConfirm.js +15 -0
- package/dist/components/Response/appearance/responseDanger.js +15 -0
- package/dist/components/Response/appearance/responseEmpty.js +15 -0
- package/dist/components/Response/appearance/responseError.js +15 -0
- package/dist/components/Response/appearance/responseFail.js +15 -0
- package/dist/components/Response/appearance/responseNothingFound.js +15 -0
- package/dist/components/Response/appearance/responseRefresh.js +15 -0
- package/dist/components/Response/appearance/responseStyle.js +14 -0
- package/dist/components/Response/appearance/responseSuccess.js +15 -0
- package/dist/components/Response/appearance/responseUnableLoadData.js +15 -0
- package/dist/components/Response/appearance/responseWarning.js +15 -0
- package/dist/components/Response/img/index.js +25 -0
- package/dist/components/Response/index.js +5 -0
- package/dist/components/SVGContent/SVGContent.interface.js +1 -0
- package/dist/components/SVGContent/SVGContent.js +15 -0
- package/dist/components/SVGContent/index.js +1 -0
- package/dist/components/ScrollOnDrag/ScrollOnDrag.interface.js +1 -0
- package/dist/components/ScrollOnDrag/ScrollOnDrag.js +18 -0
- package/dist/components/ScrollOnDrag/index.js +1 -0
- package/dist/components/ScrollToView/ScrollToView.interface.js +1 -0
- package/dist/components/ScrollToView/ScrollToView.js +15 -0
- package/dist/components/ScrollToView/index.js +1 -0
- package/dist/components/Scrollbar/Scrollbar.interface.js +1 -0
- package/dist/components/Scrollbar/Scrollbar.js +22 -0
- package/dist/components/Scrollbar/index.js +1 -0
- package/dist/components/Search/Search.appearance.js +19 -0
- package/dist/components/Search/Search.interface.js +1 -0
- package/dist/components/Search/SearchInput.js +42 -0
- package/dist/components/Search/SearchResult.js +12 -0
- package/dist/components/Search/appearance/searchDefault.js +23 -0
- package/dist/components/Search/appearance/searchDisabled.js +13 -0
- package/dist/components/Search/appearance/searchError.js +13 -0
- package/dist/components/Search/appearance/searchRequire.js +13 -0
- package/dist/components/Search/appearance/searchShape.js +25 -0
- package/dist/components/Search/appearance/searchSize.js +46 -0
- package/dist/components/Search/appearance/searchStyle.js +17 -0
- package/dist/components/Search/appearance/searchSuccess.js +12 -0
- package/dist/components/Search/index.js +4 -0
- package/dist/components/Segmented/Segmented.appearance.js +21 -0
- package/dist/components/Segmented/Segmented.interface.js +1 -0
- package/dist/components/Segmented/Segmented.js +53 -0
- package/dist/components/Segmented/appearance/segmentedDefault.js +29 -0
- package/dist/components/Segmented/appearance/segmentedDisabled.js +12 -0
- package/dist/components/Segmented/appearance/segmentedError.js +14 -0
- package/dist/components/Segmented/appearance/segmentedRequire.js +15 -0
- package/dist/components/Segmented/appearance/segmentedShape.js +25 -0
- package/dist/components/Segmented/appearance/segmentedSize.js +28 -0
- package/dist/components/Segmented/appearance/segmentedStyle.js +16 -0
- package/dist/components/Segmented/appearance/segmentedSuccess.js +13 -0
- package/dist/components/Segmented/appearance/segmentedWarning.js +14 -0
- package/dist/components/Segmented/index.js +2 -0
- package/dist/components/Select/Select.appearance.js +19 -0
- package/dist/components/Select/Select.interface.js +1 -0
- package/dist/components/Select/SelectClearIndicator.js +9 -0
- package/dist/components/Select/SelectContainer.js +100 -0
- package/dist/components/Select/SelectControl.js +9 -0
- package/dist/components/Select/SelectDropdownIndicator.js +9 -0
- package/dist/components/Select/SelectGroupHeading.js +9 -0
- package/dist/components/Select/SelectIndicatorsContainer.js +13 -0
- package/dist/components/Select/SelectInput.js +8 -0
- package/dist/components/Select/SelectLoadingIndicator.js +7 -0
- package/dist/components/Select/SelectLoadingMessage.js +8 -0
- package/dist/components/Select/SelectMenu.js +9 -0
- package/dist/components/Select/SelectMultiValue.js +18 -0
- package/dist/components/Select/SelectMultiValueContainer.js +9 -0
- package/dist/components/Select/SelectMultiValueLabel.js +8 -0
- package/dist/components/Select/SelectMultiValueRemove.js +8 -0
- package/dist/components/Select/SelectNoOptions.js +12 -0
- package/dist/components/Select/SelectOption.js +26 -0
- package/dist/components/Select/SelectOverflowBadge.js +9 -0
- package/dist/components/Select/SelectPlaceholder.js +8 -0
- package/dist/components/Select/SelectSingleValue.js +11 -0
- package/dist/components/Select/SelectValueContainer.js +7 -0
- package/dist/components/Select/appearance/selectDefault.js +37 -0
- package/dist/components/Select/appearance/selectDisabled.js +28 -0
- package/dist/components/Select/appearance/selectError.js +37 -0
- package/dist/components/Select/appearance/selectRequire.js +37 -0
- package/dist/components/Select/appearance/selectShape.js +27 -0
- package/dist/components/Select/appearance/selectSize.js +116 -0
- package/dist/components/Select/appearance/selectStyle.js +17 -0
- package/dist/components/Select/appearance/selectSuccess.js +37 -0
- package/dist/components/Select/index.js +16 -0
- package/dist/components/Swiper/Swiper.interface.js +1 -0
- package/dist/components/Swiper/Swiper.js +73 -0
- package/dist/components/Swiper/index.js +1 -0
- package/dist/components/Switch/Switch.appearance.js +17 -0
- package/dist/components/Switch/Switch.interface.js +1 -0
- package/dist/components/Switch/Switch.js +31 -0
- package/dist/components/Switch/appearance/switchDefault.js +11 -0
- package/dist/components/Switch/appearance/switchDisabled.js +11 -0
- package/dist/components/Switch/appearance/switchError.js +11 -0
- package/dist/components/Switch/appearance/switchRequire.js +11 -0
- package/dist/components/Switch/appearance/switchSize.js +18 -0
- package/dist/components/Switch/appearance/switchStyle.js +16 -0
- package/dist/components/Switch/appearance/switchSuccess.js +11 -0
- package/dist/components/Switch/index.js +2 -0
- package/dist/components/Tab/Tab.appearance.js +15 -0
- package/dist/components/Tab/Tab.interface.js +1 -0
- package/dist/components/Tab/Tab.js +34 -0
- package/dist/components/Tab/TabGroup.js +14 -0
- package/dist/components/Tab/appearance/tabError.js +13 -0
- package/dist/components/Tab/appearance/tabSize.js +44 -0
- package/dist/components/Tab/appearance/tabStyle.js +16 -0
- package/dist/components/Tab/appearance/tabSuccess.js +13 -0
- package/dist/components/Tab/appearance/tabSurface.js +64 -0
- package/dist/components/Tab/appearance/tabWarning.js +12 -0
- package/dist/components/Tab/index.js +3 -0
- package/dist/components/Text/Text.appearance.js +5 -0
- package/dist/components/Text/Text.interface.js +1 -0
- package/dist/components/Text/Text.js +35 -0
- package/dist/components/Text/appearance/textSize.js +24 -0
- package/dist/components/Text/index.js +2 -0
- package/dist/components/Textarea/Textarea.appearance.js +19 -0
- package/dist/components/Textarea/Textarea.interface.js +1 -0
- package/dist/components/Textarea/Textarea.js +20 -0
- package/dist/components/Textarea/appearance/textareaDefault.js +33 -0
- package/dist/components/Textarea/appearance/textareaDisabled.js +18 -0
- package/dist/components/Textarea/appearance/textareaError.js +18 -0
- package/dist/components/Textarea/appearance/textareaRequire.js +18 -0
- package/dist/components/Textarea/appearance/textareaShape.js +25 -0
- package/dist/components/Textarea/appearance/textareaSize.js +31 -0
- package/dist/components/Textarea/appearance/textareaStyle.js +16 -0
- package/dist/components/Textarea/appearance/textareaSuccess.js +19 -0
- package/dist/components/Textarea/index.js +2 -0
- package/dist/components/Tile/Tile.appearance.js +11 -0
- package/dist/components/Tile/Tile.interface.js +1 -0
- package/dist/components/Tile/Tile.js +26 -0
- package/dist/components/Tile/appearance/tileShape.js +25 -0
- package/dist/components/Tile/appearance/tileSize.js +51 -0
- package/dist/components/Tile/appearance/tileStyle.js +14 -0
- package/dist/components/Tile/appearance/tileSurface.js +35 -0
- package/dist/components/Tile/index.js +2 -0
- package/dist/components/Title/Title.appearance.js +29 -0
- package/dist/components/Title/Title.interface.js +1 -0
- package/dist/components/Title/Title.js +43 -0
- package/dist/components/Title/appearance/titleAccent.js +11 -0
- package/dist/components/Title/appearance/titleDanger.js +7 -0
- package/dist/components/Title/appearance/titleDisabled.js +16 -0
- package/dist/components/Title/appearance/titleError.js +9 -0
- package/dist/components/Title/appearance/titleExtra.js +8 -0
- package/dist/components/Title/appearance/titleInfo.js +11 -0
- package/dist/components/Title/appearance/titleRequire.js +16 -0
- package/dist/components/Title/appearance/titleSize.js +45 -0
- package/dist/components/Title/appearance/titleSpecial.js +7 -0
- package/dist/components/Title/appearance/titleStyle.js +11 -0
- package/dist/components/Title/appearance/titleSuccess.js +7 -0
- package/dist/components/Title/appearance/titleSurface.js +19 -0
- package/dist/components/Title/appearance/titleWarning.js +9 -0
- package/dist/components/Title/index.js +2 -0
- package/dist/components/Tooltip/Tooltip.appearance.js +19 -0
- package/dist/components/Tooltip/Tooltip.interface.js +1 -0
- package/dist/components/Tooltip/Tooltip.js +68 -0
- package/dist/components/Tooltip/appearance/tooltipDefault.js +10 -0
- package/dist/components/Tooltip/appearance/tooltipDisabled.js +9 -0
- package/dist/components/Tooltip/appearance/tooltipError.js +10 -0
- package/dist/components/Tooltip/appearance/tooltipRequire.js +10 -0
- package/dist/components/Tooltip/appearance/tooltipShape.js +25 -0
- package/dist/components/Tooltip/appearance/tooltipSize.js +18 -0
- package/dist/components/Tooltip/appearance/tooltipStyle.js +14 -0
- package/dist/components/Tooltip/appearance/tooltipSuccess.js +10 -0
- package/dist/components/Tooltip/index.js +2 -0
- package/dist/components/Video/Video.interface.js +1 -0
- package/dist/components/Video/Video.js +9 -0
- package/dist/components/Video/index.js +1 -0
- package/dist/components/Warning/Warning.appearance.js +17 -0
- package/dist/components/Warning/Warning.interface.js +1 -0
- package/dist/components/Warning/Warning.js +25 -0
- package/dist/components/Warning/appearance/warningAccent.js +24 -0
- package/dist/components/Warning/appearance/warningError.js +24 -0
- package/dist/components/Warning/appearance/warningInfo.js +24 -0
- package/dist/components/Warning/appearance/warningShape.js +25 -0
- package/dist/components/Warning/appearance/warningSize.js +11 -0
- package/dist/components/Warning/appearance/warningStyle.js +14 -0
- package/dist/components/Warning/appearance/warningWarning.js +24 -0
- package/dist/components/Warning/index.js +2 -0
- package/dist/config/forms/datepicker.js +18 -0
- package/dist/config/forms/index.js +3 -0
- package/dist/config/forms/input.js +17 -0
- package/dist/context/Notifications.interface.js +1 -0
- package/dist/context/Notifications.js +5 -7
- package/dist/context/UIContext.js +5 -8
- package/dist/context/UrlAssetPrefix.js +2 -4
- package/dist/context/index.js +2 -0
- package/dist/hoc/urlWithAssetPrefix.js +4 -5
- package/dist/hooks/index.helpers.js +6 -0
- package/dist/hooks/useActiveClasses/index.js +2 -0
- package/dist/hooks/useActiveClasses/useActiveClasses.helpers.js +0 -1
- package/dist/hooks/useActiveClasses/useActiveClasses.interface.js +0 -1
- package/dist/hooks/useActiveClasses/useActiveClasses.js +1 -3
- package/dist/hooks/useAppearanceConfig/index.js +1 -0
- package/dist/hooks/useAppearanceConfig/useAppearanceConfig.js +0 -2
- package/dist/hooks/useDevicePropsGenerator/index.js +1 -0
- package/dist/hooks/useDevicePropsGenerator/useDevicePropsGenerator.interface.js +1 -1
- package/dist/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js +3 -12
- package/dist/hooks/useDeviceTargetClass.js +37 -48
- package/dist/hooks/useDropzoneFieldFiles.js +2 -20576
- package/dist/hooks/useHoldProgress.js +1 -3
- package/dist/hooks/useMediaQueries/index.js +1 -0
- package/dist/hooks/useMediaQueries/mediaQueries.json +19 -0
- package/dist/hooks/useMediaQueries/useMediaQueries.js +106 -113
- package/dist/hooks/useStyles/index.js +1 -0
- package/dist/hooks/useStyles/styleAttributes.interface.js +1 -1
- package/dist/hooks/useStyles/styleAttributes.js +1 -3
- package/dist/hooks/useStyles/useStyles.js +3 -12
- package/dist/hooks/useViewportFix.js +0 -2
- package/dist/types/components/Accordion/Accordion.interface.d.ts +6 -6
- package/dist/types/components/Avatar/Avatar.interface.d.ts +4 -4
- package/dist/types/components/AvatarStack/AvatarStack.interface.d.ts +2 -2
- package/dist/types/components/Badge/Badge.interface.d.ts +3 -3
- package/dist/types/components/Breadcrumbs/Breadcrumbs.interface.d.ts +3 -3
- package/dist/types/components/Button/Button.interface.d.ts +5 -5
- package/dist/types/components/Cell/Cell.interface.d.ts +4 -4
- package/dist/types/components/Checkbox/Checkbox.interface.d.ts +2 -2
- package/dist/types/components/Checkmark/Checkmark.interface.d.ts +1 -1
- package/dist/types/components/Chips/Chips.interface.d.ts +4 -4
- package/dist/types/components/Chips/index.d.ts +1 -0
- package/dist/types/components/Choice/Choice.interface.d.ts +3 -3
- package/dist/types/components/Code/Code.interface.d.ts +3 -3
- package/dist/types/components/CookiesWarning/CookiesWarning.interface.d.ts +3 -3
- package/dist/types/components/Dadata/Dadata.interface.d.ts +1 -1
- package/dist/types/components/DatePeriod/DatePeriod.interface.d.ts +4 -4
- package/dist/types/components/DatePicker/DatePicker.interface.d.ts +5 -5
- package/dist/types/components/Divider/Divider.interface.d.ts +2 -2
- package/dist/types/components/Dot/Dot.interface.d.ts +1 -1
- package/dist/types/components/Drawer/Drawer.interface.d.ts +5 -5
- package/dist/types/components/Dropdown/Dropdown.interface.d.ts +5 -5
- package/dist/types/components/Dropzone/Dropzone.interface.d.ts +1 -1
- package/dist/types/components/Flex/Flex.interface.d.ts +1 -1
- package/dist/types/components/Grid/Grid.interface.d.ts +1 -1
- package/dist/types/components/Group/Group.interface.d.ts +4 -4
- package/dist/types/components/HTMLContent/HTMLContent.interface.d.ts +1 -1
- package/dist/types/components/HeroTitle/HeroTitle.interface.d.ts +4 -4
- package/dist/types/components/Icon/Icon.interface.d.ts +5 -5
- package/dist/types/components/Image/Image.interface.d.ts +1 -1
- package/dist/types/components/Input/Input.interface.d.ts +2 -2
- package/dist/types/components/InputPassword/InputPassword.interface.d.ts +3 -3
- package/dist/types/components/Label/Label.interface.d.ts +4 -4
- package/dist/types/components/Link/Link.interface.d.ts +3 -3
- package/dist/types/components/List/List.interface.d.ts +2 -2
- package/dist/types/components/Loader/Loader.interface.d.ts +1 -1
- package/dist/types/components/Logo/Logo.interface.d.ts +1 -1
- package/dist/types/components/MenuItem/MenuItem.interface.d.ts +4 -4
- package/dist/types/components/Modal/Modal.interface.d.ts +5 -5
- package/dist/types/components/ModalSheetBottom/ModalSheetBottom.interface.d.ts +1 -1
- package/dist/types/components/Notification/Notification.interface.d.ts +5 -5
- package/dist/types/components/Overlay/Overlay.interface.d.ts +1 -1
- package/dist/types/components/Pagination/Pagination.interface.d.ts +4 -4
- package/dist/types/components/Radio/Radio.interface.d.ts +2 -2
- package/dist/types/components/RangeSlider/RangeSlider.interface.d.ts +1 -1
- package/dist/types/components/Response/Response.interface.d.ts +4 -4
- package/dist/types/components/SVGContent/SVGContent.interface.d.ts +2 -2
- package/dist/types/components/ScrollOnDrag/ScrollOnDrag.interface.d.ts +1 -1
- package/dist/types/components/ScrollToView/ScrollToView.interface.d.ts +2 -2
- package/dist/types/components/Scrollbar/Scrollbar.interface.d.ts +1 -1
- package/dist/types/components/Search/Search.interface.d.ts +2 -2
- package/dist/types/components/Segmented/Segmented.interface.d.ts +3 -3
- package/dist/types/components/Select/Select.interface.d.ts +6 -6
- package/dist/types/components/Swiper/Swiper.interface.d.ts +1 -1
- package/dist/types/components/Switch/Switch.interface.d.ts +2 -2
- package/dist/types/components/Tab/Tab.interface.d.ts +5 -5
- package/dist/types/components/Text/Text.interface.d.ts +1 -1
- package/dist/types/components/Textarea/Textarea.interface.d.ts +3 -3
- package/dist/types/components/Tile/Tile.interface.d.ts +5 -5
- package/dist/types/components/Title/Title.interface.d.ts +3 -3
- package/dist/types/components/Tooltip/Tooltip.interface.d.ts +3 -3
- package/dist/types/components/Video/Video.interface.d.ts +1 -1
- package/dist/types/components/Warning/Warning.interface.d.ts +3 -3
- package/dist/types/index.js +1 -0
- package/dist/types/utils.js +1 -0
- package/dist/utils/index.js +3 -0
- package/dist/utils/mergeAppearanceKeys.js +0 -1
- package/dist/utils/setViewportProperty.js +0 -1
- package/package.json +2 -2
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { icons14, icons20, icons24, icons32, icons40, } from '@itcase/icons/default';
|
|
2
|
+
const checkmarkAppearanceSize = {
|
|
3
|
+
sizeXXL: {
|
|
4
|
+
size: 'xxl',
|
|
5
|
+
checkmarkIcon: icons40.General.Check,
|
|
6
|
+
},
|
|
7
|
+
sizeXL: {
|
|
8
|
+
size: 'xl',
|
|
9
|
+
checkmarkIcon: icons40.General.Check,
|
|
10
|
+
},
|
|
11
|
+
sizeL: {
|
|
12
|
+
size: 'l',
|
|
13
|
+
checkmarkIcon: icons32.General.Check,
|
|
14
|
+
},
|
|
15
|
+
sizeM: {
|
|
16
|
+
size: 'm',
|
|
17
|
+
checkmarkIcon: icons24.Form.Check,
|
|
18
|
+
},
|
|
19
|
+
sizeS: {
|
|
20
|
+
size: 's',
|
|
21
|
+
checkmarkIcon: icons24.Form.Check,
|
|
22
|
+
},
|
|
23
|
+
sizeXS: {
|
|
24
|
+
size: 'xs',
|
|
25
|
+
checkmarkIcon: icons20.Form.Check,
|
|
26
|
+
},
|
|
27
|
+
sizeXXS: {
|
|
28
|
+
size: 'xxs',
|
|
29
|
+
checkmarkIcon: icons14.Form.Check,
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
export { checkmarkAppearanceSize };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const checkmarkAppearanceSurface = {
|
|
2
|
+
surfacePrimary: {
|
|
3
|
+
fill: 'surfacePrimary',
|
|
4
|
+
fillActive: 'surfaceActivePrimary',
|
|
5
|
+
fillHover: 'surfacePrimary',
|
|
6
|
+
borderColor: 'surfaceBorderTertiary',
|
|
7
|
+
borderColorHover: 'surfaceBorderPrimary',
|
|
8
|
+
borderWidth: '2',
|
|
9
|
+
checkmarkIconFill: 'surfaceItemPrimary',
|
|
10
|
+
},
|
|
11
|
+
surfaceSecondary: {
|
|
12
|
+
fill: 'surfaceSecondary',
|
|
13
|
+
fillActive: 'surfaceActivePrimary',
|
|
14
|
+
fillHover: 'surfaceSecondary',
|
|
15
|
+
borderColor: 'surfaceBorderTertiary',
|
|
16
|
+
borderColorHover: 'surfaceBorderPrimary',
|
|
17
|
+
borderWidth: '2',
|
|
18
|
+
checkmarkIconFill: 'surfaceItemPrimary',
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
export { checkmarkAppearanceSurface };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { chipsAppearanceAccent } from './appearance/chipsAccent';
|
|
2
|
+
import { chipsAppearanceDanger } from './appearance/chipsDanger';
|
|
3
|
+
import { chipsAppearanceDisabled } from './appearance/chipsDisabled';
|
|
4
|
+
import { chipsAppearanceError } from './appearance/chipsError';
|
|
5
|
+
import { chipsAppearanceExtra } from './appearance/chipsExtra';
|
|
6
|
+
import { chipsAppearanceInfo } from './appearance/chipsInfo';
|
|
7
|
+
import { chipsAppearanceShape } from './appearance/chipsShape';
|
|
8
|
+
import { chipsAppearanceSize } from './appearance/chipsSize';
|
|
9
|
+
import { chipsAppearanceSpecial } from './appearance/chipsSpecial';
|
|
10
|
+
import { chipsAppearanceStyle } from './appearance/chipsStyle';
|
|
11
|
+
import { chipsAppearanceSuccess } from './appearance/chipsSuccess';
|
|
12
|
+
import { chipsAppearanceSurface } from './appearance/chipsSurface';
|
|
13
|
+
import { chipsAppearanceWarning } from './appearance/chipsWarning';
|
|
14
|
+
const chipsAppearance = {
|
|
15
|
+
...chipsAppearanceSize,
|
|
16
|
+
...chipsAppearanceStyle,
|
|
17
|
+
...chipsAppearanceAccent,
|
|
18
|
+
...chipsAppearanceDanger,
|
|
19
|
+
...chipsAppearanceError,
|
|
20
|
+
...chipsAppearanceInfo,
|
|
21
|
+
...chipsAppearanceDisabled,
|
|
22
|
+
...chipsAppearanceSpecial,
|
|
23
|
+
...chipsAppearanceExtra,
|
|
24
|
+
...chipsAppearanceSuccess,
|
|
25
|
+
...chipsAppearanceSurface,
|
|
26
|
+
...chipsAppearanceWarning,
|
|
27
|
+
...chipsAppearanceShape,
|
|
28
|
+
};
|
|
29
|
+
export { chipsAppearance };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { useAppearanceConfig } from 'src/hooks/useAppearanceConfig';
|
|
4
|
+
import { useDevicePropsGenerator } from 'src/hooks/useDevicePropsGenerator';
|
|
5
|
+
import { useStyles } from 'src/hooks/useStyles';
|
|
6
|
+
import { Badge } from 'src/components/Badge';
|
|
7
|
+
import { Icon } from 'src/components/Icon';
|
|
8
|
+
import { Text } from 'src/components/Text';
|
|
9
|
+
import { chipsAppearance } from './Chips.appearance';
|
|
10
|
+
const chipsConfig = {
|
|
11
|
+
appearance: chipsAppearance,
|
|
12
|
+
setAppearance: (appearanceConfig) => {
|
|
13
|
+
chipsConfig.appearance = appearanceConfig;
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
function Chips(props) {
|
|
17
|
+
const { appearance, className, dataTestId, dataTour, label = '', isActive, isDisabled, isSkeleton, onClick, onClickIconAfter, onClickIconBefore, children, } = props;
|
|
18
|
+
const appearanceConfig = useAppearanceConfig(appearance, chipsConfig, isDisabled);
|
|
19
|
+
const propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
20
|
+
const { alignClass, alignDirectionClass, fillActiveClass, fillActiveHoverClass, fillClass, fillHoverClass, labelTextActiveColor, labelTextActiveColorHover, labelTextColor, labelTextColorHover, labelTextSize, labelTextWeight, labelTextWrap, borderColorClass, borderTypeClass, badgeAppearance, badgeShape, badgeSize, badgeTextColor, badgeTextSize, badgeValue, cursorClass, iconAfter, iconAfterActive, iconAfterFill, iconAfterFillActiveIcon, iconAfterFillIcon, iconAfterFillSize, iconAfterShape, iconAfterSize, iconAfterSrc, iconBefore, iconBeforeActive, iconBeforeFill, iconBeforeFillActiveIcon, iconBeforeFillIcon, iconBeforeFillSize, iconBeforeShape, iconBeforeSize, iconBeforeSrc, shapeClass, shapeStrengthClass, sizeClass, } = propsGenerator;
|
|
21
|
+
const { styles: chipsStyles } = useStyles(props);
|
|
22
|
+
return (_jsx("div", { className: clsx(className, 'chips', !isActive
|
|
23
|
+
? fillClass && `fill_${fillClass}`
|
|
24
|
+
: fillActiveClass && `fill_active_${fillActiveClass}`, !isActive
|
|
25
|
+
? fillHoverClass && `fill_hover_${fillHoverClass}`
|
|
26
|
+
: fillActiveHoverClass && `fill_active_hover_${fillActiveHoverClass}`, shapeClass && `shape_${shapeClass}`, shapeStrengthClass && `shape-strength_${shapeStrengthClass}`, borderColorClass && `border-color_${borderColorClass}`, borderTypeClass && `border_type_${borderTypeClass}`, sizeClass && `chips_size_${sizeClass}`, alignDirectionClass && `align_${alignDirectionClass}`, alignClass && `align_${alignClass}`, isActive && 'chips_state_active', isDisabled && `chips_state_disabled`, cursorClass && `cursor_${cursorClass}`, onClick && 'cursor_type_pointer', isSkeleton && `chips_skeleton`), "data-testid": dataTestId && `${dataTestId}Chips`, "data-tour": dataTour, style: chipsStyles, onClick: !isDisabled ? onClick : undefined, children: _jsxs("div", { className: "chips__inner", children: [(iconBefore || iconBeforeSrc || (iconBeforeActive && isActive)) && (_jsx(Icon, { className: "chips__icon_before", size: iconBeforeSize, fill: iconBeforeFill, fillSize: iconBeforeFillSize, iconFill: iconBeforeFillIcon, iconFillActive: iconBeforeFillActiveIcon, imageSrc: iconBeforeSrc, shape: iconBeforeShape, SvgImage: iconBeforeActive && isActive ? iconBeforeActive : iconBefore, isActive: isActive, onClick: onClickIconBefore })), typeof label === 'string' ? (_jsx(Text, { className: "chips__label", size: labelTextSize, textColor: labelTextColor, textColorActive: labelTextActiveColor, textColorActiveHover: labelTextActiveColorHover, textColorHover: labelTextColorHover, textWeight: labelTextWeight, textWrap: labelTextWrap, isActive: isActive, children: label })) : (_jsx("div", { className: "chips__label", children: label })), children, (iconAfter || iconAfterSrc || (iconAfterActive && isActive)) && (_jsx(Icon, { className: "chips__icon_after", size: iconAfterSize, fill: iconAfterFill, fillSize: iconAfterFillSize, iconFill: iconAfterFillIcon, iconFillActive: iconAfterFillActiveIcon, imageSrc: iconAfterSrc, shape: iconAfterShape, SvgImage: iconAfterActive && isActive ? iconAfterActive : iconAfter, isActive: isActive, onClick: onClickIconAfter })), badgeValue && (_jsx(Badge, { appearance: badgeAppearance, className: "chips__badge", size: badgeSize, textColor: badgeTextColor, textSize: badgeTextSize, shape: badgeShape, value: badgeValue }))] }) }));
|
|
27
|
+
}
|
|
28
|
+
export { Chips, chipsConfig };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { useDevicePropsGenerator } from 'src/hooks/useDevicePropsGenerator';
|
|
4
|
+
import { useStyles } from 'src/hooks/useStyles';
|
|
5
|
+
import { Chips } from './Chips';
|
|
6
|
+
function ChipsGroup(props) {
|
|
7
|
+
/** TODO:
|
|
8
|
+
* rename "chipsList" to "chipsOptions"
|
|
9
|
+
* to do same structure for "Option" object.
|
|
10
|
+
*/
|
|
11
|
+
const { className, dataTestId, dataTour, chipsList, horizontalScroll, style, onClick, children, } = props;
|
|
12
|
+
const propsGenerator = useDevicePropsGenerator(props);
|
|
13
|
+
const { directionClass, alignClass, alignDirectionClass, fillClass, borderColorClass, borderTypeClass, borderWidthClass, chipsAppearance, widthClass, wrapClass, } = propsGenerator;
|
|
14
|
+
const { styles: groupStyles } = useStyles(props);
|
|
15
|
+
return (_jsx("div", { className: clsx(className, 'chips-group', 'group', widthClass && `width_${widthClass}`, alignDirectionClass && `align_${alignDirectionClass}`, directionClass && `group_direction_${directionClass}`, alignClass && `align_${alignClass}`, fillClass && `fill_${fillClass}`, horizontalScroll && 'group_scroll_horizontal', wrapClass && `group_wrap_${wrapClass}`, borderColorClass && `border-color_${borderColorClass}`, borderWidthClass && `border-width_${borderWidthClass}`, borderTypeClass && `border_type_${borderTypeClass}`), "data-testid": dataTestId, "data-tour": dataTour, style: Object.assign({}, groupStyles, style), children: children
|
|
16
|
+
? children
|
|
17
|
+
: chipsList?.map((item) => (_jsx(Chips, { appearance: chipsAppearance, label: item.label, iconAfter: item.iconAfter, iconAfterActive: item.iconAfterActive, iconBefore: item.iconBefore, iconBeforeActive: item.iconBeforeActive, isActive: item.isActive, isDisabled: item.isDisabled, onClick: (event) => onClick?.(item, event) }, item.value))) }));
|
|
18
|
+
}
|
|
19
|
+
export { ChipsGroup };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const chipsAppearanceAccent = {
|
|
2
|
+
accentMutedPrimary: {
|
|
3
|
+
fill: 'accentTertiary',
|
|
4
|
+
fillHover: 'accentHoverPrimary',
|
|
5
|
+
labelTextColor: 'accentTextSecondary',
|
|
6
|
+
borderColor: 'accentBorderSecondary',
|
|
7
|
+
iconAfterFillIcon: 'accentItemQuaternary',
|
|
8
|
+
iconBeforeFillIcon: 'accentItemQuaternary',
|
|
9
|
+
},
|
|
10
|
+
accentPrimary: {
|
|
11
|
+
fill: 'accentPrimary',
|
|
12
|
+
fillActive: 'accentPrimary',
|
|
13
|
+
fillActiveHover: 'accentActiveHoverPrimary',
|
|
14
|
+
fillHover: 'accentHoverPrimary',
|
|
15
|
+
labelTextActiveColor: 'accentTextPrimary',
|
|
16
|
+
labelTextColor: 'accentTextPrimary',
|
|
17
|
+
borderColor: 'accentBorderPrimary',
|
|
18
|
+
iconAfterFillActiveIcon: 'accentItemPrimary',
|
|
19
|
+
iconAfterFillIcon: 'accentItemPrimary',
|
|
20
|
+
iconBeforeFillActiveIcon: 'accentItemPrimary',
|
|
21
|
+
iconBeforeFillIcon: 'accentItemPrimary',
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
export { chipsAppearanceAccent };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const chipsAppearanceDanger = {
|
|
2
|
+
dangerMutedPrimary: {
|
|
3
|
+
fill: 'dangerTertiary',
|
|
4
|
+
labelTextColor: 'dangerTextQuaternary',
|
|
5
|
+
borderColor: 'dangerBorderQuaternary',
|
|
6
|
+
iconAfterFillIcon: 'dangerItemQuaternary',
|
|
7
|
+
iconBeforeFillIcon: 'dangerItemQuaternary',
|
|
8
|
+
},
|
|
9
|
+
dangerPrimary: {
|
|
10
|
+
fill: 'dangerPrimary',
|
|
11
|
+
labelTextColor: 'dangerTextPrimary',
|
|
12
|
+
borderColor: 'dangerBorderSecondary',
|
|
13
|
+
iconAfterFillIcon: 'dangerItemPrimary',
|
|
14
|
+
iconBeforeFillIcon: 'dangerItemPrimary',
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
export { chipsAppearanceDanger };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const chipsAppearanceDisabled = {
|
|
2
|
+
disabledPrimary: {
|
|
3
|
+
fill: 'surfaceSecondary',
|
|
4
|
+
fillHover: 'surfaceHoverSecondary',
|
|
5
|
+
labelTextActiveColor: 'surfaceTextActiveQuaternary',
|
|
6
|
+
labelTextActiveColorHover: 'surfaceTextActiveHoverQuaternary',
|
|
7
|
+
labelTextColor: 'surfaceTextQuaternary',
|
|
8
|
+
labelTextColorHover: 'surfaceTextQuaternary',
|
|
9
|
+
borderColor: 'disabledBorderPrimary',
|
|
10
|
+
iconAfterFillIcon: 'disabledItemPrimary',
|
|
11
|
+
iconBeforeFillIcon: 'disabledItemPrimary',
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
export { chipsAppearanceDisabled };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const chipsAppearanceError = {
|
|
2
|
+
errorMutedPrimary: {
|
|
3
|
+
fill: 'errorTertiary',
|
|
4
|
+
labelTextColor: 'errorTextQuaternary',
|
|
5
|
+
borderColor: 'errorBorderQuaternary',
|
|
6
|
+
iconAfterFillIcon: 'errorItemQuaternary',
|
|
7
|
+
iconBeforeFillIcon: 'errorItemQuaternary',
|
|
8
|
+
},
|
|
9
|
+
errorPrimary: {
|
|
10
|
+
fill: 'errorPrimary',
|
|
11
|
+
labelTextColor: 'errorTextPrimary',
|
|
12
|
+
borderColor: 'errorBorderSecondary',
|
|
13
|
+
iconAfterFillIcon: 'errorItemPrimary',
|
|
14
|
+
iconBeforeFillIcon: 'errorItemPrimary',
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
export { chipsAppearanceError };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const chipsAppearanceExtra = {
|
|
2
|
+
extraMutedPrimary: {
|
|
3
|
+
fill: 'extraTertiary',
|
|
4
|
+
labelTextColor: 'extraTextQuaternary',
|
|
5
|
+
borderColor: 'extraBorderSecondary',
|
|
6
|
+
iconAfterFillIcon: 'extraItemQuaternary',
|
|
7
|
+
iconBeforeFillIcon: 'extraItemQuaternary',
|
|
8
|
+
},
|
|
9
|
+
extraPrimary: {
|
|
10
|
+
fill: 'extraPrimary',
|
|
11
|
+
labelTextColor: 'extraTextPrimary',
|
|
12
|
+
borderColor: 'extraBorderSecondary',
|
|
13
|
+
iconAfterFillIcon: 'extraItemPrimary',
|
|
14
|
+
iconBeforeFillIcon: 'extraItemPrimary',
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
export { chipsAppearanceExtra };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const chipsAppearanceInfo = {
|
|
2
|
+
infoMutedPrimary: {
|
|
3
|
+
fill: 'infoTertiary',
|
|
4
|
+
labelTextColor: 'infoTextSecondary',
|
|
5
|
+
borderColor: 'infoBorderSecondary',
|
|
6
|
+
iconAfterFillIcon: 'infoItemPrimary',
|
|
7
|
+
iconBeforeFillIcon: 'infoItemPrimary',
|
|
8
|
+
},
|
|
9
|
+
infoPrimary: {
|
|
10
|
+
fill: 'infoPrimary',
|
|
11
|
+
labelTextColor: 'infoTextPrimary',
|
|
12
|
+
borderColor: 'infoBorderPrimary',
|
|
13
|
+
iconAfterFillIcon: 'infoItemPrimary',
|
|
14
|
+
iconBeforeFillIcon: 'infoItemPrimary',
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
export { chipsAppearanceInfo };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const chipsAppearanceShape = {
|
|
2
|
+
circular: {
|
|
3
|
+
shape: 'circular',
|
|
4
|
+
},
|
|
5
|
+
rounded: {
|
|
6
|
+
shape: 'rounded',
|
|
7
|
+
},
|
|
8
|
+
roundedXL: {
|
|
9
|
+
shape: 'rounded',
|
|
10
|
+
shapeStrength: '2m',
|
|
11
|
+
},
|
|
12
|
+
roundedL: {
|
|
13
|
+
shape: 'rounded',
|
|
14
|
+
shapeStrength: '1_5m',
|
|
15
|
+
},
|
|
16
|
+
roundedM: {
|
|
17
|
+
shape: 'rounded',
|
|
18
|
+
shapeStrength: '1m',
|
|
19
|
+
},
|
|
20
|
+
roundedS: {
|
|
21
|
+
shape: 'rounded',
|
|
22
|
+
shapeStrength: '0_5m',
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
export { chipsAppearanceShape };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
const chipsAppearanceSize = {
|
|
2
|
+
sizeXXL: {
|
|
3
|
+
size: 'xxl',
|
|
4
|
+
labelTextSize: 'xl',
|
|
5
|
+
iconAfterSize: '24',
|
|
6
|
+
iconBeforeSize: '24',
|
|
7
|
+
},
|
|
8
|
+
sizeXL: {
|
|
9
|
+
size: 'xl',
|
|
10
|
+
labelTextSize: 'm',
|
|
11
|
+
iconAfterSize: '20',
|
|
12
|
+
iconBeforeSize: '20',
|
|
13
|
+
},
|
|
14
|
+
sizeL: {
|
|
15
|
+
size: 'l',
|
|
16
|
+
labelTextSize: 'm',
|
|
17
|
+
iconAfterSize: '16',
|
|
18
|
+
iconBeforeSize: '16',
|
|
19
|
+
},
|
|
20
|
+
sizeM: {
|
|
21
|
+
size: 'm',
|
|
22
|
+
labelTextSize: 's',
|
|
23
|
+
iconAfterSize: '16',
|
|
24
|
+
iconBeforeSize: '16',
|
|
25
|
+
},
|
|
26
|
+
sizeS: {
|
|
27
|
+
size: 's',
|
|
28
|
+
labelTextSize: 's',
|
|
29
|
+
iconAfterSize: '16',
|
|
30
|
+
iconBeforeSize: '16',
|
|
31
|
+
},
|
|
32
|
+
sizeXS: {
|
|
33
|
+
size: 'xs',
|
|
34
|
+
labelTextSize: 'xs',
|
|
35
|
+
iconAfterSize: '14',
|
|
36
|
+
iconBeforeSize: '14',
|
|
37
|
+
},
|
|
38
|
+
sizeXXS: {
|
|
39
|
+
size: 'xxs',
|
|
40
|
+
labelTextSize: 'xxs',
|
|
41
|
+
iconAfterSize: '14',
|
|
42
|
+
iconBeforeSize: '14',
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
export { chipsAppearanceSize };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const chipsAppearanceSpecial = {
|
|
2
|
+
specialMutedPrimary: {
|
|
3
|
+
fill: 'specialTertiary',
|
|
4
|
+
labelTextColor: 'specialTextSecondary',
|
|
5
|
+
borderColor: 'specialBorderSecondary',
|
|
6
|
+
iconAfterFillIcon: 'specialItemSecondary',
|
|
7
|
+
iconBeforeFillIcon: 'specialItemSecondary',
|
|
8
|
+
},
|
|
9
|
+
specialPrimary: {
|
|
10
|
+
fill: 'specialPrimary',
|
|
11
|
+
labelTextColor: 'specialTextPrimary',
|
|
12
|
+
borderColor: 'specialBorderSecondary',
|
|
13
|
+
iconAfterFillIcon: 'specialItemPrimary',
|
|
14
|
+
iconBeforeFillIcon: 'specialItemPrimary',
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
export { chipsAppearanceSpecial };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const chipsAppearanceSuccess = {
|
|
2
|
+
successMutedPrimary: {
|
|
3
|
+
fill: 'successTertiary',
|
|
4
|
+
labelTextColor: 'successTextQuaternary',
|
|
5
|
+
borderColor: 'successBorderQuaternary',
|
|
6
|
+
iconAfterFillIcon: 'successItemQuaternary',
|
|
7
|
+
iconBeforeFillIcon: 'successItemQuaternary',
|
|
8
|
+
},
|
|
9
|
+
successPrimary: {
|
|
10
|
+
fill: 'successPrimary',
|
|
11
|
+
labelTextColor: 'successTextPrimary',
|
|
12
|
+
borderColor: 'successBorderSecondary',
|
|
13
|
+
iconAfterFillIcon: 'successItemPrimary',
|
|
14
|
+
iconBeforeFillIcon: 'successItemPrimary',
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
export { chipsAppearanceSuccess };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
const chipsAppearanceSurface = {
|
|
2
|
+
surfaceMutedPrimary: {
|
|
3
|
+
fill: 'surfaceSecondary',
|
|
4
|
+
labelTextColor: 'surfaceTextQuaternary',
|
|
5
|
+
borderColor: 'surfaceBorderQuaternary',
|
|
6
|
+
iconAfterFillIcon: 'surfaceItemQuaternary',
|
|
7
|
+
iconBeforeFillIcon: 'surfaceItemQuaternary',
|
|
8
|
+
},
|
|
9
|
+
surfacePrimary: {
|
|
10
|
+
fill: 'surfacePrimary',
|
|
11
|
+
fillActive: 'accentPrimary',
|
|
12
|
+
fillActiveHover: 'accentSecondary',
|
|
13
|
+
fillHover: 'surfaceHoverTertiary',
|
|
14
|
+
labelTextActiveColor: 'accentTextPrimary',
|
|
15
|
+
labelTextColor: 'surfaceTextPrimary',
|
|
16
|
+
labelTextColorHover: 'surfaceTextPrimary',
|
|
17
|
+
borderColor: 'surfaceBorderTertiary',
|
|
18
|
+
badgeAppearance: 'surfacePrimary sizeXS solid',
|
|
19
|
+
iconAfterFillActiveIcon: 'accentItemPrimary',
|
|
20
|
+
iconAfterFillIcon: 'surfaceItemPrimary',
|
|
21
|
+
iconBeforeFillActiveIcon: 'accentItemPrimary',
|
|
22
|
+
iconBeforeFillIcon: 'surfaceItemPrimary',
|
|
23
|
+
},
|
|
24
|
+
surfaceSecondary: {
|
|
25
|
+
fill: 'surfaceSecondary',
|
|
26
|
+
fillActive: 'accentPrimary',
|
|
27
|
+
fillActiveHover: 'accentSecondary',
|
|
28
|
+
fillHover: 'surfaceHoverTertiary',
|
|
29
|
+
labelTextActiveColor: 'accentTextPrimary',
|
|
30
|
+
labelTextColor: 'surfaceTextPrimary',
|
|
31
|
+
labelTextColorHover: 'surfaceTextPrimary',
|
|
32
|
+
borderColor: 'surfaceBorderSecondary',
|
|
33
|
+
iconAfterFillActiveIcon: 'accentItemPrimary',
|
|
34
|
+
iconAfterFillIcon: 'surfaceItemPrimary',
|
|
35
|
+
iconBeforeFillActiveIcon: 'accentItemPrimary',
|
|
36
|
+
iconBeforeFillIcon: 'surfaceItemPrimary',
|
|
37
|
+
},
|
|
38
|
+
surfaceTertiary: {
|
|
39
|
+
fill: 'surfaceTertiary',
|
|
40
|
+
fillHover: 'surfaceHoverTertiary',
|
|
41
|
+
labelTextColor: 'surfaceTextPrimary',
|
|
42
|
+
borderColor: 'surfaceBorderTertiary',
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
export { chipsAppearanceSurface };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const chipsAppearanceWarning = {
|
|
2
|
+
warningMutedPrimary: {
|
|
3
|
+
fill: 'warningTertiary',
|
|
4
|
+
labelTextColor: 'warningTextSecondary',
|
|
5
|
+
borderColor: 'warningBorderSecondary',
|
|
6
|
+
iconAfterFillIcon: 'warningItemSecondary',
|
|
7
|
+
iconBeforeFillIcon: 'warningItemSecondary',
|
|
8
|
+
},
|
|
9
|
+
warningPrimary: {
|
|
10
|
+
fill: 'warningPrimary',
|
|
11
|
+
labelTextColor: 'warningTextPrimary',
|
|
12
|
+
borderColor: 'warningBorderSecondary',
|
|
13
|
+
iconAfterFillIcon: 'warningItemPrimary',
|
|
14
|
+
iconBeforeFillIcon: 'warningItemPrimary',
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
export { chipsAppearanceWarning };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { choiceAppearanceDefault } from './appearance/choiceDefault';
|
|
2
|
+
import { choiceAppearanceDisabled } from './appearance/choiceDisabled';
|
|
3
|
+
import { choiceAppearanceError } from './appearance/choiceError';
|
|
4
|
+
import { choiceAppearanceRequire } from './appearance/choiceRequire';
|
|
5
|
+
import { choiceAppearanceShape } from './appearance/choiceShape';
|
|
6
|
+
import { choiceAppearanceSize } from './appearance/choiceSize';
|
|
7
|
+
import { choiceAppearanceStyle } from './appearance/choiceStyle';
|
|
8
|
+
import { choiceAppearanceSuccess } from './appearance/choiceSuccess';
|
|
9
|
+
const choiceAppearance = {
|
|
10
|
+
...choiceAppearanceError,
|
|
11
|
+
...choiceAppearanceDisabled,
|
|
12
|
+
...choiceAppearanceDefault,
|
|
13
|
+
...choiceAppearanceSuccess,
|
|
14
|
+
...choiceAppearanceRequire,
|
|
15
|
+
...choiceAppearanceStyle,
|
|
16
|
+
...choiceAppearanceShape,
|
|
17
|
+
...choiceAppearanceSize,
|
|
18
|
+
};
|
|
19
|
+
export { choiceAppearance };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React, { createRef, useCallback, useMemo, useRef, } from 'react';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { useAppearanceConfig } from 'src/hooks/useAppearanceConfig';
|
|
5
|
+
import { useDevicePropsGenerator } from 'src/hooks/useDevicePropsGenerator';
|
|
6
|
+
import { useStyles } from 'src/hooks/useStyles';
|
|
7
|
+
import { Icon } from 'src/components/Icon';
|
|
8
|
+
import { Loader } from 'src/components/Loader';
|
|
9
|
+
import { Text } from 'src/components/Text';
|
|
10
|
+
import { choiceAppearance } from './Choice.appearance';
|
|
11
|
+
const choiceConfig = {
|
|
12
|
+
appearance: choiceAppearance,
|
|
13
|
+
setAppearance: (appearanceConfig) => {
|
|
14
|
+
choiceConfig.appearance = appearanceConfig;
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
function Choice(props) {
|
|
18
|
+
const { id, appearance, className, dataTestId, dataTour, name, active = { value: undefined }, itemAfter, itemBefore, options = [], before, after, isDisabled = false, isSkeleton, isCheckbox = false, isLoading = false, setActiveSegment, } = props;
|
|
19
|
+
const controlRef = useRef(null);
|
|
20
|
+
const optionsRefs = useMemo(() => new Map(options.map((item) => [item.value, createRef()])), [options]);
|
|
21
|
+
const onChange = useCallback((event, item) => {
|
|
22
|
+
const isChecked = isCheckbox ? event.target.checked : true;
|
|
23
|
+
setActiveSegment && setActiveSegment(item, isChecked);
|
|
24
|
+
}, [isCheckbox, setActiveSegment]);
|
|
25
|
+
const appearanceConfig = useAppearanceConfig(appearance, choiceConfig, isDisabled);
|
|
26
|
+
const propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
27
|
+
const { size, fillClass, fillItemActiveClass, fillItemActiveDisabledClass, fillItemActiveHoverClass, fillItemClass, fillItemDisabledClass, fillItemHoverClass, labelTextColor, labelTextColorActive, labelTextColorActiveHover, labelTextColorHover, labelTextSize, labelTextWeight, labelTextWrap, borderColorClass, borderTypeClass, borderWidthClass, iconAfterFill, iconAfterFillActive, iconAfterFillDisabled, iconAfterSize, iconBeforeFill, iconBeforeFillActive, iconBeforeFillDisabled, iconBeforeSize, iconFill, iconFillActive, iconFillDisabled, iconSize, shapeClass, shapeStrengthClass, wrapClass, } = propsGenerator;
|
|
28
|
+
const { styles } = useStyles(props);
|
|
29
|
+
return (_jsxs("div", { id: id, className: clsx(className, 'choice', size && `choice_size_${size}`, fillClass && `fill_${fillClass}`, wrapClass && `choice_wrap_${wrapClass}`, shapeClass && `shape_${shapeClass}`, shapeStrengthClass && `shape-strength_${shapeStrengthClass}`, isSkeleton && `choice_skeleton`), ref: controlRef, "data-testid": dataTestId && `${dataTestId}Choice`, "data-tour": dataTour, style: styles, children: [before && _jsx("div", { className: "choice__before", children: before }), isLoading ? (_jsx(Loader, { width: "fill", height: "fill", fill: "surfacePrimary", itemFill: "surfaceItemPrimary" })) : (_jsx(React.Fragment, { children: options.map((item) => {
|
|
30
|
+
const isActive = typeof active === 'object'
|
|
31
|
+
? String(item.value) === String(active.value)
|
|
32
|
+
: String(item.value) === String(active);
|
|
33
|
+
return (_jsxs("div", { className: clsx('choice__item', size && `choice__item_size_${size}`, (item.icon || item.iconActive) && 'choice__item_icon', shapeClass && `shape_${shapeClass}`, shapeStrengthClass && `shape-strength_${shapeStrengthClass}`, borderColorClass && `border-color_${borderColorClass}`, borderWidthClass && `border-width_${borderWidthClass}`, borderTypeClass && `border_type_${borderTypeClass}`, !isActive && !isDisabled
|
|
34
|
+
? fillItemClass && `fill_${fillItemClass}`
|
|
35
|
+
: fillItemDisabledClass &&
|
|
36
|
+
`fill_disabled_${fillItemDisabledClass}`, !isActive && !isDisabled
|
|
37
|
+
? fillItemHoverClass && `fill_hover_${fillItemHoverClass}`
|
|
38
|
+
: fillItemActiveHoverClass &&
|
|
39
|
+
`fill_active_hover_${fillItemActiveHoverClass}`, isActive
|
|
40
|
+
? !isDisabled
|
|
41
|
+
? fillItemActiveClass &&
|
|
42
|
+
`fill_active_${fillItemActiveClass}`
|
|
43
|
+
: fillItemActiveDisabledClass &&
|
|
44
|
+
`fill_active_disabled_${fillItemActiveDisabledClass}`
|
|
45
|
+
: !isDisabled
|
|
46
|
+
? fillItemClass && `fill_${fillItemClass}`
|
|
47
|
+
: fillItemDisabledClass &&
|
|
48
|
+
`fill_disabled_${fillItemDisabledClass}`, !isActive && isDisabled && 'choice__item_state_disabled', isActive &&
|
|
49
|
+
isDisabled &&
|
|
50
|
+
'choice__item_active_state_disabled', isActive && 'choice__item_active'), ref: optionsRefs.get(item.value), children: [_jsx("input", { id: `${name}-${item.value}`, className: "choice__item-radio", type: isCheckbox ? 'checkbox' : 'radio', name: name, checked: isActive, disabled: isDisabled, value: item.value, onChange: (event) => onChange(event, item) }), _jsxs("label", { className: clsx('choice__item-label', isDisabled && 'choice__item-label_state_disabled'), htmlFor: `${name}-${item.value}`, children: [itemBefore, (item.iconBefore || item.iconBeforeActive) && (_jsx(Icon, { className: "choice__item-icon", iconFill: iconBeforeFill, iconFillActive: iconBeforeFillActive, iconFillDisabled: iconBeforeFillDisabled, iconSize: iconBeforeSize, SvgImage: isActive
|
|
51
|
+
? item.iconBeforeActive || item.iconBefore
|
|
52
|
+
: item.iconBefore, isActive: isActive, isDisabled: isDisabled })), item.label && (_jsx(Text, { size: labelTextSize, textColor: labelTextColor, textColorActive: labelTextColorActive, textColorActiveHover: labelTextColorActiveHover, textColorHover: labelTextColorHover, textWeight: labelTextWeight, textWrap: labelTextWrap, isActive: isActive, children: item.label })), (item.icon || item.iconActive) && (_jsx(Icon, { className: "choice__item-icon", iconFill: iconFill, iconFillActive: iconFillActive, iconFillDisabled: iconFillDisabled, iconSize: iconSize, SvgImage: isActive ? item.iconActive || item.icon : item.icon, isActive: isActive })), (item.iconAfter || item.iconAfterActive) && (_jsx(Icon, { className: "choice__item-icon", iconFill: iconAfterFill, iconFillActive: iconAfterFillActive, iconFillDisabled: iconAfterFillDisabled, iconSize: iconAfterSize, SvgImage: isActive
|
|
53
|
+
? item.iconAfterActive || item.iconAfter
|
|
54
|
+
: item.iconAfter, isActive: isActive })), itemAfter] })] }, `${name}-${item.value}`));
|
|
55
|
+
}) })), after && _jsx("div", { className: "choice__after", children: after })] }));
|
|
56
|
+
}
|
|
57
|
+
export { Choice, choiceConfig };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
const choiceAppearanceDefault = {
|
|
2
|
+
defaultMutedPrimary: {
|
|
3
|
+
fill: 'surfaceSecondary',
|
|
4
|
+
fillItem: 'surfaceSecondary',
|
|
5
|
+
fillItemActive: 'accentTertiary',
|
|
6
|
+
fillItemActiveHover: 'accentPrimary',
|
|
7
|
+
fillItemHover: 'surfaceTertiary',
|
|
8
|
+
labelTextColor: 'surfaceTextPrimary',
|
|
9
|
+
labelTextColorActive: 'surfaceTextPrimary',
|
|
10
|
+
labelTextColorActiveHover: 'accentTextPrimary',
|
|
11
|
+
borderColor: 'surfaceBorderSecondary',
|
|
12
|
+
iconAfterFill: 'surfaceItemQuaternary',
|
|
13
|
+
iconAfterFillActive: 'surfaceItemSecondary',
|
|
14
|
+
iconBeforeFill: 'surfaceItemQuaternary',
|
|
15
|
+
iconBeforeFillActive: 'surfaceItemSecondary',
|
|
16
|
+
iconFill: 'surfaceItemQuaternary',
|
|
17
|
+
iconFillActive: 'surfaceItemSecondary',
|
|
18
|
+
},
|
|
19
|
+
defaultPrimary: {
|
|
20
|
+
fill: 'surfaceSecondary',
|
|
21
|
+
fillItem: 'surfaceSecondary',
|
|
22
|
+
fillItemActive: 'accentPrimary',
|
|
23
|
+
fillItemActiveHover: 'accentActiveHoverPrimary',
|
|
24
|
+
fillItemHover: 'surfaceTertiary',
|
|
25
|
+
labelTextColor: 'surfaceTextPrimary',
|
|
26
|
+
labelTextColorActive: 'accentTextPrimary',
|
|
27
|
+
labelTextColorActiveHover: 'accentTextPrimary',
|
|
28
|
+
borderColor: 'surfaceBorderQuaternary',
|
|
29
|
+
iconAfterFill: 'surfaceItemQuaternary',
|
|
30
|
+
iconAfterFillActive: 'surfaceItemSecondary',
|
|
31
|
+
iconBeforeFill: 'surfaceItemQuaternary',
|
|
32
|
+
iconBeforeFillActive: 'surfaceItemSecondary',
|
|
33
|
+
iconFill: 'surfaceItemQuaternary',
|
|
34
|
+
iconFillActive: 'surfaceItemSecondary',
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
export { choiceAppearanceDefault };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const choiceAppearanceDisabled = {
|
|
2
|
+
disabledPrimary: {
|
|
3
|
+
fill: 'disabledTertiary',
|
|
4
|
+
fillItem: 'disabledTertiary',
|
|
5
|
+
fillItemActive: 'surfaceDisabled',
|
|
6
|
+
fillItemActiveHover: 'surfaceDisabled',
|
|
7
|
+
fillItemHover: 'surfaceTertiary',
|
|
8
|
+
labelTextColor: 'surfaceTextQuaternary',
|
|
9
|
+
borderColor: 'surfaceBorderPrimary',
|
|
10
|
+
iconAfterFill: 'surfaceItemPrimary',
|
|
11
|
+
iconAfterFillActive: 'disabledItemSecondary',
|
|
12
|
+
iconBeforeFill: 'surfaceItemPrimary',
|
|
13
|
+
iconBeforeFillActive: 'disabledItemSecondary',
|
|
14
|
+
iconFill: 'surfaceItemPrimary',
|
|
15
|
+
iconFillActive: 'disabledItemSecondary',
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
export { choiceAppearanceDisabled };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const choiceAppearanceError = {
|
|
2
|
+
errorPrimary: {
|
|
3
|
+
fill: 'errorTertiary',
|
|
4
|
+
fillItem: 'errorTertiary',
|
|
5
|
+
fillItemActive: 'errorSecondary',
|
|
6
|
+
fillItemHover: 'errorHoverPrimary',
|
|
7
|
+
labelTextColor: 'errorTextSecondary',
|
|
8
|
+
borderColor: 'errorBorderQuaternary',
|
|
9
|
+
iconAfterFill: 'errorItemSecondary',
|
|
10
|
+
iconAfterFillActive: 'errorItemTertiary',
|
|
11
|
+
iconBeforeFill: 'errorItemSecondary',
|
|
12
|
+
iconBeforeFillActive: 'errorItemTertiary',
|
|
13
|
+
iconFill: 'errorItemSecondary',
|
|
14
|
+
iconFillActive: 'errorItemTertiary',
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
export { choiceAppearanceError };
|