godown 3.0.0-canary.15 → 3.0.0-canary.16

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 (311) hide show
  1. package/alert.js +1 -1
  2. package/alert.js.map +1 -1
  3. package/avatar.js +1 -1
  4. package/avatar.js.map +1 -1
  5. package/breath.js +1 -1
  6. package/breath.js.map +1 -1
  7. package/button.js +1 -1
  8. package/button.js.map +1 -1
  9. package/card.js +1 -1
  10. package/card.js.map +1 -1
  11. package/carousel.js +1 -1
  12. package/carousel.js.map +1 -1
  13. package/components/alert.d.ts +2 -0
  14. package/components/alert.d.ts.map +1 -1
  15. package/components/alert.js +1 -1
  16. package/components/alert.js.map +1 -1
  17. package/components/avatar.d.ts +1 -0
  18. package/components/avatar.d.ts.map +1 -1
  19. package/components/avatar.js +1 -1
  20. package/components/breath.d.ts +1 -0
  21. package/components/breath.d.ts.map +1 -1
  22. package/components/breath.js +1 -1
  23. package/components/button.d.ts +1 -0
  24. package/components/button.d.ts.map +1 -1
  25. package/components/button.js +1 -1
  26. package/components/card.d.ts +1 -0
  27. package/components/card.d.ts.map +1 -1
  28. package/components/card.js +1 -1
  29. package/components/carousel.d.ts +2 -0
  30. package/components/carousel.d.ts.map +1 -1
  31. package/components/carousel.js +1 -1
  32. package/components/carousel.js.map +1 -1
  33. package/components/details.d.ts +2 -1
  34. package/components/details.d.ts.map +1 -1
  35. package/components/details.js +1 -1
  36. package/components/dialog.d.ts +2 -0
  37. package/components/dialog.d.ts.map +1 -1
  38. package/components/dialog.js +1 -1
  39. package/components/dialog.js.map +1 -1
  40. package/components/divider.d.ts +1 -0
  41. package/components/divider.d.ts.map +1 -1
  42. package/components/divider.js +1 -1
  43. package/components/dragbox.d.ts +1 -0
  44. package/components/dragbox.d.ts.map +1 -1
  45. package/components/dragbox.js +1 -1
  46. package/components/flex.d.ts +1 -0
  47. package/components/flex.d.ts.map +1 -1
  48. package/components/flex.js +1 -1
  49. package/components/form.d.ts +1 -0
  50. package/components/form.d.ts.map +1 -1
  51. package/components/form.js +1 -1
  52. package/components/grid.d.ts +1 -0
  53. package/components/grid.d.ts.map +1 -1
  54. package/components/grid.js +1 -1
  55. package/components/input.d.ts +3 -0
  56. package/components/input.d.ts.map +1 -1
  57. package/components/input.js +1 -1
  58. package/components/input.js.map +1 -1
  59. package/components/layout.d.ts +4 -3
  60. package/components/layout.d.ts.map +1 -1
  61. package/components/layout.js +1 -1
  62. package/components/layout.js.map +1 -1
  63. package/components/link.d.ts +1 -0
  64. package/components/link.d.ts.map +1 -1
  65. package/components/link.js +1 -1
  66. package/components/progress.d.ts +1 -0
  67. package/components/progress.d.ts.map +1 -1
  68. package/components/progress.js +1 -1
  69. package/components/range.d.ts +6 -2
  70. package/components/range.d.ts.map +1 -1
  71. package/components/range.js +1 -1
  72. package/components/range.js.map +1 -1
  73. package/components/rotate.d.ts +1 -0
  74. package/components/rotate.d.ts.map +1 -1
  75. package/components/rotate.js +1 -1
  76. package/components/router.d.ts +1 -0
  77. package/components/router.d.ts.map +1 -1
  78. package/components/router.js +1 -1
  79. package/components/select.d.ts +4 -0
  80. package/components/select.d.ts.map +1 -1
  81. package/components/select.js +1 -1
  82. package/components/select.js.map +1 -1
  83. package/components/skeleton.d.ts +1 -0
  84. package/components/skeleton.d.ts.map +1 -1
  85. package/components/skeleton.js +1 -1
  86. package/components/split.d.ts +5 -1
  87. package/components/split.d.ts.map +1 -1
  88. package/components/split.js +1 -1
  89. package/components/split.js.map +1 -1
  90. package/components/switch.d.ts +2 -0
  91. package/components/switch.d.ts.map +1 -1
  92. package/components/switch.js +1 -1
  93. package/components/switch.js.map +1 -1
  94. package/components/text.d.ts +1 -0
  95. package/components/text.d.ts.map +1 -1
  96. package/components/text.js +1 -1
  97. package/components/time.d.ts +2 -0
  98. package/components/time.d.ts.map +1 -1
  99. package/components/time.js +1 -1
  100. package/components/time.js.map +1 -1
  101. package/components/tooltip.d.ts +1 -0
  102. package/components/tooltip.d.ts.map +1 -1
  103. package/components/tooltip.js +1 -1
  104. package/components/typewriter.d.ts +1 -0
  105. package/components/typewriter.d.ts.map +1 -1
  106. package/components/typewriter.js +1 -1
  107. package/core/global-style.d.ts.map +1 -1
  108. package/core/global-style.js +1 -1
  109. package/core/global-style.js.map +1 -1
  110. package/core/super-input.d.ts.map +1 -1
  111. package/core/super-input.js +1 -1
  112. package/core/super-input.js.map +1 -1
  113. package/core/super-openable.js +1 -1
  114. package/core/super-openable.js.map +1 -1
  115. package/custom-elements.json +1 -1
  116. package/details.js +1 -1
  117. package/details.js.map +1 -1
  118. package/dev/components/alert.d.ts +2 -0
  119. package/dev/components/alert.d.ts.map +1 -1
  120. package/dev/components/alert.js +2 -0
  121. package/dev/components/alert.js.map +1 -1
  122. package/dev/components/avatar.d.ts +1 -0
  123. package/dev/components/avatar.d.ts.map +1 -1
  124. package/dev/components/avatar.js +1 -0
  125. package/dev/components/avatar.js.map +1 -1
  126. package/dev/components/breath.d.ts +1 -0
  127. package/dev/components/breath.d.ts.map +1 -1
  128. package/dev/components/breath.js +1 -0
  129. package/dev/components/breath.js.map +1 -1
  130. package/dev/components/button.d.ts +1 -0
  131. package/dev/components/button.d.ts.map +1 -1
  132. package/dev/components/button.js +1 -0
  133. package/dev/components/button.js.map +1 -1
  134. package/dev/components/card.d.ts +1 -0
  135. package/dev/components/card.d.ts.map +1 -1
  136. package/dev/components/card.js +1 -0
  137. package/dev/components/card.js.map +1 -1
  138. package/dev/components/carousel.d.ts +2 -0
  139. package/dev/components/carousel.d.ts.map +1 -1
  140. package/dev/components/carousel.js +3 -0
  141. package/dev/components/carousel.js.map +1 -1
  142. package/dev/components/details.d.ts +2 -1
  143. package/dev/components/details.d.ts.map +1 -1
  144. package/dev/components/details.js +2 -1
  145. package/dev/components/details.js.map +1 -1
  146. package/dev/components/dialog.d.ts +2 -0
  147. package/dev/components/dialog.d.ts.map +1 -1
  148. package/dev/components/dialog.js +2 -0
  149. package/dev/components/dialog.js.map +1 -1
  150. package/dev/components/divider.d.ts +1 -0
  151. package/dev/components/divider.d.ts.map +1 -1
  152. package/dev/components/divider.js +1 -0
  153. package/dev/components/divider.js.map +1 -1
  154. package/dev/components/dragbox.d.ts +1 -0
  155. package/dev/components/dragbox.d.ts.map +1 -1
  156. package/dev/components/dragbox.js +1 -0
  157. package/dev/components/dragbox.js.map +1 -1
  158. package/dev/components/flex.d.ts +1 -0
  159. package/dev/components/flex.d.ts.map +1 -1
  160. package/dev/components/flex.js +1 -0
  161. package/dev/components/flex.js.map +1 -1
  162. package/dev/components/form.d.ts +1 -0
  163. package/dev/components/form.d.ts.map +1 -1
  164. package/dev/components/form.js +1 -0
  165. package/dev/components/form.js.map +1 -1
  166. package/dev/components/grid.d.ts +1 -0
  167. package/dev/components/grid.d.ts.map +1 -1
  168. package/dev/components/grid.js +1 -0
  169. package/dev/components/grid.js.map +1 -1
  170. package/dev/components/input.d.ts +3 -0
  171. package/dev/components/input.d.ts.map +1 -1
  172. package/dev/components/input.js +3 -0
  173. package/dev/components/input.js.map +1 -1
  174. package/dev/components/layout.d.ts +4 -3
  175. package/dev/components/layout.d.ts.map +1 -1
  176. package/dev/components/layout.js +9 -8
  177. package/dev/components/layout.js.map +1 -1
  178. package/dev/components/link.d.ts +1 -0
  179. package/dev/components/link.d.ts.map +1 -1
  180. package/dev/components/link.js +1 -0
  181. package/dev/components/link.js.map +1 -1
  182. package/dev/components/progress.d.ts +1 -0
  183. package/dev/components/progress.d.ts.map +1 -1
  184. package/dev/components/progress.js +1 -0
  185. package/dev/components/progress.js.map +1 -1
  186. package/dev/components/range.d.ts +6 -2
  187. package/dev/components/range.d.ts.map +1 -1
  188. package/dev/components/range.js +9 -8
  189. package/dev/components/range.js.map +1 -1
  190. package/dev/components/rotate.d.ts +1 -0
  191. package/dev/components/rotate.d.ts.map +1 -1
  192. package/dev/components/rotate.js +1 -0
  193. package/dev/components/rotate.js.map +1 -1
  194. package/dev/components/router.d.ts +1 -0
  195. package/dev/components/router.d.ts.map +1 -1
  196. package/dev/components/router.js +1 -0
  197. package/dev/components/router.js.map +1 -1
  198. package/dev/components/select.d.ts +4 -0
  199. package/dev/components/select.d.ts.map +1 -1
  200. package/dev/components/select.js +7 -2
  201. package/dev/components/select.js.map +1 -1
  202. package/dev/components/skeleton.d.ts +1 -0
  203. package/dev/components/skeleton.d.ts.map +1 -1
  204. package/dev/components/skeleton.js +1 -0
  205. package/dev/components/skeleton.js.map +1 -1
  206. package/dev/components/split.d.ts +5 -1
  207. package/dev/components/split.d.ts.map +1 -1
  208. package/dev/components/split.js +7 -2
  209. package/dev/components/split.js.map +1 -1
  210. package/dev/components/switch.d.ts +2 -0
  211. package/dev/components/switch.d.ts.map +1 -1
  212. package/dev/components/switch.js +2 -1
  213. package/dev/components/switch.js.map +1 -1
  214. package/dev/components/text.d.ts +1 -0
  215. package/dev/components/text.d.ts.map +1 -1
  216. package/dev/components/text.js +1 -0
  217. package/dev/components/text.js.map +1 -1
  218. package/dev/components/time.d.ts +2 -0
  219. package/dev/components/time.d.ts.map +1 -1
  220. package/dev/components/time.js +4 -1
  221. package/dev/components/time.js.map +1 -1
  222. package/dev/components/tooltip.d.ts +1 -0
  223. package/dev/components/tooltip.d.ts.map +1 -1
  224. package/dev/components/tooltip.js +1 -0
  225. package/dev/components/tooltip.js.map +1 -1
  226. package/dev/components/typewriter.d.ts +1 -0
  227. package/dev/components/typewriter.d.ts.map +1 -1
  228. package/dev/components/typewriter.js +1 -0
  229. package/dev/components/typewriter.js.map +1 -1
  230. package/dev/core/global-style.d.ts.map +1 -1
  231. package/dev/core/global-style.js +1 -3
  232. package/dev/core/global-style.js.map +1 -1
  233. package/dev/core/super-input.d.ts.map +1 -1
  234. package/dev/core/super-input.js +1 -0
  235. package/dev/core/super-input.js.map +1 -1
  236. package/dev/core/super-openable.js +1 -1
  237. package/dev/core/super-openable.js.map +1 -1
  238. package/dialog.js +1 -1
  239. package/dialog.js.map +1 -1
  240. package/divider.js +1 -1
  241. package/divider.js.map +1 -1
  242. package/dragbox.js +1 -1
  243. package/dragbox.js.map +1 -1
  244. package/flex.js +1 -1
  245. package/flex.js.map +1 -1
  246. package/form.js +1 -1
  247. package/form.js.map +1 -1
  248. package/grid.js +1 -1
  249. package/grid.js.map +1 -1
  250. package/input.js +1 -1
  251. package/input.js.map +1 -1
  252. package/layout.js +1 -1
  253. package/layout.js.map +1 -1
  254. package/link.js +1 -1
  255. package/link.js.map +1 -1
  256. package/package.json +3 -3
  257. package/progress.js +1 -1
  258. package/progress.js.map +1 -1
  259. package/range.js +1 -1
  260. package/range.js.map +1 -1
  261. package/rotate.js +1 -1
  262. package/rotate.js.map +1 -1
  263. package/router.js +1 -1
  264. package/router.js.map +1 -1
  265. package/select.js +1 -1
  266. package/select.js.map +1 -1
  267. package/skeleton.js +1 -1
  268. package/skeleton.js.map +1 -1
  269. package/src/components/alert.ts +2 -0
  270. package/src/components/avatar.ts +1 -0
  271. package/src/components/breath.ts +1 -0
  272. package/src/components/button.ts +1 -0
  273. package/src/components/card.ts +1 -0
  274. package/src/components/carousel.ts +3 -0
  275. package/src/components/details.ts +2 -1
  276. package/src/components/dialog.ts +2 -0
  277. package/src/components/divider.ts +1 -0
  278. package/src/components/dragbox.ts +1 -0
  279. package/src/components/flex.ts +1 -0
  280. package/src/components/form.ts +1 -0
  281. package/src/components/grid.ts +1 -0
  282. package/src/components/input.ts +3 -0
  283. package/src/components/layout.ts +4 -3
  284. package/src/components/link.ts +1 -0
  285. package/src/components/progress.ts +1 -0
  286. package/src/components/range.ts +9 -10
  287. package/src/components/rotate.ts +1 -0
  288. package/src/components/router.ts +1 -0
  289. package/src/components/select.ts +7 -2
  290. package/src/components/skeleton.ts +1 -0
  291. package/src/components/split.ts +8 -3
  292. package/src/components/switch.ts +2 -1
  293. package/src/components/text.ts +1 -0
  294. package/src/components/time.ts +4 -1
  295. package/src/components/tooltip.ts +1 -0
  296. package/src/components/typewriter.ts +1 -0
  297. package/src/core/global-style.ts +1 -4
  298. package/src/core/super-input.ts +1 -0
  299. package/src/core/super-openable.ts +1 -1
  300. package/switch.js +1 -1
  301. package/switch.js.map +1 -1
  302. package/text.js +1 -1
  303. package/text.js.map +1 -1
  304. package/time.js +1 -1
  305. package/time.js.map +1 -1
  306. package/tooltip.js +1 -1
  307. package/tooltip.js.map +1 -1
  308. package/typewriter.js +1 -1
  309. package/typewriter.js.map +1 -1
  310. package/vscode.html-custom-data.json +1 -1
  311. package/web-types.json +1 -1
