playbook_ui 14.1.0.pre.alpha.PA1477timestampkit3536 → 14.1.0.pre.alpha.PBNTR417addcolorsupdatedefaultcolor3608

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +2 -0
  3. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +3 -3
  4. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.html.erb +1 -1
  5. data/app/pb_kits/playbook/pb_badge/_badge.scss +9 -0
  6. data/app/pb_kits/playbook/pb_badge/_badge.tsx +8 -3
  7. data/app/pb_kits/playbook/pb_badge/badge.rb +1 -1
  8. data/app/pb_kits/playbook/pb_badge/badge.test.js +17 -11
  9. data/app/pb_kits/playbook/pb_badge/docs/_badge_notification.html.erb +13 -0
  10. data/app/pb_kits/playbook/pb_badge/docs/_badge_notification.jsx +31 -12
  11. data/app/pb_kits/playbook/pb_button/_button.tsx +4 -1
  12. data/app/pb_kits/playbook/pb_button/button.html.erb +1 -1
  13. data/app/pb_kits/playbook/pb_button/button.rb +4 -0
  14. data/app/pb_kits/playbook/pb_date_time/dateTime.test.js +2 -2
  15. data/app/pb_kits/playbook/pb_dialog/_close_icon.tsx +5 -1
  16. data/app/pb_kits/playbook/pb_dialog/_dialog.tsx +3 -1
  17. data/app/pb_kits/playbook/pb_dialog/dialog.test.jsx +20 -1
  18. data/app/pb_kits/playbook/pb_dialog/dialog_header.html.erb +1 -1
  19. data/app/pb_kits/playbook/pb_dialog/dialog_header.rb +4 -0
  20. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_default.jsx +1 -5
  21. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_loading.jsx +46 -0
  22. data/app/pb_kits/playbook/pb_dialog/docs/example.yml +1 -0
  23. data/app/pb_kits/playbook/pb_dialog/docs/index.js +1 -0
  24. data/app/pb_kits/playbook/pb_filter/filter.rb +1 -1
  25. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +1 -0
  26. data/app/pb_kits/playbook/pb_form_pill/_form_pill.scss +287 -47
  27. data/app/pb_kits/playbook/pb_form_pill/_form_pill.test.jsx +5 -5
  28. data/app/pb_kits/playbook/pb_form_pill/_form_pill.tsx +8 -4
  29. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_colors.html.erb +117 -0
  30. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_colors.jsx +227 -0
  31. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_colors.md +1 -0
  32. data/app/pb_kits/playbook/pb_form_pill/docs/example.yml +4 -2
  33. data/app/pb_kits/playbook/pb_form_pill/docs/index.js +1 -0
  34. data/app/pb_kits/playbook/pb_form_pill/form_pill.html.erb +4 -4
  35. data/app/pb_kits/playbook/pb_form_pill/form_pill.rb +6 -2
  36. data/app/pb_kits/playbook/pb_gantt_chart/_gantt_chart.scss +3 -0
  37. data/app/pb_kits/playbook/pb_gantt_chart/_gantt_chart.tsx +72 -0
  38. data/app/pb_kits/playbook/pb_gantt_chart/docs/_gantt_chart_default.jsx +53 -0
  39. data/app/pb_kits/playbook/pb_gantt_chart/docs/example.yml +7 -0
  40. data/app/pb_kits/playbook/pb_gantt_chart/docs/index.js +1 -0
  41. data/app/pb_kits/playbook/pb_gantt_chart/gantt_chart.test.jsx +19 -0
  42. data/app/pb_kits/playbook/pb_icon/_icon.tsx +1 -1
  43. data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +5 -3
  44. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_color.html.erb +72 -0
  45. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_color.jsx +91 -0
  46. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_color_rails.md +1 -0
  47. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_color_react.md +1 -0
  48. data/app/pb_kits/playbook/pb_multi_level_select/docs/example.yml +2 -0
  49. data/app/pb_kits/playbook/pb_multi_level_select/docs/index.js +1 -0
  50. data/app/pb_kits/playbook/pb_multi_level_select/multi_level_select.rb +4 -0
  51. data/app/pb_kits/playbook/pb_pagination/_pagination.scss +49 -13
  52. data/app/pb_kits/playbook/pb_pagination/_pagination.tsx +164 -0
  53. data/app/pb_kits/playbook/pb_pagination/docs/_pagination_default.jsx +19 -0
  54. data/app/pb_kits/playbook/pb_pagination/docs/_pagination_default_react.md +1 -0
  55. data/app/pb_kits/playbook/pb_pagination/docs/_pagination_page_change.jsx +62 -0
  56. data/app/pb_kits/playbook/pb_pagination/docs/_pagination_page_change_react.md +1 -0
  57. data/app/pb_kits/playbook/pb_pagination/docs/data.js +23 -0
  58. data/app/pb_kits/playbook/pb_pagination/docs/example.yml +3 -1
  59. data/app/pb_kits/playbook/pb_pagination/docs/index.js +2 -0
  60. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.scss +0 -7
  61. data/app/pb_kits/playbook/pb_popover/_popover.tsx +10 -5
  62. data/app/pb_kits/playbook/pb_rich_text_editor/_previewer_mixin.scss +132 -0
  63. data/app/pb_kits/playbook/pb_rich_text_editor/_tiptap_styles.scss +50 -76
  64. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_preview.jsx +73 -0
  65. data/app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml +1 -0
  66. data/app/pb_kits/playbook/pb_rich_text_editor/docs/index.js +2 -1
  67. data/app/pb_kits/playbook/pb_star_rating/index.js +78 -41
  68. data/app/pb_kits/playbook/pb_star_rating/star_rating.html.erb +4 -2
  69. data/app/pb_kits/playbook/pb_star_rating/star_rating.rb +17 -0
  70. data/app/pb_kits/playbook/pb_star_rating/subcomponents/_star_rating_display.tsx +0 -2
  71. data/app/pb_kits/playbook/pb_star_rating/subcomponents/_star_rating_interactive.tsx +0 -1
  72. data/app/pb_kits/playbook/pb_time/_time.tsx +12 -8
  73. data/app/pb_kits/playbook/pb_time/time.html.erb +3 -3
  74. data/app/pb_kits/playbook/pb_time/time.rb +4 -0
  75. data/app/pb_kits/playbook/pb_timestamp/timestamp.rb +2 -37
  76. data/app/pb_kits/playbook/pb_typeahead/_typeahead.test.jsx +18 -2
  77. data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +4 -0
  78. data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.tsx +26 -18
  79. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_color.html.erb +31 -0
  80. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_color.jsx +26 -0
  81. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_color_rails.md +1 -0
  82. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_color_react.md +1 -0
  83. data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +2 -0
  84. data/app/pb_kits/playbook/pb_typeahead/docs/index.js +1 -0
  85. data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +4 -0
  86. data/app/pb_kits/playbook/tokens/_colors.scss +2 -0
  87. data/app/pb_kits/playbook/tokens/_container.scss +21 -0
  88. data/app/pb_kits/playbook/utilities/_min_width.scss +45 -0
  89. data/app/pb_kits/playbook/utilities/globalPropNames.mjs +1 -0
  90. data/app/pb_kits/playbook/utilities/globalProps.ts +20 -3
  91. data/app/pb_kits/playbook/utilities/icons/allicons.tsx +59 -0
  92. data/app/pb_kits/playbook/utilities/icons/clock.svg +9 -0
  93. data/app/pb_kits/playbook/utilities/icons/spinner.svg +3 -0
  94. data/app/pb_kits/playbook/utilities/icons/times.svg +3 -0
  95. data/dist/chunks/_typeahead-BbHBDL7C.js +22 -0
  96. data/dist/chunks/_weekday_stacked-DEfI42pf.js +45 -0
  97. data/dist/chunks/lazysizes-B7xYodB-.js +1 -0
  98. data/dist/chunks/{lib-BE0Z3F7x.js → lib-u02fp5X7.js} +2 -2
  99. data/dist/chunks/{pb_form_validation-TzZQ0Flx.js → pb_form_validation-iGj5wwU2.js} +1 -1
  100. data/dist/chunks/vendor.js +1 -1
  101. data/dist/menu.yml +4 -0
  102. data/dist/playbook-doc.js +1 -1
  103. data/dist/playbook-rails-react-bindings.js +1 -1
  104. data/dist/playbook-rails.js +1 -1
  105. data/dist/playbook.css +1 -1
  106. data/lib/playbook/classnames.rb +1 -0
  107. data/lib/playbook/spacing.rb +31 -2
  108. data/lib/playbook/version.rb +1 -1
  109. metadata +43 -10
  110. data/dist/chunks/_typeahead-D-4y9pbv.js +0 -22
  111. data/dist/chunks/_weekday_stacked-Cax4nrUa.js +0 -45
  112. data/dist/chunks/lazysizes-DHz07jlL.js +0 -1
  113. /data/app/pb_kits/playbook/pb_pagination/docs/{_pagination_default.md → _pagination_default_rails.md} +0 -0
