@itcase/ui 1.8.103 → 1.8.105

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.
@@ -40,6 +40,16 @@ var searchAppearanceDefault = {
40
40
  inputTextColor: 'surfaceTextPrimary',
41
41
  placeholderTextColor: 'surfaceTextQuaternary',
42
42
  },
43
+ defaultSecondary: {
44
+ fill: 'surfaceSecondary',
45
+ borderColor: 'surfaceBorderSecondary',
46
+ borderColorHover: 'surfaceBorderSecondaryHover',
47
+ iconAfterFill: 'surfaceItemQuaternary',
48
+ iconBeforeFill: 'surfaceItemQuaternary',
49
+ iconClearFill: 'surfaceItemQuaternary',
50
+ inputTextColor: 'surfaceTextPrimary',
51
+ placeholderTextColor: 'surfaceTextQuaternary',
52
+ },
43
53
  };
44
54
 
45
55
  var searchAppearanceDisabled = {
@@ -44,6 +44,7 @@ var tabAppearanceSize = {
44
44
  sizeXXL: {
45
45
  size: 'xxl',
46
46
  labelTextSize: 's',
47
+ badgeAppearanceSize: 'sizeXL',
47
48
  badgeSize: 'xs',
48
49
  badgeTextSize: 'xs',
49
50
  dividerSize: 's',
@@ -51,6 +52,7 @@ var tabAppearanceSize = {
51
52
  sizeXL: {
52
53
  size: 'xl',
53
54
  labelTextSize: 's',
55
+ badgeAppearanceSize: 'sizeXL',
54
56
  badgeSize: 'xs',
55
57
  badgeTextSize: 'xs',
56
58
  dividerSize: 's',
@@ -58,6 +60,7 @@ var tabAppearanceSize = {
58
60
  sizeL: {
59
61
  size: 'l',
60
62
  labelTextSize: 's',
63
+ badgeAppearanceSize: 'sizeXL',
61
64
  badgeSize: 'xs',
62
65
  badgeTextSize: 'xs',
63
66
  dividerSize: 's',
@@ -65,6 +68,7 @@ var tabAppearanceSize = {
65
68
  sizeM: {
66
69
  size: 'm',
67
70
  labelTextSize: 's',
71
+ badgeAppearanceSize: 'sizeXL',
68
72
  badgeSize: 'xs',
69
73
  badgeTextSize: 'xs',
70
74
  dividerSize: 's',
@@ -72,6 +76,7 @@ var tabAppearanceSize = {
72
76
  sizeS: {
73
77
  size: 's',
74
78
  labelTextSize: 's',
79
+ badgeAppearanceSize: 'sizeXL',
75
80
  badgeSize: 'xs',
76
81
  badgeTextSize: 'xs',
77
82
  dividerSize: 's',
@@ -79,12 +84,14 @@ var tabAppearanceSize = {
79
84
  sizeXS: {
80
85
  size: 'xs',
81
86
  labelTextSize: 'xs',
87
+ badgeAppearanceSize: 'sizeXL',
82
88
  badgeSize: 'xs',
83
89
  badgeTextSize: 'xs',
84
90
  },
85
91
  sizeXXS: {
86
92
  size: 'xxs',
87
93
  labelTextSize: 'xs',
94
+ badgeAppearanceSize: 'sizeXL',
88
95
  badgeSize: 'xxs',
89
96
  badgeTextSize: 'xxs',
90
97
  dividerSize: 's',
@@ -94,6 +101,7 @@ var tabAppearanceSize = {
94
101
  var tabAppearanceStyle = {
95
102
  solid: {
96
103
  borderColor: 'none',
104
+ borderColorActive: 'none',
97
105
  },
98
106
  outlined: {
99
107
  fill: 'none',
@@ -102,6 +110,7 @@ var tabAppearanceStyle = {
102
110
  ghost: {
103
111
  fill: 'none',
104
112
  borderColor: 'none',
113
+ borderColorActive: 'none',
105
114
  },
106
115
  };
107
116
 
@@ -127,9 +136,11 @@ var tabAppearanceSurface = {
127
136
  fillHover: 'surfaceSecondary',
128
137
  labelTextColor: 'surfaceTextPrimary',
129
138
  labelTextColorActive: 'surfaceTextAccent',
130
- borderColor: 'surfaceBorderPrimary',
131
139
  dividerFillDisabled: 'accentDisabled',
140
+ borderColor: 'surfaceBorderPrimary',
141
+ borderColorActive: 'surfaceBorderPrimary',
132
142
  badgeAppearance: 'accentPrimary',
143
+ badgeAppearance: 'accentPrimary solid circular',
133
144
  dividerFillActive: 'accentPrimary',
134
145
  iconFillIcon: 'surfaceItemPrimary',
135
146
  },
@@ -142,7 +153,10 @@ var tabAppearanceSurface = {
142
153
  labelTextColor: 'surfaceTextPrimary',
143
154
  labelTextColorActive: 'surfaceTextAccent',
144
155
  dividerFillDisabled: 'accentDisabled',
156
+ borderColor: 'surfaceBorderPrimary',
157
+ borderColorActive: 'surfaceBorderPrimary',
145
158
  badgeAppearance: 'accentPrimary',
159
+ badgeAppearance: 'accentPrimary solid circular',
146
160
  dividerFillActive: 'accentPrimary',
147
161
  iconFillIcon: 'surfaceItemPrimary',
148
162
  },
@@ -155,7 +169,10 @@ var tabAppearanceSurface = {
155
169
  labelTextColor: 'surfaceTextPrimary',
156
170
  labelTextColorActive: 'surfaceTextAccent',
157
171
  dividerFillDisabled: 'accentDisabled',
172
+ borderColor: 'surfaceBorderPrimary',
173
+ borderColorActive: 'surfaceBorderPrimary',
158
174
  badgeAppearance: 'accentPrimary',
175
+ badgeAppearance: 'accentPrimary solid circular',
159
176
  dividerFillActive: 'accentPrimary',
160
177
  iconFillIcon: 'surfaceItemPrimary',
161
178
  },
@@ -168,7 +185,10 @@ var tabAppearanceSurface = {
168
185
  labelTextColor: 'surfaceTextInverse',
169
186
  labelTextColorActive: 'surfaceTextInverse',
170
187
  dividerFillDisabled: 'accentDisabled',
188
+ borderColor: 'surfaceBorderPrimary',
189
+ borderColorActive: 'surfaceBorderPrimary',
171
190
  badgeAppearance: 'accentPrimary',
191
+ badgeAppearance: 'accentPrimary solid circular',
172
192
  dividerFillActive: 'accentPrimary',
173
193
  iconFillIcon: 'surfaceItemPrimary',
174
194
  },
@@ -196,13 +216,13 @@ var tabConfig = {
196
216
  },
197
217
  };
198
218
  function Tab(props) {
199
- var className = props.className, appearance = props.appearance, label = props.label, _a = props.isDisabled, isDisabled = _a === void 0 ? false : _a, badgeValue = props.badgeValue, dataTour = props.dataTour, href = props.href, link = props.link, rel = props.rel, target = props.target, before = props.before, after = props.after, _b = props.isActive, isActive = _b === void 0 ? false : _b, isSkeleton = props.isSkeleton, onClick = props.onClick, onMouseEnter = props.onMouseEnter, children = props.children;
219
+ var dataTour = props.dataTour, className = props.className, appearance = props.appearance, label = props.label, _a = props.isDisabled, isDisabled = _a === void 0 ? false : _a, badgeValue = props.badgeValue, href = props.href, link = props.link, rel = props.rel, target = props.target, before = props.before, after = props.after, _b = props.isActive, isActive = _b === void 0 ? false : _b, isSkeleton = props.isSkeleton, onClick = props.onClick, onMouseEnter = props.onMouseEnter, children = props.children;
200
220
  var appearanceConfig = useAppearanceConfig.useAppearanceConfig(appearance, tabConfig);
201
221
  var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
202
- var justifyContentClass = propsGenerator.justifyContentClass, alignClass = propsGenerator.alignClass, alignDirectionClass = propsGenerator.alignDirectionClass, fillActiveClass = propsGenerator.fillActiveClass, fillActiveHoverClass = propsGenerator.fillActiveHoverClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, labelTextAlign = propsGenerator.labelTextAlign, labelTextColor = propsGenerator.labelTextColor, labelTextColorActive = propsGenerator.labelTextColorActive, labelTextColorActiveHover = propsGenerator.labelTextColorActiveHover, labelTextColorHover = propsGenerator.labelTextColorHover, labelTextSize = propsGenerator.labelTextSize, labelTextStyle = propsGenerator.labelTextStyle, labelTextWeight = propsGenerator.labelTextWeight, labelTextWrap = propsGenerator.labelTextWrap, borderColorActiveClass = propsGenerator.borderColorActiveClass, borderColorActiveHoverClass = propsGenerator.borderColorActiveHoverClass, borderColorClass = propsGenerator.borderColorClass, borderColorHoverClass = propsGenerator.borderColorHoverClass, dividerFillDisabled = propsGenerator.dividerFillDisabled, badgeAppearance = propsGenerator.badgeAppearance, badgeShape = propsGenerator.badgeShape, badgeSize = propsGenerator.badgeSize, badgeTextColor = propsGenerator.badgeTextColor, badgeTextSize = propsGenerator.badgeTextSize, dividerFill = propsGenerator.dividerFill, dividerFillActive = propsGenerator.dividerFillActive, dividerFillActiveHover = propsGenerator.dividerFillActiveHover, dividerFillHover = propsGenerator.dividerFillHover, dividerSize = propsGenerator.dividerSize, icon = propsGenerator.icon, iconFill = propsGenerator.iconFill, iconFillIcon = propsGenerator.iconFillIcon, iconFillSize = propsGenerator.iconFillSize, iconShape = propsGenerator.iconShape, iconSize = propsGenerator.iconSize, iconSrc = propsGenerator.iconSrc, linkFill = propsGenerator.linkFill, shapeClass = propsGenerator.shapeClass, sizeClass = propsGenerator.sizeClass, widthClass = propsGenerator.widthClass;
222
+ var justifyContentClass = propsGenerator.justifyContentClass, alignClass = propsGenerator.alignClass, alignDirectionClass = propsGenerator.alignDirectionClass, fillActiveClass = propsGenerator.fillActiveClass, fillActiveHoverClass = propsGenerator.fillActiveHoverClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, labelTextAlign = propsGenerator.labelTextAlign, labelTextColor = propsGenerator.labelTextColor, labelTextColorActive = propsGenerator.labelTextColorActive, labelTextColorActiveHover = propsGenerator.labelTextColorActiveHover, labelTextColorHover = propsGenerator.labelTextColorHover, labelTextSize = propsGenerator.labelTextSize, labelTextStyle = propsGenerator.labelTextStyle, labelTextWeight = propsGenerator.labelTextWeight, labelTextWrap = propsGenerator.labelTextWrap, dividerFillDisabled = propsGenerator.dividerFillDisabled, borderColorActiveClass = propsGenerator.borderColorActiveClass, borderColorActiveHoverClass = propsGenerator.borderColorActiveHoverClass, borderColorClass = propsGenerator.borderColorClass, borderColorHoverClass = propsGenerator.borderColorHoverClass, badgeAppearance = propsGenerator.badgeAppearance, badgeAppearanceSize = propsGenerator.badgeAppearanceSize, badgeShape = propsGenerator.badgeShape, badgeSize = propsGenerator.badgeSize, badgeTextColor = propsGenerator.badgeTextColor, badgeTextSize = propsGenerator.badgeTextSize, dividerFill = propsGenerator.dividerFill, dividerFillActive = propsGenerator.dividerFillActive, dividerFillActiveHover = propsGenerator.dividerFillActiveHover, dividerFillHover = propsGenerator.dividerFillHover, dividerSize = propsGenerator.dividerSize, icon = propsGenerator.icon, iconFill = propsGenerator.iconFill, iconFillIcon = propsGenerator.iconFillIcon, iconFillSize = propsGenerator.iconFillSize, iconShape = propsGenerator.iconShape, iconSize = propsGenerator.iconSize, iconSrc = propsGenerator.iconSrc, linkFill = propsGenerator.linkFill, shapeClass = propsGenerator.shapeClass, shapeStrengthClass = propsGenerator.shapeStrengthClass, sizeClass = propsGenerator.sizeClass, widthClass = propsGenerator.widthClass;
203
223
  // @ts-expect-error
204
224
  var tab = useStyles.useStyles(props).styles;
205
- return (jsxRuntime.jsx("div", { className: clsx('tab', className, isActive && 'tab_state_active', isDisabled && 'tab_state_disabled', !isActive
225
+ return (jsxRuntime.jsx("div", { dataTour: dataTour, className: clsx('tab', className, isActive && 'tab_state_active', isDisabled && 'tab_state_disabled', !isActive
206
226
  ? fillClass && "fill_".concat(fillClass)
207
227
  : fillActiveClass && "fill_active_".concat(fillActiveClass), !isActive
208
228
  ? fillHoverClass && "fill_hover_".concat(fillHoverClass)
@@ -213,16 +233,16 @@ function Tab(props) {
213
233
  ? borderColorHoverClass &&
214
234
  "border-color_hover_".concat(borderColorHoverClass)
215
235
  : borderColorActiveHoverClass &&
216
- "border-color_active_hover_".concat(borderColorActiveHoverClass), sizeClass && "tab_size_".concat(sizeClass), shapeClass && "tab_shape_".concat(shapeClass), widthClass && "width_".concat(widthClass), justifyContentClass && "tab_justify-content_".concat(justifyContentClass), isSkeleton && "tab_skeleton", onClick && 'cursor_type_pointer'), dataTour: dataTour, style: tab, onClick: onClick, onMouseEnter: onMouseEnter, children: jsxRuntime.jsxs(Link.Link, { className: clsx('tab__link', alignDirectionClass && "align_".concat(alignDirectionClass), alignClass && "align_".concat(alignClass), !isDisabled && 'cursor_type_pointer'), fill: linkFill, href: link || href, rel: rel, target: target, children: [before, children || (jsxRuntime.jsxs(React.Fragment, { children: [jsxRuntime.jsxs("div", { className: "tab__wrapper", children: [label && (jsxRuntime.jsx(Text.Text, { className: "tab__label", size: labelTextSize, textAlign: labelTextAlign, textColor: labelTextColor, textColorActive: labelTextColorActive, textColorHover: labelTextColorHover, textColorHoverActive: labelTextColorActiveHover, textStyle: labelTextStyle, textWeight: labelTextWeight, textWrap: labelTextWrap, isDisabled: isDisabled, isActive: isActive, children: label })), Boolean(badgeValue) && (jsxRuntime.jsx(Icon.Badge, { appearance: badgeAppearance, size: badgeSize, textColor: badgeTextColor, textSize: badgeTextSize, shape: badgeShape, value: badgeValue })), (icon || iconSrc) && (jsxRuntime.jsx(Icon.Icon, { className: clsx('tab__icon_after'), fill: iconFill, fillSize: iconFillSize, iconFill: iconFillIcon, iconSize: iconSize, imageSrc: iconSrc, shape: iconShape, SvgImage: icon }))] }), jsxRuntime.jsx(Divider.Divider, { width: "fill", direction: "horizontal", size: dividerSize, fill: dividerFill, fillActive: dividerFillActive, fillActiveHover: dividerFillActiveHover, fillDisabled: dividerFillDisabled, fillHover: dividerFillHover, zIndex: "1", isDisabled: isDisabled, isActive: isActive })] })), after] }) }));
236
+ "border-color_active_hover_".concat(borderColorActiveHoverClass), sizeClass && "tab_size_".concat(sizeClass), shapeClass && "shape_".concat(shapeClass), shapeStrengthClass && "shape-strength_".concat(shapeStrengthClass), widthClass && "width_".concat(widthClass), justifyContentClass && "tab_justify-content_".concat(justifyContentClass), isSkeleton && "tab_skeleton", onClick && 'cursor_type_pointer'), style: tab, onClick: onClick, onMouseEnter: onMouseEnter, children: jsxRuntime.jsxs(Link.Link, { className: clsx('tab__link', alignDirectionClass && "align_".concat(alignDirectionClass), alignClass && "align_".concat(alignClass), !isDisabled && 'cursor_type_pointer'), fill: linkFill, href: link || href, rel: rel, target: target, children: [before, children || (jsxRuntime.jsxs(React.Fragment, { children: [jsxRuntime.jsxs("div", { className: "tab__wrapper", children: [label && (jsxRuntime.jsx(Text.Text, { className: "tab__label", size: labelTextSize, isDisabled: isDisabled, textAlign: labelTextAlign, textColor: labelTextColor, textColorActive: labelTextColorActive, textColorHover: labelTextColorHover, textColorHoverActive: labelTextColorActiveHover, textStyle: labelTextStyle, textWeight: labelTextWeight, textWrap: labelTextWrap, isActive: isActive, children: label })), Boolean(badgeValue) && (jsxRuntime.jsx(Icon.Badge, { appearance: "".concat(badgeAppearance, " ").concat(badgeAppearanceSize), size: badgeSize, textColor: badgeTextColor, textSize: badgeTextSize, shape: badgeShape, value: badgeValue })), (icon || iconSrc) && (jsxRuntime.jsx(Icon.Icon, { className: clsx('tab__icon_after'), fill: iconFill, fillSize: iconFillSize, iconFill: iconFillIcon, iconSize: iconSize, imageSrc: iconSrc, shape: iconShape, SvgImage: icon }))] }), jsxRuntime.jsx(Divider.Divider, { className: clsx('tab__divider'), width: "fill", direction: "horizontal", size: dividerSize, fill: dividerFill, fillActive: dividerFillActive, fillActiveHover: dividerFillActiveHover, fillDisabled: dividerFillDisabled, fillHover: dividerFillHover, zIndex: "1", isDisabled: isDisabled, isActive: isActive })] })), after] }) }));
217
237
  }
218
238
 
219
239
  function TabGroup(props) {
220
- var className = props.className, dataTestId = props.dataTestId, dataTour = props.dataTour, horizontalScroll = props.horizontalScroll, style = props.style, tabAppearance = props.tabAppearance, tabList = props.tabList, children = props.children;
240
+ var dataTestId = props.dataTestId, dataTour = props.dataTour, className = props.className, horizontalScroll = props.horizontalScroll, style = props.style, tabAppearance = props.tabAppearance, tabList = props.tabList, children = props.children;
221
241
  var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props);
222
242
  var directionClass = propsGenerator.directionClass, alignClass = propsGenerator.alignClass, alignDirectionClass = propsGenerator.alignDirectionClass, fillClass = propsGenerator.fillClass, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, borderWidthClass = propsGenerator.borderWidthClass, widthClass = propsGenerator.widthClass, wrapClass = propsGenerator.wrapClass;
223
243
  // @ts-expect-error
224
244
  var _a = useStyles.useStyles(props), groupStyles = _a.styles, groupWrapperStyles = _a.wrapper;
225
- return (jsxRuntime.jsx("div", { className: clsx(className, 'tab-group', 'group', widthClass && "width_".concat(widthClass), alignDirectionClass && "align_".concat(alignDirectionClass), directionClass && "group_direction_".concat(directionClass), alignClass && "align_".concat(alignClass), fillClass && "fill_".concat(fillClass), horizontalScroll && 'group_type_horizontal_scroll', wrapClass && "group_wrap_".concat(wrapClass), borderColorClass && "border-color_".concat(borderColorClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass)), dataTestId: dataTestId, dataTour: dataTour, style: Object.assign({}, groupStyles, style), children: horizontalScroll ? (jsxRuntime.jsxs("div", { className: "tab-group__wrapper", style: groupWrapperStyles, children: [tabList === null || tabList === void 0 ? void 0 : tabList.map(function (item) { return (jsxRuntime.jsx(Tab, { appearance: tabAppearance, label: item.label, isActive: item.isActive }, item.key)); }), children] })) : (jsxRuntime.jsxs(React.Fragment, { children: [tabList === null || tabList === void 0 ? void 0 : tabList.map(function (item) { return (jsxRuntime.jsx(Tab, { appearance: tabAppearance, label: item.label, badgeValue: item.badgeValue, icon: item.icon, iconSrc: item.icon, isActive: item.isActive }, item.key)); }), children] })) }));
245
+ return (jsxRuntime.jsx("div", { className: clsx(className, 'tab-group', 'group', widthClass && "width_".concat(widthClass), alignDirectionClass && "align_".concat(alignDirectionClass), directionClass && "group_direction_".concat(directionClass), alignClass && "align_".concat(alignClass), fillClass && "fill_".concat(fillClass), horizontalScroll && 'group_type_horizontal_scroll', wrapClass && "group_wrap_".concat(wrapClass), borderColorClass && "border-color_".concat(borderColorClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass)), "data-test-id": dataTestId, "data-tour": dataTour, style: Object.assign({}, groupStyles, style), children: horizontalScroll ? (jsxRuntime.jsxs("div", { className: "tab-group__wrapper", style: groupWrapperStyles, children: [tabList === null || tabList === void 0 ? void 0 : tabList.map(function (item) { return (jsxRuntime.jsx(Tab, { appearance: tabAppearance, label: item.label, isActive: item.isActive }, item.key)); }), children] })) : (jsxRuntime.jsxs(React.Fragment, { children: [tabList === null || tabList === void 0 ? void 0 : tabList.map(function (item) { return (jsxRuntime.jsx(Tab, { appearance: tabAppearance, label: item.label, badgeValue: item.badgeValue, icon: item.icon, iconSrc: item.icon, isActive: item.isActive }, item.key)); }), children] })) }));
226
246
  }
227
247
 
228
248
  exports.Tab = Tab;
@@ -38,6 +38,16 @@ var searchAppearanceDefault = {
38
38
  inputTextColor: 'surfaceTextPrimary',
39
39
  placeholderTextColor: 'surfaceTextQuaternary',
40
40
  },
41
+ defaultSecondary: {
42
+ fill: 'surfaceSecondary',
43
+ borderColor: 'surfaceBorderSecondary',
44
+ borderColorHover: 'surfaceBorderSecondaryHover',
45
+ iconAfterFill: 'surfaceItemQuaternary',
46
+ iconBeforeFill: 'surfaceItemQuaternary',
47
+ iconClearFill: 'surfaceItemQuaternary',
48
+ inputTextColor: 'surfaceTextPrimary',
49
+ placeholderTextColor: 'surfaceTextQuaternary',
50
+ },
41
51
  };
42
52
 
43
53
  var searchAppearanceDisabled = {
@@ -42,6 +42,7 @@ var tabAppearanceSize = {
42
42
  sizeXXL: {
43
43
  size: 'xxl',
44
44
  labelTextSize: 's',
45
+ badgeAppearanceSize: 'sizeXL',
45
46
  badgeSize: 'xs',
46
47
  badgeTextSize: 'xs',
47
48
  dividerSize: 's',
@@ -49,6 +50,7 @@ var tabAppearanceSize = {
49
50
  sizeXL: {
50
51
  size: 'xl',
51
52
  labelTextSize: 's',
53
+ badgeAppearanceSize: 'sizeXL',
52
54
  badgeSize: 'xs',
53
55
  badgeTextSize: 'xs',
54
56
  dividerSize: 's',
@@ -56,6 +58,7 @@ var tabAppearanceSize = {
56
58
  sizeL: {
57
59
  size: 'l',
58
60
  labelTextSize: 's',
61
+ badgeAppearanceSize: 'sizeXL',
59
62
  badgeSize: 'xs',
60
63
  badgeTextSize: 'xs',
61
64
  dividerSize: 's',
@@ -63,6 +66,7 @@ var tabAppearanceSize = {
63
66
  sizeM: {
64
67
  size: 'm',
65
68
  labelTextSize: 's',
69
+ badgeAppearanceSize: 'sizeXL',
66
70
  badgeSize: 'xs',
67
71
  badgeTextSize: 'xs',
68
72
  dividerSize: 's',
@@ -70,6 +74,7 @@ var tabAppearanceSize = {
70
74
  sizeS: {
71
75
  size: 's',
72
76
  labelTextSize: 's',
77
+ badgeAppearanceSize: 'sizeXL',
73
78
  badgeSize: 'xs',
74
79
  badgeTextSize: 'xs',
75
80
  dividerSize: 's',
@@ -77,12 +82,14 @@ var tabAppearanceSize = {
77
82
  sizeXS: {
78
83
  size: 'xs',
79
84
  labelTextSize: 'xs',
85
+ badgeAppearanceSize: 'sizeXL',
80
86
  badgeSize: 'xs',
81
87
  badgeTextSize: 'xs',
82
88
  },
83
89
  sizeXXS: {
84
90
  size: 'xxs',
85
91
  labelTextSize: 'xs',
92
+ badgeAppearanceSize: 'sizeXL',
86
93
  badgeSize: 'xxs',
87
94
  badgeTextSize: 'xxs',
88
95
  dividerSize: 's',
@@ -92,6 +99,7 @@ var tabAppearanceSize = {
92
99
  var tabAppearanceStyle = {
93
100
  solid: {
94
101
  borderColor: 'none',
102
+ borderColorActive: 'none',
95
103
  },
96
104
  outlined: {
97
105
  fill: 'none',
@@ -100,6 +108,7 @@ var tabAppearanceStyle = {
100
108
  ghost: {
101
109
  fill: 'none',
102
110
  borderColor: 'none',
111
+ borderColorActive: 'none',
103
112
  },
104
113
  };
105
114
 
@@ -125,9 +134,11 @@ var tabAppearanceSurface = {
125
134
  fillHover: 'surfaceSecondary',
126
135
  labelTextColor: 'surfaceTextPrimary',
127
136
  labelTextColorActive: 'surfaceTextAccent',
128
- borderColor: 'surfaceBorderPrimary',
129
137
  dividerFillDisabled: 'accentDisabled',
138
+ borderColor: 'surfaceBorderPrimary',
139
+ borderColorActive: 'surfaceBorderPrimary',
130
140
  badgeAppearance: 'accentPrimary',
141
+ badgeAppearance: 'accentPrimary solid circular',
131
142
  dividerFillActive: 'accentPrimary',
132
143
  iconFillIcon: 'surfaceItemPrimary',
133
144
  },
@@ -140,7 +151,10 @@ var tabAppearanceSurface = {
140
151
  labelTextColor: 'surfaceTextPrimary',
141
152
  labelTextColorActive: 'surfaceTextAccent',
142
153
  dividerFillDisabled: 'accentDisabled',
154
+ borderColor: 'surfaceBorderPrimary',
155
+ borderColorActive: 'surfaceBorderPrimary',
143
156
  badgeAppearance: 'accentPrimary',
157
+ badgeAppearance: 'accentPrimary solid circular',
144
158
  dividerFillActive: 'accentPrimary',
145
159
  iconFillIcon: 'surfaceItemPrimary',
146
160
  },
@@ -153,7 +167,10 @@ var tabAppearanceSurface = {
153
167
  labelTextColor: 'surfaceTextPrimary',
154
168
  labelTextColorActive: 'surfaceTextAccent',
155
169
  dividerFillDisabled: 'accentDisabled',
170
+ borderColor: 'surfaceBorderPrimary',
171
+ borderColorActive: 'surfaceBorderPrimary',
156
172
  badgeAppearance: 'accentPrimary',
173
+ badgeAppearance: 'accentPrimary solid circular',
157
174
  dividerFillActive: 'accentPrimary',
158
175
  iconFillIcon: 'surfaceItemPrimary',
159
176
  },
@@ -166,7 +183,10 @@ var tabAppearanceSurface = {
166
183
  labelTextColor: 'surfaceTextInverse',
167
184
  labelTextColorActive: 'surfaceTextInverse',
168
185
  dividerFillDisabled: 'accentDisabled',
186
+ borderColor: 'surfaceBorderPrimary',
187
+ borderColorActive: 'surfaceBorderPrimary',
169
188
  badgeAppearance: 'accentPrimary',
189
+ badgeAppearance: 'accentPrimary solid circular',
170
190
  dividerFillActive: 'accentPrimary',
171
191
  iconFillIcon: 'surfaceItemPrimary',
172
192
  },
@@ -194,13 +214,13 @@ var tabConfig = {
194
214
  },
195
215
  };
196
216
  function Tab(props) {
197
- var className = props.className, appearance = props.appearance, label = props.label, _a = props.isDisabled, isDisabled = _a === void 0 ? false : _a, badgeValue = props.badgeValue, dataTour = props.dataTour, href = props.href, link = props.link, rel = props.rel, target = props.target, before = props.before, after = props.after, _b = props.isActive, isActive = _b === void 0 ? false : _b, isSkeleton = props.isSkeleton, onClick = props.onClick, onMouseEnter = props.onMouseEnter, children = props.children;
217
+ var dataTour = props.dataTour, className = props.className, appearance = props.appearance, label = props.label, _a = props.isDisabled, isDisabled = _a === void 0 ? false : _a, badgeValue = props.badgeValue, href = props.href, link = props.link, rel = props.rel, target = props.target, before = props.before, after = props.after, _b = props.isActive, isActive = _b === void 0 ? false : _b, isSkeleton = props.isSkeleton, onClick = props.onClick, onMouseEnter = props.onMouseEnter, children = props.children;
198
218
  var appearanceConfig = useAppearanceConfig(appearance, tabConfig);
199
219
  var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
200
- var justifyContentClass = propsGenerator.justifyContentClass, alignClass = propsGenerator.alignClass, alignDirectionClass = propsGenerator.alignDirectionClass, fillActiveClass = propsGenerator.fillActiveClass, fillActiveHoverClass = propsGenerator.fillActiveHoverClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, labelTextAlign = propsGenerator.labelTextAlign, labelTextColor = propsGenerator.labelTextColor, labelTextColorActive = propsGenerator.labelTextColorActive, labelTextColorActiveHover = propsGenerator.labelTextColorActiveHover, labelTextColorHover = propsGenerator.labelTextColorHover, labelTextSize = propsGenerator.labelTextSize, labelTextStyle = propsGenerator.labelTextStyle, labelTextWeight = propsGenerator.labelTextWeight, labelTextWrap = propsGenerator.labelTextWrap, borderColorActiveClass = propsGenerator.borderColorActiveClass, borderColorActiveHoverClass = propsGenerator.borderColorActiveHoverClass, borderColorClass = propsGenerator.borderColorClass, borderColorHoverClass = propsGenerator.borderColorHoverClass, dividerFillDisabled = propsGenerator.dividerFillDisabled, badgeAppearance = propsGenerator.badgeAppearance, badgeShape = propsGenerator.badgeShape, badgeSize = propsGenerator.badgeSize, badgeTextColor = propsGenerator.badgeTextColor, badgeTextSize = propsGenerator.badgeTextSize, dividerFill = propsGenerator.dividerFill, dividerFillActive = propsGenerator.dividerFillActive, dividerFillActiveHover = propsGenerator.dividerFillActiveHover, dividerFillHover = propsGenerator.dividerFillHover, dividerSize = propsGenerator.dividerSize, icon = propsGenerator.icon, iconFill = propsGenerator.iconFill, iconFillIcon = propsGenerator.iconFillIcon, iconFillSize = propsGenerator.iconFillSize, iconShape = propsGenerator.iconShape, iconSize = propsGenerator.iconSize, iconSrc = propsGenerator.iconSrc, linkFill = propsGenerator.linkFill, shapeClass = propsGenerator.shapeClass, sizeClass = propsGenerator.sizeClass, widthClass = propsGenerator.widthClass;
220
+ var justifyContentClass = propsGenerator.justifyContentClass, alignClass = propsGenerator.alignClass, alignDirectionClass = propsGenerator.alignDirectionClass, fillActiveClass = propsGenerator.fillActiveClass, fillActiveHoverClass = propsGenerator.fillActiveHoverClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, labelTextAlign = propsGenerator.labelTextAlign, labelTextColor = propsGenerator.labelTextColor, labelTextColorActive = propsGenerator.labelTextColorActive, labelTextColorActiveHover = propsGenerator.labelTextColorActiveHover, labelTextColorHover = propsGenerator.labelTextColorHover, labelTextSize = propsGenerator.labelTextSize, labelTextStyle = propsGenerator.labelTextStyle, labelTextWeight = propsGenerator.labelTextWeight, labelTextWrap = propsGenerator.labelTextWrap, dividerFillDisabled = propsGenerator.dividerFillDisabled, borderColorActiveClass = propsGenerator.borderColorActiveClass, borderColorActiveHoverClass = propsGenerator.borderColorActiveHoverClass, borderColorClass = propsGenerator.borderColorClass, borderColorHoverClass = propsGenerator.borderColorHoverClass, badgeAppearance = propsGenerator.badgeAppearance, badgeAppearanceSize = propsGenerator.badgeAppearanceSize, badgeShape = propsGenerator.badgeShape, badgeSize = propsGenerator.badgeSize, badgeTextColor = propsGenerator.badgeTextColor, badgeTextSize = propsGenerator.badgeTextSize, dividerFill = propsGenerator.dividerFill, dividerFillActive = propsGenerator.dividerFillActive, dividerFillActiveHover = propsGenerator.dividerFillActiveHover, dividerFillHover = propsGenerator.dividerFillHover, dividerSize = propsGenerator.dividerSize, icon = propsGenerator.icon, iconFill = propsGenerator.iconFill, iconFillIcon = propsGenerator.iconFillIcon, iconFillSize = propsGenerator.iconFillSize, iconShape = propsGenerator.iconShape, iconSize = propsGenerator.iconSize, iconSrc = propsGenerator.iconSrc, linkFill = propsGenerator.linkFill, shapeClass = propsGenerator.shapeClass, shapeStrengthClass = propsGenerator.shapeStrengthClass, sizeClass = propsGenerator.sizeClass, widthClass = propsGenerator.widthClass;
201
221
  // @ts-expect-error
202
222
  var tab = useStyles(props).styles;
203
- return (jsx("div", { className: clsx('tab', className, isActive && 'tab_state_active', isDisabled && 'tab_state_disabled', !isActive
223
+ return (jsx("div", { dataTour: dataTour, className: clsx('tab', className, isActive && 'tab_state_active', isDisabled && 'tab_state_disabled', !isActive
204
224
  ? fillClass && "fill_".concat(fillClass)
205
225
  : fillActiveClass && "fill_active_".concat(fillActiveClass), !isActive
206
226
  ? fillHoverClass && "fill_hover_".concat(fillHoverClass)
@@ -211,16 +231,16 @@ function Tab(props) {
211
231
  ? borderColorHoverClass &&
212
232
  "border-color_hover_".concat(borderColorHoverClass)
213
233
  : borderColorActiveHoverClass &&
214
- "border-color_active_hover_".concat(borderColorActiveHoverClass), sizeClass && "tab_size_".concat(sizeClass), shapeClass && "tab_shape_".concat(shapeClass), widthClass && "width_".concat(widthClass), justifyContentClass && "tab_justify-content_".concat(justifyContentClass), isSkeleton && "tab_skeleton", onClick && 'cursor_type_pointer'), dataTour: dataTour, style: tab, onClick: onClick, onMouseEnter: onMouseEnter, children: jsxs(Link, { className: clsx('tab__link', alignDirectionClass && "align_".concat(alignDirectionClass), alignClass && "align_".concat(alignClass), !isDisabled && 'cursor_type_pointer'), fill: linkFill, href: link || href, rel: rel, target: target, children: [before, children || (jsxs(React.Fragment, { children: [jsxs("div", { className: "tab__wrapper", children: [label && (jsx(Text, { className: "tab__label", size: labelTextSize, textAlign: labelTextAlign, textColor: labelTextColor, textColorActive: labelTextColorActive, textColorHover: labelTextColorHover, textColorHoverActive: labelTextColorActiveHover, textStyle: labelTextStyle, textWeight: labelTextWeight, textWrap: labelTextWrap, isDisabled: isDisabled, isActive: isActive, children: label })), Boolean(badgeValue) && (jsx(Badge, { appearance: badgeAppearance, size: badgeSize, textColor: badgeTextColor, textSize: badgeTextSize, shape: badgeShape, value: badgeValue })), (icon || iconSrc) && (jsx(Icon, { className: clsx('tab__icon_after'), fill: iconFill, fillSize: iconFillSize, iconFill: iconFillIcon, iconSize: iconSize, imageSrc: iconSrc, shape: iconShape, SvgImage: icon }))] }), jsx(Divider, { width: "fill", direction: "horizontal", size: dividerSize, fill: dividerFill, fillActive: dividerFillActive, fillActiveHover: dividerFillActiveHover, fillDisabled: dividerFillDisabled, fillHover: dividerFillHover, zIndex: "1", isDisabled: isDisabled, isActive: isActive })] })), after] }) }));
234
+ "border-color_active_hover_".concat(borderColorActiveHoverClass), sizeClass && "tab_size_".concat(sizeClass), shapeClass && "shape_".concat(shapeClass), shapeStrengthClass && "shape-strength_".concat(shapeStrengthClass), widthClass && "width_".concat(widthClass), justifyContentClass && "tab_justify-content_".concat(justifyContentClass), isSkeleton && "tab_skeleton", onClick && 'cursor_type_pointer'), style: tab, onClick: onClick, onMouseEnter: onMouseEnter, children: jsxs(Link, { className: clsx('tab__link', alignDirectionClass && "align_".concat(alignDirectionClass), alignClass && "align_".concat(alignClass), !isDisabled && 'cursor_type_pointer'), fill: linkFill, href: link || href, rel: rel, target: target, children: [before, children || (jsxs(React.Fragment, { children: [jsxs("div", { className: "tab__wrapper", children: [label && (jsx(Text, { className: "tab__label", size: labelTextSize, isDisabled: isDisabled, textAlign: labelTextAlign, textColor: labelTextColor, textColorActive: labelTextColorActive, textColorHover: labelTextColorHover, textColorHoverActive: labelTextColorActiveHover, textStyle: labelTextStyle, textWeight: labelTextWeight, textWrap: labelTextWrap, isActive: isActive, children: label })), Boolean(badgeValue) && (jsx(Badge, { appearance: "".concat(badgeAppearance, " ").concat(badgeAppearanceSize), size: badgeSize, textColor: badgeTextColor, textSize: badgeTextSize, shape: badgeShape, value: badgeValue })), (icon || iconSrc) && (jsx(Icon, { className: clsx('tab__icon_after'), fill: iconFill, fillSize: iconFillSize, iconFill: iconFillIcon, iconSize: iconSize, imageSrc: iconSrc, shape: iconShape, SvgImage: icon }))] }), jsx(Divider, { className: clsx('tab__divider'), width: "fill", direction: "horizontal", size: dividerSize, fill: dividerFill, fillActive: dividerFillActive, fillActiveHover: dividerFillActiveHover, fillDisabled: dividerFillDisabled, fillHover: dividerFillHover, zIndex: "1", isDisabled: isDisabled, isActive: isActive })] })), after] }) }));
215
235
  }
216
236
 
217
237
  function TabGroup(props) {
218
- var className = props.className, dataTestId = props.dataTestId, dataTour = props.dataTour, horizontalScroll = props.horizontalScroll, style = props.style, tabAppearance = props.tabAppearance, tabList = props.tabList, children = props.children;
238
+ var dataTestId = props.dataTestId, dataTour = props.dataTour, className = props.className, horizontalScroll = props.horizontalScroll, style = props.style, tabAppearance = props.tabAppearance, tabList = props.tabList, children = props.children;
219
239
  var propsGenerator = useDevicePropsGenerator(props);
220
240
  var directionClass = propsGenerator.directionClass, alignClass = propsGenerator.alignClass, alignDirectionClass = propsGenerator.alignDirectionClass, fillClass = propsGenerator.fillClass, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, borderWidthClass = propsGenerator.borderWidthClass, widthClass = propsGenerator.widthClass, wrapClass = propsGenerator.wrapClass;
221
241
  // @ts-expect-error
222
242
  var _a = useStyles(props), groupStyles = _a.styles, groupWrapperStyles = _a.wrapper;
223
- return (jsx("div", { className: clsx(className, 'tab-group', 'group', widthClass && "width_".concat(widthClass), alignDirectionClass && "align_".concat(alignDirectionClass), directionClass && "group_direction_".concat(directionClass), alignClass && "align_".concat(alignClass), fillClass && "fill_".concat(fillClass), horizontalScroll && 'group_type_horizontal_scroll', wrapClass && "group_wrap_".concat(wrapClass), borderColorClass && "border-color_".concat(borderColorClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass)), dataTestId: dataTestId, dataTour: dataTour, style: Object.assign({}, groupStyles, style), children: horizontalScroll ? (jsxs("div", { className: "tab-group__wrapper", style: groupWrapperStyles, children: [tabList === null || tabList === void 0 ? void 0 : tabList.map(function (item) { return (jsx(Tab, { appearance: tabAppearance, label: item.label, isActive: item.isActive }, item.key)); }), children] })) : (jsxs(React.Fragment, { children: [tabList === null || tabList === void 0 ? void 0 : tabList.map(function (item) { return (jsx(Tab, { appearance: tabAppearance, label: item.label, badgeValue: item.badgeValue, icon: item.icon, iconSrc: item.icon, isActive: item.isActive }, item.key)); }), children] })) }));
243
+ return (jsx("div", { className: clsx(className, 'tab-group', 'group', widthClass && "width_".concat(widthClass), alignDirectionClass && "align_".concat(alignDirectionClass), directionClass && "group_direction_".concat(directionClass), alignClass && "align_".concat(alignClass), fillClass && "fill_".concat(fillClass), horizontalScroll && 'group_type_horizontal_scroll', wrapClass && "group_wrap_".concat(wrapClass), borderColorClass && "border-color_".concat(borderColorClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass)), "data-test-id": dataTestId, "data-tour": dataTour, style: Object.assign({}, groupStyles, style), children: horizontalScroll ? (jsxs("div", { className: "tab-group__wrapper", style: groupWrapperStyles, children: [tabList === null || tabList === void 0 ? void 0 : tabList.map(function (item) { return (jsx(Tab, { appearance: tabAppearance, label: item.label, isActive: item.isActive }, item.key)); }), children] })) : (jsxs(React.Fragment, { children: [tabList === null || tabList === void 0 ? void 0 : tabList.map(function (item) { return (jsx(Tab, { appearance: tabAppearance, label: item.label, badgeValue: item.badgeValue, icon: item.icon, iconSrc: item.icon, isActive: item.isActive }, item.key)); }), children] })) }));
224
244
  }
225
245
 
226
246
  export { Tab, TabGroup, tabAppearance, tabConfig };
@@ -1,9 +1,9 @@
1
1
  .button {
2
2
  text-decoration: none;
3
- background: none;
3
+ /* background: none; */
4
4
  padding: 0;
5
5
  margin: 0;
6
- border: solid 0 #fff;
6
+ /* border-width: solid 0 #fff; */
7
7
  position: relative;
8
8
  display: flex;
9
9
  justify-content: center;
@@ -1,7 +1,7 @@
1
1
  .tab {
2
2
  display: flex;
3
3
  flex-flow: column nowrap;
4
- justify-content: flex-end;
4
+ justify-content: center;
5
5
  &__wrapper {
6
6
  display: flex;
7
7
  ^&__label {
@@ -10,6 +10,11 @@
10
10
  align-items: center;
11
11
  }
12
12
  }
13
+ &__divider {
14
+ position: absolute;
15
+ left: 0;
16
+ bottom: -1px;
17
+ }
13
18
  &_state_active {
14
19
  position: relative;
15
20
  z-index: 2;
@@ -37,25 +42,14 @@
37
42
  }
38
43
  }
39
44
  }
40
- .tab {
41
- &_shape {
42
- &_rounded {
43
- border-radius: var(--tab-shape-rounded);
44
- }
45
- &_circular {
46
- border-radius: 50%;
47
- }
48
- }
49
- }
50
45
  .tab {
51
46
  &_size {
52
47
  @each $size in xxl, xl, l, m, s, xs, xxs {
53
48
  &_$(size) {
49
+ min-height: var(--tab-size-$(size)-min-height);
54
50
  ^^&__wrapper {
55
51
  padding: var(--tab-size-$(size)-padding);
56
- display: flex;
57
52
  align-items: center;
58
- min-height: var(--tab-size-$(size)-min-height);
59
53
  gap: var(--tab-size-$(size)-gap);
60
54
  }
61
55
  }
@@ -1,4 +1,5 @@
1
- .border-color {
1
+ .border-color,
2
+ button.border-color {
2
3
  &_none {
3
4
  border-width: 1px;
4
5
  border-color: transparent;
@@ -1,5 +1,11 @@
1
- .border-color {
1
+ .border-color,
2
+ button.border-color {
2
3
  &_active {
4
+ &_none {
5
+ border-width: 1px;
6
+ border-color: transparent;
7
+ border-style: solid;
8
+ }
3
9
  @each $type in accent, primary, secondary, surface, error, warning, success,
4
10
  danger, info, disabled {
5
11
  @each $color in primary, secondary, tertiary, quaternary {
@@ -0,0 +1,47 @@
1
+ .border-color,
2
+ button.border-color {
3
+ &_active {
4
+ &_none {
5
+ border-width: 1px;
6
+ border-color: transparent;
7
+ border-style: solid;
8
+ }
9
+ @each $type in accent, primary, secondary, surface, error, warning, success,
10
+ danger, info, disabled {
11
+ @each $color in primary, secondary, tertiary, quaternary {
12
+ &_$(type) {
13
+ &-border {
14
+ &-$(color) {
15
+ &:hover {
16
+ border-width: 1px;
17
+ border-color: var(--color-$(type)-border-$(color));
18
+ border-style: solid;
19
+ }
20
+ }
21
+ }
22
+ }
23
+ }
24
+ }
25
+ @each $palette in red, neon-pink, electric-pink, hibiscus, pink,
26
+ pink-citrus, pomegranate, dragon-fruit, camellia, red-rose, plum, orange,
27
+ clementine, apricot, papaya, kumquat, light-orange, peach, flamingo,
28
+ rose-gold, pink-sand, vintage-rose, grapefruit, cream, mellow-yellow,
29
+ canary-yellow, pollen, flash-light, lemon-cream, flash, dark-green, green,
30
+ spearmint, mint, beryl, sea-foam, turquoise, blue, light-blue, cerulean,
31
+ surf-blue, pacific-green, blue-cobalt, dark-teal, blue-horizon,
32
+ denim-blue, linen-blue, deep-navy, midnight-blue, purple, ultra-violet,
33
+ lilac, ocean-blue, delft-blue, indigo, lavender-gray, lavender, mist-blue,
34
+ storm-gray, cactus, pine-green, cyprus-green, northern-blue, azure,
35
+ alaskan-blue, khaki, dark-olive, soft-white, antique-white, yellow-gold,
36
+ gold, camel, walnut, stone, pebble, cocoa, coastal-gray, white, black,
37
+ alto, athens-gray, sonic-silver {
38
+ &_$(palette) {
39
+ &:hover {
40
+ border-width: 1px;
41
+ border-color: var(--color-palette-$(palette));
42
+ border-style: solid;
43
+ }
44
+ }
45
+ }
46
+ }
47
+ }
@@ -1,5 +1,11 @@
1
- .border-color {
1
+ .border-color,
2
+ button.border-color {
2
3
  &_focus {
4
+ &_none {
5
+ border-width: 1px;
6
+ border-color: transparent;
7
+ border-style: solid;
8
+ }
3
9
  @each $type in accent, primary, secondary, surface, error, warning, success,
4
10
  danger, info, disabled {
5
11
  @each $color in primary, secondary, tertiary, quaternary {
@@ -1,7 +1,10 @@
1
- .border-color {
1
+ .border-color,
2
+ button.border-color {
2
3
  &_hover {
3
4
  &_none {
5
+ border-width: 1px;
4
6
  border-color: transparent;
7
+ border-style: solid;
5
8
  }
6
9
  @each $type in accent, primary, secondary, surface, error, warning, success,
7
10
  danger, info, disabled {