@esportsplus/ui 0.0.83 → 0.0.85
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/alert/index.d.ts +10 -14
- package/build/components/alert/index.js +92 -89
- package/build/components/field/checkbox.d.ts +17 -21
- package/build/components/field/checkbox.js +14 -14
- package/build/components/field/description.d.ts +4 -8
- package/build/components/field/description.js +7 -7
- package/build/components/field/error.d.ts +4 -8
- package/build/components/field/error.js +9 -9
- package/build/components/field/file.d.ts +18 -22
- package/build/components/field/file.js +17 -17
- package/build/components/field/index.d.ts +222 -254
- package/build/components/field/index.js +8 -8
- package/build/components/field/optional.d.ts +92 -100
- package/build/components/field/optional.js +16 -16
- package/build/components/field/select.d.ts +32 -36
- package/build/components/field/select.js +50 -50
- package/build/components/field/switch.d.ts +3 -7
- package/build/components/field/switch.js +6 -6
- package/build/components/field/text.d.ts +21 -25
- package/build/components/field/text.js +17 -17
- package/build/components/field/textarea.d.ts +3 -7
- package/build/components/field/textarea.js +5 -5
- package/build/components/field/title.d.ts +5 -9
- package/build/components/field/title.js +9 -9
- package/build/components/form/action.d.ts +2 -6
- package/build/components/form/action.js +46 -46
- package/build/components/form/index.d.ts +27 -31
- package/build/components/form/index.js +4 -4
- package/build/components/form/input.d.ts +9 -9
- package/build/components/form/input.js +10 -10
- package/build/components/form/layout.d.ts +13 -17
- package/build/components/form/layout.js +3 -3
- package/build/components/form/types.d.ts +12 -12
- package/build/components/form/types.js +1 -1
- package/build/components/index.d.ts +9 -9
- package/build/components/index.js +9 -9
- package/build/components/overlay/index.d.ts +6 -10
- package/build/components/overlay/index.js +2 -2
- package/build/components/page/header.d.ts +6 -10
- package/build/components/page/header.js +2 -2
- package/build/components/page/index.d.ts +15 -23
- package/build/components/page/index.js +4 -4
- package/build/components/page/layout.d.ts +5 -9
- package/build/components/page/layout.js +2 -2
- package/build/components/root/index.d.ts +8 -8
- package/build/components/root/index.js +3 -3
- package/build/components/root/queue.d.ts +4 -4
- package/build/components/root/queue.js +18 -18
- package/build/components/scrollbar/index.d.ts +8 -16
- package/build/components/scrollbar/index.js +27 -27
- package/build/components/site/index.d.ts +9 -13
- package/build/components/site/index.js +9 -9
- package/build/components/tooltip/index.d.ts +51 -53
- package/build/components/tooltip/index.js +73 -73
- package/build/components/tooltip/menu.d.ts +25 -29
- package/build/components/tooltip/menu.js +15 -15
- package/build/index.d.ts +2 -2
- package/build/index.js +2 -2
- package/build/types.d.ts +5 -5
- package/build/types.js +1 -1
- package/css/0177605565c3081637cf.css +1 -0
- package/css/components/2dcc6798ba04880cdf5a.css +23 -0
- package/css/components/b296e959a632e7fdbe65.css +26 -0
- package/css/fonts/716af1291514abb1e027.css +1 -0
- package/css/utilities/822835c12ae0b64188b4.css +11 -0
- package/css/utilities/98f5bec25ab2703bc173.css +15 -0
- package/package.json +8 -8
- package/src/components/alert/index.ts +4 -0
- package/src/components/form/action.ts +8 -8
- package/src/components/scrollbar/index.ts +6 -6
- package/src/components/tooltip/index.ts +14 -14
- package/src/components/tooltip/menu.ts +1 -1
- package/webpack.config.ts +1 -0
- package/css/components/styles.css +0 -1
- package/css/components/variables.css +0 -1
- package/css/fonts/montserrat.css +0 -1
- package/css/normalizer.css +0 -1
- package/css/utilities/styles.css +0 -1
- package/css/utilities/variables.css +0 -1
- /package/{fonts → assets}/0af89c10df9bc2f8d646.woff2 +0 -0
- /package/{fonts → assets}/109e3207d9afea8524be.woff2 +0 -0
- /package/{fonts → assets}/16663c3f6ab1da2d6c86.woff +0 -0
- /package/{fonts → assets}/16e8721ef5837bc6375e.woff +0 -0
- /package/{fonts → assets}/2a3e005f58bfca9c117e.woff +0 -0
- /package/{fonts → assets}/58a8d7ebc386843b62c5.woff2 +0 -0
- /package/{fonts → assets}/593de7c561e5ffe80c3e.woff2 +0 -0
- /package/{fonts → assets}/68b7982c2b30b51bf932.woff2 +0 -0
- /package/{fonts → assets}/a04b5e24af93da353f0e.woff +0 -0
- /package/{fonts → assets}/bf331673b91821715c08.woff +0 -0
- /package/{fonts → assets}/c54b0f4340f2914802d1.woff +0 -0
- /package/{fonts → assets}/dd8646a41e4397b77fc4.woff2 +0 -0
- /package/{fonts → assets}/e06c107cc50506570954.woff2 +0 -0
- /package/{fonts → assets}/ecdfe4c05425592708aa.woff2 +0 -0
- /package/{fonts → assets}/f0032576ac7462ccbd0c.woff +0 -0
- /package/{fonts → assets}/f872e621917a45943fbc.woff +0 -0
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
declare function deactivate(): void;
|
|
2
|
-
declare const _default: {
|
|
3
|
-
deactivate: typeof deactivate;
|
|
4
|
-
error: (messages: string | string[], seconds?: number) => void;
|
|
5
|
-
html: () => () => "" |
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
success: (messages: string | string[], seconds?: number) => void;
|
|
12
|
-
types: readonly ["error", "info", "success"];
|
|
13
|
-
};
|
|
14
|
-
export default _default;
|
|
1
|
+
declare function deactivate(): void;
|
|
2
|
+
declare const _default: {
|
|
3
|
+
deactivate: typeof deactivate;
|
|
4
|
+
error: (messages: string | string[], seconds?: number) => void;
|
|
5
|
+
html: () => () => "" | import("@esportsplus/template/build/types").Template;
|
|
6
|
+
info: (messages: string | string[], seconds?: number) => void;
|
|
7
|
+
success: (messages: string | string[], seconds?: number) => void;
|
|
8
|
+
types: readonly ["error", "info", "success"];
|
|
9
|
+
};
|
|
10
|
+
export default _default;
|
|
@@ -1,88 +1,91 @@
|
|
|
1
|
-
import { reactive } from '@esportsplus/reactivity';
|
|
2
|
-
import { html } from '@esportsplus/template';
|
|
3
|
-
let modifiers = {
|
|
4
|
-
error: 'red',
|
|
5
|
-
info: 'black',
|
|
6
|
-
success: 'green'
|
|
7
|
-
}, state = reactive({
|
|
8
|
-
active: false,
|
|
9
|
-
messages: new Set,
|
|
10
|
-
seconds: 0,
|
|
11
|
-
state: 'activating',
|
|
12
|
-
type: ''
|
|
13
|
-
}), timeout = 250;
|
|
14
|
-
function activate(key, messages, seconds = 0) {
|
|
15
|
-
if (!Array.isArray(messages)) {
|
|
16
|
-
messages = [messages];
|
|
17
|
-
}
|
|
18
|
-
if (!messages.length) {
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
if (state.type !== key) {
|
|
22
|
-
state.messages.clear();
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
state.
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
const
|
|
1
|
+
import { reactive } from '@esportsplus/reactivity';
|
|
2
|
+
import { html } from '@esportsplus/template';
|
|
3
|
+
let modifiers = {
|
|
4
|
+
error: 'red',
|
|
5
|
+
info: 'black',
|
|
6
|
+
success: 'green'
|
|
7
|
+
}, state = reactive({
|
|
8
|
+
active: false,
|
|
9
|
+
messages: new Set,
|
|
10
|
+
seconds: 0,
|
|
11
|
+
state: 'activating',
|
|
12
|
+
type: ''
|
|
13
|
+
}), timeout = 250;
|
|
14
|
+
function activate(key, messages, seconds = 0) {
|
|
15
|
+
if (!Array.isArray(messages)) {
|
|
16
|
+
messages = [messages];
|
|
17
|
+
}
|
|
18
|
+
if (!messages.length) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
if (state.type !== key) {
|
|
22
|
+
state.messages.clear();
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
state.type = '';
|
|
26
|
+
}
|
|
27
|
+
for (let message of messages) {
|
|
28
|
+
state.messages.add(message);
|
|
29
|
+
}
|
|
30
|
+
state.state = 'activating';
|
|
31
|
+
state.type = key;
|
|
32
|
+
if (state.active) {
|
|
33
|
+
state.active = true;
|
|
34
|
+
if (seconds) {
|
|
35
|
+
if (!state.seconds) {
|
|
36
|
+
state.seconds = seconds;
|
|
37
|
+
}
|
|
38
|
+
setTimeout(() => {
|
|
39
|
+
if (messages && messages.length < (state?.messages?.size || 0)) {
|
|
40
|
+
for (let message of messages) {
|
|
41
|
+
state.messages.delete(message);
|
|
42
|
+
}
|
|
43
|
+
state.messages = state.messages;
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
deactivate();
|
|
47
|
+
}
|
|
48
|
+
}, 400 * seconds);
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
state.seconds = 0;
|
|
52
|
+
}
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
setTimeout(() => {
|
|
56
|
+
state.active = true;
|
|
57
|
+
if (seconds) {
|
|
58
|
+
if (!state.seconds) {
|
|
59
|
+
state.seconds = seconds;
|
|
60
|
+
}
|
|
61
|
+
setTimeout(() => {
|
|
62
|
+
if (messages && messages.length < (state?.messages?.size || 0)) {
|
|
63
|
+
for (let message of messages) {
|
|
64
|
+
state.messages.delete(message);
|
|
65
|
+
}
|
|
66
|
+
state.messages = state.messages;
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
deactivate();
|
|
70
|
+
}
|
|
71
|
+
}, 400 * seconds);
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
state.seconds = 0;
|
|
75
|
+
}
|
|
76
|
+
}, timeout);
|
|
77
|
+
}
|
|
78
|
+
function deactivate() {
|
|
79
|
+
state.state = 'deactivating';
|
|
80
|
+
setTimeout(() => {
|
|
81
|
+
state.active = false;
|
|
82
|
+
state.messages.clear();
|
|
83
|
+
}, timeout);
|
|
84
|
+
}
|
|
85
|
+
const error = (messages, seconds = 0) => activate('error', messages, seconds);
|
|
86
|
+
const info = (messages, seconds = 0) => activate('info', messages, seconds);
|
|
87
|
+
const success = (messages, seconds = 0) => activate('success', messages, seconds);
|
|
88
|
+
const h = () => {
|
|
86
89
|
return () => state.active ? html `
|
|
87
90
|
<div class='alert anchor anchor--ne ${() => state.active && '--active'} ${() => `alert--${state.state}`}'>
|
|
88
91
|
<div class="alert-close --flex-start --margin-right --margin-100" onclick='${deactivate}'>
|
|
@@ -111,7 +114,7 @@ const h = () => {
|
|
|
111
114
|
</div>
|
|
112
115
|
</div>
|
|
113
116
|
</div>
|
|
114
|
-
` : '';
|
|
115
|
-
};
|
|
116
|
-
const types = ['error', 'info', 'success'];
|
|
117
|
-
export default { deactivate, error, html: h, info, success, types };
|
|
117
|
+
` : '';
|
|
118
|
+
};
|
|
119
|
+
const types = ['error', 'info', 'success'];
|
|
120
|
+
export default { deactivate, error, html: h, info, success, types };
|
|
@@ -1,21 +1,17 @@
|
|
|
1
|
-
import description from './description';
|
|
2
|
-
type Data = {
|
|
3
|
-
class?: string;
|
|
4
|
-
field?: {
|
|
5
|
-
content?: any;
|
|
6
|
-
};
|
|
7
|
-
mask?: {
|
|
8
|
-
class?: string;
|
|
9
|
-
style?: string;
|
|
10
|
-
};
|
|
11
|
-
name?: string;
|
|
12
|
-
style?: string;
|
|
13
|
-
title: string;
|
|
14
|
-
value?: any;
|
|
15
|
-
} & Parameters<typeof description>[0];
|
|
16
|
-
declare const _default: (data: Data) =>
|
|
17
|
-
|
|
18
|
-
type: string;
|
|
19
|
-
values: never[];
|
|
20
|
-
};
|
|
21
|
-
export default _default;
|
|
1
|
+
import description from './description';
|
|
2
|
+
type Data = {
|
|
3
|
+
class?: string;
|
|
4
|
+
field?: {
|
|
5
|
+
content?: any;
|
|
6
|
+
};
|
|
7
|
+
mask?: {
|
|
8
|
+
class?: string;
|
|
9
|
+
style?: string;
|
|
10
|
+
};
|
|
11
|
+
name?: string;
|
|
12
|
+
style?: string;
|
|
13
|
+
title: string;
|
|
14
|
+
value?: any;
|
|
15
|
+
} & Parameters<typeof description>[0];
|
|
16
|
+
declare const _default: (data: Data) => import("@esportsplus/template/build/types").Template;
|
|
17
|
+
export default _default;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { reactive } from '@esportsplus/reactivity';
|
|
2
|
-
import { html } from '@esportsplus/template';
|
|
3
|
-
import description from './description';
|
|
4
|
-
export default (data) => {
|
|
5
|
-
let state = reactive({
|
|
6
|
-
active: false
|
|
7
|
-
});
|
|
1
|
+
import { reactive } from '@esportsplus/reactivity';
|
|
2
|
+
import { html } from '@esportsplus/template';
|
|
3
|
+
import description from './description';
|
|
4
|
+
export default (data) => {
|
|
5
|
+
let state = reactive({
|
|
6
|
+
active: false
|
|
7
|
+
});
|
|
8
8
|
return html `
|
|
9
9
|
<div
|
|
10
10
|
class="field --flex-column ${data?.class || ''} ${() => state.active ? '--active' : ''}"
|
|
11
|
-
onchange='${(e) => {
|
|
12
|
-
if (e.target.type !== 'checkbox') {
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
|
-
state.active = e.target?.checked;
|
|
11
|
+
onchange='${(e) => {
|
|
12
|
+
if (e.target.type !== 'checkbox') {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
state.active = e.target?.checked;
|
|
16
16
|
}}'
|
|
17
17
|
style='${data?.style || ''}'
|
|
18
18
|
>
|
|
@@ -37,5 +37,5 @@ export default (data) => {
|
|
|
37
37
|
|
|
38
38
|
${description(data)}
|
|
39
39
|
</div>
|
|
40
|
-
`;
|
|
41
|
-
};
|
|
40
|
+
`;
|
|
41
|
+
};
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
declare const _default: (data: {
|
|
2
|
-
description?: string;
|
|
3
|
-
}) => "" |
|
|
4
|
-
|
|
5
|
-
type: string;
|
|
6
|
-
values: never[];
|
|
7
|
-
};
|
|
8
|
-
export default _default;
|
|
1
|
+
declare const _default: (data: {
|
|
2
|
+
description?: string;
|
|
3
|
+
}) => "" | import("@esportsplus/template/build/types").Template;
|
|
4
|
+
export default _default;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { html } from '@esportsplus/template';
|
|
2
|
-
export default (data) => {
|
|
3
|
-
if (!data?.description) {
|
|
4
|
-
return '';
|
|
5
|
-
}
|
|
1
|
+
import { html } from '@esportsplus/template';
|
|
2
|
+
export default (data) => {
|
|
3
|
+
if (!data?.description) {
|
|
4
|
+
return '';
|
|
5
|
+
}
|
|
6
6
|
return html `
|
|
7
7
|
<div class='field-description --margin-top --margin-300'>${data.description}</div>
|
|
8
|
-
`;
|
|
9
|
-
};
|
|
8
|
+
`;
|
|
9
|
+
};
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
declare const _default: (data: {
|
|
2
|
-
error: string;
|
|
3
|
-
}) => () => "" |
|
|
4
|
-
|
|
5
|
-
type: string;
|
|
6
|
-
values: never[];
|
|
7
|
-
};
|
|
8
|
-
export default _default;
|
|
1
|
+
declare const _default: (data: {
|
|
2
|
+
error: string;
|
|
3
|
+
}) => () => "" | import("@esportsplus/template/build/types").Template;
|
|
4
|
+
export default _default;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { html } from '@esportsplus/template';
|
|
2
|
-
export default (data) => {
|
|
3
|
-
return () => {
|
|
4
|
-
if (!data.error) {
|
|
5
|
-
return '';
|
|
6
|
-
}
|
|
1
|
+
import { html } from '@esportsplus/template';
|
|
2
|
+
export default (data) => {
|
|
3
|
+
return () => {
|
|
4
|
+
if (!data.error) {
|
|
5
|
+
return '';
|
|
6
|
+
}
|
|
7
7
|
return html `
|
|
8
8
|
<div class='field-error --margin-top --margin-300 --text-bold'>${data.error}</div>
|
|
9
|
-
`;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
9
|
+
`;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -1,22 +1,18 @@
|
|
|
1
|
-
import description from './description';
|
|
2
|
-
import title from './title';
|
|
3
|
-
type Data = {
|
|
4
|
-
accept?: string;
|
|
5
|
-
class?: string;
|
|
6
|
-
mask?: {
|
|
7
|
-
class?: string;
|
|
8
|
-
content?: any;
|
|
9
|
-
style?: string;
|
|
10
|
-
};
|
|
11
|
-
name?: string;
|
|
12
|
-
placeholder?: string;
|
|
13
|
-
style?: string;
|
|
14
|
-
type?: string;
|
|
15
|
-
value?: unknown;
|
|
16
|
-
} & Parameters<typeof description>[0] & Parameters<typeof title>[0];
|
|
17
|
-
declare const _default: (data: Data) =>
|
|
18
|
-
|
|
19
|
-
type: string;
|
|
20
|
-
values: never[];
|
|
21
|
-
};
|
|
22
|
-
export default _default;
|
|
1
|
+
import description from './description';
|
|
2
|
+
import title from './title';
|
|
3
|
+
type Data = {
|
|
4
|
+
accept?: string;
|
|
5
|
+
class?: string;
|
|
6
|
+
mask?: {
|
|
7
|
+
class?: string;
|
|
8
|
+
content?: any;
|
|
9
|
+
style?: string;
|
|
10
|
+
};
|
|
11
|
+
name?: string;
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
style?: string;
|
|
14
|
+
type?: string;
|
|
15
|
+
value?: unknown;
|
|
16
|
+
} & Parameters<typeof description>[0] & Parameters<typeof title>[0];
|
|
17
|
+
declare const _default: (data: Data) => import("@esportsplus/template/build/types").Template;
|
|
18
|
+
export default _default;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { reactive } from '@esportsplus/reactivity';
|
|
2
|
-
import { html } from '@esportsplus/template';
|
|
3
|
-
import { form } from '../../components';
|
|
4
|
-
import description from './description';
|
|
5
|
-
import error from './error';
|
|
6
|
-
import title from './title';
|
|
7
|
-
export default (data) => {
|
|
8
|
-
let state = reactive({
|
|
9
|
-
active: false,
|
|
10
|
-
error: ''
|
|
11
|
-
});
|
|
1
|
+
import { reactive } from '@esportsplus/reactivity';
|
|
2
|
+
import { html } from '@esportsplus/template';
|
|
3
|
+
import { form } from '../../components';
|
|
4
|
+
import description from './description';
|
|
5
|
+
import error from './error';
|
|
6
|
+
import title from './title';
|
|
7
|
+
export default (data) => {
|
|
8
|
+
let state = reactive({
|
|
9
|
+
active: false,
|
|
10
|
+
error: ''
|
|
11
|
+
});
|
|
12
12
|
return html `
|
|
13
13
|
<div
|
|
14
14
|
class="field ${data?.class || ''} ${() => state.active ? '--active' : ''} --flex-column"
|
|
15
|
-
onfocusin='${() => {
|
|
16
|
-
state.active = true;
|
|
15
|
+
onfocusin='${() => {
|
|
16
|
+
state.active = true;
|
|
17
17
|
}}'
|
|
18
|
-
onfocusout='${() => {
|
|
19
|
-
state.active = false;
|
|
18
|
+
onfocusout='${() => {
|
|
19
|
+
state.active = false;
|
|
20
20
|
}}'
|
|
21
21
|
style='${data?.style || ''}'
|
|
22
22
|
>
|
|
@@ -41,5 +41,5 @@ export default (data) => {
|
|
|
41
41
|
${description(data)}
|
|
42
42
|
${error(state)}
|
|
43
43
|
</div>
|
|
44
|
-
`;
|
|
45
|
-
};
|
|
44
|
+
`;
|
|
45
|
+
};
|