@esportsplus/ui 0.0.86 → 0.0.89
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 +1 -1
- package/build/components/alert/index.js +8 -6
- package/build/components/field/checkbox.d.ts +1 -1
- package/build/components/field/checkbox.js +12 -7
- package/build/components/field/description.d.ts +1 -1
- package/build/components/field/description.js +5 -3
- package/build/components/field/error.d.ts +1 -1
- package/build/components/field/error.js +5 -3
- package/build/components/field/file.d.ts +1 -1
- package/build/components/field/file.js +18 -13
- package/build/components/field/index.d.ts +8 -8
- package/build/components/field/index.js +13 -8
- package/build/components/field/optional.d.ts +2 -2
- package/build/components/field/optional.js +13 -8
- package/build/components/field/select.d.ts +1 -1
- package/build/components/field/select.js +22 -17
- package/build/components/field/switch.d.ts +1 -1
- package/build/components/field/switch.js +8 -3
- package/build/components/field/text.d.ts +1 -1
- package/build/components/field/text.js +20 -15
- package/build/components/field/textarea.d.ts +1 -1
- package/build/components/field/textarea.js +8 -3
- package/build/components/field/title.d.ts +1 -1
- package/build/components/field/title.js +8 -6
- package/build/components/form/action.d.ts +4 -1
- package/build/components/form/action.js +35 -30
- package/build/components/form/index.d.ts +1 -1
- package/build/components/form/index.js +9 -4
- package/build/components/form/input.js +3 -1
- package/build/components/form/layout.d.ts +1 -1
- package/build/components/form/layout.js +7 -5
- package/build/components/form/types.js +2 -1
- package/build/components/index.js +24 -9
- package/build/components/overlay/index.d.ts +1 -1
- package/build/components/overlay/index.js +4 -2
- package/build/components/page/header.d.ts +1 -1
- package/build/components/page/header.js +7 -5
- package/build/components/page/index.d.ts +2 -2
- package/build/components/page/index.js +11 -4
- package/build/components/page/layout.d.ts +1 -1
- package/build/components/page/layout.js +4 -2
- package/build/components/root/index.js +9 -3
- package/build/components/root/queue.js +3 -11
- package/build/components/scrollbar/index.d.ts +5 -2
- package/build/components/scrollbar/index.js +20 -18
- package/build/components/site/index.d.ts +1 -1
- package/build/components/site/index.js +8 -6
- package/build/components/tooltip/index.d.ts +14 -7
- package/build/components/tooltip/index.js +45 -41
- package/build/components/tooltip/menu.d.ts +1 -1
- package/build/components/tooltip/menu.js +11 -9
- package/build/index.d.ts +0 -1
- package/build/index.js +17 -2
- package/build/types.d.ts +1 -0
- package/build/types.js +1 -0
- package/css/components/styles.css +1 -26
- package/css/components/variables.css +1 -23
- package/css/fonts/montserrat.css +1 -1
- package/css/normalizer.css +1 -1
- package/css/utilities/styles.css +1 -15
- package/css/utilities/variables.css +1 -11
- package/package.json +5 -6
- package/src/components/form/action.ts +6 -7
- package/src/components/root/queue.ts +10 -10
- package/src/components/scrollbar/index.ts +6 -6
- package/src/components/site/index.ts +1 -1
- package/src/components/tooltip/index.ts +14 -15
- package/src/index.ts +0 -3
- package/tsconfig.json +3 -2
- package/webpack.config.ts +28 -23
- package/css/0177605565c3081637cf.css +0 -1
- package/css/components/2dcc6798ba04880cdf5a.css +0 -23
- package/css/components/b296e959a632e7fdbe65.css +0 -26
- package/css/fonts/716af1291514abb1e027.css +0 -1
- package/css/utilities/822835c12ae0b64188b4.css +0 -11
- package/css/utilities/98f5bec25ab2703bc173.css +0 -15
- package/src/types.ts +0 -5
|
@@ -2,7 +2,7 @@ declare function deactivate(): void;
|
|
|
2
2
|
declare const _default: {
|
|
3
3
|
deactivate: typeof deactivate;
|
|
4
4
|
error: (messages: string | string[], seconds?: number) => void;
|
|
5
|
-
html: () => () => "" | import("@esportsplus/template/build/types").
|
|
5
|
+
html: () => () => "" | import("@esportsplus/template/build/types").Renderable;
|
|
6
6
|
info: (messages: string | string[], seconds?: number) => void;
|
|
7
7
|
success: (messages: string | string[], seconds?: number) => void;
|
|
8
8
|
types: readonly ["error", "info", "success"];
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const reactivity_1 = require("@esportsplus/reactivity");
|
|
4
|
+
const template_1 = require("@esportsplus/template");
|
|
3
5
|
let modifiers = {
|
|
4
6
|
error: 'red',
|
|
5
7
|
info: 'black',
|
|
6
8
|
success: 'green'
|
|
7
|
-
}, state = reactive({
|
|
9
|
+
}, state = (0, reactivity_1.reactive)({
|
|
8
10
|
active: false,
|
|
9
11
|
messages: new Set,
|
|
10
12
|
seconds: 0,
|
|
@@ -86,7 +88,7 @@ const error = (messages, seconds = 0) => activate('error', messages, seconds);
|
|
|
86
88
|
const info = (messages, seconds = 0) => activate('info', messages, seconds);
|
|
87
89
|
const success = (messages, seconds = 0) => activate('success', messages, seconds);
|
|
88
90
|
const h = () => {
|
|
89
|
-
return () => state.active ? html `
|
|
91
|
+
return () => state.active ? (0, template_1.html) `
|
|
90
92
|
<div class='alert anchor anchor--ne ${() => state.active && '--active'} ${() => `alert--${state.state}`}'>
|
|
91
93
|
<div class="alert-close --flex-start --margin-right --margin-100" onclick='${deactivate}'>
|
|
92
94
|
<div class='button --background-state ${() => `--background-${modifiers[state.type] || 'black'}`} --color-state --color-white --flex-center --padding-300'>
|
|
@@ -106,7 +108,7 @@ const h = () => {
|
|
|
106
108
|
<h5 class="page-title">
|
|
107
109
|
${() => state.type.charAt(0).toUpperCase() + state.type.slice(1)}
|
|
108
110
|
</h5>
|
|
109
|
-
${() => state.type && [...state.messages].map((message) => html `
|
|
111
|
+
${() => state.type && [...state.messages].map((message) => (0, template_1.html) `
|
|
110
112
|
<p class='--margin-top --margin-border-width-500'>${message}</p>
|
|
111
113
|
`)}
|
|
112
114
|
</div>
|
|
@@ -117,4 +119,4 @@ const h = () => {
|
|
|
117
119
|
` : '';
|
|
118
120
|
};
|
|
119
121
|
const types = ['error', 'info', 'success'];
|
|
120
|
-
|
|
122
|
+
exports.default = { deactivate, error, html: h, info, success, types };
|
|
@@ -13,5 +13,5 @@ type Data = {
|
|
|
13
13
|
title: string;
|
|
14
14
|
value?: any;
|
|
15
15
|
} & Parameters<typeof description>[0];
|
|
16
|
-
declare const _default: (data: Data) => import("@esportsplus/template/build/types").
|
|
16
|
+
declare const _default: (data: Data) => import("@esportsplus/template/build/types").Renderable;
|
|
17
17
|
export default _default;
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const reactivity_1 = require("@esportsplus/reactivity");
|
|
7
|
+
const template_1 = require("@esportsplus/template");
|
|
8
|
+
const description_1 = __importDefault(require("./description"));
|
|
9
|
+
exports.default = (data) => {
|
|
10
|
+
let state = (0, reactivity_1.reactive)({
|
|
6
11
|
active: false
|
|
7
12
|
});
|
|
8
|
-
return html `
|
|
13
|
+
return (0, template_1.html) `
|
|
9
14
|
<div
|
|
10
15
|
class="field --flex-column ${data?.class || ''} ${() => state.active ? '--active' : ''}"
|
|
11
16
|
onchange='${(e) => {
|
|
@@ -35,7 +40,7 @@ export default (data) => {
|
|
|
35
40
|
|
|
36
41
|
${data?.field?.content || ''}
|
|
37
42
|
|
|
38
|
-
${
|
|
43
|
+
${(0, description_1.default)(data)}
|
|
39
44
|
</div>
|
|
40
45
|
`;
|
|
41
46
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const template_1 = require("@esportsplus/template");
|
|
4
|
+
exports.default = (data) => {
|
|
3
5
|
if (!data?.description) {
|
|
4
6
|
return '';
|
|
5
7
|
}
|
|
6
|
-
return html `
|
|
8
|
+
return (0, template_1.html) `
|
|
7
9
|
<div class='field-description --margin-top --margin-300'>${data.description}</div>
|
|
8
10
|
`;
|
|
9
11
|
};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const template_1 = require("@esportsplus/template");
|
|
4
|
+
exports.default = (data) => {
|
|
3
5
|
return () => {
|
|
4
6
|
if (!data.error) {
|
|
5
7
|
return '';
|
|
6
8
|
}
|
|
7
|
-
return html `
|
|
9
|
+
return (0, template_1.html) `
|
|
8
10
|
<div class='field-error --margin-top --margin-300 --text-bold'>${data.error}</div>
|
|
9
11
|
`;
|
|
10
12
|
};
|
|
@@ -14,5 +14,5 @@ type Data = {
|
|
|
14
14
|
type?: string;
|
|
15
15
|
value?: unknown;
|
|
16
16
|
} & Parameters<typeof description>[0] & Parameters<typeof title>[0];
|
|
17
|
-
declare const _default: (data: Data) => import("@esportsplus/template/build/types").
|
|
17
|
+
declare const _default: (data: Data) => import("@esportsplus/template/build/types").Renderable;
|
|
18
18
|
export default _default;
|
|
@@ -1,15 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const reactivity_1 = require("@esportsplus/reactivity");
|
|
7
|
+
const template_1 = require("@esportsplus/template");
|
|
8
|
+
const components_1 = require("../../components");
|
|
9
|
+
const description_1 = __importDefault(require("./description"));
|
|
10
|
+
const error_1 = __importDefault(require("./error"));
|
|
11
|
+
const title_1 = __importDefault(require("./title"));
|
|
12
|
+
exports.default = (data) => {
|
|
13
|
+
let state = (0, reactivity_1.reactive)({
|
|
9
14
|
active: false,
|
|
10
15
|
error: ''
|
|
11
16
|
});
|
|
12
|
-
return html `
|
|
17
|
+
return (0, template_1.html) `
|
|
13
18
|
<div
|
|
14
19
|
class="field ${data?.class || ''} ${() => state.active ? '--active' : ''} --flex-column"
|
|
15
20
|
onfocusin='${() => {
|
|
@@ -20,7 +25,7 @@ export default (data) => {
|
|
|
20
25
|
}}'
|
|
21
26
|
style='${data?.style || ''}'
|
|
22
27
|
>
|
|
23
|
-
${
|
|
28
|
+
${(0, title_1.default)(data)}
|
|
24
29
|
|
|
25
30
|
<label
|
|
26
31
|
class='field-mask field-mask--input --flex-row ${data?.mask?.class || ''} ${(data?.title || (data?.class || '').indexOf('field--optional') !== -1) && '--margin-top'} --margin-300'
|
|
@@ -30,7 +35,7 @@ export default (data) => {
|
|
|
30
35
|
${data?.accept ? `accept='${data.accept}'` : ''}
|
|
31
36
|
class='field-tag field-tag--hidden'
|
|
32
37
|
name='${data.name}'
|
|
33
|
-
onrender='${form.input.attributes(state)}'
|
|
38
|
+
onrender='${components_1.form.input.attributes(state)}'
|
|
34
39
|
type='file'
|
|
35
40
|
${data?.value !== undefined ? `value='${data.value}'` : ''}
|
|
36
41
|
>
|
|
@@ -38,8 +43,8 @@ export default (data) => {
|
|
|
38
43
|
${data?.mask?.content || ''}
|
|
39
44
|
</label>
|
|
40
45
|
|
|
41
|
-
${
|
|
42
|
-
${
|
|
46
|
+
${(0, description_1.default)(data)}
|
|
47
|
+
${(0, error_1.default)(state)}
|
|
43
48
|
</div>
|
|
44
49
|
`;
|
|
45
50
|
};
|
|
@@ -14,7 +14,7 @@ declare const _default: {
|
|
|
14
14
|
value?: any;
|
|
15
15
|
} & {
|
|
16
16
|
description?: string | undefined;
|
|
17
|
-
}) => import("@esportsplus/template/build/types").
|
|
17
|
+
}) => import("@esportsplus/template/build/types").Renderable;
|
|
18
18
|
file: (data: {
|
|
19
19
|
accept?: string | undefined;
|
|
20
20
|
class?: string | undefined;
|
|
@@ -33,7 +33,7 @@ declare const _default: {
|
|
|
33
33
|
} & {
|
|
34
34
|
required?: boolean | undefined;
|
|
35
35
|
title?: string | undefined;
|
|
36
|
-
}) => import("@esportsplus/template/build/types").
|
|
36
|
+
}) => import("@esportsplus/template/build/types").Renderable;
|
|
37
37
|
optional: {
|
|
38
38
|
select: (data: {
|
|
39
39
|
class?: string | undefined;
|
|
@@ -84,7 +84,7 @@ declare const _default: {
|
|
|
84
84
|
required?: boolean | undefined;
|
|
85
85
|
title?: string | undefined;
|
|
86
86
|
};
|
|
87
|
-
}) => import("@esportsplus/template/build/types").
|
|
87
|
+
}) => import("@esportsplus/template/build/types").Renderable;
|
|
88
88
|
text: (data: {
|
|
89
89
|
class?: string | undefined;
|
|
90
90
|
field?: {
|
|
@@ -123,7 +123,7 @@ declare const _default: {
|
|
|
123
123
|
required?: boolean | undefined;
|
|
124
124
|
title?: string | undefined;
|
|
125
125
|
};
|
|
126
|
-
}) => import("@esportsplus/template/build/types").
|
|
126
|
+
}) => import("@esportsplus/template/build/types").Renderable;
|
|
127
127
|
};
|
|
128
128
|
select: (data: {
|
|
129
129
|
class?: string | undefined;
|
|
@@ -157,7 +157,7 @@ declare const _default: {
|
|
|
157
157
|
} & {
|
|
158
158
|
required?: boolean | undefined;
|
|
159
159
|
title?: string | undefined;
|
|
160
|
-
}) => import("@esportsplus/template/build/types").
|
|
160
|
+
}) => import("@esportsplus/template/build/types").Renderable;
|
|
161
161
|
switch: (data: {
|
|
162
162
|
class?: string | undefined;
|
|
163
163
|
field?: {
|
|
@@ -173,7 +173,7 @@ declare const _default: {
|
|
|
173
173
|
value?: any;
|
|
174
174
|
} & {
|
|
175
175
|
description?: string | undefined;
|
|
176
|
-
}) => import("@esportsplus/template/build/types").
|
|
176
|
+
}) => import("@esportsplus/template/build/types").Renderable;
|
|
177
177
|
textarea: (data: {
|
|
178
178
|
class?: string | undefined;
|
|
179
179
|
mask?: {
|
|
@@ -195,7 +195,7 @@ declare const _default: {
|
|
|
195
195
|
} & {
|
|
196
196
|
required?: boolean | undefined;
|
|
197
197
|
title?: string | undefined;
|
|
198
|
-
}) => import("@esportsplus/template/build/types").
|
|
198
|
+
}) => import("@esportsplus/template/build/types").Renderable;
|
|
199
199
|
text: (data: {
|
|
200
200
|
class?: string | undefined;
|
|
201
201
|
mask?: {
|
|
@@ -217,6 +217,6 @@ declare const _default: {
|
|
|
217
217
|
} & {
|
|
218
218
|
required?: boolean | undefined;
|
|
219
219
|
title?: string | undefined;
|
|
220
|
-
}) => import("@esportsplus/template/build/types").
|
|
220
|
+
}) => import("@esportsplus/template/build/types").Renderable;
|
|
221
221
|
};
|
|
222
222
|
export default _default;
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const checkbox_1 = __importDefault(require("./checkbox"));
|
|
7
|
+
const file_1 = __importDefault(require("./file"));
|
|
8
|
+
const optional_1 = __importDefault(require("./optional"));
|
|
9
|
+
const select_1 = __importDefault(require("./select"));
|
|
10
|
+
const switch_1 = __importDefault(require("./switch"));
|
|
11
|
+
const textarea_1 = __importDefault(require("./textarea"));
|
|
12
|
+
const text_1 = __importDefault(require("./text"));
|
|
13
|
+
exports.default = { checkbox: checkbox_1.default, file: file_1.default, optional: optional_1.default, select: select_1.default, switch: switch_1.default, textarea: textarea_1.default, text: text_1.default };
|
|
@@ -48,7 +48,7 @@ declare const _default: {
|
|
|
48
48
|
required?: boolean | undefined;
|
|
49
49
|
title?: string | undefined;
|
|
50
50
|
};
|
|
51
|
-
}) => import("@esportsplus/template/build/types").
|
|
51
|
+
}) => import("@esportsplus/template/build/types").Renderable;
|
|
52
52
|
text: (data: {
|
|
53
53
|
class?: string | undefined;
|
|
54
54
|
field?: {
|
|
@@ -87,6 +87,6 @@ declare const _default: {
|
|
|
87
87
|
required?: boolean | undefined;
|
|
88
88
|
title?: string | undefined;
|
|
89
89
|
};
|
|
90
|
-
}) => import("@esportsplus/template/build/types").
|
|
90
|
+
}) => import("@esportsplus/template/build/types").Renderable;
|
|
91
91
|
};
|
|
92
92
|
export default _default;
|
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const select_1 = __importDefault(require("./select"));
|
|
7
|
+
const switch_1 = __importDefault(require("./switch"));
|
|
8
|
+
const text_1 = __importDefault(require("./text"));
|
|
4
9
|
const select = (data) => {
|
|
5
|
-
data.field.content =
|
|
10
|
+
data.field.content = (0, select_1.default)(Object.assign(data.field || {}, {
|
|
6
11
|
class: `field--optional ${data?.field?.class || ''}`
|
|
7
12
|
}));
|
|
8
|
-
return
|
|
13
|
+
return (0, switch_1.default)(data);
|
|
9
14
|
};
|
|
10
15
|
const text = (data) => {
|
|
11
|
-
data.field.content =
|
|
16
|
+
data.field.content = (0, text_1.default)(Object.assign(data.field || {}, {
|
|
12
17
|
class: `field--optional ${data?.field?.class || ''}`
|
|
13
18
|
}));
|
|
14
|
-
return
|
|
19
|
+
return (0, switch_1.default)(data);
|
|
15
20
|
};
|
|
16
|
-
|
|
21
|
+
exports.default = { select, text };
|
|
@@ -28,5 +28,5 @@ type Data = {
|
|
|
28
28
|
style?: string;
|
|
29
29
|
};
|
|
30
30
|
} & Parameters<typeof description>[0] & Parameters<typeof title>[0];
|
|
31
|
-
declare const _default: (data: Data) => import("@esportsplus/template/build/types").
|
|
31
|
+
declare const _default: (data: Data) => import("@esportsplus/template/build/types").Renderable;
|
|
32
32
|
export default _default;
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const reactivity_1 = require("@esportsplus/reactivity");
|
|
7
|
+
const template_1 = require("@esportsplus/template");
|
|
8
|
+
const components_1 = require("../../components");
|
|
9
|
+
const description_1 = __importDefault(require("./description"));
|
|
10
|
+
const error_1 = __importDefault(require("./error"));
|
|
11
|
+
const title_1 = __importDefault(require("./title"));
|
|
7
12
|
function parse(keys, selected) {
|
|
8
13
|
let options = {};
|
|
9
14
|
for (let key of keys) {
|
|
@@ -16,11 +21,11 @@ function parse(keys, selected) {
|
|
|
16
21
|
};
|
|
17
22
|
}
|
|
18
23
|
function template(data, state) {
|
|
19
|
-
let { attributes: a, html: h } = scrollbar({
|
|
24
|
+
let { attributes: a, html: h } = (0, components_1.scrollbar)({
|
|
20
25
|
fixed: true,
|
|
21
26
|
style: data?.scrollbar?.style || '--background-default: var(--color-black-400);'
|
|
22
27
|
});
|
|
23
|
-
return html `
|
|
28
|
+
return (0, template_1.html) `
|
|
24
29
|
<div
|
|
25
30
|
class='tooltip-content tooltip-content--${data?.tooltip?.direction || 's'} ${data?.tooltip?.class || ''} --flex-column --width-full'
|
|
26
31
|
style='${data?.tooltip?.style || ''}'
|
|
@@ -42,7 +47,7 @@ function template(data, state) {
|
|
|
42
47
|
}}'
|
|
43
48
|
${a}
|
|
44
49
|
>
|
|
45
|
-
${Object.keys(data.options || {}).map((key) => html `
|
|
50
|
+
${Object.keys(data.options || {}).map((key) => (0, template_1.html) `
|
|
46
51
|
<div
|
|
47
52
|
class='link ${data?.option?.class || ''} ${() => state.options[key] ? '--active' : ''} --flex-vertical' data-key='${key}'
|
|
48
53
|
style='${data?.option?.style || ''}'
|
|
@@ -58,15 +63,15 @@ function template(data, state) {
|
|
|
58
63
|
</div>
|
|
59
64
|
`;
|
|
60
65
|
}
|
|
61
|
-
|
|
62
|
-
let state = reactive(Object.assign({
|
|
66
|
+
exports.default = (data) => {
|
|
67
|
+
let state = (0, reactivity_1.reactive)(Object.assign({
|
|
63
68
|
active: false,
|
|
64
69
|
error: '',
|
|
65
70
|
render: false,
|
|
66
71
|
}, parse(Object.keys(data.options || {}), data.selected)));
|
|
67
|
-
return html `
|
|
72
|
+
return (0, template_1.html) `
|
|
68
73
|
<div class="field tooltip ${data?.class || ''} ${() => state.active ? '--active' : ''} --flex-column" style='${data?.style || ''}'>
|
|
69
|
-
${
|
|
74
|
+
${(0, title_1.default)(data)}
|
|
70
75
|
|
|
71
76
|
<label
|
|
72
77
|
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"
|
|
@@ -74,7 +79,7 @@ export default (data) => {
|
|
|
74
79
|
state.render = true;
|
|
75
80
|
state.active = !state.active;
|
|
76
81
|
if (state.active) {
|
|
77
|
-
root.queue.onclick(() => state.active = false);
|
|
82
|
+
components_1.root.queue.onclick(() => state.active = false);
|
|
78
83
|
}
|
|
79
84
|
}}'
|
|
80
85
|
style='${data?.mask?.style || ''}'
|
|
@@ -83,7 +88,7 @@ export default (data) => {
|
|
|
83
88
|
class='field-tag field-tag--hidden'
|
|
84
89
|
name='${data.name}'
|
|
85
90
|
onclick='${() => { }}'
|
|
86
|
-
onrender='${form.input.attributes(state)}'
|
|
91
|
+
onrender='${components_1.form.input.attributes(state)}'
|
|
87
92
|
value='${() => state.selected}'
|
|
88
93
|
>
|
|
89
94
|
|
|
@@ -96,8 +101,8 @@ export default (data) => {
|
|
|
96
101
|
${() => state.render ? template(data, state) : ''}
|
|
97
102
|
</label>
|
|
98
103
|
|
|
99
|
-
${
|
|
100
|
-
${
|
|
104
|
+
${(0, description_1.default)(data)}
|
|
105
|
+
${(0, error_1.default)(state)}
|
|
101
106
|
</div>
|
|
102
107
|
`;
|
|
103
108
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import checkbox from './checkbox';
|
|
2
|
-
declare const _default: (data: Parameters<typeof checkbox>[0]) => import("@esportsplus/template/build/types").
|
|
2
|
+
declare const _default: (data: Parameters<typeof checkbox>[0]) => import("@esportsplus/template/build/types").Renderable;
|
|
3
3
|
export default _default;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const checkbox_1 = __importDefault(require("./checkbox"));
|
|
7
|
+
exports.default = (data) => {
|
|
3
8
|
data.mask = data.mask || {};
|
|
4
9
|
data.mask.class = `field-mask--switch ${data.mask?.class || ''}`;
|
|
5
|
-
return
|
|
10
|
+
return (0, checkbox_1.default)(data);
|
|
6
11
|
};
|
|
@@ -17,5 +17,5 @@ type Data = {
|
|
|
17
17
|
type?: string;
|
|
18
18
|
value?: unknown;
|
|
19
19
|
} & Parameters<typeof description>[0] & Parameters<typeof title>[0];
|
|
20
|
-
declare const _default: (data: Data) => import("@esportsplus/template/build/types").
|
|
20
|
+
declare const _default: (data: Data) => import("@esportsplus/template/build/types").Renderable;
|
|
21
21
|
export default _default;
|
|
@@ -1,15 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const reactivity_1 = require("@esportsplus/reactivity");
|
|
7
|
+
const template_1 = require("@esportsplus/template");
|
|
8
|
+
const components_1 = require("../../components");
|
|
9
|
+
const description_1 = __importDefault(require("./description"));
|
|
10
|
+
const error_1 = __importDefault(require("./error"));
|
|
11
|
+
const title_1 = __importDefault(require("./title"));
|
|
12
|
+
exports.default = (data) => {
|
|
13
|
+
let state = (0, reactivity_1.reactive)({
|
|
9
14
|
active: false,
|
|
10
15
|
error: ''
|
|
11
16
|
});
|
|
12
|
-
return html `
|
|
17
|
+
return (0, template_1.html) `
|
|
13
18
|
<div
|
|
14
19
|
class="field ${data?.class || ''} ${() => state.active ? '--active' : ''} --flex-column"
|
|
15
20
|
onfocusin='${() => {
|
|
@@ -20,7 +25,7 @@ export default (data) => {
|
|
|
20
25
|
}}'
|
|
21
26
|
style='${data?.style || ''}'
|
|
22
27
|
>
|
|
23
|
-
${
|
|
28
|
+
${(0, title_1.default)(data)}
|
|
24
29
|
|
|
25
30
|
<label
|
|
26
31
|
class='field-mask field-mask--input --flex-row ${data?.mask?.class || ''} ${(data?.title || (data?.class || '').indexOf('field--optional') !== -1) ? '--margin-top' : ''} --margin-300'
|
|
@@ -30,17 +35,17 @@ export default (data) => {
|
|
|
30
35
|
class='field-tag --padding-400 ${data?.tag?.class || ''}'
|
|
31
36
|
name='${data?.name || ''}'
|
|
32
37
|
placeholder='${data?.placeholder || ''}'
|
|
33
|
-
onrender='${form.input.attributes(state)}'
|
|
38
|
+
onrender='${components_1.form.input.attributes(state)}'
|
|
34
39
|
type='${data?.type || 'string'}'
|
|
35
|
-
${!data?.textarea && data?.value !== undefined ? html `value='${data.value}'` : ''}
|
|
40
|
+
${!data?.textarea && data?.value !== undefined ? (0, template_1.html) `value='${data.value}'` : ''}
|
|
36
41
|
>
|
|
37
|
-
${data?.textarea ? html `${data?.value || ''}</textarea>` : ''}
|
|
42
|
+
${data?.textarea ? (0, template_1.html) `${data?.value || ''}</textarea>` : ''}
|
|
38
43
|
|
|
39
44
|
${data?.mask?.content || ''}
|
|
40
45
|
</label>
|
|
41
46
|
|
|
42
|
-
${
|
|
43
|
-
${
|
|
47
|
+
${(0, description_1.default)(data)}
|
|
48
|
+
${(0, error_1.default)(state)}
|
|
44
49
|
</div>
|
|
45
50
|
`;
|
|
46
51
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import text from './text';
|
|
2
|
-
declare const _default: (data: Parameters<typeof text>[0]) => import("@esportsplus/template/build/types").
|
|
2
|
+
declare const _default: (data: Parameters<typeof text>[0]) => import("@esportsplus/template/build/types").Renderable;
|
|
3
3
|
export default _default;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const text_1 = __importDefault(require("./text"));
|
|
7
|
+
exports.default = (data) => {
|
|
3
8
|
data.textarea = true;
|
|
4
|
-
return
|
|
9
|
+
return (0, text_1.default)(data);
|
|
5
10
|
};
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const template_1 = require("@esportsplus/template");
|
|
4
|
+
const components_1 = require("../../components");
|
|
5
|
+
exports.default = (data) => {
|
|
4
6
|
if (!data?.title) {
|
|
5
7
|
return '';
|
|
6
8
|
}
|
|
7
|
-
let { attributes } = tooltip.onhover();
|
|
8
|
-
return html `
|
|
9
|
+
let { attributes } = components_1.tooltip.onhover();
|
|
10
|
+
return (0, template_1.html) `
|
|
9
11
|
<div class="field-title --flex-horizontal-space-between --flex-vertical">
|
|
10
12
|
${data.title}
|
|
11
13
|
|
|
12
|
-
${data?.required && html `
|
|
14
|
+
${data?.required && (0, template_1.html) `
|
|
13
15
|
<div class="bubble --background-primary --margin-left" ${attributes}>
|
|
14
16
|
<span class="tooltip-message tooltip-message--w">Required</span>
|
|
15
17
|
</div>
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
import { Action } from './types';
|
|
2
|
-
export default function (action: Action):
|
|
2
|
+
export default function (action: Action): {
|
|
3
|
+
onclick: (this: HTMLFormElement, event: Event) => void;
|
|
4
|
+
onsubmit: (this: HTMLFormElement, event: SubmitEvent) => Promise<void>;
|
|
5
|
+
};
|