@@ -3,31 +3,47 @@
3
3
  @import "../tokens/opacity";
4
4
  @import "../tokens/shadows";
5
5
  @import "../pb_avatar/avatar";
6
+ @import "../tokens/typography";
6
7
 
7
8
  $selector: ".pb_form_pill";
8
- $pb_form_pill_height: 37px;
9
- $form_pill_colors: (
10
- primary: map-get($status_color_text, "primary"),
11
- neutral: map-get($status_color_text, "neutral"),
12
- );
9
+ $pb_form_pill_height: 27px;
10
+ $form_pill_colors: map-merge($status_color_text, map-merge($data_colors, $product_colors));
13
11
 
14
12
 
15
13
  [class^=pb_form_pill_kit] {
16
14
  display: inline-flex;
17
15
  justify-content: center;
18
16
  align-items: center;
19
- padding: 0 calc($space-sm/3);
17
+ padding: 0 calc($space-md/2);
20
18
  height: $pb_form_pill_height;
21
19
  border-radius: calc($pb_form_pill_height/2);
22
20
  margin-bottom: 2px;
23
21
  margin-top: 2px;
24
22
  cursor: pointer;
23
+ .pb_form_pill_text, .pb_form_pill_close, .pb_form_pill_tag{
24
+ font-size: $font_small !important;
25
+ }
25
26
  @each $color_name, $color_value in $form_pill_colors {
26
27
  &[class*=_#{$color_name}] {
27
28
  background-color: mix($color_value, $card_light, 10%);
28
29
  @if ($color_name == "neutral") {
29
30
  background-color: $white;
30
31
  border: 1px solid $border_light;
32
+ .pb_form_pill_icon {
33
+ color: $text_lt_default;
34
+ }
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
+ }
31
47
  }
32
48
  transition: background-color 0.2s ease;
33
49
  box-shadow: none;
@@ -38,12 +54,24 @@ $form_pill_colors: (
38
54
  background-color: mix($neutral, $card_light, 20%);
39
55
  border: 1px solid $border_light;
40
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
+ }
41
63
  }
42
64
  &:active {
43
65
  background-color: mix($color_value, $card_light, 30%);
44
66
  @if ($color_name == "neutral") {
45
67
  background-color: mix($neutral, $card_light, 30%);
46
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
+ }
47
75
  }
48
76
  }
