playbook_ui 14.12.0.pre.alpha.PLAY18565866 → 14.12.0.pre.alpha.advancedtablealignmentfixes5693

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +0 -1
  3. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +4 -3
  4. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.html.erb +13 -8
  5. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.rb +0 -2
  6. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +1 -1
  7. data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_loading_react.md → _advanced_table_loading.md} +2 -2
  8. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -1
  9. data/app/pb_kits/playbook/pb_advanced_table/index.js +6 -9
  10. data/app/pb_kits/playbook/pb_advanced_table/table_body.rb +1 -3
  11. data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +5 -9
  12. data/app/pb_kits/playbook/pb_advanced_table/table_header.rb +0 -2
  13. data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +6 -9
  14. data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +0 -2
  15. data/app/pb_kits/playbook/pb_avatar/_avatar.scss +0 -14
  16. data/app/pb_kits/playbook/pb_avatar/_avatar.tsx +7 -11
  17. data/app/pb_kits/playbook/pb_avatar/avatar.html.erb +7 -6
  18. data/app/pb_kits/playbook/pb_avatar/docs/_avatar_badge_component_overlay.jsx +3 -9
  19. data/app/pb_kits/playbook/pb_avatar/docs/_avatar_circle_icon_component_overlay.jsx +2 -6
  20. data/app/pb_kits/playbook/pb_button/button.rb +1 -1
  21. data/app/pb_kits/playbook/pb_date/_date.tsx +4 -14
  22. data/app/pb_kits/playbook/pb_date/docs/_date_default.jsx +1 -2
  23. data/app/pb_kits/playbook/pb_date/docs/_date_unstyled.jsx +5 -13
  24. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_breakpoints.jsx +36 -71
  25. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_menu.jsx +6 -6
  26. data/app/pb_kits/playbook/pb_drawer/docs/example.yml +0 -1
  27. data/app/pb_kits/playbook/pb_file_upload/file_upload.html.erb +6 -1
  28. data/app/pb_kits/playbook/pb_filter/filter.html.erb +5 -1
  29. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/example.yml +0 -1
  30. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/index.js +5 -7
  31. data/app/pb_kits/playbook/pb_form_group/form_group.html.erb +6 -1
  32. data/app/pb_kits/playbook/pb_form_pill/form_pill.html.erb +1 -1
  33. data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.tsx +7 -11
  34. data/app/pb_kits/playbook/pb_home_address_street/docs/example.yml +0 -2
  35. data/app/pb_kits/playbook/pb_home_address_street/docs/index.js +0 -1
  36. data/app/pb_kits/playbook/pb_home_address_street/home_address_street.rb +2 -11
  37. data/app/pb_kits/playbook/pb_table/docs/_table_with_background_kit.html.erb +9 -6
  38. data/app/pb_kits/playbook/pb_table/docs/_table_with_background_kit.jsx +9 -6
  39. data/app/pb_kits/playbook/pb_table/styles/_desktop_collapse.scss +0 -26
  40. data/app/pb_kits/playbook/pb_table/styles/_mobile.scss +1 -0
  41. data/app/pb_kits/playbook/pb_table/styles/_mobile_collapse.scss +0 -25
  42. data/app/pb_kits/playbook/pb_table/styles/_tablet_collapse.scss +0 -25
  43. data/app/pb_kits/playbook/pb_tooltip/_tooltip.tsx +1 -3
  44. data/app/pb_kits/playbook/pb_user/_user.tsx +0 -3
  45. data/app/pb_kits/playbook/pb_user/docs/example.yml +0 -2
  46. data/app/pb_kits/playbook/pb_user/docs/index.js +0 -1
  47. data/app/pb_kits/playbook/pb_user/user.html.erb +1 -1
  48. data/app/pb_kits/playbook/pb_user/user.rb +0 -1
  49. data/app/pb_kits/playbook/pb_user/user.test.js +0 -14
  50. data/dist/chunks/_typeahead-BWwaAo_0.js +36 -0
  51. data/dist/chunks/_weekday_stacked-N1NVUtQO.js +45 -0
  52. data/dist/chunks/vendor.js +1 -1
  53. data/dist/menu.yml +0 -6
  54. data/dist/playbook-doc.js +1 -1
  55. data/dist/playbook-rails-react-bindings.js +1 -1
  56. data/dist/playbook-rails.js +1 -1
  57. data/dist/playbook.css +1 -1
  58. data/lib/playbook/pb_forms_helper.rb +4 -13
  59. data/lib/playbook/version.rb +1 -1
  60. metadata +6 -26
  61. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_loading.html.erb +0 -33
  62. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_loading_rails.md +0 -1
  63. data/app/pb_kits/playbook/pb_copy_button/_copy_button.scss +0 -3
  64. data/app/pb_kits/playbook/pb_copy_button/_copy_button.tsx +0 -92
  65. data/app/pb_kits/playbook/pb_copy_button/copy_button.test.jsx +0 -64
  66. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.jsx +0 -21
  67. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.jsx +0 -45
  68. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.md +0 -1
  69. data/app/pb_kits/playbook/pb_copy_button/docs/example.yml +0 -8
  70. data/app/pb_kits/playbook/pb_copy_button/docs/index.js +0 -2
  71. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close.html.erb +0 -58
  72. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close_rails.md +0 -3
  73. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting.html.erb +0 -11
  74. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting.jsx +0 -22
  75. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting_rails.md +0 -1
  76. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting_react.md +0 -1
  77. data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.html.erb +0 -42
  78. data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.jsx +0 -59
  79. data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.md +0 -2
  80. data/dist/chunks/_typeahead-W0hatdPs.js +0 -36
  81. data/dist/chunks/_weekday_stacked-C98LOqgG.js +0 -45
  82. data/lib/playbook/pb_forms_global_props_helper.rb +0 -136
  83. /data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/{_fixed_confirmation_toast_auto_close_react.md → _fixed_confirmation_toast_auto_close.md} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2036447bc24867ea60730bcd2106f70198ab5d0b0469fcf4536e95bc467d0438
