godown 3.11.2 → 3.13.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 +12 -13
- package/build/godown+lit.iife.js.map +1 -1
- package/build/godown+lit.js +11 -12
- package/build/godown+lit.js.map +1 -1
- package/build/godown+lit.umd.js +12 -13
- package/build/godown+lit.umd.js.map +1 -1
- package/build/godown.iife.js +9 -8
- package/build/godown.iife.js.map +1 -0
- package/build/godown.js +7 -7
- package/build/godown.js.map +1 -1
- package/build/godown.umd.js +8 -8
- package/build/godown.umd.js.map +1 -1
- package/custom-elements.json +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +1 -1
- package/internal/global-style.d.ts.map +1 -1
- package/internal/global-style.js +1 -1
- package/internal/global-style.js.map +1 -1
- package/internal/popover.d.ts +3 -0
- package/internal/popover.d.ts.map +1 -0
- package/internal/popover.js +2 -0
- package/internal/popover.js.map +1 -0
- package/internal/reset-style.d.ts +3 -0
- package/internal/reset-style.d.ts.map +1 -0
- package/internal/reset-style.js +2 -0
- package/internal/reset-style.js.map +1 -0
- package/internal/ring.d.ts +1 -0
- package/internal/ring.d.ts.map +1 -1
- package/internal/ring.js +1 -1
- package/internal/ring.js.map +1 -1
- package/internal/super-input.d.ts +1 -4
- package/internal/super-input.d.ts.map +1 -1
- package/internal/super-input.js +1 -1
- package/internal/super-input.js.map +1 -1
- package/internal/utils.d.ts +2 -0
- package/internal/utils.d.ts.map +1 -0
- package/internal/utils.js +2 -0
- package/internal/utils.js.map +1 -0
- package/package.json +3 -4
- package/popover.d.ts +2 -0
- package/popover.d.ts.map +1 -0
- package/popover.js +2 -0
- package/popover.js.map +1 -0
- package/src/index.ts +1 -0
- package/src/internal/global-style.ts +6 -34
- package/src/internal/popover.ts +64 -0
- package/src/internal/reset-style.ts +63 -0
- package/src/internal/ring.ts +3 -2
- package/src/internal/super-input.ts +2 -33
- package/src/internal/utils.ts +10 -0
- package/src/popover.ts +1 -0
- package/src/web-components/alert/component.ts +5 -4
- package/src/web-components/avatar/component.ts +1 -0
- package/src/web-components/button/component.ts +22 -18
- package/src/web-components/card/component.ts +3 -2
- package/src/web-components/chip/component.ts +1 -3
- package/src/web-components/details/component.ts +28 -17
- package/src/web-components/dialog/component.ts +51 -67
- package/src/web-components/heading/component.ts +0 -1
- package/src/web-components/input/component.ts +38 -30
- package/src/web-components/layout/component.ts +1 -0
- package/src/web-components/link/component.ts +0 -2
- package/src/web-components/popover/component.ts +172 -0
- package/src/web-components/popover/definition.ts +11 -0
- package/src/web-components/range/component.ts +2 -1
- package/src/web-components/rotate/component.ts +0 -1
- package/src/web-components/select/component.ts +109 -173
- package/src/web-components/split/component.ts +2 -2
- package/src/web-components/switch/component.ts +2 -1
- package/src/web-components/tabs/component.ts +99 -100
- package/src/web-components/text/component.ts +47 -52
- package/src/web-components/time/component.ts +5 -15
- package/src/web-components/tooltip/component.ts +44 -111
- package/vscode.css-custom-data.json +1 -1
- package/vscode.html-custom-data.json +1 -1
- package/web-components/alert/component.d.ts.map +1 -1
- package/web-components/alert/component.js +1 -1
- package/web-components/alert/component.js.map +1 -1
- package/web-components/avatar/component.d.ts.map +1 -1
- package/web-components/avatar/component.js +1 -1
- package/web-components/avatar/component.js.map +1 -1
- package/web-components/button/component.d.ts.map +1 -1
- package/web-components/button/component.js +1 -1
- package/web-components/button/component.js.map +1 -1
- package/web-components/card/component.d.ts.map +1 -1
- package/web-components/card/component.js +1 -1
- package/web-components/card/component.js.map +1 -1
- package/web-components/chip/component.d.ts +1 -3
- package/web-components/chip/component.d.ts.map +1 -1
- package/web-components/chip/component.js.map +1 -1
- package/web-components/details/component.d.ts +9 -13
- package/web-components/details/component.d.ts.map +1 -1
- package/web-components/details/component.js +1 -1
- package/web-components/details/component.js.map +1 -1
- package/web-components/dialog/component.d.ts +12 -14
- package/web-components/dialog/component.d.ts.map +1 -1
- package/web-components/dialog/component.js +1 -1
- package/web-components/dialog/component.js.map +1 -1
- package/web-components/heading/component.d.ts.map +1 -1
- package/web-components/heading/component.js +1 -1
- package/web-components/heading/component.js.map +1 -1
- package/web-components/input/component.d.ts +3 -1
- package/web-components/input/component.d.ts.map +1 -1
- package/web-components/input/component.js +1 -1
- package/web-components/input/component.js.map +1 -1
- package/web-components/layout/component.d.ts.map +1 -1
- package/web-components/layout/component.js +1 -1
- package/web-components/layout/component.js.map +1 -1
- package/web-components/link/component.d.ts.map +1 -1
- package/web-components/link/component.js +1 -1
- package/web-components/link/component.js.map +1 -1
- package/web-components/popover/component.d.ts +35 -0
- package/web-components/popover/component.d.ts.map +1 -0
- package/web-components/popover/component.js +2 -0
- package/web-components/popover/component.js.map +1 -0
- package/web-components/popover/definition.d.ts +8 -0
- package/web-components/popover/definition.d.ts.map +1 -0
- package/web-components/popover/definition.js +2 -0
- package/web-components/popover/definition.js.map +1 -0
- package/web-components/range/component.d.ts.map +1 -1
- package/web-components/range/component.js +1 -1
- package/web-components/range/component.js.map +1 -1
- package/web-components/rotate/component.d.ts.map +1 -1
- package/web-components/rotate/component.js.map +1 -1
- package/web-components/select/component.d.ts +11 -27
- package/web-components/select/component.d.ts.map +1 -1
- package/web-components/select/component.js +1 -1
- package/web-components/select/component.js.map +1 -1
- package/web-components/split/component.js +1 -1
- package/web-components/split/component.js.map +1 -1
- package/web-components/switch/component.d.ts.map +1 -1
- package/web-components/switch/component.js +1 -1
- package/web-components/switch/component.js.map +1 -1
- package/web-components/tabs/component.d.ts +18 -25
- package/web-components/tabs/component.d.ts.map +1 -1
- package/web-components/tabs/component.js +1 -1
- package/web-components/tabs/component.js.map +1 -1
- package/web-components/text/component.d.ts +4 -7
- package/web-components/text/component.d.ts.map +1 -1
- package/web-components/text/component.js +1 -1
- package/web-components/text/component.js.map +1 -1
- package/web-components/time/component.d.ts +2 -2
- package/web-components/time/component.d.ts.map +1 -1
- package/web-components/time/component.js +1 -1
- package/web-components/time/component.js.map +1 -1
- package/web-components/tooltip/component.d.ts +15 -39
- package/web-components/tooltip/component.d.ts.map +1 -1
- package/web-components/tooltip/component.js +1 -1
- package/web-components/tooltip/component.js.map +1 -1
- package/web-types.json +1 -1
- package/internal/direction.d.ts +0 -27
- package/internal/direction.d.ts.map +0 -1
- package/internal/direction.js +0 -2
- package/internal/direction.js.map +0 -1
- package/internal/super-openable.d.ts +0 -15
- package/internal/super-openable.d.ts.map +0 -1
- package/internal/super-openable.js +0 -2
- package/internal/super-openable.js.map +0 -1
- package/src/internal/direction.ts +0 -65
- package/src/internal/super-openable.ts +0 -34
package/index.d.ts
CHANGED
@@ -17,6 +17,7 @@ export { default as Heading } from "./heading.js";
|
|
17
17
|
export { default as Input } from "./input.js";
|
18
18
|
export { default as Layout } from "./layout.js";
|
19
19
|
export { default as Link } from "./link.js";
|
20
|
+
export { default as Popover } from "./popover.js";
|
20
21
|
export { default as Progress } from "./progress.js";
|
21
22
|
export { default as Range } from "./range.js";
|
22
23
|
export { default as Rotate } from "./rotate.js";
|
package/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"__source__/","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,OAAO,IAA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M,cAAc,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,iBAAiB,CAAC"}
|
package/index.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
import"./web-components/alert/definition.js";import"./web-components/avatar/definition.js";import"./web-components/badge/definition.js";import"./web-components/breath/definition.js";import"./web-components/button/definition.js";import"./web-components/card/definition.js";import"./web-components/carousel/definition.js";import"./web-components/chip/definition.js";import"./web-components/details/definition.js";import"./web-components/dialog/definition.js";import"./web-components/divider/definition.js";import"./web-components/dragbox/definition.js";import"./web-components/flex/definition.js";import"./web-components/form/definition.js";import"./web-components/grid/definition.js";import"./web-components/heading/definition.js";import"./web-components/input/definition.js";import"./web-components/layout/definition.js";import"./web-components/link/definition.js";import"./web-components/progress/definition.js";import"./web-components/range/definition.js";import"./web-components/rotate/definition.js";import"./web-components/router/definition.js";import"./web-components/select/definition.js";import"./web-components/skeleton/definition.js";import"./web-components/split/definition.js";import"./web-components/switch/definition.js";import"./web-components/text/definition.js";import"./web-components/tabs/definition.js";import"./web-components/time/definition.js";import"./web-components/tooltip/definition.js";import"./web-components/typewriter/definition.js";export{default as Alert}from"./web-components/alert/component.js";export{default as Avatar}from"./web-components/avatar/component.js";export{default as Badge}from"./web-components/badge/component.js";export{default as Breath}from"./web-components/breath/component.js";export{default as Button}from"./web-components/button/component.js";export{default as Card}from"./web-components/card/component.js";export{default as Carousel}from"./web-components/carousel/component.js";export{default as Chip}from"./web-components/chip/component.js";export{default as Details}from"./web-components/details/component.js";export{default as Dialog}from"./web-components/dialog/component.js";export{default as Divider}from"./web-components/divider/component.js";export{default as Dragbox}from"./web-components/dragbox/component.js";export{default as Flex}from"./web-components/flex/component.js";export{default as Form}from"./web-components/form/component.js";export{default as Grid}from"./web-components/grid/component.js";export{default as Heading}from"./web-components/heading/component.js";export{default as Input}from"./web-components/input/component.js";export{default as Layout}from"./web-components/layout/component.js";export{default as Link}from"./web-components/link/component.js";export{default as Progress}from"./web-components/progress/component.js";export{default as Range}from"./web-components/range/component.js";export{default as Rotate}from"./web-components/rotate/component.js";export{default as Router}from"./web-components/router/component.js";export{default as Select}from"./web-components/select/component.js";export{default as Skeleton}from"./web-components/skeleton/component.js";export{default as Split}from"./web-components/split/component.js";export{default as Switch}from"./web-components/switch/component.js";export{default as Text}from"./web-components/text/component.js";export{default as Tabs}from"./web-components/tabs/component.js";export{default as Time}from"./web-components/time/component.js";export{default as Tooltip}from"./web-components/tooltip/component.js";export{default as Typewriter}from"./web-components/typewriter/component.js";
|
1
|
+
import"./web-components/alert/definition.js";import"./web-components/avatar/definition.js";import"./web-components/badge/definition.js";import"./web-components/breath/definition.js";import"./web-components/button/definition.js";import"./web-components/card/definition.js";import"./web-components/carousel/definition.js";import"./web-components/chip/definition.js";import"./web-components/details/definition.js";import"./web-components/dialog/definition.js";import"./web-components/divider/definition.js";import"./web-components/dragbox/definition.js";import"./web-components/flex/definition.js";import"./web-components/form/definition.js";import"./web-components/grid/definition.js";import"./web-components/heading/definition.js";import"./web-components/input/definition.js";import"./web-components/layout/definition.js";import"./web-components/link/definition.js";export{default as Popover}from"./web-components/popover/definition.js";import"./web-components/progress/definition.js";import"./web-components/range/definition.js";import"./web-components/rotate/definition.js";import"./web-components/router/definition.js";import"./web-components/select/definition.js";import"./web-components/skeleton/definition.js";import"./web-components/split/definition.js";import"./web-components/switch/definition.js";import"./web-components/text/definition.js";import"./web-components/tabs/definition.js";import"./web-components/time/definition.js";import"./web-components/tooltip/definition.js";import"./web-components/typewriter/definition.js";export{default as Alert}from"./web-components/alert/component.js";export{default as Avatar}from"./web-components/avatar/component.js";export{default as Badge}from"./web-components/badge/component.js";export{default as Breath}from"./web-components/breath/component.js";export{default as Button}from"./web-components/button/component.js";export{default as Card}from"./web-components/card/component.js";export{default as Carousel}from"./web-components/carousel/component.js";export{default as Chip}from"./web-components/chip/component.js";export{default as Details}from"./web-components/details/component.js";export{default as Dialog}from"./web-components/dialog/component.js";export{default as Divider}from"./web-components/divider/component.js";export{default as Dragbox}from"./web-components/dragbox/component.js";export{default as Flex}from"./web-components/flex/component.js";export{default as Form}from"./web-components/form/component.js";export{default as Grid}from"./web-components/grid/component.js";export{default as Heading}from"./web-components/heading/component.js";export{default as Input}from"./web-components/input/component.js";export{default as Layout}from"./web-components/layout/component.js";export{default as Link}from"./web-components/link/component.js";export{default as Progress}from"./web-components/progress/component.js";export{default as Range}from"./web-components/range/component.js";export{default as Rotate}from"./web-components/rotate/component.js";export{default as Router}from"./web-components/router/component.js";export{default as Select}from"./web-components/select/component.js";export{default as Skeleton}from"./web-components/skeleton/component.js";export{default as Split}from"./web-components/split/component.js";export{default as Switch}from"./web-components/switch/component.js";export{default as Text}from"./web-components/text/component.js";export{default as Tabs}from"./web-components/tabs/component.js";export{default as Time}from"./web-components/time/component.js";export{default as Tooltip}from"./web-components/tooltip/component.js";export{default as Typewriter}from"./web-components/typewriter/component.js";
|
2
2
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"global-style.d.ts","sourceRoot":"__source__/","sources":["internal/global-style.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,aAAa,EAA4C,MAAM,iBAAiB,CAAC;AAClH,OAAO,EAAE,KAAK,SAAS,EAAkB,MAAM,KAAK,CAAC;
|
1
|
+
{"version":3,"file":"global-style.d.ts","sourceRoot":"__source__/","sources":["internal/global-style.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,aAAa,EAA4C,MAAM,iBAAiB,CAAC;AAClH,OAAO,EAAE,KAAK,SAAS,EAAkB,MAAM,KAAK,CAAC;AAGrD,qBAAa,WAAY,SAAQ,aAAa;CAAG;AAEjD,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,KAAK,EAAE,SAAS,CAAC;IACjB,MAAM,EAAE,SAAS,CAAC;IAClB,SAAS,EAAE,SAAS,CAAC;IACrB,SAAS,EAAE,SAAS,CAAC;IACrB,UAAU,EAAE,SAAS,CAAC;IACtB,UAAU,EAAE,SAAS,CAAC;IACtB,iBAAiB,EAAE,SAAS,CAAC;IAC7B,iBAAiB,EAAE,SAAS,CAAC;IAC7B,KAAK,EAAE,SAAS,CAAC;CAclB,CAAC"}
|
package/internal/global-style.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
import{trim as r,declareLightDarkColors as o,joinRules as t,joinDeclarations as e,toVar as n,GodownElement as i}from"@godown/element";import{unsafeCSS as a,css as s}from"lit";class GlobalStyle extends i{}const
|
1
|
+
import{trim as r,declareLightDarkColors as o,joinRules as t,joinDeclarations as e,toVar as n,GodownElement as i}from"@godown/element";import{unsafeCSS as a,css as s}from"lit";import{resetStyle as d}from"./reset-style.js";class GlobalStyle extends i{}const l=r(GlobalStyle.godownConfig.prefix,"-");function u(r,o=1){return g(l+"-".repeat(o)+r)}function g(r){return a(`--${r}`)}const p={background:u("background",2),foreground:u("foreground",2),backgroundClip:u("background-clip",2),primaryBackground:u("primary",2),primaryForeground:u("primary-foreground",2),muted:u("muted",2),active:u("active",2),passive:u("passive",2),input:u("input",2),radius:u("radius",2),ringWidth:u("ring-width",2),ringColor:u("ring-color",2)};GlobalStyle.styles=[d,a(o(":host",[[p.background,["hsl(0 0% 96%)","hsl(0 0% 4%)"]],[p.foreground,["hsl(0 0% 4%)","hsl(0 0% 96%)"]],[p.muted,["hsl(0 0% 88%)","hsl(0 0% 18%)"]]],1)),a(t({":host":e([[p.primaryBackground,n(p.foreground)],[p.primaryForeground,n(p.background)],[p.active,n(p.primaryBackground)],[p.passive,n(p.muted)],[p.backgroundClip,`linear-gradient(to bottom, ${n(p.foreground)}, ${n(p.muted)})`],[p.ringColor,n(p.passive)],[p.ringWidth,".075em"]])})),s`:host([contents]){display:contents}[part=root]{height:100%;width:100%}:host([contents]) [part=root]{height:inherit;width:inherit}:where(:host([contents]) [part=root]){all:inherit;display:revert}`,s`:host{${p.radius}:0.2em;border-radius:var(${p.radius});border-style:none;outline-style:none}`];export{GlobalStyle,p as cssGlobalVars,GlobalStyle as default,u as scopePrefix,g as variablePrefix};
|
2
2
|
//# sourceMappingURL=global-style.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"global-style.js","sources":["../src/internal/global-style.ts"],"sourcesContent":null,"names":["GlobalStyle","GodownElement","cssvar","trim","godownConfig","prefix","scopePrefix","scope","len","variablePrefix","repeat","variable","unsafeCSS","cssGlobalVars","background","foreground","backgroundClip","primaryBackground","primaryForeground","muted","active","passive","input","radius","ringWidth","ringColor","styles","declareLightDarkColors","joinRules","joinDeclarations","toVar","css"],"mappings":"
|
1
|
+
{"version":3,"file":"global-style.js","sources":["../src/internal/global-style.ts"],"sourcesContent":null,"names":["GlobalStyle","GodownElement","cssvar","trim","godownConfig","prefix","scopePrefix","scope","len","variablePrefix","repeat","variable","unsafeCSS","cssGlobalVars","background","foreground","backgroundClip","primaryBackground","primaryForeground","muted","active","passive","input","radius","ringWidth","ringColor","styles","resetStyle","declareLightDarkColors","joinRules","joinDeclarations","toVar","css"],"mappings":"6NAIM,MAAOA,oBAAoBC,GAIjC,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,EAaT,CACFC,WAAYR,EAAY,aAAc,GACtCS,WAAYT,EAAY,aAAc,GACtCU,eAAgBV,EAAY,kBAAmB,GAC/CW,kBAAmBX,EAAY,UAAW,GAC1CY,kBAAmBZ,EAAY,qBAAsB,GACrDa,MAAOb,EAAY,QAAS,GAC5Bc,OAAQd,EAAY,SAAU,GAC9Be,QAASf,EAAY,UAAW,GAChCgB,MAAOhB,EAAY,QAAS,GAC5BiB,OAAQjB,EAAY,SAAU,GAC9BkB,UAAWlB,EAAY,aAAc,GACrCmB,UAAWnB,EAAY,aAAc,IAGvCN,YAAY0B,OAAS,CACnBC,EACAf,EACEgB,EACE,QACA,CACE,CAACf,EAAcC,WAAY,CAAC,gBAAiB,iBAC7C,CAACD,EAAcE,WAAY,CAAC,eAAgB,kBAC5C,CAACF,EAAcM,MAAO,CAAC,gBAAiB,mBAE1C,IAGJP,EACEiB,EAAU,CACR,QAASC,EAAiB,CACxB,CAACjB,EAAcI,kBAAmBc,EAAMlB,EAAcE,aACtD,CAACF,EAAcK,kBAAmBa,EAAMlB,EAAcC,aACtD,CAACD,EAAcO,OAAQW,EAAMlB,EAAcI,oBAC3C,CAACJ,EAAcQ,QAASU,EAAMlB,EAAcM,QAC5C,CACEN,EAAcG,eACd,8BAA8Be,EAAMlB,EAAcE,gBAAgBgB,EAAMlB,EAAcM,WAExF,CAACN,EAAcY,UAAWM,EAAMlB,EAAcQ,UAC9C,CAACR,EAAcW,UAAW,eAIhCQ,CAAG"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"popover.d.ts","sourceRoot":"__source__/","sources":["internal/popover.ts"],"names":[],"mappings":"AAoBA,eAAO,MAAM,WAAW,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAKlD,CAAC;AAiCH,eAAO,MAAM,WAAW,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,WAAW,EAAE,OAAO,EAAE,WAAW,KAAK,IAK5E,CAAC"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{memoize as t}from"./utils.js";const e="popover",n=()=>Object.hasOwn(HTMLElement.prototype,e),o=t=>t.getAttribute(e),s=t=>{t.style.display="none"},l=t((t=>n()?(t=>{null!==o(t)?t.hidePopover():s(t)})(t):s(t)));function i(t){if(t.style.display="block",this&&"manual"!==o(t)){const e="click",n=o=>{this.contains(o.target)||(t.dispatchEvent(new Event("toggle",{bubbles:!0,composed:!0,newState:"closed"})),l(t),document.removeEventListener(e,n))};document.addEventListener(e,n)}}function c(t){null!==o(t)?t.showPopover():i.call(this,t)}const r=t((function(t){return n()?c.call(this,t):i.call(this,t)}));export{l as hidePopover,r as showPopover};
|
2
|
+
//# sourceMappingURL=popover.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"popover.js","sources":["../src/internal/popover.ts"],"sourcesContent":null,"names":["POPOVER","supportPopover","Object","hasOwn","HTMLElement","prototype","getPopoverAttribute","element","getAttribute","shimHide","style","display","hidePopover","memoize","standardHide","shimShow","this","listenType","listener","e","contains","target","dispatchEvent","Event","bubbles","composed","newState","document","removeEventListener","addEventListener","standardShow","showPopover","call"],"mappings":"qCAEA,MAAMA,EAAU,UAEVC,EAAiB,IAAMC,OAAOC,OAAOC,YAAYC,UAAWL,GAE5DM,EAAuBC,GAAyBA,EAAQC,aAAaR,GAErES,EAAYF,IAChBA,EAAQG,MAAMC,QAAU,MAAM,EAWnBC,EAA8CC,GAASN,GAC9DN,IATe,CAACM,IACiB,OAAjCD,EAAoBC,GACtBA,EAAQK,cAERH,EAASF,IAMFO,CAAaP,GAEfE,EAASF,KAGlB,SAASQ,EAAmCR,GAG1C,GAFAA,EAAQG,MAAMC,QAAU,QAEpBK,MAAyC,WAAjCV,EAAoBC,GAAuB,CACrD,MAAMU,EAAa,QACbC,EAAYC,IACXH,KAAKI,SAASD,EAAEE,UACnBd,EAAQe,cACN,IAAIC,MAAM,SAAU,CAClBC,SAAS,EACTC,UAAU,EACVC,SAAU,YAGdd,EAAYL,GACZoB,SAASC,oBAAoBX,EAAYC,KAI7CS,SAASE,iBAAiBZ,EAAYC,GAE1C,CAEA,SAASY,EAAuCvB,GACT,OAAjCD,EAAoBC,GACtBA,EAAQwB,cAERhB,EAASiB,KAAKhB,KAAMT,EAExB,CAEa,MAAAwB,EAAwElB,GAAQ,SAAgBN,GAC3G,OAAIN,IACK6B,EAAaE,KAAKhB,KAAMT,GAE1BQ,EAASiB,KAAKhB,KAAMT,EAC7B"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"reset-style.d.ts","sourceRoot":"__source__/","sources":["internal/reset-style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,SAAS,EAAE,MAAM,KAAK,CAAC;AAE1C,eAAO,MAAM,UAAU,EAAE,SA4DxB,CAAC"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{css as o}from"lit";const e=o`*,:host{box-sizing:border-box}i{font-style:normal}a{color:currentColor;text-decoration:none}span{white-space:nowrap}svg{-webkit-user-select:none;user-select:none}input{background:none;border:0;color:currentColor;font-size:100%;outline:0;padding:0}dd,dl{margin:0}dialog,ul{margin:0;padding:0}dialog{border:0;outline:0}[popover]{border:0;margin:0;padding:0}@supports not selector(:popover-open){[popover]{display:none}}`;export{e as resetStyle};
|
2
|
+
//# sourceMappingURL=reset-style.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"reset-style.js","sources":["../src/internal/reset-style.ts"],"sourcesContent":null,"names":["resetStyle","css"],"mappings":"0BAEO,MAAMA,EAAwBC,CAAG"}
|
package/internal/ring.d.ts
CHANGED
@@ -15,5 +15,6 @@ export declare class RingBuilder {
|
|
15
15
|
}
|
16
16
|
export type RingType = "outline" | "outline-inset" | "shadow" | "shadow-inset" | "border" | "none" | undefined;
|
17
17
|
export declare const isNone: (type: RingType) => boolean;
|
18
|
+
export declare const ringTypeAttribute = "ring-type";
|
18
19
|
export {};
|
19
20
|
//# sourceMappingURL=ring.d.ts.map
|
package/internal/ring.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ring.d.ts","sourceRoot":"__source__/","sources":["internal/ring.ts"],"names":[],"mappings":"AAEA,OAAO,EAAa,KAAK,SAAS,EAAE,MAAM,KAAK,CAAC;AAEhD,KAAK,cAAc,GAAG;IACpB,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,QAAQ,CAAC;CACjB,CAAC;
|
1
|
+
{"version":3,"file":"ring.d.ts","sourceRoot":"__source__/","sources":["internal/ring.ts"],"names":[],"mappings":"AAEA,OAAO,EAAa,KAAK,SAAS,EAAE,MAAM,KAAK,CAAC;AAEhD,KAAK,cAAc,GAAG;IACpB,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,QAAQ,CAAC;CACjB,CAAC;AAmBF;;GAEG;AACH,qBAAa,WAAW;IACtB,GAAG,EAAE,MAAM,CAAC;gBAEA,EACV,QAAkB,EAClB,KAAsC,EACtC,KAAsC,EACtC,IAAI,GACL,GAAE,cAAmB;IAStB,IAAI,UAAU,IAAI,aAAa,CAE9B;CACF;AAED,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,eAAe,GAAG,QAAQ,GAAG,cAAc,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;AAE/G,eAAO,MAAM,MAAM,SAAU,QAAQ,KAAG,OAAmC,CAAC;AAE5E,eAAO,MAAM,iBAAiB,cAAc,CAAC"}
|
package/internal/ring.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
import{toVar as o}from"@godown/element";import{cssGlobalVars as t}from"./global-style.js";import{unsafeCSS as i}from"lit";const e=({width:o,color:t,inset:i})=>`outline-style:solid;outline-color:${t};outline-width:${o};${i?`outline-offset:calc(-1 * ${o});`:""}`,s=({width:o,color:t,inset:i})=>`box-shadow:${i?"inset":""} 0 0 0 ${o} ${t};`,r={outline:(o,t)=>e({width:o,color:t,inset:!1}),"outline-inset":(o,t)=>e({width:o,color:t,inset:!0}),"box-shadow":(o,t)=>s({width:o,color:t,inset:!1}),shadow:(o,t)=>s({width:o,color:t,inset:!1}),"box-shadow-inset":(o,t)=>s({width:o,color:t,inset:!0}),"shadow-inset":(o,t)=>s({width:o,color:t,inset:!0}),border:(o,t)=>(({width:o,color:t})=>`border-style:solid;border-color:${t};border-width:${o}
|
1
|
+
import{toVar as o}from"@godown/element";import{cssGlobalVars as t}from"./global-style.js";import{unsafeCSS as i}from"lit";const e=({width:o,color:t,inset:i})=>`outline-style:solid;outline-color:${t};outline-width:${o};${i?`outline-offset:calc(-1 * ${o});`:""}`,s=({width:o,color:t,inset:i})=>`box-shadow:${i?"inset":""} 0 0 0 ${o} ${t};`,r={outline:(o,t)=>e({width:o,color:t,inset:!1}),"outline-inset":(o,t)=>e({width:o,color:t,inset:!0}),"box-shadow":(o,t)=>s({width:o,color:t,inset:!1}),shadow:(o,t)=>s({width:o,color:t,inset:!1}),"box-shadow-inset":(o,t)=>s({width:o,color:t,inset:!0}),"shadow-inset":(o,t)=>s({width:o,color:t,inset:!0}),border:(o,t)=>(({width:o,color:t})=>`border-style:solid;border-color:${t};border-width:${o};`)({width:o,color:t})};class RingBuilder{constructor({selector:i=":host",width:e=o(t.ringWidth),color:s=o(t.ringColor),type:l}={}){if(l&&l in r){const o=r[l](e,s);this.css=`${i}{${o}}`}else this.css=""}get styleSheet(){return i(this.css).styleSheet}}const l=o=>!o||"none"===o,n="ring-type";export{RingBuilder,l as isNone,n as ringTypeAttribute};
|
2
2
|
//# sourceMappingURL=ring.js.map
|
package/internal/ring.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ring.js","sources":["../src/internal/ring.ts"],"sourcesContent":null,"names":["outlineRing","width","color","inset","shadowRing","ringMap","outline","shadow","border","borderRing","RingBuilder","constructor","selector","toVar","cssGlobalVars","ringWidth","ringColor","type","style","this","css","styleSheet","unsafeCSS","isNone"],"mappings":"0HAWA,MAAMA,EAAc,EAAGC,QAAOC,QAAOC,WACnC,qCAAqCD,mBAAuBD,KAASE,EAAQ,4BAA4BF,MAAY,
|
1
|
+
{"version":3,"file":"ring.js","sources":["../src/internal/ring.ts"],"sourcesContent":null,"names":["outlineRing","width","color","inset","shadowRing","ringMap","outline","shadow","border","borderRing","RingBuilder","constructor","selector","toVar","cssGlobalVars","ringWidth","ringColor","type","style","this","css","styleSheet","unsafeCSS","isNone","ringTypeAttribute"],"mappings":"0HAWA,MAAMA,EAAc,EAAGC,QAAOC,QAAOC,WACnC,qCAAqCD,mBAAuBD,KAASE,EAAQ,4BAA4BF,MAAY,KAIjHG,EAAa,EAAGH,QAAOC,QAAOC,WAAY,cAAcA,EAAQ,QAAU,YAAYF,KAASC,KAE/FG,EAAU,CACdC,QAAS,CAACL,EAAOC,IAAUF,EAAY,CAAEC,QAAOC,QAAOC,OAAO,IAC9D,gBAAiB,CAACF,EAAOC,IAAUF,EAAY,CAAEC,QAAOC,QAAOC,OAAO,IACtE,aAAc,CAACF,EAAOC,IAAUE,EAAW,CAAEH,QAAOC,QAAOC,OAAO,IAClEI,OAAQ,CAACN,EAAOC,IAAUE,EAAW,CAAEH,QAAOC,QAAOC,OAAO,IAC5D,mBAAoB,CAACF,EAAOC,IAAUE,EAAW,CAAEH,QAAOC,QAAOC,OAAO,IACxE,eAAgB,CAACF,EAAOC,IAAUE,EAAW,CAAEH,QAAOC,QAAOC,OAAO,IACpEK,OAAQ,CAACP,EAAOC,IAXC,GAAGD,QAAOC,WAAY,mCAAmCA,kBAAsBD,KAWtEQ,CAAW,CAAER,QAAOC,iBAMnCQ,YAGX,WAAAC,EAAYC,SACVA,EAAW,QAAOX,MAClBA,EAAQY,EAAMC,EAAcC,WAAUb,MACtCA,EAAQW,EAAMC,EAAcE,WAAUC,KACtCA,GACkB,IAClB,GAAIA,GAAQA,KAAQZ,EAAS,CAC3B,MAAMa,EAAQb,EAAQY,GAAMhB,EAAOC,GACnCiB,KAAKC,IAAM,GAAGR,KAAYM,UAE1BC,KAAKC,IAAM,GAIf,cAAIC,GACF,OAAOC,EAAUH,KAAKC,KAAKC,YAMxB,MAAME,EAAUN,IAA6BA,GAAiB,SAATA,EAE/CO,EAAoB"}
|
@@ -1,13 +1,12 @@
|
|
1
1
|
import { type HandlerEvent } from "@godown/element";
|
2
2
|
import { type TemplateResult } from "lit";
|
3
3
|
import { GlobalStyle } from "./global-style.js";
|
4
|
-
import type
|
4
|
+
import { type RingType } from "./ring.js";
|
5
5
|
declare class SuperInput<V = string> extends GlobalStyle {
|
6
6
|
autofocus: boolean;
|
7
7
|
autocomplete: string | boolean;
|
8
8
|
ringType: RingType;
|
9
9
|
disabled: boolean;
|
10
|
-
type: InputType;
|
11
10
|
placeholder: string;
|
12
11
|
name: string;
|
13
12
|
value: V;
|
@@ -32,7 +31,6 @@ declare class SuperInput<V = string> extends GlobalStyle {
|
|
32
31
|
connectedCallback(): void;
|
33
32
|
protected _connectedInit(): void;
|
34
33
|
protected _compositionInit(): void;
|
35
|
-
protected _changeInputType(t: typeof this.type): void;
|
36
34
|
focus(options?: FocusOptions): void;
|
37
35
|
protected firstUpdated(): void;
|
38
36
|
protected _renderPrefix(): TemplateResult<1>;
|
@@ -40,5 +38,4 @@ declare class SuperInput<V = string> extends GlobalStyle {
|
|
40
38
|
}
|
41
39
|
export default SuperInput;
|
42
40
|
export { SuperInput };
|
43
|
-
type InputType = "hidden" | "text" | "search" | "tel" | "url" | "email" | "password" | "datetime" | "date" | "month" | "week" | "time" | "datetime-local" | "number" | "range" | "color" | "checkbox" | "radio" | "file" | "image";
|
44
41
|
//# sourceMappingURL=super-input.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"super-input.d.ts","sourceRoot":"__source__/","sources":["internal/super-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAqC,MAAM,iBAAiB,CAAC;AACvF,OAAO,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAGrD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,
|
1
|
+
{"version":3,"file":"super-input.d.ts","sourceRoot":"__source__/","sources":["internal/super-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAqC,MAAM,iBAAiB,CAAC;AACvF,OAAO,EA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,SAAS,CAAC,YAAY,IAAI,IAAI;IAI9B,SAAS,CAAC,aAAa,IAAI,cAAc,CAAC,CAAC,CAAC;IAM5C,SAAS,CAAC,aAAa,IAAI,cAAc,CAAC,CAAC,CAAC;CAK7C;AAED,eAAe,UAAU,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
package/internal/super-input.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
import{__decorate as t}from"tslib";import{queryPart as e,styles as i,omit as o,htmlSlot as s}from"@godown/element";import{css as r,html as
|
1
|
+
import{__decorate as t}from"tslib";import{queryPart as e,styles as i,omit as o,htmlSlot as s}from"@godown/element";import{css as r,html as a}from"lit";import{property as n}from"lit/decorators.js";import{GlobalStyle as u}from"./global-style.js";import{ringTypeAttribute as p}from"./ring.js";const l=r`:host([disabled]){cursor:not-allowed;filter:brightness(.85)}input:disabled{cursor:inherit}input::-ms-clear,input::-ms-reveal{display:none}`;let d=class SuperInput extends u{constructor(){super(...arguments),this.autofocus=!1,this.ringType="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.dispatchCustomEvent("input",this.value,{bubbles:!0}))}_handleChange(t){this.dispatchCustomEvent("change",this.value)}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)})))}focus(t){this._input?.focus(t)}firstUpdated(){this._compositionInit()}_renderPrefix(){return a`<i part="prefix">${s("prefix")}</i>`}_renderSuffix(){return a`<i part="suffix">${s("suffix")}</i>`}};t([n()],d.prototype,"autocomplete",void 0),t([n({attribute:p})],d.prototype,"ringType",void 0),t([n({type:Boolean,reflect:!0})],d.prototype,"disabled",void 0),t([n({reflect:!0})],d.prototype,"placeholder",void 0),t([n({reflect:!0})],d.prototype,"name",void 0),t([n()],d.prototype,"value",void 0),t([n()],d.prototype,"default",void 0),t([e("input")],d.prototype,"_input",void 0),d=t([i(l)],d);var h=d;export{d as SuperInput,h as default};
|
2
2
|
//# sourceMappingURL=super-input.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"super-input.js","sources":["../src/internal/super-input.ts"],"sourcesContent":null,"names":["inputStyle","css","observedRecord","omit","super","this","default","value","defaultValue","namevalue","name","reset","_input","_handleInput","e","stopPropagation","compositing","target","trim","dispatchCustomEvent","bubbles","connectedCallback","_connectedInit","events","add","
|
1
|
+
{"version":3,"file":"super-input.js","sources":["../src/internal/super-input.ts"],"sourcesContent":null,"names":["inputStyle","css","observedRecord","omit","super","this","default","value","defaultValue","namevalue","name","reset","_input","_handleInput","e","stopPropagation","compositing","target","trim","dispatchCustomEvent","bubbles","connectedCallback","_connectedInit","events","add","focus","options","firstUpdated","_compositionInit","_renderPrefix","html","_renderSuffix","htmlSlot","property","SuperInput","prototype","attribute","ringTypeAttribute","type","Boolean","reflect","__decorate","queryPart","styles","SuperInput$1"],"mappings":"kSAOA,MAAMA,EAAaC,CAAG,4WAcpB,kBAAAC,GAGc,OAAAC,EAAVC,MAAAF,eAA+B,UAAW,QAAhD,qBACEG,KAASC,QAAAC,kBAQTC,GAwBA,OAAAH,KAAAC,QAEG,SAAAG,GACH,MAAW,CAAAJ,KAAAK,KAAGL,KAAKE,MAUT,CAMV,KAAAI,GA2DDN,KAAAE,MAAAF,KAAAC,QA3FKD,KAAcO,OAAAL,MAAAF,KAAAC,QAElB,YAAAO,CAACC,GAgBGA,EAAAC,kBACEV,KAACW,cAILX,KAAOE,MAAKO,EAAAG,OAAQV,OAAAW,OACrBb,KAAAc,oBAAA,QAAAd,KAAAE,MAAA,CAAAa,SAAA,sBAMAf,KAAAc,oBAAA,SAAAd,KAAAE,OAKC,iBAAAc,GACAjB,0BACDC,KAAAiB,gBAES,kBAERjB,KAAQC,UAAYD,KAAEE,OAAC,QACdA,QAAAF,KAAAC,2BAGLD,KAACO,SACNP,KAAAkB,OAAAC,IAAAnB,KAAAO,OAAA,oBAAA,IAAAP,KAAAW,aAAA,IAESX,KAAakB,OAAkCC,IAAAnB,KAAAO,OAAA,kBAAAE,sBAC9B,EAC1BT,KAAAQ,aAAAC,EAAA,KAKD,KAAAW,CAACC,GAEuBrB,KAAAO,QAAAa,MAAAC,GAEtB,YAAAC,GACDtB,KAAAuB,mBAGC,aAAAC,UACMC,sCACJ,CACE,aAAAC,GACA,OAAAD,CAAA,oBAAAE,EAAA,eACF,KAEH,CAEDC,KACEC,EAAAC,UAAA,oBAAA,MAGQF,EAAY,CAAAG,UAAAC,OACfF,UAAA,gBAAA,KACN,CAESF,EAAa,CAAAK,KAAAC,QAAAC,SAAA,KACrBN,EAAAC,UAAW,gBAAA,QAET,CAAAK,SAAA,OACHL,UAAA,mBAAA,KAEsB,CACrBF,EAAA,CAAAO,SAAA,iBACqB,YAAQ,KAC3B,CACJP,KACDC,EAAAC,UAAA,aAAA,GA5GCM,EAAA,CADCR,KAC8BC,EAAAC,UAAA,eAAA,GAG/BM,EAAA,CADCC,EAAA,UAC6BR,EAAAC,UAAA,cAAA,GAG9BD,EAAAO,EAAA,CADCE,EAAQ3C,IACQkC,GAGjB,IAAAU,EAAAV"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"__source__/","sources":["internal/utils.ts"],"names":[],"mappings":"AAAA,wBAAgB,OAAO,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAAE,EAAE,EAAE,CAAC,GAAG,CAAC,CASnE"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../src/internal/utils.ts"],"sourcesContent":null,"names":["memoize","fn","result","proxyFunction","args","apply","this"],"mappings":"AAAM,SAAUA,EAA2CC,GACzD,IAAIC,EACAC,EAAgB,YAAwBC,GAG1C,OAFAF,EAASD,EAAGI,MAAMC,KAAMF,GACxBD,EAAa,IAAUD,EAChBA,CACH,EAEN,OAAOC,CACT"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "godown",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.13.0",
|
4
4
|
"description": "Web Components Library",
|
5
5
|
"type": "module",
|
6
6
|
"main": "index.js",
|
@@ -20,7 +20,7 @@
|
|
20
20
|
"fmtime": "^0.0.3",
|
21
21
|
"lit": "^3.0.0",
|
22
22
|
"tslib": "^2.7.0",
|
23
|
-
"@godown/element": "^1.
|
23
|
+
"@godown/element": "^1.10.0"
|
24
24
|
},
|
25
25
|
"publishConfig": {
|
26
26
|
"access": "public"
|
@@ -41,7 +41,6 @@
|
|
41
41
|
"check-types": "tsc --noEmit",
|
42
42
|
"clean": "tsc --build tsconfig.prod.json --clean",
|
43
43
|
"build": "tsx build.ts",
|
44
|
-
"build:ts": "tsc"
|
45
|
-
"manifest": "tsx manifest.ts"
|
44
|
+
"build:ts": "tsc"
|
46
45
|
}
|
47
46
|
}
|
package/popover.d.ts
ADDED
package/popover.d.ts.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"popover.d.ts","sourceRoot":"__source__/","sources":["popover.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,wCAAwC,CAAC"}
|
package/popover.js
ADDED
package/popover.js.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"popover.js","sources":[],"sourcesContent":null,"names":[],"mappings":""}
|
package/src/index.ts
CHANGED
@@ -17,6 +17,7 @@ export { default as Heading } from "./heading.js";
|
|
17
17
|
export { default as Input } from "./input.js";
|
18
18
|
export { default as Layout } from "./layout.js";
|
19
19
|
export { default as Link } from "./link.js";
|
20
|
+
export { default as Popover } from "./popover.js";
|
20
21
|
export { default as Progress } from "./progress.js";
|
21
22
|
export { default as Range } from "./range.js";
|
22
23
|
export { default as Rotate } from "./rotate.js";
|
@@ -1,7 +1,9 @@
|
|
1
1
|
import { declareLightDarkColors, GodownElement, joinDeclarations, joinRules, toVar, trim } from "@godown/element";
|
2
2
|
import { type CSSResult, css, unsafeCSS } from "lit";
|
3
|
+
import { resetStyle } from "./reset-style.js";
|
3
4
|
|
4
5
|
export class GlobalStyle extends GodownElement {}
|
6
|
+
|
5
7
|
export default GlobalStyle;
|
6
8
|
|
7
9
|
const cssvar = trim(GlobalStyle.godownConfig.prefix, "-");
|
@@ -43,13 +45,14 @@ export const cssGlobalVars: {
|
|
43
45
|
};
|
44
46
|
|
45
47
|
GlobalStyle.styles = [
|
48
|
+
resetStyle,
|
46
49
|
unsafeCSS(
|
47
50
|
declareLightDarkColors(
|
48
51
|
":host",
|
49
52
|
[
|
50
53
|
[cssGlobalVars.background, ["hsl(0 0% 96%)", "hsl(0 0% 4%)"]],
|
51
54
|
[cssGlobalVars.foreground, ["hsl(0 0% 4%)", "hsl(0 0% 96%)"]],
|
52
|
-
[cssGlobalVars.muted, ["hsl(0 0%
|
55
|
+
[cssGlobalVars.muted, ["hsl(0 0% 88%)", "hsl(0 0% 18%)"]],
|
53
56
|
],
|
54
57
|
1,
|
55
58
|
),
|
@@ -71,39 +74,6 @@ GlobalStyle.styles = [
|
|
71
74
|
}),
|
72
75
|
),
|
73
76
|
css`
|
74
|
-
input,
|
75
|
-
button,
|
76
|
-
dialog {
|
77
|
-
border: 0;
|
78
|
-
outline: 0;
|
79
|
-
}
|
80
|
-
|
81
|
-
* {
|
82
|
-
margin: 0;
|
83
|
-
padding: 0;
|
84
|
-
font-size: 100%;
|
85
|
-
font-style: normal;
|
86
|
-
box-sizing: border-box;
|
87
|
-
}
|
88
|
-
|
89
|
-
:host {
|
90
|
-
box-sizing: border-box;
|
91
|
-
border-style: none;
|
92
|
-
outline-style: none;
|
93
|
-
}
|
94
|
-
|
95
|
-
a {
|
96
|
-
text-decoration: none;
|
97
|
-
}
|
98
|
-
|
99
|
-
span {
|
100
|
-
white-space: nowrap;
|
101
|
-
}
|
102
|
-
|
103
|
-
svg {
|
104
|
-
user-select: none;
|
105
|
-
}
|
106
|
-
|
107
77
|
:host([contents]) {
|
108
78
|
display: contents;
|
109
79
|
}
|
@@ -127,6 +97,8 @@ GlobalStyle.styles = [
|
|
127
97
|
:host {
|
128
98
|
${cssGlobalVars.radius}: 0.2em;
|
129
99
|
border-radius: var(${cssGlobalVars.radius});
|
100
|
+
border-style: none;
|
101
|
+
outline-style: none;
|
130
102
|
}
|
131
103
|
`,
|
132
104
|
];
|
@@ -0,0 +1,64 @@
|
|
1
|
+
import { memoize } from "./utils.js";
|
2
|
+
|
3
|
+
const POPOVER = "popover";
|
4
|
+
|
5
|
+
const supportPopover = () => Object.hasOwn(HTMLElement.prototype, POPOVER);
|
6
|
+
|
7
|
+
const getPopoverAttribute = (element: HTMLElement) => element.getAttribute(POPOVER);
|
8
|
+
|
9
|
+
const shimHide = (element: HTMLElement) => {
|
10
|
+
element.style.display = "none";
|
11
|
+
};
|
12
|
+
|
13
|
+
const standardHide = (element: HTMLElement) => {
|
14
|
+
if (getPopoverAttribute(element) !== null) {
|
15
|
+
element.hidePopover();
|
16
|
+
} else {
|
17
|
+
shimHide(element);
|
18
|
+
}
|
19
|
+
};
|
20
|
+
|
21
|
+
export const hidePopover: (element: HTMLElement) => void = memoize((element: HTMLElement) => {
|
22
|
+
if (supportPopover()) {
|
23
|
+
return standardHide(element);
|
24
|
+
}
|
25
|
+
return shimHide(element);
|
26
|
+
});
|
27
|
+
|
28
|
+
function shimShow(this: void | HTMLElement, element: HTMLElement) {
|
29
|
+
element.style.display = "block";
|
30
|
+
|
31
|
+
if (this && getPopoverAttribute(element) !== "manual") {
|
32
|
+
const listenType = "click";
|
33
|
+
const listener = (e: MouseEvent) => {
|
34
|
+
if (!this.contains(e.target as Node)) {
|
35
|
+
element.dispatchEvent(
|
36
|
+
new Event("toggle", {
|
37
|
+
bubbles: true,
|
38
|
+
composed: true,
|
39
|
+
newState: "closed",
|
40
|
+
} as ToggleEvent),
|
41
|
+
);
|
42
|
+
hidePopover(element);
|
43
|
+
document.removeEventListener(listenType, listener);
|
44
|
+
}
|
45
|
+
};
|
46
|
+
|
47
|
+
document.addEventListener(listenType, listener);
|
48
|
+
}
|
49
|
+
}
|
50
|
+
|
51
|
+
function standardShow(this: void | HTMLElement, element: HTMLElement) {
|
52
|
+
if (getPopoverAttribute(element) !== null) {
|
53
|
+
element.showPopover();
|
54
|
+
} else {
|
55
|
+
shimShow.call(this, element);
|
56
|
+
}
|
57
|
+
}
|
58
|
+
|
59
|
+
export const showPopover: (this: void | HTMLElement, element: HTMLElement) => void = memoize(function (this, element) {
|
60
|
+
if (supportPopover()) {
|
61
|
+
return standardShow.call(this, element);
|
62
|
+
}
|
63
|
+
return shimShow.call(this, element);
|
64
|
+
});
|
@@ -0,0 +1,63 @@
|
|
1
|
+
import { css, type CSSResult } from "lit";
|
2
|
+
|
3
|
+
export const resetStyle: CSSResult = css`
|
4
|
+
*,
|
5
|
+
:host {
|
6
|
+
box-sizing: border-box;
|
7
|
+
}
|
8
|
+
|
9
|
+
i {
|
10
|
+
font-style: normal;
|
11
|
+
}
|
12
|
+
|
13
|
+
a {
|
14
|
+
color: currentColor;
|
15
|
+
text-decoration: none;
|
16
|
+
}
|
17
|
+
|
18
|
+
span {
|
19
|
+
white-space: nowrap;
|
20
|
+
}
|
21
|
+
|
22
|
+
svg {
|
23
|
+
user-select: none;
|
24
|
+
}
|
25
|
+
|
26
|
+
input {
|
27
|
+
border: 0;
|
28
|
+
padding: 0;
|
29
|
+
outline: 0;
|
30
|
+
font-size: 100%;
|
31
|
+
color: currentColor;
|
32
|
+
background: none;
|
33
|
+
}
|
34
|
+
|
35
|
+
dl,
|
36
|
+
dd {
|
37
|
+
margin: 0;
|
38
|
+
}
|
39
|
+
|
40
|
+
ul {
|
41
|
+
padding: 0;
|
42
|
+
margin: 0;
|
43
|
+
}
|
44
|
+
|
45
|
+
dialog {
|
46
|
+
border: 0;
|
47
|
+
margin: 0;
|
48
|
+
padding: 0;
|
49
|
+
outline: 0;
|
50
|
+
}
|
51
|
+
|
52
|
+
[popover] {
|
53
|
+
border: 0;
|
54
|
+
margin: 0;
|
55
|
+
padding: 0;
|
56
|
+
}
|
57
|
+
|
58
|
+
@supports not selector(:popover-open) {
|
59
|
+
[popover] {
|
60
|
+
display: none;
|
61
|
+
}
|
62
|
+
}
|
63
|
+
`;
|
package/src/internal/ring.ts
CHANGED
@@ -12,8 +12,7 @@ type OutlineOptions = {
|
|
12
12
|
const outlineRing = ({ width, color, inset }) =>
|
13
13
|
`outline-style:solid;outline-color:${color};outline-width:${width};${inset ? `outline-offset:calc(-1 * ${width});` : ""}`;
|
14
14
|
|
15
|
-
const borderRing = ({ width, color }) =>
|
16
|
-
`border-style:solid;border-color:${color};border-width:${width};border-style:solid;`;
|
15
|
+
const borderRing = ({ width, color }) => `border-style:solid;border-color:${color};border-width:${width};`;
|
17
16
|
|
18
17
|
const shadowRing = ({ width, color, inset }) => `box-shadow:${inset ? "inset" : ""} 0 0 0 ${width} ${color};`;
|
19
18
|
|
@@ -55,3 +54,5 @@ export class RingBuilder {
|
|
55
54
|
export type RingType = "outline" | "outline-inset" | "shadow" | "shadow-inset" | "border" | "none" | undefined;
|
56
55
|
|
57
56
|
export const isNone = (type: RingType): boolean => !type || type === "none";
|
57
|
+
|
58
|
+
export const ringTypeAttribute = "ring-type";
|
@@ -3,7 +3,7 @@ import { type TemplateResult, css, html } from "lit";
|
|
3
3
|
import { property } from "lit/decorators.js";
|
4
4
|
|
5
5
|
import { GlobalStyle } from "./global-style.js";
|
6
|
-
import type
|
6
|
+
import { ringTypeAttribute, type RingType } from "./ring.js";
|
7
7
|
|
8
8
|
const inputStyle = css`
|
9
9
|
:host([disabled]) {
|
@@ -27,15 +27,12 @@ class SuperInput<V = string> extends GlobalStyle {
|
|
27
27
|
@property()
|
28
28
|
autocomplete: string | boolean;
|
29
29
|
|
30
|
-
@property({ attribute:
|
30
|
+
@property({ attribute: ringTypeAttribute })
|
31
31
|
ringType: RingType = "border";
|
32
32
|
|
33
33
|
@property({ type: Boolean, reflect: true })
|
34
34
|
disabled = false;
|
35
35
|
|
36
|
-
@property({ reflect: true })
|
37
|
-
type: InputType;
|
38
|
-
|
39
36
|
@property({ reflect: true })
|
40
37
|
placeholder: string;
|
41
38
|
|
@@ -117,12 +114,6 @@ class SuperInput<V = string> extends GlobalStyle {
|
|
117
114
|
}
|
118
115
|
}
|
119
116
|
|
120
|
-
protected _changeInputType(t: typeof this.type): void {
|
121
|
-
if (this._input) {
|
122
|
-
this._input.type = t;
|
123
|
-
}
|
124
|
-
}
|
125
|
-
|
126
117
|
focus(options?: FocusOptions): void {
|
127
118
|
this._input?.focus(options);
|
128
119
|
}
|
@@ -146,25 +137,3 @@ class SuperInput<V = string> extends GlobalStyle {
|
|
146
137
|
|
147
138
|
export default SuperInput;
|
148
139
|
export { SuperInput };
|
149
|
-
|
150
|
-
type InputType =
|
151
|
-
| "hidden"
|
152
|
-
| "text"
|
153
|
-
| "search"
|
154
|
-
| "tel"
|
155
|
-
| "url"
|
156
|
-
| "email"
|
157
|
-
| "password"
|
158
|
-
| "datetime"
|
159
|
-
| "date"
|
160
|
-
| "month"
|
161
|
-
| "week"
|
162
|
-
| "time"
|
163
|
-
| "datetime-local"
|
164
|
-
| "number"
|
165
|
-
| "range"
|
166
|
-
| "color"
|
167
|
-
| "checkbox"
|
168
|
-
| "radio"
|
169
|
-
| "file"
|
170
|
-
| "image";
|
@@ -0,0 +1,10 @@
|
|
1
|
+
export function memoize<T extends (...args: any[]) => any>(fn: T): T {
|
2
|
+
let result: ReturnType<T> | undefined;
|
3
|
+
let proxyFunction = function (this: any, ...args) {
|
4
|
+
result = fn.apply(this, args);
|
5
|
+
proxyFunction = (() => result) as T;
|
6
|
+
return result;
|
7
|
+
} as T;
|
8
|
+
|
9
|
+
return proxyFunction;
|
10
|
+
}
|
package/src/popover.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export { default } from "./web-components/popover/definition.js";
|
@@ -3,7 +3,7 @@ import { type TemplateResult, css, html } from "lit";
|
|
3
3
|
import { property } from "lit/decorators.js";
|
4
4
|
|
5
5
|
import { cssGlobalVars, GlobalStyle } from "../../internal/global-style.js";
|
6
|
-
import { RingBuilder, type RingType } from "../../internal/ring.js";
|
6
|
+
import { RingBuilder, ringTypeAttribute, type RingType } from "../../internal/ring.js";
|
7
7
|
|
8
8
|
const protoName = "alert";
|
9
9
|
|
@@ -20,6 +20,7 @@ const protoName = "alert";
|
|
20
20
|
@styles(css`
|
21
21
|
:host {
|
22
22
|
background: var(${cssGlobalVars.background});
|
23
|
+
color: var(${cssGlobalVars.foreground});
|
23
24
|
}
|
24
25
|
|
25
26
|
:host,
|
@@ -45,7 +46,7 @@ class Alert extends GlobalStyle {
|
|
45
46
|
new StyleController(this, () => new RingBuilder({ type: this.ringType }).css);
|
46
47
|
}
|
47
48
|
|
48
|
-
@property({ attribute:
|
49
|
+
@property({ attribute: ringTypeAttribute })
|
49
50
|
ringType: RingType = "border";
|
50
51
|
|
51
52
|
/**
|
@@ -68,8 +69,8 @@ class Alert extends GlobalStyle {
|
|
68
69
|
>
|
69
70
|
<div>${htmlSlot("prefix")}</div>
|
70
71
|
<div part="content">
|
71
|
-
<strong part="title">${
|
72
|
-
${this.content
|
72
|
+
<strong part="title">${htmlSlot("title", this.title)}</strong>
|
73
|
+
${htmlSlot("", this.content)}
|
73
74
|
</div>
|
74
75
|
<div>${htmlSlot("suffix")}</div>
|
75
76
|
</div>
|