playbook_ui 14.17.0.pre.alpha.PLAY2040removeunnecessarystickytableclasses7300 → 14.17.0.pre.alpha.PLAY20267223

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 (77) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns.jsx +1 -1
  3. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.html.erb +1 -1
  4. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.jsx +2 -1
  5. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_rails.md +2 -2
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_react.md +1 -1
  7. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_rails.md +2 -6
  8. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_react.md +2 -6
  9. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +2 -5
  10. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +1 -3
  11. data/app/pb_kits/playbook/pb_background/_background.scss +0 -26
  12. data/app/pb_kits/playbook/pb_background/_background.tsx +3 -5
  13. data/app/pb_kits/playbook/pb_background/background.test.js +0 -5
  14. data/app/pb_kits/playbook/pb_background/docs/example.yml +0 -1
  15. data/app/pb_kits/playbook/pb_background/docs/index.js +0 -1
  16. data/app/pb_kits/playbook/pb_copy_button/_copy_button.tsx +45 -19
  17. data/app/pb_kits/playbook/pb_copy_button/docs/example.yml +0 -1
  18. data/app/pb_kits/playbook/pb_copy_button/docs/index.js +1 -2
  19. data/app/pb_kits/playbook/pb_form_group/_form_group.scss +2 -18
  20. data/app/pb_kits/playbook/pb_form_group/docs/_form_group_select.html.erb +5 -15
  21. data/app/pb_kits/playbook/pb_form_group/docs/_form_group_select.jsx +5 -20
  22. data/app/pb_kits/playbook/pb_layout/_layout.scss +1 -70
  23. data/app/pb_kits/playbook/pb_layout/_layout.tsx +2 -29
  24. data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.jsx +118 -322
  25. data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.md +1 -1
  26. data/app/pb_kits/playbook/pb_layout/subcomponents/_game.tsx +43 -74
  27. data/app/pb_kits/playbook/pb_layout/subcomponents/_round.tsx +4 -21
  28. data/app/pb_kits/playbook/pb_overlay/_overlay.scss +22 -49
  29. data/app/pb_kits/playbook/pb_overlay/_overlay.tsx +4 -15
  30. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_default.md +7 -1
  31. data/app/pb_kits/playbook/pb_overlay/docs/example.yml +0 -3
  32. data/app/pb_kits/playbook/pb_overlay/docs/index.js +0 -3
  33. data/app/pb_kits/playbook/pb_overlay/overlay.test.jsx +1 -39
  34. data/app/pb_kits/playbook/pb_table/_table.tsx +2 -2
  35. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows.md +1 -3
  36. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows_rails.md +1 -3
  37. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table.md +1 -3
  38. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table_rails.md +1 -3
  39. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating_react.md +1 -1
  40. data/app/pb_kits/playbook/pb_table/docs/example.yml +0 -2
  41. data/app/pb_kits/playbook/pb_table/styles/_collapsible.scss +1 -1
  42. data/app/pb_kits/playbook/pb_table/table.rb +1 -13
  43. data/app/pb_kits/playbook/pb_table/table_header.rb +1 -13
  44. data/dist/chunks/{_typeahead-CHd0V9EL.js → _typeahead-HqfDnjRe.js} +3 -3
  45. data/dist/chunks/_weekday_stacked-CPNaHtxQ.js +45 -0
  46. data/dist/chunks/{lib-BV_AF_eh.js → lib-BGzBzFZX.js} +3 -3
  47. data/dist/chunks/{pb_form_validation-nsvkJU2J.js → pb_form_validation-BvNy9Bd6.js} +1 -1
  48. data/dist/chunks/vendor.js +1 -1
  49. data/dist/playbook-doc.js +1 -1
  50. data/dist/playbook-rails-react-bindings.js +1 -1
  51. data/dist/playbook-rails.js +1 -1
  52. data/dist/playbook.css +1 -1
  53. data/lib/playbook/version.rb +1 -1
  54. metadata +6 -28
  55. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns_and_header.jsx +0 -64
  56. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns_and_header.md +0 -8
  57. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header.jsx +0 -55
  58. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header.md +0 -3
  59. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header_rails.html.erb +0 -33
  60. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header_rails.md +0 -3
  61. data/app/pb_kits/playbook/pb_background/docs/_background_overlay.jsx +0 -35
  62. data/app/pb_kits/playbook/pb_background/docs/_background_overlay.md +0 -1
  63. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_hook.jsx +0 -54
  64. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_hook.md +0 -3
  65. data/app/pb_kits/playbook/pb_copy_button/usePBCopy.ts +0 -45
  66. data/app/pb_kits/playbook/pb_layout/subcomponents/_participant.tsx +0 -79
  67. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_color.jsx +0 -63
  68. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_color.md +0 -3
  69. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_gradient_opacity.jsx +0 -39
  70. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_gradient_opacity.md +0 -1
  71. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_layout.jsx +0 -40
  72. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_layout.md +0 -5
  73. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless.html.erb +0 -34
  74. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless_rails.md +0 -1
  75. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating.html.erb +0 -36
  76. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating_rails.md +0 -1
  77. data/dist/chunks/_weekday_stacked-CdE0nXPu.js +0 -45
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 728e1bcdca87364a7a649b4759c10152751f1778b6b06f838c39a2afeee3e8d1
4
- data.tar.gz: 67148c95d37c6d3ca0401f05613a6a67fb50fd8586769cfed0899362f7ab9de5
3
+ metadata.gz: 4a84667fe2c80d67890e145f5b8841ff6c207eb717b1319029b6ae249c8248ec
4
+ data.tar.gz: 8b9b31e2525c5cf403f73dbc4a3b1adf23b2ad469edb62b9aac96cb30250c077
5
5
  SHA512:
