playbook_ui 14.17.0.pre.alpha.play1735highchartscirclechartdefaultrebuild7372 → 14.17.0.pre.alpha.play1906overlaykitaddopacityandgradient7201

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 (137) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/Components/RegularTableView.tsx +3 -23
  3. data/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx +3 -67
  4. data/app/pb_kits/playbook/pb_advanced_table/Hooks/useTableActions.ts +2 -1
  5. data/app/pb_kits/playbook/pb_advanced_table/Utilities/ExpansionControlHelpers.tsx +19 -29
  6. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +128 -67
  7. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +0 -9
  8. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.html.erb +1 -1
  9. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.jsx +2 -1
  10. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_rails.md +2 -2
  11. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_react.md +1 -1
  12. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_rails.md +2 -6
  13. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_react.md +2 -6
  14. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +2 -7
  15. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +1 -5
  16. data/app/pb_kits/playbook/pb_advanced_table/index.js +0 -7
  17. data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +1 -1
  18. data/app/pb_kits/playbook/pb_background/_background.scss +0 -26
  19. data/app/pb_kits/playbook/pb_background/_background.tsx +3 -5
  20. data/app/pb_kits/playbook/pb_background/background.test.js +0 -5
  21. data/app/pb_kits/playbook/pb_background/docs/example.yml +0 -1
  22. data/app/pb_kits/playbook/pb_background/docs/index.js +0 -1
  23. data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.tsx +1 -1
  24. data/app/pb_kits/playbook/pb_circle_chart/circleChart.test.js +2 -2
  25. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_block.html.erb +2 -2
  26. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_block.jsx +1 -1
  27. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors.html.erb +1 -1
  28. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors.jsx +1 -1
  29. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.html.erb +1 -1
  30. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.jsx +1 -1
  31. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_default.html.erb +1 -1
  32. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_default.jsx +1 -1
  33. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.html.erb +1 -1
  34. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.jsx +1 -1
  35. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_live_data.jsx +2 -2
  36. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_rounded.html.erb +1 -1
  37. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_rounded.jsx +1 -1
  38. data/app/pb_kits/playbook/pb_circle_chart/docs/example.yml +3 -2
  39. data/app/pb_kits/playbook/pb_circle_chart/docs/index.js +1 -2
  40. data/app/pb_kits/playbook/pb_copy_button/_copy_button.tsx +45 -19
  41. data/app/pb_kits/playbook/pb_copy_button/docs/example.yml +0 -1
  42. data/app/pb_kits/playbook/pb_copy_button/docs/index.js +1 -2
  43. data/app/pb_kits/playbook/pb_dialog/dialog.html.erb +1 -10
  44. data/app/pb_kits/playbook/pb_dialog/dialog.rb +0 -2
  45. data/app/pb_kits/playbook/pb_dialog/docs/example.yml +0 -1
  46. data/app/pb_kits/playbook/pb_dialog/index.js +14 -106
  47. data/app/pb_kits/playbook/pb_draggable/docs/example.yml +0 -1
  48. data/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx +1 -1
  49. data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownOption.tsx +1 -1
  50. data/app/pb_kits/playbook/pb_form_group/_form_group.scss +3 -23
  51. data/app/pb_kits/playbook/pb_form_group/docs/_form_group_select.html.erb +5 -15
  52. data/app/pb_kits/playbook/pb_form_group/docs/_form_group_select.jsx +6 -39
  53. data/app/pb_kits/playbook/pb_gauge/docs/example.yml +0 -1
  54. data/app/pb_kits/playbook/pb_gauge/docs/index.js +0 -1
  55. data/app/pb_kits/playbook/pb_layout/_layout.scss +1 -70
  56. data/app/pb_kits/playbook/pb_layout/_layout.tsx +2 -29
  57. data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.jsx +118 -322
  58. data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.md +1 -1
  59. data/app/pb_kits/playbook/pb_layout/subcomponents/_game.tsx +43 -74
  60. data/app/pb_kits/playbook/pb_layout/subcomponents/_round.tsx +4 -21
  61. data/app/pb_kits/playbook/pb_overlay/_overlay.scss +0 -34
  62. data/app/pb_kits/playbook/pb_overlay/_overlay.tsx +4 -25
  63. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_default.md +9 -1
  64. data/app/pb_kits/playbook/pb_overlay/docs/example.yml +0 -5
  65. data/app/pb_kits/playbook/pb_overlay/docs/index.js +0 -5
  66. data/app/pb_kits/playbook/pb_table/_table.tsx +2 -2
  67. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows.md +1 -3
  68. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows_rails.md +1 -3
  69. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table.md +1 -3
  70. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table_rails.md +1 -3
  71. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating_react.md +1 -1
  72. data/app/pb_kits/playbook/pb_table/docs/example.yml +0 -2
  73. data/app/pb_kits/playbook/pb_table/styles/_collapsible.scss +1 -1
  74. data/app/pb_kits/playbook/pb_table/table.rb +1 -13
  75. data/app/pb_kits/playbook/pb_table/table_header.rb +1 -13
  76. data/app/pb_kits/playbook/pb_text_input/_text_input.tsx +5 -13
  77. data/app/pb_kits/playbook/pb_text_input/docs/example.yml +0 -2
  78. data/app/pb_kits/playbook/pb_text_input/docs/index.js +0 -1
  79. data/app/pb_kits/playbook/pb_text_input/inputMask.ts +1 -8
  80. data/dist/chunks/_typeahead-HqfDnjRe.js +22 -0
  81. data/dist/chunks/_weekday_stacked--YupDiur.js +45 -0
  82. data/dist/chunks/lib-BGzBzFZX.js +29 -0
  83. data/dist/chunks/{pb_form_validation-CFPfX89U.js → pb_form_validation-BvNy9Bd6.js} +1 -1
  84. data/dist/chunks/vendor.js +1 -1
  85. data/dist/menu.yml +1 -1
  86. data/dist/playbook-doc.js +1 -19
  87. data/dist/playbook-rails-react-bindings.js +1 -1
  88. data/dist/playbook-rails.js +1 -1
  89. data/dist/playbook.css +1 -1
  90. data/lib/playbook/version.rb +1 -1
  91. metadata +6 -49
  92. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_expand_by_depth.jsx +0 -66
  93. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_expand_by_depth.md +0 -10
  94. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns.jsx +0 -58
  95. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns.md +0 -6
  96. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns_and_header.jsx +0 -64
  97. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns_and_header.md +0 -8
  98. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header.jsx +0 -55
  99. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header.md +0 -3
  100. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header_rails.html.erb +0 -33
  101. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header_rails.md +0 -3
  102. data/app/pb_kits/playbook/pb_advanced_table/scss_partials/advanced_table_sticky_mixin.scss +0 -97
  103. data/app/pb_kits/playbook/pb_background/docs/_background_overlay.jsx +0 -35
  104. data/app/pb_kits/playbook/pb_background/docs/_background_overlay.md +0 -1
  105. data/app/pb_kits/playbook/pb_circle_chart/circleChartTheme.ts +0 -53
  106. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_pb_styles.jsx +0 -38
  107. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_pb_styles.md +0 -1
  108. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_hook.jsx +0 -54
  109. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_hook.md +0 -3
  110. data/app/pb_kits/playbook/pb_copy_button/usePBCopy.ts +0 -45
  111. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_turbo_frames.html.erb +0 -117
  112. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_turbo_frames_rails.md +0 -9
  113. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_event_listeners.html.erb +0 -42
  114. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_event_listeners.md +0 -1
  115. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_pb_styles.jsx +0 -30
  116. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_pb_styles.md +0 -1
  117. data/app/pb_kits/playbook/pb_gauge/gaugeTheme.ts +0 -85
  118. data/app/pb_kits/playbook/pb_layout/subcomponents/_participant.tsx +0 -79
  119. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_color.jsx +0 -63
  120. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_color.md +0 -3
  121. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_fullscreen_background.jsx +0 -49
  122. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_fullscreen_background.md +0 -1
  123. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_fullscreen_opacity.jsx +0 -81
  124. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_fullscreen_opacity.md +0 -1
  125. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_gradient_opacity.jsx +0 -39
  126. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_gradient_opacity.md +0 -1
  127. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_layout.jsx +0 -40
  128. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_layout.md +0 -5
  129. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless.html.erb +0 -34
  130. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless_rails.md +0 -1
  131. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating.html.erb +0 -36
  132. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating_rails.md +0 -1
  133. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_sanitize.jsx +0 -94
  134. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_sanitize.md +0 -1
  135. data/dist/chunks/_typeahead-Cut4TNua.js +0 -22
  136. data/dist/chunks/_weekday_stacked-DzDjhKiS.js +0 -45
  137. data/dist/chunks/lib-yWHJ_8mm.js +0 -29
