@rockshin/tao-ui 0.0.42 → 0.0.43
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 +34 -17
- package/dist/components/alert/alert.css +1 -0
- package/dist/components/avatar/avatar.js +1 -1
- package/dist/components/calendar/calendar.css +10 -60
- package/dist/components/calendar/calendar.js +46 -43
- package/dist/components/card/card.css +1 -1
- package/dist/components/carousel/carousel.css +1 -0
- package/dist/components/carousel/carousel.js +62 -7
- package/dist/components/collapse/collapse-panels.d.ts +4 -0
- package/dist/components/collapse/collapse-panels.js +413 -0
- package/dist/components/collapse/collapse.css +199 -0
- package/dist/components/collapse/collapse.d.ts +77 -0
- package/dist/components/{collapsible/collapsible.js → collapse/collapse.js} +26 -10
- package/dist/components/color-picker/color-picker.css +8 -42
- package/dist/components/color-picker/color-picker.js +220 -145
- package/dist/components/date-picker/date-picker.css +18 -56
- package/dist/components/date-picker/date-picker.d.ts +2 -0
- package/dist/components/date-picker/date-picker.js +11 -6
- package/dist/components/date-picker/presets.js +5 -2
- package/dist/components/date-picker/range-picker.d.ts +2 -0
- package/dist/components/date-picker/range-picker.js +3 -1
- package/dist/components/form/form-item.js +1 -0
- package/dist/components/form/form.css +15 -0
- package/dist/components/form/form.js +1 -0
- package/dist/components/form-field/form-field-view.d.ts +3 -1
- package/dist/components/form-field/form-field-view.js +109 -84
- package/dist/components/input/base-input.d.ts +25 -0
- package/dist/components/input/base-input.js +104 -0
- package/dist/components/input/input-shared.css +75 -0
- package/dist/components/input/input-shared.d.ts +59 -0
- package/dist/components/input/input-shared.js +152 -0
- package/dist/components/input/input.css +99 -4
- package/dist/components/input/input.d.ts +12 -16
- package/dist/components/input/input.js +11 -154
- package/dist/components/input/otp.d.ts +29 -0
- package/dist/components/input/otp.js +335 -0
- package/dist/components/input/password.d.ts +12 -0
- package/dist/components/input/password.js +117 -0
- package/dist/components/input/search.d.ts +16 -0
- package/dist/components/input/search.js +99 -0
- package/dist/components/input-number/input-number.d.ts +2 -2
- package/dist/components/input-number/input-number.js +2 -2
- package/dist/components/list/list-pagination.css +5 -5
- package/dist/components/list/list-pagination.js +1 -0
- package/dist/components/mentions/mentions.css +7 -0
- package/dist/components/modal/modal.css +1 -0
- package/dist/components/radio/radio.d.ts +1 -1
- package/dist/components/radio/radio.js +78 -73
- package/dist/components/select/mobile-select.css +1 -16
- package/dist/components/select/mobile-select.d.ts +2 -1
- package/dist/components/select/mobile-select.js +68 -63
- package/dist/components/select/select-types.d.ts +2 -0
- package/dist/components/select/select.css +19 -0
- package/dist/components/select/select.js +31 -17
- package/dist/components/spinner/spinner.css +1 -1
- package/dist/components/steps/steps.css +53 -3
- package/dist/components/table/table.css +0 -5
- package/dist/components/table/table.js +21 -22
- package/dist/components/textarea/textarea.css +20 -0
- package/dist/components/textarea/textarea.d.ts +12 -6
- package/dist/components/textarea/textarea.js +120 -219
- package/dist/components/time-picker/time-picker.css +7 -0
- package/dist/components/tree/tree-check.d.ts +1 -0
- package/dist/components/tree/tree-check.js +36 -0
- package/dist/components/tree/tree.css +13 -18
- package/dist/components/tree/tree.js +2 -3
- package/dist/components/tree-select/select-engine.css +7 -0
- package/dist/components/tree-select/tree-select.js +2 -3
- package/dist/components/upload/upload.css +0 -11
- package/dist/components/upload/upload.js +13 -3
- package/dist/docs/component-docs.js +2 -2
- package/dist/docs/components/{collapsible.doc.d.ts → collapse.doc.d.ts} +1 -1
- package/dist/docs/components/collapse.doc.js +47 -0
- package/dist/docs/components/input.doc.js +11 -4
- package/dist/docs/components/textarea.doc.js +4 -2
- package/dist/entries/collapse.d.ts +3 -0
- package/dist/entries/{collapsible.js → collapse.js} +1 -1
- package/dist/entries/input.d.ts +1 -1
- package/dist/entries/textarea.d.ts +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/provider/locale.d.ts +6 -0
- package/dist/provider/locale.js +10 -0
- package/dist/provider/tao-provider.js +1 -0
- package/dist/theme/control.css +2 -2
- package/dist/theme/theme.css +3 -1
- package/dist/theme/tokens.d.ts +2 -2
- package/dist/theme/tokens.js +1 -0
- package/dist/utils/field-label.d.ts +4 -0
- package/dist/utils/field-label.js +7 -0
- package/llms.txt +18 -15
- package/package.json +7 -4
- package/dist/components/collapsible/collapsible.css +0 -49
- package/dist/components/collapsible/collapsible.d.ts +0 -39
- package/dist/docs/components/collapsible.doc.js +0 -39
- package/dist/entries/collapsible.d.ts +0 -3
|
@@ -35,4 +35,4 @@ export interface RadioGroupProps extends Pick<AriaAttributes, 'aria-label' | 'ar
|
|
|
35
35
|
name?: string;
|
|
36
36
|
children?: ReactNode;
|
|
37
37
|
}
|
|
38
|
-
export declare function RadioGroup({ options, value, onChange, disabled, direction, name, children, id, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, 'aria-errormessage': ariaErrorMessage, 'aria-invalid': ariaInvalid, 'aria-required': ariaRequired, }: RadioGroupProps): import("react").JSX.Element;
|
|
38
|
+
export declare function RadioGroup({ options, value, defaultValue, onChange, disabled, direction, name, children, id, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, 'aria-errormessage': ariaErrorMessage, 'aria-invalid': ariaInvalid, 'aria-required': ariaRequired, }: RadioGroupProps): import("react").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "react-compiler-runtime";
|
|
3
|
-
import { createContext, forwardRef, useContext } from "react";
|
|
3
|
+
import { createContext, forwardRef, useContext, useState } from "react";
|
|
4
4
|
import { useTaoConfig } from "../../provider/tao-provider.js";
|
|
5
5
|
import { cx } from "../../utils/semantic.js";
|
|
6
6
|
import "./radio.css";
|
|
@@ -171,34 +171,39 @@ const radio_Radio = /*#__PURE__*/ forwardRef(function(t0, ref) {
|
|
|
171
171
|
return t15;
|
|
172
172
|
});
|
|
173
173
|
function RadioGroup(t0) {
|
|
174
|
-
const $ = c(
|
|
175
|
-
const { options, value, onChange, disabled, direction: t1, name, children, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-errormessage": ariaErrorMessage, "aria-invalid": ariaInvalid, "aria-required": ariaRequired } = t0;
|
|
174
|
+
const $ = c(48);
|
|
175
|
+
const { options, value, defaultValue, onChange, disabled, direction: t1, name, children, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-errormessage": ariaErrorMessage, "aria-invalid": ariaInvalid, "aria-required": ariaRequired } = t0;
|
|
176
176
|
const direction = void 0 === t1 ? "horizontal" : t1;
|
|
177
177
|
const ctx = useTaoConfig();
|
|
178
178
|
const resolvedDisabled = disabled ?? ctx.disabled ?? false;
|
|
179
|
+
const [internalValue, setInternalValue] = useState(defaultValue);
|
|
180
|
+
const isControlled = void 0 !== value;
|
|
181
|
+
const resolvedValue = isControlled ? value : internalValue;
|
|
179
182
|
let t2;
|
|
180
|
-
if ($[0] !== onChange) {
|
|
183
|
+
if ($[0] !== isControlled || $[1] !== onChange) {
|
|
181
184
|
t2 = (itemValue)=>{
|
|
185
|
+
if (!isControlled) setInternalValue(itemValue);
|
|
182
186
|
onChange?.(itemValue);
|
|
183
187
|
};
|
|
184
|
-
$[0] =
|
|
185
|
-
$[1] =
|
|
186
|
-
|
|
188
|
+
$[0] = isControlled;
|
|
189
|
+
$[1] = onChange;
|
|
190
|
+
$[2] = t2;
|
|
191
|
+
} else t2 = $[2];
|
|
187
192
|
const handleChange = t2;
|
|
188
193
|
let t3;
|
|
189
|
-
if ($[
|
|
194
|
+
if ($[3] !== handleChange || $[4] !== name || $[5] !== resolvedDisabled || $[6] !== resolvedValue) {
|
|
190
195
|
t3 = {
|
|
191
196
|
name,
|
|
192
|
-
value,
|
|
197
|
+
value: resolvedValue,
|
|
193
198
|
disabled: resolvedDisabled,
|
|
194
199
|
onChange: handleChange
|
|
195
200
|
};
|
|
196
|
-
$[
|
|
197
|
-
$[
|
|
198
|
-
$[
|
|
199
|
-
$[
|
|
200
|
-
$[
|
|
201
|
-
} else t3 = $[
|
|
201
|
+
$[3] = handleChange;
|
|
202
|
+
$[4] = name;
|
|
203
|
+
$[5] = resolvedDisabled;
|
|
204
|
+
$[6] = resolvedValue;
|
|
205
|
+
$[7] = t3;
|
|
206
|
+
} else t3 = $[7];
|
|
202
207
|
const groupCtxValue = t3;
|
|
203
208
|
let T0;
|
|
204
209
|
let t10;
|
|
@@ -213,7 +218,7 @@ function RadioGroup(t0) {
|
|
|
213
218
|
let t7;
|
|
214
219
|
let t8;
|
|
215
220
|
let t9;
|
|
216
|
-
if ($[
|
|
221
|
+
if ($[8] !== ariaDescribedBy || $[9] !== ariaErrorMessage || $[10] !== ariaInvalid || $[11] !== ariaLabel || $[12] !== ariaLabelledBy || $[13] !== ariaRequired || $[14] !== children || $[15] !== direction || $[16] !== groupCtxValue || $[17] !== id || $[18] !== options) {
|
|
217
222
|
const normalizedOptions = options?.map(_temp);
|
|
218
223
|
T0 = RadioGroupContext.Provider;
|
|
219
224
|
t15 = groupCtxValue;
|
|
@@ -228,47 +233,47 @@ function RadioGroup(t0) {
|
|
|
228
233
|
t12 = ariaInvalid;
|
|
229
234
|
t13 = ariaRequired;
|
|
230
235
|
t14 = normalizedOptions ? normalizedOptions.map(_temp2) : children;
|
|
231
|
-
$[
|
|
232
|
-
$[
|
|
233
|
-
$[
|
|
234
|
-
$[
|
|
235
|
-
$[
|
|
236
|
-
$[
|
|
237
|
-
$[
|
|
238
|
-
$[
|
|
239
|
-
$[
|
|
240
|
-
$[
|
|
241
|
-
$[
|
|
242
|
-
$[
|
|
243
|
-
$[
|
|
244
|
-
$[
|
|
245
|
-
$[
|
|
246
|
-
$[
|
|
247
|
-
$[
|
|
248
|
-
$[
|
|
249
|
-
$[
|
|
250
|
-
$[
|
|
251
|
-
$[
|
|
252
|
-
$[
|
|
253
|
-
$[
|
|
254
|
-
$[
|
|
236
|
+
$[8] = ariaDescribedBy;
|
|
237
|
+
$[9] = ariaErrorMessage;
|
|
238
|
+
$[10] = ariaInvalid;
|
|
239
|
+
$[11] = ariaLabel;
|
|
240
|
+
$[12] = ariaLabelledBy;
|
|
241
|
+
$[13] = ariaRequired;
|
|
242
|
+
$[14] = children;
|
|
243
|
+
$[15] = direction;
|
|
244
|
+
$[16] = groupCtxValue;
|
|
245
|
+
$[17] = id;
|
|
246
|
+
$[18] = options;
|
|
247
|
+
$[19] = T0;
|
|
248
|
+
$[20] = t10;
|
|
249
|
+
$[21] = t11;
|
|
250
|
+
$[22] = t12;
|
|
251
|
+
$[23] = t13;
|
|
252
|
+
$[24] = t14;
|
|
253
|
+
$[25] = t15;
|
|
254
|
+
$[26] = t4;
|
|
255
|
+
$[27] = t5;
|
|
256
|
+
$[28] = t6;
|
|
257
|
+
$[29] = t7;
|
|
258
|
+
$[30] = t8;
|
|
259
|
+
$[31] = t9;
|
|
255
260
|
} else {
|
|
256
|
-
T0 = $[
|
|
257
|
-
t10 = $[
|
|
258
|
-
t11 = $[
|
|
259
|
-
t12 = $[
|
|
260
|
-
t13 = $[
|
|
261
|
-
t14 = $[
|
|
262
|
-
t15 = $[
|
|
263
|
-
t4 = $[
|
|
264
|
-
t5 = $[
|
|
265
|
-
t6 = $[
|
|
266
|
-
t7 = $[
|
|
267
|
-
t8 = $[
|
|
268
|
-
t9 = $[
|
|
261
|
+
T0 = $[19];
|
|
262
|
+
t10 = $[20];
|
|
263
|
+
t11 = $[21];
|
|
264
|
+
t12 = $[22];
|
|
265
|
+
t13 = $[23];
|
|
266
|
+
t14 = $[24];
|
|
267
|
+
t15 = $[25];
|
|
268
|
+
t4 = $[26];
|
|
269
|
+
t5 = $[27];
|
|
270
|
+
t6 = $[28];
|
|
271
|
+
t7 = $[29];
|
|
272
|
+
t8 = $[30];
|
|
273
|
+
t9 = $[31];
|
|
269
274
|
}
|
|
270
275
|
let t16;
|
|
271
|
-
if ($[
|
|
276
|
+
if ($[32] !== t10 || $[33] !== t11 || $[34] !== t12 || $[35] !== t13 || $[36] !== t14 || $[37] !== t4 || $[38] !== t5 || $[39] !== t6 || $[40] !== t7 || $[41] !== t8 || $[42] !== t9) {
|
|
272
277
|
t16 = /*#__PURE__*/ jsx("div", {
|
|
273
278
|
"data-tao-radio-group": t4,
|
|
274
279
|
"data-tao-direction": t5,
|
|
@@ -282,30 +287,30 @@ function RadioGroup(t0) {
|
|
|
282
287
|
"aria-required": t13,
|
|
283
288
|
children: t14
|
|
284
289
|
});
|
|
285
|
-
$[
|
|
286
|
-
$[
|
|
287
|
-
$[
|
|
288
|
-
$[
|
|
289
|
-
$[
|
|
290
|
-
$[
|
|
291
|
-
$[
|
|
292
|
-
$[
|
|
293
|
-
$[
|
|
294
|
-
$[
|
|
295
|
-
$[
|
|
296
|
-
$[
|
|
297
|
-
} else t16 = $[
|
|
290
|
+
$[32] = t10;
|
|
291
|
+
$[33] = t11;
|
|
292
|
+
$[34] = t12;
|
|
293
|
+
$[35] = t13;
|
|
294
|
+
$[36] = t14;
|
|
295
|
+
$[37] = t4;
|
|
296
|
+
$[38] = t5;
|
|
297
|
+
$[39] = t6;
|
|
298
|
+
$[40] = t7;
|
|
299
|
+
$[41] = t8;
|
|
300
|
+
$[42] = t9;
|
|
301
|
+
$[43] = t16;
|
|
302
|
+
} else t16 = $[43];
|
|
298
303
|
let t17;
|
|
299
|
-
if ($[
|
|
304
|
+
if ($[44] !== T0 || $[45] !== t15 || $[46] !== t16) {
|
|
300
305
|
t17 = /*#__PURE__*/ jsx(T0, {
|
|
301
306
|
value: t15,
|
|
302
307
|
children: t16
|
|
303
308
|
});
|
|
304
|
-
$[
|
|
305
|
-
$[
|
|
306
|
-
$[
|
|
307
|
-
$[
|
|
308
|
-
} else t17 = $[
|
|
309
|
+
$[44] = T0;
|
|
310
|
+
$[45] = t15;
|
|
311
|
+
$[46] = t16;
|
|
312
|
+
$[47] = t17;
|
|
313
|
+
} else t17 = $[47];
|
|
309
314
|
return t17;
|
|
310
315
|
}
|
|
311
316
|
function _temp2(opt_0) {
|
|
@@ -140,23 +140,8 @@
|
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
[data-tao-sheet-done] {
|
|
143
|
-
|
|
144
|
-
background: var(--tao-primary);
|
|
143
|
+
-webkit-tap-highlight-color: transparent;
|
|
145
144
|
width: 100%;
|
|
146
145
|
height: 44px;
|
|
147
|
-
color: var(--tao-color-text-light-solid);
|
|
148
|
-
font-family: var(--tao-font-family);
|
|
149
|
-
font-size: var(--tao-font-size-base);
|
|
150
|
-
font-weight: var(--tao-font-weight-medium);
|
|
151
|
-
cursor: pointer;
|
|
152
|
-
-webkit-tap-highlight-color: transparent;
|
|
153
|
-
border: none;
|
|
154
|
-
justify-content: center;
|
|
155
|
-
align-items: center;
|
|
156
|
-
display: flex;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
[data-tao-sheet-done]:active {
|
|
160
|
-
opacity: .85;
|
|
161
146
|
}
|
|
162
147
|
|
|
@@ -29,5 +29,6 @@ declare function MobileSelectContentInner({ options, value, onChange, onMultiCha
|
|
|
29
29
|
export { MobileSelectContentInner as MobileSelectContent };
|
|
30
30
|
export interface MobileSelectDrawerProps extends MobileSelectContentProps {
|
|
31
31
|
open: boolean;
|
|
32
|
+
mobileTitle?: ReactNode;
|
|
32
33
|
}
|
|
33
|
-
export declare function MobileSelectDrawer({ open, onClose, placeholder, classNames, styles, popupRender, ...rest }: MobileSelectDrawerProps): import("react").JSX.Element;
|
|
34
|
+
export declare function MobileSelectDrawer({ open, mobileTitle, onClose, placeholder, classNames, styles, popupRender, ...rest }: MobileSelectDrawerProps): import("react").JSX.Element;
|
|
@@ -2,7 +2,9 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { c } from "react-compiler-runtime";
|
|
3
3
|
import { useCallback, useMemo, useRef } from "react";
|
|
4
4
|
import { useTaoConfig } from "../../provider/tao-provider.js";
|
|
5
|
+
import { Button } from "../button/button.js";
|
|
5
6
|
import { Drawer } from "../drawer/drawer.js";
|
|
7
|
+
import { useMobileTitle } from "../../utils/field-label.js";
|
|
6
8
|
import { SearchIcon } from "./select-icons.js";
|
|
7
9
|
import { countLeafOptions, defaultFilter, filterTree, flattenLeafOptions } from "./select-model.js";
|
|
8
10
|
import { useSelectSelection } from "./use-select-selection.js";
|
|
@@ -204,8 +206,8 @@ function MobileSelectContentInner({ options, value, onChange, onMultiChange, sho
|
|
|
204
206
|
}),
|
|
205
207
|
multiple && /*#__PURE__*/ jsx("div", {
|
|
206
208
|
"data-tao-sheet-footer": "",
|
|
207
|
-
children: /*#__PURE__*/ jsx(
|
|
208
|
-
|
|
209
|
+
children: /*#__PURE__*/ jsx(Button, {
|
|
210
|
+
size: "large",
|
|
209
211
|
"data-tao-sheet-done": "",
|
|
210
212
|
disabled: disabled || null != maxCount && draft.length > maxCount,
|
|
211
213
|
onClick: handleDone,
|
|
@@ -216,8 +218,9 @@ function MobileSelectContentInner({ options, value, onChange, onMultiChange, sho
|
|
|
216
218
|
});
|
|
217
219
|
}
|
|
218
220
|
function MobileSelectDrawer(t0) {
|
|
219
|
-
const $ = c(
|
|
221
|
+
const $ = c(29);
|
|
220
222
|
let classNames;
|
|
223
|
+
let mobileTitle;
|
|
221
224
|
let onClose;
|
|
222
225
|
let open;
|
|
223
226
|
let placeholder;
|
|
@@ -225,27 +228,30 @@ function MobileSelectDrawer(t0) {
|
|
|
225
228
|
let rest;
|
|
226
229
|
let styles;
|
|
227
230
|
if ($[0] !== t0) {
|
|
228
|
-
({ open, onClose, placeholder, classNames, styles, popupRender, ...rest } = t0);
|
|
231
|
+
({ open, mobileTitle, onClose, placeholder, classNames, styles, popupRender, ...rest } = t0);
|
|
229
232
|
$[0] = t0;
|
|
230
233
|
$[1] = classNames;
|
|
231
|
-
$[2] =
|
|
232
|
-
$[3] =
|
|
233
|
-
$[4] =
|
|
234
|
-
$[5] =
|
|
235
|
-
$[6] =
|
|
236
|
-
$[7] =
|
|
234
|
+
$[2] = mobileTitle;
|
|
235
|
+
$[3] = onClose;
|
|
236
|
+
$[4] = open;
|
|
237
|
+
$[5] = placeholder;
|
|
238
|
+
$[6] = popupRender;
|
|
239
|
+
$[7] = rest;
|
|
240
|
+
$[8] = styles;
|
|
237
241
|
} else {
|
|
238
242
|
classNames = $[1];
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
243
|
+
mobileTitle = $[2];
|
|
244
|
+
onClose = $[3];
|
|
245
|
+
open = $[4];
|
|
246
|
+
placeholder = $[5];
|
|
247
|
+
popupRender = $[6];
|
|
248
|
+
rest = $[7];
|
|
249
|
+
styles = $[8];
|
|
245
250
|
}
|
|
246
251
|
const { locale } = useTaoConfig();
|
|
252
|
+
const title = useMobileTitle(mobileTitle, locale.select);
|
|
247
253
|
let t1;
|
|
248
|
-
if ($[
|
|
254
|
+
if ($[9] !== classNames || $[10] !== onClose || $[11] !== placeholder || $[12] !== rest || $[13] !== styles) {
|
|
249
255
|
t1 = /*#__PURE__*/ jsx(MobileSelectContentInner, {
|
|
250
256
|
onClose: onClose,
|
|
251
257
|
placeholder: placeholder,
|
|
@@ -253,61 +259,60 @@ function MobileSelectDrawer(t0) {
|
|
|
253
259
|
styles: styles,
|
|
254
260
|
...rest
|
|
255
261
|
});
|
|
256
|
-
$[
|
|
257
|
-
$[
|
|
258
|
-
$[
|
|
259
|
-
$[
|
|
260
|
-
$[
|
|
261
|
-
$[
|
|
262
|
-
} else t1 = $[
|
|
262
|
+
$[9] = classNames;
|
|
263
|
+
$[10] = onClose;
|
|
264
|
+
$[11] = placeholder;
|
|
265
|
+
$[12] = rest;
|
|
266
|
+
$[13] = styles;
|
|
267
|
+
$[14] = t1;
|
|
268
|
+
} else t1 = $[14];
|
|
263
269
|
const content = t1;
|
|
264
|
-
const t2 =
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
root: t3
|
|
270
|
+
const t2 = classNames?.popup;
|
|
271
|
+
let t3;
|
|
272
|
+
if ($[15] !== t2) {
|
|
273
|
+
t3 = {
|
|
274
|
+
root: t2
|
|
270
275
|
};
|
|
271
|
-
$[
|
|
272
|
-
$[
|
|
273
|
-
} else
|
|
274
|
-
const
|
|
275
|
-
let
|
|
276
|
-
if ($[
|
|
277
|
-
|
|
278
|
-
root:
|
|
276
|
+
$[15] = t2;
|
|
277
|
+
$[16] = t3;
|
|
278
|
+
} else t3 = $[16];
|
|
279
|
+
const t4 = styles?.popup;
|
|
280
|
+
let t5;
|
|
281
|
+
if ($[17] !== t4) {
|
|
282
|
+
t5 = {
|
|
283
|
+
root: t4
|
|
279
284
|
};
|
|
280
|
-
$[
|
|
281
|
-
$[
|
|
282
|
-
} else
|
|
285
|
+
$[17] = t4;
|
|
286
|
+
$[18] = t5;
|
|
287
|
+
} else t5 = $[18];
|
|
288
|
+
let t6;
|
|
289
|
+
if ($[19] !== content || $[20] !== popupRender) {
|
|
290
|
+
t6 = popupRender ? popupRender(content) : content;
|
|
291
|
+
$[19] = content;
|
|
292
|
+
$[20] = popupRender;
|
|
293
|
+
$[21] = t6;
|
|
294
|
+
} else t6 = $[21];
|
|
283
295
|
let t7;
|
|
284
|
-
if ($[
|
|
285
|
-
t7 =
|
|
286
|
-
$[18] = content;
|
|
287
|
-
$[19] = popupRender;
|
|
288
|
-
$[20] = t7;
|
|
289
|
-
} else t7 = $[20];
|
|
290
|
-
let t8;
|
|
291
|
-
if ($[21] !== onClose || $[22] !== open || $[23] !== t2 || $[24] !== t4 || $[25] !== t6 || $[26] !== t7) {
|
|
292
|
-
t8 = /*#__PURE__*/ jsx(Drawer, {
|
|
296
|
+
if ($[22] !== onClose || $[23] !== open || $[24] !== t3 || $[25] !== t5 || $[26] !== t6 || $[27] !== title) {
|
|
297
|
+
t7 = /*#__PURE__*/ jsx(Drawer, {
|
|
293
298
|
open: open,
|
|
294
299
|
onClose: onClose,
|
|
295
300
|
placement: "bottom",
|
|
296
|
-
title:
|
|
301
|
+
title: title,
|
|
297
302
|
height: "70vh",
|
|
298
|
-
classNames:
|
|
299
|
-
styles:
|
|
300
|
-
children:
|
|
303
|
+
classNames: t3,
|
|
304
|
+
styles: t5,
|
|
305
|
+
children: t6
|
|
301
306
|
});
|
|
302
|
-
$[
|
|
303
|
-
$[
|
|
304
|
-
$[
|
|
305
|
-
$[
|
|
306
|
-
$[
|
|
307
|
-
$[
|
|
308
|
-
$[
|
|
309
|
-
} else
|
|
310
|
-
return
|
|
307
|
+
$[22] = onClose;
|
|
308
|
+
$[23] = open;
|
|
309
|
+
$[24] = t3;
|
|
310
|
+
$[25] = t5;
|
|
311
|
+
$[26] = t6;
|
|
312
|
+
$[27] = title;
|
|
313
|
+
$[28] = t7;
|
|
314
|
+
} else t7 = $[28];
|
|
315
|
+
return t7;
|
|
311
316
|
}
|
|
312
317
|
function CheckIcon() {
|
|
313
318
|
const $ = c(1);
|
|
@@ -120,6 +120,8 @@ export interface SelectProps extends Pick<AriaAttributes, 'aria-label' | 'aria-l
|
|
|
120
120
|
hideSelected?: boolean;
|
|
121
121
|
/** Force mobile or desktop. Otherwise use viewport <576px; an open popup keeps its presentation until closed. */
|
|
122
122
|
mobile?: boolean;
|
|
123
|
+
/** Mobile drawer title. Defaults to the Form.Item/FormField label, then locale text. */
|
|
124
|
+
mobileTitle?: ReactNode;
|
|
123
125
|
/** CSS class on the root element. */
|
|
124
126
|
className?: string;
|
|
125
127
|
/** Inline styles on the root element. */
|
|
@@ -160,6 +160,25 @@ button[data-tao-select-clear] {
|
|
|
160
160
|
display: none;
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
+
@media (hover: hover) and (pointer: fine) {
|
|
164
|
+
[data-tao-select-icons][data-tao-clearable] {
|
|
165
|
+
display: grid;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
[data-tao-select-icons][data-tao-clearable] > * {
|
|
169
|
+
grid-area: 1 / 1;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
[data-tao-select]:not(:hover) [data-tao-select-clear]:not(:focus-visible) {
|
|
173
|
+
opacity: 0;
|
|
174
|
+
pointer-events: none;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
[data-tao-select]:not(:hover) [data-tao-select-icons][data-tao-clearable]:not(:has(:focus-visible)) [data-tao-select-icon] {
|
|
178
|
+
display: flex;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
163
182
|
[data-tao-select-icon] {
|
|
164
183
|
color: var(--tao-color-text-tertiary);
|
|
165
184
|
transition: transform var(--tao-motion-duration-fast)
|
|
@@ -211,27 +211,39 @@ const select_Select = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
211
211
|
}) : null;
|
|
212
212
|
const trailingIcons = /*#__PURE__*/ jsx("span", {
|
|
213
213
|
"data-tao-select-icons": "",
|
|
214
|
+
"data-tao-clearable": showClearBtn || void 0,
|
|
214
215
|
children: loading ? /*#__PURE__*/ jsx("span", {
|
|
215
216
|
"data-tao-select-icon": "",
|
|
216
217
|
"data-tao-select-loading-slot": "",
|
|
217
218
|
children: loadingIcon ?? /*#__PURE__*/ jsx(LoadingIcon, {})
|
|
218
|
-
}) : showClearBtn ? /*#__PURE__*/
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
e_3
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
219
|
+
}) : showClearBtn ? /*#__PURE__*/ jsxs(Fragment, {
|
|
220
|
+
children: [
|
|
221
|
+
/*#__PURE__*/ jsx("span", {
|
|
222
|
+
"data-tao-select-clear": "",
|
|
223
|
+
className: cx(classNames?.clear),
|
|
224
|
+
style: styles?.clear,
|
|
225
|
+
onPointerDown: (e_2)=>e_2.stopPropagation(),
|
|
226
|
+
onClick: handleClear,
|
|
227
|
+
onKeyDown: (e_3)=>{
|
|
228
|
+
if ('Enter' === e_3.key || ' ' === e_3.key) {
|
|
229
|
+
e_3.preventDefault();
|
|
230
|
+
e_3.stopPropagation();
|
|
231
|
+
clearValue();
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
role: "button",
|
|
235
|
+
tabIndex: 0,
|
|
236
|
+
"aria-label": ctx.locale.clear,
|
|
237
|
+
children: clearIcon
|
|
238
|
+
}),
|
|
239
|
+
/*#__PURE__*/ jsx("span", {
|
|
240
|
+
"data-tao-select-icon": "",
|
|
241
|
+
"data-tao-custom-suffix": null != suffixIcon || void 0,
|
|
242
|
+
className: cx(classNames?.suffix),
|
|
243
|
+
style: styles?.suffix,
|
|
244
|
+
children: suffixIcon ?? /*#__PURE__*/ jsx(ChevronDownIcon, {})
|
|
245
|
+
})
|
|
246
|
+
]
|
|
235
247
|
}) : /*#__PURE__*/ jsx("span", {
|
|
236
248
|
"data-tao-select-icon": "",
|
|
237
249
|
"data-tao-custom-suffix": null != suffixIcon || void 0,
|
|
@@ -340,6 +352,7 @@ const select_Select = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
340
352
|
]
|
|
341
353
|
}),
|
|
342
354
|
/*#__PURE__*/ jsx(MobileSelectDrawer, {
|
|
355
|
+
mobileTitle: props.mobileTitle,
|
|
343
356
|
classNames: classNames,
|
|
344
357
|
styles: styles,
|
|
345
358
|
popupRender: popupRender,
|
|
@@ -668,6 +681,7 @@ const select_Select = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
668
681
|
asChild: true,
|
|
669
682
|
children: /*#__PURE__*/ jsxs("div", {
|
|
670
683
|
ref: triggerRef,
|
|
684
|
+
tabIndex: resolvedDisabled ? -1 : 0,
|
|
671
685
|
id: id,
|
|
672
686
|
...ariaProps,
|
|
673
687
|
"data-tao-control": "",
|
|
@@ -610,9 +610,9 @@
|
|
|
610
610
|
}
|
|
611
611
|
|
|
612
612
|
[data-tao-steps][data-tao-type="panel"] [data-tao-steps-panel-arrow] {
|
|
613
|
-
top: calc(var(--tao-steps-panel-line-width)
|
|
613
|
+
top: calc(var(--tao-steps-panel-line-width) / -2);
|
|
614
614
|
z-index: 1;
|
|
615
|
-
height: calc(var(--tao-steps-panel-line-width)
|
|
615
|
+
height: calc(var(--tao-steps-panel-line-width) + 100%);
|
|
616
616
|
width: var(--tao-steps-panel-notch-width);
|
|
617
617
|
stroke-linecap: round;
|
|
618
618
|
position: absolute;
|
|
@@ -642,6 +642,54 @@
|
|
|
642
642
|
--tao-steps-panel-radius: var(--tao-radius-sm);
|
|
643
643
|
}
|
|
644
644
|
|
|
645
|
+
[data-tao-steps][data-tao-type="panel"][data-tao-variant="filled"] > [data-tao-step] {
|
|
646
|
+
isolation: isolate;
|
|
647
|
+
background: none;
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
[data-tao-steps][data-tao-type="panel"][data-tao-variant="filled"] > [data-tao-step]:before {
|
|
651
|
+
content: "";
|
|
652
|
+
z-index: -1;
|
|
653
|
+
inset-block: calc(var(--tao-steps-panel-line-width) * -1);
|
|
654
|
+
background: var(--tao-steps-panel-bg);
|
|
655
|
+
border-radius: inherit;
|
|
656
|
+
clip-path: polygon(0 0,
|
|
657
|
+
calc(100% - var(--tao-steps-panel-notch-width)) 0,
|
|
658
|
+
100% 50%,
|
|
659
|
+
calc(100% - var(--tao-steps-panel-notch-width)) 100%,
|
|
660
|
+
0 100%);
|
|
661
|
+
transition: background-color var(--tao-motion-duration-mid)
|
|
662
|
+
var(--tao-motion-ease-out);
|
|
663
|
+
position: absolute;
|
|
664
|
+
inset-inline-start: 0;
|
|
665
|
+
inset-inline-end: calc(var(--tao-steps-panel-notch-width) * -1);
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
:dir(rtl) [data-tao-steps][data-tao-type="panel"][data-tao-variant="filled"] > [data-tao-step]:before {
|
|
669
|
+
clip-path: polygon(var(--tao-steps-panel-notch-width) 0,
|
|
670
|
+
100% 0,
|
|
671
|
+
100% 100%,
|
|
672
|
+
var(--tao-steps-panel-notch-width) 100%,
|
|
673
|
+
0 50%);
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
[data-tao-steps][data-tao-type="panel"][data-tao-variant="filled"] > [data-tao-step][data-tao-active]:before {
|
|
677
|
+
background: var(--tao-steps-panel-active-bg);
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
[data-tao-steps][data-tao-type="panel"][data-tao-variant="filled"] > [data-tao-step]:first-child:before {
|
|
681
|
+
inset-inline-start: calc(var(--tao-steps-panel-line-width) * -1);
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
[data-tao-steps][data-tao-type="panel"][data-tao-variant="filled"] > [data-tao-step]:last-child:before {
|
|
685
|
+
clip-path: none;
|
|
686
|
+
inset-inline-end: calc(var(--tao-steps-panel-line-width) * -1);
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
[data-tao-steps][data-tao-type="panel"][data-tao-variant="filled"] [data-tao-steps-panel-arrow] {
|
|
690
|
+
display: none;
|
|
691
|
+
}
|
|
692
|
+
|
|
645
693
|
[data-tao-steps][data-tao-type="panel"][data-tao-variant="filled"] > [data-tao-step]:not(:first-child) {
|
|
646
694
|
clip-path: polygon(var(--tao-steps-panel-line-width) 0,
|
|
647
695
|
calc(100% + var(--tao-steps-panel-notch-width)) 0,
|
|
@@ -727,11 +775,13 @@
|
|
|
727
775
|
--tao-steps-progress-unitless: calc(100 / tan(atan2(var(--tao-steps-progress-svg-size), 1px)));
|
|
728
776
|
--tao-steps-progress-radius: calc((var(--tao-steps-progress-svg-size) - var(--tao-steps-line-width-bold)) *
|
|
729
777
|
var(--tao-steps-progress-unitless) / 2);
|
|
730
|
-
inset: calc(var(--tao-steps-progress-enhance) * -1);
|
|
731
778
|
width: var(--tao-steps-progress-svg-size);
|
|
732
779
|
height: var(--tao-steps-progress-svg-size);
|
|
733
780
|
pointer-events: none;
|
|
734
781
|
position: absolute;
|
|
782
|
+
top: 50%;
|
|
783
|
+
left: 50%;
|
|
784
|
+
transform: translate(-50%, -50%);
|
|
735
785
|
}
|
|
736
786
|
|
|
737
787
|
[data-tao-steps-progress] circle {
|