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,38 @@
1
+ export { AvatarA } from "./a/avatar-a.js";
2
+ export { LinkA } from "./a/link-a.js";
3
+ export { SuperA } from "./a/super-a.js";
4
+ export { BaseButton } from "./button/base-button.js";
5
+ export { CarouselSlider } from "./carousel/carousel-slider.js";
6
+ export { BaseForm } from "./form/base-form.js";
7
+ export { SignForm } from "./form/sign-form.js";
8
+ export { AvatarGroup } from "./group/avatar-group.js";
9
+ export { DetailsGroup } from "./group/details-group.js";
10
+ export { TabGroup } from "./group/tab-group.js";
11
+ export { BaseInput } from "./input/base-input.js";
12
+ export { LabelInput } from "./input/label-input.js";
13
+ export { SearchInput } from "./input/search-input.js";
14
+ export { SelectInput } from "./input/select-input.js";
15
+ export { SplitInput } from "./input/split-input.js";
16
+ export { SwitchInput } from "./input/switch-input.js";
17
+ export { AlertItem } from "./items/alert-item.js";
18
+ export { CardItem } from "./items/card-item.js";
19
+ export { DragBox } from "./items/drag-box.js";
20
+ export { TimeBar } from "./items/time-bar.js";
21
+ export { DividerLine } from "./layout/divider-line.js";
22
+ export { FlexFlow } from "./layout/flex-flow.js";
23
+ export { NavAside } from "./layout/nav-aside.js";
24
+ export { NavLayout } from "./layout/nav-layout.js";
25
+ export { LoadingProgress } from "./loading/loading-progress.js";
26
+ export { SkeletonScreen } from "./loading/skeleton-screen.js";
27
+ export { OpenDetails } from "./open/open-details.js";
28
+ export { OpenDialog } from "./open/open-dialog.js";
29
+ export { OpenList } from "./open/open-list.js";
30
+ export { OpenOffset } from "./open/open-offset.js";
31
+ export { OpenTooltip } from "./open/open-tooltip.js";
32
+ export { ClipText } from "./text/clip-text.js";
33
+ export { OverbreathText } from "./text/overbreath-text.js";
34
+ export { TypewriterText } from "./text/typewriter-text.js";
35
+ export { RouteView } from "./view/route-view.js";
36
+ export { ScrollX } from "./view/scroll-x.js";
37
+ export { WrapView } from "./view/wrap-view.js";
38
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,39 @@
1
+ /// script generated
2
+ export { AvatarA } from "./a/avatar-a.js";
3
+ export { LinkA } from "./a/link-a.js";
4
+ export { SuperA } from "./a/super-a.js";
5
+ export { BaseButton } from "./button/base-button.js";
6
+ export { CarouselSlider } from "./carousel/carousel-slider.js";
7
+ export { BaseForm } from "./form/base-form.js";
8
+ export { SignForm } from "./form/sign-form.js";
9
+ export { AvatarGroup } from "./group/avatar-group.js";
10
+ export { DetailsGroup } from "./group/details-group.js";
11
+ export { TabGroup } from "./group/tab-group.js";
12
+ export { BaseInput } from "./input/base-input.js";
13
+ export { LabelInput } from "./input/label-input.js";
14
+ export { SearchInput } from "./input/search-input.js";
15
+ export { SelectInput } from "./input/select-input.js";
16
+ export { SplitInput } from "./input/split-input.js";
17
+ export { SwitchInput } from "./input/switch-input.js";
18
+ export { AlertItem } from "./items/alert-item.js";
19
+ export { CardItem } from "./items/card-item.js";
20
+ export { DragBox } from "./items/drag-box.js";
21
+ export { TimeBar } from "./items/time-bar.js";
22
+ export { DividerLine } from "./layout/divider-line.js";
23
+ export { FlexFlow } from "./layout/flex-flow.js";
24
+ export { NavAside } from "./layout/nav-aside.js";
25
+ export { NavLayout } from "./layout/nav-layout.js";
26
+ export { LoadingProgress } from "./loading/loading-progress.js";
27
+ export { SkeletonScreen } from "./loading/skeleton-screen.js";
28
+ export { OpenDetails } from "./open/open-details.js";
29
+ export { OpenDialog } from "./open/open-dialog.js";
30
+ export { OpenList } from "./open/open-list.js";
31
+ export { OpenOffset } from "./open/open-offset.js";
32
+ export { OpenTooltip } from "./open/open-tooltip.js";
33
+ export { ClipText } from "./text/clip-text.js";
34
+ export { OverbreathText } from "./text/overbreath-text.js";
35
+ export { TypewriterText } from "./text/typewriter-text.js";
36
+ export { RouteView } from "./view/route-view.js";
37
+ export { ScrollX } from "./view/scroll-x.js";
38
+ export { WrapView } from "./view/wrap-view.js";
39
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/index.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EA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,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC","sourcesContent":["/// script generated\nexport { AvatarA } from \"./a/avatar-a.js\";\nexport { LinkA } from \"./a/link-a.js\";\nexport { SuperA } from \"./a/super-a.js\";\nexport { BaseButton } from \"./button/base-button.js\";\nexport { CarouselSlider } from \"./carousel/carousel-slider.js\";\nexport { BaseForm } from \"./form/base-form.js\";\nexport { SignForm } from \"./form/sign-form.js\";\nexport { AvatarGroup } from \"./group/avatar-group.js\";\nexport { DetailsGroup } from \"./group/details-group.js\";\nexport { TabGroup } from \"./group/tab-group.js\";\nexport { BaseInput } from \"./input/base-input.js\";\nexport { LabelInput } from \"./input/label-input.js\";\nexport { SearchInput } from \"./input/search-input.js\";\nexport { SelectInput } from \"./input/select-input.js\";\nexport { SplitInput } from \"./input/split-input.js\";\nexport { SwitchInput } from \"./input/switch-input.js\";\nexport { AlertItem } from \"./items/alert-item.js\";\nexport { CardItem } from \"./items/card-item.js\";\nexport { DragBox } from \"./items/drag-box.js\";\nexport { TimeBar } from \"./items/time-bar.js\";\nexport { DividerLine } from \"./layout/divider-line.js\";\nexport { FlexFlow } from \"./layout/flex-flow.js\";\nexport { NavAside } from \"./layout/nav-aside.js\";\nexport { NavLayout } from \"./layout/nav-layout.js\";\nexport { LoadingProgress } from \"./loading/loading-progress.js\";\nexport { SkeletonScreen } from \"./loading/skeleton-screen.js\";\nexport { OpenDetails } from \"./open/open-details.js\";\nexport { OpenDialog } from \"./open/open-dialog.js\";\nexport { OpenList } from \"./open/open-list.js\";\nexport { OpenOffset } from \"./open/open-offset.js\";\nexport { OpenTooltip } from \"./open/open-tooltip.js\";\nexport { ClipText } from \"./text/clip-text.js\";\nexport { OverbreathText } from \"./text/overbreath-text.js\";\nexport { TypewriterText } from \"./text/typewriter-text.js\";\nexport { RouteView } from \"./view/route-view.js\";\nexport { ScrollX } from \"./view/scroll-x.js\";\nexport { WrapView } from \"./view/wrap-view.js\";\n"]}
@@ -1,10 +1,10 @@
1
- import { type CSSResultGroup } from "../deps.js";
2
- import { type HTMLTemplate } from "../lib/templates.js";
3
- import { InputSTD } from "./std.js";
1
+ import { type CSSResultGroup } from "../../deps.js";
2
+ import { type HTMLTemplate } from "../../lib/templates.js";
3
+ import { InputElement } from "./input.js";
4
4
  /**
5
5
  * BaseInput.
6
6
  */
