playbook_ui 15.1.0 → 15.2.0.pre.alpha.PLAY2428advancedtablerailscellpadding11387

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/Hooks/useTableState.ts +7 -0
  3. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_background_control_rails.html.erb +113 -0
  4. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_background_control_rails.md +1 -0
  5. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling.md +1 -1
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_rails.md +1 -1
  7. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control_per_row_rails.html.erb +51 -0
  8. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control_per_row_rails.md +1 -0
  9. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control_rails.html.erb +40 -0
  10. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control_rails.md +1 -0
  11. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_row_styling_rails.md +1 -1
  12. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_row_styling_react.md +1 -1
  13. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +3 -0
  14. data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +2 -1
  15. data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +44 -0
  16. data/app/pb_kits/playbook/pb_button/_button.scss +6 -0
  17. data/app/pb_kits/playbook/pb_button/docs/_button_loading.html.erb +7 -3
  18. data/app/pb_kits/playbook/pb_button/docs/_button_loading.jsx +29 -0
  19. data/app/pb_kits/playbook/pb_button/docs/_button_managed_disabled.html.erb +31 -0
  20. data/app/pb_kits/playbook/pb_button/docs/_button_managed_disabled.md +7 -0
  21. data/app/pb_kits/playbook/pb_button/docs/_button_managed_disabled_helper.html.erb +21 -0
  22. data/app/pb_kits/playbook/pb_button/docs/_button_managed_disabled_helper.md +7 -0
  23. data/app/pb_kits/playbook/pb_button/docs/example.yml +2 -0
  24. data/app/pb_kits/playbook/pb_button/index.js +99 -0
  25. data/app/pb_kits/playbook/pb_date_picker/_date_picker.scss +4 -0
  26. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_stacked_alert.html.erb +16 -16
  27. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_stacked_alert.jsx +2 -1
  28. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_status.html.erb +31 -31
  29. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_status.jsx +4 -3
  30. data/app/pb_kits/playbook/pb_draggable/_draggable.scss +8 -0
  31. data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +105 -29
  32. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +12 -1
  33. data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.tsx +2 -2
  34. data/app/pb_kits/playbook/pb_icon_stat_value/_icon_stat_value.scss +15 -21
  35. data/app/pb_kits/playbook/pb_icon_stat_value/_icon_stat_value.tsx +6 -5
  36. data/app/pb_kits/playbook/pb_icon_stat_value/icon_stat_value.html.erb +2 -0
  37. data/app/pb_kits/playbook/pb_icon_stat_value/icon_stat_value.rb +11 -3
  38. data/app/pb_kits/playbook/pb_icon_stat_value/icon_stat_value.test.js +9 -8
  39. data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.scss +36 -9
  40. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +105 -22
  41. data/app/pb_kits/playbook/pb_text_input/_text_input.scss +3 -0
  42. data/app/pb_kits/playbook/pb_text_input/_text_input.tsx +14 -6
  43. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_default.html.erb +8 -4
  44. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_default.jsx +5 -0
  45. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_default.md +1 -0
  46. data/app/pb_kits/playbook/pb_text_input/text_input.html.erb +3 -1
  47. data/app/pb_kits/playbook/pb_text_input/text_input.rb +6 -0
  48. data/app/pb_kits/playbook/pb_timeline/_timeline.scss +250 -233
  49. data/app/pb_kits/playbook/pb_timeline/_timeline.tsx +1 -1
  50. data/app/pb_kits/playbook/pb_timeline/timeline.test.js +2 -2
  51. data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +10 -10
  52. data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +39 -1
  53. data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +2 -0
  54. data/app/pb_kits/playbook/utilities/_hover.scss +2 -2
  55. data/app/pb_kits/playbook/utilities/globalProps.ts +2 -2
  56. data/dist/chunks/{_line_graph-CW8Ygzyq.js → _line_graph-DY4PK6AH.js} +1 -1
  57. data/dist/chunks/_typeahead-fQDb_yVO.js +6 -0
  58. data/dist/chunks/{_weekday_stacked-3-FtXg76.js → _weekday_stacked-D_bGbWtk.js} +3 -3
  59. data/dist/chunks/{lib-izYrkvOQ.js → lib-QZuu1ltS.js} +2 -2
  60. data/dist/chunks/{pb_form_validation-Cah5Z5J3.js → pb_form_validation-CleM960_.js} +1 -1
  61. data/dist/chunks/vendor.js +1 -1
  62. data/dist/menu.yml +1 -1
  63. data/dist/playbook-doc.js +2 -2
  64. data/dist/playbook-rails-react-bindings.js +1 -1
  65. data/dist/playbook-rails.js +1 -1
  66. data/dist/playbook.css +1 -1
  67. data/lib/playbook/hover.rb +5 -1
  68. data/lib/playbook/pb_forms_helper.rb +7 -6
  69. data/lib/playbook/version.rb +2 -2
  70. metadata +19 -7
  71. data/dist/chunks/_typeahead-DUIMqJiu.js +0 -6
