@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/index69.js CHANGED
@@ -1,8 +1,7 @@
1
1
  import { unsafeCSS, css, LitElement } from "lit";
2
- import { property, state, query, customElement } from "lit/decorators.js";
3
- import "./index22.js";
4
- import { sidebarTemplate } from "./index322.js";
5
- import componentCss from "./index323.js";
2
+ import { property, customElement } from "lit/decorators.js";
3
+ import { bentoGridTemplate } from "./index235.js";
4
+ import gridCss from "./index236.js";
6
5
  import sharedTokens from "./index196.js";
7
6
  var __defProp = Object.defineProperty;
8
7
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -14,174 +13,34 @@ var __decorateClass = (decorators, target, key, kind) => {
14
13
  if (kind && result) __defProp(target, key, result);
15
14
  return result;
16
15
  };
17
- let LibSidebar = class extends LitElement {
16
+ let LibBentoGrid = class extends LitElement {
18
17
  constructor() {
19
18
  super(...arguments);
20
- this.logoMark = "渋";
21
- this.brandName = "shibui";
22
- this.showSearch = false;
23
- this.searchPlaceholder = "Buscar…";
24
- this.links = [];
25
- this.active = "";
26
- this.userName = "";
27
- this.userRole = "";
28
- this.userAvatar = "";
29
- this.userInitials = "";
30
- this.showUserAction = false;
31
- this.variant = "dark";
32
- this.collapsed = false;
33
- this._mobileOpen = false;
19
+ this.columns = 4;
20
+ this.gap = "md";
21
+ this.rowHeight = "150px";
34
22
  }
35
- /* ── Lifecycle ── */
36
- updated(changed) {
37
- if (changed.has("active") || changed.has("links")) {
38
- this._moveIndicator();
39
- }
40
- }
41
- /* ── Render ── */
42
23
  render() {
43
- return sidebarTemplate({
44
- logoMark: this.logoMark,
45
- brandName: this.brandName,
46
- showSearch: this.showSearch,
47
- searchPlaceholder: this.searchPlaceholder,
48
- links: this.links,
49
- active: this.active,
50
- userName: this.userName,
51
- userRole: this.userRole,
52
- userAvatar: this.userAvatar,
53
- userInitials: this.userInitials,
54
- showUserAction: this.showUserAction,
55
- variant: this.variant,
56
- collapsed: this.collapsed,
57
- mobileOpen: this._mobileOpen,
58
- onLinkClick: this._handleLink.bind(this),
59
- onUserAction: this._handleUserAction.bind(this),
60
- onSearchInput: this._handleSearch.bind(this),
61
- onOverlayClick: () => {
62
- this._mobileOpen = false;
63
- },
64
- onToggleClick: () => {
65
- this._mobileOpen = !this._mobileOpen;
66
- }
67
- });
68
- }
69
- /* ── Sliding indicator ── */
70
- _moveIndicator() {
71
- requestAnimationFrame(() => {
72
- const nav = this._nav;
73
- const ind = this._indicator;
74
- if (!nav || !ind) return;
75
- const btn = nav.querySelector(".sb-link.is-active");
76
- if (!btn) {
77
- ind.classList.remove("visible");
78
- return;
79
- }
80
- const navTop = nav.getBoundingClientRect().top;
81
- const btnRect = btn.getBoundingClientRect();
82
- ind.style.top = `${btnRect.top - navTop + nav.scrollTop}px`;
83
- ind.style.height = `${btnRect.height}px`;
84
- ind.classList.add("visible");
85
- });
86
- }
87
- /* ── Handlers ── */
88
- _handleLink(id) {
89
- const previous = this.active;
90
- this.active = id;
91
- this.dispatchEvent(new CustomEvent("ui-lib-navigate", {
92
- detail: { id, previous },
93
- bubbles: true,
94
- composed: true
95
- }));
96
- if (this._mobileOpen) this._mobileOpen = false;
97
- }
98
- _handleUserAction() {
99
- this.dispatchEvent(new CustomEvent("ui-lib-user-action", {
100
- bubbles: true,
101
- composed: true
102
- }));
103
- }
104
- _handleSearch(query2) {
105
- this.dispatchEvent(new CustomEvent("ui-lib-search", {
106
- detail: { query: query2 },
107
- bubbles: true,
108
- composed: true
109
- }));
110
- }
111
- /* ── Public API ── */
112
- /** Alterna collapsed ↔ expanded. Llamar desde el botón hamburger de la topbar. */
113
- toggle() {
114
- this.collapsed = !this.collapsed;
115
- }
116
- /** Expande el sidebar */
117
- expand() {
118
- this.collapsed = false;
119
- }
120
- /** Colapsa el sidebar a icon rail */
121
- collapse() {
122
- this.collapsed = true;
123
- }
124
- /** Navega programáticamente */
125
- navigateTo(id) {
126
- this._handleLink(id);
24
+ return bentoGridTemplate(this);
127
25
  }
128
26
  };
129
- LibSidebar.styles = [
27
+ LibBentoGrid.styles = [
130
28
  css`${unsafeCSS(sharedTokens)}`,
131
- css`${unsafeCSS(componentCss)}`
29
+ css`${unsafeCSS(gridCss)}`
132
30
  ];
133
31
  __decorateClass([
134
- property({ type: String, attribute: "logo-mark" })
135
- ], LibSidebar.prototype, "logoMark", 2);
136
- __decorateClass([
137
- property({ type: String, attribute: "brand-name" })
138
- ], LibSidebar.prototype, "brandName", 2);
139
- __decorateClass([
140
- property({ type: Boolean, attribute: "show-search", reflect: true })
141
- ], LibSidebar.prototype, "showSearch", 2);
142
- __decorateClass([
143
- property({ type: String, attribute: "search-placeholder" })
144
- ], LibSidebar.prototype, "searchPlaceholder", 2);
145
- __decorateClass([
146
- property({ type: Array })
147
- ], LibSidebar.prototype, "links", 2);
148
- __decorateClass([
149
- property({ type: String, reflect: true })
150
- ], LibSidebar.prototype, "active", 2);
151
- __decorateClass([
152
- property({ type: String, attribute: "user-name" })
153
- ], LibSidebar.prototype, "userName", 2);
154
- __decorateClass([
155
- property({ type: String, attribute: "user-role" })
156
- ], LibSidebar.prototype, "userRole", 2);
157
- __decorateClass([
158
- property({ type: String, attribute: "user-avatar" })
159
- ], LibSidebar.prototype, "userAvatar", 2);
160
- __decorateClass([
161
- property({ type: String, attribute: "user-initials" })
162
- ], LibSidebar.prototype, "userInitials", 2);
163
- __decorateClass([
164
- property({ type: Boolean, attribute: "show-user-action" })
165
- ], LibSidebar.prototype, "showUserAction", 2);
166
- __decorateClass([
167
- property({ type: String, reflect: true })
168
- ], LibSidebar.prototype, "variant", 2);
169
- __decorateClass([
170
- property({ type: Boolean, reflect: true })
171
- ], LibSidebar.prototype, "collapsed", 2);
172
- __decorateClass([
173
- state()
174
- ], LibSidebar.prototype, "_mobileOpen", 2);
32
+ property({ type: Number })
33
+ ], LibBentoGrid.prototype, "columns", 2);
175
34
  __decorateClass([
176
- query(".sb-indicator")
177
- ], LibSidebar.prototype, "_indicator", 2);
35
+ property({ type: String })
36
+ ], LibBentoGrid.prototype, "gap", 2);
178
37
  __decorateClass([
179
- query(".sb-nav")
180
- ], LibSidebar.prototype, "_nav", 2);
181
- LibSidebar = __decorateClass([
182
- customElement("lib-sidebar")
183
- ], LibSidebar);
38
+ property({ type: String, attribute: "row-height" })
39
+ ], LibBentoGrid.prototype, "rowHeight", 2);
40
+ LibBentoGrid = __decorateClass([
41
+ customElement("lib-bento-grid")
42
+ ], LibBentoGrid);
184
43
  export {
185
- LibSidebar
44
+ LibBentoGrid
186
45
  };
