@esportsplus/ui 0.1.8 → 0.2.3
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/.editorconfig +9 -9
- package/.gitattributes +2 -2
- package/.github/dependabot.yml +23 -0
- package/.github/workflows/bump.yml +7 -0
- package/.github/workflows/publish.yml +14 -0
- package/build/components/alert/index.d.ts +1 -1
- package/build/components/alert/index.js +34 -36
- package/build/components/export/clipboard.js +1 -3
- package/build/components/export/index.js +3 -8
- package/build/components/export/json.js +1 -3
- package/build/components/field/checkbox.d.ts +1 -1
- package/build/components/field/checkbox.js +32 -37
- package/build/components/field/description.d.ts +1 -1
- package/build/components/field/description.js +4 -6
- package/build/components/field/error.d.ts +1 -1
- package/build/components/field/error.js +4 -6
- package/build/components/field/file.d.ts +1 -1
- package/build/components/field/file.js +36 -41
- package/build/components/field/index.d.ts +8 -8
- package/build/components/field/index.js +8 -13
- package/build/components/field/optional.d.ts +2 -2
- package/build/components/field/optional.js +8 -13
- package/build/components/field/select.d.ts +1 -1
- package/build/components/field/select.js +65 -70
- package/build/components/field/switch.d.ts +1 -1
- package/build/components/field/switch.js +3 -8
- package/build/components/field/text.d.ts +1 -1
- package/build/components/field/text.js +37 -42
- package/build/components/field/textarea.d.ts +1 -1
- package/build/components/field/textarea.js +3 -8
- package/build/components/field/title.d.ts +1 -1
- package/build/components/field/title.js +14 -19
- package/build/components/form/action.js +7 -13
- package/build/components/form/index.d.ts +1 -1
- package/build/components/form/index.js +4 -9
- package/build/components/form/input.js +1 -3
- package/build/components/form/layout.d.ts +1 -1
- package/build/components/form/layout.js +11 -13
- package/build/components/form/types.d.ts +1 -1
- package/build/components/form/types.js +1 -2
- package/build/components/number/index.js +2 -6
- package/build/components/page/index.js +2 -7
- package/build/components/root/index.js +3 -9
- package/build/components/root/onclick.js +1 -3
- package/build/components/scrollbar/index.d.ts +3 -3
- package/build/components/scrollbar/index.js +13 -15
- package/build/components/site/index.d.ts +1 -1
- package/build/components/site/index.js +10 -15
- package/build/components/tooltip/index.d.ts +5 -5
- package/build/components/tooltip/index.js +8 -13
- package/build/components/tooltip/menu.d.ts +1 -1
- package/build/components/tooltip/menu.js +34 -36
- package/build/index.js +11 -27
- package/lib.scss +1 -1
- package/package.json +25 -25
- package/src/components/accordion/scss/index.scss +16 -16
- package/src/components/accordion/scss/variables.scss +4 -4
- package/src/components/alert/index.ts +156 -156
- package/src/components/alert/scss/index.scss +54 -54
- package/src/components/alert/scss/variables.scss +8 -8
- package/src/components/anchor/scss/index.scss +41 -41
- package/src/components/anchor/scss/variables.scss +5 -5
- package/src/components/banner/scss/index.scss +40 -40
- package/src/components/banner/scss/variables.scss +5 -5
- package/src/components/border/scss/index.scss +10 -10
- package/src/components/border/scss/variables.scss +6 -6
- package/src/components/bubble/scss/index.scss +30 -30
- package/src/components/bubble/scss/variables.scss +19 -19
- package/src/components/button/scss/index.scss +92 -92
- package/src/components/button/scss/variables.scss +69 -69
- package/src/components/card/scss/index.scss +35 -35
- package/src/components/card/scss/variables.scss +42 -42
- package/src/components/container/scss/index.scss +10 -10
- package/src/components/container/scss/variables.scss +5 -5
- package/src/components/ellipsis/scss/index.scss +71 -71
- package/src/components/ellipsis/scss/variables.scss +2 -2
- package/src/components/export/clipboard.ts +11 -11
- package/src/components/export/index.ts +4 -4
- package/src/components/export/json.ts +14 -14
- package/src/components/field/checkbox.ts +60 -60
- package/src/components/field/description.ts +11 -11
- package/src/components/field/error.ts +13 -13
- package/src/components/field/file.ts +64 -64
- package/src/components/field/index.ts +9 -9
- package/src/components/field/optional.ts +26 -26
- package/src/components/field/scss/_check.scss +225 -225
- package/src/components/field/scss/_normalize.scss +36 -36
- package/src/components/field/scss/_text.scss +106 -106
- package/src/components/field/scss/index.scss +158 -158
- package/src/components/field/scss/variables.scss +138 -138
- package/src/components/field/select.ts +150 -150
- package/src/components/field/switch.ts +8 -8
- package/src/components/field/text.ts +68 -68
- package/src/components/field/textarea.ts +7 -7
- package/src/components/field/title.ts +22 -22
- package/src/components/form/action.ts +67 -67
- package/src/components/form/index.ts +5 -5
- package/src/components/form/input.ts +14 -14
- package/src/components/form/layout.ts +25 -25
- package/src/components/form/types.ts +15 -15
- package/src/components/group/scss/index.scss +36 -36
- package/src/components/group/scss/variables.scss +17 -17
- package/src/components/icon/scss/index.scss +17 -17
- package/src/components/icon/scss/variables.scss +7 -7
- package/src/components/link/scss/index.scss +28 -28
- package/src/components/link/scss/variables.scss +47 -47
- package/src/components/loading/scss/index.scss +24 -24
- package/src/components/loading/scss/variables.scss +31 -31
- package/src/components/modal/scss/index.scss +31 -31
- package/src/components/modal/scss/variables.scss +10 -10
- package/src/components/number/index.ts +23 -23
- package/src/components/page/index.ts +14 -14
- package/src/components/page/scss/index.scss +27 -27
- package/src/components/page/scss/variables.scss +27 -27
- package/src/components/processing/scss/index.scss +46 -46
- package/src/components/processing/scss/variables.scss +11 -11
- package/src/components/root/index.ts +4 -4
- package/src/components/root/onclick.ts +20 -20
- package/src/components/root/scss/index.scss +93 -93
- package/src/components/root/scss/variables.scss +55 -55
- package/src/components/row/scss/index.scss +7 -7
- package/src/components/scrollbar/index.ts +43 -43
- package/src/components/scrollbar/scss/index.scss +59 -59
- package/src/components/scrollbar/scss/variables.scss +6 -6
- package/src/components/sidebar/scss/index.scss +50 -50
- package/src/components/sidebar/scss/variables.scss +21 -21
- package/src/components/site/index.ts +26 -26
- package/src/components/site/scss/index.scss +3 -3
- package/src/components/text/scss/index.scss +12 -12
- package/src/components/text/scss/variables.scss +9 -9
- package/src/components/thumbnail/scss/index.scss +7 -7
- package/src/components/thumbnail/scss/variables.scss +7 -7
- package/src/components/tooltip/index.ts +93 -93
- package/src/components/tooltip/menu.ts +70 -70
- package/src/components/tooltip/scss/_center.scss +13 -13
- package/src/components/tooltip/scss/_east.scss +34 -34
- package/src/components/tooltip/scss/_north.scss +34 -34
- package/src/components/tooltip/scss/_south.scss +35 -35
- package/src/components/tooltip/scss/_west.scss +34 -34
- package/src/components/tooltip/scss/index.scss +93 -93
- package/src/components/tooltip/scss/variables.scss +25 -25
- package/src/css-utilities/[margin,padding]/scss/index.scss +41 -41
- package/src/css-utilities/[margin,padding]/scss/variables.scss +54 -54
- package/src/css-utilities/absolute/scss/index.scss +59 -59
- package/src/css-utilities/background/scss/variables.scss +27 -27
- package/src/css-utilities/border/scss/index.scss +21 -21
- package/src/css-utilities/border/scss/variables.scss +66 -66
- package/src/css-utilities/color/scss/variables.scss +31 -31
- package/src/css-utilities/disabled/scss/index.scss +4 -4
- package/src/css-utilities/flex/scss/index.scss +65 -65
- package/src/css-utilities/glass/scss/index.scss +2 -2
- package/src/css-utilities/glass/scss/variables.scss +2 -2
- package/src/css-utilities/hidden/scss/index.scss +28 -28
- package/src/css-utilities/index.scss +14 -14
- package/src/css-utilities/inline/scss/index.scss +7 -7
- package/src/css-utilities/line-height/scss/variables.scss +10 -10
- package/src/css-utilities/not-allowed/scss/index.scss +7 -7
- package/src/css-utilities/overflow/scss/index.scss +4 -4
- package/src/css-utilities/pointer/scss/index.scss +5 -5
- package/src/css-utilities/size/scss/variables.scss +12 -12
- package/src/css-utilities/slide/scss/index.scss +21 -21
- package/src/css-utilities/slide/scss/variables.scss +10 -10
- package/src/css-utilities/text/scss/index.scss +93 -93
- package/src/css-utilities/text/scss/variables.scss +31 -31
- package/src/css-utilities/transition/scss/variables.scss +14 -14
- package/src/css-utilities/viewport/scss/index.scss +4 -4
- package/src/css-utilities/width/scss/index.scss +3 -3
- package/src/css-utilities/width/scss/variables.scss +9 -9
- package/src/index.ts +11 -11
- package/src/lib/index.scss +7 -7
- package/src/lib/scss/breakpoint.scss +41 -41
- package/src/lib/scss/color.scss +1 -1
- package/src/lib/scss/css-variables.scss +13 -13
- package/src/lib/scss/list.scss +76 -76
- package/src/lib/scss/map.scss +1 -1
- package/src/lib/scss/position.scss +77 -77
- package/src/lib/scss/string.scss +33 -33
- package/src/tokens/index.scss +11 -11
- package/src/tokens/scss/border-radius.scss +12 -12
- package/src/tokens/scss/border-width.scss +6 -6
- package/src/tokens/scss/box-shadow.scss +13 -13
- package/src/tokens/scss/color.scss +64 -64
- package/src/tokens/scss/font-size.scss +12 -12
- package/src/tokens/scss/font-weight.scss +6 -6
- package/src/tokens/scss/line-height.scss +6 -6
- package/src/tokens/scss/size.scss +13 -13
- package/src/tokens/scss/spacer.scss +8 -8
- package/src/tokens/scss/state.scss +86 -86
- package/src/tokens/scss/transition-duration.scss +5 -5
- package/storage/fonts/montserrat/index.css +79 -79
- package/tokens.scss +1 -1
- package/tsconfig.json +10 -10
- package/utilities/styles.css +1 -1
- package/utilities/variables.css +1 -1
- package/webpack.config.ts +25 -25
package/.editorconfig
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
root = true
|
|
2
|
-
|
|
3
|
-
[*]
|
|
4
|
-
indent_style = space
|
|
5
|
-
indent_size = 4
|
|
6
|
-
charset = utf-8
|
|
7
|
-
trim_trailing_whitespace = true
|
|
8
|
-
insert_final_newline = true
|
|
9
|
-
end_of_line = lf
|
|
1
|
+
root = true
|
|
2
|
+
|
|
3
|
+
[*]
|
|
4
|
+
indent_style = space
|
|
5
|
+
indent_size = 4
|
|
6
|
+
charset = utf-8
|
|
7
|
+
trim_trailing_whitespace = true
|
|
8
|
+
insert_final_newline = true
|
|
9
|
+
end_of_line = lf
|
package/.gitattributes
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
# Auto detect text files and perform LF normalization
|
|
2
|
-
* text=auto
|
|
1
|
+
# Auto detect text files and perform LF normalization
|
|
2
|
+
* text=auto
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# To get started with Dependabot version updates, you'll need to specify which
|
|
2
|
+
# package ecosystems to update and where the package manifests are located.
|
|
3
|
+
# Please see the documentation for all configuration options:
|
|
4
|
+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
|
5
|
+
|
|
6
|
+
version: 2
|
|
7
|
+
registries:
|
|
8
|
+
npm-npmjs:
|
|
9
|
+
token: ${{secrets.NPM_TOKEN}}
|
|
10
|
+
type: npm-registry
|
|
11
|
+
url: https://registry.npmjs.org
|
|
12
|
+
updates:
|
|
13
|
+
- package-ecosystem: "npm"
|
|
14
|
+
directory: "/"
|
|
15
|
+
groups:
|
|
16
|
+
production-dependencies:
|
|
17
|
+
dependency-type: "production"
|
|
18
|
+
development-dependencies:
|
|
19
|
+
dependency-type: "development"
|
|
20
|
+
registries:
|
|
21
|
+
- npm-npmjs
|
|
22
|
+
schedule:
|
|
23
|
+
interval: "daily"
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
name: publish to npm
|
|
2
|
+
on:
|
|
3
|
+
release:
|
|
4
|
+
types: [published]
|
|
5
|
+
workflow_dispatch:
|
|
6
|
+
workflow_run:
|
|
7
|
+
workflows: [bump]
|
|
8
|
+
types:
|
|
9
|
+
- completed
|
|
10
|
+
jobs:
|
|
11
|
+
publish:
|
|
12
|
+
secrets:
|
|
13
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_PUBLISHING }}
|
|
14
|
+
uses: esportsplus/workflows/.github/workflows/publish.yml@main
|
|
@@ -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
|
|
5
|
+
html: () => () => "" | import("@esportsplus/template").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,12 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const reactivity_1 = require("@esportsplus/reactivity");
|
|
4
|
-
const template_1 = require("@esportsplus/template");
|
|
1
|
+
import { reactive } from '@esportsplus/reactivity';
|
|
2
|
+
import { html } from '@esportsplus/template';
|
|
5
3
|
let modifiers = {
|
|
6
4
|
error: 'red',
|
|
7
5
|
info: 'black',
|
|
8
6
|
success: 'green'
|
|
9
|
-
}, state =
|
|
7
|
+
}, state = reactive({
|
|
10
8
|
active: false,
|
|
11
9
|
messages: new Set,
|
|
12
10
|
seconds: 0,
|
|
@@ -88,37 +86,37 @@ const error = (messages, seconds = 0) => activate('error', messages, seconds);
|
|
|
88
86
|
const info = (messages, seconds = 0) => activate('info', messages, seconds);
|
|
89
87
|
const success = (messages, seconds = 0) => activate('success', messages, seconds);
|
|
90
88
|
const h = () => {
|
|
91
|
-
return () => state.active ?
|
|
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
|
-
${
|
|
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) =>
|
|
114
|
-
<p class='--margin-top --margin-border-width-500'>${message}</p>
|
|
115
|
-
`)}
|
|
116
|
-
</div>
|
|
117
|
-
</div>
|
|
118
|
-
</div>
|
|
119
|
-
</div>
|
|
120
|
-
</div>
|
|
89
|
+
return () => state.active ? html `
|
|
90
|
+
<div class='alert anchor anchor--ne ${() => state.active && '--active'} ${() => `alert--${state.state}`}'>
|
|
91
|
+
<div class="alert-close --flex-start --margin-right --margin-100" onclick='${deactivate}'>
|
|
92
|
+
<div class='button --background-state ${() => `--background-${modifiers[state.type] || 'black'}`} --color-state --color-white --flex-center --padding-300'>
|
|
93
|
+
<div class="icon --size-300">
|
|
94
|
+
${html.inline `
|
|
95
|
+
<svg width="16" height="16" viewBox="0 0 16 16">
|
|
96
|
+
<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"/>
|
|
97
|
+
<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"/>
|
|
98
|
+
</svg>
|
|
99
|
+
`}
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
|
|
104
|
+
<div class="card --overflow-hidden" style='--background: var(--color-white-400)'>
|
|
105
|
+
<div class="alert-message --active --flex-row --padding --padding-horizontal-500 --padding-vertical-400">
|
|
106
|
+
<div class='--flex-row --flex-fill --flex-vertical'>
|
|
107
|
+
<div class="--flex-fill --flex-column --padding-right --padding-400">
|
|
108
|
+
<h5 class="page-title">
|
|
109
|
+
${() => state.type.charAt(0).toUpperCase() + state.type.slice(1)}
|
|
110
|
+
</h5>
|
|
111
|
+
${() => state.type && [...state.messages].map((message) => html `
|
|
112
|
+
<p class='--margin-top --margin-border-width-500'>${message}</p>
|
|
113
|
+
`)}
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
</div>
|
|
121
119
|
` : '';
|
|
122
120
|
};
|
|
123
121
|
const types = ['error', 'info', 'success'];
|
|
124
|
-
|
|
122
|
+
export default { deactivate, error, html: h, info, success, types };
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
+
import clipboard from './clipboard';
|
|
2
|
+
import json from './json';
|
|
3
|
+
export default { clipboard, json };
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = (content, name) => {
|
|
1
|
+
export default (content, name) => {
|
|
4
2
|
let link = document.createElement('a');
|
|
5
3
|
link.download = name + '.json';
|
|
6
4
|
link.href = window.URL.createObjectURL(new Blob([JSON.stringify(content)], { type: 'application/json' }));
|
|
@@ -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
|
|
16
|
+
declare const _default: (data: Data) => import("@esportsplus/template").Renderable;
|
|
17
17
|
export default _default;
|
|
@@ -1,46 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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)({
|
|
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({
|
|
11
6
|
active: false
|
|
12
7
|
});
|
|
13
|
-
return
|
|
14
|
-
<div
|
|
15
|
-
class="field --flex-column ${data?.class || ''} ${() => state.active ? '--active' : ''}"
|
|
8
|
+
return html `
|
|
9
|
+
<div
|
|
10
|
+
class="field --flex-column ${data?.class || ''} ${() => state.active ? '--active' : ''}"
|
|
16
11
|
onchange='${(e) => {
|
|
17
12
|
if (e.target.type !== 'checkbox') {
|
|
18
13
|
return;
|
|
19
14
|
}
|
|
20
15
|
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
|
-
${(
|
|
44
|
-
</div>
|
|
16
|
+
}}'
|
|
17
|
+
style='${data?.style || ''}'
|
|
18
|
+
>
|
|
19
|
+
<div class="field-title --flex-horizontal-space-between --flex-vertical">
|
|
20
|
+
${data.title}
|
|
21
|
+
|
|
22
|
+
<label
|
|
23
|
+
class="field-mask ${(data?.mask?.class || '').indexOf('field-mask--switch') === -1 ? 'field-mask--checkbox' : ''} --margin-left --margin-400 ${data?.mask?.class || ''}"
|
|
24
|
+
style='${data?.mask?.style || ''}'
|
|
25
|
+
>
|
|
26
|
+
<input
|
|
27
|
+
class='field-tag field-tag--hidden'
|
|
28
|
+
${data.name ? `name='${data.name}'` : ''}
|
|
29
|
+
type='checkbox'
|
|
30
|
+
value='1'
|
|
31
|
+
${(data?.class || '').indexOf('--active') !== -1 || data?.value ? 'checked' : ''}
|
|
32
|
+
>
|
|
33
|
+
</label>
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
${data?.field?.content || ''}
|
|
37
|
+
|
|
38
|
+
${description(data)}
|
|
39
|
+
</div>
|
|
45
40
|
`;
|
|
46
41
|
};
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const template_1 = require("@esportsplus/template");
|
|
4
|
-
exports.default = (data) => {
|
|
1
|
+
import { html } from '@esportsplus/template';
|
|
2
|
+
export default (data) => {
|
|
5
3
|
if (!data?.description) {
|
|
6
4
|
return '';
|
|
7
5
|
}
|
|
8
|
-
return
|
|
9
|
-
<div class='field-description --margin-top --margin-300'>${data.description}</div>
|
|
6
|
+
return html `
|
|
7
|
+
<div class='field-description --margin-top --margin-300'>${data.description}</div>
|
|
10
8
|
`;
|
|
11
9
|
};
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const template_1 = require("@esportsplus/template");
|
|
4
|
-
exports.default = (data) => {
|
|
1
|
+
import { html } from '@esportsplus/template';
|
|
2
|
+
export default (data) => {
|
|
5
3
|
return () => {
|
|
6
4
|
if (!data.error) {
|
|
7
5
|
return '';
|
|
8
6
|
}
|
|
9
|
-
return
|
|
10
|
-
<div class='field-error --margin-top --margin-300 --text-bold'>${data.error}</div>
|
|
7
|
+
return html `
|
|
8
|
+
<div class='field-error --margin-top --margin-300 --text-bold'>${data.error}</div>
|
|
11
9
|
`;
|
|
12
10
|
};
|
|
13
11
|
};
|
|
@@ -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
|
|
17
|
+
declare const _default: (data: Data) => import("@esportsplus/template").Renderable;
|
|
18
18
|
export default _default;
|
|
@@ -1,50 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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)({
|
|
1
|
+
import { reactive } from '@esportsplus/reactivity';
|
|
2
|
+
import { html } from '@esportsplus/template';
|
|
3
|
+
import form from '../../components/form';
|
|
4
|
+
import description from './description';
|
|
5
|
+
import error from './error';
|
|
6
|
+
import title from './title';
|
|
7
|
+
export default (data) => {
|
|
8
|
+
let state = reactive({
|
|
14
9
|
active: false,
|
|
15
10
|
error: ''
|
|
16
11
|
});
|
|
17
|
-
return
|
|
18
|
-
<div
|
|
19
|
-
class="field ${data?.class || ''} ${() => state.active ? '--active' : ''} --flex-column"
|
|
12
|
+
return html `
|
|
13
|
+
<div
|
|
14
|
+
class="field ${data?.class || ''} ${() => state.active ? '--active' : ''} --flex-column"
|
|
20
15
|
onfocusin='${() => {
|
|
21
16
|
state.active = true;
|
|
22
|
-
}}'
|
|
17
|
+
}}'
|
|
23
18
|
onfocusout='${() => {
|
|
24
19
|
state.active = false;
|
|
25
|
-
}}'
|
|
26
|
-
style='${data?.style || ''}'
|
|
27
|
-
>
|
|
28
|
-
${(
|
|
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='${
|
|
39
|
-
type='file'
|
|
40
|
-
${data?.value !== undefined ? `value='${data.value}'` : ''}
|
|
41
|
-
>
|
|
42
|
-
|
|
43
|
-
${data?.mask?.content || ''}
|
|
44
|
-
</label>
|
|
45
|
-
|
|
46
|
-
${(
|
|
47
|
-
${(
|
|
48
|
-
</div>
|
|
20
|
+
}}'
|
|
21
|
+
style='${data?.style || ''}'
|
|
22
|
+
>
|
|
23
|
+
${title(data)}
|
|
24
|
+
|
|
25
|
+
<label
|
|
26
|
+
class='field-mask field-mask--input --flex-row ${data?.mask?.class || ''} ${(data?.title || (data?.class || '').indexOf('field--optional') !== -1) && '--margin-top'} --margin-300'
|
|
27
|
+
style='${data?.mask?.style || ''} cursor:pointer;'
|
|
28
|
+
>
|
|
29
|
+
<input
|
|
30
|
+
${data?.accept ? `accept='${data.accept}'` : ''}
|
|
31
|
+
class='field-tag field-tag--hidden'
|
|
32
|
+
name='${data.name}'
|
|
33
|
+
onrender='${form.input.attributes(state)}'
|
|
34
|
+
type='file'
|
|
35
|
+
${data?.value !== undefined ? `value='${data.value}'` : ''}
|
|
36
|
+
>
|
|
37
|
+
|
|
38
|
+
${data?.mask?.content || ''}
|
|
39
|
+
</label>
|
|
40
|
+
|
|
41
|
+
${description(data)}
|
|
42
|
+
${error(state)}
|
|
43
|
+
</div>
|
|
49
44
|
`;
|
|
50
45
|
};
|
|
@@ -14,7 +14,7 @@ declare const _default: {
|
|
|
14
14
|
value?: any;
|
|
15
15
|
} & {
|
|
16
16
|
description?: string | undefined;
|
|
17
|
-
}) => import("@esportsplus/template
|
|
17
|
+
}) => import("@esportsplus/template").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
|
|
36
|
+
}) => import("@esportsplus/template").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
|
|
87
|
+
}) => import("@esportsplus/template").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
|
|
126
|
+
}) => import("@esportsplus/template").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
|
|
160
|
+
}) => import("@esportsplus/template").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
|
|
176
|
+
}) => import("@esportsplus/template").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
|
|
198
|
+
}) => import("@esportsplus/template").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
|
|
220
|
+
}) => import("@esportsplus/template").Renderable;
|
|
221
221
|
};
|
|
222
222
|
export default _default;
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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 };
|
|
1
|
+
import checkbox from './checkbox';
|
|
2
|
+
import file from './file';
|
|
3
|
+
import optional from './optional';
|
|
4
|
+
import select from './select';
|
|
5
|
+
import s from './switch';
|
|
6
|
+
import textarea from './textarea';
|
|
7
|
+
import text from './text';
|
|
8
|
+
export default { checkbox, file, optional, select, switch: s, textarea, text };
|
|
@@ -48,7 +48,7 @@ declare const _default: {
|
|
|
48
48
|
required?: boolean | undefined;
|
|
49
49
|
title?: string | undefined;
|
|
50
50
|
};
|
|
51
|
-
}) => import("@esportsplus/template
|
|
51
|
+
}) => import("@esportsplus/template").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
|
|
90
|
+
}) => import("@esportsplus/template").Renderable;
|
|
91
91
|
};
|
|
92
92
|
export default _default;
|
|
@@ -1,21 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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"));
|
|
1
|
+
import sel from './select';
|
|
2
|
+
import s from './switch';
|
|
3
|
+
import tex from './text';
|
|
9
4
|
const select = (data) => {
|
|
10
|
-
data.field.content = (
|
|
5
|
+
data.field.content = sel(Object.assign(data.field || {}, {
|
|
11
6
|
class: `field--optional ${data?.field?.class || ''}`
|
|
12
7
|
}));
|
|
13
|
-
return (
|
|
8
|
+
return s(data);
|
|
14
9
|
};
|
|
15
10
|
const text = (data) => {
|
|
16
|
-
data.field.content = (
|
|
11
|
+
data.field.content = tex(Object.assign(data.field || {}, {
|
|
17
12
|
class: `field--optional ${data?.field?.class || ''}`
|
|
18
13
|
}));
|
|
19
|
-
return (
|
|
14
|
+
return s(data);
|
|
20
15
|
};
|
|
21
|
-
|
|
16
|
+
export 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
|
|
31
|
+
declare const _default: (data: Data) => import("@esportsplus/template").Renderable;
|
|
32
32
|
export default _default;
|