@rescui/checkbox 0.8.11 → 0.8.12

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_afka1x_4",
3
- "sizeXS": "_sizeXS_afka1x_14",
4
- "sizeS": "_sizeS_afka1x_18",
5
- "sizeM": "_sizeM_afka1x_22",
6
- "sizeL": "_sizeL_afka1x_26",
7
- "light": "_light_afka1x_30",
8
- "dark": "_dark_afka1x_34"
2
+ "icon": "_icon_oeje7x_4",
3
+ "sizeXS": "_sizeXS_oeje7x_14",
4
+ "sizeS": "_sizeS_oeje7x_18",
5
+ "sizeM": "_sizeM_oeje7x_22",
6
+ "sizeL": "_sizeL_oeje7x_26",
7
+ "light": "_light_oeje7x_30",
8
+ "dark": "_dark_oeje7x_34",
9
+ "allVariants": "_allVariants_oeje7x_48",
10
+ "variant16": "_variant16_oeje7x_53",
11
+ "variant20": "_variant20_oeje7x_54",
12
+ "variant24": "_variant24_oeje7x_55",
13
+ "variant28": "_variant28_oeje7x_58"
9
14
  };
10
15
  export { styles as default };
@@ -9,28 +9,98 @@ const sizeStyles = {
9
9
  "m": styles.sizeM,
10
10
  "l": styles.sizeL
11
11
  };
12
+ const Size = {
13
+ "xs": "xs",
14
+ "s": "s",
15
+ "m": "m",
16
+ "l": "l"
17
+ };
18
+ const WarningIcon16 = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React.createElement("svg", _extends({
19
+ viewBox: "0 0 16 16"
20
+ }, props, {
21
+ ref: ref
22
+ }), /*#__PURE__*/React.createElement("path", {
23
+ d: "m6.303 1.989-5.027 8.874C.483 12.263 1.494 14 3.103 14h9.793c1.609 0 2.62-1.736 1.827-3.137L9.696 1.99C8.949.67 7.05.67 6.303 1.989M8 12a1 1 0 1 1 0-2 1 1 0 0 1 0 2m0-8a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-1 0v-4A.5.5 0 0 1 8 4"
24
+ })));
25
+ WarningIcon16.displayName = 'WarningIcon16';
26
+ const WarningIcon20 = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React.createElement("svg", _extends({
27
+ viewBox: "0 0 20 20"
28
+ }, props, {
29
+ ref: ref
30
+ }), /*#__PURE__*/React.createElement("path", {
31
+ d: "m8.042 3.141-5.8 10.24C1.327 14.997 2.494 17 4.35 17h11.3c1.856 0 3.023-2.003 2.108-3.62l-5.8-10.239c-.862-1.521-3.054-1.521-3.916 0M10 5.25a.75.75 0 0 1 .75.75v5a.75.75 0 0 1-1.5 0V6a.75.75 0 0 1 .75-.75m0 9.25a1 1 0 1 1 0-2 1 1 0 0 1 0 2"
32
+ })));
33
+ WarningIcon20.displayName = 'WarningIcon20';
34
+ const WarningIcon24 = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React.createElement("svg", _extends({
35
+ viewBox: "0 0 24 24"
36
+ }, props, {
37
+ ref: ref
38
+ }), /*#__PURE__*/React.createElement("path", {
39
+ d: "m9.52 3.446-7.346 12.97C1.014 18.463 2.492 21 4.844 21h14.312c2.352 0 3.83-2.537 2.67-4.584L14.48 3.446c-1.092-1.928-3.868-1.928-4.96 0M12 7a1 1 0 0 1 1 1v5a1 1 0 1 1-2 0V8a1 1 0 0 1 1-1m0 11a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3"
40
+ })));
41
+ WarningIcon24.displayName = 'WarningIcon24';
42
+ const WarningIcon28 = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React.createElement("svg", _extends({
43
+ viewBox: "0 0 28 28"
44
+ }, props, {
45
+ ref: ref
46
+ }), /*#__PURE__*/React.createElement("path", {
47
+ d: "M11.26 4.598 3.14 18.933C1.858 21.195 3.492 24 6.09 24h15.82c2.599 0 4.232-2.805 2.951-5.067l-8.12-14.335c-1.207-2.13-4.275-2.13-5.481 0M14 8a1 1 0 0 1 1 1v6a1 1 0 1 1-2 0V9a1 1 0 0 1 1-1m0 12a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3"
48
+ })));
49
+ WarningIcon28.displayName = 'WarningIcon28';
12
50
  const WarningIcon = /*#__PURE__*/React.forwardRef((_ref, ref) => {
13
51
  let {
14
52
  theme,
15
- size,
53
+ size: sizeFromProps = "m",
16
54
  className,
55
+ style,
56
+ ['data-render-all-sizes']: renderAllSizes = false,
17
57
  ...props
18
58
  } = _ref;
19
- return /*#__PURE__*/React.createElement("svg", _extends({
20
- viewBox: "0 0 24 24"
21
- }, props, {
22
- className: cn(styles.icon, styles[theme], sizeStyles[size], className),
23
- ref: ref
24
- }), /*#__PURE__*/React.createElement("path", {
25
- d: "M2.769 20h18.363a.615.615 0 00.546-.891L12.504 2.8a.566.566 0 00-.989-.002C9.8 5.891 4.026 16.101 2.322 19.112A.61.61 0 002.77 20zm8.229-12h2v6h-2V8zm0 8h2v2h-2v-2z"
26
- }));
59
+ const size = sizeFromProps in Size ? sizeFromProps : "m";
60
+ const mainProps = { ...props,
61
+ className: cn(styles.icon, styles[theme], sizeStyles[size], renderAllSizes && styles.allVariants, className),
62
+ style: renderAllSizes ? {
63
+ '--rs-icon-ar-width': 28,
64
+ '--rs-icon-ar-height': 28,
65
+ ...style
66
+ } : style,
67
+ ref
68
+ };
69
+
70
+ if (renderAllSizes) {
71
+ return /*#__PURE__*/React.createElement("svg", _extends({
72
+ viewBox: "0 0 28 28"
73
+ }, mainProps), /*#__PURE__*/React.createElement(WarningIcon16, {
74
+ className: styles.variant16
75
+ }), /*#__PURE__*/React.createElement(WarningIcon20, {
76
+ className: styles.variant20
77
+ }), /*#__PURE__*/React.createElement(WarningIcon24, {
78
+ className: styles.variant24
79
+ }), /*#__PURE__*/React.createElement(WarningIcon28, {
80
+ className: styles.variant28
81
+ }));
82
+ }
83
+
84
+ if (size === Size['xs']) {
85
+ return /*#__PURE__*/React.createElement(WarningIcon16, mainProps);
86
+ }
87
+
88
+ if (size === Size['s']) {
89
+ return /*#__PURE__*/React.createElement(WarningIcon20, mainProps);
90
+ }
91
+
92
+ if (size === Size['m']) {
93
+ return /*#__PURE__*/React.createElement(WarningIcon24, mainProps);
94
+ }
95
+
96
+ return /*#__PURE__*/React.createElement(WarningIcon28, mainProps);
27
97
  });
