@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,64 +0,0 @@
|
|
|
1
|
-
import { css as p, LitElement as d, html as m } from "lit";
|
|
2
|
-
import { property as c, customElement as h } from "lit/decorators.js";
|
|
3
|
-
import { styleMap as f } from "lit/directives/style-map.js";
|
|
4
|
-
var w = Object.defineProperty, x = Object.getOwnPropertyDescriptor, l = (r, i, o, s) => {
|
|
5
|
-
for (var t = s > 1 ? void 0 : s ? x(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 d {
|
|
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 m`
|
|
24
|
-
<div
|
|
25
|
-
part="container"
|
|
26
|
-
class="container ${this.wide ? "container--wide" : ""}"
|
|
27
|
-
style=${f(r)}
|
|
28
|
-
>
|
|
29
|
-
<slot></slot>
|
|
30
|
-
</div>
|
|
31
|
-
`;
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
e.styles = p`
|
|
35
|
-
:host {
|
|
36
|
-
display: block;
|
|
37
|
-
width: 100%;
|
|
38
|
-
min-width: 0;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.container {
|
|
42
|
-
position: relative;
|
|
43
|
-
width: 100%;
|
|
44
|
-
max-width: var(--container-max-width);
|
|
45
|
-
margin: 0 auto;
|
|
46
|
-
box-sizing: border-box;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.container--wide {
|
|
50
|
-
max-width: var(--container-max-width-wide);
|
|
51
|
-
}
|
|
52
|
-
`;
|
|
53
|
-
l([
|
|
54
|
-
c({ type: Boolean })
|
|
55
|
-
], e.prototype, "wide", 2);
|
|
56
|
-
l([
|
|
57
|
-
c({ type: Object })
|
|
58
|
-
], e.prototype, "sx", 2);
|
|
59
|
-
e = l([
|
|
60
|
-
h("tc-container")
|
|
61
|
-
], e);
|
|
62
|
-
export {
|
|
63
|
-
e as TcContainer
|
|
64
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
2
|
-
import { SxProps } from '../types.js';
|
|
3
|
-
/**
|
|
4
|
-
* A horizontal divider line with optional text.
|
|
5
|
-
*
|
|
6
|
-
* @csspart divider - The divider element (simple mode)
|
|
7
|
-
* @csspart container - The container element (text mode)
|
|
8
|
-
* @csspart line - The line elements (text mode)
|
|
9
|
-
* @csspart text - The text element (text mode)
|
|
10
|
-
*/
|
|
11
|
-
export declare class TcDivider extends LitElement {
|
|
12
|
-
text: string;
|
|
13
|
-
sx: SxProps;
|
|
14
|
-
static styles: import('lit').CSSResult;
|
|
15
|
-
render(): import('lit').TemplateResult<1>;
|
|
16
|
-
}
|
|
17
|
-
declare global {
|
|
18
|
-
interface HTMLElementTagNameMap {
|
|
19
|
-
'tc-divider': TcDivider;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=tc-divider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tc-divider.d.ts","sourceRoot":"","sources":["../../src/primitives/tc-divider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,MAAM,KAAK,CAAC;AAG5C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C;;;;;;;GAOG;AACH,qBACa,SAAU,SAAQ,UAAU;IACX,IAAI,SAAM;IACV,EAAE,EAAE,OAAO,CAAM;IAE7C,OAAgB,MAAM,0BAqCpB;IAEO,MAAM;CAqBhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,SAAS,CAAC;KACzB;CACF"}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { css as c, LitElement as m, html as l } from "lit";
|
|
2
|
-
import { property as p, customElement as h } from "lit/decorators.js";
|
|
3
|
-
import { styleMap as v } from "lit/directives/style-map.js";
|
|
4
|
-
var x = Object.defineProperty, f = Object.getOwnPropertyDescriptor, a = (s, e, d, t) => {
|
|
5
|
-
for (var r = t > 1 ? void 0 : t ? f(e, d) : e, n = s.length - 1, o; n >= 0; n--)
|
|
6
|
-
(o = s[n]) && (r = (t ? o(e, d, r) : o(r)) || r);
|
|
7
|
-
return t && r && x(e, d, r), r;
|
|
8
|
-
};
|
|
9
|
-
let i = class extends m {
|
|
10
|
-
constructor() {
|
|
11
|
-
super(...arguments), this.text = "", this.sx = {};
|
|
12
|
-
}
|
|
13
|
-
render() {
|
|
14
|
-
const e = { ...{
|
|
15
|
-
"--divider-color": "var(--ink-faint)",
|
|
16
|
-
"--divider-spacing": "var(--space-md)"
|
|
17
|
-
}, ...this.sx };
|
|
18
|
-
return this.text ? l`
|
|
19
|
-
<div part="container" class="divider-container" style=${v(e)}>
|
|
20
|
-
<hr part="line" class="divider-line" />
|
|
21
|
-
<span part="text" class="divider-text">${this.text}</span>
|
|
22
|
-
<hr part="line" class="divider-line" />
|
|
23
|
-
</div>
|
|
24
|
-
` : l`
|
|
25
|
-
<hr part="divider" class="divider" style=${v(e)} />
|
|
26
|
-
`;
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
i.styles = c`
|
|
30
|
-
:host {
|
|
31
|
-
display: block;
|
|
32
|
-
width: 100%;
|
|
33
|
-
min-width: 0;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/* Simple divider (no text) */
|
|
37
|
-
.divider {
|
|
38
|
-
border: none;
|
|
39
|
-
height: 1px;
|
|
40
|
-
background-color: var(--divider-color);
|
|
41
|
-
margin: var(--divider-spacing) 0;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/* Divider with text */
|
|
45
|
-
.divider-container {
|
|
46
|
-
display: flex;
|
|
47
|
-
align-items: center;
|
|
48
|
-
gap: var(--space-md);
|
|
49
|
-
margin: var(--divider-spacing) 0;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.divider-line {
|
|
53
|
-
flex: 1;
|
|
54
|
-
border: none;
|
|
55
|
-
height: 1px;
|
|
56
|
-
background-color: var(--divider-color);
|
|
57
|
-
margin: 0;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.divider-text {
|
|
61
|
-
flex-shrink: 0;
|
|
62
|
-
font-size: var(--font-size-sm);
|
|
63
|
-
color: var(--ink-light);
|
|
64
|
-
font-family: var(--font-body);
|
|
65
|
-
}
|
|
66
|
-
`;
|
|
67
|
-
a([
|
|
68
|
-
p({ type: String })
|
|
69
|
-
], i.prototype, "text", 2);
|
|
70
|
-
a([
|
|
71
|
-
p({ type: Object })
|
|
72
|
-
], i.prototype, "sx", 2);
|
|
73
|
-
i = a([
|
|
74
|
-
h("tc-divider")
|
|
75
|
-
], i);
|
|
76
|
-
export {
|
|
77
|
-
i as TcDivider
|
|
78
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
2
|
-
import { SxProps } from '../types.js';
|
|
3
|
-
/**
|
|
4
|
-
* A simplified error/warning/info message component.
|
|
5
|
-
* Wraps tc-callout with appropriate icon and text styling.
|
|
6
|
-
*
|
|
7
|
-
* @csspart callout - The underlying callout container
|
|
8
|
-
* @csspart icon - The icon element
|
|
9
|
-
* @csspart message - The message text
|
|
10
|
-
*/
|
|
11
|
-
export declare class TcErrorMessage extends LitElement {
|
|
12
|
-
variant: 'warning' | 'info' | 'error';
|
|
13
|
-
message: string;
|
|
14
|
-
sx: SxProps;
|
|
15
|
-
static styles: import('lit').CSSResult;
|
|
16
|
-
private getIconName;
|
|
17
|
-
private getIconColor;
|
|
18
|
-
render(): import('lit').TemplateResult<1> | null;
|
|
19
|
-
}
|
|
20
|
-
declare global {
|
|
21
|
-
interface HTMLElementTagNameMap {
|
|
22
|
-
'tc-error-message': TcErrorMessage;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=tc-error-message.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tc-error-message.d.ts","sourceRoot":"","sources":["../../src/primitives/tc-error-message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,MAAM,KAAK,CAAC;AAE5C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,iBAAiB,CAAC;AACzB,OAAO,cAAc,CAAC;AACtB,OAAO,cAAc,CAAC;AAEtB;;;;;;;GAOG;AACH,qBACa,cAAe,SAAQ,UAAU;IAChB,OAAO,EAAE,SAAS,GAAG,MAAM,GAAG,OAAO,CAAW;IAChD,OAAO,SAAM;IACb,EAAE,EAAE,OAAO,CAAM;IAE7C,OAAgB,MAAM,0BAcpB;IAEF,OAAO,CAAC,WAAW;IAWnB,OAAO,CAAC,YAAY;IAWX,MAAM;CAoBhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,kBAAkB,EAAE,cAAc,CAAC;KACpC;CACF"}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { css as p, LitElement as m, html as g } from "lit";
|
|
2
|
-
import { property as c, customElement as u } from "lit/decorators.js";
|
|
3
|
-
import "./tc-callout.js";
|
|
4
|
-
import "./tc-icon.js";
|
|
5
|
-
import "./tc-text.js";
|
|
6
|
-
var h = Object.defineProperty, v = Object.getOwnPropertyDescriptor, a = (l, r, i, s) => {
|
|
7
|
-
for (var t = s > 1 ? void 0 : s ? v(r, i) : r, n = l.length - 1, o; n >= 0; n--)
|
|
8
|
-
(o = l[n]) && (t = (s ? o(r, i, t) : o(t)) || t);
|
|
9
|
-
return s && t && h(r, i, t), t;
|
|
10
|
-
};
|
|
11
|
-
let e = class extends m {
|
|
12
|
-
constructor() {
|
|
13
|
-
super(...arguments), this.variant = "error", this.message = "", this.sx = {};
|
|
14
|
-
}
|
|
15
|
-
getIconName() {
|
|
16
|
-
switch (this.variant) {
|
|
17
|
-
case "warning":
|
|
18
|
-
return "alert-triangle";
|
|
19
|
-
case "info":
|
|
20
|
-
return "info";
|
|
21
|
-
default:
|
|
22
|
-
return "alert-circle";
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
getIconColor() {
|
|
26
|
-
switch (this.variant) {
|
|
27
|
-
case "warning":
|
|
28
|
-
return "var(--semantic-warning)";
|
|
29
|
-
case "info":
|
|
30
|
-
return "var(--semantic-info)";
|
|
31
|
-
default:
|
|
32
|
-
return "var(--error-base)";
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
render() {
|
|
36
|
-
return this.message ? g`
|
|
37
|
-
<tc-callout part="callout" variant=${this.variant} .sx=${this.sx}>
|
|
38
|
-
<tc-icon
|
|
39
|
-
slot="icon"
|
|
40
|
-
part="icon"
|
|
41
|
-
name=${this.getIconName()}
|
|
42
|
-
size="var(--size-icon-action)"
|
|
43
|
-
color=${this.getIconColor()}
|
|
44
|
-
></tc-icon>
|
|
45
|
-
<tc-text part="message" class="message-text" size="sm">
|
|
46
|
-
${this.message}
|
|
47
|
-
</tc-text>
|
|
48
|
-
</tc-callout>
|
|
49
|
-
` : null;
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
e.styles = p`
|
|
53
|
-
:host {
|
|
54
|
-
display: block;
|
|
55
|
-
width: 100%;
|
|
56
|
-
min-width: 0;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
tc-callout::part(callout) {
|
|
60
|
-
padding: var(--space-sm) var(--space-md);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.message-text {
|
|
64
|
-
line-height: 1.4;
|
|
65
|
-
}
|
|
66
|
-
`;
|
|
67
|
-
a([
|
|
68
|
-
c({ type: String })
|
|
69
|
-
], e.prototype, "variant", 2);
|
|
70
|
-
a([
|
|
71
|
-
c({ type: String })
|
|
72
|
-
], e.prototype, "message", 2);
|
|
73
|
-
a([
|
|
74
|
-
c({ type: Object })
|
|
75
|
-
], e.prototype, "sx", 2);
|
|
76
|
-
e = a([
|
|
77
|
-
u("tc-error-message")
|
|
78
|
-
], e);
|
|
79
|
-
export {
|
|
80
|
-
e as TcErrorMessage
|
|
81
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
2
|
-
import { SxProps } from '../types.js';
|
|
3
|
-
/**
|
|
4
|
-
* Form header component with animated title, subtitle, and optional notice.
|
|
5
|
-
* Uses design-tokens form classes (.form-title, .form-subtitle).
|
|
6
|
-
*
|
|
7
|
-
* @csspart header - The header container
|
|
8
|
-
* @csspart title - The title element
|
|
9
|
-
* @csspart subtitle - The subtitle element
|
|
10
|
-
* @csspart notice - The notice element
|
|
11
|
-
*/
|
|
12
|
-
export declare class TcFormHeader extends LitElement {
|
|
13
|
-
title: string;
|
|
14
|
-
subtitle: string;
|
|
15
|
-
notice: string;
|
|
16
|
-
noAnimation: boolean;
|
|
17
|
-
sx: SxProps;
|
|
18
|
-
static styles: import('lit').CSSResult[];
|
|
19
|
-
render(): import('lit').TemplateResult<1>;
|
|
20
|
-
}
|
|
21
|
-
declare global {
|
|
22
|
-
interface HTMLElementTagNameMap {
|
|
23
|
-
'tc-form-header': TcFormHeader;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=tc-form-header.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tc-form-header.d.ts","sourceRoot":"","sources":["../../src/primitives/tc-form-header.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,MAAM,KAAK,CAAC;AAI5C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C;;;;;;;;GAQG;AACH,qBACa,YAAa,SAAQ,UAAU;IACd,KAAK,SAAM;IACX,QAAQ,SAAM;IACd,MAAM,SAAM;IACgB,WAAW,UAAS;IAChD,EAAE,EAAE,OAAO,CAAM;IAE7C,OAAgB,MAAM,4BAsEpB;IAEO,MAAM;CA6BhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,YAAY,CAAC;KAChC;CACF"}
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import { css as p, LitElement as c, html as n } from "lit";
|
|
2
|
-
import { property as r, customElement as f } from "lit/decorators.js";
|
|
3
|
-
import { styleMap as h } from "lit/directives/style-map.js";
|
|
4
|
-
import { sharedStyles as u } from "../styles/shared.js";
|
|
5
|
-
var v = Object.defineProperty, b = Object.getOwnPropertyDescriptor, a = (i, o, m, s) => {
|
|
6
|
-
for (var e = s > 1 ? void 0 : s ? b(o, m) : o, l = i.length - 1, d; l >= 0; l--)
|
|
7
|
-
(d = i[l]) && (e = (s ? d(o, m, e) : d(e)) || e);
|
|
8
|
-
return s && e && v(o, m, e), e;
|
|
9
|
-
};
|
|
10
|
-
let t = class extends c {
|
|
11
|
-
constructor() {
|
|
12
|
-
super(...arguments), this.title = "", this.subtitle = "", this.notice = "", this.noAnimation = !1, this.sx = {};
|
|
13
|
-
}
|
|
14
|
-
render() {
|
|
15
|
-
const i = !this.noAnimation;
|
|
16
|
-
return n`
|
|
17
|
-
<header part="header" class="header" style=${h(this.sx)}>
|
|
18
|
-
${this.title ? n`<h1 part="title" class="form-title ${i ? "form-title--animated" : ""}">
|
|
19
|
-
${this.title}
|
|
20
|
-
</h1>` : ""}
|
|
21
|
-
${this.subtitle ? n`<p part="subtitle" class="form-subtitle ${i ? "form-subtitle--animated" : ""}">
|
|
22
|
-
${this.subtitle}
|
|
23
|
-
</p>` : ""}
|
|
24
|
-
${this.notice ? n`<div part="notice" class="notice ${i ? "notice--animated" : ""}">
|
|
25
|
-
${this.notice}
|
|
26
|
-
</div>` : ""}
|
|
27
|
-
</header>
|
|
28
|
-
`;
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
t.styles = [
|
|
32
|
-
u,
|
|
33
|
-
p`
|
|
34
|
-
:host {
|
|
35
|
-
display: block;
|
|
36
|
-
width: 100%;
|
|
37
|
-
min-width: 0;
|
|
38
|
-
text-align: center;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.header {
|
|
42
|
-
display: flex;
|
|
43
|
-
flex-direction: column;
|
|
44
|
-
align-items: center;
|
|
45
|
-
gap: var(--space-sm);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/* Extend design-tokens .form-title */
|
|
49
|
-
.form-title {
|
|
50
|
-
margin: 0;
|
|
51
|
-
line-height: 1.2;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.form-title--animated {
|
|
55
|
-
animation: slideDown var(--duration-fast) var(--easing-ease-in-out) backwards;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/* Extend design-tokens .form-subtitle */
|
|
59
|
-
.form-subtitle {
|
|
60
|
-
margin: 0;
|
|
61
|
-
max-width: 28ch;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.form-subtitle--animated {
|
|
65
|
-
animation: slideUp var(--duration-smooth) var(--easing-ease-in-out) 100ms backwards;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.notice {
|
|
69
|
-
margin-top: var(--space-sm);
|
|
70
|
-
padding: var(--space-sm) var(--space-md);
|
|
71
|
-
background: var(--paper-warm);
|
|
72
|
-
border-radius: var(--radius-md);
|
|
73
|
-
font-size: var(--font-size-sm);
|
|
74
|
-
color: var(--ink-medium);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.notice--animated {
|
|
78
|
-
animation: noticeReveal 500ms var(--easing-ease-in-out) 200ms backwards;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
@keyframes noticeReveal {
|
|
82
|
-
from {
|
|
83
|
-
opacity: 0;
|
|
84
|
-
transform: scale(0.95);
|
|
85
|
-
}
|
|
86
|
-
to {
|
|
87
|
-
opacity: 1;
|
|
88
|
-
transform: scale(1);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
/* Reduced motion */
|
|
93
|
-
@media (prefers-reduced-motion: reduce) {
|
|
94
|
-
.form-title--animated,
|
|
95
|
-
.form-subtitle--animated,
|
|
96
|
-
.notice--animated {
|
|
97
|
-
animation: none;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
`
|
|
101
|
-
];
|
|
102
|
-
a([
|
|
103
|
-
r({ type: String })
|
|
104
|
-
], t.prototype, "title", 2);
|
|
105
|
-
a([
|
|
106
|
-
r({ type: String })
|
|
107
|
-
], t.prototype, "subtitle", 2);
|
|
108
|
-
a([
|
|
109
|
-
r({ type: String })
|
|
110
|
-
], t.prototype, "notice", 2);
|
|
111
|
-
a([
|
|
112
|
-
r({ type: Boolean, attribute: "no-animation" })
|
|
113
|
-
], t.prototype, "noAnimation", 2);
|
|
114
|
-
a([
|
|
115
|
-
r({ type: Object })
|
|
116
|
-
], t.prototype, "sx", 2);
|
|
117
|
-
t = a([
|
|
118
|
-
f("tc-form-header")
|
|
119
|
-
], t);
|
|
120
|
-
export {
|
|
121
|
-
t as TcFormHeader
|
|
122
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { LitElement, TemplateResult } from 'lit';
|
|
2
|
-
import { SxProps } from '../types.js';
|
|
3
|
-
export type IconName = 'arrow-left' | 'arrow-right' | 'check' | 'x' | 'close' | 'chevron-right' | 'chevron-left' | 'error' | 'alert-circle' | 'info' | 'warning' | 'loading' | 'loader' | 'biometric' | 'email' | 'passkey' | 'bell' | 'download' | 'wifi-off' | 'apple' | 'google' | 'windows' | 'samsung' | 'phone' | 'success' | 'lock' | 'person' | 'device' | 'totp' | 'email-otp' | 'qrcode' | 'key';
|
|
4
|
-
/**
|
|
5
|
-
* An icon component with built-in icon set.
|
|
6
|
-
*
|
|
7
|
-
* @csspart icon - The icon container
|
|
8
|
-
*/
|
|
9
|
-
export declare class TcIcon extends LitElement {
|
|
10
|
-
name: IconName;
|
|
11
|
-
sx: SxProps;
|
|
12
|
-
static styles: import('lit').CSSResult;
|
|
13
|
-
render(): TemplateResult<1>;
|
|
14
|
-
}
|
|
15
|
-
declare global {
|
|
16
|
-
interface HTMLElementTagNameMap {
|
|
17
|
-
'tc-icon': TcIcon;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=tc-icon.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tc-icon.d.ts","sourceRoot":"","sources":["../../src/primitives/tc-icon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAGjE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,MAAM,QAAQ,GAChB,YAAY,GACZ,aAAa,GACb,OAAO,GACP,GAAG,GACH,OAAO,GACP,eAAe,GACf,cAAc,GACd,OAAO,GACP,cAAc,GACd,MAAM,GACN,SAAS,GACT,SAAS,GACT,QAAQ,GACR,WAAW,GACX,OAAO,GACP,SAAS,GACT,MAAM,GACN,UAAU,GACV,UAAU,GAEV,OAAO,GACP,QAAQ,GACR,SAAS,GACT,SAAS,GAET,OAAO,GACP,SAAS,GACT,MAAM,GACN,QAAQ,GACR,QAAQ,GAER,MAAM,GACN,WAAW,GACX,QAAQ,GACR,KAAK,CAAC;AAwCV;;;;GAIG;AACH,qBACa,MAAO,SAAQ,UAAU;IACR,IAAI,EAAE,QAAQ,CAAU;IACxB,EAAE,EAAE,OAAO,CAAM;IAE7C,OAAgB,MAAM,0BAkBpB;IAEO,MAAM;CAoBhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,SAAS,EAAE,MAAM,CAAC;KACnB;CACF"}
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { html as e, css as a, LitElement as p } from "lit";
|
|
2
|
-
import { property as h, customElement as g } from "lit/decorators.js";
|
|
3
|
-
import { styleMap as d } from "lit/directives/style-map.js";
|
|
4
|
-
var x = Object.defineProperty, z = Object.getOwnPropertyDescriptor, c = (l, r, t, i) => {
|
|
5
|
-
for (var o = i > 1 ? void 0 : i ? z(r, t) : r, s = l.length - 1, v; s >= 0; s--)
|
|
6
|
-
(v = l[s]) && (o = (i ? v(r, t, o) : v(o)) || o);
|
|
7
|
-
return i && o && x(r, t, o), o;
|
|
8
|
-
};
|
|
9
|
-
const u = {
|
|
10
|
-
"arrow-left": e`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/></svg>`,
|
|
11
|
-
"arrow-right": e`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"/></svg>`,
|
|
12
|
-
check: e`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/></svg>`,
|
|
13
|
-
x: e`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>`,
|
|
14
|
-
close: e`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>`,
|
|
15
|
-
"chevron-right": e`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>`,
|
|
16
|
-
"chevron-left": e`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 18 9 12 15 6"></polyline></svg>`,
|
|
17
|
-
error: e`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"/></svg>`,
|
|
18
|
-
"alert-circle": e`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg>`,
|
|
19
|
-
info: e`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"/></svg>`,
|
|
20
|
-
warning: e`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"/></svg>`,
|
|
21
|
-
loading: e`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"/></svg>`,
|
|
22
|
-
loader: e`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="12" y1="2" x2="12" y2="6"></line><line x1="12" y1="18" x2="12" y2="22"></line><line x1="4.93" y1="4.93" x2="7.76" y2="7.76"></line><line x1="16.24" y1="16.24" x2="19.07" y2="19.07"></line><line x1="2" y1="12" x2="6" y2="12"></line><line x1="18" y1="12" x2="22" y2="12"></line><line x1="4.93" y1="19.07" x2="7.76" y2="16.24"></line><line x1="16.24" y1="7.76" x2="19.07" y2="4.93"></line></svg>`,
|
|
23
|
-
biometric: e`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M17.81 4.47c-.08 0-.16-.02-.23-.06C15.66 3.42 14 3 12.01 3c-1.98 0-3.86.47-5.57 1.41-.24.13-.54.04-.68-.2-.13-.24-.04-.55.2-.68C7.82 2.52 9.86 2 12.01 2c2.13 0 3.99.47 6.03 1.52.25.13.34.43.21.67-.09.18-.26.28-.44.28zM3.5 9.72c-.1 0-.2-.03-.29-.09-.23-.16-.28-.47-.12-.7.99-1.4 2.25-2.5 3.75-3.27C9.98 4.04 14 4.03 17.15 5.65c1.5.77 2.76 1.86 3.75 3.25.16.22.11.54-.12.7-.23.16-.54.11-.7-.12-.9-1.26-2.04-2.25-3.39-2.94-2.87-1.47-6.54-1.47-9.4.01-1.36.7-2.5 1.7-3.4 2.96-.08.14-.23.21-.39.21zm6.25 12.07c-.13 0-.26-.05-.35-.15-.87-.87-1.34-1.43-2.01-2.64-.69-1.23-1.05-2.73-1.05-4.34 0-2.97 2.54-5.39 5.66-5.39s5.66 2.42 5.66 5.39c0 .28-.22.5-.5.5s-.5-.22-.5-.5c0-2.42-2.09-4.39-4.66-4.39-2.57 0-4.66 1.97-4.66 4.39 0 1.44.32 2.77.93 3.85.64 1.15 1.08 1.64 1.85 2.42.19.2.19.51 0 .71-.11.1-.24.15-.37.15zm7.17-1.85c-1.19 0-2.24-.3-3.1-.89-1.49-1.01-2.38-2.65-2.38-4.39 0-.28.22-.5.5-.5s.5.22.5.5c0 1.41.72 2.74 1.94 3.56.71.48 1.54.71 2.54.71.24 0 .64-.03 1.04-.1.27-.05.53.13.58.41.05.27-.13.53-.41.58-.57.11-1.07.12-1.21.12zM14.91 22c-.04 0-.09-.01-.13-.02-1.59-.44-2.63-1.03-3.72-2.1-1.4-1.39-2.17-3.24-2.17-5.22 0-1.62 1.38-2.94 3.08-2.94 1.7 0 3.08 1.32 3.08 2.94 0 1.07.93 1.94 2.08 1.94s2.08-.87 2.08-1.94c0-3.77-3.25-6.83-7.25-6.83-2.84 0-5.44 1.58-6.61 4.03-.39.81-.59 1.76-.59 2.8 0 .78.07 2.01.67 3.61.1.26-.03.55-.29.64-.26.1-.55-.04-.64-.29-.49-1.31-.73-2.61-.73-3.96 0-1.2.23-2.29.68-3.24 1.33-2.79 4.28-4.6 7.51-4.6 4.55 0 8.25 3.51 8.25 7.83 0 1.62-1.38 2.94-3.08 2.94s-3.08-1.32-3.08-2.94c0-1.07-.93-1.94-2.08-1.94s-2.08.87-2.08 1.94c0 1.71.66 3.31 1.87 4.51.95.94 1.86 1.46 3.27 1.85.27.07.42.35.35.61-.05.23-.26.38-.47.38z"/></svg>`,
|
|
24
|
-
email: e`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>`,
|
|
25
|
-
passkey: e`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 2-2.93-2-2.07zm-14 2c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"/></svg>`,
|
|
26
|
-
bell: e`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"></path><path d="M13.73 21a2 2 0 0 1-3.46 0"></path></svg>`,
|
|
27
|
-
download: e`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg>`,
|
|
28
|
-
"wifi-off": e`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="1" y1="1" x2="23" y2="23"></line><path d="M16.72 11.06A10.94 10.94 0 0 1 19 12.55"></path><path d="M5 12.55a10.94 10.94 0 0 1 5.17-2.39"></path><path d="M10.71 5.05A16 16 0 0 1 22.58 9"></path><path d="M1.42 9a15.91 15.91 0 0 1 4.7-2.88"></path><path d="M8.53 16.11a6 6 0 0 1 6.95 0"></path><line x1="12" y1="20" x2="12.01" y2="20"></line></svg>`,
|
|
29
|
-
// Brand icons
|
|
30
|
-
apple: e`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M17.05 20.28c-.98.95-2.05.8-3.08.35-1.09-.46-2.09-.48-3.24 0-1.44.62-2.2.44-3.06-.35C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.54 4.09l.01-.01zM12.03 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z"/></svg>`,
|
|
31
|
-
google: e`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"/><path d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"/><path d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"/><path d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"/></svg>`,
|
|
32
|
-
windows: e`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M3 12V6.75l6-1.32v6.48L3 12zm17-9v8.75l-10 .15V5.21L20 3zM3 13l6 .09v6.81l-6-1.15V13zm17 .25V22l-10-1.91V13.1l10 .15z"/></svg>`,
|
|
33
|
-
samsung: e`<svg viewBox="0 0 24 24"><text x="12" y="17" font-size="18" font-weight="700" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif" text-anchor="middle" fill="currentColor">S</text></svg>`,
|
|
34
|
-
// General icons
|
|
35
|
-
phone: e`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z"/></svg>`,
|
|
36
|
-
success: e`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>`,
|
|
37
|
-
lock: e`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"/></svg>`,
|
|
38
|
-
person: e`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>`,
|
|
39
|
-
device: e`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M15 7v4h1v2h-3V5h2l-3-4-3 4h2v8H8v-2.07c.7-.37 1.2-1.08 1.2-1.93 0-1.21-.99-2.2-2.2-2.2-1.21 0-2.2.99-2.2 2.2 0 .85.5 1.56 1.2 1.93V13c0 1.11.89 2 2 2h3v3.05c-.71.37-1.2 1.1-1.2 1.95 0 1.22.99 2.2 2.2 2.2 1.21 0 2.2-.98 2.2-2.2 0-.85-.49-1.58-1.2-1.95V15h3c1.11 0 2-.89 2-2v-2h1V7h-4z"/></svg>`,
|
|
40
|
-
// Auth icons
|
|
41
|
-
totp: e`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"/></svg>`,
|
|
42
|
-
"email-otp": e`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>`,
|
|
43
|
-
qrcode: e`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M3 11h8V3H3v8zm2-6h4v4H5V5zM3 21h8v-8H3v8zm2-6h4v4H5v-4zM13 3v8h8V3h-8zm6 6h-4V5h4v4zM13 13h2v2h-2zM15 15h2v2h-2zM13 17h2v2h-2zM15 19h2v2h-2zM17 17h2v2h-2zM17 13h2v2h-2zM19 15h2v2h-2zM19 19h2v2h-2z"/><path d="M6 6h2v2H6zM6 16h2v2H6zM16 6h2v2h-2z"/></svg>`,
|
|
44
|
-
key: e`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M15.75 5.25a3 3 0 0 1 3 3m3 0a6 6 0 0 1-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1 1 21.75 8.25Z"/></svg>`
|
|
45
|
-
};
|
|
46
|
-
let n = class extends p {
|
|
47
|
-
constructor() {
|
|
48
|
-
super(...arguments), this.name = "info", this.sx = {};
|
|
49
|
-
}
|
|
50
|
-
render() {
|
|
51
|
-
const l = u[this.name];
|
|
52
|
-
if (!l)
|
|
53
|
-
return console.warn(`Icon "${this.name}" not found`), e``;
|
|
54
|
-
const t = { ...{
|
|
55
|
-
"--icon-size": "1.5rem",
|
|
56
|
-
"--icon-color": "currentColor"
|
|
57
|
-
}, ...this.sx };
|
|
58
|
-
return e`
|
|
59
|
-
<span part="icon" class="icon" style=${d(t)}>
|
|
60
|
-
${l}
|
|
61
|
-
</span>
|
|
62
|
-
`;
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
n.styles = a`
|
|
66
|
-
:host {
|
|
67
|
-
display: inline-flex;
|
|
68
|
-
align-items: center;
|
|
69
|
-
justify-content: center;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.icon {
|
|
73
|
-
display: flex;
|
|
74
|
-
align-items: center;
|
|
75
|
-
justify-content: center;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
svg {
|
|
79
|
-
width: var(--icon-size);
|
|
80
|
-
height: var(--icon-size);
|
|
81
|
-
color: var(--icon-color);
|
|
82
|
-
}
|
|
83
|
-
`;
|
|
84
|
-
c([
|
|
85
|
-
h({ type: String })
|
|
86
|
-
], n.prototype, "name", 2);
|
|
87
|
-
c([
|
|
88
|
-
h({ type: Object })
|
|
89
|
-
], n.prototype, "sx", 2);
|
|
90
|
-
n = c([
|
|
91
|
-
g("tc-icon")
|
|
92
|
-
], n);
|
|
93
|
-
export {
|
|
94
|
-
n as TcIcon
|
|
95
|
-
};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
2
|
-
import { SxProps } from '../types.js';
|
|
3
|
-
/**
|
|
4
|
-
* An input field with an attached chip indicator.
|
|
5
|
-
* Useful for showing authentication method alongside email/username input.
|
|
6
|
-
*
|
|
7
|
-
* @fires tc-input - Fired when input value changes
|
|
8
|
-
* @fires tc-blur - Fired when input loses focus
|
|
9
|
-
* @fires tc-keydown - Fired on keydown
|
|
10
|
-
* @csspart wrapper - The input wrapper container
|
|
11
|
-
* @csspart input - The input element
|
|
12
|
-
* @csspart chip - The chip element
|
|
13
|
-
*/
|
|
14
|
-
export declare class TcInputWithChip extends LitElement {
|
|
15
|
-
label: string;
|
|
16
|
-
placeholder: string;
|
|
17
|
-
value: string;
|
|
18
|
-
error: string;
|
|
19
|
-
disabled: boolean;
|
|
20
|
-
readonly: boolean;
|
|
21
|
-
chipLabel: string;
|
|
22
|
-
chipIcon: string;
|
|
23
|
-
chipVariant: 'default' | 'success' | 'error' | 'info';
|
|
24
|
-
sx: SxProps;
|
|
25
|
-
private inputId;
|
|
26
|
-
private isFocused;
|
|
27
|
-
static styles: import('lit').CSSResult[];
|
|
28
|
-
render(): import('lit').TemplateResult<1>;
|
|
29
|
-
private handleInput;
|
|
30
|
-
private handleFocus;
|
|
31
|
-
private handleBlur;
|
|
32
|
-
private handleKeydown;
|
|
33
|
-
focus(): void;
|
|
34
|
-
}
|
|
35
|
-
declare global {
|
|
36
|
-
interface HTMLElementTagNameMap {
|
|
37
|
-
'tc-input-with-chip': TcInputWithChip;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
//# sourceMappingURL=tc-input-with-chip.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tc-input-with-chip.d.ts","sourceRoot":"","sources":["../../src/primitives/tc-input-with-chip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,MAAM,KAAK,CAAC;AAK5C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,cAAc,CAAC;AACtB,OAAO,cAAc,CAAC;AAGtB;;;;;;;;;;GAUG;AACH,qBACa,eAAgB,SAAQ,UAAU;IACjB,KAAK,SAAM;IACX,WAAW,SAAM;IACjB,KAAK,SAAM;IACX,KAAK,SAAM;IACV,QAAQ,UAAS;IACjB,QAAQ,UAAS;IACO,SAAS,SAAM;IAChB,QAAQ,SAAM;IACX,WAAW,EAC9D,SAAS,GACT,SAAS,GACT,OAAO,GACP,MAAM,CAAa;IACK,EAAE,EAAE,OAAO,CAAM;IAEpC,OAAO,CAAC,OAAO,CACiC;IAChD,OAAO,CAAC,SAAS,CAAS;IAEnC,OAAgB,MAAM,4BA6GpB;IAEO,MAAM;IAoEf,OAAO,CAAC,WAAW;IAanB,OAAO,CAAC,WAAW;IAInB,OAAO,CAAC,UAAU;IAalB,OAAO,CAAC,aAAa;IAUrB,KAAK;CAIN;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,oBAAoB,EAAE,eAAe,CAAC;KACvC;CACF"}
|