@transcodes/ui-components 0.3.6 → 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.
- package/CHANGELOG.md +27 -0
- package/README.md +8 -22
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/primitives/tc-box.d.ts +2 -1
- package/dist/primitives/tc-box.d.ts.map +1 -1
- package/dist/primitives/tc-button.d.ts +2 -1
- package/dist/primitives/tc-button.d.ts.map +1 -1
- package/dist/primitives/tc-callout.d.ts +2 -0
- package/dist/primitives/tc-callout.d.ts.map +1 -1
- package/dist/primitives/tc-callout.js +21 -17
- package/dist/primitives/tc-card.d.ts +2 -1
- package/dist/primitives/tc-card.d.ts.map +1 -1
- package/dist/primitives/tc-chip.d.ts +2 -0
- package/dist/primitives/tc-chip.d.ts.map +1 -1
- package/dist/primitives/tc-chip.js +22 -14
- package/dist/primitives/tc-container.d.ts +2 -1
- package/dist/primitives/tc-container.d.ts.map +1 -1
- package/dist/primitives/tc-divider.d.ts +2 -2
- package/dist/primitives/tc-divider.d.ts.map +1 -1
- package/dist/primitives/tc-divider.js +23 -22
- package/dist/primitives/tc-error-message.d.ts +2 -0
- package/dist/primitives/tc-error-message.d.ts.map +1 -1
- package/dist/primitives/tc-error-message.js +18 -15
- package/dist/primitives/tc-form-header.d.ts +2 -1
- package/dist/primitives/tc-form-header.d.ts.map +1 -1
- package/dist/primitives/tc-icon.d.ts +2 -2
- package/dist/primitives/tc-icon.d.ts.map +1 -1
- package/dist/primitives/tc-icon.js +61 -61
- package/dist/primitives/tc-input-with-chip.d.ts +2 -0
- package/dist/primitives/tc-input-with-chip.d.ts.map +1 -1
- package/dist/primitives/tc-input-with-chip.js +17 -13
- package/dist/primitives/tc-input.d.ts +2 -1
- package/dist/primitives/tc-input.d.ts.map +1 -1
- package/dist/primitives/tc-item-button.d.ts +2 -3
- package/dist/primitives/tc-item-button.d.ts.map +1 -1
- package/dist/primitives/tc-item-button.js +28 -34
- package/dist/primitives/tc-item.d.ts +2 -3
- package/dist/primitives/tc-item.d.ts.map +1 -1
- package/dist/primitives/tc-item.js +20 -26
- package/dist/primitives/tc-otp-input.d.ts +2 -0
- package/dist/primitives/tc-otp-input.d.ts.map +1 -1
- package/dist/primitives/tc-otp-input.js +11 -7
- package/dist/primitives/tc-page-decoration.d.ts +2 -0
- package/dist/primitives/tc-page-decoration.d.ts.map +1 -1
- package/dist/primitives/tc-page-decoration.js +24 -20
- package/dist/primitives/tc-section.d.ts +2 -2
- package/dist/primitives/tc-section.d.ts.map +1 -1
- package/dist/primitives/tc-section.js +20 -23
- package/dist/primitives/tc-spinner.d.ts +2 -1
- package/dist/primitives/tc-spinner.d.ts.map +1 -1
- package/dist/primitives/tc-spinner.js +25 -22
- package/dist/primitives/tc-symbol.d.ts +2 -3
- package/dist/primitives/tc-symbol.d.ts.map +1 -1
- package/dist/primitives/tc-symbol.js +24 -28
- package/dist/primitives/tc-text.d.ts +2 -1
- package/dist/primitives/tc-text.d.ts.map +1 -1
- package/dist/primitives/tc-toast.d.ts +2 -0
- package/dist/primitives/tc-toast.d.ts.map +1 -1
- package/dist/primitives/tc-toast.js +33 -23
- package/dist/screens/tc-error-screen.d.ts +2 -0
- package/dist/screens/tc-error-screen.d.ts.map +1 -1
- package/dist/screens/tc-error-screen.js +35 -31
- package/dist/screens/tc-loading-screen.d.ts +2 -0
- package/dist/screens/tc-loading-screen.d.ts.map +1 -1
- package/dist/screens/tc-loading-screen.js +19 -15
- package/dist/screens/tc-success-screen.d.ts +2 -0
- package/dist/screens/tc-success-screen.d.ts.map +1 -1
- package/dist/screens/tc-success-screen.js +25 -21
- package/dist/types.d.ts +34 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +2 -2
|
@@ -1 +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;;;;;;GAMG;AACH,qBACa,gBAAiB,SAAQ,UAAU;IAClB,OAAO,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,CACxD;
|
|
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 { css as
|
|
2
|
-
import { property as
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
|
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
|
|
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,9 +21,9 @@ let a = class extends c {
|
|
|
20
21
|
`;
|
|
21
22
|
}
|
|
22
23
|
};
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
e.styles = [
|
|
25
|
+
u,
|
|
26
|
+
c`
|
|
26
27
|
:host {
|
|
27
28
|
position: absolute;
|
|
28
29
|
inset: 0;
|
|
@@ -115,12 +116,15 @@ a.styles = [
|
|
|
115
116
|
}
|
|
116
117
|
`
|
|
117
118
|
];
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
],
|
|
121
|
-
|
|
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
|
-
],
|
|
127
|
+
], e);
|
|
124
128
|
export {
|
|
125
|
-
|
|
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
|
-
|
|
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;
|
|
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,28 +1,28 @@
|
|
|
1
|
-
import { css as
|
|
2
|
-
import { property as
|
|
3
|
-
import { styleMap as
|
|
4
|
-
var
|
|
5
|
-
for (var t =
|
|
6
|
-
(
|
|
7
|
-
return
|
|
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
|
|
9
|
+
let o = class extends m {
|
|
10
10
|
constructor() {
|
|
11
|
-
super(...arguments), this.
|
|
11
|
+
super(...arguments), this.sx = {};
|
|
12
12
|
}
|
|
13
13
|
render() {
|
|
14
|
-
const
|
|
15
|
-
gap:
|
|
14
|
+
const e = {
|
|
15
|
+
gap: "var(--space-md)",
|
|
16
16
|
...this.sx
|
|
17
17
|
};
|
|
18
|
-
return
|
|
19
|
-
<section part="section" class="section" style=${
|
|
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
|
-
|
|
25
|
+
o.styles = p`
|
|
26
26
|
:host {
|
|
27
27
|
display: block;
|
|
28
28
|
width: 100%;
|
|
@@ -37,14 +37,11 @@ e.styles = m`
|
|
|
37
37
|
}
|
|
38
38
|
`;
|
|
39
39
|
n([
|
|
40
|
-
|
|
41
|
-
],
|
|
42
|
-
n([
|
|
43
|
-
|
|
44
|
-
],
|
|
45
|
-
e = n([
|
|
46
|
-
f("tc-section")
|
|
47
|
-
], e);
|
|
40
|
+
f({ type: Object })
|
|
41
|
+
], o.prototype, "sx", 2);
|
|
42
|
+
o = n([
|
|
43
|
+
d("tc-section")
|
|
44
|
+
], o);
|
|
48
45
|
export {
|
|
49
|
-
|
|
46
|
+
o as TcSection
|
|
50
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
|
-
|
|
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,
|
|
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,31 +1,34 @@
|
|
|
1
|
-
import { css as d, LitElement as h, html as
|
|
2
|
-
import { property as l, customElement as
|
|
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";
|
|
3
4
|
import { MatchMediaController as c } from "../controllers/match-media.controller.js";
|
|
4
|
-
import { sharedStyles as
|
|
5
|
-
var
|
|
6
|
-
for (var
|
|
7
|
-
(a =
|
|
8
|
-
return
|
|
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
|
|
11
|
+
let t = class extends h {
|
|
11
12
|
constructor() {
|
|
12
|
-
super(...arguments), this.mobile = new c(this, "(max-width: 768px)"), this.size = "auto", this.
|
|
13
|
+
super(...arguments), this.mobile = new c(this, "(max-width: 768px)"), this.size = "auto", this.sx = {};
|
|
13
14
|
}
|
|
14
15
|
render() {
|
|
15
|
-
let
|
|
16
|
-
|
|
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 ${
|
|
20
|
-
style
|
|
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
|
-
|
|
28
|
-
|
|
30
|
+
t.styles = [
|
|
31
|
+
w,
|
|
29
32
|
d`
|
|
30
33
|
:host {
|
|
31
34
|
display: inline-flex;
|
|
@@ -75,13 +78,13 @@ i.styles = [
|
|
|
75
78
|
];
|
|
76
79
|
p([
|
|
77
80
|
l({ type: String })
|
|
78
|
-
],
|
|
81
|
+
], t.prototype, "size", 2);
|
|
79
82
|
p([
|
|
80
|
-
l({ type:
|
|
81
|
-
],
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
],
|
|
83
|
+
l({ type: Object })
|
|
84
|
+
], t.prototype, "sx", 2);
|
|
85
|
+
t = p([
|
|
86
|
+
v("tc-spinner")
|
|
87
|
+
], t);
|
|
85
88
|
export {
|
|
86
|
-
|
|
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
|
-
|
|
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,
|
|
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,27 +1,29 @@
|
|
|
1
|
-
import { css as
|
|
2
|
-
import { property as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
|
9
|
+
let r = class extends y {
|
|
9
10
|
constructor() {
|
|
10
|
-
super(...arguments), this.
|
|
11
|
+
super(...arguments), this.sx = {};
|
|
11
12
|
}
|
|
12
13
|
render() {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
-
|
|
26
|
+
r.styles = a`
|
|
25
27
|
:host {
|
|
26
28
|
display: inline-flex;
|
|
27
29
|
align-items: center;
|
|
@@ -41,18 +43,12 @@ t.styles = y`
|
|
|
41
43
|
font-weight: 600;
|
|
42
44
|
}
|
|
43
45
|
`;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
],
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
],
|
|
50
|
-
s([
|
|
51
|
-
a({ type: String })
|
|
52
|
-
], t.prototype, "color", 2);
|
|
53
|
-
t = s([
|
|
54
|
-
b("tc-symbol")
|
|
55
|
-
], t);
|
|
46
|
+
n([
|
|
47
|
+
b({ type: Object })
|
|
48
|
+
], r.prototype, "sx", 2);
|
|
49
|
+
r = n([
|
|
50
|
+
p("tc-symbol")
|
|
51
|
+
], r);
|
|
56
52
|
export {
|
|
57
|
-
|
|
53
|
+
r as TcSymbol
|
|
58
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:
|
|
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;
|
|
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,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[];
|
|
@@ -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;
|
|
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
1
|
import { css as h, LitElement as m, html as d } from "lit";
|
|
2
|
-
import { property as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
|
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
|
|
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 m {
|
|
|
47
48
|
}
|
|
48
49
|
render() {
|
|
49
50
|
return d`
|
|
50
|
-
<div
|
|
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,8 +82,8 @@ let s = class extends m {
|
|
|
75
82
|
`;
|
|
76
83
|
}
|
|
77
84
|
};
|
|
78
|
-
|
|
79
|
-
|
|
85
|
+
t.styles = [
|
|
86
|
+
y,
|
|
80
87
|
h`
|
|
81
88
|
:host {
|
|
82
89
|
display: block;
|
|
@@ -170,20 +177,23 @@ s.styles = [
|
|
|
170
177
|
`
|
|
171
178
|
];
|
|
172
179
|
i([
|
|
173
|
-
|
|
174
|
-
],
|
|
180
|
+
e({ type: String })
|
|
181
|
+
], t.prototype, "variant", 2);
|
|
175
182
|
i([
|
|
176
|
-
|
|
177
|
-
],
|
|
183
|
+
e({ type: Number })
|
|
184
|
+
], t.prototype, "duration", 2);
|
|
178
185
|
i([
|
|
179
|
-
|
|
180
|
-
],
|
|
186
|
+
e({ type: Boolean, attribute: "auto-dismiss" })
|
|
187
|
+
], t.prototype, "autoDismiss", 2);
|
|
181
188
|
i([
|
|
182
|
-
|
|
183
|
-
],
|
|
184
|
-
|
|
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
|
-
],
|
|
196
|
+
], t);
|
|
187
197
|
export {
|
|
188
|
-
|
|
198
|
+
t as TcToast
|
|
189
199
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
+
import { SxProps } from '../types.js';
|
|
2
3
|
/**
|
|
3
4
|
* A full-screen error state with animated icon, message, and retry action.
|
|
4
5
|
*
|
|
@@ -16,6 +17,7 @@ export declare class TcErrorScreen extends LitElement {
|
|
|
16
17
|
retryLabel: string;
|
|
17
18
|
showRetry: boolean;
|
|
18
19
|
autoAnimate: boolean;
|
|
20
|
+
sx: SxProps;
|
|
19
21
|
private isAnimated;
|
|
20
22
|
private animation;
|
|
21
23
|
static styles: import('lit').CSSResult;
|
|
@@ -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;
|
|
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,19 +1,20 @@
|
|
|
1
|
-
import { css as
|
|
2
|
-
import { property as
|
|
3
|
-
import {
|
|
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";
|
|
4
5
|
import "../primitives/tc-icon.js";
|
|
5
6
|
import "../primitives/tc-text.js";
|
|
6
7
|
import "../primitives/tc-button.js";
|
|
7
8
|
import "../primitives/tc-container.js";
|
|
8
9
|
import "../primitives/tc-section.js";
|
|
9
|
-
var
|
|
10
|
-
for (var
|
|
11
|
-
(l =
|
|
12
|
-
return s &&
|
|
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;
|
|
13
14
|
};
|
|
14
15
|
let t = class extends d {
|
|
15
16
|
constructor() {
|
|
16
|
-
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.isAnimated = !1, this.animation = new
|
|
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, {
|
|
17
18
|
showDuration: 600,
|
|
18
19
|
hideDuration: 300
|
|
19
20
|
});
|
|
@@ -35,15 +36,15 @@ let t = class extends d {
|
|
|
35
36
|
);
|
|
36
37
|
}
|
|
37
38
|
render() {
|
|
38
|
-
const
|
|
39
|
-
return
|
|
40
|
-
<div part="screen" class="screen">
|
|
39
|
+
const i = this.isAnimated ? "animated" : "";
|
|
40
|
+
return p`
|
|
41
|
+
<div part="screen" class="screen" style=${u(this.sx)}>
|
|
41
42
|
<tc-container>
|
|
42
43
|
<div part="content" class="content">
|
|
43
|
-
<div part="icon" class="icon-container ${
|
|
44
|
-
<tc-icon name="alert-circle" size
|
|
44
|
+
<div part="icon" class="icon-container ${i}">
|
|
45
|
+
<tc-icon name="alert-circle" .sx=${{ "--icon-size": "var(--size-icon-xl)" }}></tc-icon>
|
|
45
46
|
</div>
|
|
46
|
-
<tc-section gap
|
|
47
|
+
<tc-section .sx=${{ gap: "var(--space-sm)" }} class="text-content ${i}">
|
|
47
48
|
<tc-text part="title" tag="h1" size="xl" weight="600" class="title">
|
|
48
49
|
${this.title}
|
|
49
50
|
</tc-text>
|
|
@@ -51,8 +52,8 @@ let t = class extends d {
|
|
|
51
52
|
${this.message}
|
|
52
53
|
</tc-text>
|
|
53
54
|
</tc-section>
|
|
54
|
-
${this.showRetry ?
|
|
55
|
-
<div part="action" class="action ${
|
|
55
|
+
${this.showRetry ? p`
|
|
56
|
+
<div part="action" class="action ${i}">
|
|
56
57
|
<tc-button variant="primary" @tc-click=${this.handleRetry}>
|
|
57
58
|
${this.retryLabel}
|
|
58
59
|
</tc-button>
|
|
@@ -64,7 +65,7 @@ let t = class extends d {
|
|
|
64
65
|
`;
|
|
65
66
|
}
|
|
66
67
|
};
|
|
67
|
-
t.styles =
|
|
68
|
+
t.styles = m`
|
|
68
69
|
:host {
|
|
69
70
|
display: flex;
|
|
70
71
|
align-items: center;
|
|
@@ -148,26 +149,29 @@ t.styles = p`
|
|
|
148
149
|
transform: translateY(0);
|
|
149
150
|
}
|
|
150
151
|
`;
|
|
151
|
-
|
|
152
|
-
|
|
152
|
+
e([
|
|
153
|
+
a({ type: String })
|
|
153
154
|
], t.prototype, "title", 2);
|
|
154
|
-
|
|
155
|
-
|
|
155
|
+
e([
|
|
156
|
+
a({ type: String })
|
|
156
157
|
], t.prototype, "message", 2);
|
|
157
|
-
|
|
158
|
-
|
|
158
|
+
e([
|
|
159
|
+
a({ type: String, attribute: "retry-label" })
|
|
159
160
|
], t.prototype, "retryLabel", 2);
|
|
160
|
-
|
|
161
|
-
|
|
161
|
+
e([
|
|
162
|
+
a({ type: Boolean, attribute: "show-retry" })
|
|
162
163
|
], t.prototype, "showRetry", 2);
|
|
163
|
-
|
|
164
|
-
|
|
164
|
+
e([
|
|
165
|
+
a({ type: Boolean, attribute: "auto-animate" })
|
|
165
166
|
], t.prototype, "autoAnimate", 2);
|
|
166
|
-
|
|
167
|
-
|
|
167
|
+
e([
|
|
168
|
+
a({ type: Object })
|
|
169
|
+
], t.prototype, "sx", 2);
|
|
170
|
+
e([
|
|
171
|
+
y()
|
|
168
172
|
], t.prototype, "isAnimated", 2);
|
|
169
|
-
t =
|
|
170
|
-
|
|
173
|
+
t = e([
|
|
174
|
+
h("tc-error-screen")
|
|
171
175
|
], t);
|
|
172
176
|
export {
|
|
173
177
|
t as TcErrorScreen
|
|
@@ -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
|
*
|
|
@@ -10,6 +11,7 @@ import { LitElement } from 'lit';
|
|
|
10
11
|
export declare class TcLoadingScreen extends LitElement {
|
|
11
12
|
message: string;
|
|
12
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;
|
|
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"}
|