@itcase/ui 1.8.123 → 1.8.125
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_AwXEUY8j.js +161 -0
- package/dist/Avatar_es_BtlaCRc5.js +157 -0
- package/dist/{Button_cjs_Ce97psFT.js → Button_cjs_C34BU1BK.js} +46 -34
- package/dist/{Button_es_CZss7cXh.js → Button_es_DnlzLBUT.js} +46 -34
- package/dist/ChipsGroup_cjs_DfAKN5CA.js +344 -0
- package/dist/{ChipsGroup_es_ayPPUwQ7.js → ChipsGroup_es_DBKY2UyF.js} +48 -35
- package/dist/DatePicker_cjs_DfbeIL2m.js +182 -0
- package/dist/DatePicker_es_BIJNx427.js +178 -0
- package/dist/Divider_cjs_DrmV2ezS.js +105 -0
- package/dist/Divider_es_BiYozVBS.js +101 -0
- package/dist/DropdownItem_cjs_vHuzXW9M.js +211 -0
- package/dist/DropdownItem_es_DVHWWgnU.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_BVLGzj7Y.js} +170 -157
- package/dist/{Icon_es_BrwLifge.js → Icon_es_DkVkzTha.js} +170 -157
- package/dist/Image_cjs_BUM81t4Y.js +28 -0
- package/dist/Image_es_C-IjVkKX.js +26 -0
- package/dist/{Input_cjs_DRPK_RHK.js → Input_cjs_DDi5JVAV.js} +27 -19
- package/dist/{Input_es_Cv5nEb_n.js → Input_es_BnCXATnh.js} +27 -19
- package/dist/{Label_cjs_DMoaOoHi.js → Label_cjs_DwAmukik.js} +45 -33
- package/dist/{Label_es_SULlg9bL.js → Label_es_B2kcstsG.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 +34 -26
- 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 +45 -34
- 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 +46 -41
- 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 +33 -29
- 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 +34 -26
- 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 +45 -34
- 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 +46 -41
- 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 +33 -29
- 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/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/Button/Button.appearance.d.ts +232 -232
- package/dist/types/components/Button/Button.d.ts +4 -4
- package/dist/types/components/Button/Button.interface.d.ts +5 -5
- package/dist/types/components/Pagination/Pagination.d.ts +1 -1
- package/dist/types/components/Select/SelectContainer.d.ts +1 -1
- package/dist/types/components/Text/Text.appearance.d.ts +58 -58
- package/dist/types/components/Text/Text.interface.d.ts +1 -1
- package/dist/utils/setViewportProperty.js +3 -3
- package/package.json +3 -3
- package/dist/Avatar_cjs_CLJnKU39.js +0 -157
- package/dist/Avatar_es_BgN-fbOj.js +0 -153
- package/dist/ChipsGroup_cjs_C8L3ZeD_.js +0 -331
- package/dist/DatePicker_cjs_BzEtDAb8.js +0 -183
- package/dist/DatePicker_es_DRyCMO0I.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_DRhhc66R.js +0 -29
- package/dist/Image_es_BpMidmve.js +0 -27
- 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
|
@@ -3,8 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { useAppearanceConfig } from '../hooks/useAppearanceConfig/useAppearanceConfig.js';
|
|
5
5
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
6
|
-
import { T as Text } from '../
|
|
7
|
-
import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
|
|
6
|
+
import { T as Text } from '../Text_es_CnymlElo.js';
|
|
8
7
|
import 'lodash/camelCase';
|
|
9
8
|
import 'lodash/castArray';
|
|
10
9
|
import 'lodash/upperFirst';
|
|
@@ -20,7 +19,7 @@ import '../hooks/useStyles/styleAttributes.js';
|
|
|
20
19
|
import '../hooks/useStyles/useStyles.js';
|
|
21
20
|
import 'lodash/maxBy';
|
|
22
21
|
|
|
23
|
-
|
|
22
|
+
const switchAppearanceDefault = {
|
|
24
23
|
defaultPrimary: {
|
|
25
24
|
fill: 'surfaceTertiary',
|
|
26
25
|
fillActive: 'successTertiary',
|
|
@@ -31,7 +30,7 @@ var switchAppearanceDefault = {
|
|
|
31
30
|
},
|
|
32
31
|
};
|
|
33
32
|
|
|
34
|
-
|
|
33
|
+
const switchAppearanceDisabled = {
|
|
35
34
|
disabledPrimary: {
|
|
36
35
|
fill: 'surfaceDisabled',
|
|
37
36
|
fillActive: 'surfaceDisabled',
|
|
@@ -42,7 +41,7 @@ var switchAppearanceDisabled = {
|
|
|
42
41
|
},
|
|
43
42
|
};
|
|
44
43
|
|
|
45
|
-
|
|
44
|
+
const switchAppearanceError = {
|
|
46
45
|
errorPrimary: {
|
|
47
46
|
fill: 'errorPrimary',
|
|
48
47
|
fillActive: 'errorSecondary',
|
|
@@ -53,7 +52,7 @@ var switchAppearanceError = {
|
|
|
53
52
|
},
|
|
54
53
|
};
|
|
55
54
|
|
|
56
|
-
|
|
55
|
+
const switchAppearanceRequire = {
|
|
57
56
|
requirePrimary: {
|
|
58
57
|
fill: 'warningPrimary',
|
|
59
58
|
fillActive: 'warningSecondary',
|
|
@@ -64,7 +63,7 @@ var switchAppearanceRequire = {
|
|
|
64
63
|
},
|
|
65
64
|
};
|
|
66
65
|
|
|
67
|
-
|
|
66
|
+
const switchAppearanceSize = {
|
|
68
67
|
sizeL: {
|
|
69
68
|
size: 'l',
|
|
70
69
|
titleTextSize: 'l',
|
|
@@ -82,7 +81,7 @@ var switchAppearanceSize = {
|
|
|
82
81
|
},
|
|
83
82
|
};
|
|
84
83
|
|
|
85
|
-
|
|
84
|
+
const switchAppearanceStyle = {
|
|
86
85
|
solid: {
|
|
87
86
|
borderColor: 'none',
|
|
88
87
|
},
|
|
@@ -98,7 +97,7 @@ var switchAppearanceStyle = {
|
|
|
98
97
|
},
|
|
99
98
|
};
|
|
100
99
|
|
|
101
|
-
|
|
100
|
+
const switchAppearanceSuccess = {
|
|
102
101
|
successPrimary: {
|
|
103
102
|
fill: 'successPrimary',
|
|
104
103
|
fillActive: 'successPrimary',
|
|
@@ -109,32 +108,40 @@ var switchAppearanceSuccess = {
|
|
|
109
108
|
},
|
|
110
109
|
};
|
|
111
110
|
|
|
112
|
-
|
|
111
|
+
const switchAppearance = {
|
|
112
|
+
...switchAppearanceSize,
|
|
113
|
+
...switchAppearanceDisabled,
|
|
114
|
+
...switchAppearanceRequire,
|
|
115
|
+
...switchAppearanceStyle,
|
|
116
|
+
...switchAppearanceError,
|
|
117
|
+
...switchAppearanceDefault,
|
|
118
|
+
...switchAppearanceSuccess,
|
|
119
|
+
};
|
|
113
120
|
|
|
114
|
-
|
|
121
|
+
const switchConfig = {
|
|
115
122
|
appearance: switchAppearance,
|
|
116
|
-
setAppearance:
|
|
123
|
+
setAppearance: (appearanceConfig) => {
|
|
117
124
|
switchConfig.appearance = appearanceConfig;
|
|
118
125
|
},
|
|
119
126
|
};
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
return (jsxs("div", { className: clsx('switch', className, align &&
|
|
127
|
+
const Switch = React.forwardRef(function Switch(props, ref) {
|
|
128
|
+
const { id, className, appearance, align = 'left', title, desc, isDisabled, isActive, onChange, } = props;
|
|
129
|
+
const appearanceConfig = useAppearanceConfig(appearance, switchConfig, isDisabled);
|
|
130
|
+
const propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
131
|
+
const { size, fillActiveClass, fillActiveHoverClass, fillClass, fillHoverClass, fillToggleActiveClass, fillToggleActiveHoverClass, fillToggleClass, fillToggleHoverClass, titleTextColor, titleTextSize, descTextColor, descTextSize, } = propsGenerator;
|
|
132
|
+
return (jsxs("div", { className: clsx('switch', className, align && `switch_align_${align}`, size && `switch_size_${size}`), children: [jsxs("div", { className: "switch__wrapper", children: [title && (jsx(Text, { className: clsx('switch__title'), size: titleTextSize, textColor: titleTextColor, children: title })), desc && (jsx(Text, { className: clsx('switch__desc'), size: descTextSize, textColor: descTextColor, children: desc }))] }), jsxs("div", { className: 'switch__item', children: [jsx("input", { id: id, className: "switch__checkbox", type: "checkbox",
|
|
126
133
|
// @ts-expect-error
|
|
127
134
|
ref: ref, disabled: isDisabled && 'disabled', checked: isActive && 'checked', onChange: onChange }), jsx("div", { className: clsx('switch__bg', !isActive
|
|
128
|
-
? fillClass &&
|
|
129
|
-
: fillActiveClass &&
|
|
130
|
-
? fillHoverClass &&
|
|
135
|
+
? fillClass && `fill_${fillClass}`
|
|
136
|
+
: fillActiveClass && `fill_active_${fillActiveClass}`, !isActive
|
|
137
|
+
? fillHoverClass && `fill_hover_${fillHoverClass}`
|
|
131
138
|
: fillActiveHoverClass &&
|
|
132
|
-
|
|
133
|
-
? fillToggleClass &&
|
|
134
|
-
: fillToggleActiveClass &&
|
|
135
|
-
? fillToggleHoverClass &&
|
|
139
|
+
`fill_active_hover_${fillActiveHoverClass}`), children: "\u00A0" }), jsx("div", { className: clsx('switch__toggle', !isActive
|
|
140
|
+
? fillToggleClass && `fill_${fillToggleClass}`
|
|
141
|
+
: fillToggleActiveClass && `fill_active_${fillToggleActiveClass}`, !isActive
|
|
142
|
+
? fillToggleHoverClass && `fill_hover_${fillToggleHoverClass}`
|
|
136
143
|
: fillToggleActiveHoverClass &&
|
|
137
|
-
|
|
144
|
+
`fill_active_hover_${fillToggleActiveHoverClass}`), children: "\u00A0" })] })] }));
|
|
138
145
|
});
|
|
139
146
|
|
|
140
147
|
export { Switch, switchAppearance, switchConfig };
|
package/dist/components/Tab.js
CHANGED
|
@@ -5,11 +5,10 @@ import { useActiveClasses } from '../hooks/useActiveClasses/useActiveClasses.js'
|
|
|
5
5
|
import { useAppearanceConfig } from '../hooks/useAppearanceConfig/useAppearanceConfig.js';
|
|
6
6
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
7
7
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
8
|
-
import { B as Badge, I as Icon } from '../
|
|
9
|
-
import { D as Divider } from '../
|
|
10
|
-
import { L as Link } from '../
|
|
11
|
-
import { T as Text } from '../
|
|
12
|
-
import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
|
|
8
|
+
import { B as Badge, I as Icon } from '../Icon_es_DkVkzTha.js';
|
|
9
|
+
import { D as Divider } from '../Divider_es_BiYozVBS.js';
|
|
10
|
+
import { L as Link } from '../Link_es_P2b6ya7P.js';
|
|
11
|
+
import { T as Text } from '../Text_es_CnymlElo.js';
|
|
13
12
|
import '../hooks/useActiveClasses/useActiveClasses.helpers.js';
|
|
14
13
|
import 'lodash/camelCase';
|
|
15
14
|
import 'lodash/castArray';
|
|
@@ -28,7 +27,7 @@ import 'react-inlinesvg';
|
|
|
28
27
|
import '../hoc/urlWithAssetPrefix.js';
|
|
29
28
|
import '../context/UrlAssetPrefix.js';
|
|
30
29
|
|
|
31
|
-
|
|
30
|
+
const tabAppearanceError = {
|
|
32
31
|
errorPrimary: {
|
|
33
32
|
fill: 'errorPrimary',
|
|
34
33
|
fillDisabled: 'errorDisabled',
|
|
@@ -41,7 +40,7 @@ var tabAppearanceError = {
|
|
|
41
40
|
},
|
|
42
41
|
};
|
|
43
42
|
|
|
44
|
-
|
|
43
|
+
const tabAppearanceSize = {
|
|
45
44
|
sizeXXL: {
|
|
46
45
|
size: 'xxl',
|
|
47
46
|
labelTextSize: 's',
|
|
@@ -85,7 +84,7 @@ var tabAppearanceSize = {
|
|
|
85
84
|
},
|
|
86
85
|
};
|
|
87
86
|
|
|
88
|
-
|
|
87
|
+
const tabAppearanceStyle = {
|
|
89
88
|
solid: {
|
|
90
89
|
borderColor: 'none',
|
|
91
90
|
borderColorActive: 'none',
|
|
@@ -101,7 +100,7 @@ var tabAppearanceStyle = {
|
|
|
101
100
|
},
|
|
102
101
|
};
|
|
103
102
|
|
|
104
|
-
|
|
103
|
+
const tabAppearanceSuccess = {
|
|
105
104
|
successPrimary: {
|
|
106
105
|
fill: 'successPrimary',
|
|
107
106
|
fillDisabled: 'successDisabled',
|
|
@@ -114,7 +113,7 @@ var tabAppearanceSuccess = {
|
|
|
114
113
|
},
|
|
115
114
|
};
|
|
116
115
|
|
|
117
|
-
|
|
116
|
+
const tabAppearanceSurface = {
|
|
118
117
|
surfacePrimary: {
|
|
119
118
|
fill: 'surfacePrimary',
|
|
120
119
|
fillActive: 'surfacePrimary',
|
|
@@ -178,7 +177,7 @@ var tabAppearanceSurface = {
|
|
|
178
177
|
},
|
|
179
178
|
};
|
|
180
179
|
|
|
181
|
-
|
|
180
|
+
const tabAppearanceWarning = {
|
|
182
181
|
warningPrimary: {
|
|
183
182
|
fill: 'warningPrimary',
|
|
184
183
|
fillDisabled: 'warningDisabled',
|
|
@@ -191,38 +190,43 @@ var tabAppearanceWarning = {
|
|
|
191
190
|
},
|
|
192
191
|
};
|
|
193
192
|
|
|
194
|
-
|
|
193
|
+
const tabAppearance = {
|
|
194
|
+
...tabAppearanceWarning,
|
|
195
|
+
...tabAppearanceError,
|
|
196
|
+
...tabAppearanceSuccess,
|
|
197
|
+
...tabAppearanceSurface,
|
|
198
|
+
...tabAppearanceSize,
|
|
199
|
+
...tabAppearanceStyle,
|
|
200
|
+
};
|
|
195
201
|
|
|
196
|
-
|
|
202
|
+
const tabConfig = {
|
|
197
203
|
appearance: tabAppearance,
|
|
198
|
-
setAppearance:
|
|
204
|
+
setAppearance: (appearanceConfig) => {
|
|
199
205
|
tabConfig.appearance = appearanceConfig;
|
|
200
206
|
},
|
|
201
207
|
};
|
|
202
208
|
function Tab(props) {
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
209
|
+
const { appearance, className, dataTestId, dataTour, label, badgeValue, href, link, rel, target, before, after, isActive = false, isDisabled = false, isSkeleton, onClick, onMouseEnter, children, } = props;
|
|
210
|
+
const appearanceConfig = useAppearanceConfig(appearance, tabConfig, isDisabled);
|
|
211
|
+
const propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
212
|
+
const { rootClasses } = useActiveClasses({
|
|
207
213
|
propsGenerator: propsGenerator,
|
|
208
214
|
isActive: isActive,
|
|
209
215
|
isDisabled: isDisabled,
|
|
210
|
-
})
|
|
211
|
-
|
|
216
|
+
});
|
|
217
|
+
const { justifyContentClass, alignClass, labelTextAlign, labelTextColor, labelTextColorActive, labelTextColorActiveHover, labelTextColorHover, labelTextSize, labelTextStyle, labelTextWeight, labelTextWrap, badgeAppearance, badgeAppearanceSize, badgeShape, badgeSize, badgeTextColor, badgeTextSize, dividerFill, dividerFillActive, dividerFillActiveHover, dividerFillDisabled, dividerFillHover, dividerSize, icon, iconFill, iconFillIcon, iconFillSize, iconShape, iconSize, iconSrc, linkFill, shapeClass, shapeStrengthClass, sizeClass, widthClass, } = propsGenerator;
|
|
212
218
|
// @ts-expect-error
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
console.log(badgeAppearanceSize);
|
|
216
|
-
return (jsx("div", { className: clsx('tab', className, rootClasses, isActive && 'tab_state_active', isDisabled && 'tab_state_disabled', sizeClass && "tab_size_".concat(sizeClass), shapeClass && "shape_".concat(shapeClass), shapeStrengthClass && "shape-strength_".concat(shapeStrengthClass), widthClass && "width_".concat(widthClass), justifyContentClass && "tab_justify-content_".concat(justifyContentClass), isSkeleton && "tab_skeleton", onClick && 'cursor_type_pointer'), "data-test-id": dataTestId && "".concat(dataTestId, "Tab"), "data-tour": dataTour, style: tab, onClick: onClick, onMouseEnter: onMouseEnter, children: jsxs(Link, { className: clsx('tab__link', alignDirectionClass && "align_".concat(alignDirectionClass), alignClass && "align_".concat(alignClass), !isDisabled && 'cursor_type_pointer'), fill: linkFill, href: link || href, rel: rel, target: target, children: [before, children || (jsxs(React.Fragment, { children: [jsxs("div", { className: "tab__wrapper", children: [label && (jsx(Text, { className: "tab__label", size: labelTextSize, textAlign: labelTextAlign, textColor: labelTextColor, textColorActive: labelTextColorActive, textColorHover: labelTextColorHover, textColorHoverActive: labelTextColorActiveHover, textStyle: labelTextStyle, textWeight: labelTextWeight, textWrap: labelTextWrap, isActive: isActive, isDisabled: isDisabled, children: label })), Boolean(badgeValue) && (jsx(Badge, { appearance: "".concat(badgeAppearance, " ").concat(badgeAppearanceSize), size: badgeSize, textColor: badgeTextColor, textSize: badgeTextSize, shape: badgeShape, value: badgeValue })), (icon || iconSrc) && (jsx(Icon, { className: clsx('tab__icon_after'), fill: iconFill, fillSize: iconFillSize, iconFill: iconFillIcon, iconSize: iconSize, imageSrc: iconSrc, shape: iconShape, SvgImage: icon }))] }), jsx(Divider, { className: clsx('tab__divider'), width: "fill", direction: "horizontal", size: dividerSize, fill: dividerFill, fillActive: dividerFillActive, fillActiveHover: dividerFillActiveHover, fillDisabled: dividerFillDisabled, fillHover: dividerFillHover, zIndex: "1", isActive: isActive, isDisabled: isDisabled })] })), after] }) }));
|
|
219
|
+
const { styles: tab } = useStyles(props);
|
|
220
|
+
return (jsx("div", { className: clsx('tab', className, rootClasses, isActive && 'tab_state_active', isDisabled && 'tab_state_disabled', sizeClass && `tab_size_${sizeClass}`, shapeClass && `shape_${shapeClass}`, shapeStrengthClass && `shape-strength_${shapeStrengthClass}`, widthClass && `width_${widthClass}`, justifyContentClass && `tab_justify-content_${justifyContentClass}`, isSkeleton && `tab_skeleton`, onClick && 'cursor_type_pointer'), "data-test-id": dataTestId && `${dataTestId}Tab`, "data-tour": dataTour, style: tab, onClick: onClick, onMouseEnter: onMouseEnter, children: jsxs(Link, { className: clsx('tab__link', !isDisabled && 'cursor_type_pointer'), fill: linkFill, href: link || href, rel: rel, target: target, children: [before, children || (jsxs(React.Fragment, { children: [jsxs("div", { className: clsx('tab__wrapper', alignClass && `align_${alignClass}`), children: [label && (jsx(Text, { className: "tab__label", size: labelTextSize, textAlign: labelTextAlign, textColor: labelTextColor, textColorActive: labelTextColorActive, textColorHover: labelTextColorHover, textColorHoverActive: labelTextColorActiveHover, textStyle: labelTextStyle, textWeight: labelTextWeight, textWrap: labelTextWrap, isActive: isActive, isDisabled: isDisabled, children: label })), Boolean(badgeValue) && (jsx(Badge, { appearance: `${badgeAppearance} ${badgeAppearanceSize}`, size: badgeSize, textColor: badgeTextColor, textSize: badgeTextSize, shape: badgeShape, value: badgeValue })), (icon || iconSrc) && (jsx(Icon, { className: clsx('tab__icon_after'), fill: iconFill, fillSize: iconFillSize, iconFill: iconFillIcon, iconSize: iconSize, imageSrc: iconSrc, shape: iconShape, SvgImage: icon }))] }), jsx(Divider, { className: clsx('tab__divider'), width: "fill", direction: "horizontal", size: dividerSize, fill: dividerFill, fillActive: dividerFillActive, fillActiveHover: dividerFillActiveHover, fillDisabled: dividerFillDisabled, fillHover: dividerFillHover, zIndex: "1", isActive: isActive, isDisabled: isDisabled })] })), after] }) }));
|
|
217
221
|
}
|
|
218
222
|
|
|
219
223
|
function TabGroup(props) {
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
224
|
+
const { dataTestId, dataTour, className, horizontalScroll, style, tabAppearance, tabList, children, } = props;
|
|
225
|
+
const propsGenerator = useDevicePropsGenerator(props);
|
|
226
|
+
const { directionClass, alignClass, alignDirectionClass, fillClass, borderColorClass, borderTypeClass, borderWidthClass, widthClass, wrapClass, } = propsGenerator;
|
|
223
227
|
// @ts-expect-error
|
|
224
|
-
|
|
225
|
-
return (jsx("div", { className: clsx(className, 'tab-group', 'group', widthClass &&
|
|
228
|
+
const { styles: groupStyles, wrapper: groupWrapperStyles } = useStyles(props);
|
|
229
|
+
return (jsx("div", { className: clsx(className, 'tab-group', 'group', widthClass && `width_${widthClass}`, alignDirectionClass && `align_${alignDirectionClass}`, directionClass && `group_direction_${directionClass}`, alignClass && `align_${alignClass}`, fillClass && `fill_${fillClass}`, horizontalScroll && 'group_type_horizontal_scroll', wrapClass && `group_wrap_${wrapClass}`, borderColorClass && `border-color_${borderColorClass}`, borderWidthClass && `border-width_${borderWidthClass}`, borderTypeClass && `border_type_${borderTypeClass}`), "data-test-id": dataTestId, "data-tour": dataTour, style: Object.assign({}, groupStyles, style), children: horizontalScroll ? (jsxs("div", { className: "tab-group__wrapper", style: groupWrapperStyles, children: [tabList?.map((item) => (jsx(Tab, { appearance: tabAppearance, label: item.label, isActive: item.isActive }, item.key))), children] })) : (jsxs(React.Fragment, { children: [tabList?.map((item) => (jsx(Tab, { appearance: tabAppearance, label: item.label, badgeValue: item.badgeValue, icon: item.icon, iconSrc: item.icon, isActive: item.isActive }, item.key))), children] })) }));
|
|
226
230
|
}
|
|
227
231
|
|
|
228
232
|
export { Tab, TabGroup, tabAppearance, tabConfig };
|
package/dist/components/Text.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
export { T as Text, a as textAppearance, t as textConfig } from '../
|
|
1
|
+
export { T as Text, a as textAppearance, t as textConfig } from '../Text_es_CnymlElo.js';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import 'clsx';
|
|
4
4
|
import '../hooks/useAppearanceConfig/useAppearanceConfig.js';
|
|
5
|
-
import '../tslib.es6_es_Bwu1Cn-t.js';
|
|
6
5
|
import 'react';
|
|
7
6
|
import '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
8
7
|
import 'lodash/camelCase';
|
|
@@ -2,7 +2,6 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { useAppearanceConfig } from '../hooks/useAppearanceConfig/useAppearanceConfig.js';
|
|
4
4
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
5
|
-
import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
|
|
6
5
|
import 'react';
|
|
7
6
|
import 'lodash/camelCase';
|
|
8
7
|
import 'lodash/castArray';
|
|
@@ -17,7 +16,7 @@ import '../utils/setViewportProperty.js';
|
|
|
17
16
|
import '../hooks.js';
|
|
18
17
|
import '../hooks/useStyles/styleAttributes.js';
|
|
19
18
|
|
|
20
|
-
|
|
19
|
+
const textareaAppearanceDefault = {
|
|
21
20
|
defaultPrimary: {
|
|
22
21
|
fill: 'surfaceSecondary',
|
|
23
22
|
fillHover: 'surfaceTertiary',
|
|
@@ -54,7 +53,7 @@ var textareaAppearanceDefault = {
|
|
|
54
53
|
},
|
|
55
54
|
};
|
|
56
55
|
|
|
57
|
-
|
|
56
|
+
const textareaAppearanceDisabled = {
|
|
58
57
|
disabledPrimary: {
|
|
59
58
|
fill: 'surfaceDisabled',
|
|
60
59
|
borderColor: 'errorBorderQuaternary',
|
|
@@ -74,7 +73,7 @@ var textareaAppearanceDisabled = {
|
|
|
74
73
|
},
|
|
75
74
|
};
|
|
76
75
|
|
|
77
|
-
|
|
76
|
+
const textareaAppearanceError = {
|
|
78
77
|
errorPrimary: {
|
|
79
78
|
fill: 'errorTertiary',
|
|
80
79
|
borderColor: 'errorBorderQuaternary',
|
|
@@ -94,7 +93,7 @@ var textareaAppearanceError = {
|
|
|
94
93
|
},
|
|
95
94
|
};
|
|
96
95
|
|
|
97
|
-
|
|
96
|
+
const textareaAppearanceRequire = {
|
|
98
97
|
requirePrimary: {
|
|
99
98
|
fill: 'warningTertiary',
|
|
100
99
|
borderColor: 'warningBorderQuaternary',
|
|
@@ -114,7 +113,7 @@ var textareaAppearanceRequire = {
|
|
|
114
113
|
},
|
|
115
114
|
};
|
|
116
115
|
|
|
117
|
-
|
|
116
|
+
const textareaAppearanceShape = {
|
|
118
117
|
circular: {
|
|
119
118
|
shape: 'circular',
|
|
120
119
|
},
|
|
@@ -139,7 +138,7 @@ var textareaAppearanceShape = {
|
|
|
139
138
|
},
|
|
140
139
|
};
|
|
141
140
|
|
|
142
|
-
|
|
141
|
+
const textareaAppearanceSize = {
|
|
143
142
|
sizeXXL: {
|
|
144
143
|
size: 'xxl',
|
|
145
144
|
textSize: 'l',
|
|
@@ -170,7 +169,7 @@ var textareaAppearanceSize = {
|
|
|
170
169
|
},
|
|
171
170
|
};
|
|
172
171
|
|
|
173
|
-
|
|
172
|
+
const textareaAppearanceStyle = {
|
|
174
173
|
solid: {
|
|
175
174
|
borderColor: 'none',
|
|
176
175
|
borderColorHover: 'none',
|
|
@@ -186,7 +185,7 @@ var textareaAppearanceStyle = {
|
|
|
186
185
|
},
|
|
187
186
|
};
|
|
188
187
|
|
|
189
|
-
|
|
188
|
+
const textareaAppearanceSuccess = {
|
|
190
189
|
successPrimary: {
|
|
191
190
|
fill: 'successTertiary',
|
|
192
191
|
fillHover: 'successTertiary',
|
|
@@ -207,21 +206,30 @@ var textareaAppearanceSuccess = {
|
|
|
207
206
|
},
|
|
208
207
|
};
|
|
209
208
|
|
|
210
|
-
|
|
209
|
+
const textareaAppearance = {
|
|
210
|
+
...textareaAppearanceDefault,
|
|
211
|
+
...textareaAppearanceShape,
|
|
212
|
+
...textareaAppearanceError,
|
|
213
|
+
...textareaAppearanceSuccess,
|
|
214
|
+
...textareaAppearanceRequire,
|
|
215
|
+
...textareaAppearanceDisabled,
|
|
216
|
+
...textareaAppearanceSize,
|
|
217
|
+
...textareaAppearanceStyle,
|
|
218
|
+
};
|
|
211
219
|
|
|
212
|
-
|
|
220
|
+
const textareaConfig = {
|
|
213
221
|
appearance: textareaAppearance,
|
|
214
|
-
setAppearance:
|
|
222
|
+
setAppearance: (appearanceConfig) => {
|
|
215
223
|
textareaConfig.appearance = appearanceConfig;
|
|
216
224
|
},
|
|
217
225
|
};
|
|
218
226
|
function Textarea(props) {
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
return (jsx("div", { className: clsx('textarea', className, sizeClass &&
|
|
224
|
-
|
|
227
|
+
const { id, className, appearance, isDisabled, placeholder, value, onBlur, onChange, onFocus, onKeyDown, } = props;
|
|
228
|
+
const appearanceConfig = useAppearanceConfig(appearance, textareaConfig, isDisabled);
|
|
229
|
+
const propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
230
|
+
const { fillClass, fillHoverClass, borderColorClass, borderHoverClass, borderWidthClass, textColorClass, textSizeClass, textWeightClass, caretClass, placeholderTextColorClass, shapeClass, shapeStrengthClass, sizeClass, widthClass, } = propsGenerator;
|
|
231
|
+
return (jsx("div", { className: clsx('textarea', className, sizeClass && `textarea_size_${sizeClass}`), children: jsx("textarea", { id: id, className: clsx('textarea__input', (textSizeClass || textColorClass || textWeightClass) && 'text', caretClass && `caret-color_${caretClass}`, fillClass && `fill_${fillClass}`, fillHoverClass && `fill_hover_${fillHoverClass}`, borderColorClass && `border-color_${borderColorClass}`, borderWidthClass && `border-width_${borderWidthClass}`, borderHoverClass && `border-color_hover_${borderHoverClass}`, shapeClass && `shape_${shapeClass}`, shapeStrengthClass && `shape-strength_${shapeStrengthClass}`, placeholderTextColorClass &&
|
|
232
|
+
`placeholder-text-color_${placeholderTextColorClass}`, textSizeClass && `text_size_${textSizeClass}`, textColorClass && `text-color_${textColorClass}`, textWeightClass && `text-weight_${textWeightClass}`, widthClass && `width_${widthClass}`), disabled: isDisabled && 'disabled', placeholder: placeholder, value: value, onBlur: onBlur, onChange: onChange, onFocus: onFocus, onKeyDown: onKeyDown }) }));
|
|
225
233
|
}
|
|
226
234
|
|
|
227
235
|
export { Textarea, textareaAppearance, textareaConfig };
|
package/dist/components/Tile.js
CHANGED
|
@@ -3,9 +3,8 @@ import clsx from 'clsx';
|
|
|
3
3
|
import { useAppearanceConfig } from '../hooks/useAppearanceConfig/useAppearanceConfig.js';
|
|
4
4
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
5
5
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
6
|
-
import { b as Title, B as Badge, I as Icon } from '../
|
|
7
|
-
import { T as Text } from '../
|
|
8
|
-
import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
|
|
6
|
+
import { b as Title, B as Badge, I as Icon } from '../Icon_es_DkVkzTha.js';
|
|
7
|
+
import { T as Text } from '../Text_es_CnymlElo.js';
|
|
9
8
|
import 'react';
|
|
10
9
|
import 'lodash/camelCase';
|
|
11
10
|
import 'lodash/castArray';
|
|
@@ -23,9 +22,9 @@ import 'lodash/maxBy';
|
|
|
23
22
|
import 'react-inlinesvg';
|
|
24
23
|
import '../hoc/urlWithAssetPrefix.js';
|
|
25
24
|
import '../context/UrlAssetPrefix.js';
|
|
26
|
-
import '../
|
|
25
|
+
import '../Link_es_P2b6ya7P.js';
|
|
27
26
|
|
|
28
|
-
|
|
27
|
+
const tileAppearanceShape = {
|
|
29
28
|
circular: {
|
|
30
29
|
shape: 'circular',
|
|
31
30
|
},
|
|
@@ -50,7 +49,7 @@ var tileAppearanceShape = {
|
|
|
50
49
|
},
|
|
51
50
|
};
|
|
52
51
|
|
|
53
|
-
|
|
52
|
+
const tileAppearanceSize = {
|
|
54
53
|
sizeXL: {
|
|
55
54
|
size: 'xl',
|
|
56
55
|
titleTextSize: 'h4',
|
|
@@ -101,7 +100,7 @@ var tileAppearanceSize = {
|
|
|
101
100
|
},
|
|
102
101
|
};
|
|
103
102
|
|
|
104
|
-
|
|
103
|
+
const tileAppearanceStyle = {
|
|
105
104
|
solid: {
|
|
106
105
|
borderColor: 'none',
|
|
107
106
|
},
|
|
@@ -115,7 +114,7 @@ var tileAppearanceStyle = {
|
|
|
115
114
|
},
|
|
116
115
|
};
|
|
117
116
|
|
|
118
|
-
|
|
117
|
+
const tileAppearanceSurface = {
|
|
119
118
|
surfacePrimary: {
|
|
120
119
|
fill: 'surfacePrimary',
|
|
121
120
|
titleTextColor: 'surfaceTextPrimary',
|
|
@@ -150,22 +149,27 @@ var tileAppearanceSurface = {
|
|
|
150
149
|
},
|
|
151
150
|
};
|
|
152
151
|
|
|
153
|
-
|
|
152
|
+
const tileAppearance = {
|
|
153
|
+
...tileAppearanceShape,
|
|
154
|
+
...tileAppearanceSize,
|
|
155
|
+
...tileAppearanceStyle,
|
|
156
|
+
...tileAppearanceSurface,
|
|
157
|
+
};
|
|
154
158
|
|
|
155
|
-
|
|
159
|
+
const tileConfig = {
|
|
156
160
|
appearance: tileAppearance,
|
|
157
|
-
setAppearance:
|
|
161
|
+
setAppearance: (appearanceConfig) => {
|
|
158
162
|
tileConfig.appearance = appearanceConfig;
|
|
159
163
|
},
|
|
160
164
|
};
|
|
161
165
|
function Tile(props) {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
+
const { className, type, appearance, title, desc, badgeValue, before, after, isSkeleton, onClick, children, } = props;
|
|
167
|
+
const appearanceConfig = useAppearanceConfig(appearance, tileConfig);
|
|
168
|
+
const propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
169
|
+
const { dataTestId, dataTour, directionClass, alignClass, alignDirectionClass, fillClass, titleTextAlign, titleTextColor, titleTextSize, titleTextWeight, titleTextWrap, descTextColor, descTextSize, descTextWrap, borderColorClass, borderColorHoverClass, borderTypeClass, borderWidthClass, badgeAppearance, badgeAppearanceSize, badgeShape, badgeSize, badgeTextColor, badgeTextSize, icon, iconAppearance, iconFill, iconFillIcon, iconFillSize, iconShape, iconSize, iconSrc, shapeClass, shapeStrengthClass, sizeClass, widthClass, } = propsGenerator;
|
|
166
170
|
// @ts-expect-error
|
|
167
|
-
|
|
168
|
-
return (jsx("div", { className: clsx('tile', className, fillClass &&
|
|
171
|
+
const { styles: tileStyles } = useStyles(props);
|
|
172
|
+
return (jsx("div", { className: clsx('tile', className, fillClass && `fill_${fillClass}`, shapeClass && `shape_${shapeClass}`, shapeStrengthClass && `shape-strength_${shapeStrengthClass}`, alignClass && `align_${alignClass}`, directionClass && `direction_${directionClass}`, borderColorClass && `border-color_${borderColorClass}`, borderColorHoverClass && `border-color_hover_${borderColorHoverClass}`, borderWidthClass && `border-width_${borderWidthClass}`, borderTypeClass && `border_type_${borderTypeClass}`, sizeClass && `tile_size_${sizeClass}`, type && `tile_type_${type}`, badgeValue && `tile_state_badge`, widthClass && `width_${widthClass}`, isSkeleton && `tile_skeleton`), "data-test-id": dataTestId, "data-tour": dataTour, style: tileStyles, onClick: onClick, children: jsxs("div", { className: clsx('tile__wrapper', alignClass, alignDirectionClass), children: [before, jsxs("div", { className: "tile__header", children: [jsxs("div", { className: "tile__header-inner", children: [title && (jsx(Title, { className: "tile__title", size: titleTextSize, textAlign: titleTextAlign, textColor: titleTextColor, textWeight: titleTextWeight, textWrap: titleTextWrap, children: title })), desc && (jsx(Text, { className: "tile__text", size: descTextSize, textColor: descTextColor, textWrap: descTextWrap, children: desc }))] }), jsxs("div", { className: "tile__header-actions", children: [badgeValue && (jsx(Badge, { className: "tile__badge", appearance: `${badgeAppearance} ${badgeAppearanceSize}`, size: badgeSize, textColor: badgeTextColor, textSize: badgeTextSize, shape: badgeShape, value: badgeValue })), (icon || iconSrc) && (jsx(Icon, { className: "tile__icon", appearance: iconAppearance, fill: iconFill, fillSize: iconFillSize, iconFill: iconFillIcon, iconSize: iconSize, imageSrc: iconSrc, shape: iconShape, SvgImage: icon }))] })] }), children, after] }) }));
|
|
169
173
|
}
|
|
170
174
|
|
|
171
175
|
export { Tile, tileAppearance, tileConfig };
|
package/dist/components/Title.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export { b as Title, d as titleAppearance, c as titleConfig } from '../
|
|
2
|
-
import '../tslib.es6_es_Bwu1Cn-t.js';
|
|
1
|
+
export { b as Title, d as titleAppearance, c as titleConfig } from '../Icon_es_DkVkzTha.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';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export { T as Tooltip, a as tooltipAppearance, t as tooltipConfig } from '../
|
|
2
|
-
import '../tslib.es6_es_Bwu1Cn-t.js';
|
|
1
|
+
export { T as Tooltip, a as tooltipAppearance, t as tooltipConfig } from '../Icon_es_DkVkzTha.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/Video.js
CHANGED
|
@@ -6,7 +6,6 @@ import 'lodash/camelCase';
|
|
|
6
6
|
import 'lodash/maxBy';
|
|
7
7
|
import 'lodash/upperFirst';
|
|
8
8
|
import '../context/Notifications.js';
|
|
9
|
-
import '../tslib.es6_es_Bwu1Cn-t.js';
|
|
10
9
|
import 'uuid';
|
|
11
10
|
import '@itcase/common';
|
|
12
11
|
import '../context/UIContext.js';
|
|
@@ -17,9 +16,9 @@ import '../hooks.js';
|
|
|
17
16
|
import '../hooks/useStyles/styleAttributes.js';
|
|
18
17
|
|
|
19
18
|
function Video(props) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
return (jsxs("div", { id: id, className: clsx('video', className, poster &&
|
|
19
|
+
const { id, className, position, mp4, ogv, poster, webm, children } = props;
|
|
20
|
+
const { styles: videoStyles } = useStyles(props);
|
|
21
|
+
return (jsxs("div", { id: id, className: clsx('video', className, poster && `video_poster`, position && `video_position_${position}`), style: videoStyles, children: [jsxs("video", { className: "video__wrapper", autoPlay: true, loop: true, muted: true, playsInline: false, poster: poster, children: [webm && jsx("source", { type: "video/webm", src: webm, codecs: "vp8, vorbis" }), ogv && jsx("source", { type: "video/ogg", src: ogv, codecs: "theora, vorbis" }), mp4 && (jsx("source", { type: "video/mp4", src: mp4, codecs: "avc1.42E01E, mp4a.40.2" }))] }), children] }));
|
|
23
22
|
}
|
|
24
23
|
|
|
25
24
|
export { Video };
|