@rockshin/tao-ui 0.0.57 → 0.0.59
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/dist/components/affix/affix.js +38 -4
- package/dist/components/app/app-modals.js +11 -6
- package/dist/components/app/app-notices.js +112 -47
- package/dist/components/auto-complete/auto-complete.js +9 -2
- 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 +24 -17
- package/dist/components/carousel/carousel.js +35 -16
- package/dist/components/cascader/cascader.js +17 -12
- package/dist/components/checkbox/checkbox.d.ts +3 -1
- package/dist/components/checkbox/checkbox.js +65 -58
- package/dist/components/collapse/collapse-panels.js +68 -67
- package/dist/components/color-picker/color-picker.js +383 -360
- package/dist/components/date-picker/calendar/calendar-grid.d.ts +5 -3
- package/dist/components/date-picker/calendar/calendar-grid.js +9 -4
- package/dist/components/date-picker/calendar/month-grid.d.ts +2 -1
- package/dist/components/date-picker/calendar/month-grid.js +61 -45
- package/dist/components/date-picker/calendar/time-panel.d.ts +8 -1
- package/dist/components/date-picker/calendar/time-panel.js +89 -88
- package/dist/components/date-picker/calendar/year-grid.d.ts +2 -1
- package/dist/components/date-picker/calendar/year-grid.js +60 -44
- package/dist/components/date-picker/date-localization.js +12 -14
- package/dist/components/date-picker/date-picker.css +9 -0
- package/dist/components/date-picker/date-picker.js +22 -13
- package/dist/components/date-picker/range-picker.d.ts +2 -0
- package/dist/components/date-picker/range-picker.js +127 -70
- package/dist/components/date-picker/types.js +1 -1
- package/dist/components/divider/divider.js +1 -1
- package/dist/components/drawer/drawer.d.ts +1 -1
- package/dist/components/drawer/drawer.js +4 -3
- package/dist/components/dropdown/dropdown.js +11 -9
- package/dist/components/float-button/float-button.js +11 -9
- package/dist/components/form/form-item.d.ts +1 -1
- package/dist/components/form/form-item.js +160 -120
- package/dist/components/form-field/form-field-view.d.ts +2 -1
- package/dist/components/form-field/form-field-view.js +173 -108
- package/dist/components/image/image.js +135 -143
- package/dist/components/input/input-shared.js +3 -2
- package/dist/components/input/otp.js +120 -110
- package/dist/components/input/password.js +55 -61
- package/dist/components/input/search.js +13 -7
- package/dist/components/list/list.js +106 -105
- package/dist/components/masonry/masonry.js +1 -1
- package/dist/components/mentions/mentions.js +1 -0
- package/dist/components/menu/menu-render.js +1 -0
- package/dist/components/modal/confirm-dialog.js +11 -4
- package/dist/components/modal/modal.js +320 -315
- package/dist/components/pagination/pagination.d.ts +3 -0
- package/dist/components/pagination/pagination.js +5 -0
- package/dist/components/popover/popover.js +325 -289
- package/dist/components/qr-code/qr-code.js +157 -150
- package/dist/components/radio/radio.d.ts +3 -1
- package/dist/components/radio/radio.js +73 -64
- 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/mobile-select.js +6 -3
- package/dist/components/select/select-model.js +2 -2
- package/dist/components/select/select.js +78 -39
- package/dist/components/select/use-select-selection.d.ts +1 -1
- package/dist/components/select/use-select-selection.js +91 -84
- package/dist/components/slider/slider.d.ts +2 -2
- package/dist/components/slider/slider.js +13 -2
- package/dist/components/sonner/sonner.js +2 -2
- package/dist/components/splitter/splitter.css +1 -0
- package/dist/components/splitter/splitter.js +152 -126
- package/dist/components/statistic/statistic.js +84 -78
- package/dist/components/steps/steps.js +1 -1
- package/dist/components/switch/switch.js +45 -39
- package/dist/components/table/table.js +5 -1
- package/dist/components/table/use-table-data.js +2 -2
- package/dist/components/time-picker/time-picker.js +31 -1
- package/dist/components/tooltip/tooltip.js +237 -99
- package/dist/components/tree/tree.js +31 -3
- package/dist/components/tree-select/tree-select.js +1 -1
- package/dist/components/upload/upload.js +69 -42
- package/dist/locales/ar-EG.js +2 -0
- package/dist/locales/de-DE.js +2 -0
- package/dist/locales/en-US.js +2 -0
- package/dist/locales/es-ES.js +2 -0
- package/dist/locales/fr-FR.js +2 -0
- package/dist/locales/hi-IN.js +2 -0
- package/dist/locales/id-ID.js +2 -0
- package/dist/locales/it-IT.js +2 -0
- package/dist/locales/ja-JP.js +2 -0
- package/dist/locales/ko-KR.js +2 -0
- package/dist/locales/pt-BR.js +2 -0
- package/dist/locales/ru-RU.js +2 -0
- package/dist/locales/th-TH.js +2 -0
- package/dist/locales/tr-TR.js +2 -0
- package/dist/locales/types.d.ts +2 -0
- package/dist/locales/vi-VN.js +2 -0
- package/dist/locales/zh-CN.js +2 -0
- package/dist/locales/zh-TW.js +2 -0
- package/dist/number-input/cursor.js +20 -8
- package/dist/number-input/format.js +13 -5
- package/dist/number-input/use-number-input.js +166 -318
- package/dist/number-input/validate.d.ts +1 -0
- package/dist/number-input/validate.js +1 -1
- package/dist/provider/tao-provider.d.ts +2 -2
- package/dist/provider/tao-provider.js +49 -49
- package/dist/utils/composed-parent.d.ts +1 -0
- package/dist/utils/composed-parent.js +7 -0
- package/dist/utils/portal.d.ts +5 -0
- package/dist/utils/portal.js +7 -1
- package/dist/utils/refs.d.ts +3 -1
- package/dist/utils/refs.js +25 -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
|
|