godown 2.7.7 → 3.0.0-canary.1

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 (736) hide show
  1. package/README.md +44 -80
  2. package/alert.d.ts +2 -3
  3. package/alert.d.ts.map +1 -1
  4. package/alert.js +5 -4
  5. package/alert.js.map +1 -1
  6. package/avatar.d.ts +2 -3
  7. package/avatar.d.ts.map +1 -1
  8. package/avatar.js +5 -4
  9. package/avatar.js.map +1 -1
  10. package/breath.d.ts +9 -0
  11. package/breath.d.ts.map +1 -0
  12. package/breath.js +6 -0
  13. package/breath.js.map +1 -0
  14. package/button.d.ts +2 -3
  15. package/button.d.ts.map +1 -1
  16. package/button.js +5 -4
  17. package/button.js.map +1 -1
  18. package/card.d.ts +2 -3
  19. package/card.d.ts.map +1 -1
  20. package/card.js +5 -4
  21. package/card.js.map +1 -1
  22. package/carousel.d.ts +2 -3
  23. package/carousel.d.ts.map +1 -1
  24. package/carousel.js +5 -4
  25. package/carousel.js.map +1 -1
  26. package/components/alert.d.ts +50 -0
  27. package/components/alert.d.ts.map +1 -0
  28. package/components/alert.js +167 -0
  29. package/components/alert.js.map +1 -0
  30. package/components/avatar.d.ts +26 -0
  31. package/components/avatar.d.ts.map +1 -0
  32. package/components/avatar.js +62 -0
  33. package/components/avatar.js.map +1 -0
  34. package/components/breath.d.ts +34 -0
  35. package/components/breath.d.ts.map +1 -0
  36. package/components/breath.js +80 -0
  37. package/components/breath.js.map +1 -0
  38. package/{web-components/button → components}/button.d.ts +6 -5
  39. package/components/button.d.ts.map +1 -0
  40. package/components/button.js +167 -0
  41. package/components/button.js.map +1 -0
  42. package/components/card.d.ts +20 -0
  43. package/components/card.d.ts.map +1 -0
  44. package/components/card.js +55 -0
  45. package/components/card.js.map +1 -0
  46. package/components/carousel.d.ts +40 -0
  47. package/components/carousel.d.ts.map +1 -0
  48. package/components/carousel.js +113 -0
  49. package/components/carousel.js.map +1 -0
  50. package/{web-components/details → components}/details.d.ts +5 -3
  51. package/components/details.d.ts.map +1 -0
  52. package/components/details.js +50 -0
  53. package/components/details.js.map +1 -0
  54. package/components/dialog.d.ts +33 -0
  55. package/components/dialog.d.ts.map +1 -0
  56. package/components/dialog.js +92 -0
  57. package/components/dialog.js.map +1 -0
  58. package/components/divider.d.ts +17 -0
  59. package/components/divider.d.ts.map +1 -0
  60. package/components/divider.js +37 -0
  61. package/components/divider.js.map +1 -0
  62. package/{web-components/wrapper → components}/dragbox.d.ts +15 -5
  63. package/components/dragbox.d.ts.map +1 -0
  64. package/components/dragbox.js +110 -0
  65. package/components/dragbox.js.map +1 -0
  66. package/components/flex.d.ts +31 -0
  67. package/components/flex.d.ts.map +1 -0
  68. package/components/flex.js +55 -0
  69. package/components/flex.js.map +1 -0
  70. package/{web-components/form → components}/form.d.ts +4 -2
  71. package/components/form.d.ts.map +1 -0
  72. package/components/form.js +78 -0
  73. package/components/form.js.map +1 -0
  74. package/components/grid.d.ts +31 -0
  75. package/components/grid.d.ts.map +1 -0
  76. package/components/grid.js +56 -0
  77. package/components/grid.js.map +1 -0
  78. package/components/input.d.ts +20 -0
  79. package/components/input.d.ts.map +1 -0
  80. package/components/input.js +54 -0
  81. package/components/input.js.map +1 -0
  82. package/components/layout.d.ts +29 -0
  83. package/components/layout.d.ts.map +1 -0
  84. package/components/layout.js +48 -0
  85. package/components/layout.js.map +1 -0
  86. package/components/link.d.ts +20 -0
  87. package/components/link.d.ts.map +1 -0
  88. package/components/link.js +43 -0
  89. package/components/link.js.map +1 -0
  90. package/{web-components/progress → components}/progress.d.ts +5 -3
  91. package/components/progress.d.ts.map +1 -0
  92. package/components/progress.js +68 -0
  93. package/components/progress.js.map +1 -0
  94. package/components/range.d.ts +60 -0
  95. package/components/range.d.ts.map +1 -0
  96. package/components/range.js +193 -0
  97. package/components/range.js.map +1 -0
  98. package/{web-components/wrapper → components}/rotate.d.ts +4 -8
  99. package/components/rotate.d.ts.map +1 -0
  100. package/components/rotate.js +57 -0
  101. package/components/rotate.js.map +1 -0
  102. package/components/router.d.ts +121 -0
  103. package/components/router.d.ts.map +1 -0
  104. package/components/router.js +251 -0
  105. package/components/router.js.map +1 -0
  106. package/components/select.d.ts +50 -0
  107. package/components/select.d.ts.map +1 -0
  108. package/components/select.js +211 -0
  109. package/components/select.js.map +1 -0
  110. package/{web-components/skeleton → components}/skeleton.d.ts +6 -6
  111. package/components/skeleton.d.ts.map +1 -0
  112. package/components/skeleton.js +56 -0
  113. package/components/skeleton.js.map +1 -0
  114. package/components/split.d.ts +32 -0
  115. package/components/split.d.ts.map +1 -0
  116. package/components/split.js +121 -0
  117. package/components/split.js.map +1 -0
  118. package/{web-components/input/switch-input.d.ts → components/switch.d.ts} +9 -10
  119. package/components/switch.d.ts.map +1 -0
  120. package/components/switch.js +93 -0
  121. package/components/switch.js.map +1 -0
  122. package/{web-components/text → components}/text.d.ts +5 -3
  123. package/components/text.d.ts.map +1 -0
  124. package/components/text.js +44 -0
  125. package/components/text.js.map +1 -0
  126. package/{web-components/text → components}/time.d.ts +5 -3
  127. package/components/time.d.ts.map +1 -0
  128. package/components/time.js +139 -0
  129. package/components/time.js.map +1 -0
  130. package/components/tooltip.d.ts +38 -0
  131. package/components/tooltip.d.ts.map +1 -0
  132. package/components/tooltip.js +67 -0
  133. package/components/tooltip.js.map +1 -0
  134. package/{web-components/text → components}/typewriter.d.ts +5 -3
  135. package/components/typewriter.d.ts.map +1 -0
  136. package/components/typewriter.js +130 -0
  137. package/components/typewriter.js.map +1 -0
  138. package/core/global-style.d.ts +21 -0
  139. package/core/global-style.d.ts.map +1 -0
  140. package/core/global-style.js +46 -0
  141. package/core/global-style.js.map +1 -0
  142. package/core/super-anchor.d.ts +15 -0
  143. package/core/super-anchor.d.ts.map +1 -0
  144. package/core/super-anchor.js +39 -0
  145. package/core/super-anchor.js.map +1 -0
  146. package/core/super-input.d.ts +39 -0
  147. package/core/super-input.d.ts.map +1 -0
  148. package/core/super-input.js +115 -0
  149. package/core/super-input.js.map +1 -0
  150. package/{proto → core}/super-openable.d.ts +4 -8
  151. package/core/super-openable.d.ts.map +1 -0
  152. package/core/super-openable.js +38 -0
  153. package/core/super-openable.js.map +1 -0
  154. package/custom-elements.json +1 -0
  155. package/details.d.ts +2 -3
  156. package/details.d.ts.map +1 -1
  157. package/details.js +5 -4
  158. package/details.js.map +1 -1
  159. package/dev/alert.d.ts +8 -0
  160. package/dev/alert.d.ts.map +1 -0
  161. package/dev/alert.js +4 -0
  162. package/dev/alert.js.map +1 -0
  163. package/dev/avatar.d.ts +8 -0
  164. package/dev/avatar.d.ts.map +1 -0
  165. package/dev/avatar.js +4 -0
  166. package/dev/avatar.js.map +1 -0
  167. package/dev/breath.d.ts +9 -0
  168. package/dev/breath.d.ts.map +1 -0
  169. package/dev/breath.js +5 -0
  170. package/dev/breath.js.map +1 -0
  171. package/dev/button.d.ts +8 -0
  172. package/dev/button.d.ts.map +1 -0
  173. package/dev/button.js +4 -0
  174. package/dev/button.js.map +1 -0
  175. package/dev/card.d.ts +8 -0
  176. package/dev/card.d.ts.map +1 -0
  177. package/dev/card.js +4 -0
  178. package/dev/card.js.map +1 -0
  179. package/dev/carousel.d.ts +8 -0
  180. package/dev/carousel.d.ts.map +1 -0
  181. package/dev/carousel.js +4 -0
  182. package/dev/carousel.js.map +1 -0
  183. package/dev/components/alert.d.ts +50 -0
  184. package/dev/components/alert.d.ts.map +1 -0
  185. package/dev/components/alert.js +234 -0
  186. package/dev/components/alert.js.map +1 -0
  187. package/dev/components/avatar.d.ts +26 -0
  188. package/dev/components/avatar.d.ts.map +1 -0
  189. package/dev/components/avatar.js +91 -0
  190. package/dev/components/avatar.js.map +1 -0
  191. package/dev/components/breath.d.ts +34 -0
  192. package/dev/components/breath.d.ts.map +1 -0
  193. package/dev/components/breath.js +133 -0
  194. package/dev/components/breath.js.map +1 -0
  195. package/dev/components/button.d.ts +45 -0
  196. package/dev/components/button.d.ts.map +1 -0
  197. package/{web-components/button → dev/components}/button.js +76 -76
  198. package/dev/components/button.js.map +1 -0
  199. package/dev/components/card.d.ts +20 -0
  200. package/dev/components/card.d.ts.map +1 -0
  201. package/dev/components/card.js +89 -0
  202. package/dev/components/card.js.map +1 -0
  203. package/dev/components/carousel.d.ts +40 -0
  204. package/dev/components/carousel.d.ts.map +1 -0
  205. package/dev/components/carousel.js +155 -0
  206. package/dev/components/carousel.js.map +1 -0
  207. package/dev/components/details.d.ts +20 -0
  208. package/dev/components/details.d.ts.map +1 -0
  209. package/dev/components/details.js +115 -0
  210. package/dev/components/details.js.map +1 -0
  211. package/dev/components/dialog.d.ts +33 -0
  212. package/dev/components/dialog.d.ts.map +1 -0
  213. package/dev/components/dialog.js +154 -0
  214. package/dev/components/dialog.js.map +1 -0
  215. package/dev/components/divider.d.ts +17 -0
  216. package/dev/components/divider.d.ts.map +1 -0
  217. package/dev/components/divider.js +46 -0
  218. package/dev/components/divider.js.map +1 -0
  219. package/dev/components/dragbox.d.ts +40 -0
  220. package/dev/components/dragbox.d.ts.map +1 -0
  221. package/{web-components/wrapper → dev/components}/dragbox.js +27 -15
  222. package/dev/components/dragbox.js.map +1 -0
  223. package/dev/components/flex.d.ts +31 -0
  224. package/dev/components/flex.d.ts.map +1 -0
  225. package/dev/components/flex.js +52 -0
  226. package/dev/components/flex.js.map +1 -0
  227. package/dev/components/form.d.ts +24 -0
  228. package/dev/components/form.d.ts.map +1 -0
  229. package/{web-components/form → dev/components}/form.js +11 -11
  230. package/dev/components/form.js.map +1 -0
  231. package/dev/components/grid.d.ts +31 -0
  232. package/dev/components/grid.d.ts.map +1 -0
  233. package/dev/components/grid.js +53 -0
  234. package/dev/components/grid.js.map +1 -0
  235. package/dev/components/input.d.ts +20 -0
  236. package/dev/components/input.d.ts.map +1 -0
  237. package/dev/components/input.js +89 -0
  238. package/dev/components/input.js.map +1 -0
  239. package/dev/components/layout.d.ts +29 -0
  240. package/dev/components/layout.d.ts.map +1 -0
  241. package/dev/components/layout.js +69 -0
  242. package/dev/components/layout.js.map +1 -0
  243. package/dev/components/link.d.ts +20 -0
  244. package/dev/components/link.d.ts.map +1 -0
  245. package/dev/components/link.js +40 -0
  246. package/dev/components/link.js.map +1 -0
  247. package/dev/components/progress.d.ts +30 -0
  248. package/dev/components/progress.d.ts.map +1 -0
  249. package/{web-components/progress → dev/components}/progress.js +12 -11
  250. package/dev/components/progress.js.map +1 -0
  251. package/dev/components/range.d.ts +60 -0
  252. package/dev/components/range.d.ts.map +1 -0
  253. package/{web-components/input/range-input.js → dev/components/range.js} +82 -92
  254. package/dev/components/range.js.map +1 -0
  255. package/dev/components/rotate.d.ts +26 -0
  256. package/dev/components/rotate.d.ts.map +1 -0
  257. package/{web-components/wrapper → dev/components}/rotate.js +14 -20
  258. package/dev/components/rotate.js.map +1 -0
  259. package/dev/components/router.d.ts +121 -0
  260. package/dev/components/router.d.ts.map +1 -0
  261. package/dev/components/router.js +248 -0
  262. package/dev/components/router.js.map +1 -0
  263. package/dev/components/select.d.ts +50 -0
  264. package/dev/components/select.d.ts.map +1 -0
  265. package/dev/components/select.js +243 -0
  266. package/dev/components/select.js.map +1 -0
  267. package/dev/components/skeleton.d.ts +26 -0
  268. package/dev/components/skeleton.d.ts.map +1 -0
  269. package/dev/components/skeleton.js +119 -0
  270. package/dev/components/skeleton.js.map +1 -0
  271. package/dev/components/split.d.ts +32 -0
  272. package/dev/components/split.d.ts.map +1 -0
  273. package/dev/components/split.js +173 -0
  274. package/dev/components/split.js.map +1 -0
  275. package/dev/components/switch.d.ts +39 -0
  276. package/dev/components/switch.d.ts.map +1 -0
  277. package/{web-components/input/switch-input.js → dev/components/switch.js} +53 -59
  278. package/dev/components/switch.js.map +1 -0
  279. package/dev/components/text.d.ts +19 -0
  280. package/dev/components/text.d.ts.map +1 -0
  281. package/{web-components/text → dev/components}/text.js +22 -23
  282. package/dev/components/text.js.map +1 -0
  283. package/dev/components/time.d.ts +53 -0
  284. package/dev/components/time.d.ts.map +1 -0
  285. package/{web-components/text → dev/components}/time.js +12 -18
  286. package/dev/components/time.js.map +1 -0
  287. package/dev/components/tooltip.d.ts +38 -0
  288. package/dev/components/tooltip.d.ts.map +1 -0
  289. package/dev/components/tooltip.js +114 -0
  290. package/dev/components/tooltip.js.map +1 -0
  291. package/dev/components/typewriter.d.ts +55 -0
  292. package/dev/components/typewriter.d.ts.map +1 -0
  293. package/{web-components/text → dev/components}/typewriter.js +21 -19
  294. package/dev/components/typewriter.js.map +1 -0
  295. package/dev/core/global-style.d.ts +21 -0
  296. package/dev/core/global-style.d.ts.map +1 -0
  297. package/dev/core/global-style.js +77 -0
  298. package/dev/core/global-style.js.map +1 -0
  299. package/dev/core/super-anchor.d.ts +15 -0
  300. package/dev/core/super-anchor.d.ts.map +1 -0
  301. package/dev/core/super-anchor.js +58 -0
  302. package/dev/core/super-anchor.js.map +1 -0
  303. package/dev/core/super-input.d.ts +39 -0
  304. package/dev/core/super-input.d.ts.map +1 -0
  305. package/dev/core/super-input.js +181 -0
  306. package/dev/core/super-input.js.map +1 -0
  307. package/dev/core/super-openable.d.ts +19 -0
  308. package/dev/core/super-openable.d.ts.map +1 -0
  309. package/{proto → dev/core}/super-openable.js +6 -13
  310. package/dev/core/super-openable.js.map +1 -0
  311. package/dev/details.d.ts +8 -0
  312. package/dev/details.d.ts.map +1 -0
  313. package/dev/details.js +4 -0
  314. package/dev/details.js.map +1 -0
  315. package/dev/dialog.d.ts +8 -0
  316. package/dev/dialog.d.ts.map +1 -0
  317. package/dev/dialog.js +4 -0
  318. package/dev/dialog.js.map +1 -0
  319. package/dev/divider.d.ts +8 -0
  320. package/dev/divider.d.ts.map +1 -0
  321. package/dev/divider.js +4 -0
  322. package/dev/divider.js.map +1 -0
  323. package/dev/dragbox.d.ts +8 -0
  324. package/dev/dragbox.d.ts.map +1 -0
  325. package/dev/dragbox.js +4 -0
  326. package/dev/dragbox.js.map +1 -0
  327. package/dev/flex.d.ts +8 -0
  328. package/dev/flex.d.ts.map +1 -0
  329. package/dev/flex.js +4 -0
  330. package/dev/flex.js.map +1 -0
  331. package/dev/form.d.ts +8 -0
  332. package/dev/form.d.ts.map +1 -0
  333. package/dev/form.js +4 -0
  334. package/dev/form.js.map +1 -0
  335. package/dev/grid.d.ts +8 -0
  336. package/dev/grid.d.ts.map +1 -0
  337. package/dev/grid.js +4 -0
  338. package/dev/grid.js.map +1 -0
  339. package/dev/index.d.ts +29 -0
  340. package/dev/index.d.ts.map +1 -0
  341. package/dev/index.js +29 -0
  342. package/dev/index.js.map +1 -0
  343. package/dev/input.d.ts +9 -0
  344. package/dev/input.d.ts.map +1 -0
  345. package/dev/input.js +5 -0
  346. package/dev/input.js.map +1 -0
  347. package/dev/layout.d.ts +9 -0
  348. package/dev/layout.d.ts.map +1 -0
  349. package/dev/layout.js +5 -0
  350. package/dev/layout.js.map +1 -0
  351. package/dev/link.d.ts +9 -0
  352. package/dev/link.d.ts.map +1 -0
  353. package/dev/link.js +5 -0
  354. package/dev/link.js.map +1 -0
  355. package/dev/progress.d.ts +9 -0
  356. package/dev/progress.d.ts.map +1 -0
  357. package/dev/progress.js +5 -0
  358. package/dev/progress.js.map +1 -0
  359. package/dev/range.d.ts +9 -0
  360. package/dev/range.d.ts.map +1 -0
  361. package/dev/range.js +5 -0
  362. package/dev/range.js.map +1 -0
  363. package/dev/rotate.d.ts +9 -0
  364. package/dev/rotate.d.ts.map +1 -0
  365. package/dev/rotate.js +5 -0
  366. package/dev/rotate.js.map +1 -0
  367. package/dev/router.d.ts +9 -0
  368. package/dev/router.d.ts.map +1 -0
  369. package/dev/router.js +5 -0
  370. package/dev/router.js.map +1 -0
  371. package/dev/select.d.ts +9 -0
  372. package/dev/select.d.ts.map +1 -0
  373. package/dev/select.js +5 -0
  374. package/dev/select.js.map +1 -0
  375. package/dev/skeleton.d.ts +9 -0
  376. package/dev/skeleton.d.ts.map +1 -0
  377. package/dev/skeleton.js +5 -0
  378. package/dev/skeleton.js.map +1 -0
  379. package/dev/split.d.ts +9 -0
  380. package/dev/split.d.ts.map +1 -0
  381. package/dev/split.js +5 -0
  382. package/dev/split.js.map +1 -0
  383. package/dev/switch.d.ts +9 -0
  384. package/dev/switch.d.ts.map +1 -0
  385. package/dev/switch.js +5 -0
  386. package/dev/switch.js.map +1 -0
  387. package/dev/text.d.ts +9 -0
  388. package/dev/text.d.ts.map +1 -0
  389. package/dev/text.js +5 -0
  390. package/dev/text.js.map +1 -0
  391. package/dev/time.d.ts +9 -0
  392. package/dev/time.d.ts.map +1 -0
  393. package/dev/time.js +5 -0
  394. package/dev/time.js.map +1 -0
  395. package/dev/tooltip.d.ts +9 -0
  396. package/dev/tooltip.d.ts.map +1 -0
  397. package/dev/tooltip.js +5 -0
  398. package/dev/tooltip.js.map +1 -0
  399. package/dev/typewriter.d.ts +8 -0
  400. package/dev/typewriter.d.ts.map +1 -0
  401. package/dev/typewriter.js +4 -0
  402. package/dev/typewriter.js.map +1 -0
  403. package/dialog.d.ts +2 -3
  404. package/dialog.d.ts.map +1 -1
  405. package/dialog.js +5 -4
  406. package/dialog.js.map +1 -1
  407. package/divider.d.ts +2 -3
  408. package/divider.d.ts.map +1 -1
  409. package/divider.js +5 -4
  410. package/divider.js.map +1 -1
  411. package/dragbox.d.ts +2 -3
  412. package/dragbox.d.ts.map +1 -1
  413. package/dragbox.js +5 -4
  414. package/dragbox.js.map +1 -1
  415. package/flex.d.ts +8 -0
  416. package/flex.d.ts.map +1 -0
  417. package/flex.js +6 -0
  418. package/flex.js.map +1 -0
  419. package/form.d.ts +2 -3
  420. package/form.d.ts.map +1 -1
  421. package/form.js +5 -4
  422. package/form.js.map +1 -1
  423. package/grid.d.ts +8 -0
  424. package/grid.d.ts.map +1 -0
  425. package/grid.js +6 -0
  426. package/grid.js.map +1 -0
  427. package/index.d.ts +28 -32
  428. package/index.d.ts.map +1 -1
  429. package/index.js +57 -33
  430. package/index.js.map +1 -1
  431. package/input.d.ts +3 -3
  432. package/input.d.ts.map +1 -1
  433. package/input.js +5 -4
  434. package/input.js.map +1 -1
  435. package/layout.d.ts +3 -3
  436. package/layout.d.ts.map +1 -1
  437. package/layout.js +5 -4
  438. package/layout.js.map +1 -1
  439. package/link.d.ts +3 -3
  440. package/link.d.ts.map +1 -1
  441. package/link.js +5 -4
  442. package/link.js.map +1 -1
  443. package/package.json +42 -81
  444. package/progress.d.ts +3 -3
  445. package/progress.d.ts.map +1 -1
  446. package/progress.js +5 -4
  447. package/progress.js.map +1 -1
  448. package/range.d.ts +9 -0
  449. package/range.d.ts.map +1 -0
  450. package/range.js +6 -0
  451. package/range.js.map +1 -0
  452. package/rotate.d.ts +3 -3
  453. package/rotate.d.ts.map +1 -1
  454. package/rotate.js +5 -4
  455. package/rotate.js.map +1 -1
  456. package/router.d.ts +3 -3
  457. package/router.d.ts.map +1 -1
  458. package/router.js +5 -4
  459. package/router.js.map +1 -1
  460. package/select.d.ts +9 -0
  461. package/select.d.ts.map +1 -0
  462. package/select.js +6 -0
  463. package/select.js.map +1 -0
  464. package/skeleton.d.ts +3 -3
  465. package/skeleton.d.ts.map +1 -1
  466. package/skeleton.js +5 -4
  467. package/skeleton.js.map +1 -1
  468. package/split.d.ts +9 -0
  469. package/split.d.ts.map +1 -0
  470. package/split.js +6 -0
  471. package/split.js.map +1 -0
  472. package/switch.d.ts +9 -0
  473. package/switch.d.ts.map +1 -0
  474. package/switch.js +6 -0
  475. package/switch.js.map +1 -0
  476. package/text.d.ts +3 -3
  477. package/text.d.ts.map +1 -1
  478. package/text.js +5 -4
  479. package/text.js.map +1 -1
  480. package/time.d.ts +3 -3
  481. package/time.d.ts.map +1 -1
  482. package/time.js +5 -4
  483. package/time.js.map +1 -1
  484. package/tooltip.d.ts +3 -3
  485. package/tooltip.d.ts.map +1 -1
  486. package/tooltip.js +5 -4
  487. package/tooltip.js.map +1 -1
  488. package/typewriter.d.ts +2 -3
  489. package/typewriter.d.ts.map +1 -1
  490. package/typewriter.js +5 -4
  491. package/typewriter.js.map +1 -1
  492. package/vscode.css-custom-data.json +1 -0
  493. package/vscode.html-custom-data.json +1 -0
  494. package/web-types.json +1 -0
  495. package/_deps.d.ts +0 -4
  496. package/_deps.d.ts.map +0 -1
  497. package/_deps.js +0 -4
  498. package/_deps.js.map +0 -1
  499. package/avatar-group.d.ts +0 -9
  500. package/avatar-group.d.ts.map +0 -1
  501. package/avatar-group.js +0 -5
  502. package/avatar-group.js.map +0 -1
  503. package/components.json +0 -194
  504. package/conf.d.ts +0 -12
  505. package/conf.d.ts.map +0 -1
  506. package/conf.js +0 -24
  507. package/conf.js.map +0 -1
  508. package/decorators/godown.d.ts +0 -4
  509. package/decorators/godown.d.ts.map +0 -1
  510. package/decorators/godown.js +0 -9
  511. package/decorators/godown.js.map +0 -1
  512. package/decorators/part.d.ts +0 -7
  513. package/decorators/part.d.ts.map +0 -1
  514. package/decorators/part.js +0 -8
  515. package/decorators/part.js.map +0 -1
  516. package/decorators/styles.d.ts +0 -3
  517. package/decorators/styles.d.ts.map +0 -1
  518. package/decorators/styles.js +0 -8
  519. package/decorators/styles.js.map +0 -1
  520. package/flex-flow.d.ts +0 -9
  521. package/flex-flow.d.ts.map +0 -1
  522. package/flex-flow.js +0 -5
  523. package/flex-flow.js.map +0 -1
  524. package/grid-flow.d.ts +0 -9
  525. package/grid-flow.d.ts.map +0 -1
  526. package/grid-flow.js +0 -5
  527. package/grid-flow.js.map +0 -1
  528. package/label-input.d.ts +0 -9
  529. package/label-input.d.ts.map +0 -1
  530. package/label-input.js +0 -5
  531. package/label-input.js.map +0 -1
  532. package/lib/css.d.ts +0 -13
  533. package/lib/css.d.ts.map +0 -1
  534. package/lib/css.js +0 -29
  535. package/lib/css.js.map +0 -1
  536. package/lib/directives.d.ts +0 -25
  537. package/lib/directives.d.ts.map +0 -1
  538. package/lib/directives.js +0 -40
  539. package/lib/directives.js.map +0 -1
  540. package/lib/event-coll.d.ts +0 -13
  541. package/lib/event-coll.d.ts.map +0 -1
  542. package/lib/event-coll.js +0 -45
  543. package/lib/event-coll.js.map +0 -1
  544. package/lib/icons.d.ts +0 -25
  545. package/lib/icons.d.ts.map +0 -1
  546. package/lib/icons.js +0 -73
  547. package/lib/icons.js.map +0 -1
  548. package/lib/jsx.d.ts +0 -4
  549. package/lib/jsx.d.ts.map +0 -1
  550. package/lib/jsx.js +0 -52
  551. package/lib/jsx.js.map +0 -1
  552. package/lib/route-tree.d.ts +0 -28
  553. package/lib/route-tree.d.ts.map +0 -1
  554. package/lib/route-tree.js +0 -141
  555. package/lib/route-tree.js.map +0 -1
  556. package/lib/utils.d.ts +0 -10
  557. package/lib/utils.d.ts.map +0 -1
  558. package/lib/utils.js +0 -71
  559. package/lib/utils.js.map +0 -1
  560. package/overbreath.d.ts +0 -9
  561. package/overbreath.d.ts.map +0 -1
  562. package/overbreath.js +0 -5
  563. package/overbreath.js.map +0 -1
  564. package/proto/godown-config.d.ts +0 -41
  565. package/proto/godown-config.d.ts.map +0 -1
  566. package/proto/godown-config.js +0 -27
  567. package/proto/godown-config.js.map +0 -1
  568. package/proto/godown-element.d.ts +0 -125
  569. package/proto/godown-element.d.ts.map +0 -1
  570. package/proto/godown-element.js +0 -204
  571. package/proto/godown-element.js.map +0 -1
  572. package/proto/super-a.d.ts +0 -30
  573. package/proto/super-a.d.ts.map +0 -1
  574. package/proto/super-a.js +0 -141
  575. package/proto/super-a.js.map +0 -1
  576. package/proto/super-input.d.ts +0 -44
  577. package/proto/super-input.d.ts.map +0 -1
  578. package/proto/super-input.js +0 -119
  579. package/proto/super-input.js.map +0 -1
  580. package/proto/super-openable.d.ts.map +0 -1
  581. package/proto/super-openable.js.map +0 -1
  582. package/range-input.d.ts +0 -9
  583. package/range-input.d.ts.map +0 -1
  584. package/range-input.js +0 -5
  585. package/range-input.js.map +0 -1
  586. package/react/create.d.ts +0 -5
  587. package/react/create.d.ts.map +0 -1
  588. package/react/create.js +0 -16
  589. package/react/create.js.map +0 -1
  590. package/react/index.d.ts +0 -65
  591. package/react/index.d.ts.map +0 -1
  592. package/react/index.js +0 -132
  593. package/react/index.js.map +0 -1
  594. package/router-link.d.ts +0 -9
  595. package/router-link.d.ts.map +0 -1
  596. package/router-link.js +0 -5
  597. package/router-link.js.map +0 -1
  598. package/search-input.d.ts +0 -9
  599. package/search-input.d.ts.map +0 -1
  600. package/search-input.js +0 -5
  601. package/search-input.js.map +0 -1
  602. package/select-input.d.ts +0 -9
  603. package/select-input.d.ts.map +0 -1
  604. package/select-input.js +0 -5
  605. package/select-input.js.map +0 -1
  606. package/split-input.d.ts +0 -9
  607. package/split-input.d.ts.map +0 -1
  608. package/split-input.js +0 -5
  609. package/split-input.js.map +0 -1
  610. package/styles/colors/presets.d.ts +0 -13
  611. package/styles/colors/presets.d.ts.map +0 -1
  612. package/styles/colors/presets.js +0 -6
  613. package/styles/colors/presets.js.map +0 -1
  614. package/styles/colors/presetsRGB.d.ts +0 -16
  615. package/styles/colors/presetsRGB.d.ts.map +0 -1
  616. package/styles/colors/presetsRGB.js +0 -134
  617. package/styles/colors/presetsRGB.js.map +0 -1
  618. package/styles/global.d.ts +0 -18
  619. package/styles/global.d.ts.map +0 -1
  620. package/styles/global.js +0 -78
  621. package/styles/global.js.map +0 -1
  622. package/styles/inputStyle.d.ts +0 -3
  623. package/styles/inputStyle.d.ts.map +0 -1
  624. package/styles/inputStyle.js +0 -59
  625. package/styles/inputStyle.js.map +0 -1
  626. package/switch-input.d.ts +0 -9
  627. package/switch-input.d.ts.map +0 -1
  628. package/switch-input.js +0 -5
  629. package/switch-input.js.map +0 -1
  630. package/web-components/alert/alert.d.ts +0 -36
  631. package/web-components/alert/alert.d.ts.map +0 -1
  632. package/web-components/alert/alert.js +0 -161
  633. package/web-components/alert/alert.js.map +0 -1
  634. package/web-components/avatar/avatar-group.d.ts +0 -21
  635. package/web-components/avatar/avatar-group.d.ts.map +0 -1
  636. package/web-components/avatar/avatar-group.js +0 -86
  637. package/web-components/avatar/avatar-group.js.map +0 -1
  638. package/web-components/avatar/avatar.d.ts +0 -28
  639. package/web-components/avatar/avatar.d.ts.map +0 -1
  640. package/web-components/avatar/avatar.js +0 -120
  641. package/web-components/avatar/avatar.js.map +0 -1
  642. package/web-components/button/button.d.ts.map +0 -1
  643. package/web-components/button/button.js.map +0 -1
  644. package/web-components/card/card.d.ts +0 -9
  645. package/web-components/card/card.d.ts.map +0 -1
  646. package/web-components/card/card.js +0 -75
  647. package/web-components/card/card.js.map +0 -1
  648. package/web-components/carousel/carousel.d.ts +0 -29
  649. package/web-components/carousel/carousel.d.ts.map +0 -1
  650. package/web-components/carousel/carousel.js +0 -185
  651. package/web-components/carousel/carousel.js.map +0 -1
  652. package/web-components/details/details.d.ts.map +0 -1
  653. package/web-components/details/details.js +0 -124
  654. package/web-components/details/details.js.map +0 -1
  655. package/web-components/dialog/dialog.d.ts +0 -31
  656. package/web-components/dialog/dialog.d.ts.map +0 -1
  657. package/web-components/dialog/dialog.js +0 -143
  658. package/web-components/dialog/dialog.js.map +0 -1
  659. package/web-components/divider/divider.d.ts +0 -13
  660. package/web-components/divider/divider.d.ts.map +0 -1
  661. package/web-components/divider/divider.js +0 -95
  662. package/web-components/divider/divider.js.map +0 -1
  663. package/web-components/form/form.d.ts.map +0 -1
  664. package/web-components/form/form.js.map +0 -1
  665. package/web-components/input/input.d.ts +0 -37
  666. package/web-components/input/input.d.ts.map +0 -1
  667. package/web-components/input/input.js +0 -152
  668. package/web-components/input/input.js.map +0 -1
  669. package/web-components/input/label-input.d.ts +0 -15
  670. package/web-components/input/label-input.d.ts.map +0 -1
  671. package/web-components/input/label-input.js +0 -96
  672. package/web-components/input/label-input.js.map +0 -1
  673. package/web-components/input/range-input.d.ts +0 -53
  674. package/web-components/input/range-input.d.ts.map +0 -1
  675. package/web-components/input/range-input.js.map +0 -1
  676. package/web-components/input/search-input.d.ts +0 -42
  677. package/web-components/input/search-input.d.ts.map +0 -1
  678. package/web-components/input/search-input.js +0 -214
  679. package/web-components/input/search-input.js.map +0 -1
  680. package/web-components/input/select-input.d.ts +0 -36
  681. package/web-components/input/select-input.d.ts.map +0 -1
  682. package/web-components/input/select-input.js +0 -210
  683. package/web-components/input/select-input.js.map +0 -1
  684. package/web-components/input/split-input.d.ts +0 -29
  685. package/web-components/input/split-input.d.ts.map +0 -1
  686. package/web-components/input/split-input.js +0 -184
  687. package/web-components/input/split-input.js.map +0 -1
  688. package/web-components/input/switch-input.d.ts.map +0 -1
  689. package/web-components/input/switch-input.js.map +0 -1
  690. package/web-components/layout/flex-flow.d.ts +0 -17
  691. package/web-components/layout/flex-flow.d.ts.map +0 -1
  692. package/web-components/layout/flex-flow.js +0 -73
  693. package/web-components/layout/flex-flow.js.map +0 -1
  694. package/web-components/layout/grid-flow.d.ts +0 -14
  695. package/web-components/layout/grid-flow.d.ts.map +0 -1
  696. package/web-components/layout/grid-flow.js +0 -56
  697. package/web-components/layout/grid-flow.js.map +0 -1
  698. package/web-components/layout/layout.d.ts +0 -18
  699. package/web-components/layout/layout.d.ts.map +0 -1
  700. package/web-components/layout/layout.js +0 -76
  701. package/web-components/layout/layout.js.map +0 -1
  702. package/web-components/link/link.d.ts +0 -10
  703. package/web-components/link/link.d.ts.map +0 -1
  704. package/web-components/link/link.js +0 -17
  705. package/web-components/link/link.js.map +0 -1
  706. package/web-components/link/router-link.d.ts +0 -19
  707. package/web-components/link/router-link.d.ts.map +0 -1
  708. package/web-components/link/router-link.js +0 -60
  709. package/web-components/link/router-link.js.map +0 -1
  710. package/web-components/progress/progress.d.ts.map +0 -1
  711. package/web-components/progress/progress.js.map +0 -1
  712. package/web-components/router/router.d.ts +0 -86
  713. package/web-components/router/router.d.ts.map +0 -1
  714. package/web-components/router/router.js +0 -246
  715. package/web-components/router/router.js.map +0 -1
  716. package/web-components/skeleton/skeleton.d.ts.map +0 -1
  717. package/web-components/skeleton/skeleton.js +0 -130
  718. package/web-components/skeleton/skeleton.js.map +0 -1
  719. package/web-components/text/overbreath.d.ts +0 -22
  720. package/web-components/text/overbreath.d.ts.map +0 -1
  721. package/web-components/text/overbreath.js +0 -132
  722. package/web-components/text/overbreath.js.map +0 -1
  723. package/web-components/text/text.d.ts.map +0 -1
  724. package/web-components/text/text.js.map +0 -1
  725. package/web-components/text/time.d.ts.map +0 -1
  726. package/web-components/text/time.js.map +0 -1
  727. package/web-components/text/typewriter.d.ts.map +0 -1
  728. package/web-components/text/typewriter.js.map +0 -1
  729. package/web-components/tooltip/tooltip.d.ts +0 -30
  730. package/web-components/tooltip/tooltip.d.ts.map +0 -1
  731. package/web-components/tooltip/tooltip.js +0 -123
  732. package/web-components/tooltip/tooltip.js.map +0 -1
  733. package/web-components/wrapper/dragbox.d.ts.map +0 -1
  734. package/web-components/wrapper/dragbox.js.map +0 -1
  735. package/web-components/wrapper/rotate.d.ts.map +0 -1
  736. package/web-components/wrapper/rotate.js.map +0 -1