7
- export declare class BaseInput extends InputSTD {
7
+ export declare class BaseInput extends InputElement {
8
8
  /**
9
9
  * Input sccept.
10
10
  */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-input.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/input/base-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,cAAc,EAAyB,MAAM,eAAe,CAAC;AAChF,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAErE,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAI1C;;GAEG;AACH,qBACa,SAAU,SAAQ,YAAY;IACzC;;OAEG;IACS,MAAM,MAAa;IAC/B;;OAEG;IACS,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,QAAQ,CAAa;IACxD;;OAEG;IAC0B,IAAI,UAAS;IAC1C;;OAEG;IACyB,GAAG,SAAK;IACpC;;OAEG;IACyB,GAAG,SAAO;IACtC;;OAEG;IACyB,IAAI,SAAK;IAEpB,MAAM,EAAE,gBAAgB,CAAC;IACvB,OAAO,EAAE,WAAW,CAAC;IAExC,MAAM,CAAC,MAAM,iBA8GO;IAEpB,SAAS,CAAC,MAAM,IAAI,YAAY;IAahC,iBAAiB;IAejB,SAAS,CAAC,YAAY;IAOtB,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,GAAG,GAAG,KAAK;IAMrC,SAAS,CAAC,WAAW,CAAC,CAAC,EAAE,GAAG,GAAG,KAAK;IAKpC,KAAK;IAeL,SAAS,CAAC,aAAa,IAAI,YAAY;CAYxC;AAED,eAAe,SAAS,CAAC;AAEzB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,SAAS,CAAC;KACzB;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 { cssvar, cssvarValues, define } from "../root.js";
9
- import { htmlSlot } from "../lib/templates.js";
10
- import { InputSTD } 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 { cssvar, cssvarValues, define } from "../../root.js";
5
+ import { InputElement } from "./input.js";
11
6
  const defineName = "base-input";
12
7
  /**
13
8
  * BaseInput.
14
9
  */
15
- let BaseInput = class BaseInput extends InputSTD {
10
+ let BaseInput = class BaseInput extends InputElement {
16
11
  constructor() {
17
12
  super(...arguments);
18
13
  /**
@@ -40,77 +35,9 @@ let BaseInput = class BaseInput extends InputSTD {
40
35
  */
41
36
  this.step = 1;
42
37
  }
43
- render() {
44
- if (this.type === "range") {
45
- return html `<div class="range">
46
- <input id="input" type="range" min="${this.min}" max="${this.max}" step="${this.step}" @input="${this._handleRange}" @change="${this._handleRange}" />
47
- <b></b>
48
- <b>
49
- <i></i>
50
- </b>
51
- </div>`;
52
- }
53
- return html `<label for="input"> ${htmlSlot("pre")} ${this._typeSwitcher()} ${htmlSlot("suf")} </label>`;
54
- }
55
- connectedCallback() {
56
- super.connectedCallback();
57
- if (this.type === "file") {
58
- this.value = null;
59
- }
60
- else {
61
- if (!this.def) {
62
- this.def = this.value || "";
63
- }
64
- if (!this.value) {
65
- this.value = this.def;
66
- }
67
- }
68
- this._initName();
69
- }
70
- firstUpdated() {
71
- super.firstUpdated();
72
- if (this.type === "range") {
73
- this._ranged.style.width = 100 * (parseInt(this.value) / (this.max - this.min)) + "%";
74
- }
75
- }
76
- _handleRange(e) {
77
- this.value = e.target.value;
78
- this._ranged.style.width = (100 * parseInt(e.target.value)) / (this.max - this.min) + "%";
79
- this.dispatchEvent(new CustomEvent("input", { detail: this.value }));
80
- }
81
- _handleFile(e) {
82
- this.value = !this.only ? e.target.files : e.target.files[0];
83
- this.dispatchEvent(new CustomEvent("change", { detail: this.value }));
84
- }
85
- reset() {
86
- if (this.type === "file") {
87
- this.value = null;
88
- return;
89
- }
90
- if (this.type === "range") {
91
- this._input.value = this.def || ((this.max - this.min) / 2).toString();
92
- this.value = this._input.value;
93
- this._ranged.style.width = 100 * (parseInt(this.value) / (this.max - this.min)) + "%";
94
- }
95
- else {
96
- this._input.value = this.def.toString();
97
- this.value = this.def;
98
- }
99
- }
100
- _typeSwitcher() {
101
- switch (this.type) {
102
- case "file":
103
- return html `<input id="input" class="input" type="file" accept="${this.accept}" ?multiple="${!this.only}" @change="${this._handleFile}" />${htmlSlot()}`;
104
- case "number":
105
- return html `<input .value="${this.value}" ?autofocus="${this.autofocus}" id="input" class="input" type="number" placeholder="${this.pla}" min="${this.min}" max="${this.max}" @input="${this._handleInput}" @change="${this._handleChange}" />`;
106
- default:
107
- return html `<input .value="${this.value}" ?autofocus="${this.autofocus}" id="input" class="input" type="${this.type}" placeholder="${this.pla}" @input="${this._handleInput}" @change="${this._handleChange}" />`;
108
- }
109
- }
110
- };
111
- BaseInput.styles = [
112
- InputSTD.styles,
113
- css `
38
+ static { this.styles = [
39
+ InputElement.styles,
40
+ css `
114
41
  :host {
115
42
  width: var(${cssvarValues.input}--width);
116
43
  height: var(${cssvarValues.input}--height);
@@ -147,7 +74,7 @@ BaseInput.styles = [
147
74
  border-radius: 0.25em;
148
75
  }
149
76
  `,
150
- css `
77
+ css `
151
78
  :host([type="range"]) {
152
79
  height: auto !important;
153
80
  margin: 0.3em 0;
@@ -218,7 +145,75 @@ BaseInput.styles = [
218
145
  box-shadow: 0 0.1em 0.1em var(${cssvar}--shadow);
219
146
  }
220
147
  `,
221
- ];
148
+ ]; }
149
+ render() {
150
+ if (this.type === "range") {
151
+ return html `<div class="range">
152
+ <input id="input" type="range" min="${this.min}" max="${this.max}" step="${this.step}" @input="${this._handleRange}" @change="${this._handleRange}" />
153
+ <b></b>
154
+ <b>
155
+ <i></i>
156
+ </b>
157
+ </div>`;
158
+ }
159
+ return html `<label for="input"> ${htmlSlot("pre")} ${this._typeSwitcher()} ${htmlSlot("suf")} </label>`;
160
+ }
161
+ connectedCallback() {
162
+ super.connectedCallback();
163
+ if (this.type === "file") {
164
+ this.value = null;
165
+ }
166
+ else {
167
+ if (!this.def) {
168
+ this.def = this.value || "";
169
+ }
170
+ if (!this.value) {
171
+ this.value = this.def;
172
+ }
173
+ }
174
+ this._initName();
175
+ }
176
+ firstUpdated() {
177
+ super.firstUpdated();
178
+ if (this.type === "range") {
179
+ this._ranged.style.width = 100 * (parseInt(this.value) / (this.max - this.min)) + "%";
180
+ }
181
+ }
182
+ _handleRange(e) {
183
+ this.value = e.target.value;
184
+ this._ranged.style.width = (100 * parseInt(e.target.value)) / (this.max - this.min) + "%";
185
+ this.dispatchEvent(new CustomEvent("input", { detail: this.value }));
186
+ }
187
+ _handleFile(e) {
188
+ this.value = !this.only ? e.target.files : e.target.files[0];
189
+ this.dispatchEvent(new CustomEvent("change", { detail: this.value }));
190
+ }
191
+ reset() {
192
+ if (this.type === "file") {
193
+ this.value = null;
194
+ return;
195
+ }
196
+ if (this.type === "range") {
197
+ this._input.value = this.def || ((this.max - this.min) / 2).toString();
198
+ this.value = this._input.value;
199
+ this._ranged.style.width = 100 * (parseInt(this.value) / (this.max - this.min)) + "%";
200
+ }
201
+ else {
202
+ this._input.value = this.def.toString();
203
+ this.value = this.def;
204
+ }
205
+ }
206
+ _typeSwitcher() {
207
+ switch (this.type) {
208
+ case "file":
209
+ return html `<input id="input" class="input" type="file" accept="${this.accept}" ?multiple="${!this.only}" @change="${this._handleFile}" />${htmlSlot()}`;
210
+ case "number":
211
+ return html `<input .value="${this.value}" ?autofocus="${this.autofocus}" id="input" class="input" type="number" placeholder="${this.pla}" min="${this.min}" max="${this.max}" @input="${this._handleInput}" @change="${this._handleChange}" />`;
212
+ default:
213
+ return html `<input .value="${this.value}" ?autofocus="${this.autofocus}" id="input" class="input" type="${this.type}" placeholder="${this.pla}" @input="${this._handleInput}" @change="${this._handleChange}" />`;
214
+ }
215
+ }
216
+ };
222
217
  __decorate([
223
218
  property()
224
219
  ], BaseInput.prototype, "accept", void 0);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-input.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/input/base-input.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAuB,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO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AM,CAAC,UAAU,CAAC;GACN,SAAS,CAsNrB;;AAED,eAAe,SAAS,CAAC","sourcesContent":["import { css, type CSSResultGroup, html, property, query } from \"../../deps.js\";\nimport { htmlSlot, type HTMLTemplate } from \"../../lib/templates.js\";\nimport { cssvar, cssvarValues, define } from \"../../root.js\";\nimport { InputElement } from \"./input.js\";\n\nconst defineName = \"base-input\";\n\n/**\n * BaseInput.\n */\n@define(defineName)\nexport class BaseInput extends InputElement {\n /**\n * Input sccept.\n */\n @property() accept = undefined;\n /**\n * Value.\n */\n @property() value: string | File | FileList = undefined;\n /**\n * Only single files are allowed to be selected.\n */\n @property({ type: Boolean }) only = false;\n /**\n * Input min.\n */\n @property({ type: Number }) min = 0;\n /**\n * Input max.\n */\n @property({ type: Number }) max = 100;\n /**\n * Input step.\n */\n @property({ type: Number }) step = 1;\n\n @query(\"#input\") _input: HTMLInputElement;\n @query(\".range i\") _ranged: HTMLElement;\n\n static styles = [\n InputElement.styles,\n css`\n :host {\n width: var(${cssvarValues.input}--width);\n height: var(${cssvarValues.input}--height);\n background: var(${cssvarValues.input}--background);\n margin: var(${cssvarValues.input}--outline-width);\n outline: var(${cssvarValues.input}--outline);\n border-radius: var(${cssvarValues.input}--radius);\n }\n\n input[type=\"file\"] {\n display: none;\n }\n\n label,\n div {\n width: 100%;\n display: flex;\n align-items: center;\n }\n\n * {\n border-radius: inherit;\n cursor: inherit;\n }\n\n input {\n box-sizing: border-box;\n height: 100%;\n width: 100%;\n margin: 0;\n color: inherit;\n background: transparent;\n padding: 0 0.25em;\n border-radius: 0.25em;\n }\n `,\n css`\n :host([type=\"range\"]) {\n height: auto !important;\n margin: 0.3em 0;\n background: var(${cssvarValues.input}--false);\n border-radius: 2em;\n }\n\n .range b:nth-of-type(1) {\n width: 1em;\n left: 0;\n background: var(${cssvarValues.input}--true);\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n\n .range b {\n pointer-events: none;\n width: calc(100% - 1em);\n height: 100%;\n left: 1em;\n position: absolute;\n }\n\n .range {\n height: fit-content;\n position: relative;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n }\n\n .range input {\n padding: 0;\n height: 0.6em;\n margin: 0px -0.5em;\n appearance: none;\n -webkit-appearance: none;\n outline: none;\n background: transparent;\n }\n\n .range i {\n position: absolute;\n left: 0;\n width: 50%;\n height: 100%;\n pointer-events: none;\n background: var(${cssvarValues.input}--true);\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n\n .range input::-webkit-slider-runnable-track {\n height: 0.6em;\n }\n\n .range input::-webkit-slider-thumb {\n z-index: 1;\n appearance: none;\n -webkit-appearance: none;\n position: relative;\n height: 1.2em;\n width: 1.2em;\n margin-top: -0.3em;\n background: var(${cssvarValues.input}--control);\n border-radius: 50%;\n border: solid 0.125em var(${cssvarValues.input}--control-edge);\n box-shadow: 0 0.1em 0.1em var(${cssvar}--shadow);\n }\n `,\n ] as CSSResultGroup;\n\n protected render(): HTMLTemplate {\n if (this.type === \"range\") {\n return html`<div class=\"range\">\n <input id=\"input\" type=\"range\" min=\"${this.min}\" max=\"${this.max}\" step=\"${this.step}\" @input=\"${this._handleRange}\" @change=\"${this._handleRange}\" />\n <b></b>\n <b>\n <i></i>\n </b>\n </div>`;\n }\n return html`<label for=\"input\"> ${htmlSlot(\"pre\")} ${this._typeSwitcher()} ${htmlSlot(\"suf\")} </label>`;\n }\n\n connectedCallback() {\n super.connectedCallback();\n if (this.type === \"file\") {\n this.value = null;\n } else {\n if (!this.def) {\n this.def = (this.value as string) || \"\";\n }\n if (!this.value) {\n this.value = this.def;\n }\n }\n this._initName();\n }\n\n protected firstUpdated() {\n super.firstUpdated();\n if (this.type === \"range\") {\n this._ranged.style.width = 100 * (parseInt(this.value as string) / (this.max - this.min)) + \"%\";\n }\n }\n\n protected _handleRange(e: any | Event) {\n this.value = e.target.value;\n this._ranged.style.width = (100 * parseInt(e.target.value)) / (this.max - this.min) + \"%\";\n this.dispatchEvent(new CustomEvent(\"input\", { detail: this.value }));\n }\n\n protected _handleFile(e: any | Event) {\n this.value = !this.only ? e.target.files : e.target.files[0];\n this.dispatchEvent(new CustomEvent(\"change\", { detail: this.value }));\n }\n\n reset() {\n if (this.type === \"file\") {\n this.value = null;\n return;\n }\n if (this.type === \"range\") {\n this._input.value = this.def || ((this.max - this.min) / 2).toString();\n this.value = this._input.value;\n this._ranged.style.width = 100 * (parseInt(this.value) / (this.max - this.min)) + \"%\";\n } else {\n this._input.value = this.def.toString();\n this.value = this.def;\n }\n }\n\n protected _typeSwitcher(): HTMLTemplate {\n switch (this.type) {\n case \"file\":\n return html`<input id=\"input\" class=\"input\" type=\"file\" accept=\"${this.accept}\" ?multiple=\"${!this.only}\" @change=\"${this._handleFile}\" />${htmlSlot()}`;\n\n case \"number\":\n return html`<input .value=\"${this.value}\" ?autofocus=\"${this.autofocus}\" id=\"input\" class=\"input\" type=\"number\" placeholder=\"${this.pla}\" min=\"${this.min}\" max=\"${this.max}\" @input=\"${this._handleInput}\" @change=\"${this._handleChange}\" />`;\n\n default:\n return html`<input .value=\"${this.value}\" ?autofocus=\"${this.autofocus}\" id=\"input\" class=\"input\" type=\"${this.type}\" placeholder=\"${this.pla}\" @input=\"${this._handleInput}\" @change=\"${this._handleChange}\" />`;\n }\n }\n}\n\nexport default BaseInput;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"base-input\": BaseInput;\n }\n}\n"]}
