@rockshin/tao-ui 0.0.9 → 0.0.11
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/component-manifest.json +764 -0
- package/dist/components/breadcrumb/breadcrumb.css +4 -0
- package/dist/components/breadcrumb/breadcrumb.js +8 -6
- package/dist/components/checkbox/checkbox.js +4 -0
- package/dist/components/date-picker/calendar/calendar-grid.js +21 -17
- package/dist/components/date-picker/calendar/calendar-header.js +8 -0
- package/dist/components/date-picker/calendar/month-grid.js +1 -1
- package/dist/components/date-picker/calendar/time-panel.js +36 -41
- package/dist/components/date-picker/date-picker.css +30 -16
- package/dist/components/date-picker/date-picker.js +240 -223
- package/dist/components/date-picker/range-picker.js +25 -2
- package/dist/components/drawer/drawer.js +2 -0
- package/dist/components/dropdown/dropdown.js +2 -1
- package/dist/components/form-field/form.css +0 -4
- package/dist/components/form-section/form-section.js +2 -2
- package/dist/components/menu/menu-render.js +6 -3
- package/dist/components/modal/confirm-dialog.js +9 -1
- package/dist/components/modal/modal.js +2 -0
- package/dist/components/pagination/pagination.js +56 -64
- package/dist/components/scroll-area/scroll-area.css +3 -0
- package/dist/components/scroll-area/scroll-area.js +6 -2
- package/dist/components/select/mobile-select.css +4 -0
- package/dist/components/select/mobile-select.js +9 -4
- package/dist/components/select/select.js +6 -0
- package/dist/components/spinner/spinner.js +2 -1
- package/dist/components/splitter/splitter.js +165 -149
- package/dist/components/switch/switch.js +2 -0
- package/dist/components/table/table.css +14 -0
- package/dist/components/table/table.js +14 -14
- package/dist/components/tabs/tabs.js +84 -87
- package/dist/components/tag/tag.js +1 -0
- package/dist/components/textarea/textarea.css +21 -3
- package/dist/docs/component-doc.d.ts +28 -0
- package/dist/docs/component-doc.js +0 -0
- package/dist/docs/component-docs.d.ts +147 -0
- package/dist/docs/component-docs.js +70 -0
- package/dist/docs/components/breadcrumb.doc.d.ts +23 -0
- package/dist/docs/components/breadcrumb.doc.js +53 -0
- package/dist/docs/components/button.doc.d.ts +29 -0
- package/dist/docs/components/button.doc.js +62 -0
- package/dist/docs/components/checkbox.doc.d.ts +23 -0
- package/dist/docs/components/checkbox.doc.js +60 -0
- package/dist/docs/components/collapsible.doc.d.ts +18 -0
- package/dist/docs/components/collapsible.doc.js +39 -0
- package/dist/docs/components/context-menu.doc.d.ts +18 -0
- package/dist/docs/components/context-menu.doc.js +40 -0
- package/dist/docs/components/date-picker.doc.d.ts +18 -0
- package/dist/docs/components/date-picker.doc.js +43 -0
- package/dist/docs/components/drawer.doc.d.ts +18 -0
- package/dist/docs/components/drawer.doc.js +42 -0
- package/dist/docs/components/dropdown.doc.d.ts +18 -0
- package/dist/docs/components/dropdown.doc.js +42 -0
- package/dist/docs/components/form-actions.doc.d.ts +17 -0
- package/dist/docs/components/form-actions.doc.js +35 -0
- package/dist/docs/components/form-field.doc.d.ts +17 -0
- package/dist/docs/components/form-field.doc.js +39 -0
- package/dist/docs/components/form-layout.doc.d.ts +16 -0
- package/dist/docs/components/form-layout.doc.js +31 -0
- package/dist/docs/components/form-section.doc.d.ts +17 -0
- package/dist/docs/components/form-section.doc.js +38 -0
- package/dist/docs/components/headless-input-number.doc.d.ts +16 -0
- package/dist/docs/components/headless-input-number.doc.js +36 -0
- package/dist/docs/components/input-number.doc.d.ts +18 -0
- package/dist/docs/components/input-number.doc.js +41 -0
- package/dist/docs/components/input.doc.d.ts +17 -0
- package/dist/docs/components/input.doc.js +38 -0
- package/dist/docs/components/modal.doc.d.ts +18 -0
- package/dist/docs/components/modal.doc.js +43 -0
- package/dist/docs/components/pagination.doc.d.ts +17 -0
- package/dist/docs/components/pagination.doc.js +37 -0
- package/dist/docs/components/radio.doc.d.ts +18 -0
- package/dist/docs/components/radio.doc.js +43 -0
- package/dist/docs/components/range-picker.doc.d.ts +17 -0
- package/dist/docs/components/range-picker.doc.js +39 -0
- package/dist/docs/components/scroll-area.doc.d.ts +17 -0
- package/dist/docs/components/scroll-area.doc.js +36 -0
- package/dist/docs/components/select.doc.d.ts +18 -0
- package/dist/docs/components/select.doc.js +43 -0
- package/dist/docs/components/spinner.doc.d.ts +18 -0
- package/dist/docs/components/spinner.doc.js +36 -0
- package/dist/docs/components/splitter.doc.d.ts +17 -0
- package/dist/docs/components/splitter.doc.js +36 -0
- package/dist/docs/components/stack.doc.d.ts +16 -0
- package/dist/docs/components/stack.doc.js +31 -0
- package/dist/docs/components/switch.doc.d.ts +17 -0
- package/dist/docs/components/switch.doc.js +35 -0
- package/dist/docs/components/table.doc.d.ts +18 -0
- package/dist/docs/components/table.doc.js +46 -0
- package/dist/docs/components/tabs.doc.d.ts +18 -0
- package/dist/docs/components/tabs.doc.js +39 -0
- package/dist/docs/components/tag.doc.d.ts +18 -0
- package/dist/docs/components/tag.doc.js +41 -0
- package/dist/docs/components/tao-provider.doc.d.ts +22 -0
- package/dist/docs/components/tao-provider.doc.js +60 -0
- package/dist/docs/components/textarea.doc.d.ts +17 -0
- package/dist/docs/components/textarea.doc.js +35 -0
- package/dist/docs/index.d.ts +2 -0
- package/dist/docs/index.js +1 -0
- package/dist/index.d.ts +35 -33
- package/dist/index.js +2 -0
- package/dist/provider/tao-provider.js +93 -49
- package/dist/theme/theme.css +46 -46
- package/dist/theme/tokens.d.ts +4 -0
- package/dist/theme/tokens.js +108 -0
- package/llms.txt +402 -45
- package/package.json +4 -1
|
@@ -5,7 +5,7 @@ import { useTaoConfig } from "../../provider/tao-provider.js";
|
|
|
5
5
|
import { cx } from "../../utils/semantic.js";
|
|
6
6
|
import "./tabs.css";
|
|
7
7
|
function Tabs(t0) {
|
|
8
|
-
const $ = c(
|
|
8
|
+
const $ = c(58);
|
|
9
9
|
const { items, activeKey: activeKeyProp, defaultActiveKey, onChange, size, variant: t1, destroyInactiveTabPane: t2, className, classNames, styles } = t0;
|
|
10
10
|
const variant = void 0 === t1 ? "line" : t1;
|
|
11
11
|
const destroyInactiveTabPane = void 0 === t2 ? false : t2;
|
|
@@ -29,6 +29,7 @@ function Tabs(t0) {
|
|
|
29
29
|
const tablistRef = useRef(null);
|
|
30
30
|
const [inkStyle, setInkStyle] = useState(null);
|
|
31
31
|
let t4;
|
|
32
|
+
let t5;
|
|
32
33
|
if ($[3] !== currentKey || $[4] !== variant) {
|
|
33
34
|
t4 = ()=>{
|
|
34
35
|
if ("line" !== variant) return;
|
|
@@ -40,25 +41,21 @@ function Tabs(t0) {
|
|
|
40
41
|
width: active.offsetWidth
|
|
41
42
|
});
|
|
42
43
|
};
|
|
43
|
-
$[3] = currentKey;
|
|
44
|
-
$[4] = variant;
|
|
45
|
-
$[5] = t4;
|
|
46
|
-
} else t4 = $[5];
|
|
47
|
-
let t5;
|
|
48
|
-
if ($[6] !== currentKey || $[7] !== items || $[8] !== variant) {
|
|
49
44
|
t5 = [
|
|
50
45
|
currentKey,
|
|
51
|
-
variant
|
|
52
|
-
items
|
|
46
|
+
variant
|
|
53
47
|
];
|
|
54
|
-
$[
|
|
55
|
-
$[
|
|
56
|
-
$[
|
|
57
|
-
$[
|
|
58
|
-
} else
|
|
48
|
+
$[3] = currentKey;
|
|
49
|
+
$[4] = variant;
|
|
50
|
+
$[5] = t4;
|
|
51
|
+
$[6] = t5;
|
|
52
|
+
} else {
|
|
53
|
+
t4 = $[5];
|
|
54
|
+
t5 = $[6];
|
|
55
|
+
}
|
|
59
56
|
useEffect(t4, t5);
|
|
60
57
|
let t6;
|
|
61
|
-
if ($[
|
|
58
|
+
if ($[7] !== currentKey || $[8] !== handleSelect || $[9] !== items) {
|
|
62
59
|
t6 = (e)=>{
|
|
63
60
|
const enabledItems = items.filter(_temp2);
|
|
64
61
|
const idx = enabledItems.findIndex((t_1)=>t_1.key === currentKey);
|
|
@@ -83,33 +80,33 @@ function Tabs(t0) {
|
|
|
83
80
|
btn?.focus();
|
|
84
81
|
}
|
|
85
82
|
};
|
|
86
|
-
$[
|
|
87
|
-
$[
|
|
88
|
-
$[
|
|
89
|
-
$[
|
|
90
|
-
} else t6 = $[
|
|
83
|
+
$[7] = currentKey;
|
|
84
|
+
$[8] = handleSelect;
|
|
85
|
+
$[9] = items;
|
|
86
|
+
$[10] = t6;
|
|
87
|
+
} else t6 = $[10];
|
|
91
88
|
const handleKeyDown = t6;
|
|
92
89
|
const t7 = classNames?.root;
|
|
93
90
|
let t8;
|
|
94
|
-
if ($[
|
|
91
|
+
if ($[11] !== className || $[12] !== t7) {
|
|
95
92
|
t8 = cx(t7, className);
|
|
96
|
-
$[
|
|
97
|
-
$[
|
|
98
|
-
$[
|
|
99
|
-
} else t8 = $[
|
|
93
|
+
$[11] = className;
|
|
94
|
+
$[12] = t7;
|
|
95
|
+
$[13] = t8;
|
|
96
|
+
} else t8 = $[13];
|
|
100
97
|
const t9 = styles?.root;
|
|
101
98
|
const t10 = classNames?.nav;
|
|
102
99
|
let t11;
|
|
103
|
-
if ($[
|
|
100
|
+
if ($[14] !== t10) {
|
|
104
101
|
t11 = cx(t10);
|
|
105
|
-
$[
|
|
106
|
-
$[
|
|
107
|
-
} else t11 = $[
|
|
102
|
+
$[14] = t10;
|
|
103
|
+
$[15] = t11;
|
|
104
|
+
} else t11 = $[15];
|
|
108
105
|
const t12 = styles?.nav;
|
|
109
106
|
let t13;
|
|
110
|
-
if ($[
|
|
107
|
+
if ($[16] !== classNames?.tab || $[17] !== currentKey || $[18] !== handleSelect || $[19] !== items || $[20] !== styles?.tab) {
|
|
111
108
|
let t14;
|
|
112
|
-
if ($[
|
|
109
|
+
if ($[22] !== classNames?.tab || $[23] !== currentKey || $[24] !== handleSelect || $[25] !== styles?.tab) {
|
|
113
110
|
t14 = (item)=>{
|
|
114
111
|
const isActive = item.key === currentKey;
|
|
115
112
|
return /*#__PURE__*/ jsx("button", {
|
|
@@ -130,22 +127,22 @@ function Tabs(t0) {
|
|
|
130
127
|
children: item.label
|
|
131
128
|
}, item.key);
|
|
132
129
|
};
|
|
133
|
-
$[
|
|
134
|
-
$[
|
|
135
|
-
$[
|
|
136
|
-
$[
|
|
137
|
-
$[
|
|
138
|
-
} else t14 = $[
|
|
130
|
+
$[22] = classNames?.tab;
|
|
131
|
+
$[23] = currentKey;
|
|
132
|
+
$[24] = handleSelect;
|
|
133
|
+
$[25] = styles?.tab;
|
|
134
|
+
$[26] = t14;
|
|
135
|
+
} else t14 = $[26];
|
|
139
136
|
t13 = items.map(t14);
|
|
140
|
-
$[
|
|
141
|
-
$[
|
|
142
|
-
$[
|
|
143
|
-
$[
|
|
144
|
-
$[
|
|
145
|
-
$[
|
|
146
|
-
} else t13 = $[
|
|
137
|
+
$[16] = classNames?.tab;
|
|
138
|
+
$[17] = currentKey;
|
|
139
|
+
$[18] = handleSelect;
|
|
140
|
+
$[19] = items;
|
|
141
|
+
$[20] = styles?.tab;
|
|
142
|
+
$[21] = t13;
|
|
143
|
+
} else t13 = $[21];
|
|
147
144
|
let t14;
|
|
148
|
-
if ($[
|
|
145
|
+
if ($[27] !== classNames?.indicator || $[28] !== inkStyle || $[29] !== styles?.indicator || $[30] !== variant) {
|
|
149
146
|
t14 = "line" === variant && inkStyle && /*#__PURE__*/ jsx("span", {
|
|
150
147
|
"data-tao-tabs-ink": "",
|
|
151
148
|
style: {
|
|
@@ -155,14 +152,14 @@ function Tabs(t0) {
|
|
|
155
152
|
},
|
|
156
153
|
className: cx(classNames?.indicator)
|
|
157
154
|
});
|
|
158
|
-
$[
|
|
159
|
-
$[
|
|
160
|
-
$[
|
|
161
|
-
$[
|
|
162
|
-
$[
|
|
163
|
-
} else t14 = $[
|
|
155
|
+
$[27] = classNames?.indicator;
|
|
156
|
+
$[28] = inkStyle;
|
|
157
|
+
$[29] = styles?.indicator;
|
|
158
|
+
$[30] = variant;
|
|
159
|
+
$[31] = t14;
|
|
160
|
+
} else t14 = $[31];
|
|
164
161
|
let t15;
|
|
165
|
-
if ($[
|
|
162
|
+
if ($[32] !== handleKeyDown || $[33] !== t13 || $[34] !== t14) {
|
|
166
163
|
t15 = /*#__PURE__*/ jsxs("div", {
|
|
167
164
|
ref: tablistRef,
|
|
168
165
|
role: "tablist",
|
|
@@ -173,28 +170,28 @@ function Tabs(t0) {
|
|
|
173
170
|
t14
|
|
174
171
|
]
|
|
175
172
|
});
|
|
176
|
-
$[
|
|
177
|
-
$[
|
|
178
|
-
$[
|
|
179
|
-
$[
|
|
180
|
-
} else t15 = $[
|
|
173
|
+
$[32] = handleKeyDown;
|
|
174
|
+
$[33] = t13;
|
|
175
|
+
$[34] = t14;
|
|
176
|
+
$[35] = t15;
|
|
177
|
+
} else t15 = $[35];
|
|
181
178
|
let t16;
|
|
182
|
-
if ($[
|
|
179
|
+
if ($[36] !== t11 || $[37] !== t12 || $[38] !== t15) {
|
|
183
180
|
t16 = /*#__PURE__*/ jsx("div", {
|
|
184
181
|
"data-tao-tabs-nav": "",
|
|
185
182
|
className: t11,
|
|
186
183
|
style: t12,
|
|
187
184
|
children: t15
|
|
188
185
|
});
|
|
189
|
-
$[
|
|
190
|
-
$[
|
|
191
|
-
$[
|
|
192
|
-
$[
|
|
193
|
-
} else t16 = $[
|
|
186
|
+
$[36] = t11;
|
|
187
|
+
$[37] = t12;
|
|
188
|
+
$[38] = t15;
|
|
189
|
+
$[39] = t16;
|
|
190
|
+
} else t16 = $[39];
|
|
194
191
|
let t17;
|
|
195
|
-
if ($[
|
|
192
|
+
if ($[40] !== classNames?.panel || $[41] !== currentKey || $[42] !== destroyInactiveTabPane || $[43] !== items || $[44] !== styles?.panel) {
|
|
196
193
|
let t18;
|
|
197
|
-
if ($[
|
|
194
|
+
if ($[46] !== classNames?.panel || $[47] !== currentKey || $[48] !== destroyInactiveTabPane || $[49] !== styles?.panel) {
|
|
198
195
|
t18 = (item_0)=>{
|
|
199
196
|
const isActive_0 = item_0.key === currentKey;
|
|
200
197
|
if (destroyInactiveTabPane && !isActive_0) return null;
|
|
@@ -210,22 +207,22 @@ function Tabs(t0) {
|
|
|
210
207
|
children: item_0.children
|
|
211
208
|
}, item_0.key);
|
|
212
209
|
};
|
|
213
|
-
$[
|
|
214
|
-
$[
|
|
215
|
-
$[
|
|
216
|
-
$[
|
|
217
|
-
$[
|
|
218
|
-
} else t18 = $[
|
|
210
|
+
$[46] = classNames?.panel;
|
|
211
|
+
$[47] = currentKey;
|
|
212
|
+
$[48] = destroyInactiveTabPane;
|
|
213
|
+
$[49] = styles?.panel;
|
|
214
|
+
$[50] = t18;
|
|
215
|
+
} else t18 = $[50];
|
|
219
216
|
t17 = items.map(t18);
|
|
220
|
-
$[
|
|
221
|
-
$[
|
|
222
|
-
$[
|
|
223
|
-
$[
|
|
224
|
-
$[
|
|
225
|
-
$[
|
|
226
|
-
} else t17 = $[
|
|
217
|
+
$[40] = classNames?.panel;
|
|
218
|
+
$[41] = currentKey;
|
|
219
|
+
$[42] = destroyInactiveTabPane;
|
|
220
|
+
$[43] = items;
|
|
221
|
+
$[44] = styles?.panel;
|
|
222
|
+
$[45] = t17;
|
|
223
|
+
} else t17 = $[45];
|
|
227
224
|
let t18;
|
|
228
|
-
if ($[
|
|
225
|
+
if ($[51] !== resolvedSize || $[52] !== t16 || $[53] !== t17 || $[54] !== t8 || $[55] !== t9 || $[56] !== variant) {
|
|
229
226
|
t18 = /*#__PURE__*/ jsxs("div", {
|
|
230
227
|
"data-tao-tabs": "",
|
|
231
228
|
"data-tao-variant": variant,
|
|
@@ -237,14 +234,14 @@ function Tabs(t0) {
|
|
|
237
234
|
t17
|
|
238
235
|
]
|
|
239
236
|
});
|
|
240
|
-
$[
|
|
241
|
-
$[
|
|
242
|
-
$[
|
|
243
|
-
$[
|
|
244
|
-
$[
|
|
245
|
-
$[
|
|
246
|
-
$[
|
|
247
|
-
} else t18 = $[
|
|
237
|
+
$[51] = resolvedSize;
|
|
238
|
+
$[52] = t16;
|
|
239
|
+
$[53] = t17;
|
|
240
|
+
$[54] = t8;
|
|
241
|
+
$[55] = t9;
|
|
242
|
+
$[56] = variant;
|
|
243
|
+
$[57] = t18;
|
|
244
|
+
} else t18 = $[57];
|
|
248
245
|
return t18;
|
|
249
246
|
}
|
|
250
247
|
function _temp2(t_0) {
|
|
@@ -10,7 +10,13 @@
|
|
|
10
10
|
|
|
11
11
|
[data-tao-textarea][data-tao-size="small"] textarea {
|
|
12
12
|
padding-inline: var(--tao-padding-xs);
|
|
13
|
-
padding-block: calc((
|
|
13
|
+
padding-block: calc((
|
|
14
|
+
var(--tao-control-height-sm) -
|
|
15
|
+
var(--tao-font-size-sm) *
|
|
16
|
+
var(--tao-line-height-sm)
|
|
17
|
+
) /
|
|
18
|
+
2 -
|
|
19
|
+
1px);
|
|
14
20
|
font-size: var(--tao-font-size-sm);
|
|
15
21
|
line-height: var(--tao-line-height-sm);
|
|
16
22
|
min-height: var(--tao-control-height-sm);
|
|
@@ -22,7 +28,13 @@
|
|
|
22
28
|
|
|
23
29
|
[data-tao-textarea][data-tao-size="medium"] textarea {
|
|
24
30
|
padding-inline: var(--tao-padding-sm);
|
|
25
|
-
padding-block: calc((
|
|
31
|
+
padding-block: calc((
|
|
32
|
+
var(--tao-control-height) -
|
|
33
|
+
var(--tao-font-size-base) *
|
|
34
|
+
var(--tao-line-height)
|
|
35
|
+
) /
|
|
36
|
+
2 -
|
|
37
|
+
1px);
|
|
26
38
|
font-size: var(--tao-font-size-base);
|
|
27
39
|
line-height: var(--tao-line-height);
|
|
28
40
|
min-height: var(--tao-control-height);
|
|
@@ -34,7 +46,13 @@
|
|
|
34
46
|
|
|
35
47
|
[data-tao-textarea][data-tao-size="large"] textarea {
|
|
36
48
|
padding-inline: var(--tao-padding-sm);
|
|
37
|
-
padding-block: calc((
|
|
49
|
+
padding-block: calc((
|
|
50
|
+
var(--tao-control-height-lg) -
|
|
51
|
+
var(--tao-font-size-lg) *
|
|
52
|
+
var(--tao-line-height-lg)
|
|
53
|
+
) /
|
|
54
|
+
2 -
|
|
55
|
+
1px);
|
|
38
56
|
font-size: var(--tao-font-size-lg);
|
|
39
57
|
line-height: var(--tao-line-height-lg);
|
|
40
58
|
min-height: var(--tao-control-height-lg);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export type ComponentDocCategory = 'Config' | 'Data Display' | 'Data Entry' | 'Feedback' | 'General' | 'Headless' | 'Layout' | 'Navigation';
|
|
2
|
+
export interface ComponentDocUsage {
|
|
3
|
+
description: string;
|
|
4
|
+
bestPractices?: string[];
|
|
5
|
+
avoid?: string[];
|
|
6
|
+
}
|
|
7
|
+
export interface ComponentDocProp {
|
|
8
|
+
name: string;
|
|
9
|
+
type: string;
|
|
10
|
+
description: string;
|
|
11
|
+
defaultValue?: string;
|
|
12
|
+
required?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface ComponentDoc {
|
|
15
|
+
name: string;
|
|
16
|
+
displayName: string;
|
|
17
|
+
category: ComponentDocCategory;
|
|
18
|
+
description: string;
|
|
19
|
+
exports: string[];
|
|
20
|
+
source: string;
|
|
21
|
+
story?: string;
|
|
22
|
+
tests: string[];
|
|
23
|
+
semanticParts?: string[];
|
|
24
|
+
keywords?: string[];
|
|
25
|
+
related?: string[];
|
|
26
|
+
usage: ComponentDocUsage;
|
|
27
|
+
props?: ComponentDocProp[];
|
|
28
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import type { ComponentDoc } from './component-doc';
|
|
2
|
+
export declare const componentDocs: ({
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
category: "General";
|
|
6
|
+
description: string;
|
|
7
|
+
exports: string[];
|
|
8
|
+
source: string;
|
|
9
|
+
story: string;
|
|
10
|
+
tests: string[];
|
|
11
|
+
semanticParts: string[];
|
|
12
|
+
keywords: string[];
|
|
13
|
+
related: string[];
|
|
14
|
+
usage: {
|
|
15
|
+
description: string;
|
|
16
|
+
bestPractices: string[];
|
|
17
|
+
avoid: string[];
|
|
18
|
+
};
|
|
19
|
+
props: ({
|
|
20
|
+
name: string;
|
|
21
|
+
type: string;
|
|
22
|
+
description: string;
|
|
23
|
+
defaultValue: string;
|
|
24
|
+
} | {
|
|
25
|
+
name: string;
|
|
26
|
+
type: string;
|
|
27
|
+
description: string;
|
|
28
|
+
defaultValue?: undefined;
|
|
29
|
+
})[];
|
|
30
|
+
} | {
|
|
31
|
+
name: string;
|
|
32
|
+
displayName: string;
|
|
33
|
+
category: "Feedback";
|
|
34
|
+
description: string;
|
|
35
|
+
exports: string[];
|
|
36
|
+
source: string;
|
|
37
|
+
story: string;
|
|
38
|
+
tests: string[];
|
|
39
|
+
semanticParts: string[];
|
|
40
|
+
keywords: string[];
|
|
41
|
+
related: string[];
|
|
42
|
+
usage: {
|
|
43
|
+
description: string;
|
|
44
|
+
bestPractices: string[];
|
|
45
|
+
avoid: string[];
|
|
46
|
+
};
|
|
47
|
+
} | {
|
|
48
|
+
name: string;
|
|
49
|
+
displayName: string;
|
|
50
|
+
category: "Data Entry";
|
|
51
|
+
description: string;
|
|
52
|
+
exports: string[];
|
|
53
|
+
source: string;
|
|
54
|
+
story: string;
|
|
55
|
+
tests: string[];
|
|
56
|
+
semanticParts: string[];
|
|
57
|
+
keywords: string[];
|
|
58
|
+
related: string[];
|
|
59
|
+
usage: {
|
|
60
|
+
description: string;
|
|
61
|
+
bestPractices: string[];
|
|
62
|
+
};
|
|
63
|
+
} | {
|
|
64
|
+
name: string;
|
|
65
|
+
displayName: string;
|
|
66
|
+
category: "Layout";
|
|
67
|
+
description: string;
|
|
68
|
+
exports: string[];
|
|
69
|
+
source: string;
|
|
70
|
+
story: string;
|
|
71
|
+
tests: string[];
|
|
72
|
+
keywords: string[];
|
|
73
|
+
related: string[];
|
|
74
|
+
usage: {
|
|
75
|
+
description: string;
|
|
76
|
+
bestPractices: string[];
|
|
77
|
+
};
|
|
78
|
+
} | {
|
|
79
|
+
name: string;
|
|
80
|
+
displayName: string;
|
|
81
|
+
category: "Headless";
|
|
82
|
+
description: string;
|
|
83
|
+
exports: string[];
|
|
84
|
+
source: string;
|
|
85
|
+
story: string;
|
|
86
|
+
tests: string[];
|
|
87
|
+
keywords: string[];
|
|
88
|
+
related: string[];
|
|
89
|
+
usage: {
|
|
90
|
+
description: string;
|
|
91
|
+
bestPractices: string[];
|
|
92
|
+
};
|
|
93
|
+
} | {
|
|
94
|
+
name: string;
|
|
95
|
+
displayName: string;
|
|
96
|
+
category: "Navigation";
|
|
97
|
+
description: string;
|
|
98
|
+
exports: string[];
|
|
99
|
+
source: string;
|
|
100
|
+
story: string;
|
|
101
|
+
tests: string[];
|
|
102
|
+
semanticParts: string[];
|
|
103
|
+
keywords: string[];
|
|
104
|
+
related: string[];
|
|
105
|
+
usage: {
|
|
106
|
+
description: string;
|
|
107
|
+
bestPractices: string[];
|
|
108
|
+
};
|
|
109
|
+
} | {
|
|
110
|
+
name: string;
|
|
111
|
+
displayName: string;
|
|
112
|
+
category: "Data Display";
|
|
113
|
+
description: string;
|
|
114
|
+
exports: string[];
|
|
115
|
+
source: string;
|
|
116
|
+
story: string;
|
|
117
|
+
tests: string[];
|
|
118
|
+
semanticParts: string[];
|
|
119
|
+
keywords: string[];
|
|
120
|
+
related: string[];
|
|
121
|
+
usage: {
|
|
122
|
+
description: string;
|
|
123
|
+
bestPractices: string[];
|
|
124
|
+
};
|
|
125
|
+
} | {
|
|
126
|
+
name: string;
|
|
127
|
+
displayName: string;
|
|
128
|
+
category: "Config";
|
|
129
|
+
description: string;
|
|
130
|
+
exports: string[];
|
|
131
|
+
source: string;
|
|
132
|
+
story: string;
|
|
133
|
+
tests: string[];
|
|
134
|
+
keywords: string[];
|
|
135
|
+
related: string[];
|
|
136
|
+
usage: {
|
|
137
|
+
description: string;
|
|
138
|
+
bestPractices: string[];
|
|
139
|
+
avoid: string[];
|
|
140
|
+
};
|
|
141
|
+
props: {
|
|
142
|
+
name: string;
|
|
143
|
+
type: string;
|
|
144
|
+
description: string;
|
|
145
|
+
}[];
|
|
146
|
+
})[];
|
|
147
|
+
export declare function getComponentDoc(name: string): ComponentDoc | undefined;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { breadcrumbDoc } from "./components/breadcrumb.doc.js";
|
|
2
|
+
import { buttonDoc } from "./components/button.doc.js";
|
|
3
|
+
import { checkboxDoc } from "./components/checkbox.doc.js";
|
|
4
|
+
import { collapsibleDoc } from "./components/collapsible.doc.js";
|
|
5
|
+
import { contextMenuDoc } from "./components/context-menu.doc.js";
|
|
6
|
+
import { datePickerDoc } from "./components/date-picker.doc.js";
|
|
7
|
+
import { drawerDoc } from "./components/drawer.doc.js";
|
|
8
|
+
import { dropdownDoc } from "./components/dropdown.doc.js";
|
|
9
|
+
import { formActionsDoc } from "./components/form-actions.doc.js";
|
|
10
|
+
import { formFieldDoc } from "./components/form-field.doc.js";
|
|
11
|
+
import { formLayoutDoc } from "./components/form-layout.doc.js";
|
|
12
|
+
import { formSectionDoc } from "./components/form-section.doc.js";
|
|
13
|
+
import { headlessInputNumberDoc } from "./components/headless-input-number.doc.js";
|
|
14
|
+
import { inputDoc } from "./components/input.doc.js";
|
|
15
|
+
import { inputNumberDoc } from "./components/input-number.doc.js";
|
|
16
|
+
import { modalDoc } from "./components/modal.doc.js";
|
|
17
|
+
import { paginationDoc } from "./components/pagination.doc.js";
|
|
18
|
+
import { radioDoc } from "./components/radio.doc.js";
|
|
19
|
+
import { rangePickerDoc } from "./components/range-picker.doc.js";
|
|
20
|
+
import { scrollAreaDoc } from "./components/scroll-area.doc.js";
|
|
21
|
+
import { selectDoc } from "./components/select.doc.js";
|
|
22
|
+
import { spinnerDoc } from "./components/spinner.doc.js";
|
|
23
|
+
import { splitterDoc } from "./components/splitter.doc.js";
|
|
24
|
+
import { stackDoc } from "./components/stack.doc.js";
|
|
25
|
+
import { switchDoc } from "./components/switch.doc.js";
|
|
26
|
+
import { tableDoc } from "./components/table.doc.js";
|
|
27
|
+
import { tabsDoc } from "./components/tabs.doc.js";
|
|
28
|
+
import { tagDoc } from "./components/tag.doc.js";
|
|
29
|
+
import { taoProviderDoc } from "./components/tao-provider.doc.js";
|
|
30
|
+
import { textareaDoc } from "./components/textarea.doc.js";
|
|
31
|
+
const componentDocs = [
|
|
32
|
+
breadcrumbDoc,
|
|
33
|
+
buttonDoc,
|
|
34
|
+
checkboxDoc,
|
|
35
|
+
collapsibleDoc,
|
|
36
|
+
contextMenuDoc,
|
|
37
|
+
datePickerDoc,
|
|
38
|
+
drawerDoc,
|
|
39
|
+
dropdownDoc,
|
|
40
|
+
formActionsDoc,
|
|
41
|
+
formFieldDoc,
|
|
42
|
+
formLayoutDoc,
|
|
43
|
+
formSectionDoc,
|
|
44
|
+
headlessInputNumberDoc,
|
|
45
|
+
inputDoc,
|
|
46
|
+
inputNumberDoc,
|
|
47
|
+
modalDoc,
|
|
48
|
+
paginationDoc,
|
|
49
|
+
radioDoc,
|
|
50
|
+
rangePickerDoc,
|
|
51
|
+
scrollAreaDoc,
|
|
52
|
+
selectDoc,
|
|
53
|
+
spinnerDoc,
|
|
54
|
+
splitterDoc,
|
|
55
|
+
stackDoc,
|
|
56
|
+
switchDoc,
|
|
57
|
+
tableDoc,
|
|
58
|
+
tabsDoc,
|
|
59
|
+
tagDoc,
|
|
60
|
+
taoProviderDoc,
|
|
61
|
+
textareaDoc
|
|
62
|
+
];
|
|
63
|
+
function getComponentDoc(name) {
|
|
64
|
+
const normalizedName = name.toLowerCase();
|
|
65
|
+
return componentDocs.find((doc)=>{
|
|
66
|
+
if (doc.name.toLowerCase() === normalizedName) return true;
|
|
67
|
+
return doc.exports.some((exportName)=>exportName.toLowerCase() === normalizedName);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
export { componentDocs, getComponentDoc };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare const breadcrumbDoc: {
|
|
2
|
+
name: string;
|
|
3
|
+
displayName: string;
|
|
4
|
+
category: "Navigation";
|
|
5
|
+
description: string;
|
|
6
|
+
exports: string[];
|
|
7
|
+
source: string;
|
|
8
|
+
story: string;
|
|
9
|
+
tests: string[];
|
|
10
|
+
semanticParts: string[];
|
|
11
|
+
keywords: string[];
|
|
12
|
+
related: string[];
|
|
13
|
+
usage: {
|
|
14
|
+
description: string;
|
|
15
|
+
bestPractices: string[];
|
|
16
|
+
avoid: string[];
|
|
17
|
+
};
|
|
18
|
+
props: {
|
|
19
|
+
name: string;
|
|
20
|
+
type: string;
|
|
21
|
+
description: string;
|
|
22
|
+
}[];
|
|
23
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
const breadcrumbDoc = {
|
|
2
|
+
name: 'breadcrumb',
|
|
3
|
+
displayName: 'Breadcrumb',
|
|
4
|
+
category: 'Navigation',
|
|
5
|
+
description: 'Renders the user location in a hierarchy of pages or views.',
|
|
6
|
+
exports: [
|
|
7
|
+
'Breadcrumb'
|
|
8
|
+
],
|
|
9
|
+
source: 'src/components/breadcrumb/breadcrumb.tsx',
|
|
10
|
+
story: 'stories/breadcrumb.stories.tsx',
|
|
11
|
+
tests: [
|
|
12
|
+
'tests/breadcrumb/breadcrumb.test.tsx'
|
|
13
|
+
],
|
|
14
|
+
semanticParts: [
|
|
15
|
+
'root',
|
|
16
|
+
'list',
|
|
17
|
+
'item',
|
|
18
|
+
'link',
|
|
19
|
+
'separator'
|
|
20
|
+
],
|
|
21
|
+
keywords: [
|
|
22
|
+
'navigation',
|
|
23
|
+
'path',
|
|
24
|
+
'hierarchy'
|
|
25
|
+
],
|
|
26
|
+
related: [
|
|
27
|
+
'Tabs',
|
|
28
|
+
'Dropdown'
|
|
29
|
+
],
|
|
30
|
+
usage: {
|
|
31
|
+
description: 'Use Breadcrumb near the top of a page when users need to understand or move through nested context.',
|
|
32
|
+
bestPractices: [
|
|
33
|
+
'Keep labels short and recognizable.',
|
|
34
|
+
'Use links for ancestors and plain text for the current item.'
|
|
35
|
+
],
|
|
36
|
+
avoid: [
|
|
37
|
+
'Do not use Breadcrumb as primary navigation.'
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
props: [
|
|
41
|
+
{
|
|
42
|
+
name: 'items',
|
|
43
|
+
type: 'BreadcrumbItemType[]',
|
|
44
|
+
description: 'Ordered breadcrumb items.'
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'separator',
|
|
48
|
+
type: 'ReactNode',
|
|
49
|
+
description: 'Custom separator between items.'
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
};
|
|
53
|
+
export { breadcrumbDoc };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare const buttonDoc: {
|
|
2
|
+
name: string;
|
|
3
|
+
displayName: string;
|
|
4
|
+
category: "General";
|
|
5
|
+
description: string;
|
|
6
|
+
exports: string[];
|
|
7
|
+
source: string;
|
|
8
|
+
story: string;
|
|
9
|
+
tests: string[];
|
|
10
|
+
semanticParts: string[];
|
|
11
|
+
keywords: string[];
|
|
12
|
+
related: string[];
|
|
13
|
+
usage: {
|
|
14
|
+
description: string;
|
|
15
|
+
bestPractices: string[];
|
|
16
|
+
avoid: string[];
|
|
17
|
+
};
|
|
18
|
+
props: ({
|
|
19
|
+
name: string;
|
|
20
|
+
type: string;
|
|
21
|
+
description: string;
|
|
22
|
+
defaultValue: string;
|
|
23
|
+
} | {
|
|
24
|
+
name: string;
|
|
25
|
+
type: string;
|
|
26
|
+
description: string;
|
|
27
|
+
defaultValue?: undefined;
|
|
28
|
+
})[];
|
|
29
|
+
};
|