@transcodes/ui-components 0.3.5 → 0.4.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.
Files changed (114) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/README.md +8 -22
  3. package/dist/controllers/index.d.ts +0 -2
  4. package/dist/controllers/index.d.ts.map +1 -1
  5. package/dist/controllers/index.js +10 -12
  6. package/dist/index.d.ts +1 -1
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +48 -64
  9. package/dist/primitives/index.d.ts +1 -0
  10. package/dist/primitives/index.d.ts.map +1 -1
  11. package/dist/primitives/index.js +18 -16
  12. package/dist/primitives/tc-box.d.ts +2 -1
  13. package/dist/primitives/tc-box.d.ts.map +1 -1
  14. package/dist/primitives/tc-box.js +4 -4
  15. package/dist/primitives/tc-button.d.ts +2 -1
  16. package/dist/primitives/tc-button.d.ts.map +1 -1
  17. package/dist/primitives/tc-button.js +21 -20
  18. package/dist/primitives/tc-callout.d.ts +2 -0
  19. package/dist/primitives/tc-callout.d.ts.map +1 -1
  20. package/dist/primitives/tc-callout.js +22 -17
  21. package/dist/primitives/tc-card.d.ts +2 -1
  22. package/dist/primitives/tc-card.d.ts.map +1 -1
  23. package/dist/primitives/tc-card.js +11 -10
  24. package/dist/primitives/tc-chip.d.ts +2 -0
  25. package/dist/primitives/tc-chip.d.ts.map +1 -1
  26. package/dist/primitives/tc-chip.js +26 -16
  27. package/dist/primitives/tc-container.d.ts +2 -1
  28. package/dist/primitives/tc-container.d.ts.map +1 -1
  29. package/dist/primitives/tc-container.js +12 -10
  30. package/dist/primitives/tc-divider.d.ts +2 -2
  31. package/dist/primitives/tc-divider.d.ts.map +1 -1
  32. package/dist/primitives/tc-divider.js +25 -23
  33. package/dist/primitives/tc-error-message.d.ts +2 -0
  34. package/dist/primitives/tc-error-message.d.ts.map +1 -1
  35. package/dist/primitives/tc-error-message.js +23 -16
  36. package/dist/primitives/tc-form-header.d.ts +2 -1
  37. package/dist/primitives/tc-form-header.d.ts.map +1 -1
  38. package/dist/primitives/tc-form-header.js +9 -7
  39. package/dist/primitives/tc-icon.d.ts +2 -2
  40. package/dist/primitives/tc-icon.d.ts.map +1 -1
  41. package/dist/primitives/tc-icon.js +61 -61
  42. package/dist/primitives/tc-input-with-chip.d.ts +2 -0
  43. package/dist/primitives/tc-input-with-chip.d.ts.map +1 -1
  44. package/dist/primitives/tc-input-with-chip.js +26 -18
  45. package/dist/primitives/tc-input.d.ts +2 -1
  46. package/dist/primitives/tc-input.d.ts.map +1 -1
  47. package/dist/primitives/tc-input.js +11 -9
  48. package/dist/primitives/tc-item-button.d.ts +2 -3
  49. package/dist/primitives/tc-item-button.d.ts.map +1 -1
  50. package/dist/primitives/tc-item-button.js +31 -36
  51. package/dist/primitives/tc-item.d.ts +2 -3
  52. package/dist/primitives/tc-item.d.ts.map +1 -1
  53. package/dist/primitives/tc-item.js +21 -26
  54. package/dist/primitives/tc-otp-input.d.ts +2 -0
  55. package/dist/primitives/tc-otp-input.d.ts.map +1 -1
  56. package/dist/primitives/tc-otp-input.js +17 -11
  57. package/dist/{widgets → primitives}/tc-page-decoration.d.ts +2 -0
  58. package/dist/primitives/tc-page-decoration.d.ts.map +1 -0
  59. package/dist/{widgets → primitives}/tc-page-decoration.js +29 -25
  60. package/dist/primitives/tc-section.d.ts +2 -2
  61. package/dist/primitives/tc-section.d.ts.map +1 -1
  62. package/dist/primitives/tc-section.js +23 -24
  63. package/dist/primitives/tc-spinner.d.ts +2 -1
  64. package/dist/primitives/tc-spinner.d.ts.map +1 -1
  65. package/dist/primitives/tc-spinner.js +32 -29
  66. package/dist/primitives/tc-symbol.d.ts +2 -3
  67. package/dist/primitives/tc-symbol.d.ts.map +1 -1
  68. package/dist/primitives/tc-symbol.js +26 -28
  69. package/dist/primitives/tc-text.d.ts +2 -1
  70. package/dist/primitives/tc-text.d.ts.map +1 -1
  71. package/dist/primitives/tc-text.js +3 -3
  72. package/dist/primitives/tc-toast.d.ts +2 -0
  73. package/dist/primitives/tc-toast.d.ts.map +1 -1
  74. package/dist/primitives/tc-toast.js +35 -25
  75. package/dist/screens/tc-error-screen.d.ts +8 -1
  76. package/dist/screens/tc-error-screen.d.ts.map +1 -1
  77. package/dist/screens/tc-error-screen.js +91 -32
  78. package/dist/screens/tc-loading-screen.d.ts +3 -1
  79. package/dist/screens/tc-loading-screen.d.ts.map +1 -1
  80. package/dist/screens/tc-loading-screen.js +28 -19
  81. package/dist/screens/tc-success-screen.d.ts +2 -0
  82. package/dist/screens/tc-success-screen.d.ts.map +1 -1
  83. package/dist/screens/tc-success-screen.js +41 -31
  84. package/dist/types.d.ts +34 -0
  85. package/dist/types.d.ts.map +1 -0
  86. package/package.json +13 -13
  87. package/dist/controllers/form-validation.controller.d.ts +0 -48
  88. package/dist/controllers/form-validation.controller.d.ts.map +0 -1
  89. package/dist/controllers/form-validation.controller.js +0 -49
  90. package/dist/widgets/index.d.ts +0 -9
  91. package/dist/widgets/index.d.ts.map +0 -1
  92. package/dist/widgets/index.js +0 -18
  93. package/dist/widgets/tc-authenticator-card.d.ts +0 -35
  94. package/dist/widgets/tc-authenticator-card.d.ts.map +0 -1
  95. package/dist/widgets/tc-authenticator-card.js +0 -213
  96. package/dist/widgets/tc-floating-button.d.ts +0 -25
  97. package/dist/widgets/tc-floating-button.d.ts.map +0 -1
  98. package/dist/widgets/tc-floating-button.js +0 -132
  99. package/dist/widgets/tc-iframe-modal.d.ts +0 -43
  100. package/dist/widgets/tc-iframe-modal.d.ts.map +0 -1
  101. package/dist/widgets/tc-iframe-modal.js +0 -263
  102. package/dist/widgets/tc-installation-banner.d.ts +0 -42
  103. package/dist/widgets/tc-installation-banner.d.ts.map +0 -1
  104. package/dist/widgets/tc-installation-banner.js +0 -234
  105. package/dist/widgets/tc-ios-installation-guide.d.ts +0 -34
  106. package/dist/widgets/tc-ios-installation-guide.d.ts.map +0 -1
  107. package/dist/widgets/tc-ios-installation-guide.js +0 -240
  108. package/dist/widgets/tc-notification-modal.d.ts +0 -42
  109. package/dist/widgets/tc-notification-modal.d.ts.map +0 -1
  110. package/dist/widgets/tc-notification-modal.js +0 -230
  111. package/dist/widgets/tc-offline-modal.d.ts +0 -39
  112. package/dist/widgets/tc-offline-modal.d.ts.map +0 -1
  113. package/dist/widgets/tc-offline-modal.js +0 -202
  114. package/dist/widgets/tc-page-decoration.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"tc-toast.d.ts","sourceRoot":"","sources":["../../src/primitives/tc-toast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,MAAM,KAAK,CAAC;AAK5C;;;;;;;;GAQG;AACH,qBACa,OAAQ,SAAQ,UAAU;IACT,OAAO,EAC/B,MAAM,GACN,SAAS,GACT,SAAS,GACT,OAAO,CAAU;IACO,QAAQ,SAAQ;IACY,WAAW,UAAQ;IAC9C,WAAW,UAAQ;IAEhD,OAAO,CAAC,SAAS,CAGd;IAEH,OAAO,CAAC,YAAY,CAAC,CAAgC;IAErD,OAAgB,MAAM,4BA6FpB;IAEO,iBAAiB;IAKjB,oBAAoB;IAK7B,OAAO,CAAC,eAAe;IAIvB,OAAO,CAAC,iBAAiB;IAOzB,OAAO,CAAC,iBAAiB;IASnB,IAAI;IAOJ,IAAI;IAaV,OAAO,CAAC,WAAW;IAIV,MAAM;CAiChB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,UAAU,EAAE,OAAO,CAAC;KACrB;CACF"}