@@ -1,7 +1,7 @@
1
- import { type CSSResultGroup } from "../deps.js";
2
- import { GodownElement } from "../root.js";
1
+ import { type CSSResultGroup } from "../../deps.js";
2
+ import { GodownElement } from "../../root.js";
3
3
  export type InputType = "hidden" | "text" | "search" | "tel" | "url" | "email" | "password" | "datetime" | "date" | "month" | "week" | "time" | "datetime-local" | "number" | "range" | "color" | "checkbox" | "radio" | "file" | "image";
4
- export declare class InputSTD extends GodownElement {
4
+ export declare class InputElement extends GodownElement {
5
5
  type: InputType;
6
6
  name: string;
7
7
  value: string | any;
@@ -25,16 +25,4 @@ export declare class InputSTD extends GodownElement {
25
25
  protected firstUpdated(): void;
26
26
  protected targetValue(e: Event): string | any;
27
27
  }
28
- export declare class FormSTD<T extends object = object> extends GodownElement {
29
- static styles: CSSResultGroup;
30
- name: string;
31
- value: T;
32
- namevalue(): [string, T];
33
- nameValue: () => [string, T];
34
- }
35
- declare const _default: {
36
- InputSTD: typeof InputSTD;
37
- FormSTD: typeof FormSTD;
38
- };
39
- export default _default;
40
- //# sourceMappingURL=std.d.ts.map
28
+ //# sourceMappingURL=input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/input/input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,cAAc,EAAY,MAAM,eAAe,CAAC;AACnE,OAAO,EAAgB,aAAa,EAAE,MAAM,eAAe,CAAC;AAE5D,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,KAAK,GAAG,OAAO,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,gBAAgB,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;AAE1O,qBAAa,YAAa,SAAQ,aAAa;IAChB,IAAI,EAAE,SAAS,CAAU;IAC1C,IAAI,EAAE,MAAM,CAAa;IACzB,KAAK,EAAE,MAAM,GAAG,GAAG,CAAa;IACf,KAAK,SAAM;IAC5B,GAAG,SAAM;IACQ,GAAG,CAAC,EAAE,MAAM,CAAa;IACV,SAAS,UAAS;IAE9D,MAAM,EAAE,gBAAgB,CAAC;IACzB,WAAW,EAAE,OAAO,CAAC;IAErB,MAAM,CAAC,MAAM,iBAcO;IAEpB,SAAS,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC;IAI1B,SAAS,sBAA0B;IAEnC,KAAK;IAKL,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,GAAG;IAU7B,SAAS,CAAC,aAAa;IAIvB,iBAAiB;IAWjB,SAAS,CAAC,SAAS;IAQnB,SAAS,CAAC,iBAAiB;IAY3B,SAAS,CAAC,gBAAgB,CAAC,CAAC,EAAE,SAAS;IAIvC,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY;IAI5B,SAAS,CAAC,YAAY;IAKtB,SAAS,CAAC,WAAW,CAAC,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,GAAG;CAO9C"}
@@ -1,12 +1,7 @@
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 { cssvarValues, GodownElement } from "../root.js";
9
- export class InputSTD extends GodownElement {
1
+ import { __decorate } from "tslib";
2
+ import { css, property } from "../../deps.js";
3
+ import { cssvarValues, GodownElement } from "../../root.js";
4
+ export class InputElement extends GodownElement {
10
5
  constructor() {
11
6
  super(...arguments);
12
7
  this.type = "text";
@@ -18,6 +13,21 @@ export class InputSTD extends GodownElement {
18
13
  this.autofocus = false;
19
14
  this.nameValue = () => this.namevalue();
20
15
  }
16
+ static { this.styles = [
17
+ GodownElement.styles,
18
+ css `
19
+ :host {
20
+ display: flex;
21
+ }
22
+ ::-ms-reveal {
23
+ display: none;
24
+ }
25
+ ::-webkit-calendar-picker-indicator {
26
+ background-color: var(${cssvarValues.input}-true);
27
+ border-radius: 0.1rem;
28
+ }
29
+ `,
30
+ ]; }
21
31
  namevalue() {
22
32
  return [this.name, this.value];
23
33
  }
@@ -83,62 +93,25 @@ export class InputSTD extends GodownElement {
83
93
  return target.value;
84
94
  }
85
95
  }
86
- InputSTD.styles = [
87
- GodownElement.styles,
88
- css `
89
- :host {
90
- display: flex;
91
- }
92
- ::-ms-reveal {
93
- display: none;
94
- }
95
- ::-webkit-calendar-picker-indicator {
96
- background-color: var(${cssvarValues.input}-true);
97
- border-radius: 0.1rem;
98
- }
99
- `,
100
- ];
101
96
  __decorate([
102
97
  property({ reflect: true })
103
- ], InputSTD.prototype, "type", void 0);
98
+ ], InputElement.prototype, "type", void 0);
104
99
  __decorate([
105
100
  property()
106
- ], InputSTD.prototype, "name", void 0);
101
+ ], InputElement.prototype, "name", void 0);
107
102
  __decorate([
108
103
  property()
109
- ], InputSTD.prototype, "value", void 0);
104
+ ], InputElement.prototype, "value", void 0);
110
105
  __decorate([
111
106
  property({ reflect: true })
112
- ], InputSTD.prototype, "label", void 0);
107
+ ], InputElement.prototype, "label", void 0);
113
108
  __decorate([
114
109
  property()
115
- ], InputSTD.prototype, "def", void 0);
110
+ ], InputElement.prototype, "def", void 0);
116
111
  __decorate([
117
112
  property({ reflect: true })
118
- ], InputSTD.prototype, "pla", void 0);
113
+ ], InputElement.prototype, "pla", void 0);
119
114
  __decorate([
120
115
  property({ type: Boolean, reflect: true })
121
- ], InputSTD.prototype, "autofocus", void 0);
122
- export class FormSTD extends GodownElement {
123
- constructor() {
124
- super(...arguments);
125
- this.name = "";
126
- this.value = {};
127
- this.nameValue = () => this.namevalue();
128
- }
129
- namevalue() {
130
- return [this.name, this.value];
131
- }
132
- }
133
- FormSTD.styles = GodownElement.styles;
134
- __decorate([
135
- property()
136
- ], FormSTD.prototype, "name", void 0);
137
- __decorate([
138
- property({ type: Object })
139
- ], FormSTD.prototype, "value", void 0);
140
- export default {
141
- InputSTD,
142
- FormSTD,
143
- };
144
- //# sourceMappingURL=std.js.map
116
+ ], InputElement.prototype, "autofocus", void 0);
117
+ //# sourceMappingURL=input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/input/input.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAuB,QAAQ,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAI5D,MAAM,OAAO,YAAa,SAAQ,aAAa;IAA/C;;QAC+B,SAAI,GAAc,MAAM,CAAC;QAC1C,SAAI,GAAW,SAAS,CAAC;QACzB,UAAK,GAAiB,SAAS,CAAC;QACf,UAAK,GAAG,EAAE,CAAC;QAC5B,QAAG,GAAG,EAAE,CAAC;QACQ,QAAG,GAAY,SAAS,CAAC;QACV,cAAS,GAAG,KAAK,CAAC;QAyB9D,cAAS,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;IAwErC,CAAC;aA5FQ,WAAM,GAAG;QACd,aAAa,CAAC,MAAM;QACpB,GAAG,CAAA;;;;;;;;gCAQyB,YAAY,CAAC,KAAK;;;KAG7C;KACgB,AAdN,CAcO;IAEpB,SAAS;QACP,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;IAID,KAAK;QACH,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC;QACtB,IAAI,CAAC,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC;IAC/B,CAAC;IAES,YAAY,CAAC,CAAM;QAC3B,CAAC,CAAC,eAAe,EAAE,CAAC;QACpB,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC;QACpC,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACrB,OAAO;QACT,CAAC;QACD,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,EAAE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,gBAAgB,EAAE,CAAC,CAAa,EAAE,EAAE;gBAC7D,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;gBACzB,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;YACvB,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAES,gBAAgB,CAAC,CAAY;QACrC,IAAI,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,CAAC;IACvB,CAAC;IAED,KAAK,CAAC,OAAsB;QAC1B,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAC9B,CAAC;IAES,YAAY;QACpB,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACzB,IAAI,CAAC,KAAK,EAAE,CAAC;IACf,CAAC;IAES,WAAW,CAAC,CAAQ;QAC5B,MAAM,MAAM,GAAG,CAAC,CAAC,MAA0B,CAAC;QAC5C,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;YACtB,OAAO,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;QAC7B,CAAC;QACD,OAAO,MAAM,CAAC,KAAK,CAAC;IACtB,CAAC;;AAtG4B;IAA5B,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0CAA0B;AAC1C;IAAX,QAAQ,EAAE;0CAA0B;AACzB;IAAX,QAAQ,EAAE;2CAAiC;AACf;IAA5B,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2CAAY;AAC5B;IAAX,QAAQ,EAAE;yCAAU;AACQ;IAA5B,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCAA0B;AACV;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;+CAAmB","sourcesContent":["import { css, type CSSResultGroup, property } from \"../../deps.js\";\nimport { cssvarValues, GodownElement } from \"../../root.js\";\n\nexport type InputType = \"hidden\" | \"text\" | \"search\" | \"tel\" | \"url\" | \"email\" | \"password\" | \"datetime\" | \"date\" | \"month\" | \"week\" | \"time\" | \"datetime-local\" | \"number\" | \"range\" | \"color\" | \"checkbox\" | \"radio\" | \"file\" | \"image\";\n\nexport class InputElement extends GodownElement {\n @property({ reflect: true }) type: InputType = \"text\";\n @property() name: string = undefined;\n @property() value: string | any = undefined;\n @property({ reflect: true }) label = \"\";\n @property() def = \"\";\n @property({ reflect: true }) pla?: string = undefined;\n @property({ type: Boolean, reflect: true }) autofocus = false;\n\n _input: HTMLInputElement;\n compositing: boolean;\n\n static styles = [\n GodownElement.styles,\n css`\n :host {\n display: flex;\n }\n ::-ms-reveal {\n display: none;\n }\n ::-webkit-calendar-picker-indicator {\n background-color: var(${cssvarValues.input}-true);\n border-radius: 0.1rem;\n }\n `,\n ] as CSSResultGroup;\n\n namevalue(): [string, any] {\n return [this.name, this.value];\n }\n\n nameValue = () => this.namevalue();\n\n reset() {\n this.value = this.def;\n this._input.value = this.def;\n }\n\n protected _handleInput(e: any) {\n e.stopPropagation();\n this.value = e.target.value?.trim();\n if (this.compositing) {\n return;\n }\n this.dispatchEvent(new CustomEvent(\"input\", { detail: this.value, bubbles: true, composed: true }));\n this.dispatchEvent(new CustomEvent(\"change\", { detail: this.value, composed: true }));\n }\n\n protected _handleChange() {\n this.dispatchEvent(new CustomEvent(\"change\", { detail: this.value, composed: true }));\n }\n\n connectedCallback() {\n super.connectedCallback();\n if (!this.def) {\n this.def = this.value || \"\";\n }\n if (!this.value) {\n this.value = this.def;\n }\n this._initName();\n }\n\n protected _initName() {\n if (!this.name) {\n if (this.label || this.type) {\n this.name = this.label || this.type;\n }\n }\n }\n\n protected _compositionCheck() {\n if (this._input) {\n this.addEvent(this._input, \"compositionstart\", () => {\n this.compositing = true;\n });\n this.addEvent(this._input, \"compositionend\", (e: MouseEvent) => {\n this.compositing = false;\n this._handleInput(e);\n });\n }\n }\n\n protected _changeInputType(t: InputType) {\n this._input.type = t;\n }\n\n focus(options?: FocusOptions) {\n this._input?.focus(options);\n }\n\n protected firstUpdated() {\n this._compositionCheck();\n this.reset();\n }\n\n protected targetValue(e: Event): string | any {\n const target = e.target as HTMLInputElement;\n if (target.value.trim) {\n return target.value.trim();\n }\n return target.value;\n }\n}\n"]}
@@ -1,6 +1,6 @@
1
- import { type CSSResultGroup } from "../deps.js";
2
- import { type HTMLTemplate } from "../lib/templates.js";
3
- import { InputSTD } from "./std.js";
1
+ import { type CSSResultGroup } from "../../deps.js";
2
+ import { type HTMLTemplate } from "../../lib/templates.js";
3
+ import { InputElement } from "./input.js";
4
4
  /**
5
5
  * LabelInput renders label and input.
6
6
  *
@@ -8,7 +8,7 @@ import { InputSTD } from "./std.js";
8
8
  *
9
9
  * Otherwise it behaves similarly to the `BaseInput`.
10
10
  */
11
- export declare class LabelInput extends InputSTD {
11
+ export declare class LabelInput extends InputElement {
12
12
  /**
13
13
  * Conditions for adjust layout.
14
14
  */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"label-input.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/input/label-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,cAAc,EAAyB,MAAM,eAAe,CAAC;AAChF,OAAO,EAAuB,KAAK,YAAY,EAAU,MAAM,wBAAwB,CAAC;AAExF,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AA+B1C;;;;;;GAMG;AACH,qBACa,UAAW,SAAQ,YAAY;IAC1C;;OAEG;IACS,MAAM,SAAW;IAEb,MAAM,EAAE,gBAAgB,CAAC;IAEzC,MAAM,CAAC,MAAM,iBA4DO;IAEpB,SAAS,CAAC,MAAM,IAAI,YAAY,EAAE;IAmBlC,OAAO,CAAC,SAAS;IAkBjB,SAAS,CAAC,iBAAiB;CAO5B;AAED,eAAe,UAAU,CAAC;AAE1B,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,UAAU,CAAC;KAC3B;CACF"}