godown 2.5.1 → 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 (497) 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.map +1 -1
  39. package/conf.js.map +1 -1
  40. package/deps.d.ts +4 -3
  41. package/deps.d.ts.map +1 -1
  42. package/deps.js +4 -3
  43. package/deps.js.map +1 -1
  44. package/details-group.d.ts +2 -0
  45. package/details-group.d.ts.map +1 -0
  46. package/details-group.js +2 -0
  47. package/details-group.js.map +1 -0
  48. package/divider-line.d.ts +2 -0
  49. package/divider-line.d.ts.map +1 -0
  50. package/divider-line.js +2 -0
  51. package/divider-line.js.map +1 -0
  52. package/drag-box.d.ts +2 -0
  53. package/drag-box.d.ts.map +1 -0
  54. package/drag-box.js +2 -0
  55. package/drag-box.js.map +1 -0
  56. package/flex-flow.d.ts +2 -0
  57. package/flex-flow.d.ts.map +1 -0
  58. package/flex-flow.js +2 -0
  59. package/flex-flow.js.map +1 -0
  60. package/godown-element.d.ts +2 -2
  61. package/godown-element.d.ts.map +1 -1
  62. package/godown-element.js +1 -1
  63. package/godown-element.js.map +1 -1
  64. package/index.d.ts +2 -6
  65. package/index.d.ts.map +1 -1
  66. package/index.js +2 -6
  67. package/index.js.map +1 -1
  68. package/label-input.d.ts +2 -0
  69. package/label-input.d.ts.map +1 -0
  70. package/label-input.js +2 -0
  71. package/label-input.js.map +1 -0
  72. package/lib/directives.d.ts.map +1 -1
  73. package/lib/directives.js.map +1 -1
  74. package/lib/event-collection.d.ts +1 -1
  75. package/lib/event-collection.d.ts.map +1 -1
  76. package/lib/event-collection.js.map +1 -1
  77. package/lib/route-tree.d.ts.map +1 -1
  78. package/lib/route-tree.js.map +1 -1
  79. package/lib/templates.d.ts.map +1 -1
  80. package/lib/templates.js.map +1 -1
  81. package/lib/utils.d.ts.map +1 -1
  82. package/lib/utils.js.map +1 -1
  83. package/link-a.d.ts +2 -0
  84. package/link-a.d.ts.map +1 -0
  85. package/link-a.js +2 -0
  86. package/link-a.js.map +1 -0
  87. package/loading-progress.d.ts +2 -0
  88. package/loading-progress.d.ts.map +1 -0
  89. package/loading-progress.js +2 -0
  90. package/loading-progress.js.map +1 -0
  91. package/nav-aside.d.ts +2 -0
  92. package/nav-aside.d.ts.map +1 -0
  93. package/nav-aside.js +2 -0
  94. package/nav-aside.js.map +1 -0
  95. package/nav-layout.d.ts +2 -0
  96. package/nav-layout.d.ts.map +1 -0
  97. package/nav-layout.js +2 -0
  98. package/nav-layout.js.map +1 -0
  99. package/open-details.d.ts +2 -0
  100. package/open-details.d.ts.map +1 -0
  101. package/open-details.js +2 -0
  102. package/open-details.js.map +1 -0
  103. package/open-dialog.d.ts +2 -0
  104. package/open-dialog.d.ts.map +1 -0
  105. package/open-dialog.js +2 -0
  106. package/open-dialog.js.map +1 -0
  107. package/open-list.d.ts +2 -0
  108. package/open-list.d.ts.map +1 -0
  109. package/open-list.js +2 -0
  110. package/open-list.js.map +1 -0
  111. package/open-offset.d.ts +2 -0
  112. package/open-offset.d.ts.map +1 -0
  113. package/open-offset.js +2 -0
  114. package/open-offset.js.map +1 -0
  115. package/open-tooltip.d.ts +2 -0
  116. package/open-tooltip.d.ts.map +1 -0
  117. package/open-tooltip.js +2 -0
  118. package/open-tooltip.js.map +1 -0
  119. package/overbreath-text.d.ts +2 -0
  120. package/overbreath-text.d.ts.map +1 -0
  121. package/overbreath-text.js +2 -0
  122. package/overbreath-text.js.map +1 -0
  123. package/package.json +57 -10
  124. package/react/create.d.ts.map +1 -1
  125. package/react/create.js.map +1 -1
  126. package/react/index.d.ts +37 -7
  127. package/react/index.d.ts.map +1 -1
  128. package/react/index.js +114 -7
  129. package/react/index.js.map +1 -1
  130. package/root.d.ts.map +1 -1
  131. package/root.js +3 -2
  132. package/root.js.map +1 -1
  133. package/route-view.d.ts +2 -0
  134. package/route-view.d.ts.map +1 -0
  135. package/route-view.js +2 -0
  136. package/route-view.js.map +1 -0
  137. package/scroll-x.d.ts +2 -0
  138. package/scroll-x.d.ts.map +1 -0
  139. package/scroll-x.js +2 -0
  140. package/scroll-x.js.map +1 -0
  141. package/search-input.d.ts +2 -0
  142. package/search-input.d.ts.map +1 -0
  143. package/search-input.js +2 -0
  144. package/search-input.js.map +1 -0
  145. package/select-input.d.ts +2 -0
  146. package/select-input.d.ts.map +1 -0
  147. package/select-input.js +2 -0
  148. package/select-input.js.map +1 -0
  149. package/sign-form.d.ts +2 -0
  150. package/sign-form.d.ts.map +1 -0
  151. package/sign-form.js +2 -0
  152. package/sign-form.js.map +1 -0
  153. package/skeleton-screen.d.ts +2 -0
  154. package/skeleton-screen.d.ts.map +1 -0
  155. package/skeleton-screen.js +2 -0
  156. package/skeleton-screen.js.map +1 -0
  157. package/split-input.d.ts +2 -0
  158. package/split-input.d.ts.map +1 -0
  159. package/split-input.js +2 -0
  160. package/split-input.js.map +1 -0
  161. package/super-a.d.ts +2 -0
  162. package/super-a.d.ts.map +1 -0
  163. package/super-a.js +2 -0
  164. package/super-a.js.map +1 -0
  165. package/switch-input.d.ts +2 -0
  166. package/switch-input.d.ts.map +1 -0
  167. package/switch-input.js +2 -0
  168. package/switch-input.js.map +1 -0
  169. package/tab-group.d.ts +2 -0
  170. package/tab-group.d.ts.map +1 -0
  171. package/tab-group.js +2 -0
  172. package/tab-group.js.map +1 -0
  173. package/time-bar.d.ts +2 -0
  174. package/time-bar.d.ts.map +1 -0
  175. package/time-bar.js +2 -0
  176. package/time-bar.js.map +1 -0
  177. package/typewriter-text.d.ts +2 -0
  178. package/typewriter-text.d.ts.map +1 -0
  179. package/typewriter-text.js +2 -0
  180. package/typewriter-text.js.map +1 -0
  181. package/{items → web-components/a}/avatar-a.d.ts +7 -7
  182. package/web-components/a/avatar-a.d.ts.map +1 -0
  183. package/{items → web-components/a}/avatar-a.js +57 -62
  184. package/web-components/a/avatar-a.js.map +1 -0
  185. package/{items → web-components/a}/link-a.d.ts +6 -6
  186. package/web-components/a/link-a.d.ts.map +1 -0
  187. package/{items → web-components/a}/link-a.js +16 -21
  188. package/web-components/a/link-a.js.map +1 -0
  189. package/{items → web-components/a}/super-a.d.ts +5 -5
  190. package/web-components/a/super-a.d.ts.map +1 -0
  191. package/{items → web-components/a}/super-a.js +34 -40
  192. package/web-components/a/super-a.js.map +1 -0
  193. package/{items → web-components/button}/base-button.d.ts +3 -3
  194. package/web-components/button/base-button.d.ts.map +1 -0
  195. package/{items → web-components/button}/base-button.js +99 -105
  196. package/web-components/button/base-button.js.map +1 -0
  197. package/{view/rotation-pool.d.ts → web-components/carousel/carousel-slider.d.ts} +7 -7
  198. package/web-components/carousel/carousel-slider.d.ts.map +1 -0
  199. package/{view/rotation-pool.js → web-components/carousel/carousel-slider.js} +87 -92
  200. package/web-components/carousel/carousel-slider.js.map +1 -0
  201. package/{input-form/sign-form.d.ts → web-components/form/base-form.d.ts} +9 -18
  202. package/web-components/form/base-form.d.ts.map +1 -0
  203. package/{input-form/sign-form.js → web-components/form/base-form.js} +32 -40
  204. package/web-components/form/base-form.js.map +1 -0
  205. package/web-components/form/sign-form.d.ts +19 -0
  206. package/web-components/form/sign-form.d.ts.map +1 -0
  207. package/web-components/form/sign-form.js +16 -0
  208. package/web-components/form/sign-form.js.map +1 -0
  209. package/{group → web-components/group}/avatar-group.d.ts +6 -6
  210. package/web-components/group/avatar-group.d.ts.map +1 -0
  211. package/{group → web-components/group}/avatar-group.js +24 -30
  212. package/web-components/group/avatar-group.js.map +1 -0
  213. package/{group → web-components/group}/details-group.d.ts +3 -3
  214. package/web-components/group/details-group.d.ts.map +1 -0
  215. package/{group → web-components/group}/details-group.js +12 -18
  216. package/web-components/group/details-group.js.map +1 -0
  217. package/{group → web-components/group}/tab-group.d.ts +4 -4
  218. package/web-components/group/tab-group.d.ts.map +1 -0
  219. package/{group → web-components/group}/tab-group.js +50 -56
  220. package/web-components/group/tab-group.js.map +1 -0
  221. package/web-components/index.d.ts +38 -0
  222. package/web-components/index.d.ts.map +1 -0
  223. package/web-components/index.js +39 -0
  224. package/web-components/index.js.map +1 -0
  225. package/{input-form → web-components/input}/base-input.d.ts +4 -4
  226. package/web-components/input/base-input.d.ts.map +1 -0
  227. package/{input-form → web-components/input}/base-input.js +79 -84
  228. package/web-components/input/base-input.js.map +1 -0
  229. package/{input-form/std.d.ts → web-components/input/input.d.ts} +4 -16
  230. package/web-components/input/input.d.ts.map +1 -0
  231. package/{input-form/std.js → web-components/input/input.js} +27 -54
  232. package/web-components/input/input.js.map +1 -0
  233. package/{input-form → web-components/input}/label-input.d.ts +4 -4
  234. package/web-components/input/label-input.d.ts.map +1 -0
  235. package/{input-form → web-components/input}/label-input.js +55 -60
  236. package/web-components/input/label-input.js.map +1 -0
  237. package/{input-form → web-components/input}/search-input.d.ts +4 -4
  238. package/web-components/input/search-input.d.ts.map +1 -0
  239. package/{input-form → web-components/input}/search-input.js +59 -64
  240. package/web-components/input/search-input.js.map +1 -0
  241. package/{input-form → web-components/input}/select-input.d.ts +4 -4
  242. package/web-components/input/select-input.d.ts.map +1 -0
  243. package/{input-form → web-components/input}/select-input.js +95 -100
  244. package/web-components/input/select-input.js.map +1 -0
  245. package/{input-form → web-components/input}/split-input.d.ts +4 -4
  246. package/web-components/input/split-input.d.ts.map +1 -0
  247. package/{input-form → web-components/input}/split-input.js +56 -61
  248. package/web-components/input/split-input.js.map +1 -0
  249. package/{input-form → web-components/input}/switch-input.d.ts +4 -4
  250. package/web-components/input/switch-input.d.ts.map +1 -0
  251. package/{input-form → web-components/input}/switch-input.js +42 -47
  252. package/web-components/input/switch-input.js.map +1 -0
  253. package/{items → web-components/items}/alert-item.d.ts +3 -3
  254. package/web-components/items/alert-item.d.ts.map +1 -0
  255. package/{items → web-components/items}/alert-item.js +38 -43
  256. package/web-components/items/alert-item.js.map +1 -0
  257. package/{items → web-components/items}/card-item.d.ts +4 -4
  258. package/web-components/items/card-item.d.ts.map +1 -0
  259. package/{items → web-components/items}/card-item.js +57 -63
  260. package/web-components/items/card-item.js.map +1 -0
  261. package/{layout → web-components/items}/drag-box.d.ts +3 -3
  262. package/web-components/items/drag-box.d.ts.map +1 -0
  263. package/{layout → web-components/items}/drag-box.js +13 -19
  264. package/web-components/items/drag-box.js.map +1 -0
  265. package/web-components/items/index.d.ts +5 -0
  266. package/web-components/items/index.d.ts.map +1 -0
  267. package/web-components/items/index.js +6 -0
  268. package/web-components/items/index.js.map +1 -0
  269. package/{items → web-components/items}/time-bar.d.ts +3 -3
  270. package/web-components/items/time-bar.d.ts.map +1 -0
  271. package/{items → web-components/items}/time-bar.js +12 -17
  272. package/web-components/items/time-bar.js.map +1 -0
  273. package/web-components/layout/divider-line.d.ts +20 -0
  274. package/web-components/layout/divider-line.d.ts.map +1 -0
  275. package/{layout/div-line.js → web-components/layout/divider-line.js} +24 -30
  276. package/web-components/layout/divider-line.js.map +1 -0
  277. package/{layout → web-components/layout}/flex-flow.d.ts +3 -3
  278. package/web-components/layout/flex-flow.d.ts.map +1 -0
  279. package/{layout → web-components/layout}/flex-flow.js +12 -18
  280. package/web-components/layout/flex-flow.js.map +1 -0
  281. package/web-components/layout/index.d.ts +5 -0
  282. package/web-components/layout/index.d.ts.map +1 -0
  283. package/web-components/layout/index.js +6 -0
  284. package/web-components/layout/index.js.map +1 -0
  285. package/{layout → web-components/layout}/nav-aside.d.ts +4 -4
  286. package/web-components/layout/nav-aside.d.ts.map +1 -0
  287. package/{layout → web-components/layout}/nav-aside.js +19 -25
  288. package/web-components/layout/nav-aside.js.map +1 -0
  289. package/{layout → web-components/layout}/nav-layout.d.ts +4 -4
  290. package/web-components/layout/nav-layout.d.ts.map +1 -0
  291. package/{layout → web-components/layout}/nav-layout.js +31 -37
  292. package/web-components/layout/nav-layout.js.map +1 -0
  293. package/{items/load-progress.d.ts → web-components/loading/loading-progress.d.ts} +7 -7
  294. package/web-components/loading/loading-progress.d.ts.map +1 -0
  295. package/{items/load-progress.js → web-components/loading/loading-progress.js} +41 -47
  296. package/web-components/loading/loading-progress.js.map +1 -0
  297. package/{layout → web-components/loading}/skeleton-screen.d.ts +4 -4
  298. package/web-components/loading/skeleton-screen.d.ts.map +1 -0
  299. package/{layout → web-components/loading}/skeleton-screen.js +24 -30
  300. package/web-components/loading/skeleton-screen.js.map +1 -0
  301. package/{view/details-expand.d.ts → web-components/open/open-details.d.ts} +8 -8
  302. package/web-components/open/open-details.d.ts.map +1 -0
  303. package/{view/details-expand.js → web-components/open/open-details.js} +35 -40
  304. package/web-components/open/open-details.js.map +1 -0
  305. package/{items/dialog-item.d.ts → web-components/open/open-dialog.d.ts} +8 -8
  306. package/web-components/open/open-dialog.d.ts.map +1 -0
  307. package/{items/dialog-item.js → web-components/open/open-dialog.js} +83 -89
  308. package/web-components/open/open-dialog.js.map +1 -0
  309. package/web-components/open/open-list.d.ts +20 -0
  310. package/web-components/open/open-list.d.ts.map +1 -0
  311. package/web-components/open/open-list.js +71 -0
  312. package/web-components/open/open-list.js.map +1 -0
  313. package/{view/offset-expand.d.ts → web-components/open/open-offset.d.ts} +8 -8
  314. package/web-components/open/open-offset.d.ts.map +1 -0
  315. package/{view/offset-expand.js → web-components/open/open-offset.js} +66 -71
  316. package/web-components/open/open-offset.js.map +1 -0
  317. package/web-components/open/open-tooltip.d.ts +24 -0
  318. package/web-components/open/open-tooltip.d.ts.map +1 -0
  319. package/{view/tool-tip.js → web-components/open/open-tooltip.js} +28 -33
  320. package/web-components/open/open-tooltip.js.map +1 -0
  321. package/{view/std.d.ts → web-components/open/open.d.ts} +6 -6
  322. package/web-components/open/open.d.ts.map +1 -0
  323. package/{view/std.js → web-components/open/open.js} +35 -40
  324. package/web-components/open/open.js.map +1 -0
  325. package/{effect → web-components/text}/clip-text.d.ts +4 -4
  326. package/web-components/text/clip-text.d.ts.map +1 -0
  327. package/web-components/text/clip-text.js +44 -0
  328. package/web-components/text/clip-text.js.map +1 -0
  329. package/{effect → web-components/text}/overbreath-text.d.ts +4 -4
  330. package/web-components/text/overbreath-text.d.ts.map +1 -0
  331. package/{effect → web-components/text}/overbreath-text.js +21 -27
  332. package/web-components/text/overbreath-text.js.map +1 -0
  333. package/{effect → web-components/text}/typewriter-text.d.ts +4 -4
  334. package/web-components/text/typewriter-text.d.ts.map +1 -0
  335. package/{effect → web-components/text}/typewriter-text.js +38 -44
  336. package/web-components/text/typewriter-text.js.map +1 -0
  337. package/{view → web-components/view}/route-view.d.ts +4 -4
  338. package/web-components/view/route-view.d.ts.map +1 -0
  339. package/{view → web-components/view}/route-view.js +15 -20
  340. package/web-components/view/route-view.js.map +1 -0
  341. package/{view → web-components/view}/scroll-x.d.ts +2 -2
  342. package/web-components/view/scroll-x.d.ts.map +1 -0
  343. package/{view → web-components/view}/scroll-x.js +35 -40
  344. package/web-components/view/scroll-x.js.map +1 -0
  345. package/{view/with-wrap.d.ts → web-components/view/wrap-view.d.ts} +7 -7
  346. package/web-components/view/wrap-view.d.ts.map +1 -0
  347. package/{view/with-wrap.js → web-components/view/wrap-view.js} +29 -34
  348. package/web-components/view/wrap-view.js.map +1 -0
  349. package/wrap-view.d.ts +2 -0
  350. package/wrap-view.d.ts.map +1 -0
  351. package/wrap-view.js +2 -0
  352. package/wrap-view.js.map +1 -0
  353. package/effect/clip-text.d.ts.map +0 -1
  354. package/effect/clip-text.js +0 -50
  355. package/effect/clip-text.js.map +0 -1
  356. package/effect/index.d.ts +0 -4
  357. package/effect/index.d.ts.map +0 -1
  358. package/effect/index.js +0 -4
  359. package/effect/index.js.map +0 -1
  360. package/effect/overbreath-text.d.ts.map +0 -1
  361. package/effect/overbreath-text.js.map +0 -1
  362. package/effect/std.d.ts +0 -4
  363. package/effect/std.d.ts.map +0 -1
  364. package/effect/std.js +0 -4
  365. package/effect/std.js.map +0 -1
  366. package/effect/typewriter-text.d.ts.map +0 -1
  367. package/effect/typewriter-text.js.map +0 -1
  368. package/group/avatar-group.d.ts.map +0 -1
  369. package/group/avatar-group.js.map +0 -1
  370. package/group/details-group.d.ts.map +0 -1
  371. package/group/details-group.js.map +0 -1
  372. package/group/index.d.ts +0 -4
  373. package/group/index.d.ts.map +0 -1
  374. package/group/index.js +0 -4
  375. package/group/index.js.map +0 -1
  376. package/group/std.d.ts +0 -4
  377. package/group/std.d.ts.map +0 -1
  378. package/group/std.js +0 -4
  379. package/group/std.js.map +0 -1
  380. package/group/tab-group.d.ts.map +0 -1
  381. package/group/tab-group.js.map +0 -1
  382. package/input-form/base-input.d.ts.map +0 -1
  383. package/input-form/base-input.js.map +0 -1
  384. package/input-form/index.d.ts +0 -8
  385. package/input-form/index.d.ts.map +0 -1
  386. package/input-form/index.js +0 -8
  387. package/input-form/index.js.map +0 -1
  388. package/input-form/label-input.d.ts.map +0 -1
  389. package/input-form/label-input.js.map +0 -1
  390. package/input-form/search-input.d.ts.map +0 -1
  391. package/input-form/search-input.js.map +0 -1
  392. package/input-form/select-input.d.ts.map +0 -1
  393. package/input-form/select-input.js.map +0 -1
  394. package/input-form/sign-form.d.ts.map +0 -1
  395. package/input-form/sign-form.js.map +0 -1
  396. package/input-form/split-input.d.ts.map +0 -1
  397. package/input-form/split-input.js.map +0 -1
  398. package/input-form/std.d.ts.map +0 -1
  399. package/input-form/std.js.map +0 -1
  400. package/input-form/switch-input.d.ts.map +0 -1
  401. package/input-form/switch-input.js.map +0 -1
  402. package/items/alert-item.d.ts.map +0 -1
  403. package/items/alert-item.js.map +0 -1
  404. package/items/avatar-a.d.ts.map +0 -1
  405. package/items/avatar-a.js.map +0 -1
  406. package/items/base-button.d.ts.map +0 -1
  407. package/items/base-button.js.map +0 -1
  408. package/items/card-item.d.ts.map +0 -1
  409. package/items/card-item.js.map +0 -1
  410. package/items/dialog-item.d.ts.map +0 -1
  411. package/items/dialog-item.js.map +0 -1
  412. package/items/index.d.ts +0 -10
  413. package/items/index.d.ts.map +0 -1
  414. package/items/index.js +0 -10
  415. package/items/index.js.map +0 -1
  416. package/items/link-a.d.ts.map +0 -1
  417. package/items/link-a.js.map +0 -1
  418. package/items/load-progress.d.ts.map +0 -1
  419. package/items/load-progress.js.map +0 -1
  420. package/items/std.d.ts +0 -4
  421. package/items/std.d.ts.map +0 -1
  422. package/items/std.js +0 -4
  423. package/items/std.js.map +0 -1
  424. package/items/super-a.d.ts.map +0 -1
  425. package/items/super-a.js.map +0 -1
  426. package/items/time-bar.d.ts.map +0 -1
  427. package/items/time-bar.js.map +0 -1
  428. package/layout/div-line.d.ts +0 -20
  429. package/layout/div-line.d.ts.map +0 -1
  430. package/layout/div-line.js.map +0 -1
  431. package/layout/drag-box.d.ts.map +0 -1
  432. package/layout/drag-box.js.map +0 -1
  433. package/layout/flex-flow.d.ts.map +0 -1
  434. package/layout/flex-flow.js.map +0 -1
  435. package/layout/index.d.ts +0 -7
  436. package/layout/index.d.ts.map +0 -1
  437. package/layout/index.js +0 -7
  438. package/layout/index.js.map +0 -1
  439. package/layout/nav-aside.d.ts.map +0 -1
  440. package/layout/nav-aside.js.map +0 -1
  441. package/layout/nav-layout.d.ts.map +0 -1
  442. package/layout/nav-layout.js.map +0 -1
  443. package/layout/skeleton-screen.d.ts.map +0 -1
  444. package/layout/skeleton-screen.js.map +0 -1
  445. package/layout/std.d.ts +0 -4
  446. package/layout/std.d.ts.map +0 -1
  447. package/layout/std.js +0 -4
  448. package/layout/std.js.map +0 -1
  449. package/react/effect.d.ts +0 -5
  450. package/react/effect.d.ts.map +0 -1
  451. package/react/effect.js +0 -13
  452. package/react/effect.js.map +0 -1
  453. package/react/group.d.ts +0 -5
  454. package/react/group.d.ts.map +0 -1
  455. package/react/group.js +0 -13
  456. package/react/group.js.map +0 -1
  457. package/react/input-form.d.ts +0 -28
  458. package/react/input-form.d.ts.map +0 -1
  459. package/react/input-form.js +0 -38
  460. package/react/input-form.js.map +0 -1
  461. package/react/items.d.ts +0 -11
  462. package/react/items.d.ts.map +0 -1
  463. package/react/items.js +0 -31
  464. package/react/items.js.map +0 -1
  465. package/react/layout.d.ts +0 -8
  466. package/react/layout.d.ts.map +0 -1
  467. package/react/layout.js +0 -22
  468. package/react/layout.js.map +0 -1
  469. package/react/view.d.ts +0 -10
  470. package/react/view.d.ts.map +0 -1
  471. package/react/view.js +0 -28
  472. package/react/view.js.map +0 -1
  473. package/view/details-expand.d.ts.map +0 -1
  474. package/view/details-expand.js.map +0 -1
  475. package/view/index.d.ts +0 -9
  476. package/view/index.d.ts.map +0 -1
  477. package/view/index.js +0 -9
  478. package/view/index.js.map +0 -1
  479. package/view/menu-list.d.ts +0 -20
  480. package/view/menu-list.d.ts.map +0 -1
  481. package/view/menu-list.js +0 -76
  482. package/view/menu-list.js.map +0 -1
  483. package/view/offset-expand.d.ts.map +0 -1
  484. package/view/offset-expand.js.map +0 -1
  485. package/view/rotation-pool.d.ts.map +0 -1
  486. package/view/rotation-pool.js.map +0 -1
  487. package/view/route-view.d.ts.map +0 -1
  488. package/view/route-view.js.map +0 -1
  489. package/view/scroll-x.d.ts.map +0 -1
  490. package/view/scroll-x.js.map +0 -1
  491. package/view/std.d.ts.map +0 -1
  492. package/view/std.js.map +0 -1
  493. package/view/tool-tip.d.ts +0 -24
  494. package/view/tool-tip.d.ts.map +0 -1
  495. package/view/tool-tip.js.map +0 -1
  496. package/view/with-wrap.d.ts.map +0 -1
  497. package/view/with-wrap.js.map +0 -1
