@esportsplus/ui 0.48.1 → 0.48.2
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_e90343e05b274f9c8b2074a07cff2a541 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_e90343e05b274f9c8b2074a07cff2a542p = template_e90343e05b274f9c8b2074a07cff2a541.template(`<div
|
|
10
10
|
class='link select-option '><!--$--></div>`);
|
|
11
|
-
const
|
|
11
|
+
const template_e90343e05b274f9c8b2074a07cff2a542t = template_e90343e05b274f9c8b2074a07cff2a541.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_e90343e05b274f9c8b2074a07cff2a542s = template_e90343e05b274f9c8b2074a07cff2a542t(), element_e90343e05b274f9c8b2074a07cff2a542u = root_e90343e05b274f9c8b2074a07cff2a542s.firstChild, element_e90343e05b274f9c8b2074a07cff2a542v = element_e90343e05b274f9c8b2074a07cff2a542u.firstChild, element_e90343e05b274f9c8b2074a07cff2a542w = element_e90343e05b274f9c8b2074a07cff2a542u.firstElementChild, element_e90343e05b274f9c8b2074a07cff2a542x = element_e90343e05b274f9c8b2074a07cff2a542w.nextElementSibling, element_e90343e05b274f9c8b2074a07cff2a542y = element_e90343e05b274f9c8b2074a07cff2a542v.nextSibling.nextSibling.nextSibling;
|
|
58
|
+
template_e90343e05b274f9c8b2074a07cff2a541.setClass(element_e90343e05b274f9c8b2074a07cff2a542u, ' ', () => state.active && '--active');
|
|
59
|
+
template_e90343e05b274f9c8b2074a07cff2a541.setProperties(element_e90343e05b274f9c8b2074a07cff2a542u, this?.attributes && omit(this.attributes, OMIT));
|
|
60
|
+
template_e90343e05b274f9c8b2074a07cff2a541.setProperties(element_e90343e05b274f9c8b2074a07cff2a542u, omit(attributes, OMIT));
|
|
61
|
+
template_e90343e05b274f9c8b2074a07cff2a541.delegate(element_e90343e05b274f9c8b2074a07cff2a542u, '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_e90343e05b274f9c8b2074a07cff2a541.EffectSlot(element_e90343e05b274f9c8b2074a07cff2a542v, 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_e90343e05b274f9c8b2074a07cff2a541.setProperties(element_e90343e05b274f9c8b2074a07cff2a542w, this?.attributes?.arrow);
|
|
78
|
+
template_e90343e05b274f9c8b2074a07cff2a541.setProperties(element_e90343e05b274f9c8b2074a07cff2a542w, attributes.arrow);
|
|
79
|
+
template_e90343e05b274f9c8b2074a07cff2a541.setProperty(element_e90343e05b274f9c8b2074a07cff2a542x, 'name', attributes.name);
|
|
80
|
+
template_e90343e05b274f9c8b2074a07cff2a541.delegate(element_e90343e05b274f9c8b2074a07cff2a542x, 'click', () => { });
|
|
81
|
+
template_e90343e05b274f9c8b2074a07cff2a541.onrender(element_e90343e05b274f9c8b2074a07cff2a542x, form.input.onrender(state));
|
|
82
|
+
template_e90343e05b274f9c8b2074a07cff2a541.setProperty(element_e90343e05b274f9c8b2074a07cff2a542x, 'value', () => state.selected);
|
|
83
|
+
new template_e90343e05b274f9c8b2074a07cff2a541.EffectSlot(element_e90343e05b274f9c8b2074a07cff2a542y, () => {
|
|
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_e90343e05b274f9c8b2074a07cff2a542o = template_e90343e05b274f9c8b2074a07cff2a542p(), element_e90343e05b274f9c8b2074a07cff2a542q = root_e90343e05b274f9c8b2074a07cff2a542o.firstChild, element_e90343e05b274f9c8b2074a07cff2a542r = element_e90343e05b274f9c8b2074a07cff2a542q.firstChild;
|
|
127
|
+
template_e90343e05b274f9c8b2074a07cff2a541.setClass(element_e90343e05b274f9c8b2074a07cff2a542q, ' ', () => selected[key] && '--active');
|
|
128
|
+
template_e90343e05b274f9c8b2074a07cff2a541.setProperties(element_e90343e05b274f9c8b2074a07cff2a542q, this?.attributes?.option);
|
|
129
|
+
template_e90343e05b274f9c8b2074a07cff2a541.setProperties(element_e90343e05b274f9c8b2074a07cff2a542q, option);
|
|
130
|
+
template_e90343e05b274f9c8b2074a07cff2a541.setProperty(element_e90343e05b274f9c8b2074a07cff2a542q, 'data-key', key);
|
|
131
|
+
template_e90343e05b274f9c8b2074a07cff2a541.slot(element_e90343e05b274f9c8b2074a07cff2a542r, content);
|
|
132
|
+
return root_e90343e05b274f9c8b2074a07cff2a542o;
|
|
133
133
|
})();
|
|
134
134
|
}));
|
|
135
135
|
});
|
|
136
|
-
return
|
|
136
|
+
return root_e90343e05b274f9c8b2074a07cff2a542s;
|
|
137
137
|
})();
|
|
138
138
|
});
|
|
139
139
|
export default select;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as template_e90343e05b274f9c8b2074a07cff2a541 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_e90343e05b274f9c8b2074a07cff2a5430 = template_e90343e05b274f9c8b2074a07cff2a541.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_e90343e05b274f9c8b2074a07cff2a542z = template_e90343e05b274f9c8b2074a07cff2a5430(), element_e90343e05b274f9c8b2074a07cff2a5431 = root_e90343e05b274f9c8b2074a07cff2a542z.firstChild;
|
|
16
|
+
template_e90343e05b274f9c8b2074a07cff2a541.setProperties(element_e90343e05b274f9c8b2074a07cff2a5431, this?.attributes && omit(this.attributes, OMIT));
|
|
17
|
+
template_e90343e05b274f9c8b2074a07cff2a541.setProperties(element_e90343e05b274f9c8b2074a07cff2a5431, omit(attributes, OMIT));
|
|
18
|
+
template_e90343e05b274f9c8b2074a07cff2a541.setClass(element_e90343e05b274f9c8b2074a07cff2a5431, '', () => state.active && '--active');
|
|
19
|
+
template_e90343e05b274f9c8b2074a07cff2a541.on(element_e90343e05b274f9c8b2074a07cff2a5431, 'focusin', () => {
|
|
20
20
|
state.active = true;
|
|
21
21
|
});
|
|
22
|
-
|
|
22
|
+
template_e90343e05b274f9c8b2074a07cff2a541.on(element_e90343e05b274f9c8b2074a07cff2a5431, 'focusout', () => {
|
|
23
23
|
state.active = false;
|
|
24
24
|
});
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return
|
|
25
|
+
template_e90343e05b274f9c8b2074a07cff2a541.onrender(element_e90343e05b274f9c8b2074a07cff2a5431, form.input.onrender(state));
|
|
26
|
+
template_e90343e05b274f9c8b2074a07cff2a541.setProperty(element_e90343e05b274f9c8b2074a07cff2a5431, 'value', attributes?.value || '');
|
|
27
|
+
return root_e90343e05b274f9c8b2074a07cff2a542z;
|
|
28
28
|
})();
|
|
29
29
|
}
|
|
30
30
|
;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as template_e90343e05b274f9c8b2074a07cff2a541 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_e90343e05b274f9c8b2074a07cff2a541.Renderable<any>;
|
|
20
|
+
}, attributes: Readonly<A>, content: template_e90343e05b274f9c8b2074a07cff2a541.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_e90343e05b274f9c8b2074a07cff2a541.Renderable<any>;
|
|
24
|
+
}, attributes: Readonly<A>, content: template_e90343e05b274f9c8b2074a07cff2a541.Renderable<any>) => Renderable<any>>;
|
|
25
|
+
<T extends template_e90343e05b274f9c8b2074a07cff2a541.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_e90343e05b274f9c8b2074a07cff2a541.Renderable<any>;
|
|
28
|
+
}, attributes: Readonly<A>, content: template_e90343e05b274f9c8b2074a07cff2a541.Renderable<any>) => Renderable<any>>;
|
|
29
|
+
(attributes: A, content: template_e90343e05b274f9c8b2074a07cff2a541.Renderable<any>): ReturnType<(this: {
|
|
30
30
|
attributes?: A | undefined;
|
|
31
|
-
content?:
|
|
32
|
-
}, attributes: Readonly<A>, content:
|
|
31
|
+
content?: template_e90343e05b274f9c8b2074a07cff2a541.Renderable<any>;
|
|
32
|
+
}, attributes: Readonly<A>, content: template_e90343e05b274f9c8b2074a07cff2a541.Renderable<any>) => Renderable<any>>;
|
|
33
33
|
};
|
|
34
34
|
export default _default;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as template_e90343e05b274f9c8b2074a07cff2a541 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_e90343e05b274f9c8b2074a07cff2a5433 = template_e90343e05b274f9c8b2074a07cff2a541.template(`<a
|
|
6
6
|
class='link --width-full'
|
|
7
7
|
target='_blank'><!--$--></a>`);
|
|
8
|
-
const
|
|
8
|
+
const template_e90343e05b274f9c8b2074a07cff2a5437 = template_e90343e05b274f9c8b2074a07cff2a541.template(`<div
|
|
9
9
|
class='link --width-full'><!--$--></div>`);
|
|
10
|
-
const
|
|
10
|
+
const template_e90343e05b274f9c8b2074a07cff2a543b = template_e90343e05b274f9c8b2074a07cff2a541.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_e90343e05b274f9c8b2074a07cff2a543a = template_e90343e05b274f9c8b2074a07cff2a543b(), element_e90343e05b274f9c8b2074a07cff2a543c = root_e90343e05b274f9c8b2074a07cff2a543a.firstChild, element_e90343e05b274f9c8b2074a07cff2a543d = element_e90343e05b274f9c8b2074a07cff2a543c.nextSibling, element_e90343e05b274f9c8b2074a07cff2a543e = element_e90343e05b274f9c8b2074a07cff2a543d.firstChild;
|
|
19
|
+
template_e90343e05b274f9c8b2074a07cff2a541.slot(element_e90343e05b274f9c8b2074a07cff2a543c, content);
|
|
20
|
+
template_e90343e05b274f9c8b2074a07cff2a541.setClass(element_e90343e05b274f9c8b2074a07cff2a543d, ' ', `tooltip-content--${tooltipContentDirection}`);
|
|
21
|
+
template_e90343e05b274f9c8b2074a07cff2a541.setProperties(element_e90343e05b274f9c8b2074a07cff2a543d, tooltipContent && omit(tooltipContent, OMIT_TOOLTIP_CONTENT));
|
|
22
|
+
template_e90343e05b274f9c8b2074a07cff2a541.slot(element_e90343e05b274f9c8b2074a07cff2a543e, options.map((o) => {
|
|
23
23
|
if (o.href) {
|
|
24
24
|
return (() => {
|
|
25
|
-
let
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
return
|
|
25
|
+
let root_e90343e05b274f9c8b2074a07cff2a5432 = template_e90343e05b274f9c8b2074a07cff2a5433(), element_e90343e05b274f9c8b2074a07cff2a5434 = root_e90343e05b274f9c8b2074a07cff2a5432.firstChild, element_e90343e05b274f9c8b2074a07cff2a5435 = element_e90343e05b274f9c8b2074a07cff2a5434.firstChild;
|
|
26
|
+
template_e90343e05b274f9c8b2074a07cff2a541.setProperties(element_e90343e05b274f9c8b2074a07cff2a5434, omit(o, OMIT_OPTION));
|
|
27
|
+
template_e90343e05b274f9c8b2074a07cff2a541.setProperties(element_e90343e05b274f9c8b2074a07cff2a5434, option);
|
|
28
|
+
template_e90343e05b274f9c8b2074a07cff2a541.slot(element_e90343e05b274f9c8b2074a07cff2a5435, o.content);
|
|
29
|
+
return root_e90343e05b274f9c8b2074a07cff2a5432;
|
|
30
30
|
})();
|
|
31
31
|
}
|
|
32
32
|
return (() => {
|
|
33
|
-
let
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
return
|
|
33
|
+
let root_e90343e05b274f9c8b2074a07cff2a5436 = template_e90343e05b274f9c8b2074a07cff2a5437(), element_e90343e05b274f9c8b2074a07cff2a5438 = root_e90343e05b274f9c8b2074a07cff2a5436.firstChild, element_e90343e05b274f9c8b2074a07cff2a5439 = element_e90343e05b274f9c8b2074a07cff2a5438.firstChild;
|
|
34
|
+
template_e90343e05b274f9c8b2074a07cff2a541.setProperties(element_e90343e05b274f9c8b2074a07cff2a5438, omit(o, OMIT_OPTION));
|
|
35
|
+
template_e90343e05b274f9c8b2074a07cff2a541.setProperties(element_e90343e05b274f9c8b2074a07cff2a5438, option);
|
|
36
|
+
template_e90343e05b274f9c8b2074a07cff2a541.slot(element_e90343e05b274f9c8b2074a07cff2a5439, o.content);
|
|
37
|
+
return root_e90343e05b274f9c8b2074a07cff2a5436;
|
|
38
38
|
})();
|
|
39
39
|
}));
|
|
40
|
-
return
|
|
40
|
+
return root_e90343e05b274f9c8b2074a07cff2a543a;
|
|
41
41
|
})());
|
|
42
42
|
});
|