@esportsplus/ui 0.8.3 → 0.9.0
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/.editorconfig +9 -9
- package/.gitattributes +2 -2
- package/.github/dependabot.yml +23 -0
- package/.github/workflows/bump.yml +7 -0
- package/.github/workflows/publish.yml +14 -0
- package/package.json +9 -22
- package/src/components/accordion/index.ts +35 -34
- package/src/components/accordion/scss/index.scss +17 -16
- package/src/components/accordion/scss/variables.scss +9 -9
- package/src/components/anchor/index.ts +1 -0
- package/src/components/anchor/scss/index.scss +42 -41
- package/src/components/anchor/scss/variables.scss +4 -4
- package/src/components/banner/index.ts +1 -0
- package/src/components/banner/scss/index.scss +41 -40
- package/src/components/banner/scss/variables.scss +9 -9
- package/src/components/border/index.ts +1 -0
- package/src/components/border/scss/index.scss +12 -0
- package/src/components/border/scss/variables.scss +6 -0
- package/src/components/bubble/index.ts +1 -0
- package/src/components/bubble/scss/index.scss +32 -0
- package/src/components/bubble/scss/variables.scss +19 -0
- package/src/components/button/index.ts +1 -0
- package/src/components/button/scss/index.scss +115 -114
- package/src/components/button/scss/variables.scss +66 -66
- package/src/components/card/index.ts +1 -0
- package/src/components/card/scss/index.scss +36 -35
- package/src/components/card/scss/variables.scss +41 -41
- package/src/components/clipboard/index.ts +3 -4
- package/src/components/clipboard/write.ts +8 -8
- package/src/components/container/index.ts +1 -0
- package/src/components/container/scss/index.scss +10 -8
- package/src/components/container/scss/variables.scss +5 -5
- package/src/components/counter/index.ts +99 -93
- package/src/components/counter/scss/index.scss +63 -61
- package/src/components/counter/scss/variables.scss +26 -26
- package/src/components/ellipsis/index.ts +10 -9
- package/src/components/ellipsis/scss/index.scss +29 -27
- package/src/components/ellipsis/scss/variables.scss +4 -4
- package/src/components/field/checkbox.ts +71 -0
- package/src/components/field/description.ts +14 -0
- package/src/components/field/error.ts +16 -0
- package/src/components/field/file.ts +77 -0
- package/src/components/field/index.ts +11 -0
- package/src/components/field/optional.ts +23 -0
- package/src/components/field/scss/_check.scss +225 -0
- package/src/components/field/scss/_normalize.scss +36 -0
- package/src/components/field/scss/_text.scss +106 -0
- package/src/components/field/scss/index.scss +161 -0
- package/src/components/field/scss/variables.scss +139 -0
- package/src/components/field/select.ts +182 -0
- package/src/components/field/switch.ts +9 -0
- package/src/components/field/text.ts +92 -0
- package/src/components/field/textarea.ts +8 -0
- package/src/components/field/title.ts +24 -0
- package/src/components/footer/index.ts +83 -78
- package/src/components/footer/scss/index.scss +25 -25
- package/src/components/form/action.ts +79 -80
- package/src/components/form/index.ts +5 -6
- package/src/components/form/input.ts +17 -15
- package/src/components/form/types.ts +13 -15
- package/src/components/frame/index.ts +1 -0
- package/src/components/frame/scss/index.scss +11 -11
- package/src/components/grid/index.ts +1 -0
- package/src/components/grid/scss/index.scss +11 -9
- package/src/components/grid/scss/variables.scss +5 -5
- package/src/components/group/index.ts +1 -0
- package/src/components/group/scss/index.scss +38 -36
- package/src/components/group/scss/variables.scss +17 -17
- package/src/components/highlight/index.ts +51 -47
- package/src/components/highlight/scss/index.scss +6 -4
- package/src/components/highlight/scss/variables.scss +3 -3
- package/src/components/icon/index.ts +1 -0
- package/src/components/icon/scss/index.scss +18 -16
- package/src/components/icon/scss/variables.scss +7 -7
- package/src/components/index.ts +38 -19
- package/src/components/json/download.ts +14 -14
- package/src/components/json/index.ts +3 -3
- package/src/components/link/hover.ts +18 -18
- package/src/components/link/index.ts +4 -3
- package/src/components/link/scss/index.scss +66 -65
- package/src/components/link/scss/variables.scss +46 -46
- package/src/components/loader/index.ts +42 -34
- package/src/components/loader/scss/index.scss +70 -68
- package/src/components/loader/scss/variables.scss +5 -5
- package/src/components/loading/index.ts +13 -7
- package/src/components/loading/scss/index.scss +18 -16
- package/src/components/loading/scss/variables.scss +5 -5
- package/src/components/magnet/index.ts +55 -54
- package/src/components/magnet/scss/index.scss +17 -16
- package/src/components/magnet/scss/variables.scss +4 -4
- package/src/components/modal/index.ts +1 -0
- package/src/components/modal/scss/index.scss +35 -34
- package/src/components/modal/scss/variables.scss +6 -6
- package/src/components/normalize/index.ts +1 -0
- package/src/components/number/index.ts +4 -24
- package/src/components/page/index.ts +17 -15
- package/src/components/page/scss/index.scss +33 -31
- package/src/components/page/scss/variables.scss +15 -15
- package/src/components/root/index.ts +4 -4
- package/src/components/root/onclick.ts +20 -20
- package/src/components/root/scss/index.scss +94 -94
- package/src/components/root/scss/variables.scss +100 -100
- package/src/components/row/index.ts +1 -0
- package/src/components/row/scss/index.scss +7 -7
- package/src/components/scrollbar/index.ts +49 -43
- package/src/components/scrollbar/scss/index.scss +72 -70
- package/src/components/scrollbar/scss/variables.scss +6 -6
- package/src/components/sidebar/index.ts +1 -0
- package/src/components/sidebar/scss/index.scss +50 -49
- package/src/components/sidebar/scss/variables.scss +20 -20
- package/src/components/site/index.ts +27 -26
- package/src/components/site/scss/index.scss +3 -3
- package/src/components/text/index.ts +1 -0
- package/src/components/text/scss/index.scss +11 -9
- package/src/components/text/scss/variables.scss +8 -8
- package/src/components/thumbnail/index.ts +1 -0
- package/src/components/thumbnail/scss/index.scss +9 -7
- package/src/components/thumbnail/scss/variables.scss +7 -7
- package/src/components/tooltip/index.ts +85 -84
- package/src/components/tooltip/scss/_center.scss +13 -13
- package/src/components/tooltip/scss/_east.scss +34 -34
- package/src/components/tooltip/scss/_north.scss +34 -34
- package/src/components/tooltip/scss/_south.scss +35 -35
- package/src/components/tooltip/scss/_west.scss +34 -34
- package/src/components/tooltip/scss/index.scss +94 -93
- package/src/components/tooltip/scss/variables.scss +24 -24
- package/src/components/truncate/index.ts +4 -14
- package/src/components/typewriter/index.ts +54 -53
- package/src/components/typewriter/scss/index.scss +14 -14
- package/src/css-utilities/[margin,padding]/scss/index.scss +43 -41
- package/src/css-utilities/[margin,padding]/scss/variables.scss +54 -54
- package/src/css-utilities/absolute/scss/index.scss +36 -36
- package/src/css-utilities/background/scss/index.scss +1 -0
- package/src/css-utilities/background/scss/variables.scss +26 -27
- package/src/css-utilities/border/scss/index.scss +23 -21
- package/src/css-utilities/border/scss/variables.scss +64 -66
- package/src/css-utilities/color/scss/index.scss +1 -0
- package/src/css-utilities/color/scss/variables.scss +29 -31
- package/src/css-utilities/disabled/scss/index.scss +4 -4
- package/src/css-utilities/flex/scss/index.scss +65 -65
- package/src/css-utilities/glass/scss/index.scss +4 -2
- package/src/css-utilities/glass/scss/variables.scss +2 -2
- package/src/css-utilities/hidden/scss/index.scss +28 -28
- package/src/css-utilities/index.ts +18 -0
- package/src/css-utilities/inline/scss/index.scss +7 -7
- package/src/css-utilities/line-height/scss/index.scss +1 -0
- package/src/css-utilities/line-height/scss/variables.scss +10 -10
- package/src/css-utilities/not-allowed/scss/index.scss +7 -7
- package/src/css-utilities/pointer/scss/index.scss +5 -5
- package/src/css-utilities/size/scss/index.scss +1 -0
- package/src/css-utilities/size/scss/variables.scss +12 -12
- package/src/css-utilities/squircle/scss/index.scss +4 -4
- package/src/css-utilities/text/scss/index.scss +90 -89
- package/src/css-utilities/text/scss/variables.scss +31 -31
- package/src/css-utilities/viewport/scss/index.scss +4 -4
- package/src/css-utilities/width/scss/index.scss +5 -3
- package/src/css-utilities/width/scss/variables.scss +9 -9
- package/src/lib/index.scss +7 -7
- package/src/lib/scss/breakpoint.scss +41 -41
- package/src/lib/scss/color.scss +1 -1
- package/src/lib/scss/css-variables.scss +16 -16
- package/src/lib/scss/list.scss +77 -77
- package/src/lib/scss/map.scss +1 -1
- package/src/lib/scss/position.scss +55 -55
- package/src/lib/scss/string.scss +34 -34
- package/src/tokens/index.scss +11 -11
- package/src/tokens/scss/border-radius.scss +12 -12
- package/src/tokens/scss/border-width.scss +6 -6
- package/src/tokens/scss/box-shadow.scss +39 -39
- package/src/tokens/scss/color.scss +68 -64
- package/src/tokens/scss/font-size.scss +16 -16
- package/src/tokens/scss/font-weight.scss +6 -6
- package/src/tokens/scss/line-height.scss +6 -6
- package/src/tokens/scss/size.scss +13 -13
- package/src/tokens/scss/spacer.scss +10 -10
- package/src/tokens/scss/state.scss +85 -87
- package/src/tokens/scss/transition-duration.scss +1 -1
- package/tsconfig.json +5 -2
- package/assets/0af89c10df9bc2f8d646.woff2 +0 -0
- package/assets/109e3207d9afea8524be.woff2 +0 -0
- package/assets/16663c3f6ab1da2d6c86.woff +0 -0
- package/assets/16e8721ef5837bc6375e.woff +0 -0
- package/assets/2a3e005f58bfca9c117e.woff +0 -0
- package/assets/58a8d7ebc386843b62c5.woff2 +0 -0
- package/assets/593de7c561e5ffe80c3e.woff2 +0 -0
- package/assets/68b7982c2b30b51bf932.woff2 +0 -0
- package/assets/a04b5e24af93da353f0e.woff +0 -0
- package/assets/bf331673b91821715c08.woff +0 -0
- package/assets/c54b0f4340f2914802d1.woff +0 -0
- package/assets/dd8646a41e4397b77fc4.woff2 +0 -0
- package/assets/e06c107cc50506570954.woff2 +0 -0
- package/assets/ecdfe4c05425592708aa.woff2 +0 -0
- package/assets/f0032576ac7462ccbd0c.woff +0 -0
- package/assets/f872e621917a45943fbc.woff +0 -0
- package/build/components/accordion/index.d.ts +0 -17
- package/build/components/accordion/index.js +0 -25
- package/build/components/clipboard/index.d.ts +0 -5
- package/build/components/clipboard/index.js +0 -3
- package/build/components/clipboard/write.d.ts +0 -2
- package/build/components/clipboard/write.js +0 -9
- package/build/components/counter/index.d.ts +0 -13
- package/build/components/counter/index.js +0 -72
- package/build/components/ellipsis/index.d.ts +0 -2
- package/build/components/ellipsis/index.js +0 -8
- package/build/components/footer/index.d.ts +0 -25
- package/build/components/footer/index.js +0 -55
- package/build/components/form/action.d.ts +0 -5
- package/build/components/form/action.js +0 -54
- package/build/components/form/index.d.ts +0 -23
- package/build/components/form/index.js +0 -4
- package/build/components/form/input.d.ts +0 -9
- package/build/components/form/input.js +0 -10
- package/build/components/form/layout.d.ts +0 -12
- package/build/components/form/layout.js +0 -12
- package/build/components/form/types.d.ts +0 -11
- package/build/components/form/types.js +0 -1
- package/build/components/highlight/index.d.ts +0 -8
- package/build/components/highlight/index.js +0 -36
- package/build/components/index.d.ts +0 -19
- package/build/components/index.js +0 -19
- package/build/components/json/download.d.ts +0 -2
- package/build/components/json/download.js +0 -8
- package/build/components/json/index.d.ts +0 -4
- package/build/components/json/index.js +0 -2
- package/build/components/link/hover.d.ts +0 -10
- package/build/components/link/hover.js +0 -17
- package/build/components/link/index.d.ts +0 -12
- package/build/components/link/index.js +0 -2
- package/build/components/loader/index.d.ts +0 -5
- package/build/components/loader/index.js +0 -31
- package/build/components/loading/index.d.ts +0 -2
- package/build/components/loading/index.js +0 -6
- package/build/components/magnet/index.d.ts +0 -10
- package/build/components/magnet/index.js +0 -46
- package/build/components/number/index.d.ts +0 -8
- package/build/components/number/index.js +0 -16
- package/build/components/page/index.d.ts +0 -22
- package/build/components/page/index.js +0 -11
- package/build/components/root/index.d.ts +0 -9
- package/build/components/root/index.js +0 -3
- package/build/components/root/onclick.d.ts +0 -5
- package/build/components/root/onclick.js +0 -14
- package/build/components/scrollbar/index.d.ts +0 -13
- package/build/components/scrollbar/index.js +0 -36
- package/build/components/site/index.d.ts +0 -8
- package/build/components/site/index.js +0 -16
- package/build/components/tooltip/index.d.ts +0 -23
- package/build/components/tooltip/index.js +0 -63
- package/build/components/truncate/index.d.ts +0 -9
- package/build/components/truncate/index.js +0 -10
- package/build/components/typewriter/index.d.ts +0 -8
- package/build/components/typewriter/index.js +0 -41
- package/build/index.d.ts +0 -19
- package/build/index.js +0 -19
- package/components/styles.css +0 -30
- package/components/variables.css +0 -24
- package/fonts/montserrat.css +0 -1
- package/lib.scss +0 -2
- package/normalize.css +0 -1
- package/src/components/clipboard/scss/index.scss +0 -3
- package/src/components/form/layout.ts +0 -26
- package/src/css-utilities/index.scss +0 -14
- package/src/css-utilities/overflow/scss/index.scss +0 -5
- package/src/index.ts +0 -19
- package/storage/fonts/montserrat/Montserrat-Bold.woff +0 -0
- package/storage/fonts/montserrat/Montserrat-Bold.woff2 +0 -0
- package/storage/fonts/montserrat/Montserrat-BoldItalic.woff +0 -0
- package/storage/fonts/montserrat/Montserrat-BoldItalic.woff2 +0 -0
- package/storage/fonts/montserrat/Montserrat-Italic.woff +0 -0
- package/storage/fonts/montserrat/Montserrat-Italic.woff2 +0 -0
- package/storage/fonts/montserrat/Montserrat-Medium.woff +0 -0
- package/storage/fonts/montserrat/Montserrat-Medium.woff2 +0 -0
- package/storage/fonts/montserrat/Montserrat-MediumItalic.woff +0 -0
- package/storage/fonts/montserrat/Montserrat-MediumItalic.woff2 +0 -0
- package/storage/fonts/montserrat/Montserrat-Regular.woff +0 -0
- package/storage/fonts/montserrat/Montserrat-Regular.woff2 +0 -0
- package/storage/fonts/montserrat/Montserrat-SemiBold.woff +0 -0
- package/storage/fonts/montserrat/Montserrat-SemiBold.woff2 +0 -0
- package/storage/fonts/montserrat/Montserrat-SemiBoldItalic.woff +0 -0
- package/storage/fonts/montserrat/Montserrat-SemiBoldItalic.woff2 +0 -0
- package/storage/fonts/montserrat/index.css +0 -79
- package/tokens.scss +0 -2
- package/utilities/styles.css +0 -16
- package/utilities/variables.css +0 -9
- package/webpack.config.ts +0 -26
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
type Data = {
|
|
2
|
-
copyright: {
|
|
3
|
-
attributes?: Record<string, unknown>;
|
|
4
|
-
brand: string;
|
|
5
|
-
};
|
|
6
|
-
footer?: {
|
|
7
|
-
attributes: Record<string, unknown>;
|
|
8
|
-
};
|
|
9
|
-
nav?: {
|
|
10
|
-
attributes?: Record<string, unknown>;
|
|
11
|
-
links: {
|
|
12
|
-
text: string;
|
|
13
|
-
url: string;
|
|
14
|
-
}[];
|
|
15
|
-
};
|
|
16
|
-
social?: {
|
|
17
|
-
attributes?: Record<string, unknown>;
|
|
18
|
-
links: {
|
|
19
|
-
icon: string;
|
|
20
|
-
url: string;
|
|
21
|
-
}[];
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
declare const _default: ({ copyright, footer, nav, social }: Data) => import("@esportsplus/template/build/types").RenderableTemplate;
|
|
25
|
-
export default _default;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { html, svg } from '@esportsplus/template';
|
|
2
|
-
function copy({ attributes, brand }) {
|
|
3
|
-
return html `
|
|
4
|
-
<div class='footer-copyright group-item --flex-center'>
|
|
5
|
-
<div class='text --padding-vertical --padding-300 --text-300' style='--color-default: var(--color-grey-500);' ${attributes}>
|
|
6
|
-
© ${`${new Date().getFullYear()} ${brand}, All rights reserved`}
|
|
7
|
-
</div>
|
|
8
|
-
</div>
|
|
9
|
-
`;
|
|
10
|
-
}
|
|
11
|
-
export default ({ copyright, footer, nav, social }) => {
|
|
12
|
-
return html `
|
|
13
|
-
<footer class='footer' ${footer?.attributes}>
|
|
14
|
-
<div class='container'>
|
|
15
|
-
<div class='group group--offset-top --flex-center --margin-400'>
|
|
16
|
-
|
|
17
|
-
${nav
|
|
18
|
-
? nav.links.map(({ text, url }) => html `
|
|
19
|
-
<div class='group-item'>
|
|
20
|
-
<a
|
|
21
|
-
class='link --color-white --padding-vertical-300 --text-300'
|
|
22
|
-
href='${url}'
|
|
23
|
-
style='--color-default: var(--color-grey-500);'
|
|
24
|
-
${nav.attributes}
|
|
25
|
-
>
|
|
26
|
-
${text}
|
|
27
|
-
</a>
|
|
28
|
-
</div>
|
|
29
|
-
`)
|
|
30
|
-
: copy(copyright)}
|
|
31
|
-
|
|
32
|
-
<div class='footer-break'></div>
|
|
33
|
-
|
|
34
|
-
${social?.links && social.links.map(({ icon, url }) => html `
|
|
35
|
-
<div class='group-item'>
|
|
36
|
-
<a
|
|
37
|
-
class='link --color-white --padding-0px'
|
|
38
|
-
href='${url}'
|
|
39
|
-
style='--color-default: var(--color-grey-500);'
|
|
40
|
-
${social.attributes}
|
|
41
|
-
>
|
|
42
|
-
<div class='icon --size-500'>
|
|
43
|
-
${svg.sprite(icon)}
|
|
44
|
-
</div>
|
|
45
|
-
</a>
|
|
46
|
-
</div>
|
|
47
|
-
`)}
|
|
48
|
-
|
|
49
|
-
${nav && copy(copyright)}
|
|
50
|
-
|
|
51
|
-
</div>
|
|
52
|
-
</div>
|
|
53
|
-
</footer>
|
|
54
|
-
`;
|
|
55
|
-
};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import response from '@esportsplus/action';
|
|
2
|
-
import input from './input.js';
|
|
3
|
-
function parse(input) {
|
|
4
|
-
let data = {};
|
|
5
|
-
for (let [path, value] of input) {
|
|
6
|
-
let bucket = data, segments = path.indexOf('.') !== -1 ? path.split('.') : [path];
|
|
7
|
-
for (let i = 0; i < segments.length - 1; i++) {
|
|
8
|
-
bucket = bucket[segments[i]] = bucket[segments[i]] || {};
|
|
9
|
-
}
|
|
10
|
-
let key = segments.at(-1);
|
|
11
|
-
if (path.endsWith('[]')) {
|
|
12
|
-
if (typeof value === 'string' && value.trim() === '') {
|
|
13
|
-
continue;
|
|
14
|
-
}
|
|
15
|
-
bucket = bucket[key.substring(0, key.length - 2)] ??= [];
|
|
16
|
-
bucket.push(value);
|
|
17
|
-
}
|
|
18
|
-
else {
|
|
19
|
-
bucket[key] = value;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
return data;
|
|
23
|
-
}
|
|
24
|
-
;
|
|
25
|
-
export default function (action) {
|
|
26
|
-
return {
|
|
27
|
-
onclick: function (event) {
|
|
28
|
-
let trigger = event.target;
|
|
29
|
-
if (trigger?.type !== 'submit') {
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
event.preventDefault();
|
|
33
|
-
this.dispatchEvent(new SubmitEvent('submit', { cancelable: true, bubbles: true, submitter: trigger }));
|
|
34
|
-
},
|
|
35
|
-
onsubmit: async function (event) {
|
|
36
|
-
event.preventDefault();
|
|
37
|
-
event?.submitter?.classList.add('button--processing');
|
|
38
|
-
let { errors } = await action({
|
|
39
|
-
alert: null,
|
|
40
|
-
input: parse(new FormData(this).entries()),
|
|
41
|
-
response
|
|
42
|
-
});
|
|
43
|
-
for (let i = 0, n = errors.length; i < n; i++) {
|
|
44
|
-
let { message, path } = errors[i], state = input.get(this[path]);
|
|
45
|
-
if (!state) {
|
|
46
|
-
continue;
|
|
47
|
-
}
|
|
48
|
-
state.error = `${message[0].toUpperCase()}${message.substring(1)}`;
|
|
49
|
-
}
|
|
50
|
-
event?.submitter?.classList.remove('button--processing');
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import action from './action.js';
|
|
2
|
-
declare const _default: {
|
|
3
|
-
action: typeof action;
|
|
4
|
-
input: {
|
|
5
|
-
attributes: (reactive: {
|
|
6
|
-
error: string;
|
|
7
|
-
}) => (element: HTMLInputElement | HTMLSelectElement) => void;
|
|
8
|
-
get: (element?: HTMLInputElement | HTMLSelectElement) => {
|
|
9
|
-
error: string;
|
|
10
|
-
} | undefined;
|
|
11
|
-
};
|
|
12
|
-
layout: (data: {
|
|
13
|
-
action?: any;
|
|
14
|
-
button?: {
|
|
15
|
-
class?: string;
|
|
16
|
-
content?: any;
|
|
17
|
-
style?: string;
|
|
18
|
-
};
|
|
19
|
-
class?: string;
|
|
20
|
-
content?: any;
|
|
21
|
-
}) => import("@esportsplus/template/build/types").RenderableTemplate;
|
|
22
|
-
};
|
|
23
|
-
export default _default;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
type Data = {
|
|
2
|
-
action?: any;
|
|
3
|
-
button?: {
|
|
4
|
-
class?: string;
|
|
5
|
-
content?: any;
|
|
6
|
-
style?: string;
|
|
7
|
-
};
|
|
8
|
-
class?: string;
|
|
9
|
-
content?: any;
|
|
10
|
-
};
|
|
11
|
-
declare const _default: (data: Data) => import("@esportsplus/template/build/types").RenderableTemplate;
|
|
12
|
-
export default _default;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { html } from '@esportsplus/template';
|
|
2
|
-
export default (data) => html `
|
|
3
|
-
<form class='${data?.class}' ${data?.action || ''}>
|
|
4
|
-
${data?.content || ''}
|
|
5
|
-
|
|
6
|
-
${data?.button?.content ? html `
|
|
7
|
-
<button class="button ${data?.button?.class || ''}" style='${data?.button?.style || ''}'>
|
|
8
|
-
${data?.button?.content || ''}
|
|
9
|
-
</button>
|
|
10
|
-
` : ''}
|
|
11
|
-
</form>
|
|
12
|
-
`;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import response, { Response } from '@esportsplus/action';
|
|
2
|
-
type Action = (data: Payload) => Promise<Errors> | Errors;
|
|
3
|
-
type Errors = {
|
|
4
|
-
errors: Response<unknown>['errors'];
|
|
5
|
-
};
|
|
6
|
-
type Payload = {
|
|
7
|
-
alert: typeof alert;
|
|
8
|
-
input: Record<string, any>;
|
|
9
|
-
response: typeof response;
|
|
10
|
-
};
|
|
11
|
-
export type { Action, Errors, Payload };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { reactive } from '@esportsplus/reactivity';
|
|
2
|
-
let key = Symbol(), observer = null;
|
|
3
|
-
export default (background) => {
|
|
4
|
-
if (observer === null) {
|
|
5
|
-
observer = new IntersectionObserver((entries) => {
|
|
6
|
-
let disconnected = 0, n = entries.length;
|
|
7
|
-
for (let i = 0; i < n; i++) {
|
|
8
|
-
let { isIntersecting, target } = entries[i];
|
|
9
|
-
if (target.isConnected) {
|
|
10
|
-
target[key].highlight = +isIntersecting;
|
|
11
|
-
}
|
|
12
|
-
else {
|
|
13
|
-
disconnected++;
|
|
14
|
-
observer.unobserve(target);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
if (n - disconnected === 0) {
|
|
18
|
-
observer.disconnect();
|
|
19
|
-
observer = null;
|
|
20
|
-
}
|
|
21
|
-
}, { threshold: 1 });
|
|
22
|
-
}
|
|
23
|
-
let state = reactive({
|
|
24
|
-
highlight: 0
|
|
25
|
-
});
|
|
26
|
-
return {
|
|
27
|
-
attributes: {
|
|
28
|
-
class: 'highlight',
|
|
29
|
-
onrender: function (element) {
|
|
30
|
-
element[key] = state;
|
|
31
|
-
observer.observe(element);
|
|
32
|
-
},
|
|
33
|
-
style: [`--background: ${background}`, () => `--highlight: ${state.highlight}`]
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export { default as accordion } from './accordion/index.js';
|
|
2
|
-
export { default as clipboard } from './clipboard/index.js';
|
|
3
|
-
export { default as counter } from './counter/index.js';
|
|
4
|
-
export { default as ellipsis } from './ellipsis/index.js';
|
|
5
|
-
export { default as footer } from './footer/index.js';
|
|
6
|
-
export { default as form } from './form/index.js';
|
|
7
|
-
export { default as json } from './json/index.js';
|
|
8
|
-
export { default as link } from './link/index.js';
|
|
9
|
-
export { default as loader } from './loader/index.js';
|
|
10
|
-
export { default as loading } from './loading/index.js';
|
|
11
|
-
export { default as magnet } from './magnet/index.js';
|
|
12
|
-
export { default as number } from './number/index.js';
|
|
13
|
-
export { default as page } from './page/index.js';
|
|
14
|
-
export { default as root } from './root/index.js';
|
|
15
|
-
export { default as scrollbar } from './scrollbar/index.js';
|
|
16
|
-
export { default as site } from './site/index.js';
|
|
17
|
-
export { default as tooltip } from './tooltip/index.js';
|
|
18
|
-
export { default as truncate } from './truncate/index.js';
|
|
19
|
-
export { default as typewriter } from './typewriter/index.js';
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export { default as accordion } from './accordion/index.js';
|
|
2
|
-
export { default as clipboard } from './clipboard/index.js';
|
|
3
|
-
export { default as counter } from './counter/index.js';
|
|
4
|
-
export { default as ellipsis } from './ellipsis/index.js';
|
|
5
|
-
export { default as footer } from './footer/index.js';
|
|
6
|
-
export { default as form } from './form/index.js';
|
|
7
|
-
export { default as json } from './json/index.js';
|
|
8
|
-
export { default as link } from './link/index.js';
|
|
9
|
-
export { default as loader } from './loader/index.js';
|
|
10
|
-
export { default as loading } from './loading/index.js';
|
|
11
|
-
export { default as magnet } from './magnet/index.js';
|
|
12
|
-
export { default as number } from './number/index.js';
|
|
13
|
-
export { default as page } from './page/index.js';
|
|
14
|
-
export { default as root } from './root/index.js';
|
|
15
|
-
export { default as scrollbar } from './scrollbar/index.js';
|
|
16
|
-
export { default as site } from './site/index.js';
|
|
17
|
-
export { default as tooltip } from './tooltip/index.js';
|
|
18
|
-
export { default as truncate } from './truncate/index.js';
|
|
19
|
-
export { default as typewriter } from './typewriter/index.js';
|
|
@@ -1,8 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { html } from '@esportsplus/template';
|
|
2
|
-
export default ({ attributes, content }) => {
|
|
3
|
-
return {
|
|
4
|
-
attributes: {
|
|
5
|
-
class: 'link--hover'
|
|
6
|
-
},
|
|
7
|
-
content: html `
|
|
8
|
-
<span class='link-hover link-hover--one' ${attributes}>
|
|
9
|
-
${content}
|
|
10
|
-
</span>
|
|
11
|
-
|
|
12
|
-
<span class='link-hover link-hover--two' ${attributes}>
|
|
13
|
-
${content}
|
|
14
|
-
</span>
|
|
15
|
-
`
|
|
16
|
-
};
|
|
17
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
hover: ({ attributes, content }: {
|
|
3
|
-
attributes?: Record<string, any>;
|
|
4
|
-
content: any;
|
|
5
|
-
}) => {
|
|
6
|
-
attributes: {
|
|
7
|
-
class: string;
|
|
8
|
-
};
|
|
9
|
-
content: import("@esportsplus/template/build/types").RenderableTemplate;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
export default _default;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { html } from '@esportsplus/template';
|
|
2
|
-
import { reactive } from '@esportsplus/reactivity';
|
|
3
|
-
export default ({ attributes, content }) => {
|
|
4
|
-
let state = reactive({
|
|
5
|
-
load: false,
|
|
6
|
-
scale: false
|
|
7
|
-
});
|
|
8
|
-
setTimeout(() => {
|
|
9
|
-
state.scale = true;
|
|
10
|
-
}, 300);
|
|
11
|
-
return html `
|
|
12
|
-
<div class="loader ${() => state.load && 'loader--load'}">
|
|
13
|
-
<div class="loader ${() => state.load && 'loader--load'}">
|
|
14
|
-
<div class="loader-content">
|
|
15
|
-
<div
|
|
16
|
-
class="loader-logo ${() => state.scale && 'loader-logo--scale'} text --flex-center --text-uppercase --text-600"
|
|
17
|
-
style='color: var(--color-grey-500);'
|
|
18
|
-
onanimationend='${({ animationName: name }) => {
|
|
19
|
-
if (name === 'scale') {
|
|
20
|
-
state.load = true;
|
|
21
|
-
}
|
|
22
|
-
}}'
|
|
23
|
-
${attributes}
|
|
24
|
-
>
|
|
25
|
-
${content}
|
|
26
|
-
</div>
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
</div>
|
|
30
|
-
`;
|
|
31
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
declare const _default: ({ attributes, hide }: {
|
|
2
|
-
attributes?: Record<string, unknown>;
|
|
3
|
-
hide?: boolean;
|
|
4
|
-
}) => {
|
|
5
|
-
html: import("@esportsplus/template/build/types").RenderableTemplate;
|
|
6
|
-
sibling: {
|
|
7
|
-
attributes: Record<string, Function>;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
export default _default;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { reactive } from '@esportsplus/reactivity';
|
|
2
|
-
import { html } from '@esportsplus/template';
|
|
3
|
-
export default ({ attributes, hide }) => {
|
|
4
|
-
let active = false, events = {
|
|
5
|
-
onmouseover: function () {
|
|
6
|
-
let { offsetHeight, offsetLeft, offsetTop, offsetWidth } = this;
|
|
7
|
-
active = true;
|
|
8
|
-
state.height = offsetHeight;
|
|
9
|
-
state.left = offsetLeft;
|
|
10
|
-
state.opacity = 1;
|
|
11
|
-
state.top = offsetTop;
|
|
12
|
-
state.width = offsetWidth;
|
|
13
|
-
}
|
|
14
|
-
}, state = reactive({
|
|
15
|
-
height: null,
|
|
16
|
-
hide: true,
|
|
17
|
-
left: 0,
|
|
18
|
-
opacity: 0,
|
|
19
|
-
top: 0,
|
|
20
|
-
width: 0
|
|
21
|
-
});
|
|
22
|
-
if (hide === true) {
|
|
23
|
-
events.onmouseout = () => {
|
|
24
|
-
active = false;
|
|
25
|
-
setTimeout(() => {
|
|
26
|
-
if (active === true) {
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
state.opacity = 0;
|
|
30
|
-
}, 50);
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
return {
|
|
34
|
-
html: html `
|
|
35
|
-
<div class='magnet' style='${() => `
|
|
36
|
-
height: ${state.height ? `${state.height}px` : '100%'};
|
|
37
|
-
opacity: ${state.opacity};
|
|
38
|
-
transform: translate(${state.left}px, ${state.top}px);
|
|
39
|
-
width: ${state.width}px;
|
|
40
|
-
`}' ${attributes}></div>
|
|
41
|
-
`,
|
|
42
|
-
sibling: {
|
|
43
|
-
attributes: events
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
declare const abbreviate: (number: number) => string;
|
|
2
|
-
declare const ordinal: (number: number) => string;
|
|
3
|
-
declare const _default: {
|
|
4
|
-
abbreviate: (number: number) => string;
|
|
5
|
-
ordinal: (number: number) => string;
|
|
6
|
-
};
|
|
7
|
-
export default _default;
|
|
8
|
-
export { abbreviate, ordinal };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
let formatter = null, suffixes = ['th', 'st', 'nd', 'rd'];
|
|
2
|
-
const abbreviate = (number) => {
|
|
3
|
-
if (formatter === null) {
|
|
4
|
-
formatter = new Intl.NumberFormat('en-GB', {
|
|
5
|
-
notation: 'compact',
|
|
6
|
-
compactDisplay: 'short'
|
|
7
|
-
});
|
|
8
|
-
}
|
|
9
|
-
return formatter.format(number);
|
|
10
|
-
};
|
|
11
|
-
const ordinal = (number) => {
|
|
12
|
-
let value = number % 100;
|
|
13
|
-
return suffixes[(value - 20) % 10] || suffixes[value] || suffixes[0];
|
|
14
|
-
};
|
|
15
|
-
export default { abbreviate, ordinal };
|
|
16
|
-
export { abbreviate, ordinal };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
declare const subtitle: {
|
|
2
|
-
class: string;
|
|
3
|
-
};
|
|
4
|
-
declare const suptitle: {
|
|
5
|
-
class: string;
|
|
6
|
-
};
|
|
7
|
-
declare const title: {
|
|
8
|
-
class: string;
|
|
9
|
-
};
|
|
10
|
-
declare const _default: {
|
|
11
|
-
subtitle: {
|
|
12
|
-
class: string;
|
|
13
|
-
};
|
|
14
|
-
suptitle: {
|
|
15
|
-
class: string;
|
|
16
|
-
};
|
|
17
|
-
title: {
|
|
18
|
-
class: string;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
export default _default;
|
|
22
|
-
export { subtitle, suptitle, title };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
const subtitle = {
|
|
2
|
-
class: 'page-subtitle --margin-200 --text-crop-bottom'
|
|
3
|
-
};
|
|
4
|
-
const suptitle = {
|
|
5
|
-
class: 'page-suptitle --text-bold-600 --text-crop --text-uppercase --text-300'
|
|
6
|
-
};
|
|
7
|
-
const title = {
|
|
8
|
-
class: 'page-title --line-height-200 --margin-400 --text-crop'
|
|
9
|
-
};
|
|
10
|
-
export default { subtitle, suptitle, title };
|
|
11
|
-
export { subtitle, suptitle, title };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
declare const _default: ({ attributes, fixed }?: {
|
|
2
|
-
attributes?: Record<string, unknown>;
|
|
3
|
-
fixed?: boolean;
|
|
4
|
-
}) => {
|
|
5
|
-
html: import("@esportsplus/template/build/types").RenderableTemplate;
|
|
6
|
-
parent: {
|
|
7
|
-
attributes: {
|
|
8
|
-
class: string;
|
|
9
|
-
onscroll: (this: HTMLElement) => void;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
export default _default;
|