godown 3.0.0-canary.9 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -9
- package/alert.d.ts +1 -0
- package/alert.d.ts.map +1 -1
- package/alert.js +1 -5
- package/alert.js.map +1 -1
- package/avatar.d.ts +1 -0
- package/avatar.d.ts.map +1 -1
- package/avatar.js +1 -5
- package/avatar.js.map +1 -1
- package/badge.d.ts +9 -0
- package/badge.d.ts.map +1 -0
- package/badge.js +2 -0
- package/badge.js.map +1 -0
- package/breath.js +1 -5
- package/breath.js.map +1 -1
- package/build/godown+lit.iife.js +59 -0
- package/build/godown+lit.iife.js.map +1 -0
- package/build/godown+lit.js +59 -0
- package/build/godown+lit.js.map +1 -0
- package/build/godown+lit.umd.js +59 -0
- package/build/godown+lit.umd.js.map +1 -0
- package/build/godown.iife.js +47 -0
- package/build/godown.js +48 -0
- package/build/godown.js.map +1 -0
- package/build/godown.umd.js +48 -0
- package/build/godown.umd.js.map +1 -0
- package/button.d.ts +1 -0
- package/button.d.ts.map +1 -1
- package/button.js +1 -5
- package/button.js.map +1 -1
- package/card.d.ts +1 -0
- package/card.d.ts.map +1 -1
- package/card.js +1 -5
- package/card.js.map +1 -1
- package/carousel.d.ts +1 -0
- package/carousel.d.ts.map +1 -1
- package/carousel.js +1 -5
- package/carousel.js.map +1 -1
- package/components/alert.d.ts +4 -1
- package/components/alert.d.ts.map +1 -1
- package/components/alert.js +1 -176
- package/components/alert.js.map +1 -1
- package/components/avatar.d.ts +7 -2
- package/components/avatar.d.ts.map +1 -1
- package/components/avatar.js +1 -62
- package/components/avatar.js.map +1 -1
- package/components/badge.d.ts +23 -0
- package/components/badge.d.ts.map +1 -0
- package/components/badge.js +2 -0
- package/components/badge.js.map +1 -0
- package/components/breath.d.ts +6 -4
- package/components/breath.d.ts.map +1 -1
- package/components/breath.js +1 -80
- package/components/breath.js.map +1 -1
- package/components/button.d.ts +8 -5
- package/components/button.d.ts.map +1 -1
- package/components/button.js +1 -168
- package/components/button.js.map +1 -1
- package/components/card.d.ts +3 -1
- package/components/card.d.ts.map +1 -1
- package/components/card.js +1 -48
- package/components/card.js.map +1 -1
- package/components/carousel.d.ts +5 -1
- package/components/carousel.d.ts.map +1 -1
- package/components/carousel.js +1 -113
- package/components/carousel.js.map +1 -1
- package/components/details.d.ts +4 -3
- package/components/details.d.ts.map +1 -1
- package/components/details.js +1 -52
- package/components/details.js.map +1 -1
- package/components/dialog.d.ts +4 -2
- package/components/dialog.d.ts.map +1 -1
- package/components/dialog.js +1 -96
- package/components/dialog.js.map +1 -1
- package/components/divider.d.ts +3 -3
- package/components/divider.d.ts.map +1 -1
- package/components/divider.js +1 -36
- package/components/divider.js.map +1 -1
- package/components/dragbox.d.ts +4 -2
- package/components/dragbox.d.ts.map +1 -1
- package/components/dragbox.js +1 -109
- package/components/dragbox.js.map +1 -1
- package/components/flex.d.ts +3 -1
- package/components/flex.d.ts.map +1 -1
- package/components/flex.js +1 -62
- package/components/flex.js.map +1 -1
- package/components/form.d.ts +3 -1
- package/components/form.d.ts.map +1 -1
- package/components/form.js +1 -75
- package/components/form.js.map +1 -1
- package/components/grid.d.ts +3 -1
- package/components/grid.d.ts.map +1 -1
- package/components/grid.js +1 -56
- package/components/grid.js.map +1 -1
- package/components/heading.d.ts +29 -0
- package/components/heading.d.ts.map +1 -0
- package/components/heading.js +2 -0
- package/components/heading.js.map +1 -0
- package/components/input.d.ts +5 -1
- package/components/input.d.ts.map +1 -1
- package/components/input.js +1 -50
- package/components/input.js.map +1 -1
- package/components/layout.d.ts +6 -4
- package/components/layout.d.ts.map +1 -1
- package/components/layout.js +1 -58
- package/components/layout.js.map +1 -1
- package/components/link.d.ts +5 -0
- package/components/link.d.ts.map +1 -1
- package/components/link.js +1 -44
- package/components/link.js.map +1 -1
- package/components/progress.d.ts +3 -1
- package/components/progress.d.ts.map +1 -1
- package/components/progress.js +1 -58
- package/components/progress.js.map +1 -1
- package/components/range.d.ts +10 -4
- package/components/range.d.ts.map +1 -1
- package/components/range.js +1 -266
- package/components/range.js.map +1 -1
- package/components/rotate.d.ts +3 -1
- package/components/rotate.d.ts.map +1 -1
- package/components/rotate.js +1 -56
- package/components/rotate.js.map +1 -1
- package/components/router.d.ts +27 -34
- package/components/router.d.ts.map +1 -1
- package/components/router.js +1 -250
- package/components/router.js.map +1 -1
- package/components/select.d.ts +7 -2
- package/components/select.d.ts.map +1 -1
- package/components/select.js +1 -211
- package/components/select.js.map +1 -1
- package/components/skeleton.d.ts +3 -1
- package/components/skeleton.d.ts.map +1 -1
- package/components/skeleton.js +1 -54
- package/components/skeleton.js.map +1 -1
- package/components/split.d.ts +8 -2
- package/components/split.d.ts.map +1 -1
- package/components/split.js +1 -153
- package/components/split.js.map +1 -1
- package/components/switch.d.ts +5 -2
- package/components/switch.d.ts.map +1 -1
- package/components/switch.js +1 -92
- package/components/switch.js.map +1 -1
- package/components/text.d.ts +3 -1
- package/components/text.d.ts.map +1 -1
- package/components/text.js +1 -43
- package/components/text.js.map +1 -1
- package/components/time.d.ts +4 -2
- package/components/time.d.ts.map +1 -1
- package/components/time.js +1 -77
- package/components/time.js.map +1 -1
- package/components/tooltip.d.ts +4 -2
- package/components/tooltip.d.ts.map +1 -1
- package/components/tooltip.js +1 -80
- package/components/tooltip.js.map +1 -1
- package/components/typewriter.d.ts +6 -12
- package/components/typewriter.d.ts.map +1 -1
- package/components/typewriter.js +1 -129
- package/components/typewriter.js.map +1 -1
- package/core/global-style.d.ts +2 -2
- package/core/global-style.d.ts.map +1 -1
- package/core/global-style.js +1 -52
- package/core/global-style.js.map +1 -1
- package/core/super-anchor.d.ts +2 -1
- package/core/super-anchor.d.ts.map +1 -1
- package/core/super-anchor.js +1 -38
- package/core/super-anchor.js.map +1 -1
- package/core/super-input.d.ts +4 -3
- package/core/super-input.d.ts.map +1 -1
- package/core/super-input.js +1 -111
- package/core/super-input.js.map +1 -1
- package/core/super-openable.d.ts +1 -1
- package/core/super-openable.d.ts.map +1 -1
- package/core/super-openable.js +1 -37
- package/core/super-openable.js.map +1 -1
- package/custom-elements.json +1 -1
- package/details.d.ts +1 -0
- package/details.d.ts.map +1 -1
- package/details.js +1 -5
- package/details.js.map +1 -1
- package/dev/alert.d.ts +1 -0
- package/dev/alert.d.ts.map +1 -1
- package/dev/alert.js +1 -0
- package/dev/alert.js.map +1 -1
- package/dev/avatar.d.ts +1 -0
- package/dev/avatar.d.ts.map +1 -1
- package/dev/avatar.js +1 -0
- package/dev/avatar.js.map +1 -1
- package/dev/badge.d.ts +9 -0
- package/dev/badge.d.ts.map +1 -0
- package/dev/badge.js +5 -0
- package/dev/badge.js.map +1 -0
- package/dev/button.d.ts +1 -0
- package/dev/button.d.ts.map +1 -1
- package/dev/button.js +1 -0
- package/dev/button.js.map +1 -1
- package/dev/card.d.ts +1 -0
- package/dev/card.d.ts.map +1 -1
- package/dev/card.js +1 -0
- package/dev/card.js.map +1 -1
- package/dev/carousel.d.ts +1 -0
- package/dev/carousel.d.ts.map +1 -1
- package/dev/carousel.js +1 -0
- package/dev/carousel.js.map +1 -1
- package/dev/components/alert.d.ts +4 -1
- package/dev/components/alert.d.ts.map +1 -1
- package/dev/components/alert.js +87 -77
- package/dev/components/alert.js.map +1 -1
- package/dev/components/avatar.d.ts +7 -2
- package/dev/components/avatar.d.ts.map +1 -1
- package/dev/components/avatar.js +60 -32
- package/dev/components/avatar.js.map +1 -1
- package/dev/components/badge.d.ts +23 -0
- package/dev/components/badge.d.ts.map +1 -0
- package/dev/components/badge.js +114 -0
- package/dev/components/badge.js.map +1 -0
- package/dev/components/breath.d.ts +6 -4
- package/dev/components/breath.d.ts.map +1 -1
- package/dev/components/breath.js +40 -31
- package/dev/components/breath.js.map +1 -1
- package/dev/components/button.d.ts +8 -5
- package/dev/components/button.d.ts.map +1 -1
- package/dev/components/button.js +38 -21
- package/dev/components/button.js.map +1 -1
- package/dev/components/card.d.ts +3 -1
- package/dev/components/card.d.ts.map +1 -1
- package/dev/components/card.js +43 -41
- package/dev/components/card.js.map +1 -1
- package/dev/components/carousel.d.ts +5 -1
- package/dev/components/carousel.d.ts.map +1 -1
- package/dev/components/carousel.js +81 -55
- package/dev/components/carousel.js.map +1 -1
- package/dev/components/details.d.ts +4 -3
- package/dev/components/details.d.ts.map +1 -1
- package/dev/components/details.js +76 -70
- package/dev/components/details.js.map +1 -1
- package/dev/components/dialog.d.ts +4 -2
- package/dev/components/dialog.d.ts.map +1 -1
- package/dev/components/dialog.js +65 -60
- package/dev/components/dialog.js.map +1 -1
- package/dev/components/divider.d.ts +3 -3
- package/dev/components/divider.d.ts.map +1 -1
- package/dev/components/divider.js +27 -10
- package/dev/components/divider.js.map +1 -1
- package/dev/components/dragbox.d.ts +4 -2
- package/dev/components/dragbox.d.ts.map +1 -1
- package/dev/components/dragbox.js +22 -13
- package/dev/components/dragbox.js.map +1 -1
- package/dev/components/flex.d.ts +3 -1
- package/dev/components/flex.d.ts.map +1 -1
- package/dev/components/flex.js +22 -9
- package/dev/components/flex.js.map +1 -1
- package/dev/components/form.d.ts +3 -1
- package/dev/components/form.d.ts.map +1 -1
- package/dev/components/form.js +6 -7
- package/dev/components/form.js.map +1 -1
- package/dev/components/grid.d.ts +3 -1
- package/dev/components/grid.d.ts.map +1 -1
- package/dev/components/grid.js +22 -10
- package/dev/components/grid.js.map +1 -1
- package/dev/components/heading.d.ts +29 -0
- package/dev/components/heading.d.ts.map +1 -0
- package/dev/components/heading.js +125 -0
- package/dev/components/heading.js.map +1 -0
- package/dev/components/input.d.ts +5 -1
- package/dev/components/input.d.ts.map +1 -1
- package/dev/components/input.js +36 -28
- package/dev/components/input.js.map +1 -1
- package/dev/components/layout.d.ts +6 -4
- package/dev/components/layout.d.ts.map +1 -1
- package/dev/components/layout.js +53 -39
- package/dev/components/layout.js.map +1 -1
- package/dev/components/link.d.ts +5 -0
- package/dev/components/link.d.ts.map +1 -1
- package/dev/components/link.js +13 -3
- package/dev/components/link.js.map +1 -1
- package/dev/components/progress.d.ts +3 -1
- package/dev/components/progress.d.ts.map +1 -1
- package/dev/components/progress.js +20 -8
- package/dev/components/progress.js.map +1 -1
- package/dev/components/range.d.ts +10 -4
- package/dev/components/range.d.ts.map +1 -1
- package/dev/components/range.js +69 -64
- package/dev/components/range.js.map +1 -1
- package/dev/components/rotate.d.ts +3 -1
- package/dev/components/rotate.d.ts.map +1 -1
- package/dev/components/rotate.js +14 -9
- package/dev/components/rotate.js.map +1 -1
- package/dev/components/router.d.ts +27 -34
- package/dev/components/router.d.ts.map +1 -1
- package/dev/components/router.js +25 -38
- package/dev/components/router.js.map +1 -1
- package/dev/components/select.d.ts +7 -2
- package/dev/components/select.d.ts.map +1 -1
- package/dev/components/select.js +79 -58
- package/dev/components/select.js.map +1 -1
- package/dev/components/skeleton.d.ts +3 -1
- package/dev/components/skeleton.d.ts.map +1 -1
- package/dev/components/skeleton.js +67 -63
- package/dev/components/skeleton.js.map +1 -1
- package/dev/components/split.d.ts +8 -2
- package/dev/components/split.d.ts.map +1 -1
- package/dev/components/split.js +67 -51
- package/dev/components/split.js.map +1 -1
- package/dev/components/switch.d.ts +5 -2
- package/dev/components/switch.d.ts.map +1 -1
- package/dev/components/switch.js +91 -85
- package/dev/components/switch.js.map +1 -1
- package/dev/components/text.d.ts +3 -1
- package/dev/components/text.d.ts.map +1 -1
- package/dev/components/text.js +56 -53
- package/dev/components/text.js.map +1 -1
- package/dev/components/time.d.ts +4 -2
- package/dev/components/time.d.ts.map +1 -1
- package/dev/components/time.js +19 -6
- package/dev/components/time.js.map +1 -1
- package/dev/components/tooltip.d.ts +4 -2
- package/dev/components/tooltip.d.ts.map +1 -1
- package/dev/components/tooltip.js +45 -27
- package/dev/components/tooltip.js.map +1 -1
- package/dev/components/typewriter.d.ts +6 -12
- package/dev/components/typewriter.d.ts.map +1 -1
- package/dev/components/typewriter.js +48 -54
- package/dev/components/typewriter.js.map +1 -1
- package/dev/core/global-style.d.ts +2 -2
- package/dev/core/global-style.d.ts.map +1 -1
- package/dev/core/global-style.js +19 -14
- package/dev/core/global-style.js.map +1 -1
- package/dev/core/super-anchor.d.ts +2 -1
- package/dev/core/super-anchor.d.ts.map +1 -1
- package/dev/core/super-anchor.js +15 -12
- package/dev/core/super-anchor.js.map +1 -1
- package/dev/core/super-input.d.ts +4 -3
- package/dev/core/super-input.d.ts.map +1 -1
- package/dev/core/super-input.js +64 -42
- package/dev/core/super-input.js.map +1 -1
- package/dev/core/super-openable.d.ts +1 -1
- package/dev/core/super-openable.d.ts.map +1 -1
- package/dev/core/super-openable.js +1 -2
- package/dev/core/super-openable.js.map +1 -1
- package/dev/details.d.ts +1 -0
- package/dev/details.d.ts.map +1 -1
- package/dev/details.js +1 -0
- package/dev/details.js.map +1 -1
- package/dev/dialog.d.ts +1 -0
- package/dev/dialog.d.ts.map +1 -1
- package/dev/dialog.js +1 -0
- package/dev/dialog.js.map +1 -1
- package/dev/divider.d.ts +1 -0
- package/dev/divider.d.ts.map +1 -1
- package/dev/divider.js +1 -0
- package/dev/divider.js.map +1 -1
- package/dev/dragbox.d.ts +1 -0
- package/dev/dragbox.d.ts.map +1 -1
- package/dev/dragbox.js +1 -0
- package/dev/dragbox.js.map +1 -1
- package/dev/flex.d.ts +1 -0
- package/dev/flex.d.ts.map +1 -1
- package/dev/flex.js +1 -0
- package/dev/flex.js.map +1 -1
- package/dev/form.d.ts +1 -0
- package/dev/form.d.ts.map +1 -1
- package/dev/form.js +1 -0
- package/dev/form.js.map +1 -1
- package/dev/grid.d.ts +1 -0
- package/dev/grid.d.ts.map +1 -1
- package/dev/grid.js +1 -0
- package/dev/grid.js.map +1 -1
- package/dev/heading.d.ts +9 -0
- package/dev/heading.d.ts.map +1 -0
- package/dev/heading.js +5 -0
- package/dev/heading.js.map +1 -0
- package/dev/index.d.ts +2 -0
- package/dev/index.d.ts.map +1 -1
- package/dev/index.js +2 -0
- package/dev/index.js.map +1 -1
- package/dev/layout.d.ts.map +1 -1
- package/dev/progress.d.ts.map +1 -1
- package/dev/router.d.ts.map +1 -1
- package/dev/split.d.ts +1 -1
- package/dev/split.d.ts.map +1 -1
- package/dev/typewriter.d.ts +1 -0
- package/dev/typewriter.d.ts.map +1 -1
- package/dev/typewriter.js +1 -0
- package/dev/typewriter.js.map +1 -1
- package/dialog.d.ts +1 -0
- package/dialog.d.ts.map +1 -1
- package/dialog.js +1 -5
- package/dialog.js.map +1 -1
- package/divider.d.ts +1 -0
- package/divider.d.ts.map +1 -1
- package/divider.js +1 -5
- package/divider.js.map +1 -1
- package/dragbox.d.ts +1 -0
- package/dragbox.d.ts.map +1 -1
- package/dragbox.js +1 -5
- package/dragbox.js.map +1 -1
- package/flex.d.ts +1 -0
- package/flex.d.ts.map +1 -1
- package/flex.js +1 -5
- package/flex.js.map +1 -1
- package/form.d.ts +1 -0
- package/form.d.ts.map +1 -1
- package/form.js +1 -5
- package/form.js.map +1 -1
- package/grid.d.ts +1 -0
- package/grid.d.ts.map +1 -1
- package/grid.js +1 -5
- package/grid.js.map +1 -1
- package/heading.d.ts +9 -0
- package/heading.d.ts.map +1 -0
- package/heading.js +2 -0
- package/heading.js.map +1 -0
- package/index.d.ts +2 -0
- package/index.d.ts.map +1 -1
- package/index.js +1 -56
- package/index.js.map +1 -1
- package/input.js +1 -5
- package/input.js.map +1 -1
- package/layout.d.ts.map +1 -1
- package/layout.js +1 -5
- package/layout.js.map +1 -1
- package/link.js +1 -5
- package/link.js.map +1 -1
- package/package.json +13 -8
- package/progress.d.ts.map +1 -1
- package/progress.js +1 -5
- package/progress.js.map +1 -1
- package/range.js +1 -5
- package/range.js.map +1 -1
- package/rotate.js +1 -5
- package/rotate.js.map +1 -1
- package/router.d.ts.map +1 -1
- package/router.js +1 -5
- package/router.js.map +1 -1
- package/select.js +1 -5
- package/select.js.map +1 -1
- package/skeleton.js +1 -5
- package/skeleton.js.map +1 -1
- package/split.d.ts +1 -1
- package/split.d.ts.map +1 -1
- package/split.js +1 -5
- package/split.js.map +1 -1
- package/src/alert.ts +2 -0
- package/src/avatar.ts +2 -0
- package/src/badge.ts +13 -0
- package/src/button.ts +2 -0
- package/src/card.ts +2 -0
- package/src/carousel.ts +2 -0
- package/src/components/alert.ts +92 -86
- package/src/components/avatar.ts +65 -39
- package/src/components/badge.ts +110 -0
- package/src/components/breath.ts +47 -38
- package/src/components/button.ts +38 -36
- package/src/components/card.ts +45 -46
- package/src/components/carousel.ts +91 -66
- package/src/components/details.ts +79 -75
- package/src/components/dialog.ts +74 -73
- package/src/components/divider.ts +28 -13
- package/src/components/dragbox.ts +30 -25
- package/src/components/flex.ts +35 -22
- package/src/components/form.ts +12 -15
- package/src/components/grid.ts +35 -23
- package/src/components/heading.ts +123 -0
- package/src/components/input.ts +43 -37
- package/src/components/layout.ts +52 -44
- package/src/components/link.ts +13 -4
- package/src/components/progress.ts +22 -10
- package/src/components/range.ts +107 -108
- package/src/components/rotate.ts +24 -18
- package/src/components/router.ts +64 -67
- package/src/components/select.ts +94 -78
- package/src/components/skeleton.ts +70 -68
- package/src/components/split.ts +81 -67
- package/src/components/switch.ts +97 -93
- package/src/components/text.ts +55 -58
- package/src/components/time.ts +26 -13
- package/src/components/tooltip.ts +44 -32
- package/src/components/typewriter.ts +54 -61
- package/src/core/global-style.ts +34 -21
- package/src/core/super-anchor.ts +17 -14
- package/src/core/super-input.ts +76 -63
- package/src/core/super-openable.ts +8 -14
- package/src/details.ts +2 -0
- package/src/dialog.ts +2 -0
- package/src/divider.ts +2 -0
- package/src/dragbox.ts +2 -0
- package/src/flex.ts +2 -0
- package/src/form.ts +2 -0
- package/src/grid.ts +2 -0
- package/src/heading.ts +13 -0
- package/src/index.ts +2 -0
- package/src/layout.ts +1 -0
- package/src/progress.ts +1 -0
- package/src/router.ts +1 -0
- package/src/split.ts +1 -1
- package/src/typewriter.ts +2 -0
- package/switch.js +1 -5
- package/switch.js.map +1 -1
- package/text.js +1 -5
- package/text.js.map +1 -1
- package/time.js +1 -5
- package/time.js.map +1 -1
- package/tooltip.js +1 -5
- package/tooltip.js.map +1 -1
- package/typewriter.d.ts +1 -0
- package/typewriter.d.ts.map +1 -1
- package/typewriter.js +1 -5
- package/typewriter.js.map +1 -1
- package/vscode.html-custom-data.json +1 -1
- package/web-types.json +1 -1
package/dev/components/card.js
CHANGED
@@ -1,10 +1,8 @@
|
|
1
1
|
import { __decorate } from "tslib";
|
2
|
-
import { godown } from "@godown/element
|
3
|
-
import {
|
4
|
-
import { htmlSlot } from "@godown/element/directives/html-slot.js";
|
5
|
-
import { css } from "lit";
|
2
|
+
import { attr, godown, htmlSlot, styles } from "@godown/element";
|
3
|
+
import { css, html } from "lit";
|
6
4
|
import { property } from "lit/decorators.js";
|
7
|
-
import {
|
5
|
+
import { GlobalStyle, cssGlobalVars, scopePrefix } from "../core/global-style.js";
|
8
6
|
const protoName = "card";
|
9
7
|
const cssScope = scopePrefix(protoName);
|
10
8
|
/**
|
@@ -25,11 +23,14 @@ let Card = class Card extends GlobalStyle {
|
|
25
23
|
this.header = false;
|
26
24
|
}
|
27
25
|
render() {
|
28
|
-
return
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
26
|
+
return html `
|
27
|
+
<div
|
28
|
+
part="root"
|
29
|
+
${attr(this.observedRecord)}
|
30
|
+
>
|
31
|
+
${[this.header ? htmlSlot("header") : "", htmlSlot(), this.footer ? htmlSlot("footer") : ""]}
|
32
|
+
</div>
|
33
|
+
`;
|
33
34
|
}
|
34
35
|
};
|
35
36
|
__decorate([
|
@@ -41,41 +42,42 @@ __decorate([
|
|
41
42
|
Card = __decorate([
|
42
43
|
godown(protoName),
|
43
44
|
styles(css `
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
45
|
+
:host {
|
46
|
+
${cssScope}--background: var(${cssGlobalVars.background});
|
47
|
+
${cssScope}--border-width: .0375em;
|
48
|
+
${cssScope}--border-color: transparent;
|
49
|
+
${cssScope}--border-background: var(${cssGlobalVars.passive});
|
50
|
+
${cssScope}--padding: .75em;
|
51
|
+
color: var(${cssGlobalVars.foreground});
|
52
|
+
background: var(${cssScope}--background);
|
53
|
+
border-width: var(${cssScope}--border-width);
|
54
|
+
display: block;
|
55
|
+
flex-shrink: 0;
|
56
|
+
position: relative;
|
57
|
+
overflow: hidden;
|
58
|
+
box-sizing: border-box;
|
59
|
+
}
|
59
60
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
61
|
+
slot {
|
62
|
+
display: block;
|
63
|
+
padding: var(${cssScope}--padding);
|
64
|
+
}
|
64
65
|
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
66
|
+
:host,
|
67
|
+
slot {
|
68
|
+
border-color: var(${cssScope}--border-background);
|
69
|
+
border-style: solid;
|
70
|
+
}
|
70
71
|
|
71
|
-
|
72
|
-
|
73
|
-
|
72
|
+
[name="footer"] {
|
73
|
+
border-top-width: var(${cssScope}--border-width);
|
74
|
+
}
|
74
75
|
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
76
|
+
[name="header"] {
|
77
|
+
border-bottom-width: var(${cssScope}--border-width);
|
78
|
+
}
|
79
|
+
`)
|
79
80
|
], Card);
|
80
81
|
export default Card;
|
82
|
+
export { Card };
|
81
83
|
//# sourceMappingURL=card.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"card.js","sourceRoot":"","sources":["../../src/components/card.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"card.js","sourceRoot":"","sources":["../../src/components/card.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAuB,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,m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3 +1,4 @@
|
|
1
|
+
import { type TemplateResult } from "lit";
|
1
2
|
import { GlobalStyle } from "../core/global-style.js";
|
2
3
|
/**
|
3
4
|
* {@linkcode Carousel} make the content display as a carousel.
|
@@ -10,6 +11,7 @@ import { GlobalStyle } from "../core/global-style.js";
|
|
10
11
|
* If no width, it will be the width of the first element.
|
11
12
|
*
|
12
13
|
* @slot - Carousel items, should maintain the same size.
|
14
|
+
* @fires change - Fired when the index changes.
|
13
15
|
* @category display
|
14
16
|
*/
|
15
17
|
declare class Carousel extends GlobalStyle {
|
@@ -29,13 +31,15 @@ declare class Carousel extends GlobalStyle {
|
|
29
31
|
protected intervalID: number;
|
30
32
|
private _cloneFirst;
|
31
33
|
private _cloneLast;
|
32
|
-
protected render():
|
34
|
+
protected render(): TemplateResult<1>;
|
33
35
|
protected firstUpdated(): Promise<void>;
|
34
36
|
disconnectedCallback(): void;
|
35
37
|
show(i: number): void;
|
36
38
|
next(): void;
|
37
39
|
prev(): void;
|
38
40
|
protected _doTranslateX(xValue: string, noTransition?: boolean): void;
|
41
|
+
checkInterval(): void;
|
39
42
|
}
|
40
43
|
export default Carousel;
|
44
|
+
export { Carousel };
|
41
45
|
//# sourceMappingURL=carousel.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"carousel.d.ts","sourceRoot":"","sources":["../../src/components/carousel.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"carousel.d.ts","sourceRoot":"","sources":["../../src/components/carousel.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAGrD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAItD;;;;;;;;;;;;;GAaG;AACH,cA6CM,QAAS,SAAQ,WAAW;IAChC;;OAEG;IAEH,KAAK,SAAK;IAEV;;OAEG;IAEH,UAAU,SAAK;IAEf;;OAEG;IAEH,KAAK,EAAE,MAAM,CAAC;IAGd,SAAS,CAAC,SAAS,EAAE,WAAW,CAAC;IAEjC,SAAS,CAAC,UAAU,EAAE,MAAM,CAAC;IAE7B,OAAO,CAAC,WAAW,CAA0B;IAE7C,OAAO,CAAC,UAAU,CAA0B;IAE5C,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;cA6BrB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAiB7C,oBAAoB,IAAI,IAAI;IAI5B,IAAI,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;IAKrB,IAAI,IAAI,IAAI;IAUZ,IAAI,IAAI,IAAI;IAUZ,SAAS,CAAC,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,OAAO,GAAG,IAAI;IAQrE,aAAa,IAAI,IAAI;CAUtB;AAED,eAAe,QAAQ,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
@@ -1,9 +1,5 @@
|
|
1
1
|
import { __decorate } from "tslib";
|
2
|
-
import { godown } from "@godown/element
|
3
|
-
import { part } from "@godown/element/decorators/part.js";
|
4
|
-
import { styles } from "@godown/element/decorators/styles.js";
|
5
|
-
import { htmlSlot } from "@godown/element/directives/html-slot.js";
|
6
|
-
import { htmlStyle } from "@godown/element/directives/html-style.js";
|
2
|
+
import { attr, godown, htmlSlot, htmlStyle, part, styles } from "@godown/element";
|
7
3
|
import iconChevronLeft from "@godown/f7-icon/icons/chevron-left.js";
|
8
4
|
import iconChevronRight from "@godown/f7-icon/icons/chevron-right.js";
|
9
5
|
import { css, html } from "lit";
|
@@ -21,6 +17,7 @@ const protoName = "carousel";
|
|
21
17
|
* If no width, it will be the width of the first element.
|
22
18
|
*
|
23
19
|
* @slot - Carousel items, should maintain the same size.
|
20
|
+
* @fires change - Fired when the index changes.
|
24
21
|
* @category display
|
25
22
|
*/
|
26
23
|
let Carousel = class Carousel extends GlobalStyle {
|
@@ -36,14 +33,32 @@ let Carousel = class Carousel extends GlobalStyle {
|
|
36
33
|
this.autoChange = 0;
|
37
34
|
}
|
38
35
|
render() {
|
39
|
-
return
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
36
|
+
return html `
|
37
|
+
<div
|
38
|
+
part="root"
|
39
|
+
${attr(this.observedRecord)}
|
40
|
+
>
|
41
|
+
<i
|
42
|
+
part="prev"
|
43
|
+
@click="${this.prev}"
|
44
|
+
>
|
45
|
+
${iconChevronLeft()}
|
46
|
+
</i>
|
47
|
+
<div
|
48
|
+
part="move-root"
|
49
|
+
style="transform:${`translateX(-${this.index + 1}00%)`}"
|
50
|
+
>
|
51
|
+
${htmlSlot()}
|
52
|
+
</div>
|
53
|
+
<i
|
54
|
+
part="next"
|
55
|
+
@click="${this.next}"
|
56
|
+
>
|
57
|
+
${iconChevronRight()}
|
58
|
+
</i>
|
59
|
+
${htmlStyle(`:host,:host([contents]) [part=root]{width:${this.width};}`)}
|
60
|
+
</div>
|
61
|
+
`;
|
47
62
|
}
|
48
63
|
async firstUpdated() {
|
49
64
|
await this.updateComplete;
|
@@ -57,17 +72,14 @@ let Carousel = class Carousel extends GlobalStyle {
|
|
57
72
|
this.insertBefore(this._cloneFirst, this.firstElementChild);
|
58
73
|
this.show(this.index);
|
59
74
|
}
|
60
|
-
|
61
|
-
this.intervalID = window.setInterval(() => {
|
62
|
-
this.next();
|
63
|
-
}, this.autoChange);
|
64
|
-
}
|
75
|
+
this.checkInterval();
|
65
76
|
}
|
66
77
|
disconnectedCallback() {
|
67
78
|
clearInterval(this.intervalID);
|
68
79
|
}
|
69
80
|
show(i) {
|
70
81
|
this.index = i;
|
82
|
+
this.dispatchEvent(new CustomEvent("change", { detail: i, composed: true }));
|
71
83
|
}
|
72
84
|
next() {
|
73
85
|
if (this.index === this.childElementCount - 3) {
|
@@ -77,6 +89,7 @@ let Carousel = class Carousel extends GlobalStyle {
|
|
77
89
|
else {
|
78
90
|
this.show(this.index + 1);
|
79
91
|
}
|
92
|
+
this.checkInterval();
|
80
93
|
}
|
81
94
|
prev() {
|
82
95
|
if (this.index === 0) {
|
@@ -86,14 +99,25 @@ let Carousel = class Carousel extends GlobalStyle {
|
|
86
99
|
else {
|
87
100
|
this.show(this.index - 1);
|
88
101
|
}
|
102
|
+
this.checkInterval();
|
89
103
|
}
|
90
104
|
_doTranslateX(xValue, noTransition) {
|
91
105
|
this._moveRoot.style.transform = `translateX(${xValue})`;
|
92
106
|
if (noTransition) {
|
93
|
-
this._moveRoot.style.transition =
|
107
|
+
this._moveRoot.style.transition = "none";
|
94
108
|
}
|
95
109
|
this._moveRoot.getBoundingClientRect();
|
96
110
|
}
|
111
|
+
checkInterval() {
|
112
|
+
if (this.autoChange) {
|
113
|
+
if (this.intervalID) {
|
114
|
+
clearInterval(this.intervalID);
|
115
|
+
}
|
116
|
+
this.intervalID = setInterval(() => {
|
117
|
+
this.next();
|
118
|
+
}, this.autoChange);
|
119
|
+
}
|
120
|
+
}
|
97
121
|
};
|
98
122
|
__decorate([
|
99
123
|
property({ type: Number })
|
@@ -110,48 +134,50 @@ __decorate([
|
|
110
134
|
Carousel = __decorate([
|
111
135
|
godown(protoName),
|
112
136
|
styles(css `
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
137
|
+
:host {
|
138
|
+
display: block;
|
139
|
+
transition: 0.3s;
|
140
|
+
}
|
117
141
|
|
118
|
-
|
119
|
-
|
120
|
-
|
142
|
+
[part="root"] {
|
143
|
+
direction: ltr;
|
144
|
+
overflow: hidden;
|
145
|
+
}
|
121
146
|
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
147
|
+
[part="root"],
|
148
|
+
[part="move-root"] {
|
149
|
+
height: 100%;
|
150
|
+
width: 100%;
|
151
|
+
display: flex;
|
152
|
+
position: relative;
|
153
|
+
transition: inherit;
|
154
|
+
}
|
130
155
|
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
156
|
+
[part="prev"],
|
157
|
+
[part="next"] {
|
158
|
+
height: 100%;
|
159
|
+
width: 1.5em;
|
160
|
+
z-index: 1;
|
161
|
+
position: absolute;
|
162
|
+
display: flex;
|
163
|
+
align-items: center;
|
164
|
+
justify-content: center;
|
165
|
+
user-select: none;
|
166
|
+
}
|
142
167
|
|
143
|
-
|
144
|
-
|
145
|
-
|
168
|
+
[part="prev"] {
|
169
|
+
left: 0;
|
170
|
+
}
|
146
171
|
|
147
|
-
|
148
|
-
|
149
|
-
|
172
|
+
[part="next"] {
|
173
|
+
right: 0;
|
174
|
+
}
|
150
175
|
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
176
|
+
slot::slotted(*) {
|
177
|
+
flex-shrink: 0 !important;
|
178
|
+
}
|
179
|
+
`)
|
155
180
|
], Carousel);
|
156
181
|
export default Carousel;
|
182
|
+
export { Carousel };
|
157
183
|
//# sourceMappingURL=carousel.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"carousel.js","sourceRoot":"","sources":["../../src/components/carousel.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"carousel.js","sourceRoot":"","sources":["../../src/components/carousel.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAClF,OAAO,eAAe,MAAM,uCAAuC,CAAC;AACpE,OAAO,gBAAgB,MAAM,wCAAwC,CAAC;AACtE,OAAO,EAAuB,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,MAAM,SAAS,GAAG,UAAU,CAAC;AAE7B;;;;;;;;;;;;;GAaG;AA8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CAAC,UAAU,GAAG,MAAM,CAAC;QAC3C,CAAC;QACD,IAAI,CAAC,SAAS,CAAC,qBAAqB,EAAE,CAAC;IACzC,CAAC;IAED,aAAa;QACX,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACpB,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;gBACpB,aAAa,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YACjC,CAAC;YACD,IAAI,CAAC,UAAU,GAAG,WAAW,CAAC,GAAG,EAAE;gBACjC,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QACtB,CAAC;IACH,CAAC;CACF,CAAA;AApHC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uCACjB;AAMV;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CACZ;AAMf;IADC,QAAQ,EAAE;uCACG;AAGJ;IADT,IAAI,CAAC,WAAW,CAAC;2CACe;AApB7B,QAAQ;IA7Cb,MAAM,CAAC,SAAS,CAAC;IACjB,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2CV,CAAC;GACI,QAAQ,CAyHb;AAED,eAAe,QAAQ,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
@@ -1,10 +1,11 @@
|
|
1
|
+
import { type TemplateResult } from "lit";
|
1
2
|
import SuperOpenable from "../core/super-openable.js";
|
2
3
|
/**
|
3
4
|
* {@linkcode Details} similar to `<details>`.
|
4
5
|
*
|
5
6
|
* @slot summary - Details summary if no `summary` is provided.
|
6
7
|
* @slot - Details content.
|
7
|
-
* @fires change - Fired when the
|
8
|
+
* @fires change - Fired when the open changes.
|
8
9
|
* @category display
|
9
10
|
*/
|
10
11
|
declare class Details extends SuperOpenable {
|
@@ -16,8 +17,8 @@ declare class Details extends SuperOpenable {
|
|
16
17
|
* Summary text.
|
17
18
|
*/
|
18
19
|
summary: string;
|
19
|
-
protected
|
20
|
-
protected render(): import("lit").TemplateResult<1>;
|
20
|
+
protected render(): TemplateResult<1>;
|
21
21
|
}
|
22
22
|
export default Details;
|
23
|
+
export { Details };
|
23
24
|
//# sourceMappingURL=details.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"details.d.ts","sourceRoot":"","sources":["../../src/components/details.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"details.d.ts","sourceRoot":"","sources":["../../src/components/details.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAIrD,OAAO,aAAa,MAAM,2BAA2B,CAAC;AAMtD;;;;;;;GAOG;AACH,cA2DM,OAAQ,SAAQ,aAAa;IACjC;;OAEG;IAEH,IAAI,UAAS;IAEb;;OAEG;IAEH,OAAO,SAAM;IAEb,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;CAwBtC;AAED,eAAe,OAAO,CAAC;AACvB,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
@@ -1,10 +1,8 @@
|
|
1
1
|
import { __decorate } from "tslib";
|
2
|
-
import { godown } from "@godown/element
|
3
|
-
import { styles } from "@godown/element/decorators/styles.js";
|
4
|
-
import { htmlSlot } from "@godown/element/directives/html-slot.js";
|
2
|
+
import { attr, godown, htmlSlot, styles } from "@godown/element";
|
5
3
|
import svgCaretDown from "@godown/f7-icon/icons/chevron-down.js";
|
6
4
|
import { css, html } from "lit";
|
7
|
-
import { property
|
5
|
+
import { property } from "lit/decorators.js";
|
8
6
|
import { scopePrefix } from "../core/global-style.js";
|
9
7
|
import SuperOpenable from "../core/super-openable.js";
|
10
8
|
const protoName = "details";
|
@@ -14,7 +12,7 @@ const cssScope = scopePrefix(protoName);
|
|
14
12
|
*
|
15
13
|
* @slot summary - Details summary if no `summary` is provided.
|
16
14
|
* @slot - Details content.
|
17
|
-
* @fires change - Fired when the
|
15
|
+
* @fires change - Fired when the open changes.
|
18
16
|
* @category display
|
19
17
|
*/
|
20
18
|
let Details = class Details extends SuperOpenable {
|
@@ -30,15 +28,28 @@ let Details = class Details extends SuperOpenable {
|
|
30
28
|
this.summary = "";
|
31
29
|
}
|
32
30
|
render() {
|
33
|
-
return html
|
34
|
-
<
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
31
|
+
return html `
|
32
|
+
<dl
|
33
|
+
part="root"
|
34
|
+
${attr(this.observedRecord)}
|
35
|
+
>
|
36
|
+
<dt
|
37
|
+
part="title"
|
38
|
+
@click="${this._handelClick}"
|
39
|
+
>
|
40
|
+
<span part="summary">${this.summary || htmlSlot("summary")}</span>
|
41
|
+
<span>
|
42
|
+
<i part="icon">${svgCaretDown()}</i>
|
43
|
+
</span>
|
44
|
+
</dt>
|
45
|
+
<dd
|
46
|
+
part="details"
|
47
|
+
@click=${this.fill ? () => this.toggle() : null}
|
48
|
+
>
|
49
|
+
<div style="min-height: 0;">${htmlSlot()}</div>
|
50
|
+
</dd>
|
51
|
+
</dl>
|
52
|
+
`;
|
42
53
|
}
|
43
54
|
};
|
44
55
|
__decorate([
|
@@ -47,72 +58,67 @@ __decorate([
|
|
47
58
|
__decorate([
|
48
59
|
property()
|
49
60
|
], Details.prototype, "summary", void 0);
|
50
|
-
__decorate([
|
51
|
-
query("dd")
|
52
|
-
], Details.prototype, "_dd", void 0);
|
53
61
|
Details = __decorate([
|
54
62
|
godown(protoName),
|
55
63
|
styles(css `
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
}
|
64
|
+
:host {
|
65
|
+
${cssScope}--icon-deg-open: 0deg;
|
66
|
+
${cssScope}--icon-deg-close: 90deg;
|
67
|
+
${cssScope}--icon-space: 0.3em;
|
68
|
+
${cssScope}--summary-direction: row;
|
69
|
+
${cssScope}--transition: .3s;
|
70
|
+
height: fit-content;
|
71
|
+
display: block;
|
72
|
+
transition: var(${cssScope}--transition);
|
73
|
+
}
|
67
74
|
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
75
|
+
[part="root"] {
|
76
|
+
height: 100%;
|
77
|
+
position: relative;
|
78
|
+
overflow: hidden;
|
79
|
+
}
|
73
80
|
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
}
|
81
|
+
[part="title"] {
|
82
|
+
direction: ltr;
|
83
|
+
height: 100%;
|
84
|
+
display: flex;
|
85
|
+
flex-wrap: nowrap;
|
86
|
+
justify-content: space-between;
|
87
|
+
background: inherit;
|
88
|
+
align-items: center;
|
89
|
+
flex-direction: var(${cssScope}--summary-direction);
|
90
|
+
}
|
83
91
|
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
92
|
+
[part="details"] {
|
93
|
+
display: grid;
|
94
|
+
overflow: hidden;
|
95
|
+
grid-template-rows: 0fr;
|
96
|
+
transition: var(${cssScope}--transition);
|
97
|
+
transition-property: grid-template-rows;
|
98
|
+
}
|
91
99
|
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
padding: var(${cssScope}--icon-space);
|
96
|
-
transition: var(${cssScope}--transition);
|
97
|
-
transform: rotate(var(${cssScope}--icon-deg));
|
98
|
-
}
|
100
|
+
:host([open]) [part="details"] {
|
101
|
+
grid-template-rows: 1fr;
|
102
|
+
}
|
99
103
|
|
100
|
-
|
101
|
-
|
102
|
-
|
104
|
+
:host([float]) [part="details"] {
|
105
|
+
top: 100%;
|
106
|
+
position: absolute;
|
107
|
+
}
|
103
108
|
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
}
|
109
|
+
[part="icon"] {
|
110
|
+
display: flex;
|
111
|
+
backface-visibility: hidden;
|
112
|
+
padding: var(${cssScope}--icon-space);
|
113
|
+
transition: var(${cssScope}--transition);
|
114
|
+
transform: rotate(var(${cssScope}--icon-deg-close));
|
115
|
+
}
|
108
116
|
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
transform: rotate(var(${cssScope}--icon-deg-open));
|
114
|
-
}
|
115
|
-
`)
|
117
|
+
:host([open]) [part="icon"] {
|
118
|
+
transform: rotate(var(${cssScope}--icon-deg-open));
|
119
|
+
}
|
120
|
+
`)
|
116
121
|
], Details);
|
117
122
|
export default Details;
|
123
|
+
export { Details };
|
118
124
|
//# sourceMappingURL=details.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"details.js","sourceRoot":"","sources":["../../src/components/details.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"details.js","sourceRoot":"","sources":["../../src/components/details.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,YAAY,MAAM,uCAAuC,CAAC;AACjE,OAAO,EAAuB,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,aAAa,MAAM,2BAA2B,CAAC;AAEtD,MAAM,SAAS,GAAG,SAAS,CAAC;AAE5B,MAAM,QAAQ,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC;AAExC;;;;;;;GAOG;AA4DH,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,aAAa;IAAnC;;QACE;;WAEG;QAEH,SAAI,GAAG,KAAK,CAAC;QAEb;;WAEG;QAEH,YAAO,GAAG,EAAE,CAAC;IA0Bf,CAAC;IAxBW,MAAM;QACd,OAAO,IAAI,CAAA;;;UAGL,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC;;;;oBAIf,IAAI,CAAC,YAAY;;iCAEJ,IAAI,CAAC,OAAO,IAAI,QAAQ,CAAC,SAAS,CAAC;;6BAEvC,YAAY,EAAE;;;;;mBAKxB,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,IAAI;;wCAEjB,QAAQ,EAAE;;;KAG7C,CAAC;IACJ,CAAC;CACF,CAAA;AAhCC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;qCACf;AAMb;IADC,QAAQ,EAAE;wCACE;AAXT,OAAO;IA3DZ,MAAM,CAAC,SAAS,CAAC;IACjB,MAAM,CAAC,GAAG,CAAA;;MAEL,QAAQ;MACR,QAAQ;MACR,QAAQ;MACR,QAAQ;MACR,QAAQ;;;sBAGQ,QAAQ;;;;;;;;;;;;;;;;;0BAiBJ,QAAQ;;;;;;;sBAOZ,QAAQ;;;;;;;;;;;;;;;;mBAgBX,QAAQ;sBACL,QAAQ;4BACF,QAAQ;;;;4BAIR,QAAQ;;CAEnC,CAAC;GACI,OAAO,CAqCZ;AAED,eAAe,OAAO,CAAC;AACvB,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { type HandlerEvent } from "@godown/element";
|
2
|
-
import { type PropertyValues } from "lit";
|
2
|
+
import { type PropertyValues, type TemplateResult } from "lit";
|
3
3
|
import SuperOpenable, { type Direction9 } from "../core/super-openable.js";
|
4
4
|
/**
|
5
5
|
* {@linkcode Dialog} similar to `<dialog>`.
|
@@ -8,6 +8,7 @@ import SuperOpenable, { type Direction9 } from "../core/super-openable.js";
|
|
8
8
|
*
|
9
9
|
* It listens for the keydown event and also closes itself when the {@linkcode key} contained in the key is pressed.
|
10
10
|
*
|
11
|
+
* @fires change - Fires when the open changes.
|
11
12
|
* @category feedback
|
12
13
|
*/
|
13
14
|
declare class Dialog extends SuperOpenable {
|
@@ -24,7 +25,7 @@ declare class Dialog extends SuperOpenable {
|
|
24
25
|
*/
|
25
26
|
key: string;
|
26
27
|
private _modalInvoke;
|
27
|
-
protected render():
|
28
|
+
protected render(): TemplateResult<1>;
|
28
29
|
showModal(): void;
|
29
30
|
private _submitEvent;
|
30
31
|
private _keydownEvent;
|
@@ -34,4 +35,5 @@ declare class Dialog extends SuperOpenable {
|
|
34
35
|
close(): void;
|
35
36
|
}
|
36
37
|
export default Dialog;
|
38
|
+
export { Dialog };
|
37
39
|
//# sourceMappingURL=dialog.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/components/dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,
|
1
|
+
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/components/dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAkC,MAAM,iBAAiB,CAAC;AACpF,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAI1E,OAAO,aAAa,EAAE,EAAE,KAAK,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAK3E;;;;;;;;;GASG;AACH,cA+DM,MAAO,SAAQ,aAAa;IAChC;;OAEG;IAEH,SAAS,EAAE,UAAU,CAAY;IAEjC;;OAEG;IAEH,KAAK,UAAS;IAEd;;OAEG;IAEH,GAAG,SAAY;IAEf,OAAO,CAAC,YAAY,CAAS;IAE7B,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;IAYrC,SAAS,IAAI,IAAI;IAQjB,OAAO,CAAC,YAAY,CAAqC;IACzD,OAAO,CAAC,aAAa,CAAqC;IAE1D,SAAS,CAAC,OAAO,CAAC,iBAAiB,EAAE,cAAc,GAAG,IAAI;IAc1D,SAAS,CAAC,cAAc,CAAC,CAAC,EAAE,aAAa,GAAG,IAAI;IAQhD,SAAS,CAAC,aAAa,CAAC,CAAC,EAAE,YAAY,CAAC,eAAe,CAAC,GAAG,IAAI;IAM/D,KAAK,IAAI,IAAI;CAOd;AAED,eAAe,MAAM,CAAC;AACtB,OAAO,EAAE,MAAM,EAAE,CAAC"}
|