playbook_ui 14.16.0.pre.alpha.PLAY1929bracketlayout6957 → 14.16.0.pre.alpha.PLAY1938completetooltipfloatinguitransition6830

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 (74) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +2 -34
  3. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +84 -86
  4. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.html.erb +2 -2
  5. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.rb +0 -10
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.jsx +1 -0
  7. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -2
  8. data/app/pb_kits/playbook/pb_advanced_table/index.js +1 -1
  9. data/app/pb_kits/playbook/pb_advanced_table/table_body.rb +2 -4
  10. data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +9 -19
  11. data/app/pb_kits/playbook/pb_advanced_table/table_header.rb +1 -38
  12. data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +37 -49
  13. data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +0 -39
  14. data/app/pb_kits/playbook/pb_button/_button.scss +5 -5
  15. data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +34 -34
  16. data/app/pb_kits/playbook/pb_date_picker/date_picker.html.erb +2 -2
  17. data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +0 -16
  18. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_inline.html.erb +11 -0
  19. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_inline.jsx +7 -0
  20. data/app/pb_kits/playbook/pb_date_picker/sass_partials/_inline_styles.scss +24 -28
  21. data/app/pb_kits/playbook/pb_filter/Filter/CurrentFilters.tsx +4 -3
  22. data/app/pb_kits/playbook/pb_filter/Filter/SortMenu.tsx +3 -2
  23. data/app/pb_kits/playbook/pb_form/pb_form_validation.js +1 -1
  24. data/app/pb_kits/playbook/pb_layout/_layout.scss +0 -58
  25. data/app/pb_kits/playbook/pb_layout/_layout.tsx +7 -20
  26. data/app/pb_kits/playbook/pb_layout/docs/example.yml +0 -1
  27. data/app/pb_kits/playbook/pb_layout/docs/index.js +0 -1
  28. data/app/pb_kits/playbook/pb_layout/layout.test.js +0 -4
  29. data/app/pb_kits/playbook/pb_lightbox/hooks/useVisibility.js +1 -1
  30. data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +1 -2
  31. data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.tsx +11 -29
  32. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_default.html.erb +1 -1
  33. data/app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.html.erb +4 -4
  34. data/app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.rb +0 -2
  35. data/app/pb_kits/playbook/pb_table/_table.tsx +0 -4
  36. data/app/pb_kits/playbook/pb_table/docs/example.yml +0 -2
  37. data/app/pb_kits/playbook/pb_table/docs/index.js +0 -2
  38. data/app/pb_kits/playbook/pb_table/styles/_headers.scss +0 -76
  39. data/app/pb_kits/playbook/pb_table/subcomponents/_table_head.tsx +1 -11
  40. data/app/pb_kits/playbook/pb_table/subcomponents/_table_header.tsx +1 -11
  41. data/app/pb_kits/playbook/pb_table/subcomponents/_table_row.tsx +0 -5
  42. data/app/pb_kits/playbook/pb_table/table.test.js +0 -17
  43. data/app/pb_kits/playbook/pb_tooltip/index.js +1 -1
  44. data/app/pb_kits/playbook/pb_typeahead/index.ts +2 -2
  45. data/app/pb_kits/playbook/utilities/globalProps.ts +1 -1
  46. data/app/pb_kits/playbook/utilities/object.test.js +1 -149
  47. data/app/pb_kits/playbook/utilities/object.ts +42 -124
  48. data/dist/chunks/_typeahead-BEyzuDQy.js +22 -0
  49. data/dist/chunks/_weekday_stacked-BWYgED9z.js +45 -0
  50. data/dist/chunks/{lib-BGzBzFZX.js → lib-BgzBJfYr.js} +3 -3
  51. data/dist/chunks/{pb_form_validation-BvNy9Bd6.js → pb_form_validation-CJD-PyIw.js} +1 -1
  52. data/dist/chunks/vendor.js +1 -1
  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 +8 -20
  59. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows.html.erb +0 -39
  60. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows.html.erb +0 -33
  61. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows_rails.md +0 -1
  62. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_rails.md +0 -6
  63. data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.jsx +0 -190
  64. data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.md +0 -5
  65. data/app/pb_kits/playbook/pb_layout/subcomponents/_game.tsx +0 -90
  66. data/app/pb_kits/playbook/pb_layout/subcomponents/_round.tsx +0 -57
  67. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless.jsx +0 -50
  68. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless_react.md +0 -1
  69. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating.jsx +0 -59
  70. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating_react.md +0 -1
  71. data/dist/chunks/_typeahead-Djo6qCne.js +0 -22
  72. data/dist/chunks/_weekday_stacked-C9nJ2j2C.js +0 -45
  73. /data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_selectable_rows_react.md → _advanced_table_selectable_rows.md} +0 -0
  74. /data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_selectable_rows_no_subrows_react.md → _advanced_table_selectable_rows_no_subrows.md} +0 -0
