@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,23 +1,23 @@
1
- import { LitElement as d, html as f, css as m } from "lit";
2
- import { property as l, customElement as c } from "lit/decorators.js";
1
+ import { css as l, LitElement as f, html as d } from "lit";
2
+ import { property as m, customElement as c } from "lit/decorators.js";
3
3
  import { styleMap as v } from "lit/directives/style-map.js";
4
- var x = Object.defineProperty, y = Object.getOwnPropertyDescriptor, a = (i, s, p, r) => {
5
- for (var t = r > 1 ? void 0 : r ? y(s, p) : s, n = i.length - 1, o; n >= 0; n--)
6
- (o = i[n]) && (t = (r ? o(s, p, t) : o(t)) || t);
7
- return r && t && x(s, p, t), t;
4
+ var x = Object.defineProperty, u = Object.getOwnPropertyDescriptor, p = (e, s, a, i) => {
5
+ for (var t = i > 1 ? void 0 : i ? u(s, a) : s, n = e.length - 1, o; n >= 0; n--)
6
+ (o = e[n]) && (t = (i ? o(s, a, t) : o(t)) || t);
7
+ return i && t && x(s, a, t), t;
8
8
  };
9
- let e = class extends d {
9
+ let r = class extends f {
10
10
  constructor() {
11
- super(...arguments), this.gap = "var(--space-md)", this.padding = "var(--space-md)", this.sx = {};
11
+ super(...arguments), this.sx = {};
12
12
  }
13
13
  render() {
14
- const i = {
15
- "--item-padding": this.padding,
16
- "--item-gap": this.gap,
14
+ const e = {
15
+ "--item-padding": "var(--space-md)",
16
+ "--item-gap": "var(--space-md)",
17
17
  ...this.sx
18
18
  };
19
- return f`
20
- <div part="item" class="item" style=${v(i)}>
19
+ return d`
20
+ <div part="item" class="item" style=${v(e)}>
21
21
  <div part="prefix" class="prefix">
22
22
  <slot name="prefix"></slot>
23
23
  </div>
@@ -31,10 +31,11 @@ let e = class extends d {
31
31
  `;
32
32
  }
33
33
  };
34
- e.styles = m`
34
+ r.styles = l`
35
35
  :host {
36
36
  display: block;
37
37
  width: 100%;
38
+ min-width: 0;
38
39
  }
39
40
 
40
41
  .item {
@@ -76,18 +77,12 @@ e.styles = m`
76
77
  display: none;
77
78
  }
78
79
  `;
79
- a([
80
- l({ type: String })
81
- ], e.prototype, "gap", 2);
82
- a([
83
- l({ type: String })
84
- ], e.prototype, "padding", 2);
85
- a([
86
- l({ type: Object })
87
- ], e.prototype, "sx", 2);
88
- e = a([
80
+ p([
81
+ m({ type: Object })
82
+ ], r.prototype, "sx", 2);
83
+ r = p([
89
84
  c("tc-item")
90
- ], e);
85
+ ], r);
91
86
  export {
92
- e as TcItem
87
+ r as TcItem
93
88
  };
@@ -1,4 +1,5 @@
1
1
  import { LitElement } from 'lit';
2
+ import { SxProps } from '../types.js';
2
3
  /**
3
4
  * OTP (One-Time Password) input component with individual cells and progress indicator.
4
5
  * Uses shake animation from design-tokens.
@@ -15,6 +16,7 @@ export declare class TcOtpInput extends LitElement {
15
16
  error: boolean;
16
17
  disabled: boolean;
17
18
  showProgress: boolean;
19
+ sx: SxProps;
18
20
  private values;
19
21
  static styles: import('lit').CSSResult[];
20
22
  connectedCallback(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"tc-otp-input.d.ts","sourceRoot":"","sources":["../../src/primitives/tc-otp-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,MAAM,KAAK,CAAC;AAI5C;;;;;;;;;;GAUG;AACH,qBACa,UAAW,SAAQ,UAAU;IACZ,MAAM,SAAK;IACV,KAAK,UAAS;IACd,QAAQ,UAAS;IACW,YAAY,UAAQ;IAEpE,OAAO,CAAC,MAAM,CAAgB;IAEvC,OAAgB,MAAM,4BAyFpB;IAEO,iBAAiB;IAKjB,MAAM;IAoDf,OAAO,CAAC,WAAW;IAgCnB,OAAO,CAAC,aAAa;IAerB,OAAO,CAAC,WAAW;IAoCnB,OAAO,CAAC,SAAS;IASjB,kDAAkD;IAClD,KAAK;IAML,uBAAuB;IACvB,KAAK;IAKL,gCAAgC;IAChC,QAAQ,IAAI,MAAM;CAGnB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,UAAU,CAAC;KAC5B;CACF"}
1
+ {"version":3,"file":"tc-otp-input.d.ts","sourceRoot":"","sources":["../../src/primitives/tc-otp-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,MAAM,KAAK,CAAC;AAI5C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C;;;;;;;;;;GAUG;AACH,qBACa,UAAW,SAAQ,UAAU;IACZ,MAAM,SAAK;IACV,KAAK,UAAS;IACd,QAAQ,UAAS;IACW,YAAY,UAAQ;IACjD,EAAE,EAAE,OAAO,CAAM;IAEpC,OAAO,CAAC,MAAM,CAAgB;IAEvC,OAAgB,MAAM,4BA2FpB;IAEO,iBAAiB;IAKjB,MAAM;IAoDf,OAAO,CAAC,WAAW;IAgCnB,OAAO,CAAC,aAAa;IAerB,OAAO,CAAC,WAAW;IAoCnB,OAAO,CAAC,SAAS;IASjB,kDAAkD;IAClD,KAAK;IAML,uBAAuB;IACvB,KAAK;IAKL,gCAAgC;IAChC,QAAQ,IAAI,MAAM;CAGnB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,UAAU,CAAC;KAC5B;CACF"}
@@ -1,14 +1,15 @@
1
- import { LitElement as u, html as h, css as p } from "lit";
1
+ import { css as u, LitElement as p, html as h } from "lit";
2
2
  import { property as c, state as d, customElement as v } from "lit/decorators.js";
3
- import { sharedStyles as m } from "../styles/shared.js";
4
- var g = Object.defineProperty, f = Object.getOwnPropertyDescriptor, n = (t, e, s, r) => {
5
- for (var a = r > 1 ? void 0 : r ? f(e, s) : e, o = t.length - 1, l; o >= 0; o--)
3
+ import { styleMap as m } from "lit/directives/style-map.js";
4
+ import { sharedStyles as g } from "../styles/shared.js";
5
+ var f = Object.defineProperty, b = Object.getOwnPropertyDescriptor, n = (t, e, s, r) => {
6
+ for (var a = r > 1 ? void 0 : r ? b(e, s) : e, o = t.length - 1, l; o >= 0; o--)
6
7
  (l = t[o]) && (a = (r ? l(e, s, a) : l(a)) || a);
7
- return r && a && g(e, s, a), a;
8
+ return r && a && f(e, s, a), a;
8
9
  };
9
- let i = class extends u {
10
+ let i = class extends p {
10
11
  constructor() {
11
- super(...arguments), this.length = 6, this.error = !1, this.disabled = !1, this.showProgress = !0, this.values = [];
12
+ super(...arguments), this.length = 6, this.error = !1, this.disabled = !1, this.showProgress = !0, this.sx = {}, this.values = [];
12
13
  }
13
14
  connectedCallback() {
14
15
  super.connectedCallback(), this.values = new Array(this.length).fill("");
@@ -16,7 +17,7 @@ let i = class extends u {
16
17
  render() {
17
18
  const e = this.values.filter((s) => s.length > 0).length / this.length * 100;
18
19
  return h`
19
- <div class="container">
20
+ <div class="container" style=${m(this.sx)}>
20
21
  <div part="cells" class="cells" role="group" aria-label="OTP input">
21
22
  ${this.values.map((s, r) => {
22
23
  const o = [
@@ -118,10 +119,12 @@ let i = class extends u {
118
119
  }
119
120
  };
120
121
  i.styles = [
121
- m,
122
- p`
122
+ g,
123
+ u`
123
124
  :host {
124
125
  display: block;
126
+ width: 100%;
127
+ min-width: 0;
125
128
  }
126
129
 
127
130
  .container {
@@ -177,7 +180,7 @@ i.styles = [
177
180
  /* Progress bar */
178
181
  .progress {
179
182
  width: 100%;
180
- max-width: 12rem;
183
+ max-width: var(--size-progress-bar-width);
181
184
  height: var(--size-border-width-heavy);
182
185
  background: var(--paper-warm);
183
186
  border-radius: var(--radius-full);
@@ -219,6 +222,9 @@ n([
219
222
  n([
220
223
  c({ type: Boolean, attribute: "show-progress" })
221
224
  ], i.prototype, "showProgress", 2);
225
+ n([
226
+ c({ type: Object })
227
+ ], i.prototype, "sx", 2);
222
228
  n([
223
229
  d()
224
230
  ], i.prototype, "values", 2);
@@ -1,4 +1,5 @@
1
1
  import { LitElement } from 'lit';
2
+ import { SxProps } from '../types.js';
2
3
  /**
3
4
  * Decorative floating blob background for pages.
4
5
  * Uses CSS custom properties for color variants and inkFloat/inkDrift animations from design-tokens.
@@ -8,6 +9,7 @@ import { LitElement } from 'lit';
8
9
  */
9
10
  export declare class TcPageDecoration extends LitElement {
10
11
  variant: 'primary' | 'success' | 'error';
12
+ sx: SxProps;
11
13
  static styles: import('lit').CSSResult[];
12
14
  render(): import('lit').TemplateResult<1>;
13
15
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tc-page-decoration.d.ts","sourceRoot":"","sources":["../../src/primitives/tc-page-decoration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,MAAM,KAAK,CAAC;AAI5C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C;;;;;;GAMG;AACH,qBACa,gBAAiB,SAAQ,UAAU;IAClB,OAAO,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,CACxD;IACgB,EAAE,EAAE,OAAO,CAAM;IAE7C,OAAgB,MAAM,4BA8FpB;IAEO,MAAM;CAShB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,oBAAoB,EAAE,gBAAgB,CAAC;KACxC;CACF"}
@@ -1,18 +1,19 @@
1
- import { LitElement as c, html as b, css as d } from "lit";
2
- import { property as m, customElement as p } from "lit/decorators.js";
3
- import { sharedStyles as v } from "../styles/shared.js";
4
- var u = Object.defineProperty, f = Object.getOwnPropertyDescriptor, l = (s, e, o, t) => {
5
- for (var r = t > 1 ? void 0 : t ? f(e, o) : e, i = s.length - 1, n; i >= 0; i--)
6
- (n = s[i]) && (r = (t ? n(e, o, r) : n(r)) || r);
7
- return t && r && u(e, o, r), r;
1
+ import { css as c, LitElement as d, html as m } from "lit";
2
+ import { property as b, customElement as p } from "lit/decorators.js";
3
+ import { styleMap as v } from "lit/directives/style-map.js";
4
+ import { sharedStyles as u } from "../styles/shared.js";
5
+ var f = Object.defineProperty, h = Object.getOwnPropertyDescriptor, n = (l, t, o, a) => {
6
+ for (var r = a > 1 ? void 0 : a ? h(t, o) : t, i = l.length - 1, s; i >= 0; i--)
7
+ (s = l[i]) && (r = (a ? s(t, o, r) : s(r)) || r);
8
+ return a && r && f(t, o, r), r;
8
9
  };
9
- let a = class extends c {
10
+ let e = class extends d {
10
11
  constructor() {
11
- super(...arguments), this.variant = "primary";
12
+ super(...arguments), this.variant = "primary", this.sx = {};
12
13
  }
13
14
  render() {
14
- return b`
15
- <div part="decoration" class="decoration">
15
+ return m`
16
+ <div part="decoration" class="decoration" style=${v(this.sx)}>
16
17
  <div part="blob" class="blob blob-1"></div>
17
18
  <div part="blob" class="blob blob-2"></div>
18
19
  <div part="blob" class="blob blob-3"></div>
@@ -20,14 +21,14 @@ let a = class extends c {
20
21
  `;
21
22
  }
22
23
  };
23
- a.styles = [
24
- v,
25
- d`
24
+ e.styles = [
25
+ u,
26
+ c`
26
27
  :host {
27
- position: fixed;
28
+ position: absolute;
28
29
  inset: 0;
29
- pointer-events: none;
30
30
  z-index: 0;
31
+ pointer-events: none;
31
32
  overflow: hidden;
32
33
  }
33
34
 
@@ -38,7 +39,7 @@ a.styles = [
38
39
 
39
40
  .blob {
40
41
  position: absolute;
41
- border-radius: 50%;
42
+ border-radius: var(--radius-full);
42
43
  opacity: 0.35;
43
44
  filter: blur(0.0625rem);
44
45
  }
@@ -87,8 +88,8 @@ a.styles = [
87
88
  }
88
89
 
89
90
  .blob-3 {
90
- width: 20rem;
91
- height: 20rem;
91
+ width: var(--size-decoration-blob);
92
+ height: var(--size-decoration-blob);
92
93
  bottom: -8rem;
93
94
  left: 20%;
94
95
  animation: decorFloat 14s ease-in-out infinite 2s;
@@ -115,12 +116,15 @@ a.styles = [
115
116
  }
116
117
  `
117
118
  ];
118
- l([
119
- m({ type: String })
120
- ], a.prototype, "variant", 2);
121
- a = l([
119
+ n([
120
+ b({ type: String })
121
+ ], e.prototype, "variant", 2);
122
+ n([
123
+ b({ type: Object })
124
+ ], e.prototype, "sx", 2);
125
+ e = n([
122
126
  p("tc-page-decoration")
123
- ], a);
127
+ ], e);
124
128
  export {
125
- a as TcPageDecoration
129
+ e as TcPageDecoration
126
130
  };
@@ -1,4 +1,5 @@
1
1
  import { LitElement } from 'lit';
2
+ import { SxProps } from '../types.js';
2
3
  /**
3
4
  * A section container with flex column layout.
4
5
  *
@@ -6,8 +7,7 @@ import { LitElement } from 'lit';
6
7
  * @csspart section - The section element
7
8
  */
8
9
  export declare class TcSection extends LitElement {
9
- gap: string;
10
- sx: Record<string, string | number>;
10
+ sx: SxProps;
11
11
  static styles: import('lit').CSSResult;
12
12
  render(): import('lit').TemplateResult<1>;
13
13
  }
@@ -1 +1 @@
1
- {"version":3,"file":"tc-section.d.ts","sourceRoot":"","sources":["../../src/primitives/tc-section.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,MAAM,KAAK,CAAC;AAI5C;;;;;GAKG;AACH,qBACa,SAAU,SAAQ,UAAU;IACX,GAAG,SAAqB;IACxB,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAM;IAErE,OAAgB,MAAM,0BAWpB;IAEO,MAAM;CAYhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,SAAS,CAAC;KACzB;CACF"}
1
+ {"version":3,"file":"tc-section.d.ts","sourceRoot":"","sources":["../../src/primitives/tc-section.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,MAAM,KAAK,CAAC;AAG5C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C;;;;;GAKG;AACH,qBACa,SAAU,SAAQ,UAAU;IACX,EAAE,EAAE,OAAO,CAAM;IAE7C,OAAgB,MAAM,0BAapB;IAEO,MAAM;CAYhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,SAAS,CAAC;KACzB;CACF"}
@@ -1,48 +1,47 @@
1
- import { LitElement as a, html as m, css as y } from "lit";
2
- import { property as n, customElement as f } from "lit/decorators.js";
3
- import { styleMap as h } from "lit/directives/style-map.js";
4
- var u = Object.defineProperty, d = Object.getOwnPropertyDescriptor, l = (s, r, p, o) => {
5
- for (var t = o > 1 ? void 0 : o ? d(r, p) : r, c = s.length - 1, i; c >= 0; c--)
6
- (i = s[c]) && (t = (o ? i(r, p, t) : i(t)) || t);
7
- return o && t && u(r, p, t), t;
1
+ import { css as p, LitElement as m, html as a } from "lit";
2
+ import { property as f, customElement as d } from "lit/decorators.js";
3
+ import { styleMap as x } from "lit/directives/style-map.js";
4
+ var y = Object.defineProperty, h = Object.getOwnPropertyDescriptor, n = (e, s, c, r) => {
5
+ for (var t = r > 1 ? void 0 : r ? h(s, c) : s, i = e.length - 1, l; i >= 0; i--)
6
+ (l = e[i]) && (t = (r ? l(s, c, t) : l(t)) || t);
7
+ return r && t && y(s, c, t), t;
8
8
  };
9
- let e = class extends a {
9
+ let o = class extends m {
10
10
  constructor() {
11
- super(...arguments), this.gap = "var(--space-md)", this.sx = {};
11
+ super(...arguments), this.sx = {};
12
12
  }
13
13
  render() {
14
- const s = {
15
- gap: this.gap,
14
+ const e = {
15
+ gap: "var(--space-md)",
16
16
  ...this.sx
17
17
  };
18
- return m`
19
- <section part="section" class="section" style=${h(s)}>
18
+ return a`
19
+ <section part="section" class="section" style=${x(e)}>
20
20
  <slot></slot>
21
21
  </section>
22
22
  `;
23
23
  }
24
24
  };
25
- e.styles = y`
25
+ o.styles = p`
26
26
  :host {
27
27
  display: block;
28
28
  width: 100%;
29
+ min-width: 0;
29
30
  }
30
31
 
31
32
  .section {
32
33
  display: flex;
33
34
  flex-direction: column;
34
35
  width: 100%;
36
+ box-sizing: border-box;
35
37
  }
36
38
  `;
37
- l([
38
- n({ type: String })
39
- ], e.prototype, "gap", 2);
40
- l([
41
- n({ type: Object })
42
- ], e.prototype, "sx", 2);
43
- e = l([
44
- f("tc-section")
45
- ], e);
39
+ n([
40
+ f({ type: Object })
41
+ ], o.prototype, "sx", 2);
42
+ o = n([
43
+ d("tc-section")
44
+ ], o);
46
45
  export {
47
- e as TcSection
46
+ o as TcSection
48
47
  };
@@ -1,4 +1,5 @@
1
1
  import { LitElement } from 'lit';
2
+ import { SxProps } from '../types.js';
2
3
  /**
3
4
  * A loading spinner with responsive sizing.
4
5
  * Uses spin animation from design-tokens.
@@ -8,7 +9,7 @@ import { LitElement } from 'lit';
8
9
  export declare class TcSpinner extends LitElement {
9
10
  private mobile;
10
11
  size: 'sm' | 'md' | 'lg' | 'auto';
11
- color: string;
12
+ sx: SxProps;
12
13
  static styles: import('lit').CSSResult[];
13
14
  render(): import('lit').TemplateResult<1>;
14
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"tc-spinner.d.ts","sourceRoot":"","sources":["../../src/primitives/tc-spinner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,MAAM,KAAK,CAAC;AAK5C;;;;;GAKG;AACH,qBACa,SAAU,SAAQ,UAAU;IACvC,OAAO,CAAC,MAAM,CAAwD;IAE1C,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAU;IAC3C,KAAK,SAA2B;IAE5D,OAAgB,MAAM,4BAgDpB;IAEO,MAAM;CAqBhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,SAAS,CAAC;KACzB;CACF"}
1
+ {"version":3,"file":"tc-spinner.d.ts","sourceRoot":"","sources":["../../src/primitives/tc-spinner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,MAAM,KAAK,CAAC;AAK5C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C;;;;;GAKG;AACH,qBACa,SAAU,SAAQ,UAAU;IACvC,OAAO,CAAC,MAAM,CAAwD;IAE1C,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAU;IAC3C,EAAE,EAAE,OAAO,CAAM;IAE7C,OAAgB,MAAM,4BAgDpB;IAEO,MAAM;CAwBhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,SAAS,CAAC;KACzB;CACF"}
@@ -1,32 +1,35 @@
1
- import { LitElement as d, html as h, css as m } from "lit";
2
- import { property as l, customElement as c } from "lit/decorators.js";
3
- import { MatchMediaController as v } from "../controllers/match-media.controller.js";
4
- import { sharedStyles as b } from "../styles/shared.js";
5
- var w = Object.defineProperty, z = Object.getOwnPropertyDescriptor, a = (e, s, n, t) => {
6
- for (var r = t > 1 ? void 0 : t ? z(s, n) : s, o = e.length - 1, p; o >= 0; o--)
7
- (p = e[o]) && (r = (t ? p(s, n, r) : p(r)) || r);
8
- return t && r && w(s, n, r), r;
1
+ import { css as d, LitElement as h, html as m } from "lit";
2
+ import { property as l, customElement as v } from "lit/decorators.js";
3
+ import { styleMap as b } from "lit/directives/style-map.js";
4
+ import { MatchMediaController as c } from "../controllers/match-media.controller.js";
5
+ import { sharedStyles as w } from "../styles/shared.js";
6
+ var z = Object.defineProperty, y = Object.getOwnPropertyDescriptor, p = (r, i, s, n) => {
7
+ for (var e = n > 1 ? void 0 : n ? y(i, s) : i, o = r.length - 1, a; o >= 0; o--)
8
+ (a = r[o]) && (e = (n ? a(i, s, e) : a(e)) || e);
9
+ return n && e && z(i, s, e), e;
9
10
  };
10
- let i = class extends d {
11
+ let t = class extends h {
11
12
  constructor() {
12
- super(...arguments), this.mobile = new v(this, "(max-width: 768px)"), this.size = "auto", this.color = "var(--accent-primary)";
13
+ super(...arguments), this.mobile = new c(this, "(max-width: 768px)"), this.size = "auto", this.sx = {};
13
14
  }
14
15
  render() {
15
- let e;
16
- return this.size === "auto" ? e = this.mobile.matches ? "spinner--auto-mobile" : "spinner--auto-desktop" : e = `spinner--${this.size}`, h`
16
+ let r;
17
+ this.size === "auto" ? r = this.mobile.matches ? "spinner--auto-mobile" : "spinner--auto-desktop" : r = `spinner--${this.size}`;
18
+ const s = { ...{ "--spinner-color": "var(--accent-primary)" }, ...this.sx };
19
+ return m`
17
20
  <div
18
21
  part="spinner"
19
- class="spinner ${e}"
20
- style="--spinner-color: ${this.color};"
22
+ class="spinner ${r}"
23
+ style=${b(s)}
21
24
  role="progressbar"
22
25
  aria-label="Loading"
23
26
  ></div>
24
27
  `;
25
28
  }
26
29
  };
27
- i.styles = [
28
- b,
29
- m`
30
+ t.styles = [
31
+ w,
32
+ d`
30
33
  :host {
31
34
  display: inline-flex;
32
35
  align-items: center;
@@ -35,7 +38,7 @@ i.styles = [
35
38
 
36
39
  .spinner {
37
40
  display: block;
38
- border-radius: 50%;
41
+ border-radius: var(--radius-full);
39
42
  border-style: solid;
40
43
  border-color: var(--paper-cream);
41
44
  border-top-color: var(--spinner-color);
@@ -67,21 +70,21 @@ i.styles = [
67
70
  }
68
71
 
69
72
  .spinner--auto-desktop {
70
- width: 5rem;
71
- height: 5rem;
73
+ width: var(--size-spinner-xl);
74
+ height: var(--size-spinner-xl);
72
75
  border-width: var(--size-border-width-bold);
73
76
  }
74
77
  `
75
78
  ];
76
- a([
79
+ p([
77
80
  l({ type: String })
78
- ], i.prototype, "size", 2);
79
- a([
80
- l({ type: String })
81
- ], i.prototype, "color", 2);
82
- i = a([
83
- c("tc-spinner")
84
- ], i);
81
+ ], t.prototype, "size", 2);
82
+ p([
83
+ l({ type: Object })
84
+ ], t.prototype, "sx", 2);
85
+ t = p([
86
+ v("tc-spinner")
87
+ ], t);
85
88
  export {
86
- i as TcSpinner
89
+ t as TcSpinner
87
90
  };
@@ -1,4 +1,5 @@
1
1
  import { LitElement } from 'lit';
2
+ import { SxProps } from '../types.js';
2
3
  /**
3
4
  * A circular symbol/avatar component.
4
5
  *
@@ -6,9 +7,7 @@ import { LitElement } from 'lit';
6
7
  * @csspart symbol - The symbol container
7
8
  */
8
9
  export declare class TcSymbol extends LitElement {
9
- size: string;
10
- background: string;
11
- color: string;
10
+ sx: SxProps;
12
11
  static styles: import('lit').CSSResult;
13
12
  render(): import('lit').TemplateResult<1>;
14
13
  }
@@ -1 +1 @@
1
- {"version":3,"file":"tc-symbol.d.ts","sourceRoot":"","sources":["../../src/primitives/tc-symbol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,MAAM,KAAK,CAAC;AAG5C;;;;;GAKG;AACH,qBACa,QAAS,SAAQ,UAAU;IACV,IAAI,SAAU;IACd,UAAU,SAAwB;IAClC,KAAK,SAAqB;IAEtD,OAAgB,MAAM,0BAiBpB;IAEO,MAAM;CAWhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
1
+ {"version":3,"file":"tc-symbol.d.ts","sourceRoot":"","sources":["../../src/primitives/tc-symbol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,MAAM,KAAK,CAAC;AAG5C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C;;;;;GAKG;AACH,qBACa,QAAS,SAAQ,UAAU;IACV,EAAE,EAAE,OAAO,CAAM;IAE7C,OAAgB,MAAM,0BAmBpB;IAEO,MAAM;CAchB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
@@ -1,29 +1,33 @@
1
- import { LitElement as m, html as p, css as c } from "lit";
2
- import { property as a, customElement as b } from "lit/decorators.js";
3
- var v = Object.defineProperty, f = Object.getOwnPropertyDescriptor, s = (y, t, l, e) => {
4
- for (var r = e > 1 ? void 0 : e ? f(t, l) : t, i = y.length - 1, n; i >= 0; i--)
5
- (n = y[i]) && (r = (e ? n(t, l, r) : n(r)) || r);
6
- return e && r && v(t, l, r), r;
1
+ import { css as a, LitElement as y, html as c } from "lit";
2
+ import { property as b, customElement as p } from "lit/decorators.js";
3
+ import { styleMap as f } from "lit/directives/style-map.js";
4
+ var v = Object.defineProperty, u = Object.getOwnPropertyDescriptor, n = (o, s, l, t) => {
5
+ for (var e = t > 1 ? void 0 : t ? u(s, l) : s, m = o.length - 1, i; m >= 0; m--)
6
+ (i = o[m]) && (e = (t ? i(s, l, e) : i(e)) || e);
7
+ return t && e && v(s, l, e), e;
7
8
  };
8
- let o = class extends m {
9
+ let r = class extends y {
9
10
  constructor() {
10
- super(...arguments), this.size = "3rem", this.background = "var(--paper-cream)", this.color = "var(--ink-dark)";
11
+ super(...arguments), this.sx = {};
11
12
  }
12
13
  render() {
13
- return p`
14
- <div
15
- part="symbol"
16
- class="symbol"
17
- style="--symbol-size: ${this.size}; --symbol-bg: ${this.background}; --symbol-color: ${this.color};"
18
- >
14
+ const s = { ...{
15
+ "--symbol-size": "3rem",
16
+ "--symbol-bg": "var(--paper-cream)",
17
+ "--symbol-color": "var(--ink-dark)"
18
+ }, ...this.sx };
19
+ return c`
20
+ <div part="symbol" class="symbol" style=${f(s)}>
19
21
  <slot></slot>
20
22
  </div>
21
23
  `;
22
24
  }
23
25
  };
24
- o.styles = c`
26
+ r.styles = a`
25
27
  :host {
26
28
  display: inline-flex;
29
+ align-items: center;
30
+ justify-content: center;
27
31
  }
28
32
 
29
33
  .symbol {
@@ -39,18 +43,12 @@ o.styles = c`
39
43
  font-weight: 600;
40
44
  }
41
45
  `;
42
- s([
43
- a({ type: String })
44
- ], o.prototype, "size", 2);
45
- s([
46
- a({ type: String })
47
- ], o.prototype, "background", 2);
48
- s([
49
- a({ type: String })
50
- ], o.prototype, "color", 2);
51
- o = s([
52
- b("tc-symbol")
53
- ], o);
46
+ n([
47
+ b({ type: Object })
48
+ ], r.prototype, "sx", 2);
49
+ r = n([
50
+ p("tc-symbol")
51
+ ], r);
54
52
  export {
55
- o as TcSymbol
53
+ r as TcSymbol
56
54
  };
@@ -1,4 +1,5 @@
1
1
  import { LitElement } from 'lit';
2
+ import { SxProps } from '../types.js';
2
3
  type TextTag = 'p' | 'span' | 'div' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'label';
3
4
  type TextSize = 'sm' | 'base' | 'lg' | 'xl' | '2xl';
4
5
  type TextWeight = '400' | '500' | '600' | '700';
@@ -16,7 +17,7 @@ export declare class TcText extends LitElement {
16
17
  size?: TextSize;
17
18
  weight?: TextWeight;
18
19
  color?: TextColor | string;
19
- sx: Record<string, string | number>;
20
+ sx: SxProps;
20
21
  static styles: import('lit').CSSResult[];
21
22
  private getColorClass;
22
23
  private getColorStyle;
@@ -1 +1 @@
1
- {"version":3,"file":"tc-text.d.ts","sourceRoot":"","sources":["../../src/primitives/tc-text.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,UAAU,EAAE,MAAM,KAAK,CAAC;AAMtC,KAAK,OAAO,GACR,GAAG,GACH,MAAM,GACN,KAAK,GACL,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,OAAO,CAAC;AAEZ,KAAK,QAAQ,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;AACpD,KAAK,UAAU,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;AAChD,KAAK,SAAS,GACV,SAAS,GACT,WAAW,GACX,UAAU,GACV,OAAO,GACP,QAAQ,GACR,SAAS,GACT,OAAO,GACP,SAAS,GACT,MAAM,CAAC;AAEX;;;;;;;GAOG;AACH,qBACa,MAAO,SAAQ,UAAU;IACR,GAAG,EAAE,OAAO,CAAO;IACnB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,KAAK,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAC3B,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAM;IAErE,OAAgB,MAAM,4BA2EpB;IAEF,OAAO,CAAC,aAAa;IAmBrB,OAAO,CAAC,aAAa;IAgBZ,MAAM;CAwBhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,SAAS,EAAE,MAAM,CAAC;KACnB;CACF"}
1
+ {"version":3,"file":"tc-text.d.ts","sourceRoot":"","sources":["../../src/primitives/tc-text.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,UAAU,EAAE,MAAM,KAAK,CAAC;AAKtC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C,KAAK,OAAO,GACR,GAAG,GACH,MAAM,GACN,KAAK,GACL,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,OAAO,CAAC;AAEZ,KAAK,QAAQ,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;AACpD,KAAK,UAAU,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;AAChD,KAAK,SAAS,GACV,SAAS,GACT,WAAW,GACX,UAAU,GACV,OAAO,GACP,QAAQ,GACR,SAAS,GACT,OAAO,GACP,SAAS,GACT,MAAM,CAAC;AAEX;;;;;;;GAOG;AACH,qBACa,MAAO,SAAQ,UAAU;IACR,GAAG,EAAE,OAAO,CAAO;IACnB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,KAAK,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAC3B,EAAE,EAAE,OAAO,CAAM;IAE7C,OAAgB,MAAM,4BA2EpB;IAEF,OAAO,CAAC,aAAa;IAmBrB,OAAO,CAAC,aAAa;IAgBZ,MAAM;CAwBhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,SAAS,EAAE,MAAM,CAAC;KACnB;CACF"}
@@ -1,4 +1,4 @@
1
- import { LitElement as x, css as p } from "lit";
1
+ import { css as x, LitElement as p } from "lit";
2
2
  import { property as a, customElement as g } from "lit/decorators.js";
3
3
  import { styleMap as h } from "lit/directives/style-map.js";
4
4
  import { unsafeStatic as f, html as m } from "lit/static-html.js";
@@ -8,7 +8,7 @@ var v = Object.defineProperty, u = Object.getOwnPropertyDescriptor, n = (r, o, s
8
8
  (l = r[c]) && (e = (i ? l(o, s, e) : l(e)) || e);
9
9
  return i && e && v(o, s, e), e;
10
10
  };
11
- let t = class extends x {
11
+ let t = class extends p {
12
12
  constructor() {
13
13
  super(...arguments), this.tag = "p", this.sx = {};
14
14
  }
@@ -48,7 +48,7 @@ let t = class extends x {
48
48
  };
49
49
  t.styles = [
50
50
  y,
51
- p`
51
+ x`
52
52
  :host {
53
53
  display: contents;
54
54
  }
@@ -1,4 +1,5 @@
1
1
  import { LitElement } from 'lit';
2
+ import { SxProps } from '../types.js';
2
3
  /**
3
4
  * A toast notification component with auto-dismiss and animation.
4
5
  *
@@ -13,6 +14,7 @@ export declare class TcToast extends LitElement {
13
14
  duration: number;
14
15
  autoDismiss: boolean;
15
16
  dismissible: boolean;
17
+ sx: SxProps;
16
18
  private animation;
17
19
  private dismissTimer?;
18
20
  static styles: import('lit').CSSResult[];