godown 3.0.0-canary.8 → 3.0.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 +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 +8 -2
- package/components/avatar.d.ts.map +1 -1
- package/components/avatar.js +1 -61
- 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 +7 -4
- package/components/breath.d.ts.map +1 -1
- package/components/breath.js +1 -79
- package/components/breath.js.map +1 -1
- package/components/button.d.ts +19 -10
- package/components/button.d.ts.map +1 -1
- package/components/button.js +1 -165
- package/components/button.js.map +1 -1
- package/components/card.d.ts +3 -2
- package/components/card.d.ts.map +1 -1
- package/components/card.js +1 -53
- package/components/card.js.map +1 -1
- package/components/carousel.d.ts +10 -5
- package/components/carousel.d.ts.map +1 -1
- package/components/carousel.js +1 -112
- package/components/carousel.js.map +1 -1
- package/components/details.d.ts +6 -2
- package/components/details.d.ts.map +1 -1
- package/components/details.js +1 -49
- package/components/details.js.map +1 -1
- package/components/dialog.d.ts +8 -3
- package/components/dialog.d.ts.map +1 -1
- package/components/dialog.js +1 -93
- 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 +11 -9
- 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 +4 -1
- package/components/flex.d.ts.map +1 -1
- package/components/flex.js +1 -54
- package/components/flex.js.map +1 -1
- package/components/form.d.ts +3 -3
- package/components/form.d.ts.map +1 -1
- package/components/form.js +1 -77
- package/components/form.js.map +1 -1
- package/components/grid.d.ts +10 -3
- package/components/grid.d.ts.map +1 -1
- package/components/grid.js +1 -55
- 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 +7 -3
- 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 +8 -9
- package/components/layout.d.ts.map +1 -1
- package/components/layout.js +1 -46
- package/components/layout.js.map +1 -1
- package/components/link.d.ts +8 -1
- package/components/link.d.ts.map +1 -1
- package/components/link.js +1 -42
- package/components/link.js.map +1 -1
- package/components/progress.d.ts +4 -11
- package/components/progress.d.ts.map +1 -1
- package/components/progress.js +1 -67
- package/components/progress.js.map +1 -1
- package/components/range.d.ts +22 -15
- package/components/range.d.ts.map +1 -1
- package/components/range.js +1 -273
- package/components/range.js.map +1 -1
- package/components/rotate.d.ts +4 -2
- 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 +20 -24
- 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 +8 -4
- package/components/select.d.ts.map +1 -1
- package/components/select.js +1 -212
- 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 +25 -2
- package/components/split.d.ts.map +1 -1
- package/components/split.js +1 -128
- package/components/split.js.map +1 -1
- package/components/switch.d.ts +8 -5
- 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 +8 -6
- package/components/time.d.ts.map +1 -1
- package/components/time.js +1 -85
- package/components/time.js.map +1 -1
- package/components/tooltip.d.ts +14 -2
- package/components/tooltip.d.ts.map +1 -1
- package/components/tooltip.js +1 -66
- package/components/tooltip.js.map +1 -1
- package/components/typewriter.d.ts +8 -14
- 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 -45
- 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 +6 -5
- 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 +20 -23
- package/dev/components/alert.js.map +1 -1
- package/dev/components/avatar.d.ts +8 -2
- package/dev/components/avatar.d.ts.map +1 -1
- package/dev/components/avatar.js +23 -13
- 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 +107 -0
- package/dev/components/badge.js.map +1 -0
- package/dev/components/breath.d.ts +7 -4
- package/dev/components/breath.d.ts.map +1 -1
- package/dev/components/breath.js +30 -26
- package/dev/components/breath.js.map +1 -1
- package/dev/components/button.d.ts +19 -10
- package/dev/components/button.d.ts.map +1 -1
- package/dev/components/button.js +47 -28
- package/dev/components/button.js.map +1 -1
- package/dev/components/card.d.ts +3 -2
- package/dev/components/card.d.ts.map +1 -1
- package/dev/components/card.js +23 -33
- package/dev/components/card.js.map +1 -1
- package/dev/components/carousel.d.ts +10 -5
- package/dev/components/carousel.d.ts.map +1 -1
- package/dev/components/carousel.js +33 -26
- package/dev/components/carousel.js.map +1 -1
- package/dev/components/details.d.ts +6 -2
- package/dev/components/details.d.ts.map +1 -1
- package/dev/components/details.js +24 -26
- package/dev/components/details.js.map +1 -1
- package/dev/components/dialog.d.ts +8 -3
- package/dev/components/dialog.d.ts.map +1 -1
- package/dev/components/dialog.js +21 -17
- 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 +29 -17
- package/dev/components/divider.js.map +1 -1
- package/dev/components/dragbox.d.ts +11 -9
- package/dev/components/dragbox.d.ts.map +1 -1
- package/dev/components/dragbox.js +11 -4
- package/dev/components/dragbox.js.map +1 -1
- package/dev/components/flex.d.ts +4 -1
- package/dev/components/flex.d.ts.map +1 -1
- package/dev/components/flex.js +25 -9
- package/dev/components/flex.js.map +1 -1
- package/dev/components/form.d.ts +3 -3
- package/dev/components/form.d.ts.map +1 -1
- package/dev/components/form.js +2 -5
- package/dev/components/form.js.map +1 -1
- package/dev/components/grid.d.ts +10 -3
- package/dev/components/grid.d.ts.map +1 -1
- package/dev/components/grid.js +18 -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 +103 -0
- package/dev/components/heading.js.map +1 -0
- package/dev/components/input.d.ts +7 -3
- package/dev/components/input.d.ts.map +1 -1
- package/dev/components/input.js +18 -18
- package/dev/components/input.js.map +1 -1
- package/dev/components/layout.d.ts +8 -9
- package/dev/components/layout.d.ts.map +1 -1
- package/dev/components/layout.js +38 -25
- package/dev/components/layout.js.map +1 -1
- package/dev/components/link.d.ts +8 -1
- package/dev/components/link.d.ts.map +1 -1
- package/dev/components/link.js +15 -3
- package/dev/components/link.js.map +1 -1
- package/dev/components/progress.d.ts +4 -11
- package/dev/components/progress.d.ts.map +1 -1
- package/dev/components/progress.js +43 -49
- package/dev/components/progress.js.map +1 -1
- package/dev/components/range.d.ts +22 -15
- package/dev/components/range.d.ts.map +1 -1
- package/dev/components/range.js +56 -61
- package/dev/components/range.js.map +1 -1
- package/dev/components/rotate.d.ts +4 -2
- package/dev/components/rotate.d.ts.map +1 -1
- package/dev/components/rotate.js +3 -5
- package/dev/components/rotate.js.map +1 -1
- package/dev/components/router.d.ts +20 -24
- package/dev/components/router.d.ts.map +1 -1
- package/dev/components/router.js +23 -36
- package/dev/components/router.js.map +1 -1
- package/dev/components/select.d.ts +8 -4
- package/dev/components/select.d.ts.map +1 -1
- package/dev/components/select.js +44 -32
- 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 +9 -9
- package/dev/components/skeleton.js.map +1 -1
- package/dev/components/split.d.ts +25 -2
- package/dev/components/split.d.ts.map +1 -1
- package/dev/components/split.js +71 -38
- package/dev/components/split.js.map +1 -1
- package/dev/components/switch.d.ts +8 -5
- package/dev/components/switch.d.ts.map +1 -1
- package/dev/components/switch.js +28 -31
- 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 +12 -15
- package/dev/components/text.js.map +1 -1
- package/dev/components/time.d.ts +8 -6
- package/dev/components/time.d.ts.map +1 -1
- package/dev/components/time.js +8 -14
- package/dev/components/time.js.map +1 -1
- package/dev/components/tooltip.d.ts +14 -2
- package/dev/components/tooltip.d.ts.map +1 -1
- package/dev/components/tooltip.js +54 -24
- package/dev/components/tooltip.js.map +1 -1
- package/dev/components/typewriter.d.ts +8 -14
- package/dev/components/typewriter.d.ts.map +1 -1
- package/dev/components/typewriter.js +22 -37
- 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 +18 -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 +25 -23
- package/dev/core/super-anchor.js.map +1 -1
- package/dev/core/super-input.d.ts +6 -5
- package/dev/core/super-input.d.ts.map +1 -1
- package/dev/core/super-input.js +43 -36
- 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 +2 -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 +11 -6
- 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 +26 -29
- package/src/components/avatar.ts +28 -17
- package/src/components/badge.ts +107 -0
- package/src/components/breath.ts +38 -31
- package/src/components/button.ts +55 -46
- package/src/components/card.ts +26 -34
- package/src/components/carousel.ts +48 -38
- package/src/components/details.ts +27 -28
- package/src/components/dialog.ts +30 -26
- package/src/components/divider.ts +29 -17
- package/src/components/dragbox.ts +25 -19
- package/src/components/flex.ts +26 -11
- package/src/components/form.ts +7 -9
- package/src/components/grid.ts +31 -13
- package/src/components/heading.ts +105 -0
- package/src/components/input.ts +23 -22
- package/src/components/layout.ts +26 -31
- package/src/components/link.ts +15 -4
- package/src/components/progress.ts +51 -52
- package/src/components/range.ts +82 -94
- package/src/components/rotate.ts +12 -11
- package/src/components/router.ts +59 -48
- package/src/components/select.ts +59 -47
- package/src/components/skeleton.ts +13 -11
- package/src/components/split.ts +90 -49
- package/src/components/switch.ts +38 -37
- package/src/components/text.ts +14 -21
- package/src/components/time.ts +20 -14
- package/src/components/tooltip.ts +54 -29
- package/src/components/typewriter.ts +41 -47
- package/src/core/global-style.ts +33 -19
- package/src/core/super-anchor.ts +30 -26
- package/src/core/super-input.ts +54 -54
- package/src/core/super-openable.ts +7 -7
- 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
@@ -1,7 +1,10 @@
|
|
1
|
+
import { type TemplateResult } from "lit";
|
1
2
|
import SuperInput from "../core/super-input.js";
|
2
3
|
/**
|
3
|
-
* {@linkcode Input}
|
4
|
+
* {@linkcode Input} renders a text input.
|
4
5
|
*
|
6
|
+
* @fires input - Fires when the input value changes.
|
7
|
+
* @fires change - Fires when the input value changes.
|
5
8
|
* @category input
|
6
9
|
*/
|
7
10
|
declare class Input extends SuperInput {
|
@@ -11,9 +14,10 @@ declare class Input extends SuperInput {
|
|
11
14
|
* If outline, the outline is always present.
|
12
15
|
*/
|
13
16
|
variant: "default" | "outline";
|
14
|
-
_input: HTMLInputElement;
|
15
|
-
protected render():
|
17
|
+
protected _input: HTMLInputElement;
|
18
|
+
protected render(): TemplateResult<1>;
|
16
19
|
reset(): void;
|
17
20
|
}
|
18
21
|
export default Input;
|
22
|
+
export { Input };
|
19
23
|
//# sourceMappingURL=input.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/components/input.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/components/input.ts"],"names":[],"mappings":"AACA,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAI9D,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAIhD;;;;;;GAMG;AACH,cAaM,KAAM,SAAQ,UAAU;IAC5B,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,KAAK,GAAG,OAAO,GAAG,UAAU,CAAU;IAExE,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IAEH,OAAO,EAAE,SAAS,GAAG,SAAS,CAAa;IAG3C,SAAS,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAEnC,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;IAqBrC,KAAK,IAAI,IAAI;CAId;AAED,eAAe,KAAK,CAAC;AACrB,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
package/dev/components/input.js
CHANGED
@@ -1,16 +1,15 @@
|
|
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 { classList } from "@godown/element/directives/class-list.js";
|
2
|
+
import { attr, classList, godown, part, styles } from "@godown/element";
|
6
3
|
import { css, html, nothing } from "lit";
|
7
4
|
import { property } from "lit/decorators.js";
|
8
5
|
import { cssGlobalVars } from "../core/global-style.js";
|
9
6
|
import SuperInput from "../core/super-input.js";
|
10
7
|
const protoName = "input";
|
11
8
|
/**
|
12
|
-
* {@linkcode Input}
|
9
|
+
* {@linkcode Input} renders a text input.
|
13
10
|
*
|
11
|
+
* @fires input - Fires when the input value changes.
|
12
|
+
* @fires change - Fires when the input value changes.
|
14
13
|
* @category input
|
15
14
|
*/
|
16
15
|
let Input = class Input extends SuperInput {
|
@@ -23,21 +22,21 @@ let Input = class Input extends SuperInput {
|
|
23
22
|
this.variant = "default";
|
24
23
|
}
|
25
24
|
render() {
|
26
|
-
return html `<div part="root" class="${classList("input-field", this.variant)}">
|
27
|
-
|
25
|
+
return html `<div part="root" ${attr(this.observedRecord)} class="${classList("input-field", this.variant)}">
|
26
|
+
${[
|
28
27
|
this._renderPrefix(),
|
29
28
|
html `<input
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
29
|
+
part="input"
|
30
|
+
type="${this.type}"
|
31
|
+
id="${this.makeId}"
|
32
|
+
.value="${this.value}"
|
33
|
+
placeholder="${this.placeholder || nothing}"
|
34
|
+
?autofocus="${this.autofocus}"
|
35
|
+
autocapitalize="${this.autocapitalize || nothing}"
|
36
|
+
autocomplete="${this.autocomplete || nothing}"
|
37
|
+
?disabled="${this.disabled}"
|
38
|
+
@input="${this._handleInput}"
|
39
|
+
>`,
|
41
40
|
this._renderSuffix(),
|
42
41
|
]}
|
43
42
|
</div>`;
|
@@ -67,4 +66,5 @@ Input = __decorate([
|
|
67
66
|
`)
|
68
67
|
], Input);
|
69
68
|
export default Input;
|
69
|
+
export { Input };
|
70
70
|
//# sourceMappingURL=input.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"input.js","sourceRoot":"","sources":["../../src/components/input.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"input.js","sourceRoot":"","sources":["../../src/components/input.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAuB,MAAM,KAAK,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAEhD,MAAM,SAAS,GAAG,OAAO,CAAC;AAE1B;;;;;;GAMG;AAcH,IAAM,KAAK,GAAX,MAAM,KAAM,SAAQ,UAAU;IAA9B;;QACE,SAAI,GAA6D,MAAM,CAAC;QAIxE;;WAEG;QAEH,YAAO,GAA0B,SAAS,CAAC;IA8B7C,CAAC;IAzBW,MAAM;QACd,OAAO,IAAI,CAAA,oBAAoB,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,WAAW,SAAS,CAAC,aAAa,EAAE,IAAI,CAAC,OAAO,CAAC;QACrG;YACF,IAAI,CAAC,aAAa,EAAE;YACpB,IAAI,CAAA;;kBAEQ,IAAI,CAAC,IAAI;gBACX,IAAI,CAAC,MAAM;oBACP,IAAI,CAAC,KAAK;yBACL,IAAI,CAAC,WAAW,IAAI,OAAO;wBAC5B,IAAI,CAAC,SAAS;4BACV,IAAI,CAAC,cAAc,IAAI,OAAO;0BAChC,IAAI,CAAC,YAAY,IAAI,OAAO;uBAC/B,IAAI,CAAC,QAAQ;oBAChB,IAAI,CAAC,YAAY;UAC3B;YACJ,IAAI,CAAC,aAAa,EAAE;SACrB;WACM,CAAC;IACV,CAAC;IAED,KAAK;QACH,IAAI,CAAC,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC;QACjC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC;IAC5B,CAAC;CACF,CAAA;AA9BC;IADC,QAAQ,EAAE;sCACgC;AAGjC;IADT,IAAI,CAAC,OAAO,CAAC;qCACqB;AAZ/B,KAAK;IAbV,MAAM,CAAC,SAAS,CAAC;IACjB,MAAM,CACL,GAAG,CAAA;;mBAEc,aAAa,CAAC,KAAK;oBAClB,aAAa,CAAC,KAAK;mBACpB,aAAa,CAAC,UAAU;wBACnB,aAAa,CAAC,KAAK;2BAChB,aAAa,CAAC,KAAK;;;GAG3C,CACF;GACK,KAAK,CAuCV;AAED,eAAe,KAAK,CAAC;AACrB,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
@@ -1,29 +1,28 @@
|
|
1
|
+
import { type TemplateResult } from "lit";
|
1
2
|
import { GlobalStyle } from "../core/global-style.js";
|
2
3
|
/**
|
3
|
-
* {@linkcode
|
4
|
+
* {@linkcode Layout} renders slot and optional top header, bottom footer.
|
4
5
|
*
|
5
6
|
* @slot - The main content of the layout.
|
6
|
-
*
|
7
7
|
* @slot header - The header of the layout.
|
8
|
-
*
|
9
8
|
* @slot footer - The footer of the layout.
|
10
|
-
*
|
11
9
|
* @category layout
|
12
10
|
*/
|
13
|
-
declare class
|
11
|
+
declare class Layout extends GlobalStyle {
|
14
12
|
/**
|
15
|
-
* If true,
|
13
|
+
* If true, remove the header slot.
|
16
14
|
*/
|
17
15
|
noHeader: boolean;
|
18
16
|
/**
|
19
|
-
* If true,
|
17
|
+
* If true, remove the footer slot.
|
20
18
|
*/
|
21
19
|
noFooter: boolean;
|
22
20
|
/**
|
23
21
|
* If true, header will sticky.
|
24
22
|
*/
|
25
23
|
sticky: boolean;
|
26
|
-
protected render():
|
24
|
+
protected render(): TemplateResult<1>;
|
27
25
|
}
|
28
|
-
export default
|
26
|
+
export default Layout;
|
27
|
+
export { Layout };
|
29
28
|
//# sourceMappingURL=layout.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../src/components/layout.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../src/components/layout.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAGrD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAItD;;;;;;;GAOG;AACH,cAiCM,MAAO,SAAQ,WAAW;IAC9B;;OAEG;IAEH,QAAQ,UAAS;IAEjB;;OAEG;IAEH,QAAQ,UAAS;IAEjB;;OAEG;IAEH,MAAM,UAAS;IAEf,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;CAOtC;AAED,eAAe,MAAM,CAAC;AACtB,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
package/dev/components/layout.js
CHANGED
@@ -1,59 +1,71 @@
|
|
1
1
|
import { __decorate } from "tslib";
|
2
|
-
import { godown } from "@godown/element
|
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";
|
2
|
+
import { attr, godown, htmlSlot, styles } from "@godown/element";
|
6
3
|
import { css, html } from "lit";
|
7
4
|
import { property } from "lit/decorators.js";
|
8
5
|
import { GlobalStyle } from "../core/global-style.js";
|
9
6
|
const protoName = "layout";
|
10
7
|
/**
|
11
|
-
* {@linkcode
|
8
|
+
* {@linkcode Layout} renders slot and optional top header, bottom footer.
|
12
9
|
*
|
13
10
|
* @slot - The main content of the layout.
|
14
|
-
*
|
15
11
|
* @slot header - The header of the layout.
|
16
|
-
*
|
17
12
|
* @slot footer - The footer of the layout.
|
18
|
-
*
|
19
13
|
* @category layout
|
20
14
|
*/
|
21
|
-
let
|
15
|
+
let Layout = class Layout extends GlobalStyle {
|
16
|
+
constructor() {
|
17
|
+
super(...arguments);
|
18
|
+
/**
|
19
|
+
* If true, remove the header slot.
|
20
|
+
*/
|
21
|
+
this.noHeader = false;
|
22
|
+
/**
|
23
|
+
* If true, remove the footer slot.
|
24
|
+
*/
|
25
|
+
this.noFooter = false;
|
26
|
+
/**
|
27
|
+
* If true, header will sticky.
|
28
|
+
*/
|
29
|
+
this.sticky = false;
|
30
|
+
}
|
22
31
|
render() {
|
23
|
-
return html
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
? html `<footer part="footer">${htmlSlot("footer")}</footer>`
|
29
|
-
: ""}`;
|
32
|
+
return html `<div part="root" ${attr(this.observedRecord)}>
|
33
|
+
${!this.noHeader ? html `<header part="header">${htmlSlot("header")}</header>` : ""}
|
34
|
+
<main part="main">${htmlSlot()}</main>
|
35
|
+
${!this.noFooter ? html `<footer part="footer">${htmlSlot("footer")}</footer>` : ""}
|
36
|
+
</div>`;
|
30
37
|
}
|
31
38
|
};
|
32
39
|
__decorate([
|
33
40
|
property({ type: Boolean })
|
34
|
-
],
|
41
|
+
], Layout.prototype, "noHeader", void 0);
|
35
42
|
__decorate([
|
36
43
|
property({ type: Boolean })
|
37
|
-
],
|
44
|
+
], Layout.prototype, "noFooter", void 0);
|
38
45
|
__decorate([
|
39
46
|
property({ type: Boolean })
|
40
|
-
],
|
41
|
-
|
47
|
+
], Layout.prototype, "sticky", void 0);
|
48
|
+
Layout = __decorate([
|
42
49
|
godown(protoName),
|
43
50
|
styles(css `
|
44
|
-
:host
|
51
|
+
:host,
|
52
|
+
:host([contents]) [part=root] {
|
45
53
|
min-height: 100%;
|
46
54
|
display: flex;
|
47
55
|
flex-direction: column;
|
48
56
|
}
|
49
57
|
|
50
|
-
|
58
|
+
[part=root] {
|
59
|
+
display: contents;
|
60
|
+
}
|
61
|
+
|
62
|
+
[sticky] header {
|
51
63
|
position: sticky;
|
52
64
|
top: 0;
|
53
65
|
z-index: 1;
|
54
66
|
}
|
55
67
|
|
56
|
-
[part=
|
68
|
+
[part=main] {
|
57
69
|
position: relative;
|
58
70
|
flex: 1;
|
59
71
|
width: 100%;
|
@@ -65,6 +77,7 @@ NavLayout = __decorate([
|
|
65
77
|
width: 100%;
|
66
78
|
}
|
67
79
|
`)
|
68
|
-
],
|
69
|
-
export default
|
80
|
+
], Layout);
|
81
|
+
export default Layout;
|
82
|
+
export { Layout };
|
70
83
|
//# sourceMappingURL=layout.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../../src/components/layout.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../../src/components/layout.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,GAAG,EAAE,IAAI,EAAuB,MAAM,KAAK,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,MAAM,SAAS,GAAG,QAAQ,CAAC;AAE3B;;;;;;;GAOG;AAkCH,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,WAAW;IAAhC;;QACE;;WAEG;QAEH,aAAQ,GAAG,KAAK,CAAC;QAEjB;;WAEG;QAEH,aAAQ,GAAG,KAAK,CAAC;QAEjB;;WAEG;QAEH,WAAM,GAAG,KAAK,CAAC;IASjB,CAAC;IAPW,MAAM;QACd,OAAO,IAAI,CAAA,oBAAoB,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC;QACpD,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAA,yBAAyB,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE;0BAC9D,QAAQ,EAAE;QAC5B,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAA,yBAAyB,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE;WAC7E,CAAC;IACV,CAAC;CACF,CAAA;AArBC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;wCACX;AAMjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;wCACX;AAMjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;sCACb;AAjBX,MAAM;IAjCX,MAAM,CAAC,SAAS,CAAC;IACjB,MAAM,CACL,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BF,CACF;GACK,MAAM,CA0BX;AAED,eAAe,MAAM,CAAC;AACtB,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
package/dev/components/link.d.ts
CHANGED
@@ -11,10 +11,17 @@ declare class Link extends SuperAnchor {
|
|
11
11
|
/**
|
12
12
|
* If "push", call `history.pushState`.
|
13
13
|
*
|
14
|
-
* If "replace", call `history.replaceState
|
14
|
+
* If "replace", call `history.replaceState`.
|
15
|
+
*
|
16
|
+
* If "normal", behave like a normal anchor.
|
15
17
|
*/
|
16
18
|
type: "push" | "replace" | "normal";
|
19
|
+
/**
|
20
|
+
* Suppress the update of the {@linkcode Router}.
|
21
|
+
*/
|
22
|
+
suppress: boolean;
|
17
23
|
protected _handleClick(e: MouseEvent): void;
|
18
24
|
}
|
19
25
|
export default Link;
|
26
|
+
export { Link };
|
20
27
|
//# sourceMappingURL=link.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../src/components/link.ts"],"names":[],"mappings":"AAGA,OAAO,WAAW,MAAM,yBAAyB,CAAC;AAKlD;;;;;;;GAOG;AACH,cACM,IAAK,SAAQ,WAAW;IAC5B
|
1
|
+
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../src/components/link.ts"],"names":[],"mappings":"AAGA,OAAO,WAAW,MAAM,yBAAyB,CAAC;AAKlD;;;;;;;GAOG;AACH,cACM,IAAK,SAAQ,WAAW;IAC5B;;;;;;OAMG;IAEH,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAY;IAE/C;;OAEG;IAEH,QAAQ,UAAS;IAEjB,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI;CAS5C;AAED,eAAe,IAAI,CAAC;AACpB,OAAO,EAAE,IAAI,EAAE,CAAC"}
|
package/dev/components/link.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { __decorate } from "tslib";
|
2
|
-
import { godown } from "@godown/element
|
2
|
+
import { godown } from "@godown/element";
|
3
3
|
import { property } from "lit/decorators.js";
|
4
4
|
import SuperAnchor from "../core/super-anchor.js";
|
5
5
|
import Router from "./router.js";
|
@@ -18,23 +18,35 @@ let Link = class Link extends SuperAnchor {
|
|
18
18
|
/**
|
19
19
|
* If "push", call `history.pushState`.
|
20
20
|
*
|
21
|
-
* If "replace", call `history.replaceState
|
21
|
+
* If "replace", call `history.replaceState`.
|
22
|
+
*
|
23
|
+
* If "normal", behave like a normal anchor.
|
22
24
|
*/
|
23
25
|
this.type = "normal";
|
26
|
+
/**
|
27
|
+
* Suppress the update of the {@linkcode Router}.
|
28
|
+
*/
|
29
|
+
this.suppress = false;
|
24
30
|
}
|
25
31
|
_handleClick(e) {
|
26
32
|
if (this.type === "push" || this.type === "replace") {
|
27
33
|
e.preventDefault();
|
28
34
|
(history[`${this.type}State`])(null, "", this.href);
|
29
|
-
|
35
|
+
if (!this.suppress) {
|
36
|
+
Router.updateAll();
|
37
|
+
}
|
30
38
|
}
|
31
39
|
}
|
32
40
|
};
|
33
41
|
__decorate([
|
34
42
|
property()
|
35
43
|
], Link.prototype, "type", void 0);
|
44
|
+
__decorate([
|
45
|
+
property({ type: Boolean })
|
46
|
+
], Link.prototype, "suppress", void 0);
|
36
47
|
Link = __decorate([
|
37
48
|
godown(protoName)
|
38
49
|
], Link);
|
39
50
|
export default Link;
|
51
|
+
export { Link };
|
40
52
|
//# sourceMappingURL=link.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"link.js","sourceRoot":"","sources":["../../src/components/link.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"link.js","sourceRoot":"","sources":["../../src/components/link.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,WAAW,MAAM,yBAAyB,CAAC;AAClD,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,MAAM,SAAS,GAAG,MAAM,CAAC;AAEzB;;;;;;;GAOG;AAEH,IAAM,IAAI,GAAV,MAAM,IAAK,SAAQ,WAAW;IAA9B;;QACE;;;;;;WAMG;QAEH,SAAI,GAAkC,QAAQ,CAAC;QAE/C;;WAEG;QAEH,aAAQ,GAAG,KAAK,CAAC;IAWnB,CAAC;IATW,YAAY,CAAC,CAAa;QAClC,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YACpD,CAAC,CAAC,cAAc,EAAE,CAAC;YACnB,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;YACpD,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACnB,MAAM,CAAC,SAAS,EAAE,CAAC;YACrB,CAAC;QACH,CAAC;IACH,CAAC;CACF,CAAA;AAjBC;IADC,QAAQ,EAAE;kCACoC;AAM/C;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;sCACX;AAfb,IAAI;IADT,MAAM,CAAC,SAAS,CAAC;GACZ,IAAI,CA0BT;AAED,eAAe,IAAI,CAAC;AACpB,OAAO,EAAE,IAAI,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 Progress} similar to `<progress>`.
|
@@ -5,19 +6,10 @@ import { GlobalStyle } from "../core/global-style.js";
|
|
5
6
|
* @category feedback
|
6
7
|
*/
|
7
8
|
declare class Progress extends GlobalStyle {
|
8
|
-
/**
|
9
|
-
* Maximum.
|
10
|
-
*/
|
11
9
|
max: number;
|
12
|
-
/**
|
13
|
-
* Minimum.
|
14
|
-
*/
|
15
10
|
min: number;
|
16
|
-
|
17
|
-
|
18
|
-
*/
|
19
|
-
value: any;
|
20
|
-
protected render(): import("lit").TemplateResult<1>;
|
11
|
+
value: number;
|
12
|
+
protected render(): TemplateResult<1>;
|
21
13
|
/**
|
22
14
|
* Convert s to a percentage without a percent sign.
|
23
15
|
*
|
@@ -27,4 +19,5 @@ declare class Progress extends GlobalStyle {
|
|
27
19
|
parsePercent(s?: string | number): number;
|
28
20
|
}
|
29
21
|
export default Progress;
|
22
|
+
export { Progress };
|
30
23
|
//# sourceMappingURL=progress.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../src/components/progress.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../src/components/progress.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAGrD,OAAO,EAAiB,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAIrE;;;;GAIG;AACH,cAiDM,QAAS,SAAQ,WAAW;IAEhC,GAAG,SAAK;IAGR,GAAG,SAAK;IAGR,KAAK,EAAE,MAAM,CAAC;IAEd,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;IAYrC;;;;;OAKG;IACH,YAAY,CAAC,CAAC,GAAE,MAAM,GAAG,MAAY,GAAG,MAAM;CAM/C;AAED,eAAe,QAAQ,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import { __decorate } from "tslib";
|
2
|
-
import { godown } from "@godown/element
|
3
|
-
import { styles } from "@godown/element/decorators/styles.js";
|
2
|
+
import { attr, godown, isNil, styles } from "@godown/element";
|
4
3
|
import { css, html } from "lit";
|
5
4
|
import { property } from "lit/decorators.js";
|
6
5
|
import { cssGlobalVars, GlobalStyle } from "../core/global-style.js";
|
@@ -13,27 +12,17 @@ const protoName = "progress";
|
|
13
12
|
let Progress = class Progress extends GlobalStyle {
|
14
13
|
constructor() {
|
15
14
|
super(...arguments);
|
16
|
-
/**
|
17
|
-
* Maximum.
|
18
|
-
*/
|
19
15
|
this.max = 1;
|
20
|
-
/**
|
21
|
-
* Minimum.
|
22
|
-
*/
|
23
16
|
this.min = 0;
|
24
|
-
/**
|
25
|
-
* Input value.
|
26
|
-
*/
|
27
|
-
this.value = null;
|
28
17
|
}
|
29
18
|
render() {
|
30
19
|
let width = 20;
|
31
20
|
let className;
|
32
|
-
if (this.value
|
21
|
+
if (!isNil(this.value)) {
|
33
22
|
width = this.parsePercent(this.value);
|
34
23
|
className = "static";
|
35
24
|
}
|
36
|
-
return html `<div part="root" class="${className}">
|
25
|
+
return html `<div part="root" ${attr(this.observedRecord)} class="${className}">
|
37
26
|
<i part="value" style="width:${width}%;"></i>
|
38
27
|
</div>`;
|
39
28
|
}
|
@@ -57,52 +46,57 @@ __decorate([
|
|
57
46
|
property({ type: Number })
|
58
47
|
], Progress.prototype, "min", void 0);
|
59
48
|
__decorate([
|
60
|
-
property({ type: Number
|
49
|
+
property({ type: Number })
|
61
50
|
], Progress.prototype, "value", void 0);
|
62
51
|
Progress = __decorate([
|
63
52
|
godown(protoName),
|
64
53
|
styles(css `
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
}
|
54
|
+
:host {
|
55
|
+
width: 100%;
|
56
|
+
height: 0.5em;
|
57
|
+
border-radius: 0.25em;
|
58
|
+
background: var(${cssGlobalVars.passive});
|
59
|
+
color: var(${cssGlobalVars.active});
|
60
|
+
}
|
73
61
|
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
border-radius: inherit;
|
79
|
-
}
|
62
|
+
:host,
|
63
|
+
[part=root] {
|
64
|
+
display: block;
|
65
|
+
}
|
80
66
|
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
border-radius: inherit;
|
88
|
-
transition: all 0.3s;
|
89
|
-
animation: progress 1.8s ease-in-out infinite alternate;
|
90
|
-
background: currentColor;
|
91
|
-
}
|
67
|
+
[part=root] {
|
68
|
+
height: inherit;
|
69
|
+
z-index: 1;
|
70
|
+
position: relative;
|
71
|
+
border-radius: inherit;
|
72
|
+
}
|
92
73
|
|
93
|
-
|
94
|
-
|
74
|
+
[part=value] {
|
75
|
+
position: absolute;
|
76
|
+
z-index: 2;
|
77
|
+
top: 0;
|
95
78
|
left: 0;
|
79
|
+
height: 100%;
|
80
|
+
border-radius: inherit;
|
81
|
+
transition: all 0.3s;
|
82
|
+
animation: progress 1.8s ease-in-out infinite alternate;
|
83
|
+
background: currentColor;
|
96
84
|
}
|
97
|
-
|
98
|
-
|
85
|
+
|
86
|
+
@keyframes progress {
|
87
|
+
from {
|
88
|
+
left: 0;
|
89
|
+
}
|
90
|
+
to {
|
91
|
+
left: 80%;
|
92
|
+
}
|
99
93
|
}
|
100
|
-
}
|
101
94
|
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
`)
|
95
|
+
.static [part=value] {
|
96
|
+
animation: none;
|
97
|
+
}
|
98
|
+
`)
|
106
99
|
], Progress);
|
107
100
|
export default Progress;
|
101
|
+
export { Progress };
|
108
102
|
//# sourceMappingURL=progress.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"progress.js","sourceRoot":"","sources":["../../src/components/progress.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"progress.js","sourceRoot":"","sources":["../../src/components/progress.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,GAAG,EAAE,IAAI,EAAuB,MAAM,KAAK,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAErE,MAAM,SAAS,GAAG,UAAU,CAAC;AAE7B;;;;GAIG;AAkDH,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,WAAW;IAAlC;;QAEE,QAAG,GAAG,CAAC,CAAC;QAGR,QAAG,GAAG,CAAC,CAAC;IA6BV,CAAC;IAxBW,MAAM;QACd,IAAI,KAAK,GAAG,EAAE,CAAC;QACf,IAAI,SAAiB,CAAC;QACtB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YACvB,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACtC,SAAS,GAAG,QAAQ,CAAC;QACvB,CAAC;QACD,OAAO,IAAI,CAAA,oBAAoB,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,WAAW,SAAS;qCAC3C,KAAK;WAC/B,CAAC;IACV,CAAC;IAED;;;;;OAKG;IACH,YAAY,CAAC,IAAqB,GAAG;QACnC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YAC5B,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/B,CAAC;QACD,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;IAC/D,CAAC;CACF,CAAA;AAhCC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qCACnB;AAGR;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qCACnB;AAGR;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uCACb;AARV,QAAQ;IAjDb,MAAM,CAAC,SAAS,CAAC;IACjB,MAAM,CACL,GAAG,CAAA;;;;;wBAKmB,aAAa,CAAC,OAAO;mBAC1B,aAAa,CAAC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCpC,CACF;GACK,QAAQ,CAkCb;AAED,eAAe,QAAQ,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { type TemplateResult } from "lit";
|
1
2
|
import SuperInput from "../core/super-input.js";
|
2
3
|
/**
|
3
4
|
* {@linkcode Range} is similar to `<input type="range">`.
|
@@ -6,6 +7,11 @@ import SuperInput from "../core/super-input.js";
|
|
6
7
|
*
|
7
8
|
* Number has 1 handle, the array has the number of its elements and the minimum is 2.
|
8
9
|
*
|
10
|
+
* @fires input - Fires when the input value changes.
|
11
|
+
* @fires change - Fires when the input value changes.
|
12
|
+
* @fires range - Fires when the value changes.
|
13
|
+
* @fires focus - Fires when the handle is focused.
|
14
|
+
* @fires blur - Fires when the handle is blurred.
|
9
15
|
* @category input
|
10
16
|
*/
|
11
17
|
declare class Range extends SuperInput {
|
@@ -22,22 +28,25 @@ declare class Range extends SuperInput {
|
|
22
28
|
*/
|
23
29
|
step: number;
|
24
30
|
/**
|
25
|
-
* Display vertically
|
31
|
+
* Display vertically.
|
26
32
|
*/
|
27
33
|
vertical: boolean;
|
28
34
|
/**
|
29
|
-
*
|
35
|
+
* Value, or each of values, will render a handle.
|
36
|
+
*
|
37
|
+
* Accepts number or array of numbers.
|
30
38
|
*/
|
31
39
|
value: number | number[];
|
32
40
|
/**
|
33
|
-
* The default of `this.value`.
|
41
|
+
* The default of `{@linkcode this.value}`.
|
34
42
|
*/
|
35
43
|
default: typeof this.value;
|
36
|
-
_root: HTMLElement;
|
37
|
-
_handles: NodeListOf<HTMLElement>;
|
44
|
+
protected _root: HTMLElement;
|
45
|
+
protected _handles: NodeListOf<HTMLElement>;
|
38
46
|
lastFocus?: number;
|
47
|
+
protected _focusStack: number[];
|
39
48
|
/**
|
40
|
-
* Returns true when the second number is greater than the first number
|
49
|
+
* Returns true when the second number is greater than the first number.
|
41
50
|
*/
|
42
51
|
get reverse(): boolean;
|
43
52
|
/**
|
@@ -54,16 +63,14 @@ declare class Range extends SuperInput {
|
|
54
63
|
* @returns Array with length of len.
|
55
64
|
*/
|
56
65
|
padValue(len: number, value?: number): number[];
|
57
|
-
protected render():
|
58
|
-
protected renderHandle(index: number):
|
66
|
+
protected render(): TemplateResult<1>;
|
67
|
+
protected renderHandle(index: number): TemplateResult<1>;
|
59
68
|
private _keydownEvent;
|
60
69
|
focusHandle(index: number): void;
|
61
70
|
blurHandle(): void;
|
62
71
|
protected createKeydownEvent(index: number): (e: KeyboardEvent) => void;
|
63
|
-
createMouseDown(index:
|
64
|
-
|
65
|
-
createSetValue(index?: number): (numberOrModifier: number | ((value: number) => number)) => void;
|
66
|
-
setEnd(value: number): void;
|
72
|
+
createMouseDown(index: number): (e: MouseEvent) => void;
|
73
|
+
createSetValue(index: number): (numberOrModifier: number | ((value: number) => number)) => void;
|
67
74
|
/**
|
68
75
|
* Compute value from event.
|
69
76
|
*/
|
@@ -77,9 +84,9 @@ declare class Range extends SuperInput {
|
|
77
84
|
protected createMousemoveListener(callback: (arg0: number) => void): (e: MouseEvent) => void;
|
78
85
|
protected _connectedInit(): void;
|
79
86
|
reset(): void;
|
80
|
-
|
81
|
-
|
82
|
-
toSorted(): typeof this.value;
|
87
|
+
sort(): number | number[];
|
88
|
+
toSorted(): number | number[];
|
83
89
|
}
|
84
90
|
export default Range;
|
91
|
+
export { Range };
|
85
92
|
//# sourceMappingURL=range.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"range.d.ts","sourceRoot":"","sources":["../../src/components/range.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"range.d.ts","sourceRoot":"","sources":["../../src/components/range.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAIrD,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAKhD;;;;;;;;;;;;;GAaG;AACH,cA8FM,KAAM,SAAQ,UAAU;IAC5B;;OAEG;IAEH,GAAG,SAAK;IAER;;OAEG;IAEH,GAAG,SAAO;IAEV;;OAEG;IAEH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IAEH,QAAQ,UAAS;IAEjB;;;;OAIG;IAEH,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAEzB;;OAEG;IAEH,OAAO,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC;IAG3B,SAAS,CAAC,KAAK,EAAE,WAAW,CAAC;IAG7B,SAAS,CAAC,QAAQ,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC;IAG5C,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,CAAM;IAErC;;OAEG;IACH,IAAI,OAAO,IAAI,OAAO,CAErB;IAED;;OAEG;IACH,IAAI,KAAK,IAAI,OAAO,CAEnB;IAED;;OAEG;IACH,IAAI,UAAU,IAAI,MAAM,EAAE,CAEzB;IAED;;;;OAIG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,SAAI,GAAG,MAAM,EAAE;IAS1C,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;IA2BrC,SAAS,CAAC,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc,CAAC,CAAC,CAAC;IAiBxD,OAAO,CAAC,aAAa,CAAqC;IAE1D,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAehC,UAAU,IAAI,IAAI;IAMlB,SAAS,CAAC,kBAAkB,CAAC,KAAK,EAAE,MAAM,OAI7B,aAAa,KAAG,IAAI;IAWjC,eAAe,CAAC,KAAK,EAAE,MAAM,OAChB,UAAU,KAAG,IAAI;IAM9B,cAAc,CAAC,KAAK,EAAE,MAAM,sBACA,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC,KAAG,IAAI;IAcvE;;OAEG;IACH,SAAS,CAAC,aAAa,CAAC,CAAC,EAAE,UAAU,GAAG,MAAM;IAO9C;;OAEG;IACH,SAAS,CAAC,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAM/C,SAAS,CAAC,oBAAoB,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI;IAgBnD,SAAS,CAAC,uBAAuB,CAAC,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,OAC9D,UAAU,KAAG,IAAI;IAa9B,SAAS,CAAC,uBAAuB,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,OACrD,UAAU,KAAG,IAAI;IAS9B,SAAS,CAAC,cAAc,IAAI,IAAI;IAahC,KAAK,IAAI,IAAI;IAIb,IAAI,IAAI,MAAM,GAAG,MAAM,EAAE;IAIzB,QAAQ,IAAI,MAAM,GAAG,MAAM,EAAE;CAM9B;AAED,eAAe,KAAK,CAAC;AACrB,OAAO,EAAE,KAAK,EAAE,CAAC"}
|