@transcodes/ui-components 0.4.1 → 0.4.3
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 +14 -0
- package/package.json +2 -2
- package/dist/controllers/animation.controller.d.ts +0 -48
- package/dist/controllers/animation.controller.d.ts.map +0 -1
- package/dist/controllers/animation.controller.js +0 -32
- package/dist/controllers/base.controller.d.ts +0 -14
- package/dist/controllers/base.controller.d.ts.map +0 -1
- package/dist/controllers/base.controller.js +0 -8
- package/dist/controllers/history.controller.d.ts +0 -34
- package/dist/controllers/history.controller.d.ts.map +0 -1
- package/dist/controllers/history.controller.js +0 -26
- package/dist/controllers/index.d.ts +0 -9
- package/dist/controllers/index.d.ts.map +0 -1
- package/dist/controllers/index.js +0 -16
- package/dist/controllers/loading.controller.d.ts +0 -36
- package/dist/controllers/loading.controller.d.ts.map +0 -1
- package/dist/controllers/loading.controller.js +0 -27
- package/dist/controllers/match-media.controller.d.ts +0 -32
- package/dist/controllers/match-media.controller.d.ts.map +0 -1
- package/dist/controllers/match-media.controller.js +0 -20
- package/dist/controllers/message-bus.controller.d.ts +0 -45
- package/dist/controllers/message-bus.controller.d.ts.map +0 -1
- package/dist/controllers/message-bus.controller.js +0 -45
- package/dist/controllers/storage.controller.d.ts +0 -40
- package/dist/controllers/storage.controller.d.ts.map +0 -1
- package/dist/controllers/storage.controller.js +0 -40
- package/dist/index.d.ts +0 -5
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -64
- package/dist/primitives/index.d.ts +0 -22
- package/dist/primitives/index.d.ts.map +0 -1
- package/dist/primitives/index.js +0 -44
- package/dist/primitives/tc-box.d.ts +0 -20
- package/dist/primitives/tc-box.d.ts.map +0 -1
- package/dist/primitives/tc-box.js +0 -38
- package/dist/primitives/tc-button.d.ts +0 -26
- package/dist/primitives/tc-button.d.ts.map +0 -1
- package/dist/primitives/tc-button.js +0 -168
- package/dist/primitives/tc-callout.d.ts +0 -24
- package/dist/primitives/tc-callout.d.ts.map +0 -1
- package/dist/primitives/tc-callout.js +0 -91
- package/dist/primitives/tc-card.d.ts +0 -21
- package/dist/primitives/tc-card.d.ts.map +0 -1
- package/dist/primitives/tc-card.js +0 -77
- package/dist/primitives/tc-chip.d.ts +0 -21
- package/dist/primitives/tc-chip.d.ts.map +0 -1
- package/dist/primitives/tc-chip.js +0 -90
- package/dist/primitives/tc-container.d.ts +0 -21
- package/dist/primitives/tc-container.d.ts.map +0 -1
- package/dist/primitives/tc-container.js +0 -64
- package/dist/primitives/tc-divider.d.ts +0 -22
- package/dist/primitives/tc-divider.d.ts.map +0 -1
- package/dist/primitives/tc-divider.js +0 -78
- package/dist/primitives/tc-error-message.d.ts +0 -25
- package/dist/primitives/tc-error-message.d.ts.map +0 -1
- package/dist/primitives/tc-error-message.js +0 -81
- package/dist/primitives/tc-form-header.d.ts +0 -26
- package/dist/primitives/tc-form-header.d.ts.map +0 -1
- package/dist/primitives/tc-form-header.js +0 -122
- package/dist/primitives/tc-icon.d.ts +0 -20
- package/dist/primitives/tc-icon.d.ts.map +0 -1
- package/dist/primitives/tc-icon.js +0 -95
- package/dist/primitives/tc-input-with-chip.d.ts +0 -40
- package/dist/primitives/tc-input-with-chip.d.ts.map +0 -1
- package/dist/primitives/tc-input-with-chip.js +0 -250
- package/dist/primitives/tc-input.d.ts +0 -46
- package/dist/primitives/tc-input.d.ts.map +0 -1
- package/dist/primitives/tc-input.js +0 -264
- package/dist/primitives/tc-item-button.d.ts +0 -29
- package/dist/primitives/tc-item-button.d.ts.map +0 -1
- package/dist/primitives/tc-item-button.js +0 -163
- package/dist/primitives/tc-item.d.ts +0 -24
- package/dist/primitives/tc-item.d.ts.map +0 -1
- package/dist/primitives/tc-item.js +0 -88
- package/dist/primitives/tc-otp-input.d.ts +0 -40
- package/dist/primitives/tc-otp-input.d.ts.map +0 -1
- package/dist/primitives/tc-otp-input.js +0 -236
- package/dist/primitives/tc-page-decoration.d.ts +0 -21
- package/dist/primitives/tc-page-decoration.d.ts.map +0 -1
- package/dist/primitives/tc-page-decoration.js +0 -130
- package/dist/primitives/tc-section.d.ts +0 -19
- package/dist/primitives/tc-section.d.ts.map +0 -1
- package/dist/primitives/tc-section.js +0 -47
- package/dist/primitives/tc-spinner.d.ts +0 -21
- package/dist/primitives/tc-spinner.d.ts.map +0 -1
- package/dist/primitives/tc-spinner.js +0 -90
- package/dist/primitives/tc-symbol.d.ts +0 -19
- package/dist/primitives/tc-symbol.d.ts.map +0 -1
- package/dist/primitives/tc-symbol.js +0 -54
- package/dist/primitives/tc-text.d.ts +0 -32
- package/dist/primitives/tc-text.d.ts.map +0 -1
- package/dist/primitives/tc-text.js +0 -145
- package/dist/primitives/tc-toast.d.ts +0 -36
- package/dist/primitives/tc-toast.d.ts.map +0 -1
- package/dist/primitives/tc-toast.js +0 -199
- package/dist/screens/index.d.ts +0 -4
- package/dist/screens/index.d.ts.map +0 -1
- package/dist/screens/index.js +0 -8
- package/dist/screens/tc-error-screen.d.ts +0 -34
- package/dist/screens/tc-error-screen.d.ts.map +0 -1
- package/dist/screens/tc-error-screen.js +0 -178
- package/dist/screens/tc-loading-screen.d.ts +0 -25
- package/dist/screens/tc-loading-screen.d.ts.map +0 -1
- package/dist/screens/tc-loading-screen.js +0 -86
- package/dist/screens/tc-success-screen.d.ts +0 -33
- package/dist/screens/tc-success-screen.d.ts.map +0 -1
- package/dist/screens/tc-success-screen.js +0 -202
- package/dist/styles/shared.d.ts +0 -20
- package/dist/styles/shared.d.ts.map +0 -1
- package/dist/styles/shared.js +0 -7
- package/dist/types.d.ts +0 -34
- package/dist/types.d.ts.map +0 -1
|
@@ -1,199 +0,0 @@
|
|
|
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;
|
|
10
|
-
};
|
|
11
|
-
let t = class extends m {
|
|
12
|
-
constructor() {
|
|
13
|
-
super(...arguments), this.variant = "info", this.duration = 5e3, this.autoDismiss = !0, this.dismissible = !0, this.sx = {}, this.animation = new v(this, {
|
|
14
|
-
showDuration: 300,
|
|
15
|
-
hideDuration: 200
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
connectedCallback() {
|
|
19
|
-
super.connectedCallback(), this.updateDataState();
|
|
20
|
-
}
|
|
21
|
-
disconnectedCallback() {
|
|
22
|
-
super.disconnectedCallback(), this.clearDismissTimer();
|
|
23
|
-
}
|
|
24
|
-
updateDataState() {
|
|
25
|
-
this.dataset.state = this.animation.state;
|
|
26
|
-
}
|
|
27
|
-
clearDismissTimer() {
|
|
28
|
-
this.dismissTimer && (clearTimeout(this.dismissTimer), this.dismissTimer = void 0);
|
|
29
|
-
}
|
|
30
|
-
startDismissTimer() {
|
|
31
|
-
this.autoDismiss && this.duration > 0 && (this.clearDismissTimer(), this.dismissTimer = setTimeout(() => {
|
|
32
|
-
this.hide();
|
|
33
|
-
}, this.duration));
|
|
34
|
-
}
|
|
35
|
-
async show() {
|
|
36
|
-
this.clearDismissTimer(), await this.animation.show(), this.updateDataState(), this.startDismissTimer();
|
|
37
|
-
}
|
|
38
|
-
async hide() {
|
|
39
|
-
this.clearDismissTimer(), await this.animation.hide(), this.updateDataState(), this.dispatchEvent(
|
|
40
|
-
new CustomEvent("tc-dismiss", {
|
|
41
|
-
bubbles: !0,
|
|
42
|
-
composed: !0
|
|
43
|
-
})
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
handleClose() {
|
|
47
|
-
this.hide();
|
|
48
|
-
}
|
|
49
|
-
render() {
|
|
50
|
-
return d`
|
|
51
|
-
<div
|
|
52
|
-
part="toast"
|
|
53
|
-
class="toast toast--${this.variant}"
|
|
54
|
-
role="alert"
|
|
55
|
-
aria-live="polite"
|
|
56
|
-
style=${u(this.sx)}
|
|
57
|
-
>
|
|
58
|
-
<div part="content" class="content">
|
|
59
|
-
<slot></slot>
|
|
60
|
-
</div>
|
|
61
|
-
${this.dismissible ? d`
|
|
62
|
-
<button
|
|
63
|
-
part="close"
|
|
64
|
-
class="close"
|
|
65
|
-
@click=${this.handleClose}
|
|
66
|
-
aria-label="Dismiss"
|
|
67
|
-
>
|
|
68
|
-
<svg
|
|
69
|
-
viewBox="0 0 24 24"
|
|
70
|
-
fill="none"
|
|
71
|
-
stroke="currentColor"
|
|
72
|
-
stroke-width="2"
|
|
73
|
-
stroke-linecap="round"
|
|
74
|
-
stroke-linejoin="round"
|
|
75
|
-
>
|
|
76
|
-
<line x1="18" y1="6" x2="6" y2="18"></line>
|
|
77
|
-
<line x1="6" y1="6" x2="18" y2="18"></line>
|
|
78
|
-
</svg>
|
|
79
|
-
</button>
|
|
80
|
-
` : ""}
|
|
81
|
-
</div>
|
|
82
|
-
`;
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
t.styles = [
|
|
86
|
-
y,
|
|
87
|
-
h`
|
|
88
|
-
:host {
|
|
89
|
-
display: block;
|
|
90
|
-
position: fixed;
|
|
91
|
-
bottom: var(--space-lg);
|
|
92
|
-
left: 50%;
|
|
93
|
-
transform: translateX(-50%);
|
|
94
|
-
z-index: 1000;
|
|
95
|
-
pointer-events: none;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.toast {
|
|
99
|
-
display: flex;
|
|
100
|
-
align-items: center;
|
|
101
|
-
gap: var(--space-sm);
|
|
102
|
-
padding: var(--space-md) var(--space-lg);
|
|
103
|
-
border-radius: var(--radius-md);
|
|
104
|
-
font-family: var(--font-body);
|
|
105
|
-
font-size: var(--font-size-sm);
|
|
106
|
-
box-shadow: 0 4px 12px var(--overlay-shadow-subtle);
|
|
107
|
-
pointer-events: auto;
|
|
108
|
-
opacity: 0;
|
|
109
|
-
transform: translateY(100%);
|
|
110
|
-
transition: opacity var(--transition-smooth), transform var(--transition-smooth);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
:host([data-state='showing']) .toast,
|
|
114
|
-
:host([data-state='visible']) .toast {
|
|
115
|
-
opacity: 1;
|
|
116
|
-
transform: translateY(0);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
:host([data-state='hiding']) .toast {
|
|
120
|
-
opacity: 0;
|
|
121
|
-
transform: translateY(100%);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
:host([data-state='hidden']) {
|
|
125
|
-
display: none;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.toast--info {
|
|
129
|
-
background: var(--ink-dark);
|
|
130
|
-
color: var(--paper-white);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.toast--success {
|
|
134
|
-
background: var(--accent-success);
|
|
135
|
-
color: white;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.toast--warning {
|
|
139
|
-
background: var(--semantic-warning);
|
|
140
|
-
color: white;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
.toast--error {
|
|
144
|
-
background: var(--error-base);
|
|
145
|
-
color: white;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
.content {
|
|
149
|
-
flex: 1;
|
|
150
|
-
line-height: 1.4;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
.close {
|
|
154
|
-
flex-shrink: 0;
|
|
155
|
-
display: flex;
|
|
156
|
-
align-items: center;
|
|
157
|
-
justify-content: center;
|
|
158
|
-
width: var(--size-icon-md);
|
|
159
|
-
height: var(--size-icon-md);
|
|
160
|
-
padding: 0;
|
|
161
|
-
border: none;
|
|
162
|
-
background: transparent;
|
|
163
|
-
color: inherit;
|
|
164
|
-
opacity: var(--opacity-hover);
|
|
165
|
-
cursor: pointer;
|
|
166
|
-
transition: opacity var(--transition-fast);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.close:hover {
|
|
170
|
-
opacity: 1;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.close svg {
|
|
174
|
-
width: var(--size-icon-sm);
|
|
175
|
-
height: var(--size-icon-sm);
|
|
176
|
-
}
|
|
177
|
-
`
|
|
178
|
-
];
|
|
179
|
-
i([
|
|
180
|
-
e({ type: String })
|
|
181
|
-
], t.prototype, "variant", 2);
|
|
182
|
-
i([
|
|
183
|
-
e({ type: Number })
|
|
184
|
-
], t.prototype, "duration", 2);
|
|
185
|
-
i([
|
|
186
|
-
e({ type: Boolean, attribute: "auto-dismiss" })
|
|
187
|
-
], t.prototype, "autoDismiss", 2);
|
|
188
|
-
i([
|
|
189
|
-
e({ type: Boolean })
|
|
190
|
-
], t.prototype, "dismissible", 2);
|
|
191
|
-
i([
|
|
192
|
-
e({ type: Object })
|
|
193
|
-
], t.prototype, "sx", 2);
|
|
194
|
-
t = i([
|
|
195
|
-
p("tc-toast")
|
|
196
|
-
], t);
|
|
197
|
-
export {
|
|
198
|
-
t as TcToast
|
|
199
|
-
};
|
package/dist/screens/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/screens/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC"}
|
package/dist/screens/index.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { TcErrorScreen as c } from "./tc-error-screen.js";
|
|
2
|
-
import { TcLoadingScreen as n } from "./tc-loading-screen.js";
|
|
3
|
-
import { TcSuccessScreen as f } from "./tc-success-screen.js";
|
|
4
|
-
export {
|
|
5
|
-
c as TcErrorScreen,
|
|
6
|
-
n as TcLoadingScreen,
|
|
7
|
-
f as TcSuccessScreen
|
|
8
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
2
|
-
import { SxProps } from '../types.js';
|
|
3
|
-
/**
|
|
4
|
-
* A full-screen error state with animated icon, message, and retry action.
|
|
5
|
-
*
|
|
6
|
-
* @fires tc-retry - Fired when the retry button is clicked
|
|
7
|
-
* @csspart screen - The screen container
|
|
8
|
-
* @csspart content - The content wrapper
|
|
9
|
-
* @csspart icon - The error icon
|
|
10
|
-
* @csspart title - The error title
|
|
11
|
-
* @csspart message - The error message
|
|
12
|
-
* @csspart action - The action button container
|
|
13
|
-
*/
|
|
14
|
-
export declare class TcErrorScreen extends LitElement {
|
|
15
|
-
title: string;
|
|
16
|
-
message: string;
|
|
17
|
-
retryLabel: string;
|
|
18
|
-
showRetry: boolean;
|
|
19
|
-
autoAnimate: boolean;
|
|
20
|
-
sx: SxProps;
|
|
21
|
-
private isAnimated;
|
|
22
|
-
private animation;
|
|
23
|
-
static styles: import('lit').CSSResult;
|
|
24
|
-
connectedCallback(): void;
|
|
25
|
-
playAnimation(): Promise<void>;
|
|
26
|
-
private handleRetry;
|
|
27
|
-
render(): import('lit').TemplateResult<1>;
|
|
28
|
-
}
|
|
29
|
-
declare global {
|
|
30
|
-
interface HTMLElementTagNameMap {
|
|
31
|
-
'tc-error-screen': TcErrorScreen;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=tc-error-screen.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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,178 +0,0 @@
|
|
|
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;
|
|
14
|
-
};
|
|
15
|
-
let t = class extends d {
|
|
16
|
-
constructor() {
|
|
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;
|
|
29
|
-
}
|
|
30
|
-
handleRetry() {
|
|
31
|
-
this.dispatchEvent(
|
|
32
|
-
new CustomEvent("tc-retry", {
|
|
33
|
-
bubbles: !0,
|
|
34
|
-
composed: !0
|
|
35
|
-
})
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
render() {
|
|
39
|
-
const i = this.isAnimated ? "animated" : "";
|
|
40
|
-
return p`
|
|
41
|
-
<div part="screen" class="screen" style=${u(this.sx)}>
|
|
42
|
-
<tc-container>
|
|
43
|
-
<div part="content" class="content">
|
|
44
|
-
<div part="icon" class="icon-container ${i}">
|
|
45
|
-
<tc-icon name="alert-circle" .sx=${{ "--icon-size": "var(--size-icon-xl)" }}></tc-icon>
|
|
46
|
-
</div>
|
|
47
|
-
<tc-section .sx=${{ gap: "var(--space-sm)" }} class="text-content ${i}">
|
|
48
|
-
<tc-text part="title" tag="h1" size="xl" weight="600" class="title">
|
|
49
|
-
${this.title}
|
|
50
|
-
</tc-text>
|
|
51
|
-
<tc-text part="message" size="base" color="tertiary" class="message">
|
|
52
|
-
${this.message}
|
|
53
|
-
</tc-text>
|
|
54
|
-
</tc-section>
|
|
55
|
-
${this.showRetry ? p`
|
|
56
|
-
<div part="action" class="action ${i}">
|
|
57
|
-
<tc-button variant="primary" @tc-click=${this.handleRetry}>
|
|
58
|
-
${this.retryLabel}
|
|
59
|
-
</tc-button>
|
|
60
|
-
</div>
|
|
61
|
-
` : ""}
|
|
62
|
-
</div>
|
|
63
|
-
</tc-container>
|
|
64
|
-
</div>
|
|
65
|
-
`;
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
t.styles = m`
|
|
69
|
-
:host {
|
|
70
|
-
display: flex;
|
|
71
|
-
align-items: center;
|
|
72
|
-
justify-content: center;
|
|
73
|
-
width: 100%;
|
|
74
|
-
height: 100%;
|
|
75
|
-
min-height: inherit;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.screen {
|
|
79
|
-
display: flex;
|
|
80
|
-
align-items: center;
|
|
81
|
-
justify-content: center;
|
|
82
|
-
width: 100%;
|
|
83
|
-
height: 100%;
|
|
84
|
-
min-height: inherit;
|
|
85
|
-
padding: var(--space-lg);
|
|
86
|
-
box-sizing: border-box;
|
|
87
|
-
background: var(--paper-white);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.content {
|
|
91
|
-
display: flex;
|
|
92
|
-
flex-direction: column;
|
|
93
|
-
align-items: center;
|
|
94
|
-
gap: var(--space-lg);
|
|
95
|
-
text-align: center;
|
|
96
|
-
max-width: 20rem;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.icon-container {
|
|
100
|
-
display: flex;
|
|
101
|
-
align-items: center;
|
|
102
|
-
justify-content: center;
|
|
103
|
-
padding: var(--space-md);
|
|
104
|
-
background: var(--error-bg);
|
|
105
|
-
border-radius: var(--radius-full);
|
|
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;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.title {
|
|
119
|
-
margin: 0;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.message {
|
|
123
|
-
color: var(--ink-medium);
|
|
124
|
-
}
|
|
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
|
-
|
|
138
|
-
.action {
|
|
139
|
-
width: 100%;
|
|
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);
|
|
150
|
-
}
|
|
151
|
-
`;
|
|
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);
|
|
176
|
-
export {
|
|
177
|
-
t as TcErrorScreen
|
|
178
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
2
|
-
import { SxProps } from '../types.js';
|
|
3
|
-
/**
|
|
4
|
-
* A full-screen loading state with spinner and optional message.
|
|
5
|
-
*
|
|
6
|
-
* @csspart screen - The screen container
|
|
7
|
-
* @csspart content - The content wrapper
|
|
8
|
-
* @csspart spinner - The spinner element
|
|
9
|
-
* @csspart message - The message text
|
|
10
|
-
*/
|
|
11
|
-
export declare class TcLoadingScreen extends LitElement {
|
|
12
|
-
message: string;
|
|
13
|
-
spinnerSize: 'sm' | 'md' | 'lg' | 'auto';
|
|
14
|
-
sx: SxProps;
|
|
15
|
-
private loading;
|
|
16
|
-
static styles: import('lit').CSSResult;
|
|
17
|
-
connectedCallback(): void;
|
|
18
|
-
render(): import('lit').TemplateResult<1>;
|
|
19
|
-
}
|
|
20
|
-
declare global {
|
|
21
|
-
interface HTMLElementTagNameMap {
|
|
22
|
-
'tc-loading-screen': TcLoadingScreen;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=tc-loading-screen.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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,86 +0,0 @@
|
|
|
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;
|
|
12
|
-
};
|
|
13
|
-
let t = class extends g {
|
|
14
|
-
constructor() {
|
|
15
|
-
super(...arguments), this.message = "", this.spinnerSize = "md", this.sx = {}, this.loading = new y(this);
|
|
16
|
-
}
|
|
17
|
-
connectedCallback() {
|
|
18
|
-
super.connectedCallback(), this.loading.start();
|
|
19
|
-
}
|
|
20
|
-
render() {
|
|
21
|
-
return l`
|
|
22
|
-
<div part="screen" class="screen" style=${d(this.sx)}>
|
|
23
|
-
<tc-container>
|
|
24
|
-
<div part="content" class="content">
|
|
25
|
-
<tc-spinner part="spinner" size=${this.spinnerSize}></tc-spinner>
|
|
26
|
-
${this.message ? l`
|
|
27
|
-
<tc-text part="message" class="message" size="base" color="tertiary">
|
|
28
|
-
${this.message}
|
|
29
|
-
</tc-text>
|
|
30
|
-
` : ""}
|
|
31
|
-
</div>
|
|
32
|
-
</tc-container>
|
|
33
|
-
</div>
|
|
34
|
-
`;
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
t.styles = m`
|
|
38
|
-
:host {
|
|
39
|
-
display: flex;
|
|
40
|
-
align-items: center;
|
|
41
|
-
justify-content: center;
|
|
42
|
-
width: 100%;
|
|
43
|
-
height: 100%;
|
|
44
|
-
min-height: inherit;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.screen {
|
|
48
|
-
display: flex;
|
|
49
|
-
align-items: center;
|
|
50
|
-
justify-content: center;
|
|
51
|
-
width: 100%;
|
|
52
|
-
height: 100%;
|
|
53
|
-
min-height: inherit;
|
|
54
|
-
padding: var(--space-lg);
|
|
55
|
-
box-sizing: border-box;
|
|
56
|
-
background: var(--paper-white);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.content {
|
|
60
|
-
display: flex;
|
|
61
|
-
flex-direction: column;
|
|
62
|
-
align-items: center;
|
|
63
|
-
gap: var(--space-lg);
|
|
64
|
-
text-align: center;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.message {
|
|
68
|
-
color: var(--ink-medium);
|
|
69
|
-
max-width: 20rem;
|
|
70
|
-
}
|
|
71
|
-
`;
|
|
72
|
-
s([
|
|
73
|
-
c({ type: String })
|
|
74
|
-
], t.prototype, "message", 2);
|
|
75
|
-
s([
|
|
76
|
-
c({ type: String, attribute: "spinner-size" })
|
|
77
|
-
], t.prototype, "spinnerSize", 2);
|
|
78
|
-
s([
|
|
79
|
-
c({ type: Object })
|
|
80
|
-
], t.prototype, "sx", 2);
|
|
81
|
-
t = s([
|
|
82
|
-
h("tc-loading-screen")
|
|
83
|
-
], t);
|
|
84
|
-
export {
|
|
85
|
-
t as TcLoadingScreen
|
|
86
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
2
|
-
import { SxProps } from '../types.js';
|
|
3
|
-
/**
|
|
4
|
-
* A full-screen success state with animated checkmark and message.
|
|
5
|
-
*
|
|
6
|
-
* @fires tc-action - Fired when the action button is clicked
|
|
7
|
-
* @csspart screen - The screen container
|
|
8
|
-
* @csspart content - The content wrapper
|
|
9
|
-
* @csspart icon - The success icon container
|
|
10
|
-
* @csspart title - The success title
|
|
11
|
-
* @csspart message - The success message
|
|
12
|
-
* @csspart action - The action button container
|
|
13
|
-
*/
|
|
14
|
-
export declare class TcSuccessScreen extends LitElement {
|
|
15
|
-
title: string;
|
|
16
|
-
message: string;
|
|
17
|
-
actionLabel: string;
|
|
18
|
-
autoAnimate: boolean;
|
|
19
|
-
sx: SxProps;
|
|
20
|
-
private isAnimated;
|
|
21
|
-
private animation;
|
|
22
|
-
static styles: import('lit').CSSResult;
|
|
23
|
-
connectedCallback(): void;
|
|
24
|
-
playAnimation(): Promise<void>;
|
|
25
|
-
private handleAction;
|
|
26
|
-
render(): import('lit').TemplateResult<1>;
|
|
27
|
-
}
|
|
28
|
-
declare global {
|
|
29
|
-
interface HTMLElementTagNameMap {
|
|
30
|
-
'tc-success-screen': TcSuccessScreen;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=tc-success-screen.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|