godown 3.2.0 → 3.4.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 (262) hide show
  1. package/build/godown+lit.iife.js +12 -12
  2. package/build/godown+lit.iife.js.map +1 -1
  3. package/build/godown+lit.js +12 -12
  4. package/build/godown+lit.js.map +1 -1
  5. package/build/godown+lit.umd.js +12 -12
  6. package/build/godown+lit.umd.js.map +1 -1
  7. package/build/godown.iife.js +10 -10
  8. package/build/godown.js +10 -10
  9. package/build/godown.js.map +1 -1
  10. package/build/godown.umd.js +10 -10
  11. package/build/godown.umd.js.map +1 -1
  12. package/components/alert.d.ts +1 -3
  13. package/components/alert.d.ts.map +1 -1
  14. package/components/alert.js +1 -1
  15. package/components/alert.js.map +1 -1
  16. package/components/avatar.d.ts +5 -4
  17. package/components/avatar.d.ts.map +1 -1
  18. package/components/avatar.js +1 -1
  19. package/components/avatar.js.map +1 -1
  20. package/components/badge.d.ts +10 -2
  21. package/components/badge.d.ts.map +1 -1
  22. package/components/badge.js.map +1 -1
  23. package/components/breath.d.ts +2 -3
  24. package/components/breath.d.ts.map +1 -1
  25. package/components/breath.js +1 -1
  26. package/components/breath.js.map +1 -1
  27. package/components/button.d.ts +8 -3
  28. package/components/button.d.ts.map +1 -1
  29. package/components/button.js +1 -1
  30. package/components/button.js.map +1 -1
  31. package/components/card.d.ts +6 -0
  32. package/components/card.d.ts.map +1 -1
  33. package/components/card.js +1 -1
  34. package/components/card.js.map +1 -1
  35. package/components/carousel.d.ts +7 -13
  36. package/components/carousel.d.ts.map +1 -1
  37. package/components/carousel.js +1 -1
  38. package/components/carousel.js.map +1 -1
  39. package/components/details.d.ts +3 -3
  40. package/components/details.d.ts.map +1 -1
  41. package/components/dialog.d.ts +9 -6
  42. package/components/dialog.d.ts.map +1 -1
  43. package/components/dialog.js +1 -1
  44. package/components/dialog.js.map +1 -1
  45. package/components/divider.d.ts +1 -1
  46. package/components/heading.d.ts +2 -0
  47. package/components/heading.d.ts.map +1 -1
  48. package/components/heading.js.map +1 -1
  49. package/components/input.d.ts +2 -2
  50. package/components/input.d.ts.map +1 -1
  51. package/components/input.js +1 -1
  52. package/components/input.js.map +1 -1
  53. package/components/link.d.ts +1 -1
  54. package/components/link.d.ts.map +1 -1
  55. package/components/link.js +1 -1
  56. package/components/link.js.map +1 -1
  57. package/components/progress.d.ts +0 -7
  58. package/components/progress.d.ts.map +1 -1
  59. package/components/progress.js +1 -1
  60. package/components/progress.js.map +1 -1
  61. package/components/range.d.ts +48 -19
  62. package/components/range.d.ts.map +1 -1
  63. package/components/range.js +1 -1
  64. package/components/range.js.map +1 -1
  65. package/components/rotate.d.ts +6 -4
  66. package/components/rotate.d.ts.map +1 -1
  67. package/components/rotate.js.map +1 -1
  68. package/components/router.d.ts.map +1 -1
  69. package/components/router.js +1 -1
  70. package/components/router.js.map +1 -1
  71. package/components/select.d.ts +4 -2
  72. package/components/select.d.ts.map +1 -1
  73. package/components/select.js +1 -1
  74. package/components/select.js.map +1 -1
  75. package/components/split.d.ts +2 -1
  76. package/components/split.d.ts.map +1 -1
  77. package/components/split.js +1 -1
  78. package/components/split.js.map +1 -1
  79. package/components/switch.d.ts +5 -7
  80. package/components/switch.d.ts.map +1 -1
  81. package/components/switch.js +1 -1
  82. package/components/switch.js.map +1 -1
  83. package/components/text.js +1 -1
  84. package/components/text.js.map +1 -1
  85. package/components/time.d.ts +2 -5
  86. package/components/time.d.ts.map +1 -1
  87. package/components/time.js +1 -1
  88. package/components/time.js.map +1 -1
  89. package/components/tooltip.d.ts +3 -2
  90. package/components/tooltip.d.ts.map +1 -1
  91. package/components/tooltip.js +1 -1
  92. package/components/tooltip.js.map +1 -1
  93. package/components/typewriter.d.ts.map +1 -1
  94. package/components/typewriter.js +1 -1
  95. package/components/typewriter.js.map +1 -1
  96. package/core/direction.d.ts +27 -0
  97. package/core/direction.d.ts.map +1 -0
  98. package/core/direction.js +2 -0
  99. package/core/direction.js.map +1 -0
  100. package/core/global-style.d.ts +1 -2
  101. package/core/global-style.d.ts.map +1 -1
  102. package/core/global-style.js +1 -1
  103. package/core/global-style.js.map +1 -1
  104. package/core/outline.d.ts +20 -0
  105. package/core/outline.d.ts.map +1 -0
  106. package/core/outline.js +2 -0
  107. package/core/outline.js.map +1 -0
  108. package/core/super-anchor.d.ts +2 -2
  109. package/core/super-anchor.d.ts.map +1 -1
  110. package/core/super-anchor.js +1 -1
  111. package/core/super-anchor.js.map +1 -1
  112. package/core/super-input.d.ts +2 -0
  113. package/core/super-input.d.ts.map +1 -1
  114. package/core/super-input.js +1 -1
  115. package/core/super-input.js.map +1 -1
  116. package/core/super-openable.d.ts +0 -4
  117. package/core/super-openable.d.ts.map +1 -1
  118. package/custom-elements.json +1 -1
  119. package/dev/components/alert.d.ts +1 -3
  120. package/dev/components/alert.d.ts.map +1 -1
  121. package/dev/components/alert.js +33 -57
  122. package/dev/components/alert.js.map +1 -1
  123. package/dev/components/avatar.d.ts +5 -4
  124. package/dev/components/avatar.d.ts.map +1 -1
  125. package/dev/components/avatar.js +5 -4
  126. package/dev/components/avatar.js.map +1 -1
  127. package/dev/components/badge.d.ts +10 -2
  128. package/dev/components/badge.d.ts.map +1 -1
  129. package/dev/components/badge.js +8 -0
  130. package/dev/components/badge.js.map +1 -1
  131. package/dev/components/breath.d.ts +2 -3
  132. package/dev/components/breath.d.ts.map +1 -1
  133. package/dev/components/breath.js +3 -14
  134. package/dev/components/breath.js.map +1 -1
  135. package/dev/components/button.d.ts +8 -3
  136. package/dev/components/button.d.ts.map +1 -1
  137. package/dev/components/button.js +19 -5
  138. package/dev/components/button.js.map +1 -1
  139. package/dev/components/card.d.ts +6 -0
  140. package/dev/components/card.d.ts.map +1 -1
  141. package/dev/components/card.js +11 -11
  142. package/dev/components/card.js.map +1 -1
  143. package/dev/components/carousel.d.ts +7 -13
  144. package/dev/components/carousel.d.ts.map +1 -1
  145. package/dev/components/carousel.js +40 -39
  146. package/dev/components/carousel.js.map +1 -1
  147. package/dev/components/details.d.ts +3 -3
  148. package/dev/components/details.d.ts.map +1 -1
  149. package/dev/components/details.js +3 -3
  150. package/dev/components/details.js.map +1 -1
  151. package/dev/components/dialog.d.ts +9 -6
  152. package/dev/components/dialog.d.ts.map +1 -1
  153. package/dev/components/dialog.js +58 -62
  154. package/dev/components/dialog.js.map +1 -1
  155. package/dev/components/divider.d.ts +1 -1
  156. package/dev/components/divider.js +1 -1
  157. package/dev/components/heading.d.ts +2 -0
  158. package/dev/components/heading.d.ts.map +1 -1
  159. package/dev/components/heading.js +2 -0
  160. package/dev/components/heading.js.map +1 -1
  161. package/dev/components/input.d.ts +2 -2
  162. package/dev/components/input.d.ts.map +1 -1
  163. package/dev/components/input.js +30 -9
  164. package/dev/components/input.js.map +1 -1
  165. package/dev/components/link.d.ts +1 -1
  166. package/dev/components/link.d.ts.map +1 -1
  167. package/dev/components/link.js +2 -2
  168. package/dev/components/link.js.map +1 -1
  169. package/dev/components/progress.d.ts +0 -7
  170. package/dev/components/progress.d.ts.map +1 -1
  171. package/dev/components/progress.js +4 -25
  172. package/dev/components/progress.js.map +1 -1
  173. package/dev/components/range.d.ts +48 -19
  174. package/dev/components/range.d.ts.map +1 -1
  175. package/dev/components/range.js +83 -61
  176. package/dev/components/range.js.map +1 -1
  177. package/dev/components/rotate.d.ts +6 -4
  178. package/dev/components/rotate.d.ts.map +1 -1
  179. package/dev/components/rotate.js +6 -4
  180. package/dev/components/rotate.js.map +1 -1
  181. package/dev/components/router.d.ts.map +1 -1
  182. package/dev/components/router.js +2 -3
  183. package/dev/components/router.js.map +1 -1
  184. package/dev/components/select.d.ts +4 -2
  185. package/dev/components/select.d.ts.map +1 -1
  186. package/dev/components/select.js +27 -24
  187. package/dev/components/select.js.map +1 -1
  188. package/dev/components/split.d.ts +2 -1
  189. package/dev/components/split.d.ts.map +1 -1
  190. package/dev/components/split.js +11 -7
  191. package/dev/components/split.js.map +1 -1
  192. package/dev/components/switch.d.ts +5 -7
  193. package/dev/components/switch.d.ts.map +1 -1
  194. package/dev/components/switch.js +23 -45
  195. package/dev/components/switch.js.map +1 -1
  196. package/dev/components/text.js +2 -2
  197. package/dev/components/time.d.ts +2 -5
  198. package/dev/components/time.d.ts.map +1 -1
  199. package/dev/components/time.js +6 -20
  200. package/dev/components/time.js.map +1 -1
  201. package/dev/components/tooltip.d.ts +3 -2
  202. package/dev/components/tooltip.d.ts.map +1 -1
  203. package/dev/components/tooltip.js +7 -19
  204. package/dev/components/tooltip.js.map +1 -1
  205. package/dev/components/typewriter.d.ts.map +1 -1
  206. package/dev/components/typewriter.js +2 -2
  207. package/dev/components/typewriter.js.map +1 -1
  208. package/dev/core/direction.d.ts +27 -0
  209. package/dev/core/direction.d.ts.map +1 -0
  210. package/dev/core/direction.js +56 -0
  211. package/dev/core/direction.js.map +1 -0
  212. package/dev/core/global-style.d.ts +1 -2
  213. package/dev/core/global-style.d.ts.map +1 -1
  214. package/dev/core/global-style.js +11 -11
  215. package/dev/core/global-style.js.map +1 -1
  216. package/dev/core/outline.d.ts +20 -0
  217. package/dev/core/outline.d.ts.map +1 -0
  218. package/dev/core/outline.js +44 -0
  219. package/dev/core/outline.js.map +1 -0
  220. package/dev/core/super-anchor.d.ts +2 -2
  221. package/dev/core/super-anchor.d.ts.map +1 -1
  222. package/dev/core/super-anchor.js +0 -1
  223. package/dev/core/super-anchor.js.map +1 -1
  224. package/dev/core/super-input.d.ts +2 -0
  225. package/dev/core/super-input.d.ts.map +1 -1
  226. package/dev/core/super-input.js +19 -30
  227. package/dev/core/super-input.js.map +1 -1
  228. package/dev/core/super-openable.d.ts +0 -4
  229. package/dev/core/super-openable.d.ts.map +1 -1
  230. package/package.json +3 -3
  231. package/src/components/alert.ts +34 -65
  232. package/src/components/avatar.ts +7 -5
  233. package/src/components/badge.ts +10 -3
  234. package/src/components/breath.ts +5 -17
  235. package/src/components/button.ts +19 -6
  236. package/src/components/card.ts +11 -11
  237. package/src/components/carousel.ts +45 -44
  238. package/src/components/details.ts +3 -3
  239. package/src/components/dialog.ts +66 -65
  240. package/src/components/divider.ts +1 -1
  241. package/src/components/heading.ts +2 -0
  242. package/src/components/input.ts +30 -9
  243. package/src/components/link.ts +2 -2
  244. package/src/components/progress.ts +4 -25
  245. package/src/components/range.ts +92 -70
  246. package/src/components/rotate.ts +6 -4
  247. package/src/components/router.ts +2 -3
  248. package/src/components/select.ts +33 -26
  249. package/src/components/split.ts +12 -7
  250. package/src/components/switch.ts +26 -41
  251. package/src/components/text.ts +2 -2
  252. package/src/components/time.ts +10 -25
  253. package/src/components/tooltip.ts +8 -20
  254. package/src/components/typewriter.ts +9 -7
  255. package/src/core/direction.ts +65 -0
  256. package/src/core/global-style.ts +12 -14
  257. package/src/core/outline.ts +54 -0
  258. package/src/core/super-anchor.ts +3 -2
  259. package/src/core/super-input.ts +22 -30
  260. package/src/core/super-openable.ts +0 -8
  261. package/vscode.html-custom-data.json +1 -1
  262. package/web-types.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import { type HandlerEvent } from "@godown/element";
