playbook_ui 14.17.0.pre.alpha.playcdntest7233 → 14.17.0.pre.rc.0
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 +4 -4
- data/app/pb_kits/playbook/pb_advanced_table/Utilities/types.ts +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +0 -70
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +2 -83
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +7 -20
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +1 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +1 -2
- data/app/pb_kits/playbook/pb_background/_background.scss +0 -26
- data/app/pb_kits/playbook/pb_background/_background.tsx +3 -5
- data/app/pb_kits/playbook/pb_background/background.test.js +0 -5
- data/app/pb_kits/playbook/pb_background/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_background/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_collapsible/__snapshots__/collapsible.test.js.snap +7 -14
- data/app/pb_kits/playbook/pb_contact/contact.test.js +7 -7
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +34 -34
- data/app/pb_kits/playbook/pb_date_picker/date_picker.html.erb +2 -2
- data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +0 -16
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_inline.html.erb +11 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_inline.jsx +7 -0
- data/app/pb_kits/playbook/pb_date_picker/sass_partials/_inline_styles.scss +24 -28
- data/app/pb_kits/playbook/pb_date_range_inline/date_range_inline.test.js +2 -2
- data/app/pb_kits/playbook/pb_date_range_stacked/date_range_stacked.test.js +1 -1
- data/app/pb_kits/playbook/pb_draggable/_draggable.scss +20 -43
- data/app/pb_kits/playbook/pb_draggable/context/index.tsx +17 -58
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.jsx +105 -102
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.md +3 -3
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.jsx +48 -50
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.md +1 -1
- data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_table.jsx → _draggable_with_table_react.jsx} +1 -1
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_react.md +1 -3
- data/app/pb_kits/playbook/pb_draggable/docs/example.yml +6 -9
- data/app/pb_kits/playbook/pb_draggable/docs/index.js +1 -4
- data/app/pb_kits/playbook/pb_draggable/draggable.test.jsx +3 -71
- data/app/pb_kits/playbook/pb_draggable/subcomponents/DraggableContainer.tsx +3 -4
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete.jsx +6 -6
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete_and_custom_display.jsx +6 -6
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.jsx +6 -6
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb +8 -8
- data/app/pb_kits/playbook/pb_dropdown/dropdown.test.jsx +3 -3
- data/app/pb_kits/playbook/pb_filter/Filter/CurrentFilters.tsx +4 -3
- data/app/pb_kits/playbook/pb_filter/Filter/SortMenu.tsx +3 -2
- data/app/pb_kits/playbook/pb_form/pb_form_validation.js +1 -1
- data/app/pb_kits/playbook/pb_form_group/_form_group.scss +0 -22
- data/app/pb_kits/playbook/pb_icon/icon.test.js +9 -9
- data/app/pb_kits/playbook/pb_icon_circle/icon_circle.test.js +1 -1
- data/app/pb_kits/playbook/pb_icon_stat_value/icon_stat_value.test.js +1 -1
- data/app/pb_kits/playbook/pb_icon_value/icon_value.test.js +1 -1
- data/app/pb_kits/playbook/pb_label_value/label_value.test.js +1 -1
- data/app/pb_kits/playbook/pb_layout/_layout.scss +0 -58
- data/app/pb_kits/playbook/pb_layout/_layout.tsx +7 -20
- data/app/pb_kits/playbook/pb_layout/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_layout/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_layout/layout.test.js +0 -4
- data/app/pb_kits/playbook/pb_lightbox/hooks/useVisibility.js +1 -1
- data/app/pb_kits/playbook/pb_link/link.test.jsx +2 -2
- data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +1 -2
- data/app/pb_kits/playbook/pb_nav/_nav_item.test.js +3 -5
- data/app/pb_kits/playbook/pb_stat_change/stat_change.test.js +4 -8
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating_react.md +1 -1
- data/app/pb_kits/playbook/pb_table/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_table/styles/_headers.scss +7 -19
- data/app/pb_kits/playbook/pb_table/styles/_striped.scss +3 -3
- data/app/pb_kits/playbook/pb_table/table.rb +1 -13
- data/app/pb_kits/playbook/pb_table/table_header.rb +1 -13
- data/app/pb_kits/playbook/pb_tooltip/floating_ui.js +282 -0
- data/app/pb_kits/playbook/pb_tooltip/index.js +56 -183
- data/app/pb_kits/playbook/pb_tooltip/tooltip.html.erb +5 -2
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_highlight.jsx +4 -4
- data/app/pb_kits/playbook/pb_typeahead/index.ts +2 -2
- data/app/pb_kits/playbook/pb_typeahead/typeahead.html.erb +5 -2
- data/app/pb_kits/playbook/pb_user/user.html.erb +6 -1
- data/app/pb_kits/playbook/pb_user_badge/user_badge.html.erb +6 -1
- data/app/pb_kits/playbook/utilities/globalProps.ts +1 -1
- data/app/pb_kits/playbook/utilities/object.test.js +1 -149
- data/app/pb_kits/playbook/utilities/object.ts +42 -124
- data/dist/chunks/{_typeahead-C2GOKWtm.js → _typeahead-N-EFroAX.js} +3 -3
- data/dist/chunks/_weekday_stacked-Db780bKR.js +45 -0
- data/dist/chunks/lib-Co5y3V4K.js +29 -0
- data/dist/chunks/{pb_form_validation-BvNy9Bd6.js → pb_form_validation-DMajaRt3.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/playbook-doc.js +1 -1
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/kit_base.rb +4 -4
- data/lib/playbook/version.rb +2 -2
- metadata +19 -33
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_fullscreen.jsx +0 -90
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_fullscreen.md +0 -3
- data/app/pb_kits/playbook/pb_background/docs/_background_overlay.jsx +0 -35
- data/app/pb_kits/playbook/pb_background/docs/_background_overlay.md +0 -1
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_line.jsx +0 -110
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_line.md +0 -5
- data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.jsx +0 -190
- data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.md +0 -5
- data/app/pb_kits/playbook/pb_layout/subcomponents/_game.tsx +0 -90
- data/app/pb_kits/playbook/pb_layout/subcomponents/_round.tsx +0 -57
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_vertical.md +0 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless.html.erb +0 -34
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless_rails.md +0 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating.html.erb +0 -36
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating_rails.md +0 -1
- data/dist/chunks/_weekday_stacked-CFGTPT0O.js +0 -45
- data/dist/chunks/lib-BGzBzFZX.js +0 -29
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_default_react.md → _draggable_default.md} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_default.html.erb → _draggable_default_rails.html.erb} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_multiple_containers_react.md → _draggable_multiple_containers.md} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_multiple_containers.html.erb → _draggable_multiple_containers_rails.html.erb} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_cards_react.md → _draggable_with_cards.md} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_cards.html.erb → _draggable_with_cards_rails.html.erb} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_list_react.md → _draggable_with_list.md} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_list.html.erb → _draggable_with_list_rails.html.erb} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_selectable_list_react.md → _draggable_with_selectable_list.md} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_selectable_list.html.erb → _draggable_with_selectable_list_rails.html.erb} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_table_rails.md → _draggable_with_table.md} +0 -0
@@ -1,90 +0,0 @@
|
|
1
|
-
import React from 'react'
|
2
|
-
import classnames from 'classnames'
|
3
|
-
|
4
|
-
import { GlobalProps, globalProps, globalInlineProps } from '../../utilities/globalProps'
|
5
|
-
|
6
|
-
import Card from '../../pb_card/_card'
|
7
|
-
import SectionSeparator from '../../pb_section_separator/_section_separator'
|
8
|
-
|
9
|
-
type LayoutGameProps = {
|
10
|
-
children: React.ReactNode[] | React.ReactNode,
|
11
|
-
className?: string,
|
12
|
-
numberOfRounds: number,
|
13
|
-
numberOfGames: number,
|
14
|
-
isOdd: boolean,
|
15
|
-
} & GlobalProps
|
16
|
-
|
17
|
-
// Game component (modeled after Item)
|
18
|
-
const Game = (props: LayoutGameProps) => {
|
19
|
-
const { children, className, numberOfRounds, numberOfGames, isOdd } = props
|
20
|
-
const dynamicInlineProps = globalInlineProps(props)
|
21
|
-
|
22
|
-
const numberOfChildren = Array.isArray(children) ? children.length : 0
|
23
|
-
|
24
|
-
const isMultiple = Array.isArray(children)
|
25
|
-
|
26
|
-
let ratio = 0
|
27
|
-
let exponent
|
28
|
-
if (numberOfGames > 1) {
|
29
|
-
exponent = (numberOfRounds) - Math.log2(numberOfGames) - 1
|
30
|
-
ratio = 2 ** exponent
|
31
|
-
}
|
32
|
-
|
33
|
-
if (numberOfChildren === 2) {
|
34
|
-
const [firstChild, secondChild] = React.Children.toArray(children)
|
35
|
-
|
36
|
-
if (React.isValidElement(firstChild) && React.isValidElement(secondChild)) {
|
37
|
-
return (
|
38
|
-
<div
|
39
|
-
className={classnames('layout_game', globalProps(props), className)}
|
40
|
-
style={dynamicInlineProps}
|
41
|
-
>
|
42
|
-
<Card
|
43
|
-
marginY="xs"
|
44
|
-
padding="none"
|
45
|
-
shadow="deep"
|
46
|
-
>
|
47
|
-
<Card.Body padding="xs">{firstChild}</Card.Body>
|
48
|
-
<SectionSeparator />
|
49
|
-
<Card.Body padding="xs">{secondChild}</Card.Body>
|
50
|
-
</Card>
|
51
|
-
{isOdd && numberOfGames > 1 &&
|
52
|
-
<div
|
53
|
-
className="half_box"
|
54
|
-
style={{ height: `calc(${ratio} * 100% + 4px)` }}
|
55
|
-
/>
|
56
|
-
}
|
57
|
-
</div>
|
58
|
-
)
|
59
|
-
}
|
60
|
-
}
|
61
|
-
|
62
|
-
return (
|
63
|
-
<div
|
64
|
-
className={classnames('layout_game', globalProps(props), className)}
|
65
|
-
style={dynamicInlineProps}
|
66
|
-
>
|
67
|
-
{((!isMultiple && children) || numberOfChildren >= 1 )? (
|
68
|
-
children
|
69
|
-
) : (
|
70
|
-
<Card
|
71
|
-
marginY="xs"
|
72
|
-
padding="none"
|
73
|
-
shadow="deep"
|
74
|
-
>
|
75
|
-
<Card.Body padding="xs">To be determined...</Card.Body>
|
76
|
-
<SectionSeparator />
|
77
|
-
<Card.Body padding="xs">To be determined...</Card.Body>
|
78
|
-
</Card>
|
79
|
-
)}
|
80
|
-
{isOdd && numberOfGames > 1 &&
|
81
|
-
<div
|
82
|
-
className="half_box"
|
83
|
-
style={{ height: `calc(${ratio} * 100% + 4px)` }}
|
84
|
-
/>
|
85
|
-
}
|
86
|
-
</div>
|
87
|
-
)
|
88
|
-
}
|
89
|
-
|
90
|
-
export default Game
|
@@ -1,57 +0,0 @@
|
|
1
|
-
import React from 'react'
|
2
|
-
import classnames from 'classnames'
|
3
|
-
|
4
|
-
import { GlobalProps, globalProps, globalInlineProps } from '../../utilities/globalProps'
|
5
|
-
|
6
|
-
type LayoutRoundLabelProps = {
|
7
|
-
children: React.ReactNode[] | React.ReactNode,
|
8
|
-
className?: string,
|
9
|
-
} & GlobalProps
|
10
|
-
|
11
|
-
export const RoundLabel = (props: LayoutRoundLabelProps) => {
|
12
|
-
const { children, className } = props
|
13
|
-
const dynamicInlineProps = globalInlineProps(props)
|
14
|
-
return (
|
15
|
-
<div
|
16
|
-
className={classnames('layout_round_label', className)}
|
17
|
-
style={dynamicInlineProps}
|
18
|
-
>
|
19
|
-
{children}
|
20
|
-
</div>
|
21
|
-
)
|
22
|
-
}
|
23
|
-
|
24
|
-
type LayoutRoundProps = {
|
25
|
-
children: React.ReactNode[] | React.ReactNode,
|
26
|
-
className?: string,
|
27
|
-
numberOfRounds: number,
|
28
|
-
} & GlobalProps
|
29
|
-
|
30
|
-
export const Round = (props: LayoutRoundProps) => {
|
31
|
-
const { children, className, numberOfRounds } = props
|
32
|
-
const dynamicInlineProps = globalInlineProps(props)
|
33
|
-
const numberOfChildren = Array.isArray(children) ? children.length : 0
|
34
|
-
|
35
|
-
const childrenWithProps = Array.isArray(children) ? children.map((child, index) =>
|
36
|
-
React.isValidElement(child) ? React.cloneElement(child, { numberOfRounds, numberOfGames: numberOfChildren, isOdd: index % 2 === 0, key: `child_${index}` }) : child
|
37
|
-
) : children
|
38
|
-
|
39
|
-
const rightConnectors = Array.from({ length: numberOfChildren / 2 }, (_, index) => (
|
40
|
-
<div
|
41
|
-
className="right_connector"
|
42
|
-
key={`right_connector_${index}`}
|
43
|
-
/>
|
44
|
-
))
|
45
|
-
|
46
|
-
return (
|
47
|
-
<>
|
48
|
-
<div
|
49
|
-
className={classnames('layout_round', globalProps(props), className)}
|
50
|
-
style={dynamicInlineProps}
|
51
|
-
>
|
52
|
-
{childrenWithProps}
|
53
|
-
</div>
|
54
|
-
<div className="connector_container">{rightConnectors}</div>
|
55
|
-
</>
|
56
|
-
)
|
57
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
To guarantee the vertical section separator displays properly, please add the `vertical: "stretch"`/`vertical="stretch"` property to the parent container (which is commonly a Flex container). This will stretch the container’s child elements vertically and ensure the section separator appears as expected.
|
@@ -1,34 +0,0 @@
|
|
1
|
-
<%= pb_rails("table", props: { size: "sm", header_style: "borderless" }) do %>
|
2
|
-
<thead>
|
3
|
-
<tr>
|
4
|
-
<th>Column 1</th>
|
5
|
-
<th>Column 2</th>
|
6
|
-
<th>Column 3</th>
|
7
|
-
<th>Column 4</th>
|
8
|
-
<th>Column 5</th>
|
9
|
-
</tr>
|
10
|
-
</thead>
|
11
|
-
<tbody>
|
12
|
-
<tr>
|
13
|
-
<td>Value 1</td>
|
14
|
-
<td>Value 2</td>
|
15
|
-
<td>Value 3</td>
|
16
|
-
<td>Value 4</td>
|
17
|
-
<td>Value 5</td>
|
18
|
-
</tr>
|
19
|
-
<tr>
|
20
|
-
<td>Value 1</td>
|
21
|
-
<td>Value 2</td>
|
22
|
-
<td>Value 3</td>
|
23
|
-
<td>Value 4</td>
|
24
|
-
<td>Value 5</td>
|
25
|
-
</tr>
|
26
|
-
<tr>
|
27
|
-
<td>Value 1</td>
|
28
|
-
<td>Value 2</td>
|
29
|
-
<td>Value 3</td>
|
30
|
-
<td>Value 4</td>
|
31
|
-
<td>Value 5</td>
|
32
|
-
</tr>
|
33
|
-
</tbody>
|
34
|
-
<% end %>
|
@@ -1 +0,0 @@
|
|
1
|
-
Customize your header by removing the header borders with the `header_style: "borderless"` prop.
|
@@ -1,36 +0,0 @@
|
|
1
|
-
<%= pb_rails("card", props: { background: "light" }) do %>
|
2
|
-
<%= pb_rails("table", props: { size: "sm", header_style: "floating" }) do %>
|
3
|
-
<%= pb_rails("table/table_head") do %>
|
4
|
-
<%= pb_rails("background", props: { background_color: "light", tag: "tr" }) do %>
|
5
|
-
<%= pb_rails("table/table_header", props: { text: "Column 1"}) %>
|
6
|
-
<%= pb_rails("table/table_header", props: { text: "Column 2"}) %>
|
7
|
-
<%= pb_rails("table/table_header", props: { text: "Column 3"}) %>
|
8
|
-
<%= pb_rails("table/table_header", props: { text: "Column 4"}) %>
|
9
|
-
<%= pb_rails("table/table_header", props: { text: "Column 5"}) %>
|
10
|
-
<% end %>
|
11
|
-
<% end %>
|
12
|
-
<%= pb_rails("table/table_body") do %>
|
13
|
-
<%= pb_rails("table/table_row") do %>
|
14
|
-
<%= pb_rails("table/table_cell", props: { text: "Value 1"}) %>
|
15
|
-
<%= pb_rails("table/table_cell", props: { text: "Value 2"}) %>
|
16
|
-
<%= pb_rails("table/table_cell", props: { text: "Value 3"}) %>
|
17
|
-
<%= pb_rails("table/table_cell", props: { text: "Value 4"}) %>
|
18
|
-
<%= pb_rails("table/table_cell", props: { text: "Value 5"}) %>
|
19
|
-
<% end %>
|
20
|
-
<%= pb_rails("table/table_row") do %>
|
21
|
-
<%= pb_rails("table/table_cell", props: { text: "Value 1"}) %>
|
22
|
-
<%= pb_rails("table/table_cell", props: { text: "Value 2"}) %>
|
23
|
-
<%= pb_rails("table/table_cell", props: { text: "Value 3"}) %>
|
24
|
-
<%= pb_rails("table/table_cell", props: { text: "Value 4"}) %>
|
25
|
-
<%= pb_rails("table/table_cell", props: { text: "Value 5"}) %>
|
26
|
-
<% end %>
|
27
|
-
<%= pb_rails("table/table_row") do %>
|
28
|
-
<%= pb_rails("table/table_cell", props: { text: "Value 1"}) %>
|
29
|
-
<%= pb_rails("table/table_cell", props: { text: "Value 2"}) %>
|
30
|
-
<%= pb_rails("table/table_cell", props: { text: "Value 3"}) %>
|
31
|
-
<%= pb_rails("table/table_cell", props: { text: "Value 4"}) %>
|
32
|
-
<%= pb_rails("table/table_cell", props: { text: "Value 5"}) %>
|
33
|
-
<% end %>
|
34
|
-
<% end %>
|
35
|
-
<% end %>
|
36
|
-
<% end %>
|
@@ -1 +0,0 @@
|
|
1
|
-
Further customize your header by using the [table with background kit](https://playbook.powerapp.cloud/kits/table/rails#table-with-background-kit) logic to give your table header a custom background color. Use the `header_style: "floating"` prop to visually nest the borderless table within a card or collapsible with a matching background color (the `background_color` passed to Background kit should match the `background` or `background_color` for the element in which it is nested).
|