49
77
  #{$selector}_text {
@@ -51,33 +79,54 @@ $form_pill_colors: (
51
79
  @if ($color_name == "neutral") {
52
80
  color: $text_lt_default;
53
81
  }
54
- padding-left: $space-sm;
55
- padding-right: calc($space-sm/2);
82
+ @if ($color_name == "warning") {
83
+ color: $yellow;
84
+ }
85
+ padding: 0 $space-xs;
56
86
  }
57
87
  #{$selector}_close {
58
88
  color: $color_value;
59
- padding-left: calc($space-sm/4);
60
- padding-right: calc($space-sm/4);
61
89
  display: flex;
62
90
  align-items: center;
63
- // I had to temporarily change height to 27px so new hover state darker background forms a circle not an oval
64
- // before size change (ticket 2 of 4) - change back to 100% when $pb_form_pill_height changed to 27px from 37px
65
- height: 27px;
66
- border-radius: 70px;
91
+ height: 17px;
92
+ border-radius: calc(50%);
67
93
  cursor: pointer;
94
+ @if ($color_name == "neutral") {
95
+ color: $text_lt_default;
96
+ }
68
97
  &:hover {
69
98
  background-color: mix($color_value, $card_light, 40%);
70
99
  @if ($color_name == "neutral") {
71
100
  background-color: mix($neutral, $card_light, 60%);
72
101
  }
73
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
+ }
74
120
  }
75
121
  #{$selector}_tag {
76
122
  color: $color_value;
