@esportsplus/ui 0.46.0 → 0.47.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/.github/workflows/bump.yml +2 -2
- package/.github/workflows/dependabot.yml +1 -1
- package/.github/workflows/publish.yml +3 -3
- package/README.md +288 -0
- package/build/components/accordion/index.d.ts +16 -16
- package/build/components/accordion/index.js +28 -20
- package/build/components/alert/index.d.ts +1 -1
- package/build/components/alert/index.js +82 -57
- package/build/components/back/index.d.ts +8 -7
- package/build/components/back/index.js +11 -11
- package/build/components/button/index.d.ts +21 -20
- package/build/components/button/index.js +52 -27
- package/build/components/checkbox/index.d.ts +3 -3
- package/build/components/checkbox/index.js +39 -25
- package/build/components/clipboard/index.d.ts +90 -70
- package/build/components/clipboard/onclick.d.ts +1 -1
- package/build/components/clipboard/onclick.js +31 -21
- package/build/components/counter/index.d.ts +2 -2
- package/build/components/counter/index.js +72 -36
- package/build/components/ellipsis/index.d.ts +1 -1
- package/build/components/ellipsis/index.js +7 -8
- package/build/components/form/action.d.ts +1 -1
- package/build/components/form/action.js +13 -15
- package/build/components/form/index.d.ts +1 -1
- package/build/components/highlight/index.d.ts +16 -16
- package/build/components/highlight/index.js +26 -18
- package/build/components/icon/index.d.ts +11 -10
- package/build/components/icon/index.js +9 -6
- package/build/components/input/index.d.ts +2 -2
- package/build/components/input/index.js +38 -22
- package/build/components/loader/index.d.ts +16 -16
- package/build/components/loader/index.js +68 -50
- package/build/components/loading/index.d.ts +1 -1
- package/build/components/loading/index.js +9 -9
- package/build/components/radio/index.d.ts +1 -1
- package/build/components/range/index.d.ts +2 -2
- package/build/components/range/index.js +50 -27
- package/build/components/scrollbar/index.d.ts +12 -11
- package/build/components/scrollbar/index.js +42 -37
- package/build/components/select/index.d.ts +1 -1
- package/build/components/select/index.js +121 -86
- package/build/components/switch/index.d.ts +1 -1
- package/build/components/textarea/index.d.ts +2 -2
- package/build/components/textarea/index.js +37 -22
- package/build/components/tooltip/index.d.ts +180 -140
- package/build/components/tooltip/menu.d.ts +12 -11
- package/build/components/tooltip/menu.js +33 -33
- package/build/components/tooltip/onclick.d.ts +1121 -1100
- package/build/components/tooltip/onclick.js +26 -16
- package/build/components/tooltip/onhover.d.ts +16 -16
- package/build/components/tooltip/onhover.js +28 -18
- package/build/components/typewriter/index.d.ts +11 -10
- package/build/components/typewriter/index.js +25 -12
- package/build/themes/dark/alert.d.ts +1 -1
- package/build/themes/dark/input.d.ts +10 -8
- package/build/themes/dark/select.d.ts +90 -70
- package/build/themes/dark/textarea.d.ts +10 -8
- package/package.json +18 -14
- package/src/components/button/index.ts +21 -13
- package/src/components/counter/index.ts +6 -6
- package/src/components/select/index.ts +13 -1
- package/tsconfig.json +6 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as template_a6aeaec5a75649bd8ec693d5230c50001 from '@esportsplus/template';
|
|
2
|
+
import { Attributes, Renderable } from '@esportsplus/template';
|
|
2
3
|
type A = Attributes & {
|
|
3
4
|
options: (Attributes & {
|
|
4
5
|
content: Renderable<unknown>;
|
|
@@ -15,19 +16,19 @@ type A = Attributes & {
|
|
|
15
16
|
declare const _default: {
|
|
16
17
|
(): ReturnType<(this: {
|
|
17
18
|
attributes?: A | undefined;
|
|
18
|
-
content?: Renderable<any>;
|
|
19
|
-
}, attributes: Readonly<A>, content: Renderable<any>) => Renderable<any>>;
|
|
19
|
+
content?: template_a6aeaec5a75649bd8ec693d5230c50001.Renderable<any>;
|
|
20
|
+
}, attributes: Readonly<A>, content: template_a6aeaec5a75649bd8ec693d5230c50001.Renderable<any>) => Renderable<any>>;
|
|
20
21
|
<T extends A>(attributes: T): ReturnType<(this: {
|
|
21
22
|
attributes?: A | undefined;
|
|
22
|
-
content?: Renderable<any>;
|
|
23
|
-
}, attributes: Readonly<A>, content: Renderable<any>) => Renderable<any>>;
|
|
24
|
-
<T extends Renderable<any>>(content: T): ReturnType<(this: {
|
|
23
|
+
content?: template_a6aeaec5a75649bd8ec693d5230c50001.Renderable<any>;
|
|
24
|
+
}, attributes: Readonly<A>, content: template_a6aeaec5a75649bd8ec693d5230c50001.Renderable<any>) => Renderable<any>>;
|
|
25
|
+
<T extends template_a6aeaec5a75649bd8ec693d5230c50001.Renderable<any>>(content: T): ReturnType<(this: {
|
|
25
26
|
attributes?: A | undefined;
|
|
26
|
-
content?: Renderable<any>;
|
|
27
|
-
}, attributes: Readonly<A>, content: Renderable<any>) => Renderable<any>>;
|
|
28
|
-
(attributes: A, content: Renderable<any>): ReturnType<(this: {
|
|
27
|
+
content?: template_a6aeaec5a75649bd8ec693d5230c50001.Renderable<any>;
|
|
28
|
+
}, attributes: Readonly<A>, content: template_a6aeaec5a75649bd8ec693d5230c50001.Renderable<any>) => Renderable<any>>;
|
|
29
|
+
(attributes: A, content: template_a6aeaec5a75649bd8ec693d5230c50001.Renderable<any>): ReturnType<(this: {
|
|
29
30
|
attributes?: A | undefined;
|
|
30
|
-
content?: Renderable<any>;
|
|
31
|
-
}, attributes: Readonly<A>, content: Renderable<any>) => Renderable<any>>;
|
|
31
|
+
content?: template_a6aeaec5a75649bd8ec693d5230c50001.Renderable<any>;
|
|
32
|
+
}, attributes: Readonly<A>, content: template_a6aeaec5a75649bd8ec693d5230c50001.Renderable<any>) => Renderable<any>>;
|
|
32
33
|
};
|
|
33
34
|
export default _default;
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as template_a6aeaec5a75649bd8ec693d5230c50001 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 template_a6aeaec5a75649bd8ec693d5230c50003h = template_a6aeaec5a75649bd8ec693d5230c50001.template(`<a
|
|
6
|
+
class='link --width-full'
|
|
7
|
+
target='_blank'><!--$--></a>`);
|
|
8
|
+
const template_a6aeaec5a75649bd8ec693d5230c50003l = template_a6aeaec5a75649bd8ec693d5230c50001.template(`<div
|
|
9
|
+
class='link --width-full'><!--$--></div>`);
|
|
10
|
+
const template_a6aeaec5a75649bd8ec693d5230c50003p = template_a6aeaec5a75649bd8ec693d5230c50001.template(`<!--$--><div
|
|
11
|
+
class='tooltip-content '><!--$--></div>`);
|
|
5
12
|
const OMIT = ['options', 'option', 'tooltip-content'];
|
|
6
13
|
const OMIT_OPTION = ['content'];
|
|
7
14
|
const OMIT_TOOLTIP_CONTENT = ['direction'];
|
|
8
15
|
export default template.factory((attributes, content) => {
|
|
9
16
|
let options = attributes.options, option = attributes.option, tooltipContent = attributes?.['tooltip-content'], tooltipContentDirection = tooltipContent?.direction || 'nw';
|
|
10
|
-
return onclick(omit(attributes, OMIT),
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
>
|
|
36
|
-
${o.content}
|
|
37
|
-
</div>
|
|
38
|
-
`;
|
|
39
|
-
})}
|
|
40
|
-
</div>
|
|
41
|
-
`);
|
|
17
|
+
return onclick(omit(attributes, OMIT), (() => {
|
|
18
|
+
let root_a6aeaec5a75649bd8ec693d5230c50003o = template_a6aeaec5a75649bd8ec693d5230c50003p(), element_a6aeaec5a75649bd8ec693d5230c50003q = root_a6aeaec5a75649bd8ec693d5230c50003o.firstChild, element_a6aeaec5a75649bd8ec693d5230c50003r = element_a6aeaec5a75649bd8ec693d5230c50003q.nextSibling, element_a6aeaec5a75649bd8ec693d5230c50003s = element_a6aeaec5a75649bd8ec693d5230c50003r.firstChild;
|
|
19
|
+
template_a6aeaec5a75649bd8ec693d5230c50001.slot(element_a6aeaec5a75649bd8ec693d5230c50003q, content);
|
|
20
|
+
template_a6aeaec5a75649bd8ec693d5230c50001.setClass(element_a6aeaec5a75649bd8ec693d5230c50003r, ' ', `tooltip-content--${tooltipContentDirection}`);
|
|
21
|
+
template_a6aeaec5a75649bd8ec693d5230c50001.setProperties(element_a6aeaec5a75649bd8ec693d5230c50003r, tooltipContent && omit(tooltipContent, OMIT_TOOLTIP_CONTENT));
|
|
22
|
+
template_a6aeaec5a75649bd8ec693d5230c50001.slot(element_a6aeaec5a75649bd8ec693d5230c50003s, options.map((o) => {
|
|
23
|
+
if (o.href) {
|
|
24
|
+
return (() => {
|
|
25
|
+
let root_a6aeaec5a75649bd8ec693d5230c50003g = template_a6aeaec5a75649bd8ec693d5230c50003h(), element_a6aeaec5a75649bd8ec693d5230c50003i = root_a6aeaec5a75649bd8ec693d5230c50003g.firstChild, element_a6aeaec5a75649bd8ec693d5230c50003j = element_a6aeaec5a75649bd8ec693d5230c50003i.firstChild;
|
|
26
|
+
template_a6aeaec5a75649bd8ec693d5230c50001.setProperties(element_a6aeaec5a75649bd8ec693d5230c50003i, omit(o, OMIT_OPTION));
|
|
27
|
+
template_a6aeaec5a75649bd8ec693d5230c50001.setProperties(element_a6aeaec5a75649bd8ec693d5230c50003i, option);
|
|
28
|
+
template_a6aeaec5a75649bd8ec693d5230c50001.slot(element_a6aeaec5a75649bd8ec693d5230c50003j, o.content);
|
|
29
|
+
return root_a6aeaec5a75649bd8ec693d5230c50003g;
|
|
30
|
+
})();
|
|
31
|
+
}
|
|
32
|
+
return (() => {
|
|
33
|
+
let root_a6aeaec5a75649bd8ec693d5230c50003k = template_a6aeaec5a75649bd8ec693d5230c50003l(), element_a6aeaec5a75649bd8ec693d5230c50003m = root_a6aeaec5a75649bd8ec693d5230c50003k.firstChild, element_a6aeaec5a75649bd8ec693d5230c50003n = element_a6aeaec5a75649bd8ec693d5230c50003m.firstChild;
|
|
34
|
+
template_a6aeaec5a75649bd8ec693d5230c50001.setProperties(element_a6aeaec5a75649bd8ec693d5230c50003m, omit(o, OMIT_OPTION));
|
|
35
|
+
template_a6aeaec5a75649bd8ec693d5230c50001.setProperties(element_a6aeaec5a75649bd8ec693d5230c50003m, option);
|
|
36
|
+
template_a6aeaec5a75649bd8ec693d5230c50001.slot(element_a6aeaec5a75649bd8ec693d5230c50003n, o.content);
|
|
37
|
+
return root_a6aeaec5a75649bd8ec693d5230c50003k;
|
|
38
|
+
})();
|
|
39
|
+
}));
|
|
40
|
+
return root_a6aeaec5a75649bd8ec693d5230c50003o;
|
|
41
|
+
})());
|
|
42
42
|
});
|