@forgeroute/ui 0.5.16 → 0.5.18
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-core-ui-labels.es-Dzj_XJJM.mjs → forgeroute-ui-core-ui-labels.es-Woi3az70.mjs} +186 -2
- package/fesm2022/{forgeroute-ui-core-ui-labels.es-Dzj_XJJM.mjs.map → forgeroute-ui-core-ui-labels.es-Woi3az70.mjs.map} +1 -1
- package/fesm2022/forgeroute-ui-core.mjs +186 -2
- package/fesm2022/forgeroute-ui-core.mjs.map +1 -1
- 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 +6258 -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 +18 -1
- 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 +15 -1
- 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 +6254 -1188
- 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 +422 -2
- 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-core.d.ts +188 -4
- 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 +1826 -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 +1458 -3
- 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 @@
|
|
|
1
|
+
{"version":3,"file":"forgeroute-ui-phone-number-picker.mjs","names":[],"sources":["../../../projects/forgeroute-ui/phone-number-picker/src/lib/phone-number-picker/phone-number-picker.component.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy, Component, DestroyRef, ElementRef, Injector, afterNextRender, computed, effect, inject, input, output, signal, untracked,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\nimport { Observable, Subscription } from 'rxjs';\nimport { SidePanelComponent } from '@forgeroute/ui/core';\nimport { TextInputComponent } from '@forgeroute/ui/text-input';\nimport { RadioGroupComponent, RadioOption } from '@forgeroute/ui/radio';\nimport { ButtonComponent } from '@forgeroute/ui/core';\nimport { AlertComponent } from '@forgeroute/ui/alert';\nimport { BadgeComponent } from '@forgeroute/ui/badge';\nimport { SkeletonComponent } from '@forgeroute/ui/skeleton';\nimport { EmptyStateComponent } from '@forgeroute/ui/empty-state';\nimport { isTouchViewport } from '@forgeroute/ui/core';\nimport { UiLabelsService } from '@forgeroute/ui/core';\n\n/** One phone number the host found for sale. */\nexport interface PhoneNumberOption {\n /** E.164 number, e.g. '+15125550100'. */\n phoneNumber: string;\n /** What the user sees, e.g. '(512) 555-0100'. */\n friendlyName: string;\n /** City / state label shown as a badge, e.g. 'Austin, TX'. */\n region: string | null;\n}\n\n/** What the host's `search` function receives: exactly one of the two keys. */\nexport interface PhoneNumberSearchCriteria {\n postalCode?: string;\n areaCode?: string;\n}\n\n/** What `selected` emits: the chosen number plus the criteria that found it. */\nexport type PhoneNumberSelection = PhoneNumberOption & PhoneNumberSearchCriteria;\n\nexport type PhoneNumberSearchMode = 'zip' | 'area-code';\n\nexport const PHONE_NUMBER_ZIP_LENGTH = 5;\nexport const PHONE_NUMBER_AREA_CODE_LENGTH = 3;\n\n/** Keeps only digits and cuts to `max` (\"78701-1234\" -> \"78701\"). */\nexport function digitsOnly(value: string | null | undefined, max: number): string {\n return (value ?? '').replace(/\\D/g, '').slice(0, max);\n}\n\n/**\n * Side panel that walks the user through finding and choosing a phone number to buy. The HOST does the searching (the\n * library owns no HTTP and knows nothing about the phone provider): it passes a `search` function that returns the\n * numbers for a ZIP code or an area code.\n *\n * <ui-phone-number-picker\n * [open]=\"showPicker()\"\n * defaultPostalCode=\"78701\"\n * costNotice=\"Each number costs about $1.00/month.\"\n * [search]=\"searchNumbers\"\n * (selected)=\"buy($event)\"\n * (closed)=\"showPicker.set(false)\" />\n *\n * searchNumbers = (c: PhoneNumberSearchCriteria) => this.api.get<PhoneNumberOption[]>('/phone-numbers/available', c);\n *\n * Inputs: `open`, `title` ('Get a Phone Number'), `subtitle`, `defaultPostalCode` (prefilled ZIP, may be empty),\n * `defaultMode` ('zip' | 'area-code'), `allowAreaCode` (true: the user can switch to an area code search), `search`\n * (required), `costNotice` (warning shown on steps 1 and 3), `confirmLabel` ('Get this number'), `maxResults` (5: caps what is shown).\n * Outputs: `selected` (PhoneNumberSelection, only from the final confirm button) and `closed`.\n *\n * Flow (three steps, nothing is ever searched or bought without a click):\n * 1. Confirm location - ZIP code (5 digits) or area code (3 digits), prefilled from `defaultPostalCode`. The primary button\n * \"Confirm ZIP code and search\" is disabled until the value is complete; Enter does the same. Non-digits are ignored while\n * typing, a pasted ZIP+4 keeps its first 5 digits.\n * 2. Results - `search(criteria)` runs ONCE per confirm; a newer search (or closing) drops the older response. Skeleton while\n * loading, an empty state, or an error with Retry. Picking a row only moves on to step 3.\n * 3. Confirm number - \"You chose ...\". Only the final button emits `selected`, then `closed`.\n * Every time `open` becomes true the panel starts again at step 1 with the defaults; closing discards everything.\n * `defaultPostalCode` may arrive after the panel opened (the host loads it asynchronously): while the panel is on step 1 in ZIP\n * mode and the user has NOT typed or pasted in the ZIP field (clearing it counts as an edit), a non-empty default fills the field;\n * typed input is never overwritten, an empty default is ignored, and a default that arrives on step 2 or 3 is applied when the user\n * returns to step 1 only if the field is still untouched.\n * The final confirm emits `selected` at most once per opening (double clicks / repeated Enter are ignored and the button is disabled\n * after the first click). The panel emits `closed` right after `selected`, so the host closes it; reopening re-enables the button.\n *\n * Accessibility: labelled fields with the library's inline errors, focus moves to the first control of each step (a text\n * field is not focused on touch devices so no keyboard pops up), a visually hidden polite live region announces searching,\n * result counts, errors and step changes, Escape closes the panel even from inside a field, 44px touch targets come from the\n * shared components.\n */\n@Component({\n selector: 'ui-phone-number-picker',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n ReactiveFormsModule, SidePanelComponent, TextInputComponent, RadioGroupComponent, ButtonComponent, AlertComponent,\n BadgeComponent, SkeletonComponent, EmptyStateComponent,\n ],\n template: `\n <ui-side-panel\n [open]=\"open()\"\n [title]=\"title()\"\n [subtitle]=\"subtitle()\"\n [primaryLabel]=\"primaryLabel()\"\n [primaryDisabled]=\"(step() === 1 && !valid()) || (step() === 3 && confirmed())\"\n (closed)=\"close()\"\n (primaryClick)=\"onPrimary()\">\n\n <div class=\"pn-sr-only\" role=\"status\" aria-live=\"polite\" data-testid=\"pn-live\">{{ announcement() }}</div>\n\n @if (step() === 1) {\n <div class=\"pn-step\" data-testid=\"pn-step-1\">\n @if (costNotice()) {\n <ui-alert variant=\"warning\" data-testid=\"pn-cost-notice\">{{ costNotice() }}</ui-alert>\n }\n @if (allowAreaCode()) {\n <ui-radio-group [label]=\"labels.t('phoneNumberPicker.searchBy')\" orientation=\"horizontal\" [options]=\"modeOptions()\" [formControl]=\"modeCtl\" data-testid=\"pn-mode\" />\n }\n <div (keydown.enter)=\"onEnter($event)\" (beforeinput)=\"onBeforeInput($event)\" (paste)=\"onPaste($event)\">\n @if (mode() === 'zip') {\n <ui-text-input\n [label]=\"labels.t('phoneNumberPicker.zipCode')\" [required]=\"true\" [maxlength]=\"5\" type=\"text\" inputmode=\"numeric\" autocomplete=\"postal-code\"\n placeholder=\"78701\" [formControl]=\"zipCtl\" [error]=\"fieldError()\" [showErrors]=\"touched()\"\n [hint]=\"labels.t('phoneNumberPicker.weLlLookForNumbers')\"\n (blurred)=\"onFieldBlur('zip')\" data-testid=\"pn-zip\" />\n } @else {\n <ui-text-input\n [label]=\"labels.t('phoneNumberPicker.areaCode')\" [required]=\"true\" [maxlength]=\"3\" type=\"text\" inputmode=\"numeric\" autocomplete=\"off\"\n placeholder=\"512\" [formControl]=\"areaCtl\" [error]=\"fieldError()\" [showErrors]=\"touched()\"\n [hint]=\"labels.t('phoneNumberPicker.weLlLookForNumbers2')\"\n (blurred)=\"onFieldBlur('area-code')\" data-testid=\"pn-area\" />\n }\n </div>\n </div>\n }\n\n @if (step() === 2) {\n <div class=\"pn-step\" data-testid=\"pn-step-2\">\n @if (loading()) {\n <div class=\"pn-skeletons\" aria-busy=\"true\" data-testid=\"pn-loading\">\n @for (i of skeletonRows; track i) { <ui-skeleton [height]=\"56\" [radius]=\"10\" /> }\n </div>\n } @else if (searchFailed()) {\n <ui-alert variant=\"danger\" data-testid=\"pn-error\">{{ labels.t('phoneNumberPicker.couldnTSearchForNumbers') }}<ui-button variant=\"secondary\" size=\"sm\" data-testid=\"pn-retry\" (click)=\"retry()\">{{ labels.t('common.retry') }}</ui-button>\n </ui-alert>\n } @else if (visibleResults().length === 0) {\n <ui-empty-state iconType=\"search\" [title]=\"emptyTitle()\" [message]=\"labels.t('phoneNumberPicker.tryADifferentZipCode')\" data-testid=\"pn-empty\" />\n } @else {\n <ul class=\"pn-list\" [attr.aria-label]=\"labels.t('phoneNumberPicker.availablePhoneNumbers')\" data-testid=\"pn-results\">\n @for (opt of visibleResults(); track opt.phoneNumber) {\n <li class=\"pn-row\" data-testid=\"pn-row\">\n <span class=\"pn-name\">{{ opt.friendlyName }}</span>\n @if (opt.region) { <ui-badge [label]=\"opt.region\" variant=\"gray\" /> }\n <ui-button class=\"pn-select\" variant=\"secondary\" size=\"sm\" [ariaLabel]=\"labels.t('phoneNumberPicker.selectNamed', { name: opt.friendlyName })\"\n (click)=\"choose(opt)\">{{ labels.t('common.select') }}</ui-button>\n </li>\n }\n </ul>\n }\n <div class=\"pn-actions\">\n <ui-button variant=\"ghost\" size=\"sm\" data-testid=\"pn-change\" (click)=\"changeLocation()\">{{ changeLabel() }}</ui-button>\n </div>\n </div>\n }\n\n @if (step() === 3 && chosen(); as pick) {\n <div class=\"pn-step\" data-testid=\"pn-step-3\">\n <h3 class=\"pn-chosen\" tabindex=\"-1\" data-pn-heading data-testid=\"pn-chosen\">{{ labels.t('phoneNumberPicker.youChose', { name: pick.friendlyName }) }}</h3>\n <p class=\"pn-criteria\" data-testid=\"pn-criteria\">{{ criteriaText() }}</p>\n @if (pick.region) { <ui-badge [label]=\"pick.region\" variant=\"gray\" /> }\n @if (costNotice()) {\n <ui-alert variant=\"warning\" data-testid=\"pn-cost-notice\">{{ costNotice() }}</ui-alert>\n }\n <div class=\"pn-actions\">\n <ui-button variant=\"ghost\" size=\"sm\" data-testid=\"pn-back\" (click)=\"backToResults()\">{{ labels.t('phoneNumberPicker.backToResults') }}</ui-button>\n </div>\n </div>\n }\n </ui-side-panel>\n `,\n styles: [`\n :host { display: contents; }\n .pn-step { display: flex; flex-direction: column; gap: 16px; }\n .pn-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }\n .pn-row {\n display: flex; align-items: center; gap: 10px; padding: 10px 12px;\n border: 1px solid #e2e8f0; border-radius: 10px; background: #fff;\n }\n .pn-name { font-size: 0.9375rem; font-weight: 600; color: #1e293b; flex: 1; min-width: 0; overflow-wrap: anywhere; }\n .pn-select { flex-shrink: 0; }\n .pn-skeletons { display: flex; flex-direction: column; gap: 10px; }\n .pn-actions { display: flex; justify-content: flex-start; }\n .pn-chosen { margin: 0; font-size: 1.125rem; font-weight: 700; color: #1e293b; }\n .pn-chosen:focus { outline: none; }\n .pn-criteria { margin: 0; font-size: 0.875rem; color: #475569; }\n .pn-sr-only {\n position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;\n clip: rect(0, 0, 0, 0); -webkit-clip-path: inset(50%); clip-path: inset(50%); white-space: nowrap; border: 0;\n }\n `],\n})\nexport class PhoneNumberPickerComponent {\n protected readonly labels = inject(UiLabelsService);\n readonly open = input(false);\n readonly titleInput = input<string | null>(null, { alias: 'title' });\n readonly title = computed(() => this.titleInput() ?? this.labels.t('phoneNumberPicker.title'));\n readonly subtitle = input('');\n readonly defaultPostalCode = input('');\n readonly defaultMode = input<PhoneNumberSearchMode>('zip');\n readonly allowAreaCode = input(true);\n /** Host-supplied search. Called once per confirm; the library never fetches by itself. */\n readonly search = input.required<(criteria: PhoneNumberSearchCriteria) => Observable<PhoneNumberOption[]>>();\n readonly costNotice = input('');\n readonly confirmLabelInput = input<string | null>(null, { alias: 'confirmLabel' });\n readonly confirmLabel = computed(() => this.confirmLabelInput() ?? this.labels.t('phoneNumberPicker.confirmLabel'));\n readonly maxResults = input(5);\n\n readonly closed = output<void>();\n readonly selected = output<PhoneNumberSelection>();\n\n protected readonly modeOptions = computed((): RadioOption[] => [\n { value: 'zip', label: this.labels.t('phoneNumberPicker.zip') },\n { value: 'area-code', label: this.labels.t('phoneNumberPicker.areaCodeMode') },\n ]);\n protected readonly skeletonRows = [0, 1, 2];\n\n protected readonly modeCtl = new FormControl<string>('zip', { nonNullable: true });\n protected readonly zipCtl = new FormControl<string>('', { nonNullable: true });\n protected readonly areaCtl = new FormControl<string>('', { nonNullable: true });\n\n protected readonly step = signal<1 | 2 | 3>(1);\n protected readonly mode = signal<PhoneNumberSearchMode>('zip');\n private readonly _zip = signal('');\n private readonly _area = signal('');\n protected readonly touched = signal(false);\n /** True once the user typed / pasted in the ZIP field this opening: a late default never overwrites it. */\n private readonly _zipEdited = signal(false);\n /** True once the final confirm emitted `selected` this opening: further confirms are ignored. */\n protected readonly confirmed = signal(false);\n\n protected readonly loading = signal(false);\n protected readonly searchFailed = signal(false);\n private readonly _results = signal<PhoneNumberOption[]>([]);\n private readonly _criteria = signal<PhoneNumberSearchCriteria | null>(null);\n protected readonly chosen = signal<PhoneNumberOption | null>(null);\n\n private readonly _value = computed(() => (this.mode() === 'zip' ? this._zip() : this._area()));\n private readonly _length = computed(() => (this.mode() === 'zip' ? PHONE_NUMBER_ZIP_LENGTH : PHONE_NUMBER_AREA_CODE_LENGTH));\n protected readonly valid = computed(() => this._value().length === this._length());\n private readonly _fieldName = computed(() => (this.mode() === 'zip' ? this.labels.t('phoneNumberPicker.zip') : this.labels.t('phoneNumberPicker.areaCodeMode')));\n /** Own \"wrong length\" message (empty is left to the input's built-in \"is required\"); only once the field was touched. */\n protected readonly fieldError = computed(() => {\n const v = this._value();\n if (!this.touched() || v.length === 0 || v.length === this._length()) return '';\n return this.labels.t('phoneNumberPicker.mustBeDigits', { field: this._fieldName(), count: this._length() });\n });\n\n protected readonly visibleResults = computed(() => this._results().slice(0, Math.max(0, this.maxResults())));\n protected readonly primaryLabel = computed(() => {\n if (this.step() === 1) return this.mode() === 'zip' ? this.labels.t('phoneNumberPicker.confirmZipAndSearch') : this.labels.t('phoneNumberPicker.confirmAreaAndSearch');\n return this.step() === 3 ? this.confirmLabel() : '';\n });\n protected readonly changeLabel = computed(() => (this._criteria()?.areaCode !== undefined ? this.labels.t('phoneNumberPicker.changeAreaCode') : this.labels.t('phoneNumberPicker.changeZip')));\n protected readonly emptyTitle = computed(() => {\n const c = this._criteria();\n return c?.areaCode !== undefined ? this.labels.t('phoneNumberPicker.noNumbersForArea', { value: c.areaCode }) : this.labels.t('phoneNumberPicker.noNumbersNearZip', { value: c?.postalCode ?? '' });\n });\n protected readonly criteriaText = computed(() => {\n const c = this._criteria();\n return c?.areaCode !== undefined ? this.labels.t('phoneNumberPicker.inAreaCode', { value: c.areaCode }) : this.labels.t('phoneNumberPicker.nearZip', { value: c?.postalCode ?? '' });\n });\n protected readonly announcement = computed(() => {\n if (!this.open()) return '';\n switch (this.step()) {\n case 1: return this.labels.t('phoneNumberPicker.step1');\n case 2: {\n if (this.loading()) return this.labels.t('phoneNumberPicker.searchingNumbers');\n if (this.searchFailed()) return this.labels.t('phoneNumberPicker.couldnTSearchForNumbers');\n const n = this.visibleResults().length;\n return n === 0 ? this.emptyTitle() : this.labels.t(n === 1 ? 'phoneNumberPicker.step2_one' : 'phoneNumberPicker.step2_other', { count: n });\n }\n default: return this.labels.t('phoneNumberPicker.step3', { number: this.chosen()?.friendlyName ?? this.labels.t('phoneNumberPicker.yourNumber') });\n }\n });\n\n private readonly _destroyRef = inject(DestroyRef);\n private readonly _injector = inject(Injector);\n private readonly _el = inject(ElementRef<HTMLElement>);\n private _searchSub: Subscription | null = null;\n\n constructor() {\n this.zipCtl.valueChanges.pipe(takeUntilDestroyed()).subscribe(v => {\n // The text input re-validates (and so re-emits the same value) whenever one of its inputs changes; only a changed value is an edit.\n if (v !== this._zip()) this._zipEdited.set(true);\n this._typed(this.zipCtl, this._zip, v, PHONE_NUMBER_ZIP_LENGTH);\n });\n this.areaCtl.valueChanges.pipe(takeUntilDestroyed()).subscribe(v => this._typed(this.areaCtl, this._area, v, PHONE_NUMBER_AREA_CODE_LENGTH));\n this.modeCtl.valueChanges.pipe(takeUntilDestroyed()).subscribe(v => {\n this.mode.set(v === 'area-code' ? 'area-code' : 'zip');\n this.touched.set(false);\n });\n this._destroyRef.onDestroy(() => this._abort());\n\n // Every open starts fresh with the defaults (read untracked: only `open` triggers a reset); closing drops any search.\n effect(() => {\n if (this.open()) untracked(() => this._reset());\n else untracked(() => this._abort());\n });\n\n // A default ZIP that arrives (or changes) while the panel is open fills an untouched ZIP field on step 1; see the class comment.\n effect(() => {\n const open = this.open();\n const digits = digitsOnly(this.defaultPostalCode(), PHONE_NUMBER_ZIP_LENGTH);\n const step = this.step();\n const mode = this.mode();\n untracked(() => {\n if (!open || step !== 1 || mode !== 'zip' || this._zipEdited() || digits === '' || digits === this._zip()) return;\n this._write(this.zipCtl, this._zip, digits);\n });\n });\n }\n\n // ── Step 1 ──────────────────────────────────────────────────────────────────────────────────────\n protected onPrimary() {\n if (this.step() === 1) this.submit();\n else if (this.step() === 3) this.confirm();\n }\n\n protected onEnter(event: Event) {\n event.preventDefault();\n this.submit();\n }\n\n /** A field that was swapped out by a mode switch blurs while it is removed: that late blur must not mark the new field touched. */\n protected onFieldBlur(from: PhoneNumberSearchMode) {\n if (this.mode() === from) this.touched.set(true);\n }\n\n /** Typing a non-digit is blocked before it reaches the field. */\n protected onBeforeInput(event: Event) {\n const e = event as InputEvent;\n if (e.inputType?.startsWith('insertText') && e.data && /\\D/.test(e.data)) e.preventDefault();\n }\n\n /** A pasted ZIP+4 / formatted text keeps its first 5 (or 3) digits and replaces the field's text. */\n protected onPaste(event: Event) {\n const text = (event as ClipboardEvent).clipboardData?.getData('text') ?? '';\n event.preventDefault();\n if (this.mode() === 'zip') { this._zipEdited.set(true); this._write(this.zipCtl, this._zip, digitsOnly(text, PHONE_NUMBER_ZIP_LENGTH)); }\n else this._write(this.areaCtl, this._area, digitsOnly(text, PHONE_NUMBER_AREA_CODE_LENGTH));\n }\n\n protected submit() {\n if (!this.valid()) { this.touched.set(true); return; }\n const value = this._value();\n this._run(this.mode() === 'zip' ? { postalCode: value } : { areaCode: value });\n }\n\n // ── Step 2 ──────────────────────────────────────────────────────────────────────────────────────\n protected retry() {\n const c = this._criteria();\n if (c) this._run(c);\n }\n\n protected choose(option: PhoneNumberOption) {\n this.chosen.set(option);\n this.step.set(3);\n this._focusStep();\n }\n\n protected changeLocation() {\n this._abort();\n this.step.set(1);\n this._focusStep();\n }\n\n // ── Step 3 ──────────────────────────────────────────────────────────────────────────────────────\n protected backToResults() {\n this.step.set(2);\n this._focusStep();\n }\n\n protected confirm() {\n const option = this.chosen();\n const criteria = this._criteria();\n if (!option || !criteria || this.confirmed()) return;\n this.confirmed.set(true);\n this.selected.emit({ ...option, ...criteria });\n this.closed.emit();\n }\n\n protected close() {\n this.closed.emit();\n }\n\n // ── Internals ───────────────────────────────────────────────────────────────────────────────────\n private _run(criteria: PhoneNumberSearchCriteria) {\n this._abort();\n this._criteria.set(criteria);\n this._results.set([]);\n this.chosen.set(null);\n this.searchFailed.set(false);\n this.loading.set(true);\n this.step.set(2);\n this._searchSub = this.search()(criteria).subscribe({\n next: list => { this._results.set(list ?? []); this.loading.set(false); this._focusStep(); },\n error: () => { this.searchFailed.set(true); this.loading.set(false); },\n });\n this._focusStep();\n }\n\n private _abort() {\n this._searchSub?.unsubscribe();\n this._searchSub = null;\n this.loading.set(false);\n }\n\n private _reset() {\n this._abort();\n const allowArea = this.allowAreaCode();\n const mode: PhoneNumberSearchMode = allowArea && this.defaultMode() === 'area-code' ? 'area-code' : 'zip';\n this.step.set(1);\n this.touched.set(false);\n this._zipEdited.set(false);\n this.confirmed.set(false);\n this._criteria.set(null);\n this._results.set([]);\n this.chosen.set(null);\n this.searchFailed.set(false);\n this.mode.set(mode);\n this.modeCtl.setValue(mode, { emitEvent: false });\n this._write(this.zipCtl, this._zip, digitsOnly(this.defaultPostalCode(), PHONE_NUMBER_ZIP_LENGTH));\n this._write(this.areaCtl, this._area, '');\n }\n\n /** A user edit: sanitise and write back into the field when something was stripped. */\n private _typed(ctl: FormControl<string>, sig: { set(v: string): void }, raw: string, max: number) {\n const clean = digitsOnly(raw, max);\n if (clean !== raw) ctl.setValue(clean, { emitEvent: false });\n sig.set(clean);\n }\n\n private _write(ctl: FormControl<string>, sig: { set(v: string): void }, value: string) {\n ctl.setValue(value, { emitEvent: false });\n sig.set(value);\n }\n\n /** Moves focus to the first control of the step that was just shown. */\n private _focusStep() {\n afterNextRender(() => {\n const root = this._el.nativeElement as HTMLElement;\n const step = this.step();\n let target: HTMLElement | null = null;\n if (step === 1) {\n if (isTouchViewport(root.ownerDocument)) return;\n target = root.querySelector('[data-testid=\"pn-step-1\"] input[type=\"text\"]');\n } else if (step === 2) {\n target = root.querySelector('.pn-select button') ?? root.querySelector('[data-testid=\"pn-change\"] button');\n } else {\n target = root.querySelector('[data-pn-heading]');\n }\n target?.focus();\n }, { injector: this._injector });\n }\n}\n"],"mappings":";;;;;;;;;;;;AAsCA,MAAa,0BAA0B;AACvC,MAAa,gCAAgC;AAG7C,SAAgB,WAAW,OAAkC,KAAW;CACtE,QAAQ,SAAS,GAAA,CAAI,QAAQ,OAAO,EAAE,CAAC,CAAC,MAAM,GAAG,GAAG;AACtD;AAyJA,IAAa,6BAAb,MAAa,2BAA0B;CAyFrC,cAAA;EAxFmB,KAAA,SAAS,OAAO,eAAe;EACzC,KAAA,OAAoB,MAAM,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;EAChC,KAAA,aAAa,MAAqB,MAAI;GAAA,GAAA,YAAA,EAAA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AAA;IAAA;KAAA,MAAA;KAAA,MAAE;KAAe,UAAA;KAAA,QAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;KAAA;IAAA;IAAA;KAAA,MAAA;KAAA,MAAE;KAAc,UAAA;KAAA,QAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;KAAA;KAAA,SAAA,CAAA,WAAA;IAAA;IAAA;KAAA,MAAA;KAAA,MACjH;KAAc,UAAA;KAAA,QAAA;MAAA;MAAA;MAAA;KAAA;IAAA;IAAA;KAAA,MAAA;KAAA,MAAE;KAAiB,UAAA;KAAA,QAAA;MAAA;MAAA;MAAA;MAAA;MAAA;KAAA;IAAA;IAAA;KAAA,MAAA;KAAA,MAAE;KAAmB,UAAA;KAAA,QAAA;MAAA;MAAA;MAAA;KAAA;IAAA;GAAA;GAAA,iBAAA,GAAA,wBAAA;EAAA,CAAA;CAAA;;AAyG7C,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAA0B,YAAA,CAAA;EA/GtC,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAwB,YACtB;GAAI,iBACC,wBAAwB;GAAM,SACtC;IACP;IAAqB;IAAoB;IAAoB;IAAqB;IAAiB;IACnG;IAAgB;IAAmB;GACpC;GAAA,UACS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiFT,QAAA,CAAA,q2BAAA;EAAA,CAAA"}
|
|
@@ -0,0 +1,546 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, Directive, ElementRef, afterEveryRender, afterNextRender, computed, effect, inject, input, isDevMode, output, signal, untracked } from "@angular/core";
|
|
3
|
+
function pillTabId(name, key) {
|
|
4
|
+
return `${name}-${key}`;
|
|
5
|
+
}
|
|
6
|
+
function pillTabPanelId(name, key) {
|
|
7
|
+
return `${name}-panel-${key}`;
|
|
8
|
+
}
|
|
9
|
+
function pillTabTitleId(name) {
|
|
10
|
+
return `${name}--title`;
|
|
11
|
+
}
|
|
12
|
+
function pillTabDescriptionId(name) {
|
|
13
|
+
return `${name}--description`;
|
|
14
|
+
}
|
|
15
|
+
var PillTabPanelDirective = class PillTabPanelDirective {
|
|
16
|
+
constructor() {
|
|
17
|
+
this.key = input.required({
|
|
18
|
+
...ngDevMode ? { debugName: "key" } : /* istanbul ignore next */ {},
|
|
19
|
+
alias: "uiTabPanel"
|
|
20
|
+
});
|
|
21
|
+
this.tabsName = input.required(...ngDevMode ? [{ debugName: "tabsName" }] : /* istanbul ignore next */ []);
|
|
22
|
+
this.activeKey = input(null, ...ngDevMode ? [{ debugName: "activeKey" }] : /* istanbul ignore next */ []);
|
|
23
|
+
this.tabbable = input(false, ...ngDevMode ? [{ debugName: "tabbable" }] : /* istanbul ignore next */ []);
|
|
24
|
+
this.describedByHeader = input(false, ...ngDevMode ? [{ debugName: "describedByHeader" }] : /* istanbul ignore next */ []);
|
|
25
|
+
}
|
|
26
|
+
describedId() {
|
|
27
|
+
return this.describedByHeader() && !this.isHidden() ? pillTabDescriptionId(this.tabsName()) : null;
|
|
28
|
+
}
|
|
29
|
+
panelId() {
|
|
30
|
+
return pillTabPanelId(this.tabsName(), this.key());
|
|
31
|
+
}
|
|
32
|
+
tabId() {
|
|
33
|
+
return pillTabId(this.tabsName(), this.key());
|
|
34
|
+
}
|
|
35
|
+
isHidden() {
|
|
36
|
+
const a = this.activeKey();
|
|
37
|
+
return a !== null && a !== this.key();
|
|
38
|
+
}
|
|
39
|
+
static {
|
|
40
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
41
|
+
minVersion: "12.0.0",
|
|
42
|
+
version: "22.2.2",
|
|
43
|
+
ngImport: i0,
|
|
44
|
+
type: PillTabPanelDirective,
|
|
45
|
+
deps: [],
|
|
46
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
static {
|
|
50
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
51
|
+
minVersion: "17.1.0",
|
|
52
|
+
version: "22.2.2",
|
|
53
|
+
type: PillTabPanelDirective,
|
|
54
|
+
isStandalone: true,
|
|
55
|
+
selector: "[uiTabPanel]",
|
|
56
|
+
inputs: {
|
|
57
|
+
key: {
|
|
58
|
+
classPropertyName: "key",
|
|
59
|
+
publicName: "uiTabPanel",
|
|
60
|
+
isSignal: true,
|
|
61
|
+
isRequired: true,
|
|
62
|
+
transformFunction: null
|
|
63
|
+
},
|
|
64
|
+
tabsName: {
|
|
65
|
+
classPropertyName: "tabsName",
|
|
66
|
+
publicName: "tabsName",
|
|
67
|
+
isSignal: true,
|
|
68
|
+
isRequired: true,
|
|
69
|
+
transformFunction: null
|
|
70
|
+
},
|
|
71
|
+
activeKey: {
|
|
72
|
+
classPropertyName: "activeKey",
|
|
73
|
+
publicName: "activeKey",
|
|
74
|
+
isSignal: true,
|
|
75
|
+
isRequired: false,
|
|
76
|
+
transformFunction: null
|
|
77
|
+
},
|
|
78
|
+
tabbable: {
|
|
79
|
+
classPropertyName: "tabbable",
|
|
80
|
+
publicName: "tabbable",
|
|
81
|
+
isSignal: true,
|
|
82
|
+
isRequired: false,
|
|
83
|
+
transformFunction: null
|
|
84
|
+
},
|
|
85
|
+
describedByHeader: {
|
|
86
|
+
classPropertyName: "describedByHeader",
|
|
87
|
+
publicName: "describedByHeader",
|
|
88
|
+
isSignal: true,
|
|
89
|
+
isRequired: false,
|
|
90
|
+
transformFunction: null
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
host: {
|
|
94
|
+
attributes: { "role": "tabpanel" },
|
|
95
|
+
properties: {
|
|
96
|
+
"id": "panelId()",
|
|
97
|
+
"attr.aria-labelledby": "tabId()",
|
|
98
|
+
"attr.hidden": "isHidden() ? '' : null",
|
|
99
|
+
"attr.aria-describedby": "describedId()",
|
|
100
|
+
"attr.tabindex": "tabbable() ? 0 : null"
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
ngImport: i0
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
108
|
+
minVersion: "12.0.0",
|
|
109
|
+
version: "22.2.2",
|
|
110
|
+
ngImport: i0,
|
|
111
|
+
type: PillTabPanelDirective,
|
|
112
|
+
decorators: [{
|
|
113
|
+
type: Directive,
|
|
114
|
+
args: [{
|
|
115
|
+
selector: "[uiTabPanel]",
|
|
116
|
+
standalone: true,
|
|
117
|
+
host: {
|
|
118
|
+
role: "tabpanel",
|
|
119
|
+
"[id]": "panelId()",
|
|
120
|
+
"[attr.aria-labelledby]": "tabId()",
|
|
121
|
+
"[attr.hidden]": "isHidden() ? '' : null",
|
|
122
|
+
"[attr.aria-describedby]": "describedId()",
|
|
123
|
+
"[attr.tabindex]": "tabbable() ? 0 : null"
|
|
124
|
+
}
|
|
125
|
+
}]
|
|
126
|
+
}],
|
|
127
|
+
propDecorators: {
|
|
128
|
+
key: [{
|
|
129
|
+
type: i0.Input,
|
|
130
|
+
args: [{
|
|
131
|
+
isSignal: true,
|
|
132
|
+
alias: "uiTabPanel",
|
|
133
|
+
required: true
|
|
134
|
+
}]
|
|
135
|
+
}],
|
|
136
|
+
tabsName: [{
|
|
137
|
+
type: i0.Input,
|
|
138
|
+
args: [{
|
|
139
|
+
isSignal: true,
|
|
140
|
+
alias: "tabsName",
|
|
141
|
+
required: true
|
|
142
|
+
}]
|
|
143
|
+
}],
|
|
144
|
+
activeKey: [{
|
|
145
|
+
type: i0.Input,
|
|
146
|
+
args: [{
|
|
147
|
+
isSignal: true,
|
|
148
|
+
alias: "activeKey",
|
|
149
|
+
required: false
|
|
150
|
+
}]
|
|
151
|
+
}],
|
|
152
|
+
tabbable: [{
|
|
153
|
+
type: i0.Input,
|
|
154
|
+
args: [{
|
|
155
|
+
isSignal: true,
|
|
156
|
+
alias: "tabbable",
|
|
157
|
+
required: false
|
|
158
|
+
}]
|
|
159
|
+
}],
|
|
160
|
+
describedByHeader: [{
|
|
161
|
+
type: i0.Input,
|
|
162
|
+
args: [{
|
|
163
|
+
isSignal: true,
|
|
164
|
+
alias: "describedByHeader",
|
|
165
|
+
required: false
|
|
166
|
+
}]
|
|
167
|
+
}]
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
var PillTabsComponent = class PillTabsComponent {
|
|
171
|
+
titleId() {
|
|
172
|
+
return pillTabTitleId(this.name());
|
|
173
|
+
}
|
|
174
|
+
descriptionId() {
|
|
175
|
+
return pillTabDescriptionId(this.name());
|
|
176
|
+
}
|
|
177
|
+
constructor() {
|
|
178
|
+
this.host = inject(ElementRef);
|
|
179
|
+
this.tabs = input([], ...ngDevMode ? [{ debugName: "tabs" }] : /* istanbul ignore next */ []);
|
|
180
|
+
this.activeKey = input("", ...ngDevMode ? [{ debugName: "activeKey" }] : /* istanbul ignore next */ []);
|
|
181
|
+
this.ariaLabel = input(null, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
182
|
+
this.name = input("pill-tabs-" + Math.random().toString(36).slice(2), ...ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []);
|
|
183
|
+
this.noWrap = input(false, ...ngDevMode ? [{ debugName: "noWrap" }] : /* istanbul ignore next */ []);
|
|
184
|
+
this.orientation = input("horizontal", ...ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []);
|
|
185
|
+
this.vertical = () => this.orientation() === "vertical";
|
|
186
|
+
this.controlsPanels = input(false, ...ngDevMode ? [{ debugName: "controlsPanels" }] : /* istanbul ignore next */ []);
|
|
187
|
+
this.showDescription = input(false, ...ngDevMode ? [{ debugName: "showDescription" }] : /* istanbul ignore next */ []);
|
|
188
|
+
this.headingLevel = input(2, ...ngDevMode ? [{ debugName: "headingLevel" }] : /* istanbul ignore next */ []);
|
|
189
|
+
this.tabChange = output();
|
|
190
|
+
this.foundPanels = signal(/* @__PURE__ */ new Set(), ...ngDevMode ? [{ debugName: "foundPanels" }] : /* istanbul ignore next */ []);
|
|
191
|
+
this.activeTab = computed(() => this.tabs().find((t) => t.key === this.activeKey()) ?? null, ...ngDevMode ? [{ debugName: "activeTab" }] : /* istanbul ignore next */ []);
|
|
192
|
+
this.canScrollStart = signal(false, ...ngDevMode ? [{ debugName: "canScrollStart" }] : /* istanbul ignore next */ []);
|
|
193
|
+
this.canScrollEnd = signal(false, ...ngDevMode ? [{ debugName: "canScrollEnd" }] : /* istanbul ignore next */ []);
|
|
194
|
+
const destroyRef = inject(DestroyRef);
|
|
195
|
+
const warned = /* @__PURE__ */ new Set();
|
|
196
|
+
effect(() => {
|
|
197
|
+
const on = this.controlsPanels(), tabs = this.tabs(), name = this.name();
|
|
198
|
+
if (!on || !isDevMode()) return;
|
|
199
|
+
untracked(() => {
|
|
200
|
+
for (const t of tabs) {
|
|
201
|
+
if (!t.key.startsWith("panel-") || warned.has(name + "|" + t.key)) continue;
|
|
202
|
+
warned.add(name + "|" + t.key);
|
|
203
|
+
console.warn(`ui-pill-tabs "${name}": the tab key "${t.key}" starts with "panel-", so its id "${pillTabId(name, t.key)}" can equal the panel id of the key "${t.key.slice(6)}" (${pillTabPanelId(name, t.key.slice(6))}) when controlsPanels is on. Rename the key.`);
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
});
|
|
207
|
+
afterEveryRender(() => {
|
|
208
|
+
const root = this.host.nativeElement.getRootNode();
|
|
209
|
+
if (typeof root.getElementById !== "function") return;
|
|
210
|
+
const found = new Set(this.tabs().map((t) => this.panelId(t.key)).filter((id) => !!root.getElementById(id)));
|
|
211
|
+
const prev = this.foundPanels();
|
|
212
|
+
if (found.size !== prev.size || [...found].some((id) => !prev.has(id))) this.foundPanels.set(found);
|
|
213
|
+
});
|
|
214
|
+
effect(() => {
|
|
215
|
+
this.tabs();
|
|
216
|
+
queueMicrotask(() => this.updateOverflow());
|
|
217
|
+
});
|
|
218
|
+
afterNextRender(() => {
|
|
219
|
+
this.updateOverflow();
|
|
220
|
+
const list = this.host.nativeElement.querySelector(".pill-tabs");
|
|
221
|
+
if (list && typeof ResizeObserver !== "undefined") {
|
|
222
|
+
const ro = new ResizeObserver(() => this.updateOverflow());
|
|
223
|
+
ro.observe(list);
|
|
224
|
+
destroyRef.onDestroy(() => ro.disconnect());
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
tabId(key) {
|
|
229
|
+
return pillTabId(this.name(), key);
|
|
230
|
+
}
|
|
231
|
+
panelId(key) {
|
|
232
|
+
return pillTabPanelId(this.name(), key);
|
|
233
|
+
}
|
|
234
|
+
controlsFor(key) {
|
|
235
|
+
const id = this.panelId(key);
|
|
236
|
+
return this.controlsPanels() || this.foundPanels().has(id) ? id : null;
|
|
237
|
+
}
|
|
238
|
+
updateOverflow() {
|
|
239
|
+
const el = this.host.nativeElement.querySelector(".pill-tabs");
|
|
240
|
+
if (!el) return;
|
|
241
|
+
const max = el.scrollWidth - el.clientWidth;
|
|
242
|
+
const pos = Math.abs(el.scrollLeft);
|
|
243
|
+
this.canScrollStart.set(max > 1 && pos > 1);
|
|
244
|
+
this.canScrollEnd.set(max > 1 && pos < max - 1);
|
|
245
|
+
}
|
|
246
|
+
select(key) {
|
|
247
|
+
if (key !== this.activeKey()) this.tabChange.emit(key);
|
|
248
|
+
}
|
|
249
|
+
tabIndexFor(tab) {
|
|
250
|
+
const tabs = this.tabs();
|
|
251
|
+
const focusKey = tabs.some((t) => t.key === this.activeKey() && !t.disabled) ? this.activeKey() : tabs.find((t) => !t.disabled)?.key;
|
|
252
|
+
return tab.key === focusKey ? 0 : -1;
|
|
253
|
+
}
|
|
254
|
+
onKeydown(e) {
|
|
255
|
+
const enabled = this.tabs().filter((t) => !t.disabled);
|
|
256
|
+
const [nextKey, prevKey] = this.vertical() ? ["ArrowDown", "ArrowUp"] : ["ArrowRight", "ArrowLeft"];
|
|
257
|
+
if (!enabled.length || ![
|
|
258
|
+
nextKey,
|
|
259
|
+
prevKey,
|
|
260
|
+
"Home",
|
|
261
|
+
"End"
|
|
262
|
+
].includes(e.key)) return;
|
|
263
|
+
const current = Math.max(0, enabled.findIndex((t) => t.key === this.activeKey()));
|
|
264
|
+
const next = e.key === "Home" ? 0 : e.key === "End" ? enabled.length - 1 : (current + (e.key === nextKey ? 1 : -1) + enabled.length) % enabled.length;
|
|
265
|
+
e.preventDefault();
|
|
266
|
+
const key = enabled[next].key;
|
|
267
|
+
this.select(key);
|
|
268
|
+
this.host.nativeElement.querySelector(`#${CSS.escape(this.tabId(key))}`)?.focus();
|
|
269
|
+
}
|
|
270
|
+
static {
|
|
271
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
272
|
+
minVersion: "12.0.0",
|
|
273
|
+
version: "22.2.2",
|
|
274
|
+
ngImport: i0,
|
|
275
|
+
type: PillTabsComponent,
|
|
276
|
+
deps: [],
|
|
277
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
static {
|
|
281
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
282
|
+
minVersion: "17.0.0",
|
|
283
|
+
version: "22.2.2",
|
|
284
|
+
type: PillTabsComponent,
|
|
285
|
+
isStandalone: true,
|
|
286
|
+
selector: "ui-pill-tabs",
|
|
287
|
+
inputs: {
|
|
288
|
+
tabs: {
|
|
289
|
+
classPropertyName: "tabs",
|
|
290
|
+
publicName: "tabs",
|
|
291
|
+
isSignal: true,
|
|
292
|
+
isRequired: false,
|
|
293
|
+
transformFunction: null
|
|
294
|
+
},
|
|
295
|
+
activeKey: {
|
|
296
|
+
classPropertyName: "activeKey",
|
|
297
|
+
publicName: "activeKey",
|
|
298
|
+
isSignal: true,
|
|
299
|
+
isRequired: false,
|
|
300
|
+
transformFunction: null
|
|
301
|
+
},
|
|
302
|
+
ariaLabel: {
|
|
303
|
+
classPropertyName: "ariaLabel",
|
|
304
|
+
publicName: "ariaLabel",
|
|
305
|
+
isSignal: true,
|
|
306
|
+
isRequired: false,
|
|
307
|
+
transformFunction: null
|
|
308
|
+
},
|
|
309
|
+
name: {
|
|
310
|
+
classPropertyName: "name",
|
|
311
|
+
publicName: "name",
|
|
312
|
+
isSignal: true,
|
|
313
|
+
isRequired: false,
|
|
314
|
+
transformFunction: null
|
|
315
|
+
},
|
|
316
|
+
noWrap: {
|
|
317
|
+
classPropertyName: "noWrap",
|
|
318
|
+
publicName: "noWrap",
|
|
319
|
+
isSignal: true,
|
|
320
|
+
isRequired: false,
|
|
321
|
+
transformFunction: null
|
|
322
|
+
},
|
|
323
|
+
orientation: {
|
|
324
|
+
classPropertyName: "orientation",
|
|
325
|
+
publicName: "orientation",
|
|
326
|
+
isSignal: true,
|
|
327
|
+
isRequired: false,
|
|
328
|
+
transformFunction: null
|
|
329
|
+
},
|
|
330
|
+
controlsPanels: {
|
|
331
|
+
classPropertyName: "controlsPanels",
|
|
332
|
+
publicName: "controlsPanels",
|
|
333
|
+
isSignal: true,
|
|
334
|
+
isRequired: false,
|
|
335
|
+
transformFunction: null
|
|
336
|
+
},
|
|
337
|
+
showDescription: {
|
|
338
|
+
classPropertyName: "showDescription",
|
|
339
|
+
publicName: "showDescription",
|
|
340
|
+
isSignal: true,
|
|
341
|
+
isRequired: false,
|
|
342
|
+
transformFunction: null
|
|
343
|
+
},
|
|
344
|
+
headingLevel: {
|
|
345
|
+
classPropertyName: "headingLevel",
|
|
346
|
+
publicName: "headingLevel",
|
|
347
|
+
isSignal: true,
|
|
348
|
+
isRequired: false,
|
|
349
|
+
transformFunction: null
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
outputs: { tabChange: "tabChange" },
|
|
353
|
+
ngImport: i0,
|
|
354
|
+
template: `
|
|
355
|
+
<div class="pill-wrap" [class.pill-wrap--vertical]="vertical()">
|
|
356
|
+
<div class="pill-tabs" [class.pill-tabs--nowrap]="noWrap()" [class.pill-tabs--vertical]="vertical()" role="tablist" [attr.aria-label]="ariaLabel()" [attr.aria-orientation]="vertical() ? 'vertical' : null" (keydown)="onKeydown($event)" (scroll)="updateOverflow()">
|
|
357
|
+
@for (tab of tabs(); track tab.key) {
|
|
358
|
+
<button type="button" class="pill-tab" role="tab"
|
|
359
|
+
[id]="tabId(tab.key)"
|
|
360
|
+
[class.active]="activeKey() === tab.key"
|
|
361
|
+
[class.disabled]="tab.disabled"
|
|
362
|
+
[disabled]="tab.disabled ?? false"
|
|
363
|
+
[attr.aria-selected]="activeKey() === tab.key"
|
|
364
|
+
[attr.tabindex]="tabIndexFor(tab)"
|
|
365
|
+
[attr.aria-describedby]="tab.info ? tabId(tab.key) + '-info' : null"
|
|
366
|
+
[attr.aria-controls]="controlsFor(tab.key)"
|
|
367
|
+
(click)="select(tab.key)">
|
|
368
|
+
<span>{{ tab.label }}</span>
|
|
369
|
+
@if (tab.count !== undefined) {
|
|
370
|
+
<span class="pill-count">{{ tab.count }}</span>
|
|
371
|
+
}
|
|
372
|
+
@if (tab.info) {
|
|
373
|
+
<svg class="pill-info-icon" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-testid="pill-info-icon">
|
|
374
|
+
<circle cx="12" cy="12" r="10"/><line x1="12" y1="16" x2="12" y2="12"/><line x1="12" y1="8" x2="12.01" y2="8"/>
|
|
375
|
+
</svg>
|
|
376
|
+
<span class="pill-info-tip" role="tooltip" aria-hidden="true" [id]="tabId(tab.key) + '-info'" data-testid="pill-info-tip">{{ tab.info }}</span>
|
|
377
|
+
}
|
|
378
|
+
</button>
|
|
379
|
+
}
|
|
380
|
+
</div>
|
|
381
|
+
<span class="pill-fade pill-fade--start" [class.visible]="canScrollStart()" aria-hidden="true" data-testid="pill-fade-start"></span>
|
|
382
|
+
<span class="pill-fade pill-fade--end" [class.visible]="canScrollEnd()" aria-hidden="true" data-testid="pill-fade-end"></span>
|
|
383
|
+
</div>
|
|
384
|
+
@if (showDescription() && (activeTab()?.title || activeTab()?.description)) {
|
|
385
|
+
<div class="pill-header" data-testid="pill-header">
|
|
386
|
+
@if (activeTab()?.title) {
|
|
387
|
+
@if (headingLevel() === 3) {
|
|
388
|
+
<h3 class="pill-header-title" [id]="titleId()" data-testid="pill-header-title">{{ activeTab()!.title }}</h3>
|
|
389
|
+
} @else {
|
|
390
|
+
<h2 class="pill-header-title" [id]="titleId()" data-testid="pill-header-title">{{ activeTab()!.title }}</h2>
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
@if (activeTab()?.description) {
|
|
394
|
+
<p class="pill-header-description" [id]="descriptionId()" data-testid="pill-header-description">{{ activeTab()!.description }}</p>
|
|
395
|
+
}
|
|
396
|
+
</div>
|
|
397
|
+
}
|
|
398
|
+
`,
|
|
399
|
+
isInline: true,
|
|
400
|
+
styles: [".pill-header{margin-top:16px;min-width:0}.pill-header-title{margin:0;font-size:1.125rem;font-weight:600;line-height:1.3;color:var(--ui-text, #1e293b);overflow-wrap:anywhere}.pill-header-description{margin:4px 0 0;font-size:.875rem;line-height:1.5;color:var(--ui-text-muted, #475569);overflow-wrap:anywhere}.pill-wrap{position:relative}.pill-fade{position:absolute;top:0;bottom:0;width:28px;pointer-events:none;opacity:0;transition:opacity .15s}.pill-fade.visible{opacity:1}.pill-fade--start{left:0;background:linear-gradient(to right,var(--ui-pill-tabs-fade, #fff),transparent)}.pill-fade--end{right:0;background:linear-gradient(to left,var(--ui-pill-tabs-fade, #fff),transparent)}.pill-tabs{display:flex;gap:8px;flex-wrap:wrap}@media(max-width:768px){.pill-tabs{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;padding-bottom:2px;scrollbar-width:none}.pill-tabs::-webkit-scrollbar{display:none}}.pill-tabs--nowrap .pill-tab{flex:0 0 auto;white-space:nowrap}.pill-tab{position:relative;display:inline-flex;align-items:center;gap:6px;padding:7px 16px;border-radius:999px;border:1px solid #e2e8f0;background:#fff;font-size:.8125rem;font-weight:500;color:#64748b;cursor:pointer;transition:all .15s;font-family:inherit}.pill-tab:hover:not(.disabled):not(.active){background:#f8fafc;border-color:#94a3b8}.pill-tab:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}.pill-tab .pill-count{background:#e2e8f0;color:#475569;font-size:.7rem;font-weight:600;padding:1px 6px;border-radius:999px;line-height:1.4}.pill-tab.active{background:#1e293b;color:#fff;border-color:#1e293b}.pill-tab.active .pill-count{background:#fff3;color:#fff}.pill-tab.active:hover{background:#1e293b;color:#fff}.pill-tab.disabled{opacity:.4;cursor:not-allowed;pointer-events:none}.pill-tab .pill-info-icon{flex-shrink:0;opacity:.7}.pill-tab:hover .pill-info-icon,.pill-tab:focus-visible .pill-info-icon{opacity:1}.pill-tab .pill-info-tip{position:absolute;left:0;top:calc(100% + 8px);z-index:20;width:max-content;max-width:280px;padding:8px 12px;border-radius:8px;background:#1e293b;color:#fff;font-size:.75rem;font-weight:400;line-height:1.45;text-align:left;white-space:normal;box-shadow:0 4px 12px #0f172a40;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .12s,visibility .12s}.pill-tab:hover .pill-info-tip,.pill-tab:focus-visible .pill-info-tip{opacity:1;visibility:visible}.pill-tab:last-child .pill-info-tip{left:auto;right:0}.pill-wrap--vertical .pill-fade{display:none}.pill-tabs.pill-tabs--vertical{flex-direction:column;flex-wrap:nowrap;overflow:visible;gap:4px;padding-bottom:0}.pill-tabs--vertical .pill-tab{width:100%;justify-content:flex-start;border-radius:10px;text-align:left}.pill-tabs--vertical .pill-tab .pill-count{margin-left:auto}.pill-tabs--vertical .pill-tab .pill-info-tip{left:calc(100% + 8px);top:50%;transform:translateY(-50%)}.pill-tabs--vertical .pill-tab:last-child .pill-info-tip{left:calc(100% + 8px);right:auto}@media(pointer:coarse),(max-width:480px){.pill-tab{min-height:44px}}\n"],
|
|
401
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
};
|
|
405
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
406
|
+
minVersion: "12.0.0",
|
|
407
|
+
version: "22.2.2",
|
|
408
|
+
ngImport: i0,
|
|
409
|
+
type: PillTabsComponent,
|
|
410
|
+
decorators: [{
|
|
411
|
+
type: Component,
|
|
412
|
+
args: [{
|
|
413
|
+
selector: "ui-pill-tabs",
|
|
414
|
+
standalone: true,
|
|
415
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
416
|
+
template: `
|
|
417
|
+
<div class="pill-wrap" [class.pill-wrap--vertical]="vertical()">
|
|
418
|
+
<div class="pill-tabs" [class.pill-tabs--nowrap]="noWrap()" [class.pill-tabs--vertical]="vertical()" role="tablist" [attr.aria-label]="ariaLabel()" [attr.aria-orientation]="vertical() ? 'vertical' : null" (keydown)="onKeydown($event)" (scroll)="updateOverflow()">
|
|
419
|
+
@for (tab of tabs(); track tab.key) {
|
|
420
|
+
<button type="button" class="pill-tab" role="tab"
|
|
421
|
+
[id]="tabId(tab.key)"
|
|
422
|
+
[class.active]="activeKey() === tab.key"
|
|
423
|
+
[class.disabled]="tab.disabled"
|
|
424
|
+
[disabled]="tab.disabled ?? false"
|
|
425
|
+
[attr.aria-selected]="activeKey() === tab.key"
|
|
426
|
+
[attr.tabindex]="tabIndexFor(tab)"
|
|
427
|
+
[attr.aria-describedby]="tab.info ? tabId(tab.key) + '-info' : null"
|
|
428
|
+
[attr.aria-controls]="controlsFor(tab.key)"
|
|
429
|
+
(click)="select(tab.key)">
|
|
430
|
+
<span>{{ tab.label }}</span>
|
|
431
|
+
@if (tab.count !== undefined) {
|
|
432
|
+
<span class="pill-count">{{ tab.count }}</span>
|
|
433
|
+
}
|
|
434
|
+
@if (tab.info) {
|
|
435
|
+
<svg class="pill-info-icon" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-testid="pill-info-icon">
|
|
436
|
+
<circle cx="12" cy="12" r="10"/><line x1="12" y1="16" x2="12" y2="12"/><line x1="12" y1="8" x2="12.01" y2="8"/>
|
|
437
|
+
</svg>
|
|
438
|
+
<span class="pill-info-tip" role="tooltip" aria-hidden="true" [id]="tabId(tab.key) + '-info'" data-testid="pill-info-tip">{{ tab.info }}</span>
|
|
439
|
+
}
|
|
440
|
+
</button>
|
|
441
|
+
}
|
|
442
|
+
</div>
|
|
443
|
+
<span class="pill-fade pill-fade--start" [class.visible]="canScrollStart()" aria-hidden="true" data-testid="pill-fade-start"></span>
|
|
444
|
+
<span class="pill-fade pill-fade--end" [class.visible]="canScrollEnd()" aria-hidden="true" data-testid="pill-fade-end"></span>
|
|
445
|
+
</div>
|
|
446
|
+
@if (showDescription() && (activeTab()?.title || activeTab()?.description)) {
|
|
447
|
+
<div class="pill-header" data-testid="pill-header">
|
|
448
|
+
@if (activeTab()?.title) {
|
|
449
|
+
@if (headingLevel() === 3) {
|
|
450
|
+
<h3 class="pill-header-title" [id]="titleId()" data-testid="pill-header-title">{{ activeTab()!.title }}</h3>
|
|
451
|
+
} @else {
|
|
452
|
+
<h2 class="pill-header-title" [id]="titleId()" data-testid="pill-header-title">{{ activeTab()!.title }}</h2>
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
@if (activeTab()?.description) {
|
|
456
|
+
<p class="pill-header-description" [id]="descriptionId()" data-testid="pill-header-description">{{ activeTab()!.description }}</p>
|
|
457
|
+
}
|
|
458
|
+
</div>
|
|
459
|
+
}
|
|
460
|
+
`,
|
|
461
|
+
styles: [".pill-header{margin-top:16px;min-width:0}.pill-header-title{margin:0;font-size:1.125rem;font-weight:600;line-height:1.3;color:var(--ui-text, #1e293b);overflow-wrap:anywhere}.pill-header-description{margin:4px 0 0;font-size:.875rem;line-height:1.5;color:var(--ui-text-muted, #475569);overflow-wrap:anywhere}.pill-wrap{position:relative}.pill-fade{position:absolute;top:0;bottom:0;width:28px;pointer-events:none;opacity:0;transition:opacity .15s}.pill-fade.visible{opacity:1}.pill-fade--start{left:0;background:linear-gradient(to right,var(--ui-pill-tabs-fade, #fff),transparent)}.pill-fade--end{right:0;background:linear-gradient(to left,var(--ui-pill-tabs-fade, #fff),transparent)}.pill-tabs{display:flex;gap:8px;flex-wrap:wrap}@media(max-width:768px){.pill-tabs{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;padding-bottom:2px;scrollbar-width:none}.pill-tabs::-webkit-scrollbar{display:none}}.pill-tabs--nowrap .pill-tab{flex:0 0 auto;white-space:nowrap}.pill-tab{position:relative;display:inline-flex;align-items:center;gap:6px;padding:7px 16px;border-radius:999px;border:1px solid #e2e8f0;background:#fff;font-size:.8125rem;font-weight:500;color:#64748b;cursor:pointer;transition:all .15s;font-family:inherit}.pill-tab:hover:not(.disabled):not(.active){background:#f8fafc;border-color:#94a3b8}.pill-tab:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}.pill-tab .pill-count{background:#e2e8f0;color:#475569;font-size:.7rem;font-weight:600;padding:1px 6px;border-radius:999px;line-height:1.4}.pill-tab.active{background:#1e293b;color:#fff;border-color:#1e293b}.pill-tab.active .pill-count{background:#fff3;color:#fff}.pill-tab.active:hover{background:#1e293b;color:#fff}.pill-tab.disabled{opacity:.4;cursor:not-allowed;pointer-events:none}.pill-tab .pill-info-icon{flex-shrink:0;opacity:.7}.pill-tab:hover .pill-info-icon,.pill-tab:focus-visible .pill-info-icon{opacity:1}.pill-tab .pill-info-tip{position:absolute;left:0;top:calc(100% + 8px);z-index:20;width:max-content;max-width:280px;padding:8px 12px;border-radius:8px;background:#1e293b;color:#fff;font-size:.75rem;font-weight:400;line-height:1.45;text-align:left;white-space:normal;box-shadow:0 4px 12px #0f172a40;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .12s,visibility .12s}.pill-tab:hover .pill-info-tip,.pill-tab:focus-visible .pill-info-tip{opacity:1;visibility:visible}.pill-tab:last-child .pill-info-tip{left:auto;right:0}.pill-wrap--vertical .pill-fade{display:none}.pill-tabs.pill-tabs--vertical{flex-direction:column;flex-wrap:nowrap;overflow:visible;gap:4px;padding-bottom:0}.pill-tabs--vertical .pill-tab{width:100%;justify-content:flex-start;border-radius:10px;text-align:left}.pill-tabs--vertical .pill-tab .pill-count{margin-left:auto}.pill-tabs--vertical .pill-tab .pill-info-tip{left:calc(100% + 8px);top:50%;transform:translateY(-50%)}.pill-tabs--vertical .pill-tab:last-child .pill-info-tip{left:calc(100% + 8px);right:auto}@media(pointer:coarse),(max-width:480px){.pill-tab{min-height:44px}}\n"]
|
|
462
|
+
}]
|
|
463
|
+
}],
|
|
464
|
+
ctorParameters: () => [],
|
|
465
|
+
propDecorators: {
|
|
466
|
+
tabs: [{
|
|
467
|
+
type: i0.Input,
|
|
468
|
+
args: [{
|
|
469
|
+
isSignal: true,
|
|
470
|
+
alias: "tabs",
|
|
471
|
+
required: false
|
|
472
|
+
}]
|
|
473
|
+
}],
|
|
474
|
+
activeKey: [{
|
|
475
|
+
type: i0.Input,
|
|
476
|
+
args: [{
|
|
477
|
+
isSignal: true,
|
|
478
|
+
alias: "activeKey",
|
|
479
|
+
required: false
|
|
480
|
+
}]
|
|
481
|
+
}],
|
|
482
|
+
ariaLabel: [{
|
|
483
|
+
type: i0.Input,
|
|
484
|
+
args: [{
|
|
485
|
+
isSignal: true,
|
|
486
|
+
alias: "ariaLabel",
|
|
487
|
+
required: false
|
|
488
|
+
}]
|
|
489
|
+
}],
|
|
490
|
+
name: [{
|
|
491
|
+
type: i0.Input,
|
|
492
|
+
args: [{
|
|
493
|
+
isSignal: true,
|
|
494
|
+
alias: "name",
|
|
495
|
+
required: false
|
|
496
|
+
}]
|
|
497
|
+
}],
|
|
498
|
+
noWrap: [{
|
|
499
|
+
type: i0.Input,
|
|
500
|
+
args: [{
|
|
501
|
+
isSignal: true,
|
|
502
|
+
alias: "noWrap",
|
|
503
|
+
required: false
|
|
504
|
+
}]
|
|
505
|
+
}],
|
|
506
|
+
orientation: [{
|
|
507
|
+
type: i0.Input,
|
|
508
|
+
args: [{
|
|
509
|
+
isSignal: true,
|
|
510
|
+
alias: "orientation",
|
|
511
|
+
required: false
|
|
512
|
+
}]
|
|
513
|
+
}],
|
|
514
|
+
controlsPanels: [{
|
|
515
|
+
type: i0.Input,
|
|
516
|
+
args: [{
|
|
517
|
+
isSignal: true,
|
|
518
|
+
alias: "controlsPanels",
|
|
519
|
+
required: false
|
|
520
|
+
}]
|
|
521
|
+
}],
|
|
522
|
+
showDescription: [{
|
|
523
|
+
type: i0.Input,
|
|
524
|
+
args: [{
|
|
525
|
+
isSignal: true,
|
|
526
|
+
alias: "showDescription",
|
|
527
|
+
required: false
|
|
528
|
+
}]
|
|
529
|
+
}],
|
|
530
|
+
headingLevel: [{
|
|
531
|
+
type: i0.Input,
|
|
532
|
+
args: [{
|
|
533
|
+
isSignal: true,
|
|
534
|
+
alias: "headingLevel",
|
|
535
|
+
required: false
|
|
536
|
+
}]
|
|
537
|
+
}],
|
|
538
|
+
tabChange: [{
|
|
539
|
+
type: i0.Output,
|
|
540
|
+
args: ["tabChange"]
|
|
541
|
+
}]
|
|
542
|
+
}
|
|
543
|
+
});
|
|
544
|
+
export { PillTabPanelDirective, PillTabsComponent, pillTabDescriptionId, pillTabId, pillTabPanelId, pillTabTitleId };
|
|
545
|
+
|
|
546
|
+
//# sourceMappingURL=forgeroute-ui-pill-tabs.mjs.map
|