godown 3.0.0-canary.9 → 3.0.1
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 +38 -9
- package/alert.d.ts +1 -0
- package/alert.d.ts.map +1 -1
- package/alert.js +1 -5
- package/alert.js.map +1 -1
- package/avatar.d.ts +1 -0
- package/avatar.d.ts.map +1 -1
- package/avatar.js +1 -5
- package/avatar.js.map +1 -1
- package/badge.d.ts +9 -0
- package/badge.d.ts.map +1 -0
- package/badge.js +2 -0
- package/badge.js.map +1 -0
- package/breath.js +1 -5
- package/breath.js.map +1 -1
- package/build/godown+lit.iife.js +59 -0
- package/build/godown+lit.iife.js.map +1 -0
- package/build/godown+lit.js +59 -0
- package/build/godown+lit.js.map +1 -0
- package/build/godown+lit.umd.js +59 -0
- package/build/godown+lit.umd.js.map +1 -0
- package/build/godown.iife.js +47 -0
- package/build/godown.js +48 -0
- package/build/godown.js.map +1 -0
- package/build/godown.umd.js +48 -0
- package/build/godown.umd.js.map +1 -0
- package/button.d.ts +1 -0
- package/button.d.ts.map +1 -1
- package/button.js +1 -5
- package/button.js.map +1 -1
- package/card.d.ts +1 -0
- package/card.d.ts.map +1 -1
- package/card.js +1 -5
- package/card.js.map +1 -1
- package/carousel.d.ts +1 -0
- package/carousel.d.ts.map +1 -1
- package/carousel.js +1 -5
- package/carousel.js.map +1 -1
- package/components/alert.d.ts +4 -1
- package/components/alert.d.ts.map +1 -1
- package/components/alert.js +1 -176
- package/components/alert.js.map +1 -1
- package/components/avatar.d.ts +7 -2
- package/components/avatar.d.ts.map +1 -1
- package/components/avatar.js +1 -62
- package/components/avatar.js.map +1 -1
- package/components/badge.d.ts +23 -0
- package/components/badge.d.ts.map +1 -0
- package/components/badge.js +2 -0
- package/components/badge.js.map +1 -0
- package/components/breath.d.ts +6 -4
- package/components/breath.d.ts.map +1 -1
- package/components/breath.js +1 -80
- package/components/breath.js.map +1 -1
- package/components/button.d.ts +8 -5
- package/components/button.d.ts.map +1 -1
- package/components/button.js +1 -168
- package/components/button.js.map +1 -1
- package/components/card.d.ts +3 -1
- package/components/card.d.ts.map +1 -1
- package/components/card.js +1 -48
- package/components/card.js.map +1 -1
- package/components/carousel.d.ts +5 -1
- package/components/carousel.d.ts.map +1 -1
- package/components/carousel.js +1 -113
- package/components/carousel.js.map +1 -1
- package/components/details.d.ts +4 -3
- package/components/details.d.ts.map +1 -1
- package/components/details.js +1 -52
- package/components/details.js.map +1 -1
- package/components/dialog.d.ts +4 -2
- package/components/dialog.d.ts.map +1 -1
- package/components/dialog.js +1 -96
- package/components/dialog.js.map +1 -1
- package/components/divider.d.ts +3 -3
- package/components/divider.d.ts.map +1 -1
- package/components/divider.js +1 -36
- package/components/divider.js.map +1 -1
- package/components/dragbox.d.ts +4 -2
- package/components/dragbox.d.ts.map +1 -1
- package/components/dragbox.js +1 -109
- package/components/dragbox.js.map +1 -1
- package/components/flex.d.ts +3 -1
- package/components/flex.d.ts.map +1 -1
- package/components/flex.js +1 -62
- package/components/flex.js.map +1 -1
- package/components/form.d.ts +3 -1
- package/components/form.d.ts.map +1 -1
- package/components/form.js +1 -75
- package/components/form.js.map +1 -1
- package/components/grid.d.ts +3 -1
- package/components/grid.d.ts.map +1 -1
- package/components/grid.js +1 -56
- package/components/grid.js.map +1 -1
- package/components/heading.d.ts +29 -0
- package/components/heading.d.ts.map +1 -0
- package/components/heading.js +2 -0
- package/components/heading.js.map +1 -0
- package/components/input.d.ts +5 -1
- package/components/input.d.ts.map +1 -1
- package/components/input.js +1 -50
- package/components/input.js.map +1 -1
- package/components/layout.d.ts +6 -4
- package/components/layout.d.ts.map +1 -1
- package/components/layout.js +1 -58
- package/components/layout.js.map +1 -1
- package/components/link.d.ts +5 -0
- package/components/link.d.ts.map +1 -1
- package/components/link.js +1 -44
- package/components/link.js.map +1 -1
- package/components/progress.d.ts +3 -1
- package/components/progress.d.ts.map +1 -1
- package/components/progress.js +1 -58
- package/components/progress.js.map +1 -1
- package/components/range.d.ts +10 -4
- package/components/range.d.ts.map +1 -1
- package/components/range.js +1 -266
- package/components/range.js.map +1 -1
- package/components/rotate.d.ts +3 -1
- package/components/rotate.d.ts.map +1 -1
- package/components/rotate.js +1 -56
- package/components/rotate.js.map +1 -1
- package/components/router.d.ts +27 -34
- package/components/router.d.ts.map +1 -1
- package/components/router.js +1 -250
- package/components/router.js.map +1 -1
- package/components/select.d.ts +7 -2
- package/components/select.d.ts.map +1 -1
- package/components/select.js +1 -211
- package/components/select.js.map +1 -1
- package/components/skeleton.d.ts +3 -1
- package/components/skeleton.d.ts.map +1 -1
- package/components/skeleton.js +1 -54
- package/components/skeleton.js.map +1 -1
- package/components/split.d.ts +8 -2
- package/components/split.d.ts.map +1 -1
- package/components/split.js +1 -153
- package/components/split.js.map +1 -1
- package/components/switch.d.ts +5 -2
- package/components/switch.d.ts.map +1 -1
- package/components/switch.js +1 -92
- package/components/switch.js.map +1 -1
- package/components/text.d.ts +3 -1
- package/components/text.d.ts.map +1 -1
- package/components/text.js +1 -43
- package/components/text.js.map +1 -1
- package/components/time.d.ts +4 -2
- package/components/time.d.ts.map +1 -1
- package/components/time.js +1 -77
- package/components/time.js.map +1 -1
- package/components/tooltip.d.ts +4 -2
- package/components/tooltip.d.ts.map +1 -1
- package/components/tooltip.js +1 -80
- package/components/tooltip.js.map +1 -1
- package/components/typewriter.d.ts +6 -12
- package/components/typewriter.d.ts.map +1 -1
- package/components/typewriter.js +1 -129
- package/components/typewriter.js.map +1 -1
- package/core/global-style.d.ts +2 -2
- package/core/global-style.d.ts.map +1 -1
- package/core/global-style.js +1 -52
- package/core/global-style.js.map +1 -1
- package/core/super-anchor.d.ts +2 -1
- package/core/super-anchor.d.ts.map +1 -1
- package/core/super-anchor.js +1 -38
- package/core/super-anchor.js.map +1 -1
- package/core/super-input.d.ts +4 -3
- package/core/super-input.d.ts.map +1 -1
- package/core/super-input.js +1 -111
- package/core/super-input.js.map +1 -1
- package/core/super-openable.d.ts +1 -1
- package/core/super-openable.d.ts.map +1 -1
- package/core/super-openable.js +1 -37
- package/core/super-openable.js.map +1 -1
- package/custom-elements.json +1 -1
- package/details.d.ts +1 -0
- package/details.d.ts.map +1 -1
- package/details.js +1 -5
- package/details.js.map +1 -1
- package/dev/alert.d.ts +1 -0
- package/dev/alert.d.ts.map +1 -1
- package/dev/alert.js +1 -0
- package/dev/alert.js.map +1 -1
- package/dev/avatar.d.ts +1 -0
- package/dev/avatar.d.ts.map +1 -1
- package/dev/avatar.js +1 -0
- package/dev/avatar.js.map +1 -1
- package/dev/badge.d.ts +9 -0
- package/dev/badge.d.ts.map +1 -0
- package/dev/badge.js +5 -0
- package/dev/badge.js.map +1 -0
- package/dev/button.d.ts +1 -0
- package/dev/button.d.ts.map +1 -1
- package/dev/button.js +1 -0
- package/dev/button.js.map +1 -1
- package/dev/card.d.ts +1 -0
- package/dev/card.d.ts.map +1 -1
- package/dev/card.js +1 -0
- package/dev/card.js.map +1 -1
- package/dev/carousel.d.ts +1 -0
- package/dev/carousel.d.ts.map +1 -1
- package/dev/carousel.js +1 -0
- package/dev/carousel.js.map +1 -1
- package/dev/components/alert.d.ts +4 -1
- package/dev/components/alert.d.ts.map +1 -1
- package/dev/components/alert.js +87 -77
- package/dev/components/alert.js.map +1 -1
- package/dev/components/avatar.d.ts +7 -2
- package/dev/components/avatar.d.ts.map +1 -1
- package/dev/components/avatar.js +60 -32
- package/dev/components/avatar.js.map +1 -1
- package/dev/components/badge.d.ts +23 -0
- package/dev/components/badge.d.ts.map +1 -0
- package/dev/components/badge.js +114 -0
- package/dev/components/badge.js.map +1 -0
- package/dev/components/breath.d.ts +6 -4
- package/dev/components/breath.d.ts.map +1 -1
- package/dev/components/breath.js +40 -31
- package/dev/components/breath.js.map +1 -1
- package/dev/components/button.d.ts +8 -5
- package/dev/components/button.d.ts.map +1 -1
- package/dev/components/button.js +38 -21
- package/dev/components/button.js.map +1 -1
- package/dev/components/card.d.ts +3 -1
- package/dev/components/card.d.ts.map +1 -1
- package/dev/components/card.js +43 -41
- package/dev/components/card.js.map +1 -1
- package/dev/components/carousel.d.ts +5 -1
- package/dev/components/carousel.d.ts.map +1 -1
- package/dev/components/carousel.js +81 -55
- package/dev/components/carousel.js.map +1 -1
- package/dev/components/details.d.ts +4 -3
- package/dev/components/details.d.ts.map +1 -1
- package/dev/components/details.js +76 -70
- package/dev/components/details.js.map +1 -1
- package/dev/components/dialog.d.ts +4 -2
- package/dev/components/dialog.d.ts.map +1 -1
- package/dev/components/dialog.js +65 -60
- package/dev/components/dialog.js.map +1 -1
- package/dev/components/divider.d.ts +3 -3
- package/dev/components/divider.d.ts.map +1 -1
- package/dev/components/divider.js +27 -10
- package/dev/components/divider.js.map +1 -1
- package/dev/components/dragbox.d.ts +4 -2
- package/dev/components/dragbox.d.ts.map +1 -1
- package/dev/components/dragbox.js +22 -13
- package/dev/components/dragbox.js.map +1 -1
- package/dev/components/flex.d.ts +3 -1
- package/dev/components/flex.d.ts.map +1 -1
- package/dev/components/flex.js +22 -9
- package/dev/components/flex.js.map +1 -1
- package/dev/components/form.d.ts +3 -1
- package/dev/components/form.d.ts.map +1 -1
- package/dev/components/form.js +6 -7
- package/dev/components/form.js.map +1 -1
- package/dev/components/grid.d.ts +3 -1
- package/dev/components/grid.d.ts.map +1 -1
- package/dev/components/grid.js +22 -10
- package/dev/components/grid.js.map +1 -1
- package/dev/components/heading.d.ts +29 -0
- package/dev/components/heading.d.ts.map +1 -0
- package/dev/components/heading.js +125 -0
- package/dev/components/heading.js.map +1 -0
- package/dev/components/input.d.ts +5 -1
- package/dev/components/input.d.ts.map +1 -1
- package/dev/components/input.js +36 -28
- package/dev/components/input.js.map +1 -1
- package/dev/components/layout.d.ts +6 -4
- package/dev/components/layout.d.ts.map +1 -1
- package/dev/components/layout.js +53 -39
- package/dev/components/layout.js.map +1 -1
- package/dev/components/link.d.ts +5 -0
- package/dev/components/link.d.ts.map +1 -1
- package/dev/components/link.js +13 -3
- package/dev/components/link.js.map +1 -1
- package/dev/components/progress.d.ts +3 -1
- package/dev/components/progress.d.ts.map +1 -1
- package/dev/components/progress.js +20 -8
- package/dev/components/progress.js.map +1 -1
- package/dev/components/range.d.ts +10 -4
- package/dev/components/range.d.ts.map +1 -1
- package/dev/components/range.js +69 -64
- package/dev/components/range.js.map +1 -1
- package/dev/components/rotate.d.ts +3 -1
- package/dev/components/rotate.d.ts.map +1 -1
- package/dev/components/rotate.js +14 -9
- package/dev/components/rotate.js.map +1 -1
- package/dev/components/router.d.ts +27 -34
- package/dev/components/router.d.ts.map +1 -1
- package/dev/components/router.js +25 -38
- package/dev/components/router.js.map +1 -1
- package/dev/components/select.d.ts +7 -2
- package/dev/components/select.d.ts.map +1 -1
- package/dev/components/select.js +79 -58
- package/dev/components/select.js.map +1 -1
- package/dev/components/skeleton.d.ts +3 -1
- package/dev/components/skeleton.d.ts.map +1 -1
- package/dev/components/skeleton.js +67 -63
- package/dev/components/skeleton.js.map +1 -1
- package/dev/components/split.d.ts +8 -2
- package/dev/components/split.d.ts.map +1 -1
- package/dev/components/split.js +67 -51
- package/dev/components/split.js.map +1 -1
- package/dev/components/switch.d.ts +5 -2
- package/dev/components/switch.d.ts.map +1 -1
- package/dev/components/switch.js +91 -85
- package/dev/components/switch.js.map +1 -1
- package/dev/components/text.d.ts +3 -1
- package/dev/components/text.d.ts.map +1 -1
- package/dev/components/text.js +56 -53
- package/dev/components/text.js.map +1 -1
- package/dev/components/time.d.ts +4 -2
- package/dev/components/time.d.ts.map +1 -1
- package/dev/components/time.js +19 -6
- package/dev/components/time.js.map +1 -1
- package/dev/components/tooltip.d.ts +4 -2
- package/dev/components/tooltip.d.ts.map +1 -1
- package/dev/components/tooltip.js +45 -27
- package/dev/components/tooltip.js.map +1 -1
- package/dev/components/typewriter.d.ts +6 -12
- package/dev/components/typewriter.d.ts.map +1 -1
- package/dev/components/typewriter.js +48 -54
- package/dev/components/typewriter.js.map +1 -1
- package/dev/core/global-style.d.ts +2 -2
- package/dev/core/global-style.d.ts.map +1 -1
- package/dev/core/global-style.js +19 -14
- package/dev/core/global-style.js.map +1 -1
- package/dev/core/super-anchor.d.ts +2 -1
- package/dev/core/super-anchor.d.ts.map +1 -1
- package/dev/core/super-anchor.js +15 -12
- package/dev/core/super-anchor.js.map +1 -1
- package/dev/core/super-input.d.ts +4 -3
- package/dev/core/super-input.d.ts.map +1 -1
- package/dev/core/super-input.js +64 -42
- package/dev/core/super-input.js.map +1 -1
- package/dev/core/super-openable.d.ts +1 -1
- package/dev/core/super-openable.d.ts.map +1 -1
- package/dev/core/super-openable.js +1 -2
- package/dev/core/super-openable.js.map +1 -1
- package/dev/details.d.ts +1 -0
- package/dev/details.d.ts.map +1 -1
- package/dev/details.js +1 -0
- package/dev/details.js.map +1 -1
- package/dev/dialog.d.ts +1 -0
- package/dev/dialog.d.ts.map +1 -1
- package/dev/dialog.js +1 -0
- package/dev/dialog.js.map +1 -1
- package/dev/divider.d.ts +1 -0
- package/dev/divider.d.ts.map +1 -1
- package/dev/divider.js +1 -0
- package/dev/divider.js.map +1 -1
- package/dev/dragbox.d.ts +1 -0
- package/dev/dragbox.d.ts.map +1 -1
- package/dev/dragbox.js +1 -0
- package/dev/dragbox.js.map +1 -1
- package/dev/flex.d.ts +1 -0
- package/dev/flex.d.ts.map +1 -1
- package/dev/flex.js +1 -0
- package/dev/flex.js.map +1 -1
- package/dev/form.d.ts +1 -0
- package/dev/form.d.ts.map +1 -1
- package/dev/form.js +1 -0
- package/dev/form.js.map +1 -1
- package/dev/grid.d.ts +1 -0
- package/dev/grid.d.ts.map +1 -1
- package/dev/grid.js +1 -0
- package/dev/grid.js.map +1 -1
- package/dev/heading.d.ts +9 -0
- package/dev/heading.d.ts.map +1 -0
- package/dev/heading.js +5 -0
- package/dev/heading.js.map +1 -0
- package/dev/index.d.ts +2 -0
- package/dev/index.d.ts.map +1 -1
- package/dev/index.js +2 -0
- package/dev/index.js.map +1 -1
- package/dev/layout.d.ts.map +1 -1
- package/dev/progress.d.ts.map +1 -1
- package/dev/router.d.ts.map +1 -1
- package/dev/split.d.ts +1 -1
- package/dev/split.d.ts.map +1 -1
- package/dev/typewriter.d.ts +1 -0
- package/dev/typewriter.d.ts.map +1 -1
- package/dev/typewriter.js +1 -0
- package/dev/typewriter.js.map +1 -1
- package/dialog.d.ts +1 -0
- package/dialog.d.ts.map +1 -1
- package/dialog.js +1 -5
- package/dialog.js.map +1 -1
- package/divider.d.ts +1 -0
- package/divider.d.ts.map +1 -1
- package/divider.js +1 -5
- package/divider.js.map +1 -1
- package/dragbox.d.ts +1 -0
- package/dragbox.d.ts.map +1 -1
- package/dragbox.js +1 -5
- package/dragbox.js.map +1 -1
- package/flex.d.ts +1 -0
- package/flex.d.ts.map +1 -1
- package/flex.js +1 -5
- package/flex.js.map +1 -1
- package/form.d.ts +1 -0
- package/form.d.ts.map +1 -1
- package/form.js +1 -5
- package/form.js.map +1 -1
- package/grid.d.ts +1 -0
- package/grid.d.ts.map +1 -1
- package/grid.js +1 -5
- package/grid.js.map +1 -1
- package/heading.d.ts +9 -0
- package/heading.d.ts.map +1 -0
- package/heading.js +2 -0
- package/heading.js.map +1 -0
- package/index.d.ts +2 -0
- package/index.d.ts.map +1 -1
- package/index.js +1 -56
- package/index.js.map +1 -1
- package/input.js +1 -5
- package/input.js.map +1 -1
- package/layout.d.ts.map +1 -1
- package/layout.js +1 -5
- package/layout.js.map +1 -1
- package/link.js +1 -5
- package/link.js.map +1 -1
- package/package.json +13 -8
- package/progress.d.ts.map +1 -1
- package/progress.js +1 -5
- package/progress.js.map +1 -1
- package/range.js +1 -5
- package/range.js.map +1 -1
- package/rotate.js +1 -5
- package/rotate.js.map +1 -1
- package/router.d.ts.map +1 -1
- package/router.js +1 -5
- package/router.js.map +1 -1
- package/select.js +1 -5
- package/select.js.map +1 -1
- package/skeleton.js +1 -5
- package/skeleton.js.map +1 -1
- package/split.d.ts +1 -1
- package/split.d.ts.map +1 -1
- package/split.js +1 -5
- package/split.js.map +1 -1
- package/src/alert.ts +2 -0
- package/src/avatar.ts +2 -0
- package/src/badge.ts +13 -0
- package/src/button.ts +2 -0
- package/src/card.ts +2 -0
- package/src/carousel.ts +2 -0
- package/src/components/alert.ts +92 -86
- package/src/components/avatar.ts +65 -39
- package/src/components/badge.ts +110 -0
- package/src/components/breath.ts +47 -38
- package/src/components/button.ts +38 -36
- package/src/components/card.ts +45 -46
- package/src/components/carousel.ts +91 -66
- package/src/components/details.ts +79 -75
- package/src/components/dialog.ts +74 -73
- package/src/components/divider.ts +28 -13
- package/src/components/dragbox.ts +30 -25
- package/src/components/flex.ts +35 -22
- package/src/components/form.ts +12 -15
- package/src/components/grid.ts +35 -23
- package/src/components/heading.ts +123 -0
- package/src/components/input.ts +43 -37
- package/src/components/layout.ts +52 -44
- package/src/components/link.ts +13 -4
- package/src/components/progress.ts +22 -10
- package/src/components/range.ts +107 -108
- package/src/components/rotate.ts +24 -18
- package/src/components/router.ts +64 -67
- package/src/components/select.ts +94 -78
- package/src/components/skeleton.ts +70 -68
- package/src/components/split.ts +81 -67
- package/src/components/switch.ts +97 -93
- package/src/components/text.ts +55 -58
- package/src/components/time.ts +26 -13
- package/src/components/tooltip.ts +44 -32
- package/src/components/typewriter.ts +54 -61
- package/src/core/global-style.ts +34 -21
- package/src/core/super-anchor.ts +17 -14
- package/src/core/super-input.ts +76 -63
- package/src/core/super-openable.ts +8 -14
- package/src/details.ts +2 -0
- package/src/dialog.ts +2 -0
- package/src/divider.ts +2 -0
- package/src/dragbox.ts +2 -0
- package/src/flex.ts +2 -0
- package/src/form.ts +2 -0
- package/src/grid.ts +2 -0
- package/src/heading.ts +13 -0
- package/src/index.ts +2 -0
- package/src/layout.ts +1 -0
- package/src/progress.ts +1 -0
- package/src/router.ts +1 -0
- package/src/split.ts +1 -1
- package/src/typewriter.ts +2 -0
- package/switch.js +1 -5
- package/switch.js.map +1 -1
- package/text.js +1 -5
- package/text.js.map +1 -1
- package/time.js +1 -5
- package/time.js.map +1 -1
- package/tooltip.js +1 -5
- package/tooltip.js.map +1 -1
- package/typewriter.d.ts +1 -0
- package/typewriter.d.ts.map +1 -1
- package/typewriter.js +1 -5
- package/typewriter.js.map +1 -1
- package/vscode.html-custom-data.json +1 -1
- package/web-types.json +1 -1
package/src/components/text.ts
CHANGED
@@ -1,11 +1,8 @@
|
|
1
|
-
import { godown } from "@godown/element
|
2
|
-
import {
|
3
|
-
import { classList } from "@godown/element/directives/class-list.js";
|
4
|
-
import { htmlSlot } from "@godown/element/directives/html-slot.js";
|
5
|
-
import { css, html } from "lit";
|
1
|
+
import { attr, classList, godown, htmlSlot, styles } from "@godown/element";
|
2
|
+
import { type TemplateResult, css, html } from "lit";
|
6
3
|
import { property } from "lit/decorators.js";
|
7
4
|
|
8
|
-
import {
|
5
|
+
import { GlobalStyle, cssGlobalVars, scopePrefix } from "../core/global-style.js";
|
9
6
|
|
10
7
|
const protoName = "text";
|
11
8
|
|
@@ -18,52 +15,52 @@ const cssScope = scopePrefix(protoName);
|
|
18
15
|
*/
|
19
16
|
@godown(protoName)
|
20
17
|
@styles(css`
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
18
|
+
:host {
|
19
|
+
${cssScope}--color: currentColor;
|
20
|
+
${cssScope}--color-hover: currentColor;
|
21
|
+
${cssScope}--color-active: currentColor;
|
22
|
+
display: inline-block;
|
23
|
+
text-overflow: ellipsis;
|
24
|
+
overflow-wrap: break-word;
|
25
|
+
}
|
29
26
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
27
|
+
[part="root"] {
|
28
|
+
white-space: nowrap;
|
29
|
+
width: 100%;
|
30
|
+
vertical-align: bottom;
|
31
|
+
display: inline-block;
|
32
|
+
text-overflow: inherit;
|
33
|
+
overflow-wrap: inherit;
|
34
|
+
overflow: hidden;
|
35
|
+
color: var(${cssScope}--color);
|
36
|
+
}
|
40
37
|
|
41
|
-
|
42
|
-
|
43
|
-
|
38
|
+
[part="root"]:hover {
|
39
|
+
color: var(${cssScope}--color-hover, var(${cssScope}--color));
|
40
|
+
}
|
44
41
|
|
45
|
-
|
46
|
-
|
47
|
-
|
42
|
+
[part="root"]:active {
|
43
|
+
color: var(${cssScope}--color-active, var(${cssScope}--color));
|
44
|
+
}
|
48
45
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
46
|
+
.hover:hover,
|
47
|
+
.active:active,
|
48
|
+
.always {
|
49
|
+
text-decoration: underline;
|
50
|
+
}
|
54
51
|
|
55
|
-
|
56
|
-
|
57
|
-
|
52
|
+
.none {
|
53
|
+
text-decoration: none;
|
54
|
+
}
|
58
55
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
56
|
+
[clip] {
|
57
|
+
background: var(${cssGlobalVars.clipBackground});
|
58
|
+
display: inline-block;
|
59
|
+
color: transparent;
|
60
|
+
-webkit-text-fill-color: transparent;
|
61
|
+
background-clip: text;
|
62
|
+
-webkit-background-clip: text;
|
63
|
+
}
|
67
64
|
`)
|
68
65
|
class Text extends GlobalStyle {
|
69
66
|
/**
|
@@ -76,20 +73,20 @@ class Text extends GlobalStyle {
|
|
76
73
|
* Set background-clip to text.
|
77
74
|
*/
|
78
75
|
@property({ type: Boolean })
|
79
|
-
clip
|
76
|
+
clip = false;
|
80
77
|
|
81
|
-
protected render() {
|
82
|
-
return html
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
</span>`;
|
78
|
+
protected render(): TemplateResult<1> {
|
79
|
+
return html`
|
80
|
+
<span
|
81
|
+
part="root"
|
82
|
+
${attr(this.observedRecord)}
|
83
|
+
class="${classList(this.underline)}"
|
84
|
+
>
|
85
|
+
${htmlSlot()}
|
86
|
+
</span>
|
87
|
+
`;
|
92
88
|
}
|
93
89
|
}
|
94
90
|
|
95
91
|
export default Text;
|
92
|
+
export { Text };
|
package/src/components/time.ts
CHANGED
@@ -1,7 +1,6 @@
|
|
1
|
-
import { godown } from "@godown/element
|
2
|
-
import { styles } from "@godown/element/decorators/styles.js";
|
1
|
+
import { attr, godown, styles } from "@godown/element";
|
3
2
|
import fmtime from "fmtime";
|
4
|
-
import {
|
3
|
+
import { type PropertyValues, type TemplateResult, css, html } from "lit";
|
5
4
|
import { property } from "lit/decorators.js";
|
6
5
|
|
7
6
|
import { GlobalStyle } from "../core/global-style.js";
|
@@ -11,10 +10,15 @@ const protoName = "time";
|
|
11
10
|
/**
|
12
11
|
* {@linkcode Time} renders a formatting time.
|
13
12
|
*
|
13
|
+
* @fires time - Fires when the time changes.
|
14
14
|
* @category display
|
15
15
|
*/
|
16
16
|
@godown(protoName)
|
17
|
-
@styles(css
|
17
|
+
@styles(css`
|
18
|
+
:host {
|
19
|
+
text-align: center;
|
20
|
+
}
|
21
|
+
`)
|
18
22
|
class Time extends GlobalStyle {
|
19
23
|
/**
|
20
24
|
* Escape symbol.
|
@@ -32,27 +36,34 @@ class Time extends GlobalStyle {
|
|
32
36
|
* Time.
|
33
37
|
*/
|
34
38
|
@property({ type: Object })
|
35
|
-
time = new Date();
|
39
|
+
time: Date = new Date();
|
36
40
|
|
37
41
|
/**
|
38
42
|
* If there is a value, update every gap or timeout.
|
39
43
|
*/
|
40
44
|
@property({ type: Number })
|
41
|
-
timeout;
|
45
|
+
timeout: any;
|
42
46
|
|
43
47
|
/**
|
44
48
|
* The number of milliseconds that change with each update.
|
45
49
|
*/
|
46
50
|
@property({ type: Number })
|
47
|
-
gap;
|
51
|
+
gap: any;
|
48
52
|
|
49
53
|
protected timeoutId: number;
|
50
54
|
|
51
|
-
protected render():
|
52
|
-
return
|
55
|
+
protected render(): TemplateResult<1> {
|
56
|
+
return html`
|
57
|
+
<span
|
58
|
+
part="root"
|
59
|
+
${attr(this.observedRecord)}
|
60
|
+
>
|
61
|
+
${fmtime(this.format, this.time, this.escape)}
|
62
|
+
</span>
|
63
|
+
`;
|
53
64
|
}
|
54
65
|
|
55
|
-
protected firstUpdated() {
|
66
|
+
protected firstUpdated(): void {
|
56
67
|
if (this.timeout) {
|
57
68
|
this.timeoutId = this.startTimeout();
|
58
69
|
}
|
@@ -67,15 +78,17 @@ class Time extends GlobalStyle {
|
|
67
78
|
}
|
68
79
|
}
|
69
80
|
|
70
|
-
disconnectedCallback() {
|
81
|
+
disconnectedCallback(): void {
|
71
82
|
clearInterval(this.timeoutId);
|
72
83
|
}
|
73
84
|
|
74
|
-
startTimeout() {
|
75
|
-
return
|
85
|
+
startTimeout(): number {
|
86
|
+
return setInterval(() => {
|
87
|
+
this.dispatchEvent(new CustomEvent("time", { detail: this.time, composed: true }));
|
76
88
|
this.time = new Date(this.time.getTime() + (this.gap || this.timeout));
|
77
89
|
}, Math.abs(this.timeout));
|
78
90
|
}
|
79
91
|
}
|
80
92
|
|
81
93
|
export default Time;
|
94
|
+
export { Time };
|
@@ -1,7 +1,5 @@
|
|
1
|
-
import { godown } from "@godown/element
|
2
|
-
import {
|
3
|
-
import { htmlSlot } from "@godown/element/directives/html-slot.js";
|
4
|
-
import { css, html } from "lit";
|
1
|
+
import { attr, godown, htmlSlot, styles } from "@godown/element";
|
2
|
+
import { type TemplateResult, css, html } from "lit";
|
5
3
|
import { property } from "lit/decorators.js";
|
6
4
|
|
7
5
|
import { scopePrefix } from "../core/global-style.js";
|
@@ -15,7 +13,7 @@ const cssScope = scopePrefix(protoName);
|
|
15
13
|
*
|
16
14
|
* If it has the tip property, ignore the slot tip.
|
17
15
|
*
|
18
|
-
* @slot tip - Tip element if no `
|
16
|
+
* @slot tip - Tip element if no `tip` provided.
|
19
17
|
* @slot - Content.
|
20
18
|
* @category feedback
|
21
19
|
*/
|
@@ -24,12 +22,15 @@ const cssScope = scopePrefix(protoName);
|
|
24
22
|
css`
|
25
23
|
:host {
|
26
24
|
${cssScope}--tip-background: inherit;
|
27
|
-
display: inline-block;
|
28
25
|
width: fit-content;
|
29
26
|
}
|
30
27
|
|
28
|
+
:host,
|
29
|
+
[part="root"] {
|
30
|
+
display: inline-flex;
|
31
|
+
}
|
32
|
+
|
31
33
|
[part="root"] {
|
32
|
-
display: flex;
|
33
34
|
position: relative;
|
34
35
|
transition: inherit;
|
35
36
|
border-radius: inherit;
|
@@ -48,22 +49,28 @@ const cssScope = scopePrefix(protoName);
|
|
48
49
|
visibility: visible;
|
49
50
|
}
|
50
51
|
|
51
|
-
.passive{
|
52
|
+
.passive {
|
52
53
|
background: var(${cssScope}--tip-background);
|
53
|
-
|
54
|
+
}
|
55
|
+
|
56
|
+
[propagation] [part="tip"] {
|
57
|
+
pointer-events: none;
|
54
58
|
}
|
55
59
|
`,
|
56
60
|
css`
|
57
|
-
[direction^="top"] {
|
61
|
+
[direction^="top"] [part="tip"] {
|
58
62
|
bottom: 100%;
|
59
63
|
}
|
60
|
-
|
64
|
+
|
65
|
+
[direction^="bottom"] [part="tip"] {
|
61
66
|
top: 100%;
|
62
67
|
}
|
63
|
-
|
68
|
+
|
69
|
+
[direction$="right"] [part="tip"] {
|
64
70
|
left: 100%;
|
65
71
|
}
|
66
|
-
|
72
|
+
|
73
|
+
[direction$="left"] [part="tip"] {
|
67
74
|
right: 100%;
|
68
75
|
}
|
69
76
|
`,
|
@@ -91,7 +98,7 @@ class Tooltip extends SuperOpenable {
|
|
91
98
|
* If true, allow penetration of the tip.
|
92
99
|
*/
|
93
100
|
@property({ type: Boolean })
|
94
|
-
propagation
|
101
|
+
propagation = false;
|
95
102
|
|
96
103
|
/**
|
97
104
|
* How can tips be triggered.
|
@@ -113,27 +120,32 @@ class Tooltip extends SuperOpenable {
|
|
113
120
|
"flex-end": "flex-end",
|
114
121
|
};
|
115
122
|
|
116
|
-
protected render() {
|
123
|
+
protected render(): TemplateResult<1> {
|
117
124
|
const align = Tooltip.aligns[this.align] || "inherit";
|
118
125
|
const isFocusable = this.type === "focus";
|
119
|
-
return html
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
126
|
+
return html`
|
127
|
+
<div
|
128
|
+
part="root"
|
129
|
+
${attr(this.observedRecord)}
|
130
|
+
tabindex="${isFocusable ? 0 : -1}"
|
131
|
+
@focus="${isFocusable ? () => (this.open = true) : null}"
|
132
|
+
@blur="${isFocusable ? () => (this.open = false) : null}"
|
133
|
+
@mouseenter="${isFocusable ? null : () => (this.open = true)}"
|
134
|
+
@mouseleave="${isFocusable ? null : () => (this.open = false)}"
|
135
|
+
style="justify-content:${align};align-items:${align}"
|
136
|
+
>
|
137
|
+
${htmlSlot()}
|
138
|
+
<div part="tip">
|
139
|
+
${this.tip
|
140
|
+
? html`
|
141
|
+
<span class="passive">${this.tip}</span>
|
142
|
+
`
|
143
|
+
: htmlSlot("tip")}
|
144
|
+
</div>
|
145
|
+
</div>
|
146
|
+
`;
|
136
147
|
}
|
137
148
|
}
|
138
149
|
|
139
150
|
export default Tooltip;
|
151
|
+
export { Tooltip };
|
@@ -1,9 +1,5 @@
|
|
1
|
-
import { godown } from "@godown/element
|
2
|
-
import {
|
3
|
-
import { classList } from "@godown/element/directives/class-list.js";
|
4
|
-
import { htmlSlot } from "@godown/element/directives/html-slot.js";
|
5
|
-
import { random } from "@godown/element/tools/lib.js";
|
6
|
-
import { css, html, type PropertyValueMap } from "lit";
|
1
|
+
import { attr, godown, htmlSlot, random, styles } from "@godown/element";
|
2
|
+
import { type PropertyValueMap, type TemplateResult, css, html } from "lit";
|
7
3
|
import { property, query, state } from "lit/decorators.js";
|
8
4
|
|
9
5
|
import { GlobalStyle, scopePrefix } from "../core/global-style.js";
|
@@ -18,46 +14,40 @@ const cssScope = scopePrefix(protoName);
|
|
18
14
|
*/
|
19
15
|
@godown(protoName)
|
20
16
|
@styles(css`
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
}
|
17
|
+
:host {
|
18
|
+
${cssScope}--cursor-width: .05em;
|
19
|
+
}
|
25
20
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
}
|
21
|
+
:host,
|
22
|
+
:host([contents]) [part="root"] {
|
23
|
+
display: inline-block;
|
24
|
+
}
|
31
25
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
border-color: transparent;
|
38
|
-
}
|
39
|
-
}
|
26
|
+
i {
|
27
|
+
border-right: var(${cssScope}--cursor-width) solid;
|
28
|
+
margin-left: 0.02em;
|
29
|
+
animation: s 1.5s steps(1) infinite;
|
30
|
+
}
|
40
31
|
|
41
|
-
|
42
|
-
|
32
|
+
@keyframes s {
|
33
|
+
0% {
|
34
|
+
border-color: currentColor;
|
43
35
|
}
|
44
|
-
|
45
|
-
|
46
|
-
visibility: hidden;
|
36
|
+
50% {
|
37
|
+
border-color: transparent;
|
47
38
|
}
|
48
|
-
|
39
|
+
}
|
40
|
+
|
41
|
+
slot {
|
42
|
+
display: none;
|
43
|
+
}
|
44
|
+
`)
|
49
45
|
class Typewriter extends GlobalStyle {
|
50
46
|
/**
|
51
47
|
* Raw text.
|
52
48
|
*/
|
53
49
|
@property()
|
54
|
-
|
55
|
-
|
56
|
-
/**
|
57
|
-
* Start immediately after {@linkcode Typewriter.firstUpdated}.
|
58
|
-
*/
|
59
|
-
@property({ type: Boolean })
|
60
|
-
stopped = false;
|
50
|
+
content = "";
|
61
51
|
|
62
52
|
/**
|
63
53
|
* If true, hide the cursor
|
@@ -89,11 +79,8 @@ class Typewriter extends GlobalStyle {
|
|
89
79
|
@property({ type: Number })
|
90
80
|
index = 0;
|
91
81
|
|
92
|
-
/**
|
93
|
-
* Internal text.
|
94
|
-
*/
|
95
82
|
@state()
|
96
|
-
|
83
|
+
contentInternal = "";
|
97
84
|
|
98
85
|
protected timeoutID: number;
|
99
86
|
|
@@ -101,39 +88,44 @@ class Typewriter extends GlobalStyle {
|
|
101
88
|
protected _i: HTMLElement;
|
102
89
|
|
103
90
|
/**
|
104
|
-
* {@linkcode Typewriter.
|
91
|
+
* {@linkcode Typewriter.content} length.
|
105
92
|
*/
|
106
|
-
get len() {
|
107
|
-
return this.
|
93
|
+
get len(): number {
|
94
|
+
return this.content.length;
|
108
95
|
}
|
109
96
|
|
110
|
-
protected render() {
|
111
|
-
return html
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
97
|
+
protected render(): TemplateResult<1> {
|
98
|
+
return html`
|
99
|
+
<div
|
100
|
+
part="root"
|
101
|
+
${attr(this.observedRecord)}
|
102
|
+
>
|
103
|
+
${htmlSlot()} ${this.contentInternal}
|
104
|
+
<i
|
105
|
+
part="cursor"
|
106
|
+
?hidden="${this.ended}"
|
107
|
+
></i>
|
108
|
+
</div>
|
109
|
+
`;
|
116
110
|
}
|
117
111
|
|
118
|
-
protected firstUpdated() {
|
119
|
-
|
120
|
-
|
121
|
-
}
|
122
|
-
if (!this.stopped && this.len) {
|
112
|
+
protected firstUpdated(): void {
|
113
|
+
this.content ||= this._slot?.assignedNodes()[0]?.textContent.trim() || "";
|
114
|
+
if (!this.ended && this.len) {
|
123
115
|
this.write();
|
124
116
|
}
|
125
117
|
}
|
126
118
|
|
127
|
-
protected updated(changedProperties: PropertyValueMap<this>) {
|
119
|
+
protected updated(changedProperties: PropertyValueMap<this>): void {
|
128
120
|
if (changedProperties.has("index")) {
|
129
|
-
this.dispatchEvent(new CustomEvent(this.index === this.len ? "done" : "write", { detail: this.
|
121
|
+
this.dispatchEvent(new CustomEvent(this.index === this.len ? "done" : "write", { detail: this.contentInternal }));
|
130
122
|
}
|
131
123
|
}
|
132
124
|
|
133
|
-
write(at = this.index) {
|
134
|
-
this.
|
125
|
+
write(at: number = this.index): void {
|
126
|
+
this.contentInternal = this.content.slice(0, at + 1);
|
135
127
|
const timeout = this.delay || random(this.max, this.min);
|
136
|
-
this.timeoutID =
|
128
|
+
this.timeoutID = setTimeout(() => {
|
137
129
|
const nx = at + 1;
|
138
130
|
if (nx <= this.len) {
|
139
131
|
this.index = nx;
|
@@ -142,13 +134,14 @@ class Typewriter extends GlobalStyle {
|
|
142
134
|
}, timeout);
|
143
135
|
}
|
144
136
|
|
145
|
-
stop() {
|
137
|
+
stop(): void {
|
146
138
|
clearTimeout(this.timeoutID);
|
147
139
|
}
|
148
140
|
|
149
|
-
end() {
|
141
|
+
end(): void {
|
150
142
|
this.ended = true;
|
151
143
|
}
|
152
144
|
}
|
153
145
|
|
154
146
|
export default Typewriter;
|
147
|
+
export { Typewriter };
|
package/src/core/global-style.ts
CHANGED
@@ -1,27 +1,31 @@
|
|
1
1
|
import { type Gradients, presetsRGB } from "@godown/colors/presets-rgb.js";
|
2
2
|
import { travel } from "@godown/colors/travel.js";
|
3
|
-
import GodownElement from "@godown/element";
|
4
|
-
import
|
5
|
-
import { joinProperties } from "@godown/element/tools/css.js";
|
6
|
-
import { trim } from "@godown/element/tools/lib.js";
|
7
|
-
import { css, CSSResult, unsafeCSS } from "lit";
|
3
|
+
import { GodownElement, joinProperties, trim } from "@godown/element";
|
4
|
+
import { type CSSResult, css, unsafeCSS } from "lit";
|
8
5
|
|
9
|
-
|
10
|
-
|
11
|
-
export class GlobalStyle extends GodownElement {
|
12
|
-
}
|
6
|
+
export class GlobalStyle extends GodownElement {}
|
13
7
|
|
14
8
|
const cssvar = trim(GlobalStyle.godownConfig.prefix, "-");
|
15
9
|
|
16
|
-
export function scopePrefix(scope: string, len = 1) {
|
10
|
+
export function scopePrefix(scope: string, len = 1): CSSResult {
|
17
11
|
return variablePrefix(cssvar + "-".repeat(len) + scope);
|
18
12
|
}
|
19
13
|
|
20
|
-
export function variablePrefix(variable: string) {
|
21
|
-
return unsafeCSS(
|
14
|
+
export function variablePrefix(variable: string): CSSResult {
|
15
|
+
return unsafeCSS(`--${variable}`);
|
22
16
|
}
|
23
17
|
|
24
|
-
export const cssGlobalVars
|
18
|
+
export const cssGlobalVars: {
|
19
|
+
foreground: CSSResult;
|
20
|
+
background: CSSResult;
|
21
|
+
clipBackground: CSSResult;
|
22
|
+
active: CSSResult;
|
23
|
+
passive: CSSResult;
|
24
|
+
_colors: PresetsGradientsCSSResult;
|
25
|
+
input: CSSResult;
|
26
|
+
white: CSSResult;
|
27
|
+
black: CSSResult;
|
28
|
+
} = {
|
25
29
|
foreground: scopePrefix("foreground", 2),
|
26
30
|
background: scopePrefix("background", 2),
|
27
31
|
clipBackground: scopePrefix("clip-background", 2),
|
@@ -36,25 +40,25 @@ export const cssGlobalVars = {
|
|
36
40
|
type PresetsGradientsCSSResult = Record<keyof typeof presetsRGB, Gradients<CSSResult>>;
|
37
41
|
GlobalStyle.styles = [
|
38
42
|
unsafeCSS(
|
39
|
-
":host{"
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
+
":host{" +
|
44
|
+
`${cssGlobalVars.black}:rgb(0 0 0);` +
|
45
|
+
`${cssGlobalVars.white}:rgb(255 255 255);` +
|
46
|
+
travel((key, gradient, rgb) => {
|
43
47
|
cssGlobalVars._colors[key] ||= [] as any;
|
44
48
|
cssGlobalVars._colors[key].push(unsafeCSS(scopePrefix("color", 2) + "-" + key + "-" + gradient));
|
45
49
|
const endKey = `-${key}-${gradient}`;
|
46
50
|
const colorKey = scopePrefix("color", 2) + endKey;
|
47
51
|
return `${colorKey}:rgb(${rgb});`;
|
48
|
-
}, presetsRGB).join("")
|
49
|
-
|
52
|
+
}, presetsRGB).join("") +
|
53
|
+
joinProperties({
|
50
54
|
[cssGlobalVars.background + ""]: `var(${cssGlobalVars._colors.darkgray[9]})`,
|
51
55
|
[cssGlobalVars.foreground + ""]: `var(${cssGlobalVars._colors.lightgray[0]})`,
|
52
56
|
[cssGlobalVars.active + ""]: `var(${cssGlobalVars._colors.blue[6]})`,
|
53
57
|
[cssGlobalVars.passive + ""]: `var(${cssGlobalVars._colors.darkgray[6]})`,
|
54
58
|
[cssGlobalVars.clipBackground + ""]:
|
55
59
|
`linear-gradient(to bottom, var(${cssGlobalVars.foreground}), var(${cssGlobalVars.passive}))`,
|
56
|
-
})
|
57
|
-
|
60
|
+
}) +
|
61
|
+
"}",
|
58
62
|
),
|
59
63
|
css`
|
60
64
|
* {
|
@@ -82,5 +86,14 @@ GlobalStyle.styles = [
|
|
82
86
|
svg {
|
83
87
|
user-select: none;
|
84
88
|
}
|
89
|
+
|
90
|
+
:host([contents]) {
|
91
|
+
display: contents;
|
92
|
+
}
|
93
|
+
|
94
|
+
:where(:host([contents]) [part="root"]) {
|
95
|
+
all: inherit;
|
96
|
+
display: revert;
|
97
|
+
}
|
85
98
|
`,
|
86
99
|
];
|
package/src/core/super-anchor.ts
CHANGED
@@ -1,8 +1,6 @@
|
|
1
|
-
import { styles } from "@godown/element
|
2
|
-
import {
|
3
|
-
import { css, html } from "lit";
|
1
|
+
import { attr, htmlSlot, styles } from "@godown/element";
|
2
|
+
import { type TemplateResult, css, html, nothing } from "lit";
|
4
3
|
import { property } from "lit/decorators.js";
|
5
|
-
import { ifDefined } from "lit/directives/if-defined.js";
|
6
4
|
|
7
5
|
import { GlobalStyle } from "./global-style.js";
|
8
6
|
|
@@ -18,13 +16,11 @@ import { GlobalStyle } from "./global-style.js";
|
|
18
16
|
cursor: pointer;
|
19
17
|
}
|
20
18
|
|
21
|
-
|
19
|
+
[part="root"] {
|
22
20
|
width: 100%;
|
23
|
-
display: flex;
|
24
21
|
color: inherit;
|
22
|
+
display: inline-block;
|
25
23
|
text-decoration: inherit;
|
26
|
-
justify-content: space-between;
|
27
|
-
align-items: center;
|
28
24
|
}
|
29
25
|
`)
|
30
26
|
class SuperAnchor extends GlobalStyle {
|
@@ -39,14 +35,21 @@ class SuperAnchor extends GlobalStyle {
|
|
39
35
|
@property()
|
40
36
|
target: "_blank" | "_self" | "_parent" | "_top" = "_self";
|
41
37
|
|
42
|
-
protected render() {
|
43
|
-
return html
|
44
|
-
|
45
|
-
|
38
|
+
protected render(): TemplateResult<1> {
|
39
|
+
return html`
|
40
|
+
<a
|
41
|
+
part="root"
|
42
|
+
${attr(this.observedRecord)}
|
43
|
+
href="${this.href || nothing}"
|
44
|
+
target="${this.target}"
|
45
|
+
@click=${this._handleClick}
|
46
|
+
>
|
47
|
+
${htmlSlot()}
|
48
|
+
</a>
|
49
|
+
`;
|
46
50
|
}
|
47
51
|
|
48
|
-
|
49
|
-
protected _handleClick(_: MouseEvent) {}
|
52
|
+
protected _handleClick(_: MouseEvent): void {}
|
50
53
|
}
|
51
54
|
|
52
55
|
export default SuperAnchor;
|