@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,100 +1,92 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
select: (data: {
|
|
3
|
-
class?: string | undefined;
|
|
4
|
-
field?: {
|
|
5
|
-
content?: any;
|
|
6
|
-
} | undefined;
|
|
7
|
-
mask?: {
|
|
8
|
-
class?: string | undefined;
|
|
9
|
-
style?: string | undefined;
|
|
10
|
-
} | undefined;
|
|
11
|
-
name?: string | undefined;
|
|
12
|
-
style?: string | undefined;
|
|
13
|
-
title: string;
|
|
14
|
-
value?: any;
|
|
15
|
-
} & {
|
|
16
|
-
description?: string | undefined;
|
|
17
|
-
} & {
|
|
18
|
-
field: {
|
|
19
|
-
class?: string | undefined;
|
|
20
|
-
effect?: ((selected: string | number) => void) | undefined;
|
|
21
|
-
mask?: {
|
|
22
|
-
class?: string | undefined;
|
|
23
|
-
content?: any;
|
|
24
|
-
style?: string | undefined;
|
|
25
|
-
} | undefined;
|
|
26
|
-
name?: string | undefined;
|
|
27
|
-
options: Record<string | number, string | number>;
|
|
28
|
-
option?: {
|
|
29
|
-
class?: string | undefined;
|
|
30
|
-
style?: string | undefined;
|
|
31
|
-
} | undefined;
|
|
32
|
-
selected?: any;
|
|
33
|
-
scrollbar?: {
|
|
34
|
-
style?: string | undefined;
|
|
35
|
-
} | undefined;
|
|
36
|
-
style?: string | undefined;
|
|
37
|
-
text?: {
|
|
38
|
-
class?: string | undefined;
|
|
39
|
-
} | undefined;
|
|
40
|
-
tooltip?: {
|
|
41
|
-
class?: string | undefined;
|
|
42
|
-
direction?: any;
|
|
43
|
-
style?: string | undefined;
|
|
44
|
-
} | undefined;
|
|
45
|
-
} & {
|
|
46
|
-
description?: string | undefined;
|
|
47
|
-
} & {
|
|
48
|
-
required?: boolean | undefined;
|
|
49
|
-
title?: string | undefined;
|
|
50
|
-
};
|
|
51
|
-
}) =>
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
} | undefined;
|
|
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
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
};
|
|
94
|
-
}) => {
|
|
95
|
-
content: string;
|
|
96
|
-
type: string;
|
|
97
|
-
values: never[];
|
|
98
|
-
};
|
|
99
|
-
};
|
|
100
|
-
export default _default;
|
|
1
|
+
declare const _default: {
|
|
2
|
+
select: (data: {
|
|
3
|
+
class?: string | undefined;
|
|
4
|
+
field?: {
|
|
5
|
+
content?: any;
|
|
6
|
+
} | undefined;
|
|
7
|
+
mask?: {
|
|
8
|
+
class?: string | undefined;
|
|
9
|
+
style?: string | undefined;
|
|
10
|
+
} | undefined;
|
|
11
|
+
name?: string | undefined;
|
|
12
|
+
style?: string | undefined;
|
|
13
|
+
title: string;
|
|
14
|
+
value?: any;
|
|
15
|
+
} & {
|
|
16
|
+
description?: string | undefined;
|
|
17
|
+
} & {
|
|
18
|
+
field: {
|
|
19
|
+
class?: string | undefined;
|
|
20
|
+
effect?: ((selected: string | number) => void) | undefined;
|
|
21
|
+
mask?: {
|
|
22
|
+
class?: string | undefined;
|
|
23
|
+
content?: any;
|
|
24
|
+
style?: string | undefined;
|
|
25
|
+
} | undefined;
|
|
26
|
+
name?: string | undefined;
|
|
27
|
+
options: Record<string | number, string | number>;
|
|
28
|
+
option?: {
|
|
29
|
+
class?: string | undefined;
|
|
30
|
+
style?: string | undefined;
|
|
31
|
+
} | undefined;
|
|
32
|
+
selected?: any;
|
|
33
|
+
scrollbar?: {
|
|
34
|
+
style?: string | undefined;
|
|
35
|
+
} | undefined;
|
|
36
|
+
style?: string | undefined;
|
|
37
|
+
text?: {
|
|
38
|
+
class?: string | undefined;
|
|
39
|
+
} | undefined;
|
|
40
|
+
tooltip?: {
|
|
41
|
+
class?: string | undefined;
|
|
42
|
+
direction?: any;
|
|
43
|
+
style?: string | undefined;
|
|
44
|
+
} | undefined;
|
|
45
|
+
} & {
|
|
46
|
+
description?: string | undefined;
|
|
47
|
+
} & {
|
|
48
|
+
required?: boolean | undefined;
|
|
49
|
+
title?: string | undefined;
|
|
50
|
+
};
|
|
51
|
+
}) => import("@esportsplus/template/build/types").Template;
|
|
52
|
+
text: (data: {
|
|
53
|
+
class?: string | undefined;
|
|
54
|
+
field?: {
|
|
55
|
+
content?: any;
|
|
56
|
+
} | undefined;
|
|
57
|
+
mask?: {
|
|
58
|
+
class?: string | undefined;
|
|
59
|
+
style?: string | undefined;
|
|
60
|
+
} | undefined;
|
|
61
|
+
name?: string | undefined;
|
|
62
|
+
style?: string | undefined;
|
|
63
|
+
title: string;
|
|
64
|
+
value?: any;
|
|
65
|
+
} & {
|
|
66
|
+
description?: string | undefined;
|
|
67
|
+
} & {
|
|
68
|
+
field: {
|
|
69
|
+
class?: string | undefined;
|
|
70
|
+
mask?: {
|
|
71
|
+
class?: string | undefined;
|
|
72
|
+
content?: any;
|
|
73
|
+
style?: string | undefined;
|
|
74
|
+
} | undefined;
|
|
75
|
+
name?: string | undefined;
|
|
76
|
+
placeholder?: string | undefined;
|
|
77
|
+
style?: string | undefined;
|
|
78
|
+
tag?: {
|
|
79
|
+
class?: string | undefined;
|
|
80
|
+
} | undefined;
|
|
81
|
+
textarea?: boolean | undefined;
|
|
82
|
+
type?: string | undefined;
|
|
83
|
+
value?: unknown;
|
|
84
|
+
} & {
|
|
85
|
+
description?: string | undefined;
|
|
86
|
+
} & {
|
|
87
|
+
required?: boolean | undefined;
|
|
88
|
+
title?: string | undefined;
|
|
89
|
+
};
|
|
90
|
+
}) => import("@esportsplus/template/build/types").Template;
|
|
91
|
+
};
|
|
92
|
+
export default _default;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import sel from './select';
|
|
2
|
-
import s from './switch';
|
|
3
|
-
import tex from './text';
|
|
4
|
-
const select = (data) => {
|
|
5
|
-
data.field.content = sel(Object.assign(data.field || {}, {
|
|
6
|
-
class: `field--optional ${data?.field?.class || ''}`
|
|
7
|
-
}));
|
|
8
|
-
return s(data);
|
|
9
|
-
};
|
|
10
|
-
const text = (data) => {
|
|
11
|
-
data.field.content = tex(Object.assign(data.field || {}, {
|
|
12
|
-
class: `field--optional ${data?.field?.class || ''}`
|
|
13
|
-
}));
|
|
14
|
-
return s(data);
|
|
15
|
-
};
|
|
16
|
-
export default { select, text };
|
|
1
|
+
import sel from './select';
|
|
2
|
+
import s from './switch';
|
|
3
|
+
import tex from './text';
|
|
4
|
+
const select = (data) => {
|
|
5
|
+
data.field.content = sel(Object.assign(data.field || {}, {
|
|
6
|
+
class: `field--optional ${data?.field?.class || ''}`
|
|
7
|
+
}));
|
|
8
|
+
return s(data);
|
|
9
|
+
};
|
|
10
|
+
const text = (data) => {
|
|
11
|
+
data.field.content = tex(Object.assign(data.field || {}, {
|
|
12
|
+
class: `field--optional ${data?.field?.class || ''}`
|
|
13
|
+
}));
|
|
14
|
+
return s(data);
|
|
15
|
+
};
|
|
16
|
+
export default { select, text };
|
|
@@ -1,36 +1,32 @@
|
|
|
1
|
-
import description from './description';
|
|
2
|
-
import title from './title';
|
|
3
|
-
type Data = {
|
|
4
|
-
class?: string;
|
|
5
|
-
effect?: (selected: number | string) => void;
|
|
6
|
-
mask?: {
|
|
7
|
-
class?: string;
|
|
8
|
-
content?: any;
|
|
9
|
-
style?: string;
|
|
10
|
-
};
|
|
11
|
-
name?: string;
|
|
12
|
-
options: Record<number | string, number | string>;
|
|
13
|
-
option?: {
|
|
14
|
-
class?: string;
|
|
15
|
-
style?: string;
|
|
16
|
-
};
|
|
17
|
-
selected?: any;
|
|
18
|
-
scrollbar?: {
|
|
19
|
-
style?: string;
|
|
20
|
-
};
|
|
21
|
-
style?: string;
|
|
22
|
-
text?: {
|
|
23
|
-
class?: string;
|
|
24
|
-
};
|
|
25
|
-
tooltip?: {
|
|
26
|
-
class?: string;
|
|
27
|
-
direction?: any;
|
|
28
|
-
style?: string;
|
|
29
|
-
};
|
|
30
|
-
} & Parameters<typeof description>[0] & Parameters<typeof title>[0];
|
|
31
|
-
declare const _default: (data: Data) =>
|
|
32
|
-
|
|
33
|
-
type: string;
|
|
34
|
-
values: never[];
|
|
35
|
-
};
|
|
36
|
-
export default _default;
|
|
1
|
+
import description from './description';
|
|
2
|
+
import title from './title';
|
|
3
|
+
type Data = {
|
|
4
|
+
class?: string;
|
|
5
|
+
effect?: (selected: number | string) => void;
|
|
6
|
+
mask?: {
|
|
7
|
+
class?: string;
|
|
8
|
+
content?: any;
|
|
9
|
+
style?: string;
|
|
10
|
+
};
|
|
11
|
+
name?: string;
|
|
12
|
+
options: Record<number | string, number | string>;
|
|
13
|
+
option?: {
|
|
14
|
+
class?: string;
|
|
15
|
+
style?: string;
|
|
16
|
+
};
|
|
17
|
+
selected?: any;
|
|
18
|
+
scrollbar?: {
|
|
19
|
+
style?: string;
|
|
20
|
+
};
|
|
21
|
+
style?: string;
|
|
22
|
+
text?: {
|
|
23
|
+
class?: string;
|
|
24
|
+
};
|
|
25
|
+
tooltip?: {
|
|
26
|
+
class?: string;
|
|
27
|
+
direction?: any;
|
|
28
|
+
style?: string;
|
|
29
|
+
};
|
|
30
|
+
} & Parameters<typeof description>[0] & Parameters<typeof title>[0];
|
|
31
|
+
declare const _default: (data: Data) => import("@esportsplus/template/build/types").Template;
|
|
32
|
+
export default _default;
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { reactive } from '@esportsplus/reactivity';
|
|
2
|
-
import { html } from '@esportsplus/template';
|
|
3
|
-
import { form, scrollbar, root } from '../../components';
|
|
4
|
-
import description from './description';
|
|
5
|
-
import error from './error';
|
|
6
|
-
import title from './title';
|
|
7
|
-
function parse(keys, selected) {
|
|
8
|
-
let options = {};
|
|
9
|
-
for (let key of keys) {
|
|
10
|
-
options[key] = false;
|
|
11
|
-
}
|
|
12
|
-
options[selected] = true;
|
|
13
|
-
return {
|
|
14
|
-
options,
|
|
15
|
-
selected: selected || keys[0]
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
function template(data, state) {
|
|
19
|
-
let { attributes: a, html: h } = scrollbar({
|
|
20
|
-
fixed: true,
|
|
21
|
-
style: data?.scrollbar?.style || '--background-default: var(--color-black-400);'
|
|
22
|
-
});
|
|
1
|
+
import { reactive } from '@esportsplus/reactivity';
|
|
2
|
+
import { html } from '@esportsplus/template';
|
|
3
|
+
import { form, scrollbar, root } from '../../components';
|
|
4
|
+
import description from './description';
|
|
5
|
+
import error from './error';
|
|
6
|
+
import title from './title';
|
|
7
|
+
function parse(keys, selected) {
|
|
8
|
+
let options = {};
|
|
9
|
+
for (let key of keys) {
|
|
10
|
+
options[key] = false;
|
|
11
|
+
}
|
|
12
|
+
options[selected] = true;
|
|
13
|
+
return {
|
|
14
|
+
options,
|
|
15
|
+
selected: selected || keys[0]
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function template(data, state) {
|
|
19
|
+
let { attributes: a, html: h } = scrollbar({
|
|
20
|
+
fixed: true,
|
|
21
|
+
style: data?.scrollbar?.style || '--background-default: var(--color-black-400);'
|
|
22
|
+
});
|
|
23
23
|
return html `
|
|
24
24
|
<div
|
|
25
25
|
class='tooltip-content tooltip-content--${data?.tooltip?.direction || 's'} ${data?.tooltip?.class || ''} --flex-column --width-full'
|
|
@@ -27,18 +27,18 @@ function template(data, state) {
|
|
|
27
27
|
>
|
|
28
28
|
<div
|
|
29
29
|
class='row --flex-column'
|
|
30
|
-
onclick='${(e) => {
|
|
31
|
-
let key = e?.target?.dataset?.key;
|
|
32
|
-
if (key === undefined) {
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
state.options[key] = true;
|
|
36
|
-
state.options[state.selected] = false;
|
|
37
|
-
state.active = false;
|
|
38
|
-
state.selected = key;
|
|
39
|
-
if (data.effect) {
|
|
40
|
-
data.effect(key);
|
|
41
|
-
}
|
|
30
|
+
onclick='${(e) => {
|
|
31
|
+
let key = e?.target?.dataset?.key;
|
|
32
|
+
if (key === undefined) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
state.options[key] = true;
|
|
36
|
+
state.options[state.selected] = false;
|
|
37
|
+
state.active = false;
|
|
38
|
+
state.selected = key;
|
|
39
|
+
if (data.effect) {
|
|
40
|
+
data.effect(key);
|
|
41
|
+
}
|
|
42
42
|
}}'
|
|
43
43
|
${a}
|
|
44
44
|
>
|
|
@@ -56,26 +56,26 @@ function template(data, state) {
|
|
|
56
56
|
|
|
57
57
|
${h}
|
|
58
58
|
</div>
|
|
59
|
-
`;
|
|
60
|
-
}
|
|
61
|
-
export default (data) => {
|
|
62
|
-
let state = reactive(Object.assign({
|
|
63
|
-
active: false,
|
|
64
|
-
error: '',
|
|
65
|
-
render: false,
|
|
66
|
-
}, parse(Object.keys(data.options || {}), data.selected)));
|
|
59
|
+
`;
|
|
60
|
+
}
|
|
61
|
+
export default (data) => {
|
|
62
|
+
let state = reactive(Object.assign({
|
|
63
|
+
active: false,
|
|
64
|
+
error: '',
|
|
65
|
+
render: false,
|
|
66
|
+
}, parse(Object.keys(data.options || {}), data.selected)));
|
|
67
67
|
return html `
|
|
68
68
|
<div class="field tooltip ${data?.class || ''} ${() => state.active ? '--active' : ''} --flex-column" style='${data?.style || ''}'>
|
|
69
69
|
${title(data)}
|
|
70
70
|
|
|
71
71
|
<label
|
|
72
72
|
class="field-mask field-mask--select --flex-row ${data?.mask?.class || ''} ${(data?.title || (data?.class || '').indexOf('field--optional') !== -1) && '--margin-top'} --margin-300 --padding-400"
|
|
73
|
-
onclick='${() => {
|
|
74
|
-
state.render = true;
|
|
75
|
-
state.active = !state.active;
|
|
76
|
-
if (state.active) {
|
|
77
|
-
root.queue.onclick(() => state.active = false);
|
|
78
|
-
}
|
|
73
|
+
onclick='${() => {
|
|
74
|
+
state.render = true;
|
|
75
|
+
state.active = !state.active;
|
|
76
|
+
if (state.active) {
|
|
77
|
+
root.queue.onclick(() => state.active = false);
|
|
78
|
+
}
|
|
79
79
|
}}'
|
|
80
80
|
style='${data?.mask?.style || ''}'
|
|
81
81
|
>
|
|
@@ -99,5 +99,5 @@ export default (data) => {
|
|
|
99
99
|
${description(data)}
|
|
100
100
|
${error(state)}
|
|
101
101
|
</div>
|
|
102
|
-
`;
|
|
103
|
-
};
|
|
102
|
+
`;
|
|
103
|
+
};
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import checkbox from './checkbox';
|
|
2
|
-
declare const _default: (data: Parameters<typeof checkbox>[0]) =>
|
|
3
|
-
|
|
4
|
-
type: string;
|
|
5
|
-
values: never[];
|
|
6
|
-
};
|
|
7
|
-
export default _default;
|
|
1
|
+
import checkbox from './checkbox';
|
|
2
|
+
declare const _default: (data: Parameters<typeof checkbox>[0]) => import("@esportsplus/template/build/types").Template;
|
|
3
|
+
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import checkbox from './checkbox';
|
|
2
|
-
export default (data) => {
|
|
3
|
-
data.mask = data.mask || {};
|
|
4
|
-
data.mask.class = `field-mask--switch ${data.mask?.class || ''}`;
|
|
5
|
-
return checkbox(data);
|
|
6
|
-
};
|
|
1
|
+
import checkbox from './checkbox';
|
|
2
|
+
export default (data) => {
|
|
3
|
+
data.mask = data.mask || {};
|
|
4
|
+
data.mask.class = `field-mask--switch ${data.mask?.class || ''}`;
|
|
5
|
+
return checkbox(data);
|
|
6
|
+
};
|
|
@@ -1,25 +1,21 @@
|
|
|
1
|
-
import description from './description';
|
|
2
|
-
import title from './title';
|
|
3
|
-
type Data = {
|
|
4
|
-
class?: string;
|
|
5
|
-
mask?: {
|
|
6
|
-
class?: string;
|
|
7
|
-
content?: any;
|
|
8
|
-
style?: string;
|
|
9
|
-
};
|
|
10
|
-
name?: string;
|
|
11
|
-
placeholder?: string;
|
|
12
|
-
style?: string;
|
|
13
|
-
tag?: {
|
|
14
|
-
class?: string;
|
|
15
|
-
};
|
|
16
|
-
textarea?: boolean;
|
|
17
|
-
type?: string;
|
|
18
|
-
value?: unknown;
|
|
19
|
-
} & Parameters<typeof description>[0] & Parameters<typeof title>[0];
|
|
20
|
-
declare const _default: (data: Data) =>
|
|
21
|
-
|
|
22
|
-
type: string;
|
|
23
|
-
values: never[];
|
|
24
|
-
};
|
|
25
|
-
export default _default;
|
|
1
|
+
import description from './description';
|
|
2
|
+
import title from './title';
|
|
3
|
+
type Data = {
|
|
4
|
+
class?: string;
|
|
5
|
+
mask?: {
|
|
6
|
+
class?: string;
|
|
7
|
+
content?: any;
|
|
8
|
+
style?: string;
|
|
9
|
+
};
|
|
10
|
+
name?: string;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
style?: string;
|
|
13
|
+
tag?: {
|
|
14
|
+
class?: string;
|
|
15
|
+
};
|
|
16
|
+
textarea?: boolean;
|
|
17
|
+
type?: string;
|
|
18
|
+
value?: unknown;
|
|
19
|
+
} & Parameters<typeof description>[0] & Parameters<typeof title>[0];
|
|
20
|
+
declare const _default: (data: Data) => import("@esportsplus/template/build/types").Template;
|
|
21
|
+
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
|
>
|
|
@@ -42,5 +42,5 @@ export default (data) => {
|
|
|
42
42
|
${description(data)}
|
|
43
43
|
${error(state)}
|
|
44
44
|
</div>
|
|
45
|
-
`;
|
|
46
|
-
};
|
|
45
|
+
`;
|
|
46
|
+
};
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import text from './text';
|
|
2
|
-
declare const _default: (data: Parameters<typeof text>[0]) =>
|
|
3
|
-
|
|
4
|
-
type: string;
|
|
5
|
-
values: never[];
|
|
6
|
-
};
|
|
7
|
-
export default _default;
|
|
1
|
+
import text from './text';
|
|
2
|
+
declare const _default: (data: Parameters<typeof text>[0]) => import("@esportsplus/template/build/types").Template;
|
|
3
|
+
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import text from './text';
|
|
2
|
-
export default (data) => {
|
|
3
|
-
data.textarea = true;
|
|
4
|
-
return text(data);
|
|
5
|
-
};
|
|
1
|
+
import text from './text';
|
|
2
|
+
export default (data) => {
|
|
3
|
+
data.textarea = true;
|
|
4
|
+
return text(data);
|
|
5
|
+
};
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
declare const _default: (data: {
|
|
2
|
-
required?: boolean;
|
|
3
|
-
title?: string;
|
|
4
|
-
}) => "" |
|
|
5
|
-
|
|
6
|
-
type: string;
|
|
7
|
-
values: never[];
|
|
8
|
-
};
|
|
9
|
-
export default _default;
|
|
1
|
+
declare const _default: (data: {
|
|
2
|
+
required?: boolean;
|
|
3
|
+
title?: string;
|
|
4
|
+
}) => "" | import("@esportsplus/template/build/types").Template;
|
|
5
|
+
export default _default;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { html } from '@esportsplus/template';
|
|
2
|
-
import { tooltip } from '../../components';
|
|
3
|
-
export default (data) => {
|
|
4
|
-
if (!data?.title) {
|
|
5
|
-
return '';
|
|
6
|
-
}
|
|
7
|
-
let { attributes } = tooltip.onhover();
|
|
1
|
+
import { html } from '@esportsplus/template';
|
|
2
|
+
import { tooltip } from '../../components';
|
|
3
|
+
export default (data) => {
|
|
4
|
+
if (!data?.title) {
|
|
5
|
+
return '';
|
|
6
|
+
}
|
|
7
|
+
let { attributes } = tooltip.onhover();
|
|
8
8
|
return html `
|
|
9
9
|
<div class="field-title --flex-horizontal-space-between --flex-vertical">
|
|
10
10
|
${data.title}
|
|
@@ -15,5 +15,5 @@ export default (data) => {
|
|
|
15
15
|
</div>
|
|
16
16
|
`}
|
|
17
17
|
</div>
|
|
18
|
-
`;
|
|
19
|
-
};
|
|
18
|
+
`;
|
|
19
|
+
};
|
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
import { Action } from './types';
|
|
2
|
-
export default function (action: Action):
|
|
3
|
-
content: string;
|
|
4
|
-
type: string;
|
|
5
|
-
values: never[];
|
|
6
|
-
};
|
|
1
|
+
import { Action } from './types';
|
|
2
|
+
export default function (action: Action): import("@esportsplus/template/build/types").Template;
|