@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
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
export { A as Avatar, b as avatarAppearance, a as avatarConfig } from '../
|
|
1
|
+
export { A as Avatar, b as avatarAppearance, a as avatarConfig } from '../Avatar_es_BFom0nAS.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';
|
|
@@ -17,12 +16,12 @@ import 'react-responsive';
|
|
|
17
16
|
import '../utils/setViewportProperty.js';
|
|
18
17
|
import '../hooks.js';
|
|
19
18
|
import '../hooks/useStyles/styleAttributes.js';
|
|
20
|
-
import '../
|
|
19
|
+
import '../Icon_es_D5eiycFI.js';
|
|
21
20
|
import 'react-inlinesvg';
|
|
22
21
|
import '../hoc/urlWithAssetPrefix.js';
|
|
23
22
|
import '../context/UrlAssetPrefix.js';
|
|
24
23
|
import '../hooks/useStyles/useStyles.js';
|
|
25
24
|
import 'lodash/maxBy';
|
|
26
|
-
import '../
|
|
27
|
-
import '../
|
|
28
|
-
import '../
|
|
25
|
+
import '../Link_es_P2b6ya7P.js';
|
|
26
|
+
import '../Text_es_CnymlElo.js';
|
|
27
|
+
import '../Image_es_BHec4iVN.js';
|
|
@@ -3,10 +3,9 @@ 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 { A as Avatar } from '../
|
|
7
|
-
import { G as Group } from '../
|
|
8
|
-
import { T as Text } from '../
|
|
9
|
-
import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
|
|
6
|
+
import { A as Avatar } from '../Avatar_es_BFom0nAS.js';
|
|
7
|
+
import { G as Group } from '../Group_es_BU5k8f5S.js';
|
|
8
|
+
import { T as Text } from '../Text_es_CnymlElo.js';
|
|
10
9
|
import 'react';
|
|
11
10
|
import 'lodash/camelCase';
|
|
12
11
|
import 'lodash/castArray';
|
|
@@ -21,14 +20,14 @@ import '../utils/setViewportProperty.js';
|
|
|
21
20
|
import '../hooks.js';
|
|
22
21
|
import '../hooks/useStyles/styleAttributes.js';
|
|
23
22
|
import 'lodash/maxBy';
|
|
24
|
-
import '../
|
|
23
|
+
import '../Icon_es_D5eiycFI.js';
|
|
25
24
|
import 'react-inlinesvg';
|
|
26
25
|
import '../hoc/urlWithAssetPrefix.js';
|
|
27
26
|
import '../context/UrlAssetPrefix.js';
|
|
28
|
-
import '../
|
|
29
|
-
import '../
|
|
27
|
+
import '../Link_es_P2b6ya7P.js';
|
|
28
|
+
import '../Image_es_BHec4iVN.js';
|
|
30
29
|
|
|
31
|
-
|
|
30
|
+
const avatarStackAppearanceSize = {
|
|
32
31
|
size16: {
|
|
33
32
|
size: '16',
|
|
34
33
|
},
|
|
@@ -49,18 +48,20 @@ var avatarStackAppearanceSize = {
|
|
|
49
48
|
},
|
|
50
49
|
};
|
|
51
50
|
|
|
52
|
-
|
|
51
|
+
const avatarStackAppearance = {
|
|
52
|
+
...avatarStackAppearanceSize,
|
|
53
|
+
};
|
|
53
54
|
|
|
54
|
-
|
|
55
|
+
const avatarStackConfig = {
|
|
55
56
|
appearance: avatarStackAppearance};
|
|
56
57
|
function AvatarStack(props) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
const { className, appearance, direction = 'horizontal', avatarAppearance, avatarsList, length = 3, isSkeleton, } = props;
|
|
59
|
+
const appearanceConfig = useAppearanceConfig(appearance, avatarStackConfig);
|
|
60
|
+
const propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
60
61
|
// "size" is numeric
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
return (avatarsList.length && (jsxs("div", { className: clsx(className, 'avatar-stack', direction &&
|
|
62
|
+
const { size } = propsGenerator;
|
|
63
|
+
const { styles: avatarStackStyles } = useStyles(props);
|
|
64
|
+
return (avatarsList.length && (jsxs("div", { className: clsx(className, 'avatar-stack', direction && `group_direction_${direction}`, size && `avatar-stack_size_${size}`, isSkeleton && `avatar-stack-skeleton`), style: avatarStackStyles, children: [avatarsList.slice(0, length).map((item) => (jsx(Avatar, { className: "avatar-stack__item", appearance: `${avatarAppearance} size${size}`, src: item.src, textSize: "l", firstName: item.firstName, secondName: item.lastName, shape: "circular" }, item.id))), avatarsList.length > length && (jsx(Group, { className: "avatar-stack__item avatar-stack__item-text", width: size, height: size, fill: "surfaceSecondary", children: jsxs(Text, { size: "xs", textColor: "surfaceTextPrimary", textWeight: "600", children: ["+", avatarsList.length - length] }) }))] })));
|
|
64
65
|
}
|
|
65
66
|
|
|
66
67
|
export { AvatarStack };
|
package/dist/components/Badge.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export { B as Badge, f as badgeAppearance, g as badgeConfig } from '../
|
|
2
|
-
import '../tslib.es6_es_Bwu1Cn-t.js';
|
|
1
|
+
export { B as Badge, f as badgeAppearance, g as badgeConfig } 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';
|
|
@@ -4,10 +4,9 @@ import clsx from 'clsx';
|
|
|
4
4
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
5
5
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
6
6
|
import { useAppearanceConfig } from '../hooks/useAppearanceConfig/useAppearanceConfig.js';
|
|
7
|
-
import { I as Icon } from '../
|
|
8
|
-
import { a as LinkWrapper } from '../
|
|
9
|
-
import { T as Text } from '../
|
|
10
|
-
import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
|
|
7
|
+
import { I as Icon } from '../Icon_es_D5eiycFI.js';
|
|
8
|
+
import { a as LinkWrapper } from '../Link_es_P2b6ya7P.js';
|
|
9
|
+
import { T as Text } from '../Text_es_CnymlElo.js';
|
|
11
10
|
import { icons12, icons14, icons16, icons20, icons24 } from '@itcase/icons/default';
|
|
12
11
|
import 'lodash/camelCase';
|
|
13
12
|
import 'lodash/castArray';
|
|
@@ -26,7 +25,7 @@ import 'react-inlinesvg';
|
|
|
26
25
|
import '../hoc/urlWithAssetPrefix.js';
|
|
27
26
|
import '../context/UrlAssetPrefix.js';
|
|
28
27
|
|
|
29
|
-
|
|
28
|
+
const breadcrumbsAppearanceAccent = {
|
|
30
29
|
accentPrimary: {
|
|
31
30
|
fill: 'accentPrimary',
|
|
32
31
|
labelTextColor: 'accentTextPrimary',
|
|
@@ -35,7 +34,7 @@ var breadcrumbsAppearanceAccent = {
|
|
|
35
34
|
},
|
|
36
35
|
};
|
|
37
36
|
|
|
38
|
-
|
|
37
|
+
const breadcrumbsAppearanceSize = {
|
|
39
38
|
sizeXXL: {
|
|
40
39
|
size: 'xxl',
|
|
41
40
|
labelTextSize: 'xxl',
|
|
@@ -73,7 +72,7 @@ var breadcrumbsAppearanceSize = {
|
|
|
73
72
|
},
|
|
74
73
|
};
|
|
75
74
|
|
|
76
|
-
|
|
75
|
+
const breadcrumbsAppearanceStyle = {
|
|
77
76
|
solid: {
|
|
78
77
|
borderColor: 'none',
|
|
79
78
|
},
|
|
@@ -87,7 +86,7 @@ var breadcrumbsAppearanceStyle = {
|
|
|
87
86
|
},
|
|
88
87
|
};
|
|
89
88
|
|
|
90
|
-
|
|
89
|
+
const breadcrumbsAppearanceSurface = {
|
|
91
90
|
surfacePrimary: {
|
|
92
91
|
fill: 'surfacePrimary',
|
|
93
92
|
labelTextColor: 'surfaceTextPrimary',
|
|
@@ -114,35 +113,40 @@ var breadcrumbsAppearanceSurface = {
|
|
|
114
113
|
},
|
|
115
114
|
};
|
|
116
115
|
|
|
117
|
-
|
|
116
|
+
const breadcrumbsAppearance = {
|
|
117
|
+
...breadcrumbsAppearanceSize,
|
|
118
|
+
...breadcrumbsAppearanceStyle,
|
|
119
|
+
...breadcrumbsAppearanceAccent,
|
|
120
|
+
...breadcrumbsAppearanceSurface,
|
|
121
|
+
};
|
|
118
122
|
|
|
119
|
-
|
|
123
|
+
const breadcrumbsConfig = {
|
|
120
124
|
appearance: breadcrumbsAppearance};
|
|
121
125
|
function BreadcrumbsItem(props) {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
+
const { className, appearance, href, isActive, isSkeleton, onClick, children, } = props;
|
|
127
|
+
const appearanceConfig = useAppearanceConfig(appearance, breadcrumbsConfig);
|
|
128
|
+
const propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
129
|
+
const { fillClass, labelTextColor, labelTextColorHover, labelTextSize, borderColorClass, text, cursor, icon, iconFill, iconFillIcon, iconFillSize, iconShape, iconSize, iconSrc, shapeClass, sizeClass, underlineClass, } = propsGenerator;
|
|
126
130
|
// @ts-expect-error
|
|
127
|
-
|
|
128
|
-
return (jsxs(LinkWrapper, { className: clsx(className, 'breadcrumbs__item', borderColorClass &&
|
|
131
|
+
const { styles: itemStyles } = useStyles(props);
|
|
132
|
+
return (jsxs(LinkWrapper, { className: clsx(className, 'breadcrumbs__item', borderColorClass && `border-color_${borderColorClass}`, isActive && 'breadcrumbs__item_current', sizeClass && `breadcrumbs__item_size_${sizeClass}`, shapeClass && `breadcrumbs__item_shape_${shapeClass}`, fillClass && `fill_${fillClass}`, underlineClass && `text-decoration_${underlineClass}`, isSkeleton && `breadcrumbs__item_skeleton`, onClick && (cursor || 'cursor_type_pointer')), href: href, LinkComponent: "div", style: itemStyles, onClick: onClick, children: [jsx(Text, { className: "breadcrumbs__item-text", size: labelTextSize, textColor: labelTextColor, textColorHover: labelTextColorHover, children: text || children }), !isActive && (icon || iconSrc) && (jsx(Icon, { className: clsx('breadcrumbs__item-icon'), fill: iconFill, fillSize: iconFillSize, iconFill: iconFillIcon, iconSize: iconSize, imageSrc: iconSrc, shape: iconShape, SvgImage: icon }))] }));
|
|
129
133
|
}
|
|
130
134
|
|
|
131
135
|
function Breadcrumbs(props) {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
+
const { className, appearance, breadcrumbsList, isSkeleton, children } = props;
|
|
137
|
+
const propsGenerator = useDevicePropsGenerator(props);
|
|
138
|
+
const { directionClass = 'horizontal', widthClass } = propsGenerator;
|
|
139
|
+
const breadcrumbsItemsList = useMemo(() => {
|
|
136
140
|
if (breadcrumbsList) {
|
|
137
|
-
return breadcrumbsList.map(
|
|
141
|
+
return breadcrumbsList.map((item, i) => (jsx(BreadcrumbsItem, { appearance: appearance, text: item.text, icon: item.icon, iconSrc: item.icon, isActive: i + 1 === breadcrumbsList.length && true, isSkeleton: isSkeleton }, `breadcrumbsItem_${item.key || item.id || item.text}`)));
|
|
138
142
|
}
|
|
139
143
|
if (children) {
|
|
140
144
|
return children;
|
|
141
145
|
}
|
|
142
146
|
return [];
|
|
143
147
|
}, [children, breadcrumbsList, appearance]);
|
|
144
|
-
|
|
145
|
-
return (jsx("div", { className: clsx(className, 'breadcrumbs', widthClass &&
|
|
148
|
+
const { styles: breadcrumbsStyles } = useStyles(props);
|
|
149
|
+
return (jsx("div", { className: clsx(className, 'breadcrumbs', widthClass && `width_${widthClass}`, directionClass && `direction_${directionClass}`), style: breadcrumbsStyles, children: breadcrumbsItemsList }));
|
|
146
150
|
}
|
|
147
151
|
|
|
148
152
|
export { Breadcrumbs, BreadcrumbsItem, breadcrumbsAppearance };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
export { B as Button, a as buttonAppearance, b as buttonConfig } from '../
|
|
1
|
+
export { B as Button, a as buttonAppearance, b as buttonConfig } from '../Button_es_Cn3wtv3M.js';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'clsx';
|
|
5
|
-
import '../
|
|
6
|
-
import '../tslib.es6_es_Bwu1Cn-t.js';
|
|
5
|
+
import '../Icon_es_D5eiycFI.js';
|
|
7
6
|
import 'react-inlinesvg';
|
|
8
7
|
import '../hoc/urlWithAssetPrefix.js';
|
|
9
8
|
import '@itcase/common';
|
|
@@ -23,6 +22,6 @@ import '../hooks.js';
|
|
|
23
22
|
import '../hooks/useStyles/styleAttributes.js';
|
|
24
23
|
import '../hooks/useStyles/useStyles.js';
|
|
25
24
|
import 'lodash/maxBy';
|
|
26
|
-
import '../
|
|
27
|
-
import '../
|
|
28
|
-
import '../
|
|
25
|
+
import '../Link_es_P2b6ya7P.js';
|
|
26
|
+
import '../Text_es_CnymlElo.js';
|
|
27
|
+
import '../Loader_es_CmSggwbR.js';
|
package/dist/components/Cell.js
CHANGED
|
@@ -3,10 +3,9 @@ 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 { I as Icon } from '../
|
|
7
|
-
import { L as Label } from '../
|
|
8
|
-
import { T as Text } from '../
|
|
9
|
-
import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
|
|
6
|
+
import { I as Icon } from '../Icon_es_D5eiycFI.js';
|
|
7
|
+
import { L as Label } from '../Label_es_DCqpSw_F.js';
|
|
8
|
+
import { T as Text } from '../Text_es_CnymlElo.js';
|
|
10
9
|
import 'react';
|
|
11
10
|
import 'lodash/camelCase';
|
|
12
11
|
import 'lodash/castArray';
|
|
@@ -24,9 +23,9 @@ import 'lodash/maxBy';
|
|
|
24
23
|
import 'react-inlinesvg';
|
|
25
24
|
import '../hoc/urlWithAssetPrefix.js';
|
|
26
25
|
import '../context/UrlAssetPrefix.js';
|
|
27
|
-
import '../
|
|
26
|
+
import '../Link_es_P2b6ya7P.js';
|
|
28
27
|
|
|
29
|
-
|
|
28
|
+
const cellAppearanceSize = {
|
|
30
29
|
sizeXL: {
|
|
31
30
|
size: 'xl',
|
|
32
31
|
titleLabelAppearanceSize: 'sizeXS',
|
|
@@ -85,7 +84,7 @@ var cellAppearanceSize = {
|
|
|
85
84
|
},
|
|
86
85
|
};
|
|
87
86
|
|
|
88
|
-
|
|
87
|
+
const cellAppearanceStyle = {
|
|
89
88
|
solid: {
|
|
90
89
|
borderColor: 'none',
|
|
91
90
|
},
|
|
@@ -99,7 +98,7 @@ var cellAppearanceStyle = {
|
|
|
99
98
|
},
|
|
100
99
|
};
|
|
101
100
|
|
|
102
|
-
|
|
101
|
+
const cellAppearanceSurface = {
|
|
103
102
|
surfacePrimary: {
|
|
104
103
|
fill: 'surfacePrimary',
|
|
105
104
|
fillHover: 'surfacePrimaryHover',
|
|
@@ -154,33 +153,37 @@ var cellAppearanceSurface = {
|
|
|
154
153
|
},
|
|
155
154
|
};
|
|
156
155
|
|
|
157
|
-
|
|
156
|
+
const cellAppearance = {
|
|
157
|
+
...cellAppearanceSize,
|
|
158
|
+
...cellAppearanceStyle,
|
|
159
|
+
...cellAppearanceSurface,
|
|
160
|
+
};
|
|
158
161
|
|
|
159
|
-
|
|
162
|
+
const cellConfig = {
|
|
160
163
|
appearance: cellAppearance,
|
|
161
|
-
setAppearance:
|
|
164
|
+
setAppearance: (appearanceConfig) => {
|
|
162
165
|
cellConfig.appearance = appearanceConfig;
|
|
163
166
|
},
|
|
164
167
|
};
|
|
165
168
|
function Cell(props) {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
169
|
+
const { className, appearance, title, titleIcon, titleLabel, titleTag, showTitleLabel, showValueLabel, value, valueIcon, valueTag, before, after, isActive, isEqual, isSameWidth, onClick, onMouseEnter, } = props;
|
|
170
|
+
const appearanceConfig = useAppearanceConfig(appearance, cellConfig);
|
|
171
|
+
const propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
172
|
+
const { directionClass, fillActiveClass, fillActiveHoverClass, fillClass, fillHoverClass, titleIconFill, titleIconFillHover, titleIconFillSize, titleIconItemFill, titleIconShape, titleIconSrc, titleLabelAppearance, titleLabelAppearanceSize, titleLabelShape, titleLabelSize, titleLabelTextSize, titleTextColor, titleTextSize, titleTextTruncate, titleTextWeight, titleTextWrap, borderColorActiveClass, borderColorActiveHoverClass, borderColorClass, borderColorHoverClass, reverseClass, shapeClass, sizeClass, valueIconFill, valueIconFillHover, valueIconFillSize, valueIconItemFill, valueIconShape, valueIconSrc, valueLabel, valueLabelAppearance, valueLabelAppearanceSize, valueLabelShape, valueLabelSize, valueLabelTextSize, valueTextAlign, valueTextColor, valueTextSize, valueTextTruncate, valueTextWeight, valueTextWrap, widthClass, zeroGap, zeroPadding, } = propsGenerator;
|
|
170
173
|
// @ts-expect-error
|
|
171
|
-
|
|
172
|
-
return (jsxs("div", { className: clsx(className, 'cell', sizeClass &&
|
|
173
|
-
? fillClass &&
|
|
174
|
-
: fillActiveClass &&
|
|
175
|
-
? fillHoverClass &&
|
|
176
|
-
: fillActiveHoverClass &&
|
|
177
|
-
? borderColorClass &&
|
|
174
|
+
const { data: dataStyles, styles: cellStyles } = useStyles(props);
|
|
175
|
+
return (jsxs("div", { className: clsx(className, 'cell', sizeClass && `cell_size_${sizeClass}`, !isActive
|
|
176
|
+
? fillClass && `fill_${fillClass}`
|
|
177
|
+
: fillActiveClass && `fill_active_${fillActiveClass}`, !isActive
|
|
178
|
+
? fillHoverClass && `fill_hover_${fillHoverClass}`
|
|
179
|
+
: fillActiveHoverClass && `fill_active_hover_${fillActiveHoverClass}`, !isActive
|
|
180
|
+
? borderColorClass && `border-color_${borderColorClass}`
|
|
178
181
|
: borderColorActiveClass &&
|
|
179
|
-
|
|
182
|
+
`border-color_active_${borderColorActiveClass}`, !isActive
|
|
180
183
|
? borderColorHoverClass &&
|
|
181
|
-
|
|
184
|
+
`border-color_hover_${borderColorHoverClass}`
|
|
182
185
|
: borderColorActiveHoverClass &&
|
|
183
|
-
|
|
186
|
+
`border-color_active_hover_${borderColorActiveHoverClass}`, reverseClass && `cell_reverse_${reverseClass}`, shapeClass && `cell_shape_${shapeClass}`, widthClass && `width_${widthClass}`, zeroPadding && 'cell_reset-padding', zeroGap && 'cell_reset-gap'), style: cellStyles, onClick: onClick, onMouseEnter: onMouseEnter, children: [before && jsx("div", { className: "cell__before", children: before }), jsxs("div", { className: clsx('cell__wrapper', directionClass && `cell__wrapper_direction_${directionClass}`, isEqual && 'cell__wrapper-equal', isSameWidth && 'cell__wrapper-same-width'), children: [title && (jsxs("div", { className: "cell__data", style: dataStyles, children: [jsx(Text, { className: "cell__title", size: titleTextSize, textColor: titleTextColor, textTruncate: titleTextTruncate, textWeight: titleTextWeight, textWrap: titleTextWrap, tag: titleTag, children: title }), (titleIcon || titleIconSrc) && (jsx(Icon, { className: "cell__title-icon", fill: titleIconFill, fillSize: titleIconFillSize, iconFill: titleIconItemFill, iconFillHover: titleIconFillHover, imageSrc: titleIconSrc, shape: titleIconShape, SvgImage: titleIcon })), (showTitleLabel || titleLabel) && (jsx(Label, { className: "cell__title-label", appearance: `${titleLabelAppearance} ${titleLabelAppearanceSize}`, size: titleLabelSize, label: titleLabel, labelTextSize: titleLabelTextSize, shape: titleLabelShape }))] })), value && (jsxs("div", { className: "cell__data", style: dataStyles, children: [jsx(Text, { className: "cell__value", size: valueTextSize, textAlign: valueTextAlign, textColor: valueTextColor, textTruncate: valueTextTruncate, textWeight: valueTextWeight, textWrap: valueTextWrap, tag: valueTag, children: value }), (valueIcon || valueIconSrc) && (jsx(Icon, { className: "cell__value-icon", fill: valueIconFill, fillSize: valueIconFillSize, iconFill: valueIconItemFill, iconFillHover: valueIconFillHover, imageSrc: valueIconSrc, shape: valueIconShape, SvgImage: valueIcon })), (showValueLabel || valueLabel) && (jsx(Label, { className: "cell__value-label", appearance: `${valueLabelAppearance} ${valueLabelAppearanceSize}`, size: valueLabelSize, label: valueLabel, labelTextSize: valueLabelTextSize, shape: valueLabelShape }))] }))] }), after && jsx("div", { className: "cell__after", children: after })] }));
|
|
184
187
|
}
|
|
185
188
|
|
|
186
189
|
export { Cell, cellAppearance, cellConfig };
|
|
@@ -2,8 +2,7 @@ import { jsxs, 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 { T as Text } from '../
|
|
6
|
-
import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
|
|
5
|
+
import { T as Text } from '../Text_es_CnymlElo.js';
|
|
7
6
|
import 'react';
|
|
8
7
|
import 'lodash/camelCase';
|
|
9
8
|
import 'lodash/castArray';
|
|
@@ -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 checkboxAppearanceDefault = {
|
|
24
23
|
defaultPrimary: {
|
|
25
24
|
fillCheckbox: 'surfaceSecondary',
|
|
26
25
|
fillCheckboxActive: 'surfaceSecondary',
|
|
@@ -36,7 +35,7 @@ var checkboxAppearanceDefault = {
|
|
|
36
35
|
},
|
|
37
36
|
};
|
|
38
37
|
|
|
39
|
-
|
|
38
|
+
const checkboxAppearanceDisabled = {
|
|
40
39
|
disabledPrimary: {
|
|
41
40
|
fill: 'surfaceFillDisabled',
|
|
42
41
|
borderColor: 'errorBorderQuaternary',
|
|
@@ -56,7 +55,7 @@ var checkboxAppearanceDisabled = {
|
|
|
56
55
|
},
|
|
57
56
|
};
|
|
58
57
|
|
|
59
|
-
|
|
58
|
+
const checkboxAppearanceError = {
|
|
60
59
|
errorPrimary: {
|
|
61
60
|
fill: 'errorTertiary',
|
|
62
61
|
fillCheckbox: 'errorPrimary',
|
|
@@ -81,7 +80,7 @@ var checkboxAppearanceError = {
|
|
|
81
80
|
},
|
|
82
81
|
};
|
|
83
82
|
|
|
84
|
-
|
|
83
|
+
const checkboxAppearanceRequire = {
|
|
85
84
|
requirePrimary: {
|
|
86
85
|
fillCheckbox: 'warningTertiary',
|
|
87
86
|
fillCheckboxActive: 'warningPrimary',
|
|
@@ -105,7 +104,7 @@ var checkboxAppearanceRequire = {
|
|
|
105
104
|
},
|
|
106
105
|
};
|
|
107
106
|
|
|
108
|
-
|
|
107
|
+
const checkboxAppearanceSize = {
|
|
109
108
|
sizeXL: {
|
|
110
109
|
size: 'xl',
|
|
111
110
|
labelTextSize: 'm',
|
|
@@ -128,7 +127,7 @@ var checkboxAppearanceSize = {
|
|
|
128
127
|
},
|
|
129
128
|
};
|
|
130
129
|
|
|
131
|
-
|
|
130
|
+
const checkboxAppearanceStyle = {
|
|
132
131
|
solid: {
|
|
133
132
|
borderColorCheckbox: 'none',
|
|
134
133
|
borderColorCheckboxActive: 'none',
|
|
@@ -150,7 +149,7 @@ var checkboxAppearanceStyle = {
|
|
|
150
149
|
},
|
|
151
150
|
};
|
|
152
151
|
|
|
153
|
-
|
|
152
|
+
const checkboxAppearanceSuccess = {
|
|
154
153
|
successPrimary: {
|
|
155
154
|
fillCheckbox: 'successPrimary',
|
|
156
155
|
fillCheckboxActive: 'successPrimary',
|
|
@@ -174,39 +173,47 @@ var checkboxAppearanceSuccess = {
|
|
|
174
173
|
},
|
|
175
174
|
};
|
|
176
175
|
|
|
177
|
-
|
|
176
|
+
const checkboxAppearance = {
|
|
177
|
+
...checkboxAppearanceDefault,
|
|
178
|
+
...checkboxAppearanceError,
|
|
179
|
+
...checkboxAppearanceSuccess,
|
|
180
|
+
...checkboxAppearanceRequire,
|
|
181
|
+
...checkboxAppearanceDisabled,
|
|
182
|
+
...checkboxAppearanceSize,
|
|
183
|
+
...checkboxAppearanceStyle,
|
|
184
|
+
};
|
|
178
185
|
|
|
179
|
-
|
|
186
|
+
const checkboxConfig = {
|
|
180
187
|
appearance: checkboxAppearance,
|
|
181
|
-
setAppearance:
|
|
188
|
+
setAppearance: (appearanceConfig) => {
|
|
182
189
|
checkboxConfig.appearance = appearanceConfig;
|
|
183
190
|
},
|
|
184
191
|
};
|
|
185
192
|
function Checkbox(props) {
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
return (jsxs(Tag, { className: clsx(className, 'checkbox', fillClass &&
|
|
191
|
-
? fillCheckboxClass &&
|
|
193
|
+
const { id, className, appearance, label, desc, disabled, isDisabled, checked, indeterminate, Tag = 'label', value, before, after, isActive, isChecked, isSkeleton, onBlur, onChange, onFocus, } = props;
|
|
194
|
+
const appearanceConfig = useAppearanceConfig(appearance, checkboxConfig, isDisabled);
|
|
195
|
+
const propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
196
|
+
const { fillCheckboxActiveClass, fillCheckboxActiveHoverClass, fillCheckboxClass, fillCheckboxHoverClass, fillCheckmarkClass, fillClass, fillHoverClass, labelTextColor, labelTextSize, labelTextWeight, descTextColor, descTextSize, descTextWeight, borderColorCheckboxActiveClass, borderColorCheckboxActiveHoverClass, borderColorCheckboxClass, borderColorCheckboxHoverClass, shapeClass, shapeStrengthClass, sizeClass, widthClass, } = propsGenerator;
|
|
197
|
+
return (jsxs(Tag, { className: clsx(className, 'checkbox', fillClass && `fill_${fillClass}`, fillHoverClass && `fill_${fillHoverClass}`, sizeClass && `checkbox_size_${sizeClass}`, !checked
|
|
198
|
+
? fillCheckboxClass && `checkbox_fill_${fillCheckboxClass}`
|
|
192
199
|
: fillCheckboxActiveClass &&
|
|
193
|
-
|
|
200
|
+
`checkbox_fill_active_${fillCheckboxActiveClass}`, !checked
|
|
194
201
|
? fillCheckboxHoverClass &&
|
|
195
|
-
|
|
202
|
+
`checkbox_fill_hover_${fillCheckboxHoverClass}`
|
|
196
203
|
: fillCheckboxActiveHoverClass &&
|
|
197
|
-
|
|
204
|
+
`checkbox_fill_active_hover_${fillCheckboxActiveHoverClass}`, !checked
|
|
198
205
|
? borderColorCheckboxClass &&
|
|
199
|
-
|
|
206
|
+
`checkbox_border-color_${borderColorCheckboxClass}`
|
|
200
207
|
: borderColorCheckboxActiveClass &&
|
|
201
|
-
|
|
208
|
+
`checkbox_border-color_active_${borderColorCheckboxActiveClass}`, !checked
|
|
202
209
|
? borderColorCheckboxHoverClass &&
|
|
203
|
-
|
|
210
|
+
`checkbox_border-color_hover_${borderColorCheckboxHoverClass}`
|
|
204
211
|
: borderColorCheckboxActiveHoverClass &&
|
|
205
|
-
|
|
212
|
+
`checkbox_border-color_active_hover_${borderColorCheckboxActiveHoverClass}`, widthClass && `width_${widthClass}`, isSkeleton && `checkbox_skeleton`), htmlFor: Tag === 'label' && id, children: [before, jsxs("div", { className: "checkbox__item", children: [jsx("input", { id: id, className: "checkbox__input", type: "checkbox", disabled: (isDisabled || disabled) && 'disabled', checked: (isActive || isChecked || checked) && 'checked', value: value, onBlur: onBlur, onChange: onChange, onFocus: onFocus }), jsx("div", { className: clsx('checkbox__state', shapeClass && `shape_${shapeClass}`, shapeStrengthClass && `shape-strength_${shapeStrengthClass}`), children: "\u00A0" }), jsx("div", { className: clsx(!indeterminate
|
|
206
213
|
? 'checkbox__state-checkmark'
|
|
207
214
|
: 'checkbox__state-indeterminate', (checked || indeterminate) &&
|
|
208
215
|
fillCheckmarkClass &&
|
|
209
|
-
|
|
216
|
+
`fill_${fillCheckmarkClass}`), children: "\u00A0" })] }), label && (jsx(Text, { className: "checkbox__label", size: labelTextSize, textColor: labelTextColor, textWeight: labelTextWeight, children: label })), desc && (jsx(Text, { className: "checkbox__desc", size: descTextSize, textColor: descTextColor, textWeight: descTextWeight, children: desc })), after && jsx("div", { className: "checkbox__after", children: after })] }));
|
|
210
217
|
}
|
|
211
218
|
|
|
212
219
|
export { Checkbox, checkboxAppearance, checkboxConfig };
|