@@ -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-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,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;
@@ -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,CAA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CAAC;GACN,UAAU,CA8OtB;;AAED,eAAe,UAAU,CAAC","sourcesContent":["import { css, html, property, query, unsafeCSS } 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"}
@@ -1,18 +1,13 @@
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, property, query } from "../deps.js";
8
- import { htmlSlot, htmlStyle, svgArrow } from "../lib/templates.js";
9
- import { define } from "../root.js";
10
- import { GodownElement } from "../root.js";
11
- const defineName = "rotation-pool";
1
+ import { __decorate } from "tslib";
2
+ import { css, html, property, query } from "../../deps.js";
3
+ import { htmlSlot, htmlStyle, svgArrow } from "../../lib/templates.js";
4
+ import { define } from "../../root.js";
5
+ import { GodownElement } from "../../root.js";
6
+ const defineName = "carousel-slider";
12
7
  /**
13
- * RotationPool rotates child elements.
8
+ * CarouselSlider rotates child elements.
14
9
  */
15
- let RotationPool = class RotationPool extends GodownElement {
10
+ let CarouselSlider = class CarouselSlider extends GodownElement {
16
11
  constructor() {
17
12
  super(...arguments);
18
13
  /**
@@ -29,6 +24,76 @@ let RotationPool = class RotationPool extends GodownElement {
29
24
  this.width = "";
30
25
  this._clone = [];
31
26
  }
27
+ static { this.styles = [
28
+ css `
29
+ :host {
30
+ display: block;
31
+ transition: all 0.2s;
32
+ }
33
+
34
+ div {
35
+ overflow: hidden;
36
+ }
37
+
38
+ div,
39
+ section {
40
+ width: 100%;
41
+ display: flex;
42
+ position: relative;
43
+ transition: inherit;
44
+ }
45
+
46
+ a {
47
+ position: absolute;
48
+ height: 100%;
49
+ width: fit-content;
50
+ z-index: 1;
51
+ display: flex;
52
+ align-items: center;
53
+ }
54
+
55
+ .prev {
56
+ left: 0;
57
+ }
58
+
59
+ .prev svg {
60
+ transform: rotate(180deg);
61
+ }
62
+
63
+ .next {
64
+ right: 0;
65
+ }
66
+
67
+ i {
68
+ position: relative;
69
+ display: flex;
70
+ align-items: center;
71
+ justify-content: center;
72
+ transition: 0.3s;
73
+ width: 2em;
74
+ height: 100%;
75
+ }
76
+
77
+ svg {
78
+ flex: 1;
79
+ max-height: 100%;
80
+ max-width: 100%;
81
+ }
82
+
83
+ a:hover i {
84
+ background-color: #0000001a;
85
+ width: 2.2em;
86
+ }
87
+
88
+ i svg path {
89
+ stroke-width: 4;
90
+ }
91
+
92
+ slot::slotted(*) {
93
+ flex-shrink: 0 !important;
94
+ }
95
+ `,
96
+ ]; }
32
97
  render() {
33
98
  const style = this.width && `:host{width:${this.width.split(";")[0]};}`;
34
99
  return html `<div>
@@ -104,91 +169,21 @@ let RotationPool = class RotationPool extends GodownElement {
104
169
  }
105
170
  }
106
171
  };
107
- RotationPool.styles = [
108
- css `
109
- :host {
110
- display: block;
111
- transition: all 0.2s;
112
- }
113
-
114
- div {
115
- overflow: hidden;
116
- }
117
-
118
- div,
119
- section {
120
- width: 100%;
121
- display: flex;
122
- position: relative;
123
- transition: inherit;
124
- }
125
-
126
- a {
127
- position: absolute;
128
- height: 100%;
129
- width: fit-content;
130
- z-index: 1;
131
- display: flex;
132
- align-items: center;
133
- }
134
-
135
- .prev {
136
- left: 0;
137
- }
138
-
139
- .prev svg {
140
- transform: rotate(180deg);
141
- }
142
-
143
- .next {
144
- right: 0;
145
- }
146
-
147
- i {
148
- position: relative;
149
- display: flex;
150
- align-items: center;
151
- justify-content: center;
152
- transition: 0.3s;
153
- width: 2em;
154
- height: 100%;
155
- }
156
-
157
- svg {
158
- flex: 1;
159
- max-height: 100%;
160
- max-width: 100%;
161
- }
162
-
163
- a:hover i {
164
- background-color: #0000001a;
165
- width: 2.2em;
166
- }
167
-
168
- i svg path {
169
- stroke-width: 4;
170
- }
171
-
172
- slot::slotted(*) {
173
- flex-shrink: 0 !important;
174
- }
175
- `,
176
- ];
177
172
  __decorate([
178
173
  property({ type: Number })
179
- ], RotationPool.prototype, "index", void 0);
174
+ ], CarouselSlider.prototype, "index", void 0);
180
175
  __decorate([
181
176
  property({ type: Number })
182
- ], RotationPool.prototype, "autochange", void 0);
177
+ ], CarouselSlider.prototype, "autochange", void 0);
183
178
  __decorate([
184
179
  property()
185
- ], RotationPool.prototype, "width", void 0);
180
+ ], CarouselSlider.prototype, "width", void 0);
186
181
  __decorate([
187
182
  query("section")
188
- ], RotationPool.prototype, "_section", void 0);
189
- RotationPool = __decorate([
183
+ ], CarouselSlider.prototype, "_section", void 0);
184
+ CarouselSlider = __decorate([
190
185
  define(defineName)
191
- ], RotationPool);
192
- export { RotationPool };
193
- export default RotationPool;
194
- //# sourceMappingURL=rotation-pool.js.map
186
+ ], CarouselSlider);
187
+ export { CarouselSlider };
188
+ export default CarouselSlider;
189
+ //# sourceMappingURL=carousel-slider.js.map