playbook_ui 10.1.0 → 10.2.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4eac1f539de9ef040a2d8a04d06f67006e1f7fe858a2161cbc526a8303c66ff7
4
- data.tar.gz: 91710c901df8071c7d3752a8d10c57a2595ae014137cc021cb65c7b43ef71e4f
3
+ metadata.gz: 800b6e3712bc9efc7d5105eb9b5a97deef54c0e27fa417dc1a0633910c21b0f9
4
+ data.tar.gz: 58686b0e5aca3fd60ae5b898bdbecb7c77bf51f682c948da943a30ea2df0a2f6
5
5
  SHA512:
6
- metadata.gz: c922a03b5f6f030294fe9765db29f0e30ad2efda6667269a68a77c438d809fc9c57fc40f3096d4bcf54710e3814e34feb6c8b71d347691577c7d68c717860bea
7
- data.tar.gz: e074aa18cee2a0a17211040f8891f6e29625fdc9dc256399961702aa20680be8ec6ea5185af4dfd23573e982790c7709c03917e65ecb766f730bdbafc80508f8
6
+ metadata.gz: 92dacb3711e4f9ba164dbd3c86c45dbbba4f9a2b249331d8dbb98a88ae295a0fd16efc4b202d0ea0944a3748fbe9aebdbfecea137022879f69624ebe1731b230
7
+ data.tar.gz: 4ff55667a9e1fe1b9f2bcb3f581af6954b365364409ce77216f45887790f191f1437646302e337b44a373982dd292a94c8fcce57fbbdd4e4537ec68cabb22244
@@ -90,6 +90,7 @@
90
90
  @import 'pb_user/user';
91
91
  @import 'pb_user_badge/user_badge';
92
92
  @import 'pb_time_stacked/time_stacked';
93
+ @import 'pb_walkthrough/walkthrough';
93
94
  @import 'pb_weekday_stacked/weekday_stacked';
94
95
  @import './utilities/spacing';
95
96
  @import './utilities/max_width';
@@ -101,3 +101,4 @@ kits:
101
101
  - title_count
102
102
  - title_detail
103
103
  - user_badge
104
+ - walkthrough
@@ -4,6 +4,7 @@ import 'lazysizes/plugins/attrchange/ls.attrchange'
4
4
  import 'lazysizes'
5
5
 
6
6
  // vvv React Component JSX Imports from the React Kits vvv
7
+ export { default as Walkthrough } from './pb_walkthrough/_walkthrough'
7
8
  export { default as Avatar } from './pb_avatar/_avatar'
8
9
  export { default as AvatarActionButton } from './pb_avatar_action_button/_avatar_action_button'
9
10
  export { default as Background } from './pb_background/_background'
@@ -23,8 +23,6 @@
23
23
  overflow-x: auto;
24
24
  }
