@zitadel/components 0.1.0-alpha.9 → 1.0.0-alpha.21

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.
Files changed (44) hide show
  1. package/README.md +135 -72
  2. package/dist/atoms/index.d.mts +2 -2
  3. package/dist/atoms/index.mjs +2 -2
  4. package/dist/atoms-DSxjEHca.mjs +2268 -0
  5. package/dist/atoms-DSxjEHca.mjs.map +1 -0
  6. package/dist/default-Dnjq9iBt.mjs +6 -0
  7. package/dist/default-Dnjq9iBt.mjs.map +1 -0
  8. package/dist/index-BlxTxXK8.d.mts +449 -0
  9. package/dist/index-BlxTxXK8.d.mts.map +1 -0
  10. package/dist/index-DFdR16-D.d.mts +1599 -0
  11. package/dist/index-DFdR16-D.d.mts.map +1 -0
  12. package/dist/index-Dx8rvpNs.d.mts +14844 -0
  13. package/dist/index-Dx8rvpNs.d.mts.map +1 -0
  14. package/dist/index.d.mts +22 -8
  15. package/dist/index.d.mts.map +1 -1
  16. package/dist/index.mjs +5 -5
  17. package/dist/jsx.d.ts +67 -0
  18. package/dist/manifests.d.mts.map +1 -1
  19. package/dist/manifests.mjs +4 -2
  20. package/dist/manifests.mjs.map +1 -1
  21. package/dist/orchestrator/index.d.mts +3 -3
  22. package/dist/orchestrator/index.mjs +3 -3
  23. package/dist/orchestrator-DG-YwFFE.mjs +5008 -0
  24. package/dist/orchestrator-DG-YwFFE.mjs.map +1 -0
  25. package/dist/standalone.mjs +9172 -5871
  26. package/dist/tokens/index.d.mts +1 -1
  27. package/dist/tokens/index.mjs +1 -1
  28. package/dist/tokens-T4N9VJz3.mjs +452 -0
  29. package/dist/tokens-T4N9VJz3.mjs.map +1 -0
  30. package/package.json +13 -12
  31. package/dist/atoms-B25wiDqb.mjs +0 -1464
  32. package/dist/atoms-B25wiDqb.mjs.map +0 -1
  33. package/dist/default-Cpl78hQN.mjs +0 -6
  34. package/dist/default-Cpl78hQN.mjs.map +0 -1
  35. package/dist/index-DB_JTtln.d.mts +0 -1000
  36. package/dist/index-DB_JTtln.d.mts.map +0 -1
  37. package/dist/index-DVDCrfkv.d.mts +0 -7396
  38. package/dist/index-DVDCrfkv.d.mts.map +0 -1
  39. package/dist/index-EJengPPu.d.mts +0 -249
  40. package/dist/index-EJengPPu.d.mts.map +0 -1
  41. package/dist/orchestrator-CW9zixuw.mjs +0 -3362
  42. package/dist/orchestrator-CW9zixuw.mjs.map +0 -1
  43. package/dist/tokens-BQ_augxi.mjs +0 -244
  44. package/dist/tokens-BQ_augxi.mjs.map +0 -1
