@esportsplus/ui 0.48.6 → 0.48.7
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 +11 -11
- 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 +9 -9
- 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 +21 -21
- 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 +15 -15
- 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_69d8ea42df6d40bfb4950d47c33fd3631 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,8 +6,8 @@ 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
|
|
10
|
-
const
|
|
9
|
+
const template_69d8ea42df6d40bfb4950d47c33fd3633g = template_69d8ea42df6d40bfb4950d47c33fd3631.template(`<div class='link select-option '><!--$--></div>`);
|
|
10
|
+
const template_69d8ea42df6d40bfb4950d47c33fd3633l = template_69d8ea42df6d40bfb4950d47c33fd3631.template(`<div class='select tooltip '><!--$--><div class='select-arrow'></div><input class='select-tag' /><!--$--></div>`);
|
|
11
11
|
const OMIT = [
|
|
12
12
|
'arrow',
|
|
13
13
|
'options',
|
|
@@ -51,17 +51,17 @@ const select = template.factory(function (attributes, content) {
|
|
|
51
51
|
selected: attributes.selected || Object.keys(options)[0]
|
|
52
52
|
});
|
|
53
53
|
return (() => {
|
|
54
|
-
let
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
54
|
+
let root_69d8ea42df6d40bfb4950d47c33fd3633k = template_69d8ea42df6d40bfb4950d47c33fd3633l(), element_69d8ea42df6d40bfb4950d47c33fd3633m = root_69d8ea42df6d40bfb4950d47c33fd3633k.firstChild, element_69d8ea42df6d40bfb4950d47c33fd3633n = element_69d8ea42df6d40bfb4950d47c33fd3633m.firstChild, element_69d8ea42df6d40bfb4950d47c33fd3633o = element_69d8ea42df6d40bfb4950d47c33fd3633m.firstElementChild, element_69d8ea42df6d40bfb4950d47c33fd3633p = element_69d8ea42df6d40bfb4950d47c33fd3633o.nextElementSibling, element_69d8ea42df6d40bfb4950d47c33fd3633q = element_69d8ea42df6d40bfb4950d47c33fd3633n.nextSibling.nextSibling.nextSibling, attributes_69d8ea42df6d40bfb4950d47c33fd3633r = { "class": "select tooltip" }, attributes_69d8ea42df6d40bfb4950d47c33fd3633s = { "class": "select-arrow" };
|
|
55
|
+
template_69d8ea42df6d40bfb4950d47c33fd3631.setList(element_69d8ea42df6d40bfb4950d47c33fd3633m, 'class', () => state.active && '--active', attributes_69d8ea42df6d40bfb4950d47c33fd3633r);
|
|
56
|
+
template_69d8ea42df6d40bfb4950d47c33fd3631.setProperties(element_69d8ea42df6d40bfb4950d47c33fd3633m, this?.attributes && omit(this.attributes, OMIT), attributes_69d8ea42df6d40bfb4950d47c33fd3633r);
|
|
57
|
+
template_69d8ea42df6d40bfb4950d47c33fd3631.setProperties(element_69d8ea42df6d40bfb4950d47c33fd3633m, omit(attributes, OMIT), attributes_69d8ea42df6d40bfb4950d47c33fd3633r);
|
|
58
|
+
template_69d8ea42df6d40bfb4950d47c33fd3631.delegate(element_69d8ea42df6d40bfb4950d47c33fd3633m, 'click', () => {
|
|
59
59
|
if (state.render) {
|
|
60
60
|
set(state, !state.active);
|
|
61
61
|
}
|
|
62
62
|
state.render = true;
|
|
63
63
|
});
|
|
64
|
-
new
|
|
64
|
+
new template_69d8ea42df6d40bfb4950d47c33fd3631.EffectSlot(element_69d8ea42df6d40bfb4950d47c33fd3633n, content ? (() => content(state)) : (() => {
|
|
65
65
|
let selected = options[state.selected];
|
|
66
66
|
if (!selected) {
|
|
67
67
|
return '-';
|
|
@@ -71,13 +71,13 @@ const select = template.factory(function (attributes, content) {
|
|
|
71
71
|
}
|
|
72
72
|
return selected;
|
|
73
73
|
}));
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
new
|
|
74
|
+
template_69d8ea42df6d40bfb4950d47c33fd3631.setProperties(element_69d8ea42df6d40bfb4950d47c33fd3633o, this?.attributes?.arrow, attributes_69d8ea42df6d40bfb4950d47c33fd3633s);
|
|
75
|
+
template_69d8ea42df6d40bfb4950d47c33fd3631.setProperties(element_69d8ea42df6d40bfb4950d47c33fd3633o, attributes.arrow, attributes_69d8ea42df6d40bfb4950d47c33fd3633s);
|
|
76
|
+
template_69d8ea42df6d40bfb4950d47c33fd3631.setProperty(element_69d8ea42df6d40bfb4950d47c33fd3633p, 'name', attributes.name);
|
|
77
|
+
template_69d8ea42df6d40bfb4950d47c33fd3631.delegate(element_69d8ea42df6d40bfb4950d47c33fd3633p, 'click', () => { });
|
|
78
|
+
template_69d8ea42df6d40bfb4950d47c33fd3631.onrender(element_69d8ea42df6d40bfb4950d47c33fd3633p, form.input.onrender(state));
|
|
79
|
+
template_69d8ea42df6d40bfb4950d47c33fd3631.setProperty(element_69d8ea42df6d40bfb4950d47c33fd3633p, 'value', () => state.selected);
|
|
80
|
+
new template_69d8ea42df6d40bfb4950d47c33fd3631.EffectSlot(element_69d8ea42df6d40bfb4950d47c33fd3633q, () => {
|
|
81
81
|
if (!state.render) {
|
|
82
82
|
return;
|
|
83
83
|
}
|
|
@@ -120,17 +120,17 @@ const select = template.factory(function (attributes, content) {
|
|
|
120
120
|
content = content.content;
|
|
121
121
|
}
|
|
122
122
|
return (() => {
|
|
123
|
-
let
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
return
|
|
123
|
+
let root_69d8ea42df6d40bfb4950d47c33fd3633f = template_69d8ea42df6d40bfb4950d47c33fd3633g(), element_69d8ea42df6d40bfb4950d47c33fd3633h = root_69d8ea42df6d40bfb4950d47c33fd3633f.firstChild, element_69d8ea42df6d40bfb4950d47c33fd3633i = element_69d8ea42df6d40bfb4950d47c33fd3633h.firstChild, attributes_69d8ea42df6d40bfb4950d47c33fd3633j = { "class": "link select-option" };
|
|
124
|
+
template_69d8ea42df6d40bfb4950d47c33fd3631.setList(element_69d8ea42df6d40bfb4950d47c33fd3633h, 'class', () => selected[key] && '--active', attributes_69d8ea42df6d40bfb4950d47c33fd3633j);
|
|
125
|
+
template_69d8ea42df6d40bfb4950d47c33fd3631.setProperties(element_69d8ea42df6d40bfb4950d47c33fd3633h, this?.attributes?.option, attributes_69d8ea42df6d40bfb4950d47c33fd3633j);
|
|
126
|
+
template_69d8ea42df6d40bfb4950d47c33fd3631.setProperties(element_69d8ea42df6d40bfb4950d47c33fd3633h, option, attributes_69d8ea42df6d40bfb4950d47c33fd3633j);
|
|
127
|
+
template_69d8ea42df6d40bfb4950d47c33fd3631.setProperty(element_69d8ea42df6d40bfb4950d47c33fd3633h, 'data-key', key);
|
|
128
|
+
template_69d8ea42df6d40bfb4950d47c33fd3631.slot(element_69d8ea42df6d40bfb4950d47c33fd3633i, content);
|
|
129
|
+
return root_69d8ea42df6d40bfb4950d47c33fd3633f;
|
|
130
130
|
})();
|
|
131
131
|
}));
|
|
132
132
|
});
|
|
133
|
-
return
|
|
133
|
+
return root_69d8ea42df6d40bfb4950d47c33fd3633k;
|
|
134
134
|
})();
|
|
135
135
|
});
|
|
136
136
|
export default select;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as template_69d8ea42df6d40bfb4950d47c33fd3631 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_69d8ea42df6d40bfb4950d47c33fd3633u = template_69d8ea42df6d40bfb4950d47c33fd3631.template(`<textarea class='textarea'></textarea>`);
|
|
7
7
|
const OMIT = ['state'];
|
|
8
8
|
export default function (attributes) {
|
|
9
9
|
let state = attributes.state || reactive({
|
|
@@ -11,19 +11,19 @@ export default function (attributes) {
|
|
|
11
11
|
error: ''
|
|
12
12
|
});
|
|
13
13
|
return (() => {
|
|
14
|
-
let
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
let root_69d8ea42df6d40bfb4950d47c33fd3633t = template_69d8ea42df6d40bfb4950d47c33fd3633u(), element_69d8ea42df6d40bfb4950d47c33fd3633v = root_69d8ea42df6d40bfb4950d47c33fd3633t.firstChild, attributes_69d8ea42df6d40bfb4950d47c33fd3633w = { "class": "textarea" };
|
|
15
|
+
template_69d8ea42df6d40bfb4950d47c33fd3631.setProperties(element_69d8ea42df6d40bfb4950d47c33fd3633v, this?.attributes && omit(this.attributes, OMIT), attributes_69d8ea42df6d40bfb4950d47c33fd3633w);
|
|
16
|
+
template_69d8ea42df6d40bfb4950d47c33fd3631.setProperties(element_69d8ea42df6d40bfb4950d47c33fd3633v, omit(attributes, OMIT), attributes_69d8ea42df6d40bfb4950d47c33fd3633w);
|
|
17
|
+
template_69d8ea42df6d40bfb4950d47c33fd3631.setList(element_69d8ea42df6d40bfb4950d47c33fd3633v, 'class', () => state.active && '--active', attributes_69d8ea42df6d40bfb4950d47c33fd3633w);
|
|
18
|
+
template_69d8ea42df6d40bfb4950d47c33fd3631.on(element_69d8ea42df6d40bfb4950d47c33fd3633v, 'focusin', () => {
|
|
19
19
|
state.active = true;
|
|
20
20
|
});
|
|
21
|
-
|
|
21
|
+
template_69d8ea42df6d40bfb4950d47c33fd3631.on(element_69d8ea42df6d40bfb4950d47c33fd3633v, 'focusout', () => {
|
|
22
22
|
state.active = false;
|
|
23
23
|
});
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
return
|
|
24
|
+
template_69d8ea42df6d40bfb4950d47c33fd3631.onrender(element_69d8ea42df6d40bfb4950d47c33fd3633v, form.input.onrender(state));
|
|
25
|
+
template_69d8ea42df6d40bfb4950d47c33fd3631.setProperty(element_69d8ea42df6d40bfb4950d47c33fd3633v, 'value', attributes?.value || '');
|
|
26
|
+
return root_69d8ea42df6d40bfb4950d47c33fd3633t;
|
|
27
27
|
})();
|
|
28
28
|
}
|
|
29
29
|
;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as template_69d8ea42df6d40bfb4950d47c33fd3631 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_69d8ea42df6d40bfb4950d47c33fd3631.Renderable<any>;
|
|
20
|
+
}, attributes: Readonly<A>, content: template_69d8ea42df6d40bfb4950d47c33fd3631.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_69d8ea42df6d40bfb4950d47c33fd3631.Renderable<any>;
|
|
24
|
+
}, attributes: Readonly<A>, content: template_69d8ea42df6d40bfb4950d47c33fd3631.Renderable<any>) => Renderable<any>>;
|
|
25
|
+
<T extends template_69d8ea42df6d40bfb4950d47c33fd3631.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_69d8ea42df6d40bfb4950d47c33fd3631.Renderable<any>;
|
|
28
|
+
}, attributes: Readonly<A>, content: template_69d8ea42df6d40bfb4950d47c33fd3631.Renderable<any>) => Renderable<any>>;
|
|
29
|
+
(attributes: A, content: template_69d8ea42df6d40bfb4950d47c33fd3631.Renderable<any>): ReturnType<(this: {
|
|
30
30
|
attributes?: A | undefined;
|
|
31
|
-
content?:
|
|
32
|
-
}, attributes: Readonly<A>, content:
|
|
31
|
+
content?: template_69d8ea42df6d40bfb4950d47c33fd3631.Renderable<any>;
|
|
32
|
+
}, attributes: Readonly<A>, content: template_69d8ea42df6d40bfb4950d47c33fd3631.Renderable<any>) => Renderable<any>>;
|
|
33
33
|
};
|
|
34
34
|
export default _default;
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as template_69d8ea42df6d40bfb4950d47c33fd3631 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
|
|
6
|
-
const
|
|
7
|
-
const
|
|
5
|
+
const template_69d8ea42df6d40bfb4950d47c33fd3633y = template_69d8ea42df6d40bfb4950d47c33fd3631.template(`<a class='link --width-full' target='_blank'><!--$--></a>`);
|
|
6
|
+
const template_69d8ea42df6d40bfb4950d47c33fd36343 = template_69d8ea42df6d40bfb4950d47c33fd3631.template(`<div class='link --width-full'><!--$--></div>`);
|
|
7
|
+
const template_69d8ea42df6d40bfb4950d47c33fd36348 = template_69d8ea42df6d40bfb4950d47c33fd3631.template(`<!--$--><div class='tooltip-content '><!--$--></div>`);
|
|
8
8
|
const OMIT = ['options', 'option', 'tooltip-content'];
|
|
9
9
|
const OMIT_OPTION = ['content'];
|
|
10
10
|
const OMIT_TOOLTIP_CONTENT = ['direction'];
|
|
11
11
|
export default template.factory((attributes, content) => {
|
|
12
12
|
let options = attributes.options, option = attributes.option, tooltipContent = attributes?.['tooltip-content'], tooltipContentDirection = tooltipContent?.direction || 'nw';
|
|
13
13
|
return onclick(omit(attributes, OMIT), (() => {
|
|
14
|
-
let
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
let root_69d8ea42df6d40bfb4950d47c33fd36347 = template_69d8ea42df6d40bfb4950d47c33fd36348(), element_69d8ea42df6d40bfb4950d47c33fd36349 = root_69d8ea42df6d40bfb4950d47c33fd36347.firstChild, element_69d8ea42df6d40bfb4950d47c33fd3634a = element_69d8ea42df6d40bfb4950d47c33fd36349.nextSibling, element_69d8ea42df6d40bfb4950d47c33fd3634b = element_69d8ea42df6d40bfb4950d47c33fd3634a.firstChild, attributes_69d8ea42df6d40bfb4950d47c33fd3634c = { "class": "tooltip-content" };
|
|
15
|
+
template_69d8ea42df6d40bfb4950d47c33fd3631.slot(element_69d8ea42df6d40bfb4950d47c33fd36349, content);
|
|
16
|
+
template_69d8ea42df6d40bfb4950d47c33fd3631.setList(element_69d8ea42df6d40bfb4950d47c33fd3634a, 'class', `tooltip-content--${tooltipContentDirection}`, attributes_69d8ea42df6d40bfb4950d47c33fd3634c);
|
|
17
|
+
template_69d8ea42df6d40bfb4950d47c33fd3631.setProperties(element_69d8ea42df6d40bfb4950d47c33fd3634a, tooltipContent && omit(tooltipContent, OMIT_TOOLTIP_CONTENT), attributes_69d8ea42df6d40bfb4950d47c33fd3634c);
|
|
18
|
+
template_69d8ea42df6d40bfb4950d47c33fd3631.slot(element_69d8ea42df6d40bfb4950d47c33fd3634b, options.map((o) => {
|
|
19
19
|
if (o.href) {
|
|
20
20
|
return (() => {
|
|
21
|
-
let
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return
|
|
21
|
+
let root_69d8ea42df6d40bfb4950d47c33fd3633x = template_69d8ea42df6d40bfb4950d47c33fd3633y(), element_69d8ea42df6d40bfb4950d47c33fd3633z = root_69d8ea42df6d40bfb4950d47c33fd3633x.firstChild, element_69d8ea42df6d40bfb4950d47c33fd36340 = element_69d8ea42df6d40bfb4950d47c33fd3633z.firstChild, attributes_69d8ea42df6d40bfb4950d47c33fd36341 = { "class": "link --width-full" };
|
|
22
|
+
template_69d8ea42df6d40bfb4950d47c33fd3631.setProperties(element_69d8ea42df6d40bfb4950d47c33fd3633z, omit(o, OMIT_OPTION), attributes_69d8ea42df6d40bfb4950d47c33fd36341);
|
|
23
|
+
template_69d8ea42df6d40bfb4950d47c33fd3631.setProperties(element_69d8ea42df6d40bfb4950d47c33fd3633z, option, attributes_69d8ea42df6d40bfb4950d47c33fd36341);
|
|
24
|
+
template_69d8ea42df6d40bfb4950d47c33fd3631.slot(element_69d8ea42df6d40bfb4950d47c33fd36340, o.content);
|
|
25
|
+
return root_69d8ea42df6d40bfb4950d47c33fd3633x;
|
|
26
26
|
})();
|
|
27
27
|
}
|
|
28
28
|
return (() => {
|
|
29
|
-
let
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
return
|
|
29
|
+
let root_69d8ea42df6d40bfb4950d47c33fd36342 = template_69d8ea42df6d40bfb4950d47c33fd36343(), element_69d8ea42df6d40bfb4950d47c33fd36344 = root_69d8ea42df6d40bfb4950d47c33fd36342.firstChild, element_69d8ea42df6d40bfb4950d47c33fd36345 = element_69d8ea42df6d40bfb4950d47c33fd36344.firstChild, attributes_69d8ea42df6d40bfb4950d47c33fd36346 = { "class": "link --width-full" };
|
|
30
|
+
template_69d8ea42df6d40bfb4950d47c33fd3631.setProperties(element_69d8ea42df6d40bfb4950d47c33fd36344, omit(o, OMIT_OPTION), attributes_69d8ea42df6d40bfb4950d47c33fd36346);
|
|
31
|
+
template_69d8ea42df6d40bfb4950d47c33fd3631.setProperties(element_69d8ea42df6d40bfb4950d47c33fd36344, option, attributes_69d8ea42df6d40bfb4950d47c33fd36346);
|
|
32
|
+
template_69d8ea42df6d40bfb4950d47c33fd3631.slot(element_69d8ea42df6d40bfb4950d47c33fd36345, o.content);
|
|
33
|
+
return root_69d8ea42df6d40bfb4950d47c33fd36342;
|
|
34
34
|
})();
|
|
35
35
|
}));
|
|
36
|
-
return
|
|
36
|
+
return root_69d8ea42df6d40bfb4950d47c33fd36347;
|
|
37
37
|
})());
|
|
38
38
|
});
|