@pareto-engineering/design-system 4.0.0-alpha.70 → 4.0.0-alpha.73

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.
Files changed (125) hide show
  1. package/dist/cjs/{c/ContentSlides/common/Slide/Slide.js → a/LexicalPreview/LexicalPreview.js} +43 -28
  2. package/dist/cjs/{c/ContentSlides/common/Sidebar → a/LexicalPreview}/index.js +3 -3
  3. package/dist/cjs/a/LexicalPreview/styles.scss +46 -0
  4. package/dist/cjs/a/People/common/Person/Person.js +7 -2
  5. package/dist/cjs/a/ProgressBar/ProgressBar.js +3 -2
  6. package/dist/cjs/a/ProgressBar/styles.scss +11 -1
  7. package/dist/cjs/a/XMLEditor/XMLEditor.js +14 -6
  8. package/dist/cjs/a/index.js +8 -1
  9. package/dist/cjs/b/ExpandableLexicalPreview/ExpandableLexicalPreview.js +125 -0
  10. package/dist/cjs/b/ExpandableLexicalPreview/common/ExpandButton/ExpandButton.js +112 -0
  11. package/dist/cjs/{c/ContentSlides/common/Navigator → b/ExpandableLexicalPreview/common/ExpandButton}/index.js +3 -3
  12. package/dist/cjs/b/ExpandableLexicalPreview/common/index.js +12 -0
  13. package/dist/cjs/b/ExpandableLexicalPreview/index.js +13 -0
  14. package/dist/cjs/b/ExpandableLexicalPreview/styles.scss +84 -0
  15. package/dist/cjs/b/index.js +8 -1
  16. package/dist/cjs/c/index.js +0 -13
  17. package/dist/cjs/f/fields/EditorInput/EditorInput.js +14 -3
  18. package/dist/cjs/f/fields/EditorInput/common/StopPropagationPlugin.js +30 -0
  19. package/dist/cjs/f/fields/EditorInput/common/index.js +7 -0
  20. package/dist/cjs/index.js +0 -11
  21. package/dist/es/a/LexicalPreview/LexicalPreview.js +80 -0
  22. package/dist/es/a/LexicalPreview/index.js +2 -0
  23. package/dist/es/a/LexicalPreview/styles.scss +46 -0
  24. package/dist/es/a/People/common/Person/Person.js +22 -15
  25. package/dist/es/a/ProgressBar/ProgressBar.js +3 -2
  26. package/dist/es/a/ProgressBar/styles.scss +11 -1
  27. package/dist/es/a/XMLEditor/XMLEditor.js +16 -10
  28. package/dist/es/a/index.js +2 -1
  29. package/dist/es/b/ExpandableLexicalPreview/ExpandableLexicalPreview.js +115 -0
  30. package/dist/es/b/ExpandableLexicalPreview/common/ExpandButton/ExpandButton.js +102 -0
  31. package/dist/es/b/ExpandableLexicalPreview/common/ExpandButton/index.js +1 -0
  32. package/dist/es/b/ExpandableLexicalPreview/common/index.js +1 -0
  33. package/dist/es/b/ExpandableLexicalPreview/index.js +2 -0
  34. package/dist/es/b/ExpandableLexicalPreview/styles.scss +84 -0
  35. package/dist/es/b/index.js +2 -1
  36. package/dist/es/c/index.js +0 -1
  37. package/dist/es/f/fields/EditorInput/EditorInput.js +15 -4
  38. package/dist/es/f/fields/EditorInput/common/StopPropagationPlugin.js +23 -0
  39. package/dist/es/f/fields/EditorInput/common/index.js +2 -1
  40. package/dist/es/index.js +0 -1
  41. package/package.json +5 -5
  42. package/src/stories/a/LexicalPreview.stories.jsx +28 -0
  43. package/src/stories/a/ProgressBar.stories.jsx +1 -1
  44. package/src/stories/b/ExpandableLexicalPreview.stories.jsx +29 -0
  45. package/src/stories/colors.js +4 -0
  46. package/src/ui/a/LexicalPreview/LexicalPreview.jsx +109 -0
  47. package/src/ui/a/LexicalPreview/index.js +2 -0
  48. package/src/ui/a/LexicalPreview/styles.scss +46 -0
  49. package/src/ui/a/People/common/Person/Person.jsx +31 -19
  50. package/src/ui/a/ProgressBar/ProgressBar.jsx +2 -0
  51. package/src/ui/a/ProgressBar/styles.scss +11 -1
  52. package/src/ui/a/XMLEditor/XMLEditor.jsx +16 -5
  53. package/src/ui/a/index.js +1 -0
  54. package/src/ui/b/ExpandableLexicalPreview/ExpandableLexicalPreview.jsx +157 -0
  55. package/src/ui/b/ExpandableLexicalPreview/common/ExpandButton/ExpandButton.jsx +123 -0
  56. package/src/ui/b/ExpandableLexicalPreview/common/ExpandButton/index.js +1 -0
  57. package/src/ui/b/ExpandableLexicalPreview/common/index.js +1 -0
  58. package/src/ui/b/ExpandableLexicalPreview/index.js +2 -0
  59. package/src/ui/b/ExpandableLexicalPreview/styles.scss +84 -0
  60. package/src/ui/b/index.js +1 -0
  61. package/src/ui/c/index.js +0 -1
  62. package/src/ui/f/fields/EditorInput/EditorInput.jsx +16 -2
  63. package/src/ui/f/fields/EditorInput/common/StopPropagationPlugin.jsx +29 -0
  64. package/src/ui/f/fields/EditorInput/common/index.jsx +1 -0
  65. package/src/ui/index.js +0 -1
  66. package/tests/__snapshots__/Storyshots.test.js.snap +1249 -641
  67. package/dist/cjs/c/ContentSlides/ContentSlides.js +0 -172
  68. package/dist/cjs/c/ContentSlides/Context.js +0 -10
  69. package/dist/cjs/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +0 -126
  70. package/dist/cjs/c/ContentSlides/common/HorizontalMenu/index.js +0 -13
  71. package/dist/cjs/c/ContentSlides/common/Navigator/Navigator.js +0 -128
  72. package/dist/cjs/c/ContentSlides/common/Sidebar/Sidebar.js +0 -94
  73. package/dist/cjs/c/ContentSlides/common/Slide/index.js +0 -13
  74. package/dist/cjs/c/ContentSlides/common/index.js +0 -33
  75. package/dist/cjs/c/ContentSlides/index.js +0 -27
  76. package/dist/cjs/c/ContentSlides/styles.scss +0 -312
  77. package/dist/cjs/c/ContentSlides/useContentSlides.js +0 -11
  78. package/dist/cjs/r/SwitchRouteMap/SwitchRouteMap.js +0 -58
  79. package/dist/cjs/r/SwitchRouteMap/index.js +0 -13
  80. package/dist/cjs/r/common/PrivateRoute/PrivateRoute.js +0 -74
  81. package/dist/cjs/r/common/PrivateRoute/index.js +0 -13
  82. package/dist/cjs/r/common/index.js +0 -12
  83. package/dist/cjs/r/index.js +0 -27
  84. package/dist/es/c/ContentSlides/ContentSlides.js +0 -160
  85. package/dist/es/c/ContentSlides/Context.js +0 -2
  86. package/dist/es/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +0 -116
  87. package/dist/es/c/ContentSlides/common/HorizontalMenu/index.js +0 -2
  88. package/dist/es/c/ContentSlides/common/Navigator/Navigator.js +0 -118
  89. package/dist/es/c/ContentSlides/common/Navigator/index.js +0 -2
  90. package/dist/es/c/ContentSlides/common/Sidebar/Sidebar.js +0 -84
  91. package/dist/es/c/ContentSlides/common/Sidebar/index.js +0 -2
  92. package/dist/es/c/ContentSlides/common/Slide/Slide.js +0 -65
  93. package/dist/es/c/ContentSlides/common/Slide/index.js +0 -2
  94. package/dist/es/c/ContentSlides/common/index.js +0 -4
  95. package/dist/es/c/ContentSlides/index.js +0 -4
  96. package/dist/es/c/ContentSlides/styles.scss +0 -312
  97. package/dist/es/c/ContentSlides/useContentSlides.js +0 -3
  98. package/dist/es/r/SwitchRouteMap/SwitchRouteMap.js +0 -45
  99. package/dist/es/r/SwitchRouteMap/index.js +0 -2
  100. package/dist/es/r/common/PrivateRoute/PrivateRoute.js +0 -66
  101. package/dist/es/r/common/PrivateRoute/index.js +0 -2
  102. package/dist/es/r/common/index.js +0 -1
  103. package/dist/es/r/index.js +0 -2
  104. package/src/stories/c/ContentSlides.stories.jsx +0 -214
  105. package/src/ui/c/ContentSlides/ContentSlides.jsx +0 -214
  106. package/src/ui/c/ContentSlides/Context.js +0 -3
  107. package/src/ui/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.jsx +0 -145
  108. package/src/ui/c/ContentSlides/common/HorizontalMenu/index.js +0 -2
  109. package/src/ui/c/ContentSlides/common/Navigator/Navigator.jsx +0 -150
  110. package/src/ui/c/ContentSlides/common/Navigator/index.js +0 -2
  111. package/src/ui/c/ContentSlides/common/Sidebar/Sidebar.jsx +0 -135
  112. package/src/ui/c/ContentSlides/common/Sidebar/index.js +0 -2
  113. package/src/ui/c/ContentSlides/common/Slide/Slide.jsx +0 -87
  114. package/src/ui/c/ContentSlides/common/Slide/index.js +0 -2
  115. package/src/ui/c/ContentSlides/common/index.js +0 -4
  116. package/src/ui/c/ContentSlides/index.js +0 -4
  117. package/src/ui/c/ContentSlides/styles.scss +0 -312
  118. package/src/ui/c/ContentSlides/useContentSlides.js +0 -4
  119. package/src/ui/r/SwitchRouteMap/SwitchRouteMap.jsx +0 -64
  120. package/src/ui/r/SwitchRouteMap/index.js +0 -2
  121. package/src/ui/r/common/PrivateRoute/PrivateRoute.jsx +0 -73
  122. package/src/ui/r/common/PrivateRoute/index.js +0 -2
  123. package/src/ui/r/common/index.js +0 -1
  124. package/src/ui/r/index.js +0 -2
  125. /package/src/stories/a/{CodeEditor.stories.jsx → XMLEditor.stories.jsx} +0 -0
