@esportsplus/ui 0.41.0 → 0.42.1
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 +2 -2
- package/build/components/back/index.js +3 -0
- package/build/components/back/svg/arrow.svg +15 -0
- package/package.json +1 -1
- package/src/components/alert/index.ts +2 -2
- package/src/components/back/index.ts +3 -0
- package/src/components/back/svg/arrow.svg +15 -0
|
@@ -59,7 +59,7 @@ function deactivate(state) {
|
|
|
59
59
|
export default (attributes) => {
|
|
60
60
|
let state = reactive({
|
|
61
61
|
active: false,
|
|
62
|
-
messages: new Set,
|
|
62
|
+
messages: new Set(),
|
|
63
63
|
type: ''
|
|
64
64
|
});
|
|
65
65
|
const error = (messages, seconds = 0) => activate('error', messages, seconds, state);
|
|
@@ -113,7 +113,7 @@ export default (attributes) => {
|
|
|
113
113
|
|
|
114
114
|
<div
|
|
115
115
|
class='alert-close button --padding-300'
|
|
116
|
-
onclick='${deactivate}'
|
|
116
|
+
onclick='${() => deactivate(state)}'
|
|
117
117
|
${attributes.close}
|
|
118
118
|
>
|
|
119
119
|
<div class="icon" style='--size: 14px;'>
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { html } from '@esportsplus/template';
|
|
2
|
+
import icon from '../../components/icon/index.js';
|
|
2
3
|
import template from '../../components/template/index.js';
|
|
4
|
+
import arrow from './svg/arrow.svg';
|
|
3
5
|
import './scss/index.scss';
|
|
4
6
|
export default template.factory(function (attributes, content) {
|
|
5
7
|
return html `
|
|
@@ -8,6 +10,7 @@ export default template.factory(function (attributes, content) {
|
|
|
8
10
|
${this.attributes}
|
|
9
11
|
${attributes}
|
|
10
12
|
>
|
|
13
|
+
${icon({ class: 'back-arrow --margin-right --margin-200' }, arrow)}
|
|
11
14
|
${content}
|
|
12
15
|
</a>
|
|
13
16
|
`;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
4
|
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
5
|
+
width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
|
|
6
|
+
<g opacity="0.4" enable-background="new ">
|
|
7
|
+
<path d="M12,22c-0.552,0-1-0.447-1-1v-6c0-0.553,0.448-1,1-1c0.553,0,1,0.447,1,1v6C13,21.553,12.553,22,12,22z"/>
|
|
8
|
+
</g>
|
|
9
|
+
<g>
|
|
10
|
+
<path d="M12,16c-0.552,0-1-0.447-1-1V5.414l-5.293,5.293c-0.391,0.391-1.023,0.391-1.414,0s-0.391-1.023,0-1.414l7-7
|
|
11
|
+
c0.096-0.096,0.208-0.169,0.326-0.218C11.735,2.027,11.863,2,11.997,2l0,0c0.002,0,0.004,0,0.006,0l0,0
|
|
12
|
+
c0.134,0,0.262,0.027,0.378,0.075c0.119,0.049,0.229,0.122,0.326,0.218l7,7c0.391,0.391,0.391,1.023,0,1.414s-1.023,0.391-1.414,0
|
|
13
|
+
L13,5.414V15C13,15.553,12.553,16,12,16z"/>
|
|
14
|
+
</g>
|
|
15
|
+
</svg>
|
package/package.json
CHANGED
|
@@ -82,7 +82,7 @@ function deactivate(state: { active: boolean, messages: Set<Renderable<any>>, ty
|
|
|
82
82
|
export default (attributes: Attributes & { close?: Attributes, message?: Attributes }) => {
|
|
83
83
|
let state = reactive({
|
|
84
84
|
active: false,
|
|
85
|
-
messages: new Set as Set<Renderable<any>>,
|
|
85
|
+
messages: new Set() as Set<Renderable<any>>,
|
|
86
86
|
type: '' as Type
|
|
87
87
|
});
|
|
88
88
|
|
|
@@ -149,7 +149,7 @@ export default (attributes: Attributes & { close?: Attributes, message?: Attribu
|
|
|
149
149
|
|
|
150
150
|
<div
|
|
151
151
|
class='alert-close button --padding-300'
|
|
152
|
-
onclick='${deactivate}'
|
|
152
|
+
onclick='${() => deactivate(state)}'
|
|
153
153
|
${attributes.close}
|
|
154
154
|
>
|
|
155
155
|
<div class="icon" style='--size: 14px;'>
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { html, Attributes } from '@esportsplus/template';
|
|
2
|
+
import icon from '~/components/icon';
|
|
2
3
|
import template from '~/components/template';
|
|
4
|
+
import arrow from './svg/arrow.svg';
|
|
3
5
|
import './scss/index.scss';
|
|
4
6
|
|
|
5
7
|
|
|
@@ -11,6 +13,7 @@ export default template.factory(
|
|
|
11
13
|
${this.attributes}
|
|
12
14
|
${attributes}
|
|
13
15
|
>
|
|
16
|
+
${icon({ class: 'back-arrow --margin-right --margin-200' }, arrow)}
|
|
14
17
|
${content}
|
|
15
18
|
</a>
|
|
16
19
|
`;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
4
|
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
5
|
+
width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
|
|
6
|
+
<g opacity="0.4" enable-background="new ">
|
|
7
|
+
<path d="M12,22c-0.552,0-1-0.447-1-1v-6c0-0.553,0.448-1,1-1c0.553,0,1,0.447,1,1v6C13,21.553,12.553,22,12,22z"/>
|
|
8
|
+
</g>
|
|
9
|
+
<g>
|
|
10
|
+
<path d="M12,16c-0.552,0-1-0.447-1-1V5.414l-5.293,5.293c-0.391,0.391-1.023,0.391-1.414,0s-0.391-1.023,0-1.414l7-7
|
|
11
|
+
c0.096-0.096,0.208-0.169,0.326-0.218C11.735,2.027,11.863,2,11.997,2l0,0c0.002,0,0.004,0,0.006,0l0,0
|
|
12
|
+
c0.134,0,0.262,0.027,0.378,0.075c0.119,0.049,0.229,0.122,0.326,0.218l7,7c0.391,0.391,0.391,1.023,0,1.414s-1.023,0.391-1.414,0
|
|
13
|
+
L13,5.414V15C13,15.553,12.553,16,12,16z"/>
|
|
14
|
+
</g>
|
|
15
|
+
</svg>
|