2
2
  import { type TemplateResult } from "lit";
3
- import SuperInput from "../core/super-input.js";
3
+ import { SuperInput } from "../core/super-input.js";
4
4
  /**
5
5
  * {@linkcode Split} renders multiple input boxes.
6
6
  *
@@ -25,6 +25,7 @@ declare class Split extends SuperInput {
25
25
  index: number;
26
26
  current: number;
27
27
  currentValue: (string | void)[];
28
+ get observedRecord(): Record<string, any>;
28
29
  protected render(): TemplateResult<1>;
29
30
  connectedCallback(): void;
30
31
  protected _handleInput(e: HandlerEvent<HTMLInputElement, InputEvent>): void;
@@ -1 +1 @@
1
- {"version":3,"file":"split.d.ts","sourceRoot":"","sources":["../src/components/split.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAyC,MAAM,iBAAiB,CAAC;AAC3F,OAAO,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAIrD,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAKhD;;;;;;;;;;;;GAYG;AACH,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AY,CAAC,CAAC,EAAE,YAAY,CAAC,gBAAgB,EAAE,UAAU,CAAC,GAAG,IAAI;IAY3E;;;;;;;;;;;;;;;OAeG;IACH,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IA2C9C,KAAK,IAAI,IAAI;IAKb,OAAO,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;IAMxB,IAAI,IAAI,IAAI;IAOZ,KAAK,IAAI,IAAI;CAQd;AAED,eAAe,KAAK,CAAC;AACrB,OAAO,EAAE,KAAK,EAAE,CAAC"}
@@ -1,2 +1,2 @@
1
- import{__decorate as t}from"tslib";import{godown as e,styles as i,attr as r,loop as s,classList as n}from"@godown/element";import{css as u,html as o}from"lit";import{property as l,state as c}from"lit/decorators.js";import{scopePrefix as a,cssGlobalVars as h}from"../core/global-style.js";import p from"../core/super-input.js";const d="split",b=a(d);let f=class Split extends p{constructor(){super(...arguments),this.len=6,this.index=-1,this.current=-1,this.currentValue=[]}render(){return o`<div part="root" ${r(this.observedRecord)}>${s(this.len,(t=>o`<span part="input-box" class="${n({focus:this.current===t})}" @click="${this.disabled?null:()=>this.focusAt(t)}">${this.currentValue[t]}</span>`))} <input part="input" id="${this.makeId}" @blur="${this.blur}" @input="${this._handleInput}" .value="${this.value.padStart(this.len," ")}"></div>`}connectedCallback(){super.connectedCallback(),this.reset()}_handleInput(t){t.stopPropagation(),this.compositing||(this.fillInput(t.data),this.value=this.currentValue.join(""),this.dispatchEvent(new CustomEvent("input",{detail:this.value,composed:!0,bubbles:!0})))}fillInput(t){if(null===t){if(null!==this.currentValue[this.current])this.currentValue[this.current]=null;else{this.currentValue[this.current-1]=null;const t=this.currentValue.findLastIndex((t=>null!==t));this.current=this.current-1<0?t<0?0:t:this.current-1}return}const e=t.length>1;if(this.currentValue[this.current]=t[0],this.current+1>=this.len?(this.current=this.currentValue.indexOf(null),-1===this.current&&this.blur()):this.current+=1,e){const e=t.slice(1);e&&this.fillInput(e)}}focus(){this.focusAt(this.current),super.focus()}focusAt(t){this.current=t,this._input.focus(),this.dispatchEvent(new CustomEvent("focus",{detail:t,bubbles:!0,composed:!0}))}blur(){this._input.blur(),this.current=-1,super.blur(),this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}reset(){this.current=-1,this.value=this.default,this.currentValue=this.value.split("").concat(Array(this.len-this.value.length).fill(null)),this.index>-1&&(this.current=this.index)}};t([l({type:Number})],f.prototype,"len",void 0),t([l({type:Number})],f.prototype,"index",void 0),t([c()],f.prototype,"current",void 0),t([c()],f.prototype,"currentValue",void 0),f=t([e(d),i(u`:host{border-radius:1px;color:var(${h.foreground});display:block;width:-moz-fit-content;width:fit-content;${b}--size:1.45em;${b}--gap:.25em}:host([contents]) [part=root]{width:-moz-fit-content;width:fit-content}[part=root]{display:flex;gap:var(${b}--gap);justify-content:space-between;position:relative;width:100%}[part=input-box],[part=root]{border-radius:inherit;vertical-align:top}[part=input-box]{background-color:var(${h.input}-background);height:var(${b}--size);text-align:center;width:var(${b}--size)}[part=input]{background:none;height:100%;opacity:0;position:absolute;width:100%;z-index:-1}.focus{box-shadow:var(${h.input}-box-shadow)}`)],f);var v=f;export{f as Split,v as default};
1
+ import{__decorate as t}from"tslib";import{godown as e,styles as i,omit as r,attr as s,loop as n,tokenList as u}from"@godown/element";import{css as o,html as l}from"lit";import{property as c,state as h}from"lit/decorators.js";import{scopePrefix as a,cssGlobalVars as p}from"../core/global-style.js";import{SuperInput as d}from"../core/super-input.js";const b="split",f=a(b);let v=class Split extends d{constructor(){super(...arguments),this.len=6,this.index=-1,this.current=-1,this.currentValue=[]}get observedRecord(){return r(super.observedRecord,"outline-type")}render(){return l`<div part="root" ${s(this.observedRecord)}>${n(this.len,(t=>l`<span part="input-box" outline-type="${this.outlineType}" class="${u({focus:this.current===t})}" @click="${this.disabled?null:()=>this.focusAt(t)}">${this.currentValue[t]}</span>`))} <input part="input" id="${this.makeId}" @blur="${this.blur}" @input="${this._handleInput}" .value="${this.value.padStart(this.len," ")}"></div>`}connectedCallback(){super.connectedCallback(),this.reset()}_handleInput(t){t.stopPropagation(),this.compositing||(this.fillInput(t.data),this.value=this.currentValue.join(""),this.dispatchEvent(new CustomEvent("input",{detail:this.value,composed:!0,bubbles:!0})))}fillInput(t){if(null===t){if(null!==this.currentValue[this.current])this.currentValue[this.current]=null;else{this.currentValue[this.current-1]=null;const t=this.currentValue.findLastIndex((t=>null!==t));this.current=this.current-1<0?t<0?0:t:this.current-1}return}const e=t.length>1;if(this.currentValue[this.current]=t[0],this.current+1>=this.len?(this.current=this.currentValue.indexOf(null),-1===this.current&&this.blur()):this.current+=1,e){const e=t.slice(1);e&&this.fillInput(e)}}focus(){this.focusAt(this.current),super.focus()}focusAt(t){this.current=t,this._input.focus(),this.dispatchEvent(new CustomEvent("focus",{detail:t,bubbles:!0,composed:!0}))}blur(){this._input.blur(),this.current=-1,super.blur(),this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}reset(){this.current=-1,this.value=this.default,this.currentValue=this.value.split("").concat(Array(this.len-this.value.length).fill(null)),this.index>-1&&(this.current=this.index)}};t([c({type:Number})],v.prototype,"len",void 0),t([c({type:Number})],v.prototype,"index",void 0),t([h()],v.prototype,"current",void 0),t([h()],v.prototype,"currentValue",void 0),v=t([e(b),i(o`:host{border-radius:1px;display:block;width:-moz-fit-content;width:fit-content;${f}--size:1.45em;${f}--gap:.25em}:host([contents]) [part=root]{width:-moz-fit-content;width:fit-content}[part=root]{display:flex;gap:var(${f}--gap);justify-content:space-between;position:relative;width:100%}[part=input-box],[part=root]{border-radius:inherit;vertical-align:top}[part=input-box]{align-items:center;display:inline-flex;height:var(${f}--size);justify-content:center;width:var(${f}--size)}[part=input]{background:none;height:100%;opacity:0;position:absolute;width:100%;z-index:-1}.focus{${p.input}-outline-color:var(${p.active})}`)],v);var m=v;export{v as Split,m as default};
2
2
  //# sourceMappingURL=split.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"split.js","sources":["../src/components/split.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","Split","SuperInput","constructor","this","len","index","current","currentValue","render","html","attr","observedRecord","loop","classList","focus","disabled","focusAt","makeId","blur","_handleInput","value","padStart","connectedCallback","super","reset","e","stopPropagation","compositing","fillInput","data","join","dispatchEvent","CustomEvent","detail","composed","bubbles","lastNotNull","findLastIndex","a","multiple","length","indexOf","after","slice","i","_input","default","split","concat","Array","fill","__decorate","property","type","Number","prototype","undefined","state","godown","styles","css","cssGlobalVars","foreground","input","Split$1"],"mappings":"sUAOA,MAAMA,EAAY,QACZC,EAAWC,EAAYF,GAiB7B,IAAMG,EAAN,MAAMA,cAAcC,EAApB,WAAAC,uBAKEC,KAAGC,IAAG,EAMND,KAAKE,OAAK,EAGVF,KAAOG,SAAK,EAGZH,KAAYI,aAAsB,GAExB,MAAAC,GACR,OAAOC,CAAI,oBAGLC,EAAKP,KAAKQ,mBAEVC,EACAT,KAAKC,KACJC,GAAkBI,CAAI,iCAGVI,EAAU,CAAEC,MAAOX,KAAKG,UAAYD,gBACnCF,KAAKY,SAAW,KAAO,IAAMZ,KAAKa,QAAQX,OAElDF,KAAKI,aAAaF,yCAMlBF,KAAKc,kBACHd,KAAKe,iBACHf,KAAKgB,yBAGbhB,KAAKiB,MAAMC,SAASlB,KAAKC,IAAK,eAOxC,iBAAAkB,GACEC,MAAMD,oBACNnB,KAAKqB,QAGG,YAAAL,CAAaM,GACrBA,EAAEC,kBACEvB,KAAKwB,cAITxB,KAAKyB,UAAUH,EAAEI,MACjB1B,KAAKiB,MAAQjB,KAAKI,aAAauB,KAAK,IAEpC3B,KAAK4B,cAAc,IAAIC,YAAY,QAAS,CAAEC,OAAQ9B,KAAKiB,MAAOc,UAAU,EAAMC,SAAS,MAmBnF,SAAAP,CAAUC,GAClB,GAAa,OAATA,EAAe,CAGjB,GAAwC,OAApC1B,KAAKI,aAAaJ,KAAKG,SAGzBH,KAAKI,aAAaJ,KAAKG,SAAW,SAC7B,C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,EAAAuD,UAAA,eAAAC,GAGZL,EAAA,CADCM,KACmCzD,EAAAuD,UAAA,oBAAAC,GAjBhCxD,EAAKmD,EAAA,CAFVO,EAAO7D,GACP8D,EAAOC,CAAG,qCAAqCC,EAAcC,sEAAsEhE,kBAAyBA,wHAA+HA,kLAAyL+D,EAAcE,gCAAgCjE,wCAA+CA,6HAAoI+D,EAAcE,uBAC9rB/D,GA2JN,IAAAgE,EAAehE"}
1
+ {"version":3,"file":"split.js","sources":["../src/components/split.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","Split","SuperInput","constructor","this","len","index","current","currentValue","observedRecord","omit","super","render","html","attr","loop","outlineType","tokenList","focus","disabled","focusAt","makeId","blur","_handleInput","value","padStart","connectedCallback","reset","e","stopPropagation","compositing","fillInput","data","join","dispatchEvent","CustomEvent","detail","composed","bubbles","lastNotNull","findLastIndex","a","multiple","length","indexOf","after","slice","i","_input","default","split","concat","Array","fill","__decorate","property","type","Number","prototype","undefined","state","godown","styles","css","cssGlobalVars","input","active","Split$1"],"mappings":"8VAOA,MAAMA,EAAY,QACZC,EAAWC,EAAYF,GAiB7B,IAAMG,EAAN,MAAMA,cAAcC,EAApB,WAAAC,uBAKEC,KAAGC,IAAG,EAMND,KAAKE,OAAK,EAGVF,KAAOG,SAAK,EAGZH,KAAYI,aAAsB,GAElC,kBAAIC,GACF,OAAOC,EAAKC,MAAMF,eAAgB,gBAG1B,MAAAG,GACR,OAAOC,CAAI,oBAGLC,EAAKV,KAAKK,mBAEVM,EACAX,KAAKC,KACJC,GAAkBO,CAAI,wCAGHT,KAAKY,uBACZC,EAAU,CAAEC,MAAOd,KAAKG,UAAYD,gBACnCF,KAAKe,SAAW,KAAO,IAAMf,KAAKgB,QAAQd,OAElDF,KAAKI,aAAaF,yCAMlBF,KAAKiB,kBACHjB,KAAKkB,iBACHlB,KAAKmB,yBAGbnB,KAAKoB,MAAMC,SAASrB,KAAKC,IAAK,eAOxC,iBAAAqB,GACEf,MAAMe,o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,KAAAV,GACEvB,KAAKG,SAAY,EACjBH,KAAKoB,MAAQpB,KAAK6C,QAClB7C,KAAKI,aAAeJ,KAAKoB,MAAM0B,MAAM,IAAIC,OAAOC,MAAMhD,KAAKC,IAAMD,KAAKoB,MAAMmB,QAAQU,KAAK,OACrFjD,KAAKE,WACPF,KAAKG,QAAUH,KAAKE,SAtJxBgD,EAAA,CADCC,EAAS,CAAEC,KAAMC,UACXxD,EAAAyD,UAAA,WAAAC,GAMPL,EAAA,CADCC,EAAS,CAAEC,KAAMC,UACRxD,EAAAyD,UAAA,aAAAC,GAGVL,EAAA,CADCM,KACW3D,EAAAyD,UAAA,eAAAC,GAGZL,EAAA,CADCM,KACmC3D,EAAAyD,UAAA,oBAAAC,GAjBhC1D,EAAKqD,EAAA,CAFVO,EAAO/D,GACPgE,EAAOC,CAAG,kFAAkFhE,kBAAyBA,wHAA+HA,+MAAsNA,6CAAoDA,8GAAqHiE,EAAcC,2BAA2BD,EAAcE,aACrqBjE,GAgKN,IAAAkE,EAAelE"}
@@ -1,17 +1,14 @@
1
1
  import { type TemplateResult } from "lit";
2
- import SuperInput from "../core/super-input.js";
2
+ import { SuperInput } from "../core/super-input.js";
3
3
  /**
4
4
  * {@linkcode Switch} renders a switch.
5
5
  *
6
- * The switch is rectangular by default,
7
- * set the round property to rounded switch.
8
- *
9
6
  * @fires change - Fires when the switch is switched.
10
7
  * @category input
11
8
  */
