@cloud-ru/ds-uikit-product-welcome-tour 1.2.1 → 1.2.2
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 +6 -0
- package/dist/cjs/helperComponents/TourHint/TourHint.js +16 -2
- package/dist/cjs/helperComponents/TourHint/styles.module.css +0 -3
- package/dist/cjs/style.css +0 -3
- package/dist/esm/helperComponents/TourHint/TourHint.js +17 -3
- package/dist/esm/helperComponents/TourHint/styles.module.css +0 -3
- package/dist/esm/style.css +0 -3
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/src/helperComponents/TourHint/TourHint.tsx +27 -28
- package/src/helperComponents/TourHint/styles.module.scss +0 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 1.2.2 (2026-09-17)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **FF-9082:** use button group in welcome-tour ([bb5f5d0](https://github.com/cloud-ru-tech/snack-v2/commit/bb5f5d01e0e25f8a9caaaca85b2124a9e88bcc58))
|
|
11
|
+
|
|
6
12
|
## 1.2.1 (2026-09-06)
|
|
7
13
|
|
|
8
14
|
### Bug Fixes
|
|
@@ -45,6 +45,20 @@ function TourHint({ backProps, closeProps, primaryProps, skipProps, tooltipProps
|
|
|
45
45
|
(0, jsx_runtime_1.jsxs)("div", { ...tooltipProps, "aria-describedby": step.content ? contentId : undefined, "aria-labelledby": step.title ? titleId : undefined, className: styles_module_scss_1.default.hint, "data-test-id": constants_1.TEST_IDS.hint,
|
|
46
46
|
// Ширину шага движок отдаёт только в свои стили тултипа — у подсказки они свои.
|
|
47
47
|
// `max-width` не трогаем: он держит фолбэк по ширине экрана.
|
|
48
|
-
style: step.width !== undefined ? { width: step.width } : undefined, children: [(step.title || showSkip) && ((0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.header, children: [step.title && ((0, jsx_runtime_1.jsx)(typography_1.Typography, { as: 'div', id: titleId, variant: 'title', size: 'm', "data-test-id": constants_1.TEST_IDS.title, children: step.title })), showSkip && ((0, jsx_runtime_1.jsx)(button_1.Button, { ...skipButtonProps, className: styles_module_scss_1.default.close, appearance: button_1.APPEARANCE.Neutral, "aria-label": labels.close, "data-test-id": constants_1.TEST_IDS.closeIcon, icon: (0, jsx_runtime_1.jsx)(system_1.CrossSVG, {}), view: button_1.VIEW.Simple }))] })), subtitle && ((0, jsx_runtime_1.jsx)(typography_1.Typography, { as: 'p', className: styles_module_scss_1.default.subtitle, variant: 'title', size: 's', weight: 'thin', "data-test-id": constants_1.TEST_IDS.subtitle, children: subtitle })), step.content && ((0, jsx_runtime_1.jsx)(typography_1.Typography, { as: 'div', id: contentId, className: styles_module_scss_1.default.content, variant: 'body', size: 's', "data-test-id": constants_1.TEST_IDS.content, children: step.content })), (0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.footer, children: [showStepIndicator && size > 1 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", { className: styles_module_scss_1.default.visuallyHidden, children: t('progress', { current: index + 1, total: size }) }), (0, jsx_runtime_1.jsx)(TourSteps_1.TourSteps, { current: index, total: size })] })), (
|
|
49
|
-
|
|
48
|
+
style: step.width !== undefined ? { width: step.width } : undefined, children: [(step.title || showSkip) && ((0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.header, children: [step.title && ((0, jsx_runtime_1.jsx)(typography_1.Typography, { as: 'div', id: titleId, variant: 'title', size: 'm', "data-test-id": constants_1.TEST_IDS.title, children: step.title })), showSkip && ((0, jsx_runtime_1.jsx)(button_1.Button, { ...skipButtonProps, className: styles_module_scss_1.default.close, appearance: button_1.APPEARANCE.Neutral, "aria-label": labels.close, "data-test-id": constants_1.TEST_IDS.closeIcon, icon: (0, jsx_runtime_1.jsx)(system_1.CrossSVG, {}), view: button_1.VIEW.Simple }))] })), subtitle && ((0, jsx_runtime_1.jsx)(typography_1.Typography, { as: 'p', className: styles_module_scss_1.default.subtitle, variant: 'title', size: 's', weight: 'thin', "data-test-id": constants_1.TEST_IDS.subtitle, children: subtitle })), step.content && ((0, jsx_runtime_1.jsx)(typography_1.Typography, { as: 'div', id: contentId, className: styles_module_scss_1.default.content, variant: 'body', size: 's', "data-test-id": constants_1.TEST_IDS.content, children: step.content })), (0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.footer, children: [showStepIndicator && size > 1 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", { className: styles_module_scss_1.default.visuallyHidden, children: t('progress', { current: index + 1, total: size }) }), (0, jsx_runtime_1.jsx)(TourSteps_1.TourSteps, { current: index, total: size })] })), (showBack || showPrimary) && ((0, jsx_runtime_1.jsx)(button_1.ButtonGroup, { className: styles_module_scss_1.default.actions, secondaryAction: showBack
|
|
49
|
+
? {
|
|
50
|
+
...backButtonProps,
|
|
51
|
+
appearance: button_1.APPEARANCE.Neutral,
|
|
52
|
+
'data-test-id': constants_1.TEST_IDS.backButton,
|
|
53
|
+
label: labels.back,
|
|
54
|
+
view: button_1.VIEW.Outline,
|
|
55
|
+
}
|
|
56
|
+
: undefined, primaryAction: showPrimary
|
|
57
|
+
? {
|
|
58
|
+
...(isLastStep ? closeButtonProps : primaryButtonProps),
|
|
59
|
+
'data-test-id': isLastStep ? constants_1.TEST_IDS.finishButton : constants_1.TEST_IDS.nextButton,
|
|
60
|
+
label: isLastStep ? labels.finish : labels.next,
|
|
61
|
+
view: button_1.VIEW.Filled,
|
|
62
|
+
}
|
|
63
|
+
: undefined }))] })] }));
|
|
50
64
|
}
|
package/dist/cjs/style.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { APPEARANCE, Button, VIEW } from '@cloud-ru/ds-button';
|
|
2
|
+
import { APPEARANCE, Button, ButtonGroup, VIEW } from '@cloud-ru/ds-button';
|
|
3
3
|
import { CrossSVG } from '@cloud-ru/ds-icons/interface/system';
|
|
4
4
|
import { Typography } from '@cloud-ru/ds-typography';
|
|
5
5
|
import { useId } from 'react';
|
|
@@ -39,6 +39,20 @@ export function TourHint({ backProps, closeProps, primaryProps, skipProps, toolt
|
|
|
39
39
|
_jsxs("div", { ...tooltipProps, "aria-describedby": step.content ? contentId : undefined, "aria-labelledby": step.title ? titleId : undefined, className: styles.hint, "data-test-id": TEST_IDS.hint,
|
|
40
40
|
// Ширину шага движок отдаёт только в свои стили тултипа — у подсказки они свои.
|
|
41
41
|
// `max-width` не трогаем: он держит фолбэк по ширине экрана.
|
|
42
|
-
style: step.width !== undefined ? { width: step.width } : undefined, children: [(step.title || showSkip) && (_jsxs("div", { className: styles.header, children: [step.title && (_jsx(Typography, { as: 'div', id: titleId, variant: 'title', size: 'm', "data-test-id": TEST_IDS.title, children: step.title })), showSkip && (_jsx(Button, { ...skipButtonProps, className: styles.close, appearance: APPEARANCE.Neutral, "aria-label": labels.close, "data-test-id": TEST_IDS.closeIcon, icon: _jsx(CrossSVG, {}), view: VIEW.Simple }))] })), subtitle && (_jsx(Typography, { as: 'p', className: styles.subtitle, variant: 'title', size: 's', weight: 'thin', "data-test-id": TEST_IDS.subtitle, children: subtitle })), step.content && (_jsx(Typography, { as: 'div', id: contentId, className: styles.content, variant: 'body', size: 's', "data-test-id": TEST_IDS.content, children: step.content })), _jsxs("div", { className: styles.footer, children: [showStepIndicator && size > 1 && (_jsxs(_Fragment, { children: [_jsx("span", { className: styles.visuallyHidden, children: t('progress', { current: index + 1, total: size }) }), _jsx(TourSteps, { current: index, total: size })] })),
|
|
43
|
-
|
|
42
|
+
style: step.width !== undefined ? { width: step.width } : undefined, children: [(step.title || showSkip) && (_jsxs("div", { className: styles.header, children: [step.title && (_jsx(Typography, { as: 'div', id: titleId, variant: 'title', size: 'm', "data-test-id": TEST_IDS.title, children: step.title })), showSkip && (_jsx(Button, { ...skipButtonProps, className: styles.close, appearance: APPEARANCE.Neutral, "aria-label": labels.close, "data-test-id": TEST_IDS.closeIcon, icon: _jsx(CrossSVG, {}), view: VIEW.Simple }))] })), subtitle && (_jsx(Typography, { as: 'p', className: styles.subtitle, variant: 'title', size: 's', weight: 'thin', "data-test-id": TEST_IDS.subtitle, children: subtitle })), step.content && (_jsx(Typography, { as: 'div', id: contentId, className: styles.content, variant: 'body', size: 's', "data-test-id": TEST_IDS.content, children: step.content })), _jsxs("div", { className: styles.footer, children: [showStepIndicator && size > 1 && (_jsxs(_Fragment, { children: [_jsx("span", { className: styles.visuallyHidden, children: t('progress', { current: index + 1, total: size }) }), _jsx(TourSteps, { current: index, total: size })] })), (showBack || showPrimary) && (_jsx(ButtonGroup, { className: styles.actions, secondaryAction: showBack
|
|
43
|
+
? {
|
|
44
|
+
...backButtonProps,
|
|
45
|
+
appearance: APPEARANCE.Neutral,
|
|
46
|
+
'data-test-id': TEST_IDS.backButton,
|
|
47
|
+
label: labels.back,
|
|
48
|
+
view: VIEW.Outline,
|
|
49
|
+
}
|
|
50
|
+
: undefined, primaryAction: showPrimary
|
|
51
|
+
? {
|
|
52
|
+
...(isLastStep ? closeButtonProps : primaryButtonProps),
|
|
53
|
+
'data-test-id': isLastStep ? TEST_IDS.finishButton : TEST_IDS.nextButton,
|
|
54
|
+
label: isLastStep ? labels.finish : labels.next,
|
|
55
|
+
view: VIEW.Filled,
|
|
56
|
+
}
|
|
57
|
+
: undefined }))] })] }));
|
|
44
58
|
}
|