godown 2.5.1 → 2.6.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 +1 -1
- package/alert-item.d.ts +2 -0
- package/alert-item.d.ts.map +1 -0
- package/alert-item.js +2 -0
- package/alert-item.js.map +1 -0
- package/avatar-a.d.ts +2 -0
- package/avatar-a.d.ts.map +1 -0
- package/avatar-a.js +2 -0
- package/avatar-a.js.map +1 -0
- package/avatar-group.d.ts +2 -0
- package/avatar-group.d.ts.map +1 -0
- package/avatar-group.js +2 -0
- package/avatar-group.js.map +1 -0
- package/base-button.d.ts +2 -0
- package/base-button.d.ts.map +1 -0
- package/base-button.js +2 -0
- package/base-button.js.map +1 -0
- package/base-form.d.ts +2 -0
- package/base-form.d.ts.map +1 -0
- package/base-form.js +2 -0
- package/base-form.js.map +1 -0
- package/base-input.d.ts +2 -0
- package/base-input.d.ts.map +1 -0
- package/base-input.js +2 -0
- package/base-input.js.map +1 -0
- package/card-item.d.ts +2 -0
- package/card-item.d.ts.map +1 -0
- package/card-item.js +2 -0
- package/card-item.js.map +1 -0
- package/carousel-slider.d.ts +2 -0
- package/carousel-slider.d.ts.map +1 -0
- package/carousel-slider.js +2 -0
- package/carousel-slider.js.map +1 -0
- package/clip-text.d.ts +2 -0
- package/clip-text.d.ts.map +1 -0
- package/clip-text.js +2 -0
- package/clip-text.js.map +1 -0
- package/conf.d.ts.map +1 -1
- package/conf.js.map +1 -1
- package/deps.d.ts +4 -3
- package/deps.d.ts.map +1 -1
- package/deps.js +4 -3
- package/deps.js.map +1 -1
- package/details-group.d.ts +2 -0
- package/details-group.d.ts.map +1 -0
- package/details-group.js +2 -0
- package/details-group.js.map +1 -0
- package/divider-line.d.ts +2 -0
- package/divider-line.d.ts.map +1 -0
- package/divider-line.js +2 -0
- package/divider-line.js.map +1 -0
- package/drag-box.d.ts +2 -0
- package/drag-box.d.ts.map +1 -0
- package/drag-box.js +2 -0
- package/drag-box.js.map +1 -0
- package/flex-flow.d.ts +2 -0
- package/flex-flow.d.ts.map +1 -0
- package/flex-flow.js +2 -0
- package/flex-flow.js.map +1 -0
- package/godown-element.d.ts +2 -2
- package/godown-element.d.ts.map +1 -1
- package/godown-element.js +1 -1
- package/godown-element.js.map +1 -1
- package/index.d.ts +2 -6
- package/index.d.ts.map +1 -1
- package/index.js +2 -6
- package/index.js.map +1 -1
- package/label-input.d.ts +2 -0
- package/label-input.d.ts.map +1 -0
- package/label-input.js +2 -0
- package/label-input.js.map +1 -0
- package/lib/directives.d.ts.map +1 -1
- package/lib/directives.js.map +1 -1
- package/lib/event-collection.d.ts +1 -1
- package/lib/event-collection.d.ts.map +1 -1
- package/lib/event-collection.js.map +1 -1
- package/lib/route-tree.d.ts.map +1 -1
- package/lib/route-tree.js.map +1 -1
- package/lib/templates.d.ts.map +1 -1
- package/lib/templates.js.map +1 -1
- package/lib/utils.d.ts.map +1 -1
- package/lib/utils.js.map +1 -1
- package/link-a.d.ts +2 -0
- package/link-a.d.ts.map +1 -0
- package/link-a.js +2 -0
- package/link-a.js.map +1 -0
- package/loading-progress.d.ts +2 -0
- package/loading-progress.d.ts.map +1 -0
- package/loading-progress.js +2 -0
- package/loading-progress.js.map +1 -0
- package/nav-aside.d.ts +2 -0
- package/nav-aside.d.ts.map +1 -0
- package/nav-aside.js +2 -0
- package/nav-aside.js.map +1 -0
- package/nav-layout.d.ts +2 -0
- package/nav-layout.d.ts.map +1 -0
- package/nav-layout.js +2 -0
- package/nav-layout.js.map +1 -0
- package/open-details.d.ts +2 -0
- package/open-details.d.ts.map +1 -0
- package/open-details.js +2 -0
- package/open-details.js.map +1 -0
- package/open-dialog.d.ts +2 -0
- package/open-dialog.d.ts.map +1 -0
- package/open-dialog.js +2 -0
- package/open-dialog.js.map +1 -0
- package/open-offset.d.ts +2 -0
- package/open-offset.d.ts.map +1 -0
- package/open-offset.js +2 -0
- package/open-offset.js.map +1 -0
- package/open-tooltip.d.ts +2 -0
- package/open-tooltip.d.ts.map +1 -0
- package/open-tooltip.js +2 -0
- package/open-tooltip.js.map +1 -0
- package/overbreath-text.d.ts +2 -0
- package/overbreath-text.d.ts.map +1 -0
- package/overbreath-text.js +2 -0
- package/overbreath-text.js.map +1 -0
- package/package.json +58 -11
- package/react/create.d.ts.map +1 -1
- package/react/create.js.map +1 -1
- package/react/index.d.ts +36 -7
- package/react/index.d.ts.map +1 -1
- package/react/index.js +111 -7
- package/react/index.js.map +1 -1
- package/root.d.ts.map +1 -1
- package/root.js +3 -2
- package/root.js.map +1 -1
- package/route-view.d.ts +2 -0
- package/route-view.d.ts.map +1 -0
- package/route-view.js +2 -0
- package/route-view.js.map +1 -0
- package/scroll-x.d.ts +2 -0
- package/scroll-x.d.ts.map +1 -0
- package/scroll-x.js +2 -0
- package/scroll-x.js.map +1 -0
- package/search-input.d.ts +2 -0
- package/search-input.d.ts.map +1 -0
- package/search-input.js +2 -0
- package/search-input.js.map +1 -0
- package/select-input.d.ts +2 -0
- package/select-input.d.ts.map +1 -0
- package/select-input.js +2 -0
- package/select-input.js.map +1 -0
- package/sign-form.d.ts +2 -0
- package/sign-form.d.ts.map +1 -0
- package/sign-form.js +2 -0
- package/sign-form.js.map +1 -0
- package/skeleton-screen.d.ts +2 -0
- package/skeleton-screen.d.ts.map +1 -0
- package/skeleton-screen.js +2 -0
- package/skeleton-screen.js.map +1 -0
- package/split-input.d.ts +2 -0
- package/split-input.d.ts.map +1 -0
- package/split-input.js +2 -0
- package/split-input.js.map +1 -0
- package/super-a.d.ts +2 -0
- package/super-a.d.ts.map +1 -0
- package/super-a.js +2 -0
- package/super-a.js.map +1 -0
- package/switch-input.d.ts +2 -0
- package/switch-input.d.ts.map +1 -0
- package/switch-input.js +2 -0
- package/switch-input.js.map +1 -0
- package/tab-group.d.ts +2 -0
- package/tab-group.d.ts.map +1 -0
- package/tab-group.js +2 -0
- package/tab-group.js.map +1 -0
- package/time-bar.d.ts +2 -0
- package/time-bar.d.ts.map +1 -0
- package/time-bar.js +2 -0
- package/time-bar.js.map +1 -0
- package/typewriter-text.d.ts +2 -0
- package/typewriter-text.d.ts.map +1 -0
- package/typewriter-text.js +2 -0
- package/typewriter-text.js.map +1 -0
- package/{items → web-components/a}/avatar-a.d.ts +7 -7
- package/web-components/a/avatar-a.d.ts.map +1 -0
- package/{items → web-components/a}/avatar-a.js +18 -23
- package/web-components/a/avatar-a.js.map +1 -0
- package/{items → web-components/a}/link-a.d.ts +6 -6
- package/web-components/a/link-a.d.ts.map +1 -0
- package/{items → web-components/a}/link-a.js +16 -21
- package/web-components/a/link-a.js.map +1 -0
- package/{items → web-components/a}/super-a.d.ts +5 -5
- package/web-components/a/super-a.d.ts.map +1 -0
- package/{items → web-components/a}/super-a.js +13 -19
- package/web-components/a/super-a.js.map +1 -0
- package/{items → web-components/button}/base-button.d.ts +3 -3
- package/web-components/button/base-button.d.ts.map +1 -0
- package/{items → web-components/button}/base-button.js +13 -19
- package/web-components/button/base-button.js.map +1 -0
- package/{view/rotation-pool.d.ts → web-components/carousel/carousel-slider.d.ts} +7 -7
- package/web-components/carousel/carousel-slider.d.ts.map +1 -0
- package/{view/rotation-pool.js → web-components/carousel/carousel-slider.js} +18 -23
- package/web-components/carousel/carousel-slider.js.map +1 -0
- package/{input-form/sign-form.d.ts → web-components/form/base-form.d.ts} +9 -18
- package/web-components/form/base-form.d.ts.map +1 -0
- package/{input-form/sign-form.js → web-components/form/base-form.js} +17 -25
- package/web-components/form/base-form.js.map +1 -0
- package/web-components/form/sign-form.d.ts +19 -0
- package/web-components/form/sign-form.d.ts.map +1 -0
- package/web-components/form/sign-form.js +16 -0
- package/web-components/form/sign-form.js.map +1 -0
- package/{group → web-components/group}/avatar-group.d.ts +6 -6
- package/web-components/group/avatar-group.d.ts.map +1 -0
- package/{group → web-components/group}/avatar-group.js +11 -17
- package/web-components/group/avatar-group.js.map +1 -0
- package/{group → web-components/group}/details-group.d.ts +3 -3
- package/web-components/group/details-group.d.ts.map +1 -0
- package/{group → web-components/group}/details-group.js +5 -11
- package/web-components/group/details-group.js.map +1 -0
- package/{group → web-components/group}/tab-group.d.ts +4 -4
- package/web-components/group/tab-group.d.ts.map +1 -0
- package/{group → web-components/group}/tab-group.js +14 -20
- package/web-components/group/tab-group.js.map +1 -0
- package/web-components/index.d.ts +37 -0
- package/web-components/index.d.ts.map +1 -0
- package/web-components/index.js +38 -0
- package/web-components/index.js.map +1 -0
- package/{input-form → web-components/input}/base-input.d.ts +4 -4
- package/web-components/input/base-input.d.ts.map +1 -0
- package/{input-form → web-components/input}/base-input.js +7 -12
- package/web-components/input/base-input.js.map +1 -0
- package/{input-form/std.d.ts → web-components/input/input.d.ts} +4 -16
- package/web-components/input/input.d.ts.map +1 -0
- package/{input-form/std.js → web-components/input/input.js} +13 -40
- package/web-components/input/input.js.map +1 -0
- package/{input-form → web-components/input}/label-input.d.ts +4 -4
- package/web-components/input/label-input.d.ts.map +1 -0
- package/{input-form → web-components/input}/label-input.js +7 -12
- package/web-components/input/label-input.js.map +1 -0
- package/{input-form → web-components/input}/search-input.d.ts +4 -4
- package/web-components/input/search-input.d.ts.map +1 -0
- package/{input-form → web-components/input}/search-input.js +7 -12
- package/web-components/input/search-input.js.map +1 -0
- package/{input-form → web-components/input}/select-input.d.ts +4 -4
- package/web-components/input/select-input.d.ts.map +1 -0
- package/{input-form → web-components/input}/select-input.js +8 -13
- package/web-components/input/select-input.js.map +1 -0
- package/{input-form → web-components/input}/split-input.d.ts +4 -4
- package/web-components/input/split-input.d.ts.map +1 -0
- package/{input-form → web-components/input}/split-input.js +6 -11
- package/web-components/input/split-input.js.map +1 -0
- package/{input-form → web-components/input}/switch-input.d.ts +4 -4
- package/web-components/input/switch-input.d.ts.map +1 -0
- package/{input-form → web-components/input}/switch-input.js +7 -12
- package/web-components/input/switch-input.js.map +1 -0
- package/{items → web-components/items}/alert-item.d.ts +3 -3
- package/web-components/items/alert-item.d.ts.map +1 -0
- package/{items → web-components/items}/alert-item.js +6 -12
- package/web-components/items/alert-item.js.map +1 -0
- package/{items → web-components/items}/card-item.d.ts +4 -4
- package/web-components/items/card-item.d.ts.map +1 -0
- package/{items → web-components/items}/card-item.js +10 -16
- package/web-components/items/card-item.js.map +1 -0
- package/{layout → web-components/items}/drag-box.d.ts +3 -3
- package/web-components/items/drag-box.d.ts.map +1 -0
- package/{layout → web-components/items}/drag-box.js +5 -11
- package/web-components/items/drag-box.js.map +1 -0
- package/web-components/items/index.d.ts +5 -0
- package/web-components/items/index.d.ts.map +1 -0
- package/web-components/items/index.js +6 -0
- package/web-components/items/index.js.map +1 -0
- package/{items → web-components/items}/time-bar.d.ts +3 -3
- package/web-components/items/time-bar.d.ts.map +1 -0
- package/{items → web-components/items}/time-bar.js +4 -10
- package/web-components/items/time-bar.js.map +1 -0
- package/web-components/layout/divider-line.d.ts +20 -0
- package/web-components/layout/divider-line.d.ts.map +1 -0
- package/{layout/div-line.js → web-components/layout/divider-line.js} +14 -20
- package/web-components/layout/divider-line.js.map +1 -0
- package/{layout → web-components/layout}/flex-flow.d.ts +3 -3
- package/web-components/layout/flex-flow.d.ts.map +1 -0
- package/{layout → web-components/layout}/flex-flow.js +5 -11
- package/web-components/layout/flex-flow.js.map +1 -0
- package/{layout → web-components/layout}/nav-aside.d.ts +4 -4
- package/web-components/layout/nav-aside.d.ts.map +1 -0
- package/{layout → web-components/layout}/nav-aside.js +6 -12
- package/web-components/layout/nav-aside.js.map +1 -0
- package/{layout → web-components/layout}/nav-layout.d.ts +4 -4
- package/web-components/layout/nav-layout.d.ts.map +1 -0
- package/{layout → web-components/layout}/nav-layout.js +6 -12
- package/web-components/layout/nav-layout.js.map +1 -0
- package/{items/load-progress.d.ts → web-components/loading/loading-progress.d.ts} +7 -7
- package/web-components/loading/loading-progress.d.ts.map +1 -0
- package/{items/load-progress.js → web-components/loading/loading-progress.js} +15 -21
- package/web-components/loading/loading-progress.js.map +1 -0
- package/{layout → web-components/loading}/skeleton-screen.d.ts +4 -4
- package/web-components/loading/skeleton-screen.d.ts.map +1 -0
- package/{layout → web-components/loading}/skeleton-screen.js +6 -12
- package/web-components/loading/skeleton-screen.js.map +1 -0
- package/{view/details-expand.d.ts → web-components/open/open-details.d.ts} +8 -8
- package/web-components/open/open-details.d.ts.map +1 -0
- package/web-components/open/open-details.js +129 -0
- package/web-components/open/open-details.js.map +1 -0
- package/web-components/open/open-dialog.d.ts +40 -0
- package/web-components/open/open-dialog.d.ts.map +1 -0
- package/web-components/open/open-dialog.js +192 -0
- package/web-components/open/open-dialog.js.map +1 -0
- package/web-components/open/open-offset.d.ts +26 -0
- package/web-components/open/open-offset.d.ts.map +1 -0
- package/{view/offset-expand.js → web-components/open/open-offset.js} +16 -24
- package/web-components/open/open-offset.js.map +1 -0
- package/web-components/open/open-tooltip.d.ts +24 -0
- package/web-components/open/open-tooltip.d.ts.map +1 -0
- package/{view/tool-tip.js → web-components/open/open-tooltip.js} +17 -23
- package/web-components/open/open-tooltip.js.map +1 -0
- package/{view/std.d.ts → web-components/open/open.d.ts} +8 -7
- package/web-components/open/open.d.ts.map +1 -0
- package/web-components/open/open.js +77 -0
- package/web-components/open/open.js.map +1 -0
- package/{effect → web-components/text}/clip-text.d.ts +4 -4
- package/web-components/text/clip-text.d.ts.map +1 -0
- package/{effect → web-components/text}/clip-text.js +6 -12
- package/web-components/text/clip-text.js.map +1 -0
- package/{effect → web-components/text}/overbreath-text.d.ts +4 -4
- package/web-components/text/overbreath-text.d.ts.map +1 -0
- package/{effect → web-components/text}/overbreath-text.js +5 -11
- package/web-components/text/overbreath-text.js.map +1 -0
- package/{effect → web-components/text}/typewriter-text.d.ts +4 -4
- package/web-components/text/typewriter-text.d.ts.map +1 -0
- package/{effect → web-components/text}/typewriter-text.js +6 -12
- package/web-components/text/typewriter-text.js.map +1 -0
- package/{view → web-components/view}/route-view.d.ts +6 -6
- package/web-components/view/route-view.d.ts.map +1 -0
- package/{view → web-components/view}/route-view.js +8 -13
- package/web-components/view/route-view.js.map +1 -0
- package/{view → web-components/view}/scroll-x.d.ts +2 -2
- package/web-components/view/scroll-x.d.ts.map +1 -0
- package/{view → web-components/view}/scroll-x.js +6 -11
- package/web-components/view/scroll-x.js.map +1 -0
- package/{view/with-wrap.d.ts → web-components/view/wrap-view.d.ts} +7 -7
- package/web-components/view/wrap-view.d.ts.map +1 -0
- package/{view/with-wrap.js → web-components/view/wrap-view.js} +15 -20
- package/web-components/view/wrap-view.js.map +1 -0
- package/wrap-view.d.ts +2 -0
- package/wrap-view.d.ts.map +1 -0
- package/wrap-view.js +2 -0
- package/wrap-view.js.map +1 -0
- package/effect/clip-text.d.ts.map +0 -1
- package/effect/clip-text.js.map +0 -1
- package/effect/index.d.ts +0 -4
- package/effect/index.d.ts.map +0 -1
- package/effect/index.js +0 -4
- package/effect/index.js.map +0 -1
- package/effect/overbreath-text.d.ts.map +0 -1
- package/effect/overbreath-text.js.map +0 -1
- package/effect/std.d.ts +0 -4
- package/effect/std.d.ts.map +0 -1
- package/effect/std.js +0 -4
- package/effect/std.js.map +0 -1
- package/effect/typewriter-text.d.ts.map +0 -1
- package/effect/typewriter-text.js.map +0 -1
- package/group/avatar-group.d.ts.map +0 -1
- package/group/avatar-group.js.map +0 -1
- package/group/details-group.d.ts.map +0 -1
- package/group/details-group.js.map +0 -1
- package/group/index.d.ts +0 -4
- package/group/index.d.ts.map +0 -1
- package/group/index.js +0 -4
- package/group/index.js.map +0 -1
- package/group/std.d.ts +0 -4
- package/group/std.d.ts.map +0 -1
- package/group/std.js +0 -4
- package/group/std.js.map +0 -1
- package/group/tab-group.d.ts.map +0 -1
- package/group/tab-group.js.map +0 -1
- package/input-form/base-input.d.ts.map +0 -1
- package/input-form/base-input.js.map +0 -1
- package/input-form/index.d.ts +0 -8
- package/input-form/index.d.ts.map +0 -1
- package/input-form/index.js +0 -8
- package/input-form/index.js.map +0 -1
- package/input-form/label-input.d.ts.map +0 -1
- package/input-form/label-input.js.map +0 -1
- package/input-form/search-input.d.ts.map +0 -1
- package/input-form/search-input.js.map +0 -1
- package/input-form/select-input.d.ts.map +0 -1
- package/input-form/select-input.js.map +0 -1
- package/input-form/sign-form.d.ts.map +0 -1
- package/input-form/sign-form.js.map +0 -1
- package/input-form/split-input.d.ts.map +0 -1
- package/input-form/split-input.js.map +0 -1
- package/input-form/std.d.ts.map +0 -1
- package/input-form/std.js.map +0 -1
- package/input-form/switch-input.d.ts.map +0 -1
- package/input-form/switch-input.js.map +0 -1
- package/items/alert-item.d.ts.map +0 -1
- package/items/alert-item.js.map +0 -1
- package/items/avatar-a.d.ts.map +0 -1
- package/items/avatar-a.js.map +0 -1
- package/items/base-button.d.ts.map +0 -1
- package/items/base-button.js.map +0 -1
- package/items/card-item.d.ts.map +0 -1
- package/items/card-item.js.map +0 -1
- package/items/dialog-item.d.ts +0 -51
- package/items/dialog-item.d.ts.map +0 -1
- package/items/dialog-item.js +0 -208
- package/items/dialog-item.js.map +0 -1
- package/items/index.d.ts +0 -10
- package/items/index.d.ts.map +0 -1
- package/items/index.js +0 -10
- package/items/index.js.map +0 -1
- package/items/link-a.d.ts.map +0 -1
- package/items/link-a.js.map +0 -1
- package/items/load-progress.d.ts.map +0 -1
- package/items/load-progress.js.map +0 -1
- package/items/std.d.ts +0 -4
- package/items/std.d.ts.map +0 -1
- package/items/std.js +0 -4
- package/items/std.js.map +0 -1
- package/items/super-a.d.ts.map +0 -1
- package/items/super-a.js.map +0 -1
- package/items/time-bar.d.ts.map +0 -1
- package/items/time-bar.js.map +0 -1
- package/layout/div-line.d.ts +0 -20
- package/layout/div-line.d.ts.map +0 -1
- package/layout/div-line.js.map +0 -1
- package/layout/drag-box.d.ts.map +0 -1
- package/layout/drag-box.js.map +0 -1
- package/layout/flex-flow.d.ts.map +0 -1
- package/layout/flex-flow.js.map +0 -1
- package/layout/index.d.ts +0 -7
- package/layout/index.d.ts.map +0 -1
- package/layout/index.js +0 -7
- package/layout/index.js.map +0 -1
- package/layout/nav-aside.d.ts.map +0 -1
- package/layout/nav-aside.js.map +0 -1
- package/layout/nav-layout.d.ts.map +0 -1
- package/layout/nav-layout.js.map +0 -1
- package/layout/skeleton-screen.d.ts.map +0 -1
- package/layout/skeleton-screen.js.map +0 -1
- package/layout/std.d.ts +0 -4
- package/layout/std.d.ts.map +0 -1
- package/layout/std.js +0 -4
- package/layout/std.js.map +0 -1
- package/react/effect.d.ts +0 -5
- package/react/effect.d.ts.map +0 -1
- package/react/effect.js +0 -13
- package/react/effect.js.map +0 -1
- package/react/group.d.ts +0 -5
- package/react/group.d.ts.map +0 -1
- package/react/group.js +0 -13
- package/react/group.js.map +0 -1
- package/react/input-form.d.ts +0 -28
- package/react/input-form.d.ts.map +0 -1
- package/react/input-form.js +0 -38
- package/react/input-form.js.map +0 -1
- package/react/items.d.ts +0 -11
- package/react/items.d.ts.map +0 -1
- package/react/items.js +0 -31
- package/react/items.js.map +0 -1
- package/react/layout.d.ts +0 -8
- package/react/layout.d.ts.map +0 -1
- package/react/layout.js +0 -22
- package/react/layout.js.map +0 -1
- package/react/view.d.ts +0 -10
- package/react/view.d.ts.map +0 -1
- package/react/view.js +0 -28
- package/react/view.js.map +0 -1
- package/view/details-expand.d.ts.map +0 -1
- package/view/details-expand.js +0 -83
- package/view/details-expand.js.map +0 -1
- package/view/index.d.ts +0 -9
- package/view/index.d.ts.map +0 -1
- package/view/index.js +0 -9
- package/view/index.js.map +0 -1
- package/view/menu-list.d.ts +0 -20
- package/view/menu-list.d.ts.map +0 -1
- package/view/menu-list.js +0 -76
- package/view/menu-list.js.map +0 -1
- package/view/offset-expand.d.ts +0 -27
- package/view/offset-expand.d.ts.map +0 -1
- package/view/offset-expand.js.map +0 -1
- package/view/rotation-pool.d.ts.map +0 -1
- package/view/rotation-pool.js.map +0 -1
- package/view/route-view.d.ts.map +0 -1
- package/view/route-view.js.map +0 -1
- package/view/scroll-x.d.ts.map +0 -1
- package/view/scroll-x.js.map +0 -1
- package/view/std.d.ts.map +0 -1
- package/view/std.js +0 -128
- package/view/std.js.map +0 -1
- package/view/tool-tip.d.ts +0 -24
- package/view/tool-tip.d.ts.map +0 -1
- package/view/tool-tip.js.map +0 -1
- package/view/with-wrap.d.ts.map +0 -1
- package/view/with-wrap.js.map +0 -1
@@ -1,10 +1,10 @@
|
|
1
|
-
import { type CSSResultGroup } from "
|
2
|
-
import { type HTMLTemplate } from "
|
3
|
-
import {
|
1
|
+
import { type CSSResultGroup } from "../../deps.js";
|
2
|
+
import { type HTMLTemplate } from "../../lib/templates.js";
|
3
|
+
import { InputElement } from "./input.js";
|
4
4
|
/**
|
5
5
|
* SplitInput renders multiple inputs.
|
6
6
|
*/
|
7
|
-
export declare class SplitInput extends
|
7
|
+
export declare class SplitInput extends InputElement {
|
8
8
|
/**
|
9
9
|
* The number of simulated input boxes.
|
10
10
|
*/
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"split-input.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/input/split-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,cAAc,EAAmC,MAAM,eAAe,CAAC;AAC1F,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAQ1C;;GAEG;AACH,qBACa,UAAW,SAAQ,YAAY;IAC1C;;OAEG;IACyB,GAAG,SAAK;IACpC;;OAEG;IACyB,KAAK,SAAM;IAEvB,MAAM,EAAE,gBAAgB,CAAC;IACvB,MAAM,EAAE,UAAU,CAAC,eAAe,CAAC,CAAC;IACtD,OAAO,SAAK;IACZ,YAAY,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAM;IAErC,MAAM,CAAC,MAAM,iBAkDO;IAEpB,SAAS,CAAC,MAAM,IAAI,YAAY;IAWhC,SAAS,CAAC,YAAY;IAiBtB,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,UAAU;IA4BpC,KAAK;IAIL,OAAO,CAAC,CAAC,SAAe;IAQxB,IAAI,CAAC,CAAC,SAAe;IAKrB,KAAK;CASN;AAED,eAAe,UAAU,CAAC;AAE1B,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,UAAU,CAAC;KAC3B;CACF"}
|
@@ -1,19 +1,14 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
6
|
-
};
|
7
|
-
import { createScope, cssvarValues, define } from "../root.js";
|
8
|
-
import { css, html, property, query, queryAll } from "../deps.js";
|
9
|
-
import { InputSTD } from "./std.js";
|
1
|
+
import { __decorate } from "tslib";
|
2
|
+
import { css, html, property, query, queryAll } from "../../deps.js";
|
3
|
+
import { createScope, cssvarValues, define } from "../../root.js";
|
4
|
+
import { InputElement } from "./input.js";
|
10
5
|
const FOCUS = "focus";
|
11
6
|
const defineName = "split-input";
|
12
7
|
const cssScope = createScope(defineName);
|
13
8
|
/**
|
14
9
|
* SplitInput renders multiple inputs.
|
15
10
|
*/
|
16
|
-
let SplitInput = class SplitInput extends
|
11
|
+
let SplitInput = class SplitInput extends InputElement {
|
17
12
|
constructor() {
|
18
13
|
super(...arguments);
|
19
14
|
/**
|
@@ -108,7 +103,7 @@ let SplitInput = class SplitInput extends InputSTD {
|
|
108
103
|
}
|
109
104
|
};
|
110
105
|
SplitInput.styles = [
|
111
|
-
|
106
|
+
InputElement.styles,
|
112
107
|
css `
|
113
108
|
:host {
|
114
109
|
${cssScope}--outline: .15em solid var( ${cssvarValues.input}--outline-color);
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"split-input.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/input/split-input.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAuB,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE1F,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,eA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UAAU,CAqJtB;;AAED,eAAe,UAAU,CAAC","sourcesContent":["import { css, type CSSResultGroup, html, property, query, queryAll } from \"../../deps.js\";\nimport { type HTMLTemplate } from \"../../lib/templates.js\";\nimport { createScope, cssvarValues, define } from \"../../root.js\";\nimport { InputElement } from \"./input.js\";\n\nconst FOCUS = \"focus\";\n\nconst defineName = \"split-input\";\n\nconst cssScope = createScope(defineName);\n\n/**\n * SplitInput renders multiple inputs.\n */\n@define(defineName)\nexport class SplitInput extends InputElement {\n /**\n * The number of simulated input boxes.\n */\n @property({ type: Number }) max = 6;\n /**\n * Active index.\n */\n @property({ type: Number }) index = -1;\n\n @query(\"input\") _input: HTMLInputElement;\n @queryAll(\"span\") _spans: NodeListOf<HTMLSpanElement>;\n current = 0;\n currentValue: (string | null)[] = [];\n\n static styles = [\n InputElement.styles,\n css`\n :host {\n ${cssScope}--outline: .15em solid var( ${cssvarValues.input}--outline-color);\n margin: var(${cssvarValues.input}--outline-width);\n width: fit-content;\n border-radius: 1px;\n }\n\n * {\n font-size: 1em;\n border-radius: inherit;\n }\n\n div {\n vertical-align: top;\n position: relative;\n display: inline-flex;\n gap: 0.25em;\n }\n\n span {\n box-sizing: content-box;\n vertical-align: top;\n display: inline-flex;\n width: 1.45em;\n height: 1.45em;\n pointer-events: all;\n }\n\n i {\n height: inherit;\n width: 100%;\n z-index: 1;\n background-color: var(${cssvarValues.input}--false);\n text-align: center;\n }\n\n input {\n position: absolute;\n opacity: 0;\n left: 0;\n top: 0;\n }\n\n .focus i {\n outline: var(${cssScope}--outline);\n }\n `,\n ] as CSSResultGroup;\n\n protected render(): HTMLTemplate {\n return html`\n <div>\n ${Array(this.max)\n .fill(0)\n .map(() => html`<span><i></i></span>`)}\n <input @input=\"${this._handleInput}\" />\n </div>\n `;\n }\n\n protected firstUpdated() {\n this.currentValue = this.value.split(\"\").concat(Array(this.max - this.value.length).fill(null));\n this.current = this.index < 0 || this.index > this.max ? this.currentValue.indexOf(null) : this.index;\n this._spans.forEach((span, index) => {\n this.addEvent(span, \"click\", () => {\n this.current = index;\n this.focusAt();\n this._input.focus();\n });\n });\n this.addEvent(document, \"click\", (e) => {\n if (!this.contains(e.target as Node)) {\n this.blur();\n }\n });\n }\n\n protected _handleInput(e: InputEvent) {\n if (e.data === null) {\n if (this.currentValue[this.current] !== null) {\n this.currentValue[this.current] = null;\n } else {\n this.currentValue[this.current - 1] = null;\n this.current = this.current - 1 < 0 ? 0 : this.current - 1;\n }\n } else {\n this.currentValue[this.current] = e.data;\n if (this.current + 1 >= this.max) {\n this.current = this.currentValue.indexOf(null);\n if (this.current === -1) {\n this.blur();\n }\n } else {\n this.current += 1;\n }\n }\n this.focus();\n this._spans.forEach((span, index) => {\n span.querySelector(\"i\").innerText = this.currentValue[index] || \"\";\n });\n this.value = this.currentValue.join(\"\");\n this.dispatchEvent(new CustomEvent(\"input\", { detail: this.value, bubbles: true, composed: true }));\n this.dispatchEvent(new CustomEvent(\"change\", { detail: this.value, composed: true }));\n }\n\n focus() {\n this.focusAt();\n }\n\n focusAt(i = this.current) {\n this._spans.forEach((span) => {\n span.classList.remove(FOCUS);\n });\n this._spans[i]?.classList.add(FOCUS);\n this._input.value = \"\";\n }\n\n blur(i = this.current) {\n this._spans[i]?.classList.remove(FOCUS);\n this._input.blur();\n }\n\n reset() {\n this.currentValue = Array(this.max).fill(null);\n this.current = 0;\n this._spans.forEach((span) => {\n span.querySelector(\"i\").innerText = \"\";\n });\n this.value = \"\";\n this.dispatchEvent(new CustomEvent(\"change\", { detail: this.value }));\n }\n}\n\nexport default SplitInput;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"split-input\": SplitInput;\n }\n}\n"]}
|
@@ -1,12 +1,12 @@
|
|
1
|
-
import { type CSSResultGroup } from "
|
2
|
-
import { type HTMLTemplate } from "
|
3
|
-
import {
|
1
|
+
import { type CSSResultGroup } from "../../deps.js";
|
2
|
+
import { type HTMLTemplate } from "../../lib/templates.js";
|
3
|
+
import { InputElement } from "./input.js";
|
4
4
|
/**
|
5
5
|
* Switch renders a switch.
|
6
6
|
*
|
7
7
|
* Inspired by Steam.
|
8
8
|
*/
|
9
|
-
export declare class SwitchInput extends
|
9
|
+
export declare class SwitchInput extends InputElement {
|
10
10
|
/**
|
11
11
|
* Border style.
|
12
12
|
*/
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"switch-input.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/input/switch-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,cAAc,EAAyB,MAAM,eAAe,CAAC;AAChF,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAErE,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAM1C;;;;GAIG;AACH,qBACa,WAAY,SAAQ,YAAY;IAC3C;;OAEG;IACS,IAAI,EAAE,KAAK,GAAG,MAAM,CAAU;IAC1C;;OAEG;IAC0B,OAAO,UAAS;IAC7C;;OAEG;IAC0B,QAAQ,UAAS;IAC9C;;OAEG;IACS,GAAG,SAAW;IAC1B;;OAEG;IACS,IAAI,SAAc;IAC9B;;OAEG;IACS,KAAK,SAAQ;IAET,MAAM,EAAE,gBAAgB,CAAC;IAEzC,MAAM,CAAC,MAAM,iBA4HO;IAEpB,SAAS,CAAC,MAAM,IAAI,YAAY;IAWhC,KAAK;IAKL,iBAAiB;IASjB,SAAS,CAAC,aAAa;IAMvB,SAAS,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC;CAG/B;AAED,eAAe,WAAW,CAAC;AAE3B,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,WAAW,CAAC;KAC7B;CACF"}
|
@@ -1,13 +1,8 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
};
|
7
|
-
import { createScope, cssvarValues, define } from "../root.js";
|
8
|
-
import { css, html, property, query } from "../deps.js";
|
9
|
-
import { htmlSlot } from "../lib/templates.js";
|
10
|
-
import { InputSTD } from "./std.js";
|
1
|
+
import { __decorate } from "tslib";
|
2
|
+
import { css, html, property, query } from "../../deps.js";
|
3
|
+
import { htmlSlot } from "../../lib/templates.js";
|
4
|
+
import { createScope, cssvarValues, define } from "../../root.js";
|
5
|
+
import { InputElement } from "./input.js";
|
11
6
|
const defineName = "switch-input";
|
12
7
|
const cssScope = createScope(defineName);
|
13
8
|
/**
|
@@ -15,7 +10,7 @@ const cssScope = createScope(defineName);
|
|
15
10
|
*
|
16
11
|
* Inspired by Steam.
|
17
12
|
*/
|
18
|
-
let SwitchInput = class SwitchInput extends
|
13
|
+
let SwitchInput = class SwitchInput extends InputElement {
|
19
14
|
constructor() {
|
20
15
|
super(...arguments);
|
21
16
|
/**
|
@@ -76,7 +71,7 @@ let SwitchInput = class SwitchInput extends InputSTD {
|
|
76
71
|
}
|
77
72
|
};
|
78
73
|
SwitchInput.styles = [
|
79
|
-
|
74
|
+
InputElement.styles,
|
80
75
|
css `
|
81
76
|
:host {
|
82
77
|
${cssScope}--width: 3em;
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"switch-input.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/input/switch-input.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAuB,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,EAAE,QAAQ,EAAqB,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,MAAM,UAAU,GAAG,cAAc,CAAC;AAElC,MAAM,QAAQ,GAAG,WAAW,CAAC,UAAU,CAAC,CAAC;AAEzC;;;;GAIG;AAEI,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,YAAY;IAAtC;;QACL;;WAE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IAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC1F,CAAC;IAED,SAAS;QACP,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IACnC,CAAC;;AA/JM,kBAAM,GAAG;IACd,YAAY,CAAC,MAAM;IACnB,GAAG,CAAA;;UAEG,QAAQ;UACR,QAAQ,sBAAsB,QAAQ;qBAC3B,QAAQ;sBACP,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;0BA2BJ,YAAY,CAAC,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAgDZ,YAAY,CAAC,KAAK;;;;;0BAKxB,YAAY,CAAC,KAAK;;;;;;;0BAOlB,YAAY,CAAC,KAAK;;;;;;;;;;;;0BAYlB,YAAY,CAAC,KAAK;;;;;;;;;;;;;;;;;KAiBvC;CACgB,AA5HN,CA4HO;AApJR;IAAX,QAAQ,EAAE;yCAA+B;AAIb;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;4CAAiB;AAIhB;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;6CAAkB;AAIlC;IAAX,QAAQ,EAAE;wCAAe;AAId;IAAX,QAAQ,EAAE;yCAAmB;AAIlB;IAAX,QAAQ,EAAE;0CAAc;AAET;IAAf,KAAK,CAAC,OAAO,CAAC;2CAA0B;AA1B9B,WAAW;IADvB,MAAM,CAAC,UAAU,CAAC;GACN,WAAW,CA4LvB;;AAED,eAAe,WAAW,CAAC","sourcesContent":["import { css, type CSSResultGroup, html, property, query } from \"../../deps.js\";\nimport { htmlSlot, type HTMLTemplate } from \"../../lib/templates.js\";\nimport { createScope, cssvarValues, define } from \"../../root.js\";\nimport { InputElement } from \"./input.js\";\n\nconst defineName = \"switch-input\";\n\nconst cssScope = createScope(defineName);\n\n/**\n * Switch renders a switch.\n *\n * Inspired by Steam.\n */\n@define(defineName)\nexport class SwitchInput extends InputElement {\n /**\n * Border style.\n */\n @property() base: \"fat\" | \"rect\" = \"rect\";\n /**\n * Whether this element is selected or not.\n */\n @property({ type: Boolean }) checked = false;\n /**\n * Whether this element is disabled or not.\n */\n @property({ type: Boolean }) disabled = false;\n /**\n * Parsed by JSON.parse to checked.\n */\n @property() def = \"false\";\n /**\n * Input name.\n */\n @property() name = \"checkbox\";\n /**\n * Input value.\n */\n @property() value = \"on\";\n\n @query(\"input\") _input: HTMLInputElement;\n\n static styles = [\n InputElement.styles,\n css`\n :host {\n ${cssScope}--width: 3em;\n ${cssScope}--height: calc(var(${cssScope}--width) / 2);\n width: var(${cssScope}--width);\n height: var(${cssScope}--height);\n }\n\n :host,\n span {\n display: inline-flex;\n font-size: inherit;\n position: relative;\n align-items: center;\n border-radius: inherit;\n }\n\n span {\n width: inherit;\n height: inherit;\n }\n\n input {\n width: inherit;\n height: inherit;\n margin: 0;\n outline: none;\n appearance: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n position: relative;\n font-size: inherit;\n background: var(${cssvarValues.input}--false);\n border-radius: inherit;\n transition: all 0.3s;\n }\n\n aside {\n pointer-events: none;\n transition: 0.3s;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n font-size: inherit;\n overflow: hidden;\n border-radius: inherit;\n }\n\n aside div {\n height: 100%;\n }\n\n input[disabled] ~ aside {\n filter: brightness(0.87);\n }\n\n .rect div.always {\n display: none;\n }\n\n .always {\n position: absolute;\n }\n\n .rect aside {\n height: 100%;\n width: 100%;\n left: 0;\n }\n\n .rect .true,\n .rect .false {\n width: 50%;\n text-align: center;\n transition: all 0.3s;\n }\n\n .rect input:checked ~ aside div.true,\n .rect .false {\n background-color: var(${cssvarValues.input}--true);\n }\n\n .rect input:checked ~ aside div.false,\n .rect .true {\n background: var(${cssvarValues.input}--false);\n }\n\n .fat aside {\n width: 1.2em;\n height: 1.2em;\n border-radius: 50%;\n background: var(${cssvarValues.input}--control);\n transition: 0.3s;\n left: 0.15em;\n top: 0.15em;\n bottom: 0.15em;\n }\n\n .fat {\n border-radius: 0.75em;\n }\n\n .fat input:checked {\n background: var(${cssvarValues.input}--true);\n }\n\n .fat input:checked ~ aside {\n left: calc(100% - 0.15em - 1.2em);\n right: 0.15em;\n }\n\n .fat input:checked ~ aside div.true,\n .fat div.false {\n display: block;\n }\n\n .fat input:checked ~ aside div.false,\n .fat div.true {\n display: none;\n }\n `,\n ] as CSSResultGroup;\n\n protected render(): HTMLTemplate {\n return html`<span class=\"${this.base}\">\n <input @change=\"${this._handleChange}\" ?disabled=\"${this.disabled}\" ?checked=\"${this.checked}\" name=\"${this.name}\" type=\"checkbox\" />\n <aside>\n <div class=\"false\"><slot name=\"false\"></slot></div>\n <div class=\"always\">${htmlSlot()}<slot name=\"always\"></slot></div>\n <div class=\"true\"><slot name=\"true\"></slot></div>\n </aside>\n </span>`;\n }\n\n reset() {\n this.checked = this.def === \"true\";\n this._input.checked = this.checked;\n }\n\n connectedCallback() {\n super.connectedCallback();\n if (this.checked) {\n this.def = \"true\";\n } else if (this.def === \"true\") {\n this.checked = true;\n }\n }\n\n protected _handleChange() {\n this.checked = this._input.checked;\n this.dispatchEvent(new CustomEvent(\"input\", { detail: this.checked, bubbles: true, composed: true }));\n this.dispatchEvent(new CustomEvent(\"change\", { detail: this.checked, composed: true }));\n }\n\n namevalue(): [string, boolean] {\n return [this.name, this.checked];\n }\n}\n\nexport default SwitchInput;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"switch-input\": SwitchInput;\n }\n}\n"]}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { type HTMLTemplate } from "
|
2
|
-
import
|
1
|
+
import { type HTMLTemplate } from "../../lib/templates.js";
|
2
|
+
import { GodownElement } from "../../root.js";
|
3
3
|
declare const colors: {
|
4
4
|
success: string[];
|
5
5
|
info: string[];
|
@@ -12,7 +12,7 @@ declare const colors: {
|
|
12
12
|
*
|
13
13
|
* Inspired by Ant-design.
|
14
14
|
*/
|
15
|
-
export declare class AlertItem extends
|
15
|
+
export declare class AlertItem extends GodownElement {
|
16
16
|
/**
|
17
17
|
* Type of performance.
|
18
18
|
*/
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"alert-item.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/items/alert-item.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,YAAY,EAAQ,MAAM,wBAAwB,CAAC;AAE3E,OAAO,EAAuB,aAAa,EAAE,MAAM,eAAe,CAAC;AAQnE,QAAA,MAAM,MAAM;;;;;;CAMX,CAAC;AAEF;;;;GAIG;AACH,qBACa,SAAU,SAAQ,aAAa;IAC1C;;OAEG;IACS,IAAI,EAAE,MAAM,OAAO,MAAM,GAAG,MAAM,CAAU;IACxD;;OAEG;IACyB,SAAS,SAAQ;IAC7C;;OAEG;IACS,KAAK,SAAM;IACvB;;OAEG;IACS,OAAO,SAAM;IAEzB,MAAM,CAAC,MAAM,4BA0EX;IAEF,SAAS,CAAC,MAAM,IAAI,YAAY;IAahC,KAAK;IAOL,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,SAAS;CAMvE;AAED,eAAe,SAAS,CAAC;AACzB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,SAAS,CAAC;KACzB;CACF"}
|
@@ -1,15 +1,9 @@
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
6
|
-
};
|
7
1
|
var AlertItem_1;
|
8
|
-
import {
|
9
|
-
import { css, html, property, unsafeCSS } from "
|
10
|
-
import { htmlSlot, svgX } from "
|
11
|
-
import { constructCSS } from "
|
12
|
-
import
|
2
|
+
import { __decorate } from "tslib";
|
3
|
+
import { css, html, property, unsafeCSS } from "../../deps.js";
|
4
|
+
import { htmlSlot, svgX } from "../../lib/templates.js";
|
5
|
+
import { constructCSS } from "../../lib/utils.js";
|
6
|
+
import { createScope, define, GodownElement } from "../../root.js";
|
13
7
|
const defineName = "alert-item";
|
14
8
|
const cssvarScope = createScope(defineName);
|
15
9
|
const currentColor = "currentColor";
|
@@ -26,7 +20,7 @@ const colors = {
|
|
26
20
|
*
|
27
21
|
* Inspired by Ant-design.
|
28
22
|
*/
|
29
|
-
let AlertItem = AlertItem_1 = class AlertItem extends
|
23
|
+
let AlertItem = AlertItem_1 = class AlertItem extends GodownElement {
|
30
24
|
constructor() {
|
31
25
|
super(...arguments);
|
32
26
|
/**
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"alert-item.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/items/alert-item.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAqB,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnE,MAAM,UAAU,GAAG,YAAY,CAAC;AAChC,MAAM,WAAW,GAAG,WAAW,CAAC,UAAU,CAAC,CAAC;AAE5C,MAAM,YAAY,GAAG,cAAc,CAAC;AAEpC,MAAM,IAAI,GAAG,CA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K;QACH,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAC9D,UAAU,CAAC,GAAG,EAAE;YACd,IAAI,CAAC,MAAM,EAAE,CAAC;QAChB,CAAC,EAAE,GAAG,CAAC,CAAC;IACV,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,IAAiB,EAAE,MAA0B;QACxD,MAAM,EAAE,GAAG,IAAI,WAAS,EAAE,CAAC;QAC3B,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;QAC1B,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;QACrB,OAAO,EAAE,CAAC;IACZ,CAAC;;AArGM,gBAAM,GAAG;IACd,SAAS,CACP,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE;QACjC,OAAO,IAAI,GAAG,EAAE,CAAC;IACnB,CAAC,CAAC,CACH;IACD,GAAG,CAAA;;UAEG,WAAW;UACX,WAAW;UACX,WAAW;6BACQ,WAAW;;;;;;;;;;;;;;uBAcjB,WAAW;;sBAEZ,WAAW,6BAA6B,WAAW;qBACpD,WAAW;0BACN,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAsCf,WAAW;;;;sBAIX,WAAW;;KAE5B;CACF,AA1EY,CA0EX;AAxFU;IAAX,QAAQ,EAAE;uCAA6C;AAI5B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAAkB;AAIjC;IAAX,QAAQ,EAAE;wCAAY;AAIX;IAAX,QAAQ,EAAE;0CAAc;AAhBd,SAAS;IADrB,MAAM,CAAC,UAAU,CAAC;GACN,SAAS,CAwHrB;;AAED,eAAe,SAAS,CAAC","sourcesContent":["import { css, html, property, unsafeCSS } from \"../../deps.js\";\nimport { htmlSlot, type HTMLTemplate, svgX } from \"../../lib/templates.js\";\nimport { constructCSS } from \"../../lib/utils.js\";\nimport { createScope, define, GodownElement } from \"../../root.js\";\n\nconst defineName = \"alert-item\";\nconst cssvarScope = createScope(defineName);\n\nconst currentColor = \"currentColor\";\n\nconst vars = [\"color\", \"background\", \"border\", \"super\"].map((v) => `${cssvarScope}--${v}`);\nconst colors = {\n success: [\"#3c763d\", \"#dff0d8\", \"#d6e9c6\", \"#2b542c\"],\n info: [\"#31708f\", \"#d9edf7\", \"#bce8f1\", \"#245269\"],\n warning: [\"#8a6d3b\", \"#fcf8e3\", \"#faebcc\", \"#66512c\"],\n danger: [\"#a94442\", \"#f2dede\", \"#ebccd1\", \"#843534\"],\n inherit: [currentColor, \"inherit\", currentColor, currentColor],\n};\n\n/**\n * AlertItem renders a alert.\n *\n * Inspired by Ant-design.\n */\n@define(defineName)\nexport class AlertItem extends GodownElement {\n /**\n * Type of performance.\n */\n @property() call: keyof typeof colors | \"hide\" = \"info\";\n /**\n * Close delay.\n */\n @property({ type: Number }) autoclose = 3000;\n /**\n * Alert title.\n */\n @property() title = \"\";\n /**\n * Alert content.\n */\n @property() content = \"\";\n\n static styles = [\n unsafeCSS(\n constructCSS(vars, colors, (raw) => {\n return `.${raw}`;\n }),\n ),\n css`\n :host {\n ${cssvarScope}--padding: .05em .25em .05em .35em;\n ${cssvarScope}--border-width: 0.15em;\n ${cssvarScope}--border-radius: 0.4em;\n border-radius: var(${cssvarScope}--border-radius);\n margin: 0 auto;\n display: block;\n }\n\n .hide {\n opacity: 0;\n transform: translateY(-100%);\n }\n\n .alert {\n transition: 0.25s;\n display: flex;\n justify-content: space-between;\n padding: var(${cssvarScope}--padding);\n border-radius: inherit;\n border: var(${cssvarScope}--border-width) solid var(${cssvarScope}--border);\n color: var(${cssvarScope}--color);\n background: var(${cssvarScope}--background);\n animation: alert 0.25s ease-in-out;\n }\n\n @keyframes alert {\n 0% {\n opacity: 0;\n transform: translateY(-50%);\n }\n 100% {\n opacity: 1;\n transform: none;\n }\n }\n\n div {\n min-height: 1.5em;\n line-height: 1.5em;\n }\n\n .close {\n height: fit-content;\n width: fit-content;\n border-radius: 50%;\n transition: inherit;\n }\n\n .close:hover {\n backdrop-filter: contrast(115%);\n }\n\n svg {\n display: block;\n height: 1.6em;\n width: 1.6em;\n }\n\n .close:hover path {\n stroke: var(${cssvarScope}--super);\n }\n\n path {\n stroke: var(${cssvarScope}--color);\n }\n `,\n ];\n\n protected render(): HTMLTemplate {\n if (this.autoclose) {\n setTimeout(() => this.close(), this.autoclose);\n }\n return html`<main class=\"${this.call} alert\">\n <div>\n <strong> ${this.title || htmlSlot(\"title\")}</strong>\n ${this.content || htmlSlot()}\n </div>\n <aside class=\"close\" @click=\"${this.close}\">${htmlSlot(\"close\", svgX(), this)}</aside>\n </main>`;\n }\n\n close() {\n this.shadowRoot.querySelector(\".alert\").classList.add(\"hide\");\n setTimeout(() => {\n this.remove();\n }, 250);\n }\n\n static alert(root: HTMLElement, option: Partial<AlertItem>): AlertItem {\n const ai = new AlertItem();\n Object.assign(ai, option);\n root.appendChild(ai);\n return ai;\n }\n}\n\nexport default AlertItem;\ndeclare global {\n interface HTMLElementTagNameMap {\n \"alert-item\": AlertItem;\n }\n}\n"]}
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import { type CSSResultGroup } from "
|
2
|
-
import { type HTMLTemplate } from "
|
3
|
-
import
|
1
|
+
import { type CSSResultGroup } from "../../deps.js";
|
2
|
+
import { type HTMLTemplate } from "../../lib/templates.js";
|
3
|
+
import { GodownElement } from "../../root.js";
|
4
4
|
/**
|
5
5
|
* CardItem renders a card.
|
6
6
|
*/
|
7
|
-
export declare class CardItem extends
|
7
|
+
export declare class CardItem extends GodownElement {
|
8
8
|
/**
|
9
9
|
* Enable rotate.
|
10
10
|
*/
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"card-item.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/items/card-item.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,cAAc,EAAyB,MAAM,eAAe,CAAC;AAEhF,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAqC,aAAa,EAAE,MAAM,eAAe,CAAC;AAKjF;;GAEG;AACH,qBACa,QAAS,SAAQ,aAAa;IACzC;;OAEG;IAC0B,MAAM,UAAS;IAE7B,SAAS,CAAC,KAAK,EAAG,WAAW,CAAC;IAC7B,SAAS,CAAC,MAAM,EAAG,WAAW,CAAC;IAE/C,MAAM,CAAC,MAAM,iBAoEO;IAEpB,SAAS,CAAC,MAAM,IAAI,YAAY;IAyBhC,SAAS,CAAC,YAAY;IAOtB;;OAEG;IACH,KAAK;IAKL;;;OAGG;IACH,SAAS,CAAC,WAAW,CAAC,CAAC,EAAE,UAAU;CAWpC;AAED,eAAe,QAAQ,CAAC;AAExB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
|
@@ -1,20 +1,14 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
};
|
7
|
-
import { createScope, cssvarValues, define } from "../root.js";
|
8
|
-
import { css, html, property, query } from "../deps.js";
|
9
|
-
import { htmlSlot } from "../lib/templates.js";
|
10
|
-
import { ifValue } from "../lib/directives.js";
|
11
|
-
import ItemsSTD from "./std.js";
|
1
|
+
import { __decorate } from "tslib";
|
2
|
+
import { css, html, property, query } from "../../deps.js";
|
3
|
+
import { ifValue } from "../../lib/directives.js";
|
4
|
+
import { htmlSlot } from "../../lib/templates.js";
|
5
|
+
import { createScope, cssvarValues, define, GodownElement } from "../../root.js";
|
12
6
|
const defineName = "card-item";
|
13
7
|
const cssvarScope = createScope(defineName);
|
14
8
|
/**
|
15
9
|
* CardItem renders a card.
|
16
10
|
*/
|
17
|
-
let CardItem = class CardItem extends
|
11
|
+
let CardItem = class CardItem extends GodownElement {
|
18
12
|
constructor() {
|
19
13
|
super(...arguments);
|
20
14
|
/**
|
@@ -70,16 +64,17 @@ let CardItem = class CardItem extends ItemsSTD {
|
|
70
64
|
}
|
71
65
|
};
|
72
66
|
CardItem.styles = [
|
73
|
-
|
67
|
+
GodownElement.styles,
|
74
68
|
css `
|
75
69
|
:host {
|
76
70
|
${cssvarScope}--offset: .25em;
|
77
71
|
${cssvarScope}--background: var(${cssvarValues.main});
|
78
72
|
${cssvarScope}--wapper-background: none;
|
79
73
|
${cssvarScope}--outline: 0;
|
80
|
-
${cssvarScope}--box-shadow: 0 .05em .
|
74
|
+
${cssvarScope}--box-shadow: 0 .05em 1.2em 0 rgb(var(${cssvarValues.textRGB}) / 12%);
|
81
75
|
${cssvarScope}--hr-width: 100%;
|
82
76
|
${cssvarScope}--hr-height: .05em;
|
77
|
+
${cssvarScope}--hr-background: #80808080;
|
83
78
|
${cssvarScope}--padding: .75em;
|
84
79
|
margin: auto;
|
85
80
|
display: block;
|
@@ -128,8 +123,7 @@ CardItem.styles = [
|
|
128
123
|
height: var(${cssvarScope}--hr-height);
|
129
124
|
margin: auto;
|
130
125
|
display: block;
|
131
|
-
background:
|
132
|
-
opacity: 0.5;
|
126
|
+
background: var(${cssvarScope}--hr-background);
|
133
127
|
}
|
134
128
|
|
135
129
|
slot {
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"card-item.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/items/card-item.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAuB,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAqB,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEjF,MAAM,UAAU,GAAG,WAAW,CAAC;AAC/B,MAAM,WAAW,GAAG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CAAC;GACN,QAAQ,CAsIpB;;AAED,eAAe,QAAQ,CAAC","sourcesContent":["import { css, type CSSResultGroup, html, property, query } from \"../../deps.js\";\nimport { ifValue } from \"../../lib/directives.js\";\nimport { htmlSlot, type HTMLTemplate } from \"../../lib/templates.js\";\nimport { createScope, cssvarValues, define, GodownElement } from \"../../root.js\";\n\nconst defineName = \"card-item\";\nconst cssvarScope = createScope(defineName);\n\n/**\n * CardItem renders a card.\n */\n@define(defineName)\nexport class CardItem extends GodownElement {\n /**\n * Enable rotate.\n */\n @property({ type: Boolean }) rotate = false;\n\n @query(\"main\") protected _main!: HTMLElement;\n @query(\"aside\") protected _aside!: HTMLElement;\n\n static styles = [\n GodownElement.styles,\n css`\n :host {\n ${cssvarScope}--offset: .25em;\n ${cssvarScope}--background: var(${cssvarValues.main});\n ${cssvarScope}--wapper-background: none;\n ${cssvarScope}--outline: 0;\n ${cssvarScope}--box-shadow: 0 .05em 1.2em 0 rgb(var(${cssvarValues.textRGB}) / 12%);\n ${cssvarScope}--hr-width: 100%;\n ${cssvarScope}--hr-height: .05em;\n ${cssvarScope}--hr-background: #80808080;\n ${cssvarScope}--padding: .75em;\n margin: auto;\n display: block;\n width: fit-content;\n color: var(${cssvarValues.text});\n border-radius: 0.2em;\n }\n\n * {\n border-radius: inherit;\n min-height: inherit;\n min-width: inherit;\n }\n\n main {\n outline: var(${cssvarScope}--outline);\n box-shadow: var(${cssvarScope}--box-shadow);\n background: var(${cssvarScope}--background);\n z-index: 2;\n position: relative;\n }\n\n aside {\n box-sizing: content-box;\n z-index: 0;\n height: 100%;\n width: 100%;\n position: absolute;\n background: var(${cssvarScope}--wapper-background);\n filter: blur(1em);\n padding: var(${cssvarScope}--offset);\n margin: calc(-1 * var(${cssvarScope}--offset));\n }\n\n div {\n width: fit-content;\n position: relative;\n }\n\n i {\n position: absolute;\n }\n\n hr {\n width: var(${cssvarScope}--hr-width);\n height: var(${cssvarScope}--hr-height);\n margin: auto;\n display: block;\n background: var(${cssvarScope}--hr-background);\n }\n\n slot {\n display: block;\n padding: var(${cssvarScope}--padding);\n }\n `,\n ] as CSSResultGroup;\n\n protected render(): HTMLTemplate {\n const HEADER = \"header\";\n const FOOTER = \"footer\";\n return html`<div>\n <aside></aside>\n <main>\n ${ifValue(\n this.querySlot(HEADER) as unknown as boolean,\n html`\n ${htmlSlot(HEADER)}\n <hr />\n `,\n )}\n ${htmlSlot()}\n ${ifValue(\n this.querySlot(FOOTER) as unknown as boolean,\n html`\n <hr />\n ${htmlSlot(FOOTER)}\n `,\n )}\n </main>\n </div>`;\n }\n\n protected firstUpdated() {\n if (this.rotate) {\n this.addEvent(this._main, \"mousemove\", this._drawRotate.bind(this));\n this.addEvent(this._aside, \"mouseleave\", this.reset.bind(this));\n }\n }\n\n /**\n * Cancel the aside offset.\n */\n reset() {\n this._main.style.transition = \".5s\";\n this._main.style.transform = \"none\";\n }\n\n /**\n * Offset aside.\n * @param e Mouse move event.\n */\n protected _drawRotate(e: MouseEvent) {\n const { left, top, width, height } = this._main.getBoundingClientRect();\n const { clientX, clientY } = e;\n const offsetX = clientX - left;\n const offsetY = clientY - top;\n const rotate = 30;\n const rotateX = -(rotate * (offsetY - height / 2)) / height / 1.5;\n const rotateY = (rotate * (offsetX - width / 2)) / width / 1.5;\n this._main.style.transform = `rotateX(${rotateX}deg) rotateY(${rotateY}deg)`;\n this._main.style.transition = \"none\";\n }\n}\n\nexport default CardItem;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"card-item\": CardItem;\n }\n}\n"]}
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import { type HTMLTemplate } from "
|
2
|
-
import
|
1
|
+
import { type HTMLTemplate } from "../../lib/templates.js";
|
2
|
+
import { GodownElement } from "../../root.js";
|
3
3
|
/**
|
4
4
|
* The DragBox does not extend beyond the range of {@linkcode DragBox.offsetsWidth} and {@linkcode DragBox.offsetsHeight}.
|
5
5
|
*/
|
6
|
-
export declare class DragBox extends
|
6
|
+
export declare class DragBox extends GodownElement {
|
7
7
|
drag: boolean;
|
8
8
|
t: number;
|
9
9
|
l: number;
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"drag-box.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/items/drag-box.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAU,aAAa,EAAE,MAAM,eAAe,CAAC;AAItD;;GAEG;AACH,qBACa,OAAQ,SAAQ,aAAa;IACxC,IAAI,EAAE,OAAO,CAAC;IACd,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACS,CAAC,SAAU;IACvB;;OAEG;IACS,CAAC,SAAU;IAEvB,MAAM,CAAC,MAAM,4BAOX;IAEF,SAAS,CAAC,MAAM,IAAI,YAAY;IAIhC,SAAS,CAAC,YAAY;IAKtB,SAAS,CAAC,gBAAgB,CAAC,CAAC,EAAE,UAAU;IASxC,SAAS,CAAC,cAAc;IAKxB,SAAS,CAAC,WAAW,CAAC,CAAC,EAAE,UAAU;IAsBnC,KAAK;CAUN;AAED,eAAe,OAAO,CAAC;AACvB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,UAAU,EAAE,OAAO,CAAC;KACrB;CACF"}
|
@@ -1,18 +1,12 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
6
|
-
};
|
7
|
-
import { css, html, property } from "../deps.js";
|
8
|
-
import { htmlSlot } from "../lib/templates.js";
|
9
|
-
import { define } from "../root.js";
|
10
|
-
import LayoutSTD from "./std.js";
|
1
|
+
import { __decorate } from "tslib";
|
2
|
+
import { css, html, property } from "../../deps.js";
|
3
|
+
import { htmlSlot } from "../../lib/templates.js";
|
4
|
+
import { define, GodownElement } from "../../root.js";
|
11
5
|
const defineName = "drag-box";
|
12
6
|
/**
|
13
7
|
* The DragBox does not extend beyond the range of {@linkcode DragBox.offsetsWidth} and {@linkcode DragBox.offsetsHeight}.
|
14
8
|
*/
|
15
|
-
let DragBox = class DragBox extends
|
9
|
+
let DragBox = class DragBox extends GodownElement {
|
16
10
|
constructor() {
|
17
11
|
super(...arguments);
|
18
12
|
/**
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"drag-box.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/items/drag-box.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAqB,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEtD,MAAM,UAAU,GAAG,UAAU,CAAC;AAE9B;;GAEG;AAEI,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,aAAa;IAAnC;;QAOL;;WAEG;QACS,MAAC,GAAG,MAAM,CAAC;QACvB;;WAEG;QACS,MAAC,GAAG,MAAM,CAAC;IAkEzB,CAAC;IAvDW,MAAM;QACd,OAAO,IAAI,CAAA,oBAAoB,IAAI,CAAC,gBAAgB,eAAe,IAAI,CAAC,cAAc,KAAK,QAAQ,EAAE,QAAQ,CAAC;IAChH,CAAC;IAES,YAAY;QACpB,IAAI,CAAC,KAAK,EAAE,CAAC;QACb,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,SAAS,EAAE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACrE,CAAC;IAES,gBAAgB,CAAC,CAAa;QACtC,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC;QACpB,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC;QACpB,IAAI,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AAC;aAAM,IAAI,EAAE,GAAG,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;YACvD,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG,EAAE,IAAI,CAAC;QAC7B,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,YAAY,IAAI,CAAC;QACjE,CAAC;IACH,CAAC;IAED,KAAK;QACH,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,IAAI,GAAG,CAAC;QAChC,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC,IAAI,GAAG,CAAC;QAC/B,IAAI,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;YAC3D,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,GAAG,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,WAAW,IAAI,CAAC;QAChE,CAAC;QACD,IAAI,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;YAC5D,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,YAAY,IAAI,CAAC;QACjE,CAAC;IACH,CAAC;;AA/DM,cAAM,GAAG;IACd,GAAG,CAAA;;;;;KAKF;CACF,AAPY,CAOX;AAbU;IAAX,QAAQ,EAAE;kCAAY;AAIX;IAAX,QAAQ,EAAE;kCAAY;AAdZ,OAAO;IADnB,MAAM,CAAC,UAAU,CAAC;GACN,OAAO,CAgFnB;;AAED,eAAe,OAAO,CAAC","sourcesContent":["import { css, html, property } from \"../../deps.js\";\nimport { htmlSlot, type HTMLTemplate } from \"../../lib/templates.js\";\nimport { define, GodownElement } from \"../../root.js\";\n\nconst defineName = \"drag-box\";\n\n/**\n * The DragBox does not extend beyond the range of {@linkcode DragBox.offsetsWidth} and {@linkcode DragBox.offsetsHeight}.\n */\n@define(defineName)\nexport class DragBox extends GodownElement {\n drag: boolean;\n t: number;\n l: number;\n cx: number;\n cy: number;\n\n /**\n * Position x.\n */\n @property() x = \"auto\";\n /**\n * Position y.\n */\n @property() y = \"auto\";\n\n static styles = [\n css`\n :host {\n position: relative;\n display: inline-flex;\n }\n `,\n ];\n\n protected render(): HTMLTemplate {\n return html`<div @mousedown=\"${this._handleDragStart}\" @mouseup=\"${this._handleDragEnd}\">${htmlSlot()}</div>`;\n }\n\n protected firstUpdated() {\n this.reset();\n this.addEvent(document, \"mouseup\", this._handleDragEnd.bind(this));\n }\n\n protected _handleDragStart(e: MouseEvent) {\n this.cx = e.clientX;\n this.cy = e.clientY;\n this.t = this.offsetTop;\n this.l = this.offsetLeft;\n this.drag = true;\n this.addEvent(document, \"mousemove\", this._handleDrag.bind(this), undefined, \"0\");\n }\n\n protected _handleDragEnd() {\n this.drag = false;\n this.removeEvent(document, \"mousemove\", \"0\");\n }\n\n protected _handleDrag(e: MouseEvent) {\n if (!this.drag) {\n return;\n }\n const nl = e.clientX - (this.cx - this.l);\n const nt = e.clientY - (this.cy - this.t);\n if (nl < 0) {\n this.style.left = \"0\";\n } else if (nl < this.offsetsWidth - this.offsetWidth) {\n this.style.left = `${nl}px`;\n } else {\n this.style.left = `${this.offsetsWidth - this.offsetWidth}\"px\"`;\n }\n if (nt < 0) {\n this.style.top = \"0\";\n } else if (nt < this.offsetsHeight - this.offsetHeight) {\n this.style.top = `${nt}px`;\n } else {\n this.style.top = `${this.offsetsHeight - this.offsetHeight}px`;\n }\n }\n\n reset() {\n this.style.left = this.x || \"0\";\n this.style.top = this.y || \"0\";\n if (this.offsetLeft > this.offsetsWidth - this.offsetWidth) {\n this.style.left = `${this.offsetsWidth - this.offsetWidth}px`;\n }\n if (this.offsetTop > this.offsetsHeight - this.offsetHeight) {\n this.style.top = `${this.offsetsHeight - this.offsetHeight}px`;\n }\n }\n}\n\nexport default DragBox;\ndeclare global {\n interface HTMLElementTagNameMap {\n \"drag-box\": DragBox;\n }\n}\n"]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/items/index.ts"],"names":[],"mappings":"AACA,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/items/index.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC","sourcesContent":["/// script generated\nexport * from \"./alert-item.js\";\nexport * from \"./card-item.js\";\nexport * from \"./drag-box.js\";\nexport * from \"./time-bar.js\";\n"]}
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import { type CSSResultGroup } from "
|
2
|
-
import
|
1
|
+
import { type CSSResultGroup } from "../../deps.js";
|
2
|
+
import { GodownElement } from "../../root.js";
|
3
3
|
/**
|
4
4
|
* TimeBar renders a formatting time.
|
5
5
|
*/
|
6
|
-
export declare class TimeBar extends
|
6
|
+
export declare class TimeBar extends GodownElement {
|
7
7
|
/**
|
8
8
|
* Format strings.
|
9
9
|
* {@linkcode TimeBar.fmt}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"time-bar.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/items/time-bar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,cAAc,EAAY,MAAM,eAAe,CAAC;AACnE,OAAO,EAAU,aAAa,EAAE,MAAM,eAAe,CAAC;AAItD;;GAEG;AACH,qBACa,OAAQ,SAAQ,aAAa;IACxC;;;OAGG;IACS,MAAM,SAA8B;IAChD;;OAEG;IACS,KAAK,SAAM;IACvB;;OAEG;IACyB,IAAI,OAAc;IAC9C;;OAEG;IACyB,OAAO,SAAK;IACxC;;OAEG;IACyB,GAAG,SAAK;IAEpC,UAAU,EAAE,MAAM,CAAC;IAEnB,MAAM,CAAC,MAAM,EAAE,cAAc,CAM3B;IAEF,SAAS,CAAC,MAAM,IAAI,MAAM;IAI1B,SAAS,CAAC,YAAY;IAQtB,oBAAoB;IAIpB;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,GAAG,MAAM;CAmCzC;AAED,eAAe,OAAO,CAAC;AAEvB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,UAAU,EAAE,OAAO,CAAC;KACrB;CACF"}
|
@@ -1,18 +1,12 @@
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
6
|
-
};
|
7
1
|
var TimeBar_1;
|
8
|
-
import {
|
9
|
-
import {
|
10
|
-
import
|
2
|
+
import { __decorate } from "tslib";
|
3
|
+
import { css, property } from "../../deps.js";
|
4
|
+
import { define, GodownElement } from "../../root.js";
|
11
5
|
const defineName = "time-bar";
|
12
6
|
/**
|
13
7
|
* TimeBar renders a formatting time.
|
14
8
|
*/
|
15
|
-
let TimeBar = TimeBar_1 = class TimeBar extends
|
9
|
+
let TimeBar = TimeBar_1 = class TimeBar extends GodownElement {
|
16
10
|
constructor() {
|
17
11
|
super(...arguments);
|
18
12
|
/**
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"time-bar.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/items/time-bar.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,GAAG,EAAuB,QAAQ,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEtD,MAAM,UAAU,GAAG,UAAU,CAAC;AAE9B;;GAEG;AAEI,IAAM,OAAO,eAAb,MAAM,OAAQ,SAAQ,aAAa;IAAnC;;QACL;;;WAGG;QACS,WAAM,GAAG,0BAA0B,CAAC;QAChD;;WAEG;QACS,UAAK,GAAG,EAAE,CAAC;QACvB;;WAEG;QACyB,SAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAC9C;;WAEG;QACyB,YAAO,GAAG,CAAC,CAAC;QACxC;;WAEG;QACyB,QAAG,GAAG,CAAC,CAAC;IA4EtC,CAAC;IAhEW,MAAM;QACd,OAAO,IAAI,CAAC,KAAK,IAAI,SAAO,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3D,CAAC;IAES,YAAY;QACpB,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,IAAI,CAAC,UAAU,GAAG,WAAW,CAAC,GAAG,EAAE;gBACjC,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;YACzE,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;QAC7B,CAAC;IACH,CAAC;IAED,oBAAoB;QAClB,aAAa,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;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Aa,EAAE,CAAC;QAC5B,KAAK,MAAM,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC;YACvC,IAAI,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;gBAChB,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;YAClC,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACjB,CAAC;QACH,CAAC;QACD,OAAO,MAAM;aACV,OAAO,EAAE;aACT,IAAI,CAAC,EAAE,CAAC;aACR,OAAO,CAAC,KAAK,EAAE,GAAG,EAAE;YACnB,OAAO,IAAI,CAAC,KAAK,EAAE,CAAC;QACtB,CAAC,CAAC,CAAC;IACP,CAAC;;AAvEM,cAAM,GAAmB;IAC9B,GAAG,CAAA;;;;KAIF;CACF,AANY,CAMX;AA1BU;IAAX,QAAQ,EAAE;uCAAqC;AAIpC;IAAX,QAAQ,EAAE;sCAAY;AAIK;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qCAAmB;AAIlB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCAAa;AAIZ;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;oCAAS;AArBzB,OAAO;IADnB,MAAM,CAAC,UAAU,CAAC;GACN,OAAO,CAiGnB;;AAED,eAAe,OAAO,CAAC","sourcesContent":["import { css, type CSSResultGroup, property } from \"../../deps.js\";\nimport { define, GodownElement } from \"../../root.js\";\n\nconst defineName = \"time-bar\";\n\n/**\n * TimeBar renders a formatting time.\n */\n@define(defineName)\nexport class TimeBar extends GodownElement {\n /**\n * Format strings.\n * {@linkcode TimeBar.fmt}\n */\n @property() format = \"YYYY-MM-DD hh:mm:ss UTFZ\";\n /**\n * Display content.\n */\n @property() value = \"\";\n /**\n * Time.\n */\n @property({ type: Object }) time = new Date();\n /**\n * If there is a value, update every gap or timeout.\n */\n @property({ type: Number }) timeout = 0;\n /**\n * The number of milliseconds that change with each update.\n */\n @property({ type: Number }) gap = 0;\n\n intervalID: number;\n\n static styles: CSSResultGroup = [\n css`\n :host {\n text-align: center;\n }\n `,\n ];\n\n protected render(): string {\n return this.value || TimeBar.fmt(this.format, this.time);\n }\n\n protected firstUpdated() {\n if (this.timeout) {\n this.intervalID = setInterval(() => {\n this.time = new Date(this.time.getTime() + (this.gap || this.timeout));\n }, Math.abs(this.timeout));\n }\n }\n\n disconnectedCallback() {\n clearInterval(this.intervalID);\n }\n\n /**\n * @param fm Format string.\n * @param tm Time.\n * @returns F.ormat result\\\n *\n * Y for years\\\n * M for months\\\n * D for days\\\n * h for hours\\\n * m for minutes\\\n * s for seconds\\\n * Z for time zones.\n */\n static fmt(fm: string, tm: Date): string {\n if (fm === \"\") {\n return fm;\n }\n const rest = [];\n fm = fm.replace(/%([ZYMDhms%])/g, (_, p1) => {\n rest.push(p1);\n return \"%%\";\n });\n const formatNumber = (date: number) => date.toString().padStart(2, \"0\").split(\"\");\n const z = tm.getTimezoneOffset() / -60;\n const switcher: Record<string, string[]> = {\n Z: [z >= 0 ? \"+\" + z.toString() : z.toString()],\n Y: tm.getFullYear().toString().split(\"\"),\n M: formatNumber(tm.getMonth() + 1),\n D: formatNumber(tm.getDate()),\n h: formatNumber(tm.getHours()),\n m: formatNumber(tm.getMinutes()),\n s: formatNumber(tm.getSeconds()),\n };\n const result: string[] = [];\n for (const f of fm.split(\"\").reverse()) {\n if (switcher[f]) {\n result.push(switcher[f]?.pop());\n } else {\n result.push(f);\n }\n }\n return result\n .reverse()\n .join(\"\")\n .replace(/%%/g, () => {\n return rest.shift();\n });\n }\n}\n\nexport default TimeBar;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"time-bar\": TimeBar;\n }\n}\n"]}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { type HTMLTemplate } from "../../lib/templates.js";
|
2
|
+
import { GodownElement } from "../../root.js";
|
3
|
+
/**
|
4
|
+
* DividerLine similar to hr.
|
5
|
+
*/
|
6
|
+
export declare class DividerLine extends GodownElement {
|
7
|
+
/**
|
8
|
+
* Enable vertical.
|
9
|
+
*/
|
10
|
+
v: boolean;
|
11
|
+
static styles: import("lit").CSSResult[];
|
12
|
+
protected render(): HTMLTemplate;
|
13
|
+
}
|
14
|
+
export default DividerLine;
|
15
|
+
declare global {
|
16
|
+
interface HTMLElementTagNameMap {
|
17
|
+
"divider-line": DividerLine;
|
18
|
+
}
|
19
|
+
}
|
20
|
+
//# sourceMappingURL=divider-line.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"divider-line.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/layout/divider-line.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAuB,aAAa,EAAE,MAAM,eAAe,CAAC;AAKnE;;GAEG;AACH,qBACa,WAAY,SAAQ,aAAa;IAC5C;;OAEG;IAC0B,CAAC,UAAS;IAEvC,MAAM,CAAC,MAAM,4BAiDX;IAEF,SAAS,CAAC,MAAM,IAAI,YAAY;CAOjC;AAED,eAAe,WAAW,CAAC;AAE3B,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,WAAW,CAAC;KAC7B;CACF"}
|
@@ -1,19 +1,13 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
};
|
7
|
-
import { createScope, define } from "../root.js";
|
8
|
-
import { css, html, property } from "../deps.js";
|
9
|
-
import { htmlSlot } from "../lib/templates.js";
|
10
|
-
import LayoutSTD from "./std.js";
|
11
|
-
const defineName = "div-line";
|
1
|
+
import { __decorate } from "tslib";
|
2
|
+
import { css, html, property } from "../../deps.js";
|
3
|
+
import { htmlSlot } from "../../lib/templates.js";
|
4
|
+
import { createScope, define, GodownElement } from "../../root.js";
|
5
|
+
const defineName = "divider-line";
|
12
6
|
const cssvarScope = createScope(defineName);
|
13
7
|
/**
|
14
|
-
*
|
8
|
+
* DividerLine similar to hr.
|
15
9
|
*/
|
16
|
-
let
|
10
|
+
let DividerLine = class DividerLine extends GodownElement {
|
17
11
|
constructor() {
|
18
12
|
super(...arguments);
|
19
13
|
/**
|
@@ -29,7 +23,7 @@ let DivLine = class DivLine extends LayoutSTD {
|
|
29
23
|
</div>`;
|
30
24
|
}
|
31
25
|
};
|
32
|
-
|
26
|
+
DividerLine.styles = [
|
33
27
|
css `
|
34
28
|
:host {
|
35
29
|
${cssvarScope}--before-length: auto;
|
@@ -81,10 +75,10 @@ DivLine.styles = [
|
|
81
75
|
];
|
82
76
|
__decorate([
|
83
77
|
property({ type: Boolean })
|
84
|
-
],
|
85
|
-
|
78
|
+
], DividerLine.prototype, "v", void 0);
|
79
|
+
DividerLine = __decorate([
|
86
80
|
define(defineName)
|
87
|
-
],
|
88
|
-
export {
|
89
|
-
export default
|
90
|
-
//# sourceMappingURL=
|
81
|
+
], DividerLine);
|
82
|
+
export { DividerLine };
|
83
|
+
export default DividerLine;
|
84
|
+
//# sourceMappingURL=divider-line.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"divider-line.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/layout/divider-line.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAqB,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnE,MAAM,UAAU,GAAG,cAAc,CAAC;AAClC,MAAM,WAAW,GAAG,WAAW,CAAC,UAAU,CAAC,CAAC;AAE5C;;GAEG;AAEI,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,aAAa;IAAvC;;QACL;;WAEG;QAC0B,MAAC,GAAG,KAAK,CAAC;IA4DzC,CAAC;IAPW,MAAM;QACd,OAAO,IAAI,CAAA,eAAe,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE;;QAEvC,QAAQ,EAAE;;WAEP,CAAC;IACV,CAAC;;AAzDM,kBAAM,GAAG;IACd,GAAG,CAAA;;UAEG,WAAW;UACX,WAAW;UACX,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBA4BC,WAAW;yBACR,WAAW;;;sBAGd,WAAW;yBACR,WAAW;;;qBAGf,WAAW;0BACN,WAAW;;;qBAGhB,WAAW;0BACN,WAAW;;KAEhC;CACF,AAjDY,CAiDX;AAnD2B;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;sCAAW;AAJ5B,WAAW;IADvB,MAAM,CAAC,UAAU,CAAC;GACN,WAAW,CAgEvB;;AAED,eAAe,WAAW,CAAC","sourcesContent":["import { css, html, property } from \"../../deps.js\";\nimport { htmlSlot, type HTMLTemplate } from \"../../lib/templates.js\";\nimport { createScope, define, GodownElement } from \"../../root.js\";\n\nconst defineName = \"divider-line\";\nconst cssvarScope = createScope(defineName);\n\n/**\n * DividerLine similar to hr.\n */\n@define(defineName)\nexport class DividerLine extends GodownElement {\n /**\n * Enable vertical.\n */\n @property({ type: Boolean }) v = false;\n\n static styles = [\n css`\n :host {\n ${cssvarScope}--before-length: auto;\n ${cssvarScope}--after-length: auto;\n ${cssvarScope}--breadth: .125em;\n display: block;\n color: currentColor;\n background: none;\n }\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\n .v {\n height: 100%;\n display: flex;\n flex-direction: column;\n }\n\n .before {\n height: var(${cssvarScope}--breadth);\n max-width: var(${cssvarScope}--before-length);\n }\n .after {\n height: var(${cssvarScope}--breadth);\n max-width: var(${cssvarScope}--after-length);\n }\n .v .before {\n width: var(${cssvarScope}--breadth);\n max-height: var(${cssvarScope}--before-length);\n }\n .v .after {\n width: var(${cssvarScope}--breadth);\n max-height: var(${cssvarScope}--after-length);\n }\n `,\n ];\n\n protected render(): HTMLTemplate {\n return html`<div class=\"${this.v ? \"v\" : \"\"}\">\n <hr class=\"before\" />\n ${htmlSlot()}\n <hr class=\"after\" />\n </div>`;\n }\n}\n\nexport default DividerLine;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"divider-line\": DividerLine;\n }\n}\n"]}
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import { type HTMLTemplate } from "
|
2
|
-
import
|
1
|
+
import { type HTMLTemplate } from "../../lib/templates.js";
|
2
|
+
import { GodownElement } from "../../root.js";
|
3
3
|
/**
|
4
4
|
* FlexFlow controls the flex layout based on the width of the screen.
|
5
5
|
*/
|
6
|
-
export declare class FlexFlow extends
|
6
|
+
export declare class FlexFlow extends GodownElement {
|
7
7
|
/**
|
8
8
|
* The flex-flow behavior.
|
9
9
|
*/
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"flex-flow.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/layout/flex-flow.ts"],"names":[],"mappings":"AACA,OAAO,EAAuB,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,EAAU,aAAa,EAAE,MAAM,eAAe,CAAC;AAItD;;GAEG;AACH,qBACa,QAAS,SAAQ,aAAa;IACzC;;OAEG;IACS,QAAQ,SAA8B;IAClD;;OAEG;IACS,MAAM,SAAW;IAE7B,MAAM,CAAC,MAAM,4BAMX;IAEF,SAAS,CAAC,MAAM,IAAI,YAAY;CAUjC;AAED,eAAe,QAAQ,CAAC;AACxB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
|
@@ -1,18 +1,12 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
6
|
-
};
|
7
|
-
import { css, html, property } from "../deps.js";
|
8
|
-
import { htmlSlot, htmlStyle } from "../lib/templates.js";
|
9
|
-
import { define } from "../root.js";
|
10
|
-
import LayoutSTD from "./std.js";
|
1
|
+
import { __decorate } from "tslib";
|
2
|
+
import { css, html, property } from "../../deps.js";
|
3
|
+
import { htmlSlot, htmlStyle } from "../../lib/templates.js";
|
4
|
+
import { define, GodownElement } from "../../root.js";
|
11
5
|
const defineName = "flex-flow";
|
12
6
|
/**
|
13
7
|
* FlexFlow controls the flex layout based on the width of the screen.
|
14
8
|
*/
|
15
|
-
let FlexFlow = class FlexFlow extends
|
9
|
+
let FlexFlow = class FlexFlow extends GodownElement {
|
16
10
|
constructor() {
|
17
11
|
super(...arguments);
|
18
12
|
/**
|