@itcase/ui 1.8.122 → 1.8.124
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/Avatar_cjs_mojzcWRL.js +161 -0
- package/dist/Avatar_es_BFom0nAS.js +157 -0
- package/dist/{Button_cjs_i0Dn1pkl.js → Button_cjs_CZz8OjWi.js} +42 -30
- package/dist/{Button_es_CtH5EKJd.js → Button_es_Cn3wtv3M.js} +42 -30
- package/dist/ChipsGroup_cjs_Dgskkc1e.js +344 -0
- package/dist/{ChipsGroup_es_ayPPUwQ7.js → ChipsGroup_es_BVQ7_n0k.js} +48 -35
- package/dist/DatePicker_cjs_Lzrr9Amf.js +182 -0
- package/dist/DatePicker_es_D1LvY5RT.js +178 -0
- package/dist/Divider_cjs_DrmV2ezS.js +105 -0
- package/dist/Divider_es_BiYozVBS.js +101 -0
- package/dist/DropdownItem_cjs_rKLdFxSj.js +211 -0
- package/dist/DropdownItem_es_B-1qtEa7.js +206 -0
- package/dist/Group_cjs_DmfeUcFI.js +59 -0
- package/dist/Group_es_BU5k8f5S.js +55 -0
- package/dist/{Icon_cjs_Cz6IyOkb.js → Icon_cjs_DpFxIFv5.js} +170 -121
- package/dist/{Icon_es_BrwLifge.js → Icon_es_D5eiycFI.js} +170 -121
- package/dist/Image_cjs_CBDMUzv_.js +29 -0
- package/dist/Image_es_BHec4iVN.js +27 -0
- package/dist/{Input_cjs_Du73R-wm.js → Input_cjs_DDi5JVAV.js} +27 -19
- package/dist/{Input_es_CiDHjDqJ.js → Input_es_BnCXATnh.js} +27 -19
- package/dist/{Label_cjs_DMoaOoHi.js → Label_cjs_C-x9blCL.js} +45 -33
- package/dist/{Label_es_SULlg9bL.js → Label_es_DCqpSw_F.js} +45 -33
- package/dist/{Link_cjs_C5UsZUiF.js → Link_cjs_qKXVfU8e.js} +43 -30
- package/dist/{Link_es_XiqbdwLp.js → Link_es_P2b6ya7P.js} +43 -30
- package/dist/Loader_cjs_DIDsIq3J.js +143 -0
- package/dist/Loader_es_CmSggwbR.js +139 -0
- package/dist/Overlay_cjs_tGA2fU43.js +42 -0
- package/dist/Overlay_es_BS7OTFoy.js +38 -0
- package/dist/{Scrollbar_cjs_DcKOfcNp.js → Scrollbar_cjs_Cp-7v2Mt.js} +1 -1
- package/dist/{Scrollbar_es_CThJeCLF.js → Scrollbar_es_CcMgNvGi.js} +1 -1
- package/dist/Text_cjs_BDTjOTVB.js +69 -0
- package/dist/Text_es_CnymlElo.js +65 -0
- package/dist/cjs/components/Accordion.js +37 -34
- package/dist/cjs/components/Avatar.js +5 -6
- package/dist/cjs/components/AvatarStack/stories/__mock__.js +1 -1
- package/dist/cjs/components/AvatarStack.js +17 -16
- package/dist/cjs/components/Badge.js +3 -4
- package/dist/cjs/components/Breadcrumbs/stories/__mock__.js +1 -1
- package/dist/cjs/components/Breadcrumbs.js +27 -23
- package/dist/cjs/components/Button.js +5 -6
- package/dist/cjs/components/Cell/stories/__mock__.js +1 -1
- package/dist/cjs/components/Cell.js +28 -25
- package/dist/cjs/components/Checkbox.js +33 -26
- package/dist/cjs/components/Checkmark.js +28 -23
- package/dist/cjs/components/Chips/stories/__mock__.js +1 -1
- package/dist/cjs/components/Chips.js +4 -5
- package/dist/cjs/components/Choice/stories/__mock__.js +2 -2
- package/dist/cjs/components/Choice.js +46 -40
- package/dist/cjs/components/Code.js +34 -26
- package/dist/cjs/components/CookiesWarning.js +23 -23
- package/dist/cjs/components/Dadata.js +14 -9
- package/dist/cjs/components/DatePeriod.js +32 -30
- package/dist/cjs/components/DatePicker.js +8 -9
- package/dist/cjs/components/Divider.js +1 -2
- package/dist/cjs/components/Dot.js +5 -6
- package/dist/cjs/components/Drawer.js +23 -21
- package/dist/cjs/components/Dropdown/stories/__mock__.js +6 -6
- package/dist/cjs/components/Dropdown.js +5 -6
- package/dist/cjs/components/Flex.js +11 -12
- package/dist/cjs/components/Grid.js +15 -16
- package/dist/cjs/components/Group.js +1 -2
- package/dist/cjs/components/HTMLContent.js +5 -6
- package/dist/cjs/components/HeroTitle.js +17 -16
- package/dist/cjs/components/Icon.js +3 -4
- package/dist/cjs/components/Image.js +1 -2
- package/dist/cjs/components/Input.js +1 -2
- package/dist/cjs/components/InputPassword.js +114 -84
- package/dist/cjs/components/Label.js +4 -5
- package/dist/cjs/components/Link.js +1 -2
- package/dist/cjs/components/List.js +39 -28
- package/dist/cjs/components/Loader.js +2 -3
- package/dist/cjs/components/Logo.js +10 -11
- package/dist/cjs/components/MenuItem.js +36 -33
- package/dist/cjs/components/Modal.js +40 -38
- package/dist/cjs/components/ModalSheetBottom.js +17 -18
- package/dist/cjs/components/Notification/stories/__mock__.js +1 -1
- package/dist/cjs/components/Notification.js +31 -24
- package/dist/cjs/components/Overlay.js +1 -2
- package/dist/cjs/components/Pagination.js +43 -41
- package/dist/cjs/components/Radio.js +34 -26
- package/dist/cjs/components/RangeSlider.js +8 -9
- package/dist/cjs/components/Response/img.js +1 -1
- package/dist/cjs/components/Response.js +102 -84
- package/dist/cjs/components/SVGContent.js +6 -7
- package/dist/cjs/components/ScrollOnDrag/stories/__mock__.js +2 -2
- package/dist/cjs/components/ScrollOnDrag.js +7 -8
- package/dist/cjs/components/ScrollToView.js +8 -9
- package/dist/cjs/components/Scrollbar/stories/__mock__.js +1 -1
- package/dist/cjs/components/Scrollbar.js +1 -1
- package/dist/cjs/components/Search.js +39 -31
- package/dist/cjs/components/Segmented/stories/__mock__.js +23 -10
- package/dist/cjs/components/Segmented.js +47 -42
- package/dist/cjs/components/Select.js +118 -113
- package/dist/cjs/components/Swiper/stories/__mock__.js +3 -3
- package/dist/cjs/components/Swiper.js +27 -29
- package/dist/cjs/components/Switch.js +33 -26
- package/dist/cjs/components/Tab/stories/__mock__.js +1 -1
- package/dist/cjs/components/Tab.js +59 -69
- package/dist/cjs/components/Text.js +1 -2
- package/dist/cjs/components/Textarea.js +26 -18
- package/dist/cjs/components/Tile.js +21 -17
- package/dist/cjs/components/Title.js +3 -4
- package/dist/cjs/components/Tooltip.js +3 -4
- package/dist/cjs/components/Video/stories/__mocks__.js +1 -1
- package/dist/cjs/components/Video.js +3 -4
- package/dist/cjs/components/Warning.js +26 -20
- package/dist/cjs/context/Notifications.js +38 -42
- package/dist/cjs/context/UIContext.js +19 -17
- package/dist/cjs/context/UrlAssetPrefix.js +3 -3
- package/dist/cjs/hoc/urlWithAssetPrefix.js +13 -16
- package/dist/cjs/hooks/useActiveClasses/useActiveClasses.helpers.js +13 -40
- package/dist/cjs/hooks/useActiveClasses/useActiveClasses.interface.js +1 -1
- package/dist/cjs/hooks/useActiveClasses/useActiveClasses.js +25 -29
- package/dist/cjs/hooks/useAppearanceConfig/useAppearanceConfig.js +13 -15
- package/dist/cjs/hooks/useAppearanceConfig.js +0 -1
- package/dist/cjs/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js +21 -28
- package/dist/cjs/hooks/useDevicePropsGenerator.js +0 -1
- package/dist/cjs/hooks/useDeviceTargetClass.js +0 -1
- package/dist/cjs/hooks/useStyles/styleAttributes.js +1 -1
- package/dist/cjs/hooks/useStyles/useStyles.js +0 -1
- package/dist/cjs/hooks/useStyles.js +0 -1
- package/dist/cjs/hooks/useViewportFix.js +5 -5
- package/dist/cjs/hooks.js +1 -1
- package/dist/cjs/utils/setViewportProperty.js +3 -3
- package/dist/components/Accordion.js +37 -34
- package/dist/components/Avatar.js +5 -6
- package/dist/components/AvatarStack/stories/__mock__.js +1 -1
- package/dist/components/AvatarStack.js +17 -16
- package/dist/components/Badge.js +3 -4
- package/dist/components/Breadcrumbs/stories/__mock__.js +1 -1
- package/dist/components/Breadcrumbs.js +27 -23
- package/dist/components/Button.js +5 -6
- package/dist/components/Cell/stories/__mock__.js +1 -1
- package/dist/components/Cell.js +28 -25
- package/dist/components/Checkbox.js +33 -26
- package/dist/components/Checkmark.js +28 -23
- package/dist/components/Chips/stories/__mock__.js +1 -1
- package/dist/components/Chips.js +4 -5
- package/dist/components/Choice/stories/__mock__.js +2 -2
- package/dist/components/Choice.js +46 -40
- package/dist/components/Code.js +34 -26
- package/dist/components/CookiesWarning.js +23 -23
- package/dist/components/Dadata.js +14 -9
- package/dist/components/DatePeriod.js +32 -30
- package/dist/components/DatePicker.js +8 -9
- package/dist/components/Divider.js +1 -2
- package/dist/components/Dot.js +5 -6
- package/dist/components/Drawer.js +23 -21
- package/dist/components/Dropdown/stories/__mock__.js +6 -6
- package/dist/components/Dropdown.js +5 -6
- package/dist/components/Flex.js +11 -12
- package/dist/components/Grid.js +15 -16
- package/dist/components/Group.js +1 -2
- package/dist/components/HTMLContent.js +5 -6
- package/dist/components/HeroTitle.js +17 -16
- package/dist/components/Icon.js +3 -4
- package/dist/components/Image.js +1 -2
- package/dist/components/Input.js +1 -2
- package/dist/components/InputPassword.js +114 -84
- package/dist/components/Label.js +4 -5
- package/dist/components/Link.js +1 -2
- package/dist/components/List.js +39 -28
- package/dist/components/Loader.js +2 -3
- package/dist/components/Logo.js +10 -11
- package/dist/components/MenuItem.js +36 -33
- package/dist/components/Modal.js +40 -38
- package/dist/components/ModalSheetBottom.js +17 -18
- package/dist/components/Notification/stories/__mock__.js +1 -1
- package/dist/components/Notification.js +31 -24
- package/dist/components/Overlay.js +1 -2
- package/dist/components/Pagination.js +43 -41
- package/dist/components/Radio.js +34 -26
- package/dist/components/RangeSlider.js +8 -9
- package/dist/components/Response/img.js +1 -1
- package/dist/components/Response.js +102 -84
- package/dist/components/SVGContent.js +6 -7
- package/dist/components/ScrollOnDrag/stories/__mock__.js +2 -2
- package/dist/components/ScrollOnDrag.js +7 -8
- package/dist/components/ScrollToView.js +8 -9
- package/dist/components/Scrollbar/stories/__mock__.js +1 -1
- package/dist/components/Scrollbar.js +1 -1
- package/dist/components/Search.js +39 -31
- package/dist/components/Segmented/stories/__mock__.js +23 -10
- package/dist/components/Segmented.js +47 -42
- package/dist/components/Select.js +118 -113
- package/dist/components/Swiper/stories/__mock__.js +3 -3
- package/dist/components/Swiper.js +27 -29
- package/dist/components/Switch.js +33 -26
- package/dist/components/Tab/stories/__mock__.js +1 -1
- package/dist/components/Tab.js +59 -69
- package/dist/components/Text.js +1 -2
- package/dist/components/Textarea.js +26 -18
- package/dist/components/Tile.js +21 -17
- package/dist/components/Title.js +3 -4
- package/dist/components/Tooltip.js +3 -4
- package/dist/components/Video/stories/__mocks__.js +1 -1
- package/dist/components/Video.js +3 -4
- package/dist/components/Warning.js +26 -20
- package/dist/context/Notifications.js +38 -42
- package/dist/context/UIContext.js +19 -17
- package/dist/context/UrlAssetPrefix.js +3 -3
- package/dist/css/components/Checkmark/Checkmark.css +2 -0
- package/dist/css/components/DatePeriod/DatePeriod.css +3 -0
- package/dist/css/components/Input/Input.css +0 -8
- package/dist/css/components/InputPassword/InputPassword.css +34 -43
- package/dist/css/components/Tile/Tile.css +3 -3
- package/dist/hoc/urlWithAssetPrefix.js +13 -16
- package/dist/hooks/useActiveClasses/useActiveClasses.helpers.js +13 -40
- package/dist/hooks/useActiveClasses/useActiveClasses.interface.js +1 -1
- package/dist/hooks/useActiveClasses/useActiveClasses.js +25 -29
- package/dist/hooks/useAppearanceConfig/useAppearanceConfig.js +13 -15
- package/dist/hooks/useAppearanceConfig.js +0 -1
- package/dist/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js +21 -28
- package/dist/hooks/useDevicePropsGenerator.js +0 -1
- package/dist/hooks/useDeviceTargetClass.js +0 -1
- package/dist/hooks/useStyles/styleAttributes.js +1 -1
- package/dist/hooks/useStyles/useStyles.js +0 -1
- package/dist/hooks/useStyles.js +0 -1
- package/dist/hooks/useViewportFix.js +5 -5
- package/dist/hooks.js +1 -1
- package/dist/types/components/InputPassword/InputPassword.appearance.d.ts +179 -2
- package/dist/types/components/InputPassword/appearance/inputPasswordDefault.d.ts +7 -4
- package/dist/types/components/InputPassword/appearance/inputPasswordDisabled.d.ts +6 -4
- package/dist/types/components/InputPassword/appearance/inputPasswordError.d.ts +6 -4
- package/dist/types/components/InputPassword/appearance/inputPasswordRequire.d.ts +6 -4
- package/dist/types/components/InputPassword/appearance/inputPasswordShape.d.ts +25 -0
- package/dist/types/components/InputPassword/appearance/inputPasswordSize.d.ts +14 -28
- package/dist/types/components/InputPassword/appearance/inputPasswordStyle.d.ts +5 -5
- package/dist/types/components/InputPassword/appearance/inputPasswordSuccess.d.ts +6 -4
- package/dist/types/components/Response/Response.constant.d.ts +32 -35
- package/dist/types/components/Response/appearance/responseConfirm.d.ts +1 -0
- package/dist/types/components/Response/appearance/responseDanger.d.ts +1 -0
- package/dist/types/components/Response/appearance/responseEmpty.d.ts +1 -0
- package/dist/types/components/Response/appearance/responseError.d.ts +1 -0
- package/dist/types/components/Response/appearance/responseFail.d.ts +1 -0
- package/dist/types/components/Response/appearance/responseNothingFound.d.ts +1 -0
- package/dist/types/components/Response/appearance/responseRefresh.d.ts +1 -0
- package/dist/types/components/Response/appearance/responseSuccess.d.ts +1 -0
- package/dist/types/components/Response/appearance/responseUnableLoadData.d.ts +1 -0
- package/dist/types/components/Response/appearance/responseWarning.d.ts +1 -0
- package/dist/types/components/Select/SelectContainer.d.ts +1 -1
- package/dist/types/components/Tab/appearance/tabSize.d.ts +0 -14
- package/dist/types/components/Tab/appearance/tabSurface.d.ts +7 -7
- package/dist/utils/setViewportProperty.js +3 -3
- package/package.json +14 -14
- package/dist/Avatar_cjs_kuE0Rueg.js +0 -157
- package/dist/Avatar_es_lx7s4Vla.js +0 -153
- package/dist/ChipsGroup_cjs_C8L3ZeD_.js +0 -331
- package/dist/DatePicker_cjs_DsIAoi01.js +0 -183
- package/dist/DatePicker_es_BP5BrEr-.js +0 -179
- package/dist/Divider_cjs_DUYtmwn2.js +0 -97
- package/dist/Divider_es_CCLBFIx6.js +0 -93
- package/dist/DropdownItem_cjs_Bhss6lyM.js +0 -207
- package/dist/DropdownItem_es_BXl6lPJx.js +0 -202
- package/dist/Group_cjs_CsJ6ICKK.js +0 -59
- package/dist/Group_es_DRqIIM9m.js +0 -55
- package/dist/Image_cjs_B6YlGx8G.js +0 -28
- package/dist/Image_es_BvYo_cHH.js +0 -26
- package/dist/Loader_cjs_D3lnxPlI.js +0 -132
- package/dist/Loader_es_BUSqFrCd.js +0 -128
- package/dist/Overlay_cjs_CcfJYN5o.js +0 -41
- package/dist/Overlay_es_DF3DAdxS.js +0 -37
- package/dist/Text_cjs_0EINiUq4.js +0 -68
- package/dist/Text_es_CwV9rjFD.js +0 -64
- package/dist/tslib.es6_cjs_CCZ3TN_7.js +0 -59
- package/dist/tslib.es6_es_Bwu1Cn-t.js +0 -56
|
@@ -4,8 +4,7 @@ import clsx from 'clsx';
|
|
|
4
4
|
import { useAppearanceConfig } from '../hooks/useAppearanceConfig/useAppearanceConfig.js';
|
|
5
5
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
6
6
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
7
|
-
import { I as Icon } from '../
|
|
8
|
-
import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
|
|
7
|
+
import { I as Icon } from '../Icon_es_D5eiycFI.js';
|
|
9
8
|
import 'lodash/camelCase';
|
|
10
9
|
import 'lodash/castArray';
|
|
11
10
|
import 'lodash/upperFirst';
|
|
@@ -22,10 +21,10 @@ import 'lodash/maxBy';
|
|
|
22
21
|
import 'react-inlinesvg';
|
|
23
22
|
import '../hoc/urlWithAssetPrefix.js';
|
|
24
23
|
import '../context/UrlAssetPrefix.js';
|
|
25
|
-
import '../
|
|
26
|
-
import '../
|
|
24
|
+
import '../Link_es_P2b6ya7P.js';
|
|
25
|
+
import '../Text_es_CnymlElo.js';
|
|
27
26
|
|
|
28
|
-
|
|
27
|
+
const heroTitleAppearanceSize = {
|
|
29
28
|
sizeH1: {
|
|
30
29
|
size: 'h1',
|
|
31
30
|
labelTextSize: 'h1',
|
|
@@ -52,30 +51,32 @@ var heroTitleAppearanceSize = {
|
|
|
52
51
|
},
|
|
53
52
|
};
|
|
54
53
|
|
|
55
|
-
|
|
54
|
+
const heroTitleAppearance = {
|
|
55
|
+
...heroTitleAppearanceSize,
|
|
56
|
+
};
|
|
56
57
|
|
|
57
|
-
|
|
58
|
+
const heroTitleConfig = {
|
|
58
59
|
appearance: heroTitleAppearance,
|
|
59
|
-
setAppearance:
|
|
60
|
+
setAppearance: (appearanceConfig) => {
|
|
60
61
|
heroTitleConfig.appearance = appearanceConfig;
|
|
61
62
|
},
|
|
62
63
|
};
|
|
63
64
|
function HeroTitle(props) {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
const { className, appearance, text, afterWrapper, beforeWrapper, dataTour, tag = 'span', before, after, isDisabled, isSkeleton, onClick, children, } = props;
|
|
66
|
+
const appearanceConfig = useAppearanceConfig(appearance, heroTitleConfig, isDisabled);
|
|
67
|
+
const propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
68
|
+
const { directionClass, size, fillClass, textAlignClass, textColorActiveClass, textColorClass, textColorGradientClass, textColorHoverClass, textStyleClass, textTruncateClass, textWeightClass, textWrap, dataTestId, heightClass, iconAfter, iconAfterFill, iconAfterFillIcon, iconAfterFillSize, iconAfterShape, iconAfterSize, iconAfterSrc, iconBadgeAppearance, iconBadgeShape, iconBadgeSize, iconBadgeTextColor, iconBadgeTextSize, iconBadgeValue, iconBefore, iconBeforeFill, iconBeforeFillIcon, iconBeforeFillSize, iconBeforeShape, iconBeforeSize, iconBeforeSrc, svgFillClass, svgFillHoverClass, typeClass, widthClass, wrapperDirectionClass, } = propsGenerator;
|
|
68
69
|
// @ts-expect-error
|
|
69
|
-
|
|
70
|
+
const { styles: heroTitleStyles, wrapper: heroTitleWrapperStyles } = useStyles(props);
|
|
70
71
|
// Element type (h1, h2, ..., h6)
|
|
71
|
-
|
|
72
|
+
const Tag = useMemo(() => {
|
|
72
73
|
if (tag) {
|
|
73
74
|
return tag;
|
|
74
75
|
}
|
|
75
76
|
return size ? size : 'span';
|
|
76
77
|
}, [size, tag]);
|
|
77
|
-
return (jsxs(Tag, { className: clsx(className, 'heroTitle', fillClass &&
|
|
78
|
-
|
|
78
|
+
return (jsxs(Tag, { className: clsx(className, 'heroTitle', fillClass && `fill_${fillClass}`, svgFillClass && `svg_fill_${svgFillClass}`, svgFillHoverClass && `svg_fill_hover_${svgFillHoverClass}`, widthClass && `width_${widthClass}`, heightClass && `height_${heightClass}`, size && `hero-title_size_${size}`, directionClass && `hero-title_direction_${directionClass}`, 'text', textColorClass && `text-color_${textColorClass}`, textColorActiveClass && `text-color_active_${textColorActiveClass}`, textColorHoverClass && `text-color_hover_${textColorHoverClass}`, typeClass && `hero-title_type_${typeClass}`, textColorGradientClass && `text-gradient_${textColorGradientClass}`, textStyleClass && `text-style_${textStyleClass}`, textWeightClass && `text-weight_${textWeightClass}`, textWrap && `word-wrap_${textWrap}`, isSkeleton && 'hero-title_skeleton'), "data-test-id": dataTestId, "data-tour": dataTour, style: heroTitleStyles, onClick: onClick, children: [before, jsxs("span", { className: clsx(textAlignClass && `text-align_${textAlignClass}`, wrapperDirectionClass &&
|
|
79
|
+
`hero-title-direction_${wrapperDirectionClass}`, 'hero-title__wrapper', textTruncateClass && `text-truncate_${textTruncateClass}`), style: heroTitleWrapperStyles, children: [(iconBefore || iconBeforeSrc) && (jsx(Icon, { className: clsx('title__icon_before', iconBadgeValue && 'title__icon_before-badge'), fill: iconBeforeFill, fillSize: iconBeforeFillSize, badgeAppearance: iconBadgeAppearance, badgeClass: 'title__icon_before_badge', badgeShape: iconBadgeShape, badgeSize: iconBadgeSize, badgeTextColor: iconBadgeTextColor, badgeTextSize: iconBadgeTextSize, badgeValue: iconBadgeValue, iconFill: iconBeforeFillIcon, iconSize: iconBeforeSize, imageSrc: iconBeforeSrc, shape: iconBeforeShape, SvgImage: iconBefore })), beforeWrapper, children || text, afterWrapper, (iconAfter || iconAfterSrc) && (jsx(Icon, { className: clsx('title__icon_after', iconBadgeValue && 'title__icon_after-badge'), fill: iconAfterFill, fillSize: iconAfterFillSize, badgeAppearance: iconBadgeAppearance, badgeClass: 'title__icon_after_badge', badgeShape: iconBadgeShape, badgeSize: iconBadgeSize, badgeTextColor: iconBadgeTextColor, badgeTextSize: iconBadgeTextSize, badgeValue: iconBadgeValue, iconFill: iconAfterFillIcon, iconSize: iconAfterSize, imageSrc: iconAfterSrc, shape: iconAfterShape, SvgImage: iconAfter }))] }), after] }));
|
|
79
80
|
}
|
|
80
81
|
|
|
81
82
|
export { HeroTitle, heroTitleAppearance, heroTitleConfig };
|
package/dist/components/Icon.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export { I as Icon, e as iconAppearance, i as iconConfig } from '../
|
|
2
|
-
import '../tslib.es6_es_Bwu1Cn-t.js';
|
|
1
|
+
export { I as Icon, e as iconAppearance, i as iconConfig } from '../Icon_es_D5eiycFI.js';
|
|
3
2
|
import 'react/jsx-runtime';
|
|
4
3
|
import 'react';
|
|
5
4
|
import 'clsx';
|
|
@@ -22,5 +21,5 @@ import '../hooks.js';
|
|
|
22
21
|
import '../hooks/useStyles/styleAttributes.js';
|
|
23
22
|
import '../hooks/useStyles/useStyles.js';
|
|
24
23
|
import 'lodash/maxBy';
|
|
25
|
-
import '../
|
|
26
|
-
import '../
|
|
24
|
+
import '../Link_es_P2b6ya7P.js';
|
|
25
|
+
import '../Text_es_CnymlElo.js';
|
package/dist/components/Image.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
export { I as Image } from '../
|
|
1
|
+
export { I as Image } from '../Image_es_BHec4iVN.js';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'clsx';
|
|
5
5
|
import '../hoc/urlWithAssetPrefix.js';
|
|
6
|
-
import '../tslib.es6_es_Bwu1Cn-t.js';
|
|
7
6
|
import '@itcase/common';
|
|
8
7
|
import '../context/UrlAssetPrefix.js';
|
|
9
8
|
import '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
package/dist/components/Input.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
export { I as Input, a as inputAppearance, i as inputConfig } from '../
|
|
1
|
+
export { I as Input, a as inputAppearance, i as inputConfig } from '../Input_es_BnCXATnh.js';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'clsx';
|
|
5
5
|
import '../hooks/useAppearanceConfig/useAppearanceConfig.js';
|
|
6
|
-
import '../tslib.es6_es_Bwu1Cn-t.js';
|
|
7
6
|
import '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
8
7
|
import 'lodash/camelCase';
|
|
9
8
|
import 'lodash/castArray';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { icons24 } from '@itcase/icons/default';
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useState, useMemo, useCallback } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { useAppearanceConfig } from '../hooks/useAppearanceConfig/useAppearanceConfig.js';
|
|
6
6
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
7
|
-
import { I as Icon } from '../
|
|
7
|
+
import { I as Icon } from '../Icon_es_D5eiycFI.js';
|
|
8
8
|
import 'lodash/camelCase';
|
|
9
9
|
import 'lodash/castArray';
|
|
10
10
|
import 'lodash/upperFirst';
|
|
@@ -22,10 +22,10 @@ import '../hoc/urlWithAssetPrefix.js';
|
|
|
22
22
|
import '../context/UrlAssetPrefix.js';
|
|
23
23
|
import '../hooks/useStyles/useStyles.js';
|
|
24
24
|
import 'lodash/maxBy';
|
|
25
|
-
import '../
|
|
26
|
-
import '../
|
|
25
|
+
import '../Link_es_P2b6ya7P.js';
|
|
26
|
+
import '../Text_es_CnymlElo.js';
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
const inputPasswordAppearanceDefault = {
|
|
29
29
|
defaultPrimary: {
|
|
30
30
|
fill: 'surfaceSecondary',
|
|
31
31
|
borderColor: 'surfaceBorderTertiary',
|
|
@@ -33,8 +33,10 @@ var inputPasswordAppearanceDefault = {
|
|
|
33
33
|
textColor: 'surfaceTextPrimary',
|
|
34
34
|
textColorDisabled: 'surfaceTextDisabled',
|
|
35
35
|
caret: 'secondaryItemSecondary',
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
iconFill: 'surfaceItemQuaternary',
|
|
37
|
+
iconRevealableHide: icons24.View.HideValue,
|
|
38
|
+
iconRevealableShow: icons24.View.ShowValue,
|
|
39
|
+
placeholderTextColor: 'surfaceTextQuaternary',
|
|
38
40
|
},
|
|
39
41
|
defaultSecondary: {
|
|
40
42
|
fill: 'surfacePrimary',
|
|
@@ -43,192 +45,220 @@ var inputPasswordAppearanceDefault = {
|
|
|
43
45
|
textColor: 'surfaceTextPrimary',
|
|
44
46
|
textColorDisabled: 'surfaceTextDisabled',
|
|
45
47
|
caret: 'secondaryItemSecondary',
|
|
46
|
-
|
|
47
|
-
|
|
48
|
+
iconFill: 'surfaceItemQuaternary',
|
|
49
|
+
iconRevealableHide: icons24.View.HideValue,
|
|
50
|
+
iconRevealableShow: icons24.View.ShowValue,
|
|
48
51
|
placeholderTextColor: 'surfaceTextQuaternary',
|
|
49
52
|
},
|
|
50
53
|
};
|
|
51
54
|
|
|
52
|
-
|
|
55
|
+
const inputPasswordAppearanceDisabled = {
|
|
53
56
|
disabledPrimary: {
|
|
54
57
|
fill: 'surfaceFillDisabled',
|
|
55
58
|
borderColor: 'errorBorderQuaternary',
|
|
56
59
|
borderHover: 'errorBorderQuaternary',
|
|
57
60
|
textColor: 'surfaceTextQuaternary',
|
|
58
|
-
|
|
59
|
-
|
|
61
|
+
iconFill: 'surfaceItemQuaternary',
|
|
62
|
+
iconRevealableHide: icons24.View.HideValue,
|
|
63
|
+
iconRevealableShow: icons24.View.ShowValue,
|
|
60
64
|
placeholderTextColor: 'surfaceTextQuaternary',
|
|
61
65
|
},
|
|
62
66
|
disabledSecondary: {
|
|
63
67
|
fill: 'surfaceSecondary',
|
|
64
68
|
borderColor: 'surfaceBorderTertiary',
|
|
65
69
|
borderHover: 'surfaceBorderQuaternary',
|
|
66
|
-
|
|
67
|
-
|
|
70
|
+
iconFill: 'surfaceItemQuaternary',
|
|
71
|
+
iconRevealableHide: icons24.View.HideValue,
|
|
72
|
+
iconRevealableShow: icons24.View.ShowValue,
|
|
68
73
|
placeholderTextColor: 'surfaceTextSecondary',
|
|
69
74
|
},
|
|
70
75
|
};
|
|
71
76
|
|
|
72
|
-
|
|
77
|
+
const inputPasswordAppearanceError = {
|
|
73
78
|
errorPrimary: {
|
|
74
79
|
fill: 'errorTertiary',
|
|
75
80
|
borderColor: 'errorBorderQuaternary',
|
|
76
81
|
borderHover: 'errorBorderQuaternary',
|
|
77
82
|
textColor: 'surfaceTextPrimary',
|
|
78
|
-
|
|
79
|
-
|
|
83
|
+
iconFill: 'surfaceItemQuaternary',
|
|
84
|
+
iconRevealableHide: icons24.View.HideValue,
|
|
85
|
+
iconRevealableShow: icons24.View.ShowValue,
|
|
80
86
|
placeholderTextColor: 'surfaceTextQuaternary',
|
|
81
87
|
},
|
|
82
88
|
errorSecondary: {
|
|
83
89
|
fill: 'errorSecondary',
|
|
84
90
|
borderColor: 'errorBorderTertiary',
|
|
85
91
|
borderHover: 'errorBorderQuaternary',
|
|
86
|
-
|
|
87
|
-
|
|
92
|
+
iconFill: 'surfaceItemQuaternary',
|
|
93
|
+
iconRevealableHide: icons24.View.HideValue,
|
|
94
|
+
iconRevealableShow: icons24.View.ShowValue,
|
|
88
95
|
placeholderTextColor: 'errorTextSecondary',
|
|
89
96
|
},
|
|
90
97
|
};
|
|
91
98
|
|
|
92
|
-
|
|
99
|
+
const inputPasswordAppearanceRequire = {
|
|
93
100
|
requirePrimary: {
|
|
94
101
|
fill: 'warningTertiary',
|
|
95
102
|
borderColor: 'warningBorderQuaternary',
|
|
96
103
|
borderHover: 'warningBorderQuaternary',
|
|
97
104
|
textColor: 'surfaceTextPrimary',
|
|
98
|
-
|
|
99
|
-
|
|
105
|
+
iconFill: 'surfaceItemQuaternary',
|
|
106
|
+
iconRevealableHide: icons24.View.HideValue,
|
|
107
|
+
iconRevealableShow: icons24.View.ShowValue,
|
|
100
108
|
placeholderTextColor: 'surfaceTextQuaternary',
|
|
101
109
|
},
|
|
102
110
|
requireSecondary: {
|
|
103
111
|
fill: 'surfaceSecondary',
|
|
104
112
|
borderColor: 'surfaceBorderTertiary',
|
|
105
113
|
borderHover: 'surfaceBorderQuaternary',
|
|
106
|
-
|
|
107
|
-
|
|
114
|
+
iconFill: 'surfaceItemQuaternary',
|
|
115
|
+
iconRevealableHide: icons24.View.HideValue,
|
|
116
|
+
iconRevealableShow: icons24.View.ShowValue,
|
|
108
117
|
placeholderTextColor: 'surfaceTextSecondary',
|
|
109
118
|
},
|
|
110
119
|
};
|
|
111
120
|
|
|
112
|
-
|
|
121
|
+
const inputPasswordAppearanceShape = {
|
|
122
|
+
circular: {
|
|
123
|
+
shape: 'circular',
|
|
124
|
+
},
|
|
125
|
+
rounded: {
|
|
126
|
+
shape: 'rounded',
|
|
127
|
+
},
|
|
128
|
+
roundedXL: {
|
|
129
|
+
shape: 'rounded',
|
|
130
|
+
shapeStrength: '2m',
|
|
131
|
+
},
|
|
132
|
+
roundedL: {
|
|
133
|
+
shape: 'rounded',
|
|
134
|
+
shapeStrength: '1_5m',
|
|
135
|
+
},
|
|
136
|
+
roundedM: {
|
|
137
|
+
shape: 'rounded',
|
|
138
|
+
shapeStrength: '1m',
|
|
139
|
+
},
|
|
140
|
+
roundedS: {
|
|
141
|
+
shape: 'rounded',
|
|
142
|
+
shapeStrength: '0_5m',
|
|
143
|
+
},
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
const inputPasswordAppearanceSize = {
|
|
113
147
|
sizeXXL: {
|
|
114
148
|
size: 'xxl',
|
|
115
149
|
textSize: 'l',
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
iconBeforeFillSize: '24',
|
|
119
|
-
iconBeforeSize: '24',
|
|
150
|
+
iconFillSize: '24',
|
|
151
|
+
iconSize: '24',
|
|
120
152
|
},
|
|
121
153
|
sizeXL: {
|
|
122
154
|
size: 'xl',
|
|
123
155
|
textSize: 's',
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
iconBeforeFillSize: '24',
|
|
127
|
-
iconBeforeSize: '24',
|
|
156
|
+
iconFillSize: '24',
|
|
157
|
+
iconSize: '24',
|
|
128
158
|
},
|
|
129
159
|
sizeL: {
|
|
130
160
|
size: 'l',
|
|
131
161
|
textSize: 's',
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
iconBeforeFillSize: '24',
|
|
135
|
-
iconBeforeSize: '24',
|
|
162
|
+
iconFillSize: '24',
|
|
163
|
+
iconSize: '24',
|
|
136
164
|
},
|
|
137
165
|
sizeM: {
|
|
138
166
|
size: 'm',
|
|
139
167
|
textSize: 'm',
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
iconBeforeFillSize: '24',
|
|
143
|
-
iconBeforeSize: '24',
|
|
168
|
+
iconFillSize: '24',
|
|
169
|
+
iconSize: '24',
|
|
144
170
|
},
|
|
145
171
|
sizeS: {
|
|
146
172
|
size: 's',
|
|
147
173
|
textSize: 's',
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
iconBeforeFillSize: '24',
|
|
151
|
-
iconBeforeSize: '24',
|
|
174
|
+
iconFillSize: '24',
|
|
175
|
+
iconSize: '24',
|
|
152
176
|
},
|
|
153
177
|
sizeXS: {
|
|
154
178
|
size: 'xs',
|
|
155
179
|
textSize: 's',
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
iconBeforeFillSize: '24',
|
|
159
|
-
iconBeforeSize: '24',
|
|
180
|
+
iconFillSize: '24',
|
|
181
|
+
iconSize: '24',
|
|
160
182
|
},
|
|
161
183
|
sizeXXS: {
|
|
162
184
|
size: 'xxs',
|
|
163
185
|
textSize: 's',
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
iconBeforeFillSize: '24',
|
|
167
|
-
iconBeforeSize: '24',
|
|
186
|
+
iconFillSize: '24',
|
|
187
|
+
iconSize: '24',
|
|
168
188
|
},
|
|
169
189
|
};
|
|
170
190
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
borderColor: '
|
|
174
|
-
},
|
|
175
|
-
ghost: {
|
|
176
|
-
fill: 'none',
|
|
177
|
-
borderColor: '0',
|
|
191
|
+
const inputPasswordAppearanceStyle = {
|
|
192
|
+
solid: {
|
|
193
|
+
borderColor: 'none',
|
|
178
194
|
},
|
|
179
195
|
outlined: {
|
|
180
196
|
fill: 'none',
|
|
181
197
|
},
|
|
182
|
-
|
|
183
|
-
borderColor: '
|
|
198
|
+
full: {
|
|
199
|
+
borderColor: 'none',
|
|
200
|
+
},
|
|
201
|
+
ghost: {
|
|
202
|
+
fill: 'none',
|
|
203
|
+
borderColor: 'none',
|
|
184
204
|
},
|
|
185
205
|
};
|
|
186
206
|
|
|
187
|
-
|
|
207
|
+
const inputPasswordAppearanceSuccess = {
|
|
188
208
|
successPrimary: {
|
|
189
209
|
fill: 'successTertiary',
|
|
190
210
|
borderColor: 'successBorderQuaternary',
|
|
191
211
|
borderHover: 'successBorderQuaternary',
|
|
192
212
|
textColor: 'surfaceTextPrimary',
|
|
193
|
-
|
|
194
|
-
|
|
213
|
+
iconFill: 'surfaceItemQuaternary',
|
|
214
|
+
iconRevealableHide: icons24.View.HideValue,
|
|
215
|
+
iconRevealableShow: icons24.View.ShowValue,
|
|
195
216
|
placeholderTextColor: 'surfaceTextQuaternary',
|
|
196
217
|
},
|
|
197
218
|
successSecondary: {
|
|
198
219
|
fill: 'surfaceSecondary',
|
|
199
220
|
borderColor: 'surfaceBorderTertiary',
|
|
200
221
|
borderHover: 'surfaceBorderQuaternary',
|
|
201
|
-
|
|
202
|
-
|
|
222
|
+
iconFill: 'surfaceItemQuaternary',
|
|
223
|
+
iconRevealableHide: icons24.View.HideValue,
|
|
224
|
+
iconRevealableShow: icons24.View.ShowValue,
|
|
203
225
|
placeholderTextColor: 'surfaceTextSecondary',
|
|
204
226
|
},
|
|
205
227
|
};
|
|
206
228
|
|
|
207
|
-
|
|
229
|
+
const inputPasswordAppearance = {
|
|
230
|
+
...inputPasswordAppearanceSize,
|
|
231
|
+
...inputPasswordAppearanceDisabled,
|
|
232
|
+
...inputPasswordAppearanceRequire,
|
|
233
|
+
...inputPasswordAppearanceStyle,
|
|
234
|
+
...inputPasswordAppearanceError,
|
|
235
|
+
...inputPasswordAppearanceDefault,
|
|
236
|
+
...inputPasswordAppearanceSuccess,
|
|
237
|
+
...inputPasswordAppearanceShape,
|
|
238
|
+
};
|
|
208
239
|
|
|
209
|
-
|
|
240
|
+
const inputPasswordConfig = {
|
|
210
241
|
appearance: inputPasswordAppearance,
|
|
211
|
-
setAppearance:
|
|
242
|
+
setAppearance: (appearanceConfig) => {
|
|
212
243
|
inputPasswordConfig.appearance = appearanceConfig;
|
|
213
244
|
},
|
|
214
245
|
};
|
|
215
246
|
function InputPassword(props) {
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
var _a = useState(false), isRevealed = _a[0], setIsRevealed = _a[1];
|
|
220
|
-
var inputType = useMemo(function () {
|
|
247
|
+
const { id, appearance, className, placeholder, value, isDisabled, onBlur, onChange, onFocus, onKeyDown, } = props;
|
|
248
|
+
const [isRevealed, setIsRevealed] = useState(false);
|
|
249
|
+
const inputType = useMemo(() => {
|
|
221
250
|
return isRevealed ? 'text' : 'password';
|
|
222
251
|
}, [isRevealed]);
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
setIsRevealed(
|
|
226
|
-
}, [
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
return (jsxs("div", { className: "input-password", children: [jsx("input", { id: String(id), className: clsx(className, 'input-password__input', (textSizeClass || textColorClass || textWeightClass) && 'text',
|
|
231
|
-
|
|
252
|
+
const onClickIconReveal = useCallback((event) => {
|
|
253
|
+
event.preventDefault();
|
|
254
|
+
setIsRevealed((prev) => !prev);
|
|
255
|
+
}, []);
|
|
256
|
+
const appearanceConfig = useAppearanceConfig(appearance, inputPasswordConfig, isDisabled);
|
|
257
|
+
const propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
258
|
+
const { fillClass, fillHoverClass, borderColorClass, borderColorHoverClass, borderWidthClass, textColorClass, textSizeClass, textWeightClass, caretClass, iconFill, iconFillHover, iconRevealableHide, iconRevealableShow, iconShape, iconSize, imageRevealableHide, imageRevealableShow, placeholderTextColorClass, shapeClass, shapeStrengthClass, sizeClass, widthClass, } = propsGenerator;
|
|
259
|
+
return (jsxs("div", { className: "input-password", children: [jsx("input", { id: String(id), className: clsx(className, 'input-password__input', (textSizeClass || textColorClass || textWeightClass) && 'text', borderColorClass && `border-color_${borderColorClass}`, borderColorHoverClass &&
|
|
260
|
+
`border-color_hover_${borderColorHoverClass}`, borderWidthClass && `border-width_${borderWidthClass}`, caretClass && `caret-color_${caretClass}`, fillClass && `fill_${fillClass}`, fillHoverClass && `fill_hover_${fillHoverClass}`, placeholderTextColorClass &&
|
|
261
|
+
`placeholder-text-color_${placeholderTextColorClass}`, shapeClass && `shape_${shapeClass}`, shapeStrengthClass && `shape-strength_${shapeStrengthClass}`, sizeClass && `input-password__input_size_${sizeClass}`, textColorClass && `text-color_${textColorClass}`, textColorClass && `text-color_${textColorClass}`, textSizeClass && `text_size_${textSizeClass}`, textWeightClass && `text-weight_${textWeightClass}`, widthClass && `width_${widthClass}`), type: inputType, disabled: isDisabled, placeholder: placeholder, value: value, onBlur: onBlur, onChange: onChange, onFocus: onFocus, onKeyDown: onKeyDown }), jsx(Icon, { className: "input-password__icon", size: iconSize, iconFill: iconFill, iconFillHover: iconFillHover, imageSrc: isRevealed ? imageRevealableHide : imageRevealableShow, shape: iconShape, SvgImage: isRevealed ? iconRevealableHide : iconRevealableShow, onClick: onClickIconReveal })] }));
|
|
232
262
|
}
|
|
233
263
|
|
|
234
264
|
export { InputPassword, inputPasswordAppearance, inputPasswordConfig };
|
package/dist/components/Label.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
export { L as Label, a as labelAppearance, l as labelConfig } from '../
|
|
1
|
+
export { L as Label, a as labelAppearance, l as labelConfig } from '../Label_es_DCqpSw_F.js';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'clsx';
|
|
5
5
|
import '../hooks/useAppearanceConfig/useAppearanceConfig.js';
|
|
6
|
-
import '../tslib.es6_es_Bwu1Cn-t.js';
|
|
7
6
|
import '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
8
7
|
import 'lodash/camelCase';
|
|
9
8
|
import 'lodash/castArray';
|
|
@@ -19,9 +18,9 @@ import '../hooks.js';
|
|
|
19
18
|
import '../hooks/useStyles/styleAttributes.js';
|
|
20
19
|
import '../hooks/useStyles/useStyles.js';
|
|
21
20
|
import 'lodash/maxBy';
|
|
22
|
-
import '../
|
|
21
|
+
import '../Icon_es_D5eiycFI.js';
|
|
23
22
|
import 'react-inlinesvg';
|
|
24
23
|
import '../hoc/urlWithAssetPrefix.js';
|
|
25
24
|
import '../context/UrlAssetPrefix.js';
|
|
26
|
-
import '../
|
|
27
|
-
import '../
|
|
25
|
+
import '../Link_es_P2b6ya7P.js';
|
|
26
|
+
import '../Text_es_CnymlElo.js';
|
package/dist/components/Link.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export { L as Link, a as LinkWrapper, b as linkAppearance, l as linkConfig } from '../
|
|
2
|
-
import '../tslib.es6_es_Bwu1Cn-t.js';
|
|
1
|
+
export { L as Link, a as LinkWrapper, b as linkAppearance, l as linkConfig } from '../Link_es_P2b6ya7P.js';
|
|
3
2
|
import 'react/jsx-runtime';
|
|
4
3
|
import 'react';
|
|
5
4
|
import 'clsx';
|