@sky.ui/core 0.0.8 → 0.0.20
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/auto-import.js +1 -31
- package/dist/custom-elements.json +7115 -21498
- package/dist/helper/utils/color-resolver.d.ts +12 -0
- package/dist/helper/utils/color-resolver.js +1 -1
- package/dist/helper/utils/color-resolver.js.map +1 -1
- package/dist/index.d.ts +1 -31
- package/dist/index.js +1 -1
- package/dist/sky-alert/sky-alert.js +32 -42
- package/dist/sky-alert/sky-alert.js.map +1 -1
- package/dist/sky-appbar/sky-appbar.d.ts +5 -0
- package/dist/sky-appbar/sky-appbar.js +63 -21
- package/dist/sky-appbar/sky-appbar.js.map +1 -1
- package/dist/sky-avatar/sky-avatar.d.ts +2 -2
- package/dist/sky-avatar/sky-avatar.js +36 -28
- package/dist/sky-avatar/sky-avatar.js.map +1 -1
- package/dist/sky-badge/sky-badge.d.ts +2 -0
- package/dist/sky-badge/sky-badge.js +21 -19
- package/dist/sky-badge/sky-badge.js.map +1 -1
- package/dist/sky-button/sky-button.d.ts +4 -0
- package/dist/sky-button/sky-button.js +85 -26
- package/dist/sky-button/sky-button.js.map +1 -1
- package/dist/sky-card/sky-card.d.ts +7 -1
- package/dist/sky-card/sky-card.js +72 -40
- package/dist/sky-card/sky-card.js.map +1 -1
- package/dist/sky-checkbox/sky-checkbox.js +34 -23
- package/dist/sky-checkbox/sky-checkbox.js.map +1 -1
- package/dist/sky-chip/sky-chip.js +53 -35
- package/dist/sky-chip/sky-chip.js.map +1 -1
- package/dist/sky-combobox/sky-combobox.d.ts +6 -2
- package/dist/sky-combobox/sky-combobox.js +92 -262
- package/dist/sky-combobox/sky-combobox.js.map +1 -1
- package/dist/sky-dialog/sky-dialog.d.ts +4 -11
- package/dist/sky-dialog/sky-dialog.js +78 -131
- package/dist/sky-dialog/sky-dialog.js.map +1 -1
- package/dist/sky-flexbox/sky-flexbox.js.map +1 -1
- package/dist/sky-form/sky-form.js +21 -19
- package/dist/sky-form/sky-form.js.map +1 -1
- package/dist/sky-image/sky-image.d.ts +1 -0
- package/dist/sky-image/sky-image.js +14 -7
- package/dist/sky-image/sky-image.js.map +1 -1
- package/dist/sky-input/sky-input.d.ts +15 -2
- package/dist/sky-input/sky-input.js +188 -193
- package/dist/sky-input/sky-input.js.map +1 -1
- package/dist/sky-list/sky-list.d.ts +11 -2
- package/dist/sky-list/sky-list.js +15 -25
- package/dist/sky-list/sky-list.js.map +1 -1
- package/dist/sky-listitem/sky-listitem.js +62 -30
- package/dist/sky-listitem/sky-listitem.js.map +1 -1
- package/dist/sky-radio/sky-radio.d.ts +2 -0
- package/dist/sky-radio/sky-radio.js +29 -9
- package/dist/sky-radio/sky-radio.js.map +1 -1
- package/dist/sky-sheet/sky-sheet.d.ts +1 -1
- package/dist/sky-sheet/sky-sheet.js +68 -22
- package/dist/sky-sheet/sky-sheet.js.map +1 -1
- package/dist/sky-simple-table/index.d.ts +1 -0
- package/dist/sky-simple-table/index.js +1 -0
- package/dist/sky-simple-table/sky-simple-table.d.ts +68 -0
- package/dist/sky-simple-table/sky-simple-table.js +100 -0
- package/dist/sky-simple-table/sky-simple-table.js.map +1 -0
- package/dist/sky-theme-provider/sky-theme-provider.d.ts +10 -1
- package/dist/sky-theme-provider/sky-theme-provider.js +2 -2
- package/dist/sky-theme-provider/sky-theme-provider.js.map +1 -1
- package/package.json +24 -269
- package/dist/sky-accordion/index.d.ts +0 -1
- package/dist/sky-accordion/index.js +0 -1
- package/dist/sky-accordion/sky-accordion.d.ts +0 -201
- package/dist/sky-accordion/sky-accordion.js +0 -84
- package/dist/sky-accordion/sky-accordion.js.map +0 -1
- package/dist/sky-accordion-item/index.d.ts +0 -1
- package/dist/sky-accordion-item/index.js +0 -1
- package/dist/sky-accordion-item/sky-accordion-item.d.ts +0 -161
- package/dist/sky-accordion-item/sky-accordion-item.js +0 -191
- package/dist/sky-accordion-item/sky-accordion-item.js.map +0 -1
- package/dist/sky-breadcrumb/index.d.ts +0 -1
- package/dist/sky-breadcrumb/index.js +0 -1
- package/dist/sky-breadcrumb/sky-breadcrumb.d.ts +0 -111
- package/dist/sky-breadcrumb/sky-breadcrumb.js +0 -230
- package/dist/sky-breadcrumb/sky-breadcrumb.js.map +0 -1
- package/dist/sky-button-group/index.d.ts +0 -1
- package/dist/sky-button-group/index.js +0 -1
- package/dist/sky-button-group/sky-button-group.d.ts +0 -93
- package/dist/sky-button-group/sky-button-group.js +0 -281
- package/dist/sky-button-group/sky-button-group.js.map +0 -1
- package/dist/sky-carousel/index.d.ts +0 -1
- package/dist/sky-carousel/index.js +0 -1
- package/dist/sky-carousel/sky-carousel.d.ts +0 -265
- package/dist/sky-carousel/sky-carousel.js +0 -211
- package/dist/sky-carousel/sky-carousel.js.map +0 -1
- package/dist/sky-counter/index.d.ts +0 -1
- package/dist/sky-counter/index.js +0 -1
- package/dist/sky-counter/sky-counter.d.ts +0 -130
- package/dist/sky-counter/sky-counter.js +0 -101
- package/dist/sky-counter/sky-counter.js.map +0 -1
- package/dist/sky-drawer/index.d.ts +0 -1
- package/dist/sky-drawer/index.js +0 -1
- package/dist/sky-drawer/sky-drawer.d.ts +0 -161
- package/dist/sky-drawer/sky-drawer.js +0 -175
- package/dist/sky-drawer/sky-drawer.js.map +0 -1
- package/dist/sky-dropdown/index.d.ts +0 -1
- package/dist/sky-dropdown/index.js +0 -1
- package/dist/sky-dropdown/sky-dropdown.d.ts +0 -254
- package/dist/sky-dropdown/sky-dropdown.js +0 -61
- package/dist/sky-dropdown/sky-dropdown.js.map +0 -1
- package/dist/sky-dropdown-item/index.d.ts +0 -1
- package/dist/sky-dropdown-item/index.js +0 -1
- package/dist/sky-dropdown-item/sky-dropdown-item.d.ts +0 -207
- package/dist/sky-dropdown-item/sky-dropdown-item.js +0 -341
- package/dist/sky-dropdown-item/sky-dropdown-item.js.map +0 -1
- package/dist/sky-flexbar/index.d.ts +0 -1
- package/dist/sky-flexbar/index.js +0 -1
- package/dist/sky-flexbar/sky-flexbar.d.ts +0 -189
- package/dist/sky-flexbar/sky-flexbar.js +0 -157
- package/dist/sky-flexbar/sky-flexbar.js.map +0 -1
- package/dist/sky-flexitem/index.d.ts +0 -1
- package/dist/sky-flexitem/index.js +0 -1
- package/dist/sky-flexitem/sky-flexitem.d.ts +0 -114
- package/dist/sky-flexitem/sky-flexitem.js +0 -52
- package/dist/sky-flexitem/sky-flexitem.js.map +0 -1
- package/dist/sky-navbar/index.d.ts +0 -1
- package/dist/sky-navbar/index.js +0 -1
- package/dist/sky-navbar/sky-navbar.d.ts +0 -211
- package/dist/sky-navbar/sky-navbar.js +0 -521
- package/dist/sky-navbar/sky-navbar.js.map +0 -1
- package/dist/sky-navpanel/index.d.ts +0 -1
- package/dist/sky-navpanel/index.js +0 -1
- package/dist/sky-navpanel/sky-navpanel.d.ts +0 -187
- package/dist/sky-navpanel/sky-navpanel.js +0 -404
- package/dist/sky-navpanel/sky-navpanel.js.map +0 -1
- package/dist/sky-notification/index.d.ts +0 -1
- package/dist/sky-notification/index.js +0 -1
- package/dist/sky-notification/sky-notification.d.ts +0 -152
- package/dist/sky-notification/sky-notification.js +0 -456
- package/dist/sky-notification/sky-notification.js.map +0 -1
- package/dist/sky-otp/index.d.ts +0 -1
- package/dist/sky-otp/index.js +0 -1
- package/dist/sky-otp/sky-otp.d.ts +0 -101
- package/dist/sky-otp/sky-otp.js +0 -96
- package/dist/sky-otp/sky-otp.js.map +0 -1
- package/dist/sky-overlay/index.d.ts +0 -1
- package/dist/sky-overlay/index.js +0 -1
- package/dist/sky-overlay/sky-overlay.d.ts +0 -71
- package/dist/sky-overlay/sky-overlay.js +0 -26
- package/dist/sky-overlay/sky-overlay.js.map +0 -1
- package/dist/sky-pagination/index.d.ts +0 -1
- package/dist/sky-pagination/index.js +0 -1
- package/dist/sky-pagination/sky-pagination.d.ts +0 -167
- package/dist/sky-pagination/sky-pagination.js +0 -453
- package/dist/sky-pagination/sky-pagination.js.map +0 -1
- package/dist/sky-progress/index.d.ts +0 -1
- package/dist/sky-progress/index.js +0 -1
- package/dist/sky-progress/sky-progress.d.ts +0 -70
- package/dist/sky-progress/sky-progress.js +0 -87
- package/dist/sky-progress/sky-progress.js.map +0 -1
- package/dist/sky-radio-group/index.d.ts +0 -1
- package/dist/sky-radio-group/index.js +0 -1
- package/dist/sky-radio-group/sky-radio-group.d.ts +0 -186
- package/dist/sky-radio-group/sky-radio-group.js +0 -239
- package/dist/sky-radio-group/sky-radio-group.js.map +0 -1
- package/dist/sky-range/index.d.ts +0 -1
- package/dist/sky-range/index.js +0 -1
- package/dist/sky-range/sky-range.d.ts +0 -110
- package/dist/sky-range/sky-range.js +0 -196
- package/dist/sky-range/sky-range.js.map +0 -1
- package/dist/sky-serial/index.d.ts +0 -1
- package/dist/sky-serial/index.js +0 -1
- package/dist/sky-serial/sky-serial.d.ts +0 -127
- package/dist/sky-serial/sky-serial.js +0 -133
- package/dist/sky-serial/sky-serial.js.map +0 -1
- package/dist/sky-skeleton/index.d.ts +0 -1
- package/dist/sky-skeleton/index.js +0 -1
- package/dist/sky-skeleton/sky-skeleton.d.ts +0 -80
- package/dist/sky-skeleton/sky-skeleton.js +0 -233
- package/dist/sky-skeleton/sky-skeleton.js.map +0 -1
- package/dist/sky-slider/index.d.ts +0 -1
- package/dist/sky-slider/index.js +0 -1
- package/dist/sky-slider/sky-slider.d.ts +0 -96
- package/dist/sky-slider/sky-slider.js +0 -139
- package/dist/sky-slider/sky-slider.js.map +0 -1
- package/dist/sky-speeddial/index.d.ts +0 -1
- package/dist/sky-speeddial/index.js +0 -1
- package/dist/sky-speeddial/sky-speeddial.d.ts +0 -86
- package/dist/sky-speeddial/sky-speeddial.js +0 -154
- package/dist/sky-speeddial/sky-speeddial.js.map +0 -1
- package/dist/sky-spinner/index.d.ts +0 -1
- package/dist/sky-spinner/index.js +0 -1
- package/dist/sky-spinner/sky-spinner.d.ts +0 -87
- package/dist/sky-spinner/sky-spinner.js +0 -334
- package/dist/sky-spinner/sky-spinner.js.map +0 -1
- package/dist/sky-steps/index.d.ts +0 -1
- package/dist/sky-steps/index.js +0 -1
- package/dist/sky-steps/sky-steps.d.ts +0 -170
- package/dist/sky-steps/sky-steps.js +0 -455
- package/dist/sky-steps/sky-steps.js.map +0 -1
- package/dist/sky-switch/index.d.ts +0 -1
- package/dist/sky-switch/index.js +0 -1
- package/dist/sky-switch/sky-switch.d.ts +0 -116
- package/dist/sky-switch/sky-switch.js +0 -191
- package/dist/sky-switch/sky-switch.js.map +0 -1
- package/dist/sky-tab/index.d.ts +0 -1
- package/dist/sky-tab/index.js +0 -1
- package/dist/sky-tab/sky-tab.d.ts +0 -188
- package/dist/sky-tab/sky-tab.js +0 -390
- package/dist/sky-tab/sky-tab.js.map +0 -1
- package/dist/sky-tab-button/index.d.ts +0 -1
- package/dist/sky-tab-button/index.js +0 -1
- package/dist/sky-tab-button/sky-tab-button.d.ts +0 -114
- package/dist/sky-tab-button/sky-tab-button.js +0 -167
- package/dist/sky-tab-button/sky-tab-button.js.map +0 -1
- package/dist/sky-theme-switcher/index.d.ts +0 -1
- package/dist/sky-theme-switcher/index.js +0 -1
- package/dist/sky-theme-switcher/sky-theme-switcher.d.ts +0 -92
- package/dist/sky-theme-switcher/sky-theme-switcher.js +0 -43
- package/dist/sky-theme-switcher/sky-theme-switcher.js.map +0 -1
- package/dist/sky-tooltip/index.d.ts +0 -1
- package/dist/sky-tooltip/index.js +0 -1
- package/dist/sky-tooltip/sky-tooltip.d.ts +0 -156
- package/dist/sky-tooltip/sky-tooltip.js +0 -242
- package/dist/sky-tooltip/sky-tooltip.js.map +0 -1
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
import { LitElement, TemplateResult } from "lit";
|
|
2
|
-
/**
|
|
3
|
-
* Step item interface for configuring individual steps
|
|
4
|
-
*/
|
|
5
|
-
export type StepItem = {
|
|
6
|
-
label: string;
|
|
7
|
-
subtitle?: string;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
icon?: string;
|
|
10
|
-
checkedIcon?: string;
|
|
11
|
-
};
|
|
12
|
-
export type SkyStepsLayout = "horizontal" | "vertical";
|
|
13
|
-
export type SkyStepsChangeDetail = {
|
|
14
|
-
step: number;
|
|
15
|
-
previous: number;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* @element sky-steps
|
|
19
|
-
*
|
|
20
|
-
* @summary Multi-step progress component with horizontal/vertical layouts and panel content.
|
|
21
|
-
*
|
|
22
|
-
* @status stable
|
|
23
|
-
* @since 1.0.0
|
|
24
|
-
* @documentation https://library.sky-ui.com/components/steps
|
|
25
|
-
* @dependency sky-icon
|
|
26
|
-
*
|
|
27
|
-
* @uiVModel currentStep step-change detail=step
|
|
28
|
-
*
|
|
29
|
-
* @slot before - Content displayed before the steps navigation
|
|
30
|
-
* @slot after - Content displayed after the steps navigation
|
|
31
|
-
* @slot panel-{n} - Content for each step panel (e.g., panel-1, panel-2)
|
|
32
|
-
* @slot - Default slot for additional content
|
|
33
|
-
*
|
|
34
|
-
* @csspart steps - The container for step navigation buttons
|
|
35
|
-
* @csspart panels - The container for step panels
|
|
36
|
-
* @csspart panel - Individual step panel
|
|
37
|
-
* @csspart node - The circular step indicator (number/icon)
|
|
38
|
-
* @csspart labels - Container for step label and subtitle
|
|
39
|
-
*
|
|
40
|
-
* @property {StepItem[]} steps - Array of step configuration objects. Default: []
|
|
41
|
-
* @property {number} currentStep - Current active step (1-indexed). Default: 1
|
|
42
|
-
* @property {SkyStepsLayout} layout - Layout direction.
|
|
43
|
-
* @property {boolean} allowStepJump - Whether clicking any step is allowed (not just sequential). Default: true
|
|
44
|
-
* @property {boolean} hideNumbers - Hide step numbers, show bullets instead. Default: false
|
|
45
|
-
* @property {boolean} showLabels - Show/hide step labels. Default: true
|
|
46
|
-
* @property {boolean} compact - Compact mode with reduced spacing. Default: false
|
|
47
|
-
* @property {number[]|null} completedSteps - Array of completed step indices (overrides default logic). Default: null
|
|
48
|
-
* @property {string} stepIcon - Global icon for all steps (can be overridden per-step). Default: undefined
|
|
49
|
-
* @property {string} checkedIcon - Global checked icon for completed steps (can be overridden per-step). Default: undefined
|
|
50
|
-
* @property {boolean} allExpanded - When `true` with `layout="vertical"`, every panel stays open with neutral chrome only (no current-step highlight or completed styling — documentation-style list). Default: false
|
|
51
|
-
*
|
|
52
|
-
* @fires {CustomEvent<SkyStepsChangeDetail>} step-change - Dispatched when current step changes.
|
|
53
|
-
* @method previous Moves to previous enabled step.
|
|
54
|
-
* @method next Moves to next enabled step.
|
|
55
|
-
* @method prevStep Alias for `previous()`.
|
|
56
|
-
* @method nextStep Alias for `next()`.
|
|
57
|
-
* @method goToStep Navigates directly to a target step if allowed.
|
|
58
|
-
* @method getCurrentStep Returns current step index (1-based).
|
|
59
|
-
*
|
|
60
|
-
* @Behavior
|
|
61
|
-
* - Supports linear or free step navigation via `allowStepJump`.
|
|
62
|
-
* - Renders slot-based panel content for each step index.
|
|
63
|
-
* - Handles keyboard navigation across step headers.
|
|
64
|
-
*
|
|
65
|
-
* @example
|
|
66
|
-
* ```html
|
|
67
|
-
* <sky-steps current-step="2" layout="horizontal">
|
|
68
|
-
* <button slot="after" data-sky-steps="back">Back</button>
|
|
69
|
-
* <button slot="after" data-sky-steps="next">Next</button>
|
|
70
|
-
* <div slot="panel-1">Step 1: Account details</div>
|
|
71
|
-
* <div slot="panel-2">Step 2: Permissions</div>
|
|
72
|
-
* <div slot="panel-3">Step 3: Review</div>
|
|
73
|
-
* </sky-steps>
|
|
74
|
-
* ```
|
|
75
|
-
* ```vue
|
|
76
|
-
* <template>
|
|
77
|
-
* <sky-steps :steps="steps" :current-step="2" layout="horizontal">
|
|
78
|
-
* <button slot="after" data-sky-steps="back">Back</button>
|
|
79
|
-
* <button slot="after" data-sky-steps="next">Next</button>
|
|
80
|
-
* <div slot="panel-1">Step 1: Account details</div>
|
|
81
|
-
* <div slot="panel-2">Step 2: Permissions</div>
|
|
82
|
-
* <div slot="panel-3">Step 3: Review</div>
|
|
83
|
-
* </sky-steps>
|
|
84
|
-
* </template>
|
|
85
|
-
* ```
|
|
86
|
-
* ```jsx
|
|
87
|
-
* export default function Demo() {
|
|
88
|
-
* return (
|
|
89
|
-
* <sky-steps steps={[{ label: "Account" }, { label: "Permissions" }, { label: "Review" }]} current-step={2} layout="horizontal">
|
|
90
|
-
* <button slot="after" data-sky-steps="back">Back</button>
|
|
91
|
-
* <button slot="after" data-sky-steps="next">Next</button>
|
|
92
|
-
* <div slot="panel-1">Step 1: Account details</div>
|
|
93
|
-
* <div slot="panel-2">Step 2: Permissions</div>
|
|
94
|
-
* <div slot="panel-3">Step 3: Review</div>
|
|
95
|
-
* </sky-steps>
|
|
96
|
-
* );
|
|
97
|
-
* }
|
|
98
|
-
* ```
|
|
99
|
-
*/
|
|
100
|
-
export declare class SkySteps extends LitElement {
|
|
101
|
-
static dependencies: Record<string, CustomElementConstructor>;
|
|
102
|
-
steps: StepItem[];
|
|
103
|
-
currentStep: number;
|
|
104
|
-
layout: SkyStepsLayout;
|
|
105
|
-
allowStepJump: boolean;
|
|
106
|
-
hideNumbers: boolean;
|
|
107
|
-
showLabels: boolean;
|
|
108
|
-
compact: boolean;
|
|
109
|
-
/** Completed step indices. From HTML pass JSON array, e.g. completedsteps='[1,2,3]'. */
|
|
110
|
-
completedSteps: number[] | null;
|
|
111
|
-
/** Global defaults (can be overridden per-step) */
|
|
112
|
-
stepIcon?: string;
|
|
113
|
-
checkedIcon?: string;
|
|
114
|
-
/** Vertical layout only: expand every step panel at once (e.g. documentation flows). */
|
|
115
|
-
allExpanded: boolean;
|
|
116
|
-
private _prevStep;
|
|
117
|
-
static styles: import("lit").CSSResult;
|
|
118
|
-
/** Get total number of steps */
|
|
119
|
-
private get _count();
|
|
120
|
-
connectedCallback(): void;
|
|
121
|
-
disconnectedCallback(): void;
|
|
122
|
-
/** Handle click events on navigation triggers */
|
|
123
|
-
private _onTriggerClick;
|
|
124
|
-
/** Handle keyboard events on navigation triggers */
|
|
125
|
-
private _onTriggerKey;
|
|
126
|
-
/** Find first element in composed path that marks itself as a back/next trigger */
|
|
127
|
-
private _findTrigger;
|
|
128
|
-
/** Activate the found trigger (back/next) */
|
|
129
|
-
private _activateTrigger;
|
|
130
|
-
/** Check if a step is completed */
|
|
131
|
-
private isCompleted;
|
|
132
|
-
/** Check if jumping to a step is allowed */
|
|
133
|
-
private canJump;
|
|
134
|
-
/** Handle keyboard navigation */
|
|
135
|
-
private onKeyDown;
|
|
136
|
-
/** Handle step button click */
|
|
137
|
-
private onStepClick;
|
|
138
|
-
/** Get previous enabled step index */
|
|
139
|
-
private prevIndex;
|
|
140
|
-
/** Get next enabled step index */
|
|
141
|
-
private nextIndex;
|
|
142
|
-
/** Navigate to previous step */
|
|
143
|
-
private goPrev;
|
|
144
|
-
/** Navigate to next step */
|
|
145
|
-
private goNext;
|
|
146
|
-
/** Public API: Navigate to previous step */
|
|
147
|
-
previous(): void;
|
|
148
|
-
/** Public API: Navigate to next step */
|
|
149
|
-
next(): void;
|
|
150
|
-
/** Public API: Navigate to target step */
|
|
151
|
-
goToStep(step: number): boolean;
|
|
152
|
-
getCurrentStep(): number;
|
|
153
|
-
prevStep(): void;
|
|
154
|
-
nextStep(): void;
|
|
155
|
-
/** Set current step with animation and events */
|
|
156
|
-
private _setCurrent;
|
|
157
|
-
/** Apply direction classes for animation */
|
|
158
|
-
private _applyDirectionAndLeaving;
|
|
159
|
-
/** Focus a specific step button */
|
|
160
|
-
private focusStep;
|
|
161
|
-
/** Render node contents: checked icon, regular icon, number, or bullet */
|
|
162
|
-
private renderNodeInner;
|
|
163
|
-
/** Render step indicator node */
|
|
164
|
-
private renderNode;
|
|
165
|
-
/** Render a horizontal step */
|
|
166
|
-
private renderHStep;
|
|
167
|
-
/** Render a vertical step item */
|
|
168
|
-
private renderVerticalItem;
|
|
169
|
-
protected render(): TemplateResult<1>;
|
|
170
|
-
}
|
|
@@ -1,455 +0,0 @@
|
|
|
1
|
-
import{__decorate as t,__metadata as e}from"tslib";import{LitElement as s,css as i,html as a}from"lit";import{property as o,customElement as n}from"lit/decorators.js";import{when as r}from"lit/directives/when.js";import{classMap as l}from"lit/directives/class-map.js";import{SkyIcon as p}from"../sky-icon/sky-icon.js";let c=class extends s{constructor(){super(...arguments),this.steps=[],this.currentStep=1,this.layout="horizontal",this.allowStepJump=!0,this.hideNumbers=!1,this.showLabels=!0,this.compact=!1,this.completedSteps=null,this.allExpanded=!1,this._prevStep=this.currentStep,this._onTriggerClick=t=>{const e=this._findTrigger(t.composedPath());e&&(t.preventDefault(),this._activateTrigger(e))},this._onTriggerKey=t=>{if("Enter"!==t.key&&" "!==t.key)return;const e=this._findTrigger(t.composedPath());e&&(t.preventDefault(),this._activateTrigger(e))}}static{this.dependencies={"sky-icon":p}}static{this.styles=i`
|
|
2
|
-
:host {
|
|
3
|
-
display: block;
|
|
4
|
-
width: 100%;
|
|
5
|
-
color: var(--sky-text-primary);
|
|
6
|
-
font-family: var(--sky-font);
|
|
7
|
-
user-select: none;
|
|
8
|
-
--sky-step-size: 28px;
|
|
9
|
-
--sky-step-border: 2px;
|
|
10
|
-
--sky-step-leftpad: 5px;
|
|
11
|
-
}
|
|
12
|
-
.node {
|
|
13
|
-
position: relative;
|
|
14
|
-
display: inline-grid;
|
|
15
|
-
place-items: center;
|
|
16
|
-
width: var(--sky-step-size);
|
|
17
|
-
height: var(--sky-step-size);
|
|
18
|
-
border: var(--sky-step-border) solid var(--sky-text-quinary);
|
|
19
|
-
border-radius: var(--sky-radius-full);
|
|
20
|
-
font-weight: 600;
|
|
21
|
-
line-height: 1;
|
|
22
|
-
font-size: 14px;
|
|
23
|
-
background: var(--sky-glass-primary);
|
|
24
|
-
transition:
|
|
25
|
-
border-color 160ms,
|
|
26
|
-
background-color 160ms,
|
|
27
|
-
color 160ms;
|
|
28
|
-
flex: 0 0 auto;
|
|
29
|
-
}
|
|
30
|
-
.node.completed {
|
|
31
|
-
border-color: var(--sky-active-primary);
|
|
32
|
-
color: #fff;
|
|
33
|
-
background: var(--sky-active-primary);
|
|
34
|
-
}
|
|
35
|
-
.icon {
|
|
36
|
-
display: inline-grid;
|
|
37
|
-
place-items: center;
|
|
38
|
-
width: 18px;
|
|
39
|
-
height: 18px;
|
|
40
|
-
line-height: 0;
|
|
41
|
-
}
|
|
42
|
-
sky-icon {
|
|
43
|
-
display: inline-block;
|
|
44
|
-
width: 1em;
|
|
45
|
-
height: 1em;
|
|
46
|
-
}
|
|
47
|
-
.node .number,
|
|
48
|
-
.node .bullet,
|
|
49
|
-
.node .regular-icon,
|
|
50
|
-
.node .checked-icon {
|
|
51
|
-
display: none;
|
|
52
|
-
}
|
|
53
|
-
.node.show-number .number,
|
|
54
|
-
.node.show-bullet .bullet,
|
|
55
|
-
.node.show-regular-icon .regular-icon,
|
|
56
|
-
.node.show-checked-icon .checked-icon {
|
|
57
|
-
display: inline-grid;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.labels {
|
|
61
|
-
display: flex;
|
|
62
|
-
flex-direction: column;
|
|
63
|
-
min-inline-size: 0;
|
|
64
|
-
font-family: var(--sky-font);
|
|
65
|
-
}
|
|
66
|
-
.label {
|
|
67
|
-
font-size: 14px;
|
|
68
|
-
font-weight: 600;
|
|
69
|
-
white-space: nowrap;
|
|
70
|
-
overflow: hidden;
|
|
71
|
-
text-overflow: ellipsis;
|
|
72
|
-
}
|
|
73
|
-
.sub {
|
|
74
|
-
font-size: 12px;
|
|
75
|
-
color: var(--sky-text-secondary);
|
|
76
|
-
white-space: nowrap;
|
|
77
|
-
overflow: hidden;
|
|
78
|
-
text-overflow: ellipsis;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.step-btn {
|
|
82
|
-
display: inline-flex;
|
|
83
|
-
align-items: center;
|
|
84
|
-
gap: 10px;
|
|
85
|
-
padding: 2px 4px;
|
|
86
|
-
border: 0;
|
|
87
|
-
background: transparent;
|
|
88
|
-
color: inherit;
|
|
89
|
-
cursor: pointer;
|
|
90
|
-
width: max-content;
|
|
91
|
-
text-align: left;
|
|
92
|
-
}
|
|
93
|
-
.step-btn[aria-disabled="true"] {
|
|
94
|
-
cursor: not-allowed;
|
|
95
|
-
opacity: 0.6;
|
|
96
|
-
}
|
|
97
|
-
.step-btn:focus-visible .node {
|
|
98
|
-
outline: 3px solid
|
|
99
|
-
color-mix(in oklch, var(--sky-active-primary) 35%, transparent);
|
|
100
|
-
outline-offset: 2px;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.h-wrap {
|
|
104
|
-
position: relative;
|
|
105
|
-
overflow-x: auto;
|
|
106
|
-
padding: 12px 0;
|
|
107
|
-
}
|
|
108
|
-
.h-steps {
|
|
109
|
-
display: flex;
|
|
110
|
-
align-items: center;
|
|
111
|
-
gap: 12px;
|
|
112
|
-
}
|
|
113
|
-
.connector {
|
|
114
|
-
position: relative;
|
|
115
|
-
background: var(--sky-text-quinary);
|
|
116
|
-
border-radius: var(--sky-radius-full);
|
|
117
|
-
flex: 1 1 24px;
|
|
118
|
-
height: 2px;
|
|
119
|
-
}
|
|
120
|
-
.connector::after {
|
|
121
|
-
content: "";
|
|
122
|
-
position: absolute;
|
|
123
|
-
inset: 0;
|
|
124
|
-
transform-origin: left;
|
|
125
|
-
transform: scaleX(0);
|
|
126
|
-
background: var(--sky-active-primary);
|
|
127
|
-
border-radius: inherit;
|
|
128
|
-
transition: transform 280ms ease;
|
|
129
|
-
}
|
|
130
|
-
.connector.active::after {
|
|
131
|
-
transform: scaleX(1);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
:host([layout="vertical"]) .v-list {
|
|
135
|
-
position: relative;
|
|
136
|
-
overflow: visible;
|
|
137
|
-
}
|
|
138
|
-
:host([layout="vertical"]) .v-item {
|
|
139
|
-
position: relative;
|
|
140
|
-
overflow: visible;
|
|
141
|
-
margin-bottom: 12px;
|
|
142
|
-
}
|
|
143
|
-
:host([layout="vertical"]) .v-header {
|
|
144
|
-
display: flex;
|
|
145
|
-
align-items: flex-start;
|
|
146
|
-
gap: 12px;
|
|
147
|
-
}
|
|
148
|
-
:host([layout="vertical"]) .v-item:last-child {
|
|
149
|
-
margin-bottom: 0;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
:host([layout="vertical"]) .v-panel {
|
|
153
|
-
display: grid;
|
|
154
|
-
grid-template-rows: 0fr;
|
|
155
|
-
opacity: 0;
|
|
156
|
-
transition:
|
|
157
|
-
grid-template-rows 260ms ease,
|
|
158
|
-
opacity 220ms ease;
|
|
159
|
-
overflow: visible;
|
|
160
|
-
}
|
|
161
|
-
:host([layout="vertical"]) .v-inner {
|
|
162
|
-
min-height: 0;
|
|
163
|
-
overflow: hidden;
|
|
164
|
-
}
|
|
165
|
-
:host([layout="vertical"]) .v-content {
|
|
166
|
-
margin-left: calc(var(--sky-step-size) / 2 + var(--sky-step-leftpad));
|
|
167
|
-
border-left: 2px solid var(--sky-text-quinary);
|
|
168
|
-
padding: 5px 0 0 calc(var(--sky-step-size)/2 + 12px);
|
|
169
|
-
transition: border-color 260ms ease;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
/* Only non-last items get the thin dashed border when collapsed */
|
|
173
|
-
:host([layout="vertical"])
|
|
174
|
-
.v-item:not(:last-child)
|
|
175
|
-
.v-panel:not([data-open="true"])
|
|
176
|
-
.v-content {
|
|
177
|
-
border-left: 1px dashed var(--sky-text-quinary);
|
|
178
|
-
opacity: 0.6;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
/* Only non-last items get the solid active border when open */
|
|
182
|
-
:host([layout="vertical"])
|
|
183
|
-
.v-item:not(:last-child)
|
|
184
|
-
.v-panel[data-open="true"]
|
|
185
|
-
.v-content {
|
|
186
|
-
border-left: 2px solid var(--sky-active-primary);
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
/* Ensure last item never shows a left border (safety override) */
|
|
190
|
-
:host([layout="vertical"]) .v-item:last-child .v-content {
|
|
191
|
-
border-left: none !important;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
:host([layout="vertical"]) .v-item:not(:last-child)::after {
|
|
195
|
-
content: "";
|
|
196
|
-
position: absolute;
|
|
197
|
-
left: calc(var(--sky-step-size) / 2 + var(--sky-step-leftpad));
|
|
198
|
-
top: calc(var(--sky-step-size) + 8px);
|
|
199
|
-
bottom: -12px;
|
|
200
|
-
width: 2px;
|
|
201
|
-
background: var(--sky-text-quinary);
|
|
202
|
-
z-index: 0;
|
|
203
|
-
transition: background-color 260ms ease;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
:host([layout="horizontal"]) .panels {
|
|
207
|
-
position: relative;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
/* Base: panels are not absolute anymore */
|
|
211
|
-
:host([layout="horizontal"]) .panel {
|
|
212
|
-
display: none;
|
|
213
|
-
position: static;
|
|
214
|
-
opacity: 0;
|
|
215
|
-
width: 100%;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
/* Active panel takes normal flow and sets host height naturally */
|
|
219
|
-
:host([layout="horizontal"]) .panel[data-active="true"] {
|
|
220
|
-
display: block;
|
|
221
|
-
position: static;
|
|
222
|
-
opacity: 1;
|
|
223
|
-
z-index: 1;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
/* Only the leaving panel is absolute so it can animate away on top */
|
|
227
|
-
:host([layout="horizontal"]) .panel[data-leaving="true"] {
|
|
228
|
-
display: block;
|
|
229
|
-
position: absolute;
|
|
230
|
-
inset: 0;
|
|
231
|
-
z-index: 0;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
/* Directional animations still work */
|
|
235
|
-
@keyframes slideInFromRight {
|
|
236
|
-
from {
|
|
237
|
-
transform: translateX(12px);
|
|
238
|
-
opacity: 0;
|
|
239
|
-
}
|
|
240
|
-
to {
|
|
241
|
-
transform: translateX(0);
|
|
242
|
-
opacity: 1;
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
@keyframes slideOutToLeft {
|
|
246
|
-
from {
|
|
247
|
-
transform: translateX(0);
|
|
248
|
-
}
|
|
249
|
-
to {
|
|
250
|
-
transform: translateX(-12px);
|
|
251
|
-
opacity: 0;
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
@keyframes slideInFromLeft {
|
|
255
|
-
from {
|
|
256
|
-
transform: translateX(-12px);
|
|
257
|
-
opacity: 0;
|
|
258
|
-
}
|
|
259
|
-
to {
|
|
260
|
-
transform: translateX(0);
|
|
261
|
-
opacity: 1;
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
@keyframes slideOutToRight {
|
|
265
|
-
from {
|
|
266
|
-
transform: translateX(0);
|
|
267
|
-
}
|
|
268
|
-
to {
|
|
269
|
-
transform: translateX(12px);
|
|
270
|
-
opacity: 0;
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
/* Apply based on container direction + panel state */
|
|
275
|
-
:host([layout="horizontal"])
|
|
276
|
-
.panels[data-dir="fwd"]
|
|
277
|
-
.panel[data-active="true"] {
|
|
278
|
-
animation: slideInFromRight 220ms ease both;
|
|
279
|
-
}
|
|
280
|
-
:host([layout="horizontal"])
|
|
281
|
-
.panels[data-dir="fwd"]
|
|
282
|
-
.panel[data-leaving="true"] {
|
|
283
|
-
animation: slideOutToLeft 220ms ease both;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
:host([layout="horizontal"])
|
|
287
|
-
.panels[data-dir="back"]
|
|
288
|
-
.panel[data-active="true"] {
|
|
289
|
-
animation: slideInFromLeft 220ms ease both;
|
|
290
|
-
}
|
|
291
|
-
:host([layout="horizontal"])
|
|
292
|
-
.panels[data-dir="back"]
|
|
293
|
-
.panel[data-leaving="true"] {
|
|
294
|
-
animation: slideOutToRight 220ms ease both;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
@media (prefers-reduced-motion: reduce) {
|
|
298
|
-
:host([layout="horizontal"]) .panels {
|
|
299
|
-
transition: none;
|
|
300
|
-
}
|
|
301
|
-
:host([layout="horizontal"]) .panel {
|
|
302
|
-
transition: none;
|
|
303
|
-
transform: none;
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
:host([layout="vertical"]) .v-item.completed:not(:last-child)::after {
|
|
308
|
-
background: var(--sky-active-primary);
|
|
309
|
-
}
|
|
310
|
-
:host([layout="vertical"]) .v-item:last-child::after {
|
|
311
|
-
display: none;
|
|
312
|
-
}
|
|
313
|
-
:host([layout="vertical"]) .v-header .node {
|
|
314
|
-
position: relative;
|
|
315
|
-
z-index: 1;
|
|
316
|
-
}
|
|
317
|
-
:host([layout="vertical"]) .v-panel[data-open="true"] {
|
|
318
|
-
grid-template-rows: 1fr;
|
|
319
|
-
opacity: 1;
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
:host([layout="vertical"][all-expanded]) .v-panel {
|
|
323
|
-
grid-template-rows: 1fr;
|
|
324
|
-
opacity: 1;
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
/* All-expanded: docs-style — no content rail border, no “progress” chroming */
|
|
328
|
-
:host([layout="vertical"][all-expanded]) .v-content {
|
|
329
|
-
border-left: none !important;
|
|
330
|
-
opacity: 1 !important;
|
|
331
|
-
}
|
|
332
|
-
:host([layout="vertical"][all-expanded]) .step-btn {
|
|
333
|
-
cursor: default;
|
|
334
|
-
pointer-events: none;
|
|
335
|
-
}
|
|
336
|
-
:host([layout="vertical"][all-expanded]) .step-btn .node {
|
|
337
|
-
border-color: var(--sky-text-quinary);
|
|
338
|
-
color: inherit;
|
|
339
|
-
background: var(--sky-glass-primary);
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
.step-btn[aria-current="step"] .node {
|
|
343
|
-
border-color: var(--sky-active-primary);
|
|
344
|
-
color: var(--sky-active-primary);
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
:host([compact]) .h-steps {
|
|
348
|
-
gap: 8px;
|
|
349
|
-
}
|
|
350
|
-
:host([compact]) .connector {
|
|
351
|
-
flex-basis: 16px;
|
|
352
|
-
}
|
|
353
|
-
:host([compact]) .label {
|
|
354
|
-
font-size: 13px;
|
|
355
|
-
}
|
|
356
|
-
:host([compact]) .sub {
|
|
357
|
-
font-size: 11px;
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
::slotted([slot^="panel-"]) {
|
|
361
|
-
display: block;
|
|
362
|
-
box-sizing: border-box;
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
.panel-content {
|
|
366
|
-
padding: 12px 0;
|
|
367
|
-
}
|
|
368
|
-
`}get _count(){return this.steps?.length??0}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._onTriggerClick,{capture:!0}),this.addEventListener("keydown",this._onTriggerKey,{capture:!0})}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._onTriggerClick,{capture:!0}),this.removeEventListener("keydown",this._onTriggerKey,{capture:!0})}_findTrigger(t){for(const e of t){if(!(e instanceof HTMLElement))continue;const t=e.getAttribute("data-sky-steps")||e.slot;if("back"===t||"next"===t)return e}return null}_activateTrigger(t){const e=t.getAttribute("data-sky-steps")||t.slot;"back"===e?this.goPrev():"next"===e&&this.goNext()}isCompleted(t){return this.completedSteps?this.completedSteps.includes(t):t<this.currentStep}canJump(t){return t===this.currentStep||(!!this.allowStepJump||1===Math.abs(t-this.currentStep))}onKeyDown(t){if(this.allExpanded&&"vertical"===this.layout)return;const e=t.key,s="horizontal"===this.layout;let i=this.currentStep;if(s&&"ArrowRight"===e||!s&&"ArrowDown"===e)i++;else if(s&&"ArrowLeft"===e||!s&&"ArrowUp"===e)i--;else if("Home"===e)i=1;else{if("End"!==e)return;i=this._count}t.preventDefault(),i=Math.min(Math.max(1,i),this._count);const a=this.steps[i-1];a?.disabled||this.canJump(i)&&this._setCurrent(i,!0)}onStepClick(t){const e=t+1,s=this.steps[t];s&&!s.disabled&&this.canJump(e)&&this._setCurrent(e)}prevIndex(){const t=this.currentStep-1;if(!this.allowStepJump)return t>=1&&!this.steps[t-1]?.disabled?t:null;for(let e=t;e>=1;e--)if(!this.steps[e-1]?.disabled)return e;return null}nextIndex(){const t=this.currentStep+1;if(!this.allowStepJump)return t<=this._count&&!this.steps[t-1]?.disabled?t:null;for(let e=t;e<=this._count;e++)if(!this.steps[e-1]?.disabled)return e;return null}goPrev(){const t=this.prevIndex();t&&this.canJump(t)&&this._setCurrent(t)}goNext(){const t=this.nextIndex();t&&this.canJump(t)&&this._setCurrent(t)}previous(){this.goPrev()}next(){this.goNext()}goToStep(t){const e=Math.min(Math.max(1,Math.floor(t)),this._count);return!!this.canJump(e)&&(this._setCurrent(e,!0),!0)}getCurrentStep(){return this.currentStep}prevStep(){this.previous()}nextStep(){this.next()}_setCurrent(t,e=!1){if(t===this.currentStep)return;const s=this.currentStep;this._prevStep=s,this.focusStep(t),this.currentStep=t,this.dispatchEvent(new CustomEvent("step-change",{detail:{step:t,previous:s},bubbles:!0,composed:!0})),this.updateComplete.then(()=>{this._applyDirectionAndLeaving(s,t)})}_applyDirectionAndLeaving(t,e){if("horizontal"!==this.layout)return;const s=this.renderRoot?.querySelector(".panels");if(!s)return;s.setAttribute("data-dir",e>t?"fwd":"back");const i=s.querySelector(`.panel[data-step="${t}"]`);if(i){i.setAttribute("data-leaving","true");const t=()=>{i.removeAttribute("data-leaving"),i.removeEventListener("animationend",t)};i.addEventListener("animationend",t),setTimeout(t,260)}}focusStep(t){const e=this.renderRoot?.querySelector(`.step-btn[data-index="${t}"]`);e?.focus()}renderNodeInner(t,e,s){const i=s?.icon??this.stepIcon,o=s?.checkedIcon??this.checkedIcon;return e&&o?a`<span class="icon checked-icon" aria-hidden="true"
|
|
369
|
-
><sky-icon icon=${o}></sky-icon
|
|
370
|
-
></span>`:i?a`<span class="icon regular-icon" aria-hidden="true"
|
|
371
|
-
><sky-icon icon=${i}></sky-icon
|
|
372
|
-
></span>`:this.hideNumbers&&!e?a`<span class="bullet index" aria-hidden="true">•</span>`:a`<span class="number index" aria-hidden="true">${t}</span>`}renderNode(t,e,s){const i=!!(s?.checkedIcon??this.checkedIcon),o=!!(s?.icon??this.stepIcon),n=e&&i?"show-checked-icon":o?"show-regular-icon":this.hideNumbers?"show-bullet":"show-number",r=l({node:!0,completed:!!e,[n]:!0});return a`<span class=${r} part="node">
|
|
373
|
-
${this.renderNodeInner(t,e,s)}
|
|
374
|
-
</span>`}renderHStep(t){const e=t+1,s=this.steps[t],i=!!s?.disabled,o=this.isCompleted(e),n=this.currentStep===e,p=this.renderNode(e,o,s),c=this.showLabels?a`<span class="labels" part="labels">
|
|
375
|
-
<span class="label">${s?.label??`Step ${e}`}</span>
|
|
376
|
-
${r(s?.subtitle,()=>a`<span class="sub">${s.subtitle}</span>`)}
|
|
377
|
-
</span>`:null,d=a`<button
|
|
378
|
-
class="step-btn"
|
|
379
|
-
data-index="${e}"
|
|
380
|
-
role="button"
|
|
381
|
-
aria-current=${n?"step":"false"}
|
|
382
|
-
aria-disabled=${i?"true":"false"}
|
|
383
|
-
@click=${()=>this.onStepClick(t)}
|
|
384
|
-
>
|
|
385
|
-
${p}${c}
|
|
386
|
-
</button>`,h=t<this._count-1,u=this.isCompleted(e)&&(this.isCompleted(e+1)||this.currentStep>e),y=l({connector:!0,active:!!u});return[d,r(h,()=>a`<div class=${y} aria-hidden="true"></div>`,()=>a``)]}renderVerticalItem(t){const e=t+1,s=this.steps[t],i=!!s?.disabled,o=!this.allExpanded&&this.isCompleted(e),n=this.allExpanded||this.currentStep===e,p=this.renderNode(e,o,s),c=this.showLabels?a`<span class="labels" part="labels">
|
|
387
|
-
<span class="label">${s?.label??`Step ${e}`}</span>
|
|
388
|
-
${r(s?.subtitle,()=>a`<span class="sub">${s.subtitle}</span>`)}
|
|
389
|
-
</span>`:null,d=`panel-${e}-content`,h=l({"v-item":!0,completed:!!o}),u=this.allExpanded?"false":this.currentStep===e?"step":"false";return a`
|
|
390
|
-
<div class=${h}>
|
|
391
|
-
<div class="v-header">
|
|
392
|
-
<button
|
|
393
|
-
class="step-btn"
|
|
394
|
-
type="button"
|
|
395
|
-
tabindex=${this.allExpanded?"-1":"0"}
|
|
396
|
-
data-index="${e}"
|
|
397
|
-
aria-current=${u}
|
|
398
|
-
aria-disabled=${i?"true":"false"}
|
|
399
|
-
aria-expanded=${n?"true":"false"}
|
|
400
|
-
aria-controls=${d}
|
|
401
|
-
@click=${()=>this.onStepClick(t)}
|
|
402
|
-
>
|
|
403
|
-
${p}${c}
|
|
404
|
-
</button>
|
|
405
|
-
</div>
|
|
406
|
-
|
|
407
|
-
<div
|
|
408
|
-
id=${d}
|
|
409
|
-
class="v-panel"
|
|
410
|
-
role="region"
|
|
411
|
-
data-open=${String(n)}
|
|
412
|
-
>
|
|
413
|
-
<div class="v-inner">
|
|
414
|
-
<div class="v-content">
|
|
415
|
-
<slot name=${`panel-${e}`}></slot>
|
|
416
|
-
</div>
|
|
417
|
-
</div>
|
|
418
|
-
</div>
|
|
419
|
-
</div>
|
|
420
|
-
`}render(){const t=this._count;return t?"vertical"===this.layout?a`
|
|
421
|
-
<slot name="before"></slot>
|
|
422
|
-
<div class="v-list" part="panels" @keydown=${this.onKeyDown}>
|
|
423
|
-
${this.steps.map((t,e)=>this.renderVerticalItem(e))}
|
|
424
|
-
</div>
|
|
425
|
-
<slot></slot>
|
|
426
|
-
<slot name="after"></slot>
|
|
427
|
-
`:a`
|
|
428
|
-
<slot name="before"></slot>
|
|
429
|
-
|
|
430
|
-
<div class="h-wrap" @keydown=${this.onKeyDown}>
|
|
431
|
-
<div class="h-steps" part="steps">
|
|
432
|
-
${this.steps.map((t,e)=>this.renderHStep(e))}
|
|
433
|
-
</div>
|
|
434
|
-
</div>
|
|
435
|
-
|
|
436
|
-
<div class="panels" part="panels">
|
|
437
|
-
${Array.from({length:t},(t,e)=>{const s=e+1,i=s===this.currentStep;return a`
|
|
438
|
-
<div
|
|
439
|
-
class="panel"
|
|
440
|
-
part="panel"
|
|
441
|
-
data-step=${s}
|
|
442
|
-
data-active=${String(i)}
|
|
443
|
-
?inert=${!i}
|
|
444
|
-
>
|
|
445
|
-
<div class="panel-content">
|
|
446
|
-
<slot name=${`panel-${s}`}></slot>
|
|
447
|
-
</div>
|
|
448
|
-
</div>
|
|
449
|
-
`})}
|
|
450
|
-
</div>
|
|
451
|
-
|
|
452
|
-
<slot></slot>
|
|
453
|
-
<slot name="after"></slot>
|
|
454
|
-
`:a``}};t([o({type:Array}),e("design:type",Array)],c.prototype,"steps",void 0),t([o({type:Number}),e("design:type",Object)],c.prototype,"currentStep",void 0),t([o({type:String,reflect:!0}),e("design:type",String)],c.prototype,"layout",void 0),t([o({type:Boolean}),e("design:type",Object)],c.prototype,"allowStepJump",void 0),t([o({type:Boolean}),e("design:type",Object)],c.prototype,"hideNumbers",void 0),t([o({type:Boolean}),e("design:type",Object)],c.prototype,"showLabels",void 0),t([o({type:Boolean,reflect:!0}),e("design:type",Object)],c.prototype,"compact",void 0),t([o({type:Array}),e("design:type",Object)],c.prototype,"completedSteps",void 0),t([o({type:String}),e("design:type",String)],c.prototype,"stepIcon",void 0),t([o({type:String}),e("design:type",String)],c.prototype,"checkedIcon",void 0),t([o({type:Boolean,reflect:!0}),e("design:type",Object)],c.prototype,"allExpanded",void 0),c=t([n("sky-steps")],c);export{c as SkySteps};
|
|
455
|
-
//# sourceMappingURL=sky-steps.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sky-steps.js","sources":["../../src/sky-steps/sky-steps.ts"],"sourcesContent":[null],"names":["SkySteps","LitElement","constructor","this","steps","currentStep","layout","allowStepJump","hideNumbers","showLabels","compact","completedSteps","allExpanded","_prevStep","_onTriggerClick","ev","el","_findTrigger","composedPath","preventDefault","_activateTrigger","_onTriggerKey","key","dependencies","SkyIcon","styles","css","_count","length","connectedCallback","super","addEventListener","capture","disconnectedCallback","removeEventListener","path","t","HTMLElement","val","getAttribute","slot","goPrev","goNext","isCompleted","idx1","includes","canJump","toIndex1","Math","abs","onKeyDown","horizontal","next","min","max","target","disabled","_setCurrent","onStepClick","idx0","item","prevIndex","want","i","nextIndex","idx","previous","goToStep","step","floor","getCurrentStep","prevStep","nextStep","focus","focusStep","dispatchEvent","CustomEvent","detail","bubbles","composed","updateComplete","then","_applyDirectionAndLeaving","prev","wrap","renderRoot","querySelector","setAttribute","leaving","cleanup","removeAttribute","setTimeout","btn","renderNodeInner","completed","stepIcon","icon","checkedIcon","html","renderNode","hasChecked","hasRegular","showClass","nodeClasses","classMap","node","renderHStep","isCurrent","labels","label","when","subtitle","showConnector","connectorActive","connectorClasses","connector","active","renderVerticalItem","isOpen","panelId","vItemClasses","ariaCurrent","String","render","count","map","_","Array","from","__decorate","property","type","prototype","Number","reflect","Boolean","customElement"],"mappings":"8TAuGO,IAAMA,EAAN,cAAuBC,EAAvB,WAAAC,uBAMsBC,KAAAC,MAAoB,GACnBD,KAAAE,YAAc,EACCF,KAAAG,OACzC,aAC2BH,KAAAI,eAC3B,EAC2BJ,KAAAK,aAAc,EACdL,KAAAM,YAAa,EACEN,KAAAO,SAAU,EAE3BP,KAAAQ,eACzB,KAO0CR,KAAAS,aAAc,EAElDT,KAAAU,UAAYV,KAAKE,YA6YjBF,KAAAW,gBAAmBC,IACzB,MAAMC,EAAKb,KAAKc,aAAaF,EAAGG,gBAC3BF,IACLD,EAAGI,iBACHhB,KAAKiB,iBAAiBJ,KAIhBb,KAAAkB,cAAiBN,IACvB,GAAe,UAAXA,EAAGO,KAA8B,MAAXP,EAAGO,IAAa,OAC1C,MAAMN,EAAKb,KAAKc,aAAaF,EAAGG,gBAC3BF,IACLD,EAAGI,iBACHhB,KAAKiB,iBAAiBJ,IAqZ1B,QAv0BSb,KAAAoB,aAAyD,CAC9D,WAAYC,EACZ,QAwBKrB,KAAAsB,OAASC,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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