@@ -1,312 +0,0 @@
1
- /* @pareto-engineering/generator-front 1.0.12 */
2
- /* stylelint-disable selector-max-compound-selectors -- Required here */
3
- /* stylelint-disable max-nesting-depth -- Required here */
4
-
5
- @use "@pareto-engineering/bem";
6
- @use "@pareto-engineering/styles/src/mixins";
7
- @use "@pareto-engineering/styles/src/globals" as *;
8
-
9
- $class-sidebar:sidebar;
10
- $class-horizontal-menu:horizontal-menu;
11
- $class-slide:slide;
12
- $class-navigator:navigator;
13
-
14
- //$class-main-container:main;
15
-
16
- $default-sidebar-width:minmax(250px, 330px);
17
- $default-border:none;//2px solid var(--grid);
18
- $default-border-radius:var(--theme-border-radius);
19
- $default-content-background: var(--background-far);
20
- $default-padding:var(--theme-default-padding);
21
-
22
- $mobile-content-margin:6em;
23
-
24
- .#{bem.$base}.content-slides {
25
- height: 100%;
26
-
27
- .#{$class-sidebar} {
28
- background: $default-content-background;
29
- border-right: $default-border;
30
- display: flex;
31
- flex-direction: column;
32
- height: 100%;
33
- justify-content: space-between;
34
- overflow: auto;
35
-
36
- header,
37
- .#{bem.$element-content},
38
- footer {
39
- padding: $default-padding;
40
- }
41
-
42
- header {
43
- border-bottom: $default-border;
44
- }
45
-
46
- footer {
47
- border-top: $default-border;
48
- }
49
-
50
- .#{bem.$element-content} {
51
- .icon-list {
52
- .#{bem.$element-item} {
53
- &:not(:last-child) {
54
- margin-bottom: 1em;
55
- }
56
- }
57
- }
58
- }
59
- }
60
-
61
-
62
- //.#{$class-main-container} {
63
- main {
64
- overflow: hidden;
65
- position: relative;
66
-
67
- .#{$class-slide} {
68
- height: 100%;
69
- left: 0;
70
- position: absolute;
71
- right: 0;
72
- top: 0;
73
- transition: opacity .3s;
74
-
75
- .wrapper {
76
- padding: var(--u);
77
-
78
- .#{bem.$element-content} {
79
- background: $default-content-background;
80
-
81
- border: var(--theme-border);
82
- border-radius: $default-border-radius;
83
- max-width: 600px;
84
- padding: $default-padding;
85
- position: relative;
86
- width: 90%;
87
- //z-index: 1;
88
-
89
- .#{$class-navigator} {
90
- display: flex;
91
- margin-top: $default-padding;
92
- }
93
- }
94
- }
95
-
96
-
97
- &:not(.#{bem.$modifier-active}) {
98
- opacity: .5;
99
- z-index: -1;
100
- }
101
-
102
- &.#{bem.$modifier-active} {
103
- opacity: 1;
104
- }
105
- }
106
- }
107
-
108
- .#{$class-horizontal-menu} {
109
- background: $default-content-background;
110
- border-bottom: var(--theme-border);
111
- color: var(--heading);
112
- z-index: 1;
113
-
114
- .#{bem.$element-content} {
115
- display: grid;
116
- grid-template-columns: 1fr [title] 6fr 1fr;
117
- padding: $default-padding;
118
-
119
- .title {
120
- grid-column: title/span 1;
121
- text-align: center;
122
- //font-weight:600;
123
- }
124
-
125
- .left {
126
- text-align: left;
127
-
128
- .prev-button {
129
- font-family: var(--theme-default-paragraph);
130
- font-size: calc(var(--s2) * 1em);
131
- }
132
- }
133
-
134
- .right {
135
- text-align: right;
136
- }
137
- }
138
- //
139
- }
140
-
141
- @include mixins.media($to:$sm-md) {
142
- display: flex;
143
- flex-direction: column;
144
-
145
- .#{$class-sidebar} {
146
- display: none;
147
- }
148
-
149
- //.#{$class-main-container} {
150
-
151
- main {
152
- flex-grow: 1;
153
-
154
- .#{$class-slide} {
155
- display: flex;
156
- flex-direction: column;
157
- justify-content: safe center;
158
- overflow: auto;
159
-
160
- /*
161
- > img {
162
- height: 100%;
163
- object-fit: cover;
164
- position: absolute;
165
- top: 0;
166
- transition: opacity .3s;
167
- width: 100%;
168
- } */
169
-
170
- /* stylelint-disable scss/media-feature-value-dollar-variable -- For orientation mq */
171
- .wrapper {
172
- display: flex;
173
- flex-direction: column;
174
- height: 100%;
175
- //justify-content: safe center;
176
- overflow: auto;
177
-
178
- -ms-overflow-style: none;
179
- padding-bottom: 0;
180
- padding-top: 0;
181
- //padding-bottom: $mobile-content-margin;
182
- //padding-top: $mobile-content-margin;
183
- scrollbar-width: none;
184
-
185
- &::-webkit-scrollbar {
186
- display: none;
187
- }
188
-
189
- &::after,
190
- &::before {
191
- //background: red;
192
- content: " ";
193
- flex-grow: 1;
194
- white-space: pre;
195
- //z-index: 20;
196
- @media (orientation: portrait) {
197
- min-height: calc(#{$mobile-content-margin} + var(--u));
198
- }
199
- }
200
- @media (orientation: landscape) {
201
- &::before {
202
- min-height: var(--u);
203
- }
204
- }
205
-
206
- .#{bem.$element-content} {
207
- margin: 0 auto;
208
-
209
- .#{$class-navigator} {
210
- .prev {
211
- display: none;
212
- }
213
-
214
- .next {
215
- flex-grow: 1;
216
- justify-content: flex-end;
217
- }
218
- }
219
- }
220
- }
221
- /* stylelint-enable */
222
-
223
- /*
224
- &:not(.#{bem.$modifier-active}) {
225
- }
226
-
227
- &.#{bem.$modifier-active} {
228
- } */
229
- }
230
- }
231
- }
232
-
233
- @include mixins.media($from:$sm-md) {
234
- display: grid;
235
- grid-template-columns: $default-sidebar-width 1fr;
236
-
237
- .#{$class-horizontal-menu} {
238
- display: none;
239
- }
240
-
241
- &.simple {
242
- grid-template-columns: 1fr;
243
- grid-template-rows: auto 1fr;
244
-
245
- .#{$class-horizontal-menu} {
246
- display: block;
247
-
248
- .#{bem.$element-content} {
249
- padding: .5em;
250
- }
251
-
252
- .left,
253
- .right {
254
- display: none;
255
- }
256
- }
257
- }
258
-
259
-
260
-
261
- main {
262
- .#{$class-slide} {
263
- //display: flex;
264
- //flex-direction: column;
265
- overflow: auto;
266
- -ms-overflow-style: none;
267
- scrollbar-width: none;
268
-
269
- &::-webkit-scrollbar {
270
- background: transparent; /* Optional: just make scrollbar invisible */
271
- width: 0; /* Remove scrollbar space */
272
- }
273
-
274
- /*
275
- > img {
276
- height: 100%;
277
- object-fit: cover;
278
- position: absolute;
279
- top: 0;
280
- transition: opacity .3s;
281
- width: 100%;
282
- } */
283
-
284
- .wrapper {
285
- display: flex;
286
- //flex-direction: column;
287
- height: 100%;
288
- justify-content: center;
289
- //overflow: auto;
290
- .#{bem.$element-content} {
291
- height: min-content;
292
- margin: auto 0;
293
-
294
- .#{$class-navigator} {
295
- justify-content: space-between;
296
- }
297
- }
298
- }
299
-
300
-
301
- /*
302
- &:not(.#{bem.$modifier-active}) {
303
- }
304
-
305
- &.#{bem.$modifier-active} {
306
- } */
307
- }
308
- }
309
- }
310
- }
311
-
312
-
@@ -1,3 +0,0 @@
1
- import { useContext } from 'react';
2
- import Context from "./Context";
3
- export default (() => useContext(Context));
@@ -1,45 +0,0 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
- /* @pareto-engineering/generator-front 0.2.2 */
3
- import * as React from 'react';
4
- import PropTypes from 'prop-types';
5
- import { Switch, Route } from 'react-router-dom';
6
- import { PrivateRoute } from "../common";
7
-
8
- /* eslint-disable react/no-children-prop */
9
- /**
10
- * **Dependencies : `react-router-dom.Router`,**
11
- * **`SessionContextProvider` in case you're using PrivateRoutes. **
12
- * `SwitchRouteMap` generates a routing `Switch` from an array of route Props
13
- */
14
- const SwitchRouteMap = ({
15
- routes,
16
- NotFound
17
- }) => /*#__PURE__*/React.createElement(Switch, {
18
- children: [...routes.map(({
19
- isPrivate,
20
- ...routeProps
21
- }) => isPrivate ? /*#__PURE__*/React.createElement(PrivateRoute, _extends({
22
- key: routeProps.path
23
- }, routeProps)) : /*#__PURE__*/React.createElement(Route, _extends({
24
- key: routeProps.path
25
- }, routeProps))), ...(NotFound ? [/*#__PURE__*/React.createElement(Route, {
26
- component: NotFound
27
- })] : [])]
28
- });
29
- SwitchRouteMap.propTypes = {
30
- /**
31
- * The routes to render
32
- */
33
- routes: PropTypes.arrayOf(PropTypes.shape({
34
- path: PropTypes.string.isRequired
35
- // title:PropTypes.string.isRequired,
36
- // state:PropTypes.string.isRequired,
37
- })).isRequired,
38
- /**
39
- * A component to display in case no route was found.
40
- * In case you're doing SSR, you might want to use
41
- * a component that returns a 404 code.
42
- */
43
- NotFound: PropTypes.node
44
- };
45
- export default SwitchRouteMap;
@@ -1,2 +0,0 @@
1
- /* @pareto-engineering/generator-front 0.2.2 */
2
- export { default as SwitchRouteMap } from "./SwitchRouteMap";
@@ -1,66 +0,0 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
- /* @pareto-engineering/generator-front 0.2.1 */
3
- import * as React from 'react';
4
- import { useContext } from 'react';
5
- import PropTypes from 'prop-types';
6
- import { Route, Redirect, useLocation } from 'react-router-dom';
7
-
8
- // import { SessionContext } from '..'
9
- const SessionContext = /*#__PURE__*/React.createContext({});
10
-
11
- // Package-level Imports
12
- // import styleNames from 'style_names.scss'
13
-
14
- // Component-level imports
15
-
16
- /**
17
- * **Dependencies : `SessionContext.loginPath` **
18
- * `PrivateRoute` subclasses `react-router-dom` `Route`.
19
- * `PrivateRoute` checks whether a user matches a specified test before allowing him to the resource
20
- * In case the user is not allowed, he is redirected to `SessionContext.loginPath`.
21
- * Please remember this is a front-end test, and is not equivalent to back-end permission checks.
22
- * This component is meant to be used alongside back-end checks.
23
- */
24
- const PrivateRoute = ({
25
- component: Component,
26
- render,
27
- test,
28
- ...rest
29
- }) => {
30
- const {
31
- currentUserData: currentUser,
32
- loginPath
33
- } = useContext(SessionContext);
34
- const location = useLocation();
35
- // console.log(me)
36
-
37
- const isUserAllowed = currentUser && test(currentUser);
38
- return /*#__PURE__*/React.createElement(Route, _extends({}, rest, {
39
- render: props => isUserAllowed ? render?.(props) || /*#__PURE__*/React.createElement(Component, props) : /*#__PURE__*/React.createElement(Redirect, {
40
- to: {
41
- pathname: loginPath,
42
- state: {
43
- from: location
44
- } // TODO to implement
45
- }
46
- })
47
- }));
48
- };
49
- PrivateRoute.propTypes = {
50
- /**
51
- * A function that takes the user and returns a boolean.
52
- */
53
- test: PropTypes.func,
54
- /**
55
- * Provide a custom rendering function in the "Render Props" pattern
56
- */
57
- render: PropTypes.func,
58
- /**
59
- * Which javascript component to render
60
- */
61
- component: PropTypes.node
62
- };
63
- PrivateRoute.defaultProps = {
64
- test: user => user.id
65
- };
66
- export default PrivateRoute;
@@ -1,2 +0,0 @@
1
- /* @pareto-engineering/generator-front 0.2.1 */
2
- export { default as PrivateRoute } from "./PrivateRoute";
@@ -1 +0,0 @@
1
- export { PrivateRoute } from "./PrivateRoute";
@@ -1,2 +0,0 @@
1
- export * from "./common";
2
- export { SwitchRouteMap } from "./SwitchRouteMap";
@@ -1,214 +0,0 @@
1
- /* @pareto-engineering/generator-front 1.0.12 */
2
- import * as React from 'react'
3
-
4
- import {
5
- ContentSlides,
6
- AppContextProvider,
7
- useContentSlides,
8
- Title,
9
- Logo,
10
- useApp,
11
- } from 'ui'
12
-
13
- // import Router from 'stories/utils/Router'
14
- import Router from '../utils/Router'
15
-
16
- export default {
17
- title :'c/ContentSlides',
18
- component :ContentSlides,
19
- subcomponents:{
20
- 'ContentSlides.Sidebar' :ContentSlides.Sidebar,
21
- 'ContentSlides.HorizontalMenu':ContentSlides.HorizontalMenu,
22
- 'ContentSlides.Slide' :ContentSlides.Slide,
23
- 'ContentSlides.Navigator' :ContentSlides.Navigator,
24
- },
25
- decorators:[
26
- (storyfn) => <Router>{ storyfn() }</Router>,
27
- (storyfn) => (
28
- <AppContextProvider config={{
29
- APP:{
30
- NAME :'name of my site',
31
- CANONICAL:'https://mysite.com',
32
- },
33
- }}
34
- >
35
- { storyfn() }
36
- </AppContextProvider>
37
- ),
38
- ],
39
- argTypes:{
40
- isSimple:{ control: 'boolean' },
41
- },
42
- }
43
-
44
- const Template = (args) => {
45
- const Main = () => {
46
- const { isSimple } = args || {}
47
- const { userTheme } = useApp()
48
- const { isLastStep } = useContentSlides()
49
-
50
- const steps = [
51
- {
52
- id :'welcome',
53
- title :'Welcome',
54
- progress:40,
55
- location:'welcome',
56
- },
57
- {
58
- id :'plan',
59
- title :'Choose your plan',
60
- progress:60,
61
- location:'select-plan',
62
- },
63
- {
64
- id :'details',
65
- title :'Personal details',
66
- progress:70,
67
- location:'personal-details',
68
- },
69
- {
70
- id :'payment',
71
- title :'Payment',
72
- progress:90,
73
- location:'payment',
74
- },
75
- ]
76
-
77
- return (
78
- <div className={`ui-${userTheme}`} style={{ height: '100%' }}>
79
- <ContentSlides className="y-background-far b-dark-y" steps={steps} simple={isSimple}>
80
- {!isSimple && (
81
- <ContentSlides.Sidebar
82
- header={(
83
- <Logo color="paragraph" />
84
- )}
85
- />
86
- )}
87
- <ContentSlides.HorizontalMenu hideBackIcon={isLastStep} />
88
- <main>
89
- <ContentSlides.Slide
90
- index={0}
91
- >
92
- <Title
93
- heading="Welcome"
94
- headingAs="h1"
95
- subtitle="Welcome to this site. We hope you will have an amazing experience here."
96
- headingClassName="small"
97
- />
98
- <ContentSlides.Navigator />
99
- </ContentSlides.Slide
100
- >
101
- <ContentSlides.Slide
102
- index={1}
103
- >
104
- <Title
105
- heading="Part 2"
106
- headingAs="h1"
107
- subtitle="Welcome to this site. We hope you will have an amazing experience here."
108
- headingClassName="small"
109
- />
110
- <p>
111
- In ut sollicitudin elit. Maecenas tempor ex aliquet enim egestas,
112
- non sollicitudin mi tempor. Pellentesque fermentum, massa in cursus faucibus,
113
- enim tortor fringilla ligula, sit amet tincidunt neque orci et tellus.
114
- Nam dignissim tristique justo. Cras nulla sem, dictum pellentesque libero eget,
115
- porta placerat leo.
116
- </p>
117
- <p>
118
- Donec scelerisque enim risus, in pharetra purus fringilla eu.
119
- Cras placerat ac enim viverra rhoncus.
120
- Cras sagittis euismod orci eget aliquam. Nulla et mi non enim aliquam consequat.
121
- Cras volutpat porta convallis. Mauris ullamcorper vitae sapien ac rhoncus.
122
- Nullam vel porttitor mi, ut vestibulum arcu.
123
- enim tortor fringilla ligula, sit amet tincidunt neque orci et tellus.
124
- Nam dignissim tristique justo. Cras nulla sem, dictum pellentesque libero eget,
125
- porta placerat leo.
126
- </p>
127
- <p>
128
- Donec scelerisque enim risus, in pharetra purus fringilla eu.
129
- Cras placerat ac enim viverra rhoncus.
130
- Cras sagittis euismod orci eget aliquam. Nulla et mi non enim aliquam consequat.
131
- Cras volutpat porta convallis. Mauris ullamcorper vitae sapien ac rhoncus.
132
- Nullam vel porttitor mi, ut vestibulum arcu.
133
- enim tortor fringilla ligula, sit amet tincidunt neque orci et tellus.
134
- Nam dignissim tristique justo. Cras nulla sem, dictum pellentesque libero eget,
135
- porta placerat leo.
136
- Donec scelerisque enim risus, in pharetra purus fringilla eu.
137
- Cras placerat ac enim viverra rhoncus.
138
- Cras sagittis euismod orci eget aliquam. Nulla et mi non enim aliquam consequat.
139
- Cras volutpat porta convallis. Mauris ullamcorper vitae sapien ac rhoncus.
140
- Nullam vel porttitor mi, ut vestibulum arcu.
141
- {' '}
142
- </p>
143
- <p>
144
- Donec scelerisque enim risus, in pharetra purus fringilla eu.
145
- Cras placerat ac enim viverra rhoncus.
146
- Cras sagittis euismod orci eget aliquam. Nulla et mi non enim aliquam consequat.
147
- Cras volutpat porta convallis. Mauris ullamcorper vitae sapien ac rhoncus.
148
- Nullam vel porttitor mi, ut vestibulum arcu.
149
- enim tortor fringilla ligula, sit amet tincidunt neque orci et tellus.
150
- Nam dignissim tristique justo. Cras nulla sem, dictum pellentesque libero eget,
151
- porta placerat leo.
152
- Donec scelerisque enim risus, in pharetra purus fringilla eu.
153
- Cras placerat ac enim viverra rhoncus.
154
- Cras sagittis euismod orci eget aliquam. Nulla et mi non enim aliquam consequat.
155
- Cras volutpat porta convallis. Mauris ullamcorper vitae sapien ac rhoncus.
156
- Nullam vel porttitor mi, ut vestibulum arcu.
157
- {' '}
158
- </p>
159
- <p>
160
- Donec scelerisque enim risus, in pharetra purus fringilla eu.
161
- Cras placerat ac enim viverra rhoncus.
162
- Cras sagittis euismod orci eget aliquam. Nulla et mi non enim aliquam consequat.
163
- Cras volutpat porta convallis. Mauris ullamcorper vitae sapien ac rhoncus.
164
- Nullam vel porttitor mi, ut vestibulum arcu.
165
- enim tortor fringilla ligula, sit amet tincidunt neque orci et tellus.
166
- Nam dignissim tristique justo. Cras nulla sem, dictum pellentesque libero eget,
167
- porta placerat leo.
168
- Donec scelerisque enim risus, in pharetra purus fringilla eu.
169
- Cras placerat ac enim viverra rhoncus.
170
- Cras sagittis euismod orci eget aliquam. Nulla et mi non enim aliquam consequat.
171
- Cras volutpat porta convallis. Mauris ullamcorper vitae sapien ac rhoncus.
172
- Nullam vel porttitor mi, ut vestibulum arcu.
173
- {' '}
174
- </p>
175
-
176
- <ContentSlides.Navigator />
177
- </ContentSlides.Slide>
178
- <ContentSlides.Slide
179
- index={2}
180
- >
181
- <Title
182
- heading="Part 3"
183
- headingAs="h1"
184
- headingClassName="small"
185
- subtitle="Welcome to this site. We hope you will have an amazing experience here."
186
- />
187
- <ContentSlides.Navigator />
188
- </ContentSlides.Slide>
189
- <ContentSlides.Slide
190
- index={3}
191
- >
192
- <Title
193
- heading="Part 4"
194
- headingAs="h1"
195
- subtitle="Welcome to this site. We hope you will have an amazing experience here."
196
- />
197
- <ContentSlides.Navigator />
198
- </ContentSlides.Slide>
199
- </main>
200
- </ContentSlides>
201
- </div>
202
- )
203
- }
204
- return (
205
- <Main />
206
- )
207
- }
208
-
209
- export const Base = Template.bind({})
210
-
211
- export const Simple = Template.bind({})
212
- Simple.args = {
213
- isSimple:true,
214
- }