@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
|
@@ -4,7 +4,6 @@ import SVG from 'react-inlinesvg';
|
|
|
4
4
|
import { urlWithAssetPrefix } from '../hoc/urlWithAssetPrefix.js';
|
|
5
5
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
6
6
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
7
|
-
import '../tslib.es6_es_Bwu1Cn-t.js';
|
|
8
7
|
import 'react';
|
|
9
8
|
import '@itcase/common';
|
|
10
9
|
import '../context/UrlAssetPrefix.js';
|
|
@@ -21,13 +20,13 @@ import '../hooks.js';
|
|
|
21
20
|
import '../hooks/useStyles/styleAttributes.js';
|
|
22
21
|
import 'lodash/maxBy';
|
|
23
22
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
const SVGContent = urlWithAssetPrefix(function SVGContent(props) {
|
|
24
|
+
const { className, src, SvgImage } = props;
|
|
25
|
+
const propsGenerator = useDevicePropsGenerator(props);
|
|
26
|
+
const { svgFillClass, svgFillHoverClass } = propsGenerator;
|
|
28
27
|
// @ts-expect-error
|
|
29
|
-
|
|
30
|
-
return (jsxs("div", { className: clsx(className, 'svg-content', svgFillClass &&
|
|
28
|
+
const { styles: svgContentStyles } = useStyles(props);
|
|
29
|
+
return (jsxs("div", { className: clsx(className, 'svg-content', svgFillClass && `svg_fill_${svgFillClass}`, svgFillHoverClass && `svg_fill_hover_${svgFillHoverClass}`), style: svgContentStyles, children: [src && jsx(SVG, { src: src }), SvgImage && jsx(SvgImage, {})] }));
|
|
31
30
|
});
|
|
32
31
|
|
|
33
32
|
export { SVGContent };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const scrollOnDragMock = (jsx("div", { style: { display: 'flex' }, children: Array.from({ length: 20 }, (_, index) => (jsx("div", { style: {
|
|
4
4
|
height: 65,
|
|
5
5
|
justifyContent: 'center',
|
|
6
6
|
alignItems: 'center',
|
|
@@ -8,6 +8,6 @@ var scrollOnDragMock = (jsx("div", { style: { display: 'flex' }, children: Array
|
|
|
8
8
|
padding: '50px',
|
|
9
9
|
border: '1px solid black',
|
|
10
10
|
display: 'flex',
|
|
11
|
-
}, children: index }, index))
|
|
11
|
+
}, children: index }, index))) }));
|
|
12
12
|
|
|
13
13
|
export { scrollOnDragMock };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
|
|
2
1
|
import { jsx } from 'react/jsx-runtime';
|
|
3
2
|
import React from 'react';
|
|
4
3
|
import clsx from 'clsx';
|
|
@@ -21,14 +20,14 @@ import '../hooks/useStyles/styleAttributes.js';
|
|
|
21
20
|
import 'lodash/maxBy';
|
|
22
21
|
|
|
23
22
|
function ScrollOnDrag(props) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
const { className, scrollContainerProps, children, isScrollbar } = props;
|
|
24
|
+
const propsGenerator = useDevicePropsGenerator(props);
|
|
25
|
+
const { ref } = useScrollContainer();
|
|
26
|
+
const { fillClass, fillHoverClass, borderColorClass, borderTypeClass, borderWidthClass, elevationClass, heightClass, widthClass = 'fill', } = propsGenerator;
|
|
28
27
|
// @ts-expect-error
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
return (jsx(ScrollOnDragWrapper, { scrollableNodeProps: { ref
|
|
28
|
+
const { scrollContainer: scrollContainerStyles, styles: styles } = useStyles(props);
|
|
29
|
+
const ScrollOnDragWrapper = isScrollbar ? SimpleBar : React.Fragment;
|
|
30
|
+
return (jsx(ScrollOnDragWrapper, { scrollableNodeProps: { ref }, children: jsx("div", { className: clsx('scroll-on-drag', className, borderColorClass && `border-color_${borderColorClass}`, borderTypeClass && `border_type_${borderTypeClass}`, borderWidthClass && `border-width_${borderWidthClass}`, elevationClass && `elevation_${elevationClass}`, fillClass && `fill_${fillClass}`, fillHoverClass && `fill_hover_${fillHoverClass}`, heightClass && `height_${heightClass}`, widthClass && `width_${widthClass}`), style: styles, children: jsx(ScrollContainer, { className: clsx(!isScrollbar && 'scroll-on-drag__wrapper'), ref: ref, ...scrollContainerProps, style: scrollContainerStyles, children: children }) }) }));
|
|
32
31
|
}
|
|
33
32
|
|
|
34
33
|
export { ScrollOnDrag };
|
|
@@ -3,7 +3,6 @@ import clsx from 'clsx';
|
|
|
3
3
|
import { ScrollLink } from 'react-scroll';
|
|
4
4
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
5
5
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
6
|
-
import '../tslib.es6_es_Bwu1Cn-t.js';
|
|
7
6
|
import 'react';
|
|
8
7
|
import 'lodash/camelCase';
|
|
9
8
|
import 'lodash/castArray';
|
|
@@ -19,14 +18,14 @@ import '../hooks.js';
|
|
|
19
18
|
import '../hooks/useStyles/styleAttributes.js';
|
|
20
19
|
import 'lodash/maxBy';
|
|
21
20
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return (jsx(Tag, { id: id, className: clsx(className, 'scroll-to-view', alignItemsClass &&
|
|
28
|
-
|
|
29
|
-
|
|
21
|
+
const ScrollToView = ScrollLink(function ScrollToView(props) {
|
|
22
|
+
const { id, className, tag: Tag = 'div', children } = props;
|
|
23
|
+
const propsGenerator = useDevicePropsGenerator(props);
|
|
24
|
+
const { directionClass, justifyContentClass, alignClass, alignDirectionClass, alignItemsClass, alignSelfClass, textColorActiveClass, textColorClass, textColorHoverClass, heightClass, widthClass, } = propsGenerator;
|
|
25
|
+
const { styles: scrollToViewStyles } = useStyles(props);
|
|
26
|
+
return (jsx(Tag, { id: id, className: clsx(className, 'scroll-to-view', alignItemsClass && `align-items_${alignItemsClass}`, widthClass && `width_${widthClass}`, heightClass && `height_${heightClass}`, alignDirectionClass && `align_${alignDirectionClass}`, alignClass && `align_${alignClass}`, textColorClass && `scroll-to-view_text-color_${textColorClass}`, textColorActiveClass &&
|
|
27
|
+
`scroll-to-view_text-color_active_${textColorActiveClass}`, textColorHoverClass &&
|
|
28
|
+
`scroll-to-view_text-color_hover_${textColorHoverClass}`, justifyContentClass && `justify-content_${justifyContentClass}`, directionClass && `direction_${directionClass}`, alignSelfClass && `align-self_${alignSelfClass}`), style: Object.assign({}, scrollToViewStyles, props.style), onClick: props.onClick, children: children }));
|
|
30
29
|
});
|
|
31
30
|
|
|
32
31
|
export { ScrollToView };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const scrollbarMock = Array.from({ length: 30 }, (_, index) => (jsx("div", { children: index })));
|
|
4
4
|
|
|
5
5
|
export { scrollbarMock };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
|
|
2
1
|
import { icons16, icons24 } from '@itcase/icons/default';
|
|
3
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
3
|
import React, { useCallback } from 'react';
|
|
@@ -6,9 +5,9 @@ import clsx from 'clsx';
|
|
|
6
5
|
import { useAppearanceConfig } from '../hooks/useAppearanceConfig/useAppearanceConfig.js';
|
|
7
6
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
8
7
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
9
|
-
import { I as Icon } from '../
|
|
10
|
-
import { T as Text } from '../
|
|
11
|
-
import { S as Scrollbar } from '../
|
|
8
|
+
import { I as Icon } from '../Icon_es_DkVkzTha.js';
|
|
9
|
+
import { T as Text } from '../Text_es_CnymlElo.js';
|
|
10
|
+
import { S as Scrollbar } from '../Scrollbar_es_CcMgNvGi.js';
|
|
12
11
|
import 'lodash/camelCase';
|
|
13
12
|
import 'lodash/castArray';
|
|
14
13
|
import 'lodash/upperFirst';
|
|
@@ -25,10 +24,10 @@ import 'lodash/maxBy';
|
|
|
25
24
|
import 'react-inlinesvg';
|
|
26
25
|
import '../hoc/urlWithAssetPrefix.js';
|
|
27
26
|
import '../context/UrlAssetPrefix.js';
|
|
28
|
-
import '../
|
|
27
|
+
import '../Link_es_P2b6ya7P.js';
|
|
29
28
|
import 'react-scrollbars-custom';
|
|
30
29
|
|
|
31
|
-
|
|
30
|
+
const searchAppearanceDefault = {
|
|
32
31
|
defaultPrimary: {
|
|
33
32
|
fill: 'surfaceSecondary',
|
|
34
33
|
borderColor: 'surfaceBorderQuaternary',
|
|
@@ -51,7 +50,7 @@ var searchAppearanceDefault = {
|
|
|
51
50
|
},
|
|
52
51
|
};
|
|
53
52
|
|
|
54
|
-
|
|
53
|
+
const searchAppearanceDisabled = {
|
|
55
54
|
disabledPrimary: {
|
|
56
55
|
fill: 'surfaceDisabled',
|
|
57
56
|
borderColor: 'surfaceBorderDisabled',
|
|
@@ -64,7 +63,7 @@ var searchAppearanceDisabled = {
|
|
|
64
63
|
},
|
|
65
64
|
};
|
|
66
65
|
|
|
67
|
-
|
|
66
|
+
const searchAppearanceError = {
|
|
68
67
|
errorPrimary: {
|
|
69
68
|
fill: 'errorTertiary',
|
|
70
69
|
borderColor: 'errorBorderQuaternary',
|
|
@@ -77,7 +76,7 @@ var searchAppearanceError = {
|
|
|
77
76
|
},
|
|
78
77
|
};
|
|
79
78
|
|
|
80
|
-
|
|
79
|
+
const searchAppearanceRequire = {
|
|
81
80
|
requirePrimary: {
|
|
82
81
|
fill: 'warningTertiary',
|
|
83
82
|
borderColor: 'warningBorderSecondary',
|
|
@@ -90,7 +89,7 @@ var searchAppearanceRequire = {
|
|
|
90
89
|
},
|
|
91
90
|
};
|
|
92
91
|
|
|
93
|
-
|
|
92
|
+
const searchAppearanceShape = {
|
|
94
93
|
circular: {
|
|
95
94
|
shape: 'circular',
|
|
96
95
|
},
|
|
@@ -115,7 +114,7 @@ var searchAppearanceShape = {
|
|
|
115
114
|
},
|
|
116
115
|
};
|
|
117
116
|
|
|
118
|
-
|
|
117
|
+
const searchAppearanceSize = {
|
|
119
118
|
sizeXXL: {
|
|
120
119
|
size: 'xxl',
|
|
121
120
|
iconBefore: icons24.Security.Search,
|
|
@@ -160,7 +159,7 @@ var searchAppearanceSize = {
|
|
|
160
159
|
},
|
|
161
160
|
};
|
|
162
161
|
|
|
163
|
-
|
|
162
|
+
const searchAppearanceStyle = {
|
|
164
163
|
solid: {
|
|
165
164
|
borderColor: 'none',
|
|
166
165
|
borderColorHover: 'none',
|
|
@@ -177,7 +176,7 @@ var searchAppearanceStyle = {
|
|
|
177
176
|
},
|
|
178
177
|
};
|
|
179
178
|
|
|
180
|
-
|
|
179
|
+
const searchAppearanceSuccess = {
|
|
181
180
|
successPrimary: {
|
|
182
181
|
fill: 'successTertiary',
|
|
183
182
|
borderColor: 'accentBorderQuaternary',
|
|
@@ -190,46 +189,55 @@ var searchAppearanceSuccess = {
|
|
|
190
189
|
},
|
|
191
190
|
};
|
|
192
191
|
|
|
193
|
-
|
|
192
|
+
const searchAppearance = {
|
|
193
|
+
...searchAppearanceSize,
|
|
194
|
+
...searchAppearanceStyle,
|
|
195
|
+
...searchAppearanceDefault,
|
|
196
|
+
...searchAppearanceError,
|
|
197
|
+
...searchAppearanceSuccess,
|
|
198
|
+
...searchAppearanceRequire,
|
|
199
|
+
...searchAppearanceDisabled,
|
|
200
|
+
...searchAppearanceShape,
|
|
201
|
+
};
|
|
194
202
|
|
|
195
|
-
|
|
203
|
+
const searchInputConfig = {
|
|
196
204
|
appearance: searchAppearance,
|
|
197
|
-
setAppearance:
|
|
205
|
+
setAppearance: (appearanceConfig) => {
|
|
198
206
|
searchInputConfig.appearance = appearanceConfig;
|
|
199
207
|
},
|
|
200
208
|
};
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
209
|
+
const SearchInput = React.forwardRef(function SearchInput(props, ref) {
|
|
210
|
+
const { dataTour, className, appearance, placeholder, value, before, after, isActive, isSkeleton, isDisabled, onChange, onClickClean, onFocus, onKeyDown, } = props;
|
|
211
|
+
const onChangeSearchInput = useCallback((event) => {
|
|
204
212
|
onChange && onChange(event.target.value);
|
|
205
213
|
}, [onChange]);
|
|
206
|
-
|
|
214
|
+
const onClickClearIcon = useCallback((event) => {
|
|
207
215
|
event.stopPropagation();
|
|
208
216
|
onChange && onChange('');
|
|
209
217
|
if (onClickClean) {
|
|
210
218
|
onClickClean();
|
|
211
219
|
}
|
|
212
220
|
}, [onChange, onClickClean]);
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
return (jsxs("label", { dataTour: dataTour, className: clsx(className, 'search-input', shapeClass &&
|
|
221
|
+
const appearanceConfig = useAppearanceConfig(appearance, searchInputConfig, isDisabled);
|
|
222
|
+
const propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
223
|
+
const { size, fillClass, borderColorClass, borderColorHoverClass, borderTypeClass, borderWidthClass, iconAfter, iconAfterFill, iconAfterSize, iconAfterSrc, iconBefore, iconBeforeFill, iconBeforeSize, iconBeforeSrc, iconClear, iconClearFill, iconClearSize, iconClearSrc, inputFillClass, inputTextColorClass, inputTextSizeClass, inputTextStyleClass, inputTextWeightClass, placeholderTextColor, placeholderTextSize, placeholderTextStyle, placeholderTextWeight, shapeClass, shapeStrengthClass, widthClass, } = propsGenerator;
|
|
224
|
+
const { styles: searchInputStyles } = useStyles(props);
|
|
225
|
+
return (jsxs("label", { dataTour: dataTour, className: clsx(className, 'search-input', shapeClass && `shape_${shapeClass}`, shapeStrengthClass && `shape-strength_${shapeStrengthClass}`, fillClass && `fill_${fillClass}`, widthClass && `width_${widthClass}`, borderColorClass && `border-color_${borderColorClass}`, borderColorHoverClass && `border-color_hover_${borderColorHoverClass}`, borderWidthClass && `border-width_${borderWidthClass}`, borderTypeClass && `border_type_${borderTypeClass}`, size && `search-input_size_${size}`, isSkeleton && `search-input_skeleton`), style: searchInputStyles, children: [before, (iconBefore || iconBeforeSrc) && (jsx(Icon, { className: "search-input__icon-before", size: iconBeforeSize, iconFill: iconBeforeFill, imageSrc: iconBeforeSrc, SvgImage: iconBefore })), jsxs("div", { className: clsx('search-input__wrapper', inputFillClass && `fill_${inputFillClass}`), children: [jsx("input", { className: clsx('search-input__value', (inputTextSizeClass ||
|
|
218
226
|
inputTextWeightClass ||
|
|
219
227
|
inputTextColorClass ||
|
|
220
228
|
inputTextStyleClass) &&
|
|
221
|
-
'text', inputTextSizeClass &&
|
|
229
|
+
'text', inputTextSizeClass && `text_size_${inputTextSizeClass}`, inputTextWeightClass && `text-weight_${inputTextWeightClass}`, inputTextColorClass && `text-color_${inputTextColorClass}`, inputTextStyleClass && `text-style_${inputTextStyleClass}`), type: "text", ref: ref, required: true, value: value || '', onChange: onChangeSearchInput, onFocus: onFocus, onKeyDown: onKeyDown }), jsx("div", { className: "search-input__placeholder", children: jsx(Text, { className: clsx('search-input__placeholder-value'), size: placeholderTextSize, textColor: placeholderTextColor, textStyle: placeholderTextStyle, textWeight: placeholderTextWeight, children: placeholder }) }), value && (jsx(Icon, { className: clsx('search-input__clear', 'cursor_type_pointer', isActive && `fill_${iconClearFill}`), size: iconClearSize, iconFill: iconClearFill, imageSrc: iconClearSrc, SvgImage: iconClear, onClick: onClickClearIcon }))] }), (iconAfter || iconAfterSrc) && (jsx(Icon, { className: "search-input__icon-after", size: iconAfterSize, iconFill: iconAfterFill, imageSrc: iconAfterSrc, SvgImage: iconAfter })), after] }));
|
|
222
230
|
});
|
|
223
231
|
// @ts-expect-error
|
|
224
232
|
SearchInput.DEFAULT_REF_STATE = {
|
|
225
233
|
input: null,
|
|
226
234
|
};
|
|
227
235
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
return (jsx("div", { className: clsx(className, 'search-result', shapeClass &&
|
|
236
|
+
const SearchResult = React.forwardRef(function SearchResult(props) {
|
|
237
|
+
const { className, scrollHeight, before, after, children } = props;
|
|
238
|
+
const propsGenerator = useDevicePropsGenerator(props);
|
|
239
|
+
const { fillClass, shapeClass, shapeStrengthClass } = propsGenerator;
|
|
240
|
+
return (jsx("div", { className: clsx(className, 'search-result', shapeClass && `shape_${shapeClass}`, shapeStrengthClass && `shape-strength_${shapeStrengthClass}`, fillClass && `fill_${fillClass}`), children: jsxs("div", { className: "search-result__wrapper", children: [before, React.Children.toArray(children).filter(Boolean).length && (jsx(Scrollbar, { scrollHeight: scrollHeight ? `${scrollHeight}px` : '300px', children: children })), after] }) }));
|
|
233
241
|
});
|
|
234
242
|
|
|
235
243
|
export { SearchInput, SearchResult, searchAppearance, searchInputConfig };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { _ as __assign } from '../../../tslib.es6_es_Bwu1Cn-t.js';
|
|
2
1
|
import { icons24, icons20, icons16, icons14 } from '@itcase/icons/default';
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
const segmentedMock = {
|
|
5
4
|
activeSegment: {
|
|
6
5
|
value: 1,
|
|
7
6
|
},
|
|
@@ -32,17 +31,31 @@ var segmentedMock = {
|
|
|
32
31
|
},
|
|
33
32
|
],
|
|
34
33
|
};
|
|
35
|
-
|
|
34
|
+
const segmentedLabelMock = segmentedMock?.segments.map((segment) => ({
|
|
36
35
|
label: segment.label,
|
|
37
36
|
value: segment.value,
|
|
38
|
-
})
|
|
39
|
-
|
|
37
|
+
}));
|
|
38
|
+
const segmentedIconMock = segmentedMock?.segments
|
|
39
|
+
.map((segment) => ({
|
|
40
40
|
iconBefore: segment.iconBefore,
|
|
41
|
-
})
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
}))
|
|
42
|
+
.slice(3);
|
|
43
|
+
const segmentedMockSize = {
|
|
44
|
+
14: segmentedMock.segments.map((segment) => ({
|
|
45
|
+
...segment,
|
|
46
|
+
iconAfter: icons14.Placeholder.Default,
|
|
47
|
+
iconBefore: icons14.Placeholder.Default,
|
|
48
|
+
})),
|
|
49
|
+
16: segmentedMock.segments.map((segment) => ({
|
|
50
|
+
...segment,
|
|
51
|
+
iconAfter: icons16.Placeholder.Default,
|
|
52
|
+
iconBefore: icons16.Placeholder.Default,
|
|
53
|
+
})),
|
|
54
|
+
20: segmentedMock.segments.map((segment) => ({
|
|
55
|
+
...segment,
|
|
56
|
+
iconAfter: icons20.Placeholder.Default,
|
|
57
|
+
iconBefore: icons20.Placeholder.Default,
|
|
58
|
+
})),
|
|
46
59
|
};
|
|
47
60
|
|
|
48
61
|
export { segmentedIconMock, segmentedLabelMock, segmentedMock, segmentedMockSize };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { useRef, useMemo, createRef, useCallback, useEffect } from 'react';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
|
-
import { I as Icon } from '../
|
|
4
|
+
import { I as Icon } from '../Icon_es_DkVkzTha.js';
|
|
5
5
|
import { useAppearanceConfig } from '../hooks/useAppearanceConfig/useAppearanceConfig.js';
|
|
6
6
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
7
|
-
import { T as Text } from '../
|
|
8
|
-
import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
|
|
7
|
+
import { T as Text } from '../Text_es_CnymlElo.js';
|
|
9
8
|
import 'react-inlinesvg';
|
|
10
9
|
import '../hoc/urlWithAssetPrefix.js';
|
|
11
10
|
import '@itcase/common';
|
|
@@ -22,10 +21,10 @@ import 'react-responsive';
|
|
|
22
21
|
import '../utils/setViewportProperty.js';
|
|
23
22
|
import '../hooks.js';
|
|
24
23
|
import '../hooks/useStyles/styleAttributes.js';
|
|
25
|
-
import '../
|
|
24
|
+
import '../Link_es_P2b6ya7P.js';
|
|
26
25
|
import 'lodash/castArray';
|
|
27
26
|
|
|
28
|
-
|
|
27
|
+
const segmentedAppearanceDefault = {
|
|
29
28
|
defaultPrimary: {
|
|
30
29
|
fill: 'surfacePrimary',
|
|
31
30
|
fillActive: 'accentPrimary',
|
|
@@ -62,7 +61,7 @@ var segmentedAppearanceDefault = {
|
|
|
62
61
|
},
|
|
63
62
|
};
|
|
64
63
|
|
|
65
|
-
|
|
64
|
+
const segmentedAppearanceDisabled = {
|
|
66
65
|
disabledPrimary: {
|
|
67
66
|
fill: 'surfaceDisabled',
|
|
68
67
|
fillActive: 'surfaceItemTertiary',
|
|
@@ -78,7 +77,7 @@ var segmentedAppearanceDisabled = {
|
|
|
78
77
|
},
|
|
79
78
|
};
|
|
80
79
|
|
|
81
|
-
|
|
80
|
+
const segmentedAppearanceError = {
|
|
82
81
|
errorPrimary: {
|
|
83
82
|
fill: 'errorTertiary',
|
|
84
83
|
fillActive: 'errorPrimary',
|
|
@@ -96,7 +95,7 @@ var segmentedAppearanceError = {
|
|
|
96
95
|
},
|
|
97
96
|
};
|
|
98
97
|
|
|
99
|
-
|
|
98
|
+
const segmentedAppearanceShape = {
|
|
100
99
|
circular: {
|
|
101
100
|
shape: 'circular',
|
|
102
101
|
},
|
|
@@ -121,7 +120,7 @@ var segmentedAppearanceShape = {
|
|
|
121
120
|
},
|
|
122
121
|
};
|
|
123
122
|
|
|
124
|
-
|
|
123
|
+
const segmentedAppearanceSize = {
|
|
125
124
|
sizeL: {
|
|
126
125
|
size: 'l',
|
|
127
126
|
labelTextSize: 'm',
|
|
@@ -149,7 +148,7 @@ var segmentedAppearanceSize = {
|
|
|
149
148
|
},
|
|
150
149
|
};
|
|
151
150
|
|
|
152
|
-
|
|
151
|
+
const segmentedAppearanceStyle = {
|
|
153
152
|
solid: {
|
|
154
153
|
borderColor: 'none',
|
|
155
154
|
},
|
|
@@ -165,7 +164,7 @@ var segmentedAppearanceStyle = {
|
|
|
165
164
|
},
|
|
166
165
|
};
|
|
167
166
|
|
|
168
|
-
|
|
167
|
+
const segmentedAppearanceSuccess = {
|
|
169
168
|
successPrimary: {
|
|
170
169
|
fill: 'successTertiary',
|
|
171
170
|
fillActive: 'successItemSecondary',
|
|
@@ -183,7 +182,7 @@ var segmentedAppearanceSuccess = {
|
|
|
183
182
|
},
|
|
184
183
|
};
|
|
185
184
|
|
|
186
|
-
|
|
185
|
+
const segmentedAppearanceWarning = {
|
|
187
186
|
warningPrimary: {
|
|
188
187
|
fill: 'warningTertiary',
|
|
189
188
|
fillActive: 'accentPrimary',
|
|
@@ -202,55 +201,61 @@ var segmentedAppearanceWarning = {
|
|
|
202
201
|
},
|
|
203
202
|
};
|
|
204
203
|
|
|
205
|
-
|
|
204
|
+
const segmentedAppearance = {
|
|
205
|
+
...segmentedAppearanceDisabled,
|
|
206
|
+
...segmentedAppearanceSize,
|
|
207
|
+
...segmentedAppearanceShape,
|
|
208
|
+
...segmentedAppearanceStyle,
|
|
209
|
+
...segmentedAppearanceError,
|
|
210
|
+
...segmentedAppearanceSuccess,
|
|
211
|
+
...segmentedAppearanceDefault,
|
|
212
|
+
...segmentedAppearanceWarning,
|
|
213
|
+
};
|
|
206
214
|
|
|
207
|
-
|
|
215
|
+
const segmentedConfig = {
|
|
208
216
|
appearance: segmentedAppearance,
|
|
209
|
-
setAppearance:
|
|
217
|
+
setAppearance: (appearanceConfig) => {
|
|
210
218
|
segmentedConfig.appearance = appearanceConfig;
|
|
211
219
|
},
|
|
212
220
|
};
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
}, [segments]);
|
|
219
|
-
var onChangeValue = useCallback(function (item) {
|
|
221
|
+
const Segmented = (props) => {
|
|
222
|
+
const { appearance, className, name, activeSegment = {}, segments, isDisabled, isSkeleton, setActiveSegment, onChange, } = props;
|
|
223
|
+
const controlRef = useRef(null);
|
|
224
|
+
const segmentsRefs = useMemo(() => new Map(segments.map((item) => [item.value, createRef()])), [segments]);
|
|
225
|
+
const onChangeValue = useCallback((item) => {
|
|
220
226
|
onChange && onChange(item.value, name);
|
|
221
227
|
setActiveSegment && setActiveSegment(item);
|
|
222
228
|
}, [name, onChange, setActiveSegment]);
|
|
223
|
-
useEffect(
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
if (activeSegmentRef === null || activeSegmentRef === void 0 ? void 0 : activeSegmentRef.current) {
|
|
229
|
+
useEffect(() => {
|
|
230
|
+
let offsetWidth = 0;
|
|
231
|
+
let offsetLeft = 0;
|
|
232
|
+
const activeSegmentRef = segmentsRefs.get(activeSegment?.value);
|
|
233
|
+
if (activeSegmentRef?.current) {
|
|
229
234
|
offsetWidth = activeSegmentRef.current.offsetWidth;
|
|
230
235
|
offsetLeft = activeSegmentRef.current.offsetLeft;
|
|
231
236
|
}
|
|
232
|
-
|
|
237
|
+
controlRef.current?.style.setProperty('--segmented-active-width', `${offsetWidth}px`);
|
|
233
238
|
// controlRef.current.style.setProperty('--segmented-active-x-pos', `${offsetLeft - 2}px`)
|
|
234
|
-
|
|
239
|
+
controlRef.current?.style.setProperty('--segmented-active-x-pos', `${offsetLeft}px`);
|
|
235
240
|
}, [activeSegment, segmentsRefs]);
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
return (jsx("div", { className: clsx(className, 'segmented', shapeClass &&
|
|
240
|
-
|
|
241
|
-
return (jsx("div", { className: clsx('segmented__item', !item.label && 'segmented__item_icon', sizeClass &&
|
|
241
|
+
const appearanceConfig = useAppearanceConfig(appearance, segmentedConfig, isDisabled);
|
|
242
|
+
const propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
243
|
+
const { fillActiveClass, fillActiveHoverClass, fillClass, fillHoverClass, labelTextActiveColor, labelTextActiveHoverColor, labelTextColor, labelTextHoverColor, labelTextSize, labelTextWrap, borderColorClass, borderTypeClass, borderWidthClass, iconFill, iconFillActive, iconFillDisabled, iconSize, indicatorFillClass, shapeClass, shapeStrengthClass, sizeClass, widthClass, } = propsGenerator;
|
|
244
|
+
return (jsx("div", { className: clsx(className, 'segmented', shapeClass && `shape_${shapeClass}`, shapeStrengthClass && `shape-strength_${shapeStrengthClass}`, fillClass && `fill_${fillClass}`, widthClass && `segmented_width_${widthClass}`, sizeClass && `segmented_size_${sizeClass}`, borderColorClass && `border-color_${borderColorClass}`, borderWidthClass && `border-width_${borderWidthClass}`, borderTypeClass && `border_type_${borderTypeClass}`, isSkeleton && `segmented_skeleton`), ref: controlRef, children: jsx("div", { className: "segmented__wrapper", children: jsxs("div", { className: clsx('segmented__wrapper-inner'), children: [segments?.map((item) => {
|
|
245
|
+
const isActive = String(activeSegment?.value) === String(item.value);
|
|
246
|
+
return (jsx("div", { className: clsx('segmented__item', !item.label && 'segmented__item_icon', sizeClass && `segmented__item_size_${sizeClass}`, isActive && 'segmented__item_active', !isActive && isDisabled && 'segmented__item_state_disabled', isActive &&
|
|
242
247
|
isDisabled &&
|
|
243
248
|
'segmented__item_active_state_disabled', !isActive
|
|
244
|
-
? fillHoverClass &&
|
|
249
|
+
? fillHoverClass && `fill_hover_${fillHoverClass}`
|
|
245
250
|
: fillActiveHoverClass &&
|
|
246
|
-
|
|
251
|
+
`fill_active_hover_${fillActiveHoverClass}`, isActive &&
|
|
247
252
|
fillActiveClass &&
|
|
248
|
-
|
|
253
|
+
`fill_active_${fillActiveClass}`), ref: segmentsRefs.get(item.value), onClick: () => !isDisabled && onChangeValue(item), children: jsxs("div", { className: clsx('segmented__item-label', sizeClass && `segmented_size_${sizeClass}`), children: [item.iconBefore || item.iconBeforeActive ? (jsx(Icon, { className: "segmented__item-icon", iconFill: iconFill, iconFillActive: iconFillActive, iconFillDisabled: iconFillDisabled, iconSize: iconSize, SvgImage: isActive
|
|
249
254
|
? item.iconBeforeActive || item.iconBefore
|
|
250
255
|
: item.iconBefore, isActive: isActive, isDisabled: isDisabled })) : null, item.label && (jsx(Text, { size: labelTextSize, textColor: labelTextColor, textColorActive: labelTextActiveColor, textColorActiveHover: labelTextActiveHoverColor, textColorHover: labelTextHoverColor, textWrap: labelTextWrap, isActive: isActive, children: item.label })), item.icon || item.iconActive ? (jsx(Icon, { className: "segmented__item-icon", iconFill: iconFill, iconFillActive: iconFillActive, iconFillDisabled: iconFillDisabled, iconSize: iconSize, SvgImage: isActive ? item.iconActive || item.icon : item.icon, isActive: isActive, isDisabled: isDisabled })) : null, item.iconAfter || item.iconAfterActive ? (jsx(Icon, { className: "segmented__item-icon", iconFill: iconFill, iconFillActive: iconFillActive, iconFillDisabled: iconFillDisabled, iconSize: iconSize, SvgImage: isActive
|
|
251
256
|
? item.iconAfterActive || item.iconAfter
|
|
252
|
-
: item.iconAfter, isActive: isActive, isDisabled: isDisabled })) : null] }) },
|
|
253
|
-
}), jsx("div", { className: clsx('segmented__indicator', indicatorFillClass &&
|
|
257
|
+
: item.iconAfter, isActive: isActive, isDisabled: isDisabled })) : null] }) }, `${name}-${item.value}`));
|
|
258
|
+
}), jsx("div", { className: clsx('segmented__indicator', indicatorFillClass && `fill_${indicatorFillClass}`) })] }) }) }));
|
|
254
259
|
};
|
|
255
260
|
|
|
256
261
|
export { Segmented, segmentedAppearance, segmentedConfig };
|