@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,26 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { mergeAppearanceKeys } from 'src/utils';
|
|
4
|
+
import { useAppearanceConfig } from '../../hooks/useAppearanceConfig';
|
|
5
|
+
import { useDevicePropsGenerator } from '../../hooks/useDevicePropsGenerator';
|
|
6
|
+
import { useStyles } from '../../hooks/useStyles';
|
|
7
|
+
import { Badge } from '../Badge/Badge';
|
|
8
|
+
import { Icon } from '../Icon';
|
|
9
|
+
import { Text } from '../Text';
|
|
10
|
+
import { Title } from '../Title';
|
|
11
|
+
import { tileAppearance } from './Tile.appearance';
|
|
12
|
+
const tileConfig = {
|
|
13
|
+
appearance: tileAppearance,
|
|
14
|
+
setAppearance: (appearanceConfig) => {
|
|
15
|
+
tileConfig.appearance = appearanceConfig;
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
function Tile(props) {
|
|
19
|
+
const { appearance, className, dataTestId, dataTour, type, title, desc, badgeValue, iconClick, before, after, isSkeleton, onClick, children, } = props;
|
|
20
|
+
const appearanceConfig = useAppearanceConfig(appearance, tileConfig);
|
|
21
|
+
const propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
22
|
+
const { directionClass, alignClass, alignDirectionClass, fillClass, titleTextAlign, titleTextColor, titleTextSize, titleTextWeight, titleTextWrap, descTextColor, descTextSize, descTextWrap, borderColorClass, borderColorHoverClass, borderTypeClass, borderWidthClass, badgeAppearance, badgeAppearanceSize, badgeShape, badgeSize, badgeTextColor, badgeTextSize, icon, iconAppearance, iconFill, iconFillIcon, iconFillSize, iconShape, iconSize, iconSrc, shapeClass, shapeStrengthClass, sizeClass, widthClass, } = propsGenerator;
|
|
23
|
+
const { styles: tileStyles } = useStyles(props);
|
|
24
|
+
return (_jsx("div", { className: clsx('tile', className, fillClass && `fill_${fillClass}`, shapeClass && `shape_${shapeClass}`, shapeStrengthClass && `shape-strength_${shapeStrengthClass}`, alignClass && `align_${alignClass}`, directionClass && `direction_${directionClass}`, borderColorClass && `border-color_${borderColorClass}`, borderColorHoverClass && `border-color_hover_${borderColorHoverClass}`, borderWidthClass && `border-width_${borderWidthClass}`, borderTypeClass && `border_type_${borderTypeClass}`, sizeClass && `tile_size_${sizeClass}`, type && `tile_type_${type}`, badgeValue && `tile_state_badge`, widthClass && `width_${widthClass}`, isSkeleton && `tile_skeleton`), "data-testid": dataTestId, "data-tour": dataTour, style: tileStyles, onClick: onClick, children: _jsxs("div", { className: clsx('tile__wrapper', alignClass, alignDirectionClass), children: [before, _jsxs("div", { className: "tile__header", children: [_jsxs("div", { className: "tile__header-inner", children: [title && (_jsx(Title, { className: "tile__title", size: titleTextSize, textAlign: titleTextAlign, textColor: titleTextColor, textWeight: titleTextWeight, textWrap: titleTextWrap, children: title })), desc && (_jsx(Text, { className: "tile__text", size: descTextSize, textColor: descTextColor, textWrap: descTextWrap, children: desc }))] }), _jsxs("div", { className: "tile__header-actions", children: [badgeValue && (_jsx(Badge, { appearance: mergeAppearanceKeys(badgeAppearance, badgeAppearanceSize), className: "tile__badge", size: badgeSize, textColor: badgeTextColor, textSize: badgeTextSize, shape: badgeShape, value: badgeValue })), (icon || iconSrc) && (_jsx(Icon, { appearance: iconAppearance, className: "tile__icon", fill: iconFill, fillSize: iconFillSize, iconFill: iconFillIcon, iconSize: iconSize, imageSrc: iconSrc, shape: iconShape, SvgImage: icon, onClick: iconClick }))] })] }), children, after] }) }));
|
|
25
|
+
}
|
|
26
|
+
export { Tile, tileConfig };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const tileAppearanceShape = {
|
|
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 { tileAppearanceShape };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
const tileAppearanceSize = {
|
|
2
|
+
sizeXL: {
|
|
3
|
+
size: 'xl',
|
|
4
|
+
titleTextSize: 'h4',
|
|
5
|
+
descTextSize: 'l',
|
|
6
|
+
badgeAppearanceSize: 'sizeM',
|
|
7
|
+
iconFillSize: '32',
|
|
8
|
+
iconSize: '24',
|
|
9
|
+
},
|
|
10
|
+
sizeL: {
|
|
11
|
+
size: 'l',
|
|
12
|
+
titleTextSize: 'h4',
|
|
13
|
+
descTextSize: 'l',
|
|
14
|
+
badgeAppearanceSize: 'sizeM',
|
|
15
|
+
iconFillSize: '24',
|
|
16
|
+
iconSize: '24',
|
|
17
|
+
},
|
|
18
|
+
sizeM: {
|
|
19
|
+
size: 'm',
|
|
20
|
+
titleTextSize: 'h4',
|
|
21
|
+
descTextSize: 'm',
|
|
22
|
+
badgeAppearanceSize: 'sizeM',
|
|
23
|
+
iconFillSize: '24',
|
|
24
|
+
iconSize: '24',
|
|
25
|
+
},
|
|
26
|
+
sizeS: {
|
|
27
|
+
size: 's',
|
|
28
|
+
titleTextSize: 'h4',
|
|
29
|
+
descTextSize: 's',
|
|
30
|
+
badgeAppearanceSize: 'sizeM',
|
|
31
|
+
iconFillSize: '24',
|
|
32
|
+
iconSize: '24',
|
|
33
|
+
},
|
|
34
|
+
sizeXS: {
|
|
35
|
+
size: 'xs',
|
|
36
|
+
titleTextSize: 'h6',
|
|
37
|
+
descTextSize: 'xs',
|
|
38
|
+
badgeAppearanceSize: 'sizeXXS',
|
|
39
|
+
iconFillSize: '12',
|
|
40
|
+
iconSize: '12',
|
|
41
|
+
},
|
|
42
|
+
sizeXXS: {
|
|
43
|
+
size: 'xxs',
|
|
44
|
+
titleTextSize: 'h6',
|
|
45
|
+
descTextSize: 'xs',
|
|
46
|
+
badgeAppearanceSize: 'sizeXXS',
|
|
47
|
+
iconFillSize: '12',
|
|
48
|
+
iconSize: '12',
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
export { tileAppearanceSize };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
const tileAppearanceSurface = {
|
|
2
|
+
surfacePrimary: {
|
|
3
|
+
fill: 'surfacePrimary',
|
|
4
|
+
titleTextColor: 'surfaceTextPrimary',
|
|
5
|
+
descTextColor: 'surfaceTextPrimary',
|
|
6
|
+
borderColor: 'surfaceBorderTertiary',
|
|
7
|
+
badgeAppearance: 'accentPrimary',
|
|
8
|
+
iconAppearance: 'accentPrimary',
|
|
9
|
+
},
|
|
10
|
+
surfaceQuaternary: {
|
|
11
|
+
fill: 'surfaceQuaternary',
|
|
12
|
+
titleTextColor: 'surfaceTextPrimary',
|
|
13
|
+
descTextColor: 'surfaceTextPrimary',
|
|
14
|
+
borderColor: 'surfaceBorderTertiary',
|
|
15
|
+
badgeAppearance: 'accentPrimary',
|
|
16
|
+
iconAppearance: 'accentPrimary',
|
|
17
|
+
},
|
|
18
|
+
surfaceSecondary: {
|
|
19
|
+
fill: 'surfaceSecondary',
|
|
20
|
+
titleTextColor: 'surfaceTextPrimary',
|
|
21
|
+
descTextColor: 'surfaceTextPrimary',
|
|
22
|
+
borderColor: 'surfaceBorderTertiary',
|
|
23
|
+
badgeAppearance: 'accentPrimary',
|
|
24
|
+
iconAppearance: 'accentPrimary',
|
|
25
|
+
},
|
|
26
|
+
surfaceTertiary: {
|
|
27
|
+
fill: 'surfaceTertiary',
|
|
28
|
+
titleTextColor: 'surfaceTextPrimary',
|
|
29
|
+
descTextColor: 'surfaceTextPrimary',
|
|
30
|
+
borderColor: 'surfaceBorderTertiary',
|
|
31
|
+
badgeAppearance: 'accentPrimary',
|
|
32
|
+
iconAppearance: 'accentPrimary',
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
export { tileAppearanceSurface };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { titleAppearanceAccent } from './appearance/titleAccent';
|
|
2
|
+
import { titleAppearanceDanger } from './appearance/titleDanger';
|
|
3
|
+
import { titleAppearanceDisabled } from './appearance/titleDisabled';
|
|
4
|
+
import { titleAppearanceError } from './appearance/titleError';
|
|
5
|
+
import { titleAppearanceExtra } from './appearance/titleExtra';
|
|
6
|
+
import { titleAppearanceInfo } from './appearance/titleInfo';
|
|
7
|
+
import { titleAppearanceRequire } from './appearance/titleRequire';
|
|
8
|
+
import { titleAppearanceSize } from './appearance/titleSize';
|
|
9
|
+
import { titleAppearanceSpecial } from './appearance/titleSpecial';
|
|
10
|
+
import { titleAppearanceStyle } from './appearance/titleStyle';
|
|
11
|
+
import { titleAppearanceSuccess } from './appearance/titleSuccess';
|
|
12
|
+
import { titleAppearanceSurface } from './appearance/titleSurface';
|
|
13
|
+
import { titleAppearanceWarning } from './appearance/titleWarning';
|
|
14
|
+
const titleAppearance = {
|
|
15
|
+
...titleAppearanceSize,
|
|
16
|
+
...titleAppearanceDisabled,
|
|
17
|
+
...titleAppearanceStyle,
|
|
18
|
+
...titleAppearanceAccent,
|
|
19
|
+
...titleAppearanceDanger,
|
|
20
|
+
...titleAppearanceError,
|
|
21
|
+
...titleAppearanceInfo,
|
|
22
|
+
...titleAppearanceSpecial,
|
|
23
|
+
...titleAppearanceExtra,
|
|
24
|
+
...titleAppearanceSuccess,
|
|
25
|
+
...titleAppearanceSurface,
|
|
26
|
+
...titleAppearanceWarning,
|
|
27
|
+
...titleAppearanceRequire,
|
|
28
|
+
};
|
|
29
|
+
export { titleAppearance };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } 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 { titleAppearance } from './Title.appearance';
|
|
9
|
+
const titleConfig = {
|
|
10
|
+
appearance: titleAppearance,
|
|
11
|
+
setAppearance: (appearanceConfig) => {
|
|
12
|
+
titleConfig.appearance = appearanceConfig;
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
function Title(props) {
|
|
16
|
+
const { appearance, className, dataTestId, dataTour, text, afterWrapper, beforeWrapper, style, tag = 'span', before, after, isActive, isDisabled, isSkeleton, onClick, children, } = props;
|
|
17
|
+
const appearanceConfig = useAppearanceConfig(appearance, titleConfig, isDisabled);
|
|
18
|
+
const propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
19
|
+
const { directionClass, size, fillClass, fillHoverClass, textAlignClass, textColorActiveClass, textColorActiveHoverClass, textColorClass, textColorDisabledClass, textColorHoverClass, textFontClass, textStyleClass, textTruncateClass, textWeightClass, textWrap, heightClass, iconAfter, iconAfterFill, iconAfterFillIcon, iconAfterFillSize, iconAfterShape, iconAfterSize, iconAfterSrc, iconBadgeAppearance, iconBadgeShape, iconBadgeSize, iconBadgeTextColor, iconBadgeTextSize, iconBadgeValue, iconBefore, iconBeforeFill, iconBeforeFillIcon, iconBeforeFillSize, iconBeforeShape, iconBeforeSize, iconBeforeSrc, svgFillClass, svgFillHoverClass, widthClass, wrapperDirectionClass, onClickIconAfter, onClickIconBefore, } = propsGenerator;
|
|
20
|
+
const { styles: titleStyles, wrapper: titleWrapperStyles } = useStyles(props);
|
|
21
|
+
const Tag = useMemo(() => {
|
|
22
|
+
if (tag) {
|
|
23
|
+
return tag;
|
|
24
|
+
}
|
|
25
|
+
return size ? size : 'span';
|
|
26
|
+
}, [tag, size]);
|
|
27
|
+
return (_jsxs(Tag, { className: clsx(className, 'title', fillClass && `fill_${fillClass}`, fillHoverClass && `fill_hover_${fillHoverClass}`, svgFillClass && `svg_fill_${svgFillClass}`, svgFillHoverClass && `svg_fill_hover_${svgFillHoverClass}`, widthClass && `width_${widthClass}`, heightClass && `height_${heightClass}`, size && `title_size_${size}`, directionClass && `title_direction_${directionClass}`, isDisabled &&
|
|
28
|
+
textColorDisabledClass &&
|
|
29
|
+
`text-color_${textColorDisabledClass}`, !isActive &&
|
|
30
|
+
!isDisabled &&
|
|
31
|
+
textColorClass &&
|
|
32
|
+
`text text-color_${textColorClass}`, isActive &&
|
|
33
|
+
!isDisabled &&
|
|
34
|
+
textColorActiveClass &&
|
|
35
|
+
`text-color_active_${textColorActiveClass}`, !isActive &&
|
|
36
|
+
!isDisabled &&
|
|
37
|
+
textColorHoverClass &&
|
|
38
|
+
`text-color_hover_${textColorHoverClass}`, isActive &&
|
|
39
|
+
!isDisabled &&
|
|
40
|
+
textColorActiveHoverClass &&
|
|
41
|
+
`text-color_active_hover${textColorActiveHoverClass}`, textFontClass && `text-font_${textFontClass}`, textStyleClass && `text-style_${textStyleClass}`, textWeightClass && `text-weight_${textWeightClass}`, textWrap && `word-wrap_${textWrap}`, iconBadgeValue && 'title_badge', isSkeleton && 'title_skeleton'), "data-testid": dataTestId, "data-tour": dataTour, style: Object.assign({}, titleStyles, style), onClick: onClick, children: [before, _jsxs("span", { className: clsx(textAlignClass && `text-align_${textAlignClass}`, wrapperDirectionClass && `title_direction_${wrapperDirectionClass}`, 'title__wrapper', textTruncateClass && `text-truncate_${textTruncateClass}`), style: titleWrapperStyles, children: [(iconBefore || iconBeforeSrc) && (_jsx(Icon, { className: clsx('title__icon_before', iconBadgeValue && 'title__icon_before-badge'), fill: iconBeforeFill, fillSize: iconBeforeFillSize, badgeAppearance: iconBadgeAppearance, badgeClass: 'title__icon_before_badge', badgeShape: iconBadgeShape, badgeSize: iconBadgeSize, badgeTextColor: iconBadgeTextColor, badgeTextSize: iconBadgeTextSize, badgeValue: iconBadgeValue, iconFill: iconBeforeFillIcon, iconSize: iconBeforeSize, imageSrc: iconBeforeSrc, shape: iconBeforeShape, SvgImage: iconBefore, onClick: onClickIconBefore })), beforeWrapper, children || text, afterWrapper, (iconAfter || iconAfterSrc) && (_jsx(Icon, { className: clsx('title__icon_after', iconBadgeValue && 'title__icon_after-badge'), fill: iconAfterFill, fillSize: iconAfterFillSize, badgeAppearance: iconBadgeAppearance, badgeClass: 'title__icon_after_badge', badgeShape: iconBadgeShape, badgeSize: iconBadgeSize, badgeTextColor: iconBadgeTextColor, badgeTextSize: iconBadgeTextSize, badgeValue: iconBadgeValue, iconFill: iconAfterFillIcon, iconSize: iconAfterSize, imageSrc: iconAfterSrc, shape: iconAfterShape, SvgImage: iconAfter, onClick: onClickIconAfter }))] }), after] }));
|
|
42
|
+
}
|
|
43
|
+
export { Title, titleConfig };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const titleAppearanceDisabled = {
|
|
2
|
+
disabledPrimary: {
|
|
3
|
+
fill: 'surfacePrimary',
|
|
4
|
+
borderColor: 'errorBorderQuaternary',
|
|
5
|
+
borderHover: 'errorBorderHoverQuaternary',
|
|
6
|
+
textColor: 'surfaceTextQuaternary',
|
|
7
|
+
iconBeforeFill: 'errorQuaternary',
|
|
8
|
+
},
|
|
9
|
+
disabledSecondary: {
|
|
10
|
+
fill: 'surfaceSecondary',
|
|
11
|
+
borderColor: 'surfaceBorderTertiary',
|
|
12
|
+
borderHover: 'surfaceBorderHoverQuaternary',
|
|
13
|
+
iconBeforeFill: 'surfaceQuaternary',
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
export { titleAppearanceDisabled };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const titleAppearanceRequire = {
|
|
2
|
+
requirePrimary: {
|
|
3
|
+
fill: 'warningTertiary',
|
|
4
|
+
borderColor: 'warningBorderQuaternary',
|
|
5
|
+
borderHover: 'warningBorderQuaternary',
|
|
6
|
+
textColor: 'surfaceTextPrimary',
|
|
7
|
+
iconBeforeFill: 'warningQuaternary',
|
|
8
|
+
},
|
|
9
|
+
requireSecondary: {
|
|
10
|
+
fill: 'surfaceSecondary',
|
|
11
|
+
borderColor: 'surfaceBorderTertiary',
|
|
12
|
+
borderHover: 'surfaceBorderQuaternary',
|
|
13
|
+
iconBeforeFill: 'surfaceQuaternary',
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
export { titleAppearanceRequire };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
const titleAppearanceSize = {
|
|
2
|
+
h1: {
|
|
3
|
+
size: 'h1',
|
|
4
|
+
iconAfterFillSize: '24',
|
|
5
|
+
iconAfterSize: '24',
|
|
6
|
+
iconBeforeFillSize: '24',
|
|
7
|
+
iconBeforeSize: '24',
|
|
8
|
+
},
|
|
9
|
+
h2: {
|
|
10
|
+
size: 'h2',
|
|
11
|
+
iconAfterFillSize: '24',
|
|
12
|
+
iconAfterSize: '24',
|
|
13
|
+
iconBeforeFillSize: '24',
|
|
14
|
+
iconBeforeSize: '24',
|
|
15
|
+
},
|
|
16
|
+
h3: {
|
|
17
|
+
size: 'h3',
|
|
18
|
+
iconAfterFillSize: '24',
|
|
19
|
+
iconAfterSize: '24',
|
|
20
|
+
iconBeforeFillSize: '24',
|
|
21
|
+
iconBeforeSize: '24',
|
|
22
|
+
},
|
|
23
|
+
h4: {
|
|
24
|
+
size: 'h4',
|
|
25
|
+
iconAfterFillSize: '24',
|
|
26
|
+
iconAfterSize: '24',
|
|
27
|
+
iconBeforeFillSize: '24',
|
|
28
|
+
iconBeforeSize: '24',
|
|
29
|
+
},
|
|
30
|
+
h5: {
|
|
31
|
+
size: 'h5',
|
|
32
|
+
iconAfterFillSize: '20',
|
|
33
|
+
iconAfterSize: '20',
|
|
34
|
+
iconBeforeFillSize: '20',
|
|
35
|
+
iconBeforeSize: '20',
|
|
36
|
+
},
|
|
37
|
+
h6: {
|
|
38
|
+
size: 'h6',
|
|
39
|
+
iconAfterFillSize: '16',
|
|
40
|
+
iconAfterSize: '16',
|
|
41
|
+
iconBeforeFillSize: '16',
|
|
42
|
+
iconBeforeSize: '16',
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
export { titleAppearanceSize };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const titleAppearanceSurface = {
|
|
2
|
+
surfacePrimary: {
|
|
3
|
+
fill: 'surfacePrimary',
|
|
4
|
+
fillHover: 'surfaceHoverPrimary',
|
|
5
|
+
},
|
|
6
|
+
surfaceQuaternary: {
|
|
7
|
+
fill: 'surfaceQuaternary',
|
|
8
|
+
fillHover: 'surfaceHoverQuaternary',
|
|
9
|
+
},
|
|
10
|
+
surfaceSecondary: {
|
|
11
|
+
fill: 'surfaceSecondary',
|
|
12
|
+
fillHover: 'surfaceHoverSecondary',
|
|
13
|
+
},
|
|
14
|
+
surfaceTertiary: {
|
|
15
|
+
fill: 'surfaceTertiary',
|
|
16
|
+
fillHover: 'surfaceHoverTertiary',
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
export { titleAppearanceSurface };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { tooltipAppearanceDefault } from './appearance/tooltipDefault';
|
|
2
|
+
import { tooltipAppearanceDisabled } from './appearance/tooltipDisabled';
|
|
3
|
+
import { tooltipAppearanceError } from './appearance/tooltipError';
|
|
4
|
+
import { tooltipAppearanceRequire } from './appearance/tooltipRequire';
|
|
5
|
+
import { tooltipAppearanceShape } from './appearance/tooltipShape';
|
|
6
|
+
import { tooltipAppearanceSize } from './appearance/tooltipSize';
|
|
7
|
+
import { tooltipAppearanceStyle } from './appearance/tooltipStyle';
|
|
8
|
+
import { tooltipAppearanceSuccess } from './appearance/tooltipSuccess';
|
|
9
|
+
const tooltipAppearance = {
|
|
10
|
+
...tooltipAppearanceDefault,
|
|
11
|
+
...tooltipAppearanceSize,
|
|
12
|
+
...tooltipAppearanceDisabled,
|
|
13
|
+
...tooltipAppearanceRequire,
|
|
14
|
+
...tooltipAppearanceShape,
|
|
15
|
+
...tooltipAppearanceStyle,
|
|
16
|
+
...tooltipAppearanceError,
|
|
17
|
+
...tooltipAppearanceSuccess,
|
|
18
|
+
};
|
|
19
|
+
export { tooltipAppearance };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React, { useCallback, useImperativeHandle, useRef, useState, } 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 { Text } from 'src/components/Text';
|
|
8
|
+
import { Title } from 'src/components/Title';
|
|
9
|
+
import { tooltipAppearance } from './Tooltip.appearance';
|
|
10
|
+
const tooltipConfig = {
|
|
11
|
+
appearance: tooltipAppearance,
|
|
12
|
+
setAppearance: (appearanceConfig) => {
|
|
13
|
+
tooltipConfig.appearance = appearanceConfig;
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
const Tooltip = React.forwardRef(function Tooltip(props, ref) {
|
|
17
|
+
const { appearance, className, dataTestId, dataTour, initialIsVisible, title, text, before, after, openTimeoutDelay = 500, closeTimeoutDelay = 250, isSkeleton, isTooltipDisableState, children, } = props;
|
|
18
|
+
const tooltipElementRef = useRef(null);
|
|
19
|
+
const tooltipTimeoutHideRef = useRef(null);
|
|
20
|
+
const tooltipTimeoutShowRef = useRef(null);
|
|
21
|
+
const isTooltipCloseAnimationInProgressRef = useRef(false);
|
|
22
|
+
const [isTooltipVisible, setIsTooltipVisible] = useState(initialIsVisible);
|
|
23
|
+
const openTooltip = useCallback(() => {
|
|
24
|
+
if (!isTooltipCloseAnimationInProgressRef.current) {
|
|
25
|
+
if (tooltipTimeoutHideRef.current) {
|
|
26
|
+
clearTimeout(tooltipTimeoutHideRef.current);
|
|
27
|
+
}
|
|
28
|
+
tooltipTimeoutShowRef.current = setTimeout(() => {
|
|
29
|
+
setIsTooltipVisible(true);
|
|
30
|
+
}, openTimeoutDelay);
|
|
31
|
+
}
|
|
32
|
+
}, [openTimeoutDelay]);
|
|
33
|
+
const closeTooltip = useCallback(() => {
|
|
34
|
+
if (tooltipTimeoutShowRef.current) {
|
|
35
|
+
clearTimeout(tooltipTimeoutShowRef.current);
|
|
36
|
+
}
|
|
37
|
+
tooltipTimeoutHideRef.current = setTimeout(() => {
|
|
38
|
+
setIsTooltipVisible((prevState) => {
|
|
39
|
+
const newState = false;
|
|
40
|
+
if (prevState === true) {
|
|
41
|
+
isTooltipCloseAnimationInProgressRef.current = true;
|
|
42
|
+
}
|
|
43
|
+
return newState;
|
|
44
|
+
});
|
|
45
|
+
}, closeTimeoutDelay);
|
|
46
|
+
}, [closeTimeoutDelay]);
|
|
47
|
+
const onAnimationEnd = useCallback(() => {
|
|
48
|
+
isTooltipCloseAnimationInProgressRef.current = false;
|
|
49
|
+
}, []);
|
|
50
|
+
useImperativeHandle(ref, () => ({
|
|
51
|
+
get tooltipElement() {
|
|
52
|
+
return tooltipElementRef.current;
|
|
53
|
+
},
|
|
54
|
+
openTooltip: openTooltip,
|
|
55
|
+
closeTooltip: closeTooltip,
|
|
56
|
+
isTooltipVisible: isTooltipVisible,
|
|
57
|
+
}), [isTooltipVisible, openTooltip, closeTooltip]);
|
|
58
|
+
const appearanceConfig = useAppearanceConfig(appearance, tooltipConfig);
|
|
59
|
+
const propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
60
|
+
const { alignClass, alignDirectionClass, alignmentClass, alignPosition, fillClass, titleColor, titleSize, titleWeight, borderColorClass, borderTypeClass, borderWidthClass, textColor, textSize, textWeight, arrowPosition, centeringClass, elevationClass, shapeClass, shapeStrengthClass, sizeClass, widthClass, } = propsGenerator;
|
|
61
|
+
const { styles: tooltipStyles } = useStyles(props);
|
|
62
|
+
return (_jsxs("div", { className: clsx(className, 'tooltip', !isTooltipDisableState
|
|
63
|
+
? isTooltipVisible
|
|
64
|
+
? 'tooltip_state_open'
|
|
65
|
+
: 'tooltip_state_close'
|
|
66
|
+
: null, alignPosition && `tooltip_align-position_${alignPosition}`, alignDirectionClass && `align_${alignDirectionClass}`, alignClass && `align_${alignClass}`, elevationClass && `elevation_${elevationClass}`, centeringClass && `centering_${centeringClass}`, alignmentClass && `alignment_${alignmentClass}`, sizeClass && `tooltip_size_${sizeClass}`, isSkeleton && 'tooltip_skeleton', widthClass && `width_${widthClass}`), ref: tooltipElementRef, "data-testid": dataTestId, "data-tour": dataTour, style: tooltipStyles, onAnimationEnd: onAnimationEnd, children: [arrowPosition && (_jsx("div", { className: clsx('tooltip__arrow', arrowPosition && `tooltip__arrow_position_${arrowPosition}`, fillClass && `fill_${fillClass}`), children: "\u00A0" })), before, _jsxs("div", { className: clsx('tooltip__inner', borderWidthClass && `border-width_${borderWidthClass}`, borderColorClass && `border-color_${borderColorClass}`, borderTypeClass && `border_type_${borderTypeClass}`, fillClass && `fill_${fillClass}`, shapeClass && `shape_${shapeClass}`, shapeStrengthClass && `shape-strength_${shapeStrengthClass}`), children: [title && (_jsx(Title, { className: "tooltip__title text", size: titleSize, textColor: titleColor, textWeight: titleWeight, children: title })), text && (_jsx(Text, { className: "tooltip__text", size: textSize, textColor: textColor, textWeight: textWeight, children: text })), children] }), after] }));
|
|
67
|
+
});
|
|
68
|
+
export { Tooltip, tooltipConfig };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const tooltipAppearanceDefault = {
|
|
2
|
+
defaultPrimary: {
|
|
3
|
+
fill: 'surfacePrimary',
|
|
4
|
+
fillHover: 'surfaceHoverPrimary',
|
|
5
|
+
titleColor: 'surfaceTextPrimary',
|
|
6
|
+
borderColor: 'surfaceBorderPrimary',
|
|
7
|
+
textColor: 'surfaceTextPrimary',
|
|
8
|
+
},
|
|
9
|
+
};
|
|
10
|
+
export { tooltipAppearanceDefault };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const tooltipAppearanceRequire = {
|
|
2
|
+
requirePrimary: {
|
|
3
|
+
fill: 'warningPrimary',
|
|
4
|
+
fillHover: 'warningHoverPrimary',
|
|
5
|
+
borderColor: 'warningBorderPrimary',
|
|
6
|
+
titleColor: 'warningTextPrimary',
|
|
7
|
+
textColor: 'warningTextPrimary',
|
|
8
|
+
},
|
|
9
|
+
};
|
|
10
|
+
export { tooltipAppearanceRequire };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const tooltipAppearanceShape = {
|
|
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 { tooltipAppearanceShape };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const tooltipAppearanceSize = {
|
|
2
|
+
sizeL: {
|
|
3
|
+
size: 'l',
|
|
4
|
+
titleSize: 'h5',
|
|
5
|
+
textSize: 's',
|
|
6
|
+
},
|
|
7
|
+
sizeM: {
|
|
8
|
+
size: 'm',
|
|
9
|
+
titleSize: 'h5',
|
|
10
|
+
textSize: 's',
|
|
11
|
+
},
|
|
12
|
+
sizeS: {
|
|
13
|
+
size: 's',
|
|
14
|
+
titleSize: 'h5',
|
|
15
|
+
textSize: 's',
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
export { tooltipAppearanceSize };
|