@itcase/ui 1.9.65 → 1.9.66
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/context/Notifications.js +12 -186
- package/dist/context/UIContext.js +12 -70
- package/dist/context/UrlAssetPrefix.js +12 -12
- package/dist/hoc/urlWithAssetPrefix.js +12 -74
- package/dist/hooks/useActiveClasses/useActiveClasses.helpers.js +1 -0
- package/dist/hooks/useActiveClasses/useActiveClasses.interface.js +1 -0
- package/dist/hooks/useActiveClasses/useActiveClasses.js +3 -1
- package/dist/hooks/useAppearanceConfig/useAppearanceConfig.js +12 -25
- package/dist/hooks/useDevicePropsGenerator/useDevicePropsGenerator.interface.js +1 -1
- package/dist/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js +12 -121
- package/dist/hooks/useDeviceTargetClass.js +52 -37
- package/dist/hooks/useDropzoneFieldFiles.js +20540 -2
- package/dist/hooks/useHoldProgress.js +3 -1
- package/dist/hooks/useMediaQueries/useMediaQueries.js +12 -112
- package/dist/hooks/useStyles/styleAttributes.interface.js +1 -1
- package/dist/hooks/useStyles/styleAttributes.js +12 -167
- package/dist/hooks/useStyles/useStyles.js +12 -193
- package/dist/hooks/useViewportFix.js +2 -0
- package/dist/utils/mergeAppearanceKeys.js +12 -15
- package/dist/utils/setViewportProperty.js +12 -5
- package/package.json +1 -1
- package/dist/components/Accordion/Accordion.appearance.js +0 -9
- package/dist/components/Accordion/Accordion.interface.js +0 -1
- package/dist/components/Accordion/Accordion.js +0 -57
- package/dist/components/Accordion/AccordionItem.js +0 -36
- package/dist/components/Accordion/appearance/accordionSize.js +0 -52
- package/dist/components/Accordion/appearance/accordionStyle.js +0 -14
- package/dist/components/Accordion/appearance/accordionSurface.js +0 -36
- package/dist/components/Accordion/index.js +0 -4
- package/dist/components/Avatar/Avatar.appearance.js +0 -11
- package/dist/components/Avatar/Avatar.interface.js +0 -1
- package/dist/components/Avatar/Avatar.js +0 -29
- package/dist/components/Avatar/appearance/avatarDefault.js +0 -23
- package/dist/components/Avatar/appearance/avatarShape.js +0 -25
- package/dist/components/Avatar/appearance/avatarSize.js +0 -63
- package/dist/components/Avatar/appearance/avatarStyle.js +0 -16
- package/dist/components/Avatar/index.js +0 -2
- package/dist/components/AvatarStack/AvatarStack.appearance.js +0 -5
- package/dist/components/AvatarStack/AvatarStack.interface.js +0 -1
- package/dist/components/AvatarStack/AvatarStack.js +0 -25
- package/dist/components/AvatarStack/appearance/avatarStackSize.js +0 -21
- package/dist/components/AvatarStack/index.js +0 -2
- package/dist/components/Badge/Badge.appearance.js +0 -29
- package/dist/components/Badge/Badge.interface.js +0 -1
- package/dist/components/Badge/Badge.js +0 -35
- package/dist/components/Badge/appearance/badgeAccent.js +0 -31
- package/dist/components/Badge/appearance/badgeDanger.js +0 -10
- package/dist/components/Badge/appearance/badgeDisabled.js +0 -9
- package/dist/components/Badge/appearance/badgeError.js +0 -9
- package/dist/components/Badge/appearance/badgeExtra.js +0 -10
- package/dist/components/Badge/appearance/badgeInfo.js +0 -16
- package/dist/components/Badge/appearance/badgeShape.js +0 -25
- package/dist/components/Badge/appearance/badgeSize.js +0 -38
- package/dist/components/Badge/appearance/badgeSpecial.js +0 -10
- package/dist/components/Badge/appearance/badgeStyle.js +0 -14
- package/dist/components/Badge/appearance/badgeSuccess.js +0 -10
- package/dist/components/Badge/appearance/badgeSurface.js +0 -25
- package/dist/components/Badge/appearance/badgeWarning.js +0 -10
- package/dist/components/Badge/index.js +0 -2
- package/dist/components/Breadcrumbs/Breadcrumbs.appearance.js +0 -11
- package/dist/components/Breadcrumbs/Breadcrumbs.interface.js +0 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.js +0 -23
- package/dist/components/Breadcrumbs/BreadcrumbsItem.js +0 -24
- package/dist/components/Breadcrumbs/appearance/breadcrumbsAccent.js +0 -9
- package/dist/components/Breadcrumbs/appearance/breadcrumbsSize.js +0 -39
- package/dist/components/Breadcrumbs/appearance/breadcrumbsStyle.js +0 -14
- package/dist/components/Breadcrumbs/appearance/breadcrumbsSurface.js +0 -27
- package/dist/components/Breadcrumbs/index.js +0 -4
- package/dist/components/Button/Button.appearance.js +0 -27
- package/dist/components/Button/Button.interface.js +0 -1
- package/dist/components/Button/Button.js +0 -46
- package/dist/components/Button/appearance/buttonAccent.js +0 -36
- package/dist/components/Button/appearance/buttonDanger.js +0 -24
- package/dist/components/Button/appearance/buttonError.js +0 -24
- package/dist/components/Button/appearance/buttonExtra.js +0 -22
- package/dist/components/Button/appearance/buttonInfo.js +0 -36
- package/dist/components/Button/appearance/buttonShape.js +0 -25
- package/dist/components/Button/appearance/buttonSize.js +0 -52
- package/dist/components/Button/appearance/buttonSpecial.js +0 -22
- package/dist/components/Button/appearance/buttonStyle.js +0 -14
- package/dist/components/Button/appearance/buttonSuccess.js +0 -24
- package/dist/components/Button/appearance/buttonSurface.js +0 -52
- package/dist/components/Button/appearance/buttonWarning.js +0 -24
- package/dist/components/Button/index.js +0 -2
- package/dist/components/Cell/Cell.appearance.js +0 -9
- package/dist/components/Cell/Cell.interface.js +0 -1
- package/dist/components/Cell/Cell.js +0 -36
- package/dist/components/Cell/appearance/cellSize.js +0 -59
- package/dist/components/Cell/appearance/cellStyle.js +0 -14
- package/dist/components/Cell/appearance/cellSurface.js +0 -51
- package/dist/components/Cell/index.js +0 -2
- package/dist/components/Checkbox/Checkbox.appearance.js +0 -19
- package/dist/components/Checkbox/Checkbox.interface.js +0 -1
- package/dist/components/Checkbox/Checkbox.js +0 -39
- package/dist/components/Checkbox/appearance/checkboxDefault.js +0 -16
- package/dist/components/Checkbox/appearance/checkboxDisabled.js +0 -16
- package/dist/components/Checkbox/appearance/checkboxError.js +0 -16
- package/dist/components/Checkbox/appearance/checkboxRequire.js +0 -16
- package/dist/components/Checkbox/appearance/checkboxShape.js +0 -10
- package/dist/components/Checkbox/appearance/checkboxSize.js +0 -23
- package/dist/components/Checkbox/appearance/checkboxStyle.js +0 -22
- package/dist/components/Checkbox/appearance/checkboxSuccess.js +0 -16
- package/dist/components/Checkbox/index.js +0 -2
- package/dist/components/Checkmark/Checkmark.appearance.js +0 -15
- package/dist/components/Checkmark/Checkmark.interface.js +0 -1
- package/dist/components/Checkmark/Checkmark.js +0 -33
- package/dist/components/Checkmark/appearance/checkmarkAccent.js +0 -10
- package/dist/components/Checkmark/appearance/checkmarkDisabled.js +0 -10
- package/dist/components/Checkmark/appearance/checkmarkError.js +0 -10
- package/dist/components/Checkmark/appearance/checkmarkSize.js +0 -32
- package/dist/components/Checkmark/appearance/checkmarkStyle.js +0 -14
- package/dist/components/Checkmark/appearance/checkmarkSurface.js +0 -21
- package/dist/components/Checkmark/index.js +0 -2
- package/dist/components/Chips/Chips.appearance.js +0 -29
- package/dist/components/Chips/Chips.interface.js +0 -1
- package/dist/components/Chips/Chips.js +0 -28
- package/dist/components/Chips/ChipsGroup.js +0 -19
- package/dist/components/Chips/appearance/chipsAccent.js +0 -24
- package/dist/components/Chips/appearance/chipsDanger.js +0 -17
- package/dist/components/Chips/appearance/chipsDisabled.js +0 -14
- package/dist/components/Chips/appearance/chipsError.js +0 -17
- package/dist/components/Chips/appearance/chipsExtra.js +0 -17
- package/dist/components/Chips/appearance/chipsInfo.js +0 -17
- package/dist/components/Chips/appearance/chipsShape.js +0 -25
- package/dist/components/Chips/appearance/chipsSize.js +0 -45
- package/dist/components/Chips/appearance/chipsSpecial.js +0 -17
- package/dist/components/Chips/appearance/chipsStyle.js +0 -14
- package/dist/components/Chips/appearance/chipsSuccess.js +0 -17
- package/dist/components/Chips/appearance/chipsSurface.js +0 -45
- package/dist/components/Chips/appearance/chipsWarning.js +0 -17
- package/dist/components/Chips/index.js +0 -3
- package/dist/components/Choice/Choice.appearance.js +0 -19
- package/dist/components/Choice/Choice.interface.js +0 -1
- package/dist/components/Choice/Choice.js +0 -57
- package/dist/components/Choice/appearance/choiceDefault.js +0 -37
- package/dist/components/Choice/appearance/choiceDisabled.js +0 -18
- package/dist/components/Choice/appearance/choiceError.js +0 -17
- package/dist/components/Choice/appearance/choiceRequire.js +0 -18
- package/dist/components/Choice/appearance/choiceShape.js +0 -25
- package/dist/components/Choice/appearance/choiceSize.js +0 -18
- package/dist/components/Choice/appearance/choiceStyle.js +0 -14
- package/dist/components/Choice/appearance/choiceSuccess.js +0 -18
- package/dist/components/Choice/index.js +0 -2
- package/dist/components/Code/Code.appearance.js +0 -19
- package/dist/components/Code/Code.interface.js +0 -1
- package/dist/components/Code/Code.js +0 -37
- package/dist/components/Code/appearance/codeDefault.js +0 -11
- package/dist/components/Code/appearance/codeDisabled.js +0 -12
- package/dist/components/Code/appearance/codeError.js +0 -12
- package/dist/components/Code/appearance/codeRequire.js +0 -12
- package/dist/components/Code/appearance/codeShape.js +0 -25
- package/dist/components/Code/appearance/codeSize.js +0 -13
- package/dist/components/Code/appearance/codeStyle.js +0 -16
- package/dist/components/Code/appearance/codeSuccess.js +0 -12
- package/dist/components/Code/index.js +0 -2
- package/dist/components/CookiesWarning/CookiesWarning.appearance.js +0 -5
- package/dist/components/CookiesWarning/CookiesWarning.interface.js +0 -1
- package/dist/components/CookiesWarning/CookiesWarning.js +0 -42
- package/dist/components/CookiesWarning/appearance/cookiesWarningDefault.js +0 -12
- package/dist/components/CookiesWarning/index.js +0 -3
- package/dist/components/Dadata/Dadata.interface.js +0 -1
- package/dist/components/Dadata/Dadata.js +0 -35
- package/dist/components/Dadata/index.js +0 -1
- package/dist/components/DatePeriod/DatePeriod.appearance.js +0 -9
- package/dist/components/DatePeriod/DatePeriod.interface.js +0 -1
- package/dist/components/DatePeriod/DatePeriod.js +0 -60
- package/dist/components/DatePeriod/appearance/datePeriodShape.js +0 -35
- package/dist/components/DatePeriod/appearance/datePeriodSize.js +0 -24
- package/dist/components/DatePeriod/appearance/datePeriodSurface.js +0 -17
- package/dist/components/DatePeriod/index.js +0 -2
- package/dist/components/DatePicker/DatePicker.appearance.js +0 -9
- package/dist/components/DatePicker/DatePicker.interface.js +0 -1
- package/dist/components/DatePicker/DatePicker.js +0 -110
- package/dist/components/DatePicker/DatePicker.utils.js +0 -12
- package/dist/components/DatePicker/appearance/datePickerSize.js +0 -31
- package/dist/components/DatePicker/appearance/datePickerStyle.js +0 -20
- package/dist/components/DatePicker/appearance/datePickerSurface.js +0 -14
- package/dist/components/DatePicker/index.js +0 -2
- package/dist/components/Divider/Divider.appearance.js +0 -19
- package/dist/components/Divider/Divider.interface.js +0 -1
- package/dist/components/Divider/Divider.js +0 -25
- package/dist/components/Divider/appearance/dividerAccent.js +0 -6
- package/dist/components/Divider/appearance/dividerError.js +0 -6
- package/dist/components/Divider/appearance/dividerExtra.js +0 -6
- package/dist/components/Divider/appearance/dividerSize.js +0 -12
- package/dist/components/Divider/appearance/dividerSpecial.js +0 -6
- package/dist/components/Divider/appearance/dividerSuccess.js +0 -6
- package/dist/components/Divider/appearance/dividerSurface.js +0 -15
- package/dist/components/Divider/appearance/dividerWarning.js +0 -6
- package/dist/components/Divider/index.js +0 -2
- package/dist/components/Dot/Dot.interface.js +0 -1
- package/dist/components/Dot/Dot.js +0 -12
- package/dist/components/Dot/index.js +0 -1
- package/dist/components/Drawer/Drawer.appearance.js +0 -7
- package/dist/components/Drawer/Drawer.constants.js +0 -16
- package/dist/components/Drawer/Drawer.interface.js +0 -1
- package/dist/components/Drawer/Drawer.js +0 -65
- package/dist/components/Drawer/appearance/drawerSize.js +0 -8
- package/dist/components/Drawer/appearance/drawerSurface.js +0 -10
- package/dist/components/Drawer/index.js +0 -2
- package/dist/components/Dropdown/Dropdown.appearance.js +0 -13
- package/dist/components/Dropdown/Dropdown.interface.js +0 -1
- package/dist/components/Dropdown/Dropdown.js +0 -56
- package/dist/components/Dropdown/DropdownItem.appearance.js +0 -13
- package/dist/components/Dropdown/DropdownItem.js +0 -31
- package/dist/components/Dropdown/appearance/dropdownAccent.js +0 -24
- package/dist/components/Dropdown/appearance/dropdownShape.js +0 -25
- package/dist/components/Dropdown/appearance/dropdownSize.js +0 -39
- package/dist/components/Dropdown/appearance/dropdownStyle.js +0 -14
- package/dist/components/Dropdown/appearance/dropdownSurface.js +0 -32
- package/dist/components/Dropdown/index.js +0 -4
- package/dist/components/Dropzone/Dropzone.appearance.js +0 -15
- package/dist/components/Dropzone/Dropzone.interface.js +0 -1
- package/dist/components/Dropzone/Dropzone.js +0 -131
- package/dist/components/Dropzone/appearance/dropzoneDefault.js +0 -17
- package/dist/components/Dropzone/appearance/dropzoneDisabled.js +0 -17
- package/dist/components/Dropzone/appearance/dropzoneError.js +0 -17
- package/dist/components/Dropzone/appearance/dropzoneRequire.js +0 -17
- package/dist/components/Dropzone/appearance/dropzoneShape.js +0 -25
- package/dist/components/Dropzone/appearance/dropzoneSuccess.js +0 -17
- package/dist/components/Dropzone/index.js +0 -1
- package/dist/components/Flex/Flex.interface.js +0 -1
- package/dist/components/Flex/Flex.js +0 -12
- package/dist/components/Flex/FlexItem.js +0 -13
- package/dist/components/Flex/index.js +0 -3
- package/dist/components/Grid/Grid.interface.js +0 -1
- package/dist/components/Grid/Grid.js +0 -12
- package/dist/components/Grid/GridItem.js +0 -12
- package/dist/components/Grid/GridRow.js +0 -12
- package/dist/components/Grid/index.js +0 -4
- package/dist/components/Group/Group.appearance.js +0 -2
- package/dist/components/Group/Group.interface.js +0 -1
- package/dist/components/Group/Group.js +0 -43
- package/dist/components/Group/index.js +0 -2
- package/dist/components/HTMLContent/HTMLContent.interface.js +0 -1
- package/dist/components/HTMLContent/HTMLContent.js +0 -12
- package/dist/components/HTMLContent/index.js +0 -1
- package/dist/components/HeroTitle/HeroTitle.appearance.js +0 -5
- package/dist/components/HeroTitle/HeroTitle.interface.js +0 -1
- package/dist/components/HeroTitle/HeroTitle.js +0 -30
- package/dist/components/HeroTitle/appearance/heroTitleSize.js +0 -21
- package/dist/components/HeroTitle/index.js +0 -2
- package/dist/components/Icon/Icon.appearance.js +0 -29
- package/dist/components/Icon/Icon.interface.js +0 -1
- package/dist/components/Icon/Icon.js +0 -69
- package/dist/components/Icon/appearance/iconAccent.js +0 -16
- package/dist/components/Icon/appearance/iconDanger.js +0 -10
- package/dist/components/Icon/appearance/iconDisabled.js +0 -9
- package/dist/components/Icon/appearance/iconError.js +0 -10
- package/dist/components/Icon/appearance/iconExtra.js +0 -10
- package/dist/components/Icon/appearance/iconInfo.js +0 -15
- package/dist/components/Icon/appearance/iconShape.js +0 -25
- package/dist/components/Icon/appearance/iconSize.js +0 -171
- package/dist/components/Icon/appearance/iconSpecial.js +0 -10
- package/dist/components/Icon/appearance/iconStyle.js +0 -14
- package/dist/components/Icon/appearance/iconSuccess.js +0 -10
- package/dist/components/Icon/appearance/iconSurface.js +0 -28
- package/dist/components/Icon/appearance/iconWarning.js +0 -10
- package/dist/components/Icon/index.js +0 -2
- package/dist/components/Image/Image.interface.js +0 -1
- package/dist/components/Image/Image.js +0 -33
- package/dist/components/Image/index.js +0 -1
- package/dist/components/Input/Input.appearance.js +0 -19
- package/dist/components/Input/Input.interface.js +0 -1
- package/dist/components/Input/Input.js +0 -22
- package/dist/components/Input/appearance/inputDefault.js +0 -21
- package/dist/components/Input/appearance/inputDisabled.js +0 -17
- package/dist/components/Input/appearance/inputError.js +0 -18
- package/dist/components/Input/appearance/inputRequire.js +0 -19
- package/dist/components/Input/appearance/inputShape.js +0 -25
- package/dist/components/Input/appearance/inputSize.js +0 -31
- package/dist/components/Input/appearance/inputStyle.js +0 -16
- package/dist/components/Input/appearance/inputSuccess.js +0 -18
- package/dist/components/Input/index.js +0 -2
- package/dist/components/InputNumber/InputNumber.appearance.js +0 -11
- package/dist/components/InputNumber/InputNumber.interfaces.js +0 -1
- package/dist/components/InputNumber/InputNumber.js +0 -44
- package/dist/components/InputNumber/appearance/InputNumberShape.js +0 -25
- package/dist/components/InputNumber/appearance/inputNumberSize.js +0 -28
- package/dist/components/InputNumber/appearance/inputNumberStyle.js +0 -16
- package/dist/components/InputNumber/appearance/inputNumberSurface.js +0 -16
- package/dist/components/InputNumber/index.js +0 -2
- package/dist/components/InputPassword/InputPassword.appearance.js +0 -19
- package/dist/components/InputPassword/InputPassword.interface.js +0 -1
- package/dist/components/InputPassword/InputPassword.js +0 -31
- package/dist/components/InputPassword/appearance/inputPasswordDefault.js +0 -24
- package/dist/components/InputPassword/appearance/inputPasswordDisabled.js +0 -21
- package/dist/components/InputPassword/appearance/inputPasswordError.js +0 -21
- package/dist/components/InputPassword/appearance/inputPasswordRequire.js +0 -21
- package/dist/components/InputPassword/appearance/inputPasswordShape.js +0 -25
- package/dist/components/InputPassword/appearance/inputPasswordSize.js +0 -38
- package/dist/components/InputPassword/appearance/inputPasswordStyle.js +0 -16
- package/dist/components/InputPassword/appearance/inputPasswordSuccess.js +0 -21
- package/dist/components/InputPassword/index.js +0 -2
- package/dist/components/Label/Label.appearance.js +0 -31
- package/dist/components/Label/Label.interface.js +0 -1
- package/dist/components/Label/Label.js +0 -32
- package/dist/components/Label/appearance/labelAccent.js +0 -21
- package/dist/components/Label/appearance/labelDanger.js +0 -17
- package/dist/components/Label/appearance/labelDisabled.js +0 -10
- package/dist/components/Label/appearance/labelError.js +0 -17
- package/dist/components/Label/appearance/labelExtra.js +0 -17
- package/dist/components/Label/appearance/labelGradient.js +0 -10
- package/dist/components/Label/appearance/labelInfo.js +0 -17
- package/dist/components/Label/appearance/labelShape.js +0 -25
- package/dist/components/Label/appearance/labelSize.js +0 -59
- package/dist/components/Label/appearance/labelSpecial.js +0 -17
- package/dist/components/Label/appearance/labelStyle.js +0 -14
- package/dist/components/Label/appearance/labelSuccess.js +0 -17
- package/dist/components/Label/appearance/labelSurface.js +0 -25
- package/dist/components/Label/appearance/labelWarning.js +0 -17
- package/dist/components/Label/index.js +0 -2
- package/dist/components/Link/Link.appearance.js +0 -29
- package/dist/components/Link/Link.interface.js +0 -1
- package/dist/components/Link/Link.js +0 -50
- package/dist/components/Link/appearance/linkAccent.js +0 -15
- package/dist/components/Link/appearance/linkDanger.js +0 -7
- package/dist/components/Link/appearance/linkDisabled.js +0 -13
- package/dist/components/Link/appearance/linkError.js +0 -9
- package/dist/components/Link/appearance/linkExtra.js +0 -8
- package/dist/components/Link/appearance/linkInfo.js +0 -17
- package/dist/components/Link/appearance/linkRequire.js +0 -12
- package/dist/components/Link/appearance/linkSize.js +0 -59
- package/dist/components/Link/appearance/linkSpecial.js +0 -8
- package/dist/components/Link/appearance/linkStyle.js +0 -16
- package/dist/components/Link/appearance/linkSuccess.js +0 -9
- package/dist/components/Link/appearance/linkSurface.js +0 -23
- package/dist/components/Link/appearance/linkWarning.js +0 -9
- package/dist/components/Link/index.js +0 -2
- package/dist/components/List/List.appearance.js +0 -25
- package/dist/components/List/List.interface.js +0 -1
- package/dist/components/List/List.js +0 -22
- package/dist/components/List/ListItem.js +0 -16
- package/dist/components/List/appearance/listAccent.js +0 -8
- package/dist/components/List/appearance/listDanger.js +0 -7
- package/dist/components/List/appearance/listError.js +0 -7
- package/dist/components/List/appearance/listExtra.js +0 -7
- package/dist/components/List/appearance/listInfo.js +0 -13
- package/dist/components/List/appearance/listSize.js +0 -24
- package/dist/components/List/appearance/listSpecial.js +0 -7
- package/dist/components/List/appearance/listStyle.js +0 -16
- package/dist/components/List/appearance/listSuccess.js +0 -7
- package/dist/components/List/appearance/listSurface.js +0 -19
- package/dist/components/List/appearance/listWarning.js +0 -7
- package/dist/components/List/index.js +0 -3
- package/dist/components/Loader/Loader.appearance.js +0 -25
- package/dist/components/Loader/Loader.interface.js +0 -1
- package/dist/components/Loader/Loader.js +0 -22
- package/dist/components/Loader/appearance/loaderAccent.js +0 -13
- package/dist/components/Loader/appearance/loaderDanger.js +0 -8
- package/dist/components/Loader/appearance/loaderError.js +0 -8
- package/dist/components/Loader/appearance/loaderExtra.js +0 -8
- package/dist/components/Loader/appearance/loaderInfo.js +0 -8
- package/dist/components/Loader/appearance/loaderSize.js +0 -15
- package/dist/components/Loader/appearance/loaderSpecial.js +0 -8
- package/dist/components/Loader/appearance/loaderStyle.js +0 -14
- package/dist/components/Loader/appearance/loaderSuccess.js +0 -8
- package/dist/components/Loader/appearance/loaderSurface.js +0 -18
- package/dist/components/Loader/appearance/loaderWarning.js +0 -8
- package/dist/components/Loader/index.js +0 -2
- package/dist/components/Logo/Logo.interface.js +0 -1
- package/dist/components/Logo/Logo.js +0 -23
- package/dist/components/Logo/index.js +0 -1
- package/dist/components/MenuItem/MenuItem.appearance.js +0 -15
- package/dist/components/MenuItem/MenuItem.interface.js +0 -1
- package/dist/components/MenuItem/MenuItem.js +0 -47
- package/dist/components/MenuItem/appearance/menuItemAccent.js +0 -27
- package/dist/components/MenuItem/appearance/menuItemError.js +0 -19
- package/dist/components/MenuItem/appearance/menuItemShape.js +0 -25
- package/dist/components/MenuItem/appearance/menuItemSize.js +0 -47
- package/dist/components/MenuItem/appearance/menuItemStyle.js +0 -14
- package/dist/components/MenuItem/appearance/menuItemSurface.js +0 -45
- package/dist/components/MenuItem/index.js +0 -2
- package/dist/components/Modal/Modal.appearance.js +0 -11
- package/dist/components/Modal/Modal.interface.js +0 -1
- package/dist/components/Modal/Modal.js +0 -139
- package/dist/components/Modal/ModalLoader.js +0 -6
- package/dist/components/Modal/appearance/modalShape.js +0 -25
- package/dist/components/Modal/appearance/modalSize.js +0 -28
- package/dist/components/Modal/appearance/modalStyle.js +0 -14
- package/dist/components/Modal/appearance/modalSurface.js +0 -8
- package/dist/components/Modal/index.js +0 -4
- package/dist/components/ModalSheetBottom/ModalSheetBottom.appearance.js +0 -5
- package/dist/components/ModalSheetBottom/ModalSheetBottom.interface.js +0 -1
- package/dist/components/ModalSheetBottom/ModalSheetBottom.js +0 -38
- package/dist/components/ModalSheetBottom/appearance/modalSheetBottomSize.js +0 -9
- package/dist/components/ModalSheetBottom/index.js +0 -2
- package/dist/components/Notification/Notification.appearance.js +0 -19
- package/dist/components/Notification/Notification.interface.js +0 -1
- package/dist/components/Notification/Notification.js +0 -26
- package/dist/components/Notification/NotificationWrapper.js +0 -12
- package/dist/components/Notification/appearance/notificationDefault.js +0 -16
- package/dist/components/Notification/appearance/notificationError.js +0 -16
- package/dist/components/Notification/appearance/notificationInfo.js +0 -16
- package/dist/components/Notification/appearance/notificationShape.js +0 -25
- package/dist/components/Notification/appearance/notificationSize.js +0 -17
- package/dist/components/Notification/appearance/notificationStyle.js +0 -14
- package/dist/components/Notification/appearance/notificationSuccess.js +0 -16
- package/dist/components/Notification/appearance/notificationWarning.js +0 -16
- package/dist/components/Notification/index.js +0 -4
- package/dist/components/Overlay/Overlay.appearance.js +0 -5
- package/dist/components/Overlay/Overlay.interface.js +0 -1
- package/dist/components/Overlay/Overlay.js +0 -21
- package/dist/components/Overlay/appearance/overlayDefault.js +0 -11
- package/dist/components/Overlay/index.js +0 -2
- package/dist/components/Pagination/Pagination.appearance.js +0 -13
- package/dist/components/Pagination/Pagination.interface.js +0 -1
- package/dist/components/Pagination/Pagination.js +0 -117
- package/dist/components/Pagination/appearance/paginationAccent.js +0 -38
- package/dist/components/Pagination/appearance/paginationShape.js +0 -34
- package/dist/components/Pagination/appearance/paginationSize.js +0 -63
- package/dist/components/Pagination/appearance/paginationStyle.js +0 -14
- package/dist/components/Pagination/appearance/paginationSurface.js +0 -35
- package/dist/components/Pagination/index.js +0 -2
- package/dist/components/Radio/Radio.appearance.js +0 -19
- package/dist/components/Radio/Radio.interface.js +0 -1
- package/dist/components/Radio/Radio.js +0 -33
- package/dist/components/Radio/appearance/radioDefault.js +0 -17
- package/dist/components/Radio/appearance/radioDisabled.js +0 -14
- package/dist/components/Radio/appearance/radioError.js +0 -14
- package/dist/components/Radio/appearance/radioRequire.js +0 -14
- package/dist/components/Radio/appearance/radioShape.js +0 -25
- package/dist/components/Radio/appearance/radioSize.js +0 -18
- package/dist/components/Radio/appearance/radioStyle.js +0 -24
- package/dist/components/Radio/appearance/radioSuccess.js +0 -14
- package/dist/components/Radio/index.js +0 -2
- package/dist/components/RangeSlider/RangeSlider.interface.js +0 -1
- package/dist/components/RangeSlider/RangeSlider.js +0 -16
- package/dist/components/RangeSlider/index.js +0 -1
- package/dist/components/Response/Response.appearance.js +0 -25
- package/dist/components/Response/Response.constant.js +0 -68
- package/dist/components/Response/Response.interface.js +0 -1
- package/dist/components/Response/Response.js +0 -49
- package/dist/components/Response/appearance/responseConfirm.js +0 -15
- package/dist/components/Response/appearance/responseDanger.js +0 -15
- package/dist/components/Response/appearance/responseEmpty.js +0 -15
- package/dist/components/Response/appearance/responseError.js +0 -15
- package/dist/components/Response/appearance/responseFail.js +0 -15
- package/dist/components/Response/appearance/responseNothingFound.js +0 -15
- package/dist/components/Response/appearance/responseRefresh.js +0 -15
- package/dist/components/Response/appearance/responseStyle.js +0 -14
- package/dist/components/Response/appearance/responseSuccess.js +0 -15
- package/dist/components/Response/appearance/responseUnableLoadData.js +0 -15
- package/dist/components/Response/appearance/responseWarning.js +0 -15
- package/dist/components/Response/img/index.js +0 -25
- package/dist/components/Response/index.js +0 -5
- package/dist/components/SVGContent/SVGContent.interface.js +0 -1
- package/dist/components/SVGContent/SVGContent.js +0 -15
- package/dist/components/SVGContent/index.js +0 -1
- package/dist/components/ScrollOnDrag/ScrollOnDrag.interface.js +0 -1
- package/dist/components/ScrollOnDrag/ScrollOnDrag.js +0 -18
- package/dist/components/ScrollOnDrag/index.js +0 -1
- package/dist/components/ScrollToView/ScrollToView.interface.js +0 -1
- package/dist/components/ScrollToView/ScrollToView.js +0 -15
- package/dist/components/ScrollToView/index.js +0 -1
- package/dist/components/Scrollbar/Scrollbar.interface.js +0 -1
- package/dist/components/Scrollbar/Scrollbar.js +0 -22
- package/dist/components/Scrollbar/index.js +0 -1
- package/dist/components/Search/Search.appearance.js +0 -19
- package/dist/components/Search/Search.interface.js +0 -1
- package/dist/components/Search/SearchInput.js +0 -42
- package/dist/components/Search/SearchResult.js +0 -12
- package/dist/components/Search/appearance/searchDefault.js +0 -23
- package/dist/components/Search/appearance/searchDisabled.js +0 -13
- package/dist/components/Search/appearance/searchError.js +0 -13
- package/dist/components/Search/appearance/searchRequire.js +0 -13
- package/dist/components/Search/appearance/searchShape.js +0 -25
- package/dist/components/Search/appearance/searchSize.js +0 -46
- package/dist/components/Search/appearance/searchStyle.js +0 -17
- package/dist/components/Search/appearance/searchSuccess.js +0 -12
- package/dist/components/Search/index.js +0 -4
- package/dist/components/Segmented/Segmented.appearance.js +0 -21
- package/dist/components/Segmented/Segmented.interface.js +0 -1
- package/dist/components/Segmented/Segmented.js +0 -53
- package/dist/components/Segmented/appearance/segmentedDefault.js +0 -29
- package/dist/components/Segmented/appearance/segmentedDisabled.js +0 -12
- package/dist/components/Segmented/appearance/segmentedError.js +0 -14
- package/dist/components/Segmented/appearance/segmentedRequire.js +0 -15
- package/dist/components/Segmented/appearance/segmentedShape.js +0 -25
- package/dist/components/Segmented/appearance/segmentedSize.js +0 -28
- package/dist/components/Segmented/appearance/segmentedStyle.js +0 -16
- package/dist/components/Segmented/appearance/segmentedSuccess.js +0 -13
- package/dist/components/Segmented/appearance/segmentedWarning.js +0 -14
- package/dist/components/Segmented/index.js +0 -2
- package/dist/components/Select/Select.appearance.js +0 -19
- package/dist/components/Select/Select.interface.js +0 -1
- package/dist/components/Select/SelectClearIndicator.js +0 -9
- package/dist/components/Select/SelectContainer.js +0 -100
- package/dist/components/Select/SelectControl.js +0 -9
- package/dist/components/Select/SelectDropdownIndicator.js +0 -9
- package/dist/components/Select/SelectGroupHeading.js +0 -9
- package/dist/components/Select/SelectIndicatorsContainer.js +0 -13
- package/dist/components/Select/SelectInput.js +0 -8
- package/dist/components/Select/SelectLoadingIndicator.js +0 -7
- package/dist/components/Select/SelectLoadingMessage.js +0 -8
- package/dist/components/Select/SelectMenu.js +0 -9
- package/dist/components/Select/SelectMultiValue.js +0 -18
- package/dist/components/Select/SelectMultiValueContainer.js +0 -9
- package/dist/components/Select/SelectMultiValueLabel.js +0 -8
- package/dist/components/Select/SelectMultiValueRemove.js +0 -8
- package/dist/components/Select/SelectNoOptions.js +0 -12
- package/dist/components/Select/SelectOption.js +0 -26
- package/dist/components/Select/SelectOverflowBadge.js +0 -9
- package/dist/components/Select/SelectPlaceholder.js +0 -8
- package/dist/components/Select/SelectSingleValue.js +0 -11
- package/dist/components/Select/SelectValueContainer.js +0 -7
- package/dist/components/Select/appearance/selectDefault.js +0 -37
- package/dist/components/Select/appearance/selectDisabled.js +0 -28
- package/dist/components/Select/appearance/selectError.js +0 -37
- package/dist/components/Select/appearance/selectRequire.js +0 -37
- package/dist/components/Select/appearance/selectShape.js +0 -27
- package/dist/components/Select/appearance/selectSize.js +0 -116
- package/dist/components/Select/appearance/selectStyle.js +0 -17
- package/dist/components/Select/appearance/selectSuccess.js +0 -37
- package/dist/components/Select/index.js +0 -16
- package/dist/components/Swiper/Swiper.interface.js +0 -1
- package/dist/components/Swiper/Swiper.js +0 -73
- package/dist/components/Swiper/index.js +0 -1
- package/dist/components/Switch/Switch.appearance.js +0 -17
- package/dist/components/Switch/Switch.interface.js +0 -1
- package/dist/components/Switch/Switch.js +0 -31
- package/dist/components/Switch/appearance/switchDefault.js +0 -11
- package/dist/components/Switch/appearance/switchDisabled.js +0 -11
- package/dist/components/Switch/appearance/switchError.js +0 -11
- package/dist/components/Switch/appearance/switchRequire.js +0 -11
- package/dist/components/Switch/appearance/switchSize.js +0 -18
- package/dist/components/Switch/appearance/switchStyle.js +0 -16
- package/dist/components/Switch/appearance/switchSuccess.js +0 -11
- package/dist/components/Switch/index.js +0 -2
- package/dist/components/Tab/Tab.appearance.js +0 -15
- package/dist/components/Tab/Tab.interface.js +0 -1
- package/dist/components/Tab/Tab.js +0 -34
- package/dist/components/Tab/TabGroup.js +0 -14
- package/dist/components/Tab/appearance/tabError.js +0 -13
- package/dist/components/Tab/appearance/tabSize.js +0 -44
- package/dist/components/Tab/appearance/tabStyle.js +0 -16
- package/dist/components/Tab/appearance/tabSuccess.js +0 -13
- package/dist/components/Tab/appearance/tabSurface.js +0 -64
- package/dist/components/Tab/appearance/tabWarning.js +0 -12
- package/dist/components/Tab/index.js +0 -3
- package/dist/components/Text/Text.appearance.js +0 -5
- package/dist/components/Text/Text.interface.js +0 -1
- package/dist/components/Text/Text.js +0 -35
- package/dist/components/Text/appearance/textSize.js +0 -24
- package/dist/components/Text/index.js +0 -2
- package/dist/components/Textarea/Textarea.appearance.js +0 -19
- package/dist/components/Textarea/Textarea.interface.js +0 -1
- package/dist/components/Textarea/Textarea.js +0 -20
- package/dist/components/Textarea/appearance/textareaDefault.js +0 -33
- package/dist/components/Textarea/appearance/textareaDisabled.js +0 -18
- package/dist/components/Textarea/appearance/textareaError.js +0 -18
- package/dist/components/Textarea/appearance/textareaRequire.js +0 -18
- package/dist/components/Textarea/appearance/textareaShape.js +0 -25
- package/dist/components/Textarea/appearance/textareaSize.js +0 -31
- package/dist/components/Textarea/appearance/textareaStyle.js +0 -16
- package/dist/components/Textarea/appearance/textareaSuccess.js +0 -19
- package/dist/components/Textarea/index.js +0 -2
- package/dist/components/Tile/Tile.appearance.js +0 -11
- package/dist/components/Tile/Tile.interface.js +0 -1
- package/dist/components/Tile/Tile.js +0 -26
- package/dist/components/Tile/appearance/tileShape.js +0 -25
- package/dist/components/Tile/appearance/tileSize.js +0 -51
- package/dist/components/Tile/appearance/tileStyle.js +0 -14
- package/dist/components/Tile/appearance/tileSurface.js +0 -35
- package/dist/components/Tile/index.js +0 -2
- package/dist/components/Title/Title.appearance.js +0 -29
- package/dist/components/Title/Title.interface.js +0 -1
- package/dist/components/Title/Title.js +0 -43
- package/dist/components/Title/appearance/titleAccent.js +0 -11
- package/dist/components/Title/appearance/titleDanger.js +0 -7
- package/dist/components/Title/appearance/titleDisabled.js +0 -16
- package/dist/components/Title/appearance/titleError.js +0 -9
- package/dist/components/Title/appearance/titleExtra.js +0 -8
- package/dist/components/Title/appearance/titleInfo.js +0 -11
- package/dist/components/Title/appearance/titleRequire.js +0 -16
- package/dist/components/Title/appearance/titleSize.js +0 -45
- package/dist/components/Title/appearance/titleSpecial.js +0 -7
- package/dist/components/Title/appearance/titleStyle.js +0 -11
- package/dist/components/Title/appearance/titleSuccess.js +0 -7
- package/dist/components/Title/appearance/titleSurface.js +0 -19
- package/dist/components/Title/appearance/titleWarning.js +0 -9
- package/dist/components/Title/index.js +0 -2
- package/dist/components/Tooltip/Tooltip.appearance.js +0 -19
- package/dist/components/Tooltip/Tooltip.interface.js +0 -1
- package/dist/components/Tooltip/Tooltip.js +0 -68
- package/dist/components/Tooltip/appearance/tooltipDefault.js +0 -10
- package/dist/components/Tooltip/appearance/tooltipDisabled.js +0 -9
- package/dist/components/Tooltip/appearance/tooltipError.js +0 -10
- package/dist/components/Tooltip/appearance/tooltipRequire.js +0 -10
- package/dist/components/Tooltip/appearance/tooltipShape.js +0 -25
- package/dist/components/Tooltip/appearance/tooltipSize.js +0 -18
- package/dist/components/Tooltip/appearance/tooltipStyle.js +0 -14
- package/dist/components/Tooltip/appearance/tooltipSuccess.js +0 -10
- package/dist/components/Tooltip/index.js +0 -2
- package/dist/components/Video/Video.interface.js +0 -1
- package/dist/components/Video/Video.js +0 -9
- package/dist/components/Video/index.js +0 -1
- package/dist/components/Warning/Warning.appearance.js +0 -17
- package/dist/components/Warning/Warning.interface.js +0 -1
- package/dist/components/Warning/Warning.js +0 -25
- package/dist/components/Warning/appearance/warningAccent.js +0 -24
- package/dist/components/Warning/appearance/warningError.js +0 -24
- package/dist/components/Warning/appearance/warningInfo.js +0 -24
- package/dist/components/Warning/appearance/warningShape.js +0 -25
- package/dist/components/Warning/appearance/warningSize.js +0 -11
- package/dist/components/Warning/appearance/warningStyle.js +0 -14
- package/dist/components/Warning/appearance/warningWarning.js +0 -24
- package/dist/components/Warning/index.js +0 -2
- package/dist/config/forms/datepicker.js +0 -18
- package/dist/config/forms/index.js +0 -3
- package/dist/config/forms/input.js +0 -17
- package/dist/context/Notifications.interface.js +0 -1
- package/dist/context/index.js +0 -2
- package/dist/hooks/index.helpers.js +0 -6
- package/dist/hooks/useActiveClasses/index.js +0 -2
- package/dist/hooks/useAppearanceConfig/index.js +0 -1
- package/dist/hooks/useDevicePropsGenerator/index.js +0 -1
- package/dist/hooks/useMediaQueries/index.js +0 -1
- package/dist/hooks/useMediaQueries/mediaQueries.json +0 -19
- package/dist/hooks/useStyles/index.js +0 -1
- package/dist/types/index.js +0 -1
- package/dist/types/utils.js +0 -1
- package/dist/utils/index.js +0 -3
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import React, { startTransition, useCallback, useEffect, useImperativeHandle, useLayoutEffect, useRef, useState, } from 'react';
|
|
3
|
-
import clsx from 'clsx';
|
|
4
|
-
import ReactDOM from 'react-dom';
|
|
5
|
-
import { icons24 } from '@itcase/icons/default';
|
|
6
|
-
import { mergeAppearanceKeys } from 'src/utils';
|
|
7
|
-
import { useAppearanceConfig } from 'src/hooks/useAppearanceConfig';
|
|
8
|
-
import { useDevicePropsGenerator } from 'src/hooks/useDevicePropsGenerator';
|
|
9
|
-
import { useStyles } from 'src/hooks/useStyles';
|
|
10
|
-
import { Icon } from 'src/components/Icon';
|
|
11
|
-
import { Overlay } from 'src/components/Overlay';
|
|
12
|
-
import { Title } from 'src/components/Title';
|
|
13
|
-
import { modalAppearance } from './Modal.appearance';
|
|
14
|
-
const modalConfig = {
|
|
15
|
-
appearance: modalAppearance,
|
|
16
|
-
setAppearance: (appearanceConfig) => {
|
|
17
|
-
modalConfig.appearance = appearanceConfig;
|
|
18
|
-
},
|
|
19
|
-
};
|
|
20
|
-
const getOrCreateModalElement = (modalIdQuerySelector, className = '') => {
|
|
21
|
-
// prettier-ignore
|
|
22
|
-
const classList = className && typeof className === 'string'
|
|
23
|
-
? className.split(' ').filter(Boolean)
|
|
24
|
-
: [];
|
|
25
|
-
let modalElement = document.getElementById(modalIdQuerySelector);
|
|
26
|
-
if (!modalElement) {
|
|
27
|
-
// Add modal element into the DOM on mount.
|
|
28
|
-
modalElement = document.createElement('div');
|
|
29
|
-
modalElement.setAttribute('id', modalIdQuerySelector);
|
|
30
|
-
modalElement.classList.add('modal');
|
|
31
|
-
if (classList.length) {
|
|
32
|
-
modalElement.classList.add(...classList);
|
|
33
|
-
}
|
|
34
|
-
document.body.prepend(modalElement);
|
|
35
|
-
}
|
|
36
|
-
return modalElement;
|
|
37
|
-
};
|
|
38
|
-
// Modal component that is an abstraction around the portal API.
|
|
39
|
-
const Modal = React.forwardRef(function Modal(props, ref) {
|
|
40
|
-
const { id, appearance, className, dataTestId, dataTour, title, absoluteHeader = false, modalIdQuerySelector = 'modal-global', print, scroll = false, stickyHeader = false, before, after, closeIcon = true, isDisabled, isSkeleton, isCloseOnBlur = true, isOpen: initialIsOpen = false, isOverlay = true, isScrollOnOpen = true, isSetFocusOnOpen = true, onClickOverlay, onCloseModal, onOpenModal, children, } = props;
|
|
41
|
-
// Query DOM element
|
|
42
|
-
const [modalElement, setModalElement] = useState(null);
|
|
43
|
-
const [isOpen, setIsOpen] = useState(initialIsOpen);
|
|
44
|
-
const modalContentRef = useRef(null);
|
|
45
|
-
const addModalProps = useCallback((element) => {
|
|
46
|
-
if (isOpen) {
|
|
47
|
-
element.classList.add('modal_state_visible');
|
|
48
|
-
if (isScrollOnOpen) {
|
|
49
|
-
element.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
|
50
|
-
}
|
|
51
|
-
if (isSetFocusOnOpen) {
|
|
52
|
-
setTimeout(() => {
|
|
53
|
-
if (modalContentRef.current) {
|
|
54
|
-
modalContentRef.current.focus();
|
|
55
|
-
}
|
|
56
|
-
}, 0);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
else if (!element.children.length) {
|
|
60
|
-
element.classList.remove('modal_state_visible');
|
|
61
|
-
}
|
|
62
|
-
}, [isOpen, isScrollOnOpen, isSetFocusOnOpen]);
|
|
63
|
-
const openModal = useCallback(() => {
|
|
64
|
-
startTransition(() => {
|
|
65
|
-
setIsOpen(true);
|
|
66
|
-
});
|
|
67
|
-
if (typeof onOpenModal === 'function') {
|
|
68
|
-
onOpenModal();
|
|
69
|
-
}
|
|
70
|
-
}, [onOpenModal]);
|
|
71
|
-
const closeModal = useCallback((event) => {
|
|
72
|
-
if (event) {
|
|
73
|
-
const hasRelatedTarget = event.relatedTarget &&
|
|
74
|
-
modalElement &&
|
|
75
|
-
modalElement.contains(event.relatedTarget);
|
|
76
|
-
if (hasRelatedTarget) {
|
|
77
|
-
return event;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
setIsOpen(false);
|
|
81
|
-
onCloseModal && onCloseModal();
|
|
82
|
-
}, [modalElement, onCloseModal]);
|
|
83
|
-
const handleClickOverlay = useCallback((event) => {
|
|
84
|
-
if (isCloseOnBlur) {
|
|
85
|
-
closeModal();
|
|
86
|
-
}
|
|
87
|
-
onClickOverlay && onClickOverlay(event);
|
|
88
|
-
}, [closeModal, isCloseOnBlur, onClickOverlay]);
|
|
89
|
-
useEffect(() => {
|
|
90
|
-
if (!modalElement) {
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
addModalProps(modalElement);
|
|
94
|
-
}, [isOpen]); // eslint-disable-line
|
|
95
|
-
useLayoutEffect(() => {
|
|
96
|
-
let classNameModal = className;
|
|
97
|
-
if (!print) {
|
|
98
|
-
classNameModal = clsx(className, 'no-print');
|
|
99
|
-
}
|
|
100
|
-
const element = getOrCreateModalElement(modalIdQuerySelector, classNameModal);
|
|
101
|
-
// eslint-disable-next-line react-hooks/set-state-in-effect
|
|
102
|
-
setModalElement(element);
|
|
103
|
-
if (element) {
|
|
104
|
-
addModalProps(element);
|
|
105
|
-
}
|
|
106
|
-
}, [addModalProps, className, modalIdQuerySelector, print]);
|
|
107
|
-
useEffect(() => {
|
|
108
|
-
if (!isCloseOnBlur || !isOpen) {
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
const handleClickOutside = (event) => {
|
|
112
|
-
const target = event.target;
|
|
113
|
-
if (!modalElement || !target || !target.isConnected) {
|
|
114
|
-
return;
|
|
115
|
-
}
|
|
116
|
-
const isOutside = !modalElement.contains(target);
|
|
117
|
-
if (isOutside) {
|
|
118
|
-
setIsOpen(false);
|
|
119
|
-
onCloseModal && onCloseModal();
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
window.addEventListener('click', handleClickOutside);
|
|
123
|
-
return () => {
|
|
124
|
-
window.removeEventListener('click', handleClickOutside);
|
|
125
|
-
};
|
|
126
|
-
}, [onCloseModal, isCloseOnBlur, isOpen, modalElement]);
|
|
127
|
-
useImperativeHandle(ref, () => ({ modalElement, openModal, closeModal, isOpen }), [isOpen, openModal, closeModal, modalElement]);
|
|
128
|
-
const appearanceConfig = useAppearanceConfig(appearance, modalConfig, isDisabled);
|
|
129
|
-
const propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
130
|
-
const { fillClass, titleTextColor, titleTextColorHover, titleTextSize, titleTextTruncate, titleTextWeight, titleTextWidth, titleTextWrap, borderColorClass, borderTypeClass, borderWidthClass, elevationClass, overlayFill, overlayOpacity, shapeClass, shapeStrengthClass, sizeClass, closeIconAppearance, closeIconAppearanceSize, closeIconFillSize, closeIconImage, closeIconShape, closeIconSize, } = propsGenerator;
|
|
131
|
-
const { styles: modalStyles } = useStyles(props);
|
|
132
|
-
return (modalElement &&
|
|
133
|
-
ReactDOM.createPortal(isOpen ? (_jsxs(React.Fragment, { children: [_jsxs("div", { id: id, className: clsx('modal__content', absoluteHeader && 'modal__content-absolute-header', !title && !closeIcon && 'modal__content-no-header', fillClass && `fill_${fillClass}`, borderWidthClass && `border-width_${borderWidthClass}`, borderColorClass && `border-color_${borderColorClass}`, borderTypeClass && `border_type_${borderTypeClass}`, shapeClass && `shape_${shapeClass}`, sizeClass && `modal_size_${sizeClass}`, shapeStrengthClass && `shape-strength_${shapeStrengthClass}`, borderColorClass && `border-color_${borderColorClass}`, borderWidthClass && `border-width_${borderWidthClass}`, borderTypeClass && `border_type_${borderTypeClass}`, elevationClass && `elevation_${elevationClass}`, scroll && `modal-scroll_${scroll}`, stickyHeader && 'modal-scroll_header_sticky', isSkeleton && 'modal_skeleton'), ref: modalContentRef, "data-testid": dataTestId, "data-tour": dataTour, style: modalStyles, tabIndex: 0, children: [before, (title || closeIcon) && (_jsxs("div", { className: clsx('modal__header', fillClass && `fill_${fillClass}`), children: [title && (_jsx(Title, { width: titleTextWidth, flex: "1", size: titleTextSize, textColor: titleTextColor, textColorHover: titleTextColorHover, textTruncate: titleTextTruncate, textWeight: titleTextWeight, textWrap: titleTextWrap, children: title })), closeIcon && (_jsx("div", { className: "modal__close", onClick: closeModal, children: _jsx(Icon, { appearance: mergeAppearanceKeys(closeIconAppearance, closeIconAppearanceSize), fillSize: closeIconFillSize, iconSize: closeIconSize, shape: closeIconShape, SvgImage: closeIconImage ?? icons24.Action.Close }) }))] })), _jsx("div", { className: "modal__content-wrapper", children: children }), after] }), _jsx(Overlay, { className: "modal__overlay",
|
|
134
|
-
// ref={modalOverlayRef}
|
|
135
|
-
fill: overlayFill, opacity: overlayOpacity, isOverlay: isOverlay, onClick: handleClickOverlay })] })) : null,
|
|
136
|
-
// A DOM element
|
|
137
|
-
modalElement));
|
|
138
|
-
});
|
|
139
|
-
export { Modal, modalConfig };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Loader } from 'src/components/Loader';
|
|
3
|
-
function ModalLoader() {
|
|
4
|
-
return (_jsx("div", { className: "modal-loading", children: _jsx("div", { className: "modal-loading__inner", children: _jsx(Loader, {}) }) }));
|
|
5
|
-
}
|
|
6
|
-
export { ModalLoader };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
const modalAppearanceShape = {
|
|
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 { modalAppearanceShape };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { icons24, icons32, icons40 } from '@itcase/icons/default';
|
|
2
|
-
const modalAppearanceSize = {
|
|
3
|
-
sizeXL: {
|
|
4
|
-
size: 'xl',
|
|
5
|
-
titleTextSize: 'h2',
|
|
6
|
-
closeIconAppearanceSize: 'size48_40',
|
|
7
|
-
closeIconImage: icons40.Action.Close,
|
|
8
|
-
},
|
|
9
|
-
sizeL: {
|
|
10
|
-
size: 'l',
|
|
11
|
-
titleTextSize: 'h3',
|
|
12
|
-
closeIconAppearanceSize: 'size40_32',
|
|
13
|
-
closeIconImage: icons32.Action.Close,
|
|
14
|
-
},
|
|
15
|
-
sizeM: {
|
|
16
|
-
size: 'm',
|
|
17
|
-
titleTextSize: 'h4',
|
|
18
|
-
closeIconAppearanceSize: 'size24_24',
|
|
19
|
-
closeIconImage: icons24.Action.Close,
|
|
20
|
-
},
|
|
21
|
-
sizeS: {
|
|
22
|
-
size: 's',
|
|
23
|
-
titleTextSize: 'h5',
|
|
24
|
-
closeIconAppearanceSize: 'size24_24',
|
|
25
|
-
closeIconImage: icons24.Action.Close,
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
export { modalAppearanceSize };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import React, { useCallback, useImperativeHandle, useState } from 'react';
|
|
3
|
-
import clsx from 'clsx';
|
|
4
|
-
import { Sheet } from 'react-modal-sheet';
|
|
5
|
-
import { useAppearanceConfig } from 'src/hooks/useAppearanceConfig';
|
|
6
|
-
import { useDevicePropsGenerator } from 'src/hooks/useDevicePropsGenerator';
|
|
7
|
-
import { useStyles } from 'src/hooks/useStyles';
|
|
8
|
-
import { Title } from 'src/components/Title';
|
|
9
|
-
import { modalSheetBottomAppearance } from './ModalSheetBottom.appearance';
|
|
10
|
-
const modalSheetBottomConfig = {
|
|
11
|
-
appearance: modalSheetBottomAppearance,
|
|
12
|
-
setAppearance: (appearanceConfig) => {
|
|
13
|
-
modalSheetBottomConfig.appearance = appearanceConfig;
|
|
14
|
-
},
|
|
15
|
-
};
|
|
16
|
-
const ModalSheetBottom = React.forwardRef(function Modal(props, ref) {
|
|
17
|
-
const { appearance, dataTestId, dataTour, initialIsOpen, title, closeButton, isDisabled, onCloseModalSheetBottom, onOpenModalSheetBottom, children, } = props;
|
|
18
|
-
const [isOpen, setIsOpen] = useState(initialIsOpen);
|
|
19
|
-
const openModalSheetBottom = useCallback(() => {
|
|
20
|
-
setIsOpen(true);
|
|
21
|
-
onOpenModalSheetBottom && onOpenModalSheetBottom();
|
|
22
|
-
}, [onOpenModalSheetBottom]);
|
|
23
|
-
const closeModalSheetBottom = useCallback(() => {
|
|
24
|
-
setIsOpen(false);
|
|
25
|
-
onCloseModalSheetBottom && onCloseModalSheetBottom();
|
|
26
|
-
}, [onCloseModalSheetBottom]);
|
|
27
|
-
useImperativeHandle(ref, () => ({
|
|
28
|
-
openModal: openModalSheetBottom,
|
|
29
|
-
closeModal: closeModalSheetBottom,
|
|
30
|
-
isOpen: isOpen,
|
|
31
|
-
}), [isOpen, openModalSheetBottom, closeModalSheetBottom]);
|
|
32
|
-
const appearanceConfig = useAppearanceConfig(appearance, modalSheetBottomConfig, isDisabled);
|
|
33
|
-
const propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
34
|
-
const { titleTextColor, titleTextColorHover, titleTextSize, titleTextTruncate, titleTextWeight, titleTextWidth, titleTextWrap, zeroPadding, } = propsGenerator;
|
|
35
|
-
const { styles } = useStyles(props);
|
|
36
|
-
return (_jsxs(Sheet, { ...props, className: "modal-sheet-bottom", "data-testid": dataTestId, "data-tour": dataTour, isOpen: isOpen, onClose: closeModalSheetBottom, children: [_jsxs(Sheet.Container, { className: "modal-sheet-bottom__container", style: styles, children: [_jsx(Sheet.Header, { className: "modal-sheet-bottom__header", children: closeButton && (_jsx("div", { className: "modal-sheet-bottom__close", onClick: closeModalSheetBottom, children: closeButton })) }), _jsx(Sheet.Content, { className: "modal-sheet-bottom__content", children: _jsxs("div", { className: clsx('modal-sheet-bottom__content-wrapper', zeroPadding && 'modal-sheet-bottom__content-reset-padding'), children: [title && (_jsx(Title, { className: "modal__title", width: titleTextWidth, size: titleTextSize, textColor: titleTextColor, textColorHover: titleTextColorHover, textTruncate: titleTextTruncate, textWeight: titleTextWeight, textWrap: titleTextWrap, children: title })), children] }) })] }), _jsx(Sheet.Backdrop, { className: "modal-sheet-bottom__backdrop", onClick: closeModalSheetBottom })] }));
|
|
37
|
-
});
|
|
38
|
-
export { ModalSheetBottom };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { notificationAppearanceDefault } from './appearance/notificationDefault';
|
|
2
|
-
import { notificationAppearanceError } from './appearance/notificationError';
|
|
3
|
-
import { notificationAppearanceInfo } from './appearance/notificationInfo';
|
|
4
|
-
import { notificationAppearanceShape } from './appearance/notificationShape';
|
|
5
|
-
import { notificationAppearanceSize } from './appearance/notificationSize';
|
|
6
|
-
import { notificationAppearanceStyle } from './appearance/notificationStyle';
|
|
7
|
-
import { notificationAppearanceSuccess } from './appearance/notificationSuccess';
|
|
8
|
-
import { notificationAppearanceWarning } from './appearance/notificationWarning';
|
|
9
|
-
const notificationAppearance = {
|
|
10
|
-
...notificationAppearanceDefault,
|
|
11
|
-
...notificationAppearanceShape,
|
|
12
|
-
...notificationAppearanceSize,
|
|
13
|
-
...notificationAppearanceStyle,
|
|
14
|
-
...notificationAppearanceError,
|
|
15
|
-
...notificationAppearanceInfo,
|
|
16
|
-
...notificationAppearanceSuccess,
|
|
17
|
-
...notificationAppearanceWarning,
|
|
18
|
-
};
|
|
19
|
-
export { notificationAppearance };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import clsx from 'clsx';
|
|
3
|
-
import { Button } from 'src/components/Button';
|
|
4
|
-
import { Icon } from 'src/components/Icon';
|
|
5
|
-
import { Loader } from 'src/components/Loader';
|
|
6
|
-
import { Text } from 'src/components/Text';
|
|
7
|
-
import { useAppearanceConfig } from 'src/hooks/useAppearanceConfig';
|
|
8
|
-
import { useDevicePropsGenerator } from 'src/hooks/useDevicePropsGenerator';
|
|
9
|
-
import { useStyles } from 'src/hooks/useStyles';
|
|
10
|
-
import { mergeAppearanceKeys } from 'src/utils';
|
|
11
|
-
import { notificationAppearance } from './Notification.appearance';
|
|
12
|
-
const notificationConfig = {
|
|
13
|
-
appearance: notificationAppearance,
|
|
14
|
-
setAppearance: (appearanceConfig) => {
|
|
15
|
-
notificationConfig.appearance = appearanceConfig;
|
|
16
|
-
},
|
|
17
|
-
};
|
|
18
|
-
function Notification(props) {
|
|
19
|
-
const { id, appearance, className, dataTestId, dataTour, type = 'float', title, text, before, after, isSkeleton, isLoading, onClickButton, onClickClose, } = props;
|
|
20
|
-
const appearanceConfig = useAppearanceConfig(appearance, notificationConfig);
|
|
21
|
-
const propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
22
|
-
const { fillClass, fillHoverClass, titleTextColor, titleTextSize, descTextColor, descTextSize, buttonAppearance, buttonLabel, elevationClass, loaderAppearance, loaderAppearanceSize, loaderFill, loaderItemFill, loaderSize, loaderType = 'dot', shapeClass, shapeStrengthClass, sizeClass, widthClass, closeIcon, closeIconAppearance, closeIconAppearanceSize, closeIconSrc, } = propsGenerator;
|
|
23
|
-
const { styles: notificationStyles } = useStyles(props);
|
|
24
|
-
return (_jsxs("div", { className: clsx('notification__item', `notification__item_${type}`, widthClass && `width_${widthClass}`, elevationClass && `elevation_${elevationClass}`, fillClass && `fill_${fillClass}`, sizeClass && `notification__item_size_${sizeClass}`, type && `notification__item_type_${type}`, fillHoverClass && `fill_${fillHoverClass}`, isSkeleton && `notification__item_skeleton`, shapeClass && `shape_${shapeClass}`, shapeStrengthClass && `shape-strength_${shapeStrengthClass}`), "data-testid": dataTestId, "data-tour": dataTour, style: notificationStyles, children: [before, _jsxs("div", { className: clsx(className, 'notification__item-wrapper'), children: [title && (_jsx(Text, { className: "notification__item-title", size: titleTextSize, textColor: titleTextColor, children: title })), text && (_jsx(Text, { className: "notification__item-text", size: descTextSize, textColor: descTextColor, children: text })), isLoading && (_jsx(Loader, { appearance: mergeAppearanceKeys(loaderAppearance, loaderAppearanceSize), className: clsx(className, 'button__loader'), type: loaderType, size: loaderSize, fill: loaderFill, itemFill: loaderItemFill })), onClickClose && (_jsx(Icon, { appearance: mergeAppearanceKeys(closeIconAppearance, closeIconAppearanceSize), className: clsx('notification__item-close', 'cursor_type_pointer'), imageSrc: closeIconSrc, SvgImage: closeIcon, onClick: () => onClickClose && onClickClose(id) })), onClickButton && buttonLabel && (_jsx(Button, { appearance: buttonAppearance, className: "notification__item-button", width: "fill", label: buttonLabel, onClick: onClickButton }))] }), after] }));
|
|
25
|
-
}
|
|
26
|
-
export { Notification, notificationConfig };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
// import React from 'react'
|
|
3
|
-
import clsx from 'clsx';
|
|
4
|
-
import { useNotifications, useNotificationsAPI } from 'src/context';
|
|
5
|
-
import { Notification } from './Notification';
|
|
6
|
-
function NotificationWrapper(props) {
|
|
7
|
-
const notifications = useNotifications();
|
|
8
|
-
const { hideNotifications } = useNotificationsAPI();
|
|
9
|
-
const { className, dataTestId, dataTour } = props;
|
|
10
|
-
return (_jsx("div", { className: clsx('notification', className), "data-testid": dataTestId, "data-tour": dataTour, children: _jsx("div", { className: "notification__wrapper", children: notifications.map((notification) => (_jsx(Notification, { id: notification.id, appearance: notification.appearance, type: notification.type, title: notification.title, status: notification.status, text: notification.text, buttonLabel: notification.buttonLabel, after: notification.after, closeIcon: notification.closeIcon, closeIconSrc: notification.closeIconSrc, isLoading: notification.isLoading, onClickButton: notification.onClickButton, onClickClose: hideNotifications }, notification.id))) }) }));
|
|
11
|
-
}
|
|
12
|
-
export { NotificationWrapper };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { icons24 } from '@itcase/icons/default';
|
|
2
|
-
const notificationAppearanceDefault = {
|
|
3
|
-
defaultPrimary: {
|
|
4
|
-
fill: 'surfacePrimary',
|
|
5
|
-
fillHover: 'surfacePrimary',
|
|
6
|
-
titleTextColor: 'surfaceTextPrimary',
|
|
7
|
-
descTextColor: 'surfaceTextPrimary',
|
|
8
|
-
borderColor: 'surfaceBorderPrimary',
|
|
9
|
-
textColor: 'surfaceTextPrimary',
|
|
10
|
-
buttonAppearance: 'accentPrimary sizeXXL solid rounded',
|
|
11
|
-
loaderAppearance: 'accentTertiary sizeS ghost rounded',
|
|
12
|
-
closeIcon: icons24.Action.Close,
|
|
13
|
-
closeIconAppearance: 'surfacePrimary ghost circular',
|
|
14
|
-
},
|
|
15
|
-
};
|
|
16
|
-
export { notificationAppearanceDefault };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { icons24 } from '@itcase/icons/default';
|
|
2
|
-
const notificationAppearanceError = {
|
|
3
|
-
errorPrimary: {
|
|
4
|
-
fill: 'errorPrimary',
|
|
5
|
-
fillHover: 'errorPrimary',
|
|
6
|
-
titleTextColor: 'errorTextPrimary',
|
|
7
|
-
descTextColor: 'errorTextPrimary',
|
|
8
|
-
borderColor: 'errorBorderPrimary',
|
|
9
|
-
textColor: 'errorTextPrimary',
|
|
10
|
-
buttonAppearance: 'surfacePrimary sizeXXL solid rounded',
|
|
11
|
-
loaderAppearance: 'errorPrimary sizeS solid rounded',
|
|
12
|
-
closeIcon: icons24.Action.Close,
|
|
13
|
-
closeIconAppearance: 'surfacePrimary solid circular',
|
|
14
|
-
},
|
|
15
|
-
};
|
|
16
|
-
export { notificationAppearanceError };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { icons24 } from '@itcase/icons/default';
|
|
2
|
-
const notificationAppearanceInfo = {
|
|
3
|
-
infoPrimary: {
|
|
4
|
-
fill: 'infoPrimary',
|
|
5
|
-
fillHover: 'infoPrimary',
|
|
6
|
-
titleTextColor: 'infoTextPrimary',
|
|
7
|
-
descTextColor: 'infoTextPrimary',
|
|
8
|
-
borderColor: 'infoBorderPrimary',
|
|
9
|
-
textColor: 'infoTextPrimary',
|
|
10
|
-
buttonAppearance: 'surfacePrimary sizeXXL solid rounded',
|
|
11
|
-
loaderAppearance: 'infoPrimary sizeS solid rounded',
|
|
12
|
-
closeIcon: icons24.Action.Close,
|
|
13
|
-
closeIconAppearance: 'surfacePrimary solid circular',
|
|
14
|
-
},
|
|
15
|
-
};
|
|
16
|
-
export { notificationAppearanceInfo };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
const notificationAppearanceShape = {
|
|
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 { notificationAppearanceShape };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
const notificationAppearanceSize = {
|
|
2
|
-
sizeM: {
|
|
3
|
-
size: 'm',
|
|
4
|
-
titleTextSize: 'xxl',
|
|
5
|
-
descTextSize: 'm',
|
|
6
|
-
loaderAppearanceSize: 'sizeS',
|
|
7
|
-
closeIconAppearanceSize: 'size24_24',
|
|
8
|
-
},
|
|
9
|
-
sizeS: {
|
|
10
|
-
size: 'm',
|
|
11
|
-
titleTextSize: 'xl',
|
|
12
|
-
descTextSize: 'm',
|
|
13
|
-
loaderAppearanceSize: 'sizeS',
|
|
14
|
-
closeIconAppearanceSize: 'size24_24',
|
|
15
|
-
},
|
|
16
|
-
};
|
|
17
|
-
export { notificationAppearanceSize };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { icons24 } from '@itcase/icons/default';
|
|
2
|
-
const notificationAppearanceSuccess = {
|
|
3
|
-
successPrimary: {
|
|
4
|
-
fill: 'successPrimary',
|
|
5
|
-
fillHover: 'successPrimary',
|
|
6
|
-
titleTextColor: 'successTextPrimary',
|
|
7
|
-
descTextColor: 'successTextPrimary',
|
|
8
|
-
borderColor: 'successBorderPrimary',
|
|
9
|
-
textColor: 'successTextPrimary',
|
|
10
|
-
buttonAppearance: 'surfacePrimary sizeXXL solid rounded',
|
|
11
|
-
loaderAppearance: 'successPrimary sizeS solid rounded',
|
|
12
|
-
closeIcon: icons24.Action.Close,
|
|
13
|
-
closeIconAppearance: 'successPrimary ghost circular',
|
|
14
|
-
},
|
|
15
|
-
};
|
|
16
|
-
export { notificationAppearanceSuccess };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { icons24 } from '@itcase/icons/default';
|
|
2
|
-
const notificationAppearanceWarning = {
|
|
3
|
-
warningPrimary: {
|
|
4
|
-
fill: 'warningPrimary',
|
|
5
|
-
fillHover: 'warningPrimary',
|
|
6
|
-
titleTextColor: 'warningTextPrimary',
|
|
7
|
-
descTextColor: 'warningTextPrimary',
|
|
8
|
-
borderColor: 'surfaceBorderPrimary',
|
|
9
|
-
textColor: 'warningTextPrimary',
|
|
10
|
-
buttonAppearance: 'surfacePrimary sizeXXL solid rounded',
|
|
11
|
-
loaderAppearance: 'warningPrimary sizeS solid rounded',
|
|
12
|
-
closeIcon: icons24.Action.Close,
|
|
13
|
-
closeIconAppearance: 'surfacePrimary solid circular',
|
|
14
|
-
},
|
|
15
|
-
};
|
|
16
|
-
export { notificationAppearanceWarning };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { Notification, notificationConfig } from './Notification';
|
|
2
|
-
import { notificationAppearance } from './Notification.appearance';
|
|
3
|
-
import { NotificationWrapper } from './NotificationWrapper';
|
|
4
|
-
export { Notification, notificationAppearance, notificationConfig, NotificationWrapper, };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } 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 { overlayAppearance } from './Overlay.appearance';
|
|
7
|
-
const overlayConfig = {
|
|
8
|
-
appearance: overlayAppearance,
|
|
9
|
-
setAppearance: (appearanceConfig) => {
|
|
10
|
-
overlayConfig.appearance = appearanceConfig;
|
|
11
|
-
},
|
|
12
|
-
};
|
|
13
|
-
function Overlay(props) {
|
|
14
|
-
const { appearance, className, dataTestId, dataTour, isOverlay, onClick } = props;
|
|
15
|
-
const appearanceConfig = useAppearanceConfig(appearance, overlayConfig);
|
|
16
|
-
const propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
17
|
-
const { fillClass, blurClass, opacityClass } = propsGenerator;
|
|
18
|
-
const { styles: overlayStyles } = useStyles(props);
|
|
19
|
-
return (_jsx("div", { className: clsx(className, 'overlay', opacityClass && `opacity_${opacityClass}`, blurClass && `blur_${blurClass}`, isOverlay && 'overlay_state_visible', fillClass && `fill_${fillClass}`), "data-testid": dataTestId, "data-tour": dataTour, style: overlayStyles, onClick: onClick, children: "\u00A0" }));
|
|
20
|
-
}
|
|
21
|
-
export { Overlay, overlayConfig };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { paginationAppearanceAccent } from './appearance/paginationAccent';
|
|
2
|
-
import { paginationAppearanceShape } from './appearance/paginationShape';
|
|
3
|
-
import { paginationAppearanceSize } from './appearance/paginationSize';
|
|
4
|
-
import { paginationAppearanceStyle } from './appearance/paginationStyle';
|
|
5
|
-
import { paginationAppearanceSurface } from './appearance/paginationSurface';
|
|
6
|
-
const paginationAppearance = {
|
|
7
|
-
...paginationAppearanceSurface,
|
|
8
|
-
...paginationAppearanceAccent,
|
|
9
|
-
...paginationAppearanceSize,
|
|
10
|
-
...paginationAppearanceShape,
|
|
11
|
-
...paginationAppearanceStyle,
|
|
12
|
-
};
|
|
13
|
-
export { paginationAppearance };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|