@transcodes/ui-components 0.2.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/CHANGELOG.md +76 -0
  2. package/README.md +124 -79
  3. package/dist/controllers/animation.controller.js +32 -0
  4. package/dist/controllers/base.controller.js +8 -0
  5. package/dist/controllers/form-validation.controller.js +49 -0
  6. package/dist/controllers/history.controller.js +26 -0
  7. package/dist/controllers/loading.controller.js +27 -0
  8. package/dist/controllers/match-media.controller.js +20 -0
  9. package/dist/controllers/message-bus.controller.js +45 -0
  10. package/dist/controllers/storage.controller.js +40 -0
  11. package/dist/index.d.ts +78 -0
  12. package/dist/index.js +80 -0
  13. package/dist/primitives/tc-box.js +38 -0
  14. package/dist/primitives/tc-button.js +167 -0
  15. package/dist/primitives/tc-callout.js +86 -0
  16. package/dist/primitives/tc-card.js +76 -0
  17. package/dist/primitives/tc-chip.js +79 -0
  18. package/dist/primitives/tc-container.js +62 -0
  19. package/dist/primitives/tc-divider.js +76 -0
  20. package/dist/primitives/tc-error-message.js +74 -0
  21. package/dist/primitives/tc-form-header.js +120 -0
  22. package/dist/primitives/tc-icon.js +95 -0
  23. package/dist/primitives/tc-input-with-chip.js +242 -0
  24. package/dist/primitives/tc-input.js +262 -0
  25. package/dist/primitives/tc-item-button.js +168 -0
  26. package/dist/primitives/tc-item.js +93 -0
  27. package/dist/primitives/tc-otp-input.js +230 -0
  28. package/dist/primitives/tc-section.js +48 -0
  29. package/dist/primitives/tc-spinner.js +87 -0
  30. package/dist/primitives/tc-symbol.js +56 -0
  31. package/dist/primitives/tc-text.js +145 -0
  32. package/dist/primitives/tc-toast.js +189 -0
  33. package/dist/screens/tc-error-screen.js +119 -0
  34. package/dist/screens/tc-loading-screen.js +77 -0
  35. package/dist/screens/tc-success-screen.js +192 -0
  36. package/dist/styles/shared.js +7 -0
  37. package/dist/widgets/tc-authenticator-card.js +213 -0
  38. package/dist/widgets/tc-floating-button.js +132 -0
  39. package/dist/widgets/tc-iframe-modal.js +263 -0
  40. package/dist/widgets/tc-installation-banner.js +234 -0
  41. package/dist/widgets/tc-ios-installation-guide.js +240 -0
  42. package/dist/widgets/tc-notification-modal.js +230 -0
  43. package/dist/widgets/tc-offline-modal.js +202 -0
  44. package/dist/widgets/tc-page-decoration.js +126 -0
  45. package/package.json +25 -7
  46. package/dist/ui-components.css +0 -1
  47. package/dist/ui-components.js +0 -4468
package/dist/index.d.ts CHANGED
@@ -286,6 +286,35 @@ export declare class StorageController<T = unknown> extends BaseController {
286
286
  hostDisconnected(): void;
287
287
  }