4
- data.tar.gz: 49c1a74a43759e755c88ff965447295cb4beb5ed1e8f6da6d049d4dac840feee
3
+ metadata.gz: 8e4dc3d2e5a79486ca82c7d90654b0cf1db86bdb42cc9c0540ffb9635c373174
4
+ data.tar.gz: cb9d6f1a2680e4ac81dc637ec1984efa4368d5b0739c44f6134ec44f214dccd2
5
5
  SHA512:
6
- metadata.gz: f2c5119a00e999065041fe72546b5236642efc0131902b659f3e89d3b4c381bd747f107bc9142858cd05ff8907716c642e7b8ef3c5ef6717b0f19894874afde9
7
- data.tar.gz: 249ba89e0cbd98113f0d0e913fd039608d585e9f5ae1c9b4d1f5002c4b3dded98964692616c341ff476f2a5602e7a29c45cd5287459182fa3c145fedf3ebe5fc
6
+ metadata.gz: 77ec944b74d30f62a35b54bb1138fa97dd7b4635a67375336fd6c4fd6d3d2875abb8338d271a874688c22f562e126c49387d2ce5ca1d9610a3b12d077f5efb7a
7
+ data.tar.gz: dfbf55ff877f9c17064e58ee45b72a24adf289238e3b06cac9b27f4fa3492dec18d7d6b756cd5053b954d1142de84942468d8b794e2f3432dc8c88e16c19a3c7
@@ -15,7 +15,6 @@
15
15
  @import 'pb_circle_chart/circle_chart';
16
16
  @import 'pb_circle_icon_button/circle_icon_button';
17
17
  @import 'pb_collapsible/collapsible';
18
- @import 'pb_copy_button/copy_button';
19
18
  @import 'pb_contact/contact';
20
19
  @import 'pb_currency/currency';
21
20
  @import 'pb_dashboard_value/dashboard_value';
@@ -89,6 +89,7 @@
89
89
  }
90
90
  }
91
91
 
92
+
92
93
  .table-header-cells-active:first-child {
93
94
  color: $primary !important;
94
95
  }
@@ -178,7 +179,7 @@
178
179
  }
179
180
 
180
181
  // Responsive Styles
181
- @media only screen and (max-width: $screen-xl-min) {
182
+ @media only screen and (max-width: $screen-xl-min) {
182
183
  &[class*="advanced-table-responsive-scroll"] {
183
184
  border-radius: 4px;
184
185
  box-shadow: 1px 0 0 0px $border_light,
@@ -214,7 +215,7 @@
214
215
  .bg-white td:first-child {
215
216
  background-color: $white;
216
217
  }
217
-
218
+
218
219
  }
219
220
  }
220
221
  @media only screen and (min-width: $screen-xl-min) {
@@ -305,4 +306,4 @@
305
306
  }
306
307
  }
