@esportsplus/ui 0.7.16 → 0.8.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/build/components/clipboard/index.d.ts +1 -0
- package/build/components/clipboard/index.js +1 -0
- package/build/components/counter/index.js +16 -16
- package/build/components/ellipsis/index.js +6 -6
- package/build/components/footer/index.js +46 -46
- package/build/components/form/layout.js +10 -10
- package/build/components/link/hover.js +8 -8
- package/build/components/loader/index.js +15 -15
- package/build/components/loading/index.js +2 -2
- package/build/components/magnet/index.js +7 -7
- package/build/components/scrollbar/index.js +9 -9
- package/build/components/site/index.js +5 -5
- package/components/styles.css +1 -2
- package/components/variables.css +1 -3
- package/lib.scss +1 -1
- package/package.json +4 -1
- package/src/components/accordion/index.ts +34 -34
- package/src/components/accordion/scss/index.scss +16 -16
- package/src/components/accordion/scss/variables.scss +9 -9
- package/src/components/anchor/scss/index.scss +41 -41
- package/src/components/anchor/scss/variables.scss +4 -4
- package/src/components/banner/scss/index.scss +40 -40
- package/src/components/banner/scss/variables.scss +9 -9
- package/src/components/button/scss/index.scss +114 -114
- package/src/components/button/scss/variables.scss +66 -66
- package/src/components/card/scss/index.scss +35 -35
- package/src/components/card/scss/variables.scss +41 -41
- package/src/components/clipboard/index.ts +4 -3
- package/src/components/clipboard/scss/index.scss +3 -0
- package/src/components/clipboard/write.ts +8 -8
- package/src/components/container/scss/index.scss +8 -8
- package/src/components/container/scss/variables.scss +5 -5
- package/src/components/counter/index.ts +93 -93
- package/src/components/counter/scss/index.scss +61 -61
- package/src/components/counter/scss/variables.scss +26 -26
- package/src/components/ellipsis/index.ts +9 -9
- package/src/components/ellipsis/scss/index.scss +27 -27
- package/src/components/ellipsis/scss/variables.scss +4 -4
- package/src/components/footer/index.ts +78 -78
- package/src/components/footer/scss/index.scss +25 -25
- package/src/components/form/action.ts +80 -80
- 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/frame/scss/index.scss +11 -11
- package/src/components/grid/scss/index.scss +9 -9
- package/src/components/grid/scss/variables.scss +5 -5
- package/src/components/group/scss/index.scss +36 -36
- package/src/components/group/scss/variables.scss +17 -17
- package/src/components/highlight/index.ts +47 -47
- package/src/components/highlight/scss/index.scss +4 -4
- package/src/components/highlight/scss/variables.scss +3 -3
- package/src/components/icon/scss/index.scss +16 -16
- package/src/components/icon/scss/variables.scss +7 -7
- package/src/components/json/download.ts +14 -14
- package/src/components/json/index.ts +3 -3
- package/src/components/link/hover.ts +18 -18
- package/src/components/link/index.ts +3 -3
- package/src/components/link/scss/index.scss +65 -65
- package/src/components/link/scss/variables.scss +46 -46
- package/src/components/loader/index.ts +34 -34
- package/src/components/loader/scss/index.scss +68 -68
- package/src/components/loader/scss/variables.scss +5 -5
- package/src/components/loading/index.ts +7 -7
- package/src/components/loading/scss/index.scss +16 -16
- package/src/components/loading/scss/variables.scss +5 -5
- package/src/components/magnet/index.ts +54 -54
- package/src/components/magnet/scss/index.scss +16 -16
- package/src/components/magnet/scss/variables.scss +4 -4
- package/src/components/modal/scss/index.scss +34 -34
- package/src/components/modal/scss/variables.scss +6 -6
- package/src/components/number/index.ts +23 -23
- package/src/components/page/index.ts +14 -14
- package/src/components/page/scss/index.scss +31 -31
- package/src/components/page/scss/variables.scss +15 -15
- package/src/components/root/index.ts +4 -4
- package/src/components/root/onclick.ts +20 -20
- package/src/components/root/scss/index.scss +94 -94
- package/src/components/root/scss/variables.scss +100 -100
- package/src/components/row/scss/index.scss +7 -7
- package/src/components/scrollbar/index.ts +43 -43
- package/src/components/scrollbar/scss/index.scss +70 -70
- package/src/components/scrollbar/scss/variables.scss +6 -6
- package/src/components/sidebar/scss/index.scss +49 -49
- package/src/components/sidebar/scss/variables.scss +20 -20
- package/src/components/site/index.ts +26 -26
- package/src/components/site/scss/index.scss +3 -3
- package/src/components/text/scss/index.scss +9 -9
- package/src/components/text/scss/variables.scss +8 -8
- package/src/components/thumbnail/scss/index.scss +7 -7
- package/src/components/thumbnail/scss/variables.scss +7 -7
- package/src/components/tooltip/index.ts +84 -84
- 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 +24 -24
- package/src/components/truncate/index.ts +13 -13
- package/src/components/typewriter/index.ts +53 -53
- package/src/components/typewriter/scss/index.scss +14 -14
- 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 +36 -36
- 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/squircle/scss/index.scss +4 -4
- package/src/css-utilities/text/scss/index.scss +89 -89
- package/src/css-utilities/text/scss/variables.scss +31 -31
- 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 +18 -18
- 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 +16 -16
- package/src/lib/scss/list.scss +77 -77
- package/src/lib/scss/map.scss +1 -1
- package/src/lib/scss/position.scss +55 -55
- package/src/lib/scss/string.scss +34 -34
- 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 +39 -21
- package/src/tokens/scss/color.scss +64 -65
- package/src/tokens/scss/font-size.scss +16 -16
- 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 +10 -8
- package/src/tokens/scss/state.scss +87 -87
- package/src/tokens/scss/transition-duration.scss +1 -1
- package/storage/fonts/montserrat/index.css +79 -79
- package/storage/psd/Color Palette.psd +0 -0
- package/tokens.scss +1 -1
- package/tsconfig.json +2 -2
- package/utilities/styles.css +1 -1
- package/utilities/variables.css +1 -1
- package/webpack.config.ts +25 -25
- package/.github/dependabot.yml +0 -23
- package/.github/workflows/bump.yml +0 -7
- package/.github/workflows/publish.yml +0 -14
- package/src/components/border/scss/index.scss +0 -10
- package/src/components/border/scss/variables.scss +0 -6
- package/src/components/bubble/scss/index.scss +0 -30
- package/src/components/bubble/scss/variables.scss +0 -19
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
@use '/tokens';
|
|
2
|
-
|
|
3
|
-
.card {
|
|
4
|
-
--background: var(--background-default);
|
|
5
|
-
--background-active: var(--background-default);
|
|
6
|
-
--background-default: transparent;
|
|
7
|
-
--background-hover: var(--background-default);
|
|
8
|
-
--background-pressed: var(--background-default);
|
|
9
|
-
--border-color: var(--border-color-default);
|
|
10
|
-
--border-color-active: var(--border-color-default);
|
|
11
|
-
--border-color-default: var(--background);
|
|
12
|
-
--border-color-hover: var(--border-color-default);
|
|
13
|
-
--border-color-pressed: var(--border-color-default);
|
|
14
|
-
--border-radius: var(--border-radius-400);
|
|
15
|
-
--box-shadow: var(--box-shadow-default);
|
|
16
|
-
--box-shadow-active: var(--box-shadow-300);
|
|
17
|
-
--box-shadow-default: none;
|
|
18
|
-
--box-shadow-hover: var(--box-shadow-300);
|
|
19
|
-
--box-shadow-pressed: none;
|
|
20
|
-
--padding-horizontal: 0px;
|
|
21
|
-
--padding-vertical: 0px;
|
|
22
|
-
--width: auto;
|
|
23
|
-
|
|
24
|
-
@include tokens.state(active) {
|
|
25
|
-
--background: var(--background-active);
|
|
26
|
-
--border-color: var(--border-color-active);
|
|
27
|
-
--box-shadow: var(--box-shadow-active);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
@include tokens.state(hover) {
|
|
31
|
-
--background: var(--background-hover);
|
|
32
|
-
--border-color: var(--border-color-hover);
|
|
33
|
-
--box-shadow: var(--box-shadow-hover);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
@include tokens.state(pressed) {
|
|
37
|
-
--background: var(--background-pressed);
|
|
38
|
-
--border-color: var(--border-color-pressed);
|
|
39
|
-
--box-shadow: var(--box-shadow-pressed);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
1
|
+
@use '/tokens';
|
|
2
|
+
|
|
3
|
+
.card {
|
|
4
|
+
--background: var(--background-default);
|
|
5
|
+
--background-active: var(--background-default);
|
|
6
|
+
--background-default: transparent;
|
|
7
|
+
--background-hover: var(--background-default);
|
|
8
|
+
--background-pressed: var(--background-default);
|
|
9
|
+
--border-color: var(--border-color-default);
|
|
10
|
+
--border-color-active: var(--border-color-default);
|
|
11
|
+
--border-color-default: var(--background);
|
|
12
|
+
--border-color-hover: var(--border-color-default);
|
|
13
|
+
--border-color-pressed: var(--border-color-default);
|
|
14
|
+
--border-radius: var(--border-radius-400);
|
|
15
|
+
--box-shadow: var(--box-shadow-default);
|
|
16
|
+
--box-shadow-active: var(--box-shadow-300);
|
|
17
|
+
--box-shadow-default: none;
|
|
18
|
+
--box-shadow-hover: var(--box-shadow-300);
|
|
19
|
+
--box-shadow-pressed: none;
|
|
20
|
+
--padding-horizontal: 0px;
|
|
21
|
+
--padding-vertical: 0px;
|
|
22
|
+
--width: auto;
|
|
23
|
+
|
|
24
|
+
@include tokens.state(active) {
|
|
25
|
+
--background: var(--background-active);
|
|
26
|
+
--border-color: var(--border-color-active);
|
|
27
|
+
--box-shadow: var(--box-shadow-active);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@include tokens.state(hover) {
|
|
31
|
+
--background: var(--background-hover);
|
|
32
|
+
--border-color: var(--border-color-hover);
|
|
33
|
+
--box-shadow: var(--box-shadow-hover);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@include tokens.state(pressed) {
|
|
37
|
+
--background: var(--background-pressed);
|
|
38
|
+
--border-color: var(--border-color-pressed);
|
|
39
|
+
--box-shadow: var(--box-shadow-pressed);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export default async (value: string) => {
|
|
2
|
-
try {
|
|
3
|
-
await navigator.clipboard.writeText(value);
|
|
4
|
-
return true;
|
|
5
|
-
}
|
|
6
|
-
catch {
|
|
7
|
-
return false;
|
|
8
|
-
}
|
|
1
|
+
export default async (value: string) => {
|
|
2
|
+
try {
|
|
3
|
+
await navigator.clipboard.writeText(value);
|
|
4
|
+
return true;
|
|
5
|
+
}
|
|
6
|
+
catch {
|
|
7
|
+
return false;
|
|
8
|
+
}
|
|
9
9
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
.container {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-wrap: wrap;
|
|
4
|
-
justify-content: flex-start;
|
|
5
|
-
margin: var(--margin-vertical) auto;
|
|
6
|
-
position: relative;
|
|
7
|
-
width: min(var(--max-width), calc(100% - var(--margin-horizontal) * 2));
|
|
8
|
-
}
|
|
1
|
+
.container {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-wrap: wrap;
|
|
4
|
+
justify-content: flex-start;
|
|
5
|
+
margin: var(--margin-vertical) auto;
|
|
6
|
+
position: relative;
|
|
7
|
+
width: min(var(--max-width), calc(100% - var(--margin-horizontal) * 2));
|
|
8
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
.container {
|
|
2
|
-
--margin-horizontal: var(--size-600);
|
|
3
|
-
--margin-vertical: 0px;
|
|
4
|
-
--max-width: 1400px;
|
|
5
|
-
}
|
|
1
|
+
.container {
|
|
2
|
+
--margin-horizontal: var(--size-600);
|
|
3
|
+
--margin-vertical: 0px;
|
|
4
|
+
--max-width: 1400px;
|
|
5
|
+
}
|
|
@@ -1,94 +1,94 @@
|
|
|
1
|
-
import { effect, reactive } from '@esportsplus/reactivity'
|
|
2
|
-
import { html } from '@esportsplus/template';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
let formatters: Record<string, Intl.NumberFormat> = {};
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export default ({ currency, delay, max, suffix, value }: { currency?: 'IGNORE' | 'EUR' | 'GBP' | 'USD', delay?: number, max?: number, suffix?: string, value: number }) => {
|
|
9
|
-
let api = reactive({ value: -1 }),
|
|
10
|
-
formatter = currency === 'IGNORE' ? undefined : formatters[currency || 'USD'] ??= new Intl.NumberFormat('en-US', {
|
|
11
|
-
style: 'currency',
|
|
12
|
-
currency: currency || 'USD'
|
|
13
|
-
}),
|
|
14
|
-
rendering = true,
|
|
15
|
-
state = reactive({
|
|
16
|
-
length: 0,
|
|
17
|
-
render: [] as string[]
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
effect(() => {
|
|
21
|
-
if (api.value !== -1) {
|
|
22
|
-
value = api.value;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
let padding = (max || value).toFixed(2).length - value.toFixed(2).length,
|
|
26
|
-
values = value.toString().padStart( value.toString().length + padding, '1') as any;
|
|
27
|
-
|
|
28
|
-
if (formatter) {
|
|
29
|
-
values = formatter.format(values);
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
values = Number(values).toLocaleString();
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
values = values.split('');
|
|
36
|
-
|
|
37
|
-
if (suffix) {
|
|
38
|
-
values.push(' ', ...suffix.split(''));
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
state.length = values.length;
|
|
42
|
-
|
|
43
|
-
for (let i = 0, n = values.length; i < n; i++) {
|
|
44
|
-
let value = values[i];
|
|
45
|
-
|
|
46
|
-
if (!isNaN(parseInt(value, 10)) && (rendering === true || padding > 0)) {
|
|
47
|
-
padding--;
|
|
48
|
-
value = '0';
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
state.render[i] = value;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
if (rendering === true) {
|
|
55
|
-
rendering = false;
|
|
56
|
-
setTimeout(() => api.value = value, delay || 1000);
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
return {
|
|
61
|
-
html: html`
|
|
62
|
-
<div class='counter'>
|
|
63
|
-
${() => {
|
|
64
|
-
let n = state.length;
|
|
65
|
-
|
|
66
|
-
if (n === 0) {
|
|
67
|
-
return '';
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
return html.reactive(state.render, function (value, i) {
|
|
71
|
-
if (isNaN(parseInt(value as string, 10))) {
|
|
72
|
-
return html`
|
|
73
|
-
<span class='counter-character counter-character--symbol'>
|
|
74
|
-
${value}
|
|
75
|
-
</span>
|
|
76
|
-
`;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
return html`
|
|
80
|
-
<div class='counter-character ${i > n - 3 ? 'counter-character--fraction' : ''}'>
|
|
81
|
-
<div class='counter-character-track' style='${() => `--value: ${this[i]}`}'>
|
|
82
|
-
<span>9</span>
|
|
83
|
-
${[0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map((value) => html`<span>${value}</span>`)}
|
|
84
|
-
<span>0</span>
|
|
85
|
-
</div>
|
|
86
|
-
</div>
|
|
87
|
-
`;
|
|
88
|
-
})
|
|
89
|
-
}}
|
|
90
|
-
</div>
|
|
91
|
-
`,
|
|
92
|
-
state: api
|
|
93
|
-
};
|
|
1
|
+
import { effect, reactive } from '@esportsplus/reactivity'
|
|
2
|
+
import { html } from '@esportsplus/template';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
let formatters: Record<string, Intl.NumberFormat> = {};
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
export default ({ currency, delay, max, suffix, value }: { currency?: 'IGNORE' | 'EUR' | 'GBP' | 'USD', delay?: number, max?: number, suffix?: string, value: number }) => {
|
|
9
|
+
let api = reactive({ value: -1 }),
|
|
10
|
+
formatter = currency === 'IGNORE' ? undefined : formatters[currency || 'USD'] ??= new Intl.NumberFormat('en-US', {
|
|
11
|
+
style: 'currency',
|
|
12
|
+
currency: currency || 'USD'
|
|
13
|
+
}),
|
|
14
|
+
rendering = true,
|
|
15
|
+
state = reactive({
|
|
16
|
+
length: 0,
|
|
17
|
+
render: [] as string[]
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
effect(() => {
|
|
21
|
+
if (api.value !== -1) {
|
|
22
|
+
value = api.value;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
let padding = (max || value).toFixed(2).length - value.toFixed(2).length,
|
|
26
|
+
values = value.toString().padStart( value.toString().length + padding, '1') as any;
|
|
27
|
+
|
|
28
|
+
if (formatter) {
|
|
29
|
+
values = formatter.format(values);
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
values = Number(values).toLocaleString();
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
values = values.split('');
|
|
36
|
+
|
|
37
|
+
if (suffix) {
|
|
38
|
+
values.push(' ', ...suffix.split(''));
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
state.length = values.length;
|
|
42
|
+
|
|
43
|
+
for (let i = 0, n = values.length; i < n; i++) {
|
|
44
|
+
let value = values[i];
|
|
45
|
+
|
|
46
|
+
if (!isNaN(parseInt(value, 10)) && (rendering === true || padding > 0)) {
|
|
47
|
+
padding--;
|
|
48
|
+
value = '0';
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
state.render[i] = value;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
if (rendering === true) {
|
|
55
|
+
rendering = false;
|
|
56
|
+
setTimeout(() => api.value = value, delay || 1000);
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
return {
|
|
61
|
+
html: html`
|
|
62
|
+
<div class='counter'>
|
|
63
|
+
${() => {
|
|
64
|
+
let n = state.length;
|
|
65
|
+
|
|
66
|
+
if (n === 0) {
|
|
67
|
+
return '';
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return html.reactive(state.render, function (value, i) {
|
|
71
|
+
if (isNaN(parseInt(value as string, 10))) {
|
|
72
|
+
return html`
|
|
73
|
+
<span class='counter-character counter-character--symbol'>
|
|
74
|
+
${value}
|
|
75
|
+
</span>
|
|
76
|
+
`;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return html`
|
|
80
|
+
<div class='counter-character ${i > n - 3 ? 'counter-character--fraction' : ''}'>
|
|
81
|
+
<div class='counter-character-track' style='${() => `--value: ${this[i]}`}'>
|
|
82
|
+
<span>9</span>
|
|
83
|
+
${[0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map((value) => html`<span>${value}</span>`)}
|
|
84
|
+
<span>0</span>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
`;
|
|
88
|
+
})
|
|
89
|
+
}}
|
|
90
|
+
</div>
|
|
91
|
+
`,
|
|
92
|
+
state: api
|
|
93
|
+
};
|
|
94
94
|
};
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
.counter {
|
|
2
|
-
display: flex;
|
|
3
|
-
gap: 2px;
|
|
4
|
-
place-items: center;
|
|
5
|
-
transition: transform 0.5s 2s;
|
|
6
|
-
transform-style: flat;
|
|
7
|
-
|
|
8
|
-
&-character,
|
|
9
|
-
&-character-track span {
|
|
10
|
-
background: linear-gradient(hsl(0 0% 98%) 50%, hsl(0 0% 45%));
|
|
11
|
-
background-attachment: fixed;
|
|
12
|
-
background-clip: text;
|
|
13
|
-
color: transparent;
|
|
14
|
-
transform-style: flat;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
&-character {
|
|
18
|
-
display: grid;
|
|
19
|
-
font-size: var(--font-size);
|
|
20
|
-
font-variant: tabular-nums;
|
|
21
|
-
font-weight: var(--font-weight);
|
|
22
|
-
height: 1lh;
|
|
23
|
-
line-height: var(--line-height);
|
|
24
|
-
mask: linear-gradient(transparent, white calc(1lh * var(--mask-size)) calc(100% - (1lh * var(--mask-size))), transparent);
|
|
25
|
-
overflow: hidden;
|
|
26
|
-
transform-style: flat;
|
|
27
|
-
|
|
28
|
-
&--fraction {
|
|
29
|
-
font-size: calc(var(--font-size) * var(--scale));
|
|
30
|
-
font-weight: var(--font-weight-300);
|
|
31
|
-
opacity: var(--opacity);
|
|
32
|
-
overflow: visible;
|
|
33
|
-
height: var(--line-height);
|
|
34
|
-
|
|
35
|
-
.counter-character-track {
|
|
36
|
-
span {
|
|
37
|
-
display: flex;
|
|
38
|
-
flex-direction: column;
|
|
39
|
-
align-items: end;
|
|
40
|
-
padding: calc((var(--line-height) - var(--font-size)) * 0.2) 0;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
&--symbol {
|
|
46
|
-
font-size: calc(var(--font-size) * var(--scale));
|
|
47
|
-
margin-right: 0.1ch;
|
|
48
|
-
opacity: var(--opacity);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
&-track {
|
|
52
|
-
display: grid;
|
|
53
|
-
translate: 0 calc((var(--value) + 1) * (var(--line-height) * -1));
|
|
54
|
-
transition: translate var(--transition-duration) var(--timing-function);
|
|
55
|
-
|
|
56
|
-
span {
|
|
57
|
-
height: 1lh;
|
|
58
|
-
transform-style: flat;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
1
|
+
.counter {
|
|
2
|
+
display: flex;
|
|
3
|
+
gap: 2px;
|
|
4
|
+
place-items: center;
|
|
5
|
+
transition: transform 0.5s 2s;
|
|
6
|
+
transform-style: flat;
|
|
7
|
+
|
|
8
|
+
&-character,
|
|
9
|
+
&-character-track span {
|
|
10
|
+
background: linear-gradient(hsl(0 0% 98%) 50%, hsl(0 0% 45%));
|
|
11
|
+
background-attachment: fixed;
|
|
12
|
+
background-clip: text;
|
|
13
|
+
color: transparent;
|
|
14
|
+
transform-style: flat;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&-character {
|
|
18
|
+
display: grid;
|
|
19
|
+
font-size: var(--font-size);
|
|
20
|
+
font-variant: tabular-nums;
|
|
21
|
+
font-weight: var(--font-weight);
|
|
22
|
+
height: 1lh;
|
|
23
|
+
line-height: var(--line-height);
|
|
24
|
+
mask: linear-gradient(transparent, white calc(1lh * var(--mask-size)) calc(100% - (1lh * var(--mask-size))), transparent);
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
transform-style: flat;
|
|
27
|
+
|
|
28
|
+
&--fraction {
|
|
29
|
+
font-size: calc(var(--font-size) * var(--scale));
|
|
30
|
+
font-weight: var(--font-weight-300);
|
|
31
|
+
opacity: var(--opacity);
|
|
32
|
+
overflow: visible;
|
|
33
|
+
height: var(--line-height);
|
|
34
|
+
|
|
35
|
+
.counter-character-track {
|
|
36
|
+
span {
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-direction: column;
|
|
39
|
+
align-items: end;
|
|
40
|
+
padding: calc((var(--line-height) - var(--font-size)) * 0.2) 0;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&--symbol {
|
|
46
|
+
font-size: calc(var(--font-size) * var(--scale));
|
|
47
|
+
margin-right: 0.1ch;
|
|
48
|
+
opacity: var(--opacity);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&-track {
|
|
52
|
+
display: grid;
|
|
53
|
+
translate: 0 calc((var(--value) + 1) * (var(--line-height) * -1));
|
|
54
|
+
transition: translate var(--transition-duration) var(--timing-function);
|
|
55
|
+
|
|
56
|
+
span {
|
|
57
|
+
height: 1lh;
|
|
58
|
+
transform-style: flat;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
62
|
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
.counter {
|
|
2
|
-
// TODO: Switch to clamped font size css variables
|
|
3
|
-
--font-size: clamp(2rem, 4vw + 1rem, 8rem);
|
|
4
|
-
--line-height: calc(var(--font-size) * 1.5);
|
|
5
|
-
--mask-size: 0.24;
|
|
6
|
-
--timing-function: var(--timing-bounce-out);
|
|
7
|
-
--transition-duration: 2s;
|
|
8
|
-
|
|
9
|
-
&-character {
|
|
10
|
-
--font-weight: var(--font-weight-400);
|
|
11
|
-
--scale: 1;
|
|
12
|
-
|
|
13
|
-
&--fraction,
|
|
14
|
-
&--symbol {
|
|
15
|
-
--opacity: 0.8;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
&--fraction {
|
|
19
|
-
--font-weight: var(--font-weight-300);
|
|
20
|
-
--scale: 0.75;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
&--symbol:first-child {
|
|
24
|
-
--scale: 0.8;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
1
|
+
.counter {
|
|
2
|
+
// TODO: Switch to clamped font size css variables
|
|
3
|
+
--font-size: clamp(2rem, 4vw + 1rem, 8rem);
|
|
4
|
+
--line-height: calc(var(--font-size) * 1.5);
|
|
5
|
+
--mask-size: 0.24;
|
|
6
|
+
--timing-function: var(--timing-bounce-out);
|
|
7
|
+
--transition-duration: 2s;
|
|
8
|
+
|
|
9
|
+
&-character {
|
|
10
|
+
--font-weight: var(--font-weight-400);
|
|
11
|
+
--scale: 1;
|
|
12
|
+
|
|
13
|
+
&--fraction,
|
|
14
|
+
&--symbol {
|
|
15
|
+
--opacity: 0.8;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&--fraction {
|
|
19
|
+
--font-weight: var(--font-weight-300);
|
|
20
|
+
--scale: 0.75;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&--symbol:first-child {
|
|
24
|
+
--scale: 0.8;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
27
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { html } from '@esportsplus/template';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export default (attributes?: Record<string, string>) => html`
|
|
5
|
-
<div class="ellipsis" ${attributes}>
|
|
6
|
-
<span></span>
|
|
7
|
-
<span></span>
|
|
8
|
-
<span></span>
|
|
9
|
-
</div>
|
|
1
|
+
import { html } from '@esportsplus/template';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
export default (attributes?: Record<string, string>) => html`
|
|
5
|
+
<div class="ellipsis" ${attributes}>
|
|
6
|
+
<span></span>
|
|
7
|
+
<span></span>
|
|
8
|
+
<span></span>
|
|
9
|
+
</div>
|
|
10
10
|
`;
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
.ellipsis {
|
|
2
|
-
span {
|
|
3
|
-
animation: Ellipsis var(--animation-duration) infinite linear;
|
|
4
|
-
background-color: var(--color);
|
|
5
|
-
border-radius: 100%;
|
|
6
|
-
display: inline-block;
|
|
7
|
-
height: var(--size);
|
|
8
|
-
margin: 0 var(--margin-horizontal);
|
|
9
|
-
width: var(--size);
|
|
10
|
-
|
|
11
|
-
:nth-child(2) {
|
|
12
|
-
animation-delay: 0.24s;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
:nth-child(3) {
|
|
16
|
-
animation-delay: 0.48s;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
@keyframes Ellipsis {
|
|
21
|
-
0%, 100% {
|
|
22
|
-
opacity: 0.16;
|
|
23
|
-
}
|
|
24
|
-
20% {
|
|
25
|
-
opacity: 1;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
1
|
+
.ellipsis {
|
|
2
|
+
span {
|
|
3
|
+
animation: Ellipsis var(--animation-duration) infinite linear;
|
|
4
|
+
background-color: var(--color);
|
|
5
|
+
border-radius: 100%;
|
|
6
|
+
display: inline-block;
|
|
7
|
+
height: var(--size);
|
|
8
|
+
margin: 0 var(--margin-horizontal);
|
|
9
|
+
width: var(--size);
|
|
10
|
+
|
|
11
|
+
:nth-child(2) {
|
|
12
|
+
animation-delay: 0.24s;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:nth-child(3) {
|
|
16
|
+
animation-delay: 0.48s;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@keyframes Ellipsis {
|
|
21
|
+
0%, 100% {
|
|
22
|
+
opacity: 0.16;
|
|
23
|
+
}
|
|
24
|
+
20% {
|
|
25
|
+
opacity: 1;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
28
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
.ellipsis {
|
|
2
|
-
--animation-duration: 1.24s;
|
|
3
|
-
--marign-horizontal: var(--size-100);
|
|
4
|
-
--size: var(--size-200);
|
|
1
|
+
.ellipsis {
|
|
2
|
+
--animation-duration: 1.24s;
|
|
3
|
+
--marign-horizontal: var(--size-100);
|
|
4
|
+
--size: var(--size-200);
|
|
5
5
|
}
|