@transcodes/ui-components 0.3.0 → 0.3.2
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 +83 -0
- package/README.md +124 -79
- package/dist/controllers/animation.controller.js +32 -0
- package/dist/controllers/base.controller.js +8 -0
- package/dist/controllers/form-validation.controller.js +49 -0
- package/dist/controllers/history.controller.js +26 -0
- package/dist/controllers/index.d.ts +11 -0
- package/dist/controllers/index.js +18 -0
- package/dist/controllers/loading.controller.js +27 -0
- package/dist/controllers/match-media.controller.js +20 -0
- package/dist/controllers/message-bus.controller.js +45 -0
- package/dist/controllers/storage.controller.js +40 -0
- package/dist/index.d.ts +0 -696
- package/dist/index.js +80 -0
- package/dist/primitives/index.d.ts +21 -0
- package/dist/primitives/index.js +42 -0
- package/dist/primitives/tc-box.js +38 -0
- package/dist/primitives/tc-button.js +167 -0
- package/dist/primitives/tc-callout.js +86 -0
- package/dist/primitives/tc-card.js +76 -0
- package/dist/primitives/tc-chip.js +79 -0
- package/dist/primitives/tc-container.js +62 -0
- package/dist/primitives/tc-divider.js +76 -0
- package/dist/primitives/tc-error-message.js +74 -0
- package/dist/primitives/tc-form-header.js +120 -0
- package/dist/primitives/tc-icon.js +95 -0
- package/dist/primitives/tc-input-with-chip.js +242 -0
- package/dist/primitives/tc-input.js +262 -0
- package/dist/primitives/tc-item-button.js +168 -0
- package/dist/primitives/tc-item.js +93 -0
- package/dist/primitives/tc-otp-input.js +230 -0
- package/dist/primitives/tc-section.js +48 -0
- package/dist/primitives/tc-spinner.js +87 -0
- package/dist/primitives/tc-symbol.js +56 -0
- package/dist/primitives/tc-text.js +145 -0
- package/dist/primitives/tc-toast.js +189 -0
- package/dist/screens/index.d.ts +4 -0
- package/dist/screens/index.js +8 -0
- package/dist/screens/tc-error-screen.js +119 -0
- package/dist/screens/tc-loading-screen.js +77 -0
- package/dist/screens/tc-success-screen.js +192 -0
- package/dist/styles/shared.js +7 -0
- package/dist/widgets/index.d.ts +9 -0
- package/dist/widgets/index.js +18 -0
- package/dist/widgets/tc-authenticator-card.js +213 -0
- package/dist/widgets/tc-floating-button.js +132 -0
- package/dist/widgets/tc-iframe-modal.js +263 -0
- package/dist/widgets/tc-installation-banner.js +234 -0
- package/dist/widgets/tc-ios-installation-guide.js +240 -0
- package/dist/widgets/tc-notification-modal.js +230 -0
- package/dist/widgets/tc-offline-modal.js +202 -0
- package/dist/widgets/tc-page-decoration.js +126 -0
- package/package.json +25 -7
- package/dist/ui-components.css +0 -1
- package/dist/ui-components.js +0 -4981
package/dist/index.js
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { AnimationController as t } from "./controllers/animation.controller.js";
|
|
2
|
+
import { BaseController as m } from "./controllers/base.controller.js";
|
|
3
|
+
import { FormValidationController as f } from "./controllers/form-validation.controller.js";
|
|
4
|
+
import { HistoryController as x } from "./controllers/history.controller.js";
|
|
5
|
+
import { LoadingController as T } from "./controllers/loading.controller.js";
|
|
6
|
+
import { MatchMediaController as l } from "./controllers/match-media.controller.js";
|
|
7
|
+
import { MessageBusController as C } from "./controllers/message-bus.controller.js";
|
|
8
|
+
import { StorageController as d } from "./controllers/storage.controller.js";
|
|
9
|
+
import { TcBox as I } from "./primitives/tc-box.js";
|
|
10
|
+
import { TcButton as g } from "./primitives/tc-button.js";
|
|
11
|
+
import { TcCallout as M } from "./primitives/tc-callout.js";
|
|
12
|
+
import { TcCard as F } from "./primitives/tc-card.js";
|
|
13
|
+
import { TcChip as A } from "./primitives/tc-chip.js";
|
|
14
|
+
import { TcContainer as E } from "./primitives/tc-container.js";
|
|
15
|
+
import { TcDivider as L } from "./primitives/tc-divider.js";
|
|
16
|
+
import { TcErrorMessage as b } from "./primitives/tc-error-message.js";
|
|
17
|
+
import { TcFormHeader as G } from "./primitives/tc-form-header.js";
|
|
18
|
+
import { TcIcon as P } from "./primitives/tc-icon.js";
|
|
19
|
+
import { TcInput as W } from "./primitives/tc-input.js";
|
|
20
|
+
import { TcInputWithChip as k } from "./primitives/tc-input-with-chip.js";
|
|
21
|
+
import { TcItem as w } from "./primitives/tc-item.js";
|
|
22
|
+
import { TcItemButton as J } from "./primitives/tc-item-button.js";
|
|
23
|
+
import { TcOtpInput as Q } from "./primitives/tc-otp-input.js";
|
|
24
|
+
import { TcSection as U } from "./primitives/tc-section.js";
|
|
25
|
+
import { TcSpinner as Y } from "./primitives/tc-spinner.js";
|
|
26
|
+
import { TcSymbol as _ } from "./primitives/tc-symbol.js";
|
|
27
|
+
import { TcText as oo } from "./primitives/tc-text.js";
|
|
28
|
+
import { TcToast as to } from "./primitives/tc-toast.js";
|
|
29
|
+
import { TcErrorScreen as mo } from "./screens/tc-error-screen.js";
|
|
30
|
+
import { TcLoadingScreen as fo } from "./screens/tc-loading-screen.js";
|
|
31
|
+
import { TcSuccessScreen as xo } from "./screens/tc-success-screen.js";
|
|
32
|
+
import { TcAuthenticatorCard as To } from "./widgets/tc-authenticator-card.js";
|
|
33
|
+
import { TcFloatingButton as lo } from "./widgets/tc-floating-button.js";
|
|
34
|
+
import { TcIframeModal as Co } from "./widgets/tc-iframe-modal.js";
|
|
35
|
+
import { TcInstallationBanner as uo } from "./widgets/tc-installation-banner.js";
|
|
36
|
+
import { TcIosInstallationGuide as So } from "./widgets/tc-ios-installation-guide.js";
|
|
37
|
+
import { TcNotificationModal as Bo } from "./widgets/tc-notification-modal.js";
|
|
38
|
+
import { TcOfflineModal as ho } from "./widgets/tc-offline-modal.js";
|
|
39
|
+
import { TcPageDecoration as yo } from "./widgets/tc-page-decoration.js";
|
|
40
|
+
export {
|
|
41
|
+
t as AnimationController,
|
|
42
|
+
m as BaseController,
|
|
43
|
+
f as FormValidationController,
|
|
44
|
+
x as HistoryController,
|
|
45
|
+
T as LoadingController,
|
|
46
|
+
l as MatchMediaController,
|
|
47
|
+
C as MessageBusController,
|
|
48
|
+
d as StorageController,
|
|
49
|
+
To as TcAuthenticatorCard,
|
|
50
|
+
I as TcBox,
|
|
51
|
+
g as TcButton,
|
|
52
|
+
M as TcCallout,
|
|
53
|
+
F as TcCard,
|
|
54
|
+
A as TcChip,
|
|
55
|
+
E as TcContainer,
|
|
56
|
+
L as TcDivider,
|
|
57
|
+
b as TcErrorMessage,
|
|
58
|
+
mo as TcErrorScreen,
|
|
59
|
+
lo as TcFloatingButton,
|
|
60
|
+
G as TcFormHeader,
|
|
61
|
+
P as TcIcon,
|
|
62
|
+
Co as TcIframeModal,
|
|
63
|
+
W as TcInput,
|
|
64
|
+
k as TcInputWithChip,
|
|
65
|
+
uo as TcInstallationBanner,
|
|
66
|
+
So as TcIosInstallationGuide,
|
|
67
|
+
w as TcItem,
|
|
68
|
+
J as TcItemButton,
|
|
69
|
+
fo as TcLoadingScreen,
|
|
70
|
+
Bo as TcNotificationModal,
|
|
71
|
+
ho as TcOfflineModal,
|
|
72
|
+
Q as TcOtpInput,
|
|
73
|
+
yo as TcPageDecoration,
|
|
74
|
+
U as TcSection,
|
|
75
|
+
Y as TcSpinner,
|
|
76
|
+
xo as TcSuccessScreen,
|
|
77
|
+
_ as TcSymbol,
|
|
78
|
+
oo as TcText,
|
|
79
|
+
to as TcToast
|
|
80
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export { TcBox } from './tc-box.js';
|
|
2
|
+
export { TcButton } from './tc-button.js';
|
|
3
|
+
export { TcCallout } from './tc-callout.js';
|
|
4
|
+
export { TcCard } from './tc-card.js';
|
|
5
|
+
export { TcChip } from './tc-chip.js';
|
|
6
|
+
export { TcContainer } from './tc-container.js';
|
|
7
|
+
export { TcDivider } from './tc-divider.js';
|
|
8
|
+
export { TcErrorMessage } from './tc-error-message.js';
|
|
9
|
+
export { TcFormHeader } from './tc-form-header.js';
|
|
10
|
+
export { type IconName, TcIcon } from './tc-icon.js';
|
|
11
|
+
export { TcInput } from './tc-input.js';
|
|
12
|
+
export { TcInputWithChip } from './tc-input-with-chip.js';
|
|
13
|
+
export { TcItem } from './tc-item.js';
|
|
14
|
+
export { TcItemButton } from './tc-item-button.js';
|
|
15
|
+
export { TcOtpInput } from './tc-otp-input.js';
|
|
16
|
+
export { TcSection } from './tc-section.js';
|
|
17
|
+
export { TcSpinner } from './tc-spinner.js';
|
|
18
|
+
export { TcSymbol } from './tc-symbol.js';
|
|
19
|
+
export { TcText } from './tc-text.js';
|
|
20
|
+
export { TcToast } from './tc-toast.js';
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { TcBox as t } from "./tc-box.js";
|
|
2
|
+
import { TcButton as p } from "./tc-button.js";
|
|
3
|
+
import { TcCallout as c } from "./tc-callout.js";
|
|
4
|
+
import { TcCard as T } from "./tc-card.js";
|
|
5
|
+
import { TcChip as n } from "./tc-chip.js";
|
|
6
|
+
import { TcContainer as a } from "./tc-container.js";
|
|
7
|
+
import { TcDivider as I } from "./tc-divider.js";
|
|
8
|
+
import { TcErrorMessage as d } from "./tc-error-message.js";
|
|
9
|
+
import { TcFormHeader as l } from "./tc-form-header.js";
|
|
10
|
+
import { TcIcon as B } from "./tc-icon.js";
|
|
11
|
+
import { TcInput as b } from "./tc-input.js";
|
|
12
|
+
import { TcInputWithChip as v } from "./tc-input-with-chip.js";
|
|
13
|
+
import { TcItem as D } from "./tc-item.js";
|
|
14
|
+
import { TcItemButton as F } from "./tc-item-button.js";
|
|
15
|
+
import { TcOtpInput as M } from "./tc-otp-input.js";
|
|
16
|
+
import { TcSection as W } from "./tc-section.js";
|
|
17
|
+
import { TcSpinner as k } from "./tc-spinner.js";
|
|
18
|
+
import { TcSymbol as w } from "./tc-symbol.js";
|
|
19
|
+
import { TcText as A } from "./tc-text.js";
|
|
20
|
+
import { TcToast as J } from "./tc-toast.js";
|
|
21
|
+
export {
|
|
22
|
+
t as TcBox,
|
|
23
|
+
p as TcButton,
|
|
24
|
+
c as TcCallout,
|
|
25
|
+
T as TcCard,
|
|
26
|
+
n as TcChip,
|
|
27
|
+
a as TcContainer,
|
|
28
|
+
I as TcDivider,
|
|
29
|
+
d as TcErrorMessage,
|
|
30
|
+
l as TcFormHeader,
|
|
31
|
+
B as TcIcon,
|
|
32
|
+
b as TcInput,
|
|
33
|
+
v as TcInputWithChip,
|
|
34
|
+
D as TcItem,
|
|
35
|
+
F as TcItemButton,
|
|
36
|
+
M as TcOtpInput,
|
|
37
|
+
W as TcSection,
|
|
38
|
+
k as TcSpinner,
|
|
39
|
+
w as TcSymbol,
|
|
40
|
+
A as TcText,
|
|
41
|
+
J as TcToast
|
|
42
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { LitElement as n, html as i, css as x } from "lit";
|
|
2
|
+
import { property as a, customElement as b } from "lit/decorators.js";
|
|
3
|
+
import { styleMap as f } from "lit/directives/style-map.js";
|
|
4
|
+
var v = Object.defineProperty, y = Object.getOwnPropertyDescriptor, m = (c, s, o, e) => {
|
|
5
|
+
for (var t = e > 1 ? void 0 : e ? y(s, o) : s, p = c.length - 1, l; p >= 0; p--)
|
|
6
|
+
(l = c[p]) && (t = (e ? l(s, o, t) : l(t)) || t);
|
|
7
|
+
return e && t && v(s, o, t), t;
|
|
8
|
+
};
|
|
9
|
+
let r = class extends n {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments), this.sx = {};
|
|
12
|
+
}
|
|
13
|
+
render() {
|
|
14
|
+
return i`
|
|
15
|
+
<div part="box" class="box" style=${f(this.sx)}>
|
|
16
|
+
<slot></slot>
|
|
17
|
+
</div>
|
|
18
|
+
`;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
r.styles = x`
|
|
22
|
+
:host {
|
|
23
|
+
display: contents;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.box {
|
|
27
|
+
display: block;
|
|
28
|
+
}
|
|
29
|
+
`;
|
|
30
|
+
m([
|
|
31
|
+
a({ type: Object })
|
|
32
|
+
], r.prototype, "sx", 2);
|
|
33
|
+
r = m([
|
|
34
|
+
b("tc-box")
|
|
35
|
+
], r);
|
|
36
|
+
export {
|
|
37
|
+
r as TcBox
|
|
38
|
+
};
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { LitElement as p, html as l, css as u } from "lit";
|
|
2
|
+
import { property as r, customElement as b } from "lit/decorators.js";
|
|
3
|
+
import { classMap as v } from "lit/directives/class-map.js";
|
|
4
|
+
import { styleMap as y } from "lit/directives/style-map.js";
|
|
5
|
+
import { sharedStyles as m } from "../styles/shared.js";
|
|
6
|
+
var h = Object.defineProperty, f = Object.getOwnPropertyDescriptor, n = (o, i, s, a) => {
|
|
7
|
+
for (var t = a > 1 ? void 0 : a ? f(i, s) : i, d = o.length - 1, c; d >= 0; d--)
|
|
8
|
+
(c = o[d]) && (t = (a ? c(i, s, t) : c(t)) || t);
|
|
9
|
+
return a && t && h(i, s, t), t;
|
|
10
|
+
};
|
|
11
|
+
let e = class extends p {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments), this.disabled = !1, this.loading = !1, this.variant = "primary", this.sx = {};
|
|
14
|
+
}
|
|
15
|
+
render() {
|
|
16
|
+
const o = {
|
|
17
|
+
button: !0,
|
|
18
|
+
"button-ink": this.variant !== "secondary",
|
|
19
|
+
"button-primary": this.variant === "primary",
|
|
20
|
+
"button-secondary": this.variant === "secondary",
|
|
21
|
+
"button-success": this.variant === "success",
|
|
22
|
+
"button--loading": this.loading
|
|
23
|
+
};
|
|
24
|
+
return l`
|
|
25
|
+
<button
|
|
26
|
+
part="button"
|
|
27
|
+
class=${v(o)}
|
|
28
|
+
style=${y(this.sx)}
|
|
29
|
+
?disabled=${this.disabled || this.loading}
|
|
30
|
+
type="button"
|
|
31
|
+
@click=${this.handleClick}
|
|
32
|
+
>
|
|
33
|
+
<span class="button-content">
|
|
34
|
+
${this.loading ? l`<div part="spinner" class="button-spinner"></div>` : ""}
|
|
35
|
+
<slot></slot>
|
|
36
|
+
</span>
|
|
37
|
+
</button>
|
|
38
|
+
`;
|
|
39
|
+
}
|
|
40
|
+
handleClick(o) {
|
|
41
|
+
this.disabled || this.loading || this.dispatchEvent(
|
|
42
|
+
new CustomEvent("tc-click", {
|
|
43
|
+
bubbles: !0,
|
|
44
|
+
composed: !0,
|
|
45
|
+
detail: { originalEvent: o }
|
|
46
|
+
})
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
e.styles = [
|
|
51
|
+
m,
|
|
52
|
+
u`
|
|
53
|
+
:host {
|
|
54
|
+
display: block;
|
|
55
|
+
width: 100%;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* Extend base .button from design-tokens */
|
|
59
|
+
.button {
|
|
60
|
+
position: relative;
|
|
61
|
+
width: 100%;
|
|
62
|
+
display: flex;
|
|
63
|
+
align-items: center;
|
|
64
|
+
justify-content: center;
|
|
65
|
+
gap: var(--space-sm);
|
|
66
|
+
overflow: hidden;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* Radial gradient glow overlay for primary/success */
|
|
70
|
+
.button-ink::before {
|
|
71
|
+
content: '';
|
|
72
|
+
position: absolute;
|
|
73
|
+
inset: 0;
|
|
74
|
+
border-radius: inherit;
|
|
75
|
+
background: radial-gradient(
|
|
76
|
+
circle at center,
|
|
77
|
+
transparent 0%,
|
|
78
|
+
var(--overlay-glow-white) 100%
|
|
79
|
+
);
|
|
80
|
+
opacity: var(--opacity-hidden);
|
|
81
|
+
transition: opacity 600ms ease;
|
|
82
|
+
pointer-events: none;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.button-ink:hover:not(:disabled)::before {
|
|
86
|
+
opacity: 1;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* Loading pulse animation */
|
|
90
|
+
.button--loading {
|
|
91
|
+
animation: pulse 1s ease-in-out infinite;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@keyframes pulse {
|
|
95
|
+
0%,
|
|
96
|
+
100% {
|
|
97
|
+
opacity: var(--opacity-visible);
|
|
98
|
+
}
|
|
99
|
+
50% {
|
|
100
|
+
opacity: var(--opacity-loading);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/* Active states - design-tokens doesn't include these */
|
|
105
|
+
.button-primary:active:not(:disabled) {
|
|
106
|
+
background: var(--accent-primary-pressed);
|
|
107
|
+
transform: translateY(0);
|
|
108
|
+
box-shadow: none;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.button-success:active:not(:disabled) {
|
|
112
|
+
background: var(--accent-success-pressed);
|
|
113
|
+
transform: translateY(0);
|
|
114
|
+
box-shadow: none;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.button-secondary:active:not(:disabled) {
|
|
118
|
+
background: var(--alpha-primary08);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/* Secondary spinner override */
|
|
122
|
+
.button-secondary .button-spinner {
|
|
123
|
+
border-color: var(--alpha-primary30);
|
|
124
|
+
border-top-color: var(--accent-primary);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/* Focus visible state */
|
|
128
|
+
.button:focus-visible {
|
|
129
|
+
outline: var(--size-border-width-thick) solid var(--accent-primary);
|
|
130
|
+
outline-offset: var(--size-border-width-thick);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/* Reduced motion */
|
|
134
|
+
@media (prefers-reduced-motion: reduce) {
|
|
135
|
+
.button,
|
|
136
|
+
.button-ink::before {
|
|
137
|
+
transition-duration: 0.01ms !important;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.button--loading {
|
|
141
|
+
animation: none;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.button-spinner {
|
|
145
|
+
animation-duration: 1.5s;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
`
|
|
149
|
+
];
|
|
150
|
+
n([
|
|
151
|
+
r({ type: Boolean })
|
|
152
|
+
], e.prototype, "disabled", 2);
|
|
153
|
+
n([
|
|
154
|
+
r({ type: Boolean })
|
|
155
|
+
], e.prototype, "loading", 2);
|
|
156
|
+
n([
|
|
157
|
+
r({ type: String })
|
|
158
|
+
], e.prototype, "variant", 2);
|
|
159
|
+
n([
|
|
160
|
+
r({ type: Object })
|
|
161
|
+
], e.prototype, "sx", 2);
|
|
162
|
+
e = n([
|
|
163
|
+
b("tc-button")
|
|
164
|
+
], e);
|
|
165
|
+
export {
|
|
166
|
+
e as TcButton
|
|
167
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { LitElement as c, html as m, css as p } from "lit";
|
|
2
|
+
import { property as v, customElement as d } from "lit/decorators.js";
|
|
3
|
+
import { classMap as u } from "lit/directives/class-map.js";
|
|
4
|
+
import { sharedStyles as f } from "../styles/shared.js";
|
|
5
|
+
var h = Object.defineProperty, y = Object.getOwnPropertyDescriptor, l = (n, e, s, r) => {
|
|
6
|
+
for (var t = r > 1 ? void 0 : r ? y(e, s) : e, i = n.length - 1, a; i >= 0; i--)
|
|
7
|
+
(a = n[i]) && (t = (r ? a(e, s, t) : a(t)) || t);
|
|
8
|
+
return r && t && h(e, s, t), t;
|
|
9
|
+
};
|
|
10
|
+
let o = class extends c {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments), this.variant = "info";
|
|
13
|
+
}
|
|
14
|
+
render() {
|
|
15
|
+
const n = this.variant === "error", e = {
|
|
16
|
+
notice: !n,
|
|
17
|
+
"notice-info": this.variant === "info",
|
|
18
|
+
"notice-success": this.variant === "success",
|
|
19
|
+
"notice-warning": this.variant === "warning",
|
|
20
|
+
"error-message": n
|
|
21
|
+
};
|
|
22
|
+
return m`
|
|
23
|
+
<div part="callout" class=${u(e)} role="alert">
|
|
24
|
+
<div class="callout-inner">
|
|
25
|
+
<div part="icon" class="callout-icon">
|
|
26
|
+
<slot name="icon"></slot>
|
|
27
|
+
</div>
|
|
28
|
+
<div part="content" class="callout-content">
|
|
29
|
+
<slot></slot>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
`;
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
o.styles = [
|
|
37
|
+
f,
|
|
38
|
+
p`
|
|
39
|
+
:host {
|
|
40
|
+
display: block;
|
|
41
|
+
width: 100%;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/* Override animation from design-tokens for immediate display */
|
|
45
|
+
.notice {
|
|
46
|
+
animation: none;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* Error variant uses error-message class from design-tokens */
|
|
50
|
+
.error-message {
|
|
51
|
+
animation: none;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* Icon + content layout */
|
|
55
|
+
.callout-inner {
|
|
56
|
+
display: flex;
|
|
57
|
+
align-items: flex-start;
|
|
58
|
+
gap: var(--space-sm);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.callout-icon {
|
|
62
|
+
flex-shrink: 0;
|
|
63
|
+
display: flex;
|
|
64
|
+
align-items: center;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* Hide icon container when empty */
|
|
68
|
+
.callout-icon:empty {
|
|
69
|
+
display: none;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.callout-content {
|
|
73
|
+
flex: 1;
|
|
74
|
+
min-width: 0;
|
|
75
|
+
}
|
|
76
|
+
`
|
|
77
|
+
];
|
|
78
|
+
l([
|
|
79
|
+
v({ type: String })
|
|
80
|
+
], o.prototype, "variant", 2);
|
|
81
|
+
o = l([
|
|
82
|
+
d("tc-callout")
|
|
83
|
+
], o);
|
|
84
|
+
export {
|
|
85
|
+
o as TcCallout
|
|
86
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { LitElement as p, html as l, css as f } from "lit";
|
|
2
|
+
import { property as c, customElement as m } from "lit/decorators.js";
|
|
3
|
+
import { classMap as b } from "lit/directives/class-map.js";
|
|
4
|
+
import { styleMap as u } from "lit/directives/style-map.js";
|
|
5
|
+
import { sharedStyles as v } from "../styles/shared.js";
|
|
6
|
+
var h = Object.defineProperty, y = Object.getOwnPropertyDescriptor, d = (t, o, n, s) => {
|
|
7
|
+
for (var e = s > 1 ? void 0 : s ? y(o, n) : o, a = t.length - 1, i; a >= 0; a--)
|
|
8
|
+
(i = t[a]) && (e = (s ? i(o, n, e) : i(e)) || e);
|
|
9
|
+
return s && e && h(o, n, e), e;
|
|
10
|
+
};
|
|
11
|
+
let r = class extends p {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments), this.noBorder = !1, this.sx = {};
|
|
14
|
+
}
|
|
15
|
+
render() {
|
|
16
|
+
const t = {
|
|
17
|
+
card: !0,
|
|
18
|
+
"card--no-border": this.noBorder
|
|
19
|
+
};
|
|
20
|
+
return l`
|
|
21
|
+
<div part="card" class=${b(t)} style=${u(this.sx)}>
|
|
22
|
+
<div class="card-content">
|
|
23
|
+
<slot></slot>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
`;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
r.styles = [
|
|
30
|
+
v,
|
|
31
|
+
f`
|
|
32
|
+
:host {
|
|
33
|
+
display: block;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* Inner border effect using mask - extends design-tokens .card */
|
|
37
|
+
.card::before {
|
|
38
|
+
content: '';
|
|
39
|
+
position: absolute;
|
|
40
|
+
inset: 0;
|
|
41
|
+
border-radius: inherit;
|
|
42
|
+
padding: 0.0625rem;
|
|
43
|
+
background: linear-gradient(
|
|
44
|
+
180deg,
|
|
45
|
+
var(--alpha-white90) 0%,
|
|
46
|
+
var(--alpha-white30) 100%
|
|
47
|
+
);
|
|
48
|
+
mask:
|
|
49
|
+
linear-gradient(#fff 0 0) content-box,
|
|
50
|
+
linear-gradient(#fff 0 0);
|
|
51
|
+
mask-composite: exclude;
|
|
52
|
+
pointer-events: none;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.card--no-border::before {
|
|
56
|
+
display: none;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.card-content {
|
|
60
|
+
position: relative;
|
|
61
|
+
z-index: 1;
|
|
62
|
+
}
|
|
63
|
+
`
|
|
64
|
+
];
|
|
65
|
+
d([
|
|
66
|
+
c({ type: Boolean, attribute: "no-border" })
|
|
67
|
+
], r.prototype, "noBorder", 2);
|
|
68
|
+
d([
|
|
69
|
+
c({ type: Object })
|
|
70
|
+
], r.prototype, "sx", 2);
|
|
71
|
+
r = d([
|
|
72
|
+
m("tc-card")
|
|
73
|
+
], r);
|
|
74
|
+
export {
|
|
75
|
+
r as TcCard
|
|
76
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { LitElement as l, html as h, css as d } from "lit";
|
|
2
|
+
import { property as n, customElement as f } from "lit/decorators.js";
|
|
3
|
+
import { sharedStyles as v } from "../styles/shared.js";
|
|
4
|
+
var m = Object.defineProperty, u = Object.getOwnPropertyDescriptor, c = (o, i, s, t) => {
|
|
5
|
+
for (var r = t > 1 ? void 0 : t ? u(i, s) : i, a = o.length - 1, p; a >= 0; a--)
|
|
6
|
+
(p = o[a]) && (r = (t ? p(i, s, r) : p(r)) || r);
|
|
7
|
+
return t && r && m(i, s, r), r;
|
|
8
|
+
};
|
|
9
|
+
let e = class extends l {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments), this.variant = "default", this.size = "md";
|
|
12
|
+
}
|
|
13
|
+
render() {
|
|
14
|
+
return h`
|
|
15
|
+
<span part="chip" class="chip chip--${this.variant} chip--${this.size}">
|
|
16
|
+
<slot></slot>
|
|
17
|
+
</span>
|
|
18
|
+
`;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
e.styles = [
|
|
22
|
+
v,
|
|
23
|
+
d`
|
|
24
|
+
:host {
|
|
25
|
+
display: inline-flex;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.chip {
|
|
29
|
+
display: inline-flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
justify-content: center;
|
|
32
|
+
border-radius: var(--radius-full);
|
|
33
|
+
font-family: var(--font-body);
|
|
34
|
+
font-weight: 500;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.chip--sm {
|
|
38
|
+
padding: var(--size-chip-padding-sm);
|
|
39
|
+
font-size: var(--font-size-xs);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.chip--md {
|
|
43
|
+
padding: var(--size-chip-padding-md);
|
|
44
|
+
font-size: var(--font-size-sm);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.chip--default {
|
|
48
|
+
background: var(--paper-cream);
|
|
49
|
+
color: var(--ink-dark);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.chip--success {
|
|
53
|
+
background: var(--alpha-success15);
|
|
54
|
+
color: var(--accent-success);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.chip--error {
|
|
58
|
+
background: var(--error-bg);
|
|
59
|
+
color: var(--error-base);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.chip--info {
|
|
63
|
+
background: var(--alpha-primary10);
|
|
64
|
+
color: var(--accent-primary);
|
|
65
|
+
}
|
|
66
|
+
`
|
|
67
|
+
];
|
|
68
|
+
c([
|
|
69
|
+
n({ type: String })
|
|
70
|
+
], e.prototype, "variant", 2);
|
|
71
|
+
c([
|
|
72
|
+
n({ type: String })
|
|
73
|
+
], e.prototype, "size", 2);
|
|
74
|
+
e = c([
|
|
75
|
+
f("tc-chip")
|
|
76
|
+
], e);
|
|
77
|
+
export {
|
|
78
|
+
e as TcChip
|
|
79
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { LitElement as p, html as d, css as m } from "lit";
|
|
2
|
+
import { property as c, customElement as f } from "lit/decorators.js";
|
|
3
|
+
import { styleMap as h } from "lit/directives/style-map.js";
|
|
4
|
+
var w = Object.defineProperty, y = Object.getOwnPropertyDescriptor, l = (r, i, o, s) => {
|
|
5
|
+
for (var t = s > 1 ? void 0 : s ? y(i, o) : i, n = r.length - 1, a; n >= 0; n--)
|
|
6
|
+
(a = r[n]) && (t = (s ? a(i, o, t) : a(t)) || t);
|
|
7
|
+
return s && t && w(i, o, t), t;
|
|
8
|
+
};
|
|
9
|
+
let e = class extends p {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments), this.wide = !1, this.sx = {}, this.defaultStyles = {
|
|
12
|
+
display: "flex",
|
|
13
|
+
flexDirection: "column",
|
|
14
|
+
alignItems: "center",
|
|
15
|
+
justifyContent: "flex-start"
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
render() {
|
|
19
|
+
const r = {
|
|
20
|
+
...this.defaultStyles,
|
|
21
|
+
...this.sx
|
|
22
|
+
};
|
|
23
|
+
return d`
|
|
24
|
+
<div
|
|
25
|
+
part="container"
|
|
26
|
+
class="container ${this.wide ? "container--wide" : ""}"
|
|
27
|
+
style=${h(r)}
|
|
28
|
+
>
|
|
29
|
+
<slot></slot>
|
|
30
|
+
</div>
|
|
31
|
+
`;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
e.styles = m`
|
|
35
|
+
:host {
|
|
36
|
+
display: block;
|
|
37
|
+
width: 100%;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.container {
|
|
41
|
+
position: relative;
|
|
42
|
+
width: 100%;
|
|
43
|
+
max-width: var(--container-max-width);
|
|
44
|
+
margin: 0 auto;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.container--wide {
|
|
48
|
+
max-width: var(--container-max-width-wide);
|
|
49
|
+
}
|
|
50
|
+
`;
|
|
51
|
+
l([
|
|
52
|
+
c({ type: Boolean })
|
|
53
|
+
], e.prototype, "wide", 2);
|
|
54
|
+
l([
|
|
55
|
+
c({ type: Object })
|
|
56
|
+
], e.prototype, "sx", 2);
|
|
57
|
+
e = l([
|
|
58
|
+
f("tc-container")
|
|
59
|
+
], e);
|
|
60
|
+
export {
|
|
61
|
+
e as TcContainer
|
|
62
|
+
};
|