@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.
Files changed (106) 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/form-field/form.css +0 -4
  15. package/dist/components/form-section/form-section.js +2 -2
  16. package/dist/components/menu/menu-render.js +6 -3
  17. package/dist/components/modal/confirm-dialog.js +9 -1
  18. package/dist/components/modal/modal.js +2 -0
  19. package/dist/components/pagination/pagination.js +56 -64
  20. package/dist/components/scroll-area/scroll-area.css +3 -0
  21. package/dist/components/scroll-area/scroll-area.js +6 -2
  22. package/dist/components/select/mobile-select.css +4 -0
  23. package/dist/components/select/mobile-select.js +9 -4
  24. package/dist/components/select/select.js +6 -0
  25. package/dist/components/spinner/spinner.js +2 -1
  26. package/dist/components/splitter/splitter.js +165 -149
  27. package/dist/components/switch/switch.js +2 -0
  28. package/dist/components/table/table.css +14 -0
  29. package/dist/components/table/table.js +14 -14
  30. package/dist/components/tabs/tabs.js +84 -87
  31. package/dist/components/tag/tag.js +1 -0
  32. package/dist/components/textarea/textarea.css +21 -3
  33. package/dist/docs/component-doc.d.ts +28 -0
  34. package/dist/docs/component-doc.js +0 -0
  35. package/dist/docs/component-docs.d.ts +147 -0
  36. package/dist/docs/component-docs.js +70 -0
  37. package/dist/docs/components/breadcrumb.doc.d.ts +23 -0
  38. package/dist/docs/components/breadcrumb.doc.js +53 -0
  39. package/dist/docs/components/button.doc.d.ts +29 -0
  40. package/dist/docs/components/button.doc.js +62 -0
  41. package/dist/docs/components/checkbox.doc.d.ts +23 -0
  42. package/dist/docs/components/checkbox.doc.js +60 -0
  43. package/dist/docs/components/collapsible.doc.d.ts +18 -0
  44. package/dist/docs/components/collapsible.doc.js +39 -0
  45. package/dist/docs/components/context-menu.doc.d.ts +18 -0
  46. package/dist/docs/components/context-menu.doc.js +40 -0
  47. package/dist/docs/components/date-picker.doc.d.ts +18 -0
  48. package/dist/docs/components/date-picker.doc.js +43 -0
  49. package/dist/docs/components/drawer.doc.d.ts +18 -0
  50. package/dist/docs/components/drawer.doc.js +42 -0
  51. package/dist/docs/components/dropdown.doc.d.ts +18 -0
  52. package/dist/docs/components/dropdown.doc.js +42 -0
  53. package/dist/docs/components/form-actions.doc.d.ts +17 -0
  54. package/dist/docs/components/form-actions.doc.js +35 -0
  55. package/dist/docs/components/form-field.doc.d.ts +17 -0
  56. package/dist/docs/components/form-field.doc.js +39 -0
  57. package/dist/docs/components/form-layout.doc.d.ts +16 -0
  58. package/dist/docs/components/form-layout.doc.js +31 -0
  59. package/dist/docs/components/form-section.doc.d.ts +17 -0
  60. package/dist/docs/components/form-section.doc.js +38 -0
  61. package/dist/docs/components/headless-input-number.doc.d.ts +16 -0
  62. package/dist/docs/components/headless-input-number.doc.js +36 -0
  63. package/dist/docs/components/input-number.doc.d.ts +18 -0
  64. package/dist/docs/components/input-number.doc.js +41 -0
  65. package/dist/docs/components/input.doc.d.ts +17 -0
  66. package/dist/docs/components/input.doc.js +38 -0
  67. package/dist/docs/components/modal.doc.d.ts +18 -0
  68. package/dist/docs/components/modal.doc.js +43 -0
  69. package/dist/docs/components/pagination.doc.d.ts +17 -0
  70. package/dist/docs/components/pagination.doc.js +37 -0
  71. package/dist/docs/components/radio.doc.d.ts +18 -0
  72. package/dist/docs/components/radio.doc.js +43 -0
  73. package/dist/docs/components/range-picker.doc.d.ts +17 -0
  74. package/dist/docs/components/range-picker.doc.js +39 -0
  75. package/dist/docs/components/scroll-area.doc.d.ts +17 -0
  76. package/dist/docs/components/scroll-area.doc.js +36 -0
  77. package/dist/docs/components/select.doc.d.ts +18 -0
  78. package/dist/docs/components/select.doc.js +43 -0
  79. package/dist/docs/components/spinner.doc.d.ts +18 -0
  80. package/dist/docs/components/spinner.doc.js +36 -0
  81. package/dist/docs/components/splitter.doc.d.ts +17 -0
  82. package/dist/docs/components/splitter.doc.js +36 -0
  83. package/dist/docs/components/stack.doc.d.ts +16 -0
  84. package/dist/docs/components/stack.doc.js +31 -0
  85. package/dist/docs/components/switch.doc.d.ts +17 -0
  86. package/dist/docs/components/switch.doc.js +35 -0
  87. package/dist/docs/components/table.doc.d.ts +18 -0
  88. package/dist/docs/components/table.doc.js +46 -0
  89. package/dist/docs/components/tabs.doc.d.ts +18 -0
  90. package/dist/docs/components/tabs.doc.js +39 -0
  91. package/dist/docs/components/tag.doc.d.ts +18 -0
  92. package/dist/docs/components/tag.doc.js +41 -0
  93. package/dist/docs/components/tao-provider.doc.d.ts +22 -0
  94. package/dist/docs/components/tao-provider.doc.js +60 -0
  95. package/dist/docs/components/textarea.doc.d.ts +17 -0
  96. package/dist/docs/components/textarea.doc.js +35 -0
  97. package/dist/docs/index.d.ts +2 -0
  98. package/dist/docs/index.js +1 -0
  99. package/dist/index.d.ts +35 -33
  100. package/dist/index.js +2 -0
  101. package/dist/provider/tao-provider.js +93 -49
  102. package/dist/theme/theme.css +46 -46
  103. package/dist/theme/tokens.d.ts +4 -0
  104. package/dist/theme/tokens.js +108 -0
  105. package/llms.txt +402 -45
  106. 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(61);
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
- $[6] = currentKey;
55
- $[7] = items;
56
- $[8] = variant;
57
- $[9] = t5;
58
- } else t5 = $[9];
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 ($[10] !== currentKey || $[11] !== handleSelect || $[12] !== items) {
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
- $[10] = currentKey;
87
- $[11] = handleSelect;
88
- $[12] = items;
89
- $[13] = t6;
90
- } else t6 = $[13];
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 ($[14] !== className || $[15] !== t7) {
91
+ if ($[11] !== className || $[12] !== t7) {
95
92
  t8 = cx(t7, className);
96
- $[14] = className;
97
- $[15] = t7;
98
- $[16] = t8;
99
- } else t8 = $[16];
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 ($[17] !== t10) {
100
+ if ($[14] !== t10) {
104
101
  t11 = cx(t10);
105
- $[17] = t10;
106
- $[18] = t11;
107
- } else t11 = $[18];
102
+ $[14] = t10;
103
+ $[15] = t11;
104
+ } else t11 = $[15];
108
105
  const t12 = styles?.nav;
109
106
  let t13;
110
- if ($[19] !== classNames?.tab || $[20] !== currentKey || $[21] !== handleSelect || $[22] !== items || $[23] !== styles?.tab) {
107
+ if ($[16] !== classNames?.tab || $[17] !== currentKey || $[18] !== handleSelect || $[19] !== items || $[20] !== styles?.tab) {
111
108
  let t14;
112
- if ($[25] !== classNames?.tab || $[26] !== currentKey || $[27] !== handleSelect || $[28] !== styles?.tab) {
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
- $[25] = classNames?.tab;
134
- $[26] = currentKey;
135
- $[27] = handleSelect;
136
- $[28] = styles?.tab;
137
- $[29] = t14;
138
- } else t14 = $[29];
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
- $[19] = classNames?.tab;
141
- $[20] = currentKey;
142
- $[21] = handleSelect;
143
- $[22] = items;
144
- $[23] = styles?.tab;
145
- $[24] = t13;
146
- } else t13 = $[24];
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 ($[30] !== classNames?.indicator || $[31] !== inkStyle || $[32] !== styles?.indicator || $[33] !== variant) {
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
- $[30] = classNames?.indicator;
159
- $[31] = inkStyle;
160
- $[32] = styles?.indicator;
161
- $[33] = variant;
162
- $[34] = t14;
163
- } else t14 = $[34];
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 ($[35] !== handleKeyDown || $[36] !== t13 || $[37] !== t14) {
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
- $[35] = handleKeyDown;
177
- $[36] = t13;
178
- $[37] = t14;
179
- $[38] = t15;
180
- } else t15 = $[38];
173
+ $[32] = handleKeyDown;
174
+ $[33] = t13;
175
+ $[34] = t14;
176
+ $[35] = t15;
177
+ } else t15 = $[35];
181
178
  let t16;
182
- if ($[39] !== t11 || $[40] !== t12 || $[41] !== t15) {
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
- $[39] = t11;
190
- $[40] = t12;
191
- $[41] = t15;
192
- $[42] = t16;
193
- } else t16 = $[42];
186
+ $[36] = t11;
187
+ $[37] = t12;
188
+ $[38] = t15;
189
+ $[39] = t16;
190
+ } else t16 = $[39];
194
191
  let t17;
