godown 2.5.0 → 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 +43 -3
- package/conf.d.ts.map +1 -1
- package/conf.js +14 -11
- 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 +2 -2
- 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 +100 -106
- 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 +80 -85
- 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 +56 -61
- 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 +64 -69
- 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 +97 -101
- 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 +16 -21
- 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,10 +1,10 @@
|
|
1
|
-
import {
|
1
|
+
import { SuperA } from "./super-a.js";
|
2
2
|
/**
|
3
3
|
* LinkAnchor works with {@linkcode RouteView}.
|
4
4
|
*
|
5
|
-
* @extends
|
5
|
+
* @extends SuperA
|
6
6
|
*/
|
7
|
-
export declare class
|
7
|
+
export declare class LinkA extends SuperA {
|
8
8
|
/**
|
9
9
|
* True when the href is in the same pathname as the location.
|
10
10
|
*/
|
@@ -15,7 +15,7 @@ export declare class LinkAnchor extends SuperAnchor {
|
|
15
15
|
replace: boolean;
|
16
16
|
connectedCallback(): void;
|
17
17
|
/**
|
18
|
-
* Set active to true when the {@linkcode
|
18
|
+
* Set active to true when the {@linkcode LinkA.href} is in the same pathname as the location.
|
19
19
|
*/
|
20
20
|
useActive(): void;
|
21
21
|
protected _handleClick(e: MouseEvent): void;
|
@@ -24,10 +24,10 @@ export declare class LinkAnchor extends SuperAnchor {
|
|
24
24
|
static pushState(data: any, unused: string, url?: string): void;
|
25
25
|
static replaceState(data: any, unused: string, url?: string): void;
|
26
26
|
}
|
27
|
-
export default
|
27
|
+
export default LinkA;
|
28
28
|
declare global {
|
29
29
|
interface HTMLElementTagNameMap {
|
30
|
-
"link-a":
|
30
|
+
"link-a": LinkA;
|
31
31
|
}
|
32
32
|
}
|
33
33
|
//# sourceMappingURL=link-a.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"link-a.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/a/link-a.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAItC;;;;GAIG;AACH,qBACa,KAAM,SAAQ,MAAM;IAC/B;;OAEG;IACyC,MAAM,UAAS;IAC3D;;OAEG;IAC0B,OAAO,UAAS;IAE7C,iBAAiB;IAOjB;;OAEG;IACH,SAAS;IAOT,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,UAAU;IAapC,SAAS,CAAC,GAAG,SAAY,EAAE,IAAI,MAAO;IAKtC,YAAY,CAAC,GAAG,SAAY,EAAE,IAAI,MAAO;IAKzC,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM;IAKxD,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM;CAI5D;AAED,eAAe,KAAK,CAAC;AAErB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,QAAQ,EAAE,KAAK,CAAC;KACjB;CACF"}
|
@@ -1,21 +1,16 @@
|
|
1
|
-
var
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
6
|
-
};
|
7
|
-
var LinkAnchor_1;
|
8
|
-
import { define } from "../root.js";
|
9
|
-
import { property } from "../deps.js";
|
1
|
+
var LinkA_1;
|
2
|
+
import { __decorate } from "tslib";
|
3
|
+
import { property } from "../../deps.js";
|
4
|
+
import { define } from "../../root.js";
|
10
5
|
import { RouteView } from "../view/route-view.js";
|
11
|
-
import {
|
6
|
+
import { SuperA } from "./super-a.js";
|
12
7
|
const defineName = "link-a";
|
13
8
|
/**
|
14
9
|
* LinkAnchor works with {@linkcode RouteView}.
|
15
10
|
*
|
16
|
-
* @extends
|
11
|
+
* @extends SuperA
|
17
12
|
*/
|
18
|
-
let
|
13
|
+
let LinkA = LinkA_1 = class LinkA extends SuperA {
|
19
14
|
constructor() {
|
20
15
|
super(...arguments);
|
21
16
|
/**
|
@@ -34,7 +29,7 @@ let LinkAnchor = LinkAnchor_1 = class LinkAnchor extends SuperAnchor {
|
|
34
29
|
this.useActive();
|
35
30
|
}
|
36
31
|
/**
|
37
|
-
* Set active to true when the {@linkcode
|
32
|
+
* Set active to true when the {@linkcode LinkA.href} is in the same pathname as the location.
|
38
33
|
*/
|
39
34
|
useActive() {
|
40
35
|
const url = new URL(this.href, location.href);
|
@@ -56,11 +51,11 @@ let LinkAnchor = LinkAnchor_1 = class LinkAnchor extends SuperAnchor {
|
|
56
51
|
}
|
57
52
|
}
|
58
53
|
pushState(url = this.href, data = null) {
|
59
|
-
|
54
|
+
LinkA_1.pushState(data, "", url);
|
60
55
|
this.useActive();
|
61
56
|
}
|
62
57
|
replaceState(url = this.href, data = null) {
|
63
|
-
|
58
|
+
LinkA_1.replaceState(data, "", url);
|
64
59
|
this.useActive();
|
65
60
|
}
|
66
61
|
static pushState(data, unused, url) {
|
@@ -74,13 +69,13 @@ let LinkAnchor = LinkAnchor_1 = class LinkAnchor extends SuperAnchor {
|
|
74
69
|
};
|
75
70
|
__decorate([
|
76
71
|
property({ type: Boolean, reflect: true })
|
77
|
-
],
|
72
|
+
], LinkA.prototype, "active", void 0);
|
78
73
|
__decorate([
|
79
74
|
property({ type: Boolean })
|
80
|
-
],
|
81
|
-
|
75
|
+
], LinkA.prototype, "replace", void 0);
|
76
|
+
LinkA = LinkA_1 = __decorate([
|
82
77
|
define(defineName)
|
83
|
-
],
|
84
|
-
export {
|
85
|
-
export default
|
78
|
+
], LinkA);
|
79
|
+
export { LinkA };
|
80
|
+
export default LinkA;
|
86
81
|
//# sourceMappingURL=link-a.js.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E,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;qCAAgB;AAI9B;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;sCAAiB;AARlC,KAAK;IADjB,MAAM,CAAC,UAAU,CAAC;GACN,KAAK,CA2DjB;;AAED,eAAe,KAAK,CAAC","sourcesContent":["import { property } from \"../../deps.js\";\nimport { define } from \"../../root.js\";\nimport { RouteView } from \"../view/route-view.js\";\nimport { SuperA } from \"./super-a.js\";\n\nconst defineName = \"link-a\";\n\n/**\n * LinkAnchor works with {@linkcode RouteView}.\n *\n * @extends SuperA\n */\n@define(defineName)\nexport class LinkA extends SuperA {\n /**\n * True when the href is in the same pathname as the location.\n */\n @property({ type: Boolean, reflect: true }) active = false;\n /**\n * If true, replaceState, or pushState.\n */\n @property({ type: Boolean }) replace = false;\n\n connectedCallback() {\n super.connectedCallback();\n this.addEvent(this, \"click\", this._handleClick);\n this.addEvent(window, \"popstate\", this.useActive.bind(this));\n this.useActive();\n }\n\n /**\n * Set active to true when the {@linkcode LinkA.href} is in the same pathname as the location.\n */\n useActive() {\n const url = new URL(this.href, location.href);\n if (url.origin === location.origin) {\n this.active = url.pathname === location.pathname;\n }\n }\n\n protected _handleClick(e: MouseEvent) {\n const href = this.href ?? this.querySelector(\"[href]\")?.getAttribute(\"href\");\n const url = new URL(href, location.href);\n if (url.origin === location.origin) {\n e.preventDefault();\n if (this.replace) {\n this.replaceState(href);\n } else {\n this.pushState(href);\n }\n }\n }\n\n pushState(url = this.href, data = null) {\n LinkA.pushState(data, \"\", url);\n this.useActive();\n }\n\n replaceState(url = this.href, data = null) {\n LinkA.replaceState(data, \"\", url);\n this.useActive();\n }\n\n static pushState(data: any, unused: string, url?: string) {\n history.pushState(data, unused, url);\n RouteView.updateAll();\n }\n\n static replaceState(data: any, unused: string, url?: string) {\n history.replaceState(data, unused, url);\n RouteView.updateAll();\n }\n}\n\nexport default LinkA;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"link-a\": LinkA;\n }\n}\n"]}
|
@@ -1,11 +1,11 @@
|
|
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
|
* SuperAnchor similar to a.
|
5
5
|
*
|
6
6
|
* Has an optional arrow.
|
7
7
|
*/
|
8
|
-
export declare class
|
8
|
+
export declare class SuperA extends GodownElement {
|
9
9
|
/**
|
10
10
|
* Href for a element.
|
11
11
|
*/
|
@@ -22,10 +22,10 @@ export declare class SuperAnchor extends ItemsSTD {
|
|
22
22
|
protected render(): HTMLTemplate;
|
23
23
|
private _arrowSwitcher;
|
24
24
|
}
|
25
|
-
export default
|
25
|
+
export default SuperA;
|
26
26
|
declare global {
|
27
27
|
interface HTMLElementTagNameMap {
|
28
|
-
"super-a":
|
28
|
+
"super-a": SuperA;
|
29
29
|
}
|
30
30
|
}
|
31
31
|
//# sourceMappingURL=super-a.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"super-a.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/a/super-a.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,YAAY,EAAsB,MAAM,wBAAwB,CAAC;AACzF,OAAO,EAAU,aAAa,EAAE,MAAM,eAAe,CAAC;AAItD;;;;GAIG;AACH,qBACa,MAAO,SAAQ,aAAa;IACvC;;OAEG;IACS,IAAI,EAAE,MAAM,CAAa;IACrC;;OAEG;IACS,MAAM,SAAW;IAC7B;;OAEG;IACS,KAAK,EAAE,EAAE,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAM;IAEzD,MAAM,CAAC,MAAM,4BA0DX;IAEF,SAAS,CAAC,MAAM,IAAI,YAAY;IAOhC,OAAO,CAAC,cAAc;CAYvB;AAED,eAAe,MAAM,CAAC;AAEtB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,SAAS,EAAE,MAAM,CAAC;KACnB;CACF"}
|
@@ -1,20 +1,14 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
6
|
-
};
|
7
|
-
import { css, html, ifDefined, property } from "../deps.js";
|
8
|
-
import { htmlSlot, svgArrow, svgDelta } from "../lib/templates.js";
|
9
|
-
import { define } from "../root.js";
|
10
|
-
import ItemsSTD from "./std.js";
|
1
|
+
import { __decorate } from "tslib";
|
2
|
+
import { css, html, ifDefined, property } from "../../deps.js";
|
3
|
+
import { htmlSlot, svgArrow, svgDelta } from "../../lib/templates.js";
|
4
|
+
import { define, GodownElement } from "../../root.js";
|
11
5
|
const defineName = "super-a";
|
12
6
|
/**
|
13
7
|
* SuperAnchor similar to a.
|
14
8
|
*
|
15
9
|
* Has an optional arrow.
|
16
10
|
*/
|
17
|
-
let
|
11
|
+
let SuperA = class SuperA extends GodownElement {
|
18
12
|
constructor() {
|
19
13
|
super(...arguments);
|
20
14
|
/**
|
@@ -30,27 +24,8 @@ let SuperAnchor = class SuperAnchor extends ItemsSTD {
|
|
30
24
|
*/
|
31
25
|
this.arrow = "";
|
32
26
|
}
|
33
|
-
|
34
|
-
|
35
|
-
${htmlSlot()}
|
36
|
-
<i> ${this._arrowSwitcher()} </i>
|
37
|
-
</a>`;
|
38
|
-
}
|
39
|
-
_arrowSwitcher() {
|
40
|
-
switch (this.arrow) {
|
41
|
-
case "delta":
|
42
|
-
return svgDelta();
|
43
|
-
case "arrow":
|
44
|
-
return svgArrow(true);
|
45
|
-
case "angle":
|
46
|
-
return svgArrow();
|
47
|
-
default:
|
48
|
-
return htmlSlot("icon");
|
49
|
-
}
|
50
|
-
}
|
51
|
-
};
|
52
|
-
SuperAnchor.styles = [
|
53
|
-
css `
|
27
|
+
static { this.styles = [
|
28
|
+
css `
|
54
29
|
:host([arrow="delta"]) svg {
|
55
30
|
transform: rotate(-90deg);
|
56
31
|
}
|
@@ -107,19 +82,38 @@ SuperAnchor.styles = [
|
|
107
82
|
}
|
108
83
|
}
|
109
84
|
`,
|
110
|
-
];
|
85
|
+
]; }
|
86
|
+
render() {
|
87
|
+
return html `<a href="${ifDefined(this.href)}" target="${this.target}">
|
88
|
+
${htmlSlot()}
|
89
|
+
<i> ${this._arrowSwitcher()} </i>
|
90
|
+
</a>`;
|
91
|
+
}
|
92
|
+
_arrowSwitcher() {
|
93
|
+
switch (this.arrow) {
|
94
|
+
case "delta":
|
95
|
+
return svgDelta();
|
96
|
+
case "arrow":
|
97
|
+
return svgArrow(true);
|
98
|
+
case "angle":
|
99
|
+
return svgArrow();
|
100
|
+
default:
|
101
|
+
return htmlSlot("icon");
|
102
|
+
}
|
103
|
+
}
|
104
|
+
};
|
111
105
|
__decorate([
|
112
106
|
property()
|
113
|
-
],
|
107
|
+
], SuperA.prototype, "href", void 0);
|
114
108
|
__decorate([
|
115
109
|
property()
|
116
|
-
],
|
110
|
+
], SuperA.prototype, "target", void 0);
|
117
111
|
__decorate([
|
118
112
|
property()
|
119
|
-
],
|
120
|
-
|
113
|
+
], SuperA.prototype, "arrow", void 0);
|
114
|
+
SuperA = __decorate([
|
121
115
|
define(defineName)
|
122
|
-
],
|
123
|
-
export {
|
124
|
-
export default
|
116
|
+
], SuperA);
|
117
|
+
export { SuperA };
|
118
|
+
export default SuperA;
|
125
119
|
//# sourceMappingURL=super-a.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"super-a.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/a/super-a.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAqB,QAAQ,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACzF,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEtD,MAAM,UAAU,GAAG,SAAS,CAAC;AAE7B;;;;GAIG;AAEI,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,aAAa;IAAlC;;QACL;;WAEG;QACS,SAAI,GAAW,SAAS,CAAC;QACrC;;WAEG;QACS,WAAM,GAAG,OAAO,CAAC;QAC7B;;WAEG;QACS,UAAK,GAAqC,EAAE,CAAC;IAiF3D,CAAC;aA/EQ,WAAM,GAAG;QACd,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAwDF;KACF,AA1DY,CA0DX;IAEQ,MAAM;QACd,OAAO,IAAI,CAAA,YAAY,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,IAAI,CAAC,MAAM;QAC/D,QAAQ,EAAE;YACN,IAAI,CAAC,cAAc,EAAE;SACxB,CAAC;IACR,CAAC;IAEO,cAAc;QACpB,QAAQ,IAAI,CAAC,KAAK,EAAE,CAAC;YACnB,KAAK,OAAO;gBACV,OAAO,QAAQ,EAAE,CAAC;YACpB,KAAK,OAAO;gBACV,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC;YACxB,KAAK,OAAO;gBACV,OAAO,QAAQ,EAAE,CAAC;YACpB;gBACE,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;;AAxFW;IAAX,QAAQ,EAAE;oCAA0B;AAIzB;IAAX,QAAQ,EAAE;sCAAkB;AAIjB;IAAX,QAAQ,EAAE;qCAA8C;AAZ9C,MAAM;IADlB,MAAM,CAAC,UAAU,CAAC;GACN,MAAM,CA6FlB;;AAED,eAAe,MAAM,CAAC","sourcesContent":["import { css, html, ifDefined, property } from \"../../deps.js\";\nimport { htmlSlot, type HTMLTemplate, svgArrow, svgDelta } from \"../../lib/templates.js\";\nimport { define, GodownElement } from \"../../root.js\";\n\nconst defineName = \"super-a\";\n\n/**\n * SuperAnchor similar to a.\n *\n * Has an optional arrow.\n */\n@define(defineName)\nexport class SuperA extends GodownElement {\n /**\n * Href for a element.\n */\n @property() href: string = undefined;\n /**\n * Target for an element.\n */\n @property() target = \"_self\";\n /**\n * Arrow type.\n */\n @property() arrow: \"\" | \"delta\" | \"arrow\" | \"angle\" = \"\";\n\n static styles = [\n css`\n :host([arrow=\"delta\"]) svg {\n transform: rotate(-90deg);\n }\n\n :host {\n display: inline-block;\n color: currentColor;\n text-decoration: none;\n cursor: default;\n }\n\n :host([href]) {\n cursor: pointer;\n }\n\n a {\n width: 100%;\n display: flex;\n color: inherit;\n text-decoration: inherit;\n justify-content: space-between;\n align-items: center;\n }\n\n i {\n display: inline-flex;\n border-radius: 20%;\n font-style: normal;\n }\n\n i > svg {\n width: 1em;\n height: 1em;\n border-radius: inherit;\n }\n\n :host(:hover) i {\n animation: arrow 0.3s linear;\n }\n\n i:hover {\n background-color: rgb(0 0 0 / 0.075);\n }\n\n @keyframes arrow {\n from {\n transform: translateX(0);\n }\n 50% {\n transform: translateX(0.05em);\n }\n to {\n transform: translateX(0);\n }\n }\n `,\n ];\n\n protected render(): HTMLTemplate {\n return html`<a href=\"${ifDefined(this.href)}\" target=\"${this.target}\">\n ${htmlSlot()}\n <i> ${this._arrowSwitcher()} </i>\n </a>`;\n }\n\n private _arrowSwitcher(): HTMLTemplate {\n switch (this.arrow) {\n case \"delta\":\n return svgDelta();\n case \"arrow\":\n return svgArrow(true);\n case \"angle\":\n return svgArrow();\n default:\n return htmlSlot(\"icon\");\n }\n }\n}\n\nexport default SuperA;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"super-a\": SuperA;\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
|
black: string[];
|
5
5
|
gary: string[];
|
@@ -15,7 +15,7 @@ type Colors = keyof typeof colors;
|
|
15
15
|
*
|
16
16
|
* Inspired by Next-ui.
|
17
17
|
*/
|
18
|
-
export declare class BaseButton extends
|
18
|
+
export declare class BaseButton extends GodownElement {
|
19
19
|
/**
|
20
20
|
* Whether to disable this element.
|
21
21
|
*/
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"base-button.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/button/base-button.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAErE,OAAO,EAAuB,aAAa,EAAE,MAAM,eAAe,CAAC;AAYnE,QAAA,MAAM,MAAM;;;;;;;;CA2CX,CAAC;AAEF,KAAK,MAAM,GAAG,MAAM,OAAO,MAAM,CAAC;AAElC;;;;GAIG;AACH,qBACa,UAAW,SAAQ,aAAa;IAC3C;;OAEG;IACyC,QAAQ,UAAS;IAC7D;;OAEG;IACyC,KAAK,UAAS;IAC1D;;OAEG;IACyC,MAAM,UAAS;IAC3D;;OAEG;IACyC,MAAM,UAAS;IAC3D;;OAEG;IACyC,KAAK,UAAS;IAC1D;;OAEG;IACS,KAAK,EAAE,MAAM,GAAG,MAAM,CAAW;IAC7C;;OAEG;IACS,IAAI,SAAM;IAEV,EAAE,EAAE,WAAW,CAAC;IACd,IAAI,EAAE,iBAAiB,CAAC;IAEtC,MAAM,CAAC,MAAM,4BAuHX;IAEF,SAAS,CAAC,MAAM,IAAI,YAAY;IAShC,KAAK;IAOL,IAAI;IAIJ,SAAS,CAAC,YAAY;IAiBtB,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,UAAU;IAgBpC,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,UAAU;IAYpC;;;;;;;;;;;;;;;OAeG;IACH,SAAS,IAAI,MAAM,GAAG,MAAM;CAG7B;AAED,eAAe,UAAU,CAAC;AAE1B,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,UAAU,CAAC;KAC3B;CACF"}
|
@@ -1,14 +1,8 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
};
|
7
|
-
import { createScope, define } from "../root.js";
|
8
|
-
import { css, html, property, query, unsafeCSS } from "../deps.js";
|
9
|
-
import { htmlSlot } from "../lib/templates.js";
|
10
|
-
import { constructCSS } from "../lib/utils.js";
|
11
|
-
import ItemsSTD from "./std.js";
|
1
|
+
import { __decorate } from "tslib";
|
2
|
+
import { css, html, property, query, unsafeCSS } from "../../deps.js";
|
3
|
+
import { htmlSlot } from "../../lib/templates.js";
|
4
|
+
import { constructCSS } from "../../lib/utils.js";
|
5
|
+
import { createScope, define, GodownElement } from "../../root.js";
|
12
6
|
const defineName = "base-button";
|
13
7
|
const cssvarScope = createScope(defineName);
|
14
8
|
const shadow1 = "-2px 2px 5px -2px";
|
@@ -19,43 +13,43 @@ const _000 = "#000";
|
|
19
13
|
const vars = ["color", "background", "box-shadow", "ghost-color"];
|
20
14
|
const colors = {
|
21
15
|
black: [
|
22
|
-
fff,
|
16
|
+
fff, //
|
23
17
|
`${linearGradient}(45deg, rgb(30 30 30), rgb(65 65 65))`,
|
24
18
|
`${shadow1} rgb(0 0 0 / 20%), ${shadow2} rgb(99 99 99 / 20%)`,
|
25
19
|
"rgb(22 20 20)",
|
26
20
|
],
|
27
21
|
gary: [
|
28
|
-
fff,
|
22
|
+
fff, //
|
29
23
|
`${linearGradient}(45deg, rgb(65 65 65), rgb(100 100 100))`,
|
30
24
|
`${shadow1} rgb(0 0 0 / 20%), ${shadow2} rgb(99 99 99 / 20%)`,
|
31
25
|
"rgb(56 56 56)",
|
32
26
|
],
|
33
27
|
white: [
|
34
|
-
_000,
|
28
|
+
_000, //
|
35
29
|
`${linearGradient}(45deg, rgb(225 225 225), rgb(240 240 240))`,
|
36
30
|
`${shadow1} rgb(255 255 255 / 20%), ${shadow2} rgb(165 165 165 / 20%)`,
|
37
31
|
"rgb(212 212 212)",
|
38
32
|
],
|
39
33
|
red: [
|
40
|
-
fff,
|
34
|
+
fff, //
|
41
35
|
`${linearGradient}(45deg, rgb(215 57 68), rgb(250 141 106))`,
|
42
36
|
`${shadow1} rgb(181 35 44 / 20%), ${shadow2} rgb(234 130 174 / 20%)`,
|
43
37
|
"rgb(214 11 23)",
|
44
38
|
],
|
45
39
|
green: [
|
46
|
-
_000,
|
40
|
+
_000, //
|
47
41
|
`${linearGradient}(45deg, rgb(21 206 71), rgb(99 253 122))`,
|
48
42
|
`${shadow1} rgb(63 179 69 / 20%), ${shadow2} rgb(136 225 142 / 20%)`,
|
49
43
|
"rgb(60 214 68)",
|
50
44
|
],
|
51
45
|
blue: [
|
52
|
-
fff,
|
46
|
+
fff, //
|
53
47
|
`${linearGradient}(45deg, rgb(14 143 255), rgb(121 211 255))`,
|
54
48
|
`${shadow1} rgb(92 182 255 / 20%), ${shadow2} rgb(135 232 222 / 20%)`,
|
55
49
|
"rgb(42 141 221)",
|
56
50
|
],
|
57
51
|
yellow: [
|
58
|
-
_000,
|
52
|
+
_000, //
|
59
53
|
`${linearGradient}(45deg, rgb(255 190 54), rgb(255 249 68))`,
|
60
54
|
`${shadow1} rgb(214 203 55 / 20%), ${shadow2} rgb(202 203 137 / 20%)`,
|
61
55
|
"rgb(255 235 59)",
|
@@ -66,7 +60,7 @@ const colors = {
|
|
66
60
|
*
|
67
61
|
* Inspired by Next-ui.
|
68
62
|
*/
|
69
|
-
let BaseButton = class BaseButton extends
|
63
|
+
let BaseButton = class BaseButton extends GodownElement {
|
70
64
|
constructor() {
|
71
65
|
super(...arguments);
|
72
66
|
/**
|
@@ -98,90 +92,9 @@ let BaseButton = class BaseButton extends ItemsSTD {
|
|
98
92
|
*/
|
99
93
|
this.text = "";
|
100
94
|
}
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
<b></b>
|
105
|
-
<p>${this.text || htmlSlot()}</p>
|
106
|
-
</div>
|
107
|
-
`;
|
108
|
-
}
|
109
|
-
focus() {
|
110
|
-
if (this.disabled) {
|
111
|
-
return;
|
112
|
-
}
|
113
|
-
this.active = true;
|
114
|
-
}
|
115
|
-
blur() {
|
116
|
-
this.active = false;
|
117
|
-
}
|
118
|
-
firstUpdated() {
|
119
|
-
if (this.scale) {
|
120
|
-
this.addEvent(this, "mousedown", this.focus);
|
121
|
-
this.addEvent(this, "mouseup", (e) => {
|
122
|
-
if (this.disabled) {
|
123
|
-
return;
|
124
|
-
}
|
125
|
-
this.blur();
|
126
|
-
this._handleModal(e);
|
127
|
-
});
|
128
|
-
this.addEvent(this, "mouseleave", this.blur);
|
129
|
-
return;
|
130
|
-
}
|
131
|
-
else {
|
132
|
-
this.addEvent(document, "click", this._handelClick.bind(this));
|
133
|
-
}
|
134
|
-
}
|
135
|
-
_handleModal(e) {
|
136
|
-
const a = this._div.offsetHeight + 1;
|
137
|
-
const b = this._div.offsetWidth + 1;
|
138
|
-
const size = `${Math.sqrt(a * a + b * b) * 2}px`;
|
139
|
-
const translate = `translate(calc(-50% + ${e.offsetX}px), calc(-50% + ${e.offsetY}px))`;
|
140
|
-
this._b.style.width = size;
|
141
|
-
this._b.style.height = size;
|
142
|
-
this._b.style.transform = translate;
|
143
|
-
const i = document.createElement("i");
|
144
|
-
i.style.animationName = "i";
|
145
|
-
this._b.appendChild(i);
|
146
|
-
setTimeout(() => {
|
147
|
-
i.remove();
|
148
|
-
}, 2000);
|
149
|
-
}
|
150
|
-
_handelClick(e) {
|
151
|
-
if (this.disabled) {
|
152
|
-
return;
|
153
|
-
}
|
154
|
-
if (e.target === this) {
|
155
|
-
this._handleModal(e);
|
156
|
-
this.focus();
|
157
|
-
}
|
158
|
-
else {
|
159
|
-
this.blur();
|
160
|
-
}
|
161
|
-
}
|
162
|
-
/**
|
163
|
-
* Get the color to render, default is this.color.
|
164
|
-
*
|
165
|
-
* @returns New color.
|
166
|
-
*
|
167
|
-
* Colors can be set for different states.
|
168
|
-
*
|
169
|
-
* The matching selector is `[color=COLOR]`.
|
170
|
-
*
|
171
|
-
* @example
|
172
|
-
* ```ts
|
173
|
-
* button.adoptStyles("[color=COLOR1]{...}")
|
174
|
-
* button.adoptStyles("[color=COLOR2]{...}")
|
175
|
-
* button.nextColor = () => state ? COLOR1 : COLOR2
|
176
|
-
* ```
|
177
|
-
*/
|
178
|
-
nextColor() {
|
179
|
-
return this.color;
|
180
|
-
}
|
181
|
-
};
|
182
|
-
BaseButton.styles = [
|
183
|
-
unsafeCSS(constructCSS(vars, colors, (raw) => `[color=${raw}]`, (k, v) => `${cssvarScope}--${k}:${v}`)),
|
184
|
-
css `
|
95
|
+
static { this.styles = [
|
96
|
+
unsafeCSS(constructCSS(vars, colors, (raw) => `[color=${raw}]`, (k, v) => `${cssvarScope}--${k}:${v}`)),
|
97
|
+
css `
|
185
98
|
:host {
|
186
99
|
${cssvarScope}--padding: .075em .25em;
|
187
100
|
${cssvarScope}--deg: .075em .25em;
|
@@ -213,7 +126,7 @@ BaseButton.styles = [
|
|
213
126
|
div {
|
214
127
|
background: var(${cssvarScope}--background);
|
215
128
|
box-shadow: var(${cssvarScope}--box-shadow);
|
216
|
-
color: var(--
|
129
|
+
color: var(${cssvarScope}--color, inherit);
|
217
130
|
width: 100%;
|
218
131
|
height: 100%;
|
219
132
|
position: relative;
|
@@ -256,7 +169,7 @@ BaseButton.styles = [
|
|
256
169
|
${cssvarScope}--padding: .075em .5em;
|
257
170
|
}
|
258
171
|
`,
|
259
|
-
|
172
|
+
css `
|
260
173
|
i {
|
261
174
|
position: absolute;
|
262
175
|
top: 0;
|
@@ -291,7 +204,88 @@ BaseButton.styles = [
|
|
291
204
|
}
|
292
205
|
}
|
293
206
|
`,
|
294
|
-
];
|
207
|
+
]; }
|
208
|
+
render() {
|
209
|
+
return html `
|
210
|
+
<div color="${this.nextColor()}">
|
211
|
+
<b></b>
|
212
|
+
<p>${this.text || htmlSlot()}</p>
|
213
|
+
</div>
|
214
|
+
`;
|
215
|
+
}
|
216
|
+
focus() {
|
217
|
+
if (this.disabled) {
|
218
|
+
return;
|
219
|
+
}
|
220
|
+
this.active = true;
|
221
|
+
}
|
222
|
+
blur() {
|
223
|
+
this.active = false;
|
224
|
+
}
|
225
|
+
firstUpdated() {
|
226
|
+
if (this.scale) {
|
227
|
+
this.addEvent(this, "mousedown", this.focus);
|
228
|
+
this.addEvent(this, "mouseup", (e) => {
|
229
|
+
if (this.disabled) {
|
230
|
+
return;
|
231
|
+
}
|
232
|
+
this.blur();
|
233
|
+
this._handleModal(e);
|
234
|
+
});
|
235
|
+
this.addEvent(this, "mouseleave", this.blur);
|
236
|
+
return;
|
237
|
+
}
|
238
|
+
else {
|
239
|
+
this.addEvent(document, "click", this._handelClick.bind(this));
|
240
|
+
}
|
241
|
+
}
|
242
|
+
_handleModal(e) {
|
243
|
+
const a = this._div.offsetHeight + 1;
|
244
|
+
const b = this._div.offsetWidth + 1;
|
245
|
+
const size = `${Math.sqrt(a * a + b * b) * 2}px`;
|
246
|
+
const translate = `translate(calc(-50% + ${e.offsetX}px), calc(-50% + ${e.offsetY}px))`;
|
247
|
+
this._b.style.width = size;
|
248
|
+
this._b.style.height = size;
|
249
|
+
this._b.style.transform = translate;
|
250
|
+
const i = document.createElement("i");
|
251
|
+
i.style.animationName = "i";
|
252
|
+
this._b.appendChild(i);
|
253
|
+
setTimeout(() => {
|
254
|
+
i.remove();
|
255
|
+
}, 2000);
|
256
|
+
}
|
257
|
+
_handelClick(e) {
|
258
|
+
if (this.disabled) {
|
259
|
+
return;
|
260
|
+
}
|
261
|
+
if (e.target === this) {
|
262
|
+
this._handleModal(e);
|
263
|
+
this.focus();
|
264
|
+
}
|
265
|
+
else {
|
266
|
+
this.blur();
|
267
|
+
}
|
268
|
+
}
|
269
|
+
/**
|
270
|
+
* Get the color to render, default is this.color.
|
271
|
+
*
|
272
|
+
* @returns New color.
|
273
|
+
*
|
274
|
+
* Colors can be set for different states.
|
275
|
+
*
|
276
|
+
* The matching selector is `[color=COLOR]`.
|
277
|
+
*
|
278
|
+
* @example
|
279
|
+
* ```ts
|
280
|
+
* button.adoptStyles("[color=COLOR1]{...}")
|
281
|
+
* button.adoptStyles("[color=COLOR2]{...}")
|
282
|
+
* button.nextColor = () => state ? COLOR1 : COLOR2
|
283
|
+
* ```
|
284
|
+
*/
|
285
|
+
nextColor() {
|
286
|
+
return this.color;
|
287
|
+
}
|
288
|
+
};
|
295
289
|
__decorate([
|
296
290
|
property({ type: Boolean, reflect: true })
|
297
291
|
], BaseButton.prototype, "disabled", void 0);
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"base-button.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/button/base-button.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAqB,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnE,MAAM,UAAU,GAAG,aAAa,CAAC;AACjC,MAAM,WAAW,GAAG,WAAW,CAAC,UAAU,CAAC,CAAC;AAE5C,MAAM,OAAO,GAAG,mBAAmB,CAAC;AACpC,MAAM,OAAO,GAAG,mBAAmB,CAAC;AACpC,MAAM,cAAc,GAAG,iBAAiB,CAAC;AACzC,MAAM,GAAG,GAAG,MAAM,CAAC;AACnB,MAAM,IAAI,GAAG,MAAM,CAAC;AAEpB,MAAM,IAAI,GAAG,CAAC,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,CAAC,CAAC;AAClE,MAAM,MAAM,GAAG;IACb,KAAK,EAAE;QACL,GAAG,EAAE,EAAE;QACP,GAAG,cAAc,uCAAuC;QACxD,GAAG,OAAO,sBAAsB,OAAO,sBAAsB;QAC7D,eAAe;KAChB;IACD,IAAI,EAAE;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YAAY,CAAC,CAAa;QAClC,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,OAAO;QACT,CAAC;QACD,IAAI,CAAC,CAAC,MAAM,KAAK,IAAI,EAAE,CAAC;YACtB,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;YACrB,IAAI,CAAC,KAAK,EAAE,CAAC;QACf,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,IAAI,EAAE,CAAC;QACd,CAAC;IACH,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,SAAS;QACP,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;;AAzO2C;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;4CAAkB;AAIjB;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;0CAAgB;AAIf;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0CAAgB;AAIf;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCAAe;AAI9C;IAAX,QAAQ,EAAE;yCAAkC;AAIjC;IAAX,QAAQ,EAAE;wCAAW;AAEV;IAAX,KAAK,CAAC,GAAG,CAAC;sCAAiB;AACd;IAAb,KAAK,CAAC,KAAK,CAAC;wCAAyB;AA/B3B,UAAU;IADtB,MAAM,CAAC,UAAU,CAAC;GACN,UAAU,CA8OtB;;AAED,eAAe,UAAU,CAAC","sourcesContent":["import { css, html, property, query, unsafeCSS } from \"../../deps.js\";\nimport { htmlSlot, type HTMLTemplate } from \"../../lib/templates.js\";\nimport { constructCSS } from \"../../lib/utils.js\";\nimport { createScope, define, GodownElement } from \"../../root.js\";\n\nconst defineName = \"base-button\";\nconst cssvarScope = createScope(defineName);\n\nconst shadow1 = \"-2px 2px 5px -2px\";\nconst shadow2 = \"2px -2px 5px -2px\";\nconst linearGradient = \"linear-gradient\";\nconst fff = \"#fff\";\nconst _000 = \"#000\";\n\nconst vars = [\"color\", \"background\", \"box-shadow\", \"ghost-color\"];\nconst colors = {\n black: [\n fff, //\n `${linearGradient}(45deg, rgb(30 30 30), rgb(65 65 65))`,\n `${shadow1} rgb(0 0 0 / 20%), ${shadow2} rgb(99 99 99 / 20%)`,\n \"rgb(22 20 20)\",\n ],\n gary: [\n fff, //\n `${linearGradient}(45deg, rgb(65 65 65), rgb(100 100 100))`,\n `${shadow1} rgb(0 0 0 / 20%), ${shadow2} rgb(99 99 99 / 20%)`,\n \"rgb(56 56 56)\",\n ],\n white: [\n _000, //\n `${linearGradient}(45deg, rgb(225 225 225), rgb(240 240 240))`,\n `${shadow1} rgb(255 255 255 / 20%), ${shadow2} rgb(165 165 165 / 20%)`,\n \"rgb(212 212 212)\",\n ],\n red: [\n fff, //\n `${linearGradient}(45deg, rgb(215 57 68), rgb(250 141 106))`,\n `${shadow1} rgb(181 35 44 / 20%), ${shadow2} rgb(234 130 174 / 20%)`,\n \"rgb(214 11 23)\",\n ],\n green: [\n _000, //\n `${linearGradient}(45deg, rgb(21 206 71), rgb(99 253 122))`,\n `${shadow1} rgb(63 179 69 / 20%), ${shadow2} rgb(136 225 142 / 20%)`,\n \"rgb(60 214 68)\",\n ],\n blue: [\n fff, //\n `${linearGradient}(45deg, rgb(14 143 255), rgb(121 211 255))`,\n `${shadow1} rgb(92 182 255 / 20%), ${shadow2} rgb(135 232 222 / 20%)`,\n \"rgb(42 141 221)\",\n ],\n yellow: [\n _000, //\n `${linearGradient}(45deg, rgb(255 190 54), rgb(255 249 68))`,\n `${shadow1} rgb(214 203 55 / 20%), ${shadow2} rgb(202 203 137 / 20%)`,\n \"rgb(255 235 59)\",\n ],\n};\n\ntype Colors = keyof typeof colors;\n\n/**\n * BaseButton.\n *\n * Inspired by Next-ui.\n */\n@define(defineName)\nexport class BaseButton extends GodownElement {\n /**\n * Whether to disable this element.\n */\n @property({ type: Boolean, reflect: true }) disabled = false;\n /**\n * Invert font and background color.\n */\n @property({ type: Boolean, reflect: true }) ghost = false;\n /**\n * Whether this element is active or not.\n */\n @property({ type: Boolean, reflect: true }) active = false;\n /**\n * Enables rounded corners to appear capsule shaped.\n */\n @property({ type: Boolean, reflect: true }) radius = false;\n /**\n * Enables scale when mousedown.\n */\n @property({ type: Boolean, reflect: true }) scale = false;\n /**\n * The primary color.\n */\n @property() color: \"none\" | Colors = \"black\";\n /**\n * Text inside.\n */\n @property() text = \"\";\n\n @query(\"b\") _b: HTMLElement;\n @query(\"div\") _div: HTMLButtonElement;\n\n static styles = [\n unsafeCSS(\n constructCSS(\n vars,\n colors,\n (raw) => `[color=${raw}]`,\n (k, v) => `${cssvarScope}--${k}:${v}`,\n ),\n ),\n css`\n :host {\n ${cssvarScope}--padding: .075em .25em;\n ${cssvarScope}--deg: .075em .25em;\n ${cssvarScope}--ghost-width: .09em;\n ${cssvarScope}--modal-opacity: .15;\n ${cssvarScope}--modal-opacity-end: 0;\n ${cssvarScope}--modal-animation-duration: 1s;\n ${cssvarScope}--focus-scale: .975;\n transition: 0.1s;\n display: flex;\n width: fit-content;\n border-radius: 0.25em;\n cursor: pointer;\n background: none !important;\n }\n\n :host([disabled]) {\n cursor: not-allowed;\n }\n\n :host([active][scale]) div {\n scale: var(${cssvarScope}--focus-scale);\n }\n\n slot {\n display: flow-root;\n }\n\n div {\n background: var(${cssvarScope}--background);\n box-shadow: var(${cssvarScope}--box-shadow);\n color: var(${cssvarScope}--color, inherit);\n width: 100%;\n height: 100%;\n position: relative;\n overflow: hidden;\n border-radius: inherit;\n transition-duration: inherit;\n transition-property: scale;\n pointer-events: none;\n }\n\n b {\n pointer-events: none;\n transform: translate(-50%, -50%);\n position: absolute;\n visibility: hidden;\n }\n\n p {\n padding: var(${cssvarScope}--padding);\n margin: 0;\n user-select: none;\n transition: 0;\n }\n\n :host([ghost]) p {\n background-image: var(${cssvarScope}--background);\n margin: calc(-1 * var(${cssvarScope}--ghost-width));\n background-clip: text;\n -webkit-background-clip: text;\n color: transparent;\n }\n\n :host([ghost]) div {\n background: transparent;\n border: var(${cssvarScope}--ghost-width) solid var(${cssvarScope}--ghost-color);\n }\n\n :host([radius]) {\n border-radius: calc(infinity * 1px);\n ${cssvarScope}--padding: .075em .5em;\n }\n `,\n css`\n i {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n border-radius: 50%;\n transform: translate(0, 0);\n background: currentColor;\n opacity: var(${cssvarScope}--modal-opacity-end);\n visibility: visible;\n animation-duration: min(var(${cssvarScope}--modal-animation-duration), 2s);\n }\n\n :host([ghost]) i {\n background: var(${cssvarScope}--ghost-color);\n }\n\n @keyframes i {\n 0% {\n transform: scale(0);\n opacity: var(${cssvarScope}--modal-opacity);\n }\n 80% {\n transform: scale(1);\n }\n 100% {\n opacity: var(${cssvarScope}--modal-opacity-end);\n }\n }\n `,\n ];\n\n protected render(): HTMLTemplate {\n return html`\n <div color=\"${this.nextColor()}\">\n <b></b>\n <p>${this.text || htmlSlot()}</p>\n </div>\n `;\n }\n\n focus() {\n if (this.disabled) {\n return;\n }\n this.active = true;\n }\n\n blur() {\n this.active = false;\n }\n\n protected firstUpdated() {\n if (this.scale) {\n this.addEvent(this, \"mousedown\", this.focus);\n this.addEvent(this, \"mouseup\", (e: MouseEvent) => {\n if (this.disabled) {\n return;\n }\n this.blur();\n this._handleModal(e);\n });\n this.addEvent(this, \"mouseleave\", this.blur);\n return;\n } else {\n this.addEvent(document, \"click\", this._handelClick.bind(this));\n }\n }\n\n protected _handleModal(e: MouseEvent) {\n const a = this._div.offsetHeight + 1;\n const b = this._div.offsetWidth + 1;\n const size = `${Math.sqrt(a * a + b * b) * 2}px`;\n const translate = `translate(calc(-50% + ${e.offsetX}px), calc(-50% + ${e.offsetY}px))`;\n this._b.style.width = size;\n this._b.style.height = size;\n this._b.style.transform = translate;\n const i = document.createElement(\"i\");\n i.style.animationName = \"i\";\n this._b.appendChild(i);\n setTimeout(() => {\n i.remove();\n }, 2000);\n }\n\n protected _handelClick(e: MouseEvent) {\n if (this.disabled) {\n return;\n }\n if (e.target === this) {\n this._handleModal(e);\n this.focus();\n } else {\n this.blur();\n }\n }\n\n /**\n * Get the color to render, default is this.color.\n *\n * @returns New color.\n *\n * Colors can be set for different states.\n *\n * The matching selector is `[color=COLOR]`.\n *\n * @example\n * ```ts\n * button.adoptStyles(\"[color=COLOR1]{...}\")\n * button.adoptStyles(\"[color=COLOR2]{...}\")\n * button.nextColor = () => state ? COLOR1 : COLOR2\n * ```\n */\n nextColor(): Colors | string {\n return this.color;\n }\n}\n\nexport default BaseButton;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"base-button\": BaseButton;\n }\n}\n"]}
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import { type HTMLTemplate } from "
|
2
|
-
import { GodownElement } from "
|
1
|
+
import { type HTMLTemplate } from "../../lib/templates.js";
|
2
|
+
import { GodownElement } from "../../root.js";
|
3
3
|
/**
|
4
|
-
*
|
4
|
+
* CarouselSlider rotates child elements.
|
5
5
|
*/
|
6
|
-
export declare class
|
6
|
+
export declare class CarouselSlider extends GodownElement {
|
7
7
|
/**
|
8
8
|
* The index of the element is displayed for the first time.
|
9
9
|
*/
|
@@ -29,10 +29,10 @@ export declare class RotationPool extends GodownElement {
|
|
29
29
|
next(): void;
|
30
30
|
prev(): void;
|
31
31
|
}
|
32
|
-
export default
|
32
|
+
export default CarouselSlider;
|
33
33
|
declare global {
|
34
34
|
interface HTMLElementTagNameMap {
|
35
|
-
"rotation-port":
|
35
|
+
"rotation-port": CarouselSlider;
|
36
36
|
}
|
37
37
|
}
|
38
|
-
//# sourceMappingURL=
|
38
|
+
//# sourceMappingURL=carousel-slider.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"carousel-slider.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/carousel/carousel-slider.ts"],"names":[],"mappings":"AACA,OAAO,EAAuB,KAAK,YAAY,EAAY,MAAM,wBAAwB,CAAC;AAE1F,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAI9C;;GAEG;AACH,qBACa,cAAe,SAAQ,aAAa;IAC/C;;OAEG;IACyB,KAAK,SAAK;IACtC;;OAEG;IACyB,UAAU,SAAK;IAC3C;;OAEG;IACS,KAAK,SAAM;IAEL,QAAQ,EAAE,WAAW,CAAC;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,WAAW,EAAE,CAAM;IAE3B,MAAM,CAAC,MAAM,4BAqEX;IAEF,SAAS,CAAC,MAAM,IAAI,YAAY;IAUhC,OAAO,CAAC,OAAO;IAOf,OAAO,CAAC,KAAK,CAAC,EAAE,MAAM;IAOtB,SAAS,CAAC,YAAY;IAwBtB,oBAAoB;IAIpB,IAAI,CAAC,CAAC,EAAE,MAAM;IAMd,IAAI;IAWJ,IAAI;CAUL;AAED,eAAe,cAAc,CAAC;AAE9B,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,eAAe,EAAE,cAAc,CAAC;KACjC;CACF"}
|