@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/index4.js CHANGED
@@ -1,8 +1,7 @@
1
1
  import { unsafeCSS, css, LitElement } from "lit";
2
- import { property, state, customElement } from "lit/decorators.js";
3
- import "./index22.js";
4
- import { copyButtonTemplate } from "./index194.js";
5
- import copyButtonCss from "./index195.js";
2
+ import { property, customElement } from "lit/decorators.js";
3
+ import { accordionItemTemplate } from "./index265.js";
4
+ import accordionItemCss from "./index266.js";
6
5
  import sharedTokens from "./index196.js";
7
6
  var __defProp = Object.defineProperty;
8
7
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -14,101 +13,44 @@ var __decorateClass = (decorators, target, key, kind) => {
14
13
  if (kind && result) __defProp(target, key, result);
15
14
  return result;
16
15
  };
17
- const COPIED_DURATION = 1800;
18
- let LibCopyButton = class extends LitElement {
16
+ let LibAccordionItem = class extends LitElement {
19
17
  constructor() {
20
18
  super(...arguments);
21
- this._resetTimer = null;
22
- this.value = "";
23
- this.variant = "ghost";
24
- this.size = "md";
25
- this.iconOnly = false;
26
- this.label = "Copiar";
27
- this.successLabel = "Copiado";
28
- this.tooltip = false;
29
- this.disabled = false;
30
- this._copied = false;
19
+ this.label = "";
20
+ this.open = false;
31
21
  }
32
- /** Refleja _copied como atributo para que los selectores CSS :host([copied]) funcionen */
33
- updated(changed) {
34
- if (changed.has("_copied")) {
35
- this.toggleAttribute("copied", this._copied);
36
- }
37
- }
38
- disconnectedCallback() {
39
- super.disconnectedCallback();
40
- if (this._resetTimer) clearTimeout(this._resetTimer);
41
- }
42
- async _handleClick() {
43
- if (!this.value || this.disabled || this._copied) return;
44
- try {
45
- await navigator.clipboard.writeText(this.value);
46
- this._copied = true;
47
- this.dispatchEvent(
48
- new CustomEvent("lib-copy", {
49
- detail: { value: this.value },
50
- bubbles: true,
51
- composed: true
52
- })
53
- );
54
- if (this._resetTimer) clearTimeout(this._resetTimer);
55
- this._resetTimer = setTimeout(() => {
56
- this._copied = false;
57
- }, COPIED_DURATION);
58
- } catch (err) {
59
- console.error("[lib-copy-button] Error al copiar:", err);
60
- }
22
+ _handleToggle() {
23
+ this.open = !this.open;
24
+ this.dispatchEvent(
25
+ new CustomEvent("accordion-toggle", {
26
+ bubbles: true,
27
+ composed: true,
28
+ detail: { open: this.open }
29
+ })
30
+ );
61
31
  }
62
32
  render() {
63
- return copyButtonTemplate({
64
- value: this.value,
65
- variant: this.variant,
66
- size: this.size,
67
- iconOnly: this.iconOnly,
33
+ return accordionItemTemplate({
68
34
  label: this.label,
69
- successLabel: this.successLabel,
70
- tooltip: this.tooltip,
71
- copied: this._copied,
72
- disabled: this.disabled,
73
- onClick: this._handleClick.bind(this)
35
+ open: this.open,
36
+ onToggle: this._handleToggle.bind(this)
74
37
  });
75
38
  }
76
39
  };
77
- LibCopyButton.styles = [
40
+ LibAccordionItem.styles = [
78
41
  css`${unsafeCSS(sharedTokens)}`,
79
- css`${unsafeCSS(copyButtonCss)}`
42
+ css`${unsafeCSS(accordionItemCss)}`
80
43
  ];
81
44
  __decorateClass([
82
45
  property({ type: String })
83
- ], LibCopyButton.prototype, "value", 2);
84
- __decorateClass([
85
- property({ type: String, reflect: true })
86
- ], LibCopyButton.prototype, "variant", 2);
87
- __decorateClass([
88
- property({ type: String, reflect: true })
89
- ], LibCopyButton.prototype, "size", 2);
90
- __decorateClass([
91
- property({ type: Boolean, reflect: true, attribute: "icon-only" })
92
- ], LibCopyButton.prototype, "iconOnly", 2);
93
- __decorateClass([
94
- property({ type: String })
95
- ], LibCopyButton.prototype, "label", 2);
96
- __decorateClass([
97
- property({ type: String, attribute: "success-label" })
98
- ], LibCopyButton.prototype, "successLabel", 2);
46
+ ], LibAccordionItem.prototype, "label", 2);
99
47
  __decorateClass([
100
48
  property({ type: Boolean, reflect: true })
101
- ], LibCopyButton.prototype, "tooltip", 2);
102
- __decorateClass([
103
- property({ type: Boolean, reflect: true })
104
- ], LibCopyButton.prototype, "disabled", 2);
105
- __decorateClass([
106
- state()
107
- ], LibCopyButton.prototype, "_copied", 2);
108
- LibCopyButton = __decorateClass([
109
- customElement("lib-copy-button")
110
- ], LibCopyButton);
49
+ ], LibAccordionItem.prototype, "open", 2);
50
+ LibAccordionItem = __decorateClass([
51
+ customElement("lib-accordion-item")
52
+ ], LibAccordionItem);
111
53
  export {
112
- LibCopyButton
54
+ LibAccordionItem
113
55
  };
114
56
  //# sourceMappingURL=index4.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index4.js","sources":["../src/components/atoms/copy-button/lib-copy-button.component.ts"],"sourcesContent":["import { LitElement, css, unsafeCSS, TemplateResult } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport '../../atoms/icon/lib-icon.component';\nimport type { LibCopyVariant, LibCopySize } from './lib-copy-button.html';\nimport { copyButtonTemplate } from './lib-copy-button.html';\nimport copyButtonCss from './lib-copy-button.css?inline';\nimport sharedTokens from '../../../styles/shared/tokens.css?inline';\n\n/** Tiempo en ms que el estado copiado permanece activo */\nconst COPIED_DURATION = 1800;\n\n/**\n * @element lib-copy-button\n *\n * Boton que copia texto al portapapeles y confirma la accion\n * con un checkmark animado (crossfade idle/copied con ease-bounce).\n *\n * @fires lib-copy - Emitido al copiar con exito. detail: { value: string }\n *\n * @example\n * <lib-copy-button value=\"npm install @shibui-ui/ui\"></lib-copy-button>\n * <lib-copy-button value=\"sk-ant-api03-xyz\" variant=\"outlined\" tooltip></lib-copy-button>\n * <lib-copy-button value=\"copy me\" variant=\"ghost\" icon-only size=\"sm\"></lib-copy-button>\n */\n@customElement('lib-copy-button')\nexport class LibCopyButton extends LitElement {\n static override styles = [\n css`${unsafeCSS(sharedTokens)}`,\n css`${unsafeCSS(copyButtonCss)}`,\n ];\n\n private _resetTimer: ReturnType<typeof setTimeout> | null = null;\n\n /** Texto que se copia al portapapeles */\n @property({ type: String })\n value = '';\n\n /** Variante visual */\n @property({ type: String, reflect: true })\n variant: LibCopyVariant = 'ghost';\n\n /** Tamaño */\n @property({ type: String, reflect: true })\n size: LibCopySize = 'md';\n\n /** Modo icono-solo (sin label, cuadrado) */\n @property({ type: Boolean, reflect: true, attribute: 'icon-only' })\n iconOnly = false;\n\n /** Label en estado idle */\n @property({ type: String })\n label = 'Copiar';\n\n /** Label en estado copiado */\n @property({ type: String, attribute: 'success-label' })\n successLabel = 'Copiado';\n\n /** Muestra un tooltip \"Copiado\" al copiar */\n @property({ type: Boolean, reflect: true })\n tooltip = false;\n\n /** Estado deshabilitado */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /** Estado interno — activa el crossfade y el tooltip */\n @state()\n private _copied = false;\n\n /** Refleja _copied como atributo para que los selectores CSS :host([copied]) funcionen */\n override updated(changed: Map<string, unknown>): void {\n if (changed.has('_copied')) {\n this.toggleAttribute('copied', this._copied);\n }\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n if (this._resetTimer) clearTimeout(this._resetTimer);\n }\n\n private async _handleClick(): Promise<void> {\n if (!this.value || this.disabled || this._copied) return;\n\n try {\n await navigator.clipboard.writeText(this.value);\n this._copied = true;\n\n this.dispatchEvent(\n new CustomEvent('lib-copy', {\n detail: { value: this.value },\n bubbles: true,\n composed: true,\n })\n );\n\n if (this._resetTimer) clearTimeout(this._resetTimer);\n this._resetTimer = setTimeout(() => {\n this._copied = false;\n }, COPIED_DURATION);\n\n } catch (err) {\n console.error('[lib-copy-button] Error al copiar:', err);\n }\n }\n\n override render(): TemplateResult {\n return copyButtonTemplate({\n value: this.value,\n variant: this.variant,\n size: this.size,\n iconOnly: this.iconOnly,\n label: this.label,\n successLabel: this.successLabel,\n tooltip: this.tooltip,\n copied: this._copied,\n disabled: this.disabled,\n onClick: this._handleClick.bind(this),\n });\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'lib-copy-button': LibCopyButton;\n }\n}"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"index4.js","sources":["../src/components/atoms/accordion-item/lib-accordion-item.component.ts"],"sourcesContent":["import { LitElement, css, unsafeCSS, TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { accordionItemTemplate } from './lib-accordion-item.component.html';\nimport accordionItemCss from './lib-accordion-item.css?inline';\nimport sharedTokens from '../../../styles/shared/tokens.css?inline';\n\n/**\n * @element lib-accordion-item\n *\n * Item colapsable individual. Puede usarse standalone o dentro de lib-accordion.\n * El padre lib-accordion orquesta el comportamiento mutually-exclusive y\n * aplica variantes (flush, separated, accent) via CSS custom properties.\n *\n * @slot - Contenido colapsable\n *\n * @fires accordion-toggle - Emitido al hacer clic en el trigger.\n * detail: { open: boolean }\n *\n * @example\n * <lib-accordion-item label=\"Pregunta\" open>\n * Respuesta detallada aqui.\n * </lib-accordion-item>\n */\n@customElement('lib-accordion-item')\nexport class LibAccordionItem extends LitElement {\n static override styles = [\n css`${unsafeCSS(sharedTokens)}`,\n css`${unsafeCSS(accordionItemCss)}`,\n ];\n\n /** Texto del trigger (cabecera del item) */\n @property({ type: String })\n label = '';\n\n /** Estado abierto/cerrado */\n @property({ type: Boolean, reflect: true })\n open = false;\n\n private _handleToggle(): void {\n this.open = !this.open;\n\n this.dispatchEvent(\n new CustomEvent<{ open: boolean }>('accordion-toggle', {\n bubbles: true,\n composed: true,\n detail: { open: this.open },\n })\n );\n }\n\n override render(): TemplateResult {\n return accordionItemTemplate({\n label: this.label,\n open: this.open,\n onToggle: this._handleToggle.bind(this),\n });\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'lib-accordion-item': LibAccordionItem;\n }\n}"],"names":[],"mappings":";;;;;;;;;;;;;;;AAwBO,IAAM,mBAAN,cAA+B,WAAW;AAAA,EAA1C,cAAA;AAAA,UAAA,GAAA,SAAA;AAQL,SAAA,QAAQ;AAIR,SAAA,OAAO;AAAA,EAAA;AAAA,EAEC,gBAAsB;AAC5B,SAAK,OAAO,CAAC,KAAK;AAElB,SAAK;AAAA,MACH,IAAI,YAA+B,oBAAoB;AAAA,QACrD,SAAS;AAAA,QACT,UAAU;AAAA,QACV,QAAQ,EAAE,MAAM,KAAK,KAAA;AAAA,MAAK,CAC3B;AAAA,IAAA;AAAA,EAEL;AAAA,EAES,SAAyB;AAChC,WAAO,sBAAsB;AAAA,MAC3B,OAAO,KAAK;AAAA,MACZ,MAAM,KAAK;AAAA,MACX,UAAU,KAAK,cAAc,KAAK,IAAI;AAAA,IAAA,CACvC;AAAA,EACH;AACF;AAjCa,iBACK,SAAS;AAAA,EACvB,MAAM,UAAU,YAAY,CAAC;AAAA,EAC7B,MAAM,UAAU,gBAAgB,CAAC;AACnC;AAIA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GAPf,iBAQX,WAAA,SAAA,CAAA;AAIA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,SAAS,SAAS,MAAM;AAAA,GAX/B,iBAYX,WAAA,QAAA,CAAA;AAZW,mBAAN,gBAAA;AAAA,EADN,cAAc,oBAAoB;AAAA,GACtB,gBAAA;"}
package/dist/index40.js CHANGED
@@ -1,9 +1,6 @@
1
- import { unsafeCSS, css, LitElement } from "lit";
2
- import { property, query, customElement } from "lit/decorators.js";
3
- import backgroundCss from "./index265.js";
4
- import sharedTokens from "./index196.js";
5
- import { backgroundTemplate } from "./index266.js";
6
- import { BG_CANVAS_VARIANTS } from "./index267.js";
1
+ import { css, LitElement, html } from "lit";
2
+ import { property, customElement } from "lit/decorators.js";
3
+ import { styleMap as o } from "./index267.js";
7
4
  var __defProp = Object.defineProperty;
8
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
9
6
  var __decorateClass = (decorators, target, key, kind) => {
@@ -14,409 +11,38 @@ var __decorateClass = (decorators, target, key, kind) => {
14
11
  if (kind && result) __defProp(target, key, result);
15
12
  return result;
16
13
  };
17
- let LibBackground = class extends LitElement {
14
+ let LibSpacer = class extends LitElement {
18
15
  constructor() {
19
16
  super(...arguments);
20
- this.variant = "washi";
21
- this.paused = false;
22
- this._raf = 0;
23
- this._ro = null;
17
+ this.size = "md";
18
+ this.horizontal = false;
24
19
  }
25
- /* ── Ciclo de vida ── */
26
- disconnectedCallback() {
27
- super.disconnectedCallback();
28
- this._stopCanvas();
29
- }
30
- updated(changed) {
31
- if (changed.has("variant")) {
32
- this._stopCanvas();
33
- if (BG_CANVAS_VARIANTS.has(this.variant)) {
34
- requestAnimationFrame(() => this._startCanvas());
35
- }
36
- }
37
- }
38
- /* ── Canvas lifecycle ── */
39
- _stopCanvas() {
40
- if (this._raf) {
41
- cancelAnimationFrame(this._raf);
42
- this._raf = 0;
43
- }
44
- if (this._ro) {
45
- this._ro.disconnect();
46
- this._ro = null;
47
- }
48
- }
49
- _startCanvas() {
50
- const canvas = this._canvas;
51
- if (!canvas) return;
52
- switch (this.variant) {
53
- case "particles":
54
- this._initParticles(canvas);
55
- break;
56
- case "rain":
57
- this._initRain(canvas);
58
- break;
59
- case "wave-mesh":
60
- this._initWaveMesh(canvas);
61
- break;
62
- case "constellation":
63
- this._initConstellation(canvas);
64
- break;
65
- case "fireflies":
66
- this._initFireflies(canvas);
67
- break;
68
- case "ink-wash":
69
- this._initInkWash(canvas);
70
- break;
71
- }
72
- }
73
- /* ── Canvas: Particle Field ── */
74
- _initParticles(canvas) {
75
- const ctx = canvas.getContext("2d");
76
- const host = this.renderRoot.host;
77
- let W = 0, H = 0;
78
- const COUNT = 55;
79
- const COLORS = ["rgba(217,114,52,", "rgba(78,148,130,", "rgba(250,247,244,"];
80
- let pts = [];
81
- const resize = () => {
82
- W = canvas.width = host.clientWidth;
83
- H = canvas.height = host.clientHeight;
84
- pts = Array.from({ length: COUNT }, () => ({
85
- x: Math.random() * W,
86
- y: Math.random() * H,
87
- r: Math.random() * 1.5 + 0.3,
88
- vx: (Math.random() - 0.5) * 0.25,
89
- vy: (Math.random() - 0.5) * 0.25,
90
- a: Math.random() * 0.4 + 0.15,
91
- // ✅ Fix: COLORS es string[] → el acceso ya no devuelve undefined
92
- c: COLORS[Math.floor(Math.random() * COLORS.length)] ?? "rgba(250,247,244,"
93
- }));
94
- };
95
- const draw = () => {
96
- ctx.clearRect(0, 0, W, H);
97
- for (let i = 0; i < pts.length; i++) {
98
- for (let j = i + 1; j < pts.length; j++) {
99
- const pi = pts[i];
100
- const pj = pts[j];
101
- const dx = pi.x - pj.x;
102
- const dy = pi.y - pj.y;
103
- const d = Math.sqrt(dx * dx + dy * dy);
104
- if (d < 90) {
105
- ctx.beginPath();
106
- ctx.moveTo(pi.x, pi.y);
107
- ctx.lineTo(pj.x, pj.y);
108
- ctx.strokeStyle = `rgba(250,247,244,${0.04 * (1 - d / 90)})`;
109
- ctx.lineWidth = 0.5;
110
- ctx.stroke();
111
- }
112
- }
113
- }
114
- pts.forEach((p) => {
115
- ctx.beginPath();
116
- ctx.arc(p.x, p.y, p.r, 0, Math.PI * 2);
117
- ctx.fillStyle = `${p.c}${p.a})`;
118
- ctx.fill();
119
- p.x += p.vx;
120
- p.y += p.vy;
121
- if (p.x < 0 || p.x > W) p.vx *= -1;
122
- if (p.y < 0 || p.y > H) p.vy *= -1;
123
- });
124
- this._raf = requestAnimationFrame(draw);
125
- };
126
- this._ro = new ResizeObserver(resize);
127
- this._ro.observe(host);
128
- resize();
129
- draw();
130
- }
131
- _initFireflies(canvas) {
132
- const ctx = canvas.getContext("2d");
133
- const host = this.renderRoot.host;
134
- let W = 0, H = 0;
135
- const COUNT = 32;
136
- const COLORS = [
137
- "rgba(250,247,244,",
138
- "rgba(250,247,244,",
139
- "rgba(217,114,52,",
140
- "rgba(78,148,130,"
141
- ];
142
- let flies = [];
143
- const resize = () => {
144
- W = canvas.width = host.clientWidth;
145
- H = canvas.height = host.clientHeight;
146
- flies = Array.from({ length: COUNT }, () => ({
147
- x: Math.random() * W,
148
- y: Math.random() * H,
149
- r: Math.random() * 2 + 0.8,
150
- a: Math.random(),
151
- da: (Math.random() * 8e-3 + 3e-3) * (Math.random() > 0.5 ? 1 : -1),
152
- dx: (Math.random() - 0.5) * 0.18,
153
- dy: -(Math.random() * 0.25 + 0.08),
154
- phase: Math.random() * Math.PI * 2,
155
- col: COLORS[Math.floor(Math.random() * COLORS.length)] ?? "rgba(250,247,244,"
156
- }));
157
- };
158
- const draw = () => {
159
- ctx.fillStyle = "rgba(8,6,4,0.14)";
160
- ctx.fillRect(0, 0, W, H);
161
- flies.forEach((f) => {
162
- f.phase += 0.018;
163
- f.a += f.da;
164
- if (f.a > 1 || f.a < 0) {
165
- f.da *= -1;
166
- f.a = Math.max(0, Math.min(1, f.a));
167
- }
168
- f.x += f.dx + Math.sin(f.phase) * 0.28;
169
- f.y += f.dy;
170
- if (f.y < -10) {
171
- f.y = H + 10;
172
- f.x = Math.random() * W;
173
- }
174
- if (f.x < -10) f.x = W + 10;
175
- if (f.x > W + 10) f.x = -10;
176
- const grd = ctx.createRadialGradient(f.x, f.y, 0, f.x, f.y, f.r * 5);
177
- grd.addColorStop(0, `${f.col}${f.a * 0.85})`);
178
- grd.addColorStop(1, `${f.col}0)`);
179
- ctx.beginPath();
180
- ctx.arc(f.x, f.y, f.r * 5, 0, Math.PI * 2);
181
- ctx.fillStyle = grd;
182
- ctx.fill();
183
- ctx.beginPath();
184
- ctx.arc(f.x, f.y, f.r, 0, Math.PI * 2);
185
- ctx.fillStyle = `${f.col}${f.a})`;
186
- ctx.fill();
187
- });
188
- this._raf = requestAnimationFrame(draw);
189
- };
190
- this._ro = new ResizeObserver(resize);
191
- this._ro.observe(host);
192
- resize();
193
- draw();
194
- }
195
- _initInkWash(canvas) {
196
- const ctx = canvas.getContext("2d");
197
- const host = this.renderRoot.host;
198
- let W = 0, H = 0, t = 0;
199
- let blobs = [];
200
- const resize = () => {
201
- W = canvas.width = host.clientWidth;
202
- H = canvas.height = host.clientHeight;
203
- const base = Math.min(W, H);
204
- blobs = [
205
- { cx: 0.28, cy: 0.42, r: base * 0.24, speed: 1, offset: 0, color: "rgba(175,150,120,0.07)" },
206
- { cx: 0.68, cy: 0.58, r: base * 0.2, speed: 1.3, offset: 1.2, color: "rgba(155,135,108,0.06)" },
207
- { cx: 0.5, cy: 0.28, r: base * 0.17, speed: 0.7, offset: 2.5, color: "rgba(184,90,30,0.04)" },
208
- { cx: 0.18, cy: 0.72, r: base * 0.15, speed: 1.1, offset: 3.8, color: "rgba(78,148,130,0.04)" },
209
- { cx: 0.82, cy: 0.32, r: base * 0.13, speed: 0.85, offset: 5, color: "rgba(175,150,120,0.05)" }
210
- ];
211
- };
212
- const drawBlob = (b) => {
213
- const pts = 44;
214
- const phase = t * b.speed + b.offset;
215
- ctx.beginPath();
216
- for (let i = 0; i <= pts; i++) {
217
- const angle = i / pts * Math.PI * 2;
218
- const noise = Math.sin(angle * 3 + phase) * b.r * 0.14 + Math.cos(angle * 2 - phase * 0.8) * b.r * 0.09 + Math.sin(angle * 5 + phase * 1.4) * b.r * 0.05;
219
- const x = b.cx * W + (b.r + noise) * Math.cos(angle);
220
- const y = b.cy * H + (b.r + noise) * Math.sin(angle);
221
- i === 0 ? ctx.moveTo(x, y) : ctx.lineTo(x, y);
222
- }
223
- ctx.closePath();
224
- ctx.fillStyle = b.color;
225
- ctx.fill();
226
- };
227
- const draw = () => {
228
- ctx.clearRect(0, 0, W, H);
229
- ctx.fillStyle = "#FAF7F4";
230
- ctx.fillRect(0, 0, W, H);
231
- blobs.forEach(drawBlob);
232
- t += 28e-4;
233
- this._raf = requestAnimationFrame(draw);
234
- };
235
- this._ro = new ResizeObserver(resize);
236
- this._ro.observe(host);
237
- resize();
238
- draw();
239
- }
240
- /* ── Canvas: Rain Lines ── */
241
- _initRain(canvas) {
242
- const ctx = canvas.getContext("2d");
243
- const host = this.renderRoot.host;
244
- let W = 0, H = 0;
245
- const COUNT = 40;
246
- let drops = [];
247
- const resize = () => {
248
- W = canvas.width = host.clientWidth;
249
- H = canvas.height = host.clientHeight;
250
- drops = Array.from({ length: COUNT }, () => ({
251
- x: Math.random() * W,
252
- y: Math.random() * H - H,
253
- len: Math.random() * 22 + 8,
254
- v: Math.random() * 1.8 + 0.8,
255
- a: Math.random() * 0.2 + 0.04,
256
- col: Math.random() > 0.85 ? "rgba(217,114,52," : "rgba(250,247,244,"
257
- }));
258
- };
259
- const draw = () => {
260
- ctx.fillStyle = "rgba(14,10,7,0.18)";
261
- ctx.fillRect(0, 0, W, H);
262
- drops.forEach((d) => {
263
- ctx.beginPath();
264
- ctx.moveTo(d.x, d.y);
265
- ctx.lineTo(d.x - d.len * 0.1, d.y + d.len);
266
- const g = ctx.createLinearGradient(d.x, d.y, d.x, d.y + d.len);
267
- g.addColorStop(0, `${d.col}0)`);
268
- g.addColorStop(0.5, `${d.col}${d.a})`);
269
- g.addColorStop(1, `${d.col}0)`);
270
- ctx.strokeStyle = g;
271
- ctx.lineWidth = 0.8;
272
- ctx.stroke();
273
- d.y += d.v;
274
- if (d.y > H + d.len) {
275
- d.y = -d.len;
276
- d.x = Math.random() * W;
277
- }
278
- });
279
- this._raf = requestAnimationFrame(draw);
280
- };
281
- this._ro = new ResizeObserver(resize);
282
- this._ro.observe(host);
283
- resize();
284
- draw();
285
- }
286
- /* ── Canvas: Wave Mesh ── */
287
- _initWaveMesh(canvas) {
288
- const ctx = canvas.getContext("2d");
289
- const host = this.renderRoot.host;
290
- let W = 0, H = 0, t = 0;
291
- const COLS = 16, ROWS = 10;
292
- const resize = () => {
293
- W = canvas.width = host.clientWidth;
294
- H = canvas.height = host.clientHeight;
295
- };
296
- const draw = () => {
297
- ctx.clearRect(0, 0, W, H);
298
- ctx.fillStyle = "#FAF7F4";
299
- ctx.fillRect(0, 0, W, H);
300
- const cw = W / (COLS - 1);
301
- const ch = H / (ROWS - 1);
302
- for (let r = 0; r < ROWS; r++) {
303
- ctx.beginPath();
304
- for (let c = 0; c < COLS; c++) {
305
- const wave = Math.sin((c / COLS + t) * Math.PI * 2) * 12 + Math.cos((r / ROWS + t * 0.7) * Math.PI * 2) * 8;
306
- const x = c * cw;
307
- const y = r * ch + wave;
308
- c === 0 ? ctx.moveTo(x, y) : ctx.lineTo(x, y);
309
- }
310
- ctx.strokeStyle = `rgba(160,140,118,${0.08 + Math.sin(r / ROWS * Math.PI) * 0.06})`;
311
- ctx.lineWidth = 0.8;
312
- ctx.stroke();
313
- }
314
- for (let c = 0; c < COLS; c++) {
315
- ctx.beginPath();
316
- for (let r = 0; r < ROWS; r++) {
317
- const wave = Math.sin((c / COLS + t) * Math.PI * 2) * 12 + Math.cos((r / ROWS + t * 0.7) * Math.PI * 2) * 8;
318
- const x = c * cw;
319
- const y = r * ch + wave;
320
- r === 0 ? ctx.moveTo(x, y) : ctx.lineTo(x, y);
321
- }
322
- ctx.strokeStyle = `rgba(160,140,118,${0.06 + Math.sin(c / COLS * Math.PI) * 0.04})`;
323
- ctx.lineWidth = 0.8;
324
- ctx.stroke();
325
- }
326
- t += 3e-3;
327
- this._raf = requestAnimationFrame(draw);
328
- };
329
- this._ro = new ResizeObserver(resize);
330
- this._ro.observe(host);
331
- resize();
332
- draw();
333
- }
334
- /* ── Canvas: Constellation ── */
335
- _initConstellation(canvas) {
336
- const ctx = canvas.getContext("2d");
337
- const host = this.renderRoot.host;
338
- let W = 0, H = 0;
339
- const COUNT = 70;
340
- let stars = [];
341
- const resize = () => {
342
- W = canvas.width = host.clientWidth;
343
- H = canvas.height = host.clientHeight;
344
- stars = Array.from({ length: COUNT }, () => ({
345
- x: Math.random() * W,
346
- y: Math.random() * H,
347
- r: Math.random() * 1.2 + 0.2,
348
- a: Math.random() * 0.5 + 0.1,
349
- pa: Math.random() * Math.PI * 2,
350
- ps: Math.random() * 8e-3 + 2e-3,
351
- col: Math.random() > 0.9 ? [217, 114, 52] : Math.random() > 0.85 ? [78, 148, 130] : [250, 247, 244]
352
- }));
353
- };
354
- const draw = () => {
355
- ctx.fillStyle = "rgba(10,8,6,0.22)";
356
- ctx.fillRect(0, 0, W, H);
357
- for (let i = 0; i < stars.length; i++) {
358
- for (let j = i + 1; j < stars.length; j++) {
359
- const si = stars[i];
360
- const sj = stars[j];
361
- const dx = si.x - sj.x;
362
- const dy = si.y - sj.y;
363
- const d = Math.sqrt(dx * dx + dy * dy);
364
- if (d < 110) {
365
- ctx.beginPath();
366
- ctx.moveTo(si.x, si.y);
367
- ctx.lineTo(sj.x, sj.y);
368
- ctx.strokeStyle = `rgba(250,247,244,${(1 - d / 110) * 0.07})`;
369
- ctx.lineWidth = 0.6;
370
- ctx.stroke();
371
- }
372
- }
373
- }
374
- stars.forEach((s) => {
375
- s.pa += s.ps;
376
- const pulse = Math.sin(s.pa) * 0.3 + 0.7;
377
- ctx.beginPath();
378
- ctx.arc(s.x, s.y, s.r * pulse, 0, Math.PI * 2);
379
- ctx.fillStyle = `rgba(${s.col.join(",")},${s.a * pulse})`;
380
- ctx.fill();
381
- if (s.a > 0.4) {
382
- ctx.beginPath();
383
- ctx.arc(s.x, s.y, s.r * 3 * pulse, 0, Math.PI * 2);
384
- ctx.fillStyle = `rgba(${s.col.join(",")},${s.a * 0.06 * pulse})`;
385
- ctx.fill();
386
- }
387
- });
388
- this._raf = requestAnimationFrame(draw);
389
- };
390
- this._ro = new ResizeObserver(resize);
391
- this._ro.observe(host);
392
- resize();
393
- draw();
394
- }
395
- /* ── Render ── */
396
20
  render() {
397
- return backgroundTemplate({
398
- variant: this.variant,
399
- isCanvas: BG_CANVAS_VARIANTS.has(this.variant)
400
- });
21
+ const spaceValue = `var(--lib-space-${this.size}, 16px)`;
22
+ const styles = this.horizontal ? { width: spaceValue, height: "100%" } : { height: spaceValue, width: "100%" };
23
+ return html`<div style=${o(styles)}></div>`;
401
24
  }
402
25
  };
403
- LibBackground.styles = [
404
- css`${unsafeCSS(sharedTokens)}`,
405
- css`${unsafeCSS(backgroundCss)}`
406
- ];
26
+ LibSpacer.styles = css`
27
+ :host {
28
+ display: block;
29
+ flex-shrink: 0;
30
+ flex-grow: 0;
31
+ }
32
+ :host([horizontal]) {
33
+ display: inline-block;
34
+ }
35
+ `;
407
36
  __decorateClass([
408
- property({ type: String, reflect: true })
409
- ], LibBackground.prototype, "variant", 2);
37
+ property({ type: String })
38
+ ], LibSpacer.prototype, "size", 2);
410
39
  __decorateClass([
411
40
  property({ type: Boolean, reflect: true })
412
- ], LibBackground.prototype, "paused", 2);
413
- __decorateClass([
414
- query(".bg-canvas")
415
- ], LibBackground.prototype, "_canvas", 2);
416
- LibBackground = __decorateClass([
417
- customElement("lib-background")
418
- ], LibBackground);
41
+ ], LibSpacer.prototype, "horizontal", 2);
42
+ LibSpacer = __decorateClass([
43
+ customElement("lib-spacer")
44
+ ], LibSpacer);
419
45
  export {
420
- LibBackground
46
+ LibSpacer
421
47
  };
422
48
  //# sourceMappingURL=index40.js.map