playbook_ui_docs 14.17.0.pre.alpha.play2065passphrasewithselect7295 → 14.17.0.pre.alpha.playcdntest7233
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_table_props.html.erb +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.jsx +2 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_rails.md +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_react.md +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_rails.md +2 -6
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_react.md +2 -6
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +2 -6
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +1 -4
- data/app/pb_kits/playbook/pb_copy_button/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_copy_button/docs/index.js +1 -2
- data/app/pb_kits/playbook/pb_form_group/docs/_form_group_select.html.erb +5 -15
- data/app/pb_kits/playbook/pb_form_group/docs/_form_group_select.jsx +6 -39
- data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.jsx +118 -322
- data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.md +1 -1
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_default.md +7 -1
- data/app/pb_kits/playbook/pb_overlay/docs/example.yml +0 -3
- data/app/pb_kits/playbook/pb_overlay/docs/index.js +0 -3
- data/dist/playbook-doc.js +1 -1
- metadata +2 -18
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns.jsx +0 -58
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns.md +0 -6
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns_and_header.jsx +0 -64
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns_and_header.md +0 -8
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header.jsx +0 -55
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header.md +0 -3
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header_rails.html.erb +0 -33
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header_rails.md +0 -3
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_hook.jsx +0 -54
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_hook.md +0 -3
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_color.jsx +0 -63
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_color.md +0 -3
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_gradient_opacity.jsx +0 -39
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_gradient_opacity.md +0 -1
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_layout.jsx +0 -40
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_layout.md +0 -5
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.17.0.pre.alpha.
|
4
|
+
version: 14.17.0.pre.alpha.playcdntest7233
|
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-04-
|
12
|
+
date: 2025-04-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: playbook_ui
|
@@ -93,14 +93,6 @@ files:
|
|
93
93
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort.md
|
94
94
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort_control.jsx
|
95
95
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort_control.md
|
96
|
-
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns.jsx
|
97
|
-
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns.md
|
98
|
-
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns_and_header.jsx
|
99
|
-
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns_and_header.md
|
100
|
-
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header.jsx
|
101
|
-
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header.md
|
102
|
-
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header_rails.html.erb
|
103
|
-
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header_rails.md
|
104
96
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_subrow_headers.jsx
|
105
97
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_subrow_headers.md
|
106
98
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx
|
@@ -459,8 +451,6 @@ files:
|
|
459
451
|
- app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.html.erb
|
460
452
|
- app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.jsx
|
461
453
|
- app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.md
|
462
|
-
- app/pb_kits/playbook/pb_copy_button/docs/_copy_button_hook.jsx
|
463
|
-
- app/pb_kits/playbook/pb_copy_button/docs/_copy_button_hook.md
|
464
454
|
- app/pb_kits/playbook/pb_copy_button/docs/example.yml
|
465
455
|
- app/pb_kits/playbook/pb_copy_button/docs/index.js
|
466
456
|
- app/pb_kits/playbook/pb_currency/docs/_currency_abbreviated.html.erb
|
@@ -1443,19 +1433,13 @@ files:
|
|
1443
1433
|
- app/pb_kits/playbook/pb_online_status/docs/_online_status_size.jsx
|
1444
1434
|
- app/pb_kits/playbook/pb_online_status/docs/example.yml
|
1445
1435
|
- app/pb_kits/playbook/pb_online_status/docs/index.js
|
1446
|
-
- app/pb_kits/playbook/pb_overlay/docs/_overlay_color.jsx
|
1447
|
-
- app/pb_kits/playbook/pb_overlay/docs/_overlay_color.md
|
1448
1436
|
- app/pb_kits/playbook/pb_overlay/docs/_overlay_default.html.erb
|
1449
1437
|
- app/pb_kits/playbook/pb_overlay/docs/_overlay_default.jsx
|
1450
1438
|
- app/pb_kits/playbook/pb_overlay/docs/_overlay_default.md
|
1451
|
-
- app/pb_kits/playbook/pb_overlay/docs/_overlay_gradient_opacity.jsx
|
1452
|
-
- app/pb_kits/playbook/pb_overlay/docs/_overlay_gradient_opacity.md
|
1453
1439
|
- app/pb_kits/playbook/pb_overlay/docs/_overlay_hide_scroll_bar.html.erb
|
1454
1440
|
- app/pb_kits/playbook/pb_overlay/docs/_overlay_hide_scroll_bar.jsx
|
1455
1441
|
- app/pb_kits/playbook/pb_overlay/docs/_overlay_hide_scroll_bar_rails.md
|
1456
1442
|
- app/pb_kits/playbook/pb_overlay/docs/_overlay_hide_scroll_bar_react.md
|
1457
|
-
- app/pb_kits/playbook/pb_overlay/docs/_overlay_layout.jsx
|
1458
|
-
- app/pb_kits/playbook/pb_overlay/docs/_overlay_layout.md
|
1459
1443
|
- app/pb_kits/playbook/pb_overlay/docs/_overlay_multi_directional.html.erb
|
1460
1444
|
- app/pb_kits/playbook/pb_overlay/docs/_overlay_multi_directional.jsx
|
1461
1445
|
- app/pb_kits/playbook/pb_overlay/docs/_overlay_multi_directional.md
|
@@ -1,58 +0,0 @@
|
|
1
|
-
import React from "react"
|
2
|
-
import AdvancedTable from '../../pb_advanced_table/_advanced_table'
|
3
|
-
import MOCK_DATA from "./advanced_table_mock_data.json"
|
4
|
-
|
5
|
-
const AdvancedTableStickyColumns = (props) => {
|
6
|
-
const columnDefinitions = [
|
7
|
-
{
|
8
|
-
accessor: "year",
|
9
|
-
label: "Year",
|
10
|
-
id: "year",
|
11
|
-
cellAccessors: ["quarter", "month", "day"],
|
12
|
-
},
|
13
|
-
{
|
14
|
-
accessor: "newEnrollments",
|
15
|
-
label: "New Enrollments",
|
16
|
-
id: "newEnrollments",
|
17
|
-
},
|
18
|
-
{
|
19
|
-
accessor: "scheduledMeetings",
|
20
|
-
label: "Scheduled Meetings",
|
21
|
-
id: "scheduledMeetings",
|
22
|
-
},
|
23
|
-
{
|
24
|
-
accessor: "attendanceRate",
|
25
|
-
label: "Attendance Rate",
|
26
|
-
id: "attendanceRate",
|
27
|
-
},
|
28
|
-
{
|
29
|
-
accessor: "completedClasses",
|
30
|
-
label: "Completed Classes",
|
31
|
-
id: "completedClasses",
|
32
|
-
},
|
33
|
-
{
|
34
|
-
accessor: "classCompletionRate",
|
35
|
-
label: "Class Completion Rate",
|
36
|
-
id: "classCompletionRate",
|
37
|
-
},
|
38
|
-
{
|
39
|
-
accessor: "graduatedStudents",
|
40
|
-
label: "Graduated Students",
|
41
|
-
id: "graduatedStudents",
|
42
|
-
},
|
43
|
-
]
|
44
|
-
|
45
|
-
return (
|
46
|
-
<div>
|
47
|
-
<AdvancedTable
|
48
|
-
columnDefinitions={columnDefinitions}
|
49
|
-
responsive="none"
|
50
|
-
stickyLeftColumn={["year"]}
|
51
|
-
tableData={MOCK_DATA}
|
52
|
-
{...props}
|
53
|
-
/>
|
54
|
-
</div>
|
55
|
-
)
|
56
|
-
}
|
57
|
-
|
58
|
-
export default AdvancedTableStickyColumns
|
@@ -1,6 +0,0 @@
|
|
1
|
-
To render sticky columns for the Advanced Table, you can use the `stickyLeftColumn` prop. This prop expects an array of the column ids you want to be sticky.
|
2
|
-
|
3
|
-
To achieve this:
|
4
|
-
- Make sure to provide an id for each column via columnDefinitions as shown below. Id can be any string.
|
5
|
-
- One or multiple columns can be made sticky, it is recommended to set the ids within `stickyLeftColumn` in the order in which the columns are rendered.
|
6
|
-
- It is recommended to set `responsive` to none when using `stickyLeftColumn` since responsive just makes the first column sticky and the slightly different styling for `responsive` and `stickyLeftColumn` may override each other in unexpected ways.
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns_and_header.jsx
DELETED
@@ -1,64 +0,0 @@
|
|
1
|
-
import React from "react"
|
2
|
-
import AdvancedTable from '../../pb_advanced_table/_advanced_table'
|
3
|
-
import MOCK_DATA from "./advanced_table_mock_data.json"
|
4
|
-
|
5
|
-
const AdvancedTableStickyColumnsAndHeader = (props) => {
|
6
|
-
const columnDefinitions = [
|
7
|
-
{
|
8
|
-
accessor: "year",
|
9
|
-
label: "Year",
|
10
|
-
id: "year",
|
11
|
-
cellAccessors: ["quarter", "month", "day"],
|
12
|
-
},
|
13
|
-
{
|
14
|
-
accessor: "newEnrollments",
|
15
|
-
label: "New Enrollments",
|
16
|
-
id: "newEnrollments",
|
17
|
-
},
|
18
|
-
{
|
19
|
-
accessor: "scheduledMeetings",
|
20
|
-
label: "Scheduled Meetings",
|
21
|
-
id: "scheduledMeetings",
|
22
|
-
},
|
23
|
-
{
|
24
|
-
accessor: "attendanceRate",
|
25
|
-
label: "Attendance Rate",
|
26
|
-
id: "attendanceRate",
|
27
|
-
},
|
28
|
-
{
|
29
|
-
accessor: "completedClasses",
|
30
|
-
label: "Completed Classes",
|
31
|
-
id: "completedClasses",
|
32
|
-
},
|
33
|
-
{
|
34
|
-
accessor: "classCompletionRate",
|
35
|
-
label: "Class Completion Rate",
|
36
|
-
id: "classCompletionRate",
|
37
|
-
},
|
38
|
-
{
|
39
|
-
accessor: "graduatedStudents",
|
40
|
-
label: "Graduated Students",
|
41
|
-
id: "graduatedStudents",
|
42
|
-
},
|
43
|
-
]
|
44
|
-
|
45
|
-
const tableProps = {
|
46
|
-
sticky: true
|
47
|
-
}
|
48
|
-
|
49
|
-
return (
|
50
|
-
<div>
|
51
|
-
<AdvancedTable
|
52
|
-
columnDefinitions={columnDefinitions}
|
53
|
-
maxHeight="xs"
|
54
|
-
responsive="none"
|
55
|
-
stickyLeftColumn={["year"]}
|
56
|
-
tableData={MOCK_DATA}
|
57
|
-
tableProps={tableProps}
|
58
|
-
{...props}
|
59
|
-
/>
|
60
|
-
</div>
|
61
|
-
)
|
62
|
-
}
|
63
|
-
|
64
|
-
export default AdvancedTableStickyColumnsAndHeader
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns_and_header.md
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
To achieve a sticky header AND sticky columns together, in addition to the `stickyLeftColumn` logic outlined above, you can:
|
2
|
-
|
3
|
-
- Set `sticky: true` via `tableProps`
|
4
|
-
- Give the AdvancedTable a `maxHeight` using our [Max Height](https://playbook.powerapp.cloud/visual_guidelines/max_height) global prop.
|
5
|
-
|
6
|
-
**NOTE**: This behavior requires a `maxHeight` to work. The header is sticky within the table container, allowing for it to work along with the column stickiness.
|
7
|
-
|
8
|
-
Expand the table above to see this in action.
|
@@ -1,55 +0,0 @@
|
|
1
|
-
import React from "react"
|
2
|
-
import AdvancedTable from '../../pb_advanced_table/_advanced_table'
|
3
|
-
import MOCK_DATA from "./advanced_table_mock_data.json"
|
4
|
-
|
5
|
-
const AdvancedTableStickyHeader = (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
|
-
responsive="none"
|
47
|
-
tableData={MOCK_DATA}
|
48
|
-
tableProps={tableProps}
|
49
|
-
{...props}
|
50
|
-
/>
|
51
|
-
</div>
|
52
|
-
)
|
53
|
-
}
|
54
|
-
|
55
|
-
export default AdvancedTableStickyHeader
|
@@ -1,3 +0,0 @@
|
|
1
|
-
The `TableProps` prop can also be used to render a sticky header for the Advanced Table.
|
2
|
-
|
3
|
-
This doc example showcases how to set a sticky header for a nonresponsive table (see the `responsive` prop set to "none"). To achieve sticky header AND responsive functionality, see the "Sticky Header for Responsive Table" doc example below.
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header_rails.html.erb
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
<% column_definitions = [
|
2
|
-
{
|
3
|
-
accessor: "year",
|
4
|
-
label: "Year",
|
5
|
-
cellAccessors: ["quarter", "month", "day"],
|
6
|
-
},
|
7
|
-
{
|
8
|
-
accessor: "newEnrollments",
|
9
|
-
label: "New Enrollments",
|
10
|
-
},
|
11
|
-
{
|
12
|
-
accessor: "scheduledMeetings",
|
13
|
-
label: "Scheduled Meetings",
|
14
|
-
},
|
15
|
-
{
|
16
|
-
accessor: "attendanceRate",
|
17
|
-
label: "Attendance Rate",
|
18
|
-
},
|
19
|
-
{
|
20
|
-
accessor: "completedClasses",
|
21
|
-
label: "Completed Classes",
|
22
|
-
},
|
23
|
-
{
|
24
|
-
accessor: "classCompletionRate",
|
25
|
-
label: "Class Completion Rate",
|
26
|
-
},
|
27
|
-
{
|
28
|
-
accessor: "graduatedStudents",
|
29
|
-
label: "Graduated Students",
|
30
|
-
}
|
31
|
-
] %>
|
32
|
-
|
33
|
-
<%= pb_rails("advanced_table", props: { id: "sticky_header_table", table_data: @table_data, column_definitions: column_definitions, responsive: "none", table_props: { sticky: true }}) %>
|
@@ -1,3 +0,0 @@
|
|
1
|
-
The `table_props` prop can also be used to render a sticky header for the Advanced Table.
|
2
|
-
|
3
|
-
This doc example showcases how to set a sticky header for a nonresponsive table (see the `responsive` prop set to "none"). To achieve sticky header AND responsive functionality, see the "[Sticky Header for Responsive Table](https://playbook.powerapp.cloud/kits/advanced_table/react#sticky-header-for-responsive-table)" doc example below.
|
@@ -1,54 +0,0 @@
|
|
1
|
-
import React, { useEffect, useState } from 'react'
|
2
|
-
import usePBCopy from '../../pb_copy_button/usePBCopy'
|
3
|
-
import Body from '../../pb_body/_body'
|
4
|
-
import Textarea from '../../pb_textarea/_textarea'
|
5
|
-
import Tooltip from '../../pb_tooltip/_tooltip'
|
6
|
-
|
7
|
-
const CopyButtonHook = ({...props}) => {
|
8
|
-
// This is how you can use the copy button hook to copy text to the clipboard
|
9
|
-
// eslint-disable-next-line no-unused-vars
|
10
|
-
const [copied, copyToClipboard] = usePBCopy({ from: 'hookbody' })
|
11
|
-
// I added a tooltip so it looks better in the ui
|
12
|
-
const [showTooltip, setShowTooltip] = useState(false)
|
13
|
-
|
14
|
-
const handleCopy = () => {
|
15
|
-
copyToClipboard()
|
16
|
-
setShowTooltip(true)
|
17
|
-
setTimeout(() => setShowTooltip(false), 1500)
|
18
|
-
}
|
19
|
-
|
20
|
-
useEffect(() => {
|
21
|
-
const el = document.getElementById('hookbody')
|
22
|
-
if (!el) return
|
23
|
-
|
24
|
-
el.addEventListener('click', handleCopy)
|
25
|
-
return () => {
|
26
|
-
el.removeEventListener('click', handleCopy)
|
27
|
-
}
|
28
|
-
}, [copyToClipboard])
|
29
|
-
|
30
|
-
return (
|
31
|
-
<div>
|
32
|
-
<Tooltip
|
33
|
-
delay={{ close: 1000 }}
|
34
|
-
forceOpenTooltip={showTooltip}
|
35
|
-
placement="top"
|
36
|
-
showTooltip={false}
|
37
|
-
text="Copied!"
|
38
|
-
>
|
39
|
-
<Body
|
40
|
-
cursor="pointer"
|
41
|
-
id="hookbody"
|
42
|
-
text="I'm a custom copy hook! Click this body to copy this text!"
|
43
|
-
/>
|
44
|
-
</Tooltip>
|
45
|
-
|
46
|
-
<Textarea
|
47
|
-
{...props}
|
48
|
-
placeholder="Paste here"
|
49
|
-
/>
|
50
|
-
</div>
|
51
|
-
)
|
52
|
-
}
|
53
|
-
|
54
|
-
export default CopyButtonHook
|
@@ -1,3 +0,0 @@
|
|
1
|
-
We provide a `usePBCopy` hook that you can import to your project. This hook will return a function that you can call to copy the text to the clipboard.
|
2
|
-
|
3
|
-
`usePBCopy({ from: 'your_id' })` will grab the `innerText` from `your_id` element, or `value` if it is an input element.
|
@@ -1,63 +0,0 @@
|
|
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
|
@@ -1,3 +0,0 @@
|
|
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,39 +0,0 @@
|
|
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
|
@@ -1 +0,0 @@
|
|
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.
|
@@ -1,40 +0,0 @@
|
|
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
|
@@ -1,5 +0,0 @@
|
|
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).
|