187
46
  //# sourceMappingURL=index69.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index69.js","sources":["../src/components/organisms/sidebar/lib-sidebar.component.ts"],"sourcesContent":["import { LitElement, css, unsafeCSS, TemplateResult } from 'lit';\nimport { customElement, property, state, query } from 'lit/decorators.js';\nimport '../../atoms/icon/lib-icon.component';\nimport type { SidebarLink } from '../../../types';\nimport { sidebarTemplate } from './lib-sidebar.html';\nimport componentCss from './lib-sidebar.css?inline';\nimport sharedTokens from '../../../styles/shared/tokens.css?inline';\nimport { SidebarVariant } from './lib-sidebar.types';\n\nexport interface UiSidebarNavigateDetail {\n id: string;\n previous: string;\n}\n\n/**\n * lib-sidebar — Shibui UI · SG-65\n *\n * Estructura: Header(56px logo) · [Search] · Nav · User footer\n *\n * @prop logo-mark — Carácter del logo mark (default '渋')\n * @prop brand-name — Nombre de marca (default 'shibui')\n * @prop show-search — Muestra la barra de búsqueda\n * @prop search-placeholder — Placeholder del input de búsqueda\n * @prop links — Array de SidebarLink[]\n * @prop active — ID del link activo\n * @prop user-name — Nombre del usuario en el footer\n * @prop user-role — Rol/plan del usuario\n * @prop user-avatar — URL de imagen del avatar\n * @prop user-initials — Iniciales de fallback\n * @prop show-user-action — Muestra el botón de acción (logout icon)\n * @prop variant — 'dark'(default) | 'light' | 'kintsugi' | 'glitch'\n * @prop collapsed — Estado inicial colapsado\n *\n * @method toggle() — Alterna collapsed/expanded (llamar desde topbar)\n * @method navigateTo() — Navega programáticamente a un id\n *\n * @fires ui-lib-navigate — { id, previous }\n * @fires ui-lib-user-action — void (clic en botón de acción)\n * @fires ui-lib-search — { query: string }\n */\n@customElement('lib-sidebar')\nexport class LibSidebar extends LitElement {\n static override styles = [\n css`${unsafeCSS(sharedTokens)}`,\n css`${unsafeCSS(componentCss)}`,\n ];\n\n /* ── Header ── */\n @property({ type: String, attribute: 'logo-mark' })\n logoMark = '渋';\n\n @property({ type: String, attribute: 'brand-name' })\n brandName = 'shibui';\n\n /* ── Search ── */\n @property({ type: Boolean, attribute: 'show-search', reflect: true })\n showSearch = false;\n\n @property({ type: String, attribute: 'search-placeholder' })\n searchPlaceholder = 'Buscar…';\n\n /* ── Nav ── */\n @property({ type: Array })\n links: SidebarLink[] = [];\n\n @property({ type: String, reflect: true })\n active = '';\n\n /* ── User footer ── */\n @property({ type: String, attribute: 'user-name' })\n userName = '';\n\n @property({ type: String, attribute: 'user-role' })\n userRole = '';\n\n @property({ type: String, attribute: 'user-avatar' })\n userAvatar = '';\n\n @property({ type: String, attribute: 'user-initials' })\n userInitials = '';\n\n @property({ type: Boolean, attribute: 'show-user-action' })\n showUserAction = false;\n\n /* ── Variant & behavior ── */\n @property({ type: String, reflect: true })\n variant: SidebarVariant = 'dark';\n\n @property({ type: Boolean, reflect: true })\n collapsed = false;\n\n /* ── Internal state ── */\n @state() private _mobileOpen = false;\n\n /* ── Queries ── */\n @query('.sb-indicator') declare private _indicator: HTMLElement;\n @query('.sb-nav') declare private _nav: HTMLElement;\n\n /* ── Lifecycle ── */\n override updated(changed: Map<string, unknown>): void {\n if (changed.has('active') || changed.has('links')) {\n this._moveIndicator();\n }\n }\n\n /* ── Render ── */\n override render(): TemplateResult {\n return sidebarTemplate({\n logoMark: this.logoMark,\n brandName: this.brandName,\n showSearch: this.showSearch,\n searchPlaceholder: this.searchPlaceholder,\n links: this.links,\n active: this.active,\n userName: this.userName,\n userRole: this.userRole,\n userAvatar: this.userAvatar,\n userInitials: this.userInitials,\n showUserAction: this.showUserAction,\n variant: this.variant,\n collapsed: this.collapsed,\n mobileOpen: this._mobileOpen,\n onLinkClick: this._handleLink.bind(this),\n onUserAction: this._handleUserAction.bind(this),\n onSearchInput: this._handleSearch.bind(this),\n onOverlayClick: () => { this._mobileOpen = false; },\n onToggleClick: () => { this._mobileOpen = !this._mobileOpen; },\n });\n }\n\n /* ── Sliding indicator ── */\n private _moveIndicator(): void {\n requestAnimationFrame(() => {\n const nav = this._nav;\n const ind = this._indicator;\n if (!nav || !ind) return;\n\n const btn = nav.querySelector<HTMLElement>('.sb-link.is-active');\n if (!btn) { ind.classList.remove('visible'); return; }\n\n const navTop = nav.getBoundingClientRect().top;\n const btnRect = btn.getBoundingClientRect();\n\n ind.style.top = `${btnRect.top - navTop + nav.scrollTop}px`;\n ind.style.height = `${btnRect.height}px`;\n ind.classList.add('visible');\n });\n }\n\n /* ── Handlers ── */\n private _handleLink(id: string): void {\n const previous = this.active;\n this.active = id;\n this.dispatchEvent(new CustomEvent<UiSidebarNavigateDetail>('ui-lib-navigate', {\n detail: { id, previous },\n bubbles: true, composed: true,\n }));\n if (this._mobileOpen) this._mobileOpen = false;\n }\n\n private _handleUserAction(): void {\n this.dispatchEvent(new CustomEvent('ui-lib-user-action', {\n bubbles: true, composed: true,\n }));\n }\n\n private _handleSearch(query: string): void {\n this.dispatchEvent(new CustomEvent('ui-lib-search', {\n detail: { query },\n bubbles: true, composed: true,\n }));\n }\n\n /* ── Public API ── */\n\n /** Alterna collapsed ↔ expanded. Llamar desde el botón hamburger de la topbar. */\n toggle(): void { this.collapsed = !this.collapsed; }\n\n /** Expande el sidebar */\n expand(): void { this.collapsed = false; }\n\n /** Colapsa el sidebar a icon rail */\n collapse(): void { this.collapsed = true; }\n\n /** Navega programáticamente */\n navigateTo(id: string): void { this._handleLink(id); }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'lib-sidebar': LibSidebar;\n }\n}"],"names":["query"],"mappings":";;;;;;;;;;;;;;;;AAyCO,IAAM,aAAN,cAAyB,WAAW;AAAA,EAApC,cAAA;AAAA,UAAA,GAAA,SAAA;AAQL,SAAA,WAAW;AAGX,SAAA,YAAY;AAIZ,SAAA,aAAa;AAGb,SAAA,oBAAoB;AAIpB,SAAA,QAAuB,CAAA;AAGvB,SAAA,SAAS;AAIT,SAAA,WAAW;AAGX,SAAA,WAAW;AAGX,SAAA,aAAa;AAGb,SAAA,eAAe;AAGf,SAAA,iBAAiB;AAIjB,SAAA,UAA0B;AAG1B,SAAA,YAAY;AAGH,SAAQ,cAAc;AAAA,EAAA;AAAA;AAAA,EAOtB,QAAQ,SAAqC;AACpD,QAAI,QAAQ,IAA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,GAvDL,WAuD6B,WAAA,QAAA,CAAA;AAvD7B,aAAN,gBAAA;AAAA,EADN,cAAc,aAAa;AAAA,GACf,UAAA;"}
