@rockshin/tao-ui 0.0.1
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/LICENSE +21 -0
- package/README.md +65 -0
- package/dist/components/button/button.css +1055 -0
- package/dist/components/button/button.d.ts +15 -0
- package/dist/components/button/button.js +93 -0
- package/dist/components/checkbox/checkbox.css +1035 -0
- package/dist/components/checkbox/checkbox.d.ts +33 -0
- package/dist/components/checkbox/checkbox.js +312 -0
- package/dist/components/date-picker/calendar/calendar-grid.d.ts +18 -0
- package/dist/components/date-picker/calendar/calendar-grid.js +173 -0
- package/dist/components/date-picker/calendar/calendar-header.d.ts +10 -0
- package/dist/components/date-picker/calendar/calendar-header.js +336 -0
- package/dist/components/date-picker/calendar/month-grid.d.ts +9 -0
- package/dist/components/date-picker/calendar/month-grid.js +61 -0
- package/dist/components/date-picker/calendar/time-panel.d.ts +12 -0
- package/dist/components/date-picker/calendar/time-panel.js +233 -0
- package/dist/components/date-picker/calendar/use-calendar.d.ts +15 -0
- package/dist/components/date-picker/calendar/use-calendar.js +24 -0
- package/dist/components/date-picker/calendar/year-grid.d.ts +9 -0
- package/dist/components/date-picker/calendar/year-grid.js +60 -0
- package/dist/components/date-picker/date-picker.css +1799 -0
- package/dist/components/date-picker/date-picker.d.ts +29 -0
- package/dist/components/date-picker/date-picker.js +663 -0
- package/dist/components/date-picker/presets.d.ts +9 -0
- package/dist/components/date-picker/presets.js +36 -0
- package/dist/components/date-picker/range-picker.d.ts +30 -0
- package/dist/components/date-picker/range-picker.js +432 -0
- package/dist/components/date-picker/types.d.ts +39 -0
- package/dist/components/date-picker/types.js +7 -0
- package/dist/components/drawer/drawer.css +1112 -0
- package/dist/components/drawer/drawer.d.ts +17 -0
- package/dist/components/drawer/drawer.js +184 -0
- package/dist/components/form-actions/form-actions.d.ts +12 -0
- package/dist/components/form-actions/form-actions.js +42 -0
- package/dist/components/form-field/form-field.d.ts +17 -0
- package/dist/components/form-field/form-field.js +101 -0
- package/dist/components/form-field/form.css +1036 -0
- package/dist/components/form-section/form-section.d.ts +14 -0
- package/dist/components/form-section/form-section.js +92 -0
- package/dist/components/input/input.css +1185 -0
- package/dist/components/input/input.d.ts +15 -0
- package/dist/components/input/input.js +143 -0
- package/dist/components/pagination/pagination.css +1099 -0
- package/dist/components/pagination/pagination.d.ts +22 -0
- package/dist/components/pagination/pagination.js +310 -0
- package/dist/components/radio/radio.css +1045 -0
- package/dist/components/radio/radio.d.ts +34 -0
- package/dist/components/radio/radio.js +215 -0
- package/dist/components/scroll-area/scroll-area.css +1099 -0
- package/dist/components/scroll-area/scroll-area.d.ts +33 -0
- package/dist/components/scroll-area/scroll-area.js +375 -0
- package/dist/components/select/mobile-select.css +1044 -0
- package/dist/components/select/mobile-select.d.ts +19 -0
- package/dist/components/select/mobile-select.js +224 -0
- package/dist/components/select/select.css +1327 -0
- package/dist/components/select/select.d.ts +32 -0
- package/dist/components/select/select.js +532 -0
- package/dist/components/select/use-is-mobile.d.ts +1 -0
- package/dist/components/select/use-is-mobile.js +30 -0
- package/dist/components/splitter/splitter.css +1104 -0
- package/dist/components/splitter/splitter.d.ts +33 -0
- package/dist/components/splitter/splitter.js +451 -0
- package/dist/components/switch/switch.css +1170 -0
- package/dist/components/switch/switch.d.ts +19 -0
- package/dist/components/switch/switch.js +143 -0
- package/dist/components/table/table.css +1255 -0
- package/dist/components/table/table.d.ts +73 -0
- package/dist/components/table/table.js +1022 -0
- package/dist/components/tabs/tabs.css +1076 -0
- package/dist/components/tabs/tabs.d.ts +24 -0
- package/dist/components/tabs/tabs.js +256 -0
- package/dist/components/tag/tag.css +1124 -0
- package/dist/components/tag/tag.d.ts +33 -0
- package/dist/components/tag/tag.js +237 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.js +23 -0
- package/dist/layouts/form-layout/form-layout.d.ts +6 -0
- package/dist/layouts/form-layout/form-layout.js +18 -0
- package/dist/layouts/stack/layout.css +1003 -0
- package/dist/layouts/stack/stack.d.ts +9 -0
- package/dist/layouts/stack/stack.js +27 -0
- package/dist/number-input/cursor.d.ts +9 -0
- package/dist/number-input/cursor.js +44 -0
- package/dist/number-input/format.d.ts +5 -0
- package/dist/number-input/format.js +50 -0
- package/dist/number-input/index.d.ts +5 -0
- package/dist/number-input/index.js +2 -0
- package/dist/number-input/number-input.d.ts +9 -0
- package/dist/number-input/number-input.js +101 -0
- package/dist/number-input/percentage.d.ts +3 -0
- package/dist/number-input/percentage.js +28 -0
- package/dist/number-input/types.d.ts +5 -0
- package/dist/number-input/types.js +0 -0
- package/dist/number-input/use-number-input.d.ts +30 -0
- package/dist/number-input/use-number-input.js +211 -0
- package/dist/number-input/validate.d.ts +3 -0
- package/dist/number-input/validate.js +17 -0
- package/dist/provider/tao-provider.d.ts +42 -0
- package/dist/provider/tao-provider.js +67 -0
- package/dist/theme/control.css +1061 -0
- package/dist/theme/theme.css +957 -0
- package/dist/utils/semantic.d.ts +10 -0
- package/dist/utils/semantic.js +5 -0
- package/llms.txt +67 -0
- package/package.json +97 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic';
|
|
3
|
+
import '../form-field/form.css';
|
|
4
|
+
export type FormSectionSemanticPart = 'root' | 'header' | 'title' | 'description' | 'body';
|
|
5
|
+
export interface FormSectionProps {
|
|
6
|
+
title?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
className?: string;
|
|
10
|
+
style?: CSSProperties;
|
|
11
|
+
classNames?: SemanticClassNames<FormSectionSemanticPart>;
|
|
12
|
+
styles?: SemanticStyles<FormSectionSemanticPart>;
|
|
13
|
+
}
|
|
14
|
+
export declare function FormSection({ title, description, children, className, style, classNames, styles, }: FormSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
3
|
+
import { cx } from "../../utils/semantic.js";
|
|
4
|
+
import "../form-field/form.css";
|
|
5
|
+
function FormSection(t0) {
|
|
6
|
+
const $ = c(24);
|
|
7
|
+
const { title, description, children, className, style, classNames, styles } = t0;
|
|
8
|
+
const t1 = classNames?.root;
|
|
9
|
+
let t2;
|
|
10
|
+
if ($[0] !== className || $[1] !== t1) {
|
|
11
|
+
t2 = cx(t1, className);
|
|
12
|
+
$[0] = className;
|
|
13
|
+
$[1] = t1;
|
|
14
|
+
$[2] = t2;
|
|
15
|
+
} else t2 = $[2];
|
|
16
|
+
const t3 = styles?.root;
|
|
17
|
+
let t4;
|
|
18
|
+
if ($[3] !== style || $[4] !== t3) {
|
|
19
|
+
t4 = {
|
|
20
|
+
...t3,
|
|
21
|
+
...style
|
|
22
|
+
};
|
|
23
|
+
$[3] = style;
|
|
24
|
+
$[4] = t3;
|
|
25
|
+
$[5] = t4;
|
|
26
|
+
} else t4 = $[5];
|
|
27
|
+
let t5;
|
|
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
|
+
t5 = (title || description) && /*#__PURE__*/ jsxs("div", {
|
|
30
|
+
className: classNames?.header,
|
|
31
|
+
style: styles?.header,
|
|
32
|
+
"data-tao-form-section-header": "",
|
|
33
|
+
children: [
|
|
34
|
+
title && /*#__PURE__*/ jsx("legend", {
|
|
35
|
+
className: classNames?.title,
|
|
36
|
+
style: styles?.title,
|
|
37
|
+
"data-tao-form-section-title": "",
|
|
38
|
+
children: title
|
|
39
|
+
}),
|
|
40
|
+
description && /*#__PURE__*/ jsx("p", {
|
|
41
|
+
className: classNames?.description,
|
|
42
|
+
style: styles?.description,
|
|
43
|
+
"data-tao-form-section-description": "",
|
|
44
|
+
children: description
|
|
45
|
+
})
|
|
46
|
+
]
|
|
47
|
+
});
|
|
48
|
+
$[6] = classNames?.description;
|
|
49
|
+
$[7] = classNames?.header;
|
|
50
|
+
$[8] = classNames?.title;
|
|
51
|
+
$[9] = description;
|
|
52
|
+
$[10] = styles?.description;
|
|
53
|
+
$[11] = styles?.header;
|
|
54
|
+
$[12] = styles?.title;
|
|
55
|
+
$[13] = title;
|
|
56
|
+
$[14] = t5;
|
|
57
|
+
} else t5 = $[14];
|
|
58
|
+
const t6 = classNames?.body;
|
|
59
|
+
const t7 = styles?.body;
|
|
60
|
+
let t8;
|
|
61
|
+
if ($[15] !== children || $[16] !== t6 || $[17] !== t7) {
|
|
62
|
+
t8 = /*#__PURE__*/ jsx("div", {
|
|
63
|
+
className: t6,
|
|
64
|
+
style: t7,
|
|
65
|
+
"data-tao-form-section-body": "",
|
|
66
|
+
children: children
|
|
67
|
+
});
|
|
68
|
+
$[15] = children;
|
|
69
|
+
$[16] = t6;
|
|
70
|
+
$[17] = t7;
|
|
71
|
+
$[18] = t8;
|
|
72
|
+
} else t8 = $[18];
|
|
73
|
+
let t9;
|
|
74
|
+
if ($[19] !== t2 || $[20] !== t4 || $[21] !== t5 || $[22] !== t8) {
|
|
75
|
+
t9 = /*#__PURE__*/ jsxs("fieldset", {
|
|
76
|
+
className: t2,
|
|
77
|
+
style: t4,
|
|
78
|
+
"data-tao-form-section": "",
|
|
79
|
+
children: [
|
|
80
|
+
t5,
|
|
81
|
+
t8
|
|
82
|
+
]
|
|
83
|
+
});
|
|
84
|
+
$[19] = t2;
|
|
85
|
+
$[20] = t4;
|
|
86
|
+
$[21] = t5;
|
|
87
|
+
$[22] = t8;
|
|
88
|
+
$[23] = t9;
|
|
89
|
+
} else t9 = $[23];
|
|
90
|
+
return t9;
|
|
91
|
+
}
|
|
92
|
+
export { FormSection };
|