@semcore/wizard 2.55.0-prerelease.1 → 2.55.0-prerelease.5
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/lib/cjs/Wizard.js +129 -109
- package/lib/cjs/Wizard.js.map +1 -1
- package/lib/cjs/Wizard.types.js +2 -0
- package/lib/cjs/Wizard.types.js.map +1 -0
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/style/wizard.shadow.css +54 -46
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js +4 -5
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/cjs/translations/de.json +1 -1
- package/lib/cjs/translations/es.json +1 -1
- package/lib/cjs/translations/fr.json +1 -1
- package/lib/cjs/translations/it.json +1 -1
- package/lib/cjs/translations/ja.json +1 -1
- package/lib/cjs/translations/ko.json +1 -1
- package/lib/cjs/translations/nl.json +1 -1
- package/lib/cjs/translations/pl.json +1 -1
- package/lib/cjs/translations/pt.json +1 -1
- package/lib/cjs/translations/sv.json +1 -1
- package/lib/cjs/translations/tr.json +1 -1
- package/lib/cjs/translations/vi.json +1 -1
- package/lib/cjs/translations/zh.json +1 -1
- package/lib/es6/Wizard.js +121 -98
- package/lib/es6/Wizard.js.map +1 -1
- package/lib/es6/Wizard.types.js +2 -0
- package/lib/es6/Wizard.types.js.map +1 -0
- package/lib/es6/index.js.map +1 -1
- package/lib/es6/style/wizard.shadow.css +54 -46
- package/lib/es6/translations/__intergalactic-dynamic-locales.js +2 -2
- package/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/translations/de.json +1 -1
- package/lib/es6/translations/es.json +1 -1
- package/lib/es6/translations/fr.json +1 -1
- package/lib/es6/translations/it.json +1 -1
- package/lib/es6/translations/ja.json +1 -1
- package/lib/es6/translations/ko.json +1 -1
- package/lib/es6/translations/nl.json +1 -1
- package/lib/es6/translations/pl.json +1 -1
- package/lib/es6/translations/pt.json +1 -1
- package/lib/es6/translations/sv.json +1 -1
- package/lib/es6/translations/tr.json +1 -1
- package/lib/es6/translations/vi.json +1 -1
- package/lib/es6/translations/zh.json +1 -1
- package/lib/esm/Wizard.mjs +125 -99
- package/lib/esm/style/wizard.shadow.css +54 -46
- package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +2 -2
- package/lib/esm/translations/de.json.mjs +1 -1
- package/lib/esm/translations/es.json.mjs +1 -1
- package/lib/esm/translations/fr.json.mjs +1 -1
- package/lib/esm/translations/it.json.mjs +1 -1
- package/lib/esm/translations/ja.json.mjs +1 -1
- package/lib/esm/translations/ko.json.mjs +1 -1
- package/lib/esm/translations/nl.json.mjs +1 -1
- package/lib/esm/translations/pl.json.mjs +1 -1
- package/lib/esm/translations/pt.json.mjs +1 -1
- package/lib/esm/translations/sv.json.mjs +1 -1
- package/lib/esm/translations/tr.json.mjs +1 -1
- package/lib/esm/translations/vi.json.mjs +1 -1
- package/lib/esm/translations/zh.json.mjs +1 -1
- package/lib/types/Wizard.d.ts +6 -0
- package/lib/types/Wizard.types.d.ts +124 -0
- package/lib/types/index.d.ts +3 -108
- package/lib/types/translations/__intergalactic-dynamic-locales.d.ts +72 -0
- package/package.json +7 -7
- package/src/style/wizard.shadow.css +11 -1
- package/lib/cjs/index.d.js +0 -2
- package/lib/cjs/index.d.js.map +0 -1
- package/lib/es6/index.d.js +0 -2
- package/lib/es6/index.d.js.map +0 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Intergalactic } from '@semcore/core';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { IntergalacticWizardStepperComponent, WizardType } from './Wizard.types';
|
|
4
|
+
declare const Wizard: WizardType;
|
|
5
|
+
export declare const wrapWizardStepper: <PropsExtending extends {}>(wrapper: (props: Intergalactic.InternalTypings.UntypeRefAndTag<Intergalactic.InternalTypings.ComponentPropsNesting<IntergalacticWizardStepperComponent>> & PropsExtending) => React.ReactNode) => IntergalacticWizardStepperComponent<PropsExtending>;
|
|
6
|
+
export default Wizard;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import type { BoxProps } from '@semcore/base-components';
|
|
2
|
+
import type { ButtonProps } from '@semcore/button';
|
|
3
|
+
import type { Intergalactic } from '@semcore/core';
|
|
4
|
+
import type { useI18n } from '@semcore/core/lib/utils/enhances/WithI18n';
|
|
5
|
+
import type { ModalProps } from '@semcore/modal';
|
|
6
|
+
import type React from 'react';
|
|
7
|
+
/** Ordered step position from 0 */
|
|
8
|
+
export type WizardStep = number;
|
|
9
|
+
export type WizardProps = ModalProps & {
|
|
10
|
+
/**
|
|
11
|
+
* Active step value
|
|
12
|
+
*/
|
|
13
|
+
step: WizardStep;
|
|
14
|
+
/** Specifies the locale for i18n support */
|
|
15
|
+
locale?: string;
|
|
16
|
+
};
|
|
17
|
+
export type WizardSidebarProps = BoxProps & {
|
|
18
|
+
/**
|
|
19
|
+
* Sidebar title
|
|
20
|
+
*/
|
|
21
|
+
title?: React.ReactNode;
|
|
22
|
+
/**
|
|
23
|
+
* @internal html id attribute
|
|
24
|
+
*/
|
|
25
|
+
id?: string;
|
|
26
|
+
};
|
|
27
|
+
export type WizardStepProps = BoxProps & {
|
|
28
|
+
/**
|
|
29
|
+
* Ordered step position from 0
|
|
30
|
+
*/
|
|
31
|
+
step: WizardStep;
|
|
32
|
+
/**
|
|
33
|
+
* Disabled step
|
|
34
|
+
*/
|
|
35
|
+
disabled?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Active flag
|
|
38
|
+
* @internal
|
|
39
|
+
*/
|
|
40
|
+
active?: boolean;
|
|
41
|
+
};
|
|
42
|
+
export type WizardStepperProps = BoxProps & {
|
|
43
|
+
/**
|
|
44
|
+
* Ordered step position from 0
|
|
45
|
+
*/
|
|
46
|
+
step: WizardStep;
|
|
47
|
+
/**
|
|
48
|
+
* Is invoked when active the step
|
|
49
|
+
*/
|
|
50
|
+
onActive?: ((step: WizardStep, e: React.SyntheticEvent<HTMLElement> | React.KeyboardEvent) => void) | React.Dispatch<React.SetStateAction<WizardStep>>;
|
|
51
|
+
/**
|
|
52
|
+
* Stepper number
|
|
53
|
+
* @default incremental value
|
|
54
|
+
*/
|
|
55
|
+
number?: React.ReactNode;
|
|
56
|
+
/**
|
|
57
|
+
* Is the step completed
|
|
58
|
+
*/
|
|
59
|
+
completed?: boolean;
|
|
60
|
+
/** Disables interaction with the stepper */
|
|
61
|
+
disabled?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Translation function
|
|
64
|
+
* @internal
|
|
65
|
+
*/
|
|
66
|
+
getI18nText?: ReturnType<typeof useI18n>;
|
|
67
|
+
/**
|
|
68
|
+
* Go to next step
|
|
69
|
+
* @internal
|
|
70
|
+
*/
|
|
71
|
+
focusNext?: () => void;
|
|
72
|
+
/**
|
|
73
|
+
* Go to prev step
|
|
74
|
+
* @internal
|
|
75
|
+
*/
|
|
76
|
+
focusPrev?: () => void;
|
|
77
|
+
};
|
|
78
|
+
export type WizardContentProps = BoxProps & {
|
|
79
|
+
/**
|
|
80
|
+
* Renders wizard content container with border-radius on the left side
|
|
81
|
+
*/
|
|
82
|
+
noSidebar?: boolean;
|
|
83
|
+
};
|
|
84
|
+
export type WizardStepBackProps = ButtonProps & {
|
|
85
|
+
/** Callback invoked when navigating to the previous step */
|
|
86
|
+
onActive?: ((step: WizardStep, e?: React.SyntheticEvent<HTMLElement>) => void) | React.Dispatch<React.SetStateAction<WizardStep>>;
|
|
87
|
+
/** Step name being navigated to */
|
|
88
|
+
stepName?: string;
|
|
89
|
+
/**
|
|
90
|
+
* CurrentStep
|
|
91
|
+
* @internal
|
|
92
|
+
*/
|
|
93
|
+
step?: WizardStep;
|
|
94
|
+
/**
|
|
95
|
+
* Translation function
|
|
96
|
+
* @internal
|
|
97
|
+
*/
|
|
98
|
+
getI18nText?: ReturnType<typeof useI18n>;
|
|
99
|
+
};
|
|
100
|
+
export type WizardStepNextProps = ButtonProps & {
|
|
101
|
+
/** Callback invoked when navigating to the next step */
|
|
102
|
+
onActive?: ((step: WizardStep, e?: React.SyntheticEvent<HTMLElement>) => void) | React.Dispatch<React.SetStateAction<WizardStep>>;
|
|
103
|
+
/** Step name being navigated to */
|
|
104
|
+
stepName?: string;
|
|
105
|
+
/**
|
|
106
|
+
* CurrentStep
|
|
107
|
+
* @internal
|
|
108
|
+
*/
|
|
109
|
+
step?: WizardStep;
|
|
110
|
+
/**
|
|
111
|
+
* Translation function
|
|
112
|
+
* @internal
|
|
113
|
+
*/
|
|
114
|
+
getI18nText?: ReturnType<typeof useI18n>;
|
|
115
|
+
};
|
|
116
|
+
export type IntergalacticWizardStepperComponent<PropsExtending = {}> = (<Tag extends Intergalactic.Tag = 'div'>(props: Intergalactic.InternalTypings.ComponentProps<Tag, 'div', WizardStepperProps> & PropsExtending) => Intergalactic.InternalTypings.ComponentRenderingResults) & Intergalactic.InternalTypings.ComponentAdditive<'div', 'div', WizardStepperProps>;
|
|
117
|
+
export type WizardType = Intergalactic.Component<'div', WizardProps> & {
|
|
118
|
+
Sidebar: Intergalactic.Component<'div', WizardSidebarProps>;
|
|
119
|
+
Step: Intergalactic.Component<'div', WizardStepProps>;
|
|
120
|
+
Stepper: IntergalacticWizardStepperComponent;
|
|
121
|
+
Content: Intergalactic.Component<'div', WizardContentProps>;
|
|
122
|
+
StepBack: Intergalactic.Component<'button', WizardStepBackProps>;
|
|
123
|
+
StepNext: Intergalactic.Component<'button', WizardStepNextProps>;
|
|
124
|
+
};
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,108 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { ButtonProps } from '@semcore/button';
|
|
5
|
-
import { ModalProps } from '@semcore/modal';
|
|
6
|
-
|
|
7
|
-
export type WizardStep = string | number | boolean;
|
|
8
|
-
|
|
9
|
-
/** @deprecated */
|
|
10
|
-
export interface IWizardProps extends WizardProps, UnknownProperties {}
|
|
11
|
-
export type WizardProps = ModalProps & {
|
|
12
|
-
/**
|
|
13
|
-
* Active step value
|
|
14
|
-
*/
|
|
15
|
-
step: WizardStep;
|
|
16
|
-
locale?: string;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
/** @deprecated */
|
|
20
|
-
export interface IWizardSidebarProps extends WizardSidebarProps, UnknownProperties {}
|
|
21
|
-
export type WizardSidebarProps = BoxProps & {
|
|
22
|
-
/**
|
|
23
|
-
* Sidebar title
|
|
24
|
-
*/
|
|
25
|
-
title?: React.ReactNode;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
/** @deprecated */
|
|
29
|
-
export interface IWizardStepProps extends WizardStepProps, UnknownProperties {}
|
|
30
|
-
export type WizardStepProps = BoxProps & {
|
|
31
|
-
/**
|
|
32
|
-
* Step value
|
|
33
|
-
*/
|
|
34
|
-
step: WizardStep;
|
|
35
|
-
/**
|
|
36
|
-
* Disabled step
|
|
37
|
-
*/
|
|
38
|
-
disabled?: boolean;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
/** @deprecated */
|
|
42
|
-
export interface IWizardStepperProps extends WizardStepperProps, UnknownProperties {}
|
|
43
|
-
export type WizardStepperProps<T extends WizardStep = WizardStep> = BoxProps & {
|
|
44
|
-
/**
|
|
45
|
-
* Step value
|
|
46
|
-
*/
|
|
47
|
-
step: T;
|
|
48
|
-
/**
|
|
49
|
-
* Is invoked when active the step
|
|
50
|
-
*/
|
|
51
|
-
onActive?:
|
|
52
|
-
| ((step: T, e: React.SyntheticEvent<HTMLElement>) => void)
|
|
53
|
-
| React.Dispatch<React.SetStateAction<T>>;
|
|
54
|
-
/**
|
|
55
|
-
* Stepper number
|
|
56
|
-
* @default incremental value
|
|
57
|
-
*/
|
|
58
|
-
number?: React.ReactNode;
|
|
59
|
-
/**
|
|
60
|
-
* Is the step completed
|
|
61
|
-
*/
|
|
62
|
-
completed?: boolean;
|
|
63
|
-
|
|
64
|
-
disabled?: boolean;
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
export type WizardStepBackProps<T extends WizardStep = WizardStep> = ButtonProps & {
|
|
68
|
-
onActive?:
|
|
69
|
-
| ((step: T, e: React.SyntheticEvent<HTMLElement>) => void)
|
|
70
|
-
| React.Dispatch<React.SetStateAction<T>>;
|
|
71
|
-
stepName?: string;
|
|
72
|
-
};
|
|
73
|
-
export type WizardStepNextProps<T extends WizardStep = WizardStep> = ButtonProps & {
|
|
74
|
-
onActive?:
|
|
75
|
-
| ((step: T, e: React.SyntheticEvent<HTMLElement>) => void)
|
|
76
|
-
| React.Dispatch<React.SetStateAction<T>>;
|
|
77
|
-
stepName?: string;
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
type IntergalacticWizardStepperComponent<PropsExtending = {}> = (<
|
|
81
|
-
Value extends WizardStep,
|
|
82
|
-
Tag extends Intergalactic.Tag = 'div',
|
|
83
|
-
>(
|
|
84
|
-
props: Intergalactic.InternalTypings.ComponentProps<Tag, 'div', WizardStepperProps<Value>> &
|
|
85
|
-
PropsExtending,
|
|
86
|
-
) => Intergalactic.InternalTypings.ComponentRenderingResults) &
|
|
87
|
-
Intergalactic.InternalTypings.ComponentAdditive<'div', 'div', WizardStepperProps>;
|
|
88
|
-
|
|
89
|
-
declare const Wizard: Intergalactic.Component<'div', WizardProps> & {
|
|
90
|
-
Sidebar: Intergalactic.Component<'div', WizardSidebarProps>;
|
|
91
|
-
Step: Intergalactic.Component<'div', WizardStepProps>;
|
|
92
|
-
Stepper: IntergalacticWizardStepperComponent;
|
|
93
|
-
Content: typeof Box;
|
|
94
|
-
StepBack: Intergalactic.Component<'button', WizardStepBackProps>;
|
|
95
|
-
StepNext: Intergalactic.Component<'button', WizardStepNextProps>;
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
declare const wrapWizardStepper: <PropsExtending extends {}>(
|
|
99
|
-
wrapper: (
|
|
100
|
-
props: Intergalactic.InternalTypings.UntypeRefAndTag<
|
|
101
|
-
Intergalactic.InternalTypings.ComponentPropsNesting<IntergalacticWizardStepperComponent>
|
|
102
|
-
> &
|
|
103
|
-
PropsExtending,
|
|
104
|
-
) => React.ReactNode,
|
|
105
|
-
) => IntergalacticWizardStepperComponent<PropsExtending>;
|
|
106
|
-
export { wrapWizardStepper };
|
|
107
|
-
|
|
108
|
-
export default Wizard;
|
|
1
|
+
export { default } from './Wizard';
|
|
2
|
+
export * from './Wizard';
|
|
3
|
+
export type * from './Wizard.types';
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
export declare const localizedMessages: {
|
|
2
|
+
de: {
|
|
3
|
+
completedStep: string;
|
|
4
|
+
backButton: string;
|
|
5
|
+
nextButton: string;
|
|
6
|
+
};
|
|
7
|
+
en: {
|
|
8
|
+
completedStep: string;
|
|
9
|
+
backButton: string;
|
|
10
|
+
nextButton: string;
|
|
11
|
+
};
|
|
12
|
+
es: {
|
|
13
|
+
completedStep: string;
|
|
14
|
+
backButton: string;
|
|
15
|
+
nextButton: string;
|
|
16
|
+
};
|
|
17
|
+
fr: {
|
|
18
|
+
completedStep: string;
|
|
19
|
+
backButton: string;
|
|
20
|
+
nextButton: string;
|
|
21
|
+
};
|
|
22
|
+
it: {
|
|
23
|
+
completedStep: string;
|
|
24
|
+
backButton: string;
|
|
25
|
+
nextButton: string;
|
|
26
|
+
};
|
|
27
|
+
ja: {
|
|
28
|
+
completedStep: string;
|
|
29
|
+
backButton: string;
|
|
30
|
+
nextButton: string;
|
|
31
|
+
};
|
|
32
|
+
ko: {
|
|
33
|
+
completedStep: string;
|
|
34
|
+
backButton: string;
|
|
35
|
+
nextButton: string;
|
|
36
|
+
};
|
|
37
|
+
nl: {
|
|
38
|
+
completedStep: string;
|
|
39
|
+
backButton: string;
|
|
40
|
+
nextButton: string;
|
|
41
|
+
};
|
|
42
|
+
pt: {
|
|
43
|
+
completedStep: string;
|
|
44
|
+
backButton: string;
|
|
45
|
+
nextButton: string;
|
|
46
|
+
};
|
|
47
|
+
tr: {
|
|
48
|
+
completedStep: string;
|
|
49
|
+
backButton: string;
|
|
50
|
+
nextButton: string;
|
|
51
|
+
};
|
|
52
|
+
vi: {
|
|
53
|
+
completedStep: string;
|
|
54
|
+
backButton: string;
|
|
55
|
+
nextButton: string;
|
|
56
|
+
};
|
|
57
|
+
zh: {
|
|
58
|
+
completedStep: string;
|
|
59
|
+
backButton: string;
|
|
60
|
+
nextButton: string;
|
|
61
|
+
};
|
|
62
|
+
pl: {
|
|
63
|
+
completedStep: string;
|
|
64
|
+
backButton: string;
|
|
65
|
+
nextButton: string;
|
|
66
|
+
};
|
|
67
|
+
sv: {
|
|
68
|
+
completedStep: string;
|
|
69
|
+
backButton: string;
|
|
70
|
+
nextButton: string;
|
|
71
|
+
};
|
|
72
|
+
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/wizard",
|
|
3
3
|
"description": "Semrush Wizard Component",
|
|
4
|
-
"version": "2.55.0-prerelease.
|
|
4
|
+
"version": "2.55.0-prerelease.5",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
"types": "./lib/types/index.d.ts"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@semcore/button": "5.44.0-prerelease.
|
|
18
|
-
"@semcore/utils": "4.49.0-prerelease.
|
|
19
|
-
"@semcore/flex-box": "5.42.0-prerelease.
|
|
20
|
-
"@semcore/icon": "4.63.0-prerelease.
|
|
21
|
-
"@semcore/modal": "4.57.0-prerelease.
|
|
17
|
+
"@semcore/button": "5.44.0-prerelease.5",
|
|
18
|
+
"@semcore/utils": "4.49.0-prerelease.5",
|
|
19
|
+
"@semcore/flex-box": "5.42.0-prerelease.5",
|
|
20
|
+
"@semcore/icon": "4.63.0-prerelease.5",
|
|
21
|
+
"@semcore/modal": "4.57.0-prerelease.5"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@semcore/core": "^2.40.0-prerelease.
|
|
24
|
+
"@semcore/core": "^2.40.0-prerelease.5",
|
|
25
25
|
"react": "16.8 - 18",
|
|
26
26
|
"react-dom": "16.8 - 18"
|
|
27
27
|
},
|
|
@@ -42,6 +42,16 @@ SStepper {
|
|
|
42
42
|
overflow: auto;
|
|
43
43
|
line-height: var(--intergalactic-lh-200, 142%);
|
|
44
44
|
|
|
45
|
+
&:focus-visible {
|
|
46
|
+
outline-color: var(--intergalactic-keyboard-focus-invert-outline, oklch(1 0 0 / 0.7));
|
|
47
|
+
outline-style: solid;
|
|
48
|
+
outline-width: 2px;
|
|
49
|
+
outline-offset: 2px;
|
|
50
|
+
transition-duration: calc(var(--intergalactic-duration-extra-fast, 100) * 1ms);
|
|
51
|
+
transition-timing-function: ease-in-out;
|
|
52
|
+
transition-property: outline-color, outline-width, outline-offset;
|
|
53
|
+
}
|
|
54
|
+
|
|
45
55
|
&:hover {
|
|
46
56
|
background: var(--intergalactic-control-primary-advertising-hover, oklch(0.6 0.244 297.8));
|
|
47
57
|
z-index: 1;
|
|
@@ -100,4 +110,4 @@ SContent {
|
|
|
100
110
|
|
|
101
111
|
SSidebarMenu {
|
|
102
112
|
display: contents;
|
|
103
|
-
}
|
|
113
|
+
}
|
package/lib/cjs/index.d.js
DELETED
package/lib/cjs/index.d.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React from 'react';\nimport { UnknownProperties, Intergalactic } from '@semcore/core';\nimport { Box, BoxProps } from '@semcore/flex-box';\nimport { ButtonProps } from '@semcore/button';\nimport { ModalProps } from '@semcore/modal';\n\nexport type WizardStep = string | number | boolean;\n\n/** @deprecated */\nexport interface IWizardProps extends WizardProps, UnknownProperties {}\nexport type WizardProps = ModalProps & {\n /**\n * Active step value\n */\n step: WizardStep;\n locale?: string;\n};\n\n/** @deprecated */\nexport interface IWizardSidebarProps extends WizardSidebarProps, UnknownProperties {}\nexport type WizardSidebarProps = BoxProps & {\n /**\n * Sidebar title\n */\n title?: React.ReactNode;\n};\n\n/** @deprecated */\nexport interface IWizardStepProps extends WizardStepProps, UnknownProperties {}\nexport type WizardStepProps = BoxProps & {\n /**\n * Step value\n */\n step: WizardStep;\n /**\n * Disabled step\n */\n disabled?: boolean;\n};\n\n/** @deprecated */\nexport interface IWizardStepperProps extends WizardStepperProps, UnknownProperties {}\nexport type WizardStepperProps<T extends WizardStep = WizardStep> = BoxProps & {\n /**\n * Step value\n */\n step: T;\n /**\n * Is invoked when active the step\n */\n onActive?:\n | ((step: T, e: React.SyntheticEvent<HTMLElement>) => void)\n | React.Dispatch<React.SetStateAction<T>>;\n /**\n * Stepper number\n * @default incremental value\n */\n number?: React.ReactNode;\n /**\n * Is the step completed\n */\n completed?: boolean;\n\n disabled?: boolean;\n};\n\nexport type WizardStepBackProps<T extends WizardStep = WizardStep> = ButtonProps & {\n onActive?:\n | ((step: T, e: React.SyntheticEvent<HTMLElement>) => void)\n | React.Dispatch<React.SetStateAction<T>>;\n stepName?: string;\n};\nexport type WizardStepNextProps<T extends WizardStep = WizardStep> = ButtonProps & {\n onActive?:\n | ((step: T, e: React.SyntheticEvent<HTMLElement>) => void)\n | React.Dispatch<React.SetStateAction<T>>;\n stepName?: string;\n};\n\ntype IntergalacticWizardStepperComponent<PropsExtending = {}> = (<\n Value extends WizardStep,\n Tag extends Intergalactic.Tag = 'div',\n>(\n props: Intergalactic.InternalTypings.ComponentProps<Tag, 'div', WizardStepperProps<Value>> &\n PropsExtending,\n) => Intergalactic.InternalTypings.ComponentRenderingResults) &\n Intergalactic.InternalTypings.ComponentAdditive<'div', 'div', WizardStepperProps>;\n\ndeclare const Wizard: Intergalactic.Component<'div', WizardProps> & {\n Sidebar: Intergalactic.Component<'div', WizardSidebarProps>;\n Step: Intergalactic.Component<'div', WizardStepProps>;\n Stepper: IntergalacticWizardStepperComponent;\n Content: typeof Box;\n StepBack: Intergalactic.Component<'button', WizardStepBackProps>;\n StepNext: Intergalactic.Component<'button', WizardStepNextProps>;\n};\n\ndeclare const wrapWizardStepper: <PropsExtending extends {}>(\n wrapper: (\n props: Intergalactic.InternalTypings.UntypeRefAndTag<\n Intergalactic.InternalTypings.ComponentPropsNesting<IntergalacticWizardStepperComponent>\n > &\n PropsExtending,\n ) => React.ReactNode,\n) => IntergalacticWizardStepperComponent<PropsExtending>;\nexport { wrapWizardStepper };\n\nexport default Wizard;\n"],"mappings":""}
|
package/lib/es6/index.d.js
DELETED
package/lib/es6/index.d.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React from 'react';\nimport { UnknownProperties, Intergalactic } from '@semcore/core';\nimport { Box, BoxProps } from '@semcore/flex-box';\nimport { ButtonProps } from '@semcore/button';\nimport { ModalProps } from '@semcore/modal';\n\nexport type WizardStep = string | number | boolean;\n\n/** @deprecated */\nexport interface IWizardProps extends WizardProps, UnknownProperties {}\nexport type WizardProps = ModalProps & {\n /**\n * Active step value\n */\n step: WizardStep;\n locale?: string;\n};\n\n/** @deprecated */\nexport interface IWizardSidebarProps extends WizardSidebarProps, UnknownProperties {}\nexport type WizardSidebarProps = BoxProps & {\n /**\n * Sidebar title\n */\n title?: React.ReactNode;\n};\n\n/** @deprecated */\nexport interface IWizardStepProps extends WizardStepProps, UnknownProperties {}\nexport type WizardStepProps = BoxProps & {\n /**\n * Step value\n */\n step: WizardStep;\n /**\n * Disabled step\n */\n disabled?: boolean;\n};\n\n/** @deprecated */\nexport interface IWizardStepperProps extends WizardStepperProps, UnknownProperties {}\nexport type WizardStepperProps<T extends WizardStep = WizardStep> = BoxProps & {\n /**\n * Step value\n */\n step: T;\n /**\n * Is invoked when active the step\n */\n onActive?:\n | ((step: T, e: React.SyntheticEvent<HTMLElement>) => void)\n | React.Dispatch<React.SetStateAction<T>>;\n /**\n * Stepper number\n * @default incremental value\n */\n number?: React.ReactNode;\n /**\n * Is the step completed\n */\n completed?: boolean;\n\n disabled?: boolean;\n};\n\nexport type WizardStepBackProps<T extends WizardStep = WizardStep> = ButtonProps & {\n onActive?:\n | ((step: T, e: React.SyntheticEvent<HTMLElement>) => void)\n | React.Dispatch<React.SetStateAction<T>>;\n stepName?: string;\n};\nexport type WizardStepNextProps<T extends WizardStep = WizardStep> = ButtonProps & {\n onActive?:\n | ((step: T, e: React.SyntheticEvent<HTMLElement>) => void)\n | React.Dispatch<React.SetStateAction<T>>;\n stepName?: string;\n};\n\ntype IntergalacticWizardStepperComponent<PropsExtending = {}> = (<\n Value extends WizardStep,\n Tag extends Intergalactic.Tag = 'div',\n>(\n props: Intergalactic.InternalTypings.ComponentProps<Tag, 'div', WizardStepperProps<Value>> &\n PropsExtending,\n) => Intergalactic.InternalTypings.ComponentRenderingResults) &\n Intergalactic.InternalTypings.ComponentAdditive<'div', 'div', WizardStepperProps>;\n\ndeclare const Wizard: Intergalactic.Component<'div', WizardProps> & {\n Sidebar: Intergalactic.Component<'div', WizardSidebarProps>;\n Step: Intergalactic.Component<'div', WizardStepProps>;\n Stepper: IntergalacticWizardStepperComponent;\n Content: typeof Box;\n StepBack: Intergalactic.Component<'button', WizardStepBackProps>;\n StepNext: Intergalactic.Component<'button', WizardStepNextProps>;\n};\n\ndeclare const wrapWizardStepper: <PropsExtending extends {}>(\n wrapper: (\n props: Intergalactic.InternalTypings.UntypeRefAndTag<\n Intergalactic.InternalTypings.ComponentPropsNesting<IntergalacticWizardStepperComponent>\n > &\n PropsExtending,\n ) => React.ReactNode,\n) => IntergalacticWizardStepperComponent<PropsExtending>;\nexport { wrapWizardStepper };\n\nexport default Wizard;\n"],"mappings":""}
|