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,38 @@
|
|
1
|
+
export { AvatarA } from "./a/avatar-a.js";
|
2
|
+
export { LinkA } from "./a/link-a.js";
|
3
|
+
export { SuperA } from "./a/super-a.js";
|
4
|
+
export { BaseButton } from "./button/base-button.js";
|
5
|
+
export { CarouselSlider } from "./carousel/carousel-slider.js";
|
6
|
+
export { BaseForm } from "./form/base-form.js";
|
7
|
+
export { SignForm } from "./form/sign-form.js";
|
8
|
+
export { AvatarGroup } from "./group/avatar-group.js";
|
9
|
+
export { DetailsGroup } from "./group/details-group.js";
|
10
|
+
export { TabGroup } from "./group/tab-group.js";
|
11
|
+
export { BaseInput } from "./input/base-input.js";
|
12
|
+
export { LabelInput } from "./input/label-input.js";
|
13
|
+
export { SearchInput } from "./input/search-input.js";
|
14
|
+
export { SelectInput } from "./input/select-input.js";
|
15
|
+
export { SplitInput } from "./input/split-input.js";
|
16
|
+
export { SwitchInput } from "./input/switch-input.js";
|
17
|
+
export { AlertItem } from "./items/alert-item.js";
|
18
|
+
export { CardItem } from "./items/card-item.js";
|
19
|
+
export { DragBox } from "./items/drag-box.js";
|
20
|
+
export { TimeBar } from "./items/time-bar.js";
|
21
|
+
export { DividerLine } from "./layout/divider-line.js";
|
22
|
+
export { FlexFlow } from "./layout/flex-flow.js";
|
23
|
+
export { NavAside } from "./layout/nav-aside.js";
|
24
|
+
export { NavLayout } from "./layout/nav-layout.js";
|
25
|
+
export { LoadingProgress } from "./loading/loading-progress.js";
|
26
|
+
export { SkeletonScreen } from "./loading/skeleton-screen.js";
|
27
|
+
export { OpenDetails } from "./open/open-details.js";
|
28
|
+
export { OpenDialog } from "./open/open-dialog.js";
|
29
|
+
export { OpenList } from "./open/open-list.js";
|
30
|
+
export { OpenOffset } from "./open/open-offset.js";
|
31
|
+
export { OpenTooltip } from "./open/open-tooltip.js";
|
32
|
+
export { ClipText } from "./text/clip-text.js";
|
33
|
+
export { OverbreathText } from "./text/overbreath-text.js";
|
34
|
+
export { TypewriterText } from "./text/typewriter-text.js";
|
35
|
+
export { RouteView } from "./view/route-view.js";
|
36
|
+
export { ScrollX } from "./view/scroll-x.js";
|
37
|
+
export { WrapView } from "./view/wrap-view.js";
|
38
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAA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AAoB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC"}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
/// script generated
|
2
|
+
export { AvatarA } from "./a/avatar-a.js";
|
3
|
+
export { LinkA } from "./a/link-a.js";
|
4
|
+
export { SuperA } from "./a/super-a.js";
|
5
|
+
export { BaseButton } from "./button/base-button.js";
|
6
|
+
export { CarouselSlider } from "./carousel/carousel-slider.js";
|
7
|
+
export { BaseForm } from "./form/base-form.js";
|
8
|
+
export { SignForm } from "./form/sign-form.js";
|
9
|
+
export { AvatarGroup } from "./group/avatar-group.js";
|
10
|
+
export { DetailsGroup } from "./group/details-group.js";
|
11
|
+
export { TabGroup } from "./group/tab-group.js";
|
12
|
+
export { BaseInput } from "./input/base-input.js";
|
13
|
+
export { LabelInput } from "./input/label-input.js";
|
14
|
+
export { SearchInput } from "./input/search-input.js";
|
15
|
+
export { SelectInput } from "./input/select-input.js";
|
16
|
+
export { SplitInput } from "./input/split-input.js";
|
17
|
+
export { SwitchInput } from "./input/switch-input.js";
|
18
|
+
export { AlertItem } from "./items/alert-item.js";
|
19
|
+
export { CardItem } from "./items/card-item.js";
|
20
|
+
export { DragBox } from "./items/drag-box.js";
|
21
|
+
export { TimeBar } from "./items/time-bar.js";
|
22
|
+
export { DividerLine } from "./layout/divider-line.js";
|
23
|
+
export { FlexFlow } from "./layout/flex-flow.js";
|
24
|
+
export { NavAside } from "./layout/nav-aside.js";
|
25
|
+
export { NavLayout } from "./layout/nav-layout.js";
|
26
|
+
export { LoadingProgress } from "./loading/loading-progress.js";
|
27
|
+
export { SkeletonScreen } from "./loading/skeleton-screen.js";
|
28
|
+
export { OpenDetails } from "./open/open-details.js";
|
29
|
+
export { OpenDialog } from "./open/open-dialog.js";
|
30
|
+
export { OpenList } from "./open/open-list.js";
|
31
|
+
export { OpenOffset } from "./open/open-offset.js";
|
32
|
+
export { OpenTooltip } from "./open/open-tooltip.js";
|
33
|
+
export { ClipText } from "./text/clip-text.js";
|
34
|
+
export { OverbreathText } from "./text/overbreath-text.js";
|
35
|
+
export { TypewriterText } from "./text/typewriter-text.js";
|
36
|
+
export { RouteView } from "./view/route-view.js";
|
37
|
+
export { ScrollX } from "./view/scroll-x.js";
|
38
|
+
export { WrapView } from "./view/wrap-view.js";
|
39
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/index.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC","sourcesContent":["/// script generated\nexport { AvatarA } from \"./a/avatar-a.js\";\nexport { LinkA } from \"./a/link-a.js\";\nexport { SuperA } from \"./a/super-a.js\";\nexport { BaseButton } from \"./button/base-button.js\";\nexport { CarouselSlider } from \"./carousel/carousel-slider.js\";\nexport { BaseForm } from \"./form/base-form.js\";\nexport { SignForm } from \"./form/sign-form.js\";\nexport { AvatarGroup } from \"./group/avatar-group.js\";\nexport { DetailsGroup } from \"./group/details-group.js\";\nexport { TabGroup } from \"./group/tab-group.js\";\nexport { BaseInput } from \"./input/base-input.js\";\nexport { LabelInput } from \"./input/label-input.js\";\nexport { SearchInput } from \"./input/search-input.js\";\nexport { SelectInput } from \"./input/select-input.js\";\nexport { SplitInput } from \"./input/split-input.js\";\nexport { SwitchInput } from \"./input/switch-input.js\";\nexport { AlertItem } from \"./items/alert-item.js\";\nexport { CardItem } from \"./items/card-item.js\";\nexport { DragBox } from \"./items/drag-box.js\";\nexport { TimeBar } from \"./items/time-bar.js\";\nexport { DividerLine } from \"./layout/divider-line.js\";\nexport { FlexFlow } from \"./layout/flex-flow.js\";\nexport { NavAside } from \"./layout/nav-aside.js\";\nexport { NavLayout } from \"./layout/nav-layout.js\";\nexport { LoadingProgress } from \"./loading/loading-progress.js\";\nexport { SkeletonScreen } from \"./loading/skeleton-screen.js\";\nexport { OpenDetails } from \"./open/open-details.js\";\nexport { OpenDialog } from \"./open/open-dialog.js\";\nexport { OpenList } from \"./open/open-list.js\";\nexport { OpenOffset } from \"./open/open-offset.js\";\nexport { OpenTooltip } from \"./open/open-tooltip.js\";\nexport { ClipText } from \"./text/clip-text.js\";\nexport { OverbreathText } from \"./text/overbreath-text.js\";\nexport { TypewriterText } from \"./text/typewriter-text.js\";\nexport { RouteView } from \"./view/route-view.js\";\nexport { ScrollX } from \"./view/scroll-x.js\";\nexport { WrapView } from \"./view/wrap-view.js\";\n"]}
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import { type CSSResultGroup } from "
|
2
|
-
import { type HTMLTemplate } from "
|
3
|
-
import {
|
1
|
+
import { type CSSResultGroup } from "../../deps.js";
|
2
|
+
import { type HTMLTemplate } from "../../lib/templates.js";
|
3
|
+
import { InputElement } from "./input.js";
|
4
4
|
/**
|
5
5
|
* BaseInput.
|
6
6
|
*/
|
7
|
-
export declare class BaseInput extends
|
7
|
+
export declare class BaseInput extends InputElement {
|
8
8
|
/**
|
9
9
|
* Input sccept.
|
10
10
|
*/
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"base-input.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/input/base-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,cAAc,EAAyB,MAAM,eAAe,CAAC;AAChF,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAErE,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAI1C;;GAEG;AACH,qBACa,SAAU,SAAQ,YAAY;IACzC;;OAEG;IACS,MAAM,MAAa;IAC/B;;OAEG;IACS,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,QAAQ,CAAa;IACxD;;OAEG;IAC0B,IAAI,UAAS;IAC1C;;OAEG;IACyB,GAAG,SAAK;IACpC;;OAEG;IACyB,GAAG,SAAO;IACtC;;OAEG;IACyB,IAAI,SAAK;IAEpB,MAAM,EAAE,gBAAgB,CAAC;IACvB,OAAO,EAAE,WAAW,CAAC;IAExC,MAAM,CAAC,MAAM,iBA8GO;IAEpB,SAAS,CAAC,MAAM,IAAI,YAAY;IAahC,iBAAiB;IAejB,SAAS,CAAC,YAAY;IAOtB,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,GAAG,GAAG,KAAK;IAMrC,SAAS,CAAC,WAAW,CAAC,CAAC,EAAE,GAAG,GAAG,KAAK;IAKpC,KAAK;IAeL,SAAS,CAAC,aAAa,IAAI,YAAY;CAYxC;AAED,eAAe,SAAS,CAAC;AAEzB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,SAAS,CAAC;KACzB;CACF"}
|
@@ -1,18 +1,13 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
};
|
7
|
-
import { css, html, property, query } from "../deps.js";
|
8
|
-
import { cssvar, cssvarValues, define } from "../root.js";
|
9
|
-
import { htmlSlot } from "../lib/templates.js";
|
10
|
-
import { InputSTD } from "./std.js";
|
1
|
+
import { __decorate } from "tslib";
|
2
|
+
import { css, html, property, query } from "../../deps.js";
|
3
|
+
import { htmlSlot } from "../../lib/templates.js";
|
4
|
+
import { cssvar, cssvarValues, define } from "../../root.js";
|
5
|
+
import { InputElement } from "./input.js";
|
11
6
|
const defineName = "base-input";
|
12
7
|
/**
|
13
8
|
* BaseInput.
|
14
9
|
*/
|
15
|
-
let BaseInput = class BaseInput extends
|
10
|
+
let BaseInput = class BaseInput extends InputElement {
|
16
11
|
constructor() {
|
17
12
|
super(...arguments);
|
18
13
|
/**
|
@@ -40,77 +35,9 @@ let BaseInput = class BaseInput extends InputSTD {
|
|
40
35
|
*/
|
41
36
|
this.step = 1;
|
42
37
|
}
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
<input id="input" type="range" min="${this.min}" max="${this.max}" step="${this.step}" @input="${this._handleRange}" @change="${this._handleRange}" />
|
47
|
-
<b></b>
|
48
|
-
<b>
|
49
|
-
<i></i>
|
50
|
-
</b>
|
51
|
-
</div>`;
|
52
|
-
}
|
53
|
-
return html `<label for="input"> ${htmlSlot("pre")} ${this._typeSwitcher()} ${htmlSlot("suf")} </label>`;
|
54
|
-
}
|
55
|
-
connectedCallback() {
|
56
|
-
super.connectedCallback();
|
57
|
-
if (this.type === "file") {
|
58
|
-
this.value = null;
|
59
|
-
}
|
60
|
-
else {
|
61
|
-
if (!this.def) {
|
62
|
-
this.def = this.value || "";
|
63
|
-
}
|
64
|
-
if (!this.value) {
|
65
|
-
this.value = this.def;
|
66
|
-
}
|
67
|
-
}
|
68
|
-
this._initName();
|
69
|
-
}
|
70
|
-
firstUpdated() {
|
71
|
-
super.firstUpdated();
|
72
|
-
if (this.type === "range") {
|
73
|
-
this._ranged.style.width = 100 * (parseInt(this.value) / (this.max - this.min)) + "%";
|
74
|
-
}
|
75
|
-
}
|
76
|
-
_handleRange(e) {
|
77
|
-
this.value = e.target.value;
|
78
|
-
this._ranged.style.width = (100 * parseInt(e.target.value)) / (this.max - this.min) + "%";
|
79
|
-
this.dispatchEvent(new CustomEvent("input", { detail: this.value }));
|
80
|
-
}
|
81
|
-
_handleFile(e) {
|
82
|
-
this.value = !this.only ? e.target.files : e.target.files[0];
|
83
|
-
this.dispatchEvent(new CustomEvent("change", { detail: this.value }));
|
84
|
-
}
|
85
|
-
reset() {
|
86
|
-
if (this.type === "file") {
|
87
|
-
this.value = null;
|
88
|
-
return;
|
89
|
-
}
|
90
|
-
if (this.type === "range") {
|
91
|
-
this._input.value = this.def || ((this.max - this.min) / 2).toString();
|
92
|
-
this.value = this._input.value;
|
93
|
-
this._ranged.style.width = 100 * (parseInt(this.value) / (this.max - this.min)) + "%";
|
94
|
-
}
|
95
|
-
else {
|
96
|
-
this._input.value = this.def.toString();
|
97
|
-
this.value = this.def;
|
98
|
-
}
|
99
|
-
}
|
100
|
-
_typeSwitcher() {
|
101
|
-
switch (this.type) {
|
102
|
-
case "file":
|
103
|
-
return html `<input id="input" class="input" type="file" accept="${this.accept}" ?multiple="${!this.only}" @change="${this._handleFile}" />${htmlSlot()}`;
|
104
|
-
case "number":
|
105
|
-
return html `<input .value="${this.value}" ?autofocus="${this.autofocus}" id="input" class="input" type="number" placeholder="${this.pla}" min="${this.min}" max="${this.max}" @input="${this._handleInput}" @change="${this._handleChange}" />`;
|
106
|
-
default:
|
107
|
-
return html `<input .value="${this.value}" ?autofocus="${this.autofocus}" id="input" class="input" type="${this.type}" placeholder="${this.pla}" @input="${this._handleInput}" @change="${this._handleChange}" />`;
|
108
|
-
}
|
109
|
-
}
|
110
|
-
};
|
111
|
-
BaseInput.styles = [
|
112
|
-
InputSTD.styles,
|
113
|
-
css `
|
38
|
+
static { this.styles = [
|
39
|
+
InputElement.styles,
|
40
|
+
css `
|
114
41
|
:host {
|
115
42
|
width: var(${cssvarValues.input}--width);
|
116
43
|
height: var(${cssvarValues.input}--height);
|
@@ -147,7 +74,7 @@ BaseInput.styles = [
|
|
147
74
|
border-radius: 0.25em;
|
148
75
|
}
|
149
76
|
`,
|
150
|
-
|
77
|
+
css `
|
151
78
|
:host([type="range"]) {
|
152
79
|
height: auto !important;
|
153
80
|
margin: 0.3em 0;
|
@@ -218,7 +145,75 @@ BaseInput.styles = [
|
|
218
145
|
box-shadow: 0 0.1em 0.1em var(${cssvar}--shadow);
|
219
146
|
}
|
220
147
|
`,
|
221
|
-
];
|
148
|
+
]; }
|
149
|
+
render() {
|
150
|
+
if (this.type === "range") {
|
151
|
+
return html `<div class="range">
|
152
|
+
<input id="input" type="range" min="${this.min}" max="${this.max}" step="${this.step}" @input="${this._handleRange}" @change="${this._handleRange}" />
|
153
|
+
<b></b>
|
154
|
+
<b>
|
155
|
+
<i></i>
|
156
|
+
</b>
|
157
|
+
</div>`;
|
158
|
+
}
|
159
|
+
return html `<label for="input"> ${htmlSlot("pre")} ${this._typeSwitcher()} ${htmlSlot("suf")} </label>`;
|
160
|
+
}
|
161
|
+
connectedCallback() {
|
162
|
+
super.connectedCallback();
|
163
|
+
if (this.type === "file") {
|
164
|
+
this.value = null;
|
165
|
+
}
|
166
|
+
else {
|
167
|
+
if (!this.def) {
|
168
|
+
this.def = this.value || "";
|
169
|
+
}
|
170
|
+
if (!this.value) {
|
171
|
+
this.value = this.def;
|
172
|
+
}
|
173
|
+
}
|
174
|
+
this._initName();
|
175
|
+
}
|
176
|
+
firstUpdated() {
|
177
|
+
super.firstUpdated();
|
178
|
+
if (this.type === "range") {
|
179
|
+
this._ranged.style.width = 100 * (parseInt(this.value) / (this.max - this.min)) + "%";
|
180
|
+
}
|
181
|
+
}
|
182
|
+
_handleRange(e) {
|
183
|
+
this.value = e.target.value;
|
184
|
+
this._ranged.style.width = (100 * parseInt(e.target.value)) / (this.max - this.min) + "%";
|
185
|
+
this.dispatchEvent(new CustomEvent("input", { detail: this.value }));
|
186
|
+
}
|
187
|
+
_handleFile(e) {
|
188
|
+
this.value = !this.only ? e.target.files : e.target.files[0];
|
189
|
+
this.dispatchEvent(new CustomEvent("change", { detail: this.value }));
|
190
|
+
}
|
191
|
+
reset() {
|
192
|
+
if (this.type === "file") {
|
193
|
+
this.value = null;
|
194
|
+
return;
|
195
|
+
}
|
196
|
+
if (this.type === "range") {
|
197
|
+
this._input.value = this.def || ((this.max - this.min) / 2).toString();
|
198
|
+
this.value = this._input.value;
|
199
|
+
this._ranged.style.width = 100 * (parseInt(this.value) / (this.max - this.min)) + "%";
|
200
|
+
}
|
201
|
+
else {
|
202
|
+
this._input.value = this.def.toString();
|
203
|
+
this.value = this.def;
|
204
|
+
}
|
205
|
+
}
|
206
|
+
_typeSwitcher() {
|
207
|
+
switch (this.type) {
|
208
|
+
case "file":
|
209
|
+
return html `<input id="input" class="input" type="file" accept="${this.accept}" ?multiple="${!this.only}" @change="${this._handleFile}" />${htmlSlot()}`;
|
210
|
+
case "number":
|
211
|
+
return html `<input .value="${this.value}" ?autofocus="${this.autofocus}" id="input" class="input" type="number" placeholder="${this.pla}" min="${this.min}" max="${this.max}" @input="${this._handleInput}" @change="${this._handleChange}" />`;
|
212
|
+
default:
|
213
|
+
return html `<input .value="${this.value}" ?autofocus="${this.autofocus}" id="input" class="input" type="${this.type}" placeholder="${this.pla}" @input="${this._handleInput}" @change="${this._handleChange}" />`;
|
214
|
+
}
|
215
|
+
}
|
216
|
+
};
|
222
217
|
__decorate([
|
223
218
|
property()
|
224
219
|
], BaseInput.prototype, "accept", void 0);
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"base-input.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/input/base-input.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAuB,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,EAAE,QAAQ,EAAqB,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,e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../deps.js\";\nimport { htmlSlot, type HTMLTemplate } from \"../../lib/templates.js\";\nimport { cssvar, cssvarValues, define } from \"../../root.js\";\nimport { InputElement } from \"./input.js\";\n\nconst defineName = \"base-input\";\n\n/**\n * BaseInput.\n */\n@define(defineName)\nexport class BaseInput extends InputElement {\n /**\n * Input sccept.\n */\n @property() accept = undefined;\n /**\n * Value.\n */\n @property() value: string | File | FileList = undefined;\n /**\n * Only single files are allowed to be selected.\n */\n @property({ type: Boolean }) only = false;\n /**\n * Input min.\n */\n @property({ type: Number }) min = 0;\n /**\n * Input max.\n */\n @property({ type: Number }) max = 100;\n /**\n * Input step.\n */\n @property({ type: Number }) step = 1;\n\n @query(\"#input\") _input: HTMLInputElement;\n @query(\".range i\") _ranged: HTMLElement;\n\n static styles = [\n InputElement.styles,\n css`\n :host {\n width: var(${cssvarValues.input}--width);\n height: var(${cssvarValues.input}--height);\n background: var(${cssvarValues.input}--background);\n margin: var(${cssvarValues.input}--outline-width);\n outline: var(${cssvarValues.input}--outline);\n border-radius: var(${cssvarValues.input}--radius);\n }\n\n input[type=\"file\"] {\n display: none;\n }\n\n label,\n div {\n width: 100%;\n display: flex;\n align-items: center;\n }\n\n * {\n border-radius: inherit;\n cursor: inherit;\n }\n\n input {\n box-sizing: border-box;\n height: 100%;\n width: 100%;\n margin: 0;\n color: inherit;\n background: transparent;\n padding: 0 0.25em;\n border-radius: 0.25em;\n }\n `,\n css`\n :host([type=\"range\"]) {\n height: auto !important;\n margin: 0.3em 0;\n background: var(${cssvarValues.input}--false);\n border-radius: 2em;\n }\n\n .range b:nth-of-type(1) {\n width: 1em;\n left: 0;\n background: var(${cssvarValues.input}--true);\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n\n .range b {\n pointer-events: none;\n width: calc(100% - 1em);\n height: 100%;\n left: 1em;\n position: absolute;\n }\n\n .range {\n height: fit-content;\n position: relative;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n }\n\n .range input {\n padding: 0;\n height: 0.6em;\n margin: 0px -0.5em;\n appearance: none;\n -webkit-appearance: none;\n outline: none;\n background: transparent;\n }\n\n .range i {\n position: absolute;\n left: 0;\n width: 50%;\n height: 100%;\n pointer-events: none;\n background: var(${cssvarValues.input}--true);\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n\n .range input::-webkit-slider-runnable-track {\n height: 0.6em;\n }\n\n .range input::-webkit-slider-thumb {\n z-index: 1;\n appearance: none;\n -webkit-appearance: none;\n position: relative;\n height: 1.2em;\n width: 1.2em;\n margin-top: -0.3em;\n background: var(${cssvarValues.input}--control);\n border-radius: 50%;\n border: solid 0.125em var(${cssvarValues.input}--control-edge);\n box-shadow: 0 0.1em 0.1em var(${cssvar}--shadow);\n }\n `,\n ] as CSSResultGroup;\n\n protected render(): HTMLTemplate {\n if (this.type === \"range\") {\n return html`<div class=\"range\">\n <input id=\"input\" type=\"range\" min=\"${this.min}\" max=\"${this.max}\" step=\"${this.step}\" @input=\"${this._handleRange}\" @change=\"${this._handleRange}\" />\n <b></b>\n <b>\n <i></i>\n </b>\n </div>`;\n }\n return html`<label for=\"input\"> ${htmlSlot(\"pre\")} ${this._typeSwitcher()} ${htmlSlot(\"suf\")} </label>`;\n }\n\n connectedCallback() {\n super.connectedCallback();\n if (this.type === \"file\") {\n this.value = null;\n } else {\n if (!this.def) {\n this.def = (this.value as string) || \"\";\n }\n if (!this.value) {\n this.value = this.def;\n }\n }\n this._initName();\n }\n\n protected firstUpdated() {\n super.firstUpdated();\n if (this.type === \"range\") {\n this._ranged.style.width = 100 * (parseInt(this.value as string) / (this.max - this.min)) + \"%\";\n }\n }\n\n protected _handleRange(e: any | Event) {\n this.value = e.target.value;\n this._ranged.style.width = (100 * parseInt(e.target.value)) / (this.max - this.min) + \"%\";\n this.dispatchEvent(new CustomEvent(\"input\", { detail: this.value }));\n }\n\n protected _handleFile(e: any | Event) {\n this.value = !this.only ? e.target.files : e.target.files[0];\n this.dispatchEvent(new CustomEvent(\"change\", { detail: this.value }));\n }\n\n reset() {\n if (this.type === \"file\") {\n this.value = null;\n return;\n }\n if (this.type === \"range\") {\n this._input.value = this.def || ((this.max - this.min) / 2).toString();\n this.value = this._input.value;\n this._ranged.style.width = 100 * (parseInt(this.value) / (this.max - this.min)) + \"%\";\n } else {\n this._input.value = this.def.toString();\n this.value = this.def;\n }\n }\n\n protected _typeSwitcher(): HTMLTemplate {\n switch (this.type) {\n case \"file\":\n return html`<input id=\"input\" class=\"input\" type=\"file\" accept=\"${this.accept}\" ?multiple=\"${!this.only}\" @change=\"${this._handleFile}\" />${htmlSlot()}`;\n\n case \"number\":\n return html`<input .value=\"${this.value}\" ?autofocus=\"${this.autofocus}\" id=\"input\" class=\"input\" type=\"number\" placeholder=\"${this.pla}\" min=\"${this.min}\" max=\"${this.max}\" @input=\"${this._handleInput}\" @change=\"${this._handleChange}\" />`;\n\n default:\n return html`<input .value=\"${this.value}\" ?autofocus=\"${this.autofocus}\" id=\"input\" class=\"input\" type=\"${this.type}\" placeholder=\"${this.pla}\" @input=\"${this._handleInput}\" @change=\"${this._handleChange}\" />`;\n }\n }\n}\n\nexport default BaseInput;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"base-input\": BaseInput;\n }\n}\n"]}
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { type CSSResultGroup } from "
|
2
|
-
import { GodownElement } from "
|
1
|
+
import { type CSSResultGroup } from "../../deps.js";
|
2
|
+
import { GodownElement } from "../../root.js";
|
3
3
|
export type InputType = "hidden" | "text" | "search" | "tel" | "url" | "email" | "password" | "datetime" | "date" | "month" | "week" | "time" | "datetime-local" | "number" | "range" | "color" | "checkbox" | "radio" | "file" | "image";
|
4
|
-
export declare class
|
4
|
+
export declare class InputElement extends GodownElement {
|
5
5
|
type: InputType;
|
6
6
|
name: string;
|
7
7
|
value: string | any;
|
@@ -25,16 +25,4 @@ export declare class InputSTD extends GodownElement {
|
|
25
25
|
protected firstUpdated(): void;
|
26
26
|
protected targetValue(e: Event): string | any;
|
27
27
|
}
|
28
|
-
|
29
|
-
static styles: CSSResultGroup;
|
30
|
-
name: string;
|
31
|
-
value: T;
|
32
|
-
namevalue(): [string, T];
|
33
|
-
nameValue: () => [string, T];
|
34
|
-
}
|
35
|
-
declare const _default: {
|
36
|
-
InputSTD: typeof InputSTD;
|
37
|
-
FormSTD: typeof FormSTD;
|
38
|
-
};
|
39
|
-
export default _default;
|
40
|
-
//# sourceMappingURL=std.d.ts.map
|
28
|
+
//# sourceMappingURL=input.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/input/input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,cAAc,EAAY,MAAM,eAAe,CAAC;AACnE,OAAO,EAAgB,aAAa,EAAE,MAAM,eAAe,CAAC;AAE5D,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,KAAK,GAAG,OAAO,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,gBAAgB,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;AAE1O,qBAAa,YAAa,SAAQ,aAAa;IAChB,IAAI,EAAE,SAAS,CAAU;IAC1C,IAAI,EAAE,MAAM,CAAa;IACzB,KAAK,EAAE,MAAM,GAAG,GAAG,CAAa;IACf,KAAK,SAAM;IAC5B,GAAG,SAAM;IACQ,GAAG,CAAC,EAAE,MAAM,CAAa;IACV,SAAS,UAAS;IAE9D,MAAM,EAAE,gBAAgB,CAAC;IACzB,WAAW,EAAE,OAAO,CAAC;IAErB,MAAM,CAAC,MAAM,iBAcO;IAEpB,SAAS,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC;IAI1B,SAAS,sBAA0B;IAEnC,KAAK;IAKL,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,GAAG;IAU7B,SAAS,CAAC,aAAa;IAIvB,iBAAiB;IAWjB,SAAS,CAAC,SAAS;IAQnB,SAAS,CAAC,iBAAiB;IAY3B,SAAS,CAAC,gBAAgB,CAAC,CAAC,EAAE,SAAS;IAIvC,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY;IAI5B,SAAS,CAAC,YAAY;IAKtB,SAAS,CAAC,WAAW,CAAC,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,GAAG;CAO9C"}
|
@@ -1,12 +1,7 @@
|
|
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 { cssvarValues, GodownElement } from "../root.js";
|
9
|
-
export class InputSTD extends GodownElement {
|
1
|
+
import { __decorate } from "tslib";
|
2
|
+
import { css, property } from "../../deps.js";
|
3
|
+
import { cssvarValues, GodownElement } from "../../root.js";
|
4
|
+
export class InputElement extends GodownElement {
|
10
5
|
constructor() {
|
11
6
|
super(...arguments);
|
12
7
|
this.type = "text";
|
@@ -18,6 +13,21 @@ export class InputSTD extends GodownElement {
|
|
18
13
|
this.autofocus = false;
|
19
14
|
this.nameValue = () => this.namevalue();
|
20
15
|
}
|
16
|
+
static { this.styles = [
|
17
|
+
GodownElement.styles,
|
18
|
+
css `
|
19
|
+
:host {
|
20
|
+
display: flex;
|
21
|
+
}
|
22
|
+
::-ms-reveal {
|
23
|
+
display: none;
|
24
|
+
}
|
25
|
+
::-webkit-calendar-picker-indicator {
|
26
|
+
background-color: var(${cssvarValues.input}-true);
|
27
|
+
border-radius: 0.1rem;
|
28
|
+
}
|
29
|
+
`,
|
30
|
+
]; }
|
21
31
|
namevalue() {
|
22
32
|
return [this.name, this.value];
|
23
33
|
}
|
@@ -83,62 +93,25 @@ export class InputSTD extends GodownElement {
|
|
83
93
|
return target.value;
|
84
94
|
}
|
85
95
|
}
|
86
|
-
InputSTD.styles = [
|
87
|
-
GodownElement.styles,
|
88
|
-
css `
|
89
|
-
:host {
|
90
|
-
display: flex;
|
91
|
-
}
|
92
|
-
::-ms-reveal {
|
93
|
-
display: none;
|
94
|
-
}
|
95
|
-
::-webkit-calendar-picker-indicator {
|
96
|
-
background-color: var(${cssvarValues.input}-true);
|
97
|
-
border-radius: 0.1rem;
|
98
|
-
}
|
99
|
-
`,
|
100
|
-
];
|
101
96
|
__decorate([
|
102
97
|
property({ reflect: true })
|
103
|
-
],
|
98
|
+
], InputElement.prototype, "type", void 0);
|
104
99
|
__decorate([
|
105
100
|
property()
|
106
|
-
],
|
101
|
+
], InputElement.prototype, "name", void 0);
|
107
102
|
__decorate([
|
108
103
|
property()
|
109
|
-
],
|
104
|
+
], InputElement.prototype, "value", void 0);
|
110
105
|
__decorate([
|
111
106
|
property({ reflect: true })
|
112
|
-
],
|
107
|
+
], InputElement.prototype, "label", void 0);
|
113
108
|
__decorate([
|
114
109
|
property()
|
115
|
-
],
|
110
|
+
], InputElement.prototype, "def", void 0);
|
116
111
|
__decorate([
|
117
112
|
property({ reflect: true })
|
118
|
-
],
|
113
|
+
], InputElement.prototype, "pla", void 0);
|
119
114
|
__decorate([
|
120
115
|
property({ type: Boolean, reflect: true })
|
121
|
-
],
|
122
|
-
|
123
|
-
constructor() {
|
124
|
-
super(...arguments);
|
125
|
-
this.name = "";
|
126
|
-
this.value = {};
|
127
|
-
this.nameValue = () => this.namevalue();
|
128
|
-
}
|
129
|
-
namevalue() {
|
130
|
-
return [this.name, this.value];
|
131
|
-
}
|
132
|
-
}
|
133
|
-
FormSTD.styles = GodownElement.styles;
|
134
|
-
__decorate([
|
135
|
-
property()
|
136
|
-
], FormSTD.prototype, "name", void 0);
|
137
|
-
__decorate([
|
138
|
-
property({ type: Object })
|
139
|
-
], FormSTD.prototype, "value", void 0);
|
140
|
-
export default {
|
141
|
-
InputSTD,
|
142
|
-
FormSTD,
|
143
|
-
};
|
144
|
-
//# sourceMappingURL=std.js.map
|
116
|
+
], InputElement.prototype, "autofocus", void 0);
|
117
|
+
//# sourceMappingURL=input.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"input.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/input/input.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAuB,QAAQ,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAI5D,MAAM,OAAO,YAAa,SAAQ,aAAa;IAA/C;;QAC+B,SAAI,GAAc,MAAM,CAAC;QAC1C,SAAI,GAAW,SAAS,CAAC;QACzB,UAAK,GAAiB,SAAS,CAAC;QACf,UAAK,GAAG,EAAE,CAAC;QAC5B,QAAG,GAAG,EAAE,CAAC;QACQ,QAAG,GAAY,SAAS,CAAC;QACV,cAAS,GAAG,KAAK,CAAC;QAyB9D,cAAS,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;IAwErC,CAAC;aA5FQ,WAAM,GAAG;QACd,aAAa,CAAC,MAAM;QACpB,GAAG,CAAA;;;;;;;;gCAQyB,YAAY,CAAC,KAAK;;;KAG7C;KACgB,AAdN,CAcO;IAEpB,SAAS;QACP,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;IAID,KAAK;QACH,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC;QACtB,IAAI,CAAC,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC;IAC/B,CAAC;IAES,YAAY,CAAC,CAAM;QAC3B,CAAC,CAAC,eAAe,EAAE,CAAC;QACpB,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC;QACpC,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACrB,OAA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","sourcesContent":["import { css, type CSSResultGroup, property } from \"../../deps.js\";\nimport { cssvarValues, GodownElement } from \"../../root.js\";\n\nexport type InputType = \"hidden\" | \"text\" | \"search\" | \"tel\" | \"url\" | \"email\" | \"password\" | \"datetime\" | \"date\" | \"month\" | \"week\" | \"time\" | \"datetime-local\" | \"number\" | \"range\" | \"color\" | \"checkbox\" | \"radio\" | \"file\" | \"image\";\n\nexport class InputElement extends GodownElement {\n @property({ reflect: true }) type: InputType = \"text\";\n @property() name: string = undefined;\n @property() value: string | any = undefined;\n @property({ reflect: true }) label = \"\";\n @property() def = \"\";\n @property({ reflect: true }) pla?: string = undefined;\n @property({ type: Boolean, reflect: true }) autofocus = false;\n\n _input: HTMLInputElement;\n compositing: boolean;\n\n static styles = [\n GodownElement.styles,\n css`\n :host {\n display: flex;\n }\n ::-ms-reveal {\n display: none;\n }\n ::-webkit-calendar-picker-indicator {\n background-color: var(${cssvarValues.input}-true);\n border-radius: 0.1rem;\n }\n `,\n ] as CSSResultGroup;\n\n namevalue(): [string, any] {\n return [this.name, this.value];\n }\n\n nameValue = () => this.namevalue();\n\n reset() {\n this.value = this.def;\n this._input.value = this.def;\n }\n\n protected _handleInput(e: any) {\n e.stopPropagation();\n this.value = e.target.value?.trim();\n if (this.compositing) {\n return;\n }\n this.dispatchEvent(new CustomEvent(\"input\", { detail: this.value, bubbles: true, composed: true }));\n this.dispatchEvent(new CustomEvent(\"change\", { detail: this.value, composed: true }));\n }\n\n protected _handleChange() {\n this.dispatchEvent(new CustomEvent(\"change\", { detail: this.value, composed: true }));\n }\n\n connectedCallback() {\n super.connectedCallback();\n if (!this.def) {\n this.def = this.value || \"\";\n }\n if (!this.value) {\n this.value = this.def;\n }\n this._initName();\n }\n\n protected _initName() {\n if (!this.name) {\n if (this.label || this.type) {\n this.name = this.label || this.type;\n }\n }\n }\n\n protected _compositionCheck() {\n if (this._input) {\n this.addEvent(this._input, \"compositionstart\", () => {\n this.compositing = true;\n });\n this.addEvent(this._input, \"compositionend\", (e: MouseEvent) => {\n this.compositing = false;\n this._handleInput(e);\n });\n }\n }\n\n protected _changeInputType(t: InputType) {\n this._input.type = t;\n }\n\n focus(options?: FocusOptions) {\n this._input?.focus(options);\n }\n\n protected firstUpdated() {\n this._compositionCheck();\n this.reset();\n }\n\n protected targetValue(e: Event): string | any {\n const target = e.target as HTMLInputElement;\n if (target.value.trim) {\n return target.value.trim();\n }\n return target.value;\n }\n}\n"]}
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { type CSSResultGroup } from "
|
2
|
-
import { type HTMLTemplate } from "
|
3
|
-
import {
|
1
|
+
import { type CSSResultGroup } from "../../deps.js";
|
2
|
+
import { type HTMLTemplate } from "../../lib/templates.js";
|
3
|
+
import { InputElement } from "./input.js";
|
4
4
|
/**
|
5
5
|
* LabelInput renders label and input.
|
6
6
|
*
|
@@ -8,7 +8,7 @@ import { InputSTD } from "./std.js";
|
|
8
8
|
*
|
9
9
|
* Otherwise it behaves similarly to the `BaseInput`.
|
10
10
|
*/
|
11
|
-
export declare class LabelInput extends
|
11
|
+
export declare class LabelInput extends InputElement {
|
12
12
|
/**
|
13
13
|
* Conditions for adjust layout.
|
14
14
|
*/
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"label-input.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/input/label-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,cAAc,EAAyB,MAAM,eAAe,CAAC;AAChF,OAAO,EAAuB,KAAK,YAAY,EAAU,MAAM,wBAAwB,CAAC;AAExF,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AA+B1C;;;;;;GAMG;AACH,qBACa,UAAW,SAAQ,YAAY;IAC1C;;OAEG;IACS,MAAM,SAAW;IAEb,MAAM,EAAE,gBAAgB,CAAC;IAEzC,MAAM,CAAC,MAAM,iBA4DO;IAEpB,SAAS,CAAC,MAAM,IAAI,YAAY,EAAE;IAmBlC,OAAO,CAAC,SAAS;IAkBjB,SAAS,CAAC,iBAAiB;CAO5B;AAED,eAAe,UAAU,CAAC;AAE1B,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,UAAU,CAAC;KAC3B;CACF"}
|