playbook_ui 14.17.0.pre.alpha.PBNTR766tablenestedcollapsiblerowsborderdoubling7256 → 14.17.0.pre.alpha.PBNTR920emojipickerpoc7130

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 (76) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_background/_background.scss +0 -26
  3. data/app/pb_kits/playbook/pb_background/_background.tsx +3 -5
  4. data/app/pb_kits/playbook/pb_background/background.test.js +0 -5
  5. data/app/pb_kits/playbook/pb_background/docs/example.yml +0 -1
  6. data/app/pb_kits/playbook/pb_background/docs/index.js +0 -1
  7. data/app/pb_kits/playbook/pb_draggable/_draggable.scss +20 -43
  8. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.jsx +105 -102
  9. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.md +3 -3
  10. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.jsx +48 -50
  11. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.md +1 -1
  12. data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_table.jsx → _draggable_with_table_react.jsx} +1 -1
  13. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_react.md +1 -3
  14. data/app/pb_kits/playbook/pb_draggable/docs/example.yml +6 -9
  15. data/app/pb_kits/playbook/pb_draggable/docs/index.js +1 -4
  16. data/app/pb_kits/playbook/pb_draggable/draggable.test.jsx +0 -68
  17. data/app/pb_kits/playbook/pb_draggable/subcomponents/DraggableContainer.tsx +3 -4
  18. data/app/pb_kits/playbook/pb_form_group/_form_group.scss +2 -18
  19. data/app/pb_kits/playbook/pb_form_group/docs/_form_group_select.html.erb +5 -15
  20. data/app/pb_kits/playbook/pb_form_group/docs/_form_group_select.jsx +5 -20
  21. data/app/pb_kits/playbook/pb_layout/_layout.scss +1 -70
  22. data/app/pb_kits/playbook/pb_layout/_layout.tsx +2 -29
  23. data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.jsx +118 -322
  24. data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.md +1 -1
  25. data/app/pb_kits/playbook/pb_layout/subcomponents/_game.tsx +43 -74
  26. data/app/pb_kits/playbook/pb_layout/subcomponents/_round.tsx +4 -21
  27. data/app/pb_kits/playbook/pb_overlay/_overlay.scss +22 -49
  28. data/app/pb_kits/playbook/pb_overlay/_overlay.tsx +4 -15
  29. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_default.md +7 -1
  30. data/app/pb_kits/playbook/pb_overlay/docs/example.yml +0 -3
  31. data/app/pb_kits/playbook/pb_overlay/docs/index.js +0 -3
  32. data/app/pb_kits/playbook/pb_overlay/overlay.test.jsx +1 -39
  33. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating_react.md +1 -1
  34. data/app/pb_kits/playbook/pb_table/docs/example.yml +0 -2
  35. data/app/pb_kits/playbook/pb_table/styles/_collapsible.scss +0 -84
  36. data/app/pb_kits/playbook/pb_table/styles/_headers.scss +7 -19
  37. data/app/pb_kits/playbook/pb_table/table.rb +1 -13
  38. data/app/pb_kits/playbook/pb_table/table_header.rb +1 -13
  39. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_emoji_picker.jsx +371 -0
  40. data/app/pb_kits/playbook/pb_text_input/docs/example.yml +1 -0
  41. data/app/pb_kits/playbook/pb_text_input/docs/index.js +1 -0
  42. data/dist/chunks/{_typeahead-BY6AFq1l.js → _typeahead-7W5Ha5Td.js} +2 -2
  43. data/dist/chunks/{_weekday_stacked-DvC4wBNS.js → _weekday_stacked-DSKatW3m.js} +2 -2
  44. data/dist/chunks/vendor.js +1 -1
  45. data/dist/playbook-doc.js +1 -1
  46. data/dist/playbook-rails-react-bindings.js +1 -1
  47. data/dist/playbook-rails.js +1 -1
  48. data/dist/playbook.css +1 -1
  49. data/lib/playbook/version.rb +1 -1
  50. metadata +17 -31
  51. data/app/pb_kits/playbook/pb_background/docs/_background_overlay.jsx +0 -35
  52. data/app/pb_kits/playbook/pb_background/docs/_background_overlay.md +0 -1
  53. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_line.jsx +0 -110
  54. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_line.md +0 -5
  55. data/app/pb_kits/playbook/pb_layout/subcomponents/_participant.tsx +0 -79
  56. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_color.jsx +0 -63
  57. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_color.md +0 -3
  58. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_gradient_opacity.jsx +0 -39
  59. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_gradient_opacity.md +0 -1
  60. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_layout.jsx +0 -40
  61. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_layout.md +0 -5
  62. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless.html.erb +0 -34
  63. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless_rails.md +0 -1
  64. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating.html.erb +0 -36
  65. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating_rails.md +0 -1
  66. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_default_react.md → _draggable_default.md} +0 -0
  67. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_default.html.erb → _draggable_default_rails.html.erb} +0 -0
  68. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_multiple_containers_react.md → _draggable_multiple_containers.md} +0 -0
  69. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_multiple_containers.html.erb → _draggable_multiple_containers_rails.html.erb} +0 -0
  70. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_cards_react.md → _draggable_with_cards.md} +0 -0
  71. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_cards.html.erb → _draggable_with_cards_rails.html.erb} +0 -0
  72. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_list_react.md → _draggable_with_list.md} +0 -0
  73. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_list.html.erb → _draggable_with_list_rails.html.erb} +0 -0
  74. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_selectable_list_react.md → _draggable_with_selectable_list.md} +0 -0
  75. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_selectable_list.html.erb → _draggable_with_selectable_list_rails.html.erb} +0 -0
  76. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_table_rails.md → _draggable_with_table.md} +0 -0