98
+ WarningIcon.displayName = 'WarningIcon';
28
99
  WarningIcon.propTypes = {
29
100
  className: PropTypes.string,
30
101
  theme: PropTypes.oneOf(["light", "dark"]),
31
- size: PropTypes.oneOf(["xs", "s", "m", "l"])
32
- };
33
- WarningIcon.defaultProps = {
34
- size: "m"
102
+ size: PropTypes.oneOf(["xs", "s", "m", "l"]),
103
+ 'data-render-all-sizes': PropTypes.bool,
104
+ style: PropTypes.object
35
105
  };
36
- export { WarningIcon as default };
106
+ export { Size, WarningIcon as default };
package/lib/checkbox.js CHANGED
@@ -4,8 +4,8 @@ import { MenuItem } from '@rescui/menu';
4
4
  import { useThemeWithUndefined } from '@rescui/ui-contexts';
5
5
  import cn from 'classnames';
6
6
  import WarningIcon from './_virtual/warning.js';
7
- import CheckboxControl from './parts/checkbox-control.js';
8
7
  import { GroupContext } from './parts/group-context.js';
8
+ import CheckboxControl from './parts/checkbox-control.js';
9
9
  import styles from './parts/checkbox.p.module.css.js';
10
10
  const THEME_STYLES = {
11
11
  light: styles.themeLight,
@@ -68,7 +68,8 @@ const Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(_ref, ref) {
68
68
  "data-rs-internal": "checkbox__error-message"
69
69
  }, /*#__PURE__*/React.createElement(WarningIcon, {
70
70
  "data-rs-internal": "checkbox__error-icon",
71
- className: styles.errorIcon
71
+ className: styles.errorIcon,
72
+ "data-render-all-sizes": true
72
73
  }), /*#__PURE__*/React.createElement("span", null, error)));
73
74
  });
