@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
|
@@ -6,37 +6,80 @@ import { cx } from "../../utils/semantic.js";
|
|
|
6
6
|
import "./radio.css";
|
|
7
7
|
const RadioGroupContext = /*#__PURE__*/ createContext(null);
|
|
8
8
|
const radio_Radio = /*#__PURE__*/ forwardRef(function(t0, ref) {
|
|
9
|
-
const $ = c(
|
|
10
|
-
|
|
9
|
+
const $ = c(48);
|
|
10
|
+
let ariaProps;
|
|
11
|
+
let ariaRequired;
|
|
12
|
+
let checked;
|
|
13
|
+
let children;
|
|
14
|
+
let classNames;
|
|
15
|
+
let defaultChecked;
|
|
16
|
+
let disabled;
|
|
17
|
+
let name;
|
|
18
|
+
let onChange;
|
|
19
|
+
let required;
|
|
20
|
+
let styles;
|
|
21
|
+
let value;
|
|
22
|
+
if ($[0] !== t0) {
|
|
23
|
+
({ value, checked, defaultChecked, disabled, required, "aria-required": ariaRequired, onChange, children, name, classNames, styles, ...ariaProps } = t0);
|
|
24
|
+
$[0] = t0;
|
|
25
|
+
$[1] = ariaProps;
|
|
26
|
+
$[2] = ariaRequired;
|
|
27
|
+
$[3] = checked;
|
|
28
|
+
$[4] = children;
|
|
29
|
+
$[5] = classNames;
|
|
30
|
+
$[6] = defaultChecked;
|
|
31
|
+
$[7] = disabled;
|
|
32
|
+
$[8] = name;
|
|
33
|
+
$[9] = onChange;
|
|
34
|
+
$[10] = required;
|
|
35
|
+
$[11] = styles;
|
|
36
|
+
$[12] = value;
|
|
37
|
+
} else {
|
|
38
|
+
ariaProps = $[1];
|
|
39
|
+
ariaRequired = $[2];
|
|
40
|
+
checked = $[3];
|
|
41
|
+
children = $[4];
|
|
42
|
+
classNames = $[5];
|
|
43
|
+
defaultChecked = $[6];
|
|
44
|
+
disabled = $[7];
|
|
45
|
+
name = $[8];
|
|
46
|
+
onChange = $[9];
|
|
47
|
+
required = $[10];
|
|
48
|
+
styles = $[11];
|
|
49
|
+
value = $[12];
|
|
50
|
+
}
|
|
11
51
|
const ctx = useTaoConfig();
|
|
12
52
|
const groupCtx = useContext(RadioGroupContext);
|
|
13
53
|
const resolvedDisabled = disabled ?? groupCtx?.disabled ?? ctx.disabled ?? false;
|
|
14
54
|
const resolvedChecked = groupCtx ? groupCtx.value === value : checked;
|
|
15
55
|
const resolvedName = groupCtx?.name ?? name;
|
|
16
56
|
let t1;
|
|
17
|
-
if ($[
|
|
57
|
+
if ($[13] !== groupCtx || $[14] !== onChange || $[15] !== value) {
|
|
18
58
|
t1 = (e)=>{
|
|
19
59
|
if (groupCtx && null != value) groupCtx.onChange(value);
|
|
20
60
|
else onChange?.(e);
|
|
21
61
|
};
|
|
22
|
-
$[
|
|
23
|
-
$[
|
|
24
|
-
$[
|
|
25
|
-
$[
|
|
26
|
-
} else t1 = $[
|
|
62
|
+
$[13] = groupCtx;
|
|
63
|
+
$[14] = onChange;
|
|
64
|
+
$[15] = value;
|
|
65
|
+
$[16] = t1;
|
|
66
|
+
} else t1 = $[16];
|
|
27
67
|
const handleChange = t1;
|
|
28
68
|
const t2 = resolvedDisabled || void 0;
|
|
29
69
|
const t3 = classNames?.root;
|
|
30
70
|
let t4;
|
|
31
|
-
if ($[
|
|
71
|
+
if ($[17] !== t3) {
|
|
32
72
|
t4 = cx(t3);
|
|
33
|
-
$[
|
|
34
|
-
$[
|
|
35
|
-
} else t4 = $[
|
|
73
|
+
$[17] = t3;
|
|
74
|
+
$[18] = t4;
|
|
75
|
+
} else t4 = $[18];
|
|
36
76
|
const t5 = styles?.root;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
77
|
+
const t6 = required ?? (true === ariaRequired || "true" === ariaRequired);
|
|
78
|
+
let t7;
|
|
79
|
+
if ($[19] !== ariaProps || $[20] !== defaultChecked || $[21] !== handleChange || $[22] !== ref || $[23] !== resolvedChecked || $[24] !== resolvedDisabled || $[25] !== resolvedName || $[26] !== t6 || $[27] !== value) {
|
|
80
|
+
t7 = /*#__PURE__*/ jsx("input", {
|
|
81
|
+
...ariaProps,
|
|
82
|
+
required: t6,
|
|
40
83
|
ref: ref,
|
|
41
84
|
type: "radio",
|
|
42
85
|
name: resolvedName,
|
|
@@ -47,87 +90,89 @@ const radio_Radio = /*#__PURE__*/ forwardRef(function(t0, ref) {
|
|
|
47
90
|
onChange: handleChange,
|
|
48
91
|
"data-tao-radio-input": ""
|
|
49
92
|
});
|
|
50
|
-
$[
|
|
51
|
-
$[
|
|
52
|
-
$[
|
|
53
|
-
$[
|
|
54
|
-
$[
|
|
55
|
-
$[
|
|
56
|
-
$[
|
|
57
|
-
$[
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
93
|
+
$[19] = ariaProps;
|
|
94
|
+
$[20] = defaultChecked;
|
|
95
|
+
$[21] = handleChange;
|
|
96
|
+
$[22] = ref;
|
|
97
|
+
$[23] = resolvedChecked;
|
|
98
|
+
$[24] = resolvedDisabled;
|
|
99
|
+
$[25] = resolvedName;
|
|
100
|
+
$[26] = t6;
|
|
101
|
+
$[27] = value;
|
|
102
|
+
$[28] = t7;
|
|
103
|
+
} else t7 = $[28];
|
|
104
|
+
const t8 = resolvedChecked || void 0;
|
|
105
|
+
const t9 = classNames?.indicator;
|
|
106
|
+
let t10;
|
|
107
|
+
if ($[29] !== t9) {
|
|
108
|
+
t10 = cx(t9);
|
|
109
|
+
$[29] = t9;
|
|
110
|
+
$[30] = t10;
|
|
111
|
+
} else t10 = $[30];
|
|
112
|
+
const t11 = styles?.indicator;
|
|
113
|
+
let t12;
|
|
114
|
+
if ($[31] !== t10 || $[32] !== t11 || $[33] !== t8) {
|
|
115
|
+
t12 = /*#__PURE__*/ jsx("span", {
|
|
71
116
|
"data-tao-radio": "",
|
|
72
|
-
"data-tao-checked":
|
|
73
|
-
className:
|
|
74
|
-
style:
|
|
117
|
+
"data-tao-checked": t8,
|
|
118
|
+
className: t10,
|
|
119
|
+
style: t11
|
|
75
120
|
});
|
|
76
|
-
$[
|
|
77
|
-
$[
|
|
78
|
-
$[
|
|
79
|
-
$[
|
|
80
|
-
} else
|
|
81
|
-
let
|
|
82
|
-
if ($[
|
|
83
|
-
|
|
121
|
+
$[31] = t10;
|
|
122
|
+
$[32] = t11;
|
|
123
|
+
$[33] = t8;
|
|
124
|
+
$[34] = t12;
|
|
125
|
+
} else t12 = $[34];
|
|
126
|
+
let t13;
|
|
127
|
+
if ($[35] !== t12 || $[36] !== t7) {
|
|
128
|
+
t13 = /*#__PURE__*/ jsxs("span", {
|
|
84
129
|
"data-tao-radio-control": "",
|
|
85
130
|
children: [
|
|
86
|
-
|
|
87
|
-
|
|
131
|
+
t7,
|
|
132
|
+
t12
|
|
88
133
|
]
|
|
89
134
|
});
|
|
90
|
-
$[
|
|
91
|
-
$[
|
|
92
|
-
$[
|
|
93
|
-
} else
|
|
94
|
-
let
|
|
95
|
-
if ($[
|
|
96
|
-
|
|
135
|
+
$[35] = t12;
|
|
136
|
+
$[36] = t7;
|
|
137
|
+
$[37] = t13;
|
|
138
|
+
} else t13 = $[37];
|
|
139
|
+
let t14;
|
|
140
|
+
if ($[38] !== children || $[39] !== classNames?.label || $[40] !== styles?.label) {
|
|
141
|
+
t14 = null != children && /*#__PURE__*/ jsx("span", {
|
|
97
142
|
"data-tao-radio-label": "",
|
|
98
143
|
className: cx(classNames?.label),
|
|
99
144
|
style: styles?.label,
|
|
100
145
|
children: children
|
|
101
146
|
});
|
|
102
|
-
$[
|
|
103
|
-
$[
|
|
104
|
-
$[
|
|
105
|
-
$[
|
|
106
|
-
} else
|
|
107
|
-
let
|
|
108
|
-
if ($[
|
|
109
|
-
|
|
147
|
+
$[38] = children;
|
|
148
|
+
$[39] = classNames?.label;
|
|
149
|
+
$[40] = styles?.label;
|
|
150
|
+
$[41] = t14;
|
|
151
|
+
} else t14 = $[41];
|
|
152
|
+
let t15;
|
|
153
|
+
if ($[42] !== t13 || $[43] !== t14 || $[44] !== t2 || $[45] !== t4 || $[46] !== t5) {
|
|
154
|
+
t15 = /*#__PURE__*/ jsxs("label", {
|
|
110
155
|
"data-tao-radio-wrapper": "",
|
|
111
156
|
"data-tao-disabled": t2,
|
|
112
157
|
className: t4,
|
|
113
158
|
style: t5,
|
|
114
159
|
children: [
|
|
115
|
-
|
|
116
|
-
|
|
160
|
+
t13,
|
|
161
|
+
t14
|
|
117
162
|
]
|
|
118
163
|
});
|
|
119
|
-
$[
|
|
120
|
-
$[
|
|
121
|
-
$[
|
|
122
|
-
$[
|
|
123
|
-
$[
|
|
124
|
-
$[
|
|
125
|
-
} else
|
|
126
|
-
return
|
|
164
|
+
$[42] = t13;
|
|
165
|
+
$[43] = t14;
|
|
166
|
+
$[44] = t2;
|
|
167
|
+
$[45] = t4;
|
|
168
|
+
$[46] = t5;
|
|
169
|
+
$[47] = t15;
|
|
170
|
+
} else t15 = $[47];
|
|
171
|
+
return t15;
|
|
127
172
|
});
|
|
128
173
|
function RadioGroup(t0) {
|
|
129
|
-
const $ = c(
|
|
130
|
-
const { options, value, onChange, disabled, direction: t1, name, children } = t0;
|
|
174
|
+
const $ = c(47);
|
|
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;
|
|
131
176
|
const direction = void 0 === t1 ? "horizontal" : t1;
|
|
132
177
|
const ctx = useTaoConfig();
|
|
133
178
|
const resolvedDisabled = disabled ?? ctx.disabled ?? false;
|
|
@@ -156,63 +201,112 @@ function RadioGroup(t0) {
|
|
|
156
201
|
} else t3 = $[6];
|
|
157
202
|
const groupCtxValue = t3;
|
|
158
203
|
let T0;
|
|
204
|
+
let t10;
|
|
205
|
+
let t11;
|
|
206
|
+
let t12;
|
|
207
|
+
let t13;
|
|
208
|
+
let t14;
|
|
209
|
+
let t15;
|
|
159
210
|
let t4;
|
|
160
211
|
let t5;
|
|
161
212
|
let t6;
|
|
162
213
|
let t7;
|
|
163
214
|
let t8;
|
|
164
|
-
|
|
215
|
+
let t9;
|
|
216
|
+
if ($[7] !== ariaDescribedBy || $[8] !== ariaErrorMessage || $[9] !== ariaInvalid || $[10] !== ariaLabel || $[11] !== ariaLabelledBy || $[12] !== ariaRequired || $[13] !== children || $[14] !== direction || $[15] !== groupCtxValue || $[16] !== id || $[17] !== options) {
|
|
165
217
|
const normalizedOptions = options?.map(_temp);
|
|
166
218
|
T0 = RadioGroupContext.Provider;
|
|
167
|
-
|
|
219
|
+
t15 = groupCtxValue;
|
|
168
220
|
t4 = "";
|
|
169
221
|
t5 = direction;
|
|
170
222
|
t6 = "radiogroup";
|
|
171
|
-
t7 =
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
$[
|
|
180
|
-
$[
|
|
181
|
-
$[
|
|
223
|
+
t7 = id;
|
|
224
|
+
t8 = ariaLabel;
|
|
225
|
+
t9 = ariaLabelledBy;
|
|
226
|
+
t10 = ariaDescribedBy;
|
|
227
|
+
t11 = ariaErrorMessage;
|
|
228
|
+
t12 = ariaInvalid;
|
|
229
|
+
t13 = ariaRequired;
|
|
230
|
+
t14 = normalizedOptions ? normalizedOptions.map(_temp2) : children;
|
|
231
|
+
$[7] = ariaDescribedBy;
|
|
232
|
+
$[8] = ariaErrorMessage;
|
|
233
|
+
$[9] = ariaInvalid;
|
|
234
|
+
$[10] = ariaLabel;
|
|
235
|
+
$[11] = ariaLabelledBy;
|
|
236
|
+
$[12] = ariaRequired;
|
|
237
|
+
$[13] = children;
|
|
238
|
+
$[14] = direction;
|
|
239
|
+
$[15] = groupCtxValue;
|
|
240
|
+
$[16] = id;
|
|
241
|
+
$[17] = options;
|
|
242
|
+
$[18] = T0;
|
|
243
|
+
$[19] = t10;
|
|
244
|
+
$[20] = t11;
|
|
245
|
+
$[21] = t12;
|
|
246
|
+
$[22] = t13;
|
|
247
|
+
$[23] = t14;
|
|
248
|
+
$[24] = t15;
|
|
249
|
+
$[25] = t4;
|
|
250
|
+
$[26] = t5;
|
|
251
|
+
$[27] = t6;
|
|
252
|
+
$[28] = t7;
|
|
253
|
+
$[29] = t8;
|
|
254
|
+
$[30] = t9;
|
|
182
255
|
} else {
|
|
183
|
-
T0 = $[
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
256
|
+
T0 = $[18];
|
|
257
|
+
t10 = $[19];
|
|
258
|
+
t11 = $[20];
|
|
259
|
+
t12 = $[21];
|
|
260
|
+
t13 = $[22];
|
|
261
|
+
t14 = $[23];
|
|
262
|
+
t15 = $[24];
|
|
263
|
+
t4 = $[25];
|
|
264
|
+
t5 = $[26];
|
|
265
|
+
t6 = $[27];
|
|
266
|
+
t7 = $[28];
|
|
267
|
+
t8 = $[29];
|
|
268
|
+
t9 = $[30];
|
|
189
269
|
}
|
|
190
|
-
let
|
|
191
|
-
if ($[
|
|
192
|
-
|
|
270
|
+
let t16;
|
|
271
|
+
if ($[31] !== t10 || $[32] !== t11 || $[33] !== t12 || $[34] !== t13 || $[35] !== t14 || $[36] !== t4 || $[37] !== t5 || $[38] !== t6 || $[39] !== t7 || $[40] !== t8 || $[41] !== t9) {
|
|
272
|
+
t16 = /*#__PURE__*/ jsx("div", {
|
|
193
273
|
"data-tao-radio-group": t4,
|
|
194
274
|
"data-tao-direction": t5,
|
|
195
275
|
role: t6,
|
|
196
|
-
|
|
276
|
+
id: t7,
|
|
277
|
+
"aria-label": t8,
|
|
278
|
+
"aria-labelledby": t9,
|
|
279
|
+
"aria-describedby": t10,
|
|
280
|
+
"aria-errormessage": t11,
|
|
281
|
+
"aria-invalid": t12,
|
|
282
|
+
"aria-required": t13,
|
|
283
|
+
children: t14
|
|
197
284
|
});
|
|
198
|
-
$[
|
|
199
|
-
$[
|
|
200
|
-
$[
|
|
201
|
-
$[
|
|
202
|
-
$[
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
285
|
+
$[31] = t10;
|
|
286
|
+
$[32] = t11;
|
|
287
|
+
$[33] = t12;
|
|
288
|
+
$[34] = t13;
|
|
289
|
+
$[35] = t14;
|
|
290
|
+
$[36] = t4;
|
|
291
|
+
$[37] = t5;
|
|
292
|
+
$[38] = t6;
|
|
293
|
+
$[39] = t7;
|
|
294
|
+
$[40] = t8;
|
|
295
|
+
$[41] = t9;
|
|
296
|
+
$[42] = t16;
|
|
297
|
+
} else t16 = $[42];
|
|
298
|
+
let t17;
|
|
299
|
+
if ($[43] !== T0 || $[44] !== t15 || $[45] !== t16) {
|
|
300
|
+
t17 = /*#__PURE__*/ jsx(T0, {
|
|
301
|
+
value: t15,
|
|
302
|
+
children: t16
|
|
209
303
|
});
|
|
210
|
-
$[
|
|
211
|
-
$[
|
|
212
|
-
$[
|
|
213
|
-
$[
|
|
214
|
-
} else
|
|
215
|
-
return
|
|
304
|
+
$[43] = T0;
|
|
305
|
+
$[44] = t15;
|
|
306
|
+
$[45] = t16;
|
|
307
|
+
$[46] = t17;
|
|
308
|
+
} else t17 = $[46];
|
|
309
|
+
return t17;
|
|
216
310
|
}
|
|
217
311
|
function _temp2(opt_0) {
|
|
218
312
|
return /*#__PURE__*/ jsx(radio_Radio, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type CSSProperties, type ReactNode, type UIEvent } from 'react';
|
|
2
|
-
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic';
|
|
2
|
+
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic.js';
|
|
3
3
|
import './scroll-area.css';
|
|
4
4
|
export type ScrollAreaSemanticPart = 'root' | 'viewport' | 'scrollbar' | 'thumb';
|
|
5
5
|
export type ScrollAreaType = 'auto' | 'always' | 'hover' | 'scroll';
|
|
@@ -30,4 +30,4 @@ export interface ScrollAreaProps {
|
|
|
30
30
|
classNames?: SemanticClassNames<ScrollAreaSemanticPart>;
|
|
31
31
|
styles?: SemanticStyles<ScrollAreaSemanticPart>;
|
|
32
32
|
}
|
|
33
|
-
export declare function ScrollArea({ children, type, direction, maxHeight, maxWidth, scrollbarSize, scrollbarOffset, scrollShadow, onScroll: onScrollProp, onScrollEnd, scrollEndThreshold, className, style, classNames, styles, }: ScrollAreaProps): import("react
|
|
33
|
+
export declare function ScrollArea({ children, type, direction, maxHeight, maxWidth, scrollbarSize, scrollbarOffset, scrollShadow, onScroll: onScrollProp, onScrollEnd, scrollEndThreshold, className, style, classNames, styles, }: ScrollAreaProps): import("react").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
import type { SelectOption } from './select-types';
|
|
2
|
+
import type { SelectOption } from './select-types.js';
|
|
3
3
|
import './mobile-select.css';
|
|
4
4
|
interface MobileSelectContentProps {
|
|
5
5
|
options: SelectOption[];
|
|
@@ -19,9 +19,9 @@ interface MobileSelectContentProps {
|
|
|
19
19
|
/** Enable multi-select checkboxes + Done button flow. */
|
|
20
20
|
multiple?: boolean;
|
|
21
21
|
}
|
|
22
|
-
declare function MobileSelectContentInner({ options, value, onChange, onMultiChange, showSearch, filterOption, notFoundContent, optionRender, onClose, multiple, disabled, }: MobileSelectContentProps): import("react
|
|
22
|
+
declare function MobileSelectContentInner({ options, value, onChange, onMultiChange, showSearch, filterOption, notFoundContent, optionRender, onClose, multiple, disabled, }: MobileSelectContentProps): import("react").JSX.Element;
|
|
23
23
|
export { MobileSelectContentInner as MobileSelectContent };
|
|
24
24
|
export interface MobileSelectDrawerProps extends MobileSelectContentProps {
|
|
25
25
|
open: boolean;
|
|
26
26
|
}
|
|
27
|
-
export declare function MobileSelectDrawer({ open, onClose, placeholder, ...rest }: MobileSelectDrawerProps): import("react
|
|
27
|
+
export declare function MobileSelectDrawer({ open, onClose, placeholder, ...rest }: MobileSelectDrawerProps): import("react").JSX.Element;
|
|
@@ -67,6 +67,7 @@ function MobileSelectContentInner({ options, value, onChange, onMultiChange, sho
|
|
|
67
67
|
type: "button",
|
|
68
68
|
"data-tao-sheet-item": "",
|
|
69
69
|
"data-tao-selected": isSelected || void 0,
|
|
70
|
+
"aria-pressed": isSelected,
|
|
70
71
|
"data-tao-disabled": disabled || opt.disabled || void 0,
|
|
71
72
|
disabled: disabled || opt.disabled,
|
|
72
73
|
onClick: ()=>{
|
|
@@ -125,7 +126,8 @@ function MobileSelectContentInner({ options, value, onChange, onMultiChange, sho
|
|
|
125
126
|
value: search,
|
|
126
127
|
disabled: disabled,
|
|
127
128
|
onChange: (e)=>setSearch(e.target.value),
|
|
128
|
-
placeholder: "Search..."
|
|
129
|
+
placeholder: "Search...",
|
|
130
|
+
"aria-label": "Search options"
|
|
129
131
|
})
|
|
130
132
|
]
|
|
131
133
|
}),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export declare function ChevronDownIcon(): import("react
|
|
2
|
-
export declare function CheckIcon(): import("react
|
|
1
|
+
export declare function ChevronDownIcon(): import("react").JSX.Element;
|
|
2
|
+
export declare function CheckIcon(): import("react").JSX.Element;
|
|
3
3
|
export declare function CloseIcon({ small }: {
|
|
4
4
|
small?: boolean;
|
|
5
|
-
}): import("react
|
|
6
|
-
export declare function SearchIcon(): import("react
|
|
7
|
-
export declare function LoadingIcon(): import("react
|
|
5
|
+
}): import("react").JSX.Element;
|
|
6
|
+
export declare function SearchIcon(): import("react").JSX.Element;
|
|
7
|
+
export declare function LoadingIcon(): import("react").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
import type { SelectOption, SelectProps } from './select-types';
|
|
2
|
+
import type { SelectOption, SelectProps } from './select-types.js';
|
|
3
3
|
interface SearchableSelectListProps {
|
|
4
4
|
id: string;
|
|
5
5
|
options: SelectOption[];
|
|
@@ -18,5 +18,5 @@ interface SearchableSelectListProps {
|
|
|
18
18
|
onValueChange: (value: string) => void;
|
|
19
19
|
onClose: () => void;
|
|
20
20
|
}
|
|
21
|
-
export declare function SearchableSelectList({ id, options, resultCount, searchableOptions, activeValue, selectedValues, multiple, maxCountReached, listHeight, notFoundContent, optionRender, classNames, styles, onActiveIndexChange, onValueChange, onClose, }: SearchableSelectListProps): import("react
|
|
21
|
+
export declare function SearchableSelectList({ id, options, resultCount, searchableOptions, activeValue, selectedValues, multiple, maxCountReached, listHeight, notFoundContent, optionRender, classNames, styles, onActiveIndexChange, onValueChange, onClose, }: SearchableSelectListProps): import("react").JSX.Element;
|
|
22
22
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ReactNode, type SyntheticEvent } from 'react';
|
|
2
|
-
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic';
|
|
3
|
-
import type { SelectOption, SelectSemanticPart, TagRenderProps } from './select-types';
|
|
2
|
+
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic.js';
|
|
3
|
+
import type { SelectOption, SelectSemanticPart, TagRenderProps } from './select-types.js';
|
|
4
4
|
export declare function SelectTags({ options, disabled, maxTagCount, maxTagPlaceholder, maxTagTextLength, removeIcon, tagRender, classNames, styles, onRemove, }: {
|
|
5
5
|
options: SelectOption[];
|
|
6
6
|
disabled: boolean;
|
|
@@ -12,4 +12,4 @@ export declare function SelectTags({ options, disabled, maxTagCount, maxTagPlace
|
|
|
12
12
|
classNames?: SemanticClassNames<SelectSemanticPart>;
|
|
13
13
|
styles?: SemanticStyles<SelectSemanticPart>;
|
|
14
14
|
onRemove: (value: string, event: SyntheticEvent) => void;
|
|
15
|
-
}): import("react
|
|
15
|
+
}): import("react").JSX.Element | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AriaAttributes, CSSProperties, ReactNode, Ref } from 'react';
|
|
2
|
-
import type { TaoSize, TaoStatus, TaoVariant } from '../../provider/tao-provider';
|
|
3
|
-
import type { SemanticClassNames, SemanticStyles } from '../../utils/semantic';
|
|
2
|
+
import type { TaoSize, TaoStatus, TaoVariant } from '../../provider/tao-provider.js';
|
|
3
|
+
import type { SemanticClassNames, SemanticStyles } from '../../utils/semantic.js';
|
|
4
4
|
export interface SelectOption {
|
|
5
5
|
label: ReactNode;
|
|
6
6
|
value: string;
|
|
@@ -182,12 +182,19 @@ button[data-tao-select-clear] {
|
|
|
182
182
|
color: var(--tao-color-text-quaternary);
|
|
183
183
|
cursor: pointer;
|
|
184
184
|
transition: color var(--tao-motion-duration-fast) var(--tao-motion-ease-out);
|
|
185
|
+
position: relative;
|
|
185
186
|
}
|
|
186
187
|
|
|
187
188
|
[data-tao-select-clear]:hover {
|
|
188
189
|
color: var(--tao-color-text-secondary);
|
|
189
190
|
}
|
|
190
191
|
|
|
192
|
+
[data-tao-select-clear]:before {
|
|
193
|
+
content: "";
|
|
194
|
+
position: absolute;
|
|
195
|
+
inset: -6px -8px;
|
|
196
|
+
}
|
|
197
|
+
|
|
191
198
|
[data-tao-select-loading] {
|
|
192
199
|
color: var(--tao-color-text-tertiary);
|
|
193
200
|
animation: tao-spin calc(var(--tao-motion-unit) * 8) linear infinite;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import './select.css';
|
|
2
|
-
import type { SelectProps, SelectRef } from './select-types';
|
|
3
|
-
export type { SelectOption, SelectPlacement, SelectProps, SelectRef, SelectSemanticPart, TagRenderProps, } from './select-types';
|
|
2
|
+
import type { SelectProps, SelectRef } from './select-types.js';
|
|
3
|
+
export type { SelectOption, SelectPlacement, SelectProps, SelectRef, SelectSemanticPart, TagRenderProps, } from './select-types.js';
|
|
4
4
|
export declare const Select: import("react").ForwardRefExoticComponent<Omit<SelectProps, "ref"> & import("react").RefAttributes<SelectRef>>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { SelectProps } from './select-types';
|
|
1
|
+
import type { SelectProps } from './select-types.js';
|
|
2
2
|
type SelectionProps = Pick<SelectProps, 'options' | 'value' | 'defaultValue' | 'mode' | 'maxCount' | 'tokenSeparators' | 'onChange' | 'onSelect' | 'onDeselect' | 'onClear'>;
|
|
3
3
|
/** Owns selection values and their notifications across the Select displays. */
|
|
4
4
|
export declare function useSelectSelection(props: SelectionProps, disabled: boolean): {
|
|
5
5
|
value: string | string[] | undefined;
|
|
6
6
|
valueArray: string[];
|
|
7
7
|
selectedValueSet: Set<string>;
|
|
8
|
-
selectedOption: import("./select-types").SelectOption | undefined;
|
|
9
|
-
selectedOptions: import("./select-types").SelectOption[];
|
|
8
|
+
selectedOption: import("./select-types.js").SelectOption | undefined;
|
|
9
|
+
selectedOptions: import("./select-types.js").SelectOption[];
|
|
10
10
|
select: (next: string) => boolean;
|
|
11
11
|
addTokens: (input: string) => void;
|
|
12
12
|
remove: (removed: string) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Sonner, toast, type SonnerAction, type SonnerPosition, type SonnerPromiseMessages, type SonnerProps, type SonnerSemanticPart, type SonnerToastItem, type SonnerToastOptions, type SonnerType, } from './sonner';
|
|
1
|
+
export { Sonner, toast, type SonnerAction, type SonnerPosition, type SonnerPromiseMessages, type SonnerProps, type SonnerSemanticPart, type SonnerToastItem, type SonnerToastOptions, type SonnerType, } from './sonner.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CSSProperties, 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 './sonner.css';
|
|
4
4
|
export type SonnerSemanticPart = 'viewport' | 'toast' | 'content' | 'title' | 'description' | 'actions' | 'action' | 'cancel' | 'close';
|
|
5
5
|
export type SonnerType = 'default' | 'success' | 'error' | 'warning' | 'info' | 'loading' | 'custom';
|
|
@@ -45,14 +45,15 @@ export interface SonnerProps {
|
|
|
45
45
|
styles?: SemanticStyles<SonnerSemanticPart>;
|
|
46
46
|
}
|
|
47
47
|
declare function dismiss(id?: string): void;
|
|
48
|
-
export declare function Sonner({ position, visibleToasts, offset, gap, expand, richColors, closeButton, duration, className, style, classNames, styles, }: SonnerProps): import("react
|
|
49
|
-
|
|
48
|
+
export declare function Sonner({ position, visibleToasts, offset, gap, expand, richColors, closeButton, duration, className, style, classNames, styles, }: SonnerProps): import("react").JSX.Element;
|
|
49
|
+
declare const baseToast: (options: SonnerToastOptions | ReactNode) => string;
|
|
50
|
+
export declare const toast: typeof baseToast & {
|
|
50
51
|
success: (options: SonnerToastOptions | ReactNode) => string;
|
|
51
52
|
error: (options: SonnerToastOptions | ReactNode) => string;
|
|
52
53
|
warning: (options: SonnerToastOptions | ReactNode) => string;
|
|
53
54
|
info: (options: SonnerToastOptions | ReactNode) => string;
|
|
54
55
|
loading: (options: SonnerToastOptions | ReactNode) => string;
|
|
55
|
-
custom: (node: ReactNode, options?: Omit<SonnerToastOptions,
|
|
56
|
+
custom: (node: ReactNode, options?: Omit<SonnerToastOptions, 'title' | 'description'>) => string;
|
|
56
57
|
promise: <T>(promise: Promise<T>, messages: SonnerPromiseMessages<T>) => Promise<T>;
|
|
57
58
|
dismiss: typeof dismiss;
|
|
58
59
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { type CSSProperties, type ReactNode } from 'react';
|
|
2
|
-
import { type TaoSize } from '../../provider/tao-provider';
|
|
3
|
-
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic';
|
|
1
|
+
import { type AriaAttributes, type CSSProperties, type ReactNode } from 'react';
|
|
2
|
+
import { type TaoSize } from '../../provider/tao-provider.js';
|
|
3
|
+
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic.js';
|
|
4
4
|
import './spinner.css';
|
|
5
5
|
export type SpinnerSemanticPart = 'root' | 'indicator' | 'tip' | 'overlay';
|
|
6
|
-
export interface SpinnerProps {
|
|
6
|
+
export interface SpinnerProps extends Pick<AriaAttributes, 'aria-label' | 'aria-labelledby'> {
|
|
7
7
|
/** Whether the spinner is visible. Defaults to true. */
|
|
8
8
|
spinning?: boolean;
|
|
9
9
|
/** Size of the indicator. Inherits from TaoProvider. */
|
|
@@ -23,4 +23,4 @@ export interface SpinnerProps {
|
|
|
23
23
|
classNames?: SemanticClassNames<SpinnerSemanticPart>;
|
|
24
24
|
styles?: SemanticStyles<SpinnerSemanticPart>;
|
|
25
25
|
}
|
|
26
|
-
export declare function Spinner({ spinning, size, tip, delay, indicator, children, fullscreen, className, style, classNames, styles, }: SpinnerProps): import("react
|
|
26
|
+
export declare function Spinner({ spinning, size, tip, delay, indicator, children, fullscreen, className, style, classNames, styles, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, }: SpinnerProps): import("react").JSX.Element | null;
|