@@ -54,3 +54,4 @@ class Divider extends GlobalStyle {
54
54
  }
55
55
 
56
56
  export default Divider;
57
+ export { Divider };
@@ -133,3 +133,4 @@ class Dragbox extends GlobalStyle {
133
133
  }
134
134
 
135
135
  export default Dragbox;
136
+ export { Dragbox };
@@ -82,3 +82,4 @@ class Flex extends GlobalStyle {
82
82
  }
83
83
 
84
84
  export default Flex;
85
+ export { Flex };
@@ -80,3 +80,4 @@ class Form<T = object> extends GlobalStyle {
80
80
  }
81
81
 
82
82
  export default Form;
83
+ export { Form };
@@ -87,3 +87,4 @@ class Grid extends GlobalStyle {
87
87
  }
88
88
 
89
89
  export default Grid;
90
+ export { Grid };
@@ -14,6 +14,8 @@ const protoName = "input";
14
14
  /**
15
15
  * {@linkcode Input} renders a text input.
16
16
  *
17
+ * @fires input - Fires when the input value changes.
18
+ * @fires change - Fires when the input value changes.
17
19
  * @category input
18
20
  */
19
21
  @godown(protoName)
@@ -71,3 +73,4 @@ class Input extends SuperInput {
71
73
  }
