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
package/dev/tooltip.d.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../src/tooltip.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,yBAAyB,CAAC;AAI9C,eAAe,OAAO,CAAC;AAEvB,cAAc,yBAAyB,CAAC;AAExC,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,OAAO,CAAC;KAC3B;CACF"}
|
package/dev/tooltip.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"tooltip.js","sourceRoot":"","sources":["../src/tooltip.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,yBAAyB,CAAC;AAE9C,OAAO,CAAC,MAAM,EAAE,CAAC;AAEjB,eAAe,OAAO,CAAC;AAEvB,cAAc,yBAAyB,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"typewriter.d.ts","sourceRoot":"","sources":["../src/typewriter.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,4BAA4B,CAAC;AAIpD,eAAe,UAAU,CAAC;AAE1B,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,mBAAmB,EAAE,UAAU,CAAC;KACjC;CACF"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"typewriter.js","sourceRoot":"","sources":["../src/typewriter.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,4BAA4B,CAAC;AAEpD,UAAU,CAAC,MAAM,EAAE,CAAC;AAEpB,eAAe,UAAU,CAAC"}
|
package/index.js
CHANGED
@@ -26,6 +26,19 @@ import './text.js';
|
|
26
26
|
import './time.js';
|
27
27
|
import './tooltip.js';
|
28
28
|
import './typewriter.js';
|
29
|
+
export { default as Alert } from './components/alert.js';
|
30
|
+
export { default as Avatar } from './components/avatar.js';
|
31
|
+
export { default as Breath } from './components/breath.js';
|
32
|
+
export { default as Button } from './components/button.js';
|
33
|
+
export { default as Card } from './components/card.js';
|
34
|
+
export { default as Carousel } from './components/carousel.js';
|
35
|
+
export { default as Details } from './components/details.js';
|
36
|
+
export { default as Dialog } from './components/dialog.js';
|
37
|
+
export { default as Divider } from './components/divider.js';
|
38
|
+
export { default as Dragbox } from './components/dragbox.js';
|
39
|
+
export { default as Flex } from './components/flex.js';
|
40
|
+
export { default as Form } from './components/form.js';
|
41
|
+
export { default as Grid } from './components/grid.js';
|
29
42
|
export { default as Input } from './components/input.js';
|
30
43
|
export { default as Layout } from './components/layout.js';
|
31
44
|
export { default as Link } from './components/link.js';
|
@@ -41,17 +54,4 @@ export { default as Text } from './components/text.js';
|
|
41
54
|
export { default as Time } from './components/time.js';
|
42
55
|
export { default as Tooltip } from './components/tooltip.js';
|
43
56
|
export { default as Typewriter } from './components/typewriter.js';
|
44
|
-
export { default as Alert } from './components/alert.js';
|
45
|
-
export { default as Avatar } from './components/avatar.js';
|
46
|
-
export { default as Breath } from './components/breath.js';
|
47
|
-
export { default as Button } from './components/button.js';
|
48
|
-
export { default as Card } from './components/card.js';
|
49
|
-
export { default as Carousel } from './components/carousel.js';
|
50
|
-
export { default as Details } from './components/details.js';
|
51
|
-
export { default as Dialog } from './components/dialog.js';
|
52
|
-
export { default as Divider } from './components/divider.js';
|
53
|
-
export { default as Dragbox } from './components/dragbox.js';
|
54
|
-
export { default as Flex } from './components/flex.js';
|
55
|
-
export { default as Form } from './components/form.js';
|
56
|
-
export { default as Grid } from './components/grid.js';
|
57
57
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "godown",
|
3
|
-
"version": "3.0.0-canary.
|
3
|
+
"version": "3.0.0-canary.10",
|
4
4
|
"description": "Simple, stylized, semantic web components",
|
5
5
|
"type": "module",
|
6
6
|
"main": "index.js",
|
@@ -18,17 +18,18 @@
|
|
18
18
|
"repository": {
|
19
19
|
"type": "git",
|
20
20
|
"url": "https://github.com/startracex/godown.git",
|
21
|
-
"directory": "packages/
|
21
|
+
"directory": "packages/godown"
|
22
22
|
},
|
23
23
|
"keywords": [],
|
24
24
|
"author": "startracex",
|
25
25
|
"license": "MIT",
|
26
26
|
"dependencies": {
|
27
|
+
"fmtime": "^0.0.3",
|
27
28
|
"lit": "^3.0.0",
|
28
29
|
"tslib": "^2.7.0",
|
29
|
-
"@godown/colors": "^0.0.
|
30
|
-
"@godown/element": "^0.0.
|
31
|
-
"@godown/f7-icon": "^0.0.
|
30
|
+
"@godown/colors": "^0.0.1",
|
31
|
+
"@godown/element": "^0.0.3",
|
32
|
+
"@godown/f7-icon": "^0.0.3"
|
32
33
|
},
|
33
34
|
"publishConfig": {
|
34
35
|
"access": "public"
|
@@ -37,7 +38,8 @@
|
|
37
38
|
"**/*.{js,d.ts}+(|.map)",
|
38
39
|
"custom-elements.json",
|
39
40
|
"web-types.json",
|
40
|
-
"vscode.{css,html}-custom-data.json"
|
41
|
+
"vscode.{css,html}-custom-data.json",
|
42
|
+
"src"
|
41
43
|
],
|
42
44
|
"custom-elements": "./custom-elements.json",
|
43
45
|
"customElements": "./custom-elements.json",
|
@@ -46,10 +48,10 @@
|
|
46
48
|
"dev": "tsc --watch",
|
47
49
|
"check-types": "tsc --noEmit",
|
48
50
|
"clean": "tsc --build tsconfig.prod.json --clean",
|
49
|
-
"build": "tsx build.ts",
|
51
|
+
"build": "tsc && tsx build.ts",
|
50
52
|
"build:ts": "tsc",
|
51
53
|
"fmt": "dprint fmt",
|
52
|
-
"lint": "eslint --fix",
|
54
|
+
"lint": "eslint . --fix",
|
53
55
|
"manifest": "tsx manifest.ts"
|
54
56
|
}
|
55
57
|
}
|
package/range.d.ts
CHANGED
package/range.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"range.d.ts","sourceRoot":"","sources":["src/range.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,uBAAuB,CAAC;AAI1C,eAAe,KAAK,CAAC;AAErB,cAAc,uBAAuB,CAAC;AAEtC,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,
|
1
|
+
{"version":3,"file":"range.d.ts","sourceRoot":"","sources":["src/range.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,uBAAuB,CAAC;AAI1C,eAAe,KAAK,CAAC;AAErB,cAAc,uBAAuB,CAAC;AAEtC,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,KAAK,CAAC;KACvB;CACF"}
|
package/src/alert.ts
ADDED
package/src/avatar.ts
ADDED
package/src/breath.ts
ADDED
package/src/button.ts
ADDED
package/src/card.ts
ADDED
package/src/carousel.ts
ADDED
@@ -0,0 +1,282 @@
|
|
1
|
+
import { godown } from "@godown/element/decorators/godown.js";
|
2
|
+
import { styles } from "@godown/element/decorators/styles.js";
|
3
|
+
import { htmlSlot } from "@godown/element/directives/html-slot.js";
|
4
|
+
import { htmlStyle } from "@godown/element/directives/html-style.js";
|
5
|
+
import { constructCSSObject, toVar } from "@godown/element/tools/css.js";
|
6
|
+
import iconCheckAltCircle from "@godown/f7-icon/icons/checkmark-alt-circle.js";
|
7
|
+
import iconExclamationCircle from "@godown/f7-icon/icons/exclamationmark-circle.js";
|
8
|
+
import iconInfoCircle from "@godown/f7-icon/icons/info-circle.js";
|
9
|
+
import iconLightbulb from "@godown/f7-icon/icons/lightbulb.js";
|
10
|
+
import iconQuestionCircle from "@godown/f7-icon/icons/question-circle.js";
|
11
|
+
import iconSlashCircle from "@godown/f7-icon/icons/slash-circle.js";
|
12
|
+
import iconXmark from "@godown/f7-icon/icons/xmark.js";
|
13
|
+
import iconXmarkCircle from "@godown/f7-icon/icons/xmark-circle.js";
|
14
|
+
import { css, html } from "lit";
|
15
|
+
import { property } from "lit/decorators.js";
|
16
|
+
|
17
|
+
import { cssGlobalVars, GlobalStyle, scopePrefix } from "../core/global-style.js";
|
18
|
+
|
19
|
+
const protoName = "alert";
|
20
|
+
const cssScope = scopePrefix(protoName);
|
21
|
+
|
22
|
+
const vars = ["color", "background"].map((v) => `${cssScope}--${v}`);
|
23
|
+
|
24
|
+
const genDark = (key: string) => {
|
25
|
+
return [cssGlobalVars._colors[key][5], cssGlobalVars._colors[key][9]];
|
26
|
+
};
|
27
|
+
|
28
|
+
const darkStyles = constructCSSObject(
|
29
|
+
vars,
|
30
|
+
{
|
31
|
+
green: genDark("green"),
|
32
|
+
blue: genDark("blue"),
|
33
|
+
orange: genDark("orange"),
|
34
|
+
red: genDark("red"),
|
35
|
+
yellow: genDark("yellow"),
|
36
|
+
purple: genDark("purple"),
|
37
|
+
teal: genDark("teal"),
|
38
|
+
pink: genDark("pink"),
|
39
|
+
gray: [cssGlobalVars._colors.lightgray[5], cssGlobalVars._colors.darkgray[5]],
|
40
|
+
white: [cssGlobalVars._colors.lightgray[2], cssGlobalVars._colors.darkgray[7]],
|
41
|
+
black: [cssGlobalVars._colors.darkgray[8], cssGlobalVars._colors.lightgray[5]],
|
42
|
+
},
|
43
|
+
() => `:host`,
|
44
|
+
(prop) => toVar(prop),
|
45
|
+
);
|
46
|
+
|
47
|
+
const genLight = (key: string) => {
|
48
|
+
return [cssGlobalVars._colors[key][6], cssGlobalVars._colors[key][0]];
|
49
|
+
};
|
50
|
+
|
51
|
+
const lightStyles = constructCSSObject(
|
52
|
+
vars,
|
53
|
+
{
|
54
|
+
green: genLight("green"),
|
55
|
+
blue: genLight("blue"),
|
56
|
+
orange: genLight("orange"),
|
57
|
+
red: genLight("red"),
|
58
|
+
yellow: genLight("yellow"),
|
59
|
+
purple: genLight("purple"),
|
60
|
+
teal: genLight("teal"),
|
61
|
+
pink: genLight("pink"),
|
62
|
+
gray: [cssGlobalVars._colors.darkgray[5], cssGlobalVars._colors.lightgray[7]],
|
63
|
+
white: [cssGlobalVars._colors.lightgray[0], cssGlobalVars._colors.darkgray[0]],
|
64
|
+
black: [cssGlobalVars._colors.darkgray[7], cssGlobalVars._colors.lightgray[3]],
|
65
|
+
},
|
66
|
+
() => `:host`,
|
67
|
+
(prop) => toVar(prop),
|
68
|
+
);
|
69
|
+
|
70
|
+
const calls = {
|
71
|
+
tip: {
|
72
|
+
color: "teal",
|
73
|
+
icon: iconLightbulb,
|
74
|
+
},
|
75
|
+
success: {
|
76
|
+
color: "green",
|
77
|
+
icon: iconCheckAltCircle,
|
78
|
+
},
|
79
|
+
info: {
|
80
|
+
color: "blue",
|
81
|
+
icon: iconInfoCircle,
|
82
|
+
},
|
83
|
+
warning: {
|
84
|
+
color: "orange",
|
85
|
+
icon: iconExclamationCircle,
|
86
|
+
},
|
87
|
+
danger: {
|
88
|
+
color: "red",
|
89
|
+
icon: iconXmarkCircle,
|
90
|
+
},
|
91
|
+
error: {
|
92
|
+
color: "red",
|
93
|
+
icon: iconXmarkCircle,
|
94
|
+
},
|
95
|
+
help: {
|
96
|
+
color: "purple",
|
97
|
+
icon: iconQuestionCircle,
|
98
|
+
},
|
99
|
+
deprecated: {
|
100
|
+
color: "gray",
|
101
|
+
icon: iconSlashCircle,
|
102
|
+
},
|
103
|
+
};
|
104
|
+
|
105
|
+
/**
|
106
|
+
* {@linkcode Alert} renders a alert.
|
107
|
+
*
|
108
|
+
* Color defaults to blue.
|
109
|
+
*
|
110
|
+
* @slot - Alert content.
|
111
|
+
* @slot title - Alert title.
|
112
|
+
* @slot icon - Alert icon.
|
113
|
+
* @category feedback
|
114
|
+
*/
|
115
|
+
@godown(protoName)
|
116
|
+
@styles(
|
117
|
+
css`
|
118
|
+
:host {
|
119
|
+
border-radius: var(${cssScope}--border-radius);
|
120
|
+
${cssScope}--border-radius: .25em;
|
121
|
+
${cssScope}--border-width: .075em;
|
122
|
+
${cssScope}--blockquote-width: .2em;
|
123
|
+
${cssScope}--padding: .5em;
|
124
|
+
display: block;
|
125
|
+
width: 100%;
|
126
|
+
}
|
127
|
+
|
128
|
+
[part=root] {
|
129
|
+
--color: var(${cssScope}--color);
|
130
|
+
color: var(--color);
|
131
|
+
width: 100%;
|
132
|
+
transition: 0.25s;
|
133
|
+
display: flex;
|
134
|
+
justify-content: space-between;
|
135
|
+
padding: var(${cssScope}--padding);
|
136
|
+
border-radius: inherit;
|
137
|
+
border: var(${cssScope}--border-width) solid var(--color);
|
138
|
+
background: var(${cssScope}--background);
|
139
|
+
}
|
140
|
+
|
141
|
+
[variant=blockquote] {
|
142
|
+
border-radius: 0;
|
143
|
+
border-left: var(${cssScope}--blockquote-width) solid var(--color);
|
144
|
+
border-bottom: none;
|
145
|
+
border-right: none;
|
146
|
+
border-top: none;
|
147
|
+
background: transparent;
|
148
|
+
}
|
149
|
+
|
150
|
+
[part=content]{
|
151
|
+
color: var(--color);
|
152
|
+
}
|
153
|
+
|
154
|
+
[part=root] {
|
155
|
+
display: grid;
|
156
|
+
align-items: center;
|
157
|
+
grid-template-columns: auto 1fr auto;
|
158
|
+
grid-template-rows: auto 1fr;
|
159
|
+
}
|
160
|
+
|
161
|
+
[part=title] {
|
162
|
+
line-height: 2em;
|
163
|
+
}
|
164
|
+
|
165
|
+
[part=icon] {
|
166
|
+
display: inline-grid;
|
167
|
+
align-items: center;
|
168
|
+
height: 2em;
|
169
|
+
}
|
170
|
+
|
171
|
+
[part=icon] svg {
|
172
|
+
margin-right: .5em;
|
173
|
+
width: 1.25em;
|
174
|
+
height: 1.25em;
|
175
|
+
}
|
176
|
+
|
177
|
+
[part=content] {
|
178
|
+
grid-row: span 2 / span 2;
|
179
|
+
line-height: 1.5em;
|
180
|
+
}
|
181
|
+
`,
|
182
|
+
)
|
183
|
+
class Alert extends GlobalStyle {
|
184
|
+
/**
|
185
|
+
* If it is a legal value, the icon and preset color will be rendered.
|
186
|
+
*/
|
187
|
+
@property()
|
188
|
+
call: "tip" | "success" | "info" | "warning" | "danger" | "error" | "help" | "deprecated";
|
189
|
+
|
190
|
+
/**
|
191
|
+
* The tone of the component.
|
192
|
+
* Overrides the color of the call.
|
193
|
+
*/
|
194
|
+
@property()
|
195
|
+
color:
|
196
|
+
| "white"
|
197
|
+
| "black"
|
198
|
+
| "gray"
|
199
|
+
| "green"
|
200
|
+
| "teal"
|
201
|
+
| "blue"
|
202
|
+
| "red"
|
203
|
+
| "purple"
|
204
|
+
| "orange"
|
205
|
+
| "yellow"
|
206
|
+
| "pink"
|
207
|
+
| "none" = "blue";
|
208
|
+
|
209
|
+
/**
|
210
|
+
* Close delay, if 0, it will not be closed automatically.
|
211
|
+
*/
|
212
|
+
@property({ type: Number })
|
213
|
+
autoclose = 0;
|
214
|
+
|
215
|
+
/**
|
216
|
+
* The title is bold and the icon height is the same as it.
|
217
|
+
*/
|
218
|
+
@property()
|
219
|
+
title: string;
|
220
|
+
|
221
|
+
/**
|
222
|
+
* Content, if zero value, will be rendered as an unnamed slot.
|
223
|
+
*/
|
224
|
+
@property()
|
225
|
+
content: string;
|
226
|
+
|
227
|
+
/**
|
228
|
+
* Set true to hide the close button.
|
229
|
+
*
|
230
|
+
* The behavior may change due to the {@linkcode variant} property.
|
231
|
+
*/
|
232
|
+
@property({ type: Boolean })
|
233
|
+
hideClose = false;
|
234
|
+
|
235
|
+
/**
|
236
|
+
* Alert variant, if set to `blockquote`, the alert will be rendered as a blockquote.
|
237
|
+
*
|
238
|
+
* If variant is `"blockquote"`, hide the close button.
|
239
|
+
*/
|
240
|
+
@property()
|
241
|
+
variant: "blockquote" | "dark" | "light" = "dark";
|
242
|
+
|
243
|
+
protected render() {
|
244
|
+
const color = calls[this.call]?.color || this.color;
|
245
|
+
const icon = this.call ? calls[this.call].icon() : htmlSlot("icon");
|
246
|
+
return [
|
247
|
+
html`<div part="root" variant="${this.variant}">
|
248
|
+
<div part="icon">${icon}</div>
|
249
|
+
<div part="content">
|
250
|
+
<strong part="title">${this.title || htmlSlot("title")}</strong>
|
251
|
+
${this.content || htmlSlot()}
|
252
|
+
</div>
|
253
|
+
${
|
254
|
+
!this.hideClose && this.variant !== "blockquote"
|
255
|
+
? html`<div part="close" tabindex=0 @click="${this.close}">${iconXmark()}</div>`
|
256
|
+
: ""
|
257
|
+
}
|
258
|
+
</div>`,
|
259
|
+
htmlStyle(this.variant === "light" ? lightStyles[color] : darkStyles[color]),
|
260
|
+
];
|
261
|
+
}
|
262
|
+
|
263
|
+
close() {
|
264
|
+
this.remove();
|
265
|
+
this.dispatchEvent(new CustomEvent("close", { bubbles: true, composed: true }));
|
266
|
+
}
|
267
|
+
|
268
|
+
protected firstUpdated() {
|
269
|
+
if (this.autoclose) {
|
270
|
+
setTimeout(() => this.close(), this.autoclose);
|
271
|
+
}
|
272
|
+
}
|
273
|
+
|
274
|
+
static alert(root: HTMLElement, option: Partial<Alert>): Alert {
|
275
|
+
const ai = new this();
|
276
|
+
Object.assign(ai, option);
|
277
|
+
root.appendChild(ai);
|
278
|
+
return ai;
|
279
|
+
}
|
280
|
+
}
|
281
|
+
|
282
|
+
export default Alert;
|
@@ -0,0 +1,95 @@
|
|
1
|
+
import { godown, styles } from "@godown/element/decorators/index.js";
|
2
|
+
import { htmlSlot } from "@godown/element/directives/index.js";
|
3
|
+
import { css, html } from "lit";
|
4
|
+
import { property } from "lit/decorators.js";
|
5
|
+
|
6
|
+
import { GlobalStyle, scopePrefix } from "../core/global-style.js";
|
7
|
+
|
8
|
+
const protoName = "avatar";
|
9
|
+
const cssScope = scopePrefix(protoName);
|
10
|
+
|
11
|
+
/**
|
12
|
+
* {@linkcode Avatar} renders a avatar.
|
13
|
+
*
|
14
|
+
* Renders as an image if it has a src property,
|
15
|
+
* otherwise falls back to name or nameless slot.
|
16
|
+
*
|
17
|
+
* @slot - Display content if no `src` or `name` provided.
|
18
|
+
* @category display
|
19
|
+
*/
|
20
|
+
@godown(protoName)
|
21
|
+
@styles(
|
22
|
+
css`
|
23
|
+
:host {
|
24
|
+
${cssScope}--size: 2em;
|
25
|
+
width: var(${cssScope}--size);
|
26
|
+
height: var(${cssScope}--size);
|
27
|
+
display: inline-block;
|
28
|
+
vertical-align: bottom;
|
29
|
+
}
|
30
|
+
|
31
|
+
:host([round]){
|
32
|
+
border-radius:50%;
|
33
|
+
}
|
34
|
+
|
35
|
+
[part=image] {
|
36
|
+
width: 100%;
|
37
|
+
height: 100%;
|
38
|
+
object-fit: cover;
|
39
|
+
}
|
40
|
+
|
41
|
+
[part=root] {
|
42
|
+
overflow: hidden;
|
43
|
+
position: relative;
|
44
|
+
border-radius: inherit;
|
45
|
+
width: 100%;
|
46
|
+
height: 100%;
|
47
|
+
display: flex;
|
48
|
+
align-items: center;
|
49
|
+
justify-content: center;
|
50
|
+
}
|
51
|
+
`,
|
52
|
+
)
|
53
|
+
class Avatar extends GlobalStyle {
|
54
|
+
/**
|
55
|
+
* Image src.
|
56
|
+
*/
|
57
|
+
@property()
|
58
|
+
src: string | undefined | null;
|
59
|
+
|
60
|
+
/**
|
61
|
+
* If the image is not available, display name (call {@linkcode Avatar.format}).
|
62
|
+
*/
|
63
|
+
@property()
|
64
|
+
name = "";
|
65
|
+
|
66
|
+
/**
|
67
|
+
* Display rounded.
|
68
|
+
*/
|
69
|
+
@property({ type: Boolean })
|
70
|
+
round = false;
|
71
|
+
|
72
|
+
protected render() {
|
73
|
+
return html`<div part="root">${this._renderAvatar()}</div>`;
|
74
|
+
}
|
75
|
+
|
76
|
+
private _renderAvatar() {
|
77
|
+
if (this.src) {
|
78
|
+
return html`<img part="image" src="${this.src}" @error=${this._handleError} alt="${this.name}">`;
|
79
|
+
}
|
80
|
+
if (this.name) {
|
81
|
+
return html`<span part="name">${this.format()}</span>`;
|
82
|
+
}
|
83
|
+
return htmlSlot();
|
84
|
+
}
|
85
|
+
|
86
|
+
format() {
|
87
|
+
return this.name;
|
88
|
+
}
|
89
|
+
|
90
|
+
_handleError() {
|
91
|
+
this.src = undefined;
|
92
|
+
}
|
93
|
+
}
|
94
|
+
|
95
|
+
export default Avatar;
|