@transcodes/ui-components 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4372 @@
1
+ import "@transcodes/design-tokens";
2
+ import { css as c, LitElement as d, html as l, unsafeCSS as kt } from "lit";
3
+ import { property as n, customElement as p, state as S } from "lit/decorators.js";
4
+ import { styleMap as m } from "lit/directives/style-map.js";
5
+ import { classMap as B } from "lit/directives/class-map.js";
6
+ import { unsafeStatic as $t, html as _t } from "lit/static-html.js";
7
+ class P {
8
+ constructor(e) {
9
+ this.host = e, this.host.addController(this);
10
+ }
11
+ }
12
+ class j extends P {
13
+ constructor(e, s = 300) {
14
+ super(e), this._state = "hidden", typeof s == "number" ? (this.showDuration = s, this.hideDuration = s) : (this.showDuration = s.showDuration ?? 300, this.hideDuration = s.hideDuration ?? 300);
15
+ }
16
+ get state() {
17
+ return this._state;
18
+ }
19
+ get isVisible() {
20
+ return this._state === "visible" || this._state === "showing";
21
+ }
22
+ get isHidden() {
23
+ return this._state === "hidden";
24
+ }
25
+ async show() {
26
+ this._state === "visible" || this._state === "showing" || (this._state = "showing", this.host.requestUpdate(), await this.waitForTransition(this.showDuration), this._state = "visible", this.host.requestUpdate());
27
+ }
28
+ async hide() {
29
+ this._state === "hidden" || this._state === "hiding" || (this._state = "hiding", this.host.requestUpdate(), await this.waitForTransition(this.hideDuration), this._state = "hidden", this.host.requestUpdate());
30
+ }
31
+ toggle() {
32
+ return this.isVisible ? this.hide() : this.show();
33
+ }
34
+ waitForTransition(e) {
35
+ return new Promise((s) => {
36
+ setTimeout(s, e);
37
+ });
38
+ }
39
+ }
40
+ class Fe extends P {
41
+ constructor() {
42
+ super(...arguments), this.errors = /* @__PURE__ */ new Map();
43
+ }
44
+ get isValid() {
45
+ return this.errors.size === 0;
46
+ }
47
+ getError(e) {
48
+ return this.errors.get(e);
49
+ }
50
+ getAllErrors() {
51
+ return new Map(this.errors);
52
+ }
53
+ validate(e, s, i) {
54
+ this.clearError(e);
55
+ for (const t of i)
56
+ if (!this.runRule(s, t))
57
+ return this.errors.set(e, t.message), this.host.requestUpdate(), !1;
58
+ return !0;
59
+ }
60
+ clearError(e) {
61
+ this.errors.has(e) && (this.errors.delete(e), this.host.requestUpdate());
62
+ }
63
+ reset() {
64
+ this.errors.clear(), this.host.requestUpdate();
65
+ }
66
+ runRule(e, s) {
67
+ switch (s.type) {
68
+ case "required":
69
+ return e.trim().length > 0;
70
+ case "email":
71
+ return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e);
72
+ case "minLength":
73
+ return e.length >= s.value;
74
+ case "maxLength":
75
+ return e.length <= s.value;
76
+ case "pattern":
77
+ return s.value.test(e);
78
+ case "custom":
79
+ return s.validator ? s.validator(e) : !0;
80
+ default:
81
+ return !0;
82
+ }
83
+ }
84
+ }
85
+ class Ct extends P {
86
+ constructor() {
87
+ super(...arguments), this.hasAddedEntry = !1, this.handlePopState = () => {
88
+ this.hasAddedEntry && (this.hasAddedEntry = !1, this.onPopCallback?.());
89
+ };
90
+ }
91
+ push(e = { modal: !0 }) {
92
+ this.hasAddedEntry || (history.pushState(e, ""), this.hasAddedEntry = !0);
93
+ }
94
+ pop() {
95
+ this.hasAddedEntry && (this.hasAddedEntry = !1);
96
+ }
97
+ onPopState(e) {
98
+ this.onPopCallback = e;
99
+ }
100
+ hostConnected() {
101
+ window.addEventListener("popstate", this.handlePopState);
102
+ }
103
+ hostDisconnected() {
104
+ window.removeEventListener("popstate", this.handlePopState), this.onPopCallback = void 0;
105
+ }
106
+ }
107
+ class zt extends P {
108
+ constructor() {
109
+ super(...arguments), this._isLoading = !1, this._progress = 0;
110
+ }
111
+ get isLoading() {
112
+ return this._isLoading;
113
+ }
114
+ get progress() {
115
+ return this._progress;
116
+ }
117
+ start() {
118
+ this._isLoading = !0, this._progress = 0, this.host.requestUpdate();
119
+ }
120
+ setProgress(e) {
121
+ this._progress = Math.max(0, Math.min(100, e)), this.host.requestUpdate();
122
+ }
123
+ complete() {
124
+ this._progress = 100, this._isLoading = !1, this.host.requestUpdate();
125
+ }
126
+ reset() {
127
+ this._isLoading = !1, this._progress = 0, this.host.requestUpdate();
128
+ }
129
+ }
130
+ class Dt extends P {
131
+ constructor(e, s) {
132
+ super(e), this._matches = !1, this.handleChange = (i) => {
133
+ this._matches = i.matches, this.host.requestUpdate();
134
+ }, this.mediaQuery = window.matchMedia(s), this._matches = this.mediaQuery.matches;
135
+ }
136
+ get matches() {
137
+ return this._matches;
138
+ }
139
+ hostConnected() {
140
+ this.mediaQuery.addEventListener("change", this.handleChange);
141
+ }
142
+ hostDisconnected() {
143
+ this.mediaQuery.removeEventListener("change", this.handleChange);
144
+ }
145
+ }
146
+ class Ot extends P {
147
+ /**
148
+ * @param host - The reactive controller host
149
+ * @param targetOrigin - The origin to accept messages from and send messages to.
150
+ * SECURITY NOTE: Using '*' accepts messages from any origin which can be dangerous.
151
+ * Always specify an explicit origin in production environments.
152
+ */
153
+ constructor(e, s = "*") {
154
+ super(e), this.handlers = /* @__PURE__ */ new Map(), this.wildcardHandlers = /* @__PURE__ */ new Set(), this.handleMessage = (i) => {
155
+ if (!(this.targetOrigin !== "*" && i.origin !== this.targetOrigin) && i.data && typeof i.data == "object" && typeof i.data.type == "string") {
156
+ const { type: t, payload: a } = i.data;
157
+ this.handlers.get(t)?.forEach((ct) => {
158
+ ct(a);
159
+ }), this.wildcardHandlers.forEach((ct) => {
160
+ ct(t, a);
161
+ });
162
+ }
163
+ }, this.targetOrigin = s, s === "*" && typeof window < "u" && window.location.protocol !== "file:" && console.warn(
164
+ '[MessageBusController] Using targetOrigin="*" accepts messages from any origin. For security, specify an explicit origin in production.'
165
+ );
166
+ }
167
+ send(e, s, i = window) {
168
+ i.postMessage({ type: e, payload: s }, this.targetOrigin);
169
+ }
170
+ sendToFrame(e, s, i) {
171
+ e.contentWindow?.postMessage({ type: s, payload: i }, this.targetOrigin);
172
+ }
173
+ onMessage(e, s) {
174
+ return e === "*" ? (this.wildcardHandlers.add(s), () => {
175
+ this.wildcardHandlers.delete(s);
176
+ }) : (this.handlers.has(e) || this.handlers.set(e, /* @__PURE__ */ new Set()), this.handlers.get(e)?.add(s), () => {
177
+ this.handlers.get(e)?.delete(s);
178
+ });
179
+ }
180
+ hostConnected() {
181
+ window.addEventListener("message", this.handleMessage);
182
+ }
183
+ hostDisconnected() {
184
+ window.removeEventListener("message", this.handleMessage), this.handlers.clear();
185
+ }
186
+ }
187
+ class bt extends P {
188
+ constructor(e, s, i = localStorage) {
189
+ super(e), this._value = null, this.handleStorageChange = (t) => {
190
+ t.key === this.key && t.storageArea === this.storage && (this.load(), this.host.requestUpdate());
191
+ }, this.key = s, this.storage = i, this.load();
192
+ }
193
+ get value() {
194
+ return this._value;
195
+ }
196
+ set(e) {
197
+ this._value = e;
198
+ try {
199
+ this.storage.setItem(this.key, JSON.stringify(e));
200
+ } catch {
201
+ console.warn(`Failed to save to storage: ${this.key}`);
202
+ }
203
+ this.host.requestUpdate();
204
+ }
205
+ remove() {
206
+ this._value = null, this.storage.removeItem(this.key), this.host.requestUpdate();
207
+ }
208
+ load() {
209
+ try {
210
+ const e = this.storage.getItem(this.key);
211
+ e !== null && (this._value = JSON.parse(e));
212
+ } catch {
213
+ this._value = null;
214
+ }
215
+ }
216
+ hostConnected() {
217
+ window.addEventListener("storage", this.handleStorageChange);
218
+ }
219
+ hostDisconnected() {
220
+ window.removeEventListener("storage", this.handleStorageChange);
221
+ }
222
+ }
223
+ var St = Object.defineProperty, Pt = Object.getOwnPropertyDescriptor, yt = (r, e, s, i) => {
224
+ for (var t = i > 1 ? void 0 : i ? Pt(e, s) : e, a = r.length - 1, o; a >= 0; a--)
225
+ (o = r[a]) && (t = (i ? o(e, s, t) : o(t)) || t);
226
+ return i && t && St(e, s, t), t;
227
+ };
228
+ let it = class extends d {
229
+ constructor() {
230
+ super(...arguments), this.sx = {};
231
+ }
232
+ render() {
233
+ return l`
234
+ <div part="box" class="box" style=${m(this.sx)}>
235
+ <slot></slot>
236
+ </div>
237
+ `;
238
+ }
239
+ };
240
+ it.styles = c`
241
+ :host {
242
+ display: contents;
243
+ }
244
+
245
+ .box {
246
+ display: block;
247
+ }
248
+ `;
249
+ yt([
250
+ n({ type: Object })
251
+ ], it.prototype, "sx", 2);
252
+ it = yt([
253
+ p("tc-box")
254
+ ], it);
255
+ const jt = `/**
256
+ * Do not edit directly, this file was auto-generated.
257
+ */
258
+
259
+ /* Animations */
260
+ @keyframes fadeInUp {
261
+ 0% {
262
+ opacity: 0;
263
+ transform: translateY(1rem);
264
+ }
265
+ 100% {
266
+ opacity: 1;
267
+ transform: translateY(0);
268
+ }
269
+ }
270
+
271
+ @keyframes slideDown {
272
+ 0% {
273
+ opacity: 0;
274
+ transform: translateY(-0.5rem);
275
+ }
276
+ 100% {
277
+ opacity: 1;
278
+ transform: translateY(0);
279
+ }
280
+ }
281
+
282
+ @keyframes slideUp {
283
+ 0% {
284
+ opacity: 0;
285
+ transform: translateY(0.5rem);
286
+ }
287
+ 100% {
288
+ opacity: 1;
289
+ transform: translateY(0);
290
+ }
291
+ }
292
+
293
+ @keyframes spin {
294
+ to {
295
+ transform: rotate(360deg);
296
+ }
297
+ }
298
+
299
+ @keyframes shake {
300
+ 0%, 100% {
301
+ transform: translateX(0);
302
+ }
303
+ 25% {
304
+ transform: translateX(-0.25rem);
305
+ }
306
+ 75% {
307
+ transform: translateX(0.25rem);
308
+ }
309
+ }
310
+
311
+ @keyframes inkFloat {
312
+ 0%, 100% {
313
+ transform: translate(0, 0) scale(1);
314
+ opacity: 0.5;
315
+ }
316
+ 50% {
317
+ transform: translate(0.625rem, -0.625rem) scale(1.1);
318
+ opacity: 0.7;
319
+ }
320
+ }
321
+
322
+ @keyframes inkDrift {
323
+ 0%, 100% {
324
+ transform: translate(0, 0) rotate(0deg);
325
+ opacity: 0.4;
326
+ }
327
+ 33% {
328
+ transform: translate(-0.5rem, 0.5rem) rotate(-5deg);
329
+ opacity: 0.6;
330
+ }
331
+ 66% {
332
+ transform: translate(0.375rem, -0.375rem) rotate(3deg);
333
+ opacity: 0.5;
334
+ }
335
+ }
336
+
337
+ @keyframes inkSpread {
338
+ 0% {
339
+ transform: scale(0);
340
+ opacity: 0.4;
341
+ }
342
+ 100% {
343
+ transform: scale(var(--ink-effect-spread-scale, 2.5));
344
+ opacity: 0;
345
+ }
346
+ }
347
+
348
+ /* Page Layout */
349
+ .page-container {
350
+ position: relative;
351
+ width: 100%;
352
+ max-width: var(--page-container-max-width);
353
+ margin: 0 auto;
354
+ padding: 0 var(--page-container-padding);
355
+ animation: fadeInUp 600ms var(--transition-smooth) both;
356
+ }
357
+
358
+ .page-container--wide {
359
+ max-width: var(--page-container-max-width-wide);
360
+ }
361
+
362
+ .page-card {
363
+ background: var(--paper-white);
364
+ padding: var(--page-card-padding);
365
+ border-radius: var(--page-card-radius);
366
+ box-shadow: var(--shadow-card);
367
+ position: relative;
368
+ overflow: hidden;
369
+ }
370
+
371
+ .page-card::before {
372
+ content: '';
373
+ position: absolute;
374
+ inset: 0;
375
+ border-radius: inherit;
376
+ padding: var(--space-fixed-2xs);
377
+ background: linear-gradient(135deg, var(--alpha-primary08) 0%, transparent 50%, var(--alpha-primary04) 100%);
378
+ -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
379
+ -webkit-mask-composite: xor;
380
+ mask-composite: exclude;
381
+ pointer-events: none;
382
+ }
383
+
384
+ .page-card--centered {
385
+ text-align: center;
386
+ }
387
+
388
+ /* Page Decoration - Ink effect backgrounds */
389
+ .page-decoration {
390
+ position: absolute;
391
+ border-radius: 50%;
392
+ filter: blur(3.75rem);
393
+ pointer-events: none;
394
+ z-index: 0;
395
+ }
396
+
397
+ .page-decoration--primary {
398
+ background: var(--alpha-primary15);
399
+ }
400
+
401
+ .page-decoration--success {
402
+ background: var(--alpha-success15);
403
+ }
404
+
405
+ .page-decoration--float {
406
+ animation: inkFloat 4s ease-in-out infinite;
407
+ }
408
+
409
+ .page-decoration--drift {
410
+ animation: inkDrift 5s ease-in-out infinite;
411
+ }
412
+
413
+ /* Buttons */
414
+ .button {
415
+ height: var(--button-height);
416
+ padding: 0 var(--space-lg);
417
+ font-family: var(--font-body);
418
+ font-size: var(--button-font-size);
419
+ font-weight: var(--button-font-weight);
420
+ letter-spacing: var(--button-letter-spacing);
421
+ border: var(--space-fixed-2xs) solid transparent;
422
+ border-radius: var(--button-radius);
423
+ cursor: pointer;
424
+ transition: background var(--transition-fast), transform var(--transition-fast);
425
+ }
426
+
427
+ .button-primary {
428
+ background: var(--accent-primary);
429
+ color: var(--paper-white);
430
+ }
431
+
432
+ .button-primary:hover:not(:disabled) {
433
+ background: var(--accent-primary-hover);
434
+ box-shadow: var(--shadow-button-hover-primary);
435
+ transform: translateY(calc(-1 * var(--space-fixed-2xs)));
436
+ }
437
+
438
+ .button-success {
439
+ background: var(--accent-success);
440
+ color: var(--paper-white);
441
+ }
442
+
443
+ .button-success:hover:not(:disabled) {
444
+ background: var(--accent-success-hover);
445
+ box-shadow: var(--shadow-button-hover-success);
446
+ transform: translateY(calc(-1 * var(--space-fixed-2xs)));
447
+ }
448
+
449
+ .button-secondary {
450
+ height: var(--button-height-secondary);
451
+ background: transparent;
452
+ color: var(--ink-dark);
453
+ border: var(--space-fixed-2xs) solid var(--ink-faint);
454
+ }
455
+
456
+ .button-secondary:hover:not(:disabled) {
457
+ color: var(--accent-primary);
458
+ border-color: var(--accent-primary);
459
+ background: var(--alpha-primary04);
460
+ }
461
+
462
+ .button:disabled {
463
+ cursor: not-allowed;
464
+ opacity: 0.7;
465
+ }
466
+
467
+ /* Text Button */
468
+ .text-button {
469
+ display: inline-flex;
470
+ align-items: center;
471
+ justify-content: center;
472
+ height: var(--button-text-height);
473
+ padding: var(--space-sm) var(--space-md);
474
+ font-family: var(--font-body);
475
+ font-size: var(--button-text-font-size);
476
+ font-weight: 500;
477
+ color: var(--ink-dark);
478
+ background: transparent;
479
+ border: none;
480
+ border-radius: var(--radius-md);
481
+ cursor: pointer;
482
+ transition: background var(--transition-fast), color var(--transition-fast);
483
+ }
484
+
485
+ .text-button:hover {
486
+ background: var(--paper-cream);
487
+ color: var(--accent-primary);
488
+ }
489
+
490
+ .text-button-sm {
491
+ height: auto;
492
+ padding: var(--space-xs) var(--space-sm);
493
+ font-size: 0.8125rem;
494
+ }
495
+
496
+ .text-button-md {
497
+ height: auto;
498
+ padding: var(--space-sm) var(--space-md);
499
+ }
500
+
501
+ /* Button Content Layout */
502
+ .button-content {
503
+ display: flex;
504
+ align-items: center;
505
+ justify-content: center;
506
+ gap: var(--button-content-gap);
507
+ }
508
+
509
+ .button-icon {
510
+ display: flex;
511
+ align-items: center;
512
+ justify-content: center;
513
+ flex-shrink: 0;
514
+ }
515
+
516
+ .button-text {
517
+ flex: 1;
518
+ text-align: center;
519
+ }
520
+
521
+ /* Button Spinner */
522
+ .button-spinner {
523
+ width: var(--button-spinner-size);
524
+ height: var(--button-spinner-size);
525
+ border: var(--button-spinner-border-width) solid currentColor;
526
+ border-top-color: transparent;
527
+ border-radius: 50%;
528
+ animation: spin 600ms linear infinite;
529
+ }
530
+
531
+ /* Button Ink Ripple Effect */
532
+ .button-ink {
533
+ position: relative;
534
+ overflow: hidden;
535
+ }
536
+
537
+ .button-ink::after {
538
+ content: '';
539
+ position: absolute;
540
+ top: 50%;
541
+ left: 50%;
542
+ width: 21.875rem;
543
+ height: 21.875rem;
544
+ background: radial-gradient(circle, rgba(255, 255, 255, 0.5) 0%, transparent 70%);
545
+ transform: translate(-50%, -50%) scale(0);
546
+ border-radius: 50%;
547
+ pointer-events: none;
548
+ transition: transform var(--ink-effect-ripple-duration, 600ms) var(--ink-effect-ripple-easing, cubic-bezier(0.4, 0, 0.2, 1)),
549
+ opacity var(--ink-effect-fade-duration, 300ms) ease;
550
+ opacity: 0;
551
+ }
552
+
553
+ .button-ink:hover::after {
554
+ transform: translate(-50%, -50%) scale(1);
555
+ opacity: 1;
556
+ }
557
+
558
+ .button-ink:active::after {
559
+ transform: translate(-50%, -50%) scale(0.8);
560
+ opacity: 0.8;
561
+ }
562
+
563
+ /* Card */
564
+ .card {
565
+ background: var(--paper-white);
566
+ padding: var(--card-padding);
567
+ border-radius: var(--card-radius);
568
+ box-shadow: var(--shadow-card);
569
+ position: relative;
570
+ overflow: hidden;
571
+ }
572
+
573
+ /* Container */
574
+ .container {
575
+ position: relative;
576
+ width: 100%;
577
+ max-width: var(--container-max-width);
578
+ }
579
+
580
+ .container-wide {
581
+ max-width: var(--container-max-width-wide);
582
+ }
583
+
584
+ /* Form Layout */
585
+ .form-header {
586
+ text-align: center;
587
+ margin-bottom: var(--form-header-margin-bottom);
588
+ }
589
+
590
+ .form-title {
591
+ font-family: var(--font-body);
592
+ font-size: var(--title-font-size);
593
+ font-weight: var(--title-font-weight);
594
+ color: var(--ink-black);
595
+ letter-spacing: var(--title-letter-spacing);
596
+ animation: slideDown 400ms var(--transition-smooth) 200ms both;
597
+ }
598
+
599
+ .form-subtitle {
600
+ font-size: var(--form-subtitle-font-size);
601
+ color: var(--ink-medium);
602
+ margin-top: var(--space-sm);
603
+ animation: fadeInUp 400ms var(--transition-smooth) 400ms both;
604
+ }
605
+
606
+ .form-fields {
607
+ display: flex;
608
+ flex-direction: column;
609
+ gap: var(--form-fields-gap);
610
+ }
611
+
612
+ .form-footer {
613
+ margin-top: var(--form-footer-margin-top);
614
+ text-align: center;
615
+ animation: fadeInUp 400ms var(--transition-smooth) 600ms both;
616
+ }
617
+
618
+ /* Field Group */
619
+ .field-group {
620
+ display: flex;
621
+ flex-direction: column;
622
+ gap: var(--field-group-gap);
623
+ }
624
+
625
+ .field-label {
626
+ display: block;
627
+ font-size: var(--label-font-size);
628
+ font-weight: var(--label-font-weight);
629
+ text-transform: uppercase;
630
+ letter-spacing: var(--label-letter-spacing);
631
+ color: var(--ink-medium);
632
+ transition: color var(--transition-fast);
633
+ }
634
+
635
+ .field-group.focused .field-label {
636
+ color: var(--accent-primary);
637
+ }
638
+
639
+ .required-mark {
640
+ color: var(--accent-primary);
641
+ margin-left: var(--space-2xs);
642
+ }
643
+
644
+ /* Input */
645
+ .input {
646
+ width: 100%;
647
+ padding: var(--input-padding-y) var(--input-padding-x);
648
+ font-family: var(--font-body);
649
+ font-size: var(--input-font-size);
650
+ color: var(--ink-black);
651
+ background: var(--paper-cream);
652
+ border: var(--space-fixed-2xs) solid transparent;
653
+ border-radius: var(--input-radius);
654
+ transition: background var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth);
655
+ }
656
+
657
+ .input::placeholder {
658
+ color: var(--ink-faint);
659
+ }
660
+
661
+ .input:hover {
662
+ background: var(--paper-warm);
663
+ }
664
+
665
+ .input:focus {
666
+ outline: none;
667
+ background: var(--paper-white);
668
+ border-color: var(--ink-faint);
669
+ box-shadow: var(--shadow-input-focus);
670
+ }
671
+
672
+ /* Label */
673
+ .label {
674
+ display: block;
675
+ font-size: var(--label-font-size);
676
+ font-weight: var(--label-font-weight);
677
+ text-transform: uppercase;
678
+ letter-spacing: var(--label-letter-spacing);
679
+ color: var(--ink-medium);
680
+ margin-bottom: var(--space-sm);
681
+ transition: color var(--transition-fast);
682
+ }
683
+
684
+ /* Title */
685
+ .title {
686
+ font-family: var(--font-body);
687
+ font-size: var(--title-font-size);
688
+ font-weight: var(--title-font-weight);
689
+ color: var(--ink-black);
690
+ letter-spacing: var(--title-letter-spacing);
691
+ }
692
+
693
+ /* Feedback */
694
+ .error-message {
695
+ display: flex;
696
+ align-items: flex-start;
697
+ gap: var(--feedback-error-gap);
698
+ padding: var(--feedback-error-padding);
699
+ background: var(--error-bg);
700
+ border: var(--space-fixed-2xs) solid var(--error-border);
701
+ border-radius: var(--feedback-error-radius);
702
+ color: var(--error-base);
703
+ animation: slideDown 300ms var(--transition-smooth) both;
704
+ }
705
+
706
+ .error-icon {
707
+ display: flex;
708
+ align-items: center;
709
+ justify-content: center;
710
+ flex-shrink: 0;
711
+ width: var(--feedback-error-icon-size);
712
+ height: var(--feedback-error-icon-size);
713
+ color: var(--error-base);
714
+ }
715
+
716
+ .error-message.shake {
717
+ animation: shake 400ms var(--transition-smooth);
718
+ }
719
+
720
+ /* Notice */
721
+ .notice {
722
+ display: flex;
723
+ align-items: flex-start;
724
+ gap: var(--feedback-notice-gap);
725
+ padding: var(--feedback-notice-padding);
726
+ border-radius: var(--feedback-notice-radius);
727
+ animation: slideUp 400ms var(--transition-smooth) both;
728
+ }
729
+
730
+ .notice-icon {
731
+ display: flex;
732
+ align-items: center;
733
+ justify-content: center;
734
+ flex-shrink: 0;
735
+ width: var(--feedback-notice-icon-size);
736
+ height: var(--feedback-notice-icon-size);
737
+ }
738
+
739
+ .notice-success {
740
+ background: rgba(53, 122, 70, 0.08);
741
+ border: var(--space-fixed-2xs) solid rgba(53, 122, 70, 0.2);
742
+ color: var(--accent-success);
743
+ }
744
+
745
+ .notice-warning {
746
+ background: rgba(180, 83, 9, 0.08);
747
+ border: var(--space-fixed-2xs) solid rgba(180, 83, 9, 0.2);
748
+ color: var(--semantic-warning);
749
+ }
750
+
751
+ .notice-info {
752
+ background: rgba(3, 105, 161, 0.08);
753
+ border: var(--space-fixed-2xs) solid rgba(3, 105, 161, 0.2);
754
+ color: var(--semantic-info);
755
+ }
756
+ `, u = kt(jt);
757
+ var Et = Object.defineProperty, Lt = Object.getOwnPropertyDescriptor, Z = (r, e, s, i) => {
758
+ for (var t = i > 1 ? void 0 : i ? Lt(e, s) : e, a = r.length - 1, o; a >= 0; a--)
759
+ (o = r[a]) && (t = (i ? o(e, s, t) : o(t)) || t);
760
+ return i && t && Et(e, s, t), t;
761
+ };
762
+ let C = class extends d {
763
+ constructor() {
764
+ super(...arguments), this.disabled = !1, this.loading = !1, this.variant = "primary", this.sx = {};
765
+ }
766
+ render() {
767
+ const r = {
768
+ button: !0,
769
+ "button-ink": this.variant !== "secondary",
770
+ "button-primary": this.variant === "primary",
771
+ "button-secondary": this.variant === "secondary",
772
+ "button-success": this.variant === "success",
773
+ "button--loading": this.loading
774
+ };
775
+ return l`
776
+ <button
777
+ part="button"
778
+ class=${B(r)}
779
+ style=${m(this.sx)}
780
+ ?disabled=${this.disabled || this.loading}
781
+ type="button"
782
+ @click=${this.handleClick}
783
+ >
784
+ <span class="button-content">
785
+ ${this.loading ? l`<div part="spinner" class="button-spinner"></div>` : ""}
786
+ <slot></slot>
787
+ </span>
788
+ </button>
789
+ `;
790
+ }
791
+ handleClick(r) {
792
+ this.disabled || this.loading || this.dispatchEvent(
793
+ new CustomEvent("tc-click", {
794
+ bubbles: !0,
795
+ composed: !0,
796
+ detail: { originalEvent: r }
797
+ })
798
+ );
799
+ }
800
+ };
801
+ C.styles = [
802
+ u,
803
+ c`
804
+ :host {
805
+ display: block;
806
+ width: 100%;
807
+ }
808
+
809
+ /* Extend base .button from design-tokens */
810
+ .button {
811
+ position: relative;
812
+ width: 100%;
813
+ display: flex;
814
+ align-items: center;
815
+ justify-content: center;
816
+ gap: var(--space-sm);
817
+ overflow: hidden;
818
+ }
819
+
820
+ /* Radial gradient glow overlay for primary/success */
821
+ .button-ink::before {
822
+ content: '';
823
+ position: absolute;
824
+ inset: 0;
825
+ border-radius: inherit;
826
+ background: radial-gradient(
827
+ circle at center,
828
+ transparent 0%,
829
+ var(--overlay-glow-white) 100%
830
+ );
831
+ opacity: var(--opacity-hidden);
832
+ transition: opacity 600ms ease;
833
+ pointer-events: none;
834
+ }
835
+
836
+ .button-ink:hover:not(:disabled)::before {
837
+ opacity: 1;
838
+ }
839
+
840
+ /* Loading pulse animation */
841
+ .button--loading {
842
+ animation: pulse 1s ease-in-out infinite;
843
+ }
844
+
845
+ @keyframes pulse {
846
+ 0%,
847
+ 100% {
848
+ opacity: var(--opacity-visible);
849
+ }
850
+ 50% {
851
+ opacity: var(--opacity-loading);
852
+ }
853
+ }
854
+
855
+ /* Active states - design-tokens doesn't include these */
856
+ .button-primary:active:not(:disabled) {
857
+ background: var(--accent-primary-pressed);
858
+ transform: translateY(0);
859
+ box-shadow: none;
860
+ }
861
+
862
+ .button-success:active:not(:disabled) {
863
+ background: var(--accent-success-pressed);
864
+ transform: translateY(0);
865
+ box-shadow: none;
866
+ }
867
+
868
+ .button-secondary:active:not(:disabled) {
869
+ background: var(--alpha-primary08);
870
+ }
871
+
872
+ /* Secondary spinner override */
873
+ .button-secondary .button-spinner {
874
+ border-color: var(--alpha-primary30);
875
+ border-top-color: var(--accent-primary);
876
+ }
877
+
878
+ /* Focus visible state */
879
+ .button:focus-visible {
880
+ outline: var(--size-border-width-thick) solid var(--accent-primary);
881
+ outline-offset: var(--size-border-width-thick);
882
+ }
883
+
884
+ /* Reduced motion */
885
+ @media (prefers-reduced-motion: reduce) {
886
+ .button,
887
+ .button-ink::before {
888
+ transition-duration: 0.01ms !important;
889
+ }
890
+
891
+ .button--loading {
892
+ animation: none;
893
+ }
894
+
895
+ .button-spinner {
896
+ animation-duration: 1.5s;
897
+ }
898
+ }
899
+ `
900
+ ];
901
+ Z([
902
+ n({ type: Boolean })
903
+ ], C.prototype, "disabled", 2);
904
+ Z([
905
+ n({ type: Boolean })
906
+ ], C.prototype, "loading", 2);
907
+ Z([
908
+ n({ type: String })
909
+ ], C.prototype, "variant", 2);
910
+ Z([
911
+ n({ type: Object })
912
+ ], C.prototype, "sx", 2);
913
+ C = Z([
914
+ p("tc-button")
915
+ ], C);
916
+ var Bt = Object.defineProperty, Tt = Object.getOwnPropertyDescriptor, wt = (r, e, s, i) => {
917
+ for (var t = i > 1 ? void 0 : i ? Tt(e, s) : e, a = r.length - 1, o; a >= 0; a--)
918
+ (o = r[a]) && (t = (i ? o(e, s, t) : o(t)) || t);
919
+ return i && t && Bt(e, s, t), t;
920
+ };
921
+ let st = class extends d {
922
+ constructor() {
923
+ super(...arguments), this.variant = "info";
924
+ }
925
+ render() {
926
+ const r = this.variant === "error", e = {
927
+ notice: !r,
928
+ "notice-info": this.variant === "info",
929
+ "notice-success": this.variant === "success",
930
+ "notice-warning": this.variant === "warning",
931
+ "error-message": r
932
+ };
933
+ return l`
934
+ <div part="callout" class=${B(e)} role="alert">
935
+ <slot></slot>
936
+ </div>
937
+ `;
938
+ }
939
+ };
940
+ st.styles = [
941
+ u,
942
+ c`
943
+ :host {
944
+ display: block;
945
+ width: 100%;
946
+ }
947
+
948
+ /* Override animation from design-tokens for immediate display */
949
+ .notice {
950
+ animation: none;
951
+ }
952
+
953
+ /* Error variant uses error-message class from design-tokens */
954
+ .error-message {
955
+ animation: none;
956
+ }
957
+ `
958
+ ];
959
+ wt([
960
+ n({ type: String })
961
+ ], st.prototype, "variant", 2);
962
+ st = wt([
963
+ p("tc-callout")
964
+ ], st);
965
+ var At = Object.defineProperty, Mt = Object.getOwnPropertyDescriptor, dt = (r, e, s, i) => {
966
+ for (var t = i > 1 ? void 0 : i ? Mt(e, s) : e, a = r.length - 1, o; a >= 0; a--)
967
+ (o = r[a]) && (t = (i ? o(e, s, t) : o(t)) || t);
968
+ return i && t && At(e, s, t), t;
969
+ };
970
+ let N = class extends d {
971
+ constructor() {
972
+ super(...arguments), this.noBorder = !1, this.sx = {};
973
+ }
974
+ render() {
975
+ const r = {
976
+ card: !0,
977
+ "card--no-border": this.noBorder
978
+ };
979
+ return l`
980
+ <div part="card" class=${B(r)} style=${m(this.sx)}>
981
+ <div class="card-content">
982
+ <slot></slot>
983
+ </div>
984
+ </div>
985
+ `;
986
+ }
987
+ };
988
+ N.styles = [
989
+ u,
990
+ c`
991
+ :host {
992
+ display: block;
993
+ }
994
+
995
+ /* Inner border effect using mask - extends design-tokens .card */
996
+ .card::before {
997
+ content: '';
998
+ position: absolute;
999
+ inset: 0;
1000
+ border-radius: inherit;
1001
+ padding: 0.0625rem;
1002
+ background: linear-gradient(
1003
+ 180deg,
1004
+ var(--alpha-white90) 0%,
1005
+ var(--alpha-white30) 100%
1006
+ );
1007
+ mask:
1008
+ linear-gradient(#fff 0 0) content-box,
1009
+ linear-gradient(#fff 0 0);
1010
+ mask-composite: exclude;
1011
+ pointer-events: none;
1012
+ }
1013
+
1014
+ .card--no-border::before {
1015
+ display: none;
1016
+ }
1017
+
1018
+ .card-content {
1019
+ position: relative;
1020
+ z-index: 1;
1021
+ }
1022
+ `
1023
+ ];
1024
+ dt([
1025
+ n({ type: Boolean, attribute: "no-border" })
1026
+ ], N.prototype, "noBorder", 2);
1027
+ dt([
1028
+ n({ type: Object })
1029
+ ], N.prototype, "sx", 2);
1030
+ N = dt([
1031
+ p("tc-card")
1032
+ ], N);
1033
+ var It = Object.defineProperty, Ft = Object.getOwnPropertyDescriptor, pt = (r, e, s, i) => {
1034
+ for (var t = i > 1 ? void 0 : i ? Ft(e, s) : e, a = r.length - 1, o; a >= 0; a--)
1035
+ (o = r[a]) && (t = (i ? o(e, s, t) : o(t)) || t);
1036
+ return i && t && It(e, s, t), t;
1037
+ };
1038
+ let K = class extends d {
1039
+ constructor() {
1040
+ super(...arguments), this.variant = "default", this.size = "md";
1041
+ }
1042
+ render() {
1043
+ return l`
1044
+ <span part="chip" class="chip chip--${this.variant} chip--${this.size}">
1045
+ <slot></slot>
1046
+ </span>
1047
+ `;
1048
+ }
1049
+ };
1050
+ K.styles = [
1051
+ u,
1052
+ c`
1053
+ :host {
1054
+ display: inline-flex;
1055
+ }
1056
+
1057
+ .chip {
1058
+ display: inline-flex;
1059
+ align-items: center;
1060
+ justify-content: center;
1061
+ border-radius: var(--radius-full);
1062
+ font-family: var(--font-body);
1063
+ font-weight: 500;
1064
+ }
1065
+
1066
+ .chip--sm {
1067
+ padding: var(--size-chip-padding-sm);
1068
+ font-size: var(--font-size-xs);
1069
+ }
1070
+
1071
+ .chip--md {
1072
+ padding: var(--size-chip-padding-md);
1073
+ font-size: var(--font-size-sm);
1074
+ }
1075
+
1076
+ .chip--default {
1077
+ background: var(--paper-cream);
1078
+ color: var(--ink-dark);
1079
+ }
1080
+
1081
+ .chip--success {
1082
+ background: var(--alpha-success15);
1083
+ color: var(--accent-success);
1084
+ }
1085
+
1086
+ .chip--error {
1087
+ background: var(--error-bg);
1088
+ color: var(--error-base);
1089
+ }
1090
+
1091
+ .chip--info {
1092
+ background: var(--alpha-primary10);
1093
+ color: var(--accent-primary);
1094
+ }
1095
+ `
1096
+ ];
1097
+ pt([
1098
+ n({ type: String })
1099
+ ], K.prototype, "variant", 2);
1100
+ pt([
1101
+ n({ type: String })
1102
+ ], K.prototype, "size", 2);
1103
+ K = pt([
1104
+ p("tc-chip")
1105
+ ], K);
1106
+ var qt = Object.defineProperty, Yt = Object.getOwnPropertyDescriptor, ht = (r, e, s, i) => {
1107
+ for (var t = i > 1 ? void 0 : i ? Yt(e, s) : e, a = r.length - 1, o; a >= 0; a--)
1108
+ (o = r[a]) && (t = (i ? o(e, s, t) : o(t)) || t);
1109
+ return i && t && qt(e, s, t), t;
1110
+ };
1111
+ let V = class extends d {
1112
+ constructor() {
1113
+ super(...arguments), this.wide = !1, this.sx = {}, this.defaultStyles = {
1114
+ display: "flex",
1115
+ flexDirection: "column",
1116
+ alignItems: "center",
1117
+ justifyContent: "flex-start"
1118
+ };
1119
+ }
1120
+ render() {
1121
+ const r = {
1122
+ ...this.defaultStyles,
1123
+ ...this.sx
1124
+ };
1125
+ return l`
1126
+ <div
1127
+ part="container"
1128
+ class="container ${this.wide ? "container--wide" : ""}"
1129
+ style=${m(r)}
1130
+ >
1131
+ <slot></slot>
1132
+ </div>
1133
+ `;
1134
+ }
1135
+ };
1136
+ V.styles = c`
1137
+ :host {
1138
+ display: block;
1139
+ width: 100%;
1140
+ }
1141
+
1142
+ .container {
1143
+ position: relative;
1144
+ width: 100%;
1145
+ max-width: var(--container-max-width);
1146
+ margin: 0 auto;
1147
+ }
1148
+
1149
+ .container--wide {
1150
+ max-width: var(--container-max-width-wide);
1151
+ }
1152
+ `;
1153
+ ht([
1154
+ n({ type: Boolean })
1155
+ ], V.prototype, "wide", 2);
1156
+ ht([
1157
+ n({ type: Object })
1158
+ ], V.prototype, "sx", 2);
1159
+ V = ht([
1160
+ p("tc-container")
1161
+ ], V);
1162
+ var Ut = Object.defineProperty, Ht = Object.getOwnPropertyDescriptor, ut = (r, e, s, i) => {
1163
+ for (var t = i > 1 ? void 0 : i ? Ht(e, s) : e, a = r.length - 1, o; a >= 0; a--)
1164
+ (o = r[a]) && (t = (i ? o(e, s, t) : o(t)) || t);
1165
+ return i && t && Ut(e, s, t), t;
1166
+ };
1167
+ let W = class extends d {
1168
+ constructor() {
1169
+ super(...arguments), this.color = "var(--ink-faint)", this.spacing = "var(--space-md)";
1170
+ }
1171
+ render() {
1172
+ return l`
1173
+ <hr
1174
+ part="divider"
1175
+ class="divider"
1176
+ style="--divider-color: ${this.color}; --divider-spacing: ${this.spacing};"
1177
+ />
1178
+ `;
1179
+ }
1180
+ };
1181
+ W.styles = c`
1182
+ :host {
1183
+ display: block;
1184
+ width: 100%;
1185
+ }
1186
+
1187
+ .divider {
1188
+ border: none;
1189
+ height: 1px;
1190
+ background-color: var(--divider-color);
1191
+ margin: var(--divider-spacing) 0;
1192
+ }
1193
+ `;
1194
+ ut([
1195
+ n({ type: String })
1196
+ ], W.prototype, "color", 2);
1197
+ ut([
1198
+ n({ type: String })
1199
+ ], W.prototype, "spacing", 2);
1200
+ W = ut([
1201
+ p("tc-divider")
1202
+ ], W);
1203
+ var Rt = Object.defineProperty, Nt = Object.getOwnPropertyDescriptor, I = (r, e, s, i) => {
1204
+ for (var t = i > 1 ? void 0 : i ? Nt(e, s) : e, a = r.length - 1, o; a >= 0; a--)
1205
+ (o = r[a]) && (t = (i ? o(e, s, t) : o(t)) || t);
1206
+ return i && t && Rt(e, s, t), t;
1207
+ };
1208
+ let b = class extends d {
1209
+ constructor() {
1210
+ super(...arguments), this.title = "", this.subtitle = "", this.notice = "", this.noAnimation = !1, this.sx = {};
1211
+ }
1212
+ render() {
1213
+ const r = !this.noAnimation;
1214
+ return l`
1215
+ <header part="header" class="header" style=${m(this.sx)}>
1216
+ ${this.title ? l`<h1 part="title" class="form-title ${r ? "form-title--animated" : ""}">
1217
+ ${this.title}
1218
+ </h1>` : ""}
1219
+ ${this.subtitle ? l`<p part="subtitle" class="form-subtitle ${r ? "form-subtitle--animated" : ""}">
1220
+ ${this.subtitle}
1221
+ </p>` : ""}
1222
+ ${this.notice ? l`<div part="notice" class="notice ${r ? "notice--animated" : ""}">
1223
+ ${this.notice}
1224
+ </div>` : ""}
1225
+ </header>
1226
+ `;
1227
+ }
1228
+ };
1229
+ b.styles = [
1230
+ u,
1231
+ c`
1232
+ :host {
1233
+ display: block;
1234
+ text-align: center;
1235
+ }
1236
+
1237
+ .header {
1238
+ display: flex;
1239
+ flex-direction: column;
1240
+ align-items: center;
1241
+ gap: var(--space-sm);
1242
+ }
1243
+
1244
+ /* Extend design-tokens .form-title */
1245
+ .form-title {
1246
+ margin: 0;
1247
+ line-height: 1.2;
1248
+ }
1249
+
1250
+ .form-title--animated {
1251
+ animation: slideDown var(--duration-fast) var(--easing-ease-in-out) backwards;
1252
+ }
1253
+
1254
+ /* Extend design-tokens .form-subtitle */
1255
+ .form-subtitle {
1256
+ margin: 0;
1257
+ max-width: 28ch;
1258
+ }
1259
+
1260
+ .form-subtitle--animated {
1261
+ animation: slideUp var(--duration-smooth) var(--easing-ease-in-out) 100ms backwards;
1262
+ }
1263
+
1264
+ .notice {
1265
+ margin-top: var(--space-sm);
1266
+ padding: var(--space-sm) var(--space-md);
1267
+ background: var(--paper-warm);
1268
+ border-radius: var(--radius-md);
1269
+ font-size: var(--font-size-sm);
1270
+ color: var(--ink-medium);
1271
+ }
1272
+
1273
+ .notice--animated {
1274
+ animation: noticeReveal 500ms var(--easing-ease-in-out) 200ms backwards;
1275
+ }
1276
+
1277
+ @keyframes noticeReveal {
1278
+ from {
1279
+ opacity: 0;
1280
+ transform: scale(0.95);
1281
+ }
1282
+ to {
1283
+ opacity: 1;
1284
+ transform: scale(1);
1285
+ }
1286
+ }
1287
+
1288
+ /* Reduced motion */
1289
+ @media (prefers-reduced-motion: reduce) {
1290
+ .form-title--animated,
1291
+ .form-subtitle--animated,
1292
+ .notice--animated {
1293
+ animation: none;
1294
+ }
1295
+ }
1296
+ `
1297
+ ];
1298
+ I([
1299
+ n({ type: String })
1300
+ ], b.prototype, "title", 2);
1301
+ I([
1302
+ n({ type: String })
1303
+ ], b.prototype, "subtitle", 2);
1304
+ I([
1305
+ n({ type: String })
1306
+ ], b.prototype, "notice", 2);
1307
+ I([
1308
+ n({ type: Boolean, attribute: "no-animation" })
1309
+ ], b.prototype, "noAnimation", 2);
1310
+ I([
1311
+ n({ type: Object })
1312
+ ], b.prototype, "sx", 2);
1313
+ b = I([
1314
+ p("tc-form-header")
1315
+ ], b);
1316
+ var Kt = Object.defineProperty, Vt = Object.getOwnPropertyDescriptor, ot = (r, e, s, i) => {
1317
+ for (var t = i > 1 ? void 0 : i ? Vt(e, s) : e, a = r.length - 1, o; a >= 0; a--)
1318
+ (o = r[a]) && (t = (i ? o(e, s, t) : o(t)) || t);
1319
+ return i && t && Kt(e, s, t), t;
1320
+ };
1321
+ const Wt = {
1322
+ "arrow-left": l`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/></svg>`,
1323
+ "arrow-right": l`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"/></svg>`,
1324
+ check: l`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/></svg>`,
1325
+ x: l`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>`,
1326
+ close: l`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>`,
1327
+ "chevron-right": l`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>`,
1328
+ "chevron-left": l`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 18 9 12 15 6"></polyline></svg>`,
1329
+ error: l`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"/></svg>`,
1330
+ "alert-circle": l`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg>`,
1331
+ info: l`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"/></svg>`,
1332
+ warning: l`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"/></svg>`,
1333
+ loading: l`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"/></svg>`,
1334
+ loader: l`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="12" y1="2" x2="12" y2="6"></line><line x1="12" y1="18" x2="12" y2="22"></line><line x1="4.93" y1="4.93" x2="7.76" y2="7.76"></line><line x1="16.24" y1="16.24" x2="19.07" y2="19.07"></line><line x1="2" y1="12" x2="6" y2="12"></line><line x1="18" y1="12" x2="22" y2="12"></line><line x1="4.93" y1="19.07" x2="7.76" y2="16.24"></line><line x1="16.24" y1="7.76" x2="19.07" y2="4.93"></line></svg>`,
1335
+ biometric: l`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M17.81 4.47c-.08 0-.16-.02-.23-.06C15.66 3.42 14 3 12.01 3c-1.98 0-3.86.47-5.57 1.41-.24.13-.54.04-.68-.2-.13-.24-.04-.55.2-.68C7.82 2.52 9.86 2 12.01 2c2.13 0 3.99.47 6.03 1.52.25.13.34.43.21.67-.09.18-.26.28-.44.28zM3.5 9.72c-.1 0-.2-.03-.29-.09-.23-.16-.28-.47-.12-.7.99-1.4 2.25-2.5 3.75-3.27C9.98 4.04 14 4.03 17.15 5.65c1.5.77 2.76 1.86 3.75 3.25.16.22.11.54-.12.7-.23.16-.54.11-.7-.12-.9-1.26-2.04-2.25-3.39-2.94-2.87-1.47-6.54-1.47-9.4.01-1.36.7-2.5 1.7-3.4 2.96-.08.14-.23.21-.39.21zm6.25 12.07c-.13 0-.26-.05-.35-.15-.87-.87-1.34-1.43-2.01-2.64-.69-1.23-1.05-2.73-1.05-4.34 0-2.97 2.54-5.39 5.66-5.39s5.66 2.42 5.66 5.39c0 .28-.22.5-.5.5s-.5-.22-.5-.5c0-2.42-2.09-4.39-4.66-4.39-2.57 0-4.66 1.97-4.66 4.39 0 1.44.32 2.77.93 3.85.64 1.15 1.08 1.64 1.85 2.42.19.2.19.51 0 .71-.11.1-.24.15-.37.15zm7.17-1.85c-1.19 0-2.24-.3-3.1-.89-1.49-1.01-2.38-2.65-2.38-4.39 0-.28.22-.5.5-.5s.5.22.5.5c0 1.41.72 2.74 1.94 3.56.71.48 1.54.71 2.54.71.24 0 .64-.03 1.04-.1.27-.05.53.13.58.41.05.27-.13.53-.41.58-.57.11-1.07.12-1.21.12zM14.91 22c-.04 0-.09-.01-.13-.02-1.59-.44-2.63-1.03-3.72-2.1-1.4-1.39-2.17-3.24-2.17-5.22 0-1.62 1.38-2.94 3.08-2.94 1.7 0 3.08 1.32 3.08 2.94 0 1.07.93 1.94 2.08 1.94s2.08-.87 2.08-1.94c0-3.77-3.25-6.83-7.25-6.83-2.84 0-5.44 1.58-6.61 4.03-.39.81-.59 1.76-.59 2.8 0 .78.07 2.01.67 3.61.1.26-.03.55-.29.64-.26.1-.55-.04-.64-.29-.49-1.31-.73-2.61-.73-3.96 0-1.2.23-2.29.68-3.24 1.33-2.79 4.28-4.6 7.51-4.6 4.55 0 8.25 3.51 8.25 7.83 0 1.62-1.38 2.94-3.08 2.94s-3.08-1.32-3.08-2.94c0-1.07-.93-1.94-2.08-1.94s-2.08.87-2.08 1.94c0 1.71.66 3.31 1.87 4.51.95.94 1.86 1.46 3.27 1.85.27.07.42.35.35.61-.05.23-.26.38-.47.38z"/></svg>`,
1336
+ email: l`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>`,
1337
+ passkey: l`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 2-2.93-2-2.07zm-14 2c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"/></svg>`,
1338
+ bell: l`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"></path><path d="M13.73 21a2 2 0 0 1-3.46 0"></path></svg>`,
1339
+ download: l`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg>`,
1340
+ "wifi-off": l`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="1" y1="1" x2="23" y2="23"></line><path d="M16.72 11.06A10.94 10.94 0 0 1 19 12.55"></path><path d="M5 12.55a10.94 10.94 0 0 1 5.17-2.39"></path><path d="M10.71 5.05A16 16 0 0 1 22.58 9"></path><path d="M1.42 9a15.91 15.91 0 0 1 4.7-2.88"></path><path d="M8.53 16.11a6 6 0 0 1 6.95 0"></path><line x1="12" y1="20" x2="12.01" y2="20"></line></svg>`
1341
+ };
1342
+ let T = class extends d {
1343
+ constructor() {
1344
+ super(...arguments), this.name = "info", this.size = "1.5rem", this.color = "currentColor";
1345
+ }
1346
+ render() {
1347
+ const r = Wt[this.name];
1348
+ return r ? l`
1349
+ <span
1350
+ part="icon"
1351
+ class="icon"
1352
+ style="--icon-size: ${this.size}; --icon-color: ${this.color};"
1353
+ >
1354
+ ${r}
1355
+ </span>
1356
+ ` : (console.warn(`Icon "${this.name}" not found`), l``);
1357
+ }
1358
+ };
1359
+ T.styles = c`
1360
+ :host {
1361
+ display: inline-flex;
1362
+ align-items: center;
1363
+ justify-content: center;
1364
+ }
1365
+
1366
+ .icon {
1367
+ display: flex;
1368
+ align-items: center;
1369
+ justify-content: center;
1370
+ }
1371
+
1372
+ svg {
1373
+ width: var(--icon-size);
1374
+ height: var(--icon-size);
1375
+ color: var(--icon-color);
1376
+ }
1377
+ `;
1378
+ ot([
1379
+ n({ type: String })
1380
+ ], T.prototype, "name", 2);
1381
+ ot([
1382
+ n({ type: String })
1383
+ ], T.prototype, "size", 2);
1384
+ ot([
1385
+ n({ type: String })
1386
+ ], T.prototype, "color", 2);
1387
+ T = ot([
1388
+ p("tc-icon")
1389
+ ], T);
1390
+ var Xt = Object.defineProperty, Gt = Object.getOwnPropertyDescriptor, v = (r, e, s, i) => {
1391
+ for (var t = i > 1 ? void 0 : i ? Gt(e, s) : e, a = r.length - 1, o; a >= 0; a--)
1392
+ (o = r[a]) && (t = (i ? o(e, s, t) : o(t)) || t);
1393
+ return i && t && Xt(e, s, t), t;
1394
+ };
1395
+ let h = class extends d {
1396
+ constructor() {
1397
+ super(...arguments), this.label = "", this.type = "text", this.placeholder = "", this.value = "", this.error = "", this.disabled = !1, this.required = !1, this.name = "", this.autocomplete = "", this.inputmode = "", this.maxlength = 0, this.sx = {}, this.inputId = `tc-input-${Math.random().toString(36).slice(2)}`, this.isFocused = !1;
1398
+ }
1399
+ render() {
1400
+ const r = this.error.length > 0, e = {
1401
+ "field-group": !0,
1402
+ focused: this.isFocused,
1403
+ "has-error": r
1404
+ }, s = {
1405
+ "input-wrapper": !0,
1406
+ focused: this.isFocused,
1407
+ "has-error": r
1408
+ }, i = {
1409
+ input: !0,
1410
+ "has-error": r
1411
+ };
1412
+ return l`
1413
+ <div class=${B(e)}>
1414
+ ${this.label ? l`<label part="label" class="field-label" for=${this.inputId}>${this.label}</label>` : ""}
1415
+ <div part="wrapper" class=${B(s)}>
1416
+ <input
1417
+ part="input"
1418
+ id=${this.inputId}
1419
+ class=${B(i)}
1420
+ type=${this.type}
1421
+ name=${this.name}
1422
+ placeholder=${this.placeholder}
1423
+ .value=${this.value}
1424
+ ?disabled=${this.disabled}
1425
+ ?required=${this.required}
1426
+ autocomplete=${this.autocomplete || "off"}
1427
+ inputmode=${this.inputmode || ""}
1428
+ maxlength=${this.maxlength || ""}
1429
+ aria-invalid=${r ? "true" : "false"}
1430
+ aria-describedby=${r ? `${this.inputId}-error` : ""}
1431
+ style=${m(this.sx)}
1432
+ @input=${this.handleInput}
1433
+ @focus=${this.handleFocus}
1434
+ @blur=${this.handleBlur}
1435
+ />
1436
+ <div part="ink-line" class="ink-line"></div>
1437
+ </div>
1438
+ ${r ? l`<p part="error" id="${this.inputId}-error" class="input-error-text" role="alert">
1439
+ ${this.error}
1440
+ </p>` : ""}
1441
+ </div>
1442
+ `;
1443
+ }
1444
+ handleInput(r) {
1445
+ const e = r.target;
1446
+ this.value = e.value, this.dispatchEvent(
1447
+ new CustomEvent("tc-input", {
1448
+ bubbles: !0,
1449
+ composed: !0,
1450
+ detail: { value: e.value }
1451
+ })
1452
+ );
1453
+ }
1454
+ handleFocus() {
1455
+ this.isFocused = !0;
1456
+ }
1457
+ handleBlur(r) {
1458
+ const e = r.target;
1459
+ this.isFocused = !1, this.dispatchEvent(
1460
+ new CustomEvent("tc-blur", {
1461
+ bubbles: !0,
1462
+ composed: !0,
1463
+ detail: { value: e.value }
1464
+ })
1465
+ );
1466
+ }
1467
+ focus() {
1468
+ this.shadowRoot?.querySelector("input")?.focus();
1469
+ }
1470
+ };
1471
+ h.styles = [
1472
+ u,
1473
+ c`
1474
+ :host {
1475
+ display: block;
1476
+ }
1477
+
1478
+ /* Extend design-tokens .field-group */
1479
+ .field-group {
1480
+ width: 100%;
1481
+ }
1482
+
1483
+ /* Label color change on focus - extends design-tokens .field-label */
1484
+ .field-group.focused .field-label {
1485
+ color: var(--accent-primary);
1486
+ }
1487
+
1488
+ .field-group.has-error .field-label {
1489
+ color: var(--error-base);
1490
+ }
1491
+
1492
+ .input-wrapper {
1493
+ position: relative;
1494
+ width: 100%;
1495
+ }
1496
+
1497
+ /* Extend design-tokens .input */
1498
+ .input {
1499
+ width: 100%;
1500
+ box-sizing: border-box;
1501
+ }
1502
+
1503
+ .input:disabled {
1504
+ opacity: var(--opacity-disabled);
1505
+ cursor: not-allowed;
1506
+ }
1507
+
1508
+ /* Ink line animation */
1509
+ .ink-line {
1510
+ position: absolute;
1511
+ bottom: 0;
1512
+ left: 50%;
1513
+ transform: translateX(-50%);
1514
+ width: 0;
1515
+ height: 0.125rem;
1516
+ background: linear-gradient(
1517
+ 90deg,
1518
+ var(--accent-primary) 0%,
1519
+ var(--accent-primary-hover) 100%
1520
+ );
1521
+ border-radius: 0.0625rem;
1522
+ transition: width 300ms cubic-bezier(0.4, 0, 0.2, 1);
1523
+ pointer-events: none;
1524
+ }
1525
+
1526
+ .input-wrapper.focused .ink-line {
1527
+ width: 60%;
1528
+ }
1529
+
1530
+ /* Error states */
1531
+ .input.has-error {
1532
+ border-color: var(--error-base);
1533
+ background: var(--error-bg);
1534
+ }
1535
+
1536
+ .input.has-error:focus {
1537
+ border-color: var(--error-base);
1538
+ box-shadow: 0 0 0 0.1875rem var(--error-border);
1539
+ }
1540
+
1541
+ .input-wrapper.has-error .ink-line {
1542
+ background: linear-gradient(
1543
+ 90deg,
1544
+ var(--error-base) 0%,
1545
+ var(--error-base) 100%
1546
+ );
1547
+ }
1548
+
1549
+ .input-error-text {
1550
+ font-size: var(--font-size-sm);
1551
+ color: var(--error-base);
1552
+ margin: 0;
1553
+ animation: slideDown 300ms ease backwards;
1554
+ }
1555
+
1556
+ @keyframes slideDown {
1557
+ from {
1558
+ opacity: 0;
1559
+ transform: translateY(-0.25rem);
1560
+ }
1561
+ to {
1562
+ opacity: 1;
1563
+ transform: translateY(0);
1564
+ }
1565
+ }
1566
+
1567
+ /* Reduced motion */
1568
+ @media (prefers-reduced-motion: reduce) {
1569
+ .field-label,
1570
+ .input,
1571
+ .ink-line,
1572
+ .input-error-text {
1573
+ transition-duration: 0.01ms !important;
1574
+ animation-duration: 0.01ms !important;
1575
+ }
1576
+ }
1577
+ `
1578
+ ];
1579
+ v([
1580
+ n({ type: String })
1581
+ ], h.prototype, "label", 2);
1582
+ v([
1583
+ n({ type: String })
1584
+ ], h.prototype, "type", 2);
1585
+ v([
1586
+ n({ type: String })
1587
+ ], h.prototype, "placeholder", 2);
1588
+ v([
1589
+ n({ type: String })
1590
+ ], h.prototype, "value", 2);
1591
+ v([
1592
+ n({ type: String })
1593
+ ], h.prototype, "error", 2);
1594
+ v([
1595
+ n({ type: Boolean })
1596
+ ], h.prototype, "disabled", 2);
1597
+ v([
1598
+ n({ type: Boolean })
1599
+ ], h.prototype, "required", 2);
1600
+ v([
1601
+ n({ type: String })
1602
+ ], h.prototype, "name", 2);
1603
+ v([
1604
+ n({ type: String })
1605
+ ], h.prototype, "autocomplete", 2);
1606
+ v([
1607
+ n({ type: String })
1608
+ ], h.prototype, "inputmode", 2);
1609
+ v([
1610
+ n({ type: Number })
1611
+ ], h.prototype, "maxlength", 2);
1612
+ v([
1613
+ n({ type: Object })
1614
+ ], h.prototype, "sx", 2);
1615
+ v([
1616
+ S()
1617
+ ], h.prototype, "inputId", 2);
1618
+ v([
1619
+ S()
1620
+ ], h.prototype, "isFocused", 2);
1621
+ h = v([
1622
+ p("tc-input")
1623
+ ], h);
1624
+ var Qt = Object.defineProperty, Jt = Object.getOwnPropertyDescriptor, nt = (r, e, s, i) => {
1625
+ for (var t = i > 1 ? void 0 : i ? Jt(e, s) : e, a = r.length - 1, o; a >= 0; a--)
1626
+ (o = r[a]) && (t = (i ? o(e, s, t) : o(t)) || t);
1627
+ return i && t && Qt(e, s, t), t;
1628
+ };
1629
+ let A = class extends d {
1630
+ constructor() {
1631
+ super(...arguments), this.gap = "var(--space-md)", this.padding = "var(--space-md)", this.sx = {};
1632
+ }
1633
+ render() {
1634
+ const r = {
1635
+ "--item-padding": this.padding,
1636
+ "--item-gap": this.gap,
1637
+ ...this.sx
1638
+ };
1639
+ return l`
1640
+ <div part="item" class="item" style=${m(r)}>
1641
+ <div part="prefix" class="prefix">
1642
+ <slot name="prefix"></slot>
1643
+ </div>
1644
+ <div part="content" class="content">
1645
+ <slot></slot>
1646
+ </div>
1647
+ <div part="suffix" class="suffix">
1648
+ <slot name="suffix"></slot>
1649
+ </div>
1650
+ </div>
1651
+ `;
1652
+ }
1653
+ };
1654
+ A.styles = c`
1655
+ :host {
1656
+ display: block;
1657
+ width: 100%;
1658
+ }
1659
+
1660
+ .item {
1661
+ display: flex;
1662
+ align-items: center;
1663
+ width: 100%;
1664
+ padding: var(--item-padding);
1665
+ gap: var(--item-gap);
1666
+ background: var(--paper-cream);
1667
+ border-radius: var(--radius-md);
1668
+ box-sizing: border-box;
1669
+ }
1670
+
1671
+ .prefix {
1672
+ flex-shrink: 0;
1673
+ display: flex;
1674
+ align-items: center;
1675
+ justify-content: center;
1676
+ }
1677
+
1678
+ .content {
1679
+ flex: 1;
1680
+ min-width: 0;
1681
+ font-family: var(--font-body);
1682
+ font-size: var(--font-size-base);
1683
+ color: var(--ink-dark);
1684
+ }
1685
+
1686
+ .suffix {
1687
+ flex-shrink: 0;
1688
+ display: flex;
1689
+ align-items: center;
1690
+ justify-content: center;
1691
+ }
1692
+
1693
+ /* Hide empty slots */
1694
+ .prefix:not(:has(*)),
1695
+ .suffix:not(:has(*)) {
1696
+ display: none;
1697
+ }
1698
+ `;
1699
+ nt([
1700
+ n({ type: String })
1701
+ ], A.prototype, "gap", 2);
1702
+ nt([
1703
+ n({ type: String })
1704
+ ], A.prototype, "padding", 2);
1705
+ nt([
1706
+ n({ type: Object })
1707
+ ], A.prototype, "sx", 2);
1708
+ A = nt([
1709
+ p("tc-item")
1710
+ ], A);
1711
+ var Zt = Object.defineProperty, te = Object.getOwnPropertyDescriptor, F = (r, e, s, i) => {
1712
+ for (var t = i > 1 ? void 0 : i ? te(e, s) : e, a = r.length - 1, o; a >= 0; a--)
1713
+ (o = r[a]) && (t = (i ? o(e, s, t) : o(t)) || t);
1714
+ return i && t && Zt(e, s, t), t;
1715
+ };
1716
+ let y = class extends d {
1717
+ constructor() {
1718
+ super(...arguments), this.gap = "var(--space-md)", this.padding = "var(--space-md)", this.disabled = !1, this.showArrow = !0, this.sx = {};
1719
+ }
1720
+ handleClick() {
1721
+ this.disabled || this.dispatchEvent(
1722
+ new CustomEvent("tc-click", {
1723
+ bubbles: !0,
1724
+ composed: !0
1725
+ })
1726
+ );
1727
+ }
1728
+ render() {
1729
+ const r = {
1730
+ "--item-padding": this.padding,
1731
+ "--item-gap": this.gap,
1732
+ ...this.sx
1733
+ };
1734
+ return l`
1735
+ <button
1736
+ part="button"
1737
+ class="button"
1738
+ ?disabled=${this.disabled}
1739
+ style=${m(r)}
1740
+ @click=${this.handleClick}
1741
+ >
1742
+ <div part="prefix" class="prefix">
1743
+ <slot name="prefix"></slot>
1744
+ </div>
1745
+ <div part="content" class="content">
1746
+ <slot></slot>
1747
+ </div>
1748
+ <div part="suffix" class="suffix">
1749
+ <slot name="suffix"></slot>
1750
+ </div>
1751
+ ${this.showArrow ? l`
1752
+ <svg
1753
+ part="arrow"
1754
+ class="arrow"
1755
+ viewBox="0 0 24 24"
1756
+ fill="none"
1757
+ stroke="currentColor"
1758
+ stroke-width="2"
1759
+ stroke-linecap="round"
1760
+ stroke-linejoin="round"
1761
+ >
1762
+ <polyline points="9 18 15 12 9 6"></polyline>
1763
+ </svg>
1764
+ ` : ""}
1765
+ </button>
1766
+ `;
1767
+ }
1768
+ };
1769
+ y.styles = c`
1770
+ :host {
1771
+ display: block;
1772
+ width: 100%;
1773
+ }
1774
+
1775
+ .button {
1776
+ display: flex;
1777
+ align-items: center;
1778
+ width: 100%;
1779
+ padding: var(--item-padding);
1780
+ gap: var(--item-gap);
1781
+ background: var(--paper-cream);
1782
+ border: none;
1783
+ border-radius: var(--radius-md);
1784
+ box-sizing: border-box;
1785
+ cursor: pointer;
1786
+ font-family: inherit;
1787
+ text-align: left;
1788
+ transition: var(--transition-fast);
1789
+ }
1790
+
1791
+ .button:hover:not(:disabled) {
1792
+ background: var(--paper-warm);
1793
+ }
1794
+
1795
+ .button:active:not(:disabled) {
1796
+ transform: scale(0.995);
1797
+ }
1798
+
1799
+ .button:focus-visible {
1800
+ outline: 2px solid var(--accent-primary);
1801
+ outline-offset: 2px;
1802
+ }
1803
+
1804
+ .button:disabled {
1805
+ opacity: 0.6;
1806
+ cursor: not-allowed;
1807
+ }
1808
+
1809
+ .prefix {
1810
+ flex-shrink: 0;
1811
+ display: flex;
1812
+ align-items: center;
1813
+ justify-content: center;
1814
+ }
1815
+
1816
+ .content {
1817
+ flex: 1;
1818
+ min-width: 0;
1819
+ font-family: var(--font-body);
1820
+ font-size: var(--font-size-base);
1821
+ color: var(--ink-dark);
1822
+ }
1823
+
1824
+ .suffix {
1825
+ flex-shrink: 0;
1826
+ display: flex;
1827
+ align-items: center;
1828
+ justify-content: center;
1829
+ }
1830
+
1831
+ .arrow {
1832
+ flex-shrink: 0;
1833
+ width: 1.25rem;
1834
+ height: 1.25rem;
1835
+ color: var(--ink-light);
1836
+ transition: var(--transition-fast);
1837
+ }
1838
+
1839
+ .button:hover:not(:disabled) .arrow {
1840
+ color: var(--ink-medium);
1841
+ transform: translateX(2px);
1842
+ }
1843
+
1844
+ /* Hide empty slots */
1845
+ .prefix:not(:has(*)),
1846
+ .suffix:not(:has(*)) {
1847
+ display: none;
1848
+ }
1849
+
1850
+ /* Hide arrow when suffix has content */
1851
+ .suffix:has(*) + .arrow {
1852
+ display: none;
1853
+ }
1854
+ `;
1855
+ F([
1856
+ n({ type: String })
1857
+ ], y.prototype, "gap", 2);
1858
+ F([
1859
+ n({ type: String })
1860
+ ], y.prototype, "padding", 2);
1861
+ F([
1862
+ n({ type: Boolean })
1863
+ ], y.prototype, "disabled", 2);
1864
+ F([
1865
+ n({ type: Boolean, attribute: "show-arrow" })
1866
+ ], y.prototype, "showArrow", 2);
1867
+ F([
1868
+ n({ type: Object })
1869
+ ], y.prototype, "sx", 2);
1870
+ y = F([
1871
+ p("tc-item-button")
1872
+ ], y);
1873
+ var ee = Object.defineProperty, re = Object.getOwnPropertyDescriptor, q = (r, e, s, i) => {
1874
+ for (var t = i > 1 ? void 0 : i ? re(e, s) : e, a = r.length - 1, o; a >= 0; a--)
1875
+ (o = r[a]) && (t = (i ? o(e, s, t) : o(t)) || t);
1876
+ return i && t && ee(e, s, t), t;
1877
+ };
1878
+ let w = class extends d {
1879
+ constructor() {
1880
+ super(...arguments), this.length = 6, this.error = !1, this.disabled = !1, this.showProgress = !0, this.values = [];
1881
+ }
1882
+ connectedCallback() {
1883
+ super.connectedCallback(), this.values = new Array(this.length).fill("");
1884
+ }
1885
+ render() {
1886
+ const e = this.values.filter((s) => s.length > 0).length / this.length * 100;
1887
+ return l`
1888
+ <div class="container">
1889
+ <div part="cells" class="cells" role="group" aria-label="OTP input">
1890
+ ${this.values.map((s, i) => {
1891
+ const a = [
1892
+ "cell",
1893
+ s.length > 0 ? "cell--filled" : "",
1894
+ this.error ? "cell--error" : ""
1895
+ ].filter(Boolean).join(" ");
1896
+ return l`
1897
+ <input
1898
+ part="cell"
1899
+ class=${a}
1900
+ type="text"
1901
+ inputmode="numeric"
1902
+ maxlength="1"
1903
+ pattern="[0-9]"
1904
+ .value=${s}
1905
+ ?disabled=${this.disabled}
1906
+ aria-label="Digit ${i + 1}"
1907
+ @input=${(o) => this.handleInput(o, i)}
1908
+ @keydown=${(o) => this.handleKeydown(o, i)}
1909
+ @paste=${(o) => this.handlePaste(o)}
1910
+ />
1911
+ `;
1912
+ })}
1913
+ </div>
1914
+ ${this.showProgress ? l`
1915
+ <div part="progress" class="progress">
1916
+ <div
1917
+ part="progress-bar"
1918
+ class="progress-bar"
1919
+ style="width: ${e}%"
1920
+ ></div>
1921
+ </div>
1922
+ ` : ""}
1923
+ </div>
1924
+ `;
1925
+ }
1926
+ handleInput(r, e) {
1927
+ const i = r.target.value.replace(/\D/g, "").slice(0, 1);
1928
+ this.values = [...this.values], this.values[e] = i, this.dispatchEvent(
1929
+ new CustomEvent("tc-change", {
1930
+ bubbles: !0,
1931
+ composed: !0,
1932
+ detail: { value: this.values.join(""), values: [...this.values] }
1933
+ })
1934
+ ), i && e < this.length - 1 && this.focusCell(e + 1), this.values.every((t) => t.length > 0) && this.dispatchEvent(
1935
+ new CustomEvent("tc-complete", {
1936
+ bubbles: !0,
1937
+ composed: !0,
1938
+ detail: { value: this.values.join("") }
1939
+ })
1940
+ );
1941
+ }
1942
+ handleKeydown(r, e) {
1943
+ r.key === "Backspace" && !this.values[e] && e > 0 ? (r.preventDefault(), this.values = [...this.values], this.values[e - 1] = "", this.focusCell(e - 1)) : r.key === "ArrowLeft" && e > 0 ? (r.preventDefault(), this.focusCell(e - 1)) : r.key === "ArrowRight" && e < this.length - 1 && (r.preventDefault(), this.focusCell(e + 1));
1944
+ }
1945
+ handlePaste(r) {
1946
+ r.preventDefault();
1947
+ const s = (r.clipboardData?.getData("text") || "").replace(/\D/g, "").slice(0, this.length);
1948
+ if (s) {
1949
+ this.values = new Array(this.length).fill(""), s.split("").forEach((t, a) => {
1950
+ this.values[a] = t;
1951
+ }), this.values = [...this.values];
1952
+ const i = Math.min(s.length, this.length - 1);
1953
+ this.focusCell(i), this.dispatchEvent(
1954
+ new CustomEvent("tc-change", {
1955
+ bubbles: !0,
1956
+ composed: !0,
1957
+ detail: { value: this.values.join(""), values: [...this.values] }
1958
+ })
1959
+ ), s.length >= this.length && this.dispatchEvent(
1960
+ new CustomEvent("tc-complete", {
1961
+ bubbles: !0,
1962
+ composed: !0,
1963
+ detail: { value: this.values.join("") }
1964
+ })
1965
+ );
1966
+ }
1967
+ }
1968
+ focusCell(r) {
1969
+ requestAnimationFrame(() => {
1970
+ this.shadowRoot?.querySelectorAll(
1971
+ ".cell"
1972
+ )?.[r]?.focus();
1973
+ });
1974
+ }
1975
+ /** Focus the first empty cell or the last cell */
1976
+ focus() {
1977
+ const r = this.values.findIndex((s) => !s), e = r >= 0 ? r : this.length - 1;
1978
+ this.focusCell(e);
1979
+ }
1980
+ /** Clear all values */
1981
+ clear() {
1982
+ this.values = new Array(this.length).fill(""), this.focusCell(0);
1983
+ }
1984
+ /** Get the current OTP value */
1985
+ getValue() {
1986
+ return this.values.join("");
1987
+ }
1988
+ };
1989
+ w.styles = [
1990
+ u,
1991
+ c`
1992
+ :host {
1993
+ display: block;
1994
+ }
1995
+
1996
+ .container {
1997
+ display: flex;
1998
+ flex-direction: column;
1999
+ align-items: center;
2000
+ gap: var(--space-md);
2001
+ }
2002
+
2003
+ .cells {
2004
+ display: flex;
2005
+ gap: var(--space-sm);
2006
+ justify-content: center;
2007
+ }
2008
+
2009
+ .cell {
2010
+ width: clamp(2.625rem, 2.35rem + 1.36vw, 3rem);
2011
+ height: clamp(3.125rem, 2.78rem + 1.74vw, 3.5rem);
2012
+ border: var(--size-border-width-thick) solid transparent;
2013
+ border-radius: var(--radius-md);
2014
+ background: var(--paper-cream);
2015
+ font-family: var(--font-body);
2016
+ font-size: clamp(1.25rem, 1.14rem + 0.54vw, 1.5rem);
2017
+ font-weight: 600;
2018
+ text-align: center;
2019
+ color: var(--ink-black);
2020
+ transition: all var(--duration-instant) ease;
2021
+ caret-color: var(--accent-primary);
2022
+ }
2023
+
2024
+ .cell:focus {
2025
+ outline: none;
2026
+ background: var(--paper-white);
2027
+ border-color: var(--accent-primary);
2028
+ box-shadow: var(--shadow-otp-cell-focus);
2029
+ }
2030
+
2031
+ .cell--filled {
2032
+ background: var(--paper-white);
2033
+ border-color: var(--ink-faint);
2034
+ }
2035
+
2036
+ .cell--error {
2037
+ border-color: var(--error-base) !important;
2038
+ animation: shake var(--duration-smooth) ease;
2039
+ }
2040
+
2041
+ .cell:disabled {
2042
+ opacity: var(--opacity-disabled);
2043
+ cursor: not-allowed;
2044
+ }
2045
+
2046
+ /* Progress bar */
2047
+ .progress {
2048
+ width: 100%;
2049
+ max-width: 12rem;
2050
+ height: var(--size-border-width-heavy);
2051
+ background: var(--paper-warm);
2052
+ border-radius: var(--radius-full);
2053
+ overflow: hidden;
2054
+ }
2055
+
2056
+ .progress-bar {
2057
+ height: 100%;
2058
+ background: linear-gradient(
2059
+ 90deg,
2060
+ var(--accent-primary) 0%,
2061
+ var(--accent-primary-hover) 100%
2062
+ );
2063
+ transition: width var(--duration-instant) ease;
2064
+ }
2065
+
2066
+ /* Reduced motion */
2067
+ @media (prefers-reduced-motion: reduce) {
2068
+ .cell,
2069
+ .progress-bar {
2070
+ transition-duration: 0.01ms !important;
2071
+ }
2072
+
2073
+ .cell--error {
2074
+ animation: none;
2075
+ }
2076
+ }
2077
+ `
2078
+ ];
2079
+ q([
2080
+ n({ type: Number })
2081
+ ], w.prototype, "length", 2);
2082
+ q([
2083
+ n({ type: Boolean })
2084
+ ], w.prototype, "error", 2);
2085
+ q([
2086
+ n({ type: Boolean })
2087
+ ], w.prototype, "disabled", 2);
2088
+ q([
2089
+ n({ type: Boolean, attribute: "show-progress" })
2090
+ ], w.prototype, "showProgress", 2);
2091
+ q([
2092
+ S()
2093
+ ], w.prototype, "values", 2);
2094
+ w = q([
2095
+ p("tc-otp-input")
2096
+ ], w);
2097
+ var ie = Object.defineProperty, se = Object.getOwnPropertyDescriptor, vt = (r, e, s, i) => {
2098
+ for (var t = i > 1 ? void 0 : i ? se(e, s) : e, a = r.length - 1, o; a >= 0; a--)
2099
+ (o = r[a]) && (t = (i ? o(e, s, t) : o(t)) || t);
2100
+ return i && t && ie(e, s, t), t;
2101
+ };
2102
+ let X = class extends d {
2103
+ constructor() {
2104
+ super(...arguments), this.gap = "var(--space-md)", this.sx = {};
2105
+ }
2106
+ render() {
2107
+ const r = {
2108
+ gap: this.gap,
2109
+ ...this.sx
2110
+ };
2111
+ return l`
2112
+ <section part="section" class="section" style=${m(r)}>
2113
+ <slot></slot>
2114
+ </section>
2115
+ `;
2116
+ }
2117
+ };
2118
+ X.styles = c`
2119
+ :host {
2120
+ display: block;
2121
+ width: 100%;
2122
+ }
2123
+
2124
+ .section {
2125
+ display: flex;
2126
+ flex-direction: column;
2127
+ width: 100%;
2128
+ }
2129
+ `;
2130
+ vt([
2131
+ n({ type: String })
2132
+ ], X.prototype, "gap", 2);
2133
+ vt([
2134
+ n({ type: Object })
2135
+ ], X.prototype, "sx", 2);
2136
+ X = vt([
2137
+ p("tc-section")
2138
+ ], X);
2139
+ var ae = Object.defineProperty, oe = Object.getOwnPropertyDescriptor, mt = (r, e, s, i) => {
2140
+ for (var t = i > 1 ? void 0 : i ? oe(e, s) : e, a = r.length - 1, o; a >= 0; a--)
2141
+ (o = r[a]) && (t = (i ? o(e, s, t) : o(t)) || t);
2142
+ return i && t && ae(e, s, t), t;
2143
+ };
2144
+ let G = class extends d {
2145
+ constructor() {
2146
+ super(...arguments), this.mobile = new Dt(this, "(max-width: 768px)"), this.size = "auto", this.color = "var(--accent-primary)";
2147
+ }
2148
+ render() {
2149
+ let r;
2150
+ return this.size === "auto" ? r = this.mobile.matches ? "spinner--auto-mobile" : "spinner--auto-desktop" : r = `spinner--${this.size}`, l`
2151
+ <div
2152
+ part="spinner"
2153
+ class="spinner ${r}"
2154
+ style="--spinner-color: ${this.color};"
2155
+ role="progressbar"
2156
+ aria-label="Loading"
2157
+ ></div>
2158
+ `;
2159
+ }
2160
+ };
2161
+ G.styles = [
2162
+ u,
2163
+ c`
2164
+ :host {
2165
+ display: inline-flex;
2166
+ align-items: center;
2167
+ justify-content: center;
2168
+ }
2169
+
2170
+ .spinner {
2171
+ display: block;
2172
+ border-radius: 50%;
2173
+ border-style: solid;
2174
+ border-color: var(--paper-cream);
2175
+ border-top-color: var(--spinner-color);
2176
+ animation: spin var(--duration-slow) linear infinite;
2177
+ }
2178
+
2179
+ .spinner--sm {
2180
+ width: var(--size-spinner-sm);
2181
+ height: var(--size-spinner-sm);
2182
+ border-width: var(--size-border-width-thick);
2183
+ }
2184
+
2185
+ .spinner--md {
2186
+ width: var(--size-spinner-md);
2187
+ height: var(--size-spinner-md);
2188
+ border-width: var(--size-border-width-heavy);
2189
+ }
2190
+
2191
+ .spinner--lg {
2192
+ width: var(--size-spinner-lg);
2193
+ height: var(--size-spinner-lg);
2194
+ border-width: var(--size-border-width-bold);
2195
+ }
2196
+
2197
+ .spinner--auto-mobile {
2198
+ width: var(--size-spinner-lg);
2199
+ height: var(--size-spinner-lg);
2200
+ border-width: var(--size-border-width-heavy);
2201
+ }
2202
+
2203
+ .spinner--auto-desktop {
2204
+ width: 5rem;
2205
+ height: 5rem;
2206
+ border-width: var(--size-border-width-bold);
2207
+ }
2208
+ `
2209
+ ];
2210
+ mt([
2211
+ n({ type: String })
2212
+ ], G.prototype, "size", 2);
2213
+ mt([
2214
+ n({ type: String })
2215
+ ], G.prototype, "color", 2);
2216
+ G = mt([
2217
+ p("tc-spinner")
2218
+ ], G);
2219
+ var ne = Object.defineProperty, le = Object.getOwnPropertyDescriptor, lt = (r, e, s, i) => {
2220
+ for (var t = i > 1 ? void 0 : i ? le(e, s) : e, a = r.length - 1, o; a >= 0; a--)
2221
+ (o = r[a]) && (t = (i ? o(e, s, t) : o(t)) || t);
2222
+ return i && t && ne(e, s, t), t;
2223
+ };
2224
+ let M = class extends d {
2225
+ constructor() {
2226
+ super(...arguments), this.size = "3rem", this.background = "var(--paper-cream)", this.color = "var(--ink-dark)";
2227
+ }
2228
+ render() {
2229
+ return l`
2230
+ <div
2231
+ part="symbol"
2232
+ class="symbol"
2233
+ style="--symbol-size: ${this.size}; --symbol-bg: ${this.background}; --symbol-color: ${this.color};"
2234
+ >
2235
+ <slot></slot>
2236
+ </div>
2237
+ `;
2238
+ }
2239
+ };
2240
+ M.styles = c`
2241
+ :host {
2242
+ display: inline-flex;
2243
+ }
2244
+
2245
+ .symbol {
2246
+ display: flex;
2247
+ align-items: center;
2248
+ justify-content: center;
2249
+ border-radius: var(--radius-full);
2250
+ background: var(--symbol-bg);
2251
+ color: var(--symbol-color);
2252
+ width: var(--symbol-size);
2253
+ height: var(--symbol-size);
2254
+ font-family: var(--font-body);
2255
+ font-weight: 600;
2256
+ }
2257
+ `;
2258
+ lt([
2259
+ n({ type: String })
2260
+ ], M.prototype, "size", 2);
2261
+ lt([
2262
+ n({ type: String })
2263
+ ], M.prototype, "background", 2);
2264
+ lt([
2265
+ n({ type: String })
2266
+ ], M.prototype, "color", 2);
2267
+ M = lt([
2268
+ p("tc-symbol")
2269
+ ], M);
2270
+ var ce = Object.defineProperty, de = Object.getOwnPropertyDescriptor, Y = (r, e, s, i) => {
2271
+ for (var t = i > 1 ? void 0 : i ? de(e, s) : e, a = r.length - 1, o; a >= 0; a--)
2272
+ (o = r[a]) && (t = (i ? o(e, s, t) : o(t)) || t);
2273
+ return i && t && ce(e, s, t), t;
2274
+ };
2275
+ let x = class extends d {
2276
+ constructor() {
2277
+ super(...arguments), this.tag = "p", this.sx = {};
2278
+ }
2279
+ getColorClass() {
2280
+ return this.color && {
2281
+ primary: "text--primary",
2282
+ secondary: "text--secondary",
2283
+ tertiary: "text--tertiary",
2284
+ muted: "text--muted",
2285
+ accent: "text--accent",
2286
+ success: "text--success",
2287
+ error: "text--error",
2288
+ warning: "text--warning",
2289
+ info: "text--info"
2290
+ }[this.color] || "";
2291
+ }
2292
+ getColorStyle() {
2293
+ if (this.color && (this.color.startsWith("var(") || this.color.startsWith("#") || this.color.startsWith("rgb")))
2294
+ return this.color;
2295
+ }
2296
+ render() {
2297
+ const r = $t(this.tag), e = [
2298
+ "text",
2299
+ this.size ? `text--${this.size}` : "",
2300
+ this.weight ? `text--w${this.weight}` : "",
2301
+ this.getColorClass()
2302
+ ].filter(Boolean).join(" "), s = this.getColorStyle(), i = {
2303
+ ...s ? { color: s } : {},
2304
+ ...this.sx
2305
+ };
2306
+ return _t`
2307
+ <${r} part="text" class=${e} style=${m(i)}>
2308
+ <slot></slot>
2309
+ </${r}>
2310
+ `;
2311
+ }
2312
+ };
2313
+ x.styles = [
2314
+ u,
2315
+ c`
2316
+ :host {
2317
+ display: contents;
2318
+ }
2319
+
2320
+ .text {
2321
+ margin: 0;
2322
+ padding: 0;
2323
+ font-family: var(--font-body);
2324
+ line-height: 1.4;
2325
+ color: var(--ink-black);
2326
+ }
2327
+
2328
+ /* Size variants using design-tokens */
2329
+ .text--sm {
2330
+ font-size: var(--font-size-sm);
2331
+ }
2332
+ .text--base {
2333
+ font-size: var(--font-size-base);
2334
+ }
2335
+ .text--lg {
2336
+ font-size: var(--font-size-lg);
2337
+ }
2338
+ .text--xl {
2339
+ font-size: var(--font-size-xl);
2340
+ }
2341
+ .text--2xl {
2342
+ font-size: var(--font-size-2xl);
2343
+ }
2344
+
2345
+ /* Weight variants */
2346
+ .text--w400 {
2347
+ font-weight: 400;
2348
+ }
2349
+ .text--w500 {
2350
+ font-weight: 500;
2351
+ }
2352
+ .text--w600 {
2353
+ font-weight: 600;
2354
+ }
2355
+ .text--w700 {
2356
+ font-weight: 700;
2357
+ }
2358
+
2359
+ /* Color variants using design-tokens - these will respond to theme changes */
2360
+ .text--primary {
2361
+ color: var(--ink-black);
2362
+ }
2363
+ .text--secondary {
2364
+ color: var(--ink-dark);
2365
+ }
2366
+ .text--tertiary {
2367
+ color: var(--ink-medium);
2368
+ }
2369
+ .text--muted {
2370
+ color: var(--ink-light);
2371
+ }
2372
+ .text--accent {
2373
+ color: var(--accent-primary);
2374
+ }
2375
+ .text--success {
2376
+ color: var(--accent-success);
2377
+ }
2378
+ .text--error {
2379
+ color: var(--error-base);
2380
+ }
2381
+ .text--warning {
2382
+ color: var(--semantic-warning);
2383
+ }
2384
+ .text--info {
2385
+ color: var(--semantic-info);
2386
+ }
2387
+ `
2388
+ ];
2389
+ Y([
2390
+ n({ type: String })
2391
+ ], x.prototype, "tag", 2);
2392
+ Y([
2393
+ n({ type: String })
2394
+ ], x.prototype, "size", 2);
2395
+ Y([
2396
+ n({ type: String })
2397
+ ], x.prototype, "weight", 2);
2398
+ Y([
2399
+ n({ type: String })
2400
+ ], x.prototype, "color", 2);
2401
+ Y([
2402
+ n({ type: Object })
2403
+ ], x.prototype, "sx", 2);
2404
+ x = Y([
2405
+ p("tc-text")
2406
+ ], x);
2407
+ var pe = Object.defineProperty, he = Object.getOwnPropertyDescriptor, tt = (r, e, s, i) => {
2408
+ for (var t = i > 1 ? void 0 : i ? he(e, s) : e, a = r.length - 1, o; a >= 0; a--)
2409
+ (o = r[a]) && (t = (i ? o(e, s, t) : o(t)) || t);
2410
+ return i && t && pe(e, s, t), t;
2411
+ };
2412
+ let z = class extends d {
2413
+ constructor() {
2414
+ super(...arguments), this.variant = "info", this.duration = 5e3, this.autoDismiss = !0, this.dismissible = !0, this.animation = new j(this, {
2415
+ showDuration: 300,
2416
+ hideDuration: 200
2417
+ });
2418
+ }
2419
+ connectedCallback() {
2420
+ super.connectedCallback(), this.updateDataState();
2421
+ }
2422
+ disconnectedCallback() {
2423
+ super.disconnectedCallback(), this.clearDismissTimer();
2424
+ }
2425
+ updateDataState() {
2426
+ this.dataset.state = this.animation.state;
2427
+ }
2428
+ clearDismissTimer() {
2429
+ this.dismissTimer && (clearTimeout(this.dismissTimer), this.dismissTimer = void 0);
2430
+ }
2431
+ startDismissTimer() {
2432
+ this.autoDismiss && this.duration > 0 && (this.clearDismissTimer(), this.dismissTimer = setTimeout(() => {
2433
+ this.hide();
2434
+ }, this.duration));
2435
+ }
2436
+ async show() {
2437
+ this.clearDismissTimer(), await this.animation.show(), this.updateDataState(), this.startDismissTimer();
2438
+ }
2439
+ async hide() {
2440
+ this.clearDismissTimer(), await this.animation.hide(), this.updateDataState(), this.dispatchEvent(
2441
+ new CustomEvent("tc-dismiss", {
2442
+ bubbles: !0,
2443
+ composed: !0
2444
+ })
2445
+ );
2446
+ }
2447
+ handleClose() {
2448
+ this.hide();
2449
+ }
2450
+ render() {
2451
+ return l`
2452
+ <div part="toast" class="toast toast--${this.variant}" role="alert" aria-live="polite">
2453
+ <div part="content" class="content">
2454
+ <slot></slot>
2455
+ </div>
2456
+ ${this.dismissible ? l`
2457
+ <button
2458
+ part="close"
2459
+ class="close"
2460
+ @click=${this.handleClose}
2461
+ aria-label="Dismiss"
2462
+ >
2463
+ <svg
2464
+ viewBox="0 0 24 24"
2465
+ fill="none"
2466
+ stroke="currentColor"
2467
+ stroke-width="2"
2468
+ stroke-linecap="round"
2469
+ stroke-linejoin="round"
2470
+ >
2471
+ <line x1="18" y1="6" x2="6" y2="18"></line>
2472
+ <line x1="6" y1="6" x2="18" y2="18"></line>
2473
+ </svg>
2474
+ </button>
2475
+ ` : ""}
2476
+ </div>
2477
+ `;
2478
+ }
2479
+ };
2480
+ z.styles = [
2481
+ u,
2482
+ c`
2483
+ :host {
2484
+ display: block;
2485
+ position: fixed;
2486
+ bottom: var(--space-lg);
2487
+ left: 50%;
2488
+ transform: translateX(-50%);
2489
+ z-index: 1000;
2490
+ pointer-events: none;
2491
+ }
2492
+
2493
+ .toast {
2494
+ display: flex;
2495
+ align-items: center;
2496
+ gap: var(--space-sm);
2497
+ padding: var(--space-md) var(--space-lg);
2498
+ border-radius: var(--radius-md);
2499
+ font-family: var(--font-body);
2500
+ font-size: var(--font-size-sm);
2501
+ box-shadow: 0 4px 12px var(--overlay-shadow-subtle);
2502
+ pointer-events: auto;
2503
+ opacity: 0;
2504
+ transform: translateY(100%);
2505
+ transition: opacity var(--transition-smooth), transform var(--transition-smooth);
2506
+ }
2507
+
2508
+ :host([data-state='showing']) .toast,
2509
+ :host([data-state='visible']) .toast {
2510
+ opacity: 1;
2511
+ transform: translateY(0);
2512
+ }
2513
+
2514
+ :host([data-state='hiding']) .toast {
2515
+ opacity: 0;
2516
+ transform: translateY(100%);
2517
+ }
2518
+
2519
+ :host([data-state='hidden']) {
2520
+ display: none;
2521
+ }
2522
+
2523
+ .toast--info {
2524
+ background: var(--ink-dark);
2525
+ color: var(--paper-white);
2526
+ }
2527
+
2528
+ .toast--success {
2529
+ background: var(--accent-success);
2530
+ color: white;
2531
+ }
2532
+
2533
+ .toast--warning {
2534
+ background: var(--semantic-warning);
2535
+ color: white;
2536
+ }
2537
+
2538
+ .toast--error {
2539
+ background: var(--error-base);
2540
+ color: white;
2541
+ }
2542
+
2543
+ .content {
2544
+ flex: 1;
2545
+ line-height: 1.4;
2546
+ }
2547
+
2548
+ .close {
2549
+ flex-shrink: 0;
2550
+ display: flex;
2551
+ align-items: center;
2552
+ justify-content: center;
2553
+ width: var(--size-icon-md);
2554
+ height: var(--size-icon-md);
2555
+ padding: 0;
2556
+ border: none;
2557
+ background: transparent;
2558
+ color: inherit;
2559
+ opacity: var(--opacity-hover);
2560
+ cursor: pointer;
2561
+ transition: opacity var(--transition-fast);
2562
+ }
2563
+
2564
+ .close:hover {
2565
+ opacity: 1;
2566
+ }
2567
+
2568
+ .close svg {
2569
+ width: var(--size-icon-sm);
2570
+ height: var(--size-icon-sm);
2571
+ }
2572
+ `
2573
+ ];
2574
+ tt([
2575
+ n({ type: String })
2576
+ ], z.prototype, "variant", 2);
2577
+ tt([
2578
+ n({ type: Number })
2579
+ ], z.prototype, "duration", 2);
2580
+ tt([
2581
+ n({ type: Boolean, attribute: "auto-dismiss" })
2582
+ ], z.prototype, "autoDismiss", 2);
2583
+ tt([
2584
+ n({ type: Boolean })
2585
+ ], z.prototype, "dismissible", 2);
2586
+ z = tt([
2587
+ p("tc-toast")
2588
+ ], z);
2589
+ var ue = Object.defineProperty, ve = Object.getOwnPropertyDescriptor, et = (r, e, s, i) => {
2590
+ for (var t = i > 1 ? void 0 : i ? ve(e, s) : e, a = r.length - 1, o; a >= 0; a--)
2591
+ (o = r[a]) && (t = (i ? o(e, s, t) : o(t)) || t);
2592
+ return i && t && ue(e, s, t), t;
2593
+ };
2594
+ let D = class extends d {
2595
+ constructor() {
2596
+ super(...arguments), this.title = "Something went wrong", this.message = "An unexpected error occurred. Please try again.", this.retryLabel = "Try Again", this.showRetry = !0;
2597
+ }
2598
+ handleRetry() {
2599
+ this.dispatchEvent(
2600
+ new CustomEvent("tc-retry", {
2601
+ bubbles: !0,
2602
+ composed: !0
2603
+ })
2604
+ );
2605
+ }
2606
+ render() {
2607
+ return l`
2608
+ <div part="screen" class="screen">
2609
+ <tc-container>
2610
+ <div part="content" class="content">
2611
+ <div part="icon" class="icon-container">
2612
+ <tc-icon name="alert-circle" size="2rem"></tc-icon>
2613
+ </div>
2614
+ <tc-section gap="var(--space-sm)">
2615
+ <tc-text part="title" tag="h1" size="xl" weight="600" class="title">
2616
+ ${this.title}
2617
+ </tc-text>
2618
+ <tc-text part="message" size="base" color="tertiary" class="message">
2619
+ ${this.message}
2620
+ </tc-text>
2621
+ </tc-section>
2622
+ ${this.showRetry ? l`
2623
+ <div part="action" class="action">
2624
+ <tc-button variant="primary" @tc-click=${this.handleRetry}>
2625
+ ${this.retryLabel}
2626
+ </tc-button>
2627
+ </div>
2628
+ ` : ""}
2629
+ </div>
2630
+ </tc-container>
2631
+ </div>
2632
+ `;
2633
+ }
2634
+ };
2635
+ D.styles = c`
2636
+ :host {
2637
+ display: block;
2638
+ width: 100%;
2639
+ min-height: 100vh;
2640
+ min-height: 100dvh;
2641
+ }
2642
+
2643
+ .screen {
2644
+ display: flex;
2645
+ align-items: center;
2646
+ justify-content: center;
2647
+ width: 100%;
2648
+ min-height: 100vh;
2649
+ min-height: 100dvh;
2650
+ padding: var(--space-lg);
2651
+ box-sizing: border-box;
2652
+ background: var(--paper-white);
2653
+ }
2654
+
2655
+ .content {
2656
+ display: flex;
2657
+ flex-direction: column;
2658
+ align-items: center;
2659
+ gap: var(--space-lg);
2660
+ text-align: center;
2661
+ max-width: 20rem;
2662
+ }
2663
+
2664
+ .icon-container {
2665
+ display: flex;
2666
+ align-items: center;
2667
+ justify-content: center;
2668
+ width: 4rem;
2669
+ height: 4rem;
2670
+ background: var(--error-bg);
2671
+ border-radius: var(--radius-full);
2672
+ color: var(--error-base);
2673
+ }
2674
+
2675
+ .title {
2676
+ margin: 0;
2677
+ }
2678
+
2679
+ .message {
2680
+ color: var(--ink-medium);
2681
+ }
2682
+
2683
+ .action {
2684
+ width: 100%;
2685
+ margin-top: var(--space-md);
2686
+ }
2687
+ `;
2688
+ et([
2689
+ n({ type: String })
2690
+ ], D.prototype, "title", 2);
2691
+ et([
2692
+ n({ type: String })
2693
+ ], D.prototype, "message", 2);
2694
+ et([
2695
+ n({ type: String, attribute: "retry-label" })
2696
+ ], D.prototype, "retryLabel", 2);
2697
+ et([
2698
+ n({ type: Boolean, attribute: "show-retry" })
2699
+ ], D.prototype, "showRetry", 2);
2700
+ D = et([
2701
+ p("tc-error-screen")
2702
+ ], D);
2703
+ var me = Object.defineProperty, ge = Object.getOwnPropertyDescriptor, gt = (r, e, s, i) => {
2704
+ for (var t = i > 1 ? void 0 : i ? ge(e, s) : e, a = r.length - 1, o; a >= 0; a--)
2705
+ (o = r[a]) && (t = (i ? o(e, s, t) : o(t)) || t);
2706
+ return i && t && me(e, s, t), t;
2707
+ };
2708
+ let Q = class extends d {
2709
+ constructor() {
2710
+ super(...arguments), this.message = "", this.spinnerSize = "3rem", this.loading = new zt(this);
2711
+ }
2712
+ connectedCallback() {
2713
+ super.connectedCallback(), this.loading.start();
2714
+ }
2715
+ render() {
2716
+ return l`
2717
+ <div part="screen" class="screen">
2718
+ <tc-container>
2719
+ <div part="content" class="content">
2720
+ <tc-spinner part="spinner" size=${this.spinnerSize}></tc-spinner>
2721
+ ${this.message ? l`
2722
+ <tc-text part="message" class="message" size="base" color="tertiary">
2723
+ ${this.message}
2724
+ </tc-text>
2725
+ ` : ""}
2726
+ </div>
2727
+ </tc-container>
2728
+ </div>
2729
+ `;
2730
+ }
2731
+ };
2732
+ Q.styles = c`
2733
+ :host {
2734
+ display: block;
2735
+ width: 100%;
2736
+ min-height: 100vh;
2737
+ min-height: 100dvh;
2738
+ }
2739
+
2740
+ .screen {
2741
+ display: flex;
2742
+ align-items: center;
2743
+ justify-content: center;
2744
+ width: 100%;
2745
+ min-height: 100vh;
2746
+ min-height: 100dvh;
2747
+ padding: var(--space-lg);
2748
+ box-sizing: border-box;
2749
+ background: var(--paper-white);
2750
+ }
2751
+
2752
+ .content {
2753
+ display: flex;
2754
+ flex-direction: column;
2755
+ align-items: center;
2756
+ gap: var(--space-lg);
2757
+ text-align: center;
2758
+ }
2759
+
2760
+ .message {
2761
+ color: var(--ink-medium);
2762
+ max-width: 20rem;
2763
+ }
2764
+ `;
2765
+ gt([
2766
+ n({ type: String })
2767
+ ], Q.prototype, "message", 2);
2768
+ gt([
2769
+ n({ type: String, attribute: "spinner-size" })
2770
+ ], Q.prototype, "spinnerSize", 2);
2771
+ Q = gt([
2772
+ p("tc-loading-screen")
2773
+ ], Q);
2774
+ var fe = Object.defineProperty, be = Object.getOwnPropertyDescriptor, U = (r, e, s, i) => {
2775
+ for (var t = i > 1 ? void 0 : i ? be(e, s) : e, a = r.length - 1, o; a >= 0; a--)
2776
+ (o = r[a]) && (t = (i ? o(e, s, t) : o(t)) || t);
2777
+ return i && t && fe(e, s, t), t;
2778
+ };
2779
+ let k = class extends d {
2780
+ constructor() {
2781
+ super(...arguments), this.title = "Success!", this.message = "Your action was completed successfully.", this.actionLabel = "", this.autoAnimate = !0, this.isAnimated = !1, this.animation = new j(this, {
2782
+ showDuration: 600,
2783
+ hideDuration: 300
2784
+ });
2785
+ }
2786
+ connectedCallback() {
2787
+ super.connectedCallback(), this.autoAnimate && requestAnimationFrame(() => {
2788
+ this.playAnimation();
2789
+ });
2790
+ }
2791
+ async playAnimation() {
2792
+ await this.animation.show(), this.isAnimated = !0;
2793
+ }
2794
+ handleAction() {
2795
+ this.dispatchEvent(
2796
+ new CustomEvent("tc-action", {
2797
+ bubbles: !0,
2798
+ composed: !0
2799
+ })
2800
+ );
2801
+ }
2802
+ render() {
2803
+ const r = this.isAnimated ? "animated" : "";
2804
+ return l`
2805
+ <div part="screen" class="screen">
2806
+ <tc-container>
2807
+ <div part="content" class="content">
2808
+ <div part="icon" class="icon-container ${r}">
2809
+ <svg
2810
+ class="checkmark"
2811
+ viewBox="0 0 24 24"
2812
+ fill="none"
2813
+ stroke="currentColor"
2814
+ stroke-width="3"
2815
+ stroke-linecap="round"
2816
+ stroke-linejoin="round"
2817
+ >
2818
+ <polyline points="20 6 9 17 4 12"></polyline>
2819
+ </svg>
2820
+ </div>
2821
+ <tc-section gap="var(--space-sm)" class="text-content ${r}">
2822
+ <tc-text part="title" tag="h1" size="xl" weight="600" class="title">
2823
+ ${this.title}
2824
+ </tc-text>
2825
+ <tc-text part="message" size="base" color="tertiary" class="message">
2826
+ ${this.message}
2827
+ </tc-text>
2828
+ </tc-section>
2829
+ ${this.actionLabel ? l`
2830
+ <div part="action" class="action ${r}">
2831
+ <tc-button variant="success" @tc-click=${this.handleAction}>
2832
+ ${this.actionLabel}
2833
+ </tc-button>
2834
+ </div>
2835
+ ` : ""}
2836
+ </div>
2837
+ </tc-container>
2838
+ </div>
2839
+ `;
2840
+ }
2841
+ };
2842
+ k.styles = c`
2843
+ :host {
2844
+ display: block;
2845
+ width: 100%;
2846
+ min-height: 100vh;
2847
+ min-height: 100dvh;
2848
+ }
2849
+
2850
+ .screen {
2851
+ display: flex;
2852
+ align-items: center;
2853
+ justify-content: center;
2854
+ width: 100%;
2855
+ min-height: 100vh;
2856
+ min-height: 100dvh;
2857
+ padding: var(--space-lg);
2858
+ box-sizing: border-box;
2859
+ background: var(--paper-white);
2860
+ }
2861
+
2862
+ .content {
2863
+ display: flex;
2864
+ flex-direction: column;
2865
+ align-items: center;
2866
+ gap: var(--space-lg);
2867
+ text-align: center;
2868
+ max-width: 20rem;
2869
+ }
2870
+
2871
+ .icon-container {
2872
+ display: flex;
2873
+ align-items: center;
2874
+ justify-content: center;
2875
+ width: 5rem;
2876
+ height: 5rem;
2877
+ background: var(--alpha-success10);
2878
+ border-radius: var(--radius-full);
2879
+ color: var(--accent-success);
2880
+ transform: scale(0);
2881
+ opacity: 0;
2882
+ transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
2883
+ opacity 0.3s ease;
2884
+ }
2885
+
2886
+ .icon-container.animated {
2887
+ transform: scale(1);
2888
+ opacity: 1;
2889
+ }
2890
+
2891
+ .checkmark {
2892
+ width: 2.5rem;
2893
+ height: 2.5rem;
2894
+ stroke-dasharray: 50;
2895
+ stroke-dashoffset: 50;
2896
+ }
2897
+
2898
+ .icon-container.animated .checkmark {
2899
+ animation: draw-check 0.5s ease-out 0.3s forwards;
2900
+ }
2901
+
2902
+ @keyframes draw-check {
2903
+ to {
2904
+ stroke-dashoffset: 0;
2905
+ }
2906
+ }
2907
+
2908
+ .title {
2909
+ margin: 0;
2910
+ }
2911
+
2912
+ .message {
2913
+ color: var(--ink-medium);
2914
+ }
2915
+
2916
+ .text-content {
2917
+ opacity: 0;
2918
+ transform: translateY(10px);
2919
+ transition: opacity 0.4s ease, transform 0.4s ease;
2920
+ transition-delay: 0.4s;
2921
+ }
2922
+
2923
+ .text-content.animated {
2924
+ opacity: 1;
2925
+ transform: translateY(0);
2926
+ }
2927
+
2928
+ .action {
2929
+ width: 100%;
2930
+ margin-top: var(--space-md);
2931
+ opacity: 0;
2932
+ transform: translateY(10px);
2933
+ transition: opacity 0.4s ease, transform 0.4s ease;
2934
+ transition-delay: 0.6s;
2935
+ }
2936
+
2937
+ .action.animated {
2938
+ opacity: 1;
2939
+ transform: translateY(0);
2940
+ }
2941
+ `;
2942
+ U([
2943
+ n({ type: String })
2944
+ ], k.prototype, "title", 2);
2945
+ U([
2946
+ n({ type: String })
2947
+ ], k.prototype, "message", 2);
2948
+ U([
2949
+ n({ type: String, attribute: "action-label" })
2950
+ ], k.prototype, "actionLabel", 2);
2951
+ U([
2952
+ n({ type: Boolean, attribute: "auto-animate" })
2953
+ ], k.prototype, "autoAnimate", 2);
2954
+ U([
2955
+ S()
2956
+ ], k.prototype, "isAnimated", 2);
2957
+ k = U([
2958
+ p("tc-success-screen")
2959
+ ], k);
2960
+ var ye = Object.defineProperty, we = Object.getOwnPropertyDescriptor, rt = (r, e, s, i) => {
2961
+ for (var t = i > 1 ? void 0 : i ? we(e, s) : e, a = r.length - 1, o; a >= 0; a--)
2962
+ (o = r[a]) && (t = (i ? o(e, s, t) : o(t)) || t);
2963
+ return i && t && ye(e, s, t), t;
2964
+ };
2965
+ let O = class extends d {
2966
+ constructor() {
2967
+ super(...arguments), this.position = "bottom-right", this.size = "3.5rem", this.disabled = !1, this.sx = {};
2968
+ }
2969
+ connectedCallback() {
2970
+ super.connectedCallback(), this.setAttribute("position", this.position);
2971
+ }
2972
+ updated(r) {
2973
+ r.has("position") && this.setAttribute("position", this.position);
2974
+ }
2975
+ handleClick() {
2976
+ this.disabled || this.dispatchEvent(
2977
+ new CustomEvent("tc-click", {
2978
+ bubbles: !0,
2979
+ composed: !0
2980
+ })
2981
+ );
2982
+ }
2983
+ render() {
2984
+ const r = {
2985
+ "--fab-size": this.size,
2986
+ ...this.sx
2987
+ };
2988
+ return l`
2989
+ <button
2990
+ part="button"
2991
+ class="button"
2992
+ ?disabled=${this.disabled}
2993
+ style=${m(r)}
2994
+ @click=${this.handleClick}
2995
+ aria-label="Floating action"
2996
+ >
2997
+ <slot></slot>
2998
+ </button>
2999
+ `;
3000
+ }
3001
+ };
3002
+ O.styles = [
3003
+ u,
3004
+ c`
3005
+ :host {
3006
+ display: block;
3007
+ position: fixed;
3008
+ z-index: 100;
3009
+ }
3010
+
3011
+ :host([position='bottom-right']) {
3012
+ bottom: var(--space-lg);
3013
+ right: var(--space-lg);
3014
+ }
3015
+
3016
+ :host([position='bottom-left']) {
3017
+ bottom: var(--space-lg);
3018
+ left: var(--space-lg);
3019
+ }
3020
+
3021
+ :host([position='top-right']) {
3022
+ top: var(--space-lg);
3023
+ right: var(--space-lg);
3024
+ }
3025
+
3026
+ :host([position='top-left']) {
3027
+ top: var(--space-lg);
3028
+ left: var(--space-lg);
3029
+ }
3030
+
3031
+ .button {
3032
+ display: flex;
3033
+ align-items: center;
3034
+ justify-content: center;
3035
+ width: var(--fab-size);
3036
+ height: var(--fab-size);
3037
+ padding: 0;
3038
+ border: none;
3039
+ border-radius: var(--radius-full);
3040
+ background: var(--accent-primary);
3041
+ color: white;
3042
+ cursor: pointer;
3043
+ box-shadow: 0 4px 12px var(--alpha-primary40);
3044
+ transition: var(--transition-smooth);
3045
+ }
3046
+
3047
+ .button:hover:not(:disabled) {
3048
+ background: var(--accent-primary-hover);
3049
+ transform: scale(1.05);
3050
+ box-shadow: 0 6px 16px var(--alpha-primary50);
3051
+ }
3052
+
3053
+ .button:active:not(:disabled) {
3054
+ background: var(--accent-primary-pressed);
3055
+ transform: scale(0.98);
3056
+ }
3057
+
3058
+ .button:focus-visible {
3059
+ outline: 2px solid var(--accent-primary);
3060
+ outline-offset: 3px;
3061
+ }
3062
+
3063
+ .button:disabled {
3064
+ opacity: var(--opacity-disabled);
3065
+ cursor: not-allowed;
3066
+ box-shadow: none;
3067
+ }
3068
+ `
3069
+ ];
3070
+ rt([
3071
+ n({ type: String })
3072
+ ], O.prototype, "position", 2);
3073
+ rt([
3074
+ n({ type: String })
3075
+ ], O.prototype, "size", 2);
3076
+ rt([
3077
+ n({ type: Boolean })
3078
+ ], O.prototype, "disabled", 2);
3079
+ rt([
3080
+ n({ type: Object })
3081
+ ], O.prototype, "sx", 2);
3082
+ O = rt([
3083
+ p("tc-floating-button")
3084
+ ], O);
3085
+ var xe = Object.defineProperty, ke = Object.getOwnPropertyDescriptor, E = (r, e, s, i) => {
3086
+ for (var t = i > 1 ? void 0 : i ? ke(e, s) : e, a = r.length - 1, o; a >= 0; a--)
3087
+ (o = r[a]) && (t = (i ? o(e, s, t) : o(t)) || t);
3088
+ return i && t && xe(e, s, t), t;
3089
+ };
3090
+ let g = class extends d {
3091
+ constructor() {
3092
+ super(...arguments), this.src = "", this.title = "", this.closeOnEscape = !0, this.closeOnOverlay = !0, this.useHistory = !0, this.isLoading = !0, this.animation = new j(this, {
3093
+ showDuration: 300,
3094
+ hideDuration: 200
3095
+ }), this.history = new Ct(this), this.messageBus = new Ot(this), this.handleKeyDown = (r) => {
3096
+ r.key === "Escape" && this.animation.state === "visible" && this.close();
3097
+ };
3098
+ }
3099
+ connectedCallback() {
3100
+ super.connectedCallback(), this.updateDataState(), this.closeOnEscape && document.addEventListener("keydown", this.handleKeyDown), this.messageBus.onMessage("*", (r, e) => {
3101
+ this.dispatchEvent(
3102
+ new CustomEvent("tc-message", {
3103
+ bubbles: !0,
3104
+ composed: !0,
3105
+ detail: { type: r, payload: e }
3106
+ })
3107
+ );
3108
+ }), this.useHistory && this.history.onPopState(() => {
3109
+ this.animation.state === "visible" && this.close();
3110
+ });
3111
+ }
3112
+ disconnectedCallback() {
3113
+ super.disconnectedCallback(), document.removeEventListener("keydown", this.handleKeyDown);
3114
+ }
3115
+ updateDataState() {
3116
+ this.dataset.state = this.animation.state;
3117
+ }
3118
+ async open() {
3119
+ this.useHistory && this.history.push({ modal: "iframe" }), this.isLoading = !0, await this.animation.show(), this.updateDataState();
3120
+ }
3121
+ async close() {
3122
+ this.useHistory && this.history.pop(), await this.animation.hide(), this.updateDataState(), this.dispatchEvent(
3123
+ new CustomEvent("tc-close", {
3124
+ bubbles: !0,
3125
+ composed: !0
3126
+ })
3127
+ );
3128
+ }
3129
+ handleOverlayClick(r) {
3130
+ this.closeOnOverlay && r.target === r.currentTarget && this.close();
3131
+ }
3132
+ handleIframeLoad() {
3133
+ this.isLoading = !1, this.dispatchEvent(
3134
+ new CustomEvent("tc-load", {
3135
+ bubbles: !0,
3136
+ composed: !0
3137
+ })
3138
+ );
3139
+ }
3140
+ sendMessage(r, e) {
3141
+ const s = this.shadowRoot?.querySelector("iframe");
3142
+ s?.contentWindow && this.messageBus.send(r, e, s.contentWindow);
3143
+ }
3144
+ render() {
3145
+ return l`
3146
+ <div part="overlay" class="overlay" @click=${this.handleOverlayClick}>
3147
+ <div part="modal" class="modal" role="dialog" aria-modal="true" aria-labelledby="modal-title">
3148
+ ${this.title ? l`
3149
+ <div part="header" class="header">
3150
+ <h2 id="modal-title" class="title">${this.title}</h2>
3151
+ <button
3152
+ part="close"
3153
+ class="close"
3154
+ @click=${this.close}
3155
+ aria-label="Close modal"
3156
+ >
3157
+ <svg
3158
+ viewBox="0 0 24 24"
3159
+ fill="none"
3160
+ stroke="currentColor"
3161
+ stroke-width="2"
3162
+ stroke-linecap="round"
3163
+ stroke-linejoin="round"
3164
+ >
3165
+ <line x1="18" y1="6" x2="6" y2="18"></line>
3166
+ <line x1="6" y1="6" x2="18" y2="18"></line>
3167
+ </svg>
3168
+ </button>
3169
+ </div>
3170
+ ` : ""}
3171
+ <div part="content" class="content">
3172
+ <iframe
3173
+ part="iframe"
3174
+ class="iframe"
3175
+ src=${this.src}
3176
+ @load=${this.handleIframeLoad}
3177
+ title=${this.title || "Modal content"}
3178
+ ></iframe>
3179
+ <div part="loader" class="loader ${this.isLoading ? "" : "hidden"}">
3180
+ <tc-spinner size="2rem"></tc-spinner>
3181
+ </div>
3182
+ </div>
3183
+ </div>
3184
+ </div>
3185
+ `;
3186
+ }
3187
+ };
3188
+ g.styles = [
3189
+ u,
3190
+ c`
3191
+ :host {
3192
+ display: contents;
3193
+ }
3194
+
3195
+ .overlay {
3196
+ position: fixed;
3197
+ inset: 0;
3198
+ z-index: 1000;
3199
+ display: flex;
3200
+ align-items: center;
3201
+ justify-content: center;
3202
+ padding: var(--space-lg);
3203
+ background: var(--overlay-dim);
3204
+ opacity: 0;
3205
+ visibility: hidden;
3206
+ transition: opacity var(--transition-smooth), visibility var(--transition-smooth);
3207
+ }
3208
+
3209
+ :host([data-state='showing']) .overlay,
3210
+ :host([data-state='visible']) .overlay {
3211
+ opacity: 1;
3212
+ visibility: visible;
3213
+ }
3214
+
3215
+ :host([data-state='hiding']) .overlay {
3216
+ opacity: 0;
3217
+ }
3218
+
3219
+ :host([data-state='hidden']) .overlay {
3220
+ visibility: hidden;
3221
+ }
3222
+
3223
+ .modal {
3224
+ display: flex;
3225
+ flex-direction: column;
3226
+ width: 100%;
3227
+ max-width: 600px;
3228
+ max-height: 90vh;
3229
+ max-height: 90dvh;
3230
+ background: var(--paper-white);
3231
+ border-radius: var(--radius-lg);
3232
+ box-shadow: 0 20px 60px var(--overlay-shadow-strong);
3233
+ overflow: hidden;
3234
+ transform: scale(0.95) translateY(20px);
3235
+ transition: transform var(--transition-smooth);
3236
+ }
3237
+
3238
+ :host([data-state='showing']) .modal,
3239
+ :host([data-state='visible']) .modal {
3240
+ transform: scale(1) translateY(0);
3241
+ }
3242
+
3243
+ :host([data-state='hiding']) .modal {
3244
+ transform: scale(0.95) translateY(20px);
3245
+ }
3246
+
3247
+ .header {
3248
+ display: flex;
3249
+ align-items: center;
3250
+ justify-content: space-between;
3251
+ padding: var(--space-md) var(--space-lg);
3252
+ border-bottom: 1px solid var(--paper-warm);
3253
+ }
3254
+
3255
+ .title {
3256
+ font-family: var(--font-body);
3257
+ font-size: var(--font-size-lg);
3258
+ font-weight: 600;
3259
+ color: var(--ink-dark);
3260
+ margin: 0;
3261
+ }
3262
+
3263
+ .close {
3264
+ display: flex;
3265
+ align-items: center;
3266
+ justify-content: center;
3267
+ width: var(--size-close-button);
3268
+ height: var(--size-close-button);
3269
+ padding: 0;
3270
+ border: none;
3271
+ background: transparent;
3272
+ color: var(--ink-medium);
3273
+ cursor: pointer;
3274
+ border-radius: var(--radius-sm);
3275
+ transition: var(--transition-fast);
3276
+ }
3277
+
3278
+ .close:hover {
3279
+ background: var(--paper-warm);
3280
+ color: var(--ink-dark);
3281
+ }
3282
+
3283
+ .close svg {
3284
+ width: 1.25rem;
3285
+ height: 1.25rem;
3286
+ }
3287
+
3288
+ .content {
3289
+ position: relative;
3290
+ flex: 1;
3291
+ overflow: hidden;
3292
+ }
3293
+
3294
+ .iframe {
3295
+ width: 100%;
3296
+ height: 100%;
3297
+ min-height: 400px;
3298
+ border: none;
3299
+ }
3300
+
3301
+ .loader {
3302
+ position: absolute;
3303
+ inset: 0;
3304
+ display: flex;
3305
+ align-items: center;
3306
+ justify-content: center;
3307
+ background: var(--paper-white);
3308
+ opacity: 1;
3309
+ transition: opacity var(--transition-smooth);
3310
+ }
3311
+
3312
+ .loader.hidden {
3313
+ opacity: 0;
3314
+ pointer-events: none;
3315
+ }
3316
+ `
3317
+ ];
3318
+ E([
3319
+ n({ type: String })
3320
+ ], g.prototype, "src", 2);
3321
+ E([
3322
+ n({ type: String })
3323
+ ], g.prototype, "title", 2);
3324
+ E([
3325
+ n({ type: Boolean, attribute: "close-on-escape" })
3326
+ ], g.prototype, "closeOnEscape", 2);
3327
+ E([
3328
+ n({ type: Boolean, attribute: "close-on-overlay" })
3329
+ ], g.prototype, "closeOnOverlay", 2);
3330
+ E([
3331
+ n({ type: Boolean, attribute: "use-history" })
3332
+ ], g.prototype, "useHistory", 2);
3333
+ E([
3334
+ S()
3335
+ ], g.prototype, "isLoading", 2);
3336
+ g = E([
3337
+ p("tc-iframe-modal")
3338
+ ], g);
3339
+ var $e = Object.defineProperty, _e = Object.getOwnPropertyDescriptor, L = (r, e, s, i) => {
3340
+ for (var t = i > 1 ? void 0 : i ? _e(e, s) : e, a = r.length - 1, o; a >= 0; a--)
3341
+ (o = r[a]) && (t = (i ? o(e, s, t) : o(t)) || t);
3342
+ return i && t && $e(e, s, t), t;
3343
+ };
3344
+ let f = class extends d {
3345
+ constructor() {
3346
+ super(...arguments), this.title = "Install App", this.description = "Add to your home screen for quick access", this.installLabel = "Install", this.storageKey = "tc-install-banner-dismissed", this.dismissDays = 7, this.isDismissed = !1, this.animation = new j(this, {
3347
+ showDuration: 400,
3348
+ hideDuration: 300
3349
+ }), this.storage = new bt(
3350
+ this,
3351
+ this.storageKey
3352
+ );
3353
+ }
3354
+ connectedCallback() {
3355
+ super.connectedCallback(), this.updateDataState(), this.checkDismissState();
3356
+ }
3357
+ checkDismissState() {
3358
+ const r = this.storage.value;
3359
+ r?.dismissedAt && ((Date.now() - r.dismissedAt) / 864e5 < this.dismissDays ? this.isDismissed = !0 : this.storage.remove());
3360
+ }
3361
+ updateDataState() {
3362
+ this.dataset.state = this.animation.state;
3363
+ }
3364
+ async show() {
3365
+ this.isDismissed || (await this.animation.show(), this.updateDataState());
3366
+ }
3367
+ async dismiss() {
3368
+ this.storage.set({ dismissedAt: Date.now() }), await this.animation.hide(), this.updateDataState(), this.dispatchEvent(
3369
+ new CustomEvent("tc-dismiss", {
3370
+ bubbles: !0,
3371
+ composed: !0
3372
+ })
3373
+ );
3374
+ }
3375
+ handleInstall() {
3376
+ this.dispatchEvent(
3377
+ new CustomEvent("tc-install", {
3378
+ bubbles: !0,
3379
+ composed: !0
3380
+ })
3381
+ );
3382
+ }
3383
+ handleClose() {
3384
+ this.dismiss();
3385
+ }
3386
+ render() {
3387
+ return l`
3388
+ <div part="banner" class="banner" role="banner">
3389
+ <div part="icon" class="icon">
3390
+ <tc-icon name="download" size="1.5rem"></tc-icon>
3391
+ </div>
3392
+ <div part="content" class="content">
3393
+ <tc-text part="title" class="title" size="base" weight="600">
3394
+ ${this.title}
3395
+ </tc-text>
3396
+ <tc-text part="description" class="description" size="sm" color="tertiary">
3397
+ ${this.description}
3398
+ </tc-text>
3399
+ </div>
3400
+ <div part="actions" class="actions">
3401
+ <tc-button
3402
+ part="install"
3403
+ variant="primary"
3404
+ size="small"
3405
+ @tc-click=${this.handleInstall}
3406
+ >
3407
+ ${this.installLabel}
3408
+ </tc-button>
3409
+ <button part="close" class="close" @click=${this.handleClose} aria-label="Dismiss">
3410
+ <svg
3411
+ viewBox="0 0 24 24"
3412
+ fill="none"
3413
+ stroke="currentColor"
3414
+ stroke-width="2"
3415
+ stroke-linecap="round"
3416
+ stroke-linejoin="round"
3417
+ >
3418
+ <line x1="18" y1="6" x2="6" y2="18"></line>
3419
+ <line x1="6" y1="6" x2="18" y2="18"></line>
3420
+ </svg>
3421
+ </button>
3422
+ </div>
3423
+ </div>
3424
+ `;
3425
+ }
3426
+ };
3427
+ f.styles = [
3428
+ u,
3429
+ c`
3430
+ :host {
3431
+ display: block;
3432
+ position: fixed;
3433
+ bottom: 0;
3434
+ left: 0;
3435
+ right: 0;
3436
+ z-index: 100;
3437
+ padding: var(--space-md);
3438
+ pointer-events: none;
3439
+ }
3440
+
3441
+ .banner {
3442
+ display: flex;
3443
+ align-items: center;
3444
+ gap: var(--space-md);
3445
+ padding: var(--space-md) var(--space-lg);
3446
+ background: var(--paper-white);
3447
+ border-radius: var(--radius-lg);
3448
+ box-shadow: 0 -4px 20px var(--overlay-shadow-light);
3449
+ pointer-events: auto;
3450
+ opacity: 0;
3451
+ transform: translateY(100%);
3452
+ transition: opacity var(--transition-smooth), transform var(--transition-smooth);
3453
+ }
3454
+
3455
+ :host([data-state='showing']) .banner,
3456
+ :host([data-state='visible']) .banner {
3457
+ opacity: 1;
3458
+ transform: translateY(0);
3459
+ }
3460
+
3461
+ :host([data-state='hiding']) .banner {
3462
+ opacity: 0;
3463
+ transform: translateY(100%);
3464
+ }
3465
+
3466
+ :host([data-state='hidden']) {
3467
+ display: none;
3468
+ }
3469
+
3470
+ .icon {
3471
+ flex-shrink: 0;
3472
+ display: flex;
3473
+ align-items: center;
3474
+ justify-content: center;
3475
+ width: 3rem;
3476
+ height: 3rem;
3477
+ background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-hover));
3478
+ border-radius: var(--radius-md);
3479
+ color: white;
3480
+ }
3481
+
3482
+ .content {
3483
+ flex: 1;
3484
+ min-width: 0;
3485
+ }
3486
+
3487
+ .title {
3488
+ font-weight: 600;
3489
+ color: var(--ink-dark);
3490
+ }
3491
+
3492
+ .description {
3493
+ color: var(--ink-medium);
3494
+ margin-top: 2px;
3495
+ }
3496
+
3497
+ .actions {
3498
+ display: flex;
3499
+ align-items: center;
3500
+ gap: var(--space-sm);
3501
+ }
3502
+
3503
+ .close {
3504
+ display: flex;
3505
+ align-items: center;
3506
+ justify-content: center;
3507
+ width: var(--size-close-button);
3508
+ height: var(--size-close-button);
3509
+ padding: 0;
3510
+ border: none;
3511
+ background: transparent;
3512
+ color: var(--ink-light);
3513
+ cursor: pointer;
3514
+ border-radius: var(--radius-sm);
3515
+ transition: var(--transition-fast);
3516
+ }
3517
+
3518
+ .close:hover {
3519
+ background: var(--paper-warm);
3520
+ color: var(--ink-medium);
3521
+ }
3522
+
3523
+ .close svg {
3524
+ width: 1.25rem;
3525
+ height: 1.25rem;
3526
+ }
3527
+
3528
+ @media (max-width: 480px) {
3529
+ .banner {
3530
+ flex-wrap: wrap;
3531
+ }
3532
+
3533
+ .content {
3534
+ flex-basis: calc(100% - 4rem);
3535
+ }
3536
+
3537
+ .actions {
3538
+ flex-basis: 100%;
3539
+ justify-content: flex-end;
3540
+ }
3541
+ }
3542
+ `
3543
+ ];
3544
+ L([
3545
+ n({ type: String })
3546
+ ], f.prototype, "title", 2);
3547
+ L([
3548
+ n({ type: String })
3549
+ ], f.prototype, "description", 2);
3550
+ L([
3551
+ n({ type: String, attribute: "install-label" })
3552
+ ], f.prototype, "installLabel", 2);
3553
+ L([
3554
+ n({ type: String, attribute: "storage-key" })
3555
+ ], f.prototype, "storageKey", 2);
3556
+ L([
3557
+ n({ type: Number, attribute: "dismiss-days" })
3558
+ ], f.prototype, "dismissDays", 2);
3559
+ L([
3560
+ S()
3561
+ ], f.prototype, "isDismissed", 2);
3562
+ f = L([
3563
+ p("tc-installation-banner")
3564
+ ], f);
3565
+ var Ce = Object.defineProperty, ze = Object.getOwnPropertyDescriptor, ft = (r, e, s, i) => {
3566
+ for (var t = i > 1 ? void 0 : i ? ze(e, s) : e, a = r.length - 1, o; a >= 0; a--)
3567
+ (o = r[a]) && (t = (i ? o(e, s, t) : o(t)) || t);
3568
+ return i && t && Ce(e, s, t), t;
3569
+ };
3570
+ let J = class extends d {
3571
+ constructor() {
3572
+ super(...arguments), this.title = "Install on iOS", this.steps = [
3573
+ "Tap the Share button in Safari",
3574
+ 'Scroll down and tap "Add to Home Screen"',
3575
+ 'Tap "Add" in the top right corner'
3576
+ ], this.animation = new j(this, {
3577
+ showDuration: 300,
3578
+ hideDuration: 200
3579
+ });
3580
+ }
3581
+ connectedCallback() {
3582
+ super.connectedCallback(), this.updateDataState();
3583
+ }
3584
+ updateDataState() {
3585
+ this.dataset.state = this.animation.state;
3586
+ }
3587
+ async show() {
3588
+ await this.animation.show(), this.updateDataState();
3589
+ }
3590
+ async close() {
3591
+ await this.animation.hide(), this.updateDataState(), this.dispatchEvent(
3592
+ new CustomEvent("tc-close", {
3593
+ bubbles: !0,
3594
+ composed: !0
3595
+ })
3596
+ );
3597
+ }
3598
+ handleOverlayClick(r) {
3599
+ r.target === r.currentTarget && this.close();
3600
+ }
3601
+ renderStep(r, e) {
3602
+ const s = r.split("[share]"), i = s.length > 1 ? l`${s[0]}<svg class="share-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
3603
+ <path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"></path>
3604
+ <polyline points="16 6 12 2 8 6"></polyline>
3605
+ <line x1="12" y1="2" x2="12" y2="15"></line>
3606
+ </svg>${s[1]}` : r;
3607
+ return l`
3608
+ <div part="step" class="step">
3609
+ <span part="step-number" class="step-number">${e + 1}</span>
3610
+ <tc-text part="step-text" class="step-text" size="base">${i}</tc-text>
3611
+ </div>
3612
+ `;
3613
+ }
3614
+ render() {
3615
+ return l`
3616
+ <div part="overlay" class="overlay" @click=${this.handleOverlayClick}>
3617
+ <div part="modal" class="modal" role="dialog" aria-modal="true" aria-labelledby="guide-title">
3618
+ <div part="header" class="header">
3619
+ <h2 id="guide-title" class="title">${this.title}</h2>
3620
+ <button part="close" class="close" @click=${this.close} aria-label="Close">
3621
+ <svg
3622
+ viewBox="0 0 24 24"
3623
+ fill="none"
3624
+ stroke="currentColor"
3625
+ stroke-width="2"
3626
+ stroke-linecap="round"
3627
+ stroke-linejoin="round"
3628
+ >
3629
+ <line x1="18" y1="6" x2="6" y2="18"></line>
3630
+ <line x1="6" y1="6" x2="18" y2="18"></line>
3631
+ </svg>
3632
+ </button>
3633
+ </div>
3634
+ <div part="content" class="content">
3635
+ <div part="steps" class="steps">
3636
+ ${this.steps.map((r, e) => this.renderStep(r, e))}
3637
+ </div>
3638
+ </div>
3639
+ <div part="action" class="action">
3640
+ <tc-button variant="primary" @tc-click=${this.close}>Got it</tc-button>
3641
+ </div>
3642
+ </div>
3643
+ </div>
3644
+ `;
3645
+ }
3646
+ };
3647
+ J.styles = [
3648
+ u,
3649
+ c`
3650
+ :host {
3651
+ display: contents;
3652
+ }
3653
+
3654
+ .overlay {
3655
+ position: fixed;
3656
+ inset: 0;
3657
+ z-index: 1000;
3658
+ display: flex;
3659
+ align-items: flex-end;
3660
+ justify-content: center;
3661
+ background: var(--overlay-dim);
3662
+ opacity: 0;
3663
+ visibility: hidden;
3664
+ transition: opacity var(--transition-smooth), visibility var(--transition-smooth);
3665
+ }
3666
+
3667
+ :host([data-state='showing']) .overlay,
3668
+ :host([data-state='visible']) .overlay {
3669
+ opacity: 1;
3670
+ visibility: visible;
3671
+ }
3672
+
3673
+ :host([data-state='hiding']) .overlay {
3674
+ opacity: 0;
3675
+ }
3676
+
3677
+ :host([data-state='hidden']) .overlay {
3678
+ visibility: hidden;
3679
+ }
3680
+
3681
+ .modal {
3682
+ width: 100%;
3683
+ max-width: 400px;
3684
+ margin: var(--space-md);
3685
+ padding: var(--space-lg);
3686
+ background: var(--paper-white);
3687
+ border-radius: var(--radius-lg) var(--radius-lg) 0 0;
3688
+ transform: translateY(100%);
3689
+ transition: transform var(--transition-smooth);
3690
+ }
3691
+
3692
+ :host([data-state='showing']) .modal,
3693
+ :host([data-state='visible']) .modal {
3694
+ transform: translateY(0);
3695
+ }
3696
+
3697
+ :host([data-state='hiding']) .modal {
3698
+ transform: translateY(100%);
3699
+ }
3700
+
3701
+ .header {
3702
+ display: flex;
3703
+ align-items: center;
3704
+ justify-content: space-between;
3705
+ margin-bottom: var(--space-lg);
3706
+ }
3707
+
3708
+ .title {
3709
+ font-family: var(--font-body);
3710
+ font-size: var(--font-size-lg);
3711
+ font-weight: 600;
3712
+ color: var(--ink-dark);
3713
+ margin: 0;
3714
+ }
3715
+
3716
+ .close {
3717
+ display: flex;
3718
+ align-items: center;
3719
+ justify-content: center;
3720
+ width: var(--size-close-button);
3721
+ height: var(--size-close-button);
3722
+ padding: 0;
3723
+ border: none;
3724
+ background: transparent;
3725
+ color: var(--ink-medium);
3726
+ cursor: pointer;
3727
+ border-radius: var(--radius-sm);
3728
+ transition: var(--transition-fast);
3729
+ }
3730
+
3731
+ .close:hover {
3732
+ background: var(--paper-warm);
3733
+ color: var(--ink-dark);
3734
+ }
3735
+
3736
+ .close svg {
3737
+ width: 1.25rem;
3738
+ height: 1.25rem;
3739
+ }
3740
+
3741
+ .steps {
3742
+ display: flex;
3743
+ flex-direction: column;
3744
+ gap: var(--space-md);
3745
+ }
3746
+
3747
+ .step {
3748
+ display: flex;
3749
+ align-items: flex-start;
3750
+ gap: var(--space-md);
3751
+ }
3752
+
3753
+ .step-number {
3754
+ flex-shrink: 0;
3755
+ display: flex;
3756
+ align-items: center;
3757
+ justify-content: center;
3758
+ width: 1.75rem;
3759
+ height: 1.75rem;
3760
+ background: var(--accent-primary);
3761
+ color: white;
3762
+ font-family: var(--font-body);
3763
+ font-size: var(--font-size-sm);
3764
+ font-weight: 600;
3765
+ border-radius: var(--radius-full);
3766
+ }
3767
+
3768
+ .step-text {
3769
+ flex: 1;
3770
+ padding-top: 2px;
3771
+ color: var(--ink-dark);
3772
+ line-height: 1.5;
3773
+ }
3774
+
3775
+ .share-icon {
3776
+ display: inline-flex;
3777
+ vertical-align: middle;
3778
+ width: 1.25rem;
3779
+ height: 1.25rem;
3780
+ margin: 0 2px;
3781
+ color: var(--accent-primary);
3782
+ }
3783
+
3784
+ .action {
3785
+ margin-top: var(--space-xl);
3786
+ }
3787
+ `
3788
+ ];
3789
+ ft([
3790
+ n({ type: String })
3791
+ ], J.prototype, "title", 2);
3792
+ ft([
3793
+ n({ type: Array })
3794
+ ], J.prototype, "steps", 2);
3795
+ J = ft([
3796
+ p("tc-ios-installation-guide")
3797
+ ], J);
3798
+ var De = Object.defineProperty, Oe = Object.getOwnPropertyDescriptor, H = (r, e, s, i) => {
3799
+ for (var t = i > 1 ? void 0 : i ? Oe(e, s) : e, a = r.length - 1, o; a >= 0; a--)
3800
+ (o = r[a]) && (t = (i ? o(e, s, t) : o(t)) || t);
3801
+ return i && t && De(e, s, t), t;
3802
+ };
3803
+ let $ = class extends d {
3804
+ constructor() {
3805
+ super(...arguments), this.title = "Enable Notifications", this.description = "Stay updated with important alerts and messages.", this.allowLabel = "Allow", this.denyLabel = "Not Now", this.storageKey = "tc-notification-modal-state", this.animation = new j(this, {
3806
+ showDuration: 300,
3807
+ hideDuration: 200
3808
+ }), this.storage = new bt(this, this.storageKey);
3809
+ }
3810
+ connectedCallback() {
3811
+ super.connectedCallback(), this.updateDataState();
3812
+ }
3813
+ updateDataState() {
3814
+ this.dataset.state = this.animation.state;
3815
+ }
3816
+ /**
3817
+ * Check if the modal should be shown based on stored state.
3818
+ */
3819
+ shouldShow() {
3820
+ const r = this.storage.value;
3821
+ return !(r?.dismissed || r?.permission === "granted");
3822
+ }
3823
+ async show() {
3824
+ this.shouldShow() && (await this.animation.show(), this.updateDataState());
3825
+ }
3826
+ async close() {
3827
+ await this.animation.hide(), this.updateDataState(), this.dispatchEvent(
3828
+ new CustomEvent("tc-close", {
3829
+ bubbles: !0,
3830
+ composed: !0
3831
+ })
3832
+ );
3833
+ }
3834
+ handleOverlayClick(r) {
3835
+ r.target === r.currentTarget && this.handleDeny();
3836
+ }
3837
+ handleAllow() {
3838
+ this.storage.set({ dismissed: !0, permission: "granted" }), this.close(), this.dispatchEvent(
3839
+ new CustomEvent("tc-allow", {
3840
+ bubbles: !0,
3841
+ composed: !0
3842
+ })
3843
+ );
3844
+ }
3845
+ handleDeny() {
3846
+ this.storage.set({ dismissed: !0, permission: "denied" }), this.close(), this.dispatchEvent(
3847
+ new CustomEvent("tc-deny", {
3848
+ bubbles: !0,
3849
+ composed: !0
3850
+ })
3851
+ );
3852
+ }
3853
+ render() {
3854
+ return l`
3855
+ <div part="overlay" class="overlay" @click=${this.handleOverlayClick}>
3856
+ <div
3857
+ part="modal"
3858
+ class="modal"
3859
+ role="dialog"
3860
+ aria-modal="true"
3861
+ aria-labelledby="notification-title"
3862
+ aria-describedby="notification-description"
3863
+ >
3864
+ <div part="icon" class="icon-container">
3865
+ <tc-icon name="bell" size="2rem"></tc-icon>
3866
+ </div>
3867
+ <tc-section part="content" class="content" gap="var(--space-sm)">
3868
+ <tc-text
3869
+ id="notification-title"
3870
+ part="title"
3871
+ class="title"
3872
+ tag="h2"
3873
+ size="lg"
3874
+ weight="600"
3875
+ >
3876
+ ${this.title}
3877
+ </tc-text>
3878
+ <tc-text
3879
+ id="notification-description"
3880
+ part="description"
3881
+ size="base"
3882
+ color="tertiary"
3883
+ >
3884
+ ${this.description}
3885
+ </tc-text>
3886
+ </tc-section>
3887
+ <div part="actions" class="actions">
3888
+ <tc-button variant="primary" @tc-click=${this.handleAllow}>
3889
+ ${this.allowLabel}
3890
+ </tc-button>
3891
+ <button class="deny-button" @click=${this.handleDeny}>
3892
+ ${this.denyLabel}
3893
+ </button>
3894
+ </div>
3895
+ </div>
3896
+ </div>
3897
+ `;
3898
+ }
3899
+ };
3900
+ $.styles = [
3901
+ u,
3902
+ c`
3903
+ :host {
3904
+ display: contents;
3905
+ }
3906
+
3907
+ .overlay {
3908
+ position: fixed;
3909
+ inset: 0;
3910
+ z-index: 1000;
3911
+ display: flex;
3912
+ align-items: center;
3913
+ justify-content: center;
3914
+ padding: var(--space-lg);
3915
+ background: var(--overlay-dim);
3916
+ opacity: 0;
3917
+ visibility: hidden;
3918
+ transition: opacity var(--transition-smooth), visibility var(--transition-smooth);
3919
+ }
3920
+
3921
+ :host([data-state='showing']) .overlay,
3922
+ :host([data-state='visible']) .overlay {
3923
+ opacity: 1;
3924
+ visibility: visible;
3925
+ }
3926
+
3927
+ :host([data-state='hiding']) .overlay {
3928
+ opacity: 0;
3929
+ }
3930
+
3931
+ :host([data-state='hidden']) .overlay {
3932
+ visibility: hidden;
3933
+ }
3934
+
3935
+ .modal {
3936
+ display: flex;
3937
+ flex-direction: column;
3938
+ align-items: center;
3939
+ width: 100%;
3940
+ max-width: 320px;
3941
+ padding: var(--space-xl);
3942
+ background: var(--paper-white);
3943
+ border-radius: var(--radius-lg);
3944
+ box-shadow: 0 20px 60px var(--overlay-shadow-strong);
3945
+ text-align: center;
3946
+ transform: scale(0.95);
3947
+ transition: transform var(--transition-smooth);
3948
+ }
3949
+
3950
+ :host([data-state='showing']) .modal,
3951
+ :host([data-state='visible']) .modal {
3952
+ transform: scale(1);
3953
+ }
3954
+
3955
+ :host([data-state='hiding']) .modal {
3956
+ transform: scale(0.95);
3957
+ }
3958
+
3959
+ .icon-container {
3960
+ display: flex;
3961
+ align-items: center;
3962
+ justify-content: center;
3963
+ width: 4rem;
3964
+ height: 4rem;
3965
+ margin-bottom: var(--space-lg);
3966
+ background: var(--alpha-primary10);
3967
+ border-radius: var(--radius-full);
3968
+ color: var(--accent-primary);
3969
+ }
3970
+
3971
+ .content {
3972
+ margin-bottom: var(--space-xl);
3973
+ }
3974
+
3975
+ .title {
3976
+ margin-bottom: var(--space-sm);
3977
+ }
3978
+
3979
+ .actions {
3980
+ display: flex;
3981
+ flex-direction: column;
3982
+ gap: var(--space-sm);
3983
+ width: 100%;
3984
+ }
3985
+
3986
+ .deny-button {
3987
+ background: transparent;
3988
+ border: none;
3989
+ padding: var(--space-sm);
3990
+ font-family: var(--font-body);
3991
+ font-size: var(--font-size-sm);
3992
+ color: var(--ink-medium);
3993
+ cursor: pointer;
3994
+ transition: color var(--transition-fast);
3995
+ }
3996
+
3997
+ .deny-button:hover {
3998
+ color: var(--ink-dark);
3999
+ }
4000
+ `
4001
+ ];
4002
+ H([
4003
+ n({ type: String })
4004
+ ], $.prototype, "title", 2);
4005
+ H([
4006
+ n({ type: String })
4007
+ ], $.prototype, "description", 2);
4008
+ H([
4009
+ n({ type: String, attribute: "allow-label" })
4010
+ ], $.prototype, "allowLabel", 2);
4011
+ H([
4012
+ n({ type: String, attribute: "deny-label" })
4013
+ ], $.prototype, "denyLabel", 2);
4014
+ H([
4015
+ n({ type: String, attribute: "storage-key" })
4016
+ ], $.prototype, "storageKey", 2);
4017
+ $ = H([
4018
+ p("tc-notification-modal")
4019
+ ], $);
4020
+ var Se = Object.defineProperty, Pe = Object.getOwnPropertyDescriptor, R = (r, e, s, i) => {
4021
+ for (var t = i > 1 ? void 0 : i ? Pe(e, s) : e, a = r.length - 1, o; a >= 0; a--)
4022
+ (o = r[a]) && (t = (i ? o(e, s, t) : o(t)) || t);
4023
+ return i && t && Se(e, s, t), t;
4024
+ };
4025
+ let _ = class extends d {
4026
+ constructor() {
4027
+ super(...arguments), this.title = "No Connection", this.description = "Please check your internet connection and try again.", this.retryLabel = "Try Again", this.autoDetect = !0, this.isOffline = !1, this.animation = new j(this, {
4028
+ showDuration: 300,
4029
+ hideDuration: 200
4030
+ }), this.handleOnline = () => {
4031
+ this.isOffline = !1, this.hide(), this.dispatchEvent(
4032
+ new CustomEvent("tc-online", {
4033
+ bubbles: !0,
4034
+ composed: !0
4035
+ })
4036
+ );
4037
+ }, this.handleOffline = () => {
4038
+ this.isOffline = !0, this.show(), this.dispatchEvent(
4039
+ new CustomEvent("tc-offline", {
4040
+ bubbles: !0,
4041
+ composed: !0
4042
+ })
4043
+ );
4044
+ };
4045
+ }
4046
+ connectedCallback() {
4047
+ super.connectedCallback(), this.updateDataState(), this.autoDetect && (this.isOffline = !navigator.onLine, this.isOffline && this.show(), window.addEventListener("online", this.handleOnline), window.addEventListener("offline", this.handleOffline));
4048
+ }
4049
+ disconnectedCallback() {
4050
+ super.disconnectedCallback(), window.removeEventListener("online", this.handleOnline), window.removeEventListener("offline", this.handleOffline);
4051
+ }
4052
+ updateDataState() {
4053
+ this.dataset.state = this.animation.state;
4054
+ }
4055
+ async show() {
4056
+ await this.animation.show(), this.updateDataState();
4057
+ }
4058
+ async hide() {
4059
+ await this.animation.hide(), this.updateDataState();
4060
+ }
4061
+ handleRetry() {
4062
+ this.dispatchEvent(
4063
+ new CustomEvent("tc-retry", {
4064
+ bubbles: !0,
4065
+ composed: !0
4066
+ })
4067
+ ), navigator.onLine && this.handleOnline();
4068
+ }
4069
+ render() {
4070
+ return l`
4071
+ <div part="overlay" class="overlay">
4072
+ <div
4073
+ part="modal"
4074
+ class="modal"
4075
+ role="alertdialog"
4076
+ aria-modal="true"
4077
+ aria-labelledby="offline-title"
4078
+ aria-describedby="offline-description"
4079
+ >
4080
+ <div part="icon" class="icon-container">
4081
+ <tc-icon name="wifi-off" size="2rem"></tc-icon>
4082
+ </div>
4083
+ <tc-section part="content" class="content" gap="var(--space-sm)">
4084
+ <tc-text
4085
+ id="offline-title"
4086
+ part="title"
4087
+ class="title"
4088
+ tag="h2"
4089
+ size="lg"
4090
+ weight="600"
4091
+ >
4092
+ ${this.title}
4093
+ </tc-text>
4094
+ <tc-text
4095
+ id="offline-description"
4096
+ part="description"
4097
+ size="base"
4098
+ color="tertiary"
4099
+ >
4100
+ ${this.description}
4101
+ </tc-text>
4102
+ </tc-section>
4103
+ <div part="action" class="action">
4104
+ <tc-button variant="primary" @tc-click=${this.handleRetry}>
4105
+ ${this.retryLabel}
4106
+ </tc-button>
4107
+ </div>
4108
+ </div>
4109
+ </div>
4110
+ `;
4111
+ }
4112
+ };
4113
+ _.styles = [
4114
+ u,
4115
+ c`
4116
+ :host {
4117
+ display: contents;
4118
+ }
4119
+
4120
+ .overlay {
4121
+ position: fixed;
4122
+ inset: 0;
4123
+ z-index: 1001;
4124
+ display: flex;
4125
+ align-items: center;
4126
+ justify-content: center;
4127
+ padding: var(--space-lg);
4128
+ background: var(--overlay-dark);
4129
+ opacity: 0;
4130
+ visibility: hidden;
4131
+ transition: opacity var(--transition-smooth), visibility var(--transition-smooth);
4132
+ }
4133
+
4134
+ :host([data-state='showing']) .overlay,
4135
+ :host([data-state='visible']) .overlay {
4136
+ opacity: 1;
4137
+ visibility: visible;
4138
+ }
4139
+
4140
+ :host([data-state='hiding']) .overlay {
4141
+ opacity: 0;
4142
+ }
4143
+
4144
+ :host([data-state='hidden']) .overlay {
4145
+ visibility: hidden;
4146
+ }
4147
+
4148
+ .modal {
4149
+ display: flex;
4150
+ flex-direction: column;
4151
+ align-items: center;
4152
+ width: 100%;
4153
+ max-width: 320px;
4154
+ padding: var(--space-xl);
4155
+ background: var(--paper-white);
4156
+ border-radius: var(--radius-lg);
4157
+ box-shadow: 0 20px 60px var(--overlay-shadow-heavy);
4158
+ text-align: center;
4159
+ transform: scale(0.95);
4160
+ transition: transform var(--transition-smooth);
4161
+ }
4162
+
4163
+ :host([data-state='showing']) .modal,
4164
+ :host([data-state='visible']) .modal {
4165
+ transform: scale(1);
4166
+ }
4167
+
4168
+ :host([data-state='hiding']) .modal {
4169
+ transform: scale(0.95);
4170
+ }
4171
+
4172
+ .icon-container {
4173
+ display: flex;
4174
+ align-items: center;
4175
+ justify-content: center;
4176
+ width: 4rem;
4177
+ height: 4rem;
4178
+ margin-bottom: var(--space-lg);
4179
+ background: var(--error-bg);
4180
+ border-radius: var(--radius-full);
4181
+ color: var(--error-base);
4182
+ }
4183
+
4184
+ .content {
4185
+ margin-bottom: var(--space-xl);
4186
+ }
4187
+
4188
+ .title {
4189
+ margin-bottom: var(--space-sm);
4190
+ }
4191
+
4192
+ .action {
4193
+ width: 100%;
4194
+ }
4195
+ `
4196
+ ];
4197
+ R([
4198
+ n({ type: String })
4199
+ ], _.prototype, "title", 2);
4200
+ R([
4201
+ n({ type: String })
4202
+ ], _.prototype, "description", 2);
4203
+ R([
4204
+ n({ type: String, attribute: "retry-label" })
4205
+ ], _.prototype, "retryLabel", 2);
4206
+ R([
4207
+ n({ type: Boolean, attribute: "auto-detect" })
4208
+ ], _.prototype, "autoDetect", 2);
4209
+ R([
4210
+ S()
4211
+ ], _.prototype, "isOffline", 2);
4212
+ _ = R([
4213
+ p("tc-offline-modal")
4214
+ ], _);
4215
+ var je = Object.defineProperty, Ee = Object.getOwnPropertyDescriptor, xt = (r, e, s, i) => {
4216
+ for (var t = i > 1 ? void 0 : i ? Ee(e, s) : e, a = r.length - 1, o; a >= 0; a--)
4217
+ (o = r[a]) && (t = (i ? o(e, s, t) : o(t)) || t);
4218
+ return i && t && je(e, s, t), t;
4219
+ };
4220
+ let at = class extends d {
4221
+ constructor() {
4222
+ super(...arguments), this.variant = "primary";
4223
+ }
4224
+ render() {
4225
+ return l`
4226
+ <div part="decoration" class="decoration">
4227
+ <div part="blob" class="blob blob-1"></div>
4228
+ <div part="blob" class="blob blob-2"></div>
4229
+ <div part="blob" class="blob blob-3"></div>
4230
+ </div>
4231
+ `;
4232
+ }
4233
+ };
4234
+ at.styles = [
4235
+ u,
4236
+ c`
4237
+ :host {
4238
+ position: fixed;
4239
+ inset: 0;
4240
+ pointer-events: none;
4241
+ z-index: 0;
4242
+ overflow: hidden;
4243
+ }
4244
+
4245
+ .decoration {
4246
+ position: absolute;
4247
+ inset: 0;
4248
+ }
4249
+
4250
+ .blob {
4251
+ position: absolute;
4252
+ border-radius: 50%;
4253
+ opacity: 0.35;
4254
+ filter: blur(0.0625rem);
4255
+ }
4256
+
4257
+ /* Primary (purple) variant */
4258
+ :host([variant='primary']) .blob {
4259
+ background: radial-gradient(
4260
+ circle,
4261
+ var(--accent-primary) 0%,
4262
+ transparent 70%
4263
+ );
4264
+ }
4265
+
4266
+ /* Success (green) variant */
4267
+ :host([variant='success']) .blob {
4268
+ background: radial-gradient(
4269
+ circle,
4270
+ var(--accent-success) 0%,
4271
+ transparent 70%
4272
+ );
4273
+ }
4274
+
4275
+ /* Error (red) variant */
4276
+ :host([variant='error']) .blob {
4277
+ background: radial-gradient(
4278
+ circle,
4279
+ var(--error-base) 0%,
4280
+ transparent 70%
4281
+ );
4282
+ }
4283
+
4284
+ .blob-1 {
4285
+ width: 18rem;
4286
+ height: 18rem;
4287
+ top: -6rem;
4288
+ left: -5rem;
4289
+ animation: decorFloat 12s ease-in-out infinite;
4290
+ }
4291
+
4292
+ .blob-2 {
4293
+ width: 14rem;
4294
+ height: 14rem;
4295
+ top: 30%;
4296
+ right: -6rem;
4297
+ animation: decorFloat 10s ease-in-out infinite reverse;
4298
+ }
4299
+
4300
+ .blob-3 {
4301
+ width: 20rem;
4302
+ height: 20rem;
4303
+ bottom: -8rem;
4304
+ left: 20%;
4305
+ animation: decorFloat 14s ease-in-out infinite 2s;
4306
+ }
4307
+
4308
+ @keyframes decorFloat {
4309
+ 0%,
4310
+ 100% {
4311
+ transform: translate(0, 0) scale(1);
4312
+ }
4313
+ 33% {
4314
+ transform: translate(0.375rem, -0.5rem) scale(1.08);
4315
+ }
4316
+ 66% {
4317
+ transform: translate(-0.25rem, -0.25rem) scale(1.15);
4318
+ }
4319
+ }
4320
+
4321
+ /* Reduced motion */
4322
+ @media (prefers-reduced-motion: reduce) {
4323
+ .blob {
4324
+ animation: none;
4325
+ }
4326
+ }
4327
+ `
4328
+ ];
4329
+ xt([
4330
+ n({ type: String })
4331
+ ], at.prototype, "variant", 2);
4332
+ at = xt([
4333
+ p("tc-page-decoration")
4334
+ ], at);
4335
+ export {
4336
+ j as AnimationController,
4337
+ P as BaseController,
4338
+ Fe as FormValidationController,
4339
+ Ct as HistoryController,
4340
+ zt as LoadingController,
4341
+ Dt as MatchMediaController,
4342
+ Ot as MessageBusController,
4343
+ bt as StorageController,
4344
+ it as TcBox,
4345
+ C as TcButton,
4346
+ st as TcCallout,
4347
+ N as TcCard,
4348
+ K as TcChip,
4349
+ V as TcContainer,
4350
+ W as TcDivider,
4351
+ D as TcErrorScreen,
4352
+ O as TcFloatingButton,
4353
+ b as TcFormHeader,
4354
+ T as TcIcon,
4355
+ g as TcIframeModal,
4356
+ h as TcInput,
4357
+ f as TcInstallationBanner,
4358
+ J as TcIosInstallationGuide,
4359
+ A as TcItem,
4360
+ y as TcItemButton,
4361
+ Q as TcLoadingScreen,
4362
+ $ as TcNotificationModal,
4363
+ _ as TcOfflineModal,
4364
+ w as TcOtpInput,
4365
+ at as TcPageDecoration,
4366
+ X as TcSection,
4367
+ G as TcSpinner,
4368
+ k as TcSuccessScreen,
4369
+ M as TcSymbol,
4370
+ x as TcText,
4371
+ z as TcToast
4372
+ };