@@ -0,0 +1,2268 @@
1
+ import { n as cssVars } from "./tokens-T4N9VJz3.mjs";
2
+ import { LitElement, css, html, nothing, unsafeCSS } from "lit";
3
+ import { customElement, property, query, state } from "lit/decorators.js";
4
+ import { classMap } from "lit/directives/class-map.js";
5
+ import { unsafeSVG } from "lit/directives/unsafe-svg.js";
6
+ import { ArrowLeft, ArrowRight, Check, ChevronDown, CircleAlert, Eye, EyeOff, Info, KeyRound, LoaderCircle, Plus, TriangleAlert, User, X } from "lucide";
7
+ import { ifDefined } from "lit/directives/if-defined.js";
8
+ import { live } from "lit/directives/live.js";
9
+ //#region src/atoms/zl-alert.css?inline
10
+ var zl_alert_default = ":host {\n display: block;\n}\n\n.zr-alert {\n align-items: flex-start;\n gap: var(--zl-spacing-2);\n padding-block: var(--zl-spacing-3);\n padding-inline: var(--zl-spacing-4);\n background: var(--zl-muted);\n color: var(--zl-foreground);\n border: 1px solid var(--zl-border);\n border-radius: var(--zl-radius-lg);\n font-family: var(--zl-font-family-sans);\n font-size: var(--zl-text-sm-size);\n line-height: var(--zl-text-sm-leading);\n display: flex;\n}\n\n.zr-alert__icon {\n color: currentColor;\n flex-shrink: 0;\n padding-block-start: var(--zl-spacing-0-5);\n}\n\n.zr-alert__body {\n gap: var(--zl-spacing-0-5);\n flex-direction: column;\n flex: auto;\n min-width: 0;\n display: flex;\n}\n\n.zr-alert__title {\n font-family: var(--zl-font-family-heading);\n color: var(--zl-foreground);\n}\n\n.zr-alert__message {\n color: var(--zl-muted-foreground);\n margin: 0;\n}\n\n.zr-alert:not(:has(.zr-alert__title)) .zr-alert__message {\n color: var(--zl-foreground);\n}\n\n.zr-alert--error, .zr-alert--error .zr-alert__title {\n color: var(--zl-destructive);\n}\n\n.zr-alert--success .zr-alert__icon {\n color: var(--zl-success);\n}\n\n.zr-alert--warning .zr-alert__icon, .zr-alert--info .zr-alert__icon {\n color: var(--zl-muted-foreground);\n}\n\n.zr-alert__close {\n all: unset;\n width: var(--zl-spacing-6);\n height: var(--zl-spacing-6);\n border-radius: var(--zl-radius-md);\n color: var(--zl-muted-foreground);\n cursor: pointer;\n transition: background-color var(--zl-duration-fast) var(--zl-easing-standard);\n flex-shrink: 0;\n justify-content: center;\n align-items: center;\n display: inline-flex;\n}\n\n.zr-alert__close .zr-icon {\n --zl-icon-size: var(--zl-spacing-4);\n width: var(--zl-spacing-4);\n height: var(--zl-spacing-4);\n}\n\n.zr-alert__close:hover {\n background: var(--zl-accent);\n color: var(--zl-accent-foreground);\n}\n\n.zr-alert__close:focus-visible {\n outline: var(--zl-focus-width) solid var(--zl-ring);\n outline-offset: var(--zl-focus-offset);\n}\n";
11
+ //#endregion
12
+ //#region src/internal/emit.ts
13
+ /**
14
+ * Dispatch a custom event with the project-wide defaults (`bubbles` +
15
+ * `composed`) so it crosses the shadow boundary and reaches delegated
16
+ * listeners — whether it's an atom's `zl-*` event or the orchestrator's
17
+ * public `zitadel-*` event.
18
+ *
19
+ * Centralising the dispatch shape keeps every event contract identical and
20
+ * removes the repeated `new CustomEvent(..., { bubbles: true, composed: true,
21
+ * detail })` boilerplate.
22
+ */
23
+ function emit(host, type, detail) {
24
+ return host.dispatchEvent(new CustomEvent(type, {
25
+ bubbles: true,
26
+ composed: true,
27
+ detail
28
+ }));
29
+ }
30
+ //#endregion
31
+ //#region src/styles/tokens.ts
32
+ function wrap(node) {
33
+ if (typeof node === "string") return unsafeCSS(node);
34
+ const out = {};
35
+ for (const [key, value] of Object.entries(node)) out[key] = wrap(value);
36
+ return out;
37
+ }
38
+ const t = wrap(cssVars);
39
+ //#endregion
40
+ //#region src/styles/base.ts
41
+ /**
42
+ * Shared shadow-root base styles. Each atom prepends this fragment to its own
43
+ * `static styles` so font/colour inheritance, box-sizing, and resets stay
44
+ * consistent without forcing a global stylesheet on the host page.
45
+ */
46
+ const baseHostStyles = css`
47
+ :host {
48
+ box-sizing: border-box;
49
+ font-family: ${t.font.family.sans};
50
+ color: ${t.theme.foreground};
51
+ line-height: 1.5;
52
+ -webkit-font-smoothing: antialiased;
53
+ }
54
+ *,
55
+ *::before,
56
+ *::after {
57
+ box-sizing: inherit;
58
+ }
59
+ `;
60
+ //#endregion
61
+ //#region src/styles/focus-ring.ts
62
+ /**
63
+ * Visible focus indicator shared across interactive atoms. Applied via
64
+ * `&:focus-visible { ${focusVisibleStyles} }`. The colour is the `ring` role —
65
+ * the design system's one focus colour, mode-aware so the ring stays visible on
66
+ * a light surface as well as a dark one.
67
+ */
68
+ const focusVisibleStyles = css`
69
+ outline: ${t.focus.width} solid ${t.theme.ring};
70
+ outline-offset: ${t.focus.offset};
71
+ `;
72
+ //#endregion
73
+ //#region src/styles/surface.ts
74
+ /**
75
+ * Wrap an atom's co-located `.css` file for Lit `static styles`. Import it as
76
+ * `./zl-<atom>.css?inline`; `@tsdown/css` inlines the string when `components`
77
+ * is built, and Vite does the same in dev and vitest.
78
+ */
79
+ function surfaceStyles(...cssChunks) {
80
+ return cssChunks.map((chunk) => unsafeCSS(chunk));
81
+ }
82
+ //#endregion
83
+ //#region src/atoms/zl-icon.css?inline
84
+ var zl_icon_default = ":host {\n color: inherit;\n display: contents;\n}\n\n.zr-icon {\n width: var(--zl-icon-size, 1.5rem);\n height: var(--zl-icon-size, 1.5rem);\n justify-content: center;\n align-items: center;\n display: inline-flex;\n}\n\n.zr-icon--16 {\n --zl-icon-size: 1rem;\n}\n\n.zr-icon--24 {\n --zl-icon-size: 1.5rem;\n}\n\n.zr-icon--tone-error {\n color: var(--zl-destructive);\n}\n\n.zr-icon--tone-success {\n color: var(--zl-success);\n}\n\n.zr-icon--tone-disabled {\n color: var(--zl-muted-foreground);\n}\n\n.zr-icon svg {\n width: 100%;\n height: 100%;\n display: block;\n}\n\n.zr-icon--spin svg {\n animation: .8s linear infinite zr-icon-spin;\n}\n\n@keyframes zr-icon-spin {\n to {\n transform: rotate(360deg);\n }\n}\n";
85
+ //#endregion
86
+ //#region \0@oxc-project+runtime@0.127.0/helpers/decorate.js
87
+ function __decorate(decorators, target, key, desc) {
88
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
89
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
90
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
91
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
92
+ }
93
+ //#endregion
94
+ //#region src/atoms/zl-icon.ts
95
+ let ZlIcon = class ZlIcon extends LitElement {
96
+ static styles = surfaceStyles(zl_icon_default);
97
+ #_name_accessor_storage = "plus";
98
+ get name() {
99
+ return this.#_name_accessor_storage;
100
+ }
101
+ set name(value) {
102
+ this.#_name_accessor_storage = value;
103
+ }
104
+ #_size_accessor_storage = "24";
105
+ get size() {
106
+ return this.#_size_accessor_storage;
107
+ }
108
+ set size(value) {
109
+ this.#_size_accessor_storage = value;
110
+ }
111
+ #_tone_accessor_storage = "default";
112
+ get tone() {
113
+ return this.#_tone_accessor_storage;
114
+ }
115
+ set tone(value) {
116
+ this.#_tone_accessor_storage = value;
117
+ }
118
+ #_spin_accessor_storage = false;
119
+ get spin() {
120
+ return this.#_spin_accessor_storage;
121
+ }
122
+ set spin(value) {
123
+ this.#_spin_accessor_storage = value;
124
+ }
125
+ #_decorative_accessor_storage = false;
126
+ get decorative() {
127
+ return this.#_decorative_accessor_storage;
128
+ }
129
+ set decorative(value) {
130
+ this.#_decorative_accessor_storage = value;
131
+ }
132
+ #_label_accessor_storage = void 0;
133
+ get label() {
134
+ return this.#_label_accessor_storage;
135
+ }
136
+ set label(value) {
137
+ this.#_label_accessor_storage = value;
138
+ }
139
+ render() {
140
+ const ariaLabel = this.label ?? DEFAULT_LABELS[this.name];
141
+ const hidden = this.decorative || !ariaLabel;
142
+ return html`
143
+ <span class=${classMap({
144
+ "zr-icon": true,
145
+ [`zr-icon--${this.size}`]: true,
146
+ [`zr-icon--tone-${this.tone}`]: this.tone !== "default",
147
+ "zr-icon--spin": this.spin
148
+ })}>
149
+ <svg
150
+ viewBox="0 0 24 24"
151
+ fill="none"
152
+ stroke="currentColor"
153
+ stroke-width="2"
154
+ stroke-linecap="round"
155
+ stroke-linejoin="round"
156
+ role=${hidden ? "presentation" : "img"}
157
+ aria-hidden=${hidden ? "true" : "false"}
158
+ aria-label=${hidden ? nothing : ariaLabel}
159
+ >${unsafeSVG(ICON_MARKUP[this.name])}</svg>
160
+ </span>
161
+ `;
162
+ }
163
+ };
164
+ __decorate([property()], ZlIcon.prototype, "name", null);
165
+ __decorate([property({ reflect: true })], ZlIcon.prototype, "size", null);
166
+ __decorate([property({ reflect: true })], ZlIcon.prototype, "tone", null);
167
+ __decorate([property({
168
+ type: Boolean,
169
+ reflect: true
170
+ })], ZlIcon.prototype, "spin", null);
171
+ __decorate([property({
172
+ type: Boolean,
173
+ reflect: true
174
+ })], ZlIcon.prototype, "decorative", null);
175
+ __decorate([property()], ZlIcon.prototype, "label", null);
176
+ ZlIcon = __decorate([customElement("zl-icon")], ZlIcon);
177
+ /** Curated mapping from our public name to a Lucide canonical icon. */
178
+ const ICON_NODES = {
179
+ plus: Plus,
180
+ "arrow-right": ArrowRight,
181
+ "arrow-left": ArrowLeft,
182
+ spinner: LoaderCircle,
183
+ check: Check,
184
+ "chevron-down": ChevronDown,
185
+ cross: X,
186
+ warning: TriangleAlert,
187
+ "alert-circle": CircleAlert,
188
+ info: Info,
189
+ passkey: KeyRound,
190
+ user: User,
191
+ eye: Eye,
192
+ "eye-off": EyeOff
193
+ };
194
+ const DEFAULT_LABELS = {
195
+ spinner: "Loading",
196
+ warning: "Warning",
197
+ "alert-circle": "Alert",
198
+ info: "Information",
199
+ passkey: "Passkey",
200
+ user: "User",
201
+ eye: "Show",
202
+ "eye-off": "Hide"
203
+ };
204
+ const ICON_MARKUP = Object.fromEntries(Object.entries(ICON_NODES).map(([name, node]) => [name, nodeToSvgMarkup(node)]));
205
+ function nodeToSvgMarkup(node) {
206
+ return node.map(([tag, attrs]) => {
207
+ return `<${tag} ${Object.entries(attrs).filter(([, value]) => value !== void 0).map(([key, value]) => `${key}="${String(value)}"`).join(" ")}/>`;
208
+ }).join("");
209
+ }
210
+ const zlIconManifest = {
211
+ tag: "zl-icon",
212
+ attrs: [
213
+ "name",
214
+ "size",
215
+ "tone",
216
+ "spin",
217
+ "decorative",
218
+ "label"
219
+ ],
220
+ parts: [],
221
+ slots: [],
222
+ events: []
223
+ };
224
+ //#endregion
225
+ //#region src/atoms/zl-alert.ts
226
+ let ZlAlert = class ZlAlert extends LitElement {
227
+ static styles = [baseHostStyles, ...surfaceStyles(zl_alert_default)];
228
+ #_severity_accessor_storage = "error";
229
+ get severity() {
230
+ return this.#_severity_accessor_storage;
231
+ }
232
+ set severity(value) {
233
+ this.#_severity_accessor_storage = value;
234
+ }
235
+ #_heading_accessor_storage = void 0;
236
+ get heading() {
237
+ return this.#_heading_accessor_storage;
238
+ }
239
+ set heading(value) {
240
+ this.#_heading_accessor_storage = value;
241
+ }
242
+ #_dismissible_accessor_storage = false;
243
+ get dismissible() {
244
+ return this.#_dismissible_accessor_storage;
245
+ }
246
+ set dismissible(value) {
247
+ this.#_dismissible_accessor_storage = value;
248
+ }
249
+ render() {
250
+ const iconName = ICON_FOR_SEVERITY[this.severity];
251
+ return html`
252
+ <div
253
+ class="zr-alert zr-alert--${this.severity}"
254
+ part="alert"
255
+ role=${this.severity === "error" ? "alert" : "status"}
256
+ aria-live=${this.severity === "error" ? "assertive" : "polite"}
257
+ >
258
+ <zl-icon class="zr-alert__icon" part="icon" name=${iconName} size="16" decorative></zl-icon>
259
+ <div class="zr-alert__body" part="body">
260
+ ${this.heading ? html`<span class="zr-alert__title" part="title">${this.heading}</span>` : null}
261
+ <div class="zr-alert__message" part="message">
262
+ <slot></slot>
263
+ </div>
264
+ </div>
265
+ ${this.dismissible ? html`<button
266
+ type="button"
267
+ class="zr-alert__close"
268
+ part="close"
269
+ aria-label="Dismiss"
270
+ @click=${this.handleDismiss}
271
+ >
272
+ <zl-icon name="cross" size="16" label="Dismiss" decorative></zl-icon>
273
+ </button>` : null}
274
+ </div>
275
+ `;
276
+ }
277
+ handleDismiss = () => {
278
+ emit(this, "zl-dismiss");
279
+ this.remove();
280
+ };
281
+ };
282
+ __decorate([property({ reflect: true })], ZlAlert.prototype, "severity", null);
283
+ __decorate([property()], ZlAlert.prototype, "heading", null);
284
+ __decorate([property({
285
+ type: Boolean,
286
+ reflect: true
287
+ })], ZlAlert.prototype, "dismissible", null);
288
+ ZlAlert = __decorate([customElement("zl-alert")], ZlAlert);
289
+ const ICON_FOR_SEVERITY = {
290
+ error: "alert-circle",
291
+ warning: "alert-circle",
292
+ success: "check",
293
+ info: "info"
294
+ };
295
+ const zlAlertManifest = {
296
+ tag: "zl-alert",
297
+ attrs: [
298
+ "severity",
299
+ "heading",
300
+ "dismissible"
301
+ ],
302
+ parts: [
303
+ "alert",
304
+ "icon",
305
+ "body",
306
+ "title",
307
+ "message",
308
+ "close"
309
+ ],
310
+ slots: [""],
311
+ events: ["zl-dismiss"]
312
+ };
313
+ //#endregion
314
+ //#region src/atoms/zl-button.css?inline
315
+ var zl_button_default = ":host {\n display: inline-flex;\n}\n\n:host([block]) {\n width: 100%;\n display: flex;\n}\n\n:host([hierarchy=\"primary\"]) {\n color: var(--zl-primary-foreground);\n}\n\n:host([hierarchy=\"secondary\"]) {\n color: var(--zl-secondary-foreground);\n}\n\n:host([hierarchy=\"text\"]) {\n color: var(--zl-foreground);\n}\n\n:host([disabled]) {\n color: var(--zl-muted-foreground);\n}\n\n::slotted([slot=\"leading\"]), ::slotted([slot=\"trailing\"]) {\n align-items: center;\n display: inline-flex;\n}\n\n.zr-btn .spinner {\n display: inline-flex;\n}\n\n:where(.zr-btn) {\n all: unset;\n box-sizing: border-box;\n cursor: pointer;\n justify-content: center;\n align-items: center;\n gap: var(--zl-spacing-1-5);\n width: max-content;\n padding-inline: var(--zl-spacing-4);\n padding-block: var(--zl-spacing-2);\n border-radius: var(--zl-radius-md);\n font-family: var(--zl-font-family-sans);\n font-weight: var(--zl-font-weight-medium);\n text-align: center;\n white-space: nowrap;\n transition: background-color var(--zl-duration-fast) var(--zl-easing-standard),\n color var(--zl-duration-fast) var(--zl-easing-standard),\n border-color var(--zl-duration-fast) var(--zl-easing-standard);\n border: 1px solid #0000;\n display: inline-flex;\n}\n\n.zr-btn--block {\n width: 100%;\n display: flex;\n}\n\n.zr-btn--medium {\n height: var(--zl-spacing-9);\n font-size: var(--zl-text-sm-size);\n line-height: var(--zl-text-sm-leading);\n}\n\n.zr-btn--small {\n height: var(--zl-spacing-8);\n padding-inline: var(--zl-spacing-3);\n font-size: var(--zl-text-sm-size);\n line-height: var(--zl-text-sm-leading);\n}\n\n.zr-btn:focus-visible, .zr-btn[data-state=\"focused\"] {\n outline: var(--zl-focus-width) solid var(--zl-ring);\n outline-offset: var(--zl-focus-offset);\n}\n\n.zr-btn--primary {\n background: var(--zl-primary);\n color: var(--zl-primary-foreground);\n}\n\n.zr-btn--secondary {\n background: var(--zl-secondary);\n color: var(--zl-secondary-foreground);\n}\n\n.zr-btn--text {\n color: var(--zl-foreground);\n background: none;\n}\n\n.zr-btn--primary:hover:not(:disabled), .zr-btn--primary[data-state=\"hovered\"]:not(:disabled) {\n background: color-mix(in srgb, var(--zl-primary) 90%, var(--zl-background));\n}\n\n.zr-btn--secondary:hover:not(:disabled), .zr-btn--secondary[data-state=\"hovered\"]:not(:disabled) {\n background: color-mix(in srgb, var(--zl-secondary) 80%, var(--zl-foreground));\n}\n\n.zr-btn--text:hover:not(:disabled), .zr-btn--text[data-state=\"hovered\"]:not(:disabled) {\n background: var(--zl-accent);\n color: var(--zl-accent-foreground);\n}\n\n.zr-btn--primary:active:not(:disabled), .zr-btn--primary[data-state=\"pressed\"]:not(:disabled) {\n background: color-mix(in srgb, var(--zl-primary) 80%, var(--zl-background));\n}\n\n.zr-btn--secondary:active:not(:disabled), .zr-btn--secondary[data-state=\"pressed\"]:not(:disabled), .zr-btn--text:active:not(:disabled), .zr-btn--text[data-state=\"pressed\"]:not(:disabled) {\n background: color-mix(in srgb, var(--zl-accent) 80%, var(--zl-foreground));\n}\n\n.zr-btn:disabled {\n cursor: not-allowed;\n opacity: .5;\n}\n";
316
+ //#endregion
317
+ //#region src/atoms/zl-button.ts
318
+ let ZlButton = class ZlButton extends LitElement {
319
+ static formAssociated = true;
320
+ static shadowRootOptions = {
321
+ ...LitElement.shadowRootOptions,
322
+ delegatesFocus: true
323
+ };
324
+ static styles = [baseHostStyles, ...surfaceStyles(zl_button_default)];
325
+ #_hierarchy_accessor_storage = "primary";
326
+ get hierarchy() {
327
+ return this.#_hierarchy_accessor_storage;
328
+ }
329
+ set hierarchy(value) {
330
+ this.#_hierarchy_accessor_storage = value;
331
+ }
332
+ #_size_accessor_storage = "medium";
333
+ get size() {
334
+ return this.#_size_accessor_storage;
335
+ }
336
+ set size(value) {
337
+ this.#_size_accessor_storage = value;
338
+ }
339
+ #_type_accessor_storage = "button";
340
+ get type() {
341
+ return this.#_type_accessor_storage;
342
+ }
343
+ set type(value) {
344
+ this.#_type_accessor_storage = value;
345
+ }
346
+ #_action_accessor_storage = void 0;
347
+ get action() {
348
+ return this.#_action_accessor_storage;
349
+ }
350
+ set action(value) {
351
+ this.#_action_accessor_storage = value;
352
+ }
353
+ #_loading_accessor_storage = false;
354
+ get loading() {
355
+ return this.#_loading_accessor_storage;
356
+ }
357
+ set loading(value) {
358
+ this.#_loading_accessor_storage = value;
359
+ }
360
+ #_disabled_accessor_storage = false;
361
+ get disabled() {
362
+ return this.#_disabled_accessor_storage;
363
+ }
364
+ set disabled(value) {
365
+ this.#_disabled_accessor_storage = value;
366
+ }
367
+ #_block_accessor_storage = false;
368
+ get block() {
369
+ return this.#_block_accessor_storage;
370
+ }
371
+ set block(value) {
372
+ this.#_block_accessor_storage = value;
373
+ }
374
+ #_label_accessor_storage = void 0;
375
+ get label() {
376
+ return this.#_label_accessor_storage;
377
+ }
378
+ set label(value) {
379
+ this.#_label_accessor_storage = value;
380
+ }
381
+ #_testId_accessor_storage = void 0;
382
+ get testId() {
383
+ return this.#_testId_accessor_storage;
384
+ }
385
+ set testId(value) {
386
+ this.#_testId_accessor_storage = value;
387
+ }
388
+ #_forcedState_accessor_storage = null;
389
+ get forcedState() {
390
+ return this.#_forcedState_accessor_storage;
391
+ }
392
+ set forcedState(value) {
393
+ this.#_forcedState_accessor_storage = value;
394
+ }
395
+ internals;
396
+ constructor() {
397
+ super();
398
+ this.internals = this.attachInternals();
399
+ }
400
+ connectedCallback() {
401
+ super.connectedCallback();
402
+ this.addEventListener("click", this.handleHostClick);
403
+ }
404
+ disconnectedCallback() {
405
+ this.removeEventListener("click", this.handleHostClick);
406
+ super.disconnectedCallback();
407
+ }
408
+ focus(options) {
409
+ this.shadowRoot?.querySelector("button")?.focus(options);
410
+ }
411
+ render() {
412
+ const hierarchy = this.stringOption("hierarchy", this.hierarchy, "primary");
413
+ const size = this.stringOption("size", this.size, "medium");
414
+ const type = this.buttonType();
415
+ const loading = this.booleanOption("loading", this.loading);
416
+ const disabled = this.booleanOption("disabled", this.disabled);
417
+ const block = this.booleanOption("block", this.block);
418
+ const label = this.stringOption("label", this.label);
419
+ const blocked = disabled || loading;
420
+ const body = label !== void 0 ? html`<span>${label}</span>` : html`<slot></slot>`;
421
+ return html`
422
+ <button
423
+ class=${classMap({
424
+ root: true,
425
+ "zr-btn": true,
426
+ [`zr-btn--${hierarchy}`]: true,
427
+ [`zr-btn--${size}`]: true,
428
+ "zr-btn--block": block
429
+ })}
430
+ part="root"
431
+ type=${type}
432
+ ?disabled=${blocked}
433
+ aria-busy=${loading ? "true" : "false"}
434
+ data-testid=${this.nativeButtonTestId() ?? nothing}
435
+ data-state=${this.forcedState ?? nothing}
436
+ @click=${this.handleClick}
437
+ >
438
+ <slot name="leading"></slot>
439
+ ${body}
440
+ ${loading ? html`<span class="spinner" part="spinner"><zl-icon name="spinner" size=${size === "small" ? "16" : "24"} spin decorative></zl-icon></span>` : html`<slot name="trailing"></slot>`}
441
+ </button>
442
+ `;
443
+ }
444
+ handleClick = (event) => {
445
+ this.activate(event);
446
+ };
447
+ handleHostClick = (event) => {
448
+ if (event.composedPath()[0] !== this) return;
449
+ this.activate(event);
450
+ };
451
+ nativeButtonTestId() {
452
+ const testId = this.stringOption("data-testid", this.testId);
453
+ if (testId) return `${testId}-button`;
454
+ const action = this.buttonAction();
455
+ return action ? `zitadel-action-${action}` : void 0;
456
+ }
457
+ buttonType() {
458
+ const type = this.stringOption("type", this.type, "button");
459
+ return type === "submit" || type === "reset" ? type : "button";
460
+ }
461
+ buttonAction() {
462
+ return this.stringOption("action", this.action);
463
+ }
464
+ activate(event) {
465
+ const type = this.buttonType();
466
+ const action = this.buttonAction();
467
+ if (this.booleanOption("disabled", this.disabled) || this.booleanOption("loading", this.loading)) {
468
+ event.preventDefault();
469
+ event.stopImmediatePropagation();
470
+ return;
471
+ }
472
+ const form = this.internals.form;
473
+ if (type === "submit" && form) {
474
+ event.preventDefault();
475
+ form.requestSubmit();
476
+ return;
477
+ }
478
+ if (type === "reset" && form) {
479
+ event.preventDefault();
480
+ form.reset();
481
+ }
482
+ emit(this, "zl-submit", { action: action ?? null });
483
+ }
484
+ stringOption(attribute, value, fallback) {
485
+ if (typeof value === "string" && value.length > 0) return value;
486
+ const attr = this.getAttribute(attribute);
487
+ if (attr !== null && attr.length > 0) return attr;
488
+ return fallback;
489
+ }
490
+ booleanOption(attribute, value) {
491
+ return value === true || this.hasAttribute(attribute);
492
+ }
493
+ };
494
+ __decorate([property({ reflect: true })], ZlButton.prototype, "hierarchy", null);
495
+ __decorate([property({ reflect: true })], ZlButton.prototype, "size", null);
496
+ __decorate([property()], ZlButton.prototype, "type", null);
497
+ __decorate([property()], ZlButton.prototype, "action", null);
498
+ __decorate([property({ type: Boolean })], ZlButton.prototype, "loading", null);
499
+ __decorate([property({
500
+ type: Boolean,
501
+ reflect: true
502
+ })], ZlButton.prototype, "disabled", null);
503
+ __decorate([property({
504
+ type: Boolean,
505
+ reflect: true
506
+ })], ZlButton.prototype, "block", null);
507
+ __decorate([property()], ZlButton.prototype, "label", null);
508
+ __decorate([property({ attribute: "data-testid" })], ZlButton.prototype, "testId", null);
509
+ __decorate([property({ attribute: "data-state" })], ZlButton.prototype, "forcedState", null);
510
+ ZlButton = __decorate([customElement("zl-button")], ZlButton);
511
+ const zlButtonManifest = {
512
+ tag: "zl-button",
513
+ consumes: { action: {
514
+ kind: "submit",
515
+ required: false
516
+ } },
517
+ attrs: [
518
+ "hierarchy",
519
+ "size",
520
+ "type",
521
+ "action",
522
+ "loading",
523
+ "disabled",
524
+ "block",
525
+ "label",
526
+ "data-testid"
527
+ ],
528
+ parts: ["root", "spinner"],
529
+ slots: [
530
+ "",
531
+ "leading",
532
+ "trailing"
533
+ ],
534
+ events: ["zl-submit"]
535
+ };
536
+ //#endregion
537
+ //#region src/atoms/zl-card.css?inline
538
+ var zl_card_default = ":host {\n width: 100%;\n max-width: var(--zl-container-auth-card);\n margin-inline: auto;\n display: block;\n}\n\n.zr-card ::slotted([slot=\"header\"]), .zr-card ::slotted([slot=\"footer\"]) {\n margin: 0;\n}\n\n:host([data-suppress-header]) .zr-card__header {\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n position: absolute;\n overflow: hidden;\n}\n\n.zr-card {\n gap: var(--zl-spacing-6);\n padding-block: var(--zl-spacing-6);\n background: var(--zl-card);\n color: var(--zl-card-foreground);\n border: 1px solid var(--zl-border);\n border-radius: var(--zl-radius-xl);\n box-shadow: var(--zl-shadow-sm);\n flex-direction: column;\n display: flex;\n}\n\n.zr-card__header, .zr-card__body, .zr-card__footer {\n padding-inline: var(--zl-spacing-6);\n}\n\n.zr-card__header, .zr-card__footer {\n gap: var(--zl-spacing-1-5);\n flex-direction: column;\n display: flex;\n}\n\n.zr-card__region--empty {\n display: none;\n}\n\n.zr-card__body {\n gap: var(--zl-spacing-7);\n flex-direction: column;\n display: flex;\n}\n\n.zr-card--compact {\n gap: var(--zl-spacing-4);\n}\n";
539
+ //#endregion
540
+ //#region src/atoms/zl-card.ts
541
+ let ZlCard = class ZlCard extends LitElement {
542
+ static styles = [baseHostStyles, ...surfaceStyles(zl_card_default)];
543
+ #_compact_accessor_storage = false;
544
+ get compact() {
545
+ return this.#_compact_accessor_storage;
546
+ }
547
+ set compact(value) {
548
+ this.#_compact_accessor_storage = value;
549
+ }
550
+ render() {
551
+ const hasHeader = this.lightDomSlotFilled("header");
552
+ const hasFooter = this.lightDomSlotFilled("footer");
553
+ const cardClass = this.compact ? "zr-card zr-card--compact" : "zr-card";
554
+ const headerClass = hasHeader ? "zr-card__header" : "zr-card__header zr-card__region--empty";
555
+ const footerClass = hasFooter ? "zr-card__footer" : "zr-card__footer zr-card__region--empty";
556
+ return html`
557
+ <section class=${cardClass} part="card">
558
+ <header class=${headerClass} part="header">
559
+ <slot name="header" @slotchange=${this.onSlotChange}></slot>
560
+ </header>
561
+ <div class="zr-card__body" part="body">
562
+ <slot></slot>
563
+ </div>
564
+ <footer class=${footerClass} part="footer">
565
+ <slot name="footer" @slotchange=${this.onSlotChange}></slot>
566
+ </footer>
567
+ </section>
568
+ `;
569
+ }
570
+ /**
571
+ * `lightDomSlotFilled` is a render-time snapshot, so re-run render whenever a
572
+ * named slot's assignment changes (e.g. a header added after first paint).
573
+ * The initial render still reads children synchronously, avoiding the
574
+ * empty-then-filled flash a slotchange-only approach would introduce.
575
+ */
576
+ onSlotChange = () => {
577
+ this.requestUpdate();
578
+ };
579
+ /** Slotted nodes are always light-DOM children of the host in our templates. */
580
+ lightDomSlotFilled(slot) {
581
+ for (const child of this.children) if (child.getAttribute("slot") === slot) return true;
582
+ return false;
583
+ }
584
+ };
585
+ __decorate([property({
586
+ type: Boolean,
587
+ reflect: true
588
+ })], ZlCard.prototype, "compact", null);
589
+ ZlCard = __decorate([customElement("zl-card")], ZlCard);
590
+ const zlCardManifest = {
591
+ tag: "zl-card",
592
+ attrs: ["compact"],
593
+ parts: [
594
+ "card",
595
+ "header",
596
+ "body",
597
+ "footer"
598
+ ],
599
+ slots: [
600
+ "",
601
+ "header",
602
+ "footer"
603
+ ],
604
+ events: []
605
+ };
606
+ //#endregion
607
+ //#region src/atoms/zl-checkbox.css?inline
608
+ var zl_checkbox_default = ":host {\n display: inline-flex;\n}\n\n:host([disabled]) {\n cursor: not-allowed;\n}\n\n.zr-checkbox-field {\n align-items: flex-start;\n gap: var(--zl-spacing-1);\n flex-direction: column;\n display: inline-flex;\n}\n\n.zr-checkbox {\n align-items: center;\n gap: var(--zl-spacing-2);\n font-family: var(--zl-font-family-sans);\n cursor: pointer;\n -webkit-user-select: none;\n user-select: none;\n display: inline-flex;\n}\n\n.zr-checkbox--disabled {\n cursor: not-allowed;\n}\n\n.zr-checkbox__input {\n opacity: 0;\n pointer-events: none;\n border: 0;\n width: 1px;\n height: 1px;\n margin: 0;\n padding: 0;\n position: absolute;\n}\n\n.zr-checkbox__box {\n width: var(--zl-spacing-4);\n height: var(--zl-spacing-4);\n flex-shrink: 0;\n justify-content: center;\n align-items: center;\n display: inline-flex;\n position: relative;\n}\n\n.zr-checkbox__box:before {\n content: \"\";\n width: var(--zl-spacing-8);\n height: var(--zl-spacing-8);\n background: var(--zl-popover);\n opacity: 0;\n pointer-events: none;\n transition: opacity var(--zl-duration-fast)\n var(--zl-easing-standard);\n border-radius: 50%;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n\n.zr-checkbox__face {\n z-index: 1;\n width: var(--zl-spacing-4);\n height: var(--zl-spacing-4);\n border: 1px solid var(--zl-input);\n border-radius: var(--zl-radius-xs);\n transition: border-color var(--zl-duration-fast) var(--zl-easing-standard),\n background-color var(--zl-duration-fast) var(--zl-easing-standard);\n background: none;\n justify-content: center;\n align-items: center;\n display: inline-flex;\n position: relative;\n}\n\n.zr-checkbox__check {\n color: var(--zl-primary-foreground);\n opacity: 0;\n display: inline-flex;\n}\n\n.zr-checkbox__label {\n font-size: var(--zl-text-sm-size);\n line-height: var(--zl-text-sm-leading);\n font-weight: var(--zl-font-weight-normal);\n color: var(--zl-foreground);\n}\n\n.zr-checkbox__input:checked + .zr-checkbox__box .zr-checkbox__face {\n border-color: var(--zl-primary);\n background: var(--zl-primary);\n}\n\n.zr-checkbox__input:checked + .zr-checkbox__box .zr-checkbox__check, .zr-checkbox:not(.zr-checkbox--disabled):hover .zr-checkbox__box:before, .zr-checkbox:not(.zr-checkbox--disabled):active .zr-checkbox__box:before, .zr-checkbox__input:focus-visible + .zr-checkbox__box:before, .zr-checkbox[data-state=\"hovered\"] .zr-checkbox__box:before, .zr-checkbox[data-state=\"focused\"] .zr-checkbox__box:before, .zr-checkbox[data-state=\"pressed\"] .zr-checkbox__box:before {\n opacity: 1;\n}\n\n.zr-checkbox:not(.zr-checkbox--disabled):hover .zr-checkbox__input:not(:checked) + .zr-checkbox__box .zr-checkbox__face, .zr-checkbox[data-state=\"hovered\"] .zr-checkbox__input:not(:checked) + .zr-checkbox__box .zr-checkbox__face {\n border-color: var(--zl-muted-foreground);\n}\n\n.zr-checkbox:not(.zr-checkbox--disabled):hover .zr-checkbox__input:checked + .zr-checkbox__box .zr-checkbox__face, .zr-checkbox[data-state=\"hovered\"] .zr-checkbox__input:checked + .zr-checkbox__box .zr-checkbox__face {\n border-color: var(--zl-muted-foreground);\n background: var(--zl-muted-foreground);\n}\n\n.zr-checkbox__input:focus-visible:not(:checked) + .zr-checkbox__box .zr-checkbox__face, .zr-checkbox:not(.zr-checkbox--disabled):active .zr-checkbox__input:not(:checked) + .zr-checkbox__box .zr-checkbox__face, .zr-checkbox[data-state=\"focused\"] .zr-checkbox__input:not(:checked) + .zr-checkbox__box .zr-checkbox__face, .zr-checkbox[data-state=\"pressed\"] .zr-checkbox__input:not(:checked) + .zr-checkbox__box .zr-checkbox__face {\n border-color: var(--zl-primary);\n}\n\n.zr-checkbox__input:focus-visible:checked + .zr-checkbox__box .zr-checkbox__face, .zr-checkbox:not(.zr-checkbox--disabled):active .zr-checkbox__input:checked + .zr-checkbox__box .zr-checkbox__face, .zr-checkbox[data-state=\"focused\"] .zr-checkbox__input:checked + .zr-checkbox__box .zr-checkbox__face, .zr-checkbox[data-state=\"pressed\"] .zr-checkbox__input:checked + .zr-checkbox__box .zr-checkbox__face {\n border-color: var(--zl-primary);\n background: var(--zl-primary);\n}\n\n.zr-checkbox__input:focus-visible + .zr-checkbox__box .zr-checkbox__face {\n outline: none;\n}\n\n.zr-checkbox--disabled .zr-checkbox__input:not(:checked) + .zr-checkbox__box .zr-checkbox__face {\n border-color: var(--zl-muted-foreground);\n}\n\n.zr-checkbox--disabled .zr-checkbox__input:checked + .zr-checkbox__box .zr-checkbox__face {\n border-color: var(--zl-muted-foreground);\n background: var(--zl-muted-foreground);\n}\n\n.zr-checkbox--disabled .zr-checkbox__label {\n color: var(--zl-muted-foreground);\n}\n\n.zr-checkbox--invalid .zr-checkbox__input:not(:checked) + .zr-checkbox__box .zr-checkbox__face {\n border-color: var(--zl-destructive);\n}\n\n.zr-checkbox__error {\n font-size: var(--zl-text-sm-size);\n line-height: var(--zl-text-sm-leading);\n color: var(--zl-destructive);\n}\n";
609
+ //#endregion
610
+ //#region src/internal/unique-id.ts
611
+ /**
612
+ * Monotonic counter for DOM IDs that need to be unique within a document but
613
+ * stable across renders. Used by atoms that wire `<label for>` ↔ `<input id>`
614
+ * inside their Shadow DOM.
615
+ *
616
+ * A counter beats `Math.random()` and `crypto.randomUUID()` here:
617
+ *
618
+ * - Tests get deterministic IDs.
619
+ * - There's zero collision risk within a page.
620
+ * - It's an order of magnitude faster on each component instantiation.
621
+ */
622
+ let counter = 0;
623
+ function nextUid(prefix) {
624
+ counter += 1;
625
+ return `${prefix}-${counter}`;
626
+ }
627
+ //#endregion
628
+ //#region src/atoms/zl-checkbox.ts
629
+ let ZlCheckbox = class ZlCheckbox extends LitElement {
630
+ static formAssociated = true;
631
+ static shadowRootOptions = {
632
+ ...LitElement.shadowRootOptions,
633
+ delegatesFocus: true
634
+ };
635
+ static styles = [baseHostStyles, ...surfaceStyles(zl_checkbox_default)];
636
+ /**
637
+ * Field name — used as the key in form submission and in `zl-change` detail.
638
+ * The browser owns a native `name` property on form-associated elements, so
639
+ * we manage it manually to avoid a conflicting auto-generated accessor (see
640
+ * `<zl-field>`).
641
+ */
642
+ get name() {
643
+ return this.getAttribute("name") ?? "";
644
+ }
645
+ set name(value) {
646
+ this.setAttribute("name", value);
647
+ }
648
+ #_label_accessor_storage = "";
649
+ get label() {
650
+ return this.#_label_accessor_storage;
651
+ }
652
+ set label(value) {
653
+ this.#_label_accessor_storage = value;
654
+ }
655
+ #_value_accessor_storage = "on";
656
+ get value() {
657
+ return this.#_value_accessor_storage;
658
+ }
659
+ set value(value) {
660
+ this.#_value_accessor_storage = value;
661
+ }
662
+ #_checked_accessor_storage = false;
663
+ get checked() {
664
+ return this.#_checked_accessor_storage;
665
+ }
666
+ set checked(value) {
667
+ this.#_checked_accessor_storage = value;
668
+ }
669
+ #_disabled_accessor_storage = false;
670
+ get disabled() {
671
+ return this.#_disabled_accessor_storage;
672
+ }
673
+ set disabled(value) {
674
+ this.#_disabled_accessor_storage = value;
675
+ }
676
+ #_required_accessor_storage = false;
677
+ get required() {
678
+ return this.#_required_accessor_storage;
679
+ }
680
+ set required(value) {
681
+ this.#_required_accessor_storage = value;
682
+ }
683
+ #_error_accessor_storage = "";
684
+ get error() {
685
+ return this.#_error_accessor_storage;
686
+ }
687
+ set error(value) {
688
+ this.#_error_accessor_storage = value;
689
+ }
690
+ #_invalid_accessor_storage = false;
691
+ get invalid() {
692
+ return this.#_invalid_accessor_storage;
693
+ }
694
+ set invalid(value) {
695
+ this.#_invalid_accessor_storage = value;
696
+ }
697
+ #_ariaLabelText_accessor_storage = void 0;
698
+ get ariaLabelText() {
699
+ return this.#_ariaLabelText_accessor_storage;
700
+ }
701
+ set ariaLabelText(value) {
702
+ this.#_ariaLabelText_accessor_storage = value;
703
+ }
704
+ #_testId_accessor_storage = void 0;
705
+ get testId() {
706
+ return this.#_testId_accessor_storage;
707
+ }
708
+ set testId(value) {
709
+ this.#_testId_accessor_storage = value;
710
+ }
711
+ #_forcedState_accessor_storage = null;
712
+ get forcedState() {
713
+ return this.#_forcedState_accessor_storage;
714
+ }
715
+ set forcedState(value) {
716
+ this.#_forcedState_accessor_storage = value;
717
+ }
718
+ #_inputEl_accessor_storage = null;
719
+ get inputEl() {
720
+ return this.#_inputEl_accessor_storage;
721
+ }
722
+ set inputEl(value) {
723
+ this.#_inputEl_accessor_storage = value;
724
+ }
725
+ inputId = nextUid("zl-checkbox");
726
+ internals;
727
+ defaultChecked = false;
728
+ constructor() {
729
+ super();
730
+ this.internals = this.attachInternals();
731
+ }
732
+ connectedCallback() {
733
+ super.connectedCallback();
734
+ this.defaultChecked = this.hasAttribute("checked");
735
+ this.syncFormState();
736
+ }
737
+ willUpdate(changed) {
738
+ if (changed.has("checked") || changed.has("required") || changed.has("value")) this.syncFormState();
739
+ }
740
+ formResetCallback() {
741
+ this.checked = this.defaultChecked;
742
+ }
743
+ formStateRestoreCallback(state) {
744
+ this.checked = state === this.value;
745
+ }
746
+ focus(options) {
747
+ this.inputEl?.focus(options);
748
+ }
749
+ /**
750
+ * The string this control contributes to form submission — the uniform
751
+ * read/write contract `<zitadel-login>` uses to capture and restore field
752
+ * values without knowing each atom's internal shape. Like a native checkbox
753
+ * this is the value token only when checked, empty otherwise; assigning it
754
+ * back restores the checked state.
755
+ */
756
+ get formValue() {
757
+ return this.checked ? this.value : "";
758
+ }
759
+ set formValue(value) {
760
+ this.checked = value !== "";
761
+ }
762
+ render() {
763
+ const errorId = `${this.inputId}-error`;
764
+ const showError = Boolean(this.error);
765
+ const rootClass = classMap({
766
+ "zr-checkbox": true,
767
+ "zr-checkbox--invalid": this.invalid || showError,
768
+ "zr-checkbox--disabled": this.disabled
769
+ });
770
+ const labelText = this.label;
771
+ return html`
772
+ <div class="zr-checkbox-field" part="field">
773
+ <label class=${rootClass} part="root" data-state=${this.forcedState ?? nothing}>
774
+ <input
775
+ class="zr-checkbox__input"
776
+ part="input"
777
+ id=${this.inputId}
778
+ type="checkbox"
779
+ name=${this.name || nothing}
780
+ .checked=${live(this.checked)}
781
+ value=${this.value}
782
+ ?required=${this.required}
783
+ ?disabled=${this.disabled}
784
+ aria-label=${ifDefined(labelText ? void 0 : this.ariaLabelText)}
785
+ aria-invalid=${this.invalid || showError ? "true" : "false"}
786
+ aria-describedby=${showError ? errorId : nothing}
787
+ data-testid=${ifDefined(this.nativeInputTestId())}
788
+ @change=${this.handleChange}
789
+ />
790
+ <span class="zr-checkbox__box" part="box">
791
+ <span class="zr-checkbox__face" part="face">
792
+ <zl-icon class="zr-checkbox__check" part="check" name="check" size="16" decorative></zl-icon>
793
+ </span>
794
+ </span>
795
+ ${labelText ? html`<span class="zr-checkbox__label" part="label">${labelText}</span>` : html`<slot></slot>`}
796
+ </label>
797
+ <div
798
+ class="zr-checkbox__error"
799
+ part="error"
800
+ id=${errorId}
801
+ role="alert"
802
+ ?hidden=${!showError}
803
+ >
804
+ ${this.error}
805
+ </div>
806
+ </div>
807
+ `;
808
+ }
809
+ handleChange = (event) => {
810
+ event.stopPropagation();
811
+ const input = event.target;
812
+ this.checked = input.checked;
813
+ this.syncFormState();
814
+ emit(this, "zl-change", {
815
+ name: this.name,
816
+ checked: this.checked,
817
+ value: this.value
818
+ });
819
+ this.dispatchEvent(new Event("change", {
820
+ bubbles: true,
821
+ composed: true
822
+ }));
823
+ };
824
+ syncFormState() {
825
+ this.internals.setFormValue?.(this.checked ? this.value : null);
826
+ if (this.required && !this.checked) this.internals.setValidity?.({ valueMissing: true }, "Please check this box to continue.");
827
+ else this.internals.setValidity?.({});
828
+ }
829
+ nativeInputTestId() {
830
+ if (this.name) return `zitadel-checkbox-${this.name}`;
831
+ if (this.testId) return `${this.testId}-input`;
832
+ }
833
+ };
834
+ __decorate([property()], ZlCheckbox.prototype, "label", null);
835
+ __decorate([property()], ZlCheckbox.prototype, "value", null);
836
+ __decorate([property({
837
+ type: Boolean,
838
+ reflect: true
839
+ })], ZlCheckbox.prototype, "checked", null);
840
+ __decorate([property({
841
+ type: Boolean,
842
+ reflect: true
843
+ })], ZlCheckbox.prototype, "disabled", null);
844
+ __decorate([property({ type: Boolean })], ZlCheckbox.prototype, "required", null);
845
+ __decorate([property()], ZlCheckbox.prototype, "error", null);
846
+ __decorate([property({
847
+ type: Boolean,
848
+ reflect: true
849
+ })], ZlCheckbox.prototype, "invalid", null);
850
+ __decorate([property({ attribute: "aria-label" })], ZlCheckbox.prototype, "ariaLabelText", null);
851
+ __decorate([property({ attribute: "data-testid" })], ZlCheckbox.prototype, "testId", null);
852
+ __decorate([property({ attribute: "data-state" })], ZlCheckbox.prototype, "forcedState", null);
853
+ __decorate([query(".zr-checkbox__input")], ZlCheckbox.prototype, "inputEl", null);
854
+ ZlCheckbox = __decorate([customElement("zl-checkbox")], ZlCheckbox);
855
+ const zlCheckboxManifest = {
856
+ tag: "zl-checkbox",
857
+ attrs: [
858
+ "name",
859
+ "label",
860
+ "value",
861
+ "checked",
862
+ "disabled",
863
+ "required",
864
+ "error",
865
+ "invalid",
866
+ "aria-label",
867
+ "data-testid"
868
+ ],
869
+ parts: [
870
+ "field",
871
+ "root",
872
+ "input",
873
+ "box",
874
+ "face",
875
+ "check",
876
+ "label",
877
+ "error"
878
+ ],
879
+ slots: [""],
880
+ events: ["zl-change"]
881
+ };
882
+ //#endregion
883
+ //#region src/atoms/zl-field.css?inline
884
+ var zl_field_default = ":host {\n display: block;\n}\n\n::slotted([slot=\"prefix\"]), ::slotted([slot=\"suffix\"]) {\n color: var(--zl-muted-foreground);\n display: inline-flex;\n}\n\n.zr-field__help[hidden], .zr-field__error[hidden] {\n display: none;\n}\n\n:host([data-state=\"hovered\"]:not([disabled])) .zr-field:not(.zr-field--invalid):not(.zr-field--success) .zr-field__wrap:not(:focus-within) {\n border-color: var(--zl-ring);\n}\n\n:host([data-state=\"focused\"]:not([disabled])) .zr-field:not(.zr-field--invalid):not(.zr-field--success) .zr-field__wrap {\n border-color: var(--zl-ring);\n box-shadow: 0 0 0 3px var(--zl-ring-outline),\n var(--zl-shadow-xs);\n}\n\n:host([data-state=\"focused\"]:not([disabled])) .zr-field--invalid .zr-field__wrap {\n border-color: var(--zl-destructive);\n box-shadow: 0 0 0 3px var(--zl-destructive-ring),\n var(--zl-shadow-xs);\n}\n\n.zr-field {\n align-items: stretch;\n gap: var(--zl-spacing-3);\n font-family: var(--zl-font-family-sans);\n flex-direction: column;\n display: flex;\n}\n\n.zr-field__label-row {\n justify-content: space-between;\n align-items: center;\n gap: var(--zl-spacing-2);\n width: 100%;\n display: flex;\n}\n\n.zr-field__label {\n align-items: center;\n gap: var(--zl-spacing-1);\n font-family: var(--zl-font-family-heading);\n font-size: var(--zl-text-sm-size);\n line-height: var(--zl-text-sm-leading);\n color: var(--zl-foreground);\n display: inline-flex;\n}\n\n.zr-field__link {\n font-size: var(--zl-text-sm-size);\n line-height: var(--zl-text-sm-leading);\n color: inherit;\n text-underline-offset: 4px;\n flex-shrink: 0;\n text-decoration: none;\n}\n\n.zr-field__link:hover {\n text-decoration: underline;\n}\n\n.zr-field__link:focus-visible {\n outline: var(--zl-focus-width) solid var(--zl-ring);\n outline-offset: var(--zl-focus-offset);\n border-radius: var(--zl-radius-xs);\n}\n\n.zr-field__required {\n color: var(--zl-destructive);\n}\n\n.zr-field--disabled .zr-field__label {\n color: var(--zl-muted-foreground);\n}\n\n.zr-field__wrap {\n align-items: center;\n gap: var(--zl-spacing-1);\n height: var(--zl-spacing-9);\n padding-block: var(--zl-spacing-1);\n padding-inline: var(--zl-spacing-2-5);\n border: 1px solid var(--zl-input);\n border-radius: var(--zl-radius-md);\n background: var(--zl-input-fill);\n box-shadow: var(--zl-shadow-xs);\n transition: border-color var(--zl-duration-fast) var(--zl-easing-standard),\n box-shadow var(--zl-duration-fast) var(--zl-easing-standard);\n display: flex;\n position: relative;\n overflow: visible;\n}\n\n.zr-field__wrap--trailing {\n padding-inline-end: var(--zl-spacing-8);\n}\n\n.zr-field:not(.zr-field--disabled) .zr-field__wrap:hover:not(:focus-within) {\n border-color: var(--zl-ring);\n}\n\n.zr-field:not(.zr-field--invalid):not(.zr-field--disabled) .zr-field__wrap:focus-within {\n border-color: var(--zl-ring);\n box-shadow: 0 0 0 3px var(--zl-ring-outline),\n var(--zl-shadow-xs);\n outline: none;\n}\n\n.zr-field--invalid .zr-field__wrap {\n border-color: var(--zl-destructive);\n}\n\n.zr-field--invalid .zr-field__wrap:focus-within {\n box-shadow: 0 0 0 3px var(--zl-destructive-ring),\n var(--zl-shadow-xs);\n outline: none;\n}\n\n.zr-field--success .zr-field__wrap {\n border-color: var(--zl-success);\n}\n\n.zr-field--disabled .zr-field__wrap {\n background: var(--zl-muted);\n opacity: .5;\n}\n\n.zr-field--disabled .zr-field__wrap:hover {\n border-color: var(--zl-input);\n}\n\n.zr-field__input {\n min-width: 0;\n height: 100%;\n color: var(--zl-foreground);\n font-family: inherit;\n font-size: var(--zl-text-sm-size);\n line-height: var(--zl-text-sm-leading);\n font-weight: var(--zl-font-weight-normal);\n background: none;\n border: 0;\n outline: none;\n flex: auto;\n padding: 0;\n}\n\n.zr-field__input[type=\"password\"] {\n letter-spacing: .125rem;\n}\n\n.zr-field__input::placeholder {\n color: var(--zl-muted-foreground);\n letter-spacing: normal;\n}\n\n.zr-field__input:focus, .zr-field__input:focus-visible {\n outline: none;\n}\n\n.zr-field__input:disabled {\n cursor: not-allowed;\n}\n\n.zr-field__trailing {\n right: var(--zl-spacing-2-5);\n width: var(--zl-spacing-4);\n height: var(--zl-spacing-4);\n color: var(--zl-muted-foreground);\n justify-content: center;\n align-items: center;\n display: inline-flex;\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n}\n\n.zr-field__trailing-action {\n color: inherit;\n cursor: pointer;\n background: none;\n border: 0;\n justify-content: center;\n align-items: center;\n margin: 0;\n padding: 0;\n line-height: 0;\n display: inline-flex;\n}\n\n.zr-field__trailing-action:focus-visible {\n outline: var(--zl-focus-width) solid var(--zl-ring);\n outline-offset: var(--zl-focus-offset);\n border-radius: var(--zl-radius-xs);\n}\n\n.zr-field__trailing-action:disabled {\n cursor: not-allowed;\n}\n\n.zr-field--invalid .zr-field__trailing {\n color: var(--zl-destructive);\n}\n\n.zr-field--success .zr-field__trailing {\n color: var(--zl-success);\n}\n\n.zr-field__help {\n font-size: var(--zl-text-sm-size);\n line-height: var(--zl-text-sm-leading);\n color: var(--zl-muted-foreground);\n}\n\n.zr-field__success {\n font-size: var(--zl-text-sm-size);\n line-height: var(--zl-text-sm-leading);\n color: var(--zl-success);\n}\n\n.zr-field__error {\n font-size: var(--zl-text-sm-size);\n line-height: var(--zl-text-sm-leading);\n color: var(--zl-destructive);\n}\n";
885
+ //#endregion
886
+ //#region src/internal/hook-name.ts
887
+ /**
888
+ * Reserved auth-method credential prefix of flow field names. Mirrors
889
+ * `AUTH_METHOD_PREFIX` in `@zitadel/config` (`src/validate.ts`), which
890
+ * owns the wire dialect; components has no dependency on that package,
891
+ * so the literal is repeated here.
892
+ */
893
+ const AUTH_METHOD_PREFIX = "x-auth-methods#";
894
+ /**
895
+ * Normalises a flow field name into its automation-hook token.
896
+ *
897
+ * Auth-method credential fields arrive from the flow engine as
898
+ * `x-auth-methods#<method>` (e.g. `x-auth-methods#password`), but the
899
+ * documented `data-testid` hooks are method-named
900
+ * (`zitadel-field-password`, `zitadel-input-password` — see
901
+ * packages/components/README.md and apps/cli/SKILLS.md). This helper
902
+ * feeds both hook construction sites: the bundled template's `testid`
903
+ * Liquid filter and `<zl-field>`'s native-input testid.
904
+ *
905
+ * Only the reserved credential prefix is stripped — user-schema
906
+ * property names are tenant-authored arbitrary strings, so a `#`
907
+ * anywhere else is part of the name and stays in the hook. The
908
+ * after-prefix token is used verbatim (no case or spacing changes),
909
+ * and the field's `name` attribute always keeps the raw wire/form key.
910
+ */
911
+ function hookName(field) {
912
+ if (field.startsWith(AUTH_METHOD_PREFIX) && field.length > 15) return field.slice(15);
913
+ return field;
914
+ }
915
+ //#endregion
916
+ //#region src/atoms/zl-field.ts
917
+ let ZlField = class ZlField extends LitElement {
918
+ static formAssociated = true;
919
+ static shadowRootOptions = {
920
+ ...LitElement.shadowRootOptions,
921
+ delegatesFocus: true
922
+ };
923
+ static styles = [baseHostStyles, ...surfaceStyles(zl_field_default)];
924
+ /**
925
+ * Field name — used as the key in form submission and in `zl-input` event
926
+ * detail. For form-associated custom elements the browser owns a native
927
+ * `name` property; using `@property()` would create a conflicting accessor
928
+ * that loses sync with the DOM attribute. We therefore manage it manually.
929
+ */
930
+ get name() {
931
+ return this.getAttribute("name") ?? "";
932
+ }
933
+ set name(value) {
934
+ this.setAttribute("name", value);
935
+ }
936
+ #_label_accessor_storage = "";
937
+ get label() {
938
+ return this.#_label_accessor_storage;
939
+ }
940
+ set label(value) {
941
+ this.#_label_accessor_storage = value;
942
+ }
943
+ #_type_accessor_storage = "text";
944
+ get type() {
945
+ return this.#_type_accessor_storage;
946
+ }
947
+ set type(value) {
948
+ this.#_type_accessor_storage = value;
949
+ }
950
+ #_value_accessor_storage = "";
951
+ get value() {
952
+ return this.#_value_accessor_storage;
953
+ }
954
+ set value(value) {
955
+ this.#_value_accessor_storage = value;
956
+ }
957
+ #_placeholder_accessor_storage = "";
958
+ get placeholder() {
959
+ return this.#_placeholder_accessor_storage;
960
+ }
961
+ set placeholder(value) {
962
+ this.#_placeholder_accessor_storage = value;
963
+ }
964
+ #_autocomplete_accessor_storage = void 0;
965
+ get autocomplete() {
966
+ return this.#_autocomplete_accessor_storage;
967
+ }
968
+ set autocomplete(value) {
969
+ this.#_autocomplete_accessor_storage = value;
970
+ }
971
+ #_pattern_accessor_storage = void 0;
972
+ get pattern() {
973
+ return this.#_pattern_accessor_storage;
974
+ }
975
+ set pattern(value) {
976
+ this.#_pattern_accessor_storage = value;
977
+ }
978
+ #_error_accessor_storage = "";
979
+ get error() {
980
+ return this.#_error_accessor_storage;
981
+ }
982
+ set error(value) {
983
+ this.#_error_accessor_storage = value;
984
+ }
985
+ #_success_accessor_storage = "";
986
+ get success() {
987
+ return this.#_success_accessor_storage;
988
+ }
989
+ set success(value) {
990
+ this.#_success_accessor_storage = value;
991
+ }
992
+ #_testId_accessor_storage = void 0;
993
+ get testId() {
994
+ return this.#_testId_accessor_storage;
995
+ }
996
+ set testId(value) {
997
+ this.#_testId_accessor_storage = value;
998
+ }
999
+ #_forgotPasswordHref_accessor_storage = void 0;
1000
+ get forgotPasswordHref() {
1001
+ return this.#_forgotPasswordHref_accessor_storage;
1002
+ }
1003
+ set forgotPasswordHref(value) {
1004
+ this.#_forgotPasswordHref_accessor_storage = value;
1005
+ }
1006
+ #_forgotPasswordLabel_accessor_storage = "Forgot password?";
1007
+ get forgotPasswordLabel() {
1008
+ return this.#_forgotPasswordLabel_accessor_storage;
1009
+ }
1010
+ set forgotPasswordLabel(value) {
1011
+ this.#_forgotPasswordLabel_accessor_storage = value;
1012
+ }
1013
+ #_forgotPasswordAction_accessor_storage = void 0;
1014
+ get forgotPasswordAction() {
1015
+ return this.#_forgotPasswordAction_accessor_storage;
1016
+ }
1017
+ set forgotPasswordAction(value) {
1018
+ this.#_forgotPasswordAction_accessor_storage = value;
1019
+ }
1020
+ #_trailingIcon_accessor_storage = true;
1021
+ get trailingIcon() {
1022
+ return this.#_trailingIcon_accessor_storage;
1023
+ }
1024
+ set trailingIcon(value) {
1025
+ this.#_trailingIcon_accessor_storage = value;
1026
+ }
1027
+ #_required_accessor_storage = false;
1028
+ get required() {
1029
+ return this.#_required_accessor_storage;
1030
+ }
1031
+ set required(value) {
1032
+ this.#_required_accessor_storage = value;
1033
+ }
1034
+ #_disabled_accessor_storage = false;
1035
+ get disabled() {
1036
+ return this.#_disabled_accessor_storage;
1037
+ }
1038
+ set disabled(value) {
1039
+ this.#_disabled_accessor_storage = value;
1040
+ }
1041
+ #_invalid_accessor_storage = false;
1042
+ get invalid() {
1043
+ return this.#_invalid_accessor_storage;
1044
+ }
1045
+ set invalid(value) {
1046
+ this.#_invalid_accessor_storage = value;
1047
+ }
1048
+ #_hasHelp_accessor_storage = false;
1049
+ get hasHelp() {
1050
+ return this.#_hasHelp_accessor_storage;
1051
+ }
1052
+ set hasHelp(value) {
1053
+ this.#_hasHelp_accessor_storage = value;
1054
+ }
1055
+ #_hasSuffixSlot_accessor_storage = false;
1056
+ get hasSuffixSlot() {
1057
+ return this.#_hasSuffixSlot_accessor_storage;
1058
+ }
1059
+ set hasSuffixSlot(value) {
1060
+ this.#_hasSuffixSlot_accessor_storage = value;
1061
+ }
1062
+ #_inputEl_accessor_storage = null;
1063
+ get inputEl() {
1064
+ return this.#_inputEl_accessor_storage;
1065
+ }
1066
+ set inputEl(value) {
1067
+ this.#_inputEl_accessor_storage = value;
1068
+ }
1069
+ inputId = nextUid("zl-field");
1070
+ internals;
1071
+ constructor() {
1072
+ super();
1073
+ this.internals = this.attachInternals();
1074
+ }
1075
+ connectedCallback() {
1076
+ super.connectedCallback();
1077
+ this.syncFormState();
1078
+ }
1079
+ willUpdate(changed) {
1080
+ if (changed.has("value") || changed.has("required") || changed.has("error")) this.syncFormState();
1081
+ }
1082
+ formResetCallback() {
1083
+ this.value = "";
1084
+ }
1085
+ formStateRestoreCallback(state) {
1086
+ this.value = state ?? "";
1087
+ }
1088
+ focus(options) {
1089
+ this.inputEl?.focus(options);
1090
+ }
1091
+ /**
1092
+ * The string this control contributes to form submission — the uniform
1093
+ * read/write contract `<zitadel-login>` uses to capture and restore field
1094
+ * values without knowing each atom's internal shape. The getter reads the
1095
+ * live `<input>` so browser/password-manager autofill that writes the native
1096
+ * control directly (bypassing the `value` property and its `input` event) is
1097
+ * still captured.
1098
+ */
1099
+ get formValue() {
1100
+ const native = this.inputEl ?? this.shadowRoot?.querySelector("input");
1101
+ return native ? native.value : this.value;
1102
+ }
1103
+ set formValue(value) {
1104
+ this.value = value;
1105
+ const native = this.inputEl ?? this.shadowRoot?.querySelector("input");
1106
+ if (native && native.value !== value) native.value = value;
1107
+ }
1108
+ render() {
1109
+ const labelId = `${this.inputId}-label`;
1110
+ const errorId = `${this.inputId}-error`;
1111
+ const successId = `${this.inputId}-success`;
1112
+ const helpId = `${this.inputId}-help`;
1113
+ const showError = Boolean(this.error);
1114
+ const showSuccess = Boolean(this.success) && !showError && !this.invalid;
1115
+ const describedBy = [
1116
+ showError ? errorId : null,
1117
+ showSuccess ? successId : null,
1118
+ this.hasHelp ? helpId : null
1119
+ ].filter(Boolean).join(" ");
1120
+ const rootClass = classMap({
1121
+ "zr-field": true,
1122
+ "zr-field--invalid": this.invalid || showError,
1123
+ "zr-field--success": showSuccess,
1124
+ "zr-field--disabled": this.disabled
1125
+ });
1126
+ const showDefaultTrailing = this.trailingIcon && !this.hasSuffixSlot && !this.disabled;
1127
+ const trailing = showDefaultTrailing ? this.renderTrailingIcon() : null;
1128
+ const wrapClass = classMap({
1129
+ "zr-field__wrap": true,
1130
+ "zr-field__wrap--trailing": showDefaultTrailing
1131
+ });
1132
+ return html`
1133
+ <div class=${rootClass} part="root">
1134
+ ${this.renderLabelRow(labelId)}
1135
+ <div class=${wrapClass} part="input-wrap">
1136
+ <slot name="prefix"></slot>
1137
+ <input
1138
+ class="zr-field__input"
1139
+ part="input"
1140
+ id=${this.inputId}
1141
+ data-testid=${ifDefined(this.nativeInputTestId())}
1142
+ name=${this.name}
1143
+ type=${this.type}
1144
+ .value=${live(this.value)}
1145
+ placeholder=${this.placeholder}
1146
+ autocomplete=${ifDefined(this.autocomplete)}
1147
+ pattern=${ifDefined(this.pattern)}
1148
+ ?required=${this.required}
1149
+ ?disabled=${this.disabled}
1150
+ aria-invalid=${this.invalid || showError ? "true" : "false"}
1151
+ aria-describedby=${describedBy || nothing}
1152
+ @input=${this.handleInput}
1153
+ @change=${this.handleChange}
1154
+ @keydown=${this.handleKeyDown}
1155
+ />
1156
+ <slot name="suffix" @slotchange=${this.handleSuffixSlotChange}></slot>
1157
+ ${trailing}
1158
+ </div>
1159
+ <div class="zr-field__help" part="help" id=${helpId} ?hidden=${!this.hasHelp}>
1160
+ <slot name="help" @slotchange=${this.handleHelpSlotChange}></slot>
1161
+ </div>
1162
+ <div
1163
+ class="zr-field__success"
1164
+ part="success"
1165
+ id=${successId}
1166
+ role="status"
1167
+ ?hidden=${!showSuccess}
1168
+ >
1169
+ ${this.success}
1170
+ </div>
1171
+ <div class="zr-field__error" part="error" id=${errorId} role="alert" ?hidden=${!showError}>
1172
+ ${this.error}
1173
+ </div>
1174
+ </div>
1175
+ `;
1176
+ }
1177
+ renderLabelRow(labelId) {
1178
+ if (!this.label) return null;
1179
+ if (this.forgotPasswordHref) return html`
1180
+ <div class="zr-field__label-row" part="label-row">
1181
+ <label class="zr-field__label" part="label" id=${labelId} for=${this.inputId}>
1182
+ <span>${this.label}</span>
1183
+ ${this.required ? html`<span class="zr-field__required" aria-hidden="true">*</span>` : null}
1184
+ </label>
1185
+ <a
1186
+ class="zr-field__link"
1187
+ part="forgot-link"
1188
+ href=${this.forgotPasswordHref}
1189
+ @click=${this.onForgotPasswordClick}
1190
+ >${this.forgotPasswordLabel}</a
1191
+ >
1192
+ </div>
1193
+ `;
1194
+ return html`
1195
+ <label class="zr-field__label" part="label" id=${labelId} for=${this.inputId}>
1196
+ <span>${this.label}</span>
1197
+ ${this.required ? html`<span class="zr-field__required" aria-hidden="true">*</span>` : null}
1198
+ </label>
1199
+ `;
1200
+ }
1201
+ renderTrailingIcon() {
1202
+ let iconName = "cross";
1203
+ let tone = "default";
1204
+ let clearable = true;
1205
+ if (this.invalid || this.error) {
1206
+ iconName = "alert-circle";
1207
+ tone = "error";
1208
+ clearable = false;
1209
+ } else if (this.success) {
1210
+ iconName = "check";
1211
+ tone = "success";
1212
+ clearable = false;
1213
+ }
1214
+ const icon = html`<zl-icon name=${iconName} size="16" tone=${tone} decorative></zl-icon>`;
1215
+ if (!clearable) return html`<span class="zr-field__trailing" part="trailing-icon">${icon}</span>`;
1216
+ return html`
1217
+ <span class="zr-field__trailing" part="trailing-icon">
1218
+ <button
1219
+ type="button"
1220
+ class="zr-field__trailing-action"
1221
+ part="trailing-action"
1222
+ aria-label="Clear"
1223
+ ?disabled=${this.disabled}
1224
+ @click=${this.handleClear}
1225
+ >
1226
+ ${icon}
1227
+ </button>
1228
+ </span>
1229
+ `;
1230
+ }
1231
+ syncFormState() {
1232
+ this.internals.setFormValue?.(this.value);
1233
+ if (this.required && !this.value) this.internals.setValidity?.({ valueMissing: true }, "Please fill out this field.");
1234
+ else if (this.error) this.internals.setValidity?.({ customError: true }, this.error);
1235
+ else this.internals.setValidity?.({});
1236
+ }
1237
+ handleHelpSlotChange = (event) => {
1238
+ const slot = event.target;
1239
+ this.hasHelp = slot.assignedNodes({ flatten: true }).length > 0;
1240
+ };
1241
+ handleSuffixSlotChange = (event) => {
1242
+ const slot = event.target;
1243
+ this.hasSuffixSlot = slot.assignedNodes({ flatten: true }).length > 0;
1244
+ };
1245
+ handleClear = () => {
1246
+ this.value = "";
1247
+ emit(this, "zl-input", {
1248
+ name: this.name,
1249
+ value: this.value
1250
+ });
1251
+ this.syncFormState();
1252
+ this.dispatchNativeInput();
1253
+ this.inputEl?.focus();
1254
+ };
1255
+ /**
1256
+ * With no `forgot-password-action` the link is a plain navigation and this
1257
+ * does nothing — a tenant pointing it at their own recovery page still gets
1258
+ * an ordinary anchor, middle-click and all.
1259
+ */
1260
+ onForgotPasswordClick = (event) => {
1261
+ if (!this.forgotPasswordAction) return;
1262
+ event.preventDefault();
1263
+ emit(this, "zl-submit", { action: this.forgotPasswordAction });
1264
+ };
1265
+ handleInput = (event) => {
1266
+ event.stopPropagation();
1267
+ const input = event.target;
1268
+ this.value = input.value;
1269
+ this.syncFormState();
1270
+ emit(this, "zl-input", {
1271
+ name: this.name,
1272
+ value: this.value
1273
+ });
1274
+ this.dispatchNativeInput(event);
1275
+ };
1276
+ handleChange = (event) => {
1277
+ event.stopPropagation();
1278
+ const input = event.target;
1279
+ this.value = input.value;
1280
+ this.syncFormState();
1281
+ this.dispatchNativeChange();
1282
+ };
1283
+ handleKeyDown = (event) => {
1284
+ if (event.key === "Enter" && !event.isComposing && !event.shiftKey && !event.altKey && !event.metaKey && !event.ctrlKey) {
1285
+ const form = this.internals.form;
1286
+ if (form) {
1287
+ event.preventDefault();
1288
+ form.requestSubmit();
1289
+ }
1290
+ }
1291
+ };
1292
+ nativeInputTestId() {
1293
+ if (this.name) return `zitadel-input-${hookName(this.name)}`;
1294
+ if (this.testId) return `${this.testId}-input`;
1295
+ }
1296
+ dispatchNativeInput(source) {
1297
+ if (typeof InputEvent === "function") {
1298
+ const input = source instanceof InputEvent ? source : void 0;
1299
+ this.dispatchEvent(new InputEvent("input", {
1300
+ bubbles: true,
1301
+ composed: true,
1302
+ data: input?.data ?? null,
1303
+ inputType: input?.inputType ?? "",
1304
+ isComposing: input?.isComposing ?? false
1305
+ }));
1306
+ return;
1307
+ }
1308
+ this.dispatchEvent(new Event("input", {
1309
+ bubbles: true,
1310
+ composed: true
1311
+ }));
1312
+ }
1313
+ dispatchNativeChange() {
1314
+ this.dispatchEvent(new Event("change", {
1315
+ bubbles: true,
1316
+ composed: true
1317
+ }));
1318
+ }
1319
+ };
1320
+ __decorate([property()], ZlField.prototype, "label", null);
1321
+ __decorate([property()], ZlField.prototype, "type", null);
1322
+ __decorate([property()], ZlField.prototype, "value", null);
1323
+ __decorate([property()], ZlField.prototype, "placeholder", null);
1324
+ __decorate([property()], ZlField.prototype, "autocomplete", null);
1325
+ __decorate([property()], ZlField.prototype, "pattern", null);
1326
+ __decorate([property()], ZlField.prototype, "error", null);
1327
+ __decorate([property()], ZlField.prototype, "success", null);
1328
+ __decorate([property({ attribute: "data-testid" })], ZlField.prototype, "testId", null);
1329
+ __decorate([property({ attribute: "forgot-password-href" })], ZlField.prototype, "forgotPasswordHref", null);
1330
+ __decorate([property({ attribute: "forgot-password-label" })], ZlField.prototype, "forgotPasswordLabel", null);
1331
+ __decorate([property({ attribute: "forgot-password-action" })], ZlField.prototype, "forgotPasswordAction", null);
1332
+ __decorate([property({
1333
+ type: Boolean,
1334
+ attribute: "trailing-icon"
1335
+ })], ZlField.prototype, "trailingIcon", null);
1336
+ __decorate([property({ type: Boolean })], ZlField.prototype, "required", null);
1337
+ __decorate([property({
1338
+ type: Boolean,
1339
+ reflect: true
1340
+ })], ZlField.prototype, "disabled", null);
1341
+ __decorate([property({
1342
+ type: Boolean,
1343
+ reflect: true
1344
+ })], ZlField.prototype, "invalid", null);
1345
+ __decorate([state()], ZlField.prototype, "hasHelp", null);
1346
+ __decorate([state()], ZlField.prototype, "hasSuffixSlot", null);
1347
+ __decorate([query(".zr-field__input")], ZlField.prototype, "inputEl", null);
1348
+ ZlField = __decorate([customElement("zl-field")], ZlField);
1349
+ const zlFieldManifest = {
1350
+ tag: "zl-field",
1351
+ consumes: { field: { required: true } },
1352
+ attrs: [
1353
+ "name",
1354
+ "label",
1355
+ "type",
1356
+ "value",
1357
+ "placeholder",
1358
+ "autocomplete",
1359
+ "pattern",
1360
+ "data-testid",
1361
+ "required",
1362
+ "disabled",
1363
+ "invalid",
1364
+ "error",
1365
+ "success",
1366
+ "forgot-password-href",
1367
+ "forgot-password-label",
1368
+ "forgot-password-action",
1369
+ "trailing-icon"
1370
+ ],
1371
+ parts: [
1372
+ "root",
1373
+ "label",
1374
+ "label-row",
1375
+ "forgot-link",
1376
+ "input-wrap",
1377
+ "input",
1378
+ "trailing-icon",
1379
+ "trailing-action",
1380
+ "help",
1381
+ "success",
1382
+ "error"
1383
+ ],
1384
+ slots: [
1385
+ "prefix",
1386
+ "suffix",
1387
+ "help"
1388
+ ],
1389
+ events: ["zl-input", "zl-submit"]
1390
+ };
1391
+ //#endregion
1392
+ //#region src/atoms/zl-page-shell.css?inline
1393
+ var zl_page_shell_default = ":host {\n min-height: var(--zl-page-min-height, 100vh);\n background: var(--zl-background);\n color: var(--zl-foreground);\n display: block;\n}\n\n:host([data-embedded]) {\n height: 100%;\n min-height: 100%;\n}\n\n:host([data-embedded]) .zr-page-shell {\n min-height: 100%;\n}\n\n:host([data-widget]) {\n background: none;\n min-height: auto;\n}\n\n:host([data-widget]) .zr-page-shell {\n min-height: var(--zl-page-min-height, auto);\n background: none;\n padding: 0;\n}\n\n.zr-page-shell ::slotted([slot=\"header\"]), .zr-page-shell ::slotted([slot=\"footer\"]) {\n margin: 0;\n}\n\n.zr-page-shell {\n min-height: inherit;\n background: var(--zl-background);\n color: var(--zl-foreground);\n justify-content: center;\n align-items: center;\n gap: var(--zl-spacing-6);\n padding: var(--zl-spacing-6);\n flex-direction: column;\n display: flex;\n}\n\n@media (width >= 48rem) {\n .zr-page-shell {\n padding: var(--zl-spacing-10);\n }\n}\n\n.zr-page-shell__header, .zr-page-shell__main, .zr-page-shell__footer {\n justify-content: center;\n align-items: center;\n width: 100%;\n display: flex;\n}\n\n.zr-page-shell__main {\n flex: none;\n}\n\n.zr-page-shell__region--empty {\n display: none;\n}\n";
1394
+ //#endregion
1395
+ //#region src/atoms/zl-page-shell.ts
1396
+ let ZlPageShell = class ZlPageShell extends LitElement {
1397
+ static styles = [baseHostStyles, ...surfaceStyles(zl_page_shell_default)];
1398
+ render() {
1399
+ const hasHeader = this.lightDomSlotFilled("header");
1400
+ const hasFooter = this.lightDomSlotFilled("footer");
1401
+ const headerClass = hasHeader ? "zr-page-shell__header" : "zr-page-shell__header zr-page-shell__region--empty";
1402
+ const footerClass = hasFooter ? "zr-page-shell__footer" : "zr-page-shell__footer zr-page-shell__region--empty";
1403
+ return html`
1404
+ <div class="zr-page-shell" part="shell">
1405
+ <header class=${headerClass} part="header">
1406
+ <slot name="header" @slotchange=${this.onSlotChange}></slot>
1407
+ </header>
1408
+ <main class="zr-page-shell__main" part="main">
1409
+ <slot></slot>
1410
+ </main>
1411
+ <footer class=${footerClass} part="footer">
1412
+ <slot name="footer" @slotchange=${this.onSlotChange}></slot>
1413
+ </footer>
1414
+ </div>
1415
+ `;
1416
+ }
1417
+ /**
1418
+ * Re-render when a named slot's assignment changes so a footer/header added
1419
+ * after first paint updates the empty-region class. The initial render reads
1420
+ * children synchronously (no empty-then-filled flash).
1421
+ */
1422
+ onSlotChange = () => {
1423
+ this.requestUpdate();
1424
+ };
1425
+ lightDomSlotFilled(slot) {
1426
+ for (const child of this.children) if (child.getAttribute("slot") === slot) return true;
1427
+ return false;
1428
+ }
1429
+ };
1430
+ ZlPageShell = __decorate([customElement("zl-page-shell")], ZlPageShell);
1431
+ const zlPageShellManifest = {
1432
+ tag: "zl-page-shell",
1433
+ attrs: [],
1434
+ parts: [
1435
+ "shell",
1436
+ "header",
1437
+ "main",
1438
+ "footer"
1439
+ ],
1440
+ slots: [
1441
+ "",
1442
+ "header",
1443
+ "footer"
1444
+ ],
1445
+ events: []
1446
+ };
1447
+ //#endregion
1448
+ //#region src/internal/base64url.ts
1449
+ /**
1450
+ * Base64URL encoding/decoding for WebAuthn binary fields.
1451
+ *
1452
+ * WebAuthn's `ArrayBuffer` values (`rawId`, `clientDataJSON`,
1453
+ * `authenticatorData`, `signature`, `attestationObject`, `userHandle`)
1454
+ * must be base64url-encoded before sending as JSON. The WebAuthn JSON
1455
+ * serialization spec (https://www.w3.org/TR/webauthn-3/) requires
1456
+ * Base64URL (RFC 4648 §5) — no padding, URL-safe alphabet.
1457
+ */
1458
+ /**
1459
+ * Encode an `ArrayBuffer` to a Base64URL string (no padding).
1460
+ */
1461
+ function bufferToBase64Url(buffer) {
1462
+ const bytes = new Uint8Array(buffer);
1463
+ let binary = "";
1464
+ for (const byte of bytes) binary += String.fromCharCode(byte);
1465
+ return btoa(binary).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
1466
+ }
1467
+ /**
1468
+ * Decode a Base64URL string to an `ArrayBuffer`.
1469
+ */
1470
+ function base64UrlToBuffer(base64url) {
1471
+ const base64 = base64url.replace(/-/g, "+").replace(/_/g, "/");
1472
+ const padded = base64.padEnd(base64.length + (4 - base64.length % 4) % 4, "=");
1473
+ const binary = atob(padded);
1474
+ const bytes = new Uint8Array(binary.length);
1475
+ for (let i = 0; i < binary.length; i++) bytes[i] = binary.charCodeAt(i);
1476
+ return bytes.buffer;
1477
+ }
1478
+ //#endregion
1479
+ //#region src/atoms/zl-passkey.ts
1480
+ /**
1481
+ * Slack subtracted from `options.timeout` when classifying a
1482
+ * `NotAllowedError` as a timeout: browsers clamp and fire the deadline
1483
+ * slightly early, so an exact comparison would label real timeouts as
1484
+ * user cancellations.
1485
+ */
1486
+ const TIMEOUT_GRACE_MS = 1e3;
1487
+ let ZlPasskey = class ZlPasskey extends LitElement {
1488
+ #_ceremony_accessor_storage = "authenticate";
1489
+ get ceremony() {
1490
+ return this.#_ceremony_accessor_storage;
1491
+ }
1492
+ set ceremony(value) {
1493
+ this.#_ceremony_accessor_storage = value;
1494
+ }
1495
+ #_challengeId_accessor_storage = "";
1496
+ get challengeId() {
1497
+ return this.#_challengeId_accessor_storage;
1498
+ }
1499
+ set challengeId(value) {
1500
+ this.#_challengeId_accessor_storage = value;
1501
+ }
1502
+ #_options_accessor_storage = null;
1503
+ get options() {
1504
+ return this.#_options_accessor_storage;
1505
+ }
1506
+ set options(value) {
1507
+ this.#_options_accessor_storage = value;
1508
+ }
1509
+ #_method_accessor_storage = "passkey";
1510
+ get method() {
1511
+ return this.#_method_accessor_storage;
1512
+ }
1513
+ set method(value) {
1514
+ this.#_method_accessor_storage = value;
1515
+ }
1516
+ #_manual_accessor_storage = false;
1517
+ get manual() {
1518
+ return this.#_manual_accessor_storage;
1519
+ }
1520
+ set manual(value) {
1521
+ this.#_manual_accessor_storage = value;
1522
+ }
1523
+ #_pendingLabel_accessor_storage = "Waiting for your passkey…";
1524
+ get pendingLabel() {
1525
+ return this.#_pendingLabel_accessor_storage;
1526
+ }
1527
+ set pendingLabel(value) {
1528
+ this.#_pendingLabel_accessor_storage = value;
1529
+ }
1530
+ #_cancelLabel_accessor_storage = "Cancel";
1531
+ get cancelLabel() {
1532
+ return this.#_cancelLabel_accessor_storage;
1533
+ }
1534
+ set cancelLabel(value) {
1535
+ this.#_cancelLabel_accessor_storage = value;
1536
+ }
1537
+ #_silent_accessor_storage = false;
1538
+ get silent() {
1539
+ return this.#_silent_accessor_storage;
1540
+ }
1541
+ set silent(value) {
1542
+ this.#_silent_accessor_storage = value;
1543
+ }
1544
+ #_pending_accessor_storage = false;
1545
+ get pending() {
1546
+ return this.#_pending_accessor_storage;
1547
+ }
1548
+ set pending(value) {
1549
+ this.#_pending_accessor_storage = value;
1550
+ }
1551
+ abortController = null;
1552
+ /** `Date.now()` at ceremony start, for timeout classification on reject. */
1553
+ startedAt = 0;
1554
+ connectedCallback() {
1555
+ super.connectedCallback();
1556
+ if (!this.manual && this.options) this.startCeremony();
1557
+ }
1558
+ disconnectedCallback() {
1559
+ this.abort();
1560
+ super.disconnectedCallback();
1561
+ }
1562
+ /**
1563
+ * Abort any in-flight WebAuthn ceremony. Called automatically when the
1564
+ * component disconnects (step change, page navigation) and by the
1565
+ * pending UI's cancel button. Clears `pending` immediately — the
1566
+ * ceremony's own `finally` no longer owns it (its controller is gone).
1567
+ */
1568
+ abort() {
1569
+ this.abortController?.abort();
1570
+ this.abortController = null;
1571
+ this.pending = false;
1572
+ }
1573
+ /**
1574
+ * Trigger the WebAuthn ceremony. Resolves when the ceremony completes
1575
+ * or rejects on error/abort.
1576
+ */
1577
+ async startCeremony() {
1578
+ if (!this.options) {
1579
+ this.emitError("No WebAuthn options provided.", false);
1580
+ return;
1581
+ }
1582
+ if (!window.PublicKeyCredential) {
1583
+ this.emitError("WebAuthn is not supported in this browser.", false);
1584
+ return;
1585
+ }
1586
+ this.abort();
1587
+ const controller = new AbortController();
1588
+ this.abortController = controller;
1589
+ this.pending = true;
1590
+ this.startedAt = Date.now();
1591
+ this.emitStarted();
1592
+ try {
1593
+ const credential = this.ceremony === "register" ? await this.createCredential() : await this.getCredential();
1594
+ if (!credential) {
1595
+ this.emitError("No credential returned by the browser.", false);
1596
+ return;
1597
+ }
1598
+ const proof = this.serializeCredential(credential);
1599
+ this.emitResult(proof);
1600
+ } catch (error) {
1601
+ const aborted = error instanceof DOMException && (error.name === "AbortError" || error.name === "NotAllowedError");
1602
+ const timeoutMs = typeof this.options?.timeout === "number" ? this.options.timeout : null;
1603
+ const timedOut = error instanceof DOMException && error.name === "NotAllowedError" && timeoutMs !== null && Date.now() - this.startedAt >= timeoutMs - TIMEOUT_GRACE_MS;
1604
+ this.emitError(error instanceof Error ? error.message : "WebAuthn ceremony failed.", aborted, timedOut);
1605
+ } finally {
1606
+ if (this.abortController === controller) this.pending = false;
1607
+ }
1608
+ }
1609
+ handleCancelSubmit = (event) => {
1610
+ event.stopPropagation();
1611
+ this.abort();
1612
+ };
1613
+ render() {
1614
+ if (!this.pending || this.silent) return nothing;
1615
+ return html`
1616
+ <div class="zl-passkey-pending" data-testid="zitadel-passkey-pending">
1617
+ <zl-alert severity="info">${this.pendingLabel}</zl-alert>
1618
+ <zl-button
1619
+ hierarchy="secondary"
1620
+ type="button"
1621
+ block
1622
+ data-testid="zitadel-passkey-cancel"
1623
+ label=${this.cancelLabel}
1624
+ @zl-submit=${this.handleCancelSubmit}
1625
+ ></zl-button>
1626
+ </div>
1627
+ `;
1628
+ }
1629
+ /**
1630
+ * `navigator.credentials.get()` — authentication ceremony.
1631
+ */
1632
+ async getCredential() {
1633
+ const opts = this.options;
1634
+ if (!opts) throw new Error("getCredential called without options");
1635
+ const publicKeyOptions = {
1636
+ challenge: base64UrlToBuffer(opts.challenge),
1637
+ rpId: opts.rpId,
1638
+ timeout: opts.timeout,
1639
+ userVerification: opts.userVerification,
1640
+ allowCredentials: this.decodeCredentialDescriptors(opts.allowCredentials)
1641
+ };
1642
+ return await navigator.credentials.get({
1643
+ publicKey: publicKeyOptions,
1644
+ signal: this.abortController?.signal
1645
+ });
1646
+ }
1647
+ /**
1648
+ * `navigator.credentials.create()` — registration ceremony.
1649
+ */
1650
+ async createCredential() {
1651
+ const opts = this.options;
1652
+ if (!opts) throw new Error("createCredential called without options");
1653
+ const rp = opts.rp;
1654
+ const user = opts.user;
1655
+ const pubKeyCredParams = opts.pubKeyCredParams;
1656
+ const publicKeyOptions = {
1657
+ challenge: base64UrlToBuffer(opts.challenge),
1658
+ rp: {
1659
+ name: rp.name,
1660
+ ...rp.id ? { id: rp.id } : {}
1661
+ },
1662
+ user: {
1663
+ id: base64UrlToBuffer(user.id),
1664
+ name: user.name,
1665
+ displayName: user.displayName
1666
+ },
1667
+ pubKeyCredParams: pubKeyCredParams.map((p) => ({
1668
+ type: p.type,
1669
+ alg: p.alg
1670
+ })),
1671
+ timeout: opts.timeout,
1672
+ attestation: opts.attestation ?? "none",
1673
+ authenticatorSelection: opts.authenticatorSelection,
1674
+ excludeCredentials: this.decodeCredentialDescriptors(opts.excludeCredentials)
1675
+ };
1676
+ return await navigator.credentials.create({
1677
+ publicKey: publicKeyOptions,
1678
+ signal: this.abortController?.signal
1679
+ });
1680
+ }
1681
+ /**
1682
+ * Decode a list of credential descriptors from the server's base64url
1683
+ * format to the browser's ArrayBuffer format.
1684
+ */
1685
+ decodeCredentialDescriptors(descriptors) {
1686
+ if (!descriptors) return [];
1687
+ return descriptors.map((d) => ({
1688
+ type: d.type,
1689
+ id: base64UrlToBuffer(d.id),
1690
+ transports: d.transports
1691
+ }));
1692
+ }
1693
+ /**
1694
+ * Serialize a `PublicKeyCredential` to the JSON shape defined in
1695
+ * `passkey-proof.yaml`. All `ArrayBuffer` fields are base64url-encoded.
1696
+ */
1697
+ serializeCredential(credential) {
1698
+ const response = credential.response;
1699
+ const serialized = {
1700
+ id: credential.id,
1701
+ rawId: bufferToBase64Url(credential.rawId),
1702
+ type: "public-key",
1703
+ response: { clientDataJSON: bufferToBase64Url(response.clientDataJSON) }
1704
+ };
1705
+ if ("attestationObject" in response) {
1706
+ const attestation = response;
1707
+ serialized.response.attestationObject = bufferToBase64Url(attestation.attestationObject);
1708
+ }
1709
+ if ("authenticatorData" in response) {
1710
+ const assertion = response;
1711
+ serialized.response.authenticatorData = bufferToBase64Url(assertion.authenticatorData);
1712
+ serialized.response.signature = bufferToBase64Url(assertion.signature);
1713
+ if (assertion.userHandle) serialized.response.userHandle = bufferToBase64Url(assertion.userHandle);
1714
+ }
1715
+ if (credential.authenticatorAttachment) serialized.authenticatorAttachment = credential.authenticatorAttachment;
1716
+ return serialized;
1717
+ }
1718
+ emitResult(proof) {
1719
+ const detail = {
1720
+ challenge_id: this.challengeId,
1721
+ method: this.method,
1722
+ proof
1723
+ };
1724
+ this.dispatchEvent(new CustomEvent("zl-passkey-result", {
1725
+ bubbles: true,
1726
+ composed: true,
1727
+ detail
1728
+ }));
1729
+ }
1730
+ emitError(message, aborted, timedOut = false) {
1731
+ const detail = {
1732
+ challenge_id: this.challengeId,
1733
+ error: message,
1734
+ aborted,
1735
+ timed_out: timedOut
1736
+ };
1737
+ this.dispatchEvent(new CustomEvent("zl-passkey-error", {
1738
+ bubbles: true,
1739
+ composed: true,
1740
+ detail
1741
+ }));
1742
+ }
1743
+ emitStarted() {
1744
+ const detail = {
1745
+ challenge_id: this.challengeId,
1746
+ method: this.method
1747
+ };
1748
+ this.dispatchEvent(new CustomEvent("zl-passkey-started", {
1749
+ bubbles: true,
1750
+ composed: true,
1751
+ detail
1752
+ }));
1753
+ }
1754
+ /**
1755
+ * Light DOM on purpose: the pending UI must land inside the
1756
+ * orchestrator's shadow root (where the step's adopted styles apply)
1757
+ * without altering the `unsafeHTML` step markup — runtime children don't
1758
+ * participate in its string comparison, so the ceremony never restarts.
1759
+ */
1760
+ createRenderRoot() {
1761
+ return this;
1762
+ }
1763
+ };
1764
+ __decorate([property()], ZlPasskey.prototype, "ceremony", null);
1765
+ __decorate([property({ attribute: "challenge-id" })], ZlPasskey.prototype, "challengeId", null);
1766
+ __decorate([property({
1767
+ attribute: "options",
1768
+ converter: {
1769
+ fromAttribute(value) {
1770
+ if (!value) return null;
1771
+ try {
1772
+ return JSON.parse(value);
1773
+ } catch {
1774
+ return null;
1775
+ }
1776
+ },
1777
+ toAttribute(value) {
1778
+ return value ? JSON.stringify(value) : null;
1779
+ }
1780
+ }
1781
+ })], ZlPasskey.prototype, "options", null);
1782
+ __decorate([property({ type: String })], ZlPasskey.prototype, "method", null);
1783
+ __decorate([property({ type: Boolean })], ZlPasskey.prototype, "manual", null);
1784
+ __decorate([property({ attribute: "pending-label" })], ZlPasskey.prototype, "pendingLabel", null);
1785
+ __decorate([property({ attribute: "cancel-label" })], ZlPasskey.prototype, "cancelLabel", null);
1786
+ __decorate([property({ type: Boolean })], ZlPasskey.prototype, "silent", null);
1787
+ __decorate([state()], ZlPasskey.prototype, "pending", null);
1788
+ ZlPasskey = __decorate([customElement("zl-passkey")], ZlPasskey);
1789
+ const zlPasskeyManifest = {
1790
+ tag: "zl-passkey",
1791
+ consumes: {},
1792
+ attrs: [
1793
+ "ceremony",
1794
+ "method",
1795
+ "challenge-id",
1796
+ "options",
1797
+ "manual",
1798
+ "pending-label",
1799
+ "cancel-label",
1800
+ "silent"
1801
+ ],
1802
+ parts: [],
1803
+ slots: [],
1804
+ events: [
1805
+ "zl-passkey-result",
1806
+ "zl-passkey-error",
1807
+ "zl-passkey-started"
1808
+ ]
1809
+ };
1810
+ //#endregion
1811
+ //#region src/atoms/zl-pill.css?inline
1812
+ var zl_pill_default = ":host {\n display: inline-flex;\n}\n\n.zr-pill {\n box-sizing: border-box;\n justify-content: center;\n align-items: center;\n gap: var(--zl-spacing-1);\n height: var(--zl-spacing-5);\n padding-block: var(--zl-spacing-0-5);\n padding-inline: var(--zl-spacing-2);\n border-radius: var(--zl-radius-full);\n background: var(--zl-secondary);\n color: var(--zl-secondary-foreground);\n font-family: var(--zl-font-family-sans);\n font-size: var(--zl-text-xs-size);\n line-height: var(--zl-text-xs-leading);\n font-weight: var(--zl-font-weight-medium);\n white-space: nowrap;\n border: 1px solid #0000;\n text-decoration: none;\n display: inline-flex;\n}\n\n.zr-pill--success {\n background: color-mix(in srgb, var(--zl-success) 15%, transparent);\n color: var(--zl-success);\n}\n\n.zr-pill--error {\n background: color-mix(in srgb, var(--zl-destructive) 15%, transparent);\n color: var(--zl-destructive);\n}\n\n.zr-pill--outline {\n border-color: var(--zl-border);\n color: var(--zl-foreground);\n background: none;\n}\n\na.zr-pill:hover {\n background: color-mix(in srgb, var(--zl-secondary) 80%, transparent);\n}\n\na.zr-pill:focus-visible {\n outline: var(--zl-focus-width) solid var(--zl-ring);\n outline-offset: var(--zl-focus-offset);\n}\n";
1813
+ //#endregion
1814
+ //#region src/atoms/zl-pill.ts
1815
+ let ZlPill = class ZlPill extends LitElement {
1816
+ static styles = [baseHostStyles, ...surfaceStyles(zl_pill_default)];
1817
+ #_tone_accessor_storage = "neutral";
1818
+ get tone() {
1819
+ return this.#_tone_accessor_storage;
1820
+ }
1821
+ set tone(value) {
1822
+ this.#_tone_accessor_storage = value;
1823
+ }
1824
+ #_href_accessor_storage = void 0;
1825
+ get href() {
1826
+ return this.#_href_accessor_storage;
1827
+ }
1828
+ set href(value) {
1829
+ this.#_href_accessor_storage = value;
1830
+ }
1831
+ #_ariaLabel_accessor_storage = null;
1832
+ get ariaLabel() {
1833
+ return this.#_ariaLabel_accessor_storage;
1834
+ }
1835
+ set ariaLabel(value) {
1836
+ this.#_ariaLabel_accessor_storage = value;
1837
+ }
1838
+ render() {
1839
+ const classes = classMap({
1840
+ "zr-pill": true,
1841
+ [`zr-pill--${this.tone}`]: this.tone !== "neutral"
1842
+ });
1843
+ if (this.href) return html`<a
1844
+ class=${classes}
1845
+ part="pill"
1846
+ href=${this.href}
1847
+ rel="noopener"
1848
+ aria-label=${this.ariaLabel ?? nothing}
1849
+ ><slot></slot></a>`;
1850
+ return html`<span class=${classes} part="pill"><slot></slot></span>`;
1851
+ }
1852
+ };
1853
+ __decorate([property()], ZlPill.prototype, "tone", null);
1854
+ __decorate([property()], ZlPill.prototype, "href", null);
1855
+ __decorate([property({ attribute: "aria-label" })], ZlPill.prototype, "ariaLabel", null);
1856
+ ZlPill = __decorate([customElement("zl-pill")], ZlPill);
1857
+ const zlPillManifest = {
1858
+ tag: "zl-pill",
1859
+ attrs: [
1860
+ "tone",
1861
+ "href",
1862
+ "aria-label"
1863
+ ],
1864
+ parts: ["pill"],
1865
+ slots: [""],
1866
+ events: []
1867
+ };
1868
+ //#endregion
1869
+ //#region src/atoms/zl-select.css?inline
1870
+ var zl_select_default = ":host {\n display: block;\n}\n\n:host([disabled]) {\n cursor: not-allowed;\n}\n\n.zr-select {\n align-items: stretch;\n gap: var(--zl-spacing-2);\n font-family: var(--zl-font-family-sans);\n flex-direction: column;\n display: flex;\n}\n\n.zr-select__label {\n align-items: center;\n gap: var(--zl-spacing-1);\n font-size: var(--zl-text-sm-size);\n font-weight: var(--zl-font-weight-medium);\n line-height: var(--zl-text-sm-leading);\n color: var(--zl-foreground);\n display: inline-flex;\n}\n\n.zr-select__required {\n color: var(--zl-destructive);\n}\n\n.zr-select--disabled .zr-select__label {\n color: var(--zl-muted-foreground);\n}\n\n.zr-select__field {\n position: relative;\n}\n\n.zr-select__native {\n opacity: 0;\n pointer-events: none;\n -webkit-appearance: none;\n appearance: none;\n border: 0;\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n position: absolute;\n inset: 0;\n}\n\n.zr-select__trigger {\n align-items: center;\n gap: var(--zl-spacing-2);\n width: 100%;\n height: var(--zl-spacing-9);\n padding-block: var(--zl-spacing-2);\n padding-inline: var(--zl-spacing-4);\n border-radius: var(--zl-radius-sm);\n border: 1px solid var(--zl-input);\n color: var(--zl-foreground);\n font-family: inherit;\n font-size: var(--zl-text-sm-size);\n line-height: var(--zl-text-sm-leading);\n font-weight: var(--zl-font-weight-normal);\n text-align: start;\n cursor: pointer;\n transition: border-color var(--zl-duration-fast) var(--zl-easing-standard),\n background-color var(--zl-duration-fast) var(--zl-easing-standard);\n background: none;\n margin: 0;\n display: flex;\n}\n\n.zr-select__value {\n text-overflow: ellipsis;\n white-space: nowrap;\n min-width: 0;\n color: var(--zl-foreground);\n flex: auto;\n overflow: hidden;\n}\n\n.zr-select__value--placeholder {\n color: var(--zl-muted-foreground);\n}\n\n.zr-select__icon {\n color: var(--zl-muted-foreground);\n transition: transform var(--zl-duration-fast)\n var(--zl-easing-standard);\n flex-shrink: 0;\n display: inline-flex;\n}\n\n.zr-select--open .zr-select__icon {\n transform: rotate(180deg);\n}\n\n.zr-select:not(.zr-select--disabled):not(.zr-select--open) .zr-select__trigger:hover {\n border-color: var(--zl-ring);\n background-color: color-mix(in srgb, var(--zl-foreground) 10%, transparent);\n}\n\n.zr-select:not(.zr-select--disabled) .zr-select__field:focus-within .zr-select__trigger, .zr-select--open .zr-select__trigger {\n border-color: var(--zl-ring);\n outline: none;\n}\n\n.zr-select--disabled .zr-select__trigger {\n border-color: var(--zl-input);\n color: var(--zl-muted-foreground);\n cursor: not-allowed;\n}\n\n.zr-select--disabled .zr-select__value--placeholder {\n color: var(--zl-muted-foreground);\n}\n\n.zr-select--invalid .zr-select__trigger, .zr-select--invalid .zr-select__field:focus-within .zr-select__trigger {\n border-color: var(--zl-destructive);\n}\n\n.zr-select__error {\n font-size: var(--zl-text-sm-size);\n line-height: var(--zl-text-sm-leading);\n color: var(--zl-destructive);\n}\n\n.zr-select__listbox {\n top: calc(100% + var(--zl-spacing-2));\n z-index: 20;\n border-radius: var(--zl-radius-sm);\n border: 1px solid var(--zl-input);\n background: var(--zl-background);\n max-height: 15rem;\n margin: 0;\n padding: 0;\n list-style: none;\n position: absolute;\n left: 0;\n right: 0;\n overflow-y: auto;\n}\n\n.zr-select__listbox[hidden] {\n display: none;\n}\n\n.zr-select__option {\n align-items: center;\n gap: var(--zl-spacing-2);\n height: var(--zl-spacing-9);\n padding-block: var(--zl-spacing-2);\n padding-inline: var(--zl-spacing-4);\n font-size: var(--zl-text-sm-size);\n line-height: var(--zl-text-sm-leading);\n color: var(--zl-foreground);\n cursor: pointer;\n display: flex;\n}\n\n.zr-select__option-label {\n text-overflow: ellipsis;\n white-space: nowrap;\n flex: auto;\n min-width: 0;\n overflow: hidden;\n}\n\n.zr-select__option-check {\n color: var(--zl-foreground);\n opacity: 0;\n flex-shrink: 0;\n display: inline-flex;\n}\n\n.zr-select__option:not([data-disabled]):hover, .zr-select__option[data-active]:not([data-disabled]) {\n background-color: color-mix(in srgb, var(--zl-foreground) 10%, transparent);\n}\n\n.zr-select__option[data-selected] {\n background-color: var(--zl-popover);\n}\n\n.zr-select__option[data-selected] .zr-select__option-check {\n opacity: 1;\n}\n\n.zr-select__option[data-disabled] {\n color: var(--zl-muted-foreground);\n cursor: not-allowed;\n}\n";
1871
+ //#endregion
1872
+ //#region src/atoms/zl-select.ts
1873
+ let ZlSelect = class ZlSelect extends LitElement {
1874
+ static formAssociated = true;
1875
+ static shadowRootOptions = {
1876
+ ...LitElement.shadowRootOptions,
1877
+ delegatesFocus: true
1878
+ };
1879
+ static styles = [baseHostStyles, ...surfaceStyles(zl_select_default)];
1880
+ /**
1881
+ * Field name — used as the key in form submission and in `zl-change` detail.
1882
+ * Managed manually to avoid clobbering the native form-associated `name`
1883
+ * accessor the browser owns (see `<zl-field>` / `<zl-checkbox>`).
1884
+ */
1885
+ get name() {
1886
+ return this.getAttribute("name") ?? "";
1887
+ }
1888
+ set name(value) {
1889
+ this.setAttribute("name", value);
1890
+ }
1891
+ #_label_accessor_storage = "";
1892
+ get label() {
1893
+ return this.#_label_accessor_storage;
1894
+ }
1895
+ set label(value) {
1896
+ this.#_label_accessor_storage = value;
1897
+ }
1898
+ #_value_accessor_storage = "";
1899
+ get value() {
1900
+ return this.#_value_accessor_storage;
1901
+ }
1902
+ set value(value) {
1903
+ this.#_value_accessor_storage = value;
1904
+ }
1905
+ #_placeholder_accessor_storage = "Select…";
1906
+ get placeholder() {
1907
+ return this.#_placeholder_accessor_storage;
1908
+ }
1909
+ set placeholder(value) {
1910
+ this.#_placeholder_accessor_storage = value;
1911
+ }
1912
+ #_options_accessor_storage = [];
1913
+ get options() {
1914
+ return this.#_options_accessor_storage;
1915
+ }
1916
+ set options(value) {
1917
+ this.#_options_accessor_storage = value;
1918
+ }
1919
+ #_required_accessor_storage = false;
1920
+ get required() {
1921
+ return this.#_required_accessor_storage;
1922
+ }
1923
+ set required(value) {
1924
+ this.#_required_accessor_storage = value;
1925
+ }
1926
+ #_error_accessor_storage = "";
1927
+ get error() {
1928
+ return this.#_error_accessor_storage;
1929
+ }
1930
+ set error(value) {
1931
+ this.#_error_accessor_storage = value;
1932
+ }
1933
+ #_invalid_accessor_storage = false;
1934
+ get invalid() {
1935
+ return this.#_invalid_accessor_storage;
1936
+ }
1937
+ set invalid(value) {
1938
+ this.#_invalid_accessor_storage = value;
1939
+ }
1940
+ #_disabled_accessor_storage = false;
1941
+ get disabled() {
1942
+ return this.#_disabled_accessor_storage;
1943
+ }
1944
+ set disabled(value) {
1945
+ this.#_disabled_accessor_storage = value;
1946
+ }
1947
+ #_open_accessor_storage = false;
1948
+ get open() {
1949
+ return this.#_open_accessor_storage;
1950
+ }
1951
+ set open(value) {
1952
+ this.#_open_accessor_storage = value;
1953
+ }
1954
+ #_ariaLabelText_accessor_storage = void 0;
1955
+ get ariaLabelText() {
1956
+ return this.#_ariaLabelText_accessor_storage;
1957
+ }
1958
+ set ariaLabelText(value) {
1959
+ this.#_ariaLabelText_accessor_storage = value;
1960
+ }
1961
+ #_testId_accessor_storage = void 0;
1962
+ get testId() {
1963
+ return this.#_testId_accessor_storage;
1964
+ }
1965
+ set testId(value) {
1966
+ this.#_testId_accessor_storage = value;
1967
+ }
1968
+ #_activeValue_accessor_storage = null;
1969
+ get activeValue() {
1970
+ return this.#_activeValue_accessor_storage;
1971
+ }
1972
+ set activeValue(value) {
1973
+ this.#_activeValue_accessor_storage = value;
1974
+ }
1975
+ #_nativeEl_accessor_storage = null;
1976
+ get nativeEl() {
1977
+ return this.#_nativeEl_accessor_storage;
1978
+ }
1979
+ set nativeEl(value) {
1980
+ this.#_nativeEl_accessor_storage = value;
1981
+ }
1982
+ baseId = nextUid("zl-select");
1983
+ internals;
1984
+ defaultValue = "";
1985
+ constructor() {
1986
+ super();
1987
+ this.internals = this.attachInternals();
1988
+ }
1989
+ connectedCallback() {
1990
+ super.connectedCallback();
1991
+ this.defaultValue = this.getAttribute("value") ?? "";
1992
+ this.syncFormState();
1993
+ document.addEventListener("pointerdown", this.handleDocumentPointerDown, true);
1994
+ document.addEventListener("keydown", this.handleDocumentKeydown, true);
1995
+ }
1996
+ disconnectedCallback() {
1997
+ super.disconnectedCallback();
1998
+ document.removeEventListener("pointerdown", this.handleDocumentPointerDown, true);
1999
+ document.removeEventListener("keydown", this.handleDocumentKeydown, true);
2000
+ }
2001
+ willUpdate(changed) {
2002
+ if (changed.has("value") || changed.has("required")) this.syncFormState();
2003
+ if (changed.has("disabled") && this.disabled) this.open = false;
2004
+ }
2005
+ formResetCallback() {
2006
+ this.value = this.defaultValue;
2007
+ this.open = false;
2008
+ }
2009
+ formStateRestoreCallback(state) {
2010
+ this.value = state ?? "";
2011
+ }
2012
+ focus(options) {
2013
+ this.nativeEl?.focus(options);
2014
+ }
2015
+ /**
2016
+ * The string this control contributes to form submission — the uniform
2017
+ * read/write contract `<zitadel-login>` uses to capture and restore field
2018
+ * values without knowing each atom's internal shape. For a select that is
2019
+ * simply the chosen option's value (empty = nothing chosen).
2020
+ */
2021
+ get formValue() {
2022
+ return this.value;
2023
+ }
2024
+ set formValue(value) {
2025
+ this.value = value;
2026
+ }
2027
+ /**
2028
+ * Options as painted in the listbox: a leading empty row (labelled with the
2029
+ * placeholder) so the user can return to "no selection". For a `required`
2030
+ * field this empty row is the prompt — choosing it leaves the value empty,
2031
+ * so `required` validation still blocks submit (native `<select>`
2032
+ * semantics). Any empty-valued member of the caller's list is dropped first,
2033
+ * so a schema enum that lists "" doesn't render a second, duplicate empty
2034
+ * option. The public `options` property stays the caller's list.
2035
+ */
2036
+ get listOptions() {
2037
+ return [{
2038
+ value: "",
2039
+ label: this.placeholder
2040
+ }, ...this.options.filter((o) => o.value !== "")];
2041
+ }
2042
+ render() {
2043
+ const labelId = `${this.baseId}-label`;
2044
+ const errorId = `${this.baseId}-error`;
2045
+ const showError = Boolean(this.error);
2046
+ const selected = this.value === "" ? void 0 : this.options.find((option) => option.value === this.value);
2047
+ return html`
2048
+ <div class=${classMap({
2049
+ "zr-select": true,
2050
+ "zr-select--open": this.open,
2051
+ "zr-select--invalid": this.invalid || showError,
2052
+ "zr-select--disabled": this.disabled
2053
+ })} part="root">
2054
+ ${this.renderLabel(labelId)}
2055
+ <div class="zr-select__field" part="field">
2056
+ <select
2057
+ class="zr-select__native"
2058
+ part="native"
2059
+ id=${`${this.baseId}-native`}
2060
+ data-testid=${ifDefined(this.nativeTestId())}
2061
+ aria-labelledby=${this.label ? labelId : nothing}
2062
+ aria-label=${ifDefined(this.label ? void 0 : this.ariaLabelText)}
2063
+ aria-invalid=${this.invalid || showError ? "true" : "false"}
2064
+ aria-describedby=${showError ? errorId : nothing}
2065
+ ?disabled=${this.disabled}
2066
+ ?required=${this.required}
2067
+ @change=${this.handleNativeChange}
2068
+ >
2069
+ ${this.listOptions.map((option) => html`<option
2070
+ value=${option.value}
2071
+ ?disabled=${option.disabled ?? false}
2072
+ .selected=${live(option.value === this.value)}
2073
+ >${option.label}</option>`)}
2074
+ </select>
2075
+ <div
2076
+ class="zr-select__trigger"
2077
+ part="trigger"
2078
+ aria-hidden="true"
2079
+ @click=${this.handleTriggerClick}
2080
+ >
2081
+ <span
2082
+ class=${classMap({
2083
+ "zr-select__value": true,
2084
+ "zr-select__value--placeholder": !selected
2085
+ })}
2086
+ >
2087
+ ${selected ? selected.label : this.placeholder}
2088
+ </span>
2089
+ <zl-icon class="zr-select__icon" name="chevron-down" size="16" decorative></zl-icon>
2090
+ </div>
2091
+ <ul class="zr-select__listbox" part="listbox" aria-hidden="true" ?hidden=${!this.open}>
2092
+ ${this.listOptions.map((option) => this.renderOption(option))}
2093
+ </ul>
2094
+ </div>
2095
+ <div
2096
+ class="zr-select__error"
2097
+ part="error"
2098
+ id=${errorId}
2099
+ role="alert"
2100
+ ?hidden=${!showError}
2101
+ >
2102
+ ${this.error}
2103
+ </div>
2104
+ </div>
2105
+ `;
2106
+ }
2107
+ renderLabel(labelId) {
2108
+ if (!this.label) return null;
2109
+ return html`
2110
+ <label class="zr-select__label" part="label" id=${labelId} @click=${this.handleLabelClick}>
2111
+ <span>${this.label}</span>
2112
+ ${this.required ? html`<span class="zr-select__required" aria-hidden="true">*</span>` : null}
2113
+ </label>
2114
+ `;
2115
+ }
2116
+ renderOption(option) {
2117
+ const isSelected = option.value === this.value;
2118
+ return html`
2119
+ <li
2120
+ class="zr-select__option"
2121
+ part="option"
2122
+ data-value=${option.value}
2123
+ data-selected=${isSelected ? "" : nothing}
2124
+ data-active=${this.open && option.value === this.activeValue ? "" : nothing}
2125
+ data-disabled=${option.disabled ? "" : nothing}
2126
+ @click=${() => this.handleOptionClick(option)}
2127
+ @pointermove=${() => this.handleOptionPointerMove(option)}
2128
+ >
2129
+ <span class="zr-select__option-label">${option.label}</span>
2130
+ <zl-icon class="zr-select__option-check" name="check" size="16" decorative></zl-icon>
2131
+ </li>
2132
+ `;
2133
+ }
2134
+ handleLabelClick = () => {
2135
+ if (!this.disabled) this.nativeEl?.focus();
2136
+ };
2137
+ handleTriggerClick = () => {
2138
+ if (this.disabled) return;
2139
+ this.open = !this.open;
2140
+ };
2141
+ /**
2142
+ * The native `<select>` is the source of truth for keyboard, AT, and
2143
+ * automation. Its `change` event covers native-popup selection as well as
2144
+ * programmatic value-setting by automation drivers.
2145
+ */
2146
+ handleNativeChange = (event) => {
2147
+ const next = event.target.value;
2148
+ this.open = false;
2149
+ this.commitValue(next);
2150
+ };
2151
+ handleOptionClick(option) {
2152
+ if (option.disabled) return;
2153
+ this.open = false;
2154
+ this.nativeEl?.focus();
2155
+ this.commitValue(option.value);
2156
+ }
2157
+ handleOptionPointerMove(option) {
2158
+ if (!option.disabled && option.value !== this.activeValue) this.activeValue = option.value;
2159
+ }
2160
+ handleDocumentPointerDown = (event) => {
2161
+ if (this.open && !event.composedPath().includes(this)) this.open = false;
2162
+ };
2163
+ /**
2164
+ * Escape closes the styled popup and stops propagation so it doesn't also
2165
+ * dismiss an enclosing dialog.
2166
+ */
2167
+ handleDocumentKeydown = (event) => {
2168
+ if (this.open && event.key === "Escape") {
2169
+ event.stopPropagation();
2170
+ this.open = false;
2171
+ this.nativeEl?.focus();
2172
+ }
2173
+ };
2174
+ /**
2175
+ * Apply a new value from any input path (native select, styled popup), keeping
2176
+ * `value`, form state, and listeners in sync and emitting the `zl-change`
2177
+ * contract plus a composed native `change` for host forms.
2178
+ */
2179
+ commitValue(next) {
2180
+ if (next === this.value) return;
2181
+ this.value = next;
2182
+ this.syncFormState();
2183
+ emit(this, "zl-change", {
2184
+ name: this.name,
2185
+ value: this.value
2186
+ });
2187
+ this.dispatchEvent(new Event("change", {
2188
+ bubbles: true,
2189
+ composed: true
2190
+ }));
2191
+ }
2192
+ syncFormState() {
2193
+ this.internals.setFormValue?.(this.value || null);
2194
+ if (this.required && !this.value) this.internals.setValidity?.({ valueMissing: true }, "Please select an item in the list.", this.nativeEl ?? void 0);
2195
+ else this.internals.setValidity?.({});
2196
+ }
2197
+ nativeTestId() {
2198
+ if (this.name) return `zitadel-select-${this.name}`;
2199
+ if (this.testId) return `${this.testId}-native`;
2200
+ }
2201
+ };
2202
+ __decorate([property()], ZlSelect.prototype, "label", null);
2203
+ __decorate([property()], ZlSelect.prototype, "value", null);
2204
+ __decorate([property()], ZlSelect.prototype, "placeholder", null);
2205
+ __decorate([property({
2206
+ attribute: "options",
2207
+ converter: { fromAttribute(value) {
2208
+ if (!value) return [];
2209
+ try {
2210
+ const parsed = JSON.parse(value);
2211
+ return Array.isArray(parsed) ? parsed : [];
2212
+ } catch {
2213
+ return [];
2214
+ }
2215
+ } }
2216
+ })], ZlSelect.prototype, "options", null);
2217
+ __decorate([property({ type: Boolean })], ZlSelect.prototype, "required", null);
2218
+ __decorate([property()], ZlSelect.prototype, "error", null);
2219
+ __decorate([property({
2220
+ type: Boolean,
2221
+ reflect: true
2222
+ })], ZlSelect.prototype, "invalid", null);
2223
+ __decorate([property({
2224
+ type: Boolean,
2225
+ reflect: true
2226
+ })], ZlSelect.prototype, "disabled", null);
2227
+ __decorate([property({
2228
+ type: Boolean,
2229
+ reflect: true
2230
+ })], ZlSelect.prototype, "open", null);
2231
+ __decorate([property({ attribute: "aria-label" })], ZlSelect.prototype, "ariaLabelText", null);
2232
+ __decorate([property({ attribute: "data-testid" })], ZlSelect.prototype, "testId", null);
2233
+ __decorate([state()], ZlSelect.prototype, "activeValue", null);
2234
+ __decorate([query(".zr-select__native")], ZlSelect.prototype, "nativeEl", null);
2235
+ ZlSelect = __decorate([customElement("zl-select")], ZlSelect);
2236
+ const zlSelectManifest = {
2237
+ tag: "zl-select",
2238
+ attrs: [
2239
+ "name",
2240
+ "label",
2241
+ "value",
2242
+ "placeholder",
2243
+ "options",
2244
+ "required",
2245
+ "error",
2246
+ "invalid",
2247
+ "disabled",
2248
+ "open",
2249
+ "aria-label",
2250
+ "data-testid"
2251
+ ],
2252
+ parts: [
2253
+ "root",
2254
+ "label",
2255
+ "field",
2256
+ "native",
2257
+ "trigger",
2258
+ "listbox",
2259
+ "option",
2260
+ "error"
2261
+ ],
2262
+ slots: [],
2263
+ events: ["zl-change"]
2264
+ };
2265
+ //#endregion
2266
+ export { focusVisibleStyles as C, emit as E, __decorate as S, t as T, zlButtonManifest as _, ZlPasskey as a, ZlIcon as b, zlPageShellManifest as c, hookName as d, ZlCheckbox as f, ZlButton as g, zlCardManifest as h, zlPillManifest as i, ZlField as l, ZlCard as m, zlSelectManifest as n, zlPasskeyManifest as o, zlCheckboxManifest as p, ZlPill as r, ZlPageShell as s, ZlSelect as t, zlFieldManifest as u, ZlAlert as v, baseHostStyles as w, zlIconManifest as x, zlAlertManifest as y };
2267
+
2268
+ //# sourceMappingURL=atoms-DSxjEHca.mjs.map