@rescui/tab-list 0.13.11-RUI-230-Update-icons-0bd4e5fc.9 → 0.13.11-RUI-230-Update-icons-6919f9e4.29

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.
@@ -1,10 +1,15 @@
1
1
  var styles = {
2
- "icon": "_icon_7axx9h_4",
3
- "sizeXS": "_sizeXS_7axx9h_14",
4
- "sizeS": "_sizeS_7axx9h_18",
5
- "sizeM": "_sizeM_7axx9h_22",
6
- "sizeL": "_sizeL_7axx9h_26",
7
- "light": "_light_7axx9h_30",
8
- "dark": "_dark_7axx9h_34"
2
+ "icon": "_icon_1ymr40l_4",
3
+ "sizeXS": "_sizeXS_1ymr40l_14",
4
+ "sizeS": "_sizeS_1ymr40l_18",
5
+ "sizeM": "_sizeM_1ymr40l_22",
6
+ "sizeL": "_sizeL_1ymr40l_26",
7
+ "light": "_light_1ymr40l_30",
8
+ "dark": "_dark_1ymr40l_34",
9
+ "allVariants": "_allVariants_1ymr40l_48",
10
+ "variant16": "_variant16_1ymr40l_53",
11
+ "variant20": "_variant20_1ymr40l_54",
12
+ "variant24": "_variant24_1ymr40l_55",
13
+ "variant28": "_variant28_1ymr40l_58"
9
14
  };
10
15
  export { styles as default };
@@ -15,62 +15,85 @@ const Size = {
15
15
  "m": "m",
16
16
  "l": "l"
17
17
  };