@@ -106,41 +106,41 @@ const DatePicker = (props: DatePickerProps): React.ReactElement => {
106
106
  const inputAriaProps = buildAriaProps(inputAria)
107
107
  const inputDataProps = buildDataProps(inputData)
108
108
 
109
- useEffect(() => {
110
- datePickerHelper({
111
- allowInput,
112
- customQuickPickDates,
113
- defaultDate,
114
- disableDate,
115
- disableRange,
116
- disableWeekdays,
117
- enableTime,
118
- format,
119
- hideIcon,
120
- inLine,
121
- maxDate,
122
- minDate,
123
- mode,
124
- onChange,
125
- onClose,
126
- pickerId,
127
- plugins,
128
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
129
- // @ts-ignore
130
- position,
131
- positionElement,
132
- selectionType,
133
- showTimezone,
134
- staticPosition,
135
- thisRangesEndToday,
136
- yearRange,
137
- required: false,
138
- }, scrollContainer)
139
- }, initializeOnce ? [] : undefined)
109
+ useEffect(() => {
110
+ datePickerHelper({
111
+ allowInput,
112
+ customQuickPickDates,
113
+ defaultDate,
114
+ disableDate,
115
+ disableRange,
116
+ disableWeekdays,
117
+ enableTime,
118
+ format,
119
+ hideIcon,
120
+ inLine,
121
+ maxDate,
122
+ minDate,
123
+ mode,
124
+ onChange,
125
+ onClose,
126
+ pickerId,
127
+ plugins,
128
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
129
+ // @ts-ignore
130
+ position,
131
+ positionElement,
132
+ selectionType,
133
+ showTimezone,
134
+ staticPosition,
135
+ thisRangesEndToday,
136
+ yearRange,
137
+ required: false,
138
+ }, scrollContainer)
139
+ }, initializeOnce ? [] : undefined)
140
140
  const filteredProps = {...props}
141
141
  if (filteredProps.marginBottom === undefined) {
142
142
  filteredProps.marginBottom = "sm"
143
- }
143
+ }
144
144
  delete filteredProps?.position
145
145
 
