@rescui/checkbox 0.11.5-RUI-308-Fix-select-issues-405b9fa40.12 → 0.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/checkbox.js +166 -45
- package/lib/index.css +69 -69
- package/lib/parts/checkbox-control-inner.js +168 -36
- package/lib/parts/checkbox-control.js +57 -45
- package/lib/parts/checkbox-list.js +230 -65
- package/lib/parts/checkbox-list.p.module.css.js +13 -13
- package/lib/parts/checkbox-manager.js +139 -39
- package/lib/parts/checkbox.p.module.css.js +22 -22
- package/lib/parts/group-context.js +1 -1
- package/lib/parts/marks.js +139 -35
- package/package.json +13 -12
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import _extends from '@babel/runtime-corejs3/helpers/esm/extends';
|
|
2
|
+
import { c } from 'react-compiler-runtime';
|
|
1
3
|
import React from 'react';
|
|
2
4
|
import PropTypes from 'prop-types';
|
|
3
5
|
import cn from 'classnames';
|
|
@@ -19,43 +21,173 @@ const MODE_STYLES = {
|
|
|
19
21
|
};
|
|
20
22
|
const DEFAULT_SIZE = 'm';
|
|
21
23
|
const DEFAULT_MODE = 'classic';
|
|
22
|
-
const CheckboxControlInner = /*#__PURE__*/React.forwardRef(function CheckboxControlInner(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
24
|
+
const CheckboxControlInner = /*#__PURE__*/React.forwardRef(function CheckboxControlInner(t0, ref) {
|
|
25
|
+
const $ = c(35);
|
|
26
|
+
let className;
|
|
27
|
+
let disabled;
|
|
28
|
+
let errorId;
|
|
29
|
+
let indeterminate;
|
|
30
|
+
let isError;
|
|
31
|
+
let restProps;
|
|
32
|
+
let t1;
|
|
33
|
+
let t2;
|
|
34
|
+
let t3;
|
|
35
|
+
let themeFromProps;
|
|
36
|
+
|
|
37
|
+
if ($[0] !== t0) {
|
|
38
|
+
const {
|
|
39
|
+
className: t4,
|
|
40
|
+
children,
|
|
41
|
+
theme: t5,
|
|
42
|
+
isError: t6,
|
|
43
|
+
errorId: t7,
|
|
44
|
+
disabled: t8,
|
|
45
|
+
size: t9,
|
|
46
|
+
mode: t10,
|
|
47
|
+
indeterminate: t11,
|
|
48
|
+
notUseLabelTag: t12,
|
|
49
|
+
...t13
|
|
50
|
+
} = t0;
|
|
51
|
+
className = t4;
|
|
52
|
+
themeFromProps = t5;
|
|
53
|
+
isError = t6;
|
|
54
|
+
errorId = t7;
|
|
55
|
+
disabled = t8;
|
|
56
|
+
t1 = t9;
|
|
57
|
+
t2 = t10;
|
|
58
|
+
indeterminate = t11;
|
|
59
|
+
t3 = t12;
|
|
60
|
+
restProps = t13;
|
|
61
|
+
$[0] = t0;
|
|
62
|
+
$[1] = className;
|
|
63
|
+
$[2] = disabled;
|
|
64
|
+
$[3] = errorId;
|
|
65
|
+
$[4] = indeterminate;
|
|
66
|
+
$[5] = isError;
|
|
67
|
+
$[6] = restProps;
|
|
68
|
+
$[7] = t1;
|
|
69
|
+
$[8] = t2;
|
|
70
|
+
$[9] = t3;
|
|
71
|
+
$[10] = themeFromProps;
|
|
72
|
+
} else {
|
|
73
|
+
className = $[1];
|
|
74
|
+
disabled = $[2];
|
|
75
|
+
errorId = $[3];
|
|
76
|
+
indeterminate = $[4];
|
|
77
|
+
isError = $[5];
|
|
78
|
+
restProps = $[6];
|
|
79
|
+
t1 = $[7];
|
|
80
|
+
t2 = $[8];
|
|
81
|
+
t3 = $[9];
|
|
82
|
+
themeFromProps = $[10];
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const size = t1 === undefined ? DEFAULT_SIZE : t1;
|
|
86
|
+
const mode = t2 === undefined ? DEFAULT_MODE : t2;
|
|
87
|
+
const notUseLabelTag = t3 === undefined ? false : t3;
|
|
37
88
|
const theme = useThemeWithUndefined(themeFromProps);
|
|
38
|
-
const RootTag = notUseLabelTag ?
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
89
|
+
const RootTag = notUseLabelTag ? "span" : "label";
|
|
90
|
+
const t4 = THEME_STYLES[theme];
|
|
91
|
+
const t5 = SIZE_STYLES[size] || SIZE_STYLES[DEFAULT_SIZE];
|
|
92
|
+
const t6 = MODE_STYLES[mode] || MODE_STYLES[DEFAULT_MODE];
|
|
93
|
+
const t7 = disabled ? styles.disabled : styles.enabled;
|
|
94
|
+
const t8 = indeterminate && styles.indeterminate;
|
|
95
|
+
const t9 = isError && styles.error;
|
|
96
|
+
let t10;
|
|
97
|
+
|
|
98
|
+
if ($[11] !== className || $[12] !== t4 || $[13] !== t5 || $[14] !== t6 || $[15] !== t7 || $[16] !== t8 || $[17] !== t9) {
|
|
99
|
+
t10 = cn(styles.checkbox, t4, t5, t6, t7, t8, t9, className);
|
|
100
|
+
$[11] = className;
|
|
101
|
+
$[12] = t4;
|
|
102
|
+
$[13] = t5;
|
|
103
|
+
$[14] = t6;
|
|
104
|
+
$[15] = t7;
|
|
105
|
+
$[16] = t8;
|
|
106
|
+
$[17] = t9;
|
|
107
|
+
$[18] = t10;
|
|
108
|
+
} else {
|
|
109
|
+
t10 = $[18];
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
const t11 = isError ? errorId : undefined;
|
|
113
|
+
const t12 = Boolean(isError);
|
|
114
|
+
let t13;
|
|
115
|
+
|
|
116
|
+
if ($[19] !== disabled || $[20] !== ref || $[21] !== restProps || $[22] !== t11 || $[23] !== t12) {
|
|
117
|
+
t13 = /*#__PURE__*/React.createElement("input", _extends({
|
|
118
|
+
"data-test": "checkbox-input"
|
|
119
|
+
}, restProps, {
|
|
120
|
+
ref: ref,
|
|
121
|
+
className: styles.input,
|
|
122
|
+
type: "checkbox",
|
|
123
|
+
disabled: disabled,
|
|
124
|
+
"aria-errormessage": t11,
|
|
125
|
+
"aria-invalid": t12
|
|
126
|
+
}));
|
|
127
|
+
$[19] = disabled;
|
|
128
|
+
$[20] = ref;
|
|
129
|
+
$[21] = restProps;
|
|
130
|
+
$[22] = t11;
|
|
131
|
+
$[23] = t12;
|
|
132
|
+
$[24] = t13;
|
|
133
|
+
} else {
|
|
134
|
+
t13 = $[24];
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const t14 = isError && styles.iconError;
|
|
138
|
+
let t15;
|
|
139
|
+
|
|
140
|
+
if ($[25] !== t14) {
|
|
141
|
+
t15 = cn(styles.icon, t14);
|
|
142
|
+
$[25] = t14;
|
|
143
|
+
$[26] = t15;
|
|
144
|
+
} else {
|
|
145
|
+
t15 = $[26];
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
let t16;
|
|
149
|
+
|
|
150
|
+
if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
|
|
151
|
+
t16 = /*#__PURE__*/React.createElement(Mark, {
|
|
152
|
+
className: styles.checkmark,
|
|
153
|
+
"data-test": "checkmark"
|
|
154
|
+
});
|
|
155
|
+
$[27] = t16;
|
|
156
|
+
} else {
|
|
157
|
+
t16 = $[27];
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
let t17;
|
|
161
|
+
|
|
162
|
+
if ($[28] !== t15) {
|
|
163
|
+
t17 = /*#__PURE__*/React.createElement("span", {
|
|
164
|
+
className: t15,
|
|
165
|
+
"data-test": "checkbox-icon"
|
|
166
|
+
}, t16);
|
|
167
|
+
$[28] = t15;
|
|
168
|
+
$[29] = t17;
|
|
169
|
+
} else {
|
|
170
|
+
t17 = $[29];
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
let t18;
|
|
174
|
+
|
|
175
|
+
if ($[30] !== RootTag || $[31] !== t10 || $[32] !== t13 || $[33] !== t17) {
|
|
176
|
+
t18 = /*#__PURE__*/React.createElement(RootTag, {
|
|
177
|
+
className: t10,
|
|
178
|
+
"data-test": "checkbox",
|
|
179
|
+
"data-rs-internal": "checkbox__control"
|
|
180
|
+
}, t13, t17);
|
|
181
|
+
$[30] = RootTag;
|
|
182
|
+
$[31] = t10;
|
|
183
|
+
$[32] = t13;
|
|
184
|
+
$[33] = t17;
|
|
185
|
+
$[34] = t18;
|
|
186
|
+
} else {
|
|
187
|
+
t18 = $[34];
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
return t18;
|
|
59
191
|
});
|
|
60
192
|
CheckboxControlInner.propTypes = {
|
|
61
193
|
checked: PropTypes.bool,
|
|
@@ -1,56 +1,68 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
2
|
+
import _extends from '@babel/runtime-corejs3/helpers/esm/extends';
|
|
3
|
+
import _includesInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/includes';
|
|
4
|
+
import { c } from 'react-compiler-runtime';
|
|
3
5
|
import React from 'react';
|
|
4
6
|
import { GroupContext } from './group-context.js';
|
|
5
7
|
import CheckboxControlInner from './checkbox-control-inner.js';
|
|
6
8
|
const CheckboxControl = /*#__PURE__*/React.forwardRef(function CheckboxControl(props, ref) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
inGroup,
|
|
10
|
-
handleCheckboxChange,
|
|
11
|
-
value: groupValue,
|
|
12
|
-
isError,
|
|
13
|
-
errorId,
|
|
14
|
-
theme,
|
|
15
|
-
size,
|
|
16
|
-
mode,
|
|
17
|
-
disabled
|
|
18
|
-
} = _ref;
|
|
9
|
+
const $ = c(3);
|
|
10
|
+
let t0;
|
|
19
11
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
12
|
+
if ($[0] !== props || $[1] !== ref) {
|
|
13
|
+
t0 = /*#__PURE__*/React.createElement(GroupContext.Consumer, null, t1 => {
|
|
14
|
+
const {
|
|
15
|
+
inGroup,
|
|
16
|
+
handleCheckboxChange,
|
|
17
|
+
value: groupValue,
|
|
18
|
+
isError,
|
|
19
|
+
errorId,
|
|
20
|
+
theme,
|
|
21
|
+
size,
|
|
22
|
+
mode,
|
|
23
|
+
disabled
|
|
24
|
+
} = t1;
|
|
26
25
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
26
|
+
if (!inGroup) {
|
|
27
|
+
return /*#__PURE__*/React.createElement(CheckboxControlInner, _extends({
|
|
28
|
+
ref: ref
|
|
29
|
+
}, props));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const {
|
|
33
|
+
value,
|
|
34
|
+
defaultChecked,
|
|
35
|
+
onChange,
|
|
36
|
+
checked,
|
|
37
|
+
isError: propsIsError,
|
|
38
|
+
errorId: propsErrorId,
|
|
39
|
+
disabled: propsDisabled,
|
|
40
|
+
theme: propsTheme,
|
|
41
|
+
size: propsSize,
|
|
42
|
+
mode: propsMode,
|
|
43
|
+
...restProps
|
|
44
|
+
} = props;
|
|
45
|
+
return /*#__PURE__*/React.createElement(CheckboxControlInner, _extends({
|
|
46
|
+
isError: isError || propsIsError,
|
|
47
|
+
errorId: errorId || propsErrorId,
|
|
48
|
+
value: value,
|
|
49
|
+
onChange: handleCheckboxChange,
|
|
50
|
+
checked: _includesInstanceProperty(groupValue).call(groupValue, value),
|
|
51
|
+
disabled: disabled || propsDisabled,
|
|
52
|
+
theme: theme || propsTheme,
|
|
53
|
+
size: size || propsSize,
|
|
54
|
+
mode: mode || propsMode,
|
|
55
|
+
ref: ref
|
|
56
|
+
}, restProps));
|
|
52
57
|
});
|
|
53
|
-
|
|
58
|
+
$[0] = props;
|
|
59
|
+
$[1] = ref;
|
|
60
|
+
$[2] = t0;
|
|
61
|
+
} else {
|
|
62
|
+
t0 = $[2];
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return t0;
|
|
54
66
|
});
|
|
55
67
|
CheckboxControl.propTypes = CheckboxControlInner.propTypes;
|
|
56
68
|
export { CheckboxControl as default };
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import _extends from '@babel/runtime-corejs3/helpers/esm/extends';
|
|
3
|
+
import { c } from 'react-compiler-runtime';
|
|
2
4
|
import React from 'react';
|
|
3
5
|
import PropTypes from 'prop-types';
|
|
4
6
|
import { Menu } from '@rescui/menu';
|
|
@@ -18,74 +20,237 @@ const SIZE_STYLES = {
|
|
|
18
20
|
l: styles.sizeL
|
|
19
21
|
}; // eslint-disable-next-line complexity
|
|
20
22
|
|
|
21
|
-
const CheckboxList =
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
23
|
+
const CheckboxList = t0 => {
|
|
24
|
+
const $ = c(61);
|
|
25
|
+
let children;
|
|
26
|
+
let className;
|
|
27
|
+
let defaultValue;
|
|
28
|
+
let disabled;
|
|
29
|
+
let error;
|
|
30
|
+
let id;
|
|
31
|
+
let label;
|
|
32
|
+
let mode;
|
|
33
|
+
let note;
|
|
34
|
+
let onChange;
|
|
35
|
+
let restProps;
|
|
36
|
+
let style;
|
|
37
|
+
let t1;
|
|
38
|
+
let t2;
|
|
39
|
+
let t3;
|
|
40
|
+
let themeFromProps;
|
|
41
|
+
let value;
|
|
42
|
+
|
|
43
|
+
if ($[0] !== t0) {
|
|
44
|
+
({
|
|
45
|
+
mode,
|
|
46
|
+
size: t1,
|
|
47
|
+
theme: themeFromProps,
|
|
48
|
+
disabled,
|
|
49
|
+
children,
|
|
50
|
+
onChange,
|
|
51
|
+
value,
|
|
52
|
+
defaultValue,
|
|
53
|
+
label,
|
|
54
|
+
note,
|
|
55
|
+
error,
|
|
56
|
+
reserveErrorLine: t2,
|
|
57
|
+
className,
|
|
58
|
+
id,
|
|
59
|
+
style,
|
|
60
|
+
boldLabel: t3,
|
|
61
|
+
...restProps
|
|
62
|
+
} = t0);
|
|
63
|
+
$[0] = t0;
|
|
64
|
+
$[1] = children;
|
|
65
|
+
$[2] = className;
|
|
66
|
+
$[3] = defaultValue;
|
|
67
|
+
$[4] = disabled;
|
|
68
|
+
$[5] = error;
|
|
69
|
+
$[6] = id;
|
|
70
|
+
$[7] = label;
|
|
71
|
+
$[8] = mode;
|
|
72
|
+
$[9] = note;
|
|
73
|
+
$[10] = onChange;
|
|
74
|
+
$[11] = restProps;
|
|
75
|
+
$[12] = style;
|
|
76
|
+
$[13] = t1;
|
|
77
|
+
$[14] = t2;
|
|
78
|
+
$[15] = t3;
|
|
79
|
+
$[16] = themeFromProps;
|
|
80
|
+
$[17] = value;
|
|
81
|
+
} else {
|
|
82
|
+
children = $[1];
|
|
83
|
+
className = $[2];
|
|
84
|
+
defaultValue = $[3];
|
|
85
|
+
disabled = $[4];
|
|
86
|
+
error = $[5];
|
|
87
|
+
id = $[6];
|
|
88
|
+
label = $[7];
|
|
89
|
+
mode = $[8];
|
|
90
|
+
note = $[9];
|
|
91
|
+
onChange = $[10];
|
|
92
|
+
restProps = $[11];
|
|
93
|
+
style = $[12];
|
|
94
|
+
t1 = $[13];
|
|
95
|
+
t2 = $[14];
|
|
96
|
+
t3 = $[15];
|
|
97
|
+
themeFromProps = $[16];
|
|
98
|
+
value = $[17];
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const size = t1 === undefined ? "m" : t1;
|
|
102
|
+
const reserveErrorLine = t2 === undefined ? false : t2;
|
|
103
|
+
const boldLabel = t3 === undefined ? true : t3;
|
|
41
104
|
const theme = useThemeWithUndefined(themeFromProps);
|
|
42
105
|
const uniqueId = `checkbox-list-${useSafeId()}`;
|
|
43
106
|
const errorId = `${id ? id : uniqueId}-error`;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
className
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}
|
|
107
|
+
let t4;
|
|
108
|
+
|
|
109
|
+
if ($[18] !== error || $[19] !== note || $[20] !== reserveErrorLine) {
|
|
110
|
+
t4 = Boolean(note) || shouldRenderErrorMessage(error, reserveErrorLine);
|
|
111
|
+
$[18] = error;
|
|
112
|
+
$[19] = note;
|
|
113
|
+
$[20] = reserveErrorLine;
|
|
114
|
+
$[21] = t4;
|
|
115
|
+
} else {
|
|
116
|
+
t4 = $[21];
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const hasFooter = t4;
|
|
120
|
+
const t5 = THEME_STYLES[theme];
|
|
121
|
+
const t6 = SIZE_STYLES[size] || styles.sizeM;
|
|
122
|
+
const t7 = Boolean(error) && styles.error;
|
|
123
|
+
const t8 = disabled && styles.disabled;
|
|
124
|
+
let t9;
|
|
125
|
+
|
|
126
|
+
if ($[22] !== className || $[23] !== t5 || $[24] !== t6 || $[25] !== t7 || $[26] !== t8) {
|
|
127
|
+
t9 = cn(className, styles.container, t5, t6, t7, t8);
|
|
128
|
+
$[22] = className;
|
|
129
|
+
$[23] = t5;
|
|
130
|
+
$[24] = t6;
|
|
131
|
+
$[25] = t7;
|
|
132
|
+
$[26] = t8;
|
|
133
|
+
$[27] = t9;
|
|
134
|
+
} else {
|
|
135
|
+
t9 = $[27];
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
const t10 = error ? errorId : undefined;
|
|
139
|
+
const t11 = Boolean(error);
|
|
140
|
+
let t12;
|
|
141
|
+
|
|
142
|
+
if ($[28] !== boldLabel || $[29] !== label) {
|
|
143
|
+
t12 = label && /*#__PURE__*/React.createElement("legend", {
|
|
144
|
+
className: styles.label,
|
|
145
|
+
"data-test": "checkbox-list__label",
|
|
146
|
+
"data-rs-internal": boldLabel ? "checkbox-list__bold-label" : "checkbox-list__label"
|
|
147
|
+
}, label);
|
|
148
|
+
$[28] = boldLabel;
|
|
149
|
+
$[29] = label;
|
|
150
|
+
$[30] = t12;
|
|
151
|
+
} else {
|
|
152
|
+
t12 = $[30];
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
let t13;
|
|
156
|
+
|
|
157
|
+
if ($[31] !== children || $[32] !== disabled || $[33] !== restProps || $[34] !== size || $[35] !== theme) {
|
|
158
|
+
t13 = /*#__PURE__*/React.createElement(Menu, _extends({
|
|
159
|
+
tag: "div",
|
|
160
|
+
itemTag: null,
|
|
161
|
+
size: size,
|
|
162
|
+
mode: "clear",
|
|
163
|
+
disabled: disabled,
|
|
164
|
+
"data-rs-internal": "checkbox__menu",
|
|
165
|
+
theme: theme,
|
|
166
|
+
className: styles.inner
|
|
167
|
+
}, restProps), children);
|
|
168
|
+
$[31] = children;
|
|
169
|
+
$[32] = disabled;
|
|
170
|
+
$[33] = restProps;
|
|
171
|
+
$[34] = size;
|
|
172
|
+
$[35] = theme;
|
|
173
|
+
$[36] = t13;
|
|
174
|
+
} else {
|
|
175
|
+
t13 = $[36];
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
let t14;
|
|
179
|
+
|
|
180
|
+
if ($[37] !== error || $[38] !== errorId || $[39] !== hasFooter || $[40] !== note || $[41] !== reserveErrorLine) {
|
|
181
|
+
t14 = hasFooter && /*#__PURE__*/React.createElement("div", {
|
|
182
|
+
className: styles.footer
|
|
183
|
+
}, /*#__PURE__*/React.createElement(ErrorMessage, {
|
|
184
|
+
id: errorId,
|
|
185
|
+
className: styles.errorMessage,
|
|
186
|
+
"data-test": "checkbox-list__error",
|
|
187
|
+
reserveLine: reserveErrorLine
|
|
188
|
+
}, error), note && /*#__PURE__*/React.createElement("div", {
|
|
189
|
+
className: styles.note,
|
|
190
|
+
"data-test": "checkbox-list__note",
|
|
191
|
+
"data-rs-internal": "checkbox-list__note"
|
|
192
|
+
}, note));
|
|
193
|
+
$[37] = error;
|
|
194
|
+
$[38] = errorId;
|
|
195
|
+
$[39] = hasFooter;
|
|
196
|
+
$[40] = note;
|
|
197
|
+
$[41] = reserveErrorLine;
|
|
198
|
+
$[42] = t14;
|
|
199
|
+
} else {
|
|
200
|
+
t14 = $[42];
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
let t15;
|
|
204
|
+
|
|
205
|
+
if ($[43] !== id || $[44] !== style || $[45] !== t10 || $[46] !== t11 || $[47] !== t12 || $[48] !== t13 || $[49] !== t14 || $[50] !== t9) {
|
|
206
|
+
t15 = /*#__PURE__*/React.createElement("fieldset", {
|
|
207
|
+
className: t9,
|
|
208
|
+
id: id,
|
|
209
|
+
style: style,
|
|
210
|
+
"aria-errormessage": t10,
|
|
211
|
+
"aria-invalid": t11,
|
|
212
|
+
"data-test": "checkbox-list"
|
|
213
|
+
}, t12, t13, t14);
|
|
214
|
+
$[43] = id;
|
|
215
|
+
$[44] = style;
|
|
216
|
+
$[45] = t10;
|
|
217
|
+
$[46] = t11;
|
|
218
|
+
$[47] = t12;
|
|
219
|
+
$[48] = t13;
|
|
220
|
+
$[49] = t14;
|
|
221
|
+
$[50] = t9;
|
|
222
|
+
$[51] = t15;
|
|
223
|
+
} else {
|
|
224
|
+
t15 = $[51];
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
let t16;
|
|
228
|
+
|
|
229
|
+
if ($[52] !== defaultValue || $[53] !== disabled || $[54] !== mode || $[55] !== onChange || $[56] !== size || $[57] !== t15 || $[58] !== theme || $[59] !== value) {
|
|
230
|
+
t16 = /*#__PURE__*/React.createElement(CheckboxManager, {
|
|
231
|
+
theme: theme,
|
|
232
|
+
defaultValue: defaultValue,
|
|
233
|
+
isError: false,
|
|
234
|
+
onChange: onChange,
|
|
235
|
+
value: value,
|
|
236
|
+
disabled: disabled,
|
|
237
|
+
size: size,
|
|
238
|
+
mode: mode
|
|
239
|
+
}, t15);
|
|
240
|
+
$[52] = defaultValue;
|
|
241
|
+
$[53] = disabled;
|
|
242
|
+
$[54] = mode;
|
|
243
|
+
$[55] = onChange;
|
|
244
|
+
$[56] = size;
|
|
245
|
+
$[57] = t15;
|
|
246
|
+
$[58] = theme;
|
|
247
|
+
$[59] = value;
|
|
248
|
+
$[60] = t16;
|
|
249
|
+
} else {
|
|
250
|
+
t16 = $[60];
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
return t16;
|
|
89
254
|
};
|
|
90
255
|
|
|
91
256
|
CheckboxList.propTypes = {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
var styles = {
|
|
2
|
-
"themeLight": "
|
|
3
|
-
"themeDark": "
|
|
4
|
-
"container": "
|
|
5
|
-
"sizeS": "
|
|
6
|
-
"sizeM": "
|
|
7
|
-
"sizeL": "
|
|
8
|
-
"inner": "
|
|
9
|
-
"label": "
|
|
10
|
-
"disabled": "
|
|
11
|
-
"footer": "
|
|
12
|
-
"errorMessage": "
|
|
13
|
-
"error": "
|
|
14
|
-
"note": "
|
|
2
|
+
"themeLight": "_themeLight_1kukfgr_6",
|
|
3
|
+
"themeDark": "_themeDark_1kukfgr_9",
|
|
4
|
+
"container": "_container_1kukfgr_13",
|
|
5
|
+
"sizeS": "_sizeS_1kukfgr_18",
|
|
6
|
+
"sizeM": "_sizeM_1kukfgr_21",
|
|
7
|
+
"sizeL": "_sizeL_1kukfgr_24",
|
|
8
|
+
"inner": "_inner_1kukfgr_28",
|
|
9
|
+
"label": "_label_1kukfgr_32",
|
|
10
|
+
"disabled": "_disabled_1kukfgr_39",
|
|
11
|
+
"footer": "_footer_1kukfgr_44",
|
|
12
|
+
"errorMessage": "_errorMessage_1kukfgr_49",
|
|
13
|
+
"error": "_error_1kukfgr_49",
|
|
14
|
+
"note": "_note_1kukfgr_58"
|
|
15
15
|
};
|
|
16
16
|
export { styles as default };
|