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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"carousel-slider.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/carousel/carousel-slider.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAqB,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAC1F,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,MAAM,UAAU,GAAG,iBAAiB,CAAC;AAErC;;GAEG;AAEI,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,aAAa;IAA1C;;QACL;;WAEG;QACyB,UAAK,GAAG,CAAC,CAAC;QACtC;;WAEG;QACyB,eAAU,GAAG,CAAC,CAAC;QAC3C;;WAEG;QACS,UAAK,GAAG,EAAE,CAAC;QAIvB,WAAM,GAAkB,EAAE,CAAC;IAwJ7B,CAAC;aAtJQ,WAAM,GAAG;QACd,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAmEF;KACF,AArEY,CAqEX;IAEQ,MAAM;QACd,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,eAAe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,CAAC,QAAQ,CAAC,qBAAqB,EAAE,CAAC;YACtC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACf,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;IAED,IAAI;QACF,IAAI,IAAI,CAAC,KAAK,KAAK,CAAC,EAAE,CAAC;YACrB,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,SAAS,GAAG,eAAe,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,MAAM,CAAC;YAC9E,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,UAAU,GAAG,MAAM,CAAC;YACxC,IAAI,CAAC,QAAQ,CAAC,qBAAqB,EAAE,CAAC;YACtC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACtC,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;;AAnK2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAAW;AAIV;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDAAgB;AAI/B;IAAX,QAAQ,EAAE;6CAAY;AAEL;IAAjB,KAAK,CAAC,SAAS,CAAC;gDAAuB;AAd7B,cAAc;IAD1B,MAAM,CAAC,UAAU,CAAC;GACN,cAAc,CAwK1B;;AAED,eAAe,cAAc,CAAC","sourcesContent":["import { css, html, property, query } from \"../../deps.js\";\nimport { htmlSlot, htmlStyle, type HTMLTemplate, svgArrow } from \"../../lib/templates.js\";\nimport { define } from \"../../root.js\";\nimport { GodownElement } from \"../../root.js\";\n\nconst defineName = \"carousel-slider\";\n\n/**\n * CarouselSlider rotates child elements.\n */\n@define(defineName)\nexport class CarouselSlider extends GodownElement {\n /**\n * The index of the element is displayed for the first time.\n */\n @property({ type: Number }) index = 0;\n /**\n * If autochangee > 0, the rotation will be automated.\n */\n @property({ type: Number }) autochange = 0;\n /**\n * Width.\n */\n @property() width = \"\";\n\n @query(\"section\") _section: HTMLElement;\n intervalID: number;\n _clone: HTMLElement[] = [];\n\n static styles = [\n css`\n :host {\n display: block;\n transition: all 0.2s;\n }\n\n div {\n overflow: hidden;\n }\n\n div,\n section {\n width: 100%;\n display: flex;\n position: relative;\n transition: inherit;\n }\n\n a {\n position: absolute;\n height: 100%;\n width: fit-content;\n z-index: 1;\n display: flex;\n align-items: center;\n }\n\n .prev {\n left: 0;\n }\n\n .prev svg {\n transform: rotate(180deg);\n }\n\n .next {\n right: 0;\n }\n\n i {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: 0.3s;\n width: 2em;\n height: 100%;\n }\n\n svg {\n flex: 1;\n max-height: 100%;\n max-width: 100%;\n }\n\n a:hover i {\n background-color: #0000001a;\n width: 2.2em;\n }\n\n i svg path {\n stroke-width: 4;\n }\n\n slot::slotted(*) {\n flex-shrink: 0 !important;\n }\n `,\n ];\n\n protected render(): HTMLTemplate {\n const style = this.width && `:host{width:${this.width.split(\";\")[0]};}`;\n return html`<div>\n <a class=\"prev\" @click=\"${this.prev}\">${this.renderA(\"pre\")}</a>\n <section>${htmlSlot()}</section>\n ${htmlStyle(style)}\n <a class=\"next\" @click=\"${this.next}\">${this.renderA(\"suf\")}</a>\n </div>`;\n }\n\n private renderA(slot: string): HTMLTemplate {\n if (this.querySelector(`[slot=${slot}]`)) {\n return htmlSlot(slot);\n }\n return html`<i>${svgArrow()}</i>`;\n }\n\n remount(index?: number) {\n super.remount(undefined);\n if (index !== undefined) {\n this.show(index);\n }\n }\n\n protected firstUpdated() {\n if (this.assigned.length) {\n if (!this.width) {\n this.width = `${this.assigned[0].offsetWidth}px`;\n }\n if (this._clone.length) {\n this._clone.forEach((element) => element.remove());\n this._clone = [];\n }\n const last = this.assigned[0].cloneNode(true) as HTMLElement;\n const first = this.assigned[this.assigned.length - 1].cloneNode(true) as HTMLElement;\n first.style.marginLeft = \"-100%\";\n this._clone.push(first, last);\n this.appendChild(last);\n this.insertBefore(first, this.firstElementChild);\n this.show(this.index);\n }\n if (this.autochange) {\n this.intervalID = setInterval(() => {\n this.next();\n }, this.autochange);\n }\n }\n\n disconnectedCallback() {\n clearInterval(this.intervalID);\n }\n\n show(i: number) {\n this.index = i;\n this._section.style.transform = `translateX(-${i}00%)`;\n this._section.style.transition = \"inherit\";\n }\n\n next() {\n if (this.index === this.assigned.length - 3) {\n this._section.style.transform = `translateX(100%)`;\n this._section.style.transition = \"none\";\n this._section.getBoundingClientRect();\n this.show(0);\n } else {\n this.show(this.index + 1);\n }\n }\n\n prev() {\n if (this.index === 0) {\n this._section.style.transform = `translateX(-${this.assigned.length - 2}00%)`;\n this._section.style.transition = `none`;\n this._section.getBoundingClientRect();\n this.show(this.assigned.length - 3);\n } else {\n this.show(this.index - 1);\n }\n }\n}\n\nexport default CarouselSlider;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"rotation-port\": CarouselSlider;\n }\n}\n"]}
@@ -1,10 +1,13 @@
1
- import { type CSSResultGroup } from "../deps.js";
2
- import { type HTMLTemplate } from "../lib/templates.js";
3
- import { FormSTD } from "./std.js";
1
+ import { type CSSResultGroup } from "../../deps.js";
2
+ import { type HTMLTemplate } from "../../lib/templates.js";
3
+ import { GodownElement } from "../../root.js";
4
4
  /**
5
5
  * BaseForm gets all the names and actual values of the child element.
6
6
  */
