@esportsplus/ui 0.0.116 → 0.0.119
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/lib.scss +1 -2
- package/package.json +9 -5
- package/tokens.scss +1 -2
- package/.editorconfig +0 -9
- package/.gitattributes +0 -2
- package/assets/0af89c10df9bc2f8d646.woff2 +0 -0
- package/assets/109e3207d9afea8524be.woff2 +0 -0
- package/assets/16663c3f6ab1da2d6c86.woff +0 -0
- package/assets/16e8721ef5837bc6375e.woff +0 -0
- package/assets/2a3e005f58bfca9c117e.woff +0 -0
- package/assets/58a8d7ebc386843b62c5.woff2 +0 -0
- package/assets/593de7c561e5ffe80c3e.woff2 +0 -0
- package/assets/68b7982c2b30b51bf932.woff2 +0 -0
- package/assets/a04b5e24af93da353f0e.woff +0 -0
- package/assets/bf331673b91821715c08.woff +0 -0
- package/assets/c54b0f4340f2914802d1.woff +0 -0
- package/assets/dd8646a41e4397b77fc4.woff2 +0 -0
- package/assets/e06c107cc50506570954.woff2 +0 -0
- package/assets/ecdfe4c05425592708aa.woff2 +0 -0
- package/assets/f0032576ac7462ccbd0c.woff +0 -0
- package/assets/f872e621917a45943fbc.woff +0 -0
- package/build/components/alert/index.d.ts +0 -10
- package/build/components/alert/index.js +0 -124
- package/build/components/export/clipboard.d.ts +0 -2
- package/build/components/export/clipboard.js +0 -10
- package/build/components/export/index.d.ts +0 -5
- package/build/components/export/index.js +0 -8
- package/build/components/export/json.d.ts +0 -2
- package/build/components/export/json.js +0 -10
- package/build/components/field/checkbox.d.ts +0 -17
- package/build/components/field/checkbox.js +0 -46
- package/build/components/field/description.d.ts +0 -4
- package/build/components/field/description.js +0 -11
- package/build/components/field/error.d.ts +0 -4
- package/build/components/field/error.js +0 -13
- package/build/components/field/file.d.ts +0 -18
- package/build/components/field/file.js +0 -50
- package/build/components/field/index.d.ts +0 -222
- package/build/components/field/index.js +0 -13
- package/build/components/field/optional.d.ts +0 -92
- package/build/components/field/optional.js +0 -21
- package/build/components/field/select.d.ts +0 -32
- package/build/components/field/select.js +0 -108
- package/build/components/field/switch.d.ts +0 -3
- package/build/components/field/switch.js +0 -11
- package/build/components/field/text.d.ts +0 -21
- package/build/components/field/text.js +0 -51
- package/build/components/field/textarea.d.ts +0 -3
- package/build/components/field/textarea.js +0 -10
- package/build/components/field/title.d.ts +0 -5
- package/build/components/field/title.js +0 -21
- package/build/components/form/action.d.ts +0 -5
- package/build/components/form/action.js +0 -51
- package/build/components/form/index.d.ts +0 -23
- package/build/components/form/index.js +0 -9
- package/build/components/form/input.d.ts +0 -9
- package/build/components/form/input.js +0 -12
- package/build/components/form/layout.d.ts +0 -12
- package/build/components/form/layout.js +0 -14
- package/build/components/form/types.d.ts +0 -12
- package/build/components/form/types.js +0 -2
- package/build/components/index.d.ts +0 -10
- package/build/components/index.js +0 -26
- package/build/components/number/index.d.ts +0 -8
- package/build/components/number/index.js +0 -20
- package/build/components/page/index.d.ts +0 -22
- package/build/components/page/index.js +0 -16
- package/build/components/root/index.d.ts +0 -9
- package/build/components/root/index.js +0 -9
- package/build/components/root/onclick.d.ts +0 -5
- package/build/components/root/onclick.js +0 -16
- package/build/components/scrollbar/index.d.ts +0 -11
- package/build/components/scrollbar/index.js +0 -38
- package/build/components/site/index.d.ts +0 -9
- package/build/components/site/index.js +0 -17
- package/build/components/tooltip/index.d.ts +0 -58
- package/build/components/tooltip/index.js +0 -75
- package/build/components/tooltip/menu.d.ts +0 -25
- package/build/components/tooltip/menu.js +0 -46
- package/build/index.d.ts +0 -2
- package/build/index.js +0 -18
- 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/src/components/accordion/scss/index.scss +0 -16
- package/src/components/accordion/scss/variables.scss +0 -4
- package/src/components/alert/index.ts +0 -157
- package/src/components/alert/scss/index.scss +0 -55
- package/src/components/alert/scss/variables.scss +0 -8
- package/src/components/anchor/scss/index.scss +0 -41
- package/src/components/anchor/scss/variables.scss +0 -5
- package/src/components/banner/scss/index.scss +0 -40
- package/src/components/banner/scss/variables.scss +0 -6
- package/src/components/border/scss/index.scss +0 -10
- package/src/components/border/scss/variables.scss +0 -6
- package/src/components/bubble/scss/index.scss +0 -30
- package/src/components/bubble/scss/variables.scss +0 -19
- package/src/components/button/scss/index.scss +0 -92
- package/src/components/button/scss/variables.scss +0 -69
- package/src/components/card/scss/index.scss +0 -35
- package/src/components/card/scss/variables.scss +0 -42
- package/src/components/container/scss/index.scss +0 -10
- package/src/components/container/scss/variables.scss +0 -5
- package/src/components/ellipsis/scss/index.scss +0 -72
- package/src/components/ellipsis/scss/variables.scss +0 -3
- package/src/components/export/clipboard.ts +0 -12
- package/src/components/export/index.ts +0 -5
- package/src/components/export/json.ts +0 -15
- package/src/components/field/checkbox.ts +0 -61
- package/src/components/field/description.ts +0 -12
- package/src/components/field/error.ts +0 -14
- package/src/components/field/file.ts +0 -64
- package/src/components/field/index.ts +0 -10
- package/src/components/field/optional.ts +0 -27
- package/src/components/field/scss/_check.scss +0 -225
- package/src/components/field/scss/_normalize.scss +0 -36
- package/src/components/field/scss/_text.scss +0 -106
- package/src/components/field/scss/index.scss +0 -159
- package/src/components/field/scss/variables.scss +0 -138
- package/src/components/field/select.ts +0 -149
- package/src/components/field/switch.ts +0 -9
- package/src/components/field/text.ts +0 -68
- package/src/components/field/textarea.ts +0 -8
- package/src/components/field/title.ts +0 -23
- package/src/components/form/action.ts +0 -68
- package/src/components/form/index.ts +0 -6
- package/src/components/form/input.ts +0 -15
- package/src/components/form/layout.ts +0 -26
- package/src/components/form/types.ts +0 -16
- package/src/components/group/scss/index.scss +0 -36
- package/src/components/group/scss/variables.scss +0 -17
- package/src/components/icon/scss/index.scss +0 -17
- package/src/components/icon/scss/variables.scss +0 -7
- package/src/components/index.ts +0 -10
- package/src/components/link/scss/index.scss +0 -28
- package/src/components/link/scss/variables.scss +0 -47
- package/src/components/loading/scss/index.scss +0 -24
- package/src/components/loading/scss/variables.scss +0 -31
- package/src/components/modal/scss/index.scss +0 -32
- package/src/components/modal/scss/variables.scss +0 -10
- package/src/components/number/index.ts +0 -24
- package/src/components/page/index.ts +0 -15
- package/src/components/page/scss/index.scss +0 -27
- package/src/components/page/scss/variables.scss +0 -27
- package/src/components/processing/scss/index.scss +0 -47
- package/src/components/processing/scss/variables.scss +0 -11
- package/src/components/root/index.ts +0 -5
- package/src/components/root/onclick.ts +0 -21
- package/src/components/root/scss/index.scss +0 -93
- package/src/components/root/scss/variables.scss +0 -55
- package/src/components/row/scss/index.scss +0 -7
- package/src/components/scrollbar/index.ts +0 -44
- package/src/components/scrollbar/scss/index.scss +0 -59
- package/src/components/scrollbar/scss/variables.scss +0 -6
- package/src/components/sidebar/scss/index.scss +0 -50
- package/src/components/sidebar/scss/variables.scss +0 -21
- package/src/components/site/index.ts +0 -27
- package/src/components/site/scss/index.scss +0 -3
- package/src/components/text/scss/index.scss +0 -12
- package/src/components/text/scss/variables.scss +0 -9
- package/src/components/thumbnail/scss/index.scss +0 -7
- package/src/components/thumbnail/scss/variables.scss +0 -7
- package/src/components/tooltip/index.ts +0 -94
- package/src/components/tooltip/menu.ts +0 -71
- package/src/components/tooltip/scss/_center.scss +0 -13
- package/src/components/tooltip/scss/_east.scss +0 -34
- package/src/components/tooltip/scss/_north.scss +0 -34
- package/src/components/tooltip/scss/_south.scss +0 -35
- package/src/components/tooltip/scss/_west.scss +0 -34
- package/src/components/tooltip/scss/index.scss +0 -93
- package/src/components/tooltip/scss/variables.scss +0 -25
- package/src/css-utilities/[margin,padding]/scss/index.scss +0 -41
- package/src/css-utilities/[margin,padding]/scss/variables.scss +0 -54
- package/src/css-utilities/absolute/scss/index.scss +0 -59
- package/src/css-utilities/background/scss/variables.scss +0 -27
- package/src/css-utilities/border/scss/index.scss +0 -21
- package/src/css-utilities/border/scss/variables.scss +0 -66
- package/src/css-utilities/color/scss/variables.scss +0 -31
- package/src/css-utilities/disabled/scss/index.scss +0 -4
- package/src/css-utilities/flex/scss/index.scss +0 -65
- package/src/css-utilities/glass/scss/index.scss +0 -3
- package/src/css-utilities/glass/scss/variables.scss +0 -3
- package/src/css-utilities/hidden/scss/index.scss +0 -28
- package/src/css-utilities/index.scss +0 -14
- package/src/css-utilities/inline/scss/index.scss +0 -7
- package/src/css-utilities/line-height/scss/variables.scss +0 -10
- package/src/css-utilities/not-allowed/scss/index.scss +0 -7
- package/src/css-utilities/overflow/scss/index.scss +0 -5
- package/src/css-utilities/pointer/scss/index.scss +0 -5
- package/src/css-utilities/size/scss/variables.scss +0 -12
- package/src/css-utilities/slide/scss/index.scss +0 -20
- package/src/css-utilities/slide/scss/variables.scss +0 -6
- package/src/css-utilities/text/scss/index.scss +0 -93
- package/src/css-utilities/text/scss/variables.scss +0 -31
- package/src/css-utilities/transition/scss/variables.scss +0 -14
- package/src/css-utilities/viewport/scss/index.scss +0 -5
- package/src/css-utilities/width/scss/index.scss +0 -3
- package/src/css-utilities/width/scss/variables.scss +0 -9
- package/src/index.ts +0 -2
- package/src/lib/index.scss +0 -7
- package/src/lib/scss/breakpoint.scss +0 -41
- package/src/lib/scss/color.scss +0 -1
- package/src/lib/scss/css-variables.scss +0 -13
- package/src/lib/scss/list.scss +0 -76
- package/src/lib/scss/map.scss +0 -1
- package/src/lib/scss/position.scss +0 -77
- package/src/lib/scss/string.scss +0 -33
- package/src/tokens/index.scss +0 -11
- package/src/tokens/scss/border-radius.scss +0 -12
- package/src/tokens/scss/border-width.scss +0 -6
- package/src/tokens/scss/box-shadow.scss +0 -13
- package/src/tokens/scss/color.scss +0 -64
- package/src/tokens/scss/font-size.scss +0 -12
- package/src/tokens/scss/font-weight.scss +0 -6
- package/src/tokens/scss/line-height.scss +0 -6
- package/src/tokens/scss/size.scss +0 -13
- package/src/tokens/scss/spacer.scss +0 -8
- package/src/tokens/scss/state.scss +0 -86
- package/src/tokens/scss/transition-duration.scss +0 -5
- package/storage/fonts/montserrat/Montserrat-Bold.woff +0 -0
- package/storage/fonts/montserrat/Montserrat-Bold.woff2 +0 -0
- package/storage/fonts/montserrat/Montserrat-BoldItalic.woff +0 -0
- package/storage/fonts/montserrat/Montserrat-BoldItalic.woff2 +0 -0
- package/storage/fonts/montserrat/Montserrat-Italic.woff +0 -0
- package/storage/fonts/montserrat/Montserrat-Italic.woff2 +0 -0
- package/storage/fonts/montserrat/Montserrat-Medium.woff +0 -0
- package/storage/fonts/montserrat/Montserrat-Medium.woff2 +0 -0
- package/storage/fonts/montserrat/Montserrat-MediumItalic.woff +0 -0
- package/storage/fonts/montserrat/Montserrat-MediumItalic.woff2 +0 -0
- package/storage/fonts/montserrat/Montserrat-Regular.woff +0 -0
- package/storage/fonts/montserrat/Montserrat-Regular.woff2 +0 -0
- package/storage/fonts/montserrat/Montserrat-SemiBold.woff +0 -0
- package/storage/fonts/montserrat/Montserrat-SemiBold.woff2 +0 -0
- package/storage/fonts/montserrat/Montserrat-SemiBoldItalic.woff +0 -0
- package/storage/fonts/montserrat/Montserrat-SemiBoldItalic.woff2 +0 -0
- package/storage/fonts/montserrat/index.css +0 -79
- package/storage/psd/Color Palette.psd +0 -0
- package/tsconfig.json +0 -11
- package/webpack.config.ts +0 -30
package/lib.scss
CHANGED
package/package.json
CHANGED
|
@@ -7,19 +7,23 @@
|
|
|
7
7
|
},
|
|
8
8
|
"description": "UI",
|
|
9
9
|
"devDependencies": {
|
|
10
|
-
"@esportsplus/webpack": "^0.1.
|
|
10
|
+
"@esportsplus/webpack": "^0.1.32",
|
|
11
11
|
"modern-normalize": "^2.0.0"
|
|
12
12
|
},
|
|
13
|
+
"files": [
|
|
14
|
+
"/build/**/*",
|
|
15
|
+
"/lib.scss",
|
|
16
|
+
"/tokens.scss"
|
|
17
|
+
],
|
|
13
18
|
"main": "build/index.js",
|
|
14
19
|
"name": "@esportsplus/ui",
|
|
15
20
|
"private": false,
|
|
16
21
|
"scripts": {
|
|
17
|
-
"build": "npm run build:ts && npm run build:
|
|
22
|
+
"build": "npm run build:ts && npm run build:assets",
|
|
18
23
|
"build:ts": "tsc && tsc-alias",
|
|
19
|
-
"build:
|
|
24
|
+
"build:assets": "webpack build --env=production=true",
|
|
20
25
|
"-": "-",
|
|
21
26
|
"prepublishOnly": "npm run build"
|
|
22
27
|
},
|
|
23
|
-
"
|
|
24
|
-
"version": "0.0.116"
|
|
28
|
+
"version": "0.0.119"
|
|
25
29
|
}
|
package/tokens.scss
CHANGED
package/.editorconfig
DELETED
package/.gitattributes
DELETED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,10 +0,0 @@
|
|
|
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").Renderable;
|
|
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,124 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const reactivity_1 = require("@esportsplus/reactivity");
|
|
4
|
-
const template_1 = require("@esportsplus/template");
|
|
5
|
-
let modifiers = {
|
|
6
|
-
error: 'red',
|
|
7
|
-
info: 'black',
|
|
8
|
-
success: 'green'
|
|
9
|
-
}, state = (0, reactivity_1.reactive)({
|
|
10
|
-
active: false,
|
|
11
|
-
messages: new Set,
|
|
12
|
-
seconds: 0,
|
|
13
|
-
state: 'activating',
|
|
14
|
-
type: ''
|
|
15
|
-
}), timeout = 250;
|
|
16
|
-
function activate(key, messages, seconds = 0) {
|
|
17
|
-
if (!Array.isArray(messages)) {
|
|
18
|
-
messages = [messages];
|
|
19
|
-
}
|
|
20
|
-
if (!messages.length) {
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
if (state.type !== key) {
|
|
24
|
-
state.messages.clear();
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
state.type = '';
|
|
28
|
-
}
|
|
29
|
-
for (let message of messages) {
|
|
30
|
-
state.messages.add(message);
|
|
31
|
-
}
|
|
32
|
-
state.state = 'activating';
|
|
33
|
-
state.type = key;
|
|
34
|
-
if (state.active) {
|
|
35
|
-
state.active = true;
|
|
36
|
-
if (seconds) {
|
|
37
|
-
if (!state.seconds) {
|
|
38
|
-
state.seconds = seconds;
|
|
39
|
-
}
|
|
40
|
-
setTimeout(() => {
|
|
41
|
-
if (messages && messages.length < (state?.messages?.size || 0)) {
|
|
42
|
-
for (let message of messages) {
|
|
43
|
-
state.messages.delete(message);
|
|
44
|
-
}
|
|
45
|
-
state.messages = state.messages;
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
deactivate();
|
|
49
|
-
}
|
|
50
|
-
}, 400 * seconds);
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
state.seconds = 0;
|
|
54
|
-
}
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
setTimeout(() => {
|
|
58
|
-
state.active = true;
|
|
59
|
-
if (seconds) {
|
|
60
|
-
if (!state.seconds) {
|
|
61
|
-
state.seconds = seconds;
|
|
62
|
-
}
|
|
63
|
-
setTimeout(() => {
|
|
64
|
-
if (messages && messages.length < (state?.messages?.size || 0)) {
|
|
65
|
-
for (let message of messages) {
|
|
66
|
-
state.messages.delete(message);
|
|
67
|
-
}
|
|
68
|
-
state.messages = state.messages;
|
|
69
|
-
}
|
|
70
|
-
else {
|
|
71
|
-
deactivate();
|
|
72
|
-
}
|
|
73
|
-
}, 400 * seconds);
|
|
74
|
-
}
|
|
75
|
-
else {
|
|
76
|
-
state.seconds = 0;
|
|
77
|
-
}
|
|
78
|
-
}, timeout);
|
|
79
|
-
}
|
|
80
|
-
function deactivate() {
|
|
81
|
-
state.state = 'deactivating';
|
|
82
|
-
setTimeout(() => {
|
|
83
|
-
state.active = false;
|
|
84
|
-
state.messages.clear();
|
|
85
|
-
}, timeout);
|
|
86
|
-
}
|
|
87
|
-
const error = (messages, seconds = 0) => activate('error', messages, seconds);
|
|
88
|
-
const info = (messages, seconds = 0) => activate('info', messages, seconds);
|
|
89
|
-
const success = (messages, seconds = 0) => activate('success', messages, seconds);
|
|
90
|
-
const h = () => {
|
|
91
|
-
return () => state.active ? (0, template_1.html) `
|
|
92
|
-
<div class='alert anchor anchor--ne ${() => state.active && '--active'} ${() => `alert--${state.state}`}'>
|
|
93
|
-
<div class="alert-close --flex-start --margin-right --margin-100" onclick='${deactivate}'>
|
|
94
|
-
<div class='button --background-state ${() => `--background-${modifiers[state.type] || 'black'}`} --color-state --color-white --flex-center --padding-300'>
|
|
95
|
-
<div class="icon --size-300">
|
|
96
|
-
${template_1.html.inline `
|
|
97
|
-
<svg width="16" height="16" viewBox="0 0 16 16">
|
|
98
|
-
<path d="M3.527 14.948a.176.176 0 01-.248 0L1.051 12.72a.176.176 0 010-.248l11.42-11.419a.176.176 0 01.248 0l2.229 2.228a.174.174 0 010 .248L3.527 14.948z"/>
|
|
99
|
-
<path d="M12.472 14.948c.068.068.18.068.248 0l2.229-2.229a.176.176 0 000-.248L3.528 1.052a.176.176 0 00-.248 0L1.052 3.28a.176.176 0 000 .248l11.42 11.42z"/>
|
|
100
|
-
</svg>
|
|
101
|
-
`}
|
|
102
|
-
</div>
|
|
103
|
-
</div>
|
|
104
|
-
</div>
|
|
105
|
-
|
|
106
|
-
<div class="card --overflow-hidden" style='--background: var(--color-white-400)'>
|
|
107
|
-
<div class="alert-message --active --flex-row --padding --padding-horizontal-500 --padding-vertical-400">
|
|
108
|
-
<div class='--flex-row --flex-fill --flex-vertical'>
|
|
109
|
-
<div class="--flex-fill --flex-column --padding-right --padding-400">
|
|
110
|
-
<h5 class="page-title">
|
|
111
|
-
${() => state.type.charAt(0).toUpperCase() + state.type.slice(1)}
|
|
112
|
-
</h5>
|
|
113
|
-
${() => state.type && [...state.messages].map((message) => (0, template_1.html) `
|
|
114
|
-
<p class='--margin-top --margin-border-width-500'>${message}</p>
|
|
115
|
-
`)}
|
|
116
|
-
</div>
|
|
117
|
-
</div>
|
|
118
|
-
</div>
|
|
119
|
-
</div>
|
|
120
|
-
</div>
|
|
121
|
-
` : '';
|
|
122
|
-
};
|
|
123
|
-
const types = ['error', 'info', 'success'];
|
|
124
|
-
exports.default = { deactivate, error, html: h, info, success, types };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = (value) => {
|
|
4
|
-
let input = document.createElement('INPUT');
|
|
5
|
-
document.body.appendChild(input);
|
|
6
|
-
input.setAttribute('value', value);
|
|
7
|
-
input.select();
|
|
8
|
-
document.execCommand('copy');
|
|
9
|
-
document.body.removeChild(input);
|
|
10
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
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 clipboard_1 = __importDefault(require("./clipboard"));
|
|
7
|
-
const json_1 = __importDefault(require("./json"));
|
|
8
|
-
exports.default = { clipboard: clipboard_1.default, json: json_1.default };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = (content, name) => {
|
|
4
|
-
let link = document.createElement('a');
|
|
5
|
-
link.download = name + '.json';
|
|
6
|
-
link.href = window.URL.createObjectURL(new Blob([JSON.stringify(content)], { type: 'application/json' }));
|
|
7
|
-
document.body.appendChild(link);
|
|
8
|
-
link.click();
|
|
9
|
-
document.body.removeChild(link);
|
|
10
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
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").Renderable;
|
|
17
|
-
export default _default;
|
|
@@ -1,46 +0,0 @@
|
|
|
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)({
|
|
11
|
-
active: false
|
|
12
|
-
});
|
|
13
|
-
return (0, template_1.html) `
|
|
14
|
-
<div
|
|
15
|
-
class="field --flex-column ${data?.class || ''} ${() => state.active ? '--active' : ''}"
|
|
16
|
-
onchange='${(e) => {
|
|
17
|
-
if (e.target.type !== 'checkbox') {
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
|
-
state.active = e.target?.checked;
|
|
21
|
-
}}'
|
|
22
|
-
style='${data?.style || ''}'
|
|
23
|
-
>
|
|
24
|
-
<div class="field-title --flex-horizontal-space-between --flex-vertical">
|
|
25
|
-
${data.title}
|
|
26
|
-
|
|
27
|
-
<label
|
|
28
|
-
class="field-mask ${(data?.mask?.class || '').indexOf('field-mask--switch') === -1 ? 'field-mask--checkbox' : ''} --margin-left --margin-400 ${data?.mask?.class || ''}"
|
|
29
|
-
style='${data?.mask?.style || ''}'
|
|
30
|
-
>
|
|
31
|
-
<input
|
|
32
|
-
class='field-tag field-tag--hidden'
|
|
33
|
-
${data.name ? `name='${data.name}'` : ''}
|
|
34
|
-
type='checkbox'
|
|
35
|
-
value='1'
|
|
36
|
-
${(data?.class || '').indexOf('--active') !== -1 || data?.value ? 'checked' : ''}
|
|
37
|
-
>
|
|
38
|
-
</label>
|
|
39
|
-
</div>
|
|
40
|
-
|
|
41
|
-
${data?.field?.content || ''}
|
|
42
|
-
|
|
43
|
-
${(0, description_1.default)(data)}
|
|
44
|
-
</div>
|
|
45
|
-
`;
|
|
46
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const template_1 = require("@esportsplus/template");
|
|
4
|
-
exports.default = (data) => {
|
|
5
|
-
if (!data?.description) {
|
|
6
|
-
return '';
|
|
7
|
-
}
|
|
8
|
-
return (0, template_1.html) `
|
|
9
|
-
<div class='field-description --margin-top --margin-300'>${data.description}</div>
|
|
10
|
-
`;
|
|
11
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const template_1 = require("@esportsplus/template");
|
|
4
|
-
exports.default = (data) => {
|
|
5
|
-
return () => {
|
|
6
|
-
if (!data.error) {
|
|
7
|
-
return '';
|
|
8
|
-
}
|
|
9
|
-
return (0, template_1.html) `
|
|
10
|
-
<div class='field-error --margin-top --margin-300 --text-bold'>${data.error}</div>
|
|
11
|
-
`;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
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").Renderable;
|
|
18
|
-
export default _default;
|
|
@@ -1,50 +0,0 @@
|
|
|
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)({
|
|
14
|
-
active: false,
|
|
15
|
-
error: ''
|
|
16
|
-
});
|
|
17
|
-
return (0, template_1.html) `
|
|
18
|
-
<div
|
|
19
|
-
class="field ${data?.class || ''} ${() => state.active ? '--active' : ''} --flex-column"
|
|
20
|
-
onfocusin='${() => {
|
|
21
|
-
state.active = true;
|
|
22
|
-
}}'
|
|
23
|
-
onfocusout='${() => {
|
|
24
|
-
state.active = false;
|
|
25
|
-
}}'
|
|
26
|
-
style='${data?.style || ''}'
|
|
27
|
-
>
|
|
28
|
-
${(0, title_1.default)(data)}
|
|
29
|
-
|
|
30
|
-
<label
|
|
31
|
-
class='field-mask field-mask--input --flex-row ${data?.mask?.class || ''} ${(data?.title || (data?.class || '').indexOf('field--optional') !== -1) && '--margin-top'} --margin-300'
|
|
32
|
-
style='${data?.mask?.style || ''} cursor:pointer;'
|
|
33
|
-
>
|
|
34
|
-
<input
|
|
35
|
-
${data?.accept ? `accept='${data.accept}'` : ''}
|
|
36
|
-
class='field-tag field-tag--hidden'
|
|
37
|
-
name='${data.name}'
|
|
38
|
-
onrender='${components_1.form.input.attributes(state)}'
|
|
39
|
-
type='file'
|
|
40
|
-
${data?.value !== undefined ? `value='${data.value}'` : ''}
|
|
41
|
-
>
|
|
42
|
-
|
|
43
|
-
${data?.mask?.content || ''}
|
|
44
|
-
</label>
|
|
45
|
-
|
|
46
|
-
${(0, description_1.default)(data)}
|
|
47
|
-
${(0, error_1.default)(state)}
|
|
48
|
-
</div>
|
|
49
|
-
`;
|
|
50
|
-
};
|