@itcase/ui-web 1.10.14 → 1.10.15
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/cjs/components/Segmented.js +1 -1
- package/dist/components/Segmented.js +1 -1
- package/dist/types/components/Segmented/Segmented.interface.d.ts +0 -1
- package/dist/types/components/Segmented/Segmented.js +2 -2
- package/dist/types/components/Segmented/__test__/SegmentedTest.stories.d.ts +0 -1
- package/dist/types/components/Segmented/stories/__mock__/index.d.ts +0 -5
- package/dist/types/components/Segmented/stories/__mock__/index.js +0 -5
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),r=require("react"),i=require("clsx"),l=require("@itcase/ui-core/hooks"),a=require("../../primitives_cjs_ocTnUpml.js");require("@rc-component/tooltip"),require("react-inlinesvg"),require("@itcase/ui-core/hoc"),require("@itcase/ui-core/utils");const t={disabledPrimary:{fill:"surfaceDisabled",fillActive:"surfaceTertiary",labelTextActiveColor:"surfaceTextActiveQuaternary",labelTextColor:"surfaceTextQuaternary",borderColor:"surfaceBorderPrimary",iconFill:"surfaceItemPrimary",iconFillActive:"surfaceItemPrimary"},sizeL:{size:"l",labelTextSize:"m",iconSize:"24"},sizeM:{size:"m",labelTextSize:"m",iconSize:"24"},sizeS:{size:"s",labelTextSize:"s",iconSize:"20"},sizeXS:{size:"xs",labelTextSize:"xs",iconSize:"16"},sizeXXS:{size:"xxs",labelTextSize:"xxs",iconSize:"14"},circular:{shape:"circular"},rounded:{shape:"rounded"},roundedXL:{shape:"roundedXL"},roundedL:{shape:"roundedL"},roundedM:{shape:"roundedM"},roundedS:{shape:"roundedS"},solid:{borderColor:"none"},outlined:{fill:"none",fillActive:"none"},full:{},ghost:{fill:"none",fillActive:"none",borderColor:"none"},errorPrimary:{fill:"errorTertiary",fillActive:"errorPrimary",fillHover:"errorHoverPrimary",labelTextActiveColor:"errorTextPrimary",labelTextColor:"errorTextSecondary",labelTextColorHover:"errorTextPrimary",borderColor:"errorBorderQuaternary",iconFill:"errorItemSecondary",iconFillActive:"errorItemTertiary"},successPrimary:{fill:"successTertiary",fillActive:"successSecondary",fillActiveHover:"successSecondary",fillHover:"successSecondary",labelTextActiveColor:"successTextPrimary",labelTextActiveColorHover:"successTextPrimary",labelTextColor:"successTextQuaternary",labelTextColorHover:"successTextPrimary",borderColor:"successBorderSecondary",iconFill:"successItemSecondary",indicatorFill:"accentPrimary"},defaultPrimary:{fill:"surfacePrimary",fillActive:"accentPrimary",fillActiveHover:"accentPrimary",fillHover:"surfaceHoverSecondary",labelTextActiveColor:"accentTextPrimary",labelTextActiveColorHover:"accentTextPrimary",labelTextColor:"surfaceTextPrimary",borderColor:"surfaceBorderQuaternary",iconFill:"surfaceItemQuaternary",iconFillActive:"surfaceItemSecondary",indicatorFill:"accentPrimary"},defaultSecondary:{fill:"surfaceSecondary",fillActive:"accentPrimary",fillActiveHover:"accentActiveHoverPrimary",fillHover:"surfaceHoverTertiary",labelTextActiveColor:"accentTextPrimary",labelTextActiveColorHover:"accentTextActiveHoverPrimary",labelTextColor:"surfaceTextPrimary",borderColor:"surfaceBorderQuaternary",iconFill:"surfaceItemQuaternary",iconFillActive:"surfaceItemSecondary",indicatorFill:"accentPrimary"},requirePrimary:{fill:"warningTertiary",fillActive:"warningPrimary",fillActiveHover:"warningPrimary",fillHover:"warningSecondary",labelTextActiveColor:"warningTextPrimary",labelTextColor:"warningTextSecondary",labelTextColorHover:"warningTextSecondary",borderColor:"warningBorderSecondary",iconFill:"warningItemSecondary"}},o={appearance:t,setAppearance:e=>{o.appearance=e}};exports.Segmented=t=>{const{appearance:c,className:s,dataTestId:n,dataTour:d,name:v,activeSegment:m,segments:u,isDisabled:f,isSkeleton:x,setActiveSegment:y,onChange:b}=t,
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),r=require("react"),i=require("clsx"),l=require("@itcase/ui-core/hooks"),a=require("../../primitives_cjs_ocTnUpml.js");require("@rc-component/tooltip"),require("react-inlinesvg"),require("@itcase/ui-core/hoc"),require("@itcase/ui-core/utils");const t={disabledPrimary:{fill:"surfaceDisabled",fillActive:"surfaceTertiary",labelTextActiveColor:"surfaceTextActiveQuaternary",labelTextColor:"surfaceTextQuaternary",borderColor:"surfaceBorderPrimary",iconFill:"surfaceItemPrimary",iconFillActive:"surfaceItemPrimary"},sizeL:{size:"l",labelTextSize:"m",iconSize:"24"},sizeM:{size:"m",labelTextSize:"m",iconSize:"24"},sizeS:{size:"s",labelTextSize:"s",iconSize:"20"},sizeXS:{size:"xs",labelTextSize:"xs",iconSize:"16"},sizeXXS:{size:"xxs",labelTextSize:"xxs",iconSize:"14"},circular:{shape:"circular"},rounded:{shape:"rounded"},roundedXL:{shape:"roundedXL"},roundedL:{shape:"roundedL"},roundedM:{shape:"roundedM"},roundedS:{shape:"roundedS"},solid:{borderColor:"none"},outlined:{fill:"none",fillActive:"none"},full:{},ghost:{fill:"none",fillActive:"none",borderColor:"none"},errorPrimary:{fill:"errorTertiary",fillActive:"errorPrimary",fillHover:"errorHoverPrimary",labelTextActiveColor:"errorTextPrimary",labelTextColor:"errorTextSecondary",labelTextColorHover:"errorTextPrimary",borderColor:"errorBorderQuaternary",iconFill:"errorItemSecondary",iconFillActive:"errorItemTertiary"},successPrimary:{fill:"successTertiary",fillActive:"successSecondary",fillActiveHover:"successSecondary",fillHover:"successSecondary",labelTextActiveColor:"successTextPrimary",labelTextActiveColorHover:"successTextPrimary",labelTextColor:"successTextQuaternary",labelTextColorHover:"successTextPrimary",borderColor:"successBorderSecondary",iconFill:"successItemSecondary",indicatorFill:"accentPrimary"},defaultPrimary:{fill:"surfacePrimary",fillActive:"accentPrimary",fillActiveHover:"accentPrimary",fillHover:"surfaceHoverSecondary",labelTextActiveColor:"accentTextPrimary",labelTextActiveColorHover:"accentTextPrimary",labelTextColor:"surfaceTextPrimary",borderColor:"surfaceBorderQuaternary",iconFill:"surfaceItemQuaternary",iconFillActive:"surfaceItemSecondary",indicatorFill:"accentPrimary"},defaultSecondary:{fill:"surfaceSecondary",fillActive:"accentPrimary",fillActiveHover:"accentActiveHoverPrimary",fillHover:"surfaceHoverTertiary",labelTextActiveColor:"accentTextPrimary",labelTextActiveColorHover:"accentTextActiveHoverPrimary",labelTextColor:"surfaceTextPrimary",borderColor:"surfaceBorderQuaternary",iconFill:"surfaceItemQuaternary",iconFillActive:"surfaceItemSecondary",indicatorFill:"accentPrimary"},requirePrimary:{fill:"warningTertiary",fillActive:"warningPrimary",fillActiveHover:"warningPrimary",fillHover:"warningSecondary",labelTextActiveColor:"warningTextPrimary",labelTextColor:"warningTextSecondary",labelTextColorHover:"warningTextSecondary",borderColor:"warningBorderSecondary",iconFill:"warningItemSecondary"}},o={appearance:t,setAppearance:e=>{o.appearance=e}};exports.Segmented=t=>{const{appearance:c,className:s,dataTestId:n,dataTour:d,name:v,activeSegment:m,segments:u,isDisabled:f,isSkeleton:x,setActiveSegment:y,onChange:b}=t,_=r.useRef(null),A=r.useMemo(()=>new Map(u.map(e=>[e.value,r.createRef()])),[u]),T=r.useCallback(e=>{b&&b(e.value,v),y&&y(e)},[v,b,y]);r.useEffect(()=>{let e=0,r=0;const i=A.get(m.value);i?.current&&(e=i.current.offsetWidth,r=i.current.offsetLeft),_.current?.style.setProperty("--segmented-active-width",`${e}px`),_.current?.style.setProperty("--segmented-active-x-pos",`${r}px`)},[m,A]);const C=l.useAppearanceConfig(c,o,f),g=l.useDevicePropsGenerator(t,C),{fillActiveClass:p,fillActiveHoverClass:S,fillClass:P,fillHoverClass:z,labelTextActiveColor:h,labelTextActiveColorHover:F,labelTextColor:H,labelTextColorHover:$,labelTextSize:I,labelTextWrap:w,borderColorClass:j,borderTypeClass:q,borderWidthClass:B,iconFill:D,iconFillActive:N,iconFillDisabled:Q,iconSize:L,indicatorFillClass:k,shapeClass:M,sizeClass:X,widthClass:W}=g;return e.jsx("div",{className:i(s,"segmented",M&&`shape_${M}`,P&&`fill_${P}`,W&&`segmented_width_${W}`,X&&`segmented_size_${X}`,j&&`border-color_${j}`,B&&`border-width_${B}`,q&&`border_type_${q}`,x&&"skeleton"),ref:_,"data-testid":n,"data-tour":d,children:e.jsx("div",{className:"segmented__wrapper",children:e.jsxs("div",{className:i("segmented__wrapper-inner"),children:[u?.map(r=>{const l=m.value===r.value;return e.jsx("div",{className:i("segmented__item",!r.label&&"segmented__item_icon",X&&`segmented__item_size_${X}`,l&&"segmented__item_active",!l&&f&&"segmented__item_state_disabled",l&&f&&"segmented__item_active_state_disabled",l?S&&`fill_active_hover_${S}`:z&&`fill_hover_${z}`,l&&p&&`fill_active_${p}`),ref:A.get(r.value),"data-testid":n?`${n}${String(r.value).replace(/(^|[_-])([a-zA-Z0-9])/g,(e,r,i)=>i.toUpperCase())}Option`:void 0,onClick:()=>!f&&T(r),children:e.jsxs("div",{className:i("segmented__item-label",X&&`segmented_size_${X}`),children:[r.iconBefore||r.iconBeforeActive?e.jsx(a.Icon,{className:"segmented__item-icon",iconFill:D,iconFillActive:N,iconFillDisabled:Q,iconSize:L,SvgImage:l&&r.iconBeforeActive||r.iconBefore,isActive:l,isDisabled:f}):null,r.label&&e.jsx(a.Text,{size:I,textColor:H,textColorActive:h,textColorActiveHover:F,textColorHover:$,textWrap:w,isActive:l,children:r.label}),r.icon||r.iconActive?e.jsx(a.Icon,{className:"segmented__item-icon",iconFill:D,iconFillActive:N,iconFillDisabled:Q,iconSize:L,SvgImage:l&&r.iconActive||r.icon,isActive:l,isDisabled:f}):null,r.iconAfter||r.iconAfterActive?e.jsx(a.Icon,{className:"segmented__item-icon",iconFill:D,iconFillActive:N,iconFillDisabled:Q,iconSize:L,SvgImage:l&&r.iconAfterActive||r.iconAfter,isActive:l,isDisabled:f}):null]})},`${v}-${r.value}`)}),e.jsx("div",{className:i("segmented__indicator",k&&`fill_${k}`)})]})})})},exports.segmentedAppearance=t,exports.segmentedConfig=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{useRef as i,useMemo as l,createRef as t,useCallback as
|
|
1
|
+
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{useRef as i,useMemo as l,createRef as t,useCallback as o,useEffect as a}from"react";import c from"clsx";import{useAppearanceConfig as s,useDevicePropsGenerator as n}from"@itcase/ui-core/hooks";import{I as d,T as m}from"../primitives_es_BQqNcRQk.js";import"@rc-component/tooltip";import"react-inlinesvg";import"@itcase/ui-core/hoc";import"@itcase/ui-core/utils";const v={disabledPrimary:{fill:"surfaceDisabled",fillActive:"surfaceTertiary",labelTextActiveColor:"surfaceTextActiveQuaternary",labelTextColor:"surfaceTextQuaternary",borderColor:"surfaceBorderPrimary",iconFill:"surfaceItemPrimary",iconFillActive:"surfaceItemPrimary"},sizeL:{size:"l",labelTextSize:"m",iconSize:"24"},sizeM:{size:"m",labelTextSize:"m",iconSize:"24"},sizeS:{size:"s",labelTextSize:"s",iconSize:"20"},sizeXS:{size:"xs",labelTextSize:"xs",iconSize:"16"},sizeXXS:{size:"xxs",labelTextSize:"xxs",iconSize:"14"},circular:{shape:"circular"},rounded:{shape:"rounded"},roundedXL:{shape:"roundedXL"},roundedL:{shape:"roundedL"},roundedM:{shape:"roundedM"},roundedS:{shape:"roundedS"},solid:{borderColor:"none"},outlined:{fill:"none",fillActive:"none"},full:{},ghost:{fill:"none",fillActive:"none",borderColor:"none"},errorPrimary:{fill:"errorTertiary",fillActive:"errorPrimary",fillHover:"errorHoverPrimary",labelTextActiveColor:"errorTextPrimary",labelTextColor:"errorTextSecondary",labelTextColorHover:"errorTextPrimary",borderColor:"errorBorderQuaternary",iconFill:"errorItemSecondary",iconFillActive:"errorItemTertiary"},successPrimary:{fill:"successTertiary",fillActive:"successSecondary",fillActiveHover:"successSecondary",fillHover:"successSecondary",labelTextActiveColor:"successTextPrimary",labelTextActiveColorHover:"successTextPrimary",labelTextColor:"successTextQuaternary",labelTextColorHover:"successTextPrimary",borderColor:"successBorderSecondary",iconFill:"successItemSecondary",indicatorFill:"accentPrimary"},defaultPrimary:{fill:"surfacePrimary",fillActive:"accentPrimary",fillActiveHover:"accentPrimary",fillHover:"surfaceHoverSecondary",labelTextActiveColor:"accentTextPrimary",labelTextActiveColorHover:"accentTextPrimary",labelTextColor:"surfaceTextPrimary",borderColor:"surfaceBorderQuaternary",iconFill:"surfaceItemQuaternary",iconFillActive:"surfaceItemSecondary",indicatorFill:"accentPrimary"},defaultSecondary:{fill:"surfaceSecondary",fillActive:"accentPrimary",fillActiveHover:"accentActiveHoverPrimary",fillHover:"surfaceHoverTertiary",labelTextActiveColor:"accentTextPrimary",labelTextActiveColorHover:"accentTextActiveHoverPrimary",labelTextColor:"surfaceTextPrimary",borderColor:"surfaceBorderQuaternary",iconFill:"surfaceItemQuaternary",iconFillActive:"surfaceItemSecondary",indicatorFill:"accentPrimary"},requirePrimary:{fill:"warningTertiary",fillActive:"warningPrimary",fillActiveHover:"warningPrimary",fillHover:"warningSecondary",labelTextActiveColor:"warningTextPrimary",labelTextColor:"warningTextSecondary",labelTextColorHover:"warningTextSecondary",borderColor:"warningBorderSecondary",iconFill:"warningItemSecondary"}},u={appearance:v,setAppearance:e=>{u.appearance=e}},f=v=>{const{appearance:f,className:y,dataTestId:x,dataTour:b,name:_,activeSegment:T,segments:A,isDisabled:p,isSkeleton:C,setActiveSegment:g,onChange:S}=v,P=i(null),z=l(()=>new Map(A.map(e=>[e.value,t()])),[A]),h=o(e=>{S&&S(e.value,_),g&&g(e)},[_,S,g]);a(()=>{let e=0,r=0;const i=z.get(T.value);i?.current&&(e=i.current.offsetWidth,r=i.current.offsetLeft),P.current?.style.setProperty("--segmented-active-width",`${e}px`),P.current?.style.setProperty("--segmented-active-x-pos",`${r}px`)},[T,z]);const F=s(f,u,p),H=n(v,F),{fillActiveClass:$,fillActiveHoverClass:w,fillClass:I,fillHoverClass:B,labelTextActiveColor:N,labelTextActiveColorHover:D,labelTextColor:Q,labelTextColorHover:L,labelTextSize:X,labelTextWrap:k,borderColorClass:M,borderTypeClass:W,borderWidthClass:j,iconFill:q,iconFillActive:O,iconFillDisabled:U,iconSize:Z,indicatorFillClass:E,shapeClass:G,sizeClass:J,widthClass:K}=H;return e("div",{className:c(y,"segmented",G&&`shape_${G}`,I&&`fill_${I}`,K&&`segmented_width_${K}`,J&&`segmented_size_${J}`,M&&`border-color_${M}`,j&&`border-width_${j}`,W&&`border_type_${W}`,C&&"skeleton"),ref:P,"data-testid":x,"data-tour":b,children:e("div",{className:"segmented__wrapper",children:r("div",{className:c("segmented__wrapper-inner"),children:[A?.map(i=>{const l=T.value===i.value;return e("div",{className:c("segmented__item",!i.label&&"segmented__item_icon",J&&`segmented__item_size_${J}`,l&&"segmented__item_active",!l&&p&&"segmented__item_state_disabled",l&&p&&"segmented__item_active_state_disabled",l?w&&`fill_active_hover_${w}`:B&&`fill_hover_${B}`,l&&$&&`fill_active_${$}`),ref:z.get(i.value),"data-testid":x?`${x}${String(i.value).replace(/(^|[_-])([a-zA-Z0-9])/g,(e,r,i)=>i.toUpperCase())}Option`:void 0,onClick:()=>!p&&h(i),children:r("div",{className:c("segmented__item-label",J&&`segmented_size_${J}`),children:[i.iconBefore||i.iconBeforeActive?e(d,{className:"segmented__item-icon",iconFill:q,iconFillActive:O,iconFillDisabled:U,iconSize:Z,SvgImage:l&&i.iconBeforeActive||i.iconBefore,isActive:l,isDisabled:p}):null,i.label&&e(m,{size:X,textColor:Q,textColorActive:N,textColorActiveHover:D,textColorHover:L,textWrap:k,isActive:l,children:i.label}),i.icon||i.iconActive?e(d,{className:"segmented__item-icon",iconFill:q,iconFillActive:O,iconFillDisabled:U,iconSize:Z,SvgImage:l&&i.iconActive||i.icon,isActive:l,isDisabled:p}):null,i.iconAfter||i.iconAfterActive?e(d,{className:"segmented__item-icon",iconFill:q,iconFillActive:O,iconFillDisabled:U,iconSize:Z,SvgImage:l&&i.iconAfterActive||i.iconAfter,isActive:l,isDisabled:p}):null]})},`${_}-${i.value}`)}),e("div",{className:c("segmented__indicator",E&&`fill_${E}`)})]})})})};export{f as Segmented,v as segmentedAppearance,u as segmentedConfig};
|
|
@@ -42,7 +42,6 @@ type SegmentedProps = SegmentedAppearanceProps & StyleAttributes & {
|
|
|
42
42
|
setActiveSegment?: (item: Segment) => void;
|
|
43
43
|
};
|
|
44
44
|
type Segment = {
|
|
45
|
-
dataTestId?: string;
|
|
46
45
|
icon?: IconProps['SvgImage'];
|
|
47
46
|
iconActive?: IconProps['SvgImage'];
|
|
48
47
|
iconAfter?: IconProps['SvgImage'];
|
|
@@ -42,8 +42,8 @@ const Segmented = (props) => {
|
|
|
42
42
|
: fillActiveHoverClass &&
|
|
43
43
|
`fill_active_hover_${fillActiveHoverClass}`, isActive &&
|
|
44
44
|
fillActiveClass &&
|
|
45
|
-
`fill_active_${fillActiveClass}`), ref: segmentsRefs.get(item.value), "data-testid": dataTestId
|
|
46
|
-
? `${dataTestId}${item.
|
|
45
|
+
`fill_active_${fillActiveClass}`), ref: segmentsRefs.get(item.value), "data-testid": dataTestId
|
|
46
|
+
? `${dataTestId}${String(item.value).replace(/(^|[_-])([a-zA-Z0-9])/g, (_, __, char) => char.toUpperCase())}Option`
|
|
47
47
|
: undefined, 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
|
|
48
48
|
? item.iconBeforeActive || item.iconBefore
|
|
49
49
|
: item.iconBefore, isActive: isActive, isDisabled: isDisabled })) : null, item.label && (_jsx(Text, { size: labelTextSize, textColor: labelTextColor, textColorActive: labelTextActiveColor, textColorActiveHover: labelTextActiveColorHover, textColorHover: labelTextColorHover, 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
|
|
@@ -3,7 +3,6 @@ declare const segmentedMock: {
|
|
|
3
3
|
value: string;
|
|
4
4
|
};
|
|
5
5
|
segments: {
|
|
6
|
-
dataTestId: string;
|
|
7
6
|
label: string;
|
|
8
7
|
iconAfter: import("react").FunctionComponent<import("react").SVGAttributes<SVGElement>>;
|
|
9
8
|
iconBefore: import("react").FunctionComponent<import("react").SVGAttributes<SVGElement>>;
|
|
@@ -11,7 +10,6 @@ declare const segmentedMock: {
|
|
|
11
10
|
}[];
|
|
12
11
|
};
|
|
13
12
|
declare const segmentedLabelMock: {
|
|
14
|
-
dataTestId: string;
|
|
15
13
|
label: string;
|
|
16
14
|
value: string;
|
|
17
15
|
}[];
|
|
@@ -23,21 +21,18 @@ declare const segmentedMockSize: {
|
|
|
23
21
|
14: {
|
|
24
22
|
iconAfter: import("react").FunctionComponent<import("react").SVGAttributes<SVGElement>>;
|
|
25
23
|
iconBefore: import("react").FunctionComponent<import("react").SVGAttributes<SVGElement>>;
|
|
26
|
-
dataTestId: string;
|
|
27
24
|
label: string;
|
|
28
25
|
value: string;
|
|
29
26
|
}[];
|
|
30
27
|
16: {
|
|
31
28
|
iconAfter: import("react").FunctionComponent<import("react").SVGAttributes<SVGElement>>;
|
|
32
29
|
iconBefore: import("react").FunctionComponent<import("react").SVGAttributes<SVGElement>>;
|
|
33
|
-
dataTestId: string;
|
|
34
30
|
label: string;
|
|
35
31
|
value: string;
|
|
36
32
|
}[];
|
|
37
33
|
20: {
|
|
38
34
|
iconAfter: import("react").FunctionComponent<import("react").SVGAttributes<SVGElement>>;
|
|
39
35
|
iconBefore: import("react").FunctionComponent<import("react").SVGAttributes<SVGElement>>;
|
|
40
|
-
dataTestId: string;
|
|
41
36
|
label: string;
|
|
42
37
|
value: string;
|
|
43
38
|
}[];
|
|
@@ -5,28 +5,24 @@ const segmentedMock = {
|
|
|
5
5
|
},
|
|
6
6
|
segments: [
|
|
7
7
|
{
|
|
8
|
-
dataTestId: '1Option',
|
|
9
8
|
label: 'Label 1',
|
|
10
9
|
iconAfter: icons24.Placeholder.Default,
|
|
11
10
|
iconBefore: icons24.Placeholder.Default,
|
|
12
11
|
value: '1',
|
|
13
12
|
},
|
|
14
13
|
{
|
|
15
|
-
dataTestId: '2Option',
|
|
16
14
|
label: 'Label 2',
|
|
17
15
|
iconAfter: icons24.Placeholder.Default,
|
|
18
16
|
iconBefore: icons24.Placeholder.Default,
|
|
19
17
|
value: '2',
|
|
20
18
|
},
|
|
21
19
|
{
|
|
22
|
-
dataTestId: '3Option',
|
|
23
20
|
label: 'Label 3',
|
|
24
21
|
iconAfter: icons24.Placeholder.Default,
|
|
25
22
|
iconBefore: icons24.Placeholder.Default,
|
|
26
23
|
value: '3',
|
|
27
24
|
},
|
|
28
25
|
{
|
|
29
|
-
dataTestId: '4Option',
|
|
30
26
|
label: 'Label 4',
|
|
31
27
|
iconAfter: icons24.Placeholder.Default,
|
|
32
28
|
iconBefore: icons24.Placeholder.Default,
|
|
@@ -35,7 +31,6 @@ const segmentedMock = {
|
|
|
35
31
|
],
|
|
36
32
|
};
|
|
37
33
|
const segmentedLabelMock = segmentedMock?.segments.map((segment) => ({
|
|
38
|
-
dataTestId: segment.dataTestId,
|
|
39
34
|
label: segment.label,
|
|
40
35
|
value: segment.value,
|
|
41
36
|
}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itcase/ui-web",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.15",
|
|
4
4
|
"description": "UI components",
|
|
5
5
|
"keywords": "",
|
|
6
6
|
"license": "MIT",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@itcase/tokens-am": "^1.1.57",
|
|
54
54
|
"@itcase/tokens-baikal": "^1.1.54",
|
|
55
55
|
"@itcase/tokens-palette": "^1.1.50",
|
|
56
|
-
"@itcase/ui-core": "^1.10.
|
|
56
|
+
"@itcase/ui-core": "^1.10.15",
|
|
57
57
|
"@rc-component/tooltip": "^1.4.0",
|
|
58
58
|
"axios": "^1.16.1",
|
|
59
59
|
"clsx": "^2.1.1",
|
|
@@ -116,5 +116,5 @@
|
|
|
116
116
|
"storybook": "^10.4.1",
|
|
117
117
|
"typescript": "^6.0.3"
|
|
118
118
|
},
|
|
119
|
-
"gitHead": "
|
|
119
|
+
"gitHead": "604ead249375ebd4f4673633779c50e853e1824c"
|
|
120
120
|
}
|