godown 2.5.0 → 2.6.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 (500) hide show
  1. package/README.md +1 -1
  2. package/alert-item.d.ts +2 -0
  3. package/alert-item.d.ts.map +1 -0
  4. package/alert-item.js +2 -0
  5. package/alert-item.js.map +1 -0
  6. package/avatar-a.d.ts +2 -0
  7. package/avatar-a.d.ts.map +1 -0
  8. package/avatar-a.js +2 -0
  9. package/avatar-a.js.map +1 -0
  10. package/avatar-group.d.ts +2 -0
  11. package/avatar-group.d.ts.map +1 -0
  12. package/avatar-group.js +2 -0
  13. package/avatar-group.js.map +1 -0
  14. package/base-button.d.ts +2 -0
  15. package/base-button.d.ts.map +1 -0
  16. package/base-button.js +2 -0
  17. package/base-button.js.map +1 -0
  18. package/base-form.d.ts +2 -0
  19. package/base-form.d.ts.map +1 -0
  20. package/base-form.js +2 -0
  21. package/base-form.js.map +1 -0
  22. package/base-input.d.ts +2 -0
  23. package/base-input.d.ts.map +1 -0
  24. package/base-input.js +2 -0
  25. package/base-input.js.map +1 -0
  26. package/card-item.d.ts +2 -0
  27. package/card-item.d.ts.map +1 -0
  28. package/card-item.js +2 -0
  29. package/card-item.js.map +1 -0
  30. package/carousel-slider.d.ts +2 -0
  31. package/carousel-slider.d.ts.map +1 -0
  32. package/carousel-slider.js +2 -0
  33. package/carousel-slider.js.map +1 -0
  34. package/clip-text.d.ts +2 -0
  35. package/clip-text.d.ts.map +1 -0
  36. package/clip-text.js +2 -0
  37. package/clip-text.js.map +1 -0
  38. package/conf.d.ts +43 -3
  39. package/conf.d.ts.map +1 -1
  40. package/conf.js +14 -11
  41. package/conf.js.map +1 -1
  42. package/deps.d.ts +4 -3
  43. package/deps.d.ts.map +1 -1
  44. package/deps.js +4 -3
  45. package/deps.js.map +1 -1
  46. package/details-group.d.ts +2 -0
  47. package/details-group.d.ts.map +1 -0
  48. package/details-group.js +2 -0
  49. package/details-group.js.map +1 -0
  50. package/divider-line.d.ts +2 -0
  51. package/divider-line.d.ts.map +1 -0
  52. package/divider-line.js +2 -0
  53. package/divider-line.js.map +1 -0
  54. package/drag-box.d.ts +2 -0
  55. package/drag-box.d.ts.map +1 -0
  56. package/drag-box.js +2 -0
  57. package/drag-box.js.map +1 -0
  58. package/flex-flow.d.ts +2 -0
  59. package/flex-flow.d.ts.map +1 -0
  60. package/flex-flow.js +2 -0
  61. package/flex-flow.js.map +1 -0
  62. package/godown-element.d.ts +2 -2
  63. package/godown-element.d.ts.map +1 -1
  64. package/godown-element.js +1 -1
  65. package/godown-element.js.map +1 -1
  66. package/index.d.ts +2 -6
  67. package/index.d.ts.map +1 -1
  68. package/index.js +2 -6
  69. package/index.js.map +1 -1
  70. package/label-input.d.ts +2 -0
  71. package/label-input.d.ts.map +1 -0
  72. package/label-input.js +2 -0
  73. package/label-input.js.map +1 -0
  74. package/lib/directives.d.ts.map +1 -1
  75. package/lib/directives.js.map +1 -1
  76. package/lib/event-collection.d.ts +1 -1
  77. package/lib/event-collection.d.ts.map +1 -1
  78. package/lib/event-collection.js.map +1 -1
  79. package/lib/route-tree.d.ts.map +1 -1
  80. package/lib/route-tree.js.map +1 -1
  81. package/lib/templates.d.ts.map +1 -1
  82. package/lib/templates.js.map +1 -1
  83. package/lib/utils.d.ts.map +1 -1
  84. package/lib/utils.js +2 -2
  85. package/lib/utils.js.map +1 -1
  86. package/link-a.d.ts +2 -0
  87. package/link-a.d.ts.map +1 -0
  88. package/link-a.js +2 -0
  89. package/link-a.js.map +1 -0
  90. package/loading-progress.d.ts +2 -0
  91. package/loading-progress.d.ts.map +1 -0
  92. package/loading-progress.js +2 -0
  93. package/loading-progress.js.map +1 -0
  94. package/nav-aside.d.ts +2 -0
  95. package/nav-aside.d.ts.map +1 -0
  96. package/nav-aside.js +2 -0
  97. package/nav-aside.js.map +1 -0
  98. package/nav-layout.d.ts +2 -0
  99. package/nav-layout.d.ts.map +1 -0
  100. package/nav-layout.js +2 -0
  101. package/nav-layout.js.map +1 -0
  102. package/open-details.d.ts +2 -0
  103. package/open-details.d.ts.map +1 -0
  104. package/open-details.js +2 -0
  105. package/open-details.js.map +1 -0
  106. package/open-dialog.d.ts +2 -0
  107. package/open-dialog.d.ts.map +1 -0
  108. package/open-dialog.js +2 -0
  109. package/open-dialog.js.map +1 -0
  110. package/open-list.d.ts +2 -0
  111. package/open-list.d.ts.map +1 -0
  112. package/open-list.js +2 -0
  113. package/open-list.js.map +1 -0
  114. package/open-offset.d.ts +2 -0
  115. package/open-offset.d.ts.map +1 -0
  116. package/open-offset.js +2 -0
  117. package/open-offset.js.map +1 -0
  118. package/open-tooltip.d.ts +2 -0
  119. package/open-tooltip.d.ts.map +1 -0
  120. package/open-tooltip.js +2 -0
  121. package/open-tooltip.js.map +1 -0
  122. package/overbreath-text.d.ts +2 -0
  123. package/overbreath-text.d.ts.map +1 -0
  124. package/overbreath-text.js +2 -0
  125. package/overbreath-text.js.map +1 -0
  126. package/package.json +57 -10
  127. package/react/create.d.ts.map +1 -1
  128. package/react/create.js.map +1 -1
  129. package/react/index.d.ts +37 -7
  130. package/react/index.d.ts.map +1 -1
  131. package/react/index.js +114 -7
  132. package/react/index.js.map +1 -1
  133. package/root.d.ts.map +1 -1
  134. package/root.js +3 -2
  135. package/root.js.map +1 -1
  136. package/route-view.d.ts +2 -0
  137. package/route-view.d.ts.map +1 -0
  138. package/route-view.js +2 -0
  139. package/route-view.js.map +1 -0
  140. package/scroll-x.d.ts +2 -0
  141. package/scroll-x.d.ts.map +1 -0
  142. package/scroll-x.js +2 -0
  143. package/scroll-x.js.map +1 -0
  144. package/search-input.d.ts +2 -0
  145. package/search-input.d.ts.map +1 -0
  146. package/search-input.js +2 -0
  147. package/search-input.js.map +1 -0
  148. package/select-input.d.ts +2 -0
  149. package/select-input.d.ts.map +1 -0
  150. package/select-input.js +2 -0
  151. package/select-input.js.map +1 -0
  152. package/sign-form.d.ts +2 -0
  153. package/sign-form.d.ts.map +1 -0
  154. package/sign-form.js +2 -0
  155. package/sign-form.js.map +1 -0
  156. package/skeleton-screen.d.ts +2 -0
  157. package/skeleton-screen.d.ts.map +1 -0
  158. package/skeleton-screen.js +2 -0
  159. package/skeleton-screen.js.map +1 -0
  160. package/split-input.d.ts +2 -0
  161. package/split-input.d.ts.map +1 -0
  162. package/split-input.js +2 -0
  163. package/split-input.js.map +1 -0
  164. package/super-a.d.ts +2 -0
  165. package/super-a.d.ts.map +1 -0
  166. package/super-a.js +2 -0
  167. package/super-a.js.map +1 -0
  168. package/switch-input.d.ts +2 -0
  169. package/switch-input.d.ts.map +1 -0
  170. package/switch-input.js +2 -0
  171. package/switch-input.js.map +1 -0
  172. package/tab-group.d.ts +2 -0
  173. package/tab-group.d.ts.map +1 -0
  174. package/tab-group.js +2 -0
  175. package/tab-group.js.map +1 -0
  176. package/time-bar.d.ts +2 -0
  177. package/time-bar.d.ts.map +1 -0
  178. package/time-bar.js +2 -0
  179. package/time-bar.js.map +1 -0
  180. package/typewriter-text.d.ts +2 -0
  181. package/typewriter-text.d.ts.map +1 -0
  182. package/typewriter-text.js +2 -0
  183. package/typewriter-text.js.map +1 -0
  184. package/{items → web-components/a}/avatar-a.d.ts +7 -7
  185. package/web-components/a/avatar-a.d.ts.map +1 -0
  186. package/{items → web-components/a}/avatar-a.js +57 -62
  187. package/web-components/a/avatar-a.js.map +1 -0
  188. package/{items → web-components/a}/link-a.d.ts +6 -6
  189. package/web-components/a/link-a.d.ts.map +1 -0
  190. package/{items → web-components/a}/link-a.js +16 -21
  191. package/web-components/a/link-a.js.map +1 -0
  192. package/{items → web-components/a}/super-a.d.ts +5 -5
  193. package/web-components/a/super-a.d.ts.map +1 -0
  194. package/{items → web-components/a}/super-a.js +34 -40
  195. package/web-components/a/super-a.js.map +1 -0
  196. package/{items → web-components/button}/base-button.d.ts +3 -3
  197. package/web-components/button/base-button.d.ts.map +1 -0
  198. package/{items → web-components/button}/base-button.js +100 -106
  199. package/web-components/button/base-button.js.map +1 -0
  200. package/{view/rotation-pool.d.ts → web-components/carousel/carousel-slider.d.ts} +7 -7
  201. package/web-components/carousel/carousel-slider.d.ts.map +1 -0
  202. package/{view/rotation-pool.js → web-components/carousel/carousel-slider.js} +87 -92
  203. package/web-components/carousel/carousel-slider.js.map +1 -0
  204. package/{input-form/sign-form.d.ts → web-components/form/base-form.d.ts} +9 -18
  205. package/web-components/form/base-form.d.ts.map +1 -0
  206. package/{input-form/sign-form.js → web-components/form/base-form.js} +32 -40
  207. package/web-components/form/base-form.js.map +1 -0
  208. package/web-components/form/sign-form.d.ts +19 -0
  209. package/web-components/form/sign-form.d.ts.map +1 -0
  210. package/web-components/form/sign-form.js +16 -0
  211. package/web-components/form/sign-form.js.map +1 -0
  212. package/{group → web-components/group}/avatar-group.d.ts +6 -6
  213. package/web-components/group/avatar-group.d.ts.map +1 -0
  214. package/{group → web-components/group}/avatar-group.js +24 -30
  215. package/web-components/group/avatar-group.js.map +1 -0
  216. package/{group → web-components/group}/details-group.d.ts +3 -3
  217. package/web-components/group/details-group.d.ts.map +1 -0
  218. package/{group → web-components/group}/details-group.js +12 -18
  219. package/web-components/group/details-group.js.map +1 -0
  220. package/{group → web-components/group}/tab-group.d.ts +4 -4
  221. package/web-components/group/tab-group.d.ts.map +1 -0
  222. package/{group → web-components/group}/tab-group.js +50 -56
  223. package/web-components/group/tab-group.js.map +1 -0
  224. package/web-components/index.d.ts +38 -0
  225. package/web-components/index.d.ts.map +1 -0
  226. package/web-components/index.js +39 -0
  227. package/web-components/index.js.map +1 -0
  228. package/{input-form → web-components/input}/base-input.d.ts +4 -4
  229. package/web-components/input/base-input.d.ts.map +1 -0
  230. package/{input-form → web-components/input}/base-input.js +80 -85
  231. package/web-components/input/base-input.js.map +1 -0
  232. package/{input-form/std.d.ts → web-components/input/input.d.ts} +4 -16
  233. package/web-components/input/input.d.ts.map +1 -0
  234. package/{input-form/std.js → web-components/input/input.js} +27 -54
  235. package/web-components/input/input.js.map +1 -0
  236. package/{input-form → web-components/input}/label-input.d.ts +4 -4
  237. package/web-components/input/label-input.d.ts.map +1 -0
  238. package/{input-form → web-components/input}/label-input.js +56 -61
  239. package/web-components/input/label-input.js.map +1 -0
  240. package/{input-form → web-components/input}/search-input.d.ts +4 -4
  241. package/web-components/input/search-input.d.ts.map +1 -0
  242. package/{input-form → web-components/input}/search-input.js +64 -69
  243. package/web-components/input/search-input.js.map +1 -0
  244. package/{input-form → web-components/input}/select-input.d.ts +4 -4
  245. package/web-components/input/select-input.d.ts.map +1 -0
  246. package/{input-form → web-components/input}/select-input.js +97 -101
  247. package/web-components/input/select-input.js.map +1 -0
  248. package/{input-form → web-components/input}/split-input.d.ts +4 -4
  249. package/web-components/input/split-input.d.ts.map +1 -0
  250. package/{input-form → web-components/input}/split-input.js +56 -61
  251. package/web-components/input/split-input.js.map +1 -0
  252. package/{input-form → web-components/input}/switch-input.d.ts +4 -4
  253. package/web-components/input/switch-input.d.ts.map +1 -0
  254. package/{input-form → web-components/input}/switch-input.js +42 -47
  255. package/web-components/input/switch-input.js.map +1 -0
  256. package/{items → web-components/items}/alert-item.d.ts +3 -3
  257. package/web-components/items/alert-item.d.ts.map +1 -0
  258. package/{items → web-components/items}/alert-item.js +38 -43
  259. package/web-components/items/alert-item.js.map +1 -0
  260. package/{items → web-components/items}/card-item.d.ts +4 -4
  261. package/web-components/items/card-item.d.ts.map +1 -0
  262. package/{items → web-components/items}/card-item.js +57 -63
  263. package/web-components/items/card-item.js.map +1 -0
  264. package/{layout → web-components/items}/drag-box.d.ts +3 -3
  265. package/web-components/items/drag-box.d.ts.map +1 -0
  266. package/{layout → web-components/items}/drag-box.js +13 -19
  267. package/web-components/items/drag-box.js.map +1 -0
  268. package/web-components/items/index.d.ts +5 -0
  269. package/web-components/items/index.d.ts.map +1 -0
  270. package/web-components/items/index.js +6 -0
  271. package/web-components/items/index.js.map +1 -0
  272. package/{items → web-components/items}/time-bar.d.ts +3 -3
  273. package/web-components/items/time-bar.d.ts.map +1 -0
  274. package/{items → web-components/items}/time-bar.js +12 -17
  275. package/web-components/items/time-bar.js.map +1 -0
  276. package/web-components/layout/divider-line.d.ts +20 -0
  277. package/web-components/layout/divider-line.d.ts.map +1 -0
  278. package/{layout/div-line.js → web-components/layout/divider-line.js} +24 -30
  279. package/web-components/layout/divider-line.js.map +1 -0
  280. package/{layout → web-components/layout}/flex-flow.d.ts +3 -3
  281. package/web-components/layout/flex-flow.d.ts.map +1 -0
  282. package/{layout → web-components/layout}/flex-flow.js +12 -18
  283. package/web-components/layout/flex-flow.js.map +1 -0
  284. package/web-components/layout/index.d.ts +5 -0
  285. package/web-components/layout/index.d.ts.map +1 -0
  286. package/web-components/layout/index.js +6 -0
  287. package/web-components/layout/index.js.map +1 -0
  288. package/{layout → web-components/layout}/nav-aside.d.ts +4 -4
  289. package/web-components/layout/nav-aside.d.ts.map +1 -0
  290. package/{layout → web-components/layout}/nav-aside.js +19 -25
  291. package/web-components/layout/nav-aside.js.map +1 -0
  292. package/{layout → web-components/layout}/nav-layout.d.ts +4 -4
  293. package/web-components/layout/nav-layout.d.ts.map +1 -0
  294. package/{layout → web-components/layout}/nav-layout.js +31 -37
  295. package/web-components/layout/nav-layout.js.map +1 -0
  296. package/{items/load-progress.d.ts → web-components/loading/loading-progress.d.ts} +7 -7
  297. package/web-components/loading/loading-progress.d.ts.map +1 -0
  298. package/{items/load-progress.js → web-components/loading/loading-progress.js} +41 -47
  299. package/web-components/loading/loading-progress.js.map +1 -0
  300. package/{layout → web-components/loading}/skeleton-screen.d.ts +4 -4
  301. package/web-components/loading/skeleton-screen.d.ts.map +1 -0
  302. package/{layout → web-components/loading}/skeleton-screen.js +24 -30
  303. package/web-components/loading/skeleton-screen.js.map +1 -0
  304. package/{view/details-expand.d.ts → web-components/open/open-details.d.ts} +8 -8
  305. package/web-components/open/open-details.d.ts.map +1 -0
  306. package/{view/details-expand.js → web-components/open/open-details.js} +35 -40
  307. package/web-components/open/open-details.js.map +1 -0
  308. package/{items/dialog-item.d.ts → web-components/open/open-dialog.d.ts} +8 -8
  309. package/web-components/open/open-dialog.d.ts.map +1 -0
  310. package/{items/dialog-item.js → web-components/open/open-dialog.js} +83 -89
  311. package/web-components/open/open-dialog.js.map +1 -0
  312. package/web-components/open/open-list.d.ts +20 -0
  313. package/web-components/open/open-list.d.ts.map +1 -0
  314. package/web-components/open/open-list.js +71 -0
  315. package/web-components/open/open-list.js.map +1 -0
  316. package/{view/offset-expand.d.ts → web-components/open/open-offset.d.ts} +8 -8
  317. package/web-components/open/open-offset.d.ts.map +1 -0
  318. package/{view/offset-expand.js → web-components/open/open-offset.js} +66 -71
  319. package/web-components/open/open-offset.js.map +1 -0
  320. package/web-components/open/open-tooltip.d.ts +24 -0
  321. package/web-components/open/open-tooltip.d.ts.map +1 -0
  322. package/{view/tool-tip.js → web-components/open/open-tooltip.js} +28 -33
  323. package/web-components/open/open-tooltip.js.map +1 -0
  324. package/{view/std.d.ts → web-components/open/open.d.ts} +6 -6
  325. package/web-components/open/open.d.ts.map +1 -0
  326. package/{view/std.js → web-components/open/open.js} +35 -40
  327. package/web-components/open/open.js.map +1 -0
  328. package/{effect → web-components/text}/clip-text.d.ts +4 -4
  329. package/web-components/text/clip-text.d.ts.map +1 -0
  330. package/web-components/text/clip-text.js +44 -0
  331. package/web-components/text/clip-text.js.map +1 -0
  332. package/{effect → web-components/text}/overbreath-text.d.ts +4 -4
  333. package/web-components/text/overbreath-text.d.ts.map +1 -0
  334. package/{effect → web-components/text}/overbreath-text.js +21 -27
  335. package/web-components/text/overbreath-text.js.map +1 -0
  336. package/{effect → web-components/text}/typewriter-text.d.ts +4 -4
  337. package/web-components/text/typewriter-text.d.ts.map +1 -0
  338. package/{effect → web-components/text}/typewriter-text.js +38 -44
  339. package/web-components/text/typewriter-text.js.map +1 -0
  340. package/{view → web-components/view}/route-view.d.ts +4 -4
  341. package/web-components/view/route-view.d.ts.map +1 -0
  342. package/{view → web-components/view}/route-view.js +16 -21
  343. package/web-components/view/route-view.js.map +1 -0
  344. package/{view → web-components/view}/scroll-x.d.ts +2 -2
  345. package/web-components/view/scroll-x.d.ts.map +1 -0
  346. package/{view → web-components/view}/scroll-x.js +35 -40
  347. package/web-components/view/scroll-x.js.map +1 -0
  348. package/{view/with-wrap.d.ts → web-components/view/wrap-view.d.ts} +7 -7
  349. package/web-components/view/wrap-view.d.ts.map +1 -0
  350. package/{view/with-wrap.js → web-components/view/wrap-view.js} +29 -34
  351. package/web-components/view/wrap-view.js.map +1 -0
  352. package/wrap-view.d.ts +2 -0
  353. package/wrap-view.d.ts.map +1 -0
  354. package/wrap-view.js +2 -0
  355. package/wrap-view.js.map +1 -0
  356. package/effect/clip-text.d.ts.map +0 -1
  357. package/effect/clip-text.js +0 -50
  358. package/effect/clip-text.js.map +0 -1
  359. package/effect/index.d.ts +0 -4
  360. package/effect/index.d.ts.map +0 -1
  361. package/effect/index.js +0 -4
  362. package/effect/index.js.map +0 -1
  363. package/effect/overbreath-text.d.ts.map +0 -1
  364. package/effect/overbreath-text.js.map +0 -1
  365. package/effect/std.d.ts +0 -4
  366. package/effect/std.d.ts.map +0 -1
  367. package/effect/std.js +0 -4
  368. package/effect/std.js.map +0 -1
  369. package/effect/typewriter-text.d.ts.map +0 -1
  370. package/effect/typewriter-text.js.map +0 -1
  371. package/group/avatar-group.d.ts.map +0 -1
  372. package/group/avatar-group.js.map +0 -1
  373. package/group/details-group.d.ts.map +0 -1
  374. package/group/details-group.js.map +0 -1
  375. package/group/index.d.ts +0 -4
  376. package/group/index.d.ts.map +0 -1
  377. package/group/index.js +0 -4
  378. package/group/index.js.map +0 -1
  379. package/group/std.d.ts +0 -4
  380. package/group/std.d.ts.map +0 -1
  381. package/group/std.js +0 -4
  382. package/group/std.js.map +0 -1
  383. package/group/tab-group.d.ts.map +0 -1
  384. package/group/tab-group.js.map +0 -1
  385. package/input-form/base-input.d.ts.map +0 -1
  386. package/input-form/base-input.js.map +0 -1
  387. package/input-form/index.d.ts +0 -8
  388. package/input-form/index.d.ts.map +0 -1
  389. package/input-form/index.js +0 -8
  390. package/input-form/index.js.map +0 -1
  391. package/input-form/label-input.d.ts.map +0 -1
  392. package/input-form/label-input.js.map +0 -1
  393. package/input-form/search-input.d.ts.map +0 -1
  394. package/input-form/search-input.js.map +0 -1
  395. package/input-form/select-input.d.ts.map +0 -1
  396. package/input-form/select-input.js.map +0 -1
  397. package/input-form/sign-form.d.ts.map +0 -1
  398. package/input-form/sign-form.js.map +0 -1
  399. package/input-form/split-input.d.ts.map +0 -1
  400. package/input-form/split-input.js.map +0 -1
  401. package/input-form/std.d.ts.map +0 -1
  402. package/input-form/std.js.map +0 -1
  403. package/input-form/switch-input.d.ts.map +0 -1
  404. package/input-form/switch-input.js.map +0 -1
  405. package/items/alert-item.d.ts.map +0 -1
  406. package/items/alert-item.js.map +0 -1
  407. package/items/avatar-a.d.ts.map +0 -1
  408. package/items/avatar-a.js.map +0 -1
  409. package/items/base-button.d.ts.map +0 -1
  410. package/items/base-button.js.map +0 -1
  411. package/items/card-item.d.ts.map +0 -1
  412. package/items/card-item.js.map +0 -1
  413. package/items/dialog-item.d.ts.map +0 -1
  414. package/items/dialog-item.js.map +0 -1
  415. package/items/index.d.ts +0 -10
  416. package/items/index.d.ts.map +0 -1
  417. package/items/index.js +0 -10
  418. package/items/index.js.map +0 -1
  419. package/items/link-a.d.ts.map +0 -1
  420. package/items/link-a.js.map +0 -1
  421. package/items/load-progress.d.ts.map +0 -1
  422. package/items/load-progress.js.map +0 -1
  423. package/items/std.d.ts +0 -4
  424. package/items/std.d.ts.map +0 -1
  425. package/items/std.js +0 -4
  426. package/items/std.js.map +0 -1
  427. package/items/super-a.d.ts.map +0 -1
  428. package/items/super-a.js.map +0 -1
  429. package/items/time-bar.d.ts.map +0 -1
  430. package/items/time-bar.js.map +0 -1
  431. package/layout/div-line.d.ts +0 -20
  432. package/layout/div-line.d.ts.map +0 -1
  433. package/layout/div-line.js.map +0 -1
  434. package/layout/drag-box.d.ts.map +0 -1
  435. package/layout/drag-box.js.map +0 -1
  436. package/layout/flex-flow.d.ts.map +0 -1
  437. package/layout/flex-flow.js.map +0 -1
  438. package/layout/index.d.ts +0 -7
  439. package/layout/index.d.ts.map +0 -1
  440. package/layout/index.js +0 -7
  441. package/layout/index.js.map +0 -1
  442. package/layout/nav-aside.d.ts.map +0 -1
  443. package/layout/nav-aside.js.map +0 -1
  444. package/layout/nav-layout.d.ts.map +0 -1
  445. package/layout/nav-layout.js.map +0 -1
  446. package/layout/skeleton-screen.d.ts.map +0 -1
  447. package/layout/skeleton-screen.js.map +0 -1
  448. package/layout/std.d.ts +0 -4
  449. package/layout/std.d.ts.map +0 -1
  450. package/layout/std.js +0 -4
  451. package/layout/std.js.map +0 -1
  452. package/react/effect.d.ts +0 -5
  453. package/react/effect.d.ts.map +0 -1
  454. package/react/effect.js +0 -13
  455. package/react/effect.js.map +0 -1
  456. package/react/group.d.ts +0 -5
  457. package/react/group.d.ts.map +0 -1
  458. package/react/group.js +0 -13
  459. package/react/group.js.map +0 -1
  460. package/react/input-form.d.ts +0 -28
  461. package/react/input-form.d.ts.map +0 -1
  462. package/react/input-form.js +0 -38
  463. package/react/input-form.js.map +0 -1
  464. package/react/items.d.ts +0 -11
  465. package/react/items.d.ts.map +0 -1
  466. package/react/items.js +0 -31
  467. package/react/items.js.map +0 -1
  468. package/react/layout.d.ts +0 -8
  469. package/react/layout.d.ts.map +0 -1
  470. package/react/layout.js +0 -22
  471. package/react/layout.js.map +0 -1
  472. package/react/view.d.ts +0 -10
  473. package/react/view.d.ts.map +0 -1
  474. package/react/view.js +0 -28
  475. package/react/view.js.map +0 -1
  476. package/view/details-expand.d.ts.map +0 -1
  477. package/view/details-expand.js.map +0 -1
  478. package/view/index.d.ts +0 -9
  479. package/view/index.d.ts.map +0 -1
  480. package/view/index.js +0 -9
  481. package/view/index.js.map +0 -1
  482. package/view/menu-list.d.ts +0 -20
  483. package/view/menu-list.d.ts.map +0 -1
  484. package/view/menu-list.js +0 -76
  485. package/view/menu-list.js.map +0 -1
  486. package/view/offset-expand.d.ts.map +0 -1
  487. package/view/offset-expand.js.map +0 -1
  488. package/view/rotation-pool.d.ts.map +0 -1
  489. package/view/rotation-pool.js.map +0 -1
  490. package/view/route-view.d.ts.map +0 -1
  491. package/view/route-view.js.map +0 -1
  492. package/view/scroll-x.d.ts.map +0 -1
  493. package/view/scroll-x.js.map +0 -1
  494. package/view/std.d.ts.map +0 -1
  495. package/view/std.js.map +0 -1
  496. package/view/tool-tip.d.ts +0 -24
  497. package/view/tool-tip.d.ts.map +0 -1
  498. package/view/tool-tip.js.map +0 -1
  499. package/view/with-wrap.d.ts.map +0 -1
  500. package/view/with-wrap.js.map +0 -1
