@esportsplus/ui 0.49.0 → 0.49.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/accordion/index.d.ts +16 -16
- package/build/components/accordion/index.js +15 -16
- package/build/components/alert/index.js +42 -50
- package/build/components/back/index.d.ts +8 -7
- package/build/components/back/index.js +10 -11
- package/build/components/button/index.d.ts +22 -21
- package/build/components/button/index.js +24 -24
- package/build/components/checkbox/index.d.ts +1 -1
- package/build/components/checkbox/index.js +18 -20
- package/build/components/clipboard/onclick.d.ts +1 -1
- package/build/components/clipboard/onclick.js +18 -17
- package/build/components/counter/index.d.ts +1 -1
- package/build/components/counter/index.js +34 -27
- package/build/components/ellipsis/index.js +7 -8
- package/build/components/form/action.js +12 -15
- package/build/components/highlight/index.d.ts +16 -16
- package/build/components/highlight/index.js +13 -14
- package/build/components/icon/index.d.ts +11 -10
- package/build/components/icon/index.js +9 -6
- package/build/components/input/index.d.ts +1 -1
- package/build/components/input/index.js +16 -17
- package/build/components/loader/index.d.ts +16 -16
- package/build/components/loader/index.js +37 -44
- package/build/components/loading/index.js +7 -9
- package/build/components/range/index.d.ts +1 -1
- package/build/components/range/index.js +19 -21
- package/build/components/scrollbar/index.d.ts +12 -11
- package/build/components/scrollbar/index.js +19 -32
- package/build/components/select/index.d.ts +1 -1
- package/build/components/select/index.js +83 -88
- package/build/components/textarea/index.d.ts +1 -1
- package/build/components/textarea/index.js +16 -17
- package/build/components/tooltip/menu.d.ts +12 -11
- package/build/components/tooltip/menu.js +29 -33
- package/build/components/tooltip/onclick.d.ts +1101 -1100
- package/build/components/tooltip/onclick.js +12 -14
- package/build/components/tooltip/onhover.d.ts +16 -16
- package/build/components/tooltip/onhover.js +14 -16
- package/build/components/typewriter/index.d.ts +11 -10
- package/build/components/typewriter/index.js +12 -10
- package/package.json +4 -4
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as template_0d7f5d57c4bb40d69aedf451c3798d4b1 from '@esportsplus/frontend';
|
|
2
2
|
import './scss/index.scss';
|
|
3
3
|
declare const _default: {
|
|
4
4
|
(): ReturnType<(this: {
|
|
5
|
-
attributes?: Attributes | undefined;
|
|
6
|
-
content?:
|
|
7
|
-
}, attributes: Readonly<Attributes>, content:
|
|
8
|
-
<T extends Attributes>(attributes: T): ReturnType<(this: {
|
|
9
|
-
attributes?: Attributes | undefined;
|
|
10
|
-
content?:
|
|
11
|
-
}, attributes: Readonly<Attributes>, content:
|
|
12
|
-
<T extends
|
|
13
|
-
attributes?: Attributes | undefined;
|
|
14
|
-
content?:
|
|
15
|
-
}, attributes: Readonly<Attributes>, content:
|
|
16
|
-
(attributes: Attributes, content:
|
|
17
|
-
attributes?: Attributes | undefined;
|
|
18
|
-
content?:
|
|
19
|
-
}, attributes: Readonly<Attributes>, content:
|
|
5
|
+
attributes?: template_0d7f5d57c4bb40d69aedf451c3798d4b1.Attributes | undefined;
|
|
6
|
+
content?: template_0d7f5d57c4bb40d69aedf451c3798d4b1.Renderable<any>;
|
|
7
|
+
}, attributes: Readonly<template_0d7f5d57c4bb40d69aedf451c3798d4b1.Attributes>, content: template_0d7f5d57c4bb40d69aedf451c3798d4b1.Renderable<any>) => template_0d7f5d57c4bb40d69aedf451c3798d4b1.Renderable<any>>;
|
|
8
|
+
<T extends template_0d7f5d57c4bb40d69aedf451c3798d4b1.Attributes>(attributes: T): ReturnType<(this: {
|
|
9
|
+
attributes?: template_0d7f5d57c4bb40d69aedf451c3798d4b1.Attributes | undefined;
|
|
10
|
+
content?: template_0d7f5d57c4bb40d69aedf451c3798d4b1.Renderable<any>;
|
|
11
|
+
}, attributes: Readonly<template_0d7f5d57c4bb40d69aedf451c3798d4b1.Attributes>, content: template_0d7f5d57c4bb40d69aedf451c3798d4b1.Renderable<any>) => template_0d7f5d57c4bb40d69aedf451c3798d4b1.Renderable<any>>;
|
|
12
|
+
<T extends template_0d7f5d57c4bb40d69aedf451c3798d4b1.Renderable<any>>(content: T): ReturnType<(this: {
|
|
13
|
+
attributes?: template_0d7f5d57c4bb40d69aedf451c3798d4b1.Attributes | undefined;
|
|
14
|
+
content?: template_0d7f5d57c4bb40d69aedf451c3798d4b1.Renderable<any>;
|
|
15
|
+
}, attributes: Readonly<template_0d7f5d57c4bb40d69aedf451c3798d4b1.Attributes>, content: template_0d7f5d57c4bb40d69aedf451c3798d4b1.Renderable<any>) => template_0d7f5d57c4bb40d69aedf451c3798d4b1.Renderable<any>>;
|
|
16
|
+
(attributes: template_0d7f5d57c4bb40d69aedf451c3798d4b1.Attributes, content: template_0d7f5d57c4bb40d69aedf451c3798d4b1.Renderable<any>): ReturnType<(this: {
|
|
17
|
+
attributes?: template_0d7f5d57c4bb40d69aedf451c3798d4b1.Attributes | undefined;
|
|
18
|
+
content?: template_0d7f5d57c4bb40d69aedf451c3798d4b1.Renderable<any>;
|
|
19
|
+
}, attributes: Readonly<template_0d7f5d57c4bb40d69aedf451c3798d4b1.Attributes>, content: template_0d7f5d57c4bb40d69aedf451c3798d4b1.Renderable<any>) => template_0d7f5d57c4bb40d69aedf451c3798d4b1.Renderable<any>>;
|
|
20
20
|
};
|
|
21
21
|
export default _default;
|
|
@@ -1,33 +1,32 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as template_0d7f5d57c4bb40d69aedf451c3798d4b1 from '@esportsplus/frontend';
|
|
2
|
+
import { reactive } from '@esportsplus/frontend';
|
|
2
3
|
import { omit } from '@esportsplus/utilities';
|
|
3
4
|
import template from '../../components/template/index.js';
|
|
4
5
|
import './scss/index.scss';
|
|
6
|
+
const template_0d7f5d57c4bb40d69aedf451c3798d4b3 = template_0d7f5d57c4bb40d69aedf451c3798d4b1.template(`<div><!--$--></div>`);
|
|
5
7
|
const OMIT = ['state'];
|
|
6
8
|
let key = Symbol();
|
|
7
9
|
export default template.factory(function (attributes, content) {
|
|
8
10
|
let ref, state = attributes.state || reactive({
|
|
9
11
|
active: 0
|
|
10
12
|
});
|
|
11
|
-
return
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
class: () => {
|
|
13
|
+
return (() => {
|
|
14
|
+
let root_0d7f5d57c4bb40d69aedf451c3798d4b2 = template_0d7f5d57c4bb40d69aedf451c3798d4b3(), element_0d7f5d57c4bb40d69aedf451c3798d4b4 = root_0d7f5d57c4bb40d69aedf451c3798d4b2.firstChild, element_0d7f5d57c4bb40d69aedf451c3798d4b5 = element_0d7f5d57c4bb40d69aedf451c3798d4b4.firstChild, attributes_0d7f5d57c4bb40d69aedf451c3798d4b6 = {};
|
|
15
|
+
template_0d7f5d57c4bb40d69aedf451c3798d4b1.setProperties(element_0d7f5d57c4bb40d69aedf451c3798d4b4, omit(attributes, OMIT), attributes_0d7f5d57c4bb40d69aedf451c3798d4b6);
|
|
16
|
+
template_0d7f5d57c4bb40d69aedf451c3798d4b1.setList(element_0d7f5d57c4bb40d69aedf451c3798d4b4, 'class', () => {
|
|
16
17
|
return state.active && '--active';
|
|
17
|
-
},
|
|
18
|
-
onrender
|
|
18
|
+
}, attributes_0d7f5d57c4bb40d69aedf451c3798d4b6);
|
|
19
|
+
template_0d7f5d57c4bb40d69aedf451c3798d4b1.onrender(element_0d7f5d57c4bb40d69aedf451c3798d4b4, (element) => {
|
|
19
20
|
(ref = element)[key] = state;
|
|
20
|
-
}
|
|
21
|
-
style
|
|
21
|
+
});
|
|
22
|
+
template_0d7f5d57c4bb40d69aedf451c3798d4b1.setList(element_0d7f5d57c4bb40d69aedf451c3798d4b4, 'style', () => {
|
|
22
23
|
let parent = ref.closest('accordion');
|
|
23
24
|
if (parent && key in parent) {
|
|
24
25
|
parent[key].active = (+parent[key].active) + 1;
|
|
25
26
|
}
|
|
26
27
|
return state.active && `--max-height: ${ref.scrollHeight}`;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
</div>
|
|
32
|
-
`;
|
|
28
|
+
}, attributes_0d7f5d57c4bb40d69aedf451c3798d4b6);
|
|
29
|
+
template_0d7f5d57c4bb40d69aedf451c3798d4b1.slot(element_0d7f5d57c4bb40d69aedf451c3798d4b5, content);
|
|
30
|
+
return root_0d7f5d57c4bb40d69aedf451c3798d4b2;
|
|
31
|
+
})();
|
|
33
32
|
});
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import '@esportsplus/vite/global.d.ts';
|
|
2
|
-
import
|
|
2
|
+
import * as template_0d7f5d57c4bb40d69aedf451c3798d4b1 from '@esportsplus/frontend';
|
|
3
|
+
import { reactive, svg } from '@esportsplus/frontend';
|
|
3
4
|
import { omit } from '@esportsplus/utilities';
|
|
4
5
|
import { icon } from '@esportsplus/ui';
|
|
5
6
|
import check from './svg/check.svg';
|
|
6
7
|
import close from './svg/close.svg';
|
|
7
8
|
import e from './svg/error.svg';
|
|
8
9
|
import './scss/index.scss';
|
|
10
|
+
const template_0d7f5d57c4bb40d69aedf451c3798d4b8 = template_0d7f5d57c4bb40d69aedf451c3798d4b1.template(`<div class='--flex-vertical'><!--$--></div>`);
|
|
11
|
+
const template_0d7f5d57c4bb40d69aedf451c3798d4bd = template_0d7f5d57c4bb40d69aedf451c3798d4b1.template(`<p><!--$--></p>`);
|
|
12
|
+
const template_0d7f5d57c4bb40d69aedf451c3798d4bi = template_0d7f5d57c4bb40d69aedf451c3798d4b1.template(`<div class='--flex-start'><!--$--></div>`);
|
|
13
|
+
const template_0d7f5d57c4bb40d69aedf451c3798d4bl = template_0d7f5d57c4bb40d69aedf451c3798d4b1.template(`<div class='alert anchor anchor--n --flex-row'><!--$--><div class='alert-messages --flex-column --flex-fill'><!--$--></div><div class="--flex-vertical"><div class='alert-close button --padding-300'><div class="icon" style='--size: 14px;'><!--$--></div></div></div></div>`);
|
|
9
14
|
const OMIT = ['alert-close', 'alert-messages', 'alert-message'];
|
|
10
15
|
let modifiers = {
|
|
11
16
|
error: 'red',
|
|
@@ -71,56 +76,43 @@ export default (attributes) => {
|
|
|
71
76
|
}), 5);
|
|
72
77
|
};
|
|
73
78
|
return {
|
|
74
|
-
content:
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}}
|
|
87
|
-
|
|
88
|
-
<div
|
|
89
|
-
class='alert-messages --flex-column --flex-fill'
|
|
90
|
-
${attributes['alert-messages']}
|
|
91
|
-
>
|
|
92
|
-
${() => {
|
|
93
|
-
let message = attributes['alert-message'];
|
|
94
|
-
return state.rerender && [...state.messages].map((content) => {
|
|
95
|
-
if (typeof content === 'string') {
|
|
96
|
-
return html `
|
|
97
|
-
<p ${message}>
|
|
98
|
-
${content}
|
|
99
|
-
</p>
|
|
100
|
-
`;
|
|
101
|
-
}
|
|
102
|
-
return html `
|
|
103
|
-
<div class='--flex-start'>
|
|
104
|
-
${content}
|
|
105
|
-
</div>
|
|
106
|
-
`;
|
|
79
|
+
content: (() => {
|
|
80
|
+
let root_0d7f5d57c4bb40d69aedf451c3798d4bk = template_0d7f5d57c4bb40d69aedf451c3798d4bl(), element_0d7f5d57c4bb40d69aedf451c3798d4bm = root_0d7f5d57c4bb40d69aedf451c3798d4bk.firstChild, element_0d7f5d57c4bb40d69aedf451c3798d4bn = element_0d7f5d57c4bb40d69aedf451c3798d4bm.firstChild, element_0d7f5d57c4bb40d69aedf451c3798d4bo = element_0d7f5d57c4bb40d69aedf451c3798d4bm.firstElementChild, element_0d7f5d57c4bb40d69aedf451c3798d4bp = element_0d7f5d57c4bb40d69aedf451c3798d4bo.firstChild, element_0d7f5d57c4bb40d69aedf451c3798d4bq = element_0d7f5d57c4bb40d69aedf451c3798d4bo.nextElementSibling.firstElementChild, element_0d7f5d57c4bb40d69aedf451c3798d4br = element_0d7f5d57c4bb40d69aedf451c3798d4bq.firstElementChild.firstChild, attributes_0d7f5d57c4bb40d69aedf451c3798d4bs = { "class": "alert anchor anchor--n --flex-row" }, attributes_0d7f5d57c4bb40d69aedf451c3798d4bt = { "class": "alert-messages --flex-column --flex-fill" }, attributes_0d7f5d57c4bb40d69aedf451c3798d4bu = { "class": "alert-close button --padding-300" };
|
|
81
|
+
template_0d7f5d57c4bb40d69aedf451c3798d4b1.setList(element_0d7f5d57c4bb40d69aedf451c3798d4bm, 'class', () => state.active && '--active', attributes_0d7f5d57c4bb40d69aedf451c3798d4bs);
|
|
82
|
+
template_0d7f5d57c4bb40d69aedf451c3798d4b1.setProperties(element_0d7f5d57c4bb40d69aedf451c3798d4bm, omit(attributes, OMIT), attributes_0d7f5d57c4bb40d69aedf451c3798d4bs);
|
|
83
|
+
new template_0d7f5d57c4bb40d69aedf451c3798d4b1.EffectSlot(element_0d7f5d57c4bb40d69aedf451c3798d4bn, () => {
|
|
84
|
+
let type = state.type;
|
|
85
|
+
return (() => {
|
|
86
|
+
let root_0d7f5d57c4bb40d69aedf451c3798d4b7 = template_0d7f5d57c4bb40d69aedf451c3798d4b8(), element_0d7f5d57c4bb40d69aedf451c3798d4b9 = root_0d7f5d57c4bb40d69aedf451c3798d4b7.firstChild, element_0d7f5d57c4bb40d69aedf451c3798d4ba = element_0d7f5d57c4bb40d69aedf451c3798d4b9.firstChild, attributes_0d7f5d57c4bb40d69aedf451c3798d4bb = { "class": "--flex-vertical", "style": "" };
|
|
87
|
+
template_0d7f5d57c4bb40d69aedf451c3798d4b1.setList(element_0d7f5d57c4bb40d69aedf451c3798d4b9, 'style', `--color: var(--color-${modifiers[type]}-400);`, attributes_0d7f5d57c4bb40d69aedf451c3798d4bb);
|
|
88
|
+
template_0d7f5d57c4bb40d69aedf451c3798d4b1.slot(element_0d7f5d57c4bb40d69aedf451c3798d4ba, icon({ class: '--size-500' }, type === 'error' ? e : check));
|
|
89
|
+
return root_0d7f5d57c4bb40d69aedf451c3798d4b7;
|
|
90
|
+
})();
|
|
107
91
|
});
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
92
|
+
template_0d7f5d57c4bb40d69aedf451c3798d4b1.setProperties(element_0d7f5d57c4bb40d69aedf451c3798d4bo, attributes['alert-messages'], attributes_0d7f5d57c4bb40d69aedf451c3798d4bt);
|
|
93
|
+
new template_0d7f5d57c4bb40d69aedf451c3798d4b1.EffectSlot(element_0d7f5d57c4bb40d69aedf451c3798d4bp, () => {
|
|
94
|
+
let message = attributes['alert-message'];
|
|
95
|
+
return state.rerender && [...state.messages].map((content) => {
|
|
96
|
+
if (typeof content === 'string') {
|
|
97
|
+
return (() => {
|
|
98
|
+
let root_0d7f5d57c4bb40d69aedf451c3798d4bc = template_0d7f5d57c4bb40d69aedf451c3798d4bd(), element_0d7f5d57c4bb40d69aedf451c3798d4be = root_0d7f5d57c4bb40d69aedf451c3798d4bc.firstChild, element_0d7f5d57c4bb40d69aedf451c3798d4bf = element_0d7f5d57c4bb40d69aedf451c3798d4be.firstChild, attributes_0d7f5d57c4bb40d69aedf451c3798d4bg = {};
|
|
99
|
+
template_0d7f5d57c4bb40d69aedf451c3798d4b1.setProperties(element_0d7f5d57c4bb40d69aedf451c3798d4be, message, attributes_0d7f5d57c4bb40d69aedf451c3798d4bg);
|
|
100
|
+
template_0d7f5d57c4bb40d69aedf451c3798d4b1.slot(element_0d7f5d57c4bb40d69aedf451c3798d4bf, content);
|
|
101
|
+
return root_0d7f5d57c4bb40d69aedf451c3798d4bc;
|
|
102
|
+
})();
|
|
103
|
+
}
|
|
104
|
+
return (() => {
|
|
105
|
+
let root_0d7f5d57c4bb40d69aedf451c3798d4bh = template_0d7f5d57c4bb40d69aedf451c3798d4bi(), element_0d7f5d57c4bb40d69aedf451c3798d4bj = root_0d7f5d57c4bb40d69aedf451c3798d4bh.firstChild.firstChild;
|
|
106
|
+
template_0d7f5d57c4bb40d69aedf451c3798d4b1.slot(element_0d7f5d57c4bb40d69aedf451c3798d4bj, content);
|
|
107
|
+
return root_0d7f5d57c4bb40d69aedf451c3798d4bh;
|
|
108
|
+
})();
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
template_0d7f5d57c4bb40d69aedf451c3798d4b1.delegate(element_0d7f5d57c4bb40d69aedf451c3798d4bq, 'click', () => deactivate(state));
|
|
112
|
+
template_0d7f5d57c4bb40d69aedf451c3798d4b1.setProperties(element_0d7f5d57c4bb40d69aedf451c3798d4bq, attributes['alert-close'], attributes_0d7f5d57c4bb40d69aedf451c3798d4bu);
|
|
113
|
+
template_0d7f5d57c4bb40d69aedf451c3798d4b1.slot(element_0d7f5d57c4bb40d69aedf451c3798d4br, svg.sprite(close));
|
|
114
|
+
return root_0d7f5d57c4bb40d69aedf451c3798d4bk;
|
|
115
|
+
})(),
|
|
124
116
|
deactivate: () => deactivate(state),
|
|
125
117
|
error,
|
|
126
118
|
info: (messages, seconds = 0) => activate('info', messages, seconds, state),
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
+
import * as template_0d7f5d57c4bb40d69aedf451c3798d4b1 from '@esportsplus/frontend';
|
|
1
2
|
import { Attributes } from '@esportsplus/frontend';
|
|
2
3
|
import './scss/index.scss';
|
|
3
4
|
declare const _default: {
|
|
4
5
|
(): ReturnType<(this: {
|
|
5
6
|
attributes?: Attributes;
|
|
6
|
-
}, attributes: Readonly<Attributes>, content:
|
|
7
|
-
<T extends Attributes>(attributes: T): ReturnType<(this: {
|
|
7
|
+
}, attributes: Readonly<template_0d7f5d57c4bb40d69aedf451c3798d4b1.Attributes>, content: template_0d7f5d57c4bb40d69aedf451c3798d4b1.Renderable<any>) => template_0d7f5d57c4bb40d69aedf451c3798d4b1.Renderable<any>>;
|
|
8
|
+
<T extends template_0d7f5d57c4bb40d69aedf451c3798d4b1.Attributes>(attributes: T): ReturnType<(this: {
|
|
8
9
|
attributes?: Attributes;
|
|
9
|
-
}, attributes: Readonly<Attributes>, content:
|
|
10
|
-
<T extends
|
|
10
|
+
}, attributes: Readonly<template_0d7f5d57c4bb40d69aedf451c3798d4b1.Attributes>, content: template_0d7f5d57c4bb40d69aedf451c3798d4b1.Renderable<any>) => template_0d7f5d57c4bb40d69aedf451c3798d4b1.Renderable<any>>;
|
|
11
|
+
<T extends template_0d7f5d57c4bb40d69aedf451c3798d4b1.Renderable<any>>(content: T): ReturnType<(this: {
|
|
11
12
|
attributes?: Attributes;
|
|
12
|
-
}, attributes: Readonly<Attributes>, content:
|
|
13
|
-
(attributes: Attributes, content:
|
|
13
|
+
}, attributes: Readonly<template_0d7f5d57c4bb40d69aedf451c3798d4b1.Attributes>, content: template_0d7f5d57c4bb40d69aedf451c3798d4b1.Renderable<any>) => template_0d7f5d57c4bb40d69aedf451c3798d4b1.Renderable<any>>;
|
|
14
|
+
(attributes: template_0d7f5d57c4bb40d69aedf451c3798d4b1.Attributes, content: template_0d7f5d57c4bb40d69aedf451c3798d4b1.Renderable<any>): ReturnType<(this: {
|
|
14
15
|
attributes?: Attributes;
|
|
15
|
-
}, attributes: Readonly<Attributes>, content:
|
|
16
|
+
}, attributes: Readonly<template_0d7f5d57c4bb40d69aedf451c3798d4b1.Attributes>, content: template_0d7f5d57c4bb40d69aedf451c3798d4b1.Renderable<any>) => template_0d7f5d57c4bb40d69aedf451c3798d4b1.Renderable<any>>;
|
|
16
17
|
};
|
|
17
18
|
export default _default;
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as template_0d7f5d57c4bb40d69aedf451c3798d4b1 from '@esportsplus/frontend';
|
|
2
2
|
import icon from '../../components/icon/index.js';
|
|
3
3
|
import template from '../../components/template/index.js';
|
|
4
4
|
import arrow from './svg/arrow.svg';
|
|
5
5
|
import './scss/index.scss';
|
|
6
|
+
const template_0d7f5d57c4bb40d69aedf451c3798d4bw = template_0d7f5d57c4bb40d69aedf451c3798d4b1.template(`<a class='back link --padding-0px --flex-vertical'><!--$--><!--$--></a>`);
|
|
6
7
|
export default template.factory(function (attributes, content) {
|
|
7
|
-
return
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
</a>
|
|
16
|
-
`;
|
|
8
|
+
return (() => {
|
|
9
|
+
let root_0d7f5d57c4bb40d69aedf451c3798d4bv = template_0d7f5d57c4bb40d69aedf451c3798d4bw(), element_0d7f5d57c4bb40d69aedf451c3798d4bx = root_0d7f5d57c4bb40d69aedf451c3798d4bv.firstChild, element_0d7f5d57c4bb40d69aedf451c3798d4by = element_0d7f5d57c4bb40d69aedf451c3798d4bx.firstChild, element_0d7f5d57c4bb40d69aedf451c3798d4bz = element_0d7f5d57c4bb40d69aedf451c3798d4by.nextSibling, attributes_0d7f5d57c4bb40d69aedf451c3798d4b10 = { "class": "back link --padding-0px --flex-vertical" };
|
|
10
|
+
template_0d7f5d57c4bb40d69aedf451c3798d4b1.setProperties(element_0d7f5d57c4bb40d69aedf451c3798d4bx, this.attributes, attributes_0d7f5d57c4bb40d69aedf451c3798d4b10);
|
|
11
|
+
template_0d7f5d57c4bb40d69aedf451c3798d4b1.setProperties(element_0d7f5d57c4bb40d69aedf451c3798d4bx, attributes, attributes_0d7f5d57c4bb40d69aedf451c3798d4b10);
|
|
12
|
+
template_0d7f5d57c4bb40d69aedf451c3798d4b1.slot(element_0d7f5d57c4bb40d69aedf451c3798d4by, icon({ class: 'back-arrow --margin-right --margin-200' }, arrow));
|
|
13
|
+
template_0d7f5d57c4bb40d69aedf451c3798d4b1.slot(element_0d7f5d57c4bb40d69aedf451c3798d4bz, content);
|
|
14
|
+
return root_0d7f5d57c4bb40d69aedf451c3798d4bv;
|
|
15
|
+
})();
|
|
17
16
|
});
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as template_0d7f5d57c4bb40d69aedf451c3798d4b1 from '@esportsplus/frontend';
|
|
2
|
+
import { Renderable } from '@esportsplus/frontend';
|
|
2
3
|
import './scss/index.scss';
|
|
3
4
|
declare const hold: {
|
|
4
5
|
(): ReturnType<(this: {
|
|
5
|
-
attributes?:
|
|
6
|
+
attributes?: template_0d7f5d57c4bb40d69aedf451c3798d4b1.Attributes | undefined;
|
|
6
7
|
content?: ((state: {
|
|
7
8
|
holding: boolean;
|
|
8
9
|
complete: boolean;
|
|
9
10
|
}) => Renderable<any>) | undefined;
|
|
10
|
-
}, attributes: Readonly<
|
|
11
|
+
}, attributes: Readonly<template_0d7f5d57c4bb40d69aedf451c3798d4b1.Attributes>, content: (state: {
|
|
11
12
|
holding: boolean;
|
|
12
13
|
complete: boolean;
|
|
13
14
|
}) => Renderable<any>) => Renderable<any>>;
|
|
14
|
-
<T extends
|
|
15
|
-
attributes?:
|
|
15
|
+
<T extends template_0d7f5d57c4bb40d69aedf451c3798d4b1.Attributes>(attributes: T): ReturnType<(this: {
|
|
16
|
+
attributes?: template_0d7f5d57c4bb40d69aedf451c3798d4b1.Attributes | undefined;
|
|
16
17
|
content?: ((state: {
|
|
17
18
|
holding: boolean;
|
|
18
19
|
complete: boolean;
|
|
19
20
|
}) => Renderable<any>) | undefined;
|
|
20
|
-
}, attributes: Readonly<
|
|
21
|
+
}, attributes: Readonly<template_0d7f5d57c4bb40d69aedf451c3798d4b1.Attributes>, content: (state: {
|
|
21
22
|
holding: boolean;
|
|
22
23
|
complete: boolean;
|
|
23
24
|
}) => Renderable<any>) => Renderable<any>>;
|
|
@@ -25,25 +26,25 @@ declare const hold: {
|
|
|
25
26
|
holding: boolean;
|
|
26
27
|
complete: boolean;
|
|
27
28
|
}) => Renderable<any>>(content: T): ReturnType<(this: {
|
|
28
|
-
attributes?:
|
|
29
|
+
attributes?: template_0d7f5d57c4bb40d69aedf451c3798d4b1.Attributes | undefined;
|
|
29
30
|
content?: ((state: {
|
|
30
31
|
holding: boolean;
|
|
31
32
|
complete: boolean;
|
|
32
33
|
}) => Renderable<any>) | undefined;
|
|
33
|
-
}, attributes: Readonly<
|
|
34
|
+
}, attributes: Readonly<template_0d7f5d57c4bb40d69aedf451c3798d4b1.Attributes>, content: (state: {
|
|
34
35
|
holding: boolean;
|
|
35
36
|
complete: boolean;
|
|
36
37
|
}) => Renderable<any>) => Renderable<any>>;
|
|
37
|
-
(attributes:
|
|
38
|
+
(attributes: template_0d7f5d57c4bb40d69aedf451c3798d4b1.Attributes, content: (state: {
|
|
38
39
|
holding: boolean;
|
|
39
40
|
complete: boolean;
|
|
40
41
|
}) => Renderable<any>): ReturnType<(this: {
|
|
41
|
-
attributes?:
|
|
42
|
+
attributes?: template_0d7f5d57c4bb40d69aedf451c3798d4b1.Attributes | undefined;
|
|
42
43
|
content?: ((state: {
|
|
43
44
|
holding: boolean;
|
|
44
45
|
complete: boolean;
|
|
45
46
|
}) => Renderable<any>) | undefined;
|
|
46
|
-
}, attributes: Readonly<
|
|
47
|
+
}, attributes: Readonly<template_0d7f5d57c4bb40d69aedf451c3798d4b1.Attributes>, content: (state: {
|
|
47
48
|
holding: boolean;
|
|
48
49
|
complete: boolean;
|
|
49
50
|
}) => Renderable<any>) => Renderable<any>>;
|
|
@@ -51,22 +52,22 @@ declare const hold: {
|
|
|
51
52
|
declare const _default: {
|
|
52
53
|
hold: {
|
|
53
54
|
(): ReturnType<(this: {
|
|
54
|
-
attributes?:
|
|
55
|
+
attributes?: template_0d7f5d57c4bb40d69aedf451c3798d4b1.Attributes | undefined;
|
|
55
56
|
content?: ((state: {
|
|
56
57
|
holding: boolean;
|
|
57
58
|
complete: boolean;
|
|
58
59
|
}) => Renderable<any>) | undefined;
|
|
59
|
-
}, attributes: Readonly<
|
|
60
|
+
}, attributes: Readonly<template_0d7f5d57c4bb40d69aedf451c3798d4b1.Attributes>, content: (state: {
|
|
60
61
|
holding: boolean;
|
|
61
62
|
complete: boolean;
|
|
62
63
|
}) => Renderable<any>) => Renderable<any>>;
|
|
63
|
-
<T extends
|
|
64
|
-
attributes?:
|
|
64
|
+
<T extends template_0d7f5d57c4bb40d69aedf451c3798d4b1.Attributes>(attributes: T): ReturnType<(this: {
|
|
65
|
+
attributes?: template_0d7f5d57c4bb40d69aedf451c3798d4b1.Attributes | undefined;
|
|
65
66
|
content?: ((state: {
|
|
66
67
|
holding: boolean;
|
|
67
68
|
complete: boolean;
|
|
68
69
|
}) => Renderable<any>) | undefined;
|
|
69
|
-
}, attributes: Readonly<
|
|
70
|
+
}, attributes: Readonly<template_0d7f5d57c4bb40d69aedf451c3798d4b1.Attributes>, content: (state: {
|
|
70
71
|
holding: boolean;
|
|
71
72
|
complete: boolean;
|
|
72
73
|
}) => Renderable<any>) => Renderable<any>>;
|
|
@@ -74,25 +75,25 @@ declare const _default: {
|
|
|
74
75
|
holding: boolean;
|
|
75
76
|
complete: boolean;
|
|
76
77
|
}) => Renderable<any>>(content: T): ReturnType<(this: {
|
|
77
|
-
attributes?:
|
|
78
|
+
attributes?: template_0d7f5d57c4bb40d69aedf451c3798d4b1.Attributes | undefined;
|
|
78
79
|
content?: ((state: {
|
|
79
80
|
holding: boolean;
|
|
80
81
|
complete: boolean;
|
|
81
82
|
}) => Renderable<any>) | undefined;
|
|
82
|
-
}, attributes: Readonly<
|
|
83
|
+
}, attributes: Readonly<template_0d7f5d57c4bb40d69aedf451c3798d4b1.Attributes>, content: (state: {
|
|
83
84
|
holding: boolean;
|
|
84
85
|
complete: boolean;
|
|
85
86
|
}) => Renderable<any>) => Renderable<any>>;
|
|
86
|
-
(attributes:
|
|
87
|
+
(attributes: template_0d7f5d57c4bb40d69aedf451c3798d4b1.Attributes, content: (state: {
|
|
87
88
|
holding: boolean;
|
|
88
89
|
complete: boolean;
|
|
89
90
|
}) => Renderable<any>): ReturnType<(this: {
|
|
90
|
-
attributes?:
|
|
91
|
+
attributes?: template_0d7f5d57c4bb40d69aedf451c3798d4b1.Attributes | undefined;
|
|
91
92
|
content?: ((state: {
|
|
92
93
|
holding: boolean;
|
|
93
94
|
complete: boolean;
|
|
94
95
|
}) => Renderable<any>) | undefined;
|
|
95
|
-
}, attributes: Readonly<
|
|
96
|
+
}, attributes: Readonly<template_0d7f5d57c4bb40d69aedf451c3798d4b1.Attributes>, content: (state: {
|
|
96
97
|
holding: boolean;
|
|
97
98
|
complete: boolean;
|
|
98
99
|
}) => Renderable<any>) => Renderable<any>>;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as template_0d7f5d57c4bb40d69aedf451c3798d4b1 from '@esportsplus/frontend';
|
|
2
|
+
import { reactive } from '@esportsplus/frontend';
|
|
2
3
|
import template from '../template/index.js';
|
|
3
4
|
import './scss/index.scss';
|
|
5
|
+
const template_0d7f5d57c4bb40d69aedf451c3798d4b12 = template_0d7f5d57c4bb40d69aedf451c3798d4b1.template(`<div class='button '><!--$--></div>`);
|
|
4
6
|
const hold = template.factory(function (attributes, content) {
|
|
5
7
|
let end = () => {
|
|
6
8
|
if (!state.complete) {
|
|
@@ -10,36 +12,34 @@ const hold = template.factory(function (attributes, content) {
|
|
|
10
12
|
complete: false,
|
|
11
13
|
holding: false
|
|
12
14
|
});
|
|
13
|
-
return
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
return (() => {
|
|
16
|
+
let root_0d7f5d57c4bb40d69aedf451c3798d4b11 = template_0d7f5d57c4bb40d69aedf451c3798d4b12(), element_0d7f5d57c4bb40d69aedf451c3798d4b13 = root_0d7f5d57c4bb40d69aedf451c3798d4b11.firstChild, element_0d7f5d57c4bb40d69aedf451c3798d4b14 = element_0d7f5d57c4bb40d69aedf451c3798d4b13.firstChild, attributes_0d7f5d57c4bb40d69aedf451c3798d4b15 = { "class": "button" };
|
|
17
|
+
template_0d7f5d57c4bb40d69aedf451c3798d4b1.setList(element_0d7f5d57c4bb40d69aedf451c3798d4b13, 'class', () => state.holding && 'button--holding', attributes_0d7f5d57c4bb40d69aedf451c3798d4b15);
|
|
18
|
+
template_0d7f5d57c4bb40d69aedf451c3798d4b1.setList(element_0d7f5d57c4bb40d69aedf451c3798d4b13, 'class', () => state.complete && '--active', attributes_0d7f5d57c4bb40d69aedf451c3798d4b15);
|
|
19
|
+
template_0d7f5d57c4bb40d69aedf451c3798d4b1.delegate(element_0d7f5d57c4bb40d69aedf451c3798d4b13, 'mousedown', (e) => {
|
|
20
|
+
e.preventDefault();
|
|
21
|
+
state.holding = true;
|
|
22
|
+
});
|
|
23
|
+
template_0d7f5d57c4bb40d69aedf451c3798d4b1.setProperties(element_0d7f5d57c4bb40d69aedf451c3798d4b13, attributes, attributes_0d7f5d57c4bb40d69aedf451c3798d4b15);
|
|
24
|
+
template_0d7f5d57c4bb40d69aedf451c3798d4b1.delegate(element_0d7f5d57c4bb40d69aedf451c3798d4b13, 'animationend', (e) => {
|
|
23
25
|
if (e.animationName === 'buttonHolding') {
|
|
24
26
|
state.complete = true;
|
|
25
27
|
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
});
|
|
29
|
+
template_0d7f5d57c4bb40d69aedf451c3798d4b1.delegate(element_0d7f5d57c4bb40d69aedf451c3798d4b13, 'click', () => { });
|
|
30
|
+
template_0d7f5d57c4bb40d69aedf451c3798d4b1.delegate(element_0d7f5d57c4bb40d69aedf451c3798d4b13, 'mousedown', (e) => {
|
|
29
31
|
e.preventDefault();
|
|
30
32
|
state.holding = true;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
});
|
|
34
|
+
template_0d7f5d57c4bb40d69aedf451c3798d4b1.delegate(element_0d7f5d57c4bb40d69aedf451c3798d4b13, 'mouseup', end);
|
|
35
|
+
template_0d7f5d57c4bb40d69aedf451c3798d4b1.delegate(element_0d7f5d57c4bb40d69aedf451c3798d4b13, 'touchend', end);
|
|
36
|
+
template_0d7f5d57c4bb40d69aedf451c3798d4b1.delegate(element_0d7f5d57c4bb40d69aedf451c3798d4b13, 'touchstart', (e) => {
|
|
35
37
|
e.preventDefault();
|
|
36
38
|
state.holding = true;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
</div>
|
|
42
|
-
`;
|
|
39
|
+
});
|
|
40
|
+
new template_0d7f5d57c4bb40d69aedf451c3798d4b1.EffectSlot(element_0d7f5d57c4bb40d69aedf451c3798d4b14, () => content(state));
|
|
41
|
+
return root_0d7f5d57c4bb40d69aedf451c3798d4b11;
|
|
42
|
+
})();
|
|
43
43
|
});
|
|
44
44
|
export default { hold };
|
|
45
45
|
export { hold };
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as template_0d7f5d57c4bb40d69aedf451c3798d4b1 from '@esportsplus/frontend';
|
|
2
|
+
import { reactive, root } from '@esportsplus/frontend';
|
|
2
3
|
import { omit } from '@esportsplus/utilities';
|
|
3
4
|
import form from '../../components/form/index.js';
|
|
4
5
|
import './scss/index.scss';
|
|
6
|
+
const template_0d7f5d57c4bb40d69aedf451c3798d4b17 = template_0d7f5d57c4bb40d69aedf451c3798d4b1.template(`<div><input></div>`);
|
|
5
7
|
const OMIT = ['checked', 'value'];
|
|
6
8
|
const factory = (type) => {
|
|
7
9
|
function template(attributes) {
|
|
@@ -12,26 +14,22 @@ const factory = (type) => {
|
|
|
12
14
|
if (attributes?.checked) {
|
|
13
15
|
state.active = true;
|
|
14
16
|
}
|
|
15
|
-
return
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
class: `${type}-tag`,
|
|
25
|
-
onchange: (e) => {
|
|
17
|
+
return (() => {
|
|
18
|
+
let root_0d7f5d57c4bb40d69aedf451c3798d4b16 = template_0d7f5d57c4bb40d69aedf451c3798d4b17(), element_0d7f5d57c4bb40d69aedf451c3798d4b18 = root_0d7f5d57c4bb40d69aedf451c3798d4b16.firstChild, element_0d7f5d57c4bb40d69aedf451c3798d4b19 = element_0d7f5d57c4bb40d69aedf451c3798d4b18.firstElementChild, attributes_0d7f5d57c4bb40d69aedf451c3798d4b1a = { "class": "" }, attributes_0d7f5d57c4bb40d69aedf451c3798d4b1b = {};
|
|
19
|
+
template_0d7f5d57c4bb40d69aedf451c3798d4b1.setList(element_0d7f5d57c4bb40d69aedf451c3798d4b18, 'class', type, attributes_0d7f5d57c4bb40d69aedf451c3798d4b1a);
|
|
20
|
+
template_0d7f5d57c4bb40d69aedf451c3798d4b1.setList(element_0d7f5d57c4bb40d69aedf451c3798d4b18, 'class', () => state.active && '--active', attributes_0d7f5d57c4bb40d69aedf451c3798d4b1a);
|
|
21
|
+
template_0d7f5d57c4bb40d69aedf451c3798d4b1.setProperties(element_0d7f5d57c4bb40d69aedf451c3798d4b18, this?.attributes && omit(this.attributes, OMIT), attributes_0d7f5d57c4bb40d69aedf451c3798d4b1a);
|
|
22
|
+
template_0d7f5d57c4bb40d69aedf451c3798d4b1.setProperties(element_0d7f5d57c4bb40d69aedf451c3798d4b18, attributes && omit(attributes, OMIT), attributes_0d7f5d57c4bb40d69aedf451c3798d4b1a);
|
|
23
|
+
template_0d7f5d57c4bb40d69aedf451c3798d4b1.setProperty(element_0d7f5d57c4bb40d69aedf451c3798d4b19, 'checked', attributes?.checked || root(() => state.active));
|
|
24
|
+
template_0d7f5d57c4bb40d69aedf451c3798d4b1.setList(element_0d7f5d57c4bb40d69aedf451c3798d4b19, 'class', `${type}-tag`, attributes_0d7f5d57c4bb40d69aedf451c3798d4b1b);
|
|
25
|
+
template_0d7f5d57c4bb40d69aedf451c3798d4b1.delegate(element_0d7f5d57c4bb40d69aedf451c3798d4b19, 'change', (e) => {
|
|
26
26
|
state.active = e.target.checked;
|
|
27
|
-
}
|
|
28
|
-
onrender
|
|
29
|
-
type
|
|
30
|
-
value
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
</div>
|
|
34
|
-
`;
|
|
27
|
+
});
|
|
28
|
+
template_0d7f5d57c4bb40d69aedf451c3798d4b1.onrender(element_0d7f5d57c4bb40d69aedf451c3798d4b19, form.input.onrender(state));
|
|
29
|
+
template_0d7f5d57c4bb40d69aedf451c3798d4b1.setProperty(element_0d7f5d57c4bb40d69aedf451c3798d4b19, 'type', type === 'radio' ? 'radio' : 'checkbox');
|
|
30
|
+
template_0d7f5d57c4bb40d69aedf451c3798d4b1.setProperty(element_0d7f5d57c4bb40d69aedf451c3798d4b19, 'value', attributes?.value || 1);
|
|
31
|
+
return root_0d7f5d57c4bb40d69aedf451c3798d4b16;
|
|
32
|
+
})();
|
|
35
33
|
}
|
|
36
34
|
return template;
|
|
37
35
|
};
|
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as template_0d7f5d57c4bb40d69aedf451c3798d4b1 from '@esportsplus/frontend';
|
|
2
|
+
import { reactive } from '@esportsplus/frontend';
|
|
2
3
|
import { omit } from '@esportsplus/utilities';
|
|
3
4
|
import template from '../../components/template/index.js';
|
|
4
5
|
import write from './write.js';
|
|
6
|
+
const template_0d7f5d57c4bb40d69aedf451c3798d4b1d = template_0d7f5d57c4bb40d69aedf451c3798d4b1.template(`<div><!--$--></div>`);
|
|
5
7
|
const OMIT = ['timeout', 'value'];
|
|
6
8
|
export default template.factory(function (attributes, content) {
|
|
7
9
|
let state = reactive({
|
|
8
10
|
copied: false
|
|
9
11
|
}), timeout = attributes.timeout || 1000 * 2;
|
|
10
|
-
return
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
return (() => {
|
|
13
|
+
let root_0d7f5d57c4bb40d69aedf451c3798d4b1c = template_0d7f5d57c4bb40d69aedf451c3798d4b1d(), element_0d7f5d57c4bb40d69aedf451c3798d4b1e = root_0d7f5d57c4bb40d69aedf451c3798d4b1c.firstChild, element_0d7f5d57c4bb40d69aedf451c3798d4b1f = element_0d7f5d57c4bb40d69aedf451c3798d4b1e.firstChild, attributes_0d7f5d57c4bb40d69aedf451c3798d4b1g = {};
|
|
14
|
+
template_0d7f5d57c4bb40d69aedf451c3798d4b1.setProperties(element_0d7f5d57c4bb40d69aedf451c3798d4b1e, omit(attributes, OMIT), attributes_0d7f5d57c4bb40d69aedf451c3798d4b1g);
|
|
15
|
+
template_0d7f5d57c4bb40d69aedf451c3798d4b1.delegate(element_0d7f5d57c4bb40d69aedf451c3798d4b1e, 'click', (e) => {
|
|
16
|
+
e.preventDefault();
|
|
17
|
+
e.stopPropagation();
|
|
18
|
+
write(attributes.value).then(() => {
|
|
19
|
+
state.copied = true;
|
|
20
|
+
setTimeout(() => {
|
|
21
|
+
state.copied = false;
|
|
22
|
+
}, timeout);
|
|
23
|
+
});
|
|
21
24
|
});
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
</div>
|
|
26
|
-
`;
|
|
25
|
+
new template_0d7f5d57c4bb40d69aedf451c3798d4b1.EffectSlot(element_0d7f5d57c4bb40d69aedf451c3798d4b1f, () => content(state));
|
|
26
|
+
return root_0d7f5d57c4bb40d69aedf451c3798d4b1c;
|
|
27
|
+
})();
|
|
27
28
|
});
|