12
9
  declare class Switch extends SuperInput {
13
10
  /**
14
- * Display rounded.
11
+ * @deprecated
15
12
  */
16
13
  round: boolean;
17
14
  /**
@@ -25,15 +22,16 @@ declare class Switch extends SuperInput {
25
22
  /**
26
23
  * Default checked state.
27
24
  */
28
- default: string;
25
+ default: boolean;
29
26
  /**
30
27
  * Input value.
31
28
  */
32
29
  value: string;
33
30
  protected _input: HTMLInputElement;
31
+ get observedRecord(): Record<string, any>;
34
32
  protected render(): TemplateResult<1>;
35
33
  reset(): void;
36
- connectedCallback(): void;
34
+ protected _connectedInit(): void;
37
35
  protected _handleChange(): void;
38
36
  namevalue(): [string, boolean];
39
37
  }
@@ -1 +1 @@
1
- {"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../src/components/switch.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAIrD,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAKhD;;;;;;;;GAQG;AACH,cAEM,MAAO,SAAQ,UAAU;IAC7B;;OAEG;IAEH,KAAK,UAAS;IAEd;;OAEG;IAEH,OAAO,UAAS;IAEhB;;OAEG;IAEH,QAAQ,UAAS;IAEjB;;OAEG;IAEH,OAAO,SAAW;IAElB;;OAEG;IAEH,KAAK,SAAQ;IAGb,SAAS,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAEnC,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;IAIrC,KAAK,IAAI,IAAI;IAKb,iBAAiB,IAAI,IAAI;IAUzB,SAAS,CAAC,aAAa,IAAI,IAAI;IAK/B,SAAS,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC;CAG/B;AAED,eAAe,MAAM,CAAC;AACtB,OAAO,EAAE,MAAM,EAAE,CAAC"}
1
+ {"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../src/components/switch.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAIrD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAKpD;;;;;GAKG;AACH,cAEM,MAAO,SAAQ,UAAU;IAC7B;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IAEf;;OAEG;IAEH,OAAO,UAAS;IAEhB;;OAEG;IAEH,QAAQ,UAAS;IAEjB;;OAEG;IAEH,OAAO,UAAS;IAEhB;;OAEG;IAEH,KAAK,SAAQ;IAGb,SAAS,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAEnC,IAAI,cAAc,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAExC;IAED,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;IAIrC,KAAK,IAAI,IAAI;IAKb,SAAS,CAAC,cAAc,IAAI,IAAI;IAShC,SAAS,CAAC,aAAa,IAAI,IAAI;IAK/B,SAAS,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC;CAG/B;AAED,eAAe,MAAM,CAAC;AACtB,OAAO,EAAE,MAAM,EAAE,CAAC"}
@@ -1,2 +1,2 @@
1
- import{__decorate as e}from"tslib";import{godown as t,styles as i,attr as r}from"@godown/element";import{css as a,html as o}from"lit";import{property as n,query as d}from"lit/decorators.js";import{scopePrefix as s,cssGlobalVars as h}from"../core/global-style.js";import c from"../core/super-input.js";const p="switch",l=s(p);let u=class Switch extends c{constructor(){super(...arguments),this.round=!1,this.checked=!1,this.disabled=!1,this.default="false",this.value="on"}render(){return o`<div part="root" ${r(this.observedRecord)} class="${this.round?"round":"rect"}"><input part="input" type="checkbox" ?disabled="${this.disabled}" ?checked="${this.checked}" name="${this.name}" id="${this.makeId}" @change="${this._handleChange}"> <span part="handle" class="${this.checked}"></span></div>`}reset(){this.checked="true"===this.default,this._input.checked=this.checked}connectedCallback(){super.connectedCallback(),this.checked&&(this.default="true"),"true"===this.default&&(this.checked=!0)}_handleChange(){this.checked=this._input.checked,this.dispatchEvent(new CustomEvent("change",{detail:this.checked,composed:!0}))}namevalue(){return[this.name,this.checked]}};e([n({type:Boolean,reflect:!0})],u.prototype,"round",void 0),e([n({type:Boolean,reflect:!0})],u.prototype,"checked",void 0),e([n({type:Boolean,reflect:!0})],u.prototype,"disabled",void 0),e([n()],u.prototype,"default",void 0),e([n()],u.prototype,"value",void 0),e([d("input")],u.prototype,"_input",void 0),u=e([t(p),i(a`:host,:host([contents]) [part=root]{display:inline-block;height:var(${l}-height);width:var(${l}-width)}:host{${l}-width:3em;${l}-height:calc(var(${l}-width)/2);${l}-handle-size:1.25em;${l}-handle-space:.125em;${l}-transition:.2s ease-in-out;background:var(${h.input}-background);border-radius:0;vertical-align:bottom}[part=handle],[part=root]{transition:var(${l}-transition)}[part=root]{border-radius:inherit;height:inherit;position:relative}[part=input]{-webkit-appearance:none;appearance:none;height:100%;opacity:0;width:100%}[part=handle]{align-items:center;border-radius:inherit;display:inline-flex;height:100%;justify-content:center;left:0;pointer-events:none;position:absolute;width:50%}:host([round]){background:var(${h.passive});border-radius:calc(var(${l}-height)/2)}:host([checked]) [part=handle]{left:50%}.rect .true{background:var(${h.active})}.rect .false{background:var(${h.passive})}.round [part=handle]{--size:var(${l}-handle-size);background:var(--godown--input-control);border-radius:100%;height:var(--size);margin:var(${l}-handle-space);width:var(--size)}:host([checked]) .round{background:var(${h.active})}`)],u);var v=u;export{u as Switch,v as default};
1
+ import{__decorate as e}from"tslib";import{godown as t,styles as i,omit as o,attr as r}from"@godown/element";import{css as a,html as s}from"lit";import{property as h,query as n}from"lit/decorators.js";import{scopePrefix as d,cssGlobalVars as c}from"../core/global-style.js";import{SuperInput as l}from"../core/super-input.js";const p="switch",u=d(p);let v=class Switch extends l{constructor(){super(...arguments),this.checked=!1,this.disabled=!1,this.default=!1,this.value="on"}get observedRecord(){return o(super.observedRecord,"outline-type")}render(){return s`<div part="root" ${r(this.observedRecord)} class="round"><input part="input" type="checkbox" ?disabled="${this.disabled}" ?checked="${this.checked}" name="${this.name}" id="${this.makeId}" @change="${this._handleChange}"> <span part="handle" class="${this.checked}"></span></div>`}reset(){this.checked=this.default,this._input.checked=this.checked}_connectedInit(){this.checked&&(this.default=!0),!0===this.default&&(this.checked=!0)}_handleChange(){this.checked=this._input.checked,this.dispatchEvent(new CustomEvent("change",{detail:this.checked,composed:!0}))}namevalue(){return[this.name,this.checked]}};e([h({type:Boolean,reflect:!0})],v.prototype,"checked",void 0),e([h({type:Boolean,reflect:!0})],v.prototype,"disabled",void 0),e([h({type:Boolean})],v.prototype,"default",void 0),e([h()],v.prototype,"value",void 0),e([n("input")],v.prototype,"_input",void 0),v=e([t(p),i(a`:host,:host([contents]) [part=root]{display:inline-block;height:var(${u}-height);width:var(${u}-width)}:host{${u}-width:3em;${u}-height:calc(var(${u}-width)/2);${u}-handle-size:1.25em;${u}-handle-space:.125em;${u}-transition:.2s ease-in-out;background:var(${c.passive});border-radius:calc(var(${u}-height)/2);transition:.2s ease-in-out;transition-property:background,left;vertical-align:bottom}:host([checked]){background:var(${c.active})}[part=handle],[part=root]{transition:inherit}[part=root]{height:inherit;position:relative}[part=input]{height:100%;opacity:0;width:100%}[part=handle]{align-items:center;display:inline-flex;height:100%;justify-content:center;left:0;pointer-events:none;position:absolute;width:50%}:host([checked]) [part=handle]{left:50%}[part=handle]{--size:var(${u}-handle-size);background:currentColor;border-radius:100%;height:var(--size);margin:var(${u}-handle-space);width:var(--size)}`)],v);var m=v;export{v as Switch,m as default};
2
2
  //# sourceMappingURL=switch.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"switch.js","sources":["../src/components/switch.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","Switch","SuperInput","constructor","this","round","checked","disabled","default","value","render","html","attr","observedRecord","name","makeId","_handleChange","reset","_input","connectedCallback","super","dispatchEvent","CustomEvent","detail","composed","namevalue","__decorate","property","type","Boolean","reflect","prototype","undefined","query","godown","styles","css","cssGlobalVars","input","passive","active","Switch$1"],"mappings":"6SAOA,MAAMA,EAAY,SACZC,EAAWC,EAAYF,GAa7B,IAAMG,EAAN,MAAMA,eAAeC,EAArB,WAAAC,uBAKEC,KAAKC,OAAG,EAMRD,KAAOE,SAAG,EAMVF,KAAQG,UAAG,EAMXH,KAAOI,QAAG,QAMVJ,KAAKK,MAAG,KAKE,MAAAC,GACR,OAAOC,CAAI,oBAGLC,EAAKR,KAAKS,0BACHT,KAAKC,MAAQ,QAAU,0DAKjBD,KAAKG,uBACNH,KAAKE,kBACTF,KAAKU,aACPV,KAAKW,oBACAX,KAAKY,8CAIPZ,KAAKE,yBAMtB,KAAAW,GACEb,KAAKE,QAA2B,SAAjBF,KAAKI,QACpBJ,KAAKc,OAAOZ,QAAUF,KAAKE,QAG7B,iBAAAa,GACEC,MAAMD,oBACFf,KAAKE,UACPF,KAAKI,QAAU,QAEI,SAAjBJ,KAAKI,UACPJ,KAAKE,SAAU,GAIT,aAAAU,GACRZ,KAAKE,QAAUF,KAAKc,OAAOZ,QAC3BF,KAAKiB,cAAc,IAAIC,YAAY,SAAU,CAAEC,OAAQnB,KAAKE,QAASkB,UAAU,KAGjF,SAAAC,GACE,MAAO,CAACrB,KAAKU,KAAMV,KAAKE,WA1E1BoB,EAAA,CADCC,EAAS,CAAEC,KAAMC,QAASC,SAAS,KACvB7B,EAAA8B,UAAA,aAAAC,GAMbN,EAAA,CADCC,EAAS,CAAEC,KAAMC,QAASC,SAAS,KACrB7B,EAAA8B,UAAA,eAAAC,GAMfN,EAAA,CADCC,EAAS,CAAEC,KAAMC,QAASC,SAAS,KACpB7B,EAAA8B,UAAA,gBAAAC,GAMhBN,EAAA,CADCC,KACgB1B,EAAA8B,UAAA,eAAAC,GAMjBN,EAAA,CADCC,KACW1B,EAAA8B,UAAA,aAAAC,GAGFN,EAAA,CADTO,EAAM,UAC2BhC,EAAA8B,UAAA,cAAAC,GAhC9B/B,EAAMyB,EAAA,CAFXQ,EAAOpC,GACPqC,EAAOC,CAAG,uEAAuErC,uBAA8BA,kBAAyBA,eAAsBA,qBAA4BA,eAAsBA,wBAA+BA,yBAAgCA,+CAAsDsC,EAAcC,oGAAoGvC,6WAAoXsC,EAAcE,mCAAmCxC,mFAA0FsC,EAAcG,uCAAuCH,EAAcE,4CAA4CxC,2GAAkHA,4EAAmFsC,EAAcG,aACnvCvC,GAmFN,IAAAwC,EAAexC"}
