@esportsplus/ui 0.51.7 → 0.54.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 +53 -9
- package/build/components/accordion/index.d.ts +6 -18
- package/build/components/accordion/index.js +10 -36
- 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/index.d.ts +12 -12
- package/build/components/checkbox/index.js +63 -31
- 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 +49 -0
- package/build/components/clipboard/index.d.ts +1437 -1228
- package/build/components/clipboard/index.js +3 -1
- package/build/components/clipboard/onclick.d.ts +4 -38
- package/build/components/clipboard/onclick.js +10 -10
- package/build/components/counter/index.js +58 -66
- package/build/components/counter/scss/index.scss +1 -1
- package/build/components/form/action.js +8 -8
- package/build/components/form/index.d.ts +4 -4
- package/build/components/form/input.d.ts +4 -4
- package/build/components/form/input.js +3 -3
- package/build/components/grid/scss/index.scss +1 -1
- package/build/components/icon/index.d.ts +2 -19
- package/build/components/icon/index.js +8 -8
- package/build/components/icon/scss/index.scss +1 -1
- package/build/components/index.d.ts +1 -11
- package/build/components/index.js +1 -11
- package/build/components/input/index.d.ts +1 -1
- package/build/components/input/index.js +11 -11
- 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 -18
- package/build/components/overlay/index.js +11 -5
- package/build/components/overlay/scss/index.scss +1 -1
- package/build/components/page/scss/index.scss +1 -1
- package/build/components/radio/index.d.ts +1436 -4
- package/build/components/radio/index.js +0 -1
- 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/index.d.ts +7 -53
- package/build/components/select/index.js +82 -100
- package/build/components/select/scss/index.scss +1 -1
- package/build/components/sidebar/index.d.ts +2 -18
- package/build/components/sidebar/index.js +11 -5
- package/build/components/sidebar/scss/index.scss +1 -1
- package/build/components/switch/index.d.ts +1436 -4
- package/build/components/switch/index.js +0 -1
- 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 +37 -15
- package/build/components/textarea/scss/index.scss +1 -1
- package/build/components/toast/index.d.ts +9 -0
- package/build/components/toast/index.js +157 -0
- package/build/components/toast/manager.d.ts +60 -0
- package/build/components/toast/manager.js +203 -0
- package/build/components/toast/scss/index.scss +2 -0
- package/build/components/toast/svg/check.svg +1 -0
- package/build/components/toast/svg/chevron.svg +1 -0
- package/build/components/toast/svg/close.svg +1 -0
- package/build/components/toast/svg/copy.svg +1 -0
- package/build/components/toast/svg/error.svg +1 -0
- package/build/components/toast/svg/info.svg +1 -0
- package/build/components/toast/svg/loading.svg +1 -0
- package/build/components/toast/svg/success.svg +1 -0
- package/build/components/toast/svg/warning.svg +1 -0
- package/build/components/tooltip/index.d.ts +2151 -2544
- package/build/components/tooltip/menu.d.ts +2 -18
- package/build/components/tooltip/menu.js +38 -24
- package/build/components/tooltip/onclick.d.ts +717 -1229
- package/build/components/tooltip/onclick.js +18 -54
- package/build/components/tooltip/onhover.d.ts +713 -20
- package/build/components/tooltip/onhover.js +11 -11
- package/build/components/tooltip/scss/index.scss +1 -1
- package/build/components/typewriter/index.d.ts +2 -19
- package/build/components/typewriter/index.js +10 -10
- 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 +2 -0
- 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 -2
- package/build/themes/dark/index.js +0 -2
- package/build/themes/dark/input.d.ts +708 -114
- package/build/themes/dark/select.d.ts +732 -1456
- package/build/themes/dark/select.js +7 -5
- package/build/themes/dark/textarea.d.ts +716 -119
- package/package.json +20 -20
- package/pnpm-workspace.yaml +12 -8
- 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 -30
- package/src/components/accordion/scss/index.scss +9 -12
- 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/index.ts +27 -26
- 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 +60 -0
- package/src/components/clipboard/index.ts +3 -1
- package/src/components/clipboard/onclick.ts +3 -4
- package/src/components/counter/index.ts +57 -57
- package/src/components/counter/scss/index.scss +4 -5
- package/src/components/counter/scss/variables.scss +0 -1
- package/src/components/form/input.ts +6 -5
- package/src/components/grid/scss/index.scss +1 -1
- package/src/components/icon/index.ts +2 -3
- package/src/components/icon/scss/variables.scss +0 -1
- package/src/components/index.ts +2 -12
- package/src/components/input/index.ts +1 -1
- 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/overlay/index.ts +9 -5
- package/src/components/overlay/scss/index.scss +0 -1
- package/src/components/page/scss/index.scss +1 -7
- package/src/components/page/scss/variables.scss +0 -2
- package/src/components/radio/index.ts +0 -1
- package/src/components/range/index.ts +1 -1
- package/src/components/range/scss/index.scss +5 -5
- package/src/components/root/scss/index.scss +44 -39
- package/src/components/root/scss/variables.scss +38 -69
- package/src/components/select/index.ts +80 -109
- package/src/components/select/scss/index.scss +10 -7
- package/src/components/select/scss/variables.scss +0 -1
- package/src/components/sidebar/index.ts +9 -5
- package/src/components/sidebar/scss/index.scss +3 -4
- package/src/components/switch/index.ts +1 -2
- 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 +38 -5
- package/src/components/textarea/scss/index.scss +24 -13
- package/src/components/textarea/scss/variables.scss +0 -1
- package/src/components/toast/index.ts +188 -0
- package/src/components/toast/manager.ts +312 -0
- package/src/components/toast/scss/index.scss +276 -0
- package/src/components/toast/scss/variables.scss +19 -0
- package/src/components/toast/svg/check.svg +1 -0
- package/src/components/toast/svg/chevron.svg +1 -0
- package/src/components/toast/svg/close.svg +1 -0
- package/src/components/toast/svg/copy.svg +1 -0
- package/src/components/toast/svg/error.svg +1 -0
- package/src/components/toast/svg/info.svg +1 -0
- package/src/components/toast/svg/loading.svg +1 -0
- package/src/components/toast/svg/success.svg +1 -0
- package/src/components/toast/svg/warning.svg +1 -0
- package/src/components/tooltip/menu.ts +8 -4
- package/src/components/tooltip/onclick.ts +13 -70
- package/src/components/tooltip/onhover.ts +2 -3
- package/src/components/tooltip/scss/index.scss +2 -3
- package/src/components/typewriter/index.ts +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 +7 -12
- package/src/css-utilities/inline/scss/index.scss +0 -1
- package/src/css-utilities/scrollbar/scss/index.scss +95 -0
- package/src/css-utilities/scrollbar/scss/variables.scss +5 -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 -2
- package/src/themes/dark/select.ts +7 -5
- package/src/tokens/index.scss +1 -3
- package/src/tokens/scss/border-radius.scss +1 -6
- package/src/tokens/scss/color.scss +14 -14
- package/src/tokens/scss/font-size.scss +12 -11
- package/src/tokens/scss/scale.scss +22 -0
- package/src/tokens/scss/size.scss +19 -9
- package/src/tokens/scss/spacer.scss +9 -9
- 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/bolt.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/star.svg +1 -0
- package/storage/svg/type.svg +1 -0
- package/tsconfig.json +6 -2
- package/vite-env.d.ts +1 -0
- package/vite.config.ts +78 -72
- package/build/components/alert/index.d.ts +0 -19
- package/build/components/alert/index.js +0 -151
- package/build/components/alert/scss/index.scss +0 -2
- package/build/components/alert/svg/check.svg +0 -11
- package/build/components/alert/svg/close.svg +0 -12
- package/build/components/alert/svg/error.svg +0 -18
- package/build/components/back/index.d.ts +0 -18
- 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 -20
- package/build/components/frame/index.js +0 -7
- 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/scrollbar/index.d.ts +0 -27
- package/build/components/scrollbar/index.js +0 -56
- package/build/components/scrollbar/scss/index.scss +0 -2
- package/build/components/site/index.d.ts +0 -20
- package/build/components/site/index.js +0 -9
- package/build/components/site/scss/index.scss +0 -2
- package/build/components/switch/scss/index.scss +0 -2
- package/build/components/template/index.d.ts +0 -14
- package/build/components/template/index.js +0 -21
- 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/scroller/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/alert.d.ts +0 -11
- package/build/themes/dark/alert.js +0 -20
- package/build/themes/dark/back.d.ts +0 -15
- 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/accordion/scss/variables.scss +0 -9
- package/src/components/alert/index.ts +0 -165
- package/src/components/alert/scss/index.scss +0 -25
- package/src/components/alert/scss/variables.scss +0 -3
- package/src/components/alert/svg/check.svg +0 -11
- package/src/components/alert/svg/close.svg +0 -12
- package/src/components/alert/svg/error.svg +0 -18
- package/src/components/back/index.ts +0 -21
- 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 -54
- 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 -9
- 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 -67
- 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 -81
- 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/scrollbar/index.ts +0 -70
- package/src/components/scrollbar/scss/index.scss +0 -82
- package/src/components/scrollbar/scss/variables.scss +0 -6
- package/src/components/site/index.ts +0 -11
- package/src/components/site/scss/index.scss +0 -3
- package/src/components/switch/scss/index.scss +0 -48
- package/src/components/switch/scss/variables.scss +0 -74
- package/src/components/template/index.ts +0 -40
- 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/scroller/scss/index.scss +0 -8
- package/src/css-utilities/scroller/scss/variables.scss +0 -4
- 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/alert.ts +0 -23
- 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 -6
- 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
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
.modal {
|
|
6
6
|
margin: auto;
|
|
7
7
|
transition:
|
|
8
|
-
opacity var(--transition-duration)
|
|
9
|
-
transform var(--transition-duration)
|
|
8
|
+
opacity var(--transition-duration) var(--transition-timing-function),
|
|
9
|
+
transform var(--transition-duration) var(--transition-timing-function);
|
|
10
10
|
transform-origin: center;
|
|
11
11
|
width: min(var(--max-width), calc(100% - (var(--margin-horizontal) * 2)));
|
|
12
12
|
z-index: 9;
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
|
|
24
24
|
&-frame {
|
|
25
25
|
transition:
|
|
26
|
-
opacity var(--transition-duration)
|
|
27
|
-
transform var(--transition-duration)
|
|
26
|
+
opacity var(--transition-duration) var(--transition-timing-function),
|
|
27
|
+
transform var(--transition-duration) var(--transition-timing-function);
|
|
28
28
|
transform-origin: center;
|
|
29
29
|
|
|
30
30
|
@include tokens.state(inactive) {
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { component, html } from '@esportsplus/template';
|
|
2
2
|
import './scss/index.scss';
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
export default
|
|
6
|
-
attributes
|
|
7
|
-
|
|
5
|
+
export default component(
|
|
6
|
+
function(this, attributes, content) {
|
|
7
|
+
return html`
|
|
8
|
+
<div class='overlay --scrollbar' ${this?.attributes} ${attributes}>
|
|
9
|
+
${content}
|
|
10
|
+
</div>
|
|
11
|
+
`;
|
|
8
12
|
}
|
|
9
|
-
|
|
13
|
+
);
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
gap: var(--gap-vertical) 0px;
|
|
7
7
|
min-height: 100svh;
|
|
8
8
|
position: relative;
|
|
9
|
-
width:
|
|
9
|
+
width: 100%;
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
&-subtitle,
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
&-title {
|
|
15
15
|
color: var(--color);
|
|
16
16
|
display: block;
|
|
17
|
-
line-height: var(--line-height);
|
|
18
17
|
position: relative;
|
|
19
18
|
width: 100%;
|
|
20
19
|
z-index: 1;
|
|
@@ -25,11 +24,6 @@
|
|
|
25
24
|
font-size: var(--font-size);
|
|
26
25
|
}
|
|
27
26
|
|
|
28
|
-
&-suptitle + &-title,
|
|
29
|
-
&-title + &-subtitle {
|
|
30
|
-
margin-top: var(--margin-vertical);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
27
|
&-title {
|
|
34
28
|
text-wrap: balance;
|
|
35
29
|
}
|
|
@@ -7,12 +7,10 @@
|
|
|
7
7
|
--color: var(--color-default);
|
|
8
8
|
--color-default: var(--color-text-400);
|
|
9
9
|
--font-size: var(--font-size-400);
|
|
10
|
-
--line-height: var(--line-height-400);
|
|
11
10
|
}
|
|
12
11
|
|
|
13
12
|
&-title {
|
|
14
13
|
--color: var(--color-default);
|
|
15
14
|
--color-default: var(--color-text-500);
|
|
16
|
-
--line-height: var(--line-height-400);
|
|
17
15
|
}
|
|
18
16
|
}
|
|
@@ -5,7 +5,7 @@ import './scss/index.scss';
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
export default function(
|
|
8
|
-
this: { attributes?: Attributes } |
|
|
8
|
+
this: { attributes?: Attributes } | void,
|
|
9
9
|
attributes: Attributes & { max: number, min: number, state?: { active: boolean, error: string, value: number } }
|
|
10
10
|
) {
|
|
11
11
|
let { max, min } = attributes,
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
height: var(--height);
|
|
8
8
|
margin: calc(var(--margin-vertical) + ((var(--thumb-size) - var(--height)) / 2)) var(--margin-horizontal);
|
|
9
9
|
transition:
|
|
10
|
-
background var(--transition-duration)
|
|
11
|
-
border-color var(--transition-duration)
|
|
12
|
-
box-shadow var(--transition-duration)
|
|
13
|
-
opacity var(--transition-duration)
|
|
14
|
-
transform var(--transition-duration)
|
|
10
|
+
background var(--transition-duration) var(--transition-timing-function),
|
|
11
|
+
border-color var(--transition-duration) var(--transition-timing-function),
|
|
12
|
+
box-shadow var(--transition-duration) var(--transition-timing-function),
|
|
13
|
+
opacity var(--transition-duration) var(--transition-timing-function),
|
|
14
|
+
transform var(--transition-duration) var(--transition-timing-function);
|
|
15
15
|
width: var(--width);
|
|
16
16
|
|
|
17
17
|
&::-moz-range-thumb,
|
|
@@ -7,50 +7,57 @@ html {
|
|
|
7
7
|
width: 100%;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
+
h1, h2, h3, h4, h5, h6 {
|
|
11
|
+
color: var(--color);
|
|
12
|
+
font-size: var(--font-size);
|
|
13
|
+
font-weight: var(--font-weight-500);
|
|
14
|
+
margin: 0;
|
|
15
|
+
padding: 0;
|
|
16
|
+
position: relative;
|
|
17
|
+
text-wrap: balance;
|
|
18
|
+
width: 100%;
|
|
19
|
+
word-wrap: break-word;
|
|
20
|
+
|
|
21
|
+
sub,
|
|
22
|
+
sup {
|
|
23
|
+
font-size: 0.64em;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
b,
|
|
28
|
+
strong {
|
|
29
|
+
color: var(--color, inherit);
|
|
30
|
+
font-weight: var(--font-weight);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
sub,
|
|
34
|
+
sup {
|
|
35
|
+
font-size: 0.8em;
|
|
36
|
+
}
|
|
37
|
+
|
|
10
38
|
body {
|
|
11
39
|
background-color: var(--background);
|
|
12
40
|
color: var(--color);
|
|
13
41
|
font-family: var(--font-family);
|
|
14
42
|
font-size: var(--font-size);
|
|
15
43
|
font-weight: var(--font-weight);
|
|
16
|
-
line-height: var(--line-height);
|
|
17
44
|
min-width: var(--min-width);
|
|
18
45
|
text-rendering: optimizeLegibility;
|
|
19
46
|
-webkit-font-smoothing: antialiased;
|
|
20
47
|
-moz-osx-font-smoothing: grayscale;
|
|
21
48
|
}
|
|
22
49
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
transition: inherit;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
section {
|
|
31
|
-
align-content: flex-start;
|
|
32
|
-
display: flex;
|
|
33
|
-
flex-wrap: wrap;
|
|
34
|
-
justify-content: flex-start;
|
|
35
|
-
position: relative;
|
|
36
|
-
width: var(--width);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
h1, h2, h3, h4, h5 {
|
|
40
|
-
color: var(--color);
|
|
41
|
-
font-size: var(--font-size);
|
|
42
|
-
font-weight: var(--font-weight);
|
|
50
|
+
* {
|
|
51
|
+
// Recalculate at each element's font size instead of inheriting
|
|
52
|
+
// the body's computed length.
|
|
53
|
+
letter-spacing: var(--letter-spacing);
|
|
43
54
|
line-height: var(--line-height);
|
|
44
|
-
margin: 0;
|
|
45
|
-
padding: 0;
|
|
46
|
-
position: relative;
|
|
47
|
-
text-wrap: balance;
|
|
48
|
-
width: 100%;
|
|
49
|
-
word-wrap: break-word;
|
|
50
55
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
56
|
+
&,
|
|
57
|
+
&::after,
|
|
58
|
+
&::before {
|
|
59
|
+
box-sizing: border-box;
|
|
60
|
+
transition: inherit;
|
|
54
61
|
}
|
|
55
62
|
}
|
|
56
63
|
|
|
@@ -61,12 +68,6 @@ a {
|
|
|
61
68
|
text-decoration: none;
|
|
62
69
|
}
|
|
63
70
|
|
|
64
|
-
b,
|
|
65
|
-
strong {
|
|
66
|
-
color: var(--color, inherit);
|
|
67
|
-
font-weight: var(--font-weight);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
71
|
p {
|
|
71
72
|
margin: 0;
|
|
72
73
|
padding: 0;
|
|
@@ -82,9 +83,13 @@ pre {
|
|
|
82
83
|
width: 100%;
|
|
83
84
|
}
|
|
84
85
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
section {
|
|
87
|
+
align-content: flex-start;
|
|
88
|
+
display: flex;
|
|
89
|
+
flex-wrap: wrap;
|
|
90
|
+
justify-content: flex-start;
|
|
91
|
+
position: relative;
|
|
92
|
+
width: var(--width);
|
|
88
93
|
}
|
|
89
94
|
|
|
90
95
|
sub {
|
|
@@ -2,99 +2,68 @@
|
|
|
2
2
|
@use '/lib';
|
|
3
3
|
@use '/tokens';
|
|
4
4
|
|
|
5
|
+
|
|
6
|
+
|
|
5
7
|
:root {
|
|
6
8
|
@include lib.css-variables(border-radius, tokens.$border-radius);
|
|
7
9
|
@include lib.css-variables(border-width, tokens.$border-width);
|
|
8
10
|
@include lib.css-variables(box-shadow, tokens.$box-shadow);
|
|
9
11
|
@include lib.css-variables(color, tokens.$color);
|
|
10
12
|
@include lib.css-variables(font-size, tokens.$font-size);
|
|
11
|
-
@include lib.css-variables(font-weight, tokens.$font-weight);
|
|
12
|
-
@include lib.css-variables(line-height, tokens.$line-height);
|
|
13
13
|
@include lib.css-variables(size, tokens.$size);
|
|
14
14
|
@include lib.css-variables(spacer, tokens.$spacer);
|
|
15
15
|
|
|
16
|
-
--background: var(--color-
|
|
16
|
+
--background: var(--color-white-400);
|
|
17
17
|
--color: var(--color-text-400);
|
|
18
|
-
--font-family: 'Montserrat', sans-serif;
|
|
19
18
|
--font-size: var(--font-size-400);
|
|
20
19
|
--font-weight: var(--font-weight-400);
|
|
21
|
-
--line-height: var(--line-height-400);
|
|
22
20
|
--min-width: 320px;
|
|
23
|
-
--
|
|
24
|
-
--transition-
|
|
25
|
-
|
|
26
|
-
// https://gist.github.com/jh3y/1b3afdfa7af3ebc5668bf169cea17d09
|
|
27
|
-
--timing-back: linear( 0, -0.0059 4.51%, -0.0418 15.63%, -0.0499 20.72%, -0.0476 23.51%, -0.0395 26.12%, -0.0255 28.59%, -0.0055 30.95%, 0.0281 33.76%, 0.0717 36.47%, 0.1901 41.63%, 0.344 46.32%, 0.6156 52.65%, 0.7495 56.35%, 0.8757 60.97%, 0.9663 65.85%, 1.0006 68.58%, 1.0256 71.43%, 1.0417 74.43%, 1.0493 77.65%, 1.0452 83.02%, 1.0077 94.8%, 1 );
|
|
28
|
-
--timing-back-in: linear( 0, -0.0029 4.31%, -0.0119 9.02%, -0.0837 31.27%, -0.0954 36.64%, -0.0998 41.45%, -0.0951 47.03%, -0.079 52.25%, -0.051 57.19%, -0.0108 61.92%, 0.0515 67.19%, 0.1312 72.27%, 0.2286 77.18%, 0.3445 81.96%, 0.4792 86.62%, 0.633 91.17%, 0.8066 95.63%, 1 );
|
|
29
|
-
--timing-back-out: linear( 0, 0.1934 4.37%, 0.367 8.83%, 0.5208 13.38%, 0.6555 18.04%, 0.7714 22.82%, 0.8688 27.73%, 0.9485 32.81%, 1.0108 38.08%, 1.051 42.81%, 1.079 47.75%, 1.0951 52.97%, 1.0998 58.55%, 1.0954 63.36%, 1.0837 68.73%, 1.0119 90.98%, 1.0029 95.69%, 1 );
|
|
30
|
-
|
|
31
|
-
--timing-bounce: linear( 0, 0.0078, 0, 0.0235, 0.0313, 0.0235, 0.0001 13.63%, 0.0549 15.92%, 0.0938, 0.1172, 0.125, 0.1172, 0.0939 27.26%, 0.0554 29.51%, 0.0003 31.82%, 0.2192, 0.3751 40.91%, 0.4332, 0.4734 45.8%, 0.4947 48.12%, 0.5027 51.35%, 0.5153 53.19%, 0.5437, 0.5868 57.58%, 0.6579, 0.7504 62.87%, 0.9999 68.19%, 0.9453, 0.9061, 0.8828, 0.875, 0.8828, 0.9063, 0.9451 84.08%, 0.9999 86.37%, 0.9765, 0.9688, 0.9765, 1, 0.9922, 1 );
|
|
32
|
-
--timing-bounce-in: linear( 0, 0.0117, 0.0156, 0.0117, 0, 0.0273, 0.0468, 0.0586, 0.0625, 0.0586, 0.0468, 0.0273, 0 27.27%, 0.1093, 0.1875 36.36%, 0.2148, 0.2343, 0.2461, 0.25, 0.2461, 0.2344, 0.2148 52.28%, 0.1875 54.55%, 0.1095, 0, 0.2341, 0.4375, 0.6092, 0.75, 0.8593, 0.9375 90.91%, 0.9648, 0.9843, 0.9961, 1 );
|
|
33
|
-
--timing-bounce-out: linear( 0, 0.0039, 0.0157, 0.0352, 0.0625 9.09%, 0.1407, 0.25, 0.3908, 0.5625, 0.7654, 1, 0.8907, 0.8125 45.45%, 0.7852, 0.7657, 0.7539, 0.75, 0.7539, 0.7657, 0.7852, 0.8125 63.64%, 0.8905, 1 72.73%, 0.9727, 0.9532, 0.9414, 0.9375, 0.9414, 0.9531, 0.9726, 1, 0.9883, 0.9844, 0.9883, 1 );
|
|
34
|
-
|
|
35
|
-
--timing-circ: linear( -0, 0.0033 5.75%, 0.0132 11.43%, 0.0296 16.95%, 0.0522 22.25%, 0.0808 27.25%, 0.1149 31.89%, 0.1542 36.11%, 0.1981 39.85%, 0.2779 44.79%, 0.3654 48.15%, 0.4422 49.66%, 0.5807 50.66%, 0.6769 53.24%, 0.7253 55.37%, 0.7714 58.01%, 0.8142 61.11%, 0.8536 64.65%, 0.9158 72.23%, 0.9619 80.87%, 0.9904 90.25%, 1 );
|
|
36
|
-
--timing-circ-in: linear( -0, 0.0048 9.8%, 0.0192 19.5%, 0.043 29.02%, 0.0761 38.26%, 0.1181 47.13%, 0.1685 55.56%, 0.227 63.44%, 0.2929 70.71%, 0.3656 77.3%, 0.4445 83.15%, 0.5285 88.19%, 0.6173 92.39%, 0.7099 95.7%, 0.805 98.08%, 0.9021 99.52%, 1 );
|
|
37
|
-
--timing-circ-out: linear( 0, 0.0979 0.48%, 0.195 1.92%, 0.2901 4.3%, 0.3827 7.61%, 0.4715 11.81%, 0.5555 16.85%, 0.6344 22.7%, 0.7071 29.29%, 0.773 36.56%, 0.8315 44.44%, 0.8819 52.87%, 0.9239 61.74%, 0.957 70.98%, 0.9808 80.5%, 0.9952 90.2%, 1 );
|
|
38
|
-
|
|
39
|
-
--timing-elastic: linear( 0, -0.0028 13.88%, 0.0081 21.23%, 0.002 23.37%, -0.0208 27.14%, -0.023 28.64%, -0.0178, -0.0061 30.83%, 0.0588 34.64%, 0.0651 35.39%, 0.0653 36.07%, 0.0514, 0.0184 38.3%, -0.1687 42.21%, -0.1857 43.04%, -0.181 43.8%, -0.1297 44.93%, -0.0201 46.08%, 1.0518 54.2%, 1.1471, 1.1853 56.48%, 1.1821 57.25%, 1.1573 58.11%, 0.9709 62%, 0.9458, 0.9347 63.92%, 0.9349 64.61%, 0.9412 65.36%, 1.0061 69.17%, 1.0178, 1.023 71.36%, 1.0208 72.86%, 0.998 76.63%, 0.9919 78.77%, 1.0028 86.12%, 1 );
|
|
40
|
-
--timing-elastic-in: linear( 0, 0.0019 13.34%, -0.0056 27.76%, -0.0012 31.86%, 0.0147 39.29%, 0.0161 42.46%, 0.0039 46.74%, -0.0416 54.3%, -0.046 57.29%, -0.0357, -0.0122 61.67%, 0.1176 69.29%, 0.1302 70.79%, 0.1306 72.16%, 0.1088 74.09%, 0.059 75.99%, -0.0317 78.19%, -0.3151 83.8%, -0.3643 85.52%, -0.3726, -0.3705 87.06%, -0.3463, -0.2959 89.3%, -0.1144 91.51%, 0.7822 97.9%, 1 );
|
|
41
|
-
--timing-elastic-out: linear( 0, 0.2178 2.1%, 1.1144 8.49%, 1.2959 10.7%, 1.3463 11.81%, 1.3705 12.94%, 1.3726, 1.3643 14.48%, 1.3151 16.2%, 1.0317 21.81%, 0.941 24.01%, 0.8912 25.91%, 0.8694 27.84%, 0.8698 29.21%, 0.8824 30.71%, 1.0122 38.33%, 1.0357, 1.046 42.71%, 1.0416 45.7%, 0.9961 53.26%, 0.9839 57.54%, 0.9853 60.71%, 1.0012 68.14%, 1.0056 72.24%, 0.9981 86.66%, 1 );
|
|
42
|
-
|
|
43
|
-
--timing-expo: linear( 0, 0.0053 17.18%, 0.0195 26.59%, 0.0326 30.31%, 0.0506 33.48%, 0.0744 36.25%, 0.1046 38.71%, 0.1798 42.62%, 0.2846 45.93%, 0.3991 48.37%, 0.6358 52.29%, 0.765 55.45%, 0.8622 59.3%, 0.8986 61.51%, 0.9279 63.97%, 0.9481 66.34%, 0.9641 69.01%, 0.9856 75.57%, 0.9957 84.37%, 1 );
|
|
44
|
-
--timing-expo-in: linear( 0, 0.0085 31.26%, 0.0167 40.94%, 0.0289 48.86%, 0.0471 55.92%, 0.0717 61.99%, 0.1038 67.32%, 0.1443 72.07%, 0.1989 76.7%, 0.2659 80.89%, 0.3465 84.71%, 0.4419 88.22%, 0.554 91.48%, 0.6835 94.51%, 0.8316 97.34%, 1 );
|
|
45
|
-
--timing-expo-out: linear( 0, 0.1684 2.66%, 0.3165 5.49%, 0.446 8.52%, 0.5581 11.78%, 0.6535 15.29%, 0.7341 19.11%, 0.8011 23.3%, 0.8557 27.93%, 0.8962 32.68%, 0.9283 38.01%, 0.9529 44.08%, 0.9711 51.14%, 0.9833 59.06%, 0.9915 68.74%, 1 );
|
|
46
|
-
|
|
47
|
-
--timing-none: linear(0, 1);
|
|
48
|
-
|
|
49
|
-
--timing-power1: linear( 0, 0.0027, 0.0106 7.29%, 0.0425, 0.0957, 0.1701 29.16%, 0.2477, 0.3401 41.23%, 0.5982 55.18%, 0.7044 61.56%, 0.7987, 0.875 75%, 0.9297, 0.9687, 0.9922, 1 );
|
|
50
|
-
--timing-power1-in: linear( 0, 0.0039, 0.0156, 0.0352, 0.0625, 0.0977, 0.1407, 0.1914, 0.2499, 0.3164, 0.3906 62.5%, 0.5625, 0.7656, 1 );
|
|
51
|
-
--timing-power1-out: linear( 0, 0.2342, 0.4374, 0.6093 37.49%, 0.6835, 0.7499, 0.8086, 0.8593, 0.9023, 0.9375, 0.9648, 0.9844, 0.9961, 1 );
|
|
52
|
-
|
|
53
|
-
--timing-power2: linear( 0, 0.0036 9.62%, 0.0185 16.66%, 0.0489 23.03%, 0.0962 28.86%, 0.1705 34.93%, 0.269 40.66%, 0.3867 45.89%, 0.5833 52.95%, 0.683 57.05%, 0.7829 62.14%, 0.8621 67.46%, 0.8991 70.68%, 0.9299 74.03%, 0.9545 77.52%, 0.9735 81.21%, 0.9865 85%, 0.9949 89.15%, 1 );
|
|
54
|
-
--timing-power2-in: linear( 0, 0.0014 11.11%, 0.0071 19.24%, 0.0188 26.6%, 0.037 33.33%, 0.0634 39.87%, 0.0978 46.07%, 0.1407 52.02%, 0.1925 57.74%, 0.2559 63.49%, 0.3295 69.07%, 0.4135 74.5%, 0.5083 79.81%, 0.6141 85%, 0.7312 90.09%, 1 );
|
|
55
|
-
--timing-power2-out: linear( 0, 0.2688 9.91%, 0.3859 15%, 0.4917 20.19%, 0.5865 25.5%, 0.6705 30.93%, 0.7441 36.51%, 0.8075 42.26%, 0.8593 47.98%, 0.9022 53.93%, 0.9366 60.13%, 0.963 66.67%, 0.9812 73.4%, 0.9929 80.76%, 0.9986 88.89%, 1 );
|
|
56
|
-
|
|
57
|
-
--timing-power3: linear( 0, 0.0029 13.8%, 0.0184 21.9%, 0.0339 25.51%, 0.0551 28.81%, 0.0827 31.88%, 0.1168 34.76%, 0.1962 39.57%, 0.3005 44.02%, 0.4084 47.53%, 0.6242 53.45%, 0.7493 57.93%, 0.8495 62.97%, 0.8888 65.67%, 0.9213 68.51%, 0.9629 73.9%, 0.9876 80.16%, 0.998 87.5%, 1 );
|
|
58
|
-
--timing-power3-in: linear( 0, 0.0039 25%, 0.0117 32.89%, 0.0248 39.68%, 0.0457 46.22%, 0.0743 52.21%, 0.1113 57.77%, 0.1575 63%, 0.218 68.33%, 0.2901 73.39%, 0.3745 78.23%, 0.4718 82.88%, 0.5827 87.37%, 0.7074 91.71%, 0.8462 95.91%, 1 );
|
|
59
|
-
--timing-power3-out: linear( 0, 0.1538 4.09%, 0.2926 8.29%, 0.4173 12.63%, 0.5282 17.12%, 0.6255 21.77%, 0.7099 26.61%, 0.782 31.67%, 0.8425 37%, 0.8887 42.23%, 0.9257 47.79%, 0.9543 53.78%, 0.9752 60.32%, 0.9883 67.11%, 0.9961 75%, 1 );
|
|
60
|
-
|
|
61
|
-
--timing-power4: linear( 0, 0.0012 14.95%, 0.0089 22.36%, 0.0297 28.43%, 0.0668 33.43%, 0.0979 36.08%, 0.1363 38.55%, 0.2373 43.07%, 0.3675 47.01%, 0.5984 52.15%, 0.7121 55.23%, 0.8192 59.21%, 0.898 63.62%, 0.9297 66.23%, 0.9546 69.06%, 0.9733 72.17%, 0.9864 75.67%, 0.9982 83.73%, 1 );
|
|
62
|
-
--timing-power4-in: linear( 0, 0.0024 29.91%, 0.008 38.03%, 0.0179 44.72%, 0.035 51.16%, 0.0595 56.88%, 0.0922 62.08%, 0.1338 66.88%, 0.1914 71.85%, 0.262 76.5%, 0.3461 80.88%, 0.4447 85.04%, 0.5587 89.01%, 0.689 92.82%, 0.8359 96.48%, 1 );
|
|
63
|
-
--timing-power4-out: linear( 0, 0.1641 3.52%, 0.311 7.18%, 0.4413 10.99%, 0.5553 14.96%, 0.6539 19.12%, 0.738 23.5%, 0.8086 28.15%, 0.8662 33.12%, 0.9078 37.92%, 0.9405 43.12%, 0.965 48.84%, 0.9821 55.28%, 0.992 61.97%, 0.9976 70.09%, 1 );
|
|
64
|
-
|
|
65
|
-
--timing-quad: linear( 0, 0.0027, 0.0106 7.29%, 0.0425, 0.0957, 0.1701 29.16%, 0.2477, 0.3401 41.23%, 0.5982 55.18%, 0.7044 61.56%, 0.7987, 0.875 75%, 0.9297, 0.9687, 0.9922, 1 );
|
|
66
|
-
--timing-quad-in: linear( 0, 0.0039, 0.0156, 0.0352, 0.0625, 0.0977, 0.1407, 0.1914, 0.2499, 0.3164, 0.3906 62.5%, 0.5625, 0.7656, 1 );
|
|
67
|
-
--timing-quad-out: linear( 0, 0.2342, 0.4374, 0.6093 37.49%, 0.6835, 0.7499, 0.8086, 0.8593, 0.9023, 0.9375, 0.9648, 0.9844, 0.9961, 1 );
|
|
21
|
+
--transition-duration: #{lib.map-get(tokens.$transition, 'duration')};
|
|
22
|
+
--transition-timing-function: #{lib.map-get(tokens.$transition, 'timing-function')};
|
|
23
|
+
}
|
|
68
24
|
|
|
69
|
-
|
|
70
|
-
--
|
|
71
|
-
--
|
|
25
|
+
* {
|
|
26
|
+
--border-radius: calc(1em / 1.618);
|
|
27
|
+
--gap: calc(1em / 1.618);
|
|
28
|
+
--gap-horizontal: var(--gap);
|
|
29
|
+
--gap-vertical: var(--gap);
|
|
30
|
+
--letter-spacing: clamp(-0.022em, calc(0.060542rem - 0.051418em), 0em);
|
|
31
|
+
--line-height: clamp(1.128em, calc(0.95em + 0.668rem), 1.618em);
|
|
32
|
+
--padding-horizontal: 1em;
|
|
33
|
+
--padding-vertical: calc(1em * 1.272 / (1.618 * 1.618));
|
|
72
34
|
}
|
|
73
35
|
|
|
74
|
-
|
|
75
|
-
|
|
36
|
+
b,
|
|
37
|
+
strong {
|
|
38
|
+
--color: var(--color-text-400);
|
|
39
|
+
--font-weight: var(--font-weight-500);
|
|
76
40
|
}
|
|
77
41
|
|
|
78
|
-
h1, h2, h3, h4
|
|
42
|
+
h1, h2, h3, h4 {
|
|
79
43
|
--color: var(--color-text-400);
|
|
80
44
|
--font-weight: var(--font-weight-500);
|
|
81
|
-
--line-height: var(--line-height-300);
|
|
82
45
|
}
|
|
83
46
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
47
|
+
h1 {
|
|
48
|
+
--font-size: var(--font-size-800);
|
|
49
|
+
}
|
|
87
50
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
51
|
+
h2 {
|
|
52
|
+
--font-size: var(--font-size-700);
|
|
53
|
+
}
|
|
92
54
|
|
|
93
|
-
|
|
55
|
+
h3 {
|
|
56
|
+
--font-size: var(--font-size-600);
|
|
94
57
|
}
|
|
95
58
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
59
|
+
h4 {
|
|
60
|
+
--font-size: var(--font-size-500);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
h5 {
|
|
64
|
+
--font-size: var(--font-size-400);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
section {
|
|
68
|
+
--width: 100%;
|
|
100
69
|
}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import { html, type Renderable, type Attributes } from '@esportsplus/template';
|
|
1
|
+
import { component, html, type Renderable, type Attributes } from '@esportsplus/template';
|
|
2
2
|
import { reactive } from '@esportsplus/reactivity';
|
|
3
3
|
import { EMPTY_ARRAY, omit, toArray } from '@esportsplus/utilities';
|
|
4
4
|
import form from '~/components/form';
|
|
5
|
-
import root from '~/components/root';
|
|
6
|
-
import scrollbar, { Attributes as Attr } from '~/components/scrollbar';
|
|
7
|
-
import template from '~/components/template';
|
|
8
5
|
import './scss/index.scss';
|
|
9
6
|
|
|
10
7
|
|
|
@@ -12,8 +9,6 @@ const OMIT = [
|
|
|
12
9
|
'arrow',
|
|
13
10
|
'options',
|
|
14
11
|
'option',
|
|
15
|
-
'scrollbar',
|
|
16
|
-
'scrollbar-container-content',
|
|
17
12
|
'tooltip-content',
|
|
18
13
|
];
|
|
19
14
|
|
|
@@ -22,8 +17,6 @@ type A = {
|
|
|
22
17
|
arrow?: Attributes;
|
|
23
18
|
options: Record<number | string, Renderable<unknown> | { content: Renderable<unknown>, selected: Renderable<unknown> }>;
|
|
24
19
|
option?: Attributes;
|
|
25
|
-
scrollbar?: Attributes;
|
|
26
|
-
'scrollbar-container-content'?: Attributes;
|
|
27
20
|
'tooltip-content'?: Attributes & { direction?: string };
|
|
28
21
|
} & (
|
|
29
22
|
{
|
|
@@ -37,45 +30,13 @@ type A = {
|
|
|
37
30
|
selected?: number | string;
|
|
38
31
|
}
|
|
39
32
|
}
|
|
40
|
-
) & Attributes
|
|
33
|
+
) & Attributes;
|
|
41
34
|
|
|
42
35
|
|
|
43
|
-
|
|
44
|
-
sb = scrollbar.bind({
|
|
45
|
-
attributes: {
|
|
46
|
-
class: 'tooltip-content',
|
|
47
|
-
'scrollbar-container-content': {
|
|
48
|
-
class: '--flex-column'
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
function set(current: { active: boolean }, value: boolean) {
|
|
54
|
-
current.active = value;
|
|
55
|
-
|
|
56
|
-
if (value) {
|
|
57
|
-
if (previous) {
|
|
58
|
-
previous.active = false;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
previous = current;
|
|
62
|
-
root.onclick.push(() => {
|
|
63
|
-
if (previous !== current) {
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
previous = null;
|
|
68
|
-
current.active = false;
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
else if (previous === current) {
|
|
72
|
-
previous = null;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
const select = template.factory<A, (state: { active: boolean, selected?: string | number }) => Renderable<unknown>>(
|
|
36
|
+
export default component<A, (state: { active: boolean, selected?: string | number }) => Renderable<unknown>>(
|
|
77
37
|
function(this: { attributes?: Exclude<A, 'options' | 'selected' | 'state'> }, attributes: A, content) {
|
|
78
|
-
let
|
|
38
|
+
let element: HTMLElement,
|
|
39
|
+
{ options, option } = attributes,
|
|
79
40
|
state = attributes.state || reactive({
|
|
80
41
|
active: false,
|
|
81
42
|
error: '',
|
|
@@ -88,9 +49,19 @@ const select = template.factory<A, (state: { active: boolean, selected?: string
|
|
|
88
49
|
class='select tooltip ${() => state.active && '--active'}'
|
|
89
50
|
${this?.attributes && omit(this.attributes, OMIT)}
|
|
90
51
|
${omit(attributes, OMIT)}
|
|
52
|
+
onrender=${(node: HTMLElement) => element = node}
|
|
53
|
+
ondocumentclick=${(event: MouseEvent) => {
|
|
54
|
+
if (!state.active || !element?.isConnected) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
if (!element.contains(event.target as Node | null)) {
|
|
59
|
+
state.active = false;
|
|
60
|
+
}
|
|
61
|
+
}}
|
|
91
62
|
onclick=${() => {
|
|
92
63
|
if (state.render) {
|
|
93
|
-
|
|
64
|
+
state.active = !state.active;
|
|
94
65
|
}
|
|
95
66
|
|
|
96
67
|
state.render = true;
|
|
@@ -131,77 +102,77 @@ const select = template.factory<A, (state: { active: boolean, selected?: string
|
|
|
131
102
|
Object.fromEntries( keys.map(key => [key, false]) )
|
|
132
103
|
);
|
|
133
104
|
|
|
134
|
-
return
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
...
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
105
|
+
return html`
|
|
106
|
+
<div
|
|
107
|
+
class='tooltip-content --flex-column --scrollbar'
|
|
108
|
+
${{
|
|
109
|
+
...this?.attributes?.['tooltip-content'] || EMPTY_ARRAY,
|
|
110
|
+
...attributes['tooltip-content'],
|
|
111
|
+
class: [
|
|
112
|
+
...toArray(this?.attributes?.['tooltip-content']?.class),
|
|
113
|
+
...toArray(attributes['tooltip-content']?.class),
|
|
114
|
+
`tooltip-content--${attributes['tooltip-content']?.direction || 's'}`
|
|
115
|
+
],
|
|
116
|
+
inert: () => !state.active,
|
|
117
|
+
onclick: (e: Event) => {
|
|
118
|
+
let element = e.target as HTMLElement,
|
|
119
|
+
key = element.dataset?.key;
|
|
120
|
+
|
|
121
|
+
if (key === undefined) {
|
|
122
|
+
let parent;
|
|
123
|
+
|
|
124
|
+
while (parent = element.parentElement) {
|
|
125
|
+
key = parent.dataset?.key;
|
|
126
|
+
|
|
127
|
+
if (key !== undefined) {
|
|
128
|
+
break;
|
|
129
|
+
}
|
|
155
130
|
}
|
|
156
131
|
}
|
|
157
|
-
}
|
|
158
132
|
|
|
159
|
-
|
|
160
|
-
|
|
133
|
+
if (key === undefined) {
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
let previous = state.selected!;
|
|
138
|
+
|
|
139
|
+
state.active = false;
|
|
140
|
+
state.selected = key;
|
|
141
|
+
|
|
142
|
+
selected[key] = true;
|
|
143
|
+
selected[previous] = false;
|
|
144
|
+
},
|
|
145
|
+
onconnect: () => {
|
|
146
|
+
state.active = true;
|
|
147
|
+
},
|
|
148
|
+
style: [
|
|
149
|
+
...toArray(this?.attributes?.['tooltip-content']?.style),
|
|
150
|
+
...toArray(attributes['tooltip-content']?.style)
|
|
151
|
+
],
|
|
152
|
+
}}
|
|
153
|
+
>
|
|
154
|
+
${keys.map((key) => {
|
|
155
|
+
let content = options[key];
|
|
156
|
+
|
|
157
|
+
if (content !== null && typeof content === 'object' && 'content' in content) {
|
|
158
|
+
content = content.content;
|
|
161
159
|
}
|
|
162
160
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
style: [
|
|
177
|
-
...toArray(this?.attributes?.['tooltip-content']?.style),
|
|
178
|
-
...toArray(attributes['tooltip-content']?.style)
|
|
179
|
-
],
|
|
180
|
-
},
|
|
181
|
-
keys.map((key) => {
|
|
182
|
-
let content = options[key];
|
|
183
|
-
|
|
184
|
-
if (content !== null && typeof content === 'object' && 'content' in content) {
|
|
185
|
-
content = content.content;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
return html`
|
|
189
|
-
<div
|
|
190
|
-
class='link select-option ${() => selected[key] && '--active'}'
|
|
191
|
-
${this?.attributes?.option}
|
|
192
|
-
${option}
|
|
193
|
-
data-key='${key}'
|
|
194
|
-
>
|
|
195
|
-
${content}
|
|
196
|
-
</div>
|
|
197
|
-
`;
|
|
198
|
-
})
|
|
199
|
-
);
|
|
161
|
+
return html`
|
|
162
|
+
<div
|
|
163
|
+
class='link select-option ${() => selected[key] && '--active'}'
|
|
164
|
+
${this?.attributes?.option}
|
|
165
|
+
${option}
|
|
166
|
+
data-key='${key}'
|
|
167
|
+
>
|
|
168
|
+
${content}
|
|
169
|
+
</div>
|
|
170
|
+
`;
|
|
171
|
+
})}
|
|
172
|
+
</div>
|
|
173
|
+
`;
|
|
200
174
|
}}
|
|
201
175
|
</div>
|
|
202
176
|
`;
|
|
203
177
|
}
|
|
204
178
|
);
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
export default select;
|