playbook_ui 14.16.0.pre.alpha.PLAY1929bracketlayout6930 → 14.16.0.pre.alpha.play1756pbcontenttag6933

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d9d5e98cc39044286ea907a7571c235705d22846b338d0cfd968cc240ea2cdc7
4
- data.tar.gz: 0d0cfeb97e0db01704458b47c1f7625695185dc0515df7cd2f6342b7b131d33d
3
+ metadata.gz: 8a4ac3fbaa15f6adca7b726dd7f6657721f22bf831d7f0181b2eba4906173f97
4
+ data.tar.gz: 30ef3eb42bd42f91434da0020c6fe7e25274c8c1589240288f3183839b8a9a98
5
5
  SHA512:
6
- metadata.gz: c21da69e3465628cdd5ed615ef5015bff969d5ee0bf183410f2603a33f00459cad63376c9fcc160052b29e5e94ee8cac73cf3129a22dbe1743d5c7523010453c
7
- data.tar.gz: 74a02f7483b1d8ec893de6391285077011143c920a83e37811adb61f0b8673661d0d9d31aed053659aa650f8913428aa1cbe273cc74fa090ab7033e32655a7fb
6
+ metadata.gz: 859b0b40c1ab98b6fda5255a9d2901afc9af0fc324e4cd57d433927aa7503b9c8438e6eac49f3b18cd368108e942fafb7b755f8614f7ae79b716c8d75a6917f9
7
+ data.tar.gz: 249c3fae7f7766636796bd3ed40f2de2aec4e257fbc801f9fc1a194a905b6262c281a444bb7a41ad11fe2c0b1f0060873d336ff9bfe325c4553ded36d4dc8020
@@ -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,11 +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) ? nonSideChildren.filter((child: any) => child.type?.name === 'Round').length : 0
180
- const bracketChildren = nonSideChildren.map(child =>
181
- React.isValidElement(child) ? React.cloneElement(child, { numberOfRounds }) : child
182
- )
183
-
184
178
  const filteredProps = {...props}
185
179
  delete filteredProps?.position
186
180
 
@@ -202,7 +196,7 @@ const Layout = (props: LayoutPropTypes) => {
202
196
  style={dynamicInlineProps}
203
197
  >
204
198
  {subComponentTags('Side')}
205
- {layout === 'bracket' ? bracketChildren : nonSideChildren}
199
+ {nonSideChildren}
206
200
  </div>
207
201
  )
208
202
  }
@@ -212,8 +206,5 @@ Layout.Body = Body
212
206
  Layout.Item = Item
213
207
  Layout.Header = Header
214
208
  Layout.Footer = Footer
215
- Layout.Round = Round
216
- Layout.Game = Game
217
- Layout.RoundLabel = RoundLabel
218
209
 
219
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,11 +1,8 @@
1
- <%= content_tag(:div,
2
- id: object.id,
3
- data: object.data,
4
- class: object.classname,
1
+ <%= pb_content_tag(:div,
5
2
  style: remove_height_properties(combined_html_options[:style]) || "",
6
3
  **combined_html_options.except(:style)) do %>
7
4
  <div class="tooltip_tooltip" id="<%= object.tooltip_id %>" role="tooltip" style="<%= object.height_and_width_helper %>">
8
5
  <%= content.presence %>
9
6
  <div class="arrow" id="<%= object.tooltip_id %>-arrow"></div>
10
7
  </div>
11
- <% end %>
8
+ <% end %>
@@ -1,11 +1,8 @@
1
1
  <% if object.is_react? %>
2
2
  <%= react_component('Typeahead', object.typeahead_react_options) %>
3
3
  <% else %>
4
- <%= content_tag(:div,
5
- id: object.id,
6
- data: object.data,
7
- class: object.classname + object.inline_class,
8
- **combined_html_options) do %>
4
+ <%= pb_content_tag(:div,
5
+ class: object.classname + object.inline_class) do %>
9
6
  <div class="pb_typeahead_wrapper">
10
7
  <div class="pb_typeahead_loading_indicator" data-pb-typeahead-kit-loading-indicator>
11
8
  <%= pb_rails("icon", props: {
@@ -1,9 +1,4 @@
1
- <%= content_tag(:div,
2
- aria: object.aria,
3
- class: object.classname,
4
- data: object.data,
5
- id: object.id,
6
- **combined_html_options) do %>
1
+ <%= pb_content_tag do %>
7
2
  <% if object.avatar_url.present? || object.avatar %>
8
3
  <%= pb_rails("avatar", props: {
9
4
  name: object.name,
@@ -1,8 +1,3 @@
1
- <%= content_tag(:div,
2
- aria: object.aria,
3
- class: object.classname,
4
- data: object.data,
5
- id: object.id,
6
- **combined_html_options) do %>
1
+ <%= pb_content_tag do %>
7
2
  <%= content_tag(:div, object.display_badge, class: "pb_user_badge_wrapper") %>
8
3
  <% end %>