@transcodes/ui-components 0.3.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +83 -0
- package/README.md +124 -79
- package/dist/controllers/animation.controller.js +32 -0
- package/dist/controllers/base.controller.js +8 -0
- package/dist/controllers/form-validation.controller.js +49 -0
- package/dist/controllers/history.controller.js +26 -0
- package/dist/controllers/index.d.ts +11 -0
- package/dist/controllers/index.js +18 -0
- package/dist/controllers/loading.controller.js +27 -0
- package/dist/controllers/match-media.controller.js +20 -0
- package/dist/controllers/message-bus.controller.js +45 -0
- package/dist/controllers/storage.controller.js +40 -0
- package/dist/index.d.ts +0 -696
- package/dist/index.js +80 -0
- package/dist/primitives/index.d.ts +21 -0
- package/dist/primitives/index.js +42 -0
- package/dist/primitives/tc-box.js +38 -0
- package/dist/primitives/tc-button.js +167 -0
- package/dist/primitives/tc-callout.js +86 -0
- package/dist/primitives/tc-card.js +76 -0
- package/dist/primitives/tc-chip.js +79 -0
- package/dist/primitives/tc-container.js +62 -0
- package/dist/primitives/tc-divider.js +76 -0
- package/dist/primitives/tc-error-message.js +74 -0
- package/dist/primitives/tc-form-header.js +120 -0
- package/dist/primitives/tc-icon.js +95 -0
- package/dist/primitives/tc-input-with-chip.js +242 -0
- package/dist/primitives/tc-input.js +262 -0
- package/dist/primitives/tc-item-button.js +168 -0
- package/dist/primitives/tc-item.js +93 -0
- package/dist/primitives/tc-otp-input.js +230 -0
- package/dist/primitives/tc-section.js +48 -0
- package/dist/primitives/tc-spinner.js +87 -0
- package/dist/primitives/tc-symbol.js +56 -0
- package/dist/primitives/tc-text.js +145 -0
- package/dist/primitives/tc-toast.js +189 -0
- package/dist/screens/index.d.ts +4 -0
- package/dist/screens/index.js +8 -0
- package/dist/screens/tc-error-screen.js +119 -0
- package/dist/screens/tc-loading-screen.js +77 -0
- package/dist/screens/tc-success-screen.js +192 -0
- package/dist/styles/shared.js +7 -0
- package/dist/widgets/index.d.ts +9 -0
- package/dist/widgets/index.js +18 -0
- package/dist/widgets/tc-authenticator-card.js +213 -0
- package/dist/widgets/tc-floating-button.js +132 -0
- package/dist/widgets/tc-iframe-modal.js +263 -0
- package/dist/widgets/tc-installation-banner.js +234 -0
- package/dist/widgets/tc-ios-installation-guide.js +240 -0
- package/dist/widgets/tc-notification-modal.js +230 -0
- package/dist/widgets/tc-offline-modal.js +202 -0
- package/dist/widgets/tc-page-decoration.js +126 -0
- package/package.json +25 -7
- package/dist/ui-components.css +0 -1
- package/dist/ui-components.js +0 -4981
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { CSSResult } from 'lit';
|
|
2
|
-
import { LitElement } from 'lit';
|
|
3
1
|
import { ReactiveController } from 'lit';
|
|
4
2
|
import { ReactiveControllerHost } from 'lit';
|
|
5
|
-
import { TemplateResult } from 'lit';
|
|
6
3
|
|
|
7
4
|
export declare class AnimationController extends BaseController {
|
|
8
5
|
private _state;
|
|
@@ -138,8 +135,6 @@ export declare class HistoryController extends BaseController {
|
|
|
138
135
|
hostDisconnected(): void;
|
|
139
136
|
}
|
|
140
137
|
|
|
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' | 'apple' | 'google' | 'windows' | 'samsung' | 'phone' | 'success' | 'lock' | 'person' | 'device' | 'totp' | 'email-otp' | 'qrcode' | 'key';
|
|
142
|
-
|
|
143
138
|
/**
|
|
144
139
|
* Controller for managing loading states and progress.
|
|
145
140
|
*
|
|
@@ -286,697 +281,6 @@ export declare class StorageController<T = unknown> extends BaseController {
|
|
|
286
281
|
hostDisconnected(): void;
|
|
287
282
|
}
|
|
288
283
|
|
|
289
|
-
/**
|
|
290
|
-
* A card component for displaying authenticator information.
|
|
291
|
-
* Commonly used for passkeys, TOTP, USB security keys, etc.
|
|
292
|
-
*
|
|
293
|
-
* @fires tc-delete - Fired when the delete button is clicked
|
|
294
|
-
* @fires tc-toggle - Fired when the enable/disable toggle is clicked
|
|
295
|
-
* @fires tc-click - Fired when the card is clicked
|
|
296
|
-
* @csspart card - The card container
|
|
297
|
-
* @csspart icon - The authenticator type icon container
|
|
298
|
-
* @csspart content - The main content area
|
|
299
|
-
* @csspart name - The authenticator name
|
|
300
|
-
* @csspart meta - The metadata area (last used, etc.)
|
|
301
|
-
* @csspart actions - The actions area
|
|
302
|
-
* @csspart delete - The delete button
|
|
303
|
-
*/
|
|
304
|
-
export declare class TcAuthenticatorCard extends LitElement {
|
|
305
|
-
name: string;
|
|
306
|
-
type: 'passkey' | 'totp' | 'usb' | 'phone' | 'email';
|
|
307
|
-
lastUsed: string;
|
|
308
|
-
enabled: boolean;
|
|
309
|
-
deletable: boolean;
|
|
310
|
-
clickable: boolean;
|
|
311
|
-
static styles: CSSResult;
|
|
312
|
-
private getIconName;
|
|
313
|
-
private handleCardClick;
|
|
314
|
-
private handleDelete;
|
|
315
|
-
render(): TemplateResult<1>;
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
/**
|
|
319
|
-
* A simple container component without default flex layout.
|
|
320
|
-
* Use for wrapping content with custom styles.
|
|
321
|
-
*
|
|
322
|
-
* @slot - Content to display inside the box
|
|
323
|
-
* @csspart box - The container element
|
|
324
|
-
*/
|
|
325
|
-
export declare class TcBox extends LitElement {
|
|
326
|
-
sx: Record<string, string | number>;
|
|
327
|
-
static styles: CSSResult;
|
|
328
|
-
render(): TemplateResult<1>;
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
/**
|
|
332
|
-
* Primary button component with loading states.
|
|
333
|
-
* Uses design-tokens component classes (.button, .button-primary, etc.)
|
|
334
|
-
*
|
|
335
|
-
* @fires tc-click - Fired when button is clicked
|
|
336
|
-
* @slot - Button content
|
|
337
|
-
* @csspart button - The button element
|
|
338
|
-
* @csspart spinner - The loading spinner
|
|
339
|
-
*/
|
|
340
|
-
export declare class TcButton extends LitElement {
|
|
341
|
-
disabled: boolean;
|
|
342
|
-
loading: boolean;
|
|
343
|
-
variant: 'primary' | 'secondary' | 'success';
|
|
344
|
-
sx: Record<string, string | number>;
|
|
345
|
-
static styles: CSSResult[];
|
|
346
|
-
render(): TemplateResult<1>;
|
|
347
|
-
private handleClick;
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
/**
|
|
351
|
-
* A callout/alert component for messages and notices.
|
|
352
|
-
* Uses design-tokens notice classes (.notice, .notice-info, .notice-success, etc.)
|
|
353
|
-
*
|
|
354
|
-
* @slot - Callout content
|
|
355
|
-
* @slot icon - Optional icon slot
|
|
356
|
-
* @csspart callout - The callout container
|
|
357
|
-
* @csspart icon - The icon container
|
|
358
|
-
* @csspart content - The content container
|
|
359
|
-
*/
|
|
360
|
-
export declare class TcCallout extends LitElement {
|
|
361
|
-
variant: 'info' | 'success' | 'warning' | 'error';
|
|
362
|
-
static styles: CSSResult[];
|
|
363
|
-
render(): TemplateResult<1>;
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
/**
|
|
367
|
-
* Card component with layered shadows and optional inner border effect.
|
|
368
|
-
* Uses design-tokens .card class.
|
|
369
|
-
*
|
|
370
|
-
* @slot - Card content
|
|
371
|
-
* @csspart card - The card container
|
|
372
|
-
*/
|
|
373
|
-
export declare class TcCard extends LitElement {
|
|
374
|
-
noBorder: boolean;
|
|
375
|
-
sx: Record<string, string | number>;
|
|
376
|
-
static styles: CSSResult[];
|
|
377
|
-
render(): TemplateResult<1>;
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
/**
|
|
381
|
-
* A chip/tag component for labels and badges.
|
|
382
|
-
*
|
|
383
|
-
* @slot - Chip content
|
|
384
|
-
* @csspart chip - The chip container
|
|
385
|
-
*/
|
|
386
|
-
export declare class TcChip extends LitElement {
|
|
387
|
-
variant: 'default' | 'success' | 'error' | 'info';
|
|
388
|
-
size: 'sm' | 'md';
|
|
389
|
-
static styles: CSSResult[];
|
|
390
|
-
render(): TemplateResult<1>;
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
/**
|
|
394
|
-
* A flex container component with column layout by default.
|
|
395
|
-
*
|
|
396
|
-
* @slot - Content to display inside the container
|
|
397
|
-
* @csspart container - The container element
|
|
398
|
-
*/
|
|
399
|
-
export declare class TcContainer extends LitElement {
|
|
400
|
-
wide: boolean;
|
|
401
|
-
sx: Record<string, string | number>;
|
|
402
|
-
private defaultStyles;
|
|
403
|
-
static styles: CSSResult;
|
|
404
|
-
render(): TemplateResult<1>;
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
/**
|
|
408
|
-
* A horizontal divider line with optional text.
|
|
409
|
-
*
|
|
410
|
-
* @csspart divider - The divider element (simple mode)
|
|
411
|
-
* @csspart container - The container element (text mode)
|
|
412
|
-
* @csspart line - The line elements (text mode)
|
|
413
|
-
* @csspart text - The text element (text mode)
|
|
414
|
-
*/
|
|
415
|
-
export declare class TcDivider extends LitElement {
|
|
416
|
-
color: string;
|
|
417
|
-
spacing: string;
|
|
418
|
-
text: string;
|
|
419
|
-
static styles: CSSResult;
|
|
420
|
-
render(): TemplateResult<1>;
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
/**
|
|
424
|
-
* A simplified error/warning/info message component.
|
|
425
|
-
* Wraps tc-callout with appropriate icon and text styling.
|
|
426
|
-
*
|
|
427
|
-
* @csspart callout - The underlying callout container
|
|
428
|
-
* @csspart icon - The icon element
|
|
429
|
-
* @csspart message - The message text
|
|
430
|
-
*/
|
|
431
|
-
export declare class TcErrorMessage extends LitElement {
|
|
432
|
-
variant: 'warning' | 'info' | 'error';
|
|
433
|
-
message: string;
|
|
434
|
-
static styles: CSSResult;
|
|
435
|
-
private getIconName;
|
|
436
|
-
private getIconColor;
|
|
437
|
-
render(): TemplateResult<1> | null;
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
/**
|
|
441
|
-
* A full-screen error state with icon, message, and retry action.
|
|
442
|
-
*
|
|
443
|
-
* @fires tc-retry - Fired when the retry button is clicked
|
|
444
|
-
* @csspart screen - The screen container
|
|
445
|
-
* @csspart content - The content wrapper
|
|
446
|
-
* @csspart icon - The error icon
|
|
447
|
-
* @csspart title - The error title
|
|
448
|
-
* @csspart message - The error message
|
|
449
|
-
* @csspart action - The action button container
|
|
450
|
-
*/
|
|
451
|
-
export declare class TcErrorScreen extends LitElement {
|
|
452
|
-
title: string;
|
|
453
|
-
message: string;
|
|
454
|
-
retryLabel: string;
|
|
455
|
-
showRetry: boolean;
|
|
456
|
-
static styles: CSSResult;
|
|
457
|
-
private handleRetry;
|
|
458
|
-
render(): TemplateResult<1>;
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
/**
|
|
462
|
-
* A floating action button positioned fixed on the screen.
|
|
463
|
-
*
|
|
464
|
-
* @slot - Button content (icon recommended)
|
|
465
|
-
* @fires tc-click - Fired when the button is clicked
|
|
466
|
-
* @csspart button - The button element
|
|
467
|
-
*/
|
|
468
|
-
export declare class TcFloatingButton extends LitElement {
|
|
469
|
-
position: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
|
|
470
|
-
size: string;
|
|
471
|
-
disabled: boolean;
|
|
472
|
-
sx: Record<string, string | number>;
|
|
473
|
-
static styles: CSSResult[];
|
|
474
|
-
connectedCallback(): void;
|
|
475
|
-
updated(changedProperties: Map<string, unknown>): void;
|
|
476
|
-
private handleClick;
|
|
477
|
-
render(): TemplateResult<1>;
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
/**
|
|
481
|
-
* Form header component with animated title, subtitle, and optional notice.
|
|
482
|
-
* Uses design-tokens form classes (.form-title, .form-subtitle).
|
|
483
|
-
*
|
|
484
|
-
* @csspart header - The header container
|
|
485
|
-
* @csspart title - The title element
|
|
486
|
-
* @csspart subtitle - The subtitle element
|
|
487
|
-
* @csspart notice - The notice element
|
|
488
|
-
*/
|
|
489
|
-
export declare class TcFormHeader extends LitElement {
|
|
490
|
-
title: string;
|
|
491
|
-
subtitle: string;
|
|
492
|
-
notice: string;
|
|
493
|
-
noAnimation: boolean;
|
|
494
|
-
sx: Record<string, string | number>;
|
|
495
|
-
static styles: CSSResult[];
|
|
496
|
-
render(): TemplateResult<1>;
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
/**
|
|
500
|
-
* An icon component with built-in icon set.
|
|
501
|
-
*
|
|
502
|
-
* @csspart icon - The icon container
|
|
503
|
-
*/
|
|
504
|
-
export declare class TcIcon extends LitElement {
|
|
505
|
-
name: IconName;
|
|
506
|
-
size: string;
|
|
507
|
-
color: string;
|
|
508
|
-
static styles: CSSResult;
|
|
509
|
-
render(): TemplateResult<1>;
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
/**
|
|
513
|
-
* A modal that displays an iframe with loading states and message communication.
|
|
514
|
-
*
|
|
515
|
-
* @fires tc-close - Fired when the modal is closed
|
|
516
|
-
* @fires tc-message - Fired when a message is received from the iframe
|
|
517
|
-
* @fires tc-load - Fired when the iframe content is loaded
|
|
518
|
-
* @csspart overlay - The backdrop overlay
|
|
519
|
-
* @csspart modal - The modal container
|
|
520
|
-
* @csspart header - The modal header
|
|
521
|
-
* @csspart close - The close button
|
|
522
|
-
* @csspart content - The content area
|
|
523
|
-
* @csspart iframe - The iframe element
|
|
524
|
-
* @csspart loader - The loading overlay
|
|
525
|
-
*/
|
|
526
|
-
export declare class TcIframeModal extends LitElement {
|
|
527
|
-
src: string;
|
|
528
|
-
title: string;
|
|
529
|
-
closeOnEscape: boolean;
|
|
530
|
-
closeOnOverlay: boolean;
|
|
531
|
-
useHistory: boolean;
|
|
532
|
-
private isLoading;
|
|
533
|
-
private animation;
|
|
534
|
-
private history;
|
|
535
|
-
private messageBus;
|
|
536
|
-
static styles: CSSResult[];
|
|
537
|
-
connectedCallback(): void;
|
|
538
|
-
disconnectedCallback(): void;
|
|
539
|
-
private handleKeyDown;
|
|
540
|
-
private updateDataState;
|
|
541
|
-
open(): Promise<void>;
|
|
542
|
-
close(): Promise<void>;
|
|
543
|
-
private handleOverlayClick;
|
|
544
|
-
private handleIframeLoad;
|
|
545
|
-
sendMessage(type: string, payload?: unknown): void;
|
|
546
|
-
render(): TemplateResult<1>;
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
/**
|
|
550
|
-
* Form input component with label and error states.
|
|
551
|
-
* Uses design-tokens classes (.input, .label, .field-group).
|
|
552
|
-
*
|
|
553
|
-
* @fires tc-input - Fired when input value changes
|
|
554
|
-
* @fires tc-blur - Fired when input loses focus
|
|
555
|
-
* @fires tc-keydown - Fired when a key is pressed
|
|
556
|
-
* @fires tc-paste - Fired when content is pasted
|
|
557
|
-
* @csspart wrapper - The input wrapper element
|
|
558
|
-
* @csspart input - The input element
|
|
559
|
-
* @csspart label - The label element
|
|
560
|
-
* @csspart ink-line - The animated ink line
|
|
561
|
-
* @csspart error - The error message element
|
|
562
|
-
*/
|
|
563
|
-
export declare class TcInput extends LitElement {
|
|
564
|
-
label: string;
|
|
565
|
-
type: string;
|
|
566
|
-
placeholder: string;
|
|
567
|
-
value: string;
|
|
568
|
-
error: string;
|
|
569
|
-
disabled: boolean;
|
|
570
|
-
required: boolean;
|
|
571
|
-
name: string;
|
|
572
|
-
autocomplete: string;
|
|
573
|
-
inputmode: string;
|
|
574
|
-
maxlength: number;
|
|
575
|
-
sx: Record<string, string | number>;
|
|
576
|
-
private inputId;
|
|
577
|
-
private isFocused;
|
|
578
|
-
static styles: CSSResult[];
|
|
579
|
-
render(): TemplateResult<1>;
|
|
580
|
-
private handleInput;
|
|
581
|
-
private handleFocus;
|
|
582
|
-
private handleBlur;
|
|
583
|
-
private handleKeydown;
|
|
584
|
-
private handlePaste;
|
|
585
|
-
focus(): void;
|
|
586
|
-
}
|
|
587
|
-
|
|
588
|
-
/**
|
|
589
|
-
* An input field with an attached chip indicator.
|
|
590
|
-
* Useful for showing authentication method alongside email/username input.
|
|
591
|
-
*
|
|
592
|
-
* @fires tc-input - Fired when input value changes
|
|
593
|
-
* @fires tc-blur - Fired when input loses focus
|
|
594
|
-
* @fires tc-keydown - Fired on keydown
|
|
595
|
-
* @csspart wrapper - The input wrapper container
|
|
596
|
-
* @csspart input - The input element
|
|
597
|
-
* @csspart chip - The chip element
|
|
598
|
-
*/
|
|
599
|
-
export declare class TcInputWithChip extends LitElement {
|
|
600
|
-
label: string;
|
|
601
|
-
placeholder: string;
|
|
602
|
-
value: string;
|
|
603
|
-
error: string;
|
|
604
|
-
disabled: boolean;
|
|
605
|
-
readonly: boolean;
|
|
606
|
-
chipLabel: string;
|
|
607
|
-
chipIcon: string;
|
|
608
|
-
chipVariant: 'default' | 'success' | 'error' | 'info';
|
|
609
|
-
private inputId;
|
|
610
|
-
private isFocused;
|
|
611
|
-
static styles: CSSResult[];
|
|
612
|
-
render(): TemplateResult<1>;
|
|
613
|
-
private handleInput;
|
|
614
|
-
private handleFocus;
|
|
615
|
-
private handleBlur;
|
|
616
|
-
private handleKeydown;
|
|
617
|
-
focus(): void;
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
/**
|
|
621
|
-
* A banner prompting users to install the PWA.
|
|
622
|
-
* Remembers dismissal state via localStorage.
|
|
623
|
-
*
|
|
624
|
-
* @fires tc-install - Fired when the install button is clicked
|
|
625
|
-
* @fires tc-dismiss - Fired when the banner is dismissed
|
|
626
|
-
* @csspart banner - The banner container
|
|
627
|
-
* @csspart content - The content area
|
|
628
|
-
* @csspart icon - The app icon
|
|
629
|
-
* @csspart text - The text container
|
|
630
|
-
* @csspart title - The banner title
|
|
631
|
-
* @csspart description - The banner description
|
|
632
|
-
* @csspart actions - The actions container
|
|
633
|
-
* @csspart install - The install button
|
|
634
|
-
* @csspart close - The close button
|
|
635
|
-
*/
|
|
636
|
-
export declare class TcInstallationBanner extends LitElement {
|
|
637
|
-
title: string;
|
|
638
|
-
description: string;
|
|
639
|
-
installLabel: string;
|
|
640
|
-
storageKey: string;
|
|
641
|
-
dismissDays: number;
|
|
642
|
-
private isDismissed;
|
|
643
|
-
private animation;
|
|
644
|
-
private storage;
|
|
645
|
-
static styles: CSSResult[];
|
|
646
|
-
connectedCallback(): void;
|
|
647
|
-
private checkDismissState;
|
|
648
|
-
private updateDataState;
|
|
649
|
-
show(): Promise<void>;
|
|
650
|
-
dismiss(): Promise<void>;
|
|
651
|
-
private handleInstall;
|
|
652
|
-
private handleClose;
|
|
653
|
-
render(): TemplateResult<1>;
|
|
654
|
-
}
|
|
655
|
-
|
|
656
|
-
/**
|
|
657
|
-
* A guide modal for iOS PWA installation steps.
|
|
658
|
-
*
|
|
659
|
-
* @fires tc-close - Fired when the guide is closed
|
|
660
|
-
* @csspart overlay - The backdrop overlay
|
|
661
|
-
* @csspart modal - The modal container
|
|
662
|
-
* @csspart header - The modal header
|
|
663
|
-
* @csspart close - The close button
|
|
664
|
-
* @csspart content - The content area
|
|
665
|
-
* @csspart steps - The steps container
|
|
666
|
-
* @csspart step - Individual step
|
|
667
|
-
* @csspart step-number - Step number indicator
|
|
668
|
-
* @csspart step-text - Step text
|
|
669
|
-
*/
|
|
670
|
-
export declare class TcIosInstallationGuide extends LitElement {
|
|
671
|
-
title: string;
|
|
672
|
-
steps: string[];
|
|
673
|
-
private animation;
|
|
674
|
-
static styles: CSSResult[];
|
|
675
|
-
connectedCallback(): void;
|
|
676
|
-
private updateDataState;
|
|
677
|
-
show(): Promise<void>;
|
|
678
|
-
close(): Promise<void>;
|
|
679
|
-
private handleOverlayClick;
|
|
680
|
-
private renderStep;
|
|
681
|
-
render(): TemplateResult<1>;
|
|
682
|
-
}
|
|
683
|
-
|
|
684
|
-
/**
|
|
685
|
-
* A non-clickable item container for displaying content.
|
|
686
|
-
*
|
|
687
|
-
* @slot - Item content
|
|
688
|
-
* @slot prefix - Left side content (icon, symbol)
|
|
689
|
-
* @slot suffix - Right side content (badge, action)
|
|
690
|
-
* @csspart item - The item container
|
|
691
|
-
* @csspart prefix - The prefix container
|
|
692
|
-
* @csspart content - The main content container
|
|
693
|
-
* @csspart suffix - The suffix container
|
|
694
|
-
*/
|
|
695
|
-
export declare class TcItem extends LitElement {
|
|
696
|
-
gap: string;
|
|
697
|
-
padding: string;
|
|
698
|
-
sx: Record<string, string | number>;
|
|
699
|
-
static styles: CSSResult;
|
|
700
|
-
render(): TemplateResult<1>;
|
|
701
|
-
}
|
|
702
|
-
|
|
703
|
-
/**
|
|
704
|
-
* A clickable item button with hover states and optional arrow indicator.
|
|
705
|
-
*
|
|
706
|
-
* @slot - Item content
|
|
707
|
-
* @slot prefix - Left side content (icon, symbol)
|
|
708
|
-
* @slot suffix - Right side content (replaces arrow if provided)
|
|
709
|
-
* @fires tc-click - Fired when the item is clicked
|
|
710
|
-
* @csspart button - The button element
|
|
711
|
-
* @csspart prefix - The prefix container
|
|
712
|
-
* @csspart content - The main content container
|
|
713
|
-
* @csspart suffix - The suffix container
|
|
714
|
-
* @csspart arrow - The arrow indicator
|
|
715
|
-
*/
|
|
716
|
-
export declare class TcItemButton extends LitElement {
|
|
717
|
-
gap: string;
|
|
718
|
-
padding: string;
|
|
719
|
-
disabled: boolean;
|
|
720
|
-
showArrow: boolean;
|
|
721
|
-
sx: Record<string, string | number>;
|
|
722
|
-
static styles: CSSResult;
|
|
723
|
-
private handleClick;
|
|
724
|
-
render(): TemplateResult<1>;
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
/**
|
|
728
|
-
* A full-screen loading state with spinner and optional message.
|
|
729
|
-
*
|
|
730
|
-
* @csspart screen - The screen container
|
|
731
|
-
* @csspart content - The content wrapper
|
|
732
|
-
* @csspart spinner - The spinner element
|
|
733
|
-
* @csspart message - The message text
|
|
734
|
-
*/
|
|
735
|
-
export declare class TcLoadingScreen extends LitElement {
|
|
736
|
-
message: string;
|
|
737
|
-
spinnerSize: string;
|
|
738
|
-
private loading;
|
|
739
|
-
static styles: CSSResult;
|
|
740
|
-
connectedCallback(): void;
|
|
741
|
-
render(): TemplateResult<1>;
|
|
742
|
-
}
|
|
743
|
-
|
|
744
|
-
/**
|
|
745
|
-
* A modal for requesting notification permission with storage-based dismissal tracking.
|
|
746
|
-
*
|
|
747
|
-
* @fires tc-allow - Fired when the user clicks allow
|
|
748
|
-
* @fires tc-deny - Fired when the user clicks deny
|
|
749
|
-
* @fires tc-close - Fired when the modal is closed
|
|
750
|
-
* @csspart overlay - The backdrop overlay
|
|
751
|
-
* @csspart modal - The modal container
|
|
752
|
-
* @csspart icon - The notification icon
|
|
753
|
-
* @csspart title - The modal title
|
|
754
|
-
* @csspart description - The modal description
|
|
755
|
-
* @csspart actions - The action buttons container
|
|
756
|
-
*/
|
|
757
|
-
export declare class TcNotificationModal extends LitElement {
|
|
758
|
-
title: string;
|
|
759
|
-
description: string;
|
|
760
|
-
allowLabel: string;
|
|
761
|
-
denyLabel: string;
|
|
762
|
-
storageKey: string;
|
|
763
|
-
private animation;
|
|
764
|
-
private storage;
|
|
765
|
-
static styles: CSSResult[];
|
|
766
|
-
connectedCallback(): void;
|
|
767
|
-
private updateDataState;
|
|
768
|
-
/**
|
|
769
|
-
* Check if the modal should be shown based on stored state.
|
|
770
|
-
*/
|
|
771
|
-
shouldShow(): boolean;
|
|
772
|
-
show(): Promise<void>;
|
|
773
|
-
close(): Promise<void>;
|
|
774
|
-
private handleOverlayClick;
|
|
775
|
-
private handleAllow;
|
|
776
|
-
private handleDeny;
|
|
777
|
-
render(): TemplateResult<1>;
|
|
778
|
-
}
|
|
779
|
-
|
|
780
|
-
/**
|
|
781
|
-
* A modal displayed when the device goes offline.
|
|
782
|
-
* Automatically shows/hides based on network status.
|
|
783
|
-
*
|
|
784
|
-
* @fires tc-retry - Fired when the retry button is clicked
|
|
785
|
-
* @fires tc-online - Fired when the device comes back online
|
|
786
|
-
* @fires tc-offline - Fired when the device goes offline
|
|
787
|
-
* @csspart overlay - The backdrop overlay
|
|
788
|
-
* @csspart modal - The modal container
|
|
789
|
-
* @csspart icon - The offline icon
|
|
790
|
-
* @csspart title - The modal title
|
|
791
|
-
* @csspart description - The modal description
|
|
792
|
-
* @csspart action - The action button container
|
|
793
|
-
*/
|
|
794
|
-
export declare class TcOfflineModal extends LitElement {
|
|
795
|
-
title: string;
|
|
796
|
-
description: string;
|
|
797
|
-
retryLabel: string;
|
|
798
|
-
autoDetect: boolean;
|
|
799
|
-
private isOffline;
|
|
800
|
-
private animation;
|
|
801
|
-
static styles: CSSResult[];
|
|
802
|
-
connectedCallback(): void;
|
|
803
|
-
disconnectedCallback(): void;
|
|
804
|
-
private handleOnline;
|
|
805
|
-
private handleOffline;
|
|
806
|
-
private updateDataState;
|
|
807
|
-
show(): Promise<void>;
|
|
808
|
-
hide(): Promise<void>;
|
|
809
|
-
private handleRetry;
|
|
810
|
-
render(): TemplateResult<1>;
|
|
811
|
-
}
|
|
812
|
-
|
|
813
|
-
/**
|
|
814
|
-
* OTP (One-Time Password) input component with individual cells and progress indicator.
|
|
815
|
-
* Uses shake animation from design-tokens.
|
|
816
|
-
*
|
|
817
|
-
* @fires tc-complete - Fired when all cells are filled
|
|
818
|
-
* @fires tc-change - Fired when the OTP value changes
|
|
819
|
-
* @csspart cells - The cells container
|
|
820
|
-
* @csspart cell - Individual cell input
|
|
821
|
-
* @csspart progress - The progress bar container
|
|
822
|
-
* @csspart progress-bar - The progress bar fill
|
|
823
|
-
*/
|
|
824
|
-
export declare class TcOtpInput extends LitElement {
|
|
825
|
-
length: number;
|
|
826
|
-
error: boolean;
|
|
827
|
-
disabled: boolean;
|
|
828
|
-
showProgress: boolean;
|
|
829
|
-
private values;
|
|
830
|
-
static styles: CSSResult[];
|
|
831
|
-
connectedCallback(): void;
|
|
832
|
-
render(): TemplateResult<1>;
|
|
833
|
-
private handleInput;
|
|
834
|
-
private handleKeydown;
|
|
835
|
-
private handlePaste;
|
|
836
|
-
private focusCell;
|
|
837
|
-
/** Focus the first empty cell or the last cell */
|
|
838
|
-
focus(): void;
|
|
839
|
-
/** Clear all values */
|
|
840
|
-
clear(): void;
|
|
841
|
-
/** Get the current OTP value */
|
|
842
|
-
getValue(): string;
|
|
843
|
-
}
|
|
844
|
-
|
|
845
|
-
/**
|
|
846
|
-
* Decorative floating blob background for pages.
|
|
847
|
-
* Uses CSS custom properties for color variants and inkFloat/inkDrift animations from design-tokens.
|
|
848
|
-
*
|
|
849
|
-
* @csspart decoration - The decoration container
|
|
850
|
-
* @csspart blob - Individual blob element
|
|
851
|
-
*/
|
|
852
|
-
export declare class TcPageDecoration extends LitElement {
|
|
853
|
-
variant: 'primary' | 'success' | 'error';
|
|
854
|
-
static styles: CSSResult[];
|
|
855
|
-
render(): TemplateResult<1>;
|
|
856
|
-
}
|
|
857
|
-
|
|
858
|
-
/**
|
|
859
|
-
* A section container with flex column layout.
|
|
860
|
-
*
|
|
861
|
-
* @slot - Section content
|
|
862
|
-
* @csspart section - The section element
|
|
863
|
-
*/
|
|
864
|
-
export declare class TcSection extends LitElement {
|
|
865
|
-
gap: string;
|
|
866
|
-
sx: Record<string, string | number>;
|
|
867
|
-
static styles: CSSResult;
|
|
868
|
-
render(): TemplateResult<1>;
|
|
869
|
-
}
|
|
870
|
-
|
|
871
|
-
/**
|
|
872
|
-
* A loading spinner with responsive sizing.
|
|
873
|
-
* Uses spin animation from design-tokens.
|
|
874
|
-
*
|
|
875
|
-
* @csspart spinner - The spinner element
|
|
876
|
-
*/
|
|
877
|
-
export declare class TcSpinner extends LitElement {
|
|
878
|
-
private mobile;
|
|
879
|
-
size: 'sm' | 'md' | 'lg' | 'auto';
|
|
880
|
-
color: string;
|
|
881
|
-
static styles: CSSResult[];
|
|
882
|
-
render(): TemplateResult<1>;
|
|
883
|
-
}
|
|
884
|
-
|
|
885
|
-
/**
|
|
886
|
-
* A full-screen success state with animated checkmark and message.
|
|
887
|
-
*
|
|
888
|
-
* @fires tc-action - Fired when the action button is clicked
|
|
889
|
-
* @csspart screen - The screen container
|
|
890
|
-
* @csspart content - The content wrapper
|
|
891
|
-
* @csspart icon - The success icon container
|
|
892
|
-
* @csspart title - The success title
|
|
893
|
-
* @csspart message - The success message
|
|
894
|
-
* @csspart action - The action button container
|
|
895
|
-
*/
|
|
896
|
-
export declare class TcSuccessScreen extends LitElement {
|
|
897
|
-
title: string;
|
|
898
|
-
message: string;
|
|
899
|
-
actionLabel: string;
|
|
900
|
-
autoAnimate: boolean;
|
|
901
|
-
private isAnimated;
|
|
902
|
-
private animation;
|
|
903
|
-
static styles: CSSResult;
|
|
904
|
-
connectedCallback(): void;
|
|
905
|
-
playAnimation(): Promise<void>;
|
|
906
|
-
private handleAction;
|
|
907
|
-
render(): TemplateResult<1>;
|
|
908
|
-
}
|
|
909
|
-
|
|
910
|
-
/**
|
|
911
|
-
* A circular symbol/avatar component.
|
|
912
|
-
*
|
|
913
|
-
* @slot - Symbol content (icon or text)
|
|
914
|
-
* @csspart symbol - The symbol container
|
|
915
|
-
*/
|
|
916
|
-
export declare class TcSymbol extends LitElement {
|
|
917
|
-
size: string;
|
|
918
|
-
background: string;
|
|
919
|
-
color: string;
|
|
920
|
-
static styles: CSSResult;
|
|
921
|
-
render(): TemplateResult<1>;
|
|
922
|
-
}
|
|
923
|
-
|
|
924
|
-
/**
|
|
925
|
-
* A text component with dynamic tag rendering.
|
|
926
|
-
* Supports semantic HTML tags for accessibility.
|
|
927
|
-
* Uses design-tokens for consistent theming across light/dark modes.
|
|
928
|
-
*
|
|
929
|
-
* @slot - Text content
|
|
930
|
-
* @csspart text - The text element
|
|
931
|
-
*/
|
|
932
|
-
export declare class TcText extends LitElement {
|
|
933
|
-
tag: TextTag;
|
|
934
|
-
size?: TextSize;
|
|
935
|
-
weight?: TextWeight;
|
|
936
|
-
color?: TextColor | string;
|
|
937
|
-
sx: Record<string, string | number>;
|
|
938
|
-
static styles: CSSResult[];
|
|
939
|
-
private getColorClass;
|
|
940
|
-
private getColorStyle;
|
|
941
|
-
render(): TemplateResult;
|
|
942
|
-
}
|
|
943
|
-
|
|
944
|
-
/**
|
|
945
|
-
* A toast notification component with auto-dismiss and animation.
|
|
946
|
-
*
|
|
947
|
-
* @slot - Toast message content
|
|
948
|
-
* @fires tc-dismiss - Fired when the toast is dismissed
|
|
949
|
-
* @csspart toast - The toast container
|
|
950
|
-
* @csspart content - The content container
|
|
951
|
-
* @csspart close - The close button
|
|
952
|
-
*/
|
|
953
|
-
export declare class TcToast extends LitElement {
|
|
954
|
-
variant: 'info' | 'success' | 'warning' | 'error';
|
|
955
|
-
duration: number;
|
|
956
|
-
autoDismiss: boolean;
|
|
957
|
-
dismissible: boolean;
|
|
958
|
-
private animation;
|
|
959
|
-
private dismissTimer?;
|
|
960
|
-
static styles: CSSResult[];
|
|
961
|
-
connectedCallback(): void;
|
|
962
|
-
disconnectedCallback(): void;
|
|
963
|
-
private updateDataState;
|
|
964
|
-
private clearDismissTimer;
|
|
965
|
-
private startDismissTimer;
|
|
966
|
-
show(): Promise<void>;
|
|
967
|
-
hide(): Promise<void>;
|
|
968
|
-
private handleClose;
|
|
969
|
-
render(): TemplateResult<1>;
|
|
970
|
-
}
|
|
971
|
-
|
|
972
|
-
declare type TextColor = 'primary' | 'secondary' | 'tertiary' | 'muted' | 'accent' | 'success' | 'error' | 'warning' | 'info';
|
|
973
|
-
|
|
974
|
-
declare type TextSize = 'sm' | 'base' | 'lg' | 'xl' | '2xl';
|
|
975
|
-
|
|
976
|
-
declare type TextTag = 'p' | 'span' | 'div' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'label';
|
|
977
|
-
|
|
978
|
-
declare type TextWeight = '400' | '500' | '600' | '700';
|
|
979
|
-
|
|
980
284
|
export declare interface ValidationRule {
|
|
981
285
|
type: ValidationType;
|
|
982
286
|
value?: string | number | RegExp;
|