@esportsplus/ui 0.48.0 → 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/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 +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as template_23a4f055a2904f1fa5d72b30cc2abc501 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_23a4f055a2904f1fa5d72b30cc2abc502p = template_23a4f055a2904f1fa5d72b30cc2abc501.template(`<div
|
|
10
10
|
class='link select-option '><!--$--></div>`);
|
|
11
|
-
const
|
|
11
|
+
const template_23a4f055a2904f1fa5d72b30cc2abc502t = template_23a4f055a2904f1fa5d72b30cc2abc501.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_23a4f055a2904f1fa5d72b30cc2abc502s = template_23a4f055a2904f1fa5d72b30cc2abc502t(), element_23a4f055a2904f1fa5d72b30cc2abc502u = root_23a4f055a2904f1fa5d72b30cc2abc502s.firstChild, element_23a4f055a2904f1fa5d72b30cc2abc502v = element_23a4f055a2904f1fa5d72b30cc2abc502u.firstChild, element_23a4f055a2904f1fa5d72b30cc2abc502w = element_23a4f055a2904f1fa5d72b30cc2abc502u.firstElementChild, element_23a4f055a2904f1fa5d72b30cc2abc502x = element_23a4f055a2904f1fa5d72b30cc2abc502w.nextElementSibling, element_23a4f055a2904f1fa5d72b30cc2abc502y = element_23a4f055a2904f1fa5d72b30cc2abc502v.nextSibling.nextSibling.nextSibling;
|
|
58
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.setClass(element_23a4f055a2904f1fa5d72b30cc2abc502u, ' ', () => state.active && '--active');
|
|
59
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.setProperties(element_23a4f055a2904f1fa5d72b30cc2abc502u, this?.attributes && omit(this.attributes, OMIT));
|
|
60
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.setProperties(element_23a4f055a2904f1fa5d72b30cc2abc502u, omit(attributes, OMIT));
|
|
61
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.delegate(element_23a4f055a2904f1fa5d72b30cc2abc502u, '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_23a4f055a2904f1fa5d72b30cc2abc501.EffectSlot(element_23a4f055a2904f1fa5d72b30cc2abc502v, 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_23a4f055a2904f1fa5d72b30cc2abc501.setProperties(element_23a4f055a2904f1fa5d72b30cc2abc502w, this?.attributes?.arrow);
|
|
78
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.setProperties(element_23a4f055a2904f1fa5d72b30cc2abc502w, attributes.arrow);
|
|
79
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.setProperty(element_23a4f055a2904f1fa5d72b30cc2abc502x, 'name', attributes.name);
|
|
80
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.delegate(element_23a4f055a2904f1fa5d72b30cc2abc502x, 'click', () => { });
|
|
81
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.onrender(element_23a4f055a2904f1fa5d72b30cc2abc502x, form.input.onrender(state));
|
|
82
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.setProperty(element_23a4f055a2904f1fa5d72b30cc2abc502x, 'value', () => state.selected);
|
|
83
|
+
new template_23a4f055a2904f1fa5d72b30cc2abc501.EffectSlot(element_23a4f055a2904f1fa5d72b30cc2abc502y, () => {
|
|
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_23a4f055a2904f1fa5d72b30cc2abc502o = template_23a4f055a2904f1fa5d72b30cc2abc502p(), element_23a4f055a2904f1fa5d72b30cc2abc502q = root_23a4f055a2904f1fa5d72b30cc2abc502o.firstChild, element_23a4f055a2904f1fa5d72b30cc2abc502r = element_23a4f055a2904f1fa5d72b30cc2abc502q.firstChild;
|
|
127
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.setClass(element_23a4f055a2904f1fa5d72b30cc2abc502q, ' ', () => selected[key] && '--active');
|
|
128
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.setProperties(element_23a4f055a2904f1fa5d72b30cc2abc502q, this?.attributes?.option);
|
|
129
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.setProperties(element_23a4f055a2904f1fa5d72b30cc2abc502q, option);
|
|
130
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.setProperty(element_23a4f055a2904f1fa5d72b30cc2abc502q, 'data-key', key);
|
|
131
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.slot(element_23a4f055a2904f1fa5d72b30cc2abc502r, content);
|
|
132
|
+
return root_23a4f055a2904f1fa5d72b30cc2abc502o;
|
|
133
133
|
})();
|
|
134
134
|
}));
|
|
135
135
|
});
|
|
136
|
-
return
|
|
136
|
+
return root_23a4f055a2904f1fa5d72b30cc2abc502s;
|
|
137
137
|
})();
|
|
138
138
|
});
|
|
139
139
|
export default select;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as template_23a4f055a2904f1fa5d72b30cc2abc501 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_23a4f055a2904f1fa5d72b30cc2abc5030 = template_23a4f055a2904f1fa5d72b30cc2abc501.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_23a4f055a2904f1fa5d72b30cc2abc502z = template_23a4f055a2904f1fa5d72b30cc2abc5030(), element_23a4f055a2904f1fa5d72b30cc2abc5031 = root_23a4f055a2904f1fa5d72b30cc2abc502z.firstChild;
|
|
16
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.setProperties(element_23a4f055a2904f1fa5d72b30cc2abc5031, this?.attributes && omit(this.attributes, OMIT));
|
|
17
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.setProperties(element_23a4f055a2904f1fa5d72b30cc2abc5031, omit(attributes, OMIT));
|
|
18
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.setClass(element_23a4f055a2904f1fa5d72b30cc2abc5031, '', () => state.active && '--active');
|
|
19
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.on(element_23a4f055a2904f1fa5d72b30cc2abc5031, 'focusin', () => {
|
|
20
20
|
state.active = true;
|
|
21
21
|
});
|
|
22
|
-
|
|
22
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.on(element_23a4f055a2904f1fa5d72b30cc2abc5031, 'focusout', () => {
|
|
23
23
|
state.active = false;
|
|
24
24
|
});
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return
|
|
25
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.onrender(element_23a4f055a2904f1fa5d72b30cc2abc5031, form.input.onrender(state));
|
|
26
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.setProperty(element_23a4f055a2904f1fa5d72b30cc2abc5031, 'value', attributes?.value || '');
|
|
27
|
+
return root_23a4f055a2904f1fa5d72b30cc2abc502z;
|
|
28
28
|
})();
|
|
29
29
|
}
|
|
30
30
|
;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as template_23a4f055a2904f1fa5d72b30cc2abc501 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_23a4f055a2904f1fa5d72b30cc2abc501.Renderable<any>;
|
|
20
|
+
}, attributes: Readonly<A>, content: template_23a4f055a2904f1fa5d72b30cc2abc501.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_23a4f055a2904f1fa5d72b30cc2abc501.Renderable<any>;
|
|
24
|
+
}, attributes: Readonly<A>, content: template_23a4f055a2904f1fa5d72b30cc2abc501.Renderable<any>) => Renderable<any>>;
|
|
25
|
+
<T extends template_23a4f055a2904f1fa5d72b30cc2abc501.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_23a4f055a2904f1fa5d72b30cc2abc501.Renderable<any>;
|
|
28
|
+
}, attributes: Readonly<A>, content: template_23a4f055a2904f1fa5d72b30cc2abc501.Renderable<any>) => Renderable<any>>;
|
|
29
|
+
(attributes: A, content: template_23a4f055a2904f1fa5d72b30cc2abc501.Renderable<any>): ReturnType<(this: {
|
|
30
30
|
attributes?: A | undefined;
|
|
31
|
-
content?:
|
|
32
|
-
}, attributes: Readonly<A>, content:
|
|
31
|
+
content?: template_23a4f055a2904f1fa5d72b30cc2abc501.Renderable<any>;
|
|
32
|
+
}, attributes: Readonly<A>, content: template_23a4f055a2904f1fa5d72b30cc2abc501.Renderable<any>) => Renderable<any>>;
|
|
33
33
|
};
|
|
34
34
|
export default _default;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as template_23a4f055a2904f1fa5d72b30cc2abc501 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_23a4f055a2904f1fa5d72b30cc2abc5033 = template_23a4f055a2904f1fa5d72b30cc2abc501.template(`<a
|
|
6
6
|
class='link --width-full'
|
|
7
7
|
target='_blank'><!--$--></a>`);
|
|
8
|
-
const
|
|
8
|
+
const template_23a4f055a2904f1fa5d72b30cc2abc5037 = template_23a4f055a2904f1fa5d72b30cc2abc501.template(`<div
|
|
9
9
|
class='link --width-full'><!--$--></div>`);
|
|
10
|
-
const
|
|
10
|
+
const template_23a4f055a2904f1fa5d72b30cc2abc503b = template_23a4f055a2904f1fa5d72b30cc2abc501.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_23a4f055a2904f1fa5d72b30cc2abc503a = template_23a4f055a2904f1fa5d72b30cc2abc503b(), element_23a4f055a2904f1fa5d72b30cc2abc503c = root_23a4f055a2904f1fa5d72b30cc2abc503a.firstChild, element_23a4f055a2904f1fa5d72b30cc2abc503d = element_23a4f055a2904f1fa5d72b30cc2abc503c.nextSibling, element_23a4f055a2904f1fa5d72b30cc2abc503e = element_23a4f055a2904f1fa5d72b30cc2abc503d.firstChild;
|
|
19
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.slot(element_23a4f055a2904f1fa5d72b30cc2abc503c, content);
|
|
20
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.setClass(element_23a4f055a2904f1fa5d72b30cc2abc503d, ' ', `tooltip-content--${tooltipContentDirection}`);
|
|
21
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.setProperties(element_23a4f055a2904f1fa5d72b30cc2abc503d, tooltipContent && omit(tooltipContent, OMIT_TOOLTIP_CONTENT));
|
|
22
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.slot(element_23a4f055a2904f1fa5d72b30cc2abc503e, options.map((o) => {
|
|
23
23
|
if (o.href) {
|
|
24
24
|
return (() => {
|
|
25
|
-
let
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
return
|
|
25
|
+
let root_23a4f055a2904f1fa5d72b30cc2abc5032 = template_23a4f055a2904f1fa5d72b30cc2abc5033(), element_23a4f055a2904f1fa5d72b30cc2abc5034 = root_23a4f055a2904f1fa5d72b30cc2abc5032.firstChild, element_23a4f055a2904f1fa5d72b30cc2abc5035 = element_23a4f055a2904f1fa5d72b30cc2abc5034.firstChild;
|
|
26
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.setProperties(element_23a4f055a2904f1fa5d72b30cc2abc5034, omit(o, OMIT_OPTION));
|
|
27
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.setProperties(element_23a4f055a2904f1fa5d72b30cc2abc5034, option);
|
|
28
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.slot(element_23a4f055a2904f1fa5d72b30cc2abc5035, o.content);
|
|
29
|
+
return root_23a4f055a2904f1fa5d72b30cc2abc5032;
|
|
30
30
|
})();
|
|
31
31
|
}
|
|
32
32
|
return (() => {
|
|
33
|
-
let
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
return
|
|
33
|
+
let root_23a4f055a2904f1fa5d72b30cc2abc5036 = template_23a4f055a2904f1fa5d72b30cc2abc5037(), element_23a4f055a2904f1fa5d72b30cc2abc5038 = root_23a4f055a2904f1fa5d72b30cc2abc5036.firstChild, element_23a4f055a2904f1fa5d72b30cc2abc5039 = element_23a4f055a2904f1fa5d72b30cc2abc5038.firstChild;
|
|
34
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.setProperties(element_23a4f055a2904f1fa5d72b30cc2abc5038, omit(o, OMIT_OPTION));
|
|
35
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.setProperties(element_23a4f055a2904f1fa5d72b30cc2abc5038, option);
|
|
36
|
+
template_23a4f055a2904f1fa5d72b30cc2abc501.slot(element_23a4f055a2904f1fa5d72b30cc2abc5039, o.content);
|
|
37
|
+
return root_23a4f055a2904f1fa5d72b30cc2abc5036;
|
|
38
38
|
})();
|
|
39
39
|
}));
|
|
40
|
-
return
|
|
40
|
+
return root_23a4f055a2904f1fa5d72b30cc2abc503a;
|
|
41
41
|
})());
|
|
42
42
|
});
|