playbook_ui 12.20.0 → 12.21.0.pre.alpha.PLAY807RTEcustomtoolbar680
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 +40 -11
- data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.scss +57 -15
- data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/MoreExtensionsDropdown.tsx +69 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/Toolbar.tsx +10 -2
- data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarDropdown.tsx +10 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.tsx +4 -2
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_more_extensions.jsx +55 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_more_extensions.md +12 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/index.js +2 -1
- 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 +2 -2
- metadata +15 -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
@@ -0,0 +1,358 @@
|
|
1
|
+
import * as React from "react"
|
2
|
+
|
3
|
+
const MillionDollar = () => (
|
4
|
+
<svg
|
5
|
+
viewBox="0 0 242.9 242.9"
|
6
|
+
xmlSpace="preserve"
|
7
|
+
xmlns="http://www.w3.org/2000/svg"
|
8
|
+
>
|
9
|
+
<circle cx={121.5}
|
10
|
+
cy={121.5}
|
11
|
+
r={121.5}
|
12
|
+
/>
|
13
|
+
<linearGradient
|
14
|
+
gradientUnits="userSpaceOnUse"
|
15
|
+
id="a"
|
16
|
+
x1={42.483}
|
17
|
+
x2={200.309}
|
18
|
+
y1={35.645}
|
19
|
+
y2={35.645}
|
20
|
+
>
|
21
|
+
<stop
|
22
|
+
offset={0}
|
23
|
+
style={{
|
24
|
+
stopColor: "#e6b711",
|
25
|
+
}}
|
26
|
+
/>
|
27
|
+
<stop
|
28
|
+
offset={0.128}
|
29
|
+
style={{
|
30
|
+
stopColor: "#eac23c",
|
31
|
+
}}
|
32
|
+
/>
|
33
|
+
<stop
|
34
|
+
offset={0.278}
|
35
|
+
style={{
|
36
|
+
stopColor: "#ec6",
|
37
|
+
}}
|
38
|
+
/>
|
39
|
+
<stop
|
40
|
+
offset={0.413}
|
41
|
+
style={{
|
42
|
+
stopColor: "#f1d485",
|
43
|
+
}}
|
44
|
+
/>
|
45
|
+
<stop
|
46
|
+
offset={0.527}
|
47
|
+
style={{
|
48
|
+
stopColor: "#f2d998",
|
49
|
+
}}
|
50
|
+
/>
|
51
|
+
<stop
|
52
|
+
offset={0.607}
|
53
|
+
style={{
|
54
|
+
stopColor: "#f3db9f",
|
55
|
+
}}
|
56
|
+
/>
|
57
|
+
<stop
|
58
|
+
offset={1}
|
59
|
+
style={{
|
60
|
+
stopColor: "#e6b711",
|
61
|
+
}}
|
62
|
+
/>
|
63
|
+
</linearGradient>
|
64
|
+
<path
|
65
|
+
d="M56.4 53.8c16.9-16.2 39.8-26.2 65-26.2 25.2 0 48.1 10 64.9 26.2h14c-19.1-22.2-47.4-36.3-78.9-36.3-31.5 0-59.8 14.1-78.9 36.3h13.9z"
|
66
|
+
style={{
|
67
|
+
fill: "url(#a)",
|
68
|
+
}}
|
69
|
+
/>
|
70
|
+
<linearGradient
|
71
|
+
gradientUnits="userSpaceOnUse"
|
72
|
+
id="b"
|
73
|
+
x1={17.407}
|
74
|
+
x2={44.897}
|
75
|
+
y1={132.179}
|
76
|
+
y2={132.179}
|
77
|
+
>
|
78
|
+
<stop
|
79
|
+
offset={0}
|
80
|
+
style={{
|
81
|
+
stopColor: "#e6b711",
|
82
|
+
}}
|
83
|
+
/>
|
84
|
+
<stop
|
85
|
+
offset={0.128}
|
86
|
+
style={{
|
87
|
+
stopColor: "#eac23c",
|
88
|
+
}}
|
89
|
+
/>
|
90
|
+
<stop
|
91
|
+
offset={0.278}
|
92
|
+
style={{
|
93
|
+
stopColor: "#ec6",
|
94
|
+
}}
|
95
|
+
/>
|
96
|
+
<stop
|
97
|
+
offset={0.413}
|
98
|
+
style={{
|
99
|
+
stopColor: "#f1d485",
|
100
|
+
}}
|
101
|
+
/>
|
102
|
+
<stop
|
103
|
+
offset={0.527}
|
104
|
+
style={{
|
105
|
+
stopColor: "#f2d998",
|
106
|
+
}}
|
107
|
+
/>
|
108
|
+
<stop
|
109
|
+
offset={0.607}
|
110
|
+
style={{
|
111
|
+
stopColor: "#f3db9f",
|
112
|
+
}}
|
113
|
+
/>
|
114
|
+
<stop
|
115
|
+
offset={1}
|
116
|
+
style={{
|
117
|
+
stopColor: "#e6b711",
|
118
|
+
}}
|
119
|
+
/>
|
120
|
+
</linearGradient>
|
121
|
+
<path
|
122
|
+
d="M44.9 175.7c-10.9-15.3-17.3-34-17.3-54.2 0-14.1 3.1-27.5 8.8-39.5H25.3c-5 12.2-7.8 25.5-7.8 39.5 0 22.7 7.3 43.8 19.8 60.9l7.6-6.7z"
|
123
|
+
style={{
|
124
|
+
fill: "url(#b)",
|
125
|
+
}}
|
126
|
+
/>
|
127
|
+
<linearGradient
|
128
|
+
gradientUnits="userSpaceOnUse"
|
129
|
+
id="c"
|
130
|
+
x1={52.914}
|
131
|
+
x2={189.715}
|
132
|
+
y1={212.573}
|
133
|
+
y2={212.573}
|
134
|
+
>
|
135
|
+
<stop
|
136
|
+
offset={0}
|
137
|
+
style={{
|
138
|
+
stopColor: "#e6b711",
|
139
|
+
}}
|
140
|
+
/>
|
141
|
+
<stop
|
142
|
+
offset={0.128}
|
143
|
+
style={{
|
144
|
+
stopColor: "#eac23c",
|
145
|
+
}}
|
146
|
+
/>
|
147
|
+
<stop
|
148
|
+
offset={0.278}
|
149
|
+
style={{
|
150
|
+
stopColor: "#ec6",
|
151
|
+
}}
|
152
|
+
/>
|
153
|
+
<stop
|
154
|
+
offset={0.413}
|
155
|
+
style={{
|
156
|
+
stopColor: "#f1d485",
|
157
|
+
}}
|
158
|
+
/>
|
159
|
+
<stop
|
160
|
+
offset={0.527}
|
161
|
+
style={{
|
162
|
+
stopColor: "#f2d998",
|
163
|
+
}}
|
164
|
+
/>
|
165
|
+
<stop
|
166
|
+
offset={0.607}
|
167
|
+
style={{
|
168
|
+
stopColor: "#f3db9f",
|
169
|
+
}}
|
170
|
+
/>
|
171
|
+
<stop
|
172
|
+
offset={1}
|
173
|
+
style={{
|
174
|
+
stopColor: "#e6b711",
|
175
|
+
}}
|
176
|
+
/>
|
177
|
+
</linearGradient>
|
178
|
+
<path
|
179
|
+
d="M173 199.8c-14.8 9.8-32.5 15.5-51.6 15.5s-37-5.8-51.8-15.6H52.9c18.3 16.1 42.3 25.8 68.5 25.8 26.1 0 50-9.7 68.3-25.7H173z"
|
180
|
+
style={{
|
181
|
+
fill: "url(#c)",
|
182
|
+
}}
|
183
|
+
/>
|
184
|
+
<linearGradient
|
185
|
+
gradientUnits="userSpaceOnUse"
|
186
|
+
id="d"
|
187
|
+
x1={31.123}
|
188
|
+
x2={207.766}
|
189
|
+
y1={136.159}
|
190
|
+
y2={136.159}
|
191
|
+
>
|
192
|
+
<stop
|
193
|
+
offset={0}
|
194
|
+
style={{
|
195
|
+
stopColor: "#e6b711",
|
196
|
+
}}
|
197
|
+
/>
|
198
|
+
<stop
|
199
|
+
offset={0.128}
|
200
|
+
style={{
|
201
|
+
stopColor: "#eac23c",
|
202
|
+
}}
|
203
|
+
/>
|
204
|
+
<stop
|
205
|
+
offset={0.278}
|
206
|
+
style={{
|
207
|
+
stopColor: "#ec6",
|
208
|
+
}}
|
209
|
+
/>
|
210
|
+
<stop
|
211
|
+
offset={0.413}
|
212
|
+
style={{
|
213
|
+
stopColor: "#f1d485",
|
214
|
+
}}
|
215
|
+
/>
|
216
|
+
<stop
|
217
|
+
offset={0.527}
|
218
|
+
style={{
|
219
|
+
stopColor: "#f2d998",
|
220
|
+
}}
|
221
|
+
/>
|
222
|
+
<stop
|
223
|
+
offset={0.607}
|
224
|
+
style={{
|
225
|
+
stopColor: "#f3db9f",
|
226
|
+
}}
|
227
|
+
/>
|
228
|
+
<stop
|
229
|
+
offset={1}
|
230
|
+
style={{
|
231
|
+
stopColor: "#e6b711",
|
232
|
+
}}
|
233
|
+
/>
|
234
|
+
</linearGradient>
|
235
|
+
<path
|
236
|
+
d="M139.2 193v-1.8c5-.4 10.2-.5 13.4-5 3.8-5.2 3.2-15.4 3.2-21.5V78.5l-47.3 120.4L61.2 81.2v61.1c0 13.6.5 35.1 12.5 44.2 4.3 3.2 9 3.9 14.2 4.7v1.8H31.1v-1.8c1.6-.4 3.2-.7 4.8-1.1 22.6-5.7 22.9-32.4 22.9-51.1v-37.8c0-6.1.5-13.3-3.2-18.5-4.5-6.1-13.4-7.2-20.4-7.5v-1.8H96l29.6 75.4 29.9-75.4h52.3v1.8c-4.8.4-10.2.9-13.4 5-3.8 4.8-3.2 15.9-3.2 21.9v62.5c0 6.3-.7 16.1 3.2 21.5 3.2 4.3 6.2 4.7 11.2 5v1.8h-66.4z"
|
237
|
+
style={{
|
238
|
+
fill: "url(#d)",
|
239
|
+
}}
|
240
|
+
/>
|
241
|
+
<linearGradient
|
242
|
+
gradientUnits="userSpaceOnUse"
|
243
|
+
id="e"
|
244
|
+
x1={30.453}
|
245
|
+
x2={213.794}
|
246
|
+
y1={63.629}
|
247
|
+
y2={63.629}
|
248
|
+
>
|
249
|
+
<stop
|
250
|
+
offset={0}
|
251
|
+
style={{
|
252
|
+
stopColor: "#e6b711",
|
253
|
+
}}
|
254
|
+
/>
|
255
|
+
<stop
|
256
|
+
offset={0.128}
|
257
|
+
style={{
|
258
|
+
stopColor: "#eac23c",
|
259
|
+
}}
|
260
|
+
/>
|
261
|
+
<stop
|
262
|
+
offset={0.278}
|
263
|
+
style={{
|
264
|
+
stopColor: "#ec6",
|
265
|
+
}}
|
266
|
+
/>
|
267
|
+
<stop
|
268
|
+
offset={0.413}
|
269
|
+
style={{
|
270
|
+
stopColor: "#f1d485",
|
271
|
+
}}
|
272
|
+
/>
|
273
|
+
<stop
|
274
|
+
offset={0.527}
|
275
|
+
style={{
|
276
|
+
stopColor: "#f2d998",
|
277
|
+
}}
|
278
|
+
/>
|
279
|
+
<stop
|
280
|
+
offset={0.607}
|
281
|
+
style={{
|
282
|
+
stopColor: "#f3db9f",
|
283
|
+
}}
|
284
|
+
/>
|
285
|
+
<stop
|
286
|
+
offset={1}
|
287
|
+
style={{
|
288
|
+
stopColor: "#e6b711",
|
289
|
+
}}
|
290
|
+
/>
|
291
|
+
</linearGradient>
|
292
|
+
<path
|
293
|
+
d="M30.5 60.6h183.3v6.1H30.5z"
|
294
|
+
style={{
|
295
|
+
fill: "url(#e)",
|
296
|
+
}}
|
297
|
+
/>
|
298
|
+
<linearGradient
|
299
|
+
gradientUnits="userSpaceOnUse"
|
300
|
+
id="f"
|
301
|
+
x1={196.676}
|
302
|
+
x2={225.538}
|
303
|
+
y1={132.923}
|
304
|
+
y2={132.923}
|
305
|
+
>
|
306
|
+
<stop
|
307
|
+
offset={0}
|
308
|
+
style={{
|
309
|
+
stopColor: "#e6b711",
|
310
|
+
}}
|
311
|
+
/>
|
312
|
+
<stop
|
313
|
+
offset={0.128}
|
314
|
+
style={{
|
315
|
+
stopColor: "#eac23c",
|
316
|
+
}}
|
317
|
+
/>
|
318
|
+
<stop
|
319
|
+
offset={0.278}
|
320
|
+
style={{
|
321
|
+
stopColor: "#ec6",
|
322
|
+
}}
|
323
|
+
/>
|
324
|
+
<stop
|
325
|
+
offset={0.413}
|
326
|
+
style={{
|
327
|
+
stopColor: "#f1d485",
|
328
|
+
}}
|
329
|
+
/>
|
330
|
+
<stop
|
331
|
+
offset={0.527}
|
332
|
+
style={{
|
333
|
+
stopColor: "#f2d998",
|
334
|
+
}}
|
335
|
+
/>
|
336
|
+
<stop
|
337
|
+
offset={0.607}
|
338
|
+
style={{
|
339
|
+
stopColor: "#f3db9f",
|
340
|
+
}}
|
341
|
+
/>
|
342
|
+
<stop
|
343
|
+
offset={1}
|
344
|
+
style={{
|
345
|
+
stopColor: "#e6b711",
|
346
|
+
}}
|
347
|
+
/>
|
348
|
+
</linearGradient>
|
349
|
+
<path
|
350
|
+
d="M196.7 177.5c11.5-15.6 18.7-35.2 18.7-56 0-14.1-3.1-27.5-8.8-39.5h11.1c5 12.2 7.8 25.5 7.8 39.5 0 23.4-7.8 45-20.9 62.4l-7.9-6.4z"
|
351
|
+
style={{
|
352
|
+
fill: "url(#f)",
|
353
|
+
}}
|
354
|
+
/>
|
355
|
+
</svg>
|
356
|
+
)
|
357
|
+
|
358
|
+
export default MillionDollar
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import * as React from "react"
|
2
|
+
|
3
|
+
const Veteran = () => (
|
4
|
+
<svg
|
5
|
+
viewBox="0 0 200 250"
|
6
|
+
xmlSpace="preserve"
|
7
|
+
xmlns="http://www.w3.org/2000/svg"
|
8
|
+
>
|
9
|
+
<path
|
10
|
+
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"
|
11
|
+
fill="#004876"
|
12
|
+
/>
|
13
|
+
<path
|
14
|
+
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"
|
15
|
+
fill="#FFF"
|
16
|
+
/>
|
17
|
+
<path
|
18
|
+
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"
|
19
|
+
fill="#BB2432"
|
20
|
+
/>
|
21
|
+
<path d="M99.3 101.1h99.3v24.3H99.3z"
|
22
|
+
fill="#FFF"
|
23
|
+
/>
|
24
|
+
</svg>
|
25
|
+
)
|
26
|
+
|
27
|
+
export default Veteran
|
@@ -0,0 +1,67 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import { render, screen } from '../utilities/test-utils'
|
3
|
+
|
4
|
+
import UserBadge from './_user_badge'
|
5
|
+
|
6
|
+
const testId = 'userBadge'
|
7
|
+
const className = 'custom-class-name'
|
8
|
+
|
9
|
+
const UserBadgeDefault = (props) => (
|
10
|
+
<>
|
11
|
+
<UserBadge
|
12
|
+
aria={{ label: testId }}
|
13
|
+
className={className}
|
14
|
+
data={{ testid: testId }}
|
15
|
+
id={testId}
|
16
|
+
{...props}
|
17
|
+
/>
|
18
|
+
</>
|
19
|
+
)
|
20
|
+
|
21
|
+
test('should pass data prop', () => {
|
22
|
+
render(<UserBadgeDefault />)
|
23
|
+
const kit = screen.getByTestId(testId)
|
24
|
+
expect(kit).toBeInTheDocument()
|
25
|
+
})
|
26
|
+
|
27
|
+
test('should pass className prop', () => {
|
28
|
+
render(<UserBadgeDefault />)
|
29
|
+
const kit = screen.getByTestId(testId)
|
30
|
+
expect(kit).toHaveClass(className)
|
31
|
+
})
|
32
|
+
|
33
|
+
test('should pass aria prop', () => {
|
34
|
+
render(<UserBadgeDefault />)
|
35
|
+
const kit = screen.getByTestId(testId)
|
36
|
+
expect(kit).toHaveAttribute('aria-label', testId)
|
37
|
+
})
|
38
|
+
|
39
|
+
test('should pass id prop', () => {
|
40
|
+
render(<UserBadgeDefault />)
|
41
|
+
const kit = screen.getByTestId(testId)
|
42
|
+
expect(kit).toHaveProperty('id', testId)
|
43
|
+
})
|
44
|
+
|
45
|
+
test('should be million-dollar badge by default', () => {
|
46
|
+
render(<UserBadgeDefault />)
|
47
|
+
const kit = screen.getByTestId(testId)
|
48
|
+
expect(kit).toContainHTML('<circle cx="121.5" cy="121.5" r="121.5" />')
|
49
|
+
})
|
50
|
+
|
51
|
+
test('should pass badge prop', () => {
|
52
|
+
render(<UserBadgeDefault badge="veteran" />)
|
53
|
+
const kit = screen.getByTestId(testId)
|
54
|
+
expect(kit).not.toContainHTML('<circle cx="121.5" cy="121.5" r="121.5" />')
|
55
|
+
})
|
56
|
+
|
57
|
+
test('should be md size by default', () => {
|
58
|
+
render(<UserBadgeDefault />)
|
59
|
+
const kit = screen.getByTestId(testId)
|
60
|
+
expect(kit).toHaveClass('pb_user_badge_kit_md')
|
61
|
+
})
|
62
|
+
|
63
|
+
test('should pass size prop', () => {
|
64
|
+
render(<UserBadgeDefault size="sm" />)
|
65
|
+
const kit = screen.getByTestId(testId)
|
66
|
+
expect(kit).toHaveClass('pb_user_badge_kit_sm')
|
67
|
+
})
|
@@ -0,0 +1,193 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import classnames from 'classnames'
|
3
|
+
import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
|
4
|
+
import { globalProps } from '../utilities/globalProps'
|
5
|
+
import Joyride, { TooltipRenderProps } from 'react-joyride'
|
6
|
+
import Button from '../pb_button/_button'
|
7
|
+
import Flex from '../pb_flex/_flex'
|
8
|
+
import SectionSeparator from '../pb_section_separator/_section_separator'
|
9
|
+
import Title from '../pb_title/_title'
|
10
|
+
|
11
|
+
type WalkthroughProps = {
|
12
|
+
aria?: { [key: string]: string },
|
13
|
+
callback?: () => void,
|
14
|
+
className?: string,
|
15
|
+
continuous?: boolean,
|
16
|
+
data?: { [key: string]: string },
|
17
|
+
id?: string,
|
18
|
+
run?: boolean,
|
19
|
+
steps?: [],
|
20
|
+
stepIndex?: number,
|
21
|
+
debug?: boolean,
|
22
|
+
disableCloseOnEsc?: boolean,
|
23
|
+
disableOverlay?: boolean,
|
24
|
+
disableOverlayClose?: boolean,
|
25
|
+
disableScrolling?: boolean,
|
26
|
+
floaterProps?: object,
|
27
|
+
hideBackButton?: boolean,
|
28
|
+
hideCloseButton?: boolean,
|
29
|
+
showProgress?: boolean,
|
30
|
+
showSkipButton?: boolean,
|
31
|
+
spotlightClicks?: boolean,
|
32
|
+
spotlightPadding?: number,
|
33
|
+
styles?: {
|
34
|
+
options: {
|
35
|
+
beaconSize?: number,
|
36
|
+
arrowColor?: string,
|
37
|
+
backgroundColor?: string,
|
38
|
+
primaryColor?: string,
|
39
|
+
overlayColor?: string,
|
40
|
+
spotlightShadow?: string,
|
41
|
+
width?: number,
|
42
|
+
zIndex?: number,
|
43
|
+
},
|
44
|
+
},
|
45
|
+
}
|
46
|
+
|
47
|
+
type TooltipProps = {
|
48
|
+
continuous?: boolean,
|
49
|
+
className?: string,
|
50
|
+
index?: number,
|
51
|
+
isLastStep?: boolean,
|
52
|
+
size?: number,
|
53
|
+
step: {
|
54
|
+
title?: string,
|
55
|
+
content?: React.ReactNode[] | React.ReactNode | string,
|
56
|
+
target: string,
|
57
|
+
disableBeacon?: boolean,
|
58
|
+
},
|
59
|
+
skip?: boolean,
|
60
|
+
backProps?: object,
|
61
|
+
closeProps?: object,
|
62
|
+
primaryProps?: object,
|
63
|
+
skipProps?: object,
|
64
|
+
tooltipProps?: object,
|
65
|
+
}
|
66
|
+
|
67
|
+
const Tooltip = React.forwardRef((props: TooltipProps) => (
|
68
|
+
<div
|
69
|
+
className="pb_card_kit_border_none p_none"
|
70
|
+
{...props.tooltipProps}
|
71
|
+
>
|
72
|
+
{props.step.title && <div>
|
73
|
+
<Flex
|
74
|
+
align="center"
|
75
|
+
justify="between"
|
76
|
+
padding="xs"
|
77
|
+
>
|
78
|
+
<Title
|
79
|
+
paddingLeft="xs"
|
80
|
+
size={4}
|
81
|
+
>
|
82
|
+
{props.step.title}
|
83
|
+
</Title>
|
84
|
+
{props.skip && (<Button
|
85
|
+
{...props.skipProps}
|
86
|
+
id="skip"
|
87
|
+
text="Skip Tour"
|
88
|
+
variant="link"
|
89
|
+
/>)}
|
90
|
+
<Button
|
91
|
+
{...props.skipProps}
|
92
|
+
id="skip"
|
93
|
+
text="Skip Tour"
|
94
|
+
variant="link"
|
95
|
+
/>
|
96
|
+
</Flex>
|
97
|
+
<SectionSeparator />
|
98
|
+
</div>}
|
99
|
+
|
100
|
+
<Flex padding="sm">{props.step.content}</Flex>
|
101
|
+
<SectionSeparator />
|
102
|
+
<Flex
|
103
|
+
justify={props.index == 0 ? 'end' : 'between'}
|
104
|
+
padding="xs"
|
105
|
+
>
|
106
|
+
|
107
|
+
{props.index > 0 && (
|
108
|
+
<Button
|
109
|
+
{...props.backProps}
|
110
|
+
id="back"
|
111
|
+
text="Back"
|
112
|
+
/>
|
113
|
+
)}
|
114
|
+
|
115
|
+
{props.continuous && !props.isLastStep &&
|
116
|
+
<Button
|
117
|
+
{...props.primaryProps}
|
118
|
+
id="next"
|
119
|
+
text="Next"
|
120
|
+
/>
|
121
|
+
}
|
122
|
+
|
123
|
+
{!props.continuous &&
|
124
|
+
<Button
|
125
|
+
{...props.closeProps}
|
126
|
+
id="close"
|
127
|
+
text="Close"
|
128
|
+
/>
|
129
|
+
}
|
130
|
+
|
131
|
+
{!((props.continuous && !props.isLastStep) || (!props.continuous)) &&
|
132
|
+
<Button
|
133
|
+
{...props.closeProps}
|
134
|
+
id="close"
|
135
|
+
text="Close"
|
136
|
+
/>
|
137
|
+
}
|
138
|
+
</Flex>
|
139
|
+
</div>
|
140
|
+
)) as unknown as React.ForwardRefRenderFunction<HTMLDivElement, TooltipRenderProps>
|
141
|
+
|
142
|
+
const Walkthrough = (props: WalkthroughProps) => {
|
143
|
+
const {
|
144
|
+
aria = {},
|
145
|
+
callback,
|
146
|
+
className,
|
147
|
+
continuous = false,
|
148
|
+
data = {},
|
149
|
+
disableOverlay,
|
150
|
+
floaterProps = {
|
151
|
+
offset: 50,
|
152
|
+
},
|
153
|
+
id,
|
154
|
+
run = false,
|
155
|
+
steps,
|
156
|
+
styles = {
|
157
|
+
options: {
|
158
|
+
zIndex: 20000,
|
159
|
+
},
|
160
|
+
},
|
161
|
+
showSkipButton,
|
162
|
+
} = props
|
163
|
+
|
164
|
+
const ariaProps = buildAriaProps(aria)
|
165
|
+
const dataProps = buildDataProps(data)
|
166
|
+
const classes = classnames(buildCss('pb_walkthrough'), globalProps(props), className)
|
167
|
+
|
168
|
+
return (
|
169
|
+
<div
|
170
|
+
{...ariaProps}
|
171
|
+
{...dataProps}
|
172
|
+
className={classes}
|
173
|
+
id={id}
|
174
|
+
>
|
175
|
+
<Joyride
|
176
|
+
callback={callback}
|
177
|
+
continuous={continuous}
|
178
|
+
disableOverlay={disableOverlay}
|
179
|
+
disableScrolling
|
180
|
+
floaterProps={floaterProps}
|
181
|
+
run={run}
|
182
|
+
showSkipButton={showSkipButton}
|
183
|
+
steps={steps}
|
184
|
+
styles={styles}
|
185
|
+
tooltipComponent={Tooltip}
|
186
|
+
{...props}
|
187
|
+
/>
|
188
|
+
</div>
|
189
|
+
|
190
|
+
)
|
191
|
+
}
|
192
|
+
|
193
|
+
export default Walkthrough
|
data/dist/menu.yml
CHANGED
data/lib/playbook/version.rb
CHANGED