@widergy/energy-ui 3.7.4 → 3.8.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.
- package/CHANGELOG.md +22 -0
- package/dist/components/UTBreadcrumbs/index.js +2 -0
- package/dist/components/UTOnboarding/README.md +44 -0
- package/dist/components/UTOnboarding/components/OnboardingStep/index.js +40 -0
- package/dist/components/UTOnboarding/components/OnboardingStep/styles.module.scss +55 -0
- package/dist/components/UTOnboarding/constants.js +18 -0
- package/dist/components/UTOnboarding/index.js +122 -0
- package/dist/components/UTOnboarding/styles.module.scss +162 -0
- package/dist/components/UTOnboarding/theme.js +101 -0
- package/dist/components/UTWorkflowContainer/versions/V1/index.js +1 -1
- package/dist/index.js +7 -0
- package/package.json +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
# [3.8.0](https://github.com/widergy/energy-ui/compare/v3.7.5...v3.8.0) (2024-06-06)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* remove onboarding in example ([8b531c0](https://github.com/widergy/energy-ui/commit/8b531c097c00ff4c54f87cfeed20c532d91e48c4))
|
|
7
|
+
* remove prev button for first step ([e7f59b4](https://github.com/widergy/energy-ui/commit/e7f59b4fca9f63425f509df0b1f8e5fcb5b9f014))
|
|
8
|
+
* some fixes ([2b642de](https://github.com/widergy/energy-ui/commit/2b642de2b9c4eb79cbc906182ba837d80b6e4077))
|
|
9
|
+
* some fixes ([3c86c20](https://github.com/widergy/energy-ui/commit/3c86c203b5515b6151b13cf5defef499f94256b4))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* add utonboarding ([8eff9a7](https://github.com/widergy/energy-ui/commit/8eff9a70ad6286954bae20bdc4913f06efed7591))
|
|
15
|
+
|
|
16
|
+
## [3.7.5](https://github.com/widergy/energy-ui/compare/v3.7.4...v3.7.5) (2024-06-05)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* progress bar count ([#454](https://github.com/widergy/energy-ui/issues/454)) ([831bdcc](https://github.com/widergy/energy-ui/commit/831bdccb95e242aa65743e538f730abccb07a0e8))
|
|
22
|
+
|
|
1
23
|
## [3.7.4](https://github.com/widergy/energy-ui/compare/v3.7.3...v3.7.4) (2024-06-03)
|
|
2
24
|
|
|
3
25
|
|
|
@@ -149,6 +149,7 @@ const UTBreadcrumbs = _ref => {
|
|
|
149
149
|
key: "".concat(route, "-").concat(label)
|
|
150
150
|
}, !route && !menuItems || disableMenu ? /*#__PURE__*/_react.default.createElement(_UTLabel.default, _extends({
|
|
151
151
|
className: _stylesModule.default.label,
|
|
152
|
+
variant: "small",
|
|
152
153
|
weight: "medium"
|
|
153
154
|
}, colorThemesDefinition.label), label) : /*#__PURE__*/_react.default.createElement(_UTButton.default, _extends({
|
|
154
155
|
classNames: {
|
|
@@ -161,6 +162,7 @@ const UTBreadcrumbs = _ref => {
|
|
|
161
162
|
variant: "text"
|
|
162
163
|
}, colorThemesDefinition.button), "".concat(label)), !isLast && /*#__PURE__*/_react.default.createElement(_UTLabel.default, _extends({
|
|
163
164
|
className: classes.separator,
|
|
165
|
+
variant: "small",
|
|
164
166
|
weight: "medium"
|
|
165
167
|
}, colorThemesDefinition.label), separator));
|
|
166
168
|
}), !disableMenu && /*#__PURE__*/_react.default.createElement(_UTMenu.default, _extends({
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# UTOnboarding
|
|
2
|
+
|
|
3
|
+
### Description
|
|
4
|
+
|
|
5
|
+
Onboarding component.
|
|
6
|
+
|
|
7
|
+
### Variants
|
|
8
|
+
|
|
9
|
+
- Default: variant = 'dark'
|
|
10
|
+
- Information: variant = 'information'
|
|
11
|
+
- Light: variant = 'light'
|
|
12
|
+
|
|
13
|
+
### Props
|
|
14
|
+
|
|
15
|
+
- handleOnClose: function --> optional, se ejecutara cuando se cierra el onboarding
|
|
16
|
+
- handleComplete: function --> optional, se ejecutara cuando se completa el onboarding
|
|
17
|
+
- options: object | Espera recibir un objeto propio de la libreria de intro react js. Ejemplo de valores posibles
|
|
18
|
+
- nextLabel: string --> Next button label
|
|
19
|
+
- prevLabel: string --> Previous button label
|
|
20
|
+
- options: objeto --> Ejemplo de lo que se puede pasar:
|
|
21
|
+
{{ positionPrecedence: ['right'] }} (posicion del onboarding)
|
|
22
|
+
- steps: array of object --> requerido
|
|
23
|
+
|
|
24
|
+
- Cada objeto espera recibir:
|
|
25
|
+
|
|
26
|
+
` {
|
|
27
|
+
title: '¡Bienvenido a tu oficina virtual!',
|
|
28
|
+
element: '.step_1',
|
|
29
|
+
image: '',
|
|
30
|
+
description:
|
|
31
|
+
'Inicia el tutorial de introducción y descubrí todas las gestiones que podés realizar en tus cuentas.'
|
|
32
|
+
}`
|
|
33
|
+
|
|
34
|
+
- title: Titulo del onboarding
|
|
35
|
+
- element: string | CSS selector to use for the step
|
|
36
|
+
- position: string | Position of the tooltip
|
|
37
|
+
- intro : string | The tooltip content
|
|
38
|
+
- description: string | si quiero agregar una imagen voy a tener que pasarle una description en lugar del intro
|
|
39
|
+
- image: imagen de tipo png
|
|
40
|
+
- vectorImage: imagen de tipo svg
|
|
41
|
+
- hideFooter: bool | oculta los botones y los steps
|
|
42
|
+
- highlightClass: CSS class of the helperLayer.
|
|
43
|
+
- tooltipClass: CSS class of the tooltip
|
|
44
|
+
- isSuggestion: bool | si es el primer paso y no quiero que tenga tooltip puedo dejarlo en true
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
require("intro.js/introjs.css");
|
|
9
|
+
var _propTypes = require("prop-types");
|
|
10
|
+
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
const OnboardingStep = _ref => {
|
|
13
|
+
let {
|
|
14
|
+
hideFooter = false,
|
|
15
|
+
currentStep,
|
|
16
|
+
step,
|
|
17
|
+
totalSteps
|
|
18
|
+
} = _ref;
|
|
19
|
+
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("h3", {
|
|
20
|
+
className: _stylesModule.default.description
|
|
21
|
+
}, step.description), step.vectorImage ? /*#__PURE__*/_react.default.createElement(step.vectorImage, {
|
|
22
|
+
alt: "",
|
|
23
|
+
className: _stylesModule.default.wizardImage
|
|
24
|
+
}) : step.image && /*#__PURE__*/_react.default.createElement("img", {
|
|
25
|
+
alt: "",
|
|
26
|
+
className: _stylesModule.default.wizardImage,
|
|
27
|
+
src: step.image
|
|
28
|
+
}), !hideFooter && /*#__PURE__*/_react.default.createElement("div", {
|
|
29
|
+
className: _stylesModule.default.footer
|
|
30
|
+
}, /*#__PURE__*/_react.default.createElement("h3", {
|
|
31
|
+
className: _stylesModule.default.counterSteps
|
|
32
|
+
}, currentStep + 1, " de ", totalSteps)));
|
|
33
|
+
};
|
|
34
|
+
OnboardingStep.propTypes = {
|
|
35
|
+
currentStep: _propTypes.number,
|
|
36
|
+
hideFooter: _propTypes.bool,
|
|
37
|
+
step: _propTypes.object,
|
|
38
|
+
totalSteps: _propTypes.number
|
|
39
|
+
};
|
|
40
|
+
var _default = exports.default = OnboardingStep;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
@import '../../../../scss/variables/colors.module.scss';
|
|
2
|
+
|
|
3
|
+
.description {
|
|
4
|
+
padding: 0;
|
|
5
|
+
margin-top: 4px;
|
|
6
|
+
font-family: 'Inter', sans-serif;
|
|
7
|
+
font-weight: 400;
|
|
8
|
+
font-size: 14px;
|
|
9
|
+
line-height: 20px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.counterSteps {
|
|
13
|
+
font-size: 12px;
|
|
14
|
+
padding: 0;
|
|
15
|
+
margin-top: 4px;
|
|
16
|
+
font-family: 'Inter', sans-serif;
|
|
17
|
+
font-weight: 400;
|
|
18
|
+
line-height: 20px;
|
|
19
|
+
align-self: center;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.footer {
|
|
23
|
+
display: flex;
|
|
24
|
+
margin-top: 16px;
|
|
25
|
+
justify-content: space-between;
|
|
26
|
+
align-items: center;
|
|
27
|
+
height: fit-content;
|
|
28
|
+
position: absolute;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.buttons {
|
|
32
|
+
padding: 4px 8px;
|
|
33
|
+
font-size: 14px;
|
|
34
|
+
font-family: 'Inter', sans-serif;
|
|
35
|
+
font-weight: 400;
|
|
36
|
+
line-height: 20px;
|
|
37
|
+
border-radius: 4px;
|
|
38
|
+
border: 0;
|
|
39
|
+
color: inherit;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.nextButton {
|
|
43
|
+
background-color: $white;
|
|
44
|
+
color: #091e42;
|
|
45
|
+
&:hover {
|
|
46
|
+
color: $white;
|
|
47
|
+
background-color: #091e42;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.wizardImage {
|
|
52
|
+
max-height: 180px;
|
|
53
|
+
max-width: 264px;
|
|
54
|
+
object-fit: cover;
|
|
55
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.VARIANTS = exports.START_LABEL = exports.PREV_LABEL = exports.NEXT_LABEL = exports.DONE_LABEL = exports.DEFAULT_PROPS = void 0;
|
|
7
|
+
const VARIANTS = exports.VARIANTS = {
|
|
8
|
+
dark: 'dark',
|
|
9
|
+
information: 'information',
|
|
10
|
+
light: 'light'
|
|
11
|
+
};
|
|
12
|
+
const DEFAULT_PROPS = exports.DEFAULT_PROPS = {
|
|
13
|
+
variant: 'dark'
|
|
14
|
+
};
|
|
15
|
+
const DONE_LABEL = exports.DONE_LABEL = 'Finalizar';
|
|
16
|
+
const NEXT_LABEL = exports.NEXT_LABEL = 'Siguiente';
|
|
17
|
+
const PREV_LABEL = exports.PREV_LABEL = 'Atrás';
|
|
18
|
+
const START_LABEL = exports.START_LABEL = 'Comenzar';
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _intro = require("intro.js-react");
|
|
9
|
+
require("intro.js/introjs.css");
|
|
10
|
+
var _propTypes = require("prop-types");
|
|
11
|
+
var _classesUtils = require("../../utils/classesUtils");
|
|
12
|
+
var _WithTheme = _interopRequireDefault(require("../WithTheme"));
|
|
13
|
+
var _OnboardingStep = _interopRequireDefault(require("./components/OnboardingStep"));
|
|
14
|
+
var _theme = require("./theme");
|
|
15
|
+
var _constants = require("./constants");
|
|
16
|
+
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
17
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
18
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
19
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
20
|
+
const UTOnboarding = _ref => {
|
|
21
|
+
var _steps$currentStep$is, _steps$currentStep, _steps$currentStep$hi, _steps$currentStep2, _steps$currentStep3, _steps$currentStep4;
|
|
22
|
+
let {
|
|
23
|
+
classes: themeClasses,
|
|
24
|
+
classNames,
|
|
25
|
+
handleComplete,
|
|
26
|
+
handleOnClose,
|
|
27
|
+
options,
|
|
28
|
+
steps,
|
|
29
|
+
variant
|
|
30
|
+
} = _ref;
|
|
31
|
+
const classes = (0, _react.useMemo)(() => (0, _classesUtils.mergeClasses)(themeClasses, classNames), [themeClasses, classNames]) || {};
|
|
32
|
+
const [currentStep, setCurrentStep] = (0, _react.useState)(0);
|
|
33
|
+
const [loading, setLoading] = (0, _react.useState)(true);
|
|
34
|
+
const [enabled, setEnabled] = (0, _react.useState)(true);
|
|
35
|
+
const currentStepIsSuggestion = (_steps$currentStep$is = (_steps$currentStep = steps[currentStep]) === null || _steps$currentStep === void 0 ? void 0 : _steps$currentStep.isSuggestion) !== null && _steps$currentStep$is !== void 0 ? _steps$currentStep$is : false;
|
|
36
|
+
const hideFooter = (_steps$currentStep$hi = (_steps$currentStep2 = steps[currentStep]) === null || _steps$currentStep2 === void 0 ? void 0 : _steps$currentStep2.hideFooter) !== null && _steps$currentStep$hi !== void 0 ? _steps$currentStep$hi : false;
|
|
37
|
+
const totalSteps = steps.length;
|
|
38
|
+
(0, _react.useEffect)(() => {
|
|
39
|
+
setLoading(false);
|
|
40
|
+
}, [steps]);
|
|
41
|
+
(0, _react.useEffect)(() => {
|
|
42
|
+
const referenceLayer = document.querySelector('.introjs-tooltipReferenceLayer');
|
|
43
|
+
if (currentStepIsSuggestion) {
|
|
44
|
+
var _referenceLayer$class;
|
|
45
|
+
referenceLayer === null || referenceLayer === void 0 || (_referenceLayer$class = referenceLayer.classList) === null || _referenceLayer$class === void 0 || _referenceLayer$class.add(_stylesModule.default.suggestionReference);
|
|
46
|
+
} else {
|
|
47
|
+
var _referenceLayer$class2;
|
|
48
|
+
referenceLayer === null || referenceLayer === void 0 || (_referenceLayer$class2 = referenceLayer.classList) === null || _referenceLayer$class2 === void 0 || _referenceLayer$class2.remove(_stylesModule.default.suggestionReference);
|
|
49
|
+
}
|
|
50
|
+
const footer = document.querySelector('.introjs-tooltipbuttons');
|
|
51
|
+
if (hideFooter) {
|
|
52
|
+
var _footer$classList;
|
|
53
|
+
footer === null || footer === void 0 || (_footer$classList = footer.classList) === null || _footer$classList === void 0 || _footer$classList.add(_stylesModule.default.displayNone);
|
|
54
|
+
} else {
|
|
55
|
+
var _footer$classList2;
|
|
56
|
+
footer === null || footer === void 0 || (_footer$classList2 = footer.classList) === null || _footer$classList2 === void 0 || _footer$classList2.remove(_stylesModule.default.displayNone);
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
return loading ? null : /*#__PURE__*/_react.default.createElement(_intro.Steps, {
|
|
60
|
+
enabled: enabled,
|
|
61
|
+
steps: steps.map((step, index) => ({
|
|
62
|
+
...step,
|
|
63
|
+
intro: step.description ? /*#__PURE__*/_react.default.createElement(_OnboardingStep.default, {
|
|
64
|
+
key: step,
|
|
65
|
+
step: step,
|
|
66
|
+
currentStep: index,
|
|
67
|
+
totalSteps: totalSteps,
|
|
68
|
+
classes: classes,
|
|
69
|
+
hideFooter: step === null || step === void 0 ? void 0 : step.hideFooter,
|
|
70
|
+
buttonPreviousTitle: step === null || step === void 0 ? void 0 : step.buttonPreviousTitle,
|
|
71
|
+
nextStep: step === null || step === void 0 ? void 0 : step.nextStep,
|
|
72
|
+
variant: variant
|
|
73
|
+
}) : step.intro
|
|
74
|
+
})),
|
|
75
|
+
initialStep: 0,
|
|
76
|
+
onExit: handleOnClose || (() => setEnabled(false)),
|
|
77
|
+
onBeforeChange: nextStep => {
|
|
78
|
+
var _steps$nextStep;
|
|
79
|
+
const overlay = document.querySelector('.introjs-overlay');
|
|
80
|
+
setCurrentStep(nextStep);
|
|
81
|
+
if ((_steps$nextStep = steps[nextStep]) !== null && _steps$nextStep !== void 0 && _steps$nextStep.isSuggestion) {
|
|
82
|
+
var _overlay$classList;
|
|
83
|
+
overlay === null || overlay === void 0 || (_overlay$classList = overlay.classList) === null || _overlay$classList === void 0 || _overlay$classList.add(_stylesModule.default.suggestionOverlay);
|
|
84
|
+
} else {
|
|
85
|
+
var _overlay$classList2;
|
|
86
|
+
overlay === null || overlay === void 0 || (_overlay$classList2 = overlay.classList) === null || _overlay$classList2 === void 0 || _overlay$classList2.remove(_stylesModule.default.suggestionOverlay);
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
onComplete: handleComplete || {},
|
|
90
|
+
options: {
|
|
91
|
+
buttonClass: "".concat(_stylesModule.default.button, " ").concat(classes.buttons),
|
|
92
|
+
doneLabel: _constants.DONE_LABEL,
|
|
93
|
+
exitOnEsc: false,
|
|
94
|
+
exitOnOverlayClick: false,
|
|
95
|
+
helperElementPadding: 20,
|
|
96
|
+
hidePrev: true,
|
|
97
|
+
nextLabel: currentStep === 0 ? _constants.START_LABEL : _constants.NEXT_LABEL,
|
|
98
|
+
prevLabel: _constants.PREV_LABEL,
|
|
99
|
+
showBullets: false,
|
|
100
|
+
showProgress: false,
|
|
101
|
+
tooltipClass: "".concat(_stylesModule.default.tooltipContainer, " ").concat(classes.onboardingContainer),
|
|
102
|
+
highlightClass: (_steps$currentStep3 = steps[currentStep]) !== null && _steps$currentStep3 !== void 0 && _steps$currentStep3.isSuggestion ? _stylesModule.default.suggestionHighlight : _stylesModule.default.highlight,
|
|
103
|
+
...((_steps$currentStep4 = steps[currentStep]) !== null && _steps$currentStep4 !== void 0 && _steps$currentStep4.hideFooter ? {
|
|
104
|
+
hidePrev: true,
|
|
105
|
+
hideNext: true,
|
|
106
|
+
showProgress: false,
|
|
107
|
+
showButtons: false
|
|
108
|
+
} : null),
|
|
109
|
+
...options
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
};
|
|
113
|
+
UTOnboarding.propTypes = {
|
|
114
|
+
classes: (0, _propTypes.objectOf)(_propTypes.string),
|
|
115
|
+
classNames: (0, _propTypes.objectOf)(_propTypes.string),
|
|
116
|
+
handleComplete: _propTypes.func,
|
|
117
|
+
handleOnClose: _propTypes.func,
|
|
118
|
+
options: _propTypes.object,
|
|
119
|
+
steps: _propTypes.array,
|
|
120
|
+
variant: _propTypes.string
|
|
121
|
+
};
|
|
122
|
+
var _default = exports.default = (0, _WithTheme.default)(_theme.retrieveStyle)(UTOnboarding);
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
@import '../../scss/variables/colors.module.scss';
|
|
2
|
+
$intro-js-disabled-button-class: 'introjs-disabled';
|
|
3
|
+
$introjs-progress: 'introjs-progress';
|
|
4
|
+
$introjs-progressbar: 'introjs-progressbar';
|
|
5
|
+
$introjs-skipbutton: 'introjs-skipbutton';
|
|
6
|
+
$introjs-arrow: 'introjs-arrow';
|
|
7
|
+
$introjs-tooltip-header: 'introjs-tooltip-header';
|
|
8
|
+
$introjs-tooltiptext: 'introjs-tooltiptext';
|
|
9
|
+
$introjs-tooltip-title: 'introjs-tooltip-title';
|
|
10
|
+
$introjs-nextbutton: 'introjs-nextbutton';
|
|
11
|
+
$introjs-prevbutton: 'introjs-prevbutton';
|
|
12
|
+
$introjs-overlay: 'introjs-overlay';
|
|
13
|
+
$introjs-tooltip-reference-layer: 'introjs-tooltipReferenceLayer';
|
|
14
|
+
$introjs-helper-layer: 'introjs-helperLayer';
|
|
15
|
+
$introjs-show-element: 'introjs-showElement';
|
|
16
|
+
$introjs-tooltipbuttons: 'introjs-tooltipbuttons';
|
|
17
|
+
|
|
18
|
+
%tooltipContainer {
|
|
19
|
+
box-sizing: border-box;
|
|
20
|
+
color: $white;
|
|
21
|
+
margin: 0;
|
|
22
|
+
padding: 16px !important;
|
|
23
|
+
width: 296px;
|
|
24
|
+
z-index: 1290;
|
|
25
|
+
[class*='#{$introjs-skipbutton}'] {
|
|
26
|
+
color: $white;
|
|
27
|
+
font-size: 30px;
|
|
28
|
+
font-weight: 400;
|
|
29
|
+
position: relative;
|
|
30
|
+
top: -10px;
|
|
31
|
+
&:hover {
|
|
32
|
+
background-color: var(--actionAccent03) !important;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@font-face {
|
|
38
|
+
font-family: 'Inter';
|
|
39
|
+
font-style: normal;
|
|
40
|
+
font-weight: 700;
|
|
41
|
+
src: url('https://fonts.gstatic.com/s/inter/v8/UcCO3FwrqlXbO-JbATNBXYFF.woff2') format('woff2');
|
|
42
|
+
unicode-range: U+0000-00FF, U+1F1E6-1F1FF;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.button {
|
|
46
|
+
background-color: var(--actionAccent04) !important;
|
|
47
|
+
border-radius: 4px;
|
|
48
|
+
box-shadow: none;
|
|
49
|
+
color: var(--actionNegative04) !important;
|
|
50
|
+
cursor: pointer;
|
|
51
|
+
font-family: 'Inter', sans-serif;
|
|
52
|
+
font-size: 14px;
|
|
53
|
+
font-weight: 500;
|
|
54
|
+
line-height: 1.375rem;
|
|
55
|
+
padding: 4px 8px;
|
|
56
|
+
transition:
|
|
57
|
+
background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,
|
|
58
|
+
border 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,
|
|
59
|
+
box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,
|
|
60
|
+
color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,
|
|
61
|
+
opacity 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.button:hover {
|
|
65
|
+
opacity: 0.5;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
[class*='#{$intro-js-disabled-button-class}'] {
|
|
69
|
+
border-color: none;
|
|
70
|
+
cursor: auto;
|
|
71
|
+
}
|
|
72
|
+
[class*='#{$introjs-tooltip-header}'] {
|
|
73
|
+
display: flex;
|
|
74
|
+
padding: 0;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
[class*='#{$introjs-tooltiptext}'] {
|
|
78
|
+
padding: 0;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
[class*='#{$introjs-tooltip-title}'] {
|
|
82
|
+
font-family: 'Inter', sans-serif;
|
|
83
|
+
font-size: 16px;
|
|
84
|
+
font-weight: 500;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
[class*='#{$introjs-overlay}'] {
|
|
88
|
+
z-index: 1280;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
[class*='#{$introjs-nextbutton}'] {
|
|
92
|
+
&:focus {
|
|
93
|
+
outline: none;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
[class*='#{$introjs-tooltip-reference-layer}'] {
|
|
98
|
+
margin: 16px;
|
|
99
|
+
z-index: 1290;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
[class*='#{$introjs-helper-layer}'] {
|
|
103
|
+
z-index: 1275;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
[class*='#{$introjs-show-element}'] {
|
|
107
|
+
z-index: 1285 !important;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.suggestionHighlight {
|
|
111
|
+
box-shadow: none !important;
|
|
112
|
+
height: unset !important;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.suggestionOverlay {
|
|
116
|
+
display: none;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.tooltipSuggestionContainer {
|
|
120
|
+
@extend %tooltipContainer;
|
|
121
|
+
background-color: var(--actionNeutral05);
|
|
122
|
+
color: var(--light01);
|
|
123
|
+
|
|
124
|
+
[class*='#{$introjs-skipbutton}'] {
|
|
125
|
+
border-radius: 4px;
|
|
126
|
+
color: var(--light01);
|
|
127
|
+
&:hover {
|
|
128
|
+
background-color: var(--actionAccent03) !important;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
[class*='#{$introjs-arrow}'] {
|
|
133
|
+
border: none;
|
|
134
|
+
}
|
|
135
|
+
.suggestionReference {
|
|
136
|
+
height: unset !important;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.tooltipContainer {
|
|
140
|
+
@extend %tooltipContainer;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.displayNone {
|
|
144
|
+
display: none !important;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
[class*='#{$introjs-tooltipbuttons}'] {
|
|
148
|
+
border-top: none;
|
|
149
|
+
display: flex;
|
|
150
|
+
grid-gap: 8px;
|
|
151
|
+
justify-content: flex-end;
|
|
152
|
+
padding-top: 16px !important;
|
|
153
|
+
padding: 0;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.highlight {
|
|
157
|
+
border-radius: 0;
|
|
158
|
+
border: 4px #17f455 solid;
|
|
159
|
+
box-shadow:
|
|
160
|
+
#17f455 0px 0px 1px 2px,
|
|
161
|
+
rgba(33, 33, 33, 0.5) 0px 0px 0px 5000px !important;
|
|
162
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.validateProps = exports.retrieveStyle = void 0;
|
|
7
|
+
var _constants = require("./constants");
|
|
8
|
+
const getBackgroundColor = _ref => {
|
|
9
|
+
let {
|
|
10
|
+
theme,
|
|
11
|
+
variant
|
|
12
|
+
} = _ref;
|
|
13
|
+
return variant !== _constants.VARIANTS.light ? theme.Palette[variant]['05'] : theme.Palette.light['01'];
|
|
14
|
+
};
|
|
15
|
+
const getLabelTheme = _ref2 => {
|
|
16
|
+
let {
|
|
17
|
+
theme,
|
|
18
|
+
variant
|
|
19
|
+
} = _ref2;
|
|
20
|
+
return {
|
|
21
|
+
[_constants.VARIANTS.dark]: theme.Palette.light['01'],
|
|
22
|
+
[_constants.VARIANTS.information]: theme.Palette.light['01'],
|
|
23
|
+
[_constants.VARIANTS.light]: theme.Palette.dark['05']
|
|
24
|
+
}[variant];
|
|
25
|
+
};
|
|
26
|
+
const getButtonTheme = _ref3 => {
|
|
27
|
+
let {
|
|
28
|
+
theme,
|
|
29
|
+
variant
|
|
30
|
+
} = _ref3;
|
|
31
|
+
return {
|
|
32
|
+
[_constants.VARIANTS.dark]: theme.Palette.actions.negative['04'],
|
|
33
|
+
[_constants.VARIANTS.information]: theme.Palette.actions.negative['04'],
|
|
34
|
+
[_constants.VARIANTS.light]: theme.Palette.actions.accent['04']
|
|
35
|
+
}[variant];
|
|
36
|
+
};
|
|
37
|
+
const getButtonNextTextTheme = _ref4 => {
|
|
38
|
+
let {
|
|
39
|
+
theme,
|
|
40
|
+
variant
|
|
41
|
+
} = _ref4;
|
|
42
|
+
return {
|
|
43
|
+
[_constants.VARIANTS.dark]: theme.Palette.actions.neutral['05'],
|
|
44
|
+
[_constants.VARIANTS.information]: theme.Palette.actions.neutral['05'],
|
|
45
|
+
[_constants.VARIANTS.light]: theme.Palette.actions.negative['05']
|
|
46
|
+
}[variant];
|
|
47
|
+
};
|
|
48
|
+
const validateProps = _ref5 => {
|
|
49
|
+
let {
|
|
50
|
+
variant
|
|
51
|
+
} = _ref5;
|
|
52
|
+
return {
|
|
53
|
+
variant: _constants.VARIANTS[variant] || _constants.VARIANTS[_constants.DEFAULT_PROPS.variant]
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
exports.validateProps = validateProps;
|
|
57
|
+
const retrieveStyle = _ref6 => {
|
|
58
|
+
let {
|
|
59
|
+
theme,
|
|
60
|
+
variant
|
|
61
|
+
} = _ref6;
|
|
62
|
+
return {
|
|
63
|
+
onboardingContainer: {
|
|
64
|
+
backgroundColor: getBackgroundColor({
|
|
65
|
+
theme,
|
|
66
|
+
...validateProps({
|
|
67
|
+
variant
|
|
68
|
+
})
|
|
69
|
+
}),
|
|
70
|
+
color: getLabelTheme({
|
|
71
|
+
theme,
|
|
72
|
+
...validateProps({
|
|
73
|
+
variant
|
|
74
|
+
})
|
|
75
|
+
}),
|
|
76
|
+
'& .introjs-skipbutton': {
|
|
77
|
+
color: getLabelTheme({
|
|
78
|
+
theme,
|
|
79
|
+
...validateProps({
|
|
80
|
+
variant
|
|
81
|
+
})
|
|
82
|
+
})
|
|
83
|
+
},
|
|
84
|
+
'& .introjs-nextbutton': {
|
|
85
|
+
backgroundColor: "".concat(getButtonTheme({
|
|
86
|
+
theme,
|
|
87
|
+
...validateProps({
|
|
88
|
+
variant
|
|
89
|
+
})
|
|
90
|
+
}), " !important"),
|
|
91
|
+
color: "".concat(getButtonNextTextTheme({
|
|
92
|
+
theme,
|
|
93
|
+
...validateProps({
|
|
94
|
+
variant
|
|
95
|
+
})
|
|
96
|
+
}), " !important")
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
exports.retrieveStyle = retrieveStyle;
|
|
@@ -94,7 +94,7 @@ const UTWorkflowContainer = _ref => {
|
|
|
94
94
|
label: _stylesModule.default.progressBarLabel,
|
|
95
95
|
root: _stylesModule.default.progress
|
|
96
96
|
},
|
|
97
|
-
value: currentStep * 100 /
|
|
97
|
+
value: currentStep * 100 / stepsCount
|
|
98
98
|
}), /*#__PURE__*/_react.default.createElement(_NavActions.default, {
|
|
99
99
|
backButton: backButton,
|
|
100
100
|
checkbox: checkbox,
|
package/dist/index.js
CHANGED
|
@@ -207,6 +207,12 @@ Object.defineProperty(exports, "UTModal", {
|
|
|
207
207
|
return _UTModal.default;
|
|
208
208
|
}
|
|
209
209
|
});
|
|
210
|
+
Object.defineProperty(exports, "UTOnboarding", {
|
|
211
|
+
enumerable: true,
|
|
212
|
+
get: function () {
|
|
213
|
+
return _UTOnboarding.default;
|
|
214
|
+
}
|
|
215
|
+
});
|
|
210
216
|
Object.defineProperty(exports, "UTPagination", {
|
|
211
217
|
enumerable: true,
|
|
212
218
|
get: function () {
|
|
@@ -444,4 +450,5 @@ var _UTVirtualizedList = _interopRequireDefault(require("./components/UTVirtuali
|
|
|
444
450
|
var _UTWorkflowContainer = _interopRequireDefault(require("./components/UTWorkflowContainer"));
|
|
445
451
|
var _WithLoading = _interopRequireDefault(require("./components/WithLoading"));
|
|
446
452
|
var _WithTouch = _interopRequireDefault(require("./components/WithTouch"));
|
|
453
|
+
var _UTOnboarding = _interopRequireDefault(require("./components/UTOnboarding"));
|
|
447
454
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@widergy/energy-ui",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.8.0",
|
|
4
4
|
"description": "Widergy Web Components",
|
|
5
5
|
"author": "widergy",
|
|
6
6
|
"license": "MIT",
|
|
@@ -39,6 +39,8 @@
|
|
|
39
39
|
"d3": "^7.0.1",
|
|
40
40
|
"dayjs": "^1.10.7",
|
|
41
41
|
"emojilib": "^3.0.10",
|
|
42
|
+
"intro.js": "^7.2.0",
|
|
43
|
+
"intro.js-react": "0.7.1",
|
|
42
44
|
"node-sass": "^8.0.0",
|
|
43
45
|
"numeral": "^2.0.6",
|
|
44
46
|
"object-hash": "^3.0.0",
|