@itcase/ui 1.0.95 → 1.0.96
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/components/Tab.js +5 -4
- package/dist/css/components/Cell/Cell.css +0 -1
- package/dist/css/components/Label/Label.css +0 -1
- package/dist/css/components/Select/Select.css +0 -1
- package/dist/css/components/Select/css/__menu/select__menu.css +0 -1
- package/dist/css/components/Swiper/Swiper.css +1 -1
- package/dist/css/components/Tab/Tab.css +3 -1
- package/package.json +1 -1
package/dist/components/Tab.js
CHANGED
|
@@ -48,6 +48,7 @@ const tabConfig = {
|
|
|
48
48
|
function Tab(props) {
|
|
49
49
|
const {
|
|
50
50
|
isActive,
|
|
51
|
+
isDisabled,
|
|
51
52
|
isHover,
|
|
52
53
|
appearance,
|
|
53
54
|
after,
|
|
@@ -63,6 +64,7 @@ function Tab(props) {
|
|
|
63
64
|
labelColor,
|
|
64
65
|
labelTextColorHover,
|
|
65
66
|
labelColorActive,
|
|
67
|
+
labelColorDisabled,
|
|
66
68
|
labelTextGradient,
|
|
67
69
|
labelTextSize,
|
|
68
70
|
labelTextWrap,
|
|
@@ -139,7 +141,7 @@ function Tab(props) {
|
|
|
139
141
|
styles: tab
|
|
140
142
|
} = useStyles.useStyles(props);
|
|
141
143
|
return /*#__PURE__*/React__default.default.createElement("div", {
|
|
142
|
-
className: clsx__default.default('tab', isActive && 'tab_state_active', isHover && 'tab_state_hover', fillClass || tabConfig.appearance[appearance] && `fill_${tabConfig.appearance[appearance].fill}`.replace(/([A-Z])/g, '-$1').toLowerCase(), fillHoverClass || tabConfig.appearance[appearance] && `fill_hover_${tabConfig.appearance[appearance].fillHover}`.replace(/([A-Z])/g, '-$1').toLowerCase(), className, sizeClass, fillActiveClass, fillActiveHoverClass,
|
|
144
|
+
className: clsx__default.default('tab', isActive && 'tab_state_active', isDisabled && 'tab_state_disabled', isHover && 'tab_state_hover', fillClass || (isDisabled ? fillDisabledClass || tabConfig.appearance[appearance] && `fill_${tabConfig.appearance[appearance].fillDisabled}`.replace(/([A-Z])/g, '-$1').toLowerCase() : fillClass || tabConfig.appearance[appearance] && `fill_${tabConfig.appearance[appearance].fill}`.replace(/([A-Z])/g, '-$1').toLowerCase()), fillHoverClass || (isDisabled ? null : tabConfig.appearance[appearance] && `fill_hover_${tabConfig.appearance[appearance].fillHover}`.replace(/([A-Z])/g, '-$1').toLowerCase()), className, sizeClass, fillActiveClass, fillActiveHoverClass, shapeClass, typeClass, widthClass, reset && 'tab-reset', set && `tab_set_${set}`, justifyContentClass, onClick && 'cursor_type_pointer'),
|
|
143
145
|
"data-tour": dataTour,
|
|
144
146
|
style: tab,
|
|
145
147
|
onClick: onClick,
|
|
@@ -155,7 +157,7 @@ function Tab(props) {
|
|
|
155
157
|
}, label && /*#__PURE__*/React__default.default.createElement(index$1.Text, {
|
|
156
158
|
className: "tab__label",
|
|
157
159
|
size: labelTextSize,
|
|
158
|
-
textColor: labelColor || tabConfig.appearance[appearance].labelColor,
|
|
160
|
+
textColor: isDisabled ? labelColorDisabled || tabConfig.appearance[appearance].labelColorDisabled : labelColor || tabConfig.appearance[appearance].labelColor,
|
|
159
161
|
textColorActive: isActive && (labelColorActive || tabConfig.appearance[appearance].labelColorActive),
|
|
160
162
|
textColorGradient: labelTextGradient,
|
|
161
163
|
textColorHover: labelTextColorHover,
|
|
@@ -169,10 +171,9 @@ function Tab(props) {
|
|
|
169
171
|
value: badgeValue
|
|
170
172
|
})), /*#__PURE__*/React__default.default.createElement(index$3.Divider, {
|
|
171
173
|
direction: dividerDirection,
|
|
172
|
-
fill: dividerFill || tabConfig.appearance[appearance].dividerFill,
|
|
174
|
+
fill: isDisabled ? dividerFillDisabled || tabConfig.appearance[appearance].dividerFillDisabled : dividerFill || tabConfig.appearance[appearance].dividerFill,
|
|
173
175
|
fillActive: isActive && (dividerFillActive || tabConfig.appearance[appearance].dividerFillActive),
|
|
174
176
|
fillActiveHover: dividerFillActiveHover,
|
|
175
|
-
fillDisabled: dividerFillDisabled,
|
|
176
177
|
fillHover: isHover && (dividerFillHover || tabConfig.appearance[appearance].dividerFillHover),
|
|
177
178
|
size: dividerSize,
|
|
178
179
|
width: "fill"
|
|
@@ -55,9 +55,11 @@ div.tab-reset {
|
|
|
55
55
|
}
|
|
56
56
|
.tab {
|
|
57
57
|
&_size {
|
|
58
|
-
@each $size in normal, compact, xxs, xs, s, m, l, xl, xxl
|
|
58
|
+
@each $size in normal, compact, xxs, xs, s, m, l, xl, xxl {
|
|
59
59
|
&_$(size) {
|
|
60
60
|
^^&__wrapper {
|
|
61
|
+
display: flex;
|
|
62
|
+
align-items: center;
|
|
61
63
|
padding: var(--tab-size-$(size)-padding);
|
|
62
64
|
gap: var(--tab-size-$(size)-gap);
|
|
63
65
|
}
|