1
+ {"version":3,"file":"switch.js","sources":["../src/components/switch.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","Switch","SuperInput","constructor","this","checked","disabled","default","value","observedRecord","omit","super","render","html","attr","name","makeId","_handleChange","reset","_input","_connectedInit","dispatchEvent","CustomEvent","detail","composed","namevalue","__decorate","property","type","Boolean","reflect","prototype","undefined","query","godown","styles","css","cssGlobalVars","passive","active","Switch$1"],"mappings":"qUAOA,MAAMA,EAAY,SACZC,EAAWC,EAAYF,GAU7B,IAAMG,EAAN,MAAMA,eAAeC,EAArB,WAAAC,uBAUEC,KAAOC,SAAG,EAMVD,KAAQE,UAAG,EAMXF,KAAOG,SAAG,EAMVH,KAAKI,MAAG,KAKR,kBAAIC,GACF,OAAOC,EAAKC,MAAMF,eAAgB,gBAG1B,MAAAG,GACR,OAAOC,CAAI,oBAGLC,EAAKV,KAAKK,gFAMGL,KAAKE,uBACNF,KAAKC,kBACTD,KAAKW,aACPX,KAAKY,oBACAZ,KAAKa,8CAIPb,KAAKC,yBAMtB,KAAAa,GACEd,KAAKC,QAAUD,KAAKG,QACpBH,KAAKe,OAAOd,QAAUD,KAAKC,QAGnB,cAAAe,GACJhB,KAAKC,UACPD,KAAKG,SAAU,IAEI,IAAjBH,KAAKG,UACPH,KAAKC,SAAU,GAIT,aAAAY,GACRb,KAAKC,QAAUD,KAAKe,OAAOd,QAC3BD,KAAKiB,cAAc,IAAIC,YAAY,SAAU,CAAEC,OAAQnB,KAAKC,QAASmB,UAAU,KAGjF,SAAAC,GACE,MAAO,CAACrB,KAAKW,KAAMX,KAAKC,WAvE1BqB,EAAA,CADCC,EAAS,CAAEC,KAAMC,QAASC,SAAS,KACrB7B,EAAA8B,UAAA,eAAAC,GAMfN,EAAA,CADCC,EAAS,CAAEC,KAAMC,QAASC,SAAS,KACpB7B,EAAA8B,UAAA,gBAAAC,GAMhBN,EAAA,CADCC,EAAS,CAAEC,KAAMC,WACH5B,EAAA8B,UAAA,eAAAC,GAMfN,EAAA,CADCC,KACW1B,EAAA8B,UAAA,aAAAC,GAGFN,EAAA,CADTO,EAAM,UAC2BhC,EAAA8B,UAAA,cAAAC,GA/B9B/B,EAAMyB,EAAA,CAFXQ,EAAOpC,GACPqC,EAAOC,CAAG,uEAAuErC,uBAA8BA,kBAAyBA,eAAsBA,qBAA4BA,eAAsBA,wBAA+BA,yBAAgCA,+CAAsDsC,EAAcC,mCAAmCvC,qIAA4IsC,EAAcE,mWAAmWxC,2FAAkGA,uCACh9BE,GAqFN,IAAAuC,EAAevC"}
@@ -1,2 +1,2 @@
1
- import{__decorate as o}from"tslib";import{godown as r,styles as e,attr as t,classList as l,htmlSlot as i}from"@godown/element";import{css as n,html as a}from"lit";import{property as c}from"lit/decorators.js";import{scopePrefix as p,cssGlobalVars as s,GlobalStyle as d}from"../core/global-style.js";const v="text",h=p(v);let u=class Text extends d{constructor(){super(...arguments),this.underline="none",this.clip=!1}render(){return a`<span part="root" ${t(this.observedRecord)} class="${l(this.underline)}">${i()}</span>`}};o([c()],u.prototype,"underline",void 0),o([c({type:Boolean})],u.prototype,"clip",void 0),u=o([r(v),e(n`:host{${h}--color:currentColor;${h}--color-hover:currentColor;${h}--color-active:currentColor;display:inline-block;overflow-wrap:break-word;text-overflow:ellipsis}[part=root]{color:var(${h}--color);display:inline-block;overflow:hidden;overflow-wrap:inherit;text-overflow:inherit;vertical-align:bottom;white-space:nowrap;width:100%}[part=root]:hover{color:var(${h}--color-hover,var(${h}--color))}[part=root]:active{color:var(${h}--color-active,var(${h}--color))}.active:active,.always,.hover:hover{text-decoration:underline}.none{text-decoration:none}[clip]{background:var(${s.clipBackground});color:transparent;display:inline-block;-webkit-text-fill-color:transparent;background-clip:text;-webkit-background-clip:text}`)],u);var w=u;export{u as Text,w as default};
1
+ import{__decorate as o}from"tslib";import{godown as r,styles as e,attr as t,tokenList as l,htmlSlot as i}from"@godown/element";import{css as n,html as a}from"lit";import{property as c}from"lit/decorators.js";import{scopePrefix as p,cssGlobalVars as s,GlobalStyle as d}from"../core/global-style.js";const v="text",h=p(v);let u=class Text extends d{constructor(){super(...arguments),this.underline="none",this.clip=!1}render(){return a`<span part="root" ${t(this.observedRecord)} class="${l(this.underline)}">${i()}</span>`}};o([c()],u.prototype,"underline",void 0),o([c({type:Boolean})],u.prototype,"clip",void 0),u=o([r(v),e(n`:host{${h}--color:currentColor;${h}--color-hover:currentColor;${h}--color-active:currentColor;display:inline-block;overflow-wrap:break-word;text-overflow:ellipsis}[part=root]{color:var(${h}--color);display:inline-block;overflow:hidden;overflow-wrap:inherit;text-overflow:inherit;vertical-align:bottom;white-space:nowrap;width:100%}[part=root]:hover{color:var(${h}--color-hover,var(${h}--color))}[part=root]:active{color:var(${h}--color-active,var(${h}--color))}.active:active,.always,.hover:hover{text-decoration:underline}.none{text-decoration:none}[clip]{background:var(${s.clipBackground});color:transparent;display:inline-block;-webkit-text-fill-color:transparent;background-clip:text;-webkit-background-clip:text}`)],u);var w=u;export{u as Text,w as default};
2
2
  //# sourceMappingURL=text.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"text.js","sources":["../src/components/text.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","Text","GlobalStyle","constructor","this","underline","clip","render","html","attr","observedRecord","classList","htmlSlot","__decorate","property","prototype","undefined","type","Boolean","godown","styles","css","cssGlobalVars","clipBackground","Text$1"],"mappings":"0SAMA,MAAMA,EAAY,OAEZC,EAAWC,EAAYF,GAS7B,IAAMG,EAAN,MAAMA,aAAaC,EAAnB,WAAAC,uBAKEC,KAASC,UAA2C,OAMpDD,KAAIE,MAAG,EAEG,MAAAC,GACR,OAAOC,CAAI,qBAGLC,EAAKL,KAAKM,0BACHC,EAAUP,KAAKC,eAEtBO,eAfRC,EAAA,CADCC,KACyDb,EAAAc,UAAA,iBAAAC,GAM1DH,EAAA,CADCC,EAAS,CAAEG,KAAMC,WACNjB,EAAAc,UAAA,YAAAC,GAXRf,EAAIY,EAAA,CAFTM,EAAOrB,GACPsB,EAAOC,CAAG,SAAStB,yBAAgCA,+BAAsCA,2HAAkIA,8KAAqLA,sBAA6BA,2CAAkDA,uBAA8BA,6HAAoIuB,EAAcC,kJAC1oBtB,GA0BN,IAAAuB,EAAevB"}
