playbook_ui_docs 13.19.0.pre.alpha.play1141iconkitusinglibrary2264 → 13.19.0.pre.alpha.play1174fixconfimationtoastmobilebug2305
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_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb +32 -1
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.jsx +38 -4
- data/app/pb_kits/playbook/pb_table/docs/_table_div.html.erb +34 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_div.jsx +47 -0
- data/app/pb_kits/playbook/pb_table/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_table/docs/index.js +1 -0
- data/dist/playbook-doc.js +2 -2
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a2cb8ae9eee907fd4eccb8287903a2602711f15004f09cde0bc868d28644c04e
|
4
|
+
data.tar.gz: a1da2d366768b65dfb07fd6c09f936fd8b3a7c3741300815bec884dceb656c8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 600de23bc1de284e9cf69f654489a4b249095f9613c69fd79b08cbab3e7582c1a519c51c478b8bf94dfdd53d3f140dd6e1673083ca49e1c4994c916c9d7cc026
|
7
|
+
data.tar.gz: e8e5dfe63ee2131a9521a52534ea6e3840b1e8eeb1ad25cb797df17155a56cd1990969d9e91e98910fe8e3a2328653cecf9e1aa3a039ab8d8d50c36ee5df5c6b
|
@@ -1,5 +1,36 @@
|
|
1
|
+
<%= pb_rails("button", props: { text: "Multiline Example", variant: "primary", data: { toast: "#toast-top-center-multi" } }) %>
|
2
|
+
|
1
3
|
<%= pb_rails("fixed_confirmation_toast", props: {
|
4
|
+
classname: "toast-to-hide",
|
5
|
+
closeable: true,
|
6
|
+
id: "toast-top-center-multi",
|
2
7
|
multi_line: true,
|
3
|
-
text: "
|
8
|
+
text: "Multi-line is used when the given text will not fit on one line. Using Multi Line allows the height of the confirmation toast to grow. Simply resize the screen to see the fixed confirmation toast wrap the text.",
|
4
9
|
status: "tip",
|
10
|
+
vertical: "top",
|
11
|
+
horizontal: "center"
|
5
12
|
}) %>
|
13
|
+
|
14
|
+
<script type="text/javascript">
|
15
|
+
const alltoasts = document.queryselectorall(".toast-to-hide")
|
16
|
+
const allbuttons = document.queryselectorall("button[data-toast]")
|
17
|
+
|
18
|
+
const hidealltoasts = () => {
|
19
|
+
alltoasts.foreach((toast) => {
|
20
|
+
toast.style.display = "none"
|
21
|
+
})
|
22
|
+
}
|
23
|
+
|
24
|
+
hidealltoasts()
|
25
|
+
|
26
|
+
allbuttons.foreach((button) => {
|
27
|
+
button.onclick = () => {
|
28
|
+
hidealltoasts()
|
29
|
+
let toast = document.queryselector(button.getattribute("data-toast"))
|
30
|
+
|
31
|
+
if (toast) {
|
32
|
+
toast.style.display = "flex"
|
33
|
+
}
|
34
|
+
}
|
35
|
+
})
|
36
|
+
</script>
|
data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.jsx
CHANGED
@@ -1,18 +1,52 @@
|
|
1
|
-
import React from 'react'
|
2
1
|
|
2
|
+
import React, { useState } from 'react'
|
3
|
+
|
4
|
+
import Button from '../../pb_button/_button'
|
3
5
|
import FixedConfirmationToast from '../_fixed_confirmation_toast'
|
4
6
|
|
5
|
-
const
|
7
|
+
const FixedConfirmationToastPositions = (props) => {
|
8
|
+
const [state, setState] = useState({
|
9
|
+
open: false,
|
10
|
+
vertical: 'top',
|
11
|
+
horizontal: 'center',
|
12
|
+
})
|
13
|
+
|
14
|
+
const { vertical, horizontal, open } = state
|
15
|
+
|
16
|
+
const handleClick = (newState) => () => {
|
17
|
+
setState({ open: true, ...newState })
|
18
|
+
}
|
19
|
+
|
20
|
+
const handleClose = () => {
|
21
|
+
setState({ ...state, open: false })
|
22
|
+
}
|
23
|
+
|
6
24
|
return (
|
7
25
|
<div>
|
26
|
+
<Button
|
27
|
+
onClick={handleClick({
|
28
|
+
horizontal: 'center',
|
29
|
+
open: true,
|
30
|
+
vertical: 'top',
|
31
|
+
})}
|
32
|
+
text="Multiline Example"
|
33
|
+
variant="primary"
|
34
|
+
{...props}
|
35
|
+
/>
|
36
|
+
{' '}
|
8
37
|
<FixedConfirmationToast
|
38
|
+
closeable
|
39
|
+
horizontal={horizontal}
|
9
40
|
multiLine
|
41
|
+
onClose={handleClose}
|
42
|
+
open={open}
|
10
43
|
status="tip"
|
11
|
-
text=
|
44
|
+
text={`Multi-line is used when the given text will not fit on one line. Using Multi Line allows the height of the confirmation toast to grow. Simply resize the screen to see the fixed confirmation toast wrap the text.`}
|
45
|
+
vertical={vertical}
|
12
46
|
{...props}
|
13
47
|
/>
|
14
48
|
</div>
|
15
49
|
)
|
16
50
|
}
|
17
51
|
|
18
|
-
export default
|
52
|
+
export default FixedConfirmationToastPositions
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<%= pb_rails("table", props: { size: "sm", tag: "div" }) do %>
|
2
|
+
<div class="pb_table_thead">
|
3
|
+
<div class="pb_table_tr">
|
4
|
+
<div class="pb_table_th">Column 1</div>
|
5
|
+
<div class="pb_table_th">Column 2</div>
|
6
|
+
<div class="pb_table_th">Column 3</div>
|
7
|
+
<div class="pb_table_th">Column 4</div>
|
8
|
+
<div class="pb_table_th">Column 5</div>
|
9
|
+
</div>
|
10
|
+
</div>
|
11
|
+
<div class="pb_table_tbody">
|
12
|
+
<div class="pb_table_tr">
|
13
|
+
<div class="pb_table_td">Value 1</div>
|
14
|
+
<div class="pb_table_td">Value 2</div>
|
15
|
+
<div class="pb_table_td">Value 3</div>
|
16
|
+
<div class="pb_table_td">Value 4</div>
|
17
|
+
<div class="pb_table_td">Value 5</div>
|
18
|
+
</div>
|
19
|
+
<div class="pb_table_tr">
|
20
|
+
<div class="pb_table_td">Value 1</div>
|
21
|
+
<div class="pb_table_td">Value 2</div>
|
22
|
+
<div class="pb_table_td">Value 3</div>
|
23
|
+
<div class="pb_table_td">Value 4</div>
|
24
|
+
<div class="pb_table_td">Value 5</div>
|
25
|
+
</div>
|
26
|
+
<div class="pb_table_tr">
|
27
|
+
<div class="pb_table_td">Value 1</div>
|
28
|
+
<div class="pb_table_td">Value 2</div>
|
29
|
+
<div class="pb_table_td">Value 3</div>
|
30
|
+
<div class="pb_table_td">Value 4</div>
|
31
|
+
<div class="pb_table_td">Value 5</div>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
<% end %>
|
@@ -0,0 +1,47 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import Table from '../_table'
|
3
|
+
|
4
|
+
const TableDiv = (props) => {
|
5
|
+
return (
|
6
|
+
<Table
|
7
|
+
size="sm"
|
8
|
+
tag="div"
|
9
|
+
{...props}
|
10
|
+
>
|
11
|
+
<div className="pb_table_thead">
|
12
|
+
<div className="pb_table_tr">
|
13
|
+
<div className="pb_table_th">{'Column 1'}</div>
|
14
|
+
<div className="pb_table_th">{'Column 2'}</div>
|
15
|
+
<div className="pb_table_th">{'Column 3'}</div>
|
16
|
+
<div className="pb_table_th">{'Column 4'}</div>
|
17
|
+
<div className="pb_table_th">{'Column 5'}</div>
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
<div className="pb_table_tbody">
|
21
|
+
<div className="pb_table_tr">
|
22
|
+
<div className="pb_table_td">{'Value 1'}</div>
|
23
|
+
<div className="pb_table_td">{'Value 2'}</div>
|
24
|
+
<div className="pb_table_td">{'Value 3'}</div>
|
25
|
+
<div className="pb_table_td">{'Value 4'}</div>
|
26
|
+
<div className="pb_table_td">{'Value 5'}</div>
|
27
|
+
</div>
|
28
|
+
<div className="pb_table_tr">
|
29
|
+
<div className="pb_table_td">{'Value 1'}</div>
|
30
|
+
<div className="pb_table_td">{'Value 2'}</div>
|
31
|
+
<div className="pb_table_td">{'Value 3'}</div>
|
32
|
+
<div className="pb_table_td">{'Value 4'}</div>
|
33
|
+
<div className="pb_table_td">{'Value 5'}</div>
|
34
|
+
</div>
|
35
|
+
<div className="pb_table_tr">
|
36
|
+
<div className="pb_table_td">{'Value 1'}</div>
|
37
|
+
<div className="pb_table_td">{'Value 2'}</div>
|
38
|
+
<div className="pb_table_td">{'Value 3'}</div>
|
39
|
+
<div className="pb_table_td">{'Value 4'}</div>
|
40
|
+
<div className="pb_table_td">{'Value 5'}</div>
|
41
|
+
</div>
|
42
|
+
</div>
|
43
|
+
</Table>
|
44
|
+
)
|
45
|
+
}
|
46
|
+
|
47
|
+
export default TableDiv
|
@@ -1,5 +1,6 @@
|
|
1
1
|
examples:
|
2
2
|
rails:
|
3
|
+
# - table_div: Div
|
3
4
|
- table_sm: Small
|
4
5
|
- table_md: Medium
|
5
6
|
- table_lg: Large
|
@@ -26,6 +27,7 @@ examples:
|
|
26
27
|
- table_striped: Striped Table
|
27
28
|
|
28
29
|
react:
|
30
|
+
# - table_div: Div
|
29
31
|
- table_sm: Small
|
30
32
|
- table_md: Medium
|
31
33
|
- table_lg: Large
|
@@ -21,3 +21,4 @@ export { default as TableAlignmentShiftData } from './_table_alignment_shift_dat
|
|
21
21
|
export { default as TableWithBackgroundKit } from './_table_with_background_kit.jsx'
|
22
22
|
export { default as TableVerticalBorder } from './_table_vertical_border.jsx'
|
23
23
|
export { default as TableStriped } from './_table_striped.jsx'
|
24
|
+
export { default as TableDiv } from './_table_div.jsx'
|