@esportsplus/ui 0.42.12 → 0.42.14
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.
|
@@ -7,7 +7,7 @@ import check from './svg/check.svg';
|
|
|
7
7
|
import close from './svg/close.svg';
|
|
8
8
|
import e from './svg/error.svg';
|
|
9
9
|
import './scss/index.scss';
|
|
10
|
-
const OMIT = ['alert-close', 'alert-messages', 'message'];
|
|
10
|
+
const OMIT = ['alert-close', 'alert-messages', 'alert-message'];
|
|
11
11
|
let modifiers = {
|
|
12
12
|
error: 'red',
|
|
13
13
|
info: 'black',
|
|
@@ -87,11 +87,11 @@ export default (attributes) => {
|
|
|
87
87
|
}}
|
|
88
88
|
|
|
89
89
|
<div
|
|
90
|
-
class='alert-messages --flex-
|
|
90
|
+
class='alert-messages --flex-column --flex-fill'
|
|
91
91
|
${attributes['alert-messages']}
|
|
92
92
|
>
|
|
93
93
|
${() => {
|
|
94
|
-
let message = attributes
|
|
94
|
+
let message = attributes['alert-message'];
|
|
95
95
|
return state.rerender && [...state.messages].map((content) => {
|
|
96
96
|
if (typeof content === 'string') {
|
|
97
97
|
return html `
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@layer components {.anchor{--margin-horizontal:var(--size-400);--margin-vertical:var(--size-400);max-height:calc(var(--max-height,100%) - var(--margin-vertical)*2);max-width:calc(var(--max-width,100%) - var(--margin-horizontal)*2);transition:opacity var(--transition-duration)ease-in-out,transform var(--transition-duration)ease-in-out;z-index:9;position:absolute}.anchor:not(.--active){opacity:0}.anchor:not(.--active),.anchor:not(.--active) *{pointer-events:none}.anchor--n,.anchor--s{right:50%;transform:translate(50%)}.anchor--ne,.anchor--nw{top:var(--margin-vertical)}.anchor--se,.anchor--sw{bottom:var(--margin-vertical)}.anchor--ne,.anchor--se{right:var(--margin-horizontal)}.anchor--nw,.anchor--sw{left:var(--margin-horizontal)}.anchor--n{top:var(--margin-vertical)}.anchor--s{bottom:var(--margin-vertical)}.alert{--max-width:640px;max-width:var(--max-width);padding:var(--padding-vertical)var(--padding-horizontal);width:calc(100% - var(--margin-horizontal)*2);z-index:9999;position:fixed}.alert.anchor--n:not(.--active){transform:translate(50%,-100%)}.alert.anchor--ne:not(.--active){transform:translateY(-100%)}
|
|
1
|
+
@layer components {.anchor{--margin-horizontal:var(--size-400);--margin-vertical:var(--size-400);max-height:calc(var(--max-height,100%) - var(--margin-vertical)*2);max-width:calc(var(--max-width,100%) - var(--margin-horizontal)*2);transition:opacity var(--transition-duration)ease-in-out,transform var(--transition-duration)ease-in-out;z-index:9;position:absolute}.anchor:not(.--active){opacity:0}.anchor:not(.--active),.anchor:not(.--active) *{pointer-events:none}.anchor--n,.anchor--s{right:50%;transform:translate(50%)}.anchor--ne,.anchor--nw{top:var(--margin-vertical)}.anchor--se,.anchor--sw{bottom:var(--margin-vertical)}.anchor--ne,.anchor--se{right:var(--margin-horizontal)}.anchor--nw,.anchor--sw{left:var(--margin-horizontal)}.anchor--n{top:var(--margin-vertical)}.anchor--s{bottom:var(--margin-vertical)}.alert{--max-width:640px;max-width:var(--max-width);padding:var(--padding-vertical)var(--padding-horizontal);width:calc(100% - var(--margin-horizontal)*2);z-index:9999;position:fixed}.alert.anchor--n:not(.--active){transform:translate(50%,-100%)}.alert.anchor--ne:not(.--active){transform:translateY(-100%)}}
|
|
2
2
|
/*$vite$:1*/
|
package/package.json
CHANGED
|
@@ -13,7 +13,7 @@ import './scss/index.scss';
|
|
|
13
13
|
type Type = 'error' | 'info' | 'success';
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
const OMIT = ['alert-close', 'alert-messages', 'message'];
|
|
16
|
+
const OMIT = ['alert-close', 'alert-messages', 'alert-message'];
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
let modifiers: Record<Type, string> = {
|
|
@@ -75,7 +75,7 @@ function deactivate(state: { active: boolean, messages: Set<Renderable<any>>, ty
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
|
|
78
|
-
export default (attributes: Attributes & { 'alert-close'?: Attributes, 'alert-messages'?: Attributes, message?: Attributes }) => {
|
|
78
|
+
export default (attributes: Attributes & { 'alert-close'?: Attributes, 'alert-messages'?: Attributes, 'alert-message'?: Attributes }) => {
|
|
79
79
|
let state = reactive({
|
|
80
80
|
active: false,
|
|
81
81
|
messages: new Set() as Set<Renderable<any>>,
|
|
@@ -121,11 +121,11 @@ export default (attributes: Attributes & { 'alert-close'?: Attributes, 'alert-me
|
|
|
121
121
|
}}
|
|
122
122
|
|
|
123
123
|
<div
|
|
124
|
-
class='alert-messages --flex-
|
|
124
|
+
class='alert-messages --flex-column --flex-fill'
|
|
125
125
|
${attributes['alert-messages']}
|
|
126
126
|
>
|
|
127
127
|
${() => {
|
|
128
|
-
let message = attributes
|
|
128
|
+
let message = attributes['alert-message'];
|
|
129
129
|
|
|
130
130
|
return state.rerender && [...state.messages].map((content) => {
|
|
131
131
|
if (typeof content === 'string') {
|
|
@@ -22,28 +22,4 @@
|
|
|
22
22
|
transform: translateY(-100%);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
&-close {
|
|
28
|
-
margin: calc(var(--padding-vertical) * -1) 0;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
&-message {
|
|
32
|
-
opacity: 0;
|
|
33
|
-
transition:
|
|
34
|
-
opacity var(--transition-duration) ease-in-out,
|
|
35
|
-
transform var(--transition-duration) ease-in-out;
|
|
36
|
-
|
|
37
|
-
@include tokens.state(inactive) {
|
|
38
|
-
pointer-events: none;
|
|
39
|
-
position: absolute;
|
|
40
|
-
transform: translateX(calc(25% * -1));
|
|
41
|
-
left: 0;
|
|
42
|
-
top: 0;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
@include tokens.state(active) {
|
|
46
|
-
opacity: 1;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
25
|
}
|