@esportsplus/ui 0.46.0 → 0.47.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/.github/workflows/bump.yml +2 -2
- package/.github/workflows/dependabot.yml +1 -1
- package/.github/workflows/publish.yml +3 -3
- package/README.md +288 -0
- package/build/components/accordion/index.d.ts +16 -16
- package/build/components/accordion/index.js +28 -20
- package/build/components/alert/index.d.ts +1 -1
- package/build/components/alert/index.js +82 -57
- package/build/components/back/index.d.ts +8 -7
- package/build/components/back/index.js +11 -11
- package/build/components/button/index.d.ts +21 -20
- package/build/components/button/index.js +52 -27
- package/build/components/checkbox/index.d.ts +3 -3
- package/build/components/checkbox/index.js +39 -25
- package/build/components/clipboard/index.d.ts +90 -70
- package/build/components/clipboard/onclick.d.ts +1 -1
- package/build/components/clipboard/onclick.js +31 -21
- package/build/components/counter/index.d.ts +2 -2
- package/build/components/counter/index.js +72 -36
- package/build/components/ellipsis/index.d.ts +1 -1
- package/build/components/ellipsis/index.js +7 -8
- package/build/components/form/action.d.ts +1 -1
- package/build/components/form/action.js +13 -15
- package/build/components/form/index.d.ts +1 -1
- package/build/components/highlight/index.d.ts +16 -16
- package/build/components/highlight/index.js +26 -18
- package/build/components/icon/index.d.ts +11 -10
- package/build/components/icon/index.js +9 -6
- package/build/components/input/index.d.ts +2 -2
- package/build/components/input/index.js +38 -22
- package/build/components/loader/index.d.ts +16 -16
- package/build/components/loader/index.js +68 -50
- package/build/components/loading/index.d.ts +1 -1
- package/build/components/loading/index.js +9 -9
- package/build/components/radio/index.d.ts +1 -1
- package/build/components/range/index.d.ts +2 -2
- package/build/components/range/index.js +50 -27
- package/build/components/scrollbar/index.d.ts +12 -11
- package/build/components/scrollbar/index.js +42 -37
- package/build/components/select/index.d.ts +1 -1
- package/build/components/select/index.js +121 -86
- package/build/components/switch/index.d.ts +1 -1
- package/build/components/textarea/index.d.ts +2 -2
- package/build/components/textarea/index.js +37 -22
- package/build/components/tooltip/index.d.ts +180 -140
- package/build/components/tooltip/menu.d.ts +12 -11
- package/build/components/tooltip/menu.js +33 -33
- package/build/components/tooltip/onclick.d.ts +1121 -1100
- package/build/components/tooltip/onclick.js +26 -16
- package/build/components/tooltip/onhover.d.ts +16 -16
- package/build/components/tooltip/onhover.js +28 -18
- package/build/components/typewriter/index.d.ts +11 -10
- package/build/components/typewriter/index.js +25 -12
- package/build/themes/dark/alert.d.ts +1 -1
- package/build/themes/dark/input.d.ts +10 -8
- package/build/themes/dark/select.d.ts +90 -70
- package/build/themes/dark/textarea.d.ts +10 -8
- package/package.json +18 -14
- package/src/components/button/index.ts +21 -13
- package/src/components/counter/index.ts +6 -6
- package/src/components/select/index.ts +13 -1
- package/tsconfig.json +6 -1
|
@@ -1,28 +1,38 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import * as reactivity_a6aeaec5a75649bd8ec693d5230c50000 from '@esportsplus/reactivity';
|
|
2
|
+
import * as template_a6aeaec5a75649bd8ec693d5230c50001 from '@esportsplus/template';
|
|
3
3
|
import { omit } from '@esportsplus/utilities';
|
|
4
4
|
import template from '../../components/template/index.js';
|
|
5
5
|
import write from './write.js';
|
|
6
|
+
const template_a6aeaec5a75649bd8ec693d5230c500018 = template_a6aeaec5a75649bd8ec693d5230c50001.template(`<div><!--$--></div>`);
|
|
7
|
+
class ReactiveObject_a6aeaec5a75649bd8ec693d5230c500016 extends reactivity_a6aeaec5a75649bd8ec693d5230c50000.ReactiveObject {
|
|
8
|
+
#copied = this[reactivity_a6aeaec5a75649bd8ec693d5230c50000.SIGNAL](false);
|
|
9
|
+
constructor() {
|
|
10
|
+
super(null);
|
|
11
|
+
}
|
|
12
|
+
get copied() {
|
|
13
|
+
return reactivity_a6aeaec5a75649bd8ec693d5230c50000.read(this.#copied);
|
|
14
|
+
}
|
|
15
|
+
set copied(_v0) {
|
|
16
|
+
reactivity_a6aeaec5a75649bd8ec693d5230c50000.write(this.#copied, _v0);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
6
19
|
const OMIT = ['timeout', 'value'];
|
|
7
20
|
export default template.factory(function (attributes, content) {
|
|
8
|
-
let state =
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}, timeout);
|
|
21
|
+
let state = new ReactiveObject_a6aeaec5a75649bd8ec693d5230c500016(), timeout = attributes.timeout || 1000 * 2;
|
|
22
|
+
return (() => {
|
|
23
|
+
let root_a6aeaec5a75649bd8ec693d5230c500017 = template_a6aeaec5a75649bd8ec693d5230c500018(), element_a6aeaec5a75649bd8ec693d5230c500019 = root_a6aeaec5a75649bd8ec693d5230c500017.firstChild, element_a6aeaec5a75649bd8ec693d5230c50001a = element_a6aeaec5a75649bd8ec693d5230c500019.firstChild;
|
|
24
|
+
template_a6aeaec5a75649bd8ec693d5230c50001.setProperties(element_a6aeaec5a75649bd8ec693d5230c500019, omit(attributes, OMIT));
|
|
25
|
+
template_a6aeaec5a75649bd8ec693d5230c50001.delegate(element_a6aeaec5a75649bd8ec693d5230c500019, 'click', (e) => {
|
|
26
|
+
e.preventDefault();
|
|
27
|
+
e.stopPropagation();
|
|
28
|
+
write(attributes.value).then(() => {
|
|
29
|
+
state.copied = true;
|
|
30
|
+
setTimeout(() => {
|
|
31
|
+
state.copied = false;
|
|
32
|
+
}, timeout);
|
|
33
|
+
});
|
|
22
34
|
});
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
</div>
|
|
27
|
-
`;
|
|
35
|
+
new template_a6aeaec5a75649bd8ec693d5230c50001.EffectSlot(element_a6aeaec5a75649bd8ec693d5230c50001a, () => content(state));
|
|
36
|
+
return root_a6aeaec5a75649bd8ec693d5230c500017;
|
|
37
|
+
})();
|
|
28
38
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Attributes } from '@esportsplus/template';
|
|
2
2
|
import './scss/index.scss';
|
|
3
3
|
declare const _default: (attributes: Attributes & {
|
|
4
4
|
currency?: "IGNORE" | "EUR" | "GBP" | "USD";
|
|
@@ -10,5 +10,5 @@ declare const _default: (attributes: Attributes & {
|
|
|
10
10
|
};
|
|
11
11
|
suffix?: string;
|
|
12
12
|
value: number;
|
|
13
|
-
}) =>
|
|
13
|
+
}) => DocumentFragment;
|
|
14
14
|
export default _default;
|
|
@@ -1,19 +1,55 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import * as reactivity_a6aeaec5a75649bd8ec693d5230c50000 from '@esportsplus/reactivity';
|
|
2
|
+
import { effect } from '@esportsplus/reactivity';
|
|
3
|
+
import * as template_a6aeaec5a75649bd8ec693d5230c50001 from '@esportsplus/template';
|
|
3
4
|
import { omit } from '@esportsplus/utilities';
|
|
4
5
|
import './scss/index.scss';
|
|
6
|
+
const template_a6aeaec5a75649bd8ec693d5230c50001e = template_a6aeaec5a75649bd8ec693d5230c50001.template(`<span class='counter-character counter-character--symbol'><!--$--></span>`);
|
|
7
|
+
const template_a6aeaec5a75649bd8ec693d5230c50001h = template_a6aeaec5a75649bd8ec693d5230c50001.template(`<span><!--$--></span>`);
|
|
8
|
+
const template_a6aeaec5a75649bd8ec693d5230c50001k = template_a6aeaec5a75649bd8ec693d5230c50001.template(`<div class=' counter-character'><div class='counter-character-track'><span>9</span><!--$--><span>0</span></div></div>`);
|
|
9
|
+
const template_a6aeaec5a75649bd8ec693d5230c50001o = template_a6aeaec5a75649bd8ec693d5230c50001.template(`<div class='counter'><!--$--></div>`);
|
|
10
|
+
class ReactiveObject_a6aeaec5a75649bd8ec693d5230c50001b extends reactivity_a6aeaec5a75649bd8ec693d5230c50000.ReactiveObject {
|
|
11
|
+
#value = this[reactivity_a6aeaec5a75649bd8ec693d5230c50000.SIGNAL](-1);
|
|
12
|
+
constructor() {
|
|
13
|
+
super(null);
|
|
14
|
+
}
|
|
15
|
+
get value() {
|
|
16
|
+
return reactivity_a6aeaec5a75649bd8ec693d5230c50000.read(this.#value);
|
|
17
|
+
}
|
|
18
|
+
set value(_v0) {
|
|
19
|
+
reactivity_a6aeaec5a75649bd8ec693d5230c50000.write(this.#value, _v0);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
class ReactiveObject_a6aeaec5a75649bd8ec693d5230c50001c extends reactivity_a6aeaec5a75649bd8ec693d5230c50000.ReactiveObject {
|
|
23
|
+
#length = this[reactivity_a6aeaec5a75649bd8ec693d5230c50000.SIGNAL](0);
|
|
24
|
+
#test;
|
|
25
|
+
#render;
|
|
26
|
+
constructor(_p0, _p1) {
|
|
27
|
+
super(null);
|
|
28
|
+
this.#test = this[reactivity_a6aeaec5a75649bd8ec693d5230c50000.COMPUTED](_p0);
|
|
29
|
+
this.#render = this[reactivity_a6aeaec5a75649bd8ec693d5230c50000.REACTIVE_ARRAY](_p1);
|
|
30
|
+
}
|
|
31
|
+
get length() {
|
|
32
|
+
return reactivity_a6aeaec5a75649bd8ec693d5230c50000.read(this.#length);
|
|
33
|
+
}
|
|
34
|
+
set length(_v0) {
|
|
35
|
+
reactivity_a6aeaec5a75649bd8ec693d5230c50000.write(this.#length, _v0);
|
|
36
|
+
}
|
|
37
|
+
get test() {
|
|
38
|
+
return reactivity_a6aeaec5a75649bd8ec693d5230c50000.read(this.#test);
|
|
39
|
+
}
|
|
40
|
+
get render() {
|
|
41
|
+
return this.#render;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
5
44
|
const OMIT = ['currency', 'decimals', 'delay', 'max', 'state', 'suffix', 'value'];
|
|
6
45
|
let formatters = {};
|
|
7
46
|
export default (attributes) => {
|
|
8
|
-
let { currency, decimals, delay, max, suffix, value } = attributes, api = attributes.state ||
|
|
47
|
+
let { currency, decimals, delay, max, suffix, value } = attributes, api = attributes.state || new ReactiveObject_a6aeaec5a75649bd8ec693d5230c50001b(), formatter = currency === 'IGNORE'
|
|
9
48
|
? undefined
|
|
10
49
|
: formatters[currency || 'USD'] ??= new Intl.NumberFormat('en-US', {
|
|
11
50
|
style: 'currency',
|
|
12
51
|
currency: currency || 'USD'
|
|
13
|
-
}), rendering = true, state =
|
|
14
|
-
length: 0,
|
|
15
|
-
render: []
|
|
16
|
-
});
|
|
52
|
+
}), rendering = true, state = new ReactiveObject_a6aeaec5a75649bd8ec693d5230c50001c(() => 'sds', []), render = new reactivity_a6aeaec5a75649bd8ec693d5230c50000.ReactiveArray();
|
|
17
53
|
decimals ??= 2;
|
|
18
54
|
effect(() => {
|
|
19
55
|
if (api.value !== -1) {
|
|
@@ -40,41 +76,41 @@ export default (attributes) => {
|
|
|
40
76
|
padding--;
|
|
41
77
|
value = '0';
|
|
42
78
|
}
|
|
43
|
-
|
|
79
|
+
render.$set(i, value);
|
|
44
80
|
}
|
|
45
81
|
if (rendering === true) {
|
|
46
82
|
rendering = false;
|
|
47
83
|
setTimeout(() => api.value = value, delay || 1000);
|
|
48
84
|
}
|
|
49
85
|
});
|
|
50
|
-
return
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
return html.reactive(state.render, function (value, i) {
|
|
58
|
-
if (isNaN(parseInt(value, 10))) {
|
|
59
|
-
return html `
|
|
60
|
-
<span class='counter-character counter-character--symbol'>
|
|
61
|
-
${value}
|
|
62
|
-
</span>
|
|
63
|
-
`;
|
|
86
|
+
return (() => {
|
|
87
|
+
let root_a6aeaec5a75649bd8ec693d5230c50001n = template_a6aeaec5a75649bd8ec693d5230c50001o(), element_a6aeaec5a75649bd8ec693d5230c50001p = root_a6aeaec5a75649bd8ec693d5230c50001n.firstChild, element_a6aeaec5a75649bd8ec693d5230c50001q = element_a6aeaec5a75649bd8ec693d5230c50001p.firstChild;
|
|
88
|
+
template_a6aeaec5a75649bd8ec693d5230c50001.setProperties(element_a6aeaec5a75649bd8ec693d5230c50001p, omit(attributes, OMIT));
|
|
89
|
+
new template_a6aeaec5a75649bd8ec693d5230c50001.EffectSlot(element_a6aeaec5a75649bd8ec693d5230c50001q, () => {
|
|
90
|
+
let n = state.length;
|
|
91
|
+
if (n === 0) {
|
|
92
|
+
return '';
|
|
64
93
|
}
|
|
65
|
-
return
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
94
|
+
return new template_a6aeaec5a75649bd8ec693d5230c50001.ArraySlot(render, function (value) {
|
|
95
|
+
if (isNaN(parseInt(value, 10))) {
|
|
96
|
+
return (() => {
|
|
97
|
+
let root_a6aeaec5a75649bd8ec693d5230c50001d = template_a6aeaec5a75649bd8ec693d5230c50001e(), element_a6aeaec5a75649bd8ec693d5230c50001f = root_a6aeaec5a75649bd8ec693d5230c50001d.firstChild.firstChild;
|
|
98
|
+
template_a6aeaec5a75649bd8ec693d5230c50001.slot(element_a6aeaec5a75649bd8ec693d5230c50001f, value);
|
|
99
|
+
return root_a6aeaec5a75649bd8ec693d5230c50001d;
|
|
100
|
+
})();
|
|
101
|
+
}
|
|
102
|
+
return (() => {
|
|
103
|
+
let root_a6aeaec5a75649bd8ec693d5230c50001j = template_a6aeaec5a75649bd8ec693d5230c50001k(), element_a6aeaec5a75649bd8ec693d5230c50001l = root_a6aeaec5a75649bd8ec693d5230c50001j.firstChild.firstElementChild, element_a6aeaec5a75649bd8ec693d5230c50001m = element_a6aeaec5a75649bd8ec693d5230c50001l.firstChild.nextSibling;
|
|
104
|
+
template_a6aeaec5a75649bd8ec693d5230c50001.setStyle(element_a6aeaec5a75649bd8ec693d5230c50001l, ';', `--value: ${value}`);
|
|
105
|
+
template_a6aeaec5a75649bd8ec693d5230c50001.slot(element_a6aeaec5a75649bd8ec693d5230c50001m, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map((value) => {
|
|
106
|
+
let root_a6aeaec5a75649bd8ec693d5230c50001g = template_a6aeaec5a75649bd8ec693d5230c50001h(), element_a6aeaec5a75649bd8ec693d5230c50001i = root_a6aeaec5a75649bd8ec693d5230c50001g.firstChild.firstChild;
|
|
107
|
+
template_a6aeaec5a75649bd8ec693d5230c50001.slot(element_a6aeaec5a75649bd8ec693d5230c50001i, value);
|
|
108
|
+
return root_a6aeaec5a75649bd8ec693d5230c50001g;
|
|
109
|
+
}));
|
|
110
|
+
return root_a6aeaec5a75649bd8ec693d5230c50001j;
|
|
111
|
+
})();
|
|
112
|
+
});
|
|
76
113
|
});
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
`;
|
|
114
|
+
return root_a6aeaec5a75649bd8ec693d5230c50001n;
|
|
115
|
+
})();
|
|
80
116
|
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as template_a6aeaec5a75649bd8ec693d5230c50001 from '@esportsplus/template';
|
|
2
2
|
import './scss/index.scss';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
`;
|
|
3
|
+
const template_a6aeaec5a75649bd8ec693d5230c50001s = template_a6aeaec5a75649bd8ec693d5230c50001.template(`<div class='ellipsis'><span></span><span></span><span></span></div>`);
|
|
4
|
+
export default (attributes) => {
|
|
5
|
+
let root_a6aeaec5a75649bd8ec693d5230c50001r = template_a6aeaec5a75649bd8ec693d5230c50001s(), element_a6aeaec5a75649bd8ec693d5230c50001t = root_a6aeaec5a75649bd8ec693d5230c50001r.firstChild;
|
|
6
|
+
template_a6aeaec5a75649bd8ec693d5230c50001.setProperties(element_a6aeaec5a75649bd8ec693d5230c50001t, attributes);
|
|
7
|
+
return root_a6aeaec5a75649bd8ec693d5230c50001r;
|
|
8
|
+
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import response from '@esportsplus/action';
|
|
2
|
-
import
|
|
2
|
+
import * as template_a6aeaec5a75649bd8ec693d5230c50001 from '@esportsplus/template';
|
|
3
3
|
import { omit } from '@esportsplus/utilities';
|
|
4
4
|
import input from './input.js';
|
|
5
|
+
const template_a6aeaec5a75649bd8ec693d5230c50001v = template_a6aeaec5a75649bd8ec693d5230c50001.template(`<form
|
|
6
|
+
class='form'><!--$--></form>`);
|
|
5
7
|
const OMIT = ['action', 'state'];
|
|
6
8
|
function parse(input) {
|
|
7
9
|
let data = {};
|
|
@@ -27,20 +29,18 @@ function parse(input) {
|
|
|
27
29
|
;
|
|
28
30
|
export default (attributes, content) => {
|
|
29
31
|
let { action, state } = attributes;
|
|
30
|
-
return
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
${{
|
|
35
|
-
onclick: function (event) {
|
|
32
|
+
return (() => {
|
|
33
|
+
let root_a6aeaec5a75649bd8ec693d5230c50001u = template_a6aeaec5a75649bd8ec693d5230c50001v(), element_a6aeaec5a75649bd8ec693d5230c50001w = root_a6aeaec5a75649bd8ec693d5230c50001u.firstChild, element_a6aeaec5a75649bd8ec693d5230c50001x = element_a6aeaec5a75649bd8ec693d5230c50001w.firstChild;
|
|
34
|
+
template_a6aeaec5a75649bd8ec693d5230c50001.setProperties(element_a6aeaec5a75649bd8ec693d5230c50001w, omit(attributes, OMIT));
|
|
35
|
+
template_a6aeaec5a75649bd8ec693d5230c50001.delegate(element_a6aeaec5a75649bd8ec693d5230c50001w, 'click', function (event) {
|
|
36
36
|
let trigger = event.target;
|
|
37
37
|
if (trigger?.type !== 'submit') {
|
|
38
38
|
return;
|
|
39
39
|
}
|
|
40
40
|
event.preventDefault();
|
|
41
41
|
this.dispatchEvent(new SubmitEvent('submit', { cancelable: true, bubbles: true, submitter: trigger }));
|
|
42
|
-
}
|
|
43
|
-
|
|
42
|
+
});
|
|
43
|
+
template_a6aeaec5a75649bd8ec693d5230c50001.on(element_a6aeaec5a75649bd8ec693d5230c50001w, 'submit', async function (event) {
|
|
44
44
|
event.preventDefault();
|
|
45
45
|
if (state) {
|
|
46
46
|
state.processing = true;
|
|
@@ -59,10 +59,8 @@ export default (attributes, content) => {
|
|
|
59
59
|
if (state) {
|
|
60
60
|
state.processing = false;
|
|
61
61
|
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
</form>
|
|
67
|
-
`;
|
|
62
|
+
});
|
|
63
|
+
template_a6aeaec5a75649bd8ec693d5230c50001.slot(element_a6aeaec5a75649bd8ec693d5230c50001x, content);
|
|
64
|
+
return root_a6aeaec5a75649bd8ec693d5230c50001u;
|
|
65
|
+
})();
|
|
68
66
|
};
|
|
@@ -12,7 +12,7 @@ declare const _default: {
|
|
|
12
12
|
state?: {
|
|
13
13
|
processing: boolean;
|
|
14
14
|
};
|
|
15
|
-
} & import("@esportsplus/template").Attributes, content: import("@esportsplus/template").Renderable<any>) =>
|
|
15
|
+
} & import("@esportsplus/template").Attributes, content: import("@esportsplus/template").Renderable<any>) => DocumentFragment;
|
|
16
16
|
input: {
|
|
17
17
|
get: (element?: import("@esportsplus/template").Element) => {
|
|
18
18
|
error: string;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as template_a6aeaec5a75649bd8ec693d5230c50001 from '@esportsplus/template';
|
|
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_a6aeaec5a75649bd8ec693d5230c50001.Attributes | undefined;
|
|
6
|
+
content?: template_a6aeaec5a75649bd8ec693d5230c50001.Renderable<any>;
|
|
7
|
+
}, attributes: Readonly<template_a6aeaec5a75649bd8ec693d5230c50001.Attributes>, content: template_a6aeaec5a75649bd8ec693d5230c50001.Renderable<any>) => template_a6aeaec5a75649bd8ec693d5230c50001.Renderable<any>>;
|
|
8
|
+
<T extends template_a6aeaec5a75649bd8ec693d5230c50001.Attributes>(attributes: T): ReturnType<(this: {
|
|
9
|
+
attributes?: template_a6aeaec5a75649bd8ec693d5230c50001.Attributes | undefined;
|
|
10
|
+
content?: template_a6aeaec5a75649bd8ec693d5230c50001.Renderable<any>;
|
|
11
|
+
}, attributes: Readonly<template_a6aeaec5a75649bd8ec693d5230c50001.Attributes>, content: template_a6aeaec5a75649bd8ec693d5230c50001.Renderable<any>) => template_a6aeaec5a75649bd8ec693d5230c50001.Renderable<any>>;
|
|
12
|
+
<T extends template_a6aeaec5a75649bd8ec693d5230c50001.Renderable<any>>(content: T): ReturnType<(this: {
|
|
13
|
+
attributes?: template_a6aeaec5a75649bd8ec693d5230c50001.Attributes | undefined;
|
|
14
|
+
content?: template_a6aeaec5a75649bd8ec693d5230c50001.Renderable<any>;
|
|
15
|
+
}, attributes: Readonly<template_a6aeaec5a75649bd8ec693d5230c50001.Attributes>, content: template_a6aeaec5a75649bd8ec693d5230c50001.Renderable<any>) => template_a6aeaec5a75649bd8ec693d5230c50001.Renderable<any>>;
|
|
16
|
+
(attributes: template_a6aeaec5a75649bd8ec693d5230c50001.Attributes, content: template_a6aeaec5a75649bd8ec693d5230c50001.Renderable<any>): ReturnType<(this: {
|
|
17
|
+
attributes?: template_a6aeaec5a75649bd8ec693d5230c50001.Attributes | undefined;
|
|
18
|
+
content?: template_a6aeaec5a75649bd8ec693d5230c50001.Renderable<any>;
|
|
19
|
+
}, attributes: Readonly<template_a6aeaec5a75649bd8ec693d5230c50001.Attributes>, content: template_a6aeaec5a75649bd8ec693d5230c50001.Renderable<any>) => template_a6aeaec5a75649bd8ec693d5230c50001.Renderable<any>>;
|
|
20
20
|
};
|
|
21
21
|
export default _default;
|
|
@@ -1,8 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import * as reactivity_a6aeaec5a75649bd8ec693d5230c50000 from '@esportsplus/reactivity';
|
|
2
|
+
import * as template_a6aeaec5a75649bd8ec693d5230c50001 from '@esportsplus/template';
|
|
3
3
|
import { omit } from '@esportsplus/utilities';
|
|
4
4
|
import template from '../../components/template/index.js';
|
|
5
5
|
import './scss/index.scss';
|
|
6
|
+
const template_a6aeaec5a75649bd8ec693d5230c500020 = template_a6aeaec5a75649bd8ec693d5230c50001.template(`<div class='highlight'><!--$--></div>`);
|
|
7
|
+
class ReactiveObject_a6aeaec5a75649bd8ec693d5230c50001y extends reactivity_a6aeaec5a75649bd8ec693d5230c50000.ReactiveObject {
|
|
8
|
+
#highlight = this[reactivity_a6aeaec5a75649bd8ec693d5230c50000.SIGNAL](0);
|
|
9
|
+
constructor() {
|
|
10
|
+
super(null);
|
|
11
|
+
}
|
|
12
|
+
get highlight() {
|
|
13
|
+
return reactivity_a6aeaec5a75649bd8ec693d5230c50000.read(this.#highlight);
|
|
14
|
+
}
|
|
15
|
+
set highlight(_v0) {
|
|
16
|
+
reactivity_a6aeaec5a75649bd8ec693d5230c50000.write(this.#highlight, _v0);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
6
19
|
const OMIT = ['background'];
|
|
7
20
|
let key = Symbol(), observer = null;
|
|
8
21
|
export default template.factory((attributes, content) => {
|
|
@@ -25,24 +38,19 @@ export default template.factory((attributes, content) => {
|
|
|
25
38
|
}
|
|
26
39
|
}, { threshold: 1 });
|
|
27
40
|
}
|
|
28
|
-
let state =
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
${omit(attributes, OMIT)}
|
|
34
|
-
${{
|
|
35
|
-
onrender: (element) => {
|
|
41
|
+
let state = new ReactiveObject_a6aeaec5a75649bd8ec693d5230c50001y();
|
|
42
|
+
return (() => {
|
|
43
|
+
let root_a6aeaec5a75649bd8ec693d5230c50001z = template_a6aeaec5a75649bd8ec693d5230c500020(), element_a6aeaec5a75649bd8ec693d5230c500021 = root_a6aeaec5a75649bd8ec693d5230c50001z.firstChild, element_a6aeaec5a75649bd8ec693d5230c500022 = element_a6aeaec5a75649bd8ec693d5230c500021.firstChild;
|
|
44
|
+
template_a6aeaec5a75649bd8ec693d5230c50001.setProperties(element_a6aeaec5a75649bd8ec693d5230c500021, omit(attributes, OMIT));
|
|
45
|
+
template_a6aeaec5a75649bd8ec693d5230c50001.onrender(element_a6aeaec5a75649bd8ec693d5230c500021, (element) => {
|
|
36
46
|
element[key] = state;
|
|
37
47
|
observer.observe(element);
|
|
38
|
-
}
|
|
39
|
-
|
|
48
|
+
});
|
|
49
|
+
template_a6aeaec5a75649bd8ec693d5230c50001.setStyle(element_a6aeaec5a75649bd8ec693d5230c500021, '', [
|
|
40
50
|
() => `--highlight: ${state.highlight}`,
|
|
41
51
|
`--background: ${attributes.background}`,
|
|
42
|
-
]
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
</div>
|
|
47
|
-
`;
|
|
52
|
+
]);
|
|
53
|
+
template_a6aeaec5a75649bd8ec693d5230c50001.slot(element_a6aeaec5a75649bd8ec693d5230c500022, content);
|
|
54
|
+
return root_a6aeaec5a75649bd8ec693d5230c50001z;
|
|
55
|
+
})();
|
|
48
56
|
});
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
+
import * as template_a6aeaec5a75649bd8ec693d5230c50001 from '@esportsplus/template';
|
|
1
2
|
import './scss/index.scss';
|
|
2
3
|
declare const _default: {
|
|
3
4
|
(): ReturnType<(this: {
|
|
4
|
-
attributes?:
|
|
5
|
+
attributes?: template_a6aeaec5a75649bd8ec693d5230c50001.Attributes | undefined;
|
|
5
6
|
content?: string | undefined;
|
|
6
|
-
}, attributes: Readonly<
|
|
7
|
-
<T extends
|
|
8
|
-
attributes?:
|
|
7
|
+
}, attributes: Readonly<template_a6aeaec5a75649bd8ec693d5230c50001.Attributes>, content: string) => template_a6aeaec5a75649bd8ec693d5230c50001.Renderable<any>>;
|
|
8
|
+
<T extends template_a6aeaec5a75649bd8ec693d5230c50001.Attributes>(attributes: T): ReturnType<(this: {
|
|
9
|
+
attributes?: template_a6aeaec5a75649bd8ec693d5230c50001.Attributes | undefined;
|
|
9
10
|
content?: string | undefined;
|
|
10
|
-
}, attributes: Readonly<
|
|
11
|
+
}, attributes: Readonly<template_a6aeaec5a75649bd8ec693d5230c50001.Attributes>, content: string) => template_a6aeaec5a75649bd8ec693d5230c50001.Renderable<any>>;
|
|
11
12
|
<T extends string>(content: T): ReturnType<(this: {
|
|
12
|
-
attributes?:
|
|
13
|
+
attributes?: template_a6aeaec5a75649bd8ec693d5230c50001.Attributes | undefined;
|
|
13
14
|
content?: string | undefined;
|
|
14
|
-
}, attributes: Readonly<
|
|
15
|
-
(attributes:
|
|
16
|
-
attributes?:
|
|
15
|
+
}, attributes: Readonly<template_a6aeaec5a75649bd8ec693d5230c50001.Attributes>, content: string) => template_a6aeaec5a75649bd8ec693d5230c50001.Renderable<any>>;
|
|
16
|
+
(attributes: template_a6aeaec5a75649bd8ec693d5230c50001.Attributes, content: string): ReturnType<(this: {
|
|
17
|
+
attributes?: template_a6aeaec5a75649bd8ec693d5230c50001.Attributes | undefined;
|
|
17
18
|
content?: string | undefined;
|
|
18
|
-
}, attributes: Readonly<
|
|
19
|
+
}, attributes: Readonly<template_a6aeaec5a75649bd8ec693d5230c50001.Attributes>, content: string) => template_a6aeaec5a75649bd8ec693d5230c50001.Renderable<any>>;
|
|
19
20
|
};
|
|
20
21
|
export default _default;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as template_a6aeaec5a75649bd8ec693d5230c50001 from '@esportsplus/template';
|
|
2
|
+
import { svg } from '@esportsplus/template';
|
|
2
3
|
import template from '../../components/template/index.js';
|
|
3
4
|
import './scss/index.scss';
|
|
5
|
+
const template_a6aeaec5a75649bd8ec693d5230c500024 = template_a6aeaec5a75649bd8ec693d5230c50001.template(`<div class='icon'><!--$--></div>`);
|
|
4
6
|
export default template.factory((attributes, icon) => {
|
|
5
|
-
return
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
return (() => {
|
|
8
|
+
let root_a6aeaec5a75649bd8ec693d5230c500023 = template_a6aeaec5a75649bd8ec693d5230c500024(), element_a6aeaec5a75649bd8ec693d5230c500025 = root_a6aeaec5a75649bd8ec693d5230c500023.firstChild, element_a6aeaec5a75649bd8ec693d5230c500026 = element_a6aeaec5a75649bd8ec693d5230c500025.firstChild;
|
|
9
|
+
template_a6aeaec5a75649bd8ec693d5230c50001.setProperties(element_a6aeaec5a75649bd8ec693d5230c500025, attributes);
|
|
10
|
+
template_a6aeaec5a75649bd8ec693d5230c50001.slot(element_a6aeaec5a75649bd8ec693d5230c500026, svg.sprite(icon));
|
|
11
|
+
return root_a6aeaec5a75649bd8ec693d5230c500023;
|
|
12
|
+
})();
|
|
10
13
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Attributes } from '@esportsplus/template';
|
|
2
2
|
import './scss/index.scss';
|
|
3
3
|
export default function (this: {
|
|
4
4
|
attributes?: Attributes;
|
|
@@ -7,4 +7,4 @@ export default function (this: {
|
|
|
7
7
|
active: boolean;
|
|
8
8
|
error: string;
|
|
9
9
|
};
|
|
10
|
-
}):
|
|
10
|
+
}): DocumentFragment;
|
|
@@ -1,29 +1,45 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import * as reactivity_a6aeaec5a75649bd8ec693d5230c50000 from '@esportsplus/reactivity';
|
|
2
|
+
import * as template_a6aeaec5a75649bd8ec693d5230c50001 from '@esportsplus/template';
|
|
3
3
|
import form from '../../components/form/index.js';
|
|
4
4
|
import './scss/index.scss';
|
|
5
|
+
const template_a6aeaec5a75649bd8ec693d5230c500029 = template_a6aeaec5a75649bd8ec693d5230c50001.template(`<input
|
|
6
|
+
class='input'
|
|
7
|
+
/>`);
|
|
8
|
+
class ReactiveObject_a6aeaec5a75649bd8ec693d5230c500027 extends reactivity_a6aeaec5a75649bd8ec693d5230c50000.ReactiveObject {
|
|
9
|
+
#active = this[reactivity_a6aeaec5a75649bd8ec693d5230c50000.SIGNAL](false);
|
|
10
|
+
#error = this[reactivity_a6aeaec5a75649bd8ec693d5230c50000.SIGNAL]('');
|
|
11
|
+
constructor() {
|
|
12
|
+
super(null);
|
|
13
|
+
}
|
|
14
|
+
get active() {
|
|
15
|
+
return reactivity_a6aeaec5a75649bd8ec693d5230c50000.read(this.#active);
|
|
16
|
+
}
|
|
17
|
+
set active(_v0) {
|
|
18
|
+
reactivity_a6aeaec5a75649bd8ec693d5230c50000.write(this.#active, _v0);
|
|
19
|
+
}
|
|
20
|
+
get error() {
|
|
21
|
+
return reactivity_a6aeaec5a75649bd8ec693d5230c50000.read(this.#error);
|
|
22
|
+
}
|
|
23
|
+
set error(_v1) {
|
|
24
|
+
reactivity_a6aeaec5a75649bd8ec693d5230c50000.write(this.#error, _v1);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
5
27
|
export default function (attributes) {
|
|
6
|
-
let state = attributes.state ||
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
${this?.attributes}
|
|
14
|
-
${attributes}
|
|
15
|
-
${{
|
|
16
|
-
class: () => state.active && '--active',
|
|
17
|
-
onfocusin: () => {
|
|
28
|
+
let state = attributes.state || new ReactiveObject_a6aeaec5a75649bd8ec693d5230c500027();
|
|
29
|
+
return (() => {
|
|
30
|
+
let root_a6aeaec5a75649bd8ec693d5230c500028 = template_a6aeaec5a75649bd8ec693d5230c500029(), element_a6aeaec5a75649bd8ec693d5230c50002a = root_a6aeaec5a75649bd8ec693d5230c500028.firstChild;
|
|
31
|
+
template_a6aeaec5a75649bd8ec693d5230c50001.setProperties(element_a6aeaec5a75649bd8ec693d5230c50002a, this?.attributes);
|
|
32
|
+
template_a6aeaec5a75649bd8ec693d5230c50001.setProperties(element_a6aeaec5a75649bd8ec693d5230c50002a, attributes);
|
|
33
|
+
template_a6aeaec5a75649bd8ec693d5230c50001.setClass(element_a6aeaec5a75649bd8ec693d5230c50002a, '', () => state.active && '--active');
|
|
34
|
+
template_a6aeaec5a75649bd8ec693d5230c50001.on(element_a6aeaec5a75649bd8ec693d5230c50002a, 'focusin', () => {
|
|
18
35
|
state.active = true;
|
|
19
|
-
}
|
|
20
|
-
|
|
36
|
+
});
|
|
37
|
+
template_a6aeaec5a75649bd8ec693d5230c50001.on(element_a6aeaec5a75649bd8ec693d5230c50002a, 'focusout', () => {
|
|
21
38
|
state.active = false;
|
|
22
|
-
}
|
|
23
|
-
onrender
|
|
24
|
-
type
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
`;
|
|
39
|
+
});
|
|
40
|
+
template_a6aeaec5a75649bd8ec693d5230c50001.onrender(element_a6aeaec5a75649bd8ec693d5230c50002a, form.input.onrender(state));
|
|
41
|
+
template_a6aeaec5a75649bd8ec693d5230c50001.setProperty(element_a6aeaec5a75649bd8ec693d5230c50002a, 'type', (attributes.type || 'text'));
|
|
42
|
+
return root_a6aeaec5a75649bd8ec693d5230c500028;
|
|
43
|
+
})();
|
|
28
44
|
}
|
|
29
45
|
;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as template_a6aeaec5a75649bd8ec693d5230c50001 from '@esportsplus/template';
|
|
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_a6aeaec5a75649bd8ec693d5230c50001.Attributes | undefined;
|
|
6
|
+
content?: template_a6aeaec5a75649bd8ec693d5230c50001.Renderable<any>;
|
|
7
|
+
}, attributes: Readonly<template_a6aeaec5a75649bd8ec693d5230c50001.Attributes>, content: template_a6aeaec5a75649bd8ec693d5230c50001.Renderable<any>) => template_a6aeaec5a75649bd8ec693d5230c50001.Renderable<any>>;
|
|
8
|
+
<T extends template_a6aeaec5a75649bd8ec693d5230c50001.Attributes>(attributes: T): ReturnType<(this: {
|
|
9
|
+
attributes?: template_a6aeaec5a75649bd8ec693d5230c50001.Attributes | undefined;
|
|
10
|
+
content?: template_a6aeaec5a75649bd8ec693d5230c50001.Renderable<any>;
|
|
11
|
+
}, attributes: Readonly<template_a6aeaec5a75649bd8ec693d5230c50001.Attributes>, content: template_a6aeaec5a75649bd8ec693d5230c50001.Renderable<any>) => template_a6aeaec5a75649bd8ec693d5230c50001.Renderable<any>>;
|
|
12
|
+
<T extends template_a6aeaec5a75649bd8ec693d5230c50001.Renderable<any>>(content: T): ReturnType<(this: {
|
|
13
|
+
attributes?: template_a6aeaec5a75649bd8ec693d5230c50001.Attributes | undefined;
|
|
14
|
+
content?: template_a6aeaec5a75649bd8ec693d5230c50001.Renderable<any>;
|
|
15
|
+
}, attributes: Readonly<template_a6aeaec5a75649bd8ec693d5230c50001.Attributes>, content: template_a6aeaec5a75649bd8ec693d5230c50001.Renderable<any>) => template_a6aeaec5a75649bd8ec693d5230c50001.Renderable<any>>;
|
|
16
|
+
(attributes: template_a6aeaec5a75649bd8ec693d5230c50001.Attributes, content: template_a6aeaec5a75649bd8ec693d5230c50001.Renderable<any>): ReturnType<(this: {
|
|
17
|
+
attributes?: template_a6aeaec5a75649bd8ec693d5230c50001.Attributes | undefined;
|
|
18
|
+
content?: template_a6aeaec5a75649bd8ec693d5230c50001.Renderable<any>;
|
|
19
|
+
}, attributes: Readonly<template_a6aeaec5a75649bd8ec693d5230c50001.Attributes>, content: template_a6aeaec5a75649bd8ec693d5230c50001.Renderable<any>) => template_a6aeaec5a75649bd8ec693d5230c50001.Renderable<any>>;
|
|
20
20
|
};
|
|
21
21
|
export default _default;
|