@@ -1,125 +0,0 @@
1
- import { LitElement, type PropertyValues } from "lit";
2
- import { type AddOptions, type EventsNames, type ListenerFunc } from "../lib/event-coll.js";
3
- import { deepQuerySelector, deepQuerySelectorAll } from "../lib/utils.js";
4
- import { type GodownConfig } from "./godown-config";
5
- /**
6
- * Global element.
7
- */
8
- export declare class GodownElement extends LitElement {
9
- static godownConfig?: GodownConfig;
10
- static elementTagName?: string;
11
- static protoName?: string;
12
- static define(): void;
13
- static isDefined(): boolean;
14
- queryPart<E extends HTMLElement>(p: string): E;
15
- get assignedElements(): HTMLElement[];
16
- /**
17
- * No named slot element's assignedElements, as HTMLElement[].
18
- */
19
- get assigned(): HTMLElement[];
20
- /**
21
- * No named slot element's assignedElements, as Node[].
22
- */
23
- get assignedNodes(): Node[];
24
- /**
25
- * No named slot element.
26
- */
27
- get _slot(): HTMLSlotElement;
28
- /**
29
- * Slot elements.
30
- */
31
- get _slots(): HTMLSlotElement[];
32
- /**
33
- * Named slotted elements.
34
- */
35
- get slottedChildren(): HTMLSlotElement[];
36
- /**
37
- * Named slotted elements' slot attribute.
38
- */
39
- get slottedNames(): string[];
40
- /**
41
- * Query for a element with slot names
42
- *
43
- * @param slotName Slot name.
44
- * @returns Slot element.
45
- */
46
- querySlot(slotName: string): HTMLSlotElement | null;
47
- get offsets(): Element;
48
- /**
49
- * Width of (`this.offsetParent` or `document.body`).
50
- */
51
- get offsetsWidth(): number;
52
- /**
53
- * Height of (`this.offsetParent` or `document.body`).
54
- */
55
- get offsetsHeight(): number;
56
- private __events;
57
- /**
58
- * ```
59
- * src.addEventListener("type", listener)
60
- * //as
61
- * this.addEvent(src, "type", listener)
62
- * ```
63
- */
64
- addEvent<SRC extends EventTarget = HTMLElement>(src: SRC, type: EventsNames, listener: ListenerFunc, options?: AddOptions): ListenerFunc;
65
- /**
66
- * ```
67
- * src.removeEventListener("type", listener)
68
- * //as
69
- * this.removeEvent(src, "type", listener)
70
- * ```
71
- */
72
- removeEvent<SRC extends EventTarget = HTMLElement>(src: SRC, type: EventsNames, listener: ListenerFunc): void;
73
- removeAllEvents(): void;
74
- private assign;
75
- private __stylex;
76
- get stylex(): string | undefined;
77
- /**
78
- * Appends to `shadowRoot.adoptedStyleSheets` and overrides the initial style (constructor.styles).
79
- *
80
- * If there is no selector, it will be `:host`.
81
- *
82
- * Resetting will remove the previous stylex.
83
- *
84
- * @parma sx CSS string.
85
- *
86
- * @example
87
- * ```html
88
- * <custom-element stylex=":host{--key:value;}"></custom-element>
89
- * <custom-element stylex="--key:value;"></custom-element>
90
- * ```
91
- */
92
- set stylex(sx: string);
93
- constructor(assignInit: typeof GodownElement.prototype.assign);
94
- connectedCallback(): void;
95
- disconnectedCallback(): void;
96
- mount(arg?: PropertyValues): void;
97
- unmount(): void;
98
- remount(arg?: PropertyValues): void;
99
- deepQuerySelector<E extends Element = HTMLElement>(selectors: Parameters<typeof deepQuerySelector>[0], root?: Parameters<typeof deepQuerySelector>[1]): E;
100
- deepQuerySelectorAll<E extends Element = HTMLElement>(selectors: Parameters<typeof deepQuerySelectorAll>[0], root?: Parameters<typeof deepQuerySelectorAll>[1]): E[];
101
- /**
102
- * Add styles to shadowRoot.
103
- *
104
- * @param styles CSS strings.
105
- * @returns Index of injected style.
106
- *
107
- * @example
108
- * ```
109
- * this.applyStyles(
110
- * "...",
111
- * css`...`,
112
- * )
113
- * ```
114
- */
115
- adoptStyles(...styles: LikeString[]): number;
116
- }
117
- export default GodownElement;
118
- export interface LikeString {
119
- toString(): string;
120
- }
121
- export type HTMLEvent<H = HTMLElement, E = Event> = {
122
- target: H;
123
- [key: string]: unknown;
124
- } & E;
125
- //# sourceMappingURL=godown-element.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"godown-element.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["proto/godown-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAEtD,OAAO,EAAE,KAAK,UAAU,EAAoB,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC9G,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAC1E,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD;;GAEG;AACH,qBAAa,aAAc,SAAQ,UAAU;IAC3C,MAAM,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC;IAEnC,MAAM,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IAE/B,MAAM,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAE1B,MAAM,CAAC,MAAM;IAMb,MAAM,CAAC,SAAS,IAAI,OAAO;IAI3B,SAAS,CAAC,CAAC,SAAS,WAAW,EAAE,CAAC,EAAE,MAAM;IAI1C,IAAI,gBAAgB,IAAI,WAAW,EAAE,CAEpC;IAED;;OAEG;IACH,IAAI,QAAQ,IAAI,WAAW,EAAE,CAE5B;IAED;;OAEG;IACH,IAAI,aAAa,IAAI,IAAI,EAAE,CAE1B;IAED;;OAEG;IACH,IAAI,KAAK,IAAI,eAAe,CAE3B;IAED;;OAEG;IACH,IAAI,MAAM,IAAI,eAAe,EAAE,CAE9B;IAED;;OA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AAC;IAIJ,oBAAoB,CAAC,CAAC,SAAS,OAAO,GAAG,WAAW,EAClD,SAAS,EAAE,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC,CAAC,EACrD,IAAI,GAAE,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC,CAAQ,GACtD,CAAC,EAAE;IAIN;;;;;;;;;;;;;OAaG;IACH,WAAW,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM;CAS7C;AAED,eAAe,aAAa,CAAC;AAC7B,MAAM,WAAW,UAAU;IACzB,QAAQ,IAAI,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,SAAS,CAAC,CAAC,GAAG,WAAW,EAAE,CAAC,GAAG,KAAK,IAAI;IAClD,MAAM,EAAE,CAAC,CAAC;IACV,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,GAAG,CAAC,CAAC"}
@@ -1,204 +0,0 @@
1
- import { LitElement } from "lit";
2
- import { EventsCollection } from "../lib/event-coll.js";
3
- import { deepQuerySelector, deepQuerySelectorAll } from "../lib/utils.js";
4
- /**
5
- * Global element.
6
- */
7
- export class GodownElement extends LitElement {
8
- static define() {
9
- if (!this.isDefined()) {
10
- this.godownConfig.define(this.elementTagName, this);
11
- }
12
- }
13
- static isDefined() {
14
- return !!customElements.get(this.elementTagName);
15
- }
16
- queryPart(p) {
17
- return this.shadowRoot.querySelector(`[part=${p}]`);
18
- }
19
- get assignedElements() {
20
- return this._slot?.assignedElements();
21
- }
22
- /**
23
- * No named slot element's assignedElements, as HTMLElement[].
24
- */
25
- get assigned() {
26
- return this.assignedElements;
27
- }
28
- /**
29
- * No named slot element's assignedElements, as Node[].
30
- */
31
- get assignedNodes() {
32
- return this._slot?.assignedNodes();
33
- }
34
- /**
35
- * No named slot element.
36
- */
37
- get _slot() {
38
- return this.shadowRoot.querySelector("slot:not([name])");
39
- }
40
- /**
41
- * Slot elements.
42
- */
43
- get _slots() {
44
- return [...this.shadowRoot.querySelectorAll("slot")];
45
- }
46
- /**
47
- * Named slotted elements.
48
- */
49
- get slottedChildren() {
50
- return [...this.querySelectorAll("[slot]")];
51
- }
52
- /**
53
- * Named slotted elements' slot attribute.
54
- */
55
- get slottedNames() {
56
- return this.slottedChildren.map((c) => c.getAttribute("slot")).filter((v) => v);
57
- }
58
- /**
59
- * Query for a element with slot names
60
- *
61
- * @param slotName Slot name.
62
- * @returns Slot element.
63
- */
64
- querySlot(slotName) {
65
- return this.querySelector(`[slot=${slotName}]`);
66
- }
67
- get offsets() {
68
- return this.offsetParent || document.body;
69
- }
70
- /**
71
- * Width of (`this.offsetParent` or `document.body`).
72
- */
73
- get offsetsWidth() {
74
- return this.offsetParent?.clientWidth ?? document.body.offsetWidth;
75
- }
76
- /**
77
- * Height of (`this.offsetParent` or `document.body`).
78
- */
79
- get offsetsHeight() {
80
- return this.offsetParent?.clientHeight ?? document.body.offsetHeight;
81
- }
82
- /**
83
- * ```
84
- * src.addEventListener("type", listener)
85
- * //as
86
- * this.addEvent(src, "type", listener)
87
- * ```
88
- */
89
- addEvent(src, type, listener, options) {
90
- return this.__events.addEvent(src, type, listener, options);
91
- }
92
- /**
93
- * ```
94
- * src.removeEventListener("type", listener)
95
- * //as
96
- * this.removeEvent(src, "type", listener)
97
- * ```
98
- */
99
- removeEvent(src, type, listener) {
100
- this.__events.removeEvent(src, type, listener);
101
- }
102
- removeAllEvents() {
103
- this.__events.removeAllEvents();
104
- }
105
- get stylex() {
106
- return this.__stylex.css;
107
- }
108
- /**
109
- * Appends to `shadowRoot.adoptedStyleSheets` and overrides the initial style (constructor.styles).
110
- *
111
- * If there is no selector, it will be `:host`.
112
- *
113
- * Resetting will remove the previous stylex.
114
- *
115
- * @parma sx CSS string.
116
- *
117
- * @example
118
- * ```html
119
- * <custom-element stylex=":host{--key:value;}"></custom-element>
120
- * <custom-element stylex="--key:value;"></custom-element>
121
- * ```
122
- */
123
- set stylex(sx) {
124
- sx = sx.trim();
125
- if (!/^(([\s\S]+)\{)(([\s\S]+)\})$/.test(sx)) {
126
- sx = `:host{${sx}}`;
127
- }
128
- this.setAttribute("stylex", sx);
129
- if (!this.shadowRoot) {
130
- this.__stylex.lazy = sx;
131
- return;
132
- }
133
- if (this.__stylex.index) {
134
- this.shadowRoot.adoptedStyleSheets.splice(this.__stylex.index, 1);
135
- }
136
- this.__stylex.css = sx;
137
- this.__stylex.index = this.adoptStyles(sx);
138
- }
139
- constructor(assignInit) {
140
- super();
141
- this.__events = new EventsCollection();
142
- this.__stylex = {};
143
- this.assign = {
144
- ...(GodownElement.godownConfig?.assign || {}),
145
- ...assignInit,
146
- };
147
- }
148
- connectedCallback() {
149
- super.connectedCallback();
150
- if (this.assign) {
151
- Object.assign(this, this.assign);
152
- this.assign = null;
153
- }
154
- const { lazy } = this.__stylex;
155
- if (lazy) {
156
- this.adoptStyles(lazy);
157
- }
158
- }
159
- disconnectedCallback() {
160
- this.removeAllEvents();
161
- }
162
- mount(arg) {
163
- this.firstUpdated(arg);
164
- }
165
- unmount() {
166
- this.disconnectedCallback();
167
- }
168
- remount(arg) {
169
- this.unmount();
170
- this.connectedCallback();
171
- this.mount(arg);
172
- }
173
- deepQuerySelector(selectors, root = this) {
174
- return deepQuerySelector(selectors, root);
175
- }
176
- deepQuerySelectorAll(selectors, root = this) {
177
- return deepQuerySelectorAll(selectors, root);
178
- }
179
- /**
180
- * Add styles to shadowRoot.
181
- *
182
- * @param styles CSS strings.
183
- * @returns Index of injected style.
184
- *
185
- * @example
186
- * ```
187
- * this.applyStyles(
188
- * "...",
189
- * css`...`,
190
- * )
191
- * ```
192
- */
193
- adoptStyles(...styles) {
194
- const stack = this.shadowRoot.adoptedStyleSheets;
195
- if (styles.length) {
196
- const sheet = new CSSStyleSheet();
197
- styles.forEach((style) => sheet.insertRule(style.toString()));
198
- stack.push(sheet);
199
- }
200
- return stack.length - 1;
201
- }
202
- }
203
- export default GodownElement;
204
- //# sourceMappingURL=godown-element.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"godown-element.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["proto/godown-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAuB,MAAM,KAAK,CAAC;AAEtD,OAAO,EAAmB,gBAAgB,EAAuC,MAAM,sBAAsB,CAAC;AAC9G,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAG1E;;GAEG;AACH,MAAM,OAAO,aAAc,SAAQ,UAAU;IAO3C,MAAM,CAAC,MAAM;QACX,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,CAAC;YACtB,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;QACtD,CAAC;IACH,CAAC;IAED,MAAM,CAAC,SAAS;QACd,OAAO,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IACnD,CAAC;IAED,SAAS,CAAwB,CAAS;QACxC,OAAO,IAAI,CAAC,UAAU,CAAC,aAAa,CAAI,SAAS,CAAC,GAAG,CAAC,CAAC;IACzD,CAAC;IAED,IAAI,gBAAgB;QAClB,OAAO,IAAI,CAAC,KAAK,EAAE,gBAAgB,EAAmB,CAAC;IACzD,CAAC;IAED;;OAEG;IACH,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;IAED;;OAEG;IACH,IAAI,aAAa;QACf,OAAO,IAAI,CAAC,KAAK,EAAE,aAAa,EAAE,CAAC;IACrC,CAAC;IAED;;OAEG;IACH,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,UAAU,CAAC,aAAa,CAAkB,kBAAkB,CAAC,CAAC;IAC5E,CAAC;IAED;;OAEG;IACH,IAAI,MAAM;QACR,OAAO,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAkB,MAAM,CAAC,CAAC,CAAC;IACxE,CAAC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AAK,CAAC,CAAC;QACpB,CAAC;QACD,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;IAC1B,CAAC;CACF;AAED,eAAe,aAAa,CAAC","sourcesContent":["import { LitElement, type PropertyValues } from \"lit\";\n\nimport { type AddOptions, EventsCollection, type EventsNames, type ListenerFunc } from \"../lib/event-coll.js\";\nimport { deepQuerySelector, deepQuerySelectorAll } from \"../lib/utils.js\";\nimport { type GodownConfig } from \"./godown-config\";\n\n/**\n * Global element.\n */\nexport class GodownElement extends LitElement {\n static godownConfig?: GodownConfig;\n\n static elementTagName?: string;\n\n static protoName?: string;\n\n static define() {\n if (!this.isDefined()) {\n this.godownConfig.define(this.elementTagName, this);\n }\n }\n\n static isDefined(): boolean {\n return !!customElements.get(this.elementTagName);\n }\n\n queryPart<E extends HTMLElement>(p: string) {\n return this.shadowRoot.querySelector<E>(`[part=${p}]`);\n }\n\n get assignedElements(): HTMLElement[] {\n return this._slot?.assignedElements() as HTMLElement[];\n }\n\n /**\n * No named slot element's assignedElements, as HTMLElement[].\n */\n get assigned(): HTMLElement[] {\n return this.assignedElements;\n }\n\n /**\n * No named slot element's assignedElements, as Node[].\n */\n get assignedNodes(): Node[] {\n return this._slot?.assignedNodes();\n }\n\n /**\n * No named slot element.\n */\n get _slot(): HTMLSlotElement {\n return this.shadowRoot.querySelector<HTMLSlotElement>(\"slot:not([name])\");\n }\n\n /**\n * Slot elements.\n */\n get _slots(): HTMLSlotElement[] {\n return [...this.shadowRoot.querySelectorAll<HTMLSlotElement>(\"slot\")];\n }\n\n /**\n * Named slotted elements.\n */\n get slottedChildren(): HTMLSlotElement[] {\n return [...this.querySelectorAll<HTMLSlotElement>(\"[slot]\")];\n }\n\n /**\n * Named slotted elements' slot attribute.\n */\n get slottedNames(): string[] {\n return this.slottedChildren.map((c) => c.getAttribute(\"slot\")).filter((v) => v);\n }\n\n /**\n * Query for a element with slot names\n *\n * @param slotName Slot name.\n * @returns Slot element.\n */\n querySlot(slotName: string): HTMLSlotElement | null {\n return this.querySelector<HTMLSlotElement>(`[slot=${slotName}]`);\n }\n\n get offsets() {\n return this.offsetParent || document.body;\n }\n\n /**\n * Width of (`this.offsetParent` or `document.body`).\n */\n get offsetsWidth(): number {\n return this.offsetParent?.clientWidth ?? document.body.offsetWidth;\n }\n\n /**\n * Height of (`this.offsetParent` or `document.body`).\n */\n get offsetsHeight(): number {\n return this.offsetParent?.clientHeight ?? document.body.offsetHeight;\n }\n\n private __events: EventsCollection;\n\n /**\n * ```\n * src.addEventListener(\"type\", listener)\n * //as\n * this.addEvent(src, \"type\", listener)\n * ```\n */\n addEvent<SRC extends EventTarget = HTMLElement>(\n src: SRC,\n type: EventsNames,\n listener: ListenerFunc,\n options?: AddOptions,\n ): ListenerFunc {\n return this.__events.addEvent(src, type, listener, options);\n }\n\n /**\n * ```\n * src.removeEventListener(\"type\", listener)\n * //as\n * this.removeEvent(src, \"type\", listener)\n * ```\n */\n removeEvent<SRC extends EventTarget = HTMLElement>(src: SRC, type: EventsNames, listener: ListenerFunc) {\n this.__events.removeEvent(src, type, listener);\n }\n\n removeAllEvents() {\n this.__events.removeAllEvents();\n }\n\n private assign: void | Record<string, any>;\n\n private __stylex: { css?: string; index?: number; lazy?: string };\n\n get stylex(): string | undefined {\n return this.__stylex.css;\n }\n\n /**\n * Appends to `shadowRoot.adoptedStyleSheets` and overrides the initial style (constructor.styles).\n *\n * If there is no selector, it will be `:host`.\n *\n * Resetting will remove the previous stylex.\n *\n * @parma sx CSS string.\n *\n * @example\n * ```html\n * <custom-element stylex=\":host{--key:value;}\"></custom-element>\n * <custom-element stylex=\"--key:value;\"></custom-element>\n * ```\n */\n set stylex(sx: string) {\n sx = sx.trim();\n if (!/^(([\\s\\S]+)\\{)(([\\s\\S]+)\\})$/.test(sx)) {\n sx = `:host{${sx}}`;\n }\n this.setAttribute(\"stylex\", sx);\n if (!this.shadowRoot) {\n this.__stylex.lazy = sx;\n return;\n }\n if (this.__stylex.index) {\n this.shadowRoot.adoptedStyleSheets.splice(this.__stylex.index, 1);\n }\n this.__stylex.css = sx;\n this.__stylex.index = this.adoptStyles(sx);\n }\n\n constructor(assignInit: typeof GodownElement.prototype.assign) {\n super();\n this.__events = new EventsCollection();\n this.__stylex = {};\n this.assign = {\n ...(GodownElement.godownConfig?.assign || {}),\n ...assignInit,\n };\n }\n\n connectedCallback() {\n super.connectedCallback();\n if (this.assign) {\n Object.assign(this, this.assign);\n this.assign = null;\n }\n const { lazy } = this.__stylex;\n if (lazy) {\n this.adoptStyles(lazy);\n }\n }\n\n disconnectedCallback() {\n this.removeAllEvents();\n }\n\n mount(arg?: PropertyValues) {\n this.firstUpdated(arg);\n }\n\n unmount() {\n this.disconnectedCallback();\n }\n\n remount(arg?: PropertyValues) {\n this.unmount();\n this.connectedCallback();\n this.mount(arg);\n }\n\n deepQuerySelector<E extends Element = HTMLElement>(\n selectors: Parameters<typeof deepQuerySelector>[0],\n root: Parameters<typeof deepQuerySelector>[1] = this,\n ): E {\n return deepQuerySelector<E>(selectors, root);\n }\n\n deepQuerySelectorAll<E extends Element = HTMLElement>(\n selectors: Parameters<typeof deepQuerySelectorAll>[0],\n root: Parameters<typeof deepQuerySelectorAll>[1] = this,\n ): E[] {\n return deepQuerySelectorAll<E>(selectors, root);\n }\n\n /**\n * Add styles to shadowRoot.\n *\n * @param styles CSS strings.\n * @returns Index of injected style.\n *\n * @example\n * ```\n * this.applyStyles(\n * \"...\",\n * css`...`,\n * )\n * ```\n */\n adoptStyles(...styles: LikeString[]): number {\n const stack = this.shadowRoot.adoptedStyleSheets;\n if (styles.length) {\n const sheet = new CSSStyleSheet();\n styles.forEach((style) => sheet.insertRule(style.toString()));\n stack.push(sheet);\n }\n return stack.length - 1;\n }\n}\n\nexport default GodownElement;\nexport interface LikeString {\n toString(): string;\n}\n\nexport type HTMLEvent<H = HTMLElement, E = Event> = {\n target: H;\n [key: string]: unknown;\n} & E;\n"]}
@@ -1,30 +0,0 @@
1
- import { GodownElement } from "./godown-element.js";
2
- export declare class GodownSuperA extends GodownElement {
3
- /**
4
- * True when the href is in the same pathname as the location.
5
- */
6
- active: boolean;
7
- /**
8
- * Href for a element.
9
- */
10
- href: string;
11
- /**
12
- * Target for an element.
13
- */
14
- target: "_blank" | "_self" | "_parent" | "_top";
15
- /**
16
- * Arrow type.
17
- */
18
- arrow: "" | "link" | "delta" | "arrow" | "angle";
19
- protected render(): import("lit").TemplateResult<1>;
20
- protected _handleClick(_: MouseEvent): void;
21
- private _arrowSwitcher;
22
- connectedCallback(): void;
23
- useActive(): {
24
- url: URL;
25
- sameOrigin: boolean;
26
- active: boolean;
27
- };
28
- }
29
- export default GodownSuperA;
30
- //# sourceMappingURL=super-a.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"super-a.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["proto/super-a.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,qBA2Da,YAAa,SAAQ,aAAa;IAC7C;;OAEG;IACyC,MAAM,UAAS;IAC3D;;OAEG;IACS,IAAI,EAAE,MAAM,CAAa;IACrC;;OAEG;IACS,MAAM,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAW;IACtE;;OAEG;IACS,KAAK,EAAE,EAAE,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAM;IAElE,SAAS,CAAC,MAAM;IAQhB,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,UAAU;IAEpC,OAAO,CAAC,cAAc;IActB,iBAAiB,IAAI,IAAI;IAKzB,SAAS;;;;;CAYV;AAED,eAAe,YAAY,CAAC"}
package/proto/super-a.js DELETED
@@ -1,141 +0,0 @@
1
- import { __decorate } from "tslib";
2
- import { css, html, ifDefined, property } from "../_deps.js";
3
- import { styles } from "../decorators/styles.js";
4
- import { htmlSlot } from "../lib/directives.js";
5
- import { svgArrow, svgDelta, svgLink } from "../lib/icons.js";
6
- import { GodownElement } from "./godown-element.js";
7
- let GodownSuperA = class GodownSuperA extends GodownElement {
8
- constructor() {
9
- super(...arguments);
10
- /**
11
- * True when the href is in the same pathname as the location.
12
- */
13
- this.active = false;
14
- /**
15
- * Href for a element.
16
- */
17
- this.href = undefined;
18
- /**
19
- * Target for an element.
20
- */
21
- this.target = "_self";
22
- /**
23
- * Arrow type.
24
- */
25
- this.arrow = "";
26
- }
27
- render() {
28
- return html `<a part="root" href="${ifDefined(this.href)}" target="${this.target}" @click=${this._handleClick}>
29
- ${htmlSlot()}
30
- <i part="arrow">${this._arrowSwitcher()}</i>
31
- </a>`;
32
- }
33
- // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function
34
- _handleClick(_) { }
35
- _arrowSwitcher() {
36
- switch (this.arrow) {
37
- case "delta":
38
- return svgDelta();
39
- case "arrow":
40
- return svgArrow(true);
41
- case "angle":
42
- return svgArrow();
43
- case "link":
44
- return svgLink();
45
- default:
46
- return htmlSlot("icon");
47
- }
48
- }
49
- connectedCallback() {
50
- super.connectedCallback();
51
- this.useActive();
52
- }
53
- useActive() {
54
- const url = new URL(this.href, location.href);
55
- const sameOrigin = url.origin === location.origin;
56
- if (sameOrigin) {
57
- this.active = url.pathname === location.pathname;
58
- }
59
- return {
60
- url,
61
- sameOrigin,
62
- active: this.active,
63
- };
64
- }
65
- };
66
- __decorate([
67
- property({ type: Boolean, reflect: true })
68
- ], GodownSuperA.prototype, "active", void 0);
69
- __decorate([
70
- property()
71
- ], GodownSuperA.prototype, "href", void 0);
72
- __decorate([
73
- property()
74
- ], GodownSuperA.prototype, "target", void 0);
75
- __decorate([
76
- property()
77
- ], GodownSuperA.prototype, "arrow", void 0);
78
- GodownSuperA = __decorate([
79
- styles([
80
- css `
81
- :host([arrow="delta"]) svg {
82
- transform: rotate(-90deg);
83
- }
84
-
85
- :host {
86
- display: inline-block;
87
- color: currentColor;
88
- text-decoration: none;
89
- cursor: default;
90
- }
91
-
92
- :host([href]) {
93
- cursor: pointer;
94
- }
95
-
96
- a {
97
- width: 100%;
98
- display: flex;
99
- color: inherit;
100
- text-decoration: inherit;
101
- justify-content: space-between;
102
- align-items: center;
103
- }
104
-
105
- i {
106
- display: inline-flex;
107
- border-radius: 20%;
108
- font-style: normal;
109
- }
110
-
111
- i > svg {
112
- width: 1em;
113
- height: 1em;
114
- border-radius: inherit;
115
- }
116
-
117
- :host(:hover) i {
118
- animation: arrow 0.3s linear;
119
- }
120
-
121
- i:hover {
122
- background-color: rgb(0 0 0 / 0.075);
123
- }
124
-
125
- @keyframes arrow {
126
- from {
127
- transform: translateX(0);
128
- }
129
- 50% {
130
- transform: translateX(0.05em);
131
- }
132
- to {
133
- transform: translateX(0);
134
- }
135
- }
136
- `,
137
- ])
138
- ], GodownSuperA);
139
- export { GodownSuperA };
140
- export default GodownSuperA;
141
- //# sourceMappingURL=super-a.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"super-a.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["proto/super-a.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AA6D7C,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,aAAa;IAAxC;;QACL;;WAEG;QACyC,WAAM,GAAG,KAAK,CAAC;QAC3D;;WAEG;QACS,SAAI,GAAW,SAAS,CAAC;QACrC;;WAEG;QACS,WAAM,GAA4C,OAAO,CAAC;QACtE;;WAEG;QACS,UAAK,GAA8C,EAAE,CAAC;IA2CpE,CA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AIzB;IAAX,QAAQ,EAAE;4CAA2D;AAI1D;IAAX,QAAQ,EAAE;2CAAuD;AAhBvD,YAAY;IA3DxB,MAAM,CAAC;QACN,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDF;KACF,CAAC;GACW,YAAY,CA2DxB;;AAED,eAAe,YAAY,CAAC","sourcesContent":["import { css, html, ifDefined, property } from \"../_deps.js\";\nimport { styles } from \"../decorators/styles.js\";\nimport { htmlSlot } from \"../lib/directives.js\";\nimport { svgArrow, svgDelta, svgLink } from \"../lib/icons.js\";\nimport { GodownElement } from \"./godown-element.js\";\n\n@styles([\n css`\n :host([arrow=\"delta\"]) svg {\n transform: rotate(-90deg);\n }\n\n :host {\n display: inline-block;\n color: currentColor;\n text-decoration: none;\n cursor: default;\n }\n\n :host([href]) {\n cursor: pointer;\n }\n\n a {\n width: 100%;\n display: flex;\n color: inherit;\n text-decoration: inherit;\n justify-content: space-between;\n align-items: center;\n }\n\n i {\n display: inline-flex;\n border-radius: 20%;\n font-style: normal;\n }\n\n i > svg {\n width: 1em;\n height: 1em;\n border-radius: inherit;\n }\n\n :host(:hover) i {\n animation: arrow 0.3s linear;\n }\n\n i:hover {\n background-color: rgb(0 0 0 / 0.075);\n }\n\n @keyframes arrow {\n from {\n transform: translateX(0);\n }\n 50% {\n transform: translateX(0.05em);\n }\n to {\n transform: translateX(0);\n }\n }\n `,\n])\nexport class GodownSuperA extends GodownElement {\n /**\n * True when the href is in the same pathname as the location.\n */\n @property({ type: Boolean, reflect: true }) active = false;\n /**\n * Href for a element.\n */\n @property() href: string = undefined;\n /**\n * Target for an element.\n */\n @property() target: \"_blank\" | \"_self\" | \"_parent\" | \"_top\" = \"_self\";\n /**\n * Arrow type.\n */\n @property() arrow: \"\" | \"link\" | \"delta\" | \"arrow\" | \"angle\" = \"\";\n\n protected render() {\n return html`<a part=\"root\" href=\"${ifDefined(this.href)}\" target=\"${this.target}\" @click=${this._handleClick}>\n ${htmlSlot()}\n <i part=\"arrow\">${this._arrowSwitcher()}</i>\n </a>`;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function\n protected _handleClick(_: MouseEvent) {}\n\n private _arrowSwitcher() {\n switch (this.arrow) {\n case \"delta\":\n return svgDelta();\n case \"arrow\":\n return svgArrow(true);\n case \"angle\":\n return svgArrow();\n case \"link\":\n return svgLink();\n default:\n return htmlSlot(\"icon\");\n }\n }\n connectedCallback(): void {\n super.connectedCallback();\n this.useActive();\n }\n\n useActive() {\n const url = new URL(this.href, location.href);\n const sameOrigin = url.origin === location.origin;\n if (sameOrigin) {\n this.active = url.pathname === location.pathname;\n }\n return {\n url,\n sameOrigin,\n active: this.active,\n };\n }\n}\n\nexport default GodownSuperA;\n"]}
@@ -1,44 +0,0 @@
1
- import type { HTMLEvent } from "./godown-element.js";
2
- import { GodownElement } from "./godown-element.js";
3
- export declare class GodownSuperInput extends GodownElement {
4
- autofocus: boolean;
5
- type: InputType;
6
- placeholder: string;
7
- label: string;
8
- name: string;
9
- autocomplete: string;
10
- value: any;
11
- default: any;
12
- _input: HTMLInputElement;
13
- compositing: boolean;
14
- set defaultValue(value: typeof this.default);
15
- get defaultValue(): typeof this.default;
16
- makeId: string;
17
- namevalue(): [string, any];
18
- nameValue: () => [string, any];
19
- reset(): void;
20
- protected _handleInput(e: HTMLEvent<HTMLInputElement>): void;
21
- connectedCallback(): void;
22
- _connectedInit(): void;
23
- protected _compositionInit(): void;
24
- protected _changeInputType(t: InputType): void;
25
- focus(options?: FocusOptions): void;
26
- protected firstUpdated(): void;
27
- protected targetValue(e: Event): string | any;
28
- protected _renderSuffix(): import("lit").TemplateResult<1>;
29
- /**
30
- * @deprecated
31
- */
32
- pla: string;
33
- /**
34
- * @deprecated
35
- */
36
- def: string;
37
- /**
38
- * @deprecated
39
- */
40
- compositionCheck: boolean;
41
- }
42
- export default GodownSuperInput;
43
- export type InputType = "hidden" | "text" | "search" | "tel" | "url" | "email" | "password" | "datetime" | "date" | "month" | "week" | "time" | "datetime-local" | "number" | "range" | "color" | "checkbox" | "radio" | "file" | "image";
44
- //# sourceMappingURL=super-input.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"super-input.d.ts","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["proto/super-input.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAIpD,qBAAa,gBAAiB,SAAQ,aAAa;IACL,SAAS,EAAE,OAAO,CAAC;IAClC,IAAI,EAAE,SAAS,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,GAAG,CAAC;IACX,OAAO,EAAE,GAAG,CAAC;IAEV,MAAM,EAAE,gBAAgB,CAAC;IAExC,WAAW,EAAE,OAAO,CAAC;IAErB,IAAI,YAAY,CAAC,KAAK,EAAE,OAAO,IAAI,CAAC,OAAO,EAE1C;IAED,IAAI,YAAY,IAJQ,OAAO,IAAI,CAAC,OAAO,CAM1C;IAED,MAAM,SAAuC;IAE7C,SAAS,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC;IAI1B,SAAS,QAJI,CAAC,MAAM,EAAE,GAAG,CAAC,CAIC;IAE3B,KAAK;IAKL,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,SAAS,CAAC,gBAAgB,CAAC;IAUrD,iBAAiB;IAIjB,cAAc;IAKd,SAAS,CAAC,gBAAgB;IAY1B,SAAS,CAAC,gBAAgB,CAAC,CAAC,EAAE,SAAS;IAIvC,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY;IAI5B,SAAS,CAAC,YAAY;IAItB,SAAS,CAAC,WAAW,CAAC,CAAC,EAAE,K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