@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,902 @@
1
+ import { CSSResult } from 'lit';
2
+ import { LitElement } from 'lit';
3
+ import { ReactiveController } from 'lit';
4
+ import { ReactiveControllerHost } from 'lit';
5
+ import { TemplateResult } from 'lit';
6
+
7
+ export declare class AnimationController extends BaseController {
8
+ private _state;
9
+ private showDuration;
10
+ private hideDuration;
11
+ constructor(host: ReactiveControllerHost, options?: AnimationControllerOptions | number);
12
+ get state(): AnimationState;
13
+ get isVisible(): boolean;
14
+ get isHidden(): boolean;
15
+ show(): Promise<void>;
16
+ hide(): Promise<void>;
17
+ toggle(): Promise<void>;
18
+ private waitForTransition;
19
+ }
20
+
21
+ /**
22
+ * Controller for managing show/hide animation states.
23
+ * Provides a state machine for coordinating CSS transitions.
24
+ *
25
+ * @example
26
+ * ```ts
27
+ * class MyModal extends LitElement {
28
+ * private animation = new AnimationController(this);
29
+ *
30
+ * async open() {
31
+ * await this.animation.show();
32
+ * }
33
+ *
34
+ * async close() {
35
+ * await this.animation.hide();
36
+ * }
37
+ *
38
+ * render() {
39
+ * return html`
40
+ * <div class="modal modal--${this.animation.state}">
41
+ * <slot></slot>
42
+ * </div>
43
+ * `;
44
+ * }
45
+ * }
46
+ * ```
47
+ */
48
+ export declare interface AnimationControllerOptions {
49
+ showDuration?: number;
50
+ hideDuration?: number;
51
+ }
52
+
53
+ export declare type AnimationState = 'hidden' | 'showing' | 'visible' | 'hiding';
54
+
55
+ /**
56
+ * Base controller class that all reactive controllers extend from.
57
+ * Provides common functionality for registering with a host element.
58
+ */
59
+ export declare abstract class BaseController implements ReactiveController {
60
+ protected host: ReactiveControllerHost;
61
+ constructor(host: ReactiveControllerHost);
62
+ hostConnected?(): void;
63
+ hostDisconnected?(): void;
64
+ hostUpdate?(): void;
65
+ hostUpdated?(): void;
66
+ }
67
+
68
+ /**
69
+ * Controller for form field validation.
70
+ * Manages validation rules and error states.
71
+ *
72
+ * @example
73
+ * ```ts
74
+ * class MyForm extends LitElement {
75
+ * private validation = new FormValidationController(this);
76
+ *
77
+ * private emailRules: ValidationRule[] = [
78
+ * { type: 'required', message: 'Email is required' },
79
+ * { type: 'email', message: 'Please enter a valid email' },
80
+ * ];
81
+ *
82
+ * handleBlur(e: Event) {
83
+ * const input = e.target as HTMLInputElement;
84
+ * this.validation.validate('email', input.value, this.emailRules);
85
+ * }
86
+ *
87
+ * render() {
88
+ * const error = this.validation.getError('email');
89
+ * return html`
90
+ * <input @blur=${this.handleBlur} />
91
+ * ${error ? html`<span class="error">${error}</span>` : ''}
92
+ * `;
93
+ * }
94
+ * }
95
+ * ```
96
+ */
97
+ export declare class FormValidationController extends BaseController {
98
+ private errors;
99
+ get isValid(): boolean;
100
+ getError(field: string): string | undefined;
101
+ getAllErrors(): Map<string, string>;
102
+ validate(field: string, value: string, rules: ValidationRule[]): boolean;
103
+ clearError(field: string): void;
104
+ reset(): void;
105
+ private runRule;
106
+ }
107
+
108
+ /**
109
+ * Controller for managing browser history for modals and overlays.
110
+ * Adds a history entry when opened and handles back button navigation.
111
+ *
112
+ * @example
113
+ * ```ts
114
+ * class MyModal extends LitElement {
115
+ * private history = new HistoryController(this);
116
+ *
117
+ * open() {
118
+ * this.history.push({ modal: 'my-modal' });
119
+ * this.history.onPopState(() => this.close());
120
+ * // show modal
121
+ * }
122
+ *
123
+ * close() {
124
+ * this.history.pop();
125
+ * // hide modal
126
+ * }
127
+ * }
128
+ * ```
129
+ */
130
+ export declare class HistoryController extends BaseController {
131
+ private hasAddedEntry;
132
+ private onPopCallback?;
133
+ push(state?: object): void;
134
+ pop(): void;
135
+ onPopState(callback: () => void): void;
136
+ private handlePopState;
137
+ hostConnected(): void;
138
+ hostDisconnected(): void;
139
+ }
140
+
141
+ export declare type IconName = 'arrow-left' | 'arrow-right' | 'check' | 'x' | 'close' | 'chevron-right' | 'chevron-left' | 'error' | 'alert-circle' | 'info' | 'warning' | 'loading' | 'loader' | 'biometric' | 'email' | 'passkey' | 'bell' | 'download' | 'wifi-off';
142
+
143
+ /**
144
+ * Controller for managing loading states and progress.
145
+ *
146
+ * @example
147
+ * ```ts
148
+ * class MyComponent extends LitElement {
149
+ * private loading = new LoadingController(this);
150
+ *
151
+ * async handleSubmit() {
152
+ * this.loading.start();
153
+ * await doSomething();
154
+ * this.loading.complete();
155
+ * }
156
+ *
157
+ * render() {
158
+ * return html`
159
+ * <button ?disabled=${this.loading.isLoading}>
160
+ * ${this.loading.isLoading ? 'Loading...' : 'Submit'}
161
+ * </button>
162
+ * `;
163
+ * }
164
+ * }
165
+ * ```
166
+ */
167
+ export declare class LoadingController extends BaseController {
168
+ private _isLoading;
169
+ private _progress;
170
+ get isLoading(): boolean;
171
+ get progress(): number;
172
+ start(): void;
173
+ setProgress(value: number): void;
174
+ complete(): void;
175
+ reset(): void;
176
+ }
177
+
178
+ /**
179
+ * Controller for reactive media query matching.
180
+ * Automatically updates the host when the media query matches or unmatches.
181
+ *
182
+ * @example
183
+ * ```ts
184
+ * class MyComponent extends LitElement {
185
+ * private mobile = new MatchMediaController(this, '(max-width: 768px)');
186
+ * private darkMode = new MatchMediaController(this, '(prefers-color-scheme: dark)');
187
+ *
188
+ * render() {
189
+ * return html`
190
+ * <div class=${this.mobile.matches ? 'mobile' : 'desktop'}>
191
+ * ${this.darkMode.matches ? 'Dark mode' : 'Light mode'}
192
+ * </div>
193
+ * `;
194
+ * }
195
+ * }
196
+ * ```
197
+ */
198
+ export declare class MatchMediaController extends BaseController {
199
+ private mediaQuery;
200
+ private _matches;
201
+ constructor(host: ReactiveControllerHost, query: string);
202
+ get matches(): boolean;
203
+ private handleChange;
204
+ hostConnected(): void;
205
+ hostDisconnected(): void;
206
+ }
207
+
208
+ /**
209
+ * Controller for postMessage communication with iframes or other windows.
210
+ *
211
+ * @example
212
+ * ```ts
213
+ * class MyIframeHost extends LitElement {
214
+ * private messageBus = new MessageBusController(this);
215
+ *
216
+ * connectedCallback() {
217
+ * super.connectedCallback();
218
+ * this.messageBus.onMessage('READY', (payload) => {
219
+ * console.log('Iframe is ready', payload);
220
+ * });
221
+ * }
222
+ *
223
+ * sendToIframe() {
224
+ * this.messageBus.send('COMMAND', { action: 'do-something' });
225
+ * }
226
+ * }
227
+ * ```
228
+ */
229
+ export declare class MessageBusController extends BaseController {
230
+ private handlers;
231
+ private wildcardHandlers;
232
+ private targetOrigin;
233
+ /**
234
+ * @param host - The reactive controller host
235
+ * @param targetOrigin - The origin to accept messages from and send messages to.
236
+ * SECURITY NOTE: Using '*' accepts messages from any origin which can be dangerous.
237
+ * Always specify an explicit origin in production environments.
238
+ */
239
+ constructor(host: ReactiveControllerHost, targetOrigin?: string);
240
+ send(type: string, payload: unknown, targetWindow?: Window): void;
241
+ sendToFrame(iframe: HTMLIFrameElement, type: string, payload: unknown): void;
242
+ onMessage(type: string, handler: MessageHandler): () => void;
243
+ onMessage(type: '*', handler: WildcardMessageHandler): () => void;
244
+ private handleMessage;
245
+ hostConnected(): void;
246
+ hostDisconnected(): void;
247
+ }
248
+
249
+ declare type MessageHandler = (payload: unknown) => void;
250
+
251
+ /**
252
+ * Controller for syncing component state with localStorage/sessionStorage.
253
+ * Automatically updates when storage changes in other tabs.
254
+ *
255
+ * @example
256
+ * ```ts
257
+ * class MyBanner extends LitElement {
258
+ * private dismissed = new StorageController<boolean>(this, 'banner-dismissed');
259
+ *
260
+ * handleDismiss() {
261
+ * this.dismissed.set(true);
262
+ * }
263
+ *
264
+ * render() {
265
+ * if (this.dismissed.value) return null;
266
+ * return html`
267
+ * <div class="banner">
268
+ * <button @click=${this.handleDismiss}>Dismiss</button>
269
+ * </div>
270
+ * `;
271
+ * }
272
+ * }
273
+ * ```
274
+ */
275
+ export declare class StorageController<T = unknown> extends BaseController {
276
+ private key;
277
+ private storage;
278
+ private _value;
279
+ constructor(host: ReactiveControllerHost, key: string, storage?: Storage);
280
+ get value(): T | null;
281
+ set(value: T): void;
282
+ remove(): void;
283
+ private load;
284
+ private handleStorageChange;
285
+ hostConnected(): void;
286
+ hostDisconnected(): void;
287
+ }
288
+
289
+ /**
290
+ * A simple container component without default flex layout.
291
+ * Use for wrapping content with custom styles.
292
+ *
293
+ * @slot - Content to display inside the box
294
+ * @csspart box - The container element
295
+ */
296
+ export declare class TcBox extends LitElement {
297
+ sx: Record<string, string | number>;
298
+ static styles: CSSResult;
299
+ render(): TemplateResult<1>;
300
+ }
301
+
302
+ /**
303
+ * Primary button component with loading states.
304
+ * Uses design-tokens component classes (.button, .button-primary, etc.)
305
+ *
306
+ * @fires tc-click - Fired when button is clicked
307
+ * @slot - Button content
308
+ * @csspart button - The button element
309
+ * @csspart spinner - The loading spinner
310
+ */
311
+ export declare class TcButton extends LitElement {
312
+ disabled: boolean;
313
+ loading: boolean;
314
+ variant: 'primary' | 'secondary' | 'success';
315
+ sx: Record<string, string | number>;
316
+ static styles: CSSResult[];
317
+ render(): TemplateResult<1>;
318
+ private handleClick;
319
+ }
320
+
321
+ /**
322
+ * A callout/alert component for messages and notices.
323
+ * Uses design-tokens notice classes (.notice, .notice-info, .notice-success, etc.)
324
+ *
325
+ * @slot - Callout content
326
+ * @csspart callout - The callout container
327
+ */
328
+ export declare class TcCallout extends LitElement {
329
+ variant: 'info' | 'success' | 'warning' | 'error';
330
+ static styles: CSSResult[];
331
+ render(): TemplateResult<1>;
332
+ }
333
+
334
+ /**
335
+ * Card component with layered shadows and optional inner border effect.
336
+ * Uses design-tokens .card class.
337
+ *
338
+ * @slot - Card content
339
+ * @csspart card - The card container
340
+ */
341
+ export declare class TcCard extends LitElement {
342
+ noBorder: boolean;
343
+ sx: Record<string, string | number>;
344
+ static styles: CSSResult[];
345
+ render(): TemplateResult<1>;
346
+ }
347
+
348
+ /**
349
+ * A chip/tag component for labels and badges.
350
+ *
351
+ * @slot - Chip content
352
+ * @csspart chip - The chip container
353
+ */
354
+ export declare class TcChip extends LitElement {
355
+ variant: 'default' | 'success' | 'error' | 'info';
356
+ size: 'sm' | 'md';
357
+ static styles: CSSResult[];
358
+ render(): TemplateResult<1>;
359
+ }
360
+
361
+ /**
362
+ * A flex container component with column layout by default.
363
+ *
364
+ * @slot - Content to display inside the container
365
+ * @csspart container - The container element
366
+ */
367
+ export declare class TcContainer extends LitElement {
368
+ wide: boolean;
369
+ sx: Record<string, string | number>;
370
+ private defaultStyles;
371
+ static styles: CSSResult;
372
+ render(): TemplateResult<1>;
373
+ }
374
+
375
+ /**
376
+ * A horizontal divider line.
377
+ *
378
+ * @csspart divider - The divider element
379
+ */
380
+ export declare class TcDivider extends LitElement {
381
+ color: string;
382
+ spacing: string;
383
+ static styles: CSSResult;
384
+ render(): TemplateResult<1>;
385
+ }
386
+
387
+ /**
388
+ * A full-screen error state with icon, message, and retry action.
389
+ *
390
+ * @fires tc-retry - Fired when the retry button is clicked
391
+ * @csspart screen - The screen container
392
+ * @csspart content - The content wrapper
393
+ * @csspart icon - The error icon
394
+ * @csspart title - The error title
395
+ * @csspart message - The error message
396
+ * @csspart action - The action button container
397
+ */
398
+ export declare class TcErrorScreen extends LitElement {
399
+ title: string;
400
+ message: string;
401
+ retryLabel: string;
402
+ showRetry: boolean;
403
+ static styles: CSSResult;
404
+ private handleRetry;
405
+ render(): TemplateResult<1>;
406
+ }
407
+
408
+ /**
409
+ * A floating action button positioned fixed on the screen.
410
+ *
411
+ * @slot - Button content (icon recommended)
412
+ * @fires tc-click - Fired when the button is clicked
413
+ * @csspart button - The button element
414
+ */
415
+ export declare class TcFloatingButton extends LitElement {
416
+ position: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
417
+ size: string;
418
+ disabled: boolean;
419
+ sx: Record<string, string | number>;
420
+ static styles: CSSResult[];
421
+ connectedCallback(): void;
422
+ updated(changedProperties: Map<string, unknown>): void;
423
+ private handleClick;
424
+ render(): TemplateResult<1>;
425
+ }
426
+
427
+ /**
428
+ * Form header component with animated title, subtitle, and optional notice.
429
+ * Uses design-tokens form classes (.form-title, .form-subtitle).
430
+ *
431
+ * @csspart header - The header container
432
+ * @csspart title - The title element
433
+ * @csspart subtitle - The subtitle element
434
+ * @csspart notice - The notice element
435
+ */
436
+ export declare class TcFormHeader extends LitElement {
437
+ title: string;
438
+ subtitle: string;
439
+ notice: string;
440
+ noAnimation: boolean;
441
+ sx: Record<string, string | number>;
442
+ static styles: CSSResult[];
443
+ render(): TemplateResult<1>;
444
+ }
445
+
446
+ /**
447
+ * An icon component with built-in icon set.
448
+ *
449
+ * @csspart icon - The icon container
450
+ */
451
+ export declare class TcIcon extends LitElement {
452
+ name: IconName;
453
+ size: string;
454
+ color: string;
455
+ static styles: CSSResult;
456
+ render(): TemplateResult<1>;
457
+ }
458
+
459
+ /**
460
+ * A modal that displays an iframe with loading states and message communication.
461
+ *
462
+ * @fires tc-close - Fired when the modal is closed
463
+ * @fires tc-message - Fired when a message is received from the iframe
464
+ * @fires tc-load - Fired when the iframe content is loaded
465
+ * @csspart overlay - The backdrop overlay
466
+ * @csspart modal - The modal container
467
+ * @csspart header - The modal header
468
+ * @csspart close - The close button
469
+ * @csspart content - The content area
470
+ * @csspart iframe - The iframe element
471
+ * @csspart loader - The loading overlay
472
+ */
473
+ export declare class TcIframeModal extends LitElement {
474
+ src: string;
475
+ title: string;
476
+ closeOnEscape: boolean;
477
+ closeOnOverlay: boolean;
478
+ useHistory: boolean;
479
+ private isLoading;
480
+ private animation;
481
+ private history;
482
+ private messageBus;
483
+ static styles: CSSResult[];
484
+ connectedCallback(): void;
485
+ disconnectedCallback(): void;
486
+ private handleKeyDown;
487
+ private updateDataState;
488
+ open(): Promise<void>;
489
+ close(): Promise<void>;
490
+ private handleOverlayClick;
491
+ private handleIframeLoad;
492
+ sendMessage(type: string, payload?: unknown): void;
493
+ render(): TemplateResult<1>;
494
+ }
495
+
496
+ /**
497
+ * Form input component with label and error states.
498
+ * Uses design-tokens classes (.input, .label, .field-group).
499
+ *
500
+ * @fires tc-input - Fired when input value changes
501
+ * @fires tc-blur - Fired when input loses focus
502
+ * @csspart wrapper - The input wrapper element
503
+ * @csspart input - The input element
504
+ * @csspart label - The label element
505
+ * @csspart ink-line - The animated ink line
506
+ * @csspart error - The error message element
507
+ */
508
+ export declare class TcInput extends LitElement {
509
+ label: string;
510
+ type: string;
511
+ placeholder: string;
512
+ value: string;
513
+ error: string;
514
+ disabled: boolean;
515
+ required: boolean;
516
+ name: string;
517
+ autocomplete: string;
518
+ inputmode: string;
519
+ maxlength: number;
520
+ sx: Record<string, string | number>;
521
+ private inputId;
522
+ private isFocused;
523
+ static styles: CSSResult[];
524
+ render(): TemplateResult<1>;
525
+ private handleInput;
526
+ private handleFocus;
527
+ private handleBlur;
528
+ focus(): void;
529
+ }
530
+
531
+ /**
532
+ * A banner prompting users to install the PWA.
533
+ * Remembers dismissal state via localStorage.
534
+ *
535
+ * @fires tc-install - Fired when the install button is clicked
536
+ * @fires tc-dismiss - Fired when the banner is dismissed
537
+ * @csspart banner - The banner container
538
+ * @csspart content - The content area
539
+ * @csspart icon - The app icon
540
+ * @csspart text - The text container
541
+ * @csspart title - The banner title
542
+ * @csspart description - The banner description
543
+ * @csspart actions - The actions container
544
+ * @csspart install - The install button
545
+ * @csspart close - The close button
546
+ */
547
+ export declare class TcInstallationBanner extends LitElement {
548
+ title: string;
549
+ description: string;
550
+ installLabel: string;
551
+ storageKey: string;
552
+ dismissDays: number;
553
+ private isDismissed;
554
+ private animation;
555
+ private storage;
556
+ static styles: CSSResult[];
557
+ connectedCallback(): void;
558
+ private checkDismissState;
559
+ private updateDataState;
560
+ show(): Promise<void>;
561
+ dismiss(): Promise<void>;
562
+ private handleInstall;
563
+ private handleClose;
564
+ render(): TemplateResult<1>;
565
+ }
566
+
567
+ /**
568
+ * A guide modal for iOS PWA installation steps.
569
+ *
570
+ * @fires tc-close - Fired when the guide is closed
571
+ * @csspart overlay - The backdrop overlay
572
+ * @csspart modal - The modal container
573
+ * @csspart header - The modal header
574
+ * @csspart close - The close button
575
+ * @csspart content - The content area
576
+ * @csspart steps - The steps container
577
+ * @csspart step - Individual step
578
+ * @csspart step-number - Step number indicator
579
+ * @csspart step-text - Step text
580
+ */
581
+ export declare class TcIosInstallationGuide extends LitElement {
582
+ title: string;
583
+ steps: string[];
584
+ private animation;
585
+ static styles: CSSResult[];
586
+ connectedCallback(): void;
587
+ private updateDataState;
588
+ show(): Promise<void>;
589
+ close(): Promise<void>;
590
+ private handleOverlayClick;
591
+ private renderStep;
592
+ render(): TemplateResult<1>;
593
+ }
594
+
595
+ /**
596
+ * A non-clickable item container for displaying content.
597
+ *
598
+ * @slot - Item content
599
+ * @slot prefix - Left side content (icon, symbol)
600
+ * @slot suffix - Right side content (badge, action)
601
+ * @csspart item - The item container
602
+ * @csspart prefix - The prefix container
603
+ * @csspart content - The main content container
604
+ * @csspart suffix - The suffix container
605
+ */
606
+ export declare class TcItem extends LitElement {
607
+ gap: string;
608
+ padding: string;
609
+ sx: Record<string, string | number>;
610
+ static styles: CSSResult;
611
+ render(): TemplateResult<1>;
612
+ }
613
+
614
+ /**
615
+ * A clickable item button with hover states and optional arrow indicator.
616
+ *
617
+ * @slot - Item content
618
+ * @slot prefix - Left side content (icon, symbol)
619
+ * @slot suffix - Right side content (replaces arrow if provided)
620
+ * @fires tc-click - Fired when the item is clicked
621
+ * @csspart button - The button element
622
+ * @csspart prefix - The prefix container
623
+ * @csspart content - The main content container
624
+ * @csspart suffix - The suffix container
625
+ * @csspart arrow - The arrow indicator
626
+ */
627
+ export declare class TcItemButton extends LitElement {
628
+ gap: string;
629
+ padding: string;
630
+ disabled: boolean;
631
+ showArrow: boolean;
632
+ sx: Record<string, string | number>;
633
+ static styles: CSSResult;
634
+ private handleClick;
635
+ render(): TemplateResult<1>;
636
+ }
637
+
638
+ /**
639
+ * A full-screen loading state with spinner and optional message.
640
+ *
641
+ * @csspart screen - The screen container
642
+ * @csspart content - The content wrapper
643
+ * @csspart spinner - The spinner element
644
+ * @csspart message - The message text
645
+ */
646
+ export declare class TcLoadingScreen extends LitElement {
647
+ message: string;
648
+ spinnerSize: string;
649
+ private loading;
650
+ static styles: CSSResult;
651
+ connectedCallback(): void;
652
+ render(): TemplateResult<1>;
653
+ }
654
+
655
+ /**
656
+ * A modal for requesting notification permission with storage-based dismissal tracking.
657
+ *
658
+ * @fires tc-allow - Fired when the user clicks allow
659
+ * @fires tc-deny - Fired when the user clicks deny
660
+ * @fires tc-close - Fired when the modal is closed
661
+ * @csspart overlay - The backdrop overlay
662
+ * @csspart modal - The modal container
663
+ * @csspart icon - The notification icon
664
+ * @csspart title - The modal title
665
+ * @csspart description - The modal description
666
+ * @csspart actions - The action buttons container
667
+ */
668
+ export declare class TcNotificationModal extends LitElement {
669
+ title: string;
670
+ description: string;
671
+ allowLabel: string;
672
+ denyLabel: string;
673
+ storageKey: string;
674
+ private animation;
675
+ private storage;
676
+ static styles: CSSResult[];
677
+ connectedCallback(): void;
678
+ private updateDataState;
679
+ /**
680
+ * Check if the modal should be shown based on stored state.
681
+ */
682
+ shouldShow(): boolean;
683
+ show(): Promise<void>;
684
+ close(): Promise<void>;
685
+ private handleOverlayClick;
686
+ private handleAllow;
687
+ private handleDeny;
688
+ render(): TemplateResult<1>;
689
+ }
690
+
691
+ /**
692
+ * A modal displayed when the device goes offline.
693
+ * Automatically shows/hides based on network status.
694
+ *
695
+ * @fires tc-retry - Fired when the retry button is clicked
696
+ * @fires tc-online - Fired when the device comes back online
697
+ * @fires tc-offline - Fired when the device goes offline
698
+ * @csspart overlay - The backdrop overlay
699
+ * @csspart modal - The modal container
700
+ * @csspart icon - The offline icon
701
+ * @csspart title - The modal title
702
+ * @csspart description - The modal description
703
+ * @csspart action - The action button container
704
+ */
705
+ export declare class TcOfflineModal extends LitElement {
706
+ title: string;
707
+ description: string;
708
+ retryLabel: string;
709
+ autoDetect: boolean;
710
+ private isOffline;
711
+ private animation;
712
+ static styles: CSSResult[];
713
+ connectedCallback(): void;
714
+ disconnectedCallback(): void;
715
+ private handleOnline;
716
+ private handleOffline;
717
+ private updateDataState;
718
+ show(): Promise<void>;
719
+ hide(): Promise<void>;
720
+ private handleRetry;
721
+ render(): TemplateResult<1>;
722
+ }
723
+
724
+ /**
725
+ * OTP (One-Time Password) input component with individual cells and progress indicator.
726
+ * Uses shake animation from design-tokens.
727
+ *
728
+ * @fires tc-complete - Fired when all cells are filled
729
+ * @fires tc-change - Fired when the OTP value changes
730
+ * @csspart cells - The cells container
731
+ * @csspart cell - Individual cell input
732
+ * @csspart progress - The progress bar container
733
+ * @csspart progress-bar - The progress bar fill
734
+ */
735
+ export declare class TcOtpInput extends LitElement {
736
+ length: number;
737
+ error: boolean;
738
+ disabled: boolean;
739
+ showProgress: boolean;
740
+ private values;
741
+ static styles: CSSResult[];
742
+ connectedCallback(): void;
743
+ render(): TemplateResult<1>;
744
+ private handleInput;
745
+ private handleKeydown;
746
+ private handlePaste;
747
+ private focusCell;
748
+ /** Focus the first empty cell or the last cell */
749
+ focus(): void;
750
+ /** Clear all values */
751
+ clear(): void;
752
+ /** Get the current OTP value */
753
+ getValue(): string;
754
+ }
755
+
756
+ /**
757
+ * Decorative floating blob background for pages.
758
+ * Uses CSS custom properties for color variants and inkFloat/inkDrift animations from design-tokens.
759
+ *
760
+ * @csspart decoration - The decoration container
761
+ * @csspart blob - Individual blob element
762
+ */
763
+ export declare class TcPageDecoration extends LitElement {
764
+ variant: 'primary' | 'success' | 'error';
765
+ static styles: CSSResult[];
766
+ render(): TemplateResult<1>;
767
+ }
768
+
769
+ /**
770
+ * A section container with flex column layout.
771
+ *
772
+ * @slot - Section content
773
+ * @csspart section - The section element
774
+ */
775
+ export declare class TcSection extends LitElement {
776
+ gap: string;
777
+ sx: Record<string, string | number>;
778
+ static styles: CSSResult;
779
+ render(): TemplateResult<1>;
780
+ }
781
+
782
+ /**
783
+ * A loading spinner with responsive sizing.
784
+ * Uses spin animation from design-tokens.
785
+ *
786
+ * @csspart spinner - The spinner element
787
+ */
788
+ export declare class TcSpinner extends LitElement {
789
+ private mobile;
790
+ size: 'sm' | 'md' | 'lg' | 'auto';
791
+ color: string;
792
+ static styles: CSSResult[];
793
+ render(): TemplateResult<1>;
794
+ }
795
+
796
+ /**
797
+ * A full-screen success state with animated checkmark and message.
798
+ *
799
+ * @fires tc-action - Fired when the action button is clicked
800
+ * @csspart screen - The screen container
801
+ * @csspart content - The content wrapper
802
+ * @csspart icon - The success icon container
803
+ * @csspart title - The success title
804
+ * @csspart message - The success message
805
+ * @csspart action - The action button container
806
+ */
807
+ export declare class TcSuccessScreen extends LitElement {
808
+ title: string;
809
+ message: string;
810
+ actionLabel: string;
811
+ autoAnimate: boolean;
812
+ private isAnimated;
813
+ private animation;
814
+ static styles: CSSResult;
815
+ connectedCallback(): void;
816
+ playAnimation(): Promise<void>;
817
+ private handleAction;
818
+ render(): TemplateResult<1>;
819
+ }
820
+
821
+ /**
822
+ * A circular symbol/avatar component.
823
+ *
824
+ * @slot - Symbol content (icon or text)
825
+ * @csspart symbol - The symbol container
826
+ */
827
+ export declare class TcSymbol extends LitElement {
828
+ size: string;
829
+ background: string;
830
+ color: string;
831
+ static styles: CSSResult;
832
+ render(): TemplateResult<1>;
833
+ }
834
+
835
+ /**
836
+ * A text component with dynamic tag rendering.
837
+ * Supports semantic HTML tags for accessibility.
838
+ * Uses design-tokens for consistent theming across light/dark modes.
839
+ *
840
+ * @slot - Text content
841
+ * @csspart text - The text element
842
+ */
843
+ export declare class TcText extends LitElement {
844
+ tag: TextTag;
845
+ size?: TextSize;
846
+ weight?: TextWeight;
847
+ color?: TextColor | string;
848
+ sx: Record<string, string | number>;
849
+ static styles: CSSResult[];
850
+ private getColorClass;
851
+ private getColorStyle;
852
+ render(): TemplateResult;
853
+ }
854
+
855
+ /**
856
+ * A toast notification component with auto-dismiss and animation.
857
+ *
858
+ * @slot - Toast message content
859
+ * @fires tc-dismiss - Fired when the toast is dismissed
860
+ * @csspart toast - The toast container
861
+ * @csspart content - The content container
862
+ * @csspart close - The close button
863
+ */
864
+ export declare class TcToast extends LitElement {
865
+ variant: 'info' | 'success' | 'warning' | 'error';
866
+ duration: number;
867
+ autoDismiss: boolean;
868
+ dismissible: boolean;
869
+ private animation;
870
+ private dismissTimer?;
871
+ static styles: CSSResult[];
872
+ connectedCallback(): void;
873
+ disconnectedCallback(): void;
874
+ private updateDataState;
875
+ private clearDismissTimer;
876
+ private startDismissTimer;
877
+ show(): Promise<void>;
878
+ hide(): Promise<void>;
879
+ private handleClose;
880
+ render(): TemplateResult<1>;
881
+ }
882
+
883
+ declare type TextColor = 'primary' | 'secondary' | 'tertiary' | 'muted' | 'accent' | 'success' | 'error' | 'warning' | 'info';
884
+
885
+ declare type TextSize = 'sm' | 'base' | 'lg' | 'xl' | '2xl';
886
+
887
+ declare type TextTag = 'p' | 'span' | 'div' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'label';
888
+
889
+ declare type TextWeight = '400' | '500' | '600' | '700';
890
+
891
+ export declare interface ValidationRule {
892
+ type: ValidationType;
893
+ value?: string | number | RegExp;
894
+ message: string;
895
+ validator?: (value: string) => boolean;
896
+ }
897
+
898
+ export declare type ValidationType = 'required' | 'email' | 'minLength' | 'maxLength' | 'pattern' | 'custom';
899
+
900
+ declare type WildcardMessageHandler = (type: string, payload: unknown) => void;
901
+
902
+ export { }