1
+ {"version":3,"file":"text.js","sources":["../src/components/text.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","Text","GlobalStyle","constructor","this","underline","clip","render","html","attr","observedRecord","tokenList","htmlSlot","__decorate","property","prototype","undefined","type","Boolean","godown","styles","css","cssGlobalVars","clipBackground","Text$1"],"mappings":"0SAMA,MAAMA,EAAY,OAEZC,EAAWC,EAAYF,GAS7B,IAAMG,EAAN,MAAMA,aAAaC,EAAnB,WAAAC,uBAKEC,KAASC,UAA2C,OAMpDD,KAAIE,MAAG,EAEG,MAAAC,GACR,OAAOC,CAAI,qBAGLC,EAAKL,KAAKM,0BACHC,EAAUP,KAAKC,eAEtBO,eAfRC,EAAA,CADCC,KACyDb,EAAAc,UAAA,iBAAAC,GAM1DH,EAAA,CADCC,EAAS,CAAEG,KAAMC,WACNjB,EAAAc,UAAA,YAAAC,GAXRf,EAAIY,EAAA,CAFTM,EAAOrB,GACPsB,EAAOC,CAAG,SAAStB,yBAAgCA,+BAAsCA,2HAAkIA,8KAAqLA,sBAA6BA,2CAAkDA,uBAA8BA,6HAAoIuB,EAAcC,kJAC1oBtB,GA0BN,IAAAuB,EAAevB"}
@@ -22,17 +22,14 @@ 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
- protected firstUpdated(): void;
33
32
  protected updated(changedProperties: PropertyValues): void;