1
+ {"version":3,"file":"tc-toast.d.ts","sourceRoot":"","sources":["../../src/primitives/tc-toast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,MAAM,KAAK,CAAC;AAK5C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C;;;;;;;;GAQG;AACH,qBACa,OAAQ,SAAQ,UAAU;IACT,OAAO,EAC/B,MAAM,GACN,SAAS,GACT,SAAS,GACT,OAAO,CAAU;IACO,QAAQ,SAAQ;IACY,WAAW,UAAQ;IAC9C,WAAW,UAAQ;IACpB,EAAE,EAAE,OAAO,CAAM;IAE7C,OAAO,CAAC,SAAS,CAGd;IAEH,OAAO,CAAC,YAAY,CAAC,CAAgC;IAErD,OAAgB,MAAM,4BA6FpB;IAEO,iBAAiB;IAKjB,oBAAoB;IAK7B,OAAO,CAAC,eAAe;IAIvB,OAAO,CAAC,iBAAiB;IAOzB,OAAO,CAAC,iBAAiB;IASnB,IAAI;IAOJ,IAAI;IAaV,OAAO,CAAC,WAAW;IAIV,MAAM;CAuChB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,UAAU,EAAE,OAAO,CAAC;KACrB;CACF"}
@@ -1,15 +1,16 @@
1
- import { LitElement as h, html as d, css as m } from "lit";
2
- import { property as o, customElement as p } from "lit/decorators.js";
3
- import { AnimationController as u } from "../controllers/animation.controller.js";
4
- import { sharedStyles as v } from "../styles/shared.js";
5
- var y = Object.defineProperty, f = Object.getOwnPropertyDescriptor, i = (c, e, r, a) => {
6
- for (var t = a > 1 ? void 0 : a ? f(e, r) : e, n = c.length - 1, l; n >= 0; n--)
7
- (l = c[n]) && (t = (a ? l(e, r, t) : l(t)) || t);
8
- return a && t && y(e, r, t), t;
1
+ import { css as h, LitElement as m, html as d } from "lit";
2
+ import { property as e, customElement as p } from "lit/decorators.js";
3
+ import { styleMap as u } from "lit/directives/style-map.js";
4
+ import { AnimationController as v } from "../controllers/animation.controller.js";
5
+ import { sharedStyles as y } from "../styles/shared.js";
6
+ var f = Object.defineProperty, b = Object.getOwnPropertyDescriptor, i = (c, a, r, o) => {
7
+ for (var s = o > 1 ? void 0 : o ? b(a, r) : a, n = c.length - 1, l; n >= 0; n--)
8
+ (l = c[n]) && (s = (o ? l(a, r, s) : l(s)) || s);
9
+ return o && s && f(a, r, s), s;
9
10
  };
10
- let s = class extends h {
11
+ let t = class extends m {
11
12
  constructor() {
12
- super(...arguments), this.variant = "info", this.duration = 5e3, this.autoDismiss = !0, this.dismissible = !0, this.animation = new u(this, {
13
+ super(...arguments), this.variant = "info", this.duration = 5e3, this.autoDismiss = !0, this.dismissible = !0, this.sx = {}, this.animation = new v(this, {
13
14
  showDuration: 300,
14
15
  hideDuration: 200
15
16
  });
@@ -47,7 +48,13 @@ let s = class extends h {
47
48
  }
48
49
  render() {
49
50
  return d`
50
- <div part="toast" class="toast toast--${this.variant}" role="alert" aria-live="polite">
51
+ <div
52
+ part="toast"
53
+ class="toast toast--${this.variant}"
54
+ role="alert"
55
+ aria-live="polite"
56
+ style=${u(this.sx)}
57
+ >
51
58
  <div part="content" class="content">
52
59
  <slot></slot>
53
60
  </div>
@@ -75,9 +82,9 @@ let s = class extends h {
75
82
  `;
76
83
  }
77
84
  };
78
- s.styles = [
79
- v,
80
- m`
85
+ t.styles = [
86
+ y,
87
+ h`
81
88
  :host {
82
89
  display: block;
83
90
  position: fixed;
@@ -170,20 +177,23 @@ s.styles = [
170
177
  `
171
178
  ];
172
179
  i([
173
- o({ type: String })
174
- ], s.prototype, "variant", 2);
180
+ e({ type: String })
181
+ ], t.prototype, "variant", 2);
175
182
  i([
176
- o({ type: Number })
177
- ], s.prototype, "duration", 2);
183
+ e({ type: Number })
184
+ ], t.prototype, "duration", 2);
178
185
  i([
179
- o({ type: Boolean, attribute: "auto-dismiss" })
180
- ], s.prototype, "autoDismiss", 2);
186
+ e({ type: Boolean, attribute: "auto-dismiss" })
187
+ ], t.prototype, "autoDismiss", 2);
181
188
  i([
182
- o({ type: Boolean })
183
- ], s.prototype, "dismissible", 2);
184
- s = i([
189
+ e({ type: Boolean })
190
+ ], t.prototype, "dismissible", 2);
191
+ i([
192
+ e({ type: Object })
193
+ ], t.prototype, "sx", 2);
194
+ t = i([
185
195
  p("tc-toast")
186
- ], s);
196
+ ], t);
187
197
  export {
188
- s as TcToast
198
+ t as TcToast
189
199
  };
@@ -1,6 +1,7 @@
1
1
  import { LitElement } from 'lit';
2
+ import { SxProps } from '../types.js';
2
3
  /**
3
- * A full-screen error state with icon, message, and retry action.
4
+ * A full-screen error state with animated icon, message, and retry action.
4
5
  *
5
6
  * @fires tc-retry - Fired when the retry button is clicked
6
7
  * @csspart screen - The screen container
@@ -15,7 +16,13 @@ export declare class TcErrorScreen extends LitElement {
15
16
  message: string;
16
17
  retryLabel: string;
17
18
  showRetry: boolean;
19
+ autoAnimate: boolean;
20
+ sx: SxProps;
21
+ private isAnimated;
22
+ private animation;
18
23
  static styles: import('lit').CSSResult;
24
+ connectedCallback(): void;
25
+ playAnimation(): Promise<void>;
19
26
  private handleRetry;
20
27
  render(): import('lit').TemplateResult<1>;
21
28
  }
@@ -1 +1 @@
1
- {"version":3,"file":"tc-error-screen.d.ts","sourceRoot":"","sources":["../../src/screens/tc-error-screen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,MAAM,KAAK,CAAC;AAE5C,OAAO,0BAA0B,CAAC;AAClC,OAAO,0BAA0B,CAAC;AAClC,OAAO,4BAA4B,CAAC;AACpC,OAAO,+BAA+B,CAAC;AACvC,OAAO,6BAA6B,CAAC;AAErC;;;;;;;;;;GAUG;AACH,qBACa,aAAc,SAAQ,UAAU;IACf,KAAK,SAA0B;IAC/B,OAAO,SACiB;IACE,UAAU,SAClD;IACwC,SAAS,UAAQ;IAEvE,OAAgB,MAAM,0BAoDpB;IAEF,OAAO,CAAC,WAAW;IASV,MAAM;CAgChB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,iBAAiB,EAAE,aAAa,CAAC;KAClC;CACF"}
1
+ {"version":3,"file":"tc-error-screen.d.ts","sourceRoot":"","sources":["../../src/screens/tc-error-screen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,MAAM,KAAK,CAAC;AAI5C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,0BAA0B,CAAC;AAClC,OAAO,0BAA0B,CAAC;AAClC,OAAO,4BAA4B,CAAC;AACpC,OAAO,+BAA+B,CAAC;AACvC,OAAO,6BAA6B,CAAC;AAErC;;;;;;;;;;GAUG;AACH,qBACa,aAAc,SAAQ,UAAU;IACf,KAAK,SAA0B;IAC/B,OAAO,SACiB;IACE,UAAU,SAClD;IACwC,SAAS,UAAQ;IACf,WAAW,UAAQ;IAC/C,EAAE,EAAE,OAAO,CAAM;IAEpC,OAAO,CAAC,UAAU,CAAS;IAEpC,OAAO,CAAC,SAAS,CAGd;IAEH,OAAgB,MAAM,0BAmFpB;IAEO,iBAAiB;IASpB,aAAa;IAKnB,OAAO,CAAC,WAAW;IASV,MAAM;CAkChB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,iBAAiB,EAAE,aAAa,CAAC;KAClC;CACF"}
@@ -1,13 +1,31 @@
1
- import { LitElement as m, html as p, css as h } from "lit";
2
- import { property as s, customElement as g } from "lit/decorators.js";
3
- var d = Object.defineProperty, y = Object.getOwnPropertyDescriptor, r = (l, i, a, n) => {
4
- for (var t = n > 1 ? void 0 : n ? y(i, a) : i, c = l.length - 1, o; c >= 0; c--)
5
- (o = l[c]) && (t = (n ? o(i, a, t) : o(t)) || t);
6
- return n && t && d(i, a, t), t;
1
+ import { css as m, LitElement as d, html as p } from "lit";
2
+ import { property as a, state as y, customElement as h } from "lit/decorators.js";
3
+ import { styleMap as u } from "lit/directives/style-map.js";
4
+ import { AnimationController as g } from "../controllers/animation.controller.js";
5
+ import "../primitives/tc-icon.js";
6
+ import "../primitives/tc-text.js";
7
+ import "../primitives/tc-button.js";
8
+ import "../primitives/tc-container.js";
9
+ import "../primitives/tc-section.js";
10
+ var f = Object.defineProperty, v = Object.getOwnPropertyDescriptor, e = (i, n, o, s) => {
11
+ for (var r = s > 1 ? void 0 : s ? v(n, o) : n, c = i.length - 1, l; c >= 0; c--)
12
+ (l = i[c]) && (r = (s ? l(n, o, r) : l(r)) || r);
13
+ return s && r && f(n, o, r), r;
7
14
  };
8
- let e = class extends m {
15
+ let t = class extends d {
9
16
  constructor() {
10
- super(...arguments), this.title = "Something went wrong", this.message = "An unexpected error occurred. Please try again.", this.retryLabel = "Try Again", this.showRetry = !0;
17
+ super(...arguments), this.title = "Something went wrong", this.message = "An unexpected error occurred. Please try again.", this.retryLabel = "Try Again", this.showRetry = !0, this.autoAnimate = !0, this.sx = {}, this.isAnimated = !1, this.animation = new g(this, {
18
+ showDuration: 600,
19
+ hideDuration: 300
20
+ });
21
+ }
22
+ connectedCallback() {
23
+ super.connectedCallback(), this.autoAnimate && requestAnimationFrame(() => {
24
+ this.playAnimation();
25
+ });
26
+ }
27
+ async playAnimation() {
28
+ await this.animation.show(), this.isAnimated = !0;
11
29
  }
12
30
  handleRetry() {
13
31
  this.dispatchEvent(
@@ -18,14 +36,15 @@ let e = class extends m {
18
36
  );
19
37
  }
20
38
  render() {
39
+ const i = this.isAnimated ? "animated" : "";
21
40
  return p`
22
- <div part="screen" class="screen">
41
+ <div part="screen" class="screen" style=${u(this.sx)}>
23
42
  <tc-container>
24
43
  <div part="content" class="content">
25
- <div part="icon" class="icon-container">
26
- <tc-icon name="alert-circle" size="2rem"></tc-icon>
44
+ <div part="icon" class="icon-container ${i}">
45
+ <tc-icon name="alert-circle" .sx=${{ "--icon-size": "var(--size-icon-xl)" }}></tc-icon>
27
46
  </div>
28
- <tc-section gap="var(--space-sm)">
47
+ <tc-section .sx=${{ gap: "var(--space-sm)" }} class="text-content ${i}">
29
48
  <tc-text part="title" tag="h1" size="xl" weight="600" class="title">
30
49
  ${this.title}
31
50
  </tc-text>
@@ -34,7 +53,7 @@ let e = class extends m {
34
53
  </tc-text>
35
54
  </tc-section>
36
55
  ${this.showRetry ? p`
37
- <div part="action" class="action">
56
+ <div part="action" class="action ${i}">
38
57
  <tc-button variant="primary" @tc-click=${this.handleRetry}>
39
58
  ${this.retryLabel}
40
59
  </tc-button>
@@ -46,12 +65,13 @@ let e = class extends m {
46
65
  `;
47
66
  }
48
67
  };
49
- e.styles = h`
68
+ t.styles = m`
50
69
  :host {
51
70
  display: flex;
52
71
  align-items: center;
53
72
  justify-content: center;
54
73
  width: 100%;
74
+ height: 100%;
55
75
  min-height: inherit;
56
76
  }
57
77
 
@@ -60,6 +80,7 @@ e.styles = h`
60
80
  align-items: center;
61
81
  justify-content: center;
62
82
  width: 100%;
83
+ height: 100%;
63
84
  min-height: inherit;
64
85
  padding: var(--space-lg);
65
86
  box-sizing: border-box;
@@ -79,11 +100,19 @@ e.styles = h`
79
100
  display: flex;
80
101
  align-items: center;
81
102
  justify-content: center;
82
- width: 4rem;
83
- height: 4rem;
103
+ padding: var(--space-md);
84
104
  background: var(--error-bg);
85
105
  border-radius: var(--radius-full);
86
106
  color: var(--error-base);
107
+ transform: scale(0);
108
+ opacity: 0;
109
+ transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
110
+ opacity 0.3s ease;
111
+ }
112
+
113
+ .icon-container.animated {
114
+ transform: scale(1);
115
+ opacity: 1;
87
116
  }
88
117
 
89
118
  .title {
@@ -94,26 +123,56 @@ e.styles = h`
94
123
  color: var(--ink-medium);
95
124
  }
96
125
 
126
+ .text-content {
127
+ opacity: 0;
128
+ transform: translateY(var(--offset-slide-up-md));
129
+ transition: opacity 0.4s ease, transform 0.4s ease;
130
+ transition-delay: 0.4s;
131
+ }
132
+
133
+ .text-content.animated {
134
+ opacity: 1;
135
+ transform: translateY(0);
136
+ }
137
+
97
138
  .action {
98
139
  width: 100%;
99
140
  margin-top: var(--space-md);
141
+ opacity: 0;
142
+ transform: translateY(var(--offset-slide-up-md));
143
+ transition: opacity 0.4s ease, transform 0.4s ease;
144
+ transition-delay: 0.6s;
145
+ }
146
+
147
+ .action.animated {
148
+ opacity: 1;
149
+ transform: translateY(0);
100
150
  }
101
151
  `;
102
- r([
103
- s({ type: String })
104
- ], e.prototype, "title", 2);
105
- r([
106
- s({ type: String })
107
- ], e.prototype, "message", 2);
108
- r([
109
- s({ type: String, attribute: "retry-label" })
110
- ], e.prototype, "retryLabel", 2);
111
- r([
112
- s({ type: Boolean, attribute: "show-retry" })
113
- ], e.prototype, "showRetry", 2);
114
- e = r([
115
- g("tc-error-screen")
116
- ], e);
152
+ e([
153
+ a({ type: String })
154
+ ], t.prototype, "title", 2);
155
+ e([
156
+ a({ type: String })
157
+ ], t.prototype, "message", 2);
158
+ e([
159
+ a({ type: String, attribute: "retry-label" })
160
+ ], t.prototype, "retryLabel", 2);
161
+ e([
162
+ a({ type: Boolean, attribute: "show-retry" })
163
+ ], t.prototype, "showRetry", 2);
164
+ e([
165
+ a({ type: Boolean, attribute: "auto-animate" })
166
+ ], t.prototype, "autoAnimate", 2);
167
+ e([
168
+ a({ type: Object })
169
+ ], t.prototype, "sx", 2);
170
+ e([
171
+ y()
172
+ ], t.prototype, "isAnimated", 2);
173
+ t = e([
174
+ h("tc-error-screen")
175
+ ], t);
117
176
  export {
118
- e as TcErrorScreen
177
+ t as TcErrorScreen
119
178
  };
@@ -1,4 +1,5 @@
1
1
  import { LitElement } from 'lit';
2
+ import { SxProps } from '../types.js';
2
3
  /**
3
4
  * A full-screen loading state with spinner and optional message.
4
5
  *
@@ -9,7 +10,8 @@ import { LitElement } from 'lit';
9
10
  */
10
11
  export declare class TcLoadingScreen extends LitElement {
11
12
  message: string;
12
- spinnerSize: string;
13
+ spinnerSize: 'sm' | 'md' | 'lg' | 'auto';
14
+ sx: SxProps;
13
15
  private loading;
14
16
  static styles: import('lit').CSSResult;
15
17
  connectedCallback(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"tc-loading-screen.d.ts","sourceRoot":"","sources":["../../src/screens/tc-loading-screen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,MAAM,KAAK,CAAC;AAG5C,OAAO,6BAA6B,CAAC;AACrC,OAAO,0BAA0B,CAAC;AAClC,OAAO,+BAA+B,CAAC;AAEvC;;;;;;;GAOG;AACH,qBACa,eAAgB,SAAQ,UAAU;IACjB,OAAO,SAAM;IACc,WAAW,SAAU;IAE5E,OAAO,CAAC,OAAO,CAA+B;IAE9C,OAAgB,MAAM,0BAgCpB;IAEO,iBAAiB;IAKjB,MAAM;CAoBhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,mBAAmB,EAAE,eAAe,CAAC;KACtC;CACF"}
1
+ {"version":3,"file":"tc-loading-screen.d.ts","sourceRoot":"","sources":["../../src/screens/tc-loading-screen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,MAAM,KAAK,CAAC;AAI5C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,6BAA6B,CAAC;AACrC,OAAO,0BAA0B,CAAC;AAClC,OAAO,+BAA+B,CAAC;AAEvC;;;;;;;GAOG;AACH,qBACa,eAAgB,SAAQ,UAAU;IACjB,OAAO,SAAM;IACc,WAAW,EAC9D,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,MAAM,CAAQ;IACU,EAAE,EAAE,OAAO,CAAM;IAE7C,OAAO,CAAC,OAAO,CAA+B;IAE9C,OAAgB,MAAM,0BAkCpB;IAEO,iBAAiB;IAKjB,MAAM;CAoBhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,mBAAmB,EAAE,eAAe,CAAC;KACtC;CACF"}
@@ -1,25 +1,29 @@
1
- import { LitElement as m, html as p, css as g } from "lit";
2
- import { property as l, customElement as d } from "lit/decorators.js";
3
- import { LoadingController as h } from "../controllers/loading.controller.js";
4
- var f = Object.defineProperty, u = Object.getOwnPropertyDescriptor, c = (o, r, s, n) => {
5
- for (var e = n > 1 ? void 0 : n ? u(r, s) : r, i = o.length - 1, a; i >= 0; i--)
6
- (a = o[i]) && (e = (n ? a(r, s, e) : a(e)) || e);
7
- return n && e && f(r, s, e), e;
1
+ import { css as m, LitElement as g, html as l } from "lit";
2
+ import { property as c, customElement as h } from "lit/decorators.js";
3
+ import { styleMap as d } from "lit/directives/style-map.js";
4
+ import { LoadingController as y } from "../controllers/loading.controller.js";
5
+ import "../primitives/tc-spinner.js";
6
+ import "../primitives/tc-text.js";
7
+ import "../primitives/tc-container.js";
8
+ var f = Object.defineProperty, x = Object.getOwnPropertyDescriptor, s = (p, r, n, i) => {
9
+ for (var e = i > 1 ? void 0 : i ? x(r, n) : r, a = p.length - 1, o; a >= 0; a--)
10
+ (o = p[a]) && (e = (i ? o(r, n, e) : o(e)) || e);
11
+ return i && e && f(r, n, e), e;
8
12
  };
9
- let t = class extends m {
13
+ let t = class extends g {
10
14
  constructor() {
11
- super(...arguments), this.message = "", this.spinnerSize = "3rem", this.loading = new h(this);
15
+ super(...arguments), this.message = "", this.spinnerSize = "md", this.sx = {}, this.loading = new y(this);
12
16
  }
13
17
  connectedCallback() {
14
18
  super.connectedCallback(), this.loading.start();
15
19
  }
16
20
  render() {
17
- return p`
18
- <div part="screen" class="screen">
21
+ return l`
22
+ <div part="screen" class="screen" style=${d(this.sx)}>
19
23
  <tc-container>
20
24
  <div part="content" class="content">
21
25
  <tc-spinner part="spinner" size=${this.spinnerSize}></tc-spinner>
22
- ${this.message ? p`
26
+ ${this.message ? l`
23
27
  <tc-text part="message" class="message" size="base" color="tertiary">
24
28
  ${this.message}
25
29
  </tc-text>
@@ -30,12 +34,13 @@ let t = class extends m {
30
34
  `;
31
35
  }
32
36
  };
33
- t.styles = g`
37
+ t.styles = m`
34
38
  :host {
35
39
  display: flex;
36
40
  align-items: center;
37
41
  justify-content: center;
38
42
  width: 100%;
43
+ height: 100%;
39
44
  min-height: inherit;
40
45
  }
41
46
 
@@ -44,6 +49,7 @@ t.styles = g`
44
49
  align-items: center;
45
50
  justify-content: center;
46
51
  width: 100%;
52
+ height: 100%;
47
53
  min-height: inherit;
48
54
  padding: var(--space-lg);
49
55
  box-sizing: border-box;
@@ -63,14 +69,17 @@ t.styles = g`
63
69
  max-width: 20rem;
64
70
  }
65
71
  `;
66
- c([
67
- l({ type: String })
72
+ s([
73
+ c({ type: String })
68
74
  ], t.prototype, "message", 2);
69
- c([
70
- l({ type: String, attribute: "spinner-size" })
75
+ s([
76
+ c({ type: String, attribute: "spinner-size" })
71
77
  ], t.prototype, "spinnerSize", 2);
72
- t = c([
73
- d("tc-loading-screen")
78
+ s([
79
+ c({ type: Object })
80
+ ], t.prototype, "sx", 2);
81
+ t = s([
82
+ h("tc-loading-screen")
74
83
  ], t);
75
84
  export {
76
85
  t as TcLoadingScreen
@@ -1,4 +1,5 @@
1
1
  import { LitElement } from 'lit';
2
+ import { SxProps } from '../types.js';
2
3
  /**
3
4
  * A full-screen success state with animated checkmark and message.
4
5
  *
@@ -15,6 +16,7 @@ export declare class TcSuccessScreen extends LitElement {
15
16
  message: string;
16
17
  actionLabel: string;
17
18
  autoAnimate: boolean;
19
+ sx: SxProps;
18
20
  private isAnimated;
19
21
  private animation;
20
22
  static styles: import('lit').CSSResult;
@@ -1 +1 @@
1
- {"version":3,"file":"tc-success-screen.d.ts","sourceRoot":"","sources":["../../src/screens/tc-success-screen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,MAAM,KAAK,CAAC;AAG5C,OAAO,0BAA0B,CAAC;AAClC,OAAO,0BAA0B,CAAC;AAClC,OAAO,4BAA4B,CAAC;AACpC,OAAO,+BAA+B,CAAC;AACvC,OAAO,6BAA6B,CAAC;AAErC;;;;;;;;;;GAUG;AACH,qBACa,eAAgB,SAAQ,UAAU;IACjB,KAAK,SAAc;IACnB,OAAO,SACS;IACW,WAAW,SAAM;IAChB,WAAW,UAAQ;IAElE,OAAO,CAAC,UAAU,CAAS;IAEpC,OAAO,CAAC,SAAS,CAGd;IAEH,OAAgB,MAAM,0BAmGpB;IAEO,iBAAiB;IASpB,aAAa;IAKnB,OAAO,CAAC,YAAY;IASX,MAAM;CA4ChB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,mBAAmB,EAAE,eAAe,CAAC;KACtC;CACF"}
1
+ {"version":3,"file":"tc-success-screen.d.ts","sourceRoot":"","sources":["../../src/screens/tc-success-screen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,MAAM,KAAK,CAAC;AAI5C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,0BAA0B,CAAC;AAClC,OAAO,0BAA0B,CAAC;AAClC,OAAO,4BAA4B,CAAC;AACpC,OAAO,+BAA+B,CAAC;AACvC,OAAO,6BAA6B,CAAC;AAErC;;;;;;;;;;GAUG;AACH,qBACa,eAAgB,SAAQ,UAAU;IACjB,KAAK,SAAc;IACnB,OAAO,SACS;IACW,WAAW,SAAM;IAChB,WAAW,UAAQ;IAC/C,EAAE,EAAE,OAAO,CAAM;IAEpC,OAAO,CAAC,UAAU,CAAS;IAEpC,OAAO,CAAC,SAAS,CAGd;IAEH,OAAgB,MAAM,0BAoGpB;IAEO,iBAAiB;IASpB,aAAa;IAKnB,OAAO,CAAC,YAAY;IASX,MAAM;CA4ChB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,mBAAmB,EAAE,eAAe,CAAC;KACtC;CACF"}
@@ -1,14 +1,20 @@
1
- import { LitElement as p, html as m, css as d } from "lit";
2
- import { property as r, state as h, customElement as u } from "lit/decorators.js";
3
- import { AnimationController as y } from "../controllers/animation.controller.js";
4
- var f = Object.defineProperty, g = Object.getOwnPropertyDescriptor, i = (a, s, o, n) => {
5
- for (var e = n > 1 ? void 0 : n ? g(s, o) : s, c = a.length - 1, l; c >= 0; c--)
6
- (l = a[c]) && (e = (n ? l(s, o, e) : l(e)) || e);
7
- return n && e && f(s, o, e), e;
1
+ import { css as p, LitElement as d, html as m } from "lit";
2
+ import { property as s, state as h, customElement as u } from "lit/decorators.js";
3
+ import { styleMap as y } from "lit/directives/style-map.js";
4
+ import { AnimationController as f } from "../controllers/animation.controller.js";
5
+ import "../primitives/tc-icon.js";
6
+ import "../primitives/tc-text.js";
7
+ import "../primitives/tc-button.js";
8
+ import "../primitives/tc-container.js";
9
+ import "../primitives/tc-section.js";
10
+ var g = Object.defineProperty, v = Object.getOwnPropertyDescriptor, a = (i, n, o, r) => {
11
+ for (var e = r > 1 ? void 0 : r ? v(n, o) : n, c = i.length - 1, l; c >= 0; c--)
12
+ (l = i[c]) && (e = (r ? l(n, o, e) : l(e)) || e);
13
+ return r && e && g(n, o, e), e;
8
14
  };
9
- let t = class extends p {
15
+ let t = class extends d {
10
16
  constructor() {
11
- super(...arguments), this.title = "Success!", this.message = "Your action was completed successfully.", this.actionLabel = "", this.autoAnimate = !0, this.isAnimated = !1, this.animation = new y(this, {
17
+ super(...arguments), this.title = "Success!", this.message = "Your action was completed successfully.", this.actionLabel = "", this.autoAnimate = !0, this.sx = {}, this.isAnimated = !1, this.animation = new f(this, {
12
18
  showDuration: 600,
13
19
  hideDuration: 300
14
20
  });
@@ -30,12 +36,12 @@ let t = class extends p {
30
36
  );
31
37
  }
32
38
  render() {
33
- const a = this.isAnimated ? "animated" : "";
39
+ const i = this.isAnimated ? "animated" : "";
34
40
  return m`
35
- <div part="screen" class="screen">
41
+ <div part="screen" class="screen" style=${y(this.sx)}>
36
42
  <tc-container>
37
43
  <div part="content" class="content">
38
- <div part="icon" class="icon-container ${a}">
44
+ <div part="icon" class="icon-container ${i}">
39
45
  <svg
40
46
  class="checkmark"
41
47
  viewBox="0 0 24 24"
@@ -48,7 +54,7 @@ let t = class extends p {
48
54
  <polyline points="20 6 9 17 4 12"></polyline>
49
55
  </svg>
50
56
  </div>
51
- <tc-section gap="var(--space-sm)" class="text-content ${a}">
57
+ <tc-section .sx=${{ gap: "var(--space-sm)" }} class="text-content ${i}">
52
58
  <tc-text part="title" tag="h1" size="xl" weight="600" class="title">
53
59
  ${this.title}
54
60
  </tc-text>
@@ -57,7 +63,7 @@ let t = class extends p {
57
63
  </tc-text>
58
64
  </tc-section>
59
65
  ${this.actionLabel ? m`
60
- <div part="action" class="action ${a}">
66
+ <div part="action" class="action ${i}">
61
67
  <tc-button variant="success" @tc-click=${this.handleAction}>
62
68
  ${this.actionLabel}
63
69
  </tc-button>
@@ -69,12 +75,13 @@ let t = class extends p {
69
75
  `;
70
76
  }
71
77
  };
72
- t.styles = d`
78
+ t.styles = p`
73
79
  :host {
74
80
  display: flex;
75
81
  align-items: center;
76
82
  justify-content: center;
77
83
  width: 100%;
84
+ height: 100%;
78
85
  min-height: inherit;
79
86
  }
80
87
 
@@ -83,6 +90,7 @@ t.styles = d`
83
90
  align-items: center;
84
91
  justify-content: center;
85
92
  width: 100%;
93
+ height: 100%;
86
94
  min-height: inherit;
87
95
  padding: var(--space-lg);
88
96
  box-sizing: border-box;
@@ -102,8 +110,7 @@ t.styles = d`
102
110
  display: flex;
103
111
  align-items: center;
104
112
  justify-content: center;
105
- width: 5rem;
106
- height: 5rem;
113
+ padding: var(--space-md);
107
114
  background: var(--alpha-success10);
108
115
  border-radius: var(--radius-full);
109
116
  color: var(--accent-success);
@@ -119,8 +126,8 @@ t.styles = d`
119
126
  }
120
127
 
121
128
  .checkmark {
122
- width: 2.5rem;
123
- height: 2.5rem;
129
+ width: var(--size-icon-xl);
130
+ height: var(--size-icon-xl);
124
131
  stroke-dasharray: 50;
125
132
  stroke-dashoffset: 50;
126
133
  }
@@ -145,7 +152,7 @@ t.styles = d`
145
152
 
146
153
  .text-content {
147
154
  opacity: 0;
148
- transform: translateY(10px);
155
+ transform: translateY(var(--offset-slide-up-md));
149
156
  transition: opacity 0.4s ease, transform 0.4s ease;
150
157
  transition-delay: 0.4s;
151
158
  }
@@ -159,7 +166,7 @@ t.styles = d`
159
166
  width: 100%;
160
167
  margin-top: var(--space-md);
161
168
  opacity: 0;
162
- transform: translateY(10px);
169
+ transform: translateY(var(--offset-slide-up-md));
163
170
  transition: opacity 0.4s ease, transform 0.4s ease;
164
171
  transition-delay: 0.6s;
165
172
  }
@@ -169,22 +176,25 @@ t.styles = d`
169
176
  transform: translateY(0);
170
177
  }
171
178
  `;
172
- i([
173
- r({ type: String })
179
+ a([
180
+ s({ type: String })
174
181
  ], t.prototype, "title", 2);
175
- i([
176
- r({ type: String })
182
+ a([
183
+ s({ type: String })
177
184
  ], t.prototype, "message", 2);
178
- i([
179
- r({ type: String, attribute: "action-label" })
185
+ a([
186
+ s({ type: String, attribute: "action-label" })
180
187
  ], t.prototype, "actionLabel", 2);
181
- i([
182
- r({ type: Boolean, attribute: "auto-animate" })
188
+ a([
189
+ s({ type: Boolean, attribute: "auto-animate" })
183
190
  ], t.prototype, "autoAnimate", 2);
184
- i([
191
+ a([
192
+ s({ type: Object })
193
+ ], t.prototype, "sx", 2);
194
+ a([
185
195
  h()
186
196
  ], t.prototype, "isAnimated", 2);
187
- t = i([
197
+ t = a([
188
198
  u("tc-success-screen")
189
199
  ], t);
190
200
  export {
@@ -0,0 +1,34 @@
1
+ /**
2
+ * 공통 타입 정의
3
+ * @packageDocumentation
4
+ */
5
+ /**
6
+ * 인라인 스타일 객체 타입
7
+ * Lit의 styleMap과 호환
8
+ *
9
+ * @example
10
+ * ```typescript
11
+ * <tc-button .sx=${{ padding: '1rem', fontSize: '1.25rem' }}>
12
+ * Large Button
13
+ * </tc-button>
14
+ * ```
15
+ */
16
+ export type SxProps = Record<string, string | number>;
17
+ /**
18
+ * 공통 크기 옵션
19
+ */
20
+ export type Size = 'sm' | 'md' | 'lg';
21
+ export type SizeWithAuto = Size | 'auto';
22
+ /**
23
+ * 시맨틱 변형 타입
24
+ */
25
+ export type SemanticVariant = 'info' | 'success' | 'warning' | 'error';
26
+ /**
27
+ * 버튼 변형 타입
28
+ */
29
+ export type ButtonVariant = 'primary' | 'secondary' | 'success';
30
+ /**
31
+ * 칩 변형 타입
32
+ */
33
+ export type ChipVariant = 'default' | 'success' | 'error' | 'info';
34
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;GAUG;AACH,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;AAEtD;;GAEG;AACH,MAAM,MAAM,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AACtC,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,MAAM,CAAC;AAEzC;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAEvE;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,CAAC;AAEhE;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC"}