@charde/core 0.0.4 → 0.0.5

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 (812) hide show
  1. package/dist/charde/charde.css +1775 -0
  2. package/dist/charde/charde.esm.js +1 -0
  3. package/dist/charde/index.esm.js +2 -0
  4. package/dist/charde/p-0194d6e2.entry.js +1 -0
  5. package/dist/charde/p-0268cd80.entry.js +1 -0
  6. package/dist/charde/p-03cd8b15.entry.js +1 -0
  7. package/dist/charde/p-04566ad1.entry.js +1 -0
  8. package/dist/charde/p-04d6bfd5.entry.js +1 -0
  9. package/dist/charde/p-066b15c3.entry.js +1 -0
  10. package/dist/charde/p-067ef228.entry.js +1 -0
  11. package/dist/charde/p-09424a11.entry.js +1 -0
  12. package/dist/charde/p-09aa135c.entry.js +1 -0
  13. package/dist/charde/p-09ebd779.entry.js +1 -0
  14. package/dist/charde/p-0d3074a3.entry.js +1 -0
  15. package/dist/charde/p-139e543c.entry.js +1 -0
  16. package/dist/charde/p-15afafb1.entry.js +1 -0
  17. package/dist/charde/p-17511150.entry.js +1 -0
  18. package/dist/charde/p-184bed27.entry.js +1 -0
  19. package/dist/charde/p-1e2849e0.entry.js +1 -0
  20. package/dist/charde/p-1f3760d6.entry.js +1 -0
  21. package/dist/charde/p-1f600e6b.entry.js +1 -0
  22. package/dist/charde/p-20670731.entry.js +1 -0
  23. package/dist/charde/p-222b8212.entry.js +1 -0
  24. package/dist/charde/p-224f260a.entry.js +1 -0
  25. package/dist/charde/p-22af325f.entry.js +1 -0
  26. package/dist/charde/p-24686bd8.entry.js +1 -0
  27. package/dist/charde/p-24da97c4.entry.js +1 -0
  28. package/dist/charde/p-24f49f2d.entry.js +1 -0
  29. package/dist/charde/p-2c612ca4.entry.js +1 -0
  30. package/dist/charde/p-2dbf1cb7.entry.js +1 -0
  31. package/dist/charde/p-2e41c51d.entry.js +1 -0
  32. package/dist/charde/p-3182d80c.entry.js +1 -0
  33. package/dist/charde/p-335c0fd8.entry.js +1 -0
  34. package/dist/charde/p-365e8679.entry.js +1 -0
  35. package/dist/charde/p-36b00f23.entry.js +1 -0
  36. package/dist/charde/p-36b25b8f.entry.js +1 -0
  37. package/dist/charde/p-3b08f29c.entry.js +1 -0
  38. package/dist/charde/p-3b5b48f3.entry.js +1 -0
  39. package/dist/charde/p-3bfba656.entry.js +1 -0
  40. package/dist/charde/p-3f2bd134.entry.js +1 -0
  41. package/dist/charde/p-40542282.entry.js +1 -0
  42. package/dist/charde/p-411df8a1.entry.js +1 -0
  43. package/dist/charde/p-41f93738.entry.js +1 -0
  44. package/dist/charde/p-480ca83c.entry.js +1 -0
  45. package/dist/charde/p-491913d3.entry.js +1 -0
  46. package/dist/charde/p-4b1f1b78.entry.js +1 -0
  47. package/dist/charde/p-4bfeda7f.entry.js +1 -0
  48. package/dist/charde/p-4c54d9ad.entry.js +1 -0
  49. package/dist/charde/p-4e177b89.entry.js +1 -0
  50. package/dist/charde/p-5261a835.entry.js +1 -0
  51. package/dist/charde/p-55d378a3.entry.js +1 -0
  52. package/dist/charde/p-6094c178.entry.js +1 -0
  53. package/dist/charde/p-60ca72dc.entry.js +1 -0
  54. package/dist/charde/p-62185de3.entry.js +1 -0
  55. package/dist/charde/p-62ee5694.entry.js +1 -0
  56. package/dist/charde/p-6340d5c0.entry.js +1 -0
  57. package/dist/charde/p-6429b7eb.entry.js +1 -0
  58. package/dist/charde/p-64338c8f.entry.js +1 -0
  59. package/dist/charde/p-6697ac70.entry.js +1 -0
  60. package/dist/charde/p-669bc008.entry.js +1 -0
  61. package/dist/charde/p-66dcfd9f.entry.js +1 -0
  62. package/dist/charde/p-69925849.entry.js +1 -0
  63. package/dist/charde/p-6b98dcdf.entry.js +1 -0
  64. package/dist/charde/p-6c6e0415.entry.js +1 -0
  65. package/dist/charde/p-6f253925.entry.js +1 -0
  66. package/dist/charde/p-6f53f078.entry.js +1 -0
  67. package/dist/charde/p-729e42e1.entry.js +1 -0
  68. package/dist/charde/p-74748c9a.entry.js +1 -0
  69. package/dist/charde/p-74e572a1.entry.js +1 -0
  70. package/dist/charde/p-76e192bf.entry.js +1 -0
  71. package/dist/charde/p-77841ee4.entry.js +1 -0
  72. package/dist/charde/p-780e7264.entry.js +1 -0
  73. package/dist/charde/p-791ff255.entry.js +1 -0
  74. package/dist/charde/p-7b3e7e84.entry.js +1 -0
  75. package/dist/charde/p-7b68153c.entry.js +1 -0
  76. package/dist/charde/p-7c759df9.entry.js +1 -0
  77. package/dist/charde/p-83dc677c.entry.js +1 -0
  78. package/dist/charde/p-85d001e2.entry.js +1 -0
  79. package/dist/charde/p-8eb2c3aa.entry.js +1 -0
  80. package/dist/charde/p-8ecb0f5b.entry.js +1 -0
  81. package/dist/charde/p-8f55275a.entry.js +1 -0
  82. package/dist/charde/p-91209ae9.entry.js +1 -0
  83. package/dist/charde/p-9680ffb6.entry.js +1 -0
  84. package/dist/charde/p-9695ef45.entry.js +1 -0
  85. package/dist/charde/p-996342d2.entry.js +1 -0
  86. package/dist/charde/p-9b4de166.entry.js +1 -0
  87. package/dist/charde/p-9e61fe0e.entry.js +1 -0
  88. package/dist/charde/p-DhW431pq.js +1 -0
  89. package/dist/charde/p-a23c8d7c.entry.js +1 -0
  90. package/dist/charde/p-a2cd0e39.entry.js +1 -0
  91. package/dist/charde/p-a36f9ca5.entry.js +1 -0
  92. package/dist/charde/p-a4bba299.entry.js +1 -0
  93. package/dist/charde/p-a7b721ba.entry.js +1 -0
  94. package/dist/charde/p-ae7bd699.entry.js +1 -0
  95. package/dist/charde/p-b4f6e083.entry.js +1 -0
  96. package/dist/charde/p-bc28f8f2.entry.js +1 -0
  97. package/dist/charde/p-bee2ade3.entry.js +1 -0
  98. package/dist/charde/p-bf1328b7.entry.js +1 -0
  99. package/dist/charde/p-c30125e4.entry.js +1 -0
  100. package/dist/charde/p-c4276924.entry.js +1 -0
  101. package/dist/charde/p-c7f679f7.entry.js +1 -0
  102. package/dist/charde/p-cb0a18c5.entry.js +1 -0
  103. package/dist/charde/p-cb75e2f2.entry.js +1 -0
  104. package/dist/charde/p-cd12f7a1.entry.js +1 -0
  105. package/dist/charde/p-ceb31adb.entry.js +1 -0
  106. package/dist/charde/p-cf7b84e1.entry.js +1 -0
  107. package/dist/charde/p-d11bbf41.entry.js +1 -0
  108. package/dist/charde/p-d33c2219.entry.js +1 -0
  109. package/dist/charde/p-d343b42e.entry.js +1 -0
  110. package/dist/charde/p-d38f5f34.entry.js +1 -0
  111. package/dist/charde/p-d87c8b54.entry.js +1 -0
  112. package/dist/charde/p-d922b748.entry.js +1 -0
  113. package/dist/charde/p-d9297726.entry.js +1 -0
  114. package/dist/charde/p-d97a17e5.entry.js +1 -0
  115. package/dist/charde/p-da780497.entry.js +1 -0
  116. package/dist/charde/p-dddaa989.entry.js +1 -0
  117. package/dist/charde/p-e0f3571b.entry.js +1 -0
  118. package/dist/charde/p-e1272c1d.entry.js +1 -0
  119. package/dist/charde/p-e2bb7798.entry.js +1 -0
  120. package/dist/charde/p-e5ce0025.entry.js +1 -0
  121. package/dist/charde/p-e637c524.entry.js +1 -0
  122. package/dist/charde/p-e86ed169.entry.js +1 -0
  123. package/dist/charde/p-eaf9bff6.entry.js +1 -0
  124. package/dist/charde/p-ecb5e2bc.entry.js +1 -0
  125. package/dist/charde/p-ed21e36a.entry.js +1 -0
  126. package/dist/charde/p-edfc4008.entry.js +1 -0
  127. package/dist/charde/p-eea31a17.entry.js +1 -0
  128. package/dist/charde/p-f073a6fd.entry.js +1 -0
  129. package/dist/charde/p-f3be7834.entry.js +1 -0
  130. package/dist/charde/p-fd5d233d.entry.js +1 -0
  131. package/dist/charde/p-fed01765.entry.js +1 -0
  132. package/dist/charde/p-ff14a778.entry.js +1 -0
  133. package/dist/charde/p-jZlebn0H.js +2 -0
  134. package/dist/cjs/charde.cjs.js +24 -0
  135. package/dist/cjs/chardes-alert-close-button.cjs.entry.js +23 -0
  136. package/dist/cjs/chardes-alert-content.cjs.entry.js +22 -0
  137. package/dist/cjs/chardes-alert-error.cjs.entry.js +21 -0
  138. package/dist/cjs/chardes-alert-header.cjs.entry.js +21 -0
  139. package/dist/cjs/chardes-alert-icon.cjs.entry.js +22 -0
  140. package/dist/cjs/chardes-alert-success.cjs.entry.js +21 -0
  141. package/dist/cjs/chardes-alert-title-container.cjs.entry.js +21 -0
  142. package/dist/cjs/chardes-alert-title.cjs.entry.js +22 -0
  143. package/dist/cjs/chardes-alert-warning.cjs.entry.js +21 -0
  144. package/dist/cjs/chardes-alerts.cjs.entry.js +21 -0
  145. package/dist/cjs/chardes-badge-close-button.cjs.entry.js +23 -0
  146. package/dist/cjs/chardes-badge-error.cjs.entry.js +22 -0
  147. package/dist/cjs/chardes-badge-group.cjs.entry.js +21 -0
  148. package/dist/cjs/chardes-badge-icon.cjs.entry.js +22 -0
  149. package/dist/cjs/chardes-badge-interactive-text.cjs.entry.js +22 -0
  150. package/dist/cjs/chardes-badge-interactive.cjs.entry.js +21 -0
  151. package/dist/cjs/chardes-badge-outline.cjs.entry.js +22 -0
  152. package/dist/cjs/chardes-badge-primary.cjs.entry.js +22 -0
  153. package/dist/cjs/chardes-badge-secondary.cjs.entry.js +22 -0
  154. package/dist/cjs/chardes-badge-success.cjs.entry.js +22 -0
  155. package/dist/cjs/chardes-badge-text.cjs.entry.js +22 -0
  156. package/dist/cjs/chardes-badge-warning.cjs.entry.js +22 -0
  157. package/dist/cjs/chardes-badge-with-icon.cjs.entry.js +21 -0
  158. package/dist/cjs/chardes-badge.cjs.entry.js +21 -0
  159. package/dist/cjs/chardes-button_4.cjs.entry.js +76 -0
  160. package/dist/cjs/chardes-card-body-action-button-1.cjs.entry.js +23 -0
  161. package/dist/cjs/chardes-card-body-action-button-2.cjs.entry.js +23 -0
  162. package/dist/cjs/chardes-card-body-action-icon-1.cjs.entry.js +22 -0
  163. package/dist/cjs/chardes-card-body-action-icon-2.cjs.entry.js +22 -0
  164. package/dist/cjs/chardes-card-body-actions.cjs.entry.js +21 -0
  165. package/dist/cjs/chardes-card-body-driver.cjs.entry.js +21 -0
  166. package/dist/cjs/chardes-card-body-img.cjs.entry.js +23 -0
  167. package/dist/cjs/chardes-card-body-info.cjs.entry.js +21 -0
  168. package/dist/cjs/chardes-card-body-name.cjs.entry.js +22 -0
  169. package/dist/cjs/chardes-card-body-span.cjs.entry.js +22 -0
  170. package/dist/cjs/chardes-card-body.cjs.entry.js +21 -0
  171. package/dist/cjs/chardes-card-container.cjs.entry.js +21 -0
  172. package/dist/cjs/chardes-card-header-content.cjs.entry.js +21 -0
  173. package/dist/cjs/chardes-card-header-timer.cjs.entry.js +22 -0
  174. package/dist/cjs/chardes-card-header-title.cjs.entry.js +22 -0
  175. package/dist/cjs/chardes-card-header.cjs.entry.js +21 -0
  176. package/dist/cjs/chardes-card-icon-container.cjs.entry.js +21 -0
  177. package/dist/cjs/chardes-card-number.cjs.entry.js +22 -0
  178. package/dist/cjs/chardes-card-payment-container.cjs.entry.js +21 -0
  179. package/dist/cjs/chardes-card-payment-content.cjs.entry.js +21 -0
  180. package/dist/cjs/chardes-card-payment-details.cjs.entry.js +21 -0
  181. package/dist/cjs/chardes-card-payment-icon-container.cjs.entry.js +21 -0
  182. package/dist/cjs/chardes-card-payment.cjs.entry.js +21 -0
  183. package/dist/cjs/chardes-card-route-container.cjs.entry.js +21 -0
  184. package/dist/cjs/chardes-card-route-destination-address.cjs.entry.js +22 -0
  185. package/dist/cjs/chardes-card-route-destination-details.cjs.entry.js +21 -0
  186. package/dist/cjs/chardes-card-route-destination-icon-container.cjs.entry.js +21 -0
  187. package/dist/cjs/chardes-card-route-destination-icon.cjs.entry.js +21 -0
  188. package/dist/cjs/chardes-card-route-destination-label.cjs.entry.js +22 -0
  189. package/dist/cjs/chardes-card-route-destination.cjs.entry.js +21 -0
  190. package/dist/cjs/chardes-card-route-pickup-address.cjs.entry.js +22 -0
  191. package/dist/cjs/chardes-card-route-pickup-details.cjs.entry.js +21 -0
  192. package/dist/cjs/chardes-card-route-pickup-icon.cjs.entry.js +21 -0
  193. package/dist/cjs/chardes-card-route-pickup-label.cjs.entry.js +22 -0
  194. package/dist/cjs/chardes-card-route-pickup.cjs.entry.js +21 -0
  195. package/dist/cjs/chardes-card-route.cjs.entry.js +21 -0
  196. package/dist/cjs/chardes-card-total-amount.cjs.entry.js +22 -0
  197. package/dist/cjs/chardes-card-total-content.cjs.entry.js +21 -0
  198. package/dist/cjs/chardes-card-total-label.cjs.entry.js +22 -0
  199. package/dist/cjs/chardes-card-total-section.cjs.entry.js +21 -0
  200. package/dist/cjs/chardes-card-type.cjs.entry.js +22 -0
  201. package/dist/cjs/chardes-checkbox-checkmark.cjs.entry.js +21 -0
  202. package/dist/cjs/chardes-checkbox-input-wrapper.cjs.entry.js +21 -0
  203. package/dist/cjs/chardes-checkbox-input.cjs.entry.js +25 -0
  204. package/dist/cjs/chardes-checkbox-label.cjs.entry.js +22 -0
  205. package/dist/cjs/chardes-checkmark-svg.cjs.entry.js +21 -0
  206. package/dist/cjs/chardes-close-icon.cjs.entry.js +22 -0
  207. package/dist/cjs/chardes-error-icon-svg.cjs.entry.js +22 -0
  208. package/dist/cjs/chardes-error-input-icon.cjs.entry.js +21 -0
  209. package/dist/cjs/chardes-error-input-wrapper.cjs.entry.js +21 -0
  210. package/dist/cjs/chardes-error-input.cjs.entry.js +26 -0
  211. package/dist/cjs/chardes-error-label.cjs.entry.js +23 -0
  212. package/dist/cjs/chardes-error-message.cjs.entry.js +22 -0
  213. package/dist/cjs/chardes-error-state.cjs.entry.js +21 -0
  214. package/dist/cjs/chardes-form-group.cjs.entry.js +21 -0
  215. package/dist/cjs/chardes-form-input.cjs.entry.js +25 -0
  216. package/dist/cjs/chardes-form-label.cjs.entry.js +23 -0
  217. package/dist/cjs/chardes-group-badge-1.cjs.entry.js +22 -0
  218. package/dist/cjs/chardes-group-badge-2.cjs.entry.js +22 -0
  219. package/dist/cjs/chardes-group-badge-3.cjs.entry.js +22 -0
  220. package/dist/cjs/chardes-group-badge-4.cjs.entry.js +22 -0
  221. package/dist/cjs/chardes-icon-svg-destination.cjs.entry.js +22 -0
  222. package/dist/cjs/chardes-icon-svg-pickup.cjs.entry.js +22 -0
  223. package/dist/cjs/chardes-icon-svg.cjs.entry.js +22 -0
  224. package/dist/cjs/chardes-input-element.cjs.entry.js +26 -0
  225. package/dist/cjs/chardes-input-field-wrapper.cjs.entry.js +21 -0
  226. package/dist/cjs/chardes-input-helper.cjs.entry.js +22 -0
  227. package/dist/cjs/chardes-input-icon.cjs.entry.js +21 -0
  228. package/dist/cjs/chardes-input-label.cjs.entry.js +23 -0
  229. package/dist/cjs/chardes-input-states.cjs.entry.js +21 -0
  230. package/dist/cjs/chardes-input-wrapper.cjs.entry.js +21 -0
  231. package/dist/cjs/chardes-modal-body.cjs.entry.js +21 -0
  232. package/dist/cjs/chardes-modal-cancel-button.cjs.entry.js +24 -0
  233. package/dist/cjs/chardes-modal-close-button.cjs.entry.js +23 -0
  234. package/dist/cjs/chardes-modal-confirm-button.cjs.entry.js +24 -0
  235. package/dist/cjs/chardes-modal-container.cjs.entry.js +21 -0
  236. package/dist/cjs/chardes-modal-content.cjs.entry.js +22 -0
  237. package/dist/cjs/chardes-modal-footer.cjs.entry.js +21 -0
  238. package/dist/cjs/chardes-modal-form.cjs.entry.js +21 -0
  239. package/dist/cjs/chardes-modal-header.cjs.entry.js +21 -0
  240. package/dist/cjs/chardes-modal-title.cjs.entry.js +22 -0
  241. package/dist/cjs/chardes-modal.cjs.entry.js +21 -0
  242. package/dist/cjs/chardes-muzingo-primary-button.cjs.entry.js +21 -0
  243. package/dist/cjs/chardes-muzingo.cjs.entry.js +25 -0
  244. package/dist/cjs/chardes-notification-toast.cjs.entry.js +21 -0
  245. package/dist/cjs/chardes-payment-icon.cjs.entry.js +22 -0
  246. package/dist/cjs/chardes-success-icon-svg.cjs.entry.js +22 -0
  247. package/dist/cjs/chardes-success-input-icon.cjs.entry.js +21 -0
  248. package/dist/cjs/chardes-success-input-wrapper.cjs.entry.js +21 -0
  249. package/dist/cjs/chardes-success-input.cjs.entry.js +26 -0
  250. package/dist/cjs/chardes-success-label.cjs.entry.js +23 -0
  251. package/dist/cjs/chardes-success-message.cjs.entry.js +22 -0
  252. package/dist/cjs/chardes-success-state.cjs.entry.js +21 -0
  253. package/dist/cjs/chardes-toast-action-button.cjs.entry.js +24 -0
  254. package/dist/cjs/chardes-toast-actions.cjs.entry.js +21 -0
  255. package/dist/cjs/chardes-toast-content.cjs.entry.js +22 -0
  256. package/dist/cjs/chardes-toast-dismiss-button.cjs.entry.js +24 -0
  257. package/dist/cjs/chardes-toast-header.cjs.entry.js +21 -0
  258. package/dist/cjs/chardes-toast-icon.cjs.entry.js +22 -0
  259. package/dist/cjs/chardes-toast-timestamp.cjs.entry.js +22 -0
  260. package/dist/cjs/chardes-toast-title-container.cjs.entry.js +21 -0
  261. package/dist/cjs/chardes-toast-title.cjs.entry.js +22 -0
  262. package/dist/cjs/index-Buq98cwc.js +1426 -0
  263. package/dist/cjs/index.cjs.js +4880 -0
  264. package/dist/cjs/loader.cjs.js +12 -0
  265. package/dist/cjs/my-component.cjs.entry.js +33 -0
  266. package/dist/cjs/utils-v2Yks-1k.js +7 -0
  267. package/dist/collection/collection-manifest.json +143 -0
  268. package/dist/collection/components/generated/chardes-alert-close-button.css +1 -0
  269. package/dist/collection/components/generated/chardes-alert-close-button.js +108 -0
  270. package/dist/collection/components/generated/chardes-alert-content.css +1 -0
  271. package/dist/collection/components/generated/chardes-alert-content.js +88 -0
  272. package/dist/collection/components/generated/chardes-alert-error.css +1 -0
  273. package/dist/collection/components/generated/chardes-alert-error.js +68 -0
  274. package/dist/collection/components/generated/chardes-alert-header.css +1 -0
  275. package/dist/collection/components/generated/chardes-alert-header.js +68 -0
  276. package/dist/collection/components/generated/chardes-alert-icon.css +1 -0
  277. package/dist/collection/components/generated/chardes-alert-icon.js +88 -0
  278. package/dist/collection/components/generated/chardes-alert-success.css +1 -0
  279. package/dist/collection/components/generated/chardes-alert-success.js +68 -0
  280. package/dist/collection/components/generated/chardes-alert-title-container.css +1 -0
  281. package/dist/collection/components/generated/chardes-alert-title-container.js +68 -0
  282. package/dist/collection/components/generated/chardes-alert-title.css +1 -0
  283. package/dist/collection/components/generated/chardes-alert-title.js +88 -0
  284. package/dist/collection/components/generated/chardes-alert-warning.css +1 -0
  285. package/dist/collection/components/generated/chardes-alert-warning.js +68 -0
  286. package/dist/collection/components/generated/chardes-alerts.css +1 -0
  287. package/dist/collection/components/generated/chardes-alerts.js +68 -0
  288. package/dist/collection/components/generated/chardes-badge-close-button.css +1 -0
  289. package/dist/collection/components/generated/chardes-badge-close-button.js +108 -0
  290. package/dist/collection/components/generated/chardes-badge-error.css +1 -0
  291. package/dist/collection/components/generated/chardes-badge-error.js +88 -0
  292. package/dist/collection/components/generated/chardes-badge-group.css +1 -0
  293. package/dist/collection/components/generated/chardes-badge-group.js +68 -0
  294. package/dist/collection/components/generated/chardes-badge-icon.css +1 -0
  295. package/dist/collection/components/generated/chardes-badge-icon.js +88 -0
  296. package/dist/collection/components/generated/chardes-badge-interactive-text.css +1 -0
  297. package/dist/collection/components/generated/chardes-badge-interactive-text.js +88 -0
  298. package/dist/collection/components/generated/chardes-badge-interactive.css +1 -0
  299. package/dist/collection/components/generated/chardes-badge-interactive.js +68 -0
  300. package/dist/collection/components/generated/chardes-badge-outline.css +1 -0
  301. package/dist/collection/components/generated/chardes-badge-outline.js +88 -0
  302. package/dist/collection/components/generated/chardes-badge-primary.css +1 -0
  303. package/dist/collection/components/generated/chardes-badge-primary.js +88 -0
  304. package/dist/collection/components/generated/chardes-badge-secondary.css +1 -0
  305. package/dist/collection/components/generated/chardes-badge-secondary.js +88 -0
  306. package/dist/collection/components/generated/chardes-badge-success.css +1 -0
  307. package/dist/collection/components/generated/chardes-badge-success.js +88 -0
  308. package/dist/collection/components/generated/chardes-badge-text.css +1 -0
  309. package/dist/collection/components/generated/chardes-badge-text.js +88 -0
  310. package/dist/collection/components/generated/chardes-badge-warning.css +1 -0
  311. package/dist/collection/components/generated/chardes-badge-warning.js +88 -0
  312. package/dist/collection/components/generated/chardes-badge-with-icon.css +1 -0
  313. package/dist/collection/components/generated/chardes-badge-with-icon.js +68 -0
  314. package/dist/collection/components/generated/chardes-badge.css +1 -0
  315. package/dist/collection/components/generated/chardes-badge.js +68 -0
  316. package/dist/collection/components/generated/chardes-button.css +1 -0
  317. package/dist/collection/components/generated/chardes-button.js +128 -0
  318. package/dist/collection/components/generated/chardes-card-body-action-button-1.css +1 -0
  319. package/dist/collection/components/generated/chardes-card-body-action-button-1.js +108 -0
  320. package/dist/collection/components/generated/chardes-card-body-action-button-2.css +1 -0
  321. package/dist/collection/components/generated/chardes-card-body-action-button-2.js +108 -0
  322. package/dist/collection/components/generated/chardes-card-body-action-icon-1.css +1 -0
  323. package/dist/collection/components/generated/chardes-card-body-action-icon-1.js +88 -0
  324. package/dist/collection/components/generated/chardes-card-body-action-icon-2.css +1 -0
  325. package/dist/collection/components/generated/chardes-card-body-action-icon-2.js +88 -0
  326. package/dist/collection/components/generated/chardes-card-body-actions.css +1 -0
  327. package/dist/collection/components/generated/chardes-card-body-actions.js +68 -0
  328. package/dist/collection/components/generated/chardes-card-body-driver.css +1 -0
  329. package/dist/collection/components/generated/chardes-card-body-driver.js +68 -0
  330. package/dist/collection/components/generated/chardes-card-body-img.css +1 -0
  331. package/dist/collection/components/generated/chardes-card-body-img.js +108 -0
  332. package/dist/collection/components/generated/chardes-card-body-info.css +1 -0
  333. package/dist/collection/components/generated/chardes-card-body-info.js +68 -0
  334. package/dist/collection/components/generated/chardes-card-body-name.css +1 -0
  335. package/dist/collection/components/generated/chardes-card-body-name.js +88 -0
  336. package/dist/collection/components/generated/chardes-card-body-span.css +1 -0
  337. package/dist/collection/components/generated/chardes-card-body-span.js +88 -0
  338. package/dist/collection/components/generated/chardes-card-body.css +1 -0
  339. package/dist/collection/components/generated/chardes-card-body.js +68 -0
  340. package/dist/collection/components/generated/chardes-card-container.css +1 -0
  341. package/dist/collection/components/generated/chardes-card-container.js +68 -0
  342. package/dist/collection/components/generated/chardes-card-header-content.css +1 -0
  343. package/dist/collection/components/generated/chardes-card-header-content.js +68 -0
  344. package/dist/collection/components/generated/chardes-card-header-timer.css +1 -0
  345. package/dist/collection/components/generated/chardes-card-header-timer.js +88 -0
  346. package/dist/collection/components/generated/chardes-card-header-title.css +1 -0
  347. package/dist/collection/components/generated/chardes-card-header-title.js +88 -0
  348. package/dist/collection/components/generated/chardes-card-header.css +1 -0
  349. package/dist/collection/components/generated/chardes-card-header.js +68 -0
  350. package/dist/collection/components/generated/chardes-card-icon-container.css +1 -0
  351. package/dist/collection/components/generated/chardes-card-icon-container.js +68 -0
  352. package/dist/collection/components/generated/chardes-card-number.css +1 -0
  353. package/dist/collection/components/generated/chardes-card-number.js +88 -0
  354. package/dist/collection/components/generated/chardes-card-payment-container.css +1 -0
  355. package/dist/collection/components/generated/chardes-card-payment-container.js +68 -0
  356. package/dist/collection/components/generated/chardes-card-payment-content.css +1 -0
  357. package/dist/collection/components/generated/chardes-card-payment-content.js +68 -0
  358. package/dist/collection/components/generated/chardes-card-payment-details.css +1 -0
  359. package/dist/collection/components/generated/chardes-card-payment-details.js +68 -0
  360. package/dist/collection/components/generated/chardes-card-payment-icon-container.css +1 -0
  361. package/dist/collection/components/generated/chardes-card-payment-icon-container.js +68 -0
  362. package/dist/collection/components/generated/chardes-card-payment.css +1 -0
  363. package/dist/collection/components/generated/chardes-card-payment.js +68 -0
  364. package/dist/collection/components/generated/chardes-card-route-container.css +1 -0
  365. package/dist/collection/components/generated/chardes-card-route-container.js +68 -0
  366. package/dist/collection/components/generated/chardes-card-route-destination-address.css +1 -0
  367. package/dist/collection/components/generated/chardes-card-route-destination-address.js +88 -0
  368. package/dist/collection/components/generated/chardes-card-route-destination-details.css +1 -0
  369. package/dist/collection/components/generated/chardes-card-route-destination-details.js +68 -0
  370. package/dist/collection/components/generated/chardes-card-route-destination-icon-container.css +1 -0
  371. package/dist/collection/components/generated/chardes-card-route-destination-icon-container.js +68 -0
  372. package/dist/collection/components/generated/chardes-card-route-destination-icon.css +1 -0
  373. package/dist/collection/components/generated/chardes-card-route-destination-icon.js +68 -0
  374. package/dist/collection/components/generated/chardes-card-route-destination-label.css +1 -0
  375. package/dist/collection/components/generated/chardes-card-route-destination-label.js +88 -0
  376. package/dist/collection/components/generated/chardes-card-route-destination.css +1 -0
  377. package/dist/collection/components/generated/chardes-card-route-destination.js +68 -0
  378. package/dist/collection/components/generated/chardes-card-route-pickup-address.css +1 -0
  379. package/dist/collection/components/generated/chardes-card-route-pickup-address.js +88 -0
  380. package/dist/collection/components/generated/chardes-card-route-pickup-details.css +1 -0
  381. package/dist/collection/components/generated/chardes-card-route-pickup-details.js +68 -0
  382. package/dist/collection/components/generated/chardes-card-route-pickup-icon.css +1 -0
  383. package/dist/collection/components/generated/chardes-card-route-pickup-icon.js +68 -0
  384. package/dist/collection/components/generated/chardes-card-route-pickup-label.css +1 -0
  385. package/dist/collection/components/generated/chardes-card-route-pickup-label.js +88 -0
  386. package/dist/collection/components/generated/chardes-card-route-pickup.css +1 -0
  387. package/dist/collection/components/generated/chardes-card-route-pickup.js +68 -0
  388. package/dist/collection/components/generated/chardes-card-route.css +1 -0
  389. package/dist/collection/components/generated/chardes-card-route.js +68 -0
  390. package/dist/collection/components/generated/chardes-card-total-amount.css +1 -0
  391. package/dist/collection/components/generated/chardes-card-total-amount.js +88 -0
  392. package/dist/collection/components/generated/chardes-card-total-content.css +1 -0
  393. package/dist/collection/components/generated/chardes-card-total-content.js +68 -0
  394. package/dist/collection/components/generated/chardes-card-total-label.css +1 -0
  395. package/dist/collection/components/generated/chardes-card-total-label.js +88 -0
  396. package/dist/collection/components/generated/chardes-card-total-section.css +1 -0
  397. package/dist/collection/components/generated/chardes-card-total-section.js +68 -0
  398. package/dist/collection/components/generated/chardes-card-type.css +1 -0
  399. package/dist/collection/components/generated/chardes-card-type.js +88 -0
  400. package/dist/collection/components/generated/chardes-card.css +1 -0
  401. package/dist/collection/components/generated/chardes-card.js +68 -0
  402. package/dist/collection/components/generated/chardes-checkbox-checkmark.css +1 -0
  403. package/dist/collection/components/generated/chardes-checkbox-checkmark.js +68 -0
  404. package/dist/collection/components/generated/chardes-checkbox-input-wrapper.css +1 -0
  405. package/dist/collection/components/generated/chardes-checkbox-input-wrapper.js +68 -0
  406. package/dist/collection/components/generated/chardes-checkbox-input.css +1 -0
  407. package/dist/collection/components/generated/chardes-checkbox-input.js +148 -0
  408. package/dist/collection/components/generated/chardes-checkbox-label.css +1 -0
  409. package/dist/collection/components/generated/chardes-checkbox-label.js +88 -0
  410. package/dist/collection/components/generated/chardes-checkbox.css +1 -0
  411. package/dist/collection/components/generated/chardes-checkbox.js +88 -0
  412. package/dist/collection/components/generated/chardes-checkmark-svg.css +1 -0
  413. package/dist/collection/components/generated/chardes-checkmark-svg.js +68 -0
  414. package/dist/collection/components/generated/chardes-close-icon.css +1 -0
  415. package/dist/collection/components/generated/chardes-close-icon.js +88 -0
  416. package/dist/collection/components/generated/chardes-error-icon-svg.css +1 -0
  417. package/dist/collection/components/generated/chardes-error-icon-svg.js +88 -0
  418. package/dist/collection/components/generated/chardes-error-input-icon.css +1 -0
  419. package/dist/collection/components/generated/chardes-error-input-icon.js +68 -0
  420. package/dist/collection/components/generated/chardes-error-input-wrapper.css +1 -0
  421. package/dist/collection/components/generated/chardes-error-input-wrapper.js +68 -0
  422. package/dist/collection/components/generated/chardes-error-input.css +1 -0
  423. package/dist/collection/components/generated/chardes-error-input.js +168 -0
  424. package/dist/collection/components/generated/chardes-error-label.css +1 -0
  425. package/dist/collection/components/generated/chardes-error-label.js +108 -0
  426. package/dist/collection/components/generated/chardes-error-message.css +1 -0
  427. package/dist/collection/components/generated/chardes-error-message.js +88 -0
  428. package/dist/collection/components/generated/chardes-error-state.css +1 -0
  429. package/dist/collection/components/generated/chardes-error-state.js +68 -0
  430. package/dist/collection/components/generated/chardes-form-group.css +1 -0
  431. package/dist/collection/components/generated/chardes-form-group.js +68 -0
  432. package/dist/collection/components/generated/chardes-form-input.css +1 -0
  433. package/dist/collection/components/generated/chardes-form-input.js +148 -0
  434. package/dist/collection/components/generated/chardes-form-label.css +1 -0
  435. package/dist/collection/components/generated/chardes-form-label.js +108 -0
  436. package/dist/collection/components/generated/chardes-group-badge-1.css +1 -0
  437. package/dist/collection/components/generated/chardes-group-badge-1.js +88 -0
  438. package/dist/collection/components/generated/chardes-group-badge-2.css +1 -0
  439. package/dist/collection/components/generated/chardes-group-badge-2.js +88 -0
  440. package/dist/collection/components/generated/chardes-group-badge-3.css +1 -0
  441. package/dist/collection/components/generated/chardes-group-badge-3.js +88 -0
  442. package/dist/collection/components/generated/chardes-group-badge-4.css +1 -0
  443. package/dist/collection/components/generated/chardes-group-badge-4.js +88 -0
  444. package/dist/collection/components/generated/chardes-icon-svg-destination.css +1 -0
  445. package/dist/collection/components/generated/chardes-icon-svg-destination.js +88 -0
  446. package/dist/collection/components/generated/chardes-icon-svg-pickup.css +1 -0
  447. package/dist/collection/components/generated/chardes-icon-svg-pickup.js +88 -0
  448. package/dist/collection/components/generated/chardes-icon-svg.css +1 -0
  449. package/dist/collection/components/generated/chardes-icon-svg.js +88 -0
  450. package/dist/collection/components/generated/chardes-input-element.css +1 -0
  451. package/dist/collection/components/generated/chardes-input-element.js +168 -0
  452. package/dist/collection/components/generated/chardes-input-field-wrapper.css +1 -0
  453. package/dist/collection/components/generated/chardes-input-field-wrapper.js +68 -0
  454. package/dist/collection/components/generated/chardes-input-helper.css +1 -0
  455. package/dist/collection/components/generated/chardes-input-helper.js +88 -0
  456. package/dist/collection/components/generated/chardes-input-icon.css +1 -0
  457. package/dist/collection/components/generated/chardes-input-icon.js +68 -0
  458. package/dist/collection/components/generated/chardes-input-label.css +1 -0
  459. package/dist/collection/components/generated/chardes-input-label.js +108 -0
  460. package/dist/collection/components/generated/chardes-input-states.css +1 -0
  461. package/dist/collection/components/generated/chardes-input-states.js +68 -0
  462. package/dist/collection/components/generated/chardes-input-wrapper.css +1 -0
  463. package/dist/collection/components/generated/chardes-input-wrapper.js +68 -0
  464. package/dist/collection/components/generated/chardes-input.css +1 -0
  465. package/dist/collection/components/generated/chardes-input.js +68 -0
  466. package/dist/collection/components/generated/chardes-modal-body.css +1 -0
  467. package/dist/collection/components/generated/chardes-modal-body.js +68 -0
  468. package/dist/collection/components/generated/chardes-modal-cancel-button.css +1 -0
  469. package/dist/collection/components/generated/chardes-modal-cancel-button.js +128 -0
  470. package/dist/collection/components/generated/chardes-modal-close-button.css +1 -0
  471. package/dist/collection/components/generated/chardes-modal-close-button.js +108 -0
  472. package/dist/collection/components/generated/chardes-modal-confirm-button.css +1 -0
  473. package/dist/collection/components/generated/chardes-modal-confirm-button.js +128 -0
  474. package/dist/collection/components/generated/chardes-modal-container.css +1 -0
  475. package/dist/collection/components/generated/chardes-modal-container.js +68 -0
  476. package/dist/collection/components/generated/chardes-modal-content.css +1 -0
  477. package/dist/collection/components/generated/chardes-modal-content.js +88 -0
  478. package/dist/collection/components/generated/chardes-modal-footer.css +1 -0
  479. package/dist/collection/components/generated/chardes-modal-footer.js +68 -0
  480. package/dist/collection/components/generated/chardes-modal-form.css +1 -0
  481. package/dist/collection/components/generated/chardes-modal-form.js +68 -0
  482. package/dist/collection/components/generated/chardes-modal-header.css +1 -0
  483. package/dist/collection/components/generated/chardes-modal-header.js +68 -0
  484. package/dist/collection/components/generated/chardes-modal-title.css +1 -0
  485. package/dist/collection/components/generated/chardes-modal-title.js +88 -0
  486. package/dist/collection/components/generated/chardes-modal.css +1 -0
  487. package/dist/collection/components/generated/chardes-modal.js +68 -0
  488. package/dist/collection/components/generated/chardes-muzingo-primary-button.css +1 -0
  489. package/dist/collection/components/generated/chardes-muzingo-primary-button.js +68 -0
  490. package/dist/collection/components/generated/chardes-muzingo.css +1 -0
  491. package/dist/collection/components/generated/chardes-muzingo.js +148 -0
  492. package/dist/collection/components/generated/chardes-notification-toast.css +1 -0
  493. package/dist/collection/components/generated/chardes-notification-toast.js +68 -0
  494. package/dist/collection/components/generated/chardes-payment-icon.css +1 -0
  495. package/dist/collection/components/generated/chardes-payment-icon.js +88 -0
  496. package/dist/collection/components/generated/chardes-success-icon-svg.css +1 -0
  497. package/dist/collection/components/generated/chardes-success-icon-svg.js +88 -0
  498. package/dist/collection/components/generated/chardes-success-input-icon.css +1 -0
  499. package/dist/collection/components/generated/chardes-success-input-icon.js +68 -0
  500. package/dist/collection/components/generated/chardes-success-input-wrapper.css +1 -0
  501. package/dist/collection/components/generated/chardes-success-input-wrapper.js +68 -0
  502. package/dist/collection/components/generated/chardes-success-input.css +1 -0
  503. package/dist/collection/components/generated/chardes-success-input.js +168 -0
  504. package/dist/collection/components/generated/chardes-success-label.css +1 -0
  505. package/dist/collection/components/generated/chardes-success-label.js +108 -0
  506. package/dist/collection/components/generated/chardes-success-message.css +1 -0
  507. package/dist/collection/components/generated/chardes-success-message.js +88 -0
  508. package/dist/collection/components/generated/chardes-success-state.css +1 -0
  509. package/dist/collection/components/generated/chardes-success-state.js +68 -0
  510. package/dist/collection/components/generated/chardes-toast-action-button.css +1 -0
  511. package/dist/collection/components/generated/chardes-toast-action-button.js +128 -0
  512. package/dist/collection/components/generated/chardes-toast-actions.css +1 -0
  513. package/dist/collection/components/generated/chardes-toast-actions.js +68 -0
  514. package/dist/collection/components/generated/chardes-toast-content.css +1 -0
  515. package/dist/collection/components/generated/chardes-toast-content.js +88 -0
  516. package/dist/collection/components/generated/chardes-toast-dismiss-button.css +1 -0
  517. package/dist/collection/components/generated/chardes-toast-dismiss-button.js +128 -0
  518. package/dist/collection/components/generated/chardes-toast-header.css +1 -0
  519. package/dist/collection/components/generated/chardes-toast-header.js +68 -0
  520. package/dist/collection/components/generated/chardes-toast-icon.css +1 -0
  521. package/dist/collection/components/generated/chardes-toast-icon.js +88 -0
  522. package/dist/collection/components/generated/chardes-toast-timestamp.css +1 -0
  523. package/dist/collection/components/generated/chardes-toast-timestamp.js +88 -0
  524. package/dist/collection/components/generated/chardes-toast-title-container.css +1 -0
  525. package/dist/collection/components/generated/chardes-toast-title-container.js +68 -0
  526. package/dist/collection/components/generated/chardes-toast-title.css +1 -0
  527. package/dist/collection/components/generated/chardes-toast-title.js +88 -0
  528. package/dist/collection/components/generated/index.js +130 -0
  529. package/dist/collection/components/index.js +2 -0
  530. package/dist/collection/components/my-component/my-component.css +3 -0
  531. package/dist/collection/components/my-component/my-component.js +95 -0
  532. package/dist/collection/index.js +15 -0
  533. package/dist/collection/types/index.js +1 -0
  534. package/dist/collection/types/types.js +1 -0
  535. package/dist/collection/utils/api-client.js +84 -0
  536. package/dist/collection/utils/utils.js +3 -0
  537. package/dist/components/chardes-alert-close-button.js +1 -0
  538. package/dist/components/chardes-alert-content.js +1 -0
  539. package/dist/components/chardes-alert-error.js +1 -0
  540. package/dist/components/chardes-alert-header.js +1 -0
  541. package/dist/components/chardes-alert-icon.js +1 -0
  542. package/dist/components/chardes-alert-success.js +1 -0
  543. package/dist/components/chardes-alert-title-container.js +1 -0
  544. package/dist/components/chardes-alert-title.js +1 -0
  545. package/dist/components/chardes-alert-warning.js +1 -0
  546. package/dist/components/chardes-alerts.js +1 -0
  547. package/dist/components/chardes-badge-close-button.js +1 -0
  548. package/dist/components/chardes-badge-error.js +1 -0
  549. package/dist/components/chardes-badge-group.js +1 -0
  550. package/dist/components/chardes-badge-icon.js +1 -0
  551. package/dist/components/chardes-badge-interactive-text.js +1 -0
  552. package/dist/components/chardes-badge-interactive.js +1 -0
  553. package/dist/components/chardes-badge-outline.js +1 -0
  554. package/dist/components/chardes-badge-primary.js +1 -0
  555. package/dist/components/chardes-badge-secondary.js +1 -0
  556. package/dist/components/chardes-badge-success.js +1 -0
  557. package/dist/components/chardes-badge-text.js +1 -0
  558. package/dist/components/chardes-badge-warning.js +1 -0
  559. package/dist/components/chardes-badge-with-icon.js +1 -0
  560. package/dist/components/chardes-badge.js +1 -0
  561. package/dist/components/chardes-button.js +1 -0
  562. package/dist/components/chardes-card-body-action-button-1.js +1 -0
  563. package/dist/components/chardes-card-body-action-button-2.js +1 -0
  564. package/dist/components/chardes-card-body-action-icon-1.js +1 -0
  565. package/dist/components/chardes-card-body-action-icon-2.js +1 -0
  566. package/dist/components/chardes-card-body-actions.js +1 -0
  567. package/dist/components/chardes-card-body-driver.js +1 -0
  568. package/dist/components/chardes-card-body-img.js +1 -0
  569. package/dist/components/chardes-card-body-info.js +1 -0
  570. package/dist/components/chardes-card-body-name.js +1 -0
  571. package/dist/components/chardes-card-body-span.js +1 -0
  572. package/dist/components/chardes-card-body.js +1 -0
  573. package/dist/components/chardes-card-container.js +1 -0
  574. package/dist/components/chardes-card-header-content.js +1 -0
  575. package/dist/components/chardes-card-header-timer.js +1 -0
  576. package/dist/components/chardes-card-header-title.js +1 -0
  577. package/dist/components/chardes-card-header.js +1 -0
  578. package/dist/components/chardes-card-icon-container.js +1 -0
  579. package/dist/components/chardes-card-number.js +1 -0
  580. package/dist/components/chardes-card-payment-container.js +1 -0
  581. package/dist/components/chardes-card-payment-content.js +1 -0
  582. package/dist/components/chardes-card-payment-details.js +1 -0
  583. package/dist/components/chardes-card-payment-icon-container.js +1 -0
  584. package/dist/components/chardes-card-payment.js +1 -0
  585. package/dist/components/chardes-card-route-container.js +1 -0
  586. package/dist/components/chardes-card-route-destination-address.js +1 -0
  587. package/dist/components/chardes-card-route-destination-details.js +1 -0
  588. package/dist/components/chardes-card-route-destination-icon-container.js +1 -0
  589. package/dist/components/chardes-card-route-destination-icon.js +1 -0
  590. package/dist/components/chardes-card-route-destination-label.js +1 -0
  591. package/dist/components/chardes-card-route-destination.js +1 -0
  592. package/dist/components/chardes-card-route-pickup-address.js +1 -0
  593. package/dist/components/chardes-card-route-pickup-details.js +1 -0
  594. package/dist/components/chardes-card-route-pickup-icon.js +1 -0
  595. package/dist/components/chardes-card-route-pickup-label.js +1 -0
  596. package/dist/components/chardes-card-route-pickup.js +1 -0
  597. package/dist/components/chardes-card-route.js +1 -0
  598. package/dist/components/chardes-card-total-amount.js +1 -0
  599. package/dist/components/chardes-card-total-content.js +1 -0
  600. package/dist/components/chardes-card-total-label.js +1 -0
  601. package/dist/components/chardes-card-total-section.js +1 -0
  602. package/dist/components/chardes-card-type.js +1 -0
  603. package/dist/components/chardes-card.js +1 -0
  604. package/dist/components/chardes-checkbox-checkmark.js +1 -0
  605. package/dist/components/chardes-checkbox-input-wrapper.js +1 -0
  606. package/dist/components/chardes-checkbox-input.js +1 -0
  607. package/dist/components/chardes-checkbox-label.js +1 -0
  608. package/dist/components/chardes-checkbox.js +1 -0
  609. package/dist/components/chardes-checkmark-svg.js +1 -0
  610. package/dist/components/chardes-close-icon.js +1 -0
  611. package/dist/components/chardes-error-icon-svg.js +1 -0
  612. package/dist/components/chardes-error-input-icon.js +1 -0
  613. package/dist/components/chardes-error-input-wrapper.js +1 -0
  614. package/dist/components/chardes-error-input.js +1 -0
  615. package/dist/components/chardes-error-label.js +1 -0
  616. package/dist/components/chardes-error-message.js +1 -0
  617. package/dist/components/chardes-error-state.js +1 -0
  618. package/dist/components/chardes-form-group.js +1 -0
  619. package/dist/components/chardes-form-input.js +1 -0
  620. package/dist/components/chardes-form-label.js +1 -0
  621. package/dist/components/chardes-group-badge-1.js +1 -0
  622. package/dist/components/chardes-group-badge-2.js +1 -0
  623. package/dist/components/chardes-group-badge-3.js +1 -0
  624. package/dist/components/chardes-group-badge-4.js +1 -0
  625. package/dist/components/chardes-icon-svg-destination.js +1 -0
  626. package/dist/components/chardes-icon-svg-pickup.js +1 -0
  627. package/dist/components/chardes-icon-svg.js +1 -0
  628. package/dist/components/chardes-input-element.js +1 -0
  629. package/dist/components/chardes-input-field-wrapper.js +1 -0
  630. package/dist/components/chardes-input-helper.js +1 -0
  631. package/dist/components/chardes-input-icon.js +1 -0
  632. package/dist/components/chardes-input-label.js +1 -0
  633. package/dist/components/chardes-input-states.js +1 -0
  634. package/dist/components/chardes-input-wrapper.js +1 -0
  635. package/dist/components/chardes-input.js +1 -0
  636. package/dist/components/chardes-modal-body.js +1 -0
  637. package/dist/components/chardes-modal-cancel-button.js +1 -0
  638. package/dist/components/chardes-modal-close-button.js +1 -0
  639. package/dist/components/chardes-modal-confirm-button.js +1 -0
  640. package/dist/components/chardes-modal-container.js +1 -0
  641. package/dist/components/chardes-modal-content.js +1 -0
  642. package/dist/components/chardes-modal-footer.js +1 -0
  643. package/dist/components/chardes-modal-form.js +1 -0
  644. package/dist/components/chardes-modal-header.js +1 -0
  645. package/dist/components/chardes-modal-title.js +1 -0
  646. package/dist/components/chardes-modal.js +1 -0
  647. package/dist/components/chardes-muzingo-primary-button.js +1 -0
  648. package/dist/components/chardes-muzingo.js +1 -0
  649. package/dist/components/chardes-notification-toast.js +1 -0
  650. package/dist/components/chardes-payment-icon.js +1 -0
  651. package/dist/components/chardes-success-icon-svg.js +1 -0
  652. package/dist/components/chardes-success-input-icon.js +1 -0
  653. package/dist/components/chardes-success-input-wrapper.js +1 -0
  654. package/dist/components/chardes-success-input.js +1 -0
  655. package/dist/components/chardes-success-label.js +1 -0
  656. package/dist/components/chardes-success-message.js +1 -0
  657. package/dist/components/chardes-success-state.js +1 -0
  658. package/dist/components/chardes-toast-action-button.js +1 -0
  659. package/dist/components/chardes-toast-actions.js +1 -0
  660. package/dist/components/chardes-toast-content.js +1 -0
  661. package/dist/components/chardes-toast-dismiss-button.js +1 -0
  662. package/dist/components/chardes-toast-header.js +1 -0
  663. package/dist/components/chardes-toast-icon.js +1 -0
  664. package/dist/components/chardes-toast-timestamp.js +1 -0
  665. package/dist/components/chardes-toast-title-container.js +1 -0
  666. package/dist/components/chardes-toast-title.js +1 -0
  667. package/dist/components/index.js +2 -0
  668. package/dist/components/my-component.js +1 -0
  669. package/dist/components/utils.js +1 -0
  670. package/dist/esm/charde.js +20 -0
  671. package/dist/esm/chardes-alert-close-button.entry.js +21 -0
  672. package/dist/esm/chardes-alert-content.entry.js +20 -0
  673. package/dist/esm/chardes-alert-error.entry.js +19 -0
  674. package/dist/esm/chardes-alert-header.entry.js +19 -0
  675. package/dist/esm/chardes-alert-icon.entry.js +20 -0
  676. package/dist/esm/chardes-alert-success.entry.js +19 -0
  677. package/dist/esm/chardes-alert-title-container.entry.js +19 -0
  678. package/dist/esm/chardes-alert-title.entry.js +20 -0
  679. package/dist/esm/chardes-alert-warning.entry.js +19 -0
  680. package/dist/esm/chardes-alerts.entry.js +19 -0
  681. package/dist/esm/chardes-badge-close-button.entry.js +21 -0
  682. package/dist/esm/chardes-badge-error.entry.js +20 -0
  683. package/dist/esm/chardes-badge-group.entry.js +19 -0
  684. package/dist/esm/chardes-badge-icon.entry.js +20 -0
  685. package/dist/esm/chardes-badge-interactive-text.entry.js +20 -0
  686. package/dist/esm/chardes-badge-interactive.entry.js +19 -0
  687. package/dist/esm/chardes-badge-outline.entry.js +20 -0
  688. package/dist/esm/chardes-badge-primary.entry.js +20 -0
  689. package/dist/esm/chardes-badge-secondary.entry.js +20 -0
  690. package/dist/esm/chardes-badge-success.entry.js +20 -0
  691. package/dist/esm/chardes-badge-text.entry.js +20 -0
  692. package/dist/esm/chardes-badge-warning.entry.js +20 -0
  693. package/dist/esm/chardes-badge-with-icon.entry.js +19 -0
  694. package/dist/esm/chardes-badge.entry.js +19 -0
  695. package/dist/esm/chardes-button_4.entry.js +71 -0
  696. package/dist/esm/chardes-card-body-action-button-1.entry.js +21 -0
  697. package/dist/esm/chardes-card-body-action-button-2.entry.js +21 -0
  698. package/dist/esm/chardes-card-body-action-icon-1.entry.js +20 -0
  699. package/dist/esm/chardes-card-body-action-icon-2.entry.js +20 -0
  700. package/dist/esm/chardes-card-body-actions.entry.js +19 -0
  701. package/dist/esm/chardes-card-body-driver.entry.js +19 -0
  702. package/dist/esm/chardes-card-body-img.entry.js +21 -0
  703. package/dist/esm/chardes-card-body-info.entry.js +19 -0
  704. package/dist/esm/chardes-card-body-name.entry.js +20 -0
  705. package/dist/esm/chardes-card-body-span.entry.js +20 -0
  706. package/dist/esm/chardes-card-body.entry.js +19 -0
  707. package/dist/esm/chardes-card-container.entry.js +19 -0
  708. package/dist/esm/chardes-card-header-content.entry.js +19 -0
  709. package/dist/esm/chardes-card-header-timer.entry.js +20 -0
  710. package/dist/esm/chardes-card-header-title.entry.js +20 -0
  711. package/dist/esm/chardes-card-header.entry.js +19 -0
  712. package/dist/esm/chardes-card-icon-container.entry.js +19 -0
  713. package/dist/esm/chardes-card-number.entry.js +20 -0
  714. package/dist/esm/chardes-card-payment-container.entry.js +19 -0
  715. package/dist/esm/chardes-card-payment-content.entry.js +19 -0
  716. package/dist/esm/chardes-card-payment-details.entry.js +19 -0
  717. package/dist/esm/chardes-card-payment-icon-container.entry.js +19 -0
  718. package/dist/esm/chardes-card-payment.entry.js +19 -0
  719. package/dist/esm/chardes-card-route-container.entry.js +19 -0
  720. package/dist/esm/chardes-card-route-destination-address.entry.js +20 -0
  721. package/dist/esm/chardes-card-route-destination-details.entry.js +19 -0
  722. package/dist/esm/chardes-card-route-destination-icon-container.entry.js +19 -0
  723. package/dist/esm/chardes-card-route-destination-icon.entry.js +19 -0
  724. package/dist/esm/chardes-card-route-destination-label.entry.js +20 -0
  725. package/dist/esm/chardes-card-route-destination.entry.js +19 -0
  726. package/dist/esm/chardes-card-route-pickup-address.entry.js +20 -0
  727. package/dist/esm/chardes-card-route-pickup-details.entry.js +19 -0
  728. package/dist/esm/chardes-card-route-pickup-icon.entry.js +19 -0
  729. package/dist/esm/chardes-card-route-pickup-label.entry.js +20 -0
  730. package/dist/esm/chardes-card-route-pickup.entry.js +19 -0
  731. package/dist/esm/chardes-card-route.entry.js +19 -0
  732. package/dist/esm/chardes-card-total-amount.entry.js +20 -0
  733. package/dist/esm/chardes-card-total-content.entry.js +19 -0
  734. package/dist/esm/chardes-card-total-label.entry.js +20 -0
  735. package/dist/esm/chardes-card-total-section.entry.js +19 -0
  736. package/dist/esm/chardes-card-type.entry.js +20 -0
  737. package/dist/esm/chardes-checkbox-checkmark.entry.js +19 -0
  738. package/dist/esm/chardes-checkbox-input-wrapper.entry.js +19 -0
  739. package/dist/esm/chardes-checkbox-input.entry.js +23 -0
  740. package/dist/esm/chardes-checkbox-label.entry.js +20 -0
  741. package/dist/esm/chardes-checkmark-svg.entry.js +19 -0
  742. package/dist/esm/chardes-close-icon.entry.js +20 -0
  743. package/dist/esm/chardes-error-icon-svg.entry.js +20 -0
  744. package/dist/esm/chardes-error-input-icon.entry.js +19 -0
  745. package/dist/esm/chardes-error-input-wrapper.entry.js +19 -0
  746. package/dist/esm/chardes-error-input.entry.js +24 -0
  747. package/dist/esm/chardes-error-label.entry.js +21 -0
  748. package/dist/esm/chardes-error-message.entry.js +20 -0
  749. package/dist/esm/chardes-error-state.entry.js +19 -0
  750. package/dist/esm/chardes-form-group.entry.js +19 -0
  751. package/dist/esm/chardes-form-input.entry.js +23 -0
  752. package/dist/esm/chardes-form-label.entry.js +21 -0
  753. package/dist/esm/chardes-group-badge-1.entry.js +20 -0
  754. package/dist/esm/chardes-group-badge-2.entry.js +20 -0
  755. package/dist/esm/chardes-group-badge-3.entry.js +20 -0
  756. package/dist/esm/chardes-group-badge-4.entry.js +20 -0
  757. package/dist/esm/chardes-icon-svg-destination.entry.js +20 -0
  758. package/dist/esm/chardes-icon-svg-pickup.entry.js +20 -0
  759. package/dist/esm/chardes-icon-svg.entry.js +20 -0
  760. package/dist/esm/chardes-input-element.entry.js +24 -0
  761. package/dist/esm/chardes-input-field-wrapper.entry.js +19 -0
  762. package/dist/esm/chardes-input-helper.entry.js +20 -0
  763. package/dist/esm/chardes-input-icon.entry.js +19 -0
  764. package/dist/esm/chardes-input-label.entry.js +21 -0
  765. package/dist/esm/chardes-input-states.entry.js +19 -0
  766. package/dist/esm/chardes-input-wrapper.entry.js +19 -0
  767. package/dist/esm/chardes-modal-body.entry.js +19 -0
  768. package/dist/esm/chardes-modal-cancel-button.entry.js +22 -0
  769. package/dist/esm/chardes-modal-close-button.entry.js +21 -0
  770. package/dist/esm/chardes-modal-confirm-button.entry.js +22 -0
  771. package/dist/esm/chardes-modal-container.entry.js +19 -0
  772. package/dist/esm/chardes-modal-content.entry.js +20 -0
  773. package/dist/esm/chardes-modal-footer.entry.js +19 -0
  774. package/dist/esm/chardes-modal-form.entry.js +19 -0
  775. package/dist/esm/chardes-modal-header.entry.js +19 -0
  776. package/dist/esm/chardes-modal-title.entry.js +20 -0
  777. package/dist/esm/chardes-modal.entry.js +19 -0
  778. package/dist/esm/chardes-muzingo-primary-button.entry.js +19 -0
  779. package/dist/esm/chardes-muzingo.entry.js +23 -0
  780. package/dist/esm/chardes-notification-toast.entry.js +19 -0
  781. package/dist/esm/chardes-payment-icon.entry.js +20 -0
  782. package/dist/esm/chardes-success-icon-svg.entry.js +20 -0
  783. package/dist/esm/chardes-success-input-icon.entry.js +19 -0
  784. package/dist/esm/chardes-success-input-wrapper.entry.js +19 -0
  785. package/dist/esm/chardes-success-input.entry.js +24 -0
  786. package/dist/esm/chardes-success-label.entry.js +21 -0
  787. package/dist/esm/chardes-success-message.entry.js +20 -0
  788. package/dist/esm/chardes-success-state.entry.js +19 -0
  789. package/dist/esm/chardes-toast-action-button.entry.js +22 -0
  790. package/dist/esm/chardes-toast-actions.entry.js +19 -0
  791. package/dist/esm/chardes-toast-content.entry.js +20 -0
  792. package/dist/esm/chardes-toast-dismiss-button.entry.js +22 -0
  793. package/dist/esm/chardes-toast-header.entry.js +19 -0
  794. package/dist/esm/chardes-toast-icon.entry.js +20 -0
  795. package/dist/esm/chardes-toast-timestamp.entry.js +20 -0
  796. package/dist/esm/chardes-toast-title-container.entry.js +19 -0
  797. package/dist/esm/chardes-toast-title.entry.js +20 -0
  798. package/dist/esm/index-jZlebn0H.js +1419 -0
  799. package/dist/esm/index.js +4856 -0
  800. package/dist/esm/loader.js +10 -0
  801. package/dist/esm/my-component.entry.js +31 -0
  802. package/dist/esm/utils-DhW431pq.js +5 -0
  803. package/dist/index.cjs.js +1 -0
  804. package/dist/index.js +1 -0
  805. package/dist/scripts/generate-components.js +744 -0
  806. package/dist/scripts/utils.js +32 -0
  807. package/loader/cdn.js +1 -0
  808. package/loader/index.cjs.js +1 -0
  809. package/loader/index.d.ts +24 -0
  810. package/loader/index.es2017.js +1 -0
  811. package/loader/index.js +2 -0
  812. package/package.json +10 -3