@@ -1,10 +1,10 @@
1
- import { SuperAnchor } from "./super-a.js";
1
+ import { SuperA } from "./super-a.js";
2
2
  /**
3
3
  * LinkAnchor works with {@linkcode RouteView}.
4
4
  *
5
- * @extends SuperAnchor
5
+ * @extends SuperA
6
6
  */
7
- export declare class LinkAnchor extends SuperAnchor {
7
+ export declare class LinkA extends SuperA {
8
8
  /**
9
9
  * True when the href is in the same pathname as the location.
10
10
  */
@@ -15,7 +15,7 @@ export declare class LinkAnchor extends SuperAnchor {
15
15
  replace: boolean;
16
16
  connectedCallback(): void;
17
17
  /**
18
- * Set active to true when the {@linkcode LinkAnchor.href} is in the same pathname as the location.
18
+ * Set active to true when the {@linkcode LinkA.href} is in the same pathname as the location.
19
19
  */
20
20
  useActive(): void;
21
21
  protected _handleClick(e: MouseEvent): void;
@@ -24,10 +24,10 @@ export declare class LinkAnchor extends SuperAnchor {
24
24
  static pushState(data: any, unused: string, url?: string): void;
25
25
  static replaceState(data: any, unused: string, url?: string): void;
26
26
  }
27
- export default LinkAnchor;
27
+ export default LinkA;
28
28
  declare global {
29
29
  interface HTMLElementTagNameMap {
30
- "link-a": LinkAnchor;
30
+ "link-a": LinkA;
31
31
  }
32
32
  }
33
33
  //# sourceMappingURL=link-a.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"link-a.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/a/link-a.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAItC;;;;GAIG;AACH,qBACa,KAAM,SAAQ,MAAM;IAC/B;;OAEG;IACyC,MAAM,UAAS;IAC3D;;OAEG;IAC0B,OAAO,UAAS;IAE7C,iBAAiB;IAOjB;;OAEG;IACH,SAAS;IAOT,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,UAAU;IAapC,SAAS,CAAC,GAAG,SAAY,EAAE,IAAI,MAAO;IAKtC,YAAY,CAAC,GAAG,SAAY,EAAE,IAAI,MAAO;IAKzC,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM;IAKxD,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM;CAI5D;AAED,eAAe,KAAK,CAAC;AAErB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,QAAQ,EAAE,KAAK,CAAC;KACjB;CACF"}
@@ -1,21 +1,16 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- var LinkAnchor_1;
8
- import { define } from "../root.js";
9
- import { property } from "../deps.js";
1
+ var LinkA_1;
2
+ import { __decorate } from "tslib";
3
+ import { property } from "../../deps.js";
4
+ import { define } from "../../root.js";
10
5
  import { RouteView } from "../view/route-view.js";
11
- import { SuperAnchor } from "./super-a.js";
6
+ import { SuperA } from "./super-a.js";
12
7
  const defineName = "link-a";
13
8
  /**
14
9
  * LinkAnchor works with {@linkcode RouteView}.
15
10
  *
16
- * @extends SuperAnchor
11
+ * @extends SuperA
17
12
  */
18
- let LinkAnchor = LinkAnchor_1 = class LinkAnchor extends SuperAnchor {
13
+ let LinkA = LinkA_1 = class LinkA extends SuperA {
19
14
  constructor() {
20
15
  super(...arguments);
21
16
  /**
@@ -34,7 +29,7 @@ let LinkAnchor = LinkAnchor_1 = class LinkAnchor extends SuperAnchor {
34
29
  this.useActive();
35
30
  }
36
31
  /**
37
- * Set active to true when the {@linkcode LinkAnchor.href} is in the same pathname as the location.
32
+ * Set active to true when the {@linkcode LinkA.href} is in the same pathname as the location.
38
33
  */
39
34
  useActive() {
40
35
  const url = new URL(this.href, location.href);
@@ -56,11 +51,11 @@ let LinkAnchor = LinkAnchor_1 = class LinkAnchor extends SuperAnchor {
56
51
  }
57
52
  }
58
53
  pushState(url = this.href, data = null) {
59
- LinkAnchor_1.pushState(data, "", url);
54
+ LinkA_1.pushState(data, "", url);
60
55
  this.useActive();
61
56
  }
62
57
  replaceState(url = this.href, data = null) {
63
- LinkAnchor_1.replaceState(data, "", url);
58
+ LinkA_1.replaceState(data, "", url);
64
59
  this.useActive();
65
60
  }
66
61
  static pushState(data, unused, url) {
@@ -74,13 +69,13 @@ let LinkAnchor = LinkAnchor_1 = class LinkAnchor extends SuperAnchor {
74
69
  };
75
70
  __decorate([
76
71
  property({ type: Boolean, reflect: true })
77
- ], LinkAnchor.prototype, "active", void 0);
72
+ ], LinkA.prototype, "active", void 0);
78
73
  __decorate([
79
74
  property({ type: Boolean })
80
- ], LinkAnchor.prototype, "replace", void 0);
81
- LinkAnchor = LinkAnchor_1 = __decorate([
75
+ ], LinkA.prototype, "replace", void 0);
76
+ LinkA = LinkA_1 = __decorate([
82
77
  define(defineName)
83
- ], LinkAnchor);
84
- export { LinkAnchor };
85
- export default LinkAnchor;
78
+ ], LinkA);
79
+ export { LinkA };
80
+ export default LinkA;
86
81
  //# sourceMappingURL=link-a.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"link-a.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/a/link-a.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,MAAM,UAAU,GAAG,QAAQ,CAAC;AAE5B;;;;GAIG;AAEI,IAAM,KAAK,aAAX,MAAM,KAAM,SAAQ,MAAM;IAA1B;;QACL;;WAEG;QACyC,WAAM,GAAG,KAAK,CAAC;QAC3D;;WAEG;QAC0B,YAAO,GAAG,KAAK,CAAC;IAmD/C,CAAC;IAjDC,iBAAiB;QACf,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QAChD,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC7D,IAAI,CAAC,SAAS,EAAE,CAAC;IACnB,CAAC;IAED;;OAEG;IACH,SAAS;QACP,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;QAC9C,IAAI,GAAG,CAAC,MAAM,KAAK,QAAQ,CAAC,MAAM,EAAE,CAAC;YACnC,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,QAAQ,KAAK,QAAQ,CAAC,QAAQ,CAAC;QACnD,CAAC;IACH,CAAC;IAES,YAAY,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AC,SAAS,EAAE,CAAC;IACxB,CAAC;CACF,CAAA;AAvD6C;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;qCAAgB;AAI9B;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;sCAAiB;AARlC,KAAK;IADjB,MAAM,CAAC,UAAU,CAAC;GACN,KAAK,CA2DjB;;AAED,eAAe,KAAK,CAAC","sourcesContent":["import { property } from \"../../deps.js\";\nimport { define } from \"../../root.js\";\nimport { RouteView } from \"../view/route-view.js\";\nimport { SuperA } from \"./super-a.js\";\n\nconst defineName = \"link-a\";\n\n/**\n * LinkAnchor works with {@linkcode RouteView}.\n *\n * @extends SuperA\n */\n@define(defineName)\nexport class LinkA extends SuperA {\n /**\n * True when the href is in the same pathname as the location.\n */\n @property({ type: Boolean, reflect: true }) active = false;\n /**\n * If true, replaceState, or pushState.\n */\n @property({ type: Boolean }) replace = false;\n\n connectedCallback() {\n super.connectedCallback();\n this.addEvent(this, \"click\", this._handleClick);\n this.addEvent(window, \"popstate\", this.useActive.bind(this));\n this.useActive();\n }\n\n /**\n * Set active to true when the {@linkcode LinkA.href} is in the same pathname as the location.\n */\n useActive() {\n const url = new URL(this.href, location.href);\n if (url.origin === location.origin) {\n this.active = url.pathname === location.pathname;\n }\n }\n\n protected _handleClick(e: MouseEvent) {\n const href = this.href ?? this.querySelector(\"[href]\")?.getAttribute(\"href\");\n const url = new URL(href, location.href);\n if (url.origin === location.origin) {\n e.preventDefault();\n if (this.replace) {\n this.replaceState(href);\n } else {\n this.pushState(href);\n }\n }\n }\n\n pushState(url = this.href, data = null) {\n LinkA.pushState(data, \"\", url);\n this.useActive();\n }\n\n replaceState(url = this.href, data = null) {\n LinkA.replaceState(data, \"\", url);\n this.useActive();\n }\n\n static pushState(data: any, unused: string, url?: string) {\n history.pushState(data, unused, url);\n RouteView.updateAll();\n }\n\n static replaceState(data: any, unused: string, url?: string) {\n history.replaceState(data, unused, url);\n RouteView.updateAll();\n }\n}\n\nexport default LinkA;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"link-a\": LinkA;\n }\n}\n"]}
@@ -1,11 +1,11 @@
1
- import { type HTMLTemplate } from "../lib/templates.js";
2
- import ItemsSTD from "./std.js";
1
+ import { type HTMLTemplate } from "../../lib/templates.js";
2
+ import { GodownElement } from "../../root.js";
3
3
  /**
4
4
  * SuperAnchor similar to a.
5
5
  *
6
6
  * Has an optional arrow.
7
7
  */
8
- export declare class SuperAnchor extends ItemsSTD {
8
+ export declare class SuperA extends GodownElement {
9
9
  /**
10
10
  * Href for a element.
11
11
  */
@@ -22,10 +22,10 @@ export declare class SuperAnchor extends ItemsSTD {
22
22
  protected render(): HTMLTemplate;
23
23
  private _arrowSwitcher;
24
24
  }
25
- export default SuperAnchor;
25
+ export default SuperA;
26
26
  declare global {
27
27
  interface HTMLElementTagNameMap {
28
- "super-a": SuperAnchor;
28
+ "super-a": SuperA;
29
29
  }
30
30
  }
31
31
  //# sourceMappingURL=super-a.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"super-a.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/a/super-a.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,YAAY,EAAsB,MAAM,wBAAwB,CAAC;AACzF,OAAO,EAAU,aAAa,EAAE,MAAM,eAAe,CAAC;AAItD;;;;GAIG;AACH,qBACa,MAAO,SAAQ,aAAa;IACvC;;OAEG;IACS,IAAI,EAAE,MAAM,CAAa;IACrC;;OAEG;IACS,MAAM,SAAW;IAC7B;;OAEG;IACS,KAAK,EAAE,EAAE,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAM;IAEzD,MAAM,CAAC,MAAM,4BA0DX;IAEF,SAAS,CAAC,MAAM,IAAI,YAAY;IAOhC,OAAO,CAAC,cAAc;CAYvB;AAED,eAAe,MAAM,CAAC;AAEtB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,SAAS,EAAE,MAAM,CAAC;KACnB;CACF"}
@@ -1,20 +1,14 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { css, html, ifDefined, property } from "../deps.js";
8
- import { htmlSlot, svgArrow, svgDelta } from "../lib/templates.js";
9
- import { define } from "../root.js";
10
- import ItemsSTD from "./std.js";
1
+ import { __decorate } from "tslib";
2
+ import { css, html, ifDefined, property } from "../../deps.js";
3
+ import { htmlSlot, svgArrow, svgDelta } from "../../lib/templates.js";
4
+ import { define, GodownElement } from "../../root.js";
11
5
  const defineName = "super-a";
12
6
  /**
13
7
  * SuperAnchor similar to a.
14
8
  *
15
9
  * Has an optional arrow.
16
10
  */
17
- let SuperAnchor = class SuperAnchor extends ItemsSTD {
11
+ let SuperA = class SuperA extends GodownElement {
18
12
  constructor() {
19
13
  super(...arguments);
20
14
  /**
@@ -30,27 +24,8 @@ let SuperAnchor = class SuperAnchor extends ItemsSTD {
30
24
  */
31
25
  this.arrow = "";
32
26
  }
33
- render() {
34
- return html `<a href="${ifDefined(this.href)}" target="${this.target}">
35
- ${htmlSlot()}
36
- <i> ${this._arrowSwitcher()} </i>
37
- </a>`;
38
- }
39
- _arrowSwitcher() {
40
- switch (this.arrow) {
41
- case "delta":
42
- return svgDelta();
43
- case "arrow":
44
- return svgArrow(true);
45
- case "angle":
46
- return svgArrow();
47
- default:
48
- return htmlSlot("icon");
49
- }
50
- }
51
- };
52
- SuperAnchor.styles = [
53
- css `
27
+ static { this.styles = [
28
+ css `
54
29
  :host([arrow="delta"]) svg {
55
30
  transform: rotate(-90deg);
56
31
  }
@@ -107,19 +82,38 @@ SuperAnchor.styles = [
107
82
  }
108
83
  }
109
84
  `,
110
- ];
85
+ ]; }
86
+ render() {
87
+ return html `<a href="${ifDefined(this.href)}" target="${this.target}">
88
+ ${htmlSlot()}
89
+ <i> ${this._arrowSwitcher()} </i>
90
+ </a>`;
91
+ }
92
+ _arrowSwitcher() {
93
+ switch (this.arrow) {
94
+ case "delta":
95
+ return svgDelta();
96
+ case "arrow":
97
+ return svgArrow(true);
98
+ case "angle":
99
+ return svgArrow();
100
+ default:
101
+ return htmlSlot("icon");
102
+ }
103
+ }
104
+ };
111
105
  __decorate([
112
106
  property()
113
- ], SuperAnchor.prototype, "href", void 0);
107
+ ], SuperA.prototype, "href", void 0);
114
108
  __decorate([
115
109
  property()
116
- ], SuperAnchor.prototype, "target", void 0);
110
+ ], SuperA.prototype, "target", void 0);
117
111
  __decorate([
118
112
  property()
119
- ], SuperAnchor.prototype, "arrow", void 0);
120
- SuperAnchor = __decorate([
113
+ ], SuperA.prototype, "arrow", void 0);
114
+ SuperA = __decorate([
121
115
  define(defineName)
122
- ], SuperAnchor);
123
- export { SuperAnchor };
124
- export default SuperAnchor;
116
+ ], SuperA);
117
+ export { SuperA };
118
+ export default SuperA;
125
119
  //# sourceMappingURL=super-a.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"super-a.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/a/super-a.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAqB,QAAQ,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACzF,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEtD,MAAM,UAAU,GAAG,SAAS,CAAC;AAE7B;;;;GAIG;AAEI,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,aAAa;IAAlC;;QACL;;WAEG;QACS,SAAI,GAAW,SAAS,CAAC;QACrC;;WAEG;QACS,WAAM,GAAG,OAAO,CAAC;QAC7B;;WAEG;QACS,UAAK,GAAqC,EAAE,CAAC;IAiF3D,CAAC;aA/EQ,WAAM,GAAG;QACd,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAwDF;KACF,AA1DY,CA0DX;IAEQ,MAAM;QACd,OAAO,IAAI,CAAA,YAAY,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,IAAI,CAAC,MAAM;QAC/D,QAAQ,EAAE;YACN,IAAI,CAAC,cAAc,EAAE;SACxB,CAAC;IACR,CAAC;IAEO,cAAc;QACpB,QAAQ,IAAI,CAAC,KAAK,EAAE,CAAC;YACnB,KAAK,OAAO;gBACV,OAAO,QAAQ,EAAE,CAAC;YACpB,KAAK,OAAO;gBACV,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC;YACxB,KAAK,OAAO;gBACV,OAAO,QAAQ,EAAE,CAAC;YACpB;gBACE,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;;AAxFW;IAAX,QAAQ,EAAE;oCAA0B;AAIzB;IAAX,QAAQ,EAAE;sCAAkB;AAIjB;IAAX,QAAQ,EAAE;qCAA8C;AAZ9C,MAAM;IADlB,MAAM,CAAC,UAAU,CAAC;GACN,MAAM,CA6FlB;;AAED,eAAe,MAAM,CAAC","sourcesContent":["import { css, html, ifDefined, property } from \"../../deps.js\";\nimport { htmlSlot, type HTMLTemplate, svgArrow, svgDelta } from \"../../lib/templates.js\";\nimport { define, GodownElement } from \"../../root.js\";\n\nconst defineName = \"super-a\";\n\n/**\n * SuperAnchor similar to a.\n *\n * Has an optional arrow.\n */\n@define(defineName)\nexport class SuperA extends GodownElement {\n /**\n * Href for a element.\n */\n @property() href: string = undefined;\n /**\n * Target for an element.\n */\n @property() target = \"_self\";\n /**\n * Arrow type.\n */\n @property() arrow: \"\" | \"delta\" | \"arrow\" | \"angle\" = \"\";\n\n static styles = [\n css`\n :host([arrow=\"delta\"]) svg {\n transform: rotate(-90deg);\n }\n\n :host {\n display: inline-block;\n color: currentColor;\n text-decoration: none;\n cursor: default;\n }\n\n :host([href]) {\n cursor: pointer;\n }\n\n a {\n width: 100%;\n display: flex;\n color: inherit;\n text-decoration: inherit;\n justify-content: space-between;\n align-items: center;\n }\n\n i {\n display: inline-flex;\n border-radius: 20%;\n font-style: normal;\n }\n\n i > svg {\n width: 1em;\n height: 1em;\n border-radius: inherit;\n }\n\n :host(:hover) i {\n animation: arrow 0.3s linear;\n }\n\n i:hover {\n background-color: rgb(0 0 0 / 0.075);\n }\n\n @keyframes arrow {\n from {\n transform: translateX(0);\n }\n 50% {\n transform: translateX(0.05em);\n }\n to {\n transform: translateX(0);\n }\n }\n `,\n ];\n\n protected render(): HTMLTemplate {\n return html`<a href=\"${ifDefined(this.href)}\" target=\"${this.target}\">\n ${htmlSlot()}\n <i> ${this._arrowSwitcher()} </i>\n </a>`;\n }\n\n private _arrowSwitcher(): HTMLTemplate {\n switch (this.arrow) {\n case \"delta\":\n return svgDelta();\n case \"arrow\":\n return svgArrow(true);\n case \"angle\":\n return svgArrow();\n default:\n return htmlSlot(\"icon\");\n }\n }\n}\n\nexport default SuperA;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"super-a\": SuperA;\n }\n}\n"]}
@@ -1,5 +1,5 @@
1
- import { type HTMLTemplate } from "../lib/templates.js";
2
- import ItemsSTD from "./std.js";
1
+ import { type HTMLTemplate } from "../../lib/templates.js";
2
+ import { GodownElement } from "../../root.js";
3
3
  declare const colors: {
4
4
  black: string[];
5
5
  gary: string[];
@@ -15,7 +15,7 @@ type Colors = keyof typeof colors;
15
15
  *
16
16
  * Inspired by Next-ui.
17
17
  */
18
- export declare class BaseButton extends ItemsSTD {
18
+ export declare class BaseButton extends GodownElement {
19
19
  /**
20
20
  * Whether to disable this element.
21
21
  */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-button.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/button/base-button.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAErE,OAAO,EAAuB,aAAa,EAAE,MAAM,eAAe,CAAC;AAYnE,QAAA,MAAM,MAAM;;;;;;;;CA2CX,CAAC;AAEF,KAAK,MAAM,GAAG,MAAM,OAAO,MAAM,CAAC;AAElC;;;;GAIG;AACH,qBACa,UAAW,SAAQ,aAAa;IAC3C;;OAEG;IACyC,QAAQ,UAAS;IAC7D;;OAEG;IACyC,KAAK,UAAS;IAC1D;;OAEG;IACyC,MAAM,UAAS;IAC3D;;OAEG;IACyC,MAAM,UAAS;IAC3D;;OAEG;IACyC,KAAK,UAAS;IAC1D;;OAEG;IACS,KAAK,EAAE,MAAM,GAAG,MAAM,CAAW;IAC7C;;OAEG;IACS,IAAI,SAAM;IAEV,EAAE,EAAE,WAAW,CAAC;IACd,IAAI,EAAE,iBAAiB,CAAC;IAEtC,MAAM,CAAC,MAAM,4BAuHX;IAEF,SAAS,CAAC,MAAM,IAAI,YAAY;IAShC,KAAK;IAOL,IAAI;IAIJ,SAAS,CAAC,YAAY;IAiBtB,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,UAAU;IAgBpC,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,UAAU;IAYpC;;;;;;;;;;;;;;;OAeG;IACH,SAAS,IAAI,MAAM,GAAG,MAAM;CAG7B;AAED,eAAe,UAAU,CAAC;AAE1B,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,UAAU,CAAC;KAC3B;CACF"}
@@ -1,14 +1,8 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { createScope, define } from "../root.js";
8
- import { css, html, property, query, unsafeCSS } from "../deps.js";
9
- import { htmlSlot } from "../lib/templates.js";
10
- import { constructCSS } from "../lib/utils.js";
11
- import ItemsSTD from "./std.js";
1
+ import { __decorate } from "tslib";
2
+ import { css, html, property, query, unsafeCSS } from "../../deps.js";
3
+ import { htmlSlot } from "../../lib/templates.js";
4
+ import { constructCSS } from "../../lib/utils.js";
5
+ import { createScope, define, GodownElement } from "../../root.js";
12
6
  const defineName = "base-button";
13
7
  const cssvarScope = createScope(defineName);
14
8
  const shadow1 = "-2px 2px 5px -2px";
@@ -19,43 +13,43 @@ const _000 = "#000";
19
13
  const vars = ["color", "background", "box-shadow", "ghost-color"];
20
14
  const colors = {
21
15
  black: [
22
- fff,
16
+ fff, //
23
17
  `${linearGradient}(45deg, rgb(30 30 30), rgb(65 65 65))`,
24
18
  `${shadow1} rgb(0 0 0 / 20%), ${shadow2} rgb(99 99 99 / 20%)`,
25
19
  "rgb(22 20 20)",
26
20
  ],
27
21
  gary: [
28
- fff,
22
+ fff, //
29
23
  `${linearGradient}(45deg, rgb(65 65 65), rgb(100 100 100))`,
30
24
  `${shadow1} rgb(0 0 0 / 20%), ${shadow2} rgb(99 99 99 / 20%)`,
31
25
  "rgb(56 56 56)",
32
26
  ],
33
27
  white: [
34
- _000,
28
+ _000, //
35
29
  `${linearGradient}(45deg, rgb(225 225 225), rgb(240 240 240))`,
36
30
  `${shadow1} rgb(255 255 255 / 20%), ${shadow2} rgb(165 165 165 / 20%)`,
37
31
  "rgb(212 212 212)",
38
32
  ],
39
33
  red: [
40
- fff,
34
+ fff, //
41
35
  `${linearGradient}(45deg, rgb(215 57 68), rgb(250 141 106))`,
42
36
  `${shadow1} rgb(181 35 44 / 20%), ${shadow2} rgb(234 130 174 / 20%)`,
43
37
  "rgb(214 11 23)",
44
38
  ],
45
39
  green: [
46
- _000,
40
+ _000, //
47
41
  `${linearGradient}(45deg, rgb(21 206 71), rgb(99 253 122))`,
48
42
  `${shadow1} rgb(63 179 69 / 20%), ${shadow2} rgb(136 225 142 / 20%)`,
49
43
  "rgb(60 214 68)",
50
44
  ],
51
45
  blue: [
52
- fff,
46
+ fff, //
53
47
  `${linearGradient}(45deg, rgb(14 143 255), rgb(121 211 255))`,
54
48
  `${shadow1} rgb(92 182 255 / 20%), ${shadow2} rgb(135 232 222 / 20%)`,
55
49
  "rgb(42 141 221)",
56
50
  ],
57
51
  yellow: [
58
- _000,
52
+ _000, //
59
53
  `${linearGradient}(45deg, rgb(255 190 54), rgb(255 249 68))`,
60
54
  `${shadow1} rgb(214 203 55 / 20%), ${shadow2} rgb(202 203 137 / 20%)`,
61
55
  "rgb(255 235 59)",
@@ -66,7 +60,7 @@ const colors = {
66
60
  *
67
61
  * Inspired by Next-ui.
68
62
  */
69
- let BaseButton = class BaseButton extends ItemsSTD {
63
+ let BaseButton = class BaseButton extends GodownElement {
70
64
  constructor() {
71
65
  super(...arguments);
72
66
  /**
@@ -98,90 +92,9 @@ let BaseButton = class BaseButton extends ItemsSTD {
98
92
  */
99
93
  this.text = "";
100
94
  }
101
- render() {
102
- return html `
103
- <div color="${this.nextColor()}">
104
- <b></b>
105
- <p>${this.text || htmlSlot()}</p>
106
- </div>
107
- `;
108
- }
109
- focus() {
110
- if (this.disabled) {
111
- return;
112
- }
113
- this.active = true;
114
- }
115
- blur() {
116
- this.active = false;
117
- }
118
- firstUpdated() {
119
- if (this.scale) {
120
- this.addEvent(this, "mousedown", this.focus);
121
- this.addEvent(this, "mouseup", (e) => {
122
- if (this.disabled) {
123
- return;
124
- }
125
- this.blur();
126
- this._handleModal(e);
127
- });
128
- this.addEvent(this, "mouseleave", this.blur);
129
- return;
130
- }
131
- else {
132
- this.addEvent(document, "click", this._handelClick.bind(this));
133
- }
134
- }
135
- _handleModal(e) {
136
- const a = this._div.offsetHeight + 1;
137
- const b = this._div.offsetWidth + 1;
138
- const size = `${Math.sqrt(a * a + b * b) * 2}px`;
139
- const translate = `translate(calc(-50% + ${e.offsetX}px), calc(-50% + ${e.offsetY}px))`;
140
- this._b.style.width = size;
141
- this._b.style.height = size;
142
- this._b.style.transform = translate;
143
- const i = document.createElement("i");
144
- i.style.animationName = "i";
145
- this._b.appendChild(i);
146
- setTimeout(() => {
147
- i.remove();
148
- }, 2000);
149
- }
150
- _handelClick(e) {
151
- if (this.disabled) {
152
- return;
153
- }
154
- if (e.target === this) {
155
- this._handleModal(e);
156
- this.focus();
157
- }
158
- else {
159
- this.blur();
160
- }
161
- }
162
- /**
163
- * Get the color to render, default is this.color.
164
- *
165
- * @returns New color.
166
- *
167
- * Colors can be set for different states.
168
- *
169
- * The matching selector is `[color=COLOR]`.
170
- *
171
- * @example
172
- * ```ts
173
- * button.adoptStyles("[color=COLOR1]{...}")
174
- * button.adoptStyles("[color=COLOR2]{...}")
175
- * button.nextColor = () => state ? COLOR1 : COLOR2
176
- * ```
177
- */
178
- nextColor() {
179
- return this.color;
180
- }
181
- };
182
- BaseButton.styles = [
183
- unsafeCSS(constructCSS(vars, colors, (raw) => `[color=${raw}]`, (k, v) => `${cssvarScope}--${k}:${v}`)),
184
- css `
95
+ static { this.styles = [
96
+ unsafeCSS(constructCSS(vars, colors, (raw) => `[color=${raw}]`, (k, v) => `${cssvarScope}--${k}:${v}`)),
97
+ css `
185
98
  :host {
186
99
  ${cssvarScope}--padding: .075em .25em;
187
100
  ${cssvarScope}--deg: .075em .25em;
@@ -213,7 +126,7 @@ BaseButton.styles = [
213
126
  div {
214
127
  background: var(${cssvarScope}--background);
215
128
  box-shadow: var(${cssvarScope}--box-shadow);
216
- color: var(--godown--base-button--color, inherit);
129
+ color: var(${cssvarScope}--color, inherit);
217
130
  width: 100%;
218
131
  height: 100%;
219
132
  position: relative;
@@ -256,7 +169,7 @@ BaseButton.styles = [
256
169
  ${cssvarScope}--padding: .075em .5em;
257
170
  }
258
171
  `,
259
- css `
172
+ css `
260
173
  i {
261
174
  position: absolute;
262
175
  top: 0;
@@ -291,7 +204,88 @@ BaseButton.styles = [
291
204
  }
292
205
  }
293
206
  `,
294
- ];
207
+ ]; }
208
+ render() {
209
+ return html `
210
+ <div color="${this.nextColor()}">
211
+ <b></b>
212
+ <p>${this.text || htmlSlot()}</p>
213
+ </div>
214
+ `;
215
+ }
216
+ focus() {
217
+ if (this.disabled) {
218
+ return;
219
+ }
220
+ this.active = true;
221
+ }
222
+ blur() {
223
+ this.active = false;
224
+ }
225
+ firstUpdated() {
226
+ if (this.scale) {
227
+ this.addEvent(this, "mousedown", this.focus);
228
+ this.addEvent(this, "mouseup", (e) => {
229
+ if (this.disabled) {
230
+ return;
231
+ }
232
+ this.blur();
233
+ this._handleModal(e);
234
+ });
235
+ this.addEvent(this, "mouseleave", this.blur);
236
+ return;
237
+ }
238
+ else {
239
+ this.addEvent(document, "click", this._handelClick.bind(this));
240
+ }
241
+ }
242
+ _handleModal(e) {
243
+ const a = this._div.offsetHeight + 1;
244
+ const b = this._div.offsetWidth + 1;
245
+ const size = `${Math.sqrt(a * a + b * b) * 2}px`;
246
+ const translate = `translate(calc(-50% + ${e.offsetX}px), calc(-50% + ${e.offsetY}px))`;
247
+ this._b.style.width = size;
248
+ this._b.style.height = size;
249
+ this._b.style.transform = translate;
250
+ const i = document.createElement("i");
251
+ i.style.animationName = "i";
252
+ this._b.appendChild(i);
253
+ setTimeout(() => {
254
+ i.remove();
255
+ }, 2000);
256
+ }
257
+ _handelClick(e) {
258
+ if (this.disabled) {
259
+ return;
260
+ }
261
+ if (e.target === this) {
262
+ this._handleModal(e);
263
+ this.focus();
264
+ }
265
+ else {
266
+ this.blur();
267
+ }
268
+ }
269
+ /**
270
+ * Get the color to render, default is this.color.
271
+ *
272
+ * @returns New color.
273
+ *
274
+ * Colors can be set for different states.
275
+ *
276
+ * The matching selector is `[color=COLOR]`.
277
+ *
278
+ * @example
279
+ * ```ts
280
+ * button.adoptStyles("[color=COLOR1]{...}")
281
+ * button.adoptStyles("[color=COLOR2]{...}")
282
+ * button.nextColor = () => state ? COLOR1 : COLOR2
283
+ * ```
284
+ */
285
+ nextColor() {
286
+ return this.color;
287
+ }
288
+ };
295
289
  __decorate([
296
290
  property({ type: Boolean, reflect: true })
297
291
  ], BaseButton.prototype, "disabled", void 0);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-button.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/button/base-button.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAqB,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnE,MAAM,UAAU,GAAG,aAAa,CAAC;AACjC,MAAM,WAAW,GAAG,WAAW,CAAC,UAAU,CAAC,CAAC;AAE5C,MAAM,OAAO,GAAG,mBAAmB,CAAC;AACpC,MAAM,OAAO,GAAG,mBAAmB,CAAC;AACpC,MAAM,cAAc,GAAG,iBAAiB,CAAC;AACzC,MAAM,GAAG,GAAG,MAAM,CAAC;AACnB,MAAM,IAAI,GAAG,MAAM,CAAC;AAEpB,MAAM,IAAI,GAAG,CAAC,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,CAAC,CAAC;AAClE,MAAM,MAAM,GAAG;IACb,KAAK,EAAE;QACL,GAAG,EAAE,EAAE;QACP,GA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} from \"../../deps.js\";\nimport { htmlSlot, type HTMLTemplate } from \"../../lib/templates.js\";\nimport { constructCSS } from \"../../lib/utils.js\";\nimport { createScope, define, GodownElement } from \"../../root.js\";\n\nconst defineName = \"base-button\";\nconst cssvarScope = createScope(defineName);\n\nconst shadow1 = \"-2px 2px 5px -2px\";\nconst shadow2 = \"2px -2px 5px -2px\";\nconst linearGradient = \"linear-gradient\";\nconst fff = \"#fff\";\nconst _000 = \"#000\";\n\nconst vars = [\"color\", \"background\", \"box-shadow\", \"ghost-color\"];\nconst colors = {\n black: [\n fff, //\n `${linearGradient}(45deg, rgb(30 30 30), rgb(65 65 65))`,\n `${shadow1} rgb(0 0 0 / 20%), ${shadow2} rgb(99 99 99 / 20%)`,\n \"rgb(22 20 20)\",\n ],\n gary: [\n fff, //\n `${linearGradient}(45deg, rgb(65 65 65), rgb(100 100 100))`,\n `${shadow1} rgb(0 0 0 / 20%), ${shadow2} rgb(99 99 99 / 20%)`,\n \"rgb(56 56 56)\",\n ],\n white: [\n _000, //\n `${linearGradient}(45deg, rgb(225 225 225), rgb(240 240 240))`,\n `${shadow1} rgb(255 255 255 / 20%), ${shadow2} rgb(165 165 165 / 20%)`,\n \"rgb(212 212 212)\",\n ],\n red: [\n fff, //\n `${linearGradient}(45deg, rgb(215 57 68), rgb(250 141 106))`,\n `${shadow1} rgb(181 35 44 / 20%), ${shadow2} rgb(234 130 174 / 20%)`,\n \"rgb(214 11 23)\",\n ],\n green: [\n _000, //\n `${linearGradient}(45deg, rgb(21 206 71), rgb(99 253 122))`,\n `${shadow1} rgb(63 179 69 / 20%), ${shadow2} rgb(136 225 142 / 20%)`,\n \"rgb(60 214 68)\",\n ],\n blue: [\n fff, //\n `${linearGradient}(45deg, rgb(14 143 255), rgb(121 211 255))`,\n `${shadow1} rgb(92 182 255 / 20%), ${shadow2} rgb(135 232 222 / 20%)`,\n \"rgb(42 141 221)\",\n ],\n yellow: [\n _000, //\n `${linearGradient}(45deg, rgb(255 190 54), rgb(255 249 68))`,\n `${shadow1} rgb(214 203 55 / 20%), ${shadow2} rgb(202 203 137 / 20%)`,\n \"rgb(255 235 59)\",\n ],\n};\n\ntype Colors = keyof typeof colors;\n\n/**\n * BaseButton.\n *\n * Inspired by Next-ui.\n */\n@define(defineName)\nexport class BaseButton extends GodownElement {\n /**\n * Whether to disable this element.\n */\n @property({ type: Boolean, reflect: true }) disabled = false;\n /**\n * Invert font and background color.\n */\n @property({ type: Boolean, reflect: true }) ghost = false;\n /**\n * Whether this element is active or not.\n */\n @property({ type: Boolean, reflect: true }) active = false;\n /**\n * Enables rounded corners to appear capsule shaped.\n */\n @property({ type: Boolean, reflect: true }) radius = false;\n /**\n * Enables scale when mousedown.\n */\n @property({ type: Boolean, reflect: true }) scale = false;\n /**\n * The primary color.\n */\n @property() color: \"none\" | Colors = \"black\";\n /**\n * Text inside.\n */\n @property() text = \"\";\n\n @query(\"b\") _b: HTMLElement;\n @query(\"div\") _div: HTMLButtonElement;\n\n static styles = [\n unsafeCSS(\n constructCSS(\n vars,\n colors,\n (raw) => `[color=${raw}]`,\n (k, v) => `${cssvarScope}--${k}:${v}`,\n ),\n ),\n css`\n :host {\n ${cssvarScope}--padding: .075em .25em;\n ${cssvarScope}--deg: .075em .25em;\n ${cssvarScope}--ghost-width: .09em;\n ${cssvarScope}--modal-opacity: .15;\n ${cssvarScope}--modal-opacity-end: 0;\n ${cssvarScope}--modal-animation-duration: 1s;\n ${cssvarScope}--focus-scale: .975;\n transition: 0.1s;\n display: flex;\n width: fit-content;\n border-radius: 0.25em;\n cursor: pointer;\n background: none !important;\n }\n\n :host([disabled]) {\n cursor: not-allowed;\n }\n\n :host([active][scale]) div {\n scale: var(${cssvarScope}--focus-scale);\n }\n\n slot {\n display: flow-root;\n }\n\n div {\n background: var(${cssvarScope}--background);\n box-shadow: var(${cssvarScope}--box-shadow);\n color: var(${cssvarScope}--color, inherit);\n width: 100%;\n height: 100%;\n position: relative;\n overflow: hidden;\n border-radius: inherit;\n transition-duration: inherit;\n transition-property: scale;\n pointer-events: none;\n }\n\n b {\n pointer-events: none;\n transform: translate(-50%, -50%);\n position: absolute;\n visibility: hidden;\n }\n\n p {\n padding: var(${cssvarScope}--padding);\n margin: 0;\n user-select: none;\n transition: 0;\n }\n\n :host([ghost]) p {\n background-image: var(${cssvarScope}--background);\n margin: calc(-1 * var(${cssvarScope}--ghost-width));\n background-clip: text;\n -webkit-background-clip: text;\n color: transparent;\n }\n\n :host([ghost]) div {\n background: transparent;\n border: var(${cssvarScope}--ghost-width) solid var(${cssvarScope}--ghost-color);\n }\n\n :host([radius]) {\n border-radius: calc(infinity * 1px);\n ${cssvarScope}--padding: .075em .5em;\n }\n `,\n css`\n i {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n border-radius: 50%;\n transform: translate(0, 0);\n background: currentColor;\n opacity: var(${cssvarScope}--modal-opacity-end);\n visibility: visible;\n animation-duration: min(var(${cssvarScope}--modal-animation-duration), 2s);\n }\n\n :host([ghost]) i {\n background: var(${cssvarScope}--ghost-color);\n }\n\n @keyframes i {\n 0% {\n transform: scale(0);\n opacity: var(${cssvarScope}--modal-opacity);\n }\n 80% {\n transform: scale(1);\n }\n 100% {\n opacity: var(${cssvarScope}--modal-opacity-end);\n }\n }\n `,\n ];\n\n protected render(): HTMLTemplate {\n return html`\n <div color=\"${this.nextColor()}\">\n <b></b>\n <p>${this.text || htmlSlot()}</p>\n </div>\n `;\n }\n\n focus() {\n if (this.disabled) {\n return;\n }\n this.active = true;\n }\n\n blur() {\n this.active = false;\n }\n\n protected firstUpdated() {\n if (this.scale) {\n this.addEvent(this, \"mousedown\", this.focus);\n this.addEvent(this, \"mouseup\", (e: MouseEvent) => {\n if (this.disabled) {\n return;\n }\n this.blur();\n this._handleModal(e);\n });\n this.addEvent(this, \"mouseleave\", this.blur);\n return;\n } else {\n this.addEvent(document, \"click\", this._handelClick.bind(this));\n }\n }\n\n protected _handleModal(e: MouseEvent) {\n const a = this._div.offsetHeight + 1;\n const b = this._div.offsetWidth + 1;\n const size = `${Math.sqrt(a * a + b * b) * 2}px`;\n const translate = `translate(calc(-50% + ${e.offsetX}px), calc(-50% + ${e.offsetY}px))`;\n this._b.style.width = size;\n this._b.style.height = size;\n this._b.style.transform = translate;\n const i = document.createElement(\"i\");\n i.style.animationName = \"i\";\n this._b.appendChild(i);\n setTimeout(() => {\n i.remove();\n }, 2000);\n }\n\n protected _handelClick(e: MouseEvent) {\n if (this.disabled) {\n return;\n }\n if (e.target === this) {\n this._handleModal(e);\n this.focus();\n } else {\n this.blur();\n }\n }\n\n /**\n * Get the color to render, default is this.color.\n *\n * @returns New color.\n *\n * Colors can be set for different states.\n *\n * The matching selector is `[color=COLOR]`.\n *\n * @example\n * ```ts\n * button.adoptStyles(\"[color=COLOR1]{...}\")\n * button.adoptStyles(\"[color=COLOR2]{...}\")\n * button.nextColor = () => state ? COLOR1 : COLOR2\n * ```\n */\n nextColor(): Colors | string {\n return this.color;\n }\n}\n\nexport default BaseButton;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"base-button\": BaseButton;\n }\n}\n"]}
@@ -1,9 +1,9 @@
1
- import { type HTMLTemplate } from "../lib/templates.js";
2
- import { GodownElement } from "../root.js";
1
+ import { type HTMLTemplate } from "../../lib/templates.js";
2
+ import { GodownElement } from "../../root.js";
3
3
  /**
4
- * RotationPool rotates child elements.
4
+ * CarouselSlider rotates child elements.
5
5
  */
6
- export declare class RotationPool extends GodownElement {
6
+ export declare class CarouselSlider extends GodownElement {
7
7
  /**
8
8
  * The index of the element is displayed for the first time.
9
9
  */
@@ -29,10 +29,10 @@ export declare class RotationPool extends GodownElement {
29
29
  next(): void;
30
30
  prev(): void;
31
31
  }
32
- export default RotationPool;
32
+ export default CarouselSlider;
33
33
  declare global {
34
34
  interface HTMLElementTagNameMap {
35
- "rotation-port": RotationPool;
35
+ "rotation-port": CarouselSlider;
36
36
  }
37
37
  }
38
- //# sourceMappingURL=rotation-pool.d.ts.map
38
+ //# sourceMappingURL=carousel-slider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"carousel-slider.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/carousel/carousel-slider.ts"],"names":[],"mappings":"AACA,OAAO,EAAuB,KAAK,YAAY,EAAY,MAAM,wBAAwB,CAAC;AAE1F,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAI9C;;GAEG;AACH,qBACa,cAAe,SAAQ,aAAa;IAC/C;;OAEG;IACyB,KAAK,SAAK;IACtC;;OAEG;IACyB,UAAU,SAAK;IAC3C;;OAEG;IACS,KAAK,SAAM;IAEL,QAAQ,EAAE,WAAW,CAAC;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,WAAW,EAAE,CAAM;IAE3B,MAAM,CAAC,MAAM,4BAqEX;IAEF,SAAS,CAAC,MAAM,IAAI,YAAY;IAUhC,OAAO,CAAC,OAAO;IAOf,OAAO,CAAC,KAAK,CAAC,EAAE,MAAM;IAOtB,SAAS,CAAC,YAAY;IAwBtB,oBAAoB;IAIpB,IAAI,CAAC,CAAC,EAAE,MAAM;IAMd,IAAI;IAWJ,IAAI;CAUL;AAED,eAAe,cAAc,CAAC;AAE9B,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,eAAe,EAAE,cAAc,CAAC;KACjC;CACF"}