@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.
- package/README.md +43 -1
- package/ai/clad-ui-helper.js +267 -0
- package/ai/knowledge-base/README.md +154 -0
- package/ai/knowledge-base/clad-ui-database.json +9378 -0
- package/ai/knowledge-base/component-categories.json +616 -0
- package/ai/knowledge-base/components/metadata/charts-axis.json +31 -0
- package/ai/knowledge-base/components/metadata/charts-barchart.json +57 -0
- package/ai/knowledge-base/components/metadata/charts-basechart.tsx.json +31 -0
- package/ai/knowledge-base/components/metadata/charts-chartshared.json +31 -0
- package/ai/knowledge-base/components/metadata/charts-linechart.json +189 -0
- package/ai/knowledge-base/components/metadata/charts-piechart.json +57 -0
- package/ai/knowledge-base/components/metadata/components-announcer.json +215 -0
- package/ai/knowledge-base/components/metadata/components-badge.json +168 -0
- package/ai/knowledge-base/components/metadata/components-box.json +348 -0
- package/ai/knowledge-base/components/metadata/components-breadcrumbs.json +75 -0
- package/ai/knowledge-base/components/metadata/components-button.json +187 -0
- package/ai/knowledge-base/components/metadata/components-checkbox.json +161 -0
- package/ai/knowledge-base/components/metadata/components-chip.json +266 -0
- package/ai/knowledge-base/components/metadata/components-currencyinput.json +136 -0
- package/ai/knowledge-base/components/metadata/components-datepicker.json +87 -0
- package/ai/knowledge-base/components/metadata/components-dropdown.json +282 -0
- package/ai/knowledge-base/components/metadata/components-grid.json +92 -0
- package/ai/knowledge-base/components/metadata/components-input.json +432 -0
- package/ai/knowledge-base/components/metadata/components-pagination.json +111 -0
- package/ai/knowledge-base/components/metadata/components-popover.json +63 -0
- package/ai/knowledge-base/components/metadata/components-radiobutton.json +170 -0
- package/ai/knowledge-base/components/metadata/components-rowitem.json +281 -0
- package/ai/knowledge-base/components/metadata/components-shapeicon.json +139 -0
- package/ai/knowledge-base/components/metadata/components-slider.json +177 -0
- package/ai/knowledge-base/components/metadata/components-snack.json +181 -0
- package/ai/knowledge-base/components/metadata/components-tabs.json +169 -0
- package/ai/knowledge-base/components/metadata/components-textarea.json +285 -0
- package/ai/knowledge-base/components/metadata/components-textlabel.json +129 -0
- package/ai/knowledge-base/components/metadata/components-toggleswitch.json +134 -0
- package/ai/knowledge-base/components/metadata/components-tooltip.json +291 -0
- package/ai/knowledge-base/components/metadata/patterns-drawer.json +310 -0
- package/ai/knowledge-base/components/metadata/patterns-emptystate.json +106 -0
- package/ai/knowledge-base/components/metadata/patterns-inputgroup.json +105 -0
- package/ai/knowledge-base/components/metadata/patterns-legacydialog.json +177 -0
- package/ai/knowledge-base/components/metadata/patterns-legacypopup.json +236 -0
- package/ai/knowledge-base/components/metadata/patterns-multisearchdropdown.json +249 -0
- package/ai/knowledge-base/components/metadata/patterns-popup.json +268 -0
- package/ai/knowledge-base/components/metadata/patterns-rangeinput.json +105 -0
- package/ai/knowledge-base/components/metadata/patterns-searchbar.json +150 -0
- package/ai/knowledge-base/components/metadata/patterns-searchinput.json +312 -0
- package/ai/knowledge-base/components/metadata/patterns-tagcloud.json +244 -0
- package/ai/knowledge-base/components/metadata/summaries.json +610 -0
- package/ai/knowledge-base/design-tokens/tokens.json +483 -0
- package/ai/knowledge-base/patterns/documentation.json +131 -0
- package/ai/knowledge-base/prompts/common-system-prompt.md +592 -0
- package/ai/knowledge-base/prompts/figma-system-prompt.md +396 -0
- package/ai/knowledge-base/search-index/icons/asset-icons.json +1 -0
- package/ai/knowledge-base/search-index/icons/collection.json +5 -0
- package/ai/knowledge-base/search-index/icons/system-icons.json +1 -0
- package/ai/knowledge-base/search-index/search-index.json +899 -0
- package/ai/knowledge-base/validation-rules/component-rules.json +658 -0
- package/ai/skill/SKILL.md +103 -0
- package/dist/clad-ui.es.js +1110 -1098
- package/dist/components/Chip/Chip.d.ts +1 -1
- package/dist/components/Chip/Chip.d.ts.map +1 -1
- package/dist/components/Chip/Chip.styles.d.ts.map +1 -1
- package/dist/components/Input/Input.styles.d.ts.map +1 -1
- package/dist/components/RowItem/RowItem.styles.d.ts.map +1 -1
- package/dist/components/Snack/Snack.d.ts +9 -0
- package/dist/components/Snack/Snack.d.ts.map +1 -1
- package/dist/components/Snack/Snack.styles.d.ts +7 -1
- package/dist/components/Snack/Snack.styles.d.ts.map +1 -1
- package/dist/components/TextArea/TextArea.styles.d.ts.map +1 -1
- package/dist/patterns/Drawer/Drawer.d.ts +19 -10
- package/dist/patterns/Drawer/Drawer.d.ts.map +1 -1
- package/dist/patterns/Drawer/Drawer.styles.d.ts +1 -1
- package/dist/patterns/Drawer/Drawer.styles.d.ts.map +1 -1
- package/dist/patterns/MultiSearchDropdown/MultiSearchDropdown.d.ts.map +1 -1
- package/dist/patterns/MultiSearchDropdown/MultiSearchDropdown.styles.d.ts.map +1 -1
- package/dist/theme-chotot.css +1 -1
- package/dist/theme-job.css +1 -1
- package/dist/theme-pty.css +1 -1
- package/dist/theme-veh.css +1 -1
- package/package.json +8 -2
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
{
|
|
2
|
+
"metadata": {
|
|
3
|
+
"id": "components-currencyinput",
|
|
4
|
+
"name": "CurrencyInput",
|
|
5
|
+
"category": "components",
|
|
6
|
+
"status": "stable",
|
|
7
|
+
"description": "Callback when user input. Return formatted value. eg: 1.200,25",
|
|
8
|
+
"hasStories": true,
|
|
9
|
+
"version": "2.0.0",
|
|
10
|
+
"filePath": "packages/clad-ui/components/CurrencyInput/CurrencyInput.tsx",
|
|
11
|
+
"storyPath": "packages/clad-ui/components/CurrencyInput/CurrencyInput.stories.tsx",
|
|
12
|
+
"stability": "stable"
|
|
13
|
+
},
|
|
14
|
+
"usage": {
|
|
15
|
+
"importPath": "import { CurrencyInput } from 'clad-ui';",
|
|
16
|
+
"basicExample": "<CurrencyInput>Content</CurrencyInput>",
|
|
17
|
+
"commonPatterns": []
|
|
18
|
+
},
|
|
19
|
+
"props": [
|
|
20
|
+
{
|
|
21
|
+
"name": "onFormatChange",
|
|
22
|
+
"type": "any",
|
|
23
|
+
"required": false,
|
|
24
|
+
"description": ""
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "suffix",
|
|
28
|
+
"type": "string",
|
|
29
|
+
"required": false,
|
|
30
|
+
"description": ""
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "separator",
|
|
34
|
+
"type": "string",
|
|
35
|
+
"required": false,
|
|
36
|
+
"description": ""
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "decimalSeparator",
|
|
40
|
+
"type": "string",
|
|
41
|
+
"required": false,
|
|
42
|
+
"description": ""
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "maxDigits",
|
|
46
|
+
"type": "number",
|
|
47
|
+
"required": false,
|
|
48
|
+
"description": ""
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "decimalsLimit",
|
|
52
|
+
"type": "number",
|
|
53
|
+
"required": false,
|
|
54
|
+
"description": ""
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "allowNegativeValue",
|
|
58
|
+
"type": "boolean",
|
|
59
|
+
"required": false,
|
|
60
|
+
"description": ""
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"variants": [
|
|
64
|
+
{
|
|
65
|
+
"name": "ValueBinding",
|
|
66
|
+
"description": "Currently, Input only support controlled HTML <input />",
|
|
67
|
+
"props": {},
|
|
68
|
+
"example": "<CurrencyInput>Content</CurrencyInput>"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"name": "ValueBinding",
|
|
72
|
+
"description": "Currently, Input only support controlled HTML <input />",
|
|
73
|
+
"props": {},
|
|
74
|
+
"example": "<CurrencyInput>Content</CurrencyInput>"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"name": "Required",
|
|
78
|
+
"description": "Enable `required` will let Input display a red * on the label but validation is not forced for now",
|
|
79
|
+
"props": {},
|
|
80
|
+
"example": "<CurrencyInput>Content</CurrencyInput>"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"name": "Required",
|
|
84
|
+
"description": "Enable `required` will let Input display a red * on the label but validation is not forced for now",
|
|
85
|
+
"props": {},
|
|
86
|
+
"example": "<CurrencyInput>Content</CurrencyInput>"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"name": "ErrorStatus",
|
|
90
|
+
"description": "Set `status=\"error\"` will let Input has red borders and helpText, indicate error status.",
|
|
91
|
+
"props": {},
|
|
92
|
+
"example": "<CurrencyInput>Content</CurrencyInput>"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"name": "ErrorStatus",
|
|
96
|
+
"description": "Set `status=\"error\"` will let Input has red borders and helpText, indicate error status.",
|
|
97
|
+
"props": {},
|
|
98
|
+
"example": "<CurrencyInput>Content</CurrencyInput>"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"name": "Disabled",
|
|
102
|
+
"description": "Enable `disabled` will set attribute `disabled` to the HTML input. Effectively, disabled input is read-only.",
|
|
103
|
+
"props": {},
|
|
104
|
+
"example": "<CurrencyInput>Content</CurrencyInput>"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"name": "Disabled",
|
|
108
|
+
"description": "Enable `disabled` will set attribute `disabled` to the HTML input. Effectively, disabled input is read-only.",
|
|
109
|
+
"props": {},
|
|
110
|
+
"example": "<CurrencyInput>Content</CurrencyInput>"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"name": "DebounceExample",
|
|
114
|
+
"description": "DebounceExample variant",
|
|
115
|
+
"props": {},
|
|
116
|
+
"example": "<CurrencyInput>Content</CurrencyInput>"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"name": "DebounceExample",
|
|
120
|
+
"description": "DebounceExample variant",
|
|
121
|
+
"props": {},
|
|
122
|
+
"example": "<CurrencyInput>Content</CurrencyInput>"
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
"accessibility": {
|
|
126
|
+
"ariaLabels": [],
|
|
127
|
+
"keyboardNavigation": [],
|
|
128
|
+
"screenReaderSupport": ""
|
|
129
|
+
},
|
|
130
|
+
"relatedComponents": [],
|
|
131
|
+
"designTokens": {
|
|
132
|
+
"colors": [],
|
|
133
|
+
"spacing": [],
|
|
134
|
+
"typography": []
|
|
135
|
+
}
|
|
136
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
{
|
|
2
|
+
"metadata": {
|
|
3
|
+
"id": "components-datepicker",
|
|
4
|
+
"name": "DatePicker",
|
|
5
|
+
"category": "components",
|
|
6
|
+
"status": "stable",
|
|
7
|
+
"description": "The current date value to be displayed in the date picker.",
|
|
8
|
+
"hasStories": true,
|
|
9
|
+
"version": "2.0.0",
|
|
10
|
+
"filePath": "packages/clad-ui/components/DatePicker/DatePicker.tsx",
|
|
11
|
+
"storyPath": "packages/clad-ui/components/DatePicker/DatePicker.stories.tsx",
|
|
12
|
+
"stability": "stable"
|
|
13
|
+
},
|
|
14
|
+
"usage": {
|
|
15
|
+
"importPath": "import { DatePicker } from 'clad-ui';",
|
|
16
|
+
"basicExample": "<DatePicker>Content</DatePicker>",
|
|
17
|
+
"commonPatterns": []
|
|
18
|
+
},
|
|
19
|
+
"props": [],
|
|
20
|
+
"variants": [
|
|
21
|
+
{
|
|
22
|
+
"name": "DateTimePickerStories",
|
|
23
|
+
"description": "DateTimePickerStories variant",
|
|
24
|
+
"props": {},
|
|
25
|
+
"example": "<DatePicker>Content</DatePicker>"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"name": "DefaultDateTimePicker",
|
|
29
|
+
"description": "Demonstrates the default functionality of the Date Time Picker component.",
|
|
30
|
+
"props": {},
|
|
31
|
+
"example": "<DatePicker>Content</DatePicker>"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"name": "DefaultDateTimePicker",
|
|
35
|
+
"description": "Demonstrates the default functionality of the Date Time Picker component.",
|
|
36
|
+
"props": {},
|
|
37
|
+
"example": "<DatePicker>Content</DatePicker>"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "Default",
|
|
41
|
+
"description": "Demonstrates the Date Picker component with date and time selection.",
|
|
42
|
+
"props": {},
|
|
43
|
+
"example": "<DatePicker>Content</DatePicker>"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"name": "Default",
|
|
47
|
+
"description": "Demonstrates the Date Picker component with date and time selection.",
|
|
48
|
+
"props": {},
|
|
49
|
+
"example": "<DatePicker>Content</DatePicker>"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"name": "DateTimePickerWithCustomTimeRange",
|
|
53
|
+
"description": "Illustrates the Date Picker component with custom time ranges for selection.",
|
|
54
|
+
"props": {},
|
|
55
|
+
"example": "<DatePicker>Content</DatePicker>"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"name": "DateTimePickerWithCustomTimeRange",
|
|
59
|
+
"description": "Illustrates the Date Picker component with custom time ranges for selection.",
|
|
60
|
+
"props": {},
|
|
61
|
+
"example": "<DatePicker>Content</DatePicker>"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"name": "DefaultValueProp",
|
|
65
|
+
"description": "Demonstrates the DateTimePicker component with the defaultValue prop set to a calculated default value.",
|
|
66
|
+
"props": {},
|
|
67
|
+
"example": "<DatePicker>Content</DatePicker>"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"name": "DefaultValueProp",
|
|
71
|
+
"description": "Demonstrates the DateTimePicker component with the defaultValue prop set to a calculated default value.",
|
|
72
|
+
"props": {},
|
|
73
|
+
"example": "<DatePicker>Content</DatePicker>"
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"accessibility": {
|
|
77
|
+
"ariaLabels": [],
|
|
78
|
+
"keyboardNavigation": [],
|
|
79
|
+
"screenReaderSupport": ""
|
|
80
|
+
},
|
|
81
|
+
"relatedComponents": [],
|
|
82
|
+
"designTokens": {
|
|
83
|
+
"colors": [],
|
|
84
|
+
"spacing": [],
|
|
85
|
+
"typography": []
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
{
|
|
2
|
+
"metadata": {
|
|
3
|
+
"id": "components-dropdown",
|
|
4
|
+
"name": "Dropdown",
|
|
5
|
+
"category": "components",
|
|
6
|
+
"status": "stable",
|
|
7
|
+
"description": "Custom class to override dropdown's style.",
|
|
8
|
+
"hasStories": true,
|
|
9
|
+
"version": "2.0.0",
|
|
10
|
+
"filePath": "packages/clad-ui/components/Dropdown/Dropdown.tsx",
|
|
11
|
+
"storyPath": "packages/clad-ui/components/Dropdown/Dropdown.stories.tsx",
|
|
12
|
+
"stability": "stable"
|
|
13
|
+
},
|
|
14
|
+
"usage": {
|
|
15
|
+
"importPath": "import { Dropdown } from 'clad-ui';",
|
|
16
|
+
"basicExample": "<Dropdown>Content</Dropdown>",
|
|
17
|
+
"commonPatterns": []
|
|
18
|
+
},
|
|
19
|
+
"props": [
|
|
20
|
+
{
|
|
21
|
+
"name": "className",
|
|
22
|
+
"type": "string",
|
|
23
|
+
"required": false,
|
|
24
|
+
"description": ""
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "name",
|
|
28
|
+
"type": "string",
|
|
29
|
+
"required": false,
|
|
30
|
+
"description": ""
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "label",
|
|
34
|
+
"type": "string",
|
|
35
|
+
"required": false,
|
|
36
|
+
"description": ""
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "inputRef",
|
|
40
|
+
"type": "object | object",
|
|
41
|
+
"required": false,
|
|
42
|
+
"description": "",
|
|
43
|
+
"options": []
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"name": "value",
|
|
47
|
+
"type": "number | string",
|
|
48
|
+
"required": false,
|
|
49
|
+
"description": "",
|
|
50
|
+
"options": []
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "onClick",
|
|
54
|
+
"type": "object",
|
|
55
|
+
"required": false,
|
|
56
|
+
"description": ""
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"name": "onChange",
|
|
60
|
+
"type": "object",
|
|
61
|
+
"required": false,
|
|
62
|
+
"description": ""
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"name": "onBlur",
|
|
66
|
+
"type": "object",
|
|
67
|
+
"required": false,
|
|
68
|
+
"description": ""
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"name": "onFocus",
|
|
72
|
+
"type": "any",
|
|
73
|
+
"required": false,
|
|
74
|
+
"description": ""
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"name": "disabled",
|
|
78
|
+
"type": "boolean",
|
|
79
|
+
"required": false,
|
|
80
|
+
"description": ""
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"name": "required",
|
|
84
|
+
"type": "boolean",
|
|
85
|
+
"required": false,
|
|
86
|
+
"description": ""
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"name": "id",
|
|
90
|
+
"type": "string",
|
|
91
|
+
"required": false,
|
|
92
|
+
"description": ""
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"name": "status",
|
|
96
|
+
"type": "\"default\" | \"error\"",
|
|
97
|
+
"required": false,
|
|
98
|
+
"description": "",
|
|
99
|
+
"options": [
|
|
100
|
+
"default",
|
|
101
|
+
"error"
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"name": "helptext",
|
|
106
|
+
"type": "string",
|
|
107
|
+
"required": false,
|
|
108
|
+
"description": ""
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"name": "helptextClassName",
|
|
112
|
+
"type": "string",
|
|
113
|
+
"required": false,
|
|
114
|
+
"description": ""
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"name": "options",
|
|
118
|
+
"type": "any",
|
|
119
|
+
"required": false,
|
|
120
|
+
"description": ""
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"name": "width",
|
|
124
|
+
"type": "Size",
|
|
125
|
+
"required": false,
|
|
126
|
+
"description": ""
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"name": "menuMaxHeight",
|
|
130
|
+
"type": "Sizes",
|
|
131
|
+
"required": false,
|
|
132
|
+
"description": ""
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"name": "icon",
|
|
136
|
+
"type": "object",
|
|
137
|
+
"required": false,
|
|
138
|
+
"description": ""
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"name": "paddingForIcon",
|
|
142
|
+
"type": "number",
|
|
143
|
+
"required": false,
|
|
144
|
+
"description": ""
|
|
145
|
+
}
|
|
146
|
+
],
|
|
147
|
+
"variants": [
|
|
148
|
+
{
|
|
149
|
+
"name": "ValueBinding",
|
|
150
|
+
"description": "Currently, Dropdown only support controlled HTML <select />",
|
|
151
|
+
"props": {},
|
|
152
|
+
"example": "<Dropdown>Content</Dropdown>"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"name": "ValueBinding",
|
|
156
|
+
"description": "Currently, Dropdown only support controlled HTML <select />",
|
|
157
|
+
"props": {},
|
|
158
|
+
"example": "<Dropdown>Content</Dropdown>"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"name": "WithHelptext",
|
|
162
|
+
"description": "Help text is the small caption below the Dropdown box",
|
|
163
|
+
"props": {},
|
|
164
|
+
"example": "<Dropdown>Content</Dropdown>"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"name": "WithHelptext",
|
|
168
|
+
"description": "Help text is the small caption below the Dropdown box",
|
|
169
|
+
"props": {},
|
|
170
|
+
"example": "<Dropdown>Content</Dropdown>"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"name": "WithIcon",
|
|
174
|
+
"description": "You can add an icon to the options by passing `icon` prop to the options",
|
|
175
|
+
"props": {},
|
|
176
|
+
"example": "<Dropdown>Content</Dropdown>"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"name": "WithIcon",
|
|
180
|
+
"description": "You can add an icon to the options by passing `icon` prop to the options",
|
|
181
|
+
"props": {},
|
|
182
|
+
"example": "<Dropdown>Content</Dropdown>"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"name": "WithLongOptions",
|
|
186
|
+
"description": "WithLongOptions variant",
|
|
187
|
+
"props": {},
|
|
188
|
+
"example": "<Dropdown>Content</Dropdown>"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"name": "WithLongOptions",
|
|
192
|
+
"description": "WithLongOptions variant",
|
|
193
|
+
"props": {},
|
|
194
|
+
"example": "<Dropdown>Content</Dropdown>"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"name": "Required",
|
|
198
|
+
"description": "Enable `required` will let Dropdown display a red * on the label but validation is not forced for now",
|
|
199
|
+
"props": {},
|
|
200
|
+
"example": "<Dropdown>Content</Dropdown>"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"name": "Required",
|
|
204
|
+
"description": "Enable `required` will let Dropdown display a red * on the label but validation is not forced for now",
|
|
205
|
+
"props": {},
|
|
206
|
+
"example": "<Dropdown>Content</Dropdown>"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"name": "ErrorStatus",
|
|
210
|
+
"description": "Set `status=\"error\"` will let Dropdown has red borders and helpText, indicate error status.",
|
|
211
|
+
"props": {},
|
|
212
|
+
"example": "<Dropdown>Content</Dropdown>"
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"name": "ErrorStatus",
|
|
216
|
+
"description": "Set `status=\"error\"` will let Dropdown has red borders and helpText, indicate error status.",
|
|
217
|
+
"props": {},
|
|
218
|
+
"example": "<Dropdown>Content</Dropdown>"
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"name": "Disabled",
|
|
222
|
+
"description": "Enable `disabled` will set attribute `disabled` to the HTML select. Effectively, Dropdown is read-only.",
|
|
223
|
+
"props": {},
|
|
224
|
+
"example": "<Dropdown>Content</Dropdown>"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"name": "Disabled",
|
|
228
|
+
"description": "Enable `disabled` will set attribute `disabled` to the HTML select. Effectively, Dropdown is read-only.",
|
|
229
|
+
"props": {},
|
|
230
|
+
"example": "<Dropdown>Content</Dropdown>"
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"name": "CustomClass",
|
|
234
|
+
"description": "Pass a custom `className` with descendant selectors to `.wrapper`, `.select`, `.label`, `.helptext` to override dropdown styles. Click on Show code to see an example.",
|
|
235
|
+
"props": {},
|
|
236
|
+
"example": "<Dropdown>Content</Dropdown>"
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"name": "CustomClass",
|
|
240
|
+
"description": "Pass a custom `className` with descendant selectors to `.wrapper`, `.select`, `.label`, `.helptext` to override dropdown styles. Click on Show code to see an example.",
|
|
241
|
+
"props": {},
|
|
242
|
+
"example": "<Dropdown>Content</Dropdown>"
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"name": "CustomDropdownExample",
|
|
246
|
+
"description": "This example demonstrate it is possible to prevent the default browser option dropdown and use a custom selector (with the help of Popup pattern). The key ingredient of this setup is `event.preventDefault()` in Dropdown `onClick` handler.",
|
|
247
|
+
"props": {},
|
|
248
|
+
"example": "<Dropdown>Content</Dropdown>"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"name": "CustomDropdownExample",
|
|
252
|
+
"description": "This example demonstrate it is possible to prevent the default browser option dropdown and use a custom selector (with the help of Popup pattern). The key ingredient of this setup is `event.preventDefault()` in Dropdown `onClick` handler.",
|
|
253
|
+
"props": {},
|
|
254
|
+
"example": "<Dropdown>Content</Dropdown>"
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
"name": "DropdownOnDrawer",
|
|
258
|
+
"description": "This example demonstrate Dropdown inside a Drawer",
|
|
259
|
+
"props": {},
|
|
260
|
+
"example": "<Dropdown>Content</Dropdown>"
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"name": "DropdownOnDrawer",
|
|
264
|
+
"description": "This example demonstrate Dropdown inside a Drawer",
|
|
265
|
+
"props": {},
|
|
266
|
+
"example": "<Dropdown>Content</Dropdown>"
|
|
267
|
+
}
|
|
268
|
+
],
|
|
269
|
+
"accessibility": {
|
|
270
|
+
"ariaLabels": [],
|
|
271
|
+
"keyboardNavigation": [],
|
|
272
|
+
"screenReaderSupport": ""
|
|
273
|
+
},
|
|
274
|
+
"relatedComponents": [],
|
|
275
|
+
"designTokens": {
|
|
276
|
+
"colors": [
|
|
277
|
+
"iconDisabled"
|
|
278
|
+
],
|
|
279
|
+
"spacing": [],
|
|
280
|
+
"typography": []
|
|
281
|
+
}
|
|
282
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
{
|
|
2
|
+
"metadata": {
|
|
3
|
+
"id": "components-grid",
|
|
4
|
+
"name": "Grid",
|
|
5
|
+
"category": "components",
|
|
6
|
+
"status": "stable",
|
|
7
|
+
"description": "Col component mimic flexbox item",
|
|
8
|
+
"hasStories": false,
|
|
9
|
+
"version": "2.0.0",
|
|
10
|
+
"filePath": "packages/clad-ui/components/Grid/Col.tsx",
|
|
11
|
+
"stability": "stable"
|
|
12
|
+
},
|
|
13
|
+
"usage": {
|
|
14
|
+
"importPath": "import { Grid } from 'clad-ui';",
|
|
15
|
+
"basicExample": "<Grid>Content</Grid>",
|
|
16
|
+
"commonPatterns": []
|
|
17
|
+
},
|
|
18
|
+
"props": [],
|
|
19
|
+
"variants": [
|
|
20
|
+
{
|
|
21
|
+
"name": "Component",
|
|
22
|
+
"description": "Component variant",
|
|
23
|
+
"props": {},
|
|
24
|
+
"example": "<Grid>Content</Grid>"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "Component",
|
|
28
|
+
"description": "Component variant",
|
|
29
|
+
"props": {},
|
|
30
|
+
"example": "<Grid>Content</Grid>"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "ColumnSpan",
|
|
34
|
+
"description": "Setting Col's `span` to set its width span on the 12-column grid.",
|
|
35
|
+
"props": {},
|
|
36
|
+
"example": "<Grid>Content</Grid>"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "ColumnSpan",
|
|
40
|
+
"description": "Setting Col's `span` to set its width span on the 12-column grid.",
|
|
41
|
+
"props": {},
|
|
42
|
+
"example": "<Grid>Content</Grid>"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "ColumnOffset",
|
|
46
|
+
"description": "Setting Col's `offset` to define its offset on the 12-column grid.",
|
|
47
|
+
"props": {},
|
|
48
|
+
"example": "<Grid>Content</Grid>"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "ColumnOffset",
|
|
52
|
+
"description": "Setting Col's `offset` to define its offset on the 12-column grid.",
|
|
53
|
+
"props": {},
|
|
54
|
+
"example": "<Grid>Content</Grid>"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "ColumnAlign",
|
|
58
|
+
"description": "Setting Col's `align` to define vertical alignment individually. (CSS flex item `align-self`)",
|
|
59
|
+
"props": {},
|
|
60
|
+
"example": "<Grid>Content</Grid>"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "ColumnAlign",
|
|
64
|
+
"description": "Setting Col's `align` to define vertical alignment individually. (CSS flex item `align-self`)",
|
|
65
|
+
"props": {},
|
|
66
|
+
"example": "<Grid>Content</Grid>"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"name": "ColumnOrder",
|
|
70
|
+
"description": "Setting Col's `order` to change it's order in the Grid. (CSS flex item `order`)",
|
|
71
|
+
"props": {},
|
|
72
|
+
"example": "<Grid>Content</Grid>"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"name": "ColumnOrder",
|
|
76
|
+
"description": "Setting Col's `order` to change it's order in the Grid. (CSS flex item `order`)",
|
|
77
|
+
"props": {},
|
|
78
|
+
"example": "<Grid>Content</Grid>"
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
"accessibility": {
|
|
82
|
+
"ariaLabels": [],
|
|
83
|
+
"keyboardNavigation": [],
|
|
84
|
+
"screenReaderSupport": ""
|
|
85
|
+
},
|
|
86
|
+
"relatedComponents": [],
|
|
87
|
+
"designTokens": {
|
|
88
|
+
"colors": [],
|
|
89
|
+
"spacing": [],
|
|
90
|
+
"typography": []
|
|
91
|
+
}
|
|
92
|
+
}
|