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.
Files changed (237) hide show
  1. package/build/godown+lit.iife.js +4 -4
  2. package/build/godown+lit.iife.js.map +1 -1
  3. package/build/godown+lit.js +4 -4
  4. package/build/godown+lit.js.map +1 -1
  5. package/build/godown+lit.umd.js +4 -4
  6. package/build/godown+lit.umd.js.map +1 -1
  7. package/build/godown.iife.js +4 -4
  8. package/build/godown.js +4 -4
  9. package/build/godown.js.map +1 -1
  10. package/build/godown.umd.js +4 -4
  11. package/build/godown.umd.js.map +1 -1
  12. package/components/alert.js +1 -1
  13. package/components/alert.js.map +1 -1
  14. package/components/avatar.d.ts +5 -4
  15. package/components/avatar.d.ts.map +1 -1
  16. package/components/avatar.js +1 -1
  17. package/components/avatar.js.map +1 -1
  18. package/components/badge.d.ts +10 -2
  19. package/components/badge.d.ts.map +1 -1
  20. package/components/badge.js.map +1 -1
  21. package/components/breath.d.ts +2 -3
  22. package/components/breath.d.ts.map +1 -1
  23. package/components/breath.js +1 -1
  24. package/components/breath.js.map +1 -1
  25. package/components/button.d.ts +7 -2
  26. package/components/button.d.ts.map +1 -1
  27. package/components/button.js +1 -1
  28. package/components/button.js.map +1 -1
  29. package/components/card.d.ts +6 -0
  30. package/components/card.d.ts.map +1 -1
  31. package/components/card.js +1 -1
  32. package/components/card.js.map +1 -1
  33. package/components/carousel.d.ts +2 -2
  34. package/components/details.d.ts +3 -3
  35. package/components/details.d.ts.map +1 -1
  36. package/components/dialog.d.ts +9 -6
  37. package/components/dialog.d.ts.map +1 -1
  38. package/components/dialog.js +1 -1
  39. package/components/dialog.js.map +1 -1
  40. package/components/divider.d.ts +1 -1
  41. package/components/divider.d.ts.map +1 -1
  42. package/components/divider.js +1 -1
  43. package/components/divider.js.map +1 -1
  44. package/components/heading.d.ts +2 -0
  45. package/components/heading.d.ts.map +1 -1
  46. package/components/heading.js.map +1 -1
  47. package/components/input.d.ts +2 -2
  48. package/components/input.d.ts.map +1 -1
  49. package/components/input.js +1 -1
  50. package/components/input.js.map +1 -1
  51. package/components/link.d.ts +1 -1
  52. package/components/link.d.ts.map +1 -1
  53. package/components/link.js +1 -1
  54. package/components/link.js.map +1 -1
  55. package/components/progress.d.ts +0 -7
  56. package/components/progress.d.ts.map +1 -1
  57. package/components/progress.js +1 -1
  58. package/components/progress.js.map +1 -1
  59. package/components/range.d.ts +50 -15
  60. package/components/range.d.ts.map +1 -1
  61. package/components/range.js +1 -1
  62. package/components/range.js.map +1 -1
  63. package/components/rotate.d.ts +6 -4
  64. package/components/rotate.d.ts.map +1 -1
  65. package/components/rotate.js.map +1 -1
  66. package/components/select.d.ts +4 -2
  67. package/components/select.d.ts.map +1 -1
  68. package/components/select.js +1 -1
  69. package/components/select.js.map +1 -1
  70. package/components/split.d.ts +2 -1
  71. package/components/split.d.ts.map +1 -1
  72. package/components/split.js +1 -1
  73. package/components/split.js.map +1 -1
  74. package/components/switch.d.ts +10 -20
  75. package/components/switch.d.ts.map +1 -1
  76. package/components/switch.js +1 -1
  77. package/components/switch.js.map +1 -1
  78. package/components/time.d.ts +2 -2
  79. package/components/time.d.ts.map +1 -1
  80. package/components/time.js.map +1 -1
  81. package/components/tooltip.d.ts +3 -2
  82. package/components/tooltip.d.ts.map +1 -1
  83. package/components/tooltip.js +1 -1
  84. package/components/tooltip.js.map +1 -1
  85. package/core/direction.d.ts +27 -0
  86. package/core/direction.d.ts.map +1 -0
  87. package/core/direction.js +2 -0
  88. package/core/direction.js.map +1 -0
  89. package/core/global-style.d.ts +0 -2
  90. package/core/global-style.d.ts.map +1 -1
  91. package/core/global-style.js +1 -1
  92. package/core/global-style.js.map +1 -1
  93. package/core/outline.d.ts +20 -0
  94. package/core/outline.d.ts.map +1 -0
  95. package/core/outline.js +2 -0
  96. package/core/outline.js.map +1 -0
  97. package/core/super-anchor.d.ts +2 -2
  98. package/core/super-anchor.d.ts.map +1 -1
  99. package/core/super-anchor.js +1 -1
  100. package/core/super-anchor.js.map +1 -1
  101. package/core/super-input.d.ts +4 -2
  102. package/core/super-input.d.ts.map +1 -1
  103. package/core/super-input.js +1 -1
  104. package/core/super-input.js.map +1 -1
  105. package/core/super-openable.d.ts +0 -4
  106. package/core/super-openable.d.ts.map +1 -1
  107. package/custom-elements.json +1 -1
  108. package/dev/components/alert.js +1 -1
  109. package/dev/components/avatar.d.ts +5 -4
  110. package/dev/components/avatar.d.ts.map +1 -1
  111. package/dev/components/avatar.js +7 -5
  112. package/dev/components/avatar.js.map +1 -1
  113. package/dev/components/badge.d.ts +10 -2
  114. package/dev/components/badge.d.ts.map +1 -1
  115. package/dev/components/badge.js +8 -0
  116. package/dev/components/badge.js.map +1 -1
  117. package/dev/components/breath.d.ts +2 -3
  118. package/dev/components/breath.d.ts.map +1 -1
  119. package/dev/components/breath.js +3 -14
  120. package/dev/components/breath.js.map +1 -1
  121. package/dev/components/button.d.ts +7 -2
  122. package/dev/components/button.d.ts.map +1 -1
  123. package/dev/components/button.js +19 -5
  124. package/dev/components/button.js.map +1 -1
  125. package/dev/components/card.d.ts +6 -0
  126. package/dev/components/card.d.ts.map +1 -1
  127. package/dev/components/card.js +15 -11
  128. package/dev/components/card.js.map +1 -1
  129. package/dev/components/carousel.d.ts +2 -2
  130. package/dev/components/carousel.js +2 -2
  131. package/dev/components/details.d.ts +3 -3
  132. package/dev/components/details.d.ts.map +1 -1
  133. package/dev/components/details.js +3 -3
  134. package/dev/components/details.js.map +1 -1
  135. package/dev/components/dialog.d.ts +9 -6
  136. package/dev/components/dialog.d.ts.map +1 -1
  137. package/dev/components/dialog.js +58 -62
  138. package/dev/components/dialog.js.map +1 -1
  139. package/dev/components/divider.d.ts +1 -1
  140. package/dev/components/divider.d.ts.map +1 -1
  141. package/dev/components/divider.js +3 -2
  142. package/dev/components/divider.js.map +1 -1
  143. package/dev/components/heading.d.ts +2 -0
  144. package/dev/components/heading.d.ts.map +1 -1
  145. package/dev/components/heading.js +2 -0
  146. package/dev/components/heading.js.map +1 -1
  147. package/dev/components/input.d.ts +2 -2
  148. package/dev/components/input.d.ts.map +1 -1
  149. package/dev/components/input.js +29 -8
  150. package/dev/components/input.js.map +1 -1
  151. package/dev/components/link.d.ts +1 -1
  152. package/dev/components/link.d.ts.map +1 -1
  153. package/dev/components/link.js +2 -2
  154. package/dev/components/link.js.map +1 -1
  155. package/dev/components/progress.d.ts +0 -7
  156. package/dev/components/progress.d.ts.map +1 -1
  157. package/dev/components/progress.js +4 -25
  158. package/dev/components/progress.js.map +1 -1
  159. package/dev/components/range.d.ts +50 -15
  160. package/dev/components/range.d.ts.map +1 -1
  161. package/dev/components/range.js +50 -14
  162. package/dev/components/range.js.map +1 -1
  163. package/dev/components/rotate.d.ts +6 -4
  164. package/dev/components/rotate.d.ts.map +1 -1
  165. package/dev/components/rotate.js +6 -4
  166. package/dev/components/rotate.js.map +1 -1
  167. package/dev/components/select.d.ts +4 -2
  168. package/dev/components/select.d.ts.map +1 -1
  169. package/dev/components/select.js +27 -24
  170. package/dev/components/select.js.map +1 -1
  171. package/dev/components/split.d.ts +2 -1
  172. package/dev/components/split.d.ts.map +1 -1
  173. package/dev/components/split.js +12 -7
  174. package/dev/components/split.js.map +1 -1
  175. package/dev/components/switch.d.ts +10 -20
  176. package/dev/components/switch.d.ts.map +1 -1
  177. package/dev/components/switch.js +57 -98
  178. package/dev/components/switch.js.map +1 -1
  179. package/dev/components/time.d.ts +2 -2
  180. package/dev/components/time.d.ts.map +1 -1
  181. package/dev/components/time.js.map +1 -1
  182. package/dev/components/tooltip.d.ts +3 -2
  183. package/dev/components/tooltip.d.ts.map +1 -1
  184. package/dev/components/tooltip.js +7 -19
  185. package/dev/components/tooltip.js.map +1 -1
  186. package/dev/core/direction.d.ts +27 -0
  187. package/dev/core/direction.d.ts.map +1 -0
  188. package/dev/core/direction.js +56 -0
  189. package/dev/core/direction.js.map +1 -0
  190. package/dev/core/global-style.d.ts +0 -2
  191. package/dev/core/global-style.d.ts.map +1 -1
  192. package/dev/core/global-style.js +3 -7
  193. package/dev/core/global-style.js.map +1 -1
  194. package/dev/core/outline.d.ts +20 -0
  195. package/dev/core/outline.d.ts.map +1 -0
  196. package/dev/core/outline.js +44 -0
  197. package/dev/core/outline.js.map +1 -0
  198. package/dev/core/super-anchor.d.ts +2 -2
  199. package/dev/core/super-anchor.d.ts.map +1 -1
  200. package/dev/core/super-anchor.js +0 -1
  201. package/dev/core/super-anchor.js.map +1 -1
  202. package/dev/core/super-input.d.ts +4 -2
  203. package/dev/core/super-input.d.ts.map +1 -1
  204. package/dev/core/super-input.js +25 -30
  205. package/dev/core/super-input.js.map +1 -1
  206. package/dev/core/super-openable.d.ts +0 -4
  207. package/dev/core/super-openable.d.ts.map +1 -1
  208. package/package.json +3 -3
  209. package/src/components/alert.ts +1 -1
  210. package/src/components/avatar.ts +9 -6
  211. package/src/components/badge.ts +10 -3
  212. package/src/components/breath.ts +5 -17
  213. package/src/components/button.ts +18 -5
  214. package/src/components/card.ts +15 -11
  215. package/src/components/carousel.ts +2 -2
  216. package/src/components/details.ts +3 -3
  217. package/src/components/dialog.ts +66 -65
  218. package/src/components/divider.ts +3 -2
  219. package/src/components/heading.ts +2 -0
  220. package/src/components/input.ts +29 -8
  221. package/src/components/link.ts +2 -2
  222. package/src/components/progress.ts +4 -25
  223. package/src/components/range.ts +64 -26
  224. package/src/components/rotate.ts +6 -4
  225. package/src/components/select.ts +33 -26
  226. package/src/components/split.ts +13 -7
  227. package/src/components/switch.ts +62 -94
  228. package/src/components/time.ts +2 -2
  229. package/src/components/tooltip.ts +8 -20
  230. package/src/core/direction.ts +65 -0
  231. package/src/core/global-style.ts +3 -9
  232. package/src/core/outline.ts +54 -0
  233. package/src/core/super-anchor.ts +3 -2
  234. package/src/core/super-input.ts +31 -33
  235. package/src/core/super-openable.ts +0 -8
  236. package/vscode.html-custom-data.json +1 -1
  237. package/web-types.json +1 -1