307
308
  }
308
- }
309
+ }
@@ -1,10 +1,15 @@
1
1
  <%= pb_content_tag do %>
2
- <%= pb_rails("table", props: { size: "sm", data_table: true, number_spacing:"tabular", responsive:"none", dark: dark, classname: object.loading ? "content-loading" : "" }.merge(object.table_props)) do %>
3
- <% if content.present? %>
4
- <% content.presence %>
5
- <% else %>
6
- <%= pb_rails("advanced_table/table_header", props: { column_definitions: object.column_definitions, enable_toggle_expansion: object.enable_toggle_expansion, responsive: object.responsive, loading: object.loading }) %>
7
- <%= pb_rails("advanced_table/table_body", props: { id: object.id, table_data: object.table_data, column_definitions: object.column_definitions, responsive: object.responsive, loading: object.loading }) %>
8
- <% end %>
9
- <% end %>
2
+ <%= pb_rails("table", props: { size: "sm", data_table: true, number_spacing:"tabular", responsive: "none", dark: dark }.merge(object.table_props)) do %>
3
+ <% if content.present? %>
4
+ <% content.presence %>
5
+ <% else %>
6
+ <%= pb_rails("advanced_table/table_header", props: { column_definitions: object.column_definitions,
7
+ enable_toggle_expansion: object.enable_toggle_expansion,
8
+ responsive: object.responsive }) %>
9
+ <%= pb_rails("advanced_table/table_body", props: { id: object.id,
10
+ table_data: object.table_data,
11
+ column_definitions: object.column_definitions,
12
+ responsive: object.responsive }) %>
13
+ <% end %>
14
+ <% end %>
10
15
  <% end %>
@@ -10,8 +10,6 @@ module Playbook
10
10
  prop :enable_toggle_expansion, type: Playbook::Props::Enum,
11
11
  values: %w[all header none],
12
12
  default: "header"
13
- prop :loading, type: Playbook::Props::Boolean,
14
- default: false
15
13
  prop :responsive, type: Playbook::Props::Enum,
16
14
  values: %w[none scroll],
17
15
  default: "scroll"
@@ -245,7 +245,7 @@ test("toggleExpansionAll button exists and toggles subrows open and closed", asy
245
245
  })
246
246
 
247
247
 
