@rockshin/tao-ui 0.0.10 → 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.
Files changed (104) hide show
  1. package/component-manifest.json +764 -0
  2. package/dist/components/breadcrumb/breadcrumb.css +4 -0
  3. package/dist/components/breadcrumb/breadcrumb.js +8 -6
  4. package/dist/components/checkbox/checkbox.js +4 -0
  5. package/dist/components/date-picker/calendar/calendar-grid.js +21 -17
  6. package/dist/components/date-picker/calendar/calendar-header.js +8 -0
  7. package/dist/components/date-picker/calendar/month-grid.js +1 -1
  8. package/dist/components/date-picker/calendar/time-panel.js +36 -41
  9. package/dist/components/date-picker/date-picker.css +30 -16
  10. package/dist/components/date-picker/date-picker.js +240 -223
  11. package/dist/components/date-picker/range-picker.js +25 -2
  12. package/dist/components/drawer/drawer.js +2 -0
  13. package/dist/components/dropdown/dropdown.js +2 -1
  14. package/dist/components/menu/menu-render.js +6 -3
  15. package/dist/components/modal/confirm-dialog.js +9 -1
  16. package/dist/components/modal/modal.js +2 -0
  17. package/dist/components/pagination/pagination.js +56 -64
  18. package/dist/components/scroll-area/scroll-area.css +3 -0
  19. package/dist/components/scroll-area/scroll-area.js +6 -2
  20. package/dist/components/select/mobile-select.css +4 -0
  21. package/dist/components/select/mobile-select.js +9 -4
  22. package/dist/components/select/select.js +6 -0
  23. package/dist/components/spinner/spinner.js +2 -1
  24. package/dist/components/splitter/splitter.js +165 -149
  25. package/dist/components/switch/switch.js +2 -0
  26. package/dist/components/table/table.css +14 -0
  27. package/dist/components/table/table.js +14 -14
  28. package/dist/components/tabs/tabs.js +84 -87
  29. package/dist/components/tag/tag.js +1 -0
  30. package/dist/components/textarea/textarea.css +21 -3
  31. package/dist/docs/component-doc.d.ts +28 -0
  32. package/dist/docs/component-doc.js +0 -0
  33. package/dist/docs/component-docs.d.ts +147 -0
  34. package/dist/docs/component-docs.js +70 -0
  35. package/dist/docs/components/breadcrumb.doc.d.ts +23 -0
  36. package/dist/docs/components/breadcrumb.doc.js +53 -0
  37. package/dist/docs/components/button.doc.d.ts +29 -0
  38. package/dist/docs/components/button.doc.js +62 -0
  39. package/dist/docs/components/checkbox.doc.d.ts +23 -0
  40. package/dist/docs/components/checkbox.doc.js +60 -0
  41. package/dist/docs/components/collapsible.doc.d.ts +18 -0
  42. package/dist/docs/components/collapsible.doc.js +39 -0
  43. package/dist/docs/components/context-menu.doc.d.ts +18 -0
  44. package/dist/docs/components/context-menu.doc.js +40 -0
  45. package/dist/docs/components/date-picker.doc.d.ts +18 -0
  46. package/dist/docs/components/date-picker.doc.js +43 -0
  47. package/dist/docs/components/drawer.doc.d.ts +18 -0
  48. package/dist/docs/components/drawer.doc.js +42 -0
  49. package/dist/docs/components/dropdown.doc.d.ts +18 -0
  50. package/dist/docs/components/dropdown.doc.js +42 -0
  51. package/dist/docs/components/form-actions.doc.d.ts +17 -0
  52. package/dist/docs/components/form-actions.doc.js +35 -0
  53. package/dist/docs/components/form-field.doc.d.ts +17 -0
  54. package/dist/docs/components/form-field.doc.js +39 -0
  55. package/dist/docs/components/form-layout.doc.d.ts +16 -0
  56. package/dist/docs/components/form-layout.doc.js +31 -0
  57. package/dist/docs/components/form-section.doc.d.ts +17 -0
  58. package/dist/docs/components/form-section.doc.js +38 -0
  59. package/dist/docs/components/headless-input-number.doc.d.ts +16 -0
  60. package/dist/docs/components/headless-input-number.doc.js +36 -0
  61. package/dist/docs/components/input-number.doc.d.ts +18 -0
  62. package/dist/docs/components/input-number.doc.js +41 -0
  63. package/dist/docs/components/input.doc.d.ts +17 -0
  64. package/dist/docs/components/input.doc.js +38 -0
  65. package/dist/docs/components/modal.doc.d.ts +18 -0
  66. package/dist/docs/components/modal.doc.js +43 -0
  67. package/dist/docs/components/pagination.doc.d.ts +17 -0
  68. package/dist/docs/components/pagination.doc.js +37 -0
  69. package/dist/docs/components/radio.doc.d.ts +18 -0
  70. package/dist/docs/components/radio.doc.js +43 -0
  71. package/dist/docs/components/range-picker.doc.d.ts +17 -0
  72. package/dist/docs/components/range-picker.doc.js +39 -0
  73. package/dist/docs/components/scroll-area.doc.d.ts +17 -0
  74. package/dist/docs/components/scroll-area.doc.js +36 -0
  75. package/dist/docs/components/select.doc.d.ts +18 -0
  76. package/dist/docs/components/select.doc.js +43 -0
  77. package/dist/docs/components/spinner.doc.d.ts +18 -0
  78. package/dist/docs/components/spinner.doc.js +36 -0
  79. package/dist/docs/components/splitter.doc.d.ts +17 -0
  80. package/dist/docs/components/splitter.doc.js +36 -0
  81. package/dist/docs/components/stack.doc.d.ts +16 -0
  82. package/dist/docs/components/stack.doc.js +31 -0
  83. package/dist/docs/components/switch.doc.d.ts +17 -0
  84. package/dist/docs/components/switch.doc.js +35 -0
  85. package/dist/docs/components/table.doc.d.ts +18 -0
  86. package/dist/docs/components/table.doc.js +46 -0
  87. package/dist/docs/components/tabs.doc.d.ts +18 -0
  88. package/dist/docs/components/tabs.doc.js +39 -0
  89. package/dist/docs/components/tag.doc.d.ts +18 -0
  90. package/dist/docs/components/tag.doc.js +41 -0
  91. package/dist/docs/components/tao-provider.doc.d.ts +22 -0
  92. package/dist/docs/components/tao-provider.doc.js +60 -0
  93. package/dist/docs/components/textarea.doc.d.ts +17 -0
  94. package/dist/docs/components/textarea.doc.js +35 -0
  95. package/dist/docs/index.d.ts +2 -0
  96. package/dist/docs/index.js +1 -0
  97. package/dist/index.d.ts +35 -33
  98. package/dist/index.js +2 -0
  99. package/dist/provider/tao-provider.js +92 -49
  100. package/dist/theme/theme.css +46 -46
  101. package/dist/theme/tokens.d.ts +4 -0
  102. package/dist/theme/tokens.js +108 -0
  103. package/llms.txt +402 -45
  104. package/package.json +4 -1