@@ -128,58 +128,6 @@ const DraggableKitWithCard = () => {
128
128
  );
129
129
  };
130
130
 
131
- const DraggableWithLineVertical = () => {
132
- const [initialState, setInitialState] = useState(data);
133
- return (
134
- <div data-testid={testId}>
135
- <DraggableProvider
136
- dropZone={{ type: "line" }}
137
- initialItems={data}
138
- onReorder={(items) => setInitialState(items)}
139
- >
140
- <Draggable>
141
- <Draggable.Container>
142
- {initialState.map(({ id, text }) => (
143
- <Draggable.Item
144
- dragId={id}
145
- key={id}
146
- >
147
- {text}
148
- </Draggable.Item>
149
- ))}
150
- </Draggable.Container>
151
- </Draggable>
152
- </DraggableProvider>
153
- </div>
154
- );
155
- };
156
-
157
- const DraggableWithLineHorizontal = () => {
158
- const [initialState, setInitialState] = useState(data);
159
- return (
160
- <div data-testid={testId}>
161
- <DraggableProvider
162
- dropZone={{ type: "line", direction: "horizontal" }}
163
- initialItems={data}
164
- onReorder={(items) => setInitialState(items)}
165
- >
166
- <Draggable>
167
- <Draggable.Container>
168
- {initialState.map(({ id, text }) => (
169
- <Draggable.Item
170
- dragId={id}
171
- key={id}
172
- >
173
- {text}
174
- </Draggable.Item>
175
- ))}
176
- </Draggable.Container>
177
- </Draggable>
178
- </DraggableProvider>
179
- </div>
180
- );
181
- };
182
-
183
131
  test("generated default kit and classname", () => {
184
132
  render(<DefaultDraggableKit />);
185
133
  const kit = screen.getByTestId(testId);
@@ -240,19 +188,3 @@ test("generated dragHandle with Card", () => {
240
188
  const dragHandle = card.querySelector(".pb_custom_icon");
241
189
  expect(dragHandle).toBeInTheDocument();
242
190
  });
243
-
244
- test("line dropZone with default direction applies 'line_vertical' class to container", () => {
245
- render(<DraggableWithLineVertical />);
246
- const kit = screen.getByTestId(testId);
247
- const container = kit.querySelector(".pb_draggable_container");
248
-
249
- expect(container).toHaveClass("line_vertical");
250
- });
251
-
252
- test("line dropZone with horizontal direction applies 'line_horizontal' class to container", () => {
253
- render(<DraggableWithLineHorizontal />);
254
- const kit = screen.getByTestId(testId);
255
- const container = kit.querySelector(".pb_draggable_container");
256
-
257
- expect(container).toHaveClass("line_horizontal");
258
- });
@@ -31,7 +31,7 @@ const DraggableContainer = (props: DraggableContainerProps) => {
31
31
  } = contextValues;
32
32
 
33
33
  // Only get direction if dropZone is 'line'
34
- const direction = dropZone === 'line' ? (contextValues.direction || 'vertical') : null;
34
+ const direction = dropZone === 'line' ? (contextValues.direction || 'vertical') : 'vertical';
35
35
 
36
36
  const ariaProps = buildAriaProps(aria);
37
37
  const dataProps = buildDataProps(data);
@@ -41,9 +41,8 @@ const DraggableContainer = (props: DraggableContainerProps) => {
41
41
  const classes = classnames(
42
42
  buildCss("pb_draggable_container"),
43
43
  `${activeContainer === container ? "active" : ""}`,
44
- // Line variant gets line_{direction} classname on container no matter what
45
- dropZone === 'line' && direction === 'vertical' ? 'line_vertical' : '',
46
- dropZone === 'line' && direction === 'horizontal' ? 'line_horizontal' : '',
44
+ // Only add vertical class if dropZone is 'line' and direction is 'vertical'
45
+ (dropZone === 'line' && direction === 'vertical') ? 'vertical' : '',
47
46
  globalProps(props),
48
47
  className
49
48
  );
@@ -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