@esportsplus/ui 0.47.2 → 0.48.1
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/README.md +2 -3
- package/build/components/accordion/index.d.ts +16 -16
- package/build/components/accordion/index.js +13 -23
- package/build/components/alert/index.js +33 -64
- package/build/components/back/index.d.ts +8 -8
- package/build/components/back/index.js +8 -8
- package/build/components/button/index.d.ts +21 -21
- package/build/components/button/index.js +20 -36
- package/build/components/checkbox/index.js +19 -36
- package/build/components/clipboard/onclick.js +11 -21
- package/build/components/counter/index.js +28 -59
- package/build/components/ellipsis/index.js +5 -5
- package/build/components/form/action.js +8 -8
- package/build/components/highlight/index.d.ts +16 -16
- package/build/components/highlight/index.js +12 -22
- package/build/components/icon/index.d.ts +11 -11
- package/build/components/icon/index.js +6 -6
- package/build/components/input/index.js +16 -32
- package/build/components/loader/index.d.ts +16 -16
- package/build/components/loader/index.js +26 -48
- package/build/components/loading/index.js +5 -5
- package/build/components/range/index.js +19 -42
- package/build/components/scrollbar/index.d.ts +11 -11
- package/build/components/scrollbar/index.js +19 -35
- package/build/components/select/index.js +34 -63
- package/build/components/textarea/index.js +16 -32
- package/build/components/tooltip/menu.d.ts +11 -11
- package/build/components/tooltip/menu.js +20 -20
- package/build/components/tooltip/onclick.d.ts +1101 -1101
- package/build/components/tooltip/onclick.js +10 -22
- package/build/components/tooltip/onhover.d.ts +16 -16
- package/build/components/tooltip/onhover.js +11 -23
- package/build/components/typewriter/index.d.ts +11 -11
- package/build/components/typewriter/index.js +10 -22
- package/package.json +3 -4
- package/src/components/accordion/index.ts +1 -2
- package/src/components/alert/index.ts +1 -2
- package/src/components/button/index.ts +1 -2
- package/src/components/checkbox/index.ts +1 -2
- package/src/components/clipboard/onclick.ts +1 -2
- package/src/components/counter/index.ts +1 -2
- package/src/components/highlight/index.ts +1 -2
- package/src/components/input/index.ts +1 -2
- package/src/components/loader/index.ts +1 -2
- package/src/components/range/index.ts +1 -2
- package/src/components/scrollbar/index.ts +1 -2
- package/src/components/select/index.ts +1 -2
- package/src/components/textarea/index.ts +1 -2
- package/src/components/tooltip/onclick.ts +1 -2
- package/src/components/tooltip/onhover.ts +1 -2
- package/src/components/typewriter/index.ts +1 -2
|
@@ -1,28 +1,18 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as template_23a4f055a2904f1fa5d72b30cc2abc501 from '@esportsplus/template';
|
|
2
|
+
import { reactive } 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
|
|
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
|
+
const template_23a4f055a2904f1fa5d72b30cc2abc5013 = template_23a4f055a2904f1fa5d72b30cc2abc501.template(`<div><!--$--></div>`);
|
|
19
7
|
const OMIT = ['timeout', 'value'];
|
|
20
8
|
export default template.factory(function (attributes, content) {
|
|
21
|
-
let state =
|
|
9
|
+
let state = reactive({
|
|
10
|
+
copied: false
|
|
11
|
+
}), timeout = attributes.timeout || 1000 * 2;
|
|
22
12
|
return (() => {
|
|
23
|
-
let
|
|
24
|
-
|
|
25
|
-
|
|
13
|
+
let root_23a4f055a2904f1fa5d72b30cc2abc5012 = template_23a4f055a2904f1fa5d72b30cc2abc5013(), element_23a4f055a2904f1fa5d72b30cc2abc5014 = root_23a4f055a2904f1fa5d72b30cc2abc5012.firstChild, element_23a4f055a2904f1fa5d72b30cc2abc5015 = element_23a4f055a2904f1fa5d72b30cc2abc5014.firstChild;
|
|
14
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.setProperties(element_23a4f055a2904f1fa5d72b30cc2abc5014, omit(attributes, OMIT));
|
|
15
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.delegate(element_23a4f055a2904f1fa5d72b30cc2abc5014, 'click', (e) => {
|
|
26
16
|
e.preventDefault();
|
|
27
17
|
e.stopPropagation();
|
|
28
18
|
write(attributes.value).then(() => {
|
|
@@ -32,7 +22,7 @@ export default template.factory(function (attributes, content) {
|
|
|
32
22
|
}, timeout);
|
|
33
23
|
});
|
|
34
24
|
});
|
|
35
|
-
new
|
|
36
|
-
return
|
|
25
|
+
new template_23a4f055a2904f1fa5d72b30cc2abc501.EffectSlot(element_23a4f055a2904f1fa5d72b30cc2abc5015, () => content(state));
|
|
26
|
+
return root_23a4f055a2904f1fa5d72b30cc2abc5012;
|
|
37
27
|
})();
|
|
38
28
|
});
|
|
@@ -1,55 +1,24 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { effect } from '@esportsplus/
|
|
3
|
-
import * as template_a6aeaec5a75649bd8ec693d5230c50001 from '@esportsplus/template';
|
|
1
|
+
import * as template_23a4f055a2904f1fa5d72b30cc2abc501 from '@esportsplus/template';
|
|
2
|
+
import { effect, reactive } from '@esportsplus/template';
|
|
4
3
|
import { omit } from '@esportsplus/utilities';
|
|
5
4
|
import './scss/index.scss';
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
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
|
+
const template_23a4f055a2904f1fa5d72b30cc2abc5017 = template_23a4f055a2904f1fa5d72b30cc2abc501.template(`<span class='counter-character counter-character--symbol'><!--$--></span>`);
|
|
6
|
+
const template_23a4f055a2904f1fa5d72b30cc2abc501a = template_23a4f055a2904f1fa5d72b30cc2abc501.template(`<span><!--$--></span>`);
|
|
7
|
+
const template_23a4f055a2904f1fa5d72b30cc2abc501d = template_23a4f055a2904f1fa5d72b30cc2abc501.template(`<div class=' counter-character'><div class='counter-character-track'><span>9</span><!--$--><span>0</span></div></div>`);
|
|
8
|
+
const template_23a4f055a2904f1fa5d72b30cc2abc501h = template_23a4f055a2904f1fa5d72b30cc2abc501.template(`<div class='counter'><!--$--></div>`);
|
|
44
9
|
const OMIT = ['currency', 'decimals', 'delay', 'max', 'state', 'suffix', 'value'];
|
|
45
10
|
let formatters = {};
|
|
46
11
|
export default (attributes) => {
|
|
47
|
-
let { currency, decimals, delay, max, suffix, value } = attributes, api = attributes.state ||
|
|
12
|
+
let { currency, decimals, delay, max, suffix, value } = attributes, api = attributes.state || reactive({ value: -1 }), formatter = currency === 'IGNORE'
|
|
48
13
|
? undefined
|
|
49
14
|
: formatters[currency || 'USD'] ??= new Intl.NumberFormat('en-US', {
|
|
50
15
|
style: 'currency',
|
|
51
16
|
currency: currency || 'USD'
|
|
52
|
-
}), rendering = true, state =
|
|
17
|
+
}), rendering = true, state = reactive({
|
|
18
|
+
length: 0,
|
|
19
|
+
test: () => 'sds',
|
|
20
|
+
render: []
|
|
21
|
+
}), render = reactive([]);
|
|
53
22
|
decimals ??= 2;
|
|
54
23
|
effect(() => {
|
|
55
24
|
if (api.value !== -1) {
|
|
@@ -76,7 +45,7 @@ export default (attributes) => {
|
|
|
76
45
|
padding--;
|
|
77
46
|
value = '0';
|
|
78
47
|
}
|
|
79
|
-
render
|
|
48
|
+
render[i] = value;
|
|
80
49
|
}
|
|
81
50
|
if (rendering === true) {
|
|
82
51
|
rendering = false;
|
|
@@ -84,33 +53,33 @@ export default (attributes) => {
|
|
|
84
53
|
}
|
|
85
54
|
});
|
|
86
55
|
return (() => {
|
|
87
|
-
let
|
|
88
|
-
|
|
89
|
-
new
|
|
56
|
+
let root_23a4f055a2904f1fa5d72b30cc2abc501g = template_23a4f055a2904f1fa5d72b30cc2abc501h(), element_23a4f055a2904f1fa5d72b30cc2abc501i = root_23a4f055a2904f1fa5d72b30cc2abc501g.firstChild, element_23a4f055a2904f1fa5d72b30cc2abc501j = element_23a4f055a2904f1fa5d72b30cc2abc501i.firstChild;
|
|
57
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.setProperties(element_23a4f055a2904f1fa5d72b30cc2abc501i, omit(attributes, OMIT));
|
|
58
|
+
new template_23a4f055a2904f1fa5d72b30cc2abc501.EffectSlot(element_23a4f055a2904f1fa5d72b30cc2abc501j, () => {
|
|
90
59
|
let n = state.length;
|
|
91
60
|
if (n === 0) {
|
|
92
61
|
return '';
|
|
93
62
|
}
|
|
94
|
-
return new
|
|
63
|
+
return new template_23a4f055a2904f1fa5d72b30cc2abc501.ArraySlot(render, function (value) {
|
|
95
64
|
if (isNaN(parseInt(value, 10))) {
|
|
96
65
|
return (() => {
|
|
97
|
-
let
|
|
98
|
-
|
|
99
|
-
return
|
|
66
|
+
let root_23a4f055a2904f1fa5d72b30cc2abc5016 = template_23a4f055a2904f1fa5d72b30cc2abc5017(), element_23a4f055a2904f1fa5d72b30cc2abc5018 = root_23a4f055a2904f1fa5d72b30cc2abc5016.firstChild.firstChild;
|
|
67
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.slot(element_23a4f055a2904f1fa5d72b30cc2abc5018, value);
|
|
68
|
+
return root_23a4f055a2904f1fa5d72b30cc2abc5016;
|
|
100
69
|
})();
|
|
101
70
|
}
|
|
102
71
|
return (() => {
|
|
103
|
-
let
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
let
|
|
107
|
-
|
|
108
|
-
return
|
|
72
|
+
let root_23a4f055a2904f1fa5d72b30cc2abc501c = template_23a4f055a2904f1fa5d72b30cc2abc501d(), element_23a4f055a2904f1fa5d72b30cc2abc501e = root_23a4f055a2904f1fa5d72b30cc2abc501c.firstChild.firstElementChild, element_23a4f055a2904f1fa5d72b30cc2abc501f = element_23a4f055a2904f1fa5d72b30cc2abc501e.firstChild.nextSibling;
|
|
73
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.setStyle(element_23a4f055a2904f1fa5d72b30cc2abc501e, ';', `--value: ${value}`);
|
|
74
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.slot(element_23a4f055a2904f1fa5d72b30cc2abc501f, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map((value) => {
|
|
75
|
+
let root_23a4f055a2904f1fa5d72b30cc2abc5019 = template_23a4f055a2904f1fa5d72b30cc2abc501a(), element_23a4f055a2904f1fa5d72b30cc2abc501b = root_23a4f055a2904f1fa5d72b30cc2abc5019.firstChild.firstChild;
|
|
76
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.slot(element_23a4f055a2904f1fa5d72b30cc2abc501b, value);
|
|
77
|
+
return root_23a4f055a2904f1fa5d72b30cc2abc5019;
|
|
109
78
|
}));
|
|
110
|
-
return
|
|
79
|
+
return root_23a4f055a2904f1fa5d72b30cc2abc501c;
|
|
111
80
|
})();
|
|
112
81
|
});
|
|
113
82
|
});
|
|
114
|
-
return
|
|
83
|
+
return root_23a4f055a2904f1fa5d72b30cc2abc501g;
|
|
115
84
|
})();
|
|
116
85
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as template_23a4f055a2904f1fa5d72b30cc2abc501 from '@esportsplus/template';
|
|
2
2
|
import './scss/index.scss';
|
|
3
|
-
const
|
|
3
|
+
const template_23a4f055a2904f1fa5d72b30cc2abc501l = template_23a4f055a2904f1fa5d72b30cc2abc501.template(`<div class='ellipsis'><span></span><span></span><span></span></div>`);
|
|
4
4
|
export default (attributes) => {
|
|
5
|
-
let
|
|
6
|
-
|
|
7
|
-
return
|
|
5
|
+
let root_23a4f055a2904f1fa5d72b30cc2abc501k = template_23a4f055a2904f1fa5d72b30cc2abc501l(), element_23a4f055a2904f1fa5d72b30cc2abc501m = root_23a4f055a2904f1fa5d72b30cc2abc501k.firstChild;
|
|
6
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.setProperties(element_23a4f055a2904f1fa5d72b30cc2abc501m, attributes);
|
|
7
|
+
return root_23a4f055a2904f1fa5d72b30cc2abc501k;
|
|
8
8
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import response from '@esportsplus/action';
|
|
2
|
-
import * as
|
|
2
|
+
import * as template_23a4f055a2904f1fa5d72b30cc2abc501 from '@esportsplus/template';
|
|
3
3
|
import { omit } from '@esportsplus/utilities';
|
|
4
4
|
import input from './input.js';
|
|
5
|
-
const
|
|
5
|
+
const template_23a4f055a2904f1fa5d72b30cc2abc501o = template_23a4f055a2904f1fa5d72b30cc2abc501.template(`<form
|
|
6
6
|
class='form'><!--$--></form>`);
|
|
7
7
|
const OMIT = ['action', 'state'];
|
|
8
8
|
function parse(input) {
|
|
@@ -30,9 +30,9 @@ function parse(input) {
|
|
|
30
30
|
export default (attributes, content) => {
|
|
31
31
|
let { action, state } = attributes;
|
|
32
32
|
return (() => {
|
|
33
|
-
let
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
let root_23a4f055a2904f1fa5d72b30cc2abc501n = template_23a4f055a2904f1fa5d72b30cc2abc501o(), element_23a4f055a2904f1fa5d72b30cc2abc501p = root_23a4f055a2904f1fa5d72b30cc2abc501n.firstChild, element_23a4f055a2904f1fa5d72b30cc2abc501q = element_23a4f055a2904f1fa5d72b30cc2abc501p.firstChild;
|
|
34
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.setProperties(element_23a4f055a2904f1fa5d72b30cc2abc501p, omit(attributes, OMIT));
|
|
35
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.delegate(element_23a4f055a2904f1fa5d72b30cc2abc501p, 'click', function (event) {
|
|
36
36
|
let trigger = event.target;
|
|
37
37
|
if (trigger?.type !== 'submit') {
|
|
38
38
|
return;
|
|
@@ -40,7 +40,7 @@ export default (attributes, content) => {
|
|
|
40
40
|
event.preventDefault();
|
|
41
41
|
this.dispatchEvent(new SubmitEvent('submit', { cancelable: true, bubbles: true, submitter: trigger }));
|
|
42
42
|
});
|
|
43
|
-
|
|
43
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.on(element_23a4f055a2904f1fa5d72b30cc2abc501p, 'submit', async function (event) {
|
|
44
44
|
event.preventDefault();
|
|
45
45
|
if (state) {
|
|
46
46
|
state.processing = true;
|
|
@@ -60,7 +60,7 @@ export default (attributes, content) => {
|
|
|
60
60
|
state.processing = false;
|
|
61
61
|
}
|
|
62
62
|
});
|
|
63
|
-
|
|
64
|
-
return
|
|
63
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.slot(element_23a4f055a2904f1fa5d72b30cc2abc501q, content);
|
|
64
|
+
return root_23a4f055a2904f1fa5d72b30cc2abc501n;
|
|
65
65
|
})();
|
|
66
66
|
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as template_23a4f055a2904f1fa5d72b30cc2abc501 from '@esportsplus/template';
|
|
2
2
|
import './scss/index.scss';
|
|
3
3
|
declare const _default: {
|
|
4
4
|
(): ReturnType<(this: {
|
|
5
|
-
attributes?:
|
|
6
|
-
content?:
|
|
7
|
-
}, attributes: Readonly<
|
|
8
|
-
<T extends
|
|
9
|
-
attributes?:
|
|
10
|
-
content?:
|
|
11
|
-
}, attributes: Readonly<
|
|
12
|
-
<T extends
|
|
13
|
-
attributes?:
|
|
14
|
-
content?:
|
|
15
|
-
}, attributes: Readonly<
|
|
16
|
-
(attributes:
|
|
17
|
-
attributes?:
|
|
18
|
-
content?:
|
|
19
|
-
}, attributes: Readonly<
|
|
5
|
+
attributes?: template_23a4f055a2904f1fa5d72b30cc2abc501.Attributes | undefined;
|
|
6
|
+
content?: template_23a4f055a2904f1fa5d72b30cc2abc501.Renderable<any>;
|
|
7
|
+
}, attributes: Readonly<template_23a4f055a2904f1fa5d72b30cc2abc501.Attributes>, content: template_23a4f055a2904f1fa5d72b30cc2abc501.Renderable<any>) => template_23a4f055a2904f1fa5d72b30cc2abc501.Renderable<any>>;
|
|
8
|
+
<T extends template_23a4f055a2904f1fa5d72b30cc2abc501.Attributes>(attributes: T): ReturnType<(this: {
|
|
9
|
+
attributes?: template_23a4f055a2904f1fa5d72b30cc2abc501.Attributes | undefined;
|
|
10
|
+
content?: template_23a4f055a2904f1fa5d72b30cc2abc501.Renderable<any>;
|
|
11
|
+
}, attributes: Readonly<template_23a4f055a2904f1fa5d72b30cc2abc501.Attributes>, content: template_23a4f055a2904f1fa5d72b30cc2abc501.Renderable<any>) => template_23a4f055a2904f1fa5d72b30cc2abc501.Renderable<any>>;
|
|
12
|
+
<T extends template_23a4f055a2904f1fa5d72b30cc2abc501.Renderable<any>>(content: T): ReturnType<(this: {
|
|
13
|
+
attributes?: template_23a4f055a2904f1fa5d72b30cc2abc501.Attributes | undefined;
|
|
14
|
+
content?: template_23a4f055a2904f1fa5d72b30cc2abc501.Renderable<any>;
|
|
15
|
+
}, attributes: Readonly<template_23a4f055a2904f1fa5d72b30cc2abc501.Attributes>, content: template_23a4f055a2904f1fa5d72b30cc2abc501.Renderable<any>) => template_23a4f055a2904f1fa5d72b30cc2abc501.Renderable<any>>;
|
|
16
|
+
(attributes: template_23a4f055a2904f1fa5d72b30cc2abc501.Attributes, content: template_23a4f055a2904f1fa5d72b30cc2abc501.Renderable<any>): ReturnType<(this: {
|
|
17
|
+
attributes?: template_23a4f055a2904f1fa5d72b30cc2abc501.Attributes | undefined;
|
|
18
|
+
content?: template_23a4f055a2904f1fa5d72b30cc2abc501.Renderable<any>;
|
|
19
|
+
}, attributes: Readonly<template_23a4f055a2904f1fa5d72b30cc2abc501.Attributes>, content: template_23a4f055a2904f1fa5d72b30cc2abc501.Renderable<any>) => template_23a4f055a2904f1fa5d72b30cc2abc501.Renderable<any>>;
|
|
20
20
|
};
|
|
21
21
|
export default _default;
|
|
@@ -1,21 +1,9 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as template_23a4f055a2904f1fa5d72b30cc2abc501 from '@esportsplus/template';
|
|
2
|
+
import { reactive } 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
|
|
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
|
+
const template_23a4f055a2904f1fa5d72b30cc2abc501s = template_23a4f055a2904f1fa5d72b30cc2abc501.template(`<div class='highlight'><!--$--></div>`);
|
|
19
7
|
const OMIT = ['background'];
|
|
20
8
|
let key = Symbol(), observer = null;
|
|
21
9
|
export default template.factory((attributes, content) => {
|
|
@@ -38,19 +26,21 @@ export default template.factory((attributes, content) => {
|
|
|
38
26
|
}
|
|
39
27
|
}, { threshold: 1 });
|
|
40
28
|
}
|
|
41
|
-
let state =
|
|
29
|
+
let state = reactive({
|
|
30
|
+
highlight: 0
|
|
31
|
+
});
|
|
42
32
|
return (() => {
|
|
43
|
-
let
|
|
44
|
-
|
|
45
|
-
|
|
33
|
+
let root_23a4f055a2904f1fa5d72b30cc2abc501r = template_23a4f055a2904f1fa5d72b30cc2abc501s(), element_23a4f055a2904f1fa5d72b30cc2abc501t = root_23a4f055a2904f1fa5d72b30cc2abc501r.firstChild, element_23a4f055a2904f1fa5d72b30cc2abc501u = element_23a4f055a2904f1fa5d72b30cc2abc501t.firstChild;
|
|
34
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.setProperties(element_23a4f055a2904f1fa5d72b30cc2abc501t, omit(attributes, OMIT));
|
|
35
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.onrender(element_23a4f055a2904f1fa5d72b30cc2abc501t, (element) => {
|
|
46
36
|
element[key] = state;
|
|
47
37
|
observer.observe(element);
|
|
48
38
|
});
|
|
49
|
-
|
|
39
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.setStyle(element_23a4f055a2904f1fa5d72b30cc2abc501t, '', [
|
|
50
40
|
() => `--highlight: ${state.highlight}`,
|
|
51
41
|
`--background: ${attributes.background}`,
|
|
52
42
|
]);
|
|
53
|
-
|
|
54
|
-
return
|
|
43
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.slot(element_23a4f055a2904f1fa5d72b30cc2abc501u, content);
|
|
44
|
+
return root_23a4f055a2904f1fa5d72b30cc2abc501r;
|
|
55
45
|
})();
|
|
56
46
|
});
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as template_23a4f055a2904f1fa5d72b30cc2abc501 from '@esportsplus/template';
|
|
2
2
|
import './scss/index.scss';
|
|
3
3
|
declare const _default: {
|
|
4
4
|
(): ReturnType<(this: {
|
|
5
|
-
attributes?:
|
|
5
|
+
attributes?: template_23a4f055a2904f1fa5d72b30cc2abc501.Attributes | undefined;
|
|
6
6
|
content?: string | undefined;
|
|
7
|
-
}, attributes: Readonly<
|
|
8
|
-
<T extends
|
|
9
|
-
attributes?:
|
|
7
|
+
}, attributes: Readonly<template_23a4f055a2904f1fa5d72b30cc2abc501.Attributes>, content: string) => template_23a4f055a2904f1fa5d72b30cc2abc501.Renderable<any>>;
|
|
8
|
+
<T extends template_23a4f055a2904f1fa5d72b30cc2abc501.Attributes>(attributes: T): ReturnType<(this: {
|
|
9
|
+
attributes?: template_23a4f055a2904f1fa5d72b30cc2abc501.Attributes | undefined;
|
|
10
10
|
content?: string | undefined;
|
|
11
|
-
}, attributes: Readonly<
|
|
11
|
+
}, attributes: Readonly<template_23a4f055a2904f1fa5d72b30cc2abc501.Attributes>, content: string) => template_23a4f055a2904f1fa5d72b30cc2abc501.Renderable<any>>;
|
|
12
12
|
<T extends string>(content: T): ReturnType<(this: {
|
|
13
|
-
attributes?:
|
|
13
|
+
attributes?: template_23a4f055a2904f1fa5d72b30cc2abc501.Attributes | undefined;
|
|
14
14
|
content?: string | undefined;
|
|
15
|
-
}, attributes: Readonly<
|
|
16
|
-
(attributes:
|
|
17
|
-
attributes?:
|
|
15
|
+
}, attributes: Readonly<template_23a4f055a2904f1fa5d72b30cc2abc501.Attributes>, content: string) => template_23a4f055a2904f1fa5d72b30cc2abc501.Renderable<any>>;
|
|
16
|
+
(attributes: template_23a4f055a2904f1fa5d72b30cc2abc501.Attributes, content: string): ReturnType<(this: {
|
|
17
|
+
attributes?: template_23a4f055a2904f1fa5d72b30cc2abc501.Attributes | undefined;
|
|
18
18
|
content?: string | undefined;
|
|
19
|
-
}, attributes: Readonly<
|
|
19
|
+
}, attributes: Readonly<template_23a4f055a2904f1fa5d72b30cc2abc501.Attributes>, content: string) => template_23a4f055a2904f1fa5d72b30cc2abc501.Renderable<any>>;
|
|
20
20
|
};
|
|
21
21
|
export default _default;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as template_23a4f055a2904f1fa5d72b30cc2abc501 from '@esportsplus/template';
|
|
2
2
|
import { svg } from '@esportsplus/template';
|
|
3
3
|
import template from '../../components/template/index.js';
|
|
4
4
|
import './scss/index.scss';
|
|
5
|
-
const
|
|
5
|
+
const template_23a4f055a2904f1fa5d72b30cc2abc501w = template_23a4f055a2904f1fa5d72b30cc2abc501.template(`<div class='icon'><!--$--></div>`);
|
|
6
6
|
export default template.factory((attributes, icon) => {
|
|
7
7
|
return (() => {
|
|
8
|
-
let
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return
|
|
8
|
+
let root_23a4f055a2904f1fa5d72b30cc2abc501v = template_23a4f055a2904f1fa5d72b30cc2abc501w(), element_23a4f055a2904f1fa5d72b30cc2abc501x = root_23a4f055a2904f1fa5d72b30cc2abc501v.firstChild, element_23a4f055a2904f1fa5d72b30cc2abc501y = element_23a4f055a2904f1fa5d72b30cc2abc501x.firstChild;
|
|
9
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.setProperties(element_23a4f055a2904f1fa5d72b30cc2abc501x, attributes);
|
|
10
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.slot(element_23a4f055a2904f1fa5d72b30cc2abc501y, svg.sprite(icon));
|
|
11
|
+
return root_23a4f055a2904f1fa5d72b30cc2abc501v;
|
|
12
12
|
})();
|
|
13
13
|
});
|
|
@@ -1,45 +1,29 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as template_23a4f055a2904f1fa5d72b30cc2abc501 from '@esportsplus/template';
|
|
2
|
+
import { reactive } from '@esportsplus/template';
|
|
3
3
|
import form from '../../components/form/index.js';
|
|
4
4
|
import './scss/index.scss';
|
|
5
|
-
const
|
|
5
|
+
const template_23a4f055a2904f1fa5d72b30cc2abc5020 = template_23a4f055a2904f1fa5d72b30cc2abc501.template(`<input
|
|
6
6
|
class='input'
|
|
7
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
|
-
}
|
|
27
8
|
export default function (attributes) {
|
|
28
|
-
let state = attributes.state ||
|
|
9
|
+
let state = attributes.state || reactive({
|
|
10
|
+
active: false,
|
|
11
|
+
error: ''
|
|
12
|
+
});
|
|
29
13
|
return (() => {
|
|
30
|
-
let
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
14
|
+
let root_23a4f055a2904f1fa5d72b30cc2abc501z = template_23a4f055a2904f1fa5d72b30cc2abc5020(), element_23a4f055a2904f1fa5d72b30cc2abc5021 = root_23a4f055a2904f1fa5d72b30cc2abc501z.firstChild;
|
|
15
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.setProperties(element_23a4f055a2904f1fa5d72b30cc2abc5021, this?.attributes);
|
|
16
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.setProperties(element_23a4f055a2904f1fa5d72b30cc2abc5021, attributes);
|
|
17
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.setClass(element_23a4f055a2904f1fa5d72b30cc2abc5021, '', () => state.active && '--active');
|
|
18
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.on(element_23a4f055a2904f1fa5d72b30cc2abc5021, 'focusin', () => {
|
|
35
19
|
state.active = true;
|
|
36
20
|
});
|
|
37
|
-
|
|
21
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.on(element_23a4f055a2904f1fa5d72b30cc2abc5021, 'focusout', () => {
|
|
38
22
|
state.active = false;
|
|
39
23
|
});
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
return
|
|
24
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.onrender(element_23a4f055a2904f1fa5d72b30cc2abc5021, form.input.onrender(state));
|
|
25
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.setProperty(element_23a4f055a2904f1fa5d72b30cc2abc5021, 'type', (attributes.type || 'text'));
|
|
26
|
+
return root_23a4f055a2904f1fa5d72b30cc2abc501z;
|
|
43
27
|
})();
|
|
44
28
|
}
|
|
45
29
|
;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as template_23a4f055a2904f1fa5d72b30cc2abc501 from '@esportsplus/template';
|
|
2
2
|
import './scss/index.scss';
|
|
3
3
|
declare const _default: {
|
|
4
4
|
(): ReturnType<(this: {
|
|
5
|
-
attributes?:
|
|
6
|
-
content?:
|
|
7
|
-
}, attributes: Readonly<
|
|
8
|
-
<T extends
|
|
9
|
-
attributes?:
|
|
10
|
-
content?:
|
|
11
|
-
}, attributes: Readonly<
|
|
12
|
-
<T extends
|
|
13
|
-
attributes?:
|
|
14
|
-
content?:
|
|
15
|
-
}, attributes: Readonly<
|
|
16
|
-
(attributes:
|
|
17
|
-
attributes?:
|
|
18
|
-
content?:
|
|
19
|
-
}, attributes: Readonly<
|
|
5
|
+
attributes?: template_23a4f055a2904f1fa5d72b30cc2abc501.Attributes | undefined;
|
|
6
|
+
content?: template_23a4f055a2904f1fa5d72b30cc2abc501.Renderable<any>;
|
|
7
|
+
}, attributes: Readonly<template_23a4f055a2904f1fa5d72b30cc2abc501.Attributes>, content: template_23a4f055a2904f1fa5d72b30cc2abc501.Renderable<any>) => template_23a4f055a2904f1fa5d72b30cc2abc501.Renderable<any>>;
|
|
8
|
+
<T extends template_23a4f055a2904f1fa5d72b30cc2abc501.Attributes>(attributes: T): ReturnType<(this: {
|
|
9
|
+
attributes?: template_23a4f055a2904f1fa5d72b30cc2abc501.Attributes | undefined;
|
|
10
|
+
content?: template_23a4f055a2904f1fa5d72b30cc2abc501.Renderable<any>;
|
|
11
|
+
}, attributes: Readonly<template_23a4f055a2904f1fa5d72b30cc2abc501.Attributes>, content: template_23a4f055a2904f1fa5d72b30cc2abc501.Renderable<any>) => template_23a4f055a2904f1fa5d72b30cc2abc501.Renderable<any>>;
|
|
12
|
+
<T extends template_23a4f055a2904f1fa5d72b30cc2abc501.Renderable<any>>(content: T): ReturnType<(this: {
|
|
13
|
+
attributes?: template_23a4f055a2904f1fa5d72b30cc2abc501.Attributes | undefined;
|
|
14
|
+
content?: template_23a4f055a2904f1fa5d72b30cc2abc501.Renderable<any>;
|
|
15
|
+
}, attributes: Readonly<template_23a4f055a2904f1fa5d72b30cc2abc501.Attributes>, content: template_23a4f055a2904f1fa5d72b30cc2abc501.Renderable<any>) => template_23a4f055a2904f1fa5d72b30cc2abc501.Renderable<any>>;
|
|
16
|
+
(attributes: template_23a4f055a2904f1fa5d72b30cc2abc501.Attributes, content: template_23a4f055a2904f1fa5d72b30cc2abc501.Renderable<any>): ReturnType<(this: {
|
|
17
|
+
attributes?: template_23a4f055a2904f1fa5d72b30cc2abc501.Attributes | undefined;
|
|
18
|
+
content?: template_23a4f055a2904f1fa5d72b30cc2abc501.Renderable<any>;
|
|
19
|
+
}, attributes: Readonly<template_23a4f055a2904f1fa5d72b30cc2abc501.Attributes>, content: template_23a4f055a2904f1fa5d72b30cc2abc501.Renderable<any>) => template_23a4f055a2904f1fa5d72b30cc2abc501.Renderable<any>>;
|
|
20
20
|
};
|
|
21
21
|
export default _default;
|