@rockshin/tao-ui 0.0.20 → 0.0.22
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/README.md +8 -1
- package/component-manifest.json +77 -48
- package/dist/components/button/button.css +11 -11
- package/dist/components/button/button.d.ts +3 -2
- package/dist/components/button/button.js +55 -47
- package/dist/components/checkbox/checkbox.d.ts +3 -2
- package/dist/components/checkbox/checkbox.js +91 -81
- package/dist/components/date-picker/calendar/calendar-grid.d.ts +7 -1
- package/dist/components/date-picker/calendar/calendar-grid.js +158 -160
- package/dist/components/date-picker/calendar/time-panel.js +64 -70
- package/dist/components/date-picker/date-picker.css +11 -5
- package/dist/components/date-picker/date-picker.d.ts +13 -5
- package/dist/components/date-picker/date-picker.js +389 -718
- package/dist/components/date-picker/range-picker.d.ts +12 -5
- package/dist/components/date-picker/range-picker.js +68 -12
- package/dist/components/date-picker/types.d.ts +5 -0
- package/dist/components/drawer/drawer.css +3 -1
- package/dist/components/drawer/drawer.js +119 -133
- package/dist/components/form-field/form-field.d.ts +1 -1
- package/dist/components/form-field/form-field.js +106 -63
- package/dist/components/input/input.css +30 -9
- package/dist/components/input/input.d.ts +2 -1
- package/dist/components/input/input.js +76 -70
- package/dist/components/input-number/input-number.d.ts +5 -3
- package/dist/components/input-number/input-number.js +63 -47
- package/dist/components/modal/modal.css +2 -1
- package/dist/components/modal/modal.js +116 -130
- package/dist/components/radio/radio.d.ts +3 -2
- package/dist/components/radio/radio.js +43 -39
- package/dist/components/select/mobile-select.d.ts +1 -1
- package/dist/components/select/mobile-select.js +1 -1
- package/dist/components/select/select-icons.d.ts +7 -0
- package/dist/components/select/select-icons.js +141 -0
- package/dist/components/select/select-model.d.ts +4 -0
- package/dist/components/select/select-model.js +22 -0
- package/dist/components/select/select-searchable-list.d.ts +22 -0
- package/dist/components/select/select-searchable-list.js +101 -0
- package/dist/components/select/select-tags.d.ts +15 -0
- package/dist/components/select/select-tags.js +152 -0
- package/dist/components/select/select-types.d.ts +82 -0
- package/dist/components/select/select-types.js +0 -0
- package/dist/components/select/select.css +2 -1
- package/dist/components/select/select.d.ts +2 -118
- package/dist/components/select/select.js +91 -404
- package/dist/components/select/use-is-mobile.js +2 -5
- package/dist/components/sonner/sonner.js +9 -3
- package/dist/components/spinner/spinner.css +1 -1
- package/dist/components/splitter/splitter.js +181 -133
- package/dist/components/switch/switch.css +17 -8
- package/dist/components/switch/switch.d.ts +3 -2
- package/dist/components/switch/switch.js +90 -79
- package/dist/components/table/table-filter.d.ts +6 -0
- package/dist/components/table/table-filter.js +123 -0
- package/dist/components/table/table-icons.d.ts +9 -0
- package/dist/components/table/table-icons.js +157 -0
- package/dist/components/table/table-model.d.ts +11 -0
- package/dist/components/table/table-model.js +33 -0
- package/dist/components/table/table-types.d.ts +87 -0
- package/dist/components/table/table-types.js +0 -0
- package/dist/components/table/table.css +14 -15
- package/dist/components/table/table.d.ts +3 -101
- package/dist/components/table/table.js +29 -329
- package/dist/components/tabs/tabs.css +5 -2
- package/dist/components/tabs/tabs.js +71 -62
- package/dist/components/textarea/textarea.d.ts +5 -3
- package/dist/components/textarea/textarea.js +102 -85
- package/dist/docs/component-docs.d.ts +1 -0
- package/dist/docs/components/breadcrumb.doc.js +3 -1
- package/dist/docs/components/checkbox.doc.js +2 -5
- package/dist/docs/components/context-menu.doc.js +7 -2
- package/dist/docs/components/drawer.doc.js +4 -2
- package/dist/docs/components/dropdown.doc.js +7 -3
- package/dist/docs/components/form-field.doc.js +0 -1
- package/dist/docs/components/form-layout.doc.d.ts +1 -0
- package/dist/docs/components/form-layout.doc.js +3 -0
- package/dist/docs/components/form-section.doc.js +1 -1
- package/dist/docs/components/input-number.doc.js +2 -3
- package/dist/docs/components/input.doc.js +1 -2
- package/dist/docs/components/modal.doc.js +1 -1
- package/dist/docs/components/pagination.doc.js +1 -3
- package/dist/docs/components/radio.doc.js +1 -4
- package/dist/docs/components/range-picker.doc.js +2 -2
- package/dist/docs/components/select.doc.js +19 -6
- package/dist/docs/components/spinner.doc.js +4 -1
- package/dist/docs/components/splitter.doc.js +1 -1
- package/dist/docs/components/stack.doc.d.ts +1 -0
- package/dist/docs/components/stack.doc.js +3 -0
- package/dist/docs/components/switch.doc.js +1 -2
- package/dist/docs/components/table.doc.js +9 -4
- package/dist/docs/components/tabs.doc.js +2 -1
- package/dist/docs/components/tag.doc.js +1 -0
- package/dist/docs/components/tao-provider.doc.js +1 -2
- package/dist/index.d.ts +7 -9
- package/dist/index.js +4 -5
- package/dist/layouts/form-layout/form-layout.d.ts +8 -2
- package/dist/layouts/form-layout/form-layout.js +33 -9
- package/dist/layouts/stack/stack.d.ts +8 -2
- package/dist/layouts/stack/stack.js +36 -12
- package/dist/provider/tao-provider.d.ts +3 -9
- package/dist/provider/tao-provider.js +99 -33
- package/dist/theme/theme.css +24 -14
- package/dist/theme/tokens.d.ts +2 -2
- package/dist/theme/tokens.js +4 -1
- package/dist/utils/portal.d.ts +4 -0
- package/dist/utils/portal.js +4 -0
- package/dist/utils/refs.d.ts +2 -0
- package/dist/utils/refs.js +7 -0
- package/llms.txt +26 -24
- package/package.json +16 -4
|
@@ -1,77 +1,92 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import { useNumberInput } from "../../number-input/use-number-input.js";
|
|
4
|
+
import { mergeRefs } from "../../utils/refs.js";
|
|
4
5
|
import { Input } from "../input/input.js";
|
|
5
6
|
function InputNumber(t0) {
|
|
6
|
-
const $ = c(
|
|
7
|
+
const $ = c(40);
|
|
7
8
|
let ariaLabel;
|
|
8
9
|
let className;
|
|
9
10
|
let classNames;
|
|
10
11
|
let disabled;
|
|
11
12
|
let error;
|
|
13
|
+
let forwardedRef;
|
|
12
14
|
let hookOptions;
|
|
13
15
|
let id;
|
|
14
16
|
let name;
|
|
15
17
|
let placeholder;
|
|
16
18
|
let prefix;
|
|
17
19
|
let size;
|
|
20
|
+
let status;
|
|
18
21
|
let styles;
|
|
19
22
|
let suffix;
|
|
20
23
|
let variant;
|
|
21
24
|
if ($[0] !== t0) {
|
|
22
|
-
({ prefix, suffix, size, variant, error, disabled, placeholder, id, name, "aria-label": ariaLabel, className, classNames, styles, ...hookOptions } = t0);
|
|
25
|
+
({ prefix, suffix, size, variant, error, status, disabled, placeholder, id, name, "aria-label": ariaLabel, className, classNames, styles, ref: forwardedRef, ...hookOptions } = t0);
|
|
23
26
|
$[0] = t0;
|
|
24
27
|
$[1] = ariaLabel;
|
|
25
28
|
$[2] = className;
|
|
26
29
|
$[3] = classNames;
|
|
27
30
|
$[4] = disabled;
|
|
28
31
|
$[5] = error;
|
|
29
|
-
$[6] =
|
|
30
|
-
$[7] =
|
|
31
|
-
$[8] =
|
|
32
|
-
$[9] =
|
|
33
|
-
$[10] =
|
|
34
|
-
$[11] =
|
|
35
|
-
$[12] =
|
|
36
|
-
$[13] =
|
|
37
|
-
$[14] =
|
|
32
|
+
$[6] = forwardedRef;
|
|
33
|
+
$[7] = hookOptions;
|
|
34
|
+
$[8] = id;
|
|
35
|
+
$[9] = name;
|
|
36
|
+
$[10] = placeholder;
|
|
37
|
+
$[11] = prefix;
|
|
38
|
+
$[12] = size;
|
|
39
|
+
$[13] = status;
|
|
40
|
+
$[14] = styles;
|
|
41
|
+
$[15] = suffix;
|
|
42
|
+
$[16] = variant;
|
|
38
43
|
} else {
|
|
39
44
|
ariaLabel = $[1];
|
|
40
45
|
className = $[2];
|
|
41
46
|
classNames = $[3];
|
|
42
47
|
disabled = $[4];
|
|
43
48
|
error = $[5];
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
forwardedRef = $[6];
|
|
50
|
+
hookOptions = $[7];
|
|
51
|
+
id = $[8];
|
|
52
|
+
name = $[9];
|
|
53
|
+
placeholder = $[10];
|
|
54
|
+
prefix = $[11];
|
|
55
|
+
size = $[12];
|
|
56
|
+
status = $[13];
|
|
57
|
+
styles = $[14];
|
|
58
|
+
suffix = $[15];
|
|
59
|
+
variant = $[16];
|
|
53
60
|
}
|
|
54
61
|
const { inputProps } = useNumberInput(hookOptions);
|
|
55
62
|
let inputRest;
|
|
56
63
|
let ref;
|
|
57
|
-
if ($[
|
|
64
|
+
if ($[17] !== inputProps) {
|
|
58
65
|
({ ref, ...inputRest } = inputProps);
|
|
59
|
-
$[
|
|
60
|
-
$[
|
|
61
|
-
$[
|
|
66
|
+
$[17] = inputProps;
|
|
67
|
+
$[18] = inputRest;
|
|
68
|
+
$[19] = ref;
|
|
62
69
|
} else {
|
|
63
|
-
inputRest = $[
|
|
64
|
-
ref = $[
|
|
70
|
+
inputRest = $[18];
|
|
71
|
+
ref = $[19];
|
|
65
72
|
}
|
|
66
73
|
let t1;
|
|
67
|
-
if ($[
|
|
68
|
-
t1 =
|
|
69
|
-
|
|
74
|
+
if ($[20] !== forwardedRef || $[21] !== ref) {
|
|
75
|
+
t1 = mergeRefs(ref, forwardedRef);
|
|
76
|
+
$[20] = forwardedRef;
|
|
77
|
+
$[21] = ref;
|
|
78
|
+
$[22] = t1;
|
|
79
|
+
} else t1 = $[22];
|
|
80
|
+
let t2;
|
|
81
|
+
if ($[23] !== ariaLabel || $[24] !== className || $[25] !== classNames || $[26] !== disabled || $[27] !== error || $[28] !== id || $[29] !== inputRest || $[30] !== name || $[31] !== placeholder || $[32] !== prefix || $[33] !== size || $[34] !== status || $[35] !== styles || $[36] !== suffix || $[37] !== t1 || $[38] !== variant) {
|
|
82
|
+
t2 = /*#__PURE__*/ jsx(Input, {
|
|
83
|
+
ref: t1,
|
|
70
84
|
prefix: prefix,
|
|
71
85
|
suffix: suffix,
|
|
72
86
|
size: size,
|
|
73
87
|
variant: variant,
|
|
74
88
|
error: error,
|
|
89
|
+
status: status,
|
|
75
90
|
disabled: disabled,
|
|
76
91
|
placeholder: placeholder,
|
|
77
92
|
id: id,
|
|
@@ -82,23 +97,24 @@ function InputNumber(t0) {
|
|
|
82
97
|
styles: styles,
|
|
83
98
|
...inputRest
|
|
84
99
|
});
|
|
85
|
-
$[
|
|
86
|
-
$[
|
|
87
|
-
$[
|
|
88
|
-
$[
|
|
89
|
-
$[
|
|
90
|
-
$[
|
|
91
|
-
$[
|
|
92
|
-
$[
|
|
93
|
-
$[
|
|
94
|
-
$[
|
|
95
|
-
$[
|
|
96
|
-
$[
|
|
97
|
-
$[
|
|
98
|
-
$[
|
|
99
|
-
$[
|
|
100
|
-
$[
|
|
101
|
-
|
|
102
|
-
|
|
100
|
+
$[23] = ariaLabel;
|
|
101
|
+
$[24] = className;
|
|
102
|
+
$[25] = classNames;
|
|
103
|
+
$[26] = disabled;
|
|
104
|
+
$[27] = error;
|
|
105
|
+
$[28] = id;
|
|
106
|
+
$[29] = inputRest;
|
|
107
|
+
$[30] = name;
|
|
108
|
+
$[31] = placeholder;
|
|
109
|
+
$[32] = prefix;
|
|
110
|
+
$[33] = size;
|
|
111
|
+
$[34] = status;
|
|
112
|
+
$[35] = styles;
|
|
113
|
+
$[36] = suffix;
|
|
114
|
+
$[37] = t1;
|
|
115
|
+
$[38] = variant;
|
|
116
|
+
$[39] = t2;
|
|
117
|
+
} else t2 = $[39];
|
|
118
|
+
return t2;
|
|
103
119
|
}
|
|
104
120
|
export { InputNumber };
|
|
@@ -93,7 +93,8 @@ button[data-tao-modal-close] {
|
|
|
93
93
|
color: var(--tao-color-text-tertiary);
|
|
94
94
|
cursor: pointer;
|
|
95
95
|
margin: 0;
|
|
96
|
-
transition:
|
|
96
|
+
transition: background-color var(--tao-motion-duration-fast) ease-out,
|
|
97
|
+
color var(--tao-motion-duration-fast) ease-out;
|
|
97
98
|
appearance: none;
|
|
98
99
|
background: none;
|
|
99
100
|
border: none;
|
|
@@ -2,12 +2,13 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import { useEffect, useRef } from "react";
|
|
4
4
|
import { TaoPortalScope } from "../../provider/tao-provider.js";
|
|
5
|
+
import { preventParentOutsideDismiss } from "../../utils/portal.js";
|
|
5
6
|
import { cx } from "../../utils/semantic.js";
|
|
6
7
|
import { Button } from "../button/button.js";
|
|
7
8
|
import "./modal.css";
|
|
8
9
|
import * as __rspack_external__radix_ui_react_dialog_dabd8325 from "@radix-ui/react-dialog";
|
|
9
10
|
function Modal(t0) {
|
|
10
|
-
const $ = c(
|
|
11
|
+
const $ = c(83);
|
|
11
12
|
const { open, onClose, title, footer, onOk, okText: t1, cancelText: t2, confirmLoading, okButtonProps, cancelButtonProps, width: t3, centered: t4, closable: t5, maskClosable: t6, keyboard: t7, afterClose, destroyOnHidden: t8, children, classNames, styles: stylesProp } = t0;
|
|
12
13
|
const okText = void 0 === t1 ? "OK" : t1;
|
|
13
14
|
const cancelText = void 0 === t2 ? "Cancel" : t2;
|
|
@@ -141,55 +142,42 @@ function Modal(t0) {
|
|
|
141
142
|
$[31] = t21;
|
|
142
143
|
} else t21 = $[31];
|
|
143
144
|
const t22 = stylesProp?.overlay;
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
145
|
+
const t23 = maskClosable ? onClose : void 0;
|
|
146
|
+
let t24;
|
|
147
|
+
if ($[32] !== forceMount || $[33] !== t21 || $[34] !== t22 || $[35] !== t23) {
|
|
148
|
+
t24 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_dabd8325.Overlay, {
|
|
147
149
|
forceMount: forceMount,
|
|
148
150
|
"data-tao-modal-overlay": "",
|
|
149
151
|
className: t21,
|
|
150
|
-
style: t22
|
|
152
|
+
style: t22,
|
|
153
|
+
onClick: t23
|
|
151
154
|
});
|
|
152
155
|
$[32] = forceMount;
|
|
153
156
|
$[33] = t21;
|
|
154
157
|
$[34] = t22;
|
|
155
158
|
$[35] = t23;
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
const t25 =
|
|
159
|
-
const t26 =
|
|
160
|
-
|
|
161
|
-
if ($[36] !== t26) {
|
|
162
|
-
t27 = cx(t26);
|
|
163
|
-
$[36] = t26;
|
|
164
|
-
$[37] = t27;
|
|
165
|
-
} else t27 = $[37];
|
|
159
|
+
$[36] = t24;
|
|
160
|
+
} else t24 = $[36];
|
|
161
|
+
const t25 = centered ? "" : void 0;
|
|
162
|
+
const t26 = open ? "" : void 0;
|
|
163
|
+
const t27 = classNames?.root;
|
|
166
164
|
let t28;
|
|
167
|
-
if ($[
|
|
168
|
-
t28 = (
|
|
165
|
+
if ($[37] !== t27) {
|
|
166
|
+
t28 = cx(t27);
|
|
167
|
+
$[37] = t27;
|
|
168
|
+
$[38] = t28;
|
|
169
|
+
} else t28 = $[38];
|
|
170
|
+
let t29;
|
|
171
|
+
if ($[39] !== keyboard) {
|
|
172
|
+
t29 = (e)=>{
|
|
169
173
|
if (!keyboard) e.preventDefault();
|
|
170
174
|
};
|
|
171
|
-
$[
|
|
172
|
-
$[
|
|
173
|
-
} else
|
|
174
|
-
let t29;
|
|
175
|
+
$[39] = keyboard;
|
|
176
|
+
$[40] = t29;
|
|
177
|
+
} else t29 = $[40];
|
|
175
178
|
let t30;
|
|
176
|
-
if ($[
|
|
177
|
-
|
|
178
|
-
if (!maskClosable) e_0.preventDefault();
|
|
179
|
-
};
|
|
180
|
-
t30 = (e_1)=>{
|
|
181
|
-
if (!maskClosable) e_1.preventDefault();
|
|
182
|
-
};
|
|
183
|
-
$[40] = maskClosable;
|
|
184
|
-
$[41] = t29;
|
|
185
|
-
$[42] = t30;
|
|
186
|
-
} else {
|
|
187
|
-
t29 = $[41];
|
|
188
|
-
t30 = $[42];
|
|
189
|
-
}
|
|
190
|
-
let t31;
|
|
191
|
-
if ($[43] !== classNames?.close || $[44] !== classNames?.header || $[45] !== classNames?.title || $[46] !== closable || $[47] !== onClose || $[48] !== stylesProp?.close || $[49] !== stylesProp?.header || $[50] !== stylesProp?.title || $[51] !== title) {
|
|
192
|
-
t31 = (null != title || closable) && /*#__PURE__*/ jsxs("div", {
|
|
179
|
+
if ($[41] !== classNames?.close || $[42] !== classNames?.header || $[43] !== classNames?.title || $[44] !== closable || $[45] !== onClose || $[46] !== stylesProp?.close || $[47] !== stylesProp?.header || $[48] !== stylesProp?.title || $[49] !== title) {
|
|
180
|
+
t30 = (null != title || closable) && /*#__PURE__*/ jsxs("div", {
|
|
193
181
|
"data-tao-modal-header": "",
|
|
194
182
|
className: cx(classNames?.header),
|
|
195
183
|
style: stylesProp?.header,
|
|
@@ -216,127 +204,125 @@ function Modal(t0) {
|
|
|
216
204
|
})
|
|
217
205
|
]
|
|
218
206
|
});
|
|
219
|
-
$[
|
|
220
|
-
$[
|
|
221
|
-
$[
|
|
222
|
-
$[
|
|
223
|
-
$[
|
|
224
|
-
$[
|
|
225
|
-
$[
|
|
226
|
-
$[
|
|
227
|
-
$[
|
|
228
|
-
$[
|
|
229
|
-
} else
|
|
230
|
-
const
|
|
231
|
-
let
|
|
232
|
-
if ($[
|
|
233
|
-
|
|
234
|
-
$[
|
|
235
|
-
$[
|
|
236
|
-
} else
|
|
237
|
-
const
|
|
238
|
-
let
|
|
239
|
-
if ($[
|
|
240
|
-
|
|
207
|
+
$[41] = classNames?.close;
|
|
208
|
+
$[42] = classNames?.header;
|
|
209
|
+
$[43] = classNames?.title;
|
|
210
|
+
$[44] = closable;
|
|
211
|
+
$[45] = onClose;
|
|
212
|
+
$[46] = stylesProp?.close;
|
|
213
|
+
$[47] = stylesProp?.header;
|
|
214
|
+
$[48] = stylesProp?.title;
|
|
215
|
+
$[49] = title;
|
|
216
|
+
$[50] = t30;
|
|
217
|
+
} else t30 = $[50];
|
|
218
|
+
const t31 = classNames?.body;
|
|
219
|
+
let t32;
|
|
220
|
+
if ($[51] !== t31) {
|
|
221
|
+
t32 = cx(t31);
|
|
222
|
+
$[51] = t31;
|
|
223
|
+
$[52] = t32;
|
|
224
|
+
} else t32 = $[52];
|
|
225
|
+
const t33 = stylesProp?.body;
|
|
226
|
+
let t34;
|
|
227
|
+
if ($[53] !== children || $[54] !== t32 || $[55] !== t33) {
|
|
228
|
+
t34 = /*#__PURE__*/ jsx("div", {
|
|
241
229
|
"data-tao-modal-body": "",
|
|
242
|
-
className:
|
|
243
|
-
style:
|
|
230
|
+
className: t32,
|
|
231
|
+
style: t33,
|
|
244
232
|
children: children
|
|
245
233
|
});
|
|
246
|
-
$[
|
|
247
|
-
$[
|
|
248
|
-
$[
|
|
249
|
-
$[
|
|
250
|
-
} else
|
|
251
|
-
let
|
|
252
|
-
if ($[
|
|
253
|
-
|
|
234
|
+
$[53] = children;
|
|
235
|
+
$[54] = t32;
|
|
236
|
+
$[55] = t33;
|
|
237
|
+
$[56] = t34;
|
|
238
|
+
} else t34 = $[56];
|
|
239
|
+
let t35;
|
|
240
|
+
if ($[57] !== classNames?.footer || $[58] !== footerContent || $[59] !== stylesProp?.footer) {
|
|
241
|
+
t35 = null != footerContent && /*#__PURE__*/ jsx("div", {
|
|
254
242
|
"data-tao-modal-footer": "",
|
|
255
243
|
className: cx(classNames?.footer),
|
|
256
244
|
style: stylesProp?.footer,
|
|
257
245
|
children: footerContent
|
|
258
246
|
});
|
|
259
|
-
$[
|
|
260
|
-
$[
|
|
261
|
-
$[
|
|
262
|
-
$[
|
|
263
|
-
} else
|
|
264
|
-
let
|
|
265
|
-
if ($[
|
|
266
|
-
|
|
247
|
+
$[57] = classNames?.footer;
|
|
248
|
+
$[58] = footerContent;
|
|
249
|
+
$[59] = stylesProp?.footer;
|
|
250
|
+
$[60] = t35;
|
|
251
|
+
} else t35 = $[60];
|
|
252
|
+
let t36;
|
|
253
|
+
if ($[61] !== contentStyle || $[62] !== forceMount || $[63] !== t28 || $[64] !== t29 || $[65] !== t30 || $[66] !== t34 || $[67] !== t35) {
|
|
254
|
+
t36 = /*#__PURE__*/ jsxs(__rspack_external__radix_ui_react_dialog_dabd8325.Content, {
|
|
267
255
|
forceMount: forceMount,
|
|
268
256
|
"data-tao-modal": "",
|
|
269
257
|
style: contentStyle,
|
|
270
|
-
className:
|
|
258
|
+
className: t28,
|
|
271
259
|
"aria-describedby": void 0,
|
|
272
|
-
onEscapeKeyDown:
|
|
273
|
-
onPointerDownOutside:
|
|
274
|
-
onInteractOutside:
|
|
260
|
+
onEscapeKeyDown: t29,
|
|
261
|
+
onPointerDownOutside: preventParentOutsideDismiss,
|
|
262
|
+
onInteractOutside: preventParentOutsideDismiss,
|
|
275
263
|
children: [
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
264
|
+
t30,
|
|
265
|
+
t34,
|
|
266
|
+
t35
|
|
279
267
|
]
|
|
280
268
|
});
|
|
281
|
-
$[
|
|
282
|
-
$[
|
|
283
|
-
$[
|
|
284
|
-
$[
|
|
285
|
-
$[
|
|
286
|
-
$[
|
|
287
|
-
$[
|
|
288
|
-
$[
|
|
269
|
+
$[61] = contentStyle;
|
|
270
|
+
$[62] = forceMount;
|
|
271
|
+
$[63] = t28;
|
|
272
|
+
$[64] = t29;
|
|
273
|
+
$[65] = t30;
|
|
274
|
+
$[66] = t34;
|
|
275
|
+
$[67] = t35;
|
|
276
|
+
$[68] = t36;
|
|
277
|
+
} else t36 = $[68];
|
|
278
|
+
let t37;
|
|
279
|
+
if ($[69] !== t25 || $[70] !== t26 || $[71] !== t36) {
|
|
280
|
+
t37 = /*#__PURE__*/ jsx("div", {
|
|
281
|
+
"data-tao-modal-wrap": "",
|
|
282
|
+
"data-tao-centered": t25,
|
|
283
|
+
"data-tao-open": t26,
|
|
284
|
+
children: t36
|
|
285
|
+
});
|
|
286
|
+
$[69] = t25;
|
|
287
|
+
$[70] = t26;
|
|
289
288
|
$[71] = t36;
|
|
290
289
|
$[72] = t37;
|
|
291
290
|
} else t37 = $[72];
|
|
292
291
|
let t38;
|
|
293
|
-
if ($[73] !== t24 || $[74] !==
|
|
294
|
-
t38 = /*#__PURE__*/
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
292
|
+
if ($[73] !== t24 || $[74] !== t37) {
|
|
293
|
+
t38 = /*#__PURE__*/ jsxs(TaoPortalScope, {
|
|
294
|
+
children: [
|
|
295
|
+
t24,
|
|
296
|
+
t37
|
|
297
|
+
]
|
|
299
298
|
});
|
|
300
299
|
$[73] = t24;
|
|
301
|
-
$[74] =
|
|
302
|
-
$[75] =
|
|
303
|
-
|
|
304
|
-
} else t38 = $[76];
|
|
300
|
+
$[74] = t37;
|
|
301
|
+
$[75] = t38;
|
|
302
|
+
} else t38 = $[75];
|
|
305
303
|
let t39;
|
|
306
|
-
if ($[
|
|
307
|
-
t39 = /*#__PURE__*/
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
t38
|
|
311
|
-
]
|
|
304
|
+
if ($[76] !== forceMount || $[77] !== t38) {
|
|
305
|
+
t39 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_dabd8325.Portal, {
|
|
306
|
+
forceMount: forceMount,
|
|
307
|
+
children: t38
|
|
312
308
|
});
|
|
313
|
-
$[
|
|
314
|
-
$[
|
|
315
|
-
$[
|
|
316
|
-
} else t39 = $[
|
|
309
|
+
$[76] = forceMount;
|
|
310
|
+
$[77] = t38;
|
|
311
|
+
$[78] = t39;
|
|
312
|
+
} else t39 = $[78];
|
|
317
313
|
let t40;
|
|
318
|
-
if ($[80] !==
|
|
319
|
-
t40 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_dabd8325.
|
|
320
|
-
|
|
314
|
+
if ($[79] !== open || $[80] !== t19 || $[81] !== t39) {
|
|
315
|
+
t40 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_dabd8325.Root, {
|
|
316
|
+
open: open,
|
|
317
|
+
onOpenChange: t19,
|
|
321
318
|
children: t39
|
|
322
319
|
});
|
|
323
|
-
$[
|
|
320
|
+
$[79] = open;
|
|
321
|
+
$[80] = t19;
|
|
324
322
|
$[81] = t39;
|
|
325
323
|
$[82] = t40;
|
|
326
324
|
} else t40 = $[82];
|
|
327
|
-
|
|
328
|
-
if ($[83] !== open || $[84] !== t19 || $[85] !== t40) {
|
|
329
|
-
t41 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_dabd8325.Root, {
|
|
330
|
-
open: open,
|
|
331
|
-
onOpenChange: t19,
|
|
332
|
-
children: t40
|
|
333
|
-
});
|
|
334
|
-
$[83] = open;
|
|
335
|
-
$[84] = t19;
|
|
336
|
-
$[85] = t40;
|
|
337
|
-
$[86] = t41;
|
|
338
|
-
} else t41 = $[86];
|
|
339
|
-
return t41;
|
|
325
|
+
return t40;
|
|
340
326
|
}
|
|
341
327
|
function CloseIcon() {
|
|
342
328
|
const $ = c(1);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ChangeEvent, type ReactNode } from 'react';
|
|
1
|
+
import { type ChangeEvent, type ReactNode, type Ref } from 'react';
|
|
2
2
|
import { type TaoSize } from '../../provider/tao-provider';
|
|
3
3
|
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic';
|
|
4
4
|
import './radio.css';
|
|
@@ -13,8 +13,9 @@ export interface RadioProps {
|
|
|
13
13
|
name?: string;
|
|
14
14
|
classNames?: SemanticClassNames<RadioSemanticPart>;
|
|
15
15
|
styles?: SemanticStyles<RadioSemanticPart>;
|
|
16
|
+
ref?: Ref<HTMLInputElement>;
|
|
16
17
|
}
|
|
17
|
-
export declare function Radio({ value, checked, disabled, onChange, children, name, classNames, styles, }: RadioProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function Radio({ value, checked, defaultChecked, disabled, onChange, children, name, classNames, styles, ref, }: RadioProps): import("react/jsx-runtime").JSX.Element;
|
|
18
19
|
export type RadioOptionType = {
|
|
19
20
|
label: ReactNode;
|
|
20
21
|
value: string;
|
|
@@ -6,8 +6,8 @@ import { cx } from "../../utils/semantic.js";
|
|
|
6
6
|
import "./radio.css";
|
|
7
7
|
const RadioGroupContext = /*#__PURE__*/ createContext(null);
|
|
8
8
|
function Radio(t0) {
|
|
9
|
-
const $ = c(
|
|
10
|
-
const { value, checked, disabled, onChange, children, name, classNames, styles } = t0;
|
|
9
|
+
const $ = c(33);
|
|
10
|
+
const { value, checked, defaultChecked, disabled, onChange, children, name, classNames, styles, ref } = t0;
|
|
11
11
|
const ctx = useTaoConfig();
|
|
12
12
|
const groupCtx = useContext(RadioGroupContext);
|
|
13
13
|
const resolvedDisabled = disabled ?? groupCtx?.disabled ?? ctx.disabled ?? false;
|
|
@@ -35,47 +35,51 @@ function Radio(t0) {
|
|
|
35
35
|
} else t4 = $[5];
|
|
36
36
|
const t5 = styles?.root;
|
|
37
37
|
let t6;
|
|
38
|
-
if ($[6] !==
|
|
38
|
+
if ($[6] !== defaultChecked || $[7] !== handleChange || $[8] !== ref || $[9] !== resolvedChecked || $[10] !== resolvedDisabled || $[11] !== resolvedName || $[12] !== value) {
|
|
39
39
|
t6 = /*#__PURE__*/ jsx("input", {
|
|
40
|
+
ref: ref,
|
|
40
41
|
type: "radio",
|
|
41
42
|
name: resolvedName,
|
|
42
43
|
value: value,
|
|
43
44
|
checked: resolvedChecked,
|
|
45
|
+
defaultChecked: defaultChecked,
|
|
44
46
|
disabled: resolvedDisabled,
|
|
45
47
|
onChange: handleChange,
|
|
46
48
|
"data-tao-radio-input": ""
|
|
47
49
|
});
|
|
48
|
-
$[6] =
|
|
49
|
-
$[7] =
|
|
50
|
-
$[8] =
|
|
51
|
-
$[9] =
|
|
52
|
-
$[10] =
|
|
53
|
-
$[11] =
|
|
54
|
-
|
|
50
|
+
$[6] = defaultChecked;
|
|
51
|
+
$[7] = handleChange;
|
|
52
|
+
$[8] = ref;
|
|
53
|
+
$[9] = resolvedChecked;
|
|
54
|
+
$[10] = resolvedDisabled;
|
|
55
|
+
$[11] = resolvedName;
|
|
56
|
+
$[12] = value;
|
|
57
|
+
$[13] = t6;
|
|
58
|
+
} else t6 = $[13];
|
|
55
59
|
const t7 = resolvedChecked || void 0;
|
|
56
60
|
const t8 = classNames?.indicator;
|
|
57
61
|
let t9;
|
|
58
|
-
if ($[
|
|
62
|
+
if ($[14] !== t8) {
|
|
59
63
|
t9 = cx(t8);
|
|
60
|
-
$[
|
|
61
|
-
$[
|
|
62
|
-
} else t9 = $[
|
|
64
|
+
$[14] = t8;
|
|
65
|
+
$[15] = t9;
|
|
66
|
+
} else t9 = $[15];
|
|
63
67
|
const t10 = styles?.indicator;
|
|
64
68
|
let t11;
|
|
65
|
-
if ($[
|
|
69
|
+
if ($[16] !== t10 || $[17] !== t7 || $[18] !== t9) {
|
|
66
70
|
t11 = /*#__PURE__*/ jsx("span", {
|
|
67
71
|
"data-tao-radio": "",
|
|
68
72
|
"data-tao-checked": t7,
|
|
69
73
|
className: t9,
|
|
70
74
|
style: t10
|
|
71
75
|
});
|
|
72
|
-
$[
|
|
73
|
-
$[
|
|
74
|
-
$[
|
|
75
|
-
$[
|
|
76
|
-
} else t11 = $[
|
|
76
|
+
$[16] = t10;
|
|
77
|
+
$[17] = t7;
|
|
78
|
+
$[18] = t9;
|
|
79
|
+
$[19] = t11;
|
|
80
|
+
} else t11 = $[19];
|
|
77
81
|
let t12;
|
|
78
|
-
if ($[
|
|
82
|
+
if ($[20] !== t11 || $[21] !== t6) {
|
|
79
83
|
t12 = /*#__PURE__*/ jsxs("span", {
|
|
80
84
|
"data-tao-radio-control": "",
|
|
81
85
|
children: [
|
|
@@ -83,25 +87,25 @@ function Radio(t0) {
|
|
|
83
87
|
t11
|
|
84
88
|
]
|
|
85
89
|
});
|
|
86
|
-
$[
|
|
87
|
-
$[
|
|
88
|
-
$[
|
|
89
|
-
} else t12 = $[
|
|
90
|
+
$[20] = t11;
|
|
91
|
+
$[21] = t6;
|
|
92
|
+
$[22] = t12;
|
|
93
|
+
} else t12 = $[22];
|
|
90
94
|
let t13;
|
|
91
|
-
if ($[
|
|
95
|
+
if ($[23] !== children || $[24] !== classNames?.label || $[25] !== styles?.label) {
|
|
92
96
|
t13 = null != children && /*#__PURE__*/ jsx("span", {
|
|
93
97
|
"data-tao-radio-label": "",
|
|
94
98
|
className: cx(classNames?.label),
|
|
95
99
|
style: styles?.label,
|
|
96
100
|
children: children
|
|
97
101
|
});
|
|
98
|
-
$[
|
|
99
|
-
$[
|
|
100
|
-
$[
|
|
101
|
-
$[
|
|
102
|
-
} else t13 = $[
|
|
102
|
+
$[23] = children;
|
|
103
|
+
$[24] = classNames?.label;
|
|
104
|
+
$[25] = styles?.label;
|
|
105
|
+
$[26] = t13;
|
|
106
|
+
} else t13 = $[26];
|
|
103
107
|
let t14;
|
|
104
|
-
if ($[
|
|
108
|
+
if ($[27] !== t12 || $[28] !== t13 || $[29] !== t2 || $[30] !== t4 || $[31] !== t5) {
|
|
105
109
|
t14 = /*#__PURE__*/ jsxs("label", {
|
|
106
110
|
"data-tao-radio-wrapper": "",
|
|
107
111
|
"data-tao-disabled": t2,
|
|
@@ -112,13 +116,13 @@ function Radio(t0) {
|
|
|
112
116
|
t13
|
|
113
117
|
]
|
|
114
118
|
});
|
|
115
|
-
$[
|
|
116
|
-
$[
|
|
117
|
-
$[
|
|
118
|
-
$[
|
|
119
|
-
$[
|
|
120
|
-
$[
|
|
121
|
-
} else t14 = $[
|
|
119
|
+
$[27] = t12;
|
|
120
|
+
$[28] = t13;
|
|
121
|
+
$[29] = t2;
|
|
122
|
+
$[30] = t4;
|
|
123
|
+
$[31] = t5;
|
|
124
|
+
$[32] = t14;
|
|
125
|
+
} else t14 = $[32];
|
|
122
126
|
return t14;
|
|
123
127
|
}
|
|
124
128
|
function RadioGroup(t0) {
|
|
@@ -2,7 +2,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import { useCallback, useMemo, useState } from "react";
|
|
4
4
|
import { Drawer } from "../drawer/drawer.js";
|
|
5
|
-
import { SearchIcon } from "./select.js";
|
|
5
|
+
import { SearchIcon } from "./select-icons.js";
|
|
6
6
|
import "./mobile-select.css";
|
|
7
7
|
const defaultFilter = (input, option)=>{
|
|
8
8
|
const label = 'string' == typeof option.label ? option.label : String(option.label);
|