@shibui-ui/ui 1.24.1 → 1.25.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 (460) hide show
  1. package/dist/components/atoms/index.d.ts +45 -16
  2. package/dist/components/atoms/index.d.ts.map +1 -1
  3. package/dist/components/molecules/index.d.ts +20 -1
  4. package/dist/components/molecules/index.d.ts.map +1 -1
  5. package/dist/components/organisms/index.d.ts +17 -1
  6. package/dist/components/organisms/index.d.ts.map +1 -1
  7. package/dist/index.d.ts +3 -82
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.js +79 -80
  10. package/dist/index.js.map +1 -1
  11. package/dist/index10.js +82 -18
  12. package/dist/index10.js.map +1 -1
  13. package/dist/index11.js +84 -69
  14. package/dist/index11.js.map +1 -1
  15. package/dist/index12.js +40 -26
  16. package/dist/index12.js.map +1 -1
  17. package/dist/index13.js +16 -39
  18. package/dist/index13.js.map +1 -1
  19. package/dist/index14.js +29 -44
  20. package/dist/index14.js.map +1 -1
  21. package/dist/index15.js +16 -117
  22. package/dist/index15.js.map +1 -1
  23. package/dist/index16.js +48 -40
  24. package/dist/index16.js.map +1 -1
  25. package/dist/index17.js +41 -25
  26. package/dist/index17.js.map +1 -1
  27. package/dist/index18.js +76 -49
  28. package/dist/index18.js.map +1 -1
  29. package/dist/index19.js +19 -39
  30. package/dist/index19.js.map +1 -1
  31. package/dist/index194.js +94 -24
  32. package/dist/index194.js.map +1 -1
  33. package/dist/index195.js +2 -2
  34. package/dist/index197.js +2 -24
  35. package/dist/index197.js.map +1 -1
  36. package/dist/index198.js +74 -2
  37. package/dist/index198.js.map +1 -1
  38. package/dist/index199.js +64 -35
  39. package/dist/index199.js.map +1 -1
  40. package/dist/index20.js +21 -41
  41. package/dist/index20.js.map +1 -1
  42. package/dist/index200.js +2 -2
  43. package/dist/index201.js +54 -13
  44. package/dist/index201.js.map +1 -1
  45. package/dist/index202.js +2 -2
  46. package/dist/index203.js +2 -2
  47. package/dist/index204.js +143 -157
  48. package/dist/index204.js.map +1 -1
  49. package/dist/index205.js +43 -24
  50. package/dist/index205.js.map +1 -1
  51. package/dist/index206.js +51 -2
  52. package/dist/index206.js.map +1 -1
  53. package/dist/index207.js +2 -11
  54. package/dist/index207.js.map +1 -1
  55. package/dist/index208.js +33 -2
  56. package/dist/index208.js.map +1 -1
  57. package/dist/index209.js +2 -91
  58. package/dist/index209.js.map +1 -1
  59. package/dist/index21.js +90 -26
  60. package/dist/index21.js.map +1 -1
  61. package/dist/index210.js +6 -2
  62. package/dist/index210.js.map +1 -1
  63. package/dist/index211.js +2 -41
  64. package/dist/index211.js.map +1 -1
  65. package/dist/index212.js +260 -2
  66. package/dist/index212.js.map +1 -1
  67. package/dist/index213.js +16 -5
  68. package/dist/index213.js.map +1 -1
  69. package/dist/index214.js +2 -2
  70. package/dist/index215.js +2 -35
  71. package/dist/index215.js.map +1 -1
  72. package/dist/index216.js +59 -42
  73. package/dist/index216.js.map +1 -1
  74. package/dist/index217.js +32 -2
  75. package/dist/index217.js.map +1 -1
  76. package/dist/index218.js +2 -85
  77. package/dist/index218.js.map +1 -1
  78. package/dist/index219.js +2 -2
  79. package/dist/index22.js +41 -48
  80. package/dist/index22.js.map +1 -1
  81. package/dist/index220.js +73 -65
  82. package/dist/index220.js.map +1 -1
  83. package/dist/index221.js +81 -2
  84. package/dist/index221.js.map +1 -1
  85. package/dist/index222.js +2 -10
  86. package/dist/index222.js.map +1 -1
  87. package/dist/index223.js +133 -2
  88. package/dist/index223.js.map +1 -1
  89. package/dist/index224.js +2 -26
  90. package/dist/index224.js.map +1 -1
  91. package/dist/index225.js +2 -2
  92. package/dist/index226.js +66 -12
  93. package/dist/index226.js.map +1 -1
  94. package/dist/index227.js +97 -2
  95. package/dist/index227.js.map +1 -1
  96. package/dist/index228.js +2 -2
  97. package/dist/index229.js +62 -24
  98. package/dist/index229.js.map +1 -1
  99. package/dist/index23.js +50 -94
  100. package/dist/index23.js.map +1 -1
  101. package/dist/index230.js +2 -2
  102. package/dist/index231.js +2 -2
  103. package/dist/index232.js +12 -2
  104. package/dist/index232.js.map +1 -1
  105. package/dist/index233.js +5 -16
  106. package/dist/index233.js.map +1 -1
  107. package/dist/index234.js +2 -2
  108. package/dist/index235.js +11 -9
  109. package/dist/index235.js.map +1 -1
  110. package/dist/index236.js +2 -2
  111. package/dist/index237.js +76 -34
  112. package/dist/index237.js.map +1 -1
  113. package/dist/index238.js +2 -2
  114. package/dist/index239.js +2 -27
  115. package/dist/index239.js.map +1 -1
  116. package/dist/index24.js +37 -34
  117. package/dist/index24.js.map +1 -1
  118. package/dist/index240.js +39 -2
  119. package/dist/index240.js.map +1 -1
  120. package/dist/index241.js +2 -34
  121. package/dist/index241.js.map +1 -1
  122. package/dist/index242.js +235 -12
  123. package/dist/index242.js.map +1 -1
  124. package/dist/index243.js +82 -2
  125. package/dist/index243.js.map +1 -1
  126. package/dist/index244.js +2 -9
  127. package/dist/index244.js.map +1 -1
  128. package/dist/index245.js +94 -2
  129. package/dist/index245.js.map +1 -1
  130. package/dist/index246.js +2 -5
  131. package/dist/index246.js.map +1 -1
  132. package/dist/index247.js +268 -2
  133. package/dist/index247.js.map +1 -1
  134. package/dist/index248.js +2 -36
  135. package/dist/index248.js.map +1 -1
  136. package/dist/index249.js +21 -2
  137. package/dist/index249.js.map +1 -1
  138. package/dist/index25.js +51 -32
  139. package/dist/index25.js.map +1 -1
  140. package/dist/index250.js +2 -31
  141. package/dist/index250.js.map +1 -1
  142. package/dist/index251.js +9 -2
  143. package/dist/index251.js.map +1 -1
  144. package/dist/index252.js +2 -19
  145. package/dist/index252.js.map +1 -1
  146. package/dist/index253.js +15 -2
  147. package/dist/index253.js.map +1 -1
  148. package/dist/index254.js +2 -2
  149. package/dist/index255.js +135 -69
  150. package/dist/index255.js.map +1 -1
  151. package/dist/index256.js +2 -11
  152. package/dist/index256.js.map +1 -1
  153. package/dist/index257.js +5 -2
  154. package/dist/index257.js.map +1 -1
  155. package/dist/index258.js +2 -78
  156. package/dist/index258.js.map +1 -1
  157. package/dist/index259.js +9 -2
  158. package/dist/index259.js.map +1 -1
  159. package/dist/index26.js +31 -236
  160. package/dist/index26.js.map +1 -1
  161. package/dist/index260.js +2 -32
  162. package/dist/index260.js.map +1 -1
  163. package/dist/index261.js +2 -2
  164. package/dist/index262.js +92 -9
  165. package/dist/index262.js.map +1 -1
  166. package/dist/index263.js +59 -2
  167. package/dist/index263.js.map +1 -1
  168. package/dist/index264.js +2 -16
  169. package/dist/index264.js.map +1 -1
  170. package/dist/index265.js +41 -2
  171. package/dist/index265.js.map +1 -1
  172. package/dist/index266.js +2 -16
  173. package/dist/index266.js.map +1 -1
  174. package/dist/index267.js +34 -9
  175. package/dist/index267.js.map +1 -1
  176. package/dist/index268.js +8 -54
  177. package/dist/index268.js.map +1 -1
  178. package/dist/index269.js +2 -2
  179. package/dist/index27.js +27 -58
  180. package/dist/index27.js.map +1 -1
  181. package/dist/index270.js +42 -7
  182. package/dist/index270.js.map +1 -1
  183. package/dist/index271.js +2 -2
  184. package/dist/index272.js +2 -34
  185. package/dist/index272.js.map +1 -1
  186. package/dist/index273.js +16 -2
  187. package/dist/index273.js.map +1 -1
  188. package/dist/index274.js +9 -2
  189. package/dist/index274.js.map +1 -1
  190. package/dist/index275.js +6 -13
  191. package/dist/index275.js.map +1 -1
  192. package/dist/index276.js +2 -2
  193. package/dist/index277.js +8 -15
  194. package/dist/index277.js.map +1 -1
  195. package/dist/index278.js +2 -2
  196. package/dist/index279.js +55 -2
  197. package/dist/index279.js.map +1 -1
  198. package/dist/index28.js +247 -24
  199. package/dist/index28.js.map +1 -1
  200. package/dist/index280.js +2 -42
  201. package/dist/index280.js.map +1 -1
  202. package/dist/index281.js +2 -100
  203. package/dist/index281.js.map +1 -1
  204. package/dist/index282.js +20 -2
  205. package/dist/index282.js.map +1 -1
  206. package/dist/index283.js +2 -97
  207. package/dist/index283.js.map +1 -1
  208. package/dist/index284.js +33 -2
  209. package/dist/index284.js.map +1 -1
  210. package/dist/index285.js +6 -27
  211. package/dist/index285.js.map +1 -1
  212. package/dist/index286.js +2 -2
  213. package/dist/index287.js +9 -44
  214. package/dist/index287.js.map +1 -1
  215. package/dist/index288.js +2 -2
  216. package/dist/index289.js +2 -33
  217. package/dist/index289.js.map +1 -1
  218. package/dist/index29.js +249 -39
  219. package/dist/index29.js.map +1 -1
  220. package/dist/index290.js +36 -2
  221. package/dist/index290.js.map +1 -1
  222. package/dist/index291.js +2 -57
  223. package/dist/index291.js.map +1 -1
  224. package/dist/index292.js +24 -2
  225. package/dist/index292.js.map +1 -1
  226. package/dist/index293.js +2 -2
  227. package/dist/index294.js +26 -247
  228. package/dist/index294.js.map +1 -1
  229. package/dist/index295.js +2 -2
  230. package/dist/index296.js +2 -72
  231. package/dist/index296.js.map +1 -1
  232. package/dist/index297.js +42 -2
  233. package/dist/index297.js.map +1 -1
  234. package/dist/index298.js +7 -56
  235. package/dist/index298.js.map +1 -1
  236. package/dist/index299.js +2 -133
  237. package/dist/index299.js.map +1 -1
  238. package/dist/index30.js +32 -19
  239. package/dist/index30.js.map +1 -1
  240. package/dist/index300.js +30 -2
  241. package/dist/index300.js.map +1 -1
  242. package/dist/index301.js +2 -12
  243. package/dist/index301.js.map +1 -1
  244. package/dist/index302.js +34 -2
  245. package/dist/index302.js.map +1 -1
  246. package/dist/index303.js +2 -162
  247. package/dist/index303.js.map +1 -1
  248. package/dist/index304.js +26 -42
  249. package/dist/index304.js.map +1 -1
  250. package/dist/index305.js +2 -81
  251. package/dist/index305.js.map +1 -1
  252. package/dist/index306.js +10 -2
  253. package/dist/index306.js.map +1 -1
  254. package/dist/index307.js +2 -71
  255. package/dist/index307.js.map +1 -1
  256. package/dist/index308.js +2 -2
  257. package/dist/index309.js +19 -2
  258. package/dist/index309.js.map +1 -1
  259. package/dist/index31.js +96 -11
  260. package/dist/index31.js.map +1 -1
  261. package/dist/index310.js +2 -81
  262. package/dist/index310.js.map +1 -1
  263. package/dist/index311.js +2 -2
  264. package/dist/index312.js +42 -2
  265. package/dist/index312.js.map +1 -1
  266. package/dist/index313.js +2 -74
  267. package/dist/index313.js.map +1 -1
  268. package/dist/index314.js +25 -67
  269. package/dist/index314.js.map +1 -1
  270. package/dist/index315.js +2 -2
  271. package/dist/index316.js +9 -17
  272. package/dist/index316.js.map +1 -1
  273. package/dist/index317.js +2 -2
  274. package/dist/index318.js +84 -32
  275. package/dist/index318.js.map +1 -1
  276. package/dist/index319.js +2 -2
  277. package/dist/index32.js +40 -48
  278. package/dist/index32.js.map +1 -1
  279. package/dist/index320.js +68 -77
  280. package/dist/index320.js.map +1 -1
  281. package/dist/index321.js +2 -2
  282. package/dist/index322.js +12 -148
  283. package/dist/index322.js.map +1 -1
  284. package/dist/index323.js +1 -1
  285. package/dist/index324.js +28 -6
  286. package/dist/index324.js.map +1 -1
  287. package/dist/index325.js +2 -2
  288. package/dist/index326.js +78 -87
  289. package/dist/index326.js.map +1 -1
  290. package/dist/index327.js +2 -2
  291. package/dist/index328.js +78 -2
  292. package/dist/index328.js.map +1 -1
  293. package/dist/index329.js +2 -237
  294. package/dist/index329.js.map +1 -1
  295. package/dist/index33.js +20 -56
  296. package/dist/index33.js.map +1 -1
  297. package/dist/index330.js +11 -6
  298. package/dist/index330.js.map +1 -1
  299. package/dist/index331.js +2 -2
  300. package/dist/index332.js +18 -59
  301. package/dist/index332.js.map +1 -1
  302. package/dist/index333.js +2 -2
  303. package/dist/index334.js +12 -5
  304. package/dist/index334.js.map +1 -1
  305. package/dist/index335.js +2 -2
  306. package/dist/index336.js +2 -15
  307. package/dist/index336.js.map +1 -1
  308. package/dist/index337.js +88 -2
  309. package/dist/index337.js.map +1 -1
  310. package/dist/index338.js +24 -2
  311. package/dist/index338.js.map +1 -1
  312. package/dist/index339.js +2 -92
  313. package/dist/index339.js.map +1 -1
  314. package/dist/index34.js +59 -35
  315. package/dist/index34.js.map +1 -1
  316. package/dist/index340.js +42 -14
  317. package/dist/index340.js.map +1 -1
  318. package/dist/index341.js +2 -2
  319. package/dist/index342.js +22 -80
  320. package/dist/index342.js.map +1 -1
  321. package/dist/index343.js +2 -2
  322. package/dist/index344.js +2 -18
  323. package/dist/index344.js.map +1 -1
  324. package/dist/index345.js +16 -2
  325. package/dist/index345.js.map +1 -1
  326. package/dist/index346.js +2 -268
  327. package/dist/index346.js.map +1 -1
  328. package/dist/index347.js +176 -2
  329. package/dist/index347.js.map +1 -1
  330. package/dist/index348.js +2 -2
  331. package/dist/index349.js +35 -39
  332. package/dist/index349.js.map +1 -1
  333. package/dist/index35.js +101 -28
  334. package/dist/index35.js.map +1 -1
  335. package/dist/index350.js +3 -3
  336. package/dist/index350.js.map +1 -1
  337. package/dist/index351.js +2 -2
  338. package/dist/index352.js +19 -26
  339. package/dist/index352.js.map +1 -1
  340. package/dist/index357.js +26 -19
  341. package/dist/index357.js.map +1 -1
  342. package/dist/index36.js +115 -33
  343. package/dist/index36.js.map +1 -1
  344. package/dist/index37.js +41 -115
  345. package/dist/index37.js.map +1 -1
  346. package/dist/index38.js +34 -246
  347. package/dist/index38.js.map +1 -1
  348. package/dist/index39.js +30 -137
  349. package/dist/index39.js.map +1 -1
  350. package/dist/index4.js +26 -84
  351. package/dist/index4.js.map +1 -1
  352. package/dist/index40.js +26 -400
  353. package/dist/index40.js.map +1 -1
  354. package/dist/index41.js +28 -77
  355. package/dist/index41.js.map +1 -1
  356. package/dist/index42.js +23 -26
  357. package/dist/index42.js.map +1 -1
  358. package/dist/index43.js +36 -33
  359. package/dist/index43.js.map +1 -1
  360. package/dist/index44.js +62 -16
  361. package/dist/index44.js.map +1 -1
  362. package/dist/index45.js +138 -21
  363. package/dist/index45.js.map +1 -1
  364. package/dist/index46.js +129 -22
  365. package/dist/index46.js.map +1 -1
  366. package/dist/index47.js +41 -19
  367. package/dist/index47.js.map +1 -1
  368. package/dist/index48.js +11 -82
  369. package/dist/index48.js.map +1 -1
  370. package/dist/index49.js +56 -279
  371. package/dist/index49.js.map +1 -1
  372. package/dist/index5.js +21 -34
  373. package/dist/index5.js.map +1 -1
  374. package/dist/index50.js +280 -33
  375. package/dist/index50.js.map +1 -1
  376. package/dist/index51.js +74 -94
  377. package/dist/index51.js.map +1 -1
  378. package/dist/index52.js +66 -41
  379. package/dist/index52.js.map +1 -1
  380. package/dist/index53.js +333 -62
  381. package/dist/index53.js.map +1 -1
  382. package/dist/index54.js +96 -256
  383. package/dist/index54.js.map +1 -1
  384. package/dist/index55.js +38 -130
  385. package/dist/index55.js.map +1 -1
  386. package/dist/index56.js +251 -50
  387. package/dist/index56.js.map +1 -1
  388. package/dist/index57.js +144 -115
  389. package/dist/index57.js.map +1 -1
  390. package/dist/index58.js +93 -183
  391. package/dist/index58.js.map +1 -1
  392. package/dist/index59.js +33 -339
  393. package/dist/index59.js.map +1 -1
  394. package/dist/index6.js +2 -2
  395. package/dist/index60.js +102 -66
  396. package/dist/index60.js.map +1 -1
  397. package/dist/index61.js +73 -179
  398. package/dist/index61.js.map +1 -1
  399. package/dist/index62.js +117 -97
  400. package/dist/index62.js.map +1 -1
  401. package/dist/index63.js +113 -263
  402. package/dist/index63.js.map +1 -1
  403. package/dist/index64.js +258 -251
  404. package/dist/index64.js.map +1 -1
  405. package/dist/index65.js +177 -79
  406. package/dist/index65.js.map +1 -1
  407. package/dist/index66.js +261 -140
  408. package/dist/index66.js.map +1 -1
  409. package/dist/index67.js +183 -100
  410. package/dist/index67.js.map +1 -1
  411. package/dist/index68.js +28 -89
  412. package/dist/index68.js.map +1 -1
  413. package/dist/index69.js +20 -161
  414. package/dist/index69.js.map +1 -1
  415. package/dist/index7.js +394 -32
  416. package/dist/index7.js.map +1 -1
  417. package/dist/index70.js +190 -53
  418. package/dist/index70.js.map +1 -1
  419. package/dist/index71.js +204 -112
  420. package/dist/index71.js.map +1 -1
  421. package/dist/index72.js +2 -2
  422. package/dist/index73.js +89 -28
  423. package/dist/index73.js.map +1 -1
  424. package/dist/index74.js +126 -63
  425. package/dist/index74.js.map +1 -1
  426. package/dist/index75.js +122 -111
  427. package/dist/index75.js.map +1 -1
  428. package/dist/index76.js +67 -64
  429. package/dist/index76.js.map +1 -1
  430. package/dist/index77.js +112 -88
  431. package/dist/index77.js.map +1 -1
  432. package/dist/index78.js +87 -16
  433. package/dist/index78.js.map +1 -1
  434. package/dist/index79.js +151 -79
  435. package/dist/index79.js.map +1 -1
  436. package/dist/index8.js +25 -127
  437. package/dist/index8.js.map +1 -1
  438. package/dist/index80.js +104 -186
  439. package/dist/index80.js.map +1 -1
  440. package/dist/index81.js +59 -20
  441. package/dist/index81.js.map +1 -1
  442. package/dist/index82.js +17 -129
  443. package/dist/index82.js.map +1 -1
  444. package/dist/index83.js +88 -217
  445. package/dist/index83.js.map +1 -1
  446. package/dist/index84.js +64 -112
  447. package/dist/index84.js.map +1 -1
  448. package/dist/index9.js +30 -45
  449. package/dist/index9.js.map +1 -1
  450. package/dist/src/components/atoms/index.d.ts +45 -16
  451. package/dist/src/components/atoms/index.d.ts.map +1 -1
  452. package/dist/src/components/molecules/index.d.ts +20 -1
  453. package/dist/src/components/molecules/index.d.ts.map +1 -1
  454. package/dist/src/components/organisms/index.d.ts +17 -1
  455. package/dist/src/components/organisms/index.d.ts.map +1 -1
  456. package/dist/src/index.d.ts +3 -82
  457. package/dist/src/index.d.ts.map +1 -1
  458. package/dist/tokens.css +353 -7
  459. package/dist/vite.config.d.ts.map +1 -1
  460. package/package.json +4 -4
