playbook_ui_docs 16.7.0 → 16.8.0.pre.alpha.PLAY2945selectformblankselection16424
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.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_advanced_table/docs/_playground.json +178 -5840
- data/app/pb_kits/playbook/pb_advanced_table/docs/_playground.overrides.json +4 -29
- data/app/pb_kits/playbook/pb_date/docs/_playground.json +13 -17
- data/app/pb_kits/playbook/pb_date/docs/_playground.overrides.json +13 -16
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_inline.html.erb +0 -2
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_inline.jsx +0 -2
- data/app/pb_kits/playbook/pb_date_picker/docs/_playground.json +136 -42
- data/app/pb_kits/playbook/pb_date_picker/docs/_playground.overrides.json +113 -45
- data/app/pb_kits/playbook/pb_date_range_inline/docs/_playground.json +48 -6
- data/app/pb_kits/playbook/pb_date_range_inline/docs/_playground.overrides.json +57 -0
- data/app/pb_kits/playbook/pb_date_range_stacked/docs/_playground.json +28 -5
- data/app/pb_kits/playbook/pb_date_range_stacked/docs/_playground.overrides.json +38 -0
- data/app/pb_kits/playbook/pb_date_stacked/docs/_playground.json +1 -1
- data/app/pb_kits/playbook/pb_date_stacked/docs/_playground.overrides.json +1 -1
- data/app/pb_kits/playbook/pb_date_time/docs/_playground.json +16 -3
- data/app/pb_kits/playbook/pb_date_time/docs/_playground.overrides.json +16 -3
- data/app/pb_kits/playbook/pb_date_time_stacked/docs/_playground.json +11 -15
- data/app/pb_kits/playbook/pb_date_time_stacked/docs/_playground.overrides.json +11 -15
- data/app/pb_kits/playbook/pb_date_year_stacked/docs/_playground.json +4 -4
- data/app/pb_kits/playbook/pb_date_year_stacked/docs/_playground.overrides.json +4 -4
- data/app/pb_kits/playbook/pb_detail/docs/_playground.json +12 -18
- data/app/pb_kits/playbook/pb_detail/docs/_playground.overrides.json +13 -12
- data/app/pb_kits/playbook/pb_dialog/docs/_playground.json +108 -42
- data/app/pb_kits/playbook/pb_dialog/docs/_playground.overrides.json +88 -40
- data/app/pb_kits/playbook/pb_distribution_bar/docs/_playground.json +65 -7
- data/app/pb_kits/playbook/pb_distribution_bar/docs/_playground.overrides.json +45 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_playground.json +318 -21
- data/app/pb_kits/playbook/pb_dropdown/docs/_playground.overrides.json +192 -19
- data/app/pb_kits/playbook/pb_empty_state/docs/_playground.json +77 -12
- data/app/pb_kits/playbook/pb_empty_state/docs/_playground.overrides.json +79 -0
- data/app/pb_kits/playbook/pb_file_upload/docs/_playground.json +98 -13
- data/app/pb_kits/playbook/pb_file_upload/docs/_playground.overrides.json +99 -0
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with_select_examples.html.erb +31 -0
- data/app/pb_kits/playbook/pb_form/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_link/docs/_playground.json +81 -40
- data/app/pb_kits/playbook/pb_link/docs/_playground.overrides.json +88 -30
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_playground.json +4 -2
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_rails_default.html.erb +1 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_rails_default.md +12 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_rails_simple.html.erb +9 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_rails_simple.md +8 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_title/docs/_playground.json +72 -23
- data/app/pb_kits/playbook/pb_title/docs/_playground.overrides.json +80 -16
- metadata +12 -2
|
@@ -1,4 +1,45 @@
|
|
|
1
1
|
{
|
|
2
|
+
"structureModes": {
|
|
3
|
+
"default": "simple",
|
|
4
|
+
"modes": {
|
|
5
|
+
"simple": {
|
|
6
|
+
"label": "Simple",
|
|
7
|
+
"template": "<Dropdown{{props}} />",
|
|
8
|
+
"children": ""
|
|
9
|
+
},
|
|
10
|
+
"subcomponents": {
|
|
11
|
+
"label": "With Subcomponents",
|
|
12
|
+
"template": "<Dropdown{{props}}>\n <Dropdown.Trigger />\n <Dropdown.Container>\n <Dropdown.Option option={({ label: 'United States', value: 'unitedStates', id: 'us' })} />\n <Dropdown.Option option={({ label: 'Canada', value: 'canada', id: 'ca' })} />\n <Dropdown.Option option={({ label: 'Pakistan', value: 'pakistan', id: 'pk' })} />\n </Dropdown.Container>\n</Dropdown>",
|
|
13
|
+
"children": "",
|
|
14
|
+
"props": {
|
|
15
|
+
"options": [
|
|
16
|
+
{ "label": "United States", "value": "unitedStates", "id": "us" },
|
|
17
|
+
{ "label": "Canada", "value": "canada", "id": "ca" },
|
|
18
|
+
{ "label": "Pakistan", "value": "pakistan", "id": "pk" }
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"defaults": {
|
|
25
|
+
"autocomplete": false,
|
|
26
|
+
"blankSelection": "",
|
|
27
|
+
"clearable": true,
|
|
28
|
+
"closeOnClick": "any",
|
|
29
|
+
"constrainHeight": false,
|
|
30
|
+
"dark": false,
|
|
31
|
+
"label": "Select a Country",
|
|
32
|
+
"multiSelect": false,
|
|
33
|
+
"options": [
|
|
34
|
+
{ "label": "United States", "value": "unitedStates", "id": "us" },
|
|
35
|
+
{ "label": "Canada", "value": "canada", "id": "ca" },
|
|
36
|
+
{ "label": "Pakistan", "value": "pakistan", "id": "pk" }
|
|
37
|
+
],
|
|
38
|
+
"placeholder": "Select a country",
|
|
39
|
+
"requiredIndicator": false,
|
|
40
|
+
"separators": true,
|
|
41
|
+
"variant": "default"
|
|
42
|
+
},
|
|
2
43
|
"groups": [
|
|
3
44
|
{
|
|
4
45
|
"name": "Content",
|
|
@@ -6,28 +47,22 @@
|
|
|
6
47
|
"label",
|
|
7
48
|
"placeholder",
|
|
8
49
|
"options",
|
|
50
|
+
"defaultValue",
|
|
9
51
|
"blankSelection",
|
|
10
52
|
"error"
|
|
11
53
|
]
|
|
12
54
|
},
|
|
13
55
|
{
|
|
14
|
-
"name": "
|
|
56
|
+
"name": "Behavior",
|
|
15
57
|
"props": [
|
|
16
58
|
"variant",
|
|
17
|
-
"separators",
|
|
18
|
-
"constrainHeight",
|
|
19
|
-
"clearable",
|
|
20
|
-
"requiredIndicator"
|
|
21
|
-
]
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"name": "State & behavior",
|
|
25
|
-
"props": [
|
|
26
|
-
"isClosed",
|
|
27
59
|
"multiSelect",
|
|
28
60
|
"autocomplete",
|
|
61
|
+
"clearable",
|
|
29
62
|
"closeOnClick",
|
|
30
|
-
"
|
|
63
|
+
"constrainHeight",
|
|
64
|
+
"isClosed",
|
|
65
|
+
"requiredIndicator"
|
|
31
66
|
]
|
|
32
67
|
},
|
|
33
68
|
{
|
|
@@ -40,8 +75,17 @@
|
|
|
40
75
|
]
|
|
41
76
|
},
|
|
42
77
|
{
|
|
43
|
-
"name": "
|
|
44
|
-
"props": [
|
|
78
|
+
"name": "Display",
|
|
79
|
+
"props": [
|
|
80
|
+
"separators",
|
|
81
|
+
"formPillProps",
|
|
82
|
+
"activeStyle",
|
|
83
|
+
"dark"
|
|
84
|
+
]
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"name": "Events",
|
|
88
|
+
"props": ["onSelect"]
|
|
45
89
|
}
|
|
46
90
|
],
|
|
47
91
|
"presets": [
|
|
@@ -58,10 +102,22 @@
|
|
|
58
102
|
}
|
|
59
103
|
},
|
|
60
104
|
{
|
|
61
|
-
"name": "
|
|
105
|
+
"name": "With label",
|
|
106
|
+
"props": {
|
|
107
|
+
"label": "Select a Country",
|
|
108
|
+
"placeholder": "Choose a country",
|
|
109
|
+
"options": [
|
|
110
|
+
{ "label": "United States", "value": "unitedStates", "id": "us" },
|
|
111
|
+
{ "label": "Canada", "value": "canada", "id": "ca" },
|
|
112
|
+
{ "label": "Pakistan", "value": "pakistan", "id": "pk" }
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"name": "Subtle Variant",
|
|
62
118
|
"props": {
|
|
63
119
|
"variant": "subtle",
|
|
64
|
-
"
|
|
120
|
+
"separators": false,
|
|
65
121
|
"options": [
|
|
66
122
|
{ "label": "Alpha", "value": "alpha", "id": "a" },
|
|
67
123
|
{ "label": "Beta", "value": "beta", "id": "b" },
|
|
@@ -73,7 +129,53 @@
|
|
|
73
129
|
"name": "Quick pick",
|
|
74
130
|
"props": {
|
|
75
131
|
"variant": "quickpick",
|
|
76
|
-
"label": "Date
|
|
132
|
+
"label": "Date Range",
|
|
133
|
+
"placeholder": "Select a Date Range"
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"name": "Quick pick custom",
|
|
138
|
+
"props": {
|
|
139
|
+
"variant": "quickpick",
|
|
140
|
+
"label": "Date Range",
|
|
141
|
+
"customQuickPickDates": {
|
|
142
|
+
"dates": [
|
|
143
|
+
{
|
|
144
|
+
"label": "Last 15 months",
|
|
145
|
+
"value": {
|
|
146
|
+
"timePeriod": "months",
|
|
147
|
+
"amount": 15
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"label": "First Week of June 2022",
|
|
152
|
+
"value": ["06/01/2022", "06/07/2022"]
|
|
153
|
+
}
|
|
154
|
+
]
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"name": "Quick pick append defaults",
|
|
160
|
+
"props": {
|
|
161
|
+
"variant": "quickpick",
|
|
162
|
+
"label": "Date Range",
|
|
163
|
+
"customQuickPickDates": {
|
|
164
|
+
"dates": [
|
|
165
|
+
{
|
|
166
|
+
"label": "Last 15 months",
|
|
167
|
+
"value": {
|
|
168
|
+
"timePeriod": "months",
|
|
169
|
+
"amount": 15
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"label": "First Week of June 2022",
|
|
174
|
+
"value": ["06/01/2022", "06/07/2022"]
|
|
175
|
+
}
|
|
176
|
+
],
|
|
177
|
+
"override": false
|
|
178
|
+
}
|
|
77
179
|
}
|
|
78
180
|
},
|
|
79
181
|
{
|
|
@@ -90,10 +192,34 @@
|
|
|
90
192
|
]
|
|
91
193
|
}
|
|
92
194
|
},
|
|
195
|
+
{
|
|
196
|
+
"name": "Multi-select with pills",
|
|
197
|
+
"props": {
|
|
198
|
+
"variant": "default",
|
|
199
|
+
"multiSelect": true,
|
|
200
|
+
"placeholder": "Select countries",
|
|
201
|
+
"formPillProps": { "size": "small", "color": "neutral" },
|
|
202
|
+
"defaultValue": [
|
|
203
|
+
{ "label": "United States", "value": "unitedStates" },
|
|
204
|
+
{ "label": "Italy", "value": "italy" }
|
|
205
|
+
],
|
|
206
|
+
"options": [
|
|
207
|
+
{ "label": "United States", "value": "unitedStates", "id": "us" },
|
|
208
|
+
{ "label": "United Kingdom", "value": "unitedKingdom", "id": "gb" },
|
|
209
|
+
{ "label": "Canada", "value": "canada", "id": "ca" },
|
|
210
|
+
{ "label": "Pakistan", "value": "pakistan", "id": "pk" },
|
|
211
|
+
{ "label": "India", "value": "india", "id": "in" },
|
|
212
|
+
{ "label": "Australia", "value": "australia", "id": "au" },
|
|
213
|
+
{ "label": "New Zealand", "value": "newZealand", "id": "nz" },
|
|
214
|
+
{ "label": "Italy", "value": "italy", "id": "it" }
|
|
215
|
+
]
|
|
216
|
+
}
|
|
217
|
+
},
|
|
93
218
|
{
|
|
94
219
|
"name": "With error",
|
|
95
220
|
"props": {
|
|
96
221
|
"variant": "default",
|
|
222
|
+
"label": "Required field",
|
|
97
223
|
"placeholder": "Required field",
|
|
98
224
|
"error": "Please make a selection.",
|
|
99
225
|
"options": [
|
|
@@ -114,9 +240,32 @@
|
|
|
114
240
|
{ "label": "Banana", "value": "banana", "id": "3" }
|
|
115
241
|
]
|
|
116
242
|
}
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"name": "Constrained height",
|
|
246
|
+
"props": {
|
|
247
|
+
"label": "Choose an Option",
|
|
248
|
+
"constrainHeight": true,
|
|
249
|
+
"options": [
|
|
250
|
+
{ "label": "Option 1", "value": "option_1", "id": "opt_1" },
|
|
251
|
+
{ "label": "Option 2", "value": "option_2", "id": "opt_2" },
|
|
252
|
+
{ "label": "Option 3", "value": "option_3", "id": "opt_3" },
|
|
253
|
+
{ "label": "Option 4", "value": "option_4", "id": "opt_4" },
|
|
254
|
+
{ "label": "Option 5", "value": "option_5", "id": "opt_5" },
|
|
255
|
+
{ "label": "Option 6", "value": "option_6", "id": "opt_6" },
|
|
256
|
+
{ "label": "Option 7", "value": "option_7", "id": "opt_7" },
|
|
257
|
+
{ "label": "Option 8", "value": "option_8", "id": "opt_8" },
|
|
258
|
+
{ "label": "Option 9", "value": "option_9", "id": "opt_9" },
|
|
259
|
+
{ "label": "Option 10", "value": "option_10", "id": "opt_10" },
|
|
260
|
+
{ "label": "Option 11", "value": "option_11", "id": "opt_11" },
|
|
261
|
+
{ "label": "Option 12", "value": "option_12", "id": "opt_12" }
|
|
262
|
+
]
|
|
263
|
+
}
|
|
117
264
|
}
|
|
118
265
|
],
|
|
119
266
|
"conditionals": {
|
|
267
|
+
"requiredIndicator": { "requires": "label" },
|
|
268
|
+
"formPillProps": { "requires": "multiSelect" },
|
|
120
269
|
"rangeEndsToday": { "requires": { "variant": "quickpick" } },
|
|
121
270
|
"controlsStartId": { "requires": { "variant": "quickpick" } },
|
|
122
271
|
"controlsEndId": { "requires": { "variant": "quickpick" } },
|
|
@@ -125,12 +274,36 @@
|
|
|
125
274
|
"hints": {
|
|
126
275
|
"quickpick_scope": {
|
|
127
276
|
"when": { "variant": "quickpick" },
|
|
128
|
-
"message": "Quick pick uses preset date-range options. Use
|
|
277
|
+
"message": "Quick pick uses preset date-range options. Use customQuickPickDates to replace or extend them, and pair controlsStartId / controlsEndId with DatePicker when you need synced date inputs.",
|
|
129
278
|
"type": "info"
|
|
130
279
|
},
|
|
131
280
|
"multi_options": {
|
|
132
281
|
"when": { "multiSelect": true },
|
|
133
|
-
"message": "Multi-select
|
|
282
|
+
"message": "Multi-select returns arrays of selected options. Use formPillProps to adjust the selected-pill appearance and clearable to let users reset the selection.",
|
|
283
|
+
"type": "info"
|
|
284
|
+
},
|
|
285
|
+
"autocomplete_info": {
|
|
286
|
+
"when": { "autocomplete": true },
|
|
287
|
+
"message": "Autocomplete filters the provided options list in place. It works especially well with longer option sets.",
|
|
288
|
+
"type": "info"
|
|
289
|
+
},
|
|
290
|
+
"quickpick_custom_info": {
|
|
291
|
+
"presetName": "Quick pick custom",
|
|
292
|
+
"message": "When override is omitted or true, customQuickPickDates replaces the default quick-pick menu.",
|
|
293
|
+
"type": "info"
|
|
294
|
+
},
|
|
295
|
+
"quickpick_append_info": {
|
|
296
|
+
"presetName": "Quick pick append defaults",
|
|
297
|
+
"message": "Set customQuickPickDates.override to false to append your custom ranges to the built-in quick-pick options.",
|
|
298
|
+
"type": "info"
|
|
299
|
+
},
|
|
300
|
+
"constrained_height_info": {
|
|
301
|
+
"presetName": "Constrained height",
|
|
302
|
+
"message": "constrainHeight restricts the height of the dropdown menu and enables vertical scrolling when the content exceeds this height. This prevents long dropdown lists from rendering off-screen.",
|
|
303
|
+
"type": "info"
|
|
304
|
+
},
|
|
305
|
+
"subcomponent_structure_info": {
|
|
306
|
+
"message": "Switch Structure to “With Subcomponents” to see the explicit Dropdown.Trigger, Dropdown.Container, and Dropdown.Option composition API.",
|
|
134
307
|
"type": "info"
|
|
135
308
|
}
|
|
136
309
|
}
|
|
@@ -1,34 +1,99 @@
|
|
|
1
1
|
{
|
|
2
|
-
"template": "<EmptyState{{props}}
|
|
2
|
+
"template": "<Flex align=\"center\" orientation=\"column\">\n <EmptyState{{props}} />\n</Flex>",
|
|
3
3
|
"propTargets": {},
|
|
4
4
|
"defaults": {
|
|
5
5
|
"alignment": "center",
|
|
6
6
|
"orientation": "vertical",
|
|
7
|
-
"size": "md"
|
|
7
|
+
"size": "md",
|
|
8
|
+
"description": "Body text goes into detail with possible steps for user to take",
|
|
9
|
+
"header": "Title Explains",
|
|
10
|
+
"image": "default"
|
|
8
11
|
},
|
|
9
12
|
"groups": [
|
|
10
13
|
{
|
|
11
|
-
"name": "
|
|
14
|
+
"name": "Layout",
|
|
12
15
|
"props": [
|
|
13
16
|
"alignment",
|
|
14
|
-
"
|
|
17
|
+
"orientation",
|
|
18
|
+
"size"
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "Content",
|
|
23
|
+
"props": [
|
|
15
24
|
"header",
|
|
16
|
-
"
|
|
25
|
+
"description",
|
|
26
|
+
"image"
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "Actions",
|
|
31
|
+
"props": [
|
|
32
|
+
"primaryButton",
|
|
17
33
|
"linkButton",
|
|
18
34
|
"onLinkButtonClick",
|
|
19
|
-
"onPrimaryButtonClick"
|
|
20
|
-
"orientation",
|
|
21
|
-
"primaryButton",
|
|
22
|
-
"size"
|
|
35
|
+
"onPrimaryButtonClick"
|
|
23
36
|
]
|
|
24
37
|
}
|
|
25
38
|
],
|
|
26
39
|
"presets": [
|
|
27
40
|
{
|
|
28
41
|
"name": "Default",
|
|
29
|
-
"props": {
|
|
42
|
+
"props": {
|
|
43
|
+
"description": "Body text goes into detail with possible steps for user to take",
|
|
44
|
+
"header": "Title Explains",
|
|
45
|
+
"image": "default"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "With Primary Action",
|
|
50
|
+
"props": {
|
|
51
|
+
"description": "Body text goes into detail with possible steps for user to take",
|
|
52
|
+
"header": "Title Explains",
|
|
53
|
+
"image": "default",
|
|
54
|
+
"primaryButton": "Next Action"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"name": "With Two Actions",
|
|
59
|
+
"props": {
|
|
60
|
+
"description": "Body text goes into detail with possible steps for user to take",
|
|
61
|
+
"header": "Title Explains",
|
|
62
|
+
"image": "default",
|
|
63
|
+
"linkButton": "Alt Action",
|
|
64
|
+
"primaryButton": "Next Action"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"name": "Horizontal",
|
|
69
|
+
"props": {
|
|
70
|
+
"alignment": "left",
|
|
71
|
+
"description": "Body text goes into detail with possible steps for user to take",
|
|
72
|
+
"header": "Title Explains",
|
|
73
|
+
"image": "default",
|
|
74
|
+
"orientation": "horizontal"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "Small",
|
|
79
|
+
"props": {
|
|
80
|
+
"description": "Body text.",
|
|
81
|
+
"header": "Title Explains",
|
|
82
|
+
"image": "default",
|
|
83
|
+
"size": "sm"
|
|
84
|
+
}
|
|
30
85
|
}
|
|
31
86
|
],
|
|
32
|
-
"conditionals": {
|
|
33
|
-
|
|
87
|
+
"conditionals": {
|
|
88
|
+
"onLinkButtonClick": {
|
|
89
|
+
"requires": "linkButton"
|
|
90
|
+
},
|
|
91
|
+
"onPrimaryButtonClick": {
|
|
92
|
+
"requires": "primaryButton"
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"hints": {},
|
|
96
|
+
"imports": [
|
|
97
|
+
"Flex"
|
|
98
|
+
]
|
|
34
99
|
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"template": "<Flex align=\"center\" orientation=\"column\">\n <EmptyState{{props}} />\n</Flex>",
|
|
3
|
+
"imports": ["Flex"],
|
|
4
|
+
"defaults": {
|
|
5
|
+
"alignment": "center",
|
|
6
|
+
"description": "Body text goes into detail with possible steps for user to take",
|
|
7
|
+
"header": "Title Explains",
|
|
8
|
+
"image": "default",
|
|
9
|
+
"orientation": "vertical",
|
|
10
|
+
"size": "md"
|
|
11
|
+
},
|
|
12
|
+
"groups": [
|
|
13
|
+
{
|
|
14
|
+
"name": "Layout",
|
|
15
|
+
"props": ["alignment", "orientation", "size"]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "Content",
|
|
19
|
+
"props": ["header", "description", "image"]
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "Actions",
|
|
23
|
+
"props": ["primaryButton", "linkButton", "onLinkButtonClick", "onPrimaryButtonClick"]
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"presets": [
|
|
27
|
+
{
|
|
28
|
+
"name": "Default",
|
|
29
|
+
"props": {
|
|
30
|
+
"description": "Body text goes into detail with possible steps for user to take",
|
|
31
|
+
"header": "Title Explains",
|
|
32
|
+
"image": "default"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "With Primary Action",
|
|
37
|
+
"props": {
|
|
38
|
+
"description": "Body text goes into detail with possible steps for user to take",
|
|
39
|
+
"header": "Title Explains",
|
|
40
|
+
"image": "default",
|
|
41
|
+
"primaryButton": "Next Action"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "With Two Actions",
|
|
46
|
+
"props": {
|
|
47
|
+
"description": "Body text goes into detail with possible steps for user to take",
|
|
48
|
+
"header": "Title Explains",
|
|
49
|
+
"image": "default",
|
|
50
|
+
"linkButton": "Alt Action",
|
|
51
|
+
"primaryButton": "Next Action"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"name": "Horizontal",
|
|
56
|
+
"props": {
|
|
57
|
+
"alignment": "left",
|
|
58
|
+
"description": "Body text goes into detail with possible steps for user to take",
|
|
59
|
+
"header": "Title Explains",
|
|
60
|
+
"image": "default",
|
|
61
|
+
"orientation": "horizontal"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"name": "Small",
|
|
66
|
+
"props": {
|
|
67
|
+
"description": "Body text.",
|
|
68
|
+
"header": "Title Explains",
|
|
69
|
+
"image": "default",
|
|
70
|
+
"size": "sm"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
"conditionals": {
|
|
75
|
+
"onLinkButtonClick": { "requires": "linkButton" },
|
|
76
|
+
"onPrimaryButtonClick": { "requires": "primaryButton" }
|
|
77
|
+
},
|
|
78
|
+
"hints": {}
|
|
79
|
+
}
|
|
@@ -2,24 +2,23 @@
|
|
|
2
2
|
"template": "<FileUpload{{props}} />",
|
|
3
3
|
"propTargets": {},
|
|
4
4
|
"defaults": {
|
|
5
|
-
"accept":
|
|
5
|
+
"accept": {}
|
|
6
6
|
},
|
|
7
7
|
"groups": [
|
|
8
8
|
{
|
|
9
|
-
"name": "
|
|
9
|
+
"name": "Guidance",
|
|
10
10
|
"props": [
|
|
11
|
-
"accept",
|
|
12
11
|
"customMessage",
|
|
13
|
-
"
|
|
12
|
+
"accept",
|
|
14
13
|
"acceptedFilesDescription",
|
|
15
|
-
"maxSize"
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
"maxSize"
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "State",
|
|
19
|
+
"props": [
|
|
18
20
|
"error",
|
|
19
|
-
"
|
|
20
|
-
"getInputProps",
|
|
21
|
-
"isDragActive",
|
|
22
|
-
"fileRejections"
|
|
21
|
+
"dark"
|
|
23
22
|
]
|
|
24
23
|
}
|
|
25
24
|
],
|
|
@@ -27,8 +26,94 @@
|
|
|
27
26
|
{
|
|
28
27
|
"name": "Default",
|
|
29
28
|
"props": {}
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"name": "Accepted Types",
|
|
32
|
+
"props": {
|
|
33
|
+
"accept": {
|
|
34
|
+
"image/svg+xml": [
|
|
35
|
+
".svg",
|
|
36
|
+
".xml"
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"name": "Custom Description",
|
|
43
|
+
"props": {
|
|
44
|
+
"accept": {
|
|
45
|
+
"application/pdf": [
|
|
46
|
+
".pdf"
|
|
47
|
+
],
|
|
48
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": [
|
|
49
|
+
".xlsx"
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
"acceptedFilesDescription": "Adobe (.pdf) and Microsoft (.xlsx)"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"name": "Custom Message",
|
|
57
|
+
"props": {
|
|
58
|
+
"customMessage": "Playbook is awesome!"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"name": "Max File Size",
|
|
63
|
+
"props": {
|
|
64
|
+
"accept": {
|
|
65
|
+
"application/pdf": [
|
|
66
|
+
".pdf"
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
"maxSize": 1000000
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"name": "Error State",
|
|
74
|
+
"props": {
|
|
75
|
+
"error": "Please upload a valid file"
|
|
76
|
+
}
|
|
30
77
|
}
|
|
31
78
|
],
|
|
32
|
-
"conditionals": {
|
|
33
|
-
|
|
79
|
+
"conditionals": {
|
|
80
|
+
"acceptedFilesDescription": {
|
|
81
|
+
"requires": "accept"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"hints": {
|
|
85
|
+
"accepted_types_info": {
|
|
86
|
+
"presetName": "Accepted Types",
|
|
87
|
+
"message": "Use MIME-type keys with extension arrays for accept, for example { image/svg+xml: ['.svg', '.xml'] }.",
|
|
88
|
+
"type": "info"
|
|
89
|
+
},
|
|
90
|
+
"custom_description_info": {
|
|
91
|
+
"presetName": "Custom Description",
|
|
92
|
+
"message": "acceptedFilesDescription only changes the helper copy. File validation still comes from the accept object.",
|
|
93
|
+
"type": "info"
|
|
94
|
+
},
|
|
95
|
+
"custom_message_info": {
|
|
96
|
+
"presetName": "Custom Message",
|
|
97
|
+
"message": "customMessage replaces the built-in guidance, including accepted types and max file size text.",
|
|
98
|
+
"type": "info"
|
|
99
|
+
},
|
|
100
|
+
"max_size_info": {
|
|
101
|
+
"presetName": "Max File Size",
|
|
102
|
+
"message": "maxSize is measured in bytes. In app code, pair it with onFilesRejected to surface rejection details.",
|
|
103
|
+
"type": "warning"
|
|
104
|
+
},
|
|
105
|
+
"error_state_info": {
|
|
106
|
+
"presetName": "Error State",
|
|
107
|
+
"message": "Use the error prop for validation or server feedback below the dropzone.",
|
|
108
|
+
"type": "info"
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"hiddenProps": [
|
|
112
|
+
"fileRejections",
|
|
113
|
+
"getInputProps",
|
|
114
|
+
"getRootProps",
|
|
115
|
+
"isDragActive",
|
|
116
|
+
"onFilesAccepted",
|
|
117
|
+
"onFilesRejected"
|
|
118
|
+
]
|
|
34
119
|
}
|