playbook_ui 14.12.0.pre.alpha.PBNTR8335906 → 14.12.0.pre.alpha.PLAY1602lightboxoverlapnitrobugzindextoken5751

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx +3 -10
  3. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +10 -9
  4. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +21 -34
  5. data/app/pb_kits/playbook/pb_advanced_table/index.js +6 -9
  6. data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +5 -8
  7. data/app/pb_kits/playbook/pb_avatar/_avatar.scss +0 -9
  8. data/app/pb_kits/playbook/pb_avatar/_avatar.tsx +7 -11
  9. data/app/pb_kits/playbook/pb_avatar/avatar.html.erb +7 -6
  10. data/app/pb_kits/playbook/pb_avatar/docs/_avatar_badge_component_overlay.jsx +3 -9
  11. data/app/pb_kits/playbook/pb_avatar/docs/_avatar_circle_icon_component_overlay.jsx +2 -6
  12. data/app/pb_kits/playbook/pb_button/button.rb +1 -1
  13. data/app/pb_kits/playbook/pb_copy_button/_copy_button.scss +1 -2
  14. data/app/pb_kits/playbook/pb_copy_button/docs/example.yml +3 -3
  15. data/app/pb_kits/playbook/pb_date/_date.tsx +4 -14
  16. data/app/pb_kits/playbook/pb_date/docs/_date_default.jsx +1 -2
  17. data/app/pb_kits/playbook/pb_date/docs/_date_unstyled.jsx +5 -13
  18. data/app/pb_kits/playbook/pb_file_upload/file_upload.html.erb +6 -1
  19. data/app/pb_kits/playbook/pb_filter/filter.html.erb +5 -1
  20. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/example.yml +0 -1
  21. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/index.js +5 -7
  22. data/app/pb_kits/playbook/pb_form_group/form_group.html.erb +6 -1
  23. data/app/pb_kits/playbook/pb_form_pill/form_pill.html.erb +1 -1
  24. data/app/pb_kits/playbook/pb_lightbox/lightbox.scss +7 -6
  25. data/app/pb_kits/playbook/pb_link/_link.tsx +0 -18
  26. data/app/pb_kits/playbook/pb_link/docs/example.yml +3 -5
  27. data/app/pb_kits/playbook/pb_link/docs/index.js +1 -2
  28. data/app/pb_kits/playbook/pb_link/link.html.erb +1 -1
  29. data/app/pb_kits/playbook/pb_link/link.rb +0 -6
  30. data/app/pb_kits/playbook/pb_link/link.test.jsx +0 -30
  31. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tooltip.html.erb +6 -6
  32. data/app/pb_kits/playbook/pb_table/docs/_table_with_background_kit.html.erb +9 -6
  33. data/app/pb_kits/playbook/pb_table/docs/_table_with_background_kit.jsx +9 -6
  34. data/app/pb_kits/playbook/pb_table/styles/_desktop_collapse.scss +0 -26
  35. data/app/pb_kits/playbook/pb_table/styles/_mobile.scss +1 -0
  36. data/app/pb_kits/playbook/pb_table/styles/_mobile_collapse.scss +0 -25
  37. data/app/pb_kits/playbook/pb_table/styles/_tablet_collapse.scss +0 -25
  38. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_default.html.erb +1 -1
  39. data/app/pb_kits/playbook/pb_tooltip/index.js +27 -45
  40. data/app/pb_kits/playbook/pb_tooltip/tooltip.rb +1 -5
  41. data/app/pb_kits/playbook/pb_user/_user.tsx +0 -3
  42. data/app/pb_kits/playbook/pb_user/docs/example.yml +0 -2
  43. data/app/pb_kits/playbook/pb_user/docs/index.js +0 -1
  44. data/app/pb_kits/playbook/pb_user/user.html.erb +1 -1
  45. data/app/pb_kits/playbook/pb_user/user.rb +0 -1
  46. data/app/pb_kits/playbook/pb_user/user.test.js +0 -14
  47. data/dist/chunks/{_typeahead-CkemExmL.js → _typeahead-BIhRQo8Q.js} +3 -3
  48. data/dist/chunks/_weekday_stacked-VKMYuo6-.js +45 -0
  49. data/dist/chunks/{lib-DjpLC8uO.js → lib-kMuhBuU7.js} +1 -1
  50. data/dist/chunks/{pb_form_validation-S56UaHZl.js → pb_form_validation-DBJ0wZuS.js} +1 -1
  51. data/dist/chunks/vendor.js +1 -1
  52. data/dist/menu.yml +2 -2
  53. data/dist/playbook-doc.js +1 -1
  54. data/dist/playbook-rails-react-bindings.js +1 -1
  55. data/dist/playbook-rails.js +1 -1
  56. data/dist/playbook.css +1 -1
  57. data/lib/playbook/version.rb +1 -1
  58. metadata +7 -20
  59. data/app/pb_kits/playbook/pb_advanced_table/Utilities/ActionBarAnimationHelper.ts +0 -26
  60. data/app/pb_kits/playbook/pb_copy_button/copy_button.html.erb +0 -15
  61. data/app/pb_kits/playbook/pb_copy_button/copy_button.rb +0 -28
  62. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.html.erb +0 -2
  63. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.html.erb +0 -5
  64. data/app/pb_kits/playbook/pb_copy_button/index.js +0 -47
  65. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close.html.erb +0 -58
  66. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close_rails.md +0 -3
  67. data/app/pb_kits/playbook/pb_link/docs/_link_target.html.erb +0 -15
  68. data/app/pb_kits/playbook/pb_link/docs/_link_target.jsx +0 -29
  69. data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.html.erb +0 -42
  70. data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.jsx +0 -59
  71. data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.md +0 -2
  72. data/dist/chunks/_weekday_stacked-CtSzPEH0.js +0 -45
  73. /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: 8cf75667a14a1b95b256c86ea1eaf7a60a5d7ceaf90cc8c5a46431a53953a38a
