@esportsplus/ui 0.8.4 → 0.9.0
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/package.json +9 -23
- package/src/components/accordion/index.ts +35 -34
- package/src/components/accordion/scss/index.scss +17 -16
- package/src/components/accordion/scss/variables.scss +9 -9
- package/src/components/anchor/index.ts +1 -0
- package/src/components/anchor/scss/index.scss +42 -41
- package/src/components/anchor/scss/variables.scss +4 -4
- package/src/components/banner/index.ts +1 -0
- package/src/components/banner/scss/index.scss +41 -40
- package/src/components/banner/scss/variables.scss +9 -9
- package/src/components/border/index.ts +1 -0
- package/src/components/border/scss/index.scss +12 -0
- package/src/components/border/scss/variables.scss +6 -0
- package/src/components/bubble/index.ts +1 -0
- package/src/components/bubble/scss/index.scss +32 -0
- package/src/components/bubble/scss/variables.scss +19 -0
- package/src/components/button/index.ts +1 -0
- package/src/components/button/scss/index.scss +115 -114
- package/src/components/button/scss/variables.scss +66 -66
- package/src/components/card/index.ts +1 -0
- package/src/components/card/scss/index.scss +36 -35
- package/src/components/card/scss/variables.scss +41 -41
- package/src/components/clipboard/index.ts +3 -4
- package/src/components/clipboard/write.ts +8 -8
- package/src/components/container/index.ts +1 -0
- package/src/components/container/scss/index.scss +10 -8
- package/src/components/container/scss/variables.scss +5 -5
- package/src/components/counter/index.ts +99 -93
- package/src/components/counter/scss/index.scss +63 -61
- package/src/components/counter/scss/variables.scss +26 -26
- package/src/components/ellipsis/index.ts +10 -9
- package/src/components/ellipsis/scss/index.scss +29 -27
- package/src/components/ellipsis/scss/variables.scss +4 -4
- package/src/components/field/checkbox.ts +71 -0
- package/src/components/field/description.ts +14 -0
- package/src/components/field/error.ts +16 -0
- package/src/components/field/file.ts +77 -0
- package/src/components/field/index.ts +11 -0
- package/src/components/field/optional.ts +23 -0
- package/src/components/field/scss/_check.scss +225 -0
- package/src/components/field/scss/_normalize.scss +36 -0
- package/src/components/field/scss/_text.scss +106 -0
- package/src/components/field/scss/index.scss +161 -0
- package/src/components/field/scss/variables.scss +139 -0
- package/src/components/field/select.ts +182 -0
- package/src/components/field/switch.ts +9 -0
- package/src/components/field/text.ts +92 -0
- package/src/components/field/textarea.ts +8 -0
- package/src/components/field/title.ts +24 -0
- package/src/components/footer/index.ts +83 -78
- package/src/components/footer/scss/index.scss +25 -25
- package/src/components/form/action.ts +79 -80
- package/src/components/form/index.ts +5 -6
- package/src/components/form/input.ts +17 -15
- package/src/components/form/types.ts +13 -15
- package/src/components/frame/index.ts +1 -0
- package/src/components/frame/scss/index.scss +11 -11
- package/src/components/grid/index.ts +1 -0
- package/src/components/grid/scss/index.scss +11 -9
- package/src/components/grid/scss/variables.scss +5 -5
- package/src/components/group/index.ts +1 -0
- package/src/components/group/scss/index.scss +38 -36
- package/src/components/group/scss/variables.scss +17 -17
- package/src/components/highlight/index.ts +51 -47
- package/src/components/highlight/scss/index.scss +6 -4
- package/src/components/highlight/scss/variables.scss +3 -3
- package/src/components/icon/index.ts +1 -0
- package/src/components/icon/scss/index.scss +18 -16
- package/src/components/icon/scss/variables.scss +7 -7
- package/src/components/index.ts +38 -19
- 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 +4 -3
- package/src/components/link/scss/index.scss +66 -65
- package/src/components/link/scss/variables.scss +46 -46
- package/src/components/loader/index.ts +42 -34
- package/src/components/loader/scss/index.scss +70 -68
- package/src/components/loader/scss/variables.scss +5 -5
- package/src/components/loading/index.ts +13 -7
- package/src/components/loading/scss/index.scss +18 -16
- package/src/components/loading/scss/variables.scss +5 -5
- package/src/components/magnet/index.ts +55 -54
- package/src/components/magnet/scss/index.scss +17 -16
- package/src/components/magnet/scss/variables.scss +4 -4
- package/src/components/modal/index.ts +1 -0
- package/src/components/modal/scss/index.scss +35 -34
- package/src/components/modal/scss/variables.scss +6 -6
- package/src/components/normalize/index.ts +1 -0
- package/src/components/number/index.ts +4 -24
- package/src/components/page/index.ts +17 -15
- package/src/components/page/scss/index.scss +33 -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/index.ts +1 -0
- package/src/components/row/scss/index.scss +7 -7
- package/src/components/scrollbar/index.ts +49 -43
- package/src/components/scrollbar/scss/index.scss +72 -70
- package/src/components/scrollbar/scss/variables.scss +6 -6
- package/src/components/sidebar/index.ts +1 -0
- package/src/components/sidebar/scss/index.scss +50 -49
- package/src/components/sidebar/scss/variables.scss +20 -20
- package/src/components/site/index.ts +27 -26
- package/src/components/site/scss/index.scss +3 -3
- package/src/components/text/index.ts +1 -0
- package/src/components/text/scss/index.scss +11 -9
- package/src/components/text/scss/variables.scss +8 -8
- package/src/components/thumbnail/index.ts +1 -0
- package/src/components/thumbnail/scss/index.scss +9 -7
- package/src/components/thumbnail/scss/variables.scss +7 -7
- package/src/components/tooltip/index.ts +85 -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 +94 -93
- package/src/components/tooltip/scss/variables.scss +24 -24
- package/src/components/truncate/index.ts +4 -14
- package/src/components/typewriter/index.ts +54 -53
- package/src/components/typewriter/scss/index.scss +14 -14
- package/src/css-utilities/[margin,padding]/scss/index.scss +43 -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/index.scss +1 -0
- package/src/css-utilities/background/scss/variables.scss +26 -27
- package/src/css-utilities/border/scss/index.scss +23 -21
- package/src/css-utilities/border/scss/variables.scss +64 -66
- package/src/css-utilities/color/scss/index.scss +1 -0
- package/src/css-utilities/color/scss/variables.scss +29 -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 +4 -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.ts +18 -0
- package/src/css-utilities/inline/scss/index.scss +7 -7
- package/src/css-utilities/line-height/scss/index.scss +1 -0
- 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/pointer/scss/index.scss +5 -5
- package/src/css-utilities/size/scss/index.scss +1 -0
- 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 +90 -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 +5 -3
- package/src/css-utilities/width/scss/variables.scss +9 -9
- 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 -39
- package/src/tokens/scss/color.scss +68 -64
- 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 -10
- package/src/tokens/scss/state.scss +85 -87
- package/src/tokens/scss/transition-duration.scss +1 -1
- package/tsconfig.json +5 -2
- package/assets/0af89c10df9bc2f8d646.woff2 +0 -0
- package/assets/109e3207d9afea8524be.woff2 +0 -0
- package/assets/16663c3f6ab1da2d6c86.woff +0 -0
- package/assets/16e8721ef5837bc6375e.woff +0 -0
- package/assets/2a3e005f58bfca9c117e.woff +0 -0
- package/assets/58a8d7ebc386843b62c5.woff2 +0 -0
- package/assets/593de7c561e5ffe80c3e.woff2 +0 -0
- package/assets/68b7982c2b30b51bf932.woff2 +0 -0
- package/assets/a04b5e24af93da353f0e.woff +0 -0
- package/assets/bf331673b91821715c08.woff +0 -0
- package/assets/c54b0f4340f2914802d1.woff +0 -0
- package/assets/dd8646a41e4397b77fc4.woff2 +0 -0
- package/assets/e06c107cc50506570954.woff2 +0 -0
- package/assets/ecdfe4c05425592708aa.woff2 +0 -0
- package/assets/f0032576ac7462ccbd0c.woff +0 -0
- package/assets/f872e621917a45943fbc.woff +0 -0
- package/build/components/accordion/index.d.ts +0 -17
- package/build/components/accordion/index.js +0 -25
- package/build/components/clipboard/index.d.ts +0 -5
- package/build/components/clipboard/index.js +0 -3
- package/build/components/clipboard/write.d.ts +0 -2
- package/build/components/clipboard/write.js +0 -9
- package/build/components/counter/index.d.ts +0 -13
- package/build/components/counter/index.js +0 -72
- package/build/components/ellipsis/index.d.ts +0 -2
- package/build/components/ellipsis/index.js +0 -8
- package/build/components/footer/index.d.ts +0 -25
- package/build/components/footer/index.js +0 -55
- package/build/components/form/action.d.ts +0 -5
- package/build/components/form/action.js +0 -54
- package/build/components/form/index.d.ts +0 -23
- package/build/components/form/index.js +0 -4
- package/build/components/form/input.d.ts +0 -9
- package/build/components/form/input.js +0 -10
- package/build/components/form/layout.d.ts +0 -12
- package/build/components/form/layout.js +0 -12
- package/build/components/form/types.d.ts +0 -11
- package/build/components/form/types.js +0 -1
- package/build/components/highlight/index.d.ts +0 -8
- package/build/components/highlight/index.js +0 -36
- package/build/components/index.d.ts +0 -19
- package/build/components/index.js +0 -19
- package/build/components/json/download.d.ts +0 -2
- package/build/components/json/download.js +0 -8
- package/build/components/json/index.d.ts +0 -4
- package/build/components/json/index.js +0 -2
- package/build/components/link/hover.d.ts +0 -10
- package/build/components/link/hover.js +0 -17
- package/build/components/link/index.d.ts +0 -12
- package/build/components/link/index.js +0 -2
- package/build/components/loader/index.d.ts +0 -5
- package/build/components/loader/index.js +0 -31
- package/build/components/loading/index.d.ts +0 -2
- package/build/components/loading/index.js +0 -6
- package/build/components/magnet/index.d.ts +0 -10
- package/build/components/magnet/index.js +0 -46
- package/build/components/number/index.d.ts +0 -8
- package/build/components/number/index.js +0 -16
- package/build/components/page/index.d.ts +0 -22
- package/build/components/page/index.js +0 -11
- package/build/components/root/index.d.ts +0 -9
- package/build/components/root/index.js +0 -3
- package/build/components/root/onclick.d.ts +0 -5
- package/build/components/root/onclick.js +0 -14
- package/build/components/scrollbar/index.d.ts +0 -13
- package/build/components/scrollbar/index.js +0 -36
- package/build/components/site/index.d.ts +0 -8
- package/build/components/site/index.js +0 -16
- package/build/components/tooltip/index.d.ts +0 -23
- package/build/components/tooltip/index.js +0 -63
- package/build/components/truncate/index.d.ts +0 -9
- package/build/components/truncate/index.js +0 -10
- package/build/components/typewriter/index.d.ts +0 -8
- package/build/components/typewriter/index.js +0 -41
- package/build/index.d.ts +0 -19
- package/build/index.js +0 -19
- package/components/styles.css +0 -30
- package/components/variables.css +0 -24
- package/fonts/montserrat.css +0 -1
- package/lib.scss +0 -2
- package/normalize.css +0 -1
- package/src/components/clipboard/scss/index.scss +0 -3
- package/src/components/form/layout.ts +0 -26
- package/src/css-utilities/index.scss +0 -14
- package/src/css-utilities/overflow/scss/index.scss +0 -5
- package/src/index.ts +0 -19
- package/storage/fonts/montserrat/Montserrat-Bold.woff +0 -0
- package/storage/fonts/montserrat/Montserrat-Bold.woff2 +0 -0
- package/storage/fonts/montserrat/Montserrat-BoldItalic.woff +0 -0
- package/storage/fonts/montserrat/Montserrat-BoldItalic.woff2 +0 -0
- package/storage/fonts/montserrat/Montserrat-Italic.woff +0 -0
- package/storage/fonts/montserrat/Montserrat-Italic.woff2 +0 -0
- package/storage/fonts/montserrat/Montserrat-Medium.woff +0 -0
- package/storage/fonts/montserrat/Montserrat-Medium.woff2 +0 -0
- package/storage/fonts/montserrat/Montserrat-MediumItalic.woff +0 -0
- package/storage/fonts/montserrat/Montserrat-MediumItalic.woff2 +0 -0
- package/storage/fonts/montserrat/Montserrat-Regular.woff +0 -0
- package/storage/fonts/montserrat/Montserrat-Regular.woff2 +0 -0
- package/storage/fonts/montserrat/Montserrat-SemiBold.woff +0 -0
- package/storage/fonts/montserrat/Montserrat-SemiBold.woff2 +0 -0
- package/storage/fonts/montserrat/Montserrat-SemiBoldItalic.woff +0 -0
- package/storage/fonts/montserrat/Montserrat-SemiBoldItalic.woff2 +0 -0
- package/storage/fonts/montserrat/index.css +0 -79
- package/tokens.scss +0 -2
- package/utilities/styles.css +0 -16
- package/utilities/variables.css +0 -9
- package/webpack.config.ts +0 -26
|
@@ -1,70 +1,72 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
::-webkit-scrollbar
|
|
5
|
-
::-webkit-scrollbar-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
1
|
+
@use './variables.scss';
|
|
2
|
+
|
|
3
|
+
// Hide Chrome Mobile Scrollbar
|
|
4
|
+
::-webkit-scrollbar,
|
|
5
|
+
::-webkit-scrollbar-track,
|
|
6
|
+
::-webkit-scrollbar-thumb,
|
|
7
|
+
::-webkit-scrollbar-thumb:window-inactive {
|
|
8
|
+
background: transparent;
|
|
9
|
+
box-shadow: unset;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.scrollbar {
|
|
13
|
+
height: 100%;
|
|
14
|
+
z-index: 9;
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
&,
|
|
18
|
+
&::before {
|
|
19
|
+
position: absolute;
|
|
20
|
+
right: 0;
|
|
21
|
+
top: 0;
|
|
22
|
+
transition: opacity var(--transition-duration) ease-in-out;
|
|
23
|
+
width: var(--width);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&::before {
|
|
27
|
+
background: var(--background-default);
|
|
28
|
+
border-radius: 1px 0 0 1px;
|
|
29
|
+
content: '';
|
|
30
|
+
height: var(--height);
|
|
31
|
+
transform: var(--translate);
|
|
32
|
+
transform-origin: top center;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
&--fixed {
|
|
37
|
+
position: fixed;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&--hidden {
|
|
41
|
+
opacity: 0;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
&-container {
|
|
46
|
+
display: flex;
|
|
47
|
+
flex-flow: column;
|
|
48
|
+
overflow: hidden;
|
|
49
|
+
position: relative;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&-content {
|
|
53
|
+
height: 100%;
|
|
54
|
+
margin-right: calc(var(--scrollbar-width) * -1);
|
|
55
|
+
overflow-x: hidden;
|
|
56
|
+
overflow-y: scroll;
|
|
57
|
+
scrollbar-gutter: stable;
|
|
58
|
+
scroll-behavior: smooth;
|
|
59
|
+
width: calc(100% + var(--scrollbar-width));
|
|
60
|
+
|
|
61
|
+
&--snap {
|
|
62
|
+
overflow: auto;
|
|
63
|
+
scroll-snap-type: both mandatory;
|
|
64
|
+
overscroll-behavior-x: contain;
|
|
65
|
+
|
|
66
|
+
> * {
|
|
67
|
+
scroll-snap-stop: normal;
|
|
68
|
+
scroll-snap-align: center;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
.scrollbar {
|
|
2
|
-
--background-default: transparent;
|
|
3
|
-
--height: 0;
|
|
4
|
-
--translate: translate3d(0, 0, 0);
|
|
5
|
-
--width: 4px;
|
|
6
|
-
}
|
|
1
|
+
.scrollbar {
|
|
2
|
+
--background-default: transparent;
|
|
3
|
+
--height: 0;
|
|
4
|
+
--translate: translate3d(0, 0, 0);
|
|
5
|
+
--width: 4px;
|
|
6
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './scss/index.scss';
|
|
@@ -1,49 +1,50 @@
|
|
|
1
|
-
@use '/lib';
|
|
2
|
-
@use '/tokens';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
1
|
+
@use '/lib';
|
|
2
|
+
@use '/tokens';
|
|
3
|
+
@use './variables.scss';
|
|
4
|
+
|
|
5
|
+
.sidebar {
|
|
6
|
+
@include lib.position(absolute, var(--margin-vertical) null var(--margin-vertical) null);
|
|
7
|
+
cursor: default;
|
|
8
|
+
height: calc(100% - (var(--margin-vertical) * 2));
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
transition:
|
|
11
|
+
max-width var(--transition-duration) ease-in-out,
|
|
12
|
+
opacity var(--transition-duration) ease-in-out,
|
|
13
|
+
transform var(--transition-duration) ease-in-out;
|
|
14
|
+
width: min(var(--width), calc(100% - (var(--margin-horizontal) * 2)));
|
|
15
|
+
z-index: 1;
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@include tokens.state(inactive) {
|
|
19
|
+
input[type='password'] {
|
|
20
|
+
display: none;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
&--e {
|
|
26
|
+
right: var(--margin-horizontal);
|
|
27
|
+
|
|
28
|
+
&.sidebar--offscreen {
|
|
29
|
+
@include tokens.state(inactive) {
|
|
30
|
+
transform: translateX(var(--width));
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&--w {
|
|
36
|
+
left: var(--margin-horizontal);
|
|
37
|
+
|
|
38
|
+
&.sidebar--offscreen {
|
|
39
|
+
@include tokens.state(inactive) {
|
|
40
|
+
transform: translateX(calc(var(--width) * -1));
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
&-content {
|
|
47
|
+
flex: 0 0 var(--width-default);
|
|
48
|
+
width: var(--width-default);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
@use '/tokens';
|
|
2
|
-
|
|
3
|
-
.sidebar {
|
|
4
|
-
--margin-horizontal: 0px;
|
|
5
|
-
--margin-vertical: 0px;
|
|
6
|
-
--width: var(--width-default);
|
|
7
|
-
--width-closed: var(--width-default);
|
|
8
|
-
--width-default: 320px;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
@include tokens.state(default) {
|
|
12
|
-
--width: var(--width-closed);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
&--floating {
|
|
17
|
-
--margin-horizontal: var(--size-100);
|
|
18
|
-
--margin-vertical: var(--size-100);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
1
|
+
@use '/tokens';
|
|
2
|
+
|
|
3
|
+
.sidebar {
|
|
4
|
+
--margin-horizontal: 0px;
|
|
5
|
+
--margin-vertical: 0px;
|
|
6
|
+
--width: var(--width-default);
|
|
7
|
+
--width-closed: var(--width-default);
|
|
8
|
+
--width-default: 320px;
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
@include tokens.state(default) {
|
|
12
|
+
--width: var(--width-closed);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
&--floating {
|
|
17
|
+
--margin-horizontal: var(--size-100);
|
|
18
|
+
--margin-vertical: var(--size-100);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import { html } from '@esportsplus/template';
|
|
2
|
-
import { onclick } from '../root';
|
|
3
|
-
import scrollbar from '../scrollbar';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
sb
|
|
16
|
-
sb.attributes
|
|
17
|
-
sb.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
${
|
|
25
|
-
|
|
26
|
-
|
|
1
|
+
import { html } from '@esportsplus/template';
|
|
2
|
+
import { onclick } from '../root';
|
|
3
|
+
import scrollbar from '../scrollbar';
|
|
4
|
+
import './scss/index.scss';
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
type Data = {
|
|
8
|
+
attributes?: Record<string, unknown>;
|
|
9
|
+
content?: any;
|
|
10
|
+
scrollbar?: Parameters<typeof scrollbar>[0];
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
export default ({ attributes, content, scrollbar: sb }: Data) => {
|
|
15
|
+
sb ??= {};
|
|
16
|
+
sb.attributes ??= {};
|
|
17
|
+
sb.attributes.style ??= '--background-default: var(--color-black-400);';
|
|
18
|
+
sb.fixed ??= true;
|
|
19
|
+
|
|
20
|
+
let { html: h, parent } = scrollbar(sb);
|
|
21
|
+
|
|
22
|
+
return html`
|
|
23
|
+
<section class='site' ${attributes} ${{ onclick }} ${parent.attributes}>
|
|
24
|
+
${content || ''}
|
|
25
|
+
${h}
|
|
26
|
+
</section>
|
|
27
|
+
`;
|
|
27
28
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
.site {
|
|
2
|
-
z-index: 0;
|
|
3
|
-
}
|
|
1
|
+
.site {
|
|
2
|
+
z-index: 0;
|
|
3
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './scss/index.scss';
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
@use './variables.scss';
|
|
2
|
+
|
|
3
|
+
.text {
|
|
4
|
+
color: var(--color);
|
|
5
|
+
font-size: var(--font-size);
|
|
6
|
+
font-weight: var(--font-weight);
|
|
7
|
+
line-height: var(--line-height);
|
|
8
|
+
position: relative;
|
|
9
|
+
transition: color var(--transition-duration) ease-in-out;
|
|
10
|
+
width: var(--width);
|
|
11
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
.text {
|
|
2
|
-
--color: var(--color-default);
|
|
3
|
-
--color-default: inherit;
|
|
4
|
-
--font-size: var(--font-size-400);
|
|
5
|
-
--font-weight: var(--font-weight-400);
|
|
6
|
-
--line-height: var(--line-height-400);
|
|
7
|
-
--width: auto;
|
|
8
|
-
}
|
|
1
|
+
.text {
|
|
2
|
+
--color: var(--color-default);
|
|
3
|
+
--color-default: inherit;
|
|
4
|
+
--font-size: var(--font-size-400);
|
|
5
|
+
--font-weight: var(--font-weight-400);
|
|
6
|
+
--line-height: var(--line-height-400);
|
|
7
|
+
--width: auto;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './scss/index.scss';
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
@use './variables.scss';
|
|
2
|
+
|
|
3
|
+
.thumbnail {
|
|
4
|
+
background: var(--background);
|
|
5
|
+
border-radius: var(--border-radius);
|
|
6
|
+
height: var(--height);
|
|
7
|
+
position: relative;
|
|
8
|
+
width: var(--width);
|
|
9
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
.thumbnail {
|
|
2
|
-
--background: transparent;
|
|
3
|
-
--border-radius: var(--border-radius-300);
|
|
4
|
-
--height: var(--size);
|
|
5
|
-
--size: var(--size-700);
|
|
6
|
-
--width: var(--size);
|
|
7
|
-
}
|
|
1
|
+
.thumbnail {
|
|
2
|
+
--background: transparent;
|
|
3
|
+
--border-radius: var(--border-radius-300);
|
|
4
|
+
--height: var(--size);
|
|
5
|
+
--size: var(--size-700);
|
|
6
|
+
--width: var(--size);
|
|
7
|
+
}
|
|
@@ -1,85 +1,86 @@
|
|
|
1
|
-
import { reactive } from '@esportsplus/reactivity';
|
|
2
|
-
import root from '../root';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
|
|
1
|
+
import { reactive } from '@esportsplus/reactivity';
|
|
2
|
+
import root from '../root';
|
|
3
|
+
import './scss/index.scss';
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
let queue: (VoidFunction | (() => Promise<void>))[] = [],
|
|
7
|
+
running = false,
|
|
8
|
+
scheduled = false;
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
async function frame() {
|
|
12
|
+
if (running) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
running = true;
|
|
17
|
+
|
|
18
|
+
let item;
|
|
19
|
+
|
|
20
|
+
while (item = queue.pop()) {
|
|
21
|
+
await item();
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
running = false;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
const onclick = (data: { active?: boolean, toggle?: boolean } = {}) => {
|
|
29
|
+
let state = reactive({
|
|
30
|
+
active: data.active || false
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
return {
|
|
34
|
+
attributes: {
|
|
35
|
+
class: () => {
|
|
36
|
+
return `tooltip ${state.active ? '--active' : ''}`;
|
|
37
|
+
},
|
|
38
|
+
onclick: function(this: HTMLElement, e: Event) {
|
|
39
|
+
let active = true,
|
|
40
|
+
node = e.target as Node | null;
|
|
41
|
+
|
|
42
|
+
if (data.toggle && ( this.contains(node) || this.isSameNode(node) )) {
|
|
43
|
+
active = !state.active;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
frame();
|
|
47
|
+
state.active = active;
|
|
48
|
+
|
|
49
|
+
if (active) {
|
|
50
|
+
queue.push(() => state.active = false);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (!scheduled) {
|
|
54
|
+
root.onclick.push(() => {
|
|
55
|
+
frame();
|
|
56
|
+
scheduled = false;
|
|
57
|
+
});
|
|
58
|
+
scheduled = true;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
state
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
const onhover = (active: boolean = false) => {
|
|
67
|
+
let state = reactive({ active });
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
attributes: {
|
|
71
|
+
class: () => `tooltip ${state.active ? '--active' : ''}`,
|
|
72
|
+
onmouseover: () => {
|
|
73
|
+
state.active = true;
|
|
74
|
+
},
|
|
75
|
+
onmouseout: () => {
|
|
76
|
+
state.active = false;
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
toggle: () => {
|
|
80
|
+
state.active = !state.active;
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
|
|
85
86
|
export default { onclick, onhover };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
@mixin center($active) {
|
|
2
|
-
&--c {
|
|
3
|
-
bottom: 50%;
|
|
4
|
-
position: absolute;
|
|
5
|
-
right: 50%;
|
|
6
|
-
transform: translate(50%, 50%) scale(var(--scaleX), var(--scaleY));
|
|
7
|
-
transform-origin: center center;
|
|
8
|
-
|
|
9
|
-
#{$active} {
|
|
10
|
-
transform: translate(50%, 50%) scale(1);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
}
|
|
1
|
+
@mixin center($active) {
|
|
2
|
+
&--c {
|
|
3
|
+
bottom: 50%;
|
|
4
|
+
position: absolute;
|
|
5
|
+
right: 50%;
|
|
6
|
+
transform: translate(50%, 50%) scale(var(--scaleX), var(--scaleY));
|
|
7
|
+
transform-origin: center center;
|
|
8
|
+
|
|
9
|
+
#{$active} {
|
|
10
|
+
transform: translate(50%, 50%) scale(1);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|