@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.
- package/CHANGELOG.md +54 -0
- package/README.md +8 -22
- package/dist/controllers/index.d.ts +0 -2
- package/dist/controllers/index.d.ts.map +1 -1
- package/dist/controllers/index.js +10 -12
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +48 -64
- package/dist/primitives/index.d.ts +1 -0
- package/dist/primitives/index.d.ts.map +1 -1
- package/dist/primitives/index.js +18 -16
- package/dist/primitives/tc-box.d.ts +2 -1
- package/dist/primitives/tc-box.d.ts.map +1 -1
- package/dist/primitives/tc-box.js +4 -4
- package/dist/primitives/tc-button.d.ts +2 -1
- package/dist/primitives/tc-button.d.ts.map +1 -1
- package/dist/primitives/tc-button.js +21 -20
- 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 +22 -17
- package/dist/primitives/tc-card.d.ts +2 -1
- package/dist/primitives/tc-card.d.ts.map +1 -1
- package/dist/primitives/tc-card.js +11 -10
- 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 +26 -16
- package/dist/primitives/tc-container.d.ts +2 -1
- package/dist/primitives/tc-container.d.ts.map +1 -1
- package/dist/primitives/tc-container.js +12 -10
- 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 +25 -23
- 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 +23 -16
- 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-form-header.js +9 -7
- 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 +26 -18
- package/dist/primitives/tc-input.d.ts +2 -1
- package/dist/primitives/tc-input.d.ts.map +1 -1
- package/dist/primitives/tc-input.js +11 -9
- 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 +31 -36
- 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 +21 -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 +17 -11
- package/dist/{widgets → primitives}/tc-page-decoration.d.ts +2 -0
- package/dist/primitives/tc-page-decoration.d.ts.map +1 -0
- package/dist/{widgets → primitives}/tc-page-decoration.js +29 -25
- 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 +23 -24
- 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 +32 -29
- 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 +26 -28
- package/dist/primitives/tc-text.d.ts +2 -1
- package/dist/primitives/tc-text.d.ts.map +1 -1
- package/dist/primitives/tc-text.js +3 -3
- 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 +35 -25
- package/dist/screens/tc-error-screen.d.ts +8 -1
- package/dist/screens/tc-error-screen.d.ts.map +1 -1
- package/dist/screens/tc-error-screen.js +91 -32
- package/dist/screens/tc-loading-screen.d.ts +3 -1
- package/dist/screens/tc-loading-screen.d.ts.map +1 -1
- package/dist/screens/tc-loading-screen.js +28 -19
- 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 +41 -31
- package/dist/types.d.ts +34 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +13 -13
- package/dist/controllers/form-validation.controller.d.ts +0 -48
- package/dist/controllers/form-validation.controller.d.ts.map +0 -1
- package/dist/controllers/form-validation.controller.js +0 -49
- package/dist/widgets/index.d.ts +0 -9
- package/dist/widgets/index.d.ts.map +0 -1
- package/dist/widgets/index.js +0 -18
- package/dist/widgets/tc-authenticator-card.d.ts +0 -35
- package/dist/widgets/tc-authenticator-card.d.ts.map +0 -1
- package/dist/widgets/tc-authenticator-card.js +0 -213
- package/dist/widgets/tc-floating-button.d.ts +0 -25
- package/dist/widgets/tc-floating-button.d.ts.map +0 -1
- package/dist/widgets/tc-floating-button.js +0 -132
- package/dist/widgets/tc-iframe-modal.d.ts +0 -43
- package/dist/widgets/tc-iframe-modal.d.ts.map +0 -1
- package/dist/widgets/tc-iframe-modal.js +0 -263
- package/dist/widgets/tc-installation-banner.d.ts +0 -42
- package/dist/widgets/tc-installation-banner.d.ts.map +0 -1
- package/dist/widgets/tc-installation-banner.js +0 -234
- package/dist/widgets/tc-ios-installation-guide.d.ts +0 -34
- package/dist/widgets/tc-ios-installation-guide.d.ts.map +0 -1
- package/dist/widgets/tc-ios-installation-guide.js +0 -240
- package/dist/widgets/tc-notification-modal.d.ts +0 -42
- package/dist/widgets/tc-notification-modal.d.ts.map +0 -1
- package/dist/widgets/tc-notification-modal.js +0 -230
- package/dist/widgets/tc-offline-modal.d.ts +0 -39
- package/dist/widgets/tc-offline-modal.d.ts.map +0 -1
- package/dist/widgets/tc-offline-modal.js +0 -202
- 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;
|
|
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 {
|
|
2
|
-
import { property as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
|
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 h {
|
|
|
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,9 +82,9 @@ let s = class extends h {
|
|
|
75
82
|
`;
|
|
76
83
|
}
|
|
77
84
|
};
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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
|
-
|
|
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,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;
|
|
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 {
|
|
2
|
-
import { property as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
103
|
-
|
|
104
|
-
],
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
],
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
],
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
],
|
|
114
|
-
e
|
|
115
|
-
|
|
116
|
-
],
|
|
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
|
-
|
|
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:
|
|
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"}
|
|
@@ -1,25 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { property as
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
|
13
|
+
let t = class extends g {
|
|
10
14
|
constructor() {
|
|
11
|
-
super(...arguments), this.message = "", this.spinnerSize = "
|
|
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
|
|
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 ?
|
|
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 =
|
|
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
|
-
|
|
67
|
-
|
|
72
|
+
s([
|
|
73
|
+
c({ type: String })
|
|
68
74
|
], t.prototype, "message", 2);
|
|
69
|
-
|
|
70
|
-
|
|
75
|
+
s([
|
|
76
|
+
c({ type: String, attribute: "spinner-size" })
|
|
71
77
|
], t.prototype, "spinnerSize", 2);
|
|
72
|
-
|
|
73
|
-
|
|
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;
|
|
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 {
|
|
2
|
-
import { property as
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
|
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
|
|
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
|
|
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 ${
|
|
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
|
|
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 ${
|
|
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 =
|
|
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
|
-
|
|
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:
|
|
123
|
-
height:
|
|
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(
|
|
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(
|
|
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
|
-
|
|
173
|
-
|
|
179
|
+
a([
|
|
180
|
+
s({ type: String })
|
|
174
181
|
], t.prototype, "title", 2);
|
|
175
|
-
|
|
176
|
-
|
|
182
|
+
a([
|
|
183
|
+
s({ type: String })
|
|
177
184
|
], t.prototype, "message", 2);
|
|
178
|
-
|
|
179
|
-
|
|
185
|
+
a([
|
|
186
|
+
s({ type: String, attribute: "action-label" })
|
|
180
187
|
], t.prototype, "actionLabel", 2);
|
|
181
|
-
|
|
182
|
-
|
|
188
|
+
a([
|
|
189
|
+
s({ type: Boolean, attribute: "auto-animate" })
|
|
183
190
|
], t.prototype, "autoAnimate", 2);
|
|
184
|
-
|
|
191
|
+
a([
|
|
192
|
+
s({ type: Object })
|
|
193
|
+
], t.prototype, "sx", 2);
|
|
194
|
+
a([
|
|
185
195
|
h()
|
|
186
196
|
], t.prototype, "isAnimated", 2);
|
|
187
|
-
t =
|
|
197
|
+
t = a([
|
|
188
198
|
u("tc-success-screen")
|
|
189
199
|
], t);
|
|
190
200
|
export {
|
package/dist/types.d.ts
ADDED
|
@@ -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"}
|