72
74
 
73
75
  export default Input;
76
+ export { Input };
@@ -10,7 +10,7 @@ import { GlobalStyle } from "../core/global-style.js";
10
10
  const protoName = "layout";
11
11
 
12
12
  /**
13
- * {@linkcode NavLayout} renders slot and optional top header, bottom footer.
13
+ * {@linkcode Layout} renders slot and optional top header, bottom footer.
14
14
  *
15
15
  * @slot - The main content of the layout.
16
16
  * @slot header - The header of the layout.
@@ -50,7 +50,7 @@ const protoName = "layout";
50
50
  }
51
51
  `,
52
52
  )
53
- class NavLayout extends GlobalStyle {
53
+ class Layout extends GlobalStyle {
54
54
  /**
55
55
  * If true, remove the header slot.
56
56
  */
@@ -78,4 +78,5 @@ class NavLayout extends GlobalStyle {
78
78
  }
79
79
  }
80
80
 
81
- export default NavLayout;
81
+ export default Layout;
82
+ export { Layout };
@@ -44,3 +44,4 @@ class Link extends SuperAnchor {
44
44
  }
45
45
 
46
46
  export default Link;
47
+ export { Link };
@@ -100,3 +100,4 @@ class Progress extends GlobalStyle {
100
100
  }
101
101
 
102
102
  export default Progress;
103
+ export { Progress };
@@ -21,6 +21,11 @@ const cssScope = scopePrefix(protoName);
21
21
  *
22
22
  * Number has 1 handle, the array has the number of its elements and the minimum is 2.
23
23
  *
24
+ * @fires input - Fires when the input value changes.
25
+ * @fires change - Fires when the input value changes.
26
+ * @fires range - Fires when the value changes.
27
+ * @fires focus - Fires when the handle is focused.
28
+ * @fires blur - Fires when the handle is blurred.
24
29
  * @category input
25
30
  */
26
31
  @godown(protoName)
@@ -260,11 +265,13 @@ class Range extends SuperInput {
260
265
  if (!this._keydownEvent) {
261
266
  this._keydownEvent = this.events.add(document, "keydown", this.createKeydownEvent(index));
262
267
  }
268
+ this.dispatchEvent(new CustomEvent("focus", { detail: index }));
263
269
  }
264
270
 
265
271
  blurHandle(): void {
266
272
  this.lastFocus = undefined;
267
273
  this._keydownEvent = this.events.remove(document, "keydown", this._keydownEvent);
274
+ this.dispatchEvent(new CustomEvent("blur"));
268
275
  }
269
276
 
270
277
  protected createKeydownEvent(index: number) {
@@ -289,12 +296,6 @@ class Range extends SuperInput {
289
296
  };
290
297
  }
291
298
 
292
- protected _handleMousedownEnd(e: MouseEvent): void {
293
- this.lastFocus = 0;
294
- this.createMousedownListener(this.setEnd)(e);
295
- this.focusHandle(0);
296
- }
297
-
298
299
  createSetValue(index: number) {
299
300
  return (numberOrModifier: number | ((value: number) => number)): void => {
300
301
  const number = typeof numberOrModifier === "number"
@@ -306,13 +307,10 @@ class Range extends SuperInput {
306
307
  newValue[index] = number;
307
308
  }
308
309
  this.value = newValue;
310
+ this.dispatchEvent(new CustomEvent("range", { detail: this.value }));
309
311
  };
310
312
  }
311
313
 
312
- setEnd(value: number): void {
313
- this.createSetValue((this.value as any)?.length - 1 || 0)(value);
314
- }
315
-
316
314
  /**
317
315
  * Compute value from event.
318
316
  */
@@ -402,3 +400,4 @@ class Range extends SuperInput {
402
400
  }
403
401
 
404
402
  export default Range;
403
+ export { Range };
@@ -93,3 +93,4 @@ class Rotate extends GlobalStyle {
93
93
  }
94
94
 
95
95
  export default Rotate;
96
+ export { Rotate };
@@ -275,3 +275,4 @@ class Router extends GlobalStyle {
275
275
  }
276
276
 
277
277
  export default Router;
278
+ export { Router };
@@ -45,6 +45,9 @@ const protoName = "select";
45
45
  *
46
46
  * Input will filter the element.
47
47
  *
48
+ * @fires input - Fires when the input value changes.
49
+ * @fires change - Fires when the input value changes.
50
+ * @fires select - Fires when select an option.
48
51
  * @slot - Options.
49
52
  * @category input
50
53
  */
@@ -229,7 +232,7 @@ class Select extends Input {
229
232
  operation = 1;
230
233
  }
231
234
  }
232
- this.dispatchEvent(new CustomEvent("change", { detail: this.namevalue() }));
235
+ this.dispatchEvent(new CustomEvent("select", { detail: this.value, composed: true }));
233
236
  this.filter();
234
237
  return operation;
235
238
  }
@@ -259,7 +262,8 @@ class Select extends Input {
259
262
  }
260
263
  const s = this._input.value;
261
264
  this.filter(this.multiple ? betweenAt(this._input.selectionStart, s, ",") : s);
262
- this.dispatchEvent(new CustomEvent("input", { detail: this.namevalue() }));
265
+ this.dispatchEvent(new CustomEvent("input", { detail: this.value, composed: true, bubbles: true }));
266
+ this.dispatchEvent(new CustomEvent("change", { detail: this.value, composed: true }));
263
267
  }
264
268
 
