@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
|
@@ -0,0 +1,764 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"packageName": "@rockshin/tao-ui",
|
|
4
|
+
"generatedAt": "2026-07-05T07:28:22.502Z",
|
|
5
|
+
"components": [
|
|
6
|
+
{
|
|
7
|
+
"name": "breadcrumb",
|
|
8
|
+
"displayName": "Breadcrumb",
|
|
9
|
+
"category": "Navigation",
|
|
10
|
+
"description": "Renders the user location in a hierarchy of pages or views.",
|
|
11
|
+
"exports": ["Breadcrumb"],
|
|
12
|
+
"source": "src/components/breadcrumb/breadcrumb.tsx",
|
|
13
|
+
"story": "stories/breadcrumb.stories.tsx",
|
|
14
|
+
"tests": ["tests/breadcrumb/breadcrumb.test.tsx"],
|
|
15
|
+
"semanticParts": ["root", "list", "item", "link", "separator"],
|
|
16
|
+
"keywords": ["navigation", "path", "hierarchy"],
|
|
17
|
+
"related": ["Tabs", "Dropdown"],
|
|
18
|
+
"usage": {
|
|
19
|
+
"description": "Use Breadcrumb near the top of a page when users need to understand or move through nested context.",
|
|
20
|
+
"bestPractices": [
|
|
21
|
+
"Keep labels short and recognizable.",
|
|
22
|
+
"Use links for ancestors and plain text for the current item."
|
|
23
|
+
],
|
|
24
|
+
"avoid": ["Do not use Breadcrumb as primary navigation."]
|
|
25
|
+
},
|
|
26
|
+
"props": [
|
|
27
|
+
{
|
|
28
|
+
"name": "items",
|
|
29
|
+
"type": "BreadcrumbItemType[]",
|
|
30
|
+
"description": "Ordered breadcrumb items."
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "separator",
|
|
34
|
+
"type": "ReactNode",
|
|
35
|
+
"description": "Custom separator between items."
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "button",
|
|
41
|
+
"displayName": "Button",
|
|
42
|
+
"category": "General",
|
|
43
|
+
"description": "Triggers an immediate action such as submitting, saving, or opening a surface.",
|
|
44
|
+
"exports": ["Button"],
|
|
45
|
+
"source": "src/components/button/button.tsx",
|
|
46
|
+
"story": "stories/button.stories.tsx",
|
|
47
|
+
"tests": ["tests/button/button.test.tsx"],
|
|
48
|
+
"semanticParts": ["root"],
|
|
49
|
+
"keywords": ["button", "action", "submit", "loading"],
|
|
50
|
+
"related": ["FormActions", "Modal"],
|
|
51
|
+
"usage": {
|
|
52
|
+
"description": "Use Button for explicit actions. It inherits size, disabled, and variant defaults from TaoProvider.",
|
|
53
|
+
"bestPractices": [
|
|
54
|
+
"Prefer one primary action per view or decision area.",
|
|
55
|
+
"Use loading when an action is pending.",
|
|
56
|
+
"Pass a native type when using a button inside a form."
|
|
57
|
+
],
|
|
58
|
+
"avoid": [
|
|
59
|
+
"Do not use Button for simple navigation when a link is more accurate."
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
"props": [
|
|
63
|
+
{
|
|
64
|
+
"name": "variant",
|
|
65
|
+
"type": "'primary' | 'secondary' | 'ghost' | 'destructive'",
|
|
66
|
+
"description": "Visual emphasis.",
|
|
67
|
+
"defaultValue": "'primary'"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"name": "size",
|
|
71
|
+
"type": "TaoSize",
|
|
72
|
+
"description": "Control size, falling back to TaoProvider."
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"name": "loading",
|
|
76
|
+
"type": "boolean",
|
|
77
|
+
"description": "Disables the button and sets aria-busy."
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"name": "classNames",
|
|
81
|
+
"type": "SemanticClassNames<'root'>",
|
|
82
|
+
"description": "Semantic class override."
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"name": "checkbox",
|
|
88
|
+
"displayName": "Checkbox",
|
|
89
|
+
"category": "Data Entry",
|
|
90
|
+
"description": "Selects one or more independent boolean options.",
|
|
91
|
+
"exports": ["Checkbox", "CheckboxGroup"],
|
|
92
|
+
"source": "src/components/checkbox/checkbox.tsx",
|
|
93
|
+
"story": "stories/checkbox.stories.tsx",
|
|
94
|
+
"tests": ["tests/checkbox/checkbox.test.tsx"],
|
|
95
|
+
"semanticParts": ["root", "input", "box", "label", "group", "option"],
|
|
96
|
+
"keywords": ["checkbox", "boolean", "multi select"],
|
|
97
|
+
"related": ["Radio", "Switch"],
|
|
98
|
+
"usage": {
|
|
99
|
+
"description": "Use Checkbox for independent choices, or CheckboxGroup when users can select multiple options from a set.",
|
|
100
|
+
"bestPractices": [
|
|
101
|
+
"Use clear labels that describe the checked state.",
|
|
102
|
+
"Group related options with CheckboxGroup."
|
|
103
|
+
],
|
|
104
|
+
"avoid": [
|
|
105
|
+
"Do not use CheckboxGroup when only one option may be selected; use RadioGroup instead."
|
|
106
|
+
]
|
|
107
|
+
},
|
|
108
|
+
"props": [
|
|
109
|
+
{
|
|
110
|
+
"name": "checked",
|
|
111
|
+
"type": "boolean",
|
|
112
|
+
"description": "Controlled checked state."
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"name": "options",
|
|
116
|
+
"type": "CheckboxOptionType[]",
|
|
117
|
+
"description": "Options for CheckboxGroup."
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"name": "classNames",
|
|
121
|
+
"type": "SemanticClassNames<CheckboxSemanticPart>",
|
|
122
|
+
"description": "Semantic class overrides."
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"name": "collapsible",
|
|
128
|
+
"displayName": "Collapsible",
|
|
129
|
+
"category": "Data Display",
|
|
130
|
+
"description": "Shows and hides a region of content while keeping disclosure state accessible.",
|
|
131
|
+
"exports": ["Collapsible"],
|
|
132
|
+
"source": "src/components/collapsible/collapsible.tsx",
|
|
133
|
+
"story": "stories/collapsible.stories.tsx",
|
|
134
|
+
"tests": ["tests/collapsible/collapsible.test.tsx"],
|
|
135
|
+
"semanticParts": ["root", "trigger", "content"],
|
|
136
|
+
"keywords": ["accordion", "disclosure", "expand"],
|
|
137
|
+
"related": ["Drawer", "Tabs"],
|
|
138
|
+
"usage": {
|
|
139
|
+
"description": "Use Collapsible to hide secondary details while preserving a lightweight page layout.",
|
|
140
|
+
"bestPractices": [
|
|
141
|
+
"Make the trigger label describe the hidden content.",
|
|
142
|
+
"Use controlled open state when it must coordinate with other UI."
|
|
143
|
+
],
|
|
144
|
+
"avoid": [
|
|
145
|
+
"Do not hide required form inputs in a collapsed region without a clear cue."
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"name": "context-menu",
|
|
151
|
+
"displayName": "ContextMenu",
|
|
152
|
+
"category": "Navigation",
|
|
153
|
+
"description": "Displays contextual actions from a right click or long press interaction.",
|
|
154
|
+
"exports": ["ContextMenu"],
|
|
155
|
+
"source": "src/components/context-menu/context-menu.tsx",
|
|
156
|
+
"story": "stories/context-menu.stories.tsx",
|
|
157
|
+
"tests": ["tests/context-menu/context-menu.test.tsx"],
|
|
158
|
+
"semanticParts": ["root", "trigger", "content", "item", "separator"],
|
|
159
|
+
"keywords": ["menu", "right click", "actions"],
|
|
160
|
+
"related": ["Dropdown"],
|
|
161
|
+
"usage": {
|
|
162
|
+
"description": "Use ContextMenu for secondary actions attached to an object or region.",
|
|
163
|
+
"bestPractices": [
|
|
164
|
+
"Keep items short and action-oriented.",
|
|
165
|
+
"Provide another reachable path for critical actions."
|
|
166
|
+
],
|
|
167
|
+
"avoid": ["Do not put primary workflows only inside a context menu."]
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"name": "date-picker",
|
|
172
|
+
"displayName": "DatePicker",
|
|
173
|
+
"category": "Data Entry",
|
|
174
|
+
"description": "Lets users enter or choose a single date, with optional time selection.",
|
|
175
|
+
"exports": ["DatePicker"],
|
|
176
|
+
"source": "src/components/date-picker/date-picker.tsx",
|
|
177
|
+
"story": "stories/date-picker.stories.tsx",
|
|
178
|
+
"tests": [
|
|
179
|
+
"tests/date-picker/date-picker.test.tsx",
|
|
180
|
+
"tests/date-picker/use-calendar.test.ts"
|
|
181
|
+
],
|
|
182
|
+
"semanticParts": ["root", "input", "popup", "calendar", "cell", "footer"],
|
|
183
|
+
"keywords": ["date", "calendar", "time"],
|
|
184
|
+
"related": ["RangePicker", "Input"],
|
|
185
|
+
"usage": {
|
|
186
|
+
"description": "Use DatePicker when free text date input would be error-prone or when users benefit from calendar context.",
|
|
187
|
+
"bestPractices": [
|
|
188
|
+
"Support keyboard entry for known dates.",
|
|
189
|
+
"Use presets for common relative choices when helpful."
|
|
190
|
+
],
|
|
191
|
+
"avoid": [
|
|
192
|
+
"Do not force calendar navigation for dates far in the past without typed input."
|
|
193
|
+
]
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"name": "drawer",
|
|
198
|
+
"displayName": "Drawer",
|
|
199
|
+
"category": "Feedback",
|
|
200
|
+
"description": "Opens a side panel for related tasks without leaving the current page.",
|
|
201
|
+
"exports": ["Drawer"],
|
|
202
|
+
"source": "src/components/drawer/drawer.tsx",
|
|
203
|
+
"story": "stories/drawer.stories.tsx",
|
|
204
|
+
"tests": ["tests/drawer/drawer.test.tsx"],
|
|
205
|
+
"semanticParts": [
|
|
206
|
+
"root",
|
|
207
|
+
"overlay",
|
|
208
|
+
"content",
|
|
209
|
+
"header",
|
|
210
|
+
"body",
|
|
211
|
+
"footer",
|
|
212
|
+
"close"
|
|
213
|
+
],
|
|
214
|
+
"keywords": ["panel", "overlay", "side sheet"],
|
|
215
|
+
"related": ["Modal"],
|
|
216
|
+
"usage": {
|
|
217
|
+
"description": "Use Drawer for inspection, editing, or supporting workflows that should stay connected to the current page.",
|
|
218
|
+
"bestPractices": [
|
|
219
|
+
"Use a clear title and predictable close affordance.",
|
|
220
|
+
"Keep destructive confirmations in a dedicated confirmation step."
|
|
221
|
+
],
|
|
222
|
+
"avoid": ["Do not stack multiple drawers for a single workflow."]
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"name": "dropdown",
|
|
227
|
+
"displayName": "Dropdown",
|
|
228
|
+
"category": "Navigation",
|
|
229
|
+
"description": "Opens a menu of actions or navigation choices from a trigger.",
|
|
230
|
+
"exports": ["Dropdown"],
|
|
231
|
+
"source": "src/components/dropdown/dropdown.tsx",
|
|
232
|
+
"story": "stories/dropdown.stories.tsx",
|
|
233
|
+
"tests": ["tests/dropdown/dropdown.test.tsx"],
|
|
234
|
+
"semanticParts": [
|
|
235
|
+
"root",
|
|
236
|
+
"trigger",
|
|
237
|
+
"content",
|
|
238
|
+
"item",
|
|
239
|
+
"group",
|
|
240
|
+
"divider"
|
|
241
|
+
],
|
|
242
|
+
"keywords": ["menu", "actions", "more"],
|
|
243
|
+
"related": ["ContextMenu", "Select"],
|
|
244
|
+
"usage": {
|
|
245
|
+
"description": "Use Dropdown for compact action sets that do not need to stay visible.",
|
|
246
|
+
"bestPractices": [
|
|
247
|
+
"Order frequent actions first.",
|
|
248
|
+
"Use destructive styling only for destructive items."
|
|
249
|
+
],
|
|
250
|
+
"avoid": [
|
|
251
|
+
"Do not use Dropdown as a replacement for visible primary navigation."
|
|
252
|
+
]
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"name": "form-actions",
|
|
257
|
+
"displayName": "FormActions",
|
|
258
|
+
"category": "Data Entry",
|
|
259
|
+
"description": "Lays out submit, cancel, and secondary actions for forms.",
|
|
260
|
+
"exports": ["FormActions"],
|
|
261
|
+
"source": "src/components/form-actions/form-actions.tsx",
|
|
262
|
+
"story": "stories/form.stories.tsx",
|
|
263
|
+
"tests": ["tests/form-actions/form-actions.test.tsx"],
|
|
264
|
+
"semanticParts": ["root"],
|
|
265
|
+
"keywords": ["form", "actions", "submit"],
|
|
266
|
+
"related": ["Button", "FormField", "FormSection"],
|
|
267
|
+
"usage": {
|
|
268
|
+
"description": "Use FormActions at the end of a form or section to align the final actions consistently.",
|
|
269
|
+
"bestPractices": [
|
|
270
|
+
"Keep action order consistent across forms.",
|
|
271
|
+
"Use a single submit action unless the workflow truly branches."
|
|
272
|
+
]
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"name": "form-field",
|
|
277
|
+
"displayName": "FormField",
|
|
278
|
+
"category": "Data Entry",
|
|
279
|
+
"description": "Associates labels, help text, validation state, and controls.",
|
|
280
|
+
"exports": ["FormField"],
|
|
281
|
+
"source": "src/components/form-field/form-field.tsx",
|
|
282
|
+
"story": "stories/form.stories.tsx",
|
|
283
|
+
"tests": ["tests/form-field/form-field.test.tsx"],
|
|
284
|
+
"semanticParts": ["root", "label", "control", "description", "error"],
|
|
285
|
+
"keywords": ["form", "label", "validation"],
|
|
286
|
+
"related": ["Input", "Select", "FormSection"],
|
|
287
|
+
"usage": {
|
|
288
|
+
"description": "Use FormField to provide accessible labeling and status text around a single control.",
|
|
289
|
+
"bestPractices": [
|
|
290
|
+
"Connect every input with a visible label.",
|
|
291
|
+
"Keep validation copy specific and actionable."
|
|
292
|
+
]
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
"name": "form-layout",
|
|
297
|
+
"displayName": "FormLayout",
|
|
298
|
+
"category": "Layout",
|
|
299
|
+
"description": "Arranges form content with consistent label and control alignment.",
|
|
300
|
+
"exports": ["FormLayout"],
|
|
301
|
+
"source": "src/layouts/form-layout/form-layout.tsx",
|
|
302
|
+
"story": "stories/form-layout.stories.tsx",
|
|
303
|
+
"tests": ["tests/layouts/form-layout/form-layout.test.tsx"],
|
|
304
|
+
"keywords": ["form", "layout", "labels"],
|
|
305
|
+
"related": ["FormField", "FormSection"],
|
|
306
|
+
"usage": {
|
|
307
|
+
"description": "Use FormLayout to keep dense forms aligned and predictable.",
|
|
308
|
+
"bestPractices": [
|
|
309
|
+
"Use one layout strategy per form.",
|
|
310
|
+
"Prefer vertical layout on narrow screens."
|
|
311
|
+
]
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"name": "form-section",
|
|
316
|
+
"displayName": "FormSection",
|
|
317
|
+
"category": "Data Entry",
|
|
318
|
+
"description": "Groups related form fields with a title and optional description.",
|
|
319
|
+
"exports": ["FormSection"],
|
|
320
|
+
"source": "src/components/form-section/form-section.tsx",
|
|
321
|
+
"story": "stories/form.stories.tsx",
|
|
322
|
+
"tests": ["tests/form-section/form-section.test.tsx"],
|
|
323
|
+
"semanticParts": ["root", "header", "title", "description", "content"],
|
|
324
|
+
"keywords": ["form", "section", "group"],
|
|
325
|
+
"related": ["FormField", "FormLayout"],
|
|
326
|
+
"usage": {
|
|
327
|
+
"description": "Use FormSection to break long forms into scannable groups.",
|
|
328
|
+
"bestPractices": [
|
|
329
|
+
"Use headings that describe the group, not the control type.",
|
|
330
|
+
"Keep each section focused on one user decision area."
|
|
331
|
+
]
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
"name": "headless-input-number",
|
|
336
|
+
"displayName": "HeadlessInputNumber",
|
|
337
|
+
"category": "Headless",
|
|
338
|
+
"description": "Headless numeric input primitives and hook for custom number entry experiences.",
|
|
339
|
+
"exports": ["HeadlessInputNumber", "NumberInput", "useNumberInput"],
|
|
340
|
+
"source": "src/number-input/number-input.tsx",
|
|
341
|
+
"story": "stories/headless-input-number.stories.tsx",
|
|
342
|
+
"tests": [
|
|
343
|
+
"tests/number-input/headless-input-number.test.tsx",
|
|
344
|
+
"tests/number-input/use-number-input.test.tsx",
|
|
345
|
+
"tests/number-input/format.test.ts",
|
|
346
|
+
"tests/number-input/validate.test.ts"
|
|
347
|
+
],
|
|
348
|
+
"keywords": ["headless", "number", "formatting", "validation"],
|
|
349
|
+
"related": ["InputNumber"],
|
|
350
|
+
"usage": {
|
|
351
|
+
"description": "Use the headless API when tao-ui styling is not appropriate but number formatting behavior should stay consistent.",
|
|
352
|
+
"bestPractices": [
|
|
353
|
+
"Use useNumberInput for fully custom rendering.",
|
|
354
|
+
"Reuse the validation helpers for parity with the styled InputNumber."
|
|
355
|
+
]
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
"name": "input",
|
|
360
|
+
"displayName": "Input",
|
|
361
|
+
"category": "Data Entry",
|
|
362
|
+
"description": "Single-line text input for short freeform values.",
|
|
363
|
+
"exports": ["Input"],
|
|
364
|
+
"source": "src/components/input/input.tsx",
|
|
365
|
+
"story": "stories/input.stories.tsx",
|
|
366
|
+
"tests": ["tests/input/input.test.tsx"],
|
|
367
|
+
"semanticParts": ["root", "input", "prefix", "suffix", "clear"],
|
|
368
|
+
"keywords": ["text field", "input", "search"],
|
|
369
|
+
"related": ["Textarea", "FormField"],
|
|
370
|
+
"usage": {
|
|
371
|
+
"description": "Use Input for short text values such as names, filters, search terms, and identifiers.",
|
|
372
|
+
"bestPractices": [
|
|
373
|
+
"Pair with FormField for labels and validation.",
|
|
374
|
+
"Use type, inputMode, and autoComplete when applicable."
|
|
375
|
+
]
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
"name": "input-number",
|
|
380
|
+
"displayName": "InputNumber",
|
|
381
|
+
"category": "Data Entry",
|
|
382
|
+
"description": "A styled numeric input built on tao-ui number formatting and validation behavior.",
|
|
383
|
+
"exports": ["InputNumber"],
|
|
384
|
+
"source": "src/components/input-number/input-number.tsx",
|
|
385
|
+
"story": "stories/input-number.stories.tsx",
|
|
386
|
+
"tests": ["tests/input-number/input-number.test.tsx"],
|
|
387
|
+
"semanticParts": ["root", "input", "controls", "increment", "decrement"],
|
|
388
|
+
"keywords": ["number", "numeric", "stepper"],
|
|
389
|
+
"related": ["HeadlessInputNumber", "Input"],
|
|
390
|
+
"usage": {
|
|
391
|
+
"description": "Use InputNumber for numeric values that need min, max, step, precision, or formatted display.",
|
|
392
|
+
"bestPractices": [
|
|
393
|
+
"Set min and max when the domain is bounded.",
|
|
394
|
+
"Use the headless API when custom rendering is required."
|
|
395
|
+
],
|
|
396
|
+
"avoid": [
|
|
397
|
+
"Do not use a numeric input for identifiers such as account numbers."
|
|
398
|
+
]
|
|
399
|
+
}
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
"name": "modal",
|
|
403
|
+
"displayName": "Modal",
|
|
404
|
+
"category": "Feedback",
|
|
405
|
+
"description": "Displays a focused dialog for decisions, forms, and interruptive information.",
|
|
406
|
+
"exports": ["Modal"],
|
|
407
|
+
"source": "src/components/modal/modal.tsx",
|
|
408
|
+
"story": "stories/modal.stories.tsx",
|
|
409
|
+
"tests": ["tests/modal/modal.test.tsx"],
|
|
410
|
+
"semanticParts": [
|
|
411
|
+
"root",
|
|
412
|
+
"overlay",
|
|
413
|
+
"content",
|
|
414
|
+
"header",
|
|
415
|
+
"body",
|
|
416
|
+
"footer",
|
|
417
|
+
"close"
|
|
418
|
+
],
|
|
419
|
+
"keywords": ["dialog", "confirm", "overlay"],
|
|
420
|
+
"related": ["Drawer", "Button"],
|
|
421
|
+
"usage": {
|
|
422
|
+
"description": "Use Modal for focused tasks or decisions. Static helpers such as Modal.confirm mirror common confirmation flows.",
|
|
423
|
+
"bestPractices": [
|
|
424
|
+
"Prefer Modal.useModal inside React trees so dialogs inherit TaoProvider context.",
|
|
425
|
+
"Keep modal content short and task-oriented."
|
|
426
|
+
],
|
|
427
|
+
"avoid": ["Do not use nested modals for multi-step workflows."]
|
|
428
|
+
}
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
"name": "pagination",
|
|
432
|
+
"displayName": "Pagination",
|
|
433
|
+
"category": "Navigation",
|
|
434
|
+
"description": "Moves through paged data with current page and page-size controls.",
|
|
435
|
+
"exports": ["Pagination"],
|
|
436
|
+
"source": "src/components/pagination/pagination.tsx",
|
|
437
|
+
"story": "stories/pagination.stories.tsx",
|
|
438
|
+
"tests": ["tests/pagination/pagination.test.tsx"],
|
|
439
|
+
"semanticParts": ["root", "item", "prev", "next", "sizeChanger"],
|
|
440
|
+
"keywords": ["pages", "table", "navigation"],
|
|
441
|
+
"related": ["Table"],
|
|
442
|
+
"usage": {
|
|
443
|
+
"description": "Use Pagination when a collection is split into pages rather than infinitely loaded.",
|
|
444
|
+
"bestPractices": [
|
|
445
|
+
"Keep the current page controlled when data is loaded remotely.",
|
|
446
|
+
"Show total counts when they help users judge scope."
|
|
447
|
+
]
|
|
448
|
+
}
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
"name": "radio",
|
|
452
|
+
"displayName": "Radio",
|
|
453
|
+
"category": "Data Entry",
|
|
454
|
+
"description": "Selects exactly one option from a mutually exclusive set.",
|
|
455
|
+
"exports": ["Radio", "RadioGroup"],
|
|
456
|
+
"source": "src/components/radio/radio.tsx",
|
|
457
|
+
"story": "stories/radio.stories.tsx",
|
|
458
|
+
"tests": ["tests/radio/radio.test.tsx"],
|
|
459
|
+
"semanticParts": [
|
|
460
|
+
"root",
|
|
461
|
+
"input",
|
|
462
|
+
"indicator",
|
|
463
|
+
"label",
|
|
464
|
+
"group",
|
|
465
|
+
"option"
|
|
466
|
+
],
|
|
467
|
+
"keywords": ["radio", "single choice", "selection"],
|
|
468
|
+
"related": ["Checkbox", "SegmentedControl"],
|
|
469
|
+
"usage": {
|
|
470
|
+
"description": "Use RadioGroup when every option is visible and only one can be selected.",
|
|
471
|
+
"bestPractices": [
|
|
472
|
+
"Use concise labels.",
|
|
473
|
+
"Provide a default value when one option is recommended or required."
|
|
474
|
+
],
|
|
475
|
+
"avoid": [
|
|
476
|
+
"Do not use RadioGroup for very long option lists; use Select instead."
|
|
477
|
+
]
|
|
478
|
+
}
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
"name": "range-picker",
|
|
482
|
+
"displayName": "RangePicker",
|
|
483
|
+
"category": "Data Entry",
|
|
484
|
+
"description": "Lets users select a start and end date as one range value.",
|
|
485
|
+
"exports": ["RangePicker"],
|
|
486
|
+
"source": "src/components/date-picker/range-picker.tsx",
|
|
487
|
+
"story": "stories/date-picker.stories.tsx",
|
|
488
|
+
"tests": [
|
|
489
|
+
"tests/date-picker/range-picker.test.tsx",
|
|
490
|
+
"tests/date-picker/use-calendar.test.ts"
|
|
491
|
+
],
|
|
492
|
+
"semanticParts": ["root", "input", "popup", "calendar", "cell", "footer"],
|
|
493
|
+
"keywords": ["date range", "calendar", "time range"],
|
|
494
|
+
"related": ["DatePicker"],
|
|
495
|
+
"usage": {
|
|
496
|
+
"description": "Use RangePicker for reporting windows, booking windows, and filters with start/end dates.",
|
|
497
|
+
"bestPractices": [
|
|
498
|
+
"Use presets for common ranges such as today, this week, or last 30 days.",
|
|
499
|
+
"Make inclusive/exclusive range behavior clear when it matters."
|
|
500
|
+
]
|
|
501
|
+
}
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
"name": "scroll-area",
|
|
505
|
+
"displayName": "ScrollArea",
|
|
506
|
+
"category": "Data Display",
|
|
507
|
+
"description": "Provides a styled scroll container for overflow content.",
|
|
508
|
+
"exports": ["ScrollArea"],
|
|
509
|
+
"source": "src/components/scroll-area/scroll-area.tsx",
|
|
510
|
+
"story": "stories/scroll-area.stories.tsx",
|
|
511
|
+
"tests": ["tests/scroll-area/scroll-area.test.tsx"],
|
|
512
|
+
"semanticParts": ["root", "viewport", "scrollbar", "thumb"],
|
|
513
|
+
"keywords": ["scroll", "overflow", "viewport"],
|
|
514
|
+
"related": ["Table"],
|
|
515
|
+
"usage": {
|
|
516
|
+
"description": "Use ScrollArea when a fixed region needs overflow behavior without changing page scroll.",
|
|
517
|
+
"bestPractices": [
|
|
518
|
+
"Constrain height explicitly.",
|
|
519
|
+
"Avoid hiding important actions below a small scroll region."
|
|
520
|
+
]
|
|
521
|
+
}
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
"name": "select",
|
|
525
|
+
"displayName": "Select",
|
|
526
|
+
"category": "Data Entry",
|
|
527
|
+
"description": "Chooses one value from a compact list of options.",
|
|
528
|
+
"exports": ["Select", "ChevronsUpDownIcon"],
|
|
529
|
+
"source": "src/components/select/select.tsx",
|
|
530
|
+
"story": "stories/select.stories.tsx",
|
|
531
|
+
"tests": ["tests/select/select.test.tsx"],
|
|
532
|
+
"semanticParts": ["root", "trigger", "value", "content", "item", "empty"],
|
|
533
|
+
"keywords": ["select", "combobox", "options"],
|
|
534
|
+
"related": ["Dropdown", "Radio"],
|
|
535
|
+
"usage": {
|
|
536
|
+
"description": "Use Select when choices are known but too numerous or secondary to show as radios.",
|
|
537
|
+
"bestPractices": [
|
|
538
|
+
"Use RadioGroup when there are only a few important choices.",
|
|
539
|
+
"Keep option labels stable and easy to scan."
|
|
540
|
+
],
|
|
541
|
+
"avoid": ["Do not use Select for arbitrary text entry."]
|
|
542
|
+
}
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
"name": "spinner",
|
|
546
|
+
"displayName": "Spinner",
|
|
547
|
+
"category": "Feedback",
|
|
548
|
+
"description": "Indicates indeterminate loading activity.",
|
|
549
|
+
"exports": ["Spinner"],
|
|
550
|
+
"source": "src/components/spinner/spinner.tsx",
|
|
551
|
+
"story": "stories/spinner.stories.tsx",
|
|
552
|
+
"tests": ["tests/spinner/spinner.test.tsx"],
|
|
553
|
+
"semanticParts": ["root"],
|
|
554
|
+
"keywords": ["loading", "progress", "busy"],
|
|
555
|
+
"related": ["Button"],
|
|
556
|
+
"usage": {
|
|
557
|
+
"description": "Use Spinner for short indeterminate waits when progress cannot be measured.",
|
|
558
|
+
"bestPractices": [
|
|
559
|
+
"Prefer inline placement near the content that is loading.",
|
|
560
|
+
"Use aria labels for standalone spinners."
|
|
561
|
+
],
|
|
562
|
+
"avoid": ["Do not use Spinner for determinate progress."]
|
|
563
|
+
}
|
|
564
|
+
},
|
|
565
|
+
{
|
|
566
|
+
"name": "splitter",
|
|
567
|
+
"displayName": "Splitter",
|
|
568
|
+
"category": "Layout",
|
|
569
|
+
"description": "Creates resizable panes separated by draggable handles.",
|
|
570
|
+
"exports": ["Splitter"],
|
|
571
|
+
"source": "src/components/splitter/splitter.tsx",
|
|
572
|
+
"story": "stories/splitter.stories.tsx",
|
|
573
|
+
"tests": ["tests/splitter/splitter.test.tsx"],
|
|
574
|
+
"semanticParts": ["root", "panel", "handle"],
|
|
575
|
+
"keywords": ["resizable", "panes", "layout"],
|
|
576
|
+
"related": ["Stack", "FormLayout"],
|
|
577
|
+
"usage": {
|
|
578
|
+
"description": "Use Splitter for work surfaces where users need to allocate space between adjacent panes.",
|
|
579
|
+
"bestPractices": [
|
|
580
|
+
"Set sensible min sizes.",
|
|
581
|
+
"Persist sizes only when the layout is user-specific."
|
|
582
|
+
]
|
|
583
|
+
}
|
|
584
|
+
},
|
|
585
|
+
{
|
|
586
|
+
"name": "stack",
|
|
587
|
+
"displayName": "Stack",
|
|
588
|
+
"category": "Layout",
|
|
589
|
+
"description": "Composes children in a flex row or column with consistent spacing.",
|
|
590
|
+
"exports": ["Stack"],
|
|
591
|
+
"source": "src/layouts/stack/stack.tsx",
|
|
592
|
+
"story": "stories/stack.stories.tsx",
|
|
593
|
+
"tests": ["tests/layouts/stack/stack.test.tsx"],
|
|
594
|
+
"keywords": ["layout", "flex", "spacing"],
|
|
595
|
+
"related": ["Splitter", "FormLayout"],
|
|
596
|
+
"usage": {
|
|
597
|
+
"description": "Use Stack for simple one-dimensional layout and spacing.",
|
|
598
|
+
"bestPractices": [
|
|
599
|
+
"Prefer Stack over one-off margin rules for repeated spacing.",
|
|
600
|
+
"Use semantic containers when the layout has richer meaning."
|
|
601
|
+
]
|
|
602
|
+
}
|
|
603
|
+
},
|
|
604
|
+
{
|
|
605
|
+
"name": "switch",
|
|
606
|
+
"displayName": "Switch",
|
|
607
|
+
"category": "Data Entry",
|
|
608
|
+
"description": "Toggles a setting on or off with immediate effect.",
|
|
609
|
+
"exports": ["Switch"],
|
|
610
|
+
"source": "src/components/switch/switch.tsx",
|
|
611
|
+
"story": "stories/switch.stories.tsx",
|
|
612
|
+
"tests": ["tests/switch/switch.test.tsx"],
|
|
613
|
+
"semanticParts": ["root", "thumb", "label"],
|
|
614
|
+
"keywords": ["toggle", "setting", "boolean"],
|
|
615
|
+
"related": ["Checkbox"],
|
|
616
|
+
"usage": {
|
|
617
|
+
"description": "Use Switch for settings that take effect immediately.",
|
|
618
|
+
"bestPractices": [
|
|
619
|
+
"Use labels that describe the enabled state.",
|
|
620
|
+
"Use Checkbox when the value is submitted with a form."
|
|
621
|
+
]
|
|
622
|
+
}
|
|
623
|
+
},
|
|
624
|
+
{
|
|
625
|
+
"name": "table",
|
|
626
|
+
"displayName": "Table",
|
|
627
|
+
"category": "Data Display",
|
|
628
|
+
"description": "Displays structured row and column data with selection, sorting, filtering, and pagination hooks.",
|
|
629
|
+
"exports": ["Table"],
|
|
630
|
+
"source": "src/components/table/table.tsx",
|
|
631
|
+
"story": "stories/table.stories.tsx",
|
|
632
|
+
"tests": ["tests/table/table.test.tsx"],
|
|
633
|
+
"semanticParts": [
|
|
634
|
+
"root",
|
|
635
|
+
"table",
|
|
636
|
+
"header",
|
|
637
|
+
"header.cell",
|
|
638
|
+
"body",
|
|
639
|
+
"row",
|
|
640
|
+
"cell",
|
|
641
|
+
"pagination"
|
|
642
|
+
],
|
|
643
|
+
"keywords": ["data grid", "rows", "columns", "sorting"],
|
|
644
|
+
"related": ["Pagination", "ScrollArea"],
|
|
645
|
+
"usage": {
|
|
646
|
+
"description": "Use Table for dense, comparable records that benefit from aligned columns.",
|
|
647
|
+
"bestPractices": [
|
|
648
|
+
"Keep columns focused on the task.",
|
|
649
|
+
"Use stable row keys.",
|
|
650
|
+
"Control sorting and pagination when data is remote."
|
|
651
|
+
],
|
|
652
|
+
"avoid": [
|
|
653
|
+
"Do not use Table for card-like content where comparison is not important."
|
|
654
|
+
]
|
|
655
|
+
}
|
|
656
|
+
},
|
|
657
|
+
{
|
|
658
|
+
"name": "tabs",
|
|
659
|
+
"displayName": "Tabs",
|
|
660
|
+
"category": "Navigation",
|
|
661
|
+
"description": "Switches between peer panels within the same page context.",
|
|
662
|
+
"exports": ["Tabs"],
|
|
663
|
+
"source": "src/components/tabs/tabs.tsx",
|
|
664
|
+
"story": "stories/tabs.stories.tsx",
|
|
665
|
+
"tests": ["tests/tabs/tabs.test.tsx"],
|
|
666
|
+
"semanticParts": ["root", "list", "tab", "panel"],
|
|
667
|
+
"keywords": ["tabs", "sections", "navigation"],
|
|
668
|
+
"related": ["Breadcrumb"],
|
|
669
|
+
"usage": {
|
|
670
|
+
"description": "Use Tabs to separate peer views without navigating away from the current task.",
|
|
671
|
+
"bestPractices": [
|
|
672
|
+
"Use short tab labels.",
|
|
673
|
+
"Keep tab panels at comparable hierarchy."
|
|
674
|
+
],
|
|
675
|
+
"avoid": ["Do not use Tabs for sequential steps."]
|
|
676
|
+
}
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
"name": "tag",
|
|
680
|
+
"displayName": "Tag",
|
|
681
|
+
"category": "Data Display",
|
|
682
|
+
"description": "Displays compact labels, statuses, categories, or checkable chips.",
|
|
683
|
+
"exports": ["Tag", "CheckableTag"],
|
|
684
|
+
"source": "src/components/tag/tag.tsx",
|
|
685
|
+
"story": "stories/tag.stories.tsx",
|
|
686
|
+
"tests": ["tests/tag/tag.test.tsx"],
|
|
687
|
+
"semanticParts": ["root", "icon", "close"],
|
|
688
|
+
"keywords": ["badge", "chip", "status", "label"],
|
|
689
|
+
"related": ["Checkbox", "Table"],
|
|
690
|
+
"usage": {
|
|
691
|
+
"description": "Use Tag for lightweight metadata or status markers. Use CheckableTag for compact filter choices.",
|
|
692
|
+
"bestPractices": [
|
|
693
|
+
"Use semantic colors consistently.",
|
|
694
|
+
"Keep tag text short."
|
|
695
|
+
],
|
|
696
|
+
"avoid": ["Do not encode critical state by color alone."]
|
|
697
|
+
}
|
|
698
|
+
},
|
|
699
|
+
{
|
|
700
|
+
"name": "tao-provider",
|
|
701
|
+
"displayName": "TaoProvider",
|
|
702
|
+
"category": "Config",
|
|
703
|
+
"description": "Provides global component defaults, portal scoping, and theme seed token overrides.",
|
|
704
|
+
"exports": ["TaoProvider", "TaoPortalScope"],
|
|
705
|
+
"source": "src/provider/tao-provider.tsx",
|
|
706
|
+
"story": "stories/provider.stories.tsx",
|
|
707
|
+
"tests": ["tests/provider/tao-provider.test.tsx"],
|
|
708
|
+
"keywords": ["provider", "theme", "tokens", "size", "disabled"],
|
|
709
|
+
"related": ["Button", "Input", "tokenVar"],
|
|
710
|
+
"usage": {
|
|
711
|
+
"description": "Wrap an app or subtree with TaoProvider to set size, disabled, variant, and theme defaults.",
|
|
712
|
+
"bestPractices": [
|
|
713
|
+
"Prefer provider-level defaults for app-wide decisions.",
|
|
714
|
+
"Use nested providers for scoped theme overrides."
|
|
715
|
+
],
|
|
716
|
+
"avoid": [
|
|
717
|
+
"Do not override derived CSS variables directly unless a theme token cannot express the change."
|
|
718
|
+
]
|
|
719
|
+
},
|
|
720
|
+
"props": [
|
|
721
|
+
{
|
|
722
|
+
"name": "size",
|
|
723
|
+
"type": "TaoSize",
|
|
724
|
+
"description": "Default component size for descendants."
|
|
725
|
+
},
|
|
726
|
+
{
|
|
727
|
+
"name": "disabled",
|
|
728
|
+
"type": "boolean",
|
|
729
|
+
"description": "Default disabled state for descendants."
|
|
730
|
+
},
|
|
731
|
+
{
|
|
732
|
+
"name": "variant",
|
|
733
|
+
"type": "TaoVariant",
|
|
734
|
+
"description": "Default field variant for descendants."
|
|
735
|
+
},
|
|
736
|
+
{
|
|
737
|
+
"name": "theme",
|
|
738
|
+
"type": "TaoThemeConfig",
|
|
739
|
+
"description": "Seed token overrides for the provider scope."
|
|
740
|
+
}
|
|
741
|
+
]
|
|
742
|
+
},
|
|
743
|
+
{
|
|
744
|
+
"name": "textarea",
|
|
745
|
+
"displayName": "Textarea",
|
|
746
|
+
"category": "Data Entry",
|
|
747
|
+
"description": "Multi-line text input with optional auto sizing.",
|
|
748
|
+
"exports": ["Textarea"],
|
|
749
|
+
"source": "src/components/textarea/textarea.tsx",
|
|
750
|
+
"story": "stories/textarea.stories.tsx",
|
|
751
|
+
"tests": ["tests/textarea/textarea.test.tsx"],
|
|
752
|
+
"semanticParts": ["root", "textarea"],
|
|
753
|
+
"keywords": ["textarea", "multiline", "input"],
|
|
754
|
+
"related": ["Input", "FormField"],
|
|
755
|
+
"usage": {
|
|
756
|
+
"description": "Use Textarea for longer freeform content such as descriptions, notes, and comments.",
|
|
757
|
+
"bestPractices": [
|
|
758
|
+
"Set rows or autoSize based on expected content length.",
|
|
759
|
+
"Use maxLength when limits are strict."
|
|
760
|
+
]
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
]
|
|
764
|
+
}
|