@rockshin/tao-ui 0.0.38 → 0.0.40
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 +12 -0
- package/dist/components/alert/alert.d.ts +2 -2
- package/dist/components/breadcrumb/breadcrumb.d.ts +2 -2
- package/dist/components/button/button.d.ts +2 -2
- package/dist/components/checkbox/checkbox.css +4 -0
- package/dist/components/checkbox/checkbox.d.ts +8 -6
- package/dist/components/checkbox/checkbox.js +184 -111
- package/dist/components/collapsible/collapsible.d.ts +6 -6
- package/dist/components/context-menu/context-menu.d.ts +3 -3
- package/dist/components/date-picker/calendar/calendar-grid.d.ts +1 -1
- package/dist/components/date-picker/calendar/calendar-grid.js +47 -35
- package/dist/components/date-picker/calendar/calendar-header.d.ts +2 -2
- package/dist/components/date-picker/calendar/month-grid.d.ts +1 -1
- package/dist/components/date-picker/calendar/month-grid.js +1 -0
- package/dist/components/date-picker/calendar/time-panel.d.ts +2 -2
- package/dist/components/date-picker/calendar/time-panel.js +10 -7
- package/dist/components/date-picker/calendar/year-grid.d.ts +1 -1
- package/dist/components/date-picker/calendar/year-grid.js +1 -0
- package/dist/components/date-picker/date-picker.css +4 -0
- package/dist/components/date-picker/date-picker.d.ts +7 -6
- package/dist/components/date-picker/date-picker.js +52 -5
- package/dist/components/date-picker/presets.d.ts +1 -1
- package/dist/components/date-picker/range-picker.d.ts +6 -5
- package/dist/components/date-picker/range-picker.js +124 -28
- package/dist/components/date-picker/types.d.ts +1 -1
- package/dist/components/drawer/drawer.d.ts +4 -4
- package/dist/components/drawer/drawer.js +125 -111
- package/dist/components/dropdown/dropdown.d.ts +8 -8
- package/dist/components/form/form-context.d.ts +1 -1
- package/dist/components/form/form-item.d.ts +3 -3
- package/dist/components/form/form.d.ts +3 -3
- package/dist/components/form/index.d.ts +2 -2
- package/dist/components/form-actions/form-actions.d.ts +2 -2
- package/dist/components/form-field/form-field-view.d.ts +2 -2
- package/dist/components/form-field/form-field.d.ts +2 -2
- package/dist/components/form-section/form-section.d.ts +2 -2
- package/dist/components/input/input.d.ts +2 -2
- package/dist/components/input/input.js +1 -1
- package/dist/components/input-number/input-number.d.ts +6 -7
- package/dist/components/input-number/input-number.js +91 -65
- package/dist/components/menu/menu-render.d.ts +1 -1
- package/dist/components/modal/confirm-dialog.d.ts +4 -4
- package/dist/components/modal/confirm.d.ts +1 -1
- package/dist/components/modal/index.d.ts +8 -8
- package/dist/components/modal/modal.d.ts +6 -6
- package/dist/components/modal/modal.js +115 -101
- package/dist/components/modal/use-modal.d.ts +2 -2
- package/dist/components/pagination/pagination.d.ts +3 -3
- package/dist/components/popconfirm/popconfirm.d.ts +5 -5
- package/dist/components/popconfirm/popconfirm.js +74 -61
- package/dist/components/popover/popover.d.ts +4 -4
- package/dist/components/popover/popover.js +124 -115
- package/dist/components/radio/radio.d.ts +9 -6
- package/dist/components/radio/radio.js +210 -116
- package/dist/components/scroll-area/scroll-area.d.ts +2 -2
- package/dist/components/select/mobile-select.d.ts +3 -3
- package/dist/components/select/mobile-select.js +3 -1
- package/dist/components/select/select-icons.d.ts +5 -5
- package/dist/components/select/select-model.d.ts +1 -1
- package/dist/components/select/select-searchable-list.d.ts +2 -2
- package/dist/components/select/select-tags.d.ts +3 -3
- package/dist/components/select/select-types.d.ts +2 -2
- package/dist/components/select/select.css +7 -0
- package/dist/components/select/select.d.ts +2 -2
- package/dist/components/select/use-select-selection.d.ts +3 -3
- package/dist/components/sonner/index.d.ts +1 -1
- package/dist/components/sonner/sonner.d.ts +5 -4
- package/dist/components/spinner/spinner.d.ts +5 -5
- package/dist/components/spinner/spinner.js +106 -99
- package/dist/components/splitter/splitter.d.ts +3 -3
- package/dist/components/status-icon/status-icon.d.ts +1 -1
- package/dist/components/steps/steps-icons.d.ts +4 -4
- package/dist/components/steps/steps.css +1 -1
- package/dist/components/steps/steps.d.ts +3 -3
- package/dist/components/steps/use-display-steps.d.ts +1 -1
- package/dist/components/switch/switch.d.ts +4 -3
- package/dist/components/switch/switch.js +134 -86
- package/dist/components/table/table-filter.d.ts +2 -2
- package/dist/components/table/table-icons.d.ts +6 -6
- package/dist/components/table/table-model.d.ts +2 -2
- package/dist/components/table/table-summary.d.ts +5 -5
- package/dist/components/table/table-types.d.ts +3 -3
- package/dist/components/table/table.css +5 -3
- package/dist/components/table/table.d.ts +6 -6
- package/dist/components/table/use-table-data.d.ts +1 -1
- package/dist/components/tabs/tabs.d.ts +5 -5
- package/dist/components/tabs/tabs.js +72 -65
- package/dist/components/tag/tag.css +8 -8
- package/dist/components/tag/tag.d.ts +4 -4
- package/dist/components/tag/tag.js +40 -37
- package/dist/components/textarea/textarea.d.ts +2 -2
- package/dist/components/textarea/textarea.js +1 -1
- package/dist/components/tooltip/tooltip.d.ts +2 -2
- package/dist/docs/component-docs.d.ts +1 -1
- package/dist/docs/components/alert.doc.d.ts +1 -1
- package/dist/docs/components/button.doc.d.ts +1 -1
- package/dist/docs/components/popover.doc.d.ts +1 -1
- package/dist/docs/components/tooltip.doc.d.ts +4 -4
- package/dist/docs/index.d.ts +2 -2
- package/dist/entries/alert.d.ts +1 -1
- package/dist/entries/breadcrumb.d.ts +1 -1
- package/dist/entries/button.d.ts +1 -1
- package/dist/entries/checkbox.d.ts +1 -1
- package/dist/entries/collapsible.d.ts +1 -1
- package/dist/entries/context-menu.d.ts +1 -1
- package/dist/entries/date-picker.d.ts +1 -1
- package/dist/entries/drawer.d.ts +1 -1
- package/dist/entries/dropdown.d.ts +1 -1
- package/dist/entries/form-actions.d.ts +1 -1
- package/dist/entries/form-field.d.ts +1 -1
- package/dist/entries/form-layout.d.ts +1 -1
- package/dist/entries/form-section.d.ts +1 -1
- package/dist/entries/form.d.ts +1 -1
- package/dist/entries/input-number.d.ts +1 -1
- package/dist/entries/input.d.ts +1 -1
- package/dist/entries/modal.d.ts +1 -1
- package/dist/entries/number-input.d.ts +1 -1
- package/dist/entries/pagination.d.ts +1 -1
- package/dist/entries/popconfirm.d.ts +1 -1
- package/dist/entries/popover.d.ts +1 -1
- package/dist/entries/provider.d.ts +1 -1
- package/dist/entries/radio.d.ts +1 -1
- package/dist/entries/range-picker.d.ts +1 -1
- package/dist/entries/scroll-area.d.ts +1 -1
- package/dist/entries/select.d.ts +1 -1
- package/dist/entries/sonner.d.ts +1 -1
- package/dist/entries/spinner.d.ts +1 -1
- package/dist/entries/splitter.d.ts +1 -1
- package/dist/entries/stack.d.ts +1 -1
- package/dist/entries/steps.d.ts +1 -1
- package/dist/entries/switch.d.ts +1 -1
- package/dist/entries/table.d.ts +1 -1
- package/dist/entries/tabs.d.ts +1 -1
- package/dist/entries/tag.d.ts +1 -1
- package/dist/entries/textarea.d.ts +1 -1
- package/dist/entries/tooltip.d.ts +1 -1
- package/dist/index.d.ts +40 -40
- package/dist/layouts/form-layout/form-layout.d.ts +2 -2
- package/dist/layouts/stack/stack.d.ts +3 -3
- package/dist/number-input/format.d.ts +1 -1
- package/dist/number-input/index.d.ts +4 -4
- package/dist/number-input/number-input.d.ts +2 -2
- package/dist/number-input/use-number-input.d.ts +1 -1
- package/dist/provider/tao-provider.d.ts +3 -3
- package/dist/theme/control.css +2 -2
- package/dist/theme/theme.css +11 -11
- package/dist/utils/dialog-content.d.ts +1 -1
- package/package.json +38 -38
|
@@ -5,8 +5,8 @@ import { useTaoConfig } from "../../provider/tao-provider.js";
|
|
|
5
5
|
import { cx } from "../../utils/semantic.js";
|
|
6
6
|
import "./spinner.css";
|
|
7
7
|
function Spinner(t0) {
|
|
8
|
-
const $ = c(
|
|
9
|
-
const { spinning: t1, size, tip, delay, indicator, children, fullscreen: t2, className, style, classNames, styles } = t0;
|
|
8
|
+
const $ = c(56);
|
|
9
|
+
const { spinning: t1, size, tip, delay, indicator, children, fullscreen: t2, className, style, classNames, styles, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy } = t0;
|
|
10
10
|
const spinning = void 0 === t1 ? true : t1;
|
|
11
11
|
const fullscreen = void 0 === t2 ? false : t2;
|
|
12
12
|
const ctx = useTaoConfig();
|
|
@@ -56,36 +56,37 @@ function Spinner(t0) {
|
|
|
56
56
|
$[10] = styles?.root;
|
|
57
57
|
$[11] = t8;
|
|
58
58
|
} else t8 = $[11];
|
|
59
|
-
const t9 =
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
$[
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
59
|
+
const t9 = ariaLabel ?? (null != tip || ariaLabelledBy ? void 0 : "Loading");
|
|
60
|
+
const t10 = classNames?.indicator;
|
|
61
|
+
let t11;
|
|
62
|
+
if ($[12] !== t10) {
|
|
63
|
+
t11 = cx(t10);
|
|
64
|
+
$[12] = t10;
|
|
65
|
+
$[13] = t11;
|
|
66
|
+
} else t11 = $[13];
|
|
67
|
+
const t12 = styles?.indicator;
|
|
68
|
+
let t13;
|
|
68
69
|
if ($[14] !== indicator) {
|
|
69
|
-
|
|
70
|
+
t13 = indicator ?? /*#__PURE__*/ jsx(DefaultIndicator, {});
|
|
70
71
|
$[14] = indicator;
|
|
71
|
-
$[15] =
|
|
72
|
-
} else
|
|
73
|
-
let
|
|
74
|
-
if ($[16] !==
|
|
75
|
-
|
|
72
|
+
$[15] = t13;
|
|
73
|
+
} else t13 = $[15];
|
|
74
|
+
let t14;
|
|
75
|
+
if ($[16] !== t11 || $[17] !== t12 || $[18] !== t13) {
|
|
76
|
+
t14 = /*#__PURE__*/ jsx("span", {
|
|
76
77
|
"data-tao-spinner-indicator": "",
|
|
77
|
-
className:
|
|
78
|
-
style:
|
|
79
|
-
children:
|
|
78
|
+
className: t11,
|
|
79
|
+
style: t12,
|
|
80
|
+
children: t13
|
|
80
81
|
});
|
|
81
|
-
$[16] =
|
|
82
|
-
$[17] =
|
|
83
|
-
$[18] =
|
|
84
|
-
$[19] =
|
|
85
|
-
} else
|
|
86
|
-
let
|
|
82
|
+
$[16] = t11;
|
|
83
|
+
$[17] = t12;
|
|
84
|
+
$[18] = t13;
|
|
85
|
+
$[19] = t14;
|
|
86
|
+
} else t14 = $[19];
|
|
87
|
+
let t15;
|
|
87
88
|
if ($[20] !== classNames?.tip || $[21] !== styles?.tip || $[22] !== tip) {
|
|
88
|
-
|
|
89
|
+
t15 = null != tip && /*#__PURE__*/ jsx("span", {
|
|
89
90
|
"data-tao-spinner-tip": "",
|
|
90
91
|
className: cx(classNames?.tip),
|
|
91
92
|
style: styles?.tip,
|
|
@@ -94,111 +95,117 @@ function Spinner(t0) {
|
|
|
94
95
|
$[20] = classNames?.tip;
|
|
95
96
|
$[21] = styles?.tip;
|
|
96
97
|
$[22] = tip;
|
|
97
|
-
$[23] =
|
|
98
|
-
} else
|
|
99
|
-
let
|
|
100
|
-
if ($[24] !==
|
|
101
|
-
|
|
98
|
+
$[23] = t15;
|
|
99
|
+
} else t15 = $[23];
|
|
100
|
+
let t16;
|
|
101
|
+
if ($[24] !== ariaLabelledBy || $[25] !== resolvedSize || $[26] !== t14 || $[27] !== t15 || $[28] !== t7 || $[29] !== t8 || $[30] !== t9) {
|
|
102
|
+
t16 = /*#__PURE__*/ jsxs("span", {
|
|
102
103
|
"data-tao-spinner": "",
|
|
103
104
|
"data-tao-size": resolvedSize,
|
|
104
105
|
className: t7,
|
|
105
106
|
style: t8,
|
|
106
107
|
role: "status",
|
|
107
108
|
"aria-live": "polite",
|
|
109
|
+
"aria-label": t9,
|
|
110
|
+
"aria-labelledby": ariaLabelledBy,
|
|
108
111
|
children: [
|
|
109
|
-
|
|
110
|
-
|
|
112
|
+
t14,
|
|
113
|
+
t15
|
|
111
114
|
]
|
|
112
115
|
});
|
|
113
|
-
$[24] =
|
|
114
|
-
$[25] =
|
|
116
|
+
$[24] = ariaLabelledBy;
|
|
117
|
+
$[25] = resolvedSize;
|
|
115
118
|
$[26] = t14;
|
|
116
|
-
$[27] =
|
|
117
|
-
$[28] =
|
|
118
|
-
$[29] =
|
|
119
|
-
|
|
120
|
-
|
|
119
|
+
$[27] = t15;
|
|
120
|
+
$[28] = t7;
|
|
121
|
+
$[29] = t8;
|
|
122
|
+
$[30] = t9;
|
|
123
|
+
$[31] = t16;
|
|
124
|
+
} else t16 = $[31];
|
|
125
|
+
const spinnerCore = t16;
|
|
121
126
|
if (fullscreen) {
|
|
122
127
|
if (!active) return null;
|
|
123
|
-
const
|
|
124
|
-
let
|
|
125
|
-
if ($[
|
|
126
|
-
|
|
127
|
-
$[
|
|
128
|
-
$[
|
|
129
|
-
$[32] = t17;
|
|
130
|
-
} else t17 = $[32];
|
|
131
|
-
const t18 = styles?.overlay;
|
|
132
|
-
let t19;
|
|
133
|
-
if ($[33] !== style || $[34] !== t18) {
|
|
134
|
-
t19 = {
|
|
135
|
-
...t18,
|
|
136
|
-
...style
|
|
137
|
-
};
|
|
138
|
-
$[33] = style;
|
|
128
|
+
const t17 = classNames?.overlay;
|
|
129
|
+
let t18;
|
|
130
|
+
if ($[32] !== className || $[33] !== t17) {
|
|
131
|
+
t18 = cx(t17, className);
|
|
132
|
+
$[32] = className;
|
|
133
|
+
$[33] = t17;
|
|
139
134
|
$[34] = t18;
|
|
140
|
-
|
|
141
|
-
|
|
135
|
+
} else t18 = $[34];
|
|
136
|
+
const t19 = styles?.overlay;
|
|
142
137
|
let t20;
|
|
143
|
-
if ($[
|
|
144
|
-
t20 =
|
|
138
|
+
if ($[35] !== style || $[36] !== t19) {
|
|
139
|
+
t20 = {
|
|
140
|
+
...t19,
|
|
141
|
+
...style
|
|
142
|
+
};
|
|
143
|
+
$[35] = style;
|
|
144
|
+
$[36] = t19;
|
|
145
|
+
$[37] = t20;
|
|
146
|
+
} else t20 = $[37];
|
|
147
|
+
let t21;
|
|
148
|
+
if ($[38] !== spinnerCore || $[39] !== t18 || $[40] !== t20) {
|
|
149
|
+
t21 = /*#__PURE__*/ jsx("div", {
|
|
145
150
|
"data-tao-spinner-fullscreen": "",
|
|
146
|
-
className:
|
|
147
|
-
style:
|
|
151
|
+
className: t18,
|
|
152
|
+
style: t20,
|
|
148
153
|
children: spinnerCore
|
|
149
154
|
});
|
|
150
|
-
$[
|
|
151
|
-
$[
|
|
152
|
-
$[
|
|
153
|
-
$[
|
|
154
|
-
} else
|
|
155
|
-
return
|
|
155
|
+
$[38] = spinnerCore;
|
|
156
|
+
$[39] = t18;
|
|
157
|
+
$[40] = t20;
|
|
158
|
+
$[41] = t21;
|
|
159
|
+
} else t21 = $[41];
|
|
160
|
+
return t21;
|
|
156
161
|
}
|
|
157
162
|
if (null != children) {
|
|
158
|
-
const
|
|
159
|
-
let
|
|
160
|
-
if ($[
|
|
161
|
-
|
|
163
|
+
const t17 = active || void 0;
|
|
164
|
+
let t18;
|
|
165
|
+
if ($[42] !== children || $[43] !== spinning) {
|
|
166
|
+
t18 = /*#__PURE__*/ jsx("div", {
|
|
162
167
|
"data-tao-spinner-content": "",
|
|
168
|
+
"aria-busy": spinning,
|
|
163
169
|
children: children
|
|
164
170
|
});
|
|
165
|
-
$[
|
|
166
|
-
$[
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
+
$[42] = children;
|
|
172
|
+
$[43] = spinning;
|
|
173
|
+
$[44] = t18;
|
|
174
|
+
} else t18 = $[44];
|
|
175
|
+
let t19;
|
|
176
|
+
if ($[45] !== active || $[46] !== classNames?.overlay || $[47] !== spinnerCore || $[48] !== styles?.overlay) {
|
|
177
|
+
t19 = active && /*#__PURE__*/ jsx("div", {
|
|
171
178
|
"data-tao-spinner-overlay": "",
|
|
172
179
|
className: cx(classNames?.overlay),
|
|
173
180
|
style: styles?.overlay,
|
|
174
181
|
children: spinnerCore
|
|
175
182
|
});
|
|
176
|
-
$[
|
|
177
|
-
$[
|
|
178
|
-
$[
|
|
179
|
-
$[
|
|
180
|
-
$[
|
|
181
|
-
} else
|
|
182
|
-
let
|
|
183
|
-
if ($[
|
|
184
|
-
|
|
183
|
+
$[45] = active;
|
|
184
|
+
$[46] = classNames?.overlay;
|
|
185
|
+
$[47] = spinnerCore;
|
|
186
|
+
$[48] = styles?.overlay;
|
|
187
|
+
$[49] = t19;
|
|
188
|
+
} else t19 = $[49];
|
|
189
|
+
let t20;
|
|
190
|
+
if ($[50] !== className || $[51] !== style || $[52] !== t17 || $[53] !== t18 || $[54] !== t19) {
|
|
191
|
+
t20 = /*#__PURE__*/ jsxs("div", {
|
|
185
192
|
"data-tao-spinner-container": "",
|
|
186
|
-
"data-tao-spinning":
|
|
193
|
+
"data-tao-spinning": t17,
|
|
187
194
|
className: className,
|
|
188
195
|
style: style,
|
|
189
196
|
children: [
|
|
190
|
-
|
|
191
|
-
|
|
197
|
+
t18,
|
|
198
|
+
t19
|
|
192
199
|
]
|
|
193
200
|
});
|
|
194
|
-
$[
|
|
195
|
-
$[
|
|
196
|
-
$[
|
|
197
|
-
$[
|
|
198
|
-
$[
|
|
199
|
-
$[
|
|
200
|
-
} else
|
|
201
|
-
return
|
|
201
|
+
$[50] = className;
|
|
202
|
+
$[51] = style;
|
|
203
|
+
$[52] = t17;
|
|
204
|
+
$[53] = t18;
|
|
205
|
+
$[54] = t19;
|
|
206
|
+
$[55] = t20;
|
|
207
|
+
} else t20 = $[55];
|
|
208
|
+
return t20;
|
|
202
209
|
}
|
|
203
210
|
if (!active) return null;
|
|
204
211
|
return spinnerCore;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type CSSProperties, type ReactNode } from 'react';
|
|
2
|
-
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic';
|
|
2
|
+
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic.js';
|
|
3
3
|
import './splitter.css';
|
|
4
4
|
export type SplitterSemanticPart = 'root' | 'panel' | 'dragger';
|
|
5
5
|
export interface SplitterPanelProps {
|
|
@@ -27,7 +27,7 @@ export interface SplitterProps {
|
|
|
27
27
|
children: ReactNode;
|
|
28
28
|
}
|
|
29
29
|
export declare function Panel(_props: SplitterPanelProps): ReactNode;
|
|
30
|
-
export declare function Splitter({ orientation, onResize, onResizeEnd, onResizeStart, className, classNames, styles, children, }: SplitterProps): import("react
|
|
30
|
+
export declare function Splitter({ orientation, onResize, onResizeEnd, onResizeStart, className, classNames, styles, children, }: SplitterProps): import("react").JSX.Element;
|
|
31
31
|
export declare namespace Splitter {
|
|
32
|
-
|
|
32
|
+
export { Panel };
|
|
33
33
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/** `finish` step glyph. */
|
|
2
|
-
export declare function StepCheckIcon(): import("react
|
|
2
|
+
export declare function StepCheckIcon(): import("react").JSX.Element;
|
|
3
3
|
/** `error` step glyph. */
|
|
4
|
-
export declare function StepCloseIcon(): import("react
|
|
4
|
+
export declare function StepCloseIcon(): import("react").JSX.Element;
|
|
5
5
|
/** Collapsed-range glyph used by `maxCount`. */
|
|
6
|
-
export declare function StepEllipsisIcon(): import("react
|
|
6
|
+
export declare function StepEllipsisIcon(): import("react").JSX.Element;
|
|
7
7
|
/**
|
|
8
8
|
* Notched separator drawn between `type="panel"` steps. `preserveAspectRatio="none"`
|
|
9
9
|
* lets the arrow stretch to the measured panel height.
|
|
10
10
|
*/
|
|
11
|
-
export declare function PanelArrow(): import("react
|
|
11
|
+
export declare function PanelArrow(): import("react").JSX.Element;
|
|
@@ -410,7 +410,7 @@
|
|
|
410
410
|
--tao-steps-icon-border: transparent;
|
|
411
411
|
--tao-steps-icon-text: var(--tao-error);
|
|
412
412
|
--tao-steps-dot-bg: var(--tao-error);
|
|
413
|
-
--tao-steps-icon-bg-hover: color-mix(in
|
|
413
|
+
--tao-steps-icon-bg-hover: color-mix(in oklab,
|
|
414
414
|
var(--tao-color-error) 12%,
|
|
415
415
|
var(--tao-color-bg-base));
|
|
416
416
|
--tao-steps-icon-border-hover: transparent;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type CSSProperties, type Key, type MouseEvent, type ReactNode } from 'react';
|
|
2
|
-
import { type TaoSize } from '../../provider/tao-provider';
|
|
3
|
-
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic';
|
|
2
|
+
import { type TaoSize } from '../../provider/tao-provider.js';
|
|
3
|
+
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic.js';
|
|
4
4
|
import './steps.css';
|
|
5
5
|
export type StepsStatus = 'wait' | 'process' | 'finish' | 'error';
|
|
6
6
|
export type StepsType = 'default' | 'dot' | 'inline' | 'navigation' | 'panel';
|
|
@@ -89,4 +89,4 @@ export interface StepsProps {
|
|
|
89
89
|
classNames?: SemanticClassNames<StepsSemanticPart>;
|
|
90
90
|
styles?: SemanticStyles<StepsSemanticPart>;
|
|
91
91
|
}
|
|
92
|
-
export declare function Steps({ items, current, initial, status, orientation, titlePlacement, responsive, size, variant, type, percent, maxCount, offset, ellipsis, iconRender, onChange, className, style, classNames, styles, }: StepsProps): import("react
|
|
92
|
+
export declare function Steps({ items, current, initial, status, orientation, titlePlacement, responsive, size, variant, type, percent, maxCount, offset, ellipsis, iconRender, onChange, className, style, classNames, styles, }: StepsProps): import("react").JSX.Element;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { type ReactNode, type Ref } from 'react';
|
|
2
|
-
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic';
|
|
1
|
+
import { type AriaAttributes, type ReactNode, type Ref } from 'react';
|
|
2
|
+
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic.js';
|
|
3
3
|
import './switch.css';
|
|
4
4
|
export type SwitchSemanticPart = 'root' | 'handle';
|
|
5
|
-
export interface SwitchProps {
|
|
5
|
+
export interface SwitchProps extends Pick<AriaAttributes, 'aria-label' | 'aria-labelledby' | 'aria-describedby' | 'aria-errormessage' | 'aria-invalid' | 'aria-required'> {
|
|
6
|
+
id?: string;
|
|
6
7
|
checked?: boolean;
|
|
7
8
|
defaultChecked?: boolean;
|
|
8
9
|
onChange?: (checked: boolean) => void;
|
|
@@ -5,8 +5,51 @@ import { useTaoConfig } from "../../provider/tao-provider.js";
|
|
|
5
5
|
import { cx } from "../../utils/semantic.js";
|
|
6
6
|
import "./switch.css";
|
|
7
7
|
const switch_Switch = /*#__PURE__*/ forwardRef(function(t0, ref) {
|
|
8
|
-
const $ = c(
|
|
9
|
-
|
|
8
|
+
const $ = c(50);
|
|
9
|
+
let ariaProps;
|
|
10
|
+
let checked;
|
|
11
|
+
let checkedChildren;
|
|
12
|
+
let className;
|
|
13
|
+
let classNames;
|
|
14
|
+
let defaultChecked;
|
|
15
|
+
let disabled;
|
|
16
|
+
let loading;
|
|
17
|
+
let onChange;
|
|
18
|
+
let style;
|
|
19
|
+
let styles;
|
|
20
|
+
let t1;
|
|
21
|
+
let unCheckedChildren;
|
|
22
|
+
if ($[0] !== t0) {
|
|
23
|
+
({ checked, defaultChecked, onChange, disabled, loading, size: t1, checkedChildren, unCheckedChildren, className, style, classNames, styles, ...ariaProps } = t0);
|
|
24
|
+
$[0] = t0;
|
|
25
|
+
$[1] = ariaProps;
|
|
26
|
+
$[2] = checked;
|
|
27
|
+
$[3] = checkedChildren;
|
|
28
|
+
$[4] = className;
|
|
29
|
+
$[5] = classNames;
|
|
30
|
+
$[6] = defaultChecked;
|
|
31
|
+
$[7] = disabled;
|
|
32
|
+
$[8] = loading;
|
|
33
|
+
$[9] = onChange;
|
|
34
|
+
$[10] = style;
|
|
35
|
+
$[11] = styles;
|
|
36
|
+
$[12] = t1;
|
|
37
|
+
$[13] = unCheckedChildren;
|
|
38
|
+
} else {
|
|
39
|
+
ariaProps = $[1];
|
|
40
|
+
checked = $[2];
|
|
41
|
+
checkedChildren = $[3];
|
|
42
|
+
className = $[4];
|
|
43
|
+
classNames = $[5];
|
|
44
|
+
defaultChecked = $[6];
|
|
45
|
+
disabled = $[7];
|
|
46
|
+
loading = $[8];
|
|
47
|
+
onChange = $[9];
|
|
48
|
+
style = $[10];
|
|
49
|
+
styles = $[11];
|
|
50
|
+
t1 = $[12];
|
|
51
|
+
unCheckedChildren = $[13];
|
|
52
|
+
}
|
|
10
53
|
const size = void 0 === t1 ? "medium" : t1;
|
|
11
54
|
const ctx = useTaoConfig();
|
|
12
55
|
const resolvedDisabled = disabled ?? ctx.disabled ?? false;
|
|
@@ -15,122 +58,127 @@ const switch_Switch = /*#__PURE__*/ forwardRef(function(t0, ref) {
|
|
|
15
58
|
const [internalChecked, setInternalChecked] = useState(defaultChecked ?? false);
|
|
16
59
|
const resolvedChecked = controlled ? checked : internalChecked;
|
|
17
60
|
let t2;
|
|
18
|
-
if ($[
|
|
61
|
+
if ($[14] !== controlled || $[15] !== onChange || $[16] !== resolvedChecked) {
|
|
19
62
|
t2 = ()=>{
|
|
20
63
|
const next = !resolvedChecked;
|
|
21
64
|
if (!controlled) setInternalChecked(next);
|
|
22
65
|
onChange?.(next);
|
|
23
66
|
};
|
|
24
|
-
$[
|
|
25
|
-
$[
|
|
26
|
-
$[
|
|
27
|
-
$[
|
|
28
|
-
} else t2 = $[
|
|
67
|
+
$[14] = controlled;
|
|
68
|
+
$[15] = onChange;
|
|
69
|
+
$[16] = resolvedChecked;
|
|
70
|
+
$[17] = t2;
|
|
71
|
+
} else t2 = $[17];
|
|
29
72
|
const handleChange = t2;
|
|
30
|
-
const t3 =
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
$[
|
|
36
|
-
$[
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
73
|
+
const t3 = loading || void 0;
|
|
74
|
+
const t4 = classNames?.root;
|
|
75
|
+
let t5;
|
|
76
|
+
if ($[18] !== className || $[19] !== t4) {
|
|
77
|
+
t5 = cx(t4, className);
|
|
78
|
+
$[18] = className;
|
|
79
|
+
$[19] = t4;
|
|
80
|
+
$[20] = t5;
|
|
81
|
+
} else t5 = $[20];
|
|
82
|
+
const t6 = styles?.root;
|
|
83
|
+
let t7;
|
|
84
|
+
if ($[21] !== style || $[22] !== t6) {
|
|
85
|
+
t7 = {
|
|
86
|
+
...t6,
|
|
43
87
|
...style
|
|
44
88
|
};
|
|
45
|
-
$[
|
|
46
|
-
$[
|
|
47
|
-
$[
|
|
48
|
-
} else
|
|
49
|
-
const
|
|
50
|
-
const
|
|
51
|
-
const
|
|
52
|
-
let t10;
|
|
53
|
-
if ($[10] !== loading) {
|
|
54
|
-
t10 = loading && /*#__PURE__*/ jsx(LoadingIcon, {});
|
|
55
|
-
$[10] = loading;
|
|
56
|
-
$[11] = t10;
|
|
57
|
-
} else t10 = $[11];
|
|
89
|
+
$[21] = style;
|
|
90
|
+
$[22] = t6;
|
|
91
|
+
$[23] = t7;
|
|
92
|
+
} else t7 = $[23];
|
|
93
|
+
const t8 = resolvedChecked || void 0;
|
|
94
|
+
const t9 = classNames?.handle;
|
|
95
|
+
const t10 = styles?.handle;
|
|
58
96
|
let t11;
|
|
59
|
-
if ($[
|
|
60
|
-
t11 = /*#__PURE__*/ jsx(
|
|
61
|
-
|
|
62
|
-
|
|
97
|
+
if ($[24] !== loading) {
|
|
98
|
+
t11 = loading && /*#__PURE__*/ jsx(LoadingIcon, {});
|
|
99
|
+
$[24] = loading;
|
|
100
|
+
$[25] = t11;
|
|
101
|
+
} else t11 = $[25];
|
|
102
|
+
let t12;
|
|
103
|
+
if ($[26] !== t10 || $[27] !== t11 || $[28] !== t9) {
|
|
104
|
+
t12 = /*#__PURE__*/ jsx("div", {
|
|
105
|
+
className: t9,
|
|
106
|
+
style: t10,
|
|
63
107
|
"data-tao-switch-handle": "",
|
|
64
|
-
children:
|
|
108
|
+
children: t11
|
|
65
109
|
});
|
|
66
|
-
$[
|
|
67
|
-
$[
|
|
68
|
-
$[
|
|
69
|
-
$[
|
|
70
|
-
} else
|
|
71
|
-
let
|
|
72
|
-
if ($[
|
|
73
|
-
|
|
110
|
+
$[26] = t10;
|
|
111
|
+
$[27] = t11;
|
|
112
|
+
$[28] = t9;
|
|
113
|
+
$[29] = t12;
|
|
114
|
+
} else t12 = $[29];
|
|
115
|
+
let t13;
|
|
116
|
+
if ($[30] !== checkedChildren) {
|
|
117
|
+
t13 = /*#__PURE__*/ jsx("span", {
|
|
74
118
|
"data-tao-switch-inner-checked": "",
|
|
75
119
|
children: checkedChildren
|
|
76
120
|
});
|
|
77
|
-
$[
|
|
78
|
-
$[
|
|
79
|
-
} else
|
|
80
|
-
let
|
|
81
|
-
if ($[
|
|
82
|
-
|
|
121
|
+
$[30] = checkedChildren;
|
|
122
|
+
$[31] = t13;
|
|
123
|
+
} else t13 = $[31];
|
|
124
|
+
let t14;
|
|
125
|
+
if ($[32] !== unCheckedChildren) {
|
|
126
|
+
t14 = /*#__PURE__*/ jsx("span", {
|
|
83
127
|
"data-tao-switch-inner-unchecked": "",
|
|
84
128
|
children: unCheckedChildren
|
|
85
129
|
});
|
|
86
|
-
$[
|
|
87
|
-
$[
|
|
88
|
-
} else
|
|
89
|
-
let
|
|
90
|
-
if ($[
|
|
91
|
-
|
|
130
|
+
$[32] = unCheckedChildren;
|
|
131
|
+
$[33] = t14;
|
|
132
|
+
} else t14 = $[33];
|
|
133
|
+
let t15;
|
|
134
|
+
if ($[34] !== t13 || $[35] !== t14) {
|
|
135
|
+
t15 = /*#__PURE__*/ jsxs("span", {
|
|
92
136
|
"data-tao-switch-inner": "",
|
|
93
137
|
children: [
|
|
94
|
-
|
|
95
|
-
|
|
138
|
+
t13,
|
|
139
|
+
t14
|
|
96
140
|
]
|
|
97
141
|
});
|
|
98
|
-
$[
|
|
99
|
-
$[
|
|
100
|
-
$[
|
|
101
|
-
} else
|
|
102
|
-
let
|
|
103
|
-
if ($[
|
|
104
|
-
|
|
142
|
+
$[34] = t13;
|
|
143
|
+
$[35] = t14;
|
|
144
|
+
$[36] = t15;
|
|
145
|
+
} else t15 = $[36];
|
|
146
|
+
let t16;
|
|
147
|
+
if ($[37] !== ariaProps || $[38] !== handleChange || $[39] !== isDisabled || $[40] !== ref || $[41] !== resolvedChecked || $[42] !== size || $[43] !== t12 || $[44] !== t15 || $[45] !== t3 || $[46] !== t5 || $[47] !== t7 || $[48] !== t8) {
|
|
148
|
+
t16 = /*#__PURE__*/ jsxs("button", {
|
|
149
|
+
...ariaProps,
|
|
150
|
+
"aria-busy": t3,
|
|
105
151
|
ref: ref,
|
|
106
152
|
type: "button",
|
|
107
153
|
role: "switch",
|
|
108
154
|
"aria-checked": resolvedChecked,
|
|
109
155
|
disabled: isDisabled,
|
|
110
|
-
className:
|
|
111
|
-
style:
|
|
156
|
+
className: t5,
|
|
157
|
+
style: t7,
|
|
112
158
|
"data-tao-switch": "",
|
|
113
159
|
"data-tao-size": size,
|
|
114
|
-
"data-tao-checked":
|
|
160
|
+
"data-tao-checked": t8,
|
|
115
161
|
onClick: handleChange,
|
|
116
162
|
children: [
|
|
117
|
-
|
|
118
|
-
|
|
163
|
+
t12,
|
|
164
|
+
t15
|
|
119
165
|
]
|
|
120
166
|
});
|
|
121
|
-
$[
|
|
122
|
-
$[
|
|
123
|
-
$[
|
|
124
|
-
$[
|
|
125
|
-
$[
|
|
126
|
-
$[
|
|
127
|
-
$[
|
|
128
|
-
$[
|
|
129
|
-
$[
|
|
130
|
-
$[
|
|
131
|
-
$[
|
|
132
|
-
|
|
133
|
-
|
|
167
|
+
$[37] = ariaProps;
|
|
168
|
+
$[38] = handleChange;
|
|
169
|
+
$[39] = isDisabled;
|
|
170
|
+
$[40] = ref;
|
|
171
|
+
$[41] = resolvedChecked;
|
|
172
|
+
$[42] = size;
|
|
173
|
+
$[43] = t12;
|
|
174
|
+
$[44] = t15;
|
|
175
|
+
$[45] = t3;
|
|
176
|
+
$[46] = t5;
|
|
177
|
+
$[47] = t7;
|
|
178
|
+
$[48] = t8;
|
|
179
|
+
$[49] = t16;
|
|
180
|
+
} else t16 = $[49];
|
|
181
|
+
return t16;
|
|
134
182
|
});
|
|
135
183
|
function LoadingIcon() {
|
|
136
184
|
const $ = c(1);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { TableFilterItem } from './table-types';
|
|
1
|
+
import type { TableFilterItem } from './table-types.js';
|
|
2
2
|
export declare function TableFilterDropdown({ filters, activeValues, onSelect, }: {
|
|
3
3
|
filters: TableFilterItem[];
|
|
4
4
|
activeValues: string[];
|
|
5
5
|
onSelect: (values: string[]) => void;
|
|
6
|
-
}): import("react
|
|
6
|
+
}): import("react").JSX.Element;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { MouseEvent } from 'react';
|
|
2
|
-
import type { SortOrder } from './table-types';
|
|
2
|
+
import type { SortOrder } from './table-types.js';
|
|
3
3
|
export declare function SortIcon({ order }: {
|
|
4
4
|
order: SortOrder;
|
|
5
|
-
}): import("react
|
|
5
|
+
}): import("react").JSX.Element;
|
|
6
6
|
export declare function FilterIcon({ active }: {
|
|
7
7
|
active: boolean;
|
|
8
|
-
}): import("react
|
|
9
|
-
export declare function TableLoadingSpinner(): import("react
|
|
10
|
-
export declare function CheckIcon(): import("react
|
|
8
|
+
}): import("react").JSX.Element;
|
|
9
|
+
export declare function TableLoadingSpinner(): import("react").JSX.Element;
|
|
10
|
+
export declare function CheckIcon(): import("react").JSX.Element;
|
|
11
11
|
export declare function ExpandIcon({ expanded, onClick, }: {
|
|
12
12
|
expanded: boolean;
|
|
13
13
|
onClick: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
14
|
-
}): import("react
|
|
14
|
+
}): import("react").JSX.Element;
|