@@ -1,7 +1,3 @@
1
- Create a sticky header that works for responsive Advanced Tables by setting `sticky: true` via `table_props` and giving the AdvancedTable a `max_height` using our [Max Height](https://playbook.powerapp.cloud/visual_guidelines/max_height) global prop.
1
+ Create a sticky header that works for responsive Advanced Tables by setting `sticky: true` via `table_props` and giving the AdvancedTable a `max_height` using our [Max Height](https://playbook.powerapp.cloud/visual_guidelines/max_height) global prop. This behavior requires a `max_height` to work. The header is sticky within the table container, allowing for it to work along with the first column stickiness of a responsive table on smaller screen sizes.
2
2
 
3
- **NOTE**: This behavior requires a `max_height` to work. The header is sticky within the table container, allowing for it to work along with the first column stickiness of a responsive table on smaller screen sizes.
4
-
5
- Expand the table above to see this in action.
6
-
7
- A sticky header on a nonresponsive table is demonstrated in the ["Sticky Header"](https://playbook.powerapp.cloud/kits/advanced_table#sticky-header) doc example above.
3
+ A sticky header on a nonresponsive table is demonstrated in the ["Table Props"](https://playbook.powerapp.cloud/kits/advanced_table#table-props) doc example above.
@@ -1,7 +1,3 @@
1
- Create a sticky header that works for responsive Advanced Tables by setting `sticky: true` via `tableProps` and giving the AdvancedTable a `maxHeight` using our [Max Height](https://playbook.powerapp.cloud/visual_guidelines/max_height) global prop.
1
+ Create a sticky header that works for responsive Advanced Tables by setting `sticky: true` via `tableProps` and giving the AdvancedTable a `maxHeight` using our [Max Height](https://playbook.powerapp.cloud/visual_guidelines/max_height) global prop. This behavior requires a `maxHeight` to work. The header is sticky within the table container, allowing for it to work along with the first column stickiness of a responsive table on smaller screen sizes.
2
2
 
3
- **NOTE**: This behavior requires a `maxHeight` to work. The header is sticky within the table container, allowing for it to work along with the first column stickiness of a responsive table on smaller screen sizes.
4
-
5
- Expand the table above to see this in action.
6
-
7
- A sticky header on a nonresponsive table is demonstrated in the ["Sticky Header"](https://playbook.powerapp.cloud/kits/advanced_table/react#sticky-header) doc example above.
3
+ A sticky header on a nonresponsive table is demonstrated in the ["Table Props"](https://playbook.powerapp.cloud/kits/advanced_table/react#table-props) doc example above.
@@ -5,8 +5,7 @@ examples:
5
5
  - advanced_table_beta_subrow_headers: SubRow Headers
6
6
  - advanced_table_collapsible_trail_rails: Collapsible Trail
7
7
  - advanced_table_table_props: Table Props
8
- - advanced_table_sticky_header_rails: Sticky Header
9
- - advanced_table_table_props_sticky_header: Sticky Header for Responsive Table
8
+ - advanced_table_table_props_sticky_header: Table Props Sticky Header
10
9
  - advanced_table_beta_sort: Enable Sorting
11
10
  - advanced_table_responsive: Responsive Tables
12
11
  - advanced_table_custom_cell_rails: Custom Components for Cells
@@ -22,15 +21,11 @@ examples:
22
21
  - advanced_table_sort: Enable Sorting
23
22
  - advanced_table_sort_control: Sort Control
24
23
  - advanced_table_expanded_control: Expanded Control
25
- - advanced_table_expand_by_depth: Expand by Depth
26
24
  - advanced_table_subrow_headers: SubRow Headers
27
25
  - advanced_table_collapsible_trail: Collapsible Trail
28
26
  - advanced_table_table_options: Table Options
29
27
  - advanced_table_table_props: Table Props
30
- - advanced_table_sticky_header: Sticky Header
31
- - advanced_table_table_props_sticky_header: Sticky Header for Responsive Table
32
- - advanced_table_sticky_columns: Sticky Columns
33
- - advanced_table_sticky_columns_and_header: Sticky Columns with Sticky Header
28
+ - advanced_table_table_props_sticky_header: Table Props Sticky Header
34
29
  - advanced_table_inline_row_loading: Inline Row Loading
35
30
  - advanced_table_responsive: Responsive Tables
36
31
  - advanced_table_custom_cell: Custom Components for Cells
@@ -22,8 +22,4 @@ export { default as AdvancedTableSelectableRowsActions } from './_advanced_table
22
22
  export { default as AdvancedTableTablePropsStickyHeader } from './_advanced_table_table_props_sticky_header.jsx'
23
23
  export { default as AdvancedTableColumnHeadersCustomCell } from './_advanced_table_column_headers_custom_cell.jsx'
24
24
  export { default as AdvancedTableInlineEditing } from './_advanced_table_inline_editing.jsx'
25
- export { default as AdvancedTableFullscreen } from './_advanced_table_fullscreen.jsx'
26
- export { default as AdvancedTableStickyColumns } from './_advanced_table_sticky_columns.jsx'
27
- export { default as AdvancedTableStickyHeader } from './_advanced_table_sticky_header.jsx'
28
- export { default as AdvancedTableStickyColumnsAndHeader } from './_advanced_table_sticky_columns_and_header.jsx'
29
- export { default as AdvancedTableExpandByDepth } from './_advanced_table_expand_by_depth.jsx'
25
+ export { default as AdvancedTableFullscreen } from './_advanced_table_fullscreen.jsx'
@@ -31,8 +31,6 @@ export default class PbAdvancedTable extends PbEnhancedElement {
31
31
  this.toggleElement(this.target);
32
32
  }
33
33
  });
34
-
35
- this.hideCloseIcon()
36
34
 
37
35
  const nestedButtons = this.element
38
36
  .closest("table")
@@ -51,11 +49,6 @@ export default class PbAdvancedTable extends PbEnhancedElement {
51
49
  });
52
50
  }
53
51
 
54
- hideCloseIcon() {
55
- const closeIcon = this.element.querySelector(UP_ARROW_SELECTOR);
56
- closeIcon.style.display = "none";
57
- }
58
-
59
52
  showElement(elements) {
60
53
  elements.forEach((elem) => {
61
54
  elem.style.display = "table-row";
@@ -30,7 +30,7 @@
30
30
  class="gray-icon expand-toggle-icon"
31
31
  data-advanced-table="true">
32
32
  <%= pb_rails("icon", props: { id: "advanced-table_open_icon", icon: "circle-play", cursor: "pointer" }) %>
33
- <%= pb_rails("icon", props: { id: "advanced-table_close_icon", icon: "circle-play", cursor: "pointer", rotation: 90 }) %>
33
+ <%= pb_rails("icon", props: { id: "advanced-table_close_icon", display: "none", icon: "circle-play", cursor: "pointer", rotation: 90 }) %>
34
34
  </button>
35
35
  <% end %>
36
36
  <% end %>
@@ -55,30 +55,4 @@ $background_colors: map-merge($additional_colors, $merge_kits7);
55
55
  transition: 700ms ease-in;
56
56
  }
57
57
  }
58
-
59
- &[class*=imageoverlay] {
60
- position: relative;
61
-
62
- &:before {
63
- content: "";
64
- position: absolute;
65
- top: 0;
66
- left: 0;
67
- right: 0;
68
- bottom: 0;
69
- z-index: 1;
70
- background-color: inherit;
71
- }
72
-
73
- * {
74
- position: relative;
75
- z-index: 2;
76
- }
77
- }
78
-
79
- @each $key, $value in $opacity {
80
- &.imageoverlay_#{$key}::before {
81
- opacity: $value;
82
- }
83
- }
84
58
  }
@@ -25,7 +25,6 @@ type BackgroundProps = {
25
25
  backgroundPosition?: ResponsiveProp<string> | string,
26
26
  backgroundRepeat?: ResponsiveProp<BackgroundRepeat> | BackgroundRepeat,
27
27
  imageUrl?: ResponsiveProp<string> | string,
28
- imageOverlay?: 'opacity_1' | 'opacity_2' | 'opacity_3' | 'opacity_4' | 'opacity_5' | 'opacity_6' | 'opacity_7' | 'opacity_8' | 'opacity_9' | 'opacity_10',
29
28
  children?: React.ReactChild[] | React.ReactNode,
30
29
  className?: string,
31
30
  customColor?: string,
@@ -84,12 +83,11 @@ const Background = (props: BackgroundProps): React.ReactElement => {
84
83
  data = {},
85
84
  htmlOptions = {},
86
85
  id,
87
- imageOverlay,
88
86
  imageUrl = '',
89
87
  tag = 'div',
90
88
  transition = '',
91
89
  } = props
92
-
90
+
93
91
  const [responsiveProps, setResponsiveProps] = useState({
94
92
  backgroundSize: getResponsiveValue(backgroundSize),
95
93
  backgroundPosition: getResponsiveValue(backgroundPosition),
@@ -134,7 +132,6 @@ const Background = (props: BackgroundProps): React.ReactElement => {
134
132
  [`pb_background_color_${resBackgroundColor}`]: resBackgroundColor && !customColor,
135
133
  [`pb_background_custom_color`]: !!customColor,
136
134
  },
137
- imageOverlay ? `imageoverlay_${imageOverlay}` : "",
138
135
  className
139
136
  );
140
137
 
@@ -158,7 +155,7 @@ const Background = (props: BackgroundProps): React.ReactElement => {
158
155
  const ariaProps = buildAriaProps(aria);
159
156
  const dataProps = buildDataProps(data);
160
157
  const htmlProps = buildHtmlProps(htmlOptions);
161
-
158
+
162
159
  return (
163
160
  <Tag
164
161
  {...ariaProps}
@@ -171,6 +168,7 @@ const Background = (props: BackgroundProps): React.ReactElement => {
171
168
  >
172
169
  {children}
173
170
  </Tag>
171
+
174
172
  )
175
173
  }
176
174
 
@@ -37,8 +37,3 @@ test('backgroundSize = auto', () => {
37
37
  const kit = renderKit(Background, props, { classname: "background-image", imageUrl: "https://images.unsplash.com/photo-1528459801416-a9e53bbf4e17?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1000&q=80", backgroundSize: 'auto' })
38
38
  expect(kit).toHaveStyle('background-size: auto')
39
39
  })
40
-
41
- test('applies correct overlay class when imageOverlay prop is provided', () => {
42
- const kit = renderKit(Background, props, { imageOverlay: 'opacity_6' });
43
- expect(kit).toHaveClass('imageoverlay_opacity_6');
44
- });
@@ -19,4 +19,3 @@ examples:
19
19
  - background_status_subtle: Status Subtle
20
20
  - background_category: Category
21
21
  - background_size: Size
22
- - background_overlay: Overlay
@@ -6,4 +6,3 @@ export { default as BackgroundStatus } from './_background_status.jsx'
6
6
  export { default as BackgroundStatusSubtle } from './_background_status_subtle.jsx'
7
7
  export { default as BackgroundCategory } from './_background_category.jsx'
8
8
  export { default as BackgroundSize } from './_background_size.jsx'
9
- export { default as BackgroundOverlay } from './_background_overlay.jsx'
@@ -10,7 +10,7 @@ import { highchartsDarkTheme } from "../pb_dashboard/pbChartsDarkTheme";
10
10
  import mapColors from "../pb_dashboard/pbChartsColorsHelper";
11
11
  import { globalProps } from "../utilities/globalProps";
12
12
  import { buildAriaProps, buildDataProps, buildHtmlProps } from "../utilities/props";
13
- import { merge } from '../utilities/object'
13
+ import { merge } from '../utilities/object'
14
14
 
15
15
  type CircleChartProps = {
16
16
  align?: "left" | "right" | "center";
@@ -28,7 +28,7 @@ test('uses exact classname', () => {
28
28
  value: 49,
29
29
  },
30
30
  {
31
- name: 'After Call',
31
+ name: 'After call',
32
32
  value: 10,
33
33
  },
34
34
  ]
@@ -39,7 +39,7 @@ test('uses exact classname', () => {
39
39
  id='circlechartid'
40
40
  />
41
41
  );
42
-
42
+
43
43
  const kit = screen.getByTestId(testId);
44
44
  expect(kit).toHaveClass('pb_circle_chart');
45
45
  });
@@ -7,7 +7,7 @@
7
7
  value: 49,
8
8
  },
9
9
  {
10
- name: 'After Call',
10
+ name: 'After call',
11
11
  value: 10,
12
12
  }
13
13
  ] %>
@@ -18,7 +18,7 @@
18
18
  chart_data: data_51,
19
19
  id: "with-a-block-2",
20
20
  rounded: true,
21
- }) do %>
21
+ }) do %>
22
22
  <%= pb_rails('title', props: {text: "83", size: 1, tag: 'div'}) %>
