@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,202 +0,0 @@
|
|
|
1
|
-
import { LitElement as c, html as h, css as p } from "lit";
|
|
2
|
-
import { property as o, state as f, customElement as v } from "lit/decorators.js";
|
|
3
|
-
import { AnimationController as m } from "../controllers/animation.controller.js";
|
|
4
|
-
import { sharedStyles as y } from "../styles/shared.js";
|
|
5
|
-
var u = Object.defineProperty, b = Object.getOwnPropertyDescriptor, i = (d, a, s, n) => {
|
|
6
|
-
for (var e = n > 1 ? void 0 : n ? b(a, s) : a, r = d.length - 1, l; r >= 0; r--)
|
|
7
|
-
(l = d[r]) && (e = (n ? l(a, s, e) : l(e)) || e);
|
|
8
|
-
return n && e && u(a, s, e), e;
|
|
9
|
-
};
|
|
10
|
-
let t = class extends c {
|
|
11
|
-
constructor() {
|
|
12
|
-
super(...arguments), this.title = "No Connection", this.description = "Please check your internet connection and try again.", this.retryLabel = "Try Again", this.autoDetect = !0, this.isOffline = !1, this.animation = new m(this, {
|
|
13
|
-
showDuration: 300,
|
|
14
|
-
hideDuration: 200
|
|
15
|
-
}), this.handleOnline = () => {
|
|
16
|
-
this.isOffline = !1, this.hide(), this.dispatchEvent(
|
|
17
|
-
new CustomEvent("tc-online", {
|
|
18
|
-
bubbles: !0,
|
|
19
|
-
composed: !0
|
|
20
|
-
})
|
|
21
|
-
);
|
|
22
|
-
}, this.handleOffline = () => {
|
|
23
|
-
this.isOffline = !0, this.show(), this.dispatchEvent(
|
|
24
|
-
new CustomEvent("tc-offline", {
|
|
25
|
-
bubbles: !0,
|
|
26
|
-
composed: !0
|
|
27
|
-
})
|
|
28
|
-
);
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
connectedCallback() {
|
|
32
|
-
super.connectedCallback(), this.updateDataState(), this.autoDetect && (this.isOffline = !navigator.onLine, this.isOffline && this.show(), window.addEventListener("online", this.handleOnline), window.addEventListener("offline", this.handleOffline));
|
|
33
|
-
}
|
|
34
|
-
disconnectedCallback() {
|
|
35
|
-
super.disconnectedCallback(), window.removeEventListener("online", this.handleOnline), window.removeEventListener("offline", this.handleOffline);
|
|
36
|
-
}
|
|
37
|
-
updateDataState() {
|
|
38
|
-
this.dataset.state = this.animation.state;
|
|
39
|
-
}
|
|
40
|
-
async show() {
|
|
41
|
-
await this.animation.show(), this.updateDataState();
|
|
42
|
-
}
|
|
43
|
-
async hide() {
|
|
44
|
-
await this.animation.hide(), this.updateDataState();
|
|
45
|
-
}
|
|
46
|
-
handleRetry() {
|
|
47
|
-
this.dispatchEvent(
|
|
48
|
-
new CustomEvent("tc-retry", {
|
|
49
|
-
bubbles: !0,
|
|
50
|
-
composed: !0
|
|
51
|
-
})
|
|
52
|
-
), navigator.onLine && this.handleOnline();
|
|
53
|
-
}
|
|
54
|
-
render() {
|
|
55
|
-
return h`
|
|
56
|
-
<div part="overlay" class="overlay">
|
|
57
|
-
<div
|
|
58
|
-
part="modal"
|
|
59
|
-
class="modal"
|
|
60
|
-
role="alertdialog"
|
|
61
|
-
aria-modal="true"
|
|
62
|
-
aria-labelledby="offline-title"
|
|
63
|
-
aria-describedby="offline-description"
|
|
64
|
-
>
|
|
65
|
-
<div part="icon" class="icon-container">
|
|
66
|
-
<tc-icon name="wifi-off" size="2rem"></tc-icon>
|
|
67
|
-
</div>
|
|
68
|
-
<tc-section part="content" class="content" gap="var(--space-sm)">
|
|
69
|
-
<tc-text
|
|
70
|
-
id="offline-title"
|
|
71
|
-
part="title"
|
|
72
|
-
class="title"
|
|
73
|
-
tag="h2"
|
|
74
|
-
size="lg"
|
|
75
|
-
weight="600"
|
|
76
|
-
>
|
|
77
|
-
${this.title}
|
|
78
|
-
</tc-text>
|
|
79
|
-
<tc-text
|
|
80
|
-
id="offline-description"
|
|
81
|
-
part="description"
|
|
82
|
-
size="base"
|
|
83
|
-
color="tertiary"
|
|
84
|
-
>
|
|
85
|
-
${this.description}
|
|
86
|
-
</tc-text>
|
|
87
|
-
</tc-section>
|
|
88
|
-
<div part="action" class="action">
|
|
89
|
-
<tc-button variant="primary" @tc-click=${this.handleRetry}>
|
|
90
|
-
${this.retryLabel}
|
|
91
|
-
</tc-button>
|
|
92
|
-
</div>
|
|
93
|
-
</div>
|
|
94
|
-
</div>
|
|
95
|
-
`;
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
t.styles = [
|
|
99
|
-
y,
|
|
100
|
-
p`
|
|
101
|
-
:host {
|
|
102
|
-
display: contents;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.overlay {
|
|
106
|
-
position: fixed;
|
|
107
|
-
inset: 0;
|
|
108
|
-
z-index: 1001;
|
|
109
|
-
display: flex;
|
|
110
|
-
align-items: center;
|
|
111
|
-
justify-content: center;
|
|
112
|
-
padding: var(--space-lg);
|
|
113
|
-
background: var(--overlay-dark);
|
|
114
|
-
opacity: 0;
|
|
115
|
-
visibility: hidden;
|
|
116
|
-
transition: opacity var(--transition-smooth), visibility var(--transition-smooth);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
:host([data-state='showing']) .overlay,
|
|
120
|
-
:host([data-state='visible']) .overlay {
|
|
121
|
-
opacity: 1;
|
|
122
|
-
visibility: visible;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
:host([data-state='hiding']) .overlay {
|
|
126
|
-
opacity: 0;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
:host([data-state='hidden']) .overlay {
|
|
130
|
-
visibility: hidden;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.modal {
|
|
134
|
-
display: flex;
|
|
135
|
-
flex-direction: column;
|
|
136
|
-
align-items: center;
|
|
137
|
-
width: 100%;
|
|
138
|
-
max-width: 320px;
|
|
139
|
-
padding: var(--space-xl);
|
|
140
|
-
background: var(--paper-white);
|
|
141
|
-
border-radius: var(--radius-lg);
|
|
142
|
-
box-shadow: 0 20px 60px var(--overlay-shadow-heavy);
|
|
143
|
-
text-align: center;
|
|
144
|
-
transform: scale(0.95);
|
|
145
|
-
transition: transform var(--transition-smooth);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
:host([data-state='showing']) .modal,
|
|
149
|
-
:host([data-state='visible']) .modal {
|
|
150
|
-
transform: scale(1);
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
:host([data-state='hiding']) .modal {
|
|
154
|
-
transform: scale(0.95);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.icon-container {
|
|
158
|
-
display: flex;
|
|
159
|
-
align-items: center;
|
|
160
|
-
justify-content: center;
|
|
161
|
-
width: 4rem;
|
|
162
|
-
height: 4rem;
|
|
163
|
-
margin-bottom: var(--space-lg);
|
|
164
|
-
background: var(--error-bg);
|
|
165
|
-
border-radius: var(--radius-full);
|
|
166
|
-
color: var(--error-base);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.content {
|
|
170
|
-
margin-bottom: var(--space-xl);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.title {
|
|
174
|
-
margin-bottom: var(--space-sm);
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
.action {
|
|
178
|
-
width: 100%;
|
|
179
|
-
}
|
|
180
|
-
`
|
|
181
|
-
];
|
|
182
|
-
i([
|
|
183
|
-
o({ type: String })
|
|
184
|
-
], t.prototype, "title", 2);
|
|
185
|
-
i([
|
|
186
|
-
o({ type: String })
|
|
187
|
-
], t.prototype, "description", 2);
|
|
188
|
-
i([
|
|
189
|
-
o({ type: String, attribute: "retry-label" })
|
|
190
|
-
], t.prototype, "retryLabel", 2);
|
|
191
|
-
i([
|
|
192
|
-
o({ type: Boolean, attribute: "auto-detect" })
|
|
193
|
-
], t.prototype, "autoDetect", 2);
|
|
194
|
-
i([
|
|
195
|
-
f()
|
|
196
|
-
], t.prototype, "isOffline", 2);
|
|
197
|
-
t = i([
|
|
198
|
-
v("tc-offline-modal")
|
|
199
|
-
], t);
|
|
200
|
-
export {
|
|
201
|
-
t as TcOfflineModal
|
|
202
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tc-page-decoration.d.ts","sourceRoot":"","sources":["../../src/widgets/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;IAEZ,OAAgB,MAAM,4BA8FpB;IAEO,MAAM;CAShB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,oBAAoB,EAAE,gBAAgB,CAAC;KACxC;CACF"}
|