godown 3.3.0 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/godown+lit.iife.js +4 -4
- package/build/godown+lit.iife.js.map +1 -1
- package/build/godown+lit.js +4 -4
- package/build/godown+lit.js.map +1 -1
- package/build/godown+lit.umd.js +4 -4
- package/build/godown+lit.umd.js.map +1 -1
- package/build/godown.iife.js +4 -4
- package/build/godown.js +4 -4
- package/build/godown.js.map +1 -1
- package/build/godown.umd.js +4 -4
- package/build/godown.umd.js.map +1 -1
- package/components/alert.js +1 -1
- package/components/alert.js.map +1 -1
- package/components/avatar.d.ts +5 -4
- package/components/avatar.d.ts.map +1 -1
- package/components/avatar.js +1 -1
- package/components/avatar.js.map +1 -1
- package/components/badge.d.ts +10 -2
- package/components/badge.d.ts.map +1 -1
- package/components/badge.js.map +1 -1
- package/components/breath.d.ts +2 -3
- package/components/breath.d.ts.map +1 -1
- package/components/breath.js +1 -1
- package/components/breath.js.map +1 -1
- package/components/button.d.ts +7 -2
- package/components/button.d.ts.map +1 -1
- package/components/button.js +1 -1
- package/components/button.js.map +1 -1
- package/components/card.d.ts +6 -0
- package/components/card.d.ts.map +1 -1
- package/components/card.js +1 -1
- package/components/card.js.map +1 -1
- package/components/carousel.d.ts +2 -2
- package/components/details.d.ts +3 -3
- package/components/details.d.ts.map +1 -1
- package/components/dialog.d.ts +9 -6
- package/components/dialog.d.ts.map +1 -1
- package/components/dialog.js +1 -1
- package/components/dialog.js.map +1 -1
- package/components/divider.d.ts +1 -1
- package/components/divider.d.ts.map +1 -1
- package/components/divider.js +1 -1
- package/components/divider.js.map +1 -1
- package/components/heading.d.ts +2 -0
- package/components/heading.d.ts.map +1 -1
- package/components/heading.js.map +1 -1
- package/components/input.d.ts +2 -2
- package/components/input.d.ts.map +1 -1
- package/components/input.js +1 -1
- package/components/input.js.map +1 -1
- package/components/link.d.ts +1 -1
- package/components/link.d.ts.map +1 -1
- package/components/link.js +1 -1
- package/components/link.js.map +1 -1
- package/components/progress.d.ts +0 -7
- package/components/progress.d.ts.map +1 -1
- package/components/progress.js +1 -1
- package/components/progress.js.map +1 -1
- package/components/range.d.ts +50 -15
- package/components/range.d.ts.map +1 -1
- package/components/range.js +1 -1
- package/components/range.js.map +1 -1
- package/components/rotate.d.ts +6 -4
- package/components/rotate.d.ts.map +1 -1
- package/components/rotate.js.map +1 -1
- package/components/select.d.ts +4 -2
- package/components/select.d.ts.map +1 -1
- package/components/select.js +1 -1
- package/components/select.js.map +1 -1
- package/components/split.d.ts +2 -1
- package/components/split.d.ts.map +1 -1
- package/components/split.js +1 -1
- package/components/split.js.map +1 -1
- package/components/switch.d.ts +10 -20
- package/components/switch.d.ts.map +1 -1
- package/components/switch.js +1 -1
- package/components/switch.js.map +1 -1
- package/components/time.d.ts +2 -2
- package/components/time.d.ts.map +1 -1
- package/components/time.js.map +1 -1
- package/components/tooltip.d.ts +3 -2
- package/components/tooltip.d.ts.map +1 -1
- package/components/tooltip.js +1 -1
- package/components/tooltip.js.map +1 -1
- package/core/direction.d.ts +27 -0
- package/core/direction.d.ts.map +1 -0
- package/core/direction.js +2 -0
- package/core/direction.js.map +1 -0
- package/core/global-style.d.ts +0 -2
- package/core/global-style.d.ts.map +1 -1
- package/core/global-style.js +1 -1
- package/core/global-style.js.map +1 -1
- package/core/outline.d.ts +20 -0
- package/core/outline.d.ts.map +1 -0
- package/core/outline.js +2 -0
- package/core/outline.js.map +1 -0
- package/core/super-anchor.d.ts +2 -2
- package/core/super-anchor.d.ts.map +1 -1
- package/core/super-anchor.js +1 -1
- package/core/super-anchor.js.map +1 -1
- package/core/super-input.d.ts +4 -2
- package/core/super-input.d.ts.map +1 -1
- package/core/super-input.js +1 -1
- package/core/super-input.js.map +1 -1
- package/core/super-openable.d.ts +0 -4
- package/core/super-openable.d.ts.map +1 -1
- package/custom-elements.json +1 -1
- package/dev/components/alert.js +1 -1
- package/dev/components/avatar.d.ts +5 -4
- package/dev/components/avatar.d.ts.map +1 -1
- package/dev/components/avatar.js +7 -5
- package/dev/components/avatar.js.map +1 -1
- package/dev/components/badge.d.ts +10 -2
- package/dev/components/badge.d.ts.map +1 -1
- package/dev/components/badge.js +8 -0
- package/dev/components/badge.js.map +1 -1
- package/dev/components/breath.d.ts +2 -3
- package/dev/components/breath.d.ts.map +1 -1
- package/dev/components/breath.js +3 -14
- package/dev/components/breath.js.map +1 -1
- package/dev/components/button.d.ts +7 -2
- package/dev/components/button.d.ts.map +1 -1
- package/dev/components/button.js +19 -5
- package/dev/components/button.js.map +1 -1
- package/dev/components/card.d.ts +6 -0
- package/dev/components/card.d.ts.map +1 -1
- package/dev/components/card.js +15 -11
- package/dev/components/card.js.map +1 -1
- package/dev/components/carousel.d.ts +2 -2
- package/dev/components/carousel.js +2 -2
- package/dev/components/details.d.ts +3 -3
- package/dev/components/details.d.ts.map +1 -1
- package/dev/components/details.js +3 -3
- package/dev/components/details.js.map +1 -1
- package/dev/components/dialog.d.ts +9 -6
- package/dev/components/dialog.d.ts.map +1 -1
- package/dev/components/dialog.js +58 -62
- package/dev/components/dialog.js.map +1 -1
- package/dev/components/divider.d.ts +1 -1
- package/dev/components/divider.d.ts.map +1 -1
- package/dev/components/divider.js +3 -2
- package/dev/components/divider.js.map +1 -1
- package/dev/components/heading.d.ts +2 -0
- package/dev/components/heading.d.ts.map +1 -1
- package/dev/components/heading.js +2 -0
- package/dev/components/heading.js.map +1 -1
- package/dev/components/input.d.ts +2 -2
- package/dev/components/input.d.ts.map +1 -1
- package/dev/components/input.js +29 -8
- package/dev/components/input.js.map +1 -1
- package/dev/components/link.d.ts +1 -1
- package/dev/components/link.d.ts.map +1 -1
- package/dev/components/link.js +2 -2
- package/dev/components/link.js.map +1 -1
- package/dev/components/progress.d.ts +0 -7
- package/dev/components/progress.d.ts.map +1 -1
- package/dev/components/progress.js +4 -25
- package/dev/components/progress.js.map +1 -1
- package/dev/components/range.d.ts +50 -15
- package/dev/components/range.d.ts.map +1 -1
- package/dev/components/range.js +50 -14
- package/dev/components/range.js.map +1 -1
- package/dev/components/rotate.d.ts +6 -4
- package/dev/components/rotate.d.ts.map +1 -1
- package/dev/components/rotate.js +6 -4
- package/dev/components/rotate.js.map +1 -1
- package/dev/components/select.d.ts +4 -2
- package/dev/components/select.d.ts.map +1 -1
- package/dev/components/select.js +27 -24
- package/dev/components/select.js.map +1 -1
- package/dev/components/split.d.ts +2 -1
- package/dev/components/split.d.ts.map +1 -1
- package/dev/components/split.js +12 -7
- package/dev/components/split.js.map +1 -1
- package/dev/components/switch.d.ts +10 -20
- package/dev/components/switch.d.ts.map +1 -1
- package/dev/components/switch.js +57 -98
- package/dev/components/switch.js.map +1 -1
- package/dev/components/time.d.ts +2 -2
- package/dev/components/time.d.ts.map +1 -1
- package/dev/components/time.js.map +1 -1
- package/dev/components/tooltip.d.ts +3 -2
- package/dev/components/tooltip.d.ts.map +1 -1
- package/dev/components/tooltip.js +7 -19
- package/dev/components/tooltip.js.map +1 -1
- package/dev/core/direction.d.ts +27 -0
- package/dev/core/direction.d.ts.map +1 -0
- package/dev/core/direction.js +56 -0
- package/dev/core/direction.js.map +1 -0
- package/dev/core/global-style.d.ts +0 -2
- package/dev/core/global-style.d.ts.map +1 -1
- package/dev/core/global-style.js +3 -7
- package/dev/core/global-style.js.map +1 -1
- package/dev/core/outline.d.ts +20 -0
- package/dev/core/outline.d.ts.map +1 -0
- package/dev/core/outline.js +44 -0
- package/dev/core/outline.js.map +1 -0
- package/dev/core/super-anchor.d.ts +2 -2
- package/dev/core/super-anchor.d.ts.map +1 -1
- package/dev/core/super-anchor.js +0 -1
- package/dev/core/super-anchor.js.map +1 -1
- package/dev/core/super-input.d.ts +4 -2
- package/dev/core/super-input.d.ts.map +1 -1
- package/dev/core/super-input.js +25 -30
- package/dev/core/super-input.js.map +1 -1
- package/dev/core/super-openable.d.ts +0 -4
- package/dev/core/super-openable.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/components/alert.ts +1 -1
- package/src/components/avatar.ts +9 -6
- package/src/components/badge.ts +10 -3
- package/src/components/breath.ts +5 -17
- package/src/components/button.ts +18 -5
- package/src/components/card.ts +15 -11
- package/src/components/carousel.ts +2 -2
- package/src/components/details.ts +3 -3
- package/src/components/dialog.ts +66 -65
- package/src/components/divider.ts +3 -2
- package/src/components/heading.ts +2 -0
- package/src/components/input.ts +29 -8
- package/src/components/link.ts +2 -2
- package/src/components/progress.ts +4 -25
- package/src/components/range.ts +64 -26
- package/src/components/rotate.ts +6 -4
- package/src/components/select.ts +33 -26
- package/src/components/split.ts +13 -7
- package/src/components/switch.ts +62 -94
- package/src/components/time.ts +2 -2
- package/src/components/tooltip.ts +8 -20
- package/src/core/direction.ts +65 -0
- package/src/core/global-style.ts +3 -9
- package/src/core/outline.ts +54 -0
- package/src/core/super-anchor.ts +3 -2
- package/src/core/super-input.ts +31 -33
- package/src/core/super-openable.ts +0 -8
- package/vscode.html-custom-data.json +1 -1
- package/web-types.json +1 -1
package/components/time.d.ts
CHANGED
@@ -22,11 +22,11 @@ declare class Time extends GlobalStyle {
|
|
22
22
|
/**
|
23
23
|
* If there is a value, update every gap or timeout.
|
24
24
|
*/
|
25
|
-
timeout:
|
25
|
+
timeout: number;
|
26
26
|
/**
|
27
27
|
* The number of milliseconds that change with each update.
|
28
28
|
*/
|
29
|
-
gap:
|
29
|
+
gap: number;
|
30
30
|
protected timeoutId: number;
|
31
31
|
protected render(): TemplateResult<1>;
|
32
32
|
protected updated(changedProperties: PropertyValues): void;
|
package/components/time.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../src/components/time.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAG1E,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAItD;;;;;GAKG;AACH,cAEM,IAAK,SAAQ,WAAW;IAC5B;;OAEG;IAEH,MAAM,SAAO;IAEb;;OAEG;IAEH,MAAM,SAAyB;IAE/B;;OAEG;IAEH,IAAI,EAAE,IAAI,CAAc;IAExB;;OAEG;IAEH,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../src/components/time.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAG1E,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAItD;;;;;GAKG;AACH,cAEM,IAAK,SAAQ,WAAW;IAC5B;;OAEG;IAEH,MAAM,SAAO;IAEb;;OAEG;IAEH,MAAM,SAAyB;IAE/B;;OAEG;IAEH,IAAI,EAAE,IAAI,CAAc;IAExB;;OAEG;IAEH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IAEH,GAAG,EAAE,MAAM,CAAC;IAEZ,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC;IAE5B,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;IAIrC,SAAS,CAAC,OAAO,CAAC,iBAAiB,EAAE,cAAc,GAAG,IAAI;CAW3D;AAED,eAAe,IAAI,CAAC;AACpB,OAAO,EAAE,IAAI,EAAE,CAAC"}
|
package/components/time.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"time.js","sources":["../src/components/time.ts"],"sourcesContent":null,"names":["Time","GlobalStyle","constructor","this","escape","format","time","Date","render","html","attr","observedRecord","fmtime","updated","changedProperties","has","timeout","timeouts","remove","timeoutId","add","setInterval","dispatchEvent","CustomEvent","detail","composed","getTime","gap","Math","abs","__decorate","property","prototype","undefined","type","Object","Number","godown","styles","css","Time$1"],"mappings":"+PAiBA,IAAMA,EAAN,MAAMA,aAAaC,EAAnB,WAAAC,uBAKEC,KAAMC,OAAG,IAMTD,KAAME,OAAG,sBAMTF,KAAAG,KAAa,IAAIC,KAgBP,MAAAC,GACR,OAAOC,CAAI,qBAGLC,EAAKP,KAAKQ,mBAEVC,EAAOT,KAAKE,OAAQF,KAAKG,KAAMH,KAAKC,iBAKlC,OAAAS,CAAQC,GACZA,EAAkBC,IAAI,YAAcZ,KAAKa,UAC3Cb,KAAKc,SAASC,OAAOf,KAAKgB,WAC1BhB,KAAKgB,UAAYhB,KAAKc,SAASG,IAC7BC,aAAY,KACVlB,KAAKmB,cAAc,IAAIC,YAAY,OAAQ,CAAEC,OAAQrB,KAAKG,KAAMmB,UAAU,KAC1EtB,KAAKG,KAAO,IAAIC,KAAKJ,KAAKG,KAAKoB,WAAavB,KAAKwB,KAAOxB,KAAKa,SAAS,GACrEY,KAAKC,IAAI1B,KAAKa,cA9CvBc,EAAA,CADCC,KACW/B,EAAAgC,UAAA,cAAAC,GAMZH,EAAA,CADCC,KAC6B/B,EAAAgC,UAAA,cAAAC,GAM9BH,EAAA,CADCC,EAAS,CAAEG,KAAMC,UACKnC,EAAAgC,UAAA,YAAAC,GAMvBH,EAAA,CADCC,EAAS,CAAEG,KAAME,
|
1
|
+
{"version":3,"file":"time.js","sources":["../src/components/time.ts"],"sourcesContent":null,"names":["Time","GlobalStyle","constructor","this","escape","format","time","Date","render","html","attr","observedRecord","fmtime","updated","changedProperties","has","timeout","timeouts","remove","timeoutId","add","setInterval","dispatchEvent","CustomEvent","detail","composed","getTime","gap","Math","abs","__decorate","property","prototype","undefined","type","Object","Number","godown","styles","css","Time$1"],"mappings":"+PAiBA,IAAMA,EAAN,MAAMA,aAAaC,EAAnB,WAAAC,uBAKEC,KAAMC,OAAG,IAMTD,KAAME,OAAG,sBAMTF,KAAAG,KAAa,IAAIC,KAgBP,MAAAC,GACR,OAAOC,CAAI,qBAGLC,EAAKP,KAAKQ,mBAEVC,EAAOT,KAAKE,OAAQF,KAAKG,KAAMH,KAAKC,iBAKlC,OAAAS,CAAQC,GACZA,EAAkBC,IAAI,YAAcZ,KAAKa,UAC3Cb,KAAKc,SAASC,OAAOf,KAAKgB,WAC1BhB,KAAKgB,UAAYhB,KAAKc,SAASG,IAC7BC,aAAY,KACVlB,KAAKmB,cAAc,IAAIC,YAAY,OAAQ,CAAEC,OAAQrB,KAAKG,KAAMmB,UAAU,KAC1EtB,KAAKG,KAAO,IAAIC,KAAKJ,KAAKG,KAAKoB,WAAavB,KAAKwB,KAAOxB,KAAKa,SAAS,GACrEY,KAAKC,IAAI1B,KAAKa,cA9CvBc,EAAA,CADCC,KACW/B,EAAAgC,UAAA,cAAAC,GAMZH,EAAA,CADCC,KAC6B/B,EAAAgC,UAAA,cAAAC,GAM9BH,EAAA,CADCC,EAAS,CAAEG,KAAMC,UACKnC,EAAAgC,UAAA,YAAAC,GAMvBH,EAAA,CADCC,EAAS,CAAEG,KAAME,UACHpC,EAAAgC,UAAA,eAAAC,GAMfH,EAAA,CADCC,EAAS,CAAEG,KAAME,UACPpC,EAAAgC,UAAA,WAAAC,GA7BPjC,EAAI8B,EAAA,CAFTO,EARiB,QASjBC,EAAOC,CAAG,6BACLvC,GAyDN,IAAAwC,EAAexC"}
|
package/components/tooltip.d.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
import { type TemplateResult } from "lit";
|
2
|
-
import
|
2
|
+
import { SuperOpenable } from "../core/super-openable.js";
|
3
|
+
import { type DirectionCardinal, type DirectionCorner } from "../core/direction.js";
|
3
4
|
/**
|
4
5
|
* {@linkcode Tooltip} provide tooltip for slot elements.
|
5
6
|
*
|
@@ -17,7 +18,7 @@ declare class Tooltip extends SuperOpenable {
|
|
17
18
|
/**
|
18
19
|
* Direction of opening the tip.
|
19
20
|
*/
|
20
|
-
direction:
|
21
|
+
direction: DirectionCardinal | DirectionCorner;
|
21
22
|
/**
|
22
23
|
* Content alignment.
|
23
24
|
*/
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../src/components/tooltip.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAIrD,OAAO,aAAa,EAAE,EAAE,KAAK,
|
1
|
+
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../src/components/tooltip.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAIrD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,eAAe,EAAwB,MAAM,sBAAsB,CAAC;AAK1G;;;;;;;;GAQG;AACH,cAKM,OAAQ,SAAQ,aAAa;IACjC;;OAEG;IAEH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IAEH,SAAS,EAAE,iBAAiB,GAAG,eAAe,CAAS;IAEvD;;OAEG;IAEH,KAAK,EAAE,QAAQ,GAAG,YAAY,GAAG,UAAU,GAAG,OAAO,GAAG,KAAK,CAAY;IAEzE;;OAEG;IAEH,WAAW,UAAS;IAEpB;;;;;;;;OAQG;IAEH,IAAI,EAAE,OAAO,GAAG,OAAO,CAAW;IAElC,MAAM,CAAC,MAAM;;;;;;MAMX;IAEF,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;CAOtC;AAED,eAAe,OAAO,CAAC;AACvB,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
package/components/tooltip.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
import{__decorate as t}from"tslib";import{godown as i,styles as
|
1
|
+
import{__decorate as t}from"tslib";import{godown as i,styles as e,attr as o,htmlSlot as n}from"@godown/element";import{css as r,html as s}from"lit";import{property as p}from"lit/decorators.js";import{scopePrefix as a}from"../core/global-style.js";import l from"../core/super-openable.js";import{directionOutsetPlace as d}from"../core/direction.js";var c;const h="tooltip",f=a(h);let u=c=class Tooltip extends l{constructor(){super(...arguments),this.direction="top",this.align="center",this.propagation=!1,this.type="hover"}render(){const t=c.aligns[this.align]||"inherit",i="focus"===this.type;return s`<div part="root" ${o(this.observedRecord)} tabindex="${i?0:-1}" @focus="${i?()=>this.open=!0:null}" @blur="${i?()=>this.open=!1:null}" @mouseenter="${i?null:()=>this.open=!0}" @mouseleave="${i?null:()=>this.open=!1}" style="justify-content:${t};align-items:${t}">${n()}<div part="tip" direction-outset-place>${this.tip?s`<span class="passive">${this.tip}</span>`:n("tip")}</div></div>`}};u.aligns={start:"flex-start",end:"flex-end",center:"center","flex-start":"flex-start","flex-end":"flex-end"},t([p()],u.prototype,"tip",void 0),t([p()],u.prototype,"direction",void 0),t([p()],u.prototype,"align",void 0),t([p({type:Boolean})],u.prototype,"propagation",void 0),t([p()],u.prototype,"type",void 0),u=c=t([i(h),e(d,r`:host{${f}--tip-background:inherit;width:-moz-fit-content;width:fit-content}:host,[part=root]{display:inline-flex}[part=root]{border-radius:inherit;position:relative;transition:inherit}[part=tip]{height:-moz-fit-content;height:fit-content;position:absolute;transition:inherit;-webkit-user-select:none;user-select:none;visibility:hidden;width:-moz-fit-content;width:fit-content}:host([open]) [part=tip]{visibility:visible}.passive{background:var(${f}--tip-background)}[propagation] [part=tip]{pointer-events:none}`)],u);var v=u;export{u as Tooltip,v as default};
|
2
2
|
//# sourceMappingURL=tooltip.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"tooltip.js","sources":["../src/components/tooltip.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","Tooltip","Tooltip_1","SuperOpenable","constructor","this","direction","align","propagation","type","render","aligns","isFocusable","html","attr","observedRecord","open","htmlSlot","tip","start","end","center","__decorate","property","prototype","undefined","Boolean","godown","styles","css","Tooltip$1"],"mappings":"
|
1
|
+
{"version":3,"file":"tooltip.js","sources":["../src/components/tooltip.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","Tooltip","Tooltip_1","SuperOpenable","constructor","this","direction","align","propagation","type","render","aligns","isFocusable","html","attr","observedRecord","open","htmlSlot","tip","start","end","center","__decorate","property","prototype","undefined","Boolean","godown","styles","directionOutsetPlace","css","Tooltip$1"],"mappings":"kWAQA,MAAMA,EAAY,UACZC,EAAWC,EAAYF,GAgB7B,IAAMG,EAAOC,EAAb,MAAMD,gBAAgBE,EAAtB,WAAAC,uBAWEC,KAASC,UAAwC,MAMjDD,KAAKE,MAA2D,SAMhEF,KAAWG,aAAG,EAYdH,KAAII,KAAsB,QAUhB,MAAAC,GACR,MAAMH,EAAQL,EAAQS,OAAON,KAAKE,QAAU,UACtCK,EAA4B,UAAdP,KAAKI,KACzB,OAAOI,CAAI,oBAGLC,EAAKT,KAAKU,6BACAH,EAAc,iBAChBA,EAAc,IAAOP,KAAKW,MAAO,EAAQ,gBAC1CJ,EAAc,IAAOP,KAAKW,MAAO,EAAS,sBACpCJ,EAAc,KAAO,IAAOP,KAAKW,MAAO,mBACxCJ,EAAc,KAAO,IAAOP,KAAKW,MAAO,6BAC9BT,iBAAqBA,MAE5CU,6CAKEZ,KAAKa,IACHL,CAAI,yBACsBR,KAAKa,aAE/BD,EAAS,uBA/BdhB,EAAAU,OAAS,CACdQ,MAAO,aACPC,IAAK,WACLC,OAAQ,SACR,aAAc,aACd,WAAY,YArCdC,EAAA,CADCC,KACUtB,EAAAuB,UAAA,WAAAC,GAMXH,EAAA,CADCC,KACqDtB,EAAAuB,UAAA,iBAAAC,GAMtDH,EAAA,CADCC,KACuEtB,EAAAuB,UAAA,aAAAC,GAMxEH,EAAA,CADCC,EAAS,CAAEd,KAAMiB,WACCzB,EAAAuB,UAAA,mBAAAC,GAYnBH,EAAA,CADCC,KACgCtB,EAAAuB,UAAA,YAAAC,GAnC7BxB,EAAOC,EAAAoB,EAAA,CALZK,EAAO7B,GACP8B,EACCC,EACAC,CAAG,SAAS/B,ubAA8bA,qEAEtcE,GA2EN,IAAA8B,EAAe9B"}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import { type CSSResult } from "lit";
|
2
|
+
/**
|
3
|
+
* Controls the inset alignment of the element relative to the direction.
|
4
|
+
*
|
5
|
+
* ```html
|
6
|
+
* <div direction="${direction}">
|
7
|
+
* <div direction-inset-align></div>
|
8
|
+
* </div>
|
9
|
+
* ```
|
10
|
+
*/
|
11
|
+
export declare const directionInsetAlign: CSSResult;
|
12
|
+
/**
|
13
|
+
* Controls the outset placement of the element relative to the direction.
|
14
|
+
*
|
15
|
+
* ```html
|
16
|
+
* <div direction="${direction}">
|
17
|
+
* <div direction-outset-place></div>
|
18
|
+
* </div>
|
19
|
+
* ```
|
20
|
+
*/
|
21
|
+
export declare const directionOutsetPlace: CSSResult;
|
22
|
+
export type DirectionCardinalX = "left" | "right";
|
23
|
+
export type DirectionCardinalY = "top" | "bottom";
|
24
|
+
export type DirectionCardinal = DirectionCardinalX | DirectionCardinalY;
|
25
|
+
export type DirectionCorner = "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
26
|
+
export type DirectionCenter = "center";
|
27
|
+
//# sourceMappingURL=direction.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"direction.d.ts","sourceRoot":"","sources":["../src/core/direction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,KAAK,CAAC;AAIrD;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAAiN,CAAC;AAIpP;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,EAAE,SAAiO,CAAC;AAErQ,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,OAAO,CAAC;AAClD,MAAM,MAAM,kBAAkB,GAAG,KAAK,GAAG,QAAQ,CAAC;AAClD,MAAM,MAAM,iBAAiB,GAAG,kBAAkB,GAAG,kBAAkB,CAAC;AACxE,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,WAAW,GAAG,aAAa,GAAG,cAAc,CAAC;AACxF,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{unsafeCSS as t,css as i}from"lit";const o=t("[direction-inset-align]"),e=i`[direction^=top] ${o}{top:0}[direction^=bottom] ${o}{bottom:0}[direction$=right] ${o}{right:0}[direction$=left] ${o}{left:0}`,r=t("[direction-outset-place]"),n=i`[direction^=top] ${r}{bottom:100%}[direction^=bottom] ${r}{top:100%}[direction$=right] ${r}{left:100%}[direction$=left] ${r}{right:100%}`;export{e as directionInsetAlign,n as directionOutsetPlace};
|
2
|
+
//# sourceMappingURL=direction.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"direction.js","sources":["../src/core/direction.ts"],"sourcesContent":null,"names":["insetAlignSelector","unsafeCSS","directionInsetAlign","css","outsetPlaceSelector","directionOutsetPlace"],"mappings":"yCAEA,MAAMA,EAAqBC,EAAU,2BAWxBC,EAAiCC,CAAG,oBAAoBH,+BAAgDA,iCAAkDA,+BAAgDA,YAEjNI,EAAsBH,EAAU,4BAWzBI,EAAkCF,CAAG,oBAAoBC,qCAAuDA,iCAAmDA,iCAAmDA"}
|
package/core/global-style.d.ts
CHANGED
@@ -7,8 +7,6 @@ export default GlobalStyle;
|
|
7
7
|
export declare function scopePrefix(scope: string, len?: number): CSSResult;
|
8
8
|
export declare function variablePrefix(variable: string): CSSResult;
|
9
9
|
export declare const cssGlobalVars: {
|
10
|
-
foreground: CSSResult;
|
11
|
-
background: CSSResult;
|
12
10
|
clipBackground: CSSResult;
|
13
11
|
active: CSSResult;
|
14
12
|
passive: CSSResult;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"global-style.d.ts","sourceRoot":"","sources":["../src/core/global-style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3E,OAAO,EAAE,aAAa,EAAwB,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAE,KAAK,SAAS,EAAkB,MAAM,KAAK,CAAC;AAErD,qBAAa,WAAY,SAAQ,aAAa;CAAG;AACjD,eAAe,WAAW,CAAC;AAI3B,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,SAAI,GAAG,SAAS,CAE7D;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAE1D;AAED,eAAO,MAAM,aAAa,EAAE;IAC1B,
|
1
|
+
{"version":3,"file":"global-style.d.ts","sourceRoot":"","sources":["../src/core/global-style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3E,OAAO,EAAE,aAAa,EAAwB,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAE,KAAK,SAAS,EAAkB,MAAM,KAAK,CAAC;AAErD,qBAAa,WAAY,SAAQ,aAAa;CAAG;AACjD,eAAe,WAAW,CAAC;AAI3B,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,SAAI,GAAG,SAAS,CAE7D;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAE1D;AAED,eAAO,MAAM,aAAa,EAAE;IAC1B,cAAc,EAAE,SAAS,CAAC;IAC1B,MAAM,EAAE,SAAS,CAAC;IAClB,OAAO,EAAE,SAAS,CAAC;IACnB,OAAO,EAAE,yBAAyB,CAAC;IACnC,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,SAAS,CAAC;CAUlB,CAAC;AAEF,KAAK,yBAAyB,GAAG,MAAM,CAAC,MAAM,OAAO,UAAU,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC"}
|
package/core/global-style.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
import{presetsRGB as o}from"@godown/colors/presets-rgb.js";import{travel as r}from"@godown/colors/travel.js";import{trim as
|
1
|
+
import{presetsRGB as o}from"@godown/colors/presets-rgb.js";import{travel as r}from"@godown/colors/travel.js";import{trim as t,joinProperties as e,GodownElement as l}from"@godown/element";import{unsafeCSS as n,css as s}from"lit";class GlobalStyle extends l{}const a=t(GlobalStyle.godownConfig.prefix,"-");function i(o,r=1){return c(a+"-".repeat(r)+o)}function c(o){return n(`--${o}`)}const p={clipBackground:i("clip-background",2),active:i("active",2),passive:i("passive",2),_colors:{},input:i("input",2),white:i("color-white",2),black:i("color-black",2),color:i("color",2)};GlobalStyle.styles=[n(`:host{${p.black}:rgb(0 0 0);${p.white}:rgb(255 255 255);`+r(((o,r,t)=>{p._colors[o]||=[],p._colors[o].push(n(p.color+"-"+o+"-"+r));const e=`-${o}-${r}`;return`${p.color+e}:rgb(${t});`}),o).join("")+e([[p.active,`var(${p._colors.blue[5]})`],[p.passive,`var(${p._colors.darkgray[5]})`],[p.clipBackground,`linear-gradient(to bottom, var(${p._colors.lightgray[0]}), var(${p._colors.darkgray[5]}))`]])+"}"),s`*{border:0;box-sizing:border-box;font-size:100%;font-style:normal;margin:0;outline:0;padding:0}:host{box-sizing:border-box}a{text-decoration:none}span{white-space:nowrap}svg{-webkit-user-select:none;user-select:none}:host([contents]){display:contents}:where(:host([contents]) [part=root]){all:inherit;display:revert}`];export{GlobalStyle,p as cssGlobalVars,GlobalStyle as default,i as scopePrefix,c as variablePrefix};
|
2
2
|
//# sourceMappingURL=global-style.js.map
|
package/core/global-style.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"global-style.js","sources":["../src/core/global-style.ts"],"sourcesContent":null,"names":["GlobalStyle","GodownElement","cssvar","trim","godownConfig","prefix","scopePrefix","scope","len","variablePrefix","repeat","variable","unsafeCSS","cssGlobalVars","
|
1
|
+
{"version":3,"file":"global-style.js","sources":["../src/core/global-style.ts"],"sourcesContent":null,"names":["GlobalStyle","GodownElement","cssvar","trim","godownConfig","prefix","scopePrefix","scope","len","variablePrefix","repeat","variable","unsafeCSS","cssGlobalVars","clipBackground","active","passive","_colors","input","white","black","color","styles","travel","key","gradient","rgb","push","endKey","presetsRGB","join","joinProperties","blue","darkgray","lightgray","css"],"mappings":"oOAKM,MAAOA,oBAAoBC,GAGjC,MAAMC,EAASC,EAAKH,YAAYI,aAAaC,OAAQ,cAErCC,EAAYC,EAAeC,EAAM,GAC/C,OAAOC,EAAeP,EAAS,IAAIQ,OAAOF,GAAOD,EACnD,CAEM,SAAUE,EAAeE,GAC7B,OAAOC,EAAU,KAAKD,IACxB,CAEa,MAAAE,EAST,CACFC,eAAgBR,EAAY,kBAAmB,GAC/CS,OAAQT,EAAY,SAAU,GAC9BU,QAASV,EAAY,UAAW,GAChCW,QAAS,CAA+B,EACxCC,MAAOZ,EAAY,QAAS,GAC5Ba,MAAOb,EAAY,cAAe,GAClCc,MAAOd,EAAY,cAAe,GAClCe,MAAOf,EAAY,QAAS,IAI9BN,YAAYsB,OAAS,CACnBV,EAEI,SAAGC,EAAcO,oBACdP,EAAcM,0BACjBI,GAAO,CAACC,EAAKC,EAAUC,KACrBb,EAAcI,QAAQO,KAAS,GAC/BX,EAAcI,QAAQO,GAAKG,KAAKf,EAAUC,EAAcQ,MAAQ,IAAMG,EAAM,IAAMC,IAClF,MAAMG,EAAS,IAAIJ,KAAOC,IAE1B,MAAO,GADUZ,EAAcQ,MAAQO,SACbF,KAAO,GAChCG,GAAYC,KAAK,IACpBC,EAAe,CACb,CAAClB,EAAcE,OAAQ,OAAOF,EAAcI,QAAQe,KAAK,OACzD,CAACnB,EAAcG,QAAS,OAAOH,EAAcI,QAAQgB,SAAS,OAC9D,CACEpB,EAAcC,eACd,kCAAkCD,EAAcI,QAAQiB,UAAU,YAAYrB,EAAcI,QAAQgB,SAAS,UAGjH,KAEJE,CAAG"}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { type CSSResult } from "lit";
|
2
|
+
type OutlineVars = {
|
3
|
+
width: string | CSSResult;
|
4
|
+
color: string | CSSResult;
|
5
|
+
};
|
6
|
+
/**
|
7
|
+
* The `OutlineBuilder` class is responsible for generating CSS styles for various types of outlines.
|
8
|
+
*/
|
9
|
+
export declare class OutlineBuilder {
|
10
|
+
css: CSSResult;
|
11
|
+
/**
|
12
|
+
* @param vars.width The width variable of the outline.
|
13
|
+
* @param vars.color The color variable of the outline.
|
14
|
+
*/
|
15
|
+
constructor(vars: OutlineVars);
|
16
|
+
get styleSheet(): CSSStyleSheet;
|
17
|
+
}
|
18
|
+
export type OutlineType = "outline" | "outline-inset" | "box-shadow" | "box-shadow-inset" | "border";
|
19
|
+
export {};
|
20
|
+
//# sourceMappingURL=outline.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"outline.d.ts","sourceRoot":"","sources":["../src/core/outline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,KAAK,CAAC;AAErD,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B,CAAC;AAEF;;GAEG;AACH,qBAAa,cAAc;IACzB,GAAG,EAAE,SAAS,CAAC;IAEf;;;OAGG;gBACS,IAAI,EAAE,WAAW;IAM7B,IAAI,UAAU,IAAI,aAAa,CAE9B;CACF;AAED,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,eAAe,GAAG,YAAY,GAAG,kBAAkB,GAAG,QAAQ,CAAC"}
|
package/core/outline.js
ADDED
@@ -0,0 +1,2 @@
|
|
1
|
+
import{unsafeCSS as t,css as e}from"lit";class OutlineBuilder{constructor(o){const i=t(o.width),l=t(o.color);this.css=e`[outline-type=outline-inset],[outline-type=outline]{outline-color:var(${l});outline-style:solid;outline-width:var(${i})}[outline-type=outline-inset]{outline-offset:calc(var(${i})*-1)}[outline-type=box-shadow]{box-shadow:0 0 0 var(${i}) var(${l})}[outline-type=box-shadow-inset]{box-shadow:inset 0 0 0 var(${i}) var(${l})}[outline-type=border]{border-color:var(${l});border-style:solid;border-width:var(${i})}`}get styleSheet(){return this.css.styleSheet}}export{OutlineBuilder};
|
2
|
+
//# sourceMappingURL=outline.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"outline.js","sources":["../src/core/outline.ts"],"sourcesContent":null,"names":["OutlineBuilder","constructor","vars","width","unsafeCSS","color","this","css","styleSheet"],"mappings":"+CAUaA,eAOX,WAAAC,CAAYC,GACV,MAAMC,EAAQC,EAAUF,EAAKC,OACvBE,EAAQD,EAAUF,EAAKG,OAC7BC,KAAKC,IAAMA,CAAG,yEAAyEF,4CAAgDF,2DAA+DA,yDAA6DA,UAAcE,iEAAqEF,UAAcE,6CAAiDA,0CAA8CF,MAGrc,cAAIK,GACF,OAAOF,KAAKC,IAAIC"}
|
package/core/super-anchor.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { type TemplateResult } from "lit";
|
2
2
|
import { GlobalStyle } from "./global-style.js";
|
3
|
-
declare class SuperAnchor extends GlobalStyle {
|
3
|
+
declare abstract class SuperAnchor extends GlobalStyle {
|
4
4
|
/**
|
5
5
|
* A element href.
|
6
6
|
*/
|
@@ -11,7 +11,7 @@ declare class SuperAnchor extends GlobalStyle {
|
|
11
11
|
target: "_blank" | "_self" | "_parent" | "_top";
|
12
12
|
get pathname(): string;
|
13
13
|
protected render(): TemplateResult<1>;
|
14
|
-
protected _handleClick(_: MouseEvent): void;
|
14
|
+
protected abstract _handleClick(_: MouseEvent): void;
|
15
15
|
}
|
16
16
|
export default SuperAnchor;
|
17
17
|
export { SuperAnchor };
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"super-anchor.d.ts","sourceRoot":"","sources":["../src/core/super-anchor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAsB,MAAM,KAAK,CAAC;AAG9D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,
|
1
|
+
{"version":3,"file":"super-anchor.d.ts","sourceRoot":"","sources":["../src/core/super-anchor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAsB,MAAM,KAAK,CAAC;AAG9D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,uBACe,WAAY,SAAQ,WAAW;IAC5C;;OAEG;IAEH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IAEH,MAAM,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAW;IAE1D,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;IAIrC,SAAS,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI;CACrD;AAED,eAAe,WAAW,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
package/core/super-anchor.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
import{__decorate as t}from"tslib";import{styles as r,attr as o,htmlSlot as e}from"@godown/element";import{css as i,html as
|
1
|
+
import{__decorate as t}from"tslib";import{styles as r,attr as o,htmlSlot as e}from"@godown/element";import{css as i,html as a,nothing as l}from"lit";import{property as n}from"lit/decorators.js";import{GlobalStyle as s}from"./global-style.js";let h=class SuperAnchor extends s{constructor(){super(...arguments),this.target="_self"}get pathname(){return new URL(this.href,location.href).pathname}render(){return a`<a part="root" ${o(this.observedRecord)} href="${this.href||l}" target="${this.target}" @click="${this._handleClick}">${e()}</a>`}};t([n()],h.prototype,"href",void 0),t([n()],h.prototype,"target",void 0),h=t([r(i`:host{color:currentColor;cursor:default;display:inline-block;text-decoration:none}:host([href]){cursor:pointer}[part=root]{color:inherit;display:inline-block;text-decoration:inherit;width:100%}`)],h);var c=h;export{h as SuperAnchor,c as default};
|
2
2
|
//# sourceMappingURL=super-anchor.js.map
|
package/core/super-anchor.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"super-anchor.js","sources":["../src/core/super-anchor.ts"],"sourcesContent":null,"names":["SuperAnchor","GlobalStyle","constructor","this","target","pathname","URL","href","location","render","html","attr","observedRecord","nothing","_handleClick","htmlSlot","
|
1
|
+
{"version":3,"file":"super-anchor.js","sources":["../src/core/super-anchor.ts"],"sourcesContent":null,"names":["SuperAnchor","GlobalStyle","constructor","this","target","pathname","URL","href","location","render","html","attr","observedRecord","nothing","_handleClick","htmlSlot","__decorate","property","prototype","undefined","styles","css","SuperAnchor$1"],"mappings":"kPAOA,IAAeA,EAAf,MAAeA,oBAAoBC,EAAnC,WAAAC,uBAWEC,KAAMC,OAA4C,QAElD,YAAIC,GACF,OAAO,IAAIC,IAAIH,KAAKI,KAAMC,SAASD,MAAMF,SAGjC,MAAAI,GACR,OAAOC,CAAI,kBAGLC,EAAKR,KAAKS,yBACJT,KAAKI,MAAQM,cACXV,KAAKC,mBACND,KAAKW,iBAEZC,YArBRC,EAAA,CADCC,KACWjB,EAAAkB,UAAA,YAAAC,GAMZH,EAAA,CADCC,KACwDjB,EAAAkB,UAAA,cAAAC,GAX5CnB,EAAWgB,EAAA,CADzBI,EAAOC,CAAG,sMACIrB,GAkCf,IAAAsB,EAAetB"}
|
package/core/super-input.d.ts
CHANGED
@@ -1,14 +1,16 @@
|
|
1
1
|
import { type HandlerEvent } from "@godown/element";
|
2
2
|
import { type TemplateResult } from "lit";
|
3
3
|
import { GlobalStyle } from "./global-style.js";
|
4
|
-
|
4
|
+
import { type OutlineType } from "./outline.js";
|
5
|
+
declare class SuperInput<V = string> extends GlobalStyle {
|
5
6
|
autofocus: boolean;
|
6
7
|
autocomplete: string | boolean;
|
8
|
+
outlineType: OutlineType;
|
7
9
|
disabled: boolean;
|
8
10
|
type: InputType;
|
9
11
|
placeholder: string;
|
10
12
|
name: string;
|
11
|
-
value:
|
13
|
+
value: V;
|
12
14
|
get observedRecord(): Record<string, any>;
|
13
15
|
/**
|
14
16
|
* default property records the default or initial value and is used to reset the input.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"super-input.d.ts","sourceRoot":"","sources":["../src/core/super-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAgC,MAAM,iBAAiB,CAAC;
|
1
|
+
{"version":3,"file":"super-input.d.ts","sourceRoot":"","sources":["../src/core/super-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAgC,MAAM,iBAAiB,CAAC;AAClF,OAAO,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAGrD,OAAO,EAAE,WAAW,EAAiB,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAkB,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAMhE,cAQM,UAAU,CAAC,CAAC,GAAG,MAAM,CAAE,SAAQ,WAAW;IAC9C,SAAS,UAAS;IAElB,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC;IAG/B,WAAW,EAAE,WAAW,CAAY;IAGpC,QAAQ,UAAS;IAGjB,IAAI,EAAE,SAAS,CAAC;IAGhB,WAAW,EAAE,MAAM,CAAC;IAGpB,IAAI,EAAE,MAAM,CAAC;IAGb,KAAK,EAAE,CAAC,CAAC;IAET,IAAI,cAAc,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAExC;IAED;;OAEG;IAEH,OAAO,EAAE,GAAG,CAAC;IAGb,SAAS,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAEnC;;OAEG;IACH,WAAW,UAAS;IAEpB,IAAI,YAAY,CAAC,KAAK,EAAE,OAAO,IAAI,CAAC,OAAO,EAE1C;IAED,IAAI,YAAY,IAJQ,OAAO,IAAI,CAAC,OAAO,CAM1C;IAED,SAAS,CAAC,MAAM,EAAE,MAAM,CAAuC;IAE/D,SAAS,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC;IAI1B,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAkB;IAEhD,KAAK,IAAI,IAAI;IAKb,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,YAAY,CAAC,gBAAgB,CAAC,GAAG,IAAI;IAiB/D,iBAAiB,IAAI,IAAI;IAKzB,SAAS,CAAC,cAAc,IAAI,IAAI;IAKhC,SAAS,CAAC,gBAAgB,IAAI,IAAI;IAUlC,SAAS,CAAC,gBAAgB,CAAC,CAAC,EAAE,OAAO,IAAI,CAAC,IAAI,GAAG,IAAI;IAMrD,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,IAAI;IAInC,SAAS,CAAC,YAAY,IAAI,IAAI;IAI9B,SAAS,CAAC,aAAa,IAAI,cAAc,CAAC,CAAC,CAAC;IAI5C,SAAS,CAAC,aAAa,IAAI,cAAc,CAAC,CAAC,CAAC;CAG7C;AAED,eAAe,UAAU,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,CAAC;AAEtB,KAAK,SAAS,GACV,QAAQ,GACR,MAAM,GACN,QAAQ,GACR,KAAK,GACL,KAAK,GACL,OAAO,GACP,UAAU,GACV,UAAU,GACV,MAAM,GACN,OAAO,GACP,MAAM,GACN,MAAM,GACN,gBAAgB,GAChB,QAAQ,GACR,OAAO,GACP,OAAO,GACP,UAAU,GACV,OAAO,GACP,MAAM,GACN,OAAO,CAAC"}
|
package/core/super-input.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
import{__decorate as t}from"tslib";import{part as e,styles as i,omit as
|
1
|
+
import{__decorate as t}from"tslib";import{part as e,styles as i,omit as o,htmlSlot as n}from"@godown/element";import{css as r,html as s}from"lit";import{property as a}from"lit/decorators.js";import{cssGlobalVars as p,GlobalStyle as l}from"./global-style.js";import{OutlineBuilder as u}from"./outline.js";const d=r`.input-field{--space:var(${p.input}-space);align-items:center;border-radius:inherit;display:flex;height:inherit;position:relative}.input-field [part=input]{background:none;color:inherit;height:100%;padding:0 var(--space);width:100%}.input-field [part=icon]{align-items:center;color:var(${p.input}-icon-color);display:flex;justify-content:center}.input-field [part=prefix],.input-field [part=suffix]{display:flex;height:100%}.input-field [part=suffix] [part=icon]{padding-inline-end:var(--space)}.input-field [part=prefix] [part=icon]{padding-inline-start:var(--space)}`,c=r`:host{${p.input}-width:10em;${p.input}-height:1.6em;${p.input}-space:0.2em;${p.input}-control:currentColor;${p.input}-outline-width:.075em;${p.input}-outline-color:var(${p._colors.darkgray[4]});${p.input}-icon-color:var(${p._colors.darkgray[4]});border-radius:.2em}:host([disabled]){cursor:not-allowed;filter:brightness(.85)}:host(:focus-within){${p.input}-icon-color:currentColor}input:disabled{cursor:inherit}input::-ms-clear,input::-ms-reveal{display:none}`;let h=class SuperInput extends l{constructor(){super(...arguments),this.autofocus=!1,this.outlineType="border",this.disabled=!1,this.compositing=!1,this.makeId=Math.random().toString(36).slice(1),this.nameValue=this.namevalue}get observedRecord(){return o(super.observedRecord,"default","value")}set defaultValue(t){this.default=t}get defaultValue(){return this.default}namevalue(){return[this.name,this.value]}reset(){this.value=this.default,this._input.value=this.default}_handleInput(t){t.stopPropagation(),this.compositing||(this.value=t.target.value?.trim(),this.dispatchEvent(new CustomEvent("input",{detail:this.value,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("input",{detail:this.value,composed:!0,bubbles:!0})),this.dispatchEvent(new CustomEvent("change",{detail:this.value,composed:!0})))}connectedCallback(){super.connectedCallback(),this._connectedInit()}_connectedInit(){this.default??=this.value||"",this.value??=this.default}_compositionInit(){this._input&&(this.events.add(this._input,"compositionstart",(()=>this.compositing=!0)),this.events.add(this._input,"compositionend",(t=>{this.compositing=!1,this._handleInput(t)})))}_changeInputType(t){this._input&&(this._input.type=t)}focus(t){this._input?.focus(t)}firstUpdated(){this._compositionInit()}_renderPrefix(){return s`<label for="${this.makeId}" part="prefix">${n("prefix")}</label>`}_renderSuffix(){return s`<label for="${this.makeId}" part="suffix">${n("suffix")}</label>`}};t([a()],h.prototype,"autocomplete",void 0),t([a({attribute:"outline-type"})],h.prototype,"outlineType",void 0),t([a({type:Boolean,reflect:!0})],h.prototype,"disabled",void 0),t([a({reflect:!0})],h.prototype,"type",void 0),t([a({reflect:!0})],h.prototype,"placeholder",void 0),t([a({reflect:!0})],h.prototype,"name",void 0),t([a()],h.prototype,"value",void 0),t([a()],h.prototype,"default",void 0),t([e("input")],h.prototype,"_input",void 0),h=t([i(d,new u({width:`${p.input}-outline-width`,color:`${p.input}-outline-color`}).styleSheet,c)],h);var f=h;export{h as SuperInput,f as default};
|
2
2
|
//# sourceMappingURL=super-input.js.map
|
package/core/super-input.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"super-input.js","sources":["../src/core/super-input.ts"],"sourcesContent":null,"names":["fieldStyle","css","cssGlobalVars","input","inputStyle","
|
1
|
+
{"version":3,"file":"super-input.js","sources":["../src/core/super-input.ts"],"sourcesContent":null,"names":["fieldStyle","css","cssGlobalVars","input","inputStyle","_colors","darkgray","SuperInput","GlobalStyle","constructor","this","autofocus","outlineType","disabled","compositing","makeId","Math","random","toString","slice","nameValue","namevalue","observedRecord","omit","super","defaultValue","value","default","name","reset","_input","_handleInput","e","stopPropagation","target","trim","dispatchEvent","CustomEvent","detail","bubbles","composed","connectedCallback","_connectedInit","_compositionInit","events","add","_changeInputType","t","type","focus","options","firstUpdated","_renderPrefix","html","htmlSlot","_renderSuffix","__decorate","property","prototype","undefined","attribute","Boolean","reflect","part","styles","OutlineBuilder","width","color","styleSheet","SuperInput$1"],"mappings":"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"}
|
package/core/super-openable.d.ts
CHANGED
@@ -13,8 +13,4 @@ declare class SuperOpenable extends GlobalStyle {
|
|
13
13
|
}
|
14
14
|
export default SuperOpenable;
|
15
15
|
export { SuperOpenable };
|
16
|
-
export type Direction4 = "left" | "right" | "top" | "bottom";
|
17
|
-
export type Direction5 = Direction4 | "center";
|
18
|
-
export type Direction8 = Direction4 | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
19
|
-
export type Direction9 = Direction8 | Direction5;
|
20
16
|
//# sourceMappingURL=super-openable.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"super-openable.d.ts","sourceRoot":"","sources":["../src/core/super-openable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,KAAK,CAAC;AAG5C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,cAAM,aAAc,SAAQ,WAAW;IACrC;;OAEG;IAEH,IAAI,UAAS;IAEb,MAAM,CAAC,EAAE,GAAE,OAAsC,GAAG,IAAI;IAIxD,KAAK,IAAI,IAAI;IAIb,IAAI,IAAI,IAAI;IAIZ,SAAS,CAAC,OAAO,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,IAAI,CAAC,GAAG,IAAI;IAOlE,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI;CAG5C;AAED,eAAe,aAAa,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,CAAC
|
1
|
+
{"version":3,"file":"super-openable.d.ts","sourceRoot":"","sources":["../src/core/super-openable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,KAAK,CAAC;AAG5C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,cAAM,aAAc,SAAQ,WAAW;IACrC;;OAEG;IAEH,IAAI,UAAS;IAEb,MAAM,CAAC,EAAE,GAAE,OAAsC,GAAG,IAAI;IAIxD,KAAK,IAAI,IAAI;IAIb,IAAI,IAAI,IAAI;IAIZ,SAAS,CAAC,OAAO,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,IAAI,CAAC,GAAG,IAAI;IAOlE,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI;CAG5C;AAED,eAAe,aAAa,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,CAAC"}
|