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
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"carousel-slider.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/carousel/carousel-slider.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAqB,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAC1F,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,MAAM,UAAU,GAAG,iBAAiB,CAAC;AAErC;;GAEG;AAEI,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,aAAa;IAA1C;;QACL;;WAEG;QACyB,UAAK,GAAG,CAAC,CAAC;QACtC;;WAEG;QACyB,eAAU,GAAG,CAAC,CAAC;QAC3C;;WAEG;QACS,UAAK,GAAG,EAAE,CAAC;QAIvB,WAAM,GAAkB,EAAE,CAAC;IAwJ7B,CAAC;aAtJQ,WAAM,GAAG;QACd,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAmEF;KACF,AArEY,CAqEX;IAEQ,MAAM;QACd,MAAM,KAAK,GAAG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,GAAG,MAAM,CAAC;YACxC,IAAI,CAAC,QAAQ,CAAC,qBAAqB,EAAE,CAAC;YACtC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACf,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;IAED,IAAI;QACF,IAAI,IAAI,CAAC,KAAK,KAAK,CAAC,EAAE,CAAC;YACrB,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,SAAS,GAAG,eAAe,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,MAAM,CAAC;YAC9E,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,UAAU,GAAG,MAAM,CAAC;YACxC,IAAI,CAAC,QAAQ,CAAC,qBAAqB,EAAE,CAAC;YACtC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACtC,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;;AAnK2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAAW;AAIV;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDAAgB;AAI/B;IAAX,QAAQ,EAAE;6CAAY;AAEL;IAAjB,KAAK,CAAC,SAAS,CAAC;gDAAuB;AAd7B,cAAc;IAD1B,MAAM,CAAC,UAAU,CAAC;GACN,cAAc,CAwK1B;;AAED,eAAe,cAAc,CAAC","sourcesContent":["import { css, html, property, query } from \"../../deps.js\";\nimport { htmlSlot, htmlStyle, type HTMLTemplate, svgArrow } from \"../../lib/templates.js\";\nimport { define } from \"../../root.js\";\nimport { GodownElement } from \"../../root.js\";\n\nconst defineName = \"carousel-slider\";\n\n/**\n * CarouselSlider rotates child elements.\n */\n@define(defineName)\nexport class CarouselSlider extends GodownElement {\n /**\n * The index of the element is displayed for the first time.\n */\n @property({ type: Number }) index = 0;\n /**\n * If autochangee > 0, the rotation will be automated.\n */\n @property({ type: Number }) autochange = 0;\n /**\n * Width.\n */\n @property() width = \"\";\n\n @query(\"section\") _section: HTMLElement;\n intervalID: number;\n _clone: HTMLElement[] = [];\n\n static styles = [\n css`\n :host {\n display: block;\n transition: all 0.2s;\n }\n\n div {\n overflow: hidden;\n }\n\n div,\n section {\n width: 100%;\n display: flex;\n position: relative;\n transition: inherit;\n }\n\n a {\n position: absolute;\n height: 100%;\n width: fit-content;\n z-index: 1;\n display: flex;\n align-items: center;\n }\n\n .prev {\n left: 0;\n }\n\n .prev svg {\n transform: rotate(180deg);\n }\n\n .next {\n right: 0;\n }\n\n i {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: 0.3s;\n width: 2em;\n height: 100%;\n }\n\n svg {\n flex: 1;\n max-height: 100%;\n max-width: 100%;\n }\n\n a:hover i {\n background-color: #0000001a;\n width: 2.2em;\n }\n\n i svg path {\n stroke-width: 4;\n }\n\n slot::slotted(*) {\n flex-shrink: 0 !important;\n }\n `,\n ];\n\n protected render(): HTMLTemplate {\n const style = this.width && `:host{width:${this.width.split(\";\")[0]};}`;\n return html`<div>\n <a class=\"prev\" @click=\"${this.prev}\">${this.renderA(\"pre\")}</a>\n <section>${htmlSlot()}</section>\n ${htmlStyle(style)}\n <a class=\"next\" @click=\"${this.next}\">${this.renderA(\"suf\")}</a>\n </div>`;\n }\n\n private renderA(slot: string): HTMLTemplate {\n if (this.querySelector(`[slot=${slot}]`)) {\n return htmlSlot(slot);\n }\n return html`<i>${svgArrow()}</i>`;\n }\n\n remount(index?: number) {\n super.remount(undefined);\n if (index !== undefined) {\n this.show(index);\n }\n }\n\n protected firstUpdated() {\n if (this.assigned.length) {\n if (!this.width) {\n this.width = `${this.assigned[0].offsetWidth}px`;\n }\n if (this._clone.length) {\n this._clone.forEach((element) => element.remove());\n this._clone = [];\n }\n const last = this.assigned[0].cloneNode(true) as HTMLElement;\n const first = this.assigned[this.assigned.length - 1].cloneNode(true) as HTMLElement;\n first.style.marginLeft = \"-100%\";\n this._clone.push(first, last);\n this.appendChild(last);\n this.insertBefore(first, this.firstElementChild);\n this.show(this.index);\n }\n if (this.autochange) {\n this.intervalID = setInterval(() => {\n this.next();\n }, this.autochange);\n }\n }\n\n disconnectedCallback() {\n clearInterval(this.intervalID);\n }\n\n show(i: number) {\n this.index = i;\n this._section.style.transform = `translateX(-${i}00%)`;\n this._section.style.transition = \"inherit\";\n }\n\n next() {\n if (this.index === this.assigned.length - 3) {\n this._section.style.transform = `translateX(100%)`;\n this._section.style.transition = \"none\";\n this._section.getBoundingClientRect();\n this.show(0);\n } else {\n this.show(this.index + 1);\n }\n }\n\n prev() {\n if (this.index === 0) {\n this._section.style.transform = `translateX(-${this.assigned.length - 2}00%)`;\n this._section.style.transition = `none`;\n this._section.getBoundingClientRect();\n this.show(this.assigned.length - 3);\n } else {\n this.show(this.index - 1);\n }\n }\n}\n\nexport default CarouselSlider;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"rotation-port\": CarouselSlider;\n }\n}\n"]}
|
@@ -1,10 +1,13 @@
|
|
1
|
-
import { type CSSResultGroup } from "
|
2
|
-
import { type HTMLTemplate } from "
|
3
|
-
import {
|
1
|
+
import { type CSSResultGroup } from "../../deps.js";
|
2
|
+
import { type HTMLTemplate } from "../../lib/templates.js";
|
3
|
+
import { GodownElement } from "../../root.js";
|
4
4
|
/**
|
5
5
|
* BaseForm gets all the names and actual values of the child element.
|
6
6
|
*/
|
7
|
-
export declare class BaseForm extends
|
7
|
+
export declare class BaseForm<T extends object = object> extends GodownElement {
|
8
|
+
name: string;
|
9
|
+
value: T;
|
10
|
+
nameValue: () => [string, Record<string, any>];
|
8
11
|
/**
|
9
12
|
* Form enctype.
|
10
13
|
*/
|
@@ -16,22 +19,10 @@ export declare class BaseForm extends FormSTD {
|
|
16
19
|
namevalue(enctype?: "application/x-www-form-urlencoded" | "multipart/form-data" | "text/plain"): [string, Record<string, any>];
|
17
20
|
FormData(): FormData;
|
18
21
|
}
|
19
|
-
|
20
|
-
* SignForm is now an alias for {@linkcode BaseForm}.
|
21
|
-
*
|
22
|
-
* @extends BaseForm
|
23
|
-
*/
|
24
|
-
export declare class SignForm extends BaseForm {
|
25
|
-
/**
|
26
|
-
* @deprecated
|
27
|
-
*/
|
28
|
-
set: 0 | 1 | 2;
|
29
|
-
}
|
30
|
-
export default SignForm;
|
22
|
+
export default BaseForm;
|
31
23
|
declare global {
|
32
24
|
interface HTMLElementTagNameMap {
|
33
|
-
"sign-form": SignForm;
|
34
25
|
"base-form": BaseForm;
|
35
26
|
}
|
36
27
|
}
|
37
|
-
//# sourceMappingURL=
|
28
|
+
//# sourceMappingURL=base-form.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"base-form.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/form/base-form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,cAAc,EAAyB,MAAM,eAAe,CAAC;AAChF,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAErE,OAAO,EAAU,aAAa,EAAE,MAAM,eAAe,CAAC;AAEtD;;GAEG;AACH,qBACa,QAAQ,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,aAAa;IACxD,IAAI,SAAM;IACM,KAAK,IAAW;IAE5C,SAAS,sCAA0B;IACnC;;OAEG;IACS,OAAO,EAAE,mCAAmC,GAAG,qBAAqB,GAAG,YAAY,CAAyB;IAEzG,KAAK,EAAE,eAAe,CAAC;IAEtC,MAAM,CAAC,MAAM,iBAcO;IAEpB,SAAS,CAAC,MAAM,IAAI,YAAY;IAQhC,KAAK;IA0BL,SAAS,CAAC,OAAO,6EAAe,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAgChE,QAAQ,IAAI,QAAQ;CA8BrB;AACD,eAAe,QAAQ,CAAC;AAExB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
|
@@ -1,25 +1,37 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
};
|
7
|
-
import { css, html, property, query } from "../deps.js";
|
8
|
-
import { htmlSlot } from "../lib/templates.js";
|
9
|
-
import { define } from "../root.js";
|
10
|
-
import { each } from "../lib/utils.js";
|
11
|
-
import { FormSTD } from "./std.js";
|
1
|
+
import { __decorate } from "tslib";
|
2
|
+
import { css, html, property, query } from "../../deps.js";
|
3
|
+
import { htmlSlot } from "../../lib/templates.js";
|
4
|
+
import { each } from "../../lib/utils.js";
|
5
|
+
import { define, GodownElement } from "../../root.js";
|
12
6
|
/**
|
13
7
|
* BaseForm gets all the names and actual values of the child element.
|
14
8
|
*/
|
15
|
-
let BaseForm = class BaseForm extends
|
9
|
+
let BaseForm = class BaseForm extends GodownElement {
|
16
10
|
constructor() {
|
17
11
|
super(...arguments);
|
12
|
+
this.name = "";
|
13
|
+
this.value = {};
|
14
|
+
this.nameValue = () => this.namevalue();
|
18
15
|
/**
|
19
16
|
* Form enctype.
|
20
17
|
*/
|
21
18
|
this.enctype = "multipart/form-data";
|
22
19
|
}
|
20
|
+
static { this.styles = [
|
21
|
+
css `
|
22
|
+
form {
|
23
|
+
display: flex;
|
24
|
+
flex-direction: column;
|
25
|
+
align-items: center;
|
26
|
+
margin: 0;
|
27
|
+
}
|
28
|
+
|
29
|
+
main {
|
30
|
+
display: flex;
|
31
|
+
flex-direction: column;
|
32
|
+
}
|
33
|
+
`,
|
34
|
+
]; }
|
23
35
|
render() {
|
24
36
|
return html `<form enctype="${this.enctype}">
|
25
37
|
${htmlSlot("pre")}
|
@@ -116,21 +128,12 @@ let BaseForm = class BaseForm extends FormSTD {
|
|
116
128
|
return formData;
|
117
129
|
}
|
118
130
|
};
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
margin: 0;
|
126
|
-
}
|
127
|
-
|
128
|
-
main {
|
129
|
-
display: flex;
|
130
|
-
flex-direction: column;
|
131
|
-
}
|
132
|
-
`,
|
133
|
-
];
|
131
|
+
__decorate([
|
132
|
+
property()
|
133
|
+
], BaseForm.prototype, "name", void 0);
|
134
|
+
__decorate([
|
135
|
+
property({ type: Object })
|
136
|
+
], BaseForm.prototype, "value", void 0);
|
134
137
|
__decorate([
|
135
138
|
property()
|
136
139
|
], BaseForm.prototype, "enctype", void 0);
|
@@ -141,16 +144,5 @@ BaseForm = __decorate([
|
|
141
144
|
define("base-form")
|
142
145
|
], BaseForm);
|
143
146
|
export { BaseForm };
|
144
|
-
|
145
|
-
|
146
|
-
*
|
147
|
-
* @extends BaseForm
|
148
|
-
*/
|
149
|
-
let SignForm = class SignForm extends BaseForm {
|
150
|
-
};
|
151
|
-
SignForm = __decorate([
|
152
|
-
define("sign-form")
|
153
|
-
], SignForm);
|
154
|
-
export { SignForm };
|
155
|
-
export default SignForm;
|
156
|
-
//# sourceMappingURL=sign-form.js.map
|
147
|
+
export default BaseForm;
|
148
|
+
//# sourceMappingURL=base-form.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"base-form.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/form/base-form.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAuB,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,EAAE,QAAQ,EAAqB,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEtD;;GAEG;AAEI,IAAM,QA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IAAI,EAAE,KAAK,CAAC,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;gBACvC,IAAI,IAAI,EAAE,CAAC;oBACT,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;gBAC/B,CAAC;YACH,CAAC;QACH,CAAC,CAAC,CAAC;QACH,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;YACvB,QAAQ,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;QAClC,CAAC;QACD,QAAQ,CAAC,MAAM,EAAE,CAAC;QAClB,OAAO,QAAQ,CAAC;IAClB,CAAC;;AA1HW;IAAX,QAAQ,EAAE;sCAAW;AACM;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uCAAiB;AAMhC;IAAX,QAAQ,EAAE;yCAA6G;AAEzG;IAAd,KAAK,CAAC,MAAM,CAAC;uCAAwB;AAV3B,QAAQ;IADpB,MAAM,CAAC,WAAW,CAAC;GACP,QAAQ,CA4HpB;;AACD,eAAe,QAAQ,CAAC","sourcesContent":["import { css, type CSSResultGroup, html, property, query } from \"../../deps.js\";\nimport { htmlSlot, type HTMLTemplate } from \"../../lib/templates.js\";\nimport { each } from \"../../lib/utils.js\";\nimport { define, GodownElement } from \"../../root.js\";\n\n/**\n * BaseForm gets all the names and actual values of the child element.\n */\n@define(\"base-form\")\nexport class BaseForm<T extends object = object> extends GodownElement {\n @property() name = \"\";\n @property({ type: Object }) value = {} as T;\n\n nameValue = () => this.namevalue();\n /**\n * Form enctype.\n */\n @property() enctype: \"application/x-www-form-urlencoded\" | \"multipart/form-data\" | \"text/plain\" = \"multipart/form-data\";\n\n @query(\"form\") _form: HTMLFormElement;\n\n static styles = [\n css`\n form {\n display: flex;\n flex-direction: column;\n align-items: center;\n margin: 0;\n }\n\n main {\n display: flex;\n flex-direction: column;\n }\n `,\n ] as CSSResultGroup;\n\n protected render(): HTMLTemplate {\n return html`<form enctype=\"${this.enctype}\">\n ${htmlSlot(\"pre\")}\n <main>${htmlSlot()}</main>\n ${htmlSlot(\"suf\")}\n </form>`;\n }\n\n reset() {\n each(this._form, (node: HTMLFormElement | BaseForm) => {\n if (node.reset) {\n node.reset();\n }\n });\n const form: any = document.createElement(\"form\");\n for (const slot of this.shadowRoot.querySelectorAll(\"slot\")) {\n for (const i of slot.assignedNodes() as any) {\n if (i.reset) {\n i.reset();\n }\n form.appendChild(i.cloneNode(true));\n }\n }\n form.reset();\n for (const slot of this.shadowRoot.querySelectorAll(\"slot\")) {\n for (const i of slot.assignedNodes() as any) {\n if (i.name && form[i.name]) {\n i.value = form[i.name].value;\n }\n }\n }\n form.remove();\n }\n\n namevalue(enctype = this.enctype): [string, Record<string, any>] {\n const result = {};\n const tempForm = document.createElement(\"form\");\n tempForm.enctype = enctype;\n for (const slot of this.shadowRoot.querySelectorAll(\"slot\")) {\n for (const i of slot.assignedNodes() as any) {\n if (i.namevalue) {\n const [name, value] = i.namevalue();\n if (name) {\n result[name] = value;\n }\n } else {\n tempForm.appendChild(i.cloneNode(true));\n }\n }\n }\n const formData = new FormData(tempForm);\n for (const [key, value] of formData) {\n result[key] = value;\n }\n each(this._form, (node: any) => {\n if (node.namevalue) {\n const [name, value] = node.namevalue();\n if (name) {\n result[name] = value;\n }\n }\n });\n tempForm.remove();\n return [this.name, result];\n }\n\n FormData(): FormData {\n const temp = {};\n const tempForm = document.createElement(\"form\");\n tempForm.enctype = this.enctype;\n for (const slot of this._slots) {\n for (const i of slot.assignedNodes() as any) {\n if (i.FormData) {\n for (const [key, value] of i.FormData()) {\n temp[key] = value;\n }\n } else {\n tempForm.appendChild(i.cloneNode(true));\n }\n }\n }\n const formData = new FormData(tempForm);\n each(this._form, (node: any) => {\n if (node.namevalue) {\n const [name, value] = node.namevalue();\n if (name) {\n formData.append(name, value);\n }\n }\n });\n for (const key in temp) {\n formData.append(key, temp[key]);\n }\n tempForm.remove();\n return formData;\n }\n}\nexport default BaseForm;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"base-form\": BaseForm;\n }\n}\n"]}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import BaseForm from "./base-form.js";
|
2
|
+
/**
|
3
|
+
* SignForm is now an alias for {@linkcode BaseForm}.
|
4
|
+
*
|
5
|
+
* @extends BaseForm
|
6
|
+
*/
|
7
|
+
export declare class SignForm extends BaseForm {
|
8
|
+
/**
|
9
|
+
* @deprecated
|
10
|
+
*/
|
11
|
+
set: 0 | 1 | 2;
|
12
|
+
}
|
13
|
+
export default SignForm;
|
14
|
+
declare global {
|
15
|
+
interface HTMLElementTagNameMap {
|
16
|
+
"sign-form": SignForm;
|
17
|
+
}
|
18
|
+
}
|
19
|
+
//# sourceMappingURL=sign-form.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"sign-form.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/form/sign-form.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAEtC;;;;GAIG;AACH,qBACa,QAAS,SAAQ,QAAQ;IACpC;;OAEG;IACH,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;CAChB;AAED,eAAe,QAAQ,CAAC;AAExB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { __decorate } from "tslib";
|
2
|
+
import { define } from "../../root.js";
|
3
|
+
import BaseForm from "./base-form.js";
|
4
|
+
/**
|
5
|
+
* SignForm is now an alias for {@linkcode BaseForm}.
|
6
|
+
*
|
7
|
+
* @extends BaseForm
|
8
|
+
*/
|
9
|
+
let SignForm = class SignForm extends BaseForm {
|
10
|
+
};
|
11
|
+
SignForm = __decorate([
|
12
|
+
define("sign-form")
|
13
|
+
], SignForm);
|
14
|
+
export { SignForm };
|
15
|
+
export default SignForm;
|
16
|
+
//# sourceMappingURL=sign-form.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"sign-form.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/form/sign-form.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAEtC;;;;GAIG;AAEI,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,QAAQ;CAKrC,CAAA;AALY,QAAQ;IADpB,MAAM,CAAC,WAAW,CAAC;GACP,QAAQ,CAKpB;;AAED,eAAe,QAAQ,CAAC","sourcesContent":["import { define } from \"../../root.js\";\nimport BaseForm from \"./base-form.js\";\n\n/**\n * SignForm is now an alias for {@linkcode BaseForm}.\n *\n * @extends BaseForm\n */\n@define(\"sign-form\")\nexport class SignForm extends BaseForm {\n /**\n * @deprecated\n */\n set: 0 | 1 | 2;\n}\n\nexport default SignForm;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"sign-form\": SignForm;\n }\n}\n"]}
|
@@ -1,22 +1,22 @@
|
|
1
|
-
import { type HTMLTemplate } from "
|
2
|
-
import
|
3
|
-
import
|
1
|
+
import { type HTMLTemplate } from "../../lib/templates.js";
|
2
|
+
import { GodownElement } from "../../root.js";
|
3
|
+
import AvatarA from "../a/avatar-a.js";
|
4
4
|
/**
|
5
5
|
* AvatarGroup ensure that the display content does not exceed the maximum value, and display the excess quantity.
|
6
6
|
*/
|
7
|
-
export declare class AvatarGroup extends
|
7
|
+
export declare class AvatarGroup extends GodownElement {
|
8
8
|
/**
|
9
9
|
* The maximum number of elements that can be accepted for this element.
|
10
10
|
*/
|
11
11
|
max: number;
|
12
12
|
/**
|
13
|
-
* When the content overflows, create an {@linkcode
|
13
|
+
* When the content overflows, create an {@linkcode AvatarA} with the same {@linkcode AvatarA.more} attribute as more.
|
14
14
|
*/
|
15
15
|
more: number;
|
16
16
|
static styles: import("lit").CSSResult[];
|
17
17
|
protected render(): HTMLTemplate;
|
18
18
|
protected firstUpdated(): void;
|
19
|
-
append(args?:
|
19
|
+
append(args?: AvatarA): void;
|
20
20
|
subtract(): void;
|
21
21
|
}
|
22
22
|
export default AvatarGroup;
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"avatar-group.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/group/avatar-group.ts"],"names":[],"mappings":"AAEA,OAAO,EAAuB,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEhF,OAAO,EAAU,aAAa,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,OAAO,MAAM,kBAAkB,CAAC;AAIvC;;GAEG;AACH,qBACa,WAAY,SAAQ,aAAa;IAC5C;;OAEG;IACyB,GAAG,SAAM;IACrC;;OAEG;IACyB,IAAI,SAAK;IAErC,MAAM,CAAC,MAAM,4BAYX;IAEF,SAAS,CAAC,MAAM,IAAI,YAAY;IAKhC,SAAS,CAAC,YAAY;IAMtB,MAAM,CAAC,IAAI,UAAgB;IAe3B,QAAQ;CAYT;AAED,eAAe,WAAW,CAAC;AAE3B,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,WAAW,CAAC;KAC7B;CACF"}
|
@@ -1,21 +1,15 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
};
|
7
|
-
import
|
8
|
-
import { htmlSlot, htmlStyle } from "../lib/templates.js";
|
9
|
-
import { append } from "../lib/utils.js";
|
10
|
-
import AvatarAnchor from "../items/avatar-a.js";
|
11
|
-
import { define } from "../root.js";
|
12
|
-
import GroupSTD from "./std.js";
|
13
|
-
import { ifValue } from "../lib/directives.js";
|
1
|
+
import { __decorate } from "tslib";
|
2
|
+
import { css, html, nothing, property } from "../../deps.js";
|
3
|
+
import { ifValue } from "../../lib/directives.js";
|
4
|
+
import { htmlSlot, htmlStyle } from "../../lib/templates.js";
|
5
|
+
import { append } from "../../lib/utils.js";
|
6
|
+
import { define, GodownElement } from "../../root.js";
|
7
|
+
import AvatarA from "../a/avatar-a.js";
|
14
8
|
const defineName = "avatar-group";
|
15
9
|
/**
|
16
10
|
* AvatarGroup ensure that the display content does not exceed the maximum value, and display the excess quantity.
|
17
11
|
*/
|
18
|
-
let AvatarGroup = class AvatarGroup extends
|
12
|
+
let AvatarGroup = class AvatarGroup extends GodownElement {
|
19
13
|
constructor() {
|
20
14
|
super(...arguments);
|
21
15
|
/**
|
@@ -23,20 +17,33 @@ let AvatarGroup = class AvatarGroup extends GroupSTD {
|
|
23
17
|
*/
|
24
18
|
this.max = 99;
|
25
19
|
/**
|
26
|
-
* When the content overflows, create an {@linkcode
|
20
|
+
* When the content overflows, create an {@linkcode AvatarA} with the same {@linkcode AvatarA.more} attribute as more.
|
27
21
|
*/
|
28
22
|
this.more = 0;
|
29
23
|
}
|
24
|
+
static { this.styles = [
|
25
|
+
css `
|
26
|
+
:host {
|
27
|
+
display: flex;
|
28
|
+
width: 100%;
|
29
|
+
height: 100%;
|
30
|
+
}
|
31
|
+
|
32
|
+
div {
|
33
|
+
display: contents;
|
34
|
+
}
|
35
|
+
`,
|
36
|
+
]; }
|
30
37
|
render() {
|
31
38
|
const cssStr = `slot::slotted(:nth-of-type(n + ${(this.max || 0) + 1})) {display: none;}`;
|
32
|
-
return html `${htmlSlot()} ${htmlStyle(cssStr)} ${ifValue(this.more > 0, new
|
39
|
+
return html `${htmlSlot()} ${htmlStyle(cssStr)} ${ifValue(this.more > 0, new AvatarA({ more: this.more }), nothing)}`;
|
33
40
|
}
|
34
41
|
firstUpdated() {
|
35
42
|
if (!this.more && this.assigned.length > this.max) {
|
36
43
|
this.more = this.assigned.length - this.max;
|
37
44
|
}
|
38
45
|
}
|
39
|
-
append(args = new
|
46
|
+
append(args = new AvatarA()) {
|
40
47
|
if (this.max && this.assigned.length === this.max) {
|
41
48
|
this.assigned.pop().style.display = "none";
|
42
49
|
append(this, args);
|
@@ -66,19 +73,6 @@ let AvatarGroup = class AvatarGroup extends GroupSTD {
|
|
66
73
|
}
|
67
74
|
}
|
68
75
|
};
|
69
|
-
AvatarGroup.styles = [
|
70
|
-
css `
|
71
|
-
:host {
|
72
|
-
display: flex;
|
73
|
-
width: 100%;
|
74
|
-
height: 100%;
|
75
|
-
}
|
76
|
-
|
77
|
-
div {
|
78
|
-
display: contents;
|
79
|
-
}
|
80
|
-
`,
|
81
|
-
];
|
82
76
|
__decorate([
|
83
77
|
property({ type: Number })
|
84
78
|
], AvatarGroup.prototype, "max", void 0);
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"avatar-group.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/group/avatar-group.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAqB,MAAM,wBAAwB,CAAC;AAChF,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,OAAO,MAAM,kBAAkB,CAAC;AAEvC,MAAM,UAAU,GAAG,cAAc,CAAC;AAElC;;GAEG;AAEI,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,aAAa;IAAvC;;QACL;;WAEG;QACyB,QAAG,GAAG,EAAE,CAAC;QACrC;;WAEG;QACyB,SAAI,GAAG,CAAC,CAAC;IAsDvC,CAAC;aApDQ,WAAM,GAAG;QACd,GAAG,CAAA;;;;;;;;;;KAUF;KACF,AAZY,CAYX;IAEQ,MAAM;QACd,MAAM,MAAM,GAAG,kCAAkC,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,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C,IAAI,EAAE,IAAI,CAAC,CAAC;QACrB,CAAC;IACH,CAAC;IAED,QAAQ;QACN,IAAI,IAAI,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;YACpB,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC;YACvC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC;YACd,OAAO;QACT,CAAC;aAAM,IAAI,IAAI,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;YACzB,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC;QACjB,CAAC;QACD,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;YACzB,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC;QAC/B,CAAC;IACH,CAAC;;AAzD2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCAAU;AAIT;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCAAU;AAR1B,WAAW;IADvB,MAAM,CAAC,UAAU,CAAC;GACN,WAAW,CA8DvB;;AAED,eAAe,WAAW,CAAC","sourcesContent":["import { css, html, nothing, property } from \"../../deps.js\";\nimport { ifValue } from \"../../lib/directives.js\";\nimport { htmlSlot, htmlStyle, type HTMLTemplate } from \"../../lib/templates.js\";\nimport { append } from \"../../lib/utils.js\";\nimport { define, GodownElement } from \"../../root.js\";\nimport AvatarA from \"../a/avatar-a.js\";\n\nconst defineName = \"avatar-group\";\n\n/**\n * AvatarGroup ensure that the display content does not exceed the maximum value, and display the excess quantity.\n */\n@define(defineName)\nexport class AvatarGroup extends GodownElement {\n /**\n * The maximum number of elements that can be accepted for this element.\n */\n @property({ type: Number }) max = 99;\n /**\n * When the content overflows, create an {@linkcode AvatarA} with the same {@linkcode AvatarA.more} attribute as more.\n */\n @property({ type: Number }) more = 0;\n\n static styles = [\n css`\n :host {\n display: flex;\n width: 100%;\n height: 100%;\n }\n\n div {\n display: contents;\n }\n `,\n ];\n\n protected render(): HTMLTemplate {\n const cssStr = `slot::slotted(:nth-of-type(n + ${(this.max || 0) + 1})) {display: none;}`;\n return html`${htmlSlot()} ${htmlStyle(cssStr)} ${ifValue(this.more > 0, new AvatarA({ more: this.more }), nothing)}`;\n }\n\n protected firstUpdated() {\n if (!this.more && this.assigned.length > this.max) {\n this.more = this.assigned.length - this.max;\n }\n }\n\n append(args = new AvatarA()) {\n if (this.max && this.assigned.length === this.max) {\n this.assigned.pop().style.display = \"none\";\n append(this, args);\n this.assigned.pop().style.display = \"none\";\n this.more = 2;\n } else if (this.max && this.assigned.length > this.max) {\n append(this, args);\n this.assigned.pop().style.display = \"none\";\n this.more += 1;\n } else {\n append(this, args);\n }\n }\n\n subtract() {\n if (this.more === 2) {\n this.assigned.pop().style.display = \"\";\n this.more = 0;\n return;\n } else if (this.more > 0) {\n this.more -= 1;\n }\n if (this.assigned.length) {\n this.assigned.pop().remove();\n }\n }\n}\n\nexport default AvatarGroup;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"avatar-group\": AvatarGroup;\n }\n}\n"]}
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import { type HTMLTemplate } from "
|
2
|
-
import
|
1
|
+
import { type HTMLTemplate } from "../../lib/templates.js";
|
2
|
+
import { GodownElement } from "../../root.js";
|
3
3
|
/**
|
4
4
|
* DetailsGroup used to support multiple details like.
|
5
5
|
*/
|
6
|
-
export declare class DetailsGroup extends
|
6
|
+
export declare class DetailsGroup extends GodownElement {
|
7
7
|
/**
|
8
8
|
* Default open element index.
|
9
9
|
*/
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"details-group.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/group/details-group.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAU,aAAa,EAAE,MAAM,eAAe,CAAC;AAItD;;GAEG;AACH,qBACa,YAAa,SAAQ,aAAa;IAC7C;;OAEG;IACyB,KAAK,SAAM;IACvC;;OAEG;IAC0B,IAAI,UAAS;IAE1C,MAAM,CAAC,MAAM,4BAMX;IAEF,SAAS,CAAC,MAAM,IAAI,YAAY;IAIhC,iBAAiB;IAQjB,oBAAoB;IAKpB,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,UAAU;CAIrC;AAED,eAAe,YAAY,CAAC;AAE5B,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,eAAe,EAAE,YAAY,CAAC;KAC/B;CACF"}
|
@@ -1,18 +1,12 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
6
|
-
};
|
7
|
-
import { css, property } from "../deps.js";
|
8
|
-
import { htmlSlot } from "../lib/templates.js";
|
9
|
-
import { define } from "../root.js";
|
10
|
-
import GroupSTD from "./std.js";
|
1
|
+
import { __decorate } from "tslib";
|
2
|
+
import { css, property } from "../../deps.js";
|
3
|
+
import { htmlSlot } from "../../lib/templates.js";
|
4
|
+
import { define, GodownElement } from "../../root.js";
|
11
5
|
const defineName = "details-group";
|
12
6
|
/**
|
13
7
|
* DetailsGroup used to support multiple details like.
|
14
8
|
*/
|
15
|
-
let DetailsGroup = class DetailsGroup extends
|
9
|
+
let DetailsGroup = class DetailsGroup extends GodownElement {
|
16
10
|
constructor() {
|
17
11
|
super(...arguments);
|
18
12
|
/**
|
@@ -24,6 +18,13 @@ let DetailsGroup = class DetailsGroup extends GroupSTD {
|
|
24
18
|
*/
|
25
19
|
this.only = false;
|
26
20
|
}
|
21
|
+
static { this.styles = [
|
22
|
+
css `
|
23
|
+
:host {
|
24
|
+
display: block;
|
25
|
+
}
|
26
|
+
`,
|
27
|
+
]; }
|
27
28
|
render() {
|
28
29
|
return htmlSlot();
|
29
30
|
}
|
@@ -43,13 +44,6 @@ let DetailsGroup = class DetailsGroup extends GroupSTD {
|
|
43
44
|
this.index = this.assigned.indexOf(e.target);
|
44
45
|
}
|
45
46
|
};
|
46
|
-
DetailsGroup.styles = [
|
47
|
-
css `
|
48
|
-
:host {
|
49
|
-
display: block;
|
50
|
-
}
|
51
|
-
`,
|
52
|
-
];
|
53
47
|
__decorate([
|
54
48
|
property({ type: Number })
|
55
49
|
], DetailsGroup.prototype, "index", void 0);
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"details-group.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/group/details-group.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAqB,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEtD,MAAM,UAAU,GAAG,eAAe,CAAC;AAEnC;;GAEG;AAEI,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,aAAa;IAAxC;;QACL;;WAEG;QACyB,UAAK,GAAG,CAAC,CAAC,CAAC;QACvC;;WAEG;QAC0B,SAAI,GAAG,KAAK,CAAC;IA+B5C,CAAC;aA7BQ,WAAM,GAAG;QACd,GAAG,CAAA;;;;KAIF;KACF,AANY,CAMX;IAEQ,MAAM;QACd,OAAO,QAAQ,EAAE,CAAC;IACpB,CAAC;IAED,iBAAiB;QACf,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QAClD,CAAC;QACD,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACtD,CAAC;IAED,oBAAoB;QAClB,KAAK,CAAC,oBAAoB,EAAE,CAAC;QAC7B,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;IAClB,CAAC;IAES,YAAY,CAAC,CAAa;QAClC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;QACnD,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,MAAqB,CAAC,CAAC;IAC9D,CAAC;;AAlC2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CAAY;AAIV;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;0CAAc;AAR/B,YAAY;IADxB,MAAM,CAAC,UAAU,CAAC;GACN,YAAY,CAuCxB;;AAED,eAAe,YAAY,CAAC","sourcesContent":["import { css, property } from \"../../deps.js\";\nimport { htmlSlot, type HTMLTemplate } from \"../../lib/templates.js\";\nimport { define, GodownElement } from \"../../root.js\";\n\nconst defineName = \"details-group\";\n\n/**\n * DetailsGroup used to support multiple details like.\n */\n@define(defineName)\nexport class DetailsGroup extends GodownElement {\n /**\n * Default open element index.\n */\n @property({ type: Number }) index = -1;\n /**\n * If true, close the previous element when switching index.\n */\n @property({ type: Boolean }) only = false;\n\n static styles = [\n css`\n :host {\n display: block;\n }\n `,\n ];\n\n protected render(): HTMLTemplate {\n return htmlSlot();\n }\n\n connectedCallback() {\n super.connectedCallback();\n if (this.only) {\n this.addEvent(this, \"click\", this._handleClick);\n }\n this.children[this.index]?.setAttribute(\"open\", \"\");\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.index = -1;\n }\n\n protected _handleClick(e: MouseEvent) {\n this.children[this.index]?.removeAttribute(\"open\");\n this.index = this.assigned.indexOf(e.target as HTMLElement);\n }\n}\n\nexport default DetailsGroup;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"details-group\": DetailsGroup;\n }\n}\n"]}
|
@@ -1,12 +1,12 @@
|
|
1
|
-
import { type CSSResultGroup, type PropertyValueMap } from "
|
2
|
-
import { type HTMLTemplate } from "
|
3
|
-
import
|
1
|
+
import { type CSSResultGroup, type PropertyValueMap } from "../../deps.js";
|
2
|
+
import { type HTMLTemplate } from "../../lib/templates.js";
|
3
|
+
import { GodownElement } from "../../root.js";
|
4
4
|
/**
|
5
5
|
* TabGroup used to support multiple tabs.
|
6
6
|
*
|
7
7
|
* Inspired by Next-ui.
|
8
8
|
*/
|
9
|
-
export declare class TabGroup extends
|
9
|
+
export declare class TabGroup extends GodownElement {
|
10
10
|
/**
|
11
11
|
* Active slot name.
|
12
12
|
*/
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"tab-group.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/group/tab-group.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,cAAc,EAAkB,KAAK,gBAAgB,EAAS,MAAM,eAAe,CAAC;AAEvG,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAErE,OAAO,EAAqC,aAAa,EAAE,MAAM,eAAe,CAAC;AAMjF;;;;GAIG;AACH,qBACa,QAAS,SAAQ,aAAa;IACzC;;OAEG;IACS,KAAK,SAAM;IACvB;;OAEG;IACS,GAAG,SAAM;IACrB;;OAEG;IACS,KAAK,SAAW;IAC5B;;OAEG;IACM,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAClC;;OAEG;IACM,QAAQ,EAAE,MAAM,EAAE,CAAC;IAE5B,MAAM,CAAC,MAAM,iBA0CO;IAEpB,SAAS,CAAC,MAAM,IAAI,YAAY;IAoBhC,SAAS,CAAC,OAAO,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,IAAI,CAAC;IAkB3D;;;;OAIG;IACH,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,UAAQ;IAalC,iBAAiB;IAWjB;;OAEG;IACH,OAAO;CAGR;AAED,eAAe,QAAQ,CAAC;AAExB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
|
@@ -1,15 +1,9 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
};
|
7
|
-
import { createScope, cssvarValues, define } from "../root.js";
|
8
|
-
import { css, html, property, state } from "../deps.js";
|
9
|
-
import { htmlSlot } from "../lib/templates.js";
|
10
|
-
import { deepQuerySelectorAll } from "../lib/utils.js";
|
11
|
-
import GroupSTD from "./std.js";
|
12
|
-
import { ifValue } from "../lib/directives.js";
|
1
|
+
import { __decorate } from "tslib";
|
2
|
+
import { css, html, property, state } from "../../deps.js";
|
3
|
+
import { ifValue } from "../../lib/directives.js";
|
4
|
+
import { htmlSlot } from "../../lib/templates.js";
|
5
|
+
import { deepQuerySelectorAll } from "../../lib/utils.js";
|
6
|
+
import { createScope, cssvarValues, define, GodownElement } from "../../root.js";
|
13
7
|
const defineName = "tab-group";
|
14
8
|
const cssvarScope = createScope(defineName);
|
15
9
|
/**
|
@@ -17,7 +11,7 @@ const cssvarScope = createScope(defineName);
|
|
17
11
|
*
|
18
12
|
* Inspired by Next-ui.
|
19
13
|
*/
|
20
|
-
let TabGroup = class TabGroup extends
|
14
|
+
let TabGroup = class TabGroup extends GodownElement {
|
21
15
|
constructor() {
|
22
16
|
super(...arguments);
|
23
17
|
/**
|
@@ -33,6 +27,49 @@ let TabGroup = class TabGroup extends GroupSTD {
|
|
33
27
|
*/
|
34
28
|
this.align = "start";
|
35
29
|
}
|
30
|
+
static { this.styles = [
|
31
|
+
GodownElement.styles,
|
32
|
+
css `
|
33
|
+
:host {
|
34
|
+
${cssvarScope}--background: var(${cssvarValues.main});
|
35
|
+
${cssvarScope}--background-active: rgb(var(${cssvarValues.textRGB}) / 18%);
|
36
|
+
${cssvarScope}--radius: .25em;
|
37
|
+
${cssvarScope}--cursor: default;
|
38
|
+
background: var(${cssvarScope}--background);
|
39
|
+
display: block;
|
40
|
+
}
|
41
|
+
|
42
|
+
nav {
|
43
|
+
display: grid;
|
44
|
+
grid-auto-flow: column;
|
45
|
+
gap: 0.5em;
|
46
|
+
position: relative;
|
47
|
+
border-radius: inherit;
|
48
|
+
}
|
49
|
+
|
50
|
+
section {
|
51
|
+
white-space: nowrap;
|
52
|
+
min-width: 2em;
|
53
|
+
border-radius: inherit;
|
54
|
+
padding: 0 0.2em;
|
55
|
+
cursor: var(${cssvarScope}--cursor);
|
56
|
+
z-index: 1;
|
57
|
+
display: flex;
|
58
|
+
align-items: center;
|
59
|
+
justify-content: center;
|
60
|
+
}
|
61
|
+
|
62
|
+
#slider {
|
63
|
+
height: 100%;
|
64
|
+
position: absolute;
|
65
|
+
padding: 0;
|
66
|
+
background: var(${cssvarScope}--background-active);
|
67
|
+
transform: translateX(-50%);
|
68
|
+
transition: all 0.25s ease 0s;
|
69
|
+
z-index: 0;
|
70
|
+
}
|
71
|
+
`,
|
72
|
+
]; }
|
36
73
|
render() {
|
37
74
|
const headers = (this.headers || this.contents).map((value) => {
|
38
75
|
return html ` <section
|
@@ -104,49 +141,6 @@ let TabGroup = class TabGroup extends GroupSTD {
|
|
104
141
|
this.contents = this.slottedNames;
|
105
142
|
}
|
106
143
|
};
|
107
|
-
TabGroup.styles = [
|
108
|
-
GroupSTD.styles,
|
109
|
-
css `
|
110
|
-
:host {
|
111
|
-
${cssvarScope}--background: var(${cssvarValues.main});
|
112
|
-
${cssvarScope}--background-active: rgb(var(${cssvarValues.textRGB}) / 18%);
|
113
|
-
${cssvarScope}--radius: .25em;
|
114
|
-
${cssvarScope}--cursor: default;
|
115
|
-
background: var(${cssvarScope}--background);
|
116
|
-
display: block;
|
117
|
-
}
|
118
|
-
|
119
|
-
nav {
|
120
|
-
display: grid;
|
121
|
-
grid-auto-flow: column;
|
122
|
-
gap: 0.5em;
|
123
|
-
position: relative;
|
124
|
-
border-radius: inherit;
|
125
|
-
}
|
126
|
-
|
127
|
-
section {
|
128
|
-
white-space: nowrap;
|
129
|
-
min-width: 2em;
|
130
|
-
border-radius: inherit;
|
131
|
-
padding: 0 0.2em;
|
132
|
-
cursor: var(${cssvarScope}--cursor);
|
133
|
-
z-index: 1;
|
134
|
-
display: flex;
|
135
|
-
align-items: center;
|
136
|
-
justify-content: center;
|
137
|
-
}
|
138
|
-
|
139
|
-
#slider {
|
140
|
-
height: 100%;
|
141
|
-
position: absolute;
|
142
|
-
padding: 0;
|
143
|
-
background: var(${cssvarScope}--background-active);
|
144
|
-
transform: translateX(-50%);
|
145
|
-
transition: all 0.25s ease 0s;
|
146
|
-
z-index: 0;
|
147
|
-
}
|
148
|
-
`,
|
149
|
-
];
|
150
144
|
__decorate([
|
151
145
|
property()
|
152
146
|
], TabGroup.prototype, "index", void 0);
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"tab-group.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/group/tab-group.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAuB,IAAI,EAAE,QAAQ,EAAyB,KAAK,EAAE,MAAM,eAAe,CAAC;AACvG,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAqB,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEjF,MAAM,UAAU,GAAG,WAAW,CAAC;AAE/B,MAAM,WAAW,GAAG,WAAW,CAAC,UAAU,CAAC,CAAC;AAE5C;;;;GAIG;AAEI,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,aAAa;IAApC;;QACL;;WAEG;QACS,UAAK,GAAG,EAAE,CAAC;QACvB;;WAEG;QACS,QAAG,GAAG,EAAE,CAAC;QACrB;;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IAAI,CAAC,GAAG,EAAE,CAAC;YAC5B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC;QACxB,CAAC;QACD,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;IAED;;OAEG;IACH,OAAO;QACL,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,YAAY,CAAC;IACpC,CAAC;;AAtIW;IAAX,QAAQ,EAAE;uCAAY;AAIX;IAAX,QAAQ,EAAE;qCAAU;AAIT;IAAX,QAAQ,EAAE;uCAAiB;AAInB;IAAR,KAAK,EAAE;yCAA0B;AAIzB;IAAR,KAAK,EAAE;0CAAoB;AApBjB,QAAQ;IADpB,MAAM,CAAC,UAAU,CAAC;GACN,QAAQ,CA2IpB;;AAED,eAAe,QAAQ,CAAC","sourcesContent":["import { css, type CSSResultGroup, html, property, type PropertyValueMap, state } from \"../../deps.js\";\nimport { ifValue } from \"../../lib/directives.js\";\nimport { htmlSlot, type HTMLTemplate } from \"../../lib/templates.js\";\nimport { deepQuerySelectorAll } from \"../../lib/utils.js\";\nimport { createScope, cssvarValues, define, GodownElement } from \"../../root.js\";\n\nconst defineName = \"tab-group\";\n\nconst cssvarScope = createScope(defineName);\n\n/**\n * TabGroup used to support multiple tabs.\n *\n * Inspired by Next-ui.\n */\n@define(defineName)\nexport class TabGroup extends GodownElement {\n /**\n * Active slot name.\n */\n @property() index = \"\";\n /**\n * Default slot name.\n */\n @property() def = \"\";\n /**\n * Align type.\n */\n @property() align = \"start\";\n /**\n * Header texts or slot names, if headers is a zero value, it is taken from the {@linkcode TabGroup.contents}.\n */\n @state() headers: string[] | void;\n /**\n * Contents slot names.\n */\n @state() contents: string[];\n\n static styles = [\n GodownElement.styles,\n css`\n :host {\n ${cssvarScope}--background: var(${cssvarValues.main});\n ${cssvarScope}--background-active: rgb(var(${cssvarValues.textRGB}) / 18%);\n ${cssvarScope}--radius: .25em;\n ${cssvarScope}--cursor: default;\n background: var(${cssvarScope}--background);\n display: block;\n }\n\n nav {\n display: grid;\n grid-auto-flow: column;\n gap: 0.5em;\n position: relative;\n border-radius: inherit;\n }\n\n section {\n white-space: nowrap;\n min-width: 2em;\n border-radius: inherit;\n padding: 0 0.2em;\n cursor: var(${cssvarScope}--cursor);\n z-index: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n #slider {\n height: 100%;\n position: absolute;\n padding: 0;\n background: var(${cssvarScope}--background-active);\n transform: translateX(-50%);\n transition: all 0.25s ease 0s;\n z-index: 0;\n }\n `,\n ] as CSSResultGroup;\n\n protected render(): HTMLTemplate {\n const headers = (this.headers || this.contents).map((value) => {\n return html` <section\n class=\"${ifValue(this.index === value, \"active\")}\"\n @click=\"${() => {\n this.select(value, true);\n }}\"\n >\n ${this.headers ? htmlSlot(value) : value}\n </section>`;\n });\n return html`\n <nav style=\"justify-content:${this.align}\">\n ${headers}\n <section id=\"slider\"></section>\n </nav>\n ${htmlSlot(this.index || this.def)}\n `;\n }\n\n protected updated(changedProperties: PropertyValueMap<this>) {\n if (changedProperties.has(\"index\")) {\n // Move slider.\n const active = this.shadowRoot.querySelector<HTMLElement>(\"section.active\");\n const slider = this.shadowRoot.querySelector<HTMLElement>(\"#slider\");\n if (active) {\n this.dispatchEvent(new CustomEvent(\"select\", { detail: this.index }));\n slider.style.width = `${active.clientWidth}px`;\n slider.animate([{ left: `${active.offsetLeft + active.clientWidth / 2}px` }], {\n duration: 250,\n fill: \"forwards\",\n });\n } else {\n slider.style.width = \"0\";\n }\n }\n }\n\n /**\n * Select one tab.\n * @param s New index.\n * @param callSync if true, update all same elements (headers contains s).\n */\n select(s: string, callSync = false) {\n if (callSync) {\n const elements = deepQuerySelectorAll<this>(this.tagName, document.body);\n for (const e of elements) {\n if ((e.headers || e.contents).includes(s)) {\n e.select(s);\n }\n }\n return;\n }\n this.index = s;\n }\n\n connectedCallback() {\n super.connectedCallback();\n if (!this.def) {\n this.def = this.slottedNames[0] || \"\";\n }\n if (!this.index && this.def) {\n this.index = this.def;\n }\n this.getTabs();\n }\n\n /**\n * Update content controls (this.headers, this.contents).\n */\n getTabs() {\n this.contents = this.slottedNames;\n }\n}\n\nexport default TabGroup;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"tab-group\": TabGroup;\n }\n}\n"]}
|