23
23
  <% end %>
24
24
 
@@ -13,7 +13,7 @@ const dataWithABlock = [
13
13
  value: 49,
14
14
  },
15
15
  {
16
- name: 'After Call',
16
+ name: 'After call',
17
17
  value: 10,
18
18
  },
19
19
  ]
@@ -7,7 +7,7 @@
7
7
  value: 49,
8
8
  },
9
9
  {
10
- name: 'After Call',
10
+ name: 'After call',
11
11
  value: 10,
12
12
  }
13
13
  ] %>
@@ -12,7 +12,7 @@ const dataWithColors = [
12
12
  value: 49,
13
13
  },
14
14
  {
15
- name: 'After Call',
15
+ name: 'After call',
16
16
  value: 10,
17
17
  },
18
18
  ]
@@ -7,7 +7,7 @@
7
7
  value: 49,
8
8
  },
9
9
  {
10
- name: 'After Call',
10
+ name: 'After call',
11
11
  value: 10,
12
12
  }
13
13
  ] %>
@@ -12,7 +12,7 @@ const data = [
12
12
  value: 49,
13
13
  },
14
14
  {
15
- name: 'After Call',
15
+ name: 'After call',
16
16
  value: 10,
17
17
  },
18
18
  ]
@@ -7,7 +7,7 @@
7
7
  value: 49,
