godown 3.10.1 → 3.11.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 (293) hide show
  1. package/README.md +2 -63
  2. package/alert.d.ts.map +1 -1
  3. package/avatar.d.ts.map +1 -1
  4. package/badge.d.ts.map +1 -1
  5. package/breath.d.ts.map +1 -1
  6. package/build/godown+lit.iife.js +14 -14
  7. package/build/godown+lit.iife.js.map +1 -1
  8. package/build/godown+lit.js +14 -14
  9. package/build/godown+lit.js.map +1 -1
  10. package/build/godown+lit.umd.js +14 -14
  11. package/build/godown+lit.umd.js.map +1 -1
  12. package/build/godown.iife.js +9 -9
  13. package/build/godown.js +7 -7
  14. package/build/godown.js.map +1 -1
  15. package/build/godown.umd.js +10 -10
  16. package/build/godown.umd.js.map +1 -1
  17. package/button.d.ts.map +1 -1
  18. package/card.d.ts.map +1 -1
  19. package/carousel.d.ts.map +1 -1
  20. package/chip.d.ts +2 -0
  21. package/chip.d.ts.map +1 -0
  22. package/chip.js +2 -0
  23. package/chip.js.map +1 -0
  24. package/custom-elements.json +1 -1
  25. package/details.d.ts.map +1 -1
  26. package/dialog.d.ts.map +1 -1
  27. package/divider.d.ts.map +1 -1
  28. package/dragbox.d.ts.map +1 -1
  29. package/flex.d.ts.map +1 -1
  30. package/form.d.ts.map +1 -1
  31. package/grid.d.ts.map +1 -1
  32. package/heading.d.ts.map +1 -1
  33. package/index.d.ts +1 -0
  34. package/index.d.ts.map +1 -1
  35. package/index.js +1 -1
  36. package/input.d.ts.map +1 -1
  37. package/internal/direction.d.ts.map +1 -1
  38. package/internal/direction.js.map +1 -1
  39. package/internal/global-style.d.ts +8 -9
  40. package/internal/global-style.d.ts.map +1 -1
  41. package/internal/global-style.js +1 -1
  42. package/internal/global-style.js.map +1 -1
  43. package/internal/icons/caret-down.d.ts +4 -0
  44. package/internal/icons/caret-down.d.ts.map +1 -0
  45. package/internal/icons/caret-down.js +2 -0
  46. package/internal/icons/caret-down.js.map +1 -0
  47. package/internal/icons/caret-left.d.ts +4 -0
  48. package/internal/icons/caret-left.d.ts.map +1 -0
  49. package/internal/icons/caret-left.js +2 -0
  50. package/internal/icons/caret-left.js.map +1 -0
  51. package/internal/icons/caret-right.d.ts +4 -0
  52. package/internal/icons/caret-right.d.ts.map +1 -0
  53. package/internal/icons/caret-right.js +2 -0
  54. package/internal/icons/caret-right.js.map +1 -0
  55. package/internal/icons/eye-slash.d.ts +4 -0
  56. package/internal/icons/eye-slash.d.ts.map +1 -0
  57. package/internal/icons/eye-slash.js +2 -0
  58. package/internal/icons/eye-slash.js.map +1 -0
  59. package/internal/ring.d.ts +19 -0
  60. package/internal/ring.d.ts.map +1 -0
  61. package/internal/ring.js +2 -0
  62. package/internal/ring.js.map +1 -0
  63. package/internal/super-input.d.ts +2 -2
  64. package/internal/super-input.d.ts.map +1 -1
  65. package/internal/super-input.js +1 -1
  66. package/internal/super-input.js.map +1 -1
  67. package/internal/super-openable.d.ts.map +1 -1
  68. package/internal/super-openable.js.map +1 -1
  69. package/layout.d.ts.map +1 -1
  70. package/link.d.ts.map +1 -1
  71. package/package.json +3 -5
  72. package/progress.d.ts.map +1 -1
  73. package/range.d.ts.map +1 -1
  74. package/rotate.d.ts.map +1 -1
  75. package/router.d.ts.map +1 -1
  76. package/select.d.ts.map +1 -1
  77. package/skeleton.d.ts.map +1 -1
  78. package/split.d.ts.map +1 -1
  79. package/src/chip.ts +1 -0
  80. package/src/index.ts +1 -0
  81. package/src/internal/global-style.ts +40 -37
  82. package/src/internal/icons/caret-down.ts +7 -0
  83. package/src/internal/icons/caret-left.ts +7 -0
  84. package/src/internal/icons/caret-right.ts +7 -0
  85. package/src/internal/icons/eye-slash.ts +7 -0
  86. package/src/internal/ring.ts +57 -0
  87. package/src/internal/super-input.ts +9 -70
  88. package/src/web-components/alert/component.ts +16 -195
  89. package/src/web-components/badge/component.ts +7 -96
  90. package/src/web-components/breath/component.ts +8 -8
  91. package/src/web-components/button/component.ts +9 -139
  92. package/src/web-components/card/component.ts +11 -6
  93. package/src/web-components/carousel/component.ts +6 -6
  94. package/src/web-components/chip/component.ts +115 -0
  95. package/src/web-components/chip/definition.ts +11 -0
  96. package/src/web-components/details/component.ts +1 -1
  97. package/src/web-components/divider/component.ts +2 -17
  98. package/src/web-components/heading/component.ts +12 -16
  99. package/src/web-components/input/component.ts +87 -39
  100. package/src/web-components/link/component.ts +53 -3
  101. package/src/web-components/progress/component.ts +2 -1
  102. package/src/web-components/range/component.ts +19 -25
  103. package/src/web-components/rotate/component.ts +2 -2
  104. package/src/web-components/select/component.ts +14 -18
  105. package/src/web-components/select/definition.ts +1 -1
  106. package/src/web-components/skeleton/component.ts +13 -57
  107. package/src/web-components/split/component.ts +16 -14
  108. package/src/web-components/switch/component.ts +4 -7
  109. package/src/web-components/tabs/component.ts +11 -8
  110. package/src/web-components/text/component.ts +2 -2
  111. package/switch.d.ts.map +1 -1
  112. package/tabs.d.ts.map +1 -1
  113. package/text.d.ts.map +1 -1
  114. package/time.d.ts.map +1 -1
  115. package/tooltip.d.ts.map +1 -1
  116. package/typewriter.d.ts.map +1 -1
  117. package/vscode.html-custom-data.json +1 -1
  118. package/web-components/alert/component.d.ts +5 -32
  119. package/web-components/alert/component.d.ts.map +1 -1
  120. package/web-components/alert/component.js +1 -1
  121. package/web-components/alert/component.js.map +1 -1
  122. package/web-components/alert/definition.d.ts.map +1 -1
  123. package/web-components/alert/definition.js.map +1 -1
  124. package/web-components/avatar/component.d.ts.map +1 -1
  125. package/web-components/avatar/component.js.map +1 -1
  126. package/web-components/avatar/definition.d.ts.map +1 -1
  127. package/web-components/avatar/definition.js.map +1 -1
  128. package/web-components/badge/component.d.ts +4 -21
  129. package/web-components/badge/component.d.ts.map +1 -1
  130. package/web-components/badge/component.js +1 -1
  131. package/web-components/badge/component.js.map +1 -1
  132. package/web-components/badge/definition.d.ts.map +1 -1
  133. package/web-components/badge/definition.js.map +1 -1
  134. package/web-components/breath/component.d.ts.map +1 -1
  135. package/web-components/breath/component.js +1 -1
  136. package/web-components/breath/component.js.map +1 -1
  137. package/web-components/breath/definition.d.ts.map +1 -1
  138. package/web-components/breath/definition.js.map +1 -1
  139. package/web-components/button/component.d.ts +0 -18
  140. package/web-components/button/component.d.ts.map +1 -1
  141. package/web-components/button/component.js +1 -1
  142. package/web-components/button/component.js.map +1 -1
  143. package/web-components/button/definition.d.ts.map +1 -1
  144. package/web-components/button/definition.js.map +1 -1
  145. package/web-components/card/component.d.ts +3 -0
  146. package/web-components/card/component.d.ts.map +1 -1
  147. package/web-components/card/component.js +1 -1
  148. package/web-components/card/component.js.map +1 -1
  149. package/web-components/card/definition.d.ts.map +1 -1
  150. package/web-components/card/definition.js.map +1 -1
  151. package/web-components/carousel/component.d.ts.map +1 -1
  152. package/web-components/carousel/component.js +1 -1
  153. package/web-components/carousel/component.js.map +1 -1
  154. package/web-components/carousel/definition.d.ts.map +1 -1
  155. package/web-components/carousel/definition.js.map +1 -1
  156. package/web-components/chip/component.d.ts +31 -0
  157. package/web-components/chip/component.d.ts.map +1 -0
  158. package/web-components/chip/component.js +2 -0
  159. package/web-components/chip/component.js.map +1 -0
  160. package/web-components/chip/definition.d.ts +8 -0
  161. package/web-components/chip/definition.d.ts.map +1 -0
  162. package/web-components/chip/definition.js +2 -0
  163. package/web-components/chip/definition.js.map +1 -0
  164. package/web-components/details/component.d.ts.map +1 -1
  165. package/web-components/details/component.js +1 -1
  166. package/web-components/details/component.js.map +1 -1
  167. package/web-components/details/definition.d.ts.map +1 -1
  168. package/web-components/details/definition.js.map +1 -1
  169. package/web-components/dialog/component.d.ts.map +1 -1
  170. package/web-components/dialog/component.js.map +1 -1
  171. package/web-components/dialog/definition.d.ts.map +1 -1
  172. package/web-components/dialog/definition.js.map +1 -1
  173. package/web-components/divider/component.d.ts.map +1 -1
  174. package/web-components/divider/component.js +1 -1
  175. package/web-components/divider/component.js.map +1 -1
  176. package/web-components/divider/definition.d.ts.map +1 -1
  177. package/web-components/divider/definition.js.map +1 -1
  178. package/web-components/dragbox/component.d.ts.map +1 -1
  179. package/web-components/dragbox/component.js.map +1 -1
  180. package/web-components/dragbox/definition.d.ts.map +1 -1
  181. package/web-components/dragbox/definition.js.map +1 -1
  182. package/web-components/flex/component.d.ts.map +1 -1
  183. package/web-components/flex/component.js.map +1 -1
  184. package/web-components/flex/definition.d.ts.map +1 -1
  185. package/web-components/flex/definition.js.map +1 -1
  186. package/web-components/form/component.d.ts.map +1 -1
  187. package/web-components/form/component.js.map +1 -1
  188. package/web-components/form/definition.d.ts.map +1 -1
  189. package/web-components/form/definition.js.map +1 -1
  190. package/web-components/grid/component.d.ts.map +1 -1
  191. package/web-components/grid/component.js.map +1 -1
  192. package/web-components/grid/definition.d.ts.map +1 -1
  193. package/web-components/grid/definition.js.map +1 -1
  194. package/web-components/heading/component.d.ts +2 -2
  195. package/web-components/heading/component.d.ts.map +1 -1
  196. package/web-components/heading/component.js +1 -1
  197. package/web-components/heading/component.js.map +1 -1
  198. package/web-components/heading/definition.d.ts.map +1 -1
  199. package/web-components/heading/definition.js.map +1 -1
  200. package/web-components/input/component.d.ts +3 -3
  201. package/web-components/input/component.d.ts.map +1 -1
  202. package/web-components/input/component.js +1 -1
  203. package/web-components/input/component.js.map +1 -1
  204. package/web-components/input/definition.d.ts.map +1 -1
  205. package/web-components/input/definition.js.map +1 -1
  206. package/web-components/layout/component.d.ts.map +1 -1
  207. package/web-components/layout/component.js.map +1 -1
  208. package/web-components/layout/definition.d.ts.map +1 -1
  209. package/web-components/layout/definition.js.map +1 -1
  210. package/web-components/link/component.d.ts +13 -2
  211. package/web-components/link/component.d.ts.map +1 -1
  212. package/web-components/link/component.js +1 -1
  213. package/web-components/link/component.js.map +1 -1
  214. package/web-components/link/definition.d.ts.map +1 -1
  215. package/web-components/link/definition.js.map +1 -1
  216. package/web-components/progress/component.d.ts.map +1 -1
  217. package/web-components/progress/component.js +1 -1
  218. package/web-components/progress/component.js.map +1 -1
  219. package/web-components/progress/definition.d.ts.map +1 -1
  220. package/web-components/progress/definition.js.map +1 -1
  221. package/web-components/range/component.d.ts.map +1 -1
  222. package/web-components/range/component.js +1 -1
  223. package/web-components/range/component.js.map +1 -1
  224. package/web-components/range/definition.d.ts.map +1 -1
  225. package/web-components/range/definition.js.map +1 -1
  226. package/web-components/rotate/component.d.ts.map +1 -1
  227. package/web-components/rotate/component.js +1 -1
  228. package/web-components/rotate/component.js.map +1 -1
  229. package/web-components/rotate/definition.d.ts.map +1 -1
  230. package/web-components/rotate/definition.js.map +1 -1
  231. package/web-components/router/component.d.ts.map +1 -1
  232. package/web-components/router/component.js.map +1 -1
  233. package/web-components/router/definition.d.ts.map +1 -1
  234. package/web-components/router/definition.js.map +1 -1
  235. package/web-components/select/component.d.ts +2 -1
  236. package/web-components/select/component.d.ts.map +1 -1
  237. package/web-components/select/component.js +1 -1
  238. package/web-components/select/component.js.map +1 -1
  239. package/web-components/select/definition.d.ts +1 -1
  240. package/web-components/select/definition.d.ts.map +1 -1
  241. package/web-components/select/definition.js.map +1 -1
  242. package/web-components/skeleton/component.d.ts +0 -9
  243. package/web-components/skeleton/component.d.ts.map +1 -1
  244. package/web-components/skeleton/component.js +1 -1
  245. package/web-components/skeleton/component.js.map +1 -1
  246. package/web-components/skeleton/definition.d.ts.map +1 -1
  247. package/web-components/skeleton/definition.js.map +1 -1
  248. package/web-components/split/component.d.ts +1 -1
  249. package/web-components/split/component.d.ts.map +1 -1
  250. package/web-components/split/component.js +1 -1
  251. package/web-components/split/component.js.map +1 -1
  252. package/web-components/split/definition.d.ts.map +1 -1
  253. package/web-components/split/definition.js.map +1 -1
  254. package/web-components/switch/component.d.ts.map +1 -1
  255. package/web-components/switch/component.js +1 -1
  256. package/web-components/switch/component.js.map +1 -1
  257. package/web-components/switch/definition.d.ts.map +1 -1
  258. package/web-components/switch/definition.js.map +1 -1
  259. package/web-components/tabs/component.d.ts +3 -3
  260. package/web-components/tabs/component.d.ts.map +1 -1
  261. package/web-components/tabs/component.js +1 -1
  262. package/web-components/tabs/component.js.map +1 -1
  263. package/web-components/tabs/definition.d.ts.map +1 -1
  264. package/web-components/tabs/definition.js.map +1 -1
  265. package/web-components/text/component.d.ts +1 -1
  266. package/web-components/text/component.d.ts.map +1 -1
  267. package/web-components/text/component.js +1 -1
  268. package/web-components/text/component.js.map +1 -1
  269. package/web-components/text/definition.d.ts.map +1 -1
  270. package/web-components/text/definition.js.map +1 -1
  271. package/web-components/time/component.d.ts.map +1 -1
  272. package/web-components/time/component.js.map +1 -1
  273. package/web-components/time/definition.d.ts.map +1 -1
  274. package/web-components/time/definition.js.map +1 -1
  275. package/web-components/tooltip/component.d.ts.map +1 -1
  276. package/web-components/tooltip/component.js.map +1 -1
  277. package/web-components/tooltip/definition.d.ts.map +1 -1
  278. package/web-components/tooltip/definition.js.map +1 -1
  279. package/web-components/typewriter/component.d.ts.map +1 -1
  280. package/web-components/typewriter/component.js.map +1 -1
  281. package/web-components/typewriter/definition.d.ts.map +1 -1
  282. package/web-components/typewriter/definition.js.map +1 -1
  283. package/web-types.json +1 -1
  284. package/internal/outline.d.ts +0 -19
  285. package/internal/outline.d.ts.map +0 -1
  286. package/internal/outline.js +0 -2
  287. package/internal/outline.js.map +0 -1
  288. package/internal/super-anchor.d.ts +0 -18
  289. package/internal/super-anchor.d.ts.map +0 -1
  290. package/internal/super-anchor.js +0 -2
  291. package/internal/super-anchor.js.map +0 -1
  292. package/src/internal/outline.ts +0 -58
  293. package/src/internal/super-anchor.ts +0 -60