7
- export declare class BaseForm extends FormSTD {
7
+ export declare class BaseForm<T extends object = object> extends GodownElement {
8
+ name: string;
9
+ value: T;
10
+ nameValue: () => [string, Record<string, any>];
8
11
  /**
9
12
  * Form enctype.
10
13
  */
@@ -16,22 +19,10 @@ export declare class BaseForm extends FormSTD {
16
19
  namevalue(enctype?: "application/x-www-form-urlencoded" | "multipart/form-data" | "text/plain"): [string, Record<string, any>];
17
20
  FormData(): FormData;
18
21
  }
19
- /**
20
- * SignForm is now an alias for {@linkcode BaseForm}.
21
- *
22
- * @extends BaseForm
23
- */
24
- export declare class SignForm extends BaseForm {
25
- /**
26
- * @deprecated
27
- */
28
- set: 0 | 1 | 2;
29
- }
30
- export default SignForm;
22
+ export default BaseForm;
31
23
  declare global {
32
24
  interface HTMLElementTagNameMap {
33
- "sign-form": SignForm;
34
25
  "base-form": BaseForm;
35
26
  }
36
27
  }
37
- //# sourceMappingURL=sign-form.d.ts.map
28
+ //# sourceMappingURL=base-form.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-form.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/form/base-form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,cAAc,EAAyB,MAAM,eAAe,CAAC;AAChF,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAErE,OAAO,EAAU,aAAa,EAAE,MAAM,eAAe,CAAC;AAEtD;;GAEG;AACH,qBACa,QAAQ,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,aAAa;IACxD,IAAI,SAAM;IACM,KAAK,IAAW;IAE5C,SAAS,sCAA0B;IACnC;;OAEG;IACS,OAAO,EAAE,mCAAmC,GAAG,qBAAqB,GAAG,YAAY,CAAyB;IAEzG,KAAK,EAAE,eAAe,CAAC;IAEtC,MAAM,CAAC,MAAM,iBAcO;IAEpB,SAAS,CAAC,MAAM,IAAI,YAAY;IAQhC,KAAK;IA0BL,SAAS,CAAC,OAAO,6EAAe,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAgChE,QAAQ,IAAI,QAAQ;CA8BrB;AACD,eAAe,QAAQ,CAAC;AAExB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
@@ -1,25 +1,37 @@
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 } from "../lib/templates.js";
9
- import { define } from "../root.js";
10
- import { each } from "../lib/utils.js";
11
- import { FormSTD } from "./std.js";
1
+ import { __decorate } from "tslib";
2
+ import { css, html, property, query } from "../../deps.js";
3
+ import { htmlSlot } from "../../lib/templates.js";
4
+ import { each } from "../../lib/utils.js";
5
+ import { define, GodownElement } from "../../root.js";
12
6
  /**
13
7
  * BaseForm gets all the names and actual values of the child element.
14
8
  */
15
- let BaseForm = class BaseForm extends FormSTD {
9
+ let BaseForm = class BaseForm extends GodownElement {
16
10
  constructor() {
17
11
  super(...arguments);
12
+ this.name = "";
13
+ this.value = {};
14
+ this.nameValue = () => this.namevalue();
18
15
  /**
19
16
  * Form enctype.
20
17
  */
21
18
  this.enctype = "multipart/form-data";
22
19
  }
20
+ static { this.styles = [
21
+ css `
22
+ form {
23
+ display: flex;
24
+ flex-direction: column;
25
+ align-items: center;
26
+ margin: 0;
27
+ }
28
+
29
+ main {
30
+ display: flex;
31
+ flex-direction: column;
32
+ }
33
+ `,
34
+ ]; }
23
35
  render() {
24
36
  return html `<form enctype="${this.enctype}">
25
37
  ${htmlSlot("pre")}
@@ -116,21 +128,12 @@ let BaseForm = class BaseForm extends FormSTD {
116
128
  return formData;
117
129
  }
118
130
  };
119
- BaseForm.styles = [
120
- css `
121
- form {
122
- display: flex;
123
- flex-direction: column;
124
- align-items: center;
125
- margin: 0;
126
- }
127
-
128
- main {
129
- display: flex;
130
- flex-direction: column;
131
- }
132
- `,
133
- ];
131
+ __decorate([
132
+ property()
133
+ ], BaseForm.prototype, "name", void 0);
134
+ __decorate([
135
+ property({ type: Object })
136
+ ], BaseForm.prototype, "value", void 0);
134
137
  __decorate([
135
138
  property()
136
139
  ], BaseForm.prototype, "enctype", void 0);
@@ -141,16 +144,5 @@ BaseForm = __decorate([
141
144
  define("base-form")
142
145
  ], BaseForm);
143
146
  export { BaseForm };
144
- /**
145
- * SignForm is now an alias for {@linkcode BaseForm}.
146
- *
147
- * @extends BaseForm
148
- */
149
- let SignForm = class SignForm extends BaseForm {
150
- };
151
- SignForm = __decorate([
152
- define("sign-form")
153
- ], SignForm);
154
- export { SignForm };
155
- export default SignForm;
156
- //# sourceMappingURL=sign-form.js.map
147
+ export default BaseForm;
148
+ //# sourceMappingURL=base-form.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-form.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/form/base-form.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAuB,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,EAAE,QAAQ,EAAqB,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEtD;;GAEG;AAEI,IAAM,QAAQ,GAAd,MAAM,QAAoC,SAAQ,aAAa;IAA/D;;QACO,SAAI,GAAG,EAAE,CAAC;QACM,UAAK,GAAG,EAAO,CAAC;QAE5C,cAAS,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;QACnC;;WAEG;QACS,YAAO,GAA+E,qBAAqB,CAAC;IAoH1H,CAAC;aAhHQ,WAAM,GAAG;QACd,GAAG,CAAA;;;;;;;;;;;;KAYF;KACgB,AAdN,CAcO;I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G,CAAC,CAAC,CAAC;QAClC,CAAC;QACD,QAAQ,CAAC,MAAM,EAAE,CAAC;QAClB,OAAO,QAAQ,CAAC;IAClB,CAAC;;AA1HW;IAAX,QAAQ,EAAE;sCAAW;AACM;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uCAAiB;AAMhC;IAAX,QAAQ,EAAE;yCAA6G;AAEzG;IAAd,KAAK,CAAC,MAAM,CAAC;uCAAwB;AAV3B,QAAQ;IADpB,MAAM,CAAC,WAAW,CAAC;GACP,QAAQ,CA4HpB;;AACD,eAAe,QAAQ,CAAC","sourcesContent":["import { css, type CSSResultGroup, html, property, query } from \"../../deps.js\";\nimport { htmlSlot, type HTMLTemplate } from \"../../lib/templates.js\";\nimport { each } from \"../../lib/utils.js\";\nimport { define, GodownElement } from \"../../root.js\";\n\n/**\n * BaseForm gets all the names and actual values of the child element.\n */\n@define(\"base-form\")\nexport class BaseForm<T extends object = object> extends GodownElement {\n @property() name = \"\";\n @property({ type: Object }) value = {} as T;\n\n nameValue = () => this.namevalue();\n /**\n * Form enctype.\n */\n @property() enctype: \"application/x-www-form-urlencoded\" | \"multipart/form-data\" | \"text/plain\" = \"multipart/form-data\";\n\n @query(\"form\") _form: HTMLFormElement;\n\n static styles = [\n css`\n form {\n display: flex;\n flex-direction: column;\n align-items: center;\n margin: 0;\n }\n\n main {\n display: flex;\n flex-direction: column;\n }\n `,\n ] as CSSResultGroup;\n\n protected render(): HTMLTemplate {\n return html`<form enctype=\"${this.enctype}\">\n ${htmlSlot(\"pre\")}\n <main>${htmlSlot()}</main>\n ${htmlSlot(\"suf\")}\n </form>`;\n }\n\n reset() {\n each(this._form, (node: HTMLFormElement | BaseForm) => {\n if (node.reset) {\n node.reset();\n }\n });\n const form: any = document.createElement(\"form\");\n for (const slot of this.shadowRoot.querySelectorAll(\"slot\")) {\n for (const i of slot.assignedNodes() as any) {\n if (i.reset) {\n i.reset();\n }\n form.appendChild(i.cloneNode(true));\n }\n }\n form.reset();\n for (const slot of this.shadowRoot.querySelectorAll(\"slot\")) {\n for (const i of slot.assignedNodes() as any) {\n if (i.name && form[i.name]) {\n i.value = form[i.name].value;\n }\n }\n }\n form.remove();\n }\n\n namevalue(enctype = this.enctype): [string, Record<string, any>] {\n const result = {};\n const tempForm = document.createElement(\"form\");\n tempForm.enctype = enctype;\n for (const slot of this.shadowRoot.querySelectorAll(\"slot\")) {\n for (const i of slot.assignedNodes() as any) {\n if (i.namevalue) {\n const [name, value] = i.namevalue();\n if (name) {\n result[name] = value;\n }\n } else {\n tempForm.appendChild(i.cloneNode(true));\n }\n }\n }\n const formData = new FormData(tempForm);\n for (const [key, value] of formData) {\n result[key] = value;\n }\n each(this._form, (node: any) => {\n if (node.namevalue) {\n const [name, value] = node.namevalue();\n if (name) {\n result[name] = value;\n }\n }\n });\n tempForm.remove();\n return [this.name, result];\n }\n\n FormData(): FormData {\n const temp = {};\n const tempForm = document.createElement(\"form\");\n tempForm.enctype = this.enctype;\n for (const slot of this._slots) {\n for (const i of slot.assignedNodes() as any) {\n if (i.FormData) {\n for (const [key, value] of i.FormData()) {\n temp[key] = value;\n }\n } else {\n tempForm.appendChild(i.cloneNode(true));\n }\n }\n }\n const formData = new FormData(tempForm);\n each(this._form, (node: any) => {\n if (node.namevalue) {\n const [name, value] = node.namevalue();\n if (name) {\n formData.append(name, value);\n }\n }\n });\n for (const key in temp) {\n formData.append(key, temp[key]);\n }\n tempForm.remove();\n return formData;\n }\n}\nexport default BaseForm;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"base-form\": BaseForm;\n }\n}\n"]}
@@ -0,0 +1,19 @@
1
+ import BaseForm from "./base-form.js";
2
+ /**
3
+ * SignForm is now an alias for {@linkcode BaseForm}.
4
+ *
5
+ * @extends BaseForm
6
+ */
7
+ export declare class SignForm extends BaseForm {
8
+ /**
9
+ * @deprecated
10
+ */
11
+ set: 0 | 1 | 2;
12
+ }
13
+ export default SignForm;
14
+ declare global {
15
+ interface HTMLElementTagNameMap {
16
+ "sign-form": SignForm;
17
+ }
18
+ }
19
+ //# sourceMappingURL=sign-form.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sign-form.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/form/sign-form.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAEtC;;;;GAIG;AACH,qBACa,QAAS,SAAQ,QAAQ;IACpC;;OAEG;IACH,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;CAChB;AAED,eAAe,QAAQ,CAAC;AAExB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
@@ -0,0 +1,16 @@
1
+ import { __decorate } from "tslib";
2
+ import { define } from "../../root.js";
3
+ import BaseForm from "./base-form.js";
4
+ /**
5
+ * SignForm is now an alias for {@linkcode BaseForm}.
6
+ *
7
+ * @extends BaseForm
8
+ */
9
+ let SignForm = class SignForm extends BaseForm {
10
+ };
11
+ SignForm = __decorate([
12
+ define("sign-form")
13
+ ], SignForm);
14
+ export { SignForm };
15
+ export default SignForm;
16
+ //# sourceMappingURL=sign-form.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sign-form.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/form/sign-form.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAEtC;;;;GAIG;AAEI,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,QAAQ;CAKrC,CAAA;AALY,QAAQ;IADpB,MAAM,CAAC,WAAW,CAAC;GACP,QAAQ,CAKpB;;AAED,eAAe,QAAQ,CAAC","sourcesContent":["import { define } from \"../../root.js\";\nimport BaseForm from \"./base-form.js\";\n\n/**\n * SignForm is now an alias for {@linkcode BaseForm}.\n *\n * @extends BaseForm\n */\n@define(\"sign-form\")\nexport class SignForm extends BaseForm {\n /**\n * @deprecated\n */\n set: 0 | 1 | 2;\n}\n\nexport default SignForm;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"sign-form\": SignForm;\n }\n}\n"]}
@@ -1,22 +1,22 @@
1
- import { type HTMLTemplate } from "../lib/templates.js";
2
- import AvatarAnchor from "../items/avatar-a.js";
3
- import GroupSTD from "./std.js";
1
+ import { type HTMLTemplate } from "../../lib/templates.js";
2
+ import { GodownElement } from "../../root.js";
3
+ import AvatarA from "../a/avatar-a.js";
4
4
  /**
5
5
  * AvatarGroup ensure that the display content does not exceed the maximum value, and display the excess quantity.
6
6
  */
7
- export declare class AvatarGroup extends GroupSTD {
7
+ export declare class AvatarGroup extends GodownElement {
8
8
  /**
9
9
  * The maximum number of elements that can be accepted for this element.
10
10
  */
11
11
  max: number;
12
12
  /**
13
- * When the content overflows, create an {@linkcode AvatarAnchor} with the same {@linkcode AvatarAnchor.more} attribute as more.
13
+ * When the content overflows, create an {@linkcode AvatarA} with the same {@linkcode AvatarA.more} attribute as more.
14
14
  */
15
15
  more: number;
16
16
  static styles: import("lit").CSSResult[];
17
17
  protected render(): HTMLTemplate;
18
18
  protected firstUpdated(): void;
19
- append(args?: AvatarAnchor): void;
19
+ append(args?: AvatarA): void;
20
20
  subtract(): void;
21
21
  }
22
22
  export default AvatarGroup;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"avatar-group.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/group/avatar-group.ts"],"names":[],"mappings":"AAEA,OAAO,EAAuB,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEhF,OAAO,EAAU,aAAa,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,OAAO,MAAM,kBAAkB,CAAC;AAIvC;;GAEG;AACH,qBACa,WAAY,SAAQ,aAAa;IAC5C;;OAEG;IACyB,GAAG,SAAM;IACrC;;OAEG;IACyB,IAAI,SAAK;IAErC,MAAM,CAAC,MAAM,4BAYX;IAEF,SAAS,CAAC,MAAM,IAAI,YAAY;IAKhC,SAAS,CAAC,YAAY;IAMtB,MAAM,CAAC,IAAI,UAAgB;IAe3B,QAAQ;CAYT;AAED,eAAe,WAAW,CAAC;AAE3B,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,WAAW,CAAC;KAC7B;CACF"}
@@ -1,21 +1,15 @@
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, nothing, property } from "../deps.js";
8
- import { htmlSlot, htmlStyle } from "../lib/templates.js";
9
- import { append } from "../lib/utils.js";
10
- import AvatarAnchor from "../items/avatar-a.js";
11
- import { define } from "../root.js";
12
- import GroupSTD from "./std.js";
13
- import { ifValue } from "../lib/directives.js";
1
+ import { __decorate } from "tslib";
2
+ import { css, html, nothing, property } from "../../deps.js";
3
+ import { ifValue } from "../../lib/directives.js";
4
+ import { htmlSlot, htmlStyle } from "../../lib/templates.js";
5
+ import { append } from "../../lib/utils.js";
6
+ import { define, GodownElement } from "../../root.js";
7
+ import AvatarA from "../a/avatar-a.js";
14
8
  const defineName = "avatar-group";
