@luzmo/lucero 2.4.1 → 2.4.2
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/components/chat-message/index.cjs +1 -1
- package/components/chat-message/index.js +1 -1
- package/components/chat-message-BDfomRm-.cjs +148 -0
- package/components/{chat-message-T6QIK2Bl.js → chat-message-D6U-sprD.js} +562 -526
- package/components/index.cjs +1 -1
- package/components/index.js +2 -2
- package/components/progress-steps/index.cjs +1 -1
- package/components/progress-steps/index.js +1 -1
- package/components/progress-steps/progress-steps.d.ts +9 -20
- package/components/progress-steps-BvCzsq9Z.js +368 -0
- package/components/progress-steps-CvdQQwHc.cjs +98 -0
- package/custom-elements.json +1 -1
- package/package.json +1 -1
- package/standalone/chat-message.js +27 -27
- package/standalone/progress-steps.js +4 -4
- package/components/chat-message-Dgo6h0rD.cjs +0 -148
- package/components/progress-steps-BIbj8x8S.js +0 -383
- package/components/progress-steps-upJp8wl3.cjs +0 -98
package/components/index.cjs
CHANGED
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require("./tokens.cjs");const e=require("./decorate-Dq34MBGe.cjs"),t=require("./sized-mixin-BT7cv-fT.cjs"),n=require("./accordion-BK0LfhmL.cjs"),r=require("./focus-visible-DNHNlrty.cjs"),ee=require("./focusable-B6h03pAe.cjs"),te=require("./action-group-oo7YV0EW.cjs"),ne=require("./icon-zOPAWCdx.cjs"),re=require("./close-button-BAELImQY.cjs"),i=require("./field-label-C0vfY1b6.cjs"),a=require("./popover-BsdqkvKI.cjs"),o=require("./action-bar-DAqG_7VG.cjs"),s=require("./action-button-CX1uYbQp.cjs"),c=require("./slottable-request-event-C6eb7Ch3.cjs"),l=require("./progress-circle-bO_VAX3N.cjs"),u=require("./menu-CrhA2iPZ.cjs"),d=require("./overlay-Dn7EbA_W.cjs"),f=require("./platform-BAjeJp2W.cjs"),ie=require("./tooltip-DjOW52n2.cjs"),p=require("./picker-BliQJlY_.cjs"),ae=require("./action-menu-CwzRbF61.cjs"),oe=require("./avatar-DHS5UGTJ.cjs"),m=require("./badge-D8pIDEoq.cjs"),h=require("./button-Bvnidb4x.cjs"),g=require("./button-group-Du7R4SxZ.cjs"),_=require("./calendar-pQxEWdYC.cjs"),v=require("./chat-message-
|
|
18
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require("./tokens.cjs");const e=require("./decorate-Dq34MBGe.cjs"),t=require("./sized-mixin-BT7cv-fT.cjs"),n=require("./accordion-BK0LfhmL.cjs"),r=require("./focus-visible-DNHNlrty.cjs"),ee=require("./focusable-B6h03pAe.cjs"),te=require("./action-group-oo7YV0EW.cjs"),ne=require("./icon-zOPAWCdx.cjs"),re=require("./close-button-BAELImQY.cjs"),i=require("./field-label-C0vfY1b6.cjs"),a=require("./popover-BsdqkvKI.cjs"),o=require("./action-bar-DAqG_7VG.cjs"),s=require("./action-button-CX1uYbQp.cjs"),c=require("./slottable-request-event-C6eb7Ch3.cjs"),l=require("./progress-circle-bO_VAX3N.cjs"),u=require("./menu-CrhA2iPZ.cjs"),d=require("./overlay-Dn7EbA_W.cjs"),f=require("./platform-BAjeJp2W.cjs"),ie=require("./tooltip-DjOW52n2.cjs"),p=require("./picker-BliQJlY_.cjs"),ae=require("./action-menu-CwzRbF61.cjs"),oe=require("./avatar-DHS5UGTJ.cjs"),m=require("./badge-D8pIDEoq.cjs"),h=require("./button-Bvnidb4x.cjs"),g=require("./button-group-Du7R4SxZ.cjs"),_=require("./calendar-pQxEWdYC.cjs"),v=require("./chat-message-BDfomRm-.cjs"),y=require("./chat-message-group-CvxdX3jt.cjs"),b=require("./checkbox-ClVrkeLp.cjs"),x=require("./color-loupe-6NcLbFco.cjs"),S=require("./color-handle-2iFLp9FN.cjs"),C=require("./streaming-listener-Bfyk6Fsx.cjs"),w=require("./color-area-CmKlQG1i.cjs"),T=require("./text-field-3fDtTQkR.cjs"),E=require("./color-field-BH9x46k_.cjs"),D=require("./color-slider-CMW8gJ0Z.cjs"),O=require("./divider-BcE8D-pH.cjs"),k=require("./swatch-CQ0inIHK.cjs"),A=require("./color-menu-BYTgxLQG.cjs"),j=require("./color-palette-x6W09EBL.cjs"),M=require("./color-palette-group-D4k_7pW6.cjs"),N=require("./color-picker-BAikpqUT.cjs"),P=require("./picker-button-B8Jbf9jK.cjs"),F=require("./date-range-picker-D149LIGC.cjs"),I=require("./date-time-picker-CRpvRk9T.cjs"),L=require("./field-group-Dd5xYczm.cjs");require("./field-group/index.cjs");const se=require("./infield-button-kilVRjwB.cjs"),R=require("./label-B3zs6OX0.cjs"),z=require("./text-field-CbN4nydd.cjs"),B=require("./multi-language-field-BndVikur.cjs"),V=require("./notice-CsWaqcq3.cjs"),H=require("./number-field-xxXgR70l.cjs"),U=require("./options-CP9V2CSJ.cjs");require("./picker/index.cjs");const W=require("./progress-bar-CrodWzcc.cjs"),G=require("./progress-steps-CvdQQwHc.cjs"),K=require("./skeleton-loader-CNcwCh4V.cjs"),q=require("./prompt-box-sp9_-Hnx.cjs"),ce=require("./voice-recorder-B1tBrGTV.cjs"),J=require("./radio-CRTfoEX_.cjs"),Y=require("./question-box-Bdtsgv1k.cjs"),le=require("./search-PxJEuwHt.cjs"),ue=require("./select-DsGVB01K.cjs"),X=require("./slider-C_8pSK4N.cjs"),de=require("./split-view-BwCFYey6.cjs"),fe=require("./status-light-D3hdx8Pd.cjs"),pe=require("./switch-qwpYXVnO.cjs"),Z=require("./tabs-DxOD4QNt.cjs"),Q=require("./top-nav-81IKEGjR.cjs"),$=require("./tags-fLCGajv_.cjs"),me=require("./toast-DRrGgznK.cjs");require("./utils.cjs"),exports.ClickController=d.d,exports.DEFAULT_FILE_ICONS=q.n,exports.DEFAULT_NOTICE_LABELS=V.t,exports.DEFAULT_PROGRESS_STEPS_LABELS=G.n,exports.DEFAULT_QUESTION_BOX_LABELS=Y.a,exports.DEFAULT_SLIDER_LABELS=X.r,exports.DESCRIPTION_ID=p.t,exports.ELEMENT_MIME_TYPE=q.r,exports.ElementSizes=t.t,exports.FocusVisiblePolyfillMixin=r.t,exports.Focusable=ee.t,exports.HoverController=d.u,exports.InteractionController=d.f,exports.InteractionTypes=d.p,exports.LONGPRESS_INSTRUCTIONS=d.c,exports.LongpressController=d.l,exports.LuzmoAbstractOverlay=d.y,exports.LuzmoAccordion=n.n,exports.LuzmoAccordionItem=n.t,exports.LuzmoActionBar=o.t,exports.LuzmoActionButton=s.t,exports.LuzmoActionGroup=te.t,exports.LuzmoActionMenu=ae.t,exports.LuzmoAvatar=oe.t,exports.LuzmoBadge=m.t,exports.LuzmoButton=h.n,exports.LuzmoButtonGroup=g.t,exports.LuzmoCalendar=_.t,exports.LuzmoChatMessage=v.t,exports.LuzmoChatMessageGroup=y.t,exports.LuzmoCheckbox=b.t,exports.LuzmoClearButton=h.t,exports.LuzmoCloseButton=re.t,exports.LuzmoColorArea=w.t,exports.LuzmoColorField=E.t,exports.LuzmoColorHandle=S.t,exports.LuzmoColorLoupe=x.t,exports.LuzmoColorMenu=A.t,exports.LuzmoColorPalette=j.t,exports.LuzmoColorPaletteGroup=M.t,exports.LuzmoColorPicker=N.t,exports.LuzmoColorSlider=D.t,exports.LuzmoDateRangePicker=F.t,exports.LuzmoDateTimePicker=I.t,exports.LuzmoDivider=O.t,exports.LuzmoElement=e.n,exports.LuzmoFieldGroup=L.t,exports.LuzmoFieldLabel=i.t,exports.LuzmoHelpText=z.t,exports.LuzmoIcon=ne.t,exports.LuzmoInfieldButton=se.t,exports.LuzmoLabel=R.t,exports.LuzmoMenu=u.a,exports.LuzmoMenuDivider=u.i,exports.LuzmoMenuGroup=u.r,exports.LuzmoMenuItem=u.t,exports.LuzmoMixin=e.r,exports.LuzmoMultiLangField=B.t,exports.LuzmoNotice=V.n,exports.LuzmoNumberField=H.t,exports.LuzmoOption=U.a,exports.LuzmoOptions=U.t,exports.LuzmoOptionsDivider=U.i,exports.LuzmoOverlay=d.s,exports.LuzmoOverlayTrigger=d.o,exports.LuzmoPicker=p.n,exports.LuzmoPickerBase=p.r,exports.LuzmoPickerButton=P.t,exports.LuzmoPopover=a.t,exports.LuzmoProgressBar=W.t,exports.LuzmoProgressCircle=l.t,exports.LuzmoProgressSteps=G.t,exports.LuzmoPromptBox=q.t,exports.LuzmoQuestionBox=Y.t,exports.LuzmoRadio=J.n,exports.LuzmoRadioGroup=J.t,exports.LuzmoSearch=le.t,exports.LuzmoSelect=ue.t,exports.LuzmoSkeletonLoader=K.t,exports.LuzmoSlider=X.n,exports.LuzmoSliderHandle=X.t,exports.LuzmoSplitView=de.t,exports.LuzmoStatusLight=fe.t,exports.LuzmoSwatch=k.n,exports.LuzmoSwatchGroup=k.t,exports.LuzmoSwitch=pe.t,exports.LuzmoTab=Z.i,exports.LuzmoTabPanel=Z.r,exports.LuzmoTabs=Z.n,exports.LuzmoTabsOverflow=Z.t,exports.LuzmoTag=$.n,exports.LuzmoTags=$.t,exports.LuzmoTextField=T.t,exports.LuzmoToast=me.t,exports.LuzmoTooltip=ie.t,exports.LuzmoTopNav=Q.n,exports.LuzmoTopNavItem=Q.t,exports.MenuItemAddedOrUpdatedEvent=u.n,exports.OverlayTriggerDirective=d.t,exports.PlacementController=d.g,exports.QUESTION_BOX_OTHER_VALUE=Y.o,exports.SAFARI_FOCUS_RING_CLASS=d.m,exports.SizedMixin=t.n,exports.SlottableRequestDirective=d.r,exports.SlottableRequestEvent=c.t,exports.VIRTUALIZE_AS_OF_NUM_ITEMS=U.n,exports.VirtualTrigger=d.v,exports.VoiceRecorder=ce.t,exports.guaranteedAllTransitionend=d.b,exports.isAndroid=f.t,exports.isAppleDevice=f.n,exports.isChrome=f.r,exports.isFirefox=f.i,exports.isIOS=f.a,exports.isIPad=f.o,exports.isIPhone=f.s,exports.isMac=f.c,exports.isSeamonkey=f.l,exports.isWebKit=f.u,exports.lastInteractionType=d.h,exports.nextFrame=d.x,exports.noop=d.S,exports.noticeVariants=V.r,exports.openOverlay=d.a,exports.overlayTimer=d.C,exports.placementUpdatedSymbol=d._,exports.questionBoxOtherKey=Y.s,exports.questionsToRequestedSchema=Y.n,exports.removeSlottableRequest=c.n,exports.requestedSchemaToQuestions=Y.r,exports.slottableRequest=d.i,exports.streamingListener=C.t,exports.toElicitationContent=Y.i,exports.trigger=d.n;
|
package/components/index.js
CHANGED
|
@@ -41,7 +41,7 @@ import { t as ce } from "./badge-D2Hjf-Ww.js";
|
|
|
41
41
|
import { n as le, t as ue } from "./button-DIV_j_U3.js";
|
|
42
42
|
import { t as de } from "./button-group-Duf-Igst.js";
|
|
43
43
|
import { t as fe } from "./calendar-D1UtHvpY.js";
|
|
44
|
-
import { t as pe } from "./chat-message-
|
|
44
|
+
import { t as pe } from "./chat-message-D6U-sprD.js";
|
|
45
45
|
import { t as me } from "./chat-message-group-k9lo-ZqD.js";
|
|
46
46
|
import { t as he } from "./checkbox-BEjvkjfc.js";
|
|
47
47
|
import { t as ge } from "./color-loupe-CqHyyvjQ.js";
|
|
@@ -71,7 +71,7 @@ import { t as Ve } from "./number-field-DAOy_AvQ.js";
|
|
|
71
71
|
import { a as He, i as Ue, n as We, t as Ge } from "./options-D_ifU0DH.js";
|
|
72
72
|
import "./picker/index.js";
|
|
73
73
|
import { t as Ke } from "./progress-bar-D4iFHkp7.js";
|
|
74
|
-
import { n as qe, t as Je } from "./progress-steps-
|
|
74
|
+
import { n as qe, t as Je } from "./progress-steps-BvCzsq9Z.js";
|
|
75
75
|
import { t as Ye } from "./skeleton-loader-BeCsYADg.js";
|
|
76
76
|
import { n as Xe, r as Ze, t as Qe } from "./prompt-box-Cz_m2wso.js";
|
|
77
77
|
import { t as $e } from "./voice-recorder-CTg3kRxx.js";
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require("../tokens.cjs");const e=require("../progress-steps-
|
|
18
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require("../tokens.cjs");const e=require("../progress-steps-CvdQQwHc.cjs");exports.DEFAULT_PROGRESS_STEPS_LABELS=e.n,exports.LuzmoProgressSteps=e.t;
|
|
@@ -8,16 +8,17 @@ declare const LuzmoProgressSteps_base: typeof LuzmoElement & {
|
|
|
8
8
|
/**
|
|
9
9
|
* @element luzmo-progress-steps
|
|
10
10
|
* @summary Shows the progress of a multi-step process, such as an AI response,
|
|
11
|
-
* as a
|
|
11
|
+
* as a status line that expands into the full step history.
|
|
12
12
|
*
|
|
13
|
-
* While a run is in progress, the line shows the newest running step
|
|
14
|
-
* newest running substep. Once the run finishes, it
|
|
15
|
-
*
|
|
13
|
+
* While a run is in progress, the line shows the newest running step, with its
|
|
14
|
+
* newest running substep on a second line below. Once the run finishes, it
|
|
15
|
+
* collapses to one line that shows how many steps ran. Activating the line
|
|
16
|
+
* opens the history.
|
|
16
17
|
*
|
|
17
18
|
* @attr size - The size of the component: s, m, l or xl
|
|
18
19
|
* @attr locale - Locale for resolving localized strings (default: 'en')
|
|
19
20
|
* @attr collapsed - Signals the run has finished, so the line settles into its summary as soon as no step runs
|
|
20
|
-
* @attr condensed - Deprecated, no effect: every state is condensed into
|
|
21
|
+
* @attr condensed - Deprecated, no effect: every state is condensed into the status line
|
|
21
22
|
* @attr display-mode - 'detailed' (default) lists substeps in the history, 'compact' lists main steps only
|
|
22
23
|
* @attr no-animate - Disables the shimmer and transitions
|
|
23
24
|
* @attr open - Whether the step history is shown
|
|
@@ -25,8 +26,8 @@ declare const LuzmoProgressSteps_base: typeof LuzmoElement & {
|
|
|
25
26
|
* @fires luzmo-step-expanded - The user opened the step history. `detail.nodeId` is the progress root id.
|
|
26
27
|
* @fires luzmo-step-collapsed - The user closed the step history. `detail.nodeId` is the progress root id.
|
|
27
28
|
*
|
|
28
|
-
* @cssprop --luzmo-progress-steps-font-size - Font size of the summary
|
|
29
|
-
* @cssprop --luzmo-progress-steps-font-size-small - Font size of the step history
|
|
29
|
+
* @cssprop --luzmo-progress-steps-font-size - Font size of the main step and the finished summary
|
|
30
|
+
* @cssprop --luzmo-progress-steps-font-size-small - Font size of the substep line and the step history
|
|
30
31
|
* @cssprop --luzmo-progress-steps-font-color - Color of emphasized text
|
|
31
32
|
* @cssprop --luzmo-progress-steps-font-color-dimmed - Color of the summary line and substeps
|
|
32
33
|
* @cssprop --luzmo-progress-steps-error-color - Color of failed steps
|
|
@@ -56,7 +57,7 @@ export declare class LuzmoProgressSteps extends LuzmoProgressSteps_base {
|
|
|
56
57
|
*/
|
|
57
58
|
displayMode: ProgressStepsDisplayMode;
|
|
58
59
|
/**
|
|
59
|
-
* @deprecated Has no effect. Every state is condensed into
|
|
60
|
+
* @deprecated Has no effect. Every state is condensed into the status line.
|
|
60
61
|
*/
|
|
61
62
|
condensed: boolean;
|
|
62
63
|
/**
|
|
@@ -86,21 +87,9 @@ export declare class LuzmoProgressSteps extends LuzmoProgressSteps_base {
|
|
|
86
87
|
private _settleTimer?;
|
|
87
88
|
private _leaveTimer?;
|
|
88
89
|
private _announceTimer?;
|
|
89
|
-
private _resizeObserver?;
|
|
90
|
-
/** Whether the shown line shows its substep alone. */
|
|
91
|
-
private _subStepOnly;
|
|
92
|
-
/** Whether the leaving line showed its substep alone. */
|
|
93
|
-
private _leavingSubStepOnly;
|
|
94
90
|
connectedCallback(): void;
|
|
95
91
|
disconnectedCallback(): void;
|
|
96
92
|
protected willUpdate(changes: PropertyValues): void;
|
|
97
|
-
protected updated(changes: PropertyValues): void;
|
|
98
|
-
/**
|
|
99
|
-
* Shows the substep alone when the main step and substep don't both fit
|
|
100
|
-
* whole. The main step stays in the accessible name. Runs before paint, so
|
|
101
|
-
* the measuring layout is never shown.
|
|
102
|
-
*/
|
|
103
|
-
private _fitLine;
|
|
104
93
|
private get _labels();
|
|
105
94
|
/** Moves between running and finished based on the latest tree. */
|
|
106
95
|
private _syncPhase;
|
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
/*! * Lucero - The design system for Luzmo.
|
|
2
|
+
*
|
|
3
|
+
* Copyright © 2026 Luzmo
|
|
4
|
+
* All rights reserved.
|
|
5
|
+
* Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
|
|
6
|
+
* This license allows users with a current active Luzmo account to use Lucero.
|
|
7
|
+
* This license terminates automatically if a user no longer has an active Luzmo account.
|
|
8
|
+
* Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
|
|
9
|
+
*
|
|
10
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
11
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
12
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
13
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
14
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
15
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
|
+
* SOFTWARE.
|
|
17
|
+
* */
|
|
18
|
+
import "./tokens.js";
|
|
19
|
+
import { n as e, t } from "./decorate-CkCg3wfh.js";
|
|
20
|
+
import { n } from "./sized-mixin-DzQTebN-.js";
|
|
21
|
+
import { r, t as i } from "./language-resolution-BaKYDD1a.js";
|
|
22
|
+
import { html as a, nothing as o, unsafeCSS as s } from "lit";
|
|
23
|
+
import { property as c, state as l } from "lit/decorators.js";
|
|
24
|
+
import { luzmoAlert as u, luzmoAngleRight as d, luzmoCheckCircleOutline as f, luzmoClose14 as p, luzmoIcon as m } from "@luzmo/icons";
|
|
25
|
+
import { classMap as h } from "lit/directives/class-map.js";
|
|
26
|
+
import { repeat as g } from "lit/directives/repeat.js";
|
|
27
|
+
import { keyed as _ } from "lit/directives/keyed.js";
|
|
28
|
+
//#region src/components/progress-steps/progress-steps-model.ts
|
|
29
|
+
function v(e) {
|
|
30
|
+
for (let t = (e?.length ?? 0) - 1; t >= 0; t--) if (e[t].status === "inProgress") return e[t];
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
function y(e) {
|
|
34
|
+
let t = v(e.children);
|
|
35
|
+
return t ? y(t) ?? t : null;
|
|
36
|
+
}
|
|
37
|
+
function b(e, t) {
|
|
38
|
+
return typeof e == "object" ? e[t] ?? e.en ?? Object.values(e)[0] ?? "" : String(e);
|
|
39
|
+
}
|
|
40
|
+
function x(e) {
|
|
41
|
+
return !!e?.children?.length;
|
|
42
|
+
}
|
|
43
|
+
function S(e) {
|
|
44
|
+
let t = v(e?.children);
|
|
45
|
+
return t ? {
|
|
46
|
+
mainStep: t,
|
|
47
|
+
subStep: y(t)
|
|
48
|
+
} : null;
|
|
49
|
+
}
|
|
50
|
+
function C(e) {
|
|
51
|
+
let t = 0;
|
|
52
|
+
for (let n of e?.children ?? []) t += +(n.status === "error") + C(n);
|
|
53
|
+
return t;
|
|
54
|
+
}
|
|
55
|
+
function w(e) {
|
|
56
|
+
return !!e?.children?.some((e) => e.status === "success" || e.status === "error");
|
|
57
|
+
}
|
|
58
|
+
function T(e) {
|
|
59
|
+
return e?.status === "success" || e?.status === "error";
|
|
60
|
+
}
|
|
61
|
+
function E(e, t) {
|
|
62
|
+
return e.description ? e.description.replaceAll(/\{\{(\w+)\}\}/g, (n, r) => {
|
|
63
|
+
let i = e.descriptionMetadata?.[r];
|
|
64
|
+
return i == null ? n : Array.isArray(i) ? i.map((e) => b(e, t)).join(", ") : b(i, t);
|
|
65
|
+
}) : e.step;
|
|
66
|
+
}
|
|
67
|
+
//#endregion
|
|
68
|
+
//#region src/components/progress-steps/progress-steps.module.scss?inline
|
|
69
|
+
var D = ":host{box-sizing:border-box;font-family:var(--luzmo-font-family);font-size:var(--luzmo-progress-steps-font-size,var(--progress-steps-font-size));line-height:var(--progress-steps-line-height);color:var(--luzmo-progress-steps-font-color-dimmed,var(--progress-steps-font-color-dimmed));display:block}.summary{box-sizing:border-box;align-items:flex-start;gap:var(--progress-steps-gap);max-inline-size:100%;min-block-size:var(--progress-steps-min-height);padding-block:max(0px, (var(--progress-steps-min-height) - var(--progress-steps-line-block-size)) / 2);padding-inline:var(--progress-steps-padding-inline);border-radius:var(--progress-steps-border-radius);color:inherit;font:inherit;text-align:start;cursor:pointer;appearance:none;background:0 0;border:0;margin:0;display:inline-flex}.summary:hover{background-color:var(--progress-steps-hover-background)}.summary:focus-visible{outline:var(--progress-steps-focus-ring-width) solid var(--highcontrast-progress-steps-focus-ring-color,var(--progress-steps-focus-ring-color));outline-offset:var(--progress-steps-focus-ring-gap)}.status-icon{inline-size:var(--progress-steps-icon-size);block-size:var(--progress-steps-icon-size);flex:none;justify-content:center;align-items:center;margin-block-start:calc((var(--progress-steps-line-block-size) - var(--progress-steps-icon-size)) / 2);display:inline-flex;position:relative;inset-block-start:var(--progress-steps-icon-offset)}.status-icon svg{block-size:100%;inline-size:100%}.status-icon-failed{color:var(--luzmo-progress-steps-warning-color,var(--progress-steps-warning-color))}.status-icon-finished{color:var(--luzmo-progress-steps-success-color,var(--progress-steps-success-color))}.spinner{box-sizing:border-box;border:calc(var(--luzmo-border-width) * 1.5) solid var(--highcontrast-progress-steps-spinner-track-color,var(--luzmo-progress-steps-substep-connector-color,var(--progress-steps-substep-connector-color)));border-block-start-color:var(--highcontrast-progress-steps-spinner-color,currentcolor);block-size:70%;inline-size:70%;animation:progress-steps-spin var(--progress-steps-spinner-duration) linear infinite;border-radius:50%}.headline{flex:0 auto;min-inline-size:0;display:block;position:relative;overflow:hidden}.headline-text{white-space:nowrap;flex-direction:column;min-inline-size:0;display:flex}.headline-text.entering{animation:progress-steps-enter var(--progress-steps-transition-duration) ease-out}.headline-text.leaving{inline-size:100%;animation:progress-steps-leave var(--progress-steps-transition-duration) ease-in forwards;position:absolute;inset-block-start:0;inset-inline-start:0}.main-step{text-overflow:ellipsis;color:var(--luzmo-progress-steps-font-color,var(--progress-steps-font-color));overflow:hidden}.sub-step{block-size:var(--progress-steps-sub-step-block-size);font-size:var(--luzmo-progress-steps-font-size-small,var(--progress-steps-font-size-small));display:block}.sub-step-texts{block-size:100%;display:block;position:relative;overflow:hidden}.sub-step-text{text-overflow:ellipsis;display:block;overflow:hidden}.sub-step-text.entering{animation:progress-steps-enter var(--progress-steps-transition-duration) ease-out}.sub-step-text.leaving{animation:progress-steps-leave var(--progress-steps-transition-duration) ease-in forwards;position:absolute;inset-block-start:0;inset-inline-start:0}.summary[data-state=done] .main-step{color:inherit}:where(.summary[data-state=done]) .headline-text.entering{animation:progress-steps-enter var(--progress-steps-transition-duration) ease-out, progress-steps-collapse var(--progress-steps-transition-duration) ease-in-out}.summary:hover .main-step{color:var(--luzmo-progress-steps-font-color,var(--progress-steps-font-color))}.failed-count:before{content:\"·\"/\"\";flex:none;padding-inline-end:.35em}.failed-count{white-space:nowrap;flex:none}.shimmer{-webkit-mask-image:linear-gradient(var(--progress-steps-shimmer-angle), currentcolor 38%, color-mix(in srgb, currentcolor 35%, transparent) 50%, currentcolor 62%);mask-image:linear-gradient(var(--progress-steps-shimmer-angle), currentcolor 38%, color-mix(in srgb, currentcolor 35%, transparent) 50%, currentcolor 62%);animation:progress-steps-shimmer var(--progress-steps-shimmer-duration) linear infinite;-webkit-mask-size:300% 100%;mask-size:300% 100%}.chevron{inline-size:var(--progress-steps-chevron-size);block-size:var(--progress-steps-chevron-size);transition:transform var(--progress-steps-transition-duration) ease, opacity var(--progress-steps-transition-duration) ease;flex:none;margin-block-start:calc((var(--progress-steps-line-block-size) - var(--progress-steps-chevron-size)) / 2);display:inline-flex}.chevron svg{block-size:100%;inline-size:100%}:host(:not([open])) .summary[data-state=running]:not(:hover,:focus-visible) .chevron{opacity:0}:host([open]) .chevron{transform:rotate(90deg)}:host([dir=rtl]) .chevron svg{transform:scaleX(-1)}:host([dir=rtl][open]) .chevron{transform:rotate(-90deg)}:host([dir=rtl]) .shimmer{animation-direction:reverse}.details{padding-block:var(--progress-steps-step-spacing);padding-inline:var(--progress-steps-padding-inline);font-size:var(--luzmo-progress-steps-font-size-small,var(--progress-steps-font-size-small));line-height:var(--progress-steps-details-line-height);animation:progress-steps-details-in var(--progress-steps-transition-duration) ease-out}.steps,.substeps{margin:0;padding:0;list-style:none}.step{grid-template-columns:var(--progress-steps-icon-size) minmax(0, 1fr);column-gap:var(--progress-steps-gap);padding-block:var(--progress-steps-step-spacing);display:grid;position:relative}.step:before,.step:after{content:\"\";border-inline-start:var(--luzmo-border-width) solid var(--luzmo-progress-steps-substep-connector-color,var(--progress-steps-substep-connector-color));position:absolute;inset-inline-start:calc(var(--progress-steps-icon-size) / 2 - var(--luzmo-border-width) / 2)}.step:before{block-size:calc(var(--progress-steps-marker-center) - var(--progress-steps-marker-radius));inset-block-start:0}.step:after{inset-block:calc(var(--progress-steps-marker-center) + var(--progress-steps-marker-radius)) 0}.step:first-child:before{display:none}.step:last-child:not(:has(>.substeps)):after{display:none}.step-marker{block-size:calc(1em * var(--progress-steps-details-line-height));color:var(--luzmo-progress-steps-font-color-dimmed,var(--progress-steps-font-color-dimmed));justify-content:center;align-items:center;display:inline-flex}.step-marker svg{inline-size:var(--progress-steps-marker-size);block-size:var(--progress-steps-marker-size)}.step-dot{box-sizing:border-box;inline-size:var(--progress-steps-dot-size);block-size:var(--progress-steps-dot-size);border:calc(var(--progress-steps-dot-size) / 2) solid currentcolor;border-radius:50%}.step-inProgress .step-marker{color:var(--luzmo-progress-steps-font-color,var(--progress-steps-font-color))}.step-inProgress .step-marker .step-dot{animation:1.2s ease-in-out infinite progress-steps-pulse}.step-pending .step-dot{border-width:var(--luzmo-border-width)}.step-error .step-marker{color:var(--luzmo-progress-steps-error-color,var(--progress-steps-error-color))}.step-label{color:var(--luzmo-progress-steps-font-color,var(--progress-steps-font-color));overflow-wrap:anywhere}.substeps{gap:var(--progress-steps-step-spacing);flex-direction:column;display:flex}.step>.substeps{grid-column:2;margin-block-start:calc(2 * var(--progress-steps-step-spacing))}.substep>.substeps{margin-block-start:var(--progress-steps-step-spacing);padding-inline-start:var(--progress-steps-substep-indent)}.substep{overflow-wrap:anywhere}.substep-inProgress{color:var(--luzmo-progress-steps-font-color,var(--progress-steps-font-color))}.substep-error{color:var(--luzmo-progress-steps-error-color,var(--progress-steps-error-color))}.substep-icon{vertical-align:-.1em;block-size:.85em;inline-size:.85em;margin-inline-end:.3em;display:inline-flex}.substep-icon svg{block-size:100%;inline-size:100%}.visually-hidden{clip-path:inset(50%);white-space:nowrap;border:0;block-size:1px;inline-size:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}:host([no-animate]) .headline-text.entering,:host([no-animate]) .sub-step-text.entering,:host([no-animate]) .details,:host([no-animate]) .chevron,:host([no-animate]) .spinner,:host([no-animate]) .step-dot{transition:none;animation:none}:host([no-animate]) .leaving{display:none}@keyframes progress-steps-shimmer{0%{-webkit-mask-position:100% 0;mask-position:100% 0}to{-webkit-mask-position:0 0;mask-position:0 0}}@keyframes progress-steps-enter{0%{opacity:0;transform:translateY(60%)}}@keyframes progress-steps-collapse{0%{padding-block-end:var(--progress-steps-sub-step-block-size)}}@keyframes progress-steps-leave{to{opacity:0;transform:translateY(-60%)}}@keyframes progress-steps-details-in{0%{opacity:0;transform:translateY(calc(-1 * var(--luzmo-spacing-2)))}}@keyframes progress-steps-spin{to{transform:rotate(360deg)}}@keyframes progress-steps-pulse{50%{opacity:.35}}@media (prefers-reduced-motion:reduce){.shimmer,.headline-text.entering,.sub-step-text.entering,.details,.chevron,.spinner,.step-dot{transition:none;animation:none}.leaving{display:none}}@media (forced-colors:active){.shimmer{animation:none;-webkit-mask-image:none;mask-image:none}.spinner{forced-color-adjust:none}}:host{--progress-steps-font-size:var(--luzmo-font-size);--progress-steps-line-height:1.5;--progress-steps-font-color:color-mix(in oklch, var(--luzmo-font-color) 65%, var(--luzmo-font-color-extra-dimmed));--progress-steps-font-color-dimmed:color-mix(in oklch, var(--luzmo-font-color) 35%, var(--luzmo-font-color-extra-dimmed));--progress-steps-error-color:var(--luzmo-negative-color);--progress-steps-warning-color:var(--luzmo-notice-color);--progress-steps-success-color:var(--luzmo-positive-color);--progress-steps-substep-connector-color:var(--luzmo-border-color-down);--progress-steps-hover-background:var(--luzmo-background-color-hover);--progress-steps-border-radius:var(--luzmo-border-radius);--progress-steps-focus-ring-width:var(--luzmo-indicator-width);--progress-steps-focus-ring-gap:var(--luzmo-indicator-gap);--progress-steps-focus-ring-color:var(--luzmo-indicator-color);--progress-steps-min-height:var(--luzmo-component-height-s);--progress-steps-gap:calc(var(--luzmo-spacing-2) + var(--luzmo-spacing-1));--progress-steps-padding-inline:var(--luzmo-spacing-2);--progress-steps-step-spacing:var(--luzmo-spacing-1);--progress-steps-icon-size:var(--luzmo-icon-size-m);--progress-steps-chevron-size:var(--luzmo-icon-size-s);--progress-steps-icon-offset:.04em;--progress-steps-font-size-small:var(--luzmo-font-size-s);--progress-steps-details-line-height:1.4;--progress-steps-marker-size:.8em;--progress-steps-dot-size:calc(var(--luzmo-spacing-2) + var(--luzmo-spacing-1));--progress-steps-substep-indent:var(--luzmo-spacing-4);--progress-steps-transition-duration:.25s;--progress-steps-shimmer-duration:1.8s;--progress-steps-shimmer-angle:105deg;--progress-steps-line-block-size:calc(var(--luzmo-progress-steps-font-size,var(--progress-steps-font-size)) * var(--progress-steps-line-height));--progress-steps-sub-step-block-size:calc(var(--luzmo-progress-steps-font-size-small,var(--progress-steps-font-size-small)) * var(--progress-steps-line-height));--progress-steps-spinner-duration:.9s}:host([size=s]){--progress-steps-font-size:var(--luzmo-font-size-s);--progress-steps-font-size-small:var(--luzmo-font-size-s);--progress-steps-icon-size:var(--luzmo-icon-size-s);--progress-steps-chevron-size:var(--luzmo-icon-size-xs);--progress-steps-min-height:var(--luzmo-component-height-xs);--progress-steps-gap:var(--luzmo-spacing-2)}:host([size=l]){--progress-steps-font-size:var(--luzmo-font-size-l);--progress-steps-font-size-small:var(--luzmo-font-size-m);--progress-steps-icon-size:var(--luzmo-icon-size-l);--progress-steps-chevron-size:var(--luzmo-icon-size-m);--progress-steps-min-height:var(--luzmo-component-height);--progress-steps-step-spacing:var(--luzmo-spacing-2)}:host([size=xl]){--progress-steps-font-size:var(--luzmo-font-size-xl);--progress-steps-font-size-small:var(--luzmo-font-size-l);--progress-steps-icon-size:var(--luzmo-icon-size-xl);--progress-steps-chevron-size:var(--luzmo-icon-size-l);--progress-steps-min-height:var(--luzmo-component-height-l);--progress-steps-gap:var(--luzmo-spacing-3);--progress-steps-step-spacing:var(--luzmo-spacing-2)}:host([dir=rtl]){--progress-steps-shimmer-angle:255deg}.step{--progress-steps-marker-center:calc(var(--progress-steps-step-spacing) + .5em * var(--progress-steps-details-line-height));--progress-steps-marker-radius:calc(var(--progress-steps-dot-size) / 2)}.step-error{--progress-steps-marker-radius:calc(var(--progress-steps-marker-size) / 2)}@media (forced-colors:active){:host{--highcontrast-progress-steps-focus-ring-color:Highlight;--highcontrast-progress-steps-spinner-track-color:GrayText;--highcontrast-progress-steps-spinner-color:CanvasText}}", O = {
|
|
70
|
+
condensedSingular: "Worked through {{count}} step",
|
|
71
|
+
condensedPlural: "Worked through {{count}} steps",
|
|
72
|
+
failedSingular: "{{count}} failed",
|
|
73
|
+
failedPlural: "{{count}} failed",
|
|
74
|
+
stepInProgress: "Step in progress",
|
|
75
|
+
stepPending: "Step pending",
|
|
76
|
+
stepCompleted: "Step completed",
|
|
77
|
+
stepFailed: "Step failed"
|
|
78
|
+
}, k = 500, A = 800, j = 1e3, M = 250, N = {
|
|
79
|
+
mainStep: null,
|
|
80
|
+
subStep: null
|
|
81
|
+
}, P = (e, t) => e?.mainStep === t.mainStep && e?.subStep === t.subStep, F = class extends n(e, {
|
|
82
|
+
defaultSize: "m",
|
|
83
|
+
validSizes: [
|
|
84
|
+
"s",
|
|
85
|
+
"m",
|
|
86
|
+
"l",
|
|
87
|
+
"xl"
|
|
88
|
+
]
|
|
89
|
+
}) {
|
|
90
|
+
constructor(...e) {
|
|
91
|
+
super(...e), this.progress = null, this.locale = "en", this.collapsed = !1, this.displayMode = "detailed", this.condensed = !1, this.labels = { ...O }, this.noAnimate = !1, this.open = !1, this._phase = "idle", this._current = null, this._leaving = null, this._subStepTransition = null, this._announcement = "", this._languageResolver = new i(this), this._pending = null, this._shownAt = 0;
|
|
92
|
+
}
|
|
93
|
+
static get styles() {
|
|
94
|
+
let e = super.styles;
|
|
95
|
+
return [...Array.isArray(e) ? e : e ? [e] : [], s(D)];
|
|
96
|
+
}
|
|
97
|
+
connectedCallback() {
|
|
98
|
+
super.connectedCallback(), this.hasUpdated && this._syncPhase();
|
|
99
|
+
}
|
|
100
|
+
disconnectedCallback() {
|
|
101
|
+
super.disconnectedCallback(), this._clearTimers(), this._leaving = null, this._subStepTransition = null;
|
|
102
|
+
}
|
|
103
|
+
willUpdate(e) {
|
|
104
|
+
super.willUpdate(e), e.has(r) && (this._numberFormatter = void 0), e.has("progress") ? (e.get("progress")?.id !== this.progress?.id && (this._resetRun(), this.hasUpdated && (this.open = !1)), this._syncPhase()) : (e.has("collapsed") && this.collapsed || e.has("locale")) && this._syncPhase();
|
|
105
|
+
}
|
|
106
|
+
get _labels() {
|
|
107
|
+
return {
|
|
108
|
+
...O,
|
|
109
|
+
...this.labels
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
_syncPhase() {
|
|
113
|
+
if (!x(this.progress)) {
|
|
114
|
+
this._resetRun();
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
let e = T(this.progress) ? null : S(this.progress);
|
|
118
|
+
if (e) {
|
|
119
|
+
this._clearSettleTimer(), this._phase = "running", this._queue(e);
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
if (this._phase === "done") return;
|
|
123
|
+
let t = this.collapsed || T(this.progress);
|
|
124
|
+
if (this._phase === "idle") {
|
|
125
|
+
(t || w(this.progress)) && this._finish();
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
if (t) {
|
|
129
|
+
this._finish();
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
this._settleTimer ??= setTimeout(() => {
|
|
133
|
+
this._settleTimer = void 0, this._finish();
|
|
134
|
+
}, A);
|
|
135
|
+
}
|
|
136
|
+
_queue(e) {
|
|
137
|
+
let t = {
|
|
138
|
+
mainStep: E(e.mainStep, this.locale),
|
|
139
|
+
subStep: e.subStep ? E(e.subStep, this.locale) : null
|
|
140
|
+
};
|
|
141
|
+
if (P(this._current, t)) {
|
|
142
|
+
this._pending = null, this._clearDwellTimer();
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
this._pending = t;
|
|
146
|
+
let n = this._current ? this._shownAt + k - Date.now() : 0;
|
|
147
|
+
this.noAnimate || n <= 0 ? this._showPending() : this._dwellTimer ??= setTimeout(() => {
|
|
148
|
+
this._dwellTimer = void 0, this._showPending();
|
|
149
|
+
}, n);
|
|
150
|
+
}
|
|
151
|
+
_showPending() {
|
|
152
|
+
let e = this._pending;
|
|
153
|
+
this._pending = null, e && this._phase === "running" && (this._show(e), this._announce(e.mainStep));
|
|
154
|
+
}
|
|
155
|
+
_finish() {
|
|
156
|
+
let e = this._phase === "running";
|
|
157
|
+
this._clearDwellTimer(), this._clearSettleTimer(), this._pending = null, this._phase = "done", this._show(N), e && this._announce(this._summaryText());
|
|
158
|
+
}
|
|
159
|
+
_show(e) {
|
|
160
|
+
let t = this._current;
|
|
161
|
+
t && !this.noAnimate && (t.mainStep !== null && t.mainStep === e.mainStep ? this._subStepTransition = { leaving: t.subStep } : (this._leaving = t, this._subStepTransition = null), clearTimeout(this._leaveTimer), this._leaveTimer = setTimeout(() => {
|
|
162
|
+
this._leaving = null, this._subStepTransition = null;
|
|
163
|
+
}, M)), this._current = e, this._shownAt = Date.now();
|
|
164
|
+
}
|
|
165
|
+
_announce(e) {
|
|
166
|
+
clearTimeout(this._announceTimer), this._announceTimer = setTimeout(() => {
|
|
167
|
+
this._announcement = e;
|
|
168
|
+
}, j);
|
|
169
|
+
}
|
|
170
|
+
_resetRun() {
|
|
171
|
+
this._clearTimers(), this._phase = "idle", this._current = null, this._leaving = null, this._subStepTransition = null, this._pending = null, this._announcement = "";
|
|
172
|
+
}
|
|
173
|
+
_clearDwellTimer() {
|
|
174
|
+
clearTimeout(this._dwellTimer), this._dwellTimer = void 0;
|
|
175
|
+
}
|
|
176
|
+
_clearSettleTimer() {
|
|
177
|
+
clearTimeout(this._settleTimer), this._settleTimer = void 0;
|
|
178
|
+
}
|
|
179
|
+
_clearTimers() {
|
|
180
|
+
this._clearDwellTimer(), this._clearSettleTimer(), clearTimeout(this._leaveTimer), clearTimeout(this._announceTimer);
|
|
181
|
+
}
|
|
182
|
+
_formatCount(e, t) {
|
|
183
|
+
return e.replaceAll("{{count}}", this._numberFormat.format(t));
|
|
184
|
+
}
|
|
185
|
+
get _numberFormat() {
|
|
186
|
+
if (!this._numberFormatter) try {
|
|
187
|
+
this._numberFormatter = new Intl.NumberFormat(this._languageResolver.language);
|
|
188
|
+
} catch {
|
|
189
|
+
this._numberFormatter = new Intl.NumberFormat();
|
|
190
|
+
}
|
|
191
|
+
return this._numberFormatter;
|
|
192
|
+
}
|
|
193
|
+
_summaryText() {
|
|
194
|
+
let e = this.progress?.children?.length ?? 0, t = this._labels;
|
|
195
|
+
return this._formatCount(e === 1 ? t.condensedSingular : t.condensedPlural, e);
|
|
196
|
+
}
|
|
197
|
+
_setOpen(e) {
|
|
198
|
+
this.open = e, this.dispatchEvent(new CustomEvent(e ? "luzmo-step-expanded" : "luzmo-step-collapsed", {
|
|
199
|
+
bubbles: !0,
|
|
200
|
+
composed: !0,
|
|
201
|
+
detail: { nodeId: this.progress?.id ?? "" }
|
|
202
|
+
}));
|
|
203
|
+
}
|
|
204
|
+
handleToggle() {
|
|
205
|
+
this._setOpen(!this.open);
|
|
206
|
+
}
|
|
207
|
+
handleKeydown(e) {
|
|
208
|
+
e.key === "Escape" && this.open && (e.preventDefault(), this._setOpen(!1));
|
|
209
|
+
}
|
|
210
|
+
_statusLabel(e) {
|
|
211
|
+
let t = this._labels;
|
|
212
|
+
switch (e) {
|
|
213
|
+
case "inProgress": return t.stepInProgress;
|
|
214
|
+
case "success": return t.stepCompleted;
|
|
215
|
+
case "error": return t.stepFailed;
|
|
216
|
+
default: return t.stepPending;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
_renderStatusIcon(e) {
|
|
220
|
+
return e ? a`<span
|
|
221
|
+
class="status-icon status-icon-failed"
|
|
222
|
+
aria-hidden="true"
|
|
223
|
+
>${m(u)}</span
|
|
224
|
+
>` : this._phase === "running" ? a`<span class="status-icon" aria-hidden="true"
|
|
225
|
+
><span class="spinner"></span
|
|
226
|
+
></span>` : a`<span
|
|
227
|
+
class="status-icon status-icon-finished"
|
|
228
|
+
aria-hidden="true"
|
|
229
|
+
>${m(f)}</span
|
|
230
|
+
>`;
|
|
231
|
+
}
|
|
232
|
+
_renderContent({ mainStep: e, subStep: t }, n = null) {
|
|
233
|
+
if (e === null) return a`<span class="main-step">${this._summaryText()}</span>`;
|
|
234
|
+
let r = n?.leaving ?? null;
|
|
235
|
+
return a`<span class="main-step">${e}</span>
|
|
236
|
+
<span class="sub-step"
|
|
237
|
+
><span class="sub-step-texts"
|
|
238
|
+
>${r === null ? o : a`<span class="sub-step-text leaving" aria-hidden="true"
|
|
239
|
+
>${r}</span
|
|
240
|
+
>`}${t === null ? o : _(t, a`<span
|
|
241
|
+
class=${h({
|
|
242
|
+
"sub-step-text": !0,
|
|
243
|
+
entering: n !== null
|
|
244
|
+
})}
|
|
245
|
+
>${t}</span
|
|
246
|
+
>`)}</span
|
|
247
|
+
></span
|
|
248
|
+
>`;
|
|
249
|
+
}
|
|
250
|
+
_renderStepMarker(e) {
|
|
251
|
+
return a`<span
|
|
252
|
+
class="step-marker"
|
|
253
|
+
role="img"
|
|
254
|
+
aria-label=${this._statusLabel(e)}
|
|
255
|
+
>${e === "error" ? m(p) : a`<span class="step-dot"></span>`}</span
|
|
256
|
+
>`;
|
|
257
|
+
}
|
|
258
|
+
_renderSubstep(e) {
|
|
259
|
+
return a`<li
|
|
260
|
+
class=${h({
|
|
261
|
+
substep: !0,
|
|
262
|
+
[`substep-${e.status}`]: !0
|
|
263
|
+
})}
|
|
264
|
+
>
|
|
265
|
+
${e.status === "error" ? a`<span
|
|
266
|
+
class="substep-icon"
|
|
267
|
+
role="img"
|
|
268
|
+
aria-label=${this._labels.stepFailed}
|
|
269
|
+
>${m(p)}</span
|
|
270
|
+
>` : o}<span class="substep-label"
|
|
271
|
+
>${E(e, this.locale)}</span
|
|
272
|
+
>
|
|
273
|
+
${e.children?.length ? this._renderSubsteps(e.children) : o}
|
|
274
|
+
</li>`;
|
|
275
|
+
}
|
|
276
|
+
_renderSubsteps(e) {
|
|
277
|
+
return a`<ul class="substeps">
|
|
278
|
+
${g(e, (e) => e.id, (e) => this._renderSubstep(e))}
|
|
279
|
+
</ul>`;
|
|
280
|
+
}
|
|
281
|
+
_renderStep(e, t) {
|
|
282
|
+
return a`<li
|
|
283
|
+
class=${h({
|
|
284
|
+
step: !0,
|
|
285
|
+
[`step-${e.status}`]: !0
|
|
286
|
+
})}
|
|
287
|
+
>
|
|
288
|
+
${this._renderStepMarker(e.status)}
|
|
289
|
+
<span class="step-label"
|
|
290
|
+
>${E(e, this.locale)}</span
|
|
291
|
+
>
|
|
292
|
+
${t && e.children?.length ? this._renderSubsteps(e.children) : o}
|
|
293
|
+
</li>`;
|
|
294
|
+
}
|
|
295
|
+
_renderDetails() {
|
|
296
|
+
let e = this.displayMode !== "compact";
|
|
297
|
+
return a`<div id="details" class="details">
|
|
298
|
+
<ol class="steps">
|
|
299
|
+
${g(this.progress?.children ?? [], (e) => e.id, (t) => this._renderStep(t, e))}
|
|
300
|
+
</ol>
|
|
301
|
+
</div>`;
|
|
302
|
+
}
|
|
303
|
+
render() {
|
|
304
|
+
if (this._phase === "idle" || !this._current) return o;
|
|
305
|
+
let e = C(this.progress), t = this._labels, n = this._phase === "running" && !this.noAnimate;
|
|
306
|
+
return a`
|
|
307
|
+
<button
|
|
308
|
+
type="button"
|
|
309
|
+
class="summary"
|
|
310
|
+
data-state=${this._phase}
|
|
311
|
+
aria-expanded=${this.open ? "true" : "false"}
|
|
312
|
+
aria-controls=${this.open ? "details" : o}
|
|
313
|
+
@click=${this.handleToggle}
|
|
314
|
+
@keydown=${this.handleKeydown}
|
|
315
|
+
>
|
|
316
|
+
${this._renderStatusIcon(e > 0 || this.progress?.status === "error")}
|
|
317
|
+
<span class=${h({
|
|
318
|
+
headline: !0,
|
|
319
|
+
shimmer: n
|
|
320
|
+
})}>
|
|
321
|
+
${this._leaving ? a`<span class="headline-text leaving" aria-hidden="true"
|
|
322
|
+
>${this._renderContent(this._leaving)}</span
|
|
323
|
+
>` : o}
|
|
324
|
+
${_(this._current.mainStep ?? N, a`<span
|
|
325
|
+
class=${h({
|
|
326
|
+
"headline-text": !0,
|
|
327
|
+
entering: this._leaving !== null
|
|
328
|
+
})}
|
|
329
|
+
>${this._renderContent(this._current, this._subStepTransition)}</span
|
|
330
|
+
>`)}
|
|
331
|
+
</span>
|
|
332
|
+
${e > 0 ? a`<span class="failed-count"
|
|
333
|
+
>${this._formatCount(e === 1 ? t.failedSingular : t.failedPlural, e)}</span
|
|
334
|
+
>` : o}
|
|
335
|
+
<span class="chevron" aria-hidden="true"
|
|
336
|
+
>${m(d)}</span
|
|
337
|
+
>
|
|
338
|
+
</button>
|
|
339
|
+
${this.open ? this._renderDetails() : o}
|
|
340
|
+
<span class="visually-hidden" role="status">${this._announcement}</span>
|
|
341
|
+
`;
|
|
342
|
+
}
|
|
343
|
+
};
|
|
344
|
+
//#endregion
|
|
345
|
+
//#region src/components/progress-steps/index.ts
|
|
346
|
+
t([c({ attribute: !1 })], F.prototype, "progress", void 0), t([c({
|
|
347
|
+
type: String,
|
|
348
|
+
reflect: !0
|
|
349
|
+
})], F.prototype, "locale", void 0), t([c({
|
|
350
|
+
type: Boolean,
|
|
351
|
+
reflect: !0
|
|
352
|
+
})], F.prototype, "collapsed", void 0), t([c({
|
|
353
|
+
type: String,
|
|
354
|
+
attribute: "display-mode",
|
|
355
|
+
reflect: !0
|
|
356
|
+
})], F.prototype, "displayMode", void 0), t([c({
|
|
357
|
+
type: Boolean,
|
|
358
|
+
reflect: !0
|
|
359
|
+
})], F.prototype, "condensed", void 0), t([c({ attribute: !1 })], F.prototype, "labels", void 0), t([c({
|
|
360
|
+
type: Boolean,
|
|
361
|
+
attribute: "no-animate",
|
|
362
|
+
reflect: !0
|
|
363
|
+
})], F.prototype, "noAnimate", void 0), t([c({
|
|
364
|
+
type: Boolean,
|
|
365
|
+
reflect: !0
|
|
366
|
+
})], F.prototype, "open", void 0), t([l()], F.prototype, "_phase", void 0), t([l()], F.prototype, "_current", void 0), t([l()], F.prototype, "_leaving", void 0), t([l()], F.prototype, "_subStepTransition", void 0), t([l()], F.prototype, "_announcement", void 0), typeof customElements < "u" && !customElements.get("luzmo-progress-steps") && customElements.define("luzmo-progress-steps", F);
|
|
367
|
+
//#endregion
|
|
368
|
+
export { O as n, F as t };
|