195
- if ($[43] !== classNames?.panel || $[44] !== currentKey || $[45] !== destroyInactiveTabPane || $[46] !== items || $[47] !== styles?.panel) {
192
+ if ($[40] !== classNames?.panel || $[41] !== currentKey || $[42] !== destroyInactiveTabPane || $[43] !== items || $[44] !== styles?.panel) {
196
193
  let t18;
197
- if ($[49] !== classNames?.panel || $[50] !== currentKey || $[51] !== destroyInactiveTabPane || $[52] !== styles?.panel) {
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
- $[49] = classNames?.panel;
214
- $[50] = currentKey;
215
- $[51] = destroyInactiveTabPane;
216
- $[52] = styles?.panel;
217
- $[53] = t18;
218
- } else t18 = $[53];
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
- $[43] = classNames?.panel;
221
- $[44] = currentKey;
222
- $[45] = destroyInactiveTabPane;
223
- $[46] = items;
224
- $[47] = styles?.panel;
225
- $[48] = t17;
226
- } else t17 = $[48];
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 ($[54] !== resolvedSize || $[55] !== t16 || $[56] !== t17 || $[57] !== t8 || $[58] !== t9 || $[59] !== variant) {
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
- $[54] = resolvedSize;
241
- $[55] = t16;
242
- $[56] = t17;
243
- $[57] = t8;
244
- $[58] = t9;
245
- $[59] = variant;
246
- $[60] = t18;
247
- } else t18 = $[60];
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) {
@@ -12,6 +12,7 @@ function CloseIcon() {
12
12
  viewBox: "0 0 12 12",
13
13
  fill: "none",
14
14
  "aria-hidden": "true",
15
+ focusable: "false",
15
16
  role: "presentation",
16
17
  children: /*#__PURE__*/ jsx("path", {
17
18
  d: "M3 3l6 6M9 3l-6 6",
@@ -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((var(--tao-control-height-sm) - var(--tao-font-size-sm) * var(--tao-line-height-sm)) / 2 - 1px);
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((var(--tao-control-height) - var(--tao-font-size-base) * var(--tao-line-height)) / 2 - 1px);
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((var(--tao-control-height-lg) - var(--tao-font-size-lg) * var(--tao-line-height-lg)) / 2 - 1px);
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
+ };