248
- test("loading state + initialLoadingRowsCount prop", () => {
248
+ test("loading state + initialLoadingRowCount prop", () => {
249
249
  render(
250
250
  <AdvancedTable
251
251
  columnDefinitions={columnDefinitions}
@@ -1,3 +1,3 @@
1
- The optional `loading` prop takes a boolean value that can be managed using state. If loading is true, the table will display the loading skeleton and once loading is false, the table will render with the data provided.
1
+ the optional `loading` prop takes a boolean value that can be managed using state. If loading is true, the table will display the loading skeleton and once loading is false, the table will render with the data provided.
2
2
 
3
- By default, the inital row count of the loading skeleton is set to 10. If you want more control over this initial row count, the optional `initialLoadingRowsCount` prop can be used to pass in a number. __NOTE__: This is only for the first render of the table, subsequent loading skeleton row count logic is handled within the kit itself.
3
+ By default, the inital row count of the loading skeleton is set to 10. If you want more control over this initial row count, the optional `initialLoadingRowCount` prop can be used to pass in a number. __NOTE__: This is only for the first render of the table, subsequent loading skeleton row count logic is handled within the kit itself.
@@ -1,7 +1,6 @@
1
1
  examples:
2
2
  rails:
3
3
  - advanced_table_beta: Default (Required Props)
4
- - advanced_table_loading: Loading State
5
4
  - advanced_table_beta_subrow_headers: SubRow Headers
6
5
  - advanced_table_collapsible_trail_rails: Collapsible Trail
7
6
  - advanced_table_table_props: Table Props
@@ -133,18 +133,15 @@ export default class PbAdvancedTable extends PbEnhancedElement {
133
133
  if (!elements.length) return;
134
134
 
135
135
  const isVisible = elements[0].classList.contains("is-visible");
136
-
137
- isVisible ? this.hideElement(elements) : this.showElement(elements);
138
- isVisible ? this.displayDownArrow() : this.displayUpArrow();
139
-
140
- const row = this.element.closest("tr");
141
- if (row) {
142
- row.classList.toggle("bg-silver", !isVisible);
143
- row.classList.toggle("bg-white", isVisible);
136
+ if (isVisible) {
137
+ this.hideElement(elements);
138
+ this.displayDownArrow();
139
+ } else {
140
+ this.showElement(elements);
141
+ this.displayUpArrow();
144
142
  }
145
143
  }
146
144
 
147
-
148
145
  displayDownArrow() {
149
146
  this.element.querySelector(DOWN_ARROW_SELECTOR).style.display =
150
147
  "inline-block";
@@ -16,8 +16,6 @@ module Playbook
16
16
  default: []
17
17
  prop :collapsible_trail, type: Playbook::Props::Boolean,
18
18
  default: true
19
- prop :loading, type: Playbook::Props::Boolean,
20
- default: false
21
19
  prop :responsive, type: Playbook::Props::Enum,
22
20
  values: %w[none scroll],
23
21
  default: "scroll"
@@ -56,7 +54,7 @@ module Playbook
56
54
  current_data_attributes = current_depth.zero? ? { row_depth: 0 } : table_data_attributes
57
55
 
58
56
  # Additional class and data attributes needed for toggle logic
59
- output << pb_rails("advanced_table/table_row", props: { id: id, row: row, column_definitions: leaf_columns, depth: current_depth, collapsible_trail: collapsible_trail, classname: additional_classes, table_data_attributes: current_data_attributes, responsive: responsive, loading: loading })
57
+ output << pb_rails("advanced_table/table_row", props: { id: id, row: row, column_definitions: leaf_columns, depth: current_depth, collapsible_trail: collapsible_trail, classname: additional_classes, table_data_attributes: current_data_attributes, responsive: responsive })
60
58
 
61
59
  if row[:children].present?
62
60
  row[:children].each do |child_row|
@@ -6,15 +6,11 @@
6
6
  <%= pb_rails("table/table_header", props: { id: header_id, colspan: cell[:colspan], classname: [object.th_classname(is_first_column: cell_index.zero?), ('last-header-cell' if cell[:is_last_in_group] && cell_index != 0)].compact.join(' '), sort_menu: cell[:accessor] ? cell[:sort_menu] : nil }) do %>
7
7
  <%= pb_rails("flex", props: { align: "center", justify: cell_index.zero? ? "start" : row_index === header_rows.size - 1 ? "end" : "center", text_align: "end" }) do %>
8
8
  <% if cell_index.zero? && (object.enable_toggle_expansion == "header" || object.enable_toggle_expansion == "all") && row_index === header_rows.size - 1 %>
9
- <% if loading %>
10
- <div class="<%= object.loading ? 'loading-toggle-icon' : '' %>"></div>
11
- <% else %>
12
- <button
13
- class="gray-icon toggle-all-icon"
14
- onclick="expandAllRows(this); event.preventDefault();">
15
- <%= pb_rails("icon", props: { icon: "arrows-from-line", cursor: "pointer", fixed_width: true, padding_right: "xs" }) %>
16
- </button>
17
- <% end %>
9
+ <button
10
+ class="gray-icon toggle-all-icon"
11
+ onclick="expandAllRows(this); event.preventDefault();">
12
+ <%= pb_rails("icon", props: { icon: "arrows-from-line", cursor: "pointer", fixed_width: true, padding_right: "xs" }) %>
13
+ </button>
18
14
  <% end %>
19
15
  <%= cell[:label] %>
20
16
  <% end %>
@@ -8,8 +8,6 @@ module Playbook
8
8
  prop :enable_toggle_expansion, type: Playbook::Props::Enum,
9
9
  values: %w[all header none],
10
10
  default: "header"
11
- prop :loading, type: Playbook::Props::Boolean,
12
- default: false
13
11
  prop :responsive, type: Playbook::Props::Enum,
14
12
  values: %w[none scroll],
15
13
  default: "scroll"
@@ -2,7 +2,7 @@
2
2
  <% object.column_definitions.each_with_index do |column, index| %>
3
3
  <% next unless column[:accessor].present? %>
4
4
  <%= pb_rails("table/table_cell", props: { classname:object.td_classname(column, index)}) do %>
5
- <%= pb_rails("flex", props:{ align: "center", justify: index.zero? ? "start" : "end", classname: object.loading ? "loading-cell" : "" }) do %>
5
+ <%= pb_rails("flex", props:{ align: "center", justify: index.zero? ? "start" : "end" }) do %>
6
6
  <% if collapsible_trail && index.zero? %>
7
7
  <% (1..depth).each do |i| %>
8
8
  <% additional_offset = i > 1 ? (i - 1) * 0.25 : 0 %>
@@ -14,13 +14,10 @@
14
14
  <div style="padding-left: <%= depth * 1.25 %>em">
15
15
  <%= pb_rails("flex", props:{align: "center", column_gap: "xs"}) do %>
16
16
  <% if index.zero? && object.row[:children].present? %>
17
- <button
18
- id="<%= "#{object.id}_#{object.row.object_id}" %>"
19
- class="gray-icon expand-toggle-icon"
20
- data-advanced-table="true">
21
- <%= pb_rails("icon", props: { id: "advanced-table_open_icon", icon: "circle-play", cursor: "pointer" }) %>
22
- <%= pb_rails("icon", props: { id: "advanced-table_close_icon", display: "none", icon: "circle-play", cursor: "pointer", rotation: 90 }) %>
23
- </button>
17
+ <button id="<%= "#{object.id}_#{object.row.object_id}" %>" class="gray-icon expand-toggle-icon" data-advanced-table="true" >
18
+ <%= pb_rails("icon", props: { id: "advanced-table_open_icon", icon: "circle-play", cursor: "pointer" }) %>
19
+ <%= pb_rails("icon", props: { id: "advanced-table_close_icon", display: "none", icon: "circle-play", cursor: "pointer", rotation: 90 }) %>
20
+ </button>
24
21
  <% end %>
25
22
  <%= pb_rails("flex/flex_item", props:{padding_left: index.zero? && object.row[:children].present? ? "none" : "xs"}) do %>
26
23
  <% if column[:custom_renderer].present? %>
@@ -45,4 +42,4 @@
45
42
  <% end %>
46
43
  <% end %>
47
44
  <% end %>
48
- <% end %>
45
+ <% end %>
@@ -13,8 +13,6 @@ module Playbook
13
13
  default: true
14
14
  prop :table_data_attributes, type: Playbook::Props::HashProp,
15
15
  default: {}
16
- prop :loading, type: Playbook::Props::Boolean,
17
- default: false
18
16
  prop :responsive, type: Playbook::Props::Enum,
19
17
  values: %w[none scroll],
20
18
  default: "scroll"
@@ -27,9 +27,6 @@ $avatar-sizes: (
27
27
  flex-basis: $size;
28
28
 
29
29
  & > [class^=pb_flex_kit] {
30
- [class^=pb_card_kit] {
31
- padding: 2px;
32
- }
33
30
  [class^=pb_card_kit].overlay_bottom_center,
34
31
  [class^=pb_card_kit].overlay_top_center {
35
32
  left: 50%;
@@ -55,10 +52,6 @@ $avatar-sizes: (
55
52
  flex-grow: 0;
56
53
  flex-basis: $size;
57
54
 
58
- .dark & {
59
- background: $text_dk_light;
60
- }
61
-
62
55
  &::before {
63
56
  content: attr(data-initials);
64
57
  width: 100%;
@@ -85,11 +78,4 @@ $avatar-sizes: (
85
78
  }
86
79
  }
87
80
  }
88
-
89
- &.dark {
90
- [class^=pb_card_kit] {
91
- position: absolute;
92
- padding: 2px;
93
- }
94
- }
95
81
  }
@@ -23,8 +23,8 @@ export type AvatarProps = {
23
23
  variant?: string,
24
24
  icon?: string
25
25
  },
26
- dark?: boolean,
27
26
  data?: {[key: string]: string},
27
+ dark?: boolean,
28
28
  htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
29
29
  id?: string,
30
30
  imageAlt?: string,
@@ -71,13 +71,13 @@ const Avatar = (props: AvatarProps): React.ReactElement => {
71
71
 
72
72
  const canShowImage = imageUrl && !error
73
73
 
74
- const onlineStatusSize =
74
+ const onlineStatusSize =
75
75
  ['xxs', 'xs'].includes(size) ? 'sm' :
76
76
  ['sm', 'md'].includes(size) ? 'md' :
77
77
  ['lg', 'xl'].includes(size) ? 'lg' :
78
78
  'sm';
79
79
 
80
- const onlineStatusPositionProps = (["xxs", "xs", "sm"].includes(size)) ?
80
+ const onlineStatusPositionProps = (["xxs", "xs", "sm"].includes(size)) ?
81
81
  {
82
82
  top: { inset: true, value: "0" },
83
83
  right: { inset: false, value: "xxs" }
@@ -96,10 +96,10 @@ const Avatar = (props: AvatarProps): React.ReactElement => {
96
96
  id={id}
97
97
  >
98
98
  {componentOverlay ? (
99
- <Flex display="display_inline_block"
99
+ <Flex display="display_inline_block"
100
100
  position="relative"
101
101
  >
102
- <div className="avatar_wrapper"
102
+ <div className="avatar_wrapper"
103
103
  data-initials={initials}
104
104
  >
105
105
  {canShowImage && (
@@ -115,14 +115,12 @@ const Avatar = (props: AvatarProps): React.ReactElement => {
115
115
  <Card
116
116
  borderNone
117
117
  borderRadius="rounded"
118
- dark={dark}
119
118
  padding="none"
120
119
  position="absolute"
121
120
  {...getPlacementProps(componentOverlay.placement, size)}
122
121
  >
123
-
122
+
124
123
  <Badge
125
- dark={dark}
126
124
  rounded
127
125
  text={componentOverlay.text}
128
126
  variant={componentOverlay.variant as "error" | "info" | "neutral" | "primary" | "success" | "warning" | "notification"}
@@ -133,13 +131,11 @@ const Avatar = (props: AvatarProps): React.ReactElement => {
133
131
  <Card
134
132
  borderNone
135
133
  borderRadius="rounded"
136
- dark={dark}
137
134
  htmlOptions={{style: {padding:"2px"}}}
138
135
  position="absolute"
139
136
  {...getPlacementProps(componentOverlay.placement, size)}
140
137
  >
141
138
  <IconCircle
142
- dark={dark}
143
139
  icon={componentOverlay.icon}
144
140
  size="xxs"
145
141
  variant={componentOverlay.variant as "default" | "royal" | "blue" | "purple" | "teal" | "red" | "yellow" | "orange" | "green"}
@@ -149,7 +145,7 @@ const Avatar = (props: AvatarProps): React.ReactElement => {
149
145
  </Flex>
150
146
  ) : (
151
147
  <>
152
- <div className="avatar_wrapper"
148
+ <div className="avatar_wrapper"
153
149
  data-initials={initials}
154
150
  >
155
151
  {canShowImage && (
@@ -1,22 +1,22 @@
1
1
 
2
2
  <%= object.pb_content_tag(:div, data: object.data.merge(initials: object.initials)) do %>
3
3
  <% if object.component_overlay && object.component_overlay[:component] == "icon_circle" %>
4
- <%= pb_rails("flex", props: { display: "display_inline_block", position: "relative" }) do %>
4
+ <%= pb_rails("flex", props: {display: "display_inline_block", position: "relative" }) do %>
5
5
  <%= content_tag(:div, data: { initials: object.initials }, class: "avatar_wrapper") do %>
6
6
  <%= pb_rails("image", props: { alt: object.alt_text, url: object.image_url, on_error: object.handle_img_error }) if object.image_url.present? %>
7
7
  <% end %>
8
- <%= pb_rails("card", props: { border_none: true, border_radius: "rounded", dark: object.dark, position: "absolute" }.merge(specific_placement_style)) do %>
8
+ <%= pb_rails("card", props: { border_none: true, border_radius: "rounded", html_options: { style: "padding: 2px" }, position: "absolute" }.merge(specific_placement_style)) do %>
9
9
 
10
- <%= pb_rails("icon_circle", props: { dark: object.dark, size: "xxs", icon: object.component_overlay[:icon], variant: object.component_overlay[:variant] }) %>
10
+ <%= pb_rails("icon_circle", props: { size: "xxs", icon: object.component_overlay[:icon], variant: object.component_overlay[:variant] }) %>
11
11
  <% end %>
12
12
  <% end %>
13
13
  <% elsif object.component_overlay && object.component_overlay[:component] == "badge" %>
14
- <%= pb_rails("flex", props: { display: "display_inline_block", position: "relative" }) do %>
14
+ <%= pb_rails("flex", props: {display: "display_inline_block", position: "relative" }) do %>
15
15
  <%= content_tag(:div, data: { initials: object.initials }, class: "avatar_wrapper") do %>
16
16
  <%= pb_rails("image", props: { alt: object.alt_text, url: object.image_url, on_error: object.handle_img_error }) if object.image_url.present? %>
17
17
  <% end %>
18
- <%= pb_rails("card", props: { border_none: true, border_radius: "rounded", dark: object.dark, padding: "none", position: "absolute" }.merge(specific_placement_style)) do %>
19
- <%= pb_rails("badge", props: { dark: object.dark, rounded: true, text: object.component_overlay[:text], variant: object.component_overlay[:variant] }) %>
18
+ <%= pb_rails("card", props: { border_none: true, border_radius: "rounded", padding: "none", position: "absolute" }.merge(specific_placement_style)) do %>
19
+ <%= pb_rails("badge", props: { rounded: true, text: object.component_overlay[:text], variant: object.component_overlay[:variant] }) %>
20
20
  <% end %>
21
21
  <% end %>
22
22
  <% else %>
@@ -26,3 +26,4 @@
26
26
  <%= pb_rails("online_status", props: object.online_status_props) if object.status %>
27
27
  <% end %>
28
28
  <% end %>
29
+
@@ -1,19 +1,18 @@
1
1
  import React from "react";
2
2
  import { Avatar } from 'playbook-ui'
3
3
 
4
- const AvatarBadgeComponentOverlay = (props) => {
4
+ const AvatarBadgeComponentOverlay = () => {
5
5
  return (
6
6
  <div>
7
7
  <Avatar
8
8
  componentOverlay={{
9
9
  component: "badge",
10
10
  placement: "bottom-right",
11
- text: "12",
11
+ text: "12"
12
12
  }}
13
13
  imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
14
14
  marginBottom="sm"
15
15
  size="sm"
16
- {...props}
17
16
  />
18
17
 
19
18
  <Avatar
@@ -25,8 +24,6 @@ const AvatarBadgeComponentOverlay = (props) => {
25
24
  imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
26
25
  marginBottom="sm"
27
26
  size="md"
28
- {...props}
29
-
30
27
  />
31
28
 
32
29
  <Avatar
@@ -39,8 +36,6 @@ const AvatarBadgeComponentOverlay = (props) => {
39
36
  imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
40
37
  marginBottom="sm"
41
38
  size="lg"
42
- {...props}
43
-
44
39
  />
45
40
 
46
41
  <Avatar
@@ -53,8 +48,7 @@ const AvatarBadgeComponentOverlay = (props) => {
53
48
  imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
54
49
  marginBottom="sm"
55
50
  size="xl"
56
- {...props}
57
- />
51
+ />
58
52
  </div>
59
53
  )
60
54
  }
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { Avatar } from 'playbook-ui'
3
3
 
4
- const AvatarCircleIconComponentOverlay = (props) => {
4
+ const AvatarCircleIconComponentOverlay = () => {
5
5
  return (
6
6
  <div>
7
7
  <Avatar
@@ -14,7 +14,6 @@ const AvatarCircleIconComponentOverlay = (props) => {
14
14
  imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
15
15
  marginBottom="sm"
16
16
  size="sm"
17
- {...props}
18
17
  />
19
18
 
20
19
  <Avatar
@@ -27,7 +26,6 @@ const AvatarCircleIconComponentOverlay = (props) => {
27
26
  imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
28
27
  marginBottom="sm"
29
28
  size="md"
30
- {...props}
31
29
  />
32
30
 
33
31
  <Avatar
@@ -40,7 +38,6 @@ const AvatarCircleIconComponentOverlay = (props) => {
40
38
  imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
41
39
  marginBottom="sm"
42
40
  size="lg"
43
- {...props}
44
41
  />
45
42
 
46
43
  <Avatar
@@ -53,8 +50,7 @@ const AvatarCircleIconComponentOverlay = (props) => {
53
50
  imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
54
51
  marginBottom="sm"
55
52
  size="xl"
56
- {...props}
57
- />
53
+ />
58
54
  </div>
59
55
  )
60
56
  }
@@ -65,7 +65,7 @@ module Playbook
65
65
  end
66
66
 
67
67
  def tag
68
- link && !disabled ? "a" : "button"
68
+ link ? "a" : "button"
69
69
  end
70
70
 
71
71
  def valid_emoji(icon)
@@ -14,7 +14,6 @@ type PbDateProps = {
14
14
  alignment?: "left" | "center" | "right";
15
15
  aria?: { [key: string]: string };
16
16
  className?: string;
17
- dark?: boolean;
18
17
  data?: { [key: string]: string };
19
18
  htmlOptions?: { [key: string]: string | number | boolean | (() => void) };
20
19
  id?: string;
@@ -30,7 +29,6 @@ const PbDate = (props: PbDateProps): React.ReactElement => {
30
29
  aria = {},
31
30
  alignment = "left",
32
31
  className,
33
- dark = false,
34
32
  data = {},
35
33
  htmlOptions = {},
36
34
  id,
@@ -58,7 +56,7 @@ const PbDate = (props: PbDateProps): React.ReactElement => {
58
56
  );
59
57
 
60
58
  return (
61
- <div
59
+ <div
62
60
  {...ariaProps}
63
61
  {...dataProps}
64
62
  {...htmlProps}
@@ -95,9 +93,7 @@ const PbDate = (props: PbDateProps): React.ReactElement => {
95
93
  </>
96
94
  : size == "md" || size == "lg"
97
95
  ? (
98
- <Title
99
- dark={dark}
100
- size={4}
96
+ <Title size={4}
101
97
  tag="h4"
102
98
  >
103
99
  {showIcon && (
@@ -131,7 +127,6 @@ const PbDate = (props: PbDateProps): React.ReactElement => {
131
127
  <>
132
128
  {showIcon && (
133
129
  <Caption className="pb_icon_kit_container"
134
- dark={dark}
135
130
  tag="span"
136
131
  >
137
132
  <Icon fixedWidth
@@ -143,20 +138,15 @@ const PbDate = (props: PbDateProps): React.ReactElement => {
143
138
 
144
139
  {showDayOfWeek && (
145
140
  <>
146
- <Caption dark={dark}
147
- tag="div">
148
- {weekday}
149
- </Caption>
141
+ <Caption tag="div">{weekday}</Caption>
150
142
  <Caption color="light"
151
- dark={dark}
152
143
  tag="div"
153
144
  text=" • "
154
145
  />
155
146
  </>
156
147
  )}
157
148
 
158
- <Caption dark={dark}
159
- tag="span">
149
+ <Caption tag="span">
160
150
  {month} {day}
161
151
  {currentYear != year && <>{`, ${year}`}</>}
162
152
  </Caption>
@@ -18,7 +18,7 @@ const DateDefault = (props) => {
18
18
  value={"2012-08-03"}
19
19
  {...props}
20
20
  />
21
- <Caption {...props}>{"(Hyphenated Date)"}</Caption>
21
+ <Caption>{"(Hyphenated Date)"}</Caption>
22
22
  </div>
23
23
 
24
24
  <br />
@@ -56,7 +56,6 @@ const DateDefault = (props) => {
56
56
  <Title
57
57
  size={4}
58
58
  text={"(Hyphenated Date)"}
59
- {...props}
60
59
  />
61
60
  </div>
62
61
 
@@ -4,8 +4,7 @@ import { Caption, Date as FormattedDate, Title } from 'playbook-ui'
4
4
  const DateUnstyled = (props) => {
5
5
  return (
6
6
  <>
7
- <Caption {...props}
8
- size="xs"
7
+ <Caption size="xs"
9
8
  text="Basic unstyled example"
10
9
  />
11
10
  <FormattedDate
@@ -16,14 +15,10 @@ const DateUnstyled = (props) => {
16
15
 
17
16
  <br />
18
17
 
19
- <Caption {...props}
20
-
21
- size="xs"
18
+ <Caption size="xs"
22
19
  text="Example with wrapping typography kit"
23
20
  />
24
- <Title {...props}
25
- size={1}
26
- >
21
+ <Title size={1}>
27
22
  <FormattedDate
28
23
  unstyled
29
24
  value={new Date('25 Dec 1995')}
@@ -33,13 +28,10 @@ const DateUnstyled = (props) => {
33
28
 
34
29
  <br />
35
30
 
36
- <Caption {...props}
37
- size="xs"
31
+ <Caption size="xs"
38
32
  text="Example with icon + subcaption"
39
33
  />
40
- <Caption {...props}
41
- size="xs"
42
- >
34
+ <Caption size="xs">
43
35
  <FormattedDate
44
36
  showDayOfWeek
45
37
  showIcon