265
269
  focus(options?: FocusOptions): void {
@@ -279,3 +283,4 @@ class Select extends Input {
279
283
  }
280
284
 
281
285
  export default Select;
286
+ export { Select };
@@ -118,3 +118,4 @@ class Skeleton extends GlobalStyle {
118
118
  }
119
119
 
120
120
  export default Skeleton;
121
+ export { Skeleton };
@@ -2,7 +2,7 @@ import { godown } from "@godown/element/decorators/godown.js";
2
2
  import { styles } from "@godown/element/decorators/styles.js";
3
3
  import { attr } from "@godown/element/directives/attr.js";
4
4
  import { classList } from "@godown/element/directives/class-list.js";
5
- import { type HandlerEvent } from "@godown/element/element.js";
5
+ import type { HandlerEvent } from "@godown/element/element.js";
6
6
  import { css, html, nothing, type TemplateResult } from "lit";
7
7
  import { property, state } from "lit/decorators.js";
8
8
 
@@ -27,6 +27,10 @@ const loop = <T>(len: number, fn: (index?: number) => T) => {
27
27
  *
28
28
  * Delete: will move the focus box forward until the first and no inputs for each.
29
29
  *
30
+ * @fires input - Fires when the input value changes.
31
+ * @fires change - Fires when the input value changes.
32
+ * @fires focus - Fires when the input is focused.
33
+ * @fires blur - Fires when the input is blurred.
30
34
  * @category input
31
35
  */
32
36
  @godown(protoName)
@@ -137,8 +141,7 @@ class Split extends SuperInput {
137
141
  this.fillInput(e.data);
138
142
  this.value = this.currentValue.join("");
139
143
 
140
- this.dispatchEvent(new CustomEvent("input", { detail: this.value, bubbles: true, composed: true }));
141
- this.dispatchEvent(new CustomEvent("change", { detail: this.value, composed: true }));
144
+ this.dispatchEvent(new CustomEvent("input", { detail: this.value, composed: true, bubbles: true }));
142
145
  }
143
146
 
144
147
  /**
@@ -208,12 +211,14 @@ class Split extends SuperInput {
208
211
  focusAt(i: number): void {
209
212
  this.current = i;
210
213
  this._input.focus();
214
+ this.dispatchEvent(new CustomEvent("focus", { detail: i, bubbles: true, composed: true }));
211
215
  }
212
216
 
213
217
  blur(): void {
214
218
  this._input.blur();
215
219
  this.current = -1;
216
220
  super.blur();
221
+ this.dispatchEvent(new CustomEvent("blur", { bubbles: true, composed: true }));
217
222
  }
218
223
 
219
224
  reset(): void {
@@ -16,6 +16,7 @@ const cssScope = scopePrefix(protoName);
16
16
  * The switch is rectangular by default,
17
17
  * set the round property to rounded switch.
18
18
  *
19
+ * @fires change - Fires when the switch is switched.
19
20
  * @category input
20
21
  */
21
22
  @godown(protoName)
@@ -166,7 +167,6 @@ class Switch extends SuperInput {
166
167
 
167
168
  protected _handleChange(): void {
168
169
  this.checked = this._input.checked;
169
- this.dispatchEvent(new CustomEvent("input", { detail: this.checked, bubbles: true, composed: true }));
170
170
  this.dispatchEvent(new CustomEvent("change", { detail: this.checked, composed: true }));
171
171
  }
172
172
 
@@ -176,3 +176,4 @@ class Switch extends SuperInput {
176
176
  }
177
177
 
178
178
  export default Switch;
179
+ export { Switch };
@@ -89,3 +89,4 @@ class Text extends GlobalStyle {
89
89
  }
90
90
 
91
91
  export default Text;
92
+ export { Text };
@@ -12,6 +12,7 @@ const protoName = "time";
12
12
  /**
13
13
  * {@linkcode Time} renders a formatting time.
14
14
  *
15
+ * @fires time - Fires when the time changes.
15
16
  * @category display
16
17
  */
17
18
  @godown(protoName)
@@ -50,7 +51,7 @@ class Time extends GlobalStyle {
50
51
  protected timeoutId: number;
51
52
 
52
53
  protected render(): TemplateResult<1> {
53
- return html`<span part="root" ${attr(this.observedRecord)}> ${fmtime(this.format, this.time, this.escape)} </span>`;
54
+ return html`<span part="root" ${attr(this.observedRecord)}>${fmtime(this.format, this.time, this.escape)}</span>`;
54
55
  }
55
56
 
56
57
  protected firstUpdated(): void {
@@ -74,9 +75,11 @@ class Time extends GlobalStyle {
74
75
 
75
76
  startTimeout(): number {
76
77
  return window.setInterval(() => {
78
+ this.dispatchEvent(new CustomEvent("time", { detail: this.time, composed: true }));
77
79
  this.time = new Date(this.time.getTime() + (this.gap || this.timeout));
78
80
  }, Math.abs(this.timeout));
79
81
  }
80
82
  }
81
83
 
82
84
  export default Time;
85
+ export { Time };
@@ -143,3 +143,4 @@ class Tooltip extends SuperOpenable {
143
143
  }
144
144
 
145
145
  export default Tooltip;
146
+ export { Tooltip };
@@ -159,3 +159,4 @@ class Typewriter extends GlobalStyle {
159
159
  }
160
160
 
161
161
  export default Typewriter;
162
+ export { Typewriter };
@@ -1,13 +1,10 @@
1
1
  import { type Gradients, presetsRGB } from "@godown/colors/presets-rgb.js";
2
2
  import { travel } from "@godown/colors/travel.js";
3
3
  import GodownElement from "@godown/element";
4
- import GodownConfig from "@godown/element/config.js";
5
4
  import { joinProperties } from "@godown/element/tools/css.js";
6
5
  import { trim } from "@godown/element/tools/lib.js";
7
6
  import { css, type CSSResult, unsafeCSS } from "lit";
8
7
 
9
- GodownElement.godownConfig ||= new GodownConfig();
10
-
11
8
  export class GlobalStyle extends GodownElement {
12
9
  }
13
10
 
@@ -101,5 +98,5 @@ GlobalStyle.styles = [
101
98
  all: inherit;
102
99
  display: revert;
103
100
  }
104
- `,
101
+ `,
105
102
  ];
@@ -148,6 +148,7 @@ class SuperInput extends GlobalStyle {
148
148
  composed: true,
149
149
  }),
150
150
  );
151
+ this.dispatchEvent(new CustomEvent("input", { detail: this.value, composed: true, bubbles: true }));
151
152
  this.dispatchEvent(new CustomEvent("change", { detail: this.value, composed: true }));
152
153
  }
153
154
 
@@ -25,7 +25,7 @@ class SuperOpenable extends GlobalStyle {
25
25
  protected updated(changedProperties: PropertyValueMap<this>): void {
26
26
  const open = changedProperties.get("open");
27
27
  if (open !== undefined) {
28
- this.dispatchEvent(new CustomEvent("change", { detail: this.open }));
28
+ this.dispatchEvent(new CustomEvent("change", { detail: this.open, composed: true }));
29
29
  }
30
30
  }
31
31
 
package/switch.js CHANGED
@@ -1,2 +1,2 @@
1
- import e from"./components/switch.js";e.define();export{e as default};
1
+ import o from"./components/switch.js";export{Switch}from"./components/switch.js";o.define();export{o as default};
2
2
  //# sourceMappingURL=switch.js.map
package/switch.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"switch.js","sources":["src/switch.ts"],"sourcesContent":null,"names":["Switch","define"],"mappings":"sCAEAA,EAAOC"}
1
+ {"version":3,"file":"switch.js","sources":["src/switch.ts"],"sourcesContent":null,"names":["Switch","define"],"mappings":"iFAEAA,EAAOC"}
package/text.js CHANGED
@@ -1,2 +1,2 @@
1
- import e from"./components/text.js";e.define();export{e as default};
1
+ import t from"./components/text.js";export{Text}from"./components/text.js";t.define();export{t as default};
2
2
  //# sourceMappingURL=text.js.map
package/text.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"text.js","sources":["src/text.ts"],"sourcesContent":null,"names":["Text","define"],"mappings":"oCAEAA,EAAKC"}
1
+ {"version":3,"file":"text.js","sources":["src/text.ts"],"sourcesContent":null,"names":["Text","define"],"mappings":"2EAEAA,EAAKC"}
package/time.js CHANGED
@@ -1,2 +1,2 @@
1
- import e from"./components/time.js";e.define();export{e as default};
1
+ import e from"./components/time.js";export{Time}from"./components/time.js";e.define();export{e as default};
2
2
  //# sourceMappingURL=time.js.map
package/time.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"time.js","sources":["src/time.ts"],"sourcesContent":null,"names":["Time","define"],"mappings":"oCAEAA,EAAKC"}
1
+ {"version":3,"file":"time.js","sources":["src/time.ts"],"sourcesContent":null,"names":["Time","define"],"mappings":"2EAEAA,EAAKC"}
package/tooltip.js CHANGED
@@ -1,2 +1,2 @@
1
- import o from"./components/tooltip.js";o.define();export{o as default};
1
+ import o from"./components/tooltip.js";export{Tooltip}from"./components/tooltip.js";o.define();export{o as default};
2
2
  //# sourceMappingURL=tooltip.js.map
package/tooltip.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.js","sources":["src/tooltip.ts"],"sourcesContent":null,"names":["Tooltip","define"],"mappings":"uCAEAA,EAAQC"}
1
+ {"version":3,"file":"tooltip.js","sources":["src/tooltip.ts"],"sourcesContent":null,"names":["Tooltip","define"],"mappings":"oFAEAA,EAAQC"}
package/typewriter.js CHANGED
@@ -1,2 +1,2 @@
1
- import e from"./components/typewriter.js";e.define();export{e as default};
1
+ import e from"./components/typewriter.js";export{Typewriter}from"./components/typewriter.js";e.define();export{e as default};
2
2
  //# sourceMappingURL=typewriter.js.map
