@esportsplus/ui 0.53.0 → 0.55.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/README.md +51 -6
- package/build/components/accordion/index.d.ts +714 -23
- package/build/components/accordion/index.js +22 -11
- package/build/components/accordion/scss/index.scss +1 -1
- package/build/components/anchor/scss/index.scss +1 -1
- package/build/components/button/scss/index.scss +1 -1
- package/build/components/card/scss/index.scss +1 -1
- package/build/components/checkbox/constants.d.ts +2 -0
- package/build/components/checkbox/constants.js +2 -0
- package/build/components/checkbox/index.d.ts +16 -10
- package/build/components/checkbox/index.js +53 -39
- package/build/components/checkbox/scss/index.scss +1 -1
- package/build/components/checkbox/svg/check.svg +1 -0
- package/build/components/clipboard/copy.d.ts +11 -0
- package/build/components/clipboard/copy.js +54 -0
- package/build/components/clipboard/index.d.ts +1435 -1229
- package/build/components/clipboard/index.js +3 -2
- package/build/components/clipboard/onclick.d.ts +4 -38
- package/build/components/clipboard/onclick.js +10 -12
- package/build/components/counter/index.d.ts +1 -1
- package/build/components/counter/index.js +59 -71
- package/build/components/counter/scss/index.scss +1 -1
- package/build/components/form/action.d.ts +1 -1
- package/build/components/form/action.js +9 -12
- package/build/components/form/index.d.ts +5 -5
- package/build/components/form/input.d.ts +4 -4
- package/build/components/grid/scss/index.scss +1 -1
- package/build/components/icon/index.d.ts +2 -19
- package/build/components/icon/index.js +6 -6
- package/build/components/icon/scss/index.scss +1 -1
- package/build/components/index.d.ts +0 -7
- package/build/components/index.js +0 -7
- package/build/components/input/index.d.ts +1 -1
- package/build/components/input/index.js +12 -13
- package/build/components/input/scss/index.scss +1 -1
- package/build/components/link/scss/index.scss +1 -1
- package/build/components/loading/index.js +5 -5
- package/build/components/modal/scss/index.scss +1 -1
- package/build/components/normalize/scss/index.scss +1 -1
- package/build/components/overlay/index.d.ts +2 -19
- package/build/components/overlay/index.js +7 -7
- package/build/components/page/scss/index.scss +1 -1
- package/build/components/radio/index.d.ts +3 -10
- package/build/components/radio/index.js +2 -2
- package/build/components/range/index.d.ts +1 -1
- package/build/components/range/index.js +13 -13
- package/build/components/range/scss/index.scss +1 -1
- package/build/components/root/scss/index.scss +1 -1
- package/build/components/select/constants.d.ts +4 -0
- package/build/components/select/constants.js +4 -0
- package/build/components/select/index.d.ts +15 -52
- package/build/components/select/index.js +65 -94
- package/build/components/select/scss/index.scss +1 -1
- package/build/components/sidebar/index.d.ts +2 -19
- package/build/components/sidebar/index.js +7 -7
- package/build/components/sidebar/scss/index.scss +1 -1
- package/build/components/switch/index.d.ts +3 -10
- package/build/components/switch/index.js +2 -2
- package/build/components/tabs/scss/index.scss +2 -0
- package/build/components/text/scss/index.scss +1 -1
- package/build/components/textarea/index.d.ts +719 -6
- package/build/components/textarea/index.js +36 -17
- package/build/components/textarea/scss/index.scss +1 -1
- package/build/components/toast/index.js +43 -43
- package/build/components/toast/scss/index.scss +1 -1
- package/build/components/tooltip/constants.d.ts +3 -0
- package/build/components/tooltip/constants.js +3 -0
- package/build/components/tooltip/index.d.ts +8 -2546
- package/build/components/tooltip/index.js +2 -1
- package/build/components/tooltip/menu.d.ts +9 -21
- package/build/components/tooltip/menu.js +26 -29
- package/build/components/tooltip/onclick.d.ts +717 -1229
- package/build/components/tooltip/onclick.js +18 -60
- package/build/components/tooltip/onhover.d.ts +716 -20
- package/build/components/tooltip/onhover.js +14 -19
- package/build/components/tooltip/scss/index.scss +1 -1
- package/build/components/typewriter/index.d.ts +2 -19
- package/build/components/typewriter/index.js +8 -8
- package/build/css-utilities/background/scss/index.scss +1 -1
- package/build/css-utilities/border/scss/index.scss +1 -1
- package/build/css-utilities/color/scss/index.scss +1 -1
- package/build/css-utilities/font/geist/scss/Geist-Italic-Variable.woff2 +0 -0
- package/build/css-utilities/font/geist/scss/Geist-Variable.woff2 +0 -0
- package/build/css-utilities/font/geist/scss/GeistMono-Italic-Variable.woff2 +0 -0
- package/build/css-utilities/font/geist/scss/GeistMono-Variable.woff2 +0 -0
- package/build/css-utilities/font/geist/scss/index.scss +2 -0
- package/build/css-utilities/font/montserrat/index.d.ts +1 -0
- package/build/css-utilities/font/montserrat/index.js +1 -0
- package/build/css-utilities/font/montserrat/scss/index.scss +2 -0
- package/build/css-utilities/index.scss +1 -1
- package/build/css-utilities/inline/scss/index.scss +1 -1
- package/build/css-utilities/scrollbar/scss/index.scss +1 -1
- package/build/css-utilities/tabular/scss/index.scss +2 -0
- package/build/css-utilities/text/scss/index.scss +1 -1
- package/build/themes/dark/index.d.ts +0 -1
- package/build/themes/dark/index.js +0 -1
- package/build/themes/dark/input.d.ts +709 -115
- package/build/themes/dark/select.d.ts +3 -1409
- package/build/themes/dark/select.js +12 -9
- package/build/themes/dark/textarea.d.ts +716 -119
- package/package.json +12 -12
- package/pnpm-workspace.yaml +4 -3
- package/scripts/css-variables.test.mjs +50 -0
- package/scripts/sort-scss.md +57 -0
- package/scripts/sort-scss.mjs +233 -0
- package/scripts/sort-scss.test.mjs +217 -0
- package/src/components/accordion/index.ts +7 -14
- package/src/components/accordion/scss/index.scss +3 -1
- package/src/components/anchor/scss/index.scss +2 -2
- package/src/components/button/scss/index.scss +23 -57
- package/src/components/button/scss/variables.scss +1 -19
- package/src/components/card/scss/index.scss +11 -46
- package/src/components/card/scss/variables.scss +1 -2
- package/src/components/checkbox/constants.ts +4 -0
- package/src/components/checkbox/index.ts +20 -35
- package/src/components/checkbox/scss/index.scss +86 -28
- package/src/components/checkbox/scss/variables.scss +71 -30
- package/src/components/checkbox/svg/check.svg +1 -0
- package/src/components/clipboard/copy.ts +55 -0
- package/src/components/clipboard/index.ts +3 -2
- package/src/components/clipboard/onclick.ts +4 -9
- package/src/components/counter/index.ts +57 -66
- package/src/components/counter/scss/index.scss +4 -5
- package/src/components/counter/scss/variables.scss +0 -1
- package/src/components/form/action.ts +2 -8
- package/src/components/form/input.ts +4 -3
- package/src/components/grid/scss/index.scss +1 -1
- package/src/components/icon/scss/variables.scss +0 -1
- package/src/components/index.ts +1 -8
- package/src/components/input/index.ts +8 -6
- package/src/components/input/scss/index.scss +8 -7
- package/src/components/input/scss/variables.scss +0 -1
- package/src/components/link/scss/index.scss +9 -34
- package/src/components/link/scss/variables.scss +0 -12
- package/src/components/modal/scss/index.scss +4 -4
- package/src/components/normalize/scss/index.scss +0 -1
- package/src/components/page/scss/index.scss +0 -6
- package/src/components/page/scss/variables.scss +0 -2
- package/src/components/radio/index.ts +5 -3
- package/src/components/range/index.ts +1 -1
- package/src/components/range/scss/index.scss +5 -5
- package/src/components/root/scss/index.scss +37 -63
- package/src/components/root/scss/variables.scss +37 -67
- package/src/components/select/constants.ts +8 -0
- package/src/components/select/index.ts +49 -70
- package/src/components/select/scss/index.scss +10 -7
- package/src/components/select/scss/variables.scss +0 -1
- package/src/components/sidebar/scss/index.scss +3 -3
- package/src/components/switch/index.ts +5 -3
- package/src/components/tabs/scss/index.scss +62 -0
- package/src/components/tabs/scss/variables.scss +4 -0
- package/src/components/text/scss/index.scss +8 -1
- package/src/components/text/scss/variables.scss +5 -3
- package/src/components/textarea/index.ts +45 -13
- package/src/components/textarea/scss/index.scss +24 -13
- package/src/components/textarea/scss/variables.scss +0 -1
- package/src/components/toast/scss/index.scss +1 -1
- package/src/components/tooltip/constants.ts +6 -0
- package/src/components/tooltip/index.ts +4 -1
- package/src/components/tooltip/menu.ts +18 -29
- package/src/components/tooltip/onclick.ts +21 -88
- package/src/components/tooltip/onhover.ts +18 -29
- package/src/components/tooltip/scss/index.scss +2 -3
- package/src/css-utilities/background/scss/variables.scss +2 -2
- package/src/css-utilities/border/scss/index.scss +1 -27
- package/src/css-utilities/border/scss/variables.scss +3 -34
- package/src/css-utilities/color/scss/variables.scss +2 -6
- package/src/css-utilities/font/geist/scss/Geist-Italic-Variable.woff2 +0 -0
- package/src/css-utilities/font/geist/scss/Geist-Variable.woff2 +0 -0
- package/src/css-utilities/font/geist/scss/GeistMono-Italic-Variable.woff2 +0 -0
- package/src/css-utilities/font/geist/scss/GeistMono-Variable.woff2 +0 -0
- package/src/css-utilities/font/geist/scss/index.scss +55 -0
- package/src/css-utilities/font/montserrat/index.ts +1 -0
- package/src/{fonts → css-utilities/font}/montserrat/scss/index.scss +15 -0
- package/src/css-utilities/index.scss +6 -12
- package/src/css-utilities/inline/scss/index.scss +0 -1
- package/src/css-utilities/scrollbar/scss/index.scss +42 -0
- package/src/css-utilities/tabular/scss/index.scss +3 -0
- package/src/css-utilities/text/scss/index.scss +30 -71
- package/src/lib/scss/css-variables.scss +29 -5
- package/src/themes/dark/index.ts +0 -1
- package/src/themes/dark/select.ts +14 -9
- package/src/tokens/index.scss +1 -3
- package/src/tokens/scss/border-radius.scss +1 -6
- package/src/tokens/scss/color.scss +3 -3
- package/src/tokens/scss/scale.scss +1 -1
- package/src/tokens/scss/size.scss +7 -0
- package/src/tokens/scss/transition.scss +4 -0
- package/storage/svg/arrow-left.svg +1 -0
- package/storage/svg/arrow-right.svg +1 -0
- package/storage/svg/book.svg +1 -0
- package/storage/svg/cube.svg +1 -0
- package/storage/svg/github.svg +1 -0
- package/storage/svg/info.svg +1 -0
- package/storage/svg/palette.svg +1 -0
- package/storage/svg/search.svg +2 -0
- package/storage/svg/type.svg +1 -0
- package/vite.config.ts +8 -3
- package/build/components/back/index.d.ts +0 -21
- package/build/components/back/index.js +0 -16
- package/build/components/back/scss/index.scss +0 -2
- package/build/components/back/svg/arrow.svg +0 -15
- package/build/components/bubble/scss/index.scss +0 -2
- package/build/components/button/index.d.ts +0 -103
- package/build/components/button/index.js +0 -60
- package/build/components/ellipsis/index.d.ts +0 -4
- package/build/components/ellipsis/index.js +0 -8
- package/build/components/ellipsis/scss/index.scss +0 -2
- package/build/components/frame/index.d.ts +0 -21
- package/build/components/frame/index.js +0 -13
- package/build/components/frame/scss/index.scss +0 -2
- package/build/components/highlight/index.d.ts +0 -22
- package/build/components/highlight/index.js +0 -56
- package/build/components/highlight/scss/index.scss +0 -2
- package/build/components/loader/index.d.ts +0 -22
- package/build/components/loader/index.js +0 -78
- package/build/components/loader/scss/index.scss +0 -2
- package/build/components/radio/scss/index.scss +0 -2
- package/build/components/root/index.d.ts +0 -7
- package/build/components/root/index.js +0 -4
- package/build/components/root/onclick.d.ts +0 -5
- package/build/components/root/onclick.js +0 -12
- package/build/components/switch/scss/index.scss +0 -2
- package/build/css-utilities/[margin,padding]/scss/index.scss +0 -2
- package/build/css-utilities/error/scss/index.scss +0 -2
- package/build/css-utilities/flicker/scss/index.scss +0 -2
- package/build/css-utilities/focus/scss/index.scss +0 -2
- package/build/css-utilities/gap/scss/index.scss +0 -2
- package/build/css-utilities/line-height/scss/index.scss +0 -2
- package/build/css-utilities/pointer/scss/index.scss +0 -2
- package/build/css-utilities/scroll-fade/scss/index.scss +0 -2
- package/build/css-utilities/size/scss/index.scss +0 -2
- package/build/css-utilities/viewport/scss/index.scss +0 -2
- package/build/css-utilities/width/scss/index.scss +0 -2
- package/build/fonts/index.d.ts +0 -1
- package/build/fonts/index.js +0 -1
- package/build/fonts/montserrat/scss/index.scss +0 -2
- package/build/themes/dark/back.d.ts +0 -19
- package/build/themes/dark/back.js +0 -7
- package/build/themes/dark/button/scss/index.scss +0 -2
- package/build/themes/dark/link/scss/index.scss +0 -2
- package/src/components/back/index.ts +0 -20
- package/src/components/back/scss/index.scss +0 -17
- package/src/components/back/svg/arrow.svg +0 -15
- package/src/components/bubble/scss/index.scss +0 -32
- package/src/components/bubble/scss/variables.scss +0 -20
- package/src/components/button/index.ts +0 -53
- package/src/components/ellipsis/index.ts +0 -11
- package/src/components/ellipsis/scss/index.scss +0 -30
- package/src/components/ellipsis/scss/variables.scss +0 -5
- package/src/components/frame/index.ts +0 -13
- package/src/components/frame/scss/index.scss +0 -39
- package/src/components/frame/scss/variables.scss +0 -4
- package/src/components/highlight/index.ts +0 -66
- package/src/components/highlight/scss/index.scss +0 -7
- package/src/components/highlight/scss/variables.scss +0 -4
- package/src/components/loader/index.ts +0 -80
- package/src/components/loader/scss/index.scss +0 -71
- package/src/components/loader/scss/variables.scss +0 -6
- package/src/components/radio/scss/index.scss +0 -50
- package/src/components/radio/scss/variables.scss +0 -67
- package/src/components/root/index.ts +0 -6
- package/src/components/root/onclick.ts +0 -20
- package/src/components/switch/scss/index.scss +0 -48
- package/src/components/switch/scss/variables.scss +0 -74
- package/src/css-utilities/[margin,padding]/scss/index.scss +0 -43
- package/src/css-utilities/[margin,padding]/scss/variables.scss +0 -54
- package/src/css-utilities/error/scss/index.scss +0 -24
- package/src/css-utilities/error/scss/variables.scss +0 -3
- package/src/css-utilities/flicker/scss/index.scss +0 -15
- package/src/css-utilities/flicker/scss/variables.scss +0 -5
- package/src/css-utilities/focus/scss/index.scss +0 -7
- package/src/css-utilities/focus/scss/variables.scss +0 -5
- package/src/css-utilities/gap/scss/index.scss +0 -13
- package/src/css-utilities/gap/scss/variables.scss +0 -39
- package/src/css-utilities/line-height/scss/index.scss +0 -1
- package/src/css-utilities/line-height/scss/variables.scss +0 -10
- package/src/css-utilities/pointer/scss/index.scss +0 -5
- package/src/css-utilities/scroll-fade/scss/index.scss +0 -47
- package/src/css-utilities/scroll-fade/scss/variables.scss +0 -3
- package/src/css-utilities/size/scss/index.scss +0 -1
- package/src/css-utilities/size/scss/variables.scss +0 -12
- package/src/css-utilities/text/scss/variables.scss +0 -31
- package/src/css-utilities/viewport/scss/index.scss +0 -5
- package/src/css-utilities/width/scss/index.scss +0 -5
- package/src/css-utilities/width/scss/variables.scss +0 -9
- package/src/fonts/index.ts +0 -1
- package/src/themes/dark/back.ts +0 -9
- package/src/themes/dark/button/scss/index.scss +0 -46
- package/src/themes/dark/link/scss/index.scss +0 -26
- package/src/tokens/scss/font-weight.scss +0 -6
- package/src/tokens/scss/line-height.scss +0 -9
- package/src/tokens/scss/transition-duration.scss +0 -1
- /package/build/{fonts/montserrat → css-utilities/font/geist}/index.d.ts +0 -0
- /package/build/{fonts/montserrat → css-utilities/font/geist}/index.js +0 -0
- /package/build/{fonts → css-utilities/font}/montserrat/scss/Montserrat-Bold.woff +0 -0
- /package/build/{fonts → css-utilities/font}/montserrat/scss/Montserrat-Bold.woff2 +0 -0
- /package/build/{fonts → css-utilities/font}/montserrat/scss/Montserrat-BoldItalic.woff +0 -0
- /package/build/{fonts → css-utilities/font}/montserrat/scss/Montserrat-BoldItalic.woff2 +0 -0
- /package/build/{fonts → css-utilities/font}/montserrat/scss/Montserrat-Italic.woff +0 -0
- /package/build/{fonts → css-utilities/font}/montserrat/scss/Montserrat-Italic.woff2 +0 -0
- /package/build/{fonts → css-utilities/font}/montserrat/scss/Montserrat-Medium.woff +0 -0
- /package/build/{fonts → css-utilities/font}/montserrat/scss/Montserrat-Medium.woff2 +0 -0
- /package/build/{fonts → css-utilities/font}/montserrat/scss/Montserrat-MediumItalic.woff +0 -0
- /package/build/{fonts → css-utilities/font}/montserrat/scss/Montserrat-MediumItalic.woff2 +0 -0
- /package/build/{fonts → css-utilities/font}/montserrat/scss/Montserrat-Regular.woff +0 -0
- /package/build/{fonts → css-utilities/font}/montserrat/scss/Montserrat-Regular.woff2 +0 -0
- /package/build/{fonts → css-utilities/font}/montserrat/scss/Montserrat-SemiBold.woff +0 -0
- /package/build/{fonts → css-utilities/font}/montserrat/scss/Montserrat-SemiBold.woff2 +0 -0
- /package/build/{fonts → css-utilities/font}/montserrat/scss/Montserrat-SemiBoldItalic.woff +0 -0
- /package/build/{fonts → css-utilities/font}/montserrat/scss/Montserrat-SemiBoldItalic.woff2 +0 -0
- /package/src/{fonts/montserrat → css-utilities/font/geist}/index.ts +0 -0
- /package/src/{fonts → css-utilities/font}/montserrat/scss/Montserrat-Bold.woff +0 -0
- /package/src/{fonts → css-utilities/font}/montserrat/scss/Montserrat-Bold.woff2 +0 -0
- /package/src/{fonts → css-utilities/font}/montserrat/scss/Montserrat-BoldItalic.woff +0 -0
- /package/src/{fonts → css-utilities/font}/montserrat/scss/Montserrat-BoldItalic.woff2 +0 -0
- /package/src/{fonts → css-utilities/font}/montserrat/scss/Montserrat-Italic.woff +0 -0
- /package/src/{fonts → css-utilities/font}/montserrat/scss/Montserrat-Italic.woff2 +0 -0
- /package/src/{fonts → css-utilities/font}/montserrat/scss/Montserrat-Medium.woff +0 -0
- /package/src/{fonts → css-utilities/font}/montserrat/scss/Montserrat-Medium.woff2 +0 -0
- /package/src/{fonts → css-utilities/font}/montserrat/scss/Montserrat-MediumItalic.woff +0 -0
- /package/src/{fonts → css-utilities/font}/montserrat/scss/Montserrat-MediumItalic.woff2 +0 -0
- /package/src/{fonts → css-utilities/font}/montserrat/scss/Montserrat-Regular.woff +0 -0
- /package/src/{fonts → css-utilities/font}/montserrat/scss/Montserrat-Regular.woff2 +0 -0
- /package/src/{fonts → css-utilities/font}/montserrat/scss/Montserrat-SemiBold.woff +0 -0
- /package/src/{fonts → css-utilities/font}/montserrat/scss/Montserrat-SemiBold.woff2 +0 -0
- /package/src/{fonts → css-utilities/font}/montserrat/scss/Montserrat-SemiBoldItalic.woff +0 -0
- /package/src/{fonts → css-utilities/font}/montserrat/scss/Montserrat-SemiBoldItalic.woff2 +0 -0
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { component, html, type Renderable } from '@esportsplus/template';
|
|
2
|
-
import { reactive } from '@esportsplus/reactivity';
|
|
3
|
-
import './scss/index.scss';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const hold = component(
|
|
7
|
-
function(attributes, content: (state: { holding: boolean, complete: boolean }) => Renderable<any>) {
|
|
8
|
-
let end = () => {
|
|
9
|
-
if (!state.complete) {
|
|
10
|
-
state.holding = false;
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
state = reactive({
|
|
14
|
-
complete: false,
|
|
15
|
-
holding: false
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
return html`
|
|
19
|
-
<div
|
|
20
|
-
class='button ${() => state.holding && 'button--holding'}'
|
|
21
|
-
onmousedown='${(e) => {
|
|
22
|
-
e.preventDefault();
|
|
23
|
-
state.holding = true;
|
|
24
|
-
}}'
|
|
25
|
-
${attributes}
|
|
26
|
-
${{
|
|
27
|
-
onanimationend: (e: AnimationEvent) => {
|
|
28
|
-
if (e.animationName === 'buttonHolding') {
|
|
29
|
-
state.complete = true;
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
onclick: () => {},
|
|
33
|
-
onmousedown: (e) => {
|
|
34
|
-
e.preventDefault();
|
|
35
|
-
state.holding = true;
|
|
36
|
-
},
|
|
37
|
-
onmouseup: end,
|
|
38
|
-
ontouchend: end,
|
|
39
|
-
ontouchstart: (e) => {
|
|
40
|
-
e.preventDefault();
|
|
41
|
-
state.holding = true;
|
|
42
|
-
}
|
|
43
|
-
}}
|
|
44
|
-
>
|
|
45
|
-
${() => content(state)}
|
|
46
|
-
</div>
|
|
47
|
-
`;
|
|
48
|
-
}
|
|
49
|
-
);
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
export default { hold };
|
|
53
|
-
export { hold };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
@use 'variables';
|
|
2
|
-
|
|
3
|
-
.ellipsis {
|
|
4
|
-
span {
|
|
5
|
-
animation: ellipsis var(--animation-duration) infinite linear;
|
|
6
|
-
background-color: var(--color);
|
|
7
|
-
border-radius: 100%;
|
|
8
|
-
display: inline-block;
|
|
9
|
-
height: var(--size);
|
|
10
|
-
margin: 0 var(--margin-horizontal);
|
|
11
|
-
width: var(--size);
|
|
12
|
-
|
|
13
|
-
:nth-child(2) {
|
|
14
|
-
animation-delay: 0.24s;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
:nth-child(3) {
|
|
18
|
-
animation-delay: 0.48s;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
@keyframes ellipsis {
|
|
23
|
-
0%, 100% {
|
|
24
|
-
opacity: 0.16;
|
|
25
|
-
}
|
|
26
|
-
20% {
|
|
27
|
-
opacity: 1;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { component, html } from '@esportsplus/template';
|
|
2
|
-
import './scss/index.scss';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export default component(
|
|
6
|
-
function(this, attributes, content) {
|
|
7
|
-
return html`
|
|
8
|
-
<div class='frame --scrollbar' ${this?.attributes} ${attributes}>
|
|
9
|
-
${content}
|
|
10
|
-
</div>
|
|
11
|
-
`;
|
|
12
|
-
}
|
|
13
|
-
);
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
@use '/tokens';
|
|
2
|
-
@use 'variables';
|
|
3
|
-
|
|
4
|
-
.frames {
|
|
5
|
-
display: flex;
|
|
6
|
-
gap: var(--gap);
|
|
7
|
-
transform: translateX(calc(var(--i) * (100% + var(--gap))));
|
|
8
|
-
transition: transform 0.3s ease;
|
|
9
|
-
|
|
10
|
-
.frame {
|
|
11
|
-
flex-shrink: 0;
|
|
12
|
-
min-width: 100%;
|
|
13
|
-
width: 100%;
|
|
14
|
-
|
|
15
|
-
@include tokens.state(inactive) {
|
|
16
|
-
display: flex;
|
|
17
|
-
opacity: var(--opacity);
|
|
18
|
-
|
|
19
|
-
> * {
|
|
20
|
-
pointer-events: none;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.frame {
|
|
27
|
-
cursor: default;
|
|
28
|
-
display: none;
|
|
29
|
-
flex-wrap: wrap;
|
|
30
|
-
justify-content: flex-start;
|
|
31
|
-
max-width: 100%;
|
|
32
|
-
position: relative;
|
|
33
|
-
width: 100%;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
@include tokens.state(active) {
|
|
37
|
-
display: flex;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { component, html, Attributes } from '@esportsplus/template';
|
|
2
|
-
import { reactive } from '@esportsplus/reactivity';
|
|
3
|
-
import { omit } from '@esportsplus/utilities';
|
|
4
|
-
import './scss/index.scss';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
type A = Attributes & { background?: string };
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const OMIT = ['background'];
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
let key = Symbol(),
|
|
14
|
-
observer: IntersectionObserver | null = null;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
export default component(
|
|
18
|
-
(attributes: A, content) => {
|
|
19
|
-
if (observer === null) {
|
|
20
|
-
observer = new IntersectionObserver((entries) => {
|
|
21
|
-
let disconnected = 0,
|
|
22
|
-
n = entries.length;
|
|
23
|
-
|
|
24
|
-
for (let i = 0; i < n; i++) {
|
|
25
|
-
let { isIntersecting, target } = entries[i];
|
|
26
|
-
|
|
27
|
-
if (target.isConnected) {
|
|
28
|
-
// @ts-ignore
|
|
29
|
-
target[key].highlight = +isIntersecting;
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
disconnected++;
|
|
33
|
-
observer!.unobserve(target);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
if (n - disconnected === 0) {
|
|
38
|
-
observer!.disconnect();
|
|
39
|
-
observer = null;
|
|
40
|
-
}
|
|
41
|
-
}, { threshold: 1 });
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
let state = reactive({
|
|
45
|
-
highlight: 0
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
return html`
|
|
49
|
-
<div class='highlight'
|
|
50
|
-
${omit(attributes, OMIT)}
|
|
51
|
-
${{
|
|
52
|
-
onrender: (element) => {
|
|
53
|
-
element[key] = state;
|
|
54
|
-
observer!.observe(element);
|
|
55
|
-
},
|
|
56
|
-
style: [
|
|
57
|
-
() => `--highlight: ${state.highlight}`,
|
|
58
|
-
`--background: ${attributes.background}`,
|
|
59
|
-
]
|
|
60
|
-
}}
|
|
61
|
-
>
|
|
62
|
-
${content}
|
|
63
|
-
</div>
|
|
64
|
-
`;
|
|
65
|
-
}
|
|
66
|
-
);
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { component, html, type Attributes } from '@esportsplus/template';
|
|
2
|
-
import { reactive } from '@esportsplus/reactivity';
|
|
3
|
-
import { omit } from '@esportsplus/utilities';
|
|
4
|
-
import './scss/index.scss';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
type A = Attributes & {
|
|
8
|
-
'loader'?: Attributes,
|
|
9
|
-
'loader-content'?: Attributes,
|
|
10
|
-
'loader-logo'?: Attributes
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const OMIT = ['loader-content', 'loader-logo'];
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
export default component(
|
|
18
|
-
(attributes: A, content) => {
|
|
19
|
-
let state = reactive({
|
|
20
|
-
load: false,
|
|
21
|
-
remove: false,
|
|
22
|
-
scale: false
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
return () => {
|
|
26
|
-
if (state.remove) {
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
let i = 0;
|
|
31
|
-
|
|
32
|
-
return html`
|
|
33
|
-
<div
|
|
34
|
-
class='loader ${() => state.load && 'loader--load'}'
|
|
35
|
-
onanimationend=${({ animationName: name }: AnimationEvent) => {
|
|
36
|
-
i++;
|
|
37
|
-
|
|
38
|
-
if (name === 'move' && i > 1) {
|
|
39
|
-
state.remove = true;
|
|
40
|
-
}
|
|
41
|
-
}}
|
|
42
|
-
${omit(attributes, OMIT)}
|
|
43
|
-
>
|
|
44
|
-
<div
|
|
45
|
-
class='loader ${() => state.load && 'loader--load'}'
|
|
46
|
-
${!content && {
|
|
47
|
-
onconnect: () => {
|
|
48
|
-
state.load = true;
|
|
49
|
-
}
|
|
50
|
-
}}
|
|
51
|
-
${attributes.loader}
|
|
52
|
-
>
|
|
53
|
-
${content && html`
|
|
54
|
-
<div class='loader-content' ${attributes['loader-content']}>
|
|
55
|
-
<div
|
|
56
|
-
class='loader-logo text --flex-center --text-uppercase --text-600'
|
|
57
|
-
style='color: var(--color-grey-500);'
|
|
58
|
-
${attributes['loader-logo']}
|
|
59
|
-
${{
|
|
60
|
-
class: () => state.scale && 'loader-logo--scale',
|
|
61
|
-
onanimationend: ({ animationName: name }) => {
|
|
62
|
-
if (name === 'scale') {
|
|
63
|
-
state.load = true;
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
onconnect: () => {
|
|
67
|
-
state.scale = true;
|
|
68
|
-
}
|
|
69
|
-
}}
|
|
70
|
-
>
|
|
71
|
-
${content}
|
|
72
|
-
</div>
|
|
73
|
-
</div>
|
|
74
|
-
`}
|
|
75
|
-
</div>
|
|
76
|
-
</div>
|
|
77
|
-
`;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
);
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
@use 'variables';
|
|
2
|
-
|
|
3
|
-
.loader {
|
|
4
|
-
background-color: #01020964;
|
|
5
|
-
bottom: 0;
|
|
6
|
-
left: 0;
|
|
7
|
-
position: fixed;
|
|
8
|
-
opacity: 1;
|
|
9
|
-
pointer-events: none;
|
|
10
|
-
right: 0;
|
|
11
|
-
top: 0;
|
|
12
|
-
transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
|
|
13
|
-
visibility: visible;
|
|
14
|
-
z-index: 9999;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
&--load {
|
|
18
|
-
animation: 0.4s 0.2s ease-in-out 1 both loaderMove;
|
|
19
|
-
|
|
20
|
-
& & {
|
|
21
|
-
animation: 0.4s ease-in-out 1 both loaderMove;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
@keyframes loaderMove {
|
|
27
|
-
0% {
|
|
28
|
-
transform: translateY(0);
|
|
29
|
-
}
|
|
30
|
-
80% {
|
|
31
|
-
transform: translateY(-102%);
|
|
32
|
-
}
|
|
33
|
-
100% {
|
|
34
|
-
transform: translateY(-102%);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
& & {
|
|
40
|
-
background-color: var(--color-black-400);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
&-content {
|
|
44
|
-
bottom: auto;
|
|
45
|
-
left: 50%;
|
|
46
|
-
position: absolute;
|
|
47
|
-
right: auto;
|
|
48
|
-
top: 50%;
|
|
49
|
-
transform: translateX(-50%) translateY(-50%);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
&-logo {
|
|
53
|
-
color: white;
|
|
54
|
-
|
|
55
|
-
&--scale {
|
|
56
|
-
animation: loaderLogoScale 0.32s 1;
|
|
57
|
-
animation-fill-mode: both;
|
|
58
|
-
|
|
59
|
-
@keyframes loaderLogoScale {
|
|
60
|
-
from {
|
|
61
|
-
opacity: 1;
|
|
62
|
-
transform: scale3d(1, 1, 1);
|
|
63
|
-
}
|
|
64
|
-
to {
|
|
65
|
-
opacity: 0;
|
|
66
|
-
transform: scale3d(1.8, 1.8, 1.8);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
@use '/lib';
|
|
2
|
-
@use 'variables';
|
|
3
|
-
|
|
4
|
-
.radio {
|
|
5
|
-
background: var(--background);
|
|
6
|
-
border-color: var(--border-color);
|
|
7
|
-
border-radius: var(--border-radius);
|
|
8
|
-
border-style: var(--border-style);
|
|
9
|
-
border-width: var(--border-width);
|
|
10
|
-
flex: 0 0 var(--width);
|
|
11
|
-
height: var(--height);
|
|
12
|
-
position: relative;
|
|
13
|
-
transition:
|
|
14
|
-
background var(--transition-duration) ease-in-out,
|
|
15
|
-
border-color var(--transition-duration) ease-in-out,
|
|
16
|
-
box-shadow var(--transition-duration) ease-in-out,
|
|
17
|
-
opacity var(--transition-duration) ease-in-out,
|
|
18
|
-
transform var(--transition-duration) ease-in-out;
|
|
19
|
-
width: var(--width);
|
|
20
|
-
|
|
21
|
-
&:invalid,
|
|
22
|
-
&:required {
|
|
23
|
-
box-shadow: none;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
&::before {
|
|
27
|
-
background: var(--accent);
|
|
28
|
-
border-radius: inherit;
|
|
29
|
-
bottom: 50%;
|
|
30
|
-
box-shadow: var(--box-shadow);
|
|
31
|
-
content: '';
|
|
32
|
-
height: var(--height);
|
|
33
|
-
opacity: var(--opacity);
|
|
34
|
-
right: 50%;
|
|
35
|
-
position: absolute;
|
|
36
|
-
transform: translate(var(--translateX), var(--translateY)) rotate(var(--rotate)) scale(var(--scale));
|
|
37
|
-
transform-origin: center;
|
|
38
|
-
width: var(--width);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// Hide HTML Field Element
|
|
42
|
-
&-tag {
|
|
43
|
-
@include lib.position(absolute, 0 null null 0);
|
|
44
|
-
height: 0px;
|
|
45
|
-
opacity: 0;
|
|
46
|
-
pointer-events: none;
|
|
47
|
-
width: 0px;
|
|
48
|
-
z-index: 0;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
@use '/tokens';
|
|
2
|
-
|
|
3
|
-
.radio {
|
|
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-default: var(--background);
|
|
11
|
-
--border-radius: 100%;
|
|
12
|
-
--border-style: solid;
|
|
13
|
-
--border-width: 0px;
|
|
14
|
-
--box-shadow: var(--box-shadow-default);
|
|
15
|
-
--box-shadow-default: none;
|
|
16
|
-
--height: var(--size);
|
|
17
|
-
--margin-horizontal: calc(var(--width-switch) - var(--width));
|
|
18
|
-
--opacity: var(--opacity-default);
|
|
19
|
-
--opacity-active: 1;
|
|
20
|
-
--opacity-default: 0.4;
|
|
21
|
-
--opacity-hover: var(--opacity-default);
|
|
22
|
-
--opacity-pressed: var(--opacity-default);
|
|
23
|
-
--rotate: 0deg;
|
|
24
|
-
--scale: var(--scale-default);
|
|
25
|
-
--scale-active: 0.9;
|
|
26
|
-
--scale-default: 0;
|
|
27
|
-
--scale-hover: 0.8;
|
|
28
|
-
--scale-pressed: 0.7;
|
|
29
|
-
--size: var(--size-600);
|
|
30
|
-
--width: var(--height);
|
|
31
|
-
--width-switch: 40px;
|
|
32
|
-
|
|
33
|
-
&::before {
|
|
34
|
-
--height: calc((var(--size) / 2) - (var(--border-width) * 2));
|
|
35
|
-
--box-shadow: 0 1px 0 rgba(0, 0, 0, 0.16);
|
|
36
|
-
--translateX: 50%;
|
|
37
|
-
--translateY: 50%;
|
|
38
|
-
--width: var(--height);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
#{tokens.state(inactive, 'label')},
|
|
42
|
-
#{tokens.state(inactive)} {
|
|
43
|
-
@include tokens.state(hover) {
|
|
44
|
-
--background: var(--background-hover);
|
|
45
|
-
--border-color: var(--border-color-hover);
|
|
46
|
-
--box-shadow: var(--box-shadow-hover);
|
|
47
|
-
--opacity: var(--opacity-hover);
|
|
48
|
-
--scale: var(--scale-hover);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
@include tokens.state(pressed) {
|
|
52
|
-
--background: var(--background-pressed);
|
|
53
|
-
--border-color: var(--border-color-pressed);
|
|
54
|
-
--box-shadow: var(--box-shadow-pressed);
|
|
55
|
-
--opacity: var(--opacity-pressed);
|
|
56
|
-
--scale: var(--scale-pressed);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
#{tokens.state(active)} {
|
|
61
|
-
--background: var(--background-active);
|
|
62
|
-
--border-color: var(--border-color-active);
|
|
63
|
-
--box-shadow: var(--box-shadow-active);
|
|
64
|
-
--opacity: var(--opacity-active);
|
|
65
|
-
--scale: var(--scale-active);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import factory from '@esportsplus/queue';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
let queue = factory<VoidFunction | (() => Promise<void>)>(64);
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const onclick = async () => {
|
|
8
|
-
let item;
|
|
9
|
-
|
|
10
|
-
while (item = queue.next()) {
|
|
11
|
-
await item();
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
onclick.push = (fn: VoidFunction) => {
|
|
16
|
-
queue.add(fn);
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
export default onclick;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
@use '/lib';
|
|
2
|
-
@use 'variables';
|
|
3
|
-
|
|
4
|
-
.switch {
|
|
5
|
-
background: var(--background);
|
|
6
|
-
border-color: var(--border-color);
|
|
7
|
-
border-radius: var(--border-radius);
|
|
8
|
-
border-style: var(--border-style);
|
|
9
|
-
border-width: var(--border-width);
|
|
10
|
-
flex: 0 0 var(--width);
|
|
11
|
-
height: var(--height);
|
|
12
|
-
position: relative;
|
|
13
|
-
transition:
|
|
14
|
-
background var(--transition-duration) ease-in-out,
|
|
15
|
-
border-color var(--transition-duration) ease-in-out,
|
|
16
|
-
box-shadow var(--transition-duration) ease-in-out,
|
|
17
|
-
opacity var(--transition-duration) ease-in-out,
|
|
18
|
-
transform var(--transition-duration) ease-in-out;
|
|
19
|
-
width: var(--width);
|
|
20
|
-
|
|
21
|
-
&:invalid,
|
|
22
|
-
&:required {
|
|
23
|
-
box-shadow: none;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
&::before {
|
|
27
|
-
@include lib.position(absolute, var(--padding-vertical) null null var(--padding-horizontal));
|
|
28
|
-
background: var(--accent);
|
|
29
|
-
border-radius: inherit;
|
|
30
|
-
box-shadow: var(--box-shadow);
|
|
31
|
-
content: '';
|
|
32
|
-
height: var(--height);
|
|
33
|
-
opacity: var(--opacity);
|
|
34
|
-
transform: translate(var(--translateX), var(--translateY)) rotate(var(--rotate)) scale(var(--scale));
|
|
35
|
-
transform-origin: center;
|
|
36
|
-
width: var(--width);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// Hide HTML Field Element
|
|
40
|
-
&-tag {
|
|
41
|
-
@include lib.position(absolute, 0 null null 0);
|
|
42
|
-
height: 0px;
|
|
43
|
-
opacity: 0;
|
|
44
|
-
pointer-events: none;
|
|
45
|
-
width: 0px;
|
|
46
|
-
z-index: 0;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
@use '/lib';
|
|
2
|
-
@use '/tokens';
|
|
3
|
-
|
|
4
|
-
.switch {
|
|
5
|
-
--background: var(--background-default);
|
|
6
|
-
--background-active: var(--background-default);
|
|
7
|
-
--background-default: transparent;
|
|
8
|
-
--background-hover: var(--background-default);
|
|
9
|
-
--background-pressed: var(--background-default);
|
|
10
|
-
--border-color: var(--border-color-default);
|
|
11
|
-
--border-color-default: var(--background);
|
|
12
|
-
--border-radius: 240px;
|
|
13
|
-
--border-style: solid;
|
|
14
|
-
--border-width: 0px;
|
|
15
|
-
--box-shadow: var(--box-shadow-default);
|
|
16
|
-
--box-shadow-default: none;
|
|
17
|
-
--height: var(--size);
|
|
18
|
-
--opacity: var(--opacity-default);
|
|
19
|
-
--opacity-active: var(--opacity-default);
|
|
20
|
-
--opacity-default: 1;
|
|
21
|
-
--opacity-hover: var(--opacity-default);
|
|
22
|
-
--opacity-pressed: var(--opacity-default);
|
|
23
|
-
--padding-horizontal: var(--border-width-400);
|
|
24
|
-
--padding-vertical: var(--border-width-400);
|
|
25
|
-
--rotate: 0deg;
|
|
26
|
-
--scale: var(--scale-default);
|
|
27
|
-
--scale-active: var(--scale-default);
|
|
28
|
-
--scale-default: 1;
|
|
29
|
-
--scale-hover: var(--scale-default);
|
|
30
|
-
--scale-pressed: var(--scale-default);
|
|
31
|
-
--size: var(--size-600);
|
|
32
|
-
--width: var(--width-switch);
|
|
33
|
-
--width-switch: 40px;
|
|
34
|
-
|
|
35
|
-
&::before {
|
|
36
|
-
--box-shadow: 0 1px 0 rgba(0, 0, 0, 0.16);
|
|
37
|
-
--height: calc(var(--size) - (var(--border-width) * 2) - (var(--padding-vertical) * 2));
|
|
38
|
-
--translateX: 0px;
|
|
39
|
-
--translateY: 0px;
|
|
40
|
-
--width: var(--height);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
#{tokens.state(inactive)} {
|
|
44
|
-
@include tokens.state(hover) {
|
|
45
|
-
--background: var(--background-hover);
|
|
46
|
-
--border-color: var(--border-color-hover);
|
|
47
|
-
--box-shadow: var(--box-shadow-hover);
|
|
48
|
-
--color: var(--color-hover);
|
|
49
|
-
--opacity: var(--opacity-hover);
|
|
50
|
-
--scale: var(--scale-hover);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
@include tokens.state(pressed) {
|
|
54
|
-
--background: var(--background-pressed);
|
|
55
|
-
--border-color: var(--border-color-pressed);
|
|
56
|
-
--box-shadow: var(--box-shadow-pressed);
|
|
57
|
-
--color: var(--color-pressed);
|
|
58
|
-
--opacity: var(--opacity-pressed);
|
|
59
|
-
--scale: var(--scale-pressed);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
#{tokens.state(active)} {
|
|
64
|
-
--background: var(--background-active);
|
|
65
|
-
--border-color: var(--border-color-active);
|
|
66
|
-
--box-shadow: var(--box-shadow-active);
|
|
67
|
-
--opacity: var(--opacity-active);
|
|
68
|
-
--scale: var(--scale-active);
|
|
69
|
-
|
|
70
|
-
&::before {
|
|
71
|
-
--translateX: calc(var(--width-switch) - (var(--border-width) * 2) - var(--height) - (var(--padding-horizontal) * 2));
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|