6
- metadata.gz: 456d346e0df51a28b02e85d76a0da69a2df08df4f4a3020da311f8738664383bec137cc4421e8a00fa5e05869fd51cabd4657d9938ffa7cfb22d3a60cf9c2c28
7
- data.tar.gz: d6b65398fa09510f649468b3b78d2643c79452f45d7252693b44f27faee1e46593f47afe53e9efae6b22433ad357975e14798b7a9fee3928b36c25d3588c3d9f
6
+ metadata.gz: 467e9b001b9069d97c5f39e257ba810f980351c93772a54474ec829b4a227017a8a11ec5dfd01f32b0acef10402766f8d8f8d1e342866d5edf0acf6ff513aec4
7
+ data.tar.gz: 6eff90636fd9b005857d8b221b5db06dd4840a94b788bccf6eae6e3869e1be5a6454d7f4c1f18f3fdba9923549fe8a3f0b814b118e60acebc7f478cc79312584
@@ -47,7 +47,7 @@ const AdvancedTableStickyColumns = (props) => {
47
47
  <AdvancedTable
48
48
  columnDefinitions={columnDefinitions}
49
49
  responsive="none"
50
- stickyLeftColumn={["year"]}
50
+ stickyLeftColumn={["year", "newEnrollments"]}
51
51
  tableData={MOCK_DATA}
52
52
  {...props}
53
53
  />
@@ -30,4 +30,4 @@
30
30
  }
31
31
  ] %>
32
32
 