@@ -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: any;
25
+ timeout: number;
26
26
  /**
27
27
  * The number of milliseconds that change with each update.
28
28
  */
29
- gap: any;
29
+ gap: number;
30
30
  protected timeoutId: number;
31
31
  protected render(): TemplateResult<1>;
32
32
  protected updated(changedProperties: PropertyValues): void;
@@ -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,GAAG,CAAC;IAEb;;OAEG;IAEH,GAAG,EAAE,GAAG,CAAC;IAET,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"}
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"}
@@ -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,UACNpC,EAAAgC,UAAA,eAAAC,GAMZH,EAAA,CADCC,EAAS,CAAEG,KAAME,UACVpC,EAAAgC,UAAA,WAAAC,GA7BJjC,EAAI8B,EAAA,CAFTO,EARiB,QASjBC,EAAOC,CAAG,6BACLvC,GAyDN,IAAAwC,EAAexC"}
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"}
@@ -1,5 +1,6 @@
1
1
  import { type TemplateResult } from "lit";
2
- import SuperOpenable, { type Direction8 } from "../core/super-openable.js";
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: Direction8;
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,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAK3E;;;;;;;;GAQG;AACH,cAKM,OAAQ,SAAQ,aAAa;IACjC;;OAEG;IAEH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IAEH,SAAS,EAAE,UAAU,CAAS;IAE9B;;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"}
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"}
@@ -1,2 +1,2 @@
1
- import{__decorate as t}from"tslib";import{godown as i,styles as o,attr as e,htmlSlot as r}from"@godown/element";import{css as n,html as p}from"lit";import{property as s}from"lit/decorators.js";import{scopePrefix as a}from"../core/global-style.js";import l from"../core/super-openable.js";var d;const c="tooltip",h=a(c);let f=d=class Tooltip extends l{constructor(){super(...arguments),this.direction="top",this.align="center",this.propagation=!1,this.type="hover"}render(){const t=d.aligns[this.align]||"inherit",i="focus"===this.type;return p`<div part="root" ${e(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}">${r()}<div part="tip">${this.tip?p`<span class="passive">${this.tip}</span>`:r("tip")}</div></div>`}};f.aligns={start:"flex-start",end:"flex-end",center:"center","flex-start":"flex-start","flex-end":"flex-end"},t([s()],f.prototype,"tip",void 0),t([s()],f.prototype,"direction",void 0),t([s()],f.prototype,"align",void 0),t([s({type:Boolean})],f.prototype,"propagation",void 0),t([s()],f.prototype,"type",void 0),f=d=t([i(c),o(n`:host{${h}--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(${h}--tip-background)}[propagation] [part=tip]{pointer-events:none}`,n`[direction^=top] [part=tip]{bottom:100%}[direction^=bottom] [part=tip]{top:100%}[direction$=right] [part=tip]{left:100%}[direction$=left] [part=tip]{right:100%}`)],f);var u=f;export{f as Tooltip,u as default};
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":"sSAOA,MAAMA,EAAY,UACZC,EAAWC,EAAYF,GAgB7B,IAAMG,EAAOC,EAAb,MAAMD,gBAAgBE,EAAtB,WAAAC,uBAWEC,KAASC,UAAe,MAMxBD,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,sBAEEZ,KAAKa,IACHL,CAAI,yBACsBR,KAAKa,aAE/BD,EAAS,uBA5BdhB,EAAAU,OAAS,CACdQ,MAAO,aACPC,IAAK,WACLC,OAAQ,SACR,aAAc,aACd,WAAY,YArCdC,EAAA,CADCC,KACUtB,EAAAuB,UAAA,WAAAC,GAMXH,EAAA,CADCC,KAC4BtB,EAAAuB,UAAA,iBAAAC,GAM7BH,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,CAAG,SAAS9B,ubAA8bA,mEAC1c8B,CAAG,qKAEC5B,GAwEN,IAAA6B,EAAe7B"}
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"}
@@ -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,UAAU,EAAE,SAAS,CAAC;IACtB,UAAU,EAAE,SAAS,CAAC;IACtB,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;CAYlB,CAAC;AAEF,KAAK,yBAAyB,GAAG,MAAM,CAAC,MAAM,OAAO,UAAU,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC"}
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"}
@@ -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 e,joinProperties as t,GodownElement as n}from"@godown/element";import{unsafeCSS as l,css as a}from"lit";class GlobalStyle extends n{}const s=e(GlobalStyle.godownConfig.prefix,"-");function c(o,r=1){return i(s+"-".repeat(r)+o)}function i(o){return l(`--${o}`)}const g={foreground:c("foreground",2),background:c("background",2),clipBackground:c("clip-background",2),active:c("active",2),passive:c("passive",2),_colors:{},input:c("input",2),white:c("color-white",2),black:c("color-black",2),color:c("color",2)};GlobalStyle.styles=[l(`:host{${g.black}:rgb(0 0 0);${g.white}:rgb(255 255 255);`+r(((o,r,e)=>{g._colors[o]||=[],g._colors[o].push(l(g.color+"-"+o+"-"+r));const t=`-${o}-${r}`;return`${g.color+t}:rgb(${e});`}),o).join("")+t([[g.background,`var(${g._colors.darkgray[9]})`],[g.foreground,`var(${g._colors.lightgray[0]})`],[g.active,`var(${g._colors.blue[6]})`],[g.passive,`var(${g._colors.darkgray[6]})`],[g.clipBackground,`linear-gradient(to bottom, var(${g.foreground}), var(${g.passive}))`]])+"}"),a`*{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,g as cssGlobalVars,GlobalStyle as default,c as scopePrefix,i as variablePrefix};
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
@@ -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","foreground","background","clipBackground","active","passive","_colors","input","white","black","color","styles","travel","key","gradient","rgb","push","endKey","presetsRGB","join","joinProperties","darkgray","lightgray","blue","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,EAWT,CACFC,WAAYR,EAAY,aAAc,GACtCS,WAAYT,EAAY,aAAc,GACtCU,eAAgBV,EAAY,kBAAmB,GAC/CW,OAAQX,EAAY,SAAU,GAC9BY,QAASZ,EAAY,UAAW,GAChCa,QAAS,CAA+B,EACxCC,MAAOd,EAAY,QAAS,GAC5Be,MAAOf,EAAY,cAAe,GAClCgB,MAAOhB,EAAY,cAAe,GAClCiB,MAAOjB,EAAY,QAAS,IAI9BN,YAAYwB,OAAS,CACnBZ,EAEI,SAAGC,EAAcS,oBACdT,EAAcQ,0BACjBI,GAAO,CAACC,EAAKC,EAAUC,KACrBf,EAAcM,QAAQO,KAAS,GAC/Bb,EAAcM,QAAQO,GAAKG,KAAKjB,EAAUC,EAAcU,MAAQ,IAAMG,EAAM,IAAMC,IAClF,MAAMG,EAAS,IAAIJ,KAAOC,IAE1B,MAAO,GADUd,EAAcU,MAAQO,SACbF,KAAO,GAChCG,GAAYC,KAAK,IACpBC,EAAe,CACb,CAACpB,EAAcE,WAAY,OAAOF,EAAcM,QAAQe,SAAS,OACjE,CAACrB,EAAcC,WAAY,OAAOD,EAAcM,QAAQgB,UAAU,OAClE,CAACtB,EAAcI,OAAQ,OAAOJ,EAAcM,QAAQiB,KAAK,OACzD,CAACvB,EAAcK,QAAS,OAAOL,EAAcM,QAAQe,SAAS,OAC9D,CACErB,EAAcG,eACd,kCAAkCH,EAAcC,oBAAoBD,EAAcK,eAGtF,KAEJmB,CAAG"}
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"}
@@ -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"}
@@ -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,cACM,WAAY,SAAQ,WAAW;IACnC;;OAEG;IAEH,IAAI,EAAE,MAAM,CAAC;IACb;;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,YAAY,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI;CAC5C;AAED,eAAe,WAAW,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,CAAC"}
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"}
@@ -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 l,nothing as a}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 l`<a part="root" ${o(this.observedRecord)} href="${this.href||a}" target="${this.target}" @click="${this._handleClick}">${e()}</a>`}_handleClick(t){}};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};
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
@@ -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","_","__decorate","property","prototype","undefined","styles","css","SuperAnchor$1"],"mappings":"kPAOA,IAAMA,EAAN,MAAMA,oBAAoBC,EAA1B,WAAAC,uBAUEC,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,UAKE,YAAAD,CAAaE,GAAa,GAzBpCC,EAAA,CADCC,KACWlB,EAAAmB,UAAA,YAAAC,GAKZH,EAAA,CADCC,KACwDlB,EAAAmB,UAAA,cAAAC,GAVrDpB,EAAWiB,EAAA,CADhBI,EAAOC,CAAG,sMACLtB,GAiCN,IAAAuB,EAAevB"}
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"}
@@ -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
- declare class SuperInput extends GlobalStyle {
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: any;
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;AAElF,OAAO,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAGrD,OAAO,EAAE,WAAW,EAAiB,MAAM,mBAAmB,CAAC;AAM/D,cACM,UAAW,SAAQ,WAAW;IAClC,SAAS,UAAS;IAElB,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC;IAG/B,QAAQ,UAAS;IAGjB,IAAI,EAAE,SAAS,CAAC;IAGhB,WAAW,EAAE,MAAM,CAAC;IAGpB,IAAI,EAAE,MAAM,CAAC;IAGb,KAAK,EAAE,GAAG,CAAC;IAEX,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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N,gBAAgB,GAChB,QAAQ,GACR,OAAO,GACP,OAAO,GACP,UAAU,GACV,OAAO,GACP,MAAM,GACN,OAAO,CAAC"}
@@ -1,2 +1,2 @@
1
- import{__decorate as t}from"tslib";import{part as e,styles as i,omit as n,htmlSlot as o}from"@godown/element";import s from"@godown/f7-icon/icons/eye-slash-fill.js";import{css as a,html as p}from"lit";import{property as r}from"lit/decorators.js";import{cssGlobalVars as u,GlobalStyle as d}from"./global-style.js";const l=a`.input-field{align-items:center;border-radius:inherit;display:flex;height:inherit;position:relative}.input-field [part=input]{background:transparent;color:inherit;height:100%;padding:0 var(${u.input}-space);width:100%}.input-field.outline,.input-field:focus-within{box-shadow:var(${u.input}-box-shadow)}.input-field [part=icon]{align-items:center;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(${u.input}-space)}.input-field [part=prefix] [part=icon]{padding-inline-start:var(${u.input}-space)}`,h=a`:host{${u.input}-width:10em;${u.input}-height:1.6em;${u.input}-space:0.2em;${u.input}-background:var(${u.background});${u.input}-control:var(${u.foreground});${u.input}-control-edge:var(${u.active});${u.input}-radius:0.2em;${u.input}-box-shadow:0px 0px 0px .1em var(${u.active});border-radius:var(${u.input}-radius)}:host([disabled]){cursor:not-allowed;filter:brightness(.85)}input:disabled{cursor:inherit}input::-ms-clear,input::-ms-reveal{display:none}`;let c=class SuperInput extends d{constructor(){super(...arguments),this.autofocus=!1,this.disabled=!1,this.compositing=!1,this.makeId=Math.random().toString(36).slice(1),this.nameValue=this.namevalue}get observedRecord(){return n(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 p`<label for="${this.makeId}" part="prefix">${o("prefix")}</label>`}_renderSuffix(){const t="password";return p`<label for="${this.makeId}" part="suffix">${"password"===this.type?p`<i part="icon" @mousedown="${()=>this._changeInputType("text")}" @mouseup="${()=>this._changeInputType(t)}" @mouseleave="${()=>this._changeInputType(t)}">${s()}</i>`:o("suffix")}</label>`}};t([r()],c.prototype,"autocomplete",void 0),t([r({type:Boolean,reflect:!0})],c.prototype,"disabled",void 0),t([r({reflect:!0})],c.prototype,"type",void 0),t([r({reflect:!0})],c.prototype,"placeholder",void 0),t([r({reflect:!0})],c.prototype,"name",void 0),t([r()],c.prototype,"value",void 0),t([r()],c.prototype,"default",void 0),t([e("input")],c.prototype,"_input",void 0),c=t([i(l,h)],c);var f=c;export{c as SuperInput,f as default};
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
@@ -1 +1 @@
1
- {"version":3,"file":"super-input.js","sources":["../src/core/super-input.ts"],"sourcesContent":null,"names":["fieldStyle","css","cssGlobalVars","input","inputStyle","background","foreground","active","SuperInput","GlobalStyle","constructor","this","autofocus","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","PASSWORD","iconEyeSlashFill","__decorate","property","prototype","undefined","Boolean","reflect","part","styles","SuperInput$1"],"mappings":"yTAOA,MAAMA,EAAaC,CAAG,gMAAgMC,EAAcC,yFAAyFD,EAAcC,kPAAkPD,EAAcC,gFAAgFD,EAAcC,gBAEnqBC,EAAaH,CAAG,SAASC,EAAcC,oBAAoBD,EAAcC,sBAAsBD,EAAcC,qBAAqBD,EAAcC,wBAAwBD,EAAcG,eAAeH,EAAcC,qBAAqBD,EAAcI,eAAeJ,EAAcC,0BAA0BD,EAAcK,WAAWL,EAAcC,sBAAsBD,EAAcC,yCAAyCD,EAAcK,6BAA6BL,EAAcC,2JAGhe,IAAMK,EAAN,MAAMA,mBAAmBC,EAAzB,WAAAC,uBACEC,KAASC,WAAG,EAKZD,KAAQE,UAAG,EA8BXF,KAAWG,aAAG,EAUJH,KAAAI,OAAiBC,KAAKC,SAASC,SAAS,IAAIC,MAAM,GAM5DR,KAAAS,UAAiCT,KAAKU,UAhCtC,kBAAIC,GACF,OAAOC,EAAKC,MAAMF,eAAgB,UAAW,SAiB/C,g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AI,8BAGc,IAAM1C,KAAKmC,iBAAiB,sBAC9B,IAAMnC,KAAKmC,iBAAiBU,oBACzB,IAAM7C,KAAKmC,iBAAiBU,OAEzCC,UAGNH,EAAS,sBAxInBI,EAAA,CADCC,KAC6BnD,EAAAoD,UAAA,oBAAAC,GAG9BH,EAAA,CADCC,EAAS,CAAEX,KAAMc,QAASC,SAAS,KACpBvD,EAAAoD,UAAA,gBAAAC,GAGhBH,EAAA,CADCC,EAAS,CAAEI,SAAS,KACNvD,EAAAoD,UAAA,YAAAC,GAGfH,EAAA,CADCC,EAAS,CAAEI,SAAS,KACFvD,EAAAoD,UAAA,mBAAAC,GAGnBH,EAAA,CADCC,EAAS,CAAEI,SAAS,KACTvD,EAAAoD,UAAA,YAAAC,GAGZH,EAAA,CADCC,KACSnD,EAAAoD,UAAA,aAAAC,GAUVH,EAAA,CADCC,KACWnD,EAAAoD,UAAA,eAAAC,GAGFH,EAAA,CADTM,EAAK,UAC4BxD,EAAAoD,UAAA,cAAAC,GA/B9BrD,EAAUkD,EAAA,CADfO,EAAOjE,EAAYI,IACdI,GAiJN,IAAA0D,EAAe1D"}
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":"gTAOA,MAAMA,EAAaC,CAAG,4BAA4BC,EAAcC,mQAAmQD,EAAcC,wRAE3UC,EAAaH,CAAG,SAASC,E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le {
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;AAEzB,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;AAE7D,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,QAAQ,CAAC;AAE/C,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,WAAW,GAAG,aAAa,GAAG,cAAc,CAAC;AAEhG,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,UAAU,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,EAA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