@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
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var clsx = require('clsx');
|
|
6
|
+
var urlWithAssetPrefix = require('./cjs/hoc/urlWithAssetPrefix.js');
|
|
7
|
+
var useDevicePropsGenerator = require('./cjs/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
8
|
+
var useStyles = require('./cjs/hooks/useStyles/useStyles.js');
|
|
9
|
+
|
|
10
|
+
const Image = urlWithAssetPrefix.urlWithAssetPrefix(function Image(props) {
|
|
11
|
+
const { className, type, src, title, alt, caption, imageClassName, imageWrapperClassName, mode, overlay, placeholderUrl, before, after, isSkeleton, onClick, onError, children, } = props;
|
|
12
|
+
const propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props);
|
|
13
|
+
const { fillClass, fillHoverClass, borderColorClass, borderColorImageClass, borderTypeClass, borderWidthClass, cursorClass, heightClass, horizontalAlignClass, imageHeightClass, imageWidthClass, resizeModeClass, shapeClass, verticalAlignClass, widthClass, } = propsGenerator;
|
|
14
|
+
const { image: imageStyles, styles, wrapper: wrapperStyles, } = useStyles.useStyles(props);
|
|
15
|
+
console.log(styles);
|
|
16
|
+
const onErrorImage = React.useCallback((event) => {
|
|
17
|
+
if (onError) {
|
|
18
|
+
onError(event);
|
|
19
|
+
}
|
|
20
|
+
else if (placeholderUrl && !event.target.src.endsWith(placeholderUrl)) {
|
|
21
|
+
event.target.src = placeholderUrl;
|
|
22
|
+
}
|
|
23
|
+
}, [onError, placeholderUrl]);
|
|
24
|
+
return (jsxRuntime.jsxs("div", { className: clsx(className, 'image', mode && `image_mode_${mode}`, type && `image_type_${type}`, cursorClass && `cursor_${cursorClass}`, horizontalAlignClass &&
|
|
25
|
+
`image_horizontal-align_${horizontalAlignClass}`, verticalAlignClass && `image_vertical-align_${verticalAlignClass}`, shapeClass && `image_shape_${shapeClass}`, fillClass && `fill_${fillClass}`, fillHoverClass && `fill_hover_${fillHoverClass}`, resizeModeClass && `image_resize-mode_${resizeModeClass}`, widthClass && `width_${widthClass}`, heightClass && `height_${heightClass}`, isSkeleton && 'image_skeleton'), style: styles, onClick: onClick, children: [before, jsxRuntime.jsxs("div", { className: clsx('image__wrapper', imageWrapperClassName), style: wrapperStyles, children: [jsxRuntime.jsx("img", { className: clsx('image__item', imageWidthClass && `width_${imageWidthClass}`, imageHeightClass && `height_${imageHeightClass}`, imageClassName, borderWidthClass && `border-width_${borderWidthClass}`, borderColorClass && `border-color_${borderColorClass}`, borderTypeClass && `border_type_${borderTypeClass}`, borderColorImageClass &&
|
|
26
|
+
`border-color-image_${borderColorImageClass}`), src: src, title: title || alt, alt: alt || title, style: imageStyles, onError: onErrorImage }), overlay, caption, children] }), after] }));
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
exports.Image = Image;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useCallback } from 'react';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { urlWithAssetPrefix } from './hoc/urlWithAssetPrefix.js';
|
|
5
|
+
import { useDevicePropsGenerator } from './hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
6
|
+
import { useStyles } from './hooks/useStyles/useStyles.js';
|
|
7
|
+
|
|
8
|
+
const Image = urlWithAssetPrefix(function Image(props) {
|
|
9
|
+
const { className, type, src, title, alt, caption, imageClassName, imageWrapperClassName, mode, overlay, placeholderUrl, before, after, isSkeleton, onClick, onError, children, } = props;
|
|
10
|
+
const propsGenerator = useDevicePropsGenerator(props);
|
|
11
|
+
const { fillClass, fillHoverClass, borderColorClass, borderColorImageClass, borderTypeClass, borderWidthClass, cursorClass, heightClass, horizontalAlignClass, imageHeightClass, imageWidthClass, resizeModeClass, shapeClass, verticalAlignClass, widthClass, } = propsGenerator;
|
|
12
|
+
const { image: imageStyles, styles, wrapper: wrapperStyles, } = useStyles(props);
|
|
13
|
+
console.log(styles);
|
|
14
|
+
const onErrorImage = useCallback((event) => {
|
|
15
|
+
if (onError) {
|
|
16
|
+
onError(event);
|
|
17
|
+
}
|
|
18
|
+
else if (placeholderUrl && !event.target.src.endsWith(placeholderUrl)) {
|
|
19
|
+
event.target.src = placeholderUrl;
|
|
20
|
+
}
|
|
21
|
+
}, [onError, placeholderUrl]);
|
|
22
|
+
return (jsxs("div", { className: clsx(className, 'image', mode && `image_mode_${mode}`, type && `image_type_${type}`, cursorClass && `cursor_${cursorClass}`, horizontalAlignClass &&
|
|
23
|
+
`image_horizontal-align_${horizontalAlignClass}`, verticalAlignClass && `image_vertical-align_${verticalAlignClass}`, shapeClass && `image_shape_${shapeClass}`, fillClass && `fill_${fillClass}`, fillHoverClass && `fill_hover_${fillHoverClass}`, resizeModeClass && `image_resize-mode_${resizeModeClass}`, widthClass && `width_${widthClass}`, heightClass && `height_${heightClass}`, isSkeleton && 'image_skeleton'), style: styles, onClick: onClick, children: [before, jsxs("div", { className: clsx('image__wrapper', imageWrapperClassName), style: wrapperStyles, children: [jsx("img", { className: clsx('image__item', imageWidthClass && `width_${imageWidthClass}`, imageHeightClass && `height_${imageHeightClass}`, imageClassName, borderWidthClass && `border-width_${borderWidthClass}`, borderColorClass && `border-color_${borderColorClass}`, borderTypeClass && `border_type_${borderTypeClass}`, borderColorImageClass &&
|
|
24
|
+
`border-color-image_${borderColorImageClass}`), src: src, title: title || alt, alt: alt || title, style: imageStyles, onError: onErrorImage }), overlay, caption, children] }), after] }));
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export { Image as I };
|
|
@@ -5,9 +5,8 @@ var React = require('react');
|
|
|
5
5
|
var clsx = require('clsx');
|
|
6
6
|
var useAppearanceConfig = require('./cjs/hooks/useAppearanceConfig/useAppearanceConfig.js');
|
|
7
7
|
var useDevicePropsGenerator = require('./cjs/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
8
|
-
var tslib_es6 = require('./tslib.es6_cjs_CCZ3TN_7.js');
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
const inputAppearanceDefault = {
|
|
11
10
|
defaultPrimary: {
|
|
12
11
|
fill: 'surfaceSecondary',
|
|
13
12
|
fillHover: 'surfaceTertiary',
|
|
@@ -32,7 +31,7 @@ var inputAppearanceDefault = {
|
|
|
32
31
|
},
|
|
33
32
|
};
|
|
34
33
|
|
|
35
|
-
|
|
34
|
+
const inputAppearanceDisabled = {
|
|
36
35
|
disabledPrimary: {
|
|
37
36
|
fill: 'surfaceDisabled',
|
|
38
37
|
fillHover: 'surfaceDisabled',
|
|
@@ -53,7 +52,7 @@ var inputAppearanceDisabled = {
|
|
|
53
52
|
},
|
|
54
53
|
};
|
|
55
54
|
|
|
56
|
-
|
|
55
|
+
const inputAppearanceError = {
|
|
57
56
|
errorPrimary: {
|
|
58
57
|
fill: 'errorTertiary',
|
|
59
58
|
borderColor: 'errorBorderQuaternary',
|
|
@@ -75,7 +74,7 @@ var inputAppearanceError = {
|
|
|
75
74
|
},
|
|
76
75
|
};
|
|
77
76
|
|
|
78
|
-
|
|
77
|
+
const inputAppearanceRequire = {
|
|
79
78
|
requirePrimary: {
|
|
80
79
|
fill: 'warningTertiary',
|
|
81
80
|
fillHover: 'warningSecondary',
|
|
@@ -98,7 +97,7 @@ var inputAppearanceRequire = {
|
|
|
98
97
|
},
|
|
99
98
|
};
|
|
100
99
|
|
|
101
|
-
|
|
100
|
+
const inputAppearanceShape = {
|
|
102
101
|
circular: {
|
|
103
102
|
shape: 'circular',
|
|
104
103
|
},
|
|
@@ -123,7 +122,7 @@ var inputAppearanceShape = {
|
|
|
123
122
|
},
|
|
124
123
|
};
|
|
125
124
|
|
|
126
|
-
|
|
125
|
+
const inputAppearanceSize = {
|
|
127
126
|
sizeXXL: {
|
|
128
127
|
size: 'xxl',
|
|
129
128
|
textSize: 'l',
|
|
@@ -154,7 +153,7 @@ var inputAppearanceSize = {
|
|
|
154
153
|
},
|
|
155
154
|
};
|
|
156
155
|
|
|
157
|
-
|
|
156
|
+
const inputAppearanceStyle = {
|
|
158
157
|
solid: {
|
|
159
158
|
borderColor: 'none',
|
|
160
159
|
borderColorHover: 'none',
|
|
@@ -170,7 +169,7 @@ var inputAppearanceStyle = {
|
|
|
170
169
|
},
|
|
171
170
|
};
|
|
172
171
|
|
|
173
|
-
|
|
172
|
+
const inputAppearanceSuccess = {
|
|
174
173
|
successPrimary: {
|
|
175
174
|
fill: 'successTertiary',
|
|
176
175
|
borderColor: 'successBorderQuaternary',
|
|
@@ -192,21 +191,30 @@ var inputAppearanceSuccess = {
|
|
|
192
191
|
},
|
|
193
192
|
};
|
|
194
193
|
|
|
195
|
-
|
|
194
|
+
const inputAppearance = {
|
|
195
|
+
...inputAppearanceDefault,
|
|
196
|
+
...inputAppearanceError,
|
|
197
|
+
...inputAppearanceShape,
|
|
198
|
+
...inputAppearanceSuccess,
|
|
199
|
+
...inputAppearanceRequire,
|
|
200
|
+
...inputAppearanceDisabled,
|
|
201
|
+
...inputAppearanceSize,
|
|
202
|
+
...inputAppearanceStyle,
|
|
203
|
+
};
|
|
196
204
|
|
|
197
|
-
|
|
205
|
+
const inputConfig = {
|
|
198
206
|
appearance: inputAppearance,
|
|
199
|
-
setAppearance:
|
|
207
|
+
setAppearance: (appearanceConfig) => {
|
|
200
208
|
inputConfig.appearance = appearanceConfig;
|
|
201
209
|
},
|
|
202
210
|
};
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
return (jsxRuntime.jsx("input", { id: String(id), className: clsx(className, 'input', type === 'number' && 'input_type_number', isDisabled && 'input_state_disabled', (textSizeClass || textColorClass || textWeightClass) && 'text',
|
|
209
|
-
|
|
211
|
+
const Input = React.forwardRef(function Input(props, ref) {
|
|
212
|
+
const { id, appearance, className, dataTestId, type = 'text', name, autocomplete, index, placeholder, value, isDisabled, onBlur, onChange, onFocus, onKeyDown, } = props;
|
|
213
|
+
const appearanceConfig = useAppearanceConfig.useAppearanceConfig(appearance, inputConfig, isDisabled);
|
|
214
|
+
const propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
|
|
215
|
+
const { fillClass, fillHoverClass, borderColorClass, borderColorHoverClass, borderWidthClass, textColorClass, textSizeClass, textWeightClass, caretClass, placeholderTextColorClass, shapeClass, shapeStrengthClass, sizeClass, widthClass, } = propsGenerator;
|
|
216
|
+
return (jsxRuntime.jsx("input", { id: String(id), className: clsx(className, 'input', type === 'number' && 'input_type_number', isDisabled && 'input_state_disabled', (textSizeClass || textColorClass || textWeightClass) && 'text', borderColorClass && `border-color_${borderColorClass}`, borderColorHoverClass && `border-color_hover_${borderColorHoverClass}`, borderWidthClass && `border-width_${borderWidthClass}`, caretClass && `caret-color_${caretClass}`, fillClass && `fill_${fillClass}`, fillHoverClass && `fill_hover_${fillHoverClass}`, placeholderTextColorClass &&
|
|
217
|
+
`placeholder-text-color_${placeholderTextColorClass}`, shapeClass && `shape_${shapeClass}`, shapeStrengthClass && `shape-strength_${shapeStrengthClass}`, sizeClass && `input_size_${sizeClass}`, textColorClass && `text-color_${textColorClass}`, textColorClass && `text-color_${textColorClass}`, textSizeClass && `text_size_${textSizeClass}`, textWeightClass && `text-weight_${textWeightClass}`, widthClass && `width_${widthClass}`), type: type, ref: ref, disabled: isDisabled, autoComplete: autocomplete, "data-test-id": dataTestId || (name ? `${name}Input` : 'input'), index: index, placeholder: placeholder, value: value, onBlur: onBlur, onChange: onChange, onFocus: onFocus, onKeyDown: onKeyDown }));
|
|
210
218
|
});
|
|
211
219
|
|
|
212
220
|
exports.Input = Input;
|
|
@@ -3,9 +3,8 @@ 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 { _ as __assign } from './tslib.es6_es_Bwu1Cn-t.js';
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
const inputAppearanceDefault = {
|
|
9
8
|
defaultPrimary: {
|
|
10
9
|
fill: 'surfaceSecondary',
|
|
11
10
|
fillHover: 'surfaceTertiary',
|
|
@@ -30,7 +29,7 @@ var inputAppearanceDefault = {
|
|
|
30
29
|
},
|
|
31
30
|
};
|
|
32
31
|
|
|
33
|
-
|
|
32
|
+
const inputAppearanceDisabled = {
|
|
34
33
|
disabledPrimary: {
|
|
35
34
|
fill: 'surfaceDisabled',
|
|
36
35
|
fillHover: 'surfaceDisabled',
|
|
@@ -51,7 +50,7 @@ var inputAppearanceDisabled = {
|
|
|
51
50
|
},
|
|
52
51
|
};
|
|
53
52
|
|
|
54
|
-
|
|
53
|
+
const inputAppearanceError = {
|
|
55
54
|
errorPrimary: {
|
|
56
55
|
fill: 'errorTertiary',
|
|
57
56
|
borderColor: 'errorBorderQuaternary',
|
|
@@ -73,7 +72,7 @@ var inputAppearanceError = {
|
|
|
73
72
|
},
|
|
74
73
|
};
|
|
75
74
|
|
|
76
|
-
|
|
75
|
+
const inputAppearanceRequire = {
|
|
77
76
|
requirePrimary: {
|
|
78
77
|
fill: 'warningTertiary',
|
|
79
78
|
fillHover: 'warningSecondary',
|
|
@@ -96,7 +95,7 @@ var inputAppearanceRequire = {
|
|
|
96
95
|
},
|
|
97
96
|
};
|
|
98
97
|
|
|
99
|
-
|
|
98
|
+
const inputAppearanceShape = {
|
|
100
99
|
circular: {
|
|
101
100
|
shape: 'circular',
|
|
102
101
|
},
|
|
@@ -121,7 +120,7 @@ var inputAppearanceShape = {
|
|
|
121
120
|
},
|
|
122
121
|
};
|
|
123
122
|
|
|
124
|
-
|
|
123
|
+
const inputAppearanceSize = {
|
|
125
124
|
sizeXXL: {
|
|
126
125
|
size: 'xxl',
|
|
127
126
|
textSize: 'l',
|
|
@@ -152,7 +151,7 @@ var inputAppearanceSize = {
|
|
|
152
151
|
},
|
|
153
152
|
};
|
|
154
153
|
|
|
155
|
-
|
|
154
|
+
const inputAppearanceStyle = {
|
|
156
155
|
solid: {
|
|
157
156
|
borderColor: 'none',
|
|
158
157
|
borderColorHover: 'none',
|
|
@@ -168,7 +167,7 @@ var inputAppearanceStyle = {
|
|
|
168
167
|
},
|
|
169
168
|
};
|
|
170
169
|
|
|
171
|
-
|
|
170
|
+
const inputAppearanceSuccess = {
|
|
172
171
|
successPrimary: {
|
|
173
172
|
fill: 'successTertiary',
|
|
174
173
|
borderColor: 'successBorderQuaternary',
|
|
@@ -190,21 +189,30 @@ var inputAppearanceSuccess = {
|
|
|
190
189
|
},
|
|
191
190
|
};
|
|
192
191
|
|
|
193
|
-
|
|
192
|
+
const inputAppearance = {
|
|
193
|
+
...inputAppearanceDefault,
|
|
194
|
+
...inputAppearanceError,
|
|
195
|
+
...inputAppearanceShape,
|
|
196
|
+
...inputAppearanceSuccess,
|
|
197
|
+
...inputAppearanceRequire,
|
|
198
|
+
...inputAppearanceDisabled,
|
|
199
|
+
...inputAppearanceSize,
|
|
200
|
+
...inputAppearanceStyle,
|
|
201
|
+
};
|
|
194
202
|
|
|
195
|
-
|
|
203
|
+
const inputConfig = {
|
|
196
204
|
appearance: inputAppearance,
|
|
197
|
-
setAppearance:
|
|
205
|
+
setAppearance: (appearanceConfig) => {
|
|
198
206
|
inputConfig.appearance = appearanceConfig;
|
|
199
207
|
},
|
|
200
208
|
};
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
return (jsx("input", { id: String(id), className: clsx(className, 'input', type === 'number' && 'input_type_number', isDisabled && 'input_state_disabled', (textSizeClass || textColorClass || textWeightClass) && 'text',
|
|
207
|
-
|
|
209
|
+
const Input = React.forwardRef(function Input(props, ref) {
|
|
210
|
+
const { id, appearance, className, dataTestId, type = 'text', name, autocomplete, index, placeholder, value, isDisabled, onBlur, onChange, onFocus, onKeyDown, } = props;
|
|
211
|
+
const appearanceConfig = useAppearanceConfig(appearance, inputConfig, isDisabled);
|
|
212
|
+
const propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
213
|
+
const { fillClass, fillHoverClass, borderColorClass, borderColorHoverClass, borderWidthClass, textColorClass, textSizeClass, textWeightClass, caretClass, placeholderTextColorClass, shapeClass, shapeStrengthClass, sizeClass, widthClass, } = propsGenerator;
|
|
214
|
+
return (jsx("input", { id: String(id), className: clsx(className, 'input', type === 'number' && 'input_type_number', isDisabled && 'input_state_disabled', (textSizeClass || textColorClass || textWeightClass) && 'text', borderColorClass && `border-color_${borderColorClass}`, borderColorHoverClass && `border-color_hover_${borderColorHoverClass}`, borderWidthClass && `border-width_${borderWidthClass}`, caretClass && `caret-color_${caretClass}`, fillClass && `fill_${fillClass}`, fillHoverClass && `fill_hover_${fillHoverClass}`, placeholderTextColorClass &&
|
|
215
|
+
`placeholder-text-color_${placeholderTextColorClass}`, shapeClass && `shape_${shapeClass}`, shapeStrengthClass && `shape-strength_${shapeStrengthClass}`, sizeClass && `input_size_${sizeClass}`, textColorClass && `text-color_${textColorClass}`, textColorClass && `text-color_${textColorClass}`, textSizeClass && `text_size_${textSizeClass}`, textWeightClass && `text-weight_${textWeightClass}`, widthClass && `width_${widthClass}`), type: type, ref: ref, disabled: isDisabled, autoComplete: autocomplete, "data-test-id": dataTestId || (name ? `${name}Input` : 'input'), index: index, placeholder: placeholder, value: value, onBlur: onBlur, onChange: onChange, onFocus: onFocus, onKeyDown: onKeyDown }));
|
|
208
216
|
});
|
|
209
217
|
|
|
210
218
|
export { Input as I, inputAppearance as a, inputConfig as i };
|
|
@@ -6,11 +6,10 @@ var clsx = require('clsx');
|
|
|
6
6
|
var useAppearanceConfig = require('./cjs/hooks/useAppearanceConfig/useAppearanceConfig.js');
|
|
7
7
|
var useDevicePropsGenerator = require('./cjs/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
8
8
|
var useStyles = require('./cjs/hooks/useStyles/useStyles.js');
|
|
9
|
-
var Icon = require('./
|
|
10
|
-
var Text = require('./
|
|
11
|
-
var tslib_es6 = require('./tslib.es6_cjs_CCZ3TN_7.js');
|
|
9
|
+
var Icon = require('./Icon_cjs_DpFxIFv5.js');
|
|
10
|
+
var Text = require('./Text_cjs_BDTjOTVB.js');
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
const labelAppearanceAccent = {
|
|
14
13
|
accentMutedPrimary: {
|
|
15
14
|
fill: 'accentTertiary',
|
|
16
15
|
borderColor: 'accentBorderSecondary',
|
|
@@ -31,7 +30,7 @@ var labelAppearanceAccent = {
|
|
|
31
30
|
},
|
|
32
31
|
};
|
|
33
32
|
|
|
34
|
-
|
|
33
|
+
const labelAppearanceDanger = {
|
|
35
34
|
dangerMutedPrimary: {
|
|
36
35
|
fill: 'dangerTertiary',
|
|
37
36
|
labelTextColor: 'dangerTextQuaternary',
|
|
@@ -48,7 +47,7 @@ var labelAppearanceDanger = {
|
|
|
48
47
|
},
|
|
49
48
|
};
|
|
50
49
|
|
|
51
|
-
|
|
50
|
+
const labelAppearanceDisabled = {
|
|
52
51
|
disabledMutedPrimary: {
|
|
53
52
|
fill: 'disabledMuted',
|
|
54
53
|
labelTextColor: 'disabledMutedTextPrimary',
|
|
@@ -65,7 +64,7 @@ var labelAppearanceDisabled = {
|
|
|
65
64
|
},
|
|
66
65
|
};
|
|
67
66
|
|
|
68
|
-
|
|
67
|
+
const labelAppearanceError = {
|
|
69
68
|
errorMutedPrimary: {
|
|
70
69
|
fill: 'errorDisabled',
|
|
71
70
|
labelTextColor: 'errorTextQuaternary',
|
|
@@ -82,7 +81,7 @@ var labelAppearanceError = {
|
|
|
82
81
|
},
|
|
83
82
|
};
|
|
84
83
|
|
|
85
|
-
|
|
84
|
+
const labelAppearanceGradient = {
|
|
86
85
|
gradientPrimary: {
|
|
87
86
|
fill: 'gradientPrimaryDiagonal',
|
|
88
87
|
labelTextColor: 'white',
|
|
@@ -92,7 +91,7 @@ var labelAppearanceGradient = {
|
|
|
92
91
|
},
|
|
93
92
|
};
|
|
94
93
|
|
|
95
|
-
|
|
94
|
+
const labelAppearanceInfo = {
|
|
96
95
|
infoMutedPrimary: {
|
|
97
96
|
fill: 'infoMuted',
|
|
98
97
|
labelTextColor: 'infoMutedTextPrimary',
|
|
@@ -116,7 +115,7 @@ var labelAppearanceInfo = {
|
|
|
116
115
|
},
|
|
117
116
|
};
|
|
118
117
|
|
|
119
|
-
|
|
118
|
+
const labelAppearancePrimary = {
|
|
120
119
|
primaryMutedPrimary: {
|
|
121
120
|
fill: 'primaryDisabled',
|
|
122
121
|
labelTextColor: 'primaryTextSecondary',
|
|
@@ -133,7 +132,7 @@ var labelAppearancePrimary = {
|
|
|
133
132
|
},
|
|
134
133
|
};
|
|
135
134
|
|
|
136
|
-
|
|
135
|
+
const labelAppearanceSecondary = {
|
|
137
136
|
secondaryMutedPrimary: {
|
|
138
137
|
fill: 'secondaryDisabled',
|
|
139
138
|
labelTextColor: 'secondaryTextQuaternary',
|
|
@@ -150,7 +149,7 @@ var labelAppearanceSecondary = {
|
|
|
150
149
|
},
|
|
151
150
|
};
|
|
152
151
|
|
|
153
|
-
|
|
152
|
+
const labelAppearanceShape = {
|
|
154
153
|
circular: {
|
|
155
154
|
shape: 'circular',
|
|
156
155
|
},
|
|
@@ -175,7 +174,7 @@ var labelAppearanceShape = {
|
|
|
175
174
|
},
|
|
176
175
|
};
|
|
177
176
|
|
|
178
|
-
|
|
177
|
+
const labelAppearanceSize = {
|
|
179
178
|
sizeXXL: {
|
|
180
179
|
size: 'xxl',
|
|
181
180
|
labelTextSize: 'xxl',
|
|
@@ -234,7 +233,7 @@ var labelAppearanceSize = {
|
|
|
234
233
|
},
|
|
235
234
|
};
|
|
236
235
|
|
|
237
|
-
|
|
236
|
+
const labelAppearanceStyle = {
|
|
238
237
|
solid: {
|
|
239
238
|
borderColor: 'none',
|
|
240
239
|
},
|
|
@@ -248,7 +247,7 @@ var labelAppearanceStyle = {
|
|
|
248
247
|
},
|
|
249
248
|
};
|
|
250
249
|
|
|
251
|
-
|
|
250
|
+
const labelAppearanceSuccess = {
|
|
252
251
|
successMutedPrimary: {
|
|
253
252
|
fill: 'successTertiary',
|
|
254
253
|
labelTextColor: 'successTextQuaternary',
|
|
@@ -265,7 +264,7 @@ var labelAppearanceSuccess = {
|
|
|
265
264
|
},
|
|
266
265
|
};
|
|
267
266
|
|
|
268
|
-
|
|
267
|
+
const labelAppearanceSurface = {
|
|
269
268
|
surfaceMutedPrimary: {
|
|
270
269
|
fill: 'surfaceSecondary',
|
|
271
270
|
labelTextColor: 'surfaceTextQuaternary',
|
|
@@ -294,7 +293,7 @@ var labelAppearanceSurface = {
|
|
|
294
293
|
},
|
|
295
294
|
};
|
|
296
295
|
|
|
297
|
-
|
|
296
|
+
const labelAppearanceWarning = {
|
|
298
297
|
warningMutedPrimary: {
|
|
299
298
|
fill: 'warningTertiary',
|
|
300
299
|
labelTextColor: 'warningTextSecondary',
|
|
@@ -311,31 +310,44 @@ var labelAppearanceWarning = {
|
|
|
311
310
|
},
|
|
312
311
|
};
|
|
313
312
|
|
|
314
|
-
|
|
313
|
+
const labelAppearance = {
|
|
314
|
+
...labelAppearanceDisabled,
|
|
315
|
+
...labelAppearanceShape,
|
|
316
|
+
...labelAppearanceSize,
|
|
317
|
+
...labelAppearanceStyle,
|
|
318
|
+
...labelAppearanceGradient,
|
|
319
|
+
...labelAppearanceAccent,
|
|
320
|
+
...labelAppearanceDanger,
|
|
321
|
+
...labelAppearanceError,
|
|
322
|
+
...labelAppearanceInfo,
|
|
323
|
+
...labelAppearancePrimary,
|
|
324
|
+
...labelAppearanceSecondary,
|
|
325
|
+
...labelAppearanceSuccess,
|
|
326
|
+
...labelAppearanceSurface,
|
|
327
|
+
...labelAppearanceWarning,
|
|
328
|
+
};
|
|
315
329
|
|
|
316
|
-
|
|
330
|
+
const labelConfig = {
|
|
317
331
|
appearance: labelAppearance,
|
|
318
|
-
setAppearance:
|
|
332
|
+
setAppearance: (appearanceConfig) => {
|
|
319
333
|
labelConfig.appearance = appearanceConfig;
|
|
320
334
|
},
|
|
321
335
|
};
|
|
322
336
|
function Label(props) {
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
(_a = tooltipRef.current) === null || _a === void 0 ? void 0 : _a.openTooltip();
|
|
337
|
+
const { dataTestId, dataTour, className, appearance, label, isDisabled, cursor, tooltipContent, before, after, isSkeleton, onClick, children, } = props;
|
|
338
|
+
const tooltipRef = React.useRef(null);
|
|
339
|
+
const onMouseEnterLabel = React.useCallback(() => {
|
|
340
|
+
tooltipRef.current?.openTooltip();
|
|
328
341
|
}, []);
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
(_a = tooltipRef.current) === null || _a === void 0 ? void 0 : _a.closeTooltip();
|
|
342
|
+
const onMouseLeaveLabel = React.useCallback(() => {
|
|
343
|
+
tooltipRef.current?.closeTooltip();
|
|
332
344
|
}, []);
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
345
|
+
const appearanceConfig = useAppearanceConfig.useAppearanceConfig(appearance, labelConfig, isDisabled);
|
|
346
|
+
const propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
|
|
347
|
+
const { alignClass, fillClass, fillHoverClass, borderColorClass, borderTypeClass, labelTextColor, labelTextColorHover, labelTextSize, labelTextWeight, labelTextWrap, iconAfter, iconAfterFill, iconAfterFillIcon, iconAfterFillSize, iconAfterShape, iconAfterSize, iconAfterSrc, iconBefore, iconBeforeFill, iconBeforeFillIcon, iconBeforeFillSize, iconBeforeShape, iconBeforeSize, iconBeforeSrc, shapeClass, shapeStrengthClass, sizeClass, tooltipAlignment, tooltipAppearance, tooltipArrowPosition, tooltipText, tooltipTextSize, tooltipTextWeight, tooltipTitle, tooltipTitleSize, tooltipTitleWeight, widthClass, wrapClass, } = propsGenerator;
|
|
336
348
|
// @ts-expect-error
|
|
337
|
-
|
|
338
|
-
return (jsxRuntime.jsxs("div", { className: clsx(className, 'label', fillClass &&
|
|
349
|
+
const { styles: labelStyles } = useStyles.useStyles(props);
|
|
350
|
+
return (jsxRuntime.jsxs("div", { className: clsx(className, 'label', fillClass && `fill_${fillClass}`, fillHoverClass && `fill_hover_${fillHoverClass}`, shapeClass && `shape_${shapeClass}`, borderColorClass && `border-color_${borderColorClass}`, borderTypeClass && `border_type_${borderTypeClass}`, sizeClass && `label_size_${sizeClass}`, wrapClass && `word-wrap_${wrapClass}`, widthClass && `label_width_${widthClass}`, alignClass && `align_${alignClass}`, shapeStrengthClass && `shape-strength_${shapeStrengthClass}`, isSkeleton && `label_skeleton`, onClick && (cursor || 'cursor_type_pointer')), "data-test-id": dataTestId, "data-tour": dataTour, style: labelStyles, onClick: onClick, onMouseEnter: onMouseEnterLabel, onMouseLeave: onMouseLeaveLabel, children: [before, (iconBefore || iconBeforeSrc) && (jsxRuntime.jsx(Icon.Icon, { className: clsx('label__icon_before'), fill: iconBeforeFill, fillSize: iconBeforeFillSize, iconFill: iconBeforeFillIcon, iconSize: iconBeforeSize, imageSrc: iconBeforeSrc, shape: iconBeforeShape, SvgImage: iconBefore })), jsxRuntime.jsxs("div", { className: "label__inner", children: [typeof label === 'string' ? (jsxRuntime.jsx(Text.Text, { className: "label__text", size: labelTextSize, textColor: labelTextColor, textColorHover: labelTextColorHover, textWeight: labelTextWeight, textWrap: labelTextWrap, children: label })) : (jsxRuntime.jsx("div", { className: "label__text", children: label })), children, tooltipContent && (jsxRuntime.jsx(Icon.Tooltip, { className: "label__tooltip", ref: tooltipRef, appearance: tooltipAppearance, alignment: tooltipAlignment, title: tooltipTitle, titleSize: tooltipTitleSize, titleWeight: tooltipTitleWeight, text: tooltipText, textSize: tooltipTextSize, textWeight: tooltipTextWeight, arrowPosition: tooltipArrowPosition, children: tooltipContent }))] }), (iconAfter || iconAfterSrc) && (jsxRuntime.jsx(Icon.Icon, { className: clsx('label__icon_after'), fill: iconAfterFill, fillSize: iconAfterFillSize, iconFill: iconAfterFillIcon, iconSize: iconAfterSize, imageSrc: iconAfterSrc, shape: iconAfterShape, SvgImage: iconAfter })), after] }));
|
|
339
351
|
}
|
|
340
352
|
|
|
341
353
|
exports.Label = Label;
|