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/components/select.js
CHANGED
@@ -1,212 +1,2 @@
|
|
1
|
-
import {
|
2
|
-
import { godown } from '@godown/element/decorators/godown.js';
|
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';
|
6
|
-
import svgCaretDown from '@godown/f7-icon/icons/chevron-down.js';
|
7
|
-
import { html, nothing, css } from 'lit';
|
8
|
-
import { property, state } from 'lit/decorators.js';
|
9
|
-
import { ifDefined } from 'lit/directives/if-defined.js';
|
10
|
-
import Input from './input.js';
|
11
|
-
|
12
|
-
function contain(a, b) {
|
13
|
-
return a && b && a.toLowerCase().includes(b.toLowerCase());
|
14
|
-
}
|
15
|
-
function betweenAt(i, s, c) {
|
16
|
-
const start = s.slice(0, i).lastIndexOf(c) + 1 || 0;
|
17
|
-
const end = s.indexOf(c, i) || s.length;
|
18
|
-
return s.slice(start, end);
|
19
|
-
}
|
20
|
-
function updateChecked(element, operation) {
|
21
|
-
if (element) {
|
22
|
-
const name = "checked";
|
23
|
-
if (operation) {
|
24
|
-
element.setAttribute(name, "");
|
25
|
-
}
|
26
|
-
else {
|
27
|
-
element.removeAttribute(name);
|
28
|
-
}
|
29
|
-
}
|
30
|
-
}
|
31
|
-
const protoName = "select";
|
32
|
-
/**
|
33
|
-
* {@linkcode Select} is similar to `<select>`.
|
34
|
-
*
|
35
|
-
* Elements with the value attribute/property can be used as options.
|
36
|
-
*
|
37
|
-
* The checked attribute will be added to the selected element.
|
38
|
-
*
|
39
|
-
* Multi-selected state looks the same as single-selected.
|
40
|
-
*
|
41
|
-
* Input will filter the element.
|
42
|
-
*
|
43
|
-
* @slot - Options.
|
44
|
-
* @category input
|
45
|
-
*/
|
46
|
-
let Select = class Select extends Input {
|
47
|
-
constructor() {
|
48
|
-
super(...arguments);
|
49
|
-
this.autoDirection = "bottom";
|
50
|
-
this._store = [];
|
51
|
-
}
|
52
|
-
render() {
|
53
|
-
return html `<div part="root" class="input-field">${[
|
54
|
-
this._renderPrefix(),
|
55
|
-
html `<input part="input" dir="${ifDefined(this.dir)}" id="${this.makeId}" .value="${this.text}" type="${this.type}" placeholder="${this.placeholder || nothing}" ?autofocus="${this.autofocus}" autocapitalize="${this.autocapitalize || nothing}" autocomplete="${this.autocomplete || nothing}" ?disabled="${this.disabled}" @focus="${this._handleFocus}" @input="${this._handleInput}">`,
|
56
|
-
html `<label for="${this.makeId}" part="suffix"><i part="space"></i><i part="icon">${svgCaretDown()}</i><i part="space"></i></label>`,
|
57
|
-
html `<label for="${this.makeId}" part="content" style="visibility:${this.visible ? "visible" : "hidden"}" direction="${this.direction || this.autoDirection}">${htmlSlot()}</label>`,
|
58
|
-
]}</div>`;
|
59
|
-
}
|
60
|
-
_handleFocus() {
|
61
|
-
if (!this.direction) {
|
62
|
-
const { top, bottom } = this.getBoundingClientRect();
|
63
|
-
if (window.innerHeight - bottom < this._content.clientHeight && top > this._content.clientHeight) {
|
64
|
-
this.autoDirection = "top";
|
65
|
-
}
|
66
|
-
else {
|
67
|
-
this.autoDirection = "bottom";
|
68
|
-
}
|
69
|
-
}
|
70
|
-
this.visible = true;
|
71
|
-
}
|
72
|
-
firstUpdated() {
|
73
|
-
this.events.add(this._content, "click", (e) => {
|
74
|
-
e.preventDefault();
|
75
|
-
e.stopPropagation();
|
76
|
-
const { target } = e;
|
77
|
-
const value = this.optionValue(target);
|
78
|
-
if (value) {
|
79
|
-
const operation = this.select(value, target.textContent);
|
80
|
-
if (!this.multiple) {
|
81
|
-
updateChecked(this.lastChecked, 0);
|
82
|
-
}
|
83
|
-
updateChecked(target, operation);
|
84
|
-
this.lastChecked = target;
|
85
|
-
}
|
86
|
-
this._input.focus();
|
87
|
-
});
|
88
|
-
this.events.add(document, "click", (e) => {
|
89
|
-
// e.preventDefault();
|
90
|
-
e.stopPropagation();
|
91
|
-
const composed1 = e.composedPath()[0];
|
92
|
-
if (composed1 && !this.shadowRoot.contains(composed1)) {
|
93
|
-
this.blur();
|
94
|
-
}
|
95
|
-
});
|
96
|
-
}
|
97
|
-
_connectedInit() {
|
98
|
-
if (!this.value) {
|
99
|
-
const checked = [...this.querySelectorAll("[checked]")];
|
100
|
-
const list = this.multiple
|
101
|
-
? checked
|
102
|
-
: checked.length
|
103
|
-
? [this.lastChecked = checked[0]]
|
104
|
-
: [];
|
105
|
-
list.forEach((element) => {
|
106
|
-
const operation = this.select(this.optionValue(element), element.textContent);
|
107
|
-
updateChecked(element, operation);
|
108
|
-
});
|
109
|
-
this.default = this.value;
|
110
|
-
this.defaultText = this.text;
|
111
|
-
this.defaultChecked = checked;
|
112
|
-
}
|
113
|
-
if (!this.text) {
|
114
|
-
this.text = "";
|
115
|
-
}
|
116
|
-
}
|
117
|
-
reset() {
|
118
|
-
this.value = this.default;
|
119
|
-
this.text = this.defaultText;
|
120
|
-
this.querySelectorAll("[checked]").forEach(element => updateChecked(element, 0));
|
121
|
-
this.defaultChecked.forEach(element => updateChecked(element, 1));
|
122
|
-
}
|
123
|
-
select(value, text) {
|
124
|
-
text ||= value;
|
125
|
-
let operation = 0;
|
126
|
-
if (this.multiple) {
|
127
|
-
const i = this._store.findIndex(s => s.value === value);
|
128
|
-
if (i > -1) {
|
129
|
-
this._store.splice(i, 1);
|
130
|
-
}
|
131
|
-
else {
|
132
|
-
this._store.push({ value, text });
|
133
|
-
operation = 1;
|
134
|
-
}
|
135
|
-
this.value = this._store.map(s => s.value);
|
136
|
-
this.text = this._store.map(s => s.text).join(", ");
|
137
|
-
}
|
138
|
-
else {
|
139
|
-
if (this.value === value) {
|
140
|
-
this.value = "";
|
141
|
-
this.text = "";
|
142
|
-
}
|
143
|
-
else {
|
144
|
-
this.value = value;
|
145
|
-
this.text = text;
|
146
|
-
operation = 1;
|
147
|
-
}
|
148
|
-
}
|
149
|
-
this.dispatchEvent(new CustomEvent("change", { detail: this.namevalue() }));
|
150
|
-
this.filter();
|
151
|
-
return operation;
|
152
|
-
}
|
153
|
-
filter(query) {
|
154
|
-
query = query?.trim();
|
155
|
-
[...this.children].forEach((element) => {
|
156
|
-
this.filterCallback(element, !query
|
157
|
-
|| contain(this.optionValue(element), query)
|
158
|
-
|| contain(element.textContent, query), query);
|
159
|
-
});
|
160
|
-
}
|
161
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
162
|
-
filterCallback(element, match, query) {
|
163
|
-
element.style.display = match ? "" : "none";
|
164
|
-
}
|
165
|
-
_handleInput(e) {
|
166
|
-
e.stopPropagation();
|
167
|
-
if (this.compositing) {
|
168
|
-
return;
|
169
|
-
}
|
170
|
-
const s = this._input.value;
|
171
|
-
this.filter(this.multiple ? betweenAt(this._input.selectionStart, s, ",") : s);
|
172
|
-
this.dispatchEvent(new CustomEvent("input", { detail: this.namevalue() }));
|
173
|
-
}
|
174
|
-
focus(options) {
|
175
|
-
this._input.focus(options);
|
176
|
-
this.visible = true;
|
177
|
-
}
|
178
|
-
blur() {
|
179
|
-
this._input.blur();
|
180
|
-
this.visible = false;
|
181
|
-
super.blur();
|
182
|
-
}
|
183
|
-
optionValue(option) {
|
184
|
-
return option.value || option.getAttribute("value") || "";
|
185
|
-
}
|
186
|
-
};
|
187
|
-
__decorate([
|
188
|
-
property()
|
189
|
-
], Select.prototype, "text", void 0);
|
190
|
-
__decorate([
|
191
|
-
part("content")
|
192
|
-
], Select.prototype, "_content", void 0);
|
193
|
-
__decorate([
|
194
|
-
property()
|
195
|
-
], Select.prototype, "direction", void 0);
|
196
|
-
__decorate([
|
197
|
-
property({ type: Boolean })
|
198
|
-
], Select.prototype, "multiple", void 0);
|
199
|
-
__decorate([
|
200
|
-
property({ type: Boolean })
|
201
|
-
], Select.prototype, "visible", void 0);
|
202
|
-
__decorate([
|
203
|
-
state()
|
204
|
-
], Select.prototype, "autoDirection", void 0);
|
205
|
-
Select = __decorate([
|
206
|
-
godown(protoName),
|
207
|
-
styles(css `[part=input]{text-overflow:ellipsis}[part=content]{position:absolute;width:100%}[direction=bottom]{top:100%}[direction=top]{bottom:100%}`)
|
208
|
-
], Select);
|
209
|
-
var Select$1 = Select;
|
210
|
-
|
211
|
-
export { Select$1 as default };
|
1
|
+
import{__decorate as t}from"tslib";import{part as e,godown as i,styles as o,attr as s,htmlSlot as n}from"@godown/element";import l from"@godown/f7-icon/icons/chevron-down.js";import{css as h,html as a,nothing as r}from"lit";import{property as c,state as u}from"lit/decorators.js";import p from"./input.js";function d(t,e){return t&&e&&t.toLowerCase().includes(e.toLowerCase())}function f(t,e){if(t){const i="checked";e?t.setAttribute(i,""):t.removeAttribute(i)}}let v=class Select extends p{constructor(){super(...arguments),this.multiple=!1,this.visible=!1,this.autoDirection="bottom",this._store=[]}render(){return a`<div part="root" ${s({...this.observedRecord,direction:this.direction||this.autoDirection})} class="input-field">${[this._renderPrefix(),a`<input part="input" type="${this.type}" .value="${this.text}" ?autofocus="${this.autofocus}" ?disabled="${this.disabled}" autocapitalize="${this.autocapitalize||r}" autocomplete="${this.autocomplete||r}" placeholder="${this.placeholder||r}" id="${this.makeId}" @focus="${this._handleFocus}" @input="${this._handleInput}">`,a`<label for="${this.makeId}" part="suffix"><i part="icon">${l()}</i></label>`,a`<label for="${this.makeId}" part="content">${n()}</label>`]}</div>`}_handleFocus(){if(!this.direction){const{top:t,bottom:e}=this.getBoundingClientRect();window.innerHeight-e<this._content.clientHeight&&t>this._content.clientHeight?this.autoDirection="top":this.autoDirection="bottom"}this.visible=!0}firstUpdated(){this.events.add(this._content,"click",(t=>{t.preventDefault(),t.stopPropagation();const{target:e}=t,i=this.optionValue(e);if(i){const t=this.select(i,e.textContent);this.multiple||f(this.lastChecked,0),f(e,t),this.lastChecked=e}this._input.focus()})),this.events.add(document,"click",(t=>{t.stopPropagation();const e=t.composedPath()[0];e&&!this.shadowRoot.contains(e)&&this.blur()}))}_connectedInit(){if(!this.value){const t=[...this.querySelectorAll("[checked]")];(this.multiple?t:t.length?[this.lastChecked=t[0]]:[]).forEach((t=>{f(t,this.select(this.optionValue(t),t.textContent))})),this.default=this.value,this.defaultText=this.text,this.defaultChecked=t}this.text||(this.text="")}reset(){this.value=this.default,this.text=this.defaultText,this.querySelectorAll("[checked]").forEach((t=>f(t,0))),this.defaultChecked.forEach((t=>f(t,1)))}select(t,e){e||=t;let i=0;if(this.multiple){const o=this._store.findIndex((e=>e.value===t));o>-1?this._store.splice(o,1):(this._store.push({value:t,text:e}),i=1),this.value=this._store.map((t=>t.value)),this.text=this._store.map((t=>t.text)).join(", ")}else this.value===t?(this.value="",this.text=""):(this.value=t,this.text=e,i=1);return this.dispatchEvent(new CustomEvent("select",{detail:this.value,composed:!0})),this.filter(),i}filter(t){t=t?.trim(),[...this.children].forEach((e=>{this.filterCallback(e,!t||d(this.optionValue(e),t)||d(e.textContent,t),t)}))}filterCallback(t,e,i){t.style.display=e?"":"none"}_handleInput(t){if(t.stopPropagation(),this.compositing)return;const e=this._input.value;this.filter(this.multiple?function(t,e,i){const o=e.slice(0,t).lastIndexOf(i)+1||0,s=e.indexOf(i,t)||e.length;return e.slice(o,s)}(this._input.selectionStart,e,","):e),this.dispatchEvent(new CustomEvent("input",{detail:this.value,composed:!0,bubbles:!0})),this.dispatchEvent(new CustomEvent("change",{detail:this.value,composed:!0}))}focus(t){this._input.focus(t),this.visible=!0}blur(){this._input.blur(),this.visible=!1,super.blur()}optionValue(t){return t.value||t.getAttribute("value")||""}};t([c()],v.prototype,"text",void 0),t([e("content")],v.prototype,"_content",void 0),t([c()],v.prototype,"direction",void 0),t([c({type:Boolean})],v.prototype,"multiple",void 0),t([c({type:Boolean})],v.prototype,"visible",void 0),t([u()],v.prototype,"autoDirection",void 0),v=t([i("select"),o(h`[part=input]{text-overflow:ellipsis}[part=content]{position:absolute;visibility:hidden;width:100%}[direction=bottom] [part=content]{top:100%}[direction=top] [part=content]{bottom:100%}[visible] [part=content]{visibility:visible}`)],v);var m=v;export{v as Select,m as default};
|
212
2
|
//# sourceMappingURL=select.js.map
|
package/components/select.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"select.js","sources":["../src/components/select.ts"],"sourcesContent":null,"names":[
|
1
|
+
{"version":3,"file":"select.js","sources":["../src/components/select.ts"],"sourcesContent":null,"names":["contain","a","b","toLowerCase","includes","updateChecked","element","operation","name","setAttribute","removeAttribute","Select","Input","constructor","this","multiple","visible","autoDirection","_store","render","html","attr","observedRecord","direction","_renderPrefix","type","text","autofocus","disabled","autocapitalize","nothing","autocomplete","placeholder","makeId","_handleFocus","_handleInput","svgCaretDown","htmlSlot","top","bottom","getBoundingClientRect","window","innerHeight","_content","clientHeight","firstUpdated","events","add","e","preventDefault","stopPropagation","target","value","optionValue","select","textContent","lastChecked","_input","focus","document","composed1","composedPath","shadowRoot","contains","blur","_connectedInit","checked","querySelectorAll","length","forEach","default","defaultText","defaultChecked","reset","i","findIndex","s","splice","push","map","join","dispatchEvent","CustomEvent","detail","composed","filter","query","trim","children","filterCallback","match","style","display","compositing","c","start","slice","lastIndexOf","end","indexOf","betweenAt","selectionStart","bubbles","options","super","option","getAttribute","__decorate","property","prototype","undefined","part","Boolean","state","godown","styles","css","Select$1"],"mappings":"kTAOA,SAASA,EAAQC,EAAWC,GAC1B,OAAOD,GAAKC,GAAKD,EAAEE,cAAcC,SAASF,EAAEC,cAC9C,CAQA,SAASE,EAAcC,EAA6BC,GAClD,GAAID,EAAS,CACX,MAAME,EAAO,UACTD,EACFD,EAAQG,aAAaD,EAAM,IAE3BF,EAAQI,gBAAgBF,GAG9B,CAuBA,IAAMG,EAAN,MAAMA,eAAeC,EAArB,WAAAC,uBAiBEC,KAAQC,UAAG,EAGXD,KAAOE,SAAG,EAGAF,KAAaG,cAAqB,SAKpCH,KAAMI,OAAsC,GAE1C,MAAAC,GACR,OAAOC,CAAI,oBAGLC,EAAK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AC,GAGLH,EAAA,CADTM,KACmDtG,EAAAkG,UAAA,qBAAAC,GAvBhDnG,EAAMgG,EAAA,CAFXO,EAnBiB,UAoBjBC,EAAOC,CAAG,yOACLzG,GAmNN,IAAA0G,EAAe1G"}
|
package/components/skeleton.d.ts
CHANGED
@@ -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,cAEM,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;CAMtC;AAED,eAAe,QAAQ,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
package/components/skeleton.js
CHANGED
@@ -1,55 +1,2 @@
|
|
1
|
-
import {
|
2
|
-
import { godown } from '@godown/element/decorators/godown.js';
|
3
|
-
import { styles } from '@godown/element/decorators/styles.js';
|
4
|
-
import { htmlSlot } from '@godown/element/directives/html-slot.js';
|
5
|
-
import iconPhoto from '@godown/f7-icon/icons/photo.js';
|
6
|
-
import { html, css } from 'lit';
|
7
|
-
import { property, state } from 'lit/decorators.js';
|
8
|
-
import { scopePrefix, GlobalStyle, cssGlobalVars } from '../core/global-style.js';
|
9
|
-
|
10
|
-
const protoName = "skeleton";
|
11
|
-
const cssScope = scopePrefix(protoName);
|
12
|
-
/**
|
13
|
-
* {@linkcode Skeleton} renders a skeleton screen.
|
14
|
-
*
|
15
|
-
* @slot loading - The content if loading is true.
|
16
|
-
* @slot - The content if loading is false.
|
17
|
-
* @category feedback
|
18
|
-
*/
|
19
|
-
let Skeleton = class Skeleton extends GlobalStyle {
|
20
|
-
constructor() {
|
21
|
-
super(...arguments);
|
22
|
-
/**
|
23
|
-
* Animation type.
|
24
|
-
* opacity animation only effect on slotted element and image icon.
|
25
|
-
*/
|
26
|
-
this.animation = "position";
|
27
|
-
/**
|
28
|
-
* If false, render slot only.
|
29
|
-
*/
|
30
|
-
this.loading = true;
|
31
|
-
}
|
32
|
-
render() {
|
33
|
-
if (!this.loading) {
|
34
|
-
return htmlSlot();
|
35
|
-
}
|
36
|
-
return html `<div part="root" class="${this.animation}">${this.type === "image" ? iconPhoto() : ""} ${htmlSlot("loading")}</div>`;
|
37
|
-
}
|
38
|
-
};
|
39
|
-
__decorate([
|
40
|
-
property()
|
41
|
-
], Skeleton.prototype, "type", void 0);
|
42
|
-
__decorate([
|
43
|
-
property()
|
44
|
-
], Skeleton.prototype, "animation", void 0);
|
45
|
-
__decorate([
|
46
|
-
state()
|
47
|
-
], Skeleton.prototype, "loading", void 0);
|
48
|
-
Skeleton = __decorate([
|
49
|
-
godown(protoName),
|
50
|
-
styles(css `:host{${cssScope}--from:var(${cssGlobalVars._colors.darkgray[9]});${cssScope}--to:var(${cssGlobalVars._colors.darkgray[7]});${cssScope}--deg:95deg;${cssScope}--duration:1.5s;${cssScope}--icon-size:5em;${cssScope}--icon-margin:.25em;color:var(${cssGlobalVars._colors.darkgray[5]});background:var(${cssScope}--from);min-height:1.5em;width:100%;flex-shrink:0;display:block;overflow:hidden}[part=root]{height:100%;min-height:inherit;text-align:center;animation:var(${cssScope}--duration) ease-in-out 0s infinite none running}svg{--size:var(${cssScope}--icon-size);font-size:var(--size);margin:calc(var(--size) * .05)}.position{background-image:linear-gradient(var(${cssScope}--deg),var(${cssScope}--from) 36%,var(${cssScope}--to) 50%,var(${cssScope}--from) 64%);background-color:transparent;background-size:200% 100%;animation-name:po}@keyframes po{from{background-position:150% center}to{background-position:-50% center}}.opacity{animation-name:op;animation-direction:alternate}@keyframes op{50%{opacity:.25}to{opacity:1}}`)
|
51
|
-
], Skeleton);
|
52
|
-
var Skeleton$1 = Skeleton;
|
53
|
-
|
54
|
-
export { Skeleton$1 as default };
|
1
|
+
import{__decorate as o}from"tslib";import{godown as i,styles as r,htmlSlot as t,attr as a}from"@godown/element";import n from"@godown/f7-icon/icons/photo.js";import{css as e,html as s}from"lit";import{property as m,state as d}from"lit/decorators.js";import{scopePrefix as p,cssGlobalVars as c,GlobalStyle as g}from"../core/global-style.js";const l="skeleton",v=p(l);let $=class Skeleton extends g{constructor(){super(...arguments),this.animation="position",this.loading=!0}render(){return this.loading?s`<div part="root" ${a(this.observedRecord)}>${"image"===this.type?n():""} ${t("loading")}</div>`:t()}};o([m()],$.prototype,"type",void 0),o([m()],$.prototype,"animation",void 0),o([d()],$.prototype,"loading",void 0),$=o([i(l),r(e`:host{${v}--from:var(${c._colors.darkgray[9]});${v}--to:var(${c._colors.darkgray[7]});${v}--deg:95deg;${v}--duration:1.5s;${v}--icon-size:5em;${v}--icon-margin:.25em;background:var(${v}--from);color:var(${c._colors.darkgray[5]});display:block;flex-shrink:0;min-height:1.5em;overflow:hidden;width:100%}[part=root]{animation:var(${v}--duration) ease-in-out 0s infinite none running;height:100%;min-height:inherit;text-align:center}svg{--size:var(${v}--icon-size);font-size:var(--size);margin:calc(var(--size)*.05)}[animation=position]{animation-name:po;background-color:transparent;background-image:linear-gradient(var(${v}--deg),var(${v}--from) 36%,var(${v}--to) 50%,var(${v}--from) 64%);background-size:200% 100%}@keyframes po{0%{background-position:150%}to{background-position:-50%}}[animation=opacity]{animation-direction:alternate;animation-name:op}@keyframes op{50%{opacity:.25}to{opacity:1}}`)],$);var f=$;export{$ as Skeleton,f as default};
|
55
2
|
//# sourceMappingURL=skeleton.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"skeleton.js","sources":["../src/components/skeleton.ts"],"sourcesContent":null,"names":[
|
1
|
+
{"version":3,"file":"skeleton.js","sources":["../src/components/skeleton.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","Skeleton","GlobalStyle","constructor","this","animation","loading","render","html","attr","observedRecord","type","iconPhoto","htmlSlot","__decorate","property","prototype","undefined","state","godown","styles","css","cssGlobalVars","_colors","darkgray","Skeleton$1"],"mappings":"oVAOA,MAAMA,EAAY,WACZC,EAAWC,EAAYF,GAW7B,IAAMG,EAAN,MAAMA,iBAAiBC,EAAvB,WAAAC,uBAYEC,KAASC,UAA2B,WAMpCD,KAAOE,SAAG,EAEA,MAAAC,GACR,OAAKH,KAAKE,QAGHE,CAAI,oBAGLC,EAAKL,KAAKM,mBAEI,UAAdN,KAAKO,KAAmBC,IAAc,MAAMC,EAAS,mBAPlDA,MAjBXC,EAAA,CADCC,KACqBd,EAAAe,UAAA,YAAAC,GAOtBH,EAAA,CADCC,KAC6Cd,EAAAe,UAAA,iBAAAC,GAM9CH,EAAA,CADCI,KACajB,EAAAe,UAAA,eAAAC,GAlBVhB,EAAQa,EAAA,CAFbK,EAAOrB,GACPsB,EAAOC,CAAG,SAAStB,eAAsBuB,EAAcC,QAAQC,SAAS,OAAOzB,aAAoBuB,EAAcC,QAAQC,SAAS,OAAOzB,gBAAuBA,oBAA2BA,oBAA2BA,uCAA8CA,sBAA6BuB,EAAcC,QAAQC,SAAS,yGAAyGzB,qHAA4HA,6KAAoLA,eAAsBA,oBAA2BA,kBAAyBA,oOAC9xBE,GAmCN,IAAAwB,EAAexB"}
|
package/components/split.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
import { type HandlerEvent } from "@godown/element
|
1
|
+
import { type HandlerEvent } from "@godown/element";
|
2
|
+
import { type TemplateResult } from "lit";
|
2
3
|
import SuperInput from "../core/super-input.js";
|
3
4
|
/**
|
4
5
|
* {@linkcode Split} renders multiple input boxes.
|
@@ -7,6 +8,10 @@ import SuperInput from "../core/super-input.js";
|
|
7
8
|
*
|
8
9
|
* Delete: will move the focus box forward until the first and no inputs for each.
|
9
10
|
*
|
11
|
+
* @fires input - Fires when the input value changes.
|
12
|
+
* @fires change - Fires when the input value changes.
|
13
|
+
* @fires focus - Fires when the input is focused.
|
14
|
+
* @fires blur - Fires when the input is blurred.
|
10
15
|
* @category input
|
11
16
|
*/
|
12
17
|
declare class Split extends SuperInput {
|
@@ -20,7 +25,7 @@ declare class Split extends SuperInput {
|
|
20
25
|
index: number;
|
21
26
|
current: number;
|
22
27
|
currentValue: (string | void)[];
|
23
|
-
protected render():
|
28
|
+
protected render(): TemplateResult<1>;
|
24
29
|
connectedCallback(): void;
|
25
30
|
protected _handleInput(e: HandlerEvent<HTMLInputElement, InputEvent>): void;
|
26
31
|
/**
|
@@ -46,4 +51,5 @@ declare class Split extends SuperInput {
|
|
46
51
|
reset(): void;
|
47
52
|
}
|
48
53
|
export default Split;
|
54
|
+
export { Split };
|
49
55
|
//# sourceMappingURL=split.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"split.d.ts","sourceRoot":"","sources":["../src/components/split.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"split.d.ts","sourceRoot":"","sources":["../src/components/split.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAmC,MAAM,iBAAiB,CAAC;AACrF,OAAO,EAAE,KAAK,cAAc,EAAsB,MAAM,KAAK,CAAC;AAI9D,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAahD;;;;;;;;;;;;GAYG;AACH,cAEM,KAAM,SAAQ,UAAU;IAC5B;;OAEG;IAEH,GAAG,SAAK;IAER;;OAEG;IAEH,KAAK,SAAM;IAGX,OAAO,SAAM;IAGb,YAAY,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAM;IAErC,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;IAUrC,iBAAiB,IAAI,IAAI;IAKzB,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,YAAY,CAAC,gBAAgB,EAAE,UAAU,CAAC,GAAG,IAAI;IAY3E;;;;;;;;;;;;;;;OAeG;IACH,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IA2C9C,KAAK,IAAI,IAAI;IAKb,OAAO,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;IAMxB,IAAI,IAAI,IAAI;IAOZ,KAAK,IAAI,IAAI;CAQd;AAED,eAAe,KAAK,CAAC;AACrB,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
package/components/split.js
CHANGED
@@ -1,154 +1,2 @@
|
|
1
|
-
import {
|
2
|
-
import { godown } from '@godown/element/decorators/godown.js';
|
3
|
-
import { styles } from '@godown/element/decorators/styles.js';
|
4
|
-
import { classList } from '@godown/element/directives/class-list.js';
|
5
|
-
import { html, nothing, css } from 'lit';
|
6
|
-
import { property, state } from 'lit/decorators.js';
|
7
|
-
import { scopePrefix, cssGlobalVars } from '../core/global-style.js';
|
8
|
-
import SuperInput from '../core/super-input.js';
|
9
|
-
|
10
|
-
const protoName = "split";
|
11
|
-
const cssScope = scopePrefix(protoName);
|
12
|
-
const loop = (len, fn) => {
|
13
|
-
const result = new Array(len);
|
14
|
-
for (let index = 0; index < len; index++) {
|
15
|
-
result[index] = fn(index);
|
16
|
-
}
|
17
|
-
return result;
|
18
|
-
};
|
19
|
-
/**
|
20
|
-
* {@linkcode Split} renders multiple input boxes.
|
21
|
-
*
|
22
|
-
* Input: will move the focus box backward until the complete input from start to end.
|
23
|
-
*
|
24
|
-
* Delete: will move the focus box forward until the first and no inputs for each.
|
25
|
-
*
|
26
|
-
* @category input
|
27
|
-
*/
|
28
|
-
let Split = class Split extends SuperInput {
|
29
|
-
constructor() {
|
30
|
-
super(...arguments);
|
31
|
-
/**
|
32
|
-
* The number of input boxes.
|
33
|
-
*/
|
34
|
-
this.len = 6;
|
35
|
-
/**
|
36
|
-
* Focus index.
|
37
|
-
*/
|
38
|
-
this.index = -1;
|
39
|
-
this.current = -1;
|
40
|
-
this.currentValue = [];
|
41
|
-
}
|
42
|
-
render() {
|
43
|
-
return html `<div part="root">${loop(this.len, (index) => html `<span part="input-box" @click="${this.disabled ? null : () => this.focusAt(index)}" class="${classList({ focus: this.current === index }) || nothing}">${this.currentValue[index]}</span>`)} <input part="input" id="${this.makeId}" @blur="${this.blur}" @input="${this._handleInput}" .value="${
|
44
|
-
/* Ensure that input always has a value of length this.len */
|
45
|
-
this.value.padStart(this.len, " ")}"></div>`;
|
46
|
-
}
|
47
|
-
connectedCallback() {
|
48
|
-
super.connectedCallback();
|
49
|
-
this.reset();
|
50
|
-
}
|
51
|
-
_handleInput(e) {
|
52
|
-
e.stopPropagation();
|
53
|
-
if (this.compositing) {
|
54
|
-
return;
|
55
|
-
}
|
56
|
-
this.fillInput(e.data);
|
57
|
-
this.value = this.currentValue.join("");
|
58
|
-
this.dispatchEvent(new CustomEvent("input", { detail: this.value, bubbles: true, composed: true }));
|
59
|
-
this.dispatchEvent(new CustomEvent("change", { detail: this.value, composed: true }));
|
60
|
-
}
|
61
|
-
/**
|
62
|
-
* Fill input with data.
|
63
|
-
*
|
64
|
-
* If data is null
|
65
|
-
* - If current value is null, move to before.
|
66
|
-
* - If current value is not null, delete it.
|
67
|
-
*
|
68
|
-
* If data is not null
|
69
|
-
* - If current value is null, input data.
|
70
|
-
* - If current value is not null, input data and move to after.
|
71
|
-
*
|
72
|
-
* If data is multiple characters,
|
73
|
-
* Fill input with data[0] and call fillInput with data.slice(1).
|
74
|
-
*
|
75
|
-
* @param data Input event data.
|
76
|
-
*/
|
77
|
-
fillInput(data) {
|
78
|
-
if (data === null) {
|
79
|
-
// delete
|
80
|
-
if (this.currentValue[this.current] !== null) {
|
81
|
-
// delete exist value
|
82
|
-
this.currentValue[this.current] = null;
|
83
|
-
}
|
84
|
-
else {
|
85
|
-
// go to before
|
86
|
-
this.currentValue[this.current - 1] = null;
|
87
|
-
const lastNotNull = this.currentValue.findLastIndex(a => a !== null);
|
88
|
-
this.current = this.current - 1 < 0 ? lastNotNull < 0 ? 0 : lastNotNull : this.current - 1;
|
89
|
-
}
|
90
|
-
return;
|
91
|
-
}
|
92
|
-
const multiple = data.length > 1;
|
93
|
-
// input
|
94
|
-
this.currentValue[this.current] = data[0];
|
95
|
-
if (this.current + 1 >= this.len) {
|
96
|
-
// index overflow
|
97
|
-
this.current = this.currentValue.indexOf(null);
|
98
|
-
if (this.current === -1) {
|
99
|
-
this.blur();
|
100
|
-
}
|
101
|
-
}
|
102
|
-
else {
|
103
|
-
// go to after
|
104
|
-
this.current += 1;
|
105
|
-
}
|
106
|
-
if (multiple) {
|
107
|
-
const after = data.slice(1);
|
108
|
-
if (after) {
|
109
|
-
this.fillInput(after);
|
110
|
-
}
|
111
|
-
}
|
112
|
-
}
|
113
|
-
focus() {
|
114
|
-
this.focusAt(this.current);
|
115
|
-
super.focus();
|
116
|
-
}
|
117
|
-
focusAt(i) {
|
118
|
-
this.current = i;
|
119
|
-
this._input.focus();
|
120
|
-
}
|
121
|
-
blur() {
|
122
|
-
this._input.blur();
|
123
|
-
this.current = -1;
|
124
|
-
super.blur();
|
125
|
-
}
|
126
|
-
reset() {
|
127
|
-
this.current = -1;
|
128
|
-
this.value = this.default;
|
129
|
-
this.currentValue = this.value.split("").concat(Array(this.len - this.value.length).fill(null));
|
130
|
-
if (this.index > -1) {
|
131
|
-
this.current = this.index;
|
132
|
-
}
|
133
|
-
}
|
134
|
-
};
|
135
|
-
__decorate([
|
136
|
-
property({ type: Number })
|
137
|
-
], Split.prototype, "len", void 0);
|
138
|
-
__decorate([
|
139
|
-
property({ type: Number })
|
140
|
-
], Split.prototype, "index", void 0);
|
141
|
-
__decorate([
|
142
|
-
state()
|
143
|
-
], Split.prototype, "current", void 0);
|
144
|
-
__decorate([
|
145
|
-
state()
|
146
|
-
], Split.prototype, "currentValue", void 0);
|
147
|
-
Split = __decorate([
|
148
|
-
godown(protoName),
|
149
|
-
styles(css `:host{color:var(${cssGlobalVars.foreground});display:block;border-radius:1px;width:-moz-fit-content;width:fit-content;${cssScope}--size:1.45em;${cssScope}--gap:.25em}[part=root]{gap:var(${cssScope}--gap);width:100%;position:relative;vertical-align:top;display:inline-flex;justify-content:space-between;border-radius:inherit}[part=input-box]{width:var(${cssScope}--size);height:var(${cssScope}--size);vertical-align:top;text-align:center;background-color:var(${cssGlobalVars.input}-background);border-radius:inherit}[part=input]{width:100%;height:100%;opacity:0;background:0 0;position:absolute;z-index:-1}.focus{box-shadow:var(${cssGlobalVars.input}-box-shadow)}`)
|
150
|
-
], Split);
|
151
|
-
var Split$1 = Split;
|
152
|
-
|
153
|
-
export { Split$1 as default };
|
1
|
+
import{__decorate as t}from"tslib";import{godown as e,styles as r,attr as i,classList as s}from"@godown/element";import{css as n,html as u}from"lit";import{property as o,state as l}from"lit/decorators.js";import{scopePrefix as c,cssGlobalVars as a}from"../core/global-style.js";import h from"../core/super-input.js";const p="split",d=c(p);let b=class Split extends h{constructor(){super(...arguments),this.len=6,this.index=-1,this.current=-1,this.currentValue=[]}render(){return u`<div part="root" ${i(this.observedRecord)}>${((t,e)=>{const r=new Array(t);for(let i=0;i<t;i++)r[i]=e(i);return r})(this.len,(t=>u`<span part="input-box" class="${s({focus:this.current===t})}" @click="${this.disabled?null:()=>this.focusAt(t)}">${this.currentValue[t]}</span>`))} <input part="input" id="${this.makeId}" @blur="${this.blur}" @input="${this._handleInput}" .value="${this.value.padStart(this.len," ")}"></div>`}connectedCallback(){super.connectedCallback(),this.reset()}_handleInput(t){t.stopPropagation(),this.compositing||(this.fillInput(t.data),this.value=this.currentValue.join(""),this.dispatchEvent(new CustomEvent("input",{detail:this.value,composed:!0,bubbles:!0})))}fillInput(t){if(null===t){if(null!==this.currentValue[this.current])this.currentValue[this.current]=null;else{this.currentValue[this.current-1]=null;const t=this.currentValue.findLastIndex((t=>null!==t));this.current=this.current-1<0?t<0?0:t:this.current-1}return}const e=t.length>1;if(this.currentValue[this.current]=t[0],this.current+1>=this.len?(this.current=this.currentValue.indexOf(null),-1===this.current&&this.blur()):this.current+=1,e){const e=t.slice(1);e&&this.fillInput(e)}}focus(){this.focusAt(this.current),super.focus()}focusAt(t){this.current=t,this._input.focus(),this.dispatchEvent(new CustomEvent("focus",{detail:t,bubbles:!0,composed:!0}))}blur(){this._input.blur(),this.current=-1,super.blur(),this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}reset(){this.current=-1,this.value=this.default,this.currentValue=this.value.split("").concat(Array(this.len-this.value.length).fill(null)),this.index>-1&&(this.current=this.index)}};t([o({type:Number})],b.prototype,"len",void 0),t([o({type:Number})],b.prototype,"index",void 0),t([l()],b.prototype,"current",void 0),t([l()],b.prototype,"currentValue",void 0),b=t([e(p),r(n`:host{border-radius:1px;color:var(${a.foreground});display:block;width:-moz-fit-content;width:fit-content;${d}--size:1.45em;${d}--gap:.25em}:host([contents]) [part=root]{width:-moz-fit-content;width:fit-content}[part=root]{display:flex;gap:var(${d}--gap);justify-content:space-between;position:relative;width:100%}[part=input-box],[part=root]{border-radius:inherit;vertical-align:top}[part=input-box]{background-color:var(${a.input}-background);height:var(${d}--size);text-align:center;width:var(${d}--size)}[part=input]{background:0 0;height:100%;opacity:0;position:absolute;width:100%;z-index:-1}.focus{box-shadow:var(${a.input}-box-shadow)}`)],b);var f=b;export{b as Split,f as default};
|
154
2
|
//# sourceMappingURL=split.js.map
|
package/components/split.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"split.js","sources":["../src/components/split.ts"],"sourcesContent":null,"names":[
|
1
|
+
{"version":3,"file":"split.js","sources":["../src/components/split.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","Split","SuperInput","constructor","this","len","index","current","currentValue","render","html","attr","observedRecord","fn","result","Array","loop","classList","focus","disabled","focusAt","makeId","blur","_handleInput","value","padStart","connectedCallback","super","reset","e","stopPropagation","compositing","fillInput","data","join","dispatchEvent","CustomEvent","detail","composed","bubbles","lastNotNull","findLastIndex","a","multiple","length","indexOf","after","slice","i","_input","default","split","concat","fill","__decorate","property","type","Number","prototype","undefined","state","godown","styles","css","cssGlobalVars","foreground","input","Split$1"],"mappings":"4TAOA,MAAMA,EAAY,QACZC,EAAWC,EAAYF,GAyB7B,IAAMG,EAAN,MAAMA,cAAcC,EAApB,WAAAC,uBAKEC,KAAGC,IAAG,EAMND,KAAKE,OAAK,EAGVF,KAAOG,SAAK,EAGZH,KAAYI,aAAsB,GAExB,MAAAC,GACR,OAAOC,CAAI,oBAGLC,EAAKP,KAAKQ,mBA9CP,EAAIP,EAAaQ,KAC5B,MAAMC,EAAc,IAAIC,MAAMV,GAC9B,IAAK,IAAIC,EAAQ,EAAGA,EAAQD,EAAKC,IAC/BQ,EAAOR,GAASO,EAAGP,GAErB,OAAOQ,CAAM,EA2CLE,CACAZ,KAAKC,KACJC,GAAkBI,CAAI,iCAGVO,EAAU,CAAEC,MAAOd,KAAKG,UAAYD,gBACnCF,KAAKe,SAAW,KAAO,IAAMf,KAAKgB,QAAQd,OAElDF,KAAKI,aAAaF,yCAMlBF,KAAKiB,kBACHjB,KAAKkB,iBACHlB,KAAKmB,yBAGbnB,KAAKoB,MAAMC,SAASrB,KAAKC,IAAK,eAOxC,iBAAAqB,GACEC,MAAMD,oBACNtB,KAAKwB,QAGG,YAAAL,CAAa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