package/dist/index29.js CHANGED
@@ -1,7 +1,9 @@
1
1
  import { unsafeCSS, css, LitElement } from "lit";
2
- import { state, customElement } from "lit/decorators.js";
3
- import { rippleTemplate } from "./index242.js";
4
- import styles from "./index243.js";
2
+ import { property, query, customElement } from "lit/decorators.js";
3
+ import { buttonLiquidTemplate } from "./index314.js";
4
+ import liquidCss from "./index315.js";
5
+ import sharedTokens from "./index196.js";
6
+ import { LIQUID_PALETTES } from "./index316.js";
5
7
  var __defProp = Object.defineProperty;
6
8
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
9
  var __decorateClass = (decorators, target, key, kind) => {
@@ -12,57 +14,265 @@ var __decorateClass = (decorators, target, key, kind) => {
12
14
  if (kind && result) __defProp(target, key, result);
13
15
  return result;
14
16
  };
15
- let LibRipple = class extends LitElement {
16
- constructor() {
17
- super(...arguments);
17
+ class WaterPhysics {
18
+ constructor(btn, canvas, water, ripple) {
19
+ this.fill = 0;
20
+ this.targetFill = 0;
21
+ this.fillSpeed = 0.032;
22
+ this.shimmerX = -1;
23
+ this.t = 0;
24
+ this.hovered = false;
25
+ this.raf = 0;
26
+ this.A = 3.5;
27
+ this.f1 = 0.038;
28
+ this.f2 = 0.063;
29
+ this.s1 = 1.8;
30
+ this.s2 = 1.2;
31
+ this.W = 0;
32
+ this.H = 0;
18
33
  this.ripples = [];
19
- this.count = 0;
20
- this.createRipple = (event) => {
21
- console.log("LibRipple: Click detectado en coordenadas:", event.clientX, event.clientY);
22
- if (!this.parentElement) return;
23
- const rect = this.parentElement.getBoundingClientRect();
24
- const size = Math.sqrt(rect.width ** 2 + rect.height ** 2) * 2;
25
- const x = event.clientX - rect.left - size / 2;
26
- const y = event.clientY - rect.top - size / 2;
27
- const id = this.count++;
28
- const newRipple = { id, x, y, size };
29
- this.ripples = [...this.ripples, newRipple];
34
+ this.btn = btn;
35
+ this.canvas = canvas;
36
+ this.ctx = canvas.getContext("2d");
37
+ [this.wr, this.wg, this.wb] = water;
38
+ [this.rr, this.rg, this.rb] = ripple;
39
+ this.resize();
40
+ this.loop();
41
+ }
42
+ /* ── Dimensiones con DPR ── */
43
+ resize() {
44
+ const r = this.btn.getBoundingClientRect();
45
+ const dpr = window.devicePixelRatio || 1;
46
+ this.W = r.width;
47
+ this.H = r.height;
48
+ this.canvas.width = this.W * dpr;
49
+ this.canvas.height = this.H * dpr;
50
+ this.canvas.style.width = `${this.W}px`;
51
+ this.canvas.style.height = `${this.H}px`;
52
+ this.ctx.scale(dpr, dpr);
53
+ }
54
+ /* ── Spawn de ripple ── */
55
+ spawnRipple(x, y, { speed = 2.2, maxR, lineWidth = 1.2 } = {}) {
56
+ const diag = Math.sqrt(this.W ** 2 + this.H ** 2);
57
+ this.ripples.push({
58
+ x,
59
+ y,
60
+ radius: 0,
61
+ maxRadius: maxR ?? diag * 0.72,
62
+ speed,
63
+ lineWidth,
64
+ opacity: 0
65
+ });
66
+ }
67
+ /* ── Eventos públicos — llamados por el componente Lit ── */
68
+ onMouseEnter(x, y) {
69
+ this.hovered = true;
70
+ this.targetFill = 1;
71
+ this.fillSpeed = 0.028;
72
+ this.shimmerX = -0.3;
73
+ this.spawnRipple(x, y, { speed: 3.2, lineWidth: 1.8 });
74
+ setTimeout(() => this.spawnRipple(x, y, { speed: 2, lineWidth: 1.1 }), 80);
75
+ setTimeout(() => this.spawnRipple(x, y, { speed: 1.3, lineWidth: 0.7 }), 180);
76
+ }
77
+ onMouseLeave() {
78
+ this.hovered = false;
79
+ this.targetFill = 0;
80
+ this.fillSpeed = 0.048;
81
+ }
82
+ onMouseDown(cx, cy) {
83
+ for (let i = 0; i < 3; i++) {
30
84
  setTimeout(() => {
31
- this.ripples = this.ripples.filter((r) => r.id !== id);
32
- }, 600);
85
+ this.spawnRipple(cx, cy, {
86
+ speed: 4 - i * 0.8,
87
+ maxR: this.W * 0.5,
88
+ lineWidth: 2 - i * 0.4
89
+ });
90
+ }, i * 40);
91
+ }
92
+ }
93
+ /* ── Dibujo ── */
94
+ drawWave() {
95
+ const { ctx, W, H, A, f1, f2, s1, s2, t, wr, wg, wb, fill } = this;
96
+ if (fill <= 1e-3) return;
97
+ const baseY = H * (1 - fill);
98
+ ctx.beginPath();
99
+ ctx.moveTo(0, H);
100
+ ctx.lineTo(0, baseY);
101
+ for (let x = 0; x <= W; x++) {
102
+ const y = baseY + A * Math.sin(x * f1 + t * s1) + A * 0.45 * Math.sin(x * f2 - t * s2);
103
+ ctx.lineTo(x, y);
104
+ }
105
+ ctx.lineTo(W, H);
106
+ ctx.closePath();
107
+ const grad = ctx.createLinearGradient(0, baseY - A * 2, 0, H);
108
+ grad.addColorStop(0, `rgba(${wr},${wg},${wb},0.82)`);
109
+ grad.addColorStop(0.4, `rgba(${wr},${wg},${wb},0.92)`);
110
+ grad.addColorStop(1, `rgba(${wr},${wg},${wb},0.98)`);
111
+ ctx.fillStyle = grad;
112
+ ctx.fill();
113
+ if (this.shimmerX > -0.5 && this.shimmerX < 1.5) {
114
+ const sx = W * this.shimmerX;
115
+ const sg = ctx.createLinearGradient(sx - 40, 0, sx + 40, 0);
116
+ sg.addColorStop(0, "rgba(255,255,255,0)");
117
+ sg.addColorStop(0.5, "rgba(255,255,255,0.12)");
118
+ sg.addColorStop(1, "rgba(255,255,255,0)");
119
+ ctx.fillStyle = sg;
120
+ ctx.fillRect(0, Math.max(0, baseY - 4), W, H - Math.max(0, baseY - 4));
121
+ }
122
+ }
123
+ drawRipples() {
124
+ const { ctx, rr, rg, rb } = this;
125
+ this.ripples = this.ripples.filter((r) => r.opacity > 0 || r.radius === 0);
126
+ for (const r of this.ripples) {
127
+ r.radius += r.speed;
128
+ r.opacity = Math.max(0, 1 - r.radius / r.maxRadius);
129
+ ctx.beginPath();
130
+ ctx.arc(r.x, r.y, r.radius, 0, Math.PI * 2);
131
+ ctx.strokeStyle = `rgba(${rr},${rg},${rb},${r.opacity * 0.9})`;
132
+ ctx.lineWidth = r.lineWidth;
133
+ ctx.stroke();
134
+ if (r.radius > 6) {
135
+ ctx.beginPath();
136
+ ctx.arc(r.x, r.y, r.radius * 0.65, 0, Math.PI * 2);
137
+ ctx.strokeStyle = `rgba(${rr},${rg},${rb},${r.opacity * 0.4})`;
138
+ ctx.lineWidth = r.lineWidth * 0.5;
139
+ ctx.stroke();
140
+ }
141
+ }
142
+ this.ripples = this.ripples.filter((r) => r.opacity > 0);
143
+ }
144
+ /* ── Loop principal ── */
145
+ loop() {
146
+ const tick = () => {
147
+ this.raf = requestAnimationFrame(tick);
148
+ const { ctx, W, H } = this;
149
+ this.t += 0.04;
150
+ const diff = this.targetFill - this.fill;
151
+ this.fill += diff * this.fillSpeed * 2.8;
152
+ if (Math.abs(diff) < 5e-4) this.fill = this.targetFill;
153
+ if (this.hovered && this.shimmerX < 1.6) {
154
+ this.shimmerX += 0.012;
155
+ }
156
+ if (this.fill <= 1e-3 && this.ripples.length === 0) return;
157
+ ctx.clearRect(0, 0, W, H);
158
+ this.drawWave();
159
+ this.drawRipples();
33
160
  };
161
+ this.raf = requestAnimationFrame(tick);
162
+ }
163
+ /* ── Cleanup ── */
164
+ destroy() {
165
+ cancelAnimationFrame(this.raf);
166
+ }
167
+ }
168
+ let LibButtonLiquid = class extends LitElement {
169
+ constructor() {
170
+ super(...arguments);
171
+ this.variant = "ink";
172
+ this.size = "md";
173
+ this.disabled = false;
174
+ this.loading = false;
175
+ this.dark = false;
176
+ this.block = false;
177
+ this._physics = null;
178
+ this._canvas = null;
179
+ this._ro = null;
34
180
  }
35
- // 1. Aseguramos la conexión al padre cuando el componente entra al DOM
181
+ /* ── Lifecycle ── */
36
182
  firstUpdated() {
37
- console.log("LibRipple: ¡Estoy vivo y montado!");
38
- if (this.parentElement) {
39
- console.log("LibRipple: Padre detectado ->", this.parentElement.tagName);
40
- const parentStyle = window.getComputedStyle(this.parentElement);
41
- if (parentStyle.position === "static") {
42
- this.parentElement.style.position = "relative";
43
- }
44
- this.parentElement.addEventListener("mousedown", this.createRipple);
45
- } else {
46
- console.error("LibRipple: No se encontró parentElement. ¿Está el componente dentro de un contenedor?");
183
+ this._initCanvas();
184
+ }
185
+ updated(changed) {
186
+ if (changed.has("variant")) {
187
+ this._destroyCanvas();
188
+ this._initCanvas();
47
189
  }
48
190
  }
49
191
  disconnectedCallback() {
50
192
  var _a;
51
- (_a = this.parentElement) == null ? void 0 : _a.removeEventListener("mousedown", this.createRipple);
52
193
  super.disconnectedCallback();
194
+ this._destroyCanvas();
195
+ (_a = this._ro) == null ? void 0 : _a.disconnect();
196
+ }
197
+ /* ── Canvas setup ── */
198
+ _initCanvas() {
199
+ if (!this._btn) return;
200
+ const canvas = document.createElement("canvas");
201
+ this._canvas = canvas;
202
+ this._btn.insertBefore(canvas, this._btn.firstChild);
203
+ const palette = LIQUID_PALETTES[this.variant];
204
+ this._physics = new WaterPhysics(this._btn, canvas, palette.water, palette.ripple);
205
+ this._ro = new ResizeObserver(() => {
206
+ var _a;
207
+ return (_a = this._physics) == null ? void 0 : _a.resize();
208
+ });
209
+ this._ro.observe(this._btn);
210
+ }
211
+ _destroyCanvas() {
212
+ var _a, _b, _c;
213
+ (_a = this._physics) == null ? void 0 : _a.destroy();
214
+ this._physics = null;
215
+ (_b = this._canvas) == null ? void 0 : _b.remove();
216
+ this._canvas = null;
217
+ (_c = this._ro) == null ? void 0 : _c.disconnect();
218
+ this._ro = null;
219
+ }
220
+ /* ── Eventos del canvas — llamados desde el template ── */
221
+ _onMouseEnter(e) {
222
+ var _a;
223
+ if (this.disabled || this.loading) return;
224
+ const rect = this._btn.getBoundingClientRect();
225
+ (_a = this._physics) == null ? void 0 : _a.onMouseEnter(e.clientX - rect.left, e.clientY - rect.top);
226
+ }
227
+ _onMouseLeave() {
228
+ var _a;
229
+ (_a = this._physics) == null ? void 0 : _a.onMouseLeave();
230
+ }
231
+ _onMouseDown(e) {
232
+ var _a;
233
+ if (this.disabled || this.loading) return;
234
+ const rect = this._btn.getBoundingClientRect();
235
+ (_a = this._physics) == null ? void 0 : _a.onMouseDown(e.clientX - rect.left, e.clientY - rect.top);
236
+ this.dispatchEvent(new CustomEvent("ui-lib-click", {
237
+ detail: { originalEvent: e },
238
+ bubbles: true,
239
+ composed: true
240
+ }));
53
241
  }
242
+ /* ── Render ── */
54
243
  render() {
55
- return rippleTemplate(this.ripples);
244
+ return buttonLiquidTemplate(this);
56
245
  }
57
246
  };
58
- LibRipple.styles = [css`${unsafeCSS(styles)}`];
247
+ LibButtonLiquid.styles = [
248
+ css`${unsafeCSS(sharedTokens)}`,
249
+ css`${unsafeCSS(liquidCss)}`
250
+ ];
251
+ __decorateClass([
252
+ property({ type: String, reflect: true })
253
+ ], LibButtonLiquid.prototype, "variant", 2);
254
+ __decorateClass([
255
+ property({ type: String, reflect: true })
256
+ ], LibButtonLiquid.prototype, "size", 2);
257
+ __decorateClass([
258
+ property({ type: Boolean, reflect: true })
259
+ ], LibButtonLiquid.prototype, "disabled", 2);
260
+ __decorateClass([
261
+ property({ type: Boolean, reflect: true })
262
+ ], LibButtonLiquid.prototype, "loading", 2);
263
+ __decorateClass([
264
+ property({ type: Boolean, reflect: true })
265
+ ], LibButtonLiquid.prototype, "dark", 2);
266
+ __decorateClass([
267
+ property({ type: Boolean, reflect: true })
268
+ ], LibButtonLiquid.prototype, "block", 2);
59
269
  __decorateClass([
60
- state()
61
- ], LibRipple.prototype, "ripples", 2);
62
- LibRipple = __decorateClass([
63
- customElement("lib-ripple")
64
- ], LibRipple);
270
+ query(".btn")
271
+ ], LibButtonLiquid.prototype, "_btn", 2);
272
+ LibButtonLiquid = __decorateClass([
273
+ customElement("lib-button-liquid")
274
+ ], LibButtonLiquid);
65
275
  export {
66
- LibRipple
276
+ LibButtonLiquid
67
277
  };
68
278
  //# sourceMappingURL=index29.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index29.js","sources":["../src/components/atoms/ripple/lib-ripple.component.ts"],"sourcesContent":["import { LitElement, TemplateResult, css, unsafeCSS } from 'lit';\nimport { customElement, state } from 'lit/decorators.js';\nimport { rippleTemplate } from './lib-ripple.html';\nimport styles from './lib-ripple.css?inline';\n\nexport interface RippleEffect {\n id: number;\n x: number;\n y: number;\n size: number;\n}\n\n@customElement('lib-ripple')\nexport class LibRipple extends LitElement {\n // Importante: usamos unsafeCSS para el string del CSS inyectado\n static override styles = [css`${unsafeCSS(styles)}`];\n\n @state() private ripples: RippleEffect[] = [];\n private count: number = 0;\n\n // 1. Aseguramos la conexión al padre cuando el componente entra al DOM\n override firstUpdated(): void {\n console.log('LibRipple: ¡Estoy vivo y montado!');\n \n if (this.parentElement) {\n console.log('LibRipple: Padre detectado ->', this.parentElement.tagName);\n \n // Forzamos que el padre sea relativo si no lo es\n const parentStyle = window.getComputedStyle(this.parentElement);\n if (parentStyle.position === 'static') {\n this.parentElement.style.position = 'relative';\n }\n\n this.parentElement.addEventListener('mousedown', this.createRipple);\n } else {\n console.error('LibRipple: No se encontró parentElement. ¿Está el componente dentro de un contenedor?');\n }\n }\n\n override disconnectedCallback(): void {\n this.parentElement?.removeEventListener('mousedown', this.createRipple);\n super.disconnectedCallback();\n }\n\n private createRipple = (event: MouseEvent): void => {\n console.log('LibRipple: Click detectado en coordenadas:', event.clientX, event.clientY);\n \n if (!this.parentElement) return;\n\n const rect: DOMRect = this.parentElement.getBoundingClientRect();\n \n // Calculamos el tamaño para cubrir todo el contenedor (Pitágoras pro)\n const size: number = Math.sqrt(rect.width ** 2 + rect.height ** 2) * 2;\n \n const x: number = event.clientX - rect.left - size / 2;\n const y: number = event.clientY - rect.top - size / 2;\n\n const id: number = this.count++;\n const newRipple: RippleEffect = { id, x, y, size };\n \n this.ripples = [...this.ripples, newRipple];\n\n // Limpiamos después de la animación (600ms según tus tokens)\n setTimeout(() => {\n this.ripples = this.ripples.filter(r => r.id !== id);\n }, 600);\n };\n\n protected override render(): TemplateResult {\n return rippleTemplate(this.ripples);\n }\n}"],"names":[],"mappings":";;;;;;;;;;;;;;AAaO,IAAM,YAAN,cAAwB,WAAW;AAAA,EAAnC,cAAA;AAAA,UAAA,GAAA,SAAA;AAII,SAAQ,UAA0B,CAAA;AAC3C,SAAQ,QAAgB;AA0BxB,SAAQ,eAAe,CAAC,UAA4B;AAClD,cAAQ,IAAI,8CAA8C,MAAM,SAAS,MAAM,OAAO;AAEtF,UAAI,CAAC,KAAK,cAAe;AAEzB,YAAM,OAAgB,KAAK,cAAc,sBAAA;AAGzC,YAAM,OAAe,KAAK,KAAK,KAAK,SAAS,IAAI,KAAK,UAAU,CAAC,IAAI;AAErE,YAAM,IAAY,MAAM,UAAU,KAAK,OAAO,OAAO;AACrD,YAAM,IAAY,MAAM,UAAU,KAAK,MAAM,OAAO;AAEpD,YAAM,KAAa,KAAK;AACxB,YAAM,YAA0B,EAAE,IAAI,GAAG,GAAG,KAAA;AAE5C,WAAK,UAAU,CAAC,GAAG,KAAK,SAAS,SAAS;AAG1C,iBAAW,MAAM;AACf,aAAK,UAAU,KAAK,QAAQ,OAAO,CAAA,MAAK,EAAE,OAAO,EAAE;AAAA,MACrD,GAAG,GAAG;AAAA,IACR;AAAA,EAAA;AAAA;AAAA,EA7CS,eAAqB;AAC5B,YAAQ,IAAI,mCAAmC;AAE/C,QAAI,KAAK,eAAe;AACtB,cAAQ,IAAI,iCAAiC,KAAK,cAAc,OAAO;AAGvE,YAAM,cAAc,OAAO,iBAAiB,KAAK,aAAa;AAC9D,UAAI,YAAY,aAAa,UAAU;AACrC,aAAK,cAAc,MAAM,WAAW;AAAA,MACtC;AAEA,WAAK,cAAc,iBAAiB,aAAa,KAAK,YAAY;AAAA,IACpE,OAAO;AACL,cAAQ,MAAM,uFAAuF;AAAA,IACvG;AAAA,EACF;AAAA,EAES,uBAA6B;;AACpC,eAAK,kBAAL,mBAAoB,oBAAoB,aAAa,KAAK;AAC1D,UAAM,qBAAA;AAAA,EACR;AAAA,EA0BmB,SAAyB;AAC1C,WAAO,eAAe,KAAK,OAAO;AAAA,EACpC;AACF;AA1Da,UAEK,SAAS,CAAC,MAAM,UAAU,MAAM,CAAC,EAAE;AAElC,gBAAA;AAAA,EAAhB,MAAA;AAAM,GAJI,UAIM,WAAA,WAAA,CAAA;AAJN,YAAN,gBAAA;AAAA,EADN,cAAc,YAAY;AAAA,GACd,SAAA;"}
1
+ {"version":3,"file":"index29.js","sources":["../src/components/atoms/liquid-button/lib-liquid-button.component.ts"],"sourcesContent":["import { LitElement, css, unsafeCSS, TemplateResult } from 'lit';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { buttonLiquidTemplate } from './lib-liquid-button.html';\nimport liquidCss from './lib-liquid-button.css?inline';\nimport sharedTokens from '../../../styles/shared/tokens.css?inline';\nimport { LIQUID_PALETTES } from './lib-liquid-button.types';\nimport type { LiquidVariant, LiquidSize } from './lib-liquid-button.types';\n\n/* ============================================================\n WaterPhysics — clase interna de física de canvas\n Portada desde el SG-41 (vanilla JS → TypeScript puro)\n ============================================================ */\nclass WaterPhysics {\n private btn: HTMLElement;\n private canvas: HTMLCanvasElement;\n private ctx: CanvasRenderingContext2D;\n\n /* Colores */\n private wr: number; private wg: number; private wb: number;\n private rr: number; private rg: number; private rb: number;\n\n /* Estado */\n private fill = 0;\n private targetFill = 0;\n private fillSpeed = 0.032;\n private shimmerX = -1;\n private t = 0;\n private hovered = false;\n private raf = 0;\n\n /* Física de onda */\n private readonly A = 3.5;\n private readonly f1 = 0.038;\n private readonly f2 = 0.063;\n private readonly s1 = 1.8;\n private readonly s2 = 1.2;\n\n private W = 0;\n private H = 0;\n\n private ripples: Array<{\n x: number; y: number;\n radius: number; maxRadius: number;\n speed: number; lineWidth: number;\n opacity: number;\n }> = [];\n\n constructor(\n btn: HTMLElement,\n canvas: HTMLCanvasElement,\n water: [number, number, number],\n ripple: [number, number, number],\n ) {\n this.btn = btn;\n this.canvas = canvas;\n this.ctx = canvas.getContext('2d')!;\n [this.wr, this.wg, this.wb] = water;\n [this.rr, this.rg, this.rb] = ripple;\n\n this.resize();\n this.loop();\n }\n\n /* ── Dimensiones con DPR ── */\n resize(): void {\n const r = this.btn.getBoundingClientRect();\n const dpr = window.devicePixelRatio || 1;\n this.W = r.width;\n this.H = r.height;\n this.canvas.width = this.W * dpr;\n this.canvas.height = this.H * dpr;\n this.canvas.style.width = `${this.W}px`;\n this.canvas.style.height = `${this.H}px`;\n this.ctx.scale(dpr, dpr);\n }\n\n /* ── Spawn de ripple ── */\n spawnRipple(\n x: number, y: number,\n { speed = 2.2, maxR, lineWidth = 1.2 }:\n { speed?: number; maxR?: number; lineWidth?: number } = {},\n ): void {\n const diag = Math.sqrt(this.W ** 2 + this.H ** 2);\n this.ripples.push({\n x, y,\n radius: 0,\n maxRadius: maxR ?? diag * 0.72,\n speed,\n lineWidth,\n opacity: 0,\n });\n }\n\n /* ── Eventos públicos — llamados por el componente Lit ── */\n onMouseEnter(x: number, y: number): void {\n this.hovered = true;\n this.targetFill = 1;\n this.fillSpeed = 0.028;\n this.shimmerX = -0.3;\n\n this.spawnRipple(x, y, { speed: 3.2, lineWidth: 1.8 });\n setTimeout((): void => this.spawnRipple(x, y, { speed: 2.0, lineWidth: 1.1 }), 80);\n setTimeout((): void => this.spawnRipple(x, y, { speed: 1.3, lineWidth: 0.7 }), 180);\n }\n\n onMouseLeave(): void {\n this.hovered = false;\n this.targetFill = 0;\n this.fillSpeed = 0.048;\n }\n\n onMouseDown(cx: number, cy: number): void {\n for (let i = 0; i < 3; i++) {\n setTimeout((): void => {\n this.spawnRipple(cx, cy, {\n speed: 4 - i * 0.8,\n maxR: this.W * 0.5,\n lineWidth: 2 - i * 0.4,\n });\n }, i * 40);\n }\n }\n\n /* ── Dibujo ── */\n private drawWave(): void {\n const { ctx, W, H, A, f1, f2, s1, s2, t, wr, wg, wb, fill } = this;\n if (fill <= 0.001) return;\n\n const baseY = H * (1 - fill);\n\n /* Cuerpo sinusoidal */\n ctx.beginPath();\n ctx.moveTo(0, H);\n ctx.lineTo(0, baseY);\n for (let x = 0; x <= W; x++) {\n const y = baseY\n + A * Math.sin(x * f1 + t * s1)\n + A * 0.45 * Math.sin(x * f2 - t * s2);\n ctx.lineTo(x, y);\n }\n ctx.lineTo(W, H);\n ctx.closePath();\n\n /* Gradiente vertical */\n const grad = ctx.createLinearGradient(0, baseY - A * 2, 0, H);\n grad.addColorStop(0, `rgba(${wr},${wg},${wb},0.82)`);\n grad.addColorStop(0.4, `rgba(${wr},${wg},${wb},0.92)`);\n grad.addColorStop(1, `rgba(${wr},${wg},${wb},0.98)`);\n ctx.fillStyle = grad;\n ctx.fill();\n\n /* Shimmer diagonal */\n if (this.shimmerX > -0.5 && this.shimmerX < 1.5) {\n const sx = W * this.shimmerX;\n const sg = ctx.createLinearGradient(sx - 40, 0, sx + 40, 0);\n sg.addColorStop(0, 'rgba(255,255,255,0)');\n sg.addColorStop(0.5, 'rgba(255,255,255,0.12)');\n sg.addColorStop(1, 'rgba(255,255,255,0)');\n ctx.fillStyle = sg;\n ctx.fillRect(0, Math.max(0, baseY - 4), W, H - Math.max(0, baseY - 4));\n }\n }\n\n private drawRipples(): void {\n const { ctx, rr, rg, rb } = this;\n this.ripples = this.ripples.filter(r => r.opacity > 0 || r.radius === 0);\n\n for (const r of this.ripples) {\n r.radius += r.speed;\n r.opacity = Math.max(0, 1 - r.radius / r.maxRadius);\n\n /* Anillo principal */\n ctx.beginPath();\n ctx.arc(r.x, r.y, r.radius, 0, Math.PI * 2);\n ctx.strokeStyle = `rgba(${rr},${rg},${rb},${r.opacity * 0.9})`;\n ctx.lineWidth = r.lineWidth;\n ctx.stroke();\n\n /* Segundo anillo interior más fino */\n if (r.radius > 6) {\n ctx.beginPath();\n ctx.arc(r.x, r.y, r.radius * 0.65, 0, Math.PI * 2);\n ctx.strokeStyle = `rgba(${rr},${rg},${rb},${r.opacity * 0.4})`;\n ctx.lineWidth = r.lineWidth * 0.5;\n ctx.stroke();\n }\n }\n\n /* Limpiar ripples agotados */\n this.ripples = this.ripples.filter(r => r.opacity > 0);\n }\n\n /* ── Loop principal ── */\n private loop(): void {\n const tick = (): void => {\n this.raf = requestAnimationFrame(tick);\n const { ctx, W, H } = this;\n this.t += 0.04;\n\n /* Lerp fill */\n const diff = this.targetFill - this.fill;\n this.fill += diff * this.fillSpeed * 2.8;\n if (Math.abs(diff) < 0.0005) this.fill = this.targetFill;\n\n /* Shimmer avanza */\n if (this.hovered && this.shimmerX < 1.6) {\n this.shimmerX += 0.012;\n }\n\n /* Skip si todo en reposo */\n if (this.fill <= 0.001 && this.ripples.length === 0) return;\n\n ctx.clearRect(0, 0, W, H);\n this.drawWave();\n this.drawRipples();\n };\n this.raf = requestAnimationFrame(tick);\n }\n\n /* ── Cleanup ── */\n destroy(): void {\n cancelAnimationFrame(this.raf);\n }\n}\n\n\n/* ============================================================\n LIB-BUTTON-LIQUID — Web Component\n ============================================================ */\n\n/**\n * Botón con física de agua en canvas.\n *\n * @prop variant — 'ink' | 'washi' | 'kaki' | 'celadon' | 'ghost' | 'danger'\n * @prop size — 'sm' | 'md' | 'lg'\n * @prop disabled — bloquea interacción y detiene el canvas\n * @prop loading — muestra spinner, bloquea interacción\n * @prop dark — ajusta colores en surface oscura\n * @prop block — ancho 100%\n *\n * Slots: default · prefix · suffix\n * @fires ui-lib-click — {detail: { originalEvent: MouseEvent }}\n */\n@customElement('lib-button-liquid')\nexport class LibButtonLiquid extends LitElement {\n static override styles = [\n css`${unsafeCSS(sharedTokens)}`,\n css`${unsafeCSS(liquidCss)}`,\n ];\n\n @property({ type: String, reflect: true })\n variant: LiquidVariant = 'ink';\n\n @property({ type: String, reflect: true })\n size: LiquidSize = 'md';\n\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n @property({ type: Boolean, reflect: true })\n loading = false;\n\n @property({ type: Boolean, reflect: true })\n dark = false;\n\n @property({ type: Boolean, reflect: true })\n block = false;\n\n @query('.btn')\n declare private _btn: HTMLButtonElement;\n\n private _physics: WaterPhysics | null = null;\n private _canvas: HTMLCanvasElement | null = null;\n private _ro: ResizeObserver | null = null;\n\n /* ── Lifecycle ── */\n\n override firstUpdated(): void {\n this._initCanvas();\n }\n\n override updated(changed: Map<string, unknown>): void {\n /* Si cambia la variante, reconstruir physics con nueva paleta */\n if (changed.has('variant')) {\n this._destroyCanvas();\n this._initCanvas();\n }\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this._destroyCanvas();\n this._ro?.disconnect();\n }\n\n /* ── Canvas setup ── */\n\n private _initCanvas(): void {\n if (!this._btn) return;\n\n /* Crear canvas y añadirlo como primer hijo del botón (bajo .btn-inner) */\n const canvas = document.createElement('canvas');\n this._canvas = canvas;\n this._btn.insertBefore(canvas, this._btn.firstChild);\n\n const palette = LIQUID_PALETTES[this.variant];\n this._physics = new WaterPhysics(this._btn, canvas, palette.water, palette.ripple);\n\n /* ResizeObserver para adaptar canvas al tamaño real del botón */\n this._ro = new ResizeObserver((): void => this._physics?.resize());\n this._ro.observe(this._btn);\n }\n\n private _destroyCanvas(): void {\n this._physics?.destroy();\n this._physics = null;\n this._canvas?.remove();\n this._canvas = null;\n this._ro?.disconnect();\n this._ro = null;\n }\n\n /* ── Eventos del canvas — llamados desde el template ── */\n\n _onMouseEnter(e: MouseEvent): void {\n if (this.disabled || this.loading) return;\n const rect = this._btn.getBoundingClientRect();\n this._physics?.onMouseEnter(e.clientX - rect.left, e.clientY - rect.top);\n }\n\n _onMouseLeave(): void {\n this._physics?.onMouseLeave();\n }\n\n _onMouseDown(e: MouseEvent): void {\n if (this.disabled || this.loading) return;\n const rect = this._btn.getBoundingClientRect();\n this._physics?.onMouseDown(e.clientX - rect.left, e.clientY - rect.top);\n\n this.dispatchEvent(new CustomEvent('ui-lib-click', {\n detail: { originalEvent: e },\n bubbles: true,\n composed: true,\n }));\n }\n\n /* ── Render ── */\n protected override render(): TemplateResult {\n return buttonLiquidTemplate(this);\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'lib-button-liquid': LibButtonLiquid;\n }\n}"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAYA,MAAM,aAAa;AAAA,EAmCjB,YACE,KACA,QACA,OACA,QACA;AA9BF,SAAQ,OAAa;AACrB,SAAQ,aAAa;AACrB,SAAQ,YAAa;AACrB,SAAQ,WAAa;AACrB,SAAQ,IAAa;AACrB,SAAQ,UAAa;AACrB,SAAQ,MAAa;AAGrB,SAAiB,IAAK;AACtB,SAAiB,KAAK;AACtB,SAAiB,KAAK;AACtB,SAAiB,KAAK;AACtB,SAAiB,KAAK;AAEtB,SAAQ,IAAI;AACZ,SAAQ,IAAI;AAEZ,SAAQ,UAKH,CAAA;AAQH,SAAK,MAAS;AACd,SAAK,SAAS;AACd,SAAK,MAAS,OAAO,WAAW,IAAI;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AAAA,GAN9B,gBAOX,WAAA,WAAA,CAAA;AAGA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,SAAS,MAAM;AAAA,GAT9B,gBAUX,WAAA,QAAA,CAAA;AAGA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,SAAS,SAAS,MAAM;AAAA,GAZ/B,gBAaX,WAAA,YAAA,CAAA;AAGA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,SAAS,SAAS,MAAM;AAAA,GAf/B,gBAgBX,WAAA,WAAA,CAAA;AAGA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,SAAS,SAAS,MAAM;AAAA,GAlB/B,gBAmBX,WAAA,QAAA,CAAA;AAGA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,SAAS,SAAS,MAAM;AAAA,GArB/B,gBAsBX,WAAA,SAAA,CAAA;AAGgB,gBAAA;AAAA,EADf,MAAM,MAAM;AAAA,GAxBF,gBAyBK,WAAA,QAAA,CAAA;AAzBL,kBAAN,gBAAA;AAAA,EADN,cAAc,mBAAmB;AAAA,GACrB,eAAA;"}
package/dist/index290.js CHANGED
@@ -1,5 +1,39 @@
1
- const emptyStateCss = '@layer tokens,reset,components;@layer reset{:host{display:flex;width:100%;justify-content:center;align-items:center}*,*:before,*:after{box-sizing:border-box}}@layer components{.es{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:var(--lib-space-xl) var(--lib-space-lg);gap:0;width:100%}.es-illustration{margin-bottom:var(--lib-space-lg);display:flex;align-items:center;justify-content:center;position:relative}.es-icon-wrap{width:72px;height:72px;border-radius:var(--radius-full);background:var(--color-washi-100);border:1px solid var(--border-subtle);display:flex;align-items:center;justify-content:center;color:var(--color-washi-400);font-size:28px;flex-shrink:0}.es-kanji{font-family:var(--lib-font-display);font-size:6rem;line-height:1;color:var(--color-washi-200);-webkit-user-select:none;user-select:none;letter-spacing:var(--tracking-tight)}.es-body{display:flex;flex-direction:column;align-items:center;gap:0}.es-title{font-family:var(--lib-font-display);font-size:var(--text-2xl);font-weight:var(--weight-light);letter-spacing:var(--tracking-tight);color:var(--text-primary);margin-bottom:var(--lib-space-sm);line-height:var(--leading-snug)}.es-title em{font-style:italic;color:var(--text-muted)}.es-desc{font-family:var(--lib-font-body);font-size:var(--text-sm);color:var(--text-muted);line-height:var(--leading-relaxed);max-width:320px;margin:0 auto var(--lib-space-lg)}.es-actions{display:flex;align-items:center;justify-content:center;gap:var(--lib-space-sm);flex-wrap:wrap}::slotted([slot="actions"]){flex-shrink:0}:host([size="sm"]) .es{padding:var(--lib-space-lg) var(--lib-space-md)}:host([size="sm"]) .es-icon-wrap{width:48px;height:48px;font-size:20px}:host([size="sm"]) .es-illustration{margin-bottom:var(--lib-space-md)}:host([size="sm"]) .es-title{font-size:var(--text-xl);margin-bottom:var(--lib-space-xs)}:host([size="sm"]) .es-desc{font-size:var(--text-xs);margin-bottom:var(--lib-space-md)}:host([layout="inline"]) .es{flex-direction:row;text-align:left;padding:var(--lib-space-md) var(--lib-space-lg);gap:var(--lib-space-lg);align-items:center;justify-content:flex-start}:host([layout="inline"]) .es-illustration{margin-bottom:0;flex-shrink:0}:host([layout="inline"]) .es-body{align-items:flex-start;gap:var(--lib-space-xs)}:host([layout="inline"]) .es-title{font-size:var(--text-xl);margin-bottom:0}:host([layout="inline"]) .es-desc{margin:0;max-width:400px}:host([layout="inline"]) .es-actions{justify-content:flex-start;margin-top:var(--lib-space-sm)}:host([bordered]) .es{border:1px dashed var(--border-default);background:var(--bg-surface)}:host([ghost]) .es-icon-wrap{background:transparent;border:none;color:var(--color-washi-300);font-size:40px}:host([tone="kaki"]) .es-icon-wrap{background:var(--color-kaki-50);color:var(--color-kaki-500);border-color:var(--color-kaki-100)}:host([tone="celadon"]) .es-icon-wrap{background:var(--color-celadon-100);color:var(--color-celadon-500);border-color:var(--color-celadon-100)}:host([tone="error"]) .es-icon-wrap{background:#f5ddd9;color:var(--color-error);border-color:#f5ddd9}@media(max-width:640px){:host([layout="inline"]) .es{flex-direction:column;text-align:center}:host([layout="inline"]) .es-body{align-items:center}:host([layout="inline"]) .es-actions{justify-content:center}}}';
1
+ import { html, nothing } from "lit";
2
+ const checkSvg = html`
3
+ <svg class="checkbox__check" viewBox="0 0 10 10" aria-hidden="true">
4
+ <polyline points="1.5,5 4,7.5 8.5,2"/>
5
+ </svg>
6
+ `;
7
+ const dashEl = html`<span class="checkbox__dash" aria-hidden="true"></span>`;
8
+ function checkboxTemplate(props) {
9
+ return html`
10
+ <label class="checkbox">
11
+
12
+ <input
13
+ class="checkbox__input"
14
+ type="checkbox"
15
+ .checked="${props.checked}"
16
+ .indeterminate="${props.indeterminate}"
17
+ ?disabled="${props.disabled}"
18
+ value="${props.value}"
19
+ @change="${props.onChange}"
20
+ />
21
+
22
+ <span class="checkbox__box">
23
+ ${props.indeterminate ? dashEl : checkSvg}
24
+ </span>
25
+
26
+ ${props.label || props.sublabel ? html`
27
+ <span class="checkbox__label">
28
+ ${props.label ? html`<span class="checkbox__label-text">${props.label}</span>` : nothing}
29
+ ${props.sublabel ? html`<span class="checkbox__label-sub">${props.sublabel}</span>` : nothing}
30
+ </span>
31
+ ` : html`<slot></slot>`}
32
+
33
+ </label>
34
+ `;
35
+ }
2
36
  export {
3
- emptyStateCss as default
37
+ checkboxTemplate
4
38
  };
5
39
  //# sourceMappingURL=index290.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index290.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
1
+ {"version":3,"file":"index290.js","sources":["../src/components/atoms/checkbox/lib-checkbox.html.ts"],"sourcesContent":["import { html, nothing, TemplateResult } from 'lit';\n\nexport type LibCheckboxSize = 'sm' | 'md' | 'lg';\nexport type LibCheckboxVariant = 'default' | 'kaki' | 'error';\n\nexport interface CheckboxTemplateProps {\n checked: boolean;\n disabled: boolean;\n indeterminate: boolean;\n label: string;\n sublabel: string;\n value: string;\n size: LibCheckboxSize;\n variant: LibCheckboxVariant;\n onChange: (e: Event) => void;\n}\n\n/** SVG check — polyline del styleguide, animado con ease-bounce */\nconst checkSvg = html`\n <svg class=\"checkbox__check\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <polyline points=\"1.5,5 4,7.5 8.5,2\"/>\n </svg>\n`;\n\n/** SVG dash — estado indeterminate */\nconst dashEl = html`<span class=\"checkbox__dash\" aria-hidden=\"true\"></span>`;\n\n/**\n * Plantilla para lib-checkbox.\n *\n * Estructura:\n * label.checkbox\n * input[type=checkbox] (capa de interaccion, invisible)\n * span.checkbox__box (visual: box + check/dash)\n * span.checkbox__label (label-text + sublabel opcional)\n */\nexport function checkboxTemplate(props: CheckboxTemplateProps): TemplateResult {\n return html`\n <label class=\"checkbox\">\n\n <input\n class=\"checkbox__input\"\n type=\"checkbox\"\n .checked=\"${props.checked}\"\n .indeterminate=\"${props.indeterminate}\"\n ?disabled=\"${props.disabled}\"\n value=\"${props.value}\"\n @change=\"${props.onChange}\"\n />\n\n <span class=\"checkbox__box\">\n ${props.indeterminate ? dashEl : checkSvg}\n </span>\n\n ${props.label || props.sublabel\n ? html`\n <span class=\"checkbox__label\">\n ${props.label\n ? html`<span class=\"checkbox__label-text\">${props.label}</span>`\n : nothing}\n ${props.sublabel\n ? html`<span class=\"checkbox__label-sub\">${props.sublabel}</span>`\n : nothing}\n </span>\n `\n : html`<slot></slot>`}\n\n </label>\n `;\n}"],"names":[],"mappings":";AAkBA,MAAM,WAAW;AAAA;AAAA;AAAA;AAAA;AAOjB,MAAM,SAAS;AAWR,SAAS,iBAAiB,OAA8C;AAC7E,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAMW,MAAM,OAAO;AAAA,0BACP,MAAM,aAAa;AAAA,qBACxB,MAAM,QAAQ;AAAA,iBAClB,MAAM,KAAK;AAAA,mBACT,MAAM,QAAQ;AAAA;AAAA;AAAA;AAAA,UAIvB,MAAM,gBAAgB,SAAS,QAAQ;AAAA;AAAA;AAAA,QAGzC,MAAM,SAAS,MAAM,WACnB;AAAA;AAAA,gBAEM,MAAM,QACJ,0CAA0C,MAAM,KAAK,YACrD,OAAO;AAAA,gBACT,MAAM,WACJ,yCAAyC,MAAM,QAAQ,YACvD,OAAO;AAAA;AAAA,cAGf,mBAAmB;AAAA;AAAA;AAAA;AAI7B;"}
package/dist/index291.js CHANGED
@@ -1,60 +1,5 @@
1
- import { html } from "lit";
2
- const removeSvg = html`
3
- <svg viewBox="0 0 256 256" fill="currentColor" aria-hidden="true">
4
- <path d="M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"/>
5
- </svg>`;
6
- function staticChip() {
7
- return html`
8
- <span class="chip" part="chip" role="note" tabindex="-1">
9
- <slot name="icon"></slot>
10
- <slot></slot>
11
- </span>`;
12
- }
13
- function toggleChip(ctx) {
14
- return html`
15
- <button
16
- class="chip-toggle"
17
- part="chip"
18
- role="checkbox"
19
- aria-checked="${ctx.selected}"
20
- aria-label="${ctx.ariaLabel}"
21
- @click="${() => ctx._handleToggle()}"
22
- @keydown="${(e) => {
23
- if (e.key === "Enter" || e.key === " ") {
24
- e.preventDefault();
25
- ctx._handleToggle();
26
- }
27
- }}"
28
- >
29
- <slot name="icon"></slot>
30
- <slot></slot>
31
- </button>`;
32
- }
33
- function inputChip(ctx) {
34
- return html`
35
- <span class="chip-input" part="chip">
36
- <slot name="avatar"></slot>
37
- <slot name="icon"></slot>
38
- <slot></slot>
39
- <button
40
- class="chip-remove"
41
- part="remove"
42
- type="button"
43
- aria-label="Eliminar ${ctx.ariaLabel || ""}"
44
- @click="${(e) => ctx._handleRemove(e)}"
45
- >
46
- ${removeSvg}
47
- </button>
48
- </span>`;
49
- }
50
- function chipTemplate(ctx) {
51
- if (ctx.kind === "toggle") return toggleChip(ctx);
52
- if (ctx.kind === "input") return inputChip(ctx);
53
- return staticChip(
54
- /*ctx*/
55
- );
56
- }
1
+ const checkboxCss = '@layer tokens,reset,components;@layer reset{:host{display:inline-block}*,*:before,*:after{box-sizing:border-box}}@layer components{.checkbox{display:inline-flex;align-items:flex-start;gap:var(--lib-space-sm);cursor:pointer;-webkit-user-select:none;user-select:none}:host([disabled]) .checkbox{cursor:not-allowed;opacity:.4;pointer-events:none}.checkbox__input{-webkit-appearance:none;-moz-appearance:none;appearance:none;position:absolute;width:0;height:0;margin:0;opacity:0;pointer-events:none}.checkbox__box{width:18px;height:18px;flex-shrink:0;margin-top:2px;border:1px solid var(--border-default);background:var(--bg-elevated);border-radius:var(--radius-sm);display:flex;align-items:center;justify-content:center;transition:background var(--duration-fast) var(--ease-default),border-color var(--duration-fast) var(--ease-default),box-shadow var(--duration-base) var(--ease-default)}.checkbox:hover .checkbox__box{border-color:var(--border-strong)}.checkbox__input:focus-visible~.checkbox__box,.checkbox:focus-within .checkbox__box{box-shadow:0 0 0 3px var(--color-ink-20);border-color:var(--color-washi-700)}:host([checked]) .checkbox__box{background:var(--color-washi-900);border-color:var(--color-washi-900)}:host([indeterminate]) .checkbox__box{background:var(--color-washi-900);border-color:var(--color-washi-900)}.checkbox__check{width:10px;height:10px;stroke:#fff;stroke-width:2.5;fill:none;stroke-linecap:round;stroke-linejoin:round;opacity:0;transform:scale(.6);transition:opacity var(--duration-fast) var(--ease-out),transform var(--duration-base) var(--ease-bounce)}:host([checked]) .checkbox__check{opacity:1;transform:scale(1)}.checkbox__dash{width:8px;height:2px;background:#fff;border-radius:1px;opacity:0;transform:scaleX(.4);transition:opacity var(--duration-fast) var(--ease-out),transform var(--duration-base) var(--ease-bounce)}:host([indeterminate]) .checkbox__dash{opacity:1;transform:scaleX(1)}.checkbox__label{display:flex;flex-direction:column;gap:var(--lib-space-xs)}.checkbox__label-text{font-family:var(--lib-font-body);font-size:var(--text-base);color:var(--text-primary);line-height:var(--leading-snug);transition:color var(--duration-fast)}.checkbox__label-sub{font-family:var(--lib-font-mono);font-size:var(--text-xs);letter-spacing:var(--tracking-wide);color:var(--text-muted);line-height:var(--leading-snug)}:host([size="sm"]) .checkbox__box{width:14px;height:14px}:host([size="sm"]) .checkbox__check{width:8px;height:8px;stroke-width:2.5}:host([size="sm"]) .checkbox__dash{width:6px;height:1.5px}:host([size="sm"]) .checkbox__label-text{font-size:var(--text-sm)}:host([size="lg"]) .checkbox__box{width:22px;height:22px}:host([size="lg"]) .checkbox__check{width:13px;height:13px}:host([size="lg"]) .checkbox__dash{width:10px;height:2.5px}:host([size="lg"]) .checkbox__label-text{font-size:var(--text-md)}:host([variant="kaki"][checked]) .checkbox__box,:host([variant="kaki"][indeterminate]) .checkbox__box{background:var(--color-kaki-500);border-color:var(--color-kaki-500)}:host([variant="kaki"]) .checkbox:hover .checkbox__box{border-color:var(--color-kaki-400)}:host([variant="kaki"]) .checkbox:focus-within .checkbox__box{box-shadow:0 0 0 3px #6d4d3e1f;border-color:var(--color-kaki-500)}:host([variant="error"]) .checkbox__box{border-color:var(--color-error)}:host([variant="error"]) .checkbox:hover .checkbox__box{border-color:var(--color-error)}:host([variant="error"]) .checkbox__label-text{color:var(--color-error)}@media(prefers-reduced-motion:reduce){.checkbox__box,.checkbox__check,.checkbox__dash{transition:none}}}';
57
2
  export {
58
- chipTemplate
3
+ checkboxCss as default
59
4
  };
60
5
  //# sourceMappingURL=index291.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index291.js","sources":["../src/components/molecules/chip/lib-chip.html.ts"],"sourcesContent":["import { html, TemplateResult } from 'lit';\nimport type { LibChip } from './lib-chip.component';\n\n/* SVG × para el botón de eliminar */\nconst removeSvg: TemplateResult = html`\n <svg viewBox=\"0 0 256 256\" fill=\"currentColor\" aria-hidden=\"true\">\n <path d=\"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z\"/>\n </svg>`;\n\n/* ── Familia STATIC ── */\nfunction staticChip(/*ctx: LibChip*/): TemplateResult {\n return html`\n <span class=\"chip\" part=\"chip\" role=\"note\" tabindex=\"-1\">\n <slot name=\"icon\"></slot>\n <slot></slot>\n </span>`;\n}\n\n/* ── Familia TOGGLE ── */\nfunction toggleChip(ctx: LibChip): TemplateResult {\n return html`\n <button\n class=\"chip-toggle\"\n part=\"chip\"\n role=\"checkbox\"\n aria-checked=\"${ctx.selected}\"\n aria-label=\"${ctx.ariaLabel}\"\n @click=\"${(): void => ctx._handleToggle()}\"\n @keydown=\"${(e: KeyboardEvent): void => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n ctx._handleToggle();\n }\n }}\"\n >\n <slot name=\"icon\"></slot>\n <slot></slot>\n </button>`;\n}\n\n/* ── Familia INPUT (removable) ── */\nfunction inputChip(ctx: LibChip): TemplateResult {\n return html`\n <span class=\"chip-input\" part=\"chip\">\n <slot name=\"avatar\"></slot>\n <slot name=\"icon\"></slot>\n <slot></slot>\n <button\n class=\"chip-remove\"\n part=\"remove\"\n type=\"button\"\n aria-label=\"Eliminar ${ctx.ariaLabel || ''}\"\n @click=\"${(e: MouseEvent): void => ctx._handleRemove(e)}\"\n >\n ${removeSvg}\n </button>\n </span>`;\n}\n\nexport function chipTemplate(ctx: LibChip): TemplateResult {\n if (ctx.kind === 'toggle') return toggleChip(ctx);\n if (ctx.kind === 'input') return inputChip(ctx);\n return staticChip(/*ctx*/);\n}"],"names":[],"mappings":";AAIA,MAAM,YAA4B;AAAA;AAAA;AAAA;AAMlC,SAAS,aAA6C;AACpD,SAAO;AAAA;AAAA;AAAA;AAAA;AAKT;AAGA,SAAS,WAAW,KAA8B;AAChD,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA,sBAKa,IAAI,QAAQ;AAAA,oBACd,IAAI,SAAS;AAAA,gBACjB,MAAY,IAAI,eAAe;AAAA,kBAC7B,CAAC,MAA2B;AACtC,QAAI,EAAE,QAAQ,WAAW,EAAE,QAAQ,KAAK;AACtC,QAAE,eAAA;AACF,UAAI,cAAA;AAAA,IACN;AAAA,EACF,CAAC;AAAA;AAAA;AAAA;AAAA;AAKP;AAGA,SAAS,UAAU,KAA8B;AAC/C,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,+BASsB,IAAI,aAAa,EAAE;AAAA,kBAChC,CAAC,MAAwB,IAAI,cAAc,CAAC,CAAC;AAAA;AAAA,UAErD,SAAS;AAAA;AAAA;AAGnB;AAEO,SAAS,aAAa,KAA8B;AACzD,MAAI,IAAI,SAAS,SAAU,QAAO,WAAW,GAAG;AAChD,MAAI,IAAI,SAAS,QAAU,QAAO,UAAU,GAAG;AAC/C,SAAO;AAAA;AAAA,EAAA;AACT;"}
1
+ {"version":3,"file":"index291.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
package/dist/index292.js CHANGED
@@ -1,5 +1,27 @@
1
- const chipCss = '@layer tokens,reset,components;@layer reset{:host{display:inline-flex;vertical-align:middle}*,*:before,*:after{box-sizing:border-box}button{font:inherit;background:none;border:none;padding:0;margin:0;cursor:pointer}}@layer components{.chip,.chip-toggle,.chip-input{display:inline-flex;align-items:center;gap:var(--lib-space-xs);font-family:var(--lib-font-mono);font-size:var(--text-xs);letter-spacing:var(--tracking-wide);line-height:1;white-space:nowrap;-webkit-user-select:none;user-select:none;border-radius:9999px;transition:background var(--duration-base) var(--ease-out),border-color var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out),transform var(--duration-fast)}.chip{padding:4px var(--lib-space-sm);background:var(--color-washi-100);color:var(--text-secondary);border:1px solid var(--border-subtle);cursor:default}.chip-toggle{padding:5px var(--lib-space-md);background:var(--bg-elevated);color:var(--text-secondary);border:1px solid var(--border-default);cursor:pointer;position:relative;overflow:hidden}.chip-toggle:hover{border-color:var(--border-strong);color:var(--text-primary);background:var(--bg-surface)}.chip-toggle:active{transform:scale(.96)}.chip-toggle:focus-visible{outline:2px solid var(--color-kaki-400);outline-offset:2px}:host([selected]) .chip-toggle{background:var(--color-washi-900);border-color:var(--color-washi-900);color:var(--color-washi-50);box-shadow:var(--shadow-sm)}.chip-input{padding:4px 4px 4px var(--lib-space-sm);background:var(--bg-elevated);color:var(--text-secondary);border:1px solid var(--border-default);gap:var(--lib-space-sm)}.chip-remove{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:9999px;border:none;background:transparent;color:var(--text-muted);cursor:pointer;font-size:12px;padding:0;flex-shrink:0;transition:background var(--duration-fast),color var(--duration-fast)}.chip-remove:hover{background:var(--color-washi-200);color:var(--text-primary)}.chip-remove svg{width:10px;height:10px}.chip-input.is-entering{animation:chip-enter .25s var(--ease-bounce)}@keyframes chip-enter{0%{opacity:0;transform:scale(.7)}to{opacity:1;transform:scale(1)}}.chip-input.is-removing{animation:chip-remove-anim .2s var(--ease-out) forwards}@keyframes chip-remove-anim{to{opacity:0;transform:scale(.8);max-width:0;padding:0;margin:0;border-width:0}}:host([size="xs"]) .chip{font-size:9px;padding:2px var(--lib-space-sm);letter-spacing:.04em}:host([size="xs"]) .chip-toggle{font-size:9px;padding:3px var(--lib-space-sm);letter-spacing:.04em}:host([size="xs"]) .chip-input{font-size:9px;padding:2px 2px 2px var(--lib-space-sm)}:host([size="xs"]) .chip-remove{width:14px;height:14px;font-size:10px}:host([size="xs"]) .chip-avatar{width:14px;height:14px;font-size:7px}:host([size="sm"]) .chip{font-size:10px;padding:3px var(--lib-space-sm)}:host([size="sm"]) .chip-toggle{font-size:10px;padding:4px var(--lib-space-sm)}:host([size="sm"]) .chip-input{font-size:10px;padding:3px 3px 3px var(--lib-space-sm)}:host([size="lg"]) .chip{font-size:var(--text-sm);padding:var(--lib-space-sm) var(--lib-space-md);letter-spacing:var(--tracking-wider)}:host([size="lg"]) .chip-toggle{font-size:var(--text-sm);padding:var(--lib-space-sm) var(--lib-space-md);letter-spacing:var(--tracking-wider)}:host([size="lg"]) .chip-input{font-size:var(--text-sm);padding:var(--lib-space-sm) var(--lib-space-sm) var(--lib-space-sm) var(--lib-space-md)}:host([size="lg"]) .chip-remove{width:22px;height:22px;font-size:14px}:host([size="lg"]) .chip-avatar{width:22px;height:22px;font-size:9px}:host([color="kaki"]) .chip{background:var(--color-kaki-50);color:var(--color-kaki-600);border-color:var(--color-kaki-100)}:host([color="kaki"]) .chip-toggle:not(.chip-toggle-selected){background:var(--color-kaki-50);color:var(--color-kaki-600);border-color:var(--color-kaki-100)}:host([color="kaki"]) .chip-toggle:hover:not([selected]){border-color:var(--color-kaki-400)}:host([color="kaki"][selected]) .chip-toggle{background:var(--color-kaki-500);border-color:var(--color-kaki-500);color:#fff}:host([color="kaki"]) .chip-input{background:var(--color-kaki-50);color:var(--color-kaki-600);border-color:var(--color-kaki-100)}:host([color="kaki"]) .chip-remove:hover{background:var(--color-kaki-100);color:var(--color-kaki-600)}:host([color="celadon"]) .chip{background:var(--color-celadon-100);color:var(--color-celadon-600);border-color:var(--color-celadon-100)}:host([color="celadon"]) .chip-toggle{background:var(--color-celadon-50);color:var(--color-celadon-600);border-color:var(--color-celadon-100)}:host([color="celadon"][selected]) .chip-toggle{background:var(--color-celadon-500);border-color:var(--color-celadon-500);color:#fff}:host([color="celadon"]) .chip-input{background:var(--color-celadon-50);color:var(--color-celadon-600);border-color:var(--color-celadon-100)}:host([color="celadon"]) .chip-remove:hover{background:var(--color-celadon-100);color:var(--color-celadon-600)}:host([color="error"]) .chip,:host([color="error"]) .chip-input{background:var(--color-error-light);color:var(--color-error);border-color:var(--color-error-light)}:host([color="error"]) .chip-remove:hover{background:#ebc5bf;color:var(--color-error)}:host([color="info"]) .chip{background:var(--color-info-light, #D6E8F5);color:var(--color-info, #1A4A6E);border-color:var(--color-info-light, #D6E8F5)}:host([color="dark"]) .chip{background:var(--color-washi-900);color:var(--color-washi-300);border-color:var(--color-washi-800)}:host([color="dark"]) .chip-toggle{background:var(--color-washi-800);color:var(--color-washi-300);border-color:var(--color-washi-700)}:host([color="dark"]) .chip-toggle:hover{border-color:var(--color-washi-500);color:var(--color-washi-100)}:host([color="dark"][selected]) .chip-toggle{background:var(--color-washi-50);border-color:var(--color-washi-50);color:var(--color-washi-950)}:host([color="dark"]) .chip-input{background:var(--color-washi-800);color:var(--color-washi-300);border-color:var(--color-washi-700)}:host([color="dark"]) .chip-remove:hover{background:var(--color-washi-700);color:var(--color-washi-100)}:host([dot]) .chip:before,:host([dot]) .chip-toggle:before,:host([dot]) .chip-input:before{content:"";width:6px;height:6px;border-radius:9999px;background:currentcolor;flex-shrink:0;opacity:.7}.chip-avatar{width:18px;height:18px;border-radius:9999px;object-fit:cover;flex-shrink:0;background:var(--color-washi-200);display:inline-flex;align-items:center;justify-content:center;font-size:8px;font-family:var(--lib-font-mono);color:var(--text-secondary);overflow:hidden}.chip-icon{font-size:13px;display:inline-flex;align-items:center;flex-shrink:0;opacity:.7}.chip-icon svg{width:1em;height:1em}}';
1
+ import { html } from "lit";
2
+ const ICON_SIZE = {
3
+ sm: "xs",
4
+ md: "sm",
5
+ lg: "sm",
6
+ xl: "md"
7
+ };
8
+ function closeButtonTemplate(props) {
9
+ return html`
10
+ <button
11
+ type="button"
12
+ class="close-btn"
13
+ aria-label="${props.ariaLabel}"
14
+ ?disabled="${props.disabled}"
15
+ @click="${props.onClick}"
16
+ >
17
+ <lib-icon
18
+ name="${props.icon}"
19
+ size="${ICON_SIZE[props.size]}"
20
+ ></lib-icon>
21
+ </button>
22
+ `;
23
+ }
2
24
  export {
3
- chipCss as default
25
+ closeButtonTemplate
4
26
  };
5
27
  //# sourceMappingURL=index292.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index292.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
1
+ {"version":3,"file":"index292.js","sources":["../src/components/atoms/close-button/lib-close-button.html.ts"],"sourcesContent":["import { html, TemplateResult } from 'lit';\n\nexport type LibCloseVariant =\n | 'ghost'\n | 'subtle'\n | 'outlined'\n | 'filled'\n | 'filled-round'\n | 'danger'\n | 'on-dark';\n\nexport type LibCloseSize = 'sm' | 'md' | 'lg' | 'xl';\nexport type LibCloseIcon = 'x' | 'x-circle' | 'x-square';\n\n/** Maps component size → lib-icon size prop */\nconst ICON_SIZE: Record<LibCloseSize, string> = {\n sm: 'xs',\n md: 'sm',\n lg: 'sm',\n xl: 'md',\n};\n\nexport interface CloseButtonTemplateProps {\n variant: LibCloseVariant;\n size: LibCloseSize;\n icon: LibCloseIcon;\n disabled: boolean;\n ariaLabel: string;\n onClick: (e: Event) => void;\n}\n\n/**\n * Plantilla para lib-close-button.\n *\n * Renderiza un <button> con lib-icon interno.\n * La variante y el tamaño se aplican via :host() selectors en CSS.\n */\nexport function closeButtonTemplate(props: CloseButtonTemplateProps): TemplateResult {\n return html`\n <button\n type=\"button\"\n class=\"close-btn\"\n aria-label=\"${props.ariaLabel}\"\n ?disabled=\"${props.disabled}\"\n @click=\"${props.onClick}\"\n >\n <lib-icon\n name=\"${props.icon}\"\n size=\"${ICON_SIZE[props.size]}\"\n ></lib-icon>\n </button>\n `;\n}"],"names":[],"mappings":";AAeA,MAAM,YAA0C;AAAA,EAC9C,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAiBO,SAAS,oBAAoB,OAAiD;AACnF,SAAO;AAAA;AAAA;AAAA;AAAA,oBAIW,MAAM,SAAS;AAAA,mBAChB,MAAM,QAAQ;AAAA,gBACjB,MAAM,OAAO;AAAA;AAAA;AAAA,gBAGb,MAAM,IAAI;AAAA,gBACV,UAAU,MAAM,IAAI,CAAC;AAAA;AAAA;AAAA;AAIrC;"}
package/dist/index293.js CHANGED
@@ -1,5 +1,5 @@
1
- const uploaderCss = "@layer tokens,reset,components;@layer reset{*,*:before,*:after{box-sizing:border-box}:host{display:block}}@layer components{.fu-root{display:flex;flex-direction:column;width:100%}.fu-zone{position:relative;border:1.5px dashed var(--border-default);background:var(--bg-elevated);padding:var(--lib-space-xl) var(--lib-space-lg);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--lib-space-md);text-align:center;cursor:pointer;transition:border-color var(--duration-base) var(--ease-out),background var(--duration-base) var(--ease-out),transform var(--duration-fast);width:100%}.fu-zone input[type=file]{position:absolute;top:0;right:0;bottom:0;left:0;opacity:0;cursor:pointer;width:100%;height:100%}.fu-zone:hover{border-color:var(--border-strong);background:var(--bg-surface)}.fu-zone.is-dragover{border-color:var(--color-kaki-400);background:var(--color-kaki-50);transform:scale(1.005)}.fu-zone.is-disabled{opacity:.45;cursor:not-allowed;pointer-events:none}.fu-zone-icon{font-size:40px;color:var(--text-muted);line-height:1;display:flex;transition:color var(--duration-base),transform var(--duration-slow) var(--ease-bounce)}.fu-zone:hover .fu-zone-icon,.fu-zone.is-dragover .fu-zone-icon{color:var(--color-kaki-400);transform:translateY(-3px) scale(1.08)}.fu-zone-title{font-family:var(--lib-font-display);font-size:var(--text-xl);font-weight:var(--weight-light);letter-spacing:var(--tracking-tight);color:var(--text-primary)}.fu-zone-sub{font-family:var(--lib-font-mono);font-size:var(--text-xs);letter-spacing:var(--tracking-wider);color:var(--text-muted);text-transform:uppercase}.fu-zone-sub span{color:var(--color-kaki-500);text-decoration:underline;text-underline-offset:2px}.fu-zone-hint{font-family:var(--lib-font-mono);font-size:10px;letter-spacing:var(--tracking-wide);color:var(--text-muted);margin-top:var(--lib-space-xs)}.fu-zone-sm{position:relative;border:1px dashed var(--border-default);background:var(--bg-elevated);padding:var(--lib-space-md) var(--lib-space-md);display:flex;align-items:center;gap:var(--lib-space-md);cursor:pointer;transition:border-color var(--duration-base) var(--ease-out),background var(--duration-base) var(--ease-out);width:100%}.fu-zone-sm input[type=file]{position:absolute;top:0;right:0;bottom:0;left:0;opacity:0;cursor:pointer;width:100%;height:100%}.fu-zone-sm:hover,.fu-zone-sm.is-dragover{border-color:var(--color-kaki-400);background:var(--color-kaki-50)}.fu-zone-sm.is-disabled{opacity:.45;cursor:not-allowed;pointer-events:none}.fu-zone-sm-icon{font-size:22px;color:var(--text-muted);flex-shrink:0;display:flex;transition:color var(--duration-base)}.fu-zone-sm:hover .fu-zone-sm-icon,.fu-zone-sm.is-dragover .fu-zone-sm-icon{color:var(--color-kaki-400)}.fu-zone-sm-text{display:flex;flex-direction:column;gap:2px}.fu-zone-sm-title{font-family:var(--lib-font-mono);font-size:var(--text-xs);letter-spacing:var(--tracking-wider);color:var(--text-secondary);text-transform:uppercase}.fu-zone-sm-sub{font-family:var(--lib-font-mono);font-size:10px;color:var(--text-muted);letter-spacing:var(--tracking-wide)}.fu-zone-img{position:relative;border:1.5px dashed var(--border-default);background:var(--bg-surface);width:100%;aspect-ratio:16 / 7;overflow:hidden;cursor:pointer;transition:border-color var(--duration-base) var(--ease-out),background var(--duration-base) var(--ease-out);display:flex;align-items:center;justify-content:center;flex-direction:column;gap:var(--lib-space-sm)}.fu-zone-img input[type=file]{position:absolute;top:0;right:0;bottom:0;left:0;opacity:0;cursor:pointer;width:100%;height:100%}.fu-zone-img:hover{border-color:var(--border-strong)}.fu-zone-img.is-dragover{border-color:var(--color-kaki-400);background:var(--color-kaki-50)}.fu-zone-img.is-disabled{opacity:.45;cursor:not-allowed;pointer-events:none}.fu-zone-img-placeholder{display:flex;flex-direction:column;align-items:center;gap:var(--lib-space-sm);pointer-events:none}.fu-zone-img-preview{position:absolute;top:0;right:0;bottom:0;left:0;object-fit:cover;width:100%;height:100%;display:none}.fu-zone-img.has-preview .fu-zone-img-preview{display:block}.fu-zone-img.has-preview .fu-zone-img-placeholder{display:none}.fu-zone-img-overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:#221c1680;display:flex;align-items:center;justify-content:center;gap:var(--lib-space-sm);opacity:0;transition:opacity var(--duration-base);pointer-events:none}.fu-zone-img.has-preview:hover .fu-zone-img-overlay{opacity:1}.fu-zone-img-overlay-text{font-family:var(--lib-font-mono);font-size:var(--text-xs);letter-spacing:var(--tracking-wider);text-transform:uppercase;color:var(--color-white)}.fu-progress-bar{height:2px;background:var(--border-subtle);width:100%;overflow:hidden;margin-top:-1px}.fu-progress-fill{height:100%;background:var(--color-kaki-400);transition:width 80ms linear}.fu-list{display:flex;flex-direction:column;gap:1px;width:100%}.fu-file{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:var(--lib-space-md);padding:var(--lib-space-md) var(--lib-space-md);background:var(--bg-elevated);border:1px solid var(--border-subtle);position:relative;overflow:hidden;transition:background var(--duration-base);animation:fu-slide-in .25s var(--ease-out)}.fu-file:hover{background:var(--bg-surface)}.fu-file-prog-bg{position:absolute;left:0;top:0;bottom:0;background:var(--color-kaki-50);transition:width 80ms linear;pointer-events:none;z-index:0}.fu-file>*{position:relative;z-index:1}.fu-file-icon{width:36px;height:36px;display:flex;align-items:center;justify-content:center;font-size:20px;color:var(--text-muted);background:var(--bg-surface);border:1px solid var(--border-subtle);flex-shrink:0;transition:color var(--duration-base),background var(--duration-base)}.fu-file.is-done .fu-file-icon{color:var(--color-celadon-500);background:var(--color-celadon-50);border-color:var(--color-celadon-100)}.fu-file.is-error .fu-file-icon{color:var(--color-error);background:#fff8f7;border-color:#f5c4bc}.fu-ext{font-family:var(--lib-font-mono);font-size:8px;letter-spacing:.04em;text-transform:uppercase;font-weight:600}.fu-file-thumb{width:36px;height:36px;object-fit:cover;flex-shrink:0;border:1px solid var(--border-subtle);display:block}.fu-file-meta{display:flex;flex-direction:column;gap:2px;min-width:0}.fu-file-name{font-family:var(--lib-font-mono);font-size:var(--text-xs);letter-spacing:var(--tracking-wide);color:var(--text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.fu-file-info{font-family:var(--lib-font-mono);font-size:10px;letter-spacing:var(--tracking-wide);color:var(--text-muted);display:flex;align-items:center;gap:var(--lib-space-sm)}.fu-file-info-sep{width:3px;height:3px;border-radius:var(--radius-full);background:var(--color-washi-300);flex-shrink:0}.fu-file-actions{display:flex;align-items:center;gap:var(--lib-space-sm);flex-shrink:0}.fu-file-pct{font-family:var(--lib-font-mono);font-size:10px;letter-spacing:var(--tracking-wide);color:var(--color-kaki-500);min-width:28px;text-align:right}.fu-status-done{color:var(--color-celadon-500);font-size:18px;display:flex}.fu-status-error{color:var(--color-error);font-size:18px;display:flex}.fu-file-remove{width:28px;height:28px;display:flex;align-items:center;justify-content:center;font-size:14px;color:var(--text-muted);background:transparent;border:none;cursor:pointer;border-radius:var(--radius-full);transition:background var(--duration-fast),color var(--duration-fast);flex-shrink:0}.fu-file-remove:hover{background:var(--color-washi-200);color:var(--text-primary)}.fu-file.is-error .fu-file-remove:hover{background:#fff8f7;color:var(--color-error)}.fu-summary{display:flex;align-items:center;justify-content:space-between;padding:var(--lib-space-sm) var(--lib-space-md);background:var(--bg-surface);border:1px solid var(--border-subtle);border-top:none}.fu-summary-text{font-family:var(--lib-font-mono);font-size:10px;letter-spacing:var(--tracking-wide);color:var(--text-muted)}.fu-summary-btn{font-family:var(--lib-font-mono);font-size:10px;letter-spacing:var(--tracking-wider);text-transform:uppercase;background:var(--color-washi-900);color:var(--color-washi-50);border:none;padding:var(--lib-space-sm) var(--lib-space-md);cursor:pointer;transition:background var(--duration-base)}.fu-summary-btn:hover{background:var(--color-washi-800)}.fu-summary-btn:disabled{opacity:.38;cursor:not-allowed}.fu-spinner{width:16px;height:16px;border:2px solid var(--color-washi-200);border-top-color:var(--color-kaki-400);border-radius:var(--radius-full);animation:fu-spin .7s linear infinite;flex-shrink:0}@keyframes fu-slide-in{0%{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}@keyframes fu-spin{to{transform:rotate(360deg)}}}";
1
+ const closeButtonCss = '@layer tokens,reset,components;@layer reset{:host{display:inline-flex;flex-shrink:0}*,*:before,*:after{box-sizing:border-box}}@layer components{.close-btn{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;background:transparent;padding:0;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;position:relative;color:var(--text-muted);line-height:1;outline:none;transition:color var(--duration-fast) var(--ease-default),background var(--duration-base) var(--ease-default),border-color var(--duration-base) var(--ease-default),transform var(--duration-base) var(--ease-bounce),opacity var(--duration-base)}.close-btn:disabled{opacity:.35;pointer-events:none;cursor:not-allowed}.close-btn:focus-visible{box-shadow:0 0 0 3px var(--color-ink-20)}:host([size="sm"]) .close-btn{width:24px;height:24px}:host([size="md"]) .close-btn{width:32px;height:32px}:host([size="lg"]) .close-btn{width:40px;height:40px}:host([size="xl"]) .close-btn{width:48px;height:48px}:host([variant="ghost"]) .close-btn{color:var(--text-muted);border-radius:var(--radius-sm)}:host([variant="ghost"]) .close-btn:hover{color:var(--text-primary);background:var(--color-washi-200)}:host([variant="ghost"]) .close-btn:active{transform:scale(.88)}:host([variant="subtle"]) .close-btn{color:var(--text-secondary);border-radius:var(--radius-full)}:host([variant="subtle"]) .close-btn:hover{color:var(--text-primary);background:var(--color-washi-200);transform:rotate(90deg)}:host([variant="subtle"]) .close-btn:active{transform:rotate(90deg) scale(.88);background:var(--color-washi-300)}:host([variant="outlined"]) .close-btn{color:var(--text-secondary);border:1px solid var(--border-default);border-radius:var(--radius-sm)}:host([variant="outlined"]) .close-btn:hover{color:var(--text-primary);background:var(--bg-surface);border-color:var(--border-strong)}:host([variant="outlined"]) .close-btn:active{transform:scale(.9)}:host([variant="filled"]) .close-btn{color:var(--bg-elevated);background:var(--color-washi-800);border-radius:var(--radius-sm)}:host([variant="filled"]) .close-btn:hover{background:var(--color-washi-900);transform:scale(1.05)}:host([variant="filled"]) .close-btn:active{transform:scale(.9)}:host([variant="filled-round"]) .close-btn{color:var(--bg-elevated);background:var(--color-washi-800);border-radius:var(--radius-full)}:host([variant="filled-round"]) .close-btn:hover{background:var(--color-washi-900);transform:rotate(90deg) scale(1.08)}:host([variant="filled-round"]) .close-btn:active{transform:rotate(90deg) scale(.9)}:host([variant="danger"]) .close-btn{color:var(--color-error);border-radius:var(--radius-sm)}:host([variant="danger"]) .close-btn:hover{color:var(--color-error);background:#651f241a}:host([variant="danger"]) .close-btn:active{transform:scale(.88)}:host([variant="danger"]) .close-btn:focus-visible{box-shadow:0 0 0 3px #651f2426}:host([variant="on-dark"]) .close-btn{color:#ffffff73;border-radius:var(--radius-full)}:host([variant="on-dark"]) .close-btn:hover{color:#ffffffe6;background:#ffffff1a;transform:rotate(90deg)}:host([variant="on-dark"]) .close-btn:active{transform:rotate(90deg) scale(.88)}:host([variant="on-dark"]) .close-btn:focus-visible{box-shadow:0 0 0 3px #fff3}@media(prefers-reduced-motion:reduce){.close-btn{transition:none}}}';
2
2
  export {
3
- uploaderCss as default
3
+ closeButtonCss as default
4
4
  };
5
5
  //# sourceMappingURL=index293.js.map