8
8
  },
9
9
  {
10
- name: 'After Call',
10
+ name: 'After call',
11
11
  value: 10,
12
12
  }
13
13
  ] %>
@@ -12,7 +12,7 @@ const data = [
12
12
  value: 49,
13
13
  },
14
14
  {
15
- name: 'After Call',
15
+ name: 'After call',
16
16
  value: 10,
17
17
  },
18
18
  ]
@@ -7,7 +7,7 @@
7
7
  value: 49,
8
8
  },
9
9
  {
10
- name: 'After Call',
10
+ name: 'After call',
11
11
  value: 10,
12
12
  }
13
13
  ] %>
@@ -14,7 +14,7 @@ const data = [
14
14
  value: 49,
15
15
  },
16
16
  {
17
- name: 'After Call',
17
+ name: 'After call',
18
18
  value: 10,
19
19
  },
20
20
  ]
@@ -14,7 +14,7 @@ const CircleChartLiveData = (props) => {
14
14
  value: 49,
15
15
  },
16
16
  {
17
- name: 'After Call',
17
+ name: 'After call',
18
18
  value: 10,
19
19
  },
20
20
  ])
@@ -29,7 +29,7 @@ const CircleChartLiveData = (props) => {
29
29
  value: 12,
30
30
  },
31
31
  {
32
- name: 'After Call',
32
+ name: 'After call',
33
33
  value: 140,
34
34
  },
