@semcore/wizard 16.2.3-prerelease.9 → 16.3.0-prerelease.1
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 +3 -3
- package/lib/cjs/Wizard.js +295 -278
- package/lib/cjs/Wizard.js.map +1 -1
- package/lib/cjs/Wizard.types.js.map +1 -1
- package/lib/cjs/index.js +4 -4
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/style/wizard.shadow.css +12 -12
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js +16 -16
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/Wizard.js +285 -267
- package/lib/es6/Wizard.js.map +1 -1
- package/lib/es6/Wizard.types.js.map +1 -1
- package/lib/es6/style/wizard.shadow.css +12 -12
- package/lib/es6/translations/__intergalactic-dynamic-locales.js +15 -15
- package/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/esm/Wizard.mjs +253 -266
- package/lib/esm/style/wizard.shadow.css +12 -12
- package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +1 -1
- package/lib/types/Wizard.types.d.ts +27 -16
- package/package.json +8 -9
- package/src/Wizard.tsx +7 -5
- package/src/Wizard.types.ts +27 -19
- package/src/style/wizard.shadow.css +12 -12
|
@@ -7,8 +7,8 @@ SWizard {
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
SSidebar {
|
|
10
|
-
background: var(--intergalactic-control-primary-advertising,
|
|
11
|
-
color: var(--intergalactic-text-primary-invert,
|
|
10
|
+
background: var(--intergalactic-control-primary-advertising, oklch(0.64 0.223 299.3));
|
|
11
|
+
color: var(--intergalactic-text-primary-invert, oklch(0.999 0.001 180 / 0.949));
|
|
12
12
|
font-weight: var(--intergalactic-bold, 700);
|
|
13
13
|
font-size: var(--intergalactic-fs-300, 16px);
|
|
14
14
|
line-height: var(--intergalactic-lh-300, 150%);
|
|
@@ -16,8 +16,8 @@ SSidebar {
|
|
|
16
16
|
max-width: 220px;
|
|
17
17
|
flex-shrink: 0;
|
|
18
18
|
box-sizing: border-box;
|
|
19
|
-
border-radius: var(--intergalactic-modal-rounded, 12px) 0 0
|
|
20
|
-
var(--intergalactic-modal-rounded, 12px);
|
|
19
|
+
border-radius: var(--intergalactic-modal-rounded, calc(12px + 2px)) 0 0
|
|
20
|
+
var(--intergalactic-modal-rounded, calc(12px + 2px));
|
|
21
21
|
@media (max-width: 1060px) {
|
|
22
22
|
width: 56px;
|
|
23
23
|
}
|
|
@@ -34,19 +34,19 @@ SSidebar {
|
|
|
34
34
|
line-height: var(--intergalactic-lh-200, 142%);
|
|
35
35
|
|
|
36
36
|
&:focus-visible {
|
|
37
|
-
outline-color: var(--intergalactic-keyboard-focus-invert-outline,
|
|
37
|
+
outline-color: var(--intergalactic-keyboard-focus-invert-outline, oklch(1 0 0 / 0.7));
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
&:hover {
|
|
41
|
-
background: var(--intergalactic-control-primary-advertising-hover,
|
|
41
|
+
background: var(--intergalactic-control-primary-advertising-hover, oklch(0.6 0.244 297.8));
|
|
42
42
|
z-index: 2;
|
|
43
43
|
}
|
|
44
44
|
&[active] {
|
|
45
|
-
background: var(--intergalactic-control-primary-advertising-active,
|
|
45
|
+
background: var(--intergalactic-control-primary-advertising-active, oklch(0.58 0.254 297.1));
|
|
46
46
|
}
|
|
47
47
|
&:disabled,
|
|
48
48
|
&[disabled] {
|
|
49
|
-
opacity: var(--intergalactic-disabled-opacity, 0.
|
|
49
|
+
opacity: var(--intergalactic-disabled-opacity, 0.4);
|
|
50
50
|
cursor: default;
|
|
51
51
|
pointer-events: none; /* Disable interactions */
|
|
52
52
|
}
|
|
@@ -63,7 +63,7 @@ SSidebar {
|
|
|
63
63
|
overflow: auto;
|
|
64
64
|
}
|
|
65
65
|
&[active]:hover SStepDescription {
|
|
66
|
-
background: var(--intergalactic-control-primary-advertising-active,
|
|
66
|
+
background: var(--intergalactic-control-primary-advertising-active, oklch(0.58 0.254 297.1));
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
}
|
|
@@ -98,12 +98,12 @@ SStepDescription {
|
|
|
98
98
|
SContent {
|
|
99
99
|
padding: var(--intergalactic-spacing-10x, 40px);
|
|
100
100
|
width: 100%;
|
|
101
|
-
border-radius: 0 var(--intergalactic-modal-rounded, 12px) var(--intergalactic-modal-rounded, 12px)
|
|
101
|
+
border-radius: 0 var(--intergalactic-modal-rounded, calc(12px + 2px)) var(--intergalactic-modal-rounded, calc(12px + 2px))
|
|
102
102
|
0;
|
|
103
|
-
background: var(--intergalactic-bg-primary-neutral,
|
|
103
|
+
background: var(--intergalactic-bg-primary-neutral, oklch(1 0 0));
|
|
104
104
|
}
|
|
105
105
|
SContent[noSidebar] {
|
|
106
|
-
border-radius: var(--intergalactic-modal-rounded, 12px);
|
|
106
|
+
border-radius: var(--intergalactic-modal-rounded, calc(12px + 2px));
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
SSidebarMenu {
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import type { BoxProps } from '@semcore/base-components';
|
|
2
1
|
import type { ButtonProps } from '@semcore/button';
|
|
3
|
-
import type { Intergalactic } from '@semcore/core';
|
|
2
|
+
import type { UnknownProperties, Intergalactic } from '@semcore/core';
|
|
4
3
|
import type { useI18n } from '@semcore/core/lib/utils/enhances/WithI18n';
|
|
4
|
+
import type { BoxProps } from '@semcore/flex-box';
|
|
5
5
|
import type { ModalProps } from '@semcore/modal';
|
|
6
6
|
import type React from 'react';
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
export type WizardStep = string | number | boolean;
|
|
8
|
+
/** @deprecated */
|
|
9
|
+
export interface IWizardProps extends WizardProps, UnknownProperties {
|
|
10
|
+
}
|
|
9
11
|
export type WizardProps = ModalProps & {
|
|
10
12
|
/**
|
|
11
13
|
* Active step value
|
|
@@ -14,6 +16,9 @@ export type WizardProps = ModalProps & {
|
|
|
14
16
|
/** Specifies the locale for i18n support */
|
|
15
17
|
locale?: string;
|
|
16
18
|
};
|
|
19
|
+
/** @deprecated */
|
|
20
|
+
export interface IWizardSidebarProps extends WizardSidebarProps, UnknownProperties {
|
|
21
|
+
}
|
|
17
22
|
export type WizardSidebarProps = BoxProps & {
|
|
18
23
|
/**
|
|
19
24
|
* Sidebar title
|
|
@@ -24,9 +29,12 @@ export type WizardSidebarProps = BoxProps & {
|
|
|
24
29
|
*/
|
|
25
30
|
id?: string;
|
|
26
31
|
};
|
|
32
|
+
/** @deprecated */
|
|
33
|
+
export interface IWizardStepProps extends WizardStepProps, UnknownProperties {
|
|
34
|
+
}
|
|
27
35
|
export type WizardStepProps = BoxProps & {
|
|
28
36
|
/**
|
|
29
|
-
*
|
|
37
|
+
* Step value
|
|
30
38
|
*/
|
|
31
39
|
step: WizardStep;
|
|
32
40
|
/**
|
|
@@ -39,15 +47,18 @@ export type WizardStepProps = BoxProps & {
|
|
|
39
47
|
*/
|
|
40
48
|
active?: boolean;
|
|
41
49
|
};
|
|
42
|
-
|
|
50
|
+
/** @deprecated */
|
|
51
|
+
export interface IWizardStepperProps extends WizardStepperProps, UnknownProperties {
|
|
52
|
+
}
|
|
53
|
+
export type WizardStepperProps<T extends WizardStep = WizardStep> = BoxProps & {
|
|
43
54
|
/**
|
|
44
|
-
*
|
|
55
|
+
* Step value
|
|
45
56
|
*/
|
|
46
|
-
step:
|
|
57
|
+
step: T;
|
|
47
58
|
/**
|
|
48
59
|
* Is invoked when active the step
|
|
49
60
|
*/
|
|
50
|
-
onActive?: ((step:
|
|
61
|
+
onActive?: ((step: T, e: React.SyntheticEvent<HTMLElement> | React.KeyboardEvent) => void) | React.Dispatch<React.SetStateAction<T>>;
|
|
51
62
|
/**
|
|
52
63
|
* Stepper number
|
|
53
64
|
* @default incremental value
|
|
@@ -81,39 +92,39 @@ export type WizardContentProps = BoxProps & {
|
|
|
81
92
|
*/
|
|
82
93
|
noSidebar?: boolean;
|
|
83
94
|
};
|
|
84
|
-
export type WizardStepBackProps = ButtonProps & {
|
|
95
|
+
export type WizardStepBackProps<T extends WizardStep = WizardStep> = ButtonProps & {
|
|
85
96
|
/** Callback invoked when navigating to the previous step */
|
|
86
|
-
onActive?: ((step:
|
|
97
|
+
onActive?: ((step: T, e?: React.SyntheticEvent<HTMLElement>) => void) | React.Dispatch<React.SetStateAction<T>>;
|
|
87
98
|
/** Step name being navigated to */
|
|
88
99
|
stepName?: string;
|
|
89
100
|
/**
|
|
90
101
|
* CurrentStep
|
|
91
102
|
* @internal
|
|
92
103
|
*/
|
|
93
|
-
step?:
|
|
104
|
+
step?: number;
|
|
94
105
|
/**
|
|
95
106
|
* Translation function
|
|
96
107
|
* @internal
|
|
97
108
|
*/
|
|
98
109
|
getI18nText?: ReturnType<typeof useI18n>;
|
|
99
110
|
};
|
|
100
|
-
export type WizardStepNextProps = ButtonProps & {
|
|
111
|
+
export type WizardStepNextProps<T extends WizardStep = WizardStep> = ButtonProps & {
|
|
101
112
|
/** Callback invoked when navigating to the next step */
|
|
102
|
-
onActive?: ((step:
|
|
113
|
+
onActive?: ((step: T, e?: React.SyntheticEvent<HTMLElement>) => void) | React.Dispatch<React.SetStateAction<T>>;
|
|
103
114
|
/** Step name being navigated to */
|
|
104
115
|
stepName?: string;
|
|
105
116
|
/**
|
|
106
117
|
* CurrentStep
|
|
107
118
|
* @internal
|
|
108
119
|
*/
|
|
109
|
-
step?:
|
|
120
|
+
step?: number;
|
|
110
121
|
/**
|
|
111
122
|
* Translation function
|
|
112
123
|
* @internal
|
|
113
124
|
*/
|
|
114
125
|
getI18nText?: ReturnType<typeof useI18n>;
|
|
115
126
|
};
|
|
116
|
-
export type IntergalacticWizardStepperComponent<PropsExtending = {}> = (<Tag extends Intergalactic.Tag = 'div'>(props: Intergalactic.InternalTypings.ComponentProps<Tag, 'div', WizardStepperProps
|
|
127
|
+
export type IntergalacticWizardStepperComponent<PropsExtending = {}> = (<Value extends WizardStep, Tag extends Intergalactic.Tag = 'div'>(props: Intergalactic.InternalTypings.ComponentProps<Tag, 'div', WizardStepperProps<Value>> & PropsExtending) => Intergalactic.InternalTypings.ComponentRenderingResults) & Intergalactic.InternalTypings.ComponentAdditive<'div', 'div', WizardStepperProps>;
|
|
117
128
|
export type WizardType = Intergalactic.Component<'div', WizardProps> & {
|
|
118
129
|
Sidebar: Intergalactic.Component<'div', WizardSidebarProps>;
|
|
119
130
|
Step: Intergalactic.Component<'div', WizardStepProps>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/wizard",
|
|
3
3
|
"description": "Semrush Wizard Component",
|
|
4
|
-
"version": "16.
|
|
4
|
+
"version": "16.3.0-prerelease.1",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -14,12 +14,13 @@
|
|
|
14
14
|
"types": "./lib/types/index.d.ts"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@semcore/button": "16.0
|
|
18
|
-
"@semcore/
|
|
17
|
+
"@semcore/button": "16.1.0-prerelease.1",
|
|
18
|
+
"@semcore/flex-box": "16.1.0-prerelease.1",
|
|
19
|
+
"@semcore/icon": "16.8.0-prerelease.1",
|
|
20
|
+
"@semcore/modal": "16.2.0-prerelease.1"
|
|
19
21
|
},
|
|
20
22
|
"peerDependencies": {
|
|
21
|
-
"@semcore/base-components": "^16.
|
|
22
|
-
"@semcore/icon": "^16.7.2-prerelease.9"
|
|
23
|
+
"@semcore/base-components": "^16.6.0-prerelease.1"
|
|
23
24
|
},
|
|
24
25
|
"repository": {
|
|
25
26
|
"type": "git",
|
|
@@ -27,10 +28,8 @@
|
|
|
27
28
|
"directory": "semcore/wizard"
|
|
28
29
|
},
|
|
29
30
|
"devDependencies": {
|
|
30
|
-
"@semcore/core": "16.
|
|
31
|
-
"@semcore/testing-utils": "1.0.0"
|
|
32
|
-
"@semcore/base-components": "16.4.3-prerelease.9",
|
|
33
|
-
"@semcore/icon": "16.7.2-prerelease.9"
|
|
31
|
+
"@semcore/core": "16.6.0-prerelease.1",
|
|
32
|
+
"@semcore/testing-utils": "1.0.0"
|
|
34
33
|
},
|
|
35
34
|
"scripts": {
|
|
36
35
|
"build": "pnpm semcore-builder && pnpm vite build"
|
package/src/Wizard.tsx
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { ScreenReaderOnly, Box } from '@semcore/base-components';
|
|
2
1
|
import Button from '@semcore/button';
|
|
3
2
|
import { createComponent, Component, Root, sstyled } from '@semcore/core';
|
|
4
3
|
import type { IRootComponentProps, Intergalactic } from '@semcore/core';
|
|
5
4
|
import i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';
|
|
5
|
+
import keyboardFocusEnhance from '@semcore/core/lib/utils/enhances/keyboardFocusEnhance';
|
|
6
6
|
import findComponent from '@semcore/core/lib/utils/findComponent';
|
|
7
7
|
import uniqueIDEnhancement from '@semcore/core/lib/utils/uniqueID';
|
|
8
8
|
import { setFocus } from '@semcore/core/lib/utils/use/useFocusLock';
|
|
9
|
+
import { ScreenReaderOnly, Box } from '@semcore/flex-box';
|
|
9
10
|
import ArrowLeft from '@semcore/icon/ArrowLeft/m';
|
|
10
11
|
import ArrowRight from '@semcore/icon/ArrowRight/m';
|
|
11
12
|
import CheckM from '@semcore/icon/Check/m';
|
|
@@ -31,7 +32,7 @@ type State = {
|
|
|
31
32
|
highlighted: number;
|
|
32
33
|
};
|
|
33
34
|
|
|
34
|
-
class WizardRoot extends Component<WizardProps,
|
|
35
|
+
class WizardRoot extends Component<WizardProps, {}, State, typeof WizardRoot.enhance> {
|
|
35
36
|
static displayName = 'Wizard';
|
|
36
37
|
static style = style;
|
|
37
38
|
static enhance = [i18nEnhance(localizedMessages), uniqueIDEnhancement()] as const;
|
|
@@ -48,6 +49,7 @@ class WizardRoot extends Component<WizardProps, typeof WizardRoot.enhance, {}, {
|
|
|
48
49
|
stepperRefs: Array<HTMLElement | null> = [];
|
|
49
50
|
|
|
50
51
|
state: State = {
|
|
52
|
+
// @ts-ignore
|
|
51
53
|
highlighted: this.props.step,
|
|
52
54
|
};
|
|
53
55
|
|
|
@@ -170,7 +172,7 @@ class WizardRoot extends Component<WizardProps, typeof WizardRoot.enhance, {}, {
|
|
|
170
172
|
|
|
171
173
|
componentDidUpdate(prevProps: WizardProps) {
|
|
172
174
|
if (prevProps.step === this.asProps.step) return;
|
|
173
|
-
|
|
175
|
+
// @ts-ignore
|
|
174
176
|
this.setState({ highlighted: this.asProps.step });
|
|
175
177
|
setTimeout(() => {
|
|
176
178
|
if (prevProps.step === this.asProps.step) return;
|
|
@@ -239,7 +241,6 @@ function Stepper(props: Required<WizardStepperProps> & IRootComponentProps) {
|
|
|
239
241
|
getI18nText,
|
|
240
242
|
focusNext,
|
|
241
243
|
focusPrev,
|
|
242
|
-
disabled,
|
|
243
244
|
} = props;
|
|
244
245
|
const SStepper = Root;
|
|
245
246
|
const SStepNumber = 'span';
|
|
@@ -275,7 +276,6 @@ function Stepper(props: Required<WizardStepperProps> & IRootComponentProps) {
|
|
|
275
276
|
<SStepper
|
|
276
277
|
render={Box}
|
|
277
278
|
role='tab'
|
|
278
|
-
tabIndex={disabled ? undefined : 0}
|
|
279
279
|
onClick={handlerClick}
|
|
280
280
|
onKeyDown={handlerKeyDown}
|
|
281
281
|
>
|
|
@@ -288,6 +288,8 @@ function Stepper(props: Required<WizardStepperProps> & IRootComponentProps) {
|
|
|
288
288
|
);
|
|
289
289
|
}
|
|
290
290
|
|
|
291
|
+
Stepper.enhance = [keyboardFocusEnhance()];
|
|
292
|
+
|
|
291
293
|
function Content(props: WizardContentProps & IRootComponentProps) {
|
|
292
294
|
const { Children, styles } = props;
|
|
293
295
|
const SContent = Root;
|
package/src/Wizard.types.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import type { BoxProps } from '@semcore/base-components';
|
|
2
1
|
import type { ButtonProps } from '@semcore/button';
|
|
3
|
-
import type { Intergalactic } from '@semcore/core';
|
|
2
|
+
import type { UnknownProperties, Intergalactic } from '@semcore/core';
|
|
4
3
|
import type { useI18n } from '@semcore/core/lib/utils/enhances/WithI18n';
|
|
4
|
+
import type { BoxProps } from '@semcore/flex-box';
|
|
5
5
|
import type { ModalProps } from '@semcore/modal';
|
|
6
6
|
import type React from 'react';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
export type WizardStep = number;
|
|
8
|
+
export type WizardStep = string | number | boolean;
|
|
10
9
|
|
|
10
|
+
/** @deprecated */
|
|
11
|
+
export interface IWizardProps extends WizardProps, UnknownProperties {}
|
|
11
12
|
export type WizardProps = ModalProps & {
|
|
12
13
|
/**
|
|
13
14
|
* Active step value
|
|
@@ -17,6 +18,8 @@ export type WizardProps = ModalProps & {
|
|
|
17
18
|
locale?: string;
|
|
18
19
|
};
|
|
19
20
|
|
|
21
|
+
/** @deprecated */
|
|
22
|
+
export interface IWizardSidebarProps extends WizardSidebarProps, UnknownProperties {}
|
|
20
23
|
export type WizardSidebarProps = BoxProps & {
|
|
21
24
|
/**
|
|
22
25
|
* Sidebar title
|
|
@@ -29,9 +32,11 @@ export type WizardSidebarProps = BoxProps & {
|
|
|
29
32
|
id?: string;
|
|
30
33
|
};
|
|
31
34
|
|
|
35
|
+
/** @deprecated */
|
|
36
|
+
export interface IWizardStepProps extends WizardStepProps, UnknownProperties {}
|
|
32
37
|
export type WizardStepProps = BoxProps & {
|
|
33
38
|
/**
|
|
34
|
-
*
|
|
39
|
+
* Step value
|
|
35
40
|
*/
|
|
36
41
|
step: WizardStep;
|
|
37
42
|
/**
|
|
@@ -45,17 +50,19 @@ export type WizardStepProps = BoxProps & {
|
|
|
45
50
|
active?: boolean;
|
|
46
51
|
};
|
|
47
52
|
|
|
48
|
-
|
|
53
|
+
/** @deprecated */
|
|
54
|
+
export interface IWizardStepperProps extends WizardStepperProps, UnknownProperties {}
|
|
55
|
+
export type WizardStepperProps<T extends WizardStep = WizardStep> = BoxProps & {
|
|
49
56
|
/**
|
|
50
|
-
*
|
|
57
|
+
* Step value
|
|
51
58
|
*/
|
|
52
|
-
step:
|
|
59
|
+
step: T;
|
|
53
60
|
/**
|
|
54
61
|
* Is invoked when active the step
|
|
55
62
|
*/
|
|
56
63
|
onActive?:
|
|
57
|
-
| ((step:
|
|
58
|
-
| React.Dispatch<React.SetStateAction<
|
|
64
|
+
| ((step: T, e: React.SyntheticEvent<HTMLElement> | React.KeyboardEvent) => void)
|
|
65
|
+
| React.Dispatch<React.SetStateAction<T>>;
|
|
59
66
|
/**
|
|
60
67
|
* Stepper number
|
|
61
68
|
* @default incremental value
|
|
@@ -93,11 +100,11 @@ export type WizardContentProps = BoxProps & {
|
|
|
93
100
|
noSidebar?: boolean;
|
|
94
101
|
};
|
|
95
102
|
|
|
96
|
-
export type WizardStepBackProps = ButtonProps & {
|
|
103
|
+
export type WizardStepBackProps<T extends WizardStep = WizardStep> = ButtonProps & {
|
|
97
104
|
/** Callback invoked when navigating to the previous step */
|
|
98
105
|
onActive?:
|
|
99
|
-
| ((step:
|
|
100
|
-
| React.Dispatch<React.SetStateAction<
|
|
106
|
+
| ((step: T, e?: React.SyntheticEvent<HTMLElement>) => void)
|
|
107
|
+
| React.Dispatch<React.SetStateAction<T>>;
|
|
101
108
|
/** Step name being navigated to */
|
|
102
109
|
stepName?: string;
|
|
103
110
|
|
|
@@ -105,18 +112,18 @@ export type WizardStepBackProps = ButtonProps & {
|
|
|
105
112
|
* CurrentStep
|
|
106
113
|
* @internal
|
|
107
114
|
*/
|
|
108
|
-
step?:
|
|
115
|
+
step?: number;
|
|
109
116
|
/**
|
|
110
117
|
* Translation function
|
|
111
118
|
* @internal
|
|
112
119
|
*/
|
|
113
120
|
getI18nText?: ReturnType<typeof useI18n>;
|
|
114
121
|
};
|
|
115
|
-
export type WizardStepNextProps = ButtonProps & {
|
|
122
|
+
export type WizardStepNextProps<T extends WizardStep = WizardStep> = ButtonProps & {
|
|
116
123
|
/** Callback invoked when navigating to the next step */
|
|
117
124
|
onActive?:
|
|
118
|
-
| ((step:
|
|
119
|
-
| React.Dispatch<React.SetStateAction<
|
|
125
|
+
| ((step: T, e?: React.SyntheticEvent<HTMLElement>) => void)
|
|
126
|
+
| React.Dispatch<React.SetStateAction<T>>;
|
|
120
127
|
/** Step name being navigated to */
|
|
121
128
|
stepName?: string;
|
|
122
129
|
|
|
@@ -124,7 +131,7 @@ export type WizardStepNextProps = ButtonProps & {
|
|
|
124
131
|
* CurrentStep
|
|
125
132
|
* @internal
|
|
126
133
|
*/
|
|
127
|
-
step?:
|
|
134
|
+
step?: number;
|
|
128
135
|
/**
|
|
129
136
|
* Translation function
|
|
130
137
|
* @internal
|
|
@@ -133,9 +140,10 @@ export type WizardStepNextProps = ButtonProps & {
|
|
|
133
140
|
};
|
|
134
141
|
|
|
135
142
|
export type IntergalacticWizardStepperComponent<PropsExtending = {}> = (<
|
|
143
|
+
Value extends WizardStep,
|
|
136
144
|
Tag extends Intergalactic.Tag = 'div',
|
|
137
145
|
>(
|
|
138
|
-
props: Intergalactic.InternalTypings.ComponentProps<Tag, 'div', WizardStepperProps
|
|
146
|
+
props: Intergalactic.InternalTypings.ComponentProps<Tag, 'div', WizardStepperProps<Value>> &
|
|
139
147
|
PropsExtending,
|
|
140
148
|
) => Intergalactic.InternalTypings.ComponentRenderingResults) &
|
|
141
149
|
Intergalactic.InternalTypings.ComponentAdditive<'div', 'div', WizardStepperProps>;
|
|
@@ -7,8 +7,8 @@ SWizard {
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
SSidebar {
|
|
10
|
-
background: var(--intergalactic-control-primary-advertising,
|
|
11
|
-
color: var(--intergalactic-text-primary-invert,
|
|
10
|
+
background: var(--intergalactic-control-primary-advertising, oklch(0.64 0.223 299.3));
|
|
11
|
+
color: var(--intergalactic-text-primary-invert, oklch(0.999 0.001 180 / 0.949));
|
|
12
12
|
font-weight: var(--intergalactic-bold, 700);
|
|
13
13
|
font-size: var(--intergalactic-fs-300, 16px);
|
|
14
14
|
line-height: var(--intergalactic-lh-300, 150%);
|
|
@@ -16,8 +16,8 @@ SSidebar {
|
|
|
16
16
|
max-width: 220px;
|
|
17
17
|
flex-shrink: 0;
|
|
18
18
|
box-sizing: border-box;
|
|
19
|
-
border-radius: var(--intergalactic-modal-rounded, 12px) 0 0
|
|
20
|
-
var(--intergalactic-modal-rounded, 12px);
|
|
19
|
+
border-radius: var(--intergalactic-modal-rounded, calc(12px + 2px)) 0 0
|
|
20
|
+
var(--intergalactic-modal-rounded, calc(12px + 2px));
|
|
21
21
|
@media (max-width: 1060px) {
|
|
22
22
|
width: 56px;
|
|
23
23
|
}
|
|
@@ -34,19 +34,19 @@ SSidebar {
|
|
|
34
34
|
line-height: var(--intergalactic-lh-200, 142%);
|
|
35
35
|
|
|
36
36
|
&:focus-visible {
|
|
37
|
-
outline-color: var(--intergalactic-keyboard-focus-invert-outline,
|
|
37
|
+
outline-color: var(--intergalactic-keyboard-focus-invert-outline, oklch(1 0 0 / 0.7));
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
&:hover {
|
|
41
|
-
background: var(--intergalactic-control-primary-advertising-hover,
|
|
41
|
+
background: var(--intergalactic-control-primary-advertising-hover, oklch(0.6 0.244 297.8));
|
|
42
42
|
z-index: 2;
|
|
43
43
|
}
|
|
44
44
|
&[active] {
|
|
45
|
-
background: var(--intergalactic-control-primary-advertising-active,
|
|
45
|
+
background: var(--intergalactic-control-primary-advertising-active, oklch(0.58 0.254 297.1));
|
|
46
46
|
}
|
|
47
47
|
&:disabled,
|
|
48
48
|
&[disabled] {
|
|
49
|
-
opacity: var(--intergalactic-disabled-opacity, 0.
|
|
49
|
+
opacity: var(--intergalactic-disabled-opacity, 0.4);
|
|
50
50
|
cursor: default;
|
|
51
51
|
pointer-events: none; /* Disable interactions */
|
|
52
52
|
}
|
|
@@ -63,7 +63,7 @@ SSidebar {
|
|
|
63
63
|
overflow: auto;
|
|
64
64
|
}
|
|
65
65
|
&[active]:hover SStepDescription {
|
|
66
|
-
background: var(--intergalactic-control-primary-advertising-active,
|
|
66
|
+
background: var(--intergalactic-control-primary-advertising-active, oklch(0.58 0.254 297.1));
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
}
|
|
@@ -98,12 +98,12 @@ SStepDescription {
|
|
|
98
98
|
SContent {
|
|
99
99
|
padding: var(--intergalactic-spacing-10x, 40px);
|
|
100
100
|
width: 100%;
|
|
101
|
-
border-radius: 0 var(--intergalactic-modal-rounded, 12px) var(--intergalactic-modal-rounded, 12px)
|
|
101
|
+
border-radius: 0 var(--intergalactic-modal-rounded, calc(12px + 2px)) var(--intergalactic-modal-rounded, calc(12px + 2px))
|
|
102
102
|
0;
|
|
103
|
-
background: var(--intergalactic-bg-primary-neutral,
|
|
103
|
+
background: var(--intergalactic-bg-primary-neutral, oklch(1 0 0));
|
|
104
104
|
}
|
|
105
105
|
SContent[noSidebar] {
|
|
106
|
-
border-radius: var(--intergalactic-modal-rounded, 12px);
|
|
106
|
+
border-radius: var(--intergalactic-modal-rounded, calc(12px + 2px));
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
SSidebarMenu {
|