1
+ {"version":3,"file":"index69.js","sources":["../src/components/organisms/bento-grid/lib-bento-grid.component.ts"],"sourcesContent":["import { LitElement, css, unsafeCSS, TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { bentoGridTemplate } from './lib-bento-grid.html';\nimport gridCss from './lib-bento-grid.css?inline';\nimport sharedTokens from '../../../styles/shared/tokens.css?inline';\nimport type { BentoGapSize } from './lib-bento-grid.types';\n\n/**\n * lib-bento-grid — Contenedor de rejilla tipo bento\n *\n * @prop columns — Número de columnas (default 4)\n * @prop gap — Espacio entre celdas: 'xs'|'sm'|'md'(default)|'lg'|'xl'\n * @prop row-height — Altura base de cada fila (default '150px')\n *\n * @slot — lib-bento-item elements\n */\n@customElement('lib-bento-grid')\nexport class LibBentoGrid extends LitElement {\n static override styles = [\n css`${unsafeCSS(sharedTokens)}`,\n css`${unsafeCSS(gridCss)}`,\n ];\n\n @property({ type: Number })\n columns = 4;\n\n @property({ type: String })\n gap: BentoGapSize = 'md';\n\n @property({ type: String, attribute: 'row-height' })\n rowHeight = '150px';\n\n protected override render(): TemplateResult {\n return bentoGridTemplate(this);\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'lib-bento-grid': LibBentoGrid;\n }\n}"],"names":[],"mappings":";;;;;;;;;;;;;;;AAiBO,IAAM,eAAN,cAA2B,WAAW;AAAA,EAAtC,cAAA;AAAA,UAAA,GAAA,SAAA;AAOL,SAAA,UAAU;AAGV,SAAA,MAAoB;AAGpB,SAAA,YAAY;AAAA,EAAA;AAAA,EAEO,SAAyB;AAC1C,WAAO,kBAAkB,IAAI;AAAA,EAC/B;AACF;AAlBa,aACK,SAAS;AAAA,EACvB,MAAM,UAAU,YAAY,CAAC;AAAA,EAC7B,MAAM,UAAU,OAAO,CAAC;AAC1B;AAGA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GANf,aAOX,WAAA,WAAA,CAAA;AAGA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GATf,aAUX,WAAA,OAAA,CAAA;AAGA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,WAAW,cAAc;AAAA,GAZxC,aAaX,WAAA,aAAA,CAAA;AAbW,eAAN,gBAAA;AAAA,EADN,cAAc,gBAAgB;AAAA,GAClB,YAAA;"}
package/dist/index7.js CHANGED
@@ -1,8 +1,9 @@
1
1
  import { unsafeCSS, css, LitElement } from "lit";