288
288
 
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
+
289
318
  /**
290
319
  * A simple container component without default flex layout.
291
320
  * Use for wrapping content with custom styles.
@@ -391,6 +420,23 @@ export declare class TcDivider extends LitElement {
391
420
  render(): TemplateResult<1>;
392
421
  }
393
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
+
394
440
  /**
395
441
  * A full-screen error state with icon, message, and retry action.
396
442
  *
@@ -539,6 +585,38 @@ export declare class TcInput extends LitElement {
539
585
  focus(): void;
540
586
  }
541
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
+
542
620
  /**
543
621
  * A banner prompting users to install the PWA.
544
622
  * Remembers dismissal state via localStorage.
package/dist/index.js ADDED
@@ -0,0 +1,80 @@
1
+ import { AnimationController as t } from "./controllers/animation.controller.js";
2
+ import { BaseController as m } from "./controllers/base.controller.js";
3
+ import { FormValidationController as f } from "./controllers/form-validation.controller.js";
4
+ import { HistoryController as x } from "./controllers/history.controller.js";
5
+ import { LoadingController as T } from "./controllers/loading.controller.js";
6
+ import { MatchMediaController as l } from "./controllers/match-media.controller.js";
7
+ import { MessageBusController as C } from "./controllers/message-bus.controller.js";
8
+ import { StorageController as d } from "./controllers/storage.controller.js";
9
+ import { TcBox as I } from "./primitives/tc-box.js";
10
+ import { TcButton as g } from "./primitives/tc-button.js";
11
+ import { TcCallout as M } from "./primitives/tc-callout.js";
12
+ import { TcCard as F } from "./primitives/tc-card.js";
13
+ import { TcChip as A } from "./primitives/tc-chip.js";
14
+ import { TcContainer as E } from "./primitives/tc-container.js";
15
+ import { TcDivider as L } from "./primitives/tc-divider.js";
16
+ import { TcErrorMessage as b } from "./primitives/tc-error-message.js";
17
+ import { TcFormHeader as G } from "./primitives/tc-form-header.js";
18
+ import { TcIcon as P } from "./primitives/tc-icon.js";
19
+ import { TcInput as W } from "./primitives/tc-input.js";
20
+ import { TcInputWithChip as k } from "./primitives/tc-input-with-chip.js";
21
+ import { TcItem as w } from "./primitives/tc-item.js";
22
+ import { TcItemButton as J } from "./primitives/tc-item-button.js";
23
+ import { TcOtpInput as Q } from "./primitives/tc-otp-input.js";
24
+ import { TcSection as U } from "./primitives/tc-section.js";
25
+ import { TcSpinner as Y } from "./primitives/tc-spinner.js";
26
+ import { TcSymbol as _ } from "./primitives/tc-symbol.js";
27
+ import { TcText as oo } from "./primitives/tc-text.js";
28
+ import { TcToast as to } from "./primitives/tc-toast.js";
29
+ import { TcErrorScreen as mo } from "./screens/tc-error-screen.js";
30
+ import { TcLoadingScreen as fo } from "./screens/tc-loading-screen.js";
31
+ import { TcSuccessScreen as xo } from "./screens/tc-success-screen.js";
32
+ import { TcAuthenticatorCard as To } from "./widgets/tc-authenticator-card.js";
33
+ import { TcFloatingButton as lo } from "./widgets/tc-floating-button.js";
34
+ import { TcIframeModal as Co } from "./widgets/tc-iframe-modal.js";
35
+ import { TcInstallationBanner as uo } from "./widgets/tc-installation-banner.js";
36
+ import { TcIosInstallationGuide as So } from "./widgets/tc-ios-installation-guide.js";
37
+ import { TcNotificationModal as Bo } from "./widgets/tc-notification-modal.js";
38
+ import { TcOfflineModal as ho } from "./widgets/tc-offline-modal.js";
39
+ import { TcPageDecoration as yo } from "./widgets/tc-page-decoration.js";
40
+ export {
41
+ t as AnimationController,
42
+ m as BaseController,
43
+ f as FormValidationController,
44
+ x as HistoryController,
45
+ T as LoadingController,
46
+ l as MatchMediaController,
47
+ C as MessageBusController,
48
+ d as StorageController,
49
+ To as TcAuthenticatorCard,
50
+ I as TcBox,
51
+ g as TcButton,
52
+ M as TcCallout,
53
+ F as TcCard,
54
+ A as TcChip,
55
+ E as TcContainer,
56
+ L as TcDivider,
57
+ b as TcErrorMessage,
58
+ mo as TcErrorScreen,
59
+ lo as TcFloatingButton,
60
+ G as TcFormHeader,
61
+ P as TcIcon,
62
+ Co as TcIframeModal,
63
+ W as TcInput,
64
+ k as TcInputWithChip,
65
+ uo as TcInstallationBanner,
66
+ So as TcIosInstallationGuide,
67
+ w as TcItem,
68
+ J as TcItemButton,
69
+ fo as TcLoadingScreen,
70
+ Bo as TcNotificationModal,
71
+ ho as TcOfflineModal,
72
+ Q as TcOtpInput,
73
+ yo as TcPageDecoration,
74
+ U as TcSection,
75
+ Y as TcSpinner,
76
+ xo as TcSuccessScreen,
77
+ _ as TcSymbol,
78
+ oo as TcText,
79
+ to as TcToast
80
+ };
@@ -0,0 +1,38 @@
1
+ import { LitElement as n, html as i, css as x } from "lit";
2
+ import { property as a, customElement as b } from "lit/decorators.js";
3
+ import { styleMap as f } from "lit/directives/style-map.js";
4
+ var v = Object.defineProperty, y = Object.getOwnPropertyDescriptor, m = (c, s, o, e) => {
5
+ for (var t = e > 1 ? void 0 : e ? y(s, o) : s, p = c.length - 1, l; p >= 0; p--)
6
+ (l = c[p]) && (t = (e ? l(s, o, t) : l(t)) || t);
7
+ return e && t && v(s, o, t), t;
8
+ };
9
+ let r = class extends n {
10
+ constructor() {
11
+ super(...arguments), this.sx = {};
12
+ }
13
+ render() {
14
+ return i`
15
+ <div part="box" class="box" style=${f(this.sx)}>
16
+ <slot></slot>
17
+ </div>
18
+ `;
19
+ }
20
+ };
21
+ r.styles = x`
22
+ :host {
23
+ display: contents;
24
+ }
25
+
26
+ .box {
27
+ display: block;
28
+ }
29
+ `;
30
+ m([
31
+ a({ type: Object })
32
+ ], r.prototype, "sx", 2);
33
+ r = m([
34
+ b("tc-box")
35
+ ], r);
36
+ export {
37
+ r as TcBox
38
+ };
@@ -0,0 +1,167 @@
1
+ import { LitElement as p, html as l, css as u } from "lit";
2
+ import { property as r, customElement as b } from "lit/decorators.js";
3
+ import { classMap as v } from "lit/directives/class-map.js";
4
+ import { styleMap as y } from "lit/directives/style-map.js";
5
+ import { sharedStyles as m } from "../styles/shared.js";
6
+ var h = Object.defineProperty, f = Object.getOwnPropertyDescriptor, n = (o, i, s, a) => {
7
+ for (var t = a > 1 ? void 0 : a ? f(i, s) : i, d = o.length - 1, c; d >= 0; d--)
8
+ (c = o[d]) && (t = (a ? c(i, s, t) : c(t)) || t);
9
+ return a && t && h(i, s, t), t;
10
+ };
11
+ let e = class extends p {
12
+ constructor() {
13
+ super(...arguments), this.disabled = !1, this.loading = !1, this.variant = "primary", this.sx = {};
14
+ }
15
+ render() {
16
+ const o = {
17
+ button: !0,
18
+ "button-ink": this.variant !== "secondary",
19
+ "button-primary": this.variant === "primary",
20
+ "button-secondary": this.variant === "secondary",
21
+ "button-success": this.variant === "success",
22
+ "button--loading": this.loading
23
+ };
24
+ return l`
25
+ <button
26
+ part="button"
27
+ class=${v(o)}
28
+ style=${y(this.sx)}
29
+ ?disabled=${this.disabled || this.loading}
30
+ type="button"
31
+ @click=${this.handleClick}
32
+ >
33
+ <span class="button-content">
34
+ ${this.loading ? l`<div part="spinner" class="button-spinner"></div>` : ""}
35
+ <slot></slot>
36
+ </span>
37
+ </button>
38
+ `;
39
+ }
40
+ handleClick(o) {
41
+ this.disabled || this.loading || this.dispatchEvent(
42
+ new CustomEvent("tc-click", {
43
+ bubbles: !0,
44
+ composed: !0,
45
+ detail: { originalEvent: o }
46
+ })
47
+ );
48
+ }
49
+ };
50
+ e.styles = [
51
+ m,
52
+ u`
53
+ :host {
54
+ display: block;
55
+ width: 100%;
56
+ }
57
+
58
+ /* Extend base .button from design-tokens */
59
+ .button {
60
+ position: relative;
61
+ width: 100%;
62
+ display: flex;
63
+ align-items: center;
64
+ justify-content: center;
65
+ gap: var(--space-sm);
66
+ overflow: hidden;
67
+ }
68
+
69
+ /* Radial gradient glow overlay for primary/success */
70
+ .button-ink::before {
71
+ content: '';
72
+ position: absolute;
73
+ inset: 0;
74
+ border-radius: inherit;
75
+ background: radial-gradient(
76
+ circle at center,
77
+ transparent 0%,
78
+ var(--overlay-glow-white) 100%
79
+ );
80
+ opacity: var(--opacity-hidden);
81
+ transition: opacity 600ms ease;
82
+ pointer-events: none;
83
+ }
84
+
85
+ .button-ink:hover:not(:disabled)::before {
86
+ opacity: 1;
87
+ }
88
+
89
+ /* Loading pulse animation */
90
+ .button--loading {
91
+ animation: pulse 1s ease-in-out infinite;
92
+ }
93
+
94
+ @keyframes pulse {
95
+ 0%,
96
+ 100% {
97
+ opacity: var(--opacity-visible);
98
+ }
99
+ 50% {
100
+ opacity: var(--opacity-loading);
101
+ }
102
+ }
103
+
104
+ /* Active states - design-tokens doesn't include these */
105
+ .button-primary:active:not(:disabled) {
106
+ background: var(--accent-primary-pressed);
107
+ transform: translateY(0);
108
+ box-shadow: none;
109
+ }
110
+
111
+ .button-success:active:not(:disabled) {
112
+ background: var(--accent-success-pressed);
113
+ transform: translateY(0);
114
+ box-shadow: none;
115
+ }
116
+
117
+ .button-secondary:active:not(:disabled) {
118
+ background: var(--alpha-primary08);
119
+ }
120
+
121
+ /* Secondary spinner override */
122
+ .button-secondary .button-spinner {
123
+ border-color: var(--alpha-primary30);
124
+ border-top-color: var(--accent-primary);
125
+ }
126
+
127
+ /* Focus visible state */
128
+ .button:focus-visible {
129
+ outline: var(--size-border-width-thick) solid var(--accent-primary);
130
+ outline-offset: var(--size-border-width-thick);
131
+ }
132
+
133
+ /* Reduced motion */
134
+ @media (prefers-reduced-motion: reduce) {
135
+ .button,
136
+ .button-ink::before {
137
+ transition-duration: 0.01ms !important;
138
+ }
139
+
140
+ .button--loading {
141
+ animation: none;
142
+ }
143
+
144
+ .button-spinner {
145
+ animation-duration: 1.5s;
146
+ }
147
+ }
148
+ `
149
+ ];
150
+ n([
151
+ r({ type: Boolean })
152
+ ], e.prototype, "disabled", 2);
153
+ n([
154
+ r({ type: Boolean })
155
+ ], e.prototype, "loading", 2);
156
+ n([
157
+ r({ type: String })
158
+ ], e.prototype, "variant", 2);
159
+ n([
160
+ r({ type: Object })
161
+ ], e.prototype, "sx", 2);
162
+ e = n([
163
+ b("tc-button")
164
+ ], e);
165
+ export {
166
+ e as TcButton
167
+ };
@@ -0,0 +1,86 @@
1
+ import { LitElement as c, html as m, css as p } from "lit";
2
+ import { property as v, customElement as d } from "lit/decorators.js";
3
+ import { classMap as u } from "lit/directives/class-map.js";
4
+ import { sharedStyles as f } from "../styles/shared.js";
5
+ var h = Object.defineProperty, y = Object.getOwnPropertyDescriptor, l = (n, e, s, r) => {
6
+ for (var t = r > 1 ? void 0 : r ? y(e, s) : e, i = n.length - 1, a; i >= 0; i--)
7
+ (a = n[i]) && (t = (r ? a(e, s, t) : a(t)) || t);
8
+ return r && t && h(e, s, t), t;
9
+ };
10
+ let o = class extends c {
11
+ constructor() {
12
+ super(...arguments), this.variant = "info";
13
+ }
14
+ render() {
15
+ const n = this.variant === "error", e = {
16
+ notice: !n,
17
+ "notice-info": this.variant === "info",
18
+ "notice-success": this.variant === "success",
19
+ "notice-warning": this.variant === "warning",
20
+ "error-message": n
21
+ };
22
+ return m`
23
+ <div part="callout" class=${u(e)} role="alert">
24
+ <div class="callout-inner">
25
+ <div part="icon" class="callout-icon">
26
+ <slot name="icon"></slot>
27
+ </div>
28
+ <div part="content" class="callout-content">
29
+ <slot></slot>
30
+ </div>
31
+ </div>
32
+ </div>
33
+ `;
34
+ }
35
+ };
36
+ o.styles = [
37
+ f,
38
+ p`
39
+ :host {
40
+ display: block;
41
+ width: 100%;
42
+ }
43
+
44
+ /* Override animation from design-tokens for immediate display */
45
+ .notice {
46
+ animation: none;
47
+ }
48
+
49
+ /* Error variant uses error-message class from design-tokens */
50
+ .error-message {
51
+ animation: none;
52
+ }
53
+
54
+ /* Icon + content layout */
55
+ .callout-inner {
56
+ display: flex;
57
+ align-items: flex-start;
58
+ gap: var(--space-sm);
59
+ }
60
+
61
+ .callout-icon {
62
+ flex-shrink: 0;
63
+ display: flex;
64
+ align-items: center;
65
+ }
66
+
67
+ /* Hide icon container when empty */
68
+ .callout-icon:empty {
69
+ display: none;
70
+ }
71
+
72
+ .callout-content {
73
+ flex: 1;
74
+ min-width: 0;
75
+ }
76
+ `
77
+ ];
78
+ l([
79
+ v({ type: String })
80
+ ], o.prototype, "variant", 2);
81
+ o = l([
82
+ d("tc-callout")
83
+ ], o);
84
+ export {
85
+ o as TcCallout
86
+ };
@@ -0,0 +1,76 @@
1
+ import { LitElement as p, html as l, css as f } from "lit";
2
+ import { property as c, customElement as m } from "lit/decorators.js";
3
+ import { classMap as b } from "lit/directives/class-map.js";
4
+ import { styleMap as u } from "lit/directives/style-map.js";
5
+ import { sharedStyles as v } from "../styles/shared.js";
6
+ var h = Object.defineProperty, y = Object.getOwnPropertyDescriptor, d = (t, o, n, s) => {
7
+ for (var e = s > 1 ? void 0 : s ? y(o, n) : o, a = t.length - 1, i; a >= 0; a--)
8
+ (i = t[a]) && (e = (s ? i(o, n, e) : i(e)) || e);
9
+ return s && e && h(o, n, e), e;
10
+ };
11
+ let r = class extends p {
12
+ constructor() {
13
+ super(...arguments), this.noBorder = !1, this.sx = {};
14
+ }
15
+ render() {
16
+ const t = {
17
+ card: !0,
18
+ "card--no-border": this.noBorder
19
+ };
20
+ return l`
21
+ <div part="card" class=${b(t)} style=${u(this.sx)}>
22
+ <div class="card-content">
23
+ <slot></slot>
24
+ </div>
25
+ </div>
26
+ `;
27
+ }
28
+ };
29
+ r.styles = [
30
+ v,
31
+ f`
32
+ :host {
33
+ display: block;
34
+ }
35
+
36
+ /* Inner border effect using mask - extends design-tokens .card */
37
+ .card::before {
38
+ content: '';
39
+ position: absolute;
40
+ inset: 0;
41
+ border-radius: inherit;
42
+ padding: 0.0625rem;
43
+ background: linear-gradient(
44
+ 180deg,
45
+ var(--alpha-white90) 0%,
46
+ var(--alpha-white30) 100%
47
+ );
48
+ mask:
49
+ linear-gradient(#fff 0 0) content-box,
50
+ linear-gradient(#fff 0 0);
51
+ mask-composite: exclude;
52
+ pointer-events: none;
53
+ }
54
+
55
+ .card--no-border::before {
56
+ display: none;
57
+ }
58
+
59
+ .card-content {
60
+ position: relative;
61
+ z-index: 1;
62
+ }
63
+ `
64
+ ];
65
+ d([
66
+ c({ type: Boolean, attribute: "no-border" })
67
+ ], r.prototype, "noBorder", 2);
68
+ d([
69
+ c({ type: Object })
70
+ ], r.prototype, "sx", 2);
71
+ r = d([
72
+ m("tc-card")
73
+ ], r);
74
+ export {
75
+ r as TcCard
76
+ };
@@ -0,0 +1,79 @@
1
+ import { LitElement as l, html as h, css as d } from "lit";
2
+ import { property as n, customElement as f } from "lit/decorators.js";
3
+ import { sharedStyles as v } from "../styles/shared.js";
4
+ var m = Object.defineProperty, u = Object.getOwnPropertyDescriptor, c = (o, i, s, t) => {
5
+ for (var r = t > 1 ? void 0 : t ? u(i, s) : i, a = o.length - 1, p; a >= 0; a--)
6
+ (p = o[a]) && (r = (t ? p(i, s, r) : p(r)) || r);
7
+ return t && r && m(i, s, r), r;
8
+ };
9
+ let e = class extends l {
10
+ constructor() {
11
+ super(...arguments), this.variant = "default", this.size = "md";
12
+ }
13
+ render() {
14
+ return h`
15
+ <span part="chip" class="chip chip--${this.variant} chip--${this.size}">
16
+ <slot></slot>
17
+ </span>
18
+ `;
19
+ }
20
+ };
21
+ e.styles = [
22
+ v,
23
+ d`
24
+ :host {
25
+ display: inline-flex;
26
+ }
27
+
28
+ .chip {
29
+ display: inline-flex;
30
+ align-items: center;
31
+ justify-content: center;
32
+ border-radius: var(--radius-full);
33
+ font-family: var(--font-body);
34
+ font-weight: 500;
35
+ }
36
+
37
+ .chip--sm {
38
+ padding: var(--size-chip-padding-sm);
39
+ font-size: var(--font-size-xs);
40
+ }
41
+
42
+ .chip--md {
43
+ padding: var(--size-chip-padding-md);
44
+ font-size: var(--font-size-sm);
45
+ }
46
+
47
+ .chip--default {
48
+ background: var(--paper-cream);
49
+ color: var(--ink-dark);
50
+ }
51
+
52
+ .chip--success {
53
+ background: var(--alpha-success15);
54
+ color: var(--accent-success);
55
+ }
56
+
57
+ .chip--error {
58
+ background: var(--error-bg);
59
+ color: var(--error-base);
60
+ }
61
+
62
+ .chip--info {
63
+ background: var(--alpha-primary10);
64
+ color: var(--accent-primary);
65
+ }
66
+ `
67
+ ];
68
+ c([
69
+ n({ type: String })
70
+ ], e.prototype, "variant", 2);
71
+ c([
72
+ n({ type: String })
73
+ ], e.prototype, "size", 2);
74
+ e = c([
75
+ f("tc-chip")
76
+ ], e);
77
+ export {
78
+ e as TcChip
79
+ };
@@ -0,0 +1,62 @@
1
+ import { LitElement as p, html as d, css as m } from "lit";
2
+ import { property as c, customElement as f } from "lit/decorators.js";
3
+ import { styleMap as h } from "lit/directives/style-map.js";
4
+ var w = Object.defineProperty, y = Object.getOwnPropertyDescriptor, l = (r, i, o, s) => {
5
+ for (var t = s > 1 ? void 0 : s ? y(i, o) : i, n = r.length - 1, a; n >= 0; n--)
6
+ (a = r[n]) && (t = (s ? a(i, o, t) : a(t)) || t);
7
+ return s && t && w(i, o, t), t;
8
+ };
9
+ let e = class extends p {
10
+ constructor() {
11
+ super(...arguments), this.wide = !1, this.sx = {}, this.defaultStyles = {
12
+ display: "flex",
13
+ flexDirection: "column",
14
+ alignItems: "center",
15
+ justifyContent: "flex-start"
16
+ };
17
+ }
18
+ render() {
19
+ const r = {
20
+ ...this.defaultStyles,
21
+ ...this.sx
22
+ };
23
+ return d`
24
+ <div
25
+ part="container"
26
+ class="container ${this.wide ? "container--wide" : ""}"
27
+ style=${h(r)}
28
+ >
29
+ <slot></slot>
30
+ </div>
31
+ `;
32
+ }
33
+ };
34
+ e.styles = m`
35
+ :host {
36
+ display: block;
37
+ width: 100%;
38
+ }
39
+
40
+ .container {
41
+ position: relative;
42
+ width: 100%;
43
+ max-width: var(--container-max-width);
44
+ margin: 0 auto;
45
+ }
46
+
47
+ .container--wide {
48
+ max-width: var(--container-max-width-wide);
49
+ }
50
+ `;
51
+ l([
52
+ c({ type: Boolean })
53
+ ], e.prototype, "wide", 2);
54
+ l([
55
+ c({ type: Object })
56
+ ], e.prototype, "sx", 2);
57
+ e = l([
58
+ f("tc-container")
59
+ ], e);
60
+ export {
61
+ e as TcContainer
62
+ };