package/typewriter.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"typewriter.js","sources":["src/typewriter.ts"],"sourcesContent":null,"names":["Typewriter","define"],"mappings":"0CAEAA,EAAWC"}
1
+ {"version":3,"file":"typewriter.js","sources":["src/typewriter.ts"],"sourcesContent":null,"names":["Typewriter","define"],"mappings":"6FAEAA,EAAWC"}
@@ -1 +1 @@
1
- {"version":1.1,"tags":[{"name":"godown-typewriter","description":"Typewriter renders a typewriter effect to text.\n---\n### **Events:**\n ","attributes":[{"name":"text","description":"Raw text.","values":[]},{"name":"stopped","description":"Start immediately after Typewriter.firstUpdated.","values":[]},{"name":"ended","description":"If true, hide the cursor","values":[]},{"name":"max","description":"Maximum random time.","values":[]},{"name":"min","description":"Minimum random time.","values":[]},{"name":"delay","description":"Fixed time.","values":[]},{"name":"index","description":"The index at the beginning.","values":[]}],"references":[]},{"name":"godown-tooltip","description":"Tooltip provide tooltip for slot elements.\nIf it has the tip property, ignore the slot tip.\n---\n### **Events:**\n - **change**\n### **Slots:**\n - **tip** - Tip element if no `tip` provided.\n- _default_ - Content.","attributes":[{"name":"tip","description":"Tip text, if there is a value, the slot will be ignored.","values":[]},{"name":"direction","description":"Direction of opening the tip.","values":[{"name":"Direction8"}]},{"name":"align","description":"Content alignment.","values":[{"name":"center"},{"name":"flex-start"},{"name":"flex-end"},{"name":"start"},{"name":"end"}]},{"name":"propagation","description":"If true, allow penetration of the tip.","values":[]},{"name":"type","description":"How can tips be triggered.\nIf `focus`, element will be focusable, open tip when focused.\nIf `hover`, element will open tip when hovered.","values":[{"name":"hover"},{"name":"focus"}]},{"name":"open","description":"Open the content.","values":[]}],"references":[]},{"name":"godown-time","description":"Time renders a formatting time.\n---\n","attributes":[{"name":"escape","description":"Escape symbol.","values":[]},{"name":"format","description":"Format strings.","values":[]},{"name":"time","description":"Time.","values":[{"name":"Date"}]},{"name":"timeout","description":"If there is a value, update every gap or timeout.","values":[]},{"name":"gap","description":"The number of milliseconds that change with each update.","values":[]}],"references":[]},{"name":"godown-text","description":"Text renders nowrap text.\n---\n","attributes":[{"name":"underline","description":"Underline behavior.","values":[{"name":"none"},{"name":"hover"},{"name":"active"},{"name":"always"}]},{"name":"clip","description":"Set background-clip to text.","values":[]}],"references":[]},{"name":"godown-switch","description":"Switch renders a switch.\nThe switch is rectangular by default,\nset the round property to rounded switch.\n---\n### **Events:**\n - **input**\n- **change**","attributes":[{"name":"round","description":"Display rounded.","values":[]},{"name":"checked","description":"Whether this element is selected or not.","values":[]},{"name":"disabled","description":"Disable this element.","values":[]},{"name":"default","description":"Default checked state.","values":[]},{"name":"value","description":"Input value.","values":[]},{"name":"autocomplete","values":[]},{"name":"type","values":[{"name":"InputType"}]},{"name":"placeholder","values":[]},{"name":"name","values":[]}],"references":[]},{"name":"godown-split","description":"Split renders multiple input boxes.\nInput: will move the focus box backward until the complete input from start to end.\nDelete: will move the focus box forward until the first and no inputs for each.\n---\n### **Events:**\n - **input**\n- **change**\n### **Methods:**\n ","attributes":[{"name":"len","description":"The number of input boxes.","values":[]},{"name":"index","description":"Focus index.","values":[]},{"name":"autocomplete","values":[]},{"name":"disabled","values":[]},{"name":"type","values":[{"name":"InputType"}]},{"name":"placeholder","values":[]},{"name":"name","values":[]},{"name":"value","values":[]},{"name":"default","description":"default property records the default or initial value and is used to reset the input.","values":[]}],"references":[]},{"name":"godown-skeleton","description":"Skeleton renders a skeleton screen.\n---\n### **Slots:**\n - **loading** - The content if loading is true.\n- _default_ - The content if loading is false.","attributes":[{"name":"type","description":"If \"image\", render a image placeholder.","values":[{"name":"text"},{"name":"image"}]},{"name":"animation","description":"Animation type.\nopacity animation only effect on slotted element and image icon.","values":[{"name":"position"},{"name":"opacity"}]}],"references":[]},{"name":"godown-select","description":"Select is similar to `<select>`.\nElements with the value attribute/property can be used as options.\nThe checked attribute will be added to the selected element.\nMulti-selected state looks the same as single-selected.\nInput will filter the element.\n---\n### **Events:**\n - **change**\n- **input**\n### **Slots:**\n - _default_ - Options.","attributes":[{"name":"text","description":"Selected texts.","values":[]},{"name":"direction","values":[{"name":"top"},{"name":"bottom"}]},{"name":"multiple","values":[]},{"name":"visible","values":[]},{"name":"variant","description":"If outline, the outline is always present.","values":[{"name":"default"},{"name":"outline"}]},{"name":"autocomplete","values":[]},{"name":"disabled","values":[]},{"name":"type","values":[{"name":"InputType"}]},{"name":"placeholder","values":[]},{"name":"name","values":[]},{"name":"value","values":[]},{"name":"default","description":"default property records the default or initial value and is used to reset the input.","values":[]}],"references":[]},{"name":"godown-router","description":"Router has basic routing control.\nTo switch routes, use `router-link component`.\nIt has two methods to collect routes.\n1. From field `routes`, an array, each elements require \"path\" and \"component\".\n2. From child elements, which have the slot attribute for matching routes.\nIf only the method 1 is used, set `type` to `\"field\"`.\nIf only the method 2 is used, set `type` to `\"slotted\"`.\n`type` defaults to `\"united\"`, which will try method 1, then method 2.\nIf no routes are matched, the default value (no named slot) will be rendered.\n---\n### **Events:**\n - **change**\n### **Methods:**\n - **fieldComponent(query: _string_): _unknown_** - Get component from routes by query.\n- **slottedComponent(query: _string_): _TemplateResult<1>_** - Get component from slotted elements by query.\n- **collectSlottedRoutes(): _void_** - Reset the route tree, clear cache, collect routes from child elements.\n- **collectFieldRoutes(value: _typeof this.routes_): _void_** - Reset the route tree, clear cache, collect routes from value.\n### **Slots:**\n - _default_ - Display slot when there is no match.\n- ***** - Matching slot will be displayed.","attributes":[{"name":"pathname","description":"Current pathname (equals to location.pathname).","values":[]},{"name":"type","description":"The type of routing sources.\nIf field, it won't collect the slot attribute of the child elements.\nThis property should not be changed after the rendering is complete.","values":[{"name":"united"},{"name":"slotted"},{"name":"field"}]},{"name":"cache","description":"Cache accessed records.\nEmptied at each re-collection.","values":[]}],"references":[]},{"name":"godown-rotate","description":"Rotate Make child elements rotate.\n---\n### **Methods:**\n - **_computeOffset(e: _MouseEvent_): __** - Compute offset.\n```\n`rotateX(${rotateX}rad) rotateY(${rotateY}rad)`\n```","attributes":[],"references":[]},{"name":"godown-range","description":"Range is similar to `<input type=\"range\">`.\nValue accepts number, or array.\nNumber has 1 handle, the array has the number of its elements and the minimum is 2.\n---\n### **Events:**\n - **input**\n- **change**\n### **Methods:**\n \n","attributes":[{"name":"min","description":"Minimum value.","values":[]},{"name":"max","description":"Maximum value.","values":[]},{"name":"step","description":"Sliding step length.","values":[]},{"name":"vertical","description":"Display vertically.","values":[]},{"name":"value","description":"Value, or each of values, will render a handle.\nAccepts number or array of numbers.","values":[]},{"name":"default","description":"The default of `this.value`.","values":[]},{"name":"autocomplete","values":[]},{"name":"disabled","values":[]},{"name":"type","values":[{"name":"InputType"}]},{"name":"placeholder","values":[]},{"name":"name","values":[]}],"references":[]},{"name":"godown-progress","description":"Progress similar to `<progress>`.\n---\n### **Methods:**\n - **parsePercent(s: _string | number_): __** - Convert s to a percentage without a percent sign.","attributes":[{"name":"max","values":[]},{"name":"min","values":[]},{"name":"value","values":[]}],"references":[]},{"name":"godown-link","description":"Link is used for link jumping.\nSet `type` to `\"push\" `or `\"replace\"`,\nwill invoke the history api and trigger the Router.updateAll.\n---\n","attributes":[{"name":"type","description":"If \"push\", call `history.pushState`.\nIf \"replace\", call `history.replaceState`.\nIf \"normal\", behave like a normal anchor.","values":[{"name":"push"},{"name":"replace"},{"name":"normal"}]},{"name":"suppress","description":"Suppress the update of the Router.","values":[]},{"name":"href","description":"A element href.","values":[]},{"name":"target","description":"A element target.","values":[{"name":"_blank"},{"name":"_self"},{"name":"_parent"},{"name":"_top"}]}],"references":[]},{"name":"godown-input","description":"Input renders a text input.\n---\n### **Events:**\n - **input**\n- **change**","attributes":[{"name":"variant","description":"If outline, the outline is always present.","values":[{"name":"default"},{"name":"outline"}]},{"name":"autocomplete","values":[]},{"name":"disabled","values":[]},{"name":"type","values":[{"name":"InputType"}]},{"name":"placeholder","values":[]},{"name":"name","values":[]},{"name":"value","values":[]},{"name":"default","description":"default property records the default or initial value and is used to reset the input.","values":[]}],"references":[]},{"name":"godown-grid","description":"Grid provides gird layout.\n---\n### **Slots:**\n - _default_ - Grid items.","attributes":[{"name":"gap","description":"CSS property `gap`.","values":[]},{"name":"columns","description":"CSS property `grid-template-columns`.\nIf columns is numerical, divide columns equally.","values":[]},{"name":"rows","description":"CSS property `grid-template-rows`.\nIf rows is numerical, divide rows equally.","values":[]},{"name":"content","description":"CSS property `place-content` (`align-content justify-content`).","values":[]},{"name":"items","description":"CSS property `place-items` (`align-items justify-items`).","values":[]}],"references":[]},{"name":"godown-form","description":"Form Gets child element key-value object,\nwhich will be nested if the child element is the same as this element.\n---\n","attributes":[{"name":"name","values":[]}],"references":[]},{"name":"godown-flex","description":"Flex provides flex layout.\n---\n### **Slots:**\n - _default_ - Flex items.","attributes":[{"name":"flex-flow","description":"CSS property `flex-flow` (`flex-direction flex-wrap`).","values":[]},{"name":"gap","description":"CSS property `gap`.","values":[]},{"name":"content","description":"CSS property `justify-content`.","values":[]},{"name":"items","description":"CSS property `align-items`.","values":[]},{"name":"vertical","description":"If true, set flex-direction to \"column\".","values":[]}],"references":[]},{"name":"godown-dragbox","description":"Dragbox does not extend beyond the range of Dragbox.offsetsWidth and Dragbox.offsetsHeight.\n---\n","attributes":[{"name":"x","description":"Position x.","values":[]},{"name":"y","description":"Position y.","values":[]}],"references":[]},{"name":"godown-divider","description":"Divider similar to `<hr>`.\n---\n","attributes":[{"name":"vertical","description":"Vertical display.","values":[]}],"references":[]},{"name":"godown-dialog","description":"Dialog similar to `<dialog>`.\nLike dialog, it listens for submit events and closes itself when the target method is \"dialog\".\nIt listens for the keydown event and also closes itself when the key contained in the key is pressed.\n---\n### **Events:**\n - **change**","attributes":[{"name":"direction","description":"Direction of the opening animation.","values":[{"name":"Direction9"}]},{"name":"modal","description":"Enable modal, blocking event penetration.","values":[]},{"name":"key","description":"Close key.","values":[]},{"name":"open","description":"Open the content.","values":[]}],"references":[]},{"name":"godown-details","description":"Details similar to `<details>`.\n---\n### **Events:**\n - **change** - Fired when the details is toggled.\n### **Slots:**\n - **summary** - Details summary if no `summary` is provided.\n- _default_ - Details content.","attributes":[{"name":"fill","description":"If it is true, the summary event scope will fill the element.","values":[]},{"name":"summary","description":"Summary text.","values":[]},{"name":"open","description":"Open the content.","values":[]}],"references":[]},{"name":"godown-carousel","description":"Carousel make the content display as a carousel.\nWhen this component is `firstUpdated`,\nclone the first and last element and make the matching element visible when switching index.\nChild elements should maintain the same size.\nIf no width, it will be the width of the first element.\n---\n### **Slots:**\n - _default_ - Carousel items, should maintain the same size.","attributes":[{"name":"index","description":"The index of the element is displayed for the first time.","values":[]},{"name":"autoChange","description":"If autoChange > 0, the rotation will be automated.","values":[]},{"name":"width","description":"Element width.","values":[]}],"references":[]},{"name":"godown-card","description":"Card renders a card.\nThis may be similar to Layout,\nbut it needs to be specified to enable header and footer.\n---\n### **Slots:**\n - _default_ - The main content of the card.\n- **header** - The header of the card.\n- **footer** - The footer of the card.","attributes":[{"name":"footer","values":[]},{"name":"header","values":[]}],"references":[]},{"name":"godown-button","description":"Button renders a button.\nCreate modal animation upon clicking.\nAvailable colors (background): none, black, gray, white, blue, green, red, orange, pink, purple, yellow, teal.\nDefault color is `black`.\nSet the color to `none` to prevent applying styles.\n---\n","attributes":[{"name":"disabled","description":"Whether to disable this element.","values":[]},{"name":"ghost","description":"Display ghost.","values":[]},{"name":"active","description":"Whether this element is active or not.","values":[]},{"name":"round","description":"Display rounded.","values":[]},{"name":"color","description":"The primary color.","values":[{"name":"none"},{"name":"keyof typeof colors"}]},{"name":"content","description":"Content text.","values":[]}],"references":[]},{"name":"godown-breath","description":"Breath render the text with a breathing effect.\nDynamically generate a breathing effect based on the length of the split text.\nIf there is not enough CSS variable, overrun elements will use the.\ngodown was a css library in its earliest days,\nand this is the component version of its first effect.\nInspired by Vercel home page (2023).\n---\n### **Slots:**\n - _default_ - Breathing parts.","attributes":[{"name":"text","description":"Strings or array of strings,\nif array, divided each element into chunks,\notherwise split strings by whitespace.","values":[{"name":"string[]"}]},{"name":"duration","description":"Effect duration, ending in s or ms.","values":[]}],"references":[]},{"name":"godown-avatar","description":"Avatar renders a avatar.\nRenders as an image if it has a src property,\notherwise falls back to name or nameless slot.\n---\n### **Slots:**\n - _default_ - Display content if no `src` or `name` provided.","attributes":[{"name":"src","description":"Image src.","values":[]},{"name":"name","description":"If the image is not available, display name (call Avatar.format).","values":[]},{"name":"round","description":"Display rounded.","values":[]}],"references":[]},{"name":"godown-alert","description":"Alert renders a alert.\nColor defaults to blue.\n---\n### **Events:**\n - **close**\n### **Slots:**\n - _default_ - Alert content.\n- **title** - Alert title.\n- **icon** - Alert icon.","attributes":[{"name":"call","description":"If it is a legal value, the icon and preset color will be rendered.","values":[{"name":"tip"},{"name":"success"},{"name":"info"},{"name":"warning"},{"name":"danger"},{"name":"error"},{"name":"help"},{"name":"deprecated"}]},{"name":"color","description":"The tone of the component.\nOverrides the color of the call.","values":[{"name":""},{"name":"white"},{"name":"black"},{"name":"gray"},{"name":"green"},{"name":"teal"},{"name":"blue"},{"name":"red"},{"name":"purple"},{"name":"orange"},{"name":"yellow"},{"name":"pink"},{"name":"none"}]},{"name":"autoclose","description":"Close delay, if 0, it will not be closed automatically.","values":[]},{"name":"title","description":"The title is bold and the icon height is the same as it.","values":[]},{"name":"content","description":"Content, if zero value, will be rendered as an unnamed slot.","values":[]},{"name":"hideClose","description":"Set true to hide the close button.\nThe behavior may change due to the variant property.","values":[]},{"name":"variant","description":"Alert variant, if set to `blockquote`, the alert will be rendered as a blockquote.\nIf variant is `\"blockquote\"`, hide the close button.","values":[{"name":"blockquote"},{"name":"dark"},{"name":"light"}]}],"references":[]}]}
1
+ {"version":1.1,"tags":[{"name":"godown-typewriter","description":"Typewriter renders a typewriter effect to text.\n---\n### **Events:**\n ","attributes":[{"name":"text","description":"Raw text.","values":[]},{"name":"stopped","description":"Start immediately after Typewriter.firstUpdated.","values":[]},{"name":"ended","description":"If true, hide the cursor","values":[]},{"name":"max","description":"Maximum random time.","values":[]},{"name":"min","description":"Minimum random time.","values":[]},{"name":"delay","description":"Fixed time.","values":[]},{"name":"index","description":"The index at the beginning.","values":[]}],"references":[]},{"name":"godown-tooltip","description":"Tooltip provide tooltip for slot elements.\nIf it has the tip property, ignore the slot tip.\n---\n### **Events:**\n - **change**\n### **Slots:**\n - **tip** - Tip element if no `tip` provided.\n- _default_ - Content.","attributes":[{"name":"tip","description":"Tip text, if there is a value, the slot will be ignored.","values":[]},{"name":"direction","description":"Direction of opening the tip.","values":[{"name":"Direction8"}]},{"name":"align","description":"Content alignment.","values":[{"name":"center"},{"name":"flex-start"},{"name":"flex-end"},{"name":"start"},{"name":"end"}]},{"name":"propagation","description":"If true, allow penetration of the tip.","values":[]},{"name":"type","description":"How can tips be triggered.\nIf `focus`, element will be focusable, open tip when focused.\nIf `hover`, element will open tip when hovered.","values":[{"name":"hover"},{"name":"focus"}]},{"name":"open","description":"Open the content.","values":[]}],"references":[]},{"name":"godown-time","description":"Time renders a formatting time.\n---\n### **Events:**\n - **time** - Fires when the time changes.","attributes":[{"name":"escape","description":"Escape symbol.","values":[]},{"name":"format","description":"Format strings.","values":[]},{"name":"time","description":"Time.","values":[{"name":"Date"}]},{"name":"timeout","description":"If there is a value, update every gap or timeout.","values":[]},{"name":"gap","description":"The number of milliseconds that change with each update.","values":[]}],"references":[]},{"name":"godown-text","description":"Text renders nowrap text.\n---\n","attributes":[{"name":"underline","description":"Underline behavior.","values":[{"name":"none"},{"name":"hover"},{"name":"active"},{"name":"always"}]},{"name":"clip","description":"Set background-clip to text.","values":[]}],"references":[]},{"name":"godown-switch","description":"Switch renders a switch.\nThe switch is rectangular by default,\nset the round property to rounded switch.\n---\n### **Events:**\n - **change** - Fires when the switch is switched.\n- **input**","attributes":[{"name":"round","description":"Display rounded.","values":[]},{"name":"checked","description":"Whether this element is selected or not.","values":[]},{"name":"disabled","description":"Disable this element.","values":[]},{"name":"default","description":"Default checked state.","values":[]},{"name":"value","description":"Input value.","values":[]},{"name":"autocomplete","values":[]},{"name":"type","values":[{"name":"InputType"}]},{"name":"placeholder","values":[]},{"name":"name","values":[]}],"references":[]},{"name":"godown-split","description":"Split renders multiple input boxes.\nInput: will move the focus box backward until the complete input from start to end.\nDelete: will move the focus box forward until the first and no inputs for each.\n---\n### **Events:**\n - **input** - Fires when the input value changes.\n- **focus** - Fires when the input is focused.\n- **blur** - Fires when the input is blurred.\n- **change** - Fires when the input value changes.\n### **Methods:**\n ","attributes":[{"name":"len","description":"The number of input boxes.","values":[]},{"name":"index","description":"Focus index.","values":[]},{"name":"autocomplete","values":[]},{"name":"disabled","values":[]},{"name":"type","values":[{"name":"InputType"}]},{"name":"placeholder","values":[]},{"name":"name","values":[]},{"name":"value","values":[]},{"name":"default","description":"default property records the default or initial value and is used to reset the input.","values":[]}],"references":[]},{"name":"godown-skeleton","description":"Skeleton renders a skeleton screen.\n---\n### **Slots:**\n - **loading** - The content if loading is true.\n- _default_ - The content if loading is false.","attributes":[{"name":"type","description":"If \"image\", render a image placeholder.","values":[{"name":"text"},{"name":"image"}]},{"name":"animation","description":"Animation type.\nopacity animation only effect on slotted element and image icon.","values":[{"name":"position"},{"name":"opacity"}]}],"references":[]},{"name":"godown-select","description":"Select is similar to `<select>`.\nElements with the value attribute/property can be used as options.\nThe checked attribute will be added to the selected element.\nMulti-selected state looks the same as single-selected.\nInput will filter the element.\n---\n### **Events:**\n - **select** - Fires when select an option.\n- **input** - Fires when the input value changes.\n- **change** - Fires when the input value changes.\n### **Slots:**\n - _default_ - Options.","attributes":[{"name":"text","description":"Selected texts.","values":[]},{"name":"direction","values":[{"name":"top"},{"name":"bottom"}]},{"name":"multiple","values":[]},{"name":"visible","values":[]},{"name":"variant","description":"If outline, the outline is always present.","values":[{"name":"default"},{"name":"outline"}]},{"name":"autocomplete","values":[]},{"name":"disabled","values":[]},{"name":"type","values":[{"name":"InputType"}]},{"name":"placeholder","values":[]},{"name":"name","values":[]},{"name":"value","values":[]},{"name":"default","description":"default property records the default or initial value and is used to reset the input.","values":[]}],"references":[]},{"name":"godown-router","description":"Router has basic routing control.\nTo switch routes, use `router-link component`.\nIt has two methods to collect routes.\n1. From field `routes`, an array, each elements require \"path\" and \"component\".\n2. From child elements, which have the slot attribute for matching routes.\nIf only the method 1 is used, set `type` to `\"field\"`.\nIf only the method 2 is used, set `type` to `\"slotted\"`.\n`type` defaults to `\"united\"`, which will try method 1, then method 2.\nIf no routes are matched, the default value (no named slot) will be rendered.\n---\n### **Events:**\n - **change**\n### **Methods:**\n - **fieldComponent(query: _string_): _unknown_** - Get component from routes by query.\n- **slottedComponent(query: _string_): _TemplateResult<1>_** - Get component from slotted elements by query.\n- **collectSlottedRoutes(): _void_** - Reset the route tree, clear cache, collect routes from child elements.\n- **collectFieldRoutes(value: _typeof this.routes_): _void_** - Reset the route tree, clear cache, collect routes from value.\n### **Slots:**\n - _default_ - Display slot when there is no match.\n- ***** - Matching slot will be displayed.","attributes":[{"name":"pathname","description":"Current pathname (equals to location.pathname).","values":[]},{"name":"type","description":"The type of routing sources.\nIf field, it won't collect the slot attribute of the child elements.\nThis property should not be changed after the rendering is complete.","values":[{"name":"united"},{"name":"slotted"},{"name":"field"}]},{"name":"cache","description":"Cache accessed records.\nEmptied at each re-collection.","values":[]}],"references":[]},{"name":"godown-rotate","description":"Rotate Make child elements rotate.\n---\n### **Methods:**\n - **_computeOffset(e: _MouseEvent_): __** - Compute offset.\n```\n`rotateX(${rotateX}rad) rotateY(${rotateY}rad)`\n```","attributes":[],"references":[]},{"name":"godown-range","description":"Range is similar to `<input type=\"range\">`.\nValue accepts number, or array.\nNumber has 1 handle, the array has the number of its elements and the minimum is 2.\n---\n### **Events:**\n - **focus** - Fires when the handle is focused.\n- **blur** - Fires when the handle is blurred.\n- **range** - Fires when the value changes.\n- **input** - Fires when the input value changes.\n- **change** - Fires when the input value changes.\n### **Methods:**\n \n","attributes":[{"name":"min","description":"Minimum value.","values":[]},{"name":"max","description":"Maximum value.","values":[]},{"name":"step","description":"Sliding step length.","values":[]},{"name":"vertical","description":"Display vertically.","values":[]},{"name":"value","description":"Value, or each of values, will render a handle.\nAccepts number or array of numbers.","values":[]},{"name":"default","description":"The default of `this.value`.","values":[]},{"name":"autocomplete","values":[]},{"name":"disabled","values":[]},{"name":"type","values":[{"name":"InputType"}]},{"name":"placeholder","values":[]},{"name":"name","values":[]}],"references":[]},{"name":"godown-progress","description":"Progress similar to `<progress>`.\n---\n### **Methods:**\n - **parsePercent(s: _string | number_): __** - Convert s to a percentage without a percent sign.","attributes":[{"name":"max","values":[]},{"name":"min","values":[]},{"name":"value","values":[]}],"references":[]},{"name":"godown-link","description":"Link is used for link jumping.\nSet `type` to `\"push\" `or `\"replace\"`,\nwill invoke the history api and trigger the Router.updateAll.\n---\n","attributes":[{"name":"type","description":"If \"push\", call `history.pushState`.\nIf \"replace\", call `history.replaceState`.\nIf \"normal\", behave like a normal anchor.","values":[{"name":"push"},{"name":"replace"},{"name":"normal"}]},{"name":"suppress","description":"Suppress the update of the Router.","values":[]},{"name":"href","description":"A element href.","values":[]},{"name":"target","description":"A element target.","values":[{"name":"_blank"},{"name":"_self"},{"name":"_parent"},{"name":"_top"}]}],"references":[]},{"name":"godown-layout","description":"Layout renders slot and optional top header, bottom footer.\n---\n### **Slots:**\n - _default_ - The main content of the layout.\n- **header** - The header of the layout.\n- **footer** - The footer of the layout.","attributes":[{"name":"noHeader","description":"If true, remove the header slot.","values":[]},{"name":"noFooter","description":"If true, remove the footer slot.","values":[]},{"name":"sticky","description":"If true, header will sticky.","values":[]}],"references":[]},{"name":"godown-input","description":"Input renders a text input.\n---\n### **Events:**\n - **input** - Fires when the input value changes.\n- **change** - Fires when the input value changes.","attributes":[{"name":"variant","description":"If outline, the outline is always present.","values":[{"name":"default"},{"name":"outline"}]},{"name":"autocomplete","values":[]},{"name":"disabled","values":[]},{"name":"type","values":[{"name":"InputType"}]},{"name":"placeholder","values":[]},{"name":"name","values":[]},{"name":"value","values":[]},{"name":"default","description":"default property records the default or initial value and is used to reset the input.","values":[]}],"references":[]},{"name":"godown-grid","description":"Grid provides gird layout.\n---\n### **Slots:**\n - _default_ - Grid items.","attributes":[{"name":"gap","description":"CSS property `gap`.","values":[]},{"name":"columns","description":"CSS property `grid-template-columns`.\nIf columns is numerical, divide columns equally.","values":[]},{"name":"rows","description":"CSS property `grid-template-rows`.\nIf rows is numerical, divide rows equally.","values":[]},{"name":"content","description":"CSS property `place-content` (`align-content justify-content`).","values":[]},{"name":"items","description":"CSS property `place-items` (`align-items justify-items`).","values":[]}],"references":[]},{"name":"godown-form","description":"Form Gets child element key-value object,\nwhich will be nested if the child element is the same as this element.\n---\n","attributes":[{"name":"name","values":[]}],"references":[]},{"name":"godown-flex","description":"Flex provides flex layout.\n---\n### **Slots:**\n - _default_ - Flex items.","attributes":[{"name":"flex-flow","description":"CSS property `flex-flow` (`flex-direction flex-wrap`).","values":[]},{"name":"gap","description":"CSS property `gap`.","values":[]},{"name":"content","description":"CSS property `justify-content`.","values":[]},{"name":"items","description":"CSS property `align-items`.","values":[]},{"name":"vertical","description":"If true, set flex-direction to \"column\".","values":[]}],"references":[]},{"name":"godown-dragbox","description":"Dragbox does not extend beyond the range of Dragbox.offsetsWidth and Dragbox.offsetsHeight.\n---\n","attributes":[{"name":"x","description":"Position x.","values":[]},{"name":"y","description":"Position y.","values":[]}],"references":[]},{"name":"godown-divider","description":"Divider similar to `<hr>`.\n---\n","attributes":[{"name":"vertical","description":"Vertical display.","values":[]}],"references":[]},{"name":"godown-dialog","description":"Dialog similar to `<dialog>`.\nLike dialog, it listens for submit events and closes itself when the target method is \"dialog\".\nIt listens for the keydown event and also closes itself when the key contained in the key is pressed.\n---\n### **Events:**\n - **change** - Fires when the open changes.","attributes":[{"name":"direction","description":"Direction of the opening animation.","values":[{"name":"Direction9"}]},{"name":"modal","description":"Enable modal, blocking event penetration.","values":[]},{"name":"key","description":"Close key.","values":[]},{"name":"open","description":"Open the content.","values":[]}],"references":[]},{"name":"godown-details","description":"Details similar to `<details>`.\n---\n### **Events:**\n - **change** - Fired when the open changes.\n### **Slots:**\n - **summary** - Details summary if no `summary` is provided.\n- _default_ - Details content.","attributes":[{"name":"fill","description":"If it is true, the summary event scope will fill the element.","values":[]},{"name":"summary","description":"Summary text.","values":[]},{"name":"open","description":"Open the content.","values":[]}],"references":[]},{"name":"godown-carousel","description":"Carousel make the content display as a carousel.\nWhen this component is `firstUpdated`,\nclone the first and last element and make the matching element visible when switching index.\nChild elements should maintain the same size.\nIf no width, it will be the width of the first element.\n---\n### **Events:**\n - **change** - Fired when the index changes.\n### **Slots:**\n - _default_ - Carousel items, should maintain the same size.","attributes":[{"name":"index","description":"The index of the element is displayed for the first time.","values":[]},{"name":"autoChange","description":"If autoChange > 0, the rotation will be automated.","values":[]},{"name":"width","description":"Element width.","values":[]}],"references":[]},{"name":"godown-card","description":"Card renders a card.\nThis may be similar to Layout,\nbut it needs to be specified to enable header and footer.\n---\n### **Slots:**\n - _default_ - The main content of the card.\n- **header** - The header of the card.\n- **footer** - The footer of the card.","attributes":[{"name":"footer","values":[]},{"name":"header","values":[]}],"references":[]},{"name":"godown-button","description":"Button renders a button.\nCreate modal animation upon clicking.\nAvailable colors (background): none, black, gray, white, blue, green, red, orange, pink, purple, yellow, teal.\nDefault color is `black`.\nSet the color to `none` to prevent applying styles.\n---\n","attributes":[{"name":"disabled","description":"Whether to disable this element.","values":[]},{"name":"ghost","description":"Display ghost.","values":[]},{"name":"active","description":"Whether this element is active or not.","values":[]},{"name":"round","description":"Display rounded.","values":[]},{"name":"color","description":"The primary color.","values":[{"name":"none"},{"name":"keyof typeof colors"}]},{"name":"content","description":"Content text.","values":[]}],"references":[]},{"name":"godown-breath","description":"Breath render the text with a breathing effect.\nDynamically generate a breathing effect based on the length of the split text.\nIf there is not enough CSS variable, overrun elements will use the.\ngodown was a css library in its earliest days,\nand this is the component version of its first effect.\nInspired by Vercel home page (2023).\n---\n### **Slots:**\n - _default_ - Breathing parts.","attributes":[{"name":"text","description":"Strings or array of strings,\nif array, divided each element into chunks,\notherwise split strings by whitespace.","values":[{"name":"string[]"}]},{"name":"duration","description":"Effect duration, ending in s or ms.","values":[]}],"references":[]},{"name":"godown-avatar","description":"Avatar renders a avatar.\nRenders as an image if it has a src property,\notherwise falls back to name or nameless slot.\n---\n### **Slots:**\n - _default_ - Display content if no `src` or `name` provided.","attributes":[{"name":"src","description":"Image src.","values":[]},{"name":"name","description":"If the image is not available, display name (call Avatar.format).","values":[]},{"name":"round","description":"Display rounded.","values":[]}],"references":[]},{"name":"godown-alert","description":"Alert renders a alert.\nColor defaults to blue.\n---\n### **Events:**\n - **close** - Fires when the alert is closed.\n### **Slots:**\n - _default_ - Alert content.\n- **title** - Alert title.\n- **icon** - Alert icon.","attributes":[{"name":"call","description":"If it is a legal value, the icon and preset color will be rendered.","values":[{"name":"tip"},{"name":"success"},{"name":"info"},{"name":"warning"},{"name":"danger"},{"name":"error"},{"name":"help"},{"name":"deprecated"}]},{"name":"color","description":"The tone of the component.\nOverrides the color of the call.","values":[{"name":""},{"name":"white"},{"name":"black"},{"name":"gray"},{"name":"green"},{"name":"teal"},{"name":"blue"},{"name":"red"},{"name":"purple"},{"name":"orange"},{"name":"yellow"},{"name":"pink"},{"name":"none"}]},{"name":"autoclose","description":"Close delay, if 0, it will not be closed automatically.","values":[]},{"name":"title","description":"The title is bold and the icon height is the same as it.","values":[]},{"name":"content","description":"Content, if zero value, will be rendered as an unnamed slot.","values":[]},{"name":"hideClose","description":"Set true to hide the close button.\nThe behavior may change due to the variant property.","values":[]},{"name":"variant","description":"Alert variant, if set to `blockquote`, the alert will be rendered as a blockquote.\nIf variant is `\"blockquote\"`, hide the close button.","values":[{"name":"blockquote"},{"name":"dark"},{"name":"light"}]}],"references":[]}]}