@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.
- package/dist/cjs/{c/ContentSlides/common/Slide/Slide.js → a/LexicalPreview/LexicalPreview.js} +43 -28
- package/dist/cjs/{c/ContentSlides/common/Sidebar → a/LexicalPreview}/index.js +3 -3
- package/dist/cjs/a/LexicalPreview/styles.scss +46 -0
- package/dist/cjs/a/People/common/Person/Person.js +7 -2
- package/dist/cjs/a/ProgressBar/ProgressBar.js +3 -2
- package/dist/cjs/a/ProgressBar/styles.scss +11 -1
- package/dist/cjs/a/XMLEditor/XMLEditor.js +14 -6
- package/dist/cjs/a/index.js +8 -1
- package/dist/cjs/b/ExpandableLexicalPreview/ExpandableLexicalPreview.js +125 -0
- package/dist/cjs/b/ExpandableLexicalPreview/common/ExpandButton/ExpandButton.js +112 -0
- package/dist/cjs/{c/ContentSlides/common/Navigator → b/ExpandableLexicalPreview/common/ExpandButton}/index.js +3 -3
- package/dist/cjs/b/ExpandableLexicalPreview/common/index.js +12 -0
- package/dist/cjs/b/ExpandableLexicalPreview/index.js +13 -0
- package/dist/cjs/b/ExpandableLexicalPreview/styles.scss +84 -0
- package/dist/cjs/b/index.js +8 -1
- package/dist/cjs/c/index.js +0 -13
- package/dist/cjs/f/fields/EditorInput/EditorInput.js +14 -3
- package/dist/cjs/f/fields/EditorInput/common/StopPropagationPlugin.js +30 -0
- package/dist/cjs/f/fields/EditorInput/common/index.js +7 -0
- package/dist/cjs/index.js +0 -11
- package/dist/es/a/LexicalPreview/LexicalPreview.js +80 -0
- package/dist/es/a/LexicalPreview/index.js +2 -0
- package/dist/es/a/LexicalPreview/styles.scss +46 -0
- package/dist/es/a/People/common/Person/Person.js +22 -15
- package/dist/es/a/ProgressBar/ProgressBar.js +3 -2
- package/dist/es/a/ProgressBar/styles.scss +11 -1
- package/dist/es/a/XMLEditor/XMLEditor.js +16 -10
- package/dist/es/a/index.js +2 -1
- package/dist/es/b/ExpandableLexicalPreview/ExpandableLexicalPreview.js +115 -0
- package/dist/es/b/ExpandableLexicalPreview/common/ExpandButton/ExpandButton.js +102 -0
- package/dist/es/b/ExpandableLexicalPreview/common/ExpandButton/index.js +1 -0
- package/dist/es/b/ExpandableLexicalPreview/common/index.js +1 -0
- package/dist/es/b/ExpandableLexicalPreview/index.js +2 -0
- package/dist/es/b/ExpandableLexicalPreview/styles.scss +84 -0
- package/dist/es/b/index.js +2 -1
- package/dist/es/c/index.js +0 -1
- package/dist/es/f/fields/EditorInput/EditorInput.js +15 -4
- package/dist/es/f/fields/EditorInput/common/StopPropagationPlugin.js +23 -0
- package/dist/es/f/fields/EditorInput/common/index.js +2 -1
- package/dist/es/index.js +0 -1
- package/package.json +5 -5
- package/src/stories/a/LexicalPreview.stories.jsx +28 -0
- package/src/stories/a/ProgressBar.stories.jsx +1 -1
- package/src/stories/b/ExpandableLexicalPreview.stories.jsx +29 -0
- package/src/stories/colors.js +4 -0
- package/src/ui/a/LexicalPreview/LexicalPreview.jsx +109 -0
- package/src/ui/a/LexicalPreview/index.js +2 -0
- package/src/ui/a/LexicalPreview/styles.scss +46 -0
- package/src/ui/a/People/common/Person/Person.jsx +31 -19
- package/src/ui/a/ProgressBar/ProgressBar.jsx +2 -0
- package/src/ui/a/ProgressBar/styles.scss +11 -1
- package/src/ui/a/XMLEditor/XMLEditor.jsx +16 -5
- package/src/ui/a/index.js +1 -0
- package/src/ui/b/ExpandableLexicalPreview/ExpandableLexicalPreview.jsx +157 -0
- package/src/ui/b/ExpandableLexicalPreview/common/ExpandButton/ExpandButton.jsx +123 -0
- package/src/ui/b/ExpandableLexicalPreview/common/ExpandButton/index.js +1 -0
- package/src/ui/b/ExpandableLexicalPreview/common/index.js +1 -0
- package/src/ui/b/ExpandableLexicalPreview/index.js +2 -0
- package/src/ui/b/ExpandableLexicalPreview/styles.scss +84 -0
- package/src/ui/b/index.js +1 -0
- package/src/ui/c/index.js +0 -1
- package/src/ui/f/fields/EditorInput/EditorInput.jsx +16 -2
- package/src/ui/f/fields/EditorInput/common/StopPropagationPlugin.jsx +29 -0
- package/src/ui/f/fields/EditorInput/common/index.jsx +1 -0
- package/src/ui/index.js +0 -1
- package/tests/__snapshots__/Storyshots.test.js.snap +1249 -641
- package/dist/cjs/c/ContentSlides/ContentSlides.js +0 -172
- package/dist/cjs/c/ContentSlides/Context.js +0 -10
- package/dist/cjs/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +0 -126
- package/dist/cjs/c/ContentSlides/common/HorizontalMenu/index.js +0 -13
- package/dist/cjs/c/ContentSlides/common/Navigator/Navigator.js +0 -128
- package/dist/cjs/c/ContentSlides/common/Sidebar/Sidebar.js +0 -94
- package/dist/cjs/c/ContentSlides/common/Slide/index.js +0 -13
- package/dist/cjs/c/ContentSlides/common/index.js +0 -33
- package/dist/cjs/c/ContentSlides/index.js +0 -27
- package/dist/cjs/c/ContentSlides/styles.scss +0 -312
- package/dist/cjs/c/ContentSlides/useContentSlides.js +0 -11
- package/dist/cjs/r/SwitchRouteMap/SwitchRouteMap.js +0 -58
- package/dist/cjs/r/SwitchRouteMap/index.js +0 -13
- package/dist/cjs/r/common/PrivateRoute/PrivateRoute.js +0 -74
- package/dist/cjs/r/common/PrivateRoute/index.js +0 -13
- package/dist/cjs/r/common/index.js +0 -12
- package/dist/cjs/r/index.js +0 -27
- package/dist/es/c/ContentSlides/ContentSlides.js +0 -160
- package/dist/es/c/ContentSlides/Context.js +0 -2
- package/dist/es/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +0 -116
- package/dist/es/c/ContentSlides/common/HorizontalMenu/index.js +0 -2
- package/dist/es/c/ContentSlides/common/Navigator/Navigator.js +0 -118
- package/dist/es/c/ContentSlides/common/Navigator/index.js +0 -2
- package/dist/es/c/ContentSlides/common/Sidebar/Sidebar.js +0 -84
- package/dist/es/c/ContentSlides/common/Sidebar/index.js +0 -2
- package/dist/es/c/ContentSlides/common/Slide/Slide.js +0 -65
- package/dist/es/c/ContentSlides/common/Slide/index.js +0 -2
- package/dist/es/c/ContentSlides/common/index.js +0 -4
- package/dist/es/c/ContentSlides/index.js +0 -4
- package/dist/es/c/ContentSlides/styles.scss +0 -312
- package/dist/es/c/ContentSlides/useContentSlides.js +0 -3
- package/dist/es/r/SwitchRouteMap/SwitchRouteMap.js +0 -45
- package/dist/es/r/SwitchRouteMap/index.js +0 -2
- package/dist/es/r/common/PrivateRoute/PrivateRoute.js +0 -66
- package/dist/es/r/common/PrivateRoute/index.js +0 -2
- package/dist/es/r/common/index.js +0 -1
- package/dist/es/r/index.js +0 -2
- package/src/stories/c/ContentSlides.stories.jsx +0 -214
- package/src/ui/c/ContentSlides/ContentSlides.jsx +0 -214
- package/src/ui/c/ContentSlides/Context.js +0 -3
- package/src/ui/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.jsx +0 -145
- package/src/ui/c/ContentSlides/common/HorizontalMenu/index.js +0 -2
- package/src/ui/c/ContentSlides/common/Navigator/Navigator.jsx +0 -150
- package/src/ui/c/ContentSlides/common/Navigator/index.js +0 -2
- package/src/ui/c/ContentSlides/common/Sidebar/Sidebar.jsx +0 -135
- package/src/ui/c/ContentSlides/common/Sidebar/index.js +0 -2
- package/src/ui/c/ContentSlides/common/Slide/Slide.jsx +0 -87
- package/src/ui/c/ContentSlides/common/Slide/index.js +0 -2
- package/src/ui/c/ContentSlides/common/index.js +0 -4
- package/src/ui/c/ContentSlides/index.js +0 -4
- package/src/ui/c/ContentSlides/styles.scss +0 -312
- package/src/ui/c/ContentSlides/useContentSlides.js +0 -4
- package/src/ui/r/SwitchRouteMap/SwitchRouteMap.jsx +0 -64
- package/src/ui/r/SwitchRouteMap/index.js +0 -2
- package/src/ui/r/common/PrivateRoute/PrivateRoute.jsx +0 -73
- package/src/ui/r/common/PrivateRoute/index.js +0 -2
- package/src/ui/r/common/index.js +0 -1
- package/src/ui/r/index.js +0 -2
- /package/src/stories/a/{CodeEditor.stories.jsx → XMLEditor.stories.jsx} +0 -0
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
import styleNames from '@pareto-engineering/bem/exports';
|
|
5
|
-
import { ProgressBar } from "../../../../a";
|
|
6
|
-
import { Logo } from "../../../../b";
|
|
7
|
-
import useContentSlides from "../../useContentSlides";
|
|
8
|
-
|
|
9
|
-
// Local Definitions
|
|
10
|
-
|
|
11
|
-
// const baseClassName = styleNames.base
|
|
12
|
-
|
|
13
|
-
const componentClassName = 'horizontal-menu';
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* This is the component description.
|
|
17
|
-
*/
|
|
18
|
-
const HorizontalMenu = ({
|
|
19
|
-
id,
|
|
20
|
-
className: userClassName,
|
|
21
|
-
style,
|
|
22
|
-
logoColor,
|
|
23
|
-
hideBackIcon,
|
|
24
|
-
stepsBackwards,
|
|
25
|
-
customPrevStep,
|
|
26
|
-
color
|
|
27
|
-
// ...otherProps
|
|
28
|
-
}) => {
|
|
29
|
-
const {
|
|
30
|
-
setPrevStepIndex,
|
|
31
|
-
// setNextStepIndex,
|
|
32
|
-
currentStep,
|
|
33
|
-
isFirstStep
|
|
34
|
-
// currentStep,
|
|
35
|
-
// currentStepIndex,
|
|
36
|
-
} = useContentSlides();
|
|
37
|
-
const mobilePreviousStep = () => {
|
|
38
|
-
if (customPrevStep) {
|
|
39
|
-
customPrevStep();
|
|
40
|
-
} else {
|
|
41
|
-
setPrevStepIndex(stepsBackwards);
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
45
|
-
id: id,
|
|
46
|
-
className: [
|
|
47
|
-
// baseClassName,
|
|
48
|
-
|
|
49
|
-
componentClassName, userClassName].filter(e => e).join(' '),
|
|
50
|
-
style: style
|
|
51
|
-
}, currentStep?.progress > 0 && /*#__PURE__*/React.createElement(ProgressBar, {
|
|
52
|
-
progress: currentStep.progress,
|
|
53
|
-
attached: true,
|
|
54
|
-
height: ".4em",
|
|
55
|
-
color: color,
|
|
56
|
-
className: "y-background-far b-hard-y"
|
|
57
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
58
|
-
className: styleNames.elementContent
|
|
59
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
60
|
-
className: "left"
|
|
61
|
-
}, !isFirstStep && !hideBackIcon && /*#__PURE__*/React.createElement("span", {
|
|
62
|
-
className: "prev-button pointer",
|
|
63
|
-
onClick: mobilePreviousStep,
|
|
64
|
-
role: "button",
|
|
65
|
-
onKeyDown: mobilePreviousStep,
|
|
66
|
-
tabIndex: 0
|
|
67
|
-
}, '<--')), /*#__PURE__*/React.createElement("div", {
|
|
68
|
-
className: "title"
|
|
69
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
70
|
-
className: "md-h lg-h"
|
|
71
|
-
}, currentStep?.title), /*#__PURE__*/React.createElement(Logo, {
|
|
72
|
-
className: "xs-h sm-h y-transparent",
|
|
73
|
-
height: "1.1em",
|
|
74
|
-
color: logoColor
|
|
75
|
-
}))));
|
|
76
|
-
};
|
|
77
|
-
HorizontalMenu.propTypes = {
|
|
78
|
-
/**
|
|
79
|
-
* The HTML id for this element
|
|
80
|
-
*/
|
|
81
|
-
id: PropTypes.string,
|
|
82
|
-
/**
|
|
83
|
-
* The HTML class names for this element
|
|
84
|
-
*/
|
|
85
|
-
className: PropTypes.string,
|
|
86
|
-
/**
|
|
87
|
-
* The React-written, css properties for this element.
|
|
88
|
-
*/
|
|
89
|
-
style: PropTypes.objectOf(PropTypes.string),
|
|
90
|
-
/**
|
|
91
|
-
* Number of backward steps for the customPrevStep
|
|
92
|
-
*/
|
|
93
|
-
stepsBackwards: PropTypes.number,
|
|
94
|
-
/**
|
|
95
|
-
* A custom previous function
|
|
96
|
-
*/
|
|
97
|
-
customPrevStep: PropTypes.func,
|
|
98
|
-
/**
|
|
99
|
-
* The logo color
|
|
100
|
-
*/
|
|
101
|
-
logoColor: PropTypes.string,
|
|
102
|
-
/**
|
|
103
|
-
* Hide back icon boolean
|
|
104
|
-
*/
|
|
105
|
-
hideBackIcon: PropTypes.bool,
|
|
106
|
-
/**
|
|
107
|
-
* String that will represent color for Progress bar
|
|
108
|
-
*/
|
|
109
|
-
color: PropTypes.string
|
|
110
|
-
};
|
|
111
|
-
HorizontalMenu.defaultProps = {
|
|
112
|
-
logoColor: 'paragraph',
|
|
113
|
-
stepsBackwards: 1,
|
|
114
|
-
color: 'main2'
|
|
115
|
-
};
|
|
116
|
-
export default HorizontalMenu;
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
import { Button } from "../../../../b";
|
|
5
|
-
import useContentSlides from "../../useContentSlides";
|
|
6
|
-
|
|
7
|
-
// Local Definitions
|
|
8
|
-
|
|
9
|
-
const componentClassName = 'navigator';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* This is the component description.
|
|
13
|
-
*/
|
|
14
|
-
const Navigator = ({
|
|
15
|
-
id,
|
|
16
|
-
className: userClassName,
|
|
17
|
-
style,
|
|
18
|
-
canMoveForward,
|
|
19
|
-
previousColor,
|
|
20
|
-
nextColor,
|
|
21
|
-
stepsForward,
|
|
22
|
-
stepsBackwards,
|
|
23
|
-
customPrevStep,
|
|
24
|
-
customNextStep,
|
|
25
|
-
isLoading
|
|
26
|
-
// ...otherProps
|
|
27
|
-
}) => {
|
|
28
|
-
const {
|
|
29
|
-
setPrevStepIndex,
|
|
30
|
-
setNextStepIndex,
|
|
31
|
-
isFirstStep,
|
|
32
|
-
isLastStep,
|
|
33
|
-
isDebug
|
|
34
|
-
// currentStep,
|
|
35
|
-
// currentStepIndex,
|
|
36
|
-
} = useContentSlides();
|
|
37
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
38
|
-
id: id,
|
|
39
|
-
className: [componentClassName, userClassName].filter(e => e).join(' '),
|
|
40
|
-
style: style
|
|
41
|
-
}, !isFirstStep ? /*#__PURE__*/React.createElement(Button, {
|
|
42
|
-
className: `x-${previousColor} prev`,
|
|
43
|
-
isSimple: true,
|
|
44
|
-
onClick: () => {
|
|
45
|
-
if (customPrevStep) {
|
|
46
|
-
customPrevStep();
|
|
47
|
-
} else {
|
|
48
|
-
setPrevStepIndex(stepsBackwards);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}, "Previous") : /*#__PURE__*/React.createElement("span", null), !isLastStep ? /*#__PURE__*/React.createElement(Button, {
|
|
52
|
-
className: `x-${nextColor} next`,
|
|
53
|
-
disabled: !isDebug && !canMoveForward,
|
|
54
|
-
isLoading: isLoading,
|
|
55
|
-
onClick: () => {
|
|
56
|
-
if (customNextStep) {
|
|
57
|
-
customNextStep();
|
|
58
|
-
} else {
|
|
59
|
-
setNextStepIndex(stepsForward);
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
isCompact: true
|
|
63
|
-
}, "Next") : /*#__PURE__*/React.createElement("span", null));
|
|
64
|
-
};
|
|
65
|
-
Navigator.propTypes = {
|
|
66
|
-
/**
|
|
67
|
-
* The HTML id for this element
|
|
68
|
-
*/
|
|
69
|
-
id: PropTypes.string,
|
|
70
|
-
/**
|
|
71
|
-
* The HTML class names for this element
|
|
72
|
-
*/
|
|
73
|
-
className: PropTypes.string,
|
|
74
|
-
/**
|
|
75
|
-
* The React-written, css properties for this element.
|
|
76
|
-
*/
|
|
77
|
-
style: PropTypes.objectOf(PropTypes.string),
|
|
78
|
-
/**
|
|
79
|
-
* Whether the user can move to the next slide
|
|
80
|
-
*/
|
|
81
|
-
canMoveForward: PropTypes.bool,
|
|
82
|
-
/**
|
|
83
|
-
* The previous color
|
|
84
|
-
*/
|
|
85
|
-
previousColor: PropTypes.string,
|
|
86
|
-
/**
|
|
87
|
-
* The next color
|
|
88
|
-
*/
|
|
89
|
-
nextColor: PropTypes.string,
|
|
90
|
-
/**
|
|
91
|
-
* Number of forward steps for the customNextStep
|
|
92
|
-
*/
|
|
93
|
-
stepsForward: PropTypes.number,
|
|
94
|
-
/**
|
|
95
|
-
* Number of backward steps for the customPrevStep
|
|
96
|
-
*/
|
|
97
|
-
stepsBackwards: PropTypes.number,
|
|
98
|
-
/**
|
|
99
|
-
* A custom previous function
|
|
100
|
-
*/
|
|
101
|
-
customPrevStep: PropTypes.func,
|
|
102
|
-
/**
|
|
103
|
-
* A custom next function
|
|
104
|
-
*/
|
|
105
|
-
customNextStep: PropTypes.func,
|
|
106
|
-
/**
|
|
107
|
-
* Button loading state
|
|
108
|
-
*/
|
|
109
|
-
isLoading: PropTypes.bool
|
|
110
|
-
};
|
|
111
|
-
Navigator.defaultProps = {
|
|
112
|
-
canMoveForward: true,
|
|
113
|
-
previousColor: 'main2',
|
|
114
|
-
nextColor: 'main2',
|
|
115
|
-
stepsForward: 1,
|
|
116
|
-
stepsBackwards: 1
|
|
117
|
-
};
|
|
118
|
-
export default Navigator;
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
import { IconList } from "../../../../a";
|
|
5
|
-
import { ThemeSelector } from "../../../../b";
|
|
6
|
-
import styleNames from '@pareto-engineering/bem/exports';
|
|
7
|
-
import useContentSlides from "../../useContentSlides";
|
|
8
|
-
|
|
9
|
-
// Local Definitions
|
|
10
|
-
|
|
11
|
-
// const baseClassName = styleNames.base
|
|
12
|
-
|
|
13
|
-
const componentClassName = 'sidebar';
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* This is the component description.
|
|
17
|
-
*/
|
|
18
|
-
const Sidebar = ({
|
|
19
|
-
id,
|
|
20
|
-
className: userClassName,
|
|
21
|
-
style,
|
|
22
|
-
header,
|
|
23
|
-
footer
|
|
24
|
-
// ...otherProps
|
|
25
|
-
}) => {
|
|
26
|
-
const {
|
|
27
|
-
steps,
|
|
28
|
-
// setPrevStepIndex,
|
|
29
|
-
// setNextStepIndex,
|
|
30
|
-
setStepIndex,
|
|
31
|
-
// isFirstStep,
|
|
32
|
-
// isLastStep,
|
|
33
|
-
// currentStep,
|
|
34
|
-
currentStepIndex
|
|
35
|
-
} = useContentSlides();
|
|
36
|
-
return /*#__PURE__*/React.createElement("nav", {
|
|
37
|
-
id: id,
|
|
38
|
-
className: [
|
|
39
|
-
// baseClassName,
|
|
40
|
-
|
|
41
|
-
componentClassName, userClassName].filter(e => e).join(' '),
|
|
42
|
-
style: style
|
|
43
|
-
}, header ? /*#__PURE__*/React.createElement("header", null, header) : /*#__PURE__*/React.createElement("span", null), /*#__PURE__*/React.createElement("div", {
|
|
44
|
-
className: styleNames.elementContent
|
|
45
|
-
}, /*#__PURE__*/React.createElement(IconList, null, steps.map((step, i) =>
|
|
46
|
-
/*#__PURE__*/
|
|
47
|
-
/* eslint-disable no-nested-ternary -- bc of math inequality cases */
|
|
48
|
-
React.createElement(IconList.Item, {
|
|
49
|
-
key: step.location,
|
|
50
|
-
icon: currentStepIndex === i ? 'L' : i < currentStepIndex ? 'I' : undefined,
|
|
51
|
-
iconHover: i < currentStepIndex ? 'L' : undefined,
|
|
52
|
-
className: [currentStepIndex === i ? 'x-heading' : i < currentStepIndex ? 'pointer x-paragraph xh-main2' : 'x-subtitle', 'c-x'].filter(e => e).join(' '),
|
|
53
|
-
onClick: i < currentStepIndex ? () => setStepIndex(i) : undefined
|
|
54
|
-
}, step.title)
|
|
55
|
-
/* eslint-enable no-nested-ternary */))), footer ? /*#__PURE__*/React.createElement("footer", null, footer, /*#__PURE__*/React.createElement(ThemeSelector, {
|
|
56
|
-
className: "x-heading"
|
|
57
|
-
})) : /*#__PURE__*/React.createElement("span", null));
|
|
58
|
-
};
|
|
59
|
-
Sidebar.propTypes = {
|
|
60
|
-
/**
|
|
61
|
-
* The HTML id for this element
|
|
62
|
-
*/
|
|
63
|
-
id: PropTypes.string,
|
|
64
|
-
/**
|
|
65
|
-
* The HTML class names for this element
|
|
66
|
-
*/
|
|
67
|
-
className: PropTypes.string,
|
|
68
|
-
/**
|
|
69
|
-
* The React-written, css properties for this element.
|
|
70
|
-
*/
|
|
71
|
-
style: PropTypes.objectOf(PropTypes.string),
|
|
72
|
-
/**
|
|
73
|
-
* The header JSX
|
|
74
|
-
*/
|
|
75
|
-
header: PropTypes.node,
|
|
76
|
-
/**
|
|
77
|
-
* The footer JSX
|
|
78
|
-
*/
|
|
79
|
-
footer: PropTypes.node
|
|
80
|
-
};
|
|
81
|
-
Sidebar.defaultProps = {
|
|
82
|
-
// someProp:false
|
|
83
|
-
};
|
|
84
|
-
export default Sidebar;
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
import styleNames from '@pareto-engineering/bem/exports';
|
|
5
|
-
|
|
6
|
-
// Local Definitions
|
|
7
|
-
import useContentSlides from "../../useContentSlides";
|
|
8
|
-
|
|
9
|
-
// const baseClassName = styleNames.base
|
|
10
|
-
|
|
11
|
-
const componentClassName = 'slide';
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* This is the component description.
|
|
15
|
-
*/
|
|
16
|
-
const Slide = ({
|
|
17
|
-
id,
|
|
18
|
-
className: userClassName,
|
|
19
|
-
style,
|
|
20
|
-
children,
|
|
21
|
-
index
|
|
22
|
-
// ...otherProps
|
|
23
|
-
}) => {
|
|
24
|
-
const {
|
|
25
|
-
currentStepIndex
|
|
26
|
-
} = useContentSlides();
|
|
27
|
-
const isActive = currentStepIndex === index;
|
|
28
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
29
|
-
id: id,
|
|
30
|
-
className: [
|
|
31
|
-
// baseClassName,
|
|
32
|
-
isActive && styleNames.modifierActive, componentClassName, userClassName].filter(e => e).join(' '),
|
|
33
|
-
style: style
|
|
34
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
35
|
-
className: "wrapper"
|
|
36
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
37
|
-
className: "content"
|
|
38
|
-
}, children)));
|
|
39
|
-
};
|
|
40
|
-
Slide.propTypes = {
|
|
41
|
-
/**
|
|
42
|
-
* The HTML id for this element
|
|
43
|
-
*/
|
|
44
|
-
id: PropTypes.string,
|
|
45
|
-
/**
|
|
46
|
-
* The HTML class names for this element
|
|
47
|
-
*/
|
|
48
|
-
className: PropTypes.string,
|
|
49
|
-
/**
|
|
50
|
-
* The React-written, css properties for this element.
|
|
51
|
-
*/
|
|
52
|
-
style: PropTypes.objectOf(PropTypes.string),
|
|
53
|
-
/**
|
|
54
|
-
* The children JSX
|
|
55
|
-
*/
|
|
56
|
-
children: PropTypes.node,
|
|
57
|
-
/**
|
|
58
|
-
* The index of this slide
|
|
59
|
-
*/
|
|
60
|
-
index: PropTypes.number
|
|
61
|
-
};
|
|
62
|
-
Slide.defaultProps = {
|
|
63
|
-
// someProp:false
|
|
64
|
-
};
|
|
65
|
-
export default Slide;
|