@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.
- package/dist/charde/charde.css +1775 -0
- package/dist/charde/charde.esm.js +1 -0
- package/dist/charde/index.esm.js +2 -0
- package/dist/charde/p-0194d6e2.entry.js +1 -0
- package/dist/charde/p-0268cd80.entry.js +1 -0
- package/dist/charde/p-03cd8b15.entry.js +1 -0
- package/dist/charde/p-04566ad1.entry.js +1 -0
- package/dist/charde/p-04d6bfd5.entry.js +1 -0
- package/dist/charde/p-066b15c3.entry.js +1 -0
- package/dist/charde/p-067ef228.entry.js +1 -0
- package/dist/charde/p-09424a11.entry.js +1 -0
- package/dist/charde/p-09aa135c.entry.js +1 -0
- package/dist/charde/p-09ebd779.entry.js +1 -0
- package/dist/charde/p-0d3074a3.entry.js +1 -0
- package/dist/charde/p-139e543c.entry.js +1 -0
- package/dist/charde/p-15afafb1.entry.js +1 -0
- package/dist/charde/p-17511150.entry.js +1 -0
- package/dist/charde/p-184bed27.entry.js +1 -0
- package/dist/charde/p-1e2849e0.entry.js +1 -0
- package/dist/charde/p-1f3760d6.entry.js +1 -0
- package/dist/charde/p-1f600e6b.entry.js +1 -0
- package/dist/charde/p-20670731.entry.js +1 -0
- package/dist/charde/p-222b8212.entry.js +1 -0
- package/dist/charde/p-224f260a.entry.js +1 -0
- package/dist/charde/p-22af325f.entry.js +1 -0
- package/dist/charde/p-24686bd8.entry.js +1 -0
- package/dist/charde/p-24da97c4.entry.js +1 -0
- package/dist/charde/p-24f49f2d.entry.js +1 -0
- package/dist/charde/p-2c612ca4.entry.js +1 -0
- package/dist/charde/p-2dbf1cb7.entry.js +1 -0
- package/dist/charde/p-2e41c51d.entry.js +1 -0
- package/dist/charde/p-3182d80c.entry.js +1 -0
- package/dist/charde/p-335c0fd8.entry.js +1 -0
- package/dist/charde/p-365e8679.entry.js +1 -0
- package/dist/charde/p-36b00f23.entry.js +1 -0
- package/dist/charde/p-36b25b8f.entry.js +1 -0
- package/dist/charde/p-3b08f29c.entry.js +1 -0
- package/dist/charde/p-3b5b48f3.entry.js +1 -0
- package/dist/charde/p-3bfba656.entry.js +1 -0
- package/dist/charde/p-3f2bd134.entry.js +1 -0
- package/dist/charde/p-40542282.entry.js +1 -0
- package/dist/charde/p-411df8a1.entry.js +1 -0
- package/dist/charde/p-41f93738.entry.js +1 -0
- package/dist/charde/p-480ca83c.entry.js +1 -0
- package/dist/charde/p-491913d3.entry.js +1 -0
- package/dist/charde/p-4b1f1b78.entry.js +1 -0
- package/dist/charde/p-4bfeda7f.entry.js +1 -0
- package/dist/charde/p-4c54d9ad.entry.js +1 -0
- package/dist/charde/p-4e177b89.entry.js +1 -0
- package/dist/charde/p-5261a835.entry.js +1 -0
- package/dist/charde/p-55d378a3.entry.js +1 -0
- package/dist/charde/p-6094c178.entry.js +1 -0
- package/dist/charde/p-60ca72dc.entry.js +1 -0
- package/dist/charde/p-62185de3.entry.js +1 -0
- package/dist/charde/p-62ee5694.entry.js +1 -0
- package/dist/charde/p-6340d5c0.entry.js +1 -0
- package/dist/charde/p-6429b7eb.entry.js +1 -0
- package/dist/charde/p-64338c8f.entry.js +1 -0
- package/dist/charde/p-6697ac70.entry.js +1 -0
- package/dist/charde/p-669bc008.entry.js +1 -0
- package/dist/charde/p-66dcfd9f.entry.js +1 -0
- package/dist/charde/p-69925849.entry.js +1 -0
- package/dist/charde/p-6b98dcdf.entry.js +1 -0
- package/dist/charde/p-6c6e0415.entry.js +1 -0
- package/dist/charde/p-6f253925.entry.js +1 -0
- package/dist/charde/p-6f53f078.entry.js +1 -0
- package/dist/charde/p-729e42e1.entry.js +1 -0
- package/dist/charde/p-74748c9a.entry.js +1 -0
- package/dist/charde/p-74e572a1.entry.js +1 -0
- package/dist/charde/p-76e192bf.entry.js +1 -0
- package/dist/charde/p-77841ee4.entry.js +1 -0
- package/dist/charde/p-780e7264.entry.js +1 -0
- package/dist/charde/p-791ff255.entry.js +1 -0
- package/dist/charde/p-7b3e7e84.entry.js +1 -0
- package/dist/charde/p-7b68153c.entry.js +1 -0
- package/dist/charde/p-7c759df9.entry.js +1 -0
- package/dist/charde/p-83dc677c.entry.js +1 -0
- package/dist/charde/p-85d001e2.entry.js +1 -0
- package/dist/charde/p-8eb2c3aa.entry.js +1 -0
- package/dist/charde/p-8ecb0f5b.entry.js +1 -0
- package/dist/charde/p-8f55275a.entry.js +1 -0
- package/dist/charde/p-91209ae9.entry.js +1 -0
- package/dist/charde/p-9680ffb6.entry.js +1 -0
- package/dist/charde/p-9695ef45.entry.js +1 -0
- package/dist/charde/p-996342d2.entry.js +1 -0
- package/dist/charde/p-9b4de166.entry.js +1 -0
- package/dist/charde/p-9e61fe0e.entry.js +1 -0
- package/dist/charde/p-DhW431pq.js +1 -0
- package/dist/charde/p-a23c8d7c.entry.js +1 -0
- package/dist/charde/p-a2cd0e39.entry.js +1 -0
- package/dist/charde/p-a36f9ca5.entry.js +1 -0
- package/dist/charde/p-a4bba299.entry.js +1 -0
- package/dist/charde/p-a7b721ba.entry.js +1 -0
- package/dist/charde/p-ae7bd699.entry.js +1 -0
- package/dist/charde/p-b4f6e083.entry.js +1 -0
- package/dist/charde/p-bc28f8f2.entry.js +1 -0
- package/dist/charde/p-bee2ade3.entry.js +1 -0
- package/dist/charde/p-bf1328b7.entry.js +1 -0
- package/dist/charde/p-c30125e4.entry.js +1 -0
- package/dist/charde/p-c4276924.entry.js +1 -0
- package/dist/charde/p-c7f679f7.entry.js +1 -0
- package/dist/charde/p-cb0a18c5.entry.js +1 -0
- package/dist/charde/p-cb75e2f2.entry.js +1 -0
- package/dist/charde/p-cd12f7a1.entry.js +1 -0
- package/dist/charde/p-ceb31adb.entry.js +1 -0
- package/dist/charde/p-cf7b84e1.entry.js +1 -0
- package/dist/charde/p-d11bbf41.entry.js +1 -0
- package/dist/charde/p-d33c2219.entry.js +1 -0
- package/dist/charde/p-d343b42e.entry.js +1 -0
- package/dist/charde/p-d38f5f34.entry.js +1 -0
- package/dist/charde/p-d87c8b54.entry.js +1 -0
- package/dist/charde/p-d922b748.entry.js +1 -0
- package/dist/charde/p-d9297726.entry.js +1 -0
- package/dist/charde/p-d97a17e5.entry.js +1 -0
- package/dist/charde/p-da780497.entry.js +1 -0
- package/dist/charde/p-dddaa989.entry.js +1 -0
- package/dist/charde/p-e0f3571b.entry.js +1 -0
- package/dist/charde/p-e1272c1d.entry.js +1 -0
- package/dist/charde/p-e2bb7798.entry.js +1 -0
- package/dist/charde/p-e5ce0025.entry.js +1 -0
- package/dist/charde/p-e637c524.entry.js +1 -0
- package/dist/charde/p-e86ed169.entry.js +1 -0
- package/dist/charde/p-eaf9bff6.entry.js +1 -0
- package/dist/charde/p-ecb5e2bc.entry.js +1 -0
- package/dist/charde/p-ed21e36a.entry.js +1 -0
- package/dist/charde/p-edfc4008.entry.js +1 -0
- package/dist/charde/p-eea31a17.entry.js +1 -0
- package/dist/charde/p-f073a6fd.entry.js +1 -0
- package/dist/charde/p-f3be7834.entry.js +1 -0
- package/dist/charde/p-fd5d233d.entry.js +1 -0
- package/dist/charde/p-fed01765.entry.js +1 -0
- package/dist/charde/p-ff14a778.entry.js +1 -0
- package/dist/charde/p-jZlebn0H.js +2 -0
- package/dist/cjs/charde.cjs.js +24 -0
- package/dist/cjs/chardes-alert-close-button.cjs.entry.js +23 -0
- package/dist/cjs/chardes-alert-content.cjs.entry.js +22 -0
- package/dist/cjs/chardes-alert-error.cjs.entry.js +21 -0
- package/dist/cjs/chardes-alert-header.cjs.entry.js +21 -0
- package/dist/cjs/chardes-alert-icon.cjs.entry.js +22 -0
- package/dist/cjs/chardes-alert-success.cjs.entry.js +21 -0
- package/dist/cjs/chardes-alert-title-container.cjs.entry.js +21 -0
- package/dist/cjs/chardes-alert-title.cjs.entry.js +22 -0
- package/dist/cjs/chardes-alert-warning.cjs.entry.js +21 -0
- package/dist/cjs/chardes-alerts.cjs.entry.js +21 -0
- package/dist/cjs/chardes-badge-close-button.cjs.entry.js +23 -0
- package/dist/cjs/chardes-badge-error.cjs.entry.js +22 -0
- package/dist/cjs/chardes-badge-group.cjs.entry.js +21 -0
- package/dist/cjs/chardes-badge-icon.cjs.entry.js +22 -0
- package/dist/cjs/chardes-badge-interactive-text.cjs.entry.js +22 -0
- package/dist/cjs/chardes-badge-interactive.cjs.entry.js +21 -0
- package/dist/cjs/chardes-badge-outline.cjs.entry.js +22 -0
- package/dist/cjs/chardes-badge-primary.cjs.entry.js +22 -0
- package/dist/cjs/chardes-badge-secondary.cjs.entry.js +22 -0
- package/dist/cjs/chardes-badge-success.cjs.entry.js +22 -0
- package/dist/cjs/chardes-badge-text.cjs.entry.js +22 -0
- package/dist/cjs/chardes-badge-warning.cjs.entry.js +22 -0
- package/dist/cjs/chardes-badge-with-icon.cjs.entry.js +21 -0
- package/dist/cjs/chardes-badge.cjs.entry.js +21 -0
- package/dist/cjs/chardes-button_4.cjs.entry.js +76 -0
- package/dist/cjs/chardes-card-body-action-button-1.cjs.entry.js +23 -0
- package/dist/cjs/chardes-card-body-action-button-2.cjs.entry.js +23 -0
- package/dist/cjs/chardes-card-body-action-icon-1.cjs.entry.js +22 -0
- package/dist/cjs/chardes-card-body-action-icon-2.cjs.entry.js +22 -0
- package/dist/cjs/chardes-card-body-actions.cjs.entry.js +21 -0
- package/dist/cjs/chardes-card-body-driver.cjs.entry.js +21 -0
- package/dist/cjs/chardes-card-body-img.cjs.entry.js +23 -0
- package/dist/cjs/chardes-card-body-info.cjs.entry.js +21 -0
- package/dist/cjs/chardes-card-body-name.cjs.entry.js +22 -0
- package/dist/cjs/chardes-card-body-span.cjs.entry.js +22 -0
- package/dist/cjs/chardes-card-body.cjs.entry.js +21 -0
- package/dist/cjs/chardes-card-container.cjs.entry.js +21 -0
- package/dist/cjs/chardes-card-header-content.cjs.entry.js +21 -0
- package/dist/cjs/chardes-card-header-timer.cjs.entry.js +22 -0
- package/dist/cjs/chardes-card-header-title.cjs.entry.js +22 -0
- package/dist/cjs/chardes-card-header.cjs.entry.js +21 -0
- package/dist/cjs/chardes-card-icon-container.cjs.entry.js +21 -0
- package/dist/cjs/chardes-card-number.cjs.entry.js +22 -0
- package/dist/cjs/chardes-card-payment-container.cjs.entry.js +21 -0
- package/dist/cjs/chardes-card-payment-content.cjs.entry.js +21 -0
- package/dist/cjs/chardes-card-payment-details.cjs.entry.js +21 -0
- package/dist/cjs/chardes-card-payment-icon-container.cjs.entry.js +21 -0
- package/dist/cjs/chardes-card-payment.cjs.entry.js +21 -0
- package/dist/cjs/chardes-card-route-container.cjs.entry.js +21 -0
- package/dist/cjs/chardes-card-route-destination-address.cjs.entry.js +22 -0
- package/dist/cjs/chardes-card-route-destination-details.cjs.entry.js +21 -0
- package/dist/cjs/chardes-card-route-destination-icon-container.cjs.entry.js +21 -0
- package/dist/cjs/chardes-card-route-destination-icon.cjs.entry.js +21 -0
- package/dist/cjs/chardes-card-route-destination-label.cjs.entry.js +22 -0
- package/dist/cjs/chardes-card-route-destination.cjs.entry.js +21 -0
- package/dist/cjs/chardes-card-route-pickup-address.cjs.entry.js +22 -0
- package/dist/cjs/chardes-card-route-pickup-details.cjs.entry.js +21 -0
- package/dist/cjs/chardes-card-route-pickup-icon.cjs.entry.js +21 -0
- package/dist/cjs/chardes-card-route-pickup-label.cjs.entry.js +22 -0
- package/dist/cjs/chardes-card-route-pickup.cjs.entry.js +21 -0
- package/dist/cjs/chardes-card-route.cjs.entry.js +21 -0
- package/dist/cjs/chardes-card-total-amount.cjs.entry.js +22 -0
- package/dist/cjs/chardes-card-total-content.cjs.entry.js +21 -0
- package/dist/cjs/chardes-card-total-label.cjs.entry.js +22 -0
- package/dist/cjs/chardes-card-total-section.cjs.entry.js +21 -0
- package/dist/cjs/chardes-card-type.cjs.entry.js +22 -0
- package/dist/cjs/chardes-checkbox-checkmark.cjs.entry.js +21 -0
- package/dist/cjs/chardes-checkbox-input-wrapper.cjs.entry.js +21 -0
- package/dist/cjs/chardes-checkbox-input.cjs.entry.js +25 -0
- package/dist/cjs/chardes-checkbox-label.cjs.entry.js +22 -0
- package/dist/cjs/chardes-checkmark-svg.cjs.entry.js +21 -0
- package/dist/cjs/chardes-close-icon.cjs.entry.js +22 -0
- package/dist/cjs/chardes-error-icon-svg.cjs.entry.js +22 -0
- package/dist/cjs/chardes-error-input-icon.cjs.entry.js +21 -0
- package/dist/cjs/chardes-error-input-wrapper.cjs.entry.js +21 -0
- package/dist/cjs/chardes-error-input.cjs.entry.js +26 -0
- package/dist/cjs/chardes-error-label.cjs.entry.js +23 -0
- package/dist/cjs/chardes-error-message.cjs.entry.js +22 -0
- package/dist/cjs/chardes-error-state.cjs.entry.js +21 -0
- package/dist/cjs/chardes-form-group.cjs.entry.js +21 -0
- package/dist/cjs/chardes-form-input.cjs.entry.js +25 -0
- package/dist/cjs/chardes-form-label.cjs.entry.js +23 -0
- package/dist/cjs/chardes-group-badge-1.cjs.entry.js +22 -0
- package/dist/cjs/chardes-group-badge-2.cjs.entry.js +22 -0
- package/dist/cjs/chardes-group-badge-3.cjs.entry.js +22 -0
- package/dist/cjs/chardes-group-badge-4.cjs.entry.js +22 -0
- package/dist/cjs/chardes-icon-svg-destination.cjs.entry.js +22 -0
- package/dist/cjs/chardes-icon-svg-pickup.cjs.entry.js +22 -0
- package/dist/cjs/chardes-icon-svg.cjs.entry.js +22 -0
- package/dist/cjs/chardes-input-element.cjs.entry.js +26 -0
- package/dist/cjs/chardes-input-field-wrapper.cjs.entry.js +21 -0
- package/dist/cjs/chardes-input-helper.cjs.entry.js +22 -0
- package/dist/cjs/chardes-input-icon.cjs.entry.js +21 -0
- package/dist/cjs/chardes-input-label.cjs.entry.js +23 -0
- package/dist/cjs/chardes-input-states.cjs.entry.js +21 -0
- package/dist/cjs/chardes-input-wrapper.cjs.entry.js +21 -0
- package/dist/cjs/chardes-modal-body.cjs.entry.js +21 -0
- package/dist/cjs/chardes-modal-cancel-button.cjs.entry.js +24 -0
- package/dist/cjs/chardes-modal-close-button.cjs.entry.js +23 -0
- package/dist/cjs/chardes-modal-confirm-button.cjs.entry.js +24 -0
- package/dist/cjs/chardes-modal-container.cjs.entry.js +21 -0
- package/dist/cjs/chardes-modal-content.cjs.entry.js +22 -0
- package/dist/cjs/chardes-modal-footer.cjs.entry.js +21 -0
- package/dist/cjs/chardes-modal-form.cjs.entry.js +21 -0
- package/dist/cjs/chardes-modal-header.cjs.entry.js +21 -0
- package/dist/cjs/chardes-modal-title.cjs.entry.js +22 -0
- package/dist/cjs/chardes-modal.cjs.entry.js +21 -0
- package/dist/cjs/chardes-muzingo-primary-button.cjs.entry.js +21 -0
- package/dist/cjs/chardes-muzingo.cjs.entry.js +25 -0
- package/dist/cjs/chardes-notification-toast.cjs.entry.js +21 -0
- package/dist/cjs/chardes-payment-icon.cjs.entry.js +22 -0
- package/dist/cjs/chardes-success-icon-svg.cjs.entry.js +22 -0
- package/dist/cjs/chardes-success-input-icon.cjs.entry.js +21 -0
- package/dist/cjs/chardes-success-input-wrapper.cjs.entry.js +21 -0
- package/dist/cjs/chardes-success-input.cjs.entry.js +26 -0
- package/dist/cjs/chardes-success-label.cjs.entry.js +23 -0
- package/dist/cjs/chardes-success-message.cjs.entry.js +22 -0
- package/dist/cjs/chardes-success-state.cjs.entry.js +21 -0
- package/dist/cjs/chardes-toast-action-button.cjs.entry.js +24 -0
- package/dist/cjs/chardes-toast-actions.cjs.entry.js +21 -0
- package/dist/cjs/chardes-toast-content.cjs.entry.js +22 -0
- package/dist/cjs/chardes-toast-dismiss-button.cjs.entry.js +24 -0
- package/dist/cjs/chardes-toast-header.cjs.entry.js +21 -0
- package/dist/cjs/chardes-toast-icon.cjs.entry.js +22 -0
- package/dist/cjs/chardes-toast-timestamp.cjs.entry.js +22 -0
- package/dist/cjs/chardes-toast-title-container.cjs.entry.js +21 -0
- package/dist/cjs/chardes-toast-title.cjs.entry.js +22 -0
- package/dist/cjs/index-Buq98cwc.js +1426 -0
- package/dist/cjs/index.cjs.js +4880 -0
- package/dist/cjs/loader.cjs.js +12 -0
- package/dist/cjs/my-component.cjs.entry.js +33 -0
- package/dist/cjs/utils-v2Yks-1k.js +7 -0
- package/dist/collection/collection-manifest.json +143 -0
- package/dist/collection/components/generated/chardes-alert-close-button.css +1 -0
- package/dist/collection/components/generated/chardes-alert-close-button.js +108 -0
- package/dist/collection/components/generated/chardes-alert-content.css +1 -0
- package/dist/collection/components/generated/chardes-alert-content.js +88 -0
- package/dist/collection/components/generated/chardes-alert-error.css +1 -0
- package/dist/collection/components/generated/chardes-alert-error.js +68 -0
- package/dist/collection/components/generated/chardes-alert-header.css +1 -0
- package/dist/collection/components/generated/chardes-alert-header.js +68 -0
- package/dist/collection/components/generated/chardes-alert-icon.css +1 -0
- package/dist/collection/components/generated/chardes-alert-icon.js +88 -0
- package/dist/collection/components/generated/chardes-alert-success.css +1 -0
- package/dist/collection/components/generated/chardes-alert-success.js +68 -0
- package/dist/collection/components/generated/chardes-alert-title-container.css +1 -0
- package/dist/collection/components/generated/chardes-alert-title-container.js +68 -0
- package/dist/collection/components/generated/chardes-alert-title.css +1 -0
- package/dist/collection/components/generated/chardes-alert-title.js +88 -0
- package/dist/collection/components/generated/chardes-alert-warning.css +1 -0
- package/dist/collection/components/generated/chardes-alert-warning.js +68 -0
- package/dist/collection/components/generated/chardes-alerts.css +1 -0
- package/dist/collection/components/generated/chardes-alerts.js +68 -0
- package/dist/collection/components/generated/chardes-badge-close-button.css +1 -0
- package/dist/collection/components/generated/chardes-badge-close-button.js +108 -0
- package/dist/collection/components/generated/chardes-badge-error.css +1 -0
- package/dist/collection/components/generated/chardes-badge-error.js +88 -0
- package/dist/collection/components/generated/chardes-badge-group.css +1 -0
- package/dist/collection/components/generated/chardes-badge-group.js +68 -0
- package/dist/collection/components/generated/chardes-badge-icon.css +1 -0
- package/dist/collection/components/generated/chardes-badge-icon.js +88 -0
- package/dist/collection/components/generated/chardes-badge-interactive-text.css +1 -0
- package/dist/collection/components/generated/chardes-badge-interactive-text.js +88 -0
- package/dist/collection/components/generated/chardes-badge-interactive.css +1 -0
- package/dist/collection/components/generated/chardes-badge-interactive.js +68 -0
- package/dist/collection/components/generated/chardes-badge-outline.css +1 -0
- package/dist/collection/components/generated/chardes-badge-outline.js +88 -0
- package/dist/collection/components/generated/chardes-badge-primary.css +1 -0
- package/dist/collection/components/generated/chardes-badge-primary.js +88 -0
- package/dist/collection/components/generated/chardes-badge-secondary.css +1 -0
- package/dist/collection/components/generated/chardes-badge-secondary.js +88 -0
- package/dist/collection/components/generated/chardes-badge-success.css +1 -0
- package/dist/collection/components/generated/chardes-badge-success.js +88 -0
- package/dist/collection/components/generated/chardes-badge-text.css +1 -0
- package/dist/collection/components/generated/chardes-badge-text.js +88 -0
- package/dist/collection/components/generated/chardes-badge-warning.css +1 -0
- package/dist/collection/components/generated/chardes-badge-warning.js +88 -0
- package/dist/collection/components/generated/chardes-badge-with-icon.css +1 -0
- package/dist/collection/components/generated/chardes-badge-with-icon.js +68 -0
- package/dist/collection/components/generated/chardes-badge.css +1 -0
- package/dist/collection/components/generated/chardes-badge.js +68 -0
- package/dist/collection/components/generated/chardes-button.css +1 -0
- package/dist/collection/components/generated/chardes-button.js +128 -0
- package/dist/collection/components/generated/chardes-card-body-action-button-1.css +1 -0
- package/dist/collection/components/generated/chardes-card-body-action-button-1.js +108 -0
- package/dist/collection/components/generated/chardes-card-body-action-button-2.css +1 -0
- package/dist/collection/components/generated/chardes-card-body-action-button-2.js +108 -0
- package/dist/collection/components/generated/chardes-card-body-action-icon-1.css +1 -0
- package/dist/collection/components/generated/chardes-card-body-action-icon-1.js +88 -0
- package/dist/collection/components/generated/chardes-card-body-action-icon-2.css +1 -0
- package/dist/collection/components/generated/chardes-card-body-action-icon-2.js +88 -0
- package/dist/collection/components/generated/chardes-card-body-actions.css +1 -0
- package/dist/collection/components/generated/chardes-card-body-actions.js +68 -0
- package/dist/collection/components/generated/chardes-card-body-driver.css +1 -0
- package/dist/collection/components/generated/chardes-card-body-driver.js +68 -0
- package/dist/collection/components/generated/chardes-card-body-img.css +1 -0
- package/dist/collection/components/generated/chardes-card-body-img.js +108 -0
- package/dist/collection/components/generated/chardes-card-body-info.css +1 -0
- package/dist/collection/components/generated/chardes-card-body-info.js +68 -0
- package/dist/collection/components/generated/chardes-card-body-name.css +1 -0
- package/dist/collection/components/generated/chardes-card-body-name.js +88 -0
- package/dist/collection/components/generated/chardes-card-body-span.css +1 -0
- package/dist/collection/components/generated/chardes-card-body-span.js +88 -0
- package/dist/collection/components/generated/chardes-card-body.css +1 -0
- package/dist/collection/components/generated/chardes-card-body.js +68 -0
- package/dist/collection/components/generated/chardes-card-container.css +1 -0
- package/dist/collection/components/generated/chardes-card-container.js +68 -0
- package/dist/collection/components/generated/chardes-card-header-content.css +1 -0
- package/dist/collection/components/generated/chardes-card-header-content.js +68 -0
- package/dist/collection/components/generated/chardes-card-header-timer.css +1 -0
- package/dist/collection/components/generated/chardes-card-header-timer.js +88 -0
- package/dist/collection/components/generated/chardes-card-header-title.css +1 -0
- package/dist/collection/components/generated/chardes-card-header-title.js +88 -0
- package/dist/collection/components/generated/chardes-card-header.css +1 -0
- package/dist/collection/components/generated/chardes-card-header.js +68 -0
- package/dist/collection/components/generated/chardes-card-icon-container.css +1 -0
- package/dist/collection/components/generated/chardes-card-icon-container.js +68 -0
- package/dist/collection/components/generated/chardes-card-number.css +1 -0
- package/dist/collection/components/generated/chardes-card-number.js +88 -0
- package/dist/collection/components/generated/chardes-card-payment-container.css +1 -0
- package/dist/collection/components/generated/chardes-card-payment-container.js +68 -0
- package/dist/collection/components/generated/chardes-card-payment-content.css +1 -0
- package/dist/collection/components/generated/chardes-card-payment-content.js +68 -0
- package/dist/collection/components/generated/chardes-card-payment-details.css +1 -0
- package/dist/collection/components/generated/chardes-card-payment-details.js +68 -0
- package/dist/collection/components/generated/chardes-card-payment-icon-container.css +1 -0
- package/dist/collection/components/generated/chardes-card-payment-icon-container.js +68 -0
- package/dist/collection/components/generated/chardes-card-payment.css +1 -0
- package/dist/collection/components/generated/chardes-card-payment.js +68 -0
- package/dist/collection/components/generated/chardes-card-route-container.css +1 -0
- package/dist/collection/components/generated/chardes-card-route-container.js +68 -0
- package/dist/collection/components/generated/chardes-card-route-destination-address.css +1 -0
- package/dist/collection/components/generated/chardes-card-route-destination-address.js +88 -0
- package/dist/collection/components/generated/chardes-card-route-destination-details.css +1 -0
- package/dist/collection/components/generated/chardes-card-route-destination-details.js +68 -0
- package/dist/collection/components/generated/chardes-card-route-destination-icon-container.css +1 -0
- package/dist/collection/components/generated/chardes-card-route-destination-icon-container.js +68 -0
- package/dist/collection/components/generated/chardes-card-route-destination-icon.css +1 -0
- package/dist/collection/components/generated/chardes-card-route-destination-icon.js +68 -0
- package/dist/collection/components/generated/chardes-card-route-destination-label.css +1 -0
- package/dist/collection/components/generated/chardes-card-route-destination-label.js +88 -0
- package/dist/collection/components/generated/chardes-card-route-destination.css +1 -0
- package/dist/collection/components/generated/chardes-card-route-destination.js +68 -0
- package/dist/collection/components/generated/chardes-card-route-pickup-address.css +1 -0
- package/dist/collection/components/generated/chardes-card-route-pickup-address.js +88 -0
- package/dist/collection/components/generated/chardes-card-route-pickup-details.css +1 -0
- package/dist/collection/components/generated/chardes-card-route-pickup-details.js +68 -0
- package/dist/collection/components/generated/chardes-card-route-pickup-icon.css +1 -0
- package/dist/collection/components/generated/chardes-card-route-pickup-icon.js +68 -0
- package/dist/collection/components/generated/chardes-card-route-pickup-label.css +1 -0
- package/dist/collection/components/generated/chardes-card-route-pickup-label.js +88 -0
- package/dist/collection/components/generated/chardes-card-route-pickup.css +1 -0
- package/dist/collection/components/generated/chardes-card-route-pickup.js +68 -0
- package/dist/collection/components/generated/chardes-card-route.css +1 -0
- package/dist/collection/components/generated/chardes-card-route.js +68 -0
- package/dist/collection/components/generated/chardes-card-total-amount.css +1 -0
- package/dist/collection/components/generated/chardes-card-total-amount.js +88 -0
- package/dist/collection/components/generated/chardes-card-total-content.css +1 -0
- package/dist/collection/components/generated/chardes-card-total-content.js +68 -0
- package/dist/collection/components/generated/chardes-card-total-label.css +1 -0
- package/dist/collection/components/generated/chardes-card-total-label.js +88 -0
- package/dist/collection/components/generated/chardes-card-total-section.css +1 -0
- package/dist/collection/components/generated/chardes-card-total-section.js +68 -0
- package/dist/collection/components/generated/chardes-card-type.css +1 -0
- package/dist/collection/components/generated/chardes-card-type.js +88 -0
- package/dist/collection/components/generated/chardes-card.css +1 -0
- package/dist/collection/components/generated/chardes-card.js +68 -0
- package/dist/collection/components/generated/chardes-checkbox-checkmark.css +1 -0
- package/dist/collection/components/generated/chardes-checkbox-checkmark.js +68 -0
- package/dist/collection/components/generated/chardes-checkbox-input-wrapper.css +1 -0
- package/dist/collection/components/generated/chardes-checkbox-input-wrapper.js +68 -0
- package/dist/collection/components/generated/chardes-checkbox-input.css +1 -0
- package/dist/collection/components/generated/chardes-checkbox-input.js +148 -0
- package/dist/collection/components/generated/chardes-checkbox-label.css +1 -0
- package/dist/collection/components/generated/chardes-checkbox-label.js +88 -0
- package/dist/collection/components/generated/chardes-checkbox.css +1 -0
- package/dist/collection/components/generated/chardes-checkbox.js +88 -0
- package/dist/collection/components/generated/chardes-checkmark-svg.css +1 -0
- package/dist/collection/components/generated/chardes-checkmark-svg.js +68 -0
- package/dist/collection/components/generated/chardes-close-icon.css +1 -0
- package/dist/collection/components/generated/chardes-close-icon.js +88 -0
- package/dist/collection/components/generated/chardes-error-icon-svg.css +1 -0
- package/dist/collection/components/generated/chardes-error-icon-svg.js +88 -0
- package/dist/collection/components/generated/chardes-error-input-icon.css +1 -0
- package/dist/collection/components/generated/chardes-error-input-icon.js +68 -0
- package/dist/collection/components/generated/chardes-error-input-wrapper.css +1 -0
- package/dist/collection/components/generated/chardes-error-input-wrapper.js +68 -0
- package/dist/collection/components/generated/chardes-error-input.css +1 -0
- package/dist/collection/components/generated/chardes-error-input.js +168 -0
- package/dist/collection/components/generated/chardes-error-label.css +1 -0
- package/dist/collection/components/generated/chardes-error-label.js +108 -0
- package/dist/collection/components/generated/chardes-error-message.css +1 -0
- package/dist/collection/components/generated/chardes-error-message.js +88 -0
- package/dist/collection/components/generated/chardes-error-state.css +1 -0
- package/dist/collection/components/generated/chardes-error-state.js +68 -0
- package/dist/collection/components/generated/chardes-form-group.css +1 -0
- package/dist/collection/components/generated/chardes-form-group.js +68 -0
- package/dist/collection/components/generated/chardes-form-input.css +1 -0
- package/dist/collection/components/generated/chardes-form-input.js +148 -0
- package/dist/collection/components/generated/chardes-form-label.css +1 -0
- package/dist/collection/components/generated/chardes-form-label.js +108 -0
- package/dist/collection/components/generated/chardes-group-badge-1.css +1 -0
- package/dist/collection/components/generated/chardes-group-badge-1.js +88 -0
- package/dist/collection/components/generated/chardes-group-badge-2.css +1 -0
- package/dist/collection/components/generated/chardes-group-badge-2.js +88 -0
- package/dist/collection/components/generated/chardes-group-badge-3.css +1 -0
- package/dist/collection/components/generated/chardes-group-badge-3.js +88 -0
- package/dist/collection/components/generated/chardes-group-badge-4.css +1 -0
- package/dist/collection/components/generated/chardes-group-badge-4.js +88 -0
- package/dist/collection/components/generated/chardes-icon-svg-destination.css +1 -0
- package/dist/collection/components/generated/chardes-icon-svg-destination.js +88 -0
- package/dist/collection/components/generated/chardes-icon-svg-pickup.css +1 -0
- package/dist/collection/components/generated/chardes-icon-svg-pickup.js +88 -0
- package/dist/collection/components/generated/chardes-icon-svg.css +1 -0
- package/dist/collection/components/generated/chardes-icon-svg.js +88 -0
- package/dist/collection/components/generated/chardes-input-element.css +1 -0
- package/dist/collection/components/generated/chardes-input-element.js +168 -0
- package/dist/collection/components/generated/chardes-input-field-wrapper.css +1 -0
- package/dist/collection/components/generated/chardes-input-field-wrapper.js +68 -0
- package/dist/collection/components/generated/chardes-input-helper.css +1 -0
- package/dist/collection/components/generated/chardes-input-helper.js +88 -0
- package/dist/collection/components/generated/chardes-input-icon.css +1 -0
- package/dist/collection/components/generated/chardes-input-icon.js +68 -0
- package/dist/collection/components/generated/chardes-input-label.css +1 -0
- package/dist/collection/components/generated/chardes-input-label.js +108 -0
- package/dist/collection/components/generated/chardes-input-states.css +1 -0
- package/dist/collection/components/generated/chardes-input-states.js +68 -0
- package/dist/collection/components/generated/chardes-input-wrapper.css +1 -0
- package/dist/collection/components/generated/chardes-input-wrapper.js +68 -0
- package/dist/collection/components/generated/chardes-input.css +1 -0
- package/dist/collection/components/generated/chardes-input.js +68 -0
- package/dist/collection/components/generated/chardes-modal-body.css +1 -0
- package/dist/collection/components/generated/chardes-modal-body.js +68 -0
- package/dist/collection/components/generated/chardes-modal-cancel-button.css +1 -0
- package/dist/collection/components/generated/chardes-modal-cancel-button.js +128 -0
- package/dist/collection/components/generated/chardes-modal-close-button.css +1 -0
- package/dist/collection/components/generated/chardes-modal-close-button.js +108 -0
- package/dist/collection/components/generated/chardes-modal-confirm-button.css +1 -0
- package/dist/collection/components/generated/chardes-modal-confirm-button.js +128 -0
- package/dist/collection/components/generated/chardes-modal-container.css +1 -0
- package/dist/collection/components/generated/chardes-modal-container.js +68 -0
- package/dist/collection/components/generated/chardes-modal-content.css +1 -0
- package/dist/collection/components/generated/chardes-modal-content.js +88 -0
- package/dist/collection/components/generated/chardes-modal-footer.css +1 -0
- package/dist/collection/components/generated/chardes-modal-footer.js +68 -0
- package/dist/collection/components/generated/chardes-modal-form.css +1 -0
- package/dist/collection/components/generated/chardes-modal-form.js +68 -0
- package/dist/collection/components/generated/chardes-modal-header.css +1 -0
- package/dist/collection/components/generated/chardes-modal-header.js +68 -0
- package/dist/collection/components/generated/chardes-modal-title.css +1 -0
- package/dist/collection/components/generated/chardes-modal-title.js +88 -0
- package/dist/collection/components/generated/chardes-modal.css +1 -0
- package/dist/collection/components/generated/chardes-modal.js +68 -0
- package/dist/collection/components/generated/chardes-muzingo-primary-button.css +1 -0
- package/dist/collection/components/generated/chardes-muzingo-primary-button.js +68 -0
- package/dist/collection/components/generated/chardes-muzingo.css +1 -0
- package/dist/collection/components/generated/chardes-muzingo.js +148 -0
- package/dist/collection/components/generated/chardes-notification-toast.css +1 -0
- package/dist/collection/components/generated/chardes-notification-toast.js +68 -0
- package/dist/collection/components/generated/chardes-payment-icon.css +1 -0
- package/dist/collection/components/generated/chardes-payment-icon.js +88 -0
- package/dist/collection/components/generated/chardes-success-icon-svg.css +1 -0
- package/dist/collection/components/generated/chardes-success-icon-svg.js +88 -0
- package/dist/collection/components/generated/chardes-success-input-icon.css +1 -0
- package/dist/collection/components/generated/chardes-success-input-icon.js +68 -0
- package/dist/collection/components/generated/chardes-success-input-wrapper.css +1 -0
- package/dist/collection/components/generated/chardes-success-input-wrapper.js +68 -0
- package/dist/collection/components/generated/chardes-success-input.css +1 -0
- package/dist/collection/components/generated/chardes-success-input.js +168 -0
- package/dist/collection/components/generated/chardes-success-label.css +1 -0
- package/dist/collection/components/generated/chardes-success-label.js +108 -0
- package/dist/collection/components/generated/chardes-success-message.css +1 -0
- package/dist/collection/components/generated/chardes-success-message.js +88 -0
- package/dist/collection/components/generated/chardes-success-state.css +1 -0
- package/dist/collection/components/generated/chardes-success-state.js +68 -0
- package/dist/collection/components/generated/chardes-toast-action-button.css +1 -0
- package/dist/collection/components/generated/chardes-toast-action-button.js +128 -0
- package/dist/collection/components/generated/chardes-toast-actions.css +1 -0
- package/dist/collection/components/generated/chardes-toast-actions.js +68 -0
- package/dist/collection/components/generated/chardes-toast-content.css +1 -0
- package/dist/collection/components/generated/chardes-toast-content.js +88 -0
- package/dist/collection/components/generated/chardes-toast-dismiss-button.css +1 -0
- package/dist/collection/components/generated/chardes-toast-dismiss-button.js +128 -0
- package/dist/collection/components/generated/chardes-toast-header.css +1 -0
- package/dist/collection/components/generated/chardes-toast-header.js +68 -0
- package/dist/collection/components/generated/chardes-toast-icon.css +1 -0
- package/dist/collection/components/generated/chardes-toast-icon.js +88 -0
- package/dist/collection/components/generated/chardes-toast-timestamp.css +1 -0
- package/dist/collection/components/generated/chardes-toast-timestamp.js +88 -0
- package/dist/collection/components/generated/chardes-toast-title-container.css +1 -0
- package/dist/collection/components/generated/chardes-toast-title-container.js +68 -0
- package/dist/collection/components/generated/chardes-toast-title.css +1 -0
- package/dist/collection/components/generated/chardes-toast-title.js +88 -0
- package/dist/collection/components/generated/index.js +130 -0
- package/dist/collection/components/index.js +2 -0
- package/dist/collection/components/my-component/my-component.css +3 -0
- package/dist/collection/components/my-component/my-component.js +95 -0
- package/dist/collection/index.js +15 -0
- package/dist/collection/types/index.js +1 -0
- package/dist/collection/types/types.js +1 -0
- package/dist/collection/utils/api-client.js +84 -0
- package/dist/collection/utils/utils.js +3 -0
- package/dist/components/chardes-alert-close-button.js +1 -0
- package/dist/components/chardes-alert-content.js +1 -0
- package/dist/components/chardes-alert-error.js +1 -0
- package/dist/components/chardes-alert-header.js +1 -0
- package/dist/components/chardes-alert-icon.js +1 -0
- package/dist/components/chardes-alert-success.js +1 -0
- package/dist/components/chardes-alert-title-container.js +1 -0
- package/dist/components/chardes-alert-title.js +1 -0
- package/dist/components/chardes-alert-warning.js +1 -0
- package/dist/components/chardes-alerts.js +1 -0
- package/dist/components/chardes-badge-close-button.js +1 -0
- package/dist/components/chardes-badge-error.js +1 -0
- package/dist/components/chardes-badge-group.js +1 -0
- package/dist/components/chardes-badge-icon.js +1 -0
- package/dist/components/chardes-badge-interactive-text.js +1 -0
- package/dist/components/chardes-badge-interactive.js +1 -0
- package/dist/components/chardes-badge-outline.js +1 -0
- package/dist/components/chardes-badge-primary.js +1 -0
- package/dist/components/chardes-badge-secondary.js +1 -0
- package/dist/components/chardes-badge-success.js +1 -0
- package/dist/components/chardes-badge-text.js +1 -0
- package/dist/components/chardes-badge-warning.js +1 -0
- package/dist/components/chardes-badge-with-icon.js +1 -0
- package/dist/components/chardes-badge.js +1 -0
- package/dist/components/chardes-button.js +1 -0
- package/dist/components/chardes-card-body-action-button-1.js +1 -0
- package/dist/components/chardes-card-body-action-button-2.js +1 -0
- package/dist/components/chardes-card-body-action-icon-1.js +1 -0
- package/dist/components/chardes-card-body-action-icon-2.js +1 -0
- package/dist/components/chardes-card-body-actions.js +1 -0
- package/dist/components/chardes-card-body-driver.js +1 -0
- package/dist/components/chardes-card-body-img.js +1 -0
- package/dist/components/chardes-card-body-info.js +1 -0
- package/dist/components/chardes-card-body-name.js +1 -0
- package/dist/components/chardes-card-body-span.js +1 -0
- package/dist/components/chardes-card-body.js +1 -0
- package/dist/components/chardes-card-container.js +1 -0
- package/dist/components/chardes-card-header-content.js +1 -0
- package/dist/components/chardes-card-header-timer.js +1 -0
- package/dist/components/chardes-card-header-title.js +1 -0
- package/dist/components/chardes-card-header.js +1 -0
- package/dist/components/chardes-card-icon-container.js +1 -0
- package/dist/components/chardes-card-number.js +1 -0
- package/dist/components/chardes-card-payment-container.js +1 -0
- package/dist/components/chardes-card-payment-content.js +1 -0
- package/dist/components/chardes-card-payment-details.js +1 -0
- package/dist/components/chardes-card-payment-icon-container.js +1 -0
- package/dist/components/chardes-card-payment.js +1 -0
- package/dist/components/chardes-card-route-container.js +1 -0
- package/dist/components/chardes-card-route-destination-address.js +1 -0
- package/dist/components/chardes-card-route-destination-details.js +1 -0
- package/dist/components/chardes-card-route-destination-icon-container.js +1 -0
- package/dist/components/chardes-card-route-destination-icon.js +1 -0
- package/dist/components/chardes-card-route-destination-label.js +1 -0
- package/dist/components/chardes-card-route-destination.js +1 -0
- package/dist/components/chardes-card-route-pickup-address.js +1 -0
- package/dist/components/chardes-card-route-pickup-details.js +1 -0
- package/dist/components/chardes-card-route-pickup-icon.js +1 -0
- package/dist/components/chardes-card-route-pickup-label.js +1 -0
- package/dist/components/chardes-card-route-pickup.js +1 -0
- package/dist/components/chardes-card-route.js +1 -0
- package/dist/components/chardes-card-total-amount.js +1 -0
- package/dist/components/chardes-card-total-content.js +1 -0
- package/dist/components/chardes-card-total-label.js +1 -0
- package/dist/components/chardes-card-total-section.js +1 -0
- package/dist/components/chardes-card-type.js +1 -0
- package/dist/components/chardes-card.js +1 -0
- package/dist/components/chardes-checkbox-checkmark.js +1 -0
- package/dist/components/chardes-checkbox-input-wrapper.js +1 -0
- package/dist/components/chardes-checkbox-input.js +1 -0
- package/dist/components/chardes-checkbox-label.js +1 -0
- package/dist/components/chardes-checkbox.js +1 -0
- package/dist/components/chardes-checkmark-svg.js +1 -0
- package/dist/components/chardes-close-icon.js +1 -0
- package/dist/components/chardes-error-icon-svg.js +1 -0
- package/dist/components/chardes-error-input-icon.js +1 -0
- package/dist/components/chardes-error-input-wrapper.js +1 -0
- package/dist/components/chardes-error-input.js +1 -0
- package/dist/components/chardes-error-label.js +1 -0
- package/dist/components/chardes-error-message.js +1 -0
- package/dist/components/chardes-error-state.js +1 -0
- package/dist/components/chardes-form-group.js +1 -0
- package/dist/components/chardes-form-input.js +1 -0
- package/dist/components/chardes-form-label.js +1 -0
- package/dist/components/chardes-group-badge-1.js +1 -0
- package/dist/components/chardes-group-badge-2.js +1 -0
- package/dist/components/chardes-group-badge-3.js +1 -0
- package/dist/components/chardes-group-badge-4.js +1 -0
- package/dist/components/chardes-icon-svg-destination.js +1 -0
- package/dist/components/chardes-icon-svg-pickup.js +1 -0
- package/dist/components/chardes-icon-svg.js +1 -0
- package/dist/components/chardes-input-element.js +1 -0
- package/dist/components/chardes-input-field-wrapper.js +1 -0
- package/dist/components/chardes-input-helper.js +1 -0
- package/dist/components/chardes-input-icon.js +1 -0
- package/dist/components/chardes-input-label.js +1 -0
- package/dist/components/chardes-input-states.js +1 -0
- package/dist/components/chardes-input-wrapper.js +1 -0
- package/dist/components/chardes-input.js +1 -0
- package/dist/components/chardes-modal-body.js +1 -0
- package/dist/components/chardes-modal-cancel-button.js +1 -0
- package/dist/components/chardes-modal-close-button.js +1 -0
- package/dist/components/chardes-modal-confirm-button.js +1 -0
- package/dist/components/chardes-modal-container.js +1 -0
- package/dist/components/chardes-modal-content.js +1 -0
- package/dist/components/chardes-modal-footer.js +1 -0
- package/dist/components/chardes-modal-form.js +1 -0
- package/dist/components/chardes-modal-header.js +1 -0
- package/dist/components/chardes-modal-title.js +1 -0
- package/dist/components/chardes-modal.js +1 -0
- package/dist/components/chardes-muzingo-primary-button.js +1 -0
- package/dist/components/chardes-muzingo.js +1 -0
- package/dist/components/chardes-notification-toast.js +1 -0
- package/dist/components/chardes-payment-icon.js +1 -0
- package/dist/components/chardes-success-icon-svg.js +1 -0
- package/dist/components/chardes-success-input-icon.js +1 -0
- package/dist/components/chardes-success-input-wrapper.js +1 -0
- package/dist/components/chardes-success-input.js +1 -0
- package/dist/components/chardes-success-label.js +1 -0
- package/dist/components/chardes-success-message.js +1 -0
- package/dist/components/chardes-success-state.js +1 -0
- package/dist/components/chardes-toast-action-button.js +1 -0
- package/dist/components/chardes-toast-actions.js +1 -0
- package/dist/components/chardes-toast-content.js +1 -0
- package/dist/components/chardes-toast-dismiss-button.js +1 -0
- package/dist/components/chardes-toast-header.js +1 -0
- package/dist/components/chardes-toast-icon.js +1 -0
- package/dist/components/chardes-toast-timestamp.js +1 -0
- package/dist/components/chardes-toast-title-container.js +1 -0
- package/dist/components/chardes-toast-title.js +1 -0
- package/dist/components/index.js +2 -0
- package/dist/components/my-component.js +1 -0
- package/dist/components/utils.js +1 -0
- package/dist/esm/charde.js +20 -0
- package/dist/esm/chardes-alert-close-button.entry.js +21 -0
- package/dist/esm/chardes-alert-content.entry.js +20 -0
- package/dist/esm/chardes-alert-error.entry.js +19 -0
- package/dist/esm/chardes-alert-header.entry.js +19 -0
- package/dist/esm/chardes-alert-icon.entry.js +20 -0
- package/dist/esm/chardes-alert-success.entry.js +19 -0
- package/dist/esm/chardes-alert-title-container.entry.js +19 -0
- package/dist/esm/chardes-alert-title.entry.js +20 -0
- package/dist/esm/chardes-alert-warning.entry.js +19 -0
- package/dist/esm/chardes-alerts.entry.js +19 -0
- package/dist/esm/chardes-badge-close-button.entry.js +21 -0
- package/dist/esm/chardes-badge-error.entry.js +20 -0
- package/dist/esm/chardes-badge-group.entry.js +19 -0
- package/dist/esm/chardes-badge-icon.entry.js +20 -0
- package/dist/esm/chardes-badge-interactive-text.entry.js +20 -0
- package/dist/esm/chardes-badge-interactive.entry.js +19 -0
- package/dist/esm/chardes-badge-outline.entry.js +20 -0
- package/dist/esm/chardes-badge-primary.entry.js +20 -0
- package/dist/esm/chardes-badge-secondary.entry.js +20 -0
- package/dist/esm/chardes-badge-success.entry.js +20 -0
- package/dist/esm/chardes-badge-text.entry.js +20 -0
- package/dist/esm/chardes-badge-warning.entry.js +20 -0
- package/dist/esm/chardes-badge-with-icon.entry.js +19 -0
- package/dist/esm/chardes-badge.entry.js +19 -0
- package/dist/esm/chardes-button_4.entry.js +71 -0
- package/dist/esm/chardes-card-body-action-button-1.entry.js +21 -0
- package/dist/esm/chardes-card-body-action-button-2.entry.js +21 -0
- package/dist/esm/chardes-card-body-action-icon-1.entry.js +20 -0
- package/dist/esm/chardes-card-body-action-icon-2.entry.js +20 -0
- package/dist/esm/chardes-card-body-actions.entry.js +19 -0
- package/dist/esm/chardes-card-body-driver.entry.js +19 -0
- package/dist/esm/chardes-card-body-img.entry.js +21 -0
- package/dist/esm/chardes-card-body-info.entry.js +19 -0
- package/dist/esm/chardes-card-body-name.entry.js +20 -0
- package/dist/esm/chardes-card-body-span.entry.js +20 -0
- package/dist/esm/chardes-card-body.entry.js +19 -0
- package/dist/esm/chardes-card-container.entry.js +19 -0
- package/dist/esm/chardes-card-header-content.entry.js +19 -0
- package/dist/esm/chardes-card-header-timer.entry.js +20 -0
- package/dist/esm/chardes-card-header-title.entry.js +20 -0
- package/dist/esm/chardes-card-header.entry.js +19 -0
- package/dist/esm/chardes-card-icon-container.entry.js +19 -0
- package/dist/esm/chardes-card-number.entry.js +20 -0
- package/dist/esm/chardes-card-payment-container.entry.js +19 -0
- package/dist/esm/chardes-card-payment-content.entry.js +19 -0
- package/dist/esm/chardes-card-payment-details.entry.js +19 -0
- package/dist/esm/chardes-card-payment-icon-container.entry.js +19 -0
- package/dist/esm/chardes-card-payment.entry.js +19 -0
- package/dist/esm/chardes-card-route-container.entry.js +19 -0
- package/dist/esm/chardes-card-route-destination-address.entry.js +20 -0
- package/dist/esm/chardes-card-route-destination-details.entry.js +19 -0
- package/dist/esm/chardes-card-route-destination-icon-container.entry.js +19 -0
- package/dist/esm/chardes-card-route-destination-icon.entry.js +19 -0
- package/dist/esm/chardes-card-route-destination-label.entry.js +20 -0
- package/dist/esm/chardes-card-route-destination.entry.js +19 -0
- package/dist/esm/chardes-card-route-pickup-address.entry.js +20 -0
- package/dist/esm/chardes-card-route-pickup-details.entry.js +19 -0
- package/dist/esm/chardes-card-route-pickup-icon.entry.js +19 -0
- package/dist/esm/chardes-card-route-pickup-label.entry.js +20 -0
- package/dist/esm/chardes-card-route-pickup.entry.js +19 -0
- package/dist/esm/chardes-card-route.entry.js +19 -0
- package/dist/esm/chardes-card-total-amount.entry.js +20 -0
- package/dist/esm/chardes-card-total-content.entry.js +19 -0
- package/dist/esm/chardes-card-total-label.entry.js +20 -0
- package/dist/esm/chardes-card-total-section.entry.js +19 -0
- package/dist/esm/chardes-card-type.entry.js +20 -0
- package/dist/esm/chardes-checkbox-checkmark.entry.js +19 -0
- package/dist/esm/chardes-checkbox-input-wrapper.entry.js +19 -0
- package/dist/esm/chardes-checkbox-input.entry.js +23 -0
- package/dist/esm/chardes-checkbox-label.entry.js +20 -0
- package/dist/esm/chardes-checkmark-svg.entry.js +19 -0
- package/dist/esm/chardes-close-icon.entry.js +20 -0
- package/dist/esm/chardes-error-icon-svg.entry.js +20 -0
- package/dist/esm/chardes-error-input-icon.entry.js +19 -0
- package/dist/esm/chardes-error-input-wrapper.entry.js +19 -0
- package/dist/esm/chardes-error-input.entry.js +24 -0
- package/dist/esm/chardes-error-label.entry.js +21 -0
- package/dist/esm/chardes-error-message.entry.js +20 -0
- package/dist/esm/chardes-error-state.entry.js +19 -0
- package/dist/esm/chardes-form-group.entry.js +19 -0
- package/dist/esm/chardes-form-input.entry.js +23 -0
- package/dist/esm/chardes-form-label.entry.js +21 -0
- package/dist/esm/chardes-group-badge-1.entry.js +20 -0
- package/dist/esm/chardes-group-badge-2.entry.js +20 -0
- package/dist/esm/chardes-group-badge-3.entry.js +20 -0
- package/dist/esm/chardes-group-badge-4.entry.js +20 -0
- package/dist/esm/chardes-icon-svg-destination.entry.js +20 -0
- package/dist/esm/chardes-icon-svg-pickup.entry.js +20 -0
- package/dist/esm/chardes-icon-svg.entry.js +20 -0
- package/dist/esm/chardes-input-element.entry.js +24 -0
- package/dist/esm/chardes-input-field-wrapper.entry.js +19 -0
- package/dist/esm/chardes-input-helper.entry.js +20 -0
- package/dist/esm/chardes-input-icon.entry.js +19 -0
- package/dist/esm/chardes-input-label.entry.js +21 -0
- package/dist/esm/chardes-input-states.entry.js +19 -0
- package/dist/esm/chardes-input-wrapper.entry.js +19 -0
- package/dist/esm/chardes-modal-body.entry.js +19 -0
- package/dist/esm/chardes-modal-cancel-button.entry.js +22 -0
- package/dist/esm/chardes-modal-close-button.entry.js +21 -0
- package/dist/esm/chardes-modal-confirm-button.entry.js +22 -0
- package/dist/esm/chardes-modal-container.entry.js +19 -0
- package/dist/esm/chardes-modal-content.entry.js +20 -0
- package/dist/esm/chardes-modal-footer.entry.js +19 -0
- package/dist/esm/chardes-modal-form.entry.js +19 -0
- package/dist/esm/chardes-modal-header.entry.js +19 -0
- package/dist/esm/chardes-modal-title.entry.js +20 -0
- package/dist/esm/chardes-modal.entry.js +19 -0
- package/dist/esm/chardes-muzingo-primary-button.entry.js +19 -0
- package/dist/esm/chardes-muzingo.entry.js +23 -0
- package/dist/esm/chardes-notification-toast.entry.js +19 -0
- package/dist/esm/chardes-payment-icon.entry.js +20 -0
- package/dist/esm/chardes-success-icon-svg.entry.js +20 -0
- package/dist/esm/chardes-success-input-icon.entry.js +19 -0
- package/dist/esm/chardes-success-input-wrapper.entry.js +19 -0
- package/dist/esm/chardes-success-input.entry.js +24 -0
- package/dist/esm/chardes-success-label.entry.js +21 -0
- package/dist/esm/chardes-success-message.entry.js +20 -0
- package/dist/esm/chardes-success-state.entry.js +19 -0
- package/dist/esm/chardes-toast-action-button.entry.js +22 -0
- package/dist/esm/chardes-toast-actions.entry.js +19 -0
- package/dist/esm/chardes-toast-content.entry.js +20 -0
- package/dist/esm/chardes-toast-dismiss-button.entry.js +22 -0
- package/dist/esm/chardes-toast-header.entry.js +19 -0
- package/dist/esm/chardes-toast-icon.entry.js +20 -0
- package/dist/esm/chardes-toast-timestamp.entry.js +20 -0
- package/dist/esm/chardes-toast-title-container.entry.js +19 -0
- package/dist/esm/chardes-toast-title.entry.js +20 -0
- package/dist/esm/index-jZlebn0H.js +1419 -0
- package/dist/esm/index.js +4856 -0
- package/dist/esm/loader.js +10 -0
- package/dist/esm/my-component.entry.js +31 -0
- package/dist/esm/utils-DhW431pq.js +5 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/scripts/generate-components.js +744 -0
- package/dist/scripts/utils.js +32 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- 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 & bar"
|
|
672
|
+
*/
|
|
673
|
+
escapeAttrVal(value) {
|
|
674
|
+
return (value || '')
|
|
675
|
+
.replace(/&/g, '&')
|
|
676
|
+
.replace(/"/g, '"');
|
|
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 };
|