@rescui/checkbox 0.8.5 → 0.8.7

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,10 @@
1
1
  var styles = {
2
- "icon": "_icon_1g6zqe1_4",
3
- "sizeXS": "_sizeXS_1g6zqe1_14",
4
- "sizeS": "_sizeS_1g6zqe1_18",
5
- "sizeM": "_sizeM_1g6zqe1_22",
6
- "sizeL": "_sizeL_1g6zqe1_26",
7
- "light": "_light_1g6zqe1_30",
8
- "dark": "_dark_1g6zqe1_34"
2
+ "icon": "_icon_521zrc_4",
3
+ "sizeXS": "_sizeXS_521zrc_14",
4
+ "sizeS": "_sizeS_521zrc_18",
5
+ "sizeM": "_sizeM_521zrc_22",
6
+ "sizeL": "_sizeL_521zrc_26",
7
+ "light": "_light_521zrc_30",
8
+ "dark": "_dark_521zrc_34"
9
9
  };
10
10
  export { styles as default };
@@ -1,22 +1,21 @@
1
1
  import _extends from '@babel/runtime-corejs3/helpers/esm/extends';
2
- import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/esm/objectWithoutProperties';
3
2
  import React from 'react';
4
3
  import PropTypes from 'prop-types';
5
4
  import cn from 'classnames';
6
5
  import styles from './index.css.js';
