godown 2.7.5 → 2.7.7
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 +18 -45
- package/{.deps.d.ts → _deps.d.ts} +1 -2
- package/{.deps.d.ts.map → _deps.d.ts.map} +1 -1
- package/{.deps.js → _deps.js} +1 -2
- package/_deps.js.map +1 -0
- package/alert.d.ts +8 -1
- package/alert.d.ts.map +1 -1
- package/alert.js +4 -1
- package/alert.js.map +1 -1
- package/avatar-group.d.ts +8 -1
- package/avatar-group.d.ts.map +1 -1
- package/avatar-group.js +4 -1
- package/avatar-group.js.map +1 -1
- package/avatar.d.ts +8 -1
- package/avatar.d.ts.map +1 -1
- package/avatar.js +4 -1
- package/avatar.js.map +1 -1
- package/button.d.ts +8 -1
- package/button.d.ts.map +1 -1
- package/button.js +4 -1
- package/button.js.map +1 -1
- package/card.d.ts +8 -1
- package/card.d.ts.map +1 -1
- package/card.js +4 -1
- package/card.js.map +1 -1
- package/carousel.d.ts +8 -1
- package/carousel.d.ts.map +1 -1
- package/carousel.js +4 -1
- package/carousel.js.map +1 -1
- package/components.json +194 -0
- package/conf.d.ts +6 -75
- package/conf.d.ts.map +1 -1
- package/conf.js +8 -34
- package/conf.js.map +1 -1
- package/decorators/godown.d.ts +4 -0
- package/decorators/godown.d.ts.map +1 -0
- package/decorators/godown.js +9 -0
- package/decorators/godown.js.map +1 -0
- package/decorators/part.d.ts +7 -0
- package/decorators/part.d.ts.map +1 -0
- package/decorators/part.js +8 -0
- package/decorators/part.js.map +1 -0
- package/decorators/styles.d.ts +3 -0
- package/decorators/styles.d.ts.map +1 -0
- package/decorators/styles.js +8 -0
- package/decorators/styles.js.map +1 -0
- package/details.d.ts +8 -1
- package/details.d.ts.map +1 -1
- package/details.js +4 -1
- package/details.js.map +1 -1
- package/dialog.d.ts +8 -1
- package/dialog.d.ts.map +1 -1
- package/dialog.js +4 -1
- package/dialog.js.map +1 -1
- package/divider.d.ts +8 -1
- package/divider.d.ts.map +1 -1
- package/divider.js +4 -1
- package/divider.js.map +1 -1
- package/dragbox.d.ts +8 -1
- package/dragbox.d.ts.map +1 -1
- package/dragbox.js +4 -1
- package/dragbox.js.map +1 -1
- package/flex-flow.d.ts +8 -1
- package/flex-flow.d.ts.map +1 -1
- package/flex-flow.js +4 -1
- package/flex-flow.js.map +1 -1
- package/form.d.ts +8 -1
- package/form.d.ts.map +1 -1
- package/form.js +4 -1
- package/form.js.map +1 -1
- package/grid-flow.d.ts +9 -0
- package/grid-flow.d.ts.map +1 -0
- package/grid-flow.js +5 -0
- package/grid-flow.js.map +1 -0
- package/index.d.ts +32 -3
- package/index.d.ts.map +1 -1
- package/index.js +32 -3
- package/index.js.map +1 -1
- package/input.d.ts +8 -1
- package/input.d.ts.map +1 -1
- package/input.js +4 -1
- package/input.js.map +1 -1
- package/label-input.d.ts +8 -1
- package/label-input.d.ts.map +1 -1
- package/label-input.js +4 -1
- package/label-input.js.map +1 -1
- package/layout.d.ts +9 -0
- package/layout.d.ts.map +1 -0
- package/layout.js +5 -0
- package/layout.js.map +1 -0
- package/lib/css.d.ts +13 -0
- package/lib/css.d.ts.map +1 -0
- package/lib/css.js +29 -0
- package/lib/css.js.map +1 -0
- package/lib/directives.d.ts +16 -20
- package/lib/directives.d.ts.map +1 -1
- package/lib/directives.js +33 -31
- package/lib/directives.js.map +1 -1
- package/lib/event-coll.d.ts +13 -0
- package/lib/event-coll.d.ts.map +1 -0
- package/lib/event-coll.js +45 -0
- package/lib/event-coll.js.map +1 -0
- package/lib/{templates.d.ts → icons.d.ts} +1 -17
- package/lib/icons.d.ts.map +1 -0
- package/lib/icons.js +73 -0
- package/lib/icons.js.map +1 -0
- package/lib/jsx.d.ts +4 -0
- package/lib/jsx.d.ts.map +1 -0
- package/lib/jsx.js +52 -0
- package/lib/jsx.js.map +1 -0
- package/lib/route-tree.d.ts +5 -5
- package/lib/route-tree.js +5 -5
- package/lib/route-tree.js.map +1 -1
- package/lib/utils.d.ts +6 -46
- package/lib/utils.d.ts.map +1 -1
- package/lib/utils.js +25 -110
- package/lib/utils.js.map +1 -1
- package/link.d.ts +9 -0
- package/link.d.ts.map +1 -0
- package/link.js +5 -0
- package/link.js.map +1 -0
- package/overbreath.d.ts +8 -1
- package/overbreath.d.ts.map +1 -1
- package/overbreath.js +4 -1
- package/overbreath.js.map +1 -1
- package/package.json +18 -23
- package/progress.d.ts +8 -1
- package/progress.d.ts.map +1 -1
- package/progress.js +4 -1
- package/progress.js.map +1 -1
- package/proto/godown-config.d.ts +41 -0
- package/proto/godown-config.d.ts.map +1 -0
- package/proto/godown-config.js +27 -0
- package/proto/godown-config.js.map +1 -0
- package/{godown-element.d.ts → proto/godown-element.d.ts} +48 -16
- package/proto/godown-element.d.ts.map +1 -0
- package/{godown-element.js → proto/godown-element.js} +82 -26
- package/proto/godown-element.js.map +1 -0
- package/proto/super-a.d.ts +30 -0
- package/proto/super-a.d.ts.map +1 -0
- package/proto/super-a.js +141 -0
- package/proto/super-a.js.map +1 -0
- package/proto/super-input.d.ts +44 -0
- package/proto/super-input.d.ts.map +1 -0
- package/proto/super-input.js +119 -0
- package/proto/super-input.js.map +1 -0
- package/proto/super-openable.d.ts +23 -0
- package/proto/super-openable.d.ts.map +1 -0
- package/proto/super-openable.js +43 -0
- package/proto/super-openable.js.map +1 -0
- package/range-input.d.ts +9 -0
- package/range-input.d.ts.map +1 -0
- package/range-input.js +5 -0
- package/range-input.js.map +1 -0
- package/react/create.d.ts.map +1 -1
- package/react/create.js +4 -1
- package/react/create.js.map +1 -1
- package/react/index.d.ts +64 -34
- package/react/index.d.ts.map +1 -1
- package/react/index.js +78 -51
- package/react/index.js.map +1 -1
- package/rotate.d.ts +9 -0
- package/rotate.d.ts.map +1 -0
- package/rotate.js +5 -0
- package/rotate.js.map +1 -0
- package/router-link.d.ts +9 -0
- package/router-link.d.ts.map +1 -0
- package/router-link.js +5 -0
- package/router-link.js.map +1 -0
- package/router.d.ts +8 -1
- package/router.d.ts.map +1 -1
- package/router.js +4 -1
- package/router.js.map +1 -1
- package/search-input.d.ts +8 -1
- package/search-input.d.ts.map +1 -1
- package/search-input.js +4 -1
- package/search-input.js.map +1 -1
- package/select-input.d.ts +8 -1
- package/select-input.d.ts.map +1 -1
- package/select-input.js +4 -1
- package/select-input.js.map +1 -1
- package/skeleton.d.ts +8 -1
- package/skeleton.d.ts.map +1 -1
- package/skeleton.js +4 -1
- package/skeleton.js.map +1 -1
- package/split-input.d.ts +8 -1
- package/split-input.d.ts.map +1 -1
- package/split-input.js +4 -1
- package/split-input.js.map +1 -1
- package/styles/colors/presets.d.ts +13 -0
- package/styles/colors/presets.d.ts.map +1 -0
- package/styles/colors/presets.js +6 -0
- package/styles/colors/presets.js.map +1 -0
- package/styles/colors/presetsRGB.d.ts +16 -0
- package/styles/colors/presetsRGB.d.ts.map +1 -0
- package/styles/colors/presetsRGB.js +134 -0
- package/styles/colors/presetsRGB.js.map +1 -0
- package/styles/global.d.ts +18 -0
- package/styles/global.d.ts.map +1 -0
- package/styles/global.js +78 -0
- package/styles/global.js.map +1 -0
- package/styles/inputStyle.d.ts +3 -0
- package/styles/inputStyle.d.ts.map +1 -0
- package/styles/inputStyle.js +59 -0
- package/styles/inputStyle.js.map +1 -0
- package/switch-input.d.ts +8 -1
- package/switch-input.d.ts.map +1 -1
- package/switch-input.js +4 -1
- package/switch-input.js.map +1 -1
- package/text.d.ts +8 -1
- package/text.d.ts.map +1 -1
- package/text.js +4 -1
- package/text.js.map +1 -1
- package/time.d.ts +8 -1
- package/time.d.ts.map +1 -1
- package/time.js +4 -1
- package/time.js.map +1 -1
- package/tooltip.d.ts +8 -1
- package/tooltip.d.ts.map +1 -1
- package/tooltip.js +4 -1
- package/tooltip.js.map +1 -1
- package/typewriter.d.ts +8 -1
- package/typewriter.d.ts.map +1 -1
- package/typewriter.js +4 -1
- package/typewriter.js.map +1 -1
- package/web-components/alert/alert.d.ts +2 -10
- package/web-components/alert/alert.d.ts.map +1 -1
- package/web-components/alert/alert.js +93 -91
- package/web-components/alert/alert.js.map +1 -1
- package/web-components/avatar/avatar-group.d.ts +21 -0
- package/web-components/avatar/avatar-group.d.ts.map +1 -0
- package/web-components/avatar/avatar-group.js +86 -0
- package/web-components/avatar/avatar-group.js.map +1 -0
- package/web-components/avatar/avatar.d.ts +5 -18
- package/web-components/avatar/avatar.d.ts.map +1 -1
- package/web-components/avatar/avatar.js +70 -85
- package/web-components/avatar/avatar.js.map +1 -1
- package/web-components/button/button.d.ts +10 -43
- package/web-components/button/button.d.ts.map +1 -1
- package/web-components/button/button.js +183 -226
- package/web-components/button/button.js.map +1 -1
- package/web-components/card/card.d.ts +2 -27
- package/web-components/card/card.d.ts.map +1 -1
- package/web-components/card/card.js +57 -132
- package/web-components/card/card.js.map +1 -1
- package/web-components/carousel/carousel.d.ts +5 -16
- package/web-components/carousel/carousel.d.ts.map +1 -1
- package/web-components/carousel/carousel.js +102 -106
- package/web-components/carousel/carousel.js.map +1 -1
- package/web-components/details/details.d.ts +4 -15
- package/web-components/details/details.d.ts.map +1 -1
- package/web-components/details/details.js +91 -97
- package/web-components/details/details.js.map +1 -1
- package/web-components/dialog/dialog.d.ts +6 -17
- package/web-components/dialog/dialog.d.ts.map +1 -1
- package/web-components/dialog/dialog.js +87 -137
- package/web-components/dialog/dialog.js.map +1 -1
- package/web-components/divider/divider.d.ts +13 -0
- package/web-components/divider/divider.d.ts.map +1 -0
- package/web-components/divider/divider.js +95 -0
- package/web-components/divider/divider.js.map +1 -0
- package/web-components/form/form.d.ts +15 -22
- package/web-components/form/form.d.ts.map +1 -1
- package/web-components/form/form.js +47 -117
- package/web-components/form/form.js.map +1 -1
- package/web-components/input/input.d.ts +5 -18
- package/web-components/input/input.d.ts.map +1 -1
- package/web-components/input/input.js +74 -169
- package/web-components/input/input.js.map +1 -1
- package/web-components/input/label-input.d.ts +5 -19
- package/web-components/input/label-input.d.ts.map +1 -1
- package/web-components/input/label-input.js +74 -141
- package/web-components/input/label-input.js.map +1 -1
- package/web-components/input/range-input.d.ts +53 -0
- package/web-components/input/range-input.d.ts.map +1 -0
- package/web-components/input/range-input.js +316 -0
- package/web-components/input/range-input.js.map +1 -0
- package/web-components/input/search-input.d.ts +4 -12
- package/web-components/input/search-input.d.ts.map +1 -1
- package/web-components/input/search-input.js +118 -113
- package/web-components/input/search-input.js.map +1 -1
- package/web-components/input/select-input.d.ts +17 -32
- package/web-components/input/select-input.d.ts.map +1 -1
- package/web-components/input/select-input.js +154 -286
- package/web-components/input/select-input.js.map +1 -1
- package/web-components/input/split-input.d.ts +8 -15
- package/web-components/input/split-input.d.ts.map +1 -1
- package/web-components/input/split-input.js +82 -72
- package/web-components/input/split-input.js.map +1 -1
- package/web-components/input/switch-input.d.ts +8 -17
- package/web-components/input/switch-input.d.ts.map +1 -1
- package/web-components/input/switch-input.js +122 -158
- package/web-components/input/switch-input.js.map +1 -1
- package/web-components/layout/flex-flow.d.ts +11 -19
- package/web-components/layout/flex-flow.d.ts.map +1 -1
- package/web-components/layout/flex-flow.js +57 -35
- package/web-components/layout/flex-flow.js.map +1 -1
- package/web-components/layout/grid-flow.d.ts +14 -0
- package/web-components/layout/grid-flow.d.ts.map +1 -0
- package/web-components/layout/grid-flow.js +56 -0
- package/web-components/layout/grid-flow.js.map +1 -0
- package/web-components/layout/layout.d.ts +18 -0
- package/web-components/layout/layout.d.ts.map +1 -0
- package/web-components/layout/layout.js +76 -0
- package/web-components/layout/layout.js.map +1 -0
- package/web-components/link/link.d.ts +10 -0
- package/web-components/link/link.d.ts.map +1 -0
- package/web-components/link/link.js +17 -0
- package/web-components/link/link.js.map +1 -0
- package/web-components/link/router-link.d.ts +19 -0
- package/web-components/link/router-link.d.ts.map +1 -0
- package/web-components/link/router-link.js +60 -0
- package/web-components/link/router-link.js.map +1 -0
- package/web-components/progress/progress.d.ts +2 -12
- package/web-components/progress/progress.d.ts.map +1 -1
- package/web-components/progress/progress.js +52 -48
- package/web-components/progress/progress.js.map +1 -1
- package/web-components/router/router.d.ts +15 -21
- package/web-components/router/router.d.ts.map +1 -1
- package/web-components/router/router.js +35 -37
- package/web-components/router/router.js.map +1 -1
- package/web-components/skeleton/skeleton.d.ts +5 -12
- package/web-components/skeleton/skeleton.d.ts.map +1 -1
- package/web-components/skeleton/skeleton.js +90 -98
- package/web-components/skeleton/skeleton.js.map +1 -1
- package/web-components/text/overbreath.d.ts +15 -20
- package/web-components/text/overbreath.d.ts.map +1 -1
- package/web-components/text/overbreath.js +108 -202
- package/web-components/text/overbreath.js.map +1 -1
- package/web-components/text/text.d.ts +5 -18
- package/web-components/text/text.d.ts.map +1 -1
- package/web-components/text/text.js +70 -80
- package/web-components/text/text.js.map +1 -1
- package/web-components/text/time.d.ts +5 -14
- package/web-components/text/time.d.ts.map +1 -1
- package/web-components/text/time.js +32 -31
- package/web-components/text/time.js.map +1 -1
- package/web-components/text/typewriter.d.ts +3 -11
- package/web-components/text/typewriter.d.ts.map +1 -1
- package/web-components/text/typewriter.js +42 -40
- package/web-components/text/typewriter.js.map +1 -1
- package/web-components/tooltip/tooltip.d.ts +21 -17
- package/web-components/tooltip/tooltip.d.ts.map +1 -1
- package/web-components/tooltip/tooltip.js +98 -60
- package/web-components/tooltip/tooltip.js.map +1 -1
- package/web-components/wrapper/dragbox.d.ts +5 -10
- package/web-components/wrapper/dragbox.d.ts.map +1 -1
- package/web-components/wrapper/dragbox.js +40 -31
- package/web-components/wrapper/dragbox.js.map +1 -1
- package/web-components/wrapper/rotate.d.ts +30 -0
- package/web-components/wrapper/rotate.d.ts.map +1 -0
- package/web-components/wrapper/rotate.js +92 -0
- package/web-components/wrapper/rotate.js.map +1 -0
- package/.deps.js.map +0 -1
- package/a.d.ts +0 -2
- package/a.d.ts.map +0 -1
- package/a.js +0 -2
- package/a.js.map +0 -1
- package/clip.d.ts +0 -2
- package/clip.d.ts.map +0 -1
- package/clip.js +0 -2
- package/clip.js.map +0 -1
- package/decorators/define.d.ts +0 -7
- package/decorators/define.d.ts.map +0 -1
- package/decorators/define.js +0 -11
- package/decorators/define.js.map +0 -1
- package/details-group.d.ts +0 -2
- package/details-group.d.ts.map +0 -1
- package/details-group.js +0 -2
- package/details-group.js.map +0 -1
- package/godown-element.d.ts.map +0 -1
- package/godown-element.js.map +0 -1
- package/lib/event-collection.d.ts +0 -14
- package/lib/event-collection.d.ts.map +0 -1
- package/lib/event-collection.js +0 -71
- package/lib/event-collection.js.map +0 -1
- package/lib/templates.d.ts.map +0 -1
- package/lib/templates.js +0 -76
- package/lib/templates.js.map +0 -1
- package/naming.d.ts +0 -91
- package/naming.d.ts.map +0 -1
- package/naming.js +0 -67
- package/naming.js.map +0 -1
- package/nav-layout.d.ts +0 -2
- package/nav-layout.d.ts.map +0 -1
- package/nav-layout.js +0 -2
- package/nav-layout.js.map +0 -1
- package/open-offset.d.ts +0 -2
- package/open-offset.d.ts.map +0 -1
- package/open-offset.js +0 -2
- package/open-offset.js.map +0 -1
- package/router-a.d.ts +0 -2
- package/router-a.d.ts.map +0 -1
- package/router-a.js +0 -2
- package/router-a.js.map +0 -1
- package/supers/anchor.d.ts +0 -26
- package/supers/anchor.d.ts.map +0 -1
- package/supers/anchor.js +0 -124
- package/supers/anchor.js.map +0 -1
- package/supers/input.d.ts +0 -28
- package/supers/input.d.ts.map +0 -1
- package/supers/input.js +0 -117
- package/supers/input.js.map +0 -1
- package/supers/openable.d.ts +0 -38
- package/supers/openable.d.ts.map +0 -1
- package/supers/openable.js +0 -77
- package/supers/openable.js.map +0 -1
- package/supers/root.d.ts +0 -18
- package/supers/root.d.ts.map +0 -1
- package/supers/root.js +0 -76
- package/supers/root.js.map +0 -1
- package/tabs.d.ts +0 -2
- package/tabs.d.ts.map +0 -1
- package/tabs.js +0 -2
- package/tabs.js.map +0 -1
- package/web-components/a/a.d.ts +0 -16
- package/web-components/a/a.d.ts.map +0 -1
- package/web-components/a/a.js +0 -17
- package/web-components/a/a.js.map +0 -1
- package/web-components/group/avatar-group.d.ts +0 -29
- package/web-components/group/avatar-group.d.ts.map +0 -1
- package/web-components/group/avatar-group.js +0 -88
- package/web-components/group/avatar-group.js.map +0 -1
- package/web-components/group/details-group.d.ts +0 -28
- package/web-components/group/details-group.d.ts.map +0 -1
- package/web-components/group/details-group.js +0 -59
- package/web-components/group/details-group.js.map +0 -1
- package/web-components/index.d.ts +0 -35
- package/web-components/index.d.ts.map +0 -1
- package/web-components/index.js +0 -35
- package/web-components/index.js.map +0 -1
- package/web-components/layout/divider.d.ts +0 -22
- package/web-components/layout/divider.d.ts.map +0 -1
- package/web-components/layout/divider.js +0 -85
- package/web-components/layout/divider.js.map +0 -1
- package/web-components/layout/nav-layout.d.ts +0 -38
- package/web-components/layout/nav-layout.d.ts.map +0 -1
- package/web-components/layout/nav-layout.js +0 -69
- package/web-components/layout/nav-layout.js.map +0 -1
- package/web-components/offset/open-offset.d.ts +0 -27
- package/web-components/offset/open-offset.d.ts.map +0 -1
- package/web-components/offset/open-offset.js +0 -130
- package/web-components/offset/open-offset.js.map +0 -1
- package/web-components/router/router-a.d.ts +0 -25
- package/web-components/router/router-a.d.ts.map +0 -1
- package/web-components/router/router-a.js +0 -70
- package/web-components/router/router-a.js.map +0 -1
- package/web-components/tabs/tabs.d.ts +0 -52
- package/web-components/tabs/tabs.d.ts.map +0 -1
- package/web-components/tabs/tabs.js +0 -165
- package/web-components/tabs/tabs.js.map +0 -1
- package/web-components/text/clip.d.ts +0 -22
- package/web-components/text/clip.d.ts.map +0 -1
- package/web-components/text/clip.js +0 -45
- package/web-components/text/clip.js.map +0 -1
- package/web-components/wrapper/wrapper.d.ts +0 -27
- package/web-components/wrapper/wrapper.d.ts.map +0 -1
- package/web-components/wrapper/wrapper.js +0 -95
- package/web-components/wrapper/wrapper.js.map +0 -1
- package/wrapper.d.ts +0 -2
- package/wrapper.d.ts.map +0 -1
- package/wrapper.js +0 -2
- package/wrapper.js.map +0 -1
@@ -1,14 +1,21 @@
|
|
1
1
|
import { __decorate } from "tslib";
|
2
|
-
import { css, html, property, state } from "
|
3
|
-
import {
|
4
|
-
import {
|
5
|
-
import {
|
6
|
-
|
7
|
-
|
2
|
+
import { css, html, property, state } from "../../_deps.js";
|
3
|
+
import { godown } from "../../decorators/godown.js";
|
4
|
+
import { styles } from "../../decorators/styles.js";
|
5
|
+
import { ifValue } from "../../lib/directives.js";
|
6
|
+
import { htmlSlot } from "../../lib/directives.js";
|
7
|
+
import { svgImage } from "../../lib/icons.js";
|
8
|
+
import { GodownElement } from "../../proto/godown-element.js";
|
9
|
+
import { createScope, cssGlobalVars } from "../../styles/global.js";
|
10
|
+
const protoName = "skeleton";
|
11
|
+
const cssScope = createScope(protoName);
|
8
12
|
/**
|
9
13
|
* {@linkcode Skeleton} renders a skeleton screen.
|
10
14
|
*
|
11
15
|
* Inspired by Ant-design.
|
16
|
+
*
|
17
|
+
* @slot loading - The content if loading is true.
|
18
|
+
* @slot - The content if loading is false.
|
12
19
|
*/
|
13
20
|
let Skeleton = class Skeleton extends GodownElement {
|
14
21
|
constructor() {
|
@@ -27,100 +34,14 @@ let Skeleton = class Skeleton extends GodownElement {
|
|
27
34
|
this.loading = true;
|
28
35
|
}
|
29
36
|
render() {
|
30
|
-
if (this.loading) {
|
31
|
-
return
|
32
|
-
}
|
33
|
-
return htmlSlot();
|
34
|
-
}
|
35
|
-
renderIcon() {
|
36
|
-
switch (this.type) {
|
37
|
-
case "text":
|
38
|
-
return htmlSlot("icon");
|
39
|
-
case "image":
|
40
|
-
return svgImage();
|
37
|
+
if (!this.loading) {
|
38
|
+
return htmlSlot();
|
41
39
|
}
|
40
|
+
return html `<div part="root" class="${this.animation}">
|
41
|
+
${ifValue(this.type === "image", svgImage(), htmlSlot("loading"))}
|
42
|
+
</div>`;
|
42
43
|
}
|
43
44
|
};
|
44
|
-
Skeleton.styles = [
|
45
|
-
GodownElement.styles,
|
46
|
-
css `
|
47
|
-
:host {
|
48
|
-
display: block;
|
49
|
-
min-height: 1.5em;
|
50
|
-
width: 100%;
|
51
|
-
overflow: hidden;
|
52
|
-
${cssvarScope}--from: rgb(var(${cssvarValues.textRGB}) / 7.5%);
|
53
|
-
${cssvarScope}--to: rgb(var(${cssvarValues.textRGB}) / 20%);
|
54
|
-
${cssvarScope}--deg: 94deg;
|
55
|
-
${cssvarScope}--color: rgb(var(${cssvarValues.textRGB}) / 50%);
|
56
|
-
${cssvarScope}--background: var(${cssvarValues.main});
|
57
|
-
${cssvarScope}--duration: 1.5s;
|
58
|
-
${cssvarScope}--icon-width: 5em;
|
59
|
-
${cssvarScope}--icon-height: 5em;
|
60
|
-
${cssvarScope}--icon-margin: .75em;
|
61
|
-
color: var(${cssvarScope}--color);
|
62
|
-
background: var(${cssvarScope}--background);
|
63
|
-
}
|
64
|
-
|
65
|
-
p {
|
66
|
-
height: 100%;
|
67
|
-
min-height: inherit;
|
68
|
-
animation: var(${cssvarScope}--duration) ease-in-out 0s infinite none running;
|
69
|
-
}
|
70
|
-
|
71
|
-
p.position {
|
72
|
-
background-image: linear-gradient(var(${cssvarScope}--deg), var(${cssvarScope}--from) 36%, var(${cssvarScope}--to) 50%, var(${cssvarScope}--from) 64%);
|
73
|
-
background-color: transparent;
|
74
|
-
background-size: 200% 100%;
|
75
|
-
animation-name: po;
|
76
|
-
}
|
77
|
-
|
78
|
-
@keyframes po {
|
79
|
-
from {
|
80
|
-
background-position: 150% center;
|
81
|
-
}
|
82
|
-
to {
|
83
|
-
background-position: -50% center;
|
84
|
-
}
|
85
|
-
}
|
86
|
-
|
87
|
-
p.opacity {
|
88
|
-
background: var(${cssvarScope}--from);
|
89
|
-
animation-name: op;
|
90
|
-
animation-direction: alternate;
|
91
|
-
}
|
92
|
-
|
93
|
-
@keyframes op {
|
94
|
-
50% {
|
95
|
-
opacity: 0.2;
|
96
|
-
}
|
97
|
-
to {
|
98
|
-
opacity: 1;
|
99
|
-
}
|
100
|
-
}
|
101
|
-
|
102
|
-
path {
|
103
|
-
fill: var(${cssvarScope}--color);
|
104
|
-
}
|
105
|
-
|
106
|
-
svg,
|
107
|
-
slot {
|
108
|
-
width: var(${cssvarScope}--icon-width);
|
109
|
-
height: var(${cssvarScope}--icon-height);
|
110
|
-
}
|
111
|
-
|
112
|
-
svg {
|
113
|
-
margin: var(${cssvarScope}--icon-margin);
|
114
|
-
}
|
115
|
-
|
116
|
-
p,
|
117
|
-
svg {
|
118
|
-
display: flex;
|
119
|
-
align-items: center;
|
120
|
-
justify-content: center;
|
121
|
-
}
|
122
|
-
`,
|
123
|
-
];
|
124
45
|
__decorate([
|
125
46
|
property()
|
126
47
|
], Skeleton.prototype, "type", void 0);
|
@@ -131,7 +52,78 @@ __decorate([
|
|
131
52
|
state()
|
132
53
|
], Skeleton.prototype, "loading", void 0);
|
133
54
|
Skeleton = __decorate([
|
134
|
-
|
55
|
+
godown(protoName),
|
56
|
+
styles([
|
57
|
+
css `
|
58
|
+
:host {
|
59
|
+
--${cssScope}--from: rgb(var(--${cssGlobalVars.foregroundRGB}) / 7.5%);
|
60
|
+
--${cssScope}--to: rgb(var(--${cssGlobalVars.foregroundRGB}) / 22%);
|
61
|
+
--${cssScope}--deg: 94deg;
|
62
|
+
--${cssScope}--color: rgb(var(--${cssGlobalVars.foregroundRGB}) / 50%);
|
63
|
+
--${cssScope}--background: var(--${cssGlobalVars.background});
|
64
|
+
--${cssScope}--duration: 1.5s;
|
65
|
+
--${cssScope}--icon-width: 5em;
|
66
|
+
--${cssScope}--icon-height: 5em;
|
67
|
+
--${cssScope}--icon-margin: .75em;
|
68
|
+
color: var(--${cssScope}--color);
|
69
|
+
background: var(--${cssScope}--background);
|
70
|
+
min-height: 1.5em;
|
71
|
+
width: 100%;
|
72
|
+
flex-shrink: 0;
|
73
|
+
display: block;
|
74
|
+
overflow: hidden;
|
75
|
+
}
|
76
|
+
|
77
|
+
[part="root"] {
|
78
|
+
height: 100%;
|
79
|
+
min-height: inherit;
|
80
|
+
text-align: center;
|
81
|
+
animation: var(--${cssScope}--duration) ease-in-out 0s infinite none running;
|
82
|
+
}
|
83
|
+
|
84
|
+
svg {
|
85
|
+
width: var(--${cssScope}--icon-width);
|
86
|
+
height: var(--${cssScope}--icon-height);
|
87
|
+
margin: var(--${cssScope}--icon-margin);
|
88
|
+
}
|
89
|
+
|
90
|
+
.position {
|
91
|
+
background-image: linear-gradient(
|
92
|
+
var(--${cssScope}--deg),
|
93
|
+
var(--${cssScope}--from) 36%,
|
94
|
+
var(--${cssScope}--to) 50%,
|
95
|
+
var(--${cssScope}--from) 64%
|
96
|
+
);
|
97
|
+
background-color: transparent;
|
98
|
+
background-size: 200% 100%;
|
99
|
+
animation-name: po;
|
100
|
+
}
|
101
|
+
|
102
|
+
@keyframes po {
|
103
|
+
from {
|
104
|
+
background-position: 150% center;
|
105
|
+
}
|
106
|
+
to {
|
107
|
+
background-position: -50% center;
|
108
|
+
}
|
109
|
+
}
|
110
|
+
|
111
|
+
.opacity {
|
112
|
+
background: var(--${cssScope}--from);
|
113
|
+
animation-name: op;
|
114
|
+
animation-direction: alternate;
|
115
|
+
}
|
116
|
+
|
117
|
+
@keyframes op {
|
118
|
+
50% {
|
119
|
+
opacity: 0.2;
|
120
|
+
}
|
121
|
+
to {
|
122
|
+
opacity: 1;
|
123
|
+
}
|
124
|
+
}
|
125
|
+
`,
|
126
|
+
])
|
135
127
|
], Skeleton);
|
136
128
|
export { Skeleton };
|
137
129
|
export default Skeleton;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"skeleton.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/skeleton/skeleton.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,
|
1
|
+
{"version":3,"file":"skeleton.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/skeleton/skeleton.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEpE,MAAM,SAAS,GAAG,UAAU,CAAC;AAC7B,MAAM,QAAQ,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC;AAExC;;;;;;;GAOG;AAyEI,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,aAAa;IAApC;;QACL;;WAEG;QACS,SAAI,GAAqB,MAAM,CAAC;QAC5C;;WAEG;QACS,cAAS,GAA2B,UAAU,CAAC;QAC3D;;WAEG;QACM,YAAO,GAAG,IAAI,CAAC;IAU1B,CAAC;IARW,MAAM;QACd,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YAClB,OAAO,QAAQ,EAAE,CAAC;QACpB,CAAC;QACD,OAAO,IAAI,CAAA,2BAA2B,IAAI,CAAC,SAAS;QAChD,OAAO,CAAC,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE,QAAQ,EAAE,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC;WAC5D,CAAC;IACV,CAAC;CACF,CAAA;AAlBa;IAAX,QAAQ,EAAE;sCAAiC;AAIhC;IAAX,QAAQ,EAAE;2CAAgD;AAIlD;IAAR,KAAK,EAAE;yCAAgB;AAZb,QAAQ;IAxEpB,MAAM,CAAC,SAAS,CAAC;IACjB,MAAM,CAAC;QACN,GAAG,CAAA;;UAEK,QAAQ,qBAAqB,aAAa,CAAC,aAAa;UACxD,QAAQ,mBAAmB,aAAa,CAAC,aAAa;UACtD,QAAQ;UACR,QAAQ,sBAAsB,aAAa,CAAC,aAAa;UACzD,QAAQ,uBAAuB,aAAa,CAAC,UAAU;UACvD,QAAQ;UACR,QAAQ;UACR,QAAQ;UACR,QAAQ;qBACG,QAAQ;0BACH,QAAQ;;;;;;;;;;;;yBAYT,QAAQ;;;;qBAIZ,QAAQ;sBACP,QAAQ;sBACR,QAAQ;;;;;gBAKd,QAAQ;gBACR,QAAQ;gBACR,QAAQ;gBACR,QAAQ;;;;;;;;;;;;;;;;;0BAiBE,QAAQ;;;;;;;;;;;;;GAa/B;KACF,CAAC;GACW,QAAQ,CAsBpB;;AAED,eAAe,QAAQ,CAAC","sourcesContent":["import { css, html, property, state } from \"../../_deps.js\";\nimport { godown } from \"../../decorators/godown.js\";\nimport { styles } from \"../../decorators/styles.js\";\nimport { ifValue } from \"../../lib/directives.js\";\nimport { htmlSlot } from \"../../lib/directives.js\";\nimport { svgImage } from \"../../lib/icons.js\";\nimport { GodownElement } from \"../../proto/godown-element.js\";\nimport { createScope, cssGlobalVars } from \"../../styles/global.js\";\n\nconst protoName = \"skeleton\";\nconst cssScope = createScope(protoName);\n\n/**\n * {@linkcode Skeleton} renders a skeleton screen.\n *\n * Inspired by Ant-design.\n *\n * @slot loading - The content if loading is true.\n * @slot - The content if loading is false.\n */\n@godown(protoName)\n@styles([\n css`\n :host {\n --${cssScope}--from: rgb(var(--${cssGlobalVars.foregroundRGB}) / 7.5%);\n --${cssScope}--to: rgb(var(--${cssGlobalVars.foregroundRGB}) / 22%);\n --${cssScope}--deg: 94deg;\n --${cssScope}--color: rgb(var(--${cssGlobalVars.foregroundRGB}) / 50%);\n --${cssScope}--background: var(--${cssGlobalVars.background});\n --${cssScope}--duration: 1.5s;\n --${cssScope}--icon-width: 5em;\n --${cssScope}--icon-height: 5em;\n --${cssScope}--icon-margin: .75em;\n color: var(--${cssScope}--color);\n background: var(--${cssScope}--background);\n min-height: 1.5em;\n width: 100%;\n flex-shrink: 0;\n display: block;\n overflow: hidden;\n }\n\n [part=\"root\"] {\n height: 100%;\n min-height: inherit;\n text-align: center;\n animation: var(--${cssScope}--duration) ease-in-out 0s infinite none running;\n }\n\n svg {\n width: var(--${cssScope}--icon-width);\n height: var(--${cssScope}--icon-height);\n margin: var(--${cssScope}--icon-margin);\n }\n\n .position {\n background-image: linear-gradient(\n var(--${cssScope}--deg),\n var(--${cssScope}--from) 36%,\n var(--${cssScope}--to) 50%,\n var(--${cssScope}--from) 64%\n );\n background-color: transparent;\n background-size: 200% 100%;\n animation-name: po;\n }\n\n @keyframes po {\n from {\n background-position: 150% center;\n }\n to {\n background-position: -50% center;\n }\n }\n\n .opacity {\n background: var(--${cssScope}--from);\n animation-name: op;\n animation-direction: alternate;\n }\n\n @keyframes op {\n 50% {\n opacity: 0.2;\n }\n to {\n opacity: 1;\n }\n }\n `,\n])\nexport class Skeleton extends GodownElement {\n /**\n * Skeleton type.\n */\n @property() type: \"text\" | \"image\" = \"text\";\n /**\n * Animation type.\n */\n @property() animation: \"position\" | \"opacity\" = \"position\";\n /**\n * If false, hidden.\n */\n @state() loading = true;\n\n protected render() {\n if (!this.loading) {\n return htmlSlot();\n }\n return html`<div part=\"root\" class=\"${this.animation}\">\n ${ifValue(this.type === \"image\", svgImage(), htmlSlot(\"loading\"))}\n </div>`;\n }\n}\n\nexport default Skeleton;\n"]}
|
@@ -1,27 +1,22 @@
|
|
1
|
-
import {
|
2
|
-
import { type HTMLTemplate } from "../../lib/templates.js";
|
3
|
-
import { GodownElement } from "../../supers/root.js";
|
1
|
+
import { GodownElement } from "../../proto/godown-element.js";
|
4
2
|
/**
|
5
|
-
* {@linkcode Overbreath}
|
3
|
+
* {@linkcode Overbreath} render the text with a breathing effect.
|
4
|
+
*
|
5
|
+
* Dynamically generate a breathing effect based on the length of the split text.
|
6
|
+
*
|
7
|
+
* If there is not enough CSS variable `--${CSSprefix}--${number}`, the initial value will be repeated.
|
8
|
+
*
|
9
|
+
* Inspired by Vercel home page (2023).
|
6
10
|
*
|
7
|
-
* Inspired by Vercel homepage (2022? - 2023).
|
8
11
|
*/
|
9
12
|
export declare class Overbreath extends GodownElement {
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
protected render(): HTMLTemplate[];
|
18
|
-
protected renderText(text: string): HTMLTemplate;
|
13
|
+
text: string | string[];
|
14
|
+
duration: string;
|
15
|
+
speedup: string;
|
16
|
+
protected render(): import("lit").TemplateResult<1>;
|
17
|
+
protected renderText(text: string): import("lit").TemplateResult<1>;
|
18
|
+
protected getTexts(): string[];
|
19
|
+
protected parseDuration(): number;
|
19
20
|
}
|
20
21
|
export default Overbreath;
|
21
|
-
declare global {
|
22
|
-
interface HTMLElementTagNameMap {
|
23
|
-
"overbreath-text": Overbreath;
|
24
|
-
"g-overbreath": Overbreath;
|
25
|
-
}
|
26
|
-
}
|
27
22
|
//# sourceMappingURL=overbreath.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"overbreath.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/text/overbreath.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"overbreath.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/text/overbreath.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAM9D;;;;;;;;;GASG;AACH,qBA2Da,UAAW,SAAQ,aAAa;IAC/B,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAE5B,SAAS,CAAC,MAAM;IAsBhB,SAAS,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM;IAMjC,SAAS,CAAC,QAAQ,IAAI,MAAM,EAAE;IAI9B,SAAS,CAAC,aAAa;CAUxB;AAED,eAAe,UAAU,CAAC"}
|
@@ -1,225 +1,131 @@
|
|
1
1
|
import { __decorate } from "tslib";
|
2
|
-
import { css, html, property } from "
|
3
|
-
import {
|
4
|
-
import {
|
2
|
+
import { css, html, property } from "../../_deps.js";
|
3
|
+
import { godown } from "../../decorators/godown.js";
|
4
|
+
import { styles } from "../../decorators/styles.js";
|
5
|
+
import { htmlStyle } from "../../lib/directives.js";
|
6
|
+
import { GodownElement } from "../../proto/godown-element.js";
|
7
|
+
import { colorValues, createScope, cssGlobalVars } from "../../styles/global.js";
|
5
8
|
const defineName = "overbreath";
|
6
|
-
const
|
9
|
+
const cssScope = createScope(defineName);
|
7
10
|
/**
|
8
|
-
* {@linkcode Overbreath}
|
11
|
+
* {@linkcode Overbreath} render the text with a breathing effect.
|
12
|
+
*
|
13
|
+
* Dynamically generate a breathing effect based on the length of the split text.
|
14
|
+
*
|
15
|
+
* If there is not enough CSS variable `--${CSSprefix}--${number}`, the initial value will be repeated.
|
16
|
+
*
|
17
|
+
* Inspired by Vercel home page (2023).
|
9
18
|
*
|
10
|
-
* Inspired by Vercel homepage (2022? - 2023).
|
11
19
|
*/
|
12
20
|
let Overbreath = class Overbreath extends GodownElement {
|
13
|
-
constructor() {
|
14
|
-
super(...arguments);
|
15
|
-
/**
|
16
|
-
* One of the texts.
|
17
|
-
*/
|
18
|
-
this.t1 = "";
|
19
|
-
// As t1.
|
20
|
-
this.t2 = "";
|
21
|
-
// As t2.
|
22
|
-
this.t3 = "";
|
23
|
-
}
|
24
21
|
render() {
|
25
|
-
|
22
|
+
const texts = this.getTexts();
|
23
|
+
const len = texts.length;
|
24
|
+
const gap = 100 / 2 / len;
|
25
|
+
const duration = this.parseDuration() || len * 2 + 2;
|
26
|
+
const t = duration / len;
|
27
|
+
return html `${texts.map(this.renderText)}
|
28
|
+
${htmlStyle(`.colorful{animation-duration:${duration}s;}` +
|
29
|
+
`@keyframes colorfulN{0%,${gap * 3}%{opacity:0;}${gap}%,${gap * 2}%{opacity: 1;}}` +
|
30
|
+
texts
|
31
|
+
.map((_, index) => {
|
32
|
+
const number = index + 1;
|
33
|
+
const delay = -1 * t * (len - (number - 2));
|
34
|
+
const defaultNumber = ((number - 1) % 3) + 1;
|
35
|
+
return `.rel:nth-child(${number}) .colorful{animation-delay:${delay}s;background:var(--${cssScope}--${number},var(--${cssScope}--${defaultNumber}));}`;
|
36
|
+
})
|
37
|
+
.join(""))}`;
|
26
38
|
}
|
27
39
|
renderText(text) {
|
28
40
|
return html `<span class="rel">
|
29
|
-
<span class="
|
30
|
-
<span class="
|
41
|
+
<span class="nocolor">${text}</span>
|
42
|
+
<span class="colorful">${text}</span>
|
31
43
|
</span>`;
|
32
44
|
}
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
${cssvarScope}--1: linear-gradient(var(${cssvarScope}--deg), var(${cssvarScope}--1-1), var(${cssvarScope}--1-2));
|
46
|
-
${cssvarScope}--2: linear-gradient(var(${cssvarScope}--deg), var(${cssvarScope}--2-1), var(${cssvarScope}--2-2));
|
47
|
-
${cssvarScope}--3: linear-gradient(var(${cssvarScope}--deg), var(${cssvarScope}--3-1), var(${cssvarScope}--3-2));
|
48
|
-
}
|
49
|
-
`,
|
50
|
-
css `
|
51
|
-
:host {
|
52
|
-
display: flex;
|
53
|
-
margin: auto;
|
54
|
-
width: fit-content;
|
55
|
-
font-size: clamp(3.5rem, 10vw, 5.5rem);
|
56
|
-
align-items: center;
|
57
|
-
}
|
58
|
-
|
59
|
-
@media (max-width: 1280px) {
|
60
|
-
:host {
|
61
|
-
flex-direction: column;
|
62
|
-
}
|
63
|
-
}
|
64
|
-
|
65
|
-
*::selection {
|
66
|
-
background: none;
|
67
|
-
}
|
68
|
-
|
69
|
-
.fg,
|
70
|
-
.bg {
|
71
|
-
padding: 0 0.05em;
|
72
|
-
box-sizing: border-box;
|
73
|
-
}
|
74
|
-
|
75
|
-
.bg {
|
76
|
-
position: absolute;
|
77
|
-
top: 0;
|
78
|
-
}
|
79
|
-
|
80
|
-
span {
|
81
|
-
display: block;
|
82
|
-
}
|
83
|
-
|
84
|
-
.rel {
|
85
|
-
position: relative;
|
86
|
-
font-weight: 800;
|
87
|
-
font-size: inherit;
|
88
|
-
letter-spacing: -0.05em;
|
89
|
-
}
|
90
|
-
|
91
|
-
.rel:nth-child(1) .fg {
|
92
|
-
animation: lg1 8s infinite;
|
93
|
-
background-image: var(${cssvarScope}--1);
|
94
|
-
}
|
95
|
-
|
96
|
-
.rel:nth-child(2) .fg {
|
97
|
-
animation: 8s infinite lg2;
|
98
|
-
background-image: var(${cssvarScope}--2);
|
99
|
-
}
|
100
|
-
|
101
|
-
.rel:nth-child(3) .fg {
|
102
|
-
animation: 8s infinite lg3;
|
103
|
-
background-image: var(${cssvarScope}--3);
|
104
|
-
}
|
105
|
-
|
106
|
-
.rel:nth-child(1) .bg {
|
107
|
-
animation: text1 8s infinite;
|
108
|
-
}
|
109
|
-
|
110
|
-
.rel:nth-child(2) .bg {
|
111
|
-
animation: text2 8s infinite;
|
112
|
-
}
|
113
|
-
|
114
|
-
.rel:nth-child(3) .bg {
|
115
|
-
animation: text3 8s infinite;
|
116
|
-
}
|
117
|
-
`,
|
118
|
-
css `
|
119
|
-
@keyframes lg1 {
|
120
|
-
0%,
|
121
|
-
16.667%,
|
122
|
-
to {
|
123
|
-
opacity: 1;
|
124
|
-
}
|
125
|
-
33.333%,
|
126
|
-
83.333% {
|
127
|
-
opacity: 0;
|
128
|
-
}
|
129
|
-
}
|
130
|
-
|
131
|
-
@keyframes lg2 {
|
132
|
-
0%,
|
133
|
-
to {
|
134
|
-
opacity: 0;
|
135
|
-
}
|
136
|
-
33.333%,
|
137
|
-
50% {
|
138
|
-
opacity: 1;
|
139
|
-
}
|
140
|
-
16.667%,
|
141
|
-
66.667% {
|
142
|
-
opacity: 0;
|
143
|
-
}
|
144
|
-
}
|
145
|
-
|
146
|
-
@keyframes lg3 {
|
147
|
-
0%,
|
148
|
-
50%,
|
149
|
-
to {
|
150
|
-
opacity: 0;
|
151
|
-
}
|
152
|
-
66.667%,
|
153
|
-
83.333% {
|
154
|
-
opacity: 1;
|
155
|
-
}
|
156
|
-
}
|
157
|
-
|
158
|
-
@keyframes text1 {
|
159
|
-
0%,
|
160
|
-
16.667%,
|
161
|
-
to {
|
162
|
-
opacity: 0;
|
163
|
-
}
|
164
|
-
25%,
|
165
|
-
91.667% {
|
166
|
-
opacity: 1;
|
167
|
-
}
|
168
|
-
}
|
169
|
-
|
170
|
-
@keyframes text2 {
|
171
|
-
0%,
|
172
|
-
to {
|
173
|
-
opacity: 1;
|
174
|
-
}
|
175
|
-
33.333%,
|
176
|
-
50% {
|
177
|
-
opacity: 0;
|
178
|
-
}
|
179
|
-
25%,
|
180
|
-
58.333% {
|
181
|
-
opacity: 1;
|
182
|
-
}
|
183
|
-
}
|
184
|
-
|
185
|
-
@keyframes text3 {
|
186
|
-
0%,
|
187
|
-
58.333%,
|
188
|
-
91.667%,
|
189
|
-
to {
|
190
|
-
opacity: 1;
|
191
|
-
}
|
192
|
-
66.667%,
|
193
|
-
83.333% {
|
194
|
-
opacity: 0;
|
45
|
+
getTexts() {
|
46
|
+
return Array.isArray(this.text) ? this.text : (this.text || this.textContent).split(/\s+/).filter((x) => x);
|
47
|
+
}
|
48
|
+
parseDuration() {
|
49
|
+
const { duration } = this;
|
50
|
+
if (duration) {
|
51
|
+
if (duration.endsWith("s")) {
|
52
|
+
return parseFloat(duration.slice(0, -1));
|
53
|
+
}
|
54
|
+
else if (duration.endsWith("ms")) {
|
55
|
+
return parseFloat(duration.slice(0, -2)) / 1000;
|
56
|
+
}
|
195
57
|
}
|
196
|
-
|
197
|
-
|
198
|
-
css `
|
199
|
-
span.bg {
|
200
|
-
${cssvarScope}--clip-background: var(${cssvar}--clip-background);
|
201
|
-
background: var(${cssvarScope}--clip-background);
|
202
|
-
}
|
203
|
-
span {
|
204
|
-
color: transparent;
|
205
|
-
-webkit-text-fill-color: transparent;
|
206
|
-
background-clip: text !important;
|
207
|
-
-webkit-background-clip: text !important;
|
208
|
-
display: inline-flex;
|
209
|
-
}
|
210
|
-
`,
|
211
|
-
];
|
58
|
+
}
|
59
|
+
};
|
212
60
|
__decorate([
|
213
61
|
property()
|
214
|
-
], Overbreath.prototype, "
|
62
|
+
], Overbreath.prototype, "text", void 0);
|
215
63
|
__decorate([
|
216
64
|
property()
|
217
|
-
], Overbreath.prototype, "
|
65
|
+
], Overbreath.prototype, "duration", void 0);
|
218
66
|
__decorate([
|
219
67
|
property()
|
220
|
-
], Overbreath.prototype, "
|
68
|
+
], Overbreath.prototype, "speedup", void 0);
|
221
69
|
Overbreath = __decorate([
|
222
|
-
|
70
|
+
godown(defineName),
|
71
|
+
styles([
|
72
|
+
css `
|
73
|
+
:host {
|
74
|
+
--${cssScope}--deg: 60deg;
|
75
|
+
--${cssScope}--1-1: ${colorValues.red[5]};
|
76
|
+
--${cssScope}--1-2: ${colorValues.yellow[5]};
|
77
|
+
--${cssScope}--2-1: ${colorValues.green[5]};
|
78
|
+
--${cssScope}--2-2: ${colorValues.purple[5]};
|
79
|
+
--${cssScope}--3-1: ${colorValues.blue[5]};
|
80
|
+
--${cssScope}--3-2: ${colorValues.pink[5]};
|
81
|
+
--${cssScope}--1: linear-gradient(var(--${cssScope}--deg), var(--${cssScope}--1-1), var(--${cssScope}--1-2));
|
82
|
+
--${cssScope}--2: linear-gradient(var(--${cssScope}--deg), var(--${cssScope}--2-1), var(--${cssScope}--2-2));
|
83
|
+
--${cssScope}--3: linear-gradient(var(--${cssScope}--deg), var(--${cssScope}--3-1), var(--${cssScope}--3-2));
|
84
|
+
}
|
85
|
+
`,
|
86
|
+
css `
|
87
|
+
:host {
|
88
|
+
display: flex;
|
89
|
+
margin: auto;
|
90
|
+
width: -moz-fit-content;
|
91
|
+
width: fit-content;
|
92
|
+
font-size: 2em;
|
93
|
+
align-items: center;
|
94
|
+
}
|
95
|
+
|
96
|
+
::selection {
|
97
|
+
background: none;
|
98
|
+
}
|
99
|
+
|
100
|
+
.rel {
|
101
|
+
position: relative;
|
102
|
+
font-weight: 800;
|
103
|
+
font-size: inherit;
|
104
|
+
letter-spacing: -0.05em;
|
105
|
+
}
|
106
|
+
`,
|
107
|
+
css `
|
108
|
+
.nocolor,
|
109
|
+
.colorful {
|
110
|
+
padding: 0 0.05em;
|
111
|
+
box-sizing: border-box;
|
112
|
+
display: inline-block;
|
113
|
+
animation-iteration-count: infinite;
|
114
|
+
-webkit-text-fill-color: transparent;
|
115
|
+
-webkit-background-clip: text !important;
|
116
|
+
background-clip: text !important;
|
117
|
+
}
|
118
|
+
.colorful {
|
119
|
+
opacity: 0;
|
120
|
+
animation-name: colorfulN;
|
121
|
+
}
|
122
|
+
.nocolor {
|
123
|
+
position: absolute;
|
124
|
+
top: 0;
|
125
|
+
background: var(--${cssGlobalVars.clipBackground});
|
126
|
+
}
|
127
|
+
`,
|
128
|
+
])
|
223
129
|
], Overbreath);
|
224
130
|
export { Overbreath };
|
225
131
|
export default Overbreath;
|