@itcase/ui 1.9.64 → 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 +2 -2
- 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 -11
- 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,186 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
14
|
-
const NotificationsAPIContext = createContext({
|
|
15
|
-
hideNotifications: (targetId) => { },
|
|
16
|
-
showNotification: (notification, onClose) => { },
|
|
17
|
-
notificationStatuses: STATUSES,
|
|
18
|
-
});
|
|
19
|
-
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
20
|
-
function NotificationsProvider(props) {
|
|
21
|
-
const { initialNotificationsList = [], isLogRequestsErrors, children } = props;
|
|
22
|
-
const [notificationsList, setNotificationsList] = useState(() => {
|
|
23
|
-
// We need to set id to every notification item and original list also be have new id's
|
|
24
|
-
return (initialNotificationsList || []).map((notificationItem) => {
|
|
25
|
-
return createNotification(notificationItem, notificationItem.onClose);
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
const hideNotifications = useCallback((targetId) => {
|
|
29
|
-
// If not target, then nothing to hide
|
|
30
|
-
if (!targetId) {
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
setNotificationsList((prevNotificationsList) => {
|
|
34
|
-
const newState = prevNotificationsList.filter((notificationItem) => {
|
|
35
|
-
// Check on need to hide, if current notification is target for hide
|
|
36
|
-
const isNeedToHide = String(notificationItem.id) === String(targetId);
|
|
37
|
-
// Callback for close if exists
|
|
38
|
-
if (isNeedToHide) {
|
|
39
|
-
clearTimeout(notificationItem._closeTimeout);
|
|
40
|
-
// @typescript-eslint/no-unused-expressions
|
|
41
|
-
notificationItem.onClose && notificationItem.onClose();
|
|
42
|
-
}
|
|
43
|
-
// Save in state if no need to hide
|
|
44
|
-
return !isNeedToHide;
|
|
45
|
-
});
|
|
46
|
-
// Set new notifications list without target item to state
|
|
47
|
-
return newState;
|
|
48
|
-
});
|
|
49
|
-
}, []);
|
|
50
|
-
const showNotification = useCallback((notification, onClose) => {
|
|
51
|
-
const newNotificationItem = createNotification(notification, onClose);
|
|
52
|
-
setNotificationsList((prevNotificationsList) => {
|
|
53
|
-
const newState = prevNotificationsList.slice();
|
|
54
|
-
const existsNotificationIndex = newState.findIndex((notificationItem) => String(notificationItem.id) === String(newNotificationItem.id));
|
|
55
|
-
// Add new notification
|
|
56
|
-
if (existsNotificationIndex === -1) {
|
|
57
|
-
return [...newState, newNotificationItem];
|
|
58
|
-
}
|
|
59
|
-
// Or update exists notification
|
|
60
|
-
const updatedNotificationItem = newState[existsNotificationIndex];
|
|
61
|
-
// Clear timeout to avoid close event for updated notification
|
|
62
|
-
clearTimeout(updatedNotificationItem._closeTimeout);
|
|
63
|
-
updatedNotificationItem._closeTimeout = undefined;
|
|
64
|
-
// Replace exists notification by new one
|
|
65
|
-
newState[existsNotificationIndex] = newNotificationItem;
|
|
66
|
-
return newState;
|
|
67
|
-
});
|
|
68
|
-
if (newNotificationItem.closeByTime) {
|
|
69
|
-
newNotificationItem._closeTimeout = setTimeout(() => hideNotifications(newNotificationItem.id), newNotificationItem.closeByTime);
|
|
70
|
-
}
|
|
71
|
-
return newNotificationItem;
|
|
72
|
-
},
|
|
73
|
-
// "hideNotifications" is never changed
|
|
74
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
75
|
-
[]);
|
|
76
|
-
const notificationsAPI = useMemo(() => ({
|
|
77
|
-
hideNotifications: hideNotifications,
|
|
78
|
-
notificationStatuses: STATUSES,
|
|
79
|
-
showNotification: showNotification,
|
|
80
|
-
}),
|
|
81
|
-
// Functions is never changes, no sense to set as dependencies
|
|
82
|
-
// eslint-disable-next-line
|
|
83
|
-
[]);
|
|
84
|
-
useEffect(() => {
|
|
85
|
-
// Set timeout for initial notifications list one time on first render
|
|
86
|
-
notificationsList.forEach((notificationItem) => {
|
|
87
|
-
if (notificationItem.closeByTime) {
|
|
88
|
-
setTimeout(() => hideNotifications(notificationItem.id), notificationItem.closeByTime);
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
// Show notifications on all requests errors.
|
|
92
|
-
// Enable one time without disabling. Use "isLogging" on request config level
|
|
93
|
-
// to disable notifications logger.
|
|
94
|
-
if (isLogRequestsErrors) {
|
|
95
|
-
axiosInstanceITCase.responseErrorHandler.loggerManager = {
|
|
96
|
-
log: (responseError) => {
|
|
97
|
-
if (responseError.message) {
|
|
98
|
-
// prevent from showing many network errors
|
|
99
|
-
const errorListToDedupe = ['network'];
|
|
100
|
-
const id = errorListToDedupe.includes(responseError.key)
|
|
101
|
-
? responseError.key
|
|
102
|
-
: undefined;
|
|
103
|
-
showNotification({
|
|
104
|
-
id: id,
|
|
105
|
-
title: responseError.message,
|
|
106
|
-
status: 'error',
|
|
107
|
-
closeByTime: 4000,
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
114
|
-
}, []);
|
|
115
|
-
return (_jsx(NotificationsAPIContext.Provider, { value: notificationsAPI, children: _jsx(NotificationsContext.Provider, { value: notificationsList, children: children }) }));
|
|
116
|
-
}
|
|
117
|
-
function useNotifications() {
|
|
118
|
-
return useContext(NotificationsContext);
|
|
119
|
-
}
|
|
120
|
-
function useNotificationsAPI() {
|
|
121
|
-
return useContext(NotificationsAPIContext);
|
|
122
|
-
}
|
|
123
|
-
const statusToAppearanceList = {
|
|
124
|
-
error: 'errorPrimary sizeS solid rounded',
|
|
125
|
-
info: 'infoPrimary sizeS solid rounded',
|
|
126
|
-
success: 'successPrimary sizeS solid rounded',
|
|
127
|
-
warning: 'warningPrimary sizeS solid rounded',
|
|
128
|
-
};
|
|
129
|
-
function createNotification(notification, onClose) {
|
|
130
|
-
// Default notification item properties
|
|
131
|
-
let id = uuidv4().split('-')[0];
|
|
132
|
-
let title = '';
|
|
133
|
-
let text = '';
|
|
134
|
-
let closeIcon = '';
|
|
135
|
-
let closeIconSrc = '';
|
|
136
|
-
let type = 'float';
|
|
137
|
-
let buttonLabel = '';
|
|
138
|
-
let status = STATUSES.warning;
|
|
139
|
-
let closeByTime = 4500;
|
|
140
|
-
let appearance = statusToAppearanceList[status];
|
|
141
|
-
let after = null;
|
|
142
|
-
let isLoading = false;
|
|
143
|
-
let closeIconAppearance = '';
|
|
144
|
-
let onClickButton = () => { };
|
|
145
|
-
if (typeof notification === 'string') {
|
|
146
|
-
text = notification;
|
|
147
|
-
}
|
|
148
|
-
else if (typeof notification === 'object') {
|
|
149
|
-
id = String(notification.id ?? id);
|
|
150
|
-
title = notification.title ?? title;
|
|
151
|
-
text = notification.text ?? text;
|
|
152
|
-
closeIconAppearance =
|
|
153
|
-
notification.closeIconAppearance ?? closeIconAppearance;
|
|
154
|
-
type = notification.type ?? type;
|
|
155
|
-
closeIcon = notification.closeIcon ?? closeIcon;
|
|
156
|
-
closeIconSrc = notification.closeIconSrc ?? closeIconSrc;
|
|
157
|
-
buttonLabel = notification.buttonLabel ?? buttonLabel;
|
|
158
|
-
onClickButton = notification.onClickButton ?? onClickButton;
|
|
159
|
-
status = notification.status ?? status;
|
|
160
|
-
closeByTime = notification.closeByTime ?? closeByTime;
|
|
161
|
-
isLoading = notification.isLoading ?? isLoading;
|
|
162
|
-
after = notification.after ?? after;
|
|
163
|
-
appearance =
|
|
164
|
-
notification.appearance ??
|
|
165
|
-
statusToAppearanceList[notification.status] ??
|
|
166
|
-
appearance;
|
|
167
|
-
}
|
|
168
|
-
return {
|
|
169
|
-
id: id,
|
|
170
|
-
appearance: appearance,
|
|
171
|
-
type: type,
|
|
172
|
-
title: title,
|
|
173
|
-
status: status,
|
|
174
|
-
text: text,
|
|
175
|
-
buttonLabel: buttonLabel,
|
|
176
|
-
after: after,
|
|
177
|
-
closeByTime: closeByTime,
|
|
178
|
-
closeIcon: closeIcon,
|
|
179
|
-
closeIconAppearance: closeIconAppearance,
|
|
180
|
-
closeIconSrc: closeIconSrc,
|
|
181
|
-
isLoading: isLoading,
|
|
182
|
-
onClickButton: onClickButton,
|
|
183
|
-
onClose: onClose,
|
|
184
|
-
};
|
|
185
|
-
}
|
|
186
|
-
export { NotificationsProvider, useNotifications, useNotificationsAPI };
|
|
1
|
+
import 'react/jsx-runtime';
|
|
2
|
+
import 'react';
|
|
3
|
+
import 'uuid';
|
|
4
|
+
import '@itcase/common';
|
|
5
|
+
export { N as NotificationsProvider, j as useNotifications, k as useNotificationsAPI } from '../primitives_es_dSATude_.js';
|
|
6
|
+
import 'clsx';
|
|
7
|
+
import 'lodash/camelCase';
|
|
8
|
+
import 'lodash/castArray';
|
|
9
|
+
import 'lodash/upperFirst';
|
|
10
|
+
import 'react-responsive';
|
|
11
|
+
import 'lodash/maxBy';
|
|
12
|
+
import 'react-inlinesvg';
|
|
@@ -1,70 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
deviceTypesList: [],
|
|
14
|
-
});
|
|
15
|
-
const UIProvider = memo(function UIProvider(props) {
|
|
16
|
-
const { userDeviceState = {}, children } = props;
|
|
17
|
-
/** NOTE:
|
|
18
|
-
* Remember that the "useMediaQueries" hook works by next scenario:
|
|
19
|
-
* when changing the device type(browser width), the hook will first "enable"
|
|
20
|
-
* the new type(set true), and then "disable" the previous one(set false),
|
|
21
|
-
* what provoke to double rendering, and in moment we have two different types as "true".
|
|
22
|
-
* We will need to look at how to change this behavior.
|
|
23
|
-
*/
|
|
24
|
-
const allDevicesTypes = useMediaQueries(userDeviceState);
|
|
25
|
-
const { isMobile, isTablet, isDesktop, ...fullNamedDeviceTypes } = allDevicesTypes;
|
|
26
|
-
const deviceCurrentMainType = (isMobile && 'mobile') ||
|
|
27
|
-
(isTablet && 'tablet') ||
|
|
28
|
-
(isDesktop && 'desktop') ||
|
|
29
|
-
'';
|
|
30
|
-
const [deviceCurrentType, deviceTypesList] = useMemo(() => {
|
|
31
|
-
const deviceTypesList = Object.keys(allDevicesTypes).map((key) => camelCase(key.replace('is', '')));
|
|
32
|
-
// In same time "allDevicesTypes" can contain "isMobile" and "isMobileLarge" as true
|
|
33
|
-
let deviceCurrentType = Object.keys(fullNamedDeviceTypes).find(
|
|
34
|
-
// If "fullNamedDeviceTypes.isMobileLarge: true" - that our device
|
|
35
|
-
(key) => fullNamedDeviceTypes[key]);
|
|
36
|
-
// Or set main type (e.g. "isMobile")
|
|
37
|
-
if (!deviceCurrentType) {
|
|
38
|
-
deviceCurrentType = deviceCurrentMainType;
|
|
39
|
-
}
|
|
40
|
-
deviceCurrentType = camelCase(deviceCurrentType.replace('is', ''));
|
|
41
|
-
// On server side render we doesn't known user device and we need to set special word
|
|
42
|
-
return [deviceCurrentType || '_none_', deviceTypesList];
|
|
43
|
-
}, [allDevicesTypes, deviceCurrentMainType, fullNamedDeviceTypes]);
|
|
44
|
-
const deviceContextState = useMemo(() => {
|
|
45
|
-
return {
|
|
46
|
-
...allDevicesTypes,
|
|
47
|
-
deviceCurrentMainType: deviceCurrentMainType,
|
|
48
|
-
deviceCurrentType: deviceCurrentType,
|
|
49
|
-
deviceTypesList: deviceTypesList,
|
|
50
|
-
};
|
|
51
|
-
}, [
|
|
52
|
-
allDevicesTypes,
|
|
53
|
-
deviceCurrentMainType,
|
|
54
|
-
deviceCurrentType,
|
|
55
|
-
deviceTypesList,
|
|
56
|
-
]);
|
|
57
|
-
useEffect(() => {
|
|
58
|
-
setViewportProperty();
|
|
59
|
-
window.addEventListener('resize', setViewportProperty);
|
|
60
|
-
}, []);
|
|
61
|
-
return (_jsx(UserDeviceContext.Provider, { value: deviceContextState, children: children }));
|
|
62
|
-
});
|
|
63
|
-
function useUserDeviceContext() {
|
|
64
|
-
const context = useContext(UserDeviceContext);
|
|
65
|
-
if (!context) {
|
|
66
|
-
throw new Error('useUserDeviceContext is not defined');
|
|
67
|
-
}
|
|
68
|
-
return context;
|
|
69
|
-
}
|
|
70
|
-
export { UIProvider, useUserDeviceContext };
|
|
1
|
+
import 'react/jsx-runtime';
|
|
2
|
+
import 'react';
|
|
3
|
+
import 'lodash/camelCase';
|
|
4
|
+
export { U as UIProvider, e as useUserDeviceContext } from '../primitives_es_dSATude_.js';
|
|
5
|
+
import 'clsx';
|
|
6
|
+
import 'lodash/castArray';
|
|
7
|
+
import 'lodash/upperFirst';
|
|
8
|
+
import 'uuid';
|
|
9
|
+
import '@itcase/common';
|
|
10
|
+
import 'react-responsive';
|
|
11
|
+
import 'lodash/maxBy';
|
|
12
|
+
import 'react-inlinesvg';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import 'react/jsx-runtime';
|
|
2
|
+
import 'react';
|
|
3
|
+
export { C as UrlAssetPrefixContext, E as UrlAssetPrefixProvider } from '../primitives_es_dSATude_.js';
|
|
4
|
+
import 'clsx';
|
|
5
|
+
import 'lodash/camelCase';
|
|
6
|
+
import 'lodash/castArray';
|
|
7
|
+
import 'lodash/upperFirst';
|
|
8
|
+
import 'uuid';
|
|
9
|
+
import '@itcase/common';
|
|
10
|
+
import 'react-responsive';
|
|
11
|
+
import 'lodash/maxBy';
|
|
12
|
+
import 'react-inlinesvg';
|
|
@@ -1,74 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
*
|
|
14
|
-
* @param WrappedComponent - Компонент, который оборачиваем.
|
|
15
|
-
* @param _error - Проверка: если ни одного URL-пропа нет, будет ошибка компиляции.
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* const A = (props: { src?: string }) => <div />;
|
|
19
|
-
* urlWithAssetPrefix(A); // ✅ OK
|
|
20
|
-
*
|
|
21
|
-
* const B = (props: { id: string }) => <div />;
|
|
22
|
-
* urlWithAssetPrefix(B); // ❌ TS ошибка (нет url-пропов)
|
|
23
|
-
*/
|
|
24
|
-
const urlWithAssetPrefix = (WrappedComponent, ..._error) => {
|
|
25
|
-
const HOC = React.forwardRef(function HOC(props, ref) {
|
|
26
|
-
const { assetPrefix, ignorePathsList } = useContext(UrlAssetPrefixContext);
|
|
27
|
-
const overrideProps = urlPropsList.reduce((resultProps, propKey) => {
|
|
28
|
-
let url = props[propKey];
|
|
29
|
-
if (url && typeof url === 'string') {
|
|
30
|
-
if (assetPrefix) {
|
|
31
|
-
const isNeedAssetPrefix = checkIsNeedAssetPrefix(url, assetPrefix, ignorePathsList);
|
|
32
|
-
if (isNeedAssetPrefix) {
|
|
33
|
-
const prefixPath = formatURL(assetPrefix).slice(0, -1);
|
|
34
|
-
url = `${prefixPath}${url}`;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
resultProps[propKey] = url;
|
|
38
|
-
}
|
|
39
|
-
return resultProps;
|
|
40
|
-
}, {});
|
|
41
|
-
return _jsx(WrappedComponent, { ...props, ...overrideProps, ref: ref });
|
|
42
|
-
});
|
|
43
|
-
return HOC;
|
|
44
|
-
};
|
|
45
|
-
const checkIsNeedAssetPrefix = (url, assetPrefix, ignorePathsList = []) => {
|
|
46
|
-
// Ignore prefix if:
|
|
47
|
-
const isPrefixIgnore =
|
|
48
|
-
// Url is absolute
|
|
49
|
-
url.startsWith('http:') ||
|
|
50
|
-
url.startsWith('https:') ||
|
|
51
|
-
// Url is data string
|
|
52
|
-
url.startsWith('data:') ||
|
|
53
|
-
// Url already have prefix
|
|
54
|
-
url.startsWith(assetPrefix);
|
|
55
|
-
if (isPrefixIgnore) {
|
|
56
|
-
return false;
|
|
57
|
-
}
|
|
58
|
-
// And check special paths for ignore prefix
|
|
59
|
-
for (const urlPath of ignorePathsList) {
|
|
60
|
-
if (urlPath instanceof RegExp) {
|
|
61
|
-
if (urlPath.test(url)) {
|
|
62
|
-
return false;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
if (formatURL(url).startsWith(formatURL(urlPath))) {
|
|
67
|
-
return false;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
// Need to add prefix to url
|
|
72
|
-
return true;
|
|
73
|
-
};
|
|
74
|
-
export { urlWithAssetPrefix };
|
|
1
|
+
import 'react/jsx-runtime';
|
|
2
|
+
import 'react';
|
|
3
|
+
import '@itcase/common';
|
|
4
|
+
export { c as urlWithAssetPrefix } from '../primitives_es_dSATude_.js';
|
|
5
|
+
import 'clsx';
|
|
6
|
+
import 'lodash/camelCase';
|
|
7
|
+
import 'lodash/castArray';
|
|
8
|
+
import 'lodash/upperFirst';
|
|
9
|
+
import 'uuid';
|
|
10
|
+
import 'react-responsive';
|
|
11
|
+
import 'lodash/maxBy';
|
|
12
|
+
import 'react-inlinesvg';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import clsx from 'clsx';
|
|
2
|
-
import { CLASS_RULES,
|
|
2
|
+
import { CLASS_RULES, toKebabCase, formatState } from './useActiveClasses.helpers.js';
|
|
3
|
+
|
|
3
4
|
const useActiveClasses = (params) => {
|
|
4
5
|
const { propsGenerator, suffixes = [], isActive, isDisabled } = params;
|
|
5
6
|
const rootClassesArray = [];
|
|
@@ -53,4 +54,5 @@ const useActiveClasses = (params) => {
|
|
|
53
54
|
suffixClasses,
|
|
54
55
|
};
|
|
55
56
|
};
|
|
57
|
+
|
|
56
58
|
export { useActiveClasses };
|
|
@@ -1,25 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
componentConfig?.appearance?.disabledPrimary);
|
|
14
|
-
}
|
|
15
|
-
return appearanceProps;
|
|
16
|
-
}
|
|
17
|
-
if (isDisabled) {
|
|
18
|
-
return (componentConfig?.appearance?.disabled ||
|
|
19
|
-
componentConfig?.appearance?.disabledPrimary);
|
|
20
|
-
}
|
|
21
|
-
return {};
|
|
22
|
-
}, [appearance, componentConfig?.appearance, isDisabled]);
|
|
23
|
-
return appearanceConfig;
|
|
24
|
-
};
|
|
25
|
-
export { useAppearanceConfig };
|
|
1
|
+
import 'react';
|
|
2
|
+
export { d as useAppearanceConfig } from '../../primitives_es_dSATude_.js';
|
|
3
|
+
import 'react/jsx-runtime';
|
|
4
|
+
import 'clsx';
|
|
5
|
+
import 'lodash/camelCase';
|
|
6
|
+
import 'lodash/castArray';
|
|
7
|
+
import 'lodash/upperFirst';
|
|
8
|
+
import 'uuid';
|
|
9
|
+
import '@itcase/common';
|
|
10
|
+
import 'react-responsive';
|
|
11
|
+
import 'lodash/maxBy';
|
|
12
|
+
import 'react-inlinesvg';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
@@ -1,121 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
*
|
|
14
|
-
* Usage for create class value:
|
|
15
|
-
* const appearanceConfig = (
|
|
16
|
-
* appearance && componentConfig.appearance && componentConfig.appearance[appearance]
|
|
17
|
-
* )
|
|
18
|
-
* const propsGenerator = useDevicePropsGenerator(props, appearanceConfig)
|
|
19
|
-
* ---------
|
|
20
|
-
* const fillClass = propsGenerator.getClassName('fill')
|
|
21
|
-
* "fillClass" - is "surface-secondary"
|
|
22
|
-
* ---------
|
|
23
|
-
* const fillClass = propsGenerator.getClassName('fill', { prefix: 'fill_' })
|
|
24
|
-
* "fillClass" - is "fill_surface-secondary"
|
|
25
|
-
* ---------
|
|
26
|
-
* const fillClass = propsGenerator.fillClass
|
|
27
|
-
* "fillClass" - is "surface-secondary"
|
|
28
|
-
* ---------
|
|
29
|
-
* const { fillClass } = propsGenerator
|
|
30
|
-
* "fillClass" - is "surface-secondary"
|
|
31
|
-
*
|
|
32
|
-
* Usage for props value for device:
|
|
33
|
-
* const { titleTextSize } = propsGenerator / const titleTextSize = propsGenerator.titleTextSize
|
|
34
|
-
*
|
|
35
|
-
* "titleTextSize" - contain some value from props:
|
|
36
|
-
* - titleTextSize
|
|
37
|
-
* - titleTextSizeMobile
|
|
38
|
-
* - titleTextSizeTablet
|
|
39
|
-
* - titleTextSizeDesktop
|
|
40
|
-
* ---------
|
|
41
|
-
**/
|
|
42
|
-
const { deviceCurrentMainType } = useUserDeviceContext();
|
|
43
|
-
const devicePropsGenerator = useMemo(() => {
|
|
44
|
-
const propsGenerator = {
|
|
45
|
-
getProp(propKey) {
|
|
46
|
-
const propsForDeviceKey = `${propKey}${upperFirst(deviceCurrentMainType)}`;
|
|
47
|
-
const valueForDevice = componentProps[propsForDeviceKey];
|
|
48
|
-
const valueDefault = componentProps[propKey];
|
|
49
|
-
const appearanceForDevice = appearanceConfig?.[propsForDeviceKey];
|
|
50
|
-
const appearanceDefault = appearanceConfig?.[propKey];
|
|
51
|
-
// prettier-ignore
|
|
52
|
-
const targetPropsValue = (
|
|
53
|
-
// Value for device from props is first priority
|
|
54
|
-
valueForDevice ||
|
|
55
|
-
// Value without device from props is second priority
|
|
56
|
-
valueDefault ||
|
|
57
|
-
// Value for device from appearance config is third priority
|
|
58
|
-
appearanceForDevice ||
|
|
59
|
-
// Value without device from appearance config is last priority
|
|
60
|
-
appearanceDefault);
|
|
61
|
-
return targetPropsValue;
|
|
62
|
-
},
|
|
63
|
-
// eslint-disable-next-line perfectionist/sort-objects
|
|
64
|
-
getClassName(propKey, params) {
|
|
65
|
-
const { prefix = '', replace = [/([A-Z])/g, '-$1'] } = params || {};
|
|
66
|
-
const targetClassValue = this.getProp(String(propKey));
|
|
67
|
-
const styleAttributeKeys = styleAttributes.map((attr) => getStyleAttributeKey(attr));
|
|
68
|
-
if (styleAttributeKeys.includes(String(propKey)) &&
|
|
69
|
-
(typeof targetClassValue === 'number' ||
|
|
70
|
-
(typeof targetClassValue === 'string' &&
|
|
71
|
-
!isNaN(parseFloat(targetClassValue))))) {
|
|
72
|
-
return '';
|
|
73
|
-
}
|
|
74
|
-
if (targetClassValue) {
|
|
75
|
-
let cleanClassValue = String(targetClassValue);
|
|
76
|
-
if (!cleanClassValue.includes('.')) {
|
|
77
|
-
cleanClassValue = camelCase(cleanClassValue);
|
|
78
|
-
}
|
|
79
|
-
if (replace) {
|
|
80
|
-
const replaceList = castArray(replace);
|
|
81
|
-
cleanClassValue = cleanClassValue.replace(replaceList[0],
|
|
82
|
-
// @ts-expect-error
|
|
83
|
-
replaceList[1] || '');
|
|
84
|
-
}
|
|
85
|
-
// prettier-ignore
|
|
86
|
-
return `${prefix}${cleanClassValue}`.toLowerCase();
|
|
87
|
-
}
|
|
88
|
-
// If target key not exists in props and appearance config - return empty class
|
|
89
|
-
return '';
|
|
90
|
-
},
|
|
91
|
-
};
|
|
92
|
-
const generatorProxyHandler = {
|
|
93
|
-
get(target, propKey, receiver, ...args) {
|
|
94
|
-
if (typeof propKey === 'string') {
|
|
95
|
-
// If object does not have the property being retrieved
|
|
96
|
-
if (!Reflect.has(target, propKey)) {
|
|
97
|
-
// And property ended on "Class" keyword
|
|
98
|
-
if (propKey.endsWith('Class')) {
|
|
99
|
-
// prettier-ignore
|
|
100
|
-
const shortProp = propKey.substring(0, propKey.lastIndexOf('Class'));
|
|
101
|
-
// Return prop from props for device as formatted class name
|
|
102
|
-
return target.getClassName(shortProp);
|
|
103
|
-
}
|
|
104
|
-
// Return prop from props for device
|
|
105
|
-
return target.getProp(propKey);
|
|
106
|
-
}
|
|
107
|
-
// Return object property. Original "get".
|
|
108
|
-
// @ts-expect-error
|
|
109
|
-
return Reflect.get(target, propKey, receiver, ...args);
|
|
110
|
-
}
|
|
111
|
-
// In some cases, like in Chrome browser, sometime "prop" is not string.
|
|
112
|
-
// We return this object as is.
|
|
113
|
-
return propKey;
|
|
114
|
-
},
|
|
115
|
-
};
|
|
116
|
-
return new Proxy(propsGenerator, generatorProxyHandler);
|
|
117
|
-
// TODO: componentProps(react) and appearanceConfig(not memoized) is always new. maybe better check Object.values?
|
|
118
|
-
}, [componentProps, appearanceConfig, deviceCurrentMainType]);
|
|
119
|
-
return devicePropsGenerator;
|
|
120
|
-
}
|
|
121
|
-
export { useDevicePropsGenerator };
|
|
1
|
+
import 'react';
|
|
2
|
+
import 'lodash/camelCase';
|
|
3
|
+
import 'lodash/castArray';
|
|
4
|
+
import 'lodash/upperFirst';
|
|
5
|
+
export { a as useDevicePropsGenerator } from '../../primitives_es_dSATude_.js';
|
|
6
|
+
import 'react/jsx-runtime';
|
|
7
|
+
import 'clsx';
|
|
8
|
+
import 'uuid';
|
|
9
|
+
import '@itcase/common';
|
|
10
|
+
import 'react-responsive';
|
|
11
|
+
import 'lodash/maxBy';
|
|
12
|
+
import 'react-inlinesvg';
|