@rescui/checkbox 0.10.2 → 0.11.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.d.ts +43 -43
- package/lib/index.css +70 -70
- package/lib/index.d.ts +13 -14
- package/lib/index.js +2 -2
- package/lib/parts/checkbox-control-inner.d.ts +36 -36
- package/lib/parts/checkbox-control.d.ts +4 -4
- package/lib/parts/checkbox-list.d.ts +28 -28
- package/lib/parts/checkbox-list.p.module.css.js +13 -13
- package/lib/parts/checkbox-manager.d.ts +15 -15
- package/lib/parts/checkbox.p.module.css.js +22 -22
- package/lib/parts/group-context.d.ts +17 -17
- package/lib/parts/marks.d.ts +9 -9
- package/lib/parts/use-backward-compatible-id.d.ts +4 -4
- package/package.json +7 -7
package/lib/checkbox.d.ts
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Theme } from '@rescui/ui-contexts';
|
|
3
|
-
import type { CheckboxMode, CheckboxSize } from './parts/checkbox-control-inner';
|
|
4
|
-
export
|
|
5
|
-
className?: string;
|
|
6
|
-
id?: string;
|
|
7
|
-
/** Checked state. `onChange` callback is required. */
|
|
8
|
-
checked?: boolean;
|
|
9
|
-
/** Node or text to show near the input */
|
|
10
|
-
children?: React.ReactNode;
|
|
11
|
-
/** Is checkbox initially checked */
|
|
12
|
-
defaultChecked?: boolean;
|
|
13
|
-
/** Input name attribute */
|
|
14
|
-
name?: string;
|
|
15
|
-
/** Appearance theme */
|
|
16
|
-
theme?: Theme;
|
|
17
|
-
/** Disabled state */
|
|
18
|
-
disabled?: boolean;
|
|
19
|
-
/** Error state */
|
|
20
|
-
error?: boolean | React.ReactNode;
|
|
21
|
-
/**
|
|
22
|
-
* If `true`, there will be reserved a space for a 1-line error message. Subsequent lines will be placed below normally.
|
|
23
|
-
* If `false`, there will be no reservation.
|
|
24
|
-
*/
|
|
25
|
-
reserveErrorLine?: boolean;
|
|
26
|
-
/** Value of the checkbox */
|
|
27
|
-
value?: string;
|
|
28
|
-
/** Change value callback. `event => ...` */
|
|
29
|
-
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
30
|
-
/** Focus input callback */
|
|
31
|
-
onFocus?: React.FocusEventHandler<HTMLInputElement>;
|
|
32
|
-
/** Blur input callback */
|
|
33
|
-
onBlur?: React.FocusEventHandler<HTMLInputElement>;
|
|
34
|
-
/** Indeterminate state */
|
|
35
|
-
indeterminate?: boolean;
|
|
36
|
-
mode?: CheckboxMode;
|
|
37
|
-
size?: CheckboxSize;
|
|
38
|
-
onMouseEnter?: React.MouseEventHandler<HTMLElement>;
|
|
39
|
-
onMouseLeave?: React.MouseEventHandler<HTMLElement>;
|
|
40
|
-
onClick?: React.MouseEventHandler<HTMLElement>;
|
|
41
|
-
};
|
|
42
|
-
export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
|
|
43
|
-
export default Checkbox;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Theme } from '@rescui/ui-contexts';
|
|
3
|
+
import type { CheckboxMode, CheckboxSize } from './parts/checkbox-control-inner';
|
|
4
|
+
export type CheckboxProps = {
|
|
5
|
+
className?: string;
|
|
6
|
+
id?: string;
|
|
7
|
+
/** Checked state. `onChange` callback is required. */
|
|
8
|
+
checked?: boolean;
|
|
9
|
+
/** Node or text to show near the input */
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
/** Is checkbox initially checked */
|
|
12
|
+
defaultChecked?: boolean;
|
|
13
|
+
/** Input name attribute */
|
|
14
|
+
name?: string;
|
|
15
|
+
/** Appearance theme */
|
|
16
|
+
theme?: Theme;
|
|
17
|
+
/** Disabled state */
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
/** Error state */
|
|
20
|
+
error?: boolean | React.ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* If `true`, there will be reserved a space for a 1-line error message. Subsequent lines will be placed below normally.
|
|
23
|
+
* If `false`, there will be no reservation.
|
|
24
|
+
*/
|
|
25
|
+
reserveErrorLine?: boolean;
|
|
26
|
+
/** Value of the checkbox */
|
|
27
|
+
value?: string;
|
|
28
|
+
/** Change value callback. `event => ...` */
|
|
29
|
+
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
30
|
+
/** Focus input callback */
|
|
31
|
+
onFocus?: React.FocusEventHandler<HTMLInputElement>;
|
|
32
|
+
/** Blur input callback */
|
|
33
|
+
onBlur?: React.FocusEventHandler<HTMLInputElement>;
|
|
34
|
+
/** Indeterminate state */
|
|
35
|
+
indeterminate?: boolean;
|
|
36
|
+
mode?: CheckboxMode;
|
|
37
|
+
size?: CheckboxSize;
|
|
38
|
+
onMouseEnter?: React.MouseEventHandler<HTMLElement>;
|
|
39
|
+
onMouseLeave?: React.MouseEventHandler<HTMLElement>;
|
|
40
|
+
onClick?: React.MouseEventHandler<HTMLElement>;
|
|
41
|
+
};
|
|
42
|
+
export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
|
|
43
|
+
export default Checkbox;
|
package/lib/index.css
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
.
|
|
1
|
+
._themeLight_1rtxhkq_8{
|
|
2
2
|
--rs-theme-dark:0;
|
|
3
3
|
}
|
|
4
|
-
.
|
|
4
|
+
._themeDark_1rtxhkq_11{
|
|
5
5
|
--rs-theme-dark:1;
|
|
6
6
|
}
|
|
7
|
-
.
|
|
7
|
+
._checkboxSizeS_1rtxhkq_15{
|
|
8
8
|
--_rs-checkbox-parts-offset:4px;
|
|
9
9
|
}
|
|
10
|
-
.
|
|
10
|
+
._checkboxSizeM_1rtxhkq_18{
|
|
11
11
|
--_rs-checkbox-parts-offset:8px;
|
|
12
12
|
}
|
|
13
|
-
.
|
|
13
|
+
._checkboxSizeL_1rtxhkq_21{
|
|
14
14
|
--_rs-checkbox-parts-offset:8px;
|
|
15
15
|
}
|
|
16
|
-
.
|
|
16
|
+
._sizeS_1rtxhkq_25{
|
|
17
17
|
--_rs-checkbox-ci-mark-s-display:initial;
|
|
18
18
|
--_rs-checkbox-ci-mark-m-display:none;
|
|
19
19
|
--_rs-checkbox-ci-mark-l-display:none;
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
--_rs-checkbox-ci-shadow-size:3px;
|
|
22
22
|
--_rs-checkbox-ci-indeterminate-icon-border-width:6px 3px;
|
|
23
23
|
}
|
|
24
|
-
.
|
|
24
|
+
._sizeM_1rtxhkq_28{
|
|
25
25
|
--_rs-checkbox-ci-mark-s-display:none;
|
|
26
26
|
--_rs-checkbox-ci-mark-m-display:initial;
|
|
27
27
|
--_rs-checkbox-ci-mark-l-display:none;
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
--_rs-checkbox-ci-shadow-size:3px;
|
|
30
30
|
--_rs-checkbox-ci-indeterminate-icon-border-width:8px 3px;
|
|
31
31
|
}
|
|
32
|
-
.
|
|
32
|
+
._sizeL_1rtxhkq_31{
|
|
33
33
|
--_rs-checkbox-ci-mark-s-display:none;
|
|
34
34
|
--_rs-checkbox-ci-mark-m-display:none;
|
|
35
35
|
--_rs-checkbox-ci-mark-l-display:initial;
|
|
@@ -37,14 +37,14 @@
|
|
|
37
37
|
--_rs-checkbox-ci-shadow-size:4px;
|
|
38
38
|
--_rs-checkbox-ci-indeterminate-icon-border-width:9px 3px;
|
|
39
39
|
}
|
|
40
|
-
.
|
|
40
|
+
._classic_1rtxhkq_35{
|
|
41
41
|
--_rs-checkbox-ci-mark-color:#FFFFFF;
|
|
42
42
|
--_rs-checkbox-ci-indeterminate-icon-border-color:var(--_rs-color-primary);
|
|
43
43
|
--_rs-checkbox-ci-indeterminate-icon-background-color:#FFFFFF;
|
|
44
44
|
--_rs-checkbox-ci-checked-icon-border-color:var(--_rs-color-primary);
|
|
45
45
|
--_rs-checkbox-ci-hover-icon-box-shadow:var(--_rs-color-primary-t-fog);
|
|
46
46
|
}
|
|
47
|
-
.
|
|
47
|
+
._rock_1rtxhkq_38{
|
|
48
48
|
--_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));
|
|
49
49
|
--_rs-checkbox-ci-indeterminate-icon-border-color:rgb(
|
|
50
50
|
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)
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
0.1
|
|
61
61
|
);
|
|
62
62
|
}
|
|
63
|
-
.
|
|
63
|
+
._checkbox_1rtxhkq_15{
|
|
64
64
|
--_rs-theme-dark:var(
|
|
65
65
|
--_rs-internal-force-theme-dark-consult-rescui-before-using,
|
|
66
66
|
var(--rs-theme-dark, 0)
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
--_rs-theme-light-coefficient:calc(1 - var(--_rs-theme-dark-coefficient));
|
|
71
71
|
}
|
|
72
72
|
@supports (color: color-mix(in srgb, #fff 50%, #000 50%)){
|
|
73
|
-
.
|
|
73
|
+
._checkbox_1rtxhkq_15{
|
|
74
74
|
--_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)));
|
|
75
75
|
--_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)));
|
|
76
76
|
--_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)));
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
@supports not (color: color-mix(in srgb, #fff 50%, #000 50%)){
|
|
82
|
-
.
|
|
82
|
+
._checkbox_1rtxhkq_15{
|
|
83
83
|
--_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);
|
|
84
84
|
--_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));
|
|
85
85
|
--_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));
|
|
@@ -88,18 +88,18 @@
|
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
@supports (color: color-mix(in srgb, #fff 50%, #000 50%)){
|
|
91
|
-
.
|
|
91
|
+
._checkbox_1rtxhkq_15{
|
|
92
92
|
--_rs-color-danger:color-mix(in srgb, #CC1400 calc(100%*var(--_rs-theme-light-coefficient, 1)), #FF6553 calc(100%*var(--_rs-theme-dark-coefficient, 0)));
|
|
93
93
|
--_rs-color-danger-bg:color-mix(in srgb, rgba(204,20,0, 0.2) calc(100%*var(--_rs-theme-light-coefficient, 1)), rgba(255,101,83, 0.2) calc(100%*var(--_rs-theme-dark-coefficient, 0)));
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
@supports not (color: color-mix(in srgb, #fff 50%, #000 50%)){
|
|
97
|
-
.
|
|
97
|
+
._checkbox_1rtxhkq_15{
|
|
98
98
|
--_rs-color-danger:rgb(calc(var(--_rs-theme-light-coefficient, 1)*204 + var(--_rs-theme-dark-coefficient, 0)*255), calc(var(--_rs-theme-light-coefficient, 1)*20 + var(--_rs-theme-dark-coefficient, 0)*101), calc(var(--_rs-theme-light-coefficient, 1)*0 + var(--_rs-theme-dark-coefficient, 0)*83));
|
|
99
99
|
--_rs-color-danger-bg:rgba(calc(var(--_rs-theme-light-coefficient, 1)*204 + var(--_rs-theme-dark-coefficient, 0)*255), calc(var(--_rs-theme-light-coefficient, 1)*20 + var(--_rs-theme-dark-coefficient, 0)*101), calc(var(--_rs-theme-light-coefficient, 1)*0 + var(--_rs-theme-dark-coefficient, 0)*83), 0.2);
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
-
.
|
|
102
|
+
._checkbox_1rtxhkq_15 {
|
|
103
103
|
|
|
104
104
|
position:relative;
|
|
105
105
|
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
|
|
115
115
|
text-align:left;
|
|
116
116
|
}
|
|
117
|
-
.
|
|
117
|
+
._input_1rtxhkq_65{
|
|
118
118
|
position:absolute;
|
|
119
119
|
z-index:-1;
|
|
120
120
|
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
|
|
125
125
|
border:0;
|
|
126
126
|
}
|
|
127
|
-
.
|
|
127
|
+
._icon_1rtxhkq_76{
|
|
128
128
|
display:inline-block;
|
|
129
129
|
float:left;
|
|
130
130
|
|
|
@@ -138,19 +138,19 @@
|
|
|
138
138
|
|
|
139
139
|
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));
|
|
140
140
|
|
|
141
|
-
transition:border-width ease-out 100ms, border-color ease-out 100ms;
|
|
141
|
+
transition:border-width var(--rs-transition-function, ease-out) 100ms, border-color var(--rs-transition-function, ease-out) 100ms;
|
|
142
142
|
}
|
|
143
|
-
.
|
|
143
|
+
._enabled_1rtxhkq_93 ._icon_1rtxhkq_76{
|
|
144
144
|
cursor:pointer;
|
|
145
145
|
}
|
|
146
|
-
.
|
|
146
|
+
._indeterminate_1rtxhkq_97 ._icon_1rtxhkq_76{
|
|
147
147
|
border-width:var(--_rs-checkbox-ci-indeterminate-icon-border-width);
|
|
148
148
|
}
|
|
149
|
-
.
|
|
149
|
+
._input_1rtxhkq_65:checked + ._icon_1rtxhkq_76{
|
|
150
150
|
border-width:calc(var(--_rs-checkbox-ci-size)/2);
|
|
151
151
|
}
|
|
152
|
-
.
|
|
153
|
-
.
|
|
152
|
+
._disabled_1rtxhkq_105 ._icon_1rtxhkq_76._icon_1rtxhkq_76,
|
|
153
|
+
._input_1rtxhkq_65:disabled + ._icon_1rtxhkq_76{
|
|
154
154
|
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));
|
|
155
155
|
|
|
156
156
|
cursor:not-allowed;
|
|
@@ -158,27 +158,27 @@
|
|
|
158
158
|
|
|
159
159
|
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));
|
|
160
160
|
}
|
|
161
|
-
.
|
|
162
|
-
.
|
|
161
|
+
._input_1rtxhkq_65:hover + ._icon_1rtxhkq_76,
|
|
162
|
+
._enabled_1rtxhkq_93:hover ._icon_1rtxhkq_76{
|
|
163
163
|
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));
|
|
164
164
|
}
|
|
165
|
-
.
|
|
166
|
-
.
|
|
167
|
-
.
|
|
165
|
+
._enabled_1rtxhkq_93._indeterminate_1rtxhkq_97 ._icon_1rtxhkq_76,
|
|
166
|
+
._enabled_1rtxhkq_93._indeterminate_1rtxhkq_97:hover ._icon_1rtxhkq_76,
|
|
167
|
+
._enabled_1rtxhkq_93._indeterminate_1rtxhkq_97 ._input_1rtxhkq_65:hover + ._icon_1rtxhkq_76{
|
|
168
168
|
border-color:var(--_rs-checkbox-ci-indeterminate-icon-border-color);
|
|
169
169
|
|
|
170
170
|
background-color:var(
|
|
171
171
|
--_rs-checkbox-ci-indeterminate-icon-background-color
|
|
172
172
|
);
|
|
173
173
|
}
|
|
174
|
-
.
|
|
174
|
+
._enabled_1rtxhkq_93 ._input_1rtxhkq_65:checked + ._icon_1rtxhkq_76._icon_1rtxhkq_76{
|
|
175
175
|
border-color:var(--_rs-checkbox-ci-checked-icon-border-color);
|
|
176
176
|
}
|
|
177
|
-
.
|
|
178
|
-
.
|
|
177
|
+
._error_1rtxhkq_134 ._icon_1rtxhkq_76._icon_1rtxhkq_76._icon_1rtxhkq_76._icon_1rtxhkq_76,
|
|
178
|
+
._input_1rtxhkq_65:invalid + ._icon_1rtxhkq_76._icon_1rtxhkq_76._icon_1rtxhkq_76{
|
|
179
179
|
border-color:var(--_rs-color-danger);
|
|
180
180
|
}
|
|
181
|
-
.
|
|
181
|
+
._icon_1rtxhkq_76::after{
|
|
182
182
|
position:absolute;
|
|
183
183
|
top:var(--_rs-checkbox-ci-shadow-size);
|
|
184
184
|
right:var(--_rs-checkbox-ci-shadow-size);
|
|
@@ -187,15 +187,15 @@
|
|
|
187
187
|
|
|
188
188
|
content:'';
|
|
189
189
|
}
|
|
190
|
-
.
|
|
191
|
-
label:hover .
|
|
192
|
-
.
|
|
190
|
+
._enabled_1rtxhkq_93:hover > ._icon_1rtxhkq_76::after,
|
|
191
|
+
label:hover ._enabled_1rtxhkq_93 > ._icon_1rtxhkq_76::after,
|
|
192
|
+
._enabled_1rtxhkq_93 ._input_1rtxhkq_65:active + ._icon_1rtxhkq_76::after{
|
|
193
193
|
box-shadow:0 0 0 var(--_rs-checkbox-ci-shadow-size) var(--_rs-checkbox-ci-hover-icon-box-shadow);
|
|
194
194
|
}
|
|
195
|
-
.
|
|
195
|
+
._enabled_1rtxhkq_93 ._input_1rtxhkq_65:focus[data-focus-method='key'] + ._icon_1rtxhkq_76::after{
|
|
196
196
|
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);
|
|
197
197
|
}
|
|
198
|
-
.
|
|
198
|
+
._checkmark_1rtxhkq_161{
|
|
199
199
|
position:absolute;
|
|
200
200
|
top:var(--_rs-checkbox-ci-shadow-size);
|
|
201
201
|
left:var(--_rs-checkbox-ci-shadow-size);
|
|
@@ -206,36 +206,36 @@
|
|
|
206
206
|
height:var(--_rs-checkbox-ci-size);
|
|
207
207
|
fill:currentColor;
|
|
208
208
|
}
|
|
209
|
-
.
|
|
209
|
+
._enabled_1rtxhkq_93 ._checkmark_1rtxhkq_161{
|
|
210
210
|
color:var(--_rs-checkbox-ci-mark-color);
|
|
211
211
|
}
|
|
212
|
-
.
|
|
213
|
-
.
|
|
212
|
+
._disabled_1rtxhkq_105 ._checkmark_1rtxhkq_161,
|
|
213
|
+
._input_1rtxhkq_65:disabled + ._icon_1rtxhkq_76 > ._checkmark_1rtxhkq_161{
|
|
214
214
|
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));
|
|
215
215
|
}
|
|
216
|
-
.
|
|
216
|
+
._input_1rtxhkq_65:checked + ._icon_1rtxhkq_76 > ._checkmark_1rtxhkq_161{
|
|
217
217
|
display:block;
|
|
218
218
|
}
|
|
219
|
-
.
|
|
219
|
+
._markS_1rtxhkq_186{
|
|
220
220
|
display:var(--_rs-checkbox-ci-mark-s-display);
|
|
221
221
|
}
|
|
222
|
-
.
|
|
222
|
+
._markM_1rtxhkq_189{
|
|
223
223
|
display:var(--_rs-checkbox-ci-mark-m-display);
|
|
224
224
|
}
|
|
225
|
-
.
|
|
225
|
+
._markL_1rtxhkq_192{
|
|
226
226
|
display:var(--_rs-checkbox-ci-mark-l-display);
|
|
227
227
|
}
|
|
228
|
-
.
|
|
228
|
+
._errorMessage_1rtxhkq_196{
|
|
229
229
|
margin-top:var(--_rs-checkbox-parts-offset);
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
-
.
|
|
232
|
+
._themeLight_1c42gib_6{
|
|
233
233
|
--rs-theme-dark:0;
|
|
234
234
|
}
|
|
235
|
-
.
|
|
235
|
+
._themeDark_1c42gib_9{
|
|
236
236
|
--rs-theme-dark:1;
|
|
237
237
|
}
|
|
238
|
-
.
|
|
238
|
+
._container_1c42gib_13{
|
|
239
239
|
--_rs-theme-dark:var(
|
|
240
240
|
--_rs-internal-force-theme-dark-consult-rescui-before-using,
|
|
241
241
|
var(--rs-theme-dark, 0)
|
|
@@ -245,7 +245,7 @@
|
|
|
245
245
|
--_rs-theme-light-coefficient:calc(1 - var(--_rs-theme-dark-coefficient));
|
|
246
246
|
}
|
|
247
247
|
@supports (color: color-mix(in srgb, #fff 50%, #000 50%)){
|
|
248
|
-
.
|
|
248
|
+
._container_1c42gib_13{
|
|
249
249
|
--_rs-color-primary:color-mix(in srgb, var(--rs-color-primary-light-theme, #6B57FF) calc(100%*var(--_rs-theme-light-coefficient, 1)), var(--rs-color-primary-dark-theme, #8473FF) calc(100%*var(--_rs-theme-dark-coefficient, 0)));
|
|
250
250
|
--_rs-color-primary-dim:color-mix(in srgb, var(--rs-color-primary-dim-light-theme, #8979ff) calc(100%*var(--_rs-theme-light-coefficient, 1)), var(--rs-color-primary-dim-dark-theme, #6f61d2) calc(100%*var(--_rs-theme-dark-coefficient, 0)));
|
|
251
251
|
--_rs-color-primary-fog:color-mix(in srgb, var(--rs-color-primary-fog-light-theme, #e1ddff) calc(100%*var(--_rs-theme-light-coefficient, 1)), var(--rs-color-primary-fog-dark-theme, #2e2b49) calc(100%*var(--_rs-theme-dark-coefficient, 0)));
|
|
@@ -254,7 +254,7 @@
|
|
|
254
254
|
}
|
|
255
255
|
}
|
|
256
256
|
@supports not (color: color-mix(in srgb, #fff 50%, #000 50%)){
|
|
257
|
-
.
|
|
257
|
+
._container_1c42gib_13{
|
|
258
258
|
--_rs-color-primary:rgb(calc(var(--_rs-theme-light-coefficient, 1)*107 + var(--_rs-theme-dark-coefficient, 0)*132), calc(var(--_rs-theme-light-coefficient, 1)*87 + var(--_rs-theme-dark-coefficient, 0)*115), 255);
|
|
259
259
|
--_rs-color-primary-dim:rgb(calc(var(--_rs-theme-light-coefficient, 1)*137 + var(--_rs-theme-dark-coefficient, 0)*111), calc(var(--_rs-theme-light-coefficient, 1)*121 + var(--_rs-theme-dark-coefficient, 0)*97), calc(var(--_rs-theme-light-coefficient, 1)*255 + var(--_rs-theme-dark-coefficient, 0)*210));
|
|
260
260
|
--_rs-color-primary-fog:rgb(calc(var(--_rs-theme-light-coefficient, 1)*225 + var(--_rs-theme-dark-coefficient, 0)*46), calc(var(--_rs-theme-light-coefficient, 1)*221 + var(--_rs-theme-dark-coefficient, 0)*43), calc(var(--_rs-theme-light-coefficient, 1)*255 + var(--_rs-theme-dark-coefficient, 0)*73));
|
|
@@ -262,11 +262,11 @@
|
|
|
262
262
|
--_rs-color-primary-t-fog:rgba(calc(var(--_rs-theme-light-coefficient, 1)*107 + var(--_rs-theme-dark-coefficient, 0)*132), calc(var(--_rs-theme-light-coefficient, 1)*87 + var(--_rs-theme-dark-coefficient, 0)*115), 255, calc(var(--_rs-theme-light-coefficient, 1)*0.2 + var(--_rs-theme-dark-coefficient, 0)*0.3));
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
|
-
.
|
|
265
|
+
._sizeS_1c42gib_18{
|
|
266
266
|
--_rs-checkbox-list-label-offset:4px;
|
|
267
267
|
--_rs-checkbox-list-left-offset:28px;
|
|
268
268
|
}
|
|
269
|
-
.
|
|
269
|
+
._sizeS_1c42gib_18 [data-rs-internal='checkbox-list__label']{
|
|
270
270
|
--_rs-typography-letter-spacing:var(--rs-text-3-letter-spacing, 0.0045em);
|
|
271
271
|
--_rs-typography-text-transform:initial;
|
|
272
272
|
--_rs-typography-font-variant-numeric:initial;
|
|
@@ -301,7 +301,7 @@
|
|
|
301
301
|
--_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
|
|
302
302
|
--_rs-typography-link-border-bottom-width-from-text:1px;
|
|
303
303
|
}
|
|
304
|
-
.
|
|
304
|
+
._sizeS_1c42gib_18 [data-rs-internal='checkbox-list__bold-label']{
|
|
305
305
|
--_rs-typography-letter-spacing:var(--rs-h5-letter-spacing, normal);
|
|
306
306
|
--_rs-typography-text-transform:initial;
|
|
307
307
|
--_rs-typography-font-variant-numeric:initial;
|
|
@@ -333,11 +333,11 @@
|
|
|
333
333
|
--_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
|
|
334
334
|
--_rs-typography-link-border-bottom-width-from-text:2px;
|
|
335
335
|
}
|
|
336
|
-
.
|
|
336
|
+
._sizeM_1c42gib_21{
|
|
337
337
|
--_rs-checkbox-list-label-offset:8px;
|
|
338
338
|
--_rs-checkbox-list-left-offset:32px;
|
|
339
339
|
}
|
|
340
|
-
.
|
|
340
|
+
._sizeM_1c42gib_21 [data-rs-internal='checkbox-list__label']{
|
|
341
341
|
--_rs-typography-letter-spacing:var(--rs-text-2-letter-spacing, 0.0015em);
|
|
342
342
|
--_rs-typography-text-transform:initial;
|
|
343
343
|
--_rs-typography-font-variant-numeric:initial;
|
|
@@ -376,11 +376,11 @@
|
|
|
376
376
|
--_rs-typography-link-border-bottom-width-from-text:1px;
|
|
377
377
|
}
|
|
378
378
|
@media screen and (max-width: 640px){
|
|
379
|
-
.
|
|
379
|
+
._sizeM_1c42gib_21 [data-rs-internal='checkbox-list__label']{
|
|
380
380
|
--_rs-typography-text-2-sm-list-li-margin-top-from-text:12px;
|
|
381
381
|
}
|
|
382
382
|
}
|
|
383
|
-
.
|
|
383
|
+
._sizeM_1c42gib_21 [data-rs-internal='checkbox-list__bold-label']{
|
|
384
384
|
--_rs-typography-letter-spacing:var(--rs-h4-letter-spacing, normal);
|
|
385
385
|
--_rs-typography-text-transform:initial;
|
|
386
386
|
--_rs-typography-font-variant-numeric:initial;
|
|
@@ -412,11 +412,11 @@
|
|
|
412
412
|
--_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
|
|
413
413
|
--_rs-typography-link-border-bottom-width-from-text:2px;
|
|
414
414
|
}
|
|
415
|
-
.
|
|
415
|
+
._sizeL_1c42gib_24{
|
|
416
416
|
--_rs-checkbox-list-label-offset:12px;
|
|
417
417
|
--_rs-checkbox-list-left-offset:44px;
|
|
418
418
|
}
|
|
419
|
-
.
|
|
419
|
+
._sizeL_1c42gib_24 [data-rs-internal='checkbox-list__label']{
|
|
420
420
|
--_rs-typography-letter-spacing:var(--rs-text-1-letter-spacing, normal);
|
|
421
421
|
--_rs-typography-text-transform:initial;
|
|
422
422
|
--_rs-typography-font-variant-numeric:initial;
|
|
@@ -455,11 +455,11 @@
|
|
|
455
455
|
--_rs-typography-link-border-bottom-width-from-text:1px;
|
|
456
456
|
}
|
|
457
457
|
@media screen and (max-width: 640px){
|
|
458
|
-
.
|
|
458
|
+
._sizeL_1c42gib_24 [data-rs-internal='checkbox-list__label']{
|
|
459
459
|
--_rs-typography-text-1-sm-list-li-margin-top-from-text:16px;
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
|
-
.
|
|
462
|
+
._sizeL_1c42gib_24 [data-rs-internal='checkbox-list__bold-label']{
|
|
463
463
|
--_rs-typography-letter-spacing:var(--rs-h3-letter-spacing, normal);
|
|
464
464
|
--_rs-typography-text-transform:initial;
|
|
465
465
|
--_rs-typography-font-variant-numeric:initial;
|
|
@@ -491,10 +491,10 @@
|
|
|
491
491
|
--_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
|
|
492
492
|
--_rs-typography-link-border-bottom-width-from-text:2px;
|
|
493
493
|
}
|
|
494
|
-
.
|
|
494
|
+
._inner_1c42gib_28{
|
|
495
495
|
--rs-out-checkbox-list-left-offset:var(--_rs-checkbox-list-left-offset);
|
|
496
496
|
}
|
|
497
|
-
.
|
|
497
|
+
._label_1c42gib_32{
|
|
498
498
|
letter-spacing:var(
|
|
499
499
|
--rs-text-base-letter-spacing,
|
|
500
500
|
var(--_rs-typography-letter-spacing)
|
|
@@ -514,23 +514,23 @@
|
|
|
514
514
|
margin:0 0 var(--_rs-checkbox-list-label-offset) 0;
|
|
515
515
|
padding:0;
|
|
516
516
|
}
|
|
517
|
-
.
|
|
517
|
+
._disabled_1c42gib_39 ._label_1c42gib_32{
|
|
518
518
|
color:var(
|
|
519
519
|
--rs-color-pale,
|
|
520
520
|
rgba(calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(28 + var(--_rs-theme-dark-coefficient, 0)*227), 0.5)
|
|
521
521
|
);
|
|
522
522
|
}
|
|
523
|
-
.
|
|
523
|
+
._footer_1c42gib_44{
|
|
524
524
|
display:flex;
|
|
525
525
|
flex-direction:column;
|
|
526
526
|
}
|
|
527
|
-
.
|
|
527
|
+
._errorMessage_1c42gib_49{
|
|
528
528
|
order:99;
|
|
529
529
|
}
|
|
530
|
-
.
|
|
530
|
+
._error_1c42gib_49 ._errorMessage_1c42gib_49{
|
|
531
531
|
order:0;
|
|
532
532
|
}
|
|
533
|
-
.
|
|
533
|
+
._note_1c42gib_58{
|
|
534
534
|
--_rs-typography-letter-spacing:var(--rs-text-3-letter-spacing, 0.0045em);
|
|
535
535
|
--_rs-typography-text-transform:initial;
|
|
536
536
|
--_rs-typography-font-variant-numeric:initial;
|
|
@@ -590,7 +590,7 @@
|
|
|
590
590
|
|
|
591
591
|
order:1;
|
|
592
592
|
}
|
|
593
|
-
.
|
|
593
|
+
._disabled_1c42gib_39 ._note_1c42gib_58{
|
|
594
594
|
--_rs-typography-hardness-color:var(
|
|
595
595
|
--rs-color-pale,
|
|
596
596
|
rgba(calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(28 + var(--_rs-theme-dark-coefficient, 0)*227), 0.5)
|
package/lib/index.d.ts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export default
|
|
7
|
-
export {
|
|
8
|
-
export
|
|
9
|
-
export {
|
|
10
|
-
export
|
|
11
|
-
export {
|
|
12
|
-
export
|
|
13
|
-
export {
|
|
14
|
-
export type { CheckboxProps } from './checkbox';
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated use named import instead
|
|
3
|
+
*/
|
|
4
|
+
declare const DefaultCheckbox: import("react").ForwardRefExoticComponent<import("./checkbox").CheckboxProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
5
|
+
export default DefaultCheckbox;
|
|
6
|
+
export { default as CheckboxManager } from './parts/checkbox-manager';
|
|
7
|
+
export type { CheckboxManagerProps } from './parts/checkbox-manager';
|
|
8
|
+
export { default as CheckboxControl } from './parts/checkbox-control';
|
|
9
|
+
export type { CheckboxControlProps } from './parts/checkbox-control-inner';
|
|
10
|
+
export { default as CheckboxList } from './parts/checkbox-list';
|
|
11
|
+
export type { CheckboxListProps } from './parts/checkbox-list';
|
|
12
|
+
export { default as Checkbox } from './checkbox';
|
|
13
|
+
export type { CheckboxProps } from './checkbox';
|
package/lib/index.js
CHANGED
|
@@ -4,8 +4,8 @@ export { Checkbox } from './checkbox.js';
|
|
|
4
4
|
export { default as CheckboxManager } from './parts/checkbox-manager.js';
|
|
5
5
|
export { default as CheckboxControl } from './parts/checkbox-control.js';
|
|
6
6
|
export { default as CheckboxList } from './parts/checkbox-list.js';
|
|
7
|
-
/**
|
|
8
|
-
* @deprecated use named import instead
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated use named import instead
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
const DefaultCheckbox = Checkbox;
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Theme } from '@rescui/ui-contexts';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
className?: string;
|
|
7
|
-
/** Checked state. `onChange` callback is required. */
|
|
8
|
-
checked?: boolean;
|
|
9
|
-
/** Is checkbox initially checked */
|
|
10
|
-
defaultChecked?: boolean;
|
|
11
|
-
/** Input name attribute */
|
|
12
|
-
name?: string;
|
|
13
|
-
/** Appearance theme */
|
|
14
|
-
theme?: Theme;
|
|
15
|
-
/** Disabled state */
|
|
16
|
-
disabled?: boolean;
|
|
17
|
-
/** Error state */
|
|
18
|
-
isError?: boolean;
|
|
19
|
-
/** Value of the checkbox */
|
|
20
|
-
value?: string;
|
|
21
|
-
/** Change value callback. `event => ...` */
|
|
22
|
-
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
23
|
-
/** Focus input callback */
|
|
24
|
-
onFocus?: React.FocusEventHandler<HTMLInputElement>;
|
|
25
|
-
/** Blur input callback */
|
|
26
|
-
onBlur?: React.FocusEventHandler<HTMLInputElement>;
|
|
27
|
-
/** Indeterminate state */
|
|
28
|
-
indeterminate?: boolean;
|
|
29
|
-
/** Cancel the use of the `label` tag inside. Set it to `true` only if the component is wrapped in a `label` on the outside. */
|
|
30
|
-
notUseLabelTag?: boolean;
|
|
31
|
-
size?: CheckboxSize;
|
|
32
|
-
mode?: CheckboxMode;
|
|
33
|
-
errorId?: string;
|
|
34
|
-
};
|
|
35
|
-
declare const CheckboxControlInner: React.ForwardRefExoticComponent<CheckboxControlProps & React.RefAttributes<HTMLInputElement>>;
|
|
36
|
-
export default CheckboxControlInner;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Theme } from '@rescui/ui-contexts';
|
|
3
|
+
export type CheckboxSize = 's' | 'm' | 'l';
|
|
4
|
+
export type CheckboxMode = 'classic' | 'rock';
|
|
5
|
+
export type CheckboxControlProps = {
|
|
6
|
+
className?: string;
|
|
7
|
+
/** Checked state. `onChange` callback is required. */
|
|
8
|
+
checked?: boolean;
|
|
9
|
+
/** Is checkbox initially checked */
|
|
10
|
+
defaultChecked?: boolean;
|
|
11
|
+
/** Input name attribute */
|
|
12
|
+
name?: string;
|
|
13
|
+
/** Appearance theme */
|
|
14
|
+
theme?: Theme;
|
|
15
|
+
/** Disabled state */
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
/** Error state */
|
|
18
|
+
isError?: boolean;
|
|
19
|
+
/** Value of the checkbox */
|
|
20
|
+
value?: string;
|
|
21
|
+
/** Change value callback. `event => ...` */
|
|
22
|
+
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
23
|
+
/** Focus input callback */
|
|
24
|
+
onFocus?: React.FocusEventHandler<HTMLInputElement>;
|
|
25
|
+
/** Blur input callback */
|
|
26
|
+
onBlur?: React.FocusEventHandler<HTMLInputElement>;
|
|
27
|
+
/** Indeterminate state */
|
|
28
|
+
indeterminate?: boolean;
|
|
29
|
+
/** Cancel the use of the `label` tag inside. Set it to `true` only if the component is wrapped in a `label` on the outside. */
|
|
30
|
+
notUseLabelTag?: boolean;
|
|
31
|
+
size?: CheckboxSize;
|
|
32
|
+
mode?: CheckboxMode;
|
|
33
|
+
errorId?: string;
|
|
34
|
+
};
|
|
35
|
+
declare const CheckboxControlInner: React.ForwardRefExoticComponent<CheckboxControlProps & React.RefAttributes<HTMLInputElement>>;
|
|
36
|
+
export default CheckboxControlInner;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { CheckboxControlProps } from './checkbox-control-inner';
|
|
3
|
-
declare const CheckboxControl: React.ForwardRefExoticComponent<CheckboxControlProps & React.RefAttributes<HTMLInputElement>>;
|
|
4
|
-
export default CheckboxControl;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { CheckboxControlProps } from './checkbox-control-inner';
|
|
3
|
+
declare const CheckboxControl: React.ForwardRefExoticComponent<CheckboxControlProps & React.RefAttributes<HTMLInputElement>>;
|
|
4
|
+
export default CheckboxControl;
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Theme } from '@rescui/ui-contexts';
|
|
3
|
-
import CSS from 'csstype';
|
|
4
|
-
export
|
|
5
|
-
className?: string;
|
|
6
|
-
id?: string;
|
|
7
|
-
style?: CSS.Properties;
|
|
8
|
-
mode?: 'classic' | 'rock';
|
|
9
|
-
size?: 's' | 'm' | 'l';
|
|
10
|
-
onChange?: (val: string[]) => void;
|
|
11
|
-
value?: string[];
|
|
12
|
-
defaultValue?: string[];
|
|
13
|
-
label?: React.ReactNode;
|
|
14
|
-
note?: React.ReactNode;
|
|
15
|
-
/** Error flag or message */
|
|
16
|
-
error?: React.ReactNode;
|
|
17
|
-
/**
|
|
18
|
-
* If `true`, there will be reserved a space for a 1-line error message. Subsequent lines will be placed below normally.
|
|
19
|
-
* If `false`, there will be no reservation.
|
|
20
|
-
*/
|
|
21
|
-
reserveErrorLine?: boolean;
|
|
22
|
-
boldLabel?: boolean;
|
|
23
|
-
theme?: Theme;
|
|
24
|
-
disabled?: boolean;
|
|
25
|
-
children?: React.ReactNode;
|
|
26
|
-
};
|
|
27
|
-
declare const CheckboxList: React.FC<CheckboxListProps>;
|
|
28
|
-
export default CheckboxList;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Theme } from '@rescui/ui-contexts';
|
|
3
|
+
import CSS from 'csstype';
|
|
4
|
+
export type CheckboxListProps = {
|
|
5
|
+
className?: string;
|
|
6
|
+
id?: string;
|
|
7
|
+
style?: CSS.Properties;
|
|
8
|
+
mode?: 'classic' | 'rock';
|
|
9
|
+
size?: 's' | 'm' | 'l';
|
|
10
|
+
onChange?: (val: string[]) => void;
|
|
11
|
+
value?: string[];
|
|
12
|
+
defaultValue?: string[];
|
|
13
|
+
label?: React.ReactNode;
|
|
14
|
+
note?: React.ReactNode;
|
|
15
|
+
/** Error flag or message */
|
|
16
|
+
error?: React.ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* If `true`, there will be reserved a space for a 1-line error message. Subsequent lines will be placed below normally.
|
|
19
|
+
* If `false`, there will be no reservation.
|
|
20
|
+
*/
|
|
21
|
+
reserveErrorLine?: boolean;
|
|
22
|
+
boldLabel?: boolean;
|
|
23
|
+
theme?: Theme;
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
children?: React.ReactNode;
|
|
26
|
+
};
|
|
27
|
+
declare const CheckboxList: React.FC<CheckboxListProps>;
|
|
28
|
+
export default CheckboxList;
|
|
@@ -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_1c42gib_6",
|
|
3
|
+
"themeDark": "_themeDark_1c42gib_9",
|
|
4
|
+
"container": "_container_1c42gib_13",
|
|
5
|
+
"sizeS": "_sizeS_1c42gib_18",
|
|
6
|
+
"sizeM": "_sizeM_1c42gib_21",
|
|
7
|
+
"sizeL": "_sizeL_1c42gib_24",
|
|
8
|
+
"inner": "_inner_1c42gib_28",
|
|
9
|
+
"label": "_label_1c42gib_32",
|
|
10
|
+
"disabled": "_disabled_1c42gib_39",
|
|
11
|
+
"footer": "_footer_1c42gib_44",
|
|
12
|
+
"errorMessage": "_errorMessage_1c42gib_49",
|
|
13
|
+
"error": "_error_1c42gib_49",
|
|
14
|
+
"note": "_note_1c42gib_58"
|
|
15
15
|
};
|
|
16
16
|
export { styles as default };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Theme } from '@rescui/ui-contexts';
|
|
3
|
-
export
|
|
4
|
-
onChange: (val: string[]) => void;
|
|
5
|
-
value: string[];
|
|
6
|
-
defaultValue: string[];
|
|
7
|
-
isError?: boolean;
|
|
8
|
-
theme: Theme;
|
|
9
|
-
size: 's' | 'm' | 'l';
|
|
10
|
-
mode: 'classic' | 'rock';
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
children?: React.ReactNode;
|
|
13
|
-
};
|
|
14
|
-
declare const CheckboxManager: React.FC<CheckboxManagerProps>;
|
|
15
|
-
export default CheckboxManager;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Theme } from '@rescui/ui-contexts';
|
|
3
|
+
export type CheckboxManagerProps = {
|
|
4
|
+
onChange: (val: string[]) => void;
|
|
5
|
+
value: string[];
|
|
6
|
+
defaultValue: string[];
|
|
7
|
+
isError?: boolean;
|
|
8
|
+
theme: Theme;
|
|
9
|
+
size: 's' | 'm' | 'l';
|
|
10
|
+
mode: 'classic' | 'rock';
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
};
|
|
14
|
+
declare const CheckboxManager: React.FC<CheckboxManagerProps>;
|
|
15
|
+
export default CheckboxManager;
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
var styles = {
|
|
2
|
-
"themeLight": "
|
|
3
|
-
"themeDark": "
|
|
4
|
-
"checkboxSizeS": "
|
|
5
|
-
"checkboxSizeM": "
|
|
6
|
-
"checkboxSizeL": "
|
|
7
|
-
"sizeS": "
|
|
8
|
-
"sizeM": "
|
|
9
|
-
"sizeL": "
|
|
10
|
-
"classic": "
|
|
11
|
-
"rock": "
|
|
12
|
-
"checkbox": "
|
|
13
|
-
"input": "
|
|
14
|
-
"icon": "
|
|
15
|
-
"enabled": "
|
|
16
|
-
"indeterminate": "
|
|
17
|
-
"disabled": "
|
|
18
|
-
"error": "
|
|
19
|
-
"checkmark": "
|
|
20
|
-
"markS": "
|
|
21
|
-
"markM": "
|
|
22
|
-
"markL": "
|
|
23
|
-
"errorMessage": "
|
|
2
|
+
"themeLight": "_themeLight_1rtxhkq_8",
|
|
3
|
+
"themeDark": "_themeDark_1rtxhkq_11",
|
|
4
|
+
"checkboxSizeS": "_checkboxSizeS_1rtxhkq_15",
|
|
5
|
+
"checkboxSizeM": "_checkboxSizeM_1rtxhkq_18",
|
|
6
|
+
"checkboxSizeL": "_checkboxSizeL_1rtxhkq_21",
|
|
7
|
+
"sizeS": "_sizeS_1rtxhkq_25",
|
|
8
|
+
"sizeM": "_sizeM_1rtxhkq_28",
|
|
9
|
+
"sizeL": "_sizeL_1rtxhkq_31",
|
|
10
|
+
"classic": "_classic_1rtxhkq_35",
|
|
11
|
+
"rock": "_rock_1rtxhkq_38",
|
|
12
|
+
"checkbox": "_checkbox_1rtxhkq_15",
|
|
13
|
+
"input": "_input_1rtxhkq_65",
|
|
14
|
+
"icon": "_icon_1rtxhkq_76",
|
|
15
|
+
"enabled": "_enabled_1rtxhkq_93",
|
|
16
|
+
"indeterminate": "_indeterminate_1rtxhkq_97",
|
|
17
|
+
"disabled": "_disabled_1rtxhkq_105",
|
|
18
|
+
"error": "_error_1rtxhkq_134",
|
|
19
|
+
"checkmark": "_checkmark_1rtxhkq_161",
|
|
20
|
+
"markS": "_markS_1rtxhkq_186",
|
|
21
|
+
"markM": "_markM_1rtxhkq_189",
|
|
22
|
+
"markL": "_markL_1rtxhkq_192",
|
|
23
|
+
"errorMessage": "_errorMessage_1rtxhkq_196"
|
|
24
24
|
};
|
|
25
25
|
export { styles as default };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Theme } from '@rescui/ui-contexts';
|
|
3
|
-
import { CheckboxSize } from './checkbox-control-inner';
|
|
4
|
-
export
|
|
5
|
-
value: string[];
|
|
6
|
-
addToValue?: (val: string) => void;
|
|
7
|
-
removeFromValue?: (val: string) => void;
|
|
8
|
-
inGroup: boolean;
|
|
9
|
-
handleCheckboxChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
10
|
-
isError?: boolean;
|
|
11
|
-
errorId?: string;
|
|
12
|
-
theme?: Theme;
|
|
13
|
-
size?: CheckboxSize;
|
|
14
|
-
mode?: 'classic' | 'rock';
|
|
15
|
-
disabled?: boolean;
|
|
16
|
-
};
|
|
17
|
-
export declare const GroupContext: React.Context<GroupContextValue>;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Theme } from '@rescui/ui-contexts';
|
|
3
|
+
import { CheckboxSize } from './checkbox-control-inner';
|
|
4
|
+
export type GroupContextValue = {
|
|
5
|
+
value: string[];
|
|
6
|
+
addToValue?: (val: string) => void;
|
|
7
|
+
removeFromValue?: (val: string) => void;
|
|
8
|
+
inGroup: boolean;
|
|
9
|
+
handleCheckboxChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
10
|
+
isError?: boolean;
|
|
11
|
+
errorId?: string;
|
|
12
|
+
theme?: Theme;
|
|
13
|
+
size?: CheckboxSize;
|
|
14
|
+
mode?: 'classic' | 'rock';
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
};
|
|
17
|
+
export declare const GroupContext: React.Context<GroupContextValue>;
|
package/lib/parts/marks.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export
|
|
3
|
-
className?: string;
|
|
4
|
-
'data-test'?: string;
|
|
5
|
-
};
|
|
6
|
-
export declare const MarkS: React.FC<MarkProps>;
|
|
7
|
-
export declare const MarkM: React.FC<MarkProps>;
|
|
8
|
-
export declare const MarkL: React.FC<MarkProps>;
|
|
9
|
-
export declare const Mark: React.FC<MarkProps>;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type MarkProps = {
|
|
3
|
+
className?: string;
|
|
4
|
+
'data-test'?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const MarkS: React.FC<MarkProps>;
|
|
7
|
+
export declare const MarkM: React.FC<MarkProps>;
|
|
8
|
+
export declare const MarkL: React.FC<MarkProps>;
|
|
9
|
+
export declare const Mark: React.FC<MarkProps>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const useBackwardCompatibleId: {
|
|
2
|
-
(): string | number;
|
|
3
|
-
counter: number;
|
|
4
|
-
};
|
|
1
|
+
export declare const useBackwardCompatibleId: {
|
|
2
|
+
(): string | number;
|
|
3
|
+
counter: number;
|
|
4
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rescui/checkbox",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "JetBrains",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@babel/runtime-corejs3": "^7.26.0",
|
|
19
|
-
"@rescui/form-field": "^0.1.
|
|
20
|
-
"@rescui/menu": "^0.13.
|
|
19
|
+
"@rescui/form-field": "^0.1.4",
|
|
20
|
+
"@rescui/menu": "^0.13.6",
|
|
21
21
|
"classnames": "^2.2.6"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"react": ">=16.8.0 <20"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@rescui/colors": "^0.3.
|
|
29
|
+
"@rescui/colors": "^0.3.1",
|
|
30
30
|
"@rescui/postcss-preset-library": "^0.2.2",
|
|
31
|
-
"@rescui/scripts": "^0.5.
|
|
32
|
-
"@rescui/typography": "^0.
|
|
31
|
+
"@rescui/scripts": "^0.5.2",
|
|
32
|
+
"@rescui/typography": "^0.27.1",
|
|
33
33
|
"@rescui/visual-regression": "^0.1.4"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"build-pcss-api": "rescui-scripts build-pcss-api --file public-api.p.css"
|
|
38
38
|
},
|
|
39
39
|
"nx": {},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "a04f6790abce8e72834eedce3512ee83513c5e78"
|
|
41
41
|
}
|