@chotot/clad-ui 3.0.0-next.1 → 3.0.0-next.3

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 (79) hide show
  1. package/README.md +43 -1
  2. package/ai/clad-ui-helper.js +267 -0
  3. package/ai/knowledge-base/README.md +154 -0
  4. package/ai/knowledge-base/clad-ui-database.json +9378 -0
  5. package/ai/knowledge-base/component-categories.json +616 -0
  6. package/ai/knowledge-base/components/metadata/charts-axis.json +31 -0
  7. package/ai/knowledge-base/components/metadata/charts-barchart.json +57 -0
  8. package/ai/knowledge-base/components/metadata/charts-basechart.tsx.json +31 -0
  9. package/ai/knowledge-base/components/metadata/charts-chartshared.json +31 -0
  10. package/ai/knowledge-base/components/metadata/charts-linechart.json +189 -0
  11. package/ai/knowledge-base/components/metadata/charts-piechart.json +57 -0
  12. package/ai/knowledge-base/components/metadata/components-announcer.json +215 -0
  13. package/ai/knowledge-base/components/metadata/components-badge.json +168 -0
  14. package/ai/knowledge-base/components/metadata/components-box.json +348 -0
  15. package/ai/knowledge-base/components/metadata/components-breadcrumbs.json +75 -0
  16. package/ai/knowledge-base/components/metadata/components-button.json +187 -0
  17. package/ai/knowledge-base/components/metadata/components-checkbox.json +161 -0
  18. package/ai/knowledge-base/components/metadata/components-chip.json +266 -0
  19. package/ai/knowledge-base/components/metadata/components-currencyinput.json +136 -0
  20. package/ai/knowledge-base/components/metadata/components-datepicker.json +87 -0
  21. package/ai/knowledge-base/components/metadata/components-dropdown.json +282 -0
  22. package/ai/knowledge-base/components/metadata/components-grid.json +92 -0
  23. package/ai/knowledge-base/components/metadata/components-input.json +432 -0
  24. package/ai/knowledge-base/components/metadata/components-pagination.json +111 -0
  25. package/ai/knowledge-base/components/metadata/components-popover.json +63 -0
  26. package/ai/knowledge-base/components/metadata/components-radiobutton.json +170 -0
  27. package/ai/knowledge-base/components/metadata/components-rowitem.json +281 -0
  28. package/ai/knowledge-base/components/metadata/components-shapeicon.json +139 -0
  29. package/ai/knowledge-base/components/metadata/components-slider.json +177 -0
  30. package/ai/knowledge-base/components/metadata/components-snack.json +181 -0
  31. package/ai/knowledge-base/components/metadata/components-tabs.json +169 -0
  32. package/ai/knowledge-base/components/metadata/components-textarea.json +285 -0
  33. package/ai/knowledge-base/components/metadata/components-textlabel.json +129 -0
  34. package/ai/knowledge-base/components/metadata/components-toggleswitch.json +134 -0
  35. package/ai/knowledge-base/components/metadata/components-tooltip.json +291 -0
  36. package/ai/knowledge-base/components/metadata/patterns-drawer.json +310 -0
  37. package/ai/knowledge-base/components/metadata/patterns-emptystate.json +106 -0
  38. package/ai/knowledge-base/components/metadata/patterns-inputgroup.json +105 -0
  39. package/ai/knowledge-base/components/metadata/patterns-legacydialog.json +177 -0
  40. package/ai/knowledge-base/components/metadata/patterns-legacypopup.json +236 -0
  41. package/ai/knowledge-base/components/metadata/patterns-multisearchdropdown.json +249 -0
  42. package/ai/knowledge-base/components/metadata/patterns-popup.json +268 -0
  43. package/ai/knowledge-base/components/metadata/patterns-rangeinput.json +105 -0
  44. package/ai/knowledge-base/components/metadata/patterns-searchbar.json +150 -0
  45. package/ai/knowledge-base/components/metadata/patterns-searchinput.json +312 -0
  46. package/ai/knowledge-base/components/metadata/patterns-tagcloud.json +244 -0
  47. package/ai/knowledge-base/components/metadata/summaries.json +610 -0
  48. package/ai/knowledge-base/design-tokens/tokens.json +483 -0
  49. package/ai/knowledge-base/patterns/documentation.json +131 -0
  50. package/ai/knowledge-base/prompts/common-system-prompt.md +592 -0
  51. package/ai/knowledge-base/prompts/figma-system-prompt.md +396 -0
  52. package/ai/knowledge-base/search-index/icons/asset-icons.json +1 -0
  53. package/ai/knowledge-base/search-index/icons/collection.json +5 -0
  54. package/ai/knowledge-base/search-index/icons/system-icons.json +1 -0
  55. package/ai/knowledge-base/search-index/search-index.json +899 -0
  56. package/ai/knowledge-base/validation-rules/component-rules.json +658 -0
  57. package/ai/skill/SKILL.md +103 -0
  58. package/dist/clad-ui.es.js +1110 -1098
  59. package/dist/components/Chip/Chip.d.ts +1 -1
  60. package/dist/components/Chip/Chip.d.ts.map +1 -1
  61. package/dist/components/Chip/Chip.styles.d.ts.map +1 -1
  62. package/dist/components/Input/Input.styles.d.ts.map +1 -1
  63. package/dist/components/RowItem/RowItem.styles.d.ts.map +1 -1
  64. package/dist/components/Snack/Snack.d.ts +9 -0
  65. package/dist/components/Snack/Snack.d.ts.map +1 -1
  66. package/dist/components/Snack/Snack.styles.d.ts +7 -1
  67. package/dist/components/Snack/Snack.styles.d.ts.map +1 -1
  68. package/dist/components/TextArea/TextArea.styles.d.ts.map +1 -1
  69. package/dist/patterns/Drawer/Drawer.d.ts +19 -10
  70. package/dist/patterns/Drawer/Drawer.d.ts.map +1 -1
  71. package/dist/patterns/Drawer/Drawer.styles.d.ts +1 -1
  72. package/dist/patterns/Drawer/Drawer.styles.d.ts.map +1 -1
  73. package/dist/patterns/MultiSearchDropdown/MultiSearchDropdown.d.ts.map +1 -1
  74. package/dist/patterns/MultiSearchDropdown/MultiSearchDropdown.styles.d.ts.map +1 -1
  75. package/dist/theme-chotot.css +1 -1
  76. package/dist/theme-job.css +1 -1
  77. package/dist/theme-pty.css +1 -1
  78. package/dist/theme-veh.css +1 -1
  79. package/package.json +8 -2
