playbook_ui 12.20.0.pre.alpha.title2667 → 12.21.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_docs/kit_example.html.erb +37 -12
- data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.scss +57 -15
- data/app/pb_kits/playbook/pb_title/_title.scss +0 -1
- data/app/pb_kits/playbook/pb_title/docs/_title_light_weight.md +2 -2
- data/app/pb_kits/playbook/pb_user_badge/{_user_badge.jsx → _user_badge.tsx} +9 -10
- data/app/pb_kits/playbook/pb_user_badge/badges/million-dollar.tsx +358 -0
- data/app/pb_kits/playbook/pb_user_badge/badges/veteran.tsx +27 -0
- data/app/pb_kits/playbook/pb_user_badge/user_badge.test.js +67 -0
- data/app/pb_kits/playbook/pb_walkthrough/_walkthrough.tsx +193 -0
- data/dist/menu.yml +1 -1
- data/lib/playbook/version.rb +1 -1
- metadata +12 -11
- data/app/pb_kits/playbook/pb_user_badge/badges/million-dollar.jsx +0 -363
- data/app/pb_kits/playbook/pb_user_badge/badges/veteran.jsx +0 -28
- data/app/pb_kits/playbook/pb_walkthrough/_walkthrough.jsx +0 -197
@@ -1,28 +0,0 @@
|
|
1
|
-
import * as React from "react"
|
2
|
-
|
3
|
-
const Veteran = (props) => (
|
4
|
-
<svg
|
5
|
-
viewBox="0 0 200 250"
|
6
|
-
xmlSpace="preserve"
|
7
|
-
xmlns="http://www.w3.org/2000/svg"
|
8
|
-
{...props}
|
9
|
-
>
|
10
|
-
<path
|
11
|
-
d="M198.4 71.5V71c-.2-1.2-1.4-2.1-1.4-2.1L103.2 2.7c-.7-.4-1-.6-1.6-.6-1.3 0-2.3 1-2.3 2.3v67.1h-.6v29.6h99.8l-.1-29.6z"
|
12
|
-
fill="#004876"
|
13
|
-
/>
|
14
|
-
<path
|
15
|
-
d="M172.9 159.2c-31.4 23-33.2 24.3-33.2 24.3l-40.5 3.2v-29.4l73.7 1.9z"
|
16
|
-
fill="#FFF"
|
17
|
-
/>
|
18
|
-
<path
|
19
|
-
d="M99.3 125.4V33.5L1.6 102.7l-.1.1c-1 .7-1.5 1.8-1.5 3v67.4c0 1.2.6 2.3 1.5 3l.1.1 93.5 66.3c1.7 1.2 4.1 0 4.1-2.1v-28.9l40.5-28-40.5.7v-25h73.7l25.4-16.9.2-16.8H99.3z"
|
20
|
-
fill="#BB2432"
|
21
|
-
/>
|
22
|
-
<path d="M99.3 101.1h99.3v24.3H99.3z"
|
23
|
-
fill="#FFF"
|
24
|
-
/>
|
25
|
-
</svg>
|
26
|
-
)
|
27
|
-
|
28
|
-
export default Veteran
|
@@ -1,197 +0,0 @@
|
|
1
|
-
/* eslint-disable react/display-name */
|
2
|
-
/* eslint-disable no-unused-vars */
|
3
|
-
|
4
|
-
/* @flow */
|
5
|
-
|
6
|
-
import React from 'react'
|
7
|
-
import classnames from 'classnames'
|
8
|
-
import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
|
9
|
-
import { globalProps } from '../utilities/globalProps'
|
10
|
-
import Joyride from 'react-joyride'
|
11
|
-
import Button from '../pb_button/_button'
|
12
|
-
import Flex from '../pb_flex/_flex'
|
13
|
-
import SectionSeparator from '../pb_section_separator/_section_separator'
|
14
|
-
import Title from '../pb_title/_title'
|
15
|
-
|
16
|
-
type WalkthroughProps = {
|
17
|
-
aria?: object,
|
18
|
-
callback?: () => void,
|
19
|
-
className?: string,
|
20
|
-
continuous?: boolean,
|
21
|
-
data?: object,
|
22
|
-
id?: string,
|
23
|
-
run?: boolean,
|
24
|
-
steps?: array,
|
25
|
-
stepIndex?: number,
|
26
|
-
debug?: Boolean,
|
27
|
-
disableCloseOnEsc?: Boolean,
|
28
|
-
disableOverlay?: Boolean,
|
29
|
-
disableOverlayClose?: Boolean,
|
30
|
-
disableScrolling?: Boolean,
|
31
|
-
floaterProps?: object,
|
32
|
-
hideBackButton?: Boolean,
|
33
|
-
hideCloseButton?: Boolean,
|
34
|
-
showProgress?: Boolean,
|
35
|
-
showSkipButton?: Boolean,
|
36
|
-
spotlightClicks?: Boolean,
|
37
|
-
spotlightPadding?: number,
|
38
|
-
styles?: {
|
39
|
-
options: {
|
40
|
-
beaconSize?: Number,
|
41
|
-
arrowColor?: String,
|
42
|
-
backgroundColor?: String,
|
43
|
-
primaryColor?: String,
|
44
|
-
overlayColor?: String,
|
45
|
-
spotlightShadow?: String,
|
46
|
-
width?: Number,
|
47
|
-
zIndex?: Number,
|
48
|
-
},
|
49
|
-
},
|
50
|
-
}
|
51
|
-
|
52
|
-
type TooltipProps = {
|
53
|
-
continuous?: Boolean,
|
54
|
-
className?: String,
|
55
|
-
index?: number,
|
56
|
-
isLastStep?: Boolean,
|
57
|
-
size?: number,
|
58
|
-
step: {
|
59
|
-
title?: String,
|
60
|
-
content?: array<React.ReactNode> | React.ReactNode | String,
|
61
|
-
target: String,
|
62
|
-
disableBeacon?: Boolean,
|
63
|
-
},
|
64
|
-
skip?: Boolean,
|
65
|
-
backProps?: object,
|
66
|
-
closeProps?: object,
|
67
|
-
primaryProps?: object,
|
68
|
-
skipProps?: object,
|
69
|
-
tooltipProps?: object,
|
70
|
-
}
|
71
|
-
|
72
|
-
const Tooltip = React.forwardRef((props: TooltipProps, ref) => (
|
73
|
-
<div
|
74
|
-
className="pb_card_kit_border_none p_none"
|
75
|
-
{...props.tooltipProps}
|
76
|
-
>
|
77
|
-
{props.step.title && <div>
|
78
|
-
<Flex
|
79
|
-
align="center"
|
80
|
-
justify="between"
|
81
|
-
padding="xs"
|
82
|
-
>
|
83
|
-
<Title
|
84
|
-
paddingLeft="xs"
|
85
|
-
size={4}
|
86
|
-
>
|
87
|
-
{props.step.title}
|
88
|
-
</Title>
|
89
|
-
{props.skip && (<Button
|
90
|
-
{...props.skipProps}
|
91
|
-
id="skip"
|
92
|
-
text="Skip Tour"
|
93
|
-
variant="link"
|
94
|
-
/>)}
|
95
|
-
<Button
|
96
|
-
{...props.skipProps}
|
97
|
-
id="skip"
|
98
|
-
text="Skip Tour"
|
99
|
-
variant="link"
|
100
|
-
/>
|
101
|
-
</Flex>
|
102
|
-
<SectionSeparator />
|
103
|
-
</div>}
|
104
|
-
|
105
|
-
<Flex padding="sm">{props.step.content}</Flex>
|
106
|
-
<SectionSeparator />
|
107
|
-
<Flex
|
108
|
-
justify={props.index == 0 ? 'end' : 'between'}
|
109
|
-
padding="xs"
|
110
|
-
>
|
111
|
-
|
112
|
-
{props.index > 0 && (
|
113
|
-
<Button
|
114
|
-
{...props.backProps}
|
115
|
-
id="back"
|
116
|
-
text="Back"
|
117
|
-
/>
|
118
|
-
)}
|
119
|
-
<Choose>
|
120
|
-
<When condition={props.continuous && !props.isLastStep}>
|
121
|
-
<Button
|
122
|
-
{...props.primaryProps}
|
123
|
-
id="next"
|
124
|
-
text="Next"
|
125
|
-
/>
|
126
|
-
</When>
|
127
|
-
<When condition={!props.continuous}>
|
128
|
-
<Button
|
129
|
-
{...props.closeProps}
|
130
|
-
id="close"
|
131
|
-
text="Close"
|
132
|
-
/>
|
133
|
-
</When>
|
134
|
-
<Otherwise>
|
135
|
-
<Button
|
136
|
-
{...props.closeProps}
|
137
|
-
id="close"
|
138
|
-
text="Close"
|
139
|
-
/>
|
140
|
-
</Otherwise>
|
141
|
-
</Choose>
|
142
|
-
</Flex>
|
143
|
-
</div>
|
144
|
-
))
|
145
|
-
|
146
|
-
const Walkthrough = (props: WalkthroughProps) => {
|
147
|
-
const {
|
148
|
-
aria = {},
|
149
|
-
callback,
|
150
|
-
className,
|
151
|
-
continuous = false,
|
152
|
-
data = {},
|
153
|
-
disableOverlay,
|
154
|
-
floaterProps = {
|
155
|
-
offset: 50,
|
156
|
-
},
|
157
|
-
id,
|
158
|
-
run = false,
|
159
|
-
steps,
|
160
|
-
styles = {
|
161
|
-
options: {
|
162
|
-
zIndex: 20000,
|
163
|
-
},
|
164
|
-
},
|
165
|
-
showSkipButton,
|
166
|
-
} = props
|
167
|
-
|
168
|
-
const ariaProps = buildAriaProps(aria)
|
169
|
-
const dataProps = buildDataProps(data)
|
170
|
-
const classes = classnames(buildCss('pb_walkthrough'), globalProps(props), className)
|
171
|
-
|
172
|
-
return (
|
173
|
-
<div
|
174
|
-
{...ariaProps}
|
175
|
-
{...dataProps}
|
176
|
-
className={classes}
|
177
|
-
id={id}
|
178
|
-
>
|
179
|
-
<Joyride
|
180
|
-
callback={callback}
|
181
|
-
continuous={continuous}
|
182
|
-
disableOverlay={disableOverlay}
|
183
|
-
disableScrolling
|
184
|
-
floaterProps={floaterProps}
|
185
|
-
run={run}
|
186
|
-
showSkipButton={showSkipButton}
|
187
|
-
steps={steps}
|
188
|
-
styles={styles}
|
189
|
-
tooltipComponent={Tooltip}
|
190
|
-
{...props}
|
191
|
-
/>
|
192
|
-
</div>
|
193
|
-
|
194
|
-
)
|
195
|
-
}
|
196
|
-
|
197
|
-
export default Walkthrough
|