@govtechsg/sgds-web-component 3.17.1-rc.0 → 3.18.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/base/card-element.d.ts +1 -0
- package/base/card-element.js +14 -0
- package/base/card-element.js.map +1 -1
- package/base/card.js +1 -1
- package/components/Breadcrumb/index.umd.min.js +10 -16
- package/components/Breadcrumb/index.umd.min.js.map +1 -1
- package/components/Card/index.umd.min.js +2 -2
- package/components/Card/index.umd.min.js.map +1 -1
- package/components/Card/sgds-card.js +3 -9
- package/components/Card/sgds-card.js.map +1 -1
- package/components/ComboBox/index.umd.min.js +1 -1
- package/components/ComboBox/index.umd.min.js.map +1 -1
- package/components/Datepicker/index.umd.min.js +1 -1
- package/components/Datepicker/index.umd.min.js.map +1 -1
- package/components/Dropdown/dropdown-menu.js +1 -1
- package/components/Dropdown/dropdown.js +1 -1
- package/components/Dropdown/index.umd.min.js +3 -9
- package/components/Dropdown/index.umd.min.js.map +1 -1
- package/components/Dropdown/sgds-dropdown.js +19 -11
- package/components/Dropdown/sgds-dropdown.js.map +1 -1
- package/components/IconCard/index.umd.min.js +3 -3
- package/components/IconCard/index.umd.min.js.map +1 -1
- package/components/IconCard/sgds-icon-card.js +3 -9
- package/components/IconCard/sgds-icon-card.js.map +1 -1
- package/components/ImageCard/index.umd.min.js +2 -2
- package/components/ImageCard/index.umd.min.js.map +1 -1
- package/components/ImageCard/sgds-image-card.js +3 -9
- package/components/ImageCard/sgds-image-card.js.map +1 -1
- package/components/Mainnav/index.umd.min.js +10 -16
- package/components/Mainnav/index.umd.min.js.map +1 -1
- package/components/OverflowMenu/index.umd.min.js +3 -9
- package/components/OverflowMenu/index.umd.min.js.map +1 -1
- package/components/Select/index.umd.min.js +1 -1
- package/components/Select/index.umd.min.js.map +1 -1
- package/components/Stepper/index.d.ts +0 -2
- package/components/Stepper/index.js +0 -2
- package/components/Stepper/index.js.map +1 -1
- package/components/Stepper/index.umd.min.js +23 -47
- package/components/Stepper/index.umd.min.js.map +1 -1
- package/components/Stepper/sgds-stepper.d.ts +2 -23
- package/components/Stepper/sgds-stepper.js +11 -79
- package/components/Stepper/sgds-stepper.js.map +1 -1
- package/components/Stepper/stepper.js +1 -1
- package/components/Stepper/types.d.ts +0 -1
- package/components/ThumbnailCard/index.umd.min.js +5 -5
- package/components/ThumbnailCard/index.umd.min.js.map +1 -1
- package/components/ThumbnailCard/sgds-thumbnail-card.js +6 -9
- package/components/ThumbnailCard/sgds-thumbnail-card.js.map +1 -1
- package/components/index.umd.min.js +9 -17
- package/components/index.umd.min.js.map +1 -1
- package/css/fouc.css +0 -1
- package/custom-elements.json +99 -201
- package/index.umd.min.js +43 -73
- package/index.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/react/base/card-element.cjs.js +14 -0
- package/react/base/card-element.cjs.js.map +1 -1
- package/react/base/card-element.js +14 -0
- package/react/base/card-element.js.map +1 -1
- package/react/base/card.cjs.js +1 -1
- package/react/base/card.js +1 -1
- package/react/components/Card/sgds-card.cjs.js +3 -9
- package/react/components/Card/sgds-card.cjs.js.map +1 -1
- package/react/components/Card/sgds-card.js +3 -9
- package/react/components/Card/sgds-card.js.map +1 -1
- package/react/components/Dropdown/dropdown-menu.cjs.js +1 -1
- package/react/components/Dropdown/dropdown-menu.js +1 -1
- package/react/components/Dropdown/dropdown.cjs.js +1 -1
- package/react/components/Dropdown/dropdown.js +1 -1
- package/react/components/Dropdown/sgds-dropdown.cjs.js +19 -11
- package/react/components/Dropdown/sgds-dropdown.cjs.js.map +1 -1
- package/react/components/Dropdown/sgds-dropdown.js +19 -11
- package/react/components/Dropdown/sgds-dropdown.js.map +1 -1
- package/react/components/IconCard/sgds-icon-card.cjs.js +3 -9
- package/react/components/IconCard/sgds-icon-card.cjs.js.map +1 -1
- package/react/components/IconCard/sgds-icon-card.js +3 -9
- package/react/components/IconCard/sgds-icon-card.js.map +1 -1
- package/react/components/ImageCard/sgds-image-card.cjs.js +3 -9
- package/react/components/ImageCard/sgds-image-card.cjs.js.map +1 -1
- package/react/components/ImageCard/sgds-image-card.js +3 -9
- package/react/components/ImageCard/sgds-image-card.js.map +1 -1
- package/react/components/Stepper/sgds-stepper.cjs.js +10 -78
- package/react/components/Stepper/sgds-stepper.cjs.js.map +1 -1
- package/react/components/Stepper/sgds-stepper.js +11 -79
- package/react/components/Stepper/sgds-stepper.js.map +1 -1
- package/react/components/Stepper/stepper.cjs.js +1 -1
- package/react/components/Stepper/stepper.js +1 -1
- package/react/components/ThumbnailCard/sgds-thumbnail-card.cjs.js +6 -9
- package/react/components/ThumbnailCard/sgds-thumbnail-card.cjs.js.map +1 -1
- package/react/components/ThumbnailCard/sgds-thumbnail-card.js +6 -9
- package/react/components/ThumbnailCard/sgds-thumbnail-card.js.map +1 -1
- package/react/index.cjs.js +38 -40
- package/react/index.cjs.js.map +1 -1
- package/react/index.d.ts +0 -1
- package/react/index.js +0 -1
- package/react/index.js.map +1 -1
- package/types/react.d.ts +3 -18
- package/components/Stepper/sgds-step.d.ts +0 -42
- package/components/Stepper/sgds-step.js +0 -118
- package/components/Stepper/sgds-step.js.map +0 -1
- package/components/Stepper/step.js +0 -6
- package/components/Stepper/step.js.map +0 -1
- package/react/components/Stepper/sgds-step.cjs.js +0 -124
- package/react/components/Stepper/sgds-step.cjs.js.map +0 -1
- package/react/components/Stepper/sgds-step.js +0 -119
- package/react/components/Stepper/sgds-step.js.map +0 -1
- package/react/components/Stepper/step.cjs.js +0 -11
- package/react/components/Stepper/step.cjs.js.map +0 -1
- package/react/components/Stepper/step.js +0 -7
- package/react/components/Stepper/step.js.map +0 -1
- package/react/step/index.cjs.js +0 -40
- package/react/step/index.cjs.js.map +0 -1
- package/react/step/index.d.ts +0 -2
- package/react/step/index.js +0 -16
- package/react/step/index.js.map +0 -1
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import SgdsElement from "../../base/sgds-element";
|
|
2
|
-
import SgdsIcon from "../Icon/sgds-icon";
|
|
3
|
-
/**
|
|
4
|
-
* @summary A step within a stepper component
|
|
5
|
-
* @slot default - Additional content to display under the step header
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
export declare class SgdsStep extends SgdsElement {
|
|
9
|
-
static styles: import("lit").CSSResult[];
|
|
10
|
-
/** @internal */
|
|
11
|
-
static dependencies: {
|
|
12
|
-
"sgds-icon": typeof SgdsIcon;
|
|
13
|
-
};
|
|
14
|
-
/** The header text for the step */
|
|
15
|
-
stepHeader: string;
|
|
16
|
-
/** Optional icon name to display instead of step number */
|
|
17
|
-
iconName: string | undefined;
|
|
18
|
-
/** Optional component to render for this step */
|
|
19
|
-
component: unknown;
|
|
20
|
-
/** @internal The index of this step within the stepper */
|
|
21
|
-
stepIndex: number;
|
|
22
|
-
/** @internal Whether this step is currently active */
|
|
23
|
-
active: boolean;
|
|
24
|
-
/** @internal Whether this step is currently disabled */
|
|
25
|
-
disabled: boolean;
|
|
26
|
-
/** @internal Whether this step is completed */
|
|
27
|
-
completed: boolean;
|
|
28
|
-
/** @internal Whether this step is clickable */
|
|
29
|
-
isClickable: boolean;
|
|
30
|
-
/** @internal Orientation of parent stepper (horizontal or vertical) */
|
|
31
|
-
orientation: "horizontal" | "vertical";
|
|
32
|
-
/** @internal Whether this step is the first sgds-step of its type in the slot */
|
|
33
|
-
isFirstOfType: boolean;
|
|
34
|
-
/** @internal Whether this step is completed */
|
|
35
|
-
_isCompleted: boolean;
|
|
36
|
-
render(): import("lit").TemplateResult<1>;
|
|
37
|
-
/**@internal */
|
|
38
|
-
_handleClick(): void;
|
|
39
|
-
/**@internal */
|
|
40
|
-
_handleKeyDown(event: KeyboardEvent): void;
|
|
41
|
-
}
|
|
42
|
-
export default SgdsStep;
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import { __decorate } from 'tslib';
|
|
2
|
-
import { html } from 'lit';
|
|
3
|
-
import { property } from 'lit/decorators.js';
|
|
4
|
-
import { classMap } from 'lit/directives/class-map.js';
|
|
5
|
-
import SgdsElement from '../../base/sgds-element.js';
|
|
6
|
-
import { SgdsIcon } from '../Icon/sgds-icon.js';
|
|
7
|
-
import css_248z from './step.js';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @summary A step within a stepper component
|
|
11
|
-
* @slot default - Additional content to display under the step header
|
|
12
|
-
*
|
|
13
|
-
*/
|
|
14
|
-
class SgdsStep extends SgdsElement {
|
|
15
|
-
constructor() {
|
|
16
|
-
super(...arguments);
|
|
17
|
-
/** The header text for the step */
|
|
18
|
-
this.stepHeader = "";
|
|
19
|
-
/** @internal The index of this step within the stepper */
|
|
20
|
-
this.stepIndex = 0;
|
|
21
|
-
/** @internal Whether this step is currently active */
|
|
22
|
-
this.active = false;
|
|
23
|
-
/** @internal Whether this step is currently disabled */
|
|
24
|
-
this.disabled = false;
|
|
25
|
-
/** @internal Whether this step is completed */
|
|
26
|
-
this.completed = false;
|
|
27
|
-
/** @internal Whether this step is clickable */
|
|
28
|
-
this.isClickable = false;
|
|
29
|
-
/** @internal Orientation of parent stepper (horizontal or vertical) */
|
|
30
|
-
this.orientation = "horizontal";
|
|
31
|
-
/** @internal Whether this step is the first sgds-step of its type in the slot */
|
|
32
|
-
this.isFirstOfType = false;
|
|
33
|
-
/** @internal Whether this step is completed */
|
|
34
|
-
this._isCompleted = false;
|
|
35
|
-
}
|
|
36
|
-
render() {
|
|
37
|
-
const isValidClickable = !this.disabled && this.isClickable;
|
|
38
|
-
return html `
|
|
39
|
-
<div class="stepper-item-container">
|
|
40
|
-
<div
|
|
41
|
-
class="stepper-item ${classMap({
|
|
42
|
-
first: this.isFirstOfType,
|
|
43
|
-
active: this.active,
|
|
44
|
-
completed: this._isCompleted,
|
|
45
|
-
clickable: this.isClickable,
|
|
46
|
-
vertical: this.orientation === "vertical",
|
|
47
|
-
disabled: this.disabled
|
|
48
|
-
})}"
|
|
49
|
-
tabindex=${isValidClickable ? "0" : "-1"}
|
|
50
|
-
aria-current=${this.active ? "step" : "false"}
|
|
51
|
-
aria-disabled=${this.disabled || (!this.active && !this._isCompleted) ? "true" : "false"}
|
|
52
|
-
@click="${isValidClickable ? () => this._handleClick() : null}"
|
|
53
|
-
@keydown=${isValidClickable ? (e) => this._handleKeyDown(e) : null}
|
|
54
|
-
>
|
|
55
|
-
<div class="stepper-marker">
|
|
56
|
-
${this.iconName ? html `<sgds-icon name=${this.iconName} size="md"></sgds-icon>` : this.stepIndex + 1}
|
|
57
|
-
</div>
|
|
58
|
-
|
|
59
|
-
<div class="stepper-detail">
|
|
60
|
-
<div class="sgds:text-body-md">${this.stepHeader}</div>
|
|
61
|
-
<div class="stepper-slot">
|
|
62
|
-
<slot></slot>
|
|
63
|
-
</div>
|
|
64
|
-
</div>
|
|
65
|
-
</div>
|
|
66
|
-
</div>
|
|
67
|
-
`;
|
|
68
|
-
}
|
|
69
|
-
/**@internal */
|
|
70
|
-
_handleClick() {
|
|
71
|
-
this.emit("i-sgds-click", { detail: { stepIndex: this.stepIndex } });
|
|
72
|
-
}
|
|
73
|
-
/**@internal */
|
|
74
|
-
_handleKeyDown(event) {
|
|
75
|
-
if (event.key === "Enter") {
|
|
76
|
-
this._handleClick();
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
SgdsStep.styles = [...SgdsElement.styles, css_248z];
|
|
81
|
-
/** @internal */
|
|
82
|
-
SgdsStep.dependencies = { "sgds-icon": SgdsIcon };
|
|
83
|
-
__decorate([
|
|
84
|
-
property({ type: String, reflect: true })
|
|
85
|
-
], SgdsStep.prototype, "stepHeader", void 0);
|
|
86
|
-
__decorate([
|
|
87
|
-
property({ type: String, reflect: true })
|
|
88
|
-
], SgdsStep.prototype, "iconName", void 0);
|
|
89
|
-
__decorate([
|
|
90
|
-
property({ type: Object })
|
|
91
|
-
], SgdsStep.prototype, "component", void 0);
|
|
92
|
-
__decorate([
|
|
93
|
-
property({ type: Number })
|
|
94
|
-
], SgdsStep.prototype, "stepIndex", void 0);
|
|
95
|
-
__decorate([
|
|
96
|
-
property({ type: Boolean, reflect: true })
|
|
97
|
-
], SgdsStep.prototype, "active", void 0);
|
|
98
|
-
__decorate([
|
|
99
|
-
property({ type: Boolean, reflect: true })
|
|
100
|
-
], SgdsStep.prototype, "disabled", void 0);
|
|
101
|
-
__decorate([
|
|
102
|
-
property({ type: Boolean, reflect: true })
|
|
103
|
-
], SgdsStep.prototype, "completed", void 0);
|
|
104
|
-
__decorate([
|
|
105
|
-
property({ type: Boolean })
|
|
106
|
-
], SgdsStep.prototype, "isClickable", void 0);
|
|
107
|
-
__decorate([
|
|
108
|
-
property({ type: String })
|
|
109
|
-
], SgdsStep.prototype, "orientation", void 0);
|
|
110
|
-
__decorate([
|
|
111
|
-
property({ type: Boolean })
|
|
112
|
-
], SgdsStep.prototype, "isFirstOfType", void 0);
|
|
113
|
-
__decorate([
|
|
114
|
-
property({ type: Boolean })
|
|
115
|
-
], SgdsStep.prototype, "_isCompleted", void 0);
|
|
116
|
-
|
|
117
|
-
export { SgdsStep, SgdsStep as default };
|
|
118
|
-
//# sourceMappingURL=sgds-step.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sgds-step.js","sources":["../../../src/components/Stepper/sgds-step.ts"],"sourcesContent":["import { html } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport SgdsElement from \"../../base/sgds-element\";\nimport SgdsIcon from \"../Icon/sgds-icon\";\nimport stepStyle from \"./step.css\";\n\n/**\n * @summary A step within a stepper component\n * @slot default - Additional content to display under the step header\n *\n */\nexport class SgdsStep extends SgdsElement {\n static styles = [...SgdsElement.styles, stepStyle];\n /** @internal */\n static dependencies = { \"sgds-icon\": SgdsIcon };\n\n /** The header text for the step */\n @property({ type: String, reflect: true })\n stepHeader = \"\";\n\n /** Optional icon name to display instead of step number */\n @property({ type: String, reflect: true })\n iconName: string | undefined;\n\n /** Optional component to render for this step */\n @property({ type: Object })\n component: unknown;\n\n /** @internal The index of this step within the stepper */\n @property({ type: Number })\n stepIndex = 0;\n\n /** @internal Whether this step is currently active */\n @property({ type: Boolean, reflect: true })\n active = false;\n\n /** @internal Whether this step is currently disabled */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /** @internal Whether this step is completed */\n @property({ type: Boolean, reflect: true })\n completed = false;\n\n /** @internal Whether this step is clickable */\n @property({ type: Boolean })\n isClickable = false;\n\n /** @internal Orientation of parent stepper (horizontal or vertical) */\n @property({ type: String })\n orientation: \"horizontal\" | \"vertical\" = \"horizontal\";\n\n /** @internal Whether this step is the first sgds-step of its type in the slot */\n @property({ type: Boolean })\n isFirstOfType = false;\n\n /** @internal Whether this step is completed */\n @property({ type: Boolean })\n _isCompleted = false;\n\n render() {\n const isValidClickable = !this.disabled && this.isClickable;\n\n return html`\n <div class=\"stepper-item-container\">\n <div\n class=\"stepper-item ${classMap({\n first: this.isFirstOfType,\n active: this.active,\n completed: this._isCompleted,\n clickable: this.isClickable,\n vertical: this.orientation === \"vertical\",\n disabled: this.disabled\n })}\"\n tabindex=${isValidClickable ? \"0\" : \"-1\"}\n aria-current=${this.active ? \"step\" : \"false\"}\n aria-disabled=${this.disabled || (!this.active && !this._isCompleted) ? \"true\" : \"false\"}\n @click=\"${isValidClickable ? () => this._handleClick() : null}\"\n @keydown=${isValidClickable ? (e: KeyboardEvent) => this._handleKeyDown(e) : null}\n >\n <div class=\"stepper-marker\">\n ${this.iconName ? html`<sgds-icon name=${this.iconName} size=\"md\"></sgds-icon>` : this.stepIndex + 1}\n </div>\n\n <div class=\"stepper-detail\">\n <div class=\"sgds:text-body-md\">${this.stepHeader}</div>\n <div class=\"stepper-slot\">\n <slot></slot>\n </div>\n </div>\n </div>\n </div>\n `;\n }\n\n /**@internal */\n _handleClick() {\n this.emit(\"i-sgds-click\", { detail: { stepIndex: this.stepIndex } });\n }\n\n /**@internal */\n _handleKeyDown(event: KeyboardEvent) {\n if (event.key === \"Enter\") {\n this._handleClick();\n }\n }\n}\n\nexport default SgdsStep;\n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AA,CAAA,CAAA,CAAA;AAItB,UAAA,CAAA;AADC,IAAA,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AACP,CAAA,EAAA,QAAA,CAAA,SAAA,EAAA,cAAA,EAAA,KAAA,CAAA,CAAA;;;;"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { css } from 'lit';
|
|
2
|
-
|
|
3
|
-
var css_248z = css`:host{display:contents}.stepper-item-container{flex-basis:1em;flex-grow:1;flex-shrink:1;position:relative;width:fit-content}.stepper-item,.stepper-item-container{align-items:center;display:flex;flex-direction:column}.stepper-item{gap:var(--sgds-gap-sm)}.stepper-item.vertical{align-items:flex-start;flex-direction:row;margin-bottom:var(--sgds-padding-xl)}.stepper-item.clickable:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.stepper-item:not(.first):not(.vertical):before{background:var(--sgds-border-color-translucent);content:" ";height:var(--sgds-dimension-2);left:calc(-50% + 16px);position:absolute;top:15px;width:calc(100% - var(--sgds-dimension-32))}:host(:not(.last)) .stepper-item-container .stepper-item.vertical:after{background:var(--sgds-bg-translucent);content:" ";height:calc(100% - var(--sgds-dimension-32));left:15px;position:absolute;top:32px;width:var(--sgds-dimension-2)}.stepper-item-container .stepper-item.active:not(.first):before,.stepper-item-container .stepper-item.completed:not(.first):before,:host(:not(.last)) .stepper-item-container .stepper-item.completed:after{background:var(--sgds-primary-border-color-default)}.stepper-item.clickable{cursor:pointer}.stepper-marker{align-items:center;background:var(--sgds-bg-translucent);border:var(--sgds-border-width-2) solid var(--sgds-border-color-transparent);border-radius:50%;color:var(--sgds-color-default);display:flex;height:var(--sgds-dimension-32);justify-content:center;width:var(--sgds-dimension-32);z-index:1}.stepper-detail{max-width:var(--sgds-dimension-128);text-align:center}.stepper-item.vertical .stepper-detail{padding:var(--sgds-padding-2-xs) 0 0;text-align:left}.stepper-item:not(.active):not(.completed) .stepper-detail{color:var(--sgds-color-subtle)}.stepper-item.clickable:focus .stepper-marker,.stepper-item.clickable:focus-visible .stepper-marker,.stepper-item.clickable:hover .stepper-marker{background-color:var(--sgds-primary-surface-emphasis);border-color:var(--sgds-border-color-transparent);color:var(--sgds-color-fixed-light)}.stepper-item.clickable:focus .stepper-detail,.stepper-item.clickable:focus-visible .stepper-detail,.stepper-item.clickable:hover .stepper-detail{color:var(--sgds-primary-color-emphasis)}.stepper-item.clickable .stepper-detail{color:var(--sgds-primary-color-default)}.stepper-item.completed .stepper-marker{background-color:var(--sgds-bg-transparent);border:var(--sgds-border-width-2) solid var(--sgds-primary-border-color-default);color:var(--sgds-primary-color-default)}.stepper-item.active .stepper-marker{background-color:var(--sgds-primary-surface-default);color:var(--sgds-color-fixed-light)}.stepper-slot *{font-size:var(--sgds-font-size-body-sm)}.stepper-item.disabled{opacity:var(--sgds-opacity-40)}`;
|
|
4
|
-
|
|
5
|
-
export { css_248z as default };
|
|
6
|
-
//# sourceMappingURL=step.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"step.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
-
|
|
6
|
-
var tslib = require('tslib');
|
|
7
|
-
var lit = require('lit');
|
|
8
|
-
var decorators_js = require('lit/decorators.js');
|
|
9
|
-
var classMap_js = require('lit/directives/class-map.js');
|
|
10
|
-
var sgdsElement = require('../../base/sgds-element.cjs.js');
|
|
11
|
-
var sgdsIcon = require('../Icon/sgds-icon.cjs.js');
|
|
12
|
-
var step = require('./step.cjs.js');
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* @summary A step within a stepper component
|
|
16
|
-
* @slot default - Additional content to display under the step header
|
|
17
|
-
*
|
|
18
|
-
*/
|
|
19
|
-
class SgdsStep extends sgdsElement["default"] {
|
|
20
|
-
constructor() {
|
|
21
|
-
super(...arguments);
|
|
22
|
-
/** The header text for the step */
|
|
23
|
-
this.stepHeader = "";
|
|
24
|
-
/** @internal The index of this step within the stepper */
|
|
25
|
-
this.stepIndex = 0;
|
|
26
|
-
/** @internal Whether this step is currently active */
|
|
27
|
-
this.active = false;
|
|
28
|
-
/** @internal Whether this step is currently disabled */
|
|
29
|
-
this.disabled = false;
|
|
30
|
-
/** @internal Whether this step is completed */
|
|
31
|
-
this.completed = false;
|
|
32
|
-
/** @internal Whether this step is clickable */
|
|
33
|
-
this.isClickable = false;
|
|
34
|
-
/** @internal Orientation of parent stepper (horizontal or vertical) */
|
|
35
|
-
this.orientation = "horizontal";
|
|
36
|
-
/** @internal Whether this step is the first sgds-step of its type in the slot */
|
|
37
|
-
this.isFirstOfType = false;
|
|
38
|
-
/** @internal Whether this step is completed */
|
|
39
|
-
this._isCompleted = false;
|
|
40
|
-
}
|
|
41
|
-
render() {
|
|
42
|
-
const isValidClickable = !this.disabled && this.isClickable;
|
|
43
|
-
return lit.html `
|
|
44
|
-
<div class="stepper-item-container">
|
|
45
|
-
<div
|
|
46
|
-
class="stepper-item ${classMap_js.classMap({
|
|
47
|
-
first: this.isFirstOfType,
|
|
48
|
-
active: this.active,
|
|
49
|
-
completed: this._isCompleted,
|
|
50
|
-
clickable: this.isClickable,
|
|
51
|
-
vertical: this.orientation === "vertical",
|
|
52
|
-
disabled: this.disabled
|
|
53
|
-
})}"
|
|
54
|
-
tabindex=${isValidClickable ? "0" : "-1"}
|
|
55
|
-
aria-current=${this.active ? "step" : "false"}
|
|
56
|
-
aria-disabled=${this.disabled || (!this.active && !this._isCompleted) ? "true" : "false"}
|
|
57
|
-
@click="${isValidClickable ? () => this._handleClick() : null}"
|
|
58
|
-
@keydown=${isValidClickable ? (e) => this._handleKeyDown(e) : null}
|
|
59
|
-
>
|
|
60
|
-
<div class="stepper-marker">
|
|
61
|
-
${this.iconName ? lit.html `<sgds-icon name=${this.iconName} size="md"></sgds-icon>` : this.stepIndex + 1}
|
|
62
|
-
</div>
|
|
63
|
-
|
|
64
|
-
<div class="stepper-detail">
|
|
65
|
-
<div class="sgds:text-body-md">${this.stepHeader}</div>
|
|
66
|
-
<div class="stepper-slot">
|
|
67
|
-
<slot></slot>
|
|
68
|
-
</div>
|
|
69
|
-
</div>
|
|
70
|
-
</div>
|
|
71
|
-
</div>
|
|
72
|
-
`;
|
|
73
|
-
}
|
|
74
|
-
/**@internal */
|
|
75
|
-
_handleClick() {
|
|
76
|
-
this.emit("i-sgds-click", { detail: { stepIndex: this.stepIndex } });
|
|
77
|
-
}
|
|
78
|
-
/**@internal */
|
|
79
|
-
_handleKeyDown(event) {
|
|
80
|
-
if (event.key === "Enter") {
|
|
81
|
-
this._handleClick();
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
SgdsStep.styles = [...sgdsElement["default"].styles, step["default"]];
|
|
86
|
-
/** @internal */
|
|
87
|
-
SgdsStep.dependencies = { "sgds-icon": sgdsIcon.SgdsIcon };
|
|
88
|
-
tslib.__decorate([
|
|
89
|
-
decorators_js.property({ type: String, reflect: true })
|
|
90
|
-
], SgdsStep.prototype, "stepHeader", void 0);
|
|
91
|
-
tslib.__decorate([
|
|
92
|
-
decorators_js.property({ type: String, reflect: true })
|
|
93
|
-
], SgdsStep.prototype, "iconName", void 0);
|
|
94
|
-
tslib.__decorate([
|
|
95
|
-
decorators_js.property({ type: Object })
|
|
96
|
-
], SgdsStep.prototype, "component", void 0);
|
|
97
|
-
tslib.__decorate([
|
|
98
|
-
decorators_js.property({ type: Number })
|
|
99
|
-
], SgdsStep.prototype, "stepIndex", void 0);
|
|
100
|
-
tslib.__decorate([
|
|
101
|
-
decorators_js.property({ type: Boolean, reflect: true })
|
|
102
|
-
], SgdsStep.prototype, "active", void 0);
|
|
103
|
-
tslib.__decorate([
|
|
104
|
-
decorators_js.property({ type: Boolean, reflect: true })
|
|
105
|
-
], SgdsStep.prototype, "disabled", void 0);
|
|
106
|
-
tslib.__decorate([
|
|
107
|
-
decorators_js.property({ type: Boolean, reflect: true })
|
|
108
|
-
], SgdsStep.prototype, "completed", void 0);
|
|
109
|
-
tslib.__decorate([
|
|
110
|
-
decorators_js.property({ type: Boolean })
|
|
111
|
-
], SgdsStep.prototype, "isClickable", void 0);
|
|
112
|
-
tslib.__decorate([
|
|
113
|
-
decorators_js.property({ type: String })
|
|
114
|
-
], SgdsStep.prototype, "orientation", void 0);
|
|
115
|
-
tslib.__decorate([
|
|
116
|
-
decorators_js.property({ type: Boolean })
|
|
117
|
-
], SgdsStep.prototype, "isFirstOfType", void 0);
|
|
118
|
-
tslib.__decorate([
|
|
119
|
-
decorators_js.property({ type: Boolean })
|
|
120
|
-
], SgdsStep.prototype, "_isCompleted", void 0);
|
|
121
|
-
|
|
122
|
-
exports.SgdsStep = SgdsStep;
|
|
123
|
-
exports["default"] = SgdsStep;
|
|
124
|
-
//# sourceMappingURL=sgds-step.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sgds-step.cjs.js","sources":["../../../../src/components/Stepper/sgds-step.ts"],"sourcesContent":["import { html } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport SgdsElement from \"../../base/sgds-element\";\nimport SgdsIcon from \"../Icon/sgds-icon\";\nimport stepStyle from \"./step.css\";\n\n/**\n * @summary A step within a stepper component\n * @slot default - Additional content to display under the step header\n *\n */\nexport class SgdsStep extends SgdsElement {\n static styles = [...SgdsElement.styles, stepStyle];\n /** @internal */\n static dependencies = { \"sgds-icon\": SgdsIcon };\n\n /** The header text for the step */\n @property({ type: String, reflect: true })\n stepHeader = \"\";\n\n /** Optional icon name to display instead of step number */\n @property({ type: String, reflect: true })\n iconName: string | undefined;\n\n /** Optional component to render for this step */\n @property({ type: Object })\n component: unknown;\n\n /** @internal The index of this step within the stepper */\n @property({ type: Number })\n stepIndex = 0;\n\n /** @internal Whether this step is currently active */\n @property({ type: Boolean, reflect: true })\n active = false;\n\n /** @internal Whether this step is currently disabled */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /** @internal Whether this step is completed */\n @property({ type: Boolean, reflect: true })\n completed = false;\n\n /** @internal Whether this step is clickable */\n @property({ type: Boolean })\n isClickable = false;\n\n /** @internal Orientation of parent stepper (horizontal or vertical) */\n @property({ type: String })\n orientation: \"horizontal\" | \"vertical\" = \"horizontal\";\n\n /** @internal Whether this step is the first sgds-step of its type in the slot */\n @property({ type: Boolean })\n isFirstOfType = false;\n\n /** @internal Whether this step is completed */\n @property({ type: Boolean })\n _isCompleted = false;\n\n render() {\n const isValidClickable = !this.disabled && this.isClickable;\n\n return html`\n <div class=\"stepper-item-container\">\n <div\n class=\"stepper-item ${classMap({\n first: this.isFirstOfType,\n active: this.active,\n completed: this._isCompleted,\n clickable: this.isClickable,\n vertical: this.orientation === \"vertical\",\n disabled: this.disabled\n })}\"\n tabindex=${isValidClickable ? \"0\" : \"-1\"}\n aria-current=${this.active ? \"step\" : \"false\"}\n aria-disabled=${this.disabled || (!this.active && !this._isCompleted) ? \"true\" : \"false\"}\n @click=\"${isValidClickable ? () => this._handleClick() : null}\"\n @keydown=${isValidClickable ? (e: KeyboardEvent) => this._handleKeyDown(e) : null}\n >\n <div class=\"stepper-marker\">\n ${this.iconName ? html`<sgds-icon name=${this.iconName} size=\"md\"></sgds-icon>` : this.stepIndex + 1}\n </div>\n\n <div class=\"stepper-detail\">\n <div class=\"sgds:text-body-md\">${this.stepHeader}</div>\n <div class=\"stepper-slot\">\n <slot></slot>\n </div>\n </div>\n </div>\n </div>\n `;\n }\n\n /**@internal */\n _handleClick() {\n this.emit(\"i-sgds-click\", { detail: { stepIndex: this.stepIndex } });\n }\n\n /**@internal */\n _handleKeyDown(event: KeyboardEvent) {\n if (event.key === \"Enter\") {\n this._handleClick();\n }\n }\n}\n\nexport default SgdsStep;\n"],"names":["SgdsElement","html","classMap","stepStyle","SgdsIcon","__decorate","property"],"mapp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A,EAAA,QAAA,CAAA,SAAA,EAAA,eAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAItBD,gBAAA,CAAA;AADC,IAAAC,sBAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AACP,CAAA,EAAA,QAAA,CAAA,SAAA,EAAA,cAAA,EAAA,KAAA,CAAA,CAAA;;;;;"}
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { __decorate } from 'tslib';
|
|
3
|
-
import { html } from 'lit';
|
|
4
|
-
import { property } from 'lit/decorators.js';
|
|
5
|
-
import { classMap } from 'lit/directives/class-map.js';
|
|
6
|
-
import SgdsElement from '../../base/sgds-element.js';
|
|
7
|
-
import { SgdsIcon } from '../Icon/sgds-icon.js';
|
|
8
|
-
import css_248z from './step.js';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* @summary A step within a stepper component
|
|
12
|
-
* @slot default - Additional content to display under the step header
|
|
13
|
-
*
|
|
14
|
-
*/
|
|
15
|
-
class SgdsStep extends SgdsElement {
|
|
16
|
-
constructor() {
|
|
17
|
-
super(...arguments);
|
|
18
|
-
/** The header text for the step */
|
|
19
|
-
this.stepHeader = "";
|
|
20
|
-
/** @internal The index of this step within the stepper */
|
|
21
|
-
this.stepIndex = 0;
|
|
22
|
-
/** @internal Whether this step is currently active */
|
|
23
|
-
this.active = false;
|
|
24
|
-
/** @internal Whether this step is currently disabled */
|
|
25
|
-
this.disabled = false;
|
|
26
|
-
/** @internal Whether this step is completed */
|
|
27
|
-
this.completed = false;
|
|
28
|
-
/** @internal Whether this step is clickable */
|
|
29
|
-
this.isClickable = false;
|
|
30
|
-
/** @internal Orientation of parent stepper (horizontal or vertical) */
|
|
31
|
-
this.orientation = "horizontal";
|
|
32
|
-
/** @internal Whether this step is the first sgds-step of its type in the slot */
|
|
33
|
-
this.isFirstOfType = false;
|
|
34
|
-
/** @internal Whether this step is completed */
|
|
35
|
-
this._isCompleted = false;
|
|
36
|
-
}
|
|
37
|
-
render() {
|
|
38
|
-
const isValidClickable = !this.disabled && this.isClickable;
|
|
39
|
-
return html `
|
|
40
|
-
<div class="stepper-item-container">
|
|
41
|
-
<div
|
|
42
|
-
class="stepper-item ${classMap({
|
|
43
|
-
first: this.isFirstOfType,
|
|
44
|
-
active: this.active,
|
|
45
|
-
completed: this._isCompleted,
|
|
46
|
-
clickable: this.isClickable,
|
|
47
|
-
vertical: this.orientation === "vertical",
|
|
48
|
-
disabled: this.disabled
|
|
49
|
-
})}"
|
|
50
|
-
tabindex=${isValidClickable ? "0" : "-1"}
|
|
51
|
-
aria-current=${this.active ? "step" : "false"}
|
|
52
|
-
aria-disabled=${this.disabled || (!this.active && !this._isCompleted) ? "true" : "false"}
|
|
53
|
-
@click="${isValidClickable ? () => this._handleClick() : null}"
|
|
54
|
-
@keydown=${isValidClickable ? (e) => this._handleKeyDown(e) : null}
|
|
55
|
-
>
|
|
56
|
-
<div class="stepper-marker">
|
|
57
|
-
${this.iconName ? html `<sgds-icon name=${this.iconName} size="md"></sgds-icon>` : this.stepIndex + 1}
|
|
58
|
-
</div>
|
|
59
|
-
|
|
60
|
-
<div class="stepper-detail">
|
|
61
|
-
<div class="sgds:text-body-md">${this.stepHeader}</div>
|
|
62
|
-
<div class="stepper-slot">
|
|
63
|
-
<slot></slot>
|
|
64
|
-
</div>
|
|
65
|
-
</div>
|
|
66
|
-
</div>
|
|
67
|
-
</div>
|
|
68
|
-
`;
|
|
69
|
-
}
|
|
70
|
-
/**@internal */
|
|
71
|
-
_handleClick() {
|
|
72
|
-
this.emit("i-sgds-click", { detail: { stepIndex: this.stepIndex } });
|
|
73
|
-
}
|
|
74
|
-
/**@internal */
|
|
75
|
-
_handleKeyDown(event) {
|
|
76
|
-
if (event.key === "Enter") {
|
|
77
|
-
this._handleClick();
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
SgdsStep.styles = [...SgdsElement.styles, css_248z];
|
|
82
|
-
/** @internal */
|
|
83
|
-
SgdsStep.dependencies = { "sgds-icon": SgdsIcon };
|
|
84
|
-
__decorate([
|
|
85
|
-
property({ type: String, reflect: true })
|
|
86
|
-
], SgdsStep.prototype, "stepHeader", void 0);
|
|
87
|
-
__decorate([
|
|
88
|
-
property({ type: String, reflect: true })
|
|
89
|
-
], SgdsStep.prototype, "iconName", void 0);
|
|
90
|
-
__decorate([
|
|
91
|
-
property({ type: Object })
|
|
92
|
-
], SgdsStep.prototype, "component", void 0);
|
|
93
|
-
__decorate([
|
|
94
|
-
property({ type: Number })
|
|
95
|
-
], SgdsStep.prototype, "stepIndex", void 0);
|
|
96
|
-
__decorate([
|
|
97
|
-
property({ type: Boolean, reflect: true })
|
|
98
|
-
], SgdsStep.prototype, "active", void 0);
|
|
99
|
-
__decorate([
|
|
100
|
-
property({ type: Boolean, reflect: true })
|
|
101
|
-
], SgdsStep.prototype, "disabled", void 0);
|
|
102
|
-
__decorate([
|
|
103
|
-
property({ type: Boolean, reflect: true })
|
|
104
|
-
], SgdsStep.prototype, "completed", void 0);
|
|
105
|
-
__decorate([
|
|
106
|
-
property({ type: Boolean })
|
|
107
|
-
], SgdsStep.prototype, "isClickable", void 0);
|
|
108
|
-
__decorate([
|
|
109
|
-
property({ type: String })
|
|
110
|
-
], SgdsStep.prototype, "orientation", void 0);
|
|
111
|
-
__decorate([
|
|
112
|
-
property({ type: Boolean })
|
|
113
|
-
], SgdsStep.prototype, "isFirstOfType", void 0);
|
|
114
|
-
__decorate([
|
|
115
|
-
property({ type: Boolean })
|
|
116
|
-
], SgdsStep.prototype, "_isCompleted", void 0);
|
|
117
|
-
|
|
118
|
-
export { SgdsStep, SgdsStep as default };
|
|
119
|
-
//# sourceMappingURL=sgds-step.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sgds-step.js","sources":["../../../../src/components/Stepper/sgds-step.ts"],"sourcesContent":["import { html } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport SgdsElement from \"../../base/sgds-element\";\nimport SgdsIcon from \"../Icon/sgds-icon\";\nimport stepStyle from \"./step.css\";\n\n/**\n * @summary A step within a stepper component\n * @slot default - Additional content to display under the step header\n *\n */\nexport class SgdsStep extends SgdsElement {\n static styles = [...SgdsElement.styles, stepStyle];\n /** @internal */\n static dependencies = { \"sgds-icon\": SgdsIcon };\n\n /** The header text for the step */\n @property({ type: String, reflect: true })\n stepHeader = \"\";\n\n /** Optional icon name to display instead of step number */\n @property({ type: String, reflect: true })\n iconName: string | undefined;\n\n /** Optional component to render for this step */\n @property({ type: Object })\n component: unknown;\n\n /** @internal The index of this step within the stepper */\n @property({ type: Number })\n stepIndex = 0;\n\n /** @internal Whether this step is currently active */\n @property({ type: Boolean, reflect: true })\n active = false;\n\n /** @internal Whether this step is currently disabled */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /** @internal Whether this step is completed */\n @property({ type: Boolean, reflect: true })\n completed = false;\n\n /** @internal Whether this step is clickable */\n @property({ type: Boolean })\n isClickable = false;\n\n /** @internal Orientation of parent stepper (horizontal or vertical) */\n @property({ type: String })\n orientation: \"horizontal\" | \"vertical\" = \"horizontal\";\n\n /** @internal Whether this step is the first sgds-step of its type in the slot */\n @property({ type: Boolean })\n isFirstOfType = false;\n\n /** @internal Whether this step is completed */\n @property({ type: Boolean })\n _isCompleted = false;\n\n render() {\n const isValidClickable = !this.disabled && this.isClickable;\n\n return html`\n <div class=\"stepper-item-container\">\n <div\n class=\"stepper-item ${classMap({\n first: this.isFirstOfType,\n active: this.active,\n completed: this._isCompleted,\n clickable: this.isClickable,\n vertical: this.orientation === \"vertical\",\n disabled: this.disabled\n })}\"\n tabindex=${isValidClickable ? \"0\" : \"-1\"}\n aria-current=${this.active ? \"step\" : \"false\"}\n aria-disabled=${this.disabled || (!this.active && !this._isCompleted) ? \"true\" : \"false\"}\n @click=\"${isValidClickable ? () => this._handleClick() : null}\"\n @keydown=${isValidClickable ? (e: KeyboardEvent) => this._handleKeyDown(e) : null}\n >\n <div class=\"stepper-marker\">\n ${this.iconName ? html`<sgds-icon name=${this.iconName} size=\"md\"></sgds-icon>` : this.stepIndex + 1}\n </div>\n\n <div class=\"stepper-detail\">\n <div class=\"sgds:text-body-md\">${this.stepHeader}</div>\n <div class=\"stepper-slot\">\n <slot></slot>\n </div>\n </div>\n </div>\n </div>\n `;\n }\n\n /**@internal */\n _handleClick() {\n this.emit(\"i-sgds-click\", { detail: { stepIndex: this.stepIndex } });\n }\n\n /**@internal */\n _handleKeyDown(event: KeyboardEvent) {\n if (event.key === \"Enter\") {\n this._handleClick();\n }\n }\n}\n\nexport default SgdsStep;\n"],"names":["stepStyle"],"mappings":";;;;;;;;;AAOA;;;;AAIG;AACG,MAAO,QAAS,SAAQ,WAAW,CAAA;AAAzC,IAAA,WAAA,GAAA;;;QAOE,IAAU,CAAA,UAAA,GAAG,EAAE,CAAC;;QAYhB,IAAS,CAAA,SAAA,GAAG,CAAC,CAAC;;QAId,IAAM,CAAA,MAAA,GAAG,KAAK,CAAC;;QAIf,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;;QAIjB,IAAS,CAAA,SAAA,GAAG,KAAK,CAAC;;QAIlB,IAAW,CAAA,WAAA,GAAG,KAAK,CAAC;;QAIpB,IAAW,CAAA,WAAA,GAA8B,YAAY,CAAC;;QAItD,IAAa,CAAA,aAAA,GAAG,KAAK,CAAC;;QAItB,IAAY,CAAA,YAAA,GAAG,KAAK,CAAC;KAgDtB;IA9CC,MAAM,GAAA;QACJ,MAAM,gBAAgB,GAAG,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,WAAW,CAAC;AAE5D,QAAA,OAAO,IAAI,CAAA,CAAA;;;AAGiB,8BAAA,EAAA,QAAQ,CAAC;YAC7B,KAAK,EAAE,IAAI,CAAC,aAAa;YACzB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,SAAS,EAAE,IAAI,CAAC,YAAY;YAC5B,SAA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AAA,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AACR,CAAA,EAAA,QAAA,CAAA,SAAA,EAAA,aAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAIpB,UAAA,CAAA;AADC,IAAA,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AAC2B,CAAA,EAAA,QAAA,CAAA,SAAA,EAAA,aAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAItD,UAAA,CAAA;AADC,IAAA,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AACN,CAAA,EAAA,QAAA,CAAA,SAAA,EAAA,eAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAItB,UAAA,CAAA;AADC,IAAA,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AACP,CAAA,EAAA,QAAA,CAAA,SAAA,EAAA,cAAA,EAAA,KAAA,CAAA,CAAA;;;;"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
-
|
|
6
|
-
var lit = require('lit');
|
|
7
|
-
|
|
8
|
-
var css_248z = lit.css`:host{display:contents}.stepper-item-container{flex-basis:1em;flex-grow:1;flex-shrink:1;position:relative;width:fit-content}.stepper-item,.stepper-item-container{align-items:center;display:flex;flex-direction:column}.stepper-item{gap:var(--sgds-gap-sm)}.stepper-item.vertical{align-items:flex-start;flex-direction:row;margin-bottom:var(--sgds-padding-xl)}.stepper-item.clickable:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.stepper-item:not(.first):not(.vertical):before{background:var(--sgds-border-color-translucent);content:" ";height:var(--sgds-dimension-2);left:calc(-50% + 16px);position:absolute;top:15px;width:calc(100% - var(--sgds-dimension-32))}:host(:not(.last)) .stepper-item-container .stepper-item.vertical:after{background:var(--sgds-bg-translucent);content:" ";height:calc(100% - var(--sgds-dimension-32));left:15px;position:absolute;top:32px;width:var(--sgds-dimension-2)}.stepper-item-container .stepper-item.active:not(.first):before,.stepper-item-container .stepper-item.completed:not(.first):before,:host(:not(.last)) .stepper-item-container .stepper-item.completed:after{background:var(--sgds-primary-border-color-default)}.stepper-item.clickable{cursor:pointer}.stepper-marker{align-items:center;background:var(--sgds-bg-translucent);border:var(--sgds-border-width-2) solid var(--sgds-border-color-transparent);border-radius:50%;color:var(--sgds-color-default);display:flex;height:var(--sgds-dimension-32);justify-content:center;width:var(--sgds-dimension-32);z-index:1}.stepper-detail{max-width:var(--sgds-dimension-128);text-align:center}.stepper-item.vertical .stepper-detail{padding:var(--sgds-padding-2-xs) 0 0;text-align:left}.stepper-item:not(.active):not(.completed) .stepper-detail{color:var(--sgds-color-subtle)}.stepper-item.clickable:focus .stepper-marker,.stepper-item.clickable:focus-visible .stepper-marker,.stepper-item.clickable:hover .stepper-marker{background-color:var(--sgds-primary-surface-emphasis);border-color:var(--sgds-border-color-transparent);color:var(--sgds-color-fixed-light)}.stepper-item.clickable:focus .stepper-detail,.stepper-item.clickable:focus-visible .stepper-detail,.stepper-item.clickable:hover .stepper-detail{color:var(--sgds-primary-color-emphasis)}.stepper-item.clickable .stepper-detail{color:var(--sgds-primary-color-default)}.stepper-item.completed .stepper-marker{background-color:var(--sgds-bg-transparent);border:var(--sgds-border-width-2) solid var(--sgds-primary-border-color-default);color:var(--sgds-primary-color-default)}.stepper-item.active .stepper-marker{background-color:var(--sgds-primary-surface-default);color:var(--sgds-color-fixed-light)}.stepper-slot *{font-size:var(--sgds-font-size-body-sm)}.stepper-item.disabled{opacity:var(--sgds-opacity-40)}`;
|
|
9
|
-
|
|
10
|
-
exports["default"] = css_248z;
|
|
11
|
-
//# sourceMappingURL=step.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"step.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { css } from 'lit';
|
|
3
|
-
|
|
4
|
-
var css_248z = css`:host{display:contents}.stepper-item-container{flex-basis:1em;flex-grow:1;flex-shrink:1;position:relative;width:fit-content}.stepper-item,.stepper-item-container{align-items:center;display:flex;flex-direction:column}.stepper-item{gap:var(--sgds-gap-sm)}.stepper-item.vertical{align-items:flex-start;flex-direction:row;margin-bottom:var(--sgds-padding-xl)}.stepper-item.clickable:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.stepper-item:not(.first):not(.vertical):before{background:var(--sgds-border-color-translucent);content:" ";height:var(--sgds-dimension-2);left:calc(-50% + 16px);position:absolute;top:15px;width:calc(100% - var(--sgds-dimension-32))}:host(:not(.last)) .stepper-item-container .stepper-item.vertical:after{background:var(--sgds-bg-translucent);content:" ";height:calc(100% - var(--sgds-dimension-32));left:15px;position:absolute;top:32px;width:var(--sgds-dimension-2)}.stepper-item-container .stepper-item.active:not(.first):before,.stepper-item-container .stepper-item.completed:not(.first):before,:host(:not(.last)) .stepper-item-container .stepper-item.completed:after{background:var(--sgds-primary-border-color-default)}.stepper-item.clickable{cursor:pointer}.stepper-marker{align-items:center;background:var(--sgds-bg-translucent);border:var(--sgds-border-width-2) solid var(--sgds-border-color-transparent);border-radius:50%;color:var(--sgds-color-default);display:flex;height:var(--sgds-dimension-32);justify-content:center;width:var(--sgds-dimension-32);z-index:1}.stepper-detail{max-width:var(--sgds-dimension-128);text-align:center}.stepper-item.vertical .stepper-detail{padding:var(--sgds-padding-2-xs) 0 0;text-align:left}.stepper-item:not(.active):not(.completed) .stepper-detail{color:var(--sgds-color-subtle)}.stepper-item.clickable:focus .stepper-marker,.stepper-item.clickable:focus-visible .stepper-marker,.stepper-item.clickable:hover .stepper-marker{background-color:var(--sgds-primary-surface-emphasis);border-color:var(--sgds-border-color-transparent);color:var(--sgds-color-fixed-light)}.stepper-item.clickable:focus .stepper-detail,.stepper-item.clickable:focus-visible .stepper-detail,.stepper-item.clickable:hover .stepper-detail{color:var(--sgds-primary-color-emphasis)}.stepper-item.clickable .stepper-detail{color:var(--sgds-primary-color-default)}.stepper-item.completed .stepper-marker{background-color:var(--sgds-bg-transparent);border:var(--sgds-border-width-2) solid var(--sgds-primary-border-color-default);color:var(--sgds-primary-color-default)}.stepper-item.active .stepper-marker{background-color:var(--sgds-primary-surface-default);color:var(--sgds-color-fixed-light)}.stepper-slot *{font-size:var(--sgds-font-size-body-sm)}.stepper-item.disabled{opacity:var(--sgds-opacity-40)}`;
|
|
5
|
-
|
|
6
|
-
export { css_248z as default };
|
|
7
|
-
//# sourceMappingURL=step.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"step.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
package/react/step/index.cjs.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
-
|
|
6
|
-
var React = require('react');
|
|
7
|
-
var react = require('@lit/react');
|
|
8
|
-
var sgdsStep = require('../components/Stepper/sgds-step.cjs.js');
|
|
9
|
-
var ceRegistry = require('../utils/ce-registry.cjs.js');
|
|
10
|
-
|
|
11
|
-
function _interopNamespace(e) {
|
|
12
|
-
if (e && e.__esModule) return e;
|
|
13
|
-
var n = Object.create(null);
|
|
14
|
-
if (e) {
|
|
15
|
-
Object.keys(e).forEach(function (k) {
|
|
16
|
-
if (k !== 'default') {
|
|
17
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
18
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () { return e[k]; }
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
n["default"] = e;
|
|
26
|
-
return Object.freeze(n);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
30
|
-
|
|
31
|
-
ceRegistry.register("sgds-step", sgdsStep.SgdsStep);
|
|
32
|
-
var index = react.createComponent({
|
|
33
|
-
react: React__namespace,
|
|
34
|
-
tagName: "sgds-step",
|
|
35
|
-
elementClass: sgdsStep.SgdsStep,
|
|
36
|
-
events: {}
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
exports["default"] = index;
|
|
40
|
-
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":["../../../src/react/step/index.ts"],"sourcesContent":["import * as React from \"react\";\nimport { createComponent } from \"@lit/react\";\nimport Component from \"../../components/Stepper/sgds-step\";\nimport { register } from \"../../utils/ce-registry\";\n\nregister(\"sgds-step\", Component);\n\nexport default createComponent({\n react: React,\n tagName: \"sgds-step\",\n elementClass: Component,\n events: {}\n});\n"],"names":["register","Component","createComponent","React"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKAA,mBAAQ,CAAC,WAAW,EAAEC,iBAAS,CAAC,CAAC;AAEjC,YAAeC,qBAAe,CAAC;AAC7B,IAAA,KAAK,EAAEC,gBAAK;AACZ,IAAA,OAAO,EAAE,WAAW;AACpB,IAAA,YAAY,EAAEF,iBAAS;AACvB,IAAA,MAAM,EAAE,EAAE;AACX,CAAA,CAAC;;;;"}
|
package/react/step/index.d.ts
DELETED
package/react/step/index.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { createComponent } from '@lit/react';
|
|
4
|
-
import { SgdsStep } from '../components/Stepper/sgds-step.js';
|
|
5
|
-
import { register } from '../utils/ce-registry.js';
|
|
6
|
-
|
|
7
|
-
register("sgds-step", SgdsStep);
|
|
8
|
-
var index = createComponent({
|
|
9
|
-
react: React,
|
|
10
|
-
tagName: "sgds-step",
|
|
11
|
-
elementClass: SgdsStep,
|
|
12
|
-
events: {}
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
export { index as default };
|
|
16
|
-
//# sourceMappingURL=index.js.map
|
package/react/step/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/react/step/index.ts"],"sourcesContent":["import * as React from \"react\";\nimport { createComponent } from \"@lit/react\";\nimport Component from \"../../components/Stepper/sgds-step\";\nimport { register } from \"../../utils/ce-registry\";\n\nregister(\"sgds-step\", Component);\n\nexport default createComponent({\n react: React,\n tagName: \"sgds-step\",\n elementClass: Component,\n events: {}\n});\n"],"names":["Component"],"mappings":";;;;;;AAKA,QAAQ,CAAC,WAAW,EAAEA,QAAS,CAAC,CAAC;AAEjC,YAAe,eAAe,CAAC;AAC7B,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,OAAO,EAAE,WAAW;AACpB,IAAA,YAAY,EAAEA,QAAS;AACvB,IAAA,MAAM,EAAE,EAAE;AACX,CAAA,CAAC;;;;"}
|