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/dev/components/router.js
CHANGED
@@ -1,9 +1,6 @@
|
|
1
1
|
var Router_1;
|
2
2
|
import { __decorate } from "tslib";
|
3
|
-
import { godown } from "@godown/element
|
4
|
-
import { styles } from "@godown/element/decorators/styles.js";
|
5
|
-
import { htmlSlot } from "@godown/element/directives/html-slot.js";
|
6
|
-
import { RouteTree } from "@godown/element/tools/route-tree.js";
|
3
|
+
import { RouteTree, godown, htmlSlot, omit, styles } from "@godown/element";
|
7
4
|
import { css } from "lit";
|
8
5
|
import { property, state } from "lit/decorators.js";
|
9
6
|
import { GlobalStyle } from "../core/global-style.js";
|
@@ -40,18 +37,10 @@ let Router = Router_1 = class Router extends GlobalStyle {
|
|
40
37
|
* Render result.
|
41
38
|
*/
|
42
39
|
this.component = null;
|
43
|
-
/**
|
44
|
-
* Dynamic parameters record.
|
45
|
-
*/
|
46
|
-
this.params = {};
|
47
40
|
/**
|
48
41
|
* Current pathname (equals to location.pathname).
|
49
42
|
*/
|
50
|
-
this.pathname =
|
51
|
-
/**
|
52
|
-
* Path prefix.
|
53
|
-
*/
|
54
|
-
this.baseURL = "";
|
43
|
+
this.pathname = location.pathname;
|
55
44
|
/**
|
56
45
|
* Rendered content when there is no match.
|
57
46
|
*/
|
@@ -78,6 +67,12 @@ let Router = Router_1 = class Router extends GlobalStyle {
|
|
78
67
|
this.pathname = location.pathname;
|
79
68
|
});
|
80
69
|
}
|
70
|
+
/**
|
71
|
+
* Dynamic parameters record.
|
72
|
+
*/
|
73
|
+
get params() {
|
74
|
+
return RouteTree.parseParams(this.pathname, this.path);
|
75
|
+
}
|
81
76
|
set routes(value) {
|
82
77
|
this.__routes = value;
|
83
78
|
this.collectFieldRoutes(value);
|
@@ -89,7 +84,6 @@ let Router = Router_1 = class Router extends GlobalStyle {
|
|
89
84
|
this.__cacheRecord.clear();
|
90
85
|
}
|
91
86
|
render() {
|
92
|
-
this.params = {};
|
93
87
|
if (this.cache) {
|
94
88
|
const cached = this.__cacheRecord.get(this.pathname);
|
95
89
|
if (cached) {
|
@@ -107,12 +101,11 @@ let Router = Router_1 = class Router extends GlobalStyle {
|
|
107
101
|
default:
|
108
102
|
this.component = this.fieldComponent() ?? this.slottedComponent();
|
109
103
|
}
|
110
|
-
return this.component ?? this.default
|
104
|
+
return this.component ?? this.default;
|
111
105
|
}
|
112
106
|
connectedCallback() {
|
113
107
|
super.connectedCallback();
|
114
108
|
Router_1.routerInstances.add(this);
|
115
|
-
this.pathname ??= location.pathname;
|
116
109
|
if (this.type !== "field") {
|
117
110
|
const mutationObserver = new MutationObserver(this.collectSlottedRoutes);
|
118
111
|
mutationObserver.observe(this, {
|
@@ -151,33 +144,34 @@ let Router = Router_1 = class Router extends GlobalStyle {
|
|
151
144
|
* Get component from {@linkcode routes} by query.
|
152
145
|
*/
|
153
146
|
fieldComponent(query) {
|
154
|
-
query ||= this.
|
147
|
+
query ||= this.__fieldRouteTree.search(this.pathname)?.pattern;
|
155
148
|
this.path = query;
|
156
149
|
if (!query) {
|
157
150
|
return null;
|
158
151
|
}
|
159
|
-
this.params = this.parseParams(this.path, this.pathname);
|
160
152
|
const route = this.routes.find((r) => r.path === query);
|
161
153
|
if (!route) {
|
162
154
|
return null;
|
163
155
|
}
|
156
|
+
if ("render" in route) {
|
157
|
+
return route.render?.(omit(this.useRouter(), "component")) || null;
|
158
|
+
}
|
164
159
|
return route.component;
|
165
160
|
}
|
166
161
|
/**
|
167
162
|
* Get component from slotted elements by query.
|
168
163
|
*/
|
169
|
-
slottedComponent(
|
164
|
+
slottedComponent(query) {
|
170
165
|
const slottedPaths = this._slottedNames;
|
171
|
-
|
172
|
-
this.path =
|
173
|
-
if (!
|
166
|
+
query ||= this.__slottedRouteTree.search(this.pathname)?.pattern;
|
167
|
+
this.path = query;
|
168
|
+
if (!query) {
|
174
169
|
return null;
|
175
170
|
}
|
176
|
-
this.path = slottedPaths.find((s) => s ===
|
171
|
+
this.path = slottedPaths.find((s) => s === query);
|
177
172
|
if (!this.path) {
|
178
173
|
return null;
|
179
174
|
}
|
180
|
-
this.params = this.parseParams(usedRouteTemplate, this.pathname);
|
181
175
|
return htmlSlot(this.path);
|
182
176
|
}
|
183
177
|
/**
|
@@ -186,7 +180,7 @@ let Router = Router_1 = class Router extends GlobalStyle {
|
|
186
180
|
collectSlottedRoutes() {
|
187
181
|
this.__slottedRouteTree = new RouteTree();
|
188
182
|
this.clear();
|
189
|
-
this._slottedNames.forEach(slotName => {
|
183
|
+
this._slottedNames.forEach((slotName) => {
|
190
184
|
this.__slottedRouteTree.insert(slotName);
|
191
185
|
});
|
192
186
|
}
|
@@ -200,12 +194,6 @@ let Router = Router_1 = class Router extends GlobalStyle {
|
|
200
194
|
this.__fieldRouteTree.insert(path);
|
201
195
|
});
|
202
196
|
}
|
203
|
-
useWhich(path) {
|
204
|
-
return this.__fieldRouteTree.useWhich(this.baseURL + path);
|
205
|
-
}
|
206
|
-
parseParams(routeTemplate, path) {
|
207
|
-
return this.__fieldRouteTree.parseParams(path, routeTemplate);
|
208
|
-
}
|
209
197
|
static updateAll() {
|
210
198
|
this.routerInstances.forEach((i) => {
|
211
199
|
i.handlePopstate();
|
@@ -216,18 +204,12 @@ Router.routerInstances = new Set();
|
|
216
204
|
__decorate([
|
217
205
|
state()
|
218
206
|
], Router.prototype, "component", void 0);
|
219
|
-
__decorate([
|
220
|
-
state()
|
221
|
-
], Router.prototype, "params", void 0);
|
222
207
|
__decorate([
|
223
208
|
state()
|
224
209
|
], Router.prototype, "path", void 0);
|
225
210
|
__decorate([
|
226
211
|
property()
|
227
212
|
], Router.prototype, "pathname", void 0);
|
228
|
-
__decorate([
|
229
|
-
property()
|
230
|
-
], Router.prototype, "baseURL", void 0);
|
231
213
|
__decorate([
|
232
214
|
state()
|
233
215
|
], Router.prototype, "default", void 0);
|
@@ -242,7 +224,12 @@ __decorate([
|
|
242
224
|
], Router.prototype, "routes", null);
|
243
225
|
Router = Router_1 = __decorate([
|
244
226
|
godown(protoName),
|
245
|
-
styles(css
|
227
|
+
styles(css `
|
228
|
+
:host {
|
229
|
+
display: contents;
|
230
|
+
}
|
231
|
+
`)
|
246
232
|
], Router);
|
247
233
|
export default Router;
|
234
|
+
export { Router };
|
248
235
|
//# sourceMappingURL=router.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"router.js","sourceRoot":"","sources":["../../src/components/router.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"router.js","sourceRoot":"","sources":["../../src/components/router.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAA8C,GAAG,EAAE,MAAM,KAAK,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAmBtD,MAAM,SAAS,GAAG,QAAQ,CAAC;AAE3B;;;;;;;;;;;;;;;;;;;;;GAqBG;AAOH,IAAM,MAAM,cAAZ,MAAM,MAAO,SAAQ,WAAW;IAAhC;;QAGU,qBAAgB,GAAc,IAAI,SAAS,EAAE,CAAC;QAC9C,uBAAkB,GAAc,IAAI,SAAS,EAAE,CAAC;QAChD,kBAAa,GAAG,IAAI,GAAG,EAAuB,CAAC;QAGvD;;WAEG;QAEH,cAAS,GAA6B,IAAI,CAAC;QAe3C;;WAEG;QAEH,aAAQ,GAAW,QAAQ,CAAC,QAAQ,CAAC;QAErC;;WAEG;QAEH,YAAO,GAAmB,QAAQ,EAAE,CAAC;QAErC;;;;;;WAMG;QAEH,SAAI,GAAmC,QAAQ,CAAC;QAEhD;;;;WAIG;QAEH,UAA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K,EAAE;uCAC6B;AAUrC;IADC,QAAQ,EAAE;oCACqC;AAQhD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;qCACd;AAGd;IADC,KAAK,EAAE;oCAIP;AA7DG,MAAM;IANX,MAAM,CAAC,SAAS,CAAC;IACjB,MAAM,CAAC,GAAG,CAAA;;;;CAIV,CAAC;GACI,MAAM,CAqNX;AAED,eAAe,MAAM,CAAC;AACtB,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
@@ -1,4 +1,5 @@
|
|
1
|
-
import { HandlerEvent } from "@godown/element";
|
1
|
+
import { type HandlerEvent } from "@godown/element";
|
2
|
+
import { type TemplateResult } from "lit";
|
2
3
|
import Input from "./input.js";
|
3
4
|
/**
|
4
5
|
* {@linkcode Select} is similar to `<select>`.
|
@@ -11,6 +12,9 @@ import Input from "./input.js";
|
|
11
12
|
*
|
12
13
|
* Input will filter the element.
|
13
14
|
*
|
15
|
+
* @fires input - Fires when the input value changes.
|
16
|
+
* @fires change - Fires when the input value changes.
|
17
|
+
* @fires select - Fires when select an option.
|
14
18
|
* @slot - Options.
|
15
19
|
* @category input
|
16
20
|
*/
|
@@ -29,7 +33,7 @@ declare class Select extends Input {
|
|
29
33
|
protected defaultText: string;
|
30
34
|
protected defaultChecked: HTMLElement[];
|
31
35
|
private _store;
|
32
|
-
protected render():
|
36
|
+
protected render(): TemplateResult<1>;
|
33
37
|
protected _handleFocus(): void;
|
34
38
|
protected firstUpdated(): void;
|
35
39
|
protected _connectedInit(): void;
|
@@ -43,4 +47,5 @@ declare class Select extends Input {
|
|
43
47
|
optionValue(option: HTMLElement): string;
|
44
48
|
}
|
45
49
|
export default Select;
|
50
|
+
export { Select };
|
46
51
|
//# sourceMappingURL=select.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../src/components/select.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,
|
1
|
+
{"version":3,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AAC,GAAG,IAAI;IAW/D,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,IAAI;IAKnC,IAAI,IAAI,IAAI;IAMZ,WAAW,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM;CAGzC;AAED,eAAe,MAAM,CAAC;AACtB,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
package/dev/components/select.js
CHANGED
@@ -1,12 +1,8 @@
|
|
1
1
|
import { __decorate } from "tslib";
|
2
|
-
import { godown } from "@godown/element
|
3
|
-
import { part } from "@godown/element/decorators/part.js";
|
4
|
-
import { styles } from "@godown/element/decorators/styles.js";
|
5
|
-
import { htmlSlot } from "@godown/element/directives/html-slot.js";
|
2
|
+
import { attr, godown, htmlSlot, part, styles } from "@godown/element";
|
6
3
|
import svgCaretDown from "@godown/f7-icon/icons/chevron-down.js";
|
7
4
|
import { css, html, nothing } from "lit";
|
8
5
|
import { property, state } from "lit/decorators.js";
|
9
|
-
import { ifDefined } from "lit/directives/if-defined.js";
|
10
6
|
import Input from "./input.js";
|
11
7
|
function contain(a, b) {
|
12
8
|
return a && b && a.toLowerCase().includes(b.toLowerCase());
|
@@ -39,41 +35,66 @@ const protoName = "select";
|
|
39
35
|
*
|
40
36
|
* Input will filter the element.
|
41
37
|
*
|
38
|
+
* @fires input - Fires when the input value changes.
|
39
|
+
* @fires change - Fires when the input value changes.
|
40
|
+
* @fires select - Fires when select an option.
|
42
41
|
* @slot - Options.
|
43
42
|
* @category input
|
44
43
|
*/
|
45
44
|
let Select = class Select extends Input {
|
46
45
|
constructor() {
|
47
46
|
super(...arguments);
|
47
|
+
this.multiple = false;
|
48
|
+
this.visible = false;
|
48
49
|
this.autoDirection = "bottom";
|
49
50
|
this._store = [];
|
50
51
|
}
|
51
52
|
render() {
|
52
|
-
return html
|
53
|
-
|
53
|
+
return html `
|
54
|
+
<div
|
55
|
+
part="root"
|
56
|
+
${attr({
|
57
|
+
...this.observedRecord,
|
58
|
+
direction: this.direction || this.autoDirection,
|
59
|
+
})}
|
60
|
+
class="input-field"
|
61
|
+
>
|
62
|
+
${[
|
54
63
|
this._renderPrefix(),
|
55
|
-
html
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
64
|
+
html `
|
65
|
+
<input
|
66
|
+
part="input"
|
67
|
+
type="${this.type}"
|
68
|
+
.value="${this.text}"
|
69
|
+
?autofocus="${this.autofocus}"
|
70
|
+
?disabled="${this.disabled}"
|
71
|
+
autocapitalize="${this.autocapitalize || nothing}"
|
72
|
+
autocomplete="${this.autocomplete || nothing}"
|
73
|
+
placeholder="${this.placeholder || nothing}"
|
74
|
+
id="${this.makeId}"
|
75
|
+
@focus="${this._handleFocus}"
|
76
|
+
@input="${this._handleInput}"
|
77
|
+
/>
|
78
|
+
`,
|
79
|
+
html `
|
80
|
+
<label
|
81
|
+
for="${this.makeId}"
|
82
|
+
part="suffix"
|
83
|
+
>
|
84
|
+
<i part="icon">${svgCaretDown()}</i>
|
85
|
+
</label>
|
86
|
+
`,
|
87
|
+
html `
|
88
|
+
<label
|
89
|
+
for="${this.makeId}"
|
90
|
+
part="content"
|
91
|
+
>
|
92
|
+
${htmlSlot()}
|
93
|
+
</label>
|
94
|
+
`,
|
75
95
|
]}
|
76
|
-
|
96
|
+
</div>
|
97
|
+
`;
|
77
98
|
}
|
78
99
|
_handleFocus() {
|
79
100
|
if (!this.direction) {
|
@@ -115,11 +136,7 @@ let Select = class Select extends Input {
|
|
115
136
|
_connectedInit() {
|
116
137
|
if (!this.value) {
|
117
138
|
const checked = [...this.querySelectorAll("[checked]")];
|
118
|
-
const list = this.multiple
|
119
|
-
? checked
|
120
|
-
: checked.length
|
121
|
-
? [this.lastChecked = checked[0]]
|
122
|
-
: [];
|
139
|
+
const list = this.multiple ? checked : checked.length ? [(this.lastChecked = checked[0])] : [];
|
123
140
|
list.forEach((element) => {
|
124
141
|
const operation = this.select(this.optionValue(element), element.textContent);
|
125
142
|
updateChecked(element, operation);
|
@@ -135,14 +152,14 @@ let Select = class Select extends Input {
|
|
135
152
|
reset() {
|
136
153
|
this.value = this.default;
|
137
154
|
this.text = this.defaultText;
|
138
|
-
this.querySelectorAll("[checked]").forEach(element => updateChecked(element, 0));
|
139
|
-
this.defaultChecked.forEach(element => updateChecked(element, 1));
|
155
|
+
this.querySelectorAll("[checked]").forEach((element) => updateChecked(element, 0));
|
156
|
+
this.defaultChecked.forEach((element) => updateChecked(element, 1));
|
140
157
|
}
|
141
158
|
select(value, text) {
|
142
159
|
text ||= value;
|
143
160
|
let operation = 0;
|
144
161
|
if (this.multiple) {
|
145
|
-
const i = this._store.findIndex(s => s.value === value);
|
162
|
+
const i = this._store.findIndex((s) => s.value === value);
|
146
163
|
if (i > -1) {
|
147
164
|
this._store.splice(i, 1);
|
148
165
|
}
|
@@ -150,8 +167,8 @@ let Select = class Select extends Input {
|
|
150
167
|
this._store.push({ value, text });
|
151
168
|
operation = 1;
|
152
169
|
}
|
153
|
-
this.value = this._store.map(s => s.value);
|
154
|
-
this.text = this._store.map(s => s.text).join(", ");
|
170
|
+
this.value = this._store.map((s) => s.value);
|
171
|
+
this.text = this._store.map((s) => s.text).join(", ");
|
155
172
|
}
|
156
173
|
else {
|
157
174
|
if (this.value === value) {
|
@@ -164,19 +181,16 @@ let Select = class Select extends Input {
|
|
164
181
|
operation = 1;
|
165
182
|
}
|
166
183
|
}
|
167
|
-
this.dispatchEvent(new CustomEvent("
|
184
|
+
this.dispatchEvent(new CustomEvent("select", { detail: this.value, composed: true }));
|
168
185
|
this.filter();
|
169
186
|
return operation;
|
170
187
|
}
|
171
188
|
filter(query) {
|
172
189
|
query = query?.trim();
|
173
190
|
[...this.children].forEach((element) => {
|
174
|
-
this.filterCallback(element, !query
|
175
|
-
|| contain(this.optionValue(element), query)
|
176
|
-
|| contain(element.textContent, query), query);
|
191
|
+
this.filterCallback(element, !query || contain(this.optionValue(element), query) || contain(element.textContent, query), query);
|
177
192
|
});
|
178
193
|
}
|
179
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
180
194
|
filterCallback(element, match, query) {
|
181
195
|
element.style.display = match ? "" : "none";
|
182
196
|
}
|
@@ -187,7 +201,8 @@ let Select = class Select extends Input {
|
|
187
201
|
}
|
188
202
|
const s = this._input.value;
|
189
203
|
this.filter(this.multiple ? betweenAt(this._input.selectionStart, s, ",") : s);
|
190
|
-
this.dispatchEvent(new CustomEvent("input", { detail: this.
|
204
|
+
this.dispatchEvent(new CustomEvent("input", { detail: this.value, composed: true, bubbles: true }));
|
205
|
+
this.dispatchEvent(new CustomEvent("change", { detail: this.value, composed: true }));
|
191
206
|
}
|
192
207
|
focus(options) {
|
193
208
|
this._input.focus(options);
|
@@ -223,23 +238,29 @@ __decorate([
|
|
223
238
|
Select = __decorate([
|
224
239
|
godown(protoName),
|
225
240
|
styles(css `
|
226
|
-
|
227
|
-
|
228
|
-
|
241
|
+
[part="input"] {
|
242
|
+
text-overflow: ellipsis;
|
243
|
+
}
|
229
244
|
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
245
|
+
[part="content"] {
|
246
|
+
position: absolute;
|
247
|
+
width: 100%;
|
248
|
+
visibility: hidden;
|
249
|
+
}
|
234
250
|
|
235
|
-
|
236
|
-
|
237
|
-
|
251
|
+
[direction="bottom"] [part="content"] {
|
252
|
+
top: 100%;
|
253
|
+
}
|
238
254
|
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
255
|
+
[direction="top"] [part="content"] {
|
256
|
+
bottom: 100%;
|
257
|
+
}
|
258
|
+
|
259
|
+
[visible] [part="content"] {
|
260
|
+
visibility: visible;
|
261
|
+
}
|
262
|
+
`)
|
243
263
|
], Select);
|
244
264
|
export default Select;
|
265
|
+
export { Select };
|
245
266
|
//# sourceMappingURL=select.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"select.js","sourceRoot":"","sources":["../../src/components/select.ts"],"names":[],"mappings":";
|
1
|
+
{"version":3,"file":"select.js","sourceRoot":"","sources":["../../src/components/select.ts"],"names":[],"mappings":";AAAA,OAAO,EAAqB,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC1F,OAAO,YAAY,MAAM,uCAAuC,CAAC;AACjE,OAAO,EAAuB,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,KAAK,MAAM,YAAY,CAAC;AAE/B,SAAS,OAAO,CAAC,CAAS,EAAE,CAAS;IACnC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;AAC7D,CAAC;AAED,SAAS,SAAS,CAAC,CAAS,EAAE,CAAS,EAAE,CAAS;IAChD,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACpD,MAAM,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC;IACxC,OAAO,CAAC,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AAC7B,CAAC;AAED,SAAS,aAAa,CAAC,OAA2B,EAAE,SAAgB;IAClE,IAAI,OAAO,EAAE,CAAC;QACZ,MAAM,IAAI,GAAG,SAAS,CAAC;QACvB,IAAI,SAAS,EAAE,CAAC;YACd,OAAO,CAAC,YAAY,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QACjC,CAAC;aAAM,CAAC;Y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AAC;AACtB,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { type TemplateResult } from "lit";
|
1
2
|
import { GlobalStyle } from "../core/global-style.js";
|
2
3
|
/**
|
3
4
|
* {@linkcode Skeleton} renders a skeleton screen.
|
@@ -20,7 +21,8 @@ declare class Skeleton extends GlobalStyle {
|
|
20
21
|
* If false, render slot only.
|
21
22
|
*/
|
22
23
|
loading: boolean;
|
23
|
-
protected render():
|
24
|
+
protected render(): TemplateResult<1>;
|
24
25
|
}
|
25
26
|
export default Skeleton;
|
27
|
+
export { Skeleton };
|
26
28
|
//# sourceMappingURL=skeleton.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"skeleton.d.ts","sourceRoot":"","sources":["../../src/components/skeleton.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"skeleton.d.ts","sourceRoot":"","sources":["../../src/components/skeleton.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAGrD,OAAO,EAAE,WAAW,EAA8B,MAAM,yBAAyB,CAAC;AAKlF;;;;;;GAMG;AACH,cAkEM,QAAS,SAAQ,WAAW;IAChC;;OAEG;IAEH,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IAEvB;;;OAGG;IAEH,SAAS,EAAE,UAAU,GAAG,SAAS,CAAc;IAE/C;;OAEG;IAEH,OAAO,UAAQ;IAEf,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;CAatC;AAED,eAAe,QAAQ,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|