146
146
  const classes = classnames(
@@ -221,7 +221,7 @@ const DatePicker = (props: DatePickerProps): React.ReactElement => {
221
221
  {hideIcon && inLine ?
222
222
  <div>
223
223
  <div
224
- className={`${iconWrapperClass()} date-picker-inline-icon-plus`}
224
+ className={iconWrapperClass()}
225
225
  id={`${pickerId}-icon-plus`}
226
226
  >
227
227
  <Icon
@@ -230,7 +230,7 @@ const DatePicker = (props: DatePickerProps): React.ReactElement => {
230
230
  />
231
231
  </div>
232
232
  <div
233
- className={`${iconWrapperClass()} date-picker-inline-angle-down`}
233
+ className={iconWrapperClass()}
234
234
  id={`${pickerId}-angle-down`}
235
235
  >
236
236
  <Icon
@@ -44,7 +44,7 @@
44
44
  <% if object.hide_icon && object.inline %>
45
45
  <!-- Plus Icon -->
46
46
  <div
47
- class="<%= object.icon_wrapper_class %> date-picker-inline-icon-plus"
47
+ class="<%= object.icon_wrapper_class %>"
48
48
  id="<%= object.picker_id %>-icon-plus"
49
49
  >
50
50
  <%= pb_rails("icon", props: {
@@ -55,7 +55,7 @@
55
55
 
56
56
  <!-- Angle Down Icon -->
57
57
  <div
58
- class="<%= object.icon_wrapper_class %> date-picker-inline-angle-down"
58
+ class="<%= object.icon_wrapper_class %>"
59
59
  id="<%= object.picker_id %>-angle-down"
60
60
  >
61
61
  <%= pb_rails("icon", props: {
@@ -174,21 +174,6 @@ const datePickerHelper = (config: DatePickerConfig, scrollContainer: string | HT
174
174
  yearInput.value = fp.currentYear?.toString()
175
175
  }
176
176
 
177
- const handleDatePickerChange = (fp: Instance, selectedDates: Date[]) => {
178
- const inputEl = fp.input
179
-
180
- if (inputEl) {
181
- const inlineDatePickerElem = inputEl.closest('.inline-date-picker')
182
- if (inlineDatePickerElem) {
183
- if (selectedDates && selectedDates.length > 0) {
184
- inlineDatePickerElem.classList.add('show-angle-down-icon')
185
- } else {
186
- inlineDatePickerElem.classList.remove('show-angle-down-icon')
187
- }
188
- }
189
- }
190
- }
191
-
192
177
  // ===========================================================
193
178
  // | Flatpickr initializer w/ config |
194
179
  // ===========================================================
@@ -219,7 +204,6 @@ const datePickerHelper = (config: DatePickerConfig, scrollContainer: string | HT
219
204
  onClose(selectedDates, dateStr)
220
205
  }],
221
206
  onChange: [(selectedDates, dateStr, fp) => {
222
- handleDatePickerChange(fp, selectedDates)
223
207
  yearChangeHook(fp)
224
208
  onChange(dateStr, selectedDates)
225
209
  }],
@@ -4,3 +4,14 @@
4
4
  inline: true,
5
5
  picker_id: "date-picker-inline"
6
6
  }) %>
7
+
8
+ <%= javascript_tag do %>
9
+ window.addEventListener("DOMContentLoaded", (event) => {
10
+ const fpInline = document.querySelector("#date-picker-inline")._flatpickr
11
+ <!-- Display the angle-down icon when a date has been selected -->
12
+ const showAngleDownHandler = () => {
13
+ document.querySelector('.inline-date-picker').classList.add('show-angle-down-icon')
14
+ }
15
+ fpInline.config.onChange.push(showAngleDownHandler)
16
+ })
17
+ <% end %>
@@ -3,12 +3,19 @@ import React from 'react'
3
3
  import DatePicker from '../_date_picker'
4
4
 
5
5
  const DatePickerInline = (props) => {
6
+ const showAngleDownHandler = (dateSelected) => {
7
+ if (dateSelected) {
8
+ document.querySelector('.inline-date-picker').classList.add('show-angle-down-icon')
9
+ }
10
+ }
11
+
6
12
  return (
7
13
  <div>
8
14
  <DatePicker
9
15
  className="inline-date-picker"
10
16
  hideIcon
11
17
  inLine
18
+ onChange={showAngleDownHandler}
12
19
  pickerId="date-picker-inline"
13
20
  {...props}
14
21
  />
@@ -14,12 +14,12 @@
14
14
  opacity: 1;
15
15
  }
16
16
  &:not(:hover) {
17
- .date-picker-inline-angle-down.cal_icon_wrapper {
17
+ #date-picker-inline-angle-down {
18
18
  svg {
19
19
  display: none;
20
20
  }
21
21
  }
22
- .date-picker-inline-icon-plus.cal_icon_wrapper {
22
+ #date-picker-inline-icon-plus {
23
23
  svg {
24
24
  color: $slate;
25
25
  display: inline-block;
@@ -33,12 +33,12 @@
33
33
  [class^="pb_text_input_kit"] .text_input_wrapper .flatpickr-wrapper .text_input .placeholder {
34
34
  color: $primary;
35
35
  }
36
- .date-picker-inline-angle-down.cal_icon_wrapper {
36
+ #date-picker-inline-angle-down {
37
37
  svg {
38
38
  display: none;
39
39
  }
40
40
  }
41
- .date-picker-inline-icon-plus.cal_icon_wrapper {
41
+ #date-picker-inline-icon-plus {
42
42
  svg {
43
43
  display: inline-block;
44
44
  color: $primary;
@@ -47,34 +47,32 @@
47
47
  }
48
48
  &.show-angle-down-icon {
49
49
  &:not(:hover) {
50
- .date-picker-inline-angle-down.cal_icon_wrapper {
50
+ #date-picker-inline-angle-down {
51
51
  svg {
52
52
  display: inline-block;
53
53
  color: $text_lt_light;
54
54
  }
55
55
  }
56
- .date-picker-inline-icon-plus.cal_icon_wrapper {
56
+ #date-picker-inline-icon-plus {
57
57
  svg {
58
58
  display: none;
59
59
  }
60
60
  }
61
61
  }
62
- .date-picker-inline-icon-plus.cal_icon_wrapper {
62
+ #date-picker-inline-icon-plus {
63
63
  svg {
64
64
  display: none;
65
65
  }
66
66
  }
67
- .date-picker-inline-angle-down.cal_icon_wrapper {
67
+ #date-picker-inline-angle-down {
68
68
  svg {
69
69
  display: inline-block;
70
70
  color: $primary;
71
71
  }
72
72
  }
73
73
  }
74
- .date_picker_input.flatpickr-input,
75
- .date_picker_input.flatpickr-input .active,
76
- .text_input.flatpickr-input,
77
- .text_input.flatpickr-input .active {
74
+ #date-picker-inline,
75
+ #date-picker-inline .active {
78
76
  border: none;
79
77
  padding: 5px 5px 5px 10px;
80
78
  background-color: #FFF;
@@ -84,8 +82,8 @@
84
82
  box-shadow: none;
85
83
  }
86
84
  }
87
- .date-picker-inline-angle-down.cal_icon_wrapper,
88
- .date-picker-inline-icon-plus.cal_icon_wrapper {
85
+ #date-picker-inline-angle-down,
86
+ #date-picker-inline-icon-plus {
89
87
  height: 33px;
90
88
  border: none;
91
89
  }
@@ -98,12 +96,12 @@
98
96
  [class^=pb_date_picker_kit].dark {
99
97
  &.inline-date-picker {
100
98
  &:not(:hover) {
101
- .date-picker-inline-angle-down.cal_icon_wrapper {
99
+ #date-picker-inline-angle-down {
102
100
  svg {
103
101
  display: none;
104
102
  }
105
103
  }
106
- .date-picker-inline-icon-plus.cal_icon_wrapper {
104
+ #date-picker-inline-icon-plus {
107
105
  svg {
108
106
  display: inline-block;
109
107
  color: $white;
@@ -117,12 +115,12 @@
117
115
  [class^="pb_text_input_kit"] .text_input_wrapper .flatpickr-wrapper .text_input .placeholder {
118
116
  color: $white;
119
117
  }
120
- .date-picker-inline-angle-down.cal_icon_wrapper {
118
+ #date-picker-inline-angle-down {
121
119
  svg {
122
120
  display: none;
123
121
  }
124
122
  }
125
- .date-picker-inline-icon-plus.cal_icon_wrapper {
123
+ #date-picker-inline-icon-plus {
126
124
  svg {
127
125
  display: inline-block;
128
126
  color: $white;
@@ -131,34 +129,32 @@
131
129
  }
132
130
  &.show-angle-down-icon {
133
131
  &:not(:hover) {
134
- .date-picker-inline-angle-down.cal_icon_wrapper {
132
+ #date-picker-inline-angle-down {
135
133
  svg {
136
134
  display: inline-block;
137
135
  color: $white;
138
136
  }
139
137
  }
140
- .date-picker-inline-icon-plus.cal_icon_wrapper {
138
+ #date-picker-inline-icon-plus {
141
139
  svg {
142
140
  display: none;
143
141
  }
144
142
  }
145
143
  }
146
- .date-picker-inline-icon-plus.cal_icon_wrapper {
144
+ #date-picker-inline-icon-plus {
147
145
  svg {
148
146
  display: none;
149
147
  }
150
148
  }
151
- .date-picker-inline-angle-down.cal_icon_wrapper {
149
+ #date-picker-inline-angle-down {
152
150
  svg {
153
151
  display: inline-block;
154
152
  color: $white;
155
153
  }
156
154
  }
157
155
  }
158
- .date_picker_input.flatpickr-input,
159
- .date_picker_input.flatpickr-input .active,
160
- .text_input.flatpickr-input,
161
- .text_input.flatpickr-input .active {
156
+ #date-picker-inline,
157
+ #date-picker-inline .active {
162
158
  background-color: rgba($white,.10);
163
159
  border: none;
164
160
  padding: 5px 5px 5px 10px;
@@ -168,8 +164,8 @@
168
164
  box-shadow: none;
169
165
  }
170
166
  }
171
- .date-picker-inline-angle-down.cal_icon_wrapper,
172
- .date-picker-inline-icon-plus.cal_icon_wrapper {
167
+ #date-picker-inline-angle-down,
168
+ #date-picker-inline-icon-plus {
173
169
  height: 33px;
174
170
  border: none;
175
171
  }
@@ -1,5 +1,6 @@
1
1
  import React from 'react'
2
- import { isEmpty, omitBy, map } from '../../utilities/object'
2
+ import { map } from 'lodash'
3
+ import { isEmpty, omitBy } from '../../utilities/object'
3
4
 
4
5
  import Body from '../../pb_body/_body'
5
6
  import Caption from '../../pb_caption/_caption'
@@ -45,12 +46,12 @@ const CurrentFilters = ({ dark, filters }: CurrentFiltersProps): React.ReactElem
45
46
  dark={dark}
46
47
  size={4}
47
48
  tag="h4"
48
- text={`${name}`}
49
+ text={name}
49
50
  /> :
50
51
  <div>
51
52
  <Caption
52
53
  dark={dark}
53
- text={`${name}`}
54
+ text={name}
54
55
  />
55
56
  <Title
56
57
  dark={dark}
@@ -1,5 +1,6 @@
1
1
  import React, { useState } from 'react'
2
- import { find, partial, map } from '../../utilities/object'
2
+ import { map } from 'lodash'
3
+ import { find, partial } from '../../utilities/object'
3
4
 
4
5
  import Button from '../../pb_button/_button'
5
6
  import Icon from '../../pb_icon/_icon'
@@ -26,7 +27,7 @@ const directionIcon = (dir: Direction) => (
26
27
 
27
28
  const renderOptions = (options: SortOptions, value: SortValue[], handleChange: (arg0: SortValue) => void) => (
28
29
  map(options, (label, name) => {
29
- const next = nextValue(value, String(name))
30
+ const next = nextValue(value, name)
30
31
  return (
31
32
  <ListItem key={`option-${next.name}-${next.dir}`}>
32
33
  <Button
@@ -1,5 +1,5 @@
1
1
  import PbEnhancedElement from '../pb_enhanced_element'
2
- import { debounce } from '../utilities/object'
2
+ import { debounce } from 'lodash'
3
3
 
4
4
  // Kit selectors
5
5
  const KIT_SELECTOR = '[class^="pb_"][class*="_kit"]'
@@ -10,8 +10,6 @@ $list-header-height: $space_lg;
10
10
  $list-footer-height: $space_lg;
11
11
  $list-border-radius: $border_rad_lighter;
12
12
  $card-border-radius: $border_rad_lightest;
13
- $bracket-connector-width: 45px;
14
- $bracket-border-width: 4px;
15
13
 
16
14
 
17
15
  [class^=pb_layout_kit] {
@@ -170,62 +168,6 @@ $bracket-border-width: 4px;
170
168
  }
171
169
  }
172
170
 
173
- &[class*=_bracket]{
174
- display: flex;
175
- overflow-x: scroll;
176
-
177
- div.layout_round {
178
- display: flex;
179
- flex-direction: column;
180
- justify-content: space-around;
181
- flex-grow: 1;
182
- }
183
-
184
- .connector_container {
185
- display: flex;
186
- flex-direction: column;
187
- justify-content: space-around;
188
- }
189
- .right_connector {
190
- border-top: $bracket-border-width solid $border_light;
191
- width: $bracket-connector-width;
192
- margin-left: $bracket-connector-width;
193
- }
194
-
195
- .layout_round .layout_game {
196
- position: relative;
197
- }
198
-
199
- .half_box {
200
- content: '';
201
- position: absolute;
202
- top: calc(50% - $bracket-border-width / 2);
203
- height: calc(100% + $bracket-border-width);
204
- width: $bracket-connector-width;
205
- right: -$bracket-connector-width;
206
- border-top-right-radius: $border_radius_lg;
207
- border-bottom-right-radius: $border_radius_lg;
208
- border-top: $bracket-border-width solid $border_light;
209
- border-bottom: $bracket-border-width solid $border_light;
210
- border-right: $bracket-border-width solid $border_light;
211
- }
212
-
213
- .layout_round_label {
214
- display: none;
215
- }
216
-
217
- @media (max-width: $screen-md-max) {
218
- flex-direction: column;
219
- .layout_round_label {
220
- display: block;
221
- }
222
- .layout_round .layout_game::after,
223
- .connector_container,
224
- .half_box {
225
- display: none !important;
226
- }
227
- }
228
- }
229
171
 
230
172
  &[class*=_sidebar]{
231
173
  $layout_sizes: (
@@ -4,9 +4,6 @@ import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../uti
4
4
 
5
5
  import { GlobalProps, globalProps, globalInlineProps } from '../utilities/globalProps'
6
6
 
7
- import { Round, RoundLabel } from "./subcomponents/_round";
8
- import Game from "./subcomponents/_game";
9
-
10
7
  type LayoutPropTypes = {
11
8
  aria?: {[key: string]: string},
12
9
  children?: React.ReactChild[] | React.ReactChild,
@@ -21,7 +18,7 @@ type LayoutPropTypes = {
21
18
  size?: "xs" | "sm" | "md" | "base" | "lg" | "xl",
22
19
  variant?: "light" | "dark" | "gradient",
23
20
  transparent?: boolean,
24
- layout?: "sidebar" | "collection" | "kanban" | "content" | "masonry" | "bracket",
21
+ layout?: "sidebar" | "collection" | "kanban" | "content" | "masonry",
25
22
  } & GlobalProps
26
23
 
27
24
  type LayoutSideProps = {
@@ -143,7 +140,7 @@ const Layout = (props: LayoutPropTypes) => {
143
140
  const htmlProps = buildHtmlProps(htmlOptions)
144
141
 
145
142
  const layoutCss =
146
- (layout == 'collection' || layout == 'bracket')
143
+ layout == 'collection'
147
144
  ? `pb_layout_kit_${layout}`
148
145
  : layout == 'kanban'
149
146
  ? `pb_layout_kit_${layout}${responsiveClass}`
@@ -154,9 +151,11 @@ const Layout = (props: LayoutPropTypes) => {
154
151
  })
155
152
 
156
153
  const layoutCollapseCss =
157
- (layout == 'collection' || layout == 'kanban' || layout == 'bracket')
154
+ layout == 'collection'
158
155
  ? ''
159
- : buildCss('layout', position, 'collapse', collapse)
156
+ : layout == 'kanban'
157
+ ? ''
158
+ : buildCss('layout', position, 'collapse', collapse)
160
159
 
161
160
  const layoutChildren = React.Children.toArray(children)
162
161
 
@@ -176,15 +175,6 @@ const Layout = (props: LayoutPropTypes) => {
176
175
  (child: React.ReactElement & {type: {displayName: string}}) => child.type?.displayName !== 'Side'
177
176
  )
178
177
 
179
- const numberOfRounds = Array.isArray(nonSideChildren) ? React.Children.toArray(children).filter(
180
- (child) => {
181
- return (child as React.ReactElement).type === Layout.Round;
182
- }
183
- ).length : 0
184
- const bracketChildren = nonSideChildren.map(child =>
185
- React.isValidElement(child) ? React.cloneElement(child, { numberOfRounds }) : child
186
- )
187
-
188
178
  const filteredProps = {...props}
189
179
  delete filteredProps?.position
190
180
 
@@ -206,7 +196,7 @@ const Layout = (props: LayoutPropTypes) => {
206
196
  style={dynamicInlineProps}
207
197
  >
208
198
  {subComponentTags('Side')}
209
- {layout === 'bracket' ? bracketChildren : nonSideChildren}
199
+ {nonSideChildren}
210
200
  </div>
211
201
  )
212
202
  }
@@ -216,8 +206,5 @@ Layout.Body = Body
216
206
  Layout.Item = Item
217
207
  Layout.Header = Header
218
208
  Layout.Footer = Footer
219
- Layout.Round = Round
220
- Layout.Game = Game
221
- Layout.RoundLabel = RoundLabel
222
209
 
223
210
  export default Layout
@@ -18,5 +18,4 @@ examples:
18
18
  - layout_kanban: Kanban Layout
19
19
  - layout_content: Content Layout
20
20
  - layout_masonry: Masonry Layout
21
- - layout_bracket: Bracket Layout
22
21
 
@@ -7,5 +7,4 @@ export { default as LayoutKanbanResponsive } from './_layout_kanban_responsive.j
7
7
  export { default as LayoutCollectionDetail } from './_layout_collection_detail.jsx'
8
8
  export { default as LayoutContent } from './_layout_content.jsx'
9
9
  export { default as LayoutMasonry } from './_layout_masonry.jsx'
10
- export { default as LayoutBracket } from './_layout_bracket.jsx'
11
10
 
@@ -82,10 +82,6 @@ test("render all layout variants", () => {
82
82
  layout: "masonry",
83
83
  expected: "pb_layout_kit_masonry_size_md_left_light",
84
84
  },
85
- {
86
- layout: "bracket",
87
- expected: "pb_layout_kit_bracket",
88
- },
89
85
  ]
90
86
 
91
87
  testValues.forEach(({ layout, expected }) => {
@@ -1,4 +1,4 @@
1
- import { debounce } from "../../utilities/object"
1
+ import { debounce } from 'lodash'
2
2
  import { useCallback, useMemo, useState } from 'react'
3
3
 
4
4
  export default function useVisibility(initialState = false) {
@@ -7,12 +7,11 @@ import {
7
7
  buildDataProps,
8
8
  buildHtmlProps,
9
9
  } from "../utilities/props";
10
- import { cloneDeep } from "../utilities/object";
11
-
12
10
  import Icon from "../pb_icon/_icon";
13
11
  import FormPill from "../pb_form_pill/_form_pill";
14
12
  import Body from "../pb_body/_body";
15
13
  import Caption from "../pb_caption/_caption";
14
+ import { cloneDeep } from "lodash";
16
15
  import MultiLevelSelectOptions from "./multi_level_select_options";
17
16
  import MultiLevelSelectContext from "./context";
18
17
 
@@ -32,12 +32,11 @@ type RichTextEditorProps = {
32
32
  advancedEditor?: any,
33
33
  advancedEditorToolbar?: boolean,
34
34
  toolbarBottom?: boolean,
35
- children?: React.ReactNode | React.ReactNode[],
35
+ children?: React.ReactNode | React.ReactNode[]
36
36
  className?: string,
37
37
  data?: { [key: string]: string },
38
38
  focus?: boolean,
39
- htmlOptions?: { [key: string]: string | number | boolean | (() => void) },
40
- inputOptions?: { [key: string]: string | number | boolean | (() => void) },
39
+ htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
41
40
  id?: string,
42
41
  inline?: boolean,
43
42
  extensions?: { [key: string]: string }[],
@@ -62,7 +61,6 @@ const RichTextEditor = (props: RichTextEditorProps): React.ReactElement => {
62
61
  data = {},
63
62
  focus = false,
64
63
  htmlOptions = {},
65
- inputOptions = {},
66
64
  inline = false,
67
65
  extensions,
68
66
  name,
@@ -72,7 +70,7 @@ const RichTextEditor = (props: RichTextEditorProps): React.ReactElement => {
72
70
  sticky = false,
73
71
  template = '',
74
72
  value = '',
75
- maxWidth = "md"
73
+ maxWidth="md"
76
74
  } = props
77
75
 
78
76
  const ariaProps = buildAriaProps(aria),
@@ -81,28 +79,12 @@ const RichTextEditor = (props: RichTextEditorProps): React.ReactElement => {
81
79
 
82
80
  const htmlProps = buildHtmlProps(htmlOptions)
83
81
 
84
- const handleOnEditorReady = (editorInstance: Editor) => {
85
- setEditor(editorInstance)
86
- setTimeout(() => {
87
- const oldId = editorInstance.element.getAttribute('input')
88
- if (oldId) {
89
- const hiddenInput = document.getElementById(oldId)
90
- if (hiddenInput) {
91
- const newId = (inputOptions.id as string) || oldId
92
- hiddenInput.id = newId
93
- editorInstance.element.setAttribute('input', newId)
94
-
95
- if (inputOptions.name) {
96
- hiddenInput.setAttribute('name', inputOptions.name as string)
97
- }
98
- }
99
- }
100
- })
101
- }
82
+ const handleOnEditorReady = (editorInstance: Editor) => setEditor(editorInstance),
83
+ element = editor?.element
102
84
 
103
85
  // DOM manipulation must wait for editor to be ready
104
- if (editor && editor.element) {
105
- const toolbarElement = editor.element.parentElement.querySelector('trix-toolbar') as HTMLElement,
86
+ if (editor) {
87
+ const toolbarElement = element.parentElement.querySelector('trix-toolbar') as HTMLElement,
106
88
  blockCodeButton = toolbarElement.querySelector('[data-trix-attribute=code]') as HTMLElement
107
89
 
108
90
  // replace default trix "block code" button with "inline code" button
@@ -136,8 +118,8 @@ const RichTextEditor = (props: RichTextEditorProps): React.ReactElement => {
136
118
  }, [editor, template])
137
119
 
138
120
  useEffect(() => {
139
- if (!editor?.element) return
140
- editor.element.addEventListener('click', ({ target }: Event) => {
121
+ if (!element) return
122
+ element.addEventListener('click', ({ target }: Event) => {
141
123
  const trixEditorContainer = (target as Element).closest('.pb_rich_text_editor_kit')
142
124
  if (!trixEditorContainer) return
143
125
 
@@ -146,7 +128,7 @@ const RichTextEditor = (props: RichTextEditorProps): React.ReactElement => {
146
128
 
147
129
  if (anchorElement.hasAttribute('href')) window.open(anchorElement.href)
148
130
  })
149
- }, [editor])
131
+ }, [element])
150
132
 
151
133
  const richTextEditorClass = 'pb_rich_text_editor_kit',
152
134
  simpleClass = simple ? 'simple' : '',
@@ -155,7 +137,7 @@ const RichTextEditor = (props: RichTextEditorProps): React.ReactElement => {
155
137
  inlineClass = inline ? 'inline' : '',
156
138
  toolbarBottomClass = toolbarBottom ? 'toolbar-bottom' : ''
157
139
 
158
- let css = classnames(globalProps(props, { maxWidth }), className)
140
+ let css = classnames(globalProps(props, {maxWidth}), className)
159
141
  css = classnames(
160
142
  richTextEditorClass,
161
143
  simpleClass,