package/llms.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  # @rockshin/tao-ui
2
2
 
3
- > A modern React 19 component library with semantic DOM customization and OKLCH-based theming. Every component exposes `classNames`/`styles` props to target internal parts by semantic name, and inherits `size`/`disabled`/`variant` from a `TaoProvider` whose theme is derived from a small OKLCH seed token set.
3
+ > A modern React 19 component library with semantic DOM customization and OKLCH-based theming.
4
4
 
5
5
  ## Install
6
6
 
@@ -8,61 +8,418 @@
8
8
  npm install @rockshin/tao-ui
9
9
  ```
10
10
 
11
- Peer dependencies: `react >=19`, `react-dom >=19`, `dayjs >=1.11` (only needed for `DatePicker`/`RangePicker`).
12
- Module format: ESM only. Types and CSS ship alongside the JS. **No manual CSS import required** — the package entry (`dist/index.js`) imports design tokens (`--tao-*`) and shared control states on load. This is preserved end-to-end via a `sideEffects` whitelist (`["**/*.css", "./dist/index.js", "./src/index.tsx"]`) so tree-shakers keep the CSS side effects while still eliminating unused component exports at the export granularity.
11
+ Peer dependencies: `react >=19`, `react-dom >=19`, `dayjs >=1.11`.
12
+ Import from the package root. The package entry imports tao-ui CSS side effects automatically.
13
13
 
14
- ## Core concepts
14
+ ## Core Concepts
15
15
 
16
- - **TaoProvider**: wrap the app once. Provides `size` (`'small' | 'medium' | 'large'`), `disabled`, and `variant` (`'outlined' | 'filled' | 'borderless'`) defaults to all descendants, plus theme tokens. A local prop on a component overrides the provider value. Hook: `useTaoConfig()`.
17
- - **Theming**: a small seed token set (`TaoSeedToken`) is expanded into a full theme. Pure-CSS-computable values use `calc()`/`color-mix()` with OKLCH; non-linear values (radius steps, font-size log scale, control heights) are computed in JS and injected by `TaoProvider`. CSS variables are prefixed `--tao-*`; data attributes are `data-tao-*`.
18
- - **Semantic DOM**: every component takes optional `classNames?: SemanticClassNames<Part>` and `styles?: SemanticStyles<Part>`, where `Part` is a component-specific union (e.g. `'root' | 'header' | 'body'`, dotted for nested parts like `'header.cell'`). The top-level `className` prop merges into the `root` part. Helper `cx` is exported.
16
+ - `TaoProvider` supplies size, disabled, variant, portal scope, and theme seed token defaults.
17
+ - Components expose semantic DOM customization through `classNames` and `styles` props.
18
+ - Theme tokens are CSS custom properties prefixed with `--tao-*`; use `tokenVar(name)` and `taoTokenNames` from the package root for typed token references.
19
+ - `componentDocs` and `getComponentDoc(name)` expose machine-readable component metadata.
19
20
 
20
- ## Usage
21
+ ## Component Groups
21
22
 
22
- ```tsx
23
- import { TaoProvider, Input, Select, Switch } from '@rockshin/tao-ui';
23
+ - Config: TaoProvider
24
+ - Data Display: Collapsible, ScrollArea, Table, Tag
25
+ - Data Entry: Checkbox, DatePicker, FormActions, FormField, FormSection, Input, InputNumber, Radio, RangePicker, Select, Switch, Textarea
26
+ - Feedback: Drawer, Modal, Spinner
27
+ - General: Button
28
+ - Headless: HeadlessInputNumber
29
+ - Layout: FormLayout, Splitter, Stack
30
+ - Navigation: Breadcrumb, ContextMenu, Dropdown, Pagination, Tabs
24
31
 