2
- import { property, customElement } from "lit/decorators.js";
3
- import { skeletonTemplate } from "./index201.js";
4
- import skeletonCss from "./index202.js";
2
+ import { property, query, customElement } from "lit/decorators.js";
3
+ import backgroundCss from "./index272.js";
5
4
  import sharedTokens from "./index196.js";
5
+ import { backgroundTemplate } from "./index273.js";
6
+ import { BG_CANVAS_VARIANTS } from "./index274.js";
6
7
  var __defProp = Object.defineProperty;
7
8
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8
9
  var __decorateClass = (decorators, target, key, kind) => {
@@ -13,48 +14,409 @@ var __decorateClass = (decorators, target, key, kind) => {
13
14
  if (kind && result) __defProp(target, key, result);
14
15
  return result;
15
16
  };
16
- let LibSkeleton = class extends LitElement {
17
+ let LibBackground = class extends LitElement {
17
18
  constructor() {
18
19
  super(...arguments);
19
- this.shape = "rect";
20
- this.animation = "shimmer";
21
- this.surface = "light";
22
- this.width = "100%";
23
- this.height = "";
20
+ this.variant = "washi";
21
+ this.paused = false;
22
+ this._raf = 0;
23
+ this._ro = null;
24
24
  }
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 ── */
25
396
  render() {
26
- return skeletonTemplate({
27
- shape: this.shape,
28
- animation: this.animation,
29
- surface: this.surface,
30
- width: this.width,
31
- height: this.height
397
+ return backgroundTemplate({
398
+ variant: this.variant,
399
+ isCanvas: BG_CANVAS_VARIANTS.has(this.variant)
32
400
  });
33
401
  }
34
402
  };
35
- LibSkeleton.styles = [
403
+ LibBackground.styles = [
36
404
  css`${unsafeCSS(sharedTokens)}`,
37
- css`${unsafeCSS(skeletonCss)}`
405
+ css`${unsafeCSS(backgroundCss)}`
38
406
  ];
39
407
  __decorateClass([
40
408
  property({ type: String, reflect: true })
41
- ], LibSkeleton.prototype, "shape", 2);
42
- __decorateClass([
43
- property({ type: String, reflect: true })
44
- ], LibSkeleton.prototype, "animation", 2);
45
- __decorateClass([
46
- property({ type: String, reflect: true })
47
- ], LibSkeleton.prototype, "surface", 2);
409
+ ], LibBackground.prototype, "variant", 2);
48
410
  __decorateClass([
49
- property({ type: String })
50
- ], LibSkeleton.prototype, "width", 2);
411
+ property({ type: Boolean, reflect: true })
412
+ ], LibBackground.prototype, "paused", 2);
51
413
  __decorateClass([
52
- property({ type: String })
53
- ], LibSkeleton.prototype, "height", 2);
54
- LibSkeleton = __decorateClass([
55
- customElement("lib-skeleton")
56
- ], LibSkeleton);
414
+ query(".bg-canvas")
415
+ ], LibBackground.prototype, "_canvas", 2);
416
+ LibBackground = __decorateClass([
417
+ customElement("lib-background")
418
+ ], LibBackground);
57
419
  export {
58
- LibSkeleton
420
+ LibBackground
59
421
  };
60
422
  //# sourceMappingURL=index7.js.map