@esportsplus/ui 0.1.8 → 0.2.2
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
|
@@ -1,157 +1,157 @@
|
|
|
1
|
-
import { reactive } from '@esportsplus/reactivity';
|
|
2
|
-
import { html } from '@esportsplus/template';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
type Type = 'error' | 'info' | 'success';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
let modifiers: Record<Type, string> = {
|
|
9
|
-
error: 'red',
|
|
10
|
-
info: 'black',
|
|
11
|
-
success: 'green'
|
|
12
|
-
},
|
|
13
|
-
state = reactive({
|
|
14
|
-
active: false,
|
|
15
|
-
messages: new Set as Set<string>,
|
|
16
|
-
seconds: 0,
|
|
17
|
-
state: 'activating',
|
|
18
|
-
type: '' as Type
|
|
19
|
-
}),
|
|
20
|
-
timeout = 250;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
function activate(key: Type, messages: string | string[], seconds: number = 0) {
|
|
24
|
-
if (!Array.isArray(messages)) {
|
|
25
|
-
messages = [messages];
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
if (!messages.length) {
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
if (state.type !== key) {
|
|
33
|
-
state.messages.clear();
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
// @ts-ignore
|
|
37
|
-
state.type = '';
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
for (let message of messages) {
|
|
41
|
-
state.messages.add(message);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
state.state = 'activating';
|
|
45
|
-
state.type = key;
|
|
46
|
-
|
|
47
|
-
// Slide in animation needs time
|
|
48
|
-
if (state.active) {
|
|
49
|
-
state.active = true;
|
|
50
|
-
|
|
51
|
-
if (seconds) {
|
|
52
|
-
if (!state.seconds) {
|
|
53
|
-
state.seconds = seconds;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
setTimeout(() => {
|
|
57
|
-
if (messages && messages.length < (state?.messages?.size || 0)) {
|
|
58
|
-
for (let message of messages) {
|
|
59
|
-
state.messages.delete(message);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
state.messages = state.messages;
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
deactivate();
|
|
66
|
-
}
|
|
67
|
-
}, 400 * seconds);
|
|
68
|
-
}
|
|
69
|
-
else {
|
|
70
|
-
state.seconds = 0;
|
|
71
|
-
}
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
setTimeout(() => {
|
|
76
|
-
state.active = true;
|
|
77
|
-
|
|
78
|
-
if (seconds) {
|
|
79
|
-
if (!state.seconds) {
|
|
80
|
-
state.seconds = seconds;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
setTimeout(() => {
|
|
84
|
-
if (messages && messages.length < (state?.messages?.size || 0)) {
|
|
85
|
-
for (let message of messages) {
|
|
86
|
-
state.messages.delete(message);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
state.messages = state.messages;
|
|
90
|
-
}
|
|
91
|
-
else {
|
|
92
|
-
deactivate();
|
|
93
|
-
}
|
|
94
|
-
}, 400 * seconds);
|
|
95
|
-
}
|
|
96
|
-
else {
|
|
97
|
-
state.seconds = 0;
|
|
98
|
-
}
|
|
99
|
-
}, timeout);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
function deactivate() {
|
|
103
|
-
state.state = 'deactivating';
|
|
104
|
-
|
|
105
|
-
setTimeout(() => {
|
|
106
|
-
state.active = false;
|
|
107
|
-
state.messages.clear();
|
|
108
|
-
}, timeout);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
const error = (messages: string | string[], seconds: number = 0) => activate('error', messages, seconds);
|
|
113
|
-
|
|
114
|
-
const info = (messages: string | string[], seconds: number = 0) => activate('info', messages, seconds);
|
|
115
|
-
|
|
116
|
-
const success = (messages: string | string[], seconds: number = 0) => activate('success', messages, seconds);
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
const h = () => {
|
|
120
|
-
// TODO: Fix importing close svg
|
|
121
|
-
return () => state.active ? html`
|
|
122
|
-
<div class='alert anchor anchor--ne ${() => state.active && '--active'} ${() => `alert--${state.state}`}'>
|
|
123
|
-
<div class="alert-close --flex-start --margin-right --margin-100" onclick='${deactivate}'>
|
|
124
|
-
<div class='button --background-state ${() => `--background-${modifiers[state.type] || 'black'}`} --color-state --color-white --flex-center --padding-300'>
|
|
125
|
-
<div class="icon --size-300">
|
|
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
|
-
`}
|
|
132
|
-
</div>
|
|
133
|
-
</div>
|
|
134
|
-
</div>
|
|
135
|
-
|
|
136
|
-
<div class="card --overflow-hidden" style='--background: var(--color-white-400)'>
|
|
137
|
-
<div class="alert-message --active --flex-row --padding --padding-horizontal-500 --padding-vertical-400">
|
|
138
|
-
<div class='--flex-row --flex-fill --flex-vertical'>
|
|
139
|
-
<div class="--flex-fill --flex-column --padding-right --padding-400">
|
|
140
|
-
<h5 class="page-title">
|
|
141
|
-
${() => state.type.charAt(0).toUpperCase() + state.type.slice(1)}
|
|
142
|
-
</h5>
|
|
143
|
-
${() => state.type && [...state.messages].map((message) => html`
|
|
144
|
-
<p class='--margin-top --margin-border-width-500'>${message}</p>
|
|
145
|
-
`)}
|
|
146
|
-
</div>
|
|
147
|
-
</div>
|
|
148
|
-
</div>
|
|
149
|
-
</div>
|
|
150
|
-
</div>
|
|
151
|
-
` : '';
|
|
152
|
-
};
|
|
153
|
-
|
|
154
|
-
const types = ['error', 'info', 'success'] as const;
|
|
155
|
-
|
|
156
|
-
|
|
1
|
+
import { reactive } from '@esportsplus/reactivity';
|
|
2
|
+
import { html } from '@esportsplus/template';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
type Type = 'error' | 'info' | 'success';
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
let modifiers: Record<Type, string> = {
|
|
9
|
+
error: 'red',
|
|
10
|
+
info: 'black',
|
|
11
|
+
success: 'green'
|
|
12
|
+
},
|
|
13
|
+
state = reactive({
|
|
14
|
+
active: false,
|
|
15
|
+
messages: new Set as Set<string>,
|
|
16
|
+
seconds: 0,
|
|
17
|
+
state: 'activating',
|
|
18
|
+
type: '' as Type
|
|
19
|
+
}),
|
|
20
|
+
timeout = 250;
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
function activate(key: Type, messages: string | string[], seconds: number = 0) {
|
|
24
|
+
if (!Array.isArray(messages)) {
|
|
25
|
+
messages = [messages];
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
if (!messages.length) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if (state.type !== key) {
|
|
33
|
+
state.messages.clear();
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
// @ts-ignore
|
|
37
|
+
state.type = '';
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
for (let message of messages) {
|
|
41
|
+
state.messages.add(message);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
state.state = 'activating';
|
|
45
|
+
state.type = key;
|
|
46
|
+
|
|
47
|
+
// Slide in animation needs time
|
|
48
|
+
if (state.active) {
|
|
49
|
+
state.active = true;
|
|
50
|
+
|
|
51
|
+
if (seconds) {
|
|
52
|
+
if (!state.seconds) {
|
|
53
|
+
state.seconds = seconds;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
setTimeout(() => {
|
|
57
|
+
if (messages && messages.length < (state?.messages?.size || 0)) {
|
|
58
|
+
for (let message of messages) {
|
|
59
|
+
state.messages.delete(message);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
state.messages = state.messages;
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
deactivate();
|
|
66
|
+
}
|
|
67
|
+
}, 400 * seconds);
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
state.seconds = 0;
|
|
71
|
+
}
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
setTimeout(() => {
|
|
76
|
+
state.active = true;
|
|
77
|
+
|
|
78
|
+
if (seconds) {
|
|
79
|
+
if (!state.seconds) {
|
|
80
|
+
state.seconds = seconds;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
setTimeout(() => {
|
|
84
|
+
if (messages && messages.length < (state?.messages?.size || 0)) {
|
|
85
|
+
for (let message of messages) {
|
|
86
|
+
state.messages.delete(message);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
state.messages = state.messages;
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
deactivate();
|
|
93
|
+
}
|
|
94
|
+
}, 400 * seconds);
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
state.seconds = 0;
|
|
98
|
+
}
|
|
99
|
+
}, timeout);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function deactivate() {
|
|
103
|
+
state.state = 'deactivating';
|
|
104
|
+
|
|
105
|
+
setTimeout(() => {
|
|
106
|
+
state.active = false;
|
|
107
|
+
state.messages.clear();
|
|
108
|
+
}, timeout);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
const error = (messages: string | string[], seconds: number = 0) => activate('error', messages, seconds);
|
|
113
|
+
|
|
114
|
+
const info = (messages: string | string[], seconds: number = 0) => activate('info', messages, seconds);
|
|
115
|
+
|
|
116
|
+
const success = (messages: string | string[], seconds: number = 0) => activate('success', messages, seconds);
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
const h = () => {
|
|
120
|
+
// TODO: Fix importing close svg
|
|
121
|
+
return () => state.active ? html`
|
|
122
|
+
<div class='alert anchor anchor--ne ${() => state.active && '--active'} ${() => `alert--${state.state}`}'>
|
|
123
|
+
<div class="alert-close --flex-start --margin-right --margin-100" onclick='${deactivate}'>
|
|
124
|
+
<div class='button --background-state ${() => `--background-${modifiers[state.type] || 'black'}`} --color-state --color-white --flex-center --padding-300'>
|
|
125
|
+
<div class="icon --size-300">
|
|
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
|
+
`}
|
|
132
|
+
</div>
|
|
133
|
+
</div>
|
|
134
|
+
</div>
|
|
135
|
+
|
|
136
|
+
<div class="card --overflow-hidden" style='--background: var(--color-white-400)'>
|
|
137
|
+
<div class="alert-message --active --flex-row --padding --padding-horizontal-500 --padding-vertical-400">
|
|
138
|
+
<div class='--flex-row --flex-fill --flex-vertical'>
|
|
139
|
+
<div class="--flex-fill --flex-column --padding-right --padding-400">
|
|
140
|
+
<h5 class="page-title">
|
|
141
|
+
${() => state.type.charAt(0).toUpperCase() + state.type.slice(1)}
|
|
142
|
+
</h5>
|
|
143
|
+
${() => state.type && [...state.messages].map((message) => html`
|
|
144
|
+
<p class='--margin-top --margin-border-width-500'>${message}</p>
|
|
145
|
+
`)}
|
|
146
|
+
</div>
|
|
147
|
+
</div>
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
151
|
+
` : '';
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
const types = ['error', 'info', 'success'] as const;
|
|
155
|
+
|
|
156
|
+
|
|
157
157
|
export default { deactivate, error, html: h, info, success, types };
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
@use '/lib';
|
|
2
|
-
@use '/tokens';
|
|
3
|
-
|
|
4
|
-
.alert {
|
|
5
|
-
max-width: var(--max-width);
|
|
6
|
-
width: calc(100% - (var(--margin-horizontal) * 2));
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
&--deactivating {
|
|
10
|
-
opacity: 0;
|
|
11
|
-
transform: translateY(-50%);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
&--activating {
|
|
15
|
-
@include tokens.state(inactive) {
|
|
16
|
-
transform: translateY(50%);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
&-close {
|
|
22
|
-
@include lib.position(absolute, 0 100% 0 null);
|
|
23
|
-
animation: alert-close var(--transition-duration) ease-in-out;
|
|
24
|
-
transition: transform var(--transition-duration) ease-in-out;
|
|
25
|
-
z-index: 0;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
&-message {
|
|
29
|
-
opacity: 0;
|
|
30
|
-
transition:
|
|
31
|
-
opacity var(--transition-duration) ease-in-out,
|
|
32
|
-
transform var(--transition-duration) ease-in-out;
|
|
33
|
-
|
|
34
|
-
@include tokens.state(inactive) {
|
|
35
|
-
pointer-events: none;
|
|
36
|
-
position: absolute;
|
|
37
|
-
transform: translateX(calc(25% * -1));
|
|
38
|
-
left: 0;
|
|
39
|
-
top: 0;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
@include tokens.state(active) {
|
|
43
|
-
opacity: 1;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
@keyframes alert-close {
|
|
49
|
-
from {
|
|
50
|
-
transform: translateX(150%);
|
|
51
|
-
}
|
|
52
|
-
to {
|
|
53
|
-
transform: translateX(0);
|
|
54
|
-
}
|
|
1
|
+
@use '/lib';
|
|
2
|
+
@use '/tokens';
|
|
3
|
+
|
|
4
|
+
.alert {
|
|
5
|
+
max-width: var(--max-width);
|
|
6
|
+
width: calc(100% - (var(--margin-horizontal) * 2));
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
&--deactivating {
|
|
10
|
+
opacity: 0;
|
|
11
|
+
transform: translateY(-50%);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
&--activating {
|
|
15
|
+
@include tokens.state(inactive) {
|
|
16
|
+
transform: translateY(50%);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
&-close {
|
|
22
|
+
@include lib.position(absolute, 0 100% 0 null);
|
|
23
|
+
animation: alert-close var(--transition-duration) ease-in-out;
|
|
24
|
+
transition: transform var(--transition-duration) ease-in-out;
|
|
25
|
+
z-index: 0;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&-message {
|
|
29
|
+
opacity: 0;
|
|
30
|
+
transition:
|
|
31
|
+
opacity var(--transition-duration) ease-in-out,
|
|
32
|
+
transform var(--transition-duration) ease-in-out;
|
|
33
|
+
|
|
34
|
+
@include tokens.state(inactive) {
|
|
35
|
+
pointer-events: none;
|
|
36
|
+
position: absolute;
|
|
37
|
+
transform: translateX(calc(25% * -1));
|
|
38
|
+
left: 0;
|
|
39
|
+
top: 0;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@include tokens.state(active) {
|
|
43
|
+
opacity: 1;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@keyframes alert-close {
|
|
49
|
+
from {
|
|
50
|
+
transform: translateX(150%);
|
|
51
|
+
}
|
|
52
|
+
to {
|
|
53
|
+
transform: translateX(0);
|
|
54
|
+
}
|
|
55
55
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
.alert {
|
|
2
|
-
--max-width: 420px;
|
|
3
|
-
|
|
4
|
-
&-close,
|
|
5
|
-
&-message {
|
|
6
|
-
--transition-duration: var(--transition-duration-400);
|
|
7
|
-
}
|
|
8
|
-
}
|
|
1
|
+
.alert {
|
|
2
|
+
--max-width: 420px;
|
|
3
|
+
|
|
4
|
+
&-close,
|
|
5
|
+
&-message {
|
|
6
|
+
--transition-duration: var(--transition-duration-400);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
@use '/tokens';
|
|
2
|
-
|
|
3
|
-
.anchor {
|
|
4
|
-
max-height: calc(var(--max-height, 100%) - (var(--margin-vertical) * 2));
|
|
5
|
-
max-width: calc(var(--max-width, 100%) - (var(--margin-horizontal) * 2));
|
|
6
|
-
position: absolute;
|
|
7
|
-
transition:
|
|
8
|
-
opacity var(--transition-duration) ease-in-out,
|
|
9
|
-
transform var(--transition-duration) ease-in-out;
|
|
10
|
-
z-index: 9;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
@include tokens.state(inactive) {
|
|
14
|
-
opacity: 0;
|
|
15
|
-
|
|
16
|
-
&, * {
|
|
17
|
-
pointer-events: none;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
&--ne,
|
|
23
|
-
&--nw {
|
|
24
|
-
top: var(--margin-vertical);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
&--se,
|
|
28
|
-
&--sw {
|
|
29
|
-
bottom: var(--margin-vertical);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
&--ne,
|
|
33
|
-
&--se {
|
|
34
|
-
right: var(--margin-horizontal);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
&--nw,
|
|
38
|
-
&--sw {
|
|
39
|
-
left: var(--margin-horizontal);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
1
|
+
@use '/tokens';
|
|
2
|
+
|
|
3
|
+
.anchor {
|
|
4
|
+
max-height: calc(var(--max-height, 100%) - (var(--margin-vertical) * 2));
|
|
5
|
+
max-width: calc(var(--max-width, 100%) - (var(--margin-horizontal) * 2));
|
|
6
|
+
position: absolute;
|
|
7
|
+
transition:
|
|
8
|
+
opacity var(--transition-duration) ease-in-out,
|
|
9
|
+
transform var(--transition-duration) ease-in-out;
|
|
10
|
+
z-index: 9;
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@include tokens.state(inactive) {
|
|
14
|
+
opacity: 0;
|
|
15
|
+
|
|
16
|
+
&, * {
|
|
17
|
+
pointer-events: none;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
&--ne,
|
|
23
|
+
&--nw {
|
|
24
|
+
top: var(--margin-vertical);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&--se,
|
|
28
|
+
&--sw {
|
|
29
|
+
bottom: var(--margin-vertical);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&--ne,
|
|
33
|
+
&--se {
|
|
34
|
+
right: var(--margin-horizontal);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&--nw,
|
|
38
|
+
&--sw {
|
|
39
|
+
left: var(--margin-horizontal);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
.anchor {
|
|
2
|
-
--margin-horizontal: var(--size-400);
|
|
3
|
-
--margin-vertical: var(--size-400);
|
|
4
|
-
--transition-duration: var(--transition-duration-400);
|
|
5
|
-
}
|
|
1
|
+
.anchor {
|
|
2
|
+
--margin-horizontal: var(--size-400);
|
|
3
|
+
--margin-vertical: var(--size-400);
|
|
4
|
+
--transition-duration: var(--transition-duration-400);
|
|
5
|
+
}
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
@use '/lib';
|
|
2
|
-
|
|
3
|
-
.banner {
|
|
4
|
-
@include lib.position(absolute, full);
|
|
5
|
-
background-position: center;
|
|
6
|
-
background-size: cover;
|
|
7
|
-
z-index: -1;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
&--backdrop {
|
|
11
|
-
background-position: bottom;
|
|
12
|
-
height: 80svh;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
&--blur {
|
|
16
|
-
filter: blur(24px);
|
|
17
|
-
left: -2svh;
|
|
18
|
-
right: -2svh;
|
|
19
|
-
top: -2svh;
|
|
20
|
-
|
|
21
|
-
&.banner--backdrop {
|
|
22
|
-
height: 90svh;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
&--fixed {
|
|
27
|
-
position: fixed;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
&--gradient {
|
|
31
|
-
&::before {
|
|
32
|
-
@include lib.position(absolute, full);
|
|
33
|
-
background:
|
|
34
|
-
radial-gradient(circle at top, transparent 64%, var(--to) 88%),
|
|
35
|
-
linear-gradient(to bottom, var(--from) 0%, var(--to) 100%);
|
|
36
|
-
content: '';
|
|
37
|
-
z-index: 0;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
1
|
+
@use '/lib';
|
|
2
|
+
|
|
3
|
+
.banner {
|
|
4
|
+
@include lib.position(absolute, full);
|
|
5
|
+
background-position: center;
|
|
6
|
+
background-size: cover;
|
|
7
|
+
z-index: -1;
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
&--backdrop {
|
|
11
|
+
background-position: bottom;
|
|
12
|
+
height: 80svh;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&--blur {
|
|
16
|
+
filter: blur(24px);
|
|
17
|
+
left: -2svh;
|
|
18
|
+
right: -2svh;
|
|
19
|
+
top: -2svh;
|
|
20
|
+
|
|
21
|
+
&.banner--backdrop {
|
|
22
|
+
height: 90svh;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&--fixed {
|
|
27
|
+
position: fixed;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&--gradient {
|
|
31
|
+
&::before {
|
|
32
|
+
@include lib.position(absolute, full);
|
|
33
|
+
background:
|
|
34
|
+
radial-gradient(circle at top, transparent 64%, var(--to) 88%),
|
|
35
|
+
linear-gradient(to bottom, var(--from) 0%, var(--to) 100%);
|
|
36
|
+
content: '';
|
|
37
|
+
z-index: 0;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
.banner {
|
|
2
|
-
&--gradient {
|
|
3
|
-
--from: rgba(3,0,19, 0.32);
|
|
4
|
-
--to: var(--color-black-500);
|
|
5
|
-
}
|
|
1
|
+
.banner {
|
|
2
|
+
&--gradient {
|
|
3
|
+
--from: rgba(3,0,19, 0.32);
|
|
4
|
+
--to: var(--color-black-500);
|
|
5
|
+
}
|
|
6
6
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
.border {
|
|
2
|
-
border-top: var(--border-width) var(--border-style) var(--border-color);
|
|
3
|
-
position: relative;
|
|
4
|
-
width: 100%;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
& + & {
|
|
8
|
-
display: none;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
1
|
+
.border {
|
|
2
|
+
border-top: var(--border-width) var(--border-style) var(--border-color);
|
|
3
|
+
position: relative;
|
|
4
|
+
width: 100%;
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
& + & {
|
|
8
|
+
display: none;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
.border {
|
|
2
|
-
--border-color: var(--border-color-default);
|
|
3
|
-
--border-color-default: var(--color-border-400);
|
|
4
|
-
--border-style: solid;
|
|
5
|
-
--border-width: var(--border-width-400);
|
|
6
|
-
}
|
|
1
|
+
.border {
|
|
2
|
+
--border-color: var(--border-color-default);
|
|
3
|
+
--border-color-default: var(--color-border-400);
|
|
4
|
+
--border-style: solid;
|
|
5
|
+
--border-width: var(--border-width-400);
|
|
6
|
+
}
|