35
35
  ]
@@ -7,7 +7,7 @@
7
7
  value: 49,
8
8
  },
9
9
  {
10
- name: 'After Call',
10
+ name: 'After call',
11
11
  value: 10,
12
12
  }
13
13
  ] %>
@@ -12,7 +12,7 @@ const dataRounded = [
12
12
  value: 49,
13
13
  },
14
14
  {
15
- name: 'After Call',
15
+ name: 'After call',
16
16
  value: 10,
17
17
  },
18
18
  ]
@@ -14,7 +14,6 @@ examples:
14
14
 
15
15
  react:
16
16
  - circle_chart_default: Default Style
17
- - circle_chart_pb_styles: Playbook Styles
18
17
  - circle_chart_live_data: Live Data
19
18
  - circle_chart_rounded: Rounded Corners
20
19
  - circle_chart_block: Accepts Any Block
@@ -23,5 +22,7 @@ examples:
23
22
  - circle_chart_with_legend_kit: Legend
24
23
  - circle_chart_legend_position: Legend Position
25
24
  - circle_chart_with_title: Title
26
- - circle_chart_inner_sizes: Inner Circle Size Options
25
+ - circle_chart_inner_sizes: Inner Circle Size Options
27
26
  - circle_chart_custom_tooltip: Tooltip Customization
