@rockshin/tao-ui 0.0.59 → 0.0.60
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/cascader/cascader.js +1 -0
- package/dist/components/color-picker/color-picker.css +1 -1
- package/dist/components/color-picker/color-picker.js +3 -2
- package/dist/components/context-menu/context-menu.d.ts +3 -1
- package/dist/components/context-menu/context-menu.js +48 -43
- package/dist/components/date-picker/calendar/time-panel.js +7 -3
- package/dist/components/date-picker/date-picker.js +3 -1
- package/dist/components/date-picker/range-picker.js +5 -3
- package/dist/components/dropdown/dropdown.d.ts +1 -0
- package/dist/components/dropdown/dropdown.js +18 -12
- package/dist/components/float-button/float-button.js +2 -1
- package/dist/components/form/use-form.js +2 -1
- package/dist/components/input-number/input-number.d.ts +2 -1
- package/dist/components/input-number/input-number.js +67 -52
- package/dist/components/mentions/mentions.js +3 -2
- package/dist/components/menu/menu-render.d.ts +6 -0
- package/dist/components/menu/menu-render.js +38 -26
- package/dist/components/modal/confirm-dialog.js +11 -6
- package/dist/components/modal/use-modal.js +1 -1
- package/dist/components/pagination/pagination.d.ts +3 -2
- package/dist/components/pagination/pagination.js +127 -117
- package/dist/components/popover/popover.js +125 -298
- package/dist/components/select/mobile-select.js +1 -1
- package/dist/components/select/select-model.js +1 -1
- package/dist/components/select/use-select-selection.js +94 -86
- package/dist/components/statistic/statistic.js +38 -31
- package/dist/components/table/table-filter.d.ts +3 -1
- package/dist/components/table/table-filter.js +100 -74
- package/dist/components/table/table.js +1 -0
- package/dist/components/tabs/tabs.d.ts +3 -2
- package/dist/components/tabs/tabs.js +122 -112
- package/dist/components/time-picker/time-picker.js +4 -2
- package/dist/components/tooltip/tooltip.d.ts +1 -1
- package/dist/components/tooltip/tooltip.js +168 -210
- package/dist/components/tree-select/tree-select.js +1 -0
- package/dist/number-input/use-number-input.d.ts +1 -0
- package/dist/number-input/use-number-input.js +6 -2
- package/dist/provider/tao-provider.js +18 -4
- package/dist/theme/control.css +5 -1
- package/dist/theme/theme.css +2 -2
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import { c } from "react-compiler-runtime";
|
|
|
2
2
|
import { useState } from "react";
|
|
3
3
|
import { buildSelectIndex } from "./select-model.js";
|
|
4
4
|
function useSelectSelection(props, disabled) {
|
|
5
|
-
const $ = c(
|
|
5
|
+
const $ = c(80);
|
|
6
6
|
const { options, value: valueProp, defaultValue, mode, maxCount, tokenSeparators, onChange, onSelect, onDeselect, onClear } = props;
|
|
7
7
|
const multiple = "multiple" === mode || "tags" === mode;
|
|
8
8
|
const controlled = "value" in props;
|
|
@@ -69,41 +69,45 @@ function useSelectSelection(props, disabled) {
|
|
|
69
69
|
} else t4 = $[14];
|
|
70
70
|
const publish = t4;
|
|
71
71
|
let t5;
|
|
72
|
-
if ($[15] !== disabled || $[16] !== maxCount || $[17] !==
|
|
72
|
+
if ($[15] !== disabled || $[16] !== maxCount || $[17] !== mode || $[18] !== multiple || $[19] !== onDeselect || $[20] !== onSelect || $[21] !== optionByToken || $[22] !== optionByValue || $[23] !== publish || $[24] !== selectedValueSet || $[25] !== value || $[26] !== valueArray) {
|
|
73
73
|
t5 = (next_0)=>{
|
|
74
74
|
if (disabled) return false;
|
|
75
|
-
const option_0 = optionByValue.get(next_0);
|
|
75
|
+
const option_0 = optionByValue.get(next_0) ?? ("tags" === mode ? optionByToken.get(next_0) : void 0);
|
|
76
|
+
if (option_0?.disabled) return false;
|
|
77
|
+
const canonical = option_0?.value ?? next_0;
|
|
76
78
|
if (!multiple) {
|
|
77
|
-
if (
|
|
78
|
-
if (option_0) onSelect?.(
|
|
79
|
+
if (canonical !== value) publish(canonical);
|
|
80
|
+
if (option_0) onSelect?.(canonical, option_0);
|
|
79
81
|
return true;
|
|
80
82
|
}
|
|
81
|
-
const existed = selectedValueSet.has(
|
|
82
|
-
const nextArray = existed ? valueArray.filter((item_0)=>item_0 !==
|
|
83
|
+
const existed = selectedValueSet.has(canonical);
|
|
84
|
+
const nextArray = existed ? valueArray.filter((item_0)=>item_0 !== canonical) : [
|
|
83
85
|
...valueArray,
|
|
84
|
-
|
|
86
|
+
canonical
|
|
85
87
|
];
|
|
86
88
|
if (!existed && null != maxCount && nextArray.length > maxCount) return false;
|
|
87
89
|
publish(nextArray);
|
|
88
|
-
if (option_0) if (existed) onDeselect?.(
|
|
89
|
-
else onSelect?.(
|
|
90
|
+
if (option_0) if (existed) onDeselect?.(canonical, option_0);
|
|
91
|
+
else onSelect?.(canonical, option_0);
|
|
90
92
|
return true;
|
|
91
93
|
};
|
|
92
94
|
$[15] = disabled;
|
|
93
95
|
$[16] = maxCount;
|
|
94
|
-
$[17] =
|
|
95
|
-
$[18] =
|
|
96
|
-
$[19] =
|
|
97
|
-
$[20] =
|
|
98
|
-
$[21] =
|
|
99
|
-
$[22] =
|
|
100
|
-
$[23] =
|
|
101
|
-
$[24] =
|
|
102
|
-
$[25] =
|
|
103
|
-
|
|
96
|
+
$[17] = mode;
|
|
97
|
+
$[18] = multiple;
|
|
98
|
+
$[19] = onDeselect;
|
|
99
|
+
$[20] = onSelect;
|
|
100
|
+
$[21] = optionByToken;
|
|
101
|
+
$[22] = optionByValue;
|
|
102
|
+
$[23] = publish;
|
|
103
|
+
$[24] = selectedValueSet;
|
|
104
|
+
$[25] = value;
|
|
105
|
+
$[26] = valueArray;
|
|
106
|
+
$[27] = t5;
|
|
107
|
+
} else t5 = $[27];
|
|
104
108
|
const select = t5;
|
|
105
109
|
let t6;
|
|
106
|
-
if ($[
|
|
110
|
+
if ($[28] !== disabled || $[29] !== maxCount || $[30] !== mode || $[31] !== onSelect || $[32] !== optionByToken || $[33] !== optionByValue || $[34] !== publish || $[35] !== selectedValueSet || $[36] !== tokenSeparators || $[37] !== valueArray) {
|
|
107
111
|
t6 = (input)=>{
|
|
108
112
|
if (disabled) return false;
|
|
109
113
|
const tokens = (tokenSeparators ?? []).reduce(_temp2, [
|
|
@@ -133,37 +137,39 @@ function useSelectSelection(props, disabled) {
|
|
|
133
137
|
}
|
|
134
138
|
return true;
|
|
135
139
|
};
|
|
136
|
-
$[
|
|
137
|
-
$[
|
|
138
|
-
$[
|
|
139
|
-
$[
|
|
140
|
-
$[
|
|
141
|
-
$[
|
|
142
|
-
$[
|
|
143
|
-
$[
|
|
144
|
-
$[
|
|
145
|
-
$[
|
|
146
|
-
$[
|
|
147
|
-
} else t6 = $[
|
|
140
|
+
$[28] = disabled;
|
|
141
|
+
$[29] = maxCount;
|
|
142
|
+
$[30] = mode;
|
|
143
|
+
$[31] = onSelect;
|
|
144
|
+
$[32] = optionByToken;
|
|
145
|
+
$[33] = optionByValue;
|
|
146
|
+
$[34] = publish;
|
|
147
|
+
$[35] = selectedValueSet;
|
|
148
|
+
$[36] = tokenSeparators;
|
|
149
|
+
$[37] = valueArray;
|
|
150
|
+
$[38] = t6;
|
|
151
|
+
} else t6 = $[38];
|
|
148
152
|
const addTokens = t6;
|
|
149
153
|
let t7;
|
|
150
|
-
if ($[
|
|
154
|
+
if ($[39] !== disabled || $[40] !== multiple || $[41] !== onDeselect || $[42] !== optionByValue || $[43] !== publish || $[44] !== valueArray) {
|
|
151
155
|
t7 = (removed)=>{
|
|
152
|
-
if (!multiple) return;
|
|
153
|
-
publish(valueArray.filter((item_1)=>item_1 !== removed));
|
|
156
|
+
if (disabled || !multiple) return;
|
|
154
157
|
const option_3 = optionByValue.get(removed);
|
|
158
|
+
if (option_3?.disabled) return;
|
|
159
|
+
publish(valueArray.filter((item_1)=>item_1 !== removed));
|
|
155
160
|
if (option_3) onDeselect?.(removed, option_3);
|
|
156
161
|
};
|
|
157
|
-
$[
|
|
158
|
-
$[
|
|
159
|
-
$[
|
|
160
|
-
$[
|
|
161
|
-
$[
|
|
162
|
-
$[
|
|
163
|
-
|
|
162
|
+
$[39] = disabled;
|
|
163
|
+
$[40] = multiple;
|
|
164
|
+
$[41] = onDeselect;
|
|
165
|
+
$[42] = optionByValue;
|
|
166
|
+
$[43] = publish;
|
|
167
|
+
$[44] = valueArray;
|
|
168
|
+
$[45] = t7;
|
|
169
|
+
} else t7 = $[45];
|
|
164
170
|
const remove = t7;
|
|
165
171
|
let t8;
|
|
166
|
-
if ($[
|
|
172
|
+
if ($[46] !== disabled || $[47] !== maxCount || $[48] !== mode || $[49] !== onDeselect || $[50] !== onSelect || $[51] !== optionByValue || $[52] !== publish || $[53] !== selectedValueSet || $[54] !== valueArray) {
|
|
167
173
|
t8 = (draft)=>{
|
|
168
174
|
if (disabled) return;
|
|
169
175
|
const nextArray_1 = draft.filter((item_2)=>{
|
|
@@ -183,56 +189,58 @@ function useSelectSelection(props, disabled) {
|
|
|
183
189
|
if (option_6) onDeselect?.(previous, option_6);
|
|
184
190
|
}
|
|
185
191
|
};
|
|
186
|
-
$[
|
|
187
|
-
$[
|
|
188
|
-
$[
|
|
189
|
-
$[
|
|
190
|
-
$[
|
|
191
|
-
$[
|
|
192
|
-
$[
|
|
193
|
-
$[
|
|
194
|
-
$[
|
|
195
|
-
$[
|
|
196
|
-
} else t8 = $[
|
|
192
|
+
$[46] = disabled;
|
|
193
|
+
$[47] = maxCount;
|
|
194
|
+
$[48] = mode;
|
|
195
|
+
$[49] = onDeselect;
|
|
196
|
+
$[50] = onSelect;
|
|
197
|
+
$[51] = optionByValue;
|
|
198
|
+
$[52] = publish;
|
|
199
|
+
$[53] = selectedValueSet;
|
|
200
|
+
$[54] = valueArray;
|
|
201
|
+
$[55] = t8;
|
|
202
|
+
} else t8 = $[55];
|
|
197
203
|
const commit = t8;
|
|
198
204
|
let t9;
|
|
199
|
-
if ($[
|
|
205
|
+
if ($[56] !== disabled || $[57] !== multiple || $[58] !== onClear || $[59] !== publish) {
|
|
200
206
|
t9 = ()=>{
|
|
207
|
+
if (disabled) return;
|
|
201
208
|
publish(multiple ? [] : void 0, true);
|
|
202
209
|
onClear?.();
|
|
203
210
|
};
|
|
204
|
-
$[
|
|
205
|
-
$[
|
|
206
|
-
$[
|
|
207
|
-
$[
|
|
208
|
-
|
|
211
|
+
$[56] = disabled;
|
|
212
|
+
$[57] = multiple;
|
|
213
|
+
$[58] = onClear;
|
|
214
|
+
$[59] = publish;
|
|
215
|
+
$[60] = t9;
|
|
216
|
+
} else t9 = $[60];
|
|
209
217
|
const clear_0 = t9;
|
|
210
218
|
let t10;
|
|
211
|
-
if ($[
|
|
219
|
+
if ($[61] !== multiple || $[62] !== optionByValue || $[63] !== value) {
|
|
212
220
|
t10 = !multiple && value ? optionByValue.get(value) ?? {
|
|
213
221
|
label: value,
|
|
214
222
|
value: value
|
|
215
223
|
} : void 0;
|
|
216
|
-
$[
|
|
217
|
-
$[
|
|
218
|
-
$[
|
|
219
|
-
$[
|
|
220
|
-
} else t10 = $[
|
|
224
|
+
$[61] = multiple;
|
|
225
|
+
$[62] = optionByValue;
|
|
226
|
+
$[63] = value;
|
|
227
|
+
$[64] = t10;
|
|
228
|
+
} else t10 = $[64];
|
|
221
229
|
const selectedOption = t10;
|
|
222
230
|
let t11;
|
|
223
|
-
if ($[
|
|
231
|
+
if ($[65] !== multiple || $[66] !== optionByValue || $[67] !== valueArray) {
|
|
224
232
|
t11 = multiple ? valueArray.map((item_3)=>optionByValue.get(item_3) ?? {
|
|
225
233
|
label: item_3,
|
|
226
234
|
value: item_3
|
|
227
235
|
}) : [];
|
|
228
|
-
$[
|
|
229
|
-
$[
|
|
230
|
-
$[
|
|
231
|
-
$[
|
|
232
|
-
} else t11 = $[
|
|
236
|
+
$[65] = multiple;
|
|
237
|
+
$[66] = optionByValue;
|
|
238
|
+
$[67] = valueArray;
|
|
239
|
+
$[68] = t11;
|
|
240
|
+
} else t11 = $[68];
|
|
233
241
|
const selectedOptions = t11;
|
|
234
242
|
let t12;
|
|
235
|
-
if ($[
|
|
243
|
+
if ($[69] !== addTokens || $[70] !== clear_0 || $[71] !== commit || $[72] !== remove || $[73] !== select || $[74] !== selectedOption || $[75] !== selectedOptions || $[76] !== selectedValueSet || $[77] !== value || $[78] !== valueArray) {
|
|
236
244
|
t12 = {
|
|
237
245
|
value,
|
|
238
246
|
valueArray,
|
|
@@ -245,18 +253,18 @@ function useSelectSelection(props, disabled) {
|
|
|
245
253
|
commit,
|
|
246
254
|
clear: clear_0
|
|
247
255
|
};
|
|
248
|
-
$[
|
|
249
|
-
$[
|
|
250
|
-
$[
|
|
251
|
-
$[
|
|
252
|
-
$[
|
|
253
|
-
$[
|
|
254
|
-
$[
|
|
255
|
-
$[
|
|
256
|
-
$[
|
|
257
|
-
$[
|
|
258
|
-
$[
|
|
259
|
-
} else t12 = $[
|
|
256
|
+
$[69] = addTokens;
|
|
257
|
+
$[70] = clear_0;
|
|
258
|
+
$[71] = commit;
|
|
259
|
+
$[72] = remove;
|
|
260
|
+
$[73] = select;
|
|
261
|
+
$[74] = selectedOption;
|
|
262
|
+
$[75] = selectedOptions;
|
|
263
|
+
$[76] = selectedValueSet;
|
|
264
|
+
$[77] = value;
|
|
265
|
+
$[78] = valueArray;
|
|
266
|
+
$[79] = t12;
|
|
267
|
+
} else t12 = $[79];
|
|
260
268
|
return t12;
|
|
261
269
|
}
|
|
262
270
|
function _temp3(token) {
|
|
@@ -373,7 +373,7 @@ function formatDuration(duration, format) {
|
|
|
373
373
|
return output.replace(/\0/g, ()=>literals[index++]);
|
|
374
374
|
}
|
|
375
375
|
function StatisticTimer(t0) {
|
|
376
|
-
const $ = c(
|
|
376
|
+
const $ = c(31);
|
|
377
377
|
let onChange;
|
|
378
378
|
let onFinish;
|
|
379
379
|
let rest;
|
|
@@ -434,16 +434,23 @@ function StatisticTimer(t0) {
|
|
|
434
434
|
useLayoutEffect(t3, t4);
|
|
435
435
|
let t5;
|
|
436
436
|
if ($[14] !== value) {
|
|
437
|
-
|
|
438
|
-
t5 = Number.isNaN(timestamp) ? void 0 : timestamp;
|
|
437
|
+
t5 = "string" == typeof value && "" !== value.trim() && Number.isFinite(Number(value)) ? Number(value) : value;
|
|
439
438
|
$[14] = value;
|
|
440
439
|
$[15] = t5;
|
|
441
440
|
} else t5 = $[15];
|
|
442
|
-
const
|
|
441
|
+
const normalized = t5;
|
|
443
442
|
let t6;
|
|
443
|
+
if ($[16] !== normalized) {
|
|
444
|
+
const timestamp = void 0 === normalized ? 0 / 0 : new Date(normalized).getTime();
|
|
445
|
+
t6 = Number.isNaN(timestamp) ? void 0 : timestamp;
|
|
446
|
+
$[16] = normalized;
|
|
447
|
+
$[17] = t6;
|
|
448
|
+
} else t6 = $[17];
|
|
449
|
+
const target = t6;
|
|
444
450
|
let t7;
|
|
445
|
-
|
|
446
|
-
|
|
451
|
+
let t8;
|
|
452
|
+
if ($[18] !== target || $[19] !== type) {
|
|
453
|
+
t7 = ()=>{
|
|
447
454
|
if (void 0 === target) return void setNow(void 0);
|
|
448
455
|
setNow(Date.now());
|
|
449
456
|
const timer = setInterval(()=>{
|
|
@@ -458,41 +465,41 @@ function StatisticTimer(t0) {
|
|
|
458
465
|
}, 16.666666666666668);
|
|
459
466
|
return ()=>clearInterval(timer);
|
|
460
467
|
};
|
|
461
|
-
|
|
468
|
+
t8 = [
|
|
462
469
|
target,
|
|
463
470
|
type
|
|
464
471
|
];
|
|
465
|
-
$[
|
|
466
|
-
$[
|
|
467
|
-
$[
|
|
468
|
-
$[
|
|
472
|
+
$[18] = target;
|
|
473
|
+
$[19] = type;
|
|
474
|
+
$[20] = t7;
|
|
475
|
+
$[21] = t8;
|
|
469
476
|
} else {
|
|
470
|
-
|
|
471
|
-
|
|
477
|
+
t7 = $[20];
|
|
478
|
+
t8 = $[21];
|
|
472
479
|
}
|
|
473
|
-
useEffect(
|
|
474
|
-
let t8;
|
|
475
|
-
if ($[20] !== format || $[21] !== now || $[22] !== target || $[23] !== type) {
|
|
476
|
-
t8 = ()=>void 0 === now || void 0 === target ? "-" : formatDuration("countdown" === type ? target - now : now - target, format);
|
|
477
|
-
$[20] = format;
|
|
478
|
-
$[21] = now;
|
|
479
|
-
$[22] = target;
|
|
480
|
-
$[23] = type;
|
|
481
|
-
$[24] = t8;
|
|
482
|
-
} else t8 = $[24];
|
|
480
|
+
useEffect(t7, t8);
|
|
483
481
|
let t9;
|
|
484
|
-
if ($[
|
|
485
|
-
t9 =
|
|
482
|
+
if ($[22] !== format || $[23] !== now || $[24] !== target || $[25] !== type) {
|
|
483
|
+
t9 = ()=>void 0 === now || void 0 === target ? "-" : formatDuration("countdown" === type ? target - now : now - target, format);
|
|
484
|
+
$[22] = format;
|
|
485
|
+
$[23] = now;
|
|
486
|
+
$[24] = target;
|
|
487
|
+
$[25] = type;
|
|
488
|
+
$[26] = t9;
|
|
489
|
+
} else t9 = $[26];
|
|
490
|
+
let t10;
|
|
491
|
+
if ($[27] !== rest || $[28] !== t9 || $[29] !== value) {
|
|
492
|
+
t10 = /*#__PURE__*/ jsx(StatisticRoot, {
|
|
486
493
|
...rest,
|
|
487
494
|
value: value,
|
|
488
|
-
formatter:
|
|
495
|
+
formatter: t9
|
|
489
496
|
});
|
|
490
|
-
$[
|
|
491
|
-
$[26] = t8;
|
|
492
|
-
$[27] = value;
|
|
497
|
+
$[27] = rest;
|
|
493
498
|
$[28] = t9;
|
|
494
|
-
|
|
495
|
-
|
|
499
|
+
$[29] = value;
|
|
500
|
+
$[30] = t10;
|
|
501
|
+
} else t10 = $[30];
|
|
502
|
+
return t10;
|
|
496
503
|
}
|
|
497
504
|
function Countdown(props) {
|
|
498
505
|
const $ = c(2);
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { type TaoDirection } from '../../provider/tao-provider.js';
|
|
1
2
|
import type { TableFilterItem } from './table-types.js';
|
|
2
|
-
export declare function TableFilterDropdown({ filters, activeValues, onSelect, }: {
|
|
3
|
+
export declare function TableFilterDropdown({ filters, activeValues, direction, onSelect, }: {
|
|
3
4
|
filters: TableFilterItem[];
|
|
4
5
|
activeValues: string[];
|
|
6
|
+
direction?: TaoDirection;
|
|
5
7
|
onSelect: (values: string[]) => void;
|
|
6
8
|
}): import("react").JSX.Element;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "react-compiler-runtime";
|
|
3
|
+
import { useState } from "react";
|
|
3
4
|
import { TaoPortalScope, useTaoConfig } from "../../provider/tao-provider.js";
|
|
4
5
|
import { CheckIcon, FilterIcon } from "./table-icons.js";
|
|
5
6
|
import * as __rspack_external__radix_ui_react_dropdown_menu_154a7470 from "@radix-ui/react-dropdown-menu";
|
|
6
7
|
function TableFilterDropdown(t0) {
|
|
7
|
-
const $ = c(
|
|
8
|
-
const { filters, activeValues, onSelect } = t0;
|
|
8
|
+
const $ = c(37);
|
|
9
|
+
const { filters, activeValues, direction, onSelect } = t0;
|
|
9
10
|
const { locale, disabled } = useTaoConfig();
|
|
11
|
+
const [internalOpen, setInternalOpen] = useState(false);
|
|
12
|
+
if (disabled && internalOpen) setInternalOpen(false);
|
|
13
|
+
const open = !disabled && internalOpen;
|
|
10
14
|
let t1;
|
|
11
15
|
if ($[0] !== activeValues || $[1] !== onSelect) {
|
|
12
16
|
t1 = (value)=>{
|
|
@@ -20,45 +24,53 @@ function TableFilterDropdown(t0) {
|
|
|
20
24
|
$[2] = t1;
|
|
21
25
|
} else t1 = $[2];
|
|
22
26
|
const toggle = t1;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
$[
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
let t2;
|
|
28
|
+
if ($[3] !== disabled) {
|
|
29
|
+
t2 = (next)=>{
|
|
30
|
+
if (!disabled || !next) setInternalOpen(next);
|
|
31
|
+
};
|
|
32
|
+
$[3] = disabled;
|
|
33
|
+
$[4] = t2;
|
|
34
|
+
} else t2 = $[4];
|
|
35
|
+
const t3 = activeValues.length > 0;
|
|
32
36
|
let t4;
|
|
33
|
-
if ($[5] !==
|
|
34
|
-
t4 = /*#__PURE__*/ jsx(
|
|
37
|
+
if ($[5] !== t3) {
|
|
38
|
+
t4 = /*#__PURE__*/ jsx(FilterIcon, {
|
|
39
|
+
active: t3
|
|
40
|
+
});
|
|
41
|
+
$[5] = t3;
|
|
42
|
+
$[6] = t4;
|
|
43
|
+
} else t4 = $[6];
|
|
44
|
+
let t5;
|
|
45
|
+
if ($[7] !== disabled || $[8] !== locale.messages.filter || $[9] !== t4) {
|
|
46
|
+
t5 = /*#__PURE__*/ jsx("button", {
|
|
35
47
|
type: "button",
|
|
36
48
|
"data-tao-table-filter-trigger": "",
|
|
37
49
|
"aria-label": locale.messages.filter,
|
|
38
50
|
disabled: disabled,
|
|
39
|
-
children:
|
|
40
|
-
});
|
|
41
|
-
$[5] = disabled;
|
|
42
|
-
$[6] = locale.messages.filter;
|
|
43
|
-
$[7] = t3;
|
|
44
|
-
$[8] = t4;
|
|
45
|
-
} else t4 = $[8];
|
|
46
|
-
const trigger = t4;
|
|
47
|
-
if (disabled) return trigger;
|
|
48
|
-
let t5;
|
|
49
|
-
if ($[9] !== trigger) {
|
|
50
|
-
t5 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dropdown_menu_154a7470.Trigger, {
|
|
51
|
-
asChild: true,
|
|
52
|
-
children: trigger
|
|
51
|
+
children: t4
|
|
53
52
|
});
|
|
54
|
-
$[
|
|
53
|
+
$[7] = disabled;
|
|
54
|
+
$[8] = locale.messages.filter;
|
|
55
|
+
$[9] = t4;
|
|
55
56
|
$[10] = t5;
|
|
56
57
|
} else t5 = $[10];
|
|
57
58
|
let t6;
|
|
58
|
-
if ($[11] !==
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
if ($[11] !== disabled || $[12] !== t5) {
|
|
60
|
+
t6 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dropdown_menu_154a7470.Trigger, {
|
|
61
|
+
asChild: true,
|
|
62
|
+
disabled: disabled,
|
|
63
|
+
children: t5
|
|
64
|
+
});
|
|
65
|
+
$[11] = disabled;
|
|
66
|
+
$[12] = t5;
|
|
67
|
+
$[13] = t6;
|
|
68
|
+
} else t6 = $[13];
|
|
69
|
+
let t7;
|
|
70
|
+
if ($[14] !== activeValues || $[15] !== filters || $[16] !== toggle) {
|
|
71
|
+
let t8;
|
|
72
|
+
if ($[18] !== activeValues || $[19] !== toggle) {
|
|
73
|
+
t8 = (filter)=>{
|
|
62
74
|
const checked = activeValues.includes(filter.value);
|
|
63
75
|
return /*#__PURE__*/ jsxs(__rspack_external__radix_ui_react_dropdown_menu_154a7470.CheckboxItem, {
|
|
64
76
|
checked: checked,
|
|
@@ -79,62 +91,76 @@ function TableFilterDropdown(t0) {
|
|
|
79
91
|
]
|
|
80
92
|
}, filter.value);
|
|
81
93
|
};
|
|
82
|
-
$[
|
|
83
|
-
$[
|
|
84
|
-
$[
|
|
85
|
-
} else
|
|
86
|
-
|
|
87
|
-
$[
|
|
88
|
-
$[
|
|
89
|
-
$[
|
|
90
|
-
$[
|
|
91
|
-
} else
|
|
92
|
-
let
|
|
93
|
-
if ($[
|
|
94
|
-
|
|
94
|
+
$[18] = activeValues;
|
|
95
|
+
$[19] = toggle;
|
|
96
|
+
$[20] = t8;
|
|
97
|
+
} else t8 = $[20];
|
|
98
|
+
t7 = filters.map(t8);
|
|
99
|
+
$[14] = activeValues;
|
|
100
|
+
$[15] = filters;
|
|
101
|
+
$[16] = toggle;
|
|
102
|
+
$[17] = t7;
|
|
103
|
+
} else t7 = $[17];
|
|
104
|
+
let t8;
|
|
105
|
+
if ($[21] !== activeValues.length || $[22] !== locale.messages.filterReset || $[23] !== onSelect) {
|
|
106
|
+
t8 = activeValues.length > 0 && /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dropdown_menu_154a7470.Item, {
|
|
95
107
|
"data-tao-table-filter-reset": "",
|
|
96
108
|
onSelect: ()=>onSelect([]),
|
|
97
109
|
children: locale.messages.filterReset
|
|
98
110
|
});
|
|
99
|
-
$[
|
|
100
|
-
$[
|
|
101
|
-
$[
|
|
102
|
-
$[21] = t7;
|
|
103
|
-
} else t7 = $[21];
|
|
104
|
-
let t8;
|
|
105
|
-
if ($[22] !== t6 || $[23] !== t7) {
|
|
106
|
-
t8 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dropdown_menu_154a7470.Portal, {
|
|
107
|
-
children: /*#__PURE__*/ jsx(TaoPortalScope, {
|
|
108
|
-
asChild: true,
|
|
109
|
-
children: /*#__PURE__*/ jsxs(__rspack_external__radix_ui_react_dropdown_menu_154a7470.Content, {
|
|
110
|
-
"data-tao-table-filter-panel": "",
|
|
111
|
-
align: "end",
|
|
112
|
-
sideOffset: 4,
|
|
113
|
-
loop: true,
|
|
114
|
-
children: [
|
|
115
|
-
t6,
|
|
116
|
-
t7
|
|
117
|
-
]
|
|
118
|
-
})
|
|
119
|
-
})
|
|
120
|
-
});
|
|
121
|
-
$[22] = t6;
|
|
122
|
-
$[23] = t7;
|
|
111
|
+
$[21] = activeValues.length;
|
|
112
|
+
$[22] = locale.messages.filterReset;
|
|
113
|
+
$[23] = onSelect;
|
|
123
114
|
$[24] = t8;
|
|
124
115
|
} else t8 = $[24];
|
|
125
116
|
let t9;
|
|
126
|
-
if ($[25] !==
|
|
127
|
-
t9 = /*#__PURE__*/ jsxs(__rspack_external__radix_ui_react_dropdown_menu_154a7470.
|
|
117
|
+
if ($[25] !== t7 || $[26] !== t8) {
|
|
118
|
+
t9 = /*#__PURE__*/ jsxs(__rspack_external__radix_ui_react_dropdown_menu_154a7470.Content, {
|
|
119
|
+
"data-tao-table-filter-panel": "",
|
|
120
|
+
align: "end",
|
|
121
|
+
sideOffset: 4,
|
|
122
|
+
loop: true,
|
|
128
123
|
children: [
|
|
129
|
-
|
|
124
|
+
t7,
|
|
130
125
|
t8
|
|
131
126
|
]
|
|
132
127
|
});
|
|
133
|
-
$[25] =
|
|
128
|
+
$[25] = t7;
|
|
134
129
|
$[26] = t8;
|
|
135
130
|
$[27] = t9;
|
|
136
131
|
} else t9 = $[27];
|
|
137
|
-
|
|
132
|
+
let t10;
|
|
133
|
+
if ($[28] !== direction || $[29] !== t9) {
|
|
134
|
+
t10 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dropdown_menu_154a7470.Portal, {
|
|
135
|
+
children: /*#__PURE__*/ jsx(TaoPortalScope, {
|
|
136
|
+
asChild: true,
|
|
137
|
+
direction: direction,
|
|
138
|
+
children: t9
|
|
139
|
+
})
|
|
140
|
+
});
|
|
141
|
+
$[28] = direction;
|
|
142
|
+
$[29] = t9;
|
|
143
|
+
$[30] = t10;
|
|
144
|
+
} else t10 = $[30];
|
|
145
|
+
let t11;
|
|
146
|
+
if ($[31] !== direction || $[32] !== open || $[33] !== t10 || $[34] !== t2 || $[35] !== t6) {
|
|
147
|
+
t11 = /*#__PURE__*/ jsxs(__rspack_external__radix_ui_react_dropdown_menu_154a7470.Root, {
|
|
148
|
+
dir: direction,
|
|
149
|
+
open: open,
|
|
150
|
+
onOpenChange: t2,
|
|
151
|
+
children: [
|
|
152
|
+
t6,
|
|
153
|
+
t10
|
|
154
|
+
]
|
|
155
|
+
});
|
|
156
|
+
$[31] = direction;
|
|
157
|
+
$[32] = open;
|
|
158
|
+
$[33] = t10;
|
|
159
|
+
$[34] = t2;
|
|
160
|
+
$[35] = t6;
|
|
161
|
+
$[36] = t11;
|
|
162
|
+
} else t11 = $[36];
|
|
163
|
+
return t11;
|
|
138
164
|
}
|
|
139
165
|
function _temp(event) {
|
|
140
166
|
return event.preventDefault();
|
|
@@ -385,6 +385,7 @@ function Table({ columns: columnsProp, dataSource, rowKey, loading = false, pagi
|
|
|
385
385
|
hasFilter && /*#__PURE__*/ jsx(TableFilterDropdown, {
|
|
386
386
|
filters: col_4.filters,
|
|
387
387
|
activeValues: activeFilterValues,
|
|
388
|
+
direction: direction,
|
|
388
389
|
onSelect: onFilter
|
|
389
390
|
})
|
|
390
391
|
]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type AriaAttributes, type ReactNode } from 'react';
|
|
1
|
+
import { type AriaAttributes, type CSSProperties, type ReactNode } from 'react';
|
|
2
2
|
import { type TaoSize } from '../../provider/tao-provider.js';
|
|
3
3
|
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic.js';
|
|
4
4
|
import './tabs.css';
|
|
@@ -18,7 +18,8 @@ export interface TabsProps extends Pick<AriaAttributes, 'aria-label' | 'aria-lab
|
|
|
18
18
|
variant?: 'line' | 'card';
|
|
19
19
|
destroyInactiveTabPane?: boolean;
|
|
20
20
|
className?: string;
|
|
21
|
+
style?: CSSProperties;
|
|
21
22
|
classNames?: SemanticClassNames<TabsSemanticPart>;
|
|
22
23
|
styles?: SemanticStyles<TabsSemanticPart>;
|
|
23
24
|
}
|
|
24
|
-
export declare function Tabs({ items, activeKey: activeKeyProp, defaultActiveKey, onChange, size, variant, destroyInactiveTabPane, className, classNames, styles, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, }: TabsProps): import("react").JSX.Element;
|
|
25
|
+
export declare function Tabs({ items, activeKey: activeKeyProp, defaultActiveKey, onChange, size, variant, destroyInactiveTabPane, className, style, classNames, styles, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, }: TabsProps): import("react").JSX.Element;
|