godown 3.0.0-canary.0 → 3.0.0-canary.10

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 (431) hide show
  1. package/README.md +37 -8
  2. package/components/alert.d.ts +5 -3
  3. package/components/alert.d.ts.map +1 -1
  4. package/components/alert.js +24 -14
  5. package/components/alert.js.map +1 -1
  6. package/components/avatar.d.ts +5 -1
  7. package/components/avatar.d.ts.map +1 -1
  8. package/components/avatar.js +7 -3
  9. package/components/avatar.js.map +1 -1
  10. package/components/breath.d.ts +2 -1
  11. package/components/breath.d.ts.map +1 -1
  12. package/components/breath.js +5 -4
  13. package/components/breath.js.map +1 -1
  14. package/components/button.d.ts +16 -9
  15. package/components/button.d.ts.map +1 -1
  16. package/components/button.js +22 -20
  17. package/components/button.js.map +1 -1
  18. package/components/card.d.ts +1 -2
  19. package/components/card.d.ts.map +1 -1
  20. package/components/card.js +5 -11
  21. package/components/card.js.map +1 -1
  22. package/components/carousel.d.ts +6 -5
  23. package/components/carousel.d.ts.map +1 -1
  24. package/components/carousel.js +3 -2
  25. package/components/carousel.js.map +1 -1
  26. package/components/details.d.ts +5 -2
  27. package/components/details.d.ts.map +1 -1
  28. package/components/details.js +5 -2
  29. package/components/details.js.map +1 -1
  30. package/components/dialog.d.ts +8 -4
  31. package/components/dialog.d.ts.map +1 -1
  32. package/components/dialog.js +17 -12
  33. package/components/dialog.js.map +1 -1
  34. package/components/divider.d.ts +1 -1
  35. package/components/divider.js +1 -1
  36. package/components/divider.js.map +1 -1
  37. package/components/dragbox.d.ts +7 -7
  38. package/components/dragbox.d.ts.map +1 -1
  39. package/components/dragbox.js +1 -1
  40. package/components/dragbox.js.map +1 -1
  41. package/components/flex.d.ts +2 -1
  42. package/components/flex.d.ts.map +1 -1
  43. package/components/flex.js +8 -0
  44. package/components/flex.js.map +1 -1
  45. package/components/form.d.ts +0 -2
  46. package/components/form.d.ts.map +1 -1
  47. package/components/form.js +0 -2
  48. package/components/form.js.map +1 -1
  49. package/components/grid.d.ts +8 -3
  50. package/components/grid.d.ts.map +1 -1
  51. package/components/grid.js +1 -0
  52. package/components/grid.js.map +1 -1
  53. package/components/input.d.ts +2 -3
  54. package/components/input.d.ts.map +1 -1
  55. package/components/input.js +3 -6
  56. package/components/input.js.map +1 -1
  57. package/components/layout.d.ts +3 -6
  58. package/components/layout.d.ts.map +1 -1
  59. package/components/layout.js +21 -10
  60. package/components/layout.js.map +1 -1
  61. package/components/link.d.ts +3 -1
  62. package/components/link.d.ts.map +1 -1
  63. package/components/link.js +3 -1
  64. package/components/link.js.map +1 -1
  65. package/components/progress.d.ts +2 -11
  66. package/components/progress.d.ts.map +1 -1
  67. package/components/progress.js +6 -15
  68. package/components/progress.js.map +1 -1
  69. package/components/range.d.ts +43 -17
  70. package/components/range.d.ts.map +1 -1
  71. package/components/range.js +132 -58
  72. package/components/range.js.map +1 -1
  73. package/components/rotate.d.ts +1 -1
  74. package/components/rotate.d.ts.map +1 -1
  75. package/components/rotate.js +1 -1
  76. package/components/rotate.js.map +1 -1
  77. package/components/router.d.ts +6 -8
  78. package/components/router.d.ts.map +1 -1
  79. package/components/router.js +10 -10
  80. package/components/router.js.map +1 -1
  81. package/components/select.d.ts +4 -8
  82. package/components/select.d.ts.map +1 -1
  83. package/components/select.js +42 -41
  84. package/components/select.js.map +1 -1
  85. package/components/skeleton.d.ts.map +1 -1
  86. package/components/skeleton.js +3 -4
  87. package/components/skeleton.js.map +1 -1
  88. package/components/split.d.ts +18 -1
  89. package/components/split.d.ts.map +1 -1
  90. package/components/split.js +52 -19
  91. package/components/split.js.map +1 -1
  92. package/components/switch.d.ts +4 -4
  93. package/components/switch.d.ts.map +1 -1
  94. package/components/switch.js +6 -6
  95. package/components/switch.js.map +1 -1
  96. package/components/text.js +3 -3
  97. package/components/text.js.map +1 -1
  98. package/components/time.d.ts +4 -20
  99. package/components/time.d.ts.map +1 -1
  100. package/components/time.js +5 -66
  101. package/components/time.js.map +1 -1
  102. package/components/tooltip.d.ts +11 -1
  103. package/components/tooltip.d.ts.map +1 -1
  104. package/components/tooltip.js +23 -5
  105. package/components/tooltip.js.map +1 -1
  106. package/components/typewriter.d.ts +2 -2
  107. package/components/typewriter.d.ts.map +1 -1
  108. package/components/typewriter.js +2 -2
  109. package/components/typewriter.js.map +1 -1
  110. package/core/global-style.d.ts.map +1 -1
  111. package/core/global-style.js +8 -1
  112. package/core/global-style.js.map +1 -1
  113. package/core/super-anchor.js +1 -1
  114. package/core/super-anchor.js.map +1 -1
  115. package/core/super-input.d.ts +2 -3
  116. package/core/super-input.d.ts.map +1 -1
  117. package/core/super-input.js +3 -6
  118. package/core/super-input.js.map +1 -1
  119. package/core/super-openable.js.map +1 -1
  120. package/custom-elements.json +1 -1
  121. package/dev/alert.d.ts +8 -0
  122. package/dev/alert.d.ts.map +1 -0
  123. package/dev/alert.js +4 -0
  124. package/dev/alert.js.map +1 -0
  125. package/dev/avatar.d.ts +8 -0
  126. package/dev/avatar.d.ts.map +1 -0
  127. package/dev/avatar.js +4 -0
  128. package/dev/avatar.js.map +1 -0
  129. package/dev/breath.d.ts +9 -0
  130. package/dev/breath.d.ts.map +1 -0
  131. package/dev/breath.js +5 -0
  132. package/dev/breath.js.map +1 -0
  133. package/dev/button.d.ts +8 -0
  134. package/dev/button.d.ts.map +1 -0
  135. package/dev/button.js +4 -0
  136. package/dev/button.js.map +1 -0
  137. package/dev/card.d.ts +8 -0
  138. package/dev/card.d.ts.map +1 -0
  139. package/dev/card.js +4 -0
  140. package/dev/card.js.map +1 -0
  141. package/dev/carousel.d.ts +8 -0
  142. package/dev/carousel.d.ts.map +1 -0
  143. package/dev/carousel.js +4 -0
  144. package/dev/carousel.js.map +1 -0
  145. package/dev/components/alert.d.ts +52 -0
  146. package/dev/components/alert.d.ts.map +1 -0
  147. package/dev/components/alert.js +245 -0
  148. package/dev/components/alert.js.map +1 -0
  149. package/dev/components/avatar.d.ts +30 -0
  150. package/dev/components/avatar.d.ts.map +1 -0
  151. package/dev/components/avatar.js +92 -0
  152. package/dev/components/avatar.js.map +1 -0
  153. package/dev/components/breath.d.ts +35 -0
  154. package/dev/components/breath.d.ts.map +1 -0
  155. package/dev/components/breath.js +135 -0
  156. package/dev/components/breath.js.map +1 -0
  157. package/dev/components/button.d.ts +52 -0
  158. package/dev/components/button.d.ts.map +1 -0
  159. package/dev/components/button.js +260 -0
  160. package/dev/components/button.js.map +1 -0
  161. package/dev/components/card.d.ts +19 -0
  162. package/dev/components/card.d.ts.map +1 -0
  163. package/dev/components/card.js +81 -0
  164. package/dev/components/card.js.map +1 -0
  165. package/dev/components/carousel.d.ts +41 -0
  166. package/dev/components/carousel.d.ts.map +1 -0
  167. package/dev/components/carousel.js +157 -0
  168. package/dev/components/carousel.js.map +1 -0
  169. package/dev/components/details.d.ts +23 -0
  170. package/dev/components/details.d.ts.map +1 -0
  171. package/dev/components/details.js +118 -0
  172. package/dev/components/details.js.map +1 -0
  173. package/dev/components/dialog.d.ts +37 -0
  174. package/dev/components/dialog.d.ts.map +1 -0
  175. package/dev/components/dialog.js +159 -0
  176. package/dev/components/dialog.js.map +1 -0
  177. package/dev/components/divider.d.ts +17 -0
  178. package/dev/components/divider.d.ts.map +1 -0
  179. package/dev/components/divider.js +46 -0
  180. package/dev/components/divider.js.map +1 -0
  181. package/dev/components/dragbox.d.ts +40 -0
  182. package/dev/components/dragbox.d.ts.map +1 -0
  183. package/dev/components/dragbox.js +117 -0
  184. package/dev/components/dragbox.js.map +1 -0
  185. package/dev/components/flex.d.ts +32 -0
  186. package/dev/components/flex.d.ts.map +1 -0
  187. package/dev/components/flex.js +60 -0
  188. package/dev/components/flex.js.map +1 -0
  189. package/dev/components/form.d.ts +22 -0
  190. package/dev/components/form.d.ts.map +1 -0
  191. package/dev/components/form.js +77 -0
  192. package/dev/components/form.js.map +1 -0
  193. package/dev/components/grid.d.ts +36 -0
  194. package/dev/components/grid.d.ts.map +1 -0
  195. package/dev/components/grid.js +54 -0
  196. package/dev/components/grid.js.map +1 -0
  197. package/dev/components/input.d.ts +19 -0
  198. package/dev/components/input.d.ts.map +1 -0
  199. package/dev/components/input.js +70 -0
  200. package/dev/components/input.js.map +1 -0
  201. package/dev/components/layout.d.ts +26 -0
  202. package/dev/components/layout.d.ts.map +1 -0
  203. package/dev/components/layout.js +82 -0
  204. package/dev/components/layout.js.map +1 -0
  205. package/dev/components/link.d.ts +22 -0
  206. package/dev/components/link.d.ts.map +1 -0
  207. package/dev/components/link.js +42 -0
  208. package/dev/components/link.js.map +1 -0
  209. package/dev/components/progress.d.ts +21 -0
  210. package/dev/components/progress.d.ts.map +1 -0
  211. package/dev/components/progress.js +99 -0
  212. package/dev/components/progress.js.map +1 -0
  213. package/dev/components/range.d.ts +86 -0
  214. package/dev/components/range.d.ts.map +1 -0
  215. package/dev/components/range.js +364 -0
  216. package/dev/components/range.js.map +1 -0
  217. package/dev/components/rotate.d.ts +26 -0
  218. package/dev/components/rotate.d.ts.map +1 -0
  219. package/dev/components/rotate.js +86 -0
  220. package/dev/components/rotate.js.map +1 -0
  221. package/dev/components/router.d.ts +119 -0
  222. package/dev/components/router.d.ts.map +1 -0
  223. package/dev/components/router.js +248 -0
  224. package/dev/components/router.js.map +1 -0
  225. package/dev/components/select.d.ts +46 -0
  226. package/dev/components/select.d.ts.map +1 -0
  227. package/dev/components/select.js +245 -0
  228. package/dev/components/select.js.map +1 -0
  229. package/dev/components/skeleton.d.ts +26 -0
  230. package/dev/components/skeleton.d.ts.map +1 -0
  231. package/dev/components/skeleton.js +118 -0
  232. package/dev/components/skeleton.js.map +1 -0
  233. package/dev/components/split.d.ts +49 -0
  234. package/dev/components/split.d.ts.map +1 -0
  235. package/dev/components/split.js +206 -0
  236. package/dev/components/split.js.map +1 -0
  237. package/dev/components/switch.d.ts +39 -0
  238. package/dev/components/switch.d.ts.map +1 -0
  239. package/dev/components/switch.js +182 -0
  240. package/dev/components/switch.js.map +1 -0
  241. package/dev/components/text.d.ts +19 -0
  242. package/dev/components/text.d.ts.map +1 -0
  243. package/dev/components/text.js +93 -0
  244. package/dev/components/text.js.map +1 -0
  245. package/dev/components/time.d.ts +37 -0
  246. package/dev/components/time.d.ts.map +1 -0
  247. package/dev/components/time.js +75 -0
  248. package/dev/components/time.js.map +1 -0
  249. package/dev/components/tooltip.d.ts +48 -0
  250. package/dev/components/tooltip.d.ts.map +1 -0
  251. package/dev/components/tooltip.js +137 -0
  252. package/dev/components/tooltip.js.map +1 -0
  253. package/dev/components/typewriter.d.ts +55 -0
  254. package/dev/components/typewriter.d.ts.map +1 -0
  255. package/dev/components/typewriter.js +155 -0
  256. package/dev/components/typewriter.js.map +1 -0
  257. package/dev/core/global-style.d.ts +21 -0
  258. package/dev/core/global-style.d.ts.map +1 -0
  259. package/dev/core/global-style.js +76 -0
  260. package/dev/core/global-style.js.map +1 -0
  261. package/dev/core/super-anchor.d.ts +15 -0
  262. package/dev/core/super-anchor.d.ts.map +1 -0
  263. package/dev/core/super-anchor.js +58 -0
  264. package/dev/core/super-anchor.js.map +1 -0
  265. package/dev/core/super-input.d.ts +38 -0
  266. package/dev/core/super-input.d.ts.map +1 -0
  267. package/dev/core/super-input.js +182 -0
  268. package/dev/core/super-input.js.map +1 -0
  269. package/dev/core/super-openable.d.ts +19 -0
  270. package/dev/core/super-openable.d.ts.map +1 -0
  271. package/dev/core/super-openable.js +36 -0
  272. package/dev/core/super-openable.js.map +1 -0
  273. package/dev/details.d.ts +8 -0
  274. package/dev/details.d.ts.map +1 -0
  275. package/dev/details.js +4 -0
  276. package/dev/details.js.map +1 -0
  277. package/dev/dialog.d.ts +8 -0
  278. package/dev/dialog.d.ts.map +1 -0
  279. package/dev/dialog.js +4 -0
  280. package/dev/dialog.js.map +1 -0
  281. package/dev/divider.d.ts +8 -0
  282. package/dev/divider.d.ts.map +1 -0
  283. package/dev/divider.js +4 -0
  284. package/dev/divider.js.map +1 -0
  285. package/dev/dragbox.d.ts +8 -0
  286. package/dev/dragbox.d.ts.map +1 -0
  287. package/dev/dragbox.js +4 -0
  288. package/dev/dragbox.js.map +1 -0
  289. package/dev/flex.d.ts +8 -0
  290. package/dev/flex.d.ts.map +1 -0
  291. package/dev/flex.js +4 -0
  292. package/dev/flex.js.map +1 -0
  293. package/dev/form.d.ts +8 -0
  294. package/dev/form.d.ts.map +1 -0
  295. package/dev/form.js +4 -0
  296. package/dev/form.js.map +1 -0
  297. package/dev/grid.d.ts +8 -0
  298. package/dev/grid.d.ts.map +1 -0
  299. package/dev/grid.js +4 -0
  300. package/dev/grid.js.map +1 -0
  301. package/dev/index.d.ts +29 -0
  302. package/dev/index.d.ts.map +1 -0
  303. package/dev/index.js +29 -0
  304. package/dev/index.js.map +1 -0
  305. package/dev/input.d.ts +9 -0
  306. package/dev/input.d.ts.map +1 -0
  307. package/dev/input.js +5 -0
  308. package/dev/input.js.map +1 -0
  309. package/dev/layout.d.ts +9 -0
  310. package/dev/layout.d.ts.map +1 -0
  311. package/dev/layout.js +5 -0
  312. package/dev/layout.js.map +1 -0
  313. package/dev/link.d.ts +9 -0
  314. package/dev/link.d.ts.map +1 -0
  315. package/dev/link.js +5 -0
  316. package/dev/link.js.map +1 -0
  317. package/dev/progress.d.ts +9 -0
  318. package/dev/progress.d.ts.map +1 -0
  319. package/dev/progress.js +5 -0
  320. package/dev/progress.js.map +1 -0
  321. package/dev/range.d.ts +9 -0
  322. package/dev/range.d.ts.map +1 -0
  323. package/dev/range.js +5 -0
  324. package/dev/range.js.map +1 -0
  325. package/dev/rotate.d.ts +9 -0
  326. package/dev/rotate.d.ts.map +1 -0
  327. package/dev/rotate.js +5 -0
  328. package/dev/rotate.js.map +1 -0
  329. package/dev/router.d.ts +9 -0
  330. package/dev/router.d.ts.map +1 -0
  331. package/dev/router.js +5 -0
  332. package/dev/router.js.map +1 -0
  333. package/dev/select.d.ts +9 -0
  334. package/dev/select.d.ts.map +1 -0
  335. package/dev/select.js +5 -0
  336. package/dev/select.js.map +1 -0
  337. package/dev/skeleton.d.ts +9 -0
  338. package/dev/skeleton.d.ts.map +1 -0
  339. package/dev/skeleton.js +5 -0
  340. package/dev/skeleton.js.map +1 -0
  341. package/dev/split.d.ts +9 -0
  342. package/dev/split.d.ts.map +1 -0
  343. package/dev/split.js +5 -0
  344. package/dev/split.js.map +1 -0
  345. package/dev/switch.d.ts +9 -0
  346. package/dev/switch.d.ts.map +1 -0
  347. package/dev/switch.js +5 -0
  348. package/dev/switch.js.map +1 -0
  349. package/dev/text.d.ts +9 -0
  350. package/dev/text.d.ts.map +1 -0
  351. package/dev/text.js +5 -0
  352. package/dev/text.js.map +1 -0
  353. package/dev/time.d.ts +9 -0
  354. package/dev/time.d.ts.map +1 -0
  355. package/dev/time.js +5 -0
  356. package/dev/time.js.map +1 -0
  357. package/dev/tooltip.d.ts +9 -0
  358. package/dev/tooltip.d.ts.map +1 -0
  359. package/dev/tooltip.js +5 -0
  360. package/dev/tooltip.js.map +1 -0
  361. package/dev/typewriter.d.ts +8 -0
  362. package/dev/typewriter.d.ts.map +1 -0
  363. package/dev/typewriter.js +4 -0
  364. package/dev/typewriter.js.map +1 -0
  365. package/index.js +13 -13
  366. package/package.json +10 -8
  367. package/range.d.ts +1 -1
  368. package/range.d.ts.map +1 -1
  369. package/src/alert.ts +11 -0
  370. package/src/avatar.ts +11 -0
  371. package/src/breath.ts +13 -0
  372. package/src/button.ts +11 -0
  373. package/src/card.ts +11 -0
  374. package/src/carousel.ts +11 -0
  375. package/src/components/alert.ts +282 -0
  376. package/src/components/avatar.ts +95 -0
  377. package/src/components/breath.ts +153 -0
  378. package/src/components/button.ts +286 -0
  379. package/src/components/card.ts +80 -0
  380. package/src/components/carousel.ts +169 -0
  381. package/src/components/details.ts +116 -0
  382. package/src/components/dialog.ts +165 -0
  383. package/src/components/divider.ts +44 -0
  384. package/src/components/dragbox.ts +127 -0
  385. package/src/components/flex.ts +70 -0
  386. package/src/components/form.ts +82 -0
  387. package/src/components/grid.ts +75 -0
  388. package/src/components/input.ts +72 -0
  389. package/src/components/layout.ts +82 -0
  390. package/src/components/link.ts +38 -0
  391. package/src/components/progress.ts +95 -0
  392. package/src/components/range.ts +404 -0
  393. package/src/components/rotate.ts +92 -0
  394. package/src/components/router.ts +273 -0
  395. package/src/components/select.ts +268 -0
  396. package/src/components/skeleton.ts +118 -0
  397. package/src/components/split.ts +221 -0
  398. package/src/components/switch.ts +180 -0
  399. package/src/components/text.ts +95 -0
  400. package/src/components/time.ts +81 -0
  401. package/src/components/tooltip.ts +138 -0
  402. package/src/components/typewriter.ts +154 -0
  403. package/src/core/global-style.ts +86 -0
  404. package/src/core/super-anchor.ts +52 -0
  405. package/src/core/super-input.ts +230 -0
  406. package/src/core/super-openable.ts +51 -0
  407. package/src/details.ts +11 -0
  408. package/src/dialog.ts +11 -0
  409. package/src/divider.ts +11 -0
  410. package/src/dragbox.ts +11 -0
  411. package/src/flex.ts +11 -0
  412. package/src/form.ts +11 -0
  413. package/src/grid.ts +11 -0
  414. package/src/index.ts +28 -0
  415. package/src/input.ts +13 -0
  416. package/src/layout.ts +12 -0
  417. package/src/link.ts +13 -0
  418. package/src/progress.ts +12 -0
  419. package/src/range.ts +13 -0
  420. package/src/rotate.ts +13 -0
  421. package/src/router.ts +12 -0
  422. package/src/select.ts +13 -0
  423. package/src/skeleton.ts +13 -0
  424. package/src/split.ts +13 -0
  425. package/src/switch.ts +13 -0
  426. package/src/text.ts +13 -0
  427. package/src/time.ts +13 -0
  428. package/src/tooltip.ts +13 -0
  429. package/src/typewriter.ts +11 -0
  430. package/vscode.html-custom-data.json +1 -1
  431. package/web-types.json +1 -1
