godown 2.5.1 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +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-list.d.ts +2 -0
- package/open-list.d.ts.map +1 -0
- package/open-list.js +2 -0
- package/open-list.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 +57 -10
- package/react/create.d.ts.map +1 -1
- package/react/create.js.map +1 -1
- package/react/index.d.ts +37 -7
- package/react/index.d.ts.map +1 -1
- package/react/index.js +114 -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 +57 -62
- 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 +34 -40
- 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 +99 -105
- 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} +87 -92
- 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} +32 -40
- 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 +24 -30
- 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 +12 -18
- 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 +50 -56
- package/web-components/group/tab-group.js.map +1 -0
- package/web-components/index.d.ts +38 -0
- package/web-components/index.d.ts.map +1 -0
- package/web-components/index.js +39 -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 +79 -84
- 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} +27 -54
- 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 +55 -60
- 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 +59 -64
- 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 +95 -100
- 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 +56 -61
- 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 +42 -47
- 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 +38 -43
- 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 +57 -63
- 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 +13 -19
- 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 +12 -17
- 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} +24 -30
- 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 +12 -18
- package/web-components/layout/flex-flow.js.map +1 -0
- package/web-components/layout/index.d.ts +5 -0
- package/web-components/layout/index.d.ts.map +1 -0
- package/web-components/layout/index.js +6 -0
- package/web-components/layout/index.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 +19 -25
- 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 +31 -37
- 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} +41 -47
- 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 +24 -30
- 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/{view/details-expand.js → web-components/open/open-details.js} +35 -40
- package/web-components/open/open-details.js.map +1 -0
- package/{items/dialog-item.d.ts → web-components/open/open-dialog.d.ts} +8 -8
- package/web-components/open/open-dialog.d.ts.map +1 -0
- package/{items/dialog-item.js → web-components/open/open-dialog.js} +83 -89
- package/web-components/open/open-dialog.js.map +1 -0
- package/web-components/open/open-list.d.ts +20 -0
- package/web-components/open/open-list.d.ts.map +1 -0
- package/web-components/open/open-list.js +71 -0
- package/web-components/open/open-list.js.map +1 -0
- package/{view/offset-expand.d.ts → web-components/open/open-offset.d.ts} +8 -8
- package/web-components/open/open-offset.d.ts.map +1 -0
- package/{view/offset-expand.js → web-components/open/open-offset.js} +66 -71
- 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} +28 -33
- package/web-components/open/open-tooltip.js.map +1 -0
- package/{view/std.d.ts → web-components/open/open.d.ts} +6 -6
- package/web-components/open/open.d.ts.map +1 -0
- package/{view/std.js → web-components/open/open.js} +35 -40
- 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/web-components/text/clip-text.js +44 -0
- 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 +21 -27
- 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 +38 -44
- package/web-components/text/typewriter-text.js.map +1 -0
- package/{view → web-components/view}/route-view.d.ts +4 -4
- package/web-components/view/route-view.d.ts.map +1 -0
- package/{view → web-components/view}/route-view.js +15 -20
- 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 +35 -40
- 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} +29 -34
- 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 +0 -50
- 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.map +0 -1
- 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.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.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.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,17 +1,11 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
6
|
-
};
|
7
|
-
import { css, html, property, query } from "../deps.js";
|
8
|
-
import { cssvarValues, define } from "../root.js";
|
9
|
-
import ItemsSTD from "./std.js";
|
10
|
-
const defineName = "dialog-item";
|
1
|
+
import { __decorate } from "tslib";
|
2
|
+
import { css, html, property, query } from "../../deps.js";
|
3
|
+
import { cssvarValues, define, GodownElement } from "../../root.js";
|
4
|
+
const defineName = "open-dialog";
|
11
5
|
/**
|
12
|
-
*
|
6
|
+
* OpenDialog similar to dialog.
|
13
7
|
*/
|
14
|
-
let
|
8
|
+
let OpenDialog = class OpenDialog extends GodownElement {
|
15
9
|
constructor() {
|
16
10
|
super(...arguments);
|
17
11
|
/**
|
@@ -39,70 +33,8 @@ let DialogItem = class DialogItem extends ItemsSTD {
|
|
39
33
|
*/
|
40
34
|
this.direction = "center";
|
41
35
|
}
|
42
|
-
|
43
|
-
|
44
|
-
<slot class="${this.direction}"></slot>
|
45
|
-
</div>`;
|
46
|
-
}
|
47
|
-
connectedCallback() {
|
48
|
-
super.connectedCallback();
|
49
|
-
this.addEvent(this, "submit", this._handelSubmit);
|
50
|
-
if (this.scale) {
|
51
|
-
this.addEvent(this, "wheel", this._handleWheel);
|
52
|
-
}
|
53
|
-
if (this.key) {
|
54
|
-
this.addEvent(document, "keydown", this._handleKeydown.bind(this));
|
55
|
-
}
|
56
|
-
if (this.open) {
|
57
|
-
this.show();
|
58
|
-
}
|
59
|
-
}
|
60
|
-
show() {
|
61
|
-
this.open = true;
|
62
|
-
}
|
63
|
-
showModal() {
|
64
|
-
this.modal = true;
|
65
|
-
this.show();
|
66
|
-
}
|
67
|
-
close() {
|
68
|
-
this.open = false;
|
69
|
-
}
|
70
|
-
updated(changedProperties) {
|
71
|
-
const hasOpen = changedProperties.has("open");
|
72
|
-
if (hasOpen) {
|
73
|
-
this.dispatchEvent(new CustomEvent(this.open ? "open" : "close"));
|
74
|
-
}
|
75
|
-
}
|
76
|
-
_handleWheel(e) {
|
77
|
-
if (this.scale) {
|
78
|
-
const s = this._div.style.transform.match(/scale\((.*)\)/);
|
79
|
-
let scale = 1;
|
80
|
-
if (s) {
|
81
|
-
scale = Number(s[1]);
|
82
|
-
}
|
83
|
-
if (e.deltaY > 0) {
|
84
|
-
scale -= this.gap;
|
85
|
-
}
|
86
|
-
else {
|
87
|
-
scale += this.gap;
|
88
|
-
}
|
89
|
-
this._div.style.transform = `scale(${scale})`;
|
90
|
-
}
|
91
|
-
}
|
92
|
-
_handleKeydown(e) {
|
93
|
-
const keys = this.key.split(/[^a-zA-Z0-9]/).filter((s) => s);
|
94
|
-
if (keys.includes(e.key) || keys.includes(e.code)) {
|
95
|
-
this.close();
|
96
|
-
}
|
97
|
-
}
|
98
|
-
_handelSubmit(e) {
|
99
|
-
if (e.target.method === "dialog") {
|
100
|
-
this.close();
|
101
|
-
}
|
102
|
-
}
|
103
|
-
};
|
104
|
-
DialogItem.styles = [
|
105
|
-
css `
|
36
|
+
static { this.styles = [
|
37
|
+
css `
|
106
38
|
:host {
|
107
39
|
position: fixed;
|
108
40
|
height: 100%;
|
@@ -178,31 +110,93 @@ DialogItem.styles = [
|
|
178
110
|
transform: translateX(-15%);
|
179
111
|
}
|
180
112
|
`,
|
181
|
-
];
|
113
|
+
]; }
|
114
|
+
render() {
|
115
|
+
return html `<div>
|
116
|
+
<slot class="${this.direction}"></slot>
|
117
|
+
</div>`;
|
118
|
+
}
|
119
|
+
connectedCallback() {
|
120
|
+
super.connectedCallback();
|
121
|
+
this.addEvent(this, "submit", this._handelSubmit);
|
122
|
+
if (this.scale) {
|
123
|
+
this.addEvent(this, "wheel", this._handleWheel);
|
124
|
+
}
|
125
|
+
if (this.key) {
|
126
|
+
this.addEvent(document, "keydown", this._handleKeydown.bind(this));
|
127
|
+
}
|
128
|
+
if (this.open) {
|
129
|
+
this.show();
|
130
|
+
}
|
131
|
+
}
|
132
|
+
show() {
|
133
|
+
this.open = true;
|
134
|
+
}
|
135
|
+
showModal() {
|
136
|
+
this.modal = true;
|
137
|
+
this.show();
|
138
|
+
}
|
139
|
+
close() {
|
140
|
+
this.open = false;
|
141
|
+
}
|
142
|
+
updated(changedProperties) {
|
143
|
+
const hasOpen = changedProperties.has("open");
|
144
|
+
if (hasOpen) {
|
145
|
+
this.dispatchEvent(new CustomEvent(this.open ? "open" : "close"));
|
146
|
+
}
|
147
|
+
}
|
148
|
+
_handleWheel(e) {
|
149
|
+
if (this.scale) {
|
150
|
+
const s = this._div.style.transform.match(/scale\((.*)\)/);
|
151
|
+
let scale = 1;
|
152
|
+
if (s) {
|
153
|
+
scale = Number(s[1]);
|
154
|
+
}
|
155
|
+
if (e.deltaY > 0) {
|
156
|
+
scale -= this.gap;
|
157
|
+
}
|
158
|
+
else {
|
159
|
+
scale += this.gap;
|
160
|
+
}
|
161
|
+
this._div.style.transform = `scale(${scale})`;
|
162
|
+
}
|
163
|
+
}
|
164
|
+
_handleKeydown(e) {
|
165
|
+
const keys = this.key.split(/[^a-zA-Z0-9]/).filter((s) => s);
|
166
|
+
if (keys.includes(e.key) || keys.includes(e.code)) {
|
167
|
+
this.close();
|
168
|
+
}
|
169
|
+
}
|
170
|
+
_handelSubmit(e) {
|
171
|
+
if (e.target.method === "dialog") {
|
172
|
+
this.close();
|
173
|
+
}
|
174
|
+
}
|
175
|
+
};
|
182
176
|
__decorate([
|
183
177
|
property({ type: Boolean, reflect: true })
|
184
|
-
],
|
178
|
+
], OpenDialog.prototype, "modal", void 0);
|
185
179
|
__decorate([
|
186
180
|
property({ type: Boolean, reflect: true })
|
187
|
-
],
|
181
|
+
], OpenDialog.prototype, "open", void 0);
|
188
182
|
__decorate([
|
189
183
|
property({ type: Boolean })
|
190
|
-
],
|
184
|
+
], OpenDialog.prototype, "scale", void 0);
|
191
185
|
__decorate([
|
192
186
|
property({ type: Number })
|
193
|
-
],
|
187
|
+
], OpenDialog.prototype, "gap", void 0);
|
194
188
|
__decorate([
|
195
189
|
property({ type: String })
|
196
|
-
],
|
190
|
+
], OpenDialog.prototype, "key", void 0);
|
197
191
|
__decorate([
|
198
192
|
property({ type: String })
|
199
|
-
],
|
193
|
+
], OpenDialog.prototype, "direction", void 0);
|
200
194
|
__decorate([
|
201
195
|
query("div")
|
202
|
-
],
|
203
|
-
|
196
|
+
], OpenDialog.prototype, "_div", void 0);
|
197
|
+
OpenDialog = __decorate([
|
204
198
|
define(defineName)
|
205
|
-
],
|
206
|
-
export {
|
207
|
-
export default
|
208
|
-
//# sourceMappingURL=dialog
|
199
|
+
], OpenDialog);
|
200
|
+
export { OpenDialog };
|
201
|
+
export default OpenDialog;
|
202
|
+
//# sourceMappingURL=open-dialog.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"open-dialog.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/open/open-dialog.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAyB,KAAK,EAAE,MAAM,eAAe,CAAC;AAElF,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAIpE,MAAM,UAAU,GAAG,aAAa,CAAC;AAEjC;;GAEG;AAEI,IAAM,UAAU,GAAhB,MAAM,UAAW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,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;;AA1K2C;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCAAe;AAId;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;wCAAc;AAI5B;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;yCAAe;AAIf;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uCAAW;AAIV;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uCAAgB;AAIf;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAAkC;AAE/C;IAAb,KAAK,CAAC,KAAK,CAAC;wCAAsB;AA1BxB,UAAU;IADtB,MAAM,CAAC,UAAU,CAAC;GACN,UAAU,CA+KtB;;AAED,eAAe,UAAU,CAAC","sourcesContent":["import { css, html, property, type PropertyValueMap, query } from \"../../deps.js\";\nimport { type HTMLTemplate } from \"../../lib/templates.js\";\nimport { cssvarValues, define, GodownElement } from \"../../root.js\";\n\ntype Direction5 = \"left\" | \"center\" | \"right\" | \"top\" | \"bottom\";\n\nconst defineName = \"open-dialog\";\n\n/**\n * OpenDialog similar to dialog.\n */\n@define(defineName)\nexport class OpenDialog extends GodownElement {\n /**\n * Enable modal.\n */\n @property({ type: Boolean, reflect: true }) modal = false;\n /**\n * Whether this element is activated.\n */\n @property({ type: Boolean, reflect: true }) open = false;\n /**\n * Enable scale.\n */\n @property({ type: Boolean }) scale = false;\n /**\n * Scale gap.\n */\n @property({ type: Number }) gap = 0.1;\n /**\n * Exit key, which can be multiple.\n */\n @property({ type: String }) key = \"Escape\";\n /**\n * The direction in which it appears.\n */\n @property({ type: String }) direction: Direction5 = \"center\";\n\n @query(\"div\") _div: HTMLDivElement;\n\n static styles = [\n css`\n :host {\n position: fixed;\n height: 100%;\n width: 100%;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n transition: all 0.3s;\n display: flex;\n visibility: hidden;\n background: rgb(${cssvarValues.mainRGB} / 0%);\n pointer-events: none;\n }\n\n :host([open]) {\n visibility: visible;\n }\n\n :host([open][modal]) {\n pointer-events: all;\n backdrop-filter: blur(0.25px);\n background: rgb(${cssvarValues.mainRGB} / 20%);\n }\n\n :host([open]) slot {\n opacity: 1 !important;\n transform: translateY(0) translateX(0) !important;\n }\n\n div {\n height: 100%;\n width: 100%;\n display: flex;\n transition: inherit;\n }\n\n slot {\n display: block;\n width: fit-content;\n height: fit-content;\n margin: auto;\n opacity: 0;\n transition: inherit;\n pointer-events: all;\n }\n\n .center {\n transform: translateY(-15%);\n }\n\n .top {\n width: 100%;\n margin-top: 0;\n transform: translateY(-15%);\n }\n\n .right {\n height: 100%;\n margin-right: 0;\n transform: translateX(15%);\n }\n\n .bottom {\n width: 100%;\n margin-bottom: 0;\n transform: translateY(15%);\n }\n\n .left {\n height: 100%;\n margin-left: 0;\n transform: translateX(-15%);\n }\n `,\n ];\n\n protected render(): HTMLTemplate {\n return html`<div>\n <slot class=\"${this.direction}\"></slot>\n </div>`;\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.addEvent(this, \"submit\", this._handelSubmit);\n if (this.scale) {\n this.addEvent(this, \"wheel\", this._handleWheel);\n }\n if (this.key) {\n this.addEvent(document, \"keydown\", this._handleKeydown.bind(this));\n }\n if (this.open) {\n this.show();\n }\n }\n\n show() {\n this.open = true;\n }\n\n showModal() {\n this.modal = true;\n this.show();\n }\n\n close() {\n this.open = false;\n }\n\n protected updated(changedProperties: PropertyValueMap<this>) {\n const hasOpen = changedProperties.has(\"open\");\n if (hasOpen) {\n this.dispatchEvent(new CustomEvent(this.open ? \"open\" : \"close\"));\n }\n }\n\n protected _handleWheel(e: any) {\n if (this.scale) {\n const s = this._div.style.transform.match(/scale\\((.*)\\)/);\n let scale = 1;\n if (s) {\n scale = Number(s[1]);\n }\n if (e.deltaY > 0) {\n scale -= this.gap;\n } else {\n scale += this.gap;\n }\n this._div.style.transform = `scale(${scale})`;\n }\n }\n\n protected _handleKeydown(e: KeyboardEvent) {\n const keys = this.key.split(/[^a-zA-Z0-9]/).filter((s) => 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 OpenDialog;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"open-dialog\": OpenDialog;\n }\n}\n"]}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { type CSSResultGroup } from "../../deps.js";
|
2
|
+
import { type HTMLTemplate } from "../../lib/templates.js";
|
3
|
+
import { OpenableElement } from "./open.js";
|
4
|
+
/**
|
5
|
+
* OpenList renders the menu when it has a summary, otherwise a list.
|
6
|
+
*
|
7
|
+
* Inspired by Docusaurus (v1,v2).
|
8
|
+
*/
|
9
|
+
export declare class OpenList extends OpenableElement {
|
10
|
+
_section: HTMLElement;
|
11
|
+
static styles: CSSResultGroup;
|
12
|
+
protected render(): HTMLTemplate;
|
13
|
+
}
|
14
|
+
export default OpenList;
|
15
|
+
declare global {
|
16
|
+
interface HTMLElementTagNameMap {
|
17
|
+
"open-list": OpenList;
|
18
|
+
}
|
19
|
+
}
|
20
|
+
//# sourceMappingURL=open-list.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"open-list.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/open/open-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,cAAc,EAAe,MAAM,eAAe,CAAC;AAEtE,OAAO,EAAY,KAAK,YAAY,EAAY,MAAM,wBAAwB,CAAC;AAE/E,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAI5C;;;;GAIG;AACH,qBACa,QAAS,SAAQ,eAAe;IACzB,QAAQ,EAAE,WAAW,CAAC;IACxC,MAAM,CAAC,MAAM,iBAgCO;IAEpB,SAAS,CAAC,MAAM,IAAI,YAAY;CAejC;AAED,eAAe,QAAQ,CAAC;AAExB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
|
@@ -0,0 +1,71 @@
|
|
1
|
+
import { __decorate } from "tslib";
|
2
|
+
import { css, html, query } from "../../deps.js";
|
3
|
+
import { ifValue } from "../../lib/directives.js";
|
4
|
+
import { htmlSlot, svgArrow } from "../../lib/templates.js";
|
5
|
+
import { cssvarValues, define } from "../../root.js";
|
6
|
+
import { OpenableElement } from "./open.js";
|
7
|
+
const defineName = "open-list";
|
8
|
+
/**
|
9
|
+
* OpenList renders the menu when it has a summary, otherwise a list.
|
10
|
+
*
|
11
|
+
* Inspired by Docusaurus (v1,v2).
|
12
|
+
*/
|
13
|
+
let OpenList = class OpenList extends OpenableElement {
|
14
|
+
static { this.styles = [
|
15
|
+
OpenableElement.styles,
|
16
|
+
css `
|
17
|
+
i {
|
18
|
+
width: 1.2em;
|
19
|
+
height: 1.2em;
|
20
|
+
display: inline-flex;
|
21
|
+
align-items: center;
|
22
|
+
border-radius: 20%;
|
23
|
+
transition: inherit;
|
24
|
+
}
|
25
|
+
|
26
|
+
dt i {
|
27
|
+
background: rgb(var(${cssvarValues.mainRGB}) / 0.055);
|
28
|
+
}
|
29
|
+
|
30
|
+
dt i:hover {
|
31
|
+
background: rgb(var(${cssvarValues.mainRGB}) / 0.075);
|
32
|
+
}
|
33
|
+
|
34
|
+
dd {
|
35
|
+
padding: 0.2em;
|
36
|
+
}
|
37
|
+
|
38
|
+
:host([open]) svg {
|
39
|
+
transform: rotate(90deg);
|
40
|
+
}
|
41
|
+
|
42
|
+
.noTitle {
|
43
|
+
display: none;
|
44
|
+
}
|
45
|
+
`,
|
46
|
+
]; }
|
47
|
+
render() {
|
48
|
+
const noTitle = !this.summary && ifValue(!this.querySelector("[slot=summary]"), "noTitle");
|
49
|
+
if (noTitle) {
|
50
|
+
this.open = true;
|
51
|
+
}
|
52
|
+
return html `<dl>
|
53
|
+
<dt class="${noTitle}">
|
54
|
+
<span>${this.summary || htmlSlot("summary")}</span>
|
55
|
+
<i @click="${this._handelClick}"> ${htmlSlot("icon", svgArrow(), this)} </i>
|
56
|
+
</dt>
|
57
|
+
<dd>
|
58
|
+
<section>${htmlSlot()}</section>
|
59
|
+
</dd>
|
60
|
+
</dl>`;
|
61
|
+
}
|
62
|
+
};
|
63
|
+
__decorate([
|
64
|
+
query("section")
|
65
|
+
], OpenList.prototype, "_section", void 0);
|
66
|
+
OpenList = __decorate([
|
67
|
+
define(defineName)
|
68
|
+
], OpenList);
|
69
|
+
export { OpenList };
|
70
|
+
export default OpenList;
|
71
|
+
//# sourceMappingURL=open-list.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"open-list.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/open/open-list.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAuB,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAqB,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAC/E,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAE5C,MAAM,UAAU,GAAG,WAAW,CAAC;AAE/B;;;;GAIG;AAEI,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,eAAe;aAEpC,WAAM,GAAG;QACd,eAAe,CAAC,MAAM;QACtB,GAAG,CAAA;;;;;;;;;;;8BAWuB,YAAY,CAAC,OAAO;;;;8BAIpB,YAAY,CAAC,OAAO;;;;;;;;;;;;;;KAc7C;KACgB,AAhCN,CAgCO;IAEV,MAAM;QACd,MAAM,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,gBAAgB,CAAC,EAAE,SAAS,CAAC,CAAC;QAC3F,IAAI,OAAO,EAAE,CAAC;YACZ,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACnB,CAAC;QACD,OAAO,IAAI,CAAA;mBACI,OAAO;gBACV,IAAI,CAAC,OAAO,IAAI,QAAQ,CAAC,SAAS,CAAC;qBAC9B,IAAI,CAAC,YAAY,MAAM,QAAQ,CAAC,MAAM,EAAE,QAAQ,EAAE,EAAE,IAAI,CAAC;;;mBAG3D,QAAQ,EAAE;;UAEnB,CAAC;IACT,CAAC;;AAjDiB;IAAjB,KAAK,CAAC,SAAS,CAAC;0CAAuB;AAD7B,QAAQ;IADpB,MAAM,CAAC,UAAU,CAAC;GACN,QAAQ,CAmDpB;;AAED,eAAe,QAAQ,CAAC","sourcesContent":["import { css, type CSSResultGroup, html, query } from \"../../deps.js\";\nimport { ifValue } from \"../../lib/directives.js\";\nimport { htmlSlot, type HTMLTemplate, svgArrow } from \"../../lib/templates.js\";\nimport { cssvarValues, define } from \"../../root.js\";\nimport { OpenableElement } from \"./open.js\";\n\nconst defineName = \"open-list\";\n\n/**\n * OpenList renders the menu when it has a summary, otherwise a list.\n *\n * Inspired by Docusaurus (v1,v2).\n */\n@define(defineName)\nexport class OpenList extends OpenableElement {\n @query(\"section\") _section: HTMLElement;\n static styles = [\n OpenableElement.styles,\n css`\n i {\n width: 1.2em;\n height: 1.2em;\n display: inline-flex;\n align-items: center;\n border-radius: 20%;\n transition: inherit;\n }\n\n dt i {\n background: rgb(var(${cssvarValues.mainRGB}) / 0.055);\n }\n\n dt i:hover {\n background: rgb(var(${cssvarValues.mainRGB}) / 0.075);\n }\n\n dd {\n padding: 0.2em;\n }\n\n :host([open]) svg {\n transform: rotate(90deg);\n }\n\n .noTitle {\n display: none;\n }\n `,\n ] as CSSResultGroup;\n\n protected render(): HTMLTemplate {\n const noTitle = !this.summary && ifValue(!this.querySelector(\"[slot=summary]\"), \"noTitle\");\n if (noTitle) {\n this.open = true;\n }\n return html`<dl>\n <dt class=\"${noTitle}\">\n <span>${this.summary || htmlSlot(\"summary\")}</span>\n <i @click=\"${this._handelClick}\"> ${htmlSlot(\"icon\", svgArrow(), this)} </i>\n </dt>\n <dd>\n <section>${htmlSlot()}</section>\n </dd>\n </dl>`;\n }\n}\n\nexport default OpenList;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"open-list\": OpenList;\n }\n}\n"]}
|
@@ -1,12 +1,12 @@
|
|
1
|
-
import { type CSSResultGroup } from "
|
2
|
-
import { type
|
3
|
-
import { type
|
1
|
+
import { type CSSResultGroup } from "../../deps.js";
|
2
|
+
import { type HTMLTemplate } from "../../lib/templates.js";
|
3
|
+
import { type Direction4, OpenableElement } from "./open.js";
|
4
4
|
/**
|
5
|
-
*
|
5
|
+
* OpenOffset will calculate a lateral offset to try to keep the content within the allowable range.
|
6
6
|
*
|
7
7
|
* Content can be opened in 4 directions.
|
8
8
|
*/
|
9
|
-
export declare class
|
9
|
+
export declare class OpenOffset extends OpenableElement {
|
10
10
|
direction: Direction4;
|
11
11
|
private _span;
|
12
12
|
private _balancer;
|
@@ -18,10 +18,10 @@ export declare class OffsetExpand extends OpenAble {
|
|
18
18
|
protected _handelResize(): void;
|
19
19
|
resize(): void;
|
20
20
|
}
|
21
|
-
export default
|
21
|
+
export default OpenOffset;
|
22
22
|
declare global {
|
23
23
|
interface HTMLElementTagNameMap {
|
24
|
-
"offset
|
24
|
+
"open-offset": OpenOffset;
|
25
25
|
}
|
26
26
|
}
|
27
|
-
//# sourceMappingURL=offset
|
27
|
+
//# sourceMappingURL=open-offset.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"open-offset.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/open/open-offset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,cAAc,EAAe,MAAM,eAAe,CAAC;AACtE,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAGrE,OAAO,EAAE,KAAK,UAAU,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAI7D;;;;GAIG;AACH,qBACa,UAAW,SAAQ,eAAe;IAC7C,SAAS,EAAE,UAAU,CAAC;IAEP,OAAO,CAAC,KAAK,CAAc;IAC1B,OAAO,CAAC,SAAS,CAAc;IAE/C,MAAM,CAAC,MAAM,iBAiDO;IAEpB,SAAS,CAAC,MAAM,IAAI,YAAY;IAOhC,iBAAiB;cAKD,YAAY;IAM5B,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,UAAU;IAQpC,SAAS,CAAC,aAAa;IAKvB,MAAM;CA2BP;AAED,eAAe,UAAU,CAAC;AAE1B,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,UAAU,CAAC;KAC3B;CACF"}
|
@@ -1,21 +1,66 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
};
|
7
|
-
|
8
|
-
import { OpenAble } from "./std.js";
|
9
|
-
import { htmlSlot } from "../lib/templates.js";
|
10
|
-
import { debounce } from "../lib/utils.js";
|
11
|
-
import { define } from "../root.js";
|
12
|
-
const defineName = "offset-expand";
|
1
|
+
import { __decorate } from "tslib";
|
2
|
+
import { css, html, query } from "../../deps.js";
|
3
|
+
import { htmlSlot } from "../../lib/templates.js";
|
4
|
+
import { debounce } from "../../lib/utils.js";
|
5
|
+
import { define } from "../../root.js";
|
6
|
+
import { OpenableElement } from "./open.js";
|
7
|
+
const defineName = "open-offset";
|
13
8
|
/**
|
14
|
-
*
|
9
|
+
* OpenOffset will calculate a lateral offset to try to keep the content within the allowable range.
|
15
10
|
*
|
16
11
|
* Content can be opened in 4 directions.
|
17
12
|
*/
|
18
|
-
let
|
13
|
+
let OpenOffset = class OpenOffset extends OpenableElement {
|
14
|
+
static { this.styles = [
|
15
|
+
css `
|
16
|
+
:host {
|
17
|
+
display: block;
|
18
|
+
height: fit-content;
|
19
|
+
width: fit-content;
|
20
|
+
}
|
21
|
+
|
22
|
+
span {
|
23
|
+
user-select: none;
|
24
|
+
}
|
25
|
+
|
26
|
+
main {
|
27
|
+
height: inherit;
|
28
|
+
width: inherit;
|
29
|
+
display: flex;
|
30
|
+
position: relative;
|
31
|
+
align-items: center;
|
32
|
+
}
|
33
|
+
|
34
|
+
aside {
|
35
|
+
background-color: inherit;
|
36
|
+
visibility: hidden;
|
37
|
+
top: 100%;
|
38
|
+
z-index: 1;
|
39
|
+
}
|
40
|
+
|
41
|
+
:host([open]) aside {
|
42
|
+
visibility: visible;
|
43
|
+
}
|
44
|
+
|
45
|
+
:host([float]) aside {
|
46
|
+
position: absolute;
|
47
|
+
}
|
48
|
+
`,
|
49
|
+
css `
|
50
|
+
.left {
|
51
|
+
flex-direction: row-reverse;
|
52
|
+
}
|
53
|
+
.right {
|
54
|
+
flex-direction: row;
|
55
|
+
}
|
56
|
+
.top {
|
57
|
+
flex-direction: column-reverse;
|
58
|
+
}
|
59
|
+
.bottom {
|
60
|
+
flex-direction: column;
|
61
|
+
}
|
62
|
+
`,
|
63
|
+
]; }
|
19
64
|
render() {
|
20
65
|
return html `<main class="${this.direction || "bottom"}">
|
21
66
|
<span>${this.summary || htmlSlot("summary")}</span>
|
@@ -74,65 +119,15 @@ let OffsetExpand = class OffsetExpand extends OpenAble {
|
|
74
119
|
}
|
75
120
|
}
|
76
121
|
};
|
77
|
-
OffsetExpand.styles = [
|
78
|
-
css `
|
79
|
-
:host {
|
80
|
-
display: block;
|
81
|
-
height: fit-content;
|
82
|
-
width: fit-content;
|
83
|
-
}
|
84
|
-
|
85
|
-
span {
|
86
|
-
user-select: none;
|
87
|
-
}
|
88
|
-
|
89
|
-
main {
|
90
|
-
height: inherit;
|
91
|
-
width: inherit;
|
92
|
-
display: flex;
|
93
|
-
position: relative;
|
94
|
-
align-items: center;
|
95
|
-
}
|
96
|
-
|
97
|
-
aside {
|
98
|
-
background-color: inherit;
|
99
|
-
visibility: hidden;
|
100
|
-
top: 100%;
|
101
|
-
z-index: 1;
|
102
|
-
}
|
103
|
-
|
104
|
-
:host([open]) aside {
|
105
|
-
visibility: visible;
|
106
|
-
}
|
107
|
-
|
108
|
-
:host([float]) aside {
|
109
|
-
position: absolute;
|
110
|
-
}
|
111
|
-
`,
|
112
|
-
css `
|
113
|
-
.left {
|
114
|
-
flex-direction: row-reverse;
|
115
|
-
}
|
116
|
-
.right {
|
117
|
-
flex-direction: row;
|
118
|
-
}
|
119
|
-
.top {
|
120
|
-
flex-direction: column-reverse;
|
121
|
-
}
|
122
|
-
.bottom {
|
123
|
-
flex-direction: column;
|
124
|
-
}
|
125
|
-
`,
|
126
|
-
];
|
127
122
|
__decorate([
|
128
123
|
query("span")
|
129
|
-
],
|
124
|
+
], OpenOffset.prototype, "_span", void 0);
|
130
125
|
__decorate([
|
131
126
|
query("aside")
|
132
|
-
],
|
133
|
-
|
127
|
+
], OpenOffset.prototype, "_balancer", void 0);
|
128
|
+
OpenOffset = __decorate([
|
134
129
|
define(defineName)
|
135
|
-
],
|
136
|
-
export {
|
137
|
-
export default
|
138
|
-
//# sourceMappingURL=offset
|
130
|
+
], OpenOffset);
|
131
|
+
export { OpenOffset };
|
132
|
+
export default OpenOffset;
|
133
|
+
//# sourceMappingURL=open-offset.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"open-offset.js","sourceRoot":"https://github.com/startracex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KAAK,EAAE,CAAC;gBAC1B,MAAM,cAAc,GAAG,OAAO,CAAC,KAAK,GAAG,CAAC,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;gBAC3D,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,SAAS,GAAG,cAAc,cAAc,KAAK,CAAC;YACrE,CAAC;iBAAM,IAAI,IAAI,GAAG,CAAC,EAAE,CAAC;gBACpB,MAAM,aAAa,GAAG,CAAC,IAAI,CAAC;gBAC5B,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,SAAS,GAAG,cAAc,aAAa,KAAK,CAAC;YACpE,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,SAAS,GAAG,EAAE,CAAC;YACtC,CAAC;QACH,CAAC;IACH,CAAC;;AA/GsB;IAAtB,KAAK,CAAC,MAAM,CAAC;yCAA4B;AAClB;IAAvB,KAAK,CAAC,OAAO,CAAC;6CAAgC;AAJpC,UAAU;IADtB,MAAM,CAAC,UAAU,CAAC;GACN,UAAU,CAmHtB;;AAED,eAAe,UAAU,CAAC","sourcesContent":["import { css, type CSSResultGroup, html, query } from \"../../deps.js\";\nimport { htmlSlot, type HTMLTemplate } from \"../../lib/templates.js\";\nimport { debounce } from \"../../lib/utils.js\";\nimport { define } from \"../../root.js\";\nimport { type Direction4, OpenableElement } from \"./open.js\";\n\nconst defineName = \"open-offset\";\n\n/**\n * OpenOffset will calculate a lateral offset to try to keep the content within the allowable range.\n *\n * Content can be opened in 4 directions.\n */\n@define(defineName)\nexport class OpenOffset extends OpenableElement {\n direction: Direction4;\n\n @query(\"span\") private _span: HTMLElement;\n @query(\"aside\") private _balancer: HTMLElement;\n\n static styles = [\n css`\n :host {\n display: block;\n height: fit-content;\n width: fit-content;\n }\n\n span {\n user-select: none;\n }\n\n main {\n height: inherit;\n width: inherit;\n display: flex;\n position: relative;\n align-items: center;\n }\n\n aside {\n background-color: inherit;\n visibility: hidden;\n top: 100%;\n z-index: 1;\n }\n\n :host([open]) aside {\n visibility: visible;\n }\n\n :host([float]) aside {\n position: absolute;\n }\n `,\n css`\n .left {\n flex-direction: row-reverse;\n }\n .right {\n flex-direction: row;\n }\n .top {\n flex-direction: column-reverse;\n }\n .bottom {\n flex-direction: column;\n }\n `,\n ] as CSSResultGroup;\n\n protected render(): HTMLTemplate {\n return html`<main class=\"${this.direction || \"bottom\"}\">\n <span>${this.summary || htmlSlot(\"summary\")}</span>\n <aside>${htmlSlot()}</aside>\n </main>`;\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.addEvent(window, \"resize\", debounce(this._handelResize.bind(this), 500));\n }\n\n protected async firstUpdated() {\n await this.updateComplete;\n this.addEvent(document, \"click\", this._handelClick.bind(this));\n this.resize();\n }\n\n protected _handelClick(e: MouseEvent) {\n if (e.target === this) {\n this.show();\n } else if (!this.contains(e.target as HTMLElement)) {\n this.close();\n }\n }\n\n protected _handelResize() {\n this._balancer.style.transform = \"none\";\n this.resize();\n }\n\n resize() {\n if (!this._balancer) {\n return;\n }\n const offsets = this.offsetParent?.getBoundingClientRect() || document.body.getBoundingClientRect();\n const { left, right, top, bottom, height } = this._balancer.getBoundingClientRect();\n if (this.direction === \"left\" || this.direction === \"right\") {\n if (top < offsets.y) {\n const topTranslate = -top;\n this._balancer.style.transform = `translateY(${topTranslate}px)`;\n }\n if (bottom > offsets.bottom) {\n const bottomTranslate = offsets.height - (top + height);\n this._balancer.style.transform = `translateY(${bottomTranslate}px)`;\n }\n } else {\n if (right > offsets.right) {\n const rightTranslate = offsets.width - (right - offsets.x);\n this._balancer.style.transform = `translateX(${rightTranslate}px)`;\n } else if (left < 0) {\n const leftTranslate = -left;\n this._balancer.style.transform = `translateX(${leftTranslate}px)`;\n } else {\n this._balancer.style.transform = \"\";\n }\n }\n }\n}\n\nexport default OpenOffset;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"open-offset\": OpenOffset;\n }\n}\n"]}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { type HTMLTemplate } from "../../lib/templates.js";
|
2
|
+
import { type Direction8, OpenableElement } from "./open.js";
|
3
|
+
/**
|
4
|
+
* OpenTooltip provide tooltip for slot elements, summary as the tips content.
|
5
|
+
*
|
6
|
+
* Content can be opened in 8 directions.
|
7
|
+
*/
|
8
|
+
export declare class OpenTooltip extends OpenableElement {
|
9
|
+
direction: Direction8 | "";
|
10
|
+
/**
|
11
|
+
* Tip content align.
|
12
|
+
*/
|
13
|
+
align: "center" | "flex-star" | "flex-end" | "";
|
14
|
+
static styles: import("lit").CSSResult[];
|
15
|
+
protected render(): HTMLTemplate;
|
16
|
+
connectedCallback(): void;
|
17
|
+
}
|
18
|
+
export default OpenTooltip;
|
19
|
+
declare global {
|
20
|
+
interface HTMLElementTagNameMap {
|
21
|
+
"open-tooltip": OpenTooltip;
|
22
|
+
}
|
23
|
+
}
|
24
|
+
//# sourceMappingURL=open-tooltip.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"open-tooltip.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/open/open-tooltip.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAErE,OAAO,EAAE,KAAK,UAAU,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAI7D;;;;GAIG;AACH,qBACa,WAAY,SAAQ,eAAe;IAC9C,SAAS,EAAE,UAAU,GAAG,EAAE,CAAC;IAC3B;;OAEG;IACS,KAAK,EAAE,QAAQ,GAAG,WAAW,GAAG,UAAU,GAAG,EAAE,CAAM;IAEjE,MAAM,CAAC,MAAM,4BA8CX;IAEF,SAAS,CAAC,MAAM,IAAI,YAAY;IAOhC,iBAAiB;CAGlB;AAED,eAAe,WAAW,CAAC;AAE3B,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,WAAW,CAAC;KAC7B;CACF"}
|
@@ -1,20 +1,15 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
import { css, html, property } from "../deps.js";
|
8
|
-
import { OpenAble } from "./std.js";
|
9
|
-
import { htmlSlot } from "../lib/templates.js";
|
10
|
-
import { define } from "../root.js";
|
11
|
-
const defineName = "tool-tip";
|
1
|
+
import { __decorate } from "tslib";
|
2
|
+
import { css, html, property } from "../../deps.js";
|
3
|
+
import { htmlSlot } from "../../lib/templates.js";
|
4
|
+
import { define } from "../../root.js";
|
5
|
+
import { OpenableElement } from "./open.js";
|
6
|
+
const defineName = "open-tooltip";
|
12
7
|
/**
|
13
|
-
*
|
8
|
+
* OpenTooltip provide tooltip for slot elements, summary as the tips content.
|
14
9
|
*
|
15
10
|
* Content can be opened in 8 directions.
|
16
11
|
*/
|
17
|
-
let
|
12
|
+
let OpenTooltip = class OpenTooltip extends OpenableElement {
|
18
13
|
constructor() {
|
19
14
|
super(...arguments);
|
20
15
|
/**
|
@@ -22,18 +17,8 @@ let ToolTip = class ToolTip extends OpenAble {
|
|
22
17
|
*/
|
23
18
|
this.align = "";
|
24
19
|
}
|
25
|
-
|
26
|
-
|
27
|
-
${htmlSlot()}
|
28
|
-
<aside class="${this.direction || "top"}">${this.summary || htmlSlot("summary")}</aside>
|
29
|
-
</main>`;
|
30
|
-
}
|
31
|
-
connectedCallback() {
|
32
|
-
super.connectedCallback();
|
33
|
-
}
|
34
|
-
};
|
35
|
-
ToolTip.styles = [
|
36
|
-
css `
|
20
|
+
static { this.styles = [
|
21
|
+
css `
|
37
22
|
:host {
|
38
23
|
display: inline-flex;
|
39
24
|
transition: 0.3s ease-in-out;
|
@@ -64,7 +49,7 @@ ToolTip.styles = [
|
|
64
49
|
opacity: 1;
|
65
50
|
}
|
66
51
|
`,
|
67
|
-
|
52
|
+
css `
|
68
53
|
aside[class^="top"] {
|
69
54
|
bottom: 100%;
|
70
55
|
}
|
@@ -78,13 +63,23 @@ ToolTip.styles = [
|
|
78
63
|
right: 100%;
|
79
64
|
}
|
80
65
|
`,
|
81
|
-
];
|
66
|
+
]; }
|
67
|
+
render() {
|
68
|
+
return html `<main style="justify-content:${this.align || "inherit"}">
|
69
|
+
${htmlSlot()}
|
70
|
+
<aside class="${this.direction || "top"}">${this.summary || htmlSlot("summary")}</aside>
|
71
|
+
</main>`;
|
72
|
+
}
|
73
|
+
connectedCallback() {
|
74
|
+
super.connectedCallback();
|
75
|
+
}
|
76
|
+
};
|
82
77
|
__decorate([
|
83
78
|
property()
|
84
|
-
],
|
85
|
-
|
79
|
+
], OpenTooltip.prototype, "align", void 0);
|
80
|
+
OpenTooltip = __decorate([
|
86
81
|
define(defineName)
|
87
|
-
],
|
88
|
-
export {
|
89
|
-
export default
|
90
|
-
//# sourceMappingURL=
|
82
|
+
], OpenTooltip);
|
83
|
+
export { OpenTooltip };
|
84
|
+
export default OpenTooltip;
|
85
|
+
//# sourceMappingURL=open-tooltip.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"open-tooltip.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/open/open-tooltip.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,MAAM,eAAe,CAAC;AACvC,OAAO,EAAmB,eAAe,EAAE,MAAM,WAAW,CAAC;AAE7D,MAAM,UAAU,GAAG,cAAc,CAAC;AAElC;;;;GAIG;AAEI,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,eAAe;IAAzC;;QAEL;;WAEG;QACS,UAAK,GAA6C,EAAE,CAAC;IA4DnE,CAAC;aA1DQ,WAAM,GAAG;QACd,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8BF;QACD,GAAG,CAAA;;;;;;;;;;;;;KAaF;KACF,AA9CY,CA8CX;IAEQ,MAAM;QACd,OAAO,IAAI,CAAA,gCAAgC,IAAI,CAAC,KAAK,IAAI,SAAS;QAC9D,QAAQ,EAAE;sBACI,IAAI,CAAC,SAAS,IAAI,KAAK,KAAK,IAAI,CAAC,OAAO,IAAI,QAAQ,CAAC,SAAS,CAAC;YACzE,CAAC;IACX,CAAC;IAED,iBAAiB;QACf,KAAK,CAAC,iBAAiB,EAAE,CAAC;IAC5B,CAAC;;AA3DW;IAAX,QAAQ,EAAE;0CAAsD;AALtD,WAAW;IADvB,MAAM,CAAC,UAAU,CAAC;GACN,WAAW,CAiEvB;;AAED,eAAe,WAAW,CAAC","sourcesContent":["import { css, html, property } from \"../../deps.js\";\nimport { htmlSlot, type HTMLTemplate } from \"../../lib/templates.js\";\nimport { define } from \"../../root.js\";\nimport { type Direction8, OpenableElement } from \"./open.js\";\n\nconst defineName = \"open-tooltip\";\n\n/**\n * OpenTooltip provide tooltip for slot elements, summary as the tips content.\n *\n * Content can be opened in 8 directions.\n */\n@define(defineName)\nexport class OpenTooltip extends OpenableElement {\n direction: Direction8 | \"\";\n /**\n * Tip content align.\n */\n @property() align: \"center\" | \"flex-star\" | \"flex-end\" | \"\" = \"\";\n\n static styles = [\n css`\n :host {\n display: inline-flex;\n transition: 0.3s ease-in-out;\n justify-content: center;\n }\n\n main {\n display: inline-flex;\n align-items: center;\n position: relative;\n transition: inherit;\n }\n\n main,\n aside {\n transition: inherit;\n white-space: nowrap;\n }\n\n aside {\n opacity: 0;\n position: absolute;\n transition-property: opacity;\n }\n\n :host(:hover) aside,\n :host([open]) aside {\n opacity: 1;\n }\n `,\n css`\n aside[class^=\"top\"] {\n bottom: 100%;\n }\n aside[class^=\"bottom\"] {\n top: 100%;\n }\n aside[class$=\"right\"] {\n left: 100%;\n }\n aside[class$=\"left\"] {\n right: 100%;\n }\n `,\n ];\n\n protected render(): HTMLTemplate {\n return html`<main style=\"justify-content:${this.align || \"inherit\"}\">\n ${htmlSlot()}\n <aside class=\"${this.direction || \"top\"}\">${this.summary || htmlSlot(\"summary\")}</aside>\n </main>`;\n }\n\n connectedCallback() {\n super.connectedCallback();\n }\n}\n\nexport default OpenTooltip;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"open-tooltip\": OpenTooltip;\n }\n}\n"]}
|