@esportsplus/ui 0.0.113 → 0.0.116
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.js +6 -5
- package/build/components/export/clipboard.d.ts +2 -0
- package/build/components/export/clipboard.js +10 -0
- package/build/components/export/index.d.ts +5 -0
- package/build/components/export/index.js +8 -0
- package/build/components/export/json.d.ts +2 -0
- package/build/components/export/json.js +10 -0
- package/build/components/index.d.ts +1 -0
- package/build/components/index.js +3 -1
- package/package.json +4 -4
- package/src/components/alert/index.ts +7 -2
- package/src/components/export/clipboard.ts +12 -0
- package/src/components/export/index.ts +5 -0
- package/src/components/export/json.ts +15 -0
- package/src/components/index.ts +1 -0
- package/webpack.config.ts +2 -5
- package/build/components/overlay/index.d.ts +0 -6
- package/build/components/overlay/index.js +0 -8
- package/build/components/page/header.d.ts +0 -6
- package/build/components/page/header.js +0 -22
- package/build/components/page/layout.d.ts +0 -5
- package/build/components/page/layout.js +0 -8
- package/storage/svg/close.svg +0 -1
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
const reactivity_1 = require("@esportsplus/reactivity");
|
|
7
4
|
const template_1 = require("@esportsplus/template");
|
|
8
|
-
const close_svg_1 = __importDefault(require("~/storage/svg/close.svg"));
|
|
9
5
|
let modifiers = {
|
|
10
6
|
error: 'red',
|
|
11
7
|
info: 'black',
|
|
@@ -97,7 +93,12 @@ const h = () => {
|
|
|
97
93
|
<div class="alert-close --flex-start --margin-right --margin-100" onclick='${deactivate}'>
|
|
98
94
|
<div class='button --background-state ${() => `--background-${modifiers[state.type] || 'black'}`} --color-state --color-white --flex-center --padding-300'>
|
|
99
95
|
<div class="icon --size-300">
|
|
100
|
-
${template_1.html.inline
|
|
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
|
+
`}
|
|
101
102
|
</div>
|
|
102
103
|
</div>
|
|
103
104
|
</div>
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,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 clipboard_1 = __importDefault(require("./clipboard"));
|
|
7
|
+
const json_1 = __importDefault(require("./json"));
|
|
8
|
+
exports.default = { clipboard: clipboard_1.default, json: json_1.default };
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
};
|
|
@@ -3,9 +3,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.tooltip = exports.site = exports.scrollbar = exports.root = exports.page = exports.number = exports.form = exports.field = exports.alert = void 0;
|
|
6
|
+
exports.tooltip = exports.site = exports.scrollbar = exports.root = exports.page = exports.number = exports.form = exports.field = exports.export = exports.alert = void 0;
|
|
7
7
|
var alert_1 = require("./alert");
|
|
8
8
|
Object.defineProperty(exports, "alert", { enumerable: true, get: function () { return __importDefault(alert_1).default; } });
|
|
9
|
+
var export_1 = require("./export");
|
|
10
|
+
Object.defineProperty(exports, "export", { enumerable: true, get: function () { return __importDefault(export_1).default; } });
|
|
9
11
|
var field_1 = require("./field");
|
|
10
12
|
Object.defineProperty(exports, "field", { enumerable: true, get: function () { return __importDefault(field_1).default; } });
|
|
11
13
|
var form_1 = require("./form");
|
package/package.json
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
"author": "ICJR",
|
|
3
3
|
"dependencies": {
|
|
4
4
|
"@esportsplus/action": "^0.0.38",
|
|
5
|
-
"@esportsplus/reactivity": "^0.1.
|
|
6
|
-
"@esportsplus/template": "^0.1.
|
|
5
|
+
"@esportsplus/reactivity": "^0.1.19",
|
|
6
|
+
"@esportsplus/template": "^0.1.31"
|
|
7
7
|
},
|
|
8
8
|
"description": "UI",
|
|
9
9
|
"devDependencies": {
|
|
10
|
-
"@esportsplus/webpack": "^0.1.
|
|
10
|
+
"@esportsplus/webpack": "^0.1.31",
|
|
11
11
|
"modern-normalize": "^2.0.0"
|
|
12
12
|
},
|
|
13
13
|
"main": "build/index.js",
|
|
@@ -21,5 +21,5 @@
|
|
|
21
21
|
"prepublishOnly": "npm run build"
|
|
22
22
|
},
|
|
23
23
|
"types": "build/index.d.ts",
|
|
24
|
-
"version": "0.0.
|
|
24
|
+
"version": "0.0.116"
|
|
25
25
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { reactive } from '@esportsplus/reactivity';
|
|
2
2
|
import { html } from '@esportsplus/template';
|
|
3
|
-
import close from '~/storage/svg/close.svg';
|
|
4
3
|
|
|
5
4
|
|
|
6
5
|
type Type = 'error' | 'info' | 'success';
|
|
@@ -118,12 +117,18 @@ const success = (messages: string | string[], seconds: number = 0) => activate('
|
|
|
118
117
|
|
|
119
118
|
|
|
120
119
|
const h = () => {
|
|
120
|
+
// TODO: Fix importing close svg
|
|
121
121
|
return () => state.active ? html`
|
|
122
122
|
<div class='alert anchor anchor--ne ${() => state.active && '--active'} ${() => `alert--${state.state}`}'>
|
|
123
123
|
<div class="alert-close --flex-start --margin-right --margin-100" onclick='${deactivate}'>
|
|
124
124
|
<div class='button --background-state ${() => `--background-${modifiers[state.type] || 'black'}`} --color-state --color-white --flex-center --padding-300'>
|
|
125
125
|
<div class="icon --size-300">
|
|
126
|
-
${html.inline
|
|
126
|
+
${html.inline`
|
|
127
|
+
<svg width="16" height="16" viewBox="0 0 16 16">
|
|
128
|
+
<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"/>
|
|
129
|
+
<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"/>
|
|
130
|
+
</svg>
|
|
131
|
+
`}
|
|
127
132
|
</div>
|
|
128
133
|
</div>
|
|
129
134
|
</div>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export default (value: string) => {
|
|
2
|
+
let input = document.createElement('INPUT') as HTMLInputElement;
|
|
3
|
+
|
|
4
|
+
document.body.appendChild(input);
|
|
5
|
+
|
|
6
|
+
input.setAttribute('value', value);
|
|
7
|
+
input.select();
|
|
8
|
+
|
|
9
|
+
document.execCommand('copy');
|
|
10
|
+
|
|
11
|
+
document.body.removeChild(input);
|
|
12
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export default (content: any[] | Record<string, any>, name: string) => {
|
|
2
|
+
let link = document.createElement('a');
|
|
3
|
+
|
|
4
|
+
link.download = name + '.json';
|
|
5
|
+
link.href = window.URL.createObjectURL(new Blob(
|
|
6
|
+
[ JSON.stringify(content) ],
|
|
7
|
+
{ type: 'application/json' }
|
|
8
|
+
));
|
|
9
|
+
|
|
10
|
+
document.body.appendChild(link);
|
|
11
|
+
|
|
12
|
+
link.click();
|
|
13
|
+
|
|
14
|
+
document.body.removeChild(link);
|
|
15
|
+
};
|
package/src/components/index.ts
CHANGED
package/webpack.config.ts
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { config, entry } from '@esportsplus/webpack';
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
export default (
|
|
5
|
-
let production = env.production !== 'false';
|
|
6
|
-
|
|
4
|
+
export default ({ production }: { production?: string }) => {
|
|
7
5
|
return config.web({
|
|
8
|
-
cache: false,
|
|
9
6
|
contenthash: false,
|
|
10
7
|
entry: {
|
|
11
8
|
css: {
|
|
@@ -23,7 +20,7 @@ export default (env: { production?: boolean | string }) => {
|
|
|
23
20
|
}
|
|
24
21
|
}
|
|
25
22
|
},
|
|
26
|
-
mode: production ? 'production': 'development',
|
|
23
|
+
mode: production !== 'false' ? 'production': 'development',
|
|
27
24
|
// Temporary output until css root directory can be set through
|
|
28
25
|
// package.json or similar ( like 'main' key )
|
|
29
26
|
output: {
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const template_1 = require("@esportsplus/template");
|
|
4
|
-
exports.default = (data = {}) => (0, template_1.html) `
|
|
5
|
-
<section class='overlay ${data?.class || ''}'>
|
|
6
|
-
${data?.content || ''}
|
|
7
|
-
</section>
|
|
8
|
-
`;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const template_1 = require("@esportsplus/template");
|
|
4
|
-
exports.default = (data) => (0, template_1.html) `
|
|
5
|
-
${data?.suptitle ? (0, template_1.html) `
|
|
6
|
-
<span class="page-suptitle --text-bold --text-crop --text-uppercase --text-200" style="--color-default: var(--color-primary-400);letter-spacing: 0.24px;">
|
|
7
|
-
${data?.suptitle}
|
|
8
|
-
</span>
|
|
9
|
-
` : ''}
|
|
10
|
-
|
|
11
|
-
${data?.title ? (0, template_1.html) `
|
|
12
|
-
<h1 class="page-title --line-height-200 --margin-300 ${!data?.subtitle && '--text-crop-bottom'} ${data?.suptitle ? '--margin-top' : '--text-crop-top'}">
|
|
13
|
-
${data?.title}
|
|
14
|
-
</h1>
|
|
15
|
-
` : ''}
|
|
16
|
-
|
|
17
|
-
${data?.subtitle ? (0, template_1.html) `
|
|
18
|
-
<span class="page-subtitle --margin-top --margin-300 --text-crop-bottom">
|
|
19
|
-
${data?.subtitle}
|
|
20
|
-
</span>
|
|
21
|
-
` : ''}
|
|
22
|
-
`;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const template_1 = require("@esportsplus/template");
|
|
4
|
-
exports.default = (data = {}) => (0, template_1.html) `
|
|
5
|
-
<section class='page ${data?.class}'>
|
|
6
|
-
${data?.content}
|
|
7
|
-
</section>
|
|
8
|
-
`;
|
package/storage/svg/close.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg width="16" height="16" viewBox="0 0 16 16"><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"/><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"/></svg>
|