@esportsplus/ui 0.48.1 → 0.48.3
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 +9 -9
- package/build/components/alert/index.js +26 -26
- 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 +15 -15
- package/build/components/checkbox/index.js +14 -14
- package/build/components/clipboard/onclick.js +7 -7
- package/build/components/counter/index.js +20 -20
- 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 +8 -8
- package/build/components/icon/index.d.ts +11 -11
- package/build/components/icon/index.js +6 -6
- package/build/components/input/index.js +11 -11
- package/build/components/loader/index.d.ts +16 -16
- package/build/components/loader/index.js +20 -20
- package/build/components/loading/index.js +5 -5
- package/build/components/range/index.js +13 -13
- package/build/components/scrollbar/index.d.ts +11 -11
- package/build/components/scrollbar/index.js +14 -14
- package/build/components/select/index.js +24 -24
- package/build/components/textarea/index.js +11 -11
- 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 +8 -8
- package/build/components/tooltip/onhover.d.ts +16 -16
- package/build/components/tooltip/onhover.js +9 -9
- package/build/components/typewriter/index.d.ts +11 -11
- package/build/components/typewriter/index.js +8 -8
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as template_1995aa1ec679424a8d082c2afd298cae1 from '@esportsplus/template';
|
|
2
2
|
import { reactive } from '@esportsplus/template';
|
|
3
3
|
import { EMPTY_ARRAY, omit, toArray } from '@esportsplus/utilities';
|
|
4
4
|
import form from '../../components/form/index.js';
|
|
@@ -6,9 +6,9 @@ import root from '../../components/root/index.js';
|
|
|
6
6
|
import scrollbar from '../../components/scrollbar/index.js';
|
|
7
7
|
import template from '../../components/template/index.js';
|
|
8
8
|
import './scss/index.scss';
|
|
9
|
-
const
|
|
9
|
+
const template_1995aa1ec679424a8d082c2afd298cae2p = template_1995aa1ec679424a8d082c2afd298cae1.template(`<div
|
|
10
10
|
class='link select-option '><!--$--></div>`);
|
|
11
|
-
const
|
|
11
|
+
const template_1995aa1ec679424a8d082c2afd298cae2t = template_1995aa1ec679424a8d082c2afd298cae1.template(`<div
|
|
12
12
|
class='select tooltip '><!--$--><div class='select-arrow'></div><input class='select-tag'
|
|
13
13
|
/><!--$--></div>`);
|
|
14
14
|
const OMIT = [
|
|
@@ -54,17 +54,17 @@ const select = template.factory(function (attributes, content) {
|
|
|
54
54
|
selected: attributes.selected || Object.keys(options)[0]
|
|
55
55
|
});
|
|
56
56
|
return (() => {
|
|
57
|
-
let
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
57
|
+
let root_1995aa1ec679424a8d082c2afd298cae2s = template_1995aa1ec679424a8d082c2afd298cae2t(), element_1995aa1ec679424a8d082c2afd298cae2u = root_1995aa1ec679424a8d082c2afd298cae2s.firstChild, element_1995aa1ec679424a8d082c2afd298cae2v = element_1995aa1ec679424a8d082c2afd298cae2u.firstChild, element_1995aa1ec679424a8d082c2afd298cae2w = element_1995aa1ec679424a8d082c2afd298cae2u.firstElementChild, element_1995aa1ec679424a8d082c2afd298cae2x = element_1995aa1ec679424a8d082c2afd298cae2w.nextElementSibling, element_1995aa1ec679424a8d082c2afd298cae2y = element_1995aa1ec679424a8d082c2afd298cae2v.nextSibling.nextSibling.nextSibling;
|
|
58
|
+
template_1995aa1ec679424a8d082c2afd298cae1.setClass(element_1995aa1ec679424a8d082c2afd298cae2u, ' ', () => state.active && '--active');
|
|
59
|
+
template_1995aa1ec679424a8d082c2afd298cae1.setProperties(element_1995aa1ec679424a8d082c2afd298cae2u, this?.attributes && omit(this.attributes, OMIT));
|
|
60
|
+
template_1995aa1ec679424a8d082c2afd298cae1.setProperties(element_1995aa1ec679424a8d082c2afd298cae2u, omit(attributes, OMIT));
|
|
61
|
+
template_1995aa1ec679424a8d082c2afd298cae1.delegate(element_1995aa1ec679424a8d082c2afd298cae2u, 'click', () => {
|
|
62
62
|
if (state.render) {
|
|
63
63
|
set(state, !state.active);
|
|
64
64
|
}
|
|
65
65
|
state.render = true;
|
|
66
66
|
});
|
|
67
|
-
new
|
|
67
|
+
new template_1995aa1ec679424a8d082c2afd298cae1.EffectSlot(element_1995aa1ec679424a8d082c2afd298cae2v, content ? (() => content(state)) : (() => {
|
|
68
68
|
let selected = options[state.selected];
|
|
69
69
|
if (!selected) {
|
|
70
70
|
return '-';
|
|
@@ -74,13 +74,13 @@ const select = template.factory(function (attributes, content) {
|
|
|
74
74
|
}
|
|
75
75
|
return selected;
|
|
76
76
|
}));
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
new
|
|
77
|
+
template_1995aa1ec679424a8d082c2afd298cae1.setProperties(element_1995aa1ec679424a8d082c2afd298cae2w, this?.attributes?.arrow);
|
|
78
|
+
template_1995aa1ec679424a8d082c2afd298cae1.setProperties(element_1995aa1ec679424a8d082c2afd298cae2w, attributes.arrow);
|
|
79
|
+
template_1995aa1ec679424a8d082c2afd298cae1.setProperty(element_1995aa1ec679424a8d082c2afd298cae2x, 'name', attributes.name);
|
|
80
|
+
template_1995aa1ec679424a8d082c2afd298cae1.delegate(element_1995aa1ec679424a8d082c2afd298cae2x, 'click', () => { });
|
|
81
|
+
template_1995aa1ec679424a8d082c2afd298cae1.onrender(element_1995aa1ec679424a8d082c2afd298cae2x, form.input.onrender(state));
|
|
82
|
+
template_1995aa1ec679424a8d082c2afd298cae1.setProperty(element_1995aa1ec679424a8d082c2afd298cae2x, 'value', () => state.selected);
|
|
83
|
+
new template_1995aa1ec679424a8d082c2afd298cae1.EffectSlot(element_1995aa1ec679424a8d082c2afd298cae2y, () => {
|
|
84
84
|
if (!state.render) {
|
|
85
85
|
return;
|
|
86
86
|
}
|
|
@@ -123,17 +123,17 @@ const select = template.factory(function (attributes, content) {
|
|
|
123
123
|
content = content.content;
|
|
124
124
|
}
|
|
125
125
|
return (() => {
|
|
126
|
-
let
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
return
|
|
126
|
+
let root_1995aa1ec679424a8d082c2afd298cae2o = template_1995aa1ec679424a8d082c2afd298cae2p(), element_1995aa1ec679424a8d082c2afd298cae2q = root_1995aa1ec679424a8d082c2afd298cae2o.firstChild, element_1995aa1ec679424a8d082c2afd298cae2r = element_1995aa1ec679424a8d082c2afd298cae2q.firstChild;
|
|
127
|
+
template_1995aa1ec679424a8d082c2afd298cae1.setClass(element_1995aa1ec679424a8d082c2afd298cae2q, ' ', () => selected[key] && '--active');
|
|
128
|
+
template_1995aa1ec679424a8d082c2afd298cae1.setProperties(element_1995aa1ec679424a8d082c2afd298cae2q, this?.attributes?.option);
|
|
129
|
+
template_1995aa1ec679424a8d082c2afd298cae1.setProperties(element_1995aa1ec679424a8d082c2afd298cae2q, option);
|
|
130
|
+
template_1995aa1ec679424a8d082c2afd298cae1.setProperty(element_1995aa1ec679424a8d082c2afd298cae2q, 'data-key', key);
|
|
131
|
+
template_1995aa1ec679424a8d082c2afd298cae1.slot(element_1995aa1ec679424a8d082c2afd298cae2r, content);
|
|
132
|
+
return root_1995aa1ec679424a8d082c2afd298cae2o;
|
|
133
133
|
})();
|
|
134
134
|
}));
|
|
135
135
|
});
|
|
136
|
-
return
|
|
136
|
+
return root_1995aa1ec679424a8d082c2afd298cae2s;
|
|
137
137
|
})();
|
|
138
138
|
});
|
|
139
139
|
export default select;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as template_1995aa1ec679424a8d082c2afd298cae1 from '@esportsplus/template';
|
|
2
2
|
import { reactive } from '@esportsplus/template';
|
|
3
3
|
import { omit } from '@esportsplus/utilities';
|
|
4
4
|
import form from '../../components/form/index.js';
|
|
5
5
|
import './scss/index.scss';
|
|
6
|
-
const
|
|
6
|
+
const template_1995aa1ec679424a8d082c2afd298cae30 = template_1995aa1ec679424a8d082c2afd298cae1.template(`<textarea
|
|
7
7
|
class='textarea'></textarea>`);
|
|
8
8
|
const OMIT = ['state'];
|
|
9
9
|
export default function (attributes) {
|
|
@@ -12,19 +12,19 @@ export default function (attributes) {
|
|
|
12
12
|
error: ''
|
|
13
13
|
});
|
|
14
14
|
return (() => {
|
|
15
|
-
let
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
let root_1995aa1ec679424a8d082c2afd298cae2z = template_1995aa1ec679424a8d082c2afd298cae30(), element_1995aa1ec679424a8d082c2afd298cae31 = root_1995aa1ec679424a8d082c2afd298cae2z.firstChild;
|
|
16
|
+
template_1995aa1ec679424a8d082c2afd298cae1.setProperties(element_1995aa1ec679424a8d082c2afd298cae31, this?.attributes && omit(this.attributes, OMIT));
|
|
17
|
+
template_1995aa1ec679424a8d082c2afd298cae1.setProperties(element_1995aa1ec679424a8d082c2afd298cae31, omit(attributes, OMIT));
|
|
18
|
+
template_1995aa1ec679424a8d082c2afd298cae1.setClass(element_1995aa1ec679424a8d082c2afd298cae31, '', () => state.active && '--active');
|
|
19
|
+
template_1995aa1ec679424a8d082c2afd298cae1.on(element_1995aa1ec679424a8d082c2afd298cae31, 'focusin', () => {
|
|
20
20
|
state.active = true;
|
|
21
21
|
});
|
|
22
|
-
|
|
22
|
+
template_1995aa1ec679424a8d082c2afd298cae1.on(element_1995aa1ec679424a8d082c2afd298cae31, 'focusout', () => {
|
|
23
23
|
state.active = false;
|
|
24
24
|
});
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return
|
|
25
|
+
template_1995aa1ec679424a8d082c2afd298cae1.onrender(element_1995aa1ec679424a8d082c2afd298cae31, form.input.onrender(state));
|
|
26
|
+
template_1995aa1ec679424a8d082c2afd298cae1.setProperty(element_1995aa1ec679424a8d082c2afd298cae31, 'value', attributes?.value || '');
|
|
27
|
+
return root_1995aa1ec679424a8d082c2afd298cae2z;
|
|
28
28
|
})();
|
|
29
29
|
}
|
|
30
30
|
;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as template_1995aa1ec679424a8d082c2afd298cae1 from '@esportsplus/template';
|
|
2
2
|
import { Attributes, Renderable } from '@esportsplus/template';
|
|
3
3
|
type A = Attributes & {
|
|
4
4
|
options: (Attributes & {
|
|
@@ -16,19 +16,19 @@ type A = Attributes & {
|
|
|
16
16
|
declare const _default: {
|
|
17
17
|
(): ReturnType<(this: {
|
|
18
18
|
attributes?: A | undefined;
|
|
19
|
-
content?:
|
|
20
|
-
}, attributes: Readonly<A>, content:
|
|
19
|
+
content?: template_1995aa1ec679424a8d082c2afd298cae1.Renderable<any>;
|
|
20
|
+
}, attributes: Readonly<A>, content: template_1995aa1ec679424a8d082c2afd298cae1.Renderable<any>) => Renderable<any>>;
|
|
21
21
|
<T extends A>(attributes: T): ReturnType<(this: {
|
|
22
22
|
attributes?: A | undefined;
|
|
23
|
-
content?:
|
|
24
|
-
}, attributes: Readonly<A>, content:
|
|
25
|
-
<T extends
|
|
23
|
+
content?: template_1995aa1ec679424a8d082c2afd298cae1.Renderable<any>;
|
|
24
|
+
}, attributes: Readonly<A>, content: template_1995aa1ec679424a8d082c2afd298cae1.Renderable<any>) => Renderable<any>>;
|
|
25
|
+
<T extends template_1995aa1ec679424a8d082c2afd298cae1.Renderable<any>>(content: T): ReturnType<(this: {
|
|
26
26
|
attributes?: A | undefined;
|
|
27
|
-
content?:
|
|
28
|
-
}, attributes: Readonly<A>, content:
|
|
29
|
-
(attributes: A, content:
|
|
27
|
+
content?: template_1995aa1ec679424a8d082c2afd298cae1.Renderable<any>;
|
|
28
|
+
}, attributes: Readonly<A>, content: template_1995aa1ec679424a8d082c2afd298cae1.Renderable<any>) => Renderable<any>>;
|
|
29
|
+
(attributes: A, content: template_1995aa1ec679424a8d082c2afd298cae1.Renderable<any>): ReturnType<(this: {
|
|
30
30
|
attributes?: A | undefined;
|
|
31
|
-
content?:
|
|
32
|
-
}, attributes: Readonly<A>, content:
|
|
31
|
+
content?: template_1995aa1ec679424a8d082c2afd298cae1.Renderable<any>;
|
|
32
|
+
}, attributes: Readonly<A>, content: template_1995aa1ec679424a8d082c2afd298cae1.Renderable<any>) => Renderable<any>>;
|
|
33
33
|
};
|
|
34
34
|
export default _default;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as template_1995aa1ec679424a8d082c2afd298cae1 from '@esportsplus/template';
|
|
2
2
|
import { omit } from '@esportsplus/utilities';
|
|
3
3
|
import template from '../../components/template/index.js';
|
|
4
4
|
import onclick from './onclick.js';
|
|
5
|
-
const
|
|
5
|
+
const template_1995aa1ec679424a8d082c2afd298cae33 = template_1995aa1ec679424a8d082c2afd298cae1.template(`<a
|
|
6
6
|
class='link --width-full'
|
|
7
7
|
target='_blank'><!--$--></a>`);
|
|
8
|
-
const
|
|
8
|
+
const template_1995aa1ec679424a8d082c2afd298cae37 = template_1995aa1ec679424a8d082c2afd298cae1.template(`<div
|
|
9
9
|
class='link --width-full'><!--$--></div>`);
|
|
10
|
-
const
|
|
10
|
+
const template_1995aa1ec679424a8d082c2afd298cae3b = template_1995aa1ec679424a8d082c2afd298cae1.template(`<!--$--><div
|
|
11
11
|
class='tooltip-content '><!--$--></div>`);
|
|
12
12
|
const OMIT = ['options', 'option', 'tooltip-content'];
|
|
13
13
|
const OMIT_OPTION = ['content'];
|
|
@@ -15,28 +15,28 @@ const OMIT_TOOLTIP_CONTENT = ['direction'];
|
|
|
15
15
|
export default template.factory((attributes, content) => {
|
|
16
16
|
let options = attributes.options, option = attributes.option, tooltipContent = attributes?.['tooltip-content'], tooltipContentDirection = tooltipContent?.direction || 'nw';
|
|
17
17
|
return onclick(omit(attributes, OMIT), (() => {
|
|
18
|
-
let
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
let root_1995aa1ec679424a8d082c2afd298cae3a = template_1995aa1ec679424a8d082c2afd298cae3b(), element_1995aa1ec679424a8d082c2afd298cae3c = root_1995aa1ec679424a8d082c2afd298cae3a.firstChild, element_1995aa1ec679424a8d082c2afd298cae3d = element_1995aa1ec679424a8d082c2afd298cae3c.nextSibling, element_1995aa1ec679424a8d082c2afd298cae3e = element_1995aa1ec679424a8d082c2afd298cae3d.firstChild;
|
|
19
|
+
template_1995aa1ec679424a8d082c2afd298cae1.slot(element_1995aa1ec679424a8d082c2afd298cae3c, content);
|
|
20
|
+
template_1995aa1ec679424a8d082c2afd298cae1.setClass(element_1995aa1ec679424a8d082c2afd298cae3d, ' ', `tooltip-content--${tooltipContentDirection}`);
|
|
21
|
+
template_1995aa1ec679424a8d082c2afd298cae1.setProperties(element_1995aa1ec679424a8d082c2afd298cae3d, tooltipContent && omit(tooltipContent, OMIT_TOOLTIP_CONTENT));
|
|
22
|
+
template_1995aa1ec679424a8d082c2afd298cae1.slot(element_1995aa1ec679424a8d082c2afd298cae3e, options.map((o) => {
|
|
23
23
|
if (o.href) {
|
|
24
24
|
return (() => {
|
|
25
|
-
let
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
return
|
|
25
|
+
let root_1995aa1ec679424a8d082c2afd298cae32 = template_1995aa1ec679424a8d082c2afd298cae33(), element_1995aa1ec679424a8d082c2afd298cae34 = root_1995aa1ec679424a8d082c2afd298cae32.firstChild, element_1995aa1ec679424a8d082c2afd298cae35 = element_1995aa1ec679424a8d082c2afd298cae34.firstChild;
|
|
26
|
+
template_1995aa1ec679424a8d082c2afd298cae1.setProperties(element_1995aa1ec679424a8d082c2afd298cae34, omit(o, OMIT_OPTION));
|
|
27
|
+
template_1995aa1ec679424a8d082c2afd298cae1.setProperties(element_1995aa1ec679424a8d082c2afd298cae34, option);
|
|
28
|
+
template_1995aa1ec679424a8d082c2afd298cae1.slot(element_1995aa1ec679424a8d082c2afd298cae35, o.content);
|
|
29
|
+
return root_1995aa1ec679424a8d082c2afd298cae32;
|
|
30
30
|
})();
|
|
31
31
|
}
|
|
32
32
|
return (() => {
|
|
33
|
-
let
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
return
|
|
33
|
+
let root_1995aa1ec679424a8d082c2afd298cae36 = template_1995aa1ec679424a8d082c2afd298cae37(), element_1995aa1ec679424a8d082c2afd298cae38 = root_1995aa1ec679424a8d082c2afd298cae36.firstChild, element_1995aa1ec679424a8d082c2afd298cae39 = element_1995aa1ec679424a8d082c2afd298cae38.firstChild;
|
|
34
|
+
template_1995aa1ec679424a8d082c2afd298cae1.setProperties(element_1995aa1ec679424a8d082c2afd298cae38, omit(o, OMIT_OPTION));
|
|
35
|
+
template_1995aa1ec679424a8d082c2afd298cae1.setProperties(element_1995aa1ec679424a8d082c2afd298cae38, option);
|
|
36
|
+
template_1995aa1ec679424a8d082c2afd298cae1.slot(element_1995aa1ec679424a8d082c2afd298cae39, o.content);
|
|
37
|
+
return root_1995aa1ec679424a8d082c2afd298cae36;
|
|
38
38
|
})();
|
|
39
39
|
}));
|
|
40
|
-
return
|
|
40
|
+
return root_1995aa1ec679424a8d082c2afd298cae3a;
|
|
41
41
|
})());
|
|
42
42
|
});
|