74
75
  Checkbox.propTypes = {
package/lib/index.css CHANGED
@@ -1,4 +1,4 @@
1
- ._icon_afka1x_4{
1
+ ._icon_oeje7x_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_afka1x_4{
11
+ ._icon_oeje7x_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_afka1x_4{
20
+ ._icon_oeje7x_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_afka1x_4{
28
+ ._icon_oeje7x_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_afka1x_14{
35
+ ._sizeXS_oeje7x_14{
36
36
  --_rs-icons-height:16px;
37
37
  }
38
- ._sizeS_afka1x_18{
38
+ ._sizeS_oeje7x_18{
39
39
  --_rs-icons-height:20px;
40
40
  }
41
- ._sizeM_afka1x_22{
41
+ ._sizeM_oeje7x_22{
42
42
  --_rs-icons-height:24px;
43
43
  }
44
- ._sizeL_afka1x_26{
44
+ ._sizeL_oeje7x_26{
45
45
  --_rs-icons-height:28px;
46
46
  }
47
- ._light_afka1x_30{
47
+ ._light_oeje7x_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_afka1x_34{
51
+ ._dark_oeje7x_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,13 +60,49 @@
60
60
  transform:rotate(360deg);
61
61
  }
62
62
  }
63
- ._themeLight_jjuuz9_8{
63
+ ._allVariants_oeje7x_48{
64
+ aspect-ratio:var(--rs-icon-ar-width, 1) / var(--rs-icon-ar-height, 1);
65
+ container:rs-icon / size;
66
+ }
67
+ ._variant16_oeje7x_53,
68
+ ._variant20_oeje7x_54,
69
+ ._variant24_oeje7x_55{
70
+ display:none;
71
+ }
72
+ ._variant28_oeje7x_58{
73
+ display:block;
74
+ }
75
+ @container rs-icon (max-height: 24px){
76
+ ._variant24_oeje7x_55{
77
+ display:block;
78
+ }
79
+ ._variant28_oeje7x_58{
80
+ display:none;
81
+ }
82
+ }
83
+ @container rs-icon (max-height: 20px){
84
+ ._variant20_oeje7x_54{
85
+ display:block;
86
+ }
87
+ ._variant24_oeje7x_55{
88
+ display:none;
89
+ }
90
+ }
91
+ @container rs-icon (max-height: 16px){
92
+ ._variant16_oeje7x_53{
93
+ display:block;
94
+ }
95
+ ._variant20_oeje7x_54{
96
+ display:none;
97
+ }
98
+ }
99
+ ._themeLight_2eky0k_8{
64
100
  --rs-theme-dark:0;
65
101
  }
66
- ._themeDark_jjuuz9_11{
102
+ ._themeDark_2eky0k_11{
67
103
  --rs-theme-dark:1;
68
104
  }
69
- ._container_jjuuz9_15{
105
+ ._container_2eky0k_15{
70
106
  --_rs-theme-dark:var(
71
107
  --_rs-internal-force-theme-dark-consult-rescui-before-using,
72
108
  var(--rs-theme-dark, 0)
@@ -76,7 +112,7 @@
76
112
  --_rs-theme-light-coefficient:calc(1 - var(--_rs-theme-dark-coefficient));
77
113
  }
78
114
  @supports (color: color-mix(in srgb, #fff 50%, #000 50%)){
79
- ._container_jjuuz9_15{
115
+ ._container_2eky0k_15{
80
116
  --_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)));
81
117
  --_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)));
82
118
  --_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)));
@@ -85,7 +121,7 @@
85
121
  }
86
122
  }
87
123
  @supports not (color: color-mix(in srgb, #fff 50%, #000 50%)){
88
- ._container_jjuuz9_15{
124
+ ._container_2eky0k_15{
89
125
  --_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);
90
126
  --_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));
91
127
  --_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));
@@ -93,7 +129,7 @@
93
129
  --_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));
94
130
  }
95
131
  }
96
- ._listSizeS_jjuuz9_20 [data-rs-internal='checkbox-list__error-message']{
132
+ ._listSizeS_2eky0k_20 [data-rs-internal='checkbox-list__error-message']{
97
133
  --_rs-typography-letter-spacing:var(--rs-h5-letter-spacing, normal);
98
134
  --_rs-typography-text-transform:initial;
99
135
  --_rs-typography-font-variant-numeric:initial;
@@ -124,10 +160,10 @@
124
160
  --_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
125
161
  --_rs-typography-link-border-bottom-width-from-text:2px;
126
162
  }
127
- ._listSizeS_jjuuz9_20 [data-rs-internal='checkbox-list__error-icon']:not(html){
163
+ ._listSizeS_2eky0k_20 [data-rs-internal='checkbox-list__error-icon']:not(html){
128
164
  --_rs-icons-height:20px;
129
165
  }
130
- ._listSizeM_jjuuz9_23 [data-rs-internal='checkbox-list__error-message']{
166
+ ._listSizeM_2eky0k_23 [data-rs-internal='checkbox-list__error-message']{
131
167
  --_rs-typography-letter-spacing:var(--rs-h5-letter-spacing, normal);
132
168
  --_rs-typography-text-transform:initial;
133
169
  --_rs-typography-font-variant-numeric:initial;
@@ -158,10 +194,10 @@
158
194
  --_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
159
195
  --_rs-typography-link-border-bottom-width-from-text:2px;
160
196
  }
161
- ._listSizeM_jjuuz9_23 [data-rs-internal='checkbox-list__error-icon']:not(html){
197
+ ._listSizeM_2eky0k_23 [data-rs-internal='checkbox-list__error-icon']:not(html){
162
198
  --_rs-icons-height:20px;
163
199
  }
164
- ._listSizeL_jjuuz9_26 [data-rs-internal='checkbox-list__error-message']{
200
+ ._listSizeL_2eky0k_26 [data-rs-internal='checkbox-list__error-message']{
165
201
  --_rs-typography-letter-spacing:var(--rs-h4-letter-spacing, normal);
166
202
  --_rs-typography-text-transform:initial;
167
203
  --_rs-typography-font-variant-numeric:initial;
@@ -192,10 +228,10 @@
192
228
  --_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
193
229
  --_rs-typography-link-border-bottom-width-from-text:2px;
194
230
  }
195
- ._listSizeL_jjuuz9_26 [data-rs-internal='checkbox-list__error-icon']:not(html){
231
+ ._listSizeL_2eky0k_26 [data-rs-internal='checkbox-list__error-icon']:not(html){
196
232
  --_rs-icons-height:24px;
197
233
  }
198
- ._checkboxSizeS_jjuuz9_30 [data-rs-internal='checkbox__error-message']{
234
+ ._checkboxSizeS_2eky0k_30 [data-rs-internal='checkbox__error-message']{
199
235
  --_rs-typography-letter-spacing:var(--rs-h5-letter-spacing, normal);
200
236
  --_rs-typography-text-transform:initial;
201
237
  --_rs-typography-font-variant-numeric:initial;
@@ -226,10 +262,10 @@
226
262
  --_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
227
263
  --_rs-typography-link-border-bottom-width-from-text:2px;
228
264
  }
229
- ._checkboxSizeS_jjuuz9_30 [data-rs-internal='checkbox__error-icon']:not(html){
265
+ ._checkboxSizeS_2eky0k_30 [data-rs-internal='checkbox__error-icon']:not(html){
230
266
  --_rs-icons-height:20px;
231
267
  }
232
- ._checkboxSizeM_jjuuz9_33 [data-rs-internal='checkbox__error-message']{
268
+ ._checkboxSizeM_2eky0k_33 [data-rs-internal='checkbox__error-message']{
233
269
  --_rs-typography-letter-spacing:var(--rs-h5-letter-spacing, normal);
234
270
  --_rs-typography-text-transform:initial;
235
271
  --_rs-typography-font-variant-numeric:initial;
@@ -260,10 +296,10 @@
260
296
  --_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
261
297
  --_rs-typography-link-border-bottom-width-from-text:2px;
262
298
  }
263
- ._checkboxSizeM_jjuuz9_33 [data-rs-internal='checkbox__error-icon']:not(html){
299
+ ._checkboxSizeM_2eky0k_33 [data-rs-internal='checkbox__error-icon']:not(html){
264
300
  --_rs-icons-height:20px;
265
301
  }
266
- ._checkboxSizeL_jjuuz9_36 [data-rs-internal='checkbox__error-message']{
302
+ ._checkboxSizeL_2eky0k_36 [data-rs-internal='checkbox__error-message']{
267
303
  --_rs-typography-letter-spacing:var(--rs-h4-letter-spacing, normal);
268
304
  --_rs-typography-text-transform:initial;
269
305
  --_rs-typography-font-variant-numeric:initial;
@@ -294,10 +330,10 @@
294
330
  --_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
295
331
  --_rs-typography-link-border-bottom-width-from-text:2px;
296
332
  }
297
- ._checkboxSizeL_jjuuz9_36 [data-rs-internal='checkbox__error-icon']:not(html){
333
+ ._checkboxSizeL_2eky0k_36 [data-rs-internal='checkbox__error-icon']:not(html){
298
334
  --_rs-icons-height:24px;
299
335
  }
300
- ._sizeS_jjuuz9_40{
336
+ ._sizeS_2eky0k_40{
301
337
  --_rs-checkbox-ci-mark-s-display:initial;
302
338
  --_rs-checkbox-ci-mark-m-display:none;
303
339
  --_rs-checkbox-ci-mark-l-display:none;
@@ -305,7 +341,7 @@
305
341
  --_rs-checkbox-ci-shadow-size:3px;
306
342
  --_rs-checkbox-ci-indeterminate-icon-border-width:6px 3px;
307
343
  }
308
- ._sizeM_jjuuz9_43{
344
+ ._sizeM_2eky0k_43{
309
345
  --_rs-checkbox-ci-mark-s-display:none;
310
346
  --_rs-checkbox-ci-mark-m-display:initial;
311
347
  --_rs-checkbox-ci-mark-l-display:none;
@@ -313,7 +349,7 @@
313
349
  --_rs-checkbox-ci-shadow-size:3px;
314
350
  --_rs-checkbox-ci-indeterminate-icon-border-width:8px 3px;
315
351
  }
316
- ._sizeL_jjuuz9_46{
352
+ ._sizeL_2eky0k_46{
317
353
  --_rs-checkbox-ci-mark-s-display:none;
318
354
  --_rs-checkbox-ci-mark-m-display:none;
319
355
  --_rs-checkbox-ci-mark-l-display:initial;
@@ -321,14 +357,14 @@
321
357
  --_rs-checkbox-ci-shadow-size:4px;
322
358
  --_rs-checkbox-ci-indeterminate-icon-border-width:9px 3px;
323
359
  }
324
- ._classic_jjuuz9_50{
360
+ ._classic_2eky0k_50{
325
361
  --_rs-checkbox-ci-mark-color:#FFFFFF;
326
362
  --_rs-checkbox-ci-indeterminate-icon-border-color:var(--_rs-color-primary);
327
363
  --_rs-checkbox-ci-indeterminate-icon-background-color:#FFFFFF;
328
364
  --_rs-checkbox-ci-checked-icon-border-color:var(--_rs-color-primary);
329
365
  --_rs-checkbox-ci-hover-icon-box-shadow:var(--_rs-color-primary-t-fog);
330
366
  }
331
- ._rock_jjuuz9_53{
367
+ ._rock_2eky0k_53{
332
368
  --_rs-checkbox-ci-mark-color:rgb(calc(255 - var(--_rs-theme-dark-coefficient, 0)*230), calc(255 - var(--_rs-theme-dark-coefficient, 0)*230), calc(255 - var(--_rs-theme-dark-coefficient, 0)*227));
333
369
  --_rs-checkbox-ci-indeterminate-icon-border-color:rgb(
334
370
  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)
@@ -344,7 +380,7 @@
344
380
  0.1
345
381
  );
346
382
  }
347
- ._checkbox_jjuuz9_30{
383
+ ._checkbox_2eky0k_30{
348
384
  --_rs-theme-dark:var(
349
385
  --_rs-internal-force-theme-dark-consult-rescui-before-using,
350
386
  var(--rs-theme-dark, 0)
@@ -354,7 +390,7 @@
354
390
  --_rs-theme-light-coefficient:calc(1 - var(--_rs-theme-dark-coefficient));
355
391
  }
356
392
  @supports (color: color-mix(in srgb, #fff 50%, #000 50%)){
357
- ._checkbox_jjuuz9_30{
393
+ ._checkbox_2eky0k_30{
358
394
  --_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)));
359
395
  --_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)));
360
396
  --_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)));
@@ -363,7 +399,7 @@
363
399
  }
364
400
  }
365
401
  @supports not (color: color-mix(in srgb, #fff 50%, #000 50%)){
366
- ._checkbox_jjuuz9_30{
402
+ ._checkbox_2eky0k_30{
367
403
  --_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);
368
404
  --_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));
369
405
  --_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));
@@ -371,7 +407,7 @@
371
407
  --_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));
372
408
  }
373
409
  }
374
- ._checkbox_jjuuz9_30 {
410
+ ._checkbox_2eky0k_30 {
375
411
 
376
412
  position:relative;
377
413
 
@@ -386,7 +422,7 @@
386
422
 
387
423
  text-align:left;
388
424
  }
389
- ._errorMessage_jjuuz9_79{
425
+ ._errorMessage_2eky0k_79{
390
426
  letter-spacing:var(
391
427
  --rs-text-base-letter-spacing,
392
428
  var(--_rs-typography-letter-spacing)
@@ -406,15 +442,15 @@
406
442
  -moz-column-gap:8px;
407
443
  column-gap:8px;
408
444
  }
409
- ._errorMessage_jjuuz9_79._list_jjuuz9_20{
445
+ ._errorMessage_2eky0k_79._list_2eky0k_20{
410
446
  margin-bottom:8px;
411
447
  }
412
- ._errorIcon_jjuuz9_93{
448
+ ._errorIcon_2eky0k_93{
413
449
  flex:0 0 auto;
414
450
 
415
451
  color:#F45C4A;
416
452
  }
417
- ._input_jjuuz9_99{
453
+ ._input_2eky0k_99{
418
454
  position:absolute;
419
455
  z-index:-1;
420
456
 
@@ -424,7 +460,7 @@
424
460
 
425
461
  border:0;
426
462
  }
427
- ._icon_jjuuz9_110{
463
+ ._icon_2eky0k_110{
428
464
  display:inline-block;
429
465
  float:left;
430
466
 
@@ -440,17 +476,17 @@
440
476
 
441
477
  transition:border-width ease-out 100ms, border-color ease-out 100ms;
442
478
  }
443
- ._enabled_jjuuz9_126 ._icon_jjuuz9_110{
479
+ ._enabled_2eky0k_126 ._icon_2eky0k_110{
444
480
  cursor:pointer;
445
481
  }
446
- ._indeterminate_jjuuz9_130 ._icon_jjuuz9_110{
482
+ ._indeterminate_2eky0k_130 ._icon_2eky0k_110{
447
483
  border-width:var(--_rs-checkbox-ci-indeterminate-icon-border-width);
448
484
  }
449
- ._input_jjuuz9_99:checked + ._icon_jjuuz9_110{
485
+ ._input_2eky0k_99:checked + ._icon_2eky0k_110{
450
486
  border-width:calc(var(--_rs-checkbox-ci-size)/2);
451
487
  }
452
- ._disabled_jjuuz9_138 ._icon_jjuuz9_110._icon_jjuuz9_110,
453
- ._input_jjuuz9_99:disabled + ._icon_jjuuz9_110{
488
+ ._disabled_2eky0k_138 ._icon_2eky0k_110._icon_2eky0k_110,
489
+ ._input_2eky0k_99:disabled + ._icon_2eky0k_110{
454
490
  border-color:rgb(calc(186 - var(--_rs-theme-dark-coefficient, 0)*92), calc(186 - var(--_rs-theme-dark-coefficient, 0)*92), calc(187 - var(--_rs-theme-dark-coefficient, 0)*91));
455
491
 
456
492
  cursor:not-allowed;
@@ -458,27 +494,27 @@
458
494
 
459
495
  background:rgb(calc(244 - var(--_rs-theme-dark-coefficient, 0)*196), calc(244 - var(--_rs-theme-dark-coefficient, 0)*196), calc(244 - var(--_rs-theme-dark-coefficient, 0)*193));
460
496
  }
461
- ._input_jjuuz9_99:hover + ._icon_jjuuz9_110,
462
- ._enabled_jjuuz9_126:hover ._icon_jjuuz9_110{
497
+ ._input_2eky0k_99:hover + ._icon_2eky0k_110,
498
+ ._enabled_2eky0k_126:hover ._icon_2eky0k_110{
463
499
  background:rgb(calc(255 - var(--_rs-theme-dark-coefficient, 0)*184), calc(255 - var(--_rs-theme-dark-coefficient, 0)*184), calc(255 - var(--_rs-theme-dark-coefficient, 0)*182));
464
500
  }
465
- ._enabled_jjuuz9_126._indeterminate_jjuuz9_130 ._icon_jjuuz9_110,
466
- ._enabled_jjuuz9_126._indeterminate_jjuuz9_130:hover ._icon_jjuuz9_110,
467
- ._enabled_jjuuz9_126._indeterminate_jjuuz9_130 ._input_jjuuz9_99:hover + ._icon_jjuuz9_110{
501
+ ._enabled_2eky0k_126._indeterminate_2eky0k_130 ._icon_2eky0k_110,
502
+ ._enabled_2eky0k_126._indeterminate_2eky0k_130:hover ._icon_2eky0k_110,
503
+ ._enabled_2eky0k_126._indeterminate_2eky0k_130 ._input_2eky0k_99:hover + ._icon_2eky0k_110{
468
504
  border-color:var(--_rs-checkbox-ci-indeterminate-icon-border-color);
469
505
 
470
506
  background-color:var(
471
507
  --_rs-checkbox-ci-indeterminate-icon-background-color
472
508
  );
473
509
  }
474
- ._enabled_jjuuz9_126 ._input_jjuuz9_99:checked + ._icon_jjuuz9_110._icon_jjuuz9_110{
510
+ ._enabled_2eky0k_126 ._input_2eky0k_99:checked + ._icon_2eky0k_110._icon_2eky0k_110{
475
511
  border-color:var(--_rs-checkbox-ci-checked-icon-border-color);
476
512
  }
477
- ._error_jjuuz9_79 ._icon_jjuuz9_110._icon_jjuuz9_110._icon_jjuuz9_110._icon_jjuuz9_110,
478
- ._input_jjuuz9_99:invalid + ._icon_jjuuz9_110._icon_jjuuz9_110._icon_jjuuz9_110{
513
+ ._error_2eky0k_79 ._icon_2eky0k_110._icon_2eky0k_110._icon_2eky0k_110._icon_2eky0k_110,
514
+ ._input_2eky0k_99:invalid + ._icon_2eky0k_110._icon_2eky0k_110._icon_2eky0k_110{
479
515
  border-color:#F45C4A;
480
516
  }
481
- ._icon_jjuuz9_110::after{
517
+ ._icon_2eky0k_110::after{
482
518
  position:absolute;
483
519
  top:var(--_rs-checkbox-ci-shadow-size);
484
520
  right:var(--_rs-checkbox-ci-shadow-size);
@@ -487,15 +523,15 @@
487
523
 
488
524
  content:'';
489
525
  }
490
- ._enabled_jjuuz9_126:hover > ._icon_jjuuz9_110::after,
491
- label:hover ._enabled_jjuuz9_126 > ._icon_jjuuz9_110::after,
492
- ._enabled_jjuuz9_126 ._input_jjuuz9_99:active + ._icon_jjuuz9_110::after{
526
+ ._enabled_2eky0k_126:hover > ._icon_2eky0k_110::after,
527
+ label:hover ._enabled_2eky0k_126 > ._icon_2eky0k_110::after,
528
+ ._enabled_2eky0k_126 ._input_2eky0k_99:active + ._icon_2eky0k_110::after{
493
529
  box-shadow:0 0 0 var(--_rs-checkbox-ci-shadow-size) var(--_rs-checkbox-ci-hover-icon-box-shadow);
494
530
  }
495
- ._enabled_jjuuz9_126 ._input_jjuuz9_99:focus[data-focus-method='key'] + ._icon_jjuuz9_110::after{
531
+ ._enabled_2eky0k_126 ._input_2eky0k_99:focus[data-focus-method='key'] + ._icon_2eky0k_110::after{
496
532
  box-shadow:0 0 0 1px rgb(calc(232 - var(--_rs-theme-dark-coefficient, 0)*184), calc(232 - var(--_rs-theme-dark-coefficient, 0)*184), calc(232 - var(--_rs-theme-dark-coefficient, 0)*181)), 0 0 0 var(--_rs-checkbox-ci-shadow-size) var(--_rs-color-primary-t-dim);
497
533
  }
498
- ._checkmark_jjuuz9_194{
534
+ ._checkmark_2eky0k_194{
499
535
  position:absolute;
500
536
  top:var(--_rs-checkbox-ci-shadow-size);
501
537
  left:var(--_rs-checkbox-ci-shadow-size);
@@ -506,22 +542,22 @@
506
542
  height:var(--_rs-checkbox-ci-size);
507
543
  fill:currentColor;
508
544
  }
509
- ._enabled_jjuuz9_126 ._checkmark_jjuuz9_194{
545
+ ._enabled_2eky0k_126 ._checkmark_2eky0k_194{
510
546
  color:var(--_rs-checkbox-ci-mark-color);
511
547
  }
512
- ._disabled_jjuuz9_138 ._checkmark_jjuuz9_194,
513
- ._input_jjuuz9_99:disabled + ._icon_jjuuz9_110 > ._checkmark_jjuuz9_194{
548
+ ._disabled_2eky0k_138 ._checkmark_2eky0k_194,
549
+ ._input_2eky0k_99:disabled + ._icon_2eky0k_110 > ._checkmark_2eky0k_194{
514
550
  color:rgb(calc(244 - var(--_rs-theme-dark-coefficient, 0)*196), calc(244 - var(--_rs-theme-dark-coefficient, 0)*196), calc(244 - var(--_rs-theme-dark-coefficient, 0)*193));
515
551
  }
516
- ._input_jjuuz9_99:checked + ._icon_jjuuz9_110 > ._checkmark_jjuuz9_194{
552
+ ._input_2eky0k_99:checked + ._icon_2eky0k_110 > ._checkmark_2eky0k_194{
517
553
  display:block;
518
554
  }
519
- ._markS_jjuuz9_219{
555
+ ._markS_2eky0k_219{
520
556
  display:var(--_rs-checkbox-ci-mark-s-display);
521
557
  }
522
- ._markM_jjuuz9_222{
558
+ ._markM_2eky0k_222{
523
559
  display:var(--_rs-checkbox-ci-mark-m-display);
524
560
  }
525
- ._markL_jjuuz9_225{
561
+ ._markL_2eky0k_225{
526
562
  display:var(--_rs-checkbox-ci-mark-l-display);
527
563
  }
@@ -53,7 +53,8 @@ const CheckboxList = _ref => {
53
53
  "data-rs-internal": "checkbox-list__error-message"
54
54
  }, /*#__PURE__*/React.createElement(WarningIcon, {
55
55
  "data-rs-internal": "checkbox-list__error-icon",
56
- className: styles.errorIcon
56
+ className: styles.errorIcon,
57
+ "data-render-all-sizes": true
57
58
  }), /*#__PURE__*/React.createElement("span", null, error)), /*#__PURE__*/React.createElement(Menu, {
58
59
  tag: 'div',
59
60
  itemTag: null,
@@ -1,31 +1,31 @@
1
1
  var styles = {
2
- "themeLight": "_themeLight_jjuuz9_8",
3
- "themeDark": "_themeDark_jjuuz9_11",
4
- "container": "_container_jjuuz9_15",
5
- "listSizeS": "_listSizeS_jjuuz9_20",
6
- "listSizeM": "_listSizeM_jjuuz9_23",
7
- "listSizeL": "_listSizeL_jjuuz9_26",
8
- "checkboxSizeS": "_checkboxSizeS_jjuuz9_30",
9
- "checkboxSizeM": "_checkboxSizeM_jjuuz9_33",
10
- "checkboxSizeL": "_checkboxSizeL_jjuuz9_36",
11
- "sizeS": "_sizeS_jjuuz9_40",
12
- "sizeM": "_sizeM_jjuuz9_43",
13
- "sizeL": "_sizeL_jjuuz9_46",
14
- "classic": "_classic_jjuuz9_50",
15
- "rock": "_rock_jjuuz9_53",
16
- "checkbox": "_checkbox_jjuuz9_30",
17
- "errorMessage": "_errorMessage_jjuuz9_79",
18
- "list": "_list_jjuuz9_20",
19
- "errorIcon": "_errorIcon_jjuuz9_93",
20
- "input": "_input_jjuuz9_99",
21
- "icon": "_icon_jjuuz9_110",
22
- "enabled": "_enabled_jjuuz9_126",
23
- "indeterminate": "_indeterminate_jjuuz9_130",
24
- "disabled": "_disabled_jjuuz9_138",
25
- "error": "_error_jjuuz9_79",
26
- "checkmark": "_checkmark_jjuuz9_194",
27
- "markS": "_markS_jjuuz9_219",
28
- "markM": "_markM_jjuuz9_222",
29
- "markL": "_markL_jjuuz9_225"
2
+ "themeLight": "_themeLight_2eky0k_8",
3
+ "themeDark": "_themeDark_2eky0k_11",
4
+ "container": "_container_2eky0k_15",
5
+ "listSizeS": "_listSizeS_2eky0k_20",
6
+ "listSizeM": "_listSizeM_2eky0k_23",
7
+ "listSizeL": "_listSizeL_2eky0k_26",
8
+ "checkboxSizeS": "_checkboxSizeS_2eky0k_30",
9
+ "checkboxSizeM": "_checkboxSizeM_2eky0k_33",
10
+ "checkboxSizeL": "_checkboxSizeL_2eky0k_36",
11
+ "sizeS": "_sizeS_2eky0k_40",
12
+ "sizeM": "_sizeM_2eky0k_43",
13
+ "sizeL": "_sizeL_2eky0k_46",
14
+ "classic": "_classic_2eky0k_50",
15
+ "rock": "_rock_2eky0k_53",
16
+ "checkbox": "_checkbox_2eky0k_30",
17
+ "errorMessage": "_errorMessage_2eky0k_79",
18
+ "list": "_list_2eky0k_20",
19
+ "errorIcon": "_errorIcon_2eky0k_93",
20
+ "input": "_input_2eky0k_99",
21
+ "icon": "_icon_2eky0k_110",
22
+ "enabled": "_enabled_2eky0k_126",
23
+ "indeterminate": "_indeterminate_2eky0k_130",
24
+ "disabled": "_disabled_2eky0k_138",
25
+ "error": "_error_2eky0k_79",
26
+ "checkmark": "_checkmark_2eky0k_194",
27
+ "markS": "_markS_2eky0k_219",
28
+ "markM": "_markM_2eky0k_222",
29
+ "markL": "_markL_2eky0k_225"
30
30
  };
31
31
  export { styles as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rescui/checkbox",
3
- "version": "0.8.11",
3
+ "version": "0.8.12",
4
4
  "description": "",
5
5
  "license": "Apache-2.0",
6
6
  "author": "JetBrains",
@@ -16,7 +16,7 @@
16
16
  },
17
17
  "dependencies": {
18
18
  "@babel/runtime-corejs3": "^7.26.0",
19
- "@rescui/menu": "^0.10.15",
19
+ "@rescui/menu": "^0.10.16",
20
20
  "classnames": "^2.2.6"
21
21
  },
22
22
  "peerDependencies": {
@@ -25,10 +25,10 @@
25
25
  "react": ">=16.8.0 <19"
26
26
  },
27
27
  "devDependencies": {
28
- "@rescui/colors": "^0.2.7",
28
+ "@rescui/colors": "^0.2.8",
29
29
  "@rescui/postcss-preset-library": "^0.2.2",
30
- "@rescui/scripts": "^0.3.5",
31
- "@rescui/typography": "^0.23.0",
30
+ "@rescui/scripts": "^0.4.0",
31
+ "@rescui/typography": "^0.23.1",
32
32
  "@rescui/visual-regression": "^0.1.2"
33
33
  },
34
34
  "scripts": {
@@ -36,5 +36,5 @@
36
36
  "build-pcss-api": "rescui-scripts build-pcss-api --file public-api.p.css"
37
37
  },
38
38
  "nx": {},
39
- "gitHead": "f9a0228790b099e343e9017980e7635c12815bda"
39
+ "gitHead": "f521c66dfa4124f1cac34821bf8531a0f9596bcc"
40
40
  }