@rockshin/tao-ui 0.0.43 → 0.0.45
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 +7 -1
- package/component-manifest.json +10 -3
- package/dist/components/auto-complete/auto-complete.js +12 -3
- package/dist/components/breadcrumb/breadcrumb.css +4 -0
- package/dist/components/breadcrumb/breadcrumb.js +1 -0
- package/dist/components/calendar/calendar.d.ts +1 -0
- package/dist/components/calendar/calendar.js +10 -3
- package/dist/components/card/card-tabs.js +204 -182
- package/dist/components/card/card.js +1 -1
- package/dist/components/carousel/carousel.js +11 -5
- package/dist/components/cascader/cascader.js +16 -4
- package/dist/components/collapse/collapse.css +8 -0
- package/dist/components/context-menu/context-menu.d.ts +2 -1
- package/dist/components/context-menu/context-menu.js +57 -44
- package/dist/components/date-picker/calendar/calendar-grid.js +3 -2
- package/dist/components/date-picker/date-picker.css +4 -0
- package/dist/components/date-picker/date-picker.d.ts +1 -0
- package/dist/components/date-picker/date-picker.js +13 -3
- package/dist/components/date-picker/range-picker.d.ts +1 -0
- package/dist/components/date-picker/range-picker.js +13 -3
- package/dist/components/drawer/drawer.d.ts +2 -1
- package/dist/components/drawer/drawer.js +32 -20
- package/dist/components/dropdown/dropdown.d.ts +1 -0
- package/dist/components/dropdown/dropdown.js +139 -123
- package/dist/components/form/field-control.d.ts +6 -0
- package/dist/components/form/field-control.js +42 -0
- package/dist/components/form/form-context.d.ts +3 -0
- package/dist/components/form/form-item.d.ts +2 -1
- package/dist/components/form/form-item.js +55 -42
- package/dist/components/form/form.d.ts +5 -5
- package/dist/components/form/form.js +86 -68
- package/dist/components/form/index.d.ts +1 -0
- package/dist/components/form/use-form.d.ts +16 -0
- package/dist/components/form/use-form.js +69 -0
- package/dist/components/form-field/form-field-view.d.ts +4 -2
- package/dist/components/form-field/form-field-view.js +42 -35
- package/dist/components/mentions/mentions.js +6 -2
- package/dist/components/modal/modal.d.ts +2 -1
- package/dist/components/modal/modal.js +14 -4
- package/dist/components/pagination/pagination.css +4 -0
- package/dist/components/popover/popover.d.ts +2 -1
- package/dist/components/popover/popover.js +185 -176
- package/dist/components/rate/rate.js +114 -88
- package/dist/components/scroll-area/scroll-area.js +127 -118
- package/dist/components/segmented/segmented.js +52 -29
- package/dist/components/select/mobile-select.d.ts +2 -1
- package/dist/components/select/mobile-select.js +52 -47
- package/dist/components/select/select-types.d.ts +1 -0
- package/dist/components/select/select.js +19 -6
- package/dist/components/slider/slider.js +136 -133
- package/dist/components/splitter/splitter.css +4 -0
- package/dist/components/splitter/splitter.js +5 -3
- package/dist/components/table/table.css +29 -11
- package/dist/components/table/table.js +383 -547
- package/dist/components/tabs/tabs.js +3 -2
- package/dist/components/time-picker/time-picker.js +21 -7
- package/dist/components/tooltip/tooltip.d.ts +2 -1
- package/dist/components/tooltip/tooltip.js +82 -71
- package/dist/components/transfer/transfer-parts.js +12 -2
- package/dist/components/transfer/transfer.js +10 -4
- package/dist/components/tree/tree-keyboard.d.ts +6 -0
- package/dist/components/tree/tree-keyboard.js +27 -0
- package/dist/components/tree/tree.js +14 -3
- package/dist/components/tree-select/select-engine.d.ts +2 -1
- package/dist/components/tree-select/select-engine.js +23 -15
- package/dist/components/tree-select/tree-select.js +20 -10
- package/dist/docs/components/form.doc.js +3 -1
- package/dist/docs/components/tao-provider.doc.js +6 -1
- package/dist/entries/form.d.ts +2 -2
- package/dist/entries/provider.d.ts +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/provider/tao-provider.d.ts +10 -3
- package/dist/provider/tao-provider.js +198 -88
- package/dist/utils/scroll-left.d.ts +3 -0
- package/dist/utils/scroll-left.js +7 -0
- package/llms.txt +3 -3
- package/package.json +4 -2
|
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { c } from "react-compiler-runtime";
|
|
3
3
|
import rate from "@rc-component/rate";
|
|
4
4
|
import { cloneElement, forwardRef } from "react";
|
|
5
|
-
import { useTaoConfig } from "../../provider/tao-provider.js";
|
|
5
|
+
import { useTaoConfig, useTaoDirection } from "../../provider/tao-provider.js";
|
|
6
6
|
import { cx } from "../../utils/semantic.js";
|
|
7
7
|
import { Tooltip } from "../tooltip/tooltip.js";
|
|
8
8
|
import "./rate.css";
|
|
@@ -20,10 +20,11 @@ const Star = /*#__PURE__*/ jsx("svg", {
|
|
|
20
20
|
})
|
|
21
21
|
});
|
|
22
22
|
const Rate = /*#__PURE__*/ forwardRef((t0, ref)=>{
|
|
23
|
-
const $ = c(
|
|
23
|
+
const $ = c(48);
|
|
24
24
|
let characterRender;
|
|
25
25
|
let className;
|
|
26
26
|
let classNames;
|
|
27
|
+
let directionProp;
|
|
27
28
|
let disabled;
|
|
28
29
|
let rest;
|
|
29
30
|
let rootClassName;
|
|
@@ -35,77 +36,87 @@ const Rate = /*#__PURE__*/ forwardRef((t0, ref)=>{
|
|
|
35
36
|
let t3;
|
|
36
37
|
let tooltips;
|
|
37
38
|
if ($[0] !== t0) {
|
|
38
|
-
({ prefixCls: t1, rootClassName, className, classNames, style, styles, tooltips, size, disabled, readOnly: t2, character: t3, characterRender, ...rest } = t0);
|
|
39
|
+
({ prefixCls: t1, rootClassName, className, classNames, style, styles, tooltips, size, disabled, readOnly: t2, character: t3, characterRender, direction: directionProp, ...rest } = t0);
|
|
39
40
|
$[0] = t0;
|
|
40
41
|
$[1] = characterRender;
|
|
41
42
|
$[2] = className;
|
|
42
43
|
$[3] = classNames;
|
|
43
|
-
$[4] =
|
|
44
|
-
$[5] =
|
|
45
|
-
$[6] =
|
|
46
|
-
$[7] =
|
|
47
|
-
$[8] =
|
|
48
|
-
$[9] =
|
|
49
|
-
$[10] =
|
|
50
|
-
$[11] =
|
|
51
|
-
$[12] =
|
|
52
|
-
$[13] =
|
|
44
|
+
$[4] = directionProp;
|
|
45
|
+
$[5] = disabled;
|
|
46
|
+
$[6] = rest;
|
|
47
|
+
$[7] = rootClassName;
|
|
48
|
+
$[8] = size;
|
|
49
|
+
$[9] = style;
|
|
50
|
+
$[10] = styles;
|
|
51
|
+
$[11] = t1;
|
|
52
|
+
$[12] = t2;
|
|
53
|
+
$[13] = t3;
|
|
54
|
+
$[14] = tooltips;
|
|
53
55
|
} else {
|
|
54
56
|
characterRender = $[1];
|
|
55
57
|
className = $[2];
|
|
56
58
|
classNames = $[3];
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
59
|
+
directionProp = $[4];
|
|
60
|
+
disabled = $[5];
|
|
61
|
+
rest = $[6];
|
|
62
|
+
rootClassName = $[7];
|
|
63
|
+
size = $[8];
|
|
64
|
+
style = $[9];
|
|
65
|
+
styles = $[10];
|
|
66
|
+
t1 = $[11];
|
|
67
|
+
t2 = $[12];
|
|
68
|
+
t3 = $[13];
|
|
69
|
+
tooltips = $[14];
|
|
67
70
|
}
|
|
68
71
|
const prefixCls = void 0 === t1 ? "tao-rate" : t1;
|
|
69
72
|
const readOnly = void 0 === t2 ? false : t2;
|
|
70
73
|
const character = void 0 === t3 ? Star : t3;
|
|
74
|
+
const [direction, directionRef] = useTaoDirection(void 0 === directionProp ? void 0 : "rtl" === directionProp ? "rtl" : "ltr");
|
|
71
75
|
const config = useTaoConfig();
|
|
72
76
|
const resolvedDisabled = disabled ?? config.disabled;
|
|
73
77
|
let t4;
|
|
74
|
-
if ($[
|
|
78
|
+
if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
|
|
75
79
|
t4 = {
|
|
76
|
-
|
|
80
|
+
display: "contents"
|
|
77
81
|
};
|
|
78
|
-
$[
|
|
79
|
-
} else t4 = $[
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
const t9 = resolvedDisabled || void 0;
|
|
85
|
-
const t10 = resolvedDisabled || readOnly;
|
|
86
|
-
const t11 = classNames?.root;
|
|
87
|
-
let t12;
|
|
88
|
-
if ($[15] !== className || $[16] !== rootClassName || $[17] !== t11) {
|
|
89
|
-
t12 = cx(t11, rootClassName, className);
|
|
90
|
-
$[15] = className;
|
|
91
|
-
$[16] = rootClassName;
|
|
92
|
-
$[17] = t11;
|
|
93
|
-
$[18] = t12;
|
|
94
|
-
} else t12 = $[18];
|
|
95
|
-
const t13 = styles?.root;
|
|
96
|
-
let t14;
|
|
97
|
-
if ($[19] !== style || $[20] !== t13) {
|
|
98
|
-
t14 = {
|
|
99
|
-
...t13,
|
|
100
|
-
...style
|
|
82
|
+
$[15] = t4;
|
|
83
|
+
} else t4 = $[15];
|
|
84
|
+
let t5;
|
|
85
|
+
if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
|
|
86
|
+
t5 = {
|
|
87
|
+
role: "radiogroup"
|
|
101
88
|
};
|
|
102
|
-
$[
|
|
89
|
+
$[16] = t5;
|
|
90
|
+
} else t5 = $[16];
|
|
91
|
+
const t6 = "middle" === size ? "medium" : size ?? config.size;
|
|
92
|
+
const t7 = resolvedDisabled ? "" : void 0;
|
|
93
|
+
const t8 = readOnly ? "" : void 0;
|
|
94
|
+
const t9 = readOnly || void 0;
|
|
95
|
+
const t10 = resolvedDisabled || void 0;
|
|
96
|
+
const t11 = resolvedDisabled || readOnly;
|
|
97
|
+
const t12 = classNames?.root;
|
|
98
|
+
let t13;
|
|
99
|
+
if ($[17] !== className || $[18] !== rootClassName || $[19] !== t12) {
|
|
100
|
+
t13 = cx(t12, rootClassName, className);
|
|
101
|
+
$[17] = className;
|
|
102
|
+
$[18] = rootClassName;
|
|
103
|
+
$[19] = t12;
|
|
103
104
|
$[20] = t13;
|
|
104
|
-
|
|
105
|
-
|
|
105
|
+
} else t13 = $[20];
|
|
106
|
+
const t14 = styles?.root;
|
|
106
107
|
let t15;
|
|
107
|
-
if ($[
|
|
108
|
-
t15 =
|
|
108
|
+
if ($[21] !== style || $[22] !== t14) {
|
|
109
|
+
t15 = {
|
|
110
|
+
...t14,
|
|
111
|
+
...style
|
|
112
|
+
};
|
|
113
|
+
$[21] = style;
|
|
114
|
+
$[22] = t14;
|
|
115
|
+
$[23] = t15;
|
|
116
|
+
} else t15 = $[23];
|
|
117
|
+
let t16;
|
|
118
|
+
if ($[24] !== characterRender || $[25] !== classNames?.item || $[26] !== styles?.item || $[27] !== tooltips) {
|
|
119
|
+
t16 = (node, info)=>{
|
|
109
120
|
const index = info.index ?? 0;
|
|
110
121
|
const half = !!info.allowHalf && (info.value ?? 0) > index && (info.value ?? 0) < index + 1;
|
|
111
122
|
const child = /*#__PURE__*/ cloneElement(node, {
|
|
@@ -126,47 +137,62 @@ const Rate = /*#__PURE__*/ forwardRef((t0, ref)=>{
|
|
|
126
137
|
children: rendered
|
|
127
138
|
}) : rendered;
|
|
128
139
|
};
|
|
129
|
-
$[
|
|
130
|
-
$[
|
|
131
|
-
$[
|
|
132
|
-
$[
|
|
133
|
-
$[
|
|
134
|
-
} else
|
|
135
|
-
let
|
|
136
|
-
if ($[
|
|
137
|
-
|
|
140
|
+
$[24] = characterRender;
|
|
141
|
+
$[25] = classNames?.item;
|
|
142
|
+
$[26] = styles?.item;
|
|
143
|
+
$[27] = tooltips;
|
|
144
|
+
$[28] = t16;
|
|
145
|
+
} else t16 = $[28];
|
|
146
|
+
let t17;
|
|
147
|
+
if ($[29] !== character || $[30] !== direction || $[31] !== prefixCls || $[32] !== ref || $[33] !== rest || $[34] !== t10 || $[35] !== t11 || $[36] !== t13 || $[37] !== t15 || $[38] !== t16 || $[39] !== t6 || $[40] !== t7 || $[41] !== t8 || $[42] !== t9) {
|
|
148
|
+
t17 = /*#__PURE__*/ jsx(RcRateComponent, {
|
|
138
149
|
...rest,
|
|
150
|
+
direction: direction,
|
|
139
151
|
ref: ref,
|
|
140
|
-
...
|
|
152
|
+
...t5,
|
|
141
153
|
"data-tao-rate": "",
|
|
142
|
-
"data-tao-size":
|
|
143
|
-
"data-tao-disabled":
|
|
144
|
-
"data-tao-readonly":
|
|
145
|
-
"aria-readonly":
|
|
146
|
-
"aria-disabled":
|
|
154
|
+
"data-tao-size": t6,
|
|
155
|
+
"data-tao-disabled": t7,
|
|
156
|
+
"data-tao-readonly": t8,
|
|
157
|
+
"aria-readonly": t9,
|
|
158
|
+
"aria-disabled": t10,
|
|
147
159
|
prefixCls: prefixCls,
|
|
148
|
-
disabled:
|
|
160
|
+
disabled: t11,
|
|
149
161
|
character: character,
|
|
150
|
-
className:
|
|
151
|
-
style:
|
|
152
|
-
characterRender:
|
|
162
|
+
className: t13,
|
|
163
|
+
style: t15,
|
|
164
|
+
characterRender: t16
|
|
165
|
+
});
|
|
166
|
+
$[29] = character;
|
|
167
|
+
$[30] = direction;
|
|
168
|
+
$[31] = prefixCls;
|
|
169
|
+
$[32] = ref;
|
|
170
|
+
$[33] = rest;
|
|
171
|
+
$[34] = t10;
|
|
172
|
+
$[35] = t11;
|
|
173
|
+
$[36] = t13;
|
|
174
|
+
$[37] = t15;
|
|
175
|
+
$[38] = t16;
|
|
176
|
+
$[39] = t6;
|
|
177
|
+
$[40] = t7;
|
|
178
|
+
$[41] = t8;
|
|
179
|
+
$[42] = t9;
|
|
180
|
+
$[43] = t17;
|
|
181
|
+
} else t17 = $[43];
|
|
182
|
+
let t18;
|
|
183
|
+
if ($[44] !== direction || $[45] !== directionRef || $[46] !== t17) {
|
|
184
|
+
t18 = /*#__PURE__*/ jsx("span", {
|
|
185
|
+
ref: directionRef,
|
|
186
|
+
dir: direction,
|
|
187
|
+
style: t4,
|
|
188
|
+
children: t17
|
|
153
189
|
});
|
|
154
|
-
$[
|
|
155
|
-
$[
|
|
156
|
-
$[
|
|
157
|
-
$[
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
$[33] = t14;
|
|
161
|
-
$[34] = t15;
|
|
162
|
-
$[35] = t5;
|
|
163
|
-
$[36] = t6;
|
|
164
|
-
$[37] = t7;
|
|
165
|
-
$[38] = t8;
|
|
166
|
-
$[39] = t9;
|
|
167
|
-
$[40] = t16;
|
|
168
|
-
} else t16 = $[40];
|
|
169
|
-
return t16;
|
|
190
|
+
$[44] = direction;
|
|
191
|
+
$[45] = directionRef;
|
|
192
|
+
$[46] = t17;
|
|
193
|
+
$[47] = t18;
|
|
194
|
+
} else t18 = $[47];
|
|
195
|
+
return t18;
|
|
170
196
|
});
|
|
171
197
|
Rate.displayName = 'Rate';
|
|
172
198
|
export { Rate };
|