godown 2.7.7 → 3.0.0-canary.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 +44 -80
- package/alert.d.ts +2 -3
- package/alert.d.ts.map +1 -1
- package/alert.js +5 -4
- package/alert.js.map +1 -1
- package/avatar.d.ts +2 -3
- package/avatar.d.ts.map +1 -1
- package/avatar.js +5 -4
- package/avatar.js.map +1 -1
- package/breath.d.ts +9 -0
- package/breath.d.ts.map +1 -0
- package/breath.js +6 -0
- package/breath.js.map +1 -0
- package/button.d.ts +2 -3
- package/button.d.ts.map +1 -1
- package/button.js +5 -4
- package/button.js.map +1 -1
- package/card.d.ts +2 -3
- package/card.d.ts.map +1 -1
- package/card.js +5 -4
- package/card.js.map +1 -1
- package/carousel.d.ts +2 -3
- package/carousel.d.ts.map +1 -1
- package/carousel.js +5 -4
- package/carousel.js.map +1 -1
- package/components/alert.d.ts +50 -0
- package/components/alert.d.ts.map +1 -0
- package/components/alert.js +167 -0
- package/components/alert.js.map +1 -0
- package/components/avatar.d.ts +26 -0
- package/components/avatar.d.ts.map +1 -0
- package/components/avatar.js +62 -0
- package/components/avatar.js.map +1 -0
- package/components/breath.d.ts +34 -0
- package/components/breath.d.ts.map +1 -0
- package/components/breath.js +80 -0
- package/components/breath.js.map +1 -0
- package/{web-components/button → components}/button.d.ts +6 -5
- package/components/button.d.ts.map +1 -0
- package/components/button.js +167 -0
- package/components/button.js.map +1 -0
- package/components/card.d.ts +20 -0
- package/components/card.d.ts.map +1 -0
- package/components/card.js +55 -0
- package/components/card.js.map +1 -0
- package/components/carousel.d.ts +40 -0
- package/components/carousel.d.ts.map +1 -0
- package/components/carousel.js +113 -0
- package/components/carousel.js.map +1 -0
- package/{web-components/details → components}/details.d.ts +5 -3
- package/components/details.d.ts.map +1 -0
- package/components/details.js +50 -0
- package/components/details.js.map +1 -0
- package/components/dialog.d.ts +33 -0
- package/components/dialog.d.ts.map +1 -0
- package/components/dialog.js +92 -0
- package/components/dialog.js.map +1 -0
- package/components/divider.d.ts +17 -0
- package/components/divider.d.ts.map +1 -0
- package/components/divider.js +37 -0
- package/components/divider.js.map +1 -0
- package/{web-components/wrapper → components}/dragbox.d.ts +15 -5
- package/components/dragbox.d.ts.map +1 -0
- package/{web-components/wrapper → components}/dragbox.js +32 -27
- package/components/dragbox.js.map +1 -0
- package/components/flex.d.ts +31 -0
- package/components/flex.d.ts.map +1 -0
- package/components/flex.js +55 -0
- package/components/flex.js.map +1 -0
- package/{web-components/form → components}/form.d.ts +4 -2
- package/components/form.d.ts.map +1 -0
- package/{web-components/form → components}/form.js +16 -17
- package/components/form.js.map +1 -0
- package/components/grid.d.ts +31 -0
- package/components/grid.d.ts.map +1 -0
- package/components/grid.js +56 -0
- package/components/grid.js.map +1 -0
- package/components/input.d.ts +20 -0
- package/components/input.d.ts.map +1 -0
- package/components/input.js +54 -0
- package/components/input.js.map +1 -0
- package/components/layout.d.ts +29 -0
- package/components/layout.d.ts.map +1 -0
- package/components/layout.js +48 -0
- package/components/layout.js.map +1 -0
- package/components/link.d.ts +20 -0
- package/components/link.d.ts.map +1 -0
- package/components/link.js +43 -0
- package/components/link.js.map +1 -0
- package/{web-components/progress → components}/progress.d.ts +5 -3
- package/components/progress.d.ts.map +1 -0
- package/components/progress.js +68 -0
- package/components/progress.js.map +1 -0
- package/components/range.d.ts +60 -0
- package/components/range.d.ts.map +1 -0
- package/components/range.js +193 -0
- package/components/range.js.map +1 -0
- package/{web-components/wrapper → components}/rotate.d.ts +4 -8
- package/components/rotate.d.ts.map +1 -0
- package/components/rotate.js +57 -0
- package/components/rotate.js.map +1 -0
- package/components/router.d.ts +121 -0
- package/components/router.d.ts.map +1 -0
- package/components/router.js +251 -0
- package/components/router.js.map +1 -0
- package/components/select.d.ts +50 -0
- package/components/select.d.ts.map +1 -0
- package/components/select.js +211 -0
- package/components/select.js.map +1 -0
- package/{web-components/skeleton → components}/skeleton.d.ts +6 -6
- package/components/skeleton.d.ts.map +1 -0
- package/components/skeleton.js +56 -0
- package/components/skeleton.js.map +1 -0
- package/components/split.d.ts +32 -0
- package/components/split.d.ts.map +1 -0
- package/components/split.js +121 -0
- package/components/split.js.map +1 -0
- package/{web-components/input/switch-input.d.ts → components/switch.d.ts} +9 -10
- package/components/switch.d.ts.map +1 -0
- package/components/switch.js +93 -0
- package/components/switch.js.map +1 -0
- package/{web-components/text → components}/text.d.ts +5 -3
- package/components/text.d.ts.map +1 -0
- package/components/text.js +44 -0
- package/components/text.js.map +1 -0
- package/{web-components/text → components}/time.d.ts +5 -3
- package/components/time.d.ts.map +1 -0
- package/{web-components/text → components}/time.js +18 -21
- package/components/time.js.map +1 -0
- package/components/tooltip.d.ts +38 -0
- package/components/tooltip.d.ts.map +1 -0
- package/components/tooltip.js +67 -0
- package/components/tooltip.js.map +1 -0
- package/{web-components/text → components}/typewriter.d.ts +5 -3
- package/components/typewriter.d.ts.map +1 -0
- package/{web-components/text → components}/typewriter.js +24 -48
- package/components/typewriter.js.map +1 -0
- package/core/global-style.d.ts +21 -0
- package/core/global-style.d.ts.map +1 -0
- package/core/global-style.js +46 -0
- package/core/global-style.js.map +1 -0
- package/core/super-anchor.d.ts +15 -0
- package/core/super-anchor.d.ts.map +1 -0
- package/core/super-anchor.js +39 -0
- package/core/super-anchor.js.map +1 -0
- package/core/super-input.d.ts +39 -0
- package/core/super-input.d.ts.map +1 -0
- package/core/super-input.js +115 -0
- package/core/super-input.js.map +1 -0
- package/{proto → core}/super-openable.d.ts +4 -8
- package/core/super-openable.d.ts.map +1 -0
- package/{proto → core}/super-openable.js +10 -15
- package/core/super-openable.js.map +1 -0
- package/custom-elements.json +1 -0
- package/details.d.ts +2 -3
- package/details.d.ts.map +1 -1
- package/details.js +5 -4
- package/details.js.map +1 -1
- package/dialog.d.ts +2 -3
- package/dialog.d.ts.map +1 -1
- package/dialog.js +5 -4
- package/dialog.js.map +1 -1
- package/divider.d.ts +2 -3
- package/divider.d.ts.map +1 -1
- package/divider.js +5 -4
- package/divider.js.map +1 -1
- package/dragbox.d.ts +2 -3
- package/dragbox.d.ts.map +1 -1
- package/dragbox.js +5 -4
- package/dragbox.js.map +1 -1
- package/flex.d.ts +8 -0
- package/flex.d.ts.map +1 -0
- package/flex.js +6 -0
- package/flex.js.map +1 -0
- package/form.d.ts +2 -3
- package/form.d.ts.map +1 -1
- package/form.js +5 -4
- package/form.js.map +1 -1
- package/grid.d.ts +8 -0
- package/grid.d.ts.map +1 -0
- package/grid.js +6 -0
- package/grid.js.map +1 -0
- package/index.d.ts +28 -32
- package/index.d.ts.map +1 -1
- package/index.js +57 -33
- package/index.js.map +1 -1
- package/input.d.ts +3 -3
- package/input.d.ts.map +1 -1
- package/input.js +5 -4
- package/input.js.map +1 -1
- package/layout.d.ts +3 -3
- package/layout.d.ts.map +1 -1
- package/layout.js +5 -4
- package/layout.js.map +1 -1
- package/link.d.ts +3 -3
- package/link.d.ts.map +1 -1
- package/link.js +5 -4
- package/link.js.map +1 -1
- package/package.json +42 -81
- package/progress.d.ts +3 -3
- package/progress.d.ts.map +1 -1
- package/progress.js +5 -4
- package/progress.js.map +1 -1
- package/range.d.ts +9 -0
- package/range.d.ts.map +1 -0
- package/range.js +6 -0
- package/range.js.map +1 -0
- package/rotate.d.ts +3 -3
- package/rotate.d.ts.map +1 -1
- package/rotate.js +5 -4
- package/rotate.js.map +1 -1
- package/router.d.ts +3 -3
- package/router.d.ts.map +1 -1
- package/router.js +5 -4
- package/router.js.map +1 -1
- package/select.d.ts +9 -0
- package/select.d.ts.map +1 -0
- package/select.js +6 -0
- package/select.js.map +1 -0
- package/skeleton.d.ts +3 -3
- package/skeleton.d.ts.map +1 -1
- package/skeleton.js +5 -4
- package/skeleton.js.map +1 -1
- package/split.d.ts +9 -0
- package/split.d.ts.map +1 -0
- package/split.js +6 -0
- package/split.js.map +1 -0
- package/switch.d.ts +9 -0
- package/switch.d.ts.map +1 -0
- package/switch.js +6 -0
- package/switch.js.map +1 -0
- package/text.d.ts +3 -3
- package/text.d.ts.map +1 -1
- package/text.js +5 -4
- package/text.js.map +1 -1
- package/time.d.ts +3 -3
- package/time.d.ts.map +1 -1
- package/time.js +5 -4
- package/time.js.map +1 -1
- package/tooltip.d.ts +3 -3
- package/tooltip.d.ts.map +1 -1
- package/tooltip.js +5 -4
- package/tooltip.js.map +1 -1
- package/typewriter.d.ts +2 -3
- package/typewriter.d.ts.map +1 -1
- package/typewriter.js +5 -4
- package/typewriter.js.map +1 -1
- package/vscode.css-custom-data.json +1 -0
- package/vscode.html-custom-data.json +1 -0
- package/web-types.json +1 -0
- package/_deps.d.ts +0 -4
- package/_deps.d.ts.map +0 -1
- package/_deps.js +0 -4
- package/_deps.js.map +0 -1
- package/avatar-group.d.ts +0 -9
- package/avatar-group.d.ts.map +0 -1
- package/avatar-group.js +0 -5
- package/avatar-group.js.map +0 -1
- package/components.json +0 -194
- package/conf.d.ts +0 -12
- package/conf.d.ts.map +0 -1
- package/conf.js +0 -24
- package/conf.js.map +0 -1
- package/decorators/godown.d.ts +0 -4
- package/decorators/godown.d.ts.map +0 -1
- package/decorators/godown.js +0 -9
- package/decorators/godown.js.map +0 -1
- package/decorators/part.d.ts +0 -7
- package/decorators/part.d.ts.map +0 -1
- package/decorators/part.js +0 -8
- package/decorators/part.js.map +0 -1
- package/decorators/styles.d.ts +0 -3
- package/decorators/styles.d.ts.map +0 -1
- package/decorators/styles.js +0 -8
- package/decorators/styles.js.map +0 -1
- package/flex-flow.d.ts +0 -9
- package/flex-flow.d.ts.map +0 -1
- package/flex-flow.js +0 -5
- package/flex-flow.js.map +0 -1
- package/grid-flow.d.ts +0 -9
- package/grid-flow.d.ts.map +0 -1
- package/grid-flow.js +0 -5
- package/grid-flow.js.map +0 -1
- package/label-input.d.ts +0 -9
- package/label-input.d.ts.map +0 -1
- package/label-input.js +0 -5
- package/label-input.js.map +0 -1
- package/lib/css.d.ts +0 -13
- package/lib/css.d.ts.map +0 -1
- package/lib/css.js +0 -29
- package/lib/css.js.map +0 -1
- package/lib/directives.d.ts +0 -25
- package/lib/directives.d.ts.map +0 -1
- package/lib/directives.js +0 -40
- package/lib/directives.js.map +0 -1
- package/lib/event-coll.d.ts +0 -13
- package/lib/event-coll.d.ts.map +0 -1
- package/lib/event-coll.js +0 -45
- package/lib/event-coll.js.map +0 -1
- package/lib/icons.d.ts +0 -25
- package/lib/icons.d.ts.map +0 -1
- package/lib/icons.js +0 -73
- package/lib/icons.js.map +0 -1
- package/lib/jsx.d.ts +0 -4
- package/lib/jsx.d.ts.map +0 -1
- package/lib/jsx.js +0 -52
- package/lib/jsx.js.map +0 -1
- package/lib/route-tree.d.ts +0 -28
- package/lib/route-tree.d.ts.map +0 -1
- package/lib/route-tree.js +0 -141
- package/lib/route-tree.js.map +0 -1
- package/lib/utils.d.ts +0 -10
- package/lib/utils.d.ts.map +0 -1
- package/lib/utils.js +0 -71
- package/lib/utils.js.map +0 -1
- package/overbreath.d.ts +0 -9
- package/overbreath.d.ts.map +0 -1
- package/overbreath.js +0 -5
- package/overbreath.js.map +0 -1
- package/proto/godown-config.d.ts +0 -41
- package/proto/godown-config.d.ts.map +0 -1
- package/proto/godown-config.js +0 -27
- package/proto/godown-config.js.map +0 -1
- package/proto/godown-element.d.ts +0 -125
- package/proto/godown-element.d.ts.map +0 -1
- package/proto/godown-element.js +0 -204
- package/proto/godown-element.js.map +0 -1
- package/proto/super-a.d.ts +0 -30
- package/proto/super-a.d.ts.map +0 -1
- package/proto/super-a.js +0 -141
- package/proto/super-a.js.map +0 -1
- package/proto/super-input.d.ts +0 -44
- package/proto/super-input.d.ts.map +0 -1
- package/proto/super-input.js +0 -119
- package/proto/super-input.js.map +0 -1
- package/proto/super-openable.d.ts.map +0 -1
- package/proto/super-openable.js.map +0 -1
- package/range-input.d.ts +0 -9
- package/range-input.d.ts.map +0 -1
- package/range-input.js +0 -5
- package/range-input.js.map +0 -1
- package/react/create.d.ts +0 -5
- package/react/create.d.ts.map +0 -1
- package/react/create.js +0 -16
- package/react/create.js.map +0 -1
- package/react/index.d.ts +0 -65
- package/react/index.d.ts.map +0 -1
- package/react/index.js +0 -132
- package/react/index.js.map +0 -1
- package/router-link.d.ts +0 -9
- package/router-link.d.ts.map +0 -1
- package/router-link.js +0 -5
- package/router-link.js.map +0 -1
- package/search-input.d.ts +0 -9
- package/search-input.d.ts.map +0 -1
- package/search-input.js +0 -5
- package/search-input.js.map +0 -1
- package/select-input.d.ts +0 -9
- package/select-input.d.ts.map +0 -1
- package/select-input.js +0 -5
- package/select-input.js.map +0 -1
- package/split-input.d.ts +0 -9
- package/split-input.d.ts.map +0 -1
- package/split-input.js +0 -5
- package/split-input.js.map +0 -1
- package/styles/colors/presets.d.ts +0 -13
- package/styles/colors/presets.d.ts.map +0 -1
- package/styles/colors/presets.js +0 -6
- package/styles/colors/presets.js.map +0 -1
- package/styles/colors/presetsRGB.d.ts +0 -16
- package/styles/colors/presetsRGB.d.ts.map +0 -1
- package/styles/colors/presetsRGB.js +0 -134
- package/styles/colors/presetsRGB.js.map +0 -1
- package/styles/global.d.ts +0 -18
- package/styles/global.d.ts.map +0 -1
- package/styles/global.js +0 -78
- package/styles/global.js.map +0 -1
- package/styles/inputStyle.d.ts +0 -3
- package/styles/inputStyle.d.ts.map +0 -1
- package/styles/inputStyle.js +0 -59
- package/styles/inputStyle.js.map +0 -1
- package/switch-input.d.ts +0 -9
- package/switch-input.d.ts.map +0 -1
- package/switch-input.js +0 -5
- package/switch-input.js.map +0 -1
- package/web-components/alert/alert.d.ts +0 -36
- package/web-components/alert/alert.d.ts.map +0 -1
- package/web-components/alert/alert.js +0 -161
- package/web-components/alert/alert.js.map +0 -1
- package/web-components/avatar/avatar-group.d.ts +0 -21
- package/web-components/avatar/avatar-group.d.ts.map +0 -1
- package/web-components/avatar/avatar-group.js +0 -86
- package/web-components/avatar/avatar-group.js.map +0 -1
- package/web-components/avatar/avatar.d.ts +0 -28
- package/web-components/avatar/avatar.d.ts.map +0 -1
- package/web-components/avatar/avatar.js +0 -120
- package/web-components/avatar/avatar.js.map +0 -1
- package/web-components/button/button.d.ts.map +0 -1
- package/web-components/button/button.js +0 -256
- package/web-components/button/button.js.map +0 -1
- package/web-components/card/card.d.ts +0 -9
- package/web-components/card/card.d.ts.map +0 -1
- package/web-components/card/card.js +0 -75
- package/web-components/card/card.js.map +0 -1
- package/web-components/carousel/carousel.d.ts +0 -29
- package/web-components/carousel/carousel.d.ts.map +0 -1
- package/web-components/carousel/carousel.js +0 -185
- package/web-components/carousel/carousel.js.map +0 -1
- package/web-components/details/details.d.ts.map +0 -1
- package/web-components/details/details.js +0 -124
- package/web-components/details/details.js.map +0 -1
- package/web-components/dialog/dialog.d.ts +0 -31
- package/web-components/dialog/dialog.d.ts.map +0 -1
- package/web-components/dialog/dialog.js +0 -143
- package/web-components/dialog/dialog.js.map +0 -1
- package/web-components/divider/divider.d.ts +0 -13
- package/web-components/divider/divider.d.ts.map +0 -1
- package/web-components/divider/divider.js +0 -95
- package/web-components/divider/divider.js.map +0 -1
- package/web-components/form/form.d.ts.map +0 -1
- package/web-components/form/form.js.map +0 -1
- package/web-components/input/input.d.ts +0 -37
- package/web-components/input/input.d.ts.map +0 -1
- package/web-components/input/input.js +0 -152
- package/web-components/input/input.js.map +0 -1
- package/web-components/input/label-input.d.ts +0 -15
- package/web-components/input/label-input.d.ts.map +0 -1
- package/web-components/input/label-input.js +0 -96
- package/web-components/input/label-input.js.map +0 -1
- package/web-components/input/range-input.d.ts +0 -53
- package/web-components/input/range-input.d.ts.map +0 -1
- package/web-components/input/range-input.js +0 -316
- package/web-components/input/range-input.js.map +0 -1
- package/web-components/input/search-input.d.ts +0 -42
- package/web-components/input/search-input.d.ts.map +0 -1
- package/web-components/input/search-input.js +0 -214
- package/web-components/input/search-input.js.map +0 -1
- package/web-components/input/select-input.d.ts +0 -36
- package/web-components/input/select-input.d.ts.map +0 -1
- package/web-components/input/select-input.js +0 -210
- package/web-components/input/select-input.js.map +0 -1
- package/web-components/input/split-input.d.ts +0 -29
- package/web-components/input/split-input.d.ts.map +0 -1
- package/web-components/input/split-input.js +0 -184
- package/web-components/input/split-input.js.map +0 -1
- package/web-components/input/switch-input.d.ts.map +0 -1
- package/web-components/input/switch-input.js +0 -189
- package/web-components/input/switch-input.js.map +0 -1
- package/web-components/layout/flex-flow.d.ts +0 -17
- package/web-components/layout/flex-flow.d.ts.map +0 -1
- package/web-components/layout/flex-flow.js +0 -73
- package/web-components/layout/flex-flow.js.map +0 -1
- package/web-components/layout/grid-flow.d.ts +0 -14
- package/web-components/layout/grid-flow.d.ts.map +0 -1
- package/web-components/layout/grid-flow.js +0 -56
- package/web-components/layout/grid-flow.js.map +0 -1
- package/web-components/layout/layout.d.ts +0 -18
- package/web-components/layout/layout.d.ts.map +0 -1
- package/web-components/layout/layout.js +0 -76
- package/web-components/layout/layout.js.map +0 -1
- package/web-components/link/link.d.ts +0 -10
- package/web-components/link/link.d.ts.map +0 -1
- package/web-components/link/link.js +0 -17
- package/web-components/link/link.js.map +0 -1
- package/web-components/link/router-link.d.ts +0 -19
- package/web-components/link/router-link.d.ts.map +0 -1
- package/web-components/link/router-link.js +0 -60
- package/web-components/link/router-link.js.map +0 -1
- package/web-components/progress/progress.d.ts.map +0 -1
- package/web-components/progress/progress.js +0 -107
- package/web-components/progress/progress.js.map +0 -1
- package/web-components/router/router.d.ts +0 -86
- package/web-components/router/router.d.ts.map +0 -1
- package/web-components/router/router.js +0 -246
- package/web-components/router/router.js.map +0 -1
- package/web-components/skeleton/skeleton.d.ts.map +0 -1
- package/web-components/skeleton/skeleton.js +0 -130
- package/web-components/skeleton/skeleton.js.map +0 -1
- package/web-components/text/overbreath.d.ts +0 -22
- package/web-components/text/overbreath.d.ts.map +0 -1
- package/web-components/text/overbreath.js +0 -132
- package/web-components/text/overbreath.js.map +0 -1
- package/web-components/text/text.d.ts.map +0 -1
- package/web-components/text/text.js +0 -94
- package/web-components/text/text.js.map +0 -1
- package/web-components/text/time.d.ts.map +0 -1
- package/web-components/text/time.js.map +0 -1
- package/web-components/text/typewriter.d.ts.map +0 -1
- package/web-components/text/typewriter.js.map +0 -1
- package/web-components/tooltip/tooltip.d.ts +0 -30
- package/web-components/tooltip/tooltip.d.ts.map +0 -1
- package/web-components/tooltip/tooltip.js +0 -123
- package/web-components/tooltip/tooltip.js.map +0 -1
- package/web-components/wrapper/dragbox.d.ts.map +0 -1
- package/web-components/wrapper/dragbox.js.map +0 -1
- package/web-components/wrapper/rotate.d.ts.map +0 -1
- package/web-components/wrapper/rotate.js +0 -92
- package/web-components/wrapper/rotate.js.map +0 -1
@@ -0,0 +1,93 @@
|
|
1
|
+
import { __decorate } from 'tslib';
|
2
|
+
import { godown } from '@godown/element/decorators/godown.js';
|
3
|
+
import { styles } from '@godown/element/decorators/styles.js';
|
4
|
+
import { css, html } from 'lit';
|
5
|
+
import { property, query } from 'lit/decorators.js';
|
6
|
+
import { scopePrefix, cssGlobalVars } from '../core/global-style.js';
|
7
|
+
import SuperInput from '../core/super-input.js';
|
8
|
+
|
9
|
+
const protoName = "switch";
|
10
|
+
const cssScope = scopePrefix(protoName);
|
11
|
+
/**
|
12
|
+
* {@linkcode Switch} renders a switch.
|
13
|
+
*
|
14
|
+
* The switch is rectangular by default,
|
15
|
+
* set the round property to rounded switch.
|
16
|
+
*
|
17
|
+
* @category input
|
18
|
+
*/
|
19
|
+
let Switch = class Switch extends SuperInput {
|
20
|
+
constructor() {
|
21
|
+
super(...arguments);
|
22
|
+
/**
|
23
|
+
* Border style.
|
24
|
+
*/
|
25
|
+
this.round = false;
|
26
|
+
/**
|
27
|
+
* Whether this element is selected or not.
|
28
|
+
*/
|
29
|
+
this.checked = false;
|
30
|
+
/**
|
31
|
+
* Whether this element is disabled or not.
|
32
|
+
*/
|
33
|
+
this.disabled = false;
|
34
|
+
/**
|
35
|
+
* Parsed by JSON.parse to checked.
|
36
|
+
*/
|
37
|
+
this.default = "false";
|
38
|
+
/**
|
39
|
+
* Input value.
|
40
|
+
*/
|
41
|
+
this.value = "on";
|
42
|
+
}
|
43
|
+
render() {
|
44
|
+
return html `<div part="root" class="${this.round ? "round" : "rect"}"><input part="input" @change="${this._handleChange}" ?disabled="${this.disabled}" ?checked="${this.checked}" name="${this.name}" id="${this.makeId}" type="checkbox"> <span class="${this.checked}"></span></div>`;
|
45
|
+
}
|
46
|
+
reset() {
|
47
|
+
this.checked = this.default === "true";
|
48
|
+
this._input.checked = this.checked;
|
49
|
+
}
|
50
|
+
connectedCallback() {
|
51
|
+
super.connectedCallback();
|
52
|
+
if (this.checked) {
|
53
|
+
this.default = "true";
|
54
|
+
}
|
55
|
+
if (this.default === "true") {
|
56
|
+
this.checked = true;
|
57
|
+
}
|
58
|
+
}
|
59
|
+
_handleChange() {
|
60
|
+
this.checked = this._input.checked;
|
61
|
+
this.dispatchEvent(new CustomEvent("input", { detail: this.checked, bubbles: true, composed: true }));
|
62
|
+
this.dispatchEvent(new CustomEvent("change", { detail: this.checked, composed: true }));
|
63
|
+
}
|
64
|
+
namevalue() {
|
65
|
+
return [this.name, this.checked];
|
66
|
+
}
|
67
|
+
};
|
68
|
+
__decorate([
|
69
|
+
property({ type: Boolean, reflect: true })
|
70
|
+
], Switch.prototype, "round", void 0);
|
71
|
+
__decorate([
|
72
|
+
property({ type: Boolean, reflect: true })
|
73
|
+
], Switch.prototype, "checked", void 0);
|
74
|
+
__decorate([
|
75
|
+
property({ type: Boolean, reflect: true })
|
76
|
+
], Switch.prototype, "disabled", void 0);
|
77
|
+
__decorate([
|
78
|
+
property()
|
79
|
+
], Switch.prototype, "default", void 0);
|
80
|
+
__decorate([
|
81
|
+
property()
|
82
|
+
], Switch.prototype, "value", void 0);
|
83
|
+
__decorate([
|
84
|
+
query("input")
|
85
|
+
], Switch.prototype, "_input", void 0);
|
86
|
+
Switch = __decorate([
|
87
|
+
godown(protoName),
|
88
|
+
styles(css `:host{${cssScope}-width:3em;${cssScope}-height:calc(var(${cssScope}-width)/ 2);${cssScope}-handle-size:1.25em;${cssScope}-transition:.2s ease-in-out;background:var(${cssGlobalVars.input}-background);width:var(${cssScope}-width);height:var(${cssScope}-height);display:inline-block;vertical-align:bottom;border-radius:0}[part=root],span{transition:var(${cssScope}-transition)}[part=root]{border-radius:inherit;position:relative;height:inherit}[part=root],input{width:100%}input{margin:0;height:100%;outline:0;-webkit-appearance:none;appearance:none}span{height:100%;display:inline-flex;align-items:center;justify-content:center;position:absolute;left:0;width:50%;pointer-events:none;border-radius:inherit}:host([round]){border-radius:calc(var(${cssScope}-height)/ 2)}:host([checked]) span{transform:translateX(100%)}.rect .true{background:var(${cssGlobalVars.active})}.rect .false{background:var(${cssGlobalVars.passive})}.round span::after{--size:var(${cssScope}-handle-size);content:"";border-radius:100%;background:var(--godown--input-control);width:var(--size);height:var(--size)}.round{background:var(${cssGlobalVars.passive})}:host([checked]) .round{background:var(${cssGlobalVars.active})}`)
|
89
|
+
], Switch);
|
90
|
+
var Switch$1 = Switch;
|
91
|
+
|
92
|
+
export { Switch$1 as default };
|
93
|
+
//# sourceMappingURL=switch.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"switch.js","sources":["../src/components/switch.ts"],"sourcesContent":null,"names":[],"mappings":";;;;;;;;AAQA,MAAM,SAAS,GAAG,QAAQ,CAAC;AAC3B,MAAM,QAAQ,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC;AAExC;;;;;;;AAOG;AAKH,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,UAAU,CAAA;AAA/B,IAAA,WAAA,GAAA;;AACE;;AAEG;QAEH,IAAK,CAAA,KAAA,GAAG,KAAK,CAAC;AACd;;AAEG;QAEH,IAAO,CAAA,OAAA,GAAG,KAAK,CAAC;AAChB;;AAEG;QAEH,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;AACjB;;AAEG;QAEH,IAAO,CAAA,OAAA,GAAG,OAAO,CAAC;AAClB;;AAEG;QAEH,IAAK,CAAA,KAAA,GAAG,IAAI,CAAC;KA6Cd;IAxCW,MAAM,G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AAQ,CAAsY,4XAAA,EAAA,QAAQ,4FAA6F,aAAa,CAAC,MAAM,CAAiC,8BAAA,EAAA,aAAa,CAAC,OAAO,CAAA,gCAAA,EAAmC,QAAQ,CAAkJ,+IAAA,EAAA,aAAa,CAAC,OAAO,CAAA,yCAAA,EAA4C,aAAa,CAAC,MAAM,IAAI,CAC3rC;AACK,CAAA,EAAA,MAAM,CAsEX,CAAA;AAED,eAAe,MAAM;;;;"}
|
@@ -1,8 +1,10 @@
|
|
1
|
-
import {
|
1
|
+
import { GlobalStyle } from "../core/global-style.js";
|
2
2
|
/**
|
3
|
-
* {@linkcode Text
|
3
|
+
* {@linkcode Text} renders nowrap text.
|
4
|
+
*
|
5
|
+
* @category display
|
4
6
|
*/
|
5
|
-
|
7
|
+
declare class Text extends GlobalStyle {
|
6
8
|
/**
|
7
9
|
* Underline behavior.
|
8
10
|
*/
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../src/components/text.ts"],"names":[],"mappings":"AAOA,OAAO,EAAiB,WAAW,EAAe,MAAM,yBAAyB,CAAC;AAMlF;;;;GAIG;AACH,cAEM,IAAK,SAAQ,WAAW;IAC5B;;OAEG;IAEH,SAAS,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAU;IAE3D;;OAEG;IAEH,IAAI,EAAE,OAAO,CAAC;IAEd,SAAS,CAAC,MAAM;CAOjB;AAED,eAAe,IAAI,CAAC"}
|
@@ -0,0 +1,44 @@
|
|
1
|
+
import { __decorate } from 'tslib';
|
2
|
+
import { godown } from '@godown/element/decorators/godown.js';
|
3
|
+
import { styles } from '@godown/element/decorators/styles.js';
|
4
|
+
import { classList } from '@godown/element/directives/class-list.js';
|
5
|
+
import { htmlSlot } from '@godown/element/directives/html-slot.js';
|
6
|
+
import { css, html } from 'lit';
|
7
|
+
import { property } from 'lit/decorators.js';
|
8
|
+
import { scopePrefix, cssGlobalVars, GlobalStyle } from '../core/global-style.js';
|
9
|
+
|
10
|
+
const protoName = "text";
|
11
|
+
const cssScope = scopePrefix(protoName);
|
12
|
+
/**
|
13
|
+
* {@linkcode Text} renders nowrap text.
|
14
|
+
*
|
15
|
+
* @category display
|
16
|
+
*/
|
17
|
+
let Text = class Text extends GlobalStyle {
|
18
|
+
constructor() {
|
19
|
+
super(...arguments);
|
20
|
+
/**
|
21
|
+
* Underline behavior.
|
22
|
+
*/
|
23
|
+
this.underline = "none";
|
24
|
+
}
|
25
|
+
render() {
|
26
|
+
return html `<span part="root" class="${classList(this.underline, {
|
27
|
+
clip: this.clip,
|
28
|
+
})}">${htmlSlot()}</span>`;
|
29
|
+
}
|
30
|
+
};
|
31
|
+
__decorate([
|
32
|
+
property()
|
33
|
+
], Text.prototype, "underline", void 0);
|
34
|
+
__decorate([
|
35
|
+
property({ type: Boolean })
|
36
|
+
], Text.prototype, "clip", void 0);
|
37
|
+
Text = __decorate([
|
38
|
+
godown(protoName),
|
39
|
+
styles(css `:host{${cssScope}--color:currentColor;${cssScope}--color-hover:currentColor;${cssScope}--color-active:currentColor;display:inline-block;text-overflow:ellipsis;overflow-wrap:break-word}span{white-space:nowrap;width:100%;vertical-align:bottom;display:inline-block;text-overflow:inherit;overflow-wrap:inherit;overflow:hidden;color:var(${cssScope}--color)}span:hover{color:var(${cssScope}--color-hover,var(${cssScope}--color))}span:active{color:var(${cssScope}--color-active,var(${cssScope}--color))}.active:active,.always,.hover:hover{text-decoration:underline}.none{text-decoration:none}.clip{background:var(${cssGlobalVars.clipBackground});display:inline-block;color:transparent;-webkit-text-fill-color:transparent;background-clip:text;-webkit-background-clip:text}`)
|
40
|
+
], Text);
|
41
|
+
var Text$1 = Text;
|
42
|
+
|
43
|
+
export { Text$1 as default };
|
44
|
+
//# sourceMappingURL=text.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"text.js","sources":["../src/components/text.ts"],"sourcesContent":null,"names":[],"mappings":";;;;;;;;;AASA,MAAM,SAAS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} from "../core/global-style.js";
|
3
3
|
/**
|
4
4
|
* {@linkcode Time} renders a formatting time.
|
5
|
+
*
|
6
|
+
* @category display
|
5
7
|
*/
|
6
|
-
|
8
|
+
declare class Time extends GlobalStyle {
|
7
9
|
/**
|
8
10
|
* Cancels the next character formatting.
|
9
11
|
*/
|
@@ -38,7 +40,7 @@ export declare class Time extends GodownElement {
|
|
38
40
|
* h for hour\
|
39
41
|
* m for minute\
|
40
42
|
* s for second\
|
41
|
-
* S for milli
|
43
|
+
* S for milli second\
|
42
44
|
* Z for time zone.
|
43
45
|
*
|
44
46
|
* @param fm Format string.
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../src/components/time.ts"],"names":[],"mappings":"AAEA,OAAO,EAAO,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAG/C,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAItD;;;;GAIG;AACH,cAEM,IAAK,SAAQ,WAAW;IAC5B;;OAEG;IAEH,MAAM,SAAO;IACb;;;OAGG;IAEH,MAAM,SAA8B;IACpC;;OAEG;IAEH,IAAI,OAAc;IAClB;;OAEG;IAEH,OAAO,SAAK;IACZ;;OAEG;IAEH,GAAG,SAAK;IAER,SAAS,EAAE,MAAM,CAAC;IAElB,SAAS,CAAC,MAAM,IAAI,MAAM;IAI1B,SAAS,CAAC,YAAY;IAMtB,SAAS,CAAC,OAAO,CAAC,iBAAiB,EAAE,cAAc,GAAG,IAAI;IAS1D,oBAAoB;IAIpB,YAAY;IAMZ;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM;CAwCrD;AAED,eAAe,IAAI,CAAC"}
|
@@ -1,14 +1,18 @@
|
|
1
|
+
import { __decorate } from 'tslib';
|
2
|
+
import { godown } from '@godown/element/decorators/godown.js';
|
3
|
+
import { styles } from '@godown/element/decorators/styles.js';
|
4
|
+
import { css } from 'lit';
|
5
|
+
import { property } from 'lit/decorators.js';
|
6
|
+
import { GlobalStyle } from '../core/global-style.js';
|
7
|
+
|
1
8
|
var Time_1;
|
2
|
-
import { __decorate } from "tslib";
|
3
|
-
import { css, property } from "../../_deps.js";
|
4
|
-
import { godown } from "../../decorators/godown.js";
|
5
|
-
import styles from "../../decorators/styles.js";
|
6
|
-
import { GodownElement } from "../../proto/godown-element.js";
|
7
9
|
const protoName = "time";
|
8
10
|
/**
|
9
11
|
* {@linkcode Time} renders a formatting time.
|
12
|
+
*
|
13
|
+
* @category display
|
10
14
|
*/
|
11
|
-
let Time = Time_1 = class Time extends
|
15
|
+
let Time = Time_1 = class Time extends GlobalStyle {
|
12
16
|
constructor() {
|
13
17
|
super(...arguments);
|
14
18
|
/**
|
@@ -53,7 +57,7 @@ let Time = Time_1 = class Time extends GodownElement {
|
|
53
57
|
clearInterval(this.timeoutId);
|
54
58
|
}
|
55
59
|
startTimeout() {
|
56
|
-
return setInterval(() => {
|
60
|
+
return window.setInterval(() => {
|
57
61
|
this.time = new Date(this.time.getTime() + (this.gap || this.timeout));
|
58
62
|
}, Math.abs(this.timeout));
|
59
63
|
}
|
@@ -64,7 +68,7 @@ let Time = Time_1 = class Time extends GodownElement {
|
|
64
68
|
* h for hour\
|
65
69
|
* m for minute\
|
66
70
|
* s for second\
|
67
|
-
* S for milli
|
71
|
+
* S for milli second\
|
68
72
|
* Z for time zone.
|
69
73
|
*
|
70
74
|
* @param fm Format string.
|
@@ -107,9 +111,7 @@ let Time = Time_1 = class Time extends GodownElement {
|
|
107
111
|
return result
|
108
112
|
.reverse()
|
109
113
|
.join("")
|
110
|
-
.replace(new RegExp(replaced, "g"), () =>
|
111
|
-
return rest.shift();
|
112
|
-
});
|
114
|
+
.replace(new RegExp(replaced, "g"), () => rest.shift());
|
113
115
|
}
|
114
116
|
};
|
115
117
|
__decorate([
|
@@ -129,14 +131,9 @@ __decorate([
|
|
129
131
|
], Time.prototype, "gap", void 0);
|
130
132
|
Time = Time_1 = __decorate([
|
131
133
|
godown(protoName),
|
132
|
-
styles(
|
133
|
-
css `
|
134
|
-
:host {
|
135
|
-
text-align: center;
|
136
|
-
}
|
137
|
-
`,
|
138
|
-
])
|
134
|
+
styles(css `:host{text-align:center}`)
|
139
135
|
], Time);
|
140
|
-
|
141
|
-
|
142
|
-
|
136
|
+
var Time$1 = Time;
|
137
|
+
|
138
|
+
export { Time$1 as default };
|
139
|
+
//# sourceMappingURL=time.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"time.js","sources":["../src/components/time.ts"],"sourcesContent":null,"names":[],"mappings":";;;;;;;;AAOA,MAAM,SAAS,GAAG,MAAM,CAAC;AAEzB;;;;AAIG;AAGH,IAAM,IAAI,GAAA,MAAA,GAAV,MAAM,IAAK,SAAQ,WAAW,CAAA;AAA9B,IAAA,WAAA,GAAA;;AACE;;AAEG;QAEH,IAAM,CAAA,MAAA,GAAG,GAAG,CAAC;AACb;;;AAGG;QAEH,IAAM,CAAA,MAAA,GAAG,0BAA0B,CAAC;AACpC;;AAEG;AAEH,QAAA,IAAA,CAAA,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;AAClB;;AAEG;QAEH,IAAO,CAAA,OAAA,GAAG,CAAC,CAAC;AACZ;;AAEG;QAEH,IAAG,CAAA,GAAA,GAAG,CAAC,CAAC;KAuFT;IAnFW,MAAM,GAAA;AACd,QAAA,OAAO,MAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;KACtD;IAES,YAAY,GAAA;AACpB,QAAA,IAAI,IAAI,CAAC,OAAO,EAAE;AAChB,YAAA,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;SACtC;KACF;AAES,IAAA,OAAO,CAAC,iBAAiC,EAAA;AACjD,QAAA,IAAI,iBAAiB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"}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import SuperOpenable, { type Direction8 } from "../core/super-openable.js";
|
2
|
+
/**
|
3
|
+
* {@linkcode Tooltip} provide tooltip for slot elements.
|
4
|
+
*
|
5
|
+
* If it has the tip property, ignore the slot tip.
|
6
|
+
*
|
7
|
+
* @slot tip - Tip element.
|
8
|
+
* @slot - Content.
|
9
|
+
* @category feedback
|
10
|
+
*/
|
11
|
+
declare class Tooltip extends SuperOpenable {
|
12
|
+
/**
|
13
|
+
* Tip text, if there is a value, the slot will be ignored.
|
14
|
+
*/
|
15
|
+
tip: string;
|
16
|
+
/**
|
17
|
+
* Direction of opening the tip.
|
18
|
+
*/
|
19
|
+
direction: Direction8;
|
20
|
+
/**
|
21
|
+
* Content alignment.
|
22
|
+
*/
|
23
|
+
align: "center" | "flex-start" | "flex-end" | "start" | "end";
|
24
|
+
/**
|
25
|
+
* If true, allow penetration of the tip.
|
26
|
+
*/
|
27
|
+
propagation: boolean;
|
28
|
+
static aligns: {
|
29
|
+
start: string;
|
30
|
+
end: string;
|
31
|
+
center: string;
|
32
|
+
"flex-start": string;
|
33
|
+
"flex-end": string;
|
34
|
+
};
|
35
|
+
protected render(): import("lit").TemplateResult<1>;
|
36
|
+
}
|
37
|
+
export default Tooltip;
|
38
|
+
//# sourceMappingURL=tooltip.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../src/components/tooltip.ts"],"names":[],"mappings":"AAOA,OAAO,aAAa,EAAE,EAAE,KAAK,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAK3E;;;;;;;;GAQG;AACH,cAKM,OAAQ,SAAQ,aAAa;IACjC;;OAEG;IAEH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IAEH,SAAS,EAAE,UAAU,CAAS;IAC9B;;OAEG;IAEH,KAAK,EAAE,QAAQ,GAAG,YAAY,GAAG,UAAU,GAAG,OAAO,GAAG,KAAK,CAAY;IAEzE;;OAEG;IAEH,WAAW,EAAE,OAAO,CAAC;IAErB,MAAM,CAAC,MAAM;;;;;;MAMX;IAEF,SAAS,CAAC,MAAM;CAQjB;AAED,eAAe,OAAO,CAAC"}
|
@@ -0,0 +1,67 @@
|
|
1
|
+
import { __decorate } from 'tslib';
|
2
|
+
import { godown } from '@godown/element/decorators/godown.js';
|
3
|
+
import { styles } from '@godown/element/decorators/styles.js';
|
4
|
+
import { htmlSlot } from '@godown/element/directives/html-slot.js';
|
5
|
+
import { css, html } from 'lit';
|
6
|
+
import { property } from 'lit/decorators.js';
|
7
|
+
import { scopePrefix, cssGlobalVars } from '../core/global-style.js';
|
8
|
+
import SuperOpenable from '../core/super-openable.js';
|
9
|
+
|
10
|
+
var Tooltip_1;
|
11
|
+
const protoName = "tooltip";
|
12
|
+
const cssScope = scopePrefix(protoName);
|
13
|
+
/**
|
14
|
+
* {@linkcode Tooltip} provide tooltip for slot elements.
|
15
|
+
*
|
16
|
+
* If it has the tip property, ignore the slot tip.
|
17
|
+
*
|
18
|
+
* @slot tip - Tip element.
|
19
|
+
* @slot - Content.
|
20
|
+
* @category feedback
|
21
|
+
*/
|
22
|
+
let Tooltip = Tooltip_1 = class Tooltip extends SuperOpenable {
|
23
|
+
constructor() {
|
24
|
+
super(...arguments);
|
25
|
+
/**
|
26
|
+
* Direction of opening the tip.
|
27
|
+
*/
|
28
|
+
this.direction = "top";
|
29
|
+
/**
|
30
|
+
* Content alignment.
|
31
|
+
*/
|
32
|
+
this.align = "center";
|
33
|
+
}
|
34
|
+
render() {
|
35
|
+
const align = Tooltip_1.aligns[this.align] || "inherit";
|
36
|
+
return html `<div part="root" style="justify-content:${align};align-items:${align}">${htmlSlot()}<div part="tip" direction="${this.direction}" style="pointer-events:${this.propagation ? "none" : "all"}">${this.tip
|
37
|
+
? html `<span class="passive">${this.tip}</span>`
|
38
|
+
: htmlSlot("tip")}</div></div>`;
|
39
|
+
}
|
40
|
+
};
|
41
|
+
Tooltip.aligns = {
|
42
|
+
start: "flex-start",
|
43
|
+
end: "flex-end",
|
44
|
+
center: "center",
|
45
|
+
"flex-start": "flex-start",
|
46
|
+
"flex-end": "flex-end",
|
47
|
+
};
|
48
|
+
__decorate([
|
49
|
+
property()
|
50
|
+
], Tooltip.prototype, "tip", void 0);
|
51
|
+
__decorate([
|
52
|
+
property()
|
53
|
+
], Tooltip.prototype, "direction", void 0);
|
54
|
+
__decorate([
|
55
|
+
property()
|
56
|
+
], Tooltip.prototype, "align", void 0);
|
57
|
+
__decorate([
|
58
|
+
property({ type: Boolean })
|
59
|
+
], Tooltip.prototype, "propagation", void 0);
|
60
|
+
Tooltip = Tooltip_1 = __decorate([
|
61
|
+
godown(protoName),
|
62
|
+
styles(css `:host{${cssScope}--tip-background:var(${cssGlobalVars.background});display:inline-block;width:-moz-fit-content;width:fit-content}[part=root]{display:flex;position:relative;transition:inherit;border-radius:inherit}[part=tip]{width:-moz-fit-content;width:fit-content;height:-moz-fit-content;height:fit-content;position:absolute;visibility:hidden;transition:inherit;-webkit-user-select:none;user-select:none}:host(:hover) [part=tip],:host([open]) [part=tip],[part=tip]:hover{visibility:visible}.passive{background:var(${cssScope}--tip-background);padding:0 .5em}`, css `[direction^=top]{bottom:100%}[direction^=bottom]{top:100%}[direction$=right]{left:100%}[direction$=left]{right:100%}`)
|
63
|
+
], Tooltip);
|
64
|
+
var Tooltip$1 = Tooltip;
|
65
|
+
|
66
|
+
export { Tooltip$1 as default };
|
67
|
+
//# sourceMappingURL=tooltip.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"tooltip.js","sources":["../src/components/tooltip.ts"],"sourcesContent":null,"names":[],"mappings":";;;;;;;;;;AASA,MAAM,SAAS,GAAG,SAAS,CAAC;AAC5B,MAAM,QAAQ,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC;AAExC;;;;;;;;AAQG;AAMH,IAAM,OAAO,GAAA,SAAA,GAAb,MAAM,OAAQ,SAAQ,aAAa,CAAA;AAA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AAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AACP,CAAA,EAAA,OAAA,CAAA,SAAA,EAAA,aAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AArBjB,OAAO,GAAA,SAAA,GAAA,UAAA,CAAA;IALZ,MAAM,CAAC,SAAS,CAAC;AACjB,IAAA,MAAM,CACL,GAAG,CAAA,CAAS,MAAA,EAAA,QAAQ,wBAAwB,aAAa,CAAC,UAAU,CAAA,kcAAA,EAA+c,QAAQ,CAAmC,iCAAA,CAAA,EAC9jB,GAAG,CAAA,sHAA8H,CAClI;AACK,CAAA,EAAA,OAAO,CA2CZ,CAAA;AAED,gBAAe,OAAO;;;;"}
|
@@ -1,9 +1,11 @@
|
|
1
|
-
import { type PropertyValueMap } from "
|
2
|
-
import {
|
1
|
+
import { type PropertyValueMap } from "lit";
|
2
|
+
import { GlobalStyle } from "../core/global-style.js";
|
3
3
|
/**
|
4
4
|
* {@linkcode Typewriter} renders a typewriter effect to text.
|
5
|
+
*
|
6
|
+
* @category effect
|
5
7
|
*/
|
6
|
-
|
8
|
+
declare class Typewriter extends GlobalStyle {
|
7
9
|
/**
|
8
10
|
* Raw text.
|
9
11
|
*/
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"typewriter.d.ts","sourceRoot":"","sources":["../src/components/typewriter.ts"],"names":[],"mappings":"AAKA,OAAO,EAAa,KAAK,gBAAgB,EAAE,MAAM,KAAK,CAAC;AAGvD,OAAO,EAAE,WAAW,EAAe,MAAM,yBAAyB,CAAC;AAKnE;;;;GAIG;AACH,cAEM,UAAW,SAAQ,WAAW;IAClC;;OAEG;IAEH,IAAI,SAAM;IACV;;OAEG;IAEH,OAAO,UAAS;IAChB;;OAEG;IAEH,KAAK,UAAS;IACd;;OAEG;IAEH,GAAG,SAAO;IACV;;OAEG;IAEH,GAAG,SAAM;IACT;;OAEG;IAEH,KAAK,SAAK;IACV;;OAEG;IAEH,KAAK,SAAK;IACV;;OAEG;IAEH,OAAO,SAAM;IAEb,SAAS,EAAE,MAAM,CAAC;IAElB,EAAE,EAAE,WAAW,CAAC;IAEhB;;OAEG;IACH,IAAI,GAAG,WAEN;IAED,SAAS,CAAC,MAAM;IAQhB,SAAS,CAAC,YAAY;IAStB,SAAS,CAAC,OAAO,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,IAAI,CAAC;IAM3D,KAAK,CAAC,EAAE,SAAa;IAYrB,IAAI;IAIJ,GAAG;CAGJ;AAED,eAAe,UAAU,CAAC"}
|
@@ -1,17 +1,21 @@
|
|
1
|
-
import { __decorate } from
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
5
|
-
import { htmlSlot } from
|
6
|
-
import { random } from
|
7
|
-
import {
|
8
|
-
import {
|
1
|
+
import { __decorate } from 'tslib';
|
2
|
+
import { godown } from '@godown/element/decorators/godown.js';
|
3
|
+
import { styles } from '@godown/element/decorators/styles.js';
|
4
|
+
import { classList } from '@godown/element/directives/class-list.js';
|
5
|
+
import { htmlSlot } from '@godown/element/directives/html-slot.js';
|
6
|
+
import { random } from '@godown/element/tools/lib.js';
|
7
|
+
import { css, html } from 'lit';
|
8
|
+
import { property, state, query } from 'lit/decorators.js';
|
9
|
+
import { scopePrefix, GlobalStyle } from '../core/global-style.js';
|
10
|
+
|
9
11
|
const protoName = "typewriter";
|
10
|
-
const cssScope =
|
12
|
+
const cssScope = scopePrefix(protoName);
|
11
13
|
/**
|
12
14
|
* {@linkcode Typewriter} renders a typewriter effect to text.
|
15
|
+
*
|
16
|
+
* @category effect
|
13
17
|
*/
|
14
|
-
let Typewriter = class Typewriter extends
|
18
|
+
let Typewriter = class Typewriter extends GlobalStyle {
|
15
19
|
constructor() {
|
16
20
|
super(...arguments);
|
17
21
|
/**
|
@@ -54,11 +58,13 @@ let Typewriter = class Typewriter extends GodownElement {
|
|
54
58
|
return this.text.length;
|
55
59
|
}
|
56
60
|
render() {
|
57
|
-
return html `${htmlSlot()}${this.content}<i part="cursor" class="${(
|
61
|
+
return html `${htmlSlot()}${this.content}<i part="cursor" class="${classList({
|
62
|
+
hidden: this.ended,
|
63
|
+
})}"></i>`;
|
58
64
|
}
|
59
65
|
firstUpdated() {
|
60
66
|
if (!this.text) {
|
61
|
-
this.text = this.assignedNodes[0]?.textContent.trim() || "";
|
67
|
+
this.text = this._slot?.assignedNodes()[0]?.textContent.trim() || "";
|
62
68
|
}
|
63
69
|
if (!this.stopped && this.len) {
|
64
70
|
this.write();
|
@@ -72,7 +78,7 @@ let Typewriter = class Typewriter extends GodownElement {
|
|
72
78
|
write(at = this.index) {
|
73
79
|
this.content = this.text.slice(0, at + 1);
|
74
80
|
const timeout = this.delay || random(this.max, this.min);
|
75
|
-
this.timeoutID = setTimeout(() => {
|
81
|
+
this.timeoutID = window.setTimeout(() => {
|
76
82
|
const nx = at + 1;
|
77
83
|
if (nx <= this.len) {
|
78
84
|
this.index = nx;
|
@@ -116,39 +122,9 @@ __decorate([
|
|
116
122
|
], Typewriter.prototype, "_i", void 0);
|
117
123
|
Typewriter = __decorate([
|
118
124
|
godown(protoName),
|
119
|
-
styles(
|
120
|
-
css `
|
121
|
-
:host {
|
122
|
-
--${cssScope}--cursor-width: .05em;
|
123
|
-
font-family: monospace;
|
124
|
-
white-space: nowrap;
|
125
|
-
}
|
126
|
-
|
127
|
-
i {
|
128
|
-
border-right: var(--${cssScope}--cursor-width) solid;
|
129
|
-
margin-left: 0.02em;
|
130
|
-
animation: s 1.5s steps(1) infinite;
|
131
|
-
}
|
132
|
-
|
133
|
-
@keyframes s {
|
134
|
-
0% {
|
135
|
-
border-color: currentColor;
|
136
|
-
}
|
137
|
-
50% {
|
138
|
-
border-color: transparent;
|
139
|
-
}
|
140
|
-
}
|
141
|
-
|
142
|
-
slot {
|
143
|
-
display: none;
|
144
|
-
}
|
145
|
-
|
146
|
-
.hidden {
|
147
|
-
visibility: hidden;
|
148
|
-
}
|
149
|
-
`,
|
150
|
-
])
|
125
|
+
styles(css `:host{${cssScope}--cursor-width:.05em;font-family:monospace;white-space:nowrap}i{border-right:var(${cssScope}--cursor-width) solid;margin-left:.02em;animation:s 1.5s steps(1) infinite}@keyframes s{0%{border-color:currentColor}50%{border-color:transparent}}slot{display:none}.hidden{visibility:hidden}`)
|
151
126
|
], Typewriter);
|
152
|
-
|
153
|
-
|
154
|
-
|
127
|
+
var Typewriter$1 = Typewriter;
|
128
|
+
|
129
|
+
export { Typewriter$1 as default };
|
130
|
+
//# sourceMappingURL=typewriter.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"typewriter.js","sources":["../src/components/typewriter.ts"],"sourcesContent":null,"names":[],"mappings":";;;;;;;;;;AAUA,MAAM,SAAS,GAAG,YAAY,CAAC;AAC/B,MAAM,QAAQ,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC;AAExC;;;;AAIG;AAGH,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,WAAW,CAAA;AAApC,IAAA,WAAA,GAAA;;AACE;;AAEG;QAEH,IAAI,CAAA,IAAA,GAAG,EAAE,CAAC;AACV;;AAEG;QAEH,IAAO,CAAA,OAAA,GAAG,KAAK,CAAC;AAChB;;AAEG;QAEH,IAAK,CAAA,KAAA,GAAG,KAAK,CAAC;AACd;;AAEG;QAEH,IAAG,CAAA,GAAA,GAAG,GAAG,CAAC;AACV;;AAEG;QAEH,IAAG,CAAA,GAAA,GAAG,EAAE,CAAC;AACT;;AAEG;QAEH,IAAK,CAAA,KAAA,GAAG,CAAC,CAAC;AACV;;AAEG;QAEH,IAAK,CAAA,KAAA,GAAG,CAAC,CAAC;AACV;;AAEG;QAEH,IAAO,CAAA,OAAA,GAAG,EAAE,CAAC;KAuDd;AAjDC;;AAEG;AACH,IAAA,IAAI,GAAG,GAAA;AACL,QAAA,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;KACzB;IAES,MAAM,GAAA;QACd,OAAO,IAAI,CAAA,CAAA,EAAG,QAAQ,EAAE,CAAG,EAAA,IAAI,CAAC,OAAO,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UAAA,CAAA,SAAA,EAAA,OAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAKV,UAAA,CAAA;AADC,IAAA,KAAK,EAAE;AACK,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,SAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAIb,UAAA,CAAA;IADC,KAAK,CAAC,GAAG,CAAC;AACK,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,IAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AA5CZ,UAAU,GAAA,UAAA,CAAA;IAFf,MAAM,CAAC,SAAS,CAAC;IACjB,MAAM,CAAC,GAAG,CAAA,CAAA,MAAA,EAAS,QAAQ,CAAoF,iFAAA,EAAA,QAAQ,iMAAkM,CAAC;AACrT,CAAA,EAAA,UAAU,CA+Ff,CAAA;AAED,mBAAe,UAAU;;;;"}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { type Gradients, presetsRGB } from "@godown/colors/presets-rgb.js";
|
2
|
+
import GodownElement from "@godown/element";
|
3
|
+
import { CSSResult } from "lit";
|
4
|
+
export declare class GlobalStyle extends GodownElement {
|
5
|
+
}
|
6
|
+
export declare function scopePrefix(scope: string, len?: number): CSSResult;
|
7
|
+
export declare function variablePrefix(variable: string): CSSResult;
|
8
|
+
export declare const cssGlobalVars: {
|
9
|
+
foreground: CSSResult;
|
10
|
+
background: CSSResult;
|
11
|
+
clipBackground: CSSResult;
|
12
|
+
active: CSSResult;
|
13
|
+
passive: CSSResult;
|
14
|
+
_colors: PresetsGradientsCSSResult;
|
15
|
+
input: CSSResult;
|
16
|
+
white: CSSResult;
|
17
|
+
black: CSSResult;
|
18
|
+
};
|
19
|
+
type PresetsGradientsCSSResult = Record<keyof typeof presetsRGB, Gradients<CSSResult>>;
|
20
|
+
export {};
|
21
|
+
//# sourceMappingURL=global-style.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"global-style.d.ts","sourceRoot":"","sources":["../src/core/global-style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3E,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAAO,SAAS,EAAa,MAAM,KAAK,CAAC;AAIhD,qBAAa,WAAY,SAAQ,aAAa;CAC7C;AAID,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,SAAI,aAEjD;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,aAE9C;AAED,eAAO,MAAM,aAAa;;;;;;;;;;CAUzB,CAAC;AAEF,KAAK,yBAAyB,GAAG,MAAM,CAAC,MAAM,OAAO,UAAU,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC"}
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import { presetsRGB } from '@godown/colors/presets-rgb.js';
|
2
|
+
import { travel } from '@godown/colors/travel.js';
|
3
|
+
import GodownElement from '@godown/element';
|
4
|
+
import GodownConfig from '@godown/element/config.js';
|
5
|
+
import { trim } from '@godown/element/tools/lib.js';
|
6
|
+
import { unsafeCSS, css } from 'lit';
|
7
|
+
|
8
|
+
GodownElement.godownConfig ||= new GodownConfig();
|
9
|
+
class GlobalStyle extends GodownElement {
|
10
|
+
}
|
11
|
+
const cssvar = trim(GlobalStyle.godownConfig.prefix, "-");
|
12
|
+
function scopePrefix(scope, len = 1) {
|
13
|
+
return variablePrefix(cssvar + "-".repeat(len) + scope);
|
14
|
+
}
|
15
|
+
function variablePrefix(variable) {
|
16
|
+
return unsafeCSS("--" + variable);
|
17
|
+
}
|
18
|
+
const cssGlobalVars = {
|
19
|
+
foreground: scopePrefix("foreground", 2),
|
20
|
+
background: scopePrefix("background", 2),
|
21
|
+
clipBackground: scopePrefix("clip-background", 2),
|
22
|
+
active: scopePrefix("active", 2),
|
23
|
+
passive: scopePrefix("passive", 2),
|
24
|
+
_colors: {},
|
25
|
+
input: scopePrefix("input", 2),
|
26
|
+
white: scopePrefix("color-white", 2),
|
27
|
+
black: scopePrefix("color-black", 2),
|
28
|
+
};
|
29
|
+
GlobalStyle.styles = [
|
30
|
+
unsafeCSS(":host{"
|
31
|
+
+ `${cssGlobalVars.black}:rgb(0 0 0);`
|
32
|
+
+ `${cssGlobalVars.white}:rgb(255 255 255);`
|
33
|
+
+ travel((key, gradient, rgb) => {
|
34
|
+
cssGlobalVars._colors[key] ||= [];
|
35
|
+
cssGlobalVars._colors[key].push(unsafeCSS(scopePrefix("color", 2) + "-" + key + "-" + gradient));
|
36
|
+
const endKey = `-${key}-${gradient}`;
|
37
|
+
const colorKey = scopePrefix("color", 2) + endKey;
|
38
|
+
return `${colorKey}:rgb(${rgb});`;
|
39
|
+
}, presetsRGB).join("")
|
40
|
+
+ "}"),
|
41
|
+
css `:host{${cssGlobalVars.background}:var(${cssGlobalVars._colors.darkgray[9]});${cssGlobalVars.foreground}:var(${cssGlobalVars._colors.lightgray[0]});${cssGlobalVars.active}:var(${cssGlobalVars._colors.blue[6]});${cssGlobalVars.passive}:var(${cssGlobalVars._colors.darkgray[6]});${cssGlobalVars.clipBackground}:linear-gradient(180deg,var(${cssGlobalVars.foreground}),var(${cssGlobalVars.passive}))}`,
|
42
|
+
css `*{border:0;outline:0;margin:0;padding:0;font-size:100%;font-style:normal;box-sizing:border-box}:host{box-sizing:border-box}a{text-decoration:none}span{white-space:nowrap}svg{-webkit-user-select:none;user-select:none}`,
|
43
|
+
];
|
44
|
+
|
45
|
+
export { GlobalStyle, cssGlobalVars, scopePrefix, variablePrefix };
|
46
|
+
//# sourceMappingURL=global-style.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"global-style.js","sources":["../src/core/global-style.ts"],"sourcesContent":null,"names":[],"mappings":";;;;;;;AAOA,aAAa,CAAC,YAAY,KAAK,IAAI,YAAY,EAAE,CAAC;AAE5C,MAAO,WAAY,SAAQ,aAAa,CAAA;AAC7C,CAAA;AAED,MAAM,MAAM,GAAG,IAAI,CAAC,W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: string;
|
7
|
+
/**
|
8
|
+
* A element target.
|
9
|
+
*/
|
10
|
+
target: "_blank" | "_self" | "_parent" | "_top";
|
11
|
+
protected render(): import("lit").TemplateResult<1>;
|
12
|
+
protected _handleClick(_: MouseEvent): void;
|
13
|
+
}
|
14
|
+
export default SuperAnchor;
|
15
|
+
//# sourceMappingURL=super-anchor.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"super-anchor.d.ts","sourceRoot":"","sources":["../src/core/super-anchor.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,cACM,WAAY,SAAQ,WAAW;IACnC;;OAEG;IAEH,IAAI,EAAE,MAAM,CAAa;IACzB;;OAEG;IAEH,MAAM,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAW;IAE1D,SAAS,CAAC,MAAM;IAKhB,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,UAAU;CACrC;AAED,eAAe,WAAW,CAAC"}
|