34
- disconnectedCallback(): void;
35
- startTimeout(): number;
36
33
  }
37
34
  export default Time;
38
35
  export { Time };
@@ -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;;;;;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 @@
1
- import{__decorate as t}from"tslib";import{godown as e,styles as i,attr as o}from"@godown/element";import s from"fmtime";import{css as r,html as m}from"lit";import{property as a}from"lit/decorators.js";import{GlobalStyle as p}from"../core/global-style.js";let h=class Time extends p{constructor(){super(...arguments),this.escape="%",this.format="YYYY-MM-DD hh:mm:ss",this.time=new Date}render(){return m`<span part="root" ${o(this.observedRecord)}>${s(this.format,this.time,this.escape)}</span>`}firstUpdated(){this.timeout&&(this.timeoutId=this.startTimeout())}updated(t){t.has("timeout")&&this.timeout&&(clearInterval(this.timeoutId),this.timeoutId=this.startTimeout())}disconnectedCallback(){clearInterval(this.timeoutId),this.timeoutId=void 0}startTimeout(){return setInterval((()=>{this.dispatchEvent(new CustomEvent("time",{detail:this.time,composed:!0})),this.time=new Date(this.time.getTime()+(this.gap||this.timeout))}),Math.abs(this.timeout))}};t([a()],h.prototype,"escape",void 0),t([a()],h.prototype,"format",void 0),t([a({type:Object})],h.prototype,"time",void 0),t([a({type:Number})],h.prototype,"timeout",void 0),t([a({type:Number})],h.prototype,"gap",void 0),h=t([e("time"),i(r`:host{text-align:center}`)],h);var d=h;export{h as Time,d as default};
1
+ import{__decorate as t}from"tslib";import{godown as e,styles as o,attr as i}from"@godown/element";import s from"fmtime";import{css as m,html as r}from"lit";import{property as p}from"lit/decorators.js";import{GlobalStyle as a}from"../core/global-style.js";let h=class Time extends a{constructor(){super(...arguments),this.escape="%",this.format="YYYY-MM-DD hh:mm:ss",this.time=new Date}render(){return r`<span part="root" ${i(this.observedRecord)}>${s(this.format,this.time,this.escape)}</span>`}updated(t){t.has("timeout")&&this.timeout&&(this.timeouts.remove(this.timeoutId),this.timeoutId=this.timeouts.add(setInterval((()=>{this.dispatchEvent(new CustomEvent("time",{detail:this.time,composed:!0})),this.time=new Date(this.time.getTime()+(this.gap||this.timeout))}),Math.abs(this.timeout))))}};t([p()],h.prototype,"escape",void 0),t([p()],h.prototype,"format",void 0),t([p({type:Object})],h.prototype,"time",void 0),t([p({type:Number})],h.prototype,"timeout",void 0),t([p({type:Number})],h.prototype,"gap",void 0),h=t([e("time"),o(m`:host{text-align:center}`)],h);var d=h;export{h as Time,d as default};
2
2
  //# sourceMappingURL=time.js.map