18
+
19
+ const LeftIcon16 = props => /*#__PURE__*/React.createElement("svg", _extends({
20
+ viewBox: "0 0 16 16"
21
+ }, props), /*#__PURE__*/React.createElement("path", {
22
+ d: "M10.03 11.53a.75.75 0 0 0 0-1.06L7.56 8l2.47-2.47a.75.75 0 1 0-1.06-1.06l-3 3a.75.75 0 0 0 0 1.06l3 3a.75.75 0 0 0 1.06 0"
23
+ }));
24
+
25
+ const LeftIcon20 = props => /*#__PURE__*/React.createElement("svg", _extends({
26
+ viewBox: "0 0 20 20"
27
+ }, props), /*#__PURE__*/React.createElement("path", {
28
+ d: "M12.707 14.707a1 1 0 0 0 0-1.414L9.414 10l3.293-3.293a1 1 0 0 0-1.414-1.414l-4 4a1 1 0 0 0 0 1.414l4 4a1 1 0 0 0 1.414 0"
29
+ }));
30
+
31
+ const LeftIcon24 = props => /*#__PURE__*/React.createElement("svg", _extends({
32
+ viewBox: "0 0 24 24"
33
+ }, props), /*#__PURE__*/React.createElement("path", {
34
+ d: "M16.06 19.06a1.5 1.5 0 0 0 0-2.12L11.122 12l4.94-4.94a1.5 1.5 0 0 0-2.122-2.12l-6 6a1.5 1.5 0 0 0 0 2.12l6 6a1.5 1.5 0 0 0 2.122 0"
35
+ }));
36
+
37
+ const LeftIcon28 = props => /*#__PURE__*/React.createElement("svg", _extends({
38
+ viewBox: "0 0 28 28"
39
+ }, props), /*#__PURE__*/React.createElement("path", {
40
+ d: "M18.56 22.06a1.5 1.5 0 0 0 0-2.12L12.622 14l5.94-5.94a1.5 1.5 0 0 0-2.122-2.12l-7 7a1.5 1.5 0 0 0 0 2.12l7 7a1.5 1.5 0 0 0 2.122 0"
41
+ }));
42
+
18
43
  const LeftIcon = /*#__PURE__*/React.forwardRef((_ref, ref) => {
19
44
  let {
20
45
  theme,
21
- size,
46
+ size: sizeFromProps = "m",
22
47
  className,
48
+ style,
49
+ ['data-render-all-sizes']: renderAllSizes = false,
23
50
  ...props
24
51
  } = _ref;
52
+ const size = sizeFromProps in Size ? sizeFromProps : "m";
53
+ const mainProps = { ...props,
54
+ className: cn(styles.icon, styles[theme], sizeStyles[size], renderAllSizes && styles.allVariants, className),
55
+ style: renderAllSizes ? {
56
+ '--rs-icon-ar-width': 28,
57
+ '--rs-icon-ar-height': 28,
58
+ ...style
59
+ } : style,
60
+ ref
61
+ };
25
62
 
26
- if (size === Size['xs']) {
63
+ if (renderAllSizes) {
27
64
  return /*#__PURE__*/React.createElement("svg", _extends({
28
- viewBox: "0 0 16 16"
29
- }, props, {
30
- className: cn(styles.icon, styles[theme], sizeStyles[size], className),
31
- ref: ref
32
- }), /*#__PURE__*/React.createElement("path", {
33
- d: "M10.03 11.53a.75.75 0 0 0 0-1.06L7.56 8l2.47-2.47a.75.75 0 1 0-1.06-1.06l-3 3a.75.75 0 0 0 0 1.06l3 3a.75.75 0 0 0 1.06 0"
65
+ viewBox: "0 0 28 28"
66
+ }, mainProps), /*#__PURE__*/React.createElement(LeftIcon16, {
67
+ className: styles.variant16
68
+ }), /*#__PURE__*/React.createElement(LeftIcon20, {
69
+ className: styles.variant20
70
+ }), /*#__PURE__*/React.createElement(LeftIcon24, {
71
+ className: styles.variant24
72
+ }), /*#__PURE__*/React.createElement(LeftIcon28, {
73
+ className: styles.variant28
34
74
  }));
35
75
  }
36
76
 
77
+ if (size === Size['xs']) {
78
+ return /*#__PURE__*/React.createElement(LeftIcon16, mainProps);
79
+ }
80
+
37
81
  if (size === Size['s']) {
38
- return /*#__PURE__*/React.createElement("svg", _extends({
39
- viewBox: "0 0 20 20"
40
- }, props, {
41
- className: cn(styles.icon, styles[theme], sizeStyles[size], className),
42
- ref: ref
43
- }), /*#__PURE__*/React.createElement("path", {
44
- d: "M12.707 14.707a1 1 0 0 0 0-1.414L9.414 10l3.293-3.293a1 1 0 0 0-1.414-1.414l-4 4a1 1 0 0 0 0 1.414l4 4a1 1 0 0 0 1.414 0"
45
- }));
82
+ return /*#__PURE__*/React.createElement(LeftIcon20, mainProps);
46
83
  }
47
84
 
48
85
  if (size === Size['m']) {
49
- return /*#__PURE__*/React.createElement("svg", _extends({
50
- viewBox: "0 0 24 24"
51
- }, props, {
52
- className: cn(styles.icon, styles[theme], sizeStyles[size], className),
53
- ref: ref
54
- }), /*#__PURE__*/React.createElement("path", {
55
- d: "M16.06 19.06a1.5 1.5 0 0 0 0-2.12L11.122 12l4.94-4.94a1.5 1.5 0 0 0-2.122-2.12l-6 6a1.5 1.5 0 0 0 0 2.12l6 6a1.5 1.5 0 0 0 2.122 0"
56
- }));
86
+ return /*#__PURE__*/React.createElement(LeftIcon24, mainProps);
57
87
  }
58
88
 
59
- return /*#__PURE__*/React.createElement("svg", _extends({
60
- viewBox: "0 0 28 28"
61
- }, props, {
62
- className: cn(styles.icon, styles[theme], sizeStyles[size], className),
63
- ref: ref
64
- }), /*#__PURE__*/React.createElement("path", {
65
- d: "M18.56 22.06a1.5 1.5 0 0 0 0-2.12L12.622 14l5.94-5.94a1.5 1.5 0 0 0-2.122-2.12l-7 7a1.5 1.5 0 0 0 0 2.12l7 7a1.5 1.5 0 0 0 2.122 0"
66
- }));
89
+ return /*#__PURE__*/React.createElement(LeftIcon28, mainProps);
67
90
  });
91
+ LeftIcon.displayName = 'LeftIcon';
68
92
  LeftIcon.propTypes = {
69
93
  className: PropTypes.string,
70
94
  theme: PropTypes.oneOf(["light", "dark"]),
71
- size: PropTypes.oneOf(["xs", "s", "m", "l"])
72
- };
73
- LeftIcon.defaultProps = {
74
- size: "m"
95
+ size: PropTypes.oneOf(["xs", "s", "m", "l"]),
96
+ 'data-render-all-sizes': PropTypes.bool,
97
+ style: PropTypes.object
75
98
  };
76
99
  export { Size, LeftIcon as default };
@@ -15,62 +15,85 @@ const Size = {
15
15
  "m": "m",
16
16
  "l": "l"
17
17
  };
18
+
19
+ const RightIcon16 = props => /*#__PURE__*/React.createElement("svg", _extends({
20
+ viewBox: "0 0 16 16"
21
+ }, props), /*#__PURE__*/React.createElement("path", {
22
+ d: "M5.97 4.47a.75.75 0 0 0 0 1.06L8.44 8l-2.47 2.47a.75.75 0 1 0 1.06 1.06l3-3a.75.75 0 0 0 0-1.06l-3-3a.75.75 0 0 0-1.06 0"
23
+ }));
24
+
25
+ const RightIcon20 = props => /*#__PURE__*/React.createElement("svg", _extends({
26
+ viewBox: "0 0 20 20"
27
+ }, props), /*#__PURE__*/React.createElement("path", {
28
+ d: "M7.293 5.293a1 1 0 0 0 0 1.414L10.586 10l-3.293 3.293a1 1 0 1 0 1.414 1.414l4-4a1 1 0 0 0 0-1.414l-4-4a1 1 0 0 0-1.414 0"
29
+ }));
30
+
31
+ const RightIcon24 = props => /*#__PURE__*/React.createElement("svg", _extends({
32
+ viewBox: "0 0 24 24"
33
+ }, props), /*#__PURE__*/React.createElement("path", {
34
+ d: "M7.94 4.94a1.5 1.5 0 0 0 0 2.12L12.878 12l-4.94 4.94a1.5 1.5 0 0 0 2.122 2.12l6-6a1.5 1.5 0 0 0 0-2.12l-6-6a1.5 1.5 0 0 0-2.122 0"
35
+ }));
36
+
37
+ const RightIcon28 = props => /*#__PURE__*/React.createElement("svg", _extends({
38
+ viewBox: "0 0 28 28"
39
+ }, props), /*#__PURE__*/React.createElement("path", {
40
+ d: "M9.44 5.94a1.5 1.5 0 0 0 0 2.12L15.378 14l-5.94 5.94a1.5 1.5 0 0 0 2.122 2.12l7-7a1.5 1.5 0 0 0 0-2.12l-7-7a1.5 1.5 0 0 0-2.122 0"
41
+ }));
42
+
18
43
  const RightIcon = /*#__PURE__*/React.forwardRef((_ref, ref) => {
19
44
  let {
20
45
  theme,
21
- size,
46
+ size: sizeFromProps = "m",
22
47
  className,
48
+ style,
49
+ ['data-render-all-sizes']: renderAllSizes = false,
23
50
  ...props
24
51
  } = _ref;
52
+ const size = sizeFromProps in Size ? sizeFromProps : "m";
53
+ const mainProps = { ...props,
54
+ className: cn(styles.icon, styles[theme], sizeStyles[size], renderAllSizes && styles.allVariants, className),
55
+ style: renderAllSizes ? {
56
+ '--rs-icon-ar-width': 28,
57
+ '--rs-icon-ar-height': 28,
58
+ ...style
59
+ } : style,
60
+ ref
61
+ };
25
62
 
26
- if (size === Size['xs']) {
63
+ if (renderAllSizes) {
27
64
  return /*#__PURE__*/React.createElement("svg", _extends({
28
- viewBox: "0 0 16 16"
29
- }, props, {
30
- className: cn(styles.icon, styles[theme], sizeStyles[size], className),
31
- ref: ref
32
- }), /*#__PURE__*/React.createElement("path", {
33
- d: "M5.97 4.47a.75.75 0 0 0 0 1.06L8.44 8l-2.47 2.47a.75.75 0 1 0 1.06 1.06l3-3a.75.75 0 0 0 0-1.06l-3-3a.75.75 0 0 0-1.06 0"
65
+ viewBox: "0 0 28 28"
66
+ }, mainProps), /*#__PURE__*/React.createElement(RightIcon16, {
67
+ className: styles.variant16
68
+ }), /*#__PURE__*/React.createElement(RightIcon20, {
69
+ className: styles.variant20
70
+ }), /*#__PURE__*/React.createElement(RightIcon24, {
71
+ className: styles.variant24
72
+ }), /*#__PURE__*/React.createElement(RightIcon28, {
73
+ className: styles.variant28
34
74
  }));
35
75
  }
36
76
 
77
+ if (size === Size['xs']) {
78
+ return /*#__PURE__*/React.createElement(RightIcon16, mainProps);
79
+ }
80
+
37
81
  if (size === Size['s']) {
38
- return /*#__PURE__*/React.createElement("svg", _extends({
39
- viewBox: "0 0 20 20"
40
- }, props, {
41
- className: cn(styles.icon, styles[theme], sizeStyles[size], className),
42
- ref: ref
43
- }), /*#__PURE__*/React.createElement("path", {
44
- d: "M7.293 5.293a1 1 0 0 0 0 1.414L10.586 10l-3.293 3.293a1 1 0 1 0 1.414 1.414l4-4a1 1 0 0 0 0-1.414l-4-4a1 1 0 0 0-1.414 0"
45
- }));
82
+ return /*#__PURE__*/React.createElement(RightIcon20, mainProps);
46
83
  }
47
84
 
48
85
  if (size === Size['m']) {
49
- return /*#__PURE__*/React.createElement("svg", _extends({
50
- viewBox: "0 0 24 24"
51
- }, props, {
52
- className: cn(styles.icon, styles[theme], sizeStyles[size], className),
53
- ref: ref
54
- }), /*#__PURE__*/React.createElement("path", {
55
- d: "M7.94 4.94a1.5 1.5 0 0 0 0 2.12L12.878 12l-4.94 4.94a1.5 1.5 0 0 0 2.122 2.12l6-6a1.5 1.5 0 0 0 0-2.12l-6-6a1.5 1.5 0 0 0-2.122 0"
56
- }));
86
+ return /*#__PURE__*/React.createElement(RightIcon24, mainProps);
57
87
  }
58
88
 
59
- return /*#__PURE__*/React.createElement("svg", _extends({
60
- viewBox: "0 0 28 28"
61
- }, props, {
62
- className: cn(styles.icon, styles[theme], sizeStyles[size], className),
63
- ref: ref
64
- }), /*#__PURE__*/React.createElement("path", {
65
- d: "M9.44 5.94a1.5 1.5 0 0 0 0 2.12L15.378 14l-5.94 5.94a1.5 1.5 0 0 0 2.122 2.12l7-7a1.5 1.5 0 0 0 0-2.12l-7-7a1.5 1.5 0 0 0-2.122 0"
66
- }));
89
+ return /*#__PURE__*/React.createElement(RightIcon28, mainProps);
67
90
  });
91
+ RightIcon.displayName = 'RightIcon';
68
92
  RightIcon.propTypes = {
69
93
  className: PropTypes.string,
70
94
  theme: PropTypes.oneOf(["light", "dark"]),
71
- size: PropTypes.oneOf(["xs", "s", "m", "l"])
72
- };
73
- RightIcon.defaultProps = {
74
- size: "m"
95
+ size: PropTypes.oneOf(["xs", "s", "m", "l"]),
96
+ 'data-render-all-sizes': PropTypes.bool,
97
+ style: PropTypes.object
75
98
  };
76
99
  export { Size, RightIcon as default };
package/lib/index.css CHANGED
@@ -1,4 +1,4 @@
1
- ._icon_7axx9h_4{
1
+ ._icon_1ymr40l_4{
2
2
  --_rs-theme-dark:var(
3
3
  --_rs-internal-force-theme-dark-consult-rescui-before-using,
4
4
  var(--rs-theme-dark, 0)
@@ -8,7 +8,7 @@
8
8
  --_rs-theme-light-coefficient:calc(1 - var(--_rs-theme-dark-coefficient));
9
9
  }
10
10
  @supports (color: color-mix(in srgb, #fff 50%, #000 50%)){
11
- ._icon_7axx9h_4{
11
+ ._icon_1ymr40l_4{
12
12
  --_rs-color-primary:color-mix(in srgb, var(--rs-color-primary-light-theme, #6B57FF) calc(100%*var(--_rs-theme-light-coefficient, 1)), var(--rs-color-primary-dark-theme, #8473FF) calc(100%*var(--_rs-theme-dark-coefficient, 0)));
13
13
  --_rs-color-primary-dim:color-mix(in srgb, var(--rs-color-primary-dim-light-theme, #8979ff) calc(100%*var(--_rs-theme-light-coefficient, 1)), var(--rs-color-primary-dim-dark-theme, #6f61d2) calc(100%*var(--_rs-theme-dark-coefficient, 0)));
14
14
  --_rs-color-primary-fog:color-mix(in srgb, var(--rs-color-primary-fog-light-theme, #e1ddff) calc(100%*var(--_rs-theme-light-coefficient, 1)), var(--rs-color-primary-fog-dark-theme, #2e2b49) calc(100%*var(--_rs-theme-dark-coefficient, 0)));
@@ -17,7 +17,7 @@
17
17
  }
18
18
  }
19
19
  @supports not (color: color-mix(in srgb, #fff 50%, #000 50%)){
20
- ._icon_7axx9h_4{
20
+ ._icon_1ymr40l_4{
21
21
  --_rs-color-primary:rgb(calc(var(--_rs-theme-light-coefficient, 1)*107 + var(--_rs-theme-dark-coefficient, 0)*132), calc(var(--_rs-theme-light-coefficient, 1)*87 + var(--_rs-theme-dark-coefficient, 0)*115), 255);
22
22
  --_rs-color-primary-dim:rgb(calc(var(--_rs-theme-light-coefficient, 1)*137 + var(--_rs-theme-dark-coefficient, 0)*111), calc(var(--_rs-theme-light-coefficient, 1)*121 + var(--_rs-theme-dark-coefficient, 0)*97), calc(var(--_rs-theme-light-coefficient, 1)*255 + var(--_rs-theme-dark-coefficient, 0)*210));
23
23
  --_rs-color-primary-fog:rgb(calc(var(--_rs-theme-light-coefficient, 1)*225 + var(--_rs-theme-dark-coefficient, 0)*46), calc(var(--_rs-theme-light-coefficient, 1)*221 + var(--_rs-theme-dark-coefficient, 0)*43), calc(var(--_rs-theme-light-coefficient, 1)*255 + var(--_rs-theme-dark-coefficient, 0)*73));
@@ -25,30 +25,30 @@
25
25
  --_rs-color-primary-t-fog:rgba(calc(var(--_rs-theme-light-coefficient, 1)*107 + var(--_rs-theme-dark-coefficient, 0)*132), calc(var(--_rs-theme-light-coefficient, 1)*87 + var(--_rs-theme-dark-coefficient, 0)*115), 255, calc(var(--_rs-theme-light-coefficient, 1)*0.2 + var(--_rs-theme-dark-coefficient, 0)*0.3));
26
26
  }
27
27
  }
28
- ._icon_7axx9h_4{
28
+ ._icon_1ymr40l_4{
29
29
 
30
30
  fill:var(--_rs-icons-themed-fill-or-initial, currentcolor);
31
31
 
32
32
  width:auto;
33
33
  height:var(--_rs-icons-height);
34
34
  }
35
- ._sizeXS_7axx9h_14{
35
+ ._sizeXS_1ymr40l_14{
36
36
  --_rs-icons-height:16px;
37
37
  }
38
- ._sizeS_7axx9h_18{
38
+ ._sizeS_1ymr40l_18{
39
39
  --_rs-icons-height:20px;
40
40
  }
41
- ._sizeM_7axx9h_22{
41
+ ._sizeM_1ymr40l_22{
42
42
  --_rs-icons-height:24px;
43
43
  }
44
- ._sizeL_7axx9h_26{
44
+ ._sizeL_1ymr40l_26{
45
45
  --_rs-icons-height:28px;
46
46
  }
47
- ._light_7axx9h_30{
47
+ ._light_1ymr40l_30{
48
48
  --rs-theme-dark:0;
49
49
  --_rs-icons-themed-fill-or-initial:rgb(calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(28 + var(--_rs-theme-dark-coefficient, 0)*227));
50
50
  }
51
- ._dark_7axx9h_34{
51
+ ._dark_1ymr40l_34{
52
52
  --rs-theme-dark:1;
53
53
  --_rs-icons-themed-fill-or-initial:rgb(calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(28 + var(--_rs-theme-dark-coefficient, 0)*227));
54
54
  }
@@ -60,18 +60,54 @@
60
60
  transform:rotate(360deg);
61
61
  }
62
62
  }
63
- ._light_1oa2na_7{
63
+ ._allVariants_1ymr40l_48{
64
+ aspect-ratio:var(--rs-icon-ar-width, 1) / var(--rs-icon-ar-height, 1);
65
+ container:rs-icon / size;
66
+ }
67
+ ._variant16_1ymr40l_53,
68
+ ._variant20_1ymr40l_54,
69
+ ._variant24_1ymr40l_55{
70
+ display:none;
71
+ }
72
+ ._variant28_1ymr40l_58{
73
+ display:block;
74
+ }
75
+ @container rs-icon (max-height: 24px){
76
+ ._variant24_1ymr40l_55{
77
+ display:block;
78
+ }
79
+ ._variant28_1ymr40l_58{
80
+ display:none;
81
+ }
82
+ }
83
+ @container rs-icon (max-height: 20px){
84
+ ._variant20_1ymr40l_54{
85
+ display:block;
86
+ }
87
+ ._variant24_1ymr40l_55{
88
+ display:none;
89
+ }
90
+ }
91
+ @container rs-icon (max-height: 16px){
92
+ ._variant16_1ymr40l_53{
93
+ display:block;
94
+ }
95
+ ._variant20_1ymr40l_54{
96
+ display:none;
97
+ }
98
+ }
99
+ ._light_u7woyi_7{
64
100
  --rs-theme-dark:0;
65
101
  }
66
- ._dark_1oa2na_10{
102
+ ._dark_u7woyi_10{
67
103
  --rs-theme-dark:1;
68
104
  }
69
- ._sizeM_1oa2na_14{
105
+ ._sizeM_u7woyi_14{
70
106
  --_rs-tab-list-tab-vertical-padding:8px;
71
107
  --_rs-tab-list-icon-size:24px;
72
108
  --_rs-tab-list-icon-offset:4px;
73
109
  }
74
- ._sizeM_1oa2na_14 [data-rs-internal='tab-list__tab']{
110
+ ._sizeM_u7woyi_14 [data-rs-internal='tab-list__tab']{
75
111
  --_rs-typography-letter-spacing:var(--rs-text-2-letter-spacing, 0.0015em);
76
112
  --_rs-typography-text-transform:initial;
77
113
  --_rs-typography-font-variant-numeric:initial;
@@ -100,22 +136,25 @@
100
136
  --_rs-typography-text-auto-offset:16px;
101
137
  --_rs-typography-ul-list-li-padding-left:22px;
102
138
  --_rs-typography-ol-list-li-padding-left:26px;
103
- --_rs-typography-list-li-margin-top-from-text:16px;
139
+ --_rs-typography-list-li-margin-top-from-text:var(
140
+ --_rs-typography-text-2-sm-list-li-margin-top-from-text,
141
+ 16px
142
+ );
104
143
  --_rs-typography-link-standalone-border-offset-from-text-base:1.15em;
105
144
  --_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
106
145
  --_rs-typography-link-border-bottom-width-from-text:1px;
107
146
  }
108
147
  @media screen and (max-width: 640px){
109
- ._sizeM_1oa2na_14 [data-rs-internal='tab-list__tab']{
110
- --_rs-typography-list-li-margin-top-from-text:12px;
148
+ ._sizeM_u7woyi_14 [data-rs-internal='tab-list__tab']{
149
+ --_rs-typography-text-2-sm-list-li-margin-top-from-text:12px;
111
150
  }
112
151
  }
113
- ._sizeL_1oa2na_17{
152
+ ._sizeL_u7woyi_17{
114
153
  --_rs-tab-list-tab-vertical-padding:12px;
115
154
  --_rs-tab-list-icon-size:28px;
116
155
  --_rs-tab-list-icon-offset:8px;
117
156
  }
118
- ._sizeL_1oa2na_17 [data-rs-internal='tab-list__tab']{
157
+ ._sizeL_u7woyi_17 [data-rs-internal='tab-list__tab']{
119
158
  --_rs-typography-letter-spacing:var(--rs-text-1-letter-spacing, normal);
120
159
  --_rs-typography-text-transform:initial;
121
160
  --_rs-typography-font-variant-numeric:initial;
@@ -144,34 +183,37 @@
144
183
  --_rs-typography-text-auto-offset:32px;
145
184
  --_rs-typography-ul-list-li-padding-left:26px;
146
185
  --_rs-typography-ol-list-li-padding-left:32px;
147
- --_rs-typography-list-li-margin-top-from-text:24px;
186
+ --_rs-typography-list-li-margin-top-from-text:var(
187
+ --_rs-typography-text-1-sm-list-li-margin-top-from-text,
188
+ 24px
189
+ );
148
190
  --_rs-typography-link-standalone-border-offset-from-text-base:1.15em;
149
191
  --_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
150
192
  --_rs-typography-link-border-bottom-width-from-text:1px;
151
193
  }
152
194
  @media screen and (max-width: 640px){
153
- ._sizeL_1oa2na_17 [data-rs-internal='tab-list__tab']{
154
- --_rs-typography-list-li-margin-top-from-text:16px;
195
+ ._sizeL_u7woyi_17 [data-rs-internal='tab-list__tab']{
196
+ --_rs-typography-text-1-sm-list-li-margin-top-from-text:16px;
155
197
  }
156
198
  }
157
- ._classic_1oa2na_21{
199
+ ._classic_u7woyi_21{
158
200
  --_rs-tab-list-indicator-background:var(--_rs-color-primary);
159
201
  }
160
- ._rock_1oa2na_24{
202
+ ._rock_u7woyi_24{
161
203
  --_rs-tab-list-indicator-background:rgb(calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(28 + var(--_rs-theme-dark-coefficient, 0)*227));
162
204
  }
163
- ._sparse_1oa2na_28{
205
+ ._sparse_u7woyi_28{
164
206
  --_rs-tab-list-tab-margin-left-or-initial:32px;
165
207
  }
166
208
  @media screen and (max-width: 640px){
167
- ._sparse_1oa2na_28{
209
+ ._sparse_u7woyi_28{
168
210
  --_rs-tab-list-tab-margin-left-or-initial:24px;
169
211
  }
170
212
  }
171
- ._short_1oa2na_32{
213
+ ._short_u7woyi_32{
172
214
  --_rs-tab-list-tab-box-shadow:inset 0 -1px 0 rgba(calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(28 + var(--_rs-theme-dark-coefficient, 0)*227), calc(0.3 + var(--_rs-theme-dark-coefficient)*0.1));
173
215
  }
174
- ._tabsContainer_1oa2na_36{
216
+ ._tabsContainer_u7woyi_36{
175
217
  --_rs-theme-dark:var(
176
218
  --_rs-internal-force-theme-dark-consult-rescui-before-using,
177
219
  var(--rs-theme-dark, 0)
@@ -181,7 +223,7 @@
181
223
  --_rs-theme-light-coefficient:calc(1 - var(--_rs-theme-dark-coefficient));
182
224
  }
183
225
  @supports (color: color-mix(in srgb, #fff 50%, #000 50%)){
184
- ._tabsContainer_1oa2na_36{
226
+ ._tabsContainer_u7woyi_36{
185
227
  --_rs-color-primary:color-mix(in srgb, var(--rs-color-primary-light-theme, #6B57FF) calc(100%*var(--_rs-theme-light-coefficient, 1)), var(--rs-color-primary-dark-theme, #8473FF) calc(100%*var(--_rs-theme-dark-coefficient, 0)));
186
228
  --_rs-color-primary-dim:color-mix(in srgb, var(--rs-color-primary-dim-light-theme, #8979ff) calc(100%*var(--_rs-theme-light-coefficient, 1)), var(--rs-color-primary-dim-dark-theme, #6f61d2) calc(100%*var(--_rs-theme-dark-coefficient, 0)));
187
229
  --_rs-color-primary-fog:color-mix(in srgb, var(--rs-color-primary-fog-light-theme, #e1ddff) calc(100%*var(--_rs-theme-light-coefficient, 1)), var(--rs-color-primary-fog-dark-theme, #2e2b49) calc(100%*var(--_rs-theme-dark-coefficient, 0)));
@@ -190,7 +232,7 @@
190
232
  }
191
233
  }
192
234
  @supports not (color: color-mix(in srgb, #fff 50%, #000 50%)){
193
- ._tabsContainer_1oa2na_36{
235
+ ._tabsContainer_u7woyi_36{
194
236
  --_rs-color-primary:rgb(calc(var(--_rs-theme-light-coefficient, 1)*107 + var(--_rs-theme-dark-coefficient, 0)*132), calc(var(--_rs-theme-light-coefficient, 1)*87 + var(--_rs-theme-dark-coefficient, 0)*115), 255);
195
237
  --_rs-color-primary-dim:rgb(calc(var(--_rs-theme-light-coefficient, 1)*137 + var(--_rs-theme-dark-coefficient, 0)*111), calc(var(--_rs-theme-light-coefficient, 1)*121 + var(--_rs-theme-dark-coefficient, 0)*97), calc(var(--_rs-theme-light-coefficient, 1)*255 + var(--_rs-theme-dark-coefficient, 0)*210));
196
238
  --_rs-color-primary-fog:rgb(calc(var(--_rs-theme-light-coefficient, 1)*225 + var(--_rs-theme-dark-coefficient, 0)*46), calc(var(--_rs-theme-light-coefficient, 1)*221 + var(--_rs-theme-dark-coefficient, 0)*43), calc(var(--_rs-theme-light-coefficient, 1)*255 + var(--_rs-theme-dark-coefficient, 0)*73));
@@ -198,15 +240,15 @@
198
240
  --_rs-color-primary-t-fog:rgba(calc(var(--_rs-theme-light-coefficient, 1)*107 + var(--_rs-theme-dark-coefficient, 0)*132), calc(var(--_rs-theme-light-coefficient, 1)*87 + var(--_rs-theme-dark-coefficient, 0)*115), 255, calc(var(--_rs-theme-light-coefficient, 1)*0.2 + var(--_rs-theme-dark-coefficient, 0)*0.3));
199
241
  }
200
242
  }
201
- ._tabsContainer_1oa2na_36 {
243
+ ._tabsContainer_u7woyi_36 {
202
244
  --_rs-tab-list-tab-base-margin-left:24px;
203
245
  }
204
246
  @media screen and (max-width: 640px){
205
- ._tabsContainer_1oa2na_36{
247
+ ._tabsContainer_u7woyi_36{
206
248
  --_rs-tab-list-tab-base-margin-left:16px;
207
249
  }
208
250
  }
209
- ._tabsContainer_1oa2na_36 {
251
+ ._tabsContainer_u7woyi_36 {
210
252
  --_rs-tab-list-tab-margin-left:var(
211
253
  --_rs-tab-list-tab-margin-left-or-initial,
212
254
  var(--_rs-tab-list-tab-base-margin-left)
@@ -216,7 +258,7 @@
216
258
 
217
259
  display:flex;
218
260
  }
219
- ._indicator_1oa2na_46{
261
+ ._indicator_u7woyi_46{
220
262
  position:absolute;
221
263
  z-index:3;
222
264
  bottom:0;
@@ -229,13 +271,16 @@
229
271
  transition:left 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, width 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
230
272
  will-change:left, width;
231
273
  }
232
- ._iconLeft_1oa2na_61{
274
+ ._isIndicatorHidden_u7woyi_60 ._indicator_u7woyi_46{
275
+ display:none;
276
+ }
277
+ ._iconLeft_u7woyi_65{
233
278
  --_rs-tab-list-tab-flex-direction:row;
234
279
  }
235
- ._iconRight_1oa2na_64{
280
+ ._iconRight_u7woyi_68{
236
281
  --_rs-tab-list-tab-flex-direction:row-reverse;
237
282
  }
238
- ._tab_1oa2na_36{
283
+ ._tab_u7woyi_36{
239
284
  --_rs-theme-dark:var(
240
285
  --_rs-internal-force-theme-dark-consult-rescui-before-using,
241
286
  var(--rs-theme-dark, 0)
@@ -245,7 +290,7 @@
245
290
  --_rs-theme-light-coefficient:calc(1 - var(--_rs-theme-dark-coefficient));
246
291
  }
247
292
  @supports (color: color-mix(in srgb, #fff 50%, #000 50%)){
248
- ._tab_1oa2na_36{
293
+ ._tab_u7woyi_36{
249
294
  --_rs-color-primary:color-mix(in srgb, var(--rs-color-primary-light-theme, #6B57FF) calc(100%*var(--_rs-theme-light-coefficient, 1)), var(--rs-color-primary-dark-theme, #8473FF) calc(100%*var(--_rs-theme-dark-coefficient, 0)));
250
295
  --_rs-color-primary-dim:color-mix(in srgb, var(--rs-color-primary-dim-light-theme, #8979ff) calc(100%*var(--_rs-theme-light-coefficient, 1)), var(--rs-color-primary-dim-dark-theme, #6f61d2) calc(100%*var(--_rs-theme-dark-coefficient, 0)));
251
296
  --_rs-color-primary-fog:color-mix(in srgb, var(--rs-color-primary-fog-light-theme, #e1ddff) calc(100%*var(--_rs-theme-light-coefficient, 1)), var(--rs-color-primary-fog-dark-theme, #2e2b49) calc(100%*var(--_rs-theme-dark-coefficient, 0)));
@@ -254,7 +299,7 @@
254
299
  }
255
300
  }
256
301
  @supports not (color: color-mix(in srgb, #fff 50%, #000 50%)){
257
- ._tab_1oa2na_36{
302
+ ._tab_u7woyi_36{
258
303
  --_rs-color-primary:rgb(calc(var(--_rs-theme-light-coefficient, 1)*107 + var(--_rs-theme-dark-coefficient, 0)*132), calc(var(--_rs-theme-light-coefficient, 1)*87 + var(--_rs-theme-dark-coefficient, 0)*115), 255);
259
304
  --_rs-color-primary-dim:rgb(calc(var(--_rs-theme-light-coefficient, 1)*137 + var(--_rs-theme-dark-coefficient, 0)*111), calc(var(--_rs-theme-light-coefficient, 1)*121 + var(--_rs-theme-dark-coefficient, 0)*97), calc(var(--_rs-theme-light-coefficient, 1)*255 + var(--_rs-theme-dark-coefficient, 0)*210));
260
305
  --_rs-color-primary-fog:rgb(calc(var(--_rs-theme-light-coefficient, 1)*225 + var(--_rs-theme-dark-coefficient, 0)*46), calc(var(--_rs-theme-light-coefficient, 1)*221 + var(--_rs-theme-dark-coefficient, 0)*43), calc(var(--_rs-theme-light-coefficient, 1)*255 + var(--_rs-theme-dark-coefficient, 0)*73));
@@ -262,7 +307,7 @@
262
307
  --_rs-color-primary-t-fog:rgba(calc(var(--_rs-theme-light-coefficient, 1)*107 + var(--_rs-theme-dark-coefficient, 0)*132), calc(var(--_rs-theme-light-coefficient, 1)*87 + var(--_rs-theme-dark-coefficient, 0)*115), 255, calc(var(--_rs-theme-light-coefficient, 1)*0.2 + var(--_rs-theme-dark-coefficient, 0)*0.3));
263
308
  }
264
309
  }
265
- ._tab_1oa2na_36 {
310
+ ._tab_u7woyi_36 {
266
311
  letter-spacing:var(
267
312
  --rs-text-base-letter-spacing,
268
313
  var(--_rs-typography-letter-spacing)
@@ -306,22 +351,23 @@
306
351
  -moz-osx-font-smoothing:inherit;
307
352
  -webkit-appearance:none;
308
353
  }
309
- ._tab_1oa2na_36::-moz-focus-inner{
354
+ ._tab_u7woyi_36::-moz-focus-inner{
310
355
  padding:0;
311
356
 
312
357
  border:none;
313
358
  }
314
- ._tab_1oa2na_36:hover,
315
- ._tab_1oa2na_36:active,
316
- ._tab_1oa2na_36:focus{
359
+ ._tab_u7woyi_36:hover,
360
+ ._tab_u7woyi_36:active,
361
+ ._tab_u7woyi_36:focus{
317
362
  outline:none;
318
363
 
319
364
  text-decoration:none;
320
365
  }
321
- ._tab_1oa2na_36:after{
366
+ ._tab_u7woyi_36:after{
322
367
  position:absolute;
323
368
  bottom:0;
324
369
  left:0;
370
+ right:0;
325
371
 
326
372
  width:100%;
327
373
  height:0;
@@ -330,18 +376,18 @@
330
376
 
331
377
  background-color:transparent;
332
378
  }
333
- ._tab_1oa2na_36:focus[data-focus-method='key']:after{
379
+ ._tab_u7woyi_36:focus[data-focus-method='key']:after{
334
380
  opacity:0;
335
381
  }
336
- ._tab_1oa2na_36:hover{
382
+ ._tab_u7woyi_36:hover{
337
383
  color:rgb(calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(28 + var(--_rs-theme-dark-coefficient, 0)*227));
338
384
  }
339
- ._tab_1oa2na_36:hover:after{
385
+ ._tab_u7woyi_36:hover:after{
340
386
  height:1px;
341
387
 
342
388
  background-color:rgb(calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(28 + var(--_rs-theme-dark-coefficient, 0)*227));
343
389
  }
344
- ._tab_1oa2na_36._selected_1oa2na_154{
390
+ ._tab_u7woyi_36._selected_u7woyi_159{
345
391
  z-index:1;
346
392
 
347
393
  cursor:default;
@@ -350,20 +396,20 @@
350
396
 
351
397
  transition:color 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
352
398
  }
353
- ._tab_1oa2na_36._selected_1oa2na_154:after{
399
+ ._tab_u7woyi_36._selected_u7woyi_159:after{
354
400
  height:2px;
355
401
 
356
402
  background-color:var(--_rs-tab-list-indicator-background);
357
403
 
358
404
  transition:background-color 0ms ease 300ms, height 0ms ease 300ms;
359
405
  }
360
- ._tab_1oa2na_36:focus[data-focus-method='key']{
406
+ ._tab_u7woyi_36:focus[data-focus-method='key']{
361
407
  box-shadow:inset var(--_rs-color-primary-dim) 0 -4px 0 0, inset var(--_rs-color-primary-dim) 0 4px 0 0, var(--_rs-color-primary-dim) -4px 0 0 0, var(--_rs-color-primary-dim) 4px 0 0 0;
362
408
  }
363
- ._tab_1oa2na_36:first-child{
409
+ ._tab_u7woyi_36:first-child{
364
410
  margin-left:0;
365
411
  }
366
- ._tab_1oa2na_36 ._icon_1oa2na_61{
412
+ ._tab_u7woyi_36 ._icon_u7woyi_65{
367
413
  flex:0 0;
368
414
  flex-basis:auto;
369
415
 
@@ -371,13 +417,13 @@
371
417
  height:var(--_rs-tab-list-icon-size);
372
418
  }
373
419
 
374
- ._light_vbjvol_9{
420
+ ._light_17stncc_9{
375
421
  --rs-theme-dark:0;
376
422
  }
377
- ._dark_vbjvol_12{
423
+ ._dark_17stncc_12{
378
424
  --rs-theme-dark:1;
379
425
  }
380
- ._wrapper_vbjvol_16{
426
+ ._wrapper_17stncc_16{
381
427
  --_rs-theme-dark:var(
382
428
  --_rs-internal-force-theme-dark-consult-rescui-before-using,
383
429
  var(--rs-theme-dark, 0)
@@ -389,14 +435,14 @@
389
435
 
390
436
  display:flex;
391
437
  }
392
- ._scrollable_vbjvol_23{
438
+ ._scrollable_17stncc_23{
393
439
  display:flex;
394
440
  overflow-x:scroll;
395
441
 
396
442
  margin:-4px;
397
443
  padding:4px;
398
444
  }
399
- ._scrollable_vbjvol_23::after{
445
+ ._scrollable_17stncc_23::after{
400
446
  display:block;
401
447
 
402
448
  height:100%;
@@ -405,15 +451,15 @@
405
451
 
406
452
  content:'';
407
453
  }
408
- ._scrollable_vbjvol_23 {
454
+ ._scrollable_17stncc_23 {
409
455
 
410
456
  -ms-overflow-style:none;
411
457
  scrollbar-width:none;
412
458
  }
413
- ._scrollable_vbjvol_23::-webkit-scrollbar{
459
+ ._scrollable_17stncc_23::-webkit-scrollbar{
414
460
  display:none;
415
461
  }
416
- ._arrow_vbjvol_52{
462
+ ._arrow_17stncc_52{
417
463
  position:absolute;
418
464
  z-index:2;
419
465
  top:50%;
@@ -433,20 +479,20 @@
433
479
  transition:opacity 0.15s ease-out;
434
480
  transform:translateY(-50%);
435
481
  }
436
- ._arrow_vbjvol_52._shown_vbjvol_72{
482
+ ._arrow_17stncc_52._shown_17stncc_72{
437
483
  opacity:1;
438
484
 
439
485
  pointer-events:auto;
440
486
 
441
487
  transition:opacity 0.15s ease-in;
442
488
  }
443
- ._arrow_vbjvol_52._arrowLeft_vbjvol_80{
489
+ ._arrow_17stncc_52._arrowLeft_17stncc_80{
444
490
  left:-5px;
445
491
  }
446
- ._arrow_vbjvol_52._arrowRight_vbjvol_85{
492
+ ._arrow_17stncc_52._arrowRight_17stncc_85{
447
493
  right:-5px;
448
494
  }
449
- ._withLeftArrow_vbjvol_91{
495
+ ._withLeftArrow_17stncc_91{
450
496
  -webkit-mask-image:linear-gradient(
451
497
  to right,
452
498
  rgba(0, 0, 0, 0) 0%,
@@ -460,7 +506,7 @@
460
506
  black 56px
461
507
  );
462
508
  }
463
- ._withRightArrow_vbjvol_100{
509
+ ._withRightArrow_17stncc_100{
464
510
  -webkit-mask-image:linear-gradient(
465
511
  to left,
466
512
  rgba(0, 0, 0, 0) 0%,
@@ -474,7 +520,7 @@
474
520
  black 56px
475
521
  );
476
522
  }
477
- ._withLeftArrow_vbjvol_91._withRightArrow_vbjvol_100{
523
+ ._withLeftArrow_17stncc_91._withRightArrow_17stncc_100{
478
524
  -webkit-mask-image:linear-gradient(
479
525
  to right,
480
526
  rgba(0, 0, 0, 0) 0%,
@@ -494,17 +540,17 @@
494
540
  rgba(0, 0, 0, 0) 100%
495
541
  );
496
542
  }
497
- ._arrowButton_vbjvol_121{
543
+ ._arrowButton_17stncc_121{
498
544
  cursor:pointer;
499
545
  }
500
546
 
501
- ._light_13g688t_4{
547
+ ._light_1u8lq50_4{
502
548
  --rs-theme-dark:0;
503
549
  }
504
- ._dark_13g688t_7{
550
+ ._dark_1u8lq50_7{
505
551
  --rs-theme-dark:1;
506
552
  }
507
- ._separator_13g688t_11{
553
+ ._separator_1u8lq50_11{
508
554
  --_rs-theme-dark:var(
509
555
  --_rs-internal-force-theme-dark-consult-rescui-before-using,
510
556
  var(--rs-theme-dark, 0)
@@ -518,7 +564,7 @@
518
564
 
519
565
  width:100%;
520
566
  }
521
- ._separator_13g688t_11:after{
567
+ ._separator_1u8lq50_11:after{
522
568
  position:absolute;
523
569
  right:0;
524
570
  bottom:0;
@@ -1,6 +1,6 @@
1
1
  var styles = {
2
- "light": "_light_13g688t_4",
3
- "dark": "_dark_13g688t_7",
4
- "separator": "_separator_13g688t_11"
2
+ "light": "_light_1u8lq50_4",
3
+ "dark": "_dark_1u8lq50_7",
4
+ "separator": "_separator_1u8lq50_11"
5
5
  };
6
6
  export { styles as default };
@@ -1,18 +1,19 @@
1
1
  var styles = {
2
- "light": "_light_1oa2na_7",
3
- "dark": "_dark_1oa2na_10",
4
- "sizeM": "_sizeM_1oa2na_14",
5
- "sizeL": "_sizeL_1oa2na_17",
6
- "classic": "_classic_1oa2na_21",
7
- "rock": "_rock_1oa2na_24",
8
- "sparse": "_sparse_1oa2na_28",
9
- "short": "_short_1oa2na_32",
10
- "tabsContainer": "_tabsContainer_1oa2na_36",
11
- "indicator": "_indicator_1oa2na_46",
12
- "iconLeft": "_iconLeft_1oa2na_61",
13
- "iconRight": "_iconRight_1oa2na_64",
14
- "tab": "_tab_1oa2na_36",
15
- "selected": "_selected_1oa2na_154",
16
- "icon": "_icon_1oa2na_61"
2
+ "light": "_light_u7woyi_7",
3
+ "dark": "_dark_u7woyi_10",
4
+ "sizeM": "_sizeM_u7woyi_14",
5
+ "sizeL": "_sizeL_u7woyi_17",
6
+ "classic": "_classic_u7woyi_21",
7
+ "rock": "_rock_u7woyi_24",
8
+ "sparse": "_sparse_u7woyi_28",
9
+ "short": "_short_u7woyi_32",
10
+ "tabsContainer": "_tabsContainer_u7woyi_36",
11
+ "indicator": "_indicator_u7woyi_46",
12
+ "isIndicatorHidden": "_isIndicatorHidden_u7woyi_60",
13
+ "iconLeft": "_iconLeft_u7woyi_65",
14
+ "iconRight": "_iconRight_u7woyi_68",
15
+ "tab": "_tab_u7woyi_36",
16
+ "selected": "_selected_u7woyi_159",
17
+ "icon": "_icon_u7woyi_65"
17
18
  };
18
19
  export { styles as default };
package/lib/parts/tab.js CHANGED
@@ -62,7 +62,8 @@ const Tab = /*#__PURE__*/forwardRef((_ref, ref) => {
62
62
  "data-test": `tab${selected ? ' tab-selected' : ''}`,
63
63
  "data-rs-internal": 'tab-list__tab'
64
64
  }, icon && /*#__PURE__*/cloneElement(icon, {
65
- className: cn(icon.props.className, styles.icon)
65
+ className: cn(icon.props.className, styles.icon),
66
+ 'data-render-all-sizes': true
66
67
  }), /*#__PURE__*/React.createElement("div", null, children));
67
68
  });
68
69
  Tab.displayName = 'Tab';
@@ -4,7 +4,10 @@ export declare const useIndicator: ({ activeNodeRef, containerRef, triggers }: {
4
4
  containerRef: MutableRefObject<HTMLDivElement>;
5
5
  triggers: unknown[];
6
6
  }) => {
7
- left: number | string;
8
- width: number | string;
9
- transitionDuration?: string;
7
+ indicator: {
8
+ left: number | string;
9
+ width: number | string;
10
+ transitionDuration?: string;
11
+ };
12
+ isIndicatorHidden: boolean;
10
13
  };
@@ -1,4 +1,4 @@
1
- import { useState, useEffect } from 'react';
1
+ import { useState, useRef, useEffect } from 'react';
2
2
  import { useResizeObserver } from '@rescui/use-resize-observer';
3
3
 
4
4
  function calculateIndicator(activeNodeRef, parentNode) {
@@ -22,30 +22,43 @@ const useIndicator = _ref => {
22
22
  left: 0,
23
23
  width: 0
24
24
  });
25
- const [isSSR, setIsSSR] = useState(true); // Catch the resize of the container which is happening when the fonts downloads for example
25
+ const firstIndicatorUpdate = useRef(true); // Catch the resize of the container which is happening when the fonts downloads for example
26
+
27
+ const updateIndicator = function () {
28
+ let isValueChanged = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
26
29
 
27
- const onResize = () => {
28
30
  if (!activeNodeRef.current || !containerRef.current) {
29
31
  return;
30
32
  }
31
33
 
32
- if (isSSR) {
33
- setIsSSR(false);
34
- setIndicator({ ...calculateIndicator(activeNodeRef.current, containerRef.current),
35
- transitionDuration: '0ms'
36
- });
37
- return;
34
+ let isTransitionEnabled;
35
+
36
+ if (firstIndicatorUpdate.current) {
37
+ firstIndicatorUpdate.current = false;
38
+ isTransitionEnabled = false;
39
+ } else {
40
+ isTransitionEnabled = isValueChanged;
38
41
  }
39
42
 
40
- setIndicator(calculateIndicator(activeNodeRef.current, containerRef.current));
41
- };
43
+ setIndicator({ ...calculateIndicator(activeNodeRef.current, containerRef.current),
44
+ transitionDuration: !isTransitionEnabled ? '0s' : null
45
+ });
46
+ }; // Trigger it on value change for example
47
+
42
48
 
43
- useResizeObserver(containerRef, onResize, {
49
+ useEffect(() => updateIndicator(true), triggers); // Or changing container size
50
+
51
+ useResizeObserver(containerRef, () => updateIndicator(false), {
44
52
  ignoreFirstCall: true
45
- }); // Also trigger it on value change for example
53
+ }); // Or changing active element size
46
54
 
47
- useEffect(onResize, triggers);
48
- return indicator;
55
+ useResizeObserver(activeNodeRef.current, () => updateIndicator(false), {
56
+ ignoreFirstCall: true
57
+ });
58
+ return {
59
+ indicator,
60
+ isIndicatorHidden: firstIndicatorUpdate.current
61
+ };
49
62
  };
50
63
 
51
64
  export { useIndicator };
@@ -53,7 +53,9 @@ const withScrollArrows = function (WrappedComponent, CompareItem) {
53
53
  mode: "clear",
54
54
  notFocusable: true,
55
55
  onClick: prepareDirectionScroller('left'),
56
- icon: /*#__PURE__*/React.createElement(LeftIcon, null),
56
+ icon: /*#__PURE__*/React.createElement(LeftIcon, {
57
+ "data-render-all-sizes": true
58
+ }),
57
59
  size: "s",
58
60
  "data-e2e": e2eId ? `${e2eId}__left-arrow` : null,
59
61
  "data-test": 'scrollable-list-arrow-left'
@@ -79,7 +81,9 @@ const withScrollArrows = function (WrappedComponent, CompareItem) {
79
81
  mode: "clear",
80
82
  notFocusable: true,
81
83
  onClick: prepareDirectionScroller('right'),
82
- icon: /*#__PURE__*/React.createElement(RightIcon, null),
84
+ icon: /*#__PURE__*/React.createElement(RightIcon, {
85
+ "data-render-all-sizes": true
86
+ }),
83
87
  className: styles.arrowButton,
84
88
  size: "s",
85
89
  "data-e2e": e2eId ? `${e2eId}__right-arrow` : null,
@@ -1,14 +1,14 @@
1
1
  var styles = {
2
- "light": "_light_vbjvol_9",
3
- "dark": "_dark_vbjvol_12",
4
- "wrapper": "_wrapper_vbjvol_16",
5
- "scrollable": "_scrollable_vbjvol_23",
6
- "arrow": "_arrow_vbjvol_52",
7
- "shown": "_shown_vbjvol_72",
8
- "arrowLeft": "_arrowLeft_vbjvol_80",
9
- "arrowRight": "_arrowRight_vbjvol_85",
10
- "withLeftArrow": "_withLeftArrow_vbjvol_91",
11
- "withRightArrow": "_withRightArrow_vbjvol_100",
12
- "arrowButton": "_arrowButton_vbjvol_121"
2
+ "light": "_light_17stncc_9",
3
+ "dark": "_dark_17stncc_12",
4
+ "wrapper": "_wrapper_17stncc_16",
5
+ "scrollable": "_scrollable_17stncc_23",
6
+ "arrow": "_arrow_17stncc_52",
7
+ "shown": "_shown_17stncc_72",
8
+ "arrowLeft": "_arrowLeft_17stncc_80",
9
+ "arrowRight": "_arrowRight_17stncc_85",
10
+ "withLeftArrow": "_withLeftArrow_17stncc_91",
11
+ "withRightArrow": "_withRightArrow_17stncc_100",
12
+ "arrowButton": "_arrowButton_17stncc_121"
13
13
  };
14
14
  export { styles as default };
@@ -33,14 +33,17 @@
33
33
  --_rs-typography-text-auto-offset:16px;
34
34
  --_rs-typography-ul-list-li-padding-left:22px;
35
35
  --_rs-typography-ol-list-li-padding-left:26px;
36
- --_rs-typography-list-li-margin-top-from-text:16px;
36
+ --_rs-typography-list-li-margin-top-from-text:var(
37
+ --_rs-typography-text-2-sm-list-li-margin-top-from-text,
38
+ 16px
39
+ );
37
40
  --_rs-typography-link-standalone-border-offset-from-text-base:1.15em;
38
41
  --_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
39
42
  --_rs-typography-link-border-bottom-width-from-text:1px;
40
43
  }
41
44
  @media screen and (max-width: 640px){
42
45
  &:not(html) [data-rs-internal='tab-list__tab']{
43
- --_rs-typography-list-li-margin-top-from-text:12px;
46
+ --_rs-typography-text-2-sm-list-li-margin-top-from-text:12px;
44
47
  }
45
48
  }
46
49
  }
@@ -79,14 +82,17 @@
79
82
  --_rs-typography-text-auto-offset:32px;
80
83
  --_rs-typography-ul-list-li-padding-left:26px;
81
84
  --_rs-typography-ol-list-li-padding-left:32px;
82
- --_rs-typography-list-li-margin-top-from-text:24px;
85
+ --_rs-typography-list-li-margin-top-from-text:var(
86
+ --_rs-typography-text-1-sm-list-li-margin-top-from-text,
87
+ 24px
88
+ );
83
89
  --_rs-typography-link-standalone-border-offset-from-text-base:1.15em;
84
90
  --_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
85
91
  --_rs-typography-link-border-bottom-width-from-text:1px;
86
92
  }
87
93
  @media screen and (max-width: 640px){
88
94
  &:not(html) [data-rs-internal='tab-list__tab']{
89
- --_rs-typography-list-li-margin-top-from-text:16px;
95
+ --_rs-typography-text-1-sm-list-li-margin-top-from-text:16px;
90
96
  }
91
97
  }
92
98
  }
@@ -33,14 +33,17 @@
33
33
  --_rs-typography-text-auto-offset:16px;
34
34
  --_rs-typography-ul-list-li-padding-left:22px;
35
35
  --_rs-typography-ol-list-li-padding-left:26px;
36
- --_rs-typography-list-li-margin-top-from-text:16px;
36
+ --_rs-typography-list-li-margin-top-from-text:var(
37
+ --_rs-typography-text-2-sm-list-li-margin-top-from-text,
38
+ 16px
39
+ );
37
40
  --_rs-typography-link-standalone-border-offset-from-text-base:1.15em;
38
41
  --_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
39
42
  --_rs-typography-link-border-bottom-width-from-text:1px;
40
43
  }
41
44
  @media screen and (max-width: 640px){
42
45
  &:not(html) [data-rs-internal='tab-list__tab']{
43
- --_rs-typography-list-li-margin-top-from-text:12px;
46
+ --_rs-typography-text-2-sm-list-li-margin-top-from-text:12px;
44
47
  }
45
48
  }
46
49
  }
@@ -79,14 +82,17 @@
79
82
  --_rs-typography-text-auto-offset:32px;
80
83
  --_rs-typography-ul-list-li-padding-left:26px;
81
84
  --_rs-typography-ol-list-li-padding-left:32px;
82
- --_rs-typography-list-li-margin-top-from-text:24px;
85
+ --_rs-typography-list-li-margin-top-from-text:var(
86
+ --_rs-typography-text-1-sm-list-li-margin-top-from-text,
87
+ 24px
88
+ );
83
89
  --_rs-typography-link-standalone-border-offset-from-text-base:1.15em;
84
90
  --_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
85
91
  --_rs-typography-link-border-bottom-width-from-text:1px;
86
92
  }
87
93
  @media screen and (max-width: 640px){
88
94
  &:not(html) [data-rs-internal='tab-list__tab']{
89
- --_rs-typography-list-li-margin-top-from-text:16px;
95
+ --_rs-typography-text-1-sm-list-li-margin-top-from-text:16px;
90
96
  }
91
97
  }
92
98
  }
package/lib/tab-list.js CHANGED
@@ -27,10 +27,13 @@ const InnerTabList = _ref => {
27
27
  containerRef,
28
28
  ['data-e2e']: e2eId
29
29
  } = _ref;
30
- const indicator = useIndicator({
30
+ const {
31
+ indicator,
32
+ isIndicatorHidden
33
+ } = useIndicator({
31
34
  activeNodeRef,
32
35
  containerRef,
33
- triggers: [value, children]
36
+ triggers: [value]
34
37
  });
35
38
  return /*#__PURE__*/React.createElement(TabListContext.Provider, {
36
39
  value: {
@@ -38,7 +41,7 @@ const InnerTabList = _ref => {
38
41
  selectedId
39
42
  }
40
43
  }, /*#__PURE__*/React.createElement("div", {
41
- className: cn(styles.tabsContainer, styles[theme], styles[mode], STYLES_SIZES[size], sparse && styles.sparse, short && styles.short, className),
44
+ className: cn(styles.tabsContainer, styles[theme], styles[mode], STYLES_SIZES[size], sparse && styles.sparse, short && styles.short, isIndicatorHidden && styles.isIndicatorHidden, className),
42
45
  "data-e2e": e2eId ? `${e2eId}__tabs-container` : null,
43
46
  "data-test": 'tab-list',
44
47
  ref: containerRef
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rescui/tab-list",
3
- "version": "0.13.11-RUI-230-Update-icons-0bd4e5fc.9+0bd4e5fc",
3
+ "version": "0.13.11-RUI-230-Update-icons-6919f9e4.29+6919f9e4",
4
4
  "description": "",
5
5
  "license": "Apache-2.0",
6
6
  "author": "JetBrains",
@@ -16,8 +16,8 @@
16
16
  },
17
17
  "dependencies": {
18
18
  "@babel/runtime-corejs3": "^7.26.0",
19
- "@rescui/button": "0.20.3-RUI-230-Update-icons-0bd4e5fc.9+0bd4e5fc",
20
- "@rescui/use-resize-observer": "0.2.6-RUI-230-Update-icons-0bd4e5fc.33+0bd4e5fc",
19
+ "@rescui/button": "0.20.3-RUI-230-Update-icons-6919f9e4.29+6919f9e4",
20
+ "@rescui/use-resize-observer": "0.2.6-RUI-230-Update-icons-6919f9e4.53+6919f9e4",
21
21
  "classnames": "^2.2.6"
22
22
  },
23
23
  "peerDependencies": {
@@ -26,10 +26,10 @@
26
26
  "react": ">=16.8.0 <19"
27
27
  },
28
28
  "devDependencies": {
29
- "@rescui/colors": "0.2.7-RUI-230-Update-icons-0bd4e5fc.33+0bd4e5fc",
29
+ "@rescui/colors": "0.2.7-RUI-230-Update-icons-6919f9e4.53+6919f9e4",
30
30
  "@rescui/postcss-preset-library": "0.2.2",
31
31
  "@rescui/scripts": "0.3.5",
32
- "@rescui/typography": "0.21.1-RUI-230-Update-icons-0bd4e5fc.9+0bd4e5fc",
32
+ "@rescui/typography": "0.21.1-RUI-230-Update-icons-6919f9e4.29+6919f9e4",
33
33
  "@rescui/visual-regression": "0.1.2"
34
34
  },
35
35
  "scripts": {
@@ -37,5 +37,5 @@
37
37
  "build-pcss-api": "rescui-scripts build-pcss-api --file public-api.p.css"
38
38
  },
39
39
  "nx": {},
40
- "gitHead": "0bd4e5fc55bc38b4b8a80a5dcbdb036720dc9676"
40
+ "gitHead": "6919f9e47242359e9341826175a53441c8c70f75"
41
41
  }