77
- padding-left: $space-sm;
123
+ padding: 0 $space-xs;
78
124
  @if ($color_name == "neutral") {
79
125
  color: $text_lt_default;
80
126
  }
127
+ @if ($color_name == "warning") {
128
+ color: $yellow;
129
+ }
81
130
  }
82
131
  }
83
132
  }
@@ -92,51 +141,62 @@ $form_pill_colors: (
92
141
  .pb_form_pill_icon {
93
142
  height: 12px !important;
94
143
  width: 12px !important;
144
+ padding-right: $space_xs;
145
+ + .pb_form_pill_text, + .pb_form_pill_tag {
146
+ padding-left: 0;
147
+ }
95
148
  }
96
149
  &.small {
97
- height: fit-content;
98
- height: -moz-fit-content;
150
+ height: 17px;
151
+ padding: 0 $space-xs;
99
152
  .pb_form_pill_text, .pb_form_pill_close, .pb_form_pill_tag {
100
- font-size: $font_base;
101
- font-weight: $regular;
153
+ font-size: $font_smallest !important;
102
154
  }
103
155
  .pb_form_pill_text, .pb_form_pill_tag {
104
156
  line-height: 1.7;
105
- padding-left: $space_xs;
106
- padding-right: 2px;
157
+ padding: 0 $space_xxs;
158
+ }
159
+ .pb_form_pill_close {
160
+ height: 10px;
161
+ border-radius: calc(50%);
107
162
  }
108
- [class^=pb_avatar_kit], [class^=pb_avatar_kit] .avatar_wrapper {
109
- width: 20px;
110
- height: 20px;
111
- flex-basis: 20px;
112
- &::before { line-height: 21px; }
163
+ [class^=pb_avatar_kit] .avatar_wrapper {
164
+ flex-basis: 16px;
165
+ height: 16px;
166
+ margin-top: 2px;
167
+ width: 16px;
168
+ &::before { line-height: 16.5px; }
169
+ }
170
+ .pb_form_pill_icon {
171
+ padding-right: $space_xxs;
172
+ + .pb_form_pill_text, + .pb_form_pill_tag {
173
+ padding-left: 0;
174
+ }
113
175
  }
114
176
  }
115
177
  &.dark {
116
178
  @each $color_name, $color_value in $form_pill_colors {
117
- // In dark mode, the base patterns below are needed for the next tickets for success, warning, error, info.
118
- // Primary and Neutral are exceptions to the general rule in the handoff
119
179
  &[class*=_#{$color_name}] {
120
- // background-color: mix($color_value, $card_dark, 10%);
121
- // .pb_form_pill_tag {
122
- // color: $color_name;
123
- // }
124
- // .pb_form_pill_close {
125
- // color: $color_name;
126
- // &:hover {
127
- // background-color: mix($color_value, $card_dark, 40%);
128
- // }
129
- // }
130
- // &:hover {
131
- // background-color: mix($color_value, $card_dark, 20%);
132
- // }
133
- // &:active {
134
- // background-color: mix($color_value, $card_dark, 30%);
135
- // }
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
+ }
136
196
  @if ($color_name == "neutral") {
137
197
  background-color: transparent;
138
198
  border: 1px solid $border_dark;
139
- .pb_form_pill_text, .pb_form_pill_tag {
199
+ .pb_form_pill_text, .pb_form_pill_tag, .pb_form_pill_icon {
140
200
  color: $text_dk_default;
141
201
  }
142
202
  .pb_form_pill_close {
@@ -157,7 +217,7 @@ $form_pill_colors: (
157
217
  }
158
218
  @if ($color_name == "primary") {
159
219
  background-color: mix($active_dark, $card_dark, 10%);
160
- .pb_form_pill_text, .pb_form_pill_tag {
220
+ .pb_form_pill_text, .pb_form_pill_tag, .pb_form_pill_icon {
161
221
  color: $active_dark;
162
222
  }
163
223
  .pb_form_pill_close {
@@ -167,12 +227,192 @@ $form_pill_colors: (
167
227
  }
168
228
  }
169
229
  &:hover {
170
- background-color: mix($active_dark, $card_dark, 20px);
230
+ background-color: mix($active_dark, $card_dark, 20%);
171
231
  }
172
232
  &:active {
173
233
  background-color: mix($active_dark, $card_dark, 30%);
174
234
  }
175
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
+ }
176
416
  }
177
417
  }
178
418
  }
@@ -13,7 +13,7 @@ test('should render classname', () => {
13
13
  )
14
14
 
15
15
  const kit = screen.getByTestId(testId)
16
- expect(kit).toHaveClass('pb_form_pill_kit_primary none')
16
+ expect(kit).toHaveClass('pb_form_pill_kit_neutral none')
17
17
  });
18
18
 
19
19
  test('displays text content', () => {
@@ -31,13 +31,13 @@ test('displays text content', () => {
31
31
  test('displays color variant', () => {
32
32
  render(
33
33
  <FormPill
34
- color={"neutral"}
34
+ color={"primary"}
35
35
  data={{ testid: testId }}
36
36
  text={"test"}
37
37
  />
38
38
  )
39
39
  const kit = screen.getByTestId(testId)
40
- expect(kit).toHaveClass(`pb_form_pill_kit_neutral none`)
40
+ expect(kit).toHaveClass(`pb_form_pill_kit_primary none`)
41
41
  });
42
42
 
43
43
  test('displays size variant', () => {
@@ -49,7 +49,7 @@ test('displays size variant', () => {
49
49
  />
50
50
  )
51
51
  const kit = screen.getByTestId('formpill')
52
- expect(kit).toHaveClass(`pb_form_pill_kit_primary small none`)
52
+ expect(kit).toHaveClass(`pb_form_pill_kit_neutral small none`)
53
53
  });
54
54
 
55
55
  test('displays icon', () => {
@@ -60,5 +60,5 @@ test('displays icon', () => {
60
60
  />
61
61
  )
62
62
  const kit = screen.getByTestId('formpill')
63
- expect(kit).toHaveClass(`pb_form_pill_kit_primary_icon none`)
63
+ expect(kit).toHaveClass(`pb_form_pill_kit_neutral_icon none`)
64
64
  });
@@ -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,
@@ -39,13 +39,14 @@ const FormPill = (props: FormPillProps): React.ReactElement => {
39
39
  closeProps = {},
40
40
  size = '',
41
41
  textTransform = 'none',
42
- color = "primary",
42
+ color = "neutral",
43
43
  data = {},
44
44
  tabIndex,
45
45
  icon = "",
46
46
  } = props
47
47
 
48
48
  const iconClass = icon ? "_icon" : ""
49
+ const closeIconSize = size === "small" ? "xs" : "sm"
49
50
  const css = classnames(
50
51
  `pb_form_pill_kit_${color}${iconClass}`,
51
52
  globalProps(props),
@@ -69,7 +70,7 @@ const FormPill = (props: FormPillProps): React.ReactElement => {
69
70
  <Avatar
70
71
  imageUrl={avatarUrl}
71
72
  name={name}
72
- size="xs"
73
+ size="xxs"
73
74
  status={null}
74
75
  />
75
76
  <Title
@@ -84,7 +85,7 @@ const FormPill = (props: FormPillProps): React.ReactElement => {
84
85
  <Avatar
85
86
  imageUrl={avatarUrl}
86
87
  name={name}
87
- size="xs"
88
+ size="xxs"
88
89
  status={null}
89
90
  />
90
91
  <Title
@@ -94,6 +95,7 @@ const FormPill = (props: FormPillProps): React.ReactElement => {
94
95
  />
95
96
  <Icon
96
97
  className="pb_form_pill_icon"
98
+ color={color}
97
99
  icon={icon}
98
100
  />
99
101
  </>
@@ -102,6 +104,7 @@ const FormPill = (props: FormPillProps): React.ReactElement => {
102
104
  <>
103
105
  <Icon
104
106
  className="pb_form_pill_icon"
107
+ color={color}
105
108
  icon={icon}
106
109
  />
107
110
  <Title
@@ -126,6 +129,7 @@ const FormPill = (props: FormPillProps): React.ReactElement => {
126
129
  <Icon
127
130
  fixedWidth
128
131
  icon="times"
132
+ size={closeIconSize}
129
133
  />
130
134
  </div>
131
135
  </div>
@@ -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: "Neutral",
5
+ tabindex: 0,
6
+ }) %>
7
+ <%= pb_rails("form_pill", props: {
8
+ color: "primary",
9
+ text: "Primary",
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
+ }) %>