@forgeroute/ui 0.5.15 → 0.5.17
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/fesm2022/forgeroute-ui-action-bar.mjs +190 -0
- package/fesm2022/forgeroute-ui-action-bar.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-address-input.mjs +1164 -0
- package/fesm2022/forgeroute-ui-address-input.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-alert.mjs +223 -0
- package/fesm2022/forgeroute-ui-alert.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-avatar.mjs +320 -0
- package/fesm2022/forgeroute-ui-avatar.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-badge.mjs +158 -0
- package/fesm2022/forgeroute-ui-badge.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-bar-row.mjs +255 -0
- package/fesm2022/forgeroute-ui-bar-row.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-boards.mjs +2201 -0
- package/fesm2022/forgeroute-ui-boards.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-bulk-eligible.mjs +172 -0
- package/fesm2022/forgeroute-ui-bulk-eligible.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-business-hours.mjs +771 -0
- package/fesm2022/forgeroute-ui-business-hours.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-calendar.mjs +2006 -0
- package/fesm2022/forgeroute-ui-calendar.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-card-list-item.mjs +556 -0
- package/fesm2022/forgeroute-ui-card-list-item.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-charts.mjs +1 -1
- package/fesm2022/forgeroute-ui-charts.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-checkbox.mjs +815 -0
- package/fesm2022/forgeroute-ui-checkbox.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-chip.mjs +379 -0
- package/fesm2022/forgeroute-ui-chip.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-color-input.mjs +492 -0
- package/fesm2022/forgeroute-ui-color-input.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-column-filter.mjs +645 -0
- package/fesm2022/forgeroute-ui-column-filter.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-columns.mjs +351 -0
- package/fesm2022/forgeroute-ui-columns.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-combobox.mjs +772 -0
- package/fesm2022/forgeroute-ui-combobox.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-confirm.mjs +48 -0
- package/fesm2022/forgeroute-ui-confirm.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-contact-picker.mjs +865 -0
- package/fesm2022/forgeroute-ui-contact-picker.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-conversations.mjs +3627 -0
- package/fesm2022/forgeroute-ui-conversations.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-copy-field.mjs +378 -0
- package/fesm2022/forgeroute-ui-copy-field.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-data-table-core.mjs +6150 -0
- package/fesm2022/forgeroute-ui-data-table-core.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-date-input.mjs +384 -0
- package/fesm2022/forgeroute-ui-date-input.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-date-range-picker.mjs +453 -0
- package/fesm2022/forgeroute-ui-date-range-picker.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-datetime-input.mjs +375 -0
- package/fesm2022/forgeroute-ui-datetime-input.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-detail-card.mjs +655 -0
- package/fesm2022/forgeroute-ui-detail-card.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-discount-selector.mjs +259 -0
- package/fesm2022/forgeroute-ui-discount-selector.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-divider.mjs +111 -0
- package/fesm2022/forgeroute-ui-divider.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-dropdown.mjs +550 -0
- package/fesm2022/forgeroute-ui-dropdown.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-editor.mjs +4545 -0
- package/fesm2022/forgeroute-ui-editor.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-empty-state.mjs +231 -0
- package/fesm2022/forgeroute-ui-empty-state.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-error-state.mjs +195 -0
- package/fesm2022/forgeroute-ui-error-state.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-error.mjs +93 -0
- package/fesm2022/forgeroute-ui-error.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-fade.mjs +117 -0
- package/fesm2022/forgeroute-ui-fade.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-file-input.mjs +999 -0
- package/fesm2022/forgeroute-ui-file-input.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-fixed-footer.mjs +115 -0
- package/fesm2022/forgeroute-ui-fixed-footer.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-form-row.mjs +126 -0
- package/fesm2022/forgeroute-ui-form-row.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-form-section.mjs +93 -0
- package/fesm2022/forgeroute-ui-form-section.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-form.mjs +139 -0
- package/fesm2022/forgeroute-ui-form.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-hint.mjs +47 -0
- package/fesm2022/forgeroute-ui-hint.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-icon-picker.mjs +424 -0
- package/fesm2022/forgeroute-ui-icon-picker.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-icon.mjs +311 -0
- package/fesm2022/forgeroute-ui-icon.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-image-preview.mjs +237 -0
- package/fesm2022/forgeroute-ui-image-preview.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-keypad.mjs +278 -0
- package/fesm2022/forgeroute-ui-keypad.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-kpi-card.mjs +490 -0
- package/fesm2022/forgeroute-ui-kpi-card.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-language-switcher.mjs +134 -0
- package/fesm2022/forgeroute-ui-language-switcher.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-layout.mjs +18 -0
- package/fesm2022/forgeroute-ui-layout.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-list-item.mjs +620 -0
- package/fesm2022/forgeroute-ui-list-item.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-list.mjs +866 -0
- package/fesm2022/forgeroute-ui-list.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-live-region.mjs +118 -0
- package/fesm2022/forgeroute-ui-live-region.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-map.mjs +5 -1
- package/fesm2022/forgeroute-ui-map.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-maps.mjs +2 -1
- package/fesm2022/forgeroute-ui-maps.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-media.mjs +4615 -0
- package/fesm2022/forgeroute-ui-media.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-messaging.mjs +20 -1
- package/fesm2022/forgeroute-ui-messaging.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-more-menu.mjs +418 -0
- package/fesm2022/forgeroute-ui-more-menu.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-multi-select.mjs +532 -0
- package/fesm2022/forgeroute-ui-multi-select.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-notes.mjs +768 -0
- package/fesm2022/forgeroute-ui-notes.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-notification-bell.mjs +587 -0
- package/fesm2022/forgeroute-ui-notification-bell.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-offline-banner.mjs +156 -0
- package/fesm2022/forgeroute-ui-offline-banner.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-option-card.mjs +379 -0
- package/fesm2022/forgeroute-ui-option-card.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-page.mjs +317 -0
- package/fesm2022/forgeroute-ui-page.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-pagination.mjs +225 -0
- package/fesm2022/forgeroute-ui-pagination.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-panel-info-list.mjs +422 -0
- package/fesm2022/forgeroute-ui-panel-info-list.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-password-requirements.mjs +237 -0
- package/fesm2022/forgeroute-ui-password-requirements.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-payments.mjs +6243 -0
- package/fesm2022/forgeroute-ui-payments.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-pdf.mjs +9 -1
- package/fesm2022/forgeroute-ui-pdf.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-phone-number-picker.mjs +840 -0
- package/fesm2022/forgeroute-ui-phone-number-picker.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-pill-tabs.mjs +546 -0
- package/fesm2022/forgeroute-ui-pill-tabs.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-print.mjs +76 -0
- package/fesm2022/forgeroute-ui-print.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-progress-bar.mjs +252 -0
- package/fesm2022/forgeroute-ui-progress-bar.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-progress-ring.mjs +277 -0
- package/fesm2022/forgeroute-ui-progress-ring.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-quick-filter-tabs.mjs +301 -0
- package/fesm2022/forgeroute-ui-quick-filter-tabs.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-quickbooks.mjs +20 -3
- package/fesm2022/forgeroute-ui-quickbooks.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-radio-matrix.mjs +471 -0
- package/fesm2022/forgeroute-ui-radio-matrix.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-radio.mjs +911 -0
- package/fesm2022/forgeroute-ui-radio.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-read-only-mode.mjs +15 -0
- package/fesm2022/forgeroute-ui-read-only-mode.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-readonly-fieldset.mjs +146 -0
- package/fesm2022/forgeroute-ui-readonly-fieldset.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-reminder-alerts.mjs +249 -0
- package/fesm2022/forgeroute-ui-reminder-alerts.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-search-input.mjs +373 -0
- package/fesm2022/forgeroute-ui-search-input.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-section-header.mjs +296 -0
- package/fesm2022/forgeroute-ui-section-header.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-select.mjs +498 -0
- package/fesm2022/forgeroute-ui-select.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-setup.mjs +4649 -0
- package/fesm2022/forgeroute-ui-setup.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-share-menu.mjs +461 -0
- package/fesm2022/forgeroute-ui-share-menu.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-shell.mjs +981 -0
- package/fesm2022/forgeroute-ui-shell.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-show.mjs +129 -0
- package/fesm2022/forgeroute-ui-show.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-sidebar-layout.mjs +355 -0
- package/fesm2022/forgeroute-ui-sidebar-layout.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-skeleton.mjs +152 -0
- package/fesm2022/forgeroute-ui-skeleton.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-skip-link.mjs +129 -0
- package/fesm2022/forgeroute-ui-skip-link.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-snackbar.mjs +200 -0
- package/fesm2022/forgeroute-ui-snackbar.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-square.mjs +17 -3
- package/fesm2022/forgeroute-ui-square.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-stack.mjs +233 -0
- package/fesm2022/forgeroute-ui-stack.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-stacked-bar.mjs +200 -0
- package/fesm2022/forgeroute-ui-stacked-bar.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-stacking-plan.mjs +365 -0
- package/fesm2022/forgeroute-ui-stacking-plan.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-star-rating.mjs +498 -0
- package/fesm2022/forgeroute-ui-star-rating.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-star.mjs +184 -0
- package/fesm2022/forgeroute-ui-star.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-stepper.mjs +615 -0
- package/fesm2022/forgeroute-ui-stepper.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-stripe.mjs +16 -3
- package/fesm2022/forgeroute-ui-stripe.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-swatch-picker.mjs +416 -0
- package/fesm2022/forgeroute-ui-swatch-picker.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-table-toolbar.mjs +770 -0
- package/fesm2022/forgeroute-ui-table-toolbar.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-table-types.mjs +277 -0
- package/fesm2022/forgeroute-ui-table-types.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-text-input.mjs +1003 -0
- package/fesm2022/forgeroute-ui-text-input.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-text-template-picker.mjs +356 -0
- package/fesm2022/forgeroute-ui-text-template-picker.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-text.mjs +195 -0
- package/fesm2022/forgeroute-ui-text.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-textarea-input.mjs +542 -0
- package/fesm2022/forgeroute-ui-textarea-input.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-time-input.mjs +401 -0
- package/fesm2022/forgeroute-ui-time-input.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-timeline.mjs +549 -0
- package/fesm2022/forgeroute-ui-timeline.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-toast.mjs +507 -0
- package/fesm2022/forgeroute-ui-toast.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-toggle-badge.mjs +177 -0
- package/fesm2022/forgeroute-ui-toggle-badge.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-toggle.mjs +275 -0
- package/fesm2022/forgeroute-ui-toggle.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-tooltip.mjs +155 -0
- package/fesm2022/forgeroute-ui-tooltip.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-utils.mjs +1071 -0
- package/fesm2022/forgeroute-ui-utils.mjs.map +1 -0
- package/fesm2022/forgeroute-ui.mjs +105 -70663
- package/package.json +417 -1
- package/types/forgeroute-ui-action-bar.d.ts +74 -0
- package/types/forgeroute-ui-address-input.d.ts +354 -0
- package/types/forgeroute-ui-alert.d.ts +89 -0
- package/types/forgeroute-ui-avatar.d.ts +85 -0
- package/types/forgeroute-ui-badge.d.ts +45 -0
- package/types/forgeroute-ui-bar-row.d.ts +90 -0
- package/types/forgeroute-ui-boards.d.ts +575 -0
- package/types/forgeroute-ui-bulk-eligible.d.ts +53 -0
- package/types/forgeroute-ui-business-hours.d.ts +191 -0
- package/types/forgeroute-ui-calendar.d.ts +544 -0
- package/types/forgeroute-ui-card-list-item.d.ts +186 -0
- package/types/forgeroute-ui-charts.d.ts +1 -1
- package/types/forgeroute-ui-checkbox.d.ts +270 -0
- package/types/forgeroute-ui-chip.d.ts +125 -0
- package/types/forgeroute-ui-color-input.d.ts +160 -0
- package/types/forgeroute-ui-column-filter.d.ts +130 -0
- package/types/forgeroute-ui-columns.d.ts +150 -0
- package/types/forgeroute-ui-combobox.d.ts +252 -0
- package/types/forgeroute-ui-confirm.d.ts +34 -0
- package/types/forgeroute-ui-contact-picker.d.ts +173 -0
- package/types/forgeroute-ui-conversations.d.ts +993 -0
- package/types/forgeroute-ui-copy-field.d.ts +122 -0
- package/types/forgeroute-ui-data-table-core.d.ts +1221 -0
- package/types/forgeroute-ui-date-input.d.ts +101 -0
- package/types/forgeroute-ui-date-range-picker.d.ts +109 -0
- package/types/forgeroute-ui-datetime-input.d.ts +97 -0
- package/types/forgeroute-ui-detail-card.d.ts +252 -0
- package/types/forgeroute-ui-discount-selector.d.ts +57 -0
- package/types/forgeroute-ui-divider.d.ts +40 -0
- package/types/forgeroute-ui-dropdown.d.ts +156 -0
- package/types/forgeroute-ui-editor.d.ts +873 -0
- package/types/forgeroute-ui-empty-state.d.ts +29 -0
- package/types/forgeroute-ui-error-state.d.ts +38 -0
- package/types/forgeroute-ui-error.d.ts +29 -0
- package/types/forgeroute-ui-fade.d.ts +39 -0
- package/types/forgeroute-ui-file-input.d.ts +337 -0
- package/types/forgeroute-ui-fixed-footer.d.ts +53 -0
- package/types/forgeroute-ui-form-row.d.ts +30 -0
- package/types/forgeroute-ui-form-section.d.ts +18 -0
- package/types/forgeroute-ui-form.d.ts +68 -0
- package/types/forgeroute-ui-hint.d.ts +10 -0
- package/types/forgeroute-ui-icon-picker.d.ts +122 -0
- package/types/forgeroute-ui-icon.d.ts +95 -0
- package/types/forgeroute-ui-image-preview.d.ts +88 -0
- package/types/forgeroute-ui-keypad.d.ts +73 -0
- package/types/forgeroute-ui-kpi-card.d.ts +161 -0
- package/types/forgeroute-ui-language-switcher.d.ts +41 -0
- package/types/forgeroute-ui-layout.d.ts +13 -0
- package/types/forgeroute-ui-list-item.d.ts +253 -0
- package/types/forgeroute-ui-list.d.ts +282 -0
- package/types/forgeroute-ui-live-region.d.ts +49 -0
- package/types/forgeroute-ui-map.d.ts +1 -1
- package/types/forgeroute-ui-maps.d.ts +1 -1
- package/types/forgeroute-ui-media.d.ts +1221 -0
- package/types/forgeroute-ui-messaging.d.ts +11 -6
- package/types/forgeroute-ui-more-menu.d.ts +91 -0
- package/types/forgeroute-ui-multi-select.d.ts +119 -0
- package/types/forgeroute-ui-notes.d.ts +172 -0
- package/types/forgeroute-ui-notification-bell.d.ts +135 -0
- package/types/forgeroute-ui-offline-banner.d.ts +44 -0
- package/types/forgeroute-ui-option-card.d.ts +106 -0
- package/types/forgeroute-ui-page.d.ts +115 -0
- package/types/forgeroute-ui-pagination.d.ts +55 -0
- package/types/forgeroute-ui-panel-info-list.d.ts +147 -0
- package/types/forgeroute-ui-password-requirements.d.ts +89 -0
- package/types/forgeroute-ui-payments.d.ts +1818 -0
- package/types/forgeroute-ui-pdf.d.ts +1 -1
- package/types/forgeroute-ui-phone-number-picker.d.ts +199 -0
- package/types/forgeroute-ui-pill-tabs.d.ts +208 -0
- package/types/forgeroute-ui-print.d.ts +40 -0
- package/types/forgeroute-ui-progress-bar.d.ts +88 -0
- package/types/forgeroute-ui-progress-ring.d.ts +102 -0
- package/types/forgeroute-ui-quick-filter-tabs.d.ts +51 -0
- package/types/forgeroute-ui-quickbooks.d.ts +6 -3
- package/types/forgeroute-ui-radio-matrix.d.ts +131 -0
- package/types/forgeroute-ui-radio.d.ts +311 -0
- package/types/forgeroute-ui-read-only-mode.d.ts +26 -0
- package/types/forgeroute-ui-readonly-fieldset.d.ts +62 -0
- package/types/forgeroute-ui-reminder-alerts.d.ts +71 -0
- package/types/forgeroute-ui-search-input.d.ts +93 -0
- package/types/forgeroute-ui-section-header.d.ts +149 -0
- package/types/forgeroute-ui-select.d.ts +183 -0
- package/types/forgeroute-ui-setup.d.ts +775 -0
- package/types/forgeroute-ui-share-menu.d.ts +99 -0
- package/types/forgeroute-ui-shell.d.ts +173 -0
- package/types/forgeroute-ui-show.d.ts +40 -0
- package/types/forgeroute-ui-sidebar-layout.d.ts +161 -0
- package/types/forgeroute-ui-skeleton.d.ts +51 -0
- package/types/forgeroute-ui-skip-link.d.ts +51 -0
- package/types/forgeroute-ui-snackbar.d.ts +50 -0
- package/types/forgeroute-ui-square.d.ts +5 -3
- package/types/forgeroute-ui-stack.d.ts +99 -0
- package/types/forgeroute-ui-stacked-bar.d.ts +84 -0
- package/types/forgeroute-ui-stacking-plan.d.ts +116 -0
- package/types/forgeroute-ui-star-rating.d.ts +151 -0
- package/types/forgeroute-ui-star.d.ts +46 -0
- package/types/forgeroute-ui-stepper.d.ts +273 -0
- package/types/forgeroute-ui-stripe.d.ts +4 -2
- package/types/forgeroute-ui-swatch-picker.d.ts +118 -0
- package/types/forgeroute-ui-table-toolbar.d.ts +116 -0
- package/types/forgeroute-ui-table-types.d.ts +624 -0
- package/types/forgeroute-ui-text-input.d.ts +359 -0
- package/types/forgeroute-ui-text-template-picker.d.ts +100 -0
- package/types/forgeroute-ui-text.d.ts +76 -0
- package/types/forgeroute-ui-textarea-input.d.ts +174 -0
- package/types/forgeroute-ui-time-input.d.ts +105 -0
- package/types/forgeroute-ui-timeline.d.ts +196 -0
- package/types/forgeroute-ui-toast.d.ts +131 -0
- package/types/forgeroute-ui-toggle-badge.d.ts +64 -0
- package/types/forgeroute-ui-toggle.d.ts +92 -0
- package/types/forgeroute-ui-tooltip.d.ts +36 -0
- package/types/forgeroute-ui-utils.d.ts +210 -0
- package/types/forgeroute-ui.d.ts +106 -19539
- package/fesm2022/forgeroute-ui.mjs.map +0 -1
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
import { NgTemplateOutlet } from "@angular/common";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { ChangeDetectionStrategy, Component, computed, input, output } from "@angular/core";
|
|
4
|
+
import { builtInActionIcon } from "@forgeroute/ui/more-menu";
|
|
5
|
+
import { TooltipDirective } from "@forgeroute/ui/tooltip";
|
|
6
|
+
const EXTRA_ICONS = {
|
|
7
|
+
"delete": "M3 6h18 M8 6V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2 M5 6l1 14a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2l1-14 M10 11v6 M14 11v6",
|
|
8
|
+
"add": "M12 5v14 M5 12h14",
|
|
9
|
+
"close": "M18 6L6 18 M6 6l12 12",
|
|
10
|
+
"check": "M20 6L9 17l-5-5",
|
|
11
|
+
"upload": "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4 M17 8l-5-5-5 5 M12 3v12",
|
|
12
|
+
"image": "M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2z M8.5 8.5a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3z M21 15l-5-5L5 21",
|
|
13
|
+
"chevron-up": "M18 15l-6-6-6 6",
|
|
14
|
+
"chevron-down": "M6 9l6 6 6-6",
|
|
15
|
+
"chevron-right": "M9 18l6-6-6-6",
|
|
16
|
+
"arrow-left": "M19 12H5 M12 19l-7-7 7-7",
|
|
17
|
+
"bell": "M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9 M13.73 21a2 2 0 0 1-3.46 0",
|
|
18
|
+
"print": "M6 9V2h12v7 M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2 M6 14h12v8H6z",
|
|
19
|
+
"shield": "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z",
|
|
20
|
+
"lock": "M5 11h14a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2z M7 11V7a5 5 0 0 1 10 0v4",
|
|
21
|
+
"arrow-up": "M12 19V5 M5 12l7-7 7 7",
|
|
22
|
+
"arrow-down": "M12 5v14 M19 12l-7 7-7-7",
|
|
23
|
+
"arrow-right": "M5 12h14 M12 5l7 7-7 7",
|
|
24
|
+
"document": "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z M14 2v6h6 M16 13H8 M16 17H8 M10 9H8",
|
|
25
|
+
"grip": "M9 5h.01 M15 5h.01 M9 12h.01 M15 12h.01 M9 19h.01 M15 19h.01",
|
|
26
|
+
"card": "M3 4h18a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z M1 10h22",
|
|
27
|
+
"view-off": "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6z M3 3l18 18",
|
|
28
|
+
"refund": "M3 10h10a8 8 0 0 1 8 8v2 M3 10l6 6 M3 10l6-6",
|
|
29
|
+
"link": "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71 M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",
|
|
30
|
+
"chart": "M18 20V10 M12 20V4 M6 20v-6",
|
|
31
|
+
"clipboard": "M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2 M9 2h6a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1z",
|
|
32
|
+
"save": "M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z M17 21v-8H7v8 M7 3v5h8",
|
|
33
|
+
"bank": "M3 21h18 M3 10h18 M5 6l7-3 7 3 M4 10v11 M20 10v11 M8 14v3 M12 14v3 M16 14v3",
|
|
34
|
+
"unlink": "M18.84 12.25l1.72-1.71a5 5 0 0 0-7.07-7.07l-1.72 1.71 M5.17 11.75l-1.72 1.71a5 5 0 0 0 7.07 7.07l1.71-1.71 M3 3l18 18",
|
|
35
|
+
"send": "M22 2L11 13 M22 2l-7 20-4-9-9-4 20-7z",
|
|
36
|
+
"refresh": "M23 4v6h-6 M1 20v-6h6 M3.51 9a9 9 0 0 1 14.85-3.36L23 10 M1 14l4.64 4.36A9 9 0 0 0 20.49 15",
|
|
37
|
+
"search": "M11 3a8 8 0 1 0 0 16 8 8 0 0 0 0-16z M21 21l-4.35-4.35",
|
|
38
|
+
"cup": "M18 8h1a4 4 0 0 1 0 8h-1 M2 8h16v9a4 4 0 0 1-4 4H6a4 4 0 0 1-4-4V8z M6 1v3 M10 1v3 M14 1v3",
|
|
39
|
+
"cash": "M3 6h18a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1z M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6z M6 12h.01 M18 12h.01",
|
|
40
|
+
"dollar": "M12 1v22 M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",
|
|
41
|
+
"wrench": "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",
|
|
42
|
+
"star": "M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z",
|
|
43
|
+
"gift": "M20 12v10H4V12 M2 7h20v5H2z M12 22V7 M12 7H7.5a2.5 2.5 0 0 1 0-5C11 2 12 7 12 7z M12 7h4.5a2.5 2.5 0 0 0 0-5C13 2 12 7 12 7z",
|
|
44
|
+
"award": "M12 1a7 7 0 1 0 0 14 7 7 0 0 0 0-14z M8.21 13.89L7 23l5-3 5 3-1.21-9.12",
|
|
45
|
+
"calendar-check": "M19 4H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z M16 2v4 M8 2v4 M3 10h18 M9 16l2 2 4-4"
|
|
46
|
+
};
|
|
47
|
+
const MORE_ICONS = {
|
|
48
|
+
"dashboard": "M3 3h7v9H3z M14 3h7v5h-7z M14 12h7v9h-7z M3 16h7v5H3z",
|
|
49
|
+
"users": "M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2 M9 3a4 4 0 1 0 0 8 4 4 0 0 0 0-8z M23 21v-2a4 4 0 0 0-3-3.87 M16 3.13a4 4 0 0 1 0 7.75",
|
|
50
|
+
"settings": "M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6z M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z",
|
|
51
|
+
"user-plus": "M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2 M8.5 3a4 4 0 1 0 0 8 4 4 0 0 0 0-8z M20 8v6 M23 11h-6"
|
|
52
|
+
};
|
|
53
|
+
const MORE_ICON_NAMES = Object.freeze(Object.keys(MORE_ICONS));
|
|
54
|
+
const ICON_NAMES = Object.freeze(Object.keys(EXTRA_ICONS));
|
|
55
|
+
function iconPath(name) {
|
|
56
|
+
if (Object.prototype.hasOwnProperty.call(EXTRA_ICONS, name)) return EXTRA_ICONS[name];
|
|
57
|
+
return builtInActionIcon(name) ?? (Object.prototype.hasOwnProperty.call(MORE_ICONS, name) ? MORE_ICONS[name] : void 0);
|
|
58
|
+
}
|
|
59
|
+
var IconComponent = class IconComponent {
|
|
60
|
+
constructor() {
|
|
61
|
+
this.name = input.required(...ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []);
|
|
62
|
+
this.tooltip = input("", ...ngDevMode ? [{ debugName: "tooltip" }] : /* istanbul ignore next */ []);
|
|
63
|
+
this.ariaLabel = input("", ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
64
|
+
this.size = input(16, ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
|
|
65
|
+
this.variant = input("default", ...ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []);
|
|
66
|
+
this.disabled = input(false, ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
|
|
67
|
+
this.loading = input(false, ...ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []);
|
|
68
|
+
this.interactive = input(true, ...ngDevMode ? [{ debugName: "interactive" }] : /* istanbul ignore next */ []);
|
|
69
|
+
this.iconClick = output();
|
|
70
|
+
this.accessibleName = computed(() => this.ariaLabel() || this.tooltip(), ...ngDevMode ? [{ debugName: "accessibleName" }] : /* istanbul ignore next */ []);
|
|
71
|
+
this.path = computed(() => iconPath(this.name()), ...ngDevMode ? [{ debugName: "path" }] : /* istanbul ignore next */ []);
|
|
72
|
+
}
|
|
73
|
+
onClick(event) {
|
|
74
|
+
event.stopPropagation();
|
|
75
|
+
this.iconClick.emit(event);
|
|
76
|
+
}
|
|
77
|
+
static {
|
|
78
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
79
|
+
minVersion: "12.0.0",
|
|
80
|
+
version: "22.2.2",
|
|
81
|
+
ngImport: i0,
|
|
82
|
+
type: IconComponent,
|
|
83
|
+
deps: [],
|
|
84
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
static {
|
|
88
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
89
|
+
minVersion: "17.0.0",
|
|
90
|
+
version: "22.2.2",
|
|
91
|
+
type: IconComponent,
|
|
92
|
+
isStandalone: true,
|
|
93
|
+
selector: "ui-icon",
|
|
94
|
+
inputs: {
|
|
95
|
+
name: {
|
|
96
|
+
classPropertyName: "name",
|
|
97
|
+
publicName: "name",
|
|
98
|
+
isSignal: true,
|
|
99
|
+
isRequired: true,
|
|
100
|
+
transformFunction: null
|
|
101
|
+
},
|
|
102
|
+
tooltip: {
|
|
103
|
+
classPropertyName: "tooltip",
|
|
104
|
+
publicName: "tooltip",
|
|
105
|
+
isSignal: true,
|
|
106
|
+
isRequired: false,
|
|
107
|
+
transformFunction: null
|
|
108
|
+
},
|
|
109
|
+
ariaLabel: {
|
|
110
|
+
classPropertyName: "ariaLabel",
|
|
111
|
+
publicName: "ariaLabel",
|
|
112
|
+
isSignal: true,
|
|
113
|
+
isRequired: false,
|
|
114
|
+
transformFunction: null
|
|
115
|
+
},
|
|
116
|
+
size: {
|
|
117
|
+
classPropertyName: "size",
|
|
118
|
+
publicName: "size",
|
|
119
|
+
isSignal: true,
|
|
120
|
+
isRequired: false,
|
|
121
|
+
transformFunction: null
|
|
122
|
+
},
|
|
123
|
+
variant: {
|
|
124
|
+
classPropertyName: "variant",
|
|
125
|
+
publicName: "variant",
|
|
126
|
+
isSignal: true,
|
|
127
|
+
isRequired: false,
|
|
128
|
+
transformFunction: null
|
|
129
|
+
},
|
|
130
|
+
disabled: {
|
|
131
|
+
classPropertyName: "disabled",
|
|
132
|
+
publicName: "disabled",
|
|
133
|
+
isSignal: true,
|
|
134
|
+
isRequired: false,
|
|
135
|
+
transformFunction: null
|
|
136
|
+
},
|
|
137
|
+
loading: {
|
|
138
|
+
classPropertyName: "loading",
|
|
139
|
+
publicName: "loading",
|
|
140
|
+
isSignal: true,
|
|
141
|
+
isRequired: false,
|
|
142
|
+
transformFunction: null
|
|
143
|
+
},
|
|
144
|
+
interactive: {
|
|
145
|
+
classPropertyName: "interactive",
|
|
146
|
+
publicName: "interactive",
|
|
147
|
+
isSignal: true,
|
|
148
|
+
isRequired: false,
|
|
149
|
+
transformFunction: null
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
outputs: { iconClick: "iconClick" },
|
|
153
|
+
ngImport: i0,
|
|
154
|
+
template: `
|
|
155
|
+
@if (interactive()) {
|
|
156
|
+
<button type="button" class="icon-btn" [class.danger]="variant() === 'danger'"
|
|
157
|
+
[class.loading]="loading()" [disabled]="disabled() || loading()" [attr.aria-busy]="loading() ? 'true' : null"
|
|
158
|
+
[attr.aria-label]="accessibleName() || null" [uiTooltip]="tooltip()" (click)="onClick($event)">
|
|
159
|
+
<ng-container *ngTemplateOutlet="glyph" />
|
|
160
|
+
</button>
|
|
161
|
+
} @else {
|
|
162
|
+
<span class="icon-static" [class.danger]="variant() === 'danger'" [attr.aria-busy]="loading() ? 'true' : null"
|
|
163
|
+
[attr.role]="accessibleName() ? 'img' : null" [attr.aria-label]="accessibleName() || null" [uiTooltip]="tooltip()" [attr.aria-hidden]="accessibleName() ? null : 'true'">
|
|
164
|
+
<ng-container *ngTemplateOutlet="glyph" />
|
|
165
|
+
</span>
|
|
166
|
+
}
|
|
167
|
+
<ng-template #glyph>
|
|
168
|
+
@if (loading()) {
|
|
169
|
+
<span class="spinner" [style.width.px]="size()" [style.height.px]="size()" aria-hidden="true"></span>
|
|
170
|
+
} @else if (path(); as d) {
|
|
171
|
+
<svg viewBox="0 0 24 24" [attr.width]="size()" [attr.height]="size()" fill="none" stroke="currentColor"
|
|
172
|
+
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">
|
|
173
|
+
<path [attr.d]="d" />
|
|
174
|
+
</svg>
|
|
175
|
+
}
|
|
176
|
+
</ng-template>
|
|
177
|
+
`,
|
|
178
|
+
isInline: true,
|
|
179
|
+
styles: [":host{display:inline-flex}.icon-static{display:inline-flex;align-items:center;justify-content:center;color:inherit}.icon-static.danger{color:#b91c1c}.icon-static svg{display:block}.icon-btn{position:relative;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:none;border-radius:6px;background:transparent;color:#475569;cursor:pointer;-webkit-appearance:none;appearance:none;font:inherit;transition:background .15s ease,color .15s ease}.icon-btn:hover:not(:disabled){background:#f1f5f9;color:#0f172a}.icon-btn.danger{color:#b91c1c}.icon-btn.danger:hover:not(:disabled){background:#fef2f2;color:#991b1b}.icon-btn:focus-visible{outline:2px solid #2563eb;outline-offset:2px}.icon-btn:disabled{opacity:.5;cursor:not-allowed}.icon-btn.loading:disabled{opacity:1;cursor:progress}.spinner{display:block;box-sizing:border-box;border:2px solid rgba(100,116,139,.3);border-top-color:currentColor;border-radius:50%;animation:ui-icon-spin .6s linear infinite}@keyframes ui-icon-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.spinner{animation-duration:2s}}.icon-btn:after{content:\"\";position:absolute;inset:-8px}\n"],
|
|
180
|
+
dependencies: [{
|
|
181
|
+
kind: "directive",
|
|
182
|
+
type: NgTemplateOutlet,
|
|
183
|
+
selector: "[ngTemplateOutlet]",
|
|
184
|
+
inputs: [
|
|
185
|
+
"ngTemplateOutletContext",
|
|
186
|
+
"ngTemplateOutlet",
|
|
187
|
+
"ngTemplateOutletInjector"
|
|
188
|
+
]
|
|
189
|
+
}, {
|
|
190
|
+
kind: "directive",
|
|
191
|
+
type: TooltipDirective,
|
|
192
|
+
selector: "[uiTooltip]",
|
|
193
|
+
inputs: ["uiTooltip", "tooltipPosition"]
|
|
194
|
+
}],
|
|
195
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
200
|
+
minVersion: "12.0.0",
|
|
201
|
+
version: "22.2.2",
|
|
202
|
+
ngImport: i0,
|
|
203
|
+
type: IconComponent,
|
|
204
|
+
decorators: [{
|
|
205
|
+
type: Component,
|
|
206
|
+
args: [{
|
|
207
|
+
selector: "ui-icon",
|
|
208
|
+
standalone: true,
|
|
209
|
+
imports: [NgTemplateOutlet, TooltipDirective],
|
|
210
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
211
|
+
template: `
|
|
212
|
+
@if (interactive()) {
|
|
213
|
+
<button type="button" class="icon-btn" [class.danger]="variant() === 'danger'"
|
|
214
|
+
[class.loading]="loading()" [disabled]="disabled() || loading()" [attr.aria-busy]="loading() ? 'true' : null"
|
|
215
|
+
[attr.aria-label]="accessibleName() || null" [uiTooltip]="tooltip()" (click)="onClick($event)">
|
|
216
|
+
<ng-container *ngTemplateOutlet="glyph" />
|
|
217
|
+
</button>
|
|
218
|
+
} @else {
|
|
219
|
+
<span class="icon-static" [class.danger]="variant() === 'danger'" [attr.aria-busy]="loading() ? 'true' : null"
|
|
220
|
+
[attr.role]="accessibleName() ? 'img' : null" [attr.aria-label]="accessibleName() || null" [uiTooltip]="tooltip()" [attr.aria-hidden]="accessibleName() ? null : 'true'">
|
|
221
|
+
<ng-container *ngTemplateOutlet="glyph" />
|
|
222
|
+
</span>
|
|
223
|
+
}
|
|
224
|
+
<ng-template #glyph>
|
|
225
|
+
@if (loading()) {
|
|
226
|
+
<span class="spinner" [style.width.px]="size()" [style.height.px]="size()" aria-hidden="true"></span>
|
|
227
|
+
} @else if (path(); as d) {
|
|
228
|
+
<svg viewBox="0 0 24 24" [attr.width]="size()" [attr.height]="size()" fill="none" stroke="currentColor"
|
|
229
|
+
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">
|
|
230
|
+
<path [attr.d]="d" />
|
|
231
|
+
</svg>
|
|
232
|
+
}
|
|
233
|
+
</ng-template>
|
|
234
|
+
`,
|
|
235
|
+
styles: [":host{display:inline-flex}.icon-static{display:inline-flex;align-items:center;justify-content:center;color:inherit}.icon-static.danger{color:#b91c1c}.icon-static svg{display:block}.icon-btn{position:relative;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:none;border-radius:6px;background:transparent;color:#475569;cursor:pointer;-webkit-appearance:none;appearance:none;font:inherit;transition:background .15s ease,color .15s ease}.icon-btn:hover:not(:disabled){background:#f1f5f9;color:#0f172a}.icon-btn.danger{color:#b91c1c}.icon-btn.danger:hover:not(:disabled){background:#fef2f2;color:#991b1b}.icon-btn:focus-visible{outline:2px solid #2563eb;outline-offset:2px}.icon-btn:disabled{opacity:.5;cursor:not-allowed}.icon-btn.loading:disabled{opacity:1;cursor:progress}.spinner{display:block;box-sizing:border-box;border:2px solid rgba(100,116,139,.3);border-top-color:currentColor;border-radius:50%;animation:ui-icon-spin .6s linear infinite}@keyframes ui-icon-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.spinner{animation-duration:2s}}.icon-btn:after{content:\"\";position:absolute;inset:-8px}\n"]
|
|
236
|
+
}]
|
|
237
|
+
}],
|
|
238
|
+
propDecorators: {
|
|
239
|
+
name: [{
|
|
240
|
+
type: i0.Input,
|
|
241
|
+
args: [{
|
|
242
|
+
isSignal: true,
|
|
243
|
+
alias: "name",
|
|
244
|
+
required: true
|
|
245
|
+
}]
|
|
246
|
+
}],
|
|
247
|
+
tooltip: [{
|
|
248
|
+
type: i0.Input,
|
|
249
|
+
args: [{
|
|
250
|
+
isSignal: true,
|
|
251
|
+
alias: "tooltip",
|
|
252
|
+
required: false
|
|
253
|
+
}]
|
|
254
|
+
}],
|
|
255
|
+
ariaLabel: [{
|
|
256
|
+
type: i0.Input,
|
|
257
|
+
args: [{
|
|
258
|
+
isSignal: true,
|
|
259
|
+
alias: "ariaLabel",
|
|
260
|
+
required: false
|
|
261
|
+
}]
|
|
262
|
+
}],
|
|
263
|
+
size: [{
|
|
264
|
+
type: i0.Input,
|
|
265
|
+
args: [{
|
|
266
|
+
isSignal: true,
|
|
267
|
+
alias: "size",
|
|
268
|
+
required: false
|
|
269
|
+
}]
|
|
270
|
+
}],
|
|
271
|
+
variant: [{
|
|
272
|
+
type: i0.Input,
|
|
273
|
+
args: [{
|
|
274
|
+
isSignal: true,
|
|
275
|
+
alias: "variant",
|
|
276
|
+
required: false
|
|
277
|
+
}]
|
|
278
|
+
}],
|
|
279
|
+
disabled: [{
|
|
280
|
+
type: i0.Input,
|
|
281
|
+
args: [{
|
|
282
|
+
isSignal: true,
|
|
283
|
+
alias: "disabled",
|
|
284
|
+
required: false
|
|
285
|
+
}]
|
|
286
|
+
}],
|
|
287
|
+
loading: [{
|
|
288
|
+
type: i0.Input,
|
|
289
|
+
args: [{
|
|
290
|
+
isSignal: true,
|
|
291
|
+
alias: "loading",
|
|
292
|
+
required: false
|
|
293
|
+
}]
|
|
294
|
+
}],
|
|
295
|
+
interactive: [{
|
|
296
|
+
type: i0.Input,
|
|
297
|
+
args: [{
|
|
298
|
+
isSignal: true,
|
|
299
|
+
alias: "interactive",
|
|
300
|
+
required: false
|
|
301
|
+
}]
|
|
302
|
+
}],
|
|
303
|
+
iconClick: [{
|
|
304
|
+
type: i0.Output,
|
|
305
|
+
args: ["iconClick"]
|
|
306
|
+
}]
|
|
307
|
+
}
|
|
308
|
+
});
|
|
309
|
+
export { ICON_NAMES, IconComponent, MORE_ICON_NAMES, iconPath };
|
|
310
|
+
|
|
311
|
+
//# sourceMappingURL=forgeroute-ui-icon.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forgeroute-ui-icon.mjs","names":[],"sources":["../../../projects/forgeroute-ui/icon/src/lib/icon/icon.component.ts"],"sourcesContent":["import { NgTemplateOutlet } from '@angular/common';\nimport { Component, ChangeDetectionStrategy, computed, input, output } from '@angular/core';\nimport { builtInActionIcon } from '@forgeroute/ui/more-menu';\nimport { TooltipDirective } from '@forgeroute/ui/tooltip';\n\n/** Icons drawn by `<ui-icon>` itself (the other row-action icons — view, edit, … — are reused from the data table). */\nconst EXTRA_ICONS: Record<string, string> = {\n // A fuller bin than the data table's row-action one: lid with handle, tapered body, two slats\n 'delete': 'M3 6h18 M8 6V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2 M5 6l1 14a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2l1-14 M10 11v6 M14 11v6',\n 'add': 'M12 5v14 M5 12h14',\n 'close': 'M18 6L6 18 M6 6l12 12',\n 'check': 'M20 6L9 17l-5-5',\n 'upload': 'M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4 M17 8l-5-5-5 5 M12 3v12',\n 'image': 'M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2z M8.5 8.5a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3z M21 15l-5-5L5 21',\n 'chevron-up': 'M18 15l-6-6-6 6',\n 'chevron-down': 'M6 9l6 6 6-6',\n 'chevron-right': 'M9 18l6-6-6-6',\n 'arrow-left': 'M19 12H5 M12 19l-7-7 7-7',\n 'bell': 'M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9 M13.73 21a2 2 0 0 1-3.46 0',\n 'print': 'M6 9V2h12v7 M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2 M6 14h12v8H6z',\n 'shield': 'M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z',\n 'lock': 'M5 11h14a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2z M7 11V7a5 5 0 0 1 10 0v4',\n 'arrow-up': 'M12 19V5 M5 12l7-7 7 7',\n 'arrow-down': 'M12 5v14 M19 12l-7 7-7-7',\n 'arrow-right': 'M5 12h14 M12 5l7 7-7 7',\n 'document': 'M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z M14 2v6h6 M16 13H8 M16 17H8 M10 9H8',\n // Six dots (drag grip): zero-length segments, drawn as dots by the round line caps\n 'grip': 'M9 5h.01 M15 5h.01 M9 12h.01 M15 12h.01 M9 19h.01 M15 19h.01',\n 'card': 'M3 4h18a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z M1 10h22',\n // The view (eye) icon with a diagonal slash: \"hidden\" / \"don't show\" (e.g. a password field's hide toggle)\n 'view-off': 'M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6z M3 3l18 18',\n // Undo-arrow (a refund / reverse): curved line back to the left with an arrowhead\n 'refund': 'M3 10h10a8 8 0 0 1 8 8v2 M3 10l6 6 M3 10l6-6',\n // Two interlocking chain links: a link / URL (copy link, share link)\n 'link': 'M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71 M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71',\n // Three vertical bars of different heights: a bar chart / comparison\n 'chart': 'M18 20V10 M12 20V4 M6 20v-6',\n // Clipboard with a clip at the top: copy to clipboard\n 'clipboard': 'M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2 M9 2h6a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1z',\n // Floppy disk: save\n 'save': 'M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z M17 21v-8H7v8 M7 3v5h8',\n 'bank': 'M3 21h18 M3 10h18 M5 6l7-3 7 3 M4 10v11 M20 10v11 M8 14v3 M12 14v3 M16 14v3',\n // Two chain links pulled apart with a slash: disconnect / unlink an integration\n 'unlink': 'M18.84 12.25l1.72-1.71a5 5 0 0 0-7.07-7.07l-1.72 1.71 M5.17 11.75l-1.72 1.71a5 5 0 0 0 7.07 7.07l1.71-1.71 M3 3l18 18',\n // Paper plane: send / test-send\n 'send': 'M22 2L11 13 M22 2l-7 20-4-9-9-4 20-7z',\n // Two arrows chasing in a circle: refresh / sync / retry\n 'refresh': 'M23 4v6h-6 M1 20v-6h6 M3.51 9a9 9 0 0 1 14.85-3.36L23 10 M1 14l4.64 4.36A9 9 0 0 0 20.49 15',\n // library source 2026-11-04, not yet published:\n // Magnifying glass: search (e.g. the leading icon of a search field, `ui-text-input leadingIcon=\"search\"`)\n 'search': 'M11 3a8 8 0 1 0 0 16 8 8 0 0 0 0-16z M21 21l-4.35-4.35',\n // Cup with steam: food and drink (a product type)\n 'cup': 'M18 8h1a4 4 0 0 1 0 8h-1 M2 8h16v9a4 4 0 0 1-4 4H6a4 4 0 0 1-4-4V8z M6 1v3 M10 1v3 M14 1v3',\n // Banknote: a rounded note with a centre coin and two corner dots - cash (a payment method)\n 'cash': 'M3 6h18a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1z M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6z M6 12h.01 M18 12h.01',\n // Dollar sign: a vertical bar through an S - money / price / amount\n 'dollar': 'M12 1v22 M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6',\n // Spanner: rentals and tools (a product type)\n 'wrench': 'M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z',\n // library source 2026-11-05, not yet published:\n // Five-point star: rating / favourite\n 'star': 'M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z',\n // Gift box with ribbon: a gift / reward / referral thank-you\n 'gift': 'M20 12v10H4V12 M2 7h20v5H2z M12 22V7 M12 7H7.5a2.5 2.5 0 0 1 0-5C11 2 12 7 12 7z M12 7h4.5a2.5 2.5 0 0 0 0-5C13 2 12 7 12 7z',\n // Medal with ribbon tails: an award / achievement\n 'award': 'M12 1a7 7 0 1 0 0 14 7 7 0 0 0 0-14z M8.21 13.89L7 23l5-3 5 3-1.21-9.12',\n // Calendar with a check mark: a confirmed date / booked appointment\n 'calendar-check': 'M19 4H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z M16 2v4 M8 2v4 M3 10h18 M9 16l2 2 4-4',\n};\n\n/**\n * Icons added in 0.5.11 (a dashboard, a group of people, a gear, a person with a plus). They are drawn by `<ui-icon>`, `ui-option-card` and the setup wizard through `iconPath(key)`,\n * but are kept apart from `ICON_NAMES` / `IconName` (as published) and from the data-table action keys, so a row action named `settings` or `users` still gets the fallback arrow it always got.\n */\nconst MORE_ICONS: Record<string, string> = {\n // Four panels of different sizes: a dashboard / overview\n 'dashboard': 'M3 3h7v9H3z M14 3h7v5h-7z M14 12h7v9h-7z M3 16h7v5H3z',\n // Two people side by side: users / a team\n 'users': 'M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2 M9 3a4 4 0 1 0 0 8 4 4 0 0 0 0-8z M23 21v-2a4 4 0 0 0-3-3.87 M16 3.13a4 4 0 0 1 0 7.75',\n // A gear: settings\n 'settings': 'M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6z M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z',\n // A person with a plus: invite / add a user\n 'user-plus': 'M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2 M8.5 3a4 4 0 1 0 0 8 4 4 0 0 0 0-8z M20 8v6 M23 11h-6',\n};\n\n/** The keys added in 0.5.11 (see `MORE_ICONS`): each resolves with `iconPath(key)`. */\nexport const MORE_ICON_NAMES: readonly string[] = Object.freeze(Object.keys(MORE_ICONS));\n\n/**\n * Every key `<ui-icon>` draws by itself (the data-table action keys such as `view` / `edit` / `call` are accepted too, see `builtInActionIcon`).\n * Each resolves with `iconPath(key)`. Includes `search`, `cup` (food / drink) and `wrench` (rental / tools), library source 2026-11-04, and `cash` (banknote) and `dollar` (payment methods / amounts), library source 2026-11-05, not yet published. Also `star`, `gift`, `award` and `calendar-check` (library source 2026-11-05, not yet published).\n */\nexport const ICON_NAMES: readonly string[] = Object.freeze(Object.keys(EXTRA_ICONS));\n\n/** The SVG path (24×24 stroke icon) for an icon key, or undefined when the key is unknown. */\nexport function iconPath(name: string): string | undefined {\n // own keys only: 'constructor' / 'toString' / '__proto__' are not icons\n if (Object.prototype.hasOwnProperty.call(EXTRA_ICONS, name)) return EXTRA_ICONS[name];\n return builtInActionIcon(name) ?? (Object.prototype.hasOwnProperty.call(MORE_ICONS, name) ? MORE_ICONS[name] : undefined);\n}\n\n/** Keys with an icon of their own (the data-table action keys are accepted too — see `builtInActionIcon`). */\nexport type IconName = 'add' | 'close' | 'check' | 'upload' | 'image' | 'chevron-up' | 'chevron-down' | 'arrow-left' | 'bell' | 'print'\n | 'lock' | 'shield' | 'arrow-up' | 'arrow-down' | 'arrow-right' | 'document' | 'grip' | 'card' | 'bank'\n | 'view' | 'view-off' | 'edit' | 'delete' | 'download' | 'duplicate' | 'archive' | 'restore' | 'share' | 'email' | 'message' | 'call' | 'refund' | 'chevron-right' | 'link' | 'save' | 'chart' | 'clipboard' | 'unlink' | 'send' | 'refresh' | 'search' | 'cup' | 'wrench' | 'cash' | 'dollar' | 'star' | 'gift' | 'award' | 'calendar-check' | 'history' | 'move-up' | 'move-down';\n\n/**\n * A clickable icon. The host passes a key (`name=\"delete\"`) and the library draws that icon; clicking it emits\n * `iconClick`, and the host does the actual work (delete the row, open a panel, …).\n *\n * <ui-icon name=\"delete\" tooltip=\"Remove line item 1\" variant=\"danger\" (iconClick)=\"removeLineItem(i)\" />\n *\n * `tooltip` is the text shown on hover / keyboard focus (any length) and, unless `ariaLabel` is set, the name\n * assistive tech reads — always set it on a clickable icon. An unknown `name` draws nothing.\n *\n * `[loading]=\"true\"` replaces the picture with a spinner and disables the button while the request the click started is running\n * (the same busy state `ui-button` has) — e.g. `<ui-icon name=\"delete\" [loading]=\"deleting()\" … />`.\n *\n * `[interactive]=\"false\"` draws just the picture (no button, no click) for an icon that sits next to text or inside another\n * button — e.g. the arrow in a \"Back\" button, a bell beside a reminder. It is hidden from assistive tech unless a `tooltip` or `ariaLabel` is set.\n *\n * <ui-button><ui-icon name=\"arrow-left\" [interactive]=\"false\" /> Back to Dashboard</ui-button>\n */\n@Component({\n selector: 'ui-icon',\n standalone: true,\n imports: [NgTemplateOutlet, TooltipDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n @if (interactive()) {\n <button type=\"button\" class=\"icon-btn\" [class.danger]=\"variant() === 'danger'\"\n [class.loading]=\"loading()\" [disabled]=\"disabled() || loading()\" [attr.aria-busy]=\"loading() ? 'true' : null\"\n [attr.aria-label]=\"accessibleName() || null\" [uiTooltip]=\"tooltip()\" (click)=\"onClick($event)\">\n <ng-container *ngTemplateOutlet=\"glyph\" />\n </button>\n } @else {\n <span class=\"icon-static\" [class.danger]=\"variant() === 'danger'\" [attr.aria-busy]=\"loading() ? 'true' : null\"\n [attr.role]=\"accessibleName() ? 'img' : null\" [attr.aria-label]=\"accessibleName() || null\" [uiTooltip]=\"tooltip()\" [attr.aria-hidden]=\"accessibleName() ? null : 'true'\">\n <ng-container *ngTemplateOutlet=\"glyph\" />\n </span>\n }\n <ng-template #glyph>\n @if (loading()) {\n <span class=\"spinner\" [style.width.px]=\"size()\" [style.height.px]=\"size()\" aria-hidden=\"true\"></span>\n } @else if (path(); as d) {\n <svg viewBox=\"0 0 24 24\" [attr.width]=\"size()\" [attr.height]=\"size()\" fill=\"none\" stroke=\"currentColor\"\n stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\">\n <path [attr.d]=\"d\" />\n </svg>\n }\n </ng-template>\n `,\n styles: [`\n :host { display: inline-flex; }\n .icon-static { display: inline-flex; align-items: center; justify-content: center; color: inherit; }\n .icon-static.danger { color: #b91c1c; }\n .icon-static svg { display: block; }\n .icon-btn {\n position: relative; display: inline-flex; align-items: center; justify-content: center;\n width: 28px; height: 28px; padding: 0; border: none; border-radius: 6px;\n background: transparent; color: #475569; cursor: pointer;\n -webkit-appearance: none; appearance: none; font: inherit;\n transition: background 0.15s ease, color 0.15s ease;\n }\n .icon-btn:hover:not(:disabled) { background: #f1f5f9; color: #0f172a; }\n .icon-btn.danger { color: #b91c1c; }\n .icon-btn.danger:hover:not(:disabled) { background: #fef2f2; color: #991b1b; }\n .icon-btn:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }\n .icon-btn:disabled { opacity: 0.5; cursor: not-allowed; }\n /* Busy: the spinner replaces the picture at full strength (the button is disabled while the request runs) */\n .icon-btn.loading:disabled { opacity: 1; cursor: progress; }\n .spinner {\n display: block; box-sizing: border-box; border: 2px solid rgba(100, 116, 139, 0.3); border-top-color: currentColor;\n border-radius: 50%; animation: ui-icon-spin 0.6s linear infinite;\n }\n @keyframes ui-icon-spin { to { transform: rotate(360deg); } }\n @media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2s; } }\n /* 44px hit area for fingers without changing the 28px look */\n .icon-btn::after { content: ''; position: absolute; inset: -8px; }\n `],\n})\nexport class IconComponent {\n /** Which icon to draw, e.g. `delete`, `edit`, `add`. */\n readonly name = input.required<IconName | (string & {})>();\n /** Hover / keyboard-focus tooltip text, e.g. \"Remove line item 1\". Any length. Also the accessible name unless `ariaLabel` is set. */\n readonly tooltip = input('');\n /** Screen-reader name. Leave empty to use `tooltip`; set it only when it should differ. */\n readonly ariaLabel = input('');\n /** Icon size in px. */\n readonly size = input(16);\n readonly variant = input<'default' | 'danger'>('default');\n readonly disabled = input(false);\n /** The host is running the request this icon started: a spinner replaces the picture and the button is disabled (no click) until it is false again. */\n readonly loading = input(false);\n /** false = just the picture (no button, no click) — for an icon beside text or inside another button. */\n readonly interactive = input(true);\n /** Fires on click (not while disabled); the host performs the action. */\n readonly iconClick = output<MouseEvent>();\n\n protected readonly accessibleName = computed(() => this.ariaLabel() || this.tooltip());\n protected readonly path = computed(() => iconPath(this.name()));\n\n protected onClick(event: MouseEvent): void {\n // Keep a click on the icon from also triggering a click handler on a parent (a row, a card, …).\n event.stopPropagation();\n this.iconClick.emit(event);\n }\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, computed, effect, input, signal, untracked } from "@angular/core";
|
|
3
|
+
var ImagePreviewComponent = class ImagePreviewComponent {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.src = input(null, ...ngDevMode ? [{ debugName: "src" }] : /* istanbul ignore next */ []);
|
|
6
|
+
this.alt = input("", ...ngDevMode ? [{ debugName: "alt" }] : /* istanbul ignore next */ []);
|
|
7
|
+
this.shape = input("rounded", ...ngDevMode ? [{ debugName: "shape" }] : /* istanbul ignore next */ []);
|
|
8
|
+
this.size = input("md", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
|
|
9
|
+
this.placeholder = input("image", ...ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []);
|
|
10
|
+
this.loading = input("lazy", ...ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []);
|
|
11
|
+
this.positionX = input(50, ...ngDevMode ? [{ debugName: "positionX" }] : /* istanbul ignore next */ []);
|
|
12
|
+
this.positionY = input(50, ...ngDevMode ? [{ debugName: "positionY" }] : /* istanbul ignore next */ []);
|
|
13
|
+
this.retryKey = input(null, ...ngDevMode ? [{ debugName: "retryKey" }] : /* istanbul ignore next */ []);
|
|
14
|
+
this._failed = signal(false, ...ngDevMode ? [{ debugName: "_failed" }] : /* istanbul ignore next */ []);
|
|
15
|
+
this._url = computed(() => this.src()?.trim() || null, ...ngDevMode ? [{ debugName: "_url" }] : /* istanbul ignore next */ []);
|
|
16
|
+
this._objectPosition = computed(() => `${this.positionX() ?? 50}% ${this.positionY() ?? 50}%`, ...ngDevMode ? [{ debugName: "_objectPosition" }] : /* istanbul ignore next */ []);
|
|
17
|
+
this._cls = computed(() => `ip-${this.shape()}-${this.size()}`, ...ngDevMode ? [{ debugName: "_cls" }] : /* istanbul ignore next */ []);
|
|
18
|
+
effect(() => {
|
|
19
|
+
this.src();
|
|
20
|
+
this.retryKey();
|
|
21
|
+
untracked(() => this._failed.set(false));
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
retry() {
|
|
25
|
+
this._failed.set(false);
|
|
26
|
+
}
|
|
27
|
+
_onError() {
|
|
28
|
+
this._failed.set(true);
|
|
29
|
+
}
|
|
30
|
+
static {
|
|
31
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
32
|
+
minVersion: "12.0.0",
|
|
33
|
+
version: "22.2.2",
|
|
34
|
+
ngImport: i0,
|
|
35
|
+
type: ImagePreviewComponent,
|
|
36
|
+
deps: [],
|
|
37
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
static {
|
|
41
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
42
|
+
minVersion: "17.0.0",
|
|
43
|
+
version: "22.2.2",
|
|
44
|
+
type: ImagePreviewComponent,
|
|
45
|
+
isStandalone: true,
|
|
46
|
+
selector: "ui-image-preview",
|
|
47
|
+
inputs: {
|
|
48
|
+
src: {
|
|
49
|
+
classPropertyName: "src",
|
|
50
|
+
publicName: "src",
|
|
51
|
+
isSignal: true,
|
|
52
|
+
isRequired: false,
|
|
53
|
+
transformFunction: null
|
|
54
|
+
},
|
|
55
|
+
alt: {
|
|
56
|
+
classPropertyName: "alt",
|
|
57
|
+
publicName: "alt",
|
|
58
|
+
isSignal: true,
|
|
59
|
+
isRequired: false,
|
|
60
|
+
transformFunction: null
|
|
61
|
+
},
|
|
62
|
+
shape: {
|
|
63
|
+
classPropertyName: "shape",
|
|
64
|
+
publicName: "shape",
|
|
65
|
+
isSignal: true,
|
|
66
|
+
isRequired: false,
|
|
67
|
+
transformFunction: null
|
|
68
|
+
},
|
|
69
|
+
size: {
|
|
70
|
+
classPropertyName: "size",
|
|
71
|
+
publicName: "size",
|
|
72
|
+
isSignal: true,
|
|
73
|
+
isRequired: false,
|
|
74
|
+
transformFunction: null
|
|
75
|
+
},
|
|
76
|
+
placeholder: {
|
|
77
|
+
classPropertyName: "placeholder",
|
|
78
|
+
publicName: "placeholder",
|
|
79
|
+
isSignal: true,
|
|
80
|
+
isRequired: false,
|
|
81
|
+
transformFunction: null
|
|
82
|
+
},
|
|
83
|
+
loading: {
|
|
84
|
+
classPropertyName: "loading",
|
|
85
|
+
publicName: "loading",
|
|
86
|
+
isSignal: true,
|
|
87
|
+
isRequired: false,
|
|
88
|
+
transformFunction: null
|
|
89
|
+
},
|
|
90
|
+
positionX: {
|
|
91
|
+
classPropertyName: "positionX",
|
|
92
|
+
publicName: "positionX",
|
|
93
|
+
isSignal: true,
|
|
94
|
+
isRequired: false,
|
|
95
|
+
transformFunction: null
|
|
96
|
+
},
|
|
97
|
+
positionY: {
|
|
98
|
+
classPropertyName: "positionY",
|
|
99
|
+
publicName: "positionY",
|
|
100
|
+
isSignal: true,
|
|
101
|
+
isRequired: false,
|
|
102
|
+
transformFunction: null
|
|
103
|
+
},
|
|
104
|
+
retryKey: {
|
|
105
|
+
classPropertyName: "retryKey",
|
|
106
|
+
publicName: "retryKey",
|
|
107
|
+
isSignal: true,
|
|
108
|
+
isRequired: false,
|
|
109
|
+
transformFunction: null
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
ngImport: i0,
|
|
113
|
+
template: `
|
|
114
|
+
@if (_url() && !_failed()) {
|
|
115
|
+
<img class="ip-img" [class]="_cls()" [src]="_url()" [attr.alt]="alt()" [attr.loading]="loading()" [style.object-position]="_objectPosition()" decoding="async" (error)="_onError()" />
|
|
116
|
+
} @else {
|
|
117
|
+
<span class="ip-img ip-ph" [class]="_cls()" aria-hidden="true">
|
|
118
|
+
@if (placeholder() === 'person') {
|
|
119
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="8" r="4"/><path d="M4 21c0-4 3.6-7 8-7s8 3 8 7"/></svg>
|
|
120
|
+
} @else {
|
|
121
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="16" rx="2"/><circle cx="9" cy="10" r="1.8"/><path d="M21 16l-5-5-8 9"/></svg>
|
|
122
|
+
}
|
|
123
|
+
</span>
|
|
124
|
+
}
|
|
125
|
+
`,
|
|
126
|
+
isInline: true,
|
|
127
|
+
styles: [":host{display:inline-block;line-height:0;flex-shrink:0}.ip-img{display:block;object-fit:cover;border:1px solid #e2e8f0;background:#f1f5f9;box-sizing:border-box;flex-shrink:0}.ip-ph{display:inline-flex;align-items:center;justify-content:center;color:#94a3b8}.ip-ph svg{width:55%;height:55%}.ip-circle-sm{width:28px;height:28px;border-radius:50%}.ip-circle-md{width:40px;height:40px;border-radius:50%}.ip-circle-lg{width:80px;height:80px;border-radius:50%}.ip-rounded-sm{width:36px;height:24px;border-radius:5px}.ip-rounded-md{width:48px;height:32px;border-radius:6px}.ip-rounded-lg{width:112px;height:64px;border-radius:8px}\n"],
|
|
128
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
133
|
+
minVersion: "12.0.0",
|
|
134
|
+
version: "22.2.2",
|
|
135
|
+
ngImport: i0,
|
|
136
|
+
type: ImagePreviewComponent,
|
|
137
|
+
decorators: [{
|
|
138
|
+
type: Component,
|
|
139
|
+
args: [{
|
|
140
|
+
selector: "ui-image-preview",
|
|
141
|
+
standalone: true,
|
|
142
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
143
|
+
template: `
|
|
144
|
+
@if (_url() && !_failed()) {
|
|
145
|
+
<img class="ip-img" [class]="_cls()" [src]="_url()" [attr.alt]="alt()" [attr.loading]="loading()" [style.object-position]="_objectPosition()" decoding="async" (error)="_onError()" />
|
|
146
|
+
} @else {
|
|
147
|
+
<span class="ip-img ip-ph" [class]="_cls()" aria-hidden="true">
|
|
148
|
+
@if (placeholder() === 'person') {
|
|
149
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="8" r="4"/><path d="M4 21c0-4 3.6-7 8-7s8 3 8 7"/></svg>
|
|
150
|
+
} @else {
|
|
151
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="16" rx="2"/><circle cx="9" cy="10" r="1.8"/><path d="M21 16l-5-5-8 9"/></svg>
|
|
152
|
+
}
|
|
153
|
+
</span>
|
|
154
|
+
}
|
|
155
|
+
`,
|
|
156
|
+
styles: [":host{display:inline-block;line-height:0;flex-shrink:0}.ip-img{display:block;object-fit:cover;border:1px solid #e2e8f0;background:#f1f5f9;box-sizing:border-box;flex-shrink:0}.ip-ph{display:inline-flex;align-items:center;justify-content:center;color:#94a3b8}.ip-ph svg{width:55%;height:55%}.ip-circle-sm{width:28px;height:28px;border-radius:50%}.ip-circle-md{width:40px;height:40px;border-radius:50%}.ip-circle-lg{width:80px;height:80px;border-radius:50%}.ip-rounded-sm{width:36px;height:24px;border-radius:5px}.ip-rounded-md{width:48px;height:32px;border-radius:6px}.ip-rounded-lg{width:112px;height:64px;border-radius:8px}\n"]
|
|
157
|
+
}]
|
|
158
|
+
}],
|
|
159
|
+
ctorParameters: () => [],
|
|
160
|
+
propDecorators: {
|
|
161
|
+
src: [{
|
|
162
|
+
type: i0.Input,
|
|
163
|
+
args: [{
|
|
164
|
+
isSignal: true,
|
|
165
|
+
alias: "src",
|
|
166
|
+
required: false
|
|
167
|
+
}]
|
|
168
|
+
}],
|
|
169
|
+
alt: [{
|
|
170
|
+
type: i0.Input,
|
|
171
|
+
args: [{
|
|
172
|
+
isSignal: true,
|
|
173
|
+
alias: "alt",
|
|
174
|
+
required: false
|
|
175
|
+
}]
|
|
176
|
+
}],
|
|
177
|
+
shape: [{
|
|
178
|
+
type: i0.Input,
|
|
179
|
+
args: [{
|
|
180
|
+
isSignal: true,
|
|
181
|
+
alias: "shape",
|
|
182
|
+
required: false
|
|
183
|
+
}]
|
|
184
|
+
}],
|
|
185
|
+
size: [{
|
|
186
|
+
type: i0.Input,
|
|
187
|
+
args: [{
|
|
188
|
+
isSignal: true,
|
|
189
|
+
alias: "size",
|
|
190
|
+
required: false
|
|
191
|
+
}]
|
|
192
|
+
}],
|
|
193
|
+
placeholder: [{
|
|
194
|
+
type: i0.Input,
|
|
195
|
+
args: [{
|
|
196
|
+
isSignal: true,
|
|
197
|
+
alias: "placeholder",
|
|
198
|
+
required: false
|
|
199
|
+
}]
|
|
200
|
+
}],
|
|
201
|
+
loading: [{
|
|
202
|
+
type: i0.Input,
|
|
203
|
+
args: [{
|
|
204
|
+
isSignal: true,
|
|
205
|
+
alias: "loading",
|
|
206
|
+
required: false
|
|
207
|
+
}]
|
|
208
|
+
}],
|
|
209
|
+
positionX: [{
|
|
210
|
+
type: i0.Input,
|
|
211
|
+
args: [{
|
|
212
|
+
isSignal: true,
|
|
213
|
+
alias: "positionX",
|
|
214
|
+
required: false
|
|
215
|
+
}]
|
|
216
|
+
}],
|
|
217
|
+
positionY: [{
|
|
218
|
+
type: i0.Input,
|
|
219
|
+
args: [{
|
|
220
|
+
isSignal: true,
|
|
221
|
+
alias: "positionY",
|
|
222
|
+
required: false
|
|
223
|
+
}]
|
|
224
|
+
}],
|
|
225
|
+
retryKey: [{
|
|
226
|
+
type: i0.Input,
|
|
227
|
+
args: [{
|
|
228
|
+
isSignal: true,
|
|
229
|
+
alias: "retryKey",
|
|
230
|
+
required: false
|
|
231
|
+
}]
|
|
232
|
+
}]
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
export { ImagePreviewComponent };
|
|
236
|
+
|
|
237
|
+
//# sourceMappingURL=forgeroute-ui-image-preview.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forgeroute-ui-image-preview.mjs","names":[],"sources":["../../../projects/forgeroute-ui/image-preview/src/lib/image-preview/image-preview.component.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, computed, effect, input, signal, untracked } from '@angular/core';\n\nexport type ImagePreviewShape = 'circle' | 'rounded';\nexport type ImagePreviewSize = 'sm' | 'md' | 'lg';\nexport type ImagePreviewPlaceholder = 'person' | 'image';\n\n/**\n * Small bordered image preview (current photo / cover / background) with a neutral placeholder icon shown when there\n * is no `src` or the image fails to load. Same look as the data table's image cell.\n *\n * <ui-image-preview [src]=\"photoUrl()\" alt=\"Obituary photo\" size=\"lg\" placeholder=\"person\" />\n *\n * `alt` defaults to '' (decorative). The placeholder is always `aria-hidden`.\n * Sizes (w x h): circle sm 28, md 40, lg 80 (square); rounded sm 36x24, md 48x32, lg 112x64.\n */\n@Component({\n selector: 'ui-image-preview',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n @if (_url() && !_failed()) {\n <img class=\"ip-img\" [class]=\"_cls()\" [src]=\"_url()\" [attr.alt]=\"alt()\" [attr.loading]=\"loading()\" [style.object-position]=\"_objectPosition()\" decoding=\"async\" (error)=\"_onError()\" />\n } @else {\n <span class=\"ip-img ip-ph\" [class]=\"_cls()\" aria-hidden=\"true\">\n @if (placeholder() === 'person') {\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"8\" r=\"4\"/><path d=\"M4 21c0-4 3.6-7 8-7s8 3 8 7\"/></svg>\n } @else {\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"3\" y=\"4\" width=\"18\" height=\"16\" rx=\"2\"/><circle cx=\"9\" cy=\"10\" r=\"1.8\"/><path d=\"M21 16l-5-5-8 9\"/></svg>\n }\n </span>\n }\n `,\n styles: [`\n :host { display: inline-block; line-height: 0; flex-shrink: 0; }\n .ip-img { display: block; object-fit: cover; border: 1px solid #e2e8f0; background: #f1f5f9; box-sizing: border-box; flex-shrink: 0; }\n .ip-ph { display: inline-flex; align-items: center; justify-content: center; color: #94a3b8; }\n .ip-ph svg { width: 55%; height: 55%; }\n .ip-circle-sm { width: 28px; height: 28px; border-radius: 50%; }\n .ip-circle-md { width: 40px; height: 40px; border-radius: 50%; }\n .ip-circle-lg { width: 80px; height: 80px; border-radius: 50%; }\n .ip-rounded-sm { width: 36px; height: 24px; border-radius: 5px; }\n .ip-rounded-md { width: 48px; height: 32px; border-radius: 6px; }\n .ip-rounded-lg { width: 112px; height: 64px; border-radius: 8px; }\n `],\n})\nexport class ImagePreviewComponent {\n /** Image URL (or data URL). Falsy shows the placeholder. */\n readonly src = input<string | null | undefined>(null);\n /** Alt text; '' (default) marks the image decorative. */\n readonly alt = input('');\n readonly shape = input<ImagePreviewShape>('rounded');\n readonly size = input<ImagePreviewSize>('md');\n readonly placeholder = input<ImagePreviewPlaceholder>('image');\n readonly loading = input<'lazy' | 'eager'>('lazy');\n /** Focal point in percent (0-100, default centered) — which part of a cropped image stays visible (CSS object-position). */\n readonly positionX = input<number | null | undefined>(50);\n readonly positionY = input<number | null | undefined>(50);\n\n /**\n * Optional retry trigger: whenever its value changes, a failed image is attempted again (signal inputs cannot see\n * the same `src` being set twice, so a host bumps this, e.g. a counter, to retry the same URL).\n */\n readonly retryKey = input<unknown>(null);\n\n protected readonly _failed = signal(false);\n /** Trimmed src; blank / whitespace-only is treated as no image. */\n protected readonly _url = computed(() => this.src()?.trim() || null);\n protected readonly _objectPosition = computed(() => `${this.positionX() ?? 50}% ${this.positionY() ?? 50}%`);\n protected readonly _cls = computed(() => `ip-${this.shape()}-${this.size()}`);\n\n constructor() {\n // A new src (or a changed retryKey) gets a fresh chance to load.\n effect(() => { this.src(); this.retryKey(); untracked(() => this._failed.set(false)); });\n }\n\n /** Clears the failed state so the current `src` is attempted again (call via viewChild). */\n retry(): void { this._failed.set(false); }\n\n protected _onError(): void { this._failed.set(true); }\n}\n"],"mappings":"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"}
|