@@ -0,0 +1,150 @@
1
+ {
2
+ "metadata": {
3
+ "id": "patterns-searchbar",
4
+ "name": "Searchbar",
5
+ "category": "patterns",
6
+ "status": "stable",
7
+ "description": "Ref to the DOM node.",
8
+ "hasStories": true,
9
+ "version": "2.0.0",
10
+ "filePath": "packages/clad-ui/patterns/Searchbar/Searchbar.tsx",
11
+ "storyPath": "packages/clad-ui/patterns/Searchbar/Searchbar.stories.tsx",
12
+ "stability": "stable"
13
+ },
14
+ "usage": {
15
+ "importPath": "import { Searchbar } from 'clad-ui/patterns';",
16
+ "basicExample": "<Searchbar>Content</Searchbar>",
17
+ "commonPatterns": []
18
+ },
19
+ "props": [
20
+ {
21
+ "name": "ref",
22
+ "type": "ReactRef",
23
+ "required": false,
24
+ "description": ""
25
+ },
26
+ {
27
+ "name": "classNames",
28
+ "type": "ClassNames",
29
+ "required": false,
30
+ "description": ""
31
+ },
32
+ {
33
+ "name": "allowClear",
34
+ "type": "boolean",
35
+ "required": false,
36
+ "description": ""
37
+ },
38
+ {
39
+ "name": "defaultValue",
40
+ "type": "string",
41
+ "required": false,
42
+ "description": ""
43
+ }
44
+ ],
45
+ "variants": [
46
+ {
47
+ "name": "WithInitialValue",
48
+ "description": "WithInitialValue variant",
49
+ "props": {},
50
+ "example": "<Searchbar>Content</Searchbar>"
51
+ },
52
+ {
53
+ "name": "WithInitialValue",
54
+ "description": "WithInitialValue variant",
55
+ "props": {},
56
+ "example": "<Searchbar>Content</Searchbar>"
57
+ },
58
+ {
59
+ "name": "CustomPlaceholder",
60
+ "description": "CustomPlaceholder variant",
61
+ "props": {
62
+ "placeholder": "Search products, brands, categories..."
63
+ },
64
+ "example": "<Searchbar placeholder=\"Search products, brands, categories...\">Content</Searchbar>"
65
+ },
66
+ {
67
+ "name": "CustomPlaceholder",
68
+ "description": "CustomPlaceholder variant",
69
+ "props": {
70
+ "placeholder": "Search products, brands, categories..."
71
+ },
72
+ "example": "<Searchbar placeholder=\"Search products, brands, categories...\">Content</Searchbar>"
73
+ },
74
+ {
75
+ "name": "Disabled",
76
+ "description": "Disabled variant",
77
+ "props": {
78
+ "disabled": true,
79
+ "defaultValue": "Cannot edit this",
80
+ "placeholder": "This input is disabled"
81
+ },
82
+ "example": "<Searchbar disabled defaultValue=\"Cannot edit this\" placeholder=\"This input is disabled\">Content</Searchbar>"
83
+ },
84
+ {
85
+ "name": "Disabled",
86
+ "description": "Disabled variant",
87
+ "props": {
88
+ "disabled": true,
89
+ "defaultValue": "Cannot edit this",
90
+ "placeholder": "This input is disabled"
91
+ },
92
+ "example": "<Searchbar disabled defaultValue=\"Cannot edit this\" placeholder=\"This input is disabled\">Content</Searchbar>"
93
+ },
94
+ {
95
+ "name": "NoClearButton",
96
+ "description": "NoClearButton variant",
97
+ "props": {
98
+ "allowClear": false,
99
+ "defaultValue": "No clear button available"
100
+ },
101
+ "example": "<Searchbar allowClear={false} defaultValue=\"No clear button available\">Content</Searchbar>"
102
+ },
103
+ {
104
+ "name": "NoClearButton",
105
+ "description": "NoClearButton variant",
106
+ "props": {
107
+ "allowClear": false,
108
+ "defaultValue": "No clear button available"
109
+ },
110
+ "example": "<Searchbar allowClear={false} defaultValue=\"No clear button available\">Content</Searchbar>"
111
+ },
112
+ {
113
+ "name": "CustomStyling",
114
+ "description": "Example showing how to apply custom styling using the classNames prop.",
115
+ "props": {
116
+ "placeholder": "Custom styled searchbar",
117
+ "classNames": {
118
+ "container": "custom-container",
119
+ "input": "custom-input",
120
+ "actionBtn": "custom-action-btn"
121
+ }
122
+ },
123
+ "example": "<Searchbar placeholder=\"Custom styled searchbar\" classNames={{\"container\":\"custom-container\",\"input\":\"custom-input\",\"actionBtn\":\"custom-action-btn\"}}>Content</Searchbar>"
124
+ },
125
+ {
126
+ "name": "CustomStyling",
127
+ "description": "Example showing how to apply custom styling using the classNames prop.",
128
+ "props": {
129
+ "placeholder": "Custom styled searchbar",
130
+ "classNames": {
131
+ "container": "custom-container",
132
+ "input": "custom-input",
133
+ "actionBtn": "custom-action-btn"
134
+ }
135
+ },
136
+ "example": "<Searchbar placeholder=\"Custom styled searchbar\" classNames={{\"container\":\"custom-container\",\"input\":\"custom-input\",\"actionBtn\":\"custom-action-btn\"}}>Content</Searchbar>"
137
+ }
138
+ ],
139
+ "accessibility": {
140
+ "ariaLabels": [],
141
+ "keyboardNavigation": [],
142
+ "screenReaderSupport": ""
143
+ },
144
+ "relatedComponents": [],
145
+ "designTokens": {
146
+ "colors": [],
147
+ "spacing": [],
148
+ "typography": []
149
+ }
150
+ }
@@ -0,0 +1,312 @@
1
+ {
2
+ "metadata": {
3
+ "id": "patterns-searchinput",
4
+ "name": "SearchInput",
5
+ "category": "patterns",
6
+ "status": "stable",
7
+ "description": "Value data for this component, the text always reflects the input value, while selected is the selected option from the dropdown menu.",
8
+ "hasStories": true,
9
+ "version": "2.0.0",
10
+ "filePath": "packages/clad-ui/patterns/SearchInput/SearchInput.tsx",
11
+ "storyPath": "packages/clad-ui/patterns/SearchInput/SearchInput.stories.tsx",
12
+ "stability": "stable"
13
+ },
14
+ "usage": {
15
+ "importPath": "import { SearchInput } from 'clad-ui/patterns';",
16
+ "basicExample": "<SearchInput>Content</SearchInput>",
17
+ "commonPatterns": []
18
+ },
19
+ "props": [
20
+ {
21
+ "name": "id",
22
+ "type": "string",
23
+ "required": false,
24
+ "description": ""
25
+ },
26
+ {
27
+ "name": "value",
28
+ "type": "SearchInputValue",
29
+ "required": false,
30
+ "description": ""
31
+ },
32
+ {
33
+ "name": "variant",
34
+ "type": "\"dropdown\" | \"input\"",
35
+ "required": false,
36
+ "description": "",
37
+ "options": [
38
+ "dropdown",
39
+ "input"
40
+ ]
41
+ },
42
+ {
43
+ "name": "options",
44
+ "type": "any",
45
+ "required": false,
46
+ "description": ""
47
+ },
48
+ {
49
+ "name": "onInput",
50
+ "type": "any",
51
+ "required": false,
52
+ "description": ""
53
+ },
54
+ {
55
+ "name": "onSelect",
56
+ "type": "any",
57
+ "required": false,
58
+ "description": ""
59
+ },
60
+ {
61
+ "name": "onChange",
62
+ "type": "any",
63
+ "required": false,
64
+ "description": ""
65
+ },
66
+ {
67
+ "name": "name",
68
+ "type": "string",
69
+ "required": false,
70
+ "description": ""
71
+ },
72
+ {
73
+ "name": "type",
74
+ "type": "\"email\" | \"tel\" | \"text\"",
75
+ "required": false,
76
+ "description": "",
77
+ "options": [
78
+ "email",
79
+ "tel",
80
+ "text"
81
+ ]
82
+ },
83
+ {
84
+ "name": "label",
85
+ "type": "string",
86
+ "required": false,
87
+ "description": ""
88
+ },
89
+ {
90
+ "name": "inputRef",
91
+ "type": "object | object",
92
+ "required": false,
93
+ "description": "",
94
+ "options": []
95
+ },
96
+ {
97
+ "name": "onBlur",
98
+ "type": "object",
99
+ "required": false,
100
+ "description": ""
101
+ },
102
+ {
103
+ "name": "onFocus",
104
+ "type": "object",
105
+ "required": false,
106
+ "description": ""
107
+ },
108
+ {
109
+ "name": "disabled",
110
+ "type": "boolean",
111
+ "required": false,
112
+ "description": ""
113
+ },
114
+ {
115
+ "name": "required",
116
+ "type": "boolean",
117
+ "required": false,
118
+ "description": ""
119
+ },
120
+ {
121
+ "name": "allowClear",
122
+ "type": "boolean",
123
+ "required": false,
124
+ "description": ""
125
+ },
126
+ {
127
+ "name": "status",
128
+ "type": "\"default\" | \"error\"",
129
+ "required": false,
130
+ "description": "",
131
+ "options": [
132
+ "default",
133
+ "error"
134
+ ]
135
+ },
136
+ {
137
+ "name": "helptext",
138
+ "type": "string",
139
+ "required": false,
140
+ "description": ""
141
+ },
142
+ {
143
+ "name": "helptextClassName",
144
+ "type": "string",
145
+ "required": false,
146
+ "description": ""
147
+ },
148
+ {
149
+ "name": "tooltip",
150
+ "type": "string",
151
+ "required": false,
152
+ "description": ""
153
+ },
154
+ {
155
+ "name": "inputMode",
156
+ "type": "\"decimal\" | \"email\" | \"none\" | \"numeric\" | \"search\" | \"tel\" | \"text\" | \"url\"",
157
+ "required": false,
158
+ "description": "",
159
+ "options": [
160
+ "decimal",
161
+ "email",
162
+ "none",
163
+ "numeric",
164
+ "search",
165
+ "tel",
166
+ "text",
167
+ "url"
168
+ ]
169
+ },
170
+ {
171
+ "name": "width",
172
+ "type": "Sizes",
173
+ "required": false,
174
+ "description": ""
175
+ },
176
+ {
177
+ "name": "menuMaxHeight",
178
+ "type": "Sizes",
179
+ "required": false,
180
+ "description": ""
181
+ },
182
+ {
183
+ "name": "showSearchIcon",
184
+ "type": "boolean",
185
+ "required": false,
186
+ "description": ""
187
+ }
188
+ ],
189
+ "variants": [
190
+ {
191
+ "name": "ValueBinding",
192
+ "description": "Search Input is also a controlled React component. The text field's value is bound via `value: {text: string, selected: Object}` prop, the dropdown menu is bound via `options: Array<{text: string, html: string, data?: any}>` prop. `onInput` will callback when user types in any text. `onSelect` will callback when user makes a selection in the dropdown menu. `onChange` will callback when user either types or makes selection.",
193
+ "props": {},
194
+ "example": "<SearchInput>Content</SearchInput>"
195
+ },
196
+ {
197
+ "name": "ValueBinding",
198
+ "description": "Search Input is also a controlled React component. The text field's value is bound via `value: {text: string, selected: Object}` prop, the dropdown menu is bound via `options: Array<{text: string, html: string, data?: any}>` prop. `onInput` will callback when user types in any text. `onSelect` will callback when user makes a selection in the dropdown menu. `onChange` will callback when user either types or makes selection.",
199
+ "props": {},
200
+ "example": "<SearchInput>Content</SearchInput>"
201
+ },
202
+ {
203
+ "name": "MenuMaxHeight",
204
+ "description": "`menuMaxHeight` is used to set option menu's max-height.",
205
+ "props": {},
206
+ "example": "<SearchInput>Content</SearchInput>"
207
+ },
208
+ {
209
+ "name": "MenuMaxHeight",
210
+ "description": "`menuMaxHeight` is used to set option menu's max-height.",
211
+ "props": {},
212
+ "example": "<SearchInput>Content</SearchInput>"
213
+ },
214
+ {
215
+ "name": "AllowClear",
216
+ "description": "`allowClear` enable a clear icon when input has value.",
217
+ "props": {},
218
+ "example": "<SearchInput>Content</SearchInput>"
219
+ },
220
+ {
221
+ "name": "AllowClear",
222
+ "description": "`allowClear` enable a clear icon when input has value.",
223
+ "props": {},
224
+ "example": "<SearchInput>Content</SearchInput>"
225
+ },
226
+ {
227
+ "name": "Required",
228
+ "description": "Enable `required` will let Input display a red * on the label but validation is not forced for now.",
229
+ "props": {},
230
+ "example": "<SearchInput>Content</SearchInput>"
231
+ },
232
+ {
233
+ "name": "Required",
234
+ "description": "Enable `required` will let Input display a red * on the label but validation is not forced for now.",
235
+ "props": {},
236
+ "example": "<SearchInput>Content</SearchInput>"
237
+ },
238
+ {
239
+ "name": "ErrorStatus",
240
+ "description": "Set `status=\"error\"` will let Input has red borders and helpText, indicate error status.",
241
+ "props": {},
242
+ "example": "<SearchInput>Content</SearchInput>"
243
+ },
244
+ {
245
+ "name": "ErrorStatus",
246
+ "description": "Set `status=\"error\"` will let Input has red borders and helpText, indicate error status.",
247
+ "props": {},
248
+ "example": "<SearchInput>Content</SearchInput>"
249
+ },
250
+ {
251
+ "name": "DropdownVariant",
252
+ "description": "Show how to use search dropdown variant which will dropdown on click",
253
+ "props": {},
254
+ "example": "<SearchInput>Content</SearchInput>"
255
+ },
256
+ {
257
+ "name": "DropdownVariant",
258
+ "description": "Show how to use search dropdown variant which will dropdown on click",
259
+ "props": {},
260
+ "example": "<SearchInput>Content</SearchInput>"
261
+ },
262
+ {
263
+ "name": "Events",
264
+ "description": "Search input has 3 callbacks. `onInput` is called when user manually types value from keyboard. `onSelect` is called when user selects an option from option menu. `onChange` is called when input value changes, which means, when either `onInput` or `onSelect` is called.",
265
+ "props": {},
266
+ "example": "<SearchInput>Content</SearchInput>"
267
+ },
268
+ {
269
+ "name": "Events",
270
+ "description": "Search input has 3 callbacks. `onInput` is called when user manually types value from keyboard. `onSelect` is called when user selects an option from option menu. `onChange` is called when input value changes, which means, when either `onInput` or `onSelect` is called.",
271
+ "props": {},
272
+ "example": "<SearchInput>Content</SearchInput>"
273
+ },
274
+ {
275
+ "name": "AsyncSearching",
276
+ "description": "An example showing how to use debounce combined with asynchronously fetching data from server on user's typing.",
277
+ "props": {},
278
+ "example": "<SearchInput>Content</SearchInput>"
279
+ },
280
+ {
281
+ "name": "AsyncSearching",
282
+ "description": "An example showing how to use debounce combined with asynchronously fetching data from server on user's typing.",
283
+ "props": {},
284
+ "example": "<SearchInput>Content</SearchInput>"
285
+ },
286
+ {
287
+ "name": "WithSearchIcon",
288
+ "description": "`showSearchIcon` enable a search icon on the lefticon",
289
+ "props": {},
290
+ "example": "<SearchInput>Content</SearchInput>"
291
+ },
292
+ {
293
+ "name": "WithSearchIcon",
294
+ "description": "`showSearchIcon` enable a search icon on the lefticon",
295
+ "props": {},
296
+ "example": "<SearchInput>Content</SearchInput>"
297
+ }
298
+ ],
299
+ "accessibility": {
300
+ "ariaLabels": [],
301
+ "keyboardNavigation": [],
302
+ "screenReaderSupport": ""
303
+ },
304
+ "relatedComponents": [],
305
+ "designTokens": {
306
+ "colors": [
307
+ "iconDisabled"
308
+ ],
309
+ "spacing": [],
310
+ "typography": []
311
+ }
312
+ }