@@ -0,0 +1,245 @@
1
+ import { __decorate } from "tslib";
2
+ import { godown } from "@godown/element/decorators/godown.js";
3
+ import { part } from "@godown/element/decorators/part.js";
4
+ import { styles } from "@godown/element/decorators/styles.js";
5
+ import { htmlSlot } from "@godown/element/directives/html-slot.js";
6
+ import svgCaretDown from "@godown/f7-icon/icons/chevron-down.js";
7
+ import { css, html, nothing } from "lit";
8
+ import { property, state } from "lit/decorators.js";
9
+ import { ifDefined } from "lit/directives/if-defined.js";
10
+ import Input from "./input.js";
11
+ function contain(a, b) {
12
+ return a && b && a.toLowerCase().includes(b.toLowerCase());
13
+ }
14
+ function betweenAt(i, s, c) {
15
+ const start = s.slice(0, i).lastIndexOf(c) + 1 || 0;
16
+ const end = s.indexOf(c, i) || s.length;
17
+ return s.slice(start, end);
18
+ }
19
+ function updateChecked(element, operation) {
20
+ if (element) {
21
+ const name = "checked";
22
+ if (operation) {
23
+ element.setAttribute(name, "");
24
+ }
25
+ else {
26
+ element.removeAttribute(name);
27
+ }
28
+ }
29
+ }
30
+ const protoName = "select";
31
+ /**
32
+ * {@linkcode Select} is similar to `<select>`.
33
+ *
34
+ * Elements with the value attribute/property can be used as options.
35
+ *
36
+ * The checked attribute will be added to the selected element.
37
+ *
38
+ * Multi-selected state looks the same as single-selected.
39
+ *
40
+ * Input will filter the element.
41
+ *
42
+ * @slot - Options.
43
+ * @category input
44
+ */
45
+ let Select = class Select extends Input {
46
+ constructor() {
47
+ super(...arguments);
48
+ this.autoDirection = "bottom";
49
+ this._store = [];
50
+ }
51
+ render() {
52
+ return html `<div part="root" class="input-field">
53
+ ${[
54
+ this._renderPrefix(),
55
+ html `<input
56
+ part="input"
57
+ dir="${ifDefined(this.dir)}"
58
+ id="${this.makeId}"
59
+ .value="${this.text}"
60
+ type="${this.type}"
61
+ placeholder="${this.placeholder || nothing}"
62
+ ?autofocus="${this.autofocus}"
63
+ autocapitalize="${this.autocapitalize || nothing}"
64
+ autocomplete="${this.autocomplete || nothing}"
65
+ ?disabled="${this.disabled}"
66
+ @focus="${this._handleFocus}"
67
+ @input="${this._handleInput}"
68
+ >`,
69
+ html `<label for="${this.makeId}" part="suffix">
70
+ <i part="space"></i><i part="icon">${svgCaretDown()}</i><i part="space"></i>
71
+ </label>`,
72
+ html `<label for="${this.makeId}" part="content"
73
+ style="visibility:${this.visible ? "visible" : "hidden"}"
74
+ direction="${this.direction || this.autoDirection}">${htmlSlot()}</label>`,
75
+ ]}
76
+ </div>`;
77
+ }
78
+ _handleFocus() {
79
+ if (!this.direction) {
80
+ const { top, bottom } = this.getBoundingClientRect();
81
+ if (window.innerHeight - bottom < this._content.clientHeight && top > this._content.clientHeight) {
82
+ this.autoDirection = "top";
83
+ }
84
+ else {
85
+ this.autoDirection = "bottom";
86
+ }
87
+ }
88
+ this.visible = true;
89
+ }
90
+ firstUpdated() {
91
+ this.events.add(this._content, "click", (e) => {
92
+ e.preventDefault();
93
+ e.stopPropagation();
94
+ const { target } = e;
95
+ const value = this.optionValue(target);
96
+ if (value) {
97
+ const operation = this.select(value, target.textContent);
98
+ if (!this.multiple) {
99
+ updateChecked(this.lastChecked, 0);
100
+ }
101
+ updateChecked(target, operation);
102
+ this.lastChecked = target;
103
+ }
104
+ this._input.focus();
105
+ });
106
+ this.events.add(document, "click", (e) => {
107
+ // e.preventDefault();
108
+ e.stopPropagation();
109
+ const composed1 = e.composedPath()[0];
110
+ if (composed1 && !this.shadowRoot.contains(composed1)) {
111
+ this.blur();
112
+ }
113
+ });
114
+ }
115
+ _connectedInit() {
116
+ if (!this.value) {
117
+ const checked = [...this.querySelectorAll("[checked]")];
118
+ const list = this.multiple
119
+ ? checked
120
+ : checked.length
121
+ ? [this.lastChecked = checked[0]]
122
+ : [];
123
+ list.forEach((element) => {
124
+ const operation = this.select(this.optionValue(element), element.textContent);
125
+ updateChecked(element, operation);
126
+ });
127
+ this.default = this.value;
128
+ this.defaultText = this.text;
129
+ this.defaultChecked = checked;
130
+ }
131
+ if (!this.text) {
132
+ this.text = "";
133
+ }
134
+ }
135
+ reset() {
136
+ this.value = this.default;
137
+ this.text = this.defaultText;
138
+ this.querySelectorAll("[checked]").forEach(element => updateChecked(element, 0));
139
+ this.defaultChecked.forEach(element => updateChecked(element, 1));
140
+ }
141
+ select(value, text) {
142
+ text ||= value;
143
+ let operation = 0;
144
+ if (this.multiple) {
145
+ const i = this._store.findIndex(s => s.value === value);
146
+ if (i > -1) {
147
+ this._store.splice(i, 1);
148
+ }
149
+ else {
150
+ this._store.push({ value, text });
151
+ operation = 1;
152
+ }
153
+ this.value = this._store.map(s => s.value);
154
+ this.text = this._store.map(s => s.text).join(", ");
155
+ }
156
+ else {
157
+ if (this.value === value) {
158
+ this.value = "";
159
+ this.text = "";
160
+ }
161
+ else {
162
+ this.value = value;
163
+ this.text = text;
164
+ operation = 1;
165
+ }
166
+ }
167
+ this.dispatchEvent(new CustomEvent("change", { detail: this.namevalue() }));
168
+ this.filter();
169
+ return operation;
170
+ }
171
+ filter(query) {
172
+ query = query?.trim();
173
+ [...this.children].forEach((element) => {
174
+ this.filterCallback(element, !query
175
+ || contain(this.optionValue(element), query)
176
+ || contain(element.textContent, query), query);
177
+ });
178
+ }
179
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
180
+ filterCallback(element, match, query) {
181
+ element.style.display = match ? "" : "none";
182
+ }
183
+ _handleInput(e) {
184
+ e.stopPropagation();
185
+ if (this.compositing) {
186
+ return;
187
+ }
188
+ const s = this._input.value;
189
+ this.filter(this.multiple ? betweenAt(this._input.selectionStart, s, ",") : s);
190
+ this.dispatchEvent(new CustomEvent("input", { detail: this.namevalue() }));
191
+ }
192
+ focus(options) {
193
+ this._input.focus(options);
194
+ this.visible = true;
195
+ }
196
+ blur() {
197
+ this._input.blur();
198
+ this.visible = false;
199
+ super.blur();
200
+ }
201
+ optionValue(option) {
202
+ return option.value || option.getAttribute("value") || "";
203
+ }
204
+ };
205
+ __decorate([
206
+ property()
207
+ ], Select.prototype, "text", void 0);
208
+ __decorate([
209
+ part("content")
210
+ ], Select.prototype, "_content", void 0);
211
+ __decorate([
212
+ property()
213
+ ], Select.prototype, "direction", void 0);
214
+ __decorate([
215
+ property({ type: Boolean })
216
+ ], Select.prototype, "multiple", void 0);
217
+ __decorate([
218
+ property({ type: Boolean })
219
+ ], Select.prototype, "visible", void 0);
220
+ __decorate([
221
+ state()
222
+ ], Select.prototype, "autoDirection", void 0);
223
+ Select = __decorate([
224
+ godown(protoName),
225
+ styles(css `
226
+ [part=input] {
227
+ text-overflow: ellipsis;
228
+ }
229
+
230
+ [part=content] {
231
+ position: absolute;
232
+ width: 100%;
233
+ }
234
+
235
+ [direction=bottom] {
236
+ top: 100%;
237
+ }
238
+
239
+ [direction=top] {
240
+ bottom: 100%;
241
+ }
242
+ `)
243
+ ], Select);
244
+ export default Select;
245
+ //# sourceMappingURL=select.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select.js","sourceRoot":"","sources":["../../src/components/select.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,sCAAsC,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,sCAAsC,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,yCAAyC,CAAC;AACnE,OAAO,YAAY,MAAM,uCAAuC,CAAC;AACjE,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAEzD,OAAO,KAAK,MAAM,YAAY,CAAC;AAE/B,SAAS,OAAO,CAAC,CAAS,EAAE,CAAS;IACnC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;AAC7D,CAAC;AAED,SAAS,SAAS,CAAC,CAAS,EAAE,CAAS,EAAE,CAAS;IAChD,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACpD,MAAM,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC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;;GAiBF,CACF;GACK,MAAM,CAmMX;AAED,eAAe,MAAM,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { GlobalStyle } from "../core/global-style.js";
2
+ /**
3
+ * {@linkcode Skeleton} renders a skeleton screen.
4
+ *
5
+ * @slot loading - The content if loading is true.
6
+ * @slot - The content if loading is false.
7
+ * @category feedback
8
+ */
9
+ declare class Skeleton extends GlobalStyle {
10
+ /**
11
+ * If "image", render a image placeholder.
12
+ */
13
+ type: "text" | "image";
14
+ /**
15
+ * Animation type.
16
+ * opacity animation only effect on slotted element and image icon.
17
+ */
18
+ animation: "position" | "opacity";
19
+ /**
20
+ * If false, render slot only.
21
+ */
22
+ loading: boolean;
23
+ protected render(): import("lit").TemplateResult<1>;
24
+ }
25
+ export default Skeleton;
26
+ //# sourceMappingURL=skeleton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skeleton.d.ts","sourceRoot":"","sources":["../../src/components/skeleton.ts"],"names":[],"mappings":"AAOA,OAAO,EAAiB,WAAW,EAAe,MAAM,yBAAyB,CAAC;AAKlF;;;;;;GAMG;AACH,cAoEM,QAAS,SAAQ,WAAW;IAChC;;OAEG;IAEH,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IAEvB;;;OAGG;IAEH,SAAS,EAAE,UAAU,GAAG,SAAS,CAAc;IAE/C;;OAEG;IAEH,OAAO,UAAQ;IAEf,SAAS,CAAC,MAAM;CAQjB;AAED,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,118 @@
1
+ import { __decorate } from "tslib";
2
+ import { godown } from "@godown/element/decorators/godown.js";
3
+ import { styles } from "@godown/element/decorators/styles.js";
4
+ import { htmlSlot } from "@godown/element/directives/html-slot.js";
5
+ import iconPhoto from "@godown/f7-icon/icons/photo.js";
6
+ import { css, html } from "lit";
7
+ import { property, state } from "lit/decorators.js";
8
+ import { cssGlobalVars, GlobalStyle, scopePrefix } from "../core/global-style.js";
9
+ const protoName = "skeleton";
10
+ const cssScope = scopePrefix(protoName);
11
+ /**
12
+ * {@linkcode Skeleton} renders a skeleton screen.
13
+ *
14
+ * @slot loading - The content if loading is true.
15
+ * @slot - The content if loading is false.
16
+ * @category feedback
17
+ */
18
+ let Skeleton = class Skeleton extends GlobalStyle {
19
+ constructor() {
20
+ super(...arguments);
21
+ /**
22
+ * Animation type.
23
+ * opacity animation only effect on slotted element and image icon.
24
+ */
25
+ this.animation = "position";
26
+ /**
27
+ * If false, render slot only.
28
+ */
29
+ this.loading = true;
30
+ }
31
+ render() {
32
+ if (!this.loading) {
33
+ return htmlSlot();
34
+ }
35
+ return html `<div part="root" class="${this.animation}">
36
+ ${this.type === "image" ? iconPhoto() : ""}
37
+ ${htmlSlot("loading")}</div>`;
38
+ }
39
+ };
40
+ __decorate([
41
+ property()
42
+ ], Skeleton.prototype, "type", void 0);
43
+ __decorate([
44
+ property()
45
+ ], Skeleton.prototype, "animation", void 0);
46
+ __decorate([
47
+ state()
48
+ ], Skeleton.prototype, "loading", void 0);
49
+ Skeleton = __decorate([
50
+ godown(protoName),
51
+ styles(css `
52
+ :host {
53
+ ${cssScope}--from: var(${cssGlobalVars._colors.darkgray[9]});
54
+ ${cssScope}--to: var(${cssGlobalVars._colors.darkgray[7]});
55
+ ${cssScope}--deg: 95deg;
56
+ ${cssScope}--duration: 1.5s;
57
+ ${cssScope}--icon-size: 5em;
58
+ ${cssScope}--icon-margin: .25em;
59
+ color: var(${cssGlobalVars._colors.darkgray[5]});
60
+ background: var(${cssScope}--from);
61
+ min-height: 1.5em;
62
+ width: 100%;
63
+ flex-shrink: 0;
64
+ display: block;
65
+ overflow: hidden;
66
+ }
67
+
68
+ [part=root] {
69
+ height: 100%;
70
+ min-height: inherit;
71
+ text-align: center;
72
+ animation: var(${cssScope}--duration) ease-in-out 0s infinite none running;
73
+ }
74
+
75
+ svg {
76
+ --size:var(${cssScope}--icon-size);
77
+ font-size: var(--size);
78
+ margin: calc(var(--size) * 0.05);
79
+ }
80
+
81
+ .position {
82
+ background-image: linear-gradient(
83
+ var(${cssScope}--deg),
84
+ var(${cssScope}--from) 36%,
85
+ var(${cssScope}--to) 50%,
86
+ var(${cssScope}--from) 64%
87
+ );
88
+ background-color: transparent;
89
+ background-size: 200% 100%;
90
+ animation-name: po;
91
+ }
92
+
93
+ @keyframes po {
94
+ from {
95
+ background-position: 150% center;
96
+ }
97
+ to {
98
+ background-position: -50% center;
99
+ }
100
+ }
101
+
102
+ .opacity {
103
+ animation-name: op;
104
+ animation-direction: alternate;
105
+ }
106
+
107
+ @keyframes op {
108
+ 50% {
109
+ opacity: 0.25;
110
+ }
111
+ to {
112
+ opacity: 1;
113
+ }
114
+ }
115
+ `)
116
+ ], Skeleton);
117
+ export default Skeleton;
118
+ //# sourceMappingURL=skeleton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skeleton.js","sourceRoot":"","sources":["../../src/components/skeleton.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sCAAsC,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,sCAAsC,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,yCAAyC,CAAC;AACnE,OAAO,SAAS,MAAM,gCAAgC,CAAC;AACvD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAElF,MAAM,SAAS,GAAG,UAAU,CAAC;AAC7B,MAAM,QAAQ,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC;AAExC;;;;;;GAMG;AAqEH,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,WAAW;IAAlC;;QAOE;;;WAGG;QAEH,cAAS,GAA2B,UAAU,CAAC;QAE/C;;WAEG;QAEH,YAAO,GAAG,IAAI,CAAC;IAUjB,CAAC;IARW,MAAM;QACd,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YAClB,OAAO,QAAQ,EAAE,CAAC;QACpB,CAAC;QACD,OAAO,IAAI,CAAA,2BAA2B,IAAI,CAAC,SAAS;MAClD,IAAI,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE;MACxC,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC;IAChC,CAAC;CACF,CAAA;AAvBC;IADC,QAAQ,EAAE;sCACY;AAOvB;IADC,QAAQ,EAAE;2CACoC;AAM/C;IADC,KAAK,EAAE;yCACO;AAlBX,QAAQ;IApEb,MAAM,CAAC,SAAS,CAAC;IACjB,MAAM,CACL,GAAG,CAAA;;QAEG,QAAQ,eAAe,aAAa,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;QACxD,QAAQ,aAAa,aAAa,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;QACtD,QAAQ;QACR,QAAQ;QACR,QAAQ;QACR,QAAQ;mBACG,aAAa,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;wBAC5B,QAAQ;;;;;;;;;;;;uBAYT,QAAQ;;;;mBAIZ,QAAQ;;;;;;;cAOb,QAAQ;cACR,QAAQ;cACR,QAAQ;cACR,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BnB,CACF;GACK,QAAQ,CA4Bb;AAED,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,49 @@
1
+ import { type HandlerEvent } from "@godown/element/element.js";
2
+ import SuperInput from "../core/super-input.js";
3
+ /**
4
+ * {@linkcode Split} renders multiple input boxes.
5
+ *
6
+ * Input: will move the focus box backward until the complete input from start to end.
7
+ *
8
+ * Delete: will move the focus box forward until the first and no inputs for each.
9
+ *
10
+ * @category input
11
+ */
12
+ declare class Split extends SuperInput {
13
+ /**
14
+ * The number of input boxes.
15
+ */
16
+ len: number;
17
+ /**
18
+ * Focus index.
19
+ */
20
+ index: number;
21
+ current: number;
22
+ currentValue: (string | void)[];
23
+ protected render(): import("lit").TemplateResult<1>;
24
+ connectedCallback(): void;
25
+ protected _handleInput(e: HandlerEvent<HTMLInputElement, InputEvent>): void;
26
+ /**
27
+ * Fill input with data.
28
+ *
29
+ * If data is null
30
+ * - If current value is null, move to before.
31
+ * - If current value is not null, delete it.
32
+ *
33
+ * If data is not null
34
+ * - If current value is null, input data.
35
+ * - If current value is not null, input data and move to after.
36
+ *
37
+ * If data is multiple characters,
38
+ * Fill input with data[0] and call fillInput with data.slice(1).
39
+ *
40
+ * @param data Input event data.
41
+ */
42
+ protected fillInput(data: string | null): void;
43
+ focus(): void;
44
+ focusAt(i: number): void;
45
+ blur(): void;
46
+ reset(): void;
47
+ }
48
+ export default Split;
49
+ //# sourceMappingURL=split.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"split.d.ts","sourceRoot":"","sources":["../../src/components/split.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAK/D,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAahD;;;;;;;;GAQG;AACH,cA6CM,KAAM,SAAQ,UAAU;IAC5B;;OAEG;IAEH,GAAG,SAAK;IAER;;OAEG;IAEH,KAAK,SAAM;IAGX,OAAO,SAAM;IAGb,YAAY,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAM;IAErC,SAAS,CAAC,MAAM;IAuBhB,iBAAiB,IAAI,IAAI;IAKzB,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,YAAY,CAAC,gBAAgB,EAAE,UAAU,CAAC;IAapE;;;;;;;;;;;;;;;OAeG;IACH,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IA2CvC,KAAK;IAKL,OAAO,CAAC,CAAC,EAAE,MAAM;IAKjB,IAAI;IAMJ,KAAK;CAQN;AAED,eAAe,KAAK,CAAC"}
@@ -0,0 +1,206 @@
1
+ import { __decorate } from "tslib";
2
+ import { godown } from "@godown/element/decorators/godown.js";
3
+ import { styles } from "@godown/element/decorators/styles.js";
4
+ import { classList } from "@godown/element/directives/class-list.js";
5
+ import { css, html, nothing } from "lit";
6
+ import { property, state } from "lit/decorators.js";
7
+ import { cssGlobalVars, scopePrefix } from "../core/global-style.js";
8
+ import SuperInput from "../core/super-input.js";
9
+ const protoName = "split";
10
+ const cssScope = scopePrefix(protoName);
11
+ const loop = (len, fn) => {
12
+ const result = new Array(len);
13
+ for (let index = 0; index < len; index++) {
14
+ result[index] = fn(index);
15
+ }
16
+ return result;
17
+ };
18
+ /**
19
+ * {@linkcode Split} renders multiple input boxes.
20
+ *
21
+ * Input: will move the focus box backward until the complete input from start to end.
22
+ *
23
+ * Delete: will move the focus box forward until the first and no inputs for each.
24
+ *
25
+ * @category input
26
+ */
27
+ let Split = class Split extends SuperInput {
28
+ constructor() {
29
+ super(...arguments);
30
+ /**
31
+ * The number of input boxes.
32
+ */
33
+ this.len = 6;
34
+ /**
35
+ * Focus index.
36
+ */
37
+ this.index = -1;
38
+ this.current = -1;
39
+ this.currentValue = [];
40
+ }
41
+ render() {
42
+ return html `
43
+ <div part="root">
44
+ ${loop(this.len, (index) => html `<span part="input-box"
45
+ @click="${this.disabled ? null : () => this.focusAt(index)}"
46
+ class="${classList({ focus: this.current === index }) || nothing}"
47
+ >${this.currentValue[index]}</span>`)}
48
+ <input
49
+ part="input"
50
+ id="${this.makeId}"
51
+ @blur=${this.blur}
52
+ @input="${this._handleInput}"
53
+ .value="${
54
+ /* Ensure that input always has a value of length this.len */
55
+ this.value.padStart(this.len, " ")}"
56
+ >
57
+ </div>
58
+ `;
59
+ }
60
+ connectedCallback() {
61
+ super.connectedCallback();
62
+ this.reset();
63
+ }
64
+ _handleInput(e) {
65
+ e.stopPropagation();
66
+ if (this.compositing) {
67
+ return;
68
+ }
69
+ this.fillInput(e.data);
70
+ this.value = this.currentValue.join("");
71
+ this.dispatchEvent(new CustomEvent("input", { detail: this.value, bubbles: true, composed: true }));
72
+ this.dispatchEvent(new CustomEvent("change", { detail: this.value, composed: true }));
73
+ }
74
+ /**
75
+ * Fill input with data.
76
+ *
77
+ * If data is null
78
+ * - If current value is null, move to before.
79
+ * - If current value is not null, delete it.
80
+ *
81
+ * If data is not null
82
+ * - If current value is null, input data.
83
+ * - If current value is not null, input data and move to after.
84
+ *
85
+ * If data is multiple characters,
86
+ * Fill input with data[0] and call fillInput with data.slice(1).
87
+ *
88
+ * @param data Input event data.
89
+ */
90
+ fillInput(data) {
91
+ if (data === null) {
92
+ // delete
93
+ if (this.currentValue[this.current] !== null) {
94
+ // delete exist value
95
+ this.currentValue[this.current] = null;
96
+ }
97
+ else {
98
+ // go to before
99
+ this.currentValue[this.current - 1] = null;
100
+ const lastNotNull = this.currentValue.findLastIndex(a => a !== null);
101
+ this.current = this.current - 1 < 0 ? lastNotNull < 0 ? 0 : lastNotNull : this.current - 1;
102
+ }
103
+ return;
104
+ }
105
+ const multiple = data.length > 1;
106
+ // input
107
+ this.currentValue[this.current] = data[0];
108
+ if (this.current + 1 >= this.len) {
109
+ // index overflow
110
+ this.current = this.currentValue.indexOf(null);
111
+ if (this.current === -1) {
112
+ this.blur();
113
+ }
114
+ }
115
+ else {
116
+ // go to after
117
+ this.current += 1;
118
+ }
119
+ if (multiple) {
120
+ const after = data.slice(1);
121
+ if (after) {
122
+ this.fillInput(after);
123
+ }
124
+ }
125
+ }
126
+ focus() {
127
+ this.focusAt(this.current);
128
+ super.focus();
129
+ }
130
+ focusAt(i) {
131
+ this.current = i;
132
+ this._input.focus();
133
+ }
134
+ blur() {
135
+ this._input.blur();
136
+ this.current = -1;
137
+ super.blur();
138
+ }
139
+ reset() {
140
+ this.current = -1;
141
+ this.value = this.default;
142
+ this.currentValue = this.value.split("").concat(Array(this.len - this.value.length).fill(null));
143
+ if (this.index > -1) {
144
+ this.current = this.index;
145
+ }
146
+ }
147
+ };
148
+ __decorate([
149
+ property({ type: Number })
150
+ ], Split.prototype, "len", void 0);
151
+ __decorate([
152
+ property({ type: Number })
153
+ ], Split.prototype, "index", void 0);
154
+ __decorate([
155
+ state()
156
+ ], Split.prototype, "current", void 0);
157
+ __decorate([
158
+ state()
159
+ ], Split.prototype, "currentValue", void 0);
160
+ Split = __decorate([
161
+ godown(protoName),
162
+ styles(css `
163
+ :host {
164
+ color: var(${cssGlobalVars.foreground});
165
+ display: block;
166
+ border-radius: 1px;
167
+ width: fit-content;
168
+ ${cssScope}--size: 1.45em;
169
+ ${cssScope}--gap: .25em;
170
+ }
171
+
172
+ [part=root] {
173
+ gap: var(${cssScope}--gap);
174
+ width: 100%;
175
+ position: relative;
176
+ vertical-align: top;
177
+ display: inline-flex;
178
+ justify-content: space-between;
179
+ border-radius: inherit;
180
+ }
181
+
182
+ [part=input-box] {
183
+ width: var(${cssScope}--size);
184
+ height: var(${cssScope}--size);
185
+ vertical-align: top;
186
+ text-align: center;
187
+ background-color: var(${cssGlobalVars.input}-background);
188
+ border-radius: inherit;
189
+ }
190
+
191
+ [part=input] {
192
+ width: 100%;
193
+ height: 100%;
194
+ opacity: 0;
195
+ background: none;
196
+ position: absolute;
197
+ z-index: -1;
198
+ }
199
+
200
+ .focus {
201
+ box-shadow: var(${cssGlobalVars.input}-box-shadow);
202
+ }
203
+ `)
204
+ ], Split);
205
+ export default Split;
206
+ //# sourceMappingURL=split.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"split.js","sourceRoot":"","sources":["../../src/components/split.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sCAAsC,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,sCAAsC,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;AAErE,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MA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