25
- function App() {
26
- return (
27
- <TaoProvider size="medium">
28
- <Input placeholder="Search" />
29
- <Select options={[{ label: 'A', value: 'a' }]} />
30
- <Switch defaultChecked />
31
- </TaoProvider>
32
- );
33
- }
32
+ ## Components
34
33
 
35
- // Style internal parts by semantic name:
36
- <Drawer classNames={{ root: 'd', header: 'd-h' }} styles={{ body: { padding: 24 } }} />
37
- ```
34
+ ### Breadcrumb
35
+
36
+ Renders the user location in a hierarchy of pages or views.
37
+
38
+ - Category: Navigation
39
+ - Exports: `Breadcrumb`
40
+ - Source: `src/components/breadcrumb/breadcrumb.tsx`
41
+ - Storybook: `stories/breadcrumb.stories.tsx`
42
+ - Tests: `tests/breadcrumb/breadcrumb.test.tsx`
43
+ - Semantic parts: `root`, `list`, `item`, `link`, `separator`
44
+
45
+ Use Breadcrumb near the top of a page when users need to understand or move through nested context.
46
+
47
+ ### Button
48
+
49
+ Triggers an immediate action such as submitting, saving, or opening a surface.
50
+
51
+ - Category: General
52
+ - Exports: `Button`
53
+ - Source: `src/components/button/button.tsx`
54
+ - Storybook: `stories/button.stories.tsx`
55
+ - Tests: `tests/button/button.test.tsx`
56
+ - Semantic parts: `root`
57
+
58
+ Use Button for explicit actions. It inherits size, disabled, and variant defaults from TaoProvider.
59
+
60
+ ### Checkbox
61
+
62
+ Selects one or more independent boolean options.
63
+
64
+ - Category: Data Entry
65
+ - Exports: `Checkbox`, `CheckboxGroup`
66
+ - Source: `src/components/checkbox/checkbox.tsx`
67
+ - Storybook: `stories/checkbox.stories.tsx`
68
+ - Tests: `tests/checkbox/checkbox.test.tsx`
69
+ - Semantic parts: `root`, `input`, `box`, `label`, `group`, `option`
70
+
71
+ Use Checkbox for independent choices, or CheckboxGroup when users can select multiple options from a set.
72
+
73
+ ### Collapsible
74
+
75
+ Shows and hides a region of content while keeping disclosure state accessible.
76
+
77
+ - Category: Data Display
78
+ - Exports: `Collapsible`
79
+ - Source: `src/components/collapsible/collapsible.tsx`
80
+ - Storybook: `stories/collapsible.stories.tsx`
81
+ - Tests: `tests/collapsible/collapsible.test.tsx`
82
+ - Semantic parts: `root`, `trigger`, `content`
83
+
84
+ Use Collapsible to hide secondary details while preserving a lightweight page layout.
85
+
86
+ ### ContextMenu
87
+
88
+ Displays contextual actions from a right click or long press interaction.
89
+
90
+ - Category: Navigation
91
+ - Exports: `ContextMenu`
92
+ - Source: `src/components/context-menu/context-menu.tsx`
93
+ - Storybook: `stories/context-menu.stories.tsx`
94
+ - Tests: `tests/context-menu/context-menu.test.tsx`
95
+ - Semantic parts: `root`, `trigger`, `content`, `item`, `separator`
96
+
97
+ Use ContextMenu for secondary actions attached to an object or region.
98
+
99
+ ### DatePicker
100
+
101
+ Lets users enter or choose a single date, with optional time selection.
102
+
103
+ - Category: Data Entry
104
+ - Exports: `DatePicker`
105
+ - Source: `src/components/date-picker/date-picker.tsx`
106
+ - Storybook: `stories/date-picker.stories.tsx`
107
+ - Tests: `tests/date-picker/date-picker.test.tsx`, `tests/date-picker/use-calendar.test.ts`
108
+ - Semantic parts: `root`, `input`, `popup`, `calendar`, `cell`, `footer`
109
+
110
+ Use DatePicker when free text date input would be error-prone or when users benefit from calendar context.
111
+
112
+ ### Drawer
113
+
114
+ Opens a side panel for related tasks without leaving the current page.
115
+
116
+ - Category: Feedback
117
+ - Exports: `Drawer`
118
+ - Source: `src/components/drawer/drawer.tsx`
119
+ - Storybook: `stories/drawer.stories.tsx`
120
+ - Tests: `tests/drawer/drawer.test.tsx`
121
+ - Semantic parts: `root`, `overlay`, `content`, `header`, `body`, `footer`, `close`
122
+
123
+ Use Drawer for inspection, editing, or supporting workflows that should stay connected to the current page.
124
+
125
+ ### Dropdown
126
+
127
+ Opens a menu of actions or navigation choices from a trigger.
128
+
129
+ - Category: Navigation
130
+ - Exports: `Dropdown`
131
+ - Source: `src/components/dropdown/dropdown.tsx`
132
+ - Storybook: `stories/dropdown.stories.tsx`
133
+ - Tests: `tests/dropdown/dropdown.test.tsx`
134
+ - Semantic parts: `root`, `trigger`, `content`, `item`, `group`, `divider`
135
+
136
+ Use Dropdown for compact action sets that do not need to stay visible.
137
+
138
+ ### FormActions
139
+
140
+ Lays out submit, cancel, and secondary actions for forms.
141
+
142
+ - Category: Data Entry
143
+ - Exports: `FormActions`
144
+ - Source: `src/components/form-actions/form-actions.tsx`
145
+ - Storybook: `stories/form.stories.tsx`
146
+ - Tests: `tests/form-actions/form-actions.test.tsx`
147
+ - Semantic parts: `root`
148
+
149
+ Use FormActions at the end of a form or section to align the final actions consistently.
150
+
151
+ ### FormField
152
+
153
+ Associates labels, help text, validation state, and controls.
154
+
155
+ - Category: Data Entry
156
+ - Exports: `FormField`
157
+ - Source: `src/components/form-field/form-field.tsx`
158
+ - Storybook: `stories/form.stories.tsx`
159
+ - Tests: `tests/form-field/form-field.test.tsx`
160
+ - Semantic parts: `root`, `label`, `control`, `description`, `error`
161
+
162
+ Use FormField to provide accessible labeling and status text around a single control.
163
+
164
+ ### FormLayout
165
+
166
+ Arranges form content with consistent label and control alignment.
167
+
168
+ - Category: Layout
169
+ - Exports: `FormLayout`
170
+ - Source: `src/layouts/form-layout/form-layout.tsx`
171
+ - Storybook: `stories/form-layout.stories.tsx`
172
+ - Tests: `tests/layouts/form-layout/form-layout.test.tsx`
173
+
174
+ Use FormLayout to keep dense forms aligned and predictable.
175
+
176
+ ### FormSection
177
+
178
+ Groups related form fields with a title and optional description.
179
+
180
+ - Category: Data Entry
181
+ - Exports: `FormSection`
182
+ - Source: `src/components/form-section/form-section.tsx`
183
+ - Storybook: `stories/form.stories.tsx`
184
+ - Tests: `tests/form-section/form-section.test.tsx`
185
+ - Semantic parts: `root`, `header`, `title`, `description`, `content`
186
+
187
+ Use FormSection to break long forms into scannable groups.
188
+
189
+ ### HeadlessInputNumber
190
+
191
+ Headless numeric input primitives and hook for custom number entry experiences.
192
+
193
+ - Category: Headless
194
+ - Exports: `HeadlessInputNumber`, `NumberInput`, `useNumberInput`
195
+ - Source: `src/number-input/number-input.tsx`
196
+ - Storybook: `stories/headless-input-number.stories.tsx`
197
+ - Tests: `tests/number-input/headless-input-number.test.tsx`, `tests/number-input/use-number-input.test.tsx`, `tests/number-input/format.test.ts`, `tests/number-input/validate.test.ts`
198
+
199
+ Use the headless API when tao-ui styling is not appropriate but number formatting behavior should stay consistent.
200
+
201
+ ### Input
202
+
203
+ Single-line text input for short freeform values.
204
+
205
+ - Category: Data Entry
206
+ - Exports: `Input`
207
+ - Source: `src/components/input/input.tsx`
208
+ - Storybook: `stories/input.stories.tsx`
209
+ - Tests: `tests/input/input.test.tsx`
210
+ - Semantic parts: `root`, `input`, `prefix`, `suffix`, `clear`
211
+
212
+ Use Input for short text values such as names, filters, search terms, and identifiers.
213
+
214
+ ### InputNumber
215
+
216
+ A styled numeric input built on tao-ui number formatting and validation behavior.
217
+
218
+ - Category: Data Entry
219
+ - Exports: `InputNumber`
220
+ - Source: `src/components/input-number/input-number.tsx`
221
+ - Storybook: `stories/input-number.stories.tsx`
222
+ - Tests: `tests/input-number/input-number.test.tsx`
223
+ - Semantic parts: `root`, `input`, `controls`, `increment`, `decrement`
224
+
225
+ Use InputNumber for numeric values that need min, max, step, precision, or formatted display.
226
+
227
+ ### Modal
228
+
229
+ Displays a focused dialog for decisions, forms, and interruptive information.
230
+
231
+ - Category: Feedback
232
+ - Exports: `Modal`
233
+ - Source: `src/components/modal/modal.tsx`
234
+ - Storybook: `stories/modal.stories.tsx`
235
+ - Tests: `tests/modal/modal.test.tsx`
236
+ - Semantic parts: `root`, `overlay`, `content`, `header`, `body`, `footer`, `close`
237
+
238
+ Use Modal for focused tasks or decisions. Static helpers such as Modal.confirm mirror common confirmation flows.
239
+
240
+ ### Pagination
241
+
242
+ Moves through paged data with current page and page-size controls.
243
+
244
+ - Category: Navigation
245
+ - Exports: `Pagination`
246
+ - Source: `src/components/pagination/pagination.tsx`
247
+ - Storybook: `stories/pagination.stories.tsx`
248
+ - Tests: `tests/pagination/pagination.test.tsx`
249
+ - Semantic parts: `root`, `item`, `prev`, `next`, `sizeChanger`
250
+
251
+ Use Pagination when a collection is split into pages rather than infinitely loaded.
252
+
253
+ ### Radio
254
+
255
+ Selects exactly one option from a mutually exclusive set.
256
+
257
+ - Category: Data Entry
258
+ - Exports: `Radio`, `RadioGroup`
259
+ - Source: `src/components/radio/radio.tsx`
260
+ - Storybook: `stories/radio.stories.tsx`
261
+ - Tests: `tests/radio/radio.test.tsx`
262
+ - Semantic parts: `root`, `input`, `indicator`, `label`, `group`, `option`
263
+
264
+ Use RadioGroup when every option is visible and only one can be selected.
265
+
266
+ ### RangePicker
267
+
268
+ Lets users select a start and end date as one range value.
269
+
270
+ - Category: Data Entry
271
+ - Exports: `RangePicker`
272
+ - Source: `src/components/date-picker/range-picker.tsx`
273
+ - Storybook: `stories/date-picker.stories.tsx`
274
+ - Tests: `tests/date-picker/range-picker.test.tsx`, `tests/date-picker/use-calendar.test.ts`
275
+ - Semantic parts: `root`, `input`, `popup`, `calendar`, `cell`, `footer`
276
+
277
+ Use RangePicker for reporting windows, booking windows, and filters with start/end dates.
278
+
279
+ ### ScrollArea
280
+
281
+ Provides a styled scroll container for overflow content.
282
+
283
+ - Category: Data Display
284
+ - Exports: `ScrollArea`
285
+ - Source: `src/components/scroll-area/scroll-area.tsx`
286
+ - Storybook: `stories/scroll-area.stories.tsx`
287
+ - Tests: `tests/scroll-area/scroll-area.test.tsx`
288
+ - Semantic parts: `root`, `viewport`, `scrollbar`, `thumb`
289
+
290
+ Use ScrollArea when a fixed region needs overflow behavior without changing page scroll.
291
+
292
+ ### Select
293
+
294
+ Chooses one value from a compact list of options.
295
+
296
+ - Category: Data Entry
297
+ - Exports: `Select`, `ChevronsUpDownIcon`
298
+ - Source: `src/components/select/select.tsx`
299
+ - Storybook: `stories/select.stories.tsx`
300
+ - Tests: `tests/select/select.test.tsx`
301
+ - Semantic parts: `root`, `trigger`, `value`, `content`, `item`, `empty`
302
+
303
+ Use Select when choices are known but too numerous or secondary to show as radios.
304
+
305
+ ### Spinner
306
+
307
+ Indicates indeterminate loading activity.
308
+
309
+ - Category: Feedback
310
+ - Exports: `Spinner`
311
+ - Source: `src/components/spinner/spinner.tsx`
312
+ - Storybook: `stories/spinner.stories.tsx`
313
+ - Tests: `tests/spinner/spinner.test.tsx`
314
+ - Semantic parts: `root`
315
+
316
+ Use Spinner for short indeterminate waits when progress cannot be measured.
317
+
318
+ ### Splitter
319
+
320
+ Creates resizable panes separated by draggable handles.
321
+
322
+ - Category: Layout
323
+ - Exports: `Splitter`
324
+ - Source: `src/components/splitter/splitter.tsx`
325
+ - Storybook: `stories/splitter.stories.tsx`
326
+ - Tests: `tests/splitter/splitter.test.tsx`
327
+ - Semantic parts: `root`, `panel`, `handle`
328
+
329
+ Use Splitter for work surfaces where users need to allocate space between adjacent panes.
330
+
331
+ ### Stack
332
+
333
+ Composes children in a flex row or column with consistent spacing.
334
+
335
+ - Category: Layout
336
+ - Exports: `Stack`
337
+ - Source: `src/layouts/stack/stack.tsx`
338
+ - Storybook: `stories/stack.stories.tsx`
339
+ - Tests: `tests/layouts/stack/stack.test.tsx`
340
+
341
+ Use Stack for simple one-dimensional layout and spacing.
342
+
343
+ ### Switch
344
+
345
+ Toggles a setting on or off with immediate effect.
346
+
347
+ - Category: Data Entry
348
+ - Exports: `Switch`
349
+ - Source: `src/components/switch/switch.tsx`
350
+ - Storybook: `stories/switch.stories.tsx`
351
+ - Tests: `tests/switch/switch.test.tsx`
352
+ - Semantic parts: `root`, `thumb`, `label`
353
+
354
+ Use Switch for settings that take effect immediately.
355
+
356
+ ### Table
357
+
358
+ Displays structured row and column data with selection, sorting, filtering, and pagination hooks.
359
+
360
+ - Category: Data Display
361
+ - Exports: `Table`
362
+ - Source: `src/components/table/table.tsx`
363
+ - Storybook: `stories/table.stories.tsx`
364
+ - Tests: `tests/table/table.test.tsx`
365
+ - Semantic parts: `root`, `table`, `header`, `header.cell`, `body`, `row`, `cell`, `pagination`
366
+
367
+ Use Table for dense, comparable records that benefit from aligned columns.
368
+
369
+ ### Tabs
370
+
371
+ Switches between peer panels within the same page context.
372
+
373
+ - Category: Navigation
374
+ - Exports: `Tabs`
375
+ - Source: `src/components/tabs/tabs.tsx`
376
+ - Storybook: `stories/tabs.stories.tsx`
377
+ - Tests: `tests/tabs/tabs.test.tsx`
378
+ - Semantic parts: `root`, `list`, `tab`, `panel`
379
+
380
+ Use Tabs to separate peer views without navigating away from the current task.
381
+
382
+ ### Tag
383
+
384
+ Displays compact labels, statuses, categories, or checkable chips.
385
+
386
+ - Category: Data Display
387
+ - Exports: `Tag`, `CheckableTag`
388
+ - Source: `src/components/tag/tag.tsx`
389
+ - Storybook: `stories/tag.stories.tsx`
390
+ - Tests: `tests/tag/tag.test.tsx`
391
+ - Semantic parts: `root`, `icon`, `close`
392
+
393
+ Use Tag for lightweight metadata or status markers. Use CheckableTag for compact filter choices.
394
+
395
+ ### TaoProvider
396
+
397
+ Provides global component defaults, portal scoping, and theme seed token overrides.
38
398
 
39
- ## Exported API
399
+ - Category: Config
400
+ - Exports: `TaoProvider`, `TaoPortalScope`
401
+ - Source: `src/provider/tao-provider.tsx`
402
+ - Storybook: `stories/provider.stories.tsx`
403
+ - Tests: `tests/provider/tao-provider.test.tsx`
40
404
 
41
- Provider & utilities:
42
- - `TaoProvider`, `useTaoConfig`
43
- - Types: `TaoProviderProps`, `TaoThemeConfig`, `TaoSeedToken`, `TaoSize`, `TaoVariant`
44
- - `cx`, types `SemanticClassNames<Part>`, `SemanticStyles<Part>`
405
+ Wrap an app or subtree with TaoProvider to set size, disabled, variant, and theme defaults.
45
406
 
46
- Components (each exports `<Name>Props` and, where applicable, `<Name>SemanticPart`):
47
- - General: `Button`
48
- - Layout: `Stack`, `FormLayout`, `Splitter` (+ `SplitterPanelProps`)
49
- - Navigation: `Tabs` (+ `TabItem`), `Pagination`, `Breadcrumb` (+ `BreadcrumbItemType`), `Dropdown` (+ `DropdownButtonProps`, `DropdownPlacement`, `DropdownTrigger`, and menu-config types `MenuProps`, `MenuItem`, `MenuItemType`, `MenuGroupType`, `MenuDividerType`), `ContextMenu`
50
- - Data Entry: `Input`, `Textarea` (+ `AutoSizeOptions`), `Select` (+ `SelectOption`), `Checkbox` / `CheckboxGroup` (+ `CheckboxOptionType`), `Radio` / `RadioGroup` (+ `RadioOptionType`), `Switch`, `DatePicker`, `RangePicker`, `FormField`, `FormSection`, `FormActions`
51
- - Data Display: `Table` (+ `TableColumn`, `TableRowSelection`, `TableFilterItem`, `TablePagination`, `SortOrder`, `SorterResult`), `Tag` / `CheckableTag` (+ `TagColor`, `TagVariant`), `ScrollArea` (+ `ScrollAreaType`), `Collapsible` (+ `CollapsibleTriggerProps`, `CollapsibleContentProps`)
52
- - Feedback: `Drawer` (+ `DrawerPlacement`, `DrawerSize`, `DrawerResizableConfig`), `Modal` (+ `ModalSemanticPart`; static helpers `Modal.confirm/info/success/error/warning`, hook `Modal.useModal()`, `Modal.destroyAll()`; types `ModalHookApi`, `ModalFuncProps`, `ModalFuncReturn`, `ModalFooterRender`, `ConfirmType`)
407
+ ### Textarea
53
408
 
54
- Headless:
55
- - `useNumberInput`, `NumberInput` (+ `NumberInputProps`, `UseNumberInputOptions`, `UseNumberInputReturn`, `FormatOptions`, `PadDecimalsOnBlur`)
409
+ Multi-line text input with optional auto sizing.
56
410
 
57
- ## Notes for code generation
411
+ - Category: Data Entry
412
+ - Exports: `Textarea`
413
+ - Source: `src/components/textarea/textarea.tsx`
414
+ - Storybook: `stories/textarea.stories.tsx`
415
+ - Tests: `tests/textarea/textarea.test.tsx`
416
+ - Semantic parts: `root`, `textarea`
58
417
 
59
- - Import everything from the package root `@rockshin/tao-ui`; there are no deep sub-path entry points.
60
- - Do not hand-write internal class names; customize via `classNames`/`styles` semantic parts.
61
- - Prefer setting `size`/`disabled`/`variant` on `TaoProvider` for app-wide defaults; override per-component only when needed.
62
- - `Modal` follows the antd pattern: render `<Modal open onCancel ...>` for controlled dialogs, or call `Modal.confirm({ title, onOk })` / `Modal.info|success|error|warning` for one-off dialogs. Inside components prefer `const [modal, contextHolder] = Modal.useModal()` (render `contextHolder`) so dialogs read the surrounding `TaoProvider` context.
63
- - Override theme by passing a partial seed to `TaoProvider`'s theme config rather than overriding `--tao-*` variables directly.
418
+ Use Textarea for longer freeform content such as descriptions, notes, and comments.
64
419
 
65
- ## Source
420
+ ## Notes For Code Generation
66
421
 
67
- - Repository: https://github.com/rickyshin93/tao-ui
68
- - License: MIT
422
+ - Prefer root imports from `@rockshin/tao-ui`.
423
+ - Customize internals through semantic `classNames` and `styles`, not private class names.
424
+ - Prefer provider-level defaults for app-wide size, disabled, variant, and theme choices.
425
+ - Use `Modal.useModal()` inside React components so dialogs inherit the surrounding provider context.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rockshin/tao-ui",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "type": "module",
5
5
  "description": "A modern React 19 component library with semantic DOM customization and OKLCH-based theming.",
6
6
  "keywords": [
@@ -34,16 +34,19 @@
34
34
  "types": "./dist/index.d.ts",
35
35
  "files": [
36
36
  "dist",
37
+ "component-manifest.json",
37
38
  "llms.txt"
38
39
  ],
39
40
  "scripts": {
40
41
  "build": "rslib",
41
42
  "build:storybook": "storybook build",
42
43
  "check": "biome check --write",
44
+ "check:components": "node scripts/check-component-sync.mjs",
43
45
  "dev": "rslib --watch",
44
46
  "doc": "rspress dev",
45
47
  "doc:build": "rspress build",
46
48
  "doc:preview": "rspress preview",
49
+ "docs:generate": "node scripts/generate-component-manifest.mjs",
47
50
  "format": "biome format --write",
48
51
  "release": "bun scripts/release.mjs",
49
52
  "storybook": "storybook dev",