@momentum-design/components 0.96.3 → 0.97.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/dist/browser/index.js +294 -253
- package/dist/browser/index.js.map +4 -4
- package/dist/components/stepper/index.d.ts +7 -0
- package/dist/components/stepper/index.js +4 -0
- package/dist/components/stepper/stepper.component.d.ts +46 -0
- package/dist/components/stepper/stepper.component.js +85 -0
- package/dist/components/stepper/stepper.constants.d.ts +6 -0
- package/dist/components/stepper/stepper.constants.js +9 -0
- package/dist/components/stepper/stepper.context.d.ts +11 -0
- package/dist/components/stepper/stepper.context.js +10 -0
- package/dist/components/stepper/stepper.styles.d.ts +2 -0
- package/dist/components/stepper/stepper.styles.js +41 -0
- package/dist/components/stepperconnector/stepperconnector.component.d.ts +4 -0
- package/dist/components/stepperconnector/stepperconnector.component.js +11 -0
- package/dist/components/stepperitem/stepperitem.component.d.ts +5 -0
- package/dist/components/stepperitem/stepperitem.component.js +14 -0
- package/dist/components/stepperitem/stepperitem.styles.js +5 -1
- package/dist/custom-elements.json +97 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +3 -2
- package/dist/react/index.d.ts +1 -0
- package/dist/react/index.js +1 -0
- package/dist/react/stepper/index.d.ts +12 -0
- package/dist/react/stepper/index.js +21 -0
- package/package.json +1 -1
@@ -0,0 +1,46 @@
|
|
1
|
+
import type { CSSResult, PropertyValueMap } from 'lit';
|
2
|
+
import { Provider } from '../../models';
|
3
|
+
import type { OrientationType } from '../stepperconnector/stepperconnector.types';
|
4
|
+
import type { VariantType } from '../stepperitem/stepperitem.types';
|
5
|
+
import StepperContext from './stepper.context';
|
6
|
+
/**
|
7
|
+
* Stepper component, which orchestrates stepperitem and stepperconnector components, is a wrapper for the stepper functionality.
|
8
|
+
* It provides the context for the stepper items and connectors, allowing them to adapt to the stepper's orientation and variant.
|
9
|
+
*
|
10
|
+
* @tagname mdc-stepper
|
11
|
+
*
|
12
|
+
* @slot default - Pass the list of `mdc-stepperitem` and `mdc-stepperconnector` elements to be rendered inside the stepper.
|
13
|
+
*
|
14
|
+
*/
|
15
|
+
declare class Stepper extends Provider<StepperContext> {
|
16
|
+
/**
|
17
|
+
* The orientation of the stepperconnector (vertical or horizontal)
|
18
|
+
* @default "horizontal"
|
19
|
+
*/
|
20
|
+
orientation: OrientationType;
|
21
|
+
/**
|
22
|
+
* The variant of the stepper item, which can be `inline` or `stacked`.
|
23
|
+
* @default 'inline'
|
24
|
+
*/
|
25
|
+
variant: VariantType;
|
26
|
+
constructor();
|
27
|
+
connectedCallback(): void;
|
28
|
+
/**
|
29
|
+
* Get the context for the stepper component.
|
30
|
+
* This context provides the orientation and variant for the stepper items and connectors.
|
31
|
+
*/
|
32
|
+
static get Context(): {
|
33
|
+
__context__: StepperContext;
|
34
|
+
};
|
35
|
+
protected updated(changedProperties: PropertyValueMap<Stepper>): void;
|
36
|
+
/**
|
37
|
+
* Update all observing components of this
|
38
|
+
* provider to update the values
|
39
|
+
*
|
40
|
+
* Is called on every re-render, see Provider class
|
41
|
+
*/
|
42
|
+
protected updateContext(): void;
|
43
|
+
render(): import("lit-html").TemplateResult<1>;
|
44
|
+
static styles: Array<CSSResult>;
|
45
|
+
}
|
46
|
+
export default Stepper;
|
@@ -0,0 +1,85 @@
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
6
|
+
};
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
9
|
+
};
|
10
|
+
import { html } from 'lit';
|
11
|
+
import { property } from 'lit/decorators.js';
|
12
|
+
import { Component, Provider } from '../../models';
|
13
|
+
import { ROLE } from '../../utils/roles';
|
14
|
+
import { DEFAULTS } from './stepper.constants';
|
15
|
+
import StepperContext from './stepper.context';
|
16
|
+
import styles from './stepper.styles';
|
17
|
+
/**
|
18
|
+
* Stepper component, which orchestrates stepperitem and stepperconnector components, is a wrapper for the stepper functionality.
|
19
|
+
* It provides the context for the stepper items and connectors, allowing them to adapt to the stepper's orientation and variant.
|
20
|
+
*
|
21
|
+
* @tagname mdc-stepper
|
22
|
+
*
|
23
|
+
* @slot default - Pass the list of `mdc-stepperitem` and `mdc-stepperconnector` elements to be rendered inside the stepper.
|
24
|
+
*
|
25
|
+
*/
|
26
|
+
class Stepper extends Provider {
|
27
|
+
constructor() {
|
28
|
+
super({
|
29
|
+
context: StepperContext.context,
|
30
|
+
initialValue: new StepperContext(DEFAULTS.ORIENTATION, DEFAULTS.VARIANT),
|
31
|
+
});
|
32
|
+
/**
|
33
|
+
* The orientation of the stepperconnector (vertical or horizontal)
|
34
|
+
* @default "horizontal"
|
35
|
+
*/
|
36
|
+
this.orientation = DEFAULTS.ORIENTATION;
|
37
|
+
/**
|
38
|
+
* The variant of the stepper item, which can be `inline` or `stacked`.
|
39
|
+
* @default 'inline'
|
40
|
+
*/
|
41
|
+
this.variant = DEFAULTS.VARIANT;
|
42
|
+
}
|
43
|
+
connectedCallback() {
|
44
|
+
super.connectedCallback();
|
45
|
+
this.role = ROLE.LIST;
|
46
|
+
}
|
47
|
+
/**
|
48
|
+
* Get the context for the stepper component.
|
49
|
+
* This context provides the orientation and variant for the stepper items and connectors.
|
50
|
+
*/
|
51
|
+
static get Context() {
|
52
|
+
return StepperContext.context;
|
53
|
+
}
|
54
|
+
updated(changedProperties) {
|
55
|
+
if (changedProperties.has('orientation') || changedProperties.has('variant')) {
|
56
|
+
this.updateContext();
|
57
|
+
}
|
58
|
+
}
|
59
|
+
/**
|
60
|
+
* Update all observing components of this
|
61
|
+
* provider to update the values
|
62
|
+
*
|
63
|
+
* Is called on every re-render, see Provider class
|
64
|
+
*/
|
65
|
+
updateContext() {
|
66
|
+
if (this.context.value.variant !== this.variant || this.context.value.orientation !== this.orientation) {
|
67
|
+
this.context.value.variant = this.variant;
|
68
|
+
this.context.value.orientation = this.orientation;
|
69
|
+
this.context.updateObservers();
|
70
|
+
}
|
71
|
+
}
|
72
|
+
render() {
|
73
|
+
return html ` <slot></slot> `;
|
74
|
+
}
|
75
|
+
}
|
76
|
+
Stepper.styles = [...Component.styles, ...styles];
|
77
|
+
__decorate([
|
78
|
+
property({ type: String, reflect: true }),
|
79
|
+
__metadata("design:type", String)
|
80
|
+
], Stepper.prototype, "orientation", void 0);
|
81
|
+
__decorate([
|
82
|
+
property({ type: String, reflect: true }),
|
83
|
+
__metadata("design:type", String)
|
84
|
+
], Stepper.prototype, "variant", void 0);
|
85
|
+
export default Stepper;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import utils from '../../utils/tag-name';
|
2
|
+
import { ORIENTATION } from '../stepperconnector/stepperconnector.constants';
|
3
|
+
import { VARIANT } from '../stepperitem/stepperitem.constants';
|
4
|
+
const TAG_NAME = utils.constructTagName('stepper');
|
5
|
+
const DEFAULTS = {
|
6
|
+
ORIENTATION: ORIENTATION.HORIZONTAL,
|
7
|
+
VARIANT: VARIANT.INLINE,
|
8
|
+
};
|
9
|
+
export { TAG_NAME, DEFAULTS };
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import type { OrientationType } from '../stepperconnector/stepperconnector.types';
|
2
|
+
import type { VariantType } from '../stepperitem/stepperitem.types';
|
3
|
+
declare class StepperContext {
|
4
|
+
orientation?: OrientationType;
|
5
|
+
variant?: VariantType;
|
6
|
+
static context: {
|
7
|
+
__context__: StepperContext;
|
8
|
+
};
|
9
|
+
constructor(defaultOrientation?: OrientationType, defaultVariant?: VariantType);
|
10
|
+
}
|
11
|
+
export default StepperContext;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { createContext } from '@lit/context';
|
2
|
+
import { TAG_NAME } from './stepper.constants';
|
3
|
+
class StepperContext {
|
4
|
+
constructor(defaultOrientation, defaultVariant) {
|
5
|
+
this.orientation = defaultOrientation;
|
6
|
+
this.variant = defaultVariant;
|
7
|
+
}
|
8
|
+
}
|
9
|
+
StepperContext.context = createContext(TAG_NAME);
|
10
|
+
export default StepperContext;
|
@@ -0,0 +1,41 @@
|
|
1
|
+
import { css } from 'lit';
|
2
|
+
import { hostFitContentStyles } from '../../utils/styles';
|
3
|
+
const styles = css `
|
4
|
+
:host {
|
5
|
+
gap: 0.5rem;
|
6
|
+
}
|
7
|
+
|
8
|
+
::slotted(mdc-stepperitem) {
|
9
|
+
flex-shrink: 0;
|
10
|
+
}
|
11
|
+
|
12
|
+
:host([orientation='horizontal']) {
|
13
|
+
width: 100%;
|
14
|
+
}
|
15
|
+
|
16
|
+
:host([orientation='vertical']) {
|
17
|
+
flex-direction: column;
|
18
|
+
height: 100%;
|
19
|
+
}
|
20
|
+
|
21
|
+
:host([orientation='vertical'][variant='inline']),
|
22
|
+
:host([orientation='horizontal'][variant='stacked']) {
|
23
|
+
align-items: flex-start;
|
24
|
+
}
|
25
|
+
|
26
|
+
:host([orientation='vertical'][variant='stacked']) ::slotted(mdc-stepperconnector) {
|
27
|
+
display: flex;
|
28
|
+
justify-content: center;
|
29
|
+
}
|
30
|
+
|
31
|
+
:host([orientation='vertical'][variant='inline']) ::slotted(mdc-stepperconnector) {
|
32
|
+
display: flex;
|
33
|
+
padding-left: 0.875rem;
|
34
|
+
}
|
35
|
+
|
36
|
+
:host([orientation='horizontal'][variant='stacked']) ::slotted(mdc-stepperconnector) {
|
37
|
+
padding-top: 0.9375rem;
|
38
|
+
margin: 0 -3rem;
|
39
|
+
}
|
40
|
+
`;
|
41
|
+
export default [hostFitContentStyles, styles];
|
@@ -24,6 +24,10 @@ declare class StepperConnector extends Component {
|
|
24
24
|
* @default "horizontal"
|
25
25
|
*/
|
26
26
|
orientation: OrientationType;
|
27
|
+
/**
|
28
|
+
* @internal
|
29
|
+
*/
|
30
|
+
private readonly stepperContext;
|
27
31
|
updated(changedProperties: Map<string, unknown>): void;
|
28
32
|
render(): import("lit-html").TemplateResult<1>;
|
29
33
|
static styles: Array<CSSResult>;
|
@@ -10,6 +10,8 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
10
10
|
import { html } from 'lit';
|
11
11
|
import { property } from 'lit/decorators.js';
|
12
12
|
import { Component } from '../../models';
|
13
|
+
import providerUtils from '../../utils/provider';
|
14
|
+
import Stepper from '../stepper/stepper.component';
|
13
15
|
import { DEFAULTS } from './stepperconnector.constants';
|
14
16
|
import styles from './stepperconnector.styles';
|
15
17
|
/**
|
@@ -37,12 +39,21 @@ class StepperConnector extends Component {
|
|
37
39
|
* @default "horizontal"
|
38
40
|
*/
|
39
41
|
this.orientation = DEFAULTS.ORIENTATION;
|
42
|
+
/**
|
43
|
+
* @internal
|
44
|
+
*/
|
45
|
+
this.stepperContext = providerUtils.consume({ host: this, context: Stepper.Context });
|
40
46
|
}
|
41
47
|
updated(changedProperties) {
|
48
|
+
var _a;
|
42
49
|
super.updated(changedProperties);
|
43
50
|
if (changedProperties.has('orientation')) {
|
44
51
|
this.ariaOrientation = this.orientation;
|
45
52
|
}
|
53
|
+
const context = (_a = this.stepperContext) === null || _a === void 0 ? void 0 : _a.value;
|
54
|
+
if (!context || !context.orientation)
|
55
|
+
return;
|
56
|
+
this.orientation = context.orientation;
|
46
57
|
}
|
47
58
|
render() {
|
48
59
|
return html ` <div part="connector"></div> `;
|
@@ -63,6 +63,11 @@ declare class StepperItem extends StepperItem_base {
|
|
63
63
|
* @default ''
|
64
64
|
*/
|
65
65
|
stepNumber?: number;
|
66
|
+
/**
|
67
|
+
* @internal
|
68
|
+
*/
|
69
|
+
private readonly stepperContext;
|
70
|
+
updated(changedProperties: Map<string, unknown>): void;
|
66
71
|
connectedCallback(): void;
|
67
72
|
constructor();
|
68
73
|
/**
|
@@ -14,6 +14,8 @@ import { TYPE, VALID_TEXT_TAGS } from '../text/text.constants';
|
|
14
14
|
import { TabIndexMixin } from '../../utils/mixins/TabIndexMixin';
|
15
15
|
import { ROLE } from '../../utils/roles';
|
16
16
|
import { KEYS } from '../../utils/keys';
|
17
|
+
import providerUtils from '../../utils/provider';
|
18
|
+
import Stepper from '../stepper/stepper.component';
|
17
19
|
import styles from './stepperitem.styles';
|
18
20
|
import { DEFAULT, STATUS, STATUS_ICON } from './stepperitem.constants';
|
19
21
|
/**
|
@@ -49,6 +51,14 @@ import { DEFAULT, STATUS, STATUS_ICON } from './stepperitem.constants';
|
|
49
51
|
* @cssproperty --mdc-stepperitem-label-container-background - The background color of the label container.
|
50
52
|
*/
|
51
53
|
class StepperItem extends TabIndexMixin(Component) {
|
54
|
+
updated(changedProperties) {
|
55
|
+
var _a;
|
56
|
+
super.updated(changedProperties);
|
57
|
+
const context = (_a = this.stepperContext) === null || _a === void 0 ? void 0 : _a.value;
|
58
|
+
if (!context || !context.variant)
|
59
|
+
return;
|
60
|
+
this.variant = context.variant;
|
61
|
+
}
|
52
62
|
connectedCallback() {
|
53
63
|
super.connectedCallback();
|
54
64
|
this.role = ROLE.LISTITEM;
|
@@ -71,6 +81,10 @@ class StepperItem extends TabIndexMixin(Component) {
|
|
71
81
|
* @default ''
|
72
82
|
*/
|
73
83
|
this.label = '';
|
84
|
+
/**
|
85
|
+
* @internal
|
86
|
+
*/
|
87
|
+
this.stepperContext = providerUtils.consume({ host: this, context: Stepper.Context });
|
74
88
|
this.addEventListener('keydown', this.handleKeyDown.bind(this));
|
75
89
|
this.addEventListener('keyup', this.handleKeyUp.bind(this));
|
76
90
|
}
|
@@ -47,8 +47,10 @@ const styles = css `
|
|
47
47
|
}
|
48
48
|
|
49
49
|
:host([variant='stacked'])::part(label-container) {
|
50
|
-
|
50
|
+
width: 8.75rem;
|
51
|
+
padding: 0.25rem 0;
|
51
52
|
}
|
53
|
+
|
52
54
|
:host([variant='stacked'])::part(label),
|
53
55
|
:host([variant='stacked'])::part(help-text) {
|
54
56
|
overflow: hidden;
|
@@ -66,6 +68,7 @@ const styles = css `
|
|
66
68
|
:host([status='error-incomplete'])::part(help-text-container) {
|
67
69
|
display: flex;
|
68
70
|
align-items: center;
|
71
|
+
justify-content: center;
|
69
72
|
gap: 0.25rem;
|
70
73
|
}
|
71
74
|
|
@@ -91,6 +94,7 @@ const styles = css `
|
|
91
94
|
:host([status='error-current'])::part(help-icon),
|
92
95
|
:host([status='error-incomplete'])::part(help-icon) {
|
93
96
|
--mdc-icon-fill-color: var(--mds-color-theme-text-error-normal);
|
97
|
+
flex-shrink: 0;
|
94
98
|
}
|
95
99
|
|
96
100
|
:host(:hover) {
|
@@ -31981,6 +31981,103 @@
|
|
31981
31981
|
}
|
31982
31982
|
]
|
31983
31983
|
},
|
31984
|
+
{
|
31985
|
+
"kind": "javascript-module",
|
31986
|
+
"path": "components/stepper/stepper.component.js",
|
31987
|
+
"declarations": [
|
31988
|
+
{
|
31989
|
+
"kind": "class",
|
31990
|
+
"description": "Stepper component, which orchestrates stepperitem and stepperconnector components, is a wrapper for the stepper functionality.\nIt provides the context for the stepper items and connectors, allowing them to adapt to the stepper's orientation and variant.",
|
31991
|
+
"name": "Stepper",
|
31992
|
+
"slots": [
|
31993
|
+
{
|
31994
|
+
"description": "Pass the list of `mdc-stepperitem` and `mdc-stepperconnector` elements to be rendered inside the stepper.",
|
31995
|
+
"name": "default"
|
31996
|
+
}
|
31997
|
+
],
|
31998
|
+
"members": [
|
31999
|
+
{
|
32000
|
+
"kind": "field",
|
32001
|
+
"name": "orientation",
|
32002
|
+
"type": {
|
32003
|
+
"text": "OrientationType"
|
32004
|
+
},
|
32005
|
+
"description": "The orientation of the stepperconnector (vertical or horizontal)",
|
32006
|
+
"default": "\"horizontal\"",
|
32007
|
+
"attribute": "orientation",
|
32008
|
+
"reflects": true
|
32009
|
+
},
|
32010
|
+
{
|
32011
|
+
"kind": "field",
|
32012
|
+
"name": "variant",
|
32013
|
+
"type": {
|
32014
|
+
"text": "VariantType"
|
32015
|
+
},
|
32016
|
+
"description": "The variant of the stepper item, which can be `inline` or `stacked`.",
|
32017
|
+
"default": "'inline'",
|
32018
|
+
"attribute": "variant",
|
32019
|
+
"reflects": true
|
32020
|
+
},
|
32021
|
+
{
|
32022
|
+
"kind": "field",
|
32023
|
+
"name": "Context",
|
32024
|
+
"privacy": "public",
|
32025
|
+
"static": true,
|
32026
|
+
"description": "Get the context for the stepper component.\nThis context provides the orientation and variant for the stepper items and connectors.",
|
32027
|
+
"readonly": true
|
32028
|
+
},
|
32029
|
+
{
|
32030
|
+
"kind": "method",
|
32031
|
+
"name": "updateContext",
|
32032
|
+
"privacy": "protected",
|
32033
|
+
"return": {
|
32034
|
+
"type": {
|
32035
|
+
"text": "void"
|
32036
|
+
}
|
32037
|
+
},
|
32038
|
+
"description": "Update all observing components of this\nprovider to update the values\n\nIs called on every re-render, see Provider class"
|
32039
|
+
}
|
32040
|
+
],
|
32041
|
+
"attributes": [
|
32042
|
+
{
|
32043
|
+
"name": "orientation",
|
32044
|
+
"type": {
|
32045
|
+
"text": "OrientationType"
|
32046
|
+
},
|
32047
|
+
"description": "The orientation of the stepperconnector (vertical or horizontal)",
|
32048
|
+
"default": "\"horizontal\"",
|
32049
|
+
"fieldName": "orientation"
|
32050
|
+
},
|
32051
|
+
{
|
32052
|
+
"name": "variant",
|
32053
|
+
"type": {
|
32054
|
+
"text": "VariantType"
|
32055
|
+
},
|
32056
|
+
"description": "The variant of the stepper item, which can be `inline` or `stacked`.",
|
32057
|
+
"default": "'inline'",
|
32058
|
+
"fieldName": "variant"
|
32059
|
+
}
|
32060
|
+
],
|
32061
|
+
"superclass": {
|
32062
|
+
"name": "Provider",
|
32063
|
+
"module": "/src/models"
|
32064
|
+
},
|
32065
|
+
"tagName": "mdc-stepper",
|
32066
|
+
"jsDoc": "/**\n * Stepper component, which orchestrates stepperitem and stepperconnector components, is a wrapper for the stepper functionality.\n * It provides the context for the stepper items and connectors, allowing them to adapt to the stepper's orientation and variant.\n *\n * @tagname mdc-stepper\n *\n * @slot default - Pass the list of `mdc-stepperitem` and `mdc-stepperconnector` elements to be rendered inside the stepper.\n *\n */",
|
32067
|
+
"customElement": true
|
32068
|
+
}
|
32069
|
+
],
|
32070
|
+
"exports": [
|
32071
|
+
{
|
32072
|
+
"kind": "js",
|
32073
|
+
"name": "default",
|
32074
|
+
"declaration": {
|
32075
|
+
"name": "Stepper",
|
32076
|
+
"module": "components/stepper/stepper.component.js"
|
32077
|
+
}
|
32078
|
+
}
|
32079
|
+
]
|
32080
|
+
},
|
31984
32081
|
{
|
31985
32082
|
"kind": "javascript-module",
|
31986
32083
|
"path": "components/stepperconnector/stepperconnector.component.js",
|
package/dist/index.d.ts
CHANGED
@@ -66,8 +66,9 @@ import Tooltip from './components/tooltip';
|
|
66
66
|
import VirtualizedList from './components/virtualizedlist';
|
67
67
|
import Listheader from './components/listheader';
|
68
68
|
import SelectListbox from './components/selectlistbox';
|
69
|
-
import
|
69
|
+
import StepperItem from './components/stepperitem';
|
70
70
|
import StepperConnector from './components/stepperconnector';
|
71
|
+
import Stepper from './components/stepper';
|
71
72
|
import type { BadgeType } from './components/badge/badge.types';
|
72
73
|
import type { ButtonColor, ButtonVariant, IconButtonSize, PillButtonSize } from './components/button/button.types';
|
73
74
|
import type { PopoverPlacement } from './components/popover/popover.types';
|
@@ -80,6 +81,6 @@ import type { MenuSectionChangeEvent } from './components/menusection/menusectio
|
|
80
81
|
import { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, PILL_BUTTON_SIZES } from './components/button/button.constants';
|
81
82
|
import { SKELETON_VARIANTS } from './components/skeleton/skeleton.constants';
|
82
83
|
import { inMemoryCache, webAPIIconsCache } from './utils/icon-cache';
|
83
|
-
export { AlertChip, Animation, Appheader, Avatar, AvatarButton, Badge, Brandvisual, Bullet, Button, ButtonGroup, ButtonLink, Card, CardButton, CardCheckbox, CardRadio, Checkbox, Chip, Coachmark, Dialog, Divider, FilterChip, FormfieldGroup, Icon, IconProvider, Input, InputChip, Link, LinkButton, Linksimple, List, ListItem, Marker, MenuBar, MenuItem, MenuItemCheckbox, MenuItemRadio, MenuPopover, MenuSection, NavMenuItem, OptGroup, Option, Password, Popover, Presence, Progressbar, Progressspinner, Radio, RadioGroup, ScreenreaderAnnouncer, Searchfield, Select, SideNavigation, Skeleton, Spinner, StaticCheckbox, StaticRadio, StaticToggle,
|
84
|
+
export { AlertChip, Animation, Appheader, Avatar, AvatarButton, Badge, Brandvisual, Bullet, Button, ButtonGroup, ButtonLink, Card, CardButton, CardCheckbox, CardRadio, Checkbox, Chip, Coachmark, Dialog, Divider, FilterChip, FormfieldGroup, Icon, IconProvider, Input, InputChip, Link, LinkButton, Linksimple, List, ListItem, Marker, MenuBar, MenuItem, MenuItemCheckbox, MenuItemRadio, MenuPopover, MenuSection, NavMenuItem, OptGroup, Option, Password, Popover, Presence, Progressbar, Progressspinner, Radio, RadioGroup, ScreenreaderAnnouncer, Searchfield, Select, SideNavigation, Skeleton, Spinner, StaticCheckbox, StaticRadio, StaticToggle, StepperItem, Tab, TabList, Text, Textarea, ThemeProvider, Toggle, ToggleTip, Tooltip, VirtualizedList, Listheader, SelectListbox, StepperConnector, Stepper, };
|
84
85
|
export type { BadgeType, ButtonColor, ButtonVariant, IconButtonSize, MenuPopoverActionEvent, MenuPopoverChangeEvent, MenuSectionChangeEvent, PillButtonSize, PopoverPlacement, SkeletonVariant, SelectChangeEvent, SelectInputEvent, SpinnerSize, SpinnerVariant, TextType, };
|
85
86
|
export { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, inMemoryCache, PILL_BUTTON_SIZES, SKELETON_VARIANTS, webAPIIconsCache, };
|
package/dist/index.js
CHANGED
@@ -68,13 +68,14 @@ import Tooltip from './components/tooltip';
|
|
68
68
|
import VirtualizedList from './components/virtualizedlist';
|
69
69
|
import Listheader from './components/listheader';
|
70
70
|
import SelectListbox from './components/selectlistbox';
|
71
|
-
import
|
71
|
+
import StepperItem from './components/stepperitem';
|
72
72
|
import StepperConnector from './components/stepperconnector';
|
73
|
+
import Stepper from './components/stepper';
|
73
74
|
// Constants / Utils Imports
|
74
75
|
import { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, PILL_BUTTON_SIZES, } from './components/button/button.constants';
|
75
76
|
import { SKELETON_VARIANTS } from './components/skeleton/skeleton.constants';
|
76
77
|
import { inMemoryCache, webAPIIconsCache } from './utils/icon-cache';
|
77
78
|
// Components Exports
|
78
|
-
export { AlertChip, Animation, Appheader, Avatar, AvatarButton, Badge, Brandvisual, Bullet, Button, ButtonGroup, ButtonLink, Card, CardButton, CardCheckbox, CardRadio, Checkbox, Chip, Coachmark, Dialog, Divider, FilterChip, FormfieldGroup, Icon, IconProvider, Input, InputChip, Link, LinkButton, Linksimple, List, ListItem, Marker, MenuBar, MenuItem, MenuItemCheckbox, MenuItemRadio, MenuPopover, MenuSection, NavMenuItem, OptGroup, Option, Password, Popover, Presence, Progressbar, Progressspinner, Radio, RadioGroup, ScreenreaderAnnouncer, Searchfield, Select, SideNavigation, Skeleton, Spinner, StaticCheckbox, StaticRadio, StaticToggle,
|
79
|
+
export { AlertChip, Animation, Appheader, Avatar, AvatarButton, Badge, Brandvisual, Bullet, Button, ButtonGroup, ButtonLink, Card, CardButton, CardCheckbox, CardRadio, Checkbox, Chip, Coachmark, Dialog, Divider, FilterChip, FormfieldGroup, Icon, IconProvider, Input, InputChip, Link, LinkButton, Linksimple, List, ListItem, Marker, MenuBar, MenuItem, MenuItemCheckbox, MenuItemRadio, MenuPopover, MenuSection, NavMenuItem, OptGroup, Option, Password, Popover, Presence, Progressbar, Progressspinner, Radio, RadioGroup, ScreenreaderAnnouncer, Searchfield, Select, SideNavigation, Skeleton, Spinner, StaticCheckbox, StaticRadio, StaticToggle, StepperItem, Tab, TabList, Text, Textarea, ThemeProvider, Toggle, ToggleTip, Tooltip, VirtualizedList, Listheader, SelectListbox, StepperConnector, Stepper, };
|
79
80
|
// Constants / Utils Exports
|
80
81
|
export { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, inMemoryCache, PILL_BUTTON_SIZES, SKELETON_VARIANTS, webAPIIconsCache, };
|
package/dist/react/index.d.ts
CHANGED
@@ -59,6 +59,7 @@ export { default as Spinner } from './spinner';
|
|
59
59
|
export { default as StaticCheckbox } from './staticcheckbox';
|
60
60
|
export { default as StaticRadio } from './staticradio';
|
61
61
|
export { default as StaticToggle } from './statictoggle';
|
62
|
+
export { default as Stepper } from './stepper';
|
62
63
|
export { default as StepperConnector } from './stepperconnector';
|
63
64
|
export { default as StepperItem } from './stepperitem';
|
64
65
|
export { default as Tab } from './tab';
|
package/dist/react/index.js
CHANGED
@@ -59,6 +59,7 @@ export { default as Spinner } from './spinner';
|
|
59
59
|
export { default as StaticCheckbox } from './staticcheckbox';
|
60
60
|
export { default as StaticRadio } from './staticradio';
|
61
61
|
export { default as StaticToggle } from './statictoggle';
|
62
|
+
export { default as Stepper } from './stepper';
|
62
63
|
export { default as StepperConnector } from './stepperconnector';
|
63
64
|
export { default as StepperItem } from './stepperitem';
|
64
65
|
export { default as Tab } from './tab';
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import Component from '../../components/stepper';
|
2
|
+
/**
|
3
|
+
* Stepper component, which orchestrates stepperitem and stepperconnector components, is a wrapper for the stepper functionality.
|
4
|
+
* It provides the context for the stepper items and connectors, allowing them to adapt to the stepper's orientation and variant.
|
5
|
+
*
|
6
|
+
* @tagname mdc-stepper
|
7
|
+
*
|
8
|
+
* @slot default - Pass the list of `mdc-stepperitem` and `mdc-stepperconnector` elements to be rendered inside the stepper.
|
9
|
+
*
|
10
|
+
*/
|
11
|
+
declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {}>;
|
12
|
+
export default reactWrapper;
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import { createComponent } from '@lit/react';
|
3
|
+
import Component from '../../components/stepper';
|
4
|
+
import { TAG_NAME } from '../../components/stepper/stepper.constants';
|
5
|
+
/**
|
6
|
+
* Stepper component, which orchestrates stepperitem and stepperconnector components, is a wrapper for the stepper functionality.
|
7
|
+
* It provides the context for the stepper items and connectors, allowing them to adapt to the stepper's orientation and variant.
|
8
|
+
*
|
9
|
+
* @tagname mdc-stepper
|
10
|
+
*
|
11
|
+
* @slot default - Pass the list of `mdc-stepperitem` and `mdc-stepperconnector` elements to be rendered inside the stepper.
|
12
|
+
*
|
13
|
+
*/
|
14
|
+
const reactWrapper = createComponent({
|
15
|
+
tagName: TAG_NAME,
|
16
|
+
elementClass: Component,
|
17
|
+
react: React,
|
18
|
+
events: {},
|
19
|
+
displayName: 'Stepper',
|
20
|
+
});
|
21
|
+
export default reactWrapper;
|