@rockshin/tao-ui 0.0.47 → 0.0.49
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/affix/affix.js +20 -16
- package/dist/components/alert/alert.js +114 -99
- package/dist/components/app/app-modals.js +134 -96
- package/dist/components/app/app-notices.js +39 -23
- package/dist/components/auto-complete/auto-complete.js +21 -7
- package/dist/components/avatar/avatar.js +31 -11
- package/dist/components/badge/badge.css +1 -1
- package/dist/components/badge/badge.js +72 -257
- package/dist/components/border-beam/border-beam.js +21 -17
- package/dist/components/breadcrumb/breadcrumb.js +178 -159
- package/dist/components/button/button.js +61 -53
- package/dist/components/calendar/calendar.js +6 -4
- package/dist/components/card/card.js +24 -8
- package/dist/components/carousel/carousel.d.ts +1 -1
- package/dist/components/carousel/carousel.js +105 -68
- package/dist/components/cascader/cascader.js +54 -19
- package/dist/components/checkbox/checkbox.css +13 -2
- package/dist/components/checkbox/checkbox.d.ts +2 -0
- package/dist/components/checkbox/checkbox.js +320 -229
- package/dist/components/collapse/collapse-panels.d.ts +1 -1
- package/dist/components/collapse/collapse-panels.js +122 -113
- package/dist/components/collapse/collapse.js +98 -63
- package/dist/components/color-picker/color-picker.js +539 -441
- package/dist/components/color-picker/color.js +1 -1
- package/dist/components/context-menu/context-menu.d.ts +1 -1
- package/dist/components/context-menu/context-menu.js +108 -68
- package/dist/components/date-picker/calendar/calendar-grid.js +42 -39
- package/dist/components/date-picker/calendar/month-grid.d.ts +8 -1
- package/dist/components/date-picker/calendar/month-grid.js +79 -37
- package/dist/components/date-picker/calendar/time-panel.d.ts +2 -1
- package/dist/components/date-picker/calendar/time-panel.js +94 -89
- package/dist/components/date-picker/calendar/year-grid.d.ts +8 -1
- package/dist/components/date-picker/calendar/year-grid.js +66 -35
- package/dist/components/date-picker/date-picker.css +24 -1
- package/dist/components/date-picker/date-picker.js +99 -53
- package/dist/components/date-picker/presets.d.ts +2 -1
- package/dist/components/date-picker/presets.js +27 -24
- package/dist/components/date-picker/range-picker.js +308 -153
- package/dist/components/descriptions/descriptions.js +7 -3
- package/dist/components/divider/divider.css +1 -1
- package/dist/components/divider/divider.js +1 -1
- package/dist/components/drawer/drawer.js +201 -369
- package/dist/components/dropdown/dropdown.d.ts +1 -1
- package/dist/components/dropdown/dropdown.js +183 -279
- package/dist/components/empty/empty.js +57 -78
- package/dist/components/float-button/float-button.d.ts +1 -0
- package/dist/components/float-button/float-button.js +47 -30
- package/dist/components/form/field-control.d.ts +4 -2
- package/dist/components/form/field-control.js +17 -9
- package/dist/components/form/form-context.d.ts +8 -2
- package/dist/components/form/form-context.js +2 -1
- package/dist/components/form/form-item.js +85 -63
- package/dist/components/form/form.css +3 -2
- package/dist/components/form/use-form.d.ts +2 -1
- package/dist/components/form/use-form.js +2 -1
- package/dist/components/form-field/form-field-view.d.ts +3 -1
- package/dist/components/form-field/form-field-view.js +194 -141
- package/dist/components/form-section/form-section.d.ts +1 -1
- package/dist/components/form-section/form-section.js +52 -45
- package/dist/components/image/image.js +585 -477
- package/dist/components/input/base-input.js +8 -9
- package/dist/components/input/input-shared.d.ts +5 -2
- package/dist/components/input/input-shared.js +42 -18
- package/dist/components/input/otp.js +236 -217
- package/dist/components/input/password.js +2 -1
- package/dist/components/input/search.js +8 -7
- package/dist/components/list/list-pagination.js +41 -36
- package/dist/components/list/list.js +141 -125
- package/dist/components/listy/listy.js +175 -106
- package/dist/components/masonry/masonry.js +108 -85
- package/dist/components/mentions/mentions.js +12 -3
- package/dist/components/menu/menu-render.d.ts +9 -3
- package/dist/components/menu/menu-render.js +99 -36
- package/dist/components/modal/confirm-dialog.js +10 -4
- package/dist/components/modal/confirm.js +3 -7
- package/dist/components/modal/index.js +9 -3
- package/dist/components/modal/modal.js +390 -365
- package/dist/components/pagination/pagination.js +105 -96
- package/dist/components/popconfirm/popconfirm.d.ts +1 -1
- package/dist/components/popconfirm/popconfirm.js +219 -168
- package/dist/components/popover/popover.js +330 -243
- package/dist/components/progress/progress.css +2 -2
- package/dist/components/progress/progress.js +232 -458
- package/dist/components/qr-code/qr-code.js +72 -66
- package/dist/components/radio/radio.css +15 -4
- package/dist/components/radio/radio.d.ts +2 -1
- package/dist/components/radio/radio.js +260 -198
- package/dist/components/rate/rate.js +173 -113
- package/dist/components/scroll-area/scroll-area.js +241 -211
- package/dist/components/segmented/segmented.js +73 -41
- package/dist/components/select/mobile-select.d.ts +2 -1
- package/dist/components/select/mobile-select.js +24 -13
- package/dist/components/select/select-searchable-list.d.ts +2 -1
- package/dist/components/select/select-searchable-list.js +2 -3
- package/dist/components/select/select.js +49 -25
- package/dist/components/select/use-select-selection.d.ts +1 -1
- package/dist/components/select/use-select-selection.js +7 -4
- package/dist/components/skeleton/skeleton.js +56 -48
- package/dist/components/slider/slider.js +87 -212
- package/dist/components/sonner/sonner.js +109 -93
- package/dist/components/spinner/spinner.js +147 -138
- package/dist/components/splitter/splitter.js +222 -159
- package/dist/components/statistic/statistic.js +7 -6
- package/dist/components/steps/steps.js +88 -81
- package/dist/components/steps/use-display-steps.js +1 -1
- package/dist/components/switch/switch.js +89 -89
- package/dist/components/table/table-filter.js +66 -56
- package/dist/components/table/table-icons.d.ts +2 -1
- package/dist/components/table/table-icons.js +11 -9
- package/dist/components/table/table-model.js +1 -1
- package/dist/components/table/table.js +107 -83
- package/dist/components/table/use-table-data.d.ts +6 -3
- package/dist/components/table/use-table-data.js +166 -130
- package/dist/components/tabs/tabs.css +1 -1
- package/dist/components/tabs/tabs.js +236 -179
- package/dist/components/tag/tag.d.ts +2 -2
- package/dist/components/tag/tag.js +111 -108
- package/dist/components/textarea/textarea.js +22 -17
- package/dist/components/time-picker/time-picker.js +5 -3
- package/dist/components/timeline/timeline.css +6 -1
- package/dist/components/timeline/timeline.js +21 -11
- package/dist/components/tooltip/tooltip.d.ts +2 -2
- package/dist/components/tooltip/tooltip.js +123 -233
- package/dist/components/tour/tour.css +4 -0
- package/dist/components/tour/tour.js +400 -331
- package/dist/components/transfer/transfer-list.js +29 -11
- package/dist/components/transfer/transfer-parts.js +1 -1
- package/dist/components/transfer/transfer-types.d.ts +1 -0
- package/dist/components/transfer/transfer.js +29 -14
- package/dist/components/tree/tree-keyboard.d.ts +1 -1
- package/dist/components/tree/tree-keyboard.js +5 -3
- package/dist/components/tree/tree.js +74 -59
- package/dist/components/tree-select/select-engine.d.ts +3 -2
- package/dist/components/tree-select/select-engine.js +18 -16
- package/dist/components/tree-select/tree-select.js +21 -5
- package/dist/components/upload/upload.css +8 -0
- package/dist/components/upload/upload.js +160 -72
- package/dist/components/watermark/watermark.js +36 -29
- package/dist/number-input/use-number-input.js +129 -90
- package/dist/number-input/validate.js +32 -5
- package/dist/provider/merge-locale.js +12 -9
- package/dist/provider/tao-provider.d.ts +3 -1
- package/dist/provider/tao-provider.js +123 -86
- package/package.json +1 -1
|
@@ -1,61 +1,109 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "react-compiler-runtime";
|
|
3
|
-
import { cloneElement, isValidElement, useId } from "react";
|
|
3
|
+
import { Fragment, cloneElement, isValidElement, useId } from "react";
|
|
4
4
|
import { FieldLabelContext } from "../../utils/field-label.js";
|
|
5
5
|
import { cx } from "../../utils/semantic.js";
|
|
6
6
|
import "./form.css";
|
|
7
|
+
const hasContent = (value)=>null != value && '' !== value && 'boolean' != typeof value;
|
|
7
8
|
function FormFieldView(t0) {
|
|
8
|
-
const $ = c(
|
|
9
|
-
const { formItem, reserveMessage, label, htmlFor, required, error, warning, description, layout: t1, controlProps, renderControl, children, className, style, classNames, styles } = t0;
|
|
9
|
+
const $ = c(78);
|
|
10
|
+
const { formItem, reserveMessage, label, htmlFor, required, error, invalid, warning, description, extra, layout: t1, controlProps, renderControl, children, className, style, classNames, styles } = t0;
|
|
10
11
|
const layout = void 0 === t1 ? "vertical" : t1;
|
|
11
12
|
const generatedId = useId();
|
|
12
|
-
const child = /*#__PURE__*/ isValidElement(children) ? children : null;
|
|
13
|
+
const child = /*#__PURE__*/ isValidElement(children) && children.type !== Fragment ? children : null;
|
|
13
14
|
const childId = "string" == typeof child?.props.id ? child.props.id : void 0;
|
|
14
15
|
const controlId = htmlFor ?? childId ?? `${generatedId}-control`;
|
|
15
16
|
const labelId = `${generatedId}-label`;
|
|
16
17
|
const descriptionId = `${generatedId}-description`;
|
|
17
18
|
const errorId = `${generatedId}-error`;
|
|
18
|
-
const
|
|
19
|
-
|
|
19
|
+
const extraId = `${generatedId}-extra`;
|
|
20
|
+
let t2;
|
|
21
|
+
if ($[0] !== label) {
|
|
22
|
+
t2 = hasContent(label);
|
|
23
|
+
$[0] = label;
|
|
24
|
+
$[1] = t2;
|
|
25
|
+
} else t2 = $[1];
|
|
26
|
+
const hasLabel = t2;
|
|
20
27
|
let t3;
|
|
21
|
-
if ($[
|
|
22
|
-
t3 =
|
|
28
|
+
if ($[2] !== error) {
|
|
29
|
+
t3 = hasContent(error);
|
|
30
|
+
$[2] = error;
|
|
31
|
+
$[3] = t3;
|
|
32
|
+
} else t3 = $[3];
|
|
33
|
+
const hasError = t3;
|
|
34
|
+
let t4;
|
|
35
|
+
if ($[4] !== description) {
|
|
36
|
+
t4 = hasContent(description);
|
|
37
|
+
$[4] = description;
|
|
38
|
+
$[5] = t4;
|
|
39
|
+
} else t4 = $[5];
|
|
40
|
+
const hasDescription = t4;
|
|
41
|
+
let t5;
|
|
42
|
+
if ($[6] !== extra) {
|
|
43
|
+
t5 = hasContent(extra);
|
|
44
|
+
$[6] = extra;
|
|
45
|
+
$[7] = t5;
|
|
46
|
+
} else t5 = $[7];
|
|
47
|
+
const hasExtra = t5;
|
|
48
|
+
const childDescribedBy = "string" == typeof child?.props["aria-describedby"] ? child.props["aria-describedby"] : void 0;
|
|
49
|
+
const t6 = hasError ? errorId : hasDescription ? descriptionId : void 0;
|
|
50
|
+
const t7 = hasExtra ? extraId : void 0;
|
|
51
|
+
let t8;
|
|
52
|
+
if ($[8] !== childDescribedBy || $[9] !== t6 || $[10] !== t7) {
|
|
53
|
+
t8 = [
|
|
23
54
|
childDescribedBy,
|
|
24
|
-
|
|
55
|
+
t6,
|
|
56
|
+
t7
|
|
25
57
|
].filter(Boolean);
|
|
26
|
-
$[
|
|
27
|
-
$[
|
|
28
|
-
$[
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
58
|
+
$[8] = childDescribedBy;
|
|
59
|
+
$[9] = t6;
|
|
60
|
+
$[10] = t7;
|
|
61
|
+
$[11] = t8;
|
|
62
|
+
} else t8 = $[11];
|
|
63
|
+
const describedBy = t8.join(" ");
|
|
64
|
+
let t9;
|
|
65
|
+
if ($[12] !== child || $[13] !== children || $[14] !== controlId || $[15] !== controlProps || $[16] !== describedBy || $[17] !== errorId || $[18] !== hasError || $[19] !== hasLabel || $[20] !== invalid || $[21] !== labelId || $[22] !== required || $[23] !== warning) {
|
|
66
|
+
t9 = child ? /*#__PURE__*/ cloneElement(child, {
|
|
34
67
|
...controlProps,
|
|
35
68
|
id: controlId,
|
|
36
|
-
"aria-labelledby": child.props["aria-labelledby"] ?? (
|
|
69
|
+
"aria-labelledby": child.props["aria-labelledby"] ?? (hasLabel && !child.props["aria-label"] ? labelId : void 0),
|
|
37
70
|
"aria-describedby": describedBy || void 0,
|
|
38
|
-
"aria-errormessage":
|
|
39
|
-
"aria-invalid":
|
|
71
|
+
"aria-errormessage": hasError && !warning ? errorId : child.props["aria-errormessage"],
|
|
72
|
+
"aria-invalid": invalid || hasError && !warning ? true : child.props["aria-invalid"],
|
|
40
73
|
"aria-required": required ? true : child.props["aria-required"]
|
|
41
74
|
}) : children;
|
|
42
|
-
$[
|
|
43
|
-
$[
|
|
44
|
-
$[
|
|
45
|
-
$[
|
|
46
|
-
$[
|
|
47
|
-
$[
|
|
48
|
-
$[
|
|
49
|
-
$[
|
|
50
|
-
$[
|
|
51
|
-
$[
|
|
52
|
-
$[
|
|
53
|
-
$[
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
75
|
+
$[12] = child;
|
|
76
|
+
$[13] = children;
|
|
77
|
+
$[14] = controlId;
|
|
78
|
+
$[15] = controlProps;
|
|
79
|
+
$[16] = describedBy;
|
|
80
|
+
$[17] = errorId;
|
|
81
|
+
$[18] = hasError;
|
|
82
|
+
$[19] = hasLabel;
|
|
83
|
+
$[20] = invalid;
|
|
84
|
+
$[21] = labelId;
|
|
85
|
+
$[22] = required;
|
|
86
|
+
$[23] = warning;
|
|
87
|
+
$[24] = t9;
|
|
88
|
+
} else t9 = $[24];
|
|
89
|
+
const control = t9;
|
|
90
|
+
let t10;
|
|
91
|
+
if ($[25] !== classNames?.description || $[26] !== styles?.description) {
|
|
92
|
+
t10 = (id, content)=>/*#__PURE__*/ jsx("p", {
|
|
93
|
+
className: classNames?.description,
|
|
94
|
+
style: styles?.description,
|
|
95
|
+
"data-tao-form-description": "",
|
|
96
|
+
id: id,
|
|
97
|
+
children: content
|
|
98
|
+
});
|
|
99
|
+
$[25] = classNames?.description;
|
|
100
|
+
$[26] = styles?.description;
|
|
101
|
+
$[27] = t10;
|
|
102
|
+
} else t10 = $[27];
|
|
103
|
+
const descriptionMessage = t10;
|
|
104
|
+
let t11;
|
|
105
|
+
if ($[28] !== classNames?.error || $[29] !== description || $[30] !== descriptionId || $[31] !== descriptionMessage || $[32] !== error || $[33] !== errorId || $[34] !== hasDescription || $[35] !== hasError || $[36] !== styles?.error || $[37] !== warning) {
|
|
106
|
+
t11 = hasError ? /*#__PURE__*/ jsx("p", {
|
|
59
107
|
className: classNames?.error,
|
|
60
108
|
style: styles?.error,
|
|
61
109
|
"data-tao-form-error": "",
|
|
@@ -63,51 +111,46 @@ function FormFieldView(t0) {
|
|
|
63
111
|
id: errorId,
|
|
64
112
|
role: "alert",
|
|
65
113
|
children: error
|
|
66
|
-
}) :
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
$[
|
|
74
|
-
$[
|
|
75
|
-
$[
|
|
76
|
-
$[
|
|
77
|
-
$[
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
const t8 = styles?.root;
|
|
95
|
-
let t9;
|
|
96
|
-
if ($[28] !== style || $[29] !== t8) {
|
|
97
|
-
t9 = {
|
|
98
|
-
...t8,
|
|
114
|
+
}) : hasDescription ? descriptionMessage(descriptionId, description) : null;
|
|
115
|
+
$[28] = classNames?.error;
|
|
116
|
+
$[29] = description;
|
|
117
|
+
$[30] = descriptionId;
|
|
118
|
+
$[31] = descriptionMessage;
|
|
119
|
+
$[32] = error;
|
|
120
|
+
$[33] = errorId;
|
|
121
|
+
$[34] = hasDescription;
|
|
122
|
+
$[35] = hasError;
|
|
123
|
+
$[36] = styles?.error;
|
|
124
|
+
$[37] = warning;
|
|
125
|
+
$[38] = t11;
|
|
126
|
+
} else t11 = $[38];
|
|
127
|
+
const message = t11;
|
|
128
|
+
const hasMessage = formItem && (reserveMessage || null !== message || hasExtra);
|
|
129
|
+
const t12 = classNames?.root;
|
|
130
|
+
let t13;
|
|
131
|
+
if ($[39] !== className || $[40] !== t12) {
|
|
132
|
+
t13 = cx(t12, className);
|
|
133
|
+
$[39] = className;
|
|
134
|
+
$[40] = t12;
|
|
135
|
+
$[41] = t13;
|
|
136
|
+
} else t13 = $[41];
|
|
137
|
+
const t14 = styles?.root;
|
|
138
|
+
let t15;
|
|
139
|
+
if ($[42] !== style || $[43] !== t14) {
|
|
140
|
+
t15 = {
|
|
141
|
+
...t14,
|
|
99
142
|
...style
|
|
100
143
|
};
|
|
101
|
-
$[
|
|
102
|
-
$[
|
|
103
|
-
$[
|
|
104
|
-
} else
|
|
105
|
-
const
|
|
106
|
-
const
|
|
107
|
-
const
|
|
108
|
-
let
|
|
109
|
-
if ($[
|
|
110
|
-
|
|
144
|
+
$[42] = style;
|
|
145
|
+
$[43] = t14;
|
|
146
|
+
$[44] = t15;
|
|
147
|
+
} else t15 = $[44];
|
|
148
|
+
const t16 = formItem ? "" : void 0;
|
|
149
|
+
const t17 = hasMessage ? "" : void 0;
|
|
150
|
+
const t18 = "horizontal" === layout ? "horizontal" : void 0;
|
|
151
|
+
let t19;
|
|
152
|
+
if ($[45] !== classNames?.label || $[46] !== controlId || $[47] !== hasLabel || $[48] !== label || $[49] !== labelId || $[50] !== required || $[51] !== styles?.label) {
|
|
153
|
+
t19 = hasLabel && /*#__PURE__*/ jsxs("label", {
|
|
111
154
|
id: labelId,
|
|
112
155
|
htmlFor: controlId,
|
|
113
156
|
className: classNames?.label,
|
|
@@ -122,77 +165,87 @@ function FormFieldView(t0) {
|
|
|
122
165
|
})
|
|
123
166
|
]
|
|
124
167
|
});
|
|
125
|
-
$[
|
|
126
|
-
$[
|
|
127
|
-
$[
|
|
128
|
-
$[
|
|
129
|
-
$[
|
|
130
|
-
$[
|
|
131
|
-
$[
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
$[
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
168
|
+
$[45] = classNames?.label;
|
|
169
|
+
$[46] = controlId;
|
|
170
|
+
$[47] = hasLabel;
|
|
171
|
+
$[48] = label;
|
|
172
|
+
$[49] = labelId;
|
|
173
|
+
$[50] = required;
|
|
174
|
+
$[51] = styles?.label;
|
|
175
|
+
$[52] = t19;
|
|
176
|
+
} else t19 = $[52];
|
|
177
|
+
const t20 = hasLabel ? label : void 0;
|
|
178
|
+
let t21;
|
|
179
|
+
if ($[53] !== child || $[54] !== control || $[55] !== renderControl) {
|
|
180
|
+
t21 = renderControl && child && /*#__PURE__*/ isValidElement(control) ? renderControl(control) : control;
|
|
181
|
+
$[53] = child;
|
|
182
|
+
$[54] = control;
|
|
183
|
+
$[55] = renderControl;
|
|
184
|
+
$[56] = t21;
|
|
185
|
+
} else t21 = $[56];
|
|
186
|
+
let t22;
|
|
187
|
+
if ($[57] !== t20 || $[58] !== t21) {
|
|
188
|
+
t22 = /*#__PURE__*/ jsx(FieldLabelContext.Provider, {
|
|
189
|
+
value: t20,
|
|
190
|
+
children: t21
|
|
145
191
|
});
|
|
146
|
-
$[
|
|
147
|
-
$[
|
|
148
|
-
$[
|
|
149
|
-
} else
|
|
150
|
-
let
|
|
151
|
-
if ($[
|
|
152
|
-
|
|
192
|
+
$[57] = t20;
|
|
193
|
+
$[58] = t21;
|
|
194
|
+
$[59] = t22;
|
|
195
|
+
} else t22 = $[59];
|
|
196
|
+
let t23;
|
|
197
|
+
if ($[60] !== descriptionMessage || $[61] !== extra || $[62] !== extraId || $[63] !== hasExtra || $[64] !== hasMessage || $[65] !== message) {
|
|
198
|
+
t23 = hasMessage ? /*#__PURE__*/ jsxs("div", {
|
|
153
199
|
"data-tao-form-message": "",
|
|
154
|
-
children:
|
|
200
|
+
children: [
|
|
201
|
+
message,
|
|
202
|
+
hasExtra && descriptionMessage(extraId, extra)
|
|
203
|
+
]
|
|
155
204
|
}) : message;
|
|
156
|
-
$[
|
|
157
|
-
$[
|
|
158
|
-
$[
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
205
|
+
$[60] = descriptionMessage;
|
|
206
|
+
$[61] = extra;
|
|
207
|
+
$[62] = extraId;
|
|
208
|
+
$[63] = hasExtra;
|
|
209
|
+
$[64] = hasMessage;
|
|
210
|
+
$[65] = message;
|
|
211
|
+
$[66] = t23;
|
|
212
|
+
} else t23 = $[66];
|
|
213
|
+
let t24;
|
|
214
|
+
if ($[67] !== t22 || $[68] !== t23) {
|
|
215
|
+
t24 = /*#__PURE__*/ jsxs("div", {
|
|
163
216
|
"data-tao-form-control": "",
|
|
164
217
|
children: [
|
|
165
|
-
|
|
166
|
-
|
|
218
|
+
t22,
|
|
219
|
+
t23
|
|
167
220
|
]
|
|
168
221
|
});
|
|
169
|
-
$[
|
|
170
|
-
$[
|
|
171
|
-
$[
|
|
172
|
-
} else
|
|
173
|
-
let
|
|
174
|
-
if ($[
|
|
175
|
-
|
|
176
|
-
className:
|
|
177
|
-
style:
|
|
222
|
+
$[67] = t22;
|
|
223
|
+
$[68] = t23;
|
|
224
|
+
$[69] = t24;
|
|
225
|
+
} else t24 = $[69];
|
|
226
|
+
let t25;
|
|
227
|
+
if ($[70] !== t13 || $[71] !== t15 || $[72] !== t16 || $[73] !== t17 || $[74] !== t18 || $[75] !== t19 || $[76] !== t24) {
|
|
228
|
+
t25 = /*#__PURE__*/ jsxs("div", {
|
|
229
|
+
className: t13,
|
|
230
|
+
style: t15,
|
|
178
231
|
"data-tao-form-field": "",
|
|
179
|
-
"data-tao-form-item":
|
|
180
|
-
"data-tao-form-feedback":
|
|
181
|
-
"data-tao-layout":
|
|
232
|
+
"data-tao-form-item": t16,
|
|
233
|
+
"data-tao-form-feedback": t17,
|
|
234
|
+
"data-tao-layout": t18,
|
|
182
235
|
children: [
|
|
183
|
-
|
|
184
|
-
|
|
236
|
+
t19,
|
|
237
|
+
t24
|
|
185
238
|
]
|
|
186
239
|
});
|
|
187
|
-
$[
|
|
188
|
-
$[
|
|
189
|
-
$[
|
|
190
|
-
$[
|
|
191
|
-
$[
|
|
192
|
-
$[
|
|
193
|
-
$[
|
|
194
|
-
$[
|
|
195
|
-
} else
|
|
196
|
-
return
|
|
240
|
+
$[70] = t13;
|
|
241
|
+
$[71] = t15;
|
|
242
|
+
$[72] = t16;
|
|
243
|
+
$[73] = t17;
|
|
244
|
+
$[74] = t18;
|
|
245
|
+
$[75] = t19;
|
|
246
|
+
$[76] = t24;
|
|
247
|
+
$[77] = t25;
|
|
248
|
+
} else t25 = $[77];
|
|
249
|
+
return t25;
|
|
197
250
|
}
|
|
198
251
|
export { FormFieldView };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type CSSProperties, type ReactNode } from 'react';
|
|
2
2
|
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic.js';
|
|
3
3
|
import '../form-field/form.css';
|
|
4
4
|
export type FormSectionSemanticPart = 'root' | 'header' | 'title' | 'description' | 'body';
|
|
@@ -1,37 +1,41 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "react-compiler-runtime";
|
|
3
|
+
import { useId } from "react";
|
|
3
4
|
import { cx } from "../../utils/semantic.js";
|
|
4
5
|
import "../form-field/form.css";
|
|
5
6
|
function FormSection(t0) {
|
|
6
|
-
const $ = c(
|
|
7
|
+
const $ = c(26);
|
|
7
8
|
const { title, description, children, className, style, classNames, styles } = t0;
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
const titleId = useId();
|
|
10
|
+
const t1 = title ? titleId : void 0;
|
|
11
|
+
const t2 = classNames?.root;
|
|
12
|
+
let t3;
|
|
13
|
+
if ($[0] !== className || $[1] !== t2) {
|
|
14
|
+
t3 = cx(t2, className);
|
|
12
15
|
$[0] = className;
|
|
13
|
-
$[1] =
|
|
14
|
-
$[2] =
|
|
15
|
-
} else
|
|
16
|
-
const
|
|
17
|
-
let
|
|
18
|
-
if ($[3] !== style || $[4] !==
|
|
19
|
-
|
|
20
|
-
...
|
|
16
|
+
$[1] = t2;
|
|
17
|
+
$[2] = t3;
|
|
18
|
+
} else t3 = $[2];
|
|
19
|
+
const t4 = styles?.root;
|
|
20
|
+
let t5;
|
|
21
|
+
if ($[3] !== style || $[4] !== t4) {
|
|
22
|
+
t5 = {
|
|
23
|
+
...t4,
|
|
21
24
|
...style
|
|
22
25
|
};
|
|
23
26
|
$[3] = style;
|
|
24
|
-
$[4] =
|
|
25
|
-
$[5] =
|
|
26
|
-
} else
|
|
27
|
-
let
|
|
28
|
-
if ($[6] !== classNames?.description || $[7] !== classNames?.header || $[8] !== classNames?.title || $[9] !== description || $[10] !== styles?.description || $[11] !== styles?.header || $[12] !== styles?.title || $[13] !== title) {
|
|
29
|
-
|
|
27
|
+
$[4] = t4;
|
|
28
|
+
$[5] = t5;
|
|
29
|
+
} else t5 = $[5];
|
|
30
|
+
let t6;
|
|
31
|
+
if ($[6] !== classNames?.description || $[7] !== classNames?.header || $[8] !== classNames?.title || $[9] !== description || $[10] !== styles?.description || $[11] !== styles?.header || $[12] !== styles?.title || $[13] !== title || $[14] !== titleId) {
|
|
32
|
+
t6 = (title || description) && /*#__PURE__*/ jsxs("div", {
|
|
30
33
|
className: classNames?.header,
|
|
31
34
|
style: styles?.header,
|
|
32
35
|
"data-tao-form-section-header": "",
|
|
33
36
|
children: [
|
|
34
37
|
title && /*#__PURE__*/ jsx("div", {
|
|
38
|
+
id: titleId,
|
|
35
39
|
className: classNames?.title,
|
|
36
40
|
style: styles?.title,
|
|
37
41
|
"data-tao-form-section-title": "",
|
|
@@ -53,40 +57,43 @@ function FormSection(t0) {
|
|
|
53
57
|
$[11] = styles?.header;
|
|
54
58
|
$[12] = styles?.title;
|
|
55
59
|
$[13] = title;
|
|
56
|
-
$[14] =
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
const t7 =
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
60
|
+
$[14] = titleId;
|
|
61
|
+
$[15] = t6;
|
|
62
|
+
} else t6 = $[15];
|
|
63
|
+
const t7 = classNames?.body;
|
|
64
|
+
const t8 = styles?.body;
|
|
65
|
+
let t9;
|
|
66
|
+
if ($[16] !== children || $[17] !== t7 || $[18] !== t8) {
|
|
67
|
+
t9 = /*#__PURE__*/ jsx("div", {
|
|
68
|
+
className: t7,
|
|
69
|
+
style: t8,
|
|
65
70
|
"data-tao-form-section-body": "",
|
|
66
71
|
children: children
|
|
67
72
|
});
|
|
68
|
-
$[
|
|
69
|
-
$[16] = t6;
|
|
73
|
+
$[16] = children;
|
|
70
74
|
$[17] = t7;
|
|
71
75
|
$[18] = t8;
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
$[19] = t9;
|
|
77
|
+
} else t9 = $[19];
|
|
78
|
+
let t10;
|
|
79
|
+
if ($[20] !== t1 || $[21] !== t3 || $[22] !== t5 || $[23] !== t6 || $[24] !== t9) {
|
|
80
|
+
t10 = /*#__PURE__*/ jsxs("section", {
|
|
81
|
+
"aria-labelledby": t1,
|
|
82
|
+
className: t3,
|
|
83
|
+
style: t5,
|
|
78
84
|
"data-tao-form-section": "",
|
|
79
85
|
children: [
|
|
80
|
-
|
|
81
|
-
|
|
86
|
+
t6,
|
|
87
|
+
t9
|
|
82
88
|
]
|
|
83
89
|
});
|
|
84
|
-
$[
|
|
85
|
-
$[
|
|
86
|
-
$[
|
|
87
|
-
$[
|
|
88
|
-
$[
|
|
89
|
-
|
|
90
|
-
|
|
90
|
+
$[20] = t1;
|
|
91
|
+
$[21] = t3;
|
|
92
|
+
$[22] = t5;
|
|
93
|
+
$[23] = t6;
|
|
94
|
+
$[24] = t9;
|
|
95
|
+
$[25] = t10;
|
|
96
|
+
} else t10 = $[25];
|
|
97
|
+
return t10;
|
|
91
98
|
}
|
|
92
99
|
export { FormSection };
|