godown 3.0.0-canary.0 → 3.0.0-canary.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -8
- package/components/alert.d.ts +5 -3
- package/components/alert.d.ts.map +1 -1
- package/components/alert.js +24 -14
- package/components/alert.js.map +1 -1
- package/components/avatar.d.ts +5 -1
- package/components/avatar.d.ts.map +1 -1
- package/components/avatar.js +7 -3
- package/components/avatar.js.map +1 -1
- package/components/breath.d.ts +2 -1
- package/components/breath.d.ts.map +1 -1
- package/components/breath.js +5 -4
- package/components/breath.js.map +1 -1
- package/components/button.d.ts +16 -9
- package/components/button.d.ts.map +1 -1
- package/components/button.js +22 -20
- package/components/button.js.map +1 -1
- package/components/card.d.ts +1 -2
- package/components/card.d.ts.map +1 -1
- package/components/card.js +5 -11
- package/components/card.js.map +1 -1
- package/components/carousel.d.ts +6 -5
- package/components/carousel.d.ts.map +1 -1
- package/components/carousel.js +3 -2
- package/components/carousel.js.map +1 -1
- package/components/details.d.ts +5 -2
- package/components/details.d.ts.map +1 -1
- package/components/details.js +5 -2
- package/components/details.js.map +1 -1
- package/components/dialog.d.ts +8 -4
- package/components/dialog.d.ts.map +1 -1
- package/components/dialog.js +17 -12
- package/components/dialog.js.map +1 -1
- package/components/divider.d.ts +1 -1
- package/components/divider.js +1 -1
- package/components/divider.js.map +1 -1
- package/components/dragbox.d.ts +7 -7
- package/components/dragbox.d.ts.map +1 -1
- package/components/dragbox.js +1 -1
- package/components/dragbox.js.map +1 -1
- package/components/flex.d.ts +2 -1
- package/components/flex.d.ts.map +1 -1
- package/components/flex.js +8 -0
- package/components/flex.js.map +1 -1
- package/components/form.d.ts +0 -2
- package/components/form.d.ts.map +1 -1
- package/components/form.js +0 -2
- package/components/form.js.map +1 -1
- package/components/grid.d.ts +8 -3
- package/components/grid.d.ts.map +1 -1
- package/components/grid.js +1 -0
- package/components/grid.js.map +1 -1
- package/components/input.d.ts +2 -3
- package/components/input.d.ts.map +1 -1
- package/components/input.js +3 -6
- package/components/input.js.map +1 -1
- package/components/layout.d.ts +3 -6
- package/components/layout.d.ts.map +1 -1
- package/components/layout.js +21 -10
- package/components/layout.js.map +1 -1
- package/components/link.d.ts +3 -1
- package/components/link.d.ts.map +1 -1
- package/components/link.js +3 -1
- package/components/link.js.map +1 -1
- package/components/progress.d.ts +2 -11
- package/components/progress.d.ts.map +1 -1
- package/components/progress.js +6 -15
- package/components/progress.js.map +1 -1
- package/components/range.d.ts +43 -17
- package/components/range.d.ts.map +1 -1
- package/components/range.js +132 -58
- package/components/range.js.map +1 -1
- package/components/rotate.d.ts +1 -1
- package/components/rotate.d.ts.map +1 -1
- package/components/rotate.js +1 -1
- package/components/rotate.js.map +1 -1
- package/components/router.d.ts +6 -8
- package/components/router.d.ts.map +1 -1
- package/components/router.js +10 -10
- package/components/router.js.map +1 -1
- package/components/select.d.ts +4 -8
- package/components/select.d.ts.map +1 -1
- package/components/select.js +42 -41
- package/components/select.js.map +1 -1
- package/components/skeleton.d.ts.map +1 -1
- package/components/skeleton.js +3 -4
- package/components/skeleton.js.map +1 -1
- package/components/split.d.ts +18 -1
- package/components/split.d.ts.map +1 -1
- package/components/split.js +52 -19
- package/components/split.js.map +1 -1
- package/components/switch.d.ts +4 -4
- package/components/switch.d.ts.map +1 -1
- package/components/switch.js +6 -6
- package/components/switch.js.map +1 -1
- package/components/text.js +3 -3
- package/components/text.js.map +1 -1
- package/components/time.d.ts +4 -20
- package/components/time.d.ts.map +1 -1
- package/components/time.js +5 -66
- package/components/time.js.map +1 -1
- package/components/tooltip.d.ts +11 -1
- package/components/tooltip.d.ts.map +1 -1
- package/components/tooltip.js +23 -5
- package/components/tooltip.js.map +1 -1
- package/components/typewriter.d.ts +2 -2
- package/components/typewriter.d.ts.map +1 -1
- package/components/typewriter.js +2 -2
- package/components/typewriter.js.map +1 -1
- package/core/global-style.d.ts.map +1 -1
- package/core/global-style.js +8 -1
- package/core/global-style.js.map +1 -1
- package/core/super-anchor.js +1 -1
- package/core/super-anchor.js.map +1 -1
- package/core/super-input.d.ts +2 -3
- package/core/super-input.d.ts.map +1 -1
- package/core/super-input.js +3 -6
- package/core/super-input.js.map +1 -1
- package/core/super-openable.js.map +1 -1
- package/custom-elements.json +1 -1
- package/dev/alert.d.ts +8 -0
- package/dev/alert.d.ts.map +1 -0
- package/dev/alert.js +4 -0
- package/dev/alert.js.map +1 -0
- package/dev/avatar.d.ts +8 -0
- package/dev/avatar.d.ts.map +1 -0
- package/dev/avatar.js +4 -0
- package/dev/avatar.js.map +1 -0
- package/dev/breath.d.ts +9 -0
- package/dev/breath.d.ts.map +1 -0
- package/dev/breath.js +5 -0
- package/dev/breath.js.map +1 -0
- package/dev/button.d.ts +8 -0
- package/dev/button.d.ts.map +1 -0
- package/dev/button.js +4 -0
- package/dev/button.js.map +1 -0
- package/dev/card.d.ts +8 -0
- package/dev/card.d.ts.map +1 -0
- package/dev/card.js +4 -0
- package/dev/card.js.map +1 -0
- package/dev/carousel.d.ts +8 -0
- package/dev/carousel.d.ts.map +1 -0
- package/dev/carousel.js +4 -0
- package/dev/carousel.js.map +1 -0
- package/dev/components/alert.d.ts +52 -0
- package/dev/components/alert.d.ts.map +1 -0
- package/dev/components/alert.js +245 -0
- package/dev/components/alert.js.map +1 -0
- package/dev/components/avatar.d.ts +30 -0
- package/dev/components/avatar.d.ts.map +1 -0
- package/dev/components/avatar.js +92 -0
- package/dev/components/avatar.js.map +1 -0
- package/dev/components/breath.d.ts +35 -0
- package/dev/components/breath.d.ts.map +1 -0
- package/dev/components/breath.js +135 -0
- package/dev/components/breath.js.map +1 -0
- package/dev/components/button.d.ts +52 -0
- package/dev/components/button.d.ts.map +1 -0
- package/dev/components/button.js +260 -0
- package/dev/components/button.js.map +1 -0
- package/dev/components/card.d.ts +19 -0
- package/dev/components/card.d.ts.map +1 -0
- package/dev/components/card.js +81 -0
- package/dev/components/card.js.map +1 -0
- package/dev/components/carousel.d.ts +41 -0
- package/dev/components/carousel.d.ts.map +1 -0
- package/dev/components/carousel.js +157 -0
- package/dev/components/carousel.js.map +1 -0
- package/dev/components/details.d.ts +23 -0
- package/dev/components/details.d.ts.map +1 -0
- package/dev/components/details.js +118 -0
- package/dev/components/details.js.map +1 -0
- package/dev/components/dialog.d.ts +37 -0
- package/dev/components/dialog.d.ts.map +1 -0
- package/dev/components/dialog.js +159 -0
- package/dev/components/dialog.js.map +1 -0
- package/dev/components/divider.d.ts +17 -0
- package/dev/components/divider.d.ts.map +1 -0
- package/dev/components/divider.js +46 -0
- package/dev/components/divider.js.map +1 -0
- package/dev/components/dragbox.d.ts +40 -0
- package/dev/components/dragbox.d.ts.map +1 -0
- package/dev/components/dragbox.js +117 -0
- package/dev/components/dragbox.js.map +1 -0
- package/dev/components/flex.d.ts +32 -0
- package/dev/components/flex.d.ts.map +1 -0
- package/dev/components/flex.js +60 -0
- package/dev/components/flex.js.map +1 -0
- package/dev/components/form.d.ts +22 -0
- package/dev/components/form.d.ts.map +1 -0
- package/dev/components/form.js +77 -0
- package/dev/components/form.js.map +1 -0
- package/dev/components/grid.d.ts +36 -0
- package/dev/components/grid.d.ts.map +1 -0
- package/dev/components/grid.js +54 -0
- package/dev/components/grid.js.map +1 -0
- package/dev/components/input.d.ts +19 -0
- package/dev/components/input.d.ts.map +1 -0
- package/dev/components/input.js +70 -0
- package/dev/components/input.js.map +1 -0
- package/dev/components/layout.d.ts +26 -0
- package/dev/components/layout.d.ts.map +1 -0
- package/dev/components/layout.js +82 -0
- package/dev/components/layout.js.map +1 -0
- package/dev/components/link.d.ts +22 -0
- package/dev/components/link.d.ts.map +1 -0
- package/dev/components/link.js +42 -0
- package/dev/components/link.js.map +1 -0
- package/dev/components/progress.d.ts +21 -0
- package/dev/components/progress.d.ts.map +1 -0
- package/dev/components/progress.js +99 -0
- package/dev/components/progress.js.map +1 -0
- package/dev/components/range.d.ts +86 -0
- package/dev/components/range.d.ts.map +1 -0
- package/dev/components/range.js +364 -0
- package/dev/components/range.js.map +1 -0
- package/dev/components/rotate.d.ts +26 -0
- package/dev/components/rotate.d.ts.map +1 -0
- package/dev/components/rotate.js +86 -0
- package/dev/components/rotate.js.map +1 -0
- package/dev/components/router.d.ts +119 -0
- package/dev/components/router.d.ts.map +1 -0
- package/dev/components/router.js +248 -0
- package/dev/components/router.js.map +1 -0
- package/dev/components/select.d.ts +46 -0
- package/dev/components/select.d.ts.map +1 -0
- package/dev/components/select.js +245 -0
- package/dev/components/select.js.map +1 -0
- package/dev/components/skeleton.d.ts +26 -0
- package/dev/components/skeleton.d.ts.map +1 -0
- package/dev/components/skeleton.js +118 -0
- package/dev/components/skeleton.js.map +1 -0
- package/dev/components/split.d.ts +49 -0
- package/dev/components/split.d.ts.map +1 -0
- package/dev/components/split.js +206 -0
- package/dev/components/split.js.map +1 -0
- package/dev/components/switch.d.ts +39 -0
- package/dev/components/switch.d.ts.map +1 -0
- package/dev/components/switch.js +182 -0
- package/dev/components/switch.js.map +1 -0
- package/dev/components/text.d.ts +19 -0
- package/dev/components/text.d.ts.map +1 -0
- package/dev/components/text.js +93 -0
- package/dev/components/text.js.map +1 -0
- package/dev/components/time.d.ts +37 -0
- package/dev/components/time.d.ts.map +1 -0
- package/dev/components/time.js +75 -0
- package/dev/components/time.js.map +1 -0
- package/dev/components/tooltip.d.ts +48 -0
- package/dev/components/tooltip.d.ts.map +1 -0
- package/dev/components/tooltip.js +137 -0
- package/dev/components/tooltip.js.map +1 -0
- package/dev/components/typewriter.d.ts +55 -0
- package/dev/components/typewriter.d.ts.map +1 -0
- package/dev/components/typewriter.js +155 -0
- package/dev/components/typewriter.js.map +1 -0
- package/dev/core/global-style.d.ts +21 -0
- package/dev/core/global-style.d.ts.map +1 -0
- package/dev/core/global-style.js +76 -0
- package/dev/core/global-style.js.map +1 -0
- package/dev/core/super-anchor.d.ts +15 -0
- package/dev/core/super-anchor.d.ts.map +1 -0
- package/dev/core/super-anchor.js +58 -0
- package/dev/core/super-anchor.js.map +1 -0
- package/dev/core/super-input.d.ts +38 -0
- package/dev/core/super-input.d.ts.map +1 -0
- package/dev/core/super-input.js +182 -0
- package/dev/core/super-input.js.map +1 -0
- package/dev/core/super-openable.d.ts +19 -0
- package/dev/core/super-openable.d.ts.map +1 -0
- package/dev/core/super-openable.js +36 -0
- package/dev/core/super-openable.js.map +1 -0
- package/dev/details.d.ts +8 -0
- package/dev/details.d.ts.map +1 -0
- package/dev/details.js +4 -0
- package/dev/details.js.map +1 -0
- package/dev/dialog.d.ts +8 -0
- package/dev/dialog.d.ts.map +1 -0
- package/dev/dialog.js +4 -0
- package/dev/dialog.js.map +1 -0
- package/dev/divider.d.ts +8 -0
- package/dev/divider.d.ts.map +1 -0
- package/dev/divider.js +4 -0
- package/dev/divider.js.map +1 -0
- package/dev/dragbox.d.ts +8 -0
- package/dev/dragbox.d.ts.map +1 -0
- package/dev/dragbox.js +4 -0
- package/dev/dragbox.js.map +1 -0
- package/dev/flex.d.ts +8 -0
- package/dev/flex.d.ts.map +1 -0
- package/dev/flex.js +4 -0
- package/dev/flex.js.map +1 -0
- package/dev/form.d.ts +8 -0
- package/dev/form.d.ts.map +1 -0
- package/dev/form.js +4 -0
- package/dev/form.js.map +1 -0
- package/dev/grid.d.ts +8 -0
- package/dev/grid.d.ts.map +1 -0
- package/dev/grid.js +4 -0
- package/dev/grid.js.map +1 -0
- package/dev/index.d.ts +29 -0
- package/dev/index.d.ts.map +1 -0
- package/dev/index.js +29 -0
- package/dev/index.js.map +1 -0
- package/dev/input.d.ts +9 -0
- package/dev/input.d.ts.map +1 -0
- package/dev/input.js +5 -0
- package/dev/input.js.map +1 -0
- package/dev/layout.d.ts +9 -0
- package/dev/layout.d.ts.map +1 -0
- package/dev/layout.js +5 -0
- package/dev/layout.js.map +1 -0
- package/dev/link.d.ts +9 -0
- package/dev/link.d.ts.map +1 -0
- package/dev/link.js +5 -0
- package/dev/link.js.map +1 -0
- package/dev/progress.d.ts +9 -0
- package/dev/progress.d.ts.map +1 -0
- package/dev/progress.js +5 -0
- package/dev/progress.js.map +1 -0
- package/dev/range.d.ts +9 -0
- package/dev/range.d.ts.map +1 -0
- package/dev/range.js +5 -0
- package/dev/range.js.map +1 -0
- package/dev/rotate.d.ts +9 -0
- package/dev/rotate.d.ts.map +1 -0
- package/dev/rotate.js +5 -0
- package/dev/rotate.js.map +1 -0
- package/dev/router.d.ts +9 -0
- package/dev/router.d.ts.map +1 -0
- package/dev/router.js +5 -0
- package/dev/router.js.map +1 -0
- package/dev/select.d.ts +9 -0
- package/dev/select.d.ts.map +1 -0
- package/dev/select.js +5 -0
- package/dev/select.js.map +1 -0
- package/dev/skeleton.d.ts +9 -0
- package/dev/skeleton.d.ts.map +1 -0
- package/dev/skeleton.js +5 -0
- package/dev/skeleton.js.map +1 -0
- package/dev/split.d.ts +9 -0
- package/dev/split.d.ts.map +1 -0
- package/dev/split.js +5 -0
- package/dev/split.js.map +1 -0
- package/dev/switch.d.ts +9 -0
- package/dev/switch.d.ts.map +1 -0
- package/dev/switch.js +5 -0
- package/dev/switch.js.map +1 -0
- package/dev/text.d.ts +9 -0
- package/dev/text.d.ts.map +1 -0
- package/dev/text.js +5 -0
- package/dev/text.js.map +1 -0
- package/dev/time.d.ts +9 -0
- package/dev/time.d.ts.map +1 -0
- package/dev/time.js +5 -0
- package/dev/time.js.map +1 -0
- package/dev/tooltip.d.ts +9 -0
- package/dev/tooltip.d.ts.map +1 -0
- package/dev/tooltip.js +5 -0
- package/dev/tooltip.js.map +1 -0
- package/dev/typewriter.d.ts +8 -0
- package/dev/typewriter.d.ts.map +1 -0
- package/dev/typewriter.js +4 -0
- package/dev/typewriter.js.map +1 -0
- package/index.js +13 -13
- package/package.json +10 -8
- package/range.d.ts +1 -1
- package/range.d.ts.map +1 -1
- package/src/alert.ts +11 -0
- package/src/avatar.ts +11 -0
- package/src/breath.ts +13 -0
- package/src/button.ts +11 -0
- package/src/card.ts +11 -0
- package/src/carousel.ts +11 -0
- package/src/components/alert.ts +282 -0
- package/src/components/avatar.ts +95 -0
- package/src/components/breath.ts +153 -0
- package/src/components/button.ts +286 -0
- package/src/components/card.ts +80 -0
- package/src/components/carousel.ts +169 -0
- package/src/components/details.ts +116 -0
- package/src/components/dialog.ts +165 -0
- package/src/components/divider.ts +44 -0
- package/src/components/dragbox.ts +127 -0
- package/src/components/flex.ts +70 -0
- package/src/components/form.ts +82 -0
- package/src/components/grid.ts +75 -0
- package/src/components/input.ts +72 -0
- package/src/components/layout.ts +82 -0
- package/src/components/link.ts +38 -0
- package/src/components/progress.ts +95 -0
- package/src/components/range.ts +404 -0
- package/src/components/rotate.ts +92 -0
- package/src/components/router.ts +273 -0
- package/src/components/select.ts +268 -0
- package/src/components/skeleton.ts +118 -0
- package/src/components/split.ts +221 -0
- package/src/components/switch.ts +180 -0
- package/src/components/text.ts +95 -0
- package/src/components/time.ts +81 -0
- package/src/components/tooltip.ts +138 -0
- package/src/components/typewriter.ts +154 -0
- package/src/core/global-style.ts +86 -0
- package/src/core/super-anchor.ts +52 -0
- package/src/core/super-input.ts +230 -0
- package/src/core/super-openable.ts +51 -0
- package/src/details.ts +11 -0
- package/src/dialog.ts +11 -0
- package/src/divider.ts +11 -0
- package/src/dragbox.ts +11 -0
- package/src/flex.ts +11 -0
- package/src/form.ts +11 -0
- package/src/grid.ts +11 -0
- package/src/index.ts +28 -0
- package/src/input.ts +13 -0
- package/src/layout.ts +12 -0
- package/src/link.ts +13 -0
- package/src/progress.ts +12 -0
- package/src/range.ts +13 -0
- package/src/rotate.ts +13 -0
- package/src/router.ts +12 -0
- package/src/select.ts +13 -0
- package/src/skeleton.ts +13 -0
- package/src/split.ts +13 -0
- package/src/switch.ts +13 -0
- package/src/text.ts +13 -0
- package/src/time.ts +13 -0
- package/src/tooltip.ts +13 -0
- package/src/typewriter.ts +11 -0
- package/vscode.html-custom-data.json +1 -1
- package/web-types.json +1 -1
@@ -0,0 +1,22 @@
|
|
1
|
+
import SuperAnchor from "../core/super-anchor.js";
|
2
|
+
/**
|
3
|
+
* {@linkcode Link} is used for link jumping.
|
4
|
+
*
|
5
|
+
* Set `type` to `"push" `or `"replace"`,
|
6
|
+
* will invoke the history api and trigger the {@linkcode Router.updateAll}.
|
7
|
+
*
|
8
|
+
* @category navigation
|
9
|
+
*/
|
10
|
+
declare class Link extends SuperAnchor {
|
11
|
+
/**
|
12
|
+
* If "push", call `history.pushState`.
|
13
|
+
*
|
14
|
+
* If "replace", call `history.replaceState`.
|
15
|
+
*
|
16
|
+
* If "normal", behave like a normal anchor.
|
17
|
+
*/
|
18
|
+
type: "push" | "replace" | "normal";
|
19
|
+
protected _handleClick(e: MouseEvent): void;
|
20
|
+
}
|
21
|
+
export default Link;
|
22
|
+
//# sourceMappingURL=link.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../src/components/link.ts"],"names":[],"mappings":"AAGA,OAAO,WAAW,MAAM,yBAAyB,CAAC;AAKlD;;;;;;;GAOG;AACH,cACM,IAAK,SAAQ,WAAW;IAC5B;;;;;;OAMG;IAEH,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAY;IAE/C,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,UAAU;CAOrC;AAED,eAAe,IAAI,CAAC"}
|
@@ -0,0 +1,42 @@
|
|
1
|
+
import { __decorate } from "tslib";
|
2
|
+
import { godown } from "@godown/element/decorators/godown.js";
|
3
|
+
import { property } from "lit/decorators.js";
|
4
|
+
import SuperAnchor from "../core/super-anchor.js";
|
5
|
+
import Router from "./router.js";
|
6
|
+
const protoName = "link";
|
7
|
+
/**
|
8
|
+
* {@linkcode Link} is used for link jumping.
|
9
|
+
*
|
10
|
+
* Set `type` to `"push" `or `"replace"`,
|
11
|
+
* will invoke the history api and trigger the {@linkcode Router.updateAll}.
|
12
|
+
*
|
13
|
+
* @category navigation
|
14
|
+
*/
|
15
|
+
let Link = class Link extends SuperAnchor {
|
16
|
+
constructor() {
|
17
|
+
super(...arguments);
|
18
|
+
/**
|
19
|
+
* If "push", call `history.pushState`.
|
20
|
+
*
|
21
|
+
* If "replace", call `history.replaceState`.
|
22
|
+
*
|
23
|
+
* If "normal", behave like a normal anchor.
|
24
|
+
*/
|
25
|
+
this.type = "normal";
|
26
|
+
}
|
27
|
+
_handleClick(e) {
|
28
|
+
if (this.type === "push" || this.type === "replace") {
|
29
|
+
e.preventDefault();
|
30
|
+
(history[`${this.type}State`])(null, "", this.href);
|
31
|
+
Router.updateAll();
|
32
|
+
}
|
33
|
+
}
|
34
|
+
};
|
35
|
+
__decorate([
|
36
|
+
property()
|
37
|
+
], Link.prototype, "type", void 0);
|
38
|
+
Link = __decorate([
|
39
|
+
godown(protoName)
|
40
|
+
], Link);
|
41
|
+
export default Link;
|
42
|
+
//# sourceMappingURL=link.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"link.js","sourceRoot":"","sources":["../../src/components/link.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sCAAsC,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,WAAW,MAAM,yBAAyB,CAAC;AAClD,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,MAAM,SAAS,GAAG,MAAM,CAAC;AAEzB;;;;;;;GAOG;AAEH,IAAM,IAAI,GAAV,MAAM,IAAK,SAAQ,WAAW;IAA9B;;QACE;;;;;;WAMG;QAEH,SAAI,GAAkC,QAAQ,CAAC;IASjD,CAAC;IAPW,YAAY,CAAC,CAAa;QAClC,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YACpD,CAAC,CAAC,cAAc,EAAE,CAAC;YACnB,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;YACpD,MAAM,CAAC,SAAS,EAAE,CAAC;QACrB,CAAC;IACH,CAAC;CACF,CAAA;AATC;IADC,QAAQ,EAAE;kCACoC;AAT3C,IAAI;IADT,MAAM,CAAC,SAAS,CAAC;GACZ,IAAI,CAkBT;AAED,eAAe,IAAI,CAAC"}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { GlobalStyle } from "../core/global-style.js";
|
2
|
+
/**
|
3
|
+
* {@linkcode Progress} similar to `<progress>`.
|
4
|
+
*
|
5
|
+
* @category feedback
|
6
|
+
*/
|
7
|
+
declare class Progress extends GlobalStyle {
|
8
|
+
max: number;
|
9
|
+
min: number;
|
10
|
+
value: number;
|
11
|
+
protected render(): import("lit").TemplateResult<1>;
|
12
|
+
/**
|
13
|
+
* Convert s to a percentage without a percent sign.
|
14
|
+
*
|
15
|
+
* @param s String or number to convert.
|
16
|
+
* @returns Percentage without a percent sign.
|
17
|
+
*/
|
18
|
+
parsePercent(s?: string | number): number;
|
19
|
+
}
|
20
|
+
export default Progress;
|
21
|
+
//# sourceMappingURL=progress.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../src/components/progress.ts"],"names":[],"mappings":"AAMA,OAAO,EAAiB,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAIrE;;;;GAIG;AACH,cA2CM,QAAS,SAAQ,WAAW;IAEhC,GAAG,SAAK;IAGR,GAAG,SAAK;IAGR,KAAK,EAAE,MAAM,CAAC;IAEd,SAAS,CAAC,MAAM;IAYhB;;;;;OAKG;IACH,YAAY,CAAC,CAAC,GAAE,MAAM,GAAG,MAAY,GAAG,MAAM;CAM/C;AAED,eAAe,QAAQ,CAAC"}
|
@@ -0,0 +1,99 @@
|
|
1
|
+
import { __decorate } from "tslib";
|
2
|
+
import { godown } from "@godown/element/decorators/godown.js";
|
3
|
+
import { styles } from "@godown/element/decorators/styles.js";
|
4
|
+
import { isNil } from "@godown/element/tools/lib.js";
|
5
|
+
import { css, html } from "lit";
|
6
|
+
import { property } from "lit/decorators.js";
|
7
|
+
import { cssGlobalVars, GlobalStyle } from "../core/global-style.js";
|
8
|
+
const protoName = "progress";
|
9
|
+
/**
|
10
|
+
* {@linkcode Progress} similar to `<progress>`.
|
11
|
+
*
|
12
|
+
* @category feedback
|
13
|
+
*/
|
14
|
+
let Progress = class Progress extends GlobalStyle {
|
15
|
+
constructor() {
|
16
|
+
super(...arguments);
|
17
|
+
this.max = 1;
|
18
|
+
this.min = 0;
|
19
|
+
}
|
20
|
+
render() {
|
21
|
+
let width = 20;
|
22
|
+
let className;
|
23
|
+
if (!isNil(this.value)) {
|
24
|
+
width = this.parsePercent(this.value);
|
25
|
+
className = "static";
|
26
|
+
}
|
27
|
+
return html `<div part="root" class="${className}">
|
28
|
+
<i part="value" style="width:${width}%;"></i>
|
29
|
+
</div>`;
|
30
|
+
}
|
31
|
+
/**
|
32
|
+
* Convert s to a percentage without a percent sign.
|
33
|
+
*
|
34
|
+
* @param s String or number to convert.
|
35
|
+
* @returns Percentage without a percent sign.
|
36
|
+
*/
|
37
|
+
parsePercent(s = "0") {
|
38
|
+
if (String(s).includes("%")) {
|
39
|
+
return parseFloat(String(s));
|
40
|
+
}
|
41
|
+
return (parseFloat(String(s)) / (this.max - this.min)) * 100;
|
42
|
+
}
|
43
|
+
};
|
44
|
+
__decorate([
|
45
|
+
property({ type: Number })
|
46
|
+
], Progress.prototype, "max", void 0);
|
47
|
+
__decorate([
|
48
|
+
property({ type: Number })
|
49
|
+
], Progress.prototype, "min", void 0);
|
50
|
+
__decorate([
|
51
|
+
property({ type: Number })
|
52
|
+
], Progress.prototype, "value", void 0);
|
53
|
+
Progress = __decorate([
|
54
|
+
godown(protoName),
|
55
|
+
styles(css `
|
56
|
+
:host {
|
57
|
+
width: 100%;
|
58
|
+
height: 0.5em;
|
59
|
+
display: inline-block;
|
60
|
+
border-radius: 0.25em;
|
61
|
+
background: var(${cssGlobalVars.passive});
|
62
|
+
color: var(${cssGlobalVars.active});
|
63
|
+
}
|
64
|
+
|
65
|
+
[part=root] {
|
66
|
+
height: inherit;
|
67
|
+
z-index: 1;
|
68
|
+
position: relative;
|
69
|
+
border-radius: inherit;
|
70
|
+
}
|
71
|
+
|
72
|
+
[part=value] {
|
73
|
+
position: absolute;
|
74
|
+
z-index: 2;
|
75
|
+
top: 0;
|
76
|
+
left: 0;
|
77
|
+
height: 100%;
|
78
|
+
border-radius: inherit;
|
79
|
+
transition: all 0.3s;
|
80
|
+
animation: progress 1.8s ease-in-out infinite alternate;
|
81
|
+
background: currentColor;
|
82
|
+
}
|
83
|
+
|
84
|
+
@keyframes progress {
|
85
|
+
from {
|
86
|
+
left: 0;
|
87
|
+
}
|
88
|
+
to {
|
89
|
+
left: 80%;
|
90
|
+
}
|
91
|
+
}
|
92
|
+
|
93
|
+
.static [part=value] {
|
94
|
+
animation: none;
|
95
|
+
}
|
96
|
+
`)
|
97
|
+
], Progress);
|
98
|
+
export default Progress;
|
99
|
+
//# sourceMappingURL=progress.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"progress.js","sourceRoot":"","sources":["../../src/components/progress.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sCAAsC,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,sCAAsC,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAErE,MAAM,SAAS,GAAG,UAAU,CAAC;AAE7B;;;;GAIG;AA4CH,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,WAAW;IAAlC;;QAEE,QAAG,GAAG,CAAC,CAAC;QAGR,QAAG,GAAG,CAAC,CAAC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} is similar to `<input type="range">`.
|
4
|
+
*
|
5
|
+
* Value accepts number, or array.
|
6
|
+
*
|
7
|
+
* Number has 1 handle, the array has the number of its elements and the minimum is 2.
|
8
|
+
*
|
9
|
+
* @category input
|
10
|
+
*/
|
11
|
+
declare class Range extends SuperInput {
|
12
|
+
/**
|
13
|
+
* Minimum value.
|
14
|
+
*/
|
15
|
+
min: number;
|
16
|
+
/**
|
17
|
+
* Maximum value.
|
18
|
+
*/
|
19
|
+
max: number;
|
20
|
+
/**
|
21
|
+
* Sliding step length.
|
22
|
+
*/
|
23
|
+
step: number;
|
24
|
+
/**
|
25
|
+
* Display vertically.
|
26
|
+
*/
|
27
|
+
vertical: boolean;
|
28
|
+
/**
|
29
|
+
* Value, or each of values, will render a handle.
|
30
|
+
*
|
31
|
+
* Accepts number or array of numbers.
|
32
|
+
*/
|
33
|
+
value: number | number[];
|
34
|
+
/**
|
35
|
+
* The default of `{@linkcode this.value}`.
|
36
|
+
*/
|
37
|
+
default: typeof this.value;
|
38
|
+
protected _root: HTMLElement;
|
39
|
+
protected _handles: NodeListOf<HTMLElement>;
|
40
|
+
lastFocus?: number;
|
41
|
+
/**
|
42
|
+
* Returns true when the second number is greater than the first number.
|
43
|
+
*/
|
44
|
+
get reverse(): boolean;
|
45
|
+
/**
|
46
|
+
* If value is array.
|
47
|
+
*/
|
48
|
+
get range(): boolean;
|
49
|
+
/**
|
50
|
+
* Return values in the form of an array.
|
51
|
+
*/
|
52
|
+
get rangeValue(): number[];
|
53
|
+
/**
|
54
|
+
* @param len Minimum result length.
|
55
|
+
* @param value Fill value.
|
56
|
+
* @returns Array with length of len.
|
57
|
+
*/
|
58
|
+
padValue(len: number, value?: number): number[];
|
59
|
+
protected render(): import("lit").TemplateResult<1>;
|
60
|
+
protected renderHandle(index: number): import("lit").TemplateResult<1>;
|
61
|
+
private _keydownEvent;
|
62
|
+
focusHandle(index: number): void;
|
63
|
+
blurHandle(): void;
|
64
|
+
protected createKeydownEvent(index: number): (e: KeyboardEvent) => void;
|
65
|
+
createMouseDown(index: number): (e: MouseEvent) => void;
|
66
|
+
protected _handleMousedownEnd(e: MouseEvent): void;
|
67
|
+
createSetValue(index: number): (numberOrModifier: number | ((value: number) => number)) => void;
|
68
|
+
setEnd(value: number): void;
|
69
|
+
/**
|
70
|
+
* Compute value from event.
|
71
|
+
*/
|
72
|
+
protected _computeValue(e: MouseEvent): number;
|
73
|
+
/**
|
74
|
+
* Ensure that the values do not exceed the range of max and min.
|
75
|
+
*/
|
76
|
+
protected normalizeValue(value: number): number;
|
77
|
+
protected _handleMousedownRoot(e: MouseEvent): void;
|
78
|
+
protected createMousedownListener(mouseMoveCallback: (arg0: number) => void): (e: MouseEvent) => void;
|
79
|
+
protected createMousemoveListener(callback: (arg0: number) => void): (e: MouseEvent) => void;
|
80
|
+
protected _connectedInit(): void;
|
81
|
+
reset(): void;
|
82
|
+
sort(): number | number[];
|
83
|
+
toSorted(): number | number[];
|
84
|
+
}
|
85
|
+
export default Range;
|
86
|
+
//# sourceMappingURL=range.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"range.d.ts","sourceRoot":"","sources":["../../src/components/range.ts"],"names":[],"mappings":"AAUA,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAKhD;;;;;;;;GAQG;AACH,cA2FM,KAAM,SAAQ,UAAU;IAC5B;;OAEG;IAEH,GAAG,SAAK;IAER;;OAEG;IAEH,GAAG,SAAO;IAEV;;OAEG;IAEH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IAEH,QAAQ,EAAE,OAAO,CAAC;IAElB;;;;OAIG;IAEH,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAEzB;;OAEG;IAEH,OAAO,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC;IAG3B,SAAS,CAAC,KAAK,EAAE,WAAW,CAAC;IAG7B,SAAS,CAAC,QAAQ,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC;IAG5C,SAAS,C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
import { godown } from "@godown/element/decorators/godown.js";
|
3
|
+
import { part } from "@godown/element/decorators/part.js";
|
4
|
+
import { styles } from "@godown/element/decorators/styles.js";
|
5
|
+
import { classList } from "@godown/element/directives/class-list.js";
|
6
|
+
import { joinProperties } from "@godown/element/tools/css.js";
|
7
|
+
import { isNil } from "@godown/element/tools/lib.js";
|
8
|
+
import { css, html } from "lit";
|
9
|
+
import { property, queryAll, state } from "lit/decorators.js";
|
10
|
+
import { cssGlobalVars, scopePrefix } from "../core/global-style.js";
|
11
|
+
import SuperInput from "../core/super-input.js";
|
12
|
+
const protoName = "range";
|
13
|
+
const cssScope = scopePrefix(protoName);
|
14
|
+
/**
|
15
|
+
* {@linkcode Range} is similar to `<input type="range">`.
|
16
|
+
*
|
17
|
+
* Value accepts number, or array.
|
18
|
+
*
|
19
|
+
* Number has 1 handle, the array has the number of its elements and the minimum is 2.
|
20
|
+
*
|
21
|
+
* @category input
|
22
|
+
*/
|
23
|
+
let Range = class Range extends SuperInput {
|
24
|
+
constructor() {
|
25
|
+
super(...arguments);
|
26
|
+
/**
|
27
|
+
* Minimum value.
|
28
|
+
*/
|
29
|
+
this.min = 0;
|
30
|
+
/**
|
31
|
+
* Maximum value.
|
32
|
+
*/
|
33
|
+
this.max = 100;
|
34
|
+
}
|
35
|
+
/**
|
36
|
+
* Returns true when the second number is greater than the first number.
|
37
|
+
*/
|
38
|
+
get reverse() {
|
39
|
+
return this.range ? this.value[0] > this.value[1] : false;
|
40
|
+
}
|
41
|
+
/**
|
42
|
+
* If value is array.
|
43
|
+
*/
|
44
|
+
get range() {
|
45
|
+
return Array.isArray(this.value);
|
46
|
+
}
|
47
|
+
/**
|
48
|
+
* Return values in the form of an array.
|
49
|
+
*/
|
50
|
+
get rangeValue() {
|
51
|
+
return (this.range ? this.value : [this.value]);
|
52
|
+
}
|
53
|
+
/**
|
54
|
+
* @param len Minimum result length.
|
55
|
+
* @param value Fill value.
|
56
|
+
* @returns Array with length of len.
|
57
|
+
*/
|
58
|
+
padValue(len, value = 0) {
|
59
|
+
const { rangeValue } = this;
|
60
|
+
const miss = len - rangeValue.length;
|
61
|
+
if (miss > 0) {
|
62
|
+
return new Array(miss).fill(value).concat(rangeValue);
|
63
|
+
}
|
64
|
+
return rangeValue;
|
65
|
+
}
|
66
|
+
render() {
|
67
|
+
const rangeValue = this.padValue(2);
|
68
|
+
const from = Math.min(...rangeValue);
|
69
|
+
const to = Math.max(...rangeValue);
|
70
|
+
const gap = this.max - this.min;
|
71
|
+
return html `<div
|
72
|
+
part="root"
|
73
|
+
class="${classList({
|
74
|
+
vertical: this.vertical,
|
75
|
+
range: this.range,
|
76
|
+
reverse: this.reverse,
|
77
|
+
})}"
|
78
|
+
@mousedown="${this.disabled ? null : this._handleMousedownRoot}"
|
79
|
+
style="${joinProperties({
|
80
|
+
"--from": `${((from - this.min) / gap) * 100}%`,
|
81
|
+
"--to": `${((to - this.min) / gap) * 100}%`,
|
82
|
+
...(this.range
|
83
|
+
? Object.fromEntries(rangeValue.map((value, index) => [
|
84
|
+
`--handle-${index}`,
|
85
|
+
`${((value - this.min) / gap) * 100}%`,
|
86
|
+
]))
|
87
|
+
: {}),
|
88
|
+
})}"><div part="track"></div>
|
89
|
+
${this.range
|
90
|
+
? this.value.map((_, index) => this.renderHandle(index))
|
91
|
+
: this.renderHandle(0)}
|
92
|
+
</div>`;
|
93
|
+
}
|
94
|
+
renderHandle(index) {
|
95
|
+
const { range } = this;
|
96
|
+
const end = !range || index === this.value.length - 1;
|
97
|
+
return html `<i
|
98
|
+
tabindex="0"
|
99
|
+
part="handle"
|
100
|
+
class="${classList({ "last-focus": this.lastFocus === index })}"
|
101
|
+
@mousedown="${this.disabled ? null : this.createMouseDown(index)}"
|
102
|
+
@focus="${this.disabled ? null : () => this.focusHandle(index)}"
|
103
|
+
@blur="${this.disabled ? null : this.blurHandle}"
|
104
|
+
style="--handle:var(--${
|
105
|
+
/* In single-handle mod or end, it is max value */
|
106
|
+
(!range && end) ? `to` : `handle-${index}`})"
|
107
|
+
></i>
|
108
|
+
`;
|
109
|
+
}
|
110
|
+
focusHandle(index) {
|
111
|
+
this.lastFocus = index;
|
112
|
+
const handleItem = this._handles.item(index);
|
113
|
+
handleItem?.focus();
|
114
|
+
if (!this._keydownEvent) {
|
115
|
+
this._keydownEvent = this.events.add(document, "keydown", this.createKeydownEvent(index));
|
116
|
+
}
|
117
|
+
}
|
118
|
+
blurHandle() {
|
119
|
+
this.lastFocus = undefined;
|
120
|
+
this._keydownEvent = this.events.remove(document, "keydown", this._keydownEvent);
|
121
|
+
}
|
122
|
+
createKeydownEvent(index) {
|
123
|
+
if (!this.range) {
|
124
|
+
index = 0;
|
125
|
+
}
|
126
|
+
return (e) => {
|
127
|
+
if (e.key === "ArrowLeft" || e.key === "ArrowDown") {
|
128
|
+
e.preventDefault();
|
129
|
+
this.createSetValue(index)(old => old - this.step);
|
130
|
+
}
|
131
|
+
else if (e.key === "ArrowRight" || e.key === "ArrowUp") {
|
132
|
+
e.preventDefault();
|
133
|
+
this.createSetValue(index)(old => old + this.step);
|
134
|
+
}
|
135
|
+
};
|
136
|
+
}
|
137
|
+
createMouseDown(index) {
|
138
|
+
return (e) => {
|
139
|
+
this.focusHandle(index);
|
140
|
+
this.createMousedownListener(this.createSetValue(index))(e);
|
141
|
+
};
|
142
|
+
}
|
143
|
+
_handleMousedownEnd(e) {
|
144
|
+
this.lastFocus = 0;
|
145
|
+
this.createMousedownListener(this.setEnd)(e);
|
146
|
+
this.focusHandle(0);
|
147
|
+
}
|
148
|
+
createSetValue(index) {
|
149
|
+
return (numberOrModifier) => {
|
150
|
+
const number = typeof numberOrModifier === "number"
|
151
|
+
? this.normalizeValue(numberOrModifier)
|
152
|
+
: numberOrModifier(this.rangeValue[index]);
|
153
|
+
let newValue = number;
|
154
|
+
if (this.range) {
|
155
|
+
newValue = [...this.rangeValue];
|
156
|
+
newValue[index] = number;
|
157
|
+
}
|
158
|
+
this.value = newValue;
|
159
|
+
};
|
160
|
+
}
|
161
|
+
setEnd(value) {
|
162
|
+
this.createSetValue(this.value?.length - 1 || 0)(value);
|
163
|
+
}
|
164
|
+
/**
|
165
|
+
* Compute value from event.
|
166
|
+
*/
|
167
|
+
_computeValue(e) {
|
168
|
+
const rect = this._root.getBoundingClientRect();
|
169
|
+
const div = this.vertical ? (e.clientY - rect.top) / rect.height : (e.clientX - rect.left) / rect.width;
|
170
|
+
const value = Math.round((div * (this.max - this.min)) / this.step) * this.step;
|
171
|
+
return this.normalizeValue(value);
|
172
|
+
}
|
173
|
+
/**
|
174
|
+
* Ensure that the values do not exceed the range of max and min.
|
175
|
+
*/
|
176
|
+
normalizeValue(value) {
|
177
|
+
if (value > this.max) {
|
178
|
+
value -= this.step;
|
179
|
+
}
|
180
|
+
else if (value < this.min) {
|
181
|
+
value += this.step;
|
182
|
+
}
|
183
|
+
return value;
|
184
|
+
}
|
185
|
+
_handleMousedownRoot(e) {
|
186
|
+
const value = this._computeValue(e);
|
187
|
+
const index = this.range
|
188
|
+
? this.rangeValue.reduce((acc, item, index) => {
|
189
|
+
const diff = Math.abs(value - item);
|
190
|
+
const prevDiff = Math.abs(value - this.rangeValue[acc]);
|
191
|
+
return diff < prevDiff ? index : acc;
|
192
|
+
}, 0)
|
193
|
+
: 0;
|
194
|
+
const set = this.createSetValue(index);
|
195
|
+
set(value);
|
196
|
+
this.createMousedownListener(set)(e);
|
197
|
+
this.focusHandle(index);
|
198
|
+
}
|
199
|
+
createMousedownListener(mouseMoveCallback) {
|
200
|
+
return (e) => {
|
201
|
+
e.preventDefault();
|
202
|
+
e.stopPropagation();
|
203
|
+
const move = this.createMousemoveListener(mouseMoveCallback);
|
204
|
+
this.events.add(document, "mousemove", move);
|
205
|
+
const stop = () => {
|
206
|
+
this.events.remove(document, "mousemove", move);
|
207
|
+
this.events.remove(document, "mouseup", stop);
|
208
|
+
};
|
209
|
+
this.events.add(document, "mouseup", stop);
|
210
|
+
};
|
211
|
+
}
|
212
|
+
createMousemoveListener(callback) {
|
213
|
+
return (e) => {
|
214
|
+
const value = this._computeValue(e);
|
215
|
+
if (value > this.max || value < this.min) {
|
216
|
+
return;
|
217
|
+
}
|
218
|
+
callback?.call(this, value);
|
219
|
+
};
|
220
|
+
}
|
221
|
+
_connectedInit() {
|
222
|
+
const gap = this.max - this.min;
|
223
|
+
this.step ||= gap / 100;
|
224
|
+
if (isNil(this.value)) {
|
225
|
+
if (!isNil(this.default)) {
|
226
|
+
this.value = this.default;
|
227
|
+
}
|
228
|
+
else {
|
229
|
+
this.value = Math.round(gap / 2 / this.step) * this.step;
|
230
|
+
}
|
231
|
+
}
|
232
|
+
this.default ??= this.value;
|
233
|
+
}
|
234
|
+
reset() {
|
235
|
+
this.value = this.default;
|
236
|
+
}
|
237
|
+
sort() {
|
238
|
+
return this.value = this.toSorted();
|
239
|
+
}
|
240
|
+
toSorted() {
|
241
|
+
if (this.range) {
|
242
|
+
return [...this.value].sort((a, b) => a - b);
|
243
|
+
}
|
244
|
+
return this.value;
|
245
|
+
}
|
246
|
+
};
|
247
|
+
__decorate([
|
248
|
+
property({ type: Number })
|
249
|
+
], Range.prototype, "min", void 0);
|
250
|
+
__decorate([
|
251
|
+
property({ type: Number })
|
252
|
+
], Range.prototype, "max", void 0);
|
253
|
+
__decorate([
|
254
|
+
property({ type: Number })
|
255
|
+
], Range.prototype, "step", void 0);
|
256
|
+
__decorate([
|
257
|
+
property({ type: Boolean, reflect: true })
|
258
|
+
], Range.prototype, "vertical", void 0);
|
259
|
+
__decorate([
|
260
|
+
property({ type: Array })
|
261
|
+
], Range.prototype, "value", void 0);
|
262
|
+
__decorate([
|
263
|
+
property({ type: Array })
|
264
|
+
], Range.prototype, "default", void 0);
|
265
|
+
__decorate([
|
266
|
+
part("root")
|
267
|
+
], Range.prototype, "_root", void 0);
|
268
|
+
__decorate([
|
269
|
+
queryAll("[part=handle]")
|
270
|
+
], Range.prototype, "_handles", void 0);
|
271
|
+
__decorate([
|
272
|
+
state()
|
273
|
+
], Range.prototype, "lastFocus", void 0);
|
274
|
+
Range = __decorate([
|
275
|
+
godown(protoName),
|
276
|
+
styles(css `
|
277
|
+
:host {
|
278
|
+
${cssScope}-handle-active: var(${cssGlobalVars._colors.blue[7]});
|
279
|
+
${cssScope}-track-width: .5em;
|
280
|
+
background: var(${cssGlobalVars.input}-background);
|
281
|
+
width: var(${cssGlobalVars.input}-width);
|
282
|
+
display: inline-block;
|
283
|
+
margin: 0.25em 0;
|
284
|
+
}
|
285
|
+
|
286
|
+
:host([vertical]) {
|
287
|
+
height: var(${cssGlobalVars.input}-width);
|
288
|
+
width: fit-content;
|
289
|
+
}
|
290
|
+
|
291
|
+
:host(:not([disabled])) .last-focus {
|
292
|
+
z-index: 1;
|
293
|
+
${cssScope}-handle-scale:1.05;
|
294
|
+
background: var(${cssScope}-handle-active);
|
295
|
+
}
|
296
|
+
|
297
|
+
[part=root] {
|
298
|
+
min-height:inherit;
|
299
|
+
position: relative;
|
300
|
+
border-radius: inherit;
|
301
|
+
width: 100%;
|
302
|
+
--from: 0%;
|
303
|
+
--to: 50%;
|
304
|
+
height: var(${cssScope}-track-width);
|
305
|
+
}
|
306
|
+
|
307
|
+
[part=track] {
|
308
|
+
height: 100%;
|
309
|
+
min-height:inherit;
|
310
|
+
display: flex;
|
311
|
+
position: absolute;
|
312
|
+
pointer-events: none;
|
313
|
+
border-radius: inherit;
|
314
|
+
justify-content: space-between;
|
315
|
+
left: min(var(--from), var(--to));
|
316
|
+
background: var(${cssGlobalVars.active});
|
317
|
+
width: max(calc(var(--to) - var(--from)), calc(var(--from) - var(--to)));
|
318
|
+
}
|
319
|
+
|
320
|
+
[part=handle] {
|
321
|
+
width: 1em;
|
322
|
+
height: 1em;
|
323
|
+
display: flex;
|
324
|
+
align-items: center;
|
325
|
+
justify-content: center;
|
326
|
+
user-select: none;
|
327
|
+
position: absolute;
|
328
|
+
border: 0.1em solid;
|
329
|
+
border-radius: 50%;
|
330
|
+
transform-origin: 0% 25%;
|
331
|
+
transform: scale(var(${cssScope}-handle-scale, 1)) translate(-50%, -25%);
|
332
|
+
background: var(${cssGlobalVars.active});
|
333
|
+
border-color: var(${cssGlobalVars.input}-control);
|
334
|
+
}
|
335
|
+
`, css `
|
336
|
+
.vertical {
|
337
|
+
height: 100%;
|
338
|
+
width: var(${cssScope}-track-width);
|
339
|
+
}
|
340
|
+
|
341
|
+
.vertical i {
|
342
|
+
transform: translate(-25%, -50%);
|
343
|
+
}
|
344
|
+
|
345
|
+
.vertical [part=track] {
|
346
|
+
width: 100%;
|
347
|
+
height: max(calc(var(--to) - var(--from)), calc(var(--from) - var(--to)));
|
348
|
+
top: min(var(--from), var(--to));
|
349
|
+
left: 0;
|
350
|
+
}
|
351
|
+
`, css `
|
352
|
+
[part=handle] {
|
353
|
+
left: var(--handle);
|
354
|
+
top: 0;
|
355
|
+
}
|
356
|
+
|
357
|
+
.vertical [part=handle] {
|
358
|
+
top: var(--handle);
|
359
|
+
left: 0;
|
360
|
+
}
|
361
|
+
`)
|
362
|
+
], Range);
|
363
|
+
export default Range;
|
364
|
+
//# sourceMappingURL=range.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"range.js","sourceRoot":"","sources":["../../src/components/range.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sCAAsC,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,sCAAsC,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EAAE,aAAa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