25
25
  [class^=pb_rich_text_editor_kit] {
26
- // Fixes flex container resizing bug
27
- overflow-x: auto;
28
26
  // Disables File Attatchment Button in Toolbar
29
27
  trix-toolbar [data-trix-button-group="file-tools"] {
30
28
  display: none;
@@ -0,0 +1,197 @@
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.js'
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
@@ -0,0 +1,68 @@
1
+ import React, { useState } from 'react'
2
+ import { Button, Walkthrough } from '../../'
3
+
4
+ const WalkthroughContinuous = (props) => {
5
+ const [state, setState] = useState({
6
+ run: false,
7
+ steps: [
8
+ {
9
+ title: 'Example Title',
10
+ content: 'Setting the prop - continuous allows the next button to appear and lets the user move to the next step by pressing the next button instead of the beacon',
11
+ target: '.examplePaused',
12
+ },
13
+ {
14
+ title: 'Toggle',
15
+ content: 'Setting the prop - continuous allows the next button to appear and lets the user move to the next step by pressing the next button instead of the beacon',
16
+ target: '.pb_toggle_control',
17
+ },
18
+ {
19
+ title: 'Top Nav',
20
+ content: 'Setting the prop - continuous allows the next button to appear and lets the user move to the next step by pressing the next button instead of the beacon',
21
+ target: '.pb--page--topNav',
22
+ },
23
+ ],
24
+ })
25
+
26
+ return (
27
+ <div>
28
+ <div
29
+ className="examplePaused"
30
+ style={{ 'display': 'inline' }}
31
+ >
32
+ {'Start the Tour. Then click the Beacon to demo the default behavior of the Walkthrough Kit'}
33
+ </div>
34
+ <br />
35
+ <br />
36
+ <Button
37
+ onClick={() => {
38
+ setState({ ...state,
39
+ run: true,
40
+ })
41
+ }}
42
+ >
43
+ {'Start Tour'}
44
+ </Button>
45
+ <br />
46
+ <br />
47
+ <Button
48
+ onClick={() => {
49
+ setState({
50
+ ...state,
51
+ run: false,
52
+ })
53
+ }}
54
+ >
55
+ {'Reset/Stop Tour'}
56
+ </Button>
57
+
58
+ <Walkthrough
59
+ run={state.run}
60
+ steps={state.steps}
61
+ {...props}
62
+ continuous
63
+ />
64
+ </div>
65
+ )
66
+ }
67
+
68
+ export default WalkthroughContinuous
@@ -0,0 +1,70 @@
1
+ import React, { useState } from 'react'
2
+ import { Button, Walkthrough } from '../../'
3
+
4
+ const WalkthroughDefault = (props) => {
5
+ const [state, setState] = useState({
6
+ run: false,
7
+ steps: [
8
+ {
9
+ title: 'Example title',
10
+ content:
11
+ 'This was an example of a Beacon in the Walkthrough Kit it is used as a simple indicator to inform users about a particular thing',
12
+ target: '.example',
13
+ },
14
+ {
15
+ title: 'Toggle',
16
+ content:
17
+ 'By default the walkthrough kit will cycle through each step provided.',
18
+ target: '.pb_toggle_control',
19
+ },
20
+ {
21
+ title: 'Top Nav',
22
+ content:
23
+ 'By default the walkthrough kit will cycle through each step provided.',
24
+ target: '.pb--page--topNav',
25
+ },
26
+ ],
27
+ })
28
+
29
+ return (
30
+ <div>
31
+ <div
32
+ className="example"
33
+ style={{ 'display': 'inline' }}
34
+ >
35
+ {'Start the Tour. Then click the Beacon to demo the default behavior of the Walkthrough Kit'}
36
+ </div>
37
+ <br />
38
+ <br />
39
+ <Button
40
+ onClick={() => {
41
+ setState({ ...state,
42
+ run: true,
43
+ })
44
+ }}
45
+ >
46
+ {'Start Tour'}
47
+ </Button>
48
+ <br />
49
+ <br />
50
+ <Button
51
+ onClick={() => {
52
+ setState({
53
+ ...state,
54
+ run: false,
55
+ })
56
+ }}
57
+ >
58
+ {'Reset/Stop Tour'}
59
+ </Button>
60
+
61
+ <Walkthrough
62
+ run={state.run}
63
+ steps={state.steps}
64
+ {...props}
65
+ />
66
+ </div>
67
+ )
68
+ }
69
+
70
+ export default WalkthroughDefault
@@ -0,0 +1,109 @@
1
+ import React, { useState } from 'react'
2
+ import { Button, Walkthrough } from '../../'
3
+
4
+ const WalkthroughMultiBeacon = (props) => {
5
+ const [stateA, setStateA] = useState({
6
+ run: false,
7
+ steps: [
8
+ {
9
+ title: 'Example title',
10
+ content:
11
+ 'This was an example of a Beacon in the Walkthrough Kit it is used as a simple indicator to inform users about a particular thing',
12
+ target: '.exampleMulti',
13
+ },
14
+ ],
15
+ })
16
+
17
+ const [stateB, setStateB] = useState({
18
+ run: false,
19
+ steps: [
20
+ {
21
+ title: 'Toggle',
22
+ content:
23
+ 'By default the walkthrough kit will cycle through each step provided.',
24
+ target: '.pb_toggle_control',
25
+ },
26
+ ],
27
+ })
28
+
29
+ const [stateC, setStateC] = useState({
30
+ run: false,
31
+ steps: [
32
+ {
33
+ title: 'Top Nav',
34
+ content:
35
+ 'By default the walkthrough kit will cycle through each step provided.',
36
+ target: '.pb--page--topNav',
37
+ },
38
+ ],
39
+ })
40
+
41
+ return (
42
+ <div>
43
+ <div
44
+ className="exampleMulti"
45
+ style={{ 'display': 'inline' }}
46
+ >
47
+ {'Start the Tour. Then click the Beacon to demo the default behavior of the Walkthrough Kit'}
48
+ </div>
49
+ <br />
50
+ <br />
51
+ <Button
52
+ onClick={() => {
53
+ setStateA({
54
+ ...stateA,
55
+ run: true,
56
+ })
57
+ setStateB({
58
+ ...stateB,
59
+ run: true,
60
+ })
61
+ setStateC({
62
+ ...stateC,
63
+ run: true,
64
+ })
65
+ }}
66
+ >
67
+ {'Start Tour'}
68
+ </Button>
69
+ <br />
70
+ <br />
71
+ <Button
72
+ onClick={() => {
73
+ setStateA({
74
+ ...stateA,
75
+ run: false,
76
+ })
77
+ setStateB({
78
+ ...stateB,
79
+ run: false,
80
+ })
81
+ setStateC({
82
+ ...stateC,
83
+ run: false,
84
+ })
85
+ }}
86
+ >
87
+ {'Reset/Stop Tour'}
88
+ </Button>
89
+
90
+ <Walkthrough
91
+ run={stateA.run}
92
+ steps={stateA.steps}
93
+ {...props}
94
+ />
95
+ <Walkthrough
96
+ run={stateB.run}
97
+ steps={stateB.steps}
98
+ {...props}
99
+ />
100
+ <Walkthrough
101
+ run={stateC.run}
102
+ steps={stateC.steps}
103
+ {...props}
104
+ />
105
+ </div>
106
+ )
107
+ }
108
+
109
+ export default WalkthroughMultiBeacon
@@ -0,0 +1,75 @@
1
+ import React, { useState } from 'react'
2
+ import { Button, Walkthrough } from '../../'
3
+
4
+ const WalkthroughNoBeacon = (props) => {
5
+ const [state, setState] = useState({
6
+ callback: (data) => {
7
+ if (data.action === 'close' && data.type === 'step:after') {
8
+ // This explicitly stops the tour (otherwise it displays a "beacon" to resume the tour)
9
+ setState({ ...state, run: false })
10
+ }
11
+ },
12
+ run: false,
13
+ steps: [
14
+ {
15
+ title: 'Example Title',
16
+ content: 'Setting the prop - continuous allows the next button to appear and lets the user move to the next step by pressing the next button instead of the beacon',
17
+ target: '.exampleNoBeacon',
18
+ disableBeacon: true,
19
+ },
20
+ {
21
+ title: 'Toggle',
22
+ content: 'Setting the prop - continuous allows the next button to appear and lets the user move to the next step by pressing the next button instead of the beacon',
23
+ target: '.pb_toggle_control',
24
+ },
25
+ {
26
+ title: 'Top Nav',
27
+ content: 'Setting the prop - continuous allows the next button to appear and lets the user move to the next step by pressing the next button instead of the beacon',
28
+ target: '.pb--page--topNav',
29
+ },
30
+ ],
31
+ })
32
+
33
+ return (
34
+ <div>
35
+ <div
36
+ className="exampleNoBeacon"
37
+ style={{ 'display': 'inline' }}
38
+ >
39
+ {'Start the Tour. Then click the Beacon to demo the default behavior of the Walkthrough Kit'}
40
+ </div>
41
+ <br />
42
+ <br />
43
+ <Button
44
+ onClick={() => {
45
+ setState({ ...state,
46
+ run: true,
47
+ })
48
+ }}
49
+ >
50
+ {'Start Tour'}
51
+ </Button>
52
+ <br />
53
+ <br />
54
+ <Button
55
+ onClick={() => {
56
+ setState({
57
+ ...state,
58
+ run: false,
59
+ })
60
+ }}
61
+ >
62
+ {'Reset/Stop Tour'}
63
+ </Button>
64
+
65
+ <Walkthrough
66
+ run={state.run}
67
+ steps={state.steps}
68
+ {...props}
69
+ continuous
70
+ />
71
+ </div>
72
+ )
73
+ }
74
+
75
+ export default WalkthroughNoBeacon
@@ -0,0 +1,75 @@
1
+ import React, { useState } from 'react'
2
+ import { Button, Walkthrough } from '../../'
3
+
4
+ const WalkthroughNoOverlay = (props) => {
5
+ const [noOverlay, setNoOverlayState] = useState({
6
+ callback: (data) => {
7
+ if (data.action === 'close' && data.type === 'step:after') {
8
+ // This explicitly stops the tour (otherwise it displays a "beacon" to resume the tour)
9
+ setNoOverlayState({ ...noOverlay, run: false })
10
+ }
11
+ },
12
+ disableOverlay: true,
13
+ run: false,
14
+ steps: [
15
+ {
16
+ title: 'Example Title',
17
+ content: 'Setting the prop - continuous allows the next button to appear and lets the user move to the next step by pressing the next button instead of the beacon',
18
+ target: '.exampleNoOverlay',
19
+ },
20
+ {
21
+ title: 'Toggle',
22
+ content: 'Setting the prop - continuous allows the next button to appear and lets the user move to the next step by pressing the next button instead of the beacon',
23
+ target: '.pb_toggle_control',
24
+ },
25
+ {
26
+ title: 'Top Nav',
27
+ content: 'Setting the prop - continuous allows the next button to appear and lets the user move to the next step by pressing the next button instead of the beacon',
28
+ target: '.pb--page--topNav',
29
+ },
30
+ ],
31
+ })
32
+
33
+ return (
34
+ <div>
35
+ <div
36
+ className="exampleNoOverlay"
37
+ style={{ 'display': 'inline' }}
38
+ >
39
+ {'Start the Tour. Then click the Beacon to demo the default behavior of the Walkthrough Kit'}
40
+ </div>
41
+ <br />
42
+ <br />
43
+ <Button
44
+ onClick={() => {
45
+ setNoOverlayState({ ...noOverlay,
46
+ run: true,
47
+ })
48
+ }}
49
+ >
50
+ {'Start Tour'}
51
+ </Button>
52
+ <br />
53
+ <br />
54
+ <Button
55
+ onClick={() => {
56
+ setNoOverlayState({
57
+ ...noOverlay,
58
+ run: false,
59
+ })
60
+ }}
61
+ >
62
+ {'Reset/Stop Tour'}
63
+ </Button>
64
+
65
+ <Walkthrough
66
+ disableOverlay
67
+ run={noOverlay.run}
68
+ steps={noOverlay.steps}
69
+ {...props}
70
+ />
71
+ </div>
72
+ )
73
+ }
74
+
75
+ export default WalkthroughNoOverlay
@@ -0,0 +1,75 @@
1
+ import React, { useState } from 'react'
2
+ import { Button, Walkthrough } from '../../'
3
+
4
+ const WalkthroughStyled = (props) => {
5
+ const [state, setState] = useState({
6
+ run: false,
7
+ steps: [
8
+ {
9
+ title: 'Example title',
10
+ content:
11
+ 'This was an example of a Beacon in the Walkthrough Kit it is used as a simple indicator to inform users about a particular thing',
12
+ target: '.styled',
13
+ },
14
+ {
15
+ title: 'Toggle',
16
+ content:
17
+ 'By default the walkthrough kit will cycle through each step provided.',
18
+ target: '.pb_toggle_control',
19
+ },
20
+ {
21
+ title: 'Top Nav',
22
+ content:
23
+ 'By default the walkthrough kit will cycle through each step provided.',
24
+ target: '.pb--page--topNav',
25
+ },
26
+ ],
27
+ })
28
+
29
+ return (
30
+ <div>
31
+ <div
32
+ className="styled"
33
+ style={{ 'display': 'inline' }}
34
+ >
35
+ {'Start the Tour. Then click the Beacon to demo the default behavior of the Walkthrough Kit'}
36
+ </div>
37
+ <br />
38
+ <br />
39
+ <Button
40
+ onClick={() => {
41
+ setState({ ...state,
42
+ run: true,
43
+ })
44
+ }}
45
+ >
46
+ {'Start Tour'}
47
+ </Button>
48
+ <br />
49
+ <br />
50
+ <Button
51
+ onClick={() => {
52
+ setState({
53
+ ...state,
54
+ run: false,
55
+ })
56
+ }}
57
+ >
58
+ {'Reset/Stop Tour'}
59
+ </Button>
60
+
61
+ <Walkthrough
62
+ run={state.run}
63
+ steps={state.steps}
64
+ styles={{
65
+ options: {
66
+ beaconSize: 120,
67
+ },
68
+ }}
69
+ {...props}
70
+ />
71
+ </div>
72
+ )
73
+ }
74
+
75
+ export default WalkthroughStyled
@@ -0,0 +1,10 @@
1
+ examples:
2
+
3
+
4
+ react:
5
+ - walkthrough_default: Default
6
+ - walkthrough_continuous: Continuous
7
+ - walkthrough_no_beacon: No Beacon
8
+ - walkthrough_no_overlay: No Overlay
9
+ - walkthrough_multi_beacon: Multi Beacon
10
+ - walkthrough_styled: Styled
@@ -0,0 +1,6 @@
1
+ export { default as WalkthroughDefault } from './_walkthrough_default.jsx'
2
+ export { default as WalkthroughContinuous } from './_walkthrough_continuous.jsx'
3
+ export { default as WalkthroughNoBeacon } from './_walkthrough_no_beacon.jsx'
4
+ export { default as WalkthroughMultiBeacon } from './_walkthrough_multi_beacon.jsx'
5
+ export { default as WalkthroughNoOverlay } from './_walkthrough_no_overlay.jsx'
6
+ export { default as WalkthroughStyled } from './_walkthrough_styled.jsx'
@@ -0,0 +1,34 @@
1
+ /* eslint-disable no-unused-vars */
2
+ import { ensureAccessible, render, renderKit, screen } from '../utilities/test-utils'
3
+ import React from 'react'
4
+ import { Walkthrough } from '../'
5
+
6
+ /* See these resources for more testing info:
7
+ - https://github.com/testing-library/jest-dom#usage for useage and examples
8
+ - https://jestjs.io/docs/en/using-matchers
9
+ */
10
+
11
+ const testId = 'walkthroughKitTest',
12
+ kitClass = 'pb_walkthrough'
13
+
14
+ test('expect kit to exist', () => {
15
+ const props = {
16
+ data: { testid: testId },
17
+ }
18
+
19
+ const kit = renderKit(Walkthrough, props)
20
+ expect(kit).toBeInTheDocument()
21
+ expect(kit).toHaveClass(kitClass)
22
+ })
23
+
24
+ test('returns namespaced class name', () => {
25
+ render(
26
+ <Walkthrough
27
+ className="additional_class"
28
+ data={{ testid: testId }}
29
+ />
30
+ )
31
+
32
+ const kit = screen.getByTestId(testId)
33
+ expect(kit).toHaveClass('additional_class')
34
+ })
@@ -1,6 +1,6 @@
1
+ /* eslint-disable no-unused-vars */
1
2
  // !!! IMPORTANT: This file is autogenerated. Please do not edit.!!!
2
3
  import WebpackerReact from 'webpacker-react'
3
- import ujs from 'webpacker-react/ujs'
4
4
 
5
5
  // KIT EXAMPLES
6
6
  import 'pb_form/pb_form_validation'
@@ -94,9 +94,10 @@ import * as Toggle from 'pb_toggle/docs'
94
94
  import * as Typeahead from 'pb_typeahead/docs'
95
95
  import * as User from 'pb_user/docs'
96
96
  import * as UserBadge from 'pb_user_badge/docs'
97
+ import * as Walkthrough from 'pb_walkthrough/docs'
97
98
  import * as WeekdayStacked from 'pb_weekday_stacked/docs'
98
99
 
99
- WebpackerReact.registerComponents({
100
+ WebpackerReact.setup({
100
101
  ...Avatar,
101
102
  ...AvatarActionButton,
102
103
  ...Background,
@@ -187,9 +188,6 @@ WebpackerReact.registerComponents({
187
188
  ...Typeahead,
188
189
  ...User,
189
190
  ...UserBadge,
191
+ ...Walkthrough,
190
192
  ...WeekdayStacked,
191
193
  })
192
- ujs.setup(
193
- () => WebpackerReact.mountComponents(),
194
- () => WebpackerReact.unmountComponents()
195
- )
data/dist/reset.css CHANGED
@@ -1,2 +1,61 @@
1
- *{box-sizing:border-box;margin:0;padding:0}*:before,*:after{box-sizing:border-box}html{-webkit-tap-highlight-color:rgba(0,0,0,0);height:100vh;overflow-x:hidden}body{font-family:"Proxima Nova","Helvetica Neue",Helvetica,Arial,sans_serif;font-size:16px;line-height:1.5;background-color:#F3F7FB;height:100%;letter-spacing:0;font-weight:400;font-style:normal;text-rendering:optimizeLegibility;-moz-font-feature-settings:"liga" on;color:#242B42;margin:0 !important;padding:0 !important;box-sizing:border-box;min-height:100vh;padding:50px}a{text-decoration:none;color:#0056CF}
1
+ /* CLEAN UP AND REMOVE */
2
+ /* Headings */
3
+ /* Standard Font Weights */
4
+ /* Non_Standard Font Weights */
5
+ /*=====================================
6
+ Base colors should not be documented.
7
+ Only document color use.
8
+
9
+ Colors -----------------------------*/
10
+ /* Specialty Gradient -----------------*/
11
+ /* Interface colors -------------------*/
12
+ /* Main colors ------------------------*/
13
+ /*=====================================
14
+
15
+ Background colors ------------------*/
16
+ /* Card colors ------------------*/
17
+ /* Active colors ----------------------*/
18
+ /* Hover colors -----------------------*/
19
+ /* Focus colors -----------------------*/
20
+ /* Border colors ----------------------*/
21
+ /* Shadow colors ----------------------*/
22
+ /* Text colors ------------------------*/
23
+ /* Data colors ------------------------*/
24
+ /* Status colors ----------------------*/
25
+ /* Link colors ------------------------*/
26
+ /* Product colors ---------------------*/
27
+ /* Category colors ---------------------*/
28
+ * {
29
+ box-sizing: border-box;
30
+ margin: 0;
31
+ padding: 0; }
32
+ *:before, *:after {
33
+ box-sizing: border-box; }
34
+
35
+ html {
36
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
37
+ height: 100vh;
38
+ overflow-x: hidden; }
39
+
40
+ body {
41
+ font-family: "Proxima Nova", "Helvetica Neue", Helvetica, Arial, sans_serif;
42
+ font-size: 16px;
43
+ line-height: 1.5;
44
+ background-color: #F3F7FB;
45
+ height: 100%;
46
+ letter-spacing: 0;
47
+ font-weight: 400;
48
+ font-style: normal;
49
+ text-rendering: optimizeLegibility;
50
+ -moz-font-feature-settings: "liga" on;
51
+ color: #242B42;
52
+ margin: 0 !important;
53
+ padding: 0 !important;
54
+ box-sizing: border-box;
55
+ min-height: 100vh;
56
+ padding: 50px; }
57
+
58
+ a {
59
+ text-decoration: none;
60
+ color: #0056CF; }
2
61
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Playbook
4
- PREVIOUS_VERSION = "10.0.1"
5
- VERSION = "10.1.0"
4
+ PREVIOUS_VERSION = "10.1.0"
5
+ VERSION = "10.2.0"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playbook_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 10.1.0
4
+ version: 10.2.0
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: 2021-07-14 00:00:00.000000000 Z
12
+ date: 2021-07-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -1958,6 +1958,17 @@ files:
1958
1958
  - app/pb_kits/playbook/pb_user_badge/docs/index.js
1959
1959
  - app/pb_kits/playbook/pb_user_badge/user_badge.html.erb
1960
1960
  - app/pb_kits/playbook/pb_user_badge/user_badge.rb
1961
+ - app/pb_kits/playbook/pb_walkthrough/_walkthrough.jsx
1962
+ - app/pb_kits/playbook/pb_walkthrough/_walkthrough.scss
1963
+ - app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_continuous.jsx
1964
+ - app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_default.jsx
1965
+ - app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_multi_beacon.jsx
1966
+ - app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_no_beacon.jsx
1967
+ - app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_no_overlay.jsx
1968
+ - app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_styled.jsx
1969
+ - app/pb_kits/playbook/pb_walkthrough/docs/example.yml
1970
+ - app/pb_kits/playbook/pb_walkthrough/docs/index.js
1971
+ - app/pb_kits/playbook/pb_walkthrough/walkthrough.test.jsx
1961
1972
  - app/pb_kits/playbook/pb_weekday_stacked/_weekday_stacked.jsx
1962
1973
  - app/pb_kits/playbook/pb_weekday_stacked/_weekday_stacked.scss
1963
1974
  - app/pb_kits/playbook/pb_weekday_stacked/docs/_weekday_stacked_compact.html.erb
@@ -2069,8 +2080,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
2069
2080
  - !ruby/object:Gem::Version
2070
2081
  version: '0'
2071
2082
  requirements: []
2072
- rubyforge_project:
2073
- rubygems_version: 2.7.3
2083
+ rubygems_version: 3.1.4
2074
2084
  signing_key:
2075
2085
  specification_version: 4
2076
2086
  summary: Playbook Design System