playbook_ui 15.5.0.pre.rc.2 → 15.5.0.pre.rc.3
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_copy_button/_copy_button.tsx +21 -8
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_icon_variant.jsx +24 -0
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_icon_variant_react.md +1 -0
- data/app/pb_kits/playbook/pb_copy_button/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_copy_button/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_progress_step/_progress_step.scss +384 -262
- data/app/pb_kits/playbook/pb_progress_step/docs/_description.md +1 -5
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_color.html.erb +14 -0
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_color.jsx +29 -0
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_color.md +3 -0
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_custom_icon.jsx +31 -0
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_custom_icon.md +1 -0
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_default.html.erb +4 -1
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_default.jsx +14 -3
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_default.md +3 -0
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tracker.md +3 -0
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_vertical.html.erb +1 -7
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_vertical.md +1 -0
- data/app/pb_kits/playbook/pb_progress_step/docs/example.yml +3 -0
- data/app/pb_kits/playbook/pb_progress_step/docs/index.js +2 -0
- data/app/pb_kits/playbook/pb_progress_step/progress_step.test.js +41 -0
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +4 -0
- data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.tsx +1 -0
- data/app/pb_kits/playbook/utilities/_truncate.scss +2 -0
- data/dist/chunks/{_line_graph-BuucBJlH.js → _line_graph-Co6PvNPL.js} +1 -1
- data/dist/chunks/{_typeahead-VFd5WMRg.js → _typeahead-D0OX5RuZ.js} +1 -1
- data/dist/chunks/{_weekday_stacked-B4_b9xef.js → _weekday_stacked-HzVLtvcd.js} +2 -2
- data/dist/chunks/vendor.js +1 -1
- data/dist/playbook-doc.js +1 -1
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/version.rb +1 -1
- metadata +15 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 66aaf83aa51cc7b34eda01ce9d1f8fbb8f2ec256a8fdc3b08d1172e50a8f33ee
|
|
4
|
+
data.tar.gz: d4fdcd781745a389240cfe5ca5e7ecad0467ecf25805c13ccfa9dfc7b88c5a88
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 45f0cb1b2ee375e8614fb7fd010e4393ddfd61edd905c55bd5c96b5d6aef34a7a4636be20249cec17418430410193fbe2ee81966fc71fdf09b5edc985863a601
|
|
7
|
+
data.tar.gz: 366a44951a860c7e3dee437c2e07a94b94bc7098837e19f9b665e7939fd053067fd443e0abd382c8d61477460dac259c574dad30419fbeb431616322d3632f78
|
|
@@ -5,6 +5,7 @@ import { globalProps } from '../utilities/globalProps'
|
|
|
5
5
|
|
|
6
6
|
import Button from '../pb_button/_button'
|
|
7
7
|
import Tooltip from '../pb_tooltip/_tooltip'
|
|
8
|
+
import CircleIconButton from '../pb_circle_icon_button/_circle_icon_button'
|
|
8
9
|
|
|
9
10
|
import usePBCopy from './usePBCopy'
|
|
10
11
|
|
|
@@ -18,6 +19,7 @@ type CopyButtonProps = {
|
|
|
18
19
|
tooltipPlacement?: 'top' | 'right' | 'bottom' | 'left'
|
|
19
20
|
tooltipText?: string
|
|
20
21
|
value?: string
|
|
22
|
+
variant?: 'button' | 'icon'
|
|
21
23
|
timeout?: number
|
|
22
24
|
}
|
|
23
25
|
|
|
@@ -28,11 +30,12 @@ const CopyButton = (props: CopyButtonProps) => {
|
|
|
28
30
|
data = {},
|
|
29
31
|
from = '',
|
|
30
32
|
id,
|
|
31
|
-
text= 'Copy',
|
|
33
|
+
text = 'Copy',
|
|
32
34
|
timeout = 1000,
|
|
33
|
-
tooltipPlacement= 'bottom',
|
|
35
|
+
tooltipPlacement = 'bottom',
|
|
34
36
|
tooltipText = 'Copied!',
|
|
35
37
|
value = '',
|
|
38
|
+
variant = 'button',
|
|
36
39
|
} = props
|
|
37
40
|
|
|
38
41
|
const [copied, copy] = usePBCopy({ value, from, timeout })
|
|
@@ -42,7 +45,8 @@ const CopyButton = (props: CopyButtonProps) => {
|
|
|
42
45
|
const classes = classnames(buildCss('pb_copy_button_kit'), globalProps(props), className)
|
|
43
46
|
|
|
44
47
|
return (
|
|
45
|
-
<div
|
|
48
|
+
<div
|
|
49
|
+
{...ariaProps}
|
|
46
50
|
{...dataProps}
|
|
47
51
|
className={classes}
|
|
48
52
|
id={id}
|
|
@@ -53,11 +57,20 @@ const CopyButton = (props: CopyButtonProps) => {
|
|
|
53
57
|
showTooltip={false}
|
|
54
58
|
text={tooltipText}
|
|
55
59
|
>
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
60
|
+
{variant === 'icon' ? (
|
|
61
|
+
<CircleIconButton
|
|
62
|
+
icon="copy"
|
|
63
|
+
onClick={copy}
|
|
64
|
+
variant="link"
|
|
65
|
+
/>
|
|
66
|
+
) : (
|
|
67
|
+
<Button
|
|
68
|
+
icon="copy"
|
|
69
|
+
onClick={copy}
|
|
70
|
+
>
|
|
71
|
+
{text}
|
|
72
|
+
</Button>
|
|
73
|
+
)}
|
|
61
74
|
</Tooltip>
|
|
62
75
|
</div>
|
|
63
76
|
)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
|
|
3
|
+
import CopyButton from '../../pb_copy_button/_copy_button'
|
|
4
|
+
import Textarea from '../../pb_textarea/_textarea'
|
|
5
|
+
|
|
6
|
+
const CopyIconVariant = (props) => (
|
|
7
|
+
<div>
|
|
8
|
+
<CopyButton
|
|
9
|
+
{...props}
|
|
10
|
+
text="Copy Text"
|
|
11
|
+
tooltipPlacement="right"
|
|
12
|
+
tooltipText="Text copied!"
|
|
13
|
+
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."
|
|
14
|
+
variant="icon"
|
|
15
|
+
/>
|
|
16
|
+
|
|
17
|
+
<Textarea
|
|
18
|
+
{...props}
|
|
19
|
+
placeholder="Copy and paste here"
|
|
20
|
+
/>
|
|
21
|
+
</div>
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
export default CopyIconVariant
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Pass in `variant="icon"` to replace the Button with the Circle Icon Button kit.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { default as CopyButtonDefault } from './_copy_button_default.jsx'
|
|
2
2
|
export { default as CopyButtonFrom } from './_copy_button_from.jsx'
|
|
3
3
|
export { default as CopyButtonHook } from './_copy_button_hook.jsx'
|
|
4
|
+
export { default as CopyButtonIconVariant } from './_copy_button_icon_variant.jsx'
|