27
+
28
+
@@ -8,5 +8,4 @@ export { default as CircleChartWithLegendKit } from './_circle_chart_with_legend
8
8
  export { default as CircleChartLegendPosition } from './_circle_chart_legend_position.jsx'
9
9
  export { default as CircleChartWithTitle } from './_circle_chart_with_title.jsx'
10
10
  export { default as CircleChartInnerSizes } from './_circle_chart_inner_sizes.jsx'
11
- export { default as CircleChartCustomTooltip } from "./_circle_chart_custom_tooltip.jsx"
12
- export { default as CircleChartPbStyles } from "./_circle_chart_pb_styles.jsx"
11
+ export { default as CircleChartCustomTooltip } from "./_circle_chart_custom_tooltip.jsx"
@@ -1,4 +1,5 @@
1
- import React from 'react'
1
+
2
+ import React, { useState } from 'react'
2
3
  import classnames from 'classnames'
3
4
  import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
4
5
  import { globalProps } from '../utilities/globalProps'
@@ -6,19 +7,16 @@ import { globalProps } from '../utilities/globalProps'
6
7
  import Button from '../pb_button/_button'
7
8
  import Tooltip from '../pb_tooltip/_tooltip'
8
9
 
9
- import usePBCopy from './usePBCopy'
10
-
11
10
  type CopyButtonProps = {
12
- aria?: { [key: string]: string }
13
- className?: string
14
- data?: { [key: string]: string }
15
- id?: string
16
- from?: string
17
- text?: string
18
- tooltipPlacement?: 'top' | 'right' | 'bottom' | 'left'
19
- tooltipText?: string
20
- value?: string
21
- timeout?: number
11
+ aria?: { [key: string]: string },
12
+ className?: string,
13
+ data?: { [key: string]: string },
14
+ id?: string,
15
+ from?: string,
16
+ text?: string,
17
+ tooltipPlacement?: "top" | "right" | "bottom" | "left",
18
+ tooltipText?: string,
19
+ value?: string,
22
20
  }
