godown 2.7.5 → 2.7.6
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 +18 -45
- package/{.deps.d.ts → _deps.d.ts} +1 -2
- package/{.deps.d.ts.map → _deps.d.ts.map} +1 -1
- package/{.deps.js → _deps.js} +1 -2
- package/_deps.js.map +1 -0
- package/alert.d.ts +8 -1
- package/alert.d.ts.map +1 -1
- package/alert.js +4 -1
- package/alert.js.map +1 -1
- package/avatar-group.d.ts +8 -1
- package/avatar-group.d.ts.map +1 -1
- package/avatar-group.js +4 -1
- package/avatar-group.js.map +1 -1
- package/avatar.d.ts +8 -1
- package/avatar.d.ts.map +1 -1
- package/avatar.js +4 -1
- package/avatar.js.map +1 -1
- package/button.d.ts +8 -1
- package/button.d.ts.map +1 -1
- package/button.js +4 -1
- package/button.js.map +1 -1
- package/card.d.ts +8 -1
- package/card.d.ts.map +1 -1
- package/card.js +4 -1
- package/card.js.map +1 -1
- package/carousel.d.ts +8 -1
- package/carousel.d.ts.map +1 -1
- package/carousel.js +4 -1
- package/carousel.js.map +1 -1
- package/components.json +194 -0
- package/conf.d.ts +6 -75
- package/conf.d.ts.map +1 -1
- package/conf.js +8 -34
- package/conf.js.map +1 -1
- package/decorators/godown.d.ts +4 -0
- package/decorators/godown.d.ts.map +1 -0
- package/decorators/godown.js +9 -0
- package/decorators/godown.js.map +1 -0
- package/decorators/part.d.ts +7 -0
- package/decorators/part.d.ts.map +1 -0
- package/decorators/part.js +8 -0
- package/decorators/part.js.map +1 -0
- package/decorators/styles.d.ts +3 -0
- package/decorators/styles.d.ts.map +1 -0
- package/decorators/styles.js +8 -0
- package/decorators/styles.js.map +1 -0
- package/details.d.ts +8 -1
- package/details.d.ts.map +1 -1
- package/details.js +4 -1
- package/details.js.map +1 -1
- package/dialog.d.ts +8 -1
- package/dialog.d.ts.map +1 -1
- package/dialog.js +4 -1
- package/dialog.js.map +1 -1
- package/divider.d.ts +8 -1
- package/divider.d.ts.map +1 -1
- package/divider.js +4 -1
- package/divider.js.map +1 -1
- package/dragbox.d.ts +8 -1
- package/dragbox.d.ts.map +1 -1
- package/dragbox.js +4 -1
- package/dragbox.js.map +1 -1
- package/flex-flow.d.ts +8 -1
- package/flex-flow.d.ts.map +1 -1
- package/flex-flow.js +4 -1
- package/flex-flow.js.map +1 -1
- package/form.d.ts +8 -1
- package/form.d.ts.map +1 -1
- package/form.js +4 -1
- package/form.js.map +1 -1
- package/grid-flow.d.ts +9 -0
- package/grid-flow.d.ts.map +1 -0
- package/grid-flow.js +5 -0
- package/grid-flow.js.map +1 -0
- package/index.d.ts +32 -3
- package/index.d.ts.map +1 -1
- package/index.js +32 -3
- package/index.js.map +1 -1
- package/input.d.ts +8 -1
- package/input.d.ts.map +1 -1
- package/input.js +4 -1
- package/input.js.map +1 -1
- package/label-input.d.ts +8 -1
- package/label-input.d.ts.map +1 -1
- package/label-input.js +4 -1
- package/label-input.js.map +1 -1
- package/layout.d.ts +9 -0
- package/layout.d.ts.map +1 -0
- package/layout.js +5 -0
- package/layout.js.map +1 -0
- package/lib/css.d.ts +13 -0
- package/lib/css.d.ts.map +1 -0
- package/lib/css.js +29 -0
- package/lib/css.js.map +1 -0
- package/lib/directives.d.ts +16 -20
- package/lib/directives.d.ts.map +1 -1
- package/lib/directives.js +33 -31
- package/lib/directives.js.map +1 -1
- package/lib/event-coll.d.ts +13 -0
- package/lib/event-coll.d.ts.map +1 -0
- package/lib/event-coll.js +45 -0
- package/lib/event-coll.js.map +1 -0
- package/lib/{templates.d.ts → icons.d.ts} +1 -17
- package/lib/icons.d.ts.map +1 -0
- package/lib/icons.js +73 -0
- package/lib/icons.js.map +1 -0
- package/lib/jsx.d.ts +4 -0
- package/lib/jsx.d.ts.map +1 -0
- package/lib/jsx.js +52 -0
- package/lib/jsx.js.map +1 -0
- package/lib/route-tree.d.ts +5 -5
- package/lib/route-tree.js +5 -5
- package/lib/route-tree.js.map +1 -1
- package/lib/utils.d.ts +6 -46
- package/lib/utils.d.ts.map +1 -1
- package/lib/utils.js +25 -110
- package/lib/utils.js.map +1 -1
- package/link.d.ts +9 -0
- package/link.d.ts.map +1 -0
- package/link.js +5 -0
- package/link.js.map +1 -0
- package/overbreath.d.ts +8 -1
- package/overbreath.d.ts.map +1 -1
- package/overbreath.js +4 -1
- package/overbreath.js.map +1 -1
- package/package.json +18 -23
- package/progress.d.ts +8 -1
- package/progress.d.ts.map +1 -1
- package/progress.js +4 -1
- package/progress.js.map +1 -1
- package/proto/godown-config.d.ts +41 -0
- package/proto/godown-config.d.ts.map +1 -0
- package/proto/godown-config.js +27 -0
- package/proto/godown-config.js.map +1 -0
- package/{godown-element.d.ts → proto/godown-element.d.ts} +48 -16
- package/proto/godown-element.d.ts.map +1 -0
- package/{godown-element.js → proto/godown-element.js} +82 -26
- package/proto/godown-element.js.map +1 -0
- package/proto/super-a.d.ts +30 -0
- package/proto/super-a.d.ts.map +1 -0
- package/proto/super-a.js +141 -0
- package/proto/super-a.js.map +1 -0
- package/proto/super-input.d.ts +44 -0
- package/proto/super-input.d.ts.map +1 -0
- package/proto/super-input.js +119 -0
- package/proto/super-input.js.map +1 -0
- package/proto/super-openable.d.ts +23 -0
- package/proto/super-openable.d.ts.map +1 -0
- package/proto/super-openable.js +43 -0
- package/proto/super-openable.js.map +1 -0
- package/range-input.d.ts +9 -0
- package/range-input.d.ts.map +1 -0
- package/range-input.js +5 -0
- package/range-input.js.map +1 -0
- package/react/create.d.ts.map +1 -1
- package/react/create.js +4 -1
- package/react/create.js.map +1 -1
- package/react/index.d.ts +64 -34
- package/react/index.d.ts.map +1 -1
- package/react/index.js +78 -51
- package/react/index.js.map +1 -1
- package/rotate.d.ts +9 -0
- package/rotate.d.ts.map +1 -0
- package/rotate.js +5 -0
- package/rotate.js.map +1 -0
- package/router-link.d.ts +9 -0
- package/router-link.d.ts.map +1 -0
- package/router-link.js +5 -0
- package/router-link.js.map +1 -0
- package/router.d.ts +8 -1
- package/router.d.ts.map +1 -1
- package/router.js +4 -1
- package/router.js.map +1 -1
- package/search-input.d.ts +8 -1
- package/search-input.d.ts.map +1 -1
- package/search-input.js +4 -1
- package/search-input.js.map +1 -1
- package/select-input.d.ts +8 -1
- package/select-input.d.ts.map +1 -1
- package/select-input.js +4 -1
- package/select-input.js.map +1 -1
- package/skeleton.d.ts +8 -1
- package/skeleton.d.ts.map +1 -1
- package/skeleton.js +4 -1
- package/skeleton.js.map +1 -1
- package/split-input.d.ts +8 -1
- package/split-input.d.ts.map +1 -1
- package/split-input.js +4 -1
- package/split-input.js.map +1 -1
- package/styles/colors/presets.d.ts +13 -0
- package/styles/colors/presets.d.ts.map +1 -0
- package/styles/colors/presets.js +6 -0
- package/styles/colors/presets.js.map +1 -0
- package/styles/colors/presetsRGB.d.ts +16 -0
- package/styles/colors/presetsRGB.d.ts.map +1 -0
- package/styles/colors/presetsRGB.js +134 -0
- package/styles/colors/presetsRGB.js.map +1 -0
- package/styles/global.d.ts +18 -0
- package/styles/global.d.ts.map +1 -0
- package/styles/global.js +78 -0
- package/styles/global.js.map +1 -0
- package/styles/inputStyle.d.ts +3 -0
- package/styles/inputStyle.d.ts.map +1 -0
- package/styles/inputStyle.js +59 -0
- package/styles/inputStyle.js.map +1 -0
- package/switch-input.d.ts +8 -1
- package/switch-input.d.ts.map +1 -1
- package/switch-input.js +4 -1
- package/switch-input.js.map +1 -1
- package/text.d.ts +8 -1
- package/text.d.ts.map +1 -1
- package/text.js +4 -1
- package/text.js.map +1 -1
- package/time.d.ts +8 -1
- package/time.d.ts.map +1 -1
- package/time.js +4 -1
- package/time.js.map +1 -1
- package/tooltip.d.ts +8 -1
- package/tooltip.d.ts.map +1 -1
- package/tooltip.js +4 -1
- package/tooltip.js.map +1 -1
- package/typewriter.d.ts +8 -1
- package/typewriter.d.ts.map +1 -1
- package/typewriter.js +4 -1
- package/typewriter.js.map +1 -1
- package/web-components/alert/alert.d.ts +2 -10
- package/web-components/alert/alert.d.ts.map +1 -1
- package/web-components/alert/alert.js +93 -91
- package/web-components/alert/alert.js.map +1 -1
- package/web-components/avatar/avatar-group.d.ts +21 -0
- package/web-components/avatar/avatar-group.d.ts.map +1 -0
- package/web-components/avatar/avatar-group.js +86 -0
- package/web-components/avatar/avatar-group.js.map +1 -0
- package/web-components/avatar/avatar.d.ts +5 -18
- package/web-components/avatar/avatar.d.ts.map +1 -1
- package/web-components/avatar/avatar.js +70 -85
- package/web-components/avatar/avatar.js.map +1 -1
- package/web-components/button/button.d.ts +10 -43
- package/web-components/button/button.d.ts.map +1 -1
- package/web-components/button/button.js +183 -226
- package/web-components/button/button.js.map +1 -1
- package/web-components/card/card.d.ts +2 -27
- package/web-components/card/card.d.ts.map +1 -1
- package/web-components/card/card.js +57 -132
- package/web-components/card/card.js.map +1 -1
- package/web-components/carousel/carousel.d.ts +5 -16
- package/web-components/carousel/carousel.d.ts.map +1 -1
- package/web-components/carousel/carousel.js +102 -106
- package/web-components/carousel/carousel.js.map +1 -1
- package/web-components/details/details.d.ts +4 -15
- package/web-components/details/details.d.ts.map +1 -1
- package/web-components/details/details.js +91 -97
- package/web-components/details/details.js.map +1 -1
- package/web-components/dialog/dialog.d.ts +6 -17
- package/web-components/dialog/dialog.d.ts.map +1 -1
- package/web-components/dialog/dialog.js +87 -137
- package/web-components/dialog/dialog.js.map +1 -1
- package/web-components/divider/divider.d.ts +13 -0
- package/web-components/divider/divider.d.ts.map +1 -0
- package/web-components/divider/divider.js +95 -0
- package/web-components/divider/divider.js.map +1 -0
- package/web-components/form/form.d.ts +15 -22
- package/web-components/form/form.d.ts.map +1 -1
- package/web-components/form/form.js +47 -117
- package/web-components/form/form.js.map +1 -1
- package/web-components/input/input.d.ts +5 -18
- package/web-components/input/input.d.ts.map +1 -1
- package/web-components/input/input.js +74 -169
- package/web-components/input/input.js.map +1 -1
- package/web-components/input/label-input.d.ts +5 -19
- package/web-components/input/label-input.d.ts.map +1 -1
- package/web-components/input/label-input.js +74 -141
- package/web-components/input/label-input.js.map +1 -1
- package/web-components/input/range-input.d.ts +53 -0
- package/web-components/input/range-input.d.ts.map +1 -0
- package/web-components/input/range-input.js +316 -0
- package/web-components/input/range-input.js.map +1 -0
- package/web-components/input/search-input.d.ts +4 -12
- package/web-components/input/search-input.d.ts.map +1 -1
- package/web-components/input/search-input.js +118 -113
- package/web-components/input/search-input.js.map +1 -1
- package/web-components/input/select-input.d.ts +17 -32
- package/web-components/input/select-input.d.ts.map +1 -1
- package/web-components/input/select-input.js +154 -286
- package/web-components/input/select-input.js.map +1 -1
- package/web-components/input/split-input.d.ts +8 -15
- package/web-components/input/split-input.d.ts.map +1 -1
- package/web-components/input/split-input.js +82 -72
- package/web-components/input/split-input.js.map +1 -1
- package/web-components/input/switch-input.d.ts +8 -17
- package/web-components/input/switch-input.d.ts.map +1 -1
- package/web-components/input/switch-input.js +122 -158
- package/web-components/input/switch-input.js.map +1 -1
- package/web-components/layout/flex-flow.d.ts +11 -19
- package/web-components/layout/flex-flow.d.ts.map +1 -1
- package/web-components/layout/flex-flow.js +57 -35
- package/web-components/layout/flex-flow.js.map +1 -1
- package/web-components/layout/grid-flow.d.ts +14 -0
- package/web-components/layout/grid-flow.d.ts.map +1 -0
- package/web-components/layout/grid-flow.js +56 -0
- package/web-components/layout/grid-flow.js.map +1 -0
- package/web-components/layout/layout.d.ts +18 -0
- package/web-components/layout/layout.d.ts.map +1 -0
- package/web-components/layout/layout.js +76 -0
- package/web-components/layout/layout.js.map +1 -0
- package/web-components/link/link.d.ts +10 -0
- package/web-components/link/link.d.ts.map +1 -0
- package/web-components/link/link.js +17 -0
- package/web-components/link/link.js.map +1 -0
- package/web-components/link/router-link.d.ts +19 -0
- package/web-components/link/router-link.d.ts.map +1 -0
- package/web-components/link/router-link.js +60 -0
- package/web-components/link/router-link.js.map +1 -0
- package/web-components/progress/progress.d.ts +2 -12
- package/web-components/progress/progress.d.ts.map +1 -1
- package/web-components/progress/progress.js +52 -48
- package/web-components/progress/progress.js.map +1 -1
- package/web-components/router/router.d.ts +15 -21
- package/web-components/router/router.d.ts.map +1 -1
- package/web-components/router/router.js +35 -37
- package/web-components/router/router.js.map +1 -1
- package/web-components/skeleton/skeleton.d.ts +5 -12
- package/web-components/skeleton/skeleton.d.ts.map +1 -1
- package/web-components/skeleton/skeleton.js +90 -98
- package/web-components/skeleton/skeleton.js.map +1 -1
- package/web-components/text/overbreath.d.ts +15 -20
- package/web-components/text/overbreath.d.ts.map +1 -1
- package/web-components/text/overbreath.js +108 -202
- package/web-components/text/overbreath.js.map +1 -1
- package/web-components/text/text.d.ts +5 -18
- package/web-components/text/text.d.ts.map +1 -1
- package/web-components/text/text.js +70 -80
- package/web-components/text/text.js.map +1 -1
- package/web-components/text/time.d.ts +5 -14
- package/web-components/text/time.d.ts.map +1 -1
- package/web-components/text/time.js +32 -31
- package/web-components/text/time.js.map +1 -1
- package/web-components/text/typewriter.d.ts +3 -11
- package/web-components/text/typewriter.d.ts.map +1 -1
- package/web-components/text/typewriter.js +42 -40
- package/web-components/text/typewriter.js.map +1 -1
- package/web-components/tooltip/tooltip.d.ts +21 -17
- package/web-components/tooltip/tooltip.d.ts.map +1 -1
- package/web-components/tooltip/tooltip.js +98 -60
- package/web-components/tooltip/tooltip.js.map +1 -1
- package/web-components/wrapper/dragbox.d.ts +5 -10
- package/web-components/wrapper/dragbox.d.ts.map +1 -1
- package/web-components/wrapper/dragbox.js +40 -31
- package/web-components/wrapper/dragbox.js.map +1 -1
- package/web-components/wrapper/rotate.d.ts +30 -0
- package/web-components/wrapper/rotate.d.ts.map +1 -0
- package/web-components/wrapper/rotate.js +92 -0
- package/web-components/wrapper/rotate.js.map +1 -0
- package/.deps.js.map +0 -1
- package/a.d.ts +0 -2
- package/a.d.ts.map +0 -1
- package/a.js +0 -2
- package/a.js.map +0 -1
- package/clip.d.ts +0 -2
- package/clip.d.ts.map +0 -1
- package/clip.js +0 -2
- package/clip.js.map +0 -1
- package/decorators/define.d.ts +0 -7
- package/decorators/define.d.ts.map +0 -1
- package/decorators/define.js +0 -11
- package/decorators/define.js.map +0 -1
- package/details-group.d.ts +0 -2
- package/details-group.d.ts.map +0 -1
- package/details-group.js +0 -2
- package/details-group.js.map +0 -1
- package/godown-element.d.ts.map +0 -1
- package/godown-element.js.map +0 -1
- package/lib/event-collection.d.ts +0 -14
- package/lib/event-collection.d.ts.map +0 -1
- package/lib/event-collection.js +0 -71
- package/lib/event-collection.js.map +0 -1
- package/lib/templates.d.ts.map +0 -1
- package/lib/templates.js +0 -76
- package/lib/templates.js.map +0 -1
- package/naming.d.ts +0 -91
- package/naming.d.ts.map +0 -1
- package/naming.js +0 -67
- package/naming.js.map +0 -1
- package/nav-layout.d.ts +0 -2
- package/nav-layout.d.ts.map +0 -1
- package/nav-layout.js +0 -2
- package/nav-layout.js.map +0 -1
- package/open-offset.d.ts +0 -2
- package/open-offset.d.ts.map +0 -1
- package/open-offset.js +0 -2
- package/open-offset.js.map +0 -1
- package/router-a.d.ts +0 -2
- package/router-a.d.ts.map +0 -1
- package/router-a.js +0 -2
- package/router-a.js.map +0 -1
- package/supers/anchor.d.ts +0 -26
- package/supers/anchor.d.ts.map +0 -1
- package/supers/anchor.js +0 -124
- package/supers/anchor.js.map +0 -1
- package/supers/input.d.ts +0 -28
- package/supers/input.d.ts.map +0 -1
- package/supers/input.js +0 -117
- package/supers/input.js.map +0 -1
- package/supers/openable.d.ts +0 -38
- package/supers/openable.d.ts.map +0 -1
- package/supers/openable.js +0 -77
- package/supers/openable.js.map +0 -1
- package/supers/root.d.ts +0 -18
- package/supers/root.d.ts.map +0 -1
- package/supers/root.js +0 -76
- package/supers/root.js.map +0 -1
- package/tabs.d.ts +0 -2
- package/tabs.d.ts.map +0 -1
- package/tabs.js +0 -2
- package/tabs.js.map +0 -1
- package/web-components/a/a.d.ts +0 -16
- package/web-components/a/a.d.ts.map +0 -1
- package/web-components/a/a.js +0 -17
- package/web-components/a/a.js.map +0 -1
- package/web-components/group/avatar-group.d.ts +0 -29
- package/web-components/group/avatar-group.d.ts.map +0 -1
- package/web-components/group/avatar-group.js +0 -88
- package/web-components/group/avatar-group.js.map +0 -1
- package/web-components/group/details-group.d.ts +0 -28
- package/web-components/group/details-group.d.ts.map +0 -1
- package/web-components/group/details-group.js +0 -59
- package/web-components/group/details-group.js.map +0 -1
- package/web-components/index.d.ts +0 -35
- package/web-components/index.d.ts.map +0 -1
- package/web-components/index.js +0 -35
- package/web-components/index.js.map +0 -1
- package/web-components/layout/divider.d.ts +0 -22
- package/web-components/layout/divider.d.ts.map +0 -1
- package/web-components/layout/divider.js +0 -85
- package/web-components/layout/divider.js.map +0 -1
- package/web-components/layout/nav-layout.d.ts +0 -38
- package/web-components/layout/nav-layout.d.ts.map +0 -1
- package/web-components/layout/nav-layout.js +0 -69
- package/web-components/layout/nav-layout.js.map +0 -1
- package/web-components/offset/open-offset.d.ts +0 -27
- package/web-components/offset/open-offset.d.ts.map +0 -1
- package/web-components/offset/open-offset.js +0 -130
- package/web-components/offset/open-offset.js.map +0 -1
- package/web-components/router/router-a.d.ts +0 -25
- package/web-components/router/router-a.d.ts.map +0 -1
- package/web-components/router/router-a.js +0 -70
- package/web-components/router/router-a.js.map +0 -1
- package/web-components/tabs/tabs.d.ts +0 -52
- package/web-components/tabs/tabs.d.ts.map +0 -1
- package/web-components/tabs/tabs.js +0 -165
- package/web-components/tabs/tabs.js.map +0 -1
- package/web-components/text/clip.d.ts +0 -22
- package/web-components/text/clip.d.ts.map +0 -1
- package/web-components/text/clip.js +0 -45
- package/web-components/text/clip.js.map +0 -1
- package/web-components/wrapper/wrapper.d.ts +0 -27
- package/web-components/wrapper/wrapper.d.ts.map +0 -1
- package/web-components/wrapper/wrapper.js +0 -95
- package/web-components/wrapper/wrapper.js.map +0 -1
- package/wrapper.d.ts +0 -2
- package/wrapper.d.ts.map +0 -1
- package/wrapper.js +0 -2
- package/wrapper.js.map +0 -1
@@ -1,14 +1,16 @@
|
|
1
1
|
import { __decorate } from "tslib";
|
2
|
-
import { css, html, property
|
3
|
-
import {
|
4
|
-
import {
|
5
|
-
import
|
6
|
-
import
|
7
|
-
|
2
|
+
import { css, html, property } from "../../_deps.js";
|
3
|
+
import { godown } from "../../decorators/godown.js";
|
4
|
+
import { styles } from "../../decorators/styles.js";
|
5
|
+
import { htmlSlot } from "../../lib/directives.js";
|
6
|
+
import GodownSuperOpenable from "../../proto/super-openable.js";
|
7
|
+
import { createScope, cssGlobalVars } from "../../styles/global.js";
|
8
|
+
const protoName = "dialog";
|
9
|
+
const cssScope = createScope(protoName);
|
8
10
|
/**
|
9
11
|
* {@linkcode Dialog} similar to dialog.
|
10
12
|
*/
|
11
|
-
let Dialog = class Dialog extends
|
13
|
+
let Dialog = class Dialog extends GodownSuperOpenable {
|
12
14
|
constructor() {
|
13
15
|
super(...arguments);
|
14
16
|
this.direction = "center";
|
@@ -16,51 +18,32 @@ let Dialog = class Dialog extends GodownOpenable {
|
|
16
18
|
* Enable modal.
|
17
19
|
*/
|
18
20
|
this.modal = false;
|
19
|
-
/**
|
20
|
-
* Enable scale.
|
21
|
-
*/
|
22
|
-
this.scale = false;
|
23
|
-
/**
|
24
|
-
* Scale gap.
|
25
|
-
*/
|
26
|
-
this.gap = 0.2;
|
27
21
|
/**
|
28
22
|
* Exit key, which can be multiple.
|
29
23
|
*/
|
30
24
|
this.key = "Escape";
|
31
25
|
}
|
32
26
|
render() {
|
33
|
-
return html `<div
|
27
|
+
return html `<div part="root" class="${this.direction}">${htmlSlot()}</div>`;
|
34
28
|
}
|
35
29
|
connectedCallback() {
|
36
30
|
super.connectedCallback();
|
37
31
|
this.addEvent(this, "submit", this._handelSubmit);
|
38
|
-
if (this.scale && this.direction === "center") {
|
39
|
-
this.addEvent(this, "wheel", this._handleWheel);
|
40
|
-
}
|
41
32
|
if (this.key) {
|
42
33
|
this.addEvent(document, "keydown", this._handleKeydown.bind(this));
|
43
34
|
}
|
44
|
-
if (this.open) {
|
45
|
-
this.show();
|
46
|
-
}
|
47
35
|
}
|
48
36
|
showModal() {
|
49
37
|
this.modal = true;
|
50
38
|
this.show();
|
51
39
|
}
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
scale -= this.gap;
|
56
|
-
}
|
57
|
-
else {
|
58
|
-
scale += this.gap;
|
40
|
+
_handelWheel(e) {
|
41
|
+
if (this.modal) {
|
42
|
+
e.preventDefault();
|
59
43
|
}
|
60
|
-
this._div.style.setProperty("--s", `${scale}`);
|
61
44
|
}
|
62
45
|
_handleKeydown(e) {
|
63
|
-
const keys = this.key.split(/[
|
46
|
+
const keys = this.key.split(/[\s;]/);
|
64
47
|
if (keys.includes(e.key) || keys.includes(e.code)) {
|
65
48
|
this.close();
|
66
49
|
}
|
@@ -71,122 +54,89 @@ let Dialog = class Dialog extends GodownOpenable {
|
|
71
54
|
}
|
72
55
|
}
|
73
56
|
};
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
:
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
transition: all 0.3s;
|
98
|
-
display: flex;
|
99
|
-
visibility: hidden;
|
100
|
-
background: var(${cssvar}--background);
|
101
|
-
pointer-events: none;
|
102
|
-
}
|
103
|
-
|
104
|
-
:host([open]) {
|
105
|
-
visibility: visible;
|
106
|
-
}
|
107
|
-
|
108
|
-
:host([open][modal]) {
|
109
|
-
pointer-events: all;
|
110
|
-
backdrop-filter: blur(0.25px);
|
111
|
-
background: var(${cssvar}--background-modal);
|
112
|
-
}
|
57
|
+
__decorate([
|
58
|
+
property({ type: Boolean, reflect: true })
|
59
|
+
], Dialog.prototype, "modal", void 0);
|
60
|
+
__decorate([
|
61
|
+
property({ type: String })
|
62
|
+
], Dialog.prototype, "key", void 0);
|
63
|
+
Dialog = __decorate([
|
64
|
+
godown(protoName),
|
65
|
+
styles([
|
66
|
+
css `
|
67
|
+
:host {
|
68
|
+
--${cssScope}--background: none;
|
69
|
+
--${cssScope}--background-modal: rgb(var(--${cssGlobalVars.backgroundRGB}) / 15%);
|
70
|
+
background: var(--${cssScope}--background);
|
71
|
+
height: 100%;
|
72
|
+
width: 100%;
|
73
|
+
position: fixed;
|
74
|
+
inset:0;
|
75
|
+
display: flex;
|
76
|
+
visibility: hidden;
|
77
|
+
transition: all 0.3s;
|
78
|
+
pointer-events: none;
|
79
|
+
}
|
113
80
|
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
}
|
81
|
+
:host([open]) {
|
82
|
+
visibility: visible;
|
83
|
+
}
|
118
84
|
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
transition: inherit;
|
124
|
-
transform: scale(var(--s));
|
125
|
-
}
|
85
|
+
:host([open][modal]) {
|
86
|
+
pointer-events: all;
|
87
|
+
background: var(--${cssScope}--background-modal);
|
88
|
+
}
|
126
89
|
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
height: fit-content;
|
131
|
-
margin: auto;
|
132
|
-
opacity: 0;
|
133
|
-
transition: inherit;
|
134
|
-
pointer-events: all;
|
135
|
-
}
|
90
|
+
:host([open]) div {
|
91
|
+
opacity: 1;
|
92
|
+
}
|
136
93
|
|
137
|
-
|
138
|
-
|
139
|
-
|
94
|
+
div {
|
95
|
+
height: 100%;
|
96
|
+
width: 100%;
|
97
|
+
display: flex;
|
98
|
+
opacity: 0;
|
99
|
+
position: relative;
|
100
|
+
}
|
140
101
|
|
141
|
-
|
142
|
-
|
143
|
-
|
102
|
+
slot {
|
103
|
+
display: block;
|
104
|
+
width: -moz-fit-content;
|
105
|
+
width: fit-content;
|
106
|
+
height: -moz-fit-content;
|
107
|
+
height: fit-content;
|
108
|
+
margin: auto;
|
109
|
+
transition: inherit;
|
110
|
+
pointer-events: all;
|
111
|
+
position: absolute;
|
112
|
+
}
|
144
113
|
|
145
|
-
|
146
|
-
|
147
|
-
|
114
|
+
[class^="top"] slot {
|
115
|
+
top: 0;
|
116
|
+
}
|
148
117
|
|
149
|
-
|
150
|
-
|
151
|
-
|
118
|
+
[class^="bottom"] slot {
|
119
|
+
bottom: 0;
|
120
|
+
}
|
152
121
|
|
153
|
-
|
154
|
-
|
155
|
-
|
122
|
+
[class$="right"] slot {
|
123
|
+
right: 0%;
|
124
|
+
}
|
156
125
|
|
157
|
-
|
158
|
-
|
159
|
-
|
126
|
+
[class$="left"] slot {
|
127
|
+
left: 0%;
|
128
|
+
}
|
160
129
|
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
`,
|
172
|
-
];
|
173
|
-
__decorate([
|
174
|
-
property({ type: Boolean, reflect: true })
|
175
|
-
], Dialog.prototype, "modal", void 0);
|
176
|
-
__decorate([
|
177
|
-
property({ type: Boolean })
|
178
|
-
], Dialog.prototype, "scale", void 0);
|
179
|
-
__decorate([
|
180
|
-
property({ type: Number })
|
181
|
-
], Dialog.prototype, "gap", void 0);
|
182
|
-
__decorate([
|
183
|
-
property({ type: String })
|
184
|
-
], Dialog.prototype, "key", void 0);
|
185
|
-
__decorate([
|
186
|
-
query("div")
|
187
|
-
], Dialog.prototype, "_div", void 0);
|
188
|
-
Dialog = __decorate([
|
189
|
-
define(defineName)
|
130
|
+
div[class$="center"],
|
131
|
+
.top,
|
132
|
+
.left,
|
133
|
+
.right,
|
134
|
+
.bottom {
|
135
|
+
align-items: center;
|
136
|
+
justify-content: center;
|
137
|
+
}
|
138
|
+
`,
|
139
|
+
])
|
190
140
|
], Dialog);
|
191
141
|
export { Dialog };
|
192
142
|
export default Dialog;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"dialog.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/dialog/dialog.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,
|
1
|
+
{"version":3,"file":"dialog.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/dialog/dialog.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,mBAAwC,MAAM,+BAA+B,CAAC;AACrF,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEpE,MAAM,SAAS,GAAG,QAAQ,CAAC;AAC3B,MAAM,QAAQ,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC;AAExC;;GAEG;AA6EI,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,mBAAmB;IAAxC;;QACL,cAAS,GAAe,QAAQ,CAAC;QACjC;;WAEG;QACyC,UAAK,GAAG,KAAK,CAAC;QAS1D;;WAEG;QACyB,QAAG,GAAG,QAAQ,CAAC;IAqC7C,CAAC;IAnCW,MAAM;QACd,OAAO,IAAI,CAAA,2BAA2B,IAAI,CAAC,SAAS,KAAK,QAAQ,EAAE,QAAQ,CAAC;IAC9E,CAAC;IAED,iBAAiB;QACf,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;QAClD,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;YACb,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,SAAS,EAAE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QACrE,CAAC;IACH,CAAC;IAED,SAAS;QACP,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,IAAI,EAAE,CAAC;IACd,CAAC;IAES,YAAY,CAAC,CAAa;QAClC,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,CAAC,CAAC,cAAc,EAAE,CAAC;QACrB,CAAC;IACH,CAAC;IAES,cAAc,CAAC,CAAgB;QACvC,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACrC,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;YAClD,IAAI,CAAC,KAAK,EAAE,CAAC;QACf,CAAC;IACH,CAAC;IAES,aAAa,CAAC,CAAc;QACpC,IAAK,CAAC,CAAC,MAA0B,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;YACtD,IAAI,CAAC,KAAK,EAAE,CAAC;QACf,CAAC;IACH,CAAC;CACF,CAAA;AAjD6C;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;qCAAe;AAY9B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;mCAAgB;AAjBhC,MAAM;IA5ElB,MAAM,CAAC,SAAS,CAAC;IACjB,MAAM,CAAC;QACN,GAAG,CAAA;;UAEK,QAAQ;UACR,QAAQ,iCAAiC,aAAa,CAAC,aAAa;0BACpD,QAAQ;;;;;;;;;;;;;;;;;0BAiBR,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmD/B;KACF,CAAC;GACW,MAAM,CAsDlB;;AAED,eAAe,MAAM,CAAC","sourcesContent":["import { css, html, property } from \"../../_deps.js\";\nimport { godown } from \"../../decorators/godown.js\";\nimport { styles } from \"../../decorators/styles.js\";\nimport { htmlSlot } from \"../../lib/directives.js\";\nimport GodownSuperOpenable, { type Direction9 } from \"../../proto/super-openable.js\";\nimport { createScope, cssGlobalVars } from \"../../styles/global.js\";\n\nconst protoName = \"dialog\";\nconst cssScope = createScope(protoName);\n\n/**\n * {@linkcode Dialog} similar to dialog.\n */\n@godown(protoName)\n@styles([\n css`\n :host {\n --${cssScope}--background: none;\n --${cssScope}--background-modal: rgb(var(--${cssGlobalVars.backgroundRGB}) / 15%);\n background: var(--${cssScope}--background);\n height: 100%;\n width: 100%;\n position: fixed;\n inset:0;\n display: flex;\n visibility: hidden;\n transition: all 0.3s;\n pointer-events: none;\n }\n\n :host([open]) {\n visibility: visible;\n }\n\n :host([open][modal]) {\n pointer-events: all;\n background: var(--${cssScope}--background-modal);\n }\n\n :host([open]) div {\n opacity: 1;\n }\n\n div {\n height: 100%;\n width: 100%;\n display: flex;\n opacity: 0;\n position: relative;\n }\n\n slot {\n display: block;\n width: -moz-fit-content;\n width: fit-content;\n height: -moz-fit-content;\n height: fit-content;\n margin: auto;\n transition: inherit;\n pointer-events: all;\n position: absolute;\n }\n\n [class^=\"top\"] slot {\n top: 0;\n }\n\n [class^=\"bottom\"] slot {\n bottom: 0;\n }\n\n [class$=\"right\"] slot {\n right: 0%;\n }\n\n [class$=\"left\"] slot {\n left: 0%;\n }\n\n div[class$=\"center\"],\n .top,\n .left,\n .right,\n .bottom {\n align-items: center;\n justify-content: center;\n }\n `,\n])\nexport class Dialog extends GodownSuperOpenable {\n direction: Direction9 = \"center\";\n /**\n * Enable modal.\n */\n @property({ type: Boolean, reflect: true }) modal = false;\n /**\n * @deprecated\n */\n scale: boolean;\n /**\n * @deprecated\n */\n gap: number;\n /**\n * Exit key, which can be multiple.\n */\n @property({ type: String }) key = \"Escape\";\n\n protected render() {\n return html`<div part=\"root\" class=\"${this.direction}\">${htmlSlot()}</div>`;\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.addEvent(this, \"submit\", this._handelSubmit);\n if (this.key) {\n this.addEvent(document, \"keydown\", this._handleKeydown.bind(this));\n }\n }\n\n showModal() {\n this.modal = true;\n this.show();\n }\n\n protected _handelWheel(e: WheelEvent) {\n if (this.modal) {\n e.preventDefault();\n }\n }\n\n protected _handleKeydown(e: KeyboardEvent) {\n const keys = this.key.split(/[\\s;]/);\n if (keys.includes(e.key) || keys.includes(e.code)) {\n this.close();\n }\n }\n\n protected _handelSubmit(e: SubmitEvent) {\n if ((e.target as HTMLFormElement).method === \"dialog\") {\n this.close();\n }\n }\n}\n\nexport default Dialog;\n"]}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { GodownElement } from "../../proto/godown-element.js";
|
2
|
+
/**
|
3
|
+
* {@linkcode Divider} similar to hr.
|
4
|
+
*/
|
5
|
+
export declare class Divider extends GodownElement {
|
6
|
+
/**
|
7
|
+
* Enable vertical.
|
8
|
+
*/
|
9
|
+
vertical: boolean;
|
10
|
+
protected render(): import("lit").TemplateResult<1>;
|
11
|
+
}
|
12
|
+
export default Divider;
|
13
|
+
//# sourceMappingURL=divider.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"divider.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/divider/divider.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAM9D;;GAEG;AACH,qBAyDa,OAAQ,SAAQ,aAAa;IACxC;;OAEG;IACyC,QAAQ,UAAS;IAE7D,SAAS,CAAC,MAAM;CAYjB;AAED,eAAe,OAAO,CAAC"}
|
@@ -0,0 +1,95 @@
|
|
1
|
+
import { __decorate } from "tslib";
|
2
|
+
import { css, html, property } from "../../_deps.js";
|
3
|
+
import { godown } from "../../decorators/godown.js";
|
4
|
+
import { styles } from "../../decorators/styles.js";
|
5
|
+
import { ifValue } from "../../lib/directives.js";
|
6
|
+
import { htmlSlot } from "../../lib/directives.js";
|
7
|
+
import { GodownElement } from "../../proto/godown-element.js";
|
8
|
+
import { createScope } from "../../styles/global.js";
|
9
|
+
const protoName = "divider";
|
10
|
+
const cssScope = createScope(protoName);
|
11
|
+
/**
|
12
|
+
* {@linkcode Divider} similar to hr.
|
13
|
+
*/
|
14
|
+
let Divider = class Divider extends GodownElement {
|
15
|
+
constructor() {
|
16
|
+
super(...arguments);
|
17
|
+
/**
|
18
|
+
* Enable vertical.
|
19
|
+
*/
|
20
|
+
this.vertical = false;
|
21
|
+
}
|
22
|
+
render() {
|
23
|
+
const hasElement = this.childElementCount || this.textContent;
|
24
|
+
return html `<div part="root" class="${this.vertical ? "vertical" : "horizontal"}">
|
25
|
+
${ifValue(hasElement, html `<hr part="before" class="before" />
|
26
|
+
${htmlSlot()}
|
27
|
+
<hr part="after" class="after" />`, html `<hr part="cross" />`)}
|
28
|
+
</div>`;
|
29
|
+
}
|
30
|
+
};
|
31
|
+
__decorate([
|
32
|
+
property({ type: Boolean, reflect: true })
|
33
|
+
], Divider.prototype, "vertical", void 0);
|
34
|
+
Divider = __decorate([
|
35
|
+
godown(protoName),
|
36
|
+
styles(css `
|
37
|
+
:host {
|
38
|
+
--${cssScope}--before-length: auto;
|
39
|
+
--${cssScope}--after-length: auto;
|
40
|
+
--${cssScope}--breadth: .05em;
|
41
|
+
display: block;
|
42
|
+
background: none;
|
43
|
+
margin: auto;
|
44
|
+
}
|
45
|
+
:host([vertical]) {
|
46
|
+
width: -moz-fit-content;
|
47
|
+
width: fit-content;
|
48
|
+
height: 100%;
|
49
|
+
}
|
50
|
+
div {
|
51
|
+
display: flex;
|
52
|
+
align-items: center;
|
53
|
+
border-radius: inherit;
|
54
|
+
width: 100%;
|
55
|
+
}
|
56
|
+
|
57
|
+
hr {
|
58
|
+
border-radius: inherit;
|
59
|
+
margin: 0;
|
60
|
+
border: 0;
|
61
|
+
flex: 1;
|
62
|
+
background: currentColor;
|
63
|
+
}
|
64
|
+
.horizontal {
|
65
|
+
display: flex;
|
66
|
+
}
|
67
|
+
|
68
|
+
.vertical {
|
69
|
+
display: flex;
|
70
|
+
height: 100%;
|
71
|
+
flex-direction: column;
|
72
|
+
}
|
73
|
+
.horizontal hr {
|
74
|
+
height: var(--${cssScope}--breadth);
|
75
|
+
}
|
76
|
+
.horizontal .before {
|
77
|
+
max-width: var(--${cssScope}--before-length);
|
78
|
+
}
|
79
|
+
.horizontal .after {
|
80
|
+
max-width: var(--${cssScope}--after-length);
|
81
|
+
}
|
82
|
+
.vertical hr {
|
83
|
+
width: var(--${cssScope}--breadth);
|
84
|
+
}
|
85
|
+
.vertical .before {
|
86
|
+
max-height: var(--${cssScope}--before-length);
|
87
|
+
}
|
88
|
+
.vertical .after {
|
89
|
+
max-height: var(--${cssScope}--after-length);
|
90
|
+
}
|
91
|
+
`)
|
92
|
+
], Divider);
|
93
|
+
export { Divider };
|
94
|
+
export default Divider;
|
95
|
+
//# sourceMappingURL=divider.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"divider.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/divider/divider.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD,MAAM,SAAS,GAAG,SAAS,CAAC;AAC5B,MAAM,QAAQ,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC;AAExC;;GAEG;AA0DI,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,aAAa;IAAnC;;QACL;;WAEG;QACyC,aAAQ,GAAG,KAAK,CAAC;IAc/D,CAAC;IAZW,MAAM;QACd,MAAM,UAAU,GAAG,IAAI,CAAC,iBAAiB,IAAI,IAAI,CAAC,WAAW,CAAC;QAC9D,OAAO,IAAI,CAAA,2BAA2B,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,YAAY;QAC3E,OAAO,CACP,UAAU,EACV,IAAI,CAAA;YACA,QAAQ,EAAE;4CACsB,EACpC,IAAI,CAAA,qBAAqB,CAC1B;WACI,CAAC;IACV,CAAC;CACF,CAAA;AAd6C;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCAAkB;AAJlD,OAAO;IAzDnB,MAAM,CAAC,SAAS,CAAC;IACjB,MAAM,CAAC,GAAG,CAAA;;QAEH,QAAQ;QACR,QAAQ;QACR,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAkCI,QAAQ;;;uBAGL,QAAQ;;;uBAGR,QAAQ;;;mBAGZ,QAAQ;;;wBAGH,QAAQ;;;wBAGR,QAAQ;;CAE/B,CAAC;GACW,OAAO,CAkBnB;;AAED,eAAe,OAAO,CAAC","sourcesContent":["import { css, html, property } from \"../../_deps.js\";\nimport { godown } from \"../../decorators/godown.js\";\nimport { styles } from \"../../decorators/styles.js\";\nimport { ifValue } from \"../../lib/directives.js\";\nimport { htmlSlot } from \"../../lib/directives.js\";\nimport { GodownElement } from \"../../proto/godown-element.js\";\nimport { createScope } from \"../../styles/global.js\";\n\nconst protoName = \"divider\";\nconst cssScope = createScope(protoName);\n\n/**\n * {@linkcode Divider} similar to hr.\n */\n@godown(protoName)\n@styles(css`\n :host {\n --${cssScope}--before-length: auto;\n --${cssScope}--after-length: auto;\n --${cssScope}--breadth: .05em;\n display: block;\n background: none;\n margin: auto;\n }\n :host([vertical]) {\n width: -moz-fit-content;\n width: fit-content;\n height: 100%;\n }\n div {\n display: flex;\n align-items: center;\n border-radius: inherit;\n width: 100%;\n }\n\n hr {\n border-radius: inherit;\n margin: 0;\n border: 0;\n flex: 1;\n background: currentColor;\n }\n .horizontal {\n display: flex;\n }\n\n .vertical {\n display: flex;\n height: 100%;\n flex-direction: column;\n }\n .horizontal hr {\n height: var(--${cssScope}--breadth);\n }\n .horizontal .before {\n max-width: var(--${cssScope}--before-length);\n }\n .horizontal .after {\n max-width: var(--${cssScope}--after-length);\n }\n .vertical hr {\n width: var(--${cssScope}--breadth);\n }\n .vertical .before {\n max-height: var(--${cssScope}--before-length);\n }\n .vertical .after {\n max-height: var(--${cssScope}--after-length);\n }\n`)\nexport class Divider extends GodownElement {\n /**\n * Enable vertical.\n */\n @property({ type: Boolean, reflect: true }) vertical = false;\n\n protected render() {\n const hasElement = this.childElementCount || this.textContent;\n return html`<div part=\"root\" class=\"${this.vertical ? \"vertical\" : \"horizontal\"}\">\n ${ifValue(\n hasElement,\n html`<hr part=\"before\" class=\"before\" />\n ${htmlSlot()}\n <hr part=\"after\" class=\"after\" />`,\n html`<hr part=\"cross\" />`,\n )}\n </div>`;\n }\n}\n\nexport default Divider;\n"]}
|
@@ -1,29 +1,22 @@
|
|
1
|
-
import {
|
2
|
-
import { type HTMLTemplate } from "../../lib/templates.js";
|
3
|
-
import { GodownElement } from "../../supers/root.js";
|
1
|
+
import { GodownElement } from "../../proto/godown-element.js";
|
4
2
|
/**
|
5
|
-
* {@linkcode Form}
|
3
|
+
* {@linkcode Form} Gets child element key-value object,
|
4
|
+
* which will be nested if the child element is the same as this element.
|
5
|
+
*
|
6
|
+
* @slot - Child elements.
|
6
7
|
*/
|
7
|
-
export declare class Form<T
|
8
|
+
export declare class Form<T = object> extends GodownElement {
|
8
9
|
name: string;
|
9
|
-
value: T;
|
10
|
-
nameValue: () => [string,
|
11
|
-
|
12
|
-
* Form enctype.
|
13
|
-
*/
|
14
|
-
enctype: "application/x-www-form-urlencoded" | "multipart/form-data" | "text/plain";
|
15
|
-
_form: HTMLFormElement;
|
16
|
-
static styles: CSSResultGroup;
|
17
|
-
protected render(): HTMLTemplate;
|
10
|
+
get value(): T;
|
11
|
+
nameValue: () => [string, T];
|
12
|
+
protected render(): import("lit").TemplateResult<1>;
|
18
13
|
reset(): void;
|
19
|
-
namevalue(
|
20
|
-
|
14
|
+
namevalue(): [string, T];
|
15
|
+
static buildValue(elements: (Element & {
|
16
|
+
name?: string;
|
17
|
+
value?: unknown;
|
18
|
+
namevalue?: () => [string, unknown];
|
19
|
+
})[]): Record<string, any>;
|
21
20
|
}
|
22
21
|
export default Form;
|
23
|
-
declare global {
|
24
|
-
interface HTMLElementTagNameMap {
|
25
|
-
"base-form": Form;
|
26
|
-
"g-form": Form;
|
27
|
-
}
|
28
|
-
}
|
29
22
|
//# sourceMappingURL=form.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"form.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/form/form.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"form.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/form/form.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAG9D;;;;;GAKG;AACH,qBAQa,IAAI,CAAC,CAAC,GAAG,MAAM,CAAE,SAAQ,aAAa;IACrC,IAAI,SAAM;IACtB,IAAI,KAAK,IAAI,CAAC,CAEb;IAED,SAAS,QAiBI,CAAC,MAAM,EAAE,CAAC,CAAC,CAjBG;IAE3B,SAAS,CAAC,MAAM;IAIhB,KAAK;IAWL,SAAS,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IAIxB,MAAM,CAAC,UAAU,CACf,QAAQ,EAAE,CAAC,OAAO,GAAG;QACnB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACrC,CAAC,EAAE,GACH,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;CAoBvB;AAED,eAAe,IAAI,CAAC"}
|