@@ -3,12 +3,12 @@
3
3
  <%= pb_rails("button", props: { text: "Delete Status", data: {"open-dialog": "dialog-stacked-delete"}, margin_right: "md" }) %>
4
4
 
5
5
 
6
- <%= pb_rails("dialog", props: {
7
- id:"dialog-stacked-default",
6
+ <%= pb_rails("dialog", props: {
7
+ id:"dialog-stacked-default",
8
8
  status: "default",
9
- size: "sm",
10
- title: "Are you sure?",
11
- text: "Text explaining why there is an alert",
9
+ size: "sm",
10
+ title: "Are you sure?",
11
+ text: "Text explaining why there is an alert",
12
12
  }) do %>
13
13
  <%= pb_rails("dialog/dialog_footer") do %>
14
14
  <%= pb_rails("flex", props: { orientation: "column", padding_x:"md", padding: "sm" }) do %>
@@ -18,12 +18,12 @@
18
18
  <% end %>
19
19
  <% end %>
20
20
 
21
- <%= pb_rails("dialog", props: {
22
- id:"dialog-stacked-caution",
21
+ <%= pb_rails("dialog", props: {
22
+ id:"dialog-stacked-caution",
23
23
  status: "caution",
24
- size: "sm",
25
- title: "Are you sure?",
26
- text: "This is the action you will be taking",
24
+ size: "sm",
25
+ title: "Are you sure?",
26
+ text: "This is the action you will be taking",
27
27
  }) do %>
28
28
  <%= pb_rails("dialog/dialog_footer") do %>
29
29
  <%= pb_rails("flex", props: { orientation: "column", padding_x:"md", padding: "sm" }) do %>
@@ -33,16 +33,16 @@
33
33
  <% end %>
34
34
  <% end %>
35
35
 
36
- <%= pb_rails("dialog", props: {
37
- id:"dialog-stacked-delete",
36
+ <%= pb_rails("dialog", props: {
37
+ id:"dialog-stacked-delete",
38
38
  status: "delete",
39
- size: "sm",
40
- title: "Delete",
41
- text: "You are about to delete ...",
39
+ size: "sm",
40
+ title: "Delete",
41
+ text: "You are about to delete ...",
42
42
  }) do %>
43
43
  <%= pb_rails("dialog/dialog_footer") do %>
44
44
  <%= pb_rails("flex", props: { orientation: "column", padding_x:"md", padding: "sm" }) do %>
45
- <%= pb_rails("button", props: { text: "Yes, Action", full_width: true }) %>
45
+ <%= pb_rails("button", props: { text: "Yes, Action", variant: "danger", full_width: true }) %>
46
46
  <%= pb_rails("button", props: { text: "No, Cancel", variant: "secondary", full_width: true, margin_top: "sm", data: {"close-dialog": "dialog-stacked-delete" } }) %>
47
47
  <% end %>
48
48
  <% end %>
@@ -51,7 +51,7 @@ const DialogStackedAlert = () => {
51
51
  return (
52
52
  <div>
53
53
  <Flex
54
- rowGap="xs"
54
+ rowGap="xs"
55
55
  wrap
56
56
  >
57
57
  <Button
@@ -93,6 +93,7 @@ const DialogStackedAlert = () => {
93
93
  <Button
94
94
  fullWidth
95
95
  onClick={dialog.toggle}
96
+ variant= {dialog.status == "delete" ? "danger" : "primary"}
96
97
  >
97
98
  {dialog.buttonOneText}
98
99
  </Button>
@@ -8,12 +8,12 @@
8
8
  <%= pb_rails("button", props: { text: "Success Status", data: {"open-dialog": "dialog-status-success"}, margin_right: "md" }) %>
9
9
  <% end %>
10
10
 
11
- <%= pb_rails("dialog", props: {
12
- id:"dialog-status-default",
11
+ <%= pb_rails("dialog", props: {
12
+ id:"dialog-status-default",
13
13
  status: "default",
14
- size: "status_size",
15
- title: "Are you sure?",
16
- text: "Text explaining why there is an alert",
14
+ size: "status_size",
15
+ title: "Are you sure?",
16
+ text: "Text explaining why there is an alert",
17
17
  }) do %>
18
18
  <%= pb_rails("dialog/dialog_footer") do %>
19
19
  <%= pb_rails("flex", props: { spacing:"between", padding_x:"md", padding_bottom:"md", padding: "sm" }) do %>
@@ -23,12 +23,12 @@
23
23
  <% end %>
24
24
  <% end %>
25
25
 
26
- <%= pb_rails("dialog", props: {
27
- id:"dialog-status-info",
26
+ <%= pb_rails("dialog", props: {
27
+ id:"dialog-status-info",
28
28
  status: "info",
29
- size: "status_size",
30
- title: "Information",
31
- text: "Text explaining why there is an alert",
29
+ size: "status_size",
30
+ title: "Information",
31
+ text: "Text explaining why there is an alert",
32
32
  }) do %>
33
33
  <%= pb_rails("dialog/dialog_footer") do %>
34
34
  <%= pb_rails("flex", props: { spacing:"between", padding_x:"md", padding_bottom:"md", padding: "sm" }) do %>
@@ -37,12 +37,12 @@
37
37
  <% end %>
38
38
  <% end %>
39
39
 
40
- <%= pb_rails("dialog", props: {
41
- id:"dialog-status-caution",
40
+ <%= pb_rails("dialog", props: {
41
+ id:"dialog-status-caution",
42
42
  status: "caution",
43
- size: "status_size",
44
- title: "Are you Sure?",
45
- text: "This is the action you will be taking",
43
+ size: "status_size",
44
+ title: "Are you Sure?",
45
+ text: "This is the action you will be taking",
46
46
  }) do %>
47
47
  <%= pb_rails("dialog/dialog_footer") do %>
48
48
  <%= pb_rails("flex", props: { spacing:"between", padding_x:"md", padding_bottom:"md", padding: "sm" }) do %>
@@ -52,27 +52,27 @@
52
52
  <% end %>
53
53
  <% end %>
54
54
 
55
- <%= pb_rails("dialog", props: {
56
- id:"dialog-status-delete",
55
+ <%= pb_rails("dialog", props: {
56
+ id:"dialog-status-delete",
57
57
  status: "delete",
58
- size: "status_size",
59
- title: "Delete",
60
- text: "You are about to delete ...",
58
+ size: "status_size",
59
+ title: "Delete",
60
+ text: "You are about to delete ...",
61
61
  }) do %>
62
62
  <%= pb_rails("dialog/dialog_footer") do %>
63
63
  <%= pb_rails("flex", props: { spacing:"between", padding_x:"md", padding_bottom:"md", padding: "sm" }) do %>
64
- <%= pb_rails("button", props: { text: "Yes, Delete" }) %>
64
+ <%= pb_rails("button", props: { text: "Yes, Delete", variant: "danger" }) %>
65
65
  <%= pb_rails("button", props: { text: "No, Cancel", variant: "secondary", data: {"close-dialog": "dialog-status-delete" } }) %>
66
66
  <% end %>
67
67
  <% end %>
68
68
  <% end %>
69
69
 
70
- <%= pb_rails("dialog", props: {
71
- id:"dialog-status-error",
70
+ <%= pb_rails("dialog", props: {
71
+ id:"dialog-status-error",
72
72
  status: "error",
73
- size: "status_size",
74
- title: "Error Message",
75
- text: "Text explaining the error",
73
+ size: "status_size",
74
+ title: "Error Message",
75
+ text: "Text explaining the error",
76
76
  }) do %>
77
77
  <%= pb_rails("dialog/dialog_footer") do %>
78
78
  <%= pb_rails("flex", props: { spacing:"between", padding_x:"md", padding_bottom:"md", padding: "sm" }) do %>
@@ -81,12 +81,12 @@
81
81
  <% end %>
82
82
  <% end %>
83
83
 
84
- <%= pb_rails("dialog", props: {
85
- id:"dialog-status-success",
84
+ <%= pb_rails("dialog", props: {
85
+ id:"dialog-status-success",
86
86
  status: "success",
87
- size: "status_size",
88
- title: "Success!",
89
- text: "Text explaining what is successful",
87
+ size: "status_size",
88
+ title: "Success!",
89
+ text: "Text explaining what is successful",
90
90
  }) do %>
91
91
  <%= pb_rails("dialog/dialog_footer") do %>
92
92
  <%= pb_rails("flex", props: { spacing:"between", padding_x:"md", padding_bottom:"md", padding: "sm" }) do %>
@@ -83,8 +83,8 @@ const DialogStatus = () => {
83
83
 
84
84
  return (
85
85
  <div>
86
- <Flex
87
- rowGap="xs"
86
+ <Flex
87
+ rowGap="xs"
88
88
  wrap
89
89
  >
90
90
  <Button
@@ -117,7 +117,7 @@ const DialogStatus = () => {
117
117
  >
118
118
  {"Success Status"}
119
119
  </Button>
120
- <Button
120
+ <Button
121
121
  marginRight="md"
122
122
  onClick={toggleErrorAlert}
123
123
  >
@@ -152,6 +152,7 @@ const DialogStatus = () => {
152
152
  <Button
153
153
  onClick={dialog.toggle}
154
154
  paddingRight="xl"
155
+ variant={dialog.status == "delete" ? "danger" : "primary"}
155
156
  >
156
157
  {dialog.buttonOneText}
157
158
  </Button>
@@ -141,4 +141,12 @@
141
141
  }
142
142
  }
143
143
  }
144
+
145
+ .pb_draggable_item:has(.pb_item_kit) {
146
+ border-bottom: 1px solid $border_light;
147
+ }
148
+
149
+ .pb_draggable_item:has(.pb_item_kit):last-child {
150
+ border-bottom: none;
151
+ }
144
152
  }
@@ -10,9 +10,15 @@
10
10
  @import "./scss_partials/dropdown_animation";
11
11
  @import "dropdown_mixin";
12
12
 
13
- [class*="pb_dropdown"] {
13
+ .pb_dropdown_default,
14
+ .pb_dropdown_subtle,
15
+ .pb_dropdown_default_separators_hidden,
16
+ .pb_dropdown_subtle_separators_hidden {
14
17
  .dropdown_wrapper {
15
- [class*="dropdown_trigger_wrapper"] {
18
+ .dropdown_trigger_wrapper,
19
+ .dropdown_trigger_wrapper_focus,
20
+ .dropdown_trigger_wrapper_focus_select_only,
21
+ .dropdown_trigger_wrapper_select_only {
16
22
  @include pb_body;
17
23
  border: 1px solid $border_light;
18
24
  background-color: $white;
@@ -48,11 +54,11 @@
48
54
  transition: box-shadow 0.15s ease-in-out;
49
55
  }
50
56
 
51
- &[class*="_select_only"] {
57
+ &.dropdown_trigger_wrapper_select_only {
52
58
  box-shadow: inset 0 -11px 20px rgba($primary, 0.05);
53
59
  }
54
60
 
55
- &[class*="_focus"] {
61
+ &.dropdown_trigger_wrapper_focus {
56
62
  box-shadow: 0px 0px 0 1px $primary !important;
57
63
  transition: box-shadow 0.1s ease-in-out;
58
64
  }
@@ -69,7 +75,12 @@
69
75
  z-index: $z_1;
70
76
  width: 100%;
71
77
 
72
- [class*="pb_dropdown_option"] {
78
+ .pb_dropdown_option,
79
+ .pb_dropdown_option_list,
80
+ .pb_dropdown_option_selected,
81
+ .pb_dropdown_option_focused,
82
+ .pb_dropdown_option_list_focused,
83
+ .pb_dropdown_option_selected_focused {
73
84
  padding-left: $space_sm;
74
85
  padding-right: $space_sm;
75
86
  padding-top: $space_xs;
@@ -79,11 +90,14 @@
79
90
  background-color: $bg_light;
80
91
  }
81
92
 
82
- &[class*="_focused"] {
93
+ &.pb_dropdown_option_focused,
94
+ &.pb_dropdown_option_list_focused,
95
+ &.pb_dropdown_option_selected_focused {
83
96
  background-color: $bg_light;
84
97
  }
85
98
 
86
- &[class*="_list"] {
99
+ &.pb_dropdown_option_list,
100
+ &.pb_dropdown_option_list_focused {
87
101
  border-bottom: 1px solid $border_light;
88
102
 
89
103
  &:hover, &:focus {
@@ -92,7 +106,8 @@
92
106
  }
93
107
  }
94
108
  }
95
- &[class*="selected"] {
109
+ &.pb_dropdown_option_selected,
110
+ &.pb_dropdown_option_selected_focused {
96
111
  background-color: $primary;
97
112
  color: $white;
98
113
  [class^="pb_body"],
@@ -141,41 +156,66 @@
141
156
  }
142
157
 
143
158
  &.error {
144
- [class*=pb_body_kit] {
159
+ .pb_body_kit_negative {
145
160
  margin-top: $space_xs / 2;
146
161
  }
147
162
 
148
- [class*="dropdown_trigger_wrapper"] {
163
+ .dropdown_trigger_wrapper,
164
+ .dropdown_trigger_wrapper_focus,
165
+ .dropdown_trigger_wrapper_focus_select_only,
166
+ .dropdown_trigger_wrapper_select_only {
149
167
  border-color: $error;
150
168
  box-shadow: none !important;
151
169
  }
152
170
  }
153
171
  }
154
172
 
155
- &[class*="separators_hidden"] {
173
+ &.pb_dropdown_default_separators_hidden,
174
+ &.pb_dropdown_subtle_separators_hidden {
156
175
  .dropdown_wrapper {
157
176
  .pb_dropdown_container {
158
177
 
159
- [class*="pb_dropdown_option"] {
178
+ .pb_dropdown_option,
179
+ .pb_dropdown_option_list,
180
+ .pb_dropdown_option_selected,
181
+ .pb_dropdown_option_focused,
182
+ .pb_dropdown_option_list_focused,
183
+ .pb_dropdown_option_selected_focused {
160
184
  border: none;
161
185
  }
162
186
  }
163
187
  }
164
188
  }
165
189
 
166
- &[class*="subtle"] {
190
+ &.pb_dropdown_subtle,
191
+ &.pb_dropdown_subtle_separators_hidden {
167
192
  .dropdown_wrapper {
168
193
  .pb_dropdown_container {
169
194
 
170
- [class*="pb_dropdown_option"]:first-child {
195
+ .pb_dropdown_option:first-child,
196
+ .pb_dropdown_option_list:first-child,
197
+ .pb_dropdown_option_selected:first-child,
198
+ .pb_dropdown_option_focused:first-child,
199
+ .pb_dropdown_option_list_focused:first-child,
200
+ .pb_dropdown_option_selected_focused:first-child {
171
201
  margin-top: $space_xs;
172
202
  }
173
203
 
174
- [class*="pb_dropdown_option"]:last-child {
204
+ .pb_dropdown_option:last-child,
205
+ .pb_dropdown_option_list:last-child,
206
+ .pb_dropdown_option_selected:last-child,
207
+ .pb_dropdown_option_focused:last-child,
208
+ .pb_dropdown_option_list_focused:last-child,
209
+ .pb_dropdown_option_selected_focused:last-child {
175
210
  margin-bottom: $space_xs;
176
211
  }
177
212
 
178
- [class*="pb_dropdown_option"] {
213
+ .pb_dropdown_option,
214
+ .pb_dropdown_option_list,
215
+ .pb_dropdown_option_selected,
216
+ .pb_dropdown_option_focused,
217
+ .pb_dropdown_option_list_focused,
218
+ .pb_dropdown_option_selected_focused {
179
219
  margin: $space_xs;
180
220
  padding: $space_xs;
181
221
  border-radius: $border_radius_md;
@@ -193,24 +233,44 @@
193
233
  }
194
234
  }
195
235
 
196
- [class*="pb_dropdown_option"]:last-child::after {
236
+ .pb_dropdown_option:last-child::after,
237
+ .pb_dropdown_option_list:last-child::after,
238
+ .pb_dropdown_option_selected:last-child::after,
239
+ .pb_dropdown_option_focused:last-child::after,
240
+ .pb_dropdown_option_list_focused:last-child::after,
241
+ .pb_dropdown_option_selected_focused:last-child::after {
197
242
  display: none;
198
243
  }
199
244
  }
200
245
  }
201
246
 
202
- &[class*="separators_hidden"] {
247
+ &.pb_dropdown_subtle_separators_hidden {
203
248
  .dropdown_wrapper {
204
249
  .pb_dropdown_container {
205
- [class*="pb_dropdown_option"]:first-child {
250
+ .pb_dropdown_option:first-child,
251
+ .pb_dropdown_option_list:first-child,
252
+ .pb_dropdown_option_selected:first-child,
253
+ .pb_dropdown_option_focused:first-child,
254
+ .pb_dropdown_option_list_focused:first-child,
255
+ .pb_dropdown_option_selected_focused:first-child {
206
256
  margin-top: $space_xs;
207
257
  }
208
258
 
209
- [class*="pb_dropdown_option"]:last-child {
259
+ .pb_dropdown_option:last-child,
260
+ .pb_dropdown_option_list:last-child,
261
+ .pb_dropdown_option_selected:last-child,
262
+ .pb_dropdown_option_focused:last-child,
263
+ .pb_dropdown_option_list_focused:last-child,
264
+ .pb_dropdown_option_selected_focused:last-child {
210
265
  margin-bottom: $space_xs;
211
266
  }
212
267
 
213
- [class*="pb_dropdown_option"] {
268
+ .pb_dropdown_option,
269
+ .pb_dropdown_option_list,
270
+ .pb_dropdown_option_selected,
271
+ .pb_dropdown_option_focused,
272
+ .pb_dropdown_option_list_focused,
273
+ .pb_dropdown_option_selected_focused {
214
274
  padding: $space_xxs $space_xs;
215
275
  margin: $space_xxs $space_xs;
216
276
 
@@ -218,7 +278,8 @@
218
278
  height: 0px;
219
279
  }
220
280
 
221
- &[class*="selected"] {
281
+ &.pb_dropdown_option_selected,
282
+ &.pb_dropdown_option_selected_focused {
222
283
  border-bottom: none;
223
284
  }
224
285
  }
@@ -229,7 +290,10 @@
229
290
 
230
291
  &.dark {
231
292
  .dropdown_wrapper {
232
- [class*="dropdown_trigger_wrapper"] {
293
+ .dropdown_trigger_wrapper,
294
+ .dropdown_trigger_wrapper_focus,
295
+ .dropdown_trigger_wrapper_focus_select_only,
296
+ .dropdown_trigger_wrapper_select_only {
233
297
  @include pb_body_light_dark;
234
298
  background-color: rgba($white, 0.1) !important;
235
299
  background: none;
@@ -244,7 +308,7 @@
244
308
  [class^="pb_body"] {
245
309
  color: $white;
246
310
  }
247
- &[class*="_select_only"] {
311
+ &.dropdown_trigger_wrapper_select_only {
248
312
  box-shadow: inset 0 -11px 20px rgba($white, 0.05);
249
313
  }
250
314
  .dropdown_input {
@@ -254,7 +318,10 @@
254
318
  }
255
319
 
256
320
  &.error {
257
- [class*="dropdown_trigger_wrapper"] {
321
+ .dropdown_trigger_wrapper,
322
+ .dropdown_trigger_wrapper_focus,
323
+ .dropdown_trigger_wrapper_focus_select_only,
324
+ .dropdown_trigger_wrapper_select_only {
258
325
  border-color: $error_dark;
259
326
  }
260
327
  }
@@ -268,19 +335,28 @@
268
335
  color: $white !important;
269
336
  }
270
337
 
271
- [class*="pb_dropdown_option"] {
338
+ .pb_dropdown_option,
339
+ .pb_dropdown_option_list,
340
+ .pb_dropdown_option_selected,
341
+ .pb_dropdown_option_focused,
342
+ .pb_dropdown_option_list_focused,
343
+ .pb_dropdown_option_selected_focused {
272
344
  &:hover {
273
345
  background-color: $hover_dark;
274
346
  }
275
347
 
276
- &[class*="_focused"] {
348
+ &.pb_dropdown_option_focused,
349
+ &.pb_dropdown_option_list_focused,
350
+ &.pb_dropdown_option_selected_focused {
277
351
  background-color: $hover_dark;
278
352
  }
279
353
 
280
- &[class*="_list"] {
354
+ &.pb_dropdown_option_list,
355
+ &.pb_dropdown_option_list_focused {
281
356
  border-color: rgba($white, 0.15);
282
357
  }
283
- &[class*="selected"] {
358
+ &.pb_dropdown_option_selected,
359
+ &.pb_dropdown_option_selected_focused {
284
360
  background-color: $primary;
285
361
  border-bottom: rgba($white, 0.15);
286
362
  }
@@ -21,6 +21,15 @@
21
21
  ]
22
22
  %>
23
23
 
24
+ <%
25
+ example_typeahead_options = [
26
+ { label: 'Orange', value: '#FFA500' },
27
+ { label: 'Red', value: '#FF0000' },
28
+ { label: 'Green', value: '#00FF00' },
29
+ { label: 'Blue', value: '#0000FF' },
30
+ ]
31
+ %>
32
+
24
33
  <% treeData = [{
25
34
  label: "Power Home Remodeling",
26
35
  value: "Power Home Remodeling",
@@ -89,8 +98,10 @@
89
98
 
90
99
  <%= pb_form_with(scope: :example, method: :get, url: "", validate: true) do |form| %>
91
100
  <%= form.typeahead :example_typeahead_validation, props: { data: { typeahead_example2: true, user: {} }, label: true, placeholder: "Search for a user", required: true, validation: { message: "Please select a user." } } %>
101
+ <%= form.typeahead :example_typeahead_validation_react, props: { options: example_typeahead_options, pills: true, label: "Example Typeahead (React Rendered)", placeholder: "Search for a user", required: true, validation: { message: "Please select a color." } } %>
102
+ <%= form.typeahead :example_typeahead_validation_react_2, props: { options: example_typeahead_options, pills: true, label: "Example Typeahead 2 (React Rendered)", placeholder: "Search for a user", required: true } %>
92
103
  <%= form.text_field :example_text_field_validation, props: { label: true, required: true } %>
93
- <%= form.phone_number_field :example_phone_number_field_validation, props: { label: "Example phone field", hidden_inputs: true } %>
104
+ <%= form.phone_number_field :example_phone_number_field_validation, props: { label: "Example phone field", hidden_inputs: true, required: true } %>
94
105
  <%= form.email_field :example_email_field_validation, props: { label: true, required: true } %>
95
106
  <%= form.number_field :example_number_field_validation, props: { label: true, required: true } %>
96
107
  <%= form.search_field :example_project_number_validation, props: { label: true, required: true, validation: { pattern: "[0-9]{2}-[0-9]{5}", message: "Please enter a valid project number (example: 33-12345)." } } %>
@@ -3,7 +3,7 @@ import React from 'react'
3
3
  import classnames from 'classnames'
4
4
 
5
5
  import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
6
- import { globalProps } from '../utilities/globalProps'
6
+ import { globalProps, GlobalProps } from '../utilities/globalProps'
7
7
 
8
8
  import Icon from '../pb_icon/_icon'
9
9
 
@@ -26,7 +26,7 @@ type IconCircleProps = {
26
26
  | "orange"
27
27
  | "green"
28
28
  | "lighter",
29
- }
29
+ } & GlobalProps
30
30
 
31
31
  const IconCircle = (props: IconCircleProps) => {
32
32
  const {
@@ -3,51 +3,45 @@
3
3
  @import "../tokens/spacing";
4
4
  @import "../pb_icon_circle/icon_circle";
5
5
 
6
- [class^=pb_icon_stat_value_kit]{
6
+ .pb_icon_stat_value_kit_horizontal,
7
+ .pb_icon_stat_value_kit_vertical
8
+ {
7
9
  display: flex;
8
10
  align-items: baseline;
9
11
 
10
- &[class*=_vertical] {
12
+ &.pb_icon_stat_value_kit_vertical {
11
13
  flex-direction: column;
12
14
 
13
- &[class*=_center] {
15
+ &.text_align_center {
14
16
  align-items: center;
15
17
 
16
- [class^=pb_title],
17
- [class^=pb_body],
18
- [class^=pb_caption] {
18
+ .pb_title_kit,
19
+ .pb_body_kit,
20
+ .pb_caption_kit_md {
19
21
  text-align: center;
20
22
  }
21
23
  }
22
24
 
23
- &[class*=_right] {
25
+ &.text_align_right {
24
26
  align-items: flex-end;
25
27
 
26
- [class^=pb_title],
27
- [class^=pb_body],
28
- [class^=pb_caption] {
28
+ .pb_title_kit,
29
+ .pb_body_kit,
30
+ .pb_caption_kit_md {
29
31
  text-align: right;
30
32
  }
31
33
  }
32
-
33
- [class^=pb_icon_circle] {
34
- margin-bottom: $space-xs;
35
- }
36
34
  }
37
35
 
38
- &[class*=_horizontal] {
36
+ &.pb_icon_stat_value_kit_horizontal {
39
37
  align-items: center;
40
38
 
41
- &[class*=_center] {
39
+ &.text_align_center {
42
40
  justify-content: center;
43
41
  }
44
42
 
45
- &[class*=_right] {
43
+ &.text_align_right {
46
44
  justify-content: flex-end;
47
45
  }
48
-
49
- [class^=pb_icon_circle] {
50
- margin-right: $space-sm;
51
- }
52
46
  }
53
47
  }
@@ -2,7 +2,7 @@ import React from 'react'
2
2
  import classnames from 'classnames'
3
3
 
4
4
  import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
5
- import { globalProps } from '../utilities/globalProps'
5
+ import { globalProps, GlobalProps } from '../utilities/globalProps'
6
6
 
7
7
  import Body from '../pb_body/_body'
8
8
  import Caption from '../pb_caption/_caption'
@@ -33,8 +33,7 @@ type IconStatValueProps = {
33
33
  | "yellow"
34
34
  | "orange"
35
35
  | "green"
36
- | "lighter",
37
- }
36
+ } & GlobalProps
38
37
 
39
38
  const IconStatValue = (props: IconStatValueProps): React.ReactElement => {
40
39
  const {
@@ -50,13 +49,13 @@ const IconStatValue = (props: IconStatValueProps): React.ReactElement => {
50
49
  text = '',
51
50
  unit = '',
52
51
  value = 0,
53
- variant = 'lighter',
52
+ variant = 'default',
54
53
  } = props
55
54
  const ariaProps = buildAriaProps(aria)
56
55
  const dataProps = buildDataProps(data)
57
56
  const htmlProps = buildHtmlProps(htmlOptions)
58
57
  const classes = classnames(
59
- buildCss('pb_icon_stat_value_kit', orientation, size, variant), globalProps(props),
58
+ buildCss('pb_icon_stat_value_kit', orientation), globalProps(props),
60
59
  className
61
60
  )
62
61
  const titleSize = function(size: "sm" | "md" | "lg") {
@@ -101,6 +100,8 @@ const IconStatValue = (props: IconStatValueProps): React.ReactElement => {
101
100
  <IconCircle
102
101
  dark={dark}
103
102
  icon={icon}
103
+ marginBottom={orientation == 'vertical' ? 'xs' : undefined}
104
+ marginRight={orientation == 'horizontal' ? 'sm' : undefined}
104
105
  size={size}
105
106
  variant={variant}
106
107
  />
@@ -3,6 +3,8 @@
3
3
  <%= pb_rails("icon_circle", props: {
4
4
  dark: object.dark,
5
5
  icon: object.icon,
6
+ margin_right: object.icon_margin_right,
7
+ margin_bottom: object.icon_margin_bottom,
6
8
  size: object.size,
7
9
  variant: object.variant }) %>
8
10