godown 3.13.1 → 3.13.3
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/build/alert.d.ts +1 -0
- package/build/alert.d.ts.map +1 -0
- package/build/alert.js +2 -0
- package/build/alert.js.map +1 -0
- package/build/avatar.d.ts +1 -0
- package/build/avatar.d.ts.map +1 -0
- package/build/avatar.js +2 -0
- package/build/avatar.js.map +1 -0
- package/build/badge.d.ts +1 -0
- package/build/badge.d.ts.map +1 -0
- package/build/badge.js +2 -0
- package/build/badge.js.map +1 -0
- package/build/breath.d.ts +1 -0
- package/build/breath.d.ts.map +1 -0
- package/build/breath.js +2 -0
- package/build/breath.js.map +1 -0
- package/build/button.d.ts +1 -0
- package/build/button.d.ts.map +1 -0
- package/build/button.js +2 -0
- package/build/button.js.map +1 -0
- package/build/card.d.ts +1 -0
- package/build/card.d.ts.map +1 -0
- package/build/card.js +2 -0
- package/build/card.js.map +1 -0
- package/build/carousel.d.ts +1 -0
- package/build/carousel.d.ts.map +1 -0
- package/build/carousel.js +2 -0
- package/build/carousel.js.map +1 -0
- package/build/chip.d.ts +1 -0
- package/build/chip.d.ts.map +1 -0
- package/build/chip.js +2 -0
- package/build/chip.js.map +1 -0
- package/build/details.d.ts +1 -0
- package/build/details.d.ts.map +1 -0
- package/build/details.js +2 -0
- package/build/details.js.map +1 -0
- package/build/dialog.d.ts +1 -0
- package/build/dialog.d.ts.map +1 -0
- package/build/dialog.js +2 -0
- package/build/dialog.js.map +1 -0
- package/build/divider.d.ts +1 -0
- package/build/divider.d.ts.map +1 -0
- package/build/divider.js +2 -0
- package/build/divider.js.map +1 -0
- package/build/dragbox.d.ts +1 -0
- package/build/dragbox.d.ts.map +1 -0
- package/build/dragbox.js +2 -0
- package/build/dragbox.js.map +1 -0
- package/build/flex.d.ts +1 -0
- package/build/flex.d.ts.map +1 -0
- package/build/flex.js +2 -0
- package/build/flex.js.map +1 -0
- package/build/form.d.ts +1 -0
- package/build/form.d.ts.map +1 -0
- package/build/form.js +2 -0
- package/build/form.js.map +1 -0
- package/build/godown.iife.js +16 -47
- package/build/godown.iife.js.map +1 -1
- package/build/godown.umd.js +16 -47
- package/build/godown.umd.js.map +1 -1
- package/build/grid.d.ts +1 -0
- package/build/grid.d.ts.map +1 -0
- package/build/grid.js +2 -0
- package/build/grid.js.map +1 -0
- package/build/heading.d.ts +1 -0
- package/build/heading.d.ts.map +1 -0
- package/build/heading.js +2 -0
- package/build/heading.js.map +1 -0
- package/build/index.d.ts +33 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +2 -0
- package/build/index.js.map +1 -0
- package/build/input.d.ts +1 -0
- package/build/input.d.ts.map +1 -0
- package/build/input.js +2 -0
- package/build/input.js.map +1 -0
- package/build/internal/global-style.d.ts +23 -0
- package/build/internal/global-style.d.ts.map +1 -0
- package/build/internal/global-style.js +2 -0
- package/build/internal/global-style.js.map +1 -0
- package/build/internal/icons/caret-down.d.ts +3 -0
- package/build/internal/icons/caret-down.d.ts.map +1 -0
- package/build/internal/icons/caret-down.js +2 -0
- package/build/internal/icons/caret-down.js.map +1 -0
- package/build/internal/icons/caret-left.d.ts +3 -0
- package/build/internal/icons/caret-left.d.ts.map +1 -0
- package/build/internal/icons/caret-left.js +2 -0
- package/build/internal/icons/caret-left.js.map +1 -0
- package/build/internal/icons/caret-right.d.ts +3 -0
- package/build/internal/icons/caret-right.d.ts.map +1 -0
- package/build/internal/icons/caret-right.js +2 -0
- package/build/internal/icons/caret-right.js.map +1 -0
- package/build/internal/icons/eye-slash.d.ts +3 -0
- package/build/internal/icons/eye-slash.d.ts.map +1 -0
- package/build/internal/icons/eye-slash.js +2 -0
- package/build/internal/icons/eye-slash.js.map +1 -0
- package/build/internal/popover.d.ts +2 -0
- package/build/internal/popover.d.ts.map +1 -0
- package/build/internal/popover.js +2 -0
- package/build/internal/popover.js.map +1 -0
- package/build/internal/reset-style.d.ts +2 -0
- package/build/internal/reset-style.d.ts.map +1 -0
- package/build/internal/reset-style.js +3 -0
- package/build/internal/reset-style.js.map +1 -0
- package/build/internal/ring.d.ts +19 -0
- package/build/internal/ring.d.ts.map +1 -0
- package/build/internal/ring.js +2 -0
- package/build/internal/ring.js.map +1 -0
- package/build/internal/super-input.d.ts +40 -0
- package/build/internal/super-input.d.ts.map +1 -0
- package/build/internal/super-input.js +3 -0
- package/build/internal/super-input.js.map +1 -0
- package/build/internal/utils.d.ts +1 -0
- package/build/internal/utils.d.ts.map +1 -0
- package/build/internal/utils.js +2 -0
- package/build/internal/utils.js.map +1 -0
- package/build/layout.d.ts +1 -0
- package/build/layout.d.ts.map +1 -0
- package/build/layout.js +2 -0
- package/build/layout.js.map +1 -0
- package/build/link.d.ts +1 -0
- package/build/link.d.ts.map +1 -0
- package/build/link.js +2 -0
- package/build/link.js.map +1 -0
- package/build/popover.d.ts +1 -0
- package/build/popover.d.ts.map +1 -0
- package/build/popover.js +2 -0
- package/build/popover.js.map +1 -0
- package/build/progress.d.ts +1 -0
- package/build/progress.d.ts.map +1 -0
- package/build/progress.js +2 -0
- package/build/progress.js.map +1 -0
- package/build/range.d.ts +1 -0
- package/build/range.d.ts.map +1 -0
- package/build/range.js +2 -0
- package/build/range.js.map +1 -0
- package/build/rotate.d.ts +1 -0
- package/build/rotate.d.ts.map +1 -0
- package/build/rotate.js +2 -0
- package/build/rotate.js.map +1 -0
- package/build/router.d.ts +1 -0
- package/build/router.d.ts.map +1 -0
- package/build/router.js +2 -0
- package/build/router.js.map +1 -0
- package/build/select.d.ts +1 -0
- package/build/select.d.ts.map +1 -0
- package/build/select.js +2 -0
- package/build/select.js.map +1 -0
- package/build/skeleton.d.ts +1 -0
- package/build/skeleton.d.ts.map +1 -0
- package/build/skeleton.js +2 -0
- package/build/skeleton.js.map +1 -0
- package/build/split.d.ts +1 -0
- package/build/split.d.ts.map +1 -0
- package/build/split.js +2 -0
- package/build/split.js.map +1 -0
- package/build/switch.d.ts +1 -0
- package/build/switch.d.ts.map +1 -0
- package/build/switch.js +2 -0
- package/build/switch.js.map +1 -0
- package/build/tabs.d.ts +1 -0
- package/build/tabs.d.ts.map +1 -0
- package/build/tabs.js +2 -0
- package/build/tabs.js.map +1 -0
- package/build/text.d.ts +1 -0
- package/build/text.d.ts.map +1 -0
- package/build/text.js +2 -0
- package/build/text.js.map +1 -0
- package/build/time.d.ts +1 -0
- package/build/time.d.ts.map +1 -0
- package/build/time.js +2 -0
- package/build/time.js.map +1 -0
- package/build/tooltip.d.ts +1 -0
- package/build/tooltip.d.ts.map +1 -0
- package/build/tooltip.js +2 -0
- package/build/tooltip.js.map +1 -0
- package/build/typewriter.d.ts +1 -0
- package/build/typewriter.d.ts.map +1 -0
- package/build/typewriter.js +2 -0
- package/build/typewriter.js.map +1 -0
- package/build/web-components/alert/component.d.ts +28 -0
- package/build/web-components/alert/component.d.ts.map +1 -0
- package/build/web-components/alert/component.js +2 -0
- package/build/web-components/alert/component.js.map +1 -0
- package/build/web-components/alert/definition.d.ts +7 -0
- package/build/web-components/alert/definition.d.ts.map +1 -0
- package/build/web-components/alert/definition.js +2 -0
- package/build/web-components/alert/definition.js.map +1 -0
- package/build/web-components/avatar/component.d.ts +32 -0
- package/build/web-components/avatar/component.d.ts.map +1 -0
- package/build/web-components/avatar/component.js +2 -0
- package/build/web-components/avatar/component.js.map +1 -0
- package/build/web-components/avatar/definition.d.ts +7 -0
- package/build/web-components/avatar/definition.d.ts.map +1 -0
- package/build/web-components/avatar/definition.js +2 -0
- package/build/web-components/avatar/definition.js.map +1 -0
- package/build/web-components/badge/component.d.ts +13 -0
- package/build/web-components/badge/component.d.ts.map +1 -0
- package/build/web-components/badge/component.js +3 -0
- package/build/web-components/badge/component.js.map +1 -0
- package/build/web-components/badge/definition.d.ts +7 -0
- package/build/web-components/badge/definition.d.ts.map +1 -0
- package/build/web-components/badge/definition.js +2 -0
- package/build/web-components/badge/definition.js.map +1 -0
- package/build/web-components/breath/component.d.ts +36 -0
- package/build/web-components/breath/component.d.ts.map +1 -0
- package/build/web-components/breath/component.js +2 -0
- package/build/web-components/breath/component.js.map +1 -0
- package/build/web-components/breath/definition.d.ts +7 -0
- package/build/web-components/breath/definition.d.ts.map +1 -0
- package/build/web-components/breath/definition.js +2 -0
- package/build/web-components/breath/definition.js.map +1 -0
- package/build/web-components/button/component.d.ts +42 -0
- package/build/web-components/button/component.d.ts.map +1 -0
- package/build/web-components/button/component.js +2 -0
- package/build/web-components/button/component.js.map +1 -0
- package/build/web-components/button/definition.d.ts +7 -0
- package/build/web-components/button/definition.d.ts.map +1 -0
- package/build/web-components/button/definition.js +2 -0
- package/build/web-components/button/definition.js.map +1 -0
- package/build/web-components/card/component.d.ts +29 -0
- package/build/web-components/card/component.d.ts.map +1 -0
- package/build/web-components/card/component.js +2 -0
- package/build/web-components/card/component.js.map +1 -0
- package/build/web-components/card/definition.d.ts +7 -0
- package/build/web-components/card/definition.d.ts.map +1 -0
- package/build/web-components/card/definition.js +2 -0
- package/build/web-components/card/definition.js.map +1 -0
- package/build/web-components/carousel/component.d.ts +39 -0
- package/build/web-components/carousel/component.d.ts.map +1 -0
- package/build/web-components/carousel/component.js +3 -0
- package/build/web-components/carousel/component.js.map +1 -0
- package/build/web-components/carousel/definition.d.ts +7 -0
- package/build/web-components/carousel/definition.d.ts.map +1 -0
- package/build/web-components/carousel/definition.js +2 -0
- package/build/web-components/carousel/definition.js.map +1 -0
- package/build/web-components/chip/component.d.ts +28 -0
- package/build/web-components/chip/component.d.ts.map +1 -0
- package/build/web-components/chip/component.js +2 -0
- package/build/web-components/chip/component.js.map +1 -0
- package/build/web-components/chip/definition.d.ts +7 -0
- package/build/web-components/chip/definition.d.ts.map +1 -0
- package/build/web-components/chip/definition.js +2 -0
- package/build/web-components/chip/definition.js.map +1 -0
- package/build/web-components/details/component.d.ts +23 -0
- package/build/web-components/details/component.d.ts.map +1 -0
- package/build/web-components/details/component.js +2 -0
- package/build/web-components/details/component.js.map +1 -0
- package/build/web-components/details/definition.d.ts +7 -0
- package/build/web-components/details/definition.d.ts.map +1 -0
- package/build/web-components/details/definition.js +2 -0
- package/build/web-components/details/definition.js.map +1 -0
- package/build/web-components/dialog/component.d.ts +38 -0
- package/build/web-components/dialog/component.d.ts.map +1 -0
- package/build/web-components/dialog/component.js +2 -0
- package/build/web-components/dialog/component.js.map +1 -0
- package/build/web-components/dialog/definition.d.ts +7 -0
- package/build/web-components/dialog/definition.d.ts.map +1 -0
- package/build/web-components/dialog/definition.js +2 -0
- package/build/web-components/dialog/definition.js.map +1 -0
- package/build/web-components/divider/component.d.ts +16 -0
- package/build/web-components/divider/component.d.ts.map +1 -0
- package/build/web-components/divider/component.js +2 -0
- package/build/web-components/divider/component.js.map +1 -0
- package/build/web-components/divider/definition.d.ts +7 -0
- package/build/web-components/divider/definition.d.ts.map +1 -0
- package/build/web-components/divider/definition.js +2 -0
- package/build/web-components/divider/definition.js.map +1 -0
- package/build/web-components/dragbox/component.d.ts +38 -0
- package/build/web-components/dragbox/component.d.ts.map +1 -0
- package/build/web-components/dragbox/component.js +3 -0
- package/build/web-components/dragbox/component.js.map +1 -0
- package/build/web-components/dragbox/definition.d.ts +7 -0
- package/build/web-components/dragbox/definition.d.ts.map +1 -0
- package/build/web-components/dragbox/definition.js +2 -0
- package/build/web-components/dragbox/definition.js.map +1 -0
- package/build/web-components/flex/component.d.ts +34 -0
- package/build/web-components/flex/component.d.ts.map +1 -0
- package/build/web-components/flex/component.js +3 -0
- package/build/web-components/flex/component.js.map +1 -0
- package/build/web-components/flex/definition.d.ts +7 -0
- package/build/web-components/flex/definition.d.ts.map +1 -0
- package/build/web-components/flex/definition.js +2 -0
- package/build/web-components/flex/definition.js.map +1 -0
- package/build/web-components/form/component.d.ts +23 -0
- package/build/web-components/form/component.d.ts.map +1 -0
- package/build/web-components/form/component.js +3 -0
- package/build/web-components/form/component.js.map +1 -0
- package/build/web-components/form/definition.d.ts +7 -0
- package/build/web-components/form/definition.d.ts.map +1 -0
- package/build/web-components/form/definition.js +2 -0
- package/build/web-components/form/definition.js.map +1 -0
- package/build/web-components/grid/component.d.ts +38 -0
- package/build/web-components/grid/component.d.ts.map +1 -0
- package/build/web-components/grid/component.js +3 -0
- package/build/web-components/grid/component.js.map +1 -0
- package/build/web-components/grid/definition.d.ts +7 -0
- package/build/web-components/grid/definition.d.ts.map +1 -0
- package/build/web-components/grid/definition.js +2 -0
- package/build/web-components/grid/definition.js.map +1 -0
- package/build/web-components/heading/component.d.ts +30 -0
- package/build/web-components/heading/component.d.ts.map +1 -0
- package/build/web-components/heading/component.js +3 -0
- package/build/web-components/heading/component.js.map +1 -0
- package/build/web-components/heading/definition.d.ts +7 -0
- package/build/web-components/heading/definition.d.ts.map +1 -0
- package/build/web-components/heading/definition.js +2 -0
- package/build/web-components/heading/definition.js.map +1 -0
- package/build/web-components/input/component.d.ts +25 -0
- package/build/web-components/input/component.d.ts.map +1 -0
- package/build/web-components/input/component.js +2 -0
- package/build/web-components/input/component.js.map +1 -0
- package/build/web-components/input/definition.d.ts +7 -0
- package/build/web-components/input/definition.d.ts.map +1 -0
- package/build/web-components/input/definition.js +2 -0
- package/build/web-components/input/definition.js.map +1 -0
- package/build/web-components/layout/component.d.ts +25 -0
- package/build/web-components/layout/component.d.ts.map +1 -0
- package/build/web-components/layout/component.js +3 -0
- package/build/web-components/layout/component.js.map +1 -0
- package/build/web-components/layout/definition.d.ts +7 -0
- package/build/web-components/layout/definition.d.ts.map +1 -0
- package/build/web-components/layout/definition.js +2 -0
- package/build/web-components/layout/definition.js.map +1 -0
- package/build/web-components/link/component.d.ts +64 -0
- package/build/web-components/link/component.d.ts.map +1 -0
- package/build/web-components/link/component.js +3 -0
- package/build/web-components/link/component.js.map +1 -0
- package/build/web-components/link/definition.d.ts +7 -0
- package/build/web-components/link/definition.d.ts.map +1 -0
- package/build/web-components/link/definition.js +2 -0
- package/build/web-components/link/definition.js.map +1 -0
- package/build/web-components/popover/component.d.ts +34 -0
- package/build/web-components/popover/component.d.ts.map +1 -0
- package/build/web-components/popover/component.js +3 -0
- package/build/web-components/popover/component.js.map +1 -0
- package/build/web-components/popover/definition.d.ts +7 -0
- package/build/web-components/popover/definition.d.ts.map +1 -0
- package/build/web-components/popover/definition.js +2 -0
- package/build/web-components/popover/definition.js.map +1 -0
- package/build/web-components/progress/component.d.ts +15 -0
- package/build/web-components/progress/component.d.ts.map +1 -0
- package/build/web-components/progress/component.js +2 -0
- package/build/web-components/progress/component.js.map +1 -0
- package/build/web-components/progress/definition.d.ts +7 -0
- package/build/web-components/progress/definition.d.ts.map +1 -0
- package/build/web-components/progress/definition.js +2 -0
- package/build/web-components/progress/definition.js.map +1 -0
- package/build/web-components/range/component.d.ts +117 -0
- package/build/web-components/range/component.d.ts.map +1 -0
- package/build/web-components/range/component.js +2 -0
- package/build/web-components/range/component.js.map +1 -0
- package/build/web-components/range/definition.d.ts +7 -0
- package/build/web-components/range/definition.d.ts.map +1 -0
- package/build/web-components/range/definition.js +2 -0
- package/build/web-components/range/definition.js.map +1 -0
- package/build/web-components/rotate/component.d.ts +29 -0
- package/build/web-components/rotate/component.d.ts.map +1 -0
- package/build/web-components/rotate/component.js +2 -0
- package/build/web-components/rotate/component.js.map +1 -0
- package/build/web-components/rotate/definition.d.ts +7 -0
- package/build/web-components/rotate/definition.d.ts.map +1 -0
- package/build/web-components/rotate/definition.js +2 -0
- package/build/web-components/rotate/definition.js.map +1 -0
- package/build/web-components/router/component.d.ts +115 -0
- package/build/web-components/router/component.d.ts.map +1 -0
- package/build/web-components/router/component.js +3 -0
- package/build/web-components/router/component.js.map +1 -0
- package/build/web-components/router/definition.d.ts +7 -0
- package/build/web-components/router/definition.d.ts.map +1 -0
- package/build/web-components/router/definition.js +2 -0
- package/build/web-components/router/definition.js.map +1 -0
- package/build/web-components/select/component.d.ts +37 -0
- package/build/web-components/select/component.d.ts.map +1 -0
- package/build/web-components/select/component.js +3 -0
- package/build/web-components/select/component.js.map +1 -0
- package/build/web-components/select/definition.d.ts +7 -0
- package/build/web-components/select/definition.d.ts.map +1 -0
- package/build/web-components/select/definition.js +2 -0
- package/build/web-components/select/definition.js.map +1 -0
- package/build/web-components/skeleton/component.d.ts +18 -0
- package/build/web-components/skeleton/component.d.ts.map +1 -0
- package/build/web-components/skeleton/component.js +2 -0
- package/build/web-components/skeleton/component.js.map +1 -0
- package/build/web-components/skeleton/definition.d.ts +7 -0
- package/build/web-components/skeleton/definition.d.ts.map +1 -0
- package/build/web-components/skeleton/definition.js +2 -0
- package/build/web-components/skeleton/definition.js.map +1 -0
- package/build/web-components/split/component.d.ts +56 -0
- package/build/web-components/split/component.d.ts.map +1 -0
- package/build/web-components/split/component.js +2 -0
- package/build/web-components/split/component.js.map +1 -0
- package/build/web-components/split/definition.d.ts +7 -0
- package/build/web-components/split/definition.d.ts.map +1 -0
- package/build/web-components/split/definition.js +2 -0
- package/build/web-components/split/definition.js.map +1 -0
- package/build/web-components/switch/component.d.ts +27 -0
- package/build/web-components/switch/component.d.ts.map +1 -0
- package/build/web-components/switch/component.js +2 -0
- package/build/web-components/switch/component.js.map +1 -0
- package/build/web-components/switch/definition.d.ts +7 -0
- package/build/web-components/switch/definition.d.ts.map +1 -0
- package/build/web-components/switch/definition.js +2 -0
- package/build/web-components/switch/definition.js.map +1 -0
- package/build/web-components/tabs/component.d.ts +47 -0
- package/build/web-components/tabs/component.d.ts.map +1 -0
- package/build/web-components/tabs/component.js +2 -0
- package/build/web-components/tabs/component.js.map +1 -0
- package/build/web-components/tabs/definition.d.ts +7 -0
- package/build/web-components/tabs/definition.d.ts.map +1 -0
- package/build/web-components/tabs/definition.js +2 -0
- package/build/web-components/tabs/definition.js.map +1 -0
- package/build/web-components/text/component.d.ts +17 -0
- package/build/web-components/text/component.d.ts.map +1 -0
- package/build/web-components/text/component.js +2 -0
- package/build/web-components/text/component.js.map +1 -0
- package/build/web-components/text/definition.d.ts +7 -0
- package/build/web-components/text/definition.d.ts.map +1 -0
- package/build/web-components/text/definition.js +2 -0
- package/build/web-components/text/definition.js.map +1 -0
- package/build/web-components/time/component.d.ts +35 -0
- package/build/web-components/time/component.d.ts.map +1 -0
- package/build/web-components/time/component.js +2 -0
- package/build/web-components/time/component.js.map +1 -0
- package/build/web-components/time/definition.d.ts +7 -0
- package/build/web-components/time/definition.d.ts.map +1 -0
- package/build/web-components/time/definition.js +2 -0
- package/build/web-components/time/definition.js.map +1 -0
- package/build/web-components/tooltip/component.d.ts +26 -0
- package/build/web-components/tooltip/component.d.ts.map +1 -0
- package/build/web-components/tooltip/component.js +2 -0
- package/build/web-components/tooltip/component.js.map +1 -0
- package/build/web-components/tooltip/definition.d.ts +7 -0
- package/build/web-components/tooltip/definition.d.ts.map +1 -0
- package/build/web-components/tooltip/definition.js +2 -0
- package/build/web-components/tooltip/definition.js.map +1 -0
- package/build/web-components/typewriter/component.d.ts +51 -0
- package/build/web-components/typewriter/component.d.ts.map +1 -0
- package/build/web-components/typewriter/component.js +2 -0
- package/build/web-components/typewriter/component.js.map +1 -0
- package/build/web-components/typewriter/definition.d.ts +7 -0
- package/build/web-components/typewriter/definition.d.ts.map +1 -0
- package/build/web-components/typewriter/definition.js +2 -0
- package/build/web-components/typewriter/definition.js.map +1 -0
- package/custom-elements.json +1 -1
- package/package.json +26 -20
- package/src/internal/global-style.ts +50 -45
- package/src/internal/popover.ts +2 -2
- package/src/internal/ring.ts +2 -3
- package/src/internal/super-input.ts +4 -3
- package/src/internal/utils.ts +8 -7
- package/src/web-components/alert/component.ts +1 -1
- package/src/web-components/avatar/component.ts +2 -1
- package/src/web-components/breath/component.ts +9 -6
- package/src/web-components/button/component.ts +4 -4
- package/src/web-components/carousel/component.ts +3 -3
- package/src/web-components/dialog/component.ts +3 -3
- package/src/web-components/flex/component.ts +19 -15
- package/src/web-components/grid/component.ts +20 -15
- package/src/web-components/input/component.ts +3 -3
- package/src/web-components/popover/component.ts +6 -5
- package/src/web-components/progress/component.ts +2 -1
- package/src/web-components/range/component.ts +16 -22
- package/src/web-components/rotate/component.ts +3 -2
- package/src/web-components/router/component.ts +21 -17
- package/src/web-components/select/component.ts +3 -3
- package/src/web-components/skeleton/component.ts +2 -2
- package/src/web-components/split/component.ts +2 -1
- package/src/web-components/switch/component.ts +2 -1
- package/src/web-components/time/component.ts +1 -1
- package/src/web-components/typewriter/component.ts +2 -1
- package/tsconfig.json +20 -11
- package/vscode.css-custom-data.json +6 -1
- package/vscode.html-custom-data.json +204 -1
- package/web-types.json +1265 -1
- package/alert.d.ts +0 -2
- package/alert.d.ts.map +0 -1
- package/alert.js +0 -2
- package/alert.js.map +0 -1
- package/avatar.d.ts +0 -2
- package/avatar.d.ts.map +0 -1
- package/avatar.js +0 -2
- package/avatar.js.map +0 -1
- package/badge.d.ts +0 -2
- package/badge.d.ts.map +0 -1
- package/badge.js +0 -2
- package/badge.js.map +0 -1
- package/breath.d.ts +0 -2
- package/breath.d.ts.map +0 -1
- package/breath.js +0 -2
- package/breath.js.map +0 -1
- package/build/godown+lit.iife.js +0 -58
- package/build/godown+lit.iife.js.map +0 -1
- package/build/godown+lit.js +0 -58
- package/build/godown+lit.js.map +0 -1
- package/build/godown+lit.umd.js +0 -58
- package/build/godown+lit.umd.js.map +0 -1
- package/build/godown.js +0 -48
- package/build/godown.js.map +0 -1
- package/button.d.ts +0 -2
- package/button.d.ts.map +0 -1
- package/button.js +0 -2
- package/button.js.map +0 -1
- package/card.d.ts +0 -2
- package/card.d.ts.map +0 -1
- package/card.js +0 -2
- package/card.js.map +0 -1
- package/carousel.d.ts +0 -2
- package/carousel.d.ts.map +0 -1
- package/carousel.js +0 -2
- package/carousel.js.map +0 -1
- package/chip.d.ts +0 -2
- package/chip.d.ts.map +0 -1
- package/chip.js +0 -2
- package/chip.js.map +0 -1
- package/details.d.ts +0 -2
- package/details.d.ts.map +0 -1
- package/details.js +0 -2
- package/details.js.map +0 -1
- package/dialog.d.ts +0 -2
- package/dialog.d.ts.map +0 -1
- package/dialog.js +0 -2
- package/dialog.js.map +0 -1
- package/divider.d.ts +0 -2
- package/divider.d.ts.map +0 -1
- package/divider.js +0 -2
- package/divider.js.map +0 -1
- package/dragbox.d.ts +0 -2
- package/dragbox.d.ts.map +0 -1
- package/dragbox.js +0 -2
- package/dragbox.js.map +0 -1
- package/flex.d.ts +0 -2
- package/flex.d.ts.map +0 -1
- package/flex.js +0 -2
- package/flex.js.map +0 -1
- package/form.d.ts +0 -2
- package/form.d.ts.map +0 -1
- package/form.js +0 -2
- package/form.js.map +0 -1
- package/grid.d.ts +0 -2
- package/grid.d.ts.map +0 -1
- package/grid.js +0 -2
- package/grid.js.map +0 -1
- package/heading.d.ts +0 -2
- package/heading.d.ts.map +0 -1
- package/heading.js +0 -2
- package/heading.js.map +0 -1
- package/index.d.ts +0 -34
- package/index.d.ts.map +0 -1
- package/index.js +0 -2
- package/index.js.map +0 -1
- package/input.d.ts +0 -2
- package/input.d.ts.map +0 -1
- package/input.js +0 -2
- package/input.js.map +0 -1
- package/internal/global-style.d.ts +0 -22
- package/internal/global-style.d.ts.map +0 -1
- package/internal/global-style.js +0 -2
- package/internal/global-style.js.map +0 -1
- package/internal/icons/caret-down.d.ts +0 -4
- package/internal/icons/caret-down.d.ts.map +0 -1
- package/internal/icons/caret-down.js +0 -2
- package/internal/icons/caret-down.js.map +0 -1
- package/internal/icons/caret-left.d.ts +0 -4
- package/internal/icons/caret-left.d.ts.map +0 -1
- package/internal/icons/caret-left.js +0 -2
- package/internal/icons/caret-left.js.map +0 -1
- package/internal/icons/caret-right.d.ts +0 -4
- package/internal/icons/caret-right.d.ts.map +0 -1
- package/internal/icons/caret-right.js +0 -2
- package/internal/icons/caret-right.js.map +0 -1
- package/internal/icons/eye-slash.d.ts +0 -4
- package/internal/icons/eye-slash.d.ts.map +0 -1
- package/internal/icons/eye-slash.js +0 -2
- package/internal/icons/eye-slash.js.map +0 -1
- package/internal/popover.d.ts +0 -3
- package/internal/popover.d.ts.map +0 -1
- package/internal/popover.js +0 -2
- package/internal/popover.js.map +0 -1
- package/internal/reset-style.d.ts +0 -3
- package/internal/reset-style.d.ts.map +0 -1
- package/internal/reset-style.js +0 -2
- package/internal/reset-style.js.map +0 -1
- package/internal/ring.d.ts +0 -20
- package/internal/ring.d.ts.map +0 -1
- package/internal/ring.js +0 -2
- package/internal/ring.js.map +0 -1
- package/internal/super-input.d.ts +0 -41
- package/internal/super-input.d.ts.map +0 -1
- package/internal/super-input.js +0 -2
- package/internal/super-input.js.map +0 -1
- package/internal/utils.d.ts +0 -2
- package/internal/utils.d.ts.map +0 -1
- package/internal/utils.js +0 -2
- package/internal/utils.js.map +0 -1
- package/layout.d.ts +0 -2
- package/layout.d.ts.map +0 -1
- package/layout.js +0 -2
- package/layout.js.map +0 -1
- package/link.d.ts +0 -2
- package/link.d.ts.map +0 -1
- package/link.js +0 -2
- package/link.js.map +0 -1
- package/popover.d.ts +0 -2
- package/popover.d.ts.map +0 -1
- package/popover.js +0 -2
- package/popover.js.map +0 -1
- package/progress.d.ts +0 -2
- package/progress.d.ts.map +0 -1
- package/progress.js +0 -2
- package/progress.js.map +0 -1
- package/range.d.ts +0 -2
- package/range.d.ts.map +0 -1
- package/range.js +0 -2
- package/range.js.map +0 -1
- package/rotate.d.ts +0 -2
- package/rotate.d.ts.map +0 -1
- package/rotate.js +0 -2
- package/rotate.js.map +0 -1
- package/router.d.ts +0 -2
- package/router.d.ts.map +0 -1
- package/router.js +0 -2
- package/router.js.map +0 -1
- package/select.d.ts +0 -2
- package/select.d.ts.map +0 -1
- package/select.js +0 -2
- package/select.js.map +0 -1
- package/skeleton.d.ts +0 -2
- package/skeleton.d.ts.map +0 -1
- package/skeleton.js +0 -2
- package/skeleton.js.map +0 -1
- package/split.d.ts +0 -2
- package/split.d.ts.map +0 -1
- package/split.js +0 -2
- package/split.js.map +0 -1
- package/switch.d.ts +0 -2
- package/switch.d.ts.map +0 -1
- package/switch.js +0 -2
- package/switch.js.map +0 -1
- package/tabs.d.ts +0 -2
- package/tabs.d.ts.map +0 -1
- package/tabs.js +0 -2
- package/tabs.js.map +0 -1
- package/text.d.ts +0 -2
- package/text.d.ts.map +0 -1
- package/text.js +0 -2
- package/text.js.map +0 -1
- package/time.d.ts +0 -2
- package/time.d.ts.map +0 -1
- package/time.js +0 -2
- package/time.js.map +0 -1
- package/tooltip.d.ts +0 -2
- package/tooltip.d.ts.map +0 -1
- package/tooltip.js +0 -2
- package/tooltip.js.map +0 -1
- package/typewriter.d.ts +0 -2
- package/typewriter.d.ts.map +0 -1
- package/typewriter.js +0 -2
- package/typewriter.js.map +0 -1
- package/web-components/alert/component.d.ts +0 -29
- package/web-components/alert/component.d.ts.map +0 -1
- package/web-components/alert/component.js +0 -2
- package/web-components/alert/component.js.map +0 -1
- package/web-components/alert/definition.d.ts +0 -8
- package/web-components/alert/definition.d.ts.map +0 -1
- package/web-components/alert/definition.js +0 -2
- package/web-components/alert/definition.js.map +0 -1
- package/web-components/avatar/component.d.ts +0 -33
- package/web-components/avatar/component.d.ts.map +0 -1
- package/web-components/avatar/component.js +0 -2
- package/web-components/avatar/component.js.map +0 -1
- package/web-components/avatar/definition.d.ts +0 -8
- package/web-components/avatar/definition.d.ts.map +0 -1
- package/web-components/avatar/definition.js +0 -2
- package/web-components/avatar/definition.js.map +0 -1
- package/web-components/badge/component.d.ts +0 -14
- package/web-components/badge/component.d.ts.map +0 -1
- package/web-components/badge/component.js +0 -2
- package/web-components/badge/component.js.map +0 -1
- package/web-components/badge/definition.d.ts +0 -8
- package/web-components/badge/definition.d.ts.map +0 -1
- package/web-components/badge/definition.js +0 -2
- package/web-components/badge/definition.js.map +0 -1
- package/web-components/breath/component.d.ts +0 -36
- package/web-components/breath/component.d.ts.map +0 -1
- package/web-components/breath/component.js +0 -2
- package/web-components/breath/component.js.map +0 -1
- package/web-components/breath/definition.d.ts +0 -8
- package/web-components/breath/definition.d.ts.map +0 -1
- package/web-components/breath/definition.js +0 -2
- package/web-components/breath/definition.js.map +0 -1
- package/web-components/button/component.d.ts +0 -43
- package/web-components/button/component.d.ts.map +0 -1
- package/web-components/button/component.js +0 -2
- package/web-components/button/component.js.map +0 -1
- package/web-components/button/definition.d.ts +0 -8
- package/web-components/button/definition.d.ts.map +0 -1
- package/web-components/button/definition.js +0 -2
- package/web-components/button/definition.js.map +0 -1
- package/web-components/card/component.d.ts +0 -30
- package/web-components/card/component.d.ts.map +0 -1
- package/web-components/card/component.js +0 -2
- package/web-components/card/component.js.map +0 -1
- package/web-components/card/definition.d.ts +0 -8
- package/web-components/card/definition.d.ts.map +0 -1
- package/web-components/card/definition.js +0 -2
- package/web-components/card/definition.js.map +0 -1
- package/web-components/carousel/component.d.ts +0 -40
- package/web-components/carousel/component.d.ts.map +0 -1
- package/web-components/carousel/component.js +0 -2
- package/web-components/carousel/component.js.map +0 -1
- package/web-components/carousel/definition.d.ts +0 -8
- package/web-components/carousel/definition.d.ts.map +0 -1
- package/web-components/carousel/definition.js +0 -2
- package/web-components/carousel/definition.js.map +0 -1
- package/web-components/chip/component.d.ts +0 -29
- package/web-components/chip/component.d.ts.map +0 -1
- package/web-components/chip/component.js +0 -2
- package/web-components/chip/component.js.map +0 -1
- package/web-components/chip/definition.d.ts +0 -8
- package/web-components/chip/definition.d.ts.map +0 -1
- package/web-components/chip/definition.js +0 -2
- package/web-components/chip/definition.js.map +0 -1
- package/web-components/details/component.d.ts +0 -24
- package/web-components/details/component.d.ts.map +0 -1
- package/web-components/details/component.js +0 -2
- package/web-components/details/component.js.map +0 -1
- package/web-components/details/definition.d.ts +0 -8
- package/web-components/details/definition.d.ts.map +0 -1
- package/web-components/details/definition.js +0 -2
- package/web-components/details/definition.js.map +0 -1
- package/web-components/dialog/component.d.ts +0 -39
- package/web-components/dialog/component.d.ts.map +0 -1
- package/web-components/dialog/component.js +0 -2
- package/web-components/dialog/component.js.map +0 -1
- package/web-components/dialog/definition.d.ts +0 -8
- package/web-components/dialog/definition.d.ts.map +0 -1
- package/web-components/dialog/definition.js +0 -2
- package/web-components/dialog/definition.js.map +0 -1
- package/web-components/divider/component.d.ts +0 -17
- package/web-components/divider/component.d.ts.map +0 -1
- package/web-components/divider/component.js +0 -2
- package/web-components/divider/component.js.map +0 -1
- package/web-components/divider/definition.d.ts +0 -8
- package/web-components/divider/definition.d.ts.map +0 -1
- package/web-components/divider/definition.js +0 -2
- package/web-components/divider/definition.js.map +0 -1
- package/web-components/dragbox/component.d.ts +0 -39
- package/web-components/dragbox/component.d.ts.map +0 -1
- package/web-components/dragbox/component.js +0 -2
- package/web-components/dragbox/component.js.map +0 -1
- package/web-components/dragbox/definition.d.ts +0 -8
- package/web-components/dragbox/definition.d.ts.map +0 -1
- package/web-components/dragbox/definition.js +0 -2
- package/web-components/dragbox/definition.js.map +0 -1
- package/web-components/flex/component.d.ts +0 -34
- package/web-components/flex/component.d.ts.map +0 -1
- package/web-components/flex/component.js +0 -2
- package/web-components/flex/component.js.map +0 -1
- package/web-components/flex/definition.d.ts +0 -8
- package/web-components/flex/definition.d.ts.map +0 -1
- package/web-components/flex/definition.js +0 -2
- package/web-components/flex/definition.js.map +0 -1
- package/web-components/form/component.d.ts +0 -24
- package/web-components/form/component.d.ts.map +0 -1
- package/web-components/form/component.js +0 -2
- package/web-components/form/component.js.map +0 -1
- package/web-components/form/definition.d.ts +0 -8
- package/web-components/form/definition.d.ts.map +0 -1
- package/web-components/form/definition.js +0 -2
- package/web-components/form/definition.js.map +0 -1
- package/web-components/grid/component.d.ts +0 -38
- package/web-components/grid/component.d.ts.map +0 -1
- package/web-components/grid/component.js +0 -2
- package/web-components/grid/component.js.map +0 -1
- package/web-components/grid/definition.d.ts +0 -8
- package/web-components/grid/definition.d.ts.map +0 -1
- package/web-components/grid/definition.js +0 -2
- package/web-components/grid/definition.js.map +0 -1
- package/web-components/heading/component.d.ts +0 -31
- package/web-components/heading/component.d.ts.map +0 -1
- package/web-components/heading/component.js +0 -2
- package/web-components/heading/component.js.map +0 -1
- package/web-components/heading/definition.d.ts +0 -8
- package/web-components/heading/definition.d.ts.map +0 -1
- package/web-components/heading/definition.js +0 -2
- package/web-components/heading/definition.js.map +0 -1
- package/web-components/input/component.d.ts +0 -26
- package/web-components/input/component.d.ts.map +0 -1
- package/web-components/input/component.js +0 -2
- package/web-components/input/component.js.map +0 -1
- package/web-components/input/definition.d.ts +0 -8
- package/web-components/input/definition.d.ts.map +0 -1
- package/web-components/input/definition.js +0 -2
- package/web-components/input/definition.js.map +0 -1
- package/web-components/layout/component.d.ts +0 -26
- package/web-components/layout/component.d.ts.map +0 -1
- package/web-components/layout/component.js +0 -2
- package/web-components/layout/component.js.map +0 -1
- package/web-components/layout/definition.d.ts +0 -8
- package/web-components/layout/definition.d.ts.map +0 -1
- package/web-components/layout/definition.js +0 -2
- package/web-components/layout/definition.js.map +0 -1
- package/web-components/link/component.d.ts +0 -65
- package/web-components/link/component.d.ts.map +0 -1
- package/web-components/link/component.js +0 -2
- package/web-components/link/component.js.map +0 -1
- package/web-components/link/definition.d.ts +0 -8
- package/web-components/link/definition.d.ts.map +0 -1
- package/web-components/link/definition.js +0 -2
- package/web-components/link/definition.js.map +0 -1
- package/web-components/popover/component.d.ts +0 -35
- package/web-components/popover/component.d.ts.map +0 -1
- package/web-components/popover/component.js +0 -2
- package/web-components/popover/component.js.map +0 -1
- package/web-components/popover/definition.d.ts +0 -8
- package/web-components/popover/definition.d.ts.map +0 -1
- package/web-components/popover/definition.js +0 -2
- package/web-components/popover/definition.js.map +0 -1
- package/web-components/progress/component.d.ts +0 -16
- package/web-components/progress/component.d.ts.map +0 -1
- package/web-components/progress/component.js +0 -2
- package/web-components/progress/component.js.map +0 -1
- package/web-components/progress/definition.d.ts +0 -8
- package/web-components/progress/definition.d.ts.map +0 -1
- package/web-components/progress/definition.js +0 -2
- package/web-components/progress/definition.js.map +0 -1
- package/web-components/range/component.d.ts +0 -118
- package/web-components/range/component.d.ts.map +0 -1
- package/web-components/range/component.js +0 -2
- package/web-components/range/component.js.map +0 -1
- package/web-components/range/definition.d.ts +0 -8
- package/web-components/range/definition.d.ts.map +0 -1
- package/web-components/range/definition.js +0 -2
- package/web-components/range/definition.js.map +0 -1
- package/web-components/rotate/component.d.ts +0 -30
- package/web-components/rotate/component.d.ts.map +0 -1
- package/web-components/rotate/component.js +0 -2
- package/web-components/rotate/component.js.map +0 -1
- package/web-components/rotate/definition.d.ts +0 -8
- package/web-components/rotate/definition.d.ts.map +0 -1
- package/web-components/rotate/definition.js +0 -2
- package/web-components/rotate/definition.js.map +0 -1
- package/web-components/router/component.d.ts +0 -116
- package/web-components/router/component.d.ts.map +0 -1
- package/web-components/router/component.js +0 -2
- package/web-components/router/component.js.map +0 -1
- package/web-components/router/definition.d.ts +0 -8
- package/web-components/router/definition.d.ts.map +0 -1
- package/web-components/router/definition.js +0 -2
- package/web-components/router/definition.js.map +0 -1
- package/web-components/select/component.d.ts +0 -38
- package/web-components/select/component.d.ts.map +0 -1
- package/web-components/select/component.js +0 -2
- package/web-components/select/component.js.map +0 -1
- package/web-components/select/definition.d.ts +0 -8
- package/web-components/select/definition.d.ts.map +0 -1
- package/web-components/select/definition.js +0 -2
- package/web-components/select/definition.js.map +0 -1
- package/web-components/skeleton/component.d.ts +0 -19
- package/web-components/skeleton/component.d.ts.map +0 -1
- package/web-components/skeleton/component.js +0 -2
- package/web-components/skeleton/component.js.map +0 -1
- package/web-components/skeleton/definition.d.ts +0 -8
- package/web-components/skeleton/definition.d.ts.map +0 -1
- package/web-components/skeleton/definition.js +0 -2
- package/web-components/skeleton/definition.js.map +0 -1
- package/web-components/split/component.d.ts +0 -57
- package/web-components/split/component.d.ts.map +0 -1
- package/web-components/split/component.js +0 -2
- package/web-components/split/component.js.map +0 -1
- package/web-components/split/definition.d.ts +0 -8
- package/web-components/split/definition.d.ts.map +0 -1
- package/web-components/split/definition.js +0 -2
- package/web-components/split/definition.js.map +0 -1
- package/web-components/switch/component.d.ts +0 -28
- package/web-components/switch/component.d.ts.map +0 -1
- package/web-components/switch/component.js +0 -2
- package/web-components/switch/component.js.map +0 -1
- package/web-components/switch/definition.d.ts +0 -8
- package/web-components/switch/definition.d.ts.map +0 -1
- package/web-components/switch/definition.js +0 -2
- package/web-components/switch/definition.js.map +0 -1
- package/web-components/tabs/component.d.ts +0 -48
- package/web-components/tabs/component.d.ts.map +0 -1
- package/web-components/tabs/component.js +0 -2
- package/web-components/tabs/component.js.map +0 -1
- package/web-components/tabs/definition.d.ts +0 -8
- package/web-components/tabs/definition.d.ts.map +0 -1
- package/web-components/tabs/definition.js +0 -2
- package/web-components/tabs/definition.js.map +0 -1
- package/web-components/text/component.d.ts +0 -18
- package/web-components/text/component.d.ts.map +0 -1
- package/web-components/text/component.js +0 -2
- package/web-components/text/component.js.map +0 -1
- package/web-components/text/definition.d.ts +0 -8
- package/web-components/text/definition.d.ts.map +0 -1
- package/web-components/text/definition.js +0 -2
- package/web-components/text/definition.js.map +0 -1
- package/web-components/time/component.d.ts +0 -36
- package/web-components/time/component.d.ts.map +0 -1
- package/web-components/time/component.js +0 -2
- package/web-components/time/component.js.map +0 -1
- package/web-components/time/definition.d.ts +0 -8
- package/web-components/time/definition.d.ts.map +0 -1
- package/web-components/time/definition.js +0 -2
- package/web-components/time/definition.js.map +0 -1
- package/web-components/tooltip/component.d.ts +0 -27
- package/web-components/tooltip/component.d.ts.map +0 -1
- package/web-components/tooltip/component.js +0 -2
- package/web-components/tooltip/component.js.map +0 -1
- package/web-components/tooltip/definition.d.ts +0 -8
- package/web-components/tooltip/definition.d.ts.map +0 -1
- package/web-components/tooltip/definition.js +0 -2
- package/web-components/tooltip/definition.js.map +0 -1
- package/web-components/typewriter/component.d.ts +0 -52
- package/web-components/typewriter/component.d.ts.map +0 -1
- package/web-components/typewriter/component.js +0 -2
- package/web-components/typewriter/component.js.map +0 -1
- package/web-components/typewriter/definition.d.ts +0 -8
- package/web-components/typewriter/definition.d.ts.map +0 -1
- package/web-components/typewriter/definition.js +0 -2
- package/web-components/typewriter/definition.js.map +0 -1
@@ -0,0 +1 @@
|
|
1
|
+
{"mappings":"AACA,cAAc,sBAAiC,KAAM;AAGrD,SAAS,mBAAmB,gCAAiC;;;;;;;AAU7D,cAWM,aAAa,YAAY;;;;CAI7B,AACA;;;;CAKA,AACA;;;;CAKA,AACA;;;;CAKA,AACA;;;;CAKA,AACA;CAEA;CAiBA,UAAU,UAAU,eAAe;AAUpC;AAED,eAAe;AACf,SAAS","names":[],"sources":["../../../../src/web-components/flex/component.ts"],"sourcesContent":["import { attr, godown, htmlSlot, StyleController, styles } from \"@godown/element\";\nimport { type TemplateResult, css, html } from \"lit\";\nimport { property } from \"lit/decorators.js\";\n\nimport { GlobalStyle } from \"../../internal/global-style.js\";\n\nconst protoName = \"flex\";\n\n/**\n * {@linkcode Flex} provides flex layout.\n *\n * @slot - Flex items.\n * @category layout\n */\n@godown(protoName)\n@styles(css`\n :host,\n :host([contents]) [part=\"root\"] {\n display: flex;\n }\n\n [part=\"root\"] {\n display: contents;\n }\n`)\nclass Flex extends GlobalStyle {\n /**\n * CSS property `flex-flow` (`flex-direction flex-wrap`).\n */\n @property({ attribute: \"flex-flow\" })\n flexFlow: string;\n\n /**\n * CSS property `gap`.\n */\n @property()\n gap: string;\n\n /**\n * CSS property `justify-content`.\n */\n @property()\n content: string;\n\n /**\n * CSS property `align-items`.\n */\n @property()\n items: string;\n\n /**\n * If true, set flex-direction to \"column\".\n */\n @property({ type: Boolean })\n vertical = false;\n\n constructor() {\n super();\n new StyleController(\n this,\n () => ({\n \":host\": {\n gap: this.gap,\n \"flex-flow\": this.flexFlow,\n \"flex-direction\": this.vertical && \"column\",\n \"align-items\": this.items,\n \"justify-content\": this.content,\n },\n }),\n () => [this.gap, this.flexFlow, this.vertical, this.items, this.content],\n );\n }\n\n protected render(): TemplateResult<1> {\n return html`\n <div\n part=\"root\"\n ${attr(this.observedRecord)}\n >\n ${htmlSlot()}\n </div>\n `;\n }\n}\n\nexport default Flex;\nexport { Flex };\n"],"version":3,"file":"component.d.ts"}
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import{godown,styles,StyleController,attr,htmlSlot}from"@godown/element";import{css,html}from"lit";import{property}from"lit/decorators.js";import{GlobalStyle}from"../../internal/global-style.js";import _decorate from"@oxc-project/runtime/helpers/decorate";import"../../internal/reset-style.js";import"sharekit";const protoName=`flex`;let Flex=class e extends GlobalStyle{constructor(){super(),this.vertical=!1,new StyleController(this,()=>({":host":{gap:this.gap,"flex-flow":this.flexFlow,"flex-direction":this.vertical&&`column`,"align-items":this.items,"justify-content":this.content}}),()=>[this.gap,this.flexFlow,this.vertical,this.items,this.content])}render(){return html`<div part="root" ${attr(this.observedRecord)}> ${htmlSlot()} </div>`}};_decorate([property({attribute:`flex-flow`})],Flex.prototype,`flexFlow`,void 0),_decorate([property()],Flex.prototype,`gap`,void 0),_decorate([property()],Flex.prototype,`content`,void 0),_decorate([property()],Flex.prototype,`items`,void 0),_decorate([property({type:Boolean})],Flex.prototype,`vertical`,void 0),Flex=_decorate([godown(protoName),styles(css`:host,:host([contents]) [part=root]{display:flex}[part=root]{display:contents}
|
2
|
+
`)],Flex);var Flex$1=Flex;export{Flex,Flex$1 as default};
|
3
|
+
//# sourceMappingURL=component.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../src/web-components/flex/component.ts"],"sourcesContent":["import { attr, godown, htmlSlot, StyleController, styles } from \"@godown/element\";\nimport { type TemplateResult, css, html } from \"lit\";\nimport { property } from \"lit/decorators.js\";\n\nimport { GlobalStyle } from \"../../internal/global-style.js\";\n\nconst protoName = \"flex\";\n\n/**\n * {@linkcode Flex} provides flex layout.\n *\n * @slot - Flex items.\n * @category layout\n */\n@godown(protoName)\n@styles(css`\n :host,\n :host([contents]) [part=\"root\"] {\n display: flex;\n }\n\n [part=\"root\"] {\n display: contents;\n }\n`)\nclass Flex extends GlobalStyle {\n /**\n * CSS property `flex-flow` (`flex-direction flex-wrap`).\n */\n @property({ attribute: \"flex-flow\" })\n flexFlow: string;\n\n /**\n * CSS property `gap`.\n */\n @property()\n gap: string;\n\n /**\n * CSS property `justify-content`.\n */\n @property()\n content: string;\n\n /**\n * CSS property `align-items`.\n */\n @property()\n items: string;\n\n /**\n * If true, set flex-direction to \"column\".\n */\n @property({ type: Boolean })\n vertical = false;\n\n constructor() {\n super();\n new StyleController(\n this,\n () => ({\n \":host\": {\n gap: this.gap,\n \"flex-flow\": this.flexFlow,\n \"flex-direction\": this.vertical && \"column\",\n \"align-items\": this.items,\n \"justify-content\": this.content,\n },\n }),\n () => [this.gap, this.flexFlow, this.vertical, this.items, this.content],\n );\n }\n\n protected render(): TemplateResult<1> {\n return html`\n <div\n part=\"root\"\n ${attr(this.observedRecord)}\n >\n ${htmlSlot()}\n </div>\n `;\n }\n}\n\nexport default Flex;\nexport { Flex };\n"],"names":["Flex"],"mappings":"uTAMA,MAAM,UAAY,OAQlB,IAAA,KAAA,MAWMA,UAAa,WAAY,CA+B7B,aAAc,CACZ,OAAO,MAHT,SAAW,GAIT,IAAI,gBACF,KACA,KAAO,CACL,QAAS,CACP,IAAK,KAAK,IACV,YAAa,KAAK,SAClB,iBAAkB,KAAK,UAAY,SACnC,cAAe,KAAK,MACpB,kBAAmB,KAAK,OACzB,IAEH,IAAM,CAAC,KAAK,IAAK,KAAK,SAAU,KAAK,SAAU,KAAK,MAAO,KAAK,OAAQ,EAE3E,CAES,QAA4B,CACpC,MAAO,KAAI,CAAA,iBAGP,EAAE,KAAK,KAAK,eAAe,CAAA,EAE3B,EAAE,UAAU,CAAA,OAEhB,CAAC,AACF,CACF,aAtDE,SAAS,CAAE,UAAW,WAAa,EAAC,AAAA,EAAA,KAAA,UAAA,WAAA,OAAA,YAMpC,UAAU,AAAA,EAAA,KAAA,UAAA,MAAA,OAAA,YAMV,UAAU,AAAA,EAAA,KAAA,UAAA,UAAA,OAAA,YAMV,UAAU,AAAA,EAAA,KAAA,UAAA,QAAA,OAAA,YAMV,SAAS,CAAE,KAAM,OAAS,EAAC,AAAA,EAAA,KAAA,UAAA,WAAA,OAAA,CAvC7B,KAAA,UAAA,CAAA,OAAO,UAAU,CACjB,OAAO,GAAG,CAAC;AASZ,CAAC,CAAC,AAAA,EAAA,KAAA,CA6DF,IAAA,OAAe"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"mappings":"AAAA,OAAO,UAAU,gBAAiB;AAIlC,eAAe;eAEA;WACH,sBAAsB;EAC9B,eAAe;CAChB;AACF","names":[],"sources":["../../../../src/web-components/flex/definition.ts"],"sourcesContent":["import Flex from \"./component.js\";\n\nFlex.define();\n\nexport default Flex;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"godown-flex\": Flex;\n }\n}\n"],"version":3,"file":"definition.d.ts"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import Flex from"./component.js";import"@godown/element";import"lit";import"lit/decorators.js";import"../../internal/global-style.js";import"../../internal/reset-style.js";import"sharekit";import"@oxc-project/runtime/helpers/decorate";Flex.define();export{Flex as default};
|
2
|
+
//# sourceMappingURL=definition.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"definition.js","sources":["../../../src/web-components/flex/definition.ts"],"sourcesContent":["import Flex from \"./component.js\";\n\nFlex.define();\n\nexport default Flex;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"godown-flex\": Flex;\n }\n}\n"],"names":[],"mappings":"2OAEA,KAAK,QAAQ"}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { type TemplateResult } from "lit";
|
2
|
+
import { GlobalStyle } from "../../internal/global-style.js";
|
3
|
+
/**
|
4
|
+
* {@linkcode Form} Gets child element key-value object,
|
5
|
+
* which will be nested if the child element is the same as this element.
|
6
|
+
*
|
7
|
+
* @category form
|
8
|
+
*/
|
9
|
+
declare class Form<T = object> extends GlobalStyle {
|
10
|
+
name: string;
|
11
|
+
get value(): T;
|
12
|
+
nameValue: () => [string, T];
|
13
|
+
protected render(): TemplateResult<1>;
|
14
|
+
reset(): void;
|
15
|
+
namevalue(): [string, T];
|
16
|
+
static buildValue(elements: (Element & {
|
17
|
+
name?: string;
|
18
|
+
value?: unknown;
|
19
|
+
namevalue?: () => [string, unknown];
|
20
|
+
})[]): Record<string, any>;
|
21
|
+
}
|
22
|
+
export default Form;
|
23
|
+
export { Form };
|
@@ -0,0 +1 @@
|
|
1
|
+
{"mappings":"AACA,cAAc,sBAA2B,KAAM;AAG/C,SAAS,mBAAmB,gCAAiC;;;;;;;AAU7D,cAMM,KAAK,oBAAoB,YAAY;CACzC,AACA;CAEA,IAAI,SAAS;CAIb,0BAA0B;CAE1B,UAAU,UAAU,eAAe;CAInC;CAWA,sBAAsB;CAItB,OAAO,WACLA,WAAW,UAAU;EACnB;EACA;EACA;CACD,OACA;AAoBJ;AAED,eAAe;AACf,SAAS","names":["elements: (Element & {\n name?: string;\n value?: unknown;\n namevalue?: () => [string, unknown];\n })[]"],"sources":["../../../../src/web-components/form/component.ts"],"sourcesContent":["import { godown, htmlSlot, styles } from \"@godown/element\";\nimport { type TemplateResult, css } from \"lit\";\nimport { property } from \"lit/decorators.js\";\n\nimport { GlobalStyle } from \"../../internal/global-style.js\";\n\nconst protoName = \"form\";\n\n/**\n * {@linkcode Form} Gets child element key-value object,\n * which will be nested if the child element is the same as this element.\n *\n * @category form\n */\n@godown(protoName)\n@styles(css`\n :host {\n display: block;\n }\n`)\nclass Form<T = object> extends GlobalStyle {\n @property()\n name = \"\";\n\n get value(): T {\n return Form.buildValue(this._slot.assignedElements()) as T;\n }\n\n nameValue: () => [string, T] = this.namevalue;\n\n protected render(): TemplateResult<1> {\n return htmlSlot();\n }\n\n reset(): void {\n this.deepQuerySelectorAll<HTMLElement & { reset?: () => void }>(\"*\").forEach((el) => {\n if (el.tagName === this.tagName) {\n return;\n }\n if (el.reset) {\n el.reset();\n }\n });\n }\n\n namevalue(): [string, T] {\n return [this.name, this.value];\n }\n\n static buildValue(\n elements: (Element & {\n name?: string;\n value?: unknown;\n namevalue?: () => [string, unknown];\n })[],\n ): Record<string, any> {\n const result = {};\n for (const el of elements) {\n if (el.tagName === \"FORM\") {\n Object.assign(result, Object.fromEntries(new FormData(el as HTMLFormElement).entries()));\n } else if (el.namevalue) {\n const [name, value] = el.namevalue();\n if (name) {\n result[name] = value;\n }\n } else if (el.name && el.value !== undefined) {\n result[el.name] = el.value;\n } else if (el.shadowRoot) {\n for (const slot of el.shadowRoot.querySelectorAll(\"slot\")) {\n Object.assign(result, this.buildValue(slot.assignedElements()));\n }\n }\n }\n return result;\n }\n}\n\nexport default Form;\nexport { Form };\n"],"version":3,"file":"component.d.ts"}
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import{godown,styles,htmlSlot}from"@godown/element";import{css}from"lit";import{property}from"lit/decorators.js";import{GlobalStyle}from"../../internal/global-style.js";import _decorate from"@oxc-project/runtime/helpers/decorate";import"../../internal/reset-style.js";import"sharekit";var _Form;const protoName=`form`;let Form=_Form=class e extends GlobalStyle{constructor(...e){super(...e),this.name=``,this.nameValue=this.namevalue}get value(){return _Form.buildValue(this._slot.assignedElements())}render(){return htmlSlot()}reset(){this.deepQuerySelectorAll(`*`).forEach(e=>{e.tagName!==this.tagName&&e.reset&&e.reset()})}namevalue(){return[this.name,this.value]}static buildValue(e){let c={};for(let l of e)if(l.tagName===`FORM`)Object.assign(c,Object.fromEntries(new FormData(l).entries()));else if(l.namevalue){let[e,u]=l.namevalue();e&&(c[e]=u)}else if(l.name&&l.value!==void 0)c[l.name]=l.value;else if(l.shadowRoot)for(let e of l.shadowRoot.querySelectorAll(`slot`))Object.assign(c,this.buildValue(e.assignedElements()));return c}};_decorate([property()],Form.prototype,`name`,void 0),Form=_Form=_decorate([godown(protoName),styles(css`:host{display:block}
|
2
|
+
`)],Form);var Form$1=Form;export{Form,Form$1 as default};
|
3
|
+
//# sourceMappingURL=component.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../src/web-components/form/component.ts"],"sourcesContent":["import { godown, htmlSlot, styles } from \"@godown/element\";\nimport { type TemplateResult, css } from \"lit\";\nimport { property } from \"lit/decorators.js\";\n\nimport { GlobalStyle } from \"../../internal/global-style.js\";\n\nconst protoName = \"form\";\n\n/**\n * {@linkcode Form} Gets child element key-value object,\n * which will be nested if the child element is the same as this element.\n *\n * @category form\n */\n@godown(protoName)\n@styles(css`\n :host {\n display: block;\n }\n`)\nclass Form<T = object> extends GlobalStyle {\n @property()\n name = \"\";\n\n get value(): T {\n return Form.buildValue(this._slot.assignedElements()) as T;\n }\n\n nameValue: () => [string, T] = this.namevalue;\n\n protected render(): TemplateResult<1> {\n return htmlSlot();\n }\n\n reset(): void {\n this.deepQuerySelectorAll<HTMLElement & { reset?: () => void }>(\"*\").forEach((el) => {\n if (el.tagName === this.tagName) {\n return;\n }\n if (el.reset) {\n el.reset();\n }\n });\n }\n\n namevalue(): [string, T] {\n return [this.name, this.value];\n }\n\n static buildValue(\n elements: (Element & {\n name?: string;\n value?: unknown;\n namevalue?: () => [string, unknown];\n })[],\n ): Record<string, any> {\n const result = {};\n for (const el of elements) {\n if (el.tagName === \"FORM\") {\n Object.assign(result, Object.fromEntries(new FormData(el as HTMLFormElement).entries()));\n } else if (el.namevalue) {\n const [name, value] = el.namevalue();\n if (name) {\n result[name] = value;\n }\n } else if (el.name && el.value !== undefined) {\n result[el.name] = el.value;\n } else if (el.shadowRoot) {\n for (const slot of el.shadowRoot.querySelectorAll(\"slot\")) {\n Object.assign(result, this.buildValue(slot.assignedElements()));\n }\n }\n }\n return result;\n }\n}\n\nexport default Form;\nexport { Form };\n"],"names":["Form","el","elements: (Element & {\n name?: string;\n value?: unknown;\n namevalue?: () => [string, unknown];\n })[]","result","elements","name","value","slot"],"mappings":"uSAMA,MAAM,UAAY,OAQlB,IAAA,KAAA,MAAA,MAMMA,UAAyB,WAAY,oCAEzC,KAAO,GAMP,KAAA,UAA+B,KAAK,UAJpC,IAAI,OAAW,CACb,OAAA,MAAY,WAAW,KAAK,MAAM,kBAAkB,CAAC,AACtD,CAIS,QAA4B,CACpC,OAAO,UAAU,AAClB,CAED,OAAc,CACZ,KAAK,qBAA2D,IAAI,CAAC,QAAQ,AAACC,GAAO,CAC/EA,EAAG,UAAY,KAAK,SAGpBA,EAAG,OACLA,EAAG,OAAO,AAEb,EAAC,AACH,CAED,WAAyB,CACvB,MAAO,CAAC,KAAK,KAAM,KAAK,KAAM,CAC/B,CAED,OAAO,WACLC,EAKqB,CACrB,IAAMC,EAAS,CAAE,EACjB,IAAK,IAAMF,KAAMG,EACf,GAAIH,EAAG,UAAY,OACjB,OAAO,OAAOE,EAAQ,OAAO,YAAY,IAAI,SAASF,GAAuB,SAAS,CAAC,CAAC,SAC/EA,EAAG,UAAW,CACvB,GAAM,CAACI,EAAMC,EAAM,CAAGL,EAAG,WAAW,CAChCI,IACFF,EAAOE,GAAQC,EAElB,SAAUL,EAAG,MAAQA,EAAG,QAAU,OACjCE,EAAOF,EAAG,MAAQA,EAAG,cACZA,EAAG,WACZ,IAAK,IAAMM,KAAQN,EAAG,WAAW,iBAAiB,OAAO,CACvD,OAAO,OAAOE,EAAQ,KAAK,WAAWI,EAAK,kBAAkB,CAAC,CAAC,CAIrE,OAAOJ,CACR,CACF,aAtDE,UAAU,AAAA,EAAA,KAAA,UAAA,OAAA,OAAA,CAPZ,KAAA,MAAA,UAAA,CAAA,OAAO,UAAU,CACjB,OAAO,GAAG,CAAC;AAIZ,CAAC,CAAC,AAAA,EAAA,KAAA,CA0DF,IAAA,OAAe"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"mappings":"AAAA,OAAO,UAAU,gBAAiB;AAIlC,eAAe;eAEA;WACH,sBAAsB;EAC9B,eAAe;CAChB;AACF","names":[],"sources":["../../../../src/web-components/form/definition.ts"],"sourcesContent":["import Form from \"./component.js\";\n\nForm.define();\n\nexport default Form;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"godown-form\": Form;\n }\n}\n"],"version":3,"file":"definition.d.ts"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import Form from"./component.js";import"@godown/element";import"lit";import"lit/decorators.js";import"../../internal/global-style.js";import"../../internal/reset-style.js";import"sharekit";import"@oxc-project/runtime/helpers/decorate";Form.define();export{Form as default};
|
2
|
+
//# sourceMappingURL=definition.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"definition.js","sources":["../../../src/web-components/form/definition.ts"],"sourcesContent":["import Form from \"./component.js\";\n\nForm.define();\n\nexport default Form;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"godown-form\": Form;\n }\n}\n"],"names":[],"mappings":"2OAEA,KAAK,QAAQ"}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import { type TemplateResult } from "lit";
|
2
|
+
import { GlobalStyle } from "../../internal/global-style.js";
|
3
|
+
/**
|
4
|
+
* {@linkcode Grid} provides gird layout.
|
5
|
+
*
|
6
|
+
* @slot - Grid items.
|
7
|
+
* @category layout
|
8
|
+
*/
|
9
|
+
declare class Grid extends GlobalStyle {
|
10
|
+
/**
|
11
|
+
* CSS property `gap`.
|
12
|
+
*/
|
13
|
+
gap: string;
|
14
|
+
/**
|
15
|
+
* CSS property `grid-template-columns`.
|
16
|
+
*
|
17
|
+
* If columns is numerical, divide columns equally.
|
18
|
+
*/
|
19
|
+
columns: string | number;
|
20
|
+
/**
|
21
|
+
* CSS property `grid-template-rows`.
|
22
|
+
*
|
23
|
+
* If rows is numerical, divide rows equally.
|
24
|
+
*/
|
25
|
+
rows: string | number;
|
26
|
+
/**
|
27
|
+
* CSS property `place-content` (`align-content justify-content`).
|
28
|
+
*/
|
29
|
+
content: string;
|
30
|
+
/**
|
31
|
+
* CSS property `place-items` (`align-items justify-items`).
|
32
|
+
*/
|
33
|
+
items: string;
|
34
|
+
constructor();
|
35
|
+
protected render(): TemplateResult<1>;
|
36
|
+
}
|
37
|
+
export default Grid;
|
38
|
+
export { Grid };
|
@@ -0,0 +1 @@
|
|
1
|
+
{"mappings":"AACA,cAAc,sBAAiC,KAAM;AAIrD,SAAS,mBAAmB,gCAAiC;;;;;;;AAY7D,cAWM,aAAa,YAAY;;;;CAI7B,AACA;;;;;;CAOA,AACA;;;;;;CAOA,AACA;;;;CAKA,AACA;;;;CAKA,AACA;CAEA;CAiBA,UAAU,UAAU,eAAe;AAUpC;AAED,eAAe;AACf,SAAS","names":[],"sources":["../../../../src/web-components/grid/component.ts"],"sourcesContent":["import { attr, godown, htmlSlot, StyleController, styles } from \"@godown/element\";\nimport { type TemplateResult, css, html } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nimport { isNumerical } from \"sharekit\";\n\nimport { GlobalStyle } from \"../../internal/global-style.js\";\n\nconst toTemplate = (s: number | string) => (isNumerical(s) ? `repeat(${s},1fr)` : s);\n\nconst protoName = \"grid\";\n\n/**\n * {@linkcode Grid} provides gird layout.\n *\n * @slot - Grid items.\n * @category layout\n */\n@godown(protoName)\n@styles(css`\n :host,\n :host([contents]) [part=\"root\"] {\n display: grid;\n }\n\n [part=\"root\"] {\n display: contents;\n }\n`)\nclass Grid extends GlobalStyle {\n /**\n * CSS property `gap`.\n */\n @property()\n gap: string;\n\n /**\n * CSS property `grid-template-columns`.\n *\n * If columns is numerical, divide columns equally.\n */\n @property()\n columns: string | number;\n\n /**\n * CSS property `grid-template-rows`.\n *\n * If rows is numerical, divide rows equally.\n */\n @property()\n rows: string | number;\n\n /**\n * CSS property `place-content` (`align-content justify-content`).\n */\n @property()\n content: string;\n\n /**\n * CSS property `place-items` (`align-items justify-items`).\n */\n @property()\n items: string;\n\n constructor() {\n super();\n new StyleController(\n this,\n () => ({\n \":host\": {\n gap: this.gap,\n \"grid-template-columns\": toTemplate(this.columns),\n \"grid-template-rows\": toTemplate(this.rows),\n \"place-content\": this.content,\n \"place-items\": this.items,\n },\n }),\n () => [this.gap, this.columns, this.rows, this.content, this.items],\n );\n }\n\n protected render(): TemplateResult<1> {\n return html`\n <div\n part=\"root\"\n ${attr(this.observedRecord)}\n >\n ${htmlSlot()}\n </div>\n `;\n }\n}\n\nexport default Grid;\nexport { Grid };\n"],"version":3,"file":"component.d.ts"}
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import{godown,styles,StyleController,attr,htmlSlot}from"@godown/element";import{css,html}from"lit";import{property}from"lit/decorators.js";import{isNumerical}from"sharekit";import{GlobalStyle}from"../../internal/global-style.js";import _decorate from"@oxc-project/runtime/helpers/decorate";import"../../internal/reset-style.js";const toTemplate=e=>isNumerical(e)?`repeat(${e},1fr)`:e,protoName=`grid`;let Grid=class e extends GlobalStyle{constructor(){super(),new StyleController(this,()=>({":host":{gap:this.gap,"grid-template-columns":toTemplate(this.columns),"grid-template-rows":toTemplate(this.rows),"place-content":this.content,"place-items":this.items}}),()=>[this.gap,this.columns,this.rows,this.content,this.items])}render(){return html`<div part="root" ${attr(this.observedRecord)}> ${htmlSlot()} </div>`}};_decorate([property()],Grid.prototype,`gap`,void 0),_decorate([property()],Grid.prototype,`columns`,void 0),_decorate([property()],Grid.prototype,`rows`,void 0),_decorate([property()],Grid.prototype,`content`,void 0),_decorate([property()],Grid.prototype,`items`,void 0),Grid=_decorate([godown(protoName),styles(css`:host,:host([contents]) [part=root]{display:grid}[part=root]{display:contents}
|
2
|
+
`)],Grid);var Grid$1=Grid;export{Grid,Grid$1 as default};
|
3
|
+
//# sourceMappingURL=component.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../src/web-components/grid/component.ts"],"sourcesContent":["import { attr, godown, htmlSlot, StyleController, styles } from \"@godown/element\";\nimport { type TemplateResult, css, html } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nimport { isNumerical } from \"sharekit\";\n\nimport { GlobalStyle } from \"../../internal/global-style.js\";\n\nconst toTemplate = (s: number | string) => (isNumerical(s) ? `repeat(${s},1fr)` : s);\n\nconst protoName = \"grid\";\n\n/**\n * {@linkcode Grid} provides gird layout.\n *\n * @slot - Grid items.\n * @category layout\n */\n@godown(protoName)\n@styles(css`\n :host,\n :host([contents]) [part=\"root\"] {\n display: grid;\n }\n\n [part=\"root\"] {\n display: contents;\n }\n`)\nclass Grid extends GlobalStyle {\n /**\n * CSS property `gap`.\n */\n @property()\n gap: string;\n\n /**\n * CSS property `grid-template-columns`.\n *\n * If columns is numerical, divide columns equally.\n */\n @property()\n columns: string | number;\n\n /**\n * CSS property `grid-template-rows`.\n *\n * If rows is numerical, divide rows equally.\n */\n @property()\n rows: string | number;\n\n /**\n * CSS property `place-content` (`align-content justify-content`).\n */\n @property()\n content: string;\n\n /**\n * CSS property `place-items` (`align-items justify-items`).\n */\n @property()\n items: string;\n\n constructor() {\n super();\n new StyleController(\n this,\n () => ({\n \":host\": {\n gap: this.gap,\n \"grid-template-columns\": toTemplate(this.columns),\n \"grid-template-rows\": toTemplate(this.rows),\n \"place-content\": this.content,\n \"place-items\": this.items,\n },\n }),\n () => [this.gap, this.columns, this.rows, this.content, this.items],\n );\n }\n\n protected render(): TemplateResult<1> {\n return html`\n <div\n part=\"root\"\n ${attr(this.observedRecord)}\n >\n ${htmlSlot()}\n </div>\n `;\n }\n}\n\nexport default Grid;\nexport { Grid };\n"],"names":["s: number | string","s","Grid"],"mappings":"wUAOA,MAAM,WAAa,AAACA,GAAwB,YAAYC,EAAE,CAAG,CAAC,OAAO,EAAEA,EAAE,KAAK,CAAC,CAAGA,EAE5E,UAAY,OAQlB,IAAA,KAAA,MAWMC,UAAa,WAAY,CAmC7B,aAAc,CACZ,OAAO,CACP,IAAI,gBACF,KACA,KAAO,CACL,QAAS,CACP,IAAK,KAAK,IACV,wBAAyB,WAAW,KAAK,QAAQ,CACjD,qBAAsB,WAAW,KAAK,KAAK,CAC3C,gBAAiB,KAAK,QACtB,cAAe,KAAK,KACrB,IAEH,IAAM,CAAC,KAAK,IAAK,KAAK,QAAS,KAAK,KAAM,KAAK,QAAS,KAAK,KAAM,EAEtE,CAES,QAA4B,CACpC,MAAO,KAAI,CAAA,iBAGP,EAAE,KAAK,KAAK,eAAe,CAAA,EAE3B,EAAE,UAAU,CAAA,OAEhB,CAAC,AACF,CACF,aA1DE,UAAU,AAAA,EAAA,KAAA,UAAA,MAAA,OAAA,YAQV,UAAU,AAAA,EAAA,KAAA,UAAA,UAAA,OAAA,YAQV,UAAU,AAAA,EAAA,KAAA,UAAA,OAAA,OAAA,YAMV,UAAU,AAAA,EAAA,KAAA,UAAA,UAAA,OAAA,YAMV,UAAU,AAAA,EAAA,KAAA,UAAA,QAAA,OAAA,CA3CZ,KAAA,UAAA,CAAA,OAAO,UAAU,CACjB,OAAO,GAAG,CAAC;AASZ,CAAC,CAAC,AAAA,EAAA,KAAA,CAiEF,IAAA,OAAe"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"mappings":"AAAA,OAAO,UAAU,gBAAiB;AAIlC,eAAe;eAEA;WACH,sBAAsB;EAC9B,eAAe;CAChB;AACF","names":[],"sources":["../../../../src/web-components/grid/definition.ts"],"sourcesContent":["import Grid from \"./component.js\";\n\nGrid.define();\n\nexport default Grid;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"godown-grid\": Grid;\n }\n}\n"],"version":3,"file":"definition.d.ts"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import Grid from"./component.js";import"@godown/element";import"lit";import"lit/decorators.js";import"sharekit";import"../../internal/global-style.js";import"../../internal/reset-style.js";import"@oxc-project/runtime/helpers/decorate";Grid.define();export{Grid as default};
|
2
|
+
//# sourceMappingURL=definition.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"definition.js","sources":["../../../src/web-components/grid/definition.ts"],"sourcesContent":["import Grid from \"./component.js\";\n\nGrid.define();\n\nexport default Grid;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"godown-grid\": Grid;\n }\n}\n"],"names":[],"mappings":"2OAEA,KAAK,QAAQ"}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import { type TemplateResult } from "lit";
|
2
|
+
import Link from "../link/component.js";
|
3
|
+
/**
|
4
|
+
* {@linkcode Heading} renders a heading.
|
5
|
+
*
|
6
|
+
* If the id is provided, the anchor will be displayed.
|
7
|
+
*
|
8
|
+
* @slot - Heading content.
|
9
|
+
* @category layout
|
10
|
+
*/
|
11
|
+
declare class Heading extends Link {
|
12
|
+
/**
|
13
|
+
* The heading level.
|
14
|
+
*/
|
15
|
+
as: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
16
|
+
/**
|
17
|
+
* The anchor prefix.
|
18
|
+
*
|
19
|
+
* Element must have an id to be displayed.
|
20
|
+
*/
|
21
|
+
anchor: string;
|
22
|
+
/**
|
23
|
+
* The anchor side.
|
24
|
+
*/
|
25
|
+
side: "left" | "right";
|
26
|
+
protected render(): TemplateResult<1>;
|
27
|
+
protected wrapHeading(...children: any[]): TemplateResult<1>;
|
28
|
+
}
|
29
|
+
export default Heading;
|
30
|
+
export { Heading };
|
@@ -0,0 +1 @@
|
|
1
|
+
{"mappings":"AACA,cAAc,sBAA0C,KAAM;AAG9D,OAAO,UAAU,sBAAuB;;;;;;;;;AAYxC,cAgCM,gBAAgB,KAAK;;;;CAIzB,AACA,IAAI,OAAO,OAAO,OAAO,OAAO,OAAO;;;;;;CAOvC,AACA;;;;CAKA,AACA,MAAM,SAAS;CAEf,UAAU,UAAU,eAAe;CAmBnC,UAAU,YAAY,GAAG,kBAAkB,eAAe;AA4B3D;AAED,eAAe;AACf,SAAS","names":[],"sources":["../../../../src/web-components/heading/component.ts"],"sourcesContent":["import { godown, htmlSlot, styles, tokenList } from \"@godown/element\";\nimport { type TemplateResult, css, html, nothing } from \"lit\";\nimport { property } from \"lit/decorators.js\";\n\nimport Link from \"../link/component.js\";\n\nconst protoName = \"heading\";\n\n/**\n * {@linkcode Heading} renders a heading.\n *\n * If the id is provided, the anchor will be displayed.\n *\n * @slot - Heading content.\n * @category layout\n */\n@godown(protoName)\n@styles(css`\n :host {\n display: block;\n text-align: start;\n }\n\n [part~=\"anchor\"] {\n position: absolute;\n text-align: center;\n min-width: 1.25em;\n right: 100%;\n }\n\n [part~=\"left\"][part~=\"anchor\"] {\n right: 100%;\n }\n\n [part~=\"right\"][part~=\"anchor\"] {\n left: 100%;\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n width: fit-content;\n position: relative;\n }\n`)\nclass Heading extends Link {\n /**\n * The heading level.\n */\n @property()\n as: \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" = \"h1\";\n\n /**\n * The anchor prefix.\n *\n * Element must have an id to be displayed.\n */\n @property()\n anchor = \"#\";\n\n /**\n * The anchor side.\n */\n @property()\n side: \"left\" | \"right\" = \"left\";\n\n protected render(): TemplateResult<1> {\n const hrefValue = this.href || (this.id ? \"#\" + this.id : undefined);\n return html`\n <a\n part=\"root\"\n href=\"${hrefValue || nothing}\"\n >\n ${this.wrapHeading(\n htmlSlot(),\n hrefValue\n ? html`\n <i part=\"${tokenList(\"anchor\", this.side)}\">${this.anchor}</i>\n `\n : \"\",\n )}\n </a>\n `;\n }\n\n protected wrapHeading(...children: any[]): TemplateResult<1> {\n switch (this.as) {\n case \"h2\":\n return html`\n <h2>${children}</h2>\n `;\n case \"h3\":\n return html`\n <h3>${children}</h3>\n `;\n case \"h4\":\n return html`\n <h4>${children}</h4>\n `;\n case \"h5\":\n return html`\n <h5>${children}</h5>\n `;\n case \"h6\":\n return html`\n <h6>${children}</h6>\n `;\n default:\n return html`\n <h1>${children}</h1>\n `;\n }\n }\n}\n\nexport default Heading;\nexport { Heading };\n"],"version":3,"file":"component.d.ts"}
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import{godown,styles,htmlSlot,tokenList}from"@godown/element";import{css,nothing,html}from"lit";import{property}from"lit/decorators.js";import Link from"../link/component.js";import _decorate from"@oxc-project/runtime/helpers/decorate";import"../router/component.js";import"sharekit";import"../../internal/global-style.js";import"../../internal/reset-style.js";const protoName=`heading`;let Heading=class e extends Link{constructor(...e){super(...e),this.as=`h1`,this.anchor=`#`,this.side=`left`}render(){let e=this.href||(this.id?`#`+this.id:void 0);return html`<a part="root" href="${e||nothing}"> ${this.wrapHeading(htmlSlot(),e?html`<i part="${tokenList(`anchor`,this.side)}">${this.anchor}</i>`:``)} </a>`}wrapHeading(...e){switch(this.as){case`h2`:return html`<h2>${e}</h2>`;case`h3`:return html`<h3>${e}</h3>`;case`h4`:return html`<h4>${e}</h4>`;case`h5`:return html`<h5>${e}</h5>`;case`h6`:return html`<h6>${e}</h6>`;default:return html`<h1>${e}</h1>`}}};_decorate([property()],Heading.prototype,`as`,void 0),_decorate([property()],Heading.prototype,`anchor`,void 0),_decorate([property()],Heading.prototype,`side`,void 0),Heading=_decorate([godown(protoName),styles(css`:host{display:block;text-align:start}[part~=anchor]{position:absolute;text-align:center;min-width:1.25em;right:100%}[part~=left][part~=anchor]{right:100%}[part~=right][part~=anchor]{left:100%}h1,h2,h3,h4,h5,h6{width:-moz-fit-content;width:fit-content;position:relative}
|
2
|
+
`)],Heading);var Heading$1=Heading;export{Heading,Heading$1 as default};
|
3
|
+
//# sourceMappingURL=component.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../src/web-components/heading/component.ts"],"sourcesContent":["import { godown, htmlSlot, styles, tokenList } from \"@godown/element\";\nimport { type TemplateResult, css, html, nothing } from \"lit\";\nimport { property } from \"lit/decorators.js\";\n\nimport Link from \"../link/component.js\";\n\nconst protoName = \"heading\";\n\n/**\n * {@linkcode Heading} renders a heading.\n *\n * If the id is provided, the anchor will be displayed.\n *\n * @slot - Heading content.\n * @category layout\n */\n@godown(protoName)\n@styles(css`\n :host {\n display: block;\n text-align: start;\n }\n\n [part~=\"anchor\"] {\n position: absolute;\n text-align: center;\n min-width: 1.25em;\n right: 100%;\n }\n\n [part~=\"left\"][part~=\"anchor\"] {\n right: 100%;\n }\n\n [part~=\"right\"][part~=\"anchor\"] {\n left: 100%;\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n width: fit-content;\n position: relative;\n }\n`)\nclass Heading extends Link {\n /**\n * The heading level.\n */\n @property()\n as: \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" = \"h1\";\n\n /**\n * The anchor prefix.\n *\n * Element must have an id to be displayed.\n */\n @property()\n anchor = \"#\";\n\n /**\n * The anchor side.\n */\n @property()\n side: \"left\" | \"right\" = \"left\";\n\n protected render(): TemplateResult<1> {\n const hrefValue = this.href || (this.id ? \"#\" + this.id : undefined);\n return html`\n <a\n part=\"root\"\n href=\"${hrefValue || nothing}\"\n >\n ${this.wrapHeading(\n htmlSlot(),\n hrefValue\n ? html`\n <i part=\"${tokenList(\"anchor\", this.side)}\">${this.anchor}</i>\n `\n : \"\",\n )}\n </a>\n `;\n }\n\n protected wrapHeading(...children: any[]): TemplateResult<1> {\n switch (this.as) {\n case \"h2\":\n return html`\n <h2>${children}</h2>\n `;\n case \"h3\":\n return html`\n <h3>${children}</h3>\n `;\n case \"h4\":\n return html`\n <h4>${children}</h4>\n `;\n case \"h5\":\n return html`\n <h5>${children}</h5>\n `;\n case \"h6\":\n return html`\n <h6>${children}</h6>\n `;\n default:\n return html`\n <h1>${children}</h1>\n `;\n }\n }\n}\n\nexport default Heading;\nexport { Heading };\n"],"names":["Heading","hrefValue","children"],"mappings":"yWAMA,MAAM,UAAY,UAUlB,IAAA,QAAA,MAgCMA,UAAgB,IAAK,oCAKzB,GAA8C,UAQ9C,OAAS,SAMT,KAAyB,OAEf,QAA4B,CACpC,IAAMC,EAAY,KAAK,OAAS,KAAK,GAAK,IAAM,KAAK,GAAK,QAC1D,MAAO,KAAI,CAAA,qBAGD,EAAEA,GAAa,QAAQ,GAE7B,EAAE,KAAK,YACL,UAAU,CACVA,EACI,IAAI,CAAA,SACO,EAAE,UAAU,SAAU,KAAK,KAAK,CAAC,EAAE,EAAE,KAAK,OAAO,IAC5D,CAAC,CACD,GACL,CAAA,KAEL,CAAC,AACF,CAED,YAAsB,GAAGC,EAAoC,CAC3D,OAAQ,KAAK,GAAb,CACE,IAAK,KACH,MAAO,KAAI,CAAA,IACL,EAAEA,EAAS,KACjB,CAAC,CACH,IAAK,KACH,MAAO,KAAI,CAAA,IACL,EAAEA,EAAS,KACjB,CAAC,CACH,IAAK,KACH,MAAO,KAAI,CAAA,IACL,EAAEA,EAAS,KACjB,CAAC,CACH,IAAK,KACH,MAAO,KAAI,CAAA,IACL,EAAEA,EAAS,KACjB,CAAC,CACH,IAAK,KACH,MAAO,KAAI,CAAA,IACL,EAAEA,EAAS,KACjB,CAAC,CACH,QACE,MAAO,KAAI,CAAA,IACL,EAAEA,EAAS,KACjB,CAAC,AACJ,CACF,CACF,aAhEE,UAAU,AAAA,EAAA,QAAA,UAAA,KAAA,OAAA,YAQV,UAAU,AAAA,EAAA,QAAA,UAAA,SAAA,OAAA,YAMV,UAAU,AAAA,EAAA,QAAA,UAAA,OAAA,OAAA,CAlDZ,QAAA,UAAA,CAAA,OAAO,UAAU,CACjB,OAAO,GAAG,CAAC;AA8BZ,CAAC,CAAC,AAAA,EAAA,QAAA,CAuEF,IAAA,UAAe"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"mappings":"AAAA,OAAO,aAAa,gBAAiB;AAIrC,eAAe;eAEA;WACH,sBAAsB;EAC9B,kBAAkB;CACnB;AACF","names":[],"sources":["../../../../src/web-components/heading/definition.ts"],"sourcesContent":["import Heading from \"./component.js\";\n\nHeading.define();\n\nexport default Heading;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"godown-heading\": Heading;\n }\n}\n"],"version":3,"file":"definition.d.ts"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import Heading from"./component.js";import"@godown/element";import"lit";import"lit/decorators.js";import"../link/component.js";import"../router/component.js";import"sharekit";import"../../internal/global-style.js";import"../../internal/reset-style.js";import"@oxc-project/runtime/helpers/decorate";Heading.define();export{Heading as default};
|
2
|
+
//# sourceMappingURL=definition.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"definition.js","sources":["../../../src/web-components/heading/definition.ts"],"sourcesContent":["import Heading from \"./component.js\";\n\nHeading.define();\n\nexport default Heading;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"godown-heading\": Heading;\n }\n}\n"],"names":[],"mappings":"0SAEA,QAAQ,QAAQ"}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { type TemplateResult } from "lit";
|
2
|
+
import { SuperInput } from "../../internal/super-input.js";
|
3
|
+
type InputType = "text" | "search" | "tel" | "url" | "email" | "password" | "datetime" | "date" | "month" | "week" | "time" | "datetime-local" | "number" | "range" | "color" | "file" | "image";
|
4
|
+
/**
|
5
|
+
* {@linkcode Input} renders a input.
|
6
|
+
*
|
7
|
+
* @fires input - Fires when the input value changes.
|
8
|
+
* @fires change - Fires when the input value changes.
|
9
|
+
* @category input
|
10
|
+
*/
|
11
|
+
declare class Input extends SuperInput {
|
12
|
+
type: InputType;
|
13
|
+
value: string;
|
14
|
+
/**
|
15
|
+
* If outline, the outline is always present.
|
16
|
+
*/
|
17
|
+
variant: "default" | "outline";
|
18
|
+
protected _input: HTMLInputElement;
|
19
|
+
constructor();
|
20
|
+
protected render(): TemplateResult<1>;
|
21
|
+
protected _renderSuffix(): TemplateResult<1>;
|
22
|
+
protected _changeInputType(t: typeof this.type): void;
|
23
|
+
}
|
24
|
+
export default Input;
|
25
|
+
export { Input };
|
@@ -0,0 +1 @@
|
|
1
|
+
{"mappings":"AAEA,cAAc,sBAA0C,KAAM;AAI9D,SAAS,kBAAkB,+BAAgC;KAGtD,YACD,SACA,WACA,QACA,QACA,UACA,aACA,aACA,SACA,UACA,SACA,SACA,mBACA,WACA,UACA,UACA,SACA;;;;;;;;AAWJ,cA6CM,cAAc,WAAW;CAC7B,AACA,MAAM;CAEN;;;;CAKA,AACA,SAAS,YAAY;CAErB,UACU,QAAQ;CAElB;CAUA,UAAU,UAAU,eAAe;CA4BnC,UAAU,iBAAiB,eAAe;CAiB1C,UAAU,iBAAiBA,UAAU,KAAK;AAK3C;AAED,eAAe;AACf,SAAS","names":["t: typeof this.type"],"sources":["../../../../src/web-components/input/component.ts"],"sourcesContent":["import { attr, godown, styles, StyleController, htmlSlot } from \"@godown/element\";\nimport iconEyeSlash from \"../../internal/icons/eye-slash.js\";\nimport { type TemplateResult, css, html, nothing } from \"lit\";\nimport { property, query } from \"lit/decorators.js\";\n\nimport { cssGlobalVars } from \"../../internal/global-style.js\";\nimport { SuperInput } from \"../../internal/super-input.js\";\nimport { RingBuilder } from \"../../internal/ring.js\";\n\ntype InputType =\n | \"text\"\n | \"search\"\n | \"tel\"\n | \"url\"\n | \"email\"\n | \"password\"\n | \"datetime\"\n | \"date\"\n | \"month\"\n | \"week\"\n | \"time\"\n | \"datetime-local\"\n | \"number\"\n | \"range\"\n | \"color\"\n | \"file\"\n | \"image\";\n\nconst protoName = \"input\";\n\n/**\n * {@linkcode Input} renders a input.\n *\n * @fires input - Fires when the input value changes.\n * @fires change - Fires when the input value changes.\n * @category input\n */\n@godown(protoName)\n@styles(css`\n :host {\n display: block;\n ${cssGlobalVars.input}-icon-color: hsl(0, 0%, 50%);\n }\n\n :host(:focus-within),\n :host(:active) {\n ${cssGlobalVars.ringColor}: currentColor;\n ${cssGlobalVars.input}-icon-color: currentColor;\n }\n\n [part=\"root\"] {\n padding-inline: 0.75em;\n padding-block: 0.5em;\n display: flex;\n position: relative;\n align-items: center;\n border-radius: inherit;\n }\n\n [part=\"input\"] {\n width: 100%;\n height: 100%;\n flex-grow: 1;\n }\n\n [part=\"prefix\"],\n [part=\"suffix\"] {\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(${cssGlobalVars.input}-icon-color);\n }\n\n [part=\"suffix\"] slot svg {\n margin-inline-start: 0.25em;\n }\n\n [part=\"prefix\"] slot svg {\n margin-inline-end: 0.25em;\n }\n`)\nclass Input extends SuperInput {\n @property({ reflect: true })\n type: InputType = \"text\";\n\n value: string;\n\n /**\n * If outline, the outline is always present.\n */\n @property()\n variant: \"default\" | \"outline\" = \"default\";\n\n @query(\"[part=input]\")\n protected _input: HTMLInputElement;\n\n constructor() {\n super();\n new StyleController(\n this,\n () =>\n new RingBuilder({ type: this.ringType }).css +\n (this.variant === \"outline\" ? `:host{${cssGlobalVars.ringColor}:currentColor}` : \"\"),\n );\n }\n\n protected render(): TemplateResult<1> {\n return html`\n <label\n part=\"root\"\n ${attr(this.observedRecord)}\n >\n ${[\n this._renderPrefix(),\n html`\n <input\n part=\"input\"\n type=\"${this.type}\"\n .value=\"${this.value}\"\n ?autofocus=\"${this.autofocus}\"\n ?disabled=\"${this.disabled}\"\n autocapitalize=\"${this.autocapitalize || nothing}\"\n autocomplete=\"${this.autocomplete || nothing}\"\n placeholder=\"${this.placeholder || nothing}\"\n @input=\"${this._handleInput}\"\n @change=\"${this._handleChange}\"\n />\n `,\n this._renderSuffix(),\n ]}\n </label>\n `;\n }\n\n protected _renderSuffix(): TemplateResult<1> {\n const PASSWORD = \"password\";\n if (this.type === PASSWORD) {\n return html`\n <i\n part=\"suffix\"\n @mousedown=\"${() => this._changeInputType(\"text\")}\"\n @mouseup=\"${() => this._changeInputType(PASSWORD)}\"\n @mouseleave=\"${() => this._changeInputType(PASSWORD)}\"\n >\n ${htmlSlot(\"suffix\", iconEyeSlash())}\n </i>\n `;\n }\n return super._renderSuffix();\n }\n\n protected _changeInputType(t: typeof this.type): void {\n if (this._input) {\n this._input.type = t;\n }\n }\n}\n\nexport default Input;\nexport { Input };\n"],"version":3,"file":"component.d.ts"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{godown,styles,StyleController,attr,htmlSlot}from"@godown/element";import _default from"../../internal/icons/eye-slash.js";import{css,nothing,html}from"lit";import{property,query}from"lit/decorators.js";import{cssGlobalVars}from"../../internal/global-style.js";import{SuperInput}from"../../internal/super-input.js";import{RingBuilder}from"../../internal/ring.js";import _decorate from"@oxc-project/runtime/helpers/decorate";import"../../internal/reset-style.js";import"sharekit";const protoName=`input`;let Input=class e extends SuperInput{constructor(){super(),this.type=`text`,this.variant=`default`,new StyleController(this,()=>new RingBuilder({type:this.ringType}).css+(this.variant===`outline`?`:host{${cssGlobalVars.ringColor}:currentColor}`:``))}render(){return html`<label part="root" ${attr(this.observedRecord)}> ${[this._renderPrefix(),html`<input part="input" type="${this.type}" .value="${this.value}" ?autofocus="${this.autofocus}" ?disabled="${this.disabled}" autocapitalize="${this.autocapitalize||nothing}" autocomplete="${this.autocomplete||nothing}" placeholder="${this.placeholder||nothing}" @input="${this._handleInput}" @change="${this._handleChange}"/>`,this._renderSuffix()]} </label>`}_renderSuffix(){let e=`password`;return this.type===e?html`<i part="suffix" @mousedown="${()=>this._changeInputType(`text`)}" @mouseup="${()=>this._changeInputType(e)}" @mouseleave="${()=>this._changeInputType(e)}"> ${htmlSlot(`suffix`,_default())} </i>`:super._renderSuffix()}_changeInputType(e){this._input&&(this._input.type=e)}};_decorate([property({reflect:!0})],Input.prototype,`type`,void 0),_decorate([property()],Input.prototype,`variant`,void 0),_decorate([query(`[part=input]`)],Input.prototype,`_input`,void 0),Input=_decorate([godown(protoName),styles(css`:host{display:block;${cssGlobalVars.input}-icon-color:gray}:host(:focus-within),:host(:active){${cssGlobalVars.ringColor}:currentColor;${cssGlobalVars.input}-icon-color:currentColor}[part=root]{padding-inline:.75em;padding-block:.5em;display:flex;position:relative;align-items:center;border-radius:inherit}[part=input]{width:100%;height:100%;flex-grow:1}[part=prefix],[part=suffix]{height:100%;display:flex;align-items:center;justify-content:center;color:var(${cssGlobalVars.input}-icon-color)}[part=suffix] slot svg{margin-inline-start:.25em}[part=prefix] slot svg{margin-inline-end:.25em}`)],Input);var Input$1=Input;export{Input,Input$1 as default};
|
2
|
+
//# sourceMappingURL=component.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../src/web-components/input/component.ts"],"sourcesContent":["import { attr, godown, styles, StyleController, htmlSlot } from \"@godown/element\";\nimport iconEyeSlash from \"../../internal/icons/eye-slash.js\";\nimport { type TemplateResult, css, html, nothing } from \"lit\";\nimport { property, query } from \"lit/decorators.js\";\n\nimport { cssGlobalVars } from \"../../internal/global-style.js\";\nimport { SuperInput } from \"../../internal/super-input.js\";\nimport { RingBuilder } from \"../../internal/ring.js\";\n\ntype InputType =\n | \"text\"\n | \"search\"\n | \"tel\"\n | \"url\"\n | \"email\"\n | \"password\"\n | \"datetime\"\n | \"date\"\n | \"month\"\n | \"week\"\n | \"time\"\n | \"datetime-local\"\n | \"number\"\n | \"range\"\n | \"color\"\n | \"file\"\n | \"image\";\n\nconst protoName = \"input\";\n\n/**\n * {@linkcode Input} renders a input.\n *\n * @fires input - Fires when the input value changes.\n * @fires change - Fires when the input value changes.\n * @category input\n */\n@godown(protoName)\n@styles(css`\n :host {\n display: block;\n ${cssGlobalVars.input}-icon-color: hsl(0, 0%, 50%);\n }\n\n :host(:focus-within),\n :host(:active) {\n ${cssGlobalVars.ringColor}: currentColor;\n ${cssGlobalVars.input}-icon-color: currentColor;\n }\n\n [part=\"root\"] {\n padding-inline: 0.75em;\n padding-block: 0.5em;\n display: flex;\n position: relative;\n align-items: center;\n border-radius: inherit;\n }\n\n [part=\"input\"] {\n width: 100%;\n height: 100%;\n flex-grow: 1;\n }\n\n [part=\"prefix\"],\n [part=\"suffix\"] {\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(${cssGlobalVars.input}-icon-color);\n }\n\n [part=\"suffix\"] slot svg {\n margin-inline-start: 0.25em;\n }\n\n [part=\"prefix\"] slot svg {\n margin-inline-end: 0.25em;\n }\n`)\nclass Input extends SuperInput {\n @property({ reflect: true })\n type: InputType = \"text\";\n\n value: string;\n\n /**\n * If outline, the outline is always present.\n */\n @property()\n variant: \"default\" | \"outline\" = \"default\";\n\n @query(\"[part=input]\")\n protected _input: HTMLInputElement;\n\n constructor() {\n super();\n new StyleController(\n this,\n () =>\n new RingBuilder({ type: this.ringType }).css +\n (this.variant === \"outline\" ? `:host{${cssGlobalVars.ringColor}:currentColor}` : \"\"),\n );\n }\n\n protected render(): TemplateResult<1> {\n return html`\n <label\n part=\"root\"\n ${attr(this.observedRecord)}\n >\n ${[\n this._renderPrefix(),\n html`\n <input\n part=\"input\"\n type=\"${this.type}\"\n .value=\"${this.value}\"\n ?autofocus=\"${this.autofocus}\"\n ?disabled=\"${this.disabled}\"\n autocapitalize=\"${this.autocapitalize || nothing}\"\n autocomplete=\"${this.autocomplete || nothing}\"\n placeholder=\"${this.placeholder || nothing}\"\n @input=\"${this._handleInput}\"\n @change=\"${this._handleChange}\"\n />\n `,\n this._renderSuffix(),\n ]}\n </label>\n `;\n }\n\n protected _renderSuffix(): TemplateResult<1> {\n const PASSWORD = \"password\";\n if (this.type === PASSWORD) {\n return html`\n <i\n part=\"suffix\"\n @mousedown=\"${() => this._changeInputType(\"text\")}\"\n @mouseup=\"${() => this._changeInputType(PASSWORD)}\"\n @mouseleave=\"${() => this._changeInputType(PASSWORD)}\"\n >\n ${htmlSlot(\"suffix\", iconEyeSlash())}\n </i>\n `;\n }\n return super._renderSuffix();\n }\n\n protected _changeInputType(t: typeof this.type): void {\n if (this._input) {\n this._input.type = t;\n }\n }\n}\n\nexport default Input;\nexport { Input };\n"],"names":["Input","PASSWORD","iconEyeSlash","t: typeof this.type","t"],"mappings":"qeA4BA,MAAM,UAAY,QASlB,IAAA,MAAA,MA6CMA,UAAc,UAAW,CAe7B,aAAc,CACZ,OAAO,MAdT,KAAkB,YAQlB,QAAiC,UAO/B,IAAI,gBACF,KACA,IACE,IAAI,YAAY,CAAE,KAAM,KAAK,QAAU,GAAE,KACxC,KAAK,UAAY,UAAY,CAAC,MAAM,EAAE,cAAc,UAAU,cAAc,CAAC,CAAG,IAEtF,CAES,QAA4B,CACpC,MAAO,KAAI,CAAA,mBAGP,EAAE,KAAK,KAAK,eAAe,CAAA,EAE3B,EAAE,CACA,KAAK,eAAe,CACpB,IAAI,CAAA,0BAGM,EAAE,KAAK,KAAK,UACV,EAAE,KAAK,MAAM,cACT,EAAE,KAAK,UAAU,aAClB,EAAE,KAAK,SAAS,kBACX,EAAE,KAAK,gBAAkB,QAAQ,gBACnC,EAAE,KAAK,cAAgB,QAAQ,eAChC,EAAE,KAAK,aAAe,QAAQ,UACnC,EAAE,KAAK,aAAa,WACnB,EAAE,KAAK,cAAc,GAElC,CAAC,CACD,KAAK,eAAA,AACN,EAAA,SAEL,CAAC,AACF,CAES,eAAmC,CAC3C,IAAMC,EAAW,WAajB,OAZI,KAAK,OAASA,EACT,IAAI,CAAA,6BAGK,EAAE,IAAM,KAAK,iBAAiB,OAAO,CAAC,YACxC,EAAE,IAAM,KAAK,iBAAiBA,EAAS,CAAC,eACrC,EAAE,IAAM,KAAK,iBAAiBA,EAAS,CAAC,GAErD,EAAE,SAAS,SAAUC,UAAc,CAAC,CAAA,KAExC,CAAC,CAEI,MAAM,eAAe,AAC7B,CAES,iBAAiBC,EAA2B,CAChD,KAAK,SACP,KAAK,OAAO,KAAOC,EAEtB,CACF,aA1EE,SAAS,CAAE,QAAS,EAAM,EAAC,AAAA,EAAA,MAAA,UAAA,OAAA,OAAA,YAQ3B,UAAU,AAAA,EAAA,MAAA,UAAA,UAAA,OAAA,CAGV,UAAA,CAAA,MAAM,eAAe,AAAA,EAAA,MAAA,UAAA,SAAA,OAAA,CAzDvB,MAAA,UAAA,CAAA,OAAO,UAAU,CACjB,OAAO,GAAG,CAAC,oBAGR,EAAE,cAAc,MAAM,qDAKtB,EAAE,cAAc,UAAU,cAC1B,EAAE,cAAc,MAAM,8SAwBX,EAAE,cAAc,MAAM,6GAUrC,CAAC,CAAC,AAAA,EAAA,MAAA,CA8EF,IAAA,QAAe"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"mappings":"AAAA,OAAO,WAAW,gBAAiB;AAInC,eAAe;eAEA;WACH,sBAAsB;EAC9B,gBAAgB;CACjB;AACF","names":[],"sources":["../../../../src/web-components/input/definition.ts"],"sourcesContent":["import Input from \"./component.js\";\n\nInput.define();\n\nexport default Input;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"godown-input\": Input;\n }\n}\n"],"version":3,"file":"definition.d.ts"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import Input from"./component.js";import"@godown/element";import"../../internal/icons/eye-slash.js";import"lit";import"lit/decorators.js";import"../../internal/global-style.js";import"../../internal/reset-style.js";import"sharekit";import"../../internal/super-input.js";import"../../internal/ring.js";import"@oxc-project/runtime/helpers/decorate";Input.define();export{Input as default};
|
2
|
+
//# sourceMappingURL=definition.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"definition.js","sources":["../../../src/web-components/input/definition.ts"],"sourcesContent":["import Input from \"./component.js\";\n\nInput.define();\n\nexport default Input;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"godown-input\": Input;\n }\n}\n"],"names":[],"mappings":"2VAEA,MAAM,QAAQ"}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { type TemplateResult } from "lit";
|
2
|
+
import { GlobalStyle } from "../../internal/global-style.js";
|
3
|
+
/**
|
4
|
+
* {@linkcode Layout} renders main content, top header, bottom footer.
|
5
|
+
*
|
6
|
+
* If `sticky` is set to `true`, the header will be sticky.
|
7
|
+
*
|
8
|
+
* Main content will take up the remaining space.
|
9
|
+
*
|
10
|
+
* Element display should be `(inline-)flex` or `(inline-)grid`.
|
11
|
+
*
|
12
|
+
* @slot - The main content of the layout.
|
13
|
+
* @slot header - The header of the layout.
|
14
|
+
* @slot footer - The footer of the layout.
|
15
|
+
* @category layout
|
16
|
+
*/
|
17
|
+
declare class Layout extends GlobalStyle {
|
18
|
+
/**
|
19
|
+
* If `true`, header will sticky.
|
20
|
+
*/
|
21
|
+
sticky: boolean;
|
22
|
+
protected render(): TemplateResult<1>;
|
23
|
+
}
|
24
|
+
export default Layout;
|
25
|
+
export { Layout };
|
@@ -0,0 +1 @@
|
|
1
|
+
{"mappings":"AACA,cAAc,sBAAiC,KAAM;AAGrD,SAAS,mBAAmB,gCAAiC;;;;;;;;;;;;;;;AAkB7D,cAmCM,eAAe,YAAY;;;;CAI/B,AACA;CAEA,UAAU,UAAU,eAAe;AAYpC;AAED,eAAe;AACf,SAAS","names":[],"sources":["../../../../src/web-components/layout/component.ts"],"sourcesContent":["import { attr, godown, htmlSlot, styles } from \"@godown/element\";\nimport { type TemplateResult, css, html } from \"lit\";\nimport { property } from \"lit/decorators.js\";\n\nimport { GlobalStyle } from \"../../internal/global-style.js\";\n\nconst protoName = \"layout\";\n\n/**\n * {@linkcode Layout} renders main content, top header, bottom footer.\n *\n * If `sticky` is set to `true`, the header will be sticky.\n *\n * Main content will take up the remaining space.\n *\n * Element display should be `(inline-)flex` or `(inline-)grid`.\n *\n * @slot - The main content of the layout.\n * @slot header - The header of the layout.\n * @slot footer - The footer of the layout.\n * @category layout\n */\n@godown(protoName)\n@styles(css`\n :host {\n width: 100%;\n height: 100%;\n min-height: 100%;\n flex-direction: column;\n grid-template-rows: auto 1fr auto;\n }\n\n :host,\n :host([contents]) [part=\"root\"] {\n display: flex;\n }\n\n [part=\"root\"] {\n display: contents;\n }\n\n [part=\"main\"] {\n width: 100%;\n flex: 1;\n }\n\n [part=\"header\"],\n [part=\"footer\"] {\n flex-shrink: 0;\n width: 100%;\n }\n\n [sticky] header {\n position: sticky;\n top: 0;\n }\n`)\nclass Layout extends GlobalStyle {\n /**\n * If `true`, header will sticky.\n */\n @property({ type: Boolean })\n sticky = false;\n\n protected render(): TemplateResult<1> {\n return html`\n <div\n part=\"root\"\n ${attr(this.observedRecord)}\n >\n <header part=\"header\">${htmlSlot(\"header\")}</header>\n <main part=\"main\">${htmlSlot()}</main>\n <footer part=\"footer\">${htmlSlot(\"footer\")}</footer>\n </div>\n `;\n }\n}\n\nexport default Layout;\nexport { Layout };\n"],"version":3,"file":"component.d.ts"}
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import{godown,styles,attr,htmlSlot}from"@godown/element";import{css,html}from"lit";import{property}from"lit/decorators.js";import{GlobalStyle}from"../../internal/global-style.js";import _decorate from"@oxc-project/runtime/helpers/decorate";import"../../internal/reset-style.js";import"sharekit";const protoName=`layout`;let Layout=class e extends GlobalStyle{constructor(...e){super(...e),this.sticky=!1}render(){return html`<div part="root" ${attr(this.observedRecord)}> <header part="header">${htmlSlot(`header`)}</header> <main part="main">${htmlSlot()}</main> <footer part="footer">${htmlSlot(`footer`)}</footer> </div>`}};_decorate([property({type:Boolean})],Layout.prototype,`sticky`,void 0),Layout=_decorate([godown(protoName),styles(css`:host{width:100%;height:100%;min-height:100%;flex-direction:column;grid-template-rows:auto 1fr auto}:host,:host([contents]) [part=root]{display:flex}[part=root]{display:contents}[part=main]{width:100%;flex:1}[part=header],[part=footer]{flex-shrink:0;width:100%}[sticky] header{position:sticky;top:0}
|
2
|
+
`)],Layout);var Layout$1=Layout;export{Layout,Layout$1 as default};
|
3
|
+
//# sourceMappingURL=component.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../src/web-components/layout/component.ts"],"sourcesContent":["import { attr, godown, htmlSlot, styles } from \"@godown/element\";\nimport { type TemplateResult, css, html } from \"lit\";\nimport { property } from \"lit/decorators.js\";\n\nimport { GlobalStyle } from \"../../internal/global-style.js\";\n\nconst protoName = \"layout\";\n\n/**\n * {@linkcode Layout} renders main content, top header, bottom footer.\n *\n * If `sticky` is set to `true`, the header will be sticky.\n *\n * Main content will take up the remaining space.\n *\n * Element display should be `(inline-)flex` or `(inline-)grid`.\n *\n * @slot - The main content of the layout.\n * @slot header - The header of the layout.\n * @slot footer - The footer of the layout.\n * @category layout\n */\n@godown(protoName)\n@styles(css`\n :host {\n width: 100%;\n height: 100%;\n min-height: 100%;\n flex-direction: column;\n grid-template-rows: auto 1fr auto;\n }\n\n :host,\n :host([contents]) [part=\"root\"] {\n display: flex;\n }\n\n [part=\"root\"] {\n display: contents;\n }\n\n [part=\"main\"] {\n width: 100%;\n flex: 1;\n }\n\n [part=\"header\"],\n [part=\"footer\"] {\n flex-shrink: 0;\n width: 100%;\n }\n\n [sticky] header {\n position: sticky;\n top: 0;\n }\n`)\nclass Layout extends GlobalStyle {\n /**\n * If `true`, header will sticky.\n */\n @property({ type: Boolean })\n sticky = false;\n\n protected render(): TemplateResult<1> {\n return html`\n <div\n part=\"root\"\n ${attr(this.observedRecord)}\n >\n <header part=\"header\">${htmlSlot(\"header\")}</header>\n <main part=\"main\">${htmlSlot()}</main>\n <footer part=\"footer\">${htmlSlot(\"footer\")}</footer>\n </div>\n `;\n }\n}\n\nexport default Layout;\nexport { Layout };\n"],"names":["Layout"],"mappings":"uSAMA,MAAM,UAAY,SAgBlB,IAAA,OAAA,MAmCMA,UAAe,WAAY,oCAK/B,OAAS,GAEC,QAA4B,CACpC,MAAO,KAAI,CAAA,iBAGP,EAAE,KAAK,KAAK,eAAe,CAAA,wBAEL,EAAE,SAAS,SAAS,CAAC,4BACzB,EAAE,UAAU,CAAC,8BACT,EAAE,SAAS,SAAS,CAAC,gBAE/C,CAAC,AACF,CACF,aAfE,SAAS,CAAE,KAAM,OAAS,EAAC,AAAA,EAAA,OAAA,UAAA,SAAA,OAAA,CAvC7B,OAAA,UAAA,CAAA,OAAO,UAAU,CACjB,OAAO,GAAG,CAAC;AAiCZ,CAAC,CAAC,AAAA,EAAA,OAAA,CAsBF,IAAA,SAAe"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"mappings":"AAAA,OAAO,YAAY,gBAAiB;AAIpC,eAAe;eAEA;WACH,sBAAsB;EAC9B,iBAAiB;CAClB;AACF","names":[],"sources":["../../../../src/web-components/layout/definition.ts"],"sourcesContent":["import Layout from \"./component.js\";\n\nLayout.define();\n\nexport default Layout;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"godown-layout\": Layout;\n }\n}\n"],"version":3,"file":"definition.d.ts"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import Layout from"./component.js";import"@godown/element";import"lit";import"lit/decorators.js";import"../../internal/global-style.js";import"../../internal/reset-style.js";import"sharekit";import"@oxc-project/runtime/helpers/decorate";Layout.define();export{Layout as default};
|
2
|
+
//# sourceMappingURL=definition.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"definition.js","sources":["../../../src/web-components/layout/definition.ts"],"sourcesContent":["import Layout from \"./component.js\";\n\nLayout.define();\n\nexport default Layout;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"godown-layout\": Layout;\n }\n}\n"],"names":[],"mappings":"6OAEA,OAAO,QAAQ"}
|
@@ -0,0 +1,64 @@
|
|
1
|
+
import { type TemplateResult } from "lit";
|
2
|
+
import GlobalStyle from "../../internal/global-style.js";
|
3
|
+
declare const linkTypes: {
|
4
|
+
readonly push: "push";
|
5
|
+
readonly replace: "replace";
|
6
|
+
readonly normal: "normal";
|
7
|
+
readonly auto: "auto";
|
8
|
+
};
|
9
|
+
type LinkType = keyof typeof linkTypes;
|
10
|
+
/**
|
11
|
+
* {@linkcode Link} is used for link jumping, works standalone or in {@linkcode Router}.
|
12
|
+
*
|
13
|
+
* Set `type` to `"normal"`,
|
14
|
+
* behave like a normal anchor.
|
15
|
+
*
|
16
|
+
* Set `type` to `"push" `or `"replace"`,
|
17
|
+
* update history state by `history.pushState` or `history.replaceState`,
|
18
|
+
* update all routers whether current pathname is registered or not.
|
19
|
+
*
|
20
|
+
* Set `type` to `"auto"`,
|
21
|
+
* only update the routers if the current pathname is registered,
|
22
|
+
* if not registered, behave like `"normal"`.
|
23
|
+
*
|
24
|
+
* `replace` property will enforce `history.replaceState`.
|
25
|
+
*
|
26
|
+
* @fires navigate - Fires when the link is clicked.
|
27
|
+
* @category navigation
|
28
|
+
*/
|
29
|
+
declare class Link extends GlobalStyle {
|
30
|
+
/**
|
31
|
+
* If `"normal"`, behave like a normal anchor.
|
32
|
+
*
|
33
|
+
* If `"auto"` or `"push"`, call `history.pushState` if `replace` is false,
|
34
|
+
*
|
35
|
+
* If `"replace"`, call `history.replaceState`.
|
36
|
+
*/
|
37
|
+
type: LinkType;
|
38
|
+
/**
|
39
|
+
* If `true`, the {@linkcode Router} will not be updated.
|
40
|
+
*/
|
41
|
+
suppress: boolean;
|
42
|
+
/**
|
43
|
+
* Use `replaceState` instead of `pushState`.
|
44
|
+
*/
|
45
|
+
replace: boolean;
|
46
|
+
/**
|
47
|
+
* A element href.
|
48
|
+
*/
|
49
|
+
href: string;
|
50
|
+
/**
|
51
|
+
* A element target.
|
52
|
+
*/
|
53
|
+
target: "_blank" | "_self" | "_parent" | "_top";
|
54
|
+
/**
|
55
|
+
* Location state object.
|
56
|
+
*/
|
57
|
+
state: {};
|
58
|
+
get pathname(): string;
|
59
|
+
protected _handleClick(e: MouseEvent): void;
|
60
|
+
handleState: () => void;
|
61
|
+
protected render(): TemplateResult<1>;
|
62
|
+
}
|
63
|
+
export default Link;
|
64
|
+
export { Link };
|
@@ -0,0 +1 @@
|
|
1
|
+
{"mappings":"AAIA,cAAkC,sBAAsB,KAAM;AAC9D,OAAO,iBAAiB,gCAAiC;AAIzD,cAAM;UACJ,MAAM;UACN,SAAS;UACT,QAAQ;UACR,MAAM;;KAGH,wBAAwB;;;;;;;;;;;;;;;;;;;;AAqB7B,cAeM,aAAa,YAAY;;;;;;;;CAQ7B,AACA,MAAM;;;;CAKN,AACA;;;;CAKA,AACA;;;;CAKA,AACA;;;;CAKA,AACA,QAAQ,WAAW,UAAU,YAAY;;;;CAKzC;CAEA,IAAI;CAIJ,UAAU,aAAaA,GAAG;CA6B1B;CAgBA,UAAU,UAAU,eAAe;AAapC;AAED,eAAe;AACf,SAAS","names":["e: MouseEvent"],"sources":["../../../../src/web-components/link/component.ts"],"sourcesContent":["import { attr, godown, htmlSlot, styles } from \"@godown/element\";\nimport { property } from \"lit/decorators.js\";\n\nimport Router from \"../router/component.js\";\nimport { css, html, nothing, type TemplateResult } from \"lit\";\nimport GlobalStyle from \"../../internal/global-style.js\";\n\nconst protoName = \"link\";\n\nconst linkTypes = {\n push: \"push\",\n replace: \"replace\",\n normal: \"normal\",\n auto: \"auto\",\n} as const;\n\ntype LinkType = keyof typeof linkTypes;\n\n/**\n * {@linkcode Link} is used for link jumping, works standalone or in {@linkcode Router}.\n *\n * Set `type` to `\"normal\"`,\n * behave like a normal anchor.\n *\n * Set `type` to `\"push\" `or `\"replace\"`,\n * update history state by `history.pushState` or `history.replaceState`,\n * update all routers whether current pathname is registered or not.\n *\n * Set `type` to `\"auto\"`,\n * only update the routers if the current pathname is registered,\n * if not registered, behave like `\"normal\"`.\n *\n * `replace` property will enforce `history.replaceState`.\n *\n * @fires navigate - Fires when the link is clicked.\n * @category navigation\n */\n@godown(protoName)\n@styles(css`\n :host {\n display: inline-block;\n cursor: default;\n }\n\n :host([href]) {\n cursor: pointer;\n }\n\n a {\n display: contents;\n }\n`)\nclass Link extends GlobalStyle {\n /**\n * If `\"normal\"`, behave like a normal anchor.\n *\n * If `\"auto\"` or `\"push\"`, call `history.pushState` if `replace` is false,\n *\n * If `\"replace\"`, call `history.replaceState`.\n */\n @property()\n type: LinkType = linkTypes.auto;\n\n /**\n * If `true`, the {@linkcode Router} will not be updated.\n */\n @property({ type: Boolean })\n suppress = false;\n\n /**\n * Use `replaceState` instead of `pushState`.\n */\n @property({ type: Boolean })\n replace = false;\n\n /**\n * A element href.\n */\n @property()\n href: string;\n\n /**\n * A element target.\n */\n @property()\n target: \"_blank\" | \"_self\" | \"_parent\" | \"_top\" = \"_self\";\n\n /**\n * Location state object.\n */\n state = {};\n\n get pathname(): string {\n return new URL(this.href, location.href).pathname;\n }\n\n protected _handleClick(e: MouseEvent): void {\n const { state, type, href, pathname, suppress } = this;\n if (!href) {\n return;\n }\n this.dispatchCustomEvent(\"navigate\", {\n ...this.observedRecord,\n pathname,\n state,\n });\n if (href.startsWith(\"#\") || type === linkTypes.normal) {\n return;\n }\n this.handleState();\n const routers = [...Router.routerInstances];\n if (\n // only runs when suppress is false\n !suppress &&\n (type !== linkTypes.auto ||\n // in auto mode, only update the routers if the current pathname is registered\n routers.some((i) => i.search(location.pathname)))\n ) {\n e.preventDefault();\n Router.routerInstances.forEach((i) => {\n i.handlePopstate();\n });\n }\n }\n\n handleState: () => void = () => {\n switch (this.type) {\n case linkTypes.auto:\n case linkTypes.push:\n if (!this.replace) {\n // type is auto or push and replace is false\n history.pushState(this.state, \"\", this.href);\n break;\n }\n // fallthrough to replace\n case linkTypes.replace:\n history.replaceState(this.state, \"\", this.href);\n break;\n }\n };\n\n protected render(): TemplateResult<1> {\n return html`\n <a\n part=\"root\"\n ${attr(this.observedRecord)}\n href=\"${this.href || nothing}\"\n target=\"${this.target}\"\n @click=${this._handleClick}\n >\n ${htmlSlot()}\n </a>\n `;\n }\n}\n\nexport default Link;\nexport { Link };\n"],"version":3,"file":"component.d.ts"}
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import{godown,styles,attr,htmlSlot}from"@godown/element";import{property}from"lit/decorators.js";import Router from"../router/component.js";import{css,nothing,html}from"lit";import{GlobalStyle}from"../../internal/global-style.js";import _decorate from"@oxc-project/runtime/helpers/decorate";import"sharekit";import"../../internal/reset-style.js";const protoName=`link`,linkTypes={push:`push`,replace:`replace`,normal:`normal`,auto:`auto`};let Link=class e extends GlobalStyle{constructor(...e){super(...e),this.type=linkTypes.auto,this.suppress=!1,this.replace=!1,this.target=`_self`,this.state={},this.handleState=()=>{switch(this.type){case linkTypes.auto:case linkTypes.push:if(!this.replace){history.pushState(this.state,``,this.href);break}case linkTypes.replace:history.replaceState(this.state,``,this.href);break}}}get pathname(){return new URL(this.href,location.href).pathname}_handleClick(e){let{state:l,type:u,href:d,pathname:f,suppress:p}=this;if(!d||(this.dispatchCustomEvent(`navigate`,{...this.observedRecord,pathname:f,state:l}),d.startsWith(`#`)||u===linkTypes.normal))return;this.handleState();let m=[...Router.routerInstances];!p&&(u!==linkTypes.auto||m.some(e=>e.search(location.pathname)))&&(e.preventDefault(),Router.routerInstances.forEach(e=>{e.handlePopstate()}))}render(){return html`<a part="root" ${attr(this.observedRecord)} href="${this.href||nothing}" target="${this.target}" @click=${this._handleClick}> ${htmlSlot()} </a>`}};_decorate([property()],Link.prototype,`type`,void 0),_decorate([property({type:Boolean})],Link.prototype,`suppress`,void 0),_decorate([property({type:Boolean})],Link.prototype,`replace`,void 0),_decorate([property()],Link.prototype,`href`,void 0),_decorate([property()],Link.prototype,`target`,void 0),Link=_decorate([godown(protoName),styles(css`:host{display:inline-block;cursor:default}:host([href]){cursor:pointer}a{display:contents}
|
2
|
+
`)],Link);var Link$1=Link;export{Link,Link$1 as default};
|
3
|
+
//# sourceMappingURL=component.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../src/web-components/link/component.ts"],"sourcesContent":["import { attr, godown, htmlSlot, styles } from \"@godown/element\";\nimport { property } from \"lit/decorators.js\";\n\nimport Router from \"../router/component.js\";\nimport { css, html, nothing, type TemplateResult } from \"lit\";\nimport GlobalStyle from \"../../internal/global-style.js\";\n\nconst protoName = \"link\";\n\nconst linkTypes = {\n push: \"push\",\n replace: \"replace\",\n normal: \"normal\",\n auto: \"auto\",\n} as const;\n\ntype LinkType = keyof typeof linkTypes;\n\n/**\n * {@linkcode Link} is used for link jumping, works standalone or in {@linkcode Router}.\n *\n * Set `type` to `\"normal\"`,\n * behave like a normal anchor.\n *\n * Set `type` to `\"push\" `or `\"replace\"`,\n * update history state by `history.pushState` or `history.replaceState`,\n * update all routers whether current pathname is registered or not.\n *\n * Set `type` to `\"auto\"`,\n * only update the routers if the current pathname is registered,\n * if not registered, behave like `\"normal\"`.\n *\n * `replace` property will enforce `history.replaceState`.\n *\n * @fires navigate - Fires when the link is clicked.\n * @category navigation\n */\n@godown(protoName)\n@styles(css`\n :host {\n display: inline-block;\n cursor: default;\n }\n\n :host([href]) {\n cursor: pointer;\n }\n\n a {\n display: contents;\n }\n`)\nclass Link extends GlobalStyle {\n /**\n * If `\"normal\"`, behave like a normal anchor.\n *\n * If `\"auto\"` or `\"push\"`, call `history.pushState` if `replace` is false,\n *\n * If `\"replace\"`, call `history.replaceState`.\n */\n @property()\n type: LinkType = linkTypes.auto;\n\n /**\n * If `true`, the {@linkcode Router} will not be updated.\n */\n @property({ type: Boolean })\n suppress = false;\n\n /**\n * Use `replaceState` instead of `pushState`.\n */\n @property({ type: Boolean })\n replace = false;\n\n /**\n * A element href.\n */\n @property()\n href: string;\n\n /**\n * A element target.\n */\n @property()\n target: \"_blank\" | \"_self\" | \"_parent\" | \"_top\" = \"_self\";\n\n /**\n * Location state object.\n */\n state = {};\n\n get pathname(): string {\n return new URL(this.href, location.href).pathname;\n }\n\n protected _handleClick(e: MouseEvent): void {\n const { state, type, href, pathname, suppress } = this;\n if (!href) {\n return;\n }\n this.dispatchCustomEvent(\"navigate\", {\n ...this.observedRecord,\n pathname,\n state,\n });\n if (href.startsWith(\"#\") || type === linkTypes.normal) {\n return;\n }\n this.handleState();\n const routers = [...Router.routerInstances];\n if (\n // only runs when suppress is false\n !suppress &&\n (type !== linkTypes.auto ||\n // in auto mode, only update the routers if the current pathname is registered\n routers.some((i) => i.search(location.pathname)))\n ) {\n e.preventDefault();\n Router.routerInstances.forEach((i) => {\n i.handlePopstate();\n });\n }\n }\n\n handleState: () => void = () => {\n switch (this.type) {\n case linkTypes.auto:\n case linkTypes.push:\n if (!this.replace) {\n // type is auto or push and replace is false\n history.pushState(this.state, \"\", this.href);\n break;\n }\n // fallthrough to replace\n case linkTypes.replace:\n history.replaceState(this.state, \"\", this.href);\n break;\n }\n };\n\n protected render(): TemplateResult<1> {\n return html`\n <a\n part=\"root\"\n ${attr(this.observedRecord)}\n href=\"${this.href || nothing}\"\n target=\"${this.target}\"\n @click=${this._handleClick}\n >\n ${htmlSlot()}\n </a>\n `;\n }\n}\n\nexport default Link;\nexport { Link };\n"],"names":["Link","e: MouseEvent","href","type","routers","suppress","i"],"mappings":"0VAOA,MAAM,UAAY,OAEZ,UAAY,CAChB,KAAM,OACN,QAAS,UACT,OAAQ,SACR,KAAM,MACP,EAuBD,IAAA,KAAA,MAeMA,UAAa,WAAY,+BAS7B,KAAA,KAAiB,UAAU,UAM3B,SAAW,QAMX,QAAU,QAYV,OAAkD,QAKlD,KAAA,MAAQ,CAAE,EAmCV,KAAA,YAA0B,IAAM,CAC9B,OAAQ,KAAK,KAAb,CACE,KAAK,UAAU,KACf,KAAK,UAAU,KACb,GAAI,CAAC,KAAK,QAAS,CAEjB,QAAQ,UAAU,KAAK,MAAO,GAAI,KAAK,KAAK,CAC5C,KACD,CAEH,KAAK,UAAU,QACb,QAAQ,aAAa,KAAK,MAAO,GAAI,KAAK,KAAK,CAC/C,KACH,CACF,EA/CD,IAAI,UAAmB,CACrB,OAAO,IAAI,IAAI,KAAK,KAAM,SAAS,MAAM,QAC1C,CAES,aAAaC,EAAqB,CAC1C,GAAM,CAAE,QAAO,OAAM,OAAM,WAAU,WAAU,CAAG,KASlD,GARI,CAACC,IAGL,KAAK,oBAAoB,WAAY,CACnC,GAAG,KAAK,eACR,WACA,OACD,EAAC,CACEA,EAAK,WAAW,IAAI,EAAIC,IAAS,UAAU,QAC7C,OAEF,KAAK,aAAa,CAClB,IAAMC,EAAU,CAAC,GAAG,OAAO,eAAgB,EAGzC,CAACC,IACAF,IAAS,UAAU,MAElBC,EAAQ,KAAK,AAACE,GAAMA,EAAE,OAAO,SAAS,SAAS,CAAC,IAElD,EAAE,gBAAgB,CAClB,OAAO,gBAAgB,QAAQ,AAACA,GAAM,CACpCA,EAAE,gBAAgB,AACnB,EAAC,CAEL,CAkBS,QAA4B,CACpC,MAAO,KAAI,CAAA,eAGP,EAAE,KAAK,KAAK,eAAe,CAAA,OACrB,EAAE,KAAK,MAAQ,QAAQ,UACrB,EAAE,KAAK,OAAO,SACf,EAAE,KAAK,aAAA,EAEd,EAAE,UAAU,CAAA,KAEhB,CAAC,AACF,CACF,aA9FE,UAAU,AAAA,EAAA,KAAA,UAAA,OAAA,OAAA,YAMV,SAAS,CAAE,KAAM,OAAS,EAAC,AAAA,EAAA,KAAA,UAAA,WAAA,OAAA,YAM3B,SAAS,CAAE,KAAM,OAAS,EAAC,AAAA,EAAA,KAAA,UAAA,UAAA,OAAA,YAM3B,UAAU,AAAA,EAAA,KAAA,UAAA,OAAA,OAAA,YAMV,UAAU,AAAA,EAAA,KAAA,UAAA,SAAA,OAAA,CA/CZ,KAAA,UAAA,CAAA,OAAO,UAAU,CACjB,OAAO,GAAG,CAAC;AAaZ,CAAC,CAAC,AAAA,EAAA,KAAA,CAyGF,IAAA,OAAe"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"mappings":"AAAA,OAAO,UAAU,gBAAiB;AAIlC,eAAe;eAEA;WACH,sBAAsB;EAC9B,eAAe;CAChB;AACF","names":[],"sources":["../../../../src/web-components/link/definition.ts"],"sourcesContent":["import Link from \"./component.js\";\n\nLink.define();\n\nexport default Link;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"godown-link\": Link;\n }\n}\n"],"version":3,"file":"definition.d.ts"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import Link from"./component.js";import"@godown/element";import"lit/decorators.js";import"../router/component.js";import"lit";import"sharekit";import"../../internal/global-style.js";import"../../internal/reset-style.js";import"@oxc-project/runtime/helpers/decorate";Link.define();export{Link as default};
|
2
|
+
//# sourceMappingURL=definition.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"definition.js","sources":["../../../src/web-components/link/definition.ts"],"sourcesContent":["import Link from \"./component.js\";\n\nLink.define();\n\nexport default Link;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"godown-link\": Link;\n }\n}\n"],"names":[],"mappings":"0QAEA,KAAK,QAAQ"}
|