playbook_ui_docs 14.13.0.pre.alpha.play1834depupdatesass6024 → 14.13.0.pre.rc.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.jsx +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_react.md +1 -3
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +1 -2
- data/app/pb_kits/playbook/pb_avatar/docs/_avatar_badge_component_overlay.jsx +3 -9
- data/app/pb_kits/playbook/pb_avatar/docs/_avatar_circle_icon_component_overlay.jsx +2 -6
- data/app/pb_kits/playbook/pb_date/docs/_date_default.jsx +1 -2
- data/app/pb_kits/playbook/pb_date/docs/_date_unstyled.jsx +5 -13
- data/app/pb_kits/playbook/pb_draggable/docs/example.yml +5 -2
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_home_address_street/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_home_address_street/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_link/docs/example.yml +3 -5
- data/app/pb_kits/playbook/pb_link/docs/index.js +1 -2
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tooltip.html.erb +6 -6
- data/app/pb_kits/playbook/pb_table/docs/_table_with_background_kit.html.erb +9 -6
- data/app/pb_kits/playbook/pb_table/docs/_table_with_background_kit.jsx +9 -6
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_mask.html.erb +1 -1
- data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_default.html.erb +1 -1
- data/app/pb_kits/playbook/pb_user/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_user/docs/index.js +0 -1
- data/dist/playbook-doc.js +1 -1
- metadata +3 -27
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header.jsx +0 -55
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_react.md +0 -3
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.html.erb +0 -2
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.jsx +0 -21
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.html.erb +0 -5
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.jsx +0 -45
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.md +0 -1
- data/app/pb_kits/playbook/pb_copy_button/docs/example.yml +0 -8
- data/app/pb_kits/playbook/pb_copy_button/docs/index.js +0 -2
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers_rails.html.erb +0 -99
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers_rails.md +0 -1
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table.html.erb +0 -61
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table.md +0 -1
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close.html.erb +0 -58
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close_rails.md +0 -3
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting.html.erb +0 -11
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting.jsx +0 -22
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting_rails.md +0 -1
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting_react.md +0 -1
- data/app/pb_kits/playbook/pb_link/docs/_link_target.html.erb +0 -15
- data/app/pb_kits/playbook/pb_link/docs/_link_target.jsx +0 -29
- data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.html.erb +0 -42
- data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.jsx +0 -59
- data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.md +0 -2
- /data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/{_fixed_confirmation_toast_auto_close_react.md → _fixed_confirmation_toast_auto_close.md} +0 -0
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: playbook_ui_docs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 14.13.0.pre.
|
4
|
+
version: 14.13.0.pre.rc.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Power UX
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2025-
|
12
|
+
date: 2025-01-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: playbook_ui
|
@@ -91,8 +91,6 @@ files:
|
|
91
91
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.jsx
|
92
92
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_rails.md
|
93
93
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_react.md
|
94
|
-
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header.jsx
|
95
|
-
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_react.md
|
96
94
|
- app/pb_kits/playbook/pb_advanced_table/docs/_mock_data_inline_loading.js
|
97
95
|
- app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_mock_data.json
|
98
96
|
- app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_mock_data_no_subrows.json
|
@@ -438,13 +436,6 @@ files:
|
|
438
436
|
- app/pb_kits/playbook/pb_contact/docs/_description.md
|
439
437
|
- app/pb_kits/playbook/pb_contact/docs/example.yml
|
440
438
|
- app/pb_kits/playbook/pb_contact/docs/index.js
|
441
|
-
- app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.html.erb
|
442
|
-
- app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.jsx
|
443
|
-
- app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.html.erb
|
444
|
-
- app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.jsx
|
445
|
-
- app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.md
|
446
|
-
- app/pb_kits/playbook/pb_copy_button/docs/example.yml
|
447
|
-
- app/pb_kits/playbook/pb_copy_button/docs/index.js
|
448
439
|
- app/pb_kits/playbook/pb_currency/docs/_currency_abbreviated.html.erb
|
449
440
|
- app/pb_kits/playbook/pb_currency/docs/_currency_abbreviated.jsx
|
450
441
|
- app/pb_kits/playbook/pb_currency/docs/_currency_alignment.html.erb
|
@@ -700,8 +691,6 @@ files:
|
|
700
691
|
- app/pb_kits/playbook/pb_draggable/docs/_draggable_default_rails.md
|
701
692
|
- app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers.jsx
|
702
693
|
- app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers.md
|
703
|
-
- app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers_rails.html.erb
|
704
|
-
- app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers_rails.md
|
705
694
|
- app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards.jsx
|
706
695
|
- app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards.md
|
707
696
|
- app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards_rails.html.erb
|
@@ -714,8 +703,6 @@ files:
|
|
714
703
|
- app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list.md
|
715
704
|
- app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list_rails.html.erb
|
716
705
|
- app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list_rails.md
|
717
|
-
- app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table.html.erb
|
718
|
-
- app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table.md
|
719
706
|
- app/pb_kits/playbook/pb_draggable/docs/example.yml
|
720
707
|
- app/pb_kits/playbook/pb_draggable/docs/index.js
|
721
708
|
- app/pb_kits/playbook/pb_drawer/docs/_drawer_behavior.jsx
|
@@ -819,10 +806,8 @@ files:
|
|
819
806
|
- app/pb_kits/playbook/pb_filter/docs/example.yml
|
820
807
|
- app/pb_kits/playbook/pb_filter/docs/index.js
|
821
808
|
- app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_description.md
|
822
|
-
- app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close.html.erb
|
823
809
|
- app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close.jsx
|
824
|
-
- app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/
|
825
|
-
- app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close_react.md
|
810
|
+
- app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close.md
|
826
811
|
- app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_children.html.erb
|
827
812
|
- app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_children.jsx
|
828
813
|
- app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_children.md
|
@@ -982,10 +967,6 @@ files:
|
|
982
967
|
- app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis.jsx
|
983
968
|
- app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis.md
|
984
969
|
- app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis_swift.md
|
985
|
-
- app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting.html.erb
|
986
|
-
- app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting.jsx
|
987
|
-
- app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting_rails.md
|
988
|
-
- app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting_react.md
|
989
970
|
- app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_link.html.erb
|
990
971
|
- app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_link.jsx
|
991
972
|
- app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_link.md
|
@@ -1182,8 +1163,6 @@ files:
|
|
1182
1163
|
- app/pb_kits/playbook/pb_link/docs/_link_icon.jsx
|
1183
1164
|
- app/pb_kits/playbook/pb_link/docs/_link_tag.html.erb
|
1184
1165
|
- app/pb_kits/playbook/pb_link/docs/_link_tag.jsx
|
1185
|
-
- app/pb_kits/playbook/pb_link/docs/_link_target.html.erb
|
1186
|
-
- app/pb_kits/playbook/pb_link/docs/_link_target.jsx
|
1187
1166
|
- app/pb_kits/playbook/pb_link/docs/_link_underline.html.erb
|
1188
1167
|
- app/pb_kits/playbook/pb_link/docs/_link_underline.jsx
|
1189
1168
|
- app/pb_kits/playbook/pb_link/docs/example.yml
|
@@ -2124,9 +2103,6 @@ files:
|
|
2124
2103
|
- app/pb_kits/playbook/pb_user/docs/_user_default.html.erb
|
2125
2104
|
- app/pb_kits/playbook/pb_user/docs/_user_default.jsx
|
2126
2105
|
- app/pb_kits/playbook/pb_user/docs/_user_horizontal_swift.md
|
2127
|
-
- app/pb_kits/playbook/pb_user/docs/_user_light_weight.html.erb
|
2128
|
-
- app/pb_kits/playbook/pb_user/docs/_user_light_weight.jsx
|
2129
|
-
- app/pb_kits/playbook/pb_user/docs/_user_light_weight.md
|
2130
2106
|
- app/pb_kits/playbook/pb_user/docs/_user_presence_indicator_swift.md
|
2131
2107
|
- app/pb_kits/playbook/pb_user/docs/_user_props_table.md
|
2132
2108
|
- app/pb_kits/playbook/pb_user/docs/_user_size.html.erb
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header.jsx
DELETED
@@ -1,55 +0,0 @@
|
|
1
|
-
import React from "react"
|
2
|
-
import { AdvancedTable } from "playbook-ui"
|
3
|
-
import MOCK_DATA from "./advanced_table_mock_data.json"
|
4
|
-
|
5
|
-
const AdvancedTableTablePropsStickyHeader = (props) => {
|
6
|
-
const columnDefinitions = [
|
7
|
-
{
|
8
|
-
accessor: "year",
|
9
|
-
label: "Year",
|
10
|
-
cellAccessors: ["quarter", "month", "day"],
|
11
|
-
},
|
12
|
-
{
|
13
|
-
accessor: "newEnrollments",
|
14
|
-
label: "New Enrollments",
|
15
|
-
},
|
16
|
-
{
|
17
|
-
accessor: "scheduledMeetings",
|
18
|
-
label: "Scheduled Meetings",
|
19
|
-
},
|
20
|
-
{
|
21
|
-
accessor: "attendanceRate",
|
22
|
-
label: "Attendance Rate",
|
23
|
-
},
|
24
|
-
{
|
25
|
-
accessor: "completedClasses",
|
26
|
-
label: "Completed Classes",
|
27
|
-
},
|
28
|
-
{
|
29
|
-
accessor: "classCompletionRate",
|
30
|
-
label: "Class Completion Rate",
|
31
|
-
},
|
32
|
-
{
|
33
|
-
accessor: "graduatedStudents",
|
34
|
-
label: "Graduated Students",
|
35
|
-
},
|
36
|
-
]
|
37
|
-
|
38
|
-
const tableProps = {
|
39
|
-
sticky: true
|
40
|
-
}
|
41
|
-
|
42
|
-
return (
|
43
|
-
<div>
|
44
|
-
<AdvancedTable
|
45
|
-
columnDefinitions={columnDefinitions}
|
46
|
-
maxHeight="xs"
|
47
|
-
tableData={MOCK_DATA}
|
48
|
-
tableProps={tableProps}
|
49
|
-
{...props}
|
50
|
-
/>
|
51
|
-
</div>
|
52
|
-
)
|
53
|
-
}
|
54
|
-
|
55
|
-
export default AdvancedTableTablePropsStickyHeader
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_react.md
DELETED
@@ -1,3 +0,0 @@
|
|
1
|
-
Create a sticky header that works for responsive Advanced Tables by setting `sticky: true` via `tableProps` and giving the AdvancedTable a `maxHeight` using our [Max Height](https://playbook.powerapp.cloud/visual_guidelines/max_height) global prop. This behavior requires a `maxHeight` to work. The header is sticky within the table container, allowing for it to work along with the first column stickiness of a responsive table on smaller screen sizes.
|
2
|
-
|
3
|
-
A sticky header on a nonresponsive table is demonstrated in the ["Table Props"](https://playbook.powerapp.cloud/kits/advanced_table/react#table-props) doc example above.
|
@@ -1,2 +0,0 @@
|
|
1
|
-
<%= pb_rails("copy_button", props: { id: "default-copy-button", text: "Copy Text", value: "Playbook makes it easy to support bleeding edge, or legacy systems. Use Playbook’s 200+ components and end-to-end design language to create simple, intuitive and beautiful experiences with ease." } ) %>
|
2
|
-
<%= pb_rails("textarea", props: { margin_top: "xs", placeholder: "Copy and paste here" }) %>
|
@@ -1,21 +0,0 @@
|
|
1
|
-
import React from 'react'
|
2
|
-
import { CopyButton, Textarea } from 'playbook-ui'
|
3
|
-
|
4
|
-
const CopyButtonDefault = (props) => (
|
5
|
-
<div>
|
6
|
-
<CopyButton
|
7
|
-
{...props}
|
8
|
-
text="Copy Text"
|
9
|
-
tooltipPlacement="right"
|
10
|
-
tooltipText="Text copied!"
|
11
|
-
value="Playbook makes it easy to support bleeding edge, or legacy systems. Use Playbook’s 200+ components and end-to-end design language to create simple, intuitive and beautiful experiences with ease."
|
12
|
-
/>
|
13
|
-
|
14
|
-
<Textarea
|
15
|
-
{...props}
|
16
|
-
placeholder="Copy and paste here"
|
17
|
-
/>
|
18
|
-
</div>
|
19
|
-
)
|
20
|
-
|
21
|
-
export default CopyButtonDefault
|
@@ -1,5 +0,0 @@
|
|
1
|
-
<%= pb_rails("body", props: { id: "body", text: "Copy this body text!"}) %>
|
2
|
-
<%= pb_rails("copy_button", props: { text: "Copy Body text", from: "body", id: "copy-body-button" }) %>
|
3
|
-
<%= pb_rails("text_input", props: { margin_top: "xs", placeholder: "Copy and paste here" }) %>
|
4
|
-
<%= pb_rails("copy_button", props: { text: "Copy Text Input", from: "copy-input", id: "copy-input-button" }) %>
|
5
|
-
<%= pb_rails("text_input", props: { margin_top: "xs", id: "copy-input" , value: "Copy and paste here" }) %>
|
@@ -1,45 +0,0 @@
|
|
1
|
-
import React, { useState } from 'react'
|
2
|
-
import { CopyButton, Body, TextInput, Textarea } from 'playbook-ui'
|
3
|
-
|
4
|
-
const CopyButtonFrom = (props) => {
|
5
|
-
const [text, setText] = useState("Copy this text input text")
|
6
|
-
|
7
|
-
const handleChange = (event) => {
|
8
|
-
setText(event.target.value);
|
9
|
-
}
|
10
|
-
|
11
|
-
return (<div>
|
12
|
-
<Body id="body">Copy this body text!</Body>
|
13
|
-
<CopyButton
|
14
|
-
{...props}
|
15
|
-
from="body"
|
16
|
-
marginBottom="sm"
|
17
|
-
text="Copy Body text"
|
18
|
-
tooltipPlacement="right"
|
19
|
-
tooltipText="Body text copied!"
|
20
|
-
/>
|
21
|
-
|
22
|
-
<TextInput
|
23
|
-
{...props}
|
24
|
-
id="textinput"
|
25
|
-
onChange={handleChange}
|
26
|
-
value={text}
|
27
|
-
/>
|
28
|
-
<CopyButton
|
29
|
-
{...props}
|
30
|
-
from="textinput"
|
31
|
-
marginBottom="sm"
|
32
|
-
text="Copy Text Input"
|
33
|
-
tooltipPlacement="right"
|
34
|
-
tooltipText="Text input copied!"
|
35
|
-
/>
|
36
|
-
|
37
|
-
<Textarea
|
38
|
-
{...props}
|
39
|
-
placeholder="Copy and paste here"
|
40
|
-
/>
|
41
|
-
</div>
|
42
|
-
)
|
43
|
-
}
|
44
|
-
|
45
|
-
export default CopyButtonFrom
|
@@ -1 +0,0 @@
|
|
1
|
-
Provide an element's ID as the `from` parameter, and its text will be copied. If the element is an input, its `value` will be copied; otherwise, the `innerText` will be used. Additionally, if a `value` prop is provided, it will override the content from the `from` element and be copied instead.
|
@@ -1,99 +0,0 @@
|
|
1
|
-
<% containers = [
|
2
|
-
"To Do",
|
3
|
-
"In Progress",
|
4
|
-
"Done"
|
5
|
-
] %>
|
6
|
-
|
7
|
-
<% items_data = [
|
8
|
-
{
|
9
|
-
id: "11",
|
10
|
-
container: "To Do",
|
11
|
-
title: "Task 1",
|
12
|
-
description: "Bug fixes",
|
13
|
-
assignee_name: "Terry Miles",
|
14
|
-
assignee_img: "https://randomuser.me/api/portraits/men/44.jpg",
|
15
|
-
},
|
16
|
-
{
|
17
|
-
id: "12",
|
18
|
-
container: "To Do",
|
19
|
-
title: "Task 2",
|
20
|
-
description: "Documentation",
|
21
|
-
assignee_name: "Sophia Miles",
|
22
|
-
assignee_img: "https://randomuser.me/api/portraits/women/8.jpg",
|
23
|
-
},
|
24
|
-
{
|
25
|
-
id: "13",
|
26
|
-
container: "In Progress",
|
27
|
-
title: "Task 3",
|
28
|
-
description: "Add a variant",
|
29
|
-
assignee_name: "Alice Jones",
|
30
|
-
assignee_img: "https://randomuser.me/api/portraits/women/10.jpg",
|
31
|
-
},
|
32
|
-
{
|
33
|
-
id: "14",
|
34
|
-
container: "To Do",
|
35
|
-
title: "Task 4",
|
36
|
-
description: "Add jest tests",
|
37
|
-
assignee_name: "Mike James",
|
38
|
-
assignee_img: "https://randomuser.me/api/portraits/men/8.jpg",
|
39
|
-
},
|
40
|
-
{
|
41
|
-
id: "15",
|
42
|
-
container: "Done",
|
43
|
-
title: "Task 5",
|
44
|
-
description: "Alpha testing",
|
45
|
-
assignee_name: "James Guy",
|
46
|
-
assignee_img: "https://randomuser.me/api/portraits/men/18.jpg",
|
47
|
-
},
|
48
|
-
{
|
49
|
-
id: "16",
|
50
|
-
container: "In Progress",
|
51
|
-
title: "Task 6",
|
52
|
-
description: "Release",
|
53
|
-
assignee_name: "Sally Jones",
|
54
|
-
assignee_img: "https://randomuser.me/api/portraits/women/28.jpg",
|
55
|
-
},
|
56
|
-
] %>
|
57
|
-
|
58
|
-
<%= pb_rails("draggable", props: { initial_items: items_data }) do %>
|
59
|
-
<%= pb_rails("flex", props: { justify_content: "center" }) do %>
|
60
|
-
<% containers.each do |container| %>
|
61
|
-
<%= pb_rails("draggable/draggable_container", props: {
|
62
|
-
container: container,
|
63
|
-
width: "xs",
|
64
|
-
padding: "sm",
|
65
|
-
data: { container: container }
|
66
|
-
}) do %>
|
67
|
-
<%= pb_rails("caption", props: { text_align: "center" }) do %><%= container %><% end %>
|
68
|
-
<%= pb_rails("flex", props: {align_items: "stretch", orientation: "column"}) do %>
|
69
|
-
<% items_data.select { |item| item[:container] == container }.each do |item| %>
|
70
|
-
<%= pb_rails("draggable/draggable_item", props: {
|
71
|
-
container: container,
|
72
|
-
drag_id: item[:id]
|
73
|
-
}) do %>
|
74
|
-
<%= pb_rails("card", props: { margin_bottom: "sm", padding: "sm"}) do %>
|
75
|
-
<%= pb_rails("flex", props: { justify: "between" }) do %>
|
76
|
-
<%= pb_rails("flex/flex_item") do %>
|
77
|
-
<%= pb_rails("flex") do %>
|
78
|
-
<%= pb_rails("avatar", props: {
|
79
|
-
image_url: item[:assignee_img],
|
80
|
-
name: item[:assignee_name],
|
81
|
-
size: "xxs"
|
82
|
-
}) %>
|
83
|
-
<%= pb_rails("title", props: {
|
84
|
-
padding_left: "xs",
|
85
|
-
size: 4,
|
86
|
-
text: item[:title]
|
87
|
-
}) %>
|
88
|
-
<% end %>
|
89
|
-
<% end %>
|
90
|
-
<% end %>
|
91
|
-
<%= pb_rails("body", props: { padding_top: "xs", text: item[:description] }) %>
|
92
|
-
<% end %>
|
93
|
-
<% end %>
|
94
|
-
<% end %>
|
95
|
-
<% end %>
|
96
|
-
<% end %>
|
97
|
-
<% end %>
|
98
|
-
<% end %>
|
99
|
-
<% end %>
|
@@ -1 +0,0 @@
|
|
1
|
-
The Draggable kit can also be used to achieve more complex, multiple container functionality as shown here. This complex usage requires the full subcomponent structure.
|
@@ -1,61 +0,0 @@
|
|
1
|
-
<% initial_items = [
|
2
|
-
{
|
3
|
-
id: "1",
|
4
|
-
title: "Task 1",
|
5
|
-
assignee_name: "Terry Miles",
|
6
|
-
assignee_img: "https://randomuser.me/api/portraits/men/44.jpg",
|
7
|
-
},
|
8
|
-
{
|
9
|
-
id: "2",
|
10
|
-
title: "Task 2",
|
11
|
-
assignee_name: "Sophia Miles",
|
12
|
-
assignee_img: "https://randomuser.me/api/portraits/women/8.jpg",
|
13
|
-
},
|
14
|
-
{
|
15
|
-
id: "3",
|
16
|
-
title: "Task 3",
|
17
|
-
assignee_name: "Alice Jones",
|
18
|
-
assignee_img: "https://randomuser.me/api/portraits/women/10.jpg",
|
19
|
-
},
|
20
|
-
{
|
21
|
-
id: "4",
|
22
|
-
title: "Task 4",
|
23
|
-
assignee_name: "Mike James",
|
24
|
-
assignee_img: "https://randomuser.me/api/portraits/men/8.jpg",
|
25
|
-
},
|
26
|
-
{
|
27
|
-
id: "5",
|
28
|
-
title: "Task 5",
|
29
|
-
assignee_name: "James Guy",
|
30
|
-
assignee_img: "https://randomuser.me/api/portraits/men/18.jpg",
|
31
|
-
}
|
32
|
-
] %>
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
<%= pb_rails("draggable", props: {initial_items: initial_items}) do %>
|
37
|
-
<%= pb_rails("table", props: { size: "sm", responsive:"none" }) do %>
|
38
|
-
<%= pb_rails("table/table_head") do %>
|
39
|
-
<%= pb_rails("table/table_row") do %>
|
40
|
-
<%= pb_rails("table/table_header", props: { text: "id"}) %>
|
41
|
-
<%= pb_rails("table/table_header", props: { text: "name"}) %>
|
42
|
-
<%= pb_rails("table/table_header", props: { text: "task number"}) %>
|
43
|
-
<% end %>
|
44
|
-
<% end %>
|
45
|
-
|
46
|
-
<%= pb_rails("draggable/draggable_container", props: {tag:"tbody"}) do %>
|
47
|
-
<% initial_items.each do |item| %>
|
48
|
-
<%= pb_rails("draggable/draggable_item", props:{drag_id: item[:id], tag:"tr"}) do %>
|
49
|
-
<%= pb_rails("table/table_cell", props: { text: item[:id]}) %>
|
50
|
-
<%= pb_rails("table/table_cell") do %>
|
51
|
-
<%= pb_rails("flex", props:{align:"center"}) do %>
|
52
|
-
<%= pb_rails("avatar", props: {size: "xs", image_url: item[:assignee_img]}) %>
|
53
|
-
<%= pb_rails("body", props: {text: item[:assignee_name], padding_left:"sm"}) %>
|
54
|
-
<% end %>
|
55
|
-
<% end %>
|
56
|
-
<%= pb_rails("table/table_cell", props: { text: item[:title]}) %>
|
57
|
-
<% end %>
|
58
|
-
<% end %>
|
59
|
-
<% end %>
|
60
|
-
<% end %>
|
61
|
-
<% end %>
|
@@ -1 +0,0 @@
|
|
1
|
-
The draggable kit can also be used in conjunction with the table kit to create draggable table rows. To do this, make use of the `tag` prop on the draggable_container to set it to 'tbody' and the same prop on the draggable_item to set that to 'tr'. This will create the functionality seen here.
|
@@ -1,58 +0,0 @@
|
|
1
|
-
<%= pb_rails("button", props: { text: "Show Auto Close Toast", variant: "secondary", data: { toast: "#toast-auto-close" } }) %>
|
2
|
-
<%= pb_rails("button", props: { text: "Show Closeable Auto Close Toast", variant: "secondary", data: { toast: "#toast-auto-close-closeable" } }) %>
|
3
|
-
|
4
|
-
<%= pb_rails("fixed_confirmation_toast", props: {
|
5
|
-
auto_close: 3000,
|
6
|
-
classname: "toast-to-hide",
|
7
|
-
id: "toast-auto-close",
|
8
|
-
text: "I will disappear in 3 seconds.",
|
9
|
-
status: "tip",
|
10
|
-
vertical: "top",
|
11
|
-
horizontal: "center"
|
12
|
-
}) %>
|
13
|
-
|
14
|
-
<%= pb_rails("fixed_confirmation_toast", props: {
|
15
|
-
auto_close: 10000,
|
16
|
-
closeable: true,
|
17
|
-
id: "toast-auto-close-closeable",
|
18
|
-
text: "I will disappear in 10 seconds.",
|
19
|
-
status: "tip",
|
20
|
-
vertical: "top",
|
21
|
-
horizontal: "center"
|
22
|
-
}) %>
|
23
|
-
|
24
|
-
<script>
|
25
|
-
document.addEventListener('DOMContentLoaded', () => {
|
26
|
-
// Initialize toast elements and buttons
|
27
|
-
const toasts = {
|
28
|
-
'#toast-auto-close': document.querySelector("#toast-auto-close"),
|
29
|
-
'#toast-auto-close-closeable': document.querySelector("#toast-auto-close-closeable")
|
30
|
-
}
|
31
|
-
|
32
|
-
const buttons = {
|
33
|
-
'#toast-auto-close': document.querySelector("button[data-toast='#toast-auto-close']"),
|
34
|
-
'#toast-auto-close-closeable': document.querySelector("button[data-toast='#toast-auto-close-closeable']")
|
35
|
-
}
|
36
|
-
|
37
|
-
// Store original toasts and remove them from DOM
|
38
|
-
const originalToasts = {}
|
39
|
-
Object.entries(toasts).forEach(([id, toast]) => {
|
40
|
-
if (toast) {
|
41
|
-
originalToasts[id] = toast.cloneNode(true)
|
42
|
-
toast.remove()
|
43
|
-
}
|
44
|
-
})
|
45
|
-
|
46
|
-
// Set up button click handlers
|
47
|
-
Object.keys(buttons).forEach((toastId) => {
|
48
|
-
const button = buttons[toastId]
|
49
|
-
if (button) {
|
50
|
-
button.onclick = () => {
|
51
|
-
const newToast = originalToasts[toastId].cloneNode(true)
|
52
|
-
newToast.style.display = "flex"
|
53
|
-
document.body.appendChild(newToast)
|
54
|
-
}
|
55
|
-
}
|
56
|
-
})
|
57
|
-
})
|
58
|
-
</script>
|
@@ -1,3 +0,0 @@
|
|
1
|
-
Auto close is used when you want the confirmation toast to close automatically after a certain time. `auto_close` property will be a delay number in ms.
|
2
|
-
|
3
|
-
The script tag in this code snippet is for demonstration purposes only. It clones the toasts in order to have it appear with a button click prompt and not upon initial page load. In a typical production environment the event triggering a fixed confirmation toast to appear would be handled by a controller or a separate javascript file.
|
data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting.html.erb
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
<%= pb_rails("home_address_street", props: {
|
2
|
-
address: "70 pRoSpEcT ave",
|
3
|
-
address_cont: "Apt M18",
|
4
|
-
city: "West Chester",
|
5
|
-
home_id: 8250263,
|
6
|
-
home_url: "https://powerhrg.com/",
|
7
|
-
preserve_case: true,
|
8
|
-
state: "pa",
|
9
|
-
zipcode: "19382",
|
10
|
-
territory: "PHL",
|
11
|
-
}) %>
|
@@ -1,22 +0,0 @@
|
|
1
|
-
import React from 'react'
|
2
|
-
|
3
|
-
import HomeAddressStreet from '../_home_address_street'
|
4
|
-
|
5
|
-
const HomeAddressStreetFormatting = (props) => {
|
6
|
-
return (
|
7
|
-
<HomeAddressStreet
|
8
|
-
address="70 pRoSpEcT ave"
|
9
|
-
addressCont="Apt M18"
|
10
|
-
city="West Chester"
|
11
|
-
homeId="8250263"
|
12
|
-
homeUrl="https://powerhrg.com/"
|
13
|
-
preserveCase
|
14
|
-
state="pa"
|
15
|
-
territory="PHL"
|
16
|
-
zipcode="19382"
|
17
|
-
{...props}
|
18
|
-
/>
|
19
|
-
)
|
20
|
-
}
|
21
|
-
|
22
|
-
export default HomeAddressStreetFormatting
|
data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting_rails.md
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
The `state` prop will always capitalize the state name, even if the data entered is in lowercase. For example, when `state="pa"` is passed, it will be rendered as "PA". When you pass `preserve_case: true`, the street address will be rendered exactly as entered, without automatic title capitalization.
|
data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting_react.md
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
The `state` prop will always capitalize the state name, even if the data entered is in lowercase. For example, when `state="pa"` is passed, it will be rendered as "PA". When you pass `preserveCase`, the street address will be rendered exactly as entered, without automatic title capitalization.
|
@@ -1,15 +0,0 @@
|
|
1
|
-
<div>
|
2
|
-
<%= pb_rails("link", props: {
|
3
|
-
href: "http://google.com",
|
4
|
-
target: "blank",
|
5
|
-
text: "Open In New Window"
|
6
|
-
}) %>
|
7
|
-
</div>
|
8
|
-
|
9
|
-
<div>
|
10
|
-
<%= pb_rails("link", props: {
|
11
|
-
href: "https://playbook.powerapp.cloud/",
|
12
|
-
target: "child",
|
13
|
-
text: "Open In Child Tab",
|
14
|
-
}) %>
|
15
|
-
</div>
|
@@ -1,29 +0,0 @@
|
|
1
|
-
import React from 'react'
|
2
|
-
import { Link } from 'playbook-ui'
|
3
|
-
|
4
|
-
const LinkTarget = (props) => (
|
5
|
-
<div>
|
6
|
-
<div>
|
7
|
-
<Link
|
8
|
-
aria={{ label: 'Link to Google in new window' }}
|
9
|
-
href="https://google.com"
|
10
|
-
tabIndex={0}
|
11
|
-
target='blank'
|
12
|
-
text="Open In New Window"
|
13
|
-
{...props}
|
14
|
-
/>
|
15
|
-
</div>
|
16
|
-
<div>
|
17
|
-
<Link
|
18
|
-
aria={{ label: 'Link to Playbook in a child tab' }}
|
19
|
-
href="https://playbook.powerapp.cloud/"
|
20
|
-
tabIndex={0}
|
21
|
-
target='child'
|
22
|
-
text="Open In Child Tab"
|
23
|
-
{...props}
|
24
|
-
/>
|
25
|
-
</div>
|
26
|
-
</div>
|
27
|
-
)
|
28
|
-
|
29
|
-
export default LinkTarget
|
@@ -1,42 +0,0 @@
|
|
1
|
-
<div class="pb--doc-demo-row">
|
2
|
-
<div>
|
3
|
-
<%= pb_rails("user", props: {
|
4
|
-
name: "Anna Black",
|
5
|
-
title: "Remodeling Consultant",
|
6
|
-
orientation: "vertical",
|
7
|
-
align: "center",
|
8
|
-
size: "lg",
|
9
|
-
avatar_url: "https://randomuser.me/api/portraits/women/44.jpg",
|
10
|
-
bold: false
|
11
|
-
}) %>
|
12
|
-
</div>
|
13
|
-
<div>
|
14
|
-
<%= pb_rails("user", props: {
|
15
|
-
name: "Anna Black",
|
16
|
-
title: "Remodeling Consultant",
|
17
|
-
orientation: "horizontal",
|
18
|
-
align: "left",
|
19
|
-
avatar_url: "https://randomuser.me/api/portraits/women/44.jpg",
|
20
|
-
bold: false
|
21
|
-
}) %>
|
22
|
-
</div>
|
23
|
-
<div>
|
24
|
-
<%= pb_rails("user", props: {
|
25
|
-
name: "Anna Black",
|
26
|
-
orientation: "horizontal",
|
27
|
-
align: "left",
|
28
|
-
avatar_url: "https://randomuser.me/api/portraits/women/44.jpg",
|
29
|
-
bold: false
|
30
|
-
}) %>
|
31
|
-
|
32
|
-
<br>
|
33
|
-
|
34
|
-
<%= pb_rails("user", props: {
|
35
|
-
name: "Anna Black",
|
36
|
-
orientation: "horizontal",
|
37
|
-
align: "left",
|
38
|
-
avatar: true,
|
39
|
-
bold: false
|
40
|
-
}) %>
|
41
|
-
</div>
|
42
|
-
</div>
|