@transcodes/ui-components 0.3.4 → 0.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist/controllers/animation.controller.d.ts +48 -0
  3. package/dist/controllers/animation.controller.d.ts.map +1 -0
  4. package/dist/controllers/base.controller.d.ts +14 -0
  5. package/dist/controllers/base.controller.d.ts.map +1 -0
  6. package/dist/controllers/history.controller.d.ts +34 -0
  7. package/dist/controllers/history.controller.d.ts.map +1 -0
  8. package/dist/controllers/index.d.ts +0 -2
  9. package/dist/controllers/index.d.ts.map +1 -0
  10. package/dist/controllers/index.js +10 -12
  11. package/dist/controllers/loading.controller.d.ts +36 -0
  12. package/dist/controllers/loading.controller.d.ts.map +1 -0
  13. package/dist/controllers/match-media.controller.d.ts +32 -0
  14. package/dist/controllers/match-media.controller.d.ts.map +1 -0
  15. package/dist/controllers/message-bus.controller.d.ts +45 -0
  16. package/dist/controllers/message-bus.controller.d.ts.map +1 -0
  17. package/dist/controllers/storage.controller.d.ts +40 -0
  18. package/dist/controllers/storage.controller.d.ts.map +1 -0
  19. package/dist/index.d.ts +4 -295
  20. package/dist/index.d.ts.map +1 -0
  21. package/dist/index.js +48 -64
  22. package/dist/primitives/index.d.ts +1 -0
  23. package/dist/primitives/index.d.ts.map +1 -0
  24. package/dist/primitives/index.js +18 -16
  25. package/dist/primitives/tc-box.d.ts +19 -0
  26. package/dist/primitives/tc-box.d.ts.map +1 -0
  27. package/dist/primitives/tc-box.js +4 -4
  28. package/dist/primitives/tc-button.d.ts +25 -0
  29. package/dist/primitives/tc-button.d.ts.map +1 -0
  30. package/dist/primitives/tc-button.js +21 -20
  31. package/dist/primitives/tc-callout.d.ts +22 -0
  32. package/dist/primitives/tc-callout.d.ts.map +1 -0
  33. package/dist/primitives/tc-callout.js +5 -4
  34. package/dist/primitives/tc-card.d.ts +20 -0
  35. package/dist/primitives/tc-card.d.ts.map +1 -0
  36. package/dist/primitives/tc-card.js +11 -10
  37. package/dist/primitives/tc-chip.d.ts +19 -0
  38. package/dist/primitives/tc-chip.d.ts.map +1 -0
  39. package/dist/primitives/tc-chip.js +18 -16
  40. package/dist/primitives/tc-container.d.ts +20 -0
  41. package/dist/primitives/tc-container.d.ts.map +1 -0
  42. package/dist/primitives/tc-container.js +12 -10
  43. package/dist/primitives/tc-divider.d.ts +22 -0
  44. package/dist/primitives/tc-divider.d.ts.map +1 -0
  45. package/dist/primitives/tc-divider.js +4 -3
  46. package/dist/primitives/tc-error-message.d.ts +23 -0
  47. package/dist/primitives/tc-error-message.d.ts.map +1 -0
  48. package/dist/primitives/tc-error-message.js +13 -9
  49. package/dist/primitives/tc-form-header.d.ts +25 -0
  50. package/dist/primitives/tc-form-header.d.ts.map +1 -0
  51. package/dist/primitives/tc-form-header.js +9 -7
  52. package/dist/primitives/tc-icon.d.ts +20 -0
  53. package/dist/primitives/tc-icon.d.ts.map +1 -0
  54. package/dist/primitives/tc-icon.js +3 -3
  55. package/dist/primitives/tc-input-with-chip.d.ts +38 -0
  56. package/dist/primitives/tc-input-with-chip.d.ts.map +1 -0
  57. package/dist/primitives/tc-input-with-chip.js +12 -8
  58. package/dist/primitives/tc-input.d.ts +45 -0
  59. package/dist/primitives/tc-input.d.ts.map +1 -0
  60. package/dist/primitives/tc-input.js +11 -9
  61. package/dist/primitives/tc-item-button.d.ts +30 -0
  62. package/dist/primitives/tc-item-button.d.ts.map +1 -0
  63. package/dist/primitives/tc-item-button.js +18 -17
  64. package/dist/primitives/tc-item.d.ts +25 -0
  65. package/dist/primitives/tc-item.d.ts.map +1 -0
  66. package/dist/primitives/tc-item.js +13 -12
  67. package/dist/primitives/tc-otp-input.d.ts +38 -0
  68. package/dist/primitives/tc-otp-input.d.ts.map +1 -0
  69. package/dist/primitives/tc-otp-input.js +6 -4
  70. package/dist/primitives/tc-page-decoration.d.ts +19 -0
  71. package/dist/primitives/tc-page-decoration.d.ts.map +1 -0
  72. package/dist/{widgets → primitives}/tc-page-decoration.js +8 -8
  73. package/dist/primitives/tc-section.d.ts +19 -0
  74. package/dist/primitives/tc-section.d.ts.map +1 -0
  75. package/dist/primitives/tc-section.js +15 -13
  76. package/dist/primitives/tc-spinner.d.ts +20 -0
  77. package/dist/primitives/tc-spinner.d.ts.map +1 -0
  78. package/dist/primitives/tc-spinner.js +17 -17
  79. package/dist/primitives/tc-symbol.d.ts +20 -0
  80. package/dist/primitives/tc-symbol.d.ts.map +1 -0
  81. package/dist/primitives/tc-symbol.js +15 -13
  82. package/dist/primitives/tc-text.d.ts +31 -0
  83. package/dist/primitives/tc-text.d.ts.map +1 -0
  84. package/dist/primitives/tc-text.js +3 -3
  85. package/dist/primitives/tc-toast.d.ts +34 -0
  86. package/dist/primitives/tc-toast.d.ts.map +1 -0
  87. package/dist/primitives/tc-toast.js +3 -3
  88. package/dist/screens/index.d.ts.map +1 -0
  89. package/dist/screens/tc-error-screen.d.ts +32 -0
  90. package/dist/screens/tc-error-screen.d.ts.map +1 -0
  91. package/dist/screens/tc-error-screen.js +84 -29
  92. package/dist/screens/tc-loading-screen.d.ts +23 -0
  93. package/dist/screens/tc-loading-screen.d.ts.map +1 -0
  94. package/dist/screens/tc-loading-screen.js +16 -11
  95. package/dist/screens/tc-success-screen.d.ts +31 -0
  96. package/dist/screens/tc-success-screen.d.ts.map +1 -0
  97. package/dist/screens/tc-success-screen.js +19 -13
  98. package/dist/styles/shared.d.ts +20 -0
  99. package/dist/styles/shared.d.ts.map +1 -0
  100. package/package.json +13 -13
  101. package/dist/controllers/form-validation.controller.js +0 -49
  102. package/dist/widgets/index.d.ts +0 -9
  103. package/dist/widgets/index.js +0 -18
  104. package/dist/widgets/tc-authenticator-card.js +0 -213
  105. package/dist/widgets/tc-floating-button.js +0 -132
  106. package/dist/widgets/tc-iframe-modal.js +0 -263
  107. package/dist/widgets/tc-installation-banner.js +0 -234
  108. package/dist/widgets/tc-ios-installation-guide.js +0 -240
  109. package/dist/widgets/tc-notification-modal.js +0 -230
  110. package/dist/widgets/tc-offline-modal.js +0 -202
@@ -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
- };