@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
|
@@ -1,14 +1,54 @@
|
|
|
1
1
|
import { type Attributes, type Renderable } from '@esportsplus/template';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
declare const select: {
|
|
3
|
+
(): ReturnType<(this: {
|
|
4
|
+
options: {
|
|
5
|
+
content: unknown;
|
|
6
|
+
} & Attributes;
|
|
7
|
+
option?: Attributes;
|
|
8
|
+
state: {
|
|
9
|
+
active: boolean;
|
|
10
|
+
error: string;
|
|
11
|
+
render: boolean;
|
|
12
|
+
selected: string | number;
|
|
13
|
+
};
|
|
14
|
+
}, attributes: Readonly<Attributes>, content: Renderable<unknown>) => Renderable<any>>;
|
|
15
|
+
<T extends Attributes>(attributes: T): ReturnType<(this: {
|
|
16
|
+
options: {
|
|
17
|
+
content: unknown;
|
|
18
|
+
} & Attributes;
|
|
19
|
+
option?: Attributes;
|
|
20
|
+
state: {
|
|
21
|
+
active: boolean;
|
|
22
|
+
error: string;
|
|
23
|
+
render: boolean;
|
|
24
|
+
selected: string | number;
|
|
25
|
+
};
|
|
26
|
+
}, attributes: Readonly<Attributes>, content: Renderable<unknown>) => Renderable<any>>;
|
|
27
|
+
<T extends Renderable<unknown>>(content: T): ReturnType<(this: {
|
|
28
|
+
options: {
|
|
29
|
+
content: unknown;
|
|
30
|
+
} & Attributes;
|
|
31
|
+
option?: Attributes;
|
|
32
|
+
state: {
|
|
33
|
+
active: boolean;
|
|
34
|
+
error: string;
|
|
35
|
+
render: boolean;
|
|
36
|
+
selected: string | number;
|
|
37
|
+
};
|
|
38
|
+
}, attributes: Readonly<Attributes>, content: Renderable<unknown>) => Renderable<any>>;
|
|
39
|
+
(attributes: Attributes, content: Renderable<unknown>): ReturnType<(this: {
|
|
40
|
+
options: {
|
|
41
|
+
content: unknown;
|
|
42
|
+
} & Attributes;
|
|
43
|
+
option?: Attributes;
|
|
44
|
+
state: {
|
|
45
|
+
active: boolean;
|
|
46
|
+
error: string;
|
|
47
|
+
render: boolean;
|
|
48
|
+
selected: string | number;
|
|
49
|
+
};
|
|
50
|
+
}, attributes: Readonly<Attributes>, content: Renderable<unknown>) => Renderable<any>>;
|
|
51
|
+
};
|
|
12
52
|
declare const _default: {
|
|
13
53
|
(): ReturnType<(this: {
|
|
14
54
|
attributes?: ({
|
|
@@ -140,7 +180,7 @@ declare const _default: {
|
|
|
140
180
|
selected?: number | string;
|
|
141
181
|
};
|
|
142
182
|
})))) | undefined;
|
|
143
|
-
content?: ((mask:
|
|
183
|
+
content?: ((mask: typeof select) => Renderable<unknown>) | undefined;
|
|
144
184
|
}, attributes: Readonly<{
|
|
145
185
|
[key: `aria-${string}`]: string | number | boolean | undefined;
|
|
146
186
|
[key: `data-${string}`]: string | undefined;
|
|
@@ -269,7 +309,7 @@ declare const _default: {
|
|
|
269
309
|
render: boolean;
|
|
270
310
|
selected?: number | string;
|
|
271
311
|
};
|
|
272
|
-
})))>, content: (mask:
|
|
312
|
+
})))>, content: (mask: typeof select) => Renderable<unknown>) => Renderable<any>>;
|
|
273
313
|
<T extends {
|
|
274
314
|
[key: `aria-${string}`]: string | number | boolean | undefined;
|
|
275
315
|
[key: `data-${string}`]: string | undefined;
|
|
@@ -528,7 +568,7 @@ declare const _default: {
|
|
|
528
568
|
selected?: number | string;
|
|
529
569
|
};
|
|
530
570
|
})))) | undefined;
|
|
531
|
-
content?: ((mask:
|
|
571
|
+
content?: ((mask: typeof select) => Renderable<unknown>) | undefined;
|
|
532
572
|
}, attributes: Readonly<{
|
|
533
573
|
[key: `aria-${string}`]: string | number | boolean | undefined;
|
|
534
574
|
[key: `data-${string}`]: string | undefined;
|
|
@@ -657,8 +697,8 @@ declare const _default: {
|
|
|
657
697
|
render: boolean;
|
|
658
698
|
selected?: number | string;
|
|
659
699
|
};
|
|
660
|
-
})))>, content: (mask:
|
|
661
|
-
<T extends (mask:
|
|
700
|
+
})))>, content: (mask: typeof select) => Renderable<unknown>) => Renderable<any>>;
|
|
701
|
+
<T extends (mask: typeof select) => Renderable<unknown>>(content: T): ReturnType<(this: {
|
|
662
702
|
attributes?: ({
|
|
663
703
|
[key: `aria-${string}`]: string | number | boolean | undefined;
|
|
664
704
|
[key: `data-${string}`]: string | undefined;
|
|
@@ -788,7 +828,7 @@ declare const _default: {
|
|
|
788
828
|
selected?: number | string;
|
|
789
829
|
};
|
|
790
830
|
})))) | undefined;
|
|
791
|
-
content?: ((mask:
|
|
831
|
+
content?: ((mask: typeof select) => Renderable<unknown>) | undefined;
|
|
792
832
|
}, attributes: Readonly<{
|
|
793
833
|
[key: `aria-${string}`]: string | number | boolean | undefined;
|
|
794
834
|
[key: `data-${string}`]: string | undefined;
|
|
@@ -917,7 +957,7 @@ declare const _default: {
|
|
|
917
957
|
render: boolean;
|
|
918
958
|
selected?: number | string;
|
|
919
959
|
};
|
|
920
|
-
})))>, content: (mask:
|
|
960
|
+
})))>, content: (mask: typeof select) => Renderable<unknown>) => Renderable<any>>;
|
|
921
961
|
(attributes: {
|
|
922
962
|
[key: `aria-${string}`]: string | number | boolean | undefined;
|
|
923
963
|
[key: `data-${string}`]: string | undefined;
|
|
@@ -1046,7 +1086,7 @@ declare const _default: {
|
|
|
1046
1086
|
render: boolean;
|
|
1047
1087
|
selected?: number | string;
|
|
1048
1088
|
};
|
|
1049
|
-
}))), content: (mask:
|
|
1089
|
+
}))), content: (mask: typeof select) => Renderable<unknown>): ReturnType<(this: {
|
|
1050
1090
|
attributes?: ({
|
|
1051
1091
|
[key: `aria-${string}`]: string | number | boolean | undefined;
|
|
1052
1092
|
[key: `data-${string}`]: string | undefined;
|
|
@@ -1176,7 +1216,7 @@ declare const _default: {
|
|
|
1176
1216
|
selected?: number | string;
|
|
1177
1217
|
};
|
|
1178
1218
|
})))) | undefined;
|
|
1179
|
-
content?: ((mask:
|
|
1219
|
+
content?: ((mask: typeof select) => Renderable<unknown>) | undefined;
|
|
1180
1220
|
}, attributes: Readonly<{
|
|
1181
1221
|
[key: `aria-${string}`]: string | number | boolean | undefined;
|
|
1182
1222
|
[key: `data-${string}`]: string | undefined;
|
|
@@ -1305,6 +1345,6 @@ declare const _default: {
|
|
|
1305
1345
|
render: boolean;
|
|
1306
1346
|
selected?: number | string;
|
|
1307
1347
|
};
|
|
1308
|
-
})))>, content: (mask:
|
|
1348
|
+
})))>, content: (mask: typeof select) => Renderable<unknown>) => Renderable<any>>;
|
|
1309
1349
|
};
|
|
1310
1350
|
export default _default;
|
|
@@ -30,13 +30,13 @@ function set(state, value) {
|
|
|
30
30
|
field = null;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
const select = function (attributes, content) {
|
|
33
|
+
const select = template.factory(function (attributes, content) {
|
|
34
34
|
let { option, options, state } = this;
|
|
35
35
|
return html `
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
<label
|
|
37
|
+
class='field-mask field-mask--select'
|
|
38
|
+
${omit(attributes, OMIT_MASK)}
|
|
39
|
+
${{
|
|
40
40
|
onclick: () => {
|
|
41
41
|
if (state.render) {
|
|
42
42
|
set(state, !state.active);
|
|
@@ -44,28 +44,28 @@ const select = function (attributes, content) {
|
|
|
44
44
|
state.render = true;
|
|
45
45
|
}
|
|
46
46
|
}}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
>
|
|
48
|
+
<input class='field-mask-tag field-mask-tag--hidden'
|
|
49
|
+
${{
|
|
50
50
|
name: attributes.name,
|
|
51
51
|
onclick: () => { },
|
|
52
52
|
onrender: form.input.onrender(state),
|
|
53
53
|
value: () => state.selected
|
|
54
54
|
}}
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
${attributes['field-mask-tag']}
|
|
56
|
+
>
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
${content || html `
|
|
59
|
+
<div class='field-mask-text' ${attributes['field-mask-text']}>
|
|
60
|
+
${() => {
|
|
61
61
|
return (options[state.selected]?.content || '-');
|
|
62
62
|
}}
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
</div>
|
|
64
|
+
`}
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
<div class='field-mask-arrow' ${attributes['field-mask-arrow']}></div>
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
${() => {
|
|
69
69
|
if (!state.render) {
|
|
70
70
|
return;
|
|
71
71
|
}
|
|
@@ -93,23 +93,23 @@ const select = function (attributes, content) {
|
|
|
93
93
|
scrollbar: attributes['scrollbar'],
|
|
94
94
|
'scrollbar-container-content': attributes['scrollbar-container-content']
|
|
95
95
|
}, keys.map((key) => html `
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
96
|
+
<div class='link'
|
|
97
|
+
${omit(options[key], OMIT_OPTION)}
|
|
98
|
+
${option}
|
|
99
|
+
${{
|
|
100
100
|
class: () => selected[key] && '--active',
|
|
101
101
|
'data-key': key
|
|
102
102
|
}}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
103
|
+
>
|
|
104
|
+
<span class='--text-truncate --pointer-none'>
|
|
105
|
+
${options[key].content}
|
|
106
|
+
</span>
|
|
107
|
+
</div>
|
|
108
|
+
`));
|
|
109
109
|
}}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
};
|
|
110
|
+
</label>
|
|
111
|
+
`;
|
|
112
|
+
});
|
|
113
113
|
export default template.factory((attributes, content) => {
|
|
114
114
|
let options = attributes.options, state = attributes.state || reactive({
|
|
115
115
|
active: false,
|
|
@@ -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,21 @@
|
|
|
1
|
+
import { Attributes } from '@esportsplus/template';
|
|
2
|
+
import './scss/index.scss';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
(): ReturnType<(this: {
|
|
5
|
+
attributes?: Attributes | undefined;
|
|
6
|
+
content?: import("@esportsplus/template").Renderable<any>;
|
|
7
|
+
}, attributes: Readonly<Attributes>, content: import("@esportsplus/template").Renderable<any>) => import("@esportsplus/template").Renderable<any>>;
|
|
8
|
+
<T extends Attributes>(attributes: T): ReturnType<(this: {
|
|
9
|
+
attributes?: Attributes | undefined;
|
|
10
|
+
content?: import("@esportsplus/template").Renderable<any>;
|
|
11
|
+
}, attributes: Readonly<Attributes>, content: import("@esportsplus/template").Renderable<any>) => import("@esportsplus/template").Renderable<any>>;
|
|
12
|
+
<T extends import("@esportsplus/template").Renderable<any>>(content: T): ReturnType<(this: {
|
|
13
|
+
attributes?: Attributes | undefined;
|
|
14
|
+
content?: import("@esportsplus/template").Renderable<any>;
|
|
15
|
+
}, attributes: Readonly<Attributes>, content: import("@esportsplus/template").Renderable<any>) => import("@esportsplus/template").Renderable<any>>;
|
|
16
|
+
(attributes: Attributes, content: import("@esportsplus/template").Renderable<any>): ReturnType<(this: {
|
|
17
|
+
attributes?: Attributes | undefined;
|
|
18
|
+
content?: import("@esportsplus/template").Renderable<any>;
|
|
19
|
+
}, attributes: Readonly<Attributes>, content: import("@esportsplus/template").Renderable<any>) => import("@esportsplus/template").Renderable<any>>;
|
|
20
|
+
};
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { reactive } from '@esportsplus/reactivity';
|
|
2
|
+
import { html } from '@esportsplus/template';
|
|
3
|
+
import { omit } from '@esportsplus/utilities';
|
|
4
|
+
import template from '../../components/template/index.js';
|
|
5
|
+
import './scss/index.scss';
|
|
6
|
+
const OMIT = ['background'];
|
|
7
|
+
let key = Symbol(), observer = null;
|
|
8
|
+
export default template.factory((attributes, content) => {
|
|
9
|
+
if (observer === null) {
|
|
10
|
+
observer = new IntersectionObserver((entries) => {
|
|
11
|
+
let disconnected = 0, n = entries.length;
|
|
12
|
+
for (let i = 0; i < n; i++) {
|
|
13
|
+
let { isIntersecting, target } = entries[i];
|
|
14
|
+
if (target.isConnected) {
|
|
15
|
+
target[key].highlight = +isIntersecting;
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
disconnected++;
|
|
19
|
+
observer.unobserve(target);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
if (n - disconnected === 0) {
|
|
23
|
+
observer.disconnect();
|
|
24
|
+
observer = null;
|
|
25
|
+
}
|
|
26
|
+
}, { threshold: 1 });
|
|
27
|
+
}
|
|
28
|
+
let state = reactive({
|
|
29
|
+
highlight: 0
|
|
30
|
+
});
|
|
31
|
+
return html `
|
|
32
|
+
<div class='highlight'
|
|
33
|
+
${omit(attributes, OMIT)}
|
|
34
|
+
${{
|
|
35
|
+
onrender: (element) => {
|
|
36
|
+
element[key] = state;
|
|
37
|
+
observer.observe(element);
|
|
38
|
+
},
|
|
39
|
+
style: [
|
|
40
|
+
() => `--highlight: ${state.highlight}`,
|
|
41
|
+
`--background: ${attributes.background}`,
|
|
42
|
+
]
|
|
43
|
+
}}
|
|
44
|
+
>
|
|
45
|
+
${content}
|
|
46
|
+
</div>
|
|
47
|
+
`;
|
|
48
|
+
});
|
|
@@ -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,10 @@
|
|
|
1
|
+
import { html, svg } from '@esportsplus/template';
|
|
2
|
+
import template from '../../components/template/index.js';
|
|
3
|
+
import './scss/index.scss';
|
|
4
|
+
export default template.factory((attributes, icon) => {
|
|
5
|
+
return html `
|
|
6
|
+
<div class='icon' ${attributes}>
|
|
7
|
+
${svg.sprite(icon)}
|
|
8
|
+
</div>
|
|
9
|
+
`;
|
|
10
|
+
});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export { default as accordion } from './accordion/index.js';
|
|
2
|
+
export * as anchor from './anchor/index.js';
|
|
3
|
+
export * as banner from './banner/index.js';
|
|
4
|
+
export * as border from './border/index.js';
|
|
5
|
+
export * as bubble from './bubble/index.js';
|
|
6
|
+
export * as button from './button/index.js';
|
|
7
|
+
export * as card from './card/index.js';
|
|
8
|
+
export { default as clipboard } from './clipboard/index.js';
|
|
9
|
+
export * as container from './container/index.js';
|
|
10
|
+
export { default as counter } from './counter/index.js';
|
|
11
|
+
export { default as ellipsis } from './ellipsis/index.js';
|
|
12
|
+
export { default as field } from './field/index.js';
|
|
13
|
+
export { default as form } from './form/index.js';
|
|
14
|
+
export * as frame from './frame/index.js';
|
|
15
|
+
export * as grid from './grid/index.js';
|
|
16
|
+
export * as group from './group/index.js';
|
|
17
|
+
export { default as highlight } from './highlight/index.js';
|
|
18
|
+
export { default as icon } from './icon/index.js';
|
|
19
|
+
export { default as json } from './json/index.js';
|
|
20
|
+
export * as link from './link/index.js';
|
|
21
|
+
export { default as loader } from './loader/index.js';
|
|
22
|
+
export { default as loading } from './loading/index.js';
|
|
23
|
+
export * as modal from './modal/index.js';
|
|
24
|
+
export { default as number } from './number/index.js';
|
|
25
|
+
export { default as overlay } from './overlay/index.js';
|
|
26
|
+
export * from './page/index.js';
|
|
27
|
+
export { default as root } from './root/index.js';
|
|
28
|
+
export * as row from './row/index.js';
|
|
29
|
+
export { default as scrollbar } from './scrollbar/index.js';
|
|
30
|
+
export { default as sidebar } from './sidebar/index.js';
|
|
31
|
+
export { default as site } from './site/index.js';
|
|
32
|
+
export { default as template } from './template/index.js';
|
|
33
|
+
export * as text from './text/index.js';
|
|
34
|
+
export * as thumbnail from './thumbnail/index.js';
|
|
35
|
+
export { default as tooltip } from './tooltip/index.js';
|
|
36
|
+
export { default as truncate } from './truncate/index.js';
|
|
37
|
+
export { default as typewriter } from './typewriter/index.js';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export { default as accordion } from './accordion/index.js';
|
|
2
|
+
export * as anchor from './anchor/index.js';
|
|
3
|
+
export * as banner from './banner/index.js';
|
|
4
|
+
export * as border from './border/index.js';
|
|
5
|
+
export * as bubble from './bubble/index.js';
|
|
6
|
+
export * as button from './button/index.js';
|
|
7
|
+
export * as card from './card/index.js';
|
|
8
|
+
export { default as clipboard } from './clipboard/index.js';
|
|
9
|
+
export * as container from './container/index.js';
|
|
10
|
+
export { default as counter } from './counter/index.js';
|
|
11
|
+
export { default as ellipsis } from './ellipsis/index.js';
|
|
12
|
+
export { default as field } from './field/index.js';
|
|
13
|
+
export { default as form } from './form/index.js';
|
|
14
|
+
export * as frame from './frame/index.js';
|
|
15
|
+
export * as grid from './grid/index.js';
|
|
16
|
+
export * as group from './group/index.js';
|
|
17
|
+
export { default as highlight } from './highlight/index.js';
|
|
18
|
+
export { default as icon } from './icon/index.js';
|
|
19
|
+
export { default as json } from './json/index.js';
|
|
20
|
+
export * as link from './link/index.js';
|
|
21
|
+
export { default as loader } from './loader/index.js';
|
|
22
|
+
export { default as loading } from './loading/index.js';
|
|
23
|
+
export * as modal from './modal/index.js';
|
|
24
|
+
export { default as number } from './number/index.js';
|
|
25
|
+
export { default as overlay } from './overlay/index.js';
|
|
26
|
+
export * from './page/index.js';
|
|
27
|
+
export { default as root } from './root/index.js';
|
|
28
|
+
export * as row from './row/index.js';
|
|
29
|
+
export { default as scrollbar } from './scrollbar/index.js';
|
|
30
|
+
export { default as sidebar } from './sidebar/index.js';
|
|
31
|
+
export { default as site } from './site/index.js';
|
|
32
|
+
export { default as template } from './template/index.js';
|
|
33
|
+
export * as text from './text/index.js';
|
|
34
|
+
export * as thumbnail from './thumbnail/index.js';
|
|
35
|
+
export { default as tooltip } from './tooltip/index.js';
|
|
36
|
+
export { default as truncate } from './truncate/index.js';
|
|
37
|
+
export { default as typewriter } from './typewriter/index.js';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export default (content, name) => {
|
|
2
|
+
let link = document.createElement('a');
|
|
3
|
+
link.download = name + '.json';
|
|
4
|
+
link.href = window.URL.createObjectURL(new Blob([JSON.stringify(content)], { type: 'application/json' }));
|
|
5
|
+
document.body.appendChild(link);
|
|
6
|
+
link.click();
|
|
7
|
+
document.body.removeChild(link);
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './scss/index.scss';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './scss/index.scss';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Attributes } from '@esportsplus/template';
|
|
2
|
+
import './scss/index.scss';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
(): ReturnType<(this: {
|
|
5
|
+
attributes?: Attributes | undefined;
|
|
6
|
+
content?: import("@esportsplus/template").Renderable<any>;
|
|
7
|
+
}, attributes: Readonly<Attributes>, content: import("@esportsplus/template").Renderable<any>) => import("@esportsplus/template").Renderable<any>>;
|
|
8
|
+
<T extends Attributes>(attributes: T): ReturnType<(this: {
|
|
9
|
+
attributes?: Attributes | undefined;
|
|
10
|
+
content?: import("@esportsplus/template").Renderable<any>;
|
|
11
|
+
}, attributes: Readonly<Attributes>, content: import("@esportsplus/template").Renderable<any>) => import("@esportsplus/template").Renderable<any>>;
|
|
12
|
+
<T extends import("@esportsplus/template").Renderable<any>>(content: T): ReturnType<(this: {
|
|
13
|
+
attributes?: Attributes | undefined;
|
|
14
|
+
content?: import("@esportsplus/template").Renderable<any>;
|
|
15
|
+
}, attributes: Readonly<Attributes>, content: import("@esportsplus/template").Renderable<any>) => import("@esportsplus/template").Renderable<any>>;
|
|
16
|
+
(attributes: Attributes, content: import("@esportsplus/template").Renderable<any>): ReturnType<(this: {
|
|
17
|
+
attributes?: Attributes | undefined;
|
|
18
|
+
content?: import("@esportsplus/template").Renderable<any>;
|
|
19
|
+
}, attributes: Readonly<Attributes>, content: import("@esportsplus/template").Renderable<any>) => import("@esportsplus/template").Renderable<any>>;
|
|
20
|
+
};
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { reactive } from '@esportsplus/reactivity';
|
|
2
|
+
import { html } from '@esportsplus/template';
|
|
3
|
+
import { omit } from '@esportsplus/utilities';
|
|
4
|
+
import template from '../../components/template/index.js';
|
|
5
|
+
import './scss/index.scss';
|
|
6
|
+
const OMIT = ['loader-content', 'loader-logo'];
|
|
7
|
+
export default template.factory((attributes, content) => {
|
|
8
|
+
let a = {
|
|
9
|
+
class: () => state.load && 'loader--load'
|
|
10
|
+
}, state = reactive({
|
|
11
|
+
load: false,
|
|
12
|
+
remove: false,
|
|
13
|
+
scale: false
|
|
14
|
+
});
|
|
15
|
+
return () => {
|
|
16
|
+
if (state.remove) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
let i = 0;
|
|
20
|
+
return html `
|
|
21
|
+
<div
|
|
22
|
+
class='loader'
|
|
23
|
+
onanimationend=${(e) => {
|
|
24
|
+
i++;
|
|
25
|
+
if (e.animationName === 'move' && i > 1) {
|
|
26
|
+
state.remove = true;
|
|
27
|
+
}
|
|
28
|
+
}}
|
|
29
|
+
${a}
|
|
30
|
+
${omit(attributes, OMIT)}
|
|
31
|
+
>
|
|
32
|
+
<div
|
|
33
|
+
class='loader'
|
|
34
|
+
${a}
|
|
35
|
+
${!content && {
|
|
36
|
+
onconnect: () => {
|
|
37
|
+
state.load = true;
|
|
38
|
+
}
|
|
39
|
+
}}
|
|
40
|
+
>
|
|
41
|
+
${content && html `
|
|
42
|
+
<div class='loader-content' ${attributes['loader-content']}>
|
|
43
|
+
<div
|
|
44
|
+
class='loader-logo text --flex-center --text-uppercase --text-600'
|
|
45
|
+
style='color: var(--color-grey-500);'
|
|
46
|
+
${attributes['loader-logo']}
|
|
47
|
+
${{
|
|
48
|
+
class: () => state.scale && 'loader-logo--scale',
|
|
49
|
+
onanimationend: ({ animationName: name }) => {
|
|
50
|
+
if (name === 'scale') {
|
|
51
|
+
state.load = true;
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
onconnect: () => {
|
|
55
|
+
state.scale = true;
|
|
56
|
+
}
|
|
57
|
+
}}
|
|
58
|
+
>
|
|
59
|
+
${content}
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
`}
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
`;
|
|
66
|
+
};
|
|
67
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { html } from '@esportsplus/template';
|
|
2
|
+
import './scss/index.scss';
|
|
3
|
+
export default (attributes) => {
|
|
4
|
+
return html `
|
|
5
|
+
<div
|
|
6
|
+
class='loading --border-width-700 --size-800'
|
|
7
|
+
style='--border-color: var(--color-border-500);'
|
|
8
|
+
${attributes}
|
|
9
|
+
>
|
|
10
|
+
</div>
|
|
11
|
+
`;
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './scss/index.scss';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './scss/index.scss';
|