playbook_ui_docs 14.16.0.pre.rc.6 → 14.17.0.pre.alpha.PBNTR766tablenestedcollapsiblerowsborderdoubling7256
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/docs/_advanced_table_fullscreen.jsx +90 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_fullscreen.md +3 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.jsx +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows.html.erb +39 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows.html.erb +33 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows_rails.md +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_rails.md +6 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +4 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +2 -1
- data/app/pb_kits/playbook/pb_background/docs/_background_overlay.jsx +35 -0
- data/app/pb_kits/playbook/pb_background/docs/_background_overlay.md +1 -0
- data/app/pb_kits/playbook/pb_background/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_background/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_inline.html.erb +0 -11
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_inline.jsx +0 -7
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.jsx +181 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.md +5 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.jsx +99 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.md +1 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_line.jsx +110 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_line.md +5 -0
- data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_table_react.jsx → _draggable_with_table.jsx} +1 -1
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_react.md +3 -1
- data/app/pb_kits/playbook/pb_draggable/docs/example.yml +9 -6
- data/app/pb_kits/playbook/pb_draggable/docs/index.js +4 -1
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_breakpoints.html.erb +3 -0
- data/app/pb_kits/playbook/pb_drawer/docs/example.yml +1 -0
- 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_form/docs/_form_form_with.html.erb +67 -0
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +67 -0
- data/app/pb_kits/playbook/pb_form_group/docs/_form_group_select.html.erb +15 -5
- data/app/pb_kits/playbook/pb_form_group/docs/_form_group_select.jsx +20 -5
- data/app/pb_kits/playbook/pb_icon/docs/_icon_color.html.erb +10 -4
- data/app/pb_kits/playbook/pb_icon/docs/_icon_color.jsx +49 -24
- data/app/pb_kits/playbook/pb_icon_button/docs/_icon_button_click.jsx +13 -0
- data/app/pb_kits/playbook/pb_icon_button/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_icon_button/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.jsx +394 -0
- data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.md +5 -0
- data/app/pb_kits/playbook/pb_layout/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_layout/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_error.html.erb +72 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_error.jsx +97 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_label.html.erb +71 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_label.jsx +91 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/example.yml +4 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/index.js +3 -1
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_color.jsx +63 -0
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_color.md +3 -0
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_default.md +1 -7
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_gradient_opacity.jsx +39 -0
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_gradient_opacity.md +1 -0
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_layout.jsx +40 -0
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_layout.md +5 -0
- data/app/pb_kits/playbook/pb_overlay/docs/example.yml +3 -0
- data/app/pb_kits/playbook/pb_overlay/docs/index.js +3 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_default.html.erb +1 -1
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_vertical.md +1 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless.html.erb +34 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless.jsx +50 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless_rails.md +1 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless_react.md +1 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating.html.erb +36 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating.jsx +59 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating_rails.md +1 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating_react.md +1 -0
- data/app/pb_kits/playbook/pb_table/docs/example.yml +4 -0
- data/app/pb_kits/playbook/pb_table/docs/index.js +2 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_disabled.html.erb +19 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_disabled.jsx +23 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_highlight.jsx +4 -4
- data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_user/docs/_user_font_options.html.erb +22 -0
- data/app/pb_kits/playbook/pb_user/docs/_user_font_options.jsx +40 -0
- data/app/pb_kits/playbook/pb_user/docs/_user_font_options_rails.md +5 -0
- data/app/pb_kits/playbook/pb_user/docs/_user_font_options_react.md +5 -0
- data/app/pb_kits/playbook/pb_user/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_user/docs/index.js +1 -0
- data/dist/playbook-doc.js +1 -1
- metadata +58 -16
- /data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_selectable_rows_no_subrows.md → _advanced_table_selectable_rows_no_subrows_react.md} +0 -0
- /data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_selectable_rows.md → _advanced_table_selectable_rows_react.md} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_default_rails.html.erb → _draggable_default.html.erb} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_default.md → _draggable_default_react.md} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_multiple_containers_rails.html.erb → _draggable_multiple_containers.html.erb} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_multiple_containers.md → _draggable_multiple_containers_react.md} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_cards_rails.html.erb → _draggable_with_cards.html.erb} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_cards.md → _draggable_with_cards_react.md} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_list_rails.html.erb → _draggable_with_list.html.erb} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_list.md → _draggable_with_list_react.md} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_selectable_list_rails.html.erb → _draggable_with_selectable_list.html.erb} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_selectable_list.md → _draggable_with_selectable_list_react.md} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_table.md → _draggable_with_table_rails.md} +0 -0
@@ -0,0 +1,71 @@
|
|
1
|
+
<% treeData = [{
|
2
|
+
label: "Power Home Remodeling",
|
3
|
+
value: "Power Home Remodeling",
|
4
|
+
id: "100",
|
5
|
+
expanded: true,
|
6
|
+
children: [
|
7
|
+
{
|
8
|
+
label: "People",
|
9
|
+
value: "People",
|
10
|
+
id: "101",
|
11
|
+
expanded: true,
|
12
|
+
children: [
|
13
|
+
{
|
14
|
+
label: "Talent Acquisition",
|
15
|
+
value: "Talent Acquisition",
|
16
|
+
id: "102",
|
17
|
+
},
|
18
|
+
{
|
19
|
+
label: "Business Affairs",
|
20
|
+
value: "Business Affairs",
|
21
|
+
id: "103",
|
22
|
+
children: [
|
23
|
+
{
|
24
|
+
label: "Initiatives",
|
25
|
+
value: "Initiatives",
|
26
|
+
id: "104",
|
27
|
+
},
|
28
|
+
{
|
29
|
+
label: "Learning & Development",
|
30
|
+
value: "Learning & Development",
|
31
|
+
id: "105",
|
32
|
+
},
|
33
|
+
],
|
34
|
+
},
|
35
|
+
{
|
36
|
+
label: "People Experience",
|
37
|
+
value: "People Experience",
|
38
|
+
id: "106",
|
39
|
+
},
|
40
|
+
],
|
41
|
+
},
|
42
|
+
{
|
43
|
+
label: "Contact Center",
|
44
|
+
value: "Contact Center",
|
45
|
+
id: "107",
|
46
|
+
children: [
|
47
|
+
{
|
48
|
+
label: "Appointment Management",
|
49
|
+
value: "Appointment Management",
|
50
|
+
id: "108",
|
51
|
+
},
|
52
|
+
{
|
53
|
+
label: "Customer Service",
|
54
|
+
value: "Customer Service",
|
55
|
+
id: "109",
|
56
|
+
},
|
57
|
+
{
|
58
|
+
label: "Energy",
|
59
|
+
value: "Energy",
|
60
|
+
id: "110",
|
61
|
+
},
|
62
|
+
],
|
63
|
+
},
|
64
|
+
],
|
65
|
+
}] %>
|
66
|
+
|
67
|
+
<%= pb_rails("multi_level_select", props: {
|
68
|
+
id: "multi-level-select-label-rails",
|
69
|
+
label: "Select a department",
|
70
|
+
tree_data: treeData
|
71
|
+
}) %>
|
@@ -0,0 +1,91 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import MultiLevelSelect from "../_multi_level_select";
|
3
|
+
|
4
|
+
const treeData = [
|
5
|
+
{
|
6
|
+
label: "Power Home Remodeling",
|
7
|
+
value: "Power Home Remodeling",
|
8
|
+
id: "powerhome1",
|
9
|
+
expanded: true,
|
10
|
+
children: [
|
11
|
+
{
|
12
|
+
label: "People",
|
13
|
+
value: "People",
|
14
|
+
id: "people1",
|
15
|
+
expanded: true,
|
16
|
+
children: [
|
17
|
+
{
|
18
|
+
label: "Talent Acquisition",
|
19
|
+
value: "Talent Acquisition",
|
20
|
+
id: "talent1",
|
21
|
+
},
|
22
|
+
{
|
23
|
+
label: "Business Affairs",
|
24
|
+
value: "Business Affairs",
|
25
|
+
id: "business1",
|
26
|
+
children: [
|
27
|
+
{
|
28
|
+
label: "Initiatives",
|
29
|
+
value: "Initiatives",
|
30
|
+
id: "initiative1",
|
31
|
+
},
|
32
|
+
{
|
33
|
+
label: "Learning & Development",
|
34
|
+
value: "Learning & Development",
|
35
|
+
id: "development1",
|
36
|
+
},
|
37
|
+
],
|
38
|
+
},
|
39
|
+
{
|
40
|
+
label: "People Experience",
|
41
|
+
value: "People Experience",
|
42
|
+
id: "experience1",
|
43
|
+
},
|
44
|
+
],
|
45
|
+
},
|
46
|
+
{
|
47
|
+
label: "Contact Center",
|
48
|
+
value: "Contact Center",
|
49
|
+
id: "contact1",
|
50
|
+
children: [
|
51
|
+
{
|
52
|
+
label: "Appointment Management",
|
53
|
+
value: "Appointment Management",
|
54
|
+
id: "appointment1",
|
55
|
+
},
|
56
|
+
{
|
57
|
+
label: "Customer Service",
|
58
|
+
value: "Customer Service",
|
59
|
+
id: "customer1",
|
60
|
+
},
|
61
|
+
{
|
62
|
+
label: "Energy",
|
63
|
+
value: "Energy",
|
64
|
+
id: "energy1",
|
65
|
+
},
|
66
|
+
],
|
67
|
+
},
|
68
|
+
],
|
69
|
+
},
|
70
|
+
];
|
71
|
+
|
72
|
+
const MultiLevelSelectDefault = (props) => {
|
73
|
+
return (
|
74
|
+
<div>
|
75
|
+
<MultiLevelSelect
|
76
|
+
id='multiselect-label'
|
77
|
+
label="Select a Department"
|
78
|
+
onSelect={(selectedNodes) =>
|
79
|
+
console.log(
|
80
|
+
"Selected Items",
|
81
|
+
selectedNodes
|
82
|
+
)
|
83
|
+
}
|
84
|
+
treeData={treeData}
|
85
|
+
{...props}
|
86
|
+
/>
|
87
|
+
</div>
|
88
|
+
)
|
89
|
+
};
|
90
|
+
|
91
|
+
export default MultiLevelSelectDefault;
|
@@ -8,6 +8,8 @@ examples:
|
|
8
8
|
- multi_level_select_with_form: With Form
|
9
9
|
- multi_level_select_color: With Pills (Custom Color)
|
10
10
|
- multi_level_select_reset: Reset Selection
|
11
|
+
- multi_level_select_label: With Label
|
12
|
+
- multi_level_select_error: Error
|
11
13
|
- multi_level_select_disabled: Disabled Input
|
12
14
|
- multi_level_select_disabled_options_default: Disabled Options (Default)
|
13
15
|
- multi_level_select_disabled_options: Disabled Options (Return All Selected)
|
@@ -24,6 +26,8 @@ examples:
|
|
24
26
|
- multi_level_select_color: With Pills (Custom Color)
|
25
27
|
- multi_level_select_with_children: Checkboxes With Children
|
26
28
|
- multi_level_select_with_children_with_radios: Single Select With Children
|
29
|
+
- multi_level_select_label: With Label
|
30
|
+
- multi_level_select_error: Error
|
27
31
|
- multi_level_select_disabled: Disabled Input
|
28
32
|
- multi_level_select_disabled_options_default: Disabled Options (Default)
|
29
33
|
- multi_level_select_disabled_options: Disabled Options (Return All Selected)
|
@@ -8,7 +8,9 @@ export { default as MultiLevelSelectWithChildren } from './_multi_level_select_w
|
|
8
8
|
export { default as MultiLevelSelectWithChildrenWithRadios } from './_multi_level_select_with_children_with_radios.jsx'
|
9
9
|
export { default as MultiLevelSelectDisabled } from './_multi_level_select_disabled.jsx'
|
10
10
|
export { default as MultiLevelSelectReactHook } from './_multi_level_select_react_hook.jsx'
|
11
|
+
export { default as MultiLevelSelectError } from './_multi_level_select_error.jsx'
|
11
12
|
export { default as MultiLevelSelectDisabledOptions } from './_multi_level_select_disabled_options.jsx'
|
12
13
|
export { default as MultiLevelSelectDisabledOptionsParent } from './_multi_level_select_disabled_options_parent.jsx'
|
13
14
|
export { default as MultiLevelSelectDisabledOptionsParentDefault } from './_multi_level_select_disabled_options_parent_default.jsx'
|
14
|
-
export { default as MultiLevelSelectDisabledOptionsDefault } from './_multi_level_select_disabled_options_default.jsx'
|
15
|
+
export { default as MultiLevelSelectDisabledOptionsDefault } from './_multi_level_select_disabled_options_default.jsx'
|
16
|
+
export { default as MultiLevelSelectLabel } from './_multi_level_select_label.jsx'
|
@@ -0,0 +1,63 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
|
3
|
+
import Overlay from '../../pb_overlay/_overlay'
|
4
|
+
import Image from '../../pb_image/_image'
|
5
|
+
import Flex from '../../pb_flex/_flex'
|
6
|
+
|
7
|
+
const OverlayColor = () => (
|
8
|
+
<Flex
|
9
|
+
justify="around"
|
10
|
+
wrap
|
11
|
+
>
|
12
|
+
<Overlay
|
13
|
+
color="black"
|
14
|
+
marginBottom="xxs"
|
15
|
+
>
|
16
|
+
<Image
|
17
|
+
alt="picture of a misty forest"
|
18
|
+
display="block"
|
19
|
+
size="xl"
|
20
|
+
url="https://unsplash.it/500/400/?image=634"
|
21
|
+
/>
|
22
|
+
</Overlay>
|
23
|
+
<Overlay
|
24
|
+
color="black"
|
25
|
+
gradient={false}
|
26
|
+
marginBottom="xxs"
|
27
|
+
opacity="opacity_4"
|
28
|
+
>
|
29
|
+
<Image
|
30
|
+
alt="picture of a misty forest"
|
31
|
+
display="block"
|
32
|
+
size="xl"
|
33
|
+
url="https://unsplash.it/500/400/?image=634"
|
34
|
+
/>
|
35
|
+
</Overlay>
|
36
|
+
<Overlay
|
37
|
+
color="error"
|
38
|
+
marginBottom="xxs"
|
39
|
+
>
|
40
|
+
<Image
|
41
|
+
alt="picture of a misty forest"
|
42
|
+
display="block"
|
43
|
+
size="xl"
|
44
|
+
url="https://unsplash.it/500/400/?image=634"
|
45
|
+
/>
|
46
|
+
</Overlay>
|
47
|
+
<Overlay
|
48
|
+
color="error"
|
49
|
+
gradient={false}
|
50
|
+
marginBottom="xxs"
|
51
|
+
opacity="opacity_4"
|
52
|
+
>
|
53
|
+
<Image
|
54
|
+
alt="picture of a misty forest"
|
55
|
+
display="block"
|
56
|
+
size="xl"
|
57
|
+
url="https://unsplash.it/500/400/?image=634"
|
58
|
+
/>
|
59
|
+
</Overlay>
|
60
|
+
</Flex>
|
61
|
+
)
|
62
|
+
|
63
|
+
export default OverlayColor
|
@@ -0,0 +1,3 @@
|
|
1
|
+
The `color` prop is used to change the color of the solid or gradient mask. Gradient overlays always start opaque and fade to transparent.
|
2
|
+
|
3
|
+
NOTE: Images are set to `display: block` to remove the default inline spacing caused by line height. This ensures the image fully fills the container without unexpected gaps.
|
@@ -1,7 +1 @@
|
|
1
|
-
Overlays
|
2
|
-
|
3
|
-
The optional `layout` prop accepts the `position` and `size` of the overlay as a key:value pair.
|
4
|
-
|
5
|
-
The `position` key accepts `bottom` (default), `top`, `y` (for both top and bottom) `right`, `left`, or `x` (for both left and right), which sets the side(s) where the `color` overlay starts. The direction of the overlay is always toward the opposite side of the position. For example, the default position of `bottom` starts the overlay on the bottom edge of your container and extends it toward the opposite side: the top.
|
6
|
-
|
7
|
-
The `size` value is `full` (100%) by default, but accepts our [spacing tokens](https://playbook.powerapp.cloud/visual_guidelines/spacing) or a percentage value as a string, and literally translates to how much of the container is covered by the overlay(s).
|
1
|
+
Overlays help shift focus by dimming or masking background content. This kit supports gradient and solid color modes, with adjustable opacity to suit the context.
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
|
3
|
+
import Overlay from '../../pb_overlay/_overlay'
|
4
|
+
import Image from '../../pb_image/_image'
|
5
|
+
import Flex from '../../pb_flex/_flex'
|
6
|
+
|
7
|
+
const OverlayGradientOpacity = () => (
|
8
|
+
<Flex
|
9
|
+
justify="around"
|
10
|
+
wrap
|
11
|
+
>
|
12
|
+
<Overlay
|
13
|
+
gradient={false}
|
14
|
+
marginBottom="xxs"
|
15
|
+
opacity="opacity_2"
|
16
|
+
>
|
17
|
+
<Image
|
18
|
+
alt="picture of a misty forest"
|
19
|
+
display="block"
|
20
|
+
maxWidth="100%"
|
21
|
+
url="https://unsplash.it/500/400/?image=634"
|
22
|
+
/>
|
23
|
+
</Overlay>
|
24
|
+
<Overlay
|
25
|
+
gradient={false}
|
26
|
+
marginBottom="xxs"
|
27
|
+
opacity="opacity_8"
|
28
|
+
>
|
29
|
+
<Image
|
30
|
+
alt="picture of a misty forest"
|
31
|
+
display="block"
|
32
|
+
maxWidth="100%"
|
33
|
+
url="https://unsplash.it/500/400/?image=634"
|
34
|
+
/>
|
35
|
+
</Overlay>
|
36
|
+
</Flex>
|
37
|
+
)
|
38
|
+
|
39
|
+
export default OverlayGradientOpacity
|
@@ -0,0 +1 @@
|
|
1
|
+
By default, the overlay is rendered as a gradient. Setting the `gradient` prop to `false` renders the overlay as a solid color. You can adjust the transparency of the solid overlay by using the `opacity` prop.
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
|
3
|
+
import Overlay from '../../pb_overlay/_overlay'
|
4
|
+
import Table from '../../pb_table/_table'
|
5
|
+
|
6
|
+
|
7
|
+
const TableExample = () => {
|
8
|
+
return (
|
9
|
+
<Table size="sm">
|
10
|
+
<thead>
|
11
|
+
<tr>
|
12
|
+
<th>{'Column 1'}</th>
|
13
|
+
<th>{'Column 2'}</th>
|
14
|
+
<th>{'Column 3'}</th>
|
15
|
+
<th>{'Column 4'}</th>
|
16
|
+
<th>{'Column 5'}</th>
|
17
|
+
</tr>
|
18
|
+
</thead>
|
19
|
+
<tbody>
|
20
|
+
{Array.from({ length: 7 }, (_, index) => (
|
21
|
+
<tr key={index}>
|
22
|
+
{Array.from({ length: 5 }, (_, columnIndex) => (
|
23
|
+
<td key={columnIndex}>{`Value ${columnIndex + 1}`}</td>
|
24
|
+
))}
|
25
|
+
</tr>
|
26
|
+
))}
|
27
|
+
</tbody>
|
28
|
+
</Table>
|
29
|
+
)
|
30
|
+
}
|
31
|
+
|
32
|
+
const OverlayLayout = () => (
|
33
|
+
<>
|
34
|
+
<Overlay layout={{ y: "xl" }}>
|
35
|
+
<TableExample />
|
36
|
+
</Overlay>
|
37
|
+
</>
|
38
|
+
)
|
39
|
+
|
40
|
+
export default OverlayLayout
|
@@ -0,0 +1,5 @@
|
|
1
|
+
The optional `layout` prop accepts the `position` and `size` of the overlay as a key:value pair.
|
2
|
+
|
3
|
+
The `position` key accepts `bottom` (default), `top`, `y` (for both top and bottom) `right`, `left`, or `x` (for both left and right), which sets the side(s) where the `color` overlay starts. The direction of the overlay is always toward the opposite side of the position. For example, the default position of `bottom` starts the overlay on the bottom edge of your container and extends it toward the opposite side: the top.
|
4
|
+
|
5
|
+
The `size` value is `full` (100%) by default, but accepts our [spacing tokens](https://playbook.powerapp.cloud/visual_guidelines/spacing) or a percentage value as a string, and literally translates to how much of the container is covered by the overlay(s).
|
@@ -1,6 +1,9 @@
|
|
1
1
|
examples:
|
2
2
|
react:
|
3
3
|
- overlay_default: Default
|
4
|
+
- overlay_gradient_opacity: Gradient & Opacity
|
5
|
+
- overlay_color: Color
|
6
|
+
- overlay_layout: Layout
|
4
7
|
- overlay_multi_directional: Multi-directional
|
5
8
|
- overlay_vertical_dynamic_multi_directional: Vertical Dynamic Multi-directional
|
6
9
|
- overlay_toggle: Toggle
|
@@ -1,4 +1,7 @@
|
|
1
1
|
export { default as OverlayDefault } from './_overlay_default.jsx'
|
2
|
+
export { default as OverlayGradientOpacity } from './_overlay_gradient_opacity.jsx'
|
3
|
+
export { default as OverlayColor } from './_overlay_color.jsx'
|
4
|
+
export { default as OverlayLayout } from './_overlay_layout.jsx'
|
2
5
|
export { default as OverlayMultiDirectional } from './_overlay_multi_directional.jsx'
|
3
6
|
export { default as OverlayToggle } from './_overlay_toggle.jsx'
|
4
7
|
export { default as OverlayVerticalDynamicMultiDirectional } from './_overlay_vertical_dynamic_multi_directional.jsx'
|
@@ -1 +1 @@
|
|
1
|
-
<%= pb_rails("rich_text_editor", props: {id: "
|
1
|
+
<%= pb_rails("rich_text_editor", props: {input_options: { id: 'hidden_input_id', name: "hidden_input_name" }, value: "Add your text here. You can format your text, add links, quotes, and bullets."}) %>
|
@@ -0,0 +1 @@
|
|
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.
|
@@ -0,0 +1,34 @@
|
|
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 %>
|
@@ -0,0 +1,50 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
|
3
|
+
import Table from '../../pb_table/_table'
|
4
|
+
|
5
|
+
const TableWithHeaderStyleBorderless = (props) => {
|
6
|
+
return (
|
7
|
+
<>
|
8
|
+
<Table
|
9
|
+
headerStyle="borderless"
|
10
|
+
size="sm"
|
11
|
+
{...props}
|
12
|
+
>
|
13
|
+
<thead>
|
14
|
+
<tr>
|
15
|
+
<th>{'Column 1'}</th>
|
16
|
+
<th>{'Column 2'}</th>
|
17
|
+
<th>{'Column 3'}</th>
|
18
|
+
<th>{'Column 4'}</th>
|
19
|
+
<th>{'Column 5'}</th>
|
20
|
+
</tr>
|
21
|
+
</thead>
|
22
|
+
<tbody>
|
23
|
+
<tr>
|
24
|
+
<td>{'Value 1'}</td>
|
25
|
+
<td>{'Value 2'}</td>
|
26
|
+
<td>{'Value 3'}</td>
|
27
|
+
<td>{'Value 4'}</td>
|
28
|
+
<td>{'Value 5'}</td>
|
29
|
+
</tr>
|
30
|
+
<tr>
|
31
|
+
<td>{'Value 1'}</td>
|
32
|
+
<td>{'Value 2'}</td>
|
33
|
+
<td>{'Value 3'}</td>
|
34
|
+
<td>{'Value 4'}</td>
|
35
|
+
<td>{'Value 5'}</td>
|
36
|
+
</tr>
|
37
|
+
<tr>
|
38
|
+
<td>{'Value 1'}</td>
|
39
|
+
<td>{'Value 2'}</td>
|
40
|
+
<td>{'Value 3'}</td>
|
41
|
+
<td>{'Value 4'}</td>
|
42
|
+
<td>{'Value 5'}</td>
|
43
|
+
</tr>
|
44
|
+
</tbody>
|
45
|
+
</Table>
|
46
|
+
</>
|
47
|
+
)
|
48
|
+
}
|
49
|
+
|
50
|
+
export default TableWithHeaderStyleBorderless
|
@@ -0,0 +1 @@
|
|
1
|
+
Customize your header by removing the header borders with the `header_style: "borderless"` prop.
|
@@ -0,0 +1 @@
|
|
1
|
+
Customize your header by removing the header borders with the `headerStyle="borderless"` prop.
|
@@ -0,0 +1,36 @@
|
|
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 %>
|
@@ -0,0 +1,59 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
|
3
|
+
import Background from '../../pb_background/_background'
|
4
|
+
import Card from '../../pb_card/_card'
|
5
|
+
import Table from '../../pb_table/_table'
|
6
|
+
|
7
|
+
const TableWithHeaderStyleFloating = (props) => {
|
8
|
+
return (
|
9
|
+
<>
|
10
|
+
<Card background="light"
|
11
|
+
{...props}
|
12
|
+
>
|
13
|
+
<Table
|
14
|
+
headerStyle="floating"
|
15
|
+
size="sm"
|
16
|
+
{...props}
|
17
|
+
>
|
18
|
+
<Table.Head>
|
19
|
+
<Background backgroundColor="light"
|
20
|
+
tag="tr"
|
21
|
+
{...props}
|
22
|
+
>
|
23
|
+
<Table.Header>{'Column 1'}</Table.Header>
|
24
|
+
<Table.Header>{'Column 2'}</Table.Header>
|
25
|
+
<Table.Header>{'Column 3'}</Table.Header>
|
26
|
+
<Table.Header>{'Column 4'}</Table.Header>
|
27
|
+
<Table.Header>{'Column 5'}</Table.Header>
|
28
|
+
</Background>
|
29
|
+
</Table.Head>
|
30
|
+
<Table.Body>
|
31
|
+
<Table.Row>
|
32
|
+
<Table.Cell>{'Value 1'}</Table.Cell>
|
33
|
+
<Table.Cell>{'Value 2'}</Table.Cell>
|
34
|
+
<Table.Cell>{'Value 3'}</Table.Cell>
|
35
|
+
<Table.Cell>{'Value 4'}</Table.Cell>
|
36
|
+
<Table.Cell>{'Value 5'}</Table.Cell>
|
37
|
+
</Table.Row>
|
38
|
+
<Table.Row>
|
39
|
+
<Table.Cell>{'Value 1'}</Table.Cell>
|
40
|
+
<Table.Cell>{'Value 2'}</Table.Cell>
|
41
|
+
<Table.Cell>{'Value 3'}</Table.Cell>
|
42
|
+
<Table.Cell>{'Value 4'}</Table.Cell>
|
43
|
+
<Table.Cell>{'Value 5'}</Table.Cell>
|
44
|
+
</Table.Row>
|
45
|
+
<Table.Row>
|
46
|
+
<Table.Cell>{'Value 1'}</Table.Cell>
|
47
|
+
<Table.Cell>{'Value 2'}</Table.Cell>
|
48
|
+
<Table.Cell>{'Value 3'}</Table.Cell>
|
49
|
+
<Table.Cell>{'Value 4'}</Table.Cell>
|
50
|
+
<Table.Cell>{'Value 5'}</Table.Cell>
|
51
|
+
</Table.Row>
|
52
|
+
</Table.Body>
|
53
|
+
</Table>
|
54
|
+
</Card>
|
55
|
+
</>
|
56
|
+
)
|
57
|
+
}
|
58
|
+
|
59
|
+
export default TableWithHeaderStyleFloating
|
@@ -0,0 +1 @@
|
|
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).
|
@@ -0,0 +1 @@
|
|
1
|
+
Further customize your header by using the [table with background kit](https://playbook.powerapp.cloud/kits/table/react#table-with-background-kit) logic to give your table header a custom background color. Use the `headerStyle="floating"` prop to visually nest the borderless table within a card or collapsible with a matching background color (the `backgroundColor` passed to Background kit should match the `background` or `backgroundColor` for the element in which it is nested).
|
@@ -37,6 +37,8 @@ examples:
|
|
37
37
|
- table_with_collapsible_with_nested_table_rails: Table with Collapsible with Nested Table
|
38
38
|
- table_with_clickable_rows: Table with Clickable Rows
|
39
39
|
- table_with_selectable_rows: Table with Selectable Rows
|
40
|
+
- table_with_header_style_borderless: Header Style Borderless
|
41
|
+
- table_with_header_style_floating: Header Style Floating
|
40
42
|
|
41
43
|
react:
|
42
44
|
- table_sm: Small
|
@@ -75,3 +77,5 @@ examples:
|
|
75
77
|
- table_with_collapsible_with_nested_table: Table with Collapsible with Nested Table
|
76
78
|
- table_with_clickable_rows: Table with Clickable Rows
|
77
79
|
- table_with_selectable_rows: Table with Selectable Rows
|
80
|
+
- table_with_header_style_borderless: Header Style Borderless
|
81
|
+
- table_with_header_style_floating: Header Style Floating
|
@@ -35,3 +35,5 @@ export { default as TableWithCollapsibleWithNestedRows } from './_table_with_col
|
|
35
35
|
export { default as TableWithCollapsibleWithCustomClick } from './_table_with_collapsible_with_custom_click.jsx'
|
36
36
|
export { default as TableWithSelectableRows } from './_table_with_selectable_rows.jsx'
|
37
37
|
export { default as TableWithClickableRows } from './_table_with_clickable_rows.jsx'
|
38
|
+
export { default as TableWithHeaderStyleBorderless } from './_table_with_header_style_borderless.jsx'
|
39
|
+
export { default as TableWithHeaderStyleFloating } from './_table_with_header_style_floating.jsx'
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<%
|
2
|
+
options = [
|
3
|
+
{ label: 'Orange', value: '#FFA500' },
|
4
|
+
{ label: 'Red', value: '#FF0000' },
|
5
|
+
{ label: 'Green', value: '#00FF00' },
|
6
|
+
{ label: 'Blue', value: '#0000FF' },
|
7
|
+
]
|
8
|
+
%>
|
9
|
+
|
10
|
+
<%= pb_rails("typeahead", props: {
|
11
|
+
id: "typeahead-disabled",
|
12
|
+
disabled: true,
|
13
|
+
placeholder: "All Colors",
|
14
|
+
options: options,
|
15
|
+
label: "Colors",
|
16
|
+
name: :foo,
|
17
|
+
is_multi: false
|
18
|
+
})
|
19
|
+
%>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
|
3
|
+
import Typeahead from '../_typeahead'
|
4
|
+
|
5
|
+
const options = [
|
6
|
+
{ label: 'Orange', value: '#FFA500' },
|
7
|
+
{ label: 'Red', value: '#FF0000' },
|
8
|
+
{ label: 'Green', value: '#00FF00' },
|
9
|
+
{ label: 'Blue', value: '#0000FF' },
|
10
|
+
]
|
11
|
+
|
12
|
+
const TypeaheadDisabled = (props) => {
|
13
|
+
return (
|
14
|
+
<Typeahead
|
15
|
+
disabled
|
16
|
+
label="Colors"
|
17
|
+
options={options}
|
18
|
+
{...props}
|
19
|
+
/>
|
20
|
+
)
|
21
|
+
}
|
22
|
+
|
23
|
+
export default TypeaheadDisabled
|