23
21
 
24
22
  const CopyButton = (props: CopyButtonProps) => {
@@ -29,34 +27,62 @@ const CopyButton = (props: CopyButtonProps) => {
29
27
  from = '',
30
28
  id,
31
29
  text= 'Copy',
32
- timeout = 1000,
33
30
  tooltipPlacement= 'bottom',
34
31
  tooltipText = 'Copied!',
35
32
  value = '',
36
33
  } = props
37
34
 
38
- const [copied, copy] = usePBCopy({ value, from, timeout })
35
+ const [copied, setCopied] = useState(false)
39
36
 
40
37
  const ariaProps = buildAriaProps(aria)
41
38
  const dataProps = buildDataProps(data)
42
39
  const classes = classnames(buildCss('pb_copy_button_kit'), globalProps(props), className)
43
40
 
41
+ const copy = () => {
42
+ if (!from && !value) {
43
+ return
44
+ }
45
+
46
+ if (value) {
47
+ navigator.clipboard.writeText(value)
48
+ } else if (from) {
49
+ const copyElement = document.getElementById(from);
50
+ let copyText = copyElement?.innerText
51
+
52
+ if (copyElement instanceof HTMLTextAreaElement || copyElement instanceof HTMLInputElement) {
53
+ copyText = copyElement.value;
54
+ }
55
+
56
+ if (copyText) {
57
+ navigator.clipboard.writeText(copyText)
58
+ }
59
+ }
60
+
61
+ setCopied(true)
62
+
63
+ setTimeout(() => {
64
+ setCopied(false)
65
+ }, 1000);
66
+ }
67
+
44
68
  return (
45
- <div {...ariaProps}
69
+ <div
70
+ {...ariaProps}
46
71
  {...dataProps}
47
72
  className={classes}
48
73
  id={id}
49
74
  >
50
- <Tooltip
75
+ <Tooltip
51
76
  forceOpenTooltip={copied}
52
77
  placement={tooltipPlacement}
53
78
  showTooltip={false}
54
79
  text={tooltipText}
55
80
  >
56
- <Button icon="copy"
81
+ <Button
82
+ icon='copy'
57
83
  onClick={copy}
58
84
  >
59
- {text}
85
+ { text }
60
86
  </Button>
61
87
  </Tooltip>
62
88
  </div>
@@ -6,4 +6,3 @@ examples:
6
6
  react:
7
7
  - copy_button_default: Default
8
8
  - copy_button_from: Copy From
9
- - copy_button_hook: Copy Hook
@@ -1,3 +1,2 @@
1
1
  export { default as CopyButtonDefault } from './_copy_button_default.jsx'
2
- export { default as CopyButtonFrom } from './_copy_button_from.jsx'
3
- export { default as CopyButtonHook } from './_copy_button_hook.jsx'
2
+ export { default as CopyButtonFrom } from './_copy_button_from.jsx'
@@ -1,16 +1,7 @@
1
1
  <div
2
2
  class="pb_dialog_wrapper_rails <%= object.full_height_style %>"
3
3
  data-pb-dialog-wrapper="true"
4
- data-overlay-click="<%= object.overlay_close %>"
5
- <% if object.custom_event_type.present? %>
6
- data-custom-event-type="<%= object.custom_event_type %>"
7
- <% end %>
8
- <% if object.confirm_button_id.present? %>
9
- data-confirm-button-id="<%= object.confirm_button_id %>"
10
- <% end %>
11
- <% if object.cancel_button_id.present? %>
12
- data-cancel-button-id="<%= object.cancel_button_id %>"
13
- <% end %>
4
+ data-overlay-click= <%= object.overlay_close %>
14
5
  >
15
6
  <%= pb_content_tag(:dialog) do %>
16
7
  <% if object.status === "" && object.title %>
@@ -21,8 +21,6 @@ module Playbook
21
21
  prop :status, type: Playbook::Props::Enum,
22
22
  values: ["info", "caution", "delete", "error", "success", "default", ""],
23
23
  default: ""
24
- prop :custom_event_type, type: Playbook::Props::String,
25
- default: ""
26
24
 
27
25
  def classname
28
26
  generate_classname("pb_dialog pb_dialog_rails pb_dialog_#{size}_#{placement}")
@@ -11,7 +11,6 @@ examples:
11
11
  - dialog_full_height: Full Height
12
12
  - dialog_full_height_placement: Full Height Placement
13
13
  - dialog_loading: Loading
14
- - dialog_turbo_frames: Within Turbo Frames
15
14
 
16
15
 
17
16
  react: