@esportsplus/ui 0.24.3 → 0.24.5
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/build/components/field/index.d.ts +17481 -0
- package/build/components/field/select.d.ts +60 -20
- package/build/components/field/select.js +30 -30
- package/build/components/frame/index.d.ts +20 -0
- package/build/components/frame/index.js +7 -0
- package/build/components/grid/index.d.ts +1 -0
- package/build/components/grid/index.js +1 -0
- package/build/components/group/index.d.ts +1 -0
- package/build/components/group/index.js +1 -0
- package/build/components/highlight/index.d.ts +21 -0
- package/build/components/highlight/index.js +48 -0
- package/build/components/icon/index.d.ts +20 -0
- package/build/components/icon/index.js +10 -0
- package/build/components/index.d.ts +37 -0
- package/build/components/index.js +37 -0
- package/build/components/json/download.d.ts +2 -0
- package/build/components/json/download.js +8 -0
- package/build/components/json/index.d.ts +4 -0
- package/build/components/json/index.js +2 -0
- package/build/components/link/index.d.ts +1 -0
- package/build/components/link/index.js +1 -0
- package/build/components/loader/index.d.ts +21 -0
- package/build/components/loader/index.js +67 -0
- package/build/components/loading/index.d.ts +4 -0
- package/build/components/loading/index.js +12 -0
- package/build/components/modal/index.d.ts +1 -0
- package/build/components/modal/index.js +1 -0
- package/build/components/number/index.d.ts +2 -0
- package/build/components/number/index.js +2 -0
- package/build/components/overlay/index.d.ts +20 -0
- package/build/components/overlay/index.js +7 -0
- package/build/components/page/index.d.ts +1 -0
- package/build/components/page/index.js +1 -0
- package/build/components/row/index.d.ts +1 -0
- package/build/components/row/index.js +1 -0
- package/build/components/sidebar/index.d.ts +20 -0
- package/build/components/sidebar/index.js +7 -0
- package/build/components/site/index.d.ts +20 -0
- package/build/components/site/index.js +9 -0
- package/build/components/text/index.d.ts +1 -0
- package/build/components/text/index.js +1 -0
- package/build/components/thumbnail/index.d.ts +1 -0
- package/build/components/thumbnail/index.js +1 -0
- package/build/components/truncate/index.d.ts +2 -0
- package/build/components/truncate/index.js +2 -0
- package/build/components/typewriter/index.d.ts +20 -0
- package/build/components/typewriter/index.js +43 -0
- package/build/css-utilities/index.d.ts +20 -0
- package/build/css-utilities/index.js +20 -0
- package/build/fonts/index.d.ts +1 -0
- package/build/fonts/index.js +1 -0
- package/build/fonts/montserrat/index.d.ts +1 -0
- package/build/fonts/montserrat/index.js +1 -0
- package/build/normalize/index.d.ts +1 -0
- package/build/normalize/index.js +1 -0
- package/package.json +1 -1
- package/src/components/field/select.ts +104 -102
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import './scss/index.scss';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
(): ReturnType<(this: {
|
|
4
|
+
attributes?: import("../../components/scrollbar/index.js").Attributes | undefined;
|
|
5
|
+
content?: import("@esportsplus/template").Renderable<any>;
|
|
6
|
+
}, attributes: Readonly<import("../../components/scrollbar/index.js").Attributes>, content: import("@esportsplus/template").Renderable<any>) => import("@esportsplus/template").Renderable<any>>;
|
|
7
|
+
<T extends import("../../components/scrollbar/index.js").Attributes>(attributes: T): ReturnType<(this: {
|
|
8
|
+
attributes?: import("../../components/scrollbar/index.js").Attributes | undefined;
|
|
9
|
+
content?: import("@esportsplus/template").Renderable<any>;
|
|
10
|
+
}, attributes: Readonly<import("../../components/scrollbar/index.js").Attributes>, content: import("@esportsplus/template").Renderable<any>) => import("@esportsplus/template").Renderable<any>>;
|
|
11
|
+
<T extends import("@esportsplus/template").Renderable<any>>(content: T): ReturnType<(this: {
|
|
12
|
+
attributes?: import("../../components/scrollbar/index.js").Attributes | undefined;
|
|
13
|
+
content?: import("@esportsplus/template").Renderable<any>;
|
|
14
|
+
}, attributes: Readonly<import("../../components/scrollbar/index.js").Attributes>, content: import("@esportsplus/template").Renderable<any>) => import("@esportsplus/template").Renderable<any>>;
|
|
15
|
+
(attributes: import("../../components/scrollbar/index.js").Attributes, content: import("@esportsplus/template").Renderable<any>): ReturnType<(this: {
|
|
16
|
+
attributes?: import("../../components/scrollbar/index.js").Attributes | undefined;
|
|
17
|
+
content?: import("@esportsplus/template").Renderable<any>;
|
|
18
|
+
}, attributes: Readonly<import("../../components/scrollbar/index.js").Attributes>, content: import("@esportsplus/template").Renderable<any>) => import("@esportsplus/template").Renderable<any>>;
|
|
19
|
+
};
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './scss/index.scss';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './scss/index.scss';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './scss/index.scss';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './scss/index.scss';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import './scss/index.scss';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
(): ReturnType<(this: {
|
|
4
|
+
attributes?: import("../../components/scrollbar/index.js").Attributes | undefined;
|
|
5
|
+
content?: import("@esportsplus/template").Renderable<any>;
|
|
6
|
+
}, attributes: Readonly<import("../../components/scrollbar/index.js").Attributes>, content: import("@esportsplus/template").Renderable<any>) => import("@esportsplus/template").Renderable<any>>;
|
|
7
|
+
<T extends import("../../components/scrollbar/index.js").Attributes>(attributes: T): ReturnType<(this: {
|
|
8
|
+
attributes?: import("../../components/scrollbar/index.js").Attributes | undefined;
|
|
9
|
+
content?: import("@esportsplus/template").Renderable<any>;
|
|
10
|
+
}, attributes: Readonly<import("../../components/scrollbar/index.js").Attributes>, content: import("@esportsplus/template").Renderable<any>) => import("@esportsplus/template").Renderable<any>>;
|
|
11
|
+
<T extends import("@esportsplus/template").Renderable<any>>(content: T): ReturnType<(this: {
|
|
12
|
+
attributes?: import("../../components/scrollbar/index.js").Attributes | undefined;
|
|
13
|
+
content?: import("@esportsplus/template").Renderable<any>;
|
|
14
|
+
}, attributes: Readonly<import("../../components/scrollbar/index.js").Attributes>, content: import("@esportsplus/template").Renderable<any>) => import("@esportsplus/template").Renderable<any>>;
|
|
15
|
+
(attributes: import("../../components/scrollbar/index.js").Attributes, content: import("@esportsplus/template").Renderable<any>): ReturnType<(this: {
|
|
16
|
+
attributes?: import("../../components/scrollbar/index.js").Attributes | undefined;
|
|
17
|
+
content?: import("@esportsplus/template").Renderable<any>;
|
|
18
|
+
}, attributes: Readonly<import("../../components/scrollbar/index.js").Attributes>, content: import("@esportsplus/template").Renderable<any>) => import("@esportsplus/template").Renderable<any>>;
|
|
19
|
+
};
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import './scss/index.scss';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
(): ReturnType<(this: {
|
|
4
|
+
attributes?: import("../../components/scrollbar/index.js").Attributes | undefined;
|
|
5
|
+
content?: import("@esportsplus/template").Renderable<any>;
|
|
6
|
+
}, attributes: Readonly<import("../../components/scrollbar/index.js").Attributes>, content: import("@esportsplus/template").Renderable<any>) => import("@esportsplus/template").Renderable<any>>;
|
|
7
|
+
<T extends import("../../components/scrollbar/index.js").Attributes>(attributes: T): ReturnType<(this: {
|
|
8
|
+
attributes?: import("../../components/scrollbar/index.js").Attributes | undefined;
|
|
9
|
+
content?: import("@esportsplus/template").Renderable<any>;
|
|
10
|
+
}, attributes: Readonly<import("../../components/scrollbar/index.js").Attributes>, content: import("@esportsplus/template").Renderable<any>) => import("@esportsplus/template").Renderable<any>>;
|
|
11
|
+
<T extends import("@esportsplus/template").Renderable<any>>(content: T): ReturnType<(this: {
|
|
12
|
+
attributes?: import("../../components/scrollbar/index.js").Attributes | undefined;
|
|
13
|
+
content?: import("@esportsplus/template").Renderable<any>;
|
|
14
|
+
}, attributes: Readonly<import("../../components/scrollbar/index.js").Attributes>, content: import("@esportsplus/template").Renderable<any>) => import("@esportsplus/template").Renderable<any>>;
|
|
15
|
+
(attributes: import("../../components/scrollbar/index.js").Attributes, content: import("@esportsplus/template").Renderable<any>): ReturnType<(this: {
|
|
16
|
+
attributes?: import("../../components/scrollbar/index.js").Attributes | undefined;
|
|
17
|
+
content?: import("@esportsplus/template").Renderable<any>;
|
|
18
|
+
}, attributes: Readonly<import("../../components/scrollbar/index.js").Attributes>, content: import("@esportsplus/template").Renderable<any>) => import("@esportsplus/template").Renderable<any>>;
|
|
19
|
+
};
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './scss/index.scss';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './scss/index.scss';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './scss/index.scss';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './scss/index.scss';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import './scss/index.scss';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
(): ReturnType<(this: {
|
|
4
|
+
attributes?: import("@esportsplus/template").Attributes | undefined;
|
|
5
|
+
content?: string[] | undefined;
|
|
6
|
+
}, attributes: Readonly<import("@esportsplus/template").Attributes>, content: string[]) => import("@esportsplus/template").Renderable<any>>;
|
|
7
|
+
<T extends import("@esportsplus/template").Attributes>(attributes: T): ReturnType<(this: {
|
|
8
|
+
attributes?: import("@esportsplus/template").Attributes | undefined;
|
|
9
|
+
content?: string[] | undefined;
|
|
10
|
+
}, attributes: Readonly<import("@esportsplus/template").Attributes>, content: string[]) => import("@esportsplus/template").Renderable<any>>;
|
|
11
|
+
<T extends string[]>(content: T): ReturnType<(this: {
|
|
12
|
+
attributes?: import("@esportsplus/template").Attributes | undefined;
|
|
13
|
+
content?: string[] | undefined;
|
|
14
|
+
}, attributes: Readonly<import("@esportsplus/template").Attributes>, content: string[]) => import("@esportsplus/template").Renderable<any>>;
|
|
15
|
+
(attributes: import("@esportsplus/template").Attributes, content: string[]): ReturnType<(this: {
|
|
16
|
+
attributes?: import("@esportsplus/template").Attributes | undefined;
|
|
17
|
+
content?: string[] | undefined;
|
|
18
|
+
}, attributes: Readonly<import("@esportsplus/template").Attributes>, content: string[]) => import("@esportsplus/template").Renderable<any>>;
|
|
19
|
+
};
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { html } from '@esportsplus/template';
|
|
2
|
+
import { reactive } from '@esportsplus/reactivity';
|
|
3
|
+
import template from '../../components/template/index.js';
|
|
4
|
+
import './scss/index.scss';
|
|
5
|
+
const EMPTY_NODE = html ` `;
|
|
6
|
+
export default template.factory(function (_, content) {
|
|
7
|
+
let state = reactive({ text: '' });
|
|
8
|
+
return html `
|
|
9
|
+
<div class='typewriter' ${{
|
|
10
|
+
onconnect: () => {
|
|
11
|
+
let character = 0, i = 0, isWriting = true, write = content[i];
|
|
12
|
+
function play() {
|
|
13
|
+
setTimeout(() => {
|
|
14
|
+
state.text = write.slice(0, character);
|
|
15
|
+
if (isWriting) {
|
|
16
|
+
if (character > write.length) {
|
|
17
|
+
isWriting = false;
|
|
18
|
+
setTimeout(play, 2000);
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
character++;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
if (character === 0) {
|
|
27
|
+
isWriting = true;
|
|
28
|
+
write = content[++i] || content[i = 0];
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
character--;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
play();
|
|
35
|
+
}, isWriting ? 64 : 32);
|
|
36
|
+
}
|
|
37
|
+
play();
|
|
38
|
+
}
|
|
39
|
+
}}>
|
|
40
|
+
${() => state.text || EMPTY_NODE}
|
|
41
|
+
</div>
|
|
42
|
+
`;
|
|
43
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import './[margin,padding]/scss/index.scss';
|
|
2
|
+
import './absolute/scss/index.scss';
|
|
3
|
+
import './background/scss/index.scss';
|
|
4
|
+
import './border/scss/index.scss';
|
|
5
|
+
import './color/scss/index.scss';
|
|
6
|
+
import './disabled/scss/index.scss';
|
|
7
|
+
import './flex/scss/index.scss';
|
|
8
|
+
import './flicker/scss/index.scss';
|
|
9
|
+
import './focus/scss/index.scss';
|
|
10
|
+
import './glass/scss/index.scss';
|
|
11
|
+
import './hidden/scss/index.scss';
|
|
12
|
+
import './inline/scss/index.scss';
|
|
13
|
+
import './line-height/scss/index.scss';
|
|
14
|
+
import './not-allowed/scss/index.scss';
|
|
15
|
+
import './pointer/scss/index.scss';
|
|
16
|
+
import './size/scss/index.scss';
|
|
17
|
+
import './squircle/scss/index.scss';
|
|
18
|
+
import './text/scss/index.scss';
|
|
19
|
+
import './viewport/scss/index.scss';
|
|
20
|
+
import './width/scss/index.scss';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import './[margin,padding]/scss/index.scss';
|
|
2
|
+
import './absolute/scss/index.scss';
|
|
3
|
+
import './background/scss/index.scss';
|
|
4
|
+
import './border/scss/index.scss';
|
|
5
|
+
import './color/scss/index.scss';
|
|
6
|
+
import './disabled/scss/index.scss';
|
|
7
|
+
import './flex/scss/index.scss';
|
|
8
|
+
import './flicker/scss/index.scss';
|
|
9
|
+
import './focus/scss/index.scss';
|
|
10
|
+
import './glass/scss/index.scss';
|
|
11
|
+
import './hidden/scss/index.scss';
|
|
12
|
+
import './inline/scss/index.scss';
|
|
13
|
+
import './line-height/scss/index.scss';
|
|
14
|
+
import './not-allowed/scss/index.scss';
|
|
15
|
+
import './pointer/scss/index.scss';
|
|
16
|
+
import './size/scss/index.scss';
|
|
17
|
+
import './squircle/scss/index.scss';
|
|
18
|
+
import './text/scss/index.scss';
|
|
19
|
+
import './viewport/scss/index.scss';
|
|
20
|
+
import './width/scss/index.scss';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as montserrat from './montserrat/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as montserrat from './montserrat/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './scss/index.scss';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './scss/index.scss';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './scss/index.scss';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './scss/index.scss';
|
package/package.json
CHANGED
|
@@ -51,114 +51,116 @@ function set(state: { active: boolean }, value: boolean) {
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
|
|
54
|
-
const select =
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
54
|
+
const select = template.factory(
|
|
55
|
+
function(
|
|
56
|
+
this: {
|
|
57
|
+
options: { content: unknown } & Attributes;
|
|
58
|
+
option?: Attributes;
|
|
59
|
+
state: {
|
|
60
|
+
active: boolean;
|
|
61
|
+
error: string;
|
|
62
|
+
render: boolean;
|
|
63
|
+
selected: string | number;
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
attributes: A,
|
|
67
|
+
content: Renderable<unknown>
|
|
68
|
+
) {
|
|
69
|
+
let { option, options, state } = this;
|
|
70
|
+
|
|
71
|
+
return html`
|
|
72
|
+
<label
|
|
73
|
+
class='field-mask field-mask--select'
|
|
74
|
+
${omit(attributes, OMIT_MASK)}
|
|
75
|
+
${{
|
|
76
|
+
onclick: () => {
|
|
77
|
+
if (state.render) {
|
|
78
|
+
set(state, !state.active);
|
|
79
|
+
}
|
|
69
80
|
|
|
70
|
-
|
|
71
|
-
<label
|
|
72
|
-
class='field-mask field-mask--select'
|
|
73
|
-
${omit(attributes, OMIT_MASK)}
|
|
74
|
-
${{
|
|
75
|
-
onclick: () => {
|
|
76
|
-
if (state.render) {
|
|
77
|
-
set(state, !state.active);
|
|
81
|
+
state.render = true;
|
|
78
82
|
}
|
|
79
|
-
|
|
80
|
-
state.render = true;
|
|
81
|
-
}
|
|
82
|
-
}}
|
|
83
|
-
>
|
|
84
|
-
<input class='field-mask-tag field-mask-tag--hidden'
|
|
85
|
-
${{
|
|
86
|
-
name: attributes.name,
|
|
87
|
-
onclick: () => { /* Prevent double click events from firing */ },
|
|
88
|
-
onrender: form.input.onrender(state),
|
|
89
|
-
value: () => state.selected
|
|
90
83
|
}}
|
|
91
|
-
${attributes['field-mask-tag']}
|
|
92
84
|
>
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
85
|
+
<input class='field-mask-tag field-mask-tag--hidden'
|
|
86
|
+
${{
|
|
87
|
+
name: attributes.name,
|
|
88
|
+
onclick: () => { /* Prevent double click events from firing */ },
|
|
89
|
+
onrender: form.input.onrender(state),
|
|
90
|
+
value: () => state.selected
|
|
99
91
|
}}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
class: [
|
|
119
|
-
...toArray(attributes['tooltip-content']?.class),
|
|
120
|
-
`tooltip-content tooltip-content--${attributes['tooltip-content']?.direction || 's'} --flex-column --width-full`
|
|
121
|
-
],
|
|
122
|
-
onclick: (e: Event) => {
|
|
123
|
-
let key = (e?.target as HTMLElement)?.dataset?.key;
|
|
124
|
-
|
|
125
|
-
if (key === undefined) {
|
|
126
|
-
return;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
let previous = state.selected;
|
|
130
|
-
|
|
131
|
-
set(state, false);
|
|
132
|
-
state.selected = key;
|
|
92
|
+
${attributes['field-mask-tag']}
|
|
93
|
+
>
|
|
94
|
+
|
|
95
|
+
${content || html`
|
|
96
|
+
<div class='field-mask-text' ${attributes['field-mask-text']}>
|
|
97
|
+
${() => {
|
|
98
|
+
// @ts-ignore
|
|
99
|
+
return (options[ state.selected ]?.content || '-');
|
|
100
|
+
}}
|
|
101
|
+
</div>
|
|
102
|
+
`}
|
|
103
|
+
|
|
104
|
+
<div class='field-mask-arrow' ${attributes['field-mask-arrow']}></div>
|
|
105
|
+
|
|
106
|
+
${() => {
|
|
107
|
+
if (!state.render) {
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
133
110
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
111
|
+
let keys = Object.keys(options),
|
|
112
|
+
selected = reactive(
|
|
113
|
+
Object.fromEntries( keys.map(key => [key, false]) )
|
|
114
|
+
);
|
|
115
|
+
|
|
116
|
+
return scrollbar(
|
|
117
|
+
{
|
|
118
|
+
...attributes['tooltip-content'],
|
|
119
|
+
class: [
|
|
120
|
+
...toArray(attributes['tooltip-content']?.class),
|
|
121
|
+
`tooltip-content tooltip-content--${attributes['tooltip-content']?.direction || 's'} --flex-column --width-full`
|
|
122
|
+
],
|
|
123
|
+
onclick: (e: Event) => {
|
|
124
|
+
let key = (e?.target as HTMLElement)?.dataset?.key;
|
|
125
|
+
|
|
126
|
+
if (key === undefined) {
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
let previous = state.selected;
|
|
131
|
+
|
|
132
|
+
set(state, false);
|
|
133
|
+
state.selected = key;
|
|
134
|
+
|
|
135
|
+
selected[key] = true;
|
|
136
|
+
selected[previous] = false;
|
|
137
|
+
},
|
|
138
|
+
onconnect: () => {
|
|
139
|
+
set(state, true);
|
|
140
|
+
},
|
|
141
|
+
scrollbar: attributes['scrollbar'],
|
|
142
|
+
'scrollbar-container-content': attributes['scrollbar-container-content']
|
|
139
143
|
},
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
'
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
`;
|
|
161
|
-
};
|
|
144
|
+
keys.map((key) => html`
|
|
145
|
+
<div class='link'
|
|
146
|
+
${omit(options[key] as Attributes, OMIT_OPTION)}
|
|
147
|
+
${option}
|
|
148
|
+
${{
|
|
149
|
+
class: () => selected[key] && '--active',
|
|
150
|
+
'data-key': key
|
|
151
|
+
}}
|
|
152
|
+
>
|
|
153
|
+
<span class='--text-truncate --pointer-none'>
|
|
154
|
+
${(options[key] as any).content}
|
|
155
|
+
</span>
|
|
156
|
+
</div>
|
|
157
|
+
`)
|
|
158
|
+
);
|
|
159
|
+
}}
|
|
160
|
+
</label>
|
|
161
|
+
`;
|
|
162
|
+
}
|
|
163
|
+
);
|
|
162
164
|
|
|
163
165
|
|
|
164
166
|
export default template.factory<
|
|
@@ -179,7 +181,7 @@ export default template.factory<
|
|
|
179
181
|
}
|
|
180
182
|
}
|
|
181
183
|
),
|
|
182
|
-
(mask:
|
|
184
|
+
(mask: typeof select) => Renderable<unknown>
|
|
183
185
|
>((attributes, content) => {
|
|
184
186
|
let options = attributes.options,
|
|
185
187
|
state = attributes.state || reactive({
|