@@ -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","firstUpdated","timeout","timeoutId","startTimeout","updated","changedProperties","has","clearInterval","disconnectedCallback","undefined","setInterval","dispatchEvent","CustomEvent","detail","composed","getTime","gap","Math","abs","__decorate","property","prototype","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,YAAAS,GACJV,KAAKW,UACPX,KAAKY,UAAYZ,KAAKa,gBAIhB,OAAAC,CAAQC,GACZA,EAAkBC,IAAI,YACpBhB,KAAKW,UACPM,cAAcjB,KAAKY,WACnBZ,KAAKY,UAAYZ,KAAKa,gBAK5B,oBAAAK,GACED,cAAcjB,KAAKY,WACnBZ,KAAKY,eAAYO,EAGnB,YAAAN,GACE,OAAOO,aAAY,KACjBpB,KAAKqB,cAAc,IAAIC,YAAY,OAAQ,CAAEC,OAAQvB,KAAKG,KAAMqB,UAAU,KAC1ExB,KAAKG,KAAO,IAAIC,KAAKJ,KAAKG,KAAKsB,WAAazB,KAAK0B,KAAO1B,KAAKW,SAAS,GACrEgB,KAAKC,IAAI5B,KAAKW,YA/DnBkB,EAAA,CADCC,KACWjC,EAAAkC,UAAA,cAAAZ,GAMZU,EAAA,CADCC,KAC6BjC,EAAAkC,UAAA,cAAAZ,GAM9BU,EAAA,CADCC,EAAS,CAAEE,KAAMC,UACKpC,EAAAkC,UAAA,YAAAZ,GAMvBU,EAAA,CADCC,EAAS,CAAEE,KAAME,UACNrC,EAAAkC,UAAA,eAAAZ,GAMZU,EAAA,CADCC,EAAS,CAAEE,KAAME,UACVrC,EAAAkC,UAAA,WAAAZ,GA7BJtB,EAAIgC,EAAA,CAFTM,EARiB,QASjBC,EAAOC,CAAG,6BACLxC,GAwEN,IAAAyC,EAAezC"}
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,EA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,IAAI;IAMlE,KAAK,CAAC,EAAE,GAAE,MAAmB,GAAG,IAAI;IAcpC,IAAI,IAAI,IAAI;IAIZ,GAAG,IAAI,IAAI;CAGZ;AAED,eAAe,UAAU,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,CAAC"}
@@ -1,2 +1,2 @@
1
- import{__decorate as t}from"tslib";import{godown as e,styles as i,attr as o,htmlSlot as n,random as r}from"@godown/element";import{css as s,html as d}from"lit";import{property as h,state as p,query as l}from"lit/decorators.js";import{scopePrefix as a,GlobalStyle as m}from"../core/global-style.js";const c="typewriter",y=a(c);let u=class Typewriter extends m{constructor(){super(...arguments),this.content="",this.ended=!1,this.max=100,this.min=50,this.delay=0,this.index=0,this.contentInternal=""}get len(){return this.content.length}render(){return d`<div part="root" ${o(this.observedRecord)}>${n()} ${this.contentInternal} <i part="cursor" ?hidden="${this.ended}"></i></div>`}firstUpdated(){this.content||=this._slot?.assignedNodes()[0]?.textContent.trim()||"",!this.ended&&this.len&&this.write()}updated(t){t.has("index")&&this.dispatchEvent(new CustomEvent(this.index===this.len?"done":"write",{detail:this.contentInternal}))}write(t=this.index){this.contentInternal=this.content.slice(0,t+1);const e=this.delay||r(this.max,this.min);this.timeoutID=setTimeout((()=>{const e=t+1;e<=this.len&&(this.index=e,this.write())}),e)}stop(){clearTimeout(this.timeoutID)}end(){this.ended=!0}};t([h()],u.prototype,"content",void 0),t([h({type:Boolean})],u.prototype,"ended",void 0),t([h({type:Number})],u.prototype,"max",void 0),t([h({type:Number})],u.prototype,"min",void 0),t([h({type:Number})],u.prototype,"delay",void 0),t([h({type:Number})],u.prototype,"index",void 0),t([p()],u.prototype,"contentInternal",void 0),t([l("i")],u.prototype,"_i",void 0),u=t([e(c),i(s`:host{${y}--cursor-width:.05em}:host,:host([contents]) [part=root]{display:inline-block}i{animation:s 1.5s steps(1) infinite;border-right:var(${y}--cursor-width) solid;margin-left:.02em}@keyframes s{0%{border-color:currentColor}50%{border-color:transparent}}slot{display:none}`)],u);var v=u;export{u as Typewriter,v as default};
1
+ import{__decorate as t}from"tslib";import{godown as e,styles as i,attr as o,htmlSlot as n,random as r}from"@godown/element";import{css as s,html as d}from"lit";import{property as h,state as p,query as a}from"lit/decorators.js";import{scopePrefix as l,GlobalStyle as m}from"../core/global-style.js";const c="typewriter",y=l(c);let u=class Typewriter extends m{constructor(){super(...arguments),this.content="",this.ended=!1,this.max=100,this.min=50,this.delay=0,this.index=0,this.contentInternal=""}get len(){return this.content.length}render(){return d`<div part="root" ${o(this.observedRecord)}>${n()} ${this.contentInternal} <i part="cursor" ?hidden="${this.ended}"></i></div>`}firstUpdated(){this.content||=this._slot?.assignedNodes()[0]?.textContent.trim()||"",!this.ended&&this.len&&this.write()}updated(t){t.has("index")&&this.dispatchEvent(new CustomEvent(this.index===this.len?"done":"write",{detail:this.contentInternal}))}write(t=this.index){this.contentInternal=this.content.slice(0,t+1);const e=this.delay||r(this.max,this.min);this.timeoutID=this.timeouts.add(setTimeout((()=>{const e=t+1;e<=this.len&&(this.index=e,this.write())}),e))}stop(){clearTimeout(this.timeoutID)}end(){this.ended=!0}};t([h()],u.prototype,"content",void 0),t([h({type:Boolean})],u.prototype,"ended",void 0),t([h({type:Number})],u.prototype,"max",void 0),t([h({type:Number})],u.prototype,"min",void 0),t([h({type:Number})],u.prototype,"delay",void 0),t([h({type:Number})],u.prototype,"index",void 0),t([p()],u.prototype,"contentInternal",void 0),t([a("i")],u.prototype,"_i",void 0),u=t([e(c),i(s`:host{${y}--cursor-width:.05em}:host,:host([contents]) [part=root]{display:inline-block}i{animation:s 1.5s steps(1) infinite;border-right:var(${y}--cursor-width) solid;margin-left:.02em}@keyframes s{0%{border-color:currentColor}50%{border-color:transparent}}slot{display:none}`)],u);var v=u;export{u as Typewriter,v as default};
2
2
  //# sourceMappingURL=typewriter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"typewriter.js","sources":["../src/components/typewriter.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","Typewriter","GlobalStyle","constructor","this","content","ended","max","min","delay","index","contentInternal","len","length","render","html","attr","observedRecord","htmlSlot","firstUpdated","_slot","assignedNodes","textContent","trim","write","updated","changedProperties","has","dispatchEvent","CustomEvent","detail","at","slice","timeout","random","timeoutID","setTimeout","nx","stop","clearTimeout","end","__decorate","property","prototype","undefined","type","Boolean","Number","state","query","godown","styles","css","Typewriter$1"],"mappings":"0SAMA,MAAMA,EAAY,aACZC,EAAWC,EAAYF,GAS7B,IAAMG,EAAN,MAAMA,mBAAmBC,EAAzB,WAAAC,uBAKEC,KAAOC,QAAG,GAMVD,KAAKE,OAAG,EAMRF,KAAGG,IAAG,IAMNH,KAAGI,IAAG,GAMNJ,KAAKK,MAAG,EAMRL,KAAKM,MAAG,EAGRN,KAAeO,gBAAG,GAUlB,OAAIC,GACF,OAAOR,KAAKC,QAAQQ,OAGZ,MAAAC,GACR,OAAOC,CAAI,oBAGLC,EAAKZ,KAAKa,mBAEVC,OAAcd,KAAKO,6CAGRP,KAAKE,oBAMd,YAAAa,GACRf,KAAKC,UAAYD,KAAKgB,OAAOC,gBAAgB,IAAIC,YAAYC,QAAU,IAClEnB,KAAKE,OAASF,KAAKQ,KACtBR,KAAKoB,QAIC,OAAAC,CAAQC,GACZA,EAAkBC,IAAI,UACxBvB,KAAKwB,cAAc,IAAIC,YAAYzB,KAAKM,QAAUN,KAAKQ,IAAM,OAAS,QAAS,CAAEkB,OAAQ1B,KAAKO,mBAIlG,KAAAa,CAAMO,EAAa3B,KAAKM,OACtBN,KAAKO,gBAAkBP,KAAKC,QAAQ2B,MAAM,EAAGD,EAAK,GAClD,MAAME,EAAU7B,KAAKK,OAASyB,EAAO9B,KAAKG,IAAKH,KAAKI,KACpDJ,KAAK+B,UAAYC,YAAW,KAC1B,MAAMC,EAAKN,EAAK,EACZM,GAAMjC,KAAKQ,MACbR,KAAKM,MAAQ2B,EACbjC,KAAKoB,WAENS,GAGL,IAAAK,GACEC,aAAanC,KAAK+B,WAGpB,GAAAK,GACEpC,KAAKE,OAAQ,IA5FfmC,EAAA,CADCC,KACWzC,EAAA0C,UAAA,eAAAC,GAMZH,EAAA,CADCC,EAAS,CAAEG,KAAMC,WACL7C,EAAA0C,UAAA,aAAAC,GAMbH,EAAA,CADCC,EAAS,CAAEG,KAAME,UACT9C,EAAA0C,UAAA,WAAAC,GAMTH,EAAA,CADCC,EAAS,CAAEG,KAAME,UACV9C,EAAA0C,UAAA,WAAAC,GAMRH,EAAA,CADCC,EAAS,CAAEG,KAAME,UACT9C,EAAA0C,UAAA,aAAAC,GAMTH,EAAA,CADCC,EAAS,CAAEG,KAAME,UACT9C,EAAA0C,UAAA,aAAAC,GAGTH,EAAA,CADCO,KACmB/C,EAAA0C,UAAA,uBAAAC,GAKVH,EAAA,CADTQ,EAAM,MACkBhD,EAAA0C,UAAA,UAAAC,GA3CrB3C,EAAUwC,EAAA,CAFfS,EAAOpD,GACPqD,EAAOC,CAAG,SAASrD,wIAA+IA,wIAC7JE,GAqGN,IAAAoD,EAAepD"}