@@ -0,0 +1,744 @@
1
+ import * as fs from "fs";
2
+ import * as path from "path";
3
+ import { DesignSystemApiClient } from "../src/utils/api-client";
4
+ import { ComponentGeneratorUtils } from "./utils";
5
+ class StencilComponentGenerator {
6
+ apiClient;
7
+ outputDir;
8
+ stylesDir;
9
+ componentPrefix = 'chardes';
10
+ variables = {};
11
+ // tagName -> className for the index
12
+ generatedComponents = new Map();
13
+ constructor() {
14
+ this.apiClient = new DesignSystemApiClient();
15
+ this.outputDir = path.join(process.cwd(), 'src', 'components', 'generated');
16
+ this.stylesDir = path.join(process.cwd(), 'src', 'styles');
17
+ }
18
+ async generateAllComponents() {
19
+ try {
20
+ console.log('Fetching design system data...');
21
+ const designSystem = await this.apiClient.fetchDesignSystem();
22
+ this.variables = designSystem.variables;
23
+ console.log('Generating design tokens CSS...');
24
+ await this.generateDesignTokensCSS(designSystem.variables);
25
+ console.log('Generating utility classes CSS...');
26
+ await this.generateUtilityClassesCSS(designSystem.components, designSystem.variables);
27
+ console.log('Generating Stencil components...');
28
+ await this.generateComponents(designSystem.components, designSystem.variables);
29
+ console.log('Updating component index...');
30
+ await this.updateComponentIndex();
31
+ console.log('All components generated successfully!');
32
+ }
33
+ catch (error) {
34
+ console.error('Error generating components:', error);
35
+ process.exit(1);
36
+ }
37
+ }
38
+ // ─── Design Tokens CSS ──────────────────────────────────────────────────────
39
+ async generateDesignTokensCSS(variables) {
40
+ const cssLines = [':root {'];
41
+ for (const [varName, token] of Object.entries(variables)) {
42
+ const value = this.resolveTokenValue(token.value, variables);
43
+ const comment = token.comment ? `\n /* ${token.comment} */` : '';
44
+ cssLines.push(`${comment}\n ${varName}: ${value};`);
45
+ }
46
+ cssLines.push('}');
47
+ if (!fs.existsSync(this.stylesDir)) {
48
+ fs.mkdirSync(this.stylesDir, { recursive: true });
49
+ }
50
+ fs.writeFileSync(path.join(this.stylesDir, 'design-tokens.css'), cssLines.join('\n'));
51
+ }
52
+ resolveTokenValue(value, variables) {
53
+ if (!value)
54
+ return '';
55
+ const varMatch = value.match(/var\(--([^)]+)\)/);
56
+ if (varMatch) {
57
+ const tokenName = `--${varMatch[1]}`;
58
+ const token = variables[tokenName];
59
+ if (token)
60
+ return this.resolveTokenValue(token.value, variables);
61
+ return value;
62
+ }
63
+ if (value.startsWith('--')) {
64
+ const token = variables[value];
65
+ if (token)
66
+ return this.resolveTokenValue(token.value, variables);
67
+ }
68
+ const token = Object.values(variables).find(t => t.value === value);
69
+ if (token?.unit && token.type === 'dimension' && !value.includes(token.unit)) {
70
+ return `${value}${token.unit}`;
71
+ }
72
+ return value;
73
+ }
74
+ // ─── Utility Classes CSS ────────────────────────────────────────────────────
75
+ async generateUtilityClassesCSS(components, variables) {
76
+ const allUtilityClasses = this.extractAllUtilityClassesFromComponents(components);
77
+ const cssLines = [
78
+ '/* Auto-generated Utility Classes from Design System */',
79
+ '/* DO NOT EDIT - Generated from your design system API */',
80
+ '',
81
+ ':host, :root {',
82
+ ' display: block;',
83
+ ' box-sizing: border-box;',
84
+ '}',
85
+ '',
86
+ '*, *::before, *::after {',
87
+ ' box-sizing: inherit;',
88
+ '}',
89
+ ''
90
+ ];
91
+ const escapeClassName = (className) => {
92
+ if (!className)
93
+ return className;
94
+ let escaped = className.replace(/\//g, '\\/');
95
+ escaped = escaped.replace(/[!#$%&()*+,.<=>?@[\]^`{|}~]/g, (match) => {
96
+ if (match === '-' || match === '_')
97
+ return match;
98
+ return '\\' + match;
99
+ });
100
+ return escaped;
101
+ };
102
+ const getTokenValue = (tokenName, defaultValue) => {
103
+ const token = variables[tokenName];
104
+ if (!token)
105
+ return defaultValue;
106
+ let value = token.value;
107
+ if (value.startsWith('--'))
108
+ return `var(${value})`;
109
+ if (token.unit && token.type === 'dimension' && !value.includes(token.unit))
110
+ value = `${value}${token.unit}`;
111
+ return `var(${tokenName}, ${value})`;
112
+ };
113
+ allUtilityClasses.forEach(className => {
114
+ if (!className || className.includes(':'))
115
+ return;
116
+ const cssProperties = this.getUtilityClassProperties(className, variables, getTokenValue);
117
+ if (cssProperties.length > 0) {
118
+ const escapedClassName = escapeClassName(className);
119
+ cssLines.push(`.${escapedClassName} {`);
120
+ cssProperties.forEach(prop => cssLines.push(` ${prop};`));
121
+ cssLines.push('}');
122
+ cssLines.push('');
123
+ }
124
+ });
125
+ const stateClasses = this.extractStateClassesFromComponents(components);
126
+ stateClasses.forEach(stateClass => {
127
+ const [state, baseClass] = stateClass.split(':');
128
+ const cssProperties = this.getUtilityClassProperties(baseClass, variables, getTokenValue);
129
+ if (cssProperties.length > 0) {
130
+ const escapedBaseClass = escapeClassName(baseClass);
131
+ cssLines.push(`.${escapedBaseClass}:${state} {`);
132
+ cssProperties.forEach(prop => cssLines.push(` ${prop};`));
133
+ cssLines.push('}');
134
+ cssLines.push('');
135
+ }
136
+ });
137
+ fs.writeFileSync(path.join(this.stylesDir, 'utilities.css'), cssLines.join('\n'));
138
+ }
139
+ extractAllUtilityClassesFromComponents(components) {
140
+ const classes = new Set();
141
+ const walk = (node) => {
142
+ if (node.linkedElement?.attributes?.class) {
143
+ this.resolveClassReferences(node.linkedElement.attributes.class)
144
+ .split(' ')
145
+ .forEach(cls => {
146
+ if (cls && !cls.includes(':'))
147
+ classes.add(cls);
148
+ });
149
+ }
150
+ if (node.children)
151
+ Object.values(node.children).forEach(child => walk(child));
152
+ };
153
+ Object.values(components).forEach(component => walk(component));
154
+ return classes;
155
+ }
156
+ extractStateClassesFromComponents(components) {
157
+ const stateClasses = new Set();
158
+ const walk = (node) => {
159
+ if (node.linkedElement?.attributes?.class) {
160
+ this.resolveClassReferences(node.linkedElement.attributes.class)
161
+ .split(' ')
162
+ .forEach(cls => {
163
+ if (cls.includes(':'))
164
+ stateClasses.add(cls);
165
+ });
166
+ }
167
+ if (node.children)
168
+ Object.values(node.children).forEach(child => walk(child));
169
+ };
170
+ Object.values(components).forEach(component => walk(component));
171
+ return stateClasses;
172
+ }
173
+ resolveClassReferences(classString) {
174
+ if (!classString)
175
+ return '';
176
+ const parts = classString.split(' ').filter(p => p.trim());
177
+ const resolvedParts = parts.map(part => {
178
+ const varMatch = part.match(/var\(--([^)]+)\)/);
179
+ if (varMatch) {
180
+ const tokenName = `--${varMatch[1]}`;
181
+ const token = this.variables[tokenName];
182
+ if (token) {
183
+ if (token.value.startsWith('var(--') || token.value.startsWith('--'))
184
+ return this.resolveClassReferences(token.value);
185
+ return token.value;
186
+ }
187
+ return varMatch[1].replace(/^--/, '');
188
+ }
189
+ if (part.startsWith('--')) {
190
+ const token = this.variables[part];
191
+ if (token) {
192
+ if (token.value.startsWith('var(--') || token.value.startsWith('--'))
193
+ return this.resolveClassReferences(token.value);
194
+ return token.value;
195
+ }
196
+ return part.replace(/^--/, '');
197
+ }
198
+ return part;
199
+ });
200
+ return resolvedParts.filter(p => p && p.trim()).join(' ');
201
+ }
202
+ getUtilityClassProperties(className, variables, getTokenValue) {
203
+ const utilityMap = {
204
+ 'flex': () => ['display: flex'],
205
+ 'flex-1': () => ['flex: 1 1 0%'],
206
+ 'flex-shrink-0': () => ['flex-shrink: 0'],
207
+ 'flex-col': () => ['flex-direction: column'],
208
+ 'items-center': () => ['align-items: center'],
209
+ 'items-start': () => ['align-items: flex-start'],
210
+ 'justify-between': () => ['justify-content: space-between'],
211
+ 'justify-center': () => ['justify-content: center'],
212
+ 'w-full': () => [`width: ${getTokenValue('--width', '100%')}`],
213
+ 'h-full': () => [`height: ${getTokenValue('--height', '100%')}`],
214
+ 'max-w-md': () => [`max-width: ${getTokenValue('--max-width', '300rem')}`],
215
+ 'mx-auto': () => ['margin-left: auto', 'margin-right: auto'],
216
+ 'overflow-hidden': () => ['overflow: hidden'],
217
+ 'object-cover': () => ['object-fit: cover'],
218
+ 'relative': () => ['position: relative'],
219
+ 'absolute': () => ['position: absolute'],
220
+ 'fixed': () => ['position: fixed'],
221
+ 'inset-0': () => ['top: 0', 'right: 0', 'bottom: 0', 'left: 0'],
222
+ 'top-0': () => ['top: 0'],
223
+ 'left-0': () => ['left: 0'],
224
+ 'top-1/2': () => ['top: 50%'],
225
+ 'left-1/2': () => ['left: 50%'],
226
+ '-translate-x-1/2': () => ['transform: translateX(-50%)'],
227
+ '-translate-y-1/2': () => ['transform: translateY(-50%)'],
228
+ 'grid': () => ['display: grid'],
229
+ 'grid-cols-2': () => ['grid-template-columns: repeat(2, minmax(0, 1fr))'],
230
+ 'p-1': () => [`padding: ${getTokenValue('--spacing-1', '0.25rem')}`],
231
+ 'p-2': () => [`padding: ${getTokenValue('--spacing-2', '0.5rem')}`],
232
+ 'p-4': () => [`padding: ${getTokenValue('--spacing-4', '1rem')}`],
233
+ 'p-6': () => [`padding: ${getTokenValue('--spacing-6', '2.5rem')}`],
234
+ 'px-2': () => [`padding-left: ${getTokenValue('--spacing-2', '0.5rem')}`, `padding-right: ${getTokenValue('--spacing-2', '0.5rem')}`],
235
+ 'px-3': () => [`padding-left: ${getTokenValue('--spacing-3', '0.75rem')}`, `padding-right: ${getTokenValue('--spacing-3', '0.75rem')}`],
236
+ 'px-4': () => [`padding-left: ${getTokenValue('--spacing-4', '1rem')}`, `padding-right: ${getTokenValue('--spacing-4', '1rem')}`],
237
+ 'px-6': () => [`padding-left: ${getTokenValue('--spacing-6', '2.5rem')}`, `padding-right: ${getTokenValue('--spacing-6', '2.5rem')}`],
238
+ 'py-1': () => [`padding-top: ${getTokenValue('--spacing-1', '0.25rem')}`, `padding-bottom: ${getTokenValue('--spacing-1', '0.25rem')}`],
239
+ 'py-2': () => [`padding-top: ${getTokenValue('--spacing-2', '0.5rem')}`, `padding-bottom: ${getTokenValue('--spacing-2', '0.5rem')}`],
240
+ 'py-3': () => [`padding-top: ${getTokenValue('--spacing-3', '0.75rem')}`, `padding-bottom: ${getTokenValue('--spacing-3', '0.75rem')}`],
241
+ 'py-4': () => [`padding-top: ${getTokenValue('--spacing-4', '1rem')}`, `padding-bottom: ${getTokenValue('--spacing-4', '1rem')}`],
242
+ 'py-6': () => [`padding-top: ${getTokenValue('--spacing-6', '2.5rem')}`, `padding-bottom: ${getTokenValue('--spacing-6', '2.5rem')}`],
243
+ 'pb-6': () => [`padding-bottom: ${getTokenValue('--spacing-6', '2.5rem')}`],
244
+ 'mt-1': () => [`margin-top: ${getTokenValue('--spacing-1', '0.25rem')}`],
245
+ 'mt-6': () => [`margin-top: ${getTokenValue('--spacing-6', '2.5rem')}`],
246
+ 'mb-1': () => [`margin-bottom: ${getTokenValue('--spacing-1', '0.25rem')}`],
247
+ 'mb-2': () => [`margin-bottom: ${getTokenValue('--spacing-2', '0.5rem')}`],
248
+ 'mb-3': () => [`margin-bottom: ${getTokenValue('--spacing-3', '0.75rem')}`],
249
+ 'ml-3': () => [`margin-left: ${getTokenValue('--spacing-3', '0.75rem')}`],
250
+ 'pl-12': () => ['padding-left: 3rem'],
251
+ 'space-x-2': () => [`> * + * { margin-left: ${getTokenValue('--spacing-2', '0.5rem')}; }`],
252
+ 'space-x-3': () => [`> * + * { margin-left: ${getTokenValue('--spacing-3', '0.75rem')}; }`],
253
+ 'space-x-4': () => [`> * + * { margin-left: ${getTokenValue('--spacing-4', '1rem')}; }`],
254
+ 'space-y-2': () => [`> * + * { margin-top: ${getTokenValue('--spacing-2', '0.5rem')}; }`],
255
+ 'space-y-4': () => [`> * + * { margin-top: ${getTokenValue('--spacing-4', '1rem')}; }`],
256
+ 'space-y-6': () => [`> * + * { margin-top: ${getTokenValue('--spacing-6', '2.5rem')}; }`],
257
+ 'w-3': () => ['width: 0.75rem'],
258
+ 'h-3': () => ['height: 0.75rem'],
259
+ 'w-4': () => ['width: 1rem'],
260
+ 'h-4': () => ['height: 1rem'],
261
+ 'w-5': () => ['width: 1.25rem'],
262
+ 'h-5': () => ['height: 1.25rem'],
263
+ 'w-6': () => ['width: 1.5rem'],
264
+ 'h-6': () => ['height: 1.5rem'],
265
+ 'w-8': () => [`width: ${getTokenValue('--spacing-8', '2rem')}`],
266
+ 'h-8': () => [`height: ${getTokenValue('--spacing-8', '2rem')}`],
267
+ 'w-12': () => [`width: ${getTokenValue('--spacing-12', '3rem')}`],
268
+ 'h-12': () => [`height: ${getTokenValue('--spacing-12', '3rem')}`],
269
+ 'w-14': () => [`width: ${getTokenValue('--spacing-14', '3.5rem')}`],
270
+ 'h-14': () => [`height: ${getTokenValue('--spacing-14', '3.5rem')}`],
271
+ 'bg-white': () => [`background-color: ${getTokenValue('--white', '#ffffff')}`],
272
+ 'bg-black': () => [`background-color: ${getTokenValue('--black', '#000000')}`],
273
+ 'bg-gray-50': () => [`background-color: ${getTokenValue('--gray-50', '#f9f9f9')}`],
274
+ 'bg-gray-100': () => [`background-color: ${getTokenValue('--gray-100', '#f3f4f6')}`],
275
+ 'bg-gray-300': () => [`background-color: ${getTokenValue('--gray-300', '#d5d8dc')}`],
276
+ 'bg-gray-800': () => [`background-color: ${getTokenValue('--gray-800', '#122be2')}`],
277
+ 'bg-gray-900': () => [`background-color: ${getTokenValue('--gray-900', '#f976f5')}`],
278
+ 'bg-blue-50': () => [`background-color: ${getTokenValue('--blue-50', '#eff6ff')}`],
279
+ 'bg-blue-600': () => [`background-color: ${getTokenValue('--blue-600', '#2563eb')}`],
280
+ 'bg-blue-700': () => ['background-color: #1d4ed8'],
281
+ 'bg-green-600': () => ['background-color: #16a34a'],
282
+ 'bg-red-600': () => ['background-color: #dc2626'],
283
+ 'bg-success-50': () => [`background-color: ${getTokenValue('--success-50', '#f0fdf4')}`],
284
+ 'bg-warning-50': () => [`background-color: ${getTokenValue('--warning-50', '#fffbeb')}`],
285
+ 'bg-error-50': () => [`background-color: ${getTokenValue('--error-50', '#fef2f2')}`],
286
+ 'bg-info-50': () => [`background-color: ${getTokenValue('--info-50', '#eff6ff')}`],
287
+ 'bg-transparent': () => ['background-color: transparent'],
288
+ 'text-white': () => [`color: ${getTokenValue('--white', '#ffffff')}`],
289
+ 'text-black': () => [`color: ${getTokenValue('--black', '#000000')}`],
290
+ 'text-gray-300': () => [`color: ${getTokenValue('--gray-300', '#d5d8dc')}`],
291
+ 'text-gray-500': () => [`color: ${getTokenValue('--gray-500', '#7af202')}`],
292
+ 'text-gray-600': () => [`color: ${getTokenValue('--gray-600', '#4b5563')}`],
293
+ 'text-gray-700': () => [`color: ${getTokenValue('--gray-700', '#374151')}`],
294
+ 'text-gray-800': () => [`color: ${getTokenValue('--gray-800', '#122be2')}`],
295
+ 'text-gray-900': () => [`color: ${getTokenValue('--gray-900', '#f976f5')}`],
296
+ 'text-blue-600': () => [`color: ${getTokenValue('--blue-600', '#2563eb')}`],
297
+ 'text-red-600': () => ['color: #dc2626'],
298
+ 'text-green-600': () => ['color: #16a34a'],
299
+ 'text-success-700': () => [`color: ${getTokenValue('--success-700', '#15803d')}`],
300
+ 'text-warning-700': () => [`color: ${getTokenValue('--warning-700', '#b45309')}`],
301
+ 'text-error-700': () => [`color: ${getTokenValue('--error-700', '#b91c1c')}`],
302
+ 'text-info-700': () => [`color: ${getTokenValue('--info-700', '#1d4ed8')}`],
303
+ 'rounded': () => [`border-radius: ${getTokenValue('--border-radius-md', '0.25rem')}`],
304
+ 'rounded-md': () => [`border-radius: ${getTokenValue('--border-radius-md', '0.375rem')}`],
305
+ 'rounded-lg': () => [`border-radius: ${getTokenValue('--border-radius-lg', '8px')}`],
306
+ 'rounded-xl': () => [`border-radius: ${getTokenValue('--border-radius-xl', '2px')}`],
307
+ 'rounded-2xl': () => [`border-radius: ${getTokenValue('--border-radius-2xl', '16px')}`],
308
+ 'rounded-3xl': () => [`border-radius: ${getTokenValue('--border-radius-3xl', '20px')}`],
309
+ 'rounded-full': () => [`border-radius: ${getTokenValue('--border-radius-full', '50%')}`],
310
+ 'border': () => [`border-width: ${getTokenValue('--border-width-1', '1px')}`, `border-style: ${getTokenValue('--border-style-solid', 'solid')}`, `border-color: ${getTokenValue('--gray-200', '#e5e7eb')}`],
311
+ 'border-2': () => ['border-width: 2px', 'border-style: solid', 'border-color: inherit'],
312
+ 'border-b': () => [`border-bottom-width: ${getTokenValue('--border-width-1', '1px')}`, `border-bottom-style: ${getTokenValue('--border-style-solid', 'solid')}`, `border-bottom-color: ${getTokenValue('--gray-200', '#e5e7eb')}`],
313
+ 'border-t': () => [`border-top-width: ${getTokenValue('--border-width-1', '1px')}`, `border-top-style: ${getTokenValue('--border-style-solid', 'solid')}`, `border-top-color: ${getTokenValue('--gray-200', '#e5e7eb')}`],
314
+ 'border-solid': () => ['border-style: solid'],
315
+ 'border-gray-200': () => [`border-color: ${getTokenValue('--gray-200', '#e5e7eb')}`],
316
+ 'border-gray-300': () => [`border-color: ${getTokenValue('--gray-300', '#d1d5db')}`],
317
+ 'border-gray-400': () => [`border-color: ${getTokenValue('--gray-400', '#9ca3af')}`],
318
+ 'border-blue-600': () => [`border-color: ${getTokenValue('--blue-600', '#2563eb')}`],
319
+ 'border-blue-700': () => ['border-color: #1d4ed8'],
320
+ 'border-red-500': () => ['border-color: #ef4444'],
321
+ 'border-green-600': () => ['border-color: #16a34a'],
322
+ 'border-success-200': () => [`border-color: ${getTokenValue('--success-200', '#bbf7d0')}`],
323
+ 'border-warning-200': () => [`border-color: ${getTokenValue('--warning-200', '#fed7aa')}`],
324
+ 'border-error-200': () => [`border-color: ${getTokenValue('--error-200', '#fecaca')}`],
325
+ 'border-info-200': () => [`border-color: ${getTokenValue('--info-200', '#bfdbfe')}`],
326
+ 'font-sans': () => [`font-family: ${getTokenValue('--font-family-sans', 'Inter, system-ui, sans-serif')}`],
327
+ 'font-mono': () => [`font-family: ${getTokenValue('--font-family-mono', 'ui-monospace, monospace')}`],
328
+ 'font-medium': () => ['font-weight: 500'],
329
+ 'font-semibold': () => [`font-weight: ${getTokenValue('--font-weight-semibold', '600')}`],
330
+ 'font-bold': () => ['font-weight: 700'],
331
+ 'text-xs': () => [`font-size: ${getTokenValue('--font-size-xs', '0.75rem')}`, 'line-height: 1rem'],
332
+ 'text-sm': () => [`font-size: ${getTokenValue('--font-size-sm', '0.875rem')}`, 'line-height: 1.25rem'],
333
+ 'text-base': () => [`font-size: ${getTokenValue('--font-size-base', '1rem')}`, 'line-height: 1.5rem'],
334
+ 'text-lg': () => [`font-size: ${getTokenValue('--font-size-lg', '1.125rem')}`, 'line-height: 1.75rem'],
335
+ 'text-xl': () => ['font-size: 1.25rem', 'line-height: 1.75rem'],
336
+ 'leading-relaxed': () => ['line-height: 1.625'],
337
+ 'shadow-lg': () => [`box-shadow: ${getTokenValue('--shadow-lg', '0 10px 15px -3px rgba(0,0,0,0.1)')}`],
338
+ 'shadow-sm': () => [`box-shadow: ${getTokenValue('--shadow-sm', '0 1px 2px 0 rgba(0,0,0,0.05)')}`],
339
+ 'shadow-soft': () => [`box-shadow: ${getTokenValue('--shadow-soft', '0 4px 20px rgba(0,0,0,0.08)')}`],
340
+ 'shadow-subtle': () => [`box-shadow: ${getTokenValue('--shadow-subtle', '0 2px 10px rgba(0,0,0,0.04)')}`],
341
+ 'transition-colors': () => [`transition-property: color, background-color, border-color, box-shadow`, `transition-duration: ${getTokenValue('--duration-200', '0.2s')}`, `transition-timing-function: ease-in-out`],
342
+ 'transition-all': () => ['transition-property: all', `transition-duration: ${getTokenValue('--duration-200', '0.2s')}`, 'transition-timing-function: ease-in-out'],
343
+ 'transition-opacity': () => ['transition-property: opacity', `transition-duration: ${getTokenValue('--duration-200', '0.2s')}`, 'transition-timing-function: ease-in-out'],
344
+ 'duration-200': () => [`transition-duration: ${getTokenValue('--duration-200', '0.2s')}`],
345
+ 'duration-300': () => ['transition-duration: 0.3s'],
346
+ 'ease-out': () => ['transition-timing-function: cubic-bezier(0, 0, 0.2, 1)'],
347
+ 'transform': () => ['transform: translateX(0) translateY(0) rotate(0) scale(1)'],
348
+ 'cursor-pointer': () => ['cursor: pointer'],
349
+ 'cursor-not-allowed': () => ['cursor: not-allowed'],
350
+ 'pointer-events-none': () => ['pointer-events: none'],
351
+ 'opacity-0': () => ['opacity: 0'],
352
+ 'opacity-100': () => ['opacity: 1'],
353
+ 'outline-none': () => ['outline: 2px solid transparent', 'outline-offset: 2px'],
354
+ 'appearance-none': () => ['appearance: none'],
355
+ 'select-none': () => ['user-select: none'],
356
+ };
357
+ const generator = utilityMap[className];
358
+ return generator ? generator() : [];
359
+ }
360
+ // ─── Component Generation ───────────────────────────────────────────────────
361
+ async generateComponents(components, variables) {
362
+ if (!fs.existsSync(this.outputDir)) {
363
+ fs.mkdirSync(this.outputDir, { recursive: true });
364
+ }
365
+ for (const [componentName, componentData] of Object.entries(components)) {
366
+ await this.generateCompoundComponents(componentName, componentData, variables);
367
+ }
368
+ }
369
+ async generateCompoundComponents(componentName, componentData, variables) {
370
+ // Root: charisol-card, charisol-button, charisol-input …
371
+ await this.generateSingleComponent(componentName, componentData, variables, true);
372
+ // Children: tag is simply charisol-{childNodeKey}
373
+ // e.g. child key "card-container" → charisol-card-container
374
+ // child key "card-header" → charisol-card-header
375
+ // No double-prefixing of the parent name.
376
+ if (componentData.children) {
377
+ for (const [childName, childNode] of Object.entries(componentData.children)) {
378
+ await this.generateSubComponentsRecursive(childName, childNode, variables);
379
+ }
380
+ }
381
+ }
382
+ /**
383
+ * Recursively generate one Stencil component per named node.
384
+ *
385
+ * TAG NAMING:
386
+ * The child node key already carries its full descriptive name, e.g.
387
+ * "card-container", "card-header", "card-header-title".
388
+ * We just prepend the library prefix: charisol-{nodeName}.
389
+ * This prevents the double-name bug (charisol-card-card-container).
390
+ */
391
+ async generateSubComponentsRecursive(nodeName, node, variables) {
392
+ await this.generateSingleComponent(nodeName, node, variables, false);
393
+ if (node.children) {
394
+ for (const [childName, childNode] of Object.entries(node.children)) {
395
+ await this.generateSubComponentsRecursive(childName, childNode, variables);
396
+ }
397
+ }
398
+ }
399
+ /**
400
+ * Core component writer.
401
+ *
402
+ * PURE HTML — every component renders its subtree as real HTML elements.
403
+ * No <charisol-*> tags anywhere in the output TSX.
404
+ *
405
+ * Props exposed on the root element only (text, svgIcon, src, alt, etc.)
406
+ * so users can override defaults. Child nodes always use their design-system
407
+ * defaults since they are rendered inline — users customise via props on the
408
+ * parent or via customStyle/customClass on the parent.
409
+ *
410
+ * TEXT SAFETY — JSON.stringify handles apostrophes and quotes.
411
+ */
412
+ async generateSingleComponent(nodeName, node, variables, isRoot) {
413
+ const kebabTag = `${this.componentPrefix}-${ComponentGeneratorUtils.toKebabCase(nodeName)}`;
414
+ const pascalName = ComponentGeneratorUtils.toPascalCase(nodeName);
415
+ const filePath = path.join(this.outputDir, `${kebabTag}.tsx`);
416
+ const cssPath = path.join(this.outputDir, `${kebabTag}.css`);
417
+ const tag = node.linkedElement?.htmlTag || 'div';
418
+ const attrs = this.processAttributes(node.linkedElement?.attributes || {}, variables);
419
+ const resolvedCls = attrs['class'] || '';
420
+ const SELF_CLOSING = ['img', 'input', 'br', 'hr', 'meta', 'link'];
421
+ const isSelfClosing = SELF_CLOSING.includes(tag);
422
+ const hasChildren = !!(node.children && Object.keys(node.children).length > 0);
423
+ const rawText = node.textContent || '';
424
+ const hasSvg = rawText.includes('<svg');
425
+ const hasText = !!rawText && !hasSvg;
426
+ // Safe strings
427
+ const safeDefaultText = hasText ? JSON.stringify(rawText) : '""';
428
+ const safeSvgLiteral = hasSvg
429
+ ? rawText.replace(/\\/g, '\\\\').replace(/`/g, '\\`').replace(/\$\{/g, '\\${')
430
+ : '';
431
+ // ── Props (on the root element of this component only) ───────────────────
432
+ const propLines = [
433
+ ` @Prop() customClass?: string;`,
434
+ ` @Prop() customStyle?: string;`,
435
+ ];
436
+ if (hasText)
437
+ propLines.push(` @Prop() text?: string;`);
438
+ if (hasSvg)
439
+ propLines.push(` @Prop() svgIcon?: string;`);
440
+ if (tag === 'img') {
441
+ propLines.push(` @Prop() src?: string;`);
442
+ propLines.push(` @Prop() alt?: string;`);
443
+ }
444
+ if (tag === 'input') {
445
+ propLines.push(` @Prop() type?: string;`);
446
+ propLines.push(` @Prop() placeholder?: string;`);
447
+ propLines.push(` @Prop() value?: string;`);
448
+ propLines.push(` @Prop() inputId?: string;`);
449
+ }
450
+ if (tag === 'label')
451
+ propLines.push(` @Prop() htmlFor?: string;`);
452
+ if (tag === 'button') {
453
+ propLines.push(` @Prop() btnType?: string;`);
454
+ propLines.push(` @Prop() ariaLabel?: string;`);
455
+ }
456
+ // ── Children rendered as pure HTML ───────────────────────────────────────
457
+ // Indented at level 4 (inside render → return → root element)
458
+ const childrenHtml = hasChildren
459
+ ? this.buildChildrenJsx(node.children, 4)
460
+ : '';
461
+ // ── Render body ──────────────────────────────────────────────────────────
462
+ const classLine = ` const cls = [${JSON.stringify(resolvedCls)}, this.customClass].filter(Boolean).join(' ');`;
463
+ const styleLine = ` const sty = this.customStyle as any || undefined;`;
464
+ let renderReturn = '';
465
+ if (isSelfClosing) {
466
+ if (tag === 'img') {
467
+ const defSrc = this.safeJsString(attrs['src'] || '');
468
+ const defAlt = this.safeJsString(attrs['alt'] || '');
469
+ renderReturn =
470
+ ` <img
471
+ class={cls}
472
+ src={this.src || ${defSrc}}
473
+ alt={this.alt || ${defAlt}}
474
+ style={sty}
475
+ />`;
476
+ }
477
+ else if (tag === 'input') {
478
+ const defType = this.safeJsString(attrs['type'] || 'text');
479
+ const defPh = this.safeJsString(attrs['placeholder'] || '');
480
+ const defId = this.safeJsString(attrs['id'] || '');
481
+ renderReturn =
482
+ ` <input
483
+ class={cls}
484
+ type={this.type || ${defType}}
485
+ id={this.inputId || ${defId}}
486
+ placeholder={this.placeholder || ${defPh}}
487
+ value={this.value}
488
+ style={sty}
489
+ />`;
490
+ }
491
+ else {
492
+ renderReturn = ` <${tag} class={cls} style={sty} />`;
493
+ }
494
+ }
495
+ else if (hasSvg) {
496
+ // SVG holder — uses innerHTML; user overrides via svgIcon prop
497
+ renderReturn =
498
+ ` <${tag}
499
+ class={cls}
500
+ style={sty}
501
+ innerHTML={this.svgIcon || \`${safeSvgLiteral}\`}
502
+ />`;
503
+ }
504
+ else if (tag === 'label') {
505
+ const defFor = this.safeJsString(attrs['htmlFor'] || attrs['for'] || '');
506
+ const inner = hasText
507
+ ? `{this.text || ${safeDefaultText}}`
508
+ : childrenHtml;
509
+ renderReturn =
510
+ ` <label
511
+ class={cls}
512
+ htmlFor={this.htmlFor || ${defFor}}
513
+ style={sty}
514
+ >
515
+ ${inner}
516
+ </label>`;
517
+ }
518
+ else if (tag === 'button') {
519
+ const defBtnType = this.safeJsString(attrs['type'] || 'button');
520
+ const defAria = this.safeJsString(attrs['aria-label'] || '');
521
+ const inner = hasText
522
+ ? `{this.text || ${safeDefaultText}}`
523
+ : childrenHtml;
524
+ renderReturn =
525
+ ` <button
526
+ class={cls}
527
+ type={this.btnType || ${defBtnType}}
528
+ aria-label={this.ariaLabel || ${defAria}}
529
+ style={sty}
530
+ >
531
+ ${inner}
532
+ </button>`;
533
+ }
534
+ else {
535
+ // div, h1, h2, h3, p, span, section, etc.
536
+ const inner = hasText
537
+ ? `{this.text || ${safeDefaultText}}`
538
+ : childrenHtml;
539
+ renderReturn =
540
+ ` <${tag}
541
+ class={cls}
542
+ style={sty}
543
+ >
544
+ ${inner}
545
+ </${tag}>`;
546
+ }
547
+ // ── Emit file ────────────────────────────────────────────────────────────
548
+ const componentCode = `import { Component, Prop, h } from '@stencil/core';
549
+
550
+ /**
551
+ * ${node.displayName || nodeName}
552
+ * Auto-generated from Charisol Design System
553
+ */
554
+ @Component({
555
+ tag: '${kebabTag}',
556
+ styleUrl: '${kebabTag}.css',
557
+ shadow: true,
558
+ })
559
+ export class ${pascalName} {
560
+ ${propLines.join('\n')}
561
+
562
+ render() {
563
+ ${classLine}
564
+ ${styleLine}
565
+ return (
566
+ ${renderReturn}
567
+ );
568
+ }
569
+ }
570
+ `;
571
+ fs.writeFileSync(cssPath, '/* Styles from global utilities.css */\n');
572
+ fs.writeFileSync(filePath, componentCode);
573
+ this.generatedComponents.set(kebabTag, pascalName);
574
+ console.log(`✅ Generated: ${kebabTag}.tsx`);
575
+ }
576
+ /**
577
+ * Recursively render a node tree as PURE HTML JSX.
578
+ * No <charisol-*> tags — only real HTML elements: <div>, <span>, <button>, <img>, etc.
579
+ *
580
+ * Each node is rendered using its own htmlTag and resolved CSS classes.
581
+ * SVG content is emitted via innerHTML. Text is emitted as a JSX expression.
582
+ * Children are recursed inline.
583
+ */
584
+ renderNodeAsHtml(node, indentLevel) {
585
+ const pad = ' '.repeat(indentLevel);
586
+ const tag = node.linkedElement?.htmlTag || 'div';
587
+ const attrs = this.processAttributes(node.linkedElement?.attributes || {}, this.variables);
588
+ const cls = attrs['class'] || '';
589
+ const SELF_CLOSING = ['img', 'input', 'br', 'hr', 'meta', 'link'];
590
+ const isSC = SELF_CLOSING.includes(tag);
591
+ const rawText = node.textContent || '';
592
+ const hasSvg = rawText.includes('<svg');
593
+ const hasText = !!rawText && !hasSvg;
594
+ const hasChildren = !!(node.children && Object.keys(node.children).length > 0);
595
+ // Build attribute string for this node's HTML tag
596
+ const attrParts = [];
597
+ if (cls)
598
+ attrParts.push(`class="${cls}"`);
599
+ if (tag === 'img') {
600
+ if (attrs['src'])
601
+ attrParts.push(`src="${this.escapeAttrVal(attrs['src'])}"`);
602
+ if (attrs['alt'])
603
+ attrParts.push(`alt="${this.escapeAttrVal(attrs['alt'])}"`);
604
+ }
605
+ if (tag === 'input') {
606
+ if (attrs['type'])
607
+ attrParts.push(`type="${this.escapeAttrVal(attrs['type'])}"`);
608
+ if (attrs['placeholder'])
609
+ attrParts.push(`placeholder="${this.escapeAttrVal(attrs['placeholder'])}"`);
610
+ if (attrs['id'])
611
+ attrParts.push(`id="${this.escapeAttrVal(attrs['id'])}"`);
612
+ }
613
+ if (tag === 'label') {
614
+ const forVal = attrs['htmlFor'] || attrs['for'];
615
+ if (forVal)
616
+ attrParts.push(`htmlFor="${this.escapeAttrVal(forVal)}"`);
617
+ }
618
+ if (tag === 'button') {
619
+ attrParts.push(`type="${this.escapeAttrVal(attrs['type'] || 'button')}"`);
620
+ if (attrs['aria-label'])
621
+ attrParts.push(`aria-label="${this.escapeAttrVal(attrs['aria-label'])}"`);
622
+ }
623
+ if (hasSvg) {
624
+ // innerHTML will be set; no extra attrs needed
625
+ }
626
+ const attrStr = attrParts.length > 0 ? ' ' + attrParts.join(' ') : '';
627
+ // ── Self-closing ──────────────────────────────────────────────────────────
628
+ if (isSC) {
629
+ return `${pad}<${tag}${attrStr} />`;
630
+ }
631
+ // ── SVG holder — use innerHTML ────────────────────────────────────────────
632
+ if (hasSvg) {
633
+ const safeSvg = rawText.replace(/\\/g, '\\\\').replace(/`/g, '\\`').replace(/\$\{/g, '\\${');
634
+ return `${pad}<${tag}${attrStr} innerHTML={\`${safeSvg}\`} />`;
635
+ }
636
+ // ── Open tag ──────────────────────────────────────────────────────────────
637
+ const lines = [];
638
+ lines.push(`${pad}<${tag}${attrStr}>`);
639
+ // ── Text content ──────────────────────────────────────────────────────────
640
+ if (hasText) {
641
+ lines.push(`${pad} {${JSON.stringify(rawText)}}`);
642
+ }
643
+ // ── Children ──────────────────────────────────────────────────────────────
644
+ if (hasChildren) {
645
+ for (const childNode of Object.values(node.children)) {
646
+ lines.push(this.renderNodeAsHtml(childNode, indentLevel + 1));
647
+ }
648
+ }
649
+ lines.push(`${pad}</${tag}>`);
650
+ return lines.join('\n');
651
+ }
652
+ /**
653
+ * Build children JSX by rendering each child node as pure HTML.
654
+ * Called from generateSingleComponent for container nodes.
655
+ */
656
+ buildChildrenJsx(children, indentLevel) {
657
+ return Object.values(children)
658
+ .map(child => this.renderNodeAsHtml(child, indentLevel))
659
+ .join('\n');
660
+ }
661
+ // ─── String helpers ──────────────────────────────────────────────────────────
662
+ /**
663
+ * Produce a safe JS string literal using JSON.stringify.
664
+ * Used inside JSX expressions: src={this.src || "default"}
665
+ */
666
+ safeJsString(value) {
667
+ return JSON.stringify(value);
668
+ }
669
+ /**
670
+ * Escape a value for embedding inside a JSX attribute double-quoted string.
671
+ * e.g. class="foo &amp; bar"
672
+ */
673
+ escapeAttrVal(value) {
674
+ return (value || '')
675
+ .replace(/&/g, '&amp;')
676
+ .replace(/"/g, '&quot;');
677
+ }
678
+ processAttributes(attributes = {}, variables) {
679
+ const processed = {};
680
+ for (const [key, value] of Object.entries(attributes)) {
681
+ if (key === 'class') {
682
+ processed[key] = this.resolveClassReferences(value);
683
+ }
684
+ else if (key === 'style') {
685
+ processed[key] = this.resolveStyleValue(value, variables);
686
+ }
687
+ else {
688
+ processed[key] = this.resolveAttributeValue(value, variables);
689
+ }
690
+ }
691
+ return processed;
692
+ }
693
+ resolveStyleValue(value, variables) {
694
+ if (!value)
695
+ return '';
696
+ const varMatch = value.match(/var\(--([^)]+)\)/);
697
+ if (varMatch) {
698
+ const tokenName = `--${varMatch[1]}`;
699
+ const token = variables[tokenName];
700
+ if (token) {
701
+ let v = token.value;
702
+ if (token.unit && token.type === 'dimension' && !v.includes(token.unit))
703
+ v = `${v}${token.unit}`;
704
+ return v;
705
+ }
706
+ }
707
+ return value;
708
+ }
709
+ resolveAttributeValue(value, variables) {
710
+ if (!value)
711
+ return '';
712
+ const varMatch = value.match(/var\(--([^)]+)\)/);
713
+ if (varMatch) {
714
+ const tokenName = `--${varMatch[1]}`;
715
+ const token = variables[tokenName];
716
+ if (token)
717
+ return token.value;
718
+ }
719
+ return value;
720
+ }
721
+ buildAttributeString(attributes) {
722
+ return Object.entries(attributes)
723
+ .filter(([, v]) => v && v.trim() !== '')
724
+ .map(([k, v]) => ` ${k}="${v}"`)
725
+ .join('');
726
+ }
727
+ // ─── Index ───────────────────────────────────────────────────────────────────
728
+ async updateComponentIndex() {
729
+ const exportLines = [];
730
+ for (const [tagName, className] of this.generatedComponents.entries()) {
731
+ exportLines.push(`export { ${className} } from './${tagName}';`);
732
+ }
733
+ const generatedIndexPath = path.join(this.outputDir, 'index.ts');
734
+ fs.writeFileSync(generatedIndexPath, exportLines.join('\n') + '\n');
735
+ const mainIndexPath = path.join(process.cwd(), 'src', 'components', 'index.ts');
736
+ fs.mkdirSync(path.dirname(mainIndexPath), { recursive: true });
737
+ fs.writeFileSync(mainIndexPath, `// Auto-generated component index\nexport * from './generated/index';\n`);
738
+ }
739
+ }
740
+ if (require.main === module) {
741
+ const generator = new StencilComponentGenerator();
742
+ generator.generateAllComponents().catch(console.error);
743
+ }
744
+ export { StencilComponentGenerator };