4
- data.tar.gz: 547d77e91c2b02c0f5f76bbe4b0425b467d2f5a6dedd405b43ab823de2072e79
3
+ metadata.gz: e10c1e4e4545b2a4d2d9efad06fb1a7313d20f051aebbe16ea6ae9938a51b05d
4
+ data.tar.gz: bb6f95cda4e9045dd17ba5832ff0754831bbfdfb40e7d2446b6900da742ea8ae
5
5
  SHA512:
6
- metadata.gz: 72370309aa5412ddfbf7cbc16c1c21b12d01462dd13124b55cbf72f83e5d73e89168bd3e3736adc3770b9f7973de51c7d1a83aef7ca9cc258985eeba09ef7cfb
7
- data.tar.gz: 6fa47007e8a6bf5761db259053351149175fb86b0dc1a2cc3bd5be752bf78acc203d1a9ad63db47f0cdefa24da22819330db2918c535e763ee4905d9313de19f
6
+ metadata.gz: cecb8ddd5a22de23262c27e2d5dd8e58c7b11c182504dd3e47fc5d1a0fdaff32de45ad9c254ecddd772674dea34aec612a5ab286992f257c82b7fc8d96af70e1
7
+ data.tar.gz: 6ceb08be13792f050c55662c2554f7afd3f5d2abcee774130c9361607337e9a585e88f75a606de1c5c5af8ce2bbaa0bf36d48f6ddbfbf310e542469d489b66e3
@@ -39,15 +39,8 @@ export const TableHeaderCell = ({
39
39
  sortIcon,
40
40
  table
41
41
  }: TableHeaderCellProps) => {
42
- const {
43
- sortControl,
44
- responsive,
45
- selectableRows,
46
- hasAnySubRows,
47
- showActionsBar,
48
- inlineRowLoading,
49
- isActionBarVisible,
50
- } = useContext(AdvancedTableContext);
42
+ const { sortControl, responsive, selectableRows, hasAnySubRows, showActionsBar, inlineRowLoading } =
43
+ useContext(AdvancedTableContext);
51
44
 
52
45
  type justifyTypes = "none" | "center" | "start" | "end" | "between" | "around" | "evenly"
53
46
 
@@ -72,7 +65,7 @@ export const TableHeaderCell = ({
72
65
 
73
66
  const cellClassName = classnames(
74
67
  "table-header-cells",
75
- `${showActionsBar && isActionBarVisible && "header-cells-with-actions"}`,
68
+ `${showActionsBar && "header-cells-with-actions"}`,
76
69
  `${isChrome() ? "chrome-styles" : ""}`,
77
70
  `${enableSorting ? "table-header-cells-active" : ""}`,
78
71
  { "pinned-left": responsive === "scroll" && isPinnedLeft },
@@ -31,12 +31,12 @@
31
31
  width: 100%;
32
32
  }
33
33
 
34
- .row-selection-actions-card {
35
- border-bottom-right-radius: 0px !important;
36
- border-bottom-left-radius: 0px !important;
37
- border-bottom-color: transparent;
38
- transition: height 300ms ease;
39
- }
34
+ .row-selection-actions-card {
35
+ border-bottom-right-radius: 0px !important;
36
+ border-bottom-left-radius: 0px !important;
37
+ border-bottom-color: transparent;
38
+ }
39
+
40
40
  .table-header-cells:first-child {
41
41
  min-width: 180px;
42
42
  }
@@ -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,4 +1,4 @@
1
- import React, { useState, useEffect, useCallback, useRef } from "react"
1
+ import React, { useState, useEffect, useCallback } from "react"
2
2
  import classnames from "classnames"
3
3
 
4
4
  import { GenericObject } from "../types"
@@ -27,7 +27,6 @@ import FlexItem from "../pb_flex/_flex_item"
27
27
  import AdvancedTableContext from "./Context/AdvancedTableContext"
28
28
 
29
29
  import { updateExpandAndCollapseState } from "./Utilities/ExpansionControlHelpers"
30
- import { showActionBar, hideActionBar } from "./Utilities/ActionBarAnimationHelper"
31
30
 
32
31
  import { CustomCell } from "./Components/CustomCell"
33
32
  import { TableHeader } from "./SubKits/TableHeader"
@@ -296,20 +295,6 @@ const AdvancedTable = (props: AdvancedTableProps) => {
296
295
  const onPageChange = (page: number) => {
297
296
  table.setPageIndex(page - 1)
298
297
  }
299
- //When to show the actions bar as a whole
300
- const isActionBarVisible = selectableRows && showActionsBar && selectedRowsLength > 0
301
-
302
- //Ref and useEffect for animating the actions bar
303
- const cardRef = useRef(null);
304
- useEffect(() => {
305
- if (cardRef.current) {
306
- if (isActionBarVisible) {
307
- showActionBar(cardRef.current);
308
- } else {
309
- hideActionBar(cardRef.current);
310
- }
311
- }
312
- }, [isActionBarVisible]);
313
298
 
314
299
  return (
315
300
  <div {...ariaProps}
@@ -326,7 +311,6 @@ const AdvancedTable = (props: AdvancedTableProps) => {
326
311
  expandedControl,
327
312
  handleExpandOrCollapse,
328
313
  inlineRowLoading,
329
- isActionBarVisible,
330
314
  loading,
331
315
  responsive,
332
316
  setExpanded,
@@ -349,24 +333,27 @@ const AdvancedTable = (props: AdvancedTableProps) => {
349
333
  total={table.getPageCount()}
350
334
  />
351
335
  }
352
- <Card
353
- borderNone={!isActionBarVisible}
354
- className={`${isActionBarVisible && "show-action-card row-selection-actions-card"}`}
355
- htmlOptions={{ ref: cardRef as any }}
356
- padding={`${isActionBarVisible ? "xs" : "none"}`}
357
- >
358
- <Flex alignItems="center"
359
- justify="between"
360
- >
361
- <Caption color="light"
362
- paddingLeft="xs"
363
- size="xs"
336
+ {
337
+ selectableRows && showActionsBar && (
338
+ <Card className="row-selection-actions-card"
339
+ padding="xs"
364
340
  >
365
- {selectedRowsLength} Selected
366
- </Caption>
367
- <FlexItem>{actions}</FlexItem>
368
- </Flex>
369
- </Card>
341
+ <Flex alignItems="center"
342
+ justify="between"
343
+ >
344
+ <Caption color="light"
345
+ paddingLeft="xs"
346
+ size="xs"
347
+ >
348
+ {selectedRowsLength} Selected
349
+ </Caption>
350
+ <FlexItem>
351
+ {actions}
352
+ </FlexItem>
353
+ </Flex>
354
+ </Card>
355
+ )
356
+ }
370
357
  <Table
371
358
  className={`${loading ? "content-loading" : ""}`}
372
359
  dark={dark}
@@ -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";
@@ -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 %>
@@ -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,9 @@ $avatar-sizes: (
85
78
  }
86
79
  }
87
80
  }
88
-
89
81
  &.dark {
90
82
  [class^=pb_card_kit] {
91
83
  position: absolute;
92
- padding: 2px;
93
84
  }
94
85
  }
95
86
  }
@@ -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)
@@ -1,4 +1,3 @@
1
1
  .pb_copy_button_kit {
2
- width: fit-content;
3
- height: fit-content;
2
+
4
3
  }
@@ -1,8 +1,8 @@
1
1
  examples:
2
- rails:
3
- - copy_button_default: Default
4
- - copy_button_from: Copy From
2
+
5
3
 
6
4
  react:
7
5
  - copy_button_default: Default
8
6
  - copy_button_from: Copy From
7
+
8
+
@@ -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
@@ -1,4 +1,9 @@
1
- <%= pb_content_tag(:div) do %>
1
+ <%= content_tag("div",
2
+ aria: object.aria,
3
+ class: object.classname,
4
+ data: object.data,
5
+ id: object.id,
6
+ **combined_html_options) do %>
2
7
  <%= pb_rails("form_group", props: {cursor: "pointer", full_width: object.full_width}) do %>
3
8
  <label
4
9
  for="upload-<%= object.id %>"
@@ -1,4 +1,8 @@
1
- <%= pb_content_tag(:div) do %>
1
+ <%= content_tag(:div,
2
+ id: object.id,
3
+ data: object.data,
4
+ class: object.classname,
5
+ **combined_html_options) do %>
2
6
  <%= object.wrapper do %>
3
7
  <%= pb_rails("flex", props: { orientation: "row", padding_right: "lg", vertical: "center" }) do %>
4
8
  <% if (object.template != "sort_only") %>
@@ -5,7 +5,6 @@ examples:
5
5
  - fixed_confirmation_toast_multi_line: Multi Line
6
6
  - fixed_confirmation_toast_close: Click to Close
7
7
  - fixed_confirmation_toast_positions: Click to Show Positions
8
- - fixed_confirmation_toast_auto_close: Click to Show Auto Close
9
8
  - fixed_confirmation_toast_children: Children
10
9
  - fixed_confirmation_toast_custom_icon: Custom Icon
11
10