@@ -1,5 +1,5 @@
1
1
  import { type TemplateResult } from "lit";
2
- import { GlobalStyle } from "../../internal/global-style.js";
2
+ import Link from "../link/component.js";
3
3
  /**
4
4
  * {@linkcode Heading} renders a heading.
5
5
  *
@@ -8,7 +8,7 @@ import { GlobalStyle } from "../../internal/global-style.js";
8
8
  * @slot - Heading content.
9
9
  * @category layout
10
10
  */
11
- declare class Heading extends GlobalStyle {
11
+ declare class Heading extends Link {
12
12
  /**
13
13
  * The heading level.
14
14
  */
@@ -1 +1 @@
1
- {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/web-components/heading/component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAsB,MAAM,KAAK,CAAC;AAG9D,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAI7D;;;;;;;GAOG;AACH,cAqCM,OAAQ,SAAQ,WAAW;IAC/B;;OAEG;IAEH,EAAE,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAQ;IAEnD;;;;OAIG;IAEH,MAAM,SAAO;IAEb;;OAEG;IAEH,IAAI,EAAE,MAAM,GAAG,OAAO,CAAU;IAEhC,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;IAmBrC,SAAS,CAAC,WAAW,CAAC,GAAG,QAAQ,EAAE,GAAG,EAAE,GAAG,cAAc,CAAC,CAAC,CAAC;CA4B7D;AAED,eAAe,OAAO,CAAC;AACvB,OAAO,EAAE,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"__source__/","sources":["web-components/heading/component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAsB,MAAM,KAAK,CAAC;AAG9D,OAAO,IAAI,MAAM,sBAAsB,CAAC;AAIxC;;;;;;;GAOG;AACH,cAiCM,OAAQ,SAAQ,IAAI;IACxB;;OAEG;IAEH,EAAE,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAQ;IAEnD;;;;OAIG;IAEH,MAAM,SAAO;IAEb;;OAEG;IAEH,IAAI,EAAE,MAAM,GAAG,OAAO,CAAU;IAEhC,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;IAmBrC,SAAS,CAAC,WAAW,CAAC,GAAG,QAAQ,EAAE,GAAG,EAAE,GAAG,cAAc,CAAC,CAAC,CAAC;CA4B7D;AAED,eAAe,OAAO,CAAC;AACvB,OAAO,EAAE,OAAO,EAAE,CAAC"}
@@ -1,2 +1,2 @@
1
- import{__decorate as t}from"tslib";import{godown as r,styles as e,attr as i,htmlSlot as h}from"@godown/element";import{css as o,nothing as a,html as s}from"lit";import{property as n}from"lit/decorators.js";import{GlobalStyle as d}from"../../internal/global-style.js";let c=class Heading extends d{constructor(){super(...arguments),this.as="h1",this.anchor="#",this.side="left"}render(){return s`<a part="root" href="${this.id?"#"+this.id:a}" ${i(this.observedRecord)}> ${this.wrapHeading(h(),this.id?s`<i part="anchor">${this.anchor}</i>`:"")} </a>`}wrapHeading(...t){switch(this.as){case"h2":return s`<h2>${t}</h2>`;case"h3":return s`<h3>${t}</h3>`;case"h4":return s`<h4>${t}</h4>`;case"h5":return s`<h5>${t}</h5>`;case"h6":return s`<h6>${t}</h6>`;default:return s`<h1>${t}</h1>`}}};t([n()],c.prototype,"as",void 0),t([n()],c.prototype,"anchor",void 0),t([n()],c.prototype,"side",void 0),c=t([r("heading"),e(o`:host{display:block;text-align:start}[part=anchor]{min-width:1.25em;position:absolute;right:100%;text-align:center}[side=left] [part=anchor]{right:100%}[side=right] [part=anchor]{left:100%}a{color:inherit}h1,h2,h3,h4,h5,h6{direction:ltr;font-size:revert;position:relative;width:-moz-fit-content;width:fit-content}`)],c);var l=c;export{c as Heading,l as default};
1
+ import{__decorate as t}from"tslib";import{godown as r,styles as e,htmlSlot as i,tokenList as h}from"@godown/element";import{css as o,nothing as a,html as s}from"lit";import{property as n}from"lit/decorators.js";import p from"../link/component.js";let c=class Heading extends p{constructor(){super(...arguments),this.as="h1",this.anchor="#",this.side="left"}render(){const t=this.href||(this.id?"#"+this.id:void 0);return s`<a part="root" href="${t||a}"> ${this.wrapHeading(i(),t?s`<i part="${h("anchor",this.side)}">${this.anchor}</i>`:"")} </a>`}wrapHeading(...t){switch(this.as){case"h2":return s`<h2>${t}</h2>`;case"h3":return s`<h3>${t}</h3>`;case"h4":return s`<h4>${t}</h4>`;case"h5":return s`<h5>${t}</h5>`;case"h6":return s`<h6>${t}</h6>`;default:return s`<h1>${t}</h1>`}}};t([n()],c.prototype,"as",void 0),t([n()],c.prototype,"anchor",void 0),t([n()],c.prototype,"side",void 0),c=t([r("heading"),e(o`:host{display:block;text-align:start}[part~=anchor]{min-width:1.25em;position:absolute;right:100%;text-align:center}[part~=left][part~=anchor]{right:100%}[part~=right][part~=anchor]{left:100%}h1,h2,h3,h4,h5,h6{font-size:revert;position:relative;width:-moz-fit-content;width:fit-content}`)],c);var d=c;export{c as Heading,d as default};
2
2
  //# sourceMappingURL=component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../../src/src/web-components/heading/component.ts"],"sourcesContent":null,"names":["Heading","GlobalStyle","constructor","this","as","anchor","side","render","html","id","nothing","attr","observedRecord","wrapHeading","htmlSlot","children","__decorate","prototype","property","styles","css"],"mappings":"2QAqDA,IAAMA,EAAN,MAAMA,gBAAgBC,EAAtB,WAAAC,uBAKEC,KAAEC,GAA4C,KAQ9CD,KAAME,OAAG,IAMTF,KAAIG,KAAqB,OAEf,MAAAC,GACR,OAAOC,CAAI,wBAAAL,KAAAM,GAAA,IAAAN,KAAAM,GAAAC,MAAAC,EAAAR,KAAAS,oBAAAT,KAAAU,YAAAC,IAAAX,KAAAM,oDAGC,CACN,WAAAI,IAASE,mBAEL,gBAGIP,CAAA,OAAAO,SACiB,IAAA,KACpB,OAAAP,CAAA,OAAAO,SACH,IACH,6BAEJ,IAAA,KACH,OAAAP,CAAA,OAAAO,SAEqB,SACX,OAAOP,CAAE,OAAAO,SACf,QACE,OAAOP,CAAI,OAAAO,YAIXC,EAAA,QAECC,UAAA,UAAA,GACHD,EAAA,CACEE,iBACgB,cAAA,KACf,CACHA,KACElB,EAAAiB,UAAA,YAAW,OACK,GAvGN,WAyGZE,EAAAC,CAAA,8TACEpB"}
1
+ {"version":3,"file":"component.js","sources":["../../src/web-components/heading/component.ts"],"sourcesContent":null,"names":["Heading","Link","constructor","this","as","anchor","side","render","hrefValue","href","id","undefined","html","nothing","wrapHeading","htmlSlot","children","prototype","__decorate","property","godown","styles","css"],"mappings":"uPAiDA,IAAMA,EAAN,MAAMA,gBAAgBC,EAAtB,WAAAC,uBAKEC,KAAEC,GAA4C,KAQ9CD,KAAME,OAAG,IAMTF,KAAIG,KAAqB,OAEf,MAAAC,GACR,MAAMC,EAAYL,KAAKM,OAASN,KAAKO,GAAK,IAAMP,KAAKO,QAAKC,GAC1D,OAAOC,CAAI,wBAAAJ,GAAAK,OAAAV,KAAAW,YAAAC,IAAAP,qEAGC,mBAEN,OAAgBL,KAAAC,IAGd,iBACwB,OAAAY,SACrB,IAAA,KACC,OACPJ,CAAA,OAAAI,kBAEJ,OAAAJ,CAAA,OAAAI,SACH,IAAA,KAEsB,OAAkBJ,CAAA,OAAAI,SACtC,IAAY,KACV,OAASJ,CAAA,OAAAI,SACP,QACQ,OAAQJ,CAAA,OAAAI,SAElB,WAIAhB,EAAAiB,UAAS,UAAA,GACPC,EAAA,QAECD,UAAA,cAAA,GACHC,EAAA,CACEC,iBACgB,YAAA,KACfD,EAAA,CACHE,EArGY,WAsGVC,EAAAC,CAAA,4SAECtB"}
@@ -1 +1 @@
1
- {"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../src/web-components/heading/definition.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,gBAAgB,CAAC;AAIrC,eAAe,OAAO,CAAC;AAEvB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,OAAO,CAAC;KAC3B;CACF"}
1
+ {"version":3,"file":"definition.d.ts","sourceRoot":"__source__/","sources":["web-components/heading/definition.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,gBAAgB,CAAC;AAIrC,eAAe,OAAO,CAAC;AAEvB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,OAAO,CAAC;KAC3B;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"definition.js","sources":["../../src/src/web-components/heading/definition.ts"],"sourcesContent":null,"names":["Heading","define"],"mappings":"8BAEAA,EAAQC"}
1
+ {"version":3,"file":"definition.js","sources":["../../src/web-components/heading/definition.ts"],"sourcesContent":null,"names":["Heading","define"],"mappings":"8BAEAA,EAAQC"}
@@ -1,21 +1,21 @@
1
1
  import { type TemplateResult } from "lit";
2
2
  import { SuperInput } from "../../internal/super-input.js";
3
3
  /**
4
- * {@linkcode Input} renders a text input.
4
+ * {@linkcode Input} renders a input.
5
5
  *
6
6
  * @fires input - Fires when the input value changes.
7
7
  * @fires change - Fires when the input value changes.
8
8
  * @category input
9
9
  */
10
10
  declare class Input extends SuperInput {
11
- type: "text" | "search" | "tel" | "url" | "email" | "password";
11
+ type: "text" | "search" | "tel" | "url" | "email" | "password" | "number" | "date" | "time" | "datetime-local" | "month" | "week";
12
12
  value: string;
13
13
  /**
14
14
  * If outline, the outline is always present.
15
15
  */
16
16
  variant: "default" | "outline";
17
17
  protected _input: HTMLInputElement;
18
- private __outlineSC;
18
+ constructor();
19
19
  protected render(): TemplateResult<1>;
20
20
  protected _renderSuffix(): TemplateResult<1>;
21
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/web-components/input/component.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAsB,MAAM,KAAK,CAAC;AAI9D,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAK3D;;;;;;GAMG;AACH,cAYM,KAAM,SAAQ,UAAU;IAC5B,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,KAAK,GAAG,OAAO,GAAG,UAAU,CAAU;IAExE,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IAEH,OAAO,EAAE,SAAS,GAAG,SAAS,CAAa;IAG3C,SAAS,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAEnC,OAAO,CAAC,WAAW,CAKjB;IAEF,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;IA8BrC,SAAS,CAAC,aAAa,IAAI,cAAc,CAAC,CAAC,CAAC;CAsB7C;AAED,eAAe,KAAK,CAAC;AACrB,OAAO,EAAE,KAAK,EAAE,CAAC"}
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"__source__/","sources":["web-components/input/component.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAsB,MAAM,KAAK,CAAC;AAI9D,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAK3D;;;;;;GAMG;AACH,cAqDM,KAAM,SAAQ,UAAU;IAC5B,IAAI,EACA,MAAM,GACN,QAAQ,GACR,KAAK,GACL,KAAK,GACL,OAAO,GACP,UAAU,GACV,QAAQ,GACR,MAAM,GACN,MAAM,GACN,gBAAgB,GAChB,OAAO,GACP,MAAM,CAAU;IAEpB,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IAEH,OAAO,EAAE,SAAS,GAAG,SAAS,CAAa;IAG3C,SAAS,CAAC,MAAM,EAAE,gBAAgB,CAAC;;IAYnC,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;IA4BrC,SAAS,CAAC,aAAa,IAAI,cAAc,CAAC,CAAC,CAAC;CAgB7C;AAED,eAAe,KAAK,CAAC;AACrB,OAAO,EAAE,KAAK,EAAE,CAAC"}
@@ -1,2 +1,2 @@
1
- import{__decorate as t}from"tslib";import{part as i,godown as e,styles as o,StyleController as s,attr as r,htmlSlot as a}from"@godown/element";import n from"@godown/f7-icon/icons/eye-slash-fill.js";import{css as p,nothing as l,html as u}from"lit";import{property as h}from"lit/decorators.js";import{cssGlobalVars as d}from"../../internal/global-style.js";import{SuperInput as c}from"../../internal/super-input.js";import{OutlineBuilder as f}from"../../internal/outline.js";let m=class Input extends c{constructor(){super(...arguments),this.type="text",this.variant="default",this.__outlineSC=new s(this,(()=>new f({outlineType:this.outlineType}).css+("outline"===this.variant?`:host{${d.outlineColor}: var(${d.active})}`:"")))}render(){return u`<div part="root" ${r(this.observedRecord)} class="input-field"> ${[this._renderPrefix(),u`<input part="input" type="${this.type}" .value="${this.value}" ?autofocus="${this.autofocus}" ?disabled="${this.disabled}" autocapitalize="${this.autocapitalize||l}" autocomplete="${this.autocomplete||l}" placeholder="${this.placeholder||l}" id="${this.makeId}" @input="${this._handleInput}" @change="${this._handleChange}"/>`,this._renderSuffix()]} </div>`}_renderSuffix(){const t="password";return u`<label for=${this.makeId} part="suffix"> ${this.type===t?u`<i part="icon" @mousedown="${()=>this._changeInputType("text")}" @mouseup="${()=>this._changeInputType(t)}" @mouseleave="${()=>this._changeInputType(t)}"> ${n()} </i>`:a("suffix")} </label>`}};t([h()],m.prototype,"variant",void 0),t([i("input")],m.prototype,"_input",void 0),m=t([e("input"),o(p`:host{display:block;height:var(${d.input}-height);width:var(${d.input}-width)}:host(:focus-within){${d.outlineColor}:var(${d.active})}`)],m);var $=m;export{m as Input,$ as default};
1
+ import{__decorate as t}from"tslib";import{queryPart as e,godown as i,styles as r,StyleController as o,attr as n}from"@godown/element";import a from"../../internal/icons/eye-slash.js";import{css as p,nothing as s,html as l}from"lit";import{property as u}from"lit/decorators.js";import{cssGlobalVars as c}from"../../internal/global-style.js";import{SuperInput as h}from"../../internal/super-input.js";import{RingBuilder as d}from"../../internal/ring.js";let f=class Input extends h{constructor(){super(),this.type="text",this.variant="default",new o(this,(()=>new d({type:this.ringType}).css+("outline"===this.variant?`:host{${c.ringColor}:currentColor}`:"")))}render(){return l`<label part="root" ${n(this.observedRecord)}> ${[this._renderPrefix(),l`<input part="input" type="${this.type}" .value="${this.value}" ?autofocus="${this.autofocus}" ?disabled="${this.disabled}" autocapitalize="${this.autocapitalize||s}" autocomplete="${this.autocomplete||s}" placeholder="${this.placeholder||s}" @input="${this._handleInput}" @change="${this._handleChange}"/>`,this._renderSuffix()]} </label>`}_renderSuffix(){const t="password";return this.type===t?l`<i part="suffix icon" @mousedown="${()=>this._changeInputType("text")}" @mouseup="${()=>this._changeInputType(t)}" @mouseleave="${()=>this._changeInputType(t)}"> ${a()} </i>`:super._renderSuffix()}};t([u()],f.prototype,"variant",void 0),t([e("input")],f.prototype,"_input",void 0),f=t([i("input"),r(p`:host{display:block;${c.input}-space:0.2em;${c.input}-control:currentColor;${c.input}-icon-color:grey}:host(:active),:host(:focus-within){${c.ringColor}:var(${c.active});${c.input}-icon-color:currentColor}[part~=root]{align-items:center;border-radius:inherit;display:flex;height:inherit;padding:.4em .5em;position:relative}[part=input]{background:none;color:currentColor;flex-grow:1;height:100%;min-height:1.5em}[part~=icon]{align-items:center;color:var(${c.input}-icon-color);display:flex;justify-content:center}[part~=prefix],[part~=suffix]{display:flex;height:100%}[part~=suffix][part~=icon]{padding-inline-start:var(${c.input}-space)}[part~=prefix][part~=icon]{padding-inline-end:var(${c.input}-space)}`)],f);var m=f;export{f as Input,m as default};
2
2
  //# sourceMappingURL=component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../../src/src/web-components/input/component.ts"],"sourcesContent":null,"names":["Input","SuperInput","constructor","this","type","variant","__outlineSC","StyleController","OutlineBuilder","outlineType","css","cssGlobalVars","outlineColor","active","render","html","attr","observedRecord","_renderSuffix","PASSWORD","makeId","__decorate","property","prototype","godown"],"mappings":"ydA8BA,IAAMA,EAAN,MAAMA,cAAcC,EAApB,WAAAC,uBACEC,KAAIC,KAA6D,OAQjED,KAAOE,QAA0B,UAKzBF,KAAWG,YAAG,IAAIC,EACxBJ,MACA,IACE,IAAIK,EAAe,CAAEC,YAAaN,KAAKM,cAAeC,KACpC,YAAjBP,KAAKE,QAAwB,SAASM,EAAcC,qBAAqBD,EAAcE,WAAa,MAG/F,MAAAC,GACR,OAAOC,CAAI,oBAAAC,EAAAb,KAAAc,wCAAA,+VAGLd,KAAKe,0BAGL,aAAAA,SACIC,aACJ,OAAAJ,CAAI,cAAAZ,KAAAiB,yBAAAjB,KAAAC,OAAAe,kMAGQ,GAEME,EAAA,CACDC,kDAIPtB,EAAAuB,UAAA,cAAW,GACPvB,EAAAqB,EAAA,CACCG,EA/DP,uJAiEPxB,SACGA"}
1
+ {"version":3,"file":"component.js","sources":["../../src/web-components/input/component.ts"],"sourcesContent":null,"names":["Input","SuperInput","constructor","super","this","type","variant","StyleController","RingBuilder","ringType","css","cssGlobalVars","ringColor","render","html","attr","observedRecord","_renderSuffix","PASSWORD","__decorate","queryPart","styles","input","active"],"mappings":"ocAuEA,IAAMA,EAAN,MAAMA,cAAcC,EA0BlB,WAAAC,GACEC,QA1BFC,KAAIC,KAYS,OAQbD,KAAOE,QAA0B,UAO/B,IAAIC,EACFH,MACA,IACE,IAAII,EAAY,CAAEH,KAAMD,KAAKK,WAAYC,KACvB,YAAjBN,KAAKE,QAAwB,SAASK,EAAcC,0BAA4B,MAI7E,MAAAC,GACR,OAAOC,CAAI,sBAAAC,EAAAX,KAAAY,oBAAA,2UAGLZ,KAAKa,2BAEL,iBAEA,MAAAC,EAAI,iNAIUf,MAAAc,eACI,sCAIK,GACTE,EAAA,CACCC,EAAA,uCAEdpB,EAAAmB,EAAA,GAvHO,SAyHTE,EAAAX,CAAA,uBAAAC,EAAAW,qBAAAX,EAAAW,8BAAAX,EAAAW,6DAAAX,EAAAC,iBAAAD,EAAAY,WAAAZ,EAAAW,0RAAAX,EAAAW,oKAAAX,EAAAW,kEAAAX,EAAAW,2BAEJtB"}
@@ -1 +1 @@
1
- {"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../src/web-components/input/definition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,gBAAgB,CAAC;AAInC,eAAe,KAAK,CAAC;AAErB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,KAAK,CAAC;KACvB;CACF"}
1
+ {"version":3,"file":"definition.d.ts","sourceRoot":"__source__/","sources":["web-components/input/definition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,gBAAgB,CAAC;AAInC,eAAe,KAAK,CAAC;AAErB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,KAAK,CAAC;KACvB;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"definition.js","sources":["../../src/src/web-components/input/definition.ts"],"sourcesContent":null,"names":["Input","define"],"mappings":"8BAEAA,EAAMC"}
1
+ {"version":3,"file":"definition.js","sources":["../../src/web-components/input/definition.ts"],"sourcesContent":null,"names":["Input","define"],"mappings":"8BAEAA,EAAMC"}
@@ -1 +1 @@
1
- {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/web-components/layout/component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAGrD,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAI7D;;;;;;;;;;;;;GAaG;AACH,cAkCM,MAAO,SAAQ,WAAW;IAC9B;;OAEG;IAEH,MAAM,UAAS;IAEf,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;CAYtC;AAED,eAAe,MAAM,CAAC;AACtB,OAAO,EAAE,MAAM,EAAE,CAAC"}
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"__source__/","sources":["web-components/layout/component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAGrD,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAI7D;;;;;;;;;;;;;GAaG;AACH,cAkCM,MAAO,SAAQ,WAAW;IAC9B;;OAEG;IAEH,MAAM,UAAS;IAEf,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;CAYtC;AAED,eAAe,MAAM,CAAC;AACtB,OAAO,EAAE,MAAM,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../../src/src/web-components/layout/component.ts"],"sourcesContent":null,"names":["Layout","GlobalStyle","constructor","this","sticky","render","html","attr","observedRecord","htmlSlot","__decorate"],"mappings":"8PAwDA,IAAMA,EAAN,MAAMA,eAAeC,EAArB,WAAAC,uBAKEC,KAAMC,QAAG,EAEC,MAAAC,GACR,OAAOC,CAAI,oBAAAC,EAAAJ,KAAAK,0CAAAC,EAAA,wCAAAA,oCAAAA,EAAA,8BAGLC,EAAA,iDAGkBV,EAAAU,EAAA,GAhEV,0TAoEhBV"}
1
+ {"version":3,"file":"component.js","sources":["../../src/web-components/layout/component.ts"],"sourcesContent":null,"names":["Layout","GlobalStyle","constructor","this","sticky","render","html","attr","observedRecord","htmlSlot","__decorate"],"mappings":"8PAwDA,IAAMA,EAAN,MAAMA,eAAeC,EAArB,WAAAC,uBAKEC,KAAMC,QAAG,EAEC,MAAAC,GACR,OAAOC,CAAI,oBAAAC,EAAAJ,KAAAK,0CAAAC,EAAA,wCAAAA,oCAAAA,EAAA,8BAGLC,EAAA,iDAGkBV,EAAAU,EAAA,GAhEV,0TAoEhBV"}
@@ -1 +1 @@
1
- {"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../src/web-components/layout/definition.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,gBAAgB,CAAC;AAIpC,eAAe,MAAM,CAAC;AAEtB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,eAAe,EAAE,MAAM,CAAC;KACzB;CACF"}
1
+ {"version":3,"file":"definition.d.ts","sourceRoot":"__source__/","sources":["web-components/layout/definition.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,gBAAgB,CAAC;AAIpC,eAAe,MAAM,CAAC;AAEtB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,eAAe,EAAE,MAAM,CAAC;KACzB;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"definition.js","sources":["../../src/src/web-components/layout/definition.ts"],"sourcesContent":null,"names":["Layout","define"],"mappings":"8BAEAA,EAAOC"}
1
+ {"version":3,"file":"definition.js","sources":["../../src/web-components/layout/definition.ts"],"sourcesContent":null,"names":["Layout","define"],"mappings":"8BAEAA,EAAOC"}
@@ -1,4 +1,5 @@
1
- import { SuperAnchor } from "../../internal/super-anchor.js";
1
+ import { type TemplateResult } from "lit";
2
+ import GlobalStyle from "../../internal/global-style.js";
2
3
  declare const linkTypes: {
3
4
  readonly push: "push";
4
5
  readonly replace: "replace";
@@ -25,7 +26,7 @@ type LinkType = keyof typeof linkTypes;
25
26
  * @fires navigate - Fires when the link is clicked.
26
27
  * @category navigation
27
28
  */
28
- declare class Link extends SuperAnchor {
29
+ declare class Link extends GlobalStyle {
29
30
  /**
30
31
  * If `"normal"`, behave like a normal anchor.
31
32
  *
@@ -42,12 +43,22 @@ declare class Link extends SuperAnchor {
42
43
  * Use `replaceState` instead of `pushState`.
43
44
  */
44
45
  replace: boolean;
46
+ /**
47
+ * A element href.
48
+ */
49
+ href: string;
50
+ /**
51
+ * A element target.
52
+ */
53
+ target: "_blank" | "_self" | "_parent" | "_top";
45
54
  /**
46
55
  * Location state object.
47
56
  */
48
57
  state: {};
58
+ get pathname(): string;
49
59
  protected _handleClick(e: MouseEvent): void;
50
60
  handleState: () => void;
61
+ protected render(): TemplateResult<1>;
51
62
  }
52
63
  export default Link;
53
64
  export { Link };
@@ -1 +1 @@
1
- {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/web-components/link/component.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAK7D,QAAA,MAAM,SAAS;;;;;CAKL,CAAC;AAEX,KAAK,QAAQ,GAAG,MAAM,OAAO,SAAS,CAAC;AAEvC;;;;;;;;;;;;;;;;;;GAkBG;AACH,cACM,IAAK,SAAQ,WAAW;IAC5B;;;;;;OAMG;IAEH,IAAI,EAAE,QAAQ,CAAkB;IAEhC;;OAEG;IAEH,QAAQ,UAAS;IAEjB;;OAEG;IAEH,OAAO,UAAS;IAEhB;;OAEG;IACH,KAAK,KAAM;IAEX,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI;IA0B3C,WAAW,EAAE,MAAM,IAAI,CAcrB;CACH;AAED,eAAe,IAAI,CAAC;AACpB,OAAO,EAAE,IAAI,EAAE,CAAC"}
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"__source__/","sources":["web-components/link/component.ts"],"names":[],"mappings":"AAIA,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAC9D,OAAO,WAAW,MAAM,gCAAgC,CAAC;AAIzD,QAAA,MAAM,SAAS;;;;;CAKL,CAAC;AAEX,KAAK,QAAQ,GAAG,MAAM,OAAO,SAAS,CAAC;AAEvC;;;;;;;;;;;;;;;;;;GAkBG;AACH,cAiBM,IAAK,SAAQ,WAAW;IAC5B;;;;;;OAMG;IAEH,IAAI,EAAE,QAAQ,CAAkB;IAEhC;;OAEG;IAEH,QAAQ,UAAS;IAEjB;;OAEG;IAEH,OAAO,UAAS;IAEhB;;OAEG;IAEH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IAEH,MAAM,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAW;IAE1D;;OAEG;IACH,KAAK,KAAM;IAEX,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI;IA6B3C,WAAW,EAAE,MAAM,IAAI,CAcrB;IAEF,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;CAatC;AAED,eAAe,IAAI,CAAC;AACpB,OAAO,EAAE,IAAI,EAAE,CAAC"}
@@ -1,2 +1,2 @@
1
- import{__decorate as t}from"tslib";import{godown as e}from"@godown/element";import{property as s}from"lit/decorators.js";import{SuperAnchor as r}from"../../internal/super-anchor.js";import o from"../router/component.js";const a="push",p="replace",i="normal",h="auto";let n=class Link extends r{constructor(){super(...arguments),this.type=h,this.suppress=!1,this.replace=!1,this.state={},this.handleState=()=>{switch(this.type){case h:case a:if(!this.replace){history.pushState(this.state,"",this.href);break}case p:history.replaceState(this.state,"",this.href)}}}_handleClick(t){const{state:e,type:s,href:r,pathname:a,suppress:p}=this;if(this.dispatchCustomEvent("navigate",{...this.observedRecord,pathname:a,state:e}),r.startsWith("#")||s===i)return;this.handleState();const n=[...o.routerInstances];p||s===h&&!n.some((t=>t.search(location.pathname)))||(t.preventDefault(),o.routerInstances.forEach((t=>{t.handlePopstate()})))}};t([s()],n.prototype,"type",void 0),t([s({type:Boolean})],n.prototype,"suppress",void 0),t([s({type:Boolean})],n.prototype,"replace",void 0),n=t([e("link")],n);var c=n;export{n as Link,c as default};
1
+ import{__decorate as t}from"tslib";import{godown as e,styles as r,attr as o,htmlSlot as s}from"@godown/element";import{property as a}from"lit/decorators.js";import i from"../router/component.js";import{css as h,nothing as p,html as n}from"lit";import{GlobalStyle as l}from"../../internal/global-style.js";const c="push",d="replace",f="normal",u="auto";let m=class Link extends l{constructor(){super(...arguments),this.type=u,this.suppress=!1,this.replace=!1,this.target="_self",this.state={},this.handleState=()=>{switch(this.type){case u:case c:if(!this.replace){history.pushState(this.state,"",this.href);break}case d:history.replaceState(this.state,"",this.href)}}}get pathname(){return new URL(this.href,location.href).pathname}_handleClick(t){const{state:e,type:r,href:o,pathname:s,suppress:a}=this;if(!o)return;if(this.dispatchCustomEvent("navigate",{...this.observedRecord,pathname:s,state:e}),o.startsWith("#")||r===f)return;this.handleState();const h=[...i.routerInstances];a||r===u&&!h.some((t=>t.search(location.pathname)))||(t.preventDefault(),i.routerInstances.forEach((t=>{t.handlePopstate()})))}render(){return n`<a part="root" ${o(this.observedRecord)} href="${this.href||p}" target="${this.target}" @click=${this._handleClick}> ${s()} </a>`}};t([a()],m.prototype,"type",void 0),t([a({type:Boolean})],m.prototype,"suppress",void 0),t([a({type:Boolean})],m.prototype,"replace",void 0),t([a()],m.prototype,"href",void 0),t([a()],m.prototype,"target",void 0),m=t([e("link"),r(h`:host{color:currentColor;cursor:default;display:inline-block}:host([href]){cursor:pointer}a{color:currentColor;display:contents}`)],m);var y=m;export{m as Link,y as default};
2
2
  //# sourceMappingURL=component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../../src/src/web-components/link/component.ts"],"sourcesContent":null,"names":["linkTypes","Link","SuperAnchor","constructor","this","type","suppress","replace","state","handleState","history","pushState","href","replaceState","_handleClick","e","pathname","dispatchCustomEvent","observedRecord","startsWith","routers","Router","routerInstances","some","i","search","location","preventDefault","forEach","handlePopstate","__decorate","property","prototype","Boolean","godown","Link$1"],"mappings":"4NAMA,MAEMA,EACE,OADFA,EAEK,UAFLA,EAGI,SAHJA,EAIE,OAyBR,IAAMC,EAAN,MAAMA,aAAaC,EAAnB,WAAAC,uBASEC,KAAAC,KAAiBL,EAMjBI,KAAQE,UAAG,EAMXF,KAAOG,SAAG,EAKVH,KAAKI,MAAG,CAAE,EA4BVJ,KAAWK,YAAe,KACxB,OAAQL,KAAKC,MACX,KAAKL,EACL,KAAKA,EACH,IAAKI,KAAKG,QAAS,CAEjBG,QAAQC,UAAUP,KAAKI,MAAO,GAAIJ,KAAKQ,MACvC,MAGJ,KAAKZ,EACHU,QAAQG,aAAaT,KAAKI,MAAO,GAAIJ,KAAKQ,QArCtC,YAAAE,CAAaC,GACrB,MAAMP,MAAEA,EAAKH,KAAEA,EAAIO,KAAEA,EAAII,SAAEA,EAAQV,SAAEA,GAAaF,KAMlD,GALAA,KAAKa,oBAAoB,WAAY,IAChCb,KAAKc,eACRF,WACAR,UAEEI,EAAKO,WAAW,MAAQd,IAASL,EACnC,OAEFI,KAAKK,cACL,MAAMW,EAAU,IAAIC,EAAOC,iBAGxBhB,GACAD,IAASL,IAERoB,EAAQG,MAAMC,GAAMA,EAAEC,OAAOC,SAASV,cAExCD,EAAEY,iBACFN,EAAOC,gBAAgBM,SAASJ,IAC9BA,EAAEK,gBAAgB,OAxCxBC,EAAA,CADCC,KAC+B9B,EAAA+B,UAAA,YAAA,GAMhCF,EAAA,CADCC,EAAS,CAAE1B,KAAM4B,WACDhC,EAAA+B,UAAA,gBAAA,GAMjBF,EAAA,CADCC,EAAS,CAAE1B,KAAM4B,WACFhC,EAAA+B,UAAA,eAAA,GArBZ/B,EAAI6B,EAAA,CADTI,EA9BiB,SA+BZjC,GAuEN,IAAAkC,EAAelC"}
1
+ {"version":3,"file":"component.js","sources":["../../src/web-components/link/component.ts"],"sourcesContent":null,"names":["linkTypes","Link","GlobalStyle","constructor","this","type","suppress","replace","target","state","handleState","history","pushState","href","replaceState","pathname","URL","location","_handleClick","e","dispatchCustomEvent","observedRecord","startsWith","routers","Router","routerInstances","some","i","search","preventDefault","forEach","handlePopstate","render","html","attr","nothing","htmlSlot","__decorate","prototype","Boolean","property","godown","styles","css","Link$1"],"mappings":"iTAOA,MAEMA,EACE,OADFA,EAEK,UAFLA,EAGI,SAHJA,EAIE,OAyCR,IAAMC,EAAN,MAAMA,aAAaC,EAAnB,WAAAC,uBASEC,KAAAC,KAAiBL,EAMjBI,KAAQE,UAAG,EAMXF,KAAOG,SAAG,EAYVH,KAAMI,OAA4C,QAKlDJ,KAAKK,MAAG,CAAE,EAmCVL,KAAWM,YAAe,KACxB,OAAQN,KAAKC,MACX,KAAKL,EACL,KAAKA,EACH,IAAKI,KAAKG,QAAS,CAEjBI,QAAQC,UAAUR,KAAKK,MAAO,GAAIL,KAAKS,MACvC,MAGJ,KAAKb,EACHW,QAAQG,aAAaV,KAAKK,MAAO,GAAIL,KAAKS,QA5ChD,YAAIE,GACF,OAAO,IAAIC,IAAIZ,KAAKS,KAAMI,SAASJ,MAAME,SAGjC,YAAAG,CAAaC,GACrB,MAAMV,MAAEA,EAAKJ,KAAEA,EAAIQ,KAAEA,EAAIE,SAAEA,EAAQT,SAAEA,GAAaF,KAClD,IAAKS,EACH,OAOF,GALAT,KAAKgB,oBAAoB,WAAY,IAChChB,KAAKiB,eACRN,WACAN,UAEEI,EAAKS,WAAW,MAAQjB,IAASL,EACnC,OAEFI,KAAKM,cACL,MAAMa,EAAU,IAAIC,EAAOC,iBAGxBnB,GACAD,IAASL,IAERuB,EAAQG,MAAMC,GAAMA,EAAEC,OAAOX,SAASF,cAExCI,EAAEU,iBACFL,EAAOC,gBAAgBK,SAASH,IAC9BA,EAAEI,gBAAgB,KAqBd,MAAAC,GACR,OAAOC,CAAI,kBAAAC,EAAA9B,KAAAiB,yBAAAjB,KAAAS,MAAAsB,cAAA/B,KAAAI,kBAAAJ,KAAAc,iBAAAkB,aAGLC,EAAA,MAEQpC,EAAAqC,UAAA,YAAW,GACZD,EAAA,oBAEPpC,EAAAqC,UAAU,gBAAA,QAEf,CAAAjC,KAAAkC,aACHD,UAAA,eAAA,KACD,CA7FCE,KADCvC,EAAAqC,UAAU,YAAA,GACqBD,EAAA,CAMhCG,KADCvC,EAAAqC,UAAe,iBACCrC,EAAAoC,EAAA,CAMjBI,EApEgB,QAmEfC,EAAAC,CAAW,qIACI1C,GAMhB,IAAA2C,EAAA3C"}
@@ -1 +1 @@
1
- {"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../src/web-components/link/definition.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAIlC,eAAe,IAAI,CAAC;AAEpB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,IAAI,CAAC;KACrB;CACF"}
1
+ {"version":3,"file":"definition.d.ts","sourceRoot":"__source__/","sources":["web-components/link/definition.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAIlC,eAAe,IAAI,CAAC;AAEpB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,IAAI,CAAC;KACrB;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"definition.js","sources":["../../src/src/web-components/link/definition.ts"],"sourcesContent":null,"names":["Link","define"],"mappings":"8BAEAA,EAAKC"}
1
+ {"version":3,"file":"definition.js","sources":["../../src/web-components/link/definition.ts"],"sourcesContent":null,"names":["Link","define"],"mappings":"8BAEAA,EAAKC"}
@@ -1 +1 @@
1
- {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/web-components/progress/component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAGrD,OAAO,EAAE,WAAW,EAAiB,MAAM,gCAAgC,CAAC;AAI5E;;;;GAIG;AACH,cA+CM,QAAS,SAAQ,WAAW;IAEhC,GAAG,SAAK;IAGR,GAAG,SAAK;IAGR,KAAK,EAAE,MAAM,CAAC;IAEd,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;CAqBtC;AAED,eAAe,QAAQ,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,CAAC"}
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"__source__/","sources":["web-components/progress/component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAGrD,OAAO,EAAE,WAAW,EAAiB,MAAM,gCAAgC,CAAC;AAI5E;;;;GAIG;AACH,cA+CM,QAAS,SAAQ,WAAW;IAEhC,GAAG,SAAK;IAGR,GAAG,SAAK;IAGR,KAAK,EAAE,MAAM,CAAC;IAEd,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;CAsBtC;AAED,eAAe,QAAQ,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -1,2 +1,2 @@
1
- import{__decorate as t}from"tslib";import{godown as r,styles as e,isNullable as o,Ranger as i,attr as s}from"@godown/element";import{css as a,html as n}from"lit";import{property as l}from"lit/decorators.js";import{cssGlobalVars as p,GlobalStyle as d}from"../../internal/global-style.js";let m=class Progress extends d{constructor(){super(...arguments),this.max=1,this.min=0}render(){let t,r=20;if(!o(this.value)){const e=new i(this.min,this.max);r=100*e.restrict(this.value/e.diff),t="static"}return n`<div part="root" ${s(this.observedRecord)} class="${t}"> <i part="value" style="width:${r}%;"></i> </div>`}};t([l({type:Number})],m.prototype,"max",void 0),t([l({type:Number})],m.prototype,"min",void 0),t([l({type:Number})],m.prototype,"value",void 0),m=t([r("progress"),e(a`:host{background:var(${p.passive});border-radius:.25em;color:var(${p.active});height:.5em;width:100%}:host,[part=root]{display:block}[part=root]{border-radius:inherit;overflow:hidden;position:relative;z-index:1}[part=value]{animation:progress 1.8s ease-in-out infinite alternate;background:currentColor;border-radius:inherit;height:100%;left:0;position:absolute;top:0;transition:all .3s;z-index:2}@keyframes progress{0%{left:0}to{left:80%}}.static [part=value]{animation:none}`)],m);var u=m;export{m as Progress,u as default};
1
+ import{__decorate as t}from"tslib";import{godown as r,styles as e,isNullable as o,Ranger as i,attr as s}from"@godown/element";import{css as a,html as n}from"lit";import{property as l}from"lit/decorators.js";import{cssGlobalVars as p,GlobalStyle as d}from"../../internal/global-style.js";let m=class Progress extends d{constructor(){super(...arguments),this.max=1,this.min=0}render(){let t,r=20;if(!o(this.value)){const e=new i(this.min,this.max);r=(+this.value-this.min)/e.diff*100,t="static"}return n`<div part="root" ${s(this.observedRecord)} class="${t}"> <i part="value" style="width:${r}%;"></i> </div>`}};t([l({type:Number})],m.prototype,"max",void 0),t([l({type:Number})],m.prototype,"min",void 0),t([l({type:Number})],m.prototype,"value",void 0),m=t([r("progress"),e(a`:host{background:var(${p.passive});border-radius:.25em;color:var(${p.active});height:.5em;width:100%}:host,[part=root]{display:block}[part=root]{border-radius:inherit;overflow:hidden;position:relative;z-index:1}[part=value]{animation:progress 1.8s ease-in-out infinite alternate;background:currentColor;border-radius:inherit;height:100%;left:0;position:absolute;top:0;transition:all .3s;z-index:2}@keyframes progress{0%{left:0}to{left:80%}}.static [part=value]{animation:none}`)],m);var u=m;export{m as Progress,u as default};
2
2
  //# sourceMappingURL=component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../../src/src/web-components/progress/component.ts"],"sourcesContent":null,"names":["Progress","GlobalStyle","constructor","this","max","min","render","className","width","isNullable","value","ranger","Ranger","restrict","diff","html","attr","observedRecord","__decorate","Number","prototype","godown","styles","css","cssGlobalVars","passive","active","Progress$1"],"mappings":"+RA4DA,IAAMA,EAAN,MAAMA,iBAAiBC,EAAvB,WAAAC,uBAEEC,KAAGC,IAAG,EAGND,KAAGE,IAAG,EAKI,MAAAC,GACR,IACIC,EADAC,EAAQ,GAEZ,IAAKC,EAAWN,KAAKO,OAAQ,CAC3B,MAAMC,EAAS,IAAIC,EAAOT,KAAKE,IAAKF,KAAKC,KACzCI,EAAoD,IAA5CG,EAAOE,SAASV,KAAKO,MAAQC,EAAOG,MAC5CP,EAAY,SAEd,OAAOQ,CAAI,oBAAAC,EAAAb,KAAAc,0BAAAV,oCAAAC,qBAGLU,EAAA,SACgBC,gFAII,0BAGzBC,UAAA,aAAA,KACHF,EAAA,CACDG,EArFiB,YAwDhBC,EAAAC,CAAA,wBAAAC,EAAAC,0CAAAD,EAAAE,2ZADC1B,GACO,IAAA2B,EAAA3B"}
1
+ {"version":3,"file":"component.js","sources":["../../src/web-components/progress/component.ts"],"sourcesContent":null,"names":["Progress","GlobalStyle","constructor","this","max","min","render","className","width","isNullable","value","ranger","Ranger","diff","html","attr","observedRecord","__decorate","Number","prototype","godown","styles","css","cssGlobalVars","passive","active","Progress$1"],"mappings":"+RA4DA,IAAMA,EAAN,MAAMA,iBAAiBC,EAAvB,WAAAC,uBAEEC,KAAGC,IAAG,EAGND,KAAGE,IAAG,EAKI,MAAAC,GACR,IACIC,EADAC,EAAQ,GAEZ,IAAKC,EAAWN,KAAKO,OAAQ,CAC3B,MAAMC,EAAS,IAAIC,EAAOT,KAAKE,IAAKF,KAAKC,KAEzCI,IADeL,KAAKO,MAAQP,KAAKE,KAChBM,EAAOE,KAAQ,IAChCN,EAAY,SAEd,OAAOO,CAAI,oBAAAC,EAAAZ,KAAAa,0BAAAT,oCAAAC,qBAGLS,EAAA,SACgBC,gFAII,0BAGzBC,UAAA,aAAA,KACHF,EAAA,CACDG,EAtFiB,YAwDhBC,EAAAC,CAAA,wBAAAC,EAAAC,0CAAAD,EAAAE,2ZADCzB,GACO,IAAA0B,EAAA1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../src/web-components/progress/definition.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAItC,eAAe,QAAQ,CAAC;AAExB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,iBAAiB,EAAE,QAAQ,CAAC;KAC7B;CACF"}
1
+ {"version":3,"file":"definition.d.ts","sourceRoot":"__source__/","sources":["web-components/progress/definition.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAItC,eAAe,QAAQ,CAAC;AAExB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,iBAAiB,EAAE,QAAQ,CAAC;KAC7B;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"definition.js","sources":["../../src/src/web-components/progress/definition.ts"],"sourcesContent":null,"names":["Progress","define"],"mappings":"8BAEAA,EAASC"}
1
+ {"version":3,"file":"definition.js","sources":["../../src/web-components/progress/definition.ts"],"sourcesContent":null,"names":["Progress","define"],"mappings":"8BAEAA,EAASC"}
@@ -1 +1 @@
1
- {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/web-components/range/component.ts"],"names":[],"mappings":"AAAA,OAAO,EASL,MAAM,EAEP,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAIrD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAK3D,KAAK,UAAU,GAAG,MAAM,GAAG,MAAM,EAAE,CAAC;AAEpC;;;;;;;;;GASG;AACH,cA6FM,KAAK,CAAC,CAAC,SAAS,UAA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AE,MAAM,OAC1B,UAAU,KAAG,IAAI;IAM9B;;;;OAIG;IACH,SAAS,CAAC,cAAc,CAAC,KAAK,EAAE,MAAM,WACrB,MAAM,KAAG,IAAI;IAY9B;;;OAGG;IACH,SAAS,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,UAAU,GAAG,MAAM;IAKjE;;;;OAIG;IACH,SAAS,CAAC,oBAAoB,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI;IAenD;;;;OAIG;IACH,SAAS,CAAC,uBAAuB,CAAC,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,OAC9D,UAAU,KAAG,IAAI;IAa9B;;;;OAIG;IACH,SAAS,CAAC,uBAAuB,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,OACzD,UAAU,KAAG,IAAI;IAS9B,SAAS,CAAC,cAAc,IAAI,IAAI;IAchC,KAAK,IAAI,IAAI;IAIb,IAAI,IAAI,CAAC;IAIT,QAAQ,IAAI,CAAC;CAMd;AAED,eAAe,KAAK,CAAC;AACrB,OAAO,EAAE,KAAK,EAAE,CAAC"}
@@ -1,2 +1,2 @@
1
- import{__decorate as t}from"tslib";import{part as e,godown as r,styles as a,Ranger as s,omit as o,attr as i,joinDeclarations as n,loop as h,tokenList as l,isNullable as d}from"@godown/element";import{css as u,html as c}from"lit";import{property as v,queryAll as p,state as m}from"lit/decorators.js";import{scopePrefix as f,cssGlobalVars as g}from"../../internal/global-style.js";import{SuperInput as w}from"../../internal/super-input.js";const y="range",_=f(y);let b=class Range extends w{constructor(){super(...arguments),this.min=0,this.max=100,this.vertical=!1,this.__focusStack=[]}get range(){return Array.isArray(this.value)}get rangeValue(){return this.range?this.value:[this.value]}padValue(t,e=0){const{rangeValue:r}=this,a=t-r.length;return a>0?new Array(a).fill(e).concat(r):r}attributeChangedCallback(t,e,r){super.attributeChangedCallback(t,e,r),"max"!==t&&"min"!==t&&"step"!==t||(this._ranger=new s(this.min,this.max,this.step))}get observedRecord(){return o(super.observedRecord,"outline-type")}render(){const t=this.padValue(2),e=Math.min(...t),r=Math.max(...t),a=this._ranger.diff;return c`<div part="root" ${i(this.observedRecord)} @mousedown="${this.disabled?null:this._handleMousedownRoot}" style="${n([["--from",(e-this.min)/a*100+"%"],["--to",(r-this.min)/a*100+"%"],...t.map(((t,e)=>[`--handle-${e}`,(t-this.min)/a*100+"%"]))])}"> <div part="track"></div> ${h(this.rangeValue.length,(t=>this._renderHandle(t)))} </div>`}_renderHandle(t){const{disabled:e,range:r,rangeValue:a}=this,s=!r||r&&t===a.length-1&&1===a.length;return c`<i tabindex="0" part="handle" class="${l({"last-focus":this.lastFocus===t})}" @mousedown="${e?null:this.createMouseDown(t)}" @focus="${e?null:()=>this.focusHandle(t)}" @blur="${e?null:this.blurHandle}" style="${n({"z-index":this.__focusStack.indexOf(t)+1,"--handle":`var(--${s?"to":`handle-${t}`})`})}"></i>`}focusHandle(t){this.lastFocus=t;const e=this.__focusStack.indexOf(t);-1!==e&&this.__focusStack.splice(e,1),this.__focusStack.push(t);const r=this._handles.item(t);r?.focus(),this.__keydownEvent||(this.__keydownEvent=this.events.add(document,"keydown",this.createKeydownEvent(t)))}blurHandle(){this.lastFocus=void 0,this.__keydownEvent=this.events.remove(document,"keydown",this.__keydownEvent)}createKeydownEvent(t){return e=>{const{rangeValue:r,step:a}=this;r.length<2&&(t=0);const s=r[t];"ArrowLeft"===e.key||"ArrowDown"===e.key?(e.preventDefault(),this.createSetValue(t)(s-a)):"ArrowRight"!==e.key&&"ArrowUp"!==e.key||(e.preventDefault(),this.createSetValue(t)(s+a))}}createMouseDown(t){return e=>{this.focusHandle(t),this.createMousedownListener(this.createSetValue(t))(e)}}createSetValue(t){return e=>{const r=this._ranger.normalize(e);let a=r;this.range&&(a=[...this.value],a[t]=r),this.value=a,this.dispatchCustomEvent("change",this.value)}}_computeValue({clientX:t,clientY:e}){const{top:r,left:a,height:s,width:o}=this._root.getBoundingClientRect();return this._ranger.present(this.vertical?(e-r)/s:(t-a)/o)}_handleMousedownRoot(t){const e=this._computeValue(t),r=this.range?this.rangeValue.reduce(((t,r,a)=>Math.abs(e-r)<Math.abs(e-this.rangeValue[t])?a:t),0):0,a=this.createSetValue(r);a(e),this.createMousedownListener(a)(t),this.focusHandle(r)}createMousedownListener(t){return e=>{e.preventDefault(),e.stopPropagation();const r=this.createMousemoveListener(t);this.events.add(document,"mousemove",r);const a=()=>{this.events.remove(document,"mousemove",r),this.events.remove(document,"mouseup",a)};this.events.add(document,"mouseup",a)}}createMousemoveListener(t){return e=>{const r=this._computeValue(e);r===this._ranger.restrict(r)&&t?.call(this,r)}}_connectedInit(){this._ranger=new s(this.min,this.max,this.step);const t=this._ranger.diff;this.step||=t/100,d(this.value)&&(d(this.default)?this.value=Math.round(t/2/this.step)*this.step:this.value=this.default),this.default??=this.value}reset(){this.value=this.default}sort(){return this.value=this.toSorted()}toSorted(){return this.range?[...this.value].sort(((t,e)=>t-e)):this.value}};t([v({type:Number})],b.prototype,"min",void 0),t([v({type:Number})],b.prototype,"max",void 0),t([v({type:Number})],b.prototype,"step",void 0),t([v({type:Boolean,reflect:!0})],b.prototype,"vertical",void 0),t([v({type:Array})],b.prototype,"value",void 0),t([v({type:Array})],b.prototype,"default",void 0),t([e("root")],b.prototype,"_root",void 0),t([p("[part=handle]")],b.prototype,"_handles",void 0),t([m()],b.prototype,"lastFocus",void 0),b=t([r(y),a(u`:host{${_}--handle-active:var(${g.active});${_}--track-width:.5em;${_}--length:var(${g.input}-width);background:var(${g.passive});display:block;width:var(${_}--length)}:host([contents]) [part=root]{width:inherit}:host([vertical]){height:var(${_}--length);width:-moz-fit-content;width:fit-content}:host(:not([disabled])) .last-focus{${_}--handle-scale:1.05;background:var(${_}--handle-active)}[part=root]{position:relative;--from:0%;--to:50%;height:var(${_}--track-width)}[part=root],[part=track]{border-radius:inherit;min-height:inherit}[part=track]{background:var(${g.active});height:100%;justify-content:space-between;left:min(var(--from),var(--to));pointer-events:none;width:max(calc(var(--to) - var(--from)),calc(var(--from) - var(--to)))}[part=handle],[part=track]{display:flex;position:absolute}[part=handle]{align-items:center;background:var(${g.active});border:.1em solid;border-color:var(${g.input}-control);border-radius:50%;height:1em;justify-content:center;transform:scale(var(${_}--handle-scale,1)) translate(-50%,-25%);transform-origin:0 25%;-webkit-user-select:none;user-select:none;width:1em}`,u`[vertical]{height:inherit;width:var(${_}--track-width)}[vertical] i{transform:translate(-25%,-50%)}[vertical] [part=track]{height:max(calc(var(--to) - var(--from)),calc(var(--from) - var(--to)));left:0;top:min(var(--from),var(--to));width:100%}`,u`[part=handle]{left:var(--handle);top:0}[vertical] [part=handle]{left:0;top:var(--handle)}`)],b);var k=b;export{b as Range,k as default};
1
+ import{__decorate as t}from"tslib";import{queryPart as e,godown as r,styles as a,Ranger as o,omit as s,attr as i,joinDeclarations as n,loop as h,tokenList as l,isNullable as d}from"@godown/element";import{css as u,html as c}from"lit";import{property as v,queryAll as p,state as m}from"lit/decorators.js";import{scopePrefix as g,cssGlobalVars as f}from"../../internal/global-style.js";import{SuperInput as w}from"../../internal/super-input.js";const y="range",_=g(y);let k=class Range extends w{constructor(){super(...arguments),this.min=0,this.max=100,this.vertical=!1,this.__focusStack=[]}get range(){return Array.isArray(this.value)}get rangeValue(){return this.range?this.value:[this.value]}padValue(t,e=0){const{rangeValue:r}=this,a=t-r.length;return a>0?new Array(a).fill(e).concat(r):r}attributeChangedCallback(t,e,r){super.attributeChangedCallback(t,e,r),"max"!==t&&"min"!==t&&"step"!==t||(this._ranger=new o(this.min,this.max,this.step))}get observedRecord(){return s(super.observedRecord,"ring-type")}render(){const t=this.padValue(2),e=Math.min(...t),r=Math.max(...t),a=this._ranger.diff;return c`<div part="root" ${i(this.observedRecord)} @mousedown="${this.disabled?null:this._handleMousedownRoot}" style="${n([["--from",(e-this.min)/a*100+"%"],["--to",(r-this.min)/a*100+"%"],...t.map(((t,e)=>[`--handle-${e}`,(t-this.min)/a*100+"%"]))])}"> <div part="track"></div> ${h(this.rangeValue.length,(t=>this._renderHandle(t)))} </div>`}_renderHandle(t){const{disabled:e,range:r,rangeValue:a}=this,o=!r||r&&t===a.length-1&&1===a.length;return c`<i tabindex="0" part="${l("handle",`handle-${t}`)}" @mousedown="${e?null:this.createMouseDown(t)}" style="${n({"z-index":this.__focusStack.indexOf(t)+1,"--handle":`var(--${o?"to":`handle-${t}`})`})}"></i>`}focusHandle(t){this.lastFocus=t;const e=this.__focusStack.indexOf(t);-1!==e&&this.__focusStack.splice(e,1),this.__focusStack.push(t);const r=this._handles.item(t);r?.focus(),this.__keydownEvent||(this.__keydownEvent=this.events.add(document,"keydown",this.createKeydownEvent(t)))}blurHandle(){this.lastFocus=void 0,this.__keydownEvent=this.events.remove(document,"keydown",this.__keydownEvent)}createKeydownEvent(t){return e=>{const{rangeValue:r,step:a}=this;r.length<2&&(t=0);const o=r[t];"ArrowLeft"===e.key||"ArrowDown"===e.key?(e.preventDefault(),this.createSetValue(t)(o-a)):"ArrowRight"!==e.key&&"ArrowUp"!==e.key||(e.preventDefault(),this.createSetValue(t)(o+a))}}createMouseDown(t){return e=>{this.focusHandle(t),this.createMousedownListener(this.createSetValue(t))(e)}}createSetValue(t){return e=>{const r=this._ranger.normalize(e);let a=r;this.range&&(a=[...this.value],a[t]=r),this.value=a,this.dispatchCustomEvent("change",this.value)}}_computeValue({clientX:t,clientY:e}){const{top:r,left:a,height:o,width:s}=this._root.getBoundingClientRect();return this._ranger.present(this.vertical?(e-r)/o:(t-a)/s)}_handleMousedownRoot(t){const e=this._computeValue(t),r=this.range?this.rangeValue.reduce(((t,r,a)=>Math.abs(e-r)<Math.abs(e-this.rangeValue[t])?a:t),0):0,a=this.createSetValue(r);a(e),this.createMousedownListener(a)(t),this.focusHandle(r)}createMousedownListener(t){return e=>{e.preventDefault(),e.stopPropagation();const r=this.createMousemoveListener(t);this.events.add(document,"mousemove",r);const a=()=>{this.events.remove(document,"mousemove",r),this.events.remove(document,"mouseup",a)};this.events.add(document,"mouseup",a)}}createMousemoveListener(t){return e=>{const r=this._computeValue(e);r===this._ranger.restrict(r)&&t?.call(this,r)}}_connectedInit(){this._ranger=new o(this.min,this.max,this.step);const t=this._ranger.diff;this.step||=t/100,d(this.value)&&(d(this.default)?this.value=Math.round(t/2/this.step)*this.step:this.value=this.default),this.default??=this.value}reset(){this.value=this.default}sort(){return this.value=this.toSorted()}toSorted(){return this.range?[...this.value].sort(((t,e)=>t-e)):this.value}};t([v({type:Number})],k.prototype,"min",void 0),t([v({type:Number})],k.prototype,"max",void 0),t([v({type:Number})],k.prototype,"step",void 0),t([v({type:Boolean,reflect:!0})],k.prototype,"vertical",void 0),t([v({type:Array})],k.prototype,"value",void 0),t([v({type:Array})],k.prototype,"default",void 0),t([e("root")],k.prototype,"_root",void 0),t([p("[part=handle]")],k.prototype,"_handles",void 0),t([m()],k.prototype,"lastFocus",void 0),k=t([r(y),a(u`:host{${_}--track-width:.5em;${_}--handle-scale:1;${_}--track-background:var(${f.active});background:var(${f.passive});display:block;height:var(${_}--track-width);width:100%}:host([contents]) [part=root]{width:inherit}:host([vertical]){height:100%;width:-moz-fit-content;width:fit-content}[part=root]{position:relative;--from:0%;--to:50%}[part=root],[part=track]{border-radius:inherit;min-height:inherit}[part=track]{background:var(${_}--track-background);height:100%;justify-content:space-between;left:min(var(--from),var(--to));pointer-events:none;width:max(calc(var(--to) - var(--from)),calc(var(--from) - var(--to)))}[part=track],[part~=handle]{display:flex;position:absolute}[part~=handle]{align-items:center;background:var(${f.background});border:.1em solid;border-radius:50%;height:1em;justify-content:center;outline:0;transform:scale(var(${_}--handle-scale)) translate(-50%,-25%);transform-origin:0 25%;-webkit-user-select:none;user-select:none;width:1em}`,u`[vertical]{height:inherit;width:var(${_}--track-width)}[vertical] i{transform:translate(-25%,-50%)}[vertical] [part=track]{height:max(calc(var(--to) - var(--from)),calc(var(--from) - var(--to)));left:0;top:min(var(--from),var(--to));width:100%}`,u`[part~=handle]{left:var(--handle);top:0}[vertical] [part~=handle]{left:0;top:var(--handle)}`)],k);var b=k;export{k as Range,b as default};
2
2
  //# sourceMappingURL=component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../../src/src/web-components/range/component.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","Range","SuperInput","constructor","this","min","max","vertical","__focusStack","range","Array","isArray","value","rangeValue","padValue","len","miss","length","fill","concat","attributeChangedCallback","name","_old","super","_ranger","Ranger","step","observedRecord","omit","render","from","Math","to","gap","diff","html","attr","disabled","_handleMousedownRoot","joinDeclarations","map","index","loop","_renderHandle","end","lastFocus","push","handleItem","_handles","item","focus","__keydownEvent","events","document","createKeydownEvent","blurHandle","e","old","key","preventDefault","createSetValue","createMouseDown","focusHandle","createMousedownListener","normalizeValue","normalize","newValue","dispatchCustomEvent","_computeValue","reduce","acc","abs","set","mouseMoveCallback","stopPropagation","move","createMousemoveListener","add","stop","remove","restrict","callback","call","isNullable","default","sort","toSorted","a","b","Number","prototype","type","property","Boolean","reflect","part","__decorate","queryAll","state","godown","styles","css","cssGlobalVars","active","input","passive","Range$1"],"mappings":"sbAkBA,MAAMA,EAAY,QACZC,EAAWC,EAAYF,GA2G7B,IAAMG,EAAN,MAAMA,cAAiDC,EAAvD,WAAAC,uBAKEC,KAAGC,IAAG,EAMND,KAAGE,IAAG,IAYNF,KAAQG,UAAG,EA0BHH,KAAYI,aAAa,GAEjC,SAAIC,GACF,OAAOC,MAAMC,QAAQP,KAAKQ,OAM5B,cAAIC,GACF,OAAQT,KAAKK,MAAQL,KAAKQ,MAAQ,CAACR,KAAKQ,OAM1C,QAAAE,CAASC,EAAaH,EAAQ,GAC5B,MAAMC,WAAEA,GAAeT,KACjBY,EAAOD,EAAMF,EAAWI,OAC9B,OAAID,EAAO,EACF,IAAIN,MAAMM,GAAME,KAAKN,GAAOO,OAAON,GAErCA,EAGT,wBAAAO,CAAyBC,EAAcC,EAAqBV,GAC1DW,MAAMH,yBAAyBC,EA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MAAAR,KAAAgF,SAMEhF,KAAOgF,UAAwBhF,KAAAQ,yBAGpBR,KAAAgF,QAET,IAAAC,GACF,OAACjF,KAAAQ,MAAAR,KAAAkF,WAGO,QAAAA,GACR,OAAIlF,KAAQK,MACA,IAAAL,KAAYQ,aAAK,CAAA2E,EAAAC,IAAAD,EAAAC,4BAKpBC,UACJxF,EAAAyF,UAAI,WAAiB,QAE1B,CAAAC,KAAAF,UACAxF,EAAAyF,UAAY,WAAS,KACvB,CAEAE,EAAK,CAAAD,KAAAF,UACHxF,EAAAyF,UAAU,iBACZ,CAEAE,EAAI,CAAAD,KAAAE,QAAAC,SAAA,OACKJ,UAAK,qBACd,CAEAE,EAAQ,CAAAD,KAAAjF,SACNT,EAAAyF,UAAc,aAAE,QAEhB,CAAAC,KAAAjF,WACOgF,UAAK,eAAK,KACnB,CACDK,EAAA,SAzSC9F,EAAAyF,UAAA,aAAA,GADCM,EAAA,CACOC,EAAA,kBAMRhG,EAAAyF,UAAA,gBAAA,GADCM,EAAA,CACSE,KAMVjG,EAAAyF,UAAA,iBAAA,GADCzF,EAAA+F,EAAe,CACHG,EAAArG,GAMbsG,EAAAC,CAAA,SAAAtG,wBAAAuG,EAAAC,WAAAxG,uBAAAA,iBAAAuG,EAAAE,+BAAAF,EAAAG,oCAAA1G,uFAAAA,2FAAAA,uCAAAA,iFAAAA,iHAAAuG,EAAAC,0RAAAD,EAAAC,8CAAAD,EAAAE,0FAAAzG,uHAAAsG,CAAA,uCAAAtG,gNAAAsG,CAAA,iGAAiB,IAAAK,EAAAzG"}
1
+ {"version":3,"file":"component.js","sources":["../../src/web-components/range/component.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","Range","SuperInput","constructor","this","min","max","vertical","__focusStack","range","Array","isArray","value","rangeValue","padValue","len","miss","length","fill","concat","attributeChangedCallback","name","_old","super","_ranger","Ranger","step","observedRecord","omit","render","from","Math","to","gap","diff","html","attr","disabled","_handleMousedownRoot","joinDeclarations","map","index","loop","_renderHandle","end","lastFocus","splice","indexOfFocusStack","push","handleItem","_handles","item","focus","__keydownEvent","blurHandle","undefined","events","remove","document","e","key","preventDefault","createSetValue","old","focusHandle","createMousedownListener","newValue","normalizeValue","dispatchCustomEvent","_computeValue","clientX","clientY","top","left","height","width","_root","getBoundingClientRect","present","reduce","acc","abs","set","mouseMoveCallback","stopPropagation","move","createMousemoveListener","add","stop","callback","call","round","reset","default","sort","toSorted","a","b","type","Number","prototype","property","Boolean","reflect","__decorate","queryPart","queryAll","state","godown","styles","css","cssGlobalVars","active","passive","background","Range$1"],"mappings":"2bAkBA,MAAMA,EAAY,QACZC,EAAWC,EAAYF,GAwG7B,IAAMG,EAAN,MAAMA,cAAiDC,EAAvD,WAAAC,uBAKEC,KAAGC,IAAG,EAMND,KAAGE,IAAG,IAYNF,KAAQG,UAAG,EA0BHH,KAAYI,aAAa,GAEjC,SAAIC,GACF,OAAOC,MAAMC,QAAQP,KAAKQ,OAM5B,cAAIC,GACF,OAAQT,KAAKK,MAAQL,KAAKQ,MAAQ,CAACR,KAAKQ,OAM1C,QAAAE,CAASC,EAAaH,EAAQ,GAC5B,MAAMC,WAAEA,GAAeT,KACjBY,EAAOD,EAAMF,EAAWI,OAC9B,OAAID,EAAO,EACF,IAAIN,MAAMM,GAAME,KAAKN,GAAOO,OAAON,GAErCA,EAGT,wBAAAO,CAAyBC,EAAcC,EAAqBV,GAC1DW,MAAMH,yBAAyBC,EAAMC,EAAMV,GAC9B,QAATS,GAA2B,QAATA,GAA2B,SAATA,IACtCjB,KAAKoB,QAAU,IAAIC,EAAOrB,KAAKC,IAAKD,KAAKE,IAAKF,KAAKsB,OAIvD,kBAAIC,GACF,OAAOC,EAAKL,MAAMI,eAAgB,aAG1B,MAAAE,GACR,MAAMhB,EAAaT,KAAKU,SAAS,GAC3BgB,EAAOC,KAAK1B,OAAOQ,GACnBmB,EAAKD,KAAKzB,OAAOO,GACjBoB,EAAM7B,KAAKoB,QAAQU,KAEzB,OAAOC,CAAI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B,CACA,QAAAA,GACA,OAAI3F,oBACcQ,OAAYkF,MAAA,CAACE,EAAEC,IAAAD,EAAAC,IAE/B7F,KAAAQ,aAGF,CAAAsF,KAAAC,UACAlG,EAAAmG,UAAY,WAAS,KACvB,CAEAC,EAAK,CAAAH,KAAAC,UACHlG,EAAAmG,UAAU,gBACZ,CAEAC,EAAI,CAAAH,KAAAC,YACKC,UAAK,YAAM,KACpB,CAEAC,EAAQ,CAAAH,KAAAI,QAAAC,SAAA,KACNtG,EAAAmG,UAAc,gBAAE,QAEhB,CAAAF,KAAAxF,WACO0F,UAAK,aAAK,KACnB,CACDC,EAAA,CAAAH,KAAAxF,SAtSCT,EAAAmG,UAAA,eAAA,GADCI,EAAA,CACOC,EAAA,SAMRxG,EAAAmG,UAAA,aAAA,GADCI,EAAA,CACSE,EAAA,kBAMVzG,EAAAmG,UAAA,gBAAA,GADCI,EAAA,CACYG,KAMb1G,EAAAmG,UAAA,iBAAA,KADSI,EAAO,CACCI,EAAA9G,GAQjB+G,EAAAC,CAAA,SAAA/G,uBAAAA,qBAAAA,2BAAAgH,EAAAC,0BAAAD,EAAAE,qCAAAlH,gSAAAA,ySAAAgH,EAAAG,mHAAAnH,qHAAA+G,CAAA,uCAAA/G,gNAAA+G,CAAA,gGADC7G,GACQ,IAAAkH,EAAAlH"}
@@ -1 +1 @@
1
- {"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../src/web-components/range/definition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,gBAAgB,CAAC;AAInC,eAAe,KAAK,CAAC;AAErB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,KAAK,CAAC;KACvB;CACF"}
1
+ {"version":3,"file":"definition.d.ts","sourceRoot":"__source__/","sources":["web-components/range/definition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,gBAAgB,CAAC;AAInC,eAAe,KAAK,CAAC;AAErB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,KAAK,CAAC;KACvB;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"definition.js","sources":["../../src/src/web-components/range/definition.ts"],"sourcesContent":null,"names":["Range","define"],"mappings":"8BAEAA,EAAMC"}
1
+ {"version":3,"file":"definition.js","sources":["../../src/web-components/range/definition.ts"],"sourcesContent":null,"names":["Range","define"],"mappings":"8BAEAA,EAAMC"}
@@ -1 +1 @@
1
- {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/web-components/rotate/component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAErD,OAAO,EAAE,WAAW,EAAe,MAAM,gCAAgC,CAAC;AAK1E;;;;GAIG;AACH,cA+BM,MAAO,SAAQ,WAAW;IAE9B,SAAS,CAAC,KAAK,EAAE,WAAW,CAAC;IAE7B,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;IAcrC,KAAK,IAAI,IAAI;IAKb,SAAS,CAAC,aAAa,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI;IAM5C;;;;;;;;;OASG;IACH,SAAS,CAAC,cAAc,CAAC,CAAC,EAAE,UAAU,GAAG;QACvC,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;KACjB;CAUF;AAED,eAAe,MAAM,CAAC;AACtB,OAAO,EAAE,MAAM,EAAE,CAAC"}
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"__source__/","sources":["web-components/rotate/component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAErD,OAAO,EAAE,WAAW,EAAe,MAAM,gCAAgC,CAAC;AAK1E;;;;GAIG;AACH,cA+BM,MAAO,SAAQ,WAAW;IAE9B,SAAS,CAAC,KAAK,EAAE,WAAW,CAAC;IAE7B,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;IAcrC,KAAK,IAAI,IAAI;IAKb,SAAS,CAAC,aAAa,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI;IAM5C;;;;;;;;;OASG;IACH,SAAS,CAAC,cAAc,CAAC,CAAC,EAAE,UAAU,GAAG;QACvC,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;KACjB;CAUF;AAED,eAAe,MAAM,CAAC;AACtB,OAAO,EAAE,MAAM,EAAE,CAAC"}
@@ -1,2 +1,2 @@
1
- import{__decorate as t}from"tslib";import{part as o,godown as e,styles as r,htmlSlot as i}from"@godown/element";import{css as s,html as n}from"lit";import{scopePrefix as a,GlobalStyle as l}from"../../internal/global-style.js";const d="rotate",p=a(d);let m=class Rotate extends l{render(){return n`<div part="root"> <div part="slot" @mousemove="${this._handleRotate}"> ${i()} </div> <i @mouseleave="${this.reset}"></i> </div>`}reset(){this._root.style.removeProperty("transform"),this._root.style.removeProperty("transition")}_handleRotate(t){const{rotateX:o,rotateY:e}=this._computeOffset(t);this._root.style.setProperty("transform",`rotateX(${o}rad) rotateY(${e}rad)`),this._root.style.setProperty("transition","0s")}_computeOffset(t){const{left:o,top:e,width:r,height:i}=this._root.getBoundingClientRect(),{clientX:s,clientY:n}=t;return{rotateX:-(n-e-i/2)/i/2,rotateY:(s-o-r/2)/r/2}}};t([o("root")],m.prototype,"_root",void 0),m=t([e(d),r(s`:host{display:block;transition:all .5s ease-in-out;width:-moz-fit-content;width:fit-content;${p}--padding:.75em;${p}--offset:.5em}div{position:relative;transition:inherit;transition-property:transform}i{box-sizing:content-box;height:100%;margin:calc(var(${p}--offset)*-1);padding:var(${p}--offset);position:absolute;top:0;width:100%}[part=slot]{z-index:2}`)],m);var f=m;export{m as Rotate,f as default};
1
+ import{__decorate as t}from"tslib";import{queryPart as o,godown as e,styles as r,htmlSlot as i}from"@godown/element";import{css as s,html as n}from"lit";import{scopePrefix as a,GlobalStyle as l}from"../../internal/global-style.js";const d="rotate",p=a(d);let m=class Rotate extends l{render(){return n`<div part="root"> <div part="slot" @mousemove="${this._handleRotate}"> ${i()} </div> <i @mouseleave="${this.reset}"></i> </div>`}reset(){this._root.style.removeProperty("transform"),this._root.style.removeProperty("transition")}_handleRotate(t){const{rotateX:o,rotateY:e}=this._computeOffset(t);this._root.style.setProperty("transform",`rotateX(${o}rad) rotateY(${e}rad)`),this._root.style.setProperty("transition","0s")}_computeOffset(t){const{left:o,top:e,width:r,height:i}=this._root.getBoundingClientRect(),{clientX:s,clientY:n}=t;return{rotateX:-(n-e-i/2)/i/2,rotateY:(s-o-r/2)/r/2}}};t([o("root")],m.prototype,"_root",void 0),m=t([e(d),r(s`:host{display:block;transition:all .5s ease-in-out;width:-moz-fit-content;width:fit-content;${p}--padding:.75em;${p}--offset:.5em}div{position:relative;transition:inherit;transition-property:transform}i{box-sizing:content-box;height:100%;margin:calc(var(${p}--offset)*-1);padding:var(${p}--offset);position:absolute;top:0;width:100%}[part=slot]{z-index:2}`)],m);var f=m;export{m as Rotate,f as default};
2
2
  //# sourceMappingURL=component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../../src/src/web-components/rotate/component.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","Rotate","GlobalStyle","render","html","this","_handleRotate","htmlSlot","reset","_root","style","removeProperty","e","setProperty","rotateX","rotateY","_computeOffset","__decorate","part","prototype","godown","styles","css","Rotate$1"],"mappings":"kOAKA,MAAMA,EAAY,SACZC,EAAWC,EAAYF,GAsC7B,IAAMG,EAAN,MAAMA,eAAeC,EAIT,MAAAC,GACR,OAAOC,CAAI,kDAAAC,KAAAC,mBAAAC,8BAAAF,KAAAG,0EAISH,KAAAI,MAAAC,MAAAC,eAAkB,cAE9B,aAAAL,CAAAM,qDAEcP,KAAAI,MAAAC,MAAAG,YAAU,YAAA,WAAAC,iBAAAC,yDAgBlC,cAAAC,CAAAJ,0JAUUK,EAAA,CAIRC,EAAA,SACAjB,EAAAkB,UAAe,gBACflB,EAAAgB,EAAa,CACbG,EAAAtB,GAEAuB,EAAAC,CAAa,+FAAuCvB,oBAAAA,8IAAAA,8BAAAA,yEACpDE,GACA,IAAAsB,EAAOtB"}
1
+ {"version":3,"file":"component.js","sources":["../../src/web-components/rotate/component.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","Rotate","GlobalStyle","render","html","this","_handleRotate","htmlSlot","reset","_root","style","removeProperty","e","setProperty","rotateX","rotateY","_computeOffset","__decorate","queryPart","prototype","godown","styles","css","Rotate$1"],"mappings":"uOAKA,MAAMA,EAAY,SACZC,EAAWC,EAAYF,GAsC7B,IAAMG,EAAN,MAAMA,eAAeC,EAIT,MAAAC,GACR,OAAOC,CAAI,kDAAAC,KAAAC,mBAAAC,8BAAAF,KAAAG,0EAISH,KAAAI,MAAAC,MAAAC,eAAkB,cAE9B,aAAAL,CAAAM,qDAEcP,KAAAI,MAAAC,MAAAG,YAAU,YAAA,WAAAC,iBAAAC,yDAgBlC,cAAAC,CAAAJ,0JAUUK,EAAA,CAIRC,EAAM,SACNjB,EAAAkB,UAAe,gBACflB,EAAAgB,EAAa,CACbG,EAAAtB,GAEAuB,EAAAC,CAAa,+FAAuCvB,oBAAAA,8IAAAA,8BAAAA,yEACpDE,GACA,IAAAsB,EAAOtB"}
@@ -1 +1 @@
1
- {"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../src/web-components/rotate/definition.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,gBAAgB,CAAC;AAIpC,eAAe,MAAM,CAAC;AAEtB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,eAAe,EAAE,MAAM,CAAC;KACzB;CACF"}
1
+ {"version":3,"file":"definition.d.ts","sourceRoot":"__source__/","sources":["web-components/rotate/definition.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,gBAAgB,CAAC;AAIpC,eAAe,MAAM,CAAC;AAEtB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,eAAe,EAAE,MAAM,CAAC;KACzB;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"definition.js","sources":["../../src/src/web-components/rotate/definition.ts"],"sourcesContent":null,"names":["Rotate","define"],"mappings":"8BAEAA,EAAOC"}
1
+ {"version":3,"file":"definition.js","sources":["../../src/web-components/rotate/definition.ts"],"sourcesContent":null,"names":["Rotate","define"],"mappings":"8BAEAA,EAAOC"}
@@ -1 +1 @@
1
- {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/web-components/router/component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAkC,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,cAAc,EAAO,MAAM,KAAK,CAAC;AAGtE,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,UAAU,UAAU;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,UAAU,WAAY,SAAQ,UAAU;IACtC,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,UAAU,SAAS;IACjB,CAAC,GAAG,EAAE,WAAW,GAAG,OAAO,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,UAAU,KAAK,OAAO,CAAC;IACzC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,QAAA,MAAM,WAAW;;;;CAIP,CAAC;AAEX,KAAK,UAAU,GAAG,MAAM,OAAO,WAAW,CAAC;AAI3C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,cAMM,MAAO,SAAQ,WAAW;IAC9B,MAAM,CAAC,eAAe,EAAE,GAAG,CAAC,MAAM,CAAC,CAAqB;IAExD,OAAO,CAAC,gBAAgB,CAA8B;IACtD,OAAO,CAAC,kBAAkB,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,MAAM,CAAqB;IAErC;;OAEG;IAEH,OAAO,EAAE,cAAc,CAAc;IAErC;;;;;;OAMG;IAEH,IAAI,EAAE,UAAU,CAAsB;IAEtC;;;;OAIG;IAEH,KAAK,UAAS;IAEd,IACI,MAAM,CAAC,KAAK,EAKF,SAAS,EAAE,AALT,EAGf;IAED,IAAI,MAAM,IAAI,SAAS,EAAE,CAExB;IAED,KAAK,IAAI,IAAI;IAIb,SAAS,CAAC,MAAM,IAAI,OAAO;IAsB3B,iBAAiB,IAAI,IAAI;IAczB,oBAAoB,IAAI,IAAI;IAK5B,SAAS,IAAI,WAAW;IASxB,SAAS,CAAC,OAAO,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,IAAI,CAAC,GAAG,IAAI;IAWlE;;OAEG;IACH,cAAc,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO;IAoBvC;;OAEG;IACH,gBAAgB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,cAAc,CAAC,CAAC,CAAC;IAiBnD;;OAEG;IACH,oBAAoB,IAAI,IAAI;IAQ5B;;OAEG;IACH,kBAAkB,CAAC,KAAK,EAAE,OAAO,IAAI,CAAC,MAAM,GAAG,IAAI;IAQnD,MAAM,CAAC,SAAS,IAAI,IAAI;IAMxB,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS;IAInC,cAAc,EAAE,MAAM,IAAI,CAEvB;CACJ;AAED,eAAe,MAAM,CAAC;AACtB,OAAO,EAAE,MAAM,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../../src/src/web-components/router/component.ts"],"sourcesContent":null,"names":["routerTypes","Router","Router_1","GlobalStyle","constructor","this","__fieldRouteTree","RouteTree","__slottedRouteTree","__cacheRecord","Map","component","pathname","location","default","htmlSlot","type","cache","handlePopstate","events","add","window","params","path","parseParams","routes","value","__routes","collectFieldRoutes","clear","render","cached","get","fieldComponent","slottedComponent","connectedCallback","super","routerInstances","observers","MutationObserver","collectSlottedRoutes","attributes","attributeFilter","subtree","disconnectedCallback","delete","useRouter","updated","changedProperties","has","ur","set","dispatchCustomEvent","query","search","pattern","route","find","r","omit","slottedPaths","_slottedNames","s","forEach","slotName","insert","updateAll","i","Set","__decorate","state","prototype","property","Boolean","godown","styles","css"],"mappings":"oRAuBA,MAAMA,EACG,QADHA,EAEK,UAFLA,EAGI,SAmCV,IAAMC,EAAMC,EAAZ,MAAMD,eAAeE,EAArB,WAAAC,uBAGUC,KAAAC,iBAA8B,IAAIC,EAClCF,KAAAG,mBAAgC,IAAID,EACpCF,KAAAI,cAAgB,IAAIC,IAO5BL,KAASM,UAA6B,KAsBtCN,KAAAO,SAAmBC,SAASD,SAM5BP,KAAOS,QAAmBC,IAU1BV,KAAAW,KAAmBhB,EAQnBK,KAAKY,OAAG,EAwJRZ,KAAAa,eAA6Bb,KAAKc,OAAOC,IAAIC,OAAQ,YAAY,KAC/DhB,KAAKO,SAAWC,SAASD,QAAQ,IAlMnC,UAAIU,GACF,OAAKjB,KAAKkB,KAGHhB,EAAUiB,YAAYnB,KAAKO,SAAUP,KAAKkB,MAFxC,CAAE,EA0Cb,UAAIE,CAAOC,GACTrB,KAAKsB,SAAWD,EAChBrB,KAAKuB,mBAAmBF,GAG1B,UAAID,GACF,OAAOpB,KAAKsB,SAGd,KAAAE,GACExB,KAAKI,cAAcoB,QAGX,MAAAC,GACR,IAAIC,EAMJ,GALI1B,KAAKY,QAAUc,EAAS1B,KAAKI,cAAcuB,IAAI3B,KAAKO,aACtDP,KAAKM,UAAYoB,EAAOpB,UACxBN,KAAKkB,KAAOQ,EAAOR,KACnBlB,KAAKO,SAAWmB,EAAOnB,WAEpBmB,EACH,OAAQ1B,KAAKW,MACX,KAAKhB,EACHK,KAAKM,UAAYN,KAAK4B,iBACtB,MACF,KAAKjC,EACHK,KAAKM,UAAYN,KAAK6B,mBACtB,MACF,QACE7B,KAAKM,UAAYN,KAAK4B,kBAAoB5B,KAAK6B,mBAGrD,OAAO7B,KAA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nC,KAAKG,mBAAqB,IAAID,EAC9BF,KAAKwB,QACLxB,KAAKwD,cAAcE,SAASC,IAC1B3D,KAAKG,mBAAmByD,OAAOD,EAAS,IAO5C,kBAAApC,CAAmBF,GACjBrB,KAAKC,iBAAmB,IAAIC,EAC5BF,KAAKwB,QACLH,EAAMqC,SAAQ,EAAGxC,WACflB,KAAKC,iBAAiB2D,OAAO1C,EAAK,IAItC,gBAAO2C,GACL7D,KAAKgC,gBAAgB0B,SAASI,IAC5BA,EAAEjD,gBAAgB,IAItB,MAAAoC,CAAO1C,GACL,OAAOP,KAAKC,iBAAiBgD,OAAO1C,IAAaP,KAAKG,mBAAmB8C,OAAO1C,KA9M3EX,EAAAoC,gBAA+B,IAAI+B,IAW1CC,EAAA,CADCC,KAC0CrE,EAAAsE,UAAA,iBAAA,GAgB3CF,EAAA,CADCC,KACarE,EAAAsE,UAAA,YAAA,GAMdF,EAAA,CADCG,KACoCvE,EAAAsE,UAAA,gBAAA,GAMrCF,EAAA,CADCC,KACoCrE,EAAAsE,UAAA,eAAA,GAUrCF,EAAA,CADCG,KACqCvE,EAAAsE,UAAA,YAAA,GAQtCF,EAAA,CADCG,EAAS,CAAExD,KAAMyD,WACJxE,EAAAsE,UAAA,aAAA,GAGdF,EAAA,CADCC,KAIArE,EAAAsE,UAAA,SAAA,MAhEGtE,EAAMC,EAAAmE,EAAA,CANXK,EAxBiB,UAyBjBC,EAAOC,CAAG"}
1
+ {"version":3,"file":"component.js","sources":["../../src/web-components/router/component.ts"],"sourcesContent":null,"names":["routerTypes","Router","Router_1","GlobalStyle","constructor","this","__fieldRouteTree","RouteTree","__slottedRouteTree","__cacheRecord","Map","component","pathname","location","default","htmlSlot","type","cache","handlePopstate","events","add","window","params","path","parseParams","routes","value","__routes","collectFieldRoutes","clear","render","cached","get","fieldComponent","slottedComponent","connectedCallback","super","routerInstances","observers","MutationObserver","collectSlottedRoutes","attributes","attributeFilter","subtree","disconnectedCallback","delete","useRouter","updated","changedProperties","has","ur","set","dispatchCustomEvent","query","search","pattern","route","find","r","omit","slottedPaths","_slottedNames","s","forEach","slotName","insert","updateAll","i","Set","__decorate","state","prototype","property","Boolean","godown","styles","css"],"mappings":"oRAuBA,MAAMA,EACG,QADHA,EAEK,UAFLA,EAGI,SAmCV,IAAMC,EAAMC,EAAZ,MAAMD,eAAeE,EAArB,WAAAC,uBAGUC,KAAAC,iBAA8B,IAAIC,EAClCF,KAAAG,mBAAgC,IAAID,EACpCF,KAAAI,cAAgB,IAAIC,IAO5BL,KAASM,UAA6B,KAsBtCN,KAAAO,SAAmBC,SAASD,SAM5BP,KAAOS,QAAmBC,IAU1BV,KAAAW,KAAmBhB,EAQnBK,KAAKY,OAAG,EAwJRZ,KAAAa,eAA6Bb,KAAKc,OAAOC,IAAIC,OAAQ,YAAY,KAC/DhB,KAAKO,SAAWC,SAASD,QAAQ,IAlMnC,UAAIU,GACF,OAAKjB,KAAKkB,KAGHhB,EAAUiB,YAAYnB,KAAKO,SAAUP,KAAKkB,MAFxC,CAAE,EA0Cb,UAAIE,CAAOC,GACTrB,KAAKsB,SAAWD,EAChBrB,KAAKuB,mBAAmBF,GAG1B,UAAID,GACF,OAAOpB,KAAKsB,SAGd,KAAAE,GACExB,KAAKI,cAAcoB,QAGX,MAAAC,GACR,IAAIC,EAMJ,GALI1B,KAAKY,QAAUc,EAAS1B,KAAKI,cAAcuB,IAAI3B,KAAKO,aACtDP,KAAKM,UAAYoB,EAAOpB,UACxBN,KAAKkB,KAAOQ,EAAOR,KACnBlB,KAAKO,SAAWmB,EAAOnB,WAEpBmB,EACH,OAAQ1B,KAAKW,MACX,KAAKhB,EACHK,KAAKM,UAAYN,KAAK4B,iBACtB,MACF,KAAKjC,EACHK,KAAKM,UAAYN,KAAK6B,mBACtB,MACF,QACE7B,KAAKM,UAAYN,KAAK4B,kBAAoB5B,KAAK6B,mBAGrD,OAAO7B,KAAKM,WAAaN,KAAKS,QAGhC,iBAAAqB,GACEC,MAAMD,oBACNjC,EAAO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cE,SAASC,IAC1B3D,KAAKG,mBAAmByD,OAAOD,EAAS,IAO5C,kBAAApC,CAAmBF,GACjBrB,KAAKC,iBAAmB,IAAIC,EAC5BF,KAAKwB,QACLH,EAAMqC,SAAQ,EAAGxC,WACflB,KAAKC,iBAAiB2D,OAAO1C,EAAK,IAItC,gBAAO2C,GACL7D,KAAKgC,gBAAgB0B,SAASI,IAC5BA,EAAEjD,gBAAgB,IAItB,MAAAoC,CAAO1C,GACL,OAAOP,KAAKC,iBAAiBgD,OAAO1C,IAAaP,KAAKG,mBAAmB8C,OAAO1C,KA9M3EX,EAAAoC,gBAA+B,IAAI+B,IAW1CC,EAAA,CADCC,KAC0CrE,EAAAsE,UAAA,iBAAA,GAgB3CF,EAAA,CADCC,KACarE,EAAAsE,UAAA,YAAA,GAMdF,EAAA,CADCG,KACoCvE,EAAAsE,UAAA,gBAAA,GAMrCF,EAAA,CADCC,KACoCrE,EAAAsE,UAAA,eAAA,GAUrCF,EAAA,CADCG,KACqCvE,EAAAsE,UAAA,YAAA,GAQtCF,EAAA,CADCG,EAAS,CAAExD,KAAMyD,WACJxE,EAAAsE,UAAA,aAAA,GAGdF,EAAA,CADCC,KAIArE,EAAAsE,UAAA,SAAA,MAhEGtE,EAAMC,EAAAmE,EAAA,CANXK,EAxBiB,UAyBjBC,EAAOC,CAAG"}
@@ -1 +1 @@
1
- {"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../src/web-components/router/definition.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,gBAAgB,CAAC;AAIpC,eAAe,MAAM,CAAC;AAEtB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,eAAe,EAAE,MAAM,CAAC;KACzB;CACF"}
1
+ {"version":3,"file":"definition.d.ts","sourceRoot":"__source__/","sources":["web-components/router/definition.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,gBAAgB,CAAC;AAIpC,eAAe,MAAM,CAAC;AAEtB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,eAAe,EAAE,MAAM,CAAC;KACzB;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"definition.js","sources":["../../src/src/web-components/router/definition.ts"],"sourcesContent":null,"names":["Router","define"],"mappings":"8BAEAA,EAAOC"}
1
+ {"version":3,"file":"definition.js","sources":["../../src/web-components/router/definition.ts"],"sourcesContent":null,"names":["Router","define"],"mappings":"8BAEAA,EAAOC"}
@@ -11,7 +11,7 @@ import { type DirectionCardinalY } from "../../internal/direction.js";
11
11
  *
12
12
  * Multi-selected state looks the same as single-selected.
13
13
  *
14
- * Input will filter the element.
14
+ * Input will filter the options.
15
15
  *
16
16
  * @fires input - Fires when the input value changes.
17
17
  * @fires change - Fires when the input value changes.
@@ -36,6 +36,7 @@ declare class Select extends Input {
36
36
  private __store;
37
37
  get observedRecord(): Record<string, any>;
38
38
  protected render(): TemplateResult<1>;
39
+ protected _renderSuffix(): TemplateResult<1>;
39
40
  protected _handleFocus(): void;
40
41
  protected firstUpdated(): void;
41
42
  protected _connectedInit(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/web-components/select/component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAwC,MAAM,iBAAiB,CAAC;AAE1F,OAAO,EAAE,KAAK,cAAc,EAAsB,MAAM,KAAK,CAAC;AAG9D,OAAO,KAAK,MAAM,uBAAuB,CAAC;AAE1C,OAAO,EAAE,KAAK,kBAAkB,EAAwB,MAAM,6BAA6B,CAAC;AAyB5F;;;;;;;;;;;;;;;;GAgBG;AACH,cAwBM,MAAO,SAAQ,KAAK;IAExB,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAEzB;;OAEG;IAEH,IAAI,EAAE,MAAM,CAAC;IAGb,SAAS,CAAC,QAAQ,EAAE,WAAW,CAAC;IAGhC,SAAS,EAAE,kBAAkB,CAAC;IAG9B,QAAQ,UAAS;IA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AAE,YAAY,GAAG,IAAI;IAKnC,IAAI,IAAI,IAAI;IAMZ,WAAW,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM;CAGzC;AAED,eAAe,MAAM,CAAC;AACtB,OAAO,EAAE,MAAM,EAAE,CAAC"}
@@ -1,2 +1,2 @@
1
- import{__decorate as t}from"tslib";import{part as e,godown as i,styles as o,attr as s,htmlSlot as l}from"@godown/element";import n from"@godown/f7-icon/icons/chevron-down.js";import{css as r,nothing as h,html as a}from"lit";import{property as c,state as u}from"lit/decorators.js";import p from"../input/component.js";import{cssGlobalVars as d}from"../../internal/global-style.js";import{directionOutsetPlace as f}from"../../internal/direction.js";function v(t,e){return t&&e&&t.toLowerCase().includes(e.toLowerCase())}function m(t,e){if(t){const i="checked";e?t.setAttribute(i,""):t.removeAttribute(i)}}let b=class Select extends p{constructor(){super(...arguments),this.multiple=!1,this.visible=!1,this.autoDirection="bottom",this.__store=[]}get observedRecord(){return{...super.observedRecord,direction:this.direction||this.autoDirection}}render(){return a`<div part="root" ${s(this.observedRecord)} class="input-field"> ${[this._renderPrefix(),a`<input part="input" type="${this.type}" .value="${this.text}" ?autofocus="${this.autofocus}" ?disabled="${this.disabled}" autocapitalize="${this.autocapitalize||h}" autocomplete="${this.autocomplete||h}" placeholder="${this.placeholder||h}" id="${this.makeId}" @focus="${this._handleFocus}" @input="${this._handleInput}" @change="${this._handleChange}"/>`,a`<label for="${this.makeId}" part="suffix"> <i part="icon">${n()}</i> </label>`,a`<label for="${this.makeId}" part="content" direction-outset-place> ${l()} </label>`]} </div>`}_handleFocus(){if(!this.direction){const{top:t,bottom:e}=this.getBoundingClientRect();window.innerHeight-e<this._content.clientHeight&&t>this._content.clientHeight?this.autoDirection="top":this.autoDirection="bottom"}this.visible=!0}firstUpdated(){this.events.add(this._content,"click",(t=>{t.preventDefault(),t.stopPropagation();const{target:e}=t,i=this.optionValue(e);if(i){const t=this.select(i,e.textContent);this.multiple||m(this.lastChecked,0),m(e,t),this.lastChecked=e}this._input.focus()})),this.events.add(document,"click",(t=>{t.stopPropagation();const e=t.composedPath()[0];e&&!this.shadowRoot.contains(e)&&this.blur()}))}_connectedInit(){if(!this.value){const t=[...this.querySelectorAll("[checked]")];(this.multiple?t:t.length?[this.lastChecked=t[0]]:[]).forEach((t=>{m(t,this.select(this.optionValue(t),t.textContent))})),this.default=this.value,this.defaultText=this.text,this.defaultChecked=t}this.text||(this.text="")}reset(){this.value=this.default,this.text=this.defaultText,this.querySelectorAll("[checked]").forEach((t=>m(t,0))),this.defaultChecked.forEach((t=>m(t,1)))}select(t,e){e||=t,e=e.trim();let i=0;if(this.multiple){const o=this.__store.findIndex((e=>e.value===t));o>-1?this.__store.splice(o,1):(this.__store.push({value:t,text:e}),i=1),this.value=this.__store.map((t=>t.value)),this.text=this.__store.map((t=>t.text)).join(", ")}else this.value===t?(this.value="",this.text=""):(this.value=t,this.text=e,i=1);return this.dispatchCustomEvent("select",this.value),this.filter(),i}filter(t){t=t?.trim(),[...this.children].forEach((e=>{this.filterCallback(e,!t||v(this.optionValue(e),t)||v(e.textContent,t),t)}))}filterCallback(t,e,i){t.style.display=e?"":"none"}_handleInput(t){if(t.stopPropagation(),this.compositing)return;const e=this._input.value;this.filter(this.multiple?function(t,e,i){const o=e.slice(0,t).lastIndexOf(i)+1||0,s=e.indexOf(i,t)||e.length;return e.slice(o,s)}(this._input.selectionStart,e,","):e),this.dispatchCustomEvent("input",this.value,{bubbles:!0})}focus(t){this._input.focus(t),this.visible=!0}blur(){this._input.blur(),this.visible=!1,super.blur()}optionValue(t){return t.value||t.getAttribute("value")||""}};t([c()],b.prototype,"text",void 0),t([e("content")],b.prototype,"_content",void 0),t([c()],b.prototype,"direction",void 0),t([c({type:Boolean})],b.prototype,"multiple",void 0),t([c({type:Boolean})],b.prototype,"visible",void 0),t([u()],b.prototype,"autoDirection",void 0),b=t([i("select"),o(f,r`.outline,:host(:focus-within){${d.input}-outline-color:var(${d.active})}[part=input]{text-overflow:ellipsis}[part=content]{position:absolute;visibility:hidden;width:100%}[visible] [part=content]{visibility:visible}`)],b);var _=b;export{b as Select,_ as default};
1
+ import{__decorate as t}from"tslib";import{queryPart as e,godown as i,styles as o,attr as s,htmlSlot as n}from"@godown/element";import l from"../../internal/icons/caret-down.js";import{css as r,nothing as h,html as a}from"lit";import{property as c,state as u}from"lit/decorators.js";import p from"../input/component.js";import{cssGlobalVars as d}from"../../internal/global-style.js";import{directionOutsetPlace as f}from"../../internal/direction.js";function v(t,e){return t&&e&&t.toLowerCase().includes(e.toLowerCase())}function m(t,e){if(t){const i="checked";e?t.setAttribute(i,""):t.removeAttribute(i)}}let b=class Select extends p{constructor(){super(...arguments),this.multiple=!1,this.visible=!1,this.autoDirection="bottom",this.__store=[]}get observedRecord(){return{...super.observedRecord,direction:this.direction||this.autoDirection}}render(){return a`<label part="root" ${s(this.observedRecord)}> ${[this._renderPrefix(),a`<input part="input" type="${this.type}" .value="${this.text}" ?autofocus="${this.autofocus}" ?disabled="${this.disabled}" autocapitalize="${this.autocapitalize||h}" autocomplete="${this.autocomplete||h}" placeholder="${this.placeholder||h}" @focus="${this._handleFocus}" @input="${this._handleInput}" @change="${this._handleChange}"/>`,this._renderSuffix(),a`<label part="content" direction-outset-place> ${n()} </label>`]} </label>`}_renderSuffix(){return a`<i part="suffix icon">${l()}</i>`}_handleFocus(){if(!this.direction){const{top:t,bottom:e}=this.getBoundingClientRect();window.innerHeight-e<this._content.clientHeight&&t>this._content.clientHeight?this.autoDirection="top":this.autoDirection="bottom"}this.visible=!0}firstUpdated(){this.events.add(this._content,"click",(t=>{t.preventDefault(),t.stopPropagation();const{target:e}=t,i=this.optionValue(e);if(i){const t=this.select(i,e.textContent);this.multiple||m(this.lastChecked,0),m(e,t),this.lastChecked=e}this._input.focus()})),this.events.add(document,"click",(t=>{t.stopPropagation();const e=t.composedPath()[0];e&&!this.shadowRoot.contains(e)&&this.blur()}))}_connectedInit(){if(!this.value){const t=[...this.querySelectorAll("[checked]")];(this.multiple?t:t.length?[this.lastChecked=t[0]]:[]).forEach((t=>{m(t,this.select(this.optionValue(t),t.textContent))})),this.default=this.value,this.defaultText=this.text,this.defaultChecked=t}this.text||(this.text="")}reset(){this.value=this.default,this.text=this.defaultText,this.querySelectorAll("[checked]").forEach((t=>m(t,0))),this.defaultChecked.forEach((t=>m(t,1)))}select(t,e){e||=t,e=e.trim();let i=0;if(this.multiple){const o=this.__store.findIndex((e=>e.value===t));o>-1?this.__store.splice(o,1):(this.__store.push({value:t,text:e}),i=1),this.value=this.__store.map((t=>t.value)),this.text=this.__store.map((t=>t.text)).join(", ")}else this.value===t?(this.value="",this.text=""):(this.value=t,this.text=e,i=1);return this.dispatchCustomEvent("select",this.value),this.filter(),i}filter(t){t=t?.trim(),[...this.children].forEach((e=>{this.filterCallback(e,!t||v(this.optionValue(e),t)||v(e.textContent,t),t)}))}filterCallback(t,e,i){t.style.display=e?"":"none"}_handleInput(t){if(t.stopPropagation(),this.compositing)return;const e=this._input.value;this.filter(this.multiple?function(t,e,i){const o=e.slice(0,t).lastIndexOf(i)+1||0,s=e.indexOf(i,t)||e.length;return e.slice(o,s)}(this._input.selectionStart,e,","):e),this.dispatchCustomEvent("input",this.value,{bubbles:!0})}focus(t){this._input.focus(t),this.visible=!0}blur(){this._input.blur(),this.visible=!1,super.blur()}optionValue(t){return t.value||t.getAttribute("value")||""}};t([c()],b.prototype,"text",void 0),t([e("content")],b.prototype,"_content",void 0),t([c()],b.prototype,"direction",void 0),t([c({type:Boolean})],b.prototype,"multiple",void 0),t([c({type:Boolean})],b.prototype,"visible",void 0),t([u()],b.prototype,"autoDirection",void 0),b=t([i("select"),o(f,r`.outline,:host(:focus-within){${d.input}-outline-color:currentColor}[part=input]{text-overflow:ellipsis}[part=content]{position:absolute;visibility:hidden;width:100%}[visible] [part=content]{visibility:visible}`)],b);var _=b;export{b as Select,_ as default};
2
2
  //# sourceMappingURL=component.js.map