33
- <%= pb_rails("advanced_table", props: { id: "table_props_table", table_data: @table_data, column_definitions: column_definitions, table_props: { vertical_border: true, container: false }}) %>
33
+ <%= pb_rails("advanced_table", props: { id: "table_props_table", table_data: @table_data, column_definitions: column_definitions, responsive: "none", table_props: { container: false, sticky: true }}) %>
@@ -37,13 +37,14 @@ const AdvancedTableTableProps = (props) => {
37
37
 
38
38
  const tableProps = {
39
39
  container: false,
40
- verticalBorder: true
40
+ sticky: true
41
41
  }
42
42
 
43
43
  return (
44
44
  <div>
45
45
  <AdvancedTable
46
46
  columnDefinitions={columnDefinitions}
47
+ responsive="none"
47
48
  tableData={MOCK_DATA}
48
49
  tableProps={tableProps}
49
50
  {...props}
@@ -1,3 +1,3 @@
1
- This kit uses the [Table kit](https://playbook.powerapp.cloud/kits/table/react) under the hood which comes with its own set of props. If you want to apply certain Table props to that underlying kit, you can do so by using the optional `table_props` prop. This prop must be an object that contains valid Table props. For a full list of Table props, see [here](https://playbook.powerapp.cloud/kits/table/react).
1
+ This kit uses the [Table kit](https://playbook.powerapp.cloud/kits/table) under the hood which comes with its own set of props. If you want to apply certain Table props to that underlying kit, you can do so by using the optional `table_props` prop. This prop must be an object that contains valid Table props. For a full list of Table props, see [here](https://playbook.powerapp.cloud/kits/table).
2
2
 
3
- This doc example showcases the use of two table props, including how to render the vertical borders between columns.
3
+ This doc example showcases how to set a sticky header for a nonresponsive table. To achieve sticky header AND responsive functionality, see the ["Table Props Sticky Header"](https://playbook.powerapp.cloud/kits/advanced_table#table-props-sticky-header) doc example below.
@@ -1,3 +1,3 @@
1
1
  This kit uses the [Table kit](https://playbook.powerapp.cloud/kits/table/react) under the hood which comes with its own set of props. If you want to apply certain Table props to that underlying kit, you can do so by using the optional `tableProps` prop. This prop must be an object that contains valid Table props. For a full list of Table props, see [here](https://playbook.powerapp.cloud/kits/table/react).
2
2
 
3
- This doc example showcases the use of two table props, including how to render the vertical borders between columns.
3
+ This doc example showcases how to set a sticky header for a nonresponsive table. To achieve sticky header AND responsive functionality, see the ["Table Props Sticky Header"](https://playbook.powerapp.cloud/kits/advanced_table/react#table-props-sticky-header) doc example below.
@@ -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
@@ -26,10 +25,8 @@ examples:
26
25
  - advanced_table_collapsible_trail: Collapsible Trail
27
26
  - advanced_table_table_options: Table Options
28
27
  - advanced_table_table_props: Table Props
29
- - advanced_table_sticky_header: Sticky Header
30
- - advanced_table_table_props_sticky_header: Sticky Header for Responsive Table
31
28
  - advanced_table_sticky_columns: Sticky Columns
32
- - advanced_table_sticky_columns_and_header: Sticky Columns with Sticky Header
29
+ - advanced_table_table_props_sticky_header: Table Props Sticky Header
33
30
  - advanced_table_inline_row_loading: Inline Row Loading
34
31
  - advanced_table_responsive: Responsive Tables
35
32
  - advanced_table_custom_cell: Custom Components for Cells
@@ -23,6 +23,4 @@ export { default as AdvancedTableTablePropsStickyHeader } from './_advanced_tabl
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
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'
26
+ export { default as AdvancedTableStickyColumns } from './_advanced_table_sticky_columns.jsx'
@@ -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'
@@ -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'
@@ -85,16 +85,8 @@
85
85
  .text_input_wrapper input, [class^=pb_text_input_kit] .text_input_wrapper .text_input {
86
86
  border-bottom-right-radius: 0;
87
87
  border-top-right-radius: 0;
88
- border-right-color: transparent;
88
+ border-right-width: 0;
89
89
  }
90
- [class^=pb_text_input_kit] .text_input_wrapper input:focus,
91
- [class^=pb_text_input_kit] .text_input_wrapper .text_input:focus {
92
- border-right-color: $primary;
93
- }
94
- [class^=pb_text_input_kit].error .text_input_wrapper input,
95
- [class^=pb_text_input_kit].error .text_input_wrapper .text_input {
96
- border-right-color: $error;
97
- }
98
90
  }
99
91
 
100
92
  & > [class^=pb_phone_number_input]:not(:first-child) {
@@ -115,16 +107,8 @@
115
107
  .text_input {
116
108
  border-bottom-right-radius: 0;
117
109
  border-top-right-radius: 0;
118
- border-right-color: transparent;
110
+ border-right: none;
119
111
  }
120
- [class^=pb_text_input_kit] .text_input_wrapper input:focus,
121
- [class^=pb_text_input_kit] .text_input_wrapper .text_input:focus {
122
- border-right-color: $primary;
123
- }
124
- [class^=pb_text_input_kit].error .text_input_wrapper input,
125
- [class^=pb_text_input_kit].error .text_input_wrapper .text_input {
126
- border-right-color: $error;
127
- }
128
112
  }
129
113
 
130
114
  &[class*=rails] > [class^=pb_date_picker_kit] {
@@ -1,4 +1,5 @@
1
- <%= pb_rails("flex", props: {orientation: "column", row_gap:"md"}) do %>
1
+ <div>
2
+
2
3
  <%= pb_rails("form_group") do %>
3
4
  <%= pb_rails("text_input", props: { placeholder: "Enter Artist Name" }) %>
4
5
  <%= pb_rails("select", props: {
@@ -16,6 +17,8 @@
16
17
  ]
17
18
  }) %>
18
19
  <% end %>
20
+ <br>
21
+ <br>
19
22
  <%= pb_rails("form_group") do %>
20
23
  <%= pb_rails("select", props: {
21
24
  blank_selection: "Phone",
@@ -29,17 +32,4 @@
29
32
  id: "phone"
30
33
  }) %>
31
34
  <% end %>
32
- <%= pb_rails("form_group") do %>
33
- <%= pb_rails("phone_number_input", props: {
34
- id: "phone2"
35
- }) %>
36
- <%= pb_rails("select", props: {
37
- blank_selection: "Phone",
38
- options: [
39
- { value: "Cell" },
40
- { value: "Work" },
41
- { value: "Home" },
42
- ]
43
- }) %>
44
- <% end %>
45
- <% end %>
35
+ </div>
@@ -4,7 +4,6 @@ import FormGroup from '../_form_group'
4
4
  import PhoneNumberInput from '../../pb_phone_number_input/_phone_number_input'
5
5
  import Select from '../../pb_select/_select'
6
6
  import TextInput from '../../pb_text_input/_text_input'
7
- import Flex from '../../pb_flex/_flex'
8
7
 
9
8
  const FormGroupSelect = (props) => {
10
9
  const options = [
@@ -26,10 +25,7 @@ const FormGroupSelect = (props) => {
26
25
  ]
27
26
 
28
27
  return (
29
- <Flex
30
- orientation="column"
31
- rowGap="md"
32
- >
28
+ <div>
33
29
  <FormGroup>
34
30
  <TextInput
35
31
  placeholder="Enter Artist Name"
@@ -41,29 +37,18 @@ const FormGroupSelect = (props) => {
41
37
  {...props}
42
38
  />
43
39
  </FormGroup>
40
+ <br />
41
+ <br />
44
42
  <FormGroup>
45
43
  <Select
46
44
  blankSelection="Phone"
47
45
  options={phoneOptions}
48
- {...props}
49
- />
46
+ />
50
47
  <PhoneNumberInput
51
48
  id='default'
52
- {...props}
53
49
  />
54
50
  </FormGroup>
55
- <FormGroup>
56
- <PhoneNumberInput
57
- id='default-2'
58
- {...props}
59
- />
60
- <Select
61
- blankSelection="Phone"
62
- options={phoneOptions}
63
- {...props}
64
- />
65
- </FormGroup>
66
- </Flex>
51
+ </div>
67
52
  )
68
53
  }
69
54
 
@@ -210,78 +210,10 @@ $bracket-border-width: 4px;
210
210
  border-right: $bracket-border-width solid $border_light;
211
211
  }
212
212
 
213
- .polygon_node {
214
- position: absolute;
215
- top: calc(50% - 5px);
216
- right: -10px;
217
-
218
- width: 0;
219
- height: 0;
220
- border-top: 5px solid transparent;
221
- border-bottom: 5px solid transparent;
222
- border-left: 10px solid $border_light;
223
- }
224
-
225
213
  .layout_round_label {
226
214
  display: none;
227
215
  }
228
216
 
229
- .layout_participant,
230
- .layout_participant_winner,
231
- .layout_participant_self,
232
- .layout_participant_winner_self,
233
- .layout_participant_winner_self_last {
234
- height: 60px;
235
- }
236
-
237
- .layout_tbd {
238
- height: 140px;
239
- display: flex;
240
- flex-direction: column;
241
- justify-content: center;
242
- }
243
-
244
- .layout_participant_winner,
245
- .layout_participant_self,
246
- .layout_participant_winner_self,
247
- .layout_participant_winner_self_last {
248
- position: relative;
249
-
250
- &::after {
251
- content: "";
252
- position: absolute;
253
- top: 0;
254
- width: 4px;
255
- height: 100%;
256
- }
257
- }
258
-
259
- .layout_participant_winner::after {
260
- right: 0;
261
- background: $product_6_highlight;
262
- }
263
-
264
- .layout_participant_self::after {
265
- left: 0;
266
- background: $category_1;
267
- }
268
-
269
- .layout_participant_winner_self::after {
270
- right: 0;
271
- background: $product_6_highlight;
272
- }
273
-
274
- .layout_participant_winner_self_last::after {
275
- left: 0;
276
- background: $category_1;
277
- }
278
-
279
- .game_separator {
280
- &::before, &::after {
281
- height: 2px;
282
- }
283
- }
284
-
285
217
  @media (max-width: $screen-md-max) {
286
218
  flex-direction: column;
287
219
  .layout_round_label {
@@ -289,8 +221,7 @@ $bracket-border-width: 4px;
289
221
  }
290
222
  .layout_round .layout_game::after,
291
223
  .connector_container,
292
- .half_box,
293
- .polygon_node {
224
+ .half_box {
294
225
  display: none !important;
295
226
  }
296
227
  }
@@ -6,7 +6,6 @@ import { GlobalProps, globalProps, globalInlineProps } from '../utilities/global
6
6
 
7
7
  import { Round, RoundLabel } from "./subcomponents/_round";
8
8
  import Game from "./subcomponents/_game";
9
- import Participant from "./subcomponents/_participant";
10
9
 
11
10
  type LayoutPropTypes = {
12
11
  aria?: {[key: string]: string},
@@ -177,38 +176,13 @@ const Layout = (props: LayoutPropTypes) => {
177
176
  (child: React.ReactElement & {type: {displayName: string}}) => child.type?.displayName !== 'Side'
178
177
  )
179
178
 
180
- const numberOfRounds = Array.isArray(children) ? React.Children.toArray(children).filter(
179
+ const numberOfRounds = Array.isArray(nonSideChildren) ? React.Children.toArray(children).filter(
181
180
  (child) => {
182
181
  return (child as React.ReactElement).type === Layout.Round;
183
182
  }
184
183
  ).length : 0
185
-
186
- const lastRoundWithSelf = React.Children.toArray(children).filter((child) => {
187
- if ((child as React.ReactElement).type !== Layout.Round) {
188
- return false
189
- }
190
-
191
- const roundElement = child as React.ReactElement
192
-
193
- const gameChildren = React.Children.toArray(roundElement.props.children)
194
-
195
- const hasWinningSelfParticipant = gameChildren.some((gameChild) => {
196
- const gameElement = gameChild as React.ReactElement
197
-
198
- const participantChildren = React.Children.toArray(gameElement.props.children)
199
-
200
- return participantChildren.some((participantChild) => {
201
- const participantElement = participantChild as React.ReactElement
202
- const { self } = participantElement.props
203
- return self === true
204
- })
205
- })
206
-
207
- return hasWinningSelfParticipant
208
- }).length
209
-
210
184
  const bracketChildren = nonSideChildren.map(child =>
211
- React.isValidElement(child) ? React.cloneElement(child, { numberOfRounds, lastRoundWithSelf }) : child
185
+ React.isValidElement(child) ? React.cloneElement(child, { numberOfRounds }) : child
212
186
  )
213
187
 
214
188
  const filteredProps = {...props}
@@ -245,6 +219,5 @@ Layout.Footer = Footer
245
219
  Layout.Round = Round
246
220
  Layout.Game = Game
247
221
  Layout.RoundLabel = RoundLabel
248
- Layout.Participant = Participant
249
222
 
250
223
  export default Layout