@esportsplus/ui 0.48.3 → 0.48.4
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 +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1 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_9940f1ff6ffb4f4abe1c7b9b2fa7085d2p = template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.template(`<div
|
|
10
10
|
class='link select-option '><!--$--></div>`);
|
|
11
|
-
const
|
|
11
|
+
const template_9940f1ff6ffb4f4abe1c7b9b2fa7085d2t = template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.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_9940f1ff6ffb4f4abe1c7b9b2fa7085d2s = template_9940f1ff6ffb4f4abe1c7b9b2fa7085d2t(), element_9940f1ff6ffb4f4abe1c7b9b2fa7085d2u = root_9940f1ff6ffb4f4abe1c7b9b2fa7085d2s.firstChild, element_9940f1ff6ffb4f4abe1c7b9b2fa7085d2v = element_9940f1ff6ffb4f4abe1c7b9b2fa7085d2u.firstChild, element_9940f1ff6ffb4f4abe1c7b9b2fa7085d2w = element_9940f1ff6ffb4f4abe1c7b9b2fa7085d2u.firstElementChild, element_9940f1ff6ffb4f4abe1c7b9b2fa7085d2x = element_9940f1ff6ffb4f4abe1c7b9b2fa7085d2w.nextElementSibling, element_9940f1ff6ffb4f4abe1c7b9b2fa7085d2y = element_9940f1ff6ffb4f4abe1c7b9b2fa7085d2v.nextSibling.nextSibling.nextSibling;
|
|
58
|
+
template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.setClass(element_9940f1ff6ffb4f4abe1c7b9b2fa7085d2u, ' ', () => state.active && '--active');
|
|
59
|
+
template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.setProperties(element_9940f1ff6ffb4f4abe1c7b9b2fa7085d2u, this?.attributes && omit(this.attributes, OMIT));
|
|
60
|
+
template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.setProperties(element_9940f1ff6ffb4f4abe1c7b9b2fa7085d2u, omit(attributes, OMIT));
|
|
61
|
+
template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.delegate(element_9940f1ff6ffb4f4abe1c7b9b2fa7085d2u, '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_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.EffectSlot(element_9940f1ff6ffb4f4abe1c7b9b2fa7085d2v, 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_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.setProperties(element_9940f1ff6ffb4f4abe1c7b9b2fa7085d2w, this?.attributes?.arrow);
|
|
78
|
+
template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.setProperties(element_9940f1ff6ffb4f4abe1c7b9b2fa7085d2w, attributes.arrow);
|
|
79
|
+
template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.setProperty(element_9940f1ff6ffb4f4abe1c7b9b2fa7085d2x, 'name', attributes.name);
|
|
80
|
+
template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.delegate(element_9940f1ff6ffb4f4abe1c7b9b2fa7085d2x, 'click', () => { });
|
|
81
|
+
template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.onrender(element_9940f1ff6ffb4f4abe1c7b9b2fa7085d2x, form.input.onrender(state));
|
|
82
|
+
template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.setProperty(element_9940f1ff6ffb4f4abe1c7b9b2fa7085d2x, 'value', () => state.selected);
|
|
83
|
+
new template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.EffectSlot(element_9940f1ff6ffb4f4abe1c7b9b2fa7085d2y, () => {
|
|
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_9940f1ff6ffb4f4abe1c7b9b2fa7085d2o = template_9940f1ff6ffb4f4abe1c7b9b2fa7085d2p(), element_9940f1ff6ffb4f4abe1c7b9b2fa7085d2q = root_9940f1ff6ffb4f4abe1c7b9b2fa7085d2o.firstChild, element_9940f1ff6ffb4f4abe1c7b9b2fa7085d2r = element_9940f1ff6ffb4f4abe1c7b9b2fa7085d2q.firstChild;
|
|
127
|
+
template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.setClass(element_9940f1ff6ffb4f4abe1c7b9b2fa7085d2q, ' ', () => selected[key] && '--active');
|
|
128
|
+
template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.setProperties(element_9940f1ff6ffb4f4abe1c7b9b2fa7085d2q, this?.attributes?.option);
|
|
129
|
+
template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.setProperties(element_9940f1ff6ffb4f4abe1c7b9b2fa7085d2q, option);
|
|
130
|
+
template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.setProperty(element_9940f1ff6ffb4f4abe1c7b9b2fa7085d2q, 'data-key', key);
|
|
131
|
+
template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.slot(element_9940f1ff6ffb4f4abe1c7b9b2fa7085d2r, content);
|
|
132
|
+
return root_9940f1ff6ffb4f4abe1c7b9b2fa7085d2o;
|
|
133
133
|
})();
|
|
134
134
|
}));
|
|
135
135
|
});
|
|
136
|
-
return
|
|
136
|
+
return root_9940f1ff6ffb4f4abe1c7b9b2fa7085d2s;
|
|
137
137
|
})();
|
|
138
138
|
});
|
|
139
139
|
export default select;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1 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_9940f1ff6ffb4f4abe1c7b9b2fa7085d30 = template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.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_9940f1ff6ffb4f4abe1c7b9b2fa7085d2z = template_9940f1ff6ffb4f4abe1c7b9b2fa7085d30(), element_9940f1ff6ffb4f4abe1c7b9b2fa7085d31 = root_9940f1ff6ffb4f4abe1c7b9b2fa7085d2z.firstChild;
|
|
16
|
+
template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.setProperties(element_9940f1ff6ffb4f4abe1c7b9b2fa7085d31, this?.attributes && omit(this.attributes, OMIT));
|
|
17
|
+
template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.setProperties(element_9940f1ff6ffb4f4abe1c7b9b2fa7085d31, omit(attributes, OMIT));
|
|
18
|
+
template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.setClass(element_9940f1ff6ffb4f4abe1c7b9b2fa7085d31, '', () => state.active && '--active');
|
|
19
|
+
template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.on(element_9940f1ff6ffb4f4abe1c7b9b2fa7085d31, 'focusin', () => {
|
|
20
20
|
state.active = true;
|
|
21
21
|
});
|
|
22
|
-
|
|
22
|
+
template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.on(element_9940f1ff6ffb4f4abe1c7b9b2fa7085d31, 'focusout', () => {
|
|
23
23
|
state.active = false;
|
|
24
24
|
});
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return
|
|
25
|
+
template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.onrender(element_9940f1ff6ffb4f4abe1c7b9b2fa7085d31, form.input.onrender(state));
|
|
26
|
+
template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.setProperty(element_9940f1ff6ffb4f4abe1c7b9b2fa7085d31, 'value', attributes?.value || '');
|
|
27
|
+
return root_9940f1ff6ffb4f4abe1c7b9b2fa7085d2z;
|
|
28
28
|
})();
|
|
29
29
|
}
|
|
30
30
|
;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1 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_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.Renderable<any>;
|
|
20
|
+
}, attributes: Readonly<A>, content: template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.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_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.Renderable<any>;
|
|
24
|
+
}, attributes: Readonly<A>, content: template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.Renderable<any>) => Renderable<any>>;
|
|
25
|
+
<T extends template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.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_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.Renderable<any>;
|
|
28
|
+
}, attributes: Readonly<A>, content: template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.Renderable<any>) => Renderable<any>>;
|
|
29
|
+
(attributes: A, content: template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.Renderable<any>): ReturnType<(this: {
|
|
30
30
|
attributes?: A | undefined;
|
|
31
|
-
content?:
|
|
32
|
-
}, attributes: Readonly<A>, content:
|
|
31
|
+
content?: template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.Renderable<any>;
|
|
32
|
+
}, attributes: Readonly<A>, content: template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.Renderable<any>) => Renderable<any>>;
|
|
33
33
|
};
|
|
34
34
|
export default _default;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1 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_9940f1ff6ffb4f4abe1c7b9b2fa7085d33 = template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.template(`<a
|
|
6
6
|
class='link --width-full'
|
|
7
7
|
target='_blank'><!--$--></a>`);
|
|
8
|
-
const
|
|
8
|
+
const template_9940f1ff6ffb4f4abe1c7b9b2fa7085d37 = template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.template(`<div
|
|
9
9
|
class='link --width-full'><!--$--></div>`);
|
|
10
|
-
const
|
|
10
|
+
const template_9940f1ff6ffb4f4abe1c7b9b2fa7085d3b = template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.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_9940f1ff6ffb4f4abe1c7b9b2fa7085d3a = template_9940f1ff6ffb4f4abe1c7b9b2fa7085d3b(), element_9940f1ff6ffb4f4abe1c7b9b2fa7085d3c = root_9940f1ff6ffb4f4abe1c7b9b2fa7085d3a.firstChild, element_9940f1ff6ffb4f4abe1c7b9b2fa7085d3d = element_9940f1ff6ffb4f4abe1c7b9b2fa7085d3c.nextSibling, element_9940f1ff6ffb4f4abe1c7b9b2fa7085d3e = element_9940f1ff6ffb4f4abe1c7b9b2fa7085d3d.firstChild;
|
|
19
|
+
template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.slot(element_9940f1ff6ffb4f4abe1c7b9b2fa7085d3c, content);
|
|
20
|
+
template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.setClass(element_9940f1ff6ffb4f4abe1c7b9b2fa7085d3d, ' ', `tooltip-content--${tooltipContentDirection}`);
|
|
21
|
+
template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.setProperties(element_9940f1ff6ffb4f4abe1c7b9b2fa7085d3d, tooltipContent && omit(tooltipContent, OMIT_TOOLTIP_CONTENT));
|
|
22
|
+
template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.slot(element_9940f1ff6ffb4f4abe1c7b9b2fa7085d3e, options.map((o) => {
|
|
23
23
|
if (o.href) {
|
|
24
24
|
return (() => {
|
|
25
|
-
let
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
return
|
|
25
|
+
let root_9940f1ff6ffb4f4abe1c7b9b2fa7085d32 = template_9940f1ff6ffb4f4abe1c7b9b2fa7085d33(), element_9940f1ff6ffb4f4abe1c7b9b2fa7085d34 = root_9940f1ff6ffb4f4abe1c7b9b2fa7085d32.firstChild, element_9940f1ff6ffb4f4abe1c7b9b2fa7085d35 = element_9940f1ff6ffb4f4abe1c7b9b2fa7085d34.firstChild;
|
|
26
|
+
template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.setProperties(element_9940f1ff6ffb4f4abe1c7b9b2fa7085d34, omit(o, OMIT_OPTION));
|
|
27
|
+
template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.setProperties(element_9940f1ff6ffb4f4abe1c7b9b2fa7085d34, option);
|
|
28
|
+
template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.slot(element_9940f1ff6ffb4f4abe1c7b9b2fa7085d35, o.content);
|
|
29
|
+
return root_9940f1ff6ffb4f4abe1c7b9b2fa7085d32;
|
|
30
30
|
})();
|
|
31
31
|
}
|
|
32
32
|
return (() => {
|
|
33
|
-
let
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
return
|
|
33
|
+
let root_9940f1ff6ffb4f4abe1c7b9b2fa7085d36 = template_9940f1ff6ffb4f4abe1c7b9b2fa7085d37(), element_9940f1ff6ffb4f4abe1c7b9b2fa7085d38 = root_9940f1ff6ffb4f4abe1c7b9b2fa7085d36.firstChild, element_9940f1ff6ffb4f4abe1c7b9b2fa7085d39 = element_9940f1ff6ffb4f4abe1c7b9b2fa7085d38.firstChild;
|
|
34
|
+
template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.setProperties(element_9940f1ff6ffb4f4abe1c7b9b2fa7085d38, omit(o, OMIT_OPTION));
|
|
35
|
+
template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.setProperties(element_9940f1ff6ffb4f4abe1c7b9b2fa7085d38, option);
|
|
36
|
+
template_9940f1ff6ffb4f4abe1c7b9b2fa7085d1.slot(element_9940f1ff6ffb4f4abe1c7b9b2fa7085d39, o.content);
|
|
37
|
+
return root_9940f1ff6ffb4f4abe1c7b9b2fa7085d36;
|
|
38
38
|
})();
|
|
39
39
|
}));
|
|
40
|
-
return
|
|
40
|
+
return root_9940f1ff6ffb4f4abe1c7b9b2fa7085d3a;
|
|
41
41
|
})());
|
|
42
42
|
});
|