playbook_ui 14.4.0.pre.rc.14 → 14.4.0.pre.rc.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.scss +245 -23
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.tsx +1 -1
- data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_colors.html.erb +117 -0
- data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_colors.jsx +227 -0
- data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_colors.md +1 -0
- data/app/pb_kits/playbook/pb_form_pill/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_form_pill/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_form_pill/form_pill.rb +1 -1
- data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +5 -1
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_color.html.erb +72 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_color.jsx +91 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_color_rails.md +1 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_color_react.md +1 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_multi_level_select/multi_level_select.rb +4 -0
- data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.scss +97 -21
- data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.test.js +166 -0
- data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.tsx +45 -6
- data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_bubble.html.erb +73 -0
- data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_bubble.jsx +86 -0
- data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_multiple_users_stacked/multiple_users_stacked.html.erb +6 -2
- data/app/pb_kits/playbook/pb_multiple_users_stacked/multiple_users_stacked.rb +21 -1
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.test.jsx +16 -0
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +4 -0
- data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.tsx +26 -18
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_color.html.erb +31 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_color.jsx +26 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_color_rails.md +1 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_color_react.md +1 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +4 -0
- data/app/pb_kits/playbook/tokens/_colors.scss +2 -0
- data/dist/chunks/{_typeahead-BAFhtQtP.js → _typeahead-B2zRxReA.js} +2 -2
- data/dist/chunks/{_weekday_stacked-V_fGN_e4.js → _weekday_stacked-Co95UEiW.js} +2 -2
- data/dist/chunks/{lib--ErPKv63.js → lib-D2U4I1U6.js} +1 -1
- data/dist/chunks/{pb_form_validation-CHMFwDfe.js → pb_form_validation-zV9OpdSt.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/playbook-doc.js +1 -1
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/version.rb +1 -1
- metadata +18 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 162585b7a0ad1426c69f7da5323329c550126e56b2f4ff405210d3234910aacb
|
4
|
+
data.tar.gz: f2ae4a7332b226ff89d8fa640b04f564bbc93ae4e70ddd4d24cc18b5710fea8f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ecbe0b419db7db0aa1578fc90ce8ace4fa7f236b91bece3a5239cef958c54a8020c95a838b5d045279e9416d6680258a4f90afa42d39d0868e6d2c5b03aa949
|
7
|
+
data.tar.gz: 2f60fb872db74f6e91b9078cc7ba1a7b1a6edd275f5056beef0ebe2d3413911be7913e9d8527c28a3fbcd261ec8994961b133e967dc4f1d0dceadca3ebe3e5db
|
@@ -7,10 +7,7 @@
|
|
7
7
|
|
8
8
|
$selector: ".pb_form_pill";
|
9
9
|
$pb_form_pill_height: 27px;
|
10
|
-
$form_pill_colors: (
|
11
|
-
primary: map-get($status_color_text, "primary"),
|
12
|
-
neutral: map-get($status_color_text, "neutral"),
|
13
|
-
);
|
10
|
+
$form_pill_colors: map-merge($status_color_text, map-merge($data_colors, $product_colors));
|
14
11
|
|
15
12
|
|
16
13
|
[class^=pb_form_pill_kit] {
|
@@ -36,6 +33,18 @@ $form_pill_colors: (
|
|
36
33
|
color: $text_lt_default;
|
37
34
|
}
|
38
35
|
}
|
36
|
+
@if ($color_name == "warning") {
|
37
|
+
background-color: mix($yellow, $card_light, 10%);
|
38
|
+
.pb_form_pill_icon {
|
39
|
+
color: $yellow;
|
40
|
+
}
|
41
|
+
}
|
42
|
+
@if ($color_name == "accessories") {
|
43
|
+
background-color: mix($product_8_background, $card_light, 10%);
|
44
|
+
.pb_form_pill_icon {
|
45
|
+
color: $product_8_background;
|
46
|
+
}
|
47
|
+
}
|
39
48
|
transition: background-color 0.2s ease;
|
40
49
|
box-shadow: none;
|
41
50
|
@media (hover:hover) {
|
@@ -45,12 +54,24 @@ $form_pill_colors: (
|
|
45
54
|
background-color: mix($neutral, $card_light, 20%);
|
46
55
|
border: 1px solid $border_light;
|
47
56
|
}
|
57
|
+
@if ($color_name == "warning") {
|
58
|
+
background-color: mix($yellow, $card_light, 20%);
|
59
|
+
}
|
60
|
+
@if ($color_name == "accessories") {
|
61
|
+
background-color: mix($product_8_background, $card_light, 20%);
|
62
|
+
}
|
48
63
|
}
|
49
64
|
&:active {
|
50
65
|
background-color: mix($color_value, $card_light, 30%);
|
51
66
|
@if ($color_name == "neutral") {
|
52
67
|
background-color: mix($neutral, $card_light, 30%);
|
53
68
|
}
|
69
|
+
@if ($color_name == "warning") {
|
70
|
+
background-color: mix($yellow, $card_light, 30%);
|
71
|
+
}
|
72
|
+
@if ($color_name == "accessories") {
|
73
|
+
background-color: mix($product_8_background, $card_light, 30%);
|
74
|
+
}
|
54
75
|
}
|
55
76
|
}
|
56
77
|
#{$selector}_text {
|
@@ -58,6 +79,9 @@ $form_pill_colors: (
|
|
58
79
|
@if ($color_name == "neutral") {
|
59
80
|
color: $text_lt_default;
|
60
81
|
}
|
82
|
+
@if ($color_name == "warning") {
|
83
|
+
color: $yellow;
|
84
|
+
}
|
61
85
|
padding: 0 $space-xs;
|
62
86
|
}
|
63
87
|
#{$selector}_close {
|
@@ -76,6 +100,23 @@ $form_pill_colors: (
|
|
76
100
|
background-color: mix($neutral, $card_light, 60%);
|
77
101
|
}
|
78
102
|
}
|
103
|
+
@if ($color_name == "warning") {
|
104
|
+
color: $yellow;
|
105
|
+
}
|
106
|
+
&:hover {
|
107
|
+
background-color: mix($color_value, $card_light, 40%);
|
108
|
+
@if ($color_name == "warning") {
|
109
|
+
background-color: mix($yellow, $card_light, 40%);
|
110
|
+
}
|
111
|
+
}
|
112
|
+
@if ($color_name == "accessories") {
|
113
|
+
color: $product_8_background;
|
114
|
+
}
|
115
|
+
&:hover {
|
116
|
+
@if ($color_name == "accessories") {
|
117
|
+
background-color: mix($product_8_background, $card_light, 40%);
|
118
|
+
}
|
119
|
+
}
|
79
120
|
}
|
80
121
|
#{$selector}_tag {
|
81
122
|
color: $color_value;
|
@@ -83,6 +124,9 @@ $form_pill_colors: (
|
|
83
124
|
@if ($color_name == "neutral") {
|
84
125
|
color: $text_lt_default;
|
85
126
|
}
|
127
|
+
@if ($color_name == "warning") {
|
128
|
+
color: $yellow;
|
129
|
+
}
|
86
130
|
}
|
87
131
|
}
|
88
132
|
}
|
@@ -132,25 +176,23 @@ $form_pill_colors: (
|
|
132
176
|
}
|
133
177
|
&.dark {
|
134
178
|
@each $color_name, $color_value in $form_pill_colors {
|
135
|
-
// In dark mode, the base patterns below are needed for the next tickets for success, warning, error, info.
|
136
|
-
// Primary and Neutral are exceptions to the general rule in the handoff
|
137
179
|
&[class*=_#{$color_name}] {
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
180
|
+
background-color: mix($color_value, $card_dark, 10%);
|
181
|
+
.pb_form_pill_text, .pb_form_pill_tag, .pb_form_pill_icon {
|
182
|
+
color: $color_name;
|
183
|
+
}
|
184
|
+
.pb_form_pill_close {
|
185
|
+
color: $color_name;
|
186
|
+
&:hover {
|
187
|
+
background-color: mix($color_value, $card_dark, 40%);
|
188
|
+
}
|
189
|
+
}
|
190
|
+
&:hover {
|
191
|
+
background-color: mix($color_value, $card_dark, 20%);
|
192
|
+
}
|
193
|
+
&:active {
|
194
|
+
background-color: mix($color_value, $card_dark, 30%);
|
195
|
+
}
|
154
196
|
@if ($color_name == "neutral") {
|
155
197
|
background-color: transparent;
|
156
198
|
border: 1px solid $border_dark;
|
@@ -185,12 +227,192 @@ $form_pill_colors: (
|
|
185
227
|
}
|
186
228
|
}
|
187
229
|
&:hover {
|
188
|
-
background-color: mix($active_dark, $card_dark,
|
230
|
+
background-color: mix($active_dark, $card_dark, 20%);
|
189
231
|
}
|
190
232
|
&:active {
|
191
233
|
background-color: mix($active_dark, $card_dark, 30%);
|
192
234
|
}
|
193
235
|
}
|
236
|
+
@if ($color_name == "data_1") {
|
237
|
+
background-color: mix($active_dark, $card_dark, 10%);
|
238
|
+
.pb_form_pill_text, .pb_form_pill_tag, .pb_form_pill_icon {
|
239
|
+
color: mix($active_dark, $card_light, 90%);
|
240
|
+
}
|
241
|
+
.pb_form_pill_close {
|
242
|
+
color: mix($active_dark, $card_light, 90%);
|
243
|
+
&:hover {
|
244
|
+
background-color: mix($active_dark, $card_dark, 40%);
|
245
|
+
}
|
246
|
+
}
|
247
|
+
&:hover {
|
248
|
+
background-color: mix($active_dark, $card_dark, 20%);
|
249
|
+
}
|
250
|
+
&:active {
|
251
|
+
background-color: mix($data_1, $card_dark, 30%);
|
252
|
+
}
|
253
|
+
}
|
254
|
+
@if ($color_name == "data_6") {
|
255
|
+
background-color: mix($data_6, $card_dark, 10%);
|
256
|
+
.pb_form_pill_text, .pb_form_pill_tag, .pb_form_pill_icon {
|
257
|
+
color: $text_dk_light;
|
258
|
+
}
|
259
|
+
.pb_form_pill_close {
|
260
|
+
color: $text_dk_light;
|
261
|
+
&:hover {
|
262
|
+
background-color: mix($text_dk_light, $card_dark, 40%);
|
263
|
+
}
|
264
|
+
}
|
265
|
+
&:hover {
|
266
|
+
background-color: mix($data_6, $card_dark, 20%);
|
267
|
+
}
|
268
|
+
&:active {
|
269
|
+
background-color: mix($data_6, $card_dark, 30%);
|
270
|
+
}
|
271
|
+
}
|
272
|
+
@if ($color_name == "windows") {
|
273
|
+
background-color: mix($product_1_highlight, $card_dark, 10%);
|
274
|
+
.pb_form_pill_text, .pb_form_pill_tag, .pb_form_pill_icon {
|
275
|
+
color: $product_1_highlight;
|
276
|
+
}
|
277
|
+
.pb_form_pill_close {
|
278
|
+
color: $product_1_highlight;
|
279
|
+
&:hover {
|
280
|
+
background-color: mix($product_1_highlight, $card_dark, 40%);
|
281
|
+
}
|
282
|
+
}
|
283
|
+
&:hover {
|
284
|
+
background-color: mix($product_1_highlight, $card_dark, 20%);
|
285
|
+
}
|
286
|
+
&:active {
|
287
|
+
background-color: mix($product_1_highlight, $card_dark, 30%);
|
288
|
+
}
|
289
|
+
}
|
290
|
+
@if ($color_name == "siding") {
|
291
|
+
background-color: mix($product_2_highlight, $card_dark, 10%);
|
292
|
+
.pb_form_pill_text, .pb_form_pill_tag, .pb_form_pill_icon {
|
293
|
+
color: $product_2_highlight;
|
294
|
+
}
|
295
|
+
.pb_form_pill_close {
|
296
|
+
color: $product_2_highlight;
|
297
|
+
&:hover {
|
298
|
+
background-color: mix($product_2_highlight, $card_dark, 40%);
|
299
|
+
}
|
300
|
+
}
|
301
|
+
&:hover {
|
302
|
+
background-color: mix($product_2_highlight, $card_dark, 20%);
|
303
|
+
}
|
304
|
+
&:active {
|
305
|
+
background-color: mix($product_2_highlight, $card_dark, 30%);
|
306
|
+
}
|
307
|
+
}
|
308
|
+
@if ($color_name == "roofing") {
|
309
|
+
background-color: mix($product_5_highlight, $card_dark, 10%);
|
310
|
+
.pb_form_pill_text, .pb_form_pill_tag, .pb_form_pill_icon {
|
311
|
+
color: $product_5_highlight;
|
312
|
+
}
|
313
|
+
.pb_form_pill_close {
|
314
|
+
color: $product_5_highlight;
|
315
|
+
&:hover {
|
316
|
+
background-color: mix($product_5_highlight, $card_dark, 40%);
|
317
|
+
}
|
318
|
+
}
|
319
|
+
&:hover {
|
320
|
+
background-color: mix($product_5_highlight, $card_dark, 20%);
|
321
|
+
}
|
322
|
+
&:active {
|
323
|
+
background-color: mix($product_5_highlight, $card_dark, 30%);
|
324
|
+
}
|
325
|
+
}
|
326
|
+
@if ($color_name == "doors") {
|
327
|
+
background-color: mix($product_3_highlight, $card_dark, 10%);
|
328
|
+
.pb_form_pill_text, .pb_form_pill_tag, .pb_form_pill_icon {
|
329
|
+
color: $product_3_highlight;
|
330
|
+
}
|
331
|
+
.pb_form_pill_close {
|
332
|
+
color: $product_3_highlight;
|
333
|
+
&:hover {
|
334
|
+
background-color: mix($product_3_highlight, $card_dark, 40%);
|
335
|
+
}
|
336
|
+
}
|
337
|
+
&:hover {
|
338
|
+
background-color: mix($product_3_highlight, $card_dark, 20%);
|
339
|
+
}
|
340
|
+
&:active {
|
341
|
+
background-color: mix($product_3_highlight, $card_dark, 30%);
|
342
|
+
}
|
343
|
+
}
|
344
|
+
@if ($color_name == "gutters") {
|
345
|
+
background-color: mix($product_6_highlight, $card_dark, 10%);
|
346
|
+
.pb_form_pill_text, .pb_form_pill_tag, .pb_form_pill_icon {
|
347
|
+
color: $product_6_highlight;
|
348
|
+
}
|
349
|
+
.pb_form_pill_close {
|
350
|
+
color: $product_6_highlight;
|
351
|
+
&:hover {
|
352
|
+
background-color: mix($product_6_highlight, $card_dark, 40%);
|
353
|
+
}
|
354
|
+
}
|
355
|
+
&:hover {
|
356
|
+
background-color: mix($product_6_highlight, $card_dark, 20%);
|
357
|
+
}
|
358
|
+
&:active {
|
359
|
+
background-color: mix($product_6_highlight, $card_dark, 30%);
|
360
|
+
}
|
361
|
+
}
|
362
|
+
@if ($color_name == "solar") {
|
363
|
+
background-color: mix($product_4_highlight, $card_dark, 10%);
|
364
|
+
.pb_form_pill_text, .pb_form_pill_tag, .pb_form_pill_icon {
|
365
|
+
color: $product_4_highlight;
|
366
|
+
}
|
367
|
+
.pb_form_pill_close {
|
368
|
+
color: $product_4_highlight;
|
369
|
+
&:hover {
|
370
|
+
background-color: mix($product_4_highlight, $card_dark, 40%);
|
371
|
+
}
|
372
|
+
}
|
373
|
+
&:hover {
|
374
|
+
background-color: mix($product_4_highlight, $card_dark, 20%);
|
375
|
+
}
|
376
|
+
&:active {
|
377
|
+
background-color: mix($product_4_highlight, $card_dark, 30%);
|
378
|
+
}
|
379
|
+
}
|
380
|
+
@if ($color_name == "insulation") {
|
381
|
+
background-color: mix($product_7_highlight, $card_dark, 10%);
|
382
|
+
.pb_form_pill_text, .pb_form_pill_tag, .pb_form_pill_icon {
|
383
|
+
color: $product_7_highlight;
|
384
|
+
}
|
385
|
+
.pb_form_pill_close {
|
386
|
+
color: $product_7_highlight;
|
387
|
+
&:hover {
|
388
|
+
background-color: mix($product_7_highlight, $card_dark, 40%);
|
389
|
+
}
|
390
|
+
}
|
391
|
+
&:hover {
|
392
|
+
background-color: mix($product_7_highlight, $card_dark, 20%);
|
393
|
+
}
|
394
|
+
&:active {
|
395
|
+
background-color: mix($product_7_highlight, $card_dark, 30%);
|
396
|
+
}
|
397
|
+
}
|
398
|
+
@if ($color_name == "accessories") {
|
399
|
+
background-color: mix($product_8_highlight, $card_dark, 10%);
|
400
|
+
.pb_form_pill_text, .pb_form_pill_tag, .pb_form_pill_icon {
|
401
|
+
color: $text_dk_light;
|
402
|
+
}
|
403
|
+
.pb_form_pill_close {
|
404
|
+
color: $text_dk_light;
|
405
|
+
&:hover {
|
406
|
+
background-color: mix($product_8_highlight, $card_dark, 40%);
|
407
|
+
}
|
408
|
+
}
|
409
|
+
&:hover {
|
410
|
+
background-color: mix($product_8_highlight, $card_dark, 20%);
|
411
|
+
}
|
412
|
+
&:active {
|
413
|
+
background-color: mix($product_8_highlight, $card_dark, 30%);
|
414
|
+
}
|
415
|
+
}
|
194
416
|
}
|
195
417
|
}
|
196
418
|
}
|
@@ -17,7 +17,7 @@ type FormPillProps = {
|
|
17
17
|
avatarUrl?: string,
|
18
18
|
size?: string,
|
19
19
|
textTransform?: 'none' | 'lowercase',
|
20
|
-
color?: "primary" | "neutral",
|
20
|
+
color?: "primary" | "neutral" | "success" | "warning" | "error" | "info" | "data_1" | "data_2" | "data_3" | "data_4" | "data_5" | "data_6" | "data_7" | "data_8" | "windows" | "siding" | "roofing" | "doors" | "gutters" | "solar" | "insulation" | "accessories",
|
21
21
|
data?: {[key: string]: string},
|
22
22
|
tabIndex?: number,
|
23
23
|
icon?: string,
|
@@ -0,0 +1,117 @@
|
|
1
|
+
<%= pb_rails("title", props: { text: "Status Colors", tag: "h4", size: 4, margin_bottom: "sm" }) %>
|
2
|
+
|
3
|
+
<%= pb_rails("form_pill", props: {
|
4
|
+
text: "Primary",
|
5
|
+
tabindex: 0,
|
6
|
+
}) %>
|
7
|
+
<%= pb_rails("form_pill", props: {
|
8
|
+
color: "neutral",
|
9
|
+
text: "Neutral",
|
10
|
+
tabindex: 0,
|
11
|
+
}) %>
|
12
|
+
<%= pb_rails("form_pill", props: {
|
13
|
+
color: "success",
|
14
|
+
text: "Success",
|
15
|
+
tabindex: 0,
|
16
|
+
}) %>
|
17
|
+
<%= pb_rails("form_pill", props: {
|
18
|
+
color: "warning",
|
19
|
+
text: "Warning",
|
20
|
+
tabindex: 0,
|
21
|
+
}) %>
|
22
|
+
<%= pb_rails("form_pill", props: {
|
23
|
+
color: "error",
|
24
|
+
text: "Error",
|
25
|
+
tabindex: 0,
|
26
|
+
}) %>
|
27
|
+
<%= pb_rails("form_pill", props: {
|
28
|
+
color: "info",
|
29
|
+
text: "Info",
|
30
|
+
tabindex: 0,
|
31
|
+
}) %>
|
32
|
+
|
33
|
+
<%= pb_rails("title", props: { text: "Data Colors", tag: "h4", size: 4, margin_bottom: "sm", margin_top: "md" }) %>
|
34
|
+
|
35
|
+
<%= pb_rails("form_pill", props: {
|
36
|
+
color: "data_1",
|
37
|
+
text: "Data 1",
|
38
|
+
tabindex: 0,
|
39
|
+
}) %>
|
40
|
+
<%= pb_rails("form_pill", props: {
|
41
|
+
color: "data_2",
|
42
|
+
text: "Data 2",
|
43
|
+
tabindex: 0,
|
44
|
+
}) %>
|
45
|
+
<%= pb_rails("form_pill", props: {
|
46
|
+
color: "data_3",
|
47
|
+
text: "Data 3",
|
48
|
+
tabindex: 0,
|
49
|
+
}) %>
|
50
|
+
<%= pb_rails("form_pill", props: {
|
51
|
+
color: "data_4",
|
52
|
+
text: "Data 4",
|
53
|
+
tabindex: 0,
|
54
|
+
}) %>
|
55
|
+
<%= pb_rails("form_pill", props: {
|
56
|
+
color: "data_5",
|
57
|
+
text: "Data 5",
|
58
|
+
tabindex: 0,
|
59
|
+
}) %>
|
60
|
+
<%= pb_rails("form_pill", props: {
|
61
|
+
color: "data_6",
|
62
|
+
text: "Data 6",
|
63
|
+
tabindex: 0,
|
64
|
+
}) %>
|
65
|
+
<%= pb_rails("form_pill", props: {
|
66
|
+
color: "data_7",
|
67
|
+
text: "Data 7",
|
68
|
+
tabindex: 0,
|
69
|
+
}) %>
|
70
|
+
<%= pb_rails("form_pill", props: {
|
71
|
+
color: "data_8",
|
72
|
+
text: "Data 8",
|
73
|
+
tabindex: 0,
|
74
|
+
}) %>
|
75
|
+
|
76
|
+
<%= pb_rails("title", props: { text: "Product Colors", tag: "h4", size: 4, margin_bottom: "sm", margin_top: "md" }) %>
|
77
|
+
|
78
|
+
<%= pb_rails("form_pill", props: {
|
79
|
+
color: "windows",
|
80
|
+
text: "Windows",
|
81
|
+
tabindex: 0,
|
82
|
+
}) %>
|
83
|
+
<%= pb_rails("form_pill", props: {
|
84
|
+
color: "siding",
|
85
|
+
text: "Siding",
|
86
|
+
tabindex: 0,
|
87
|
+
}) %>
|
88
|
+
<%= pb_rails("form_pill", props: {
|
89
|
+
color: "roofing",
|
90
|
+
text: "Roofing",
|
91
|
+
tabindex: 0,
|
92
|
+
}) %>
|
93
|
+
<%= pb_rails("form_pill", props: {
|
94
|
+
color: "doors",
|
95
|
+
text: "Doors",
|
96
|
+
tabindex: 0,
|
97
|
+
}) %>
|
98
|
+
<%= pb_rails("form_pill", props: {
|
99
|
+
color: "gutters",
|
100
|
+
text: "Gutters",
|
101
|
+
tabindex: 0,
|
102
|
+
}) %>
|
103
|
+
<%= pb_rails("form_pill", props: {
|
104
|
+
color: "solar",
|
105
|
+
text: "Solar",
|
106
|
+
tabindex: 0,
|
107
|
+
}) %>
|
108
|
+
<%= pb_rails("form_pill", props: {
|
109
|
+
color: "insulation",
|
110
|
+
text: "Insulation",
|
111
|
+
tabindex: 0,
|
112
|
+
}) %>
|
113
|
+
<%= pb_rails("form_pill", props: {
|
114
|
+
color: "accessories",
|
115
|
+
text: "Accessories",
|
116
|
+
tabindex: 0,
|
117
|
+
}) %>
|
@@ -0,0 +1,227 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import { FormPill, Title } from 'playbook-ui'
|
3
|
+
|
4
|
+
const FormPillColors = (props) => {
|
5
|
+
return (
|
6
|
+
<div>
|
7
|
+
<Title
|
8
|
+
marginBottom="sm"
|
9
|
+
size={4}
|
10
|
+
text="Status Colors"
|
11
|
+
{...props}
|
12
|
+
/>
|
13
|
+
<FormPill
|
14
|
+
onClick={() => {
|
15
|
+
alert('Click!')
|
16
|
+
}}
|
17
|
+
tabIndex={0}
|
18
|
+
text="Primary"
|
19
|
+
{...props}
|
20
|
+
/>
|
21
|
+
<FormPill
|
22
|
+
color="neutral"
|
23
|
+
onClick={() => {
|
24
|
+
alert('Click!')
|
25
|
+
}}
|
26
|
+
tabIndex={0}
|
27
|
+
text="Neutral"
|
28
|
+
{...props}
|
29
|
+
/>
|
30
|
+
<FormPill
|
31
|
+
color="success"
|
32
|
+
onClick={() => {
|
33
|
+
alert('Click!')
|
34
|
+
}}
|
35
|
+
tabIndex={0}
|
36
|
+
text="Success"
|
37
|
+
{...props}
|
38
|
+
/>
|
39
|
+
<FormPill
|
40
|
+
color="warning"
|
41
|
+
onClick={() => {
|
42
|
+
alert('Click!')
|
43
|
+
}}
|
44
|
+
tabIndex={0}
|
45
|
+
text="Warning"
|
46
|
+
{...props}
|
47
|
+
/>
|
48
|
+
<FormPill
|
49
|
+
color="error"
|
50
|
+
onClick={() => {
|
51
|
+
alert('Click!')
|
52
|
+
}}
|
53
|
+
tabIndex={0}
|
54
|
+
text="Error"
|
55
|
+
{...props}
|
56
|
+
/>
|
57
|
+
<FormPill
|
58
|
+
color="info"
|
59
|
+
onClick={() => {
|
60
|
+
alert('Click!')
|
61
|
+
}}
|
62
|
+
tabIndex={0}
|
63
|
+
text="Info"
|
64
|
+
{...props}
|
65
|
+
/>
|
66
|
+
<Title
|
67
|
+
marginBottom="sm"
|
68
|
+
marginTop="md"
|
69
|
+
size={4}
|
70
|
+
text="Data Colors"
|
71
|
+
{...props}
|
72
|
+
/>
|
73
|
+
<FormPill
|
74
|
+
color="data_1"
|
75
|
+
onClick={() => {
|
76
|
+
alert('Click!')
|
77
|
+
}}
|
78
|
+
tabIndex={0}
|
79
|
+
text="Data 1"
|
80
|
+
{...props}
|
81
|
+
/>
|
82
|
+
<FormPill
|
83
|
+
color="data_2"
|
84
|
+
onClick={() => {
|
85
|
+
alert('Click!')
|
86
|
+
}}
|
87
|
+
tabIndex={0}
|
88
|
+
text="Data 2"
|
89
|
+
{...props}
|
90
|
+
/>
|
91
|
+
<FormPill
|
92
|
+
color="data_3"
|
93
|
+
onClick={() => {
|
94
|
+
alert('Click!')
|
95
|
+
}}
|
96
|
+
tabIndex={0}
|
97
|
+
text="Data 3"
|
98
|
+
{...props}
|
99
|
+
/>
|
100
|
+
<FormPill
|
101
|
+
color="data_4"
|
102
|
+
onClick={() => {
|
103
|
+
alert('Click!')
|
104
|
+
}}
|
105
|
+
tabIndex={0}
|
106
|
+
text="Data 4"
|
107
|
+
{...props}
|
108
|
+
/>
|
109
|
+
<FormPill
|
110
|
+
color="data_5"
|
111
|
+
onClick={() => {
|
112
|
+
alert('Click!')
|
113
|
+
}}
|
114
|
+
tabIndex={0}
|
115
|
+
text="Data 5"
|
116
|
+
{...props}
|
117
|
+
/>
|
118
|
+
<FormPill
|
119
|
+
color="data_6"
|
120
|
+
onClick={() => {
|
121
|
+
alert('Click!')
|
122
|
+
}}
|
123
|
+
tabIndex={0}
|
124
|
+
text="Data 6"
|
125
|
+
{...props}
|
126
|
+
/>
|
127
|
+
<FormPill
|
128
|
+
color="data_7"
|
129
|
+
onClick={() => {
|
130
|
+
alert('Click!')
|
131
|
+
}}
|
132
|
+
tabIndex={0}
|
133
|
+
text="Data 7"
|
134
|
+
{...props}
|
135
|
+
/>
|
136
|
+
<FormPill
|
137
|
+
color="data_8"
|
138
|
+
onClick={() => {
|
139
|
+
alert('Click!')
|
140
|
+
}}
|
141
|
+
tabIndex={0}
|
142
|
+
text="Data 8"
|
143
|
+
{...props}
|
144
|
+
/>
|
145
|
+
<Title
|
146
|
+
marginBottom="sm"
|
147
|
+
marginTop="md"
|
148
|
+
size={4}
|
149
|
+
text="Product Colors"
|
150
|
+
{...props}
|
151
|
+
/>
|
152
|
+
<FormPill
|
153
|
+
color="windows"
|
154
|
+
onClick={() => {
|
155
|
+
alert('Click!')
|
156
|
+
}}
|
157
|
+
tabIndex={0}
|
158
|
+
text="Windows"
|
159
|
+
{...props}
|
160
|
+
/>
|
161
|
+
<FormPill
|
162
|
+
color="siding"
|
163
|
+
onClick={() => {
|
164
|
+
alert('Click!')
|
165
|
+
}}
|
166
|
+
tabIndex={0}
|
167
|
+
text="Siding"
|
168
|
+
{...props}
|
169
|
+
/>
|
170
|
+
<FormPill
|
171
|
+
color="roofing"
|
172
|
+
onClick={() => {
|
173
|
+
alert('Click!')
|
174
|
+
}}
|
175
|
+
tabIndex={0}
|
176
|
+
text="Roofing"
|
177
|
+
{...props}
|
178
|
+
/>
|
179
|
+
<FormPill
|
180
|
+
color="doors"
|
181
|
+
onClick={() => {
|
182
|
+
alert('Click!')
|
183
|
+
}}
|
184
|
+
tabIndex={0}
|
185
|
+
text="Doors"
|
186
|
+
{...props}
|
187
|
+
/>
|
188
|
+
<FormPill
|
189
|
+
color="gutters"
|
190
|
+
onClick={() => {
|
191
|
+
alert('Click!')
|
192
|
+
}}
|
193
|
+
tabIndex={0}
|
194
|
+
text="Gutters"
|
195
|
+
{...props}
|
196
|
+
/>
|
197
|
+
<FormPill
|
198
|
+
color="solar"
|
199
|
+
onClick={() => {
|
200
|
+
alert('Click!')
|
201
|
+
}}
|
202
|
+
tabIndex={0}
|
203
|
+
text="Solar"
|
204
|
+
{...props}
|
205
|
+
/>
|
206
|
+
<FormPill
|
207
|
+
color="insulation"
|
208
|
+
onClick={() => {
|
209
|
+
alert('Click!')
|
210
|
+
}}
|
211
|
+
tabIndex={0}
|
212
|
+
text="Insulation"
|
213
|
+
{...props}
|
214
|
+
/>
|
215
|
+
<FormPill
|
216
|
+
color="accessories"
|
217
|
+
onClick={() => {
|
218
|
+
alert('Click!')
|
219
|
+
}}
|
220
|
+
tabIndex={0}
|
221
|
+
text="Accessories"
|
222
|
+
{...props}
|
223
|
+
/>
|
224
|
+
</div>
|
225
|
+
)
|
226
|
+
}
|
227
|
+
export default FormPillColors
|
@@ -0,0 +1 @@
|
|
1
|
+
The Status, Data, and Product colors highlighted above can be passed to the `color` prop. Primary is the default color. Form pills with a text tag, an avatar, or an icon with text tag can all receive the `color` prop.
|