1
+ {"version":3,"file":"typewriter.js","sources":["../src/components/typewriter.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","Typewriter","GlobalStyle","constructor","this","content","ended","max","min","delay","index","contentInternal","len","length","render","html","attr","observedRecord","htmlSlot","firstUpdated","_slot","assignedNodes","textContent","trim","write","updated","changedProperties","has","dispatchEvent","CustomEvent","detail","at","slice","timeout","random","timeoutID","timeouts","add","setTimeout","nx","stop","clearTimeout","end","__decorate","property","prototype","undefined","type","Boolean","Number","state","query","godown","styles","css","Typewriter$1"],"mappings":"0SAMA,MAAMA,EAAY,aACZC,EAAWC,EAAYF,GAS7B,IAAMG,EAAN,MAAMA,mBAAmBC,EAAzB,WAAAC,uBAKEC,KAAOC,QAAG,GAMVD,KAAKE,OAAG,EAMRF,KAAGG,IAAG,IAMNH,KAAGI,IAAG,GAMNJ,KAAKK,MAAG,EAMRL,KAAKM,MAAG,EAGRN,KAAeO,gBAAG,GAUlB,OAAIC,GACF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M,MACkBlD,EAAA4C,UAAA,UAAAC,GA3CrB7C,EAAU0C,EAAA,CAFfS,EAAOtD,GACPuD,EAAOC,CAAG,SAASvD,wIAA+IA,wIAC7JE,GAuGN,IAAAsD,EAAetD"}
@@ -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;
@@ -16,6 +14,7 @@ export declare const cssGlobalVars: {
16
14
  input: CSSResult;
17
15
  white: CSSResult;
18
16
  black: CSSResult;
17
+ color: CSSResult;
19
18
  };
20
19
  type PresetsGradientsCSSResult = Record<keyof typeof presetsRGB, Gradients<CSSResult>>;
21
20
  //# sourceMappingURL=global-style.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"global-style.d.ts","sourceRoot":"","sources":["../src/core/global-style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,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;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 i(o,r=1){return c(s+"-".repeat(r)+o)}function c(o){return l(`--${o}`)}const g={foreground:i("foreground",2),background:i("background",2),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)};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(i("color",2)+"-"+o+"-"+r));const t=`-${o}-${r}`;return`${i("color",2)+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,i as scopePrefix,c 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[6]})`],[p.passive,`var(${p._colors.darkgray[6]})`],[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","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,EAUT,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,IAIpCN,YAAYuB,OAAS,CACnBX,EAEI,SAAGC,EAAcS,oBACdT,EAAcQ,0BACjBG,GAAO,CAACC,EAAKC,EAAUC,KACrBd,EAAcM,QAAQM,KAAS,GAC/BZ,EAAcM,QAAQM,GAAKG,KAAKhB,EAAUN,EAAY,QAAS,GAAK,IAAMmB,EAAM,IAAMC,IACtF,MAAMG,EAAS,IAAIJ,KAAOC,IAE1B,MAAO,GADUpB,EAAY,QAAS,GAAKuB,SACjBF,KAAO,GAChCG,GAAYC,KAAK,IACpBC,EAAe,CACb,CAACnB,EAAcE,WAAa,IAAK,OAAOF,EAAcM,QAAQc,SAAS,MACvE,CAACpB,EAAcC,WAAa,IAAK,OAAOD,EAAcM,QAAQe,UAAU,MACxE,CAACrB,EAAcI,OAAS,IAAK,OAAOJ,EAAcM,QAAQgB,KAAK,MAC/D,CAACtB,EAAcK,QAAU,IAAK,OAAOL,EAAcM,QAAQc,SAAS,MACpE,CAACpB,EAAcG,eAAiB,IAC9B,kCAAkCH,EAAcC,oBAAoBD,EAAcK,cAEtF,KAEJkB,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,9 +1,11 @@
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 OutlineType } from "./outline.js";
4
5
  declare class SuperInput 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;
@@ -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,IA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D,iBAAiB,IAAI,IAAI;IAKzB,SAAS,CAAC,cAAc,IAAI,IAAI;IAKhC,SAAS,CAAC,gBAAgB,IAAI,IAAI;IAUlC,SAAS,CAAC,gBAAgB,CAAC,CAAC,EAAE,OAAO,IAAI,CAAC,IAAI,GAAG,IAAI;IAMrD,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,IAAI;IAInC,SAAS,CAAC,YAAY,IAAI,IAAI;IAI9B,SAAS,CAAC,aAAa,IAAI,cAAc,CAAC,CAAC,CAAC;IAI5C,SAAS,CAAC,aAAa,IAAI,cAAc,CAAC,CAAC,CAAC;CAG7C;AAED,eAAe,UAAU,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,CAAC;AAEtB,KAAK,SAAS,GACV,QAAQ,GACR,MAAM,GACN,QAAQ,GACR,KAAK,GACL,KAAK,GACL,OAAO,GACP,UAAU,GACV,UAAU,GACV,MAAM,GACN,OAAO,GACP,MAAM,GACN,MAAM,GACN,gBAAgB,GAChB,QAAQ,GACR,OAAO,GACP,OAAO,GACP,UAAU,GACV,OAAO,GACP,MAAM,GACN,OAAO,CAAC"}
@@ -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 s,html as p}from"lit";import{property as r}from"lit/decorators.js";import{cssGlobalVars as a,GlobalStyle as l}from"./global-style.js";import{OutlineBuilder as u}from"./outline.js";const d=s`.input-field{--space:var(${a.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;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)}`,h=s`:host{${a.input}-width:10em;${a.input}-height:1.6em;${a.input}-space:0.2em;${a.input}-control:currentColor;${a.input}-outline-width:.075em;${a.input}-outline-color:var(${a.passive});border-radius:.2em}: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 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 p`<label for="${this.makeId}" part="prefix">${n("prefix")}</label>`}_renderSuffix(){return p`<label for="${this.makeId}" part="suffix">${n("suffix")}</label>`}};t([r()],c.prototype,"autocomplete",void 0),t([r({attribute:"outline-type"})],c.prototype,"outlineType",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(d,new u({width:`${a.input}-outline-width`,color:`${a.input}-outline-color`}).styleSheet,h)],c);var f=c;export{c 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,gF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":"super-input.js","sources":["../src/core/super-input.ts"],"sourcesContent":null,"names":["fieldStyle","css","cssGlobalVars","input","inputStyle","passive","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,4fAE1DC,EAAaH,CAAG,SAASC,EAAcC,oBAAoBD,EAAcC,sBAAsBD,EAAcC,qBAAqBD,EAAcC,8BAA8BD,EAAcC,8BAA8BD,EAAcC,2BAA2BD,EAAcG,yKAUvR,IAAMC,EAAN,MAAMA,mBAAmBC,EAAzB,WAAAC,uBACEC,KAASC,WAAG,EAKZD,KAAWE,YAAgB,SAG3BF,KAAQG,UAAG,EA8BXH,KAAWI,aAAG,EAUJJ,KAAAK,OAAiBC,KAAKC,SAASC,SAAS,IAAIC,MAAM,GAM5DT,KAAAU,UAAiCV,KAAKW,UAhCtC,kBAAIC,GACF,OAAOC,EAAKC,MAAMF,eAAgB,UAAW,SAiB/C,gBAAIG,CAAaC,GACfhB,KAAKiB,QAAUD,EAGjB,gBAAID,GACF,OAAOf,KAAKiB,QAKd,SAAAN,GACE,MAAO,CAACX,KAAKkB,KAAMlB,KAAKgB,OAK1B,KAAAG,GACEnB,KAAKgB,MAAQhB,KAAKiB,QAClBjB,KAAKoB,OAAOJ,MAAQhB,KAAKiB,QAGjB,YAAAI,CAAaC,GACrBA,EAAEC,kBACEvB,KAAKI,cAGTJ,KAAKgB,MAAQM,EAAEE,OAAOR,OAAOS,OAC7BzB,KAAK0B,cACH,IAAIC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CADCC,EAAS,CAAEK,SAAS,KACTvD,EAAAmD,UAAA,YAAAC,GAGZH,EAAA,CADCC,KACSlD,EAAAmD,UAAA,aAAAC,GAUVH,EAAA,CADCC,KACWlD,EAAAmD,UAAA,eAAAC,GAGFH,EAAA,CADTO,EAAK,UAC4BxD,EAAAmD,UAAA,cAAAC,GAlC9BpD,EAAUiD,EAAA,CARfQ,EACC/D,EACA,IAAIgE,EAAe,CACjBC,MAAO,GAAG/D,EAAcC,sBACxB+D,MAAO,GAAGhE,EAAcC,wBACvBgE,WACH/D,IAEIE,GAwIN,IAAA8D,EAAe9D"}
@@ -13,8 +13,4 @@ declare class SuperOpenable extends GlobalStyle {
13
13
  }
14
14
  export default SuperOpenable;
15
15
  export { SuperOpenable };
16
- export type Direction4 = "left" | "right" | "top" | "bottom";
17
- export type Direction5 = Direction4 | "center";
18
- export type Direction8 = Direction4 | "top-left" | "top-right" | "bottom-left" | "bottom-right";
19
- export type Direction9 = Direction8 | Direction5;
20
16
  //# sourceMappingURL=super-openable.d.ts.map