7
- var _excluded = ["theme", "size", "className"];
8
- var sizeStyles = {
6
+ const sizeStyles = {
9
7
  "xs": styles.sizeXS,
10
8
  "s": styles.sizeS,
11
9
  "m": styles.sizeM,
12
10
  "l": styles.sizeL
13
11
  };
14
- var WarningIcon = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
15
- var theme = _ref.theme,
16
- size = _ref.size,
17
- className = _ref.className,
18
- props = _objectWithoutProperties(_ref, _excluded);
19
-
12
+ const WarningIcon = /*#__PURE__*/React.forwardRef((_ref, ref) => {
13
+ let {
14
+ theme,
15
+ size,
16
+ className,
17
+ ...props
18
+ } = _ref;
20
19
  return /*#__PURE__*/React.createElement("svg", _extends({
21
20
  viewBox: "0 0 24 24"
22
21
  }, props, {
package/lib/checkbox.js CHANGED
@@ -1,18 +1,3 @@
1
- import "core-js/modules/es.object.to-string.js";
2
- import "core-js/modules/web.dom-collections.for-each.js";
3
- import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
4
- import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
5
- import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
6
- import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
7
- import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
8
- import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
9
- import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
10
- var _excluded = ["children", "className", "disabled", "mode", "size", "theme", "onMouseEnter", "onMouseLeave", "onClick", "error"];
11
-
12
- function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
13
-
14
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? Object.defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
15
-
16
1
  import React, { useContext } from 'react';
17
2
  import PropTypes from 'prop-types';
18
3
  import { MenuItem } from '@rescui/menu';
@@ -22,37 +7,38 @@ import WarningIcon from './_virtual/warning.js';
22
7
  import CheckboxControl from './parts/checkbox-control.js';
23
8
  import { GroupContext } from './parts/group-context.js';
24
9
  import styles from './parts/checkbox.p.module.css.js';
25
- var THEME_STYLES = {
10
+ const THEME_STYLES = {
26
11
  light: styles.themeLight,
27
12
  dark: styles.themeDark
28
13
  };
29
- var SIZE_STYLES = {
14
+ const SIZE_STYLES = {
30
15
  s: styles.checkboxSizeS,
31
16
  m: styles.checkboxSizeM,
32
17
  l: styles.checkboxSizeL
33
18
  };
34
- var Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(_ref, ref) {
35
- var children = _ref.children,
36
- className = _ref.className,
37
- disabled = _ref.disabled,
38
- _ref$mode = _ref.mode,
39
- mode = _ref$mode === void 0 ? 'classic' : _ref$mode,
40
- _ref$size = _ref.size,
41
- propsSize = _ref$size === void 0 ? 'm' : _ref$size,
42
- themeFromProps = _ref.theme,
43
- onMouseEnter = _ref.onMouseEnter,
44
- onMouseLeave = _ref.onMouseLeave,
45
- onClick = _ref.onClick,
46
- error = _ref.error,
47
- restProps = _objectWithoutProperties(_ref, _excluded);
48
-
49
- var theme = useThemeWithUndefined(themeFromProps);
50
-
51
- var _useContext = useContext(GroupContext),
52
- inGroup = _useContext.inGroup,
53
- contextSize = _useContext.size;
54
-
55
- var size = !inGroup ? propsSize : contextSize || propsSize;
19
+ const Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(_ref, ref) {
20
+ let {
21
+ children,
22
+ className,
23
+ disabled,
24
+ mode = 'classic',
25
+ size: propsSize = 'm',
26
+ theme: themeFromProps,
27
+ // eslint-disable-next-line react/prop-types
28
+ onMouseEnter,
29
+ // eslint-disable-next-line react/prop-types
30
+ onMouseLeave,
31
+ // eslint-disable-next-line react/prop-types
32
+ onClick,
33
+ error,
34
+ ...restProps
35
+ } = _ref;
36
+ const theme = useThemeWithUndefined(themeFromProps);
37
+ const {
38
+ inGroup,
39
+ size: contextSize
40
+ } = useContext(GroupContext);
41
+ const size = !inGroup ? propsSize : contextSize || propsSize;
56
42
  return /*#__PURE__*/React.createElement("div", {
57
43
  className: cn(className, styles.container, THEME_STYLES[theme], SIZE_STYLES[size]),
58
44
  "data-rs-internal": 'checkbox'
@@ -66,15 +52,16 @@ var Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(_ref, ref) {
66
52
  onMouseLeave: onMouseLeave,
67
53
  onClick: onClick,
68
54
  tabIndex: null,
69
- icon: /*#__PURE__*/React.createElement(CheckboxControl, _objectSpread({
55
+ icon: /*#__PURE__*/React.createElement(CheckboxControl, {
70
56
  ref: ref,
71
57
  disabled: disabled,
72
58
  size: size,
73
59
  mode: mode,
74
60
  theme: theme,
75
61
  isError: Boolean(error),
76
- notUseLabelTag: true
77
- }, restProps))
62
+ notUseLabelTag: true,
63
+ ...restProps
64
+ })
78
65
  }, children), error && typeof error !== 'boolean' && /*#__PURE__*/React.createElement("div", {
79
66
  className: styles.errorMessage,
80
67
  "data-test": "checkbox-error-message",
package/lib/index.css CHANGED
@@ -1,4 +1,4 @@
1
- ._icon_1g6zqe1_4{
1
+ ._icon_521zrc_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_1g6zqe1_4{
11
+ ._icon_521zrc_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_1g6zqe1_4{
20
+ ._icon_521zrc_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,60 +25,48 @@
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_1g6zqe1_4{
28
+ ._icon_521zrc_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_1g6zqe1_14{
35
+ ._sizeXS_521zrc_14{
36
36
  --_rs-icons-height:16px;
37
37
  }
38
- ._sizeS_1g6zqe1_18{
38
+ ._sizeS_521zrc_18{
39
39
  --_rs-icons-height:20px;
40
40
  }
41
- ._sizeM_1g6zqe1_22{
41
+ ._sizeM_521zrc_22{
42
42
  --_rs-icons-height:24px;
43
43
  }
44
- ._sizeL_1g6zqe1_26{
44
+ ._sizeL_521zrc_26{
45
45
  --_rs-icons-height:28px;
46
46
  }
47
- ._light_1g6zqe1_30{
47
+ ._light_521zrc_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_1g6zqe1_34{
51
+ ._dark_521zrc_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
  }
55
- @-webkit-keyframes rs-icon-rotate{
56
- from{
57
- -webkit-transform:rotate(0deg);
58
- transform:rotate(0deg);
59
- }
60
- to{
61
- -webkit-transform:rotate(360deg);
62
- transform:rotate(360deg);
63
- }
64
- }
65
55
  @keyframes rs-icon-rotate{
66
56
  from{
67
- -webkit-transform:rotate(0deg);
68
- transform:rotate(0deg);
57
+ transform:rotate(0deg);
69
58
  }
70
59
  to{
71
- -webkit-transform:rotate(360deg);
72
- transform:rotate(360deg);
60
+ transform:rotate(360deg);
73
61
  }
74
62
  }
75
- ._themeLight_1goqy5l_8{
63
+ ._themeLight_1yy6nvc_8{
76
64
  --rs-theme-dark:0;
77
65
  }
78
- ._themeDark_1goqy5l_11{
66
+ ._themeDark_1yy6nvc_11{
79
67
  --rs-theme-dark:1;
80
68
  }
81
- ._container_1goqy5l_15{
69
+ ._container_1yy6nvc_15{
82
70
  --_rs-theme-dark:var(
83
71
  --_rs-internal-force-theme-dark-consult-rescui-before-using,
84
72
  var(--rs-theme-dark, 0)
@@ -88,7 +76,7 @@
88
76
  --_rs-theme-light-coefficient:calc(1 - var(--_rs-theme-dark-coefficient));
89
77
  }
90
78
  @supports (color: color-mix(in srgb, #fff 50%, #000 50%)){
91
- ._container_1goqy5l_15{
79
+ ._container_1yy6nvc_15{
92
80
  --_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)));
93
81
  --_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)));
94
82
  --_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)));
@@ -97,7 +85,7 @@
97
85
  }
98
86
  }
99
87
  @supports not (color: color-mix(in srgb, #fff 50%, #000 50%)){
100
- ._container_1goqy5l_15{
88
+ ._container_1yy6nvc_15{
101
89
  --_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);
102
90
  --_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));
103
91
  --_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));
@@ -105,7 +93,7 @@
105
93
  --_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));
106
94
  }
107
95
  }
108
- ._listSizeS_1goqy5l_20 [data-rs-internal='checkbox-list__error-message']{
96
+ ._listSizeS_1yy6nvc_20 [data-rs-internal='checkbox-list__error-message']{
109
97
  --_rs-typography-letter-spacing:normal;
110
98
  --_rs-typography-text-transform:initial;
111
99
  --_rs-typography-font-variant-numeric:initial;
@@ -136,10 +124,10 @@
136
124
  --_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
137
125
  --_rs-typography-link-border-bottom-width-from-text:2px;
138
126
  }
139
- ._listSizeS_1goqy5l_20 [data-rs-internal='checkbox-list__error-icon']:not(html){
127
+ ._listSizeS_1yy6nvc_20 [data-rs-internal='checkbox-list__error-icon']:not(html){
140
128
  --_rs-icons-height:20px;
141
129
  }
142
- ._listSizeM_1goqy5l_23 [data-rs-internal='checkbox-list__error-message']{
130
+ ._listSizeM_1yy6nvc_23 [data-rs-internal='checkbox-list__error-message']{
143
131
  --_rs-typography-letter-spacing:normal;
144
132
  --_rs-typography-text-transform:initial;
145
133
  --_rs-typography-font-variant-numeric:initial;
@@ -170,10 +158,10 @@
170
158
  --_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
171
159
  --_rs-typography-link-border-bottom-width-from-text:2px;
172
160
  }
173
- ._listSizeM_1goqy5l_23 [data-rs-internal='checkbox-list__error-icon']:not(html){
161
+ ._listSizeM_1yy6nvc_23 [data-rs-internal='checkbox-list__error-icon']:not(html){
174
162
  --_rs-icons-height:20px;
175
163
  }
176
- ._listSizeL_1goqy5l_26 [data-rs-internal='checkbox-list__error-message']{
164
+ ._listSizeL_1yy6nvc_26 [data-rs-internal='checkbox-list__error-message']{
177
165
  --_rs-typography-letter-spacing:normal;
178
166
  --_rs-typography-text-transform:initial;
179
167
  --_rs-typography-font-variant-numeric:initial;
@@ -204,10 +192,10 @@
204
192
  --_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
205
193
  --_rs-typography-link-border-bottom-width-from-text:2px;
206
194
  }
207
- ._listSizeL_1goqy5l_26 [data-rs-internal='checkbox-list__error-icon']:not(html){
195
+ ._listSizeL_1yy6nvc_26 [data-rs-internal='checkbox-list__error-icon']:not(html){
208
196
  --_rs-icons-height:24px;
209
197
  }
210
- ._checkboxSizeS_1goqy5l_30 [data-rs-internal='checkbox__error-message']{
198
+ ._checkboxSizeS_1yy6nvc_30 [data-rs-internal='checkbox__error-message']{
211
199
  --_rs-typography-letter-spacing:normal;
212
200
  --_rs-typography-text-transform:initial;
213
201
  --_rs-typography-font-variant-numeric:initial;
@@ -238,10 +226,10 @@
238
226
  --_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
239
227
  --_rs-typography-link-border-bottom-width-from-text:2px;
240
228
  }
241
- ._checkboxSizeS_1goqy5l_30 [data-rs-internal='checkbox__error-icon']:not(html){
229
+ ._checkboxSizeS_1yy6nvc_30 [data-rs-internal='checkbox__error-icon']:not(html){
242
230
  --_rs-icons-height:20px;
243
231
  }
244
- ._checkboxSizeM_1goqy5l_33 [data-rs-internal='checkbox__error-message']{
232
+ ._checkboxSizeM_1yy6nvc_33 [data-rs-internal='checkbox__error-message']{
245
233
  --_rs-typography-letter-spacing:normal;
246
234
  --_rs-typography-text-transform:initial;
247
235
  --_rs-typography-font-variant-numeric:initial;
@@ -272,10 +260,10 @@
272
260
  --_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
273
261
  --_rs-typography-link-border-bottom-width-from-text:2px;
274
262
  }
275
- ._checkboxSizeM_1goqy5l_33 [data-rs-internal='checkbox__error-icon']:not(html){
263
+ ._checkboxSizeM_1yy6nvc_33 [data-rs-internal='checkbox__error-icon']:not(html){
276
264
  --_rs-icons-height:20px;
277
265
  }
278
- ._checkboxSizeL_1goqy5l_36 [data-rs-internal='checkbox__error-message']{
266
+ ._checkboxSizeL_1yy6nvc_36 [data-rs-internal='checkbox__error-message']{
279
267
  --_rs-typography-letter-spacing:normal;
280
268
  --_rs-typography-text-transform:initial;
281
269
  --_rs-typography-font-variant-numeric:initial;
@@ -306,10 +294,10 @@
306
294
  --_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
307
295
  --_rs-typography-link-border-bottom-width-from-text:2px;
308
296
  }
309
- ._checkboxSizeL_1goqy5l_36 [data-rs-internal='checkbox__error-icon']:not(html){
297
+ ._checkboxSizeL_1yy6nvc_36 [data-rs-internal='checkbox__error-icon']:not(html){
310
298
  --_rs-icons-height:24px;
311
299
  }
312
- ._sizeS_1goqy5l_40{
300
+ ._sizeS_1yy6nvc_40{
313
301
  --_rs-checkbox-ci-mark-s-display:initial;
314
302
  --_rs-checkbox-ci-mark-m-display:none;
315
303
  --_rs-checkbox-ci-mark-l-display:none;
@@ -317,7 +305,7 @@
317
305
  --_rs-checkbox-ci-shadow-size:3px;
318
306
  --_rs-checkbox-ci-indeterminate-icon-border-width:6px 3px;
319
307
  }
320
- ._sizeM_1goqy5l_43{
308
+ ._sizeM_1yy6nvc_43{
321
309
  --_rs-checkbox-ci-mark-s-display:none;
322
310
  --_rs-checkbox-ci-mark-m-display:initial;
323
311
  --_rs-checkbox-ci-mark-l-display:none;
@@ -325,7 +313,7 @@
325
313
  --_rs-checkbox-ci-shadow-size:3px;
326
314
  --_rs-checkbox-ci-indeterminate-icon-border-width:8px 3px;
327
315
  }
328
- ._sizeL_1goqy5l_46{
316
+ ._sizeL_1yy6nvc_46{
329
317
  --_rs-checkbox-ci-mark-s-display:none;
330
318
  --_rs-checkbox-ci-mark-m-display:none;
331
319
  --_rs-checkbox-ci-mark-l-display:initial;
@@ -333,14 +321,14 @@
333
321
  --_rs-checkbox-ci-shadow-size:4px;
334
322
  --_rs-checkbox-ci-indeterminate-icon-border-width:9px 3px;
335
323
  }
336
- ._classic_1goqy5l_50{
324
+ ._classic_1yy6nvc_50{
337
325
  --_rs-checkbox-ci-mark-color:#FFFFFF;
338
326
  --_rs-checkbox-ci-indeterminate-icon-border-color:var(--_rs-color-primary);
339
327
  --_rs-checkbox-ci-indeterminate-icon-background-color:#FFFFFF;
340
328
  --_rs-checkbox-ci-checked-icon-border-color:var(--_rs-color-primary);
341
329
  --_rs-checkbox-ci-hover-icon-box-shadow:var(--_rs-color-primary-t-fog);
342
330
  }
343
- ._rock_1goqy5l_53{
331
+ ._rock_1yy6nvc_53{
344
332
  --_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));
345
333
  --_rs-checkbox-ci-indeterminate-icon-border-color:rgb(
346
334
  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)
@@ -356,7 +344,7 @@
356
344
  0.1
357
345
  );
358
346
  }
359
- ._checkbox_1goqy5l_30{
347
+ ._checkbox_1yy6nvc_30{
360
348
  --_rs-theme-dark:var(
361
349
  --_rs-internal-force-theme-dark-consult-rescui-before-using,
362
350
  var(--rs-theme-dark, 0)
@@ -366,7 +354,7 @@
366
354
  --_rs-theme-light-coefficient:calc(1 - var(--_rs-theme-dark-coefficient));
367
355
  }
368
356
  @supports (color: color-mix(in srgb, #fff 50%, #000 50%)){
369
- ._checkbox_1goqy5l_30{
357
+ ._checkbox_1yy6nvc_30{
370
358
  --_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)));
371
359
  --_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)));
372
360
  --_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)));
@@ -375,7 +363,7 @@
375
363
  }
376
364
  }
377
365
  @supports not (color: color-mix(in srgb, #fff 50%, #000 50%)){
378
- ._checkbox_1goqy5l_30{
366
+ ._checkbox_1yy6nvc_30{
379
367
  --_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);
380
368
  --_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));
381
369
  --_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));
@@ -383,15 +371,13 @@
383
371
  --_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));
384
372
  }
385
373
  }
386
- ._checkbox_1goqy5l_30 {
374
+ ._checkbox_1yy6nvc_30 {
387
375
 
388
376
  position:relative;
389
377
 
390
378
  display:inline-block;
391
379
 
392
- -webkit-box-sizing:border-box;
393
-
394
- box-sizing:border-box;
380
+ box-sizing:border-box;
395
381
  width:calc(var(--_rs-checkbox-ci-size) + var(--_rs-checkbox-ci-shadow-size)*2);
396
382
  height:calc(var(--_rs-checkbox-ci-size) + var(--_rs-checkbox-ci-shadow-size)*2);
397
383
  padding:var(--_rs-checkbox-ci-shadow-size);
@@ -400,7 +386,7 @@
400
386
 
401
387
  text-align:left;
402
388
  }
403
- ._errorMessage_1goqy5l_79{
389
+ ._errorMessage_1yy6nvc_79{
404
390
  letter-spacing:var(
405
391
  --rs-text-base-letter-spacing,
406
392
  var(--_rs-typography-letter-spacing)
@@ -411,33 +397,24 @@
411
397
  font-weight:var(--_rs-typography-font-weight);
412
398
  line-height:var(--_rs-typography-line-height);
413
399
  font-variant-numeric:var(--_rs-typography-font-variant-numeric);
414
- -webkit-font-feature-settings:'kern', 'liga', 'calt';
415
400
  font-feature-settings:'kern', 'liga', 'calt';
416
401
 
417
- display:-webkit-box;
418
-
419
- display:-ms-flexbox;
420
-
421
402
  display:flex;
422
- -ms-flex-wrap:nowrap;
423
- flex-wrap:nowrap;
403
+ flex-wrap:nowrap;
424
404
 
425
405
  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));
426
- -webkit-column-gap:8px;
427
- -moz-column-gap:8px;
428
- column-gap:8px;
406
+ -moz-column-gap:8px;
407
+ column-gap:8px;
429
408
  }
430
- ._errorMessage_1goqy5l_79._list_1goqy5l_20{
409
+ ._errorMessage_1yy6nvc_79._list_1yy6nvc_20{
431
410
  margin-bottom:8px;
432
411
  }
433
- ._errorIcon_1goqy5l_93{
434
- -webkit-box-flex:0;
435
- -ms-flex:0 0 auto;
436
- flex:0 0 auto;
412
+ ._errorIcon_1yy6nvc_93{
413
+ flex:0 0 auto;
437
414
 
438
415
  color:#F45C4A;
439
416
  }
440
- ._input_1goqy5l_99{
417
+ ._input_1yy6nvc_99{
441
418
  position:absolute;
442
419
  z-index:-1;
443
420
 
@@ -447,13 +424,11 @@
447
424
 
448
425
  border:0;
449
426
  }
450
- ._icon_1goqy5l_110{
427
+ ._icon_1yy6nvc_110{
451
428
  display:inline-block;
452
429
  float:left;
453
430
 
454
- -webkit-box-sizing:border-box;
455
-
456
- box-sizing:border-box;
431
+ box-sizing:border-box;
457
432
  width:var(--_rs-checkbox-ci-size);
458
433
  height:var(--_rs-checkbox-ci-size);
459
434
 
@@ -463,21 +438,19 @@
463
438
 
464
439
  background:rgb(calc(255 - var(--_rs-theme-dark-coefficient, 0)*207), calc(255 - var(--_rs-theme-dark-coefficient, 0)*207), calc(255 - var(--_rs-theme-dark-coefficient, 0)*204));
465
440
 
466
- -webkit-transition:border-width ease-out 100ms, border-color ease-out 100ms;
467
-
468
441
  transition:border-width ease-out 100ms, border-color ease-out 100ms;
469
442
  }
470
- ._enabled_1goqy5l_126 ._icon_1goqy5l_110{
443
+ ._enabled_1yy6nvc_126 ._icon_1yy6nvc_110{
471
444
  cursor:pointer;
472
445
  }
473
- ._indeterminate_1goqy5l_130 ._icon_1goqy5l_110{
446
+ ._indeterminate_1yy6nvc_130 ._icon_1yy6nvc_110{
474
447
  border-width:var(--_rs-checkbox-ci-indeterminate-icon-border-width);
475
448
  }
476
- ._input_1goqy5l_99:checked + ._icon_1goqy5l_110{
449
+ ._input_1yy6nvc_99:checked + ._icon_1yy6nvc_110{
477
450
  border-width:calc(var(--_rs-checkbox-ci-size)/2);
478
451
  }
479
- ._disabled_1goqy5l_138 ._icon_1goqy5l_110._icon_1goqy5l_110,
480
- ._input_1goqy5l_99:disabled + ._icon_1goqy5l_110{
452
+ ._disabled_1yy6nvc_138 ._icon_1yy6nvc_110._icon_1yy6nvc_110,
453
+ ._input_1yy6nvc_99:disabled + ._icon_1yy6nvc_110{
481
454
  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));
482
455
 
483
456
  cursor:not-allowed;
@@ -485,27 +458,27 @@
485
458
 
486
459
  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));
487
460
  }
488
- ._input_1goqy5l_99:hover + ._icon_1goqy5l_110,
489
- ._enabled_1goqy5l_126:hover ._icon_1goqy5l_110{
461
+ ._input_1yy6nvc_99:hover + ._icon_1yy6nvc_110,
462
+ ._enabled_1yy6nvc_126:hover ._icon_1yy6nvc_110{
490
463
  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));
491
464
  }
492
- ._enabled_1goqy5l_126._indeterminate_1goqy5l_130 ._icon_1goqy5l_110,
493
- ._enabled_1goqy5l_126._indeterminate_1goqy5l_130:hover ._icon_1goqy5l_110,
494
- ._enabled_1goqy5l_126._indeterminate_1goqy5l_130 ._input_1goqy5l_99:hover + ._icon_1goqy5l_110{
465
+ ._enabled_1yy6nvc_126._indeterminate_1yy6nvc_130 ._icon_1yy6nvc_110,
466
+ ._enabled_1yy6nvc_126._indeterminate_1yy6nvc_130:hover ._icon_1yy6nvc_110,
467
+ ._enabled_1yy6nvc_126._indeterminate_1yy6nvc_130 ._input_1yy6nvc_99:hover + ._icon_1yy6nvc_110{
495
468
  border-color:var(--_rs-checkbox-ci-indeterminate-icon-border-color);
496
469
 
497
470
  background-color:var(
498
471
  --_rs-checkbox-ci-indeterminate-icon-background-color
499
472
  );
500
473
  }
501
- ._enabled_1goqy5l_126 ._input_1goqy5l_99:checked + ._icon_1goqy5l_110._icon_1goqy5l_110{
474
+ ._enabled_1yy6nvc_126 ._input_1yy6nvc_99:checked + ._icon_1yy6nvc_110._icon_1yy6nvc_110{
502
475
  border-color:var(--_rs-checkbox-ci-checked-icon-border-color);
503
476
  }
504
- ._error_1goqy5l_79 ._icon_1goqy5l_110._icon_1goqy5l_110._icon_1goqy5l_110._icon_1goqy5l_110,
505
- ._input_1goqy5l_99:invalid + ._icon_1goqy5l_110._icon_1goqy5l_110._icon_1goqy5l_110{
477
+ ._error_1yy6nvc_79 ._icon_1yy6nvc_110._icon_1yy6nvc_110._icon_1yy6nvc_110._icon_1yy6nvc_110,
478
+ ._input_1yy6nvc_99:invalid + ._icon_1yy6nvc_110._icon_1yy6nvc_110._icon_1yy6nvc_110{
506
479
  border-color:#F45C4A;
507
480
  }
508
- ._icon_1goqy5l_110::after{
481
+ ._icon_1yy6nvc_110::after{
509
482
  position:absolute;
510
483
  top:var(--_rs-checkbox-ci-shadow-size);
511
484
  right:var(--_rs-checkbox-ci-shadow-size);
@@ -514,17 +487,15 @@
514
487
 
515
488
  content:'';
516
489
  }
517
- ._enabled_1goqy5l_126:hover > ._icon_1goqy5l_110::after,
518
- label:hover ._enabled_1goqy5l_126 > ._icon_1goqy5l_110::after,
519
- ._enabled_1goqy5l_126 ._input_1goqy5l_99:active + ._icon_1goqy5l_110::after{
520
- -webkit-box-shadow:0 0 0 var(--_rs-checkbox-ci-shadow-size) var(--_rs-checkbox-ci-hover-icon-box-shadow);
521
- box-shadow:0 0 0 var(--_rs-checkbox-ci-shadow-size) var(--_rs-checkbox-ci-hover-icon-box-shadow);
490
+ ._enabled_1yy6nvc_126:hover > ._icon_1yy6nvc_110::after,
491
+ label:hover ._enabled_1yy6nvc_126 > ._icon_1yy6nvc_110::after,
492
+ ._enabled_1yy6nvc_126 ._input_1yy6nvc_99:active + ._icon_1yy6nvc_110::after{
493
+ box-shadow:0 0 0 var(--_rs-checkbox-ci-shadow-size) var(--_rs-checkbox-ci-hover-icon-box-shadow);
522
494
  }
523
- ._enabled_1goqy5l_126 ._input_1goqy5l_99:focus[data-focus-method='key'] + ._icon_1goqy5l_110::after{
524
- -webkit-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);
525
- 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);
495
+ ._enabled_1yy6nvc_126 ._input_1yy6nvc_99:focus[data-focus-method='key'] + ._icon_1yy6nvc_110::after{
496
+ 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);
526
497
  }
527
- ._checkmark_1goqy5l_194{
498
+ ._checkmark_1yy6nvc_194{
528
499
  position:absolute;
529
500
  top:var(--_rs-checkbox-ci-shadow-size);
530
501
  left:var(--_rs-checkbox-ci-shadow-size);
@@ -535,22 +506,22 @@
535
506
  height:var(--_rs-checkbox-ci-size);
536
507
  fill:currentColor;
537
508
  }
538
- ._enabled_1goqy5l_126 ._checkmark_1goqy5l_194{
509
+ ._enabled_1yy6nvc_126 ._checkmark_1yy6nvc_194{
539
510
  color:var(--_rs-checkbox-ci-mark-color);
540
511
  }
541
- ._disabled_1goqy5l_138 ._checkmark_1goqy5l_194,
542
- ._input_1goqy5l_99:disabled + ._icon_1goqy5l_110 > ._checkmark_1goqy5l_194{
512
+ ._disabled_1yy6nvc_138 ._checkmark_1yy6nvc_194,
513
+ ._input_1yy6nvc_99:disabled + ._icon_1yy6nvc_110 > ._checkmark_1yy6nvc_194{
543
514
  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));
544
515
  }
545
- ._input_1goqy5l_99:checked + ._icon_1goqy5l_110 > ._checkmark_1goqy5l_194{
516
+ ._input_1yy6nvc_99:checked + ._icon_1yy6nvc_110 > ._checkmark_1yy6nvc_194{
546
517
  display:block;
547
518
  }
548
- ._markS_1goqy5l_219{
519
+ ._markS_1yy6nvc_219{
549
520
  display:var(--_rs-checkbox-ci-mark-s-display);
550
521
  }
551
- ._markM_1goqy5l_222{
522
+ ._markM_1yy6nvc_222{
552
523
  display:var(--_rs-checkbox-ci-mark-m-display);
553
524
  }
554
- ._markL_1goqy5l_225{
525
+ ._markL_1yy6nvc_225{
555
526
  display:var(--_rs-checkbox-ci-mark-l-display);
556
527
  }
package/lib/index.js CHANGED
@@ -8,5 +8,5 @@ export { default as CheckboxList } from './parts/checkbox-list.js';
8
8
  * @deprecated use named import instead
9
9
  */
10
10
 
11
- var DefaultCheckbox = Checkbox;
11
+ const DefaultCheckbox = Checkbox;
12
12
  export { DefaultCheckbox as default };
@@ -1,68 +1,51 @@
1
- import "core-js/modules/es.object.to-string.js";
2
- import "core-js/modules/web.dom-collections.for-each.js";
3
- import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
4
- import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
5
- import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
6
- import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
7
- import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
8
- import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
9
- import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
10
- var _excluded = ["className", "children", "theme", "isError", "disabled", "size", "mode", "indeterminate", "notUseLabelTag"];
11
-
12
- function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
13
-
14
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? Object.defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
15
-
16
1
  import React from 'react';
17
2
  import PropTypes from 'prop-types';
18
3
  import cn from 'classnames';
19
4
  import { useThemeWithUndefined } from '@rescui/ui-contexts';
20
5
  import styles from './checkbox.p.module.css.js';
21
6
  import { Mark } from './marks.js';
22
- var THEME_STYLES = {
7
+ const THEME_STYLES = {
23
8
  light: styles.themeLight,
24
9
  dark: styles.themeDark
25
10
  };
26
- var SIZE_STYLES = {
11
+ const SIZE_STYLES = {
27
12
  s: styles.sizeS,
28
13
  m: styles.sizeM,
29
14
  l: styles.sizeL
30
15
  };
31
- var MODE_STYLES = {
16
+ const MODE_STYLES = {
32
17
  classic: styles.classic,
33
18
  rock: styles.rock
34
19
  };
35
- var DEFAULT_SIZE = 'm';
36
- var DEFAULT_MODE = 'classic';
37
- var CheckboxControlInner = /*#__PURE__*/React.forwardRef(function CheckboxControlInner(_ref, ref) {
38
- var className = _ref.className,
39
- children = _ref.children,
40
- themeFromProps = _ref.theme,
41
- isError = _ref.isError,
42
- disabled = _ref.disabled,
43
- _ref$size = _ref.size,
44
- size = _ref$size === void 0 ? DEFAULT_SIZE : _ref$size,
45
- _ref$mode = _ref.mode,
46
- mode = _ref$mode === void 0 ? DEFAULT_MODE : _ref$mode,
47
- indeterminate = _ref.indeterminate,
48
- _ref$notUseLabelTag = _ref.notUseLabelTag,
49
- notUseLabelTag = _ref$notUseLabelTag === void 0 ? false : _ref$notUseLabelTag,
50
- restProps = _objectWithoutProperties(_ref, _excluded);
51
-
52
- var theme = useThemeWithUndefined(themeFromProps);
53
- var RootTag = notUseLabelTag ? 'span' : 'label';
20
+ const DEFAULT_SIZE = 'm';
21
+ const DEFAULT_MODE = 'classic';
22
+ const CheckboxControlInner = /*#__PURE__*/React.forwardRef(function CheckboxControlInner(_ref, ref) {
23
+ let {
24
+ className,
25
+ children,
26
+ theme: themeFromProps,
27
+ isError,
28
+ disabled,
29
+ size = DEFAULT_SIZE,
30
+ mode = DEFAULT_MODE,
31
+ indeterminate,
32
+ notUseLabelTag = false,
33
+ ...restProps
34
+ } = _ref;
35
+ const theme = useThemeWithUndefined(themeFromProps);
36
+ const RootTag = notUseLabelTag ? 'span' : 'label';
54
37
  return /*#__PURE__*/React.createElement(RootTag, {
55
38
  className: cn(styles.checkbox, THEME_STYLES[theme], SIZE_STYLES[size] || SIZE_STYLES[DEFAULT_SIZE], MODE_STYLES[mode] || MODE_STYLES[DEFAULT_MODE], disabled ? styles.disabled : styles.enabled, indeterminate && styles.indeterminate, isError && styles.error, className),
56
39
  "data-test": "checkbox",
57
40
  "data-rs-internal": "checkbox__control"
58
- }, /*#__PURE__*/React.createElement("input", _objectSpread(_objectSpread({
59
- "data-test": "checkbox-input"
60
- }, restProps), {}, {
41
+ }, /*#__PURE__*/React.createElement("input", {
42
+ "data-test": "checkbox-input",
43
+ ...restProps,
61
44
  ref: ref,
62
45
  className: styles.input,
63
46
  type: "checkbox",
64
47
  disabled: disabled
65
- })), /*#__PURE__*/React.createElement("span", {
48
+ }), /*#__PURE__*/React.createElement("span", {
66
49
  className: cn(styles.icon, isError && styles.iconError),
67
50
  "data-test": 'checkbox-icon'
68
51
  }, /*#__PURE__*/React.createElement(Mark, {
@@ -1,51 +1,40 @@
1
- import "core-js/modules/es.object.to-string.js";
2
- import "core-js/modules/web.dom-collections.for-each.js";
3
- import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
4
- import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
5
- import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
6
- import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
7
- import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
8
- import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
9
- import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
10
- var _excluded = ["value", "defaultChecked", "onChange", "checked", "isError", "disabled", "theme", "size", "mode"];
11
1
  import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
12
-
13
- function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
14
-
15
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? Object.defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
16
-
17
2
  import React from 'react';
18
3
  import { GroupContext } from './group-context.js';
19
4
  import CheckboxControlInner from './checkbox-control-inner.js';
20
- var CheckboxControl = /*#__PURE__*/React.forwardRef(function CheckboxControl(props, ref) {
21
- return /*#__PURE__*/React.createElement(GroupContext.Consumer, null, function (_ref) {
22
- var inGroup = _ref.inGroup,
23
- handleCheckboxChange = _ref.handleCheckboxChange,
24
- groupValue = _ref.value,
25
- isError = _ref.isError,
26
- theme = _ref.theme,
27
- size = _ref.size,
28
- mode = _ref.mode,
29
- disabled = _ref.disabled;
5
+ const CheckboxControl = /*#__PURE__*/React.forwardRef(function CheckboxControl(props, ref) {
6
+ return /*#__PURE__*/React.createElement(GroupContext.Consumer, null, _ref => {
7
+ let {
8
+ inGroup,
9
+ handleCheckboxChange,
10
+ value: groupValue,
11
+ isError,
12
+ theme,
13
+ size,
14
+ mode,
15
+ disabled
16
+ } = _ref;
30
17
 
31
18
  if (!inGroup) {
32
- return /*#__PURE__*/React.createElement(CheckboxControlInner, _objectSpread({
33
- ref: ref
34
- }, props));
19
+ return /*#__PURE__*/React.createElement(CheckboxControlInner, {
20
+ ref: ref,
21
+ ...props
22
+ });
35
23
  }
36
24
 
37
- var value = props.value,
38
- defaultChecked = props.defaultChecked,
39
- onChange = props.onChange,
40
- checked = props.checked,
41
- propsIsError = props.isError,
42
- propsDisabled = props.disabled,
43
- propsTheme = props.theme,
44
- propsSize = props.size,
45
- propsMode = props.mode,
46
- restProps = _objectWithoutProperties(props, _excluded);
47
-
48
- return /*#__PURE__*/React.createElement(CheckboxControlInner, _objectSpread({
25
+ const {
26
+ value,
27
+ defaultChecked,
28
+ onChange,
29
+ checked,
30
+ isError: propsIsError,
31
+ disabled: propsDisabled,
32
+ theme: propsTheme,
33
+ size: propsSize,
34
+ mode: propsMode,
35
+ ...restProps
36
+ } = props;
37
+ return /*#__PURE__*/React.createElement(CheckboxControlInner, {
49
38
  isError: isError || propsIsError,
50
39
  value: value,
51
40
  onChange: handleCheckboxChange,
@@ -54,8 +43,9 @@ var CheckboxControl = /*#__PURE__*/React.forwardRef(function CheckboxControl(pro
54
43
  theme: theme || propsTheme,
55
44
  size: size || propsSize,
56
45
  mode: mode || propsMode,
57
- ref: ref
58
- }, restProps));
46
+ ref: ref,
47
+ ...restProps
48
+ });
59
49
  });
60
50
  });
61
51
  CheckboxControl.propTypes = CheckboxControlInner.propTypes;
@@ -1,18 +1,3 @@
1
- import "core-js/modules/es.object.to-string.js";
2
- import "core-js/modules/web.dom-collections.for-each.js";
3
- import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
4
- import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
5
- import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
6
- import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
7
- import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
8
- import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
9
- import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
10
- var _excluded = ["mode", "size", "theme", "disabled", "children", "onChange", "value", "defaultValue", "error", "className", "style"];
11
-
12
- function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
13
-
14
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? Object.defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
15
-
16
1
  import React from 'react';
17
2
  import PropTypes from 'prop-types';
18
3
  import { Menu } from '@rescui/menu';
@@ -21,32 +6,33 @@ import { useThemeWithUndefined } from '@rescui/ui-contexts';
21
6
  import WarningIcon from '../_virtual/warning.js';
22
7
  import styles from './checkbox.p.module.css.js';
23
8
  import CheckboxManager from './checkbox-manager.js';
24
- var THEME_STYLES = {
9
+ const THEME_STYLES = {
25
10
  light: styles.themeLight,
26
11
  dark: styles.themeDark
27
12
  };
28
- var SIZE_STYLES = {
13
+ const SIZE_STYLES = {
29
14
  s: styles.listSizeS,
30
15
  m: styles.listSizeM,
31
16
  l: styles.listSizeL
32
17
  };
33
18
 
34
- var CheckboxList = function CheckboxList(_ref) {
35
- var mode = _ref.mode,
36
- _ref$size = _ref.size,
37
- size = _ref$size === void 0 ? 'm' : _ref$size,
38
- themeFromProps = _ref.theme,
39
- disabled = _ref.disabled,
40
- children = _ref.children,
41
- onChange = _ref.onChange,
42
- value = _ref.value,
43
- defaultValue = _ref.defaultValue,
44
- error = _ref.error,
45
- className = _ref.className,
46
- style = _ref.style,
47
- restProps = _objectWithoutProperties(_ref, _excluded);
48
-
49
- var theme = useThemeWithUndefined(themeFromProps);
19
+ const CheckboxList = _ref => {
20
+ let {
21
+ mode,
22
+ size = 'm',
23
+ theme: themeFromProps,
24
+ disabled,
25
+ children,
26
+ onChange,
27
+ value,
28
+ defaultValue,
29
+ error,
30
+ className,
31
+ // eslint-disable-next-line react/prop-types
32
+ style,
33
+ ...restProps
34
+ } = _ref;
35
+ const theme = useThemeWithUndefined(themeFromProps);
50
36
  return /*#__PURE__*/React.createElement(CheckboxManager, {
51
37
  theme: theme,
52
38
  defaultValue: defaultValue,
@@ -68,15 +54,16 @@ var CheckboxList = function CheckboxList(_ref) {
68
54
  }, /*#__PURE__*/React.createElement(WarningIcon, {
69
55
  "data-rs-internal": "checkbox-list__error-icon",
70
56
  className: styles.errorIcon
71
- }), /*#__PURE__*/React.createElement("span", null, error)), /*#__PURE__*/React.createElement(Menu, _objectSpread({
57
+ }), /*#__PURE__*/React.createElement("span", null, error)), /*#__PURE__*/React.createElement(Menu, {
72
58
  tag: 'div',
73
59
  itemTag: null,
74
60
  size: size,
75
61
  mode: 'clear',
76
62
  disabled: disabled,
77
63
  "data-rs-internal": 'checkbox__menu',
78
- theme: theme
79
- }, restProps), children)));
64
+ theme: theme,
65
+ ...restProps
66
+ }, children)));
80
67
  };
81
68
 
82
69
  CheckboxList.propTypes = {
@@ -1,58 +1,44 @@
1
- import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
2
- import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
3
- import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
4
1
  import React, { useState, useRef, useEffect, useCallback } from 'react';
5
2
  import PropTypes from 'prop-types';
6
3
  import { GroupContext } from './group-context.js';
7
4
 
8
- var CheckboxManager = function CheckboxManager(_ref) {
9
- var onChange = _ref.onChange,
10
- valueFromProps = _ref.value,
11
- defaultValue = _ref.defaultValue,
12
- isError = _ref.isError,
13
- theme = _ref.theme,
14
- size = _ref.size,
15
- disabled = _ref.disabled,
16
- mode = _ref.mode,
17
- children = _ref.children;
18
- var isControlled = typeof valueFromProps !== 'undefined';
19
-
20
- var _useState = useState(defaultValue || []),
21
- _useState2 = _slicedToArray(_useState, 2),
22
- value = _useState2[0],
23
- setValue = _useState2[1];
24
-
25
- var prevValue = useRef(value);
26
- useEffect(function () {
5
+ const CheckboxManager = _ref => {
6
+ let {
7
+ onChange,
8
+ value: valueFromProps,
9
+ defaultValue,
10
+ isError,
11
+ theme,
12
+ size,
13
+ disabled,
14
+ mode,
15
+ children
16
+ } = _ref;
17
+ const isControlled = typeof valueFromProps !== 'undefined';
18
+ const [value, setValue] = useState(defaultValue || []);
19
+ const prevValue = useRef(value);
20
+ useEffect(() => {
27
21
  // in controlled mode the onChange is already called
28
22
  if (!isControlled && onChange && prevValue.current !== value) {
29
23
  onChange(value);
30
24
  prevValue.current = value;
31
25
  }
32
26
  }, [isControlled, onChange, value]);
33
- var addToValue = useCallback(function (val) {
27
+ const addToValue = useCallback(val => {
34
28
  if (!isControlled) {
35
- setValue(function (prevVal) {
36
- return _concatInstanceProperty(prevVal).call(prevVal, val);
37
- });
29
+ setValue(prevVal => prevVal.concat(val));
38
30
  } else if (onChange) {
39
- onChange(_concatInstanceProperty(valueFromProps).call(valueFromProps, val));
31
+ onChange(valueFromProps.concat(val));
40
32
  }
41
33
  }, [onChange, isControlled, valueFromProps]);
42
- var removeFromValue = useCallback(function (val) {
34
+ const removeFromValue = useCallback(val => {
43
35
  if (!isControlled) {
44
- setValue(function (prevVal) {
45
- return _filterInstanceProperty(prevVal).call(prevVal, function (v) {
46
- return v !== val;
47
- });
48
- });
36
+ setValue(prevVal => prevVal.filter(v => v !== val));
49
37
  } else if (onChange) {
50
- onChange(_filterInstanceProperty(valueFromProps).call(valueFromProps, function (v) {
51
- return v !== val;
52
- }));
38
+ onChange(valueFromProps.filter(v => v !== val));
53
39
  }
54
40
  }, [onChange, isControlled, valueFromProps]);
55
- var handleCheckboxChange = useCallback(function (e) {
41
+ const handleCheckboxChange = useCallback(e => {
56
42
  if (e.target.checked) {
57
43
  addToValue(e.target.value);
58
44
  } else {
@@ -62,14 +48,14 @@ var CheckboxManager = function CheckboxManager(_ref) {
62
48
  return /*#__PURE__*/React.createElement(GroupContext.Provider, {
63
49
  value: {
64
50
  value: isControlled ? valueFromProps : value,
65
- addToValue: addToValue,
66
- removeFromValue: removeFromValue,
67
- handleCheckboxChange: handleCheckboxChange,
68
- isError: isError,
69
- theme: theme,
70
- disabled: disabled,
71
- size: size,
72
- mode: mode,
51
+ addToValue,
52
+ removeFromValue,
53
+ handleCheckboxChange,
54
+ isError,
55
+ theme,
56
+ disabled,
57
+ size,
58
+ mode,
73
59
  inGroup: true
74
60
  }
75
61
  }, children);
@@ -1,31 +1,31 @@
1
1
  var styles = {
2
- "themeLight": "_themeLight_1goqy5l_8",
3
- "themeDark": "_themeDark_1goqy5l_11",
4
- "container": "_container_1goqy5l_15",
5
- "listSizeS": "_listSizeS_1goqy5l_20",
6
- "listSizeM": "_listSizeM_1goqy5l_23",
7
- "listSizeL": "_listSizeL_1goqy5l_26",
8
- "checkboxSizeS": "_checkboxSizeS_1goqy5l_30",
9
- "checkboxSizeM": "_checkboxSizeM_1goqy5l_33",
10
- "checkboxSizeL": "_checkboxSizeL_1goqy5l_36",
11
- "sizeS": "_sizeS_1goqy5l_40",
12
- "sizeM": "_sizeM_1goqy5l_43",
13
- "sizeL": "_sizeL_1goqy5l_46",
14
- "classic": "_classic_1goqy5l_50",
15
- "rock": "_rock_1goqy5l_53",
16
- "checkbox": "_checkbox_1goqy5l_30",
17
- "errorMessage": "_errorMessage_1goqy5l_79",
18
- "list": "_list_1goqy5l_20",
19
- "errorIcon": "_errorIcon_1goqy5l_93",
20
- "input": "_input_1goqy5l_99",
21
- "icon": "_icon_1goqy5l_110",
22
- "enabled": "_enabled_1goqy5l_126",
23
- "indeterminate": "_indeterminate_1goqy5l_130",
24
- "disabled": "_disabled_1goqy5l_138",
25
- "error": "_error_1goqy5l_79",
26
- "checkmark": "_checkmark_1goqy5l_194",
27
- "markS": "_markS_1goqy5l_219",
28
- "markM": "_markM_1goqy5l_222",
29
- "markL": "_markL_1goqy5l_225"
2
+ "themeLight": "_themeLight_1yy6nvc_8",
3
+ "themeDark": "_themeDark_1yy6nvc_11",
4
+ "container": "_container_1yy6nvc_15",
5
+ "listSizeS": "_listSizeS_1yy6nvc_20",
6
+ "listSizeM": "_listSizeM_1yy6nvc_23",
7
+ "listSizeL": "_listSizeL_1yy6nvc_26",
8
+ "checkboxSizeS": "_checkboxSizeS_1yy6nvc_30",
9
+ "checkboxSizeM": "_checkboxSizeM_1yy6nvc_33",
10
+ "checkboxSizeL": "_checkboxSizeL_1yy6nvc_36",
11
+ "sizeS": "_sizeS_1yy6nvc_40",
12
+ "sizeM": "_sizeM_1yy6nvc_43",
13
+ "sizeL": "_sizeL_1yy6nvc_46",
14
+ "classic": "_classic_1yy6nvc_50",
15
+ "rock": "_rock_1yy6nvc_53",
16
+ "checkbox": "_checkbox_1yy6nvc_30",
17
+ "errorMessage": "_errorMessage_1yy6nvc_79",
18
+ "list": "_list_1yy6nvc_20",
19
+ "errorIcon": "_errorIcon_1yy6nvc_93",
20
+ "input": "_input_1yy6nvc_99",
21
+ "icon": "_icon_1yy6nvc_110",
22
+ "enabled": "_enabled_1yy6nvc_126",
23
+ "indeterminate": "_indeterminate_1yy6nvc_130",
24
+ "disabled": "_disabled_1yy6nvc_138",
25
+ "error": "_error_1yy6nvc_79",
26
+ "checkmark": "_checkmark_1yy6nvc_194",
27
+ "markS": "_markS_1yy6nvc_219",
28
+ "markM": "_markM_1yy6nvc_222",
29
+ "markL": "_markL_1yy6nvc_225"
30
30
  };
31
31
  export { styles as default };
@@ -1,8 +1,8 @@
1
1
  import { createContext } from 'react'; // eslint-disable-next-line @typescript-eslint/no-empty-function
2
2
 
3
- var noop = function noop() {};
3
+ const noop = () => {};
4
4
 
5
- var GroupContext = /*#__PURE__*/createContext({
5
+ const GroupContext = /*#__PURE__*/createContext({
6
6
  value: [],
7
7
  addToValue: noop,
8
8
  removeFromValue: noop,
@@ -1,57 +1,40 @@
1
- import "core-js/modules/es.object.to-string.js";
2
- import "core-js/modules/web.dom-collections.for-each.js";
3
- import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
4
- import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
5
- import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
6
- import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
7
- import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
8
- import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
9
-
10
- function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
11
-
12
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? Object.defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
13
-
14
1
  import React from 'react';
15
2
  import styles from './checkbox.p.module.css.js';
16
3
 
17
- var MarkS = function MarkS(props) {
18
- return /*#__PURE__*/React.createElement("svg", _objectSpread({
19
- xmlns: "http://www.w3.org/2000/svg",
20
- viewBox: "0 0 14 14"
21
- }, props), /*#__PURE__*/React.createElement("path", {
22
- d: "M11.707 5.207L6 10.914 2.293 7.207l1.414-1.414L6 8.086l4.293-4.293 1.414 1.414z"
23
- }));
24
- };
25
-
26
- var MarkM = function MarkM(props) {
27
- return /*#__PURE__*/React.createElement("svg", _objectSpread({
28
- xmlns: "http://www.w3.org/2000/svg",
29
- viewBox: "0 0 18 18"
30
- }, props), /*#__PURE__*/React.createElement("path", {
31
- d: "M15.69 5.724l-8.053 7.662-4.332-4.192 1.39-1.437 2.953 2.857 6.663-6.338 1.378 1.448z"
32
- }));
33
- };
34
-
35
- var MarkL = function MarkL(props) {
36
- return /*#__PURE__*/React.createElement("svg", _objectSpread({
37
- xmlns: "http://www.w3.org/2000/svg",
38
- viewBox: "0 0 20 20"
39
- }, props), /*#__PURE__*/React.createElement("path", {
40
- d: "M17.717 5.447L7.63 15.815 2.277 10.22l1.446-1.382 3.919 4.097 8.641-8.882 1.434 1.394z"
41
- }));
42
- };
43
-
44
- var Mark = function Mark(props) {
45
- return /*#__PURE__*/React.createElement("svg", _objectSpread({
46
- xmlns: "http://www.w3.org/2000/svg",
47
- viewBox: "0 0 24 24"
48
- }, props), /*#__PURE__*/React.createElement("g", {
49
- className: styles.markS
50
- }, /*#__PURE__*/React.createElement(MarkS, null)), /*#__PURE__*/React.createElement("g", {
51
- className: styles.markM
52
- }, /*#__PURE__*/React.createElement(MarkM, null)), /*#__PURE__*/React.createElement("g", {
53
- className: styles.markL
54
- }, /*#__PURE__*/React.createElement(MarkL, null)));
55
- };
4
+ const MarkS = props => /*#__PURE__*/React.createElement("svg", {
5
+ xmlns: "http://www.w3.org/2000/svg",
6
+ viewBox: "0 0 14 14",
7
+ ...props
8
+ }, /*#__PURE__*/React.createElement("path", {
9
+ d: "M11.707 5.207L6 10.914 2.293 7.207l1.414-1.414L6 8.086l4.293-4.293 1.414 1.414z"
10
+ }));
11
+
12
+ const MarkM = props => /*#__PURE__*/React.createElement("svg", {
13
+ xmlns: "http://www.w3.org/2000/svg",
14
+ viewBox: "0 0 18 18",
15
+ ...props
16
+ }, /*#__PURE__*/React.createElement("path", {
17
+ d: "M15.69 5.724l-8.053 7.662-4.332-4.192 1.39-1.437 2.953 2.857 6.663-6.338 1.378 1.448z"
18
+ }));
19
+
20
+ const MarkL = props => /*#__PURE__*/React.createElement("svg", {
21
+ xmlns: "http://www.w3.org/2000/svg",
22
+ viewBox: "0 0 20 20",
23
+ ...props
24
+ }, /*#__PURE__*/React.createElement("path", {
25
+ d: "M17.717 5.447L7.63 15.815 2.277 10.22l1.446-1.382 3.919 4.097 8.641-8.882 1.434 1.394z"
26
+ }));
27
+
28
+ const Mark = props => /*#__PURE__*/React.createElement("svg", {
29
+ xmlns: "http://www.w3.org/2000/svg",
30
+ viewBox: "0 0 24 24",
31
+ ...props
32
+ }, /*#__PURE__*/React.createElement("g", {
33
+ className: styles.markS
34
+ }, /*#__PURE__*/React.createElement(MarkS, null)), /*#__PURE__*/React.createElement("g", {
35
+ className: styles.markM
36
+ }, /*#__PURE__*/React.createElement(MarkM, null)), /*#__PURE__*/React.createElement("g", {
37
+ className: styles.markL
38
+ }, /*#__PURE__*/React.createElement(MarkL, null)));
56
39
 
57
40
  export { Mark, MarkL, MarkM, MarkS };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rescui/checkbox",
3
- "version": "0.8.5",
3
+ "version": "0.8.7",
4
4
  "description": "",
5
5
  "license": "Apache-2.0",
6
6
  "author": "JetBrains",
@@ -14,10 +14,9 @@
14
14
  "access": "public"
15
15
  },
16
16
  "dependencies": {
17
- "@babel/runtime-corejs3": "^7.14.0",
18
- "@rescui/menu": "^0.10.9",
19
- "classnames": "^2.2.6",
20
- "core-js": "^3.9.1"
17
+ "@babel/runtime-corejs3": "^7.26.0",
18
+ "@rescui/menu": "^0.10.11",
19
+ "classnames": "^2.2.6"
21
20
  },
22
21
  "peerDependencies": {
23
22
  "@rescui/ui-contexts": "^0.5.0",
@@ -25,10 +24,10 @@
25
24
  "react": ">=16.8.0 <19"
26
25
  },
27
26
  "devDependencies": {
28
- "@rescui/colors": "^0.2.5",
27
+ "@rescui/colors": "^0.2.6",
29
28
  "@rescui/postcss-preset-library": "^0.2.2",
30
- "@rescui/scripts": "^0.3.4",
31
- "@rescui/typography": "^0.19.0",
29
+ "@rescui/scripts": "^0.3.5",
30
+ "@rescui/typography": "^0.20.0",
32
31
  "@rescui/visual-regression": "^0.1.2"
33
32
  },
34
33
  "scripts": {
@@ -36,5 +35,5 @@
36
35
  "build-pcss-api": "rescui-scripts build-pcss-api --file public-api.p.css"
37
36
  },
38
37
  "nx": {},
39
- "gitHead": "69a84812628809943698f0b27643c83dc449f119"
38
+ "gitHead": "5531e3d285d6e38bf5536ff0690a252f1308c49b"
40
39
  }