@rockshin/tao-ui 0.0.56 → 0.0.58
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/component-manifest.json +1 -1
- package/dist/components/app/app-notices.js +10 -3
- package/dist/components/avatar/avatar.js +1 -1
- package/dist/components/badge/badge.js +2 -2
- package/dist/components/breadcrumb/breadcrumb.js +5 -1
- package/dist/components/calendar/calendar.js +4 -1
- package/dist/components/carousel/carousel.js +8 -2
- package/dist/components/collapse/collapse-panels.js +68 -67
- package/dist/components/date-picker/date-localization.js +12 -14
- package/dist/components/divider/divider.js +1 -1
- package/dist/components/float-button/float-button.js +7 -5
- package/dist/components/form/use-form.d.ts +1 -1
- package/dist/components/form/use-form.js +20 -0
- package/dist/components/image/image.js +135 -143
- package/dist/components/input/otp.js +6 -0
- package/dist/components/input/search.js +7 -5
- package/dist/components/list/list.js +106 -105
- package/dist/components/masonry/masonry.js +1 -1
- package/dist/components/modal/modal.js +112 -35
- package/dist/components/pagination/pagination.d.ts +2 -0
- package/dist/components/pagination/pagination.js +4 -0
- package/dist/components/rate/rate.js +83 -72
- package/dist/components/scroll-area/scroll-area.css +1 -1
- package/dist/components/scroll-area/scroll-area.js +294 -222
- package/dist/components/select/select-tags.js +2 -1
- package/dist/components/select/use-select-selection.d.ts +1 -1
- package/dist/components/select/use-select-selection.js +60 -53
- package/dist/components/statistic/statistic.js +84 -78
- package/dist/components/steps/steps.css +8 -0
- package/dist/components/steps/steps.d.ts +5 -1
- package/dist/components/steps/steps.js +126 -116
- package/dist/components/table/table.js +4 -1
- package/dist/components/upload/upload.js +2 -2
- package/dist/number-input/cursor.js +20 -8
- package/dist/number-input/format.js +12 -4
- package/dist/number-input/use-number-input.js +4 -1
- package/package.json +1 -1
|
@@ -20,7 +20,7 @@ const Star = /*#__PURE__*/ jsx("svg", {
|
|
|
20
20
|
})
|
|
21
21
|
});
|
|
22
22
|
const Rate = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
23
|
-
const $ = c(
|
|
23
|
+
const $ = c(69);
|
|
24
24
|
let characterRender;
|
|
25
25
|
let className;
|
|
26
26
|
let classNames;
|
|
@@ -102,37 +102,38 @@ const Rate = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
102
102
|
} else t4 = $[21];
|
|
103
103
|
const numberFormat = t4;
|
|
104
104
|
let t5;
|
|
105
|
-
if ($[22]
|
|
106
|
-
t5 = {
|
|
107
|
-
|
|
105
|
+
if ($[22] !== controlled || $[23] !== count || $[24] !== onChange) {
|
|
106
|
+
t5 = (next)=>{
|
|
107
|
+
const bounded = Math.min(count, Math.max(0, next));
|
|
108
|
+
if (!controlled) setInternalValue(bounded);
|
|
109
|
+
onChange?.(bounded);
|
|
108
110
|
};
|
|
109
|
-
$[22] =
|
|
110
|
-
|
|
111
|
+
$[22] = controlled;
|
|
112
|
+
$[23] = count;
|
|
113
|
+
$[24] = onChange;
|
|
114
|
+
$[25] = t5;
|
|
115
|
+
} else t5 = $[25];
|
|
116
|
+
const handleChange = t5;
|
|
111
117
|
let t6;
|
|
112
|
-
if ($[
|
|
118
|
+
if ($[26] === Symbol.for("react.memo_cache_sentinel")) {
|
|
113
119
|
t6 = {
|
|
114
|
-
|
|
120
|
+
display: "contents"
|
|
115
121
|
};
|
|
116
|
-
$[
|
|
117
|
-
} else t6 = $[
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
const t11 = resolvedDisabled || void 0;
|
|
123
|
-
const t12 = resolvedDisabled || readOnly;
|
|
124
|
-
let t13;
|
|
125
|
-
if ($[24] !== controlled || $[25] !== count || $[26] !== onChange) {
|
|
126
|
-
t13 = (next)=>{
|
|
127
|
-
const bounded = Math.min(count, Math.max(0, next));
|
|
128
|
-
if (!controlled) setInternalValue(bounded);
|
|
129
|
-
onChange?.(bounded);
|
|
122
|
+
$[26] = t6;
|
|
123
|
+
} else t6 = $[26];
|
|
124
|
+
let t7;
|
|
125
|
+
if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
|
|
126
|
+
t7 = {
|
|
127
|
+
role: "radiogroup"
|
|
130
128
|
};
|
|
131
|
-
$[
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
129
|
+
$[27] = t7;
|
|
130
|
+
} else t7 = $[27];
|
|
131
|
+
const t8 = "middle" === size ? "medium" : size ?? config.size;
|
|
132
|
+
const t9 = resolvedDisabled ? "" : void 0;
|
|
133
|
+
const t10 = readOnly ? "" : void 0;
|
|
134
|
+
const t11 = readOnly || void 0;
|
|
135
|
+
const t12 = resolvedDisabled || void 0;
|
|
136
|
+
const t13 = resolvedDisabled || readOnly;
|
|
136
137
|
const t14 = classNames?.root;
|
|
137
138
|
let t15;
|
|
138
139
|
if ($[28] !== className || $[29] !== rootClassName || $[30] !== t14) {
|
|
@@ -154,7 +155,7 @@ const Rate = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
154
155
|
$[34] = t17;
|
|
155
156
|
} else t17 = $[34];
|
|
156
157
|
let t18;
|
|
157
|
-
if ($[35] !== characterRender || $[36] !== classNames?.item || $[37] !== count || $[38] !==
|
|
158
|
+
if ($[35] !== characterRender || $[36] !== classNames?.item || $[37] !== count || $[38] !== handleChange || $[39] !== keyboard || $[40] !== numberFormat || $[41] !== rest || $[42] !== selectedValue || $[43] !== styles?.item || $[44] !== tooltips) {
|
|
158
159
|
t18 = (node, info)=>{
|
|
159
160
|
const index = info.index ?? 0;
|
|
160
161
|
const half = !!info.allowHalf && (info.value ?? 0) > index && (info.value ?? 0) < index + 1;
|
|
@@ -173,7 +174,15 @@ const Rate = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
173
174
|
children: /*#__PURE__*/ cloneElement(radio, {
|
|
174
175
|
"aria-checked": checked,
|
|
175
176
|
"aria-label": `${score} / ${numberFormat.format(count)}`,
|
|
176
|
-
onKeyDown: false
|
|
177
|
+
onKeyDown: false !== keyboard && radio.props.onKeyDown ? (event)=>{
|
|
178
|
+
if (" " !== event.key) return void radio.props.onKeyDown?.(event);
|
|
179
|
+
event.preventDefault();
|
|
180
|
+
if (!event.repeat) {
|
|
181
|
+
const starValue = index + 1;
|
|
182
|
+
const clear = (rest.allowClear ?? true) && selectedValue === starValue;
|
|
183
|
+
handleChange(clear ? 0 : starValue);
|
|
184
|
+
}
|
|
185
|
+
} : void 0
|
|
177
186
|
})
|
|
178
187
|
});
|
|
179
188
|
const rendered = characterRender ? characterRender(child, info) : child;
|
|
@@ -188,70 +197,72 @@ const Rate = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
188
197
|
$[35] = characterRender;
|
|
189
198
|
$[36] = classNames?.item;
|
|
190
199
|
$[37] = count;
|
|
191
|
-
$[38] =
|
|
192
|
-
$[39] =
|
|
193
|
-
$[40] =
|
|
194
|
-
$[41] =
|
|
195
|
-
$[42] =
|
|
196
|
-
$[43] =
|
|
197
|
-
|
|
200
|
+
$[38] = handleChange;
|
|
201
|
+
$[39] = keyboard;
|
|
202
|
+
$[40] = numberFormat;
|
|
203
|
+
$[41] = rest;
|
|
204
|
+
$[42] = selectedValue;
|
|
205
|
+
$[43] = styles?.item;
|
|
206
|
+
$[44] = tooltips;
|
|
207
|
+
$[45] = t18;
|
|
208
|
+
} else t18 = $[45];
|
|
198
209
|
let t19;
|
|
199
|
-
if ($[
|
|
210
|
+
if ($[46] !== character || $[47] !== count || $[48] !== direction || $[49] !== handleChange || $[50] !== keyboard || $[51] !== prefixCls || $[52] !== ref || $[53] !== rest || $[54] !== selectedValue || $[55] !== t10 || $[56] !== t11 || $[57] !== t12 || $[58] !== t13 || $[59] !== t15 || $[60] !== t17 || $[61] !== t18 || $[62] !== t8 || $[63] !== t9) {
|
|
200
211
|
t19 = /*#__PURE__*/ jsx(RcRateComponent, {
|
|
201
212
|
...rest,
|
|
202
213
|
direction: direction,
|
|
203
214
|
ref: ref,
|
|
204
|
-
...
|
|
215
|
+
...t7,
|
|
205
216
|
"data-tao-rate": "",
|
|
206
|
-
"data-tao-size":
|
|
207
|
-
"data-tao-disabled":
|
|
208
|
-
"data-tao-readonly":
|
|
209
|
-
"aria-readonly":
|
|
210
|
-
"aria-disabled":
|
|
217
|
+
"data-tao-size": t8,
|
|
218
|
+
"data-tao-disabled": t9,
|
|
219
|
+
"data-tao-readonly": t10,
|
|
220
|
+
"aria-readonly": t11,
|
|
221
|
+
"aria-disabled": t12,
|
|
211
222
|
prefixCls: prefixCls,
|
|
212
|
-
disabled:
|
|
223
|
+
disabled: t13,
|
|
213
224
|
count: count,
|
|
214
225
|
keyboard: keyboard,
|
|
215
226
|
value: selectedValue,
|
|
216
|
-
onChange:
|
|
227
|
+
onChange: handleChange,
|
|
217
228
|
character: character,
|
|
218
229
|
className: t15,
|
|
219
230
|
style: t17,
|
|
220
231
|
characterRender: t18
|
|
221
232
|
});
|
|
222
|
-
$[
|
|
223
|
-
$[
|
|
224
|
-
$[
|
|
225
|
-
$[
|
|
226
|
-
$[
|
|
227
|
-
$[
|
|
228
|
-
$[
|
|
229
|
-
$[
|
|
230
|
-
$[
|
|
231
|
-
$[
|
|
232
|
-
$[
|
|
233
|
-
$[
|
|
234
|
-
$[
|
|
235
|
-
$[
|
|
236
|
-
$[
|
|
237
|
-
$[
|
|
238
|
-
$[
|
|
239
|
-
$[
|
|
240
|
-
$[
|
|
241
|
-
} else t19 = $[
|
|
233
|
+
$[46] = character;
|
|
234
|
+
$[47] = count;
|
|
235
|
+
$[48] = direction;
|
|
236
|
+
$[49] = handleChange;
|
|
237
|
+
$[50] = keyboard;
|
|
238
|
+
$[51] = prefixCls;
|
|
239
|
+
$[52] = ref;
|
|
240
|
+
$[53] = rest;
|
|
241
|
+
$[54] = selectedValue;
|
|
242
|
+
$[55] = t10;
|
|
243
|
+
$[56] = t11;
|
|
244
|
+
$[57] = t12;
|
|
245
|
+
$[58] = t13;
|
|
246
|
+
$[59] = t15;
|
|
247
|
+
$[60] = t17;
|
|
248
|
+
$[61] = t18;
|
|
249
|
+
$[62] = t8;
|
|
250
|
+
$[63] = t9;
|
|
251
|
+
$[64] = t19;
|
|
252
|
+
} else t19 = $[64];
|
|
242
253
|
let t20;
|
|
243
|
-
if ($[
|
|
254
|
+
if ($[65] !== direction || $[66] !== directionRef || $[67] !== t19) {
|
|
244
255
|
t20 = /*#__PURE__*/ jsx("span", {
|
|
245
256
|
ref: directionRef,
|
|
246
257
|
dir: direction,
|
|
247
|
-
style:
|
|
258
|
+
style: t6,
|
|
248
259
|
children: t19
|
|
249
260
|
});
|
|
250
|
-
$[
|
|
251
|
-
$[
|
|
252
|
-
$[
|
|
253
|
-
$[
|
|
254
|
-
} else t20 = $[
|
|
261
|
+
$[65] = direction;
|
|
262
|
+
$[66] = directionRef;
|
|
263
|
+
$[67] = t19;
|
|
264
|
+
$[68] = t20;
|
|
265
|
+
} else t20 = $[68];
|
|
255
266
|
return t20;
|
|
256
267
|
});
|
|
257
268
|
Rate.displayName = 'Rate';
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
opacity: 0;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
[data-tao-scroll-area][data-tao-scroll-type="scroll"]:hover [data-tao-scrollbar] {
|
|
103
|
+
[data-tao-scroll-area][data-tao-scroll-type="scroll"]:hover [data-tao-scrollbar], [data-tao-scroll-area]:is([data-tao-scroll-type="auto"], [data-tao-scroll-type="scroll"])[data-tao-scrolling] [data-tao-scrollbar], [data-tao-scroll-area][data-tao-scroll-type] [data-tao-scrollbar]:focus-visible {
|
|
104
104
|
opacity: 1;
|
|
105
105
|
}
|
|
106
106
|
|