15
9
  /**
16
10
  * AvatarGroup ensure that the display content does not exceed the maximum value, and display the excess quantity.
17
11
  */
18
- let AvatarGroup = class AvatarGroup extends GroupSTD {
12
+ let AvatarGroup = class AvatarGroup extends GodownElement {
19
13
  constructor() {
20
14
  super(...arguments);
21
15
  /**
@@ -23,20 +17,33 @@ let AvatarGroup = class AvatarGroup extends GroupSTD {
23
17
  */
24
18
  this.max = 99;
25
19
  /**
26
- * When the content overflows, create an {@linkcode AvatarAnchor} with the same {@linkcode AvatarAnchor.more} attribute as more.
20
+ * When the content overflows, create an {@linkcode AvatarA} with the same {@linkcode AvatarA.more} attribute as more.
27
21
  */
28
22
  this.more = 0;
29
23
  }
24
+ static { this.styles = [
25
+ css `
26
+ :host {
27
+ display: flex;
28
+ width: 100%;
29
+ height: 100%;
30
+ }
31
+
32
+ div {
33
+ display: contents;
34
+ }
35
+ `,
36
+ ]; }
30
37
  render() {
31
38
  const cssStr = `slot::slotted(:nth-of-type(n + ${(this.max || 0) + 1})) {display: none;}`;
32
- return html `${htmlSlot()} ${htmlStyle(cssStr)} ${ifValue(this.more > 0, new AvatarAnchor({ more: this.more }), nothing)}`;
39
+ return html `${htmlSlot()} ${htmlStyle(cssStr)} ${ifValue(this.more > 0, new AvatarA({ more: this.more }), nothing)}`;
33
40
  }
34
41
  firstUpdated() {
35
42
  if (!this.more && this.assigned.length > this.max) {
36
43
  this.more = this.assigned.length - this.max;
37
44
  }
38
45
  }
39
- append(args = new AvatarAnchor()) {
46
+ append(args = new AvatarA()) {
40
47
  if (this.max && this.assigned.length === this.max) {
41
48
  this.assigned.pop().style.display = "none";
42
49
  append(this, args);
@@ -66,19 +73,6 @@ let AvatarGroup = class AvatarGroup extends GroupSTD {
66
73
  }
67
74
  }
68
75
  };
69
- AvatarGroup.styles = [
70
- css `
71
- :host {
72
- display: flex;
73
- width: 100%;
74
- height: 100%;
75
- }
76
-
77
- div {
78
- display: contents;
79
- }
80
- `,
81
- ];
82
76
  __decorate([
83
77
  property({ type: Number })
84
78
  ], AvatarGroup.prototype, "max", void 0);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"avatar-group.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/group/avatar-group.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO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AAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCAAU;AAIT;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCAAU;AAR1B,WAAW;IADvB,MAAM,CAAC,UAAU,CAAC;GACN,WAAW,CA8DvB;;AAED,eAAe,WAAW,CAAC","sourcesContent":["import { css, html, nothing, property } from \"../../deps.js\";\nimport { ifValue } from \"../../lib/directives.js\";\nimport { htmlSlot, htmlStyle, type HTMLTemplate } from \"../../lib/templates.js\";\nimport { append } from \"../../lib/utils.js\";\nimport { define, GodownElement } from \"../../root.js\";\nimport AvatarA from \"../a/avatar-a.js\";\n\nconst defineName = \"avatar-group\";\n\n/**\n * AvatarGroup ensure that the display content does not exceed the maximum value, and display the excess quantity.\n */\n@define(defineName)\nexport class AvatarGroup extends GodownElement {\n /**\n * The maximum number of elements that can be accepted for this element.\n */\n @property({ type: Number }) max = 99;\n /**\n * When the content overflows, create an {@linkcode AvatarA} with the same {@linkcode AvatarA.more} attribute as more.\n */\n @property({ type: Number }) more = 0;\n\n static styles = [\n css`\n :host {\n display: flex;\n width: 100%;\n height: 100%;\n }\n\n div {\n display: contents;\n }\n `,\n ];\n\n protected render(): HTMLTemplate {\n const cssStr = `slot::slotted(:nth-of-type(n + ${(this.max || 0) + 1})) {display: none;}`;\n return html`${htmlSlot()} ${htmlStyle(cssStr)} ${ifValue(this.more > 0, new AvatarA({ more: this.more }), nothing)}`;\n }\n\n protected firstUpdated() {\n if (!this.more && this.assigned.length > this.max) {\n this.more = this.assigned.length - this.max;\n }\n }\n\n append(args = new AvatarA()) {\n if (this.max && this.assigned.length === this.max) {\n this.assigned.pop().style.display = \"none\";\n append(this, args);\n this.assigned.pop().style.display = \"none\";\n this.more = 2;\n } else if (this.max && this.assigned.length > this.max) {\n append(this, args);\n this.assigned.pop().style.display = \"none\";\n this.more += 1;\n } else {\n append(this, args);\n }\n }\n\n subtract() {\n if (this.more === 2) {\n this.assigned.pop().style.display = \"\";\n this.more = 0;\n return;\n } else if (this.more > 0) {\n this.more -= 1;\n }\n if (this.assigned.length) {\n this.assigned.pop().remove();\n }\n }\n}\n\nexport default AvatarGroup;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"avatar-group\": AvatarGroup;\n }\n}\n"]}
@@ -1,9 +1,9 @@
1
- import { type HTMLTemplate } from "../lib/templates.js";
2
- import GroupSTD from "./std.js";
1
+ import { type HTMLTemplate } from "../../lib/templates.js";
2
+ import { GodownElement } from "../../root.js";
3
3
  /**
4
4
  * DetailsGroup used to support multiple details like.
5
5
  */
6
- export declare class DetailsGroup extends GroupSTD {
6
+ export declare class DetailsGroup extends GodownElement {
7
7
  /**
8
8
  * Default open element index.
9
9
  */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"details-group.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/group/details-group.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAU,aAAa,EAAE,MAAM,eAAe,CAAC;AAItD;;GAEG;AACH,qBACa,YAAa,SAAQ,aAAa;IAC7C;;OAEG;IACyB,KAAK,SAAM;IACvC;;OAEG;IAC0B,IAAI,UAAS;IAE1C,MAAM,CAAC,MAAM,4BAMX;IAEF,SAAS,CAAC,MAAM,IAAI,YAAY;IAIhC,iBAAiB;IAQjB,oBAAoB;IAKpB,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,UAAU;CAIrC;AAED,eAAe,YAAY,CAAC;AAE5B,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,eAAe,EAAE,YAAY,CAAC;KAC/B;CACF"}
@@ -1,18 +1,12 @@
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, property } from "../deps.js";
8
- import { htmlSlot } from "../lib/templates.js";
9
- import { define } from "../root.js";
10
- import GroupSTD from "./std.js";
1
+ import { __decorate } from "tslib";
2
+ import { css, property } from "../../deps.js";
3
+ import { htmlSlot } from "../../lib/templates.js";
4
+ import { define, GodownElement } from "../../root.js";
11
5
  const defineName = "details-group";
12
6
  /**
13
7
  * DetailsGroup used to support multiple details like.
14
8
  */
15
- let DetailsGroup = class DetailsGroup extends GroupSTD {
9
+ let DetailsGroup = class DetailsGroup extends GodownElement {
16
10
  constructor() {
17
11
  super(...arguments);
18
12
  /**
@@ -24,6 +18,13 @@ let DetailsGroup = class DetailsGroup extends GroupSTD {
24
18
  */
25
19
  this.only = false;
26
20
  }
21
+ static { this.styles = [
22
+ css `
23
+ :host {
24
+ display: block;
25
+ }
26
+ `,
27
+ ]; }
27
28
  render() {
28
29
  return htmlSlot();
29
30
  }
@@ -43,13 +44,6 @@ let DetailsGroup = class DetailsGroup extends GroupSTD {
43
44
  this.index = this.assigned.indexOf(e.target);
44
45
  }
45
46
  };
46
- DetailsGroup.styles = [
47
- css `
48
- :host {
49
- display: block;
50
- }
51
- `,
52
- ];
53
47
  __decorate([
54
48
  property({ type: Number })
55
49
  ], DetailsGroup.prototype, "index", void 0);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"details-group.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/group/details-group.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAqB,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AA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.js\";\nimport { htmlSlot, type HTMLTemplate } from \"../../lib/templates.js\";\nimport { define, GodownElement } from \"../../root.js\";\n\nconst defineName = \"details-group\";\n\n/**\n * DetailsGroup used to support multiple details like.\n */\n@define(defineName)\nexport class DetailsGroup extends GodownElement {\n /**\n * Default open element index.\n */\n @property({ type: Number }) index = -1;\n /**\n * If true, close the previous element when switching index.\n */\n @property({ type: Boolean }) only = false;\n\n static styles = [\n css`\n :host {\n display: block;\n }\n `,\n ];\n\n protected render(): HTMLTemplate {\n return htmlSlot();\n }\n\n connectedCallback() {\n super.connectedCallback();\n if (this.only) {\n this.addEvent(this, \"click\", this._handleClick);\n }\n this.children[this.index]?.setAttribute(\"open\", \"\");\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.index = -1;\n }\n\n protected _handleClick(e: MouseEvent) {\n this.children[this.index]?.removeAttribute(\"open\");\n this.index = this.assigned.indexOf(e.target as HTMLElement);\n }\n}\n\nexport default DetailsGroup;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"details-group\": DetailsGroup;\n }\n}\n"]}
@@ -1,12 +1,12 @@
1
- import { type CSSResultGroup, type PropertyValueMap } from "../deps.js";
2
- import { type HTMLTemplate } from "../lib/templates.js";
3
- import GroupSTD from "./std.js";
1
+ import { type CSSResultGroup, type PropertyValueMap } from "../../deps.js";
2
+ import { type HTMLTemplate } from "../../lib/templates.js";
3
+ import { GodownElement } from "../../root.js";
4
4
  /**
5
5
  * TabGroup used to support multiple tabs.
6
6
  *
7
7
  * Inspired by Next-ui.
8
8
  */
9
- export declare class TabGroup extends GroupSTD {
9
+ export declare class TabGroup extends GodownElement {
10
10
  /**
11
11
  * Active slot name.
12
12
  */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tab-group.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/group/tab-group.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,cAAc,EAAkB,KAAK,gBAAgB,EAAS,MAAM,eAAe,CAAC;AAEvG,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAErE,OAAO,EAAqC,aAAa,EAAE,MAAM,eAAe,CAAC;AAMjF;;;;GAIG;AACH,qBACa,QAAS,SAAQ,aAAa;IACzC;;OAEG;IACS,KAAK,SAAM;IACvB;;OAEG;IACS,GAAG,SAAM;IACrB;;OAEG;IACS,KAAK,SAAW;IAC5B;;OAEG;IACM,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAClC;;OAEG;IACM,QAAQ,EAAE,MAAM,EAAE,CAAC;IAE5B,MAAM,CAAC,MAAM,iBA0CO;IAEpB,SAAS,CAAC,MAAM,IAAI,YAAY;IAoBhC,SAAS,CAAC,OAAO,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,IAAI,CAAC;IAkB3D;;;;OAIG;IACH,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,UAAQ;IAalC,iBAAiB;IAWjB;;OAEG;IACH,OAAO;CAGR;AAED,eAAe,QAAQ,CAAC;AAExB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
@@ -1,15 +1,9 @@
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, cssvarValues, define } from "../root.js";
8
- import { css, html, property, state } from "../deps.js";
9
- import { htmlSlot } from "../lib/templates.js";
10
- import { deepQuerySelectorAll } from "../lib/utils.js";
11
- import GroupSTD from "./std.js";
12
- import { ifValue } from "../lib/directives.js";
1
+ import { __decorate } from "tslib";
2
+ import { css, html, property, state } from "../../deps.js";
3
+ import { ifValue } from "../../lib/directives.js";
4
+ import { htmlSlot } from "../../lib/templates.js";
5
+ import { deepQuerySelectorAll } from "../../lib/utils.js";
6
+ import { createScope, cssvarValues, define, GodownElement } from "../../root.js";
13
7
  const defineName = "tab-group";
14
8
  const cssvarScope = createScope(defineName);
15
9
  /**
@@ -17,7 +11,7 @@ const cssvarScope = createScope(defineName);
17
11
  *
18
12
  * Inspired by Next-ui.
19
13
  */
20
- let TabGroup = class TabGroup extends GroupSTD {
14
+ let TabGroup = class TabGroup extends GodownElement {
21
15
  constructor() {
22
16
  super(...arguments);
23
17
  /**
@@ -33,6 +27,49 @@ let TabGroup = class TabGroup extends GroupSTD {
33
27
  */
34
28
  this.align = "start";
35
29
  }
30
+ static { this.styles = [
31
+ GodownElement.styles,
32
+ css `
33
+ :host {
34
+ ${cssvarScope}--background: var(${cssvarValues.main});
35
+ ${cssvarScope}--background-active: rgb(var(${cssvarValues.textRGB}) / 18%);
36
+ ${cssvarScope}--radius: .25em;
37
+ ${cssvarScope}--cursor: default;
38
+ background: var(${cssvarScope}--background);
39
+ display: block;
40
+ }
41
+
42
+ nav {
43
+ display: grid;
44
+ grid-auto-flow: column;
45
+ gap: 0.5em;
46
+ position: relative;
47
+ border-radius: inherit;
48
+ }
49
+
50
+ section {
51
+ white-space: nowrap;
52
+ min-width: 2em;
53
+ border-radius: inherit;
54
+ padding: 0 0.2em;
55
+ cursor: var(${cssvarScope}--cursor);
56
+ z-index: 1;
57
+ display: flex;
58
+ align-items: center;
59
+ justify-content: center;
60
+ }
61
+
62
+ #slider {
63
+ height: 100%;
64
+ position: absolute;
65
+ padding: 0;
66
+ background: var(${cssvarScope}--background-active);
67
+ transform: translateX(-50%);
68
+ transition: all 0.25s ease 0s;
69
+ z-index: 0;
70
+ }
71
+ `,
72
+ ]; }
36
73
  render() {
37
74
  const headers = (this.headers || this.contents).map((value) => {
38
75
  return html ` <section
@@ -104,49 +141,6 @@ let TabGroup = class TabGroup extends GroupSTD {
104
141
  this.contents = this.slottedNames;
105
142
  }
106
143
  };
107
- TabGroup.styles = [
108
- GroupSTD.styles,
109
- css `
110
- :host {
111
- ${cssvarScope}--background: var(${cssvarValues.main});
112
- ${cssvarScope}--background-active: rgb(var(${cssvarValues.textRGB}) / 18%);
113
- ${cssvarScope}--radius: .25em;
114
- ${cssvarScope}--cursor: default;
115
- background: var(${cssvarScope}--background);
116
- display: block;
117
- }
118
-
119
- nav {
120
- display: grid;
121
- grid-auto-flow: column;
122
- gap: 0.5em;
123
- position: relative;
124
- border-radius: inherit;
125
- }
126
-
127
- section {
128
- white-space: nowrap;
129
- min-width: 2em;
130
- border-radius: inherit;
131
- padding: 0 0.2em;
132
- cursor: var(${cssvarScope}--cursor);
133
- z-index: 1;
134
- display: flex;
135
- align-items: center;
136
- justify-content: center;
137
- }
138
-
139
- #slider {
140
- height: 100%;
141
- position: absolute;
142
- padding: 0;
143
- background: var(${cssvarScope}--background-active);
144
- transform: translateX(-50%);
145
- transition: all 0.25s ease 0s;
146
- z-index: 0;
147
- }
148
- `,
149
- ];
150
144
  __decorate([
151
145
  property()
152
146
  ], TabGroup.prototype, "index", void 0);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tab-group.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/group/tab-group.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAuB,IAAI,EAAE,QAAQ,EAAyB,KAAK,EAAE,MAAM,eAAe,CAAC;AACvG,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAqB,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEjF,M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;IACjB,CAAC;IAED,iBAAiB;QACf,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;YACd,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QACxC,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;YAC5B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC;QACxB,CAAC;QACD,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;IAED;;OAEG;IACH,OAAO;QACL,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,YAAY,CAAC;IACpC,CAAC;;AAtIW;IAAX,QAAQ,EAAE;uCAAY;AAIX;IAAX,QAAQ,EAAE;qCAAU;AAIT;IAAX,QAAQ,EAAE;uCAAiB;AAInB;IAAR,KAAK,EAAE;yCAA0B;AAIzB;IAAR,KAAK,EAAE;0CAAoB;AApBjB,QAAQ;IADpB,MAAM,CAAC,UAAU,CAAC;GACN,QAAQ,CA2IpB;;AAED,eAAe,QAAQ,CAAC","sourcesContent":["import { css, type CSSResultGroup, html, property, type PropertyValueMap, state } from \"../../deps.js\";\nimport { ifValue } from \"../../lib/directives.js\";\nimport { htmlSlot, type HTMLTemplate } from \"../../lib/templates.js\";\nimport { deepQuerySelectorAll } from \"../../lib/utils.js\";\nimport { createScope, cssvarValues, define, GodownElement } from \"../../root.js\";\n\nconst defineName = \"tab-group\";\n\nconst cssvarScope = createScope(defineName);\n\n/**\n * TabGroup used to support multiple tabs.\n *\n * Inspired by Next-ui.\n */\n@define(defineName)\nexport class TabGroup extends GodownElement {\n /**\n * Active slot name.\n */\n @property() index = \"\";\n /**\n * Default slot name.\n */\n @property() def = \"\";\n /**\n * Align type.\n */\n @property() align = \"start\";\n /**\n * Header texts or slot names, if headers is a zero value, it is taken from the {@linkcode TabGroup.contents}.\n */\n @state() headers: string[] | void;\n /**\n * Contents slot names.\n */\n @state() contents: string[];\n\n static styles = [\n GodownElement.styles,\n css`\n :host {\n ${cssvarScope}--background: var(${cssvarValues.main});\n ${cssvarScope}--background-active: rgb(var(${cssvarValues.textRGB}) / 18%);\n ${cssvarScope}--radius: .25em;\n ${cssvarScope}--cursor: default;\n background: var(${cssvarScope}--background);\n display: block;\n }\n\n nav {\n display: grid;\n grid-auto-flow: column;\n gap: 0.5em;\n position: relative;\n border-radius: inherit;\n }\n\n section {\n white-space: nowrap;\n min-width: 2em;\n border-radius: inherit;\n padding: 0 0.2em;\n cursor: var(${cssvarScope}--cursor);\n z-index: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n #slider {\n height: 100%;\n position: absolute;\n padding: 0;\n background: var(${cssvarScope}--background-active);\n transform: translateX(-50%);\n transition: all 0.25s ease 0s;\n z-index: 0;\n }\n `,\n ] as CSSResultGroup;\n\n protected render(): HTMLTemplate {\n const headers = (this.headers || this.contents).map((value) => {\n return html` <section\n class=\"${ifValue(this.index === value, \"active\")}\"\n @click=\"${() => {\n this.select(value, true);\n }}\"\n >\n ${this.headers ? htmlSlot(value) : value}\n </section>`;\n });\n return html`\n <nav style=\"justify-content:${this.align}\">\n ${headers}\n <section id=\"slider\"></section>\n </nav>\n ${htmlSlot(this.index || this.def)}\n `;\n }\n\n protected updated(changedProperties: PropertyValueMap<this>) {\n if (changedProperties.has(\"index\")) {\n // Move slider.\n const active = this.shadowRoot.querySelector<HTMLElement>(\"section.active\");\n const slider = this.shadowRoot.querySelector<HTMLElement>(\"#slider\");\n if (active) {\n this.dispatchEvent(new CustomEvent(\"select\", { detail: this.index }));\n slider.style.width = `${active.clientWidth}px`;\n slider.animate([{ left: `${active.offsetLeft + active.clientWidth / 2}px` }], {\n duration: 250,\n fill: \"forwards\",\n });\n } else {\n slider.style.width = \"0\";\n }\n }\n }\n\n /**\n * Select one tab.\n * @param s New index.\n * @param callSync if true, update all same elements (headers contains s).\n */\n select(s: string, callSync = false) {\n if (callSync) {\n const elements = deepQuerySelectorAll<this>(this.tagName, document.body);\n for (const e of elements) {\n if ((e.headers || e.contents).includes(s)) {\n e.select(s);\n }\n }\n return;\n }\n this.index = s;\n }\n\n connectedCallback() {\n super.connectedCallback();\n if (!this.def) {\n this.def = this.slottedNames[0] || \"\";\n }\n if (!this.index && this.def) {\n this.index = this.def;\n }\n this.getTabs();\n }\n\n /**\n * Update content controls (this.headers, this.contents).\n */\n getTabs() {\n this.contents = this.slottedNames;\n }\n}\n\nexport default TabGroup;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"tab-group\": TabGroup;\n }\n}\n"]}