@cloudfrogger/goodui 0.0.60 → 0.0.62
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/README.md +10 -0
- package/ai/README.md +47 -0
- package/ai/case-studies/index.md +10 -0
- package/ai/case-studies/vpshoster.md +18 -0
- package/ai/case-studies/webmailer.md +21 -0
- package/ai/catalog/README.md +7 -0
- package/ai/catalog/component.schema.json +289 -0
- package/ai/catalog/components/div-goodDetailRow.json +33 -0
- package/ai/catalog/components/form-goodForm.json +84 -0
- package/ai/catalog/components/good-action-bar.json +83 -0
- package/ai/catalog/components/good-action-group.json +143 -0
- package/ai/catalog/components/good-action-menu.json +121 -0
- package/ai/catalog/components/good-alert.json +184 -0
- package/ai/catalog/components/good-app-layout.json +245 -0
- package/ai/catalog/components/good-assistant-body.json +43 -0
- package/ai/catalog/components/good-assistant-footer.json +43 -0
- package/ai/catalog/components/good-assistant-header.json +43 -0
- package/ai/catalog/components/good-assistant-main.json +61 -0
- package/ai/catalog/components/good-assistant-mobile.json +43 -0
- package/ai/catalog/components/good-assistant-panel.json +131 -0
- package/ai/catalog/components/good-avatar-menu-item.json +82 -0
- package/ai/catalog/components/good-avatar-menu.json +83 -0
- package/ai/catalog/components/good-badge.json +180 -0
- package/ai/catalog/components/good-bar-chart.json +118 -0
- package/ai/catalog/components/good-brand-icon.json +71 -0
- package/ai/catalog/components/good-breadcrumbs.json +102 -0
- package/ai/catalog/components/good-button.json +192 -0
- package/ai/catalog/components/good-calendar.json +430 -0
- package/ai/catalog/components/good-card-footer.json +63 -0
- package/ai/catalog/components/good-card-header.json +100 -0
- package/ai/catalog/components/good-card.json +57 -0
- package/ai/catalog/components/good-chart-axis.json +168 -0
- package/ai/catalog/components/good-chart-bar.json +89 -0
- package/ai/catalog/components/good-chart-histogram.json +78 -0
- package/ai/catalog/components/good-chart-line.json +89 -0
- package/ai/catalog/components/good-chart-scatter.json +87 -0
- package/ai/catalog/components/good-checkbox.json +171 -0
- package/ai/catalog/components/good-citation.json +62 -0
- package/ai/catalog/components/good-code-block.json +116 -0
- package/ai/catalog/components/good-color-controls.json +58 -0
- package/ai/catalog/components/good-color-picker.json +141 -0
- package/ai/catalog/components/good-column.json +53 -0
- package/ai/catalog/components/good-columns.json +77 -0
- package/ai/catalog/components/good-date-input.json +386 -0
- package/ai/catalog/components/good-detail-list.json +43 -0
- package/ai/catalog/components/good-dropdown.json +259 -0
- package/ai/catalog/components/good-error-page.json +133 -0
- package/ai/catalog/components/good-error-text.json +43 -0
- package/ai/catalog/components/good-expandable.json +159 -0
- package/ai/catalog/components/good-eyebrow.json +61 -0
- package/ai/catalog/components/good-field-label.json +62 -0
- package/ai/catalog/components/good-form-field.json +67 -0
- package/ai/catalog/components/good-form-row.json +70 -0
- package/ai/catalog/components/good-group.json +150 -0
- package/ai/catalog/components/good-heading-group.json +45 -0
- package/ai/catalog/components/good-heading.json +69 -0
- package/ai/catalog/components/good-hint.json +43 -0
- package/ai/catalog/components/good-histogram.json +103 -0
- package/ai/catalog/components/good-icon.json +97 -0
- package/ai/catalog/components/good-image-input.json +190 -0
- package/ai/catalog/components/good-image-preview.json +97 -0
- package/ai/catalog/components/good-inline-image.json +131 -0
- package/ai/catalog/components/good-input-phone.json +226 -0
- package/ai/catalog/components/good-input.json +350 -0
- package/ai/catalog/components/good-line-chart.json +94 -0
- package/ai/catalog/components/good-link.json +147 -0
- package/ai/catalog/components/good-listbox.json +248 -0
- package/ai/catalog/components/good-main-menu.json +138 -0
- package/ai/catalog/components/good-main-view.json +179 -0
- package/ai/catalog/components/good-map-color-scale.json +163 -0
- package/ai/catalog/components/good-map-overlay.json +136 -0
- package/ai/catalog/components/good-modal-footer.json +63 -0
- package/ai/catalog/components/good-modal-header.json +73 -0
- package/ai/catalog/components/good-modal.json +131 -0
- package/ai/catalog/components/good-month-calendar.json +170 -0
- package/ai/catalog/components/good-notification-host.json +46 -0
- package/ai/catalog/components/good-notifications.json +72 -0
- package/ai/catalog/components/good-number-input.json +180 -0
- package/ai/catalog/components/good-paragraph.json +47 -0
- package/ai/catalog/components/good-pdf-preview.json +153 -0
- package/ai/catalog/components/good-pin-input.json +211 -0
- package/ai/catalog/components/good-progress.json +158 -0
- package/ai/catalog/components/good-prose.json +43 -0
- package/ai/catalog/components/good-radio-group.json +181 -0
- package/ai/catalog/components/good-range-slider.json +285 -0
- package/ai/catalog/components/good-rating.json +160 -0
- package/ai/catalog/components/good-resizable-pane.json +61 -0
- package/ai/catalog/components/good-resizable.json +185 -0
- package/ai/catalog/components/good-rich-text-editor.json +164 -0
- package/ai/catalog/components/good-scatter-chart.json +94 -0
- package/ai/catalog/components/good-search.json +60 -0
- package/ai/catalog/components/good-section.json +43 -0
- package/ai/catalog/components/good-select-country.json +205 -0
- package/ai/catalog/components/good-select-font.json +111 -0
- package/ai/catalog/components/good-select.json +217 -0
- package/ai/catalog/components/good-separator.json +59 -0
- package/ai/catalog/components/good-settings.json +60 -0
- package/ai/catalog/components/good-sidebar-container.json +112 -0
- package/ai/catalog/components/good-sidebar-item.json +210 -0
- package/ai/catalog/components/good-sidebar-menu-container.json +80 -0
- package/ai/catalog/components/good-sidebar-submenu-group.json +98 -0
- package/ai/catalog/components/good-sidebar-submenu-item.json +113 -0
- package/ai/catalog/components/good-signature-pad.json +115 -0
- package/ai/catalog/components/good-sparkline.json +188 -0
- package/ai/catalog/components/good-status-icon.json +425 -0
- package/ai/catalog/components/good-subheading.json +67 -0
- package/ai/catalog/components/good-subnav.json +132 -0
- package/ai/catalog/components/good-summary.json +43 -0
- package/ai/catalog/components/good-switch.json +167 -0
- package/ai/catalog/components/good-tab.json +129 -0
- package/ai/catalog/components/good-table.json +294 -0
- package/ai/catalog/components/good-tabs.json +90 -0
- package/ai/catalog/components/good-textarea.json +194 -0
- package/ai/catalog/components/good-theme-toggle.json +57 -0
- package/ai/catalog/components/good-timeline-section.json +105 -0
- package/ai/catalog/components/good-timeline-step.json +248 -0
- package/ai/catalog/components/good-timeline.json +302 -0
- package/ai/catalog/components/good-topbar-dropdown-item.json +115 -0
- package/ai/catalog/components/good-topbar-dropdown-menu.json +85 -0
- package/ai/catalog/components/good-topbar-menu-container.json +96 -0
- package/ai/catalog/components/good-topbar-menu-item.json +99 -0
- package/ai/catalog/components/good-topbar-submenu.json +77 -0
- package/ai/catalog/components/good-topbar.json +259 -0
- package/ai/catalog/components/good-world-map.json +145 -0
- package/ai/catalog/components/goodCardActions.json +33 -0
- package/ai/catalog/components/goodDropdownFooter.json +33 -0
- package/ai/catalog/components/goodDropdownHeader.json +33 -0
- package/ai/catalog/components/goodExpandableHeader.json +33 -0
- package/ai/catalog/components/ng-template-goodListboxItem.json +33 -0
- package/ai/catalog/components/ng-template-goodTableCell.json +43 -0
- package/ai/catalog/index.json +1484 -0
- package/ai/catalog/index.schema.json +13 -0
- package/ai/examples/angular.json +26 -0
- package/ai/examples/edit-form.html +13 -0
- package/ai/examples/edit-form.ts +18 -0
- package/ai/examples/index.html +1 -0
- package/ai/examples/login.html +11 -0
- package/ai/examples/login.ts +14 -0
- package/ai/examples/main.ts +25 -0
- package/ai/examples/settings.html +10 -0
- package/ai/examples/settings.ts +13 -0
- package/ai/examples/table-view.html +3 -0
- package/ai/examples/table-view.ts +21 -0
- package/ai/examples/tsconfig.json +27 -0
- package/ai/guides/common-mistakes.md +9 -0
- package/ai/guides/component-discovery.md +17 -0
- package/ai/guides/design-tokens.md +10 -0
- package/ai/guides/layout.md +17 -0
- package/ai/guides/page-patterns.md +39 -0
- package/ai/install.mjs +25 -0
- package/ai/manifest.json +6 -0
- package/ai/skill/goodui/SKILL.md +27 -0
- package/angular/projects/goodui/package.json +28 -0
- package/angular/projects/goodui/src/action-bar.css +20 -0
- package/angular/projects/goodui/src/assistant-panel.css +38 -0
- package/angular/projects/goodui/src/calendar.css +161 -0
- package/angular/projects/goodui/src/chart.css +35 -0
- package/angular/projects/goodui/src/color-picker.css +40 -0
- package/angular/projects/goodui/src/error-page.css +24 -0
- package/angular/projects/goodui/src/lib/action-bar.ts +161 -0
- package/angular/projects/goodui/src/lib/action-group.ts +31 -0
- package/angular/projects/goodui/src/lib/action-menu.ts +81 -0
- package/angular/projects/goodui/src/lib/actions.ts +318 -0
- package/angular/projects/goodui/src/lib/alert.ts +60 -0
- package/angular/projects/goodui/src/lib/app-layout.ts +79 -0
- package/angular/projects/goodui/src/lib/assistant-panel.ts +133 -0
- package/angular/projects/goodui/src/lib/badge.ts +47 -0
- package/angular/projects/goodui/src/lib/bar-chart.html +80 -0
- package/angular/projects/goodui/src/lib/bar-chart.ts +233 -0
- package/angular/projects/goodui/src/lib/breadcrumbs.ts +81 -0
- package/angular/projects/goodui/src/lib/button.ts +38 -0
- package/angular/projects/goodui/src/lib/calendar-layout.ts +68 -0
- package/angular/projects/goodui/src/lib/calendar-service.ts +144 -0
- package/angular/projects/goodui/src/lib/calendar-working-hours.ts +65 -0
- package/angular/projects/goodui/src/lib/calendar.html +200 -0
- package/angular/projects/goodui/src/lib/calendar.ts +471 -0
- package/angular/projects/goodui/src/lib/card.ts +64 -0
- package/angular/projects/goodui/src/lib/chart-colors.ts +22 -0
- package/angular/projects/goodui/src/lib/chart-data.ts +269 -0
- package/angular/projects/goodui/src/lib/checkbox.ts +87 -0
- package/angular/projects/goodui/src/lib/code-block.ts +147 -0
- package/angular/projects/goodui/src/lib/color-controls.ts +107 -0
- package/angular/projects/goodui/src/lib/color-picker.ts +142 -0
- package/angular/projects/goodui/src/lib/color-utils.ts +69 -0
- package/angular/projects/goodui/src/lib/country-data.ts +16 -0
- package/angular/projects/goodui/src/lib/date-input.ts +542 -0
- package/angular/projects/goodui/src/lib/dropdown.ts +309 -0
- package/angular/projects/goodui/src/lib/error-page.ts +46 -0
- package/angular/projects/goodui/src/lib/expandable.ts +64 -0
- package/angular/projects/goodui/src/lib/form.ts +12 -0
- package/angular/projects/goodui/src/lib/goodui-config.ts +16 -0
- package/angular/projects/goodui/src/lib/group.ts +45 -0
- package/angular/projects/goodui/src/lib/histogram.html +52 -0
- package/angular/projects/goodui/src/lib/histogram.ts +146 -0
- package/angular/projects/goodui/src/lib/icon.ts +44 -0
- package/angular/projects/goodui/src/lib/image-input.ts +154 -0
- package/angular/projects/goodui/src/lib/image-preview.ts +26 -0
- package/angular/projects/goodui/src/lib/input-phone.ts +305 -0
- package/angular/projects/goodui/src/lib/input.ts +143 -0
- package/angular/projects/goodui/src/lib/line-chart.html +53 -0
- package/angular/projects/goodui/src/lib/line-chart.ts +193 -0
- package/angular/projects/goodui/src/lib/link.ts +46 -0
- package/angular/projects/goodui/src/lib/listbox.ts +254 -0
- package/angular/projects/goodui/src/lib/main-view.ts +39 -0
- package/angular/projects/goodui/src/lib/marker-colors.ts +7 -0
- package/angular/projects/goodui/src/lib/modal.ts +199 -0
- package/angular/projects/goodui/src/lib/models.ts +115 -0
- package/angular/projects/goodui/src/lib/month-calendar.ts +289 -0
- package/angular/projects/goodui/src/lib/notification-center.ts +170 -0
- package/angular/projects/goodui/src/lib/notification-host.ts +86 -0
- package/angular/projects/goodui/src/lib/number-input.ts +180 -0
- package/angular/projects/goodui/src/lib/pdf-preview.ts +242 -0
- package/angular/projects/goodui/src/lib/pdf-worker.generated.ts +2 -0
- package/angular/projects/goodui/src/lib/pin-input.ts +193 -0
- package/angular/projects/goodui/src/lib/progress.ts +93 -0
- package/angular/projects/goodui/src/lib/provide-goodui.ts +15 -0
- package/angular/projects/goodui/src/lib/radio-group.ts +94 -0
- package/angular/projects/goodui/src/lib/range-slider.ts +313 -0
- package/angular/projects/goodui/src/lib/rating.ts +90 -0
- package/angular/projects/goodui/src/lib/required-control.ts +4 -0
- package/angular/projects/goodui/src/lib/resizable.ts +168 -0
- package/angular/projects/goodui/src/lib/rich-text-command.ts +111 -0
- package/angular/projects/goodui/src/lib/rich-text-editor.html +193 -0
- package/angular/projects/goodui/src/lib/rich-text-editor.ts +864 -0
- package/angular/projects/goodui/src/lib/rich-text-sanitize.ts +99 -0
- package/angular/projects/goodui/src/lib/scatter-chart.html +48 -0
- package/angular/projects/goodui/src/lib/scatter-chart.ts +150 -0
- package/angular/projects/goodui/src/lib/select-country.ts +104 -0
- package/angular/projects/goodui/src/lib/select-font.ts +189 -0
- package/angular/projects/goodui/src/lib/select.ts +336 -0
- package/angular/projects/goodui/src/lib/sidebar.ts +232 -0
- package/angular/projects/goodui/src/lib/signature-pad.ts +238 -0
- package/angular/projects/goodui/src/lib/sparkline.html +15 -0
- package/angular/projects/goodui/src/lib/sparkline.ts +106 -0
- package/angular/projects/goodui/src/lib/status-icon.ts +79 -0
- package/angular/projects/goodui/src/lib/subnav.ts +156 -0
- package/angular/projects/goodui/src/lib/switch.ts +54 -0
- package/angular/projects/goodui/src/lib/table.ts +538 -0
- package/angular/projects/goodui/src/lib/tabs.ts +251 -0
- package/angular/projects/goodui/src/lib/textarea.ts +83 -0
- package/angular/projects/goodui/src/lib/theme.ts +49 -0
- package/angular/projects/goodui/src/lib/timeline.ts +252 -0
- package/angular/projects/goodui/src/lib/topbar.ts +402 -0
- package/angular/projects/goodui/src/lib/typography.ts +250 -0
- package/angular/projects/goodui/src/lib/world-map-data.ts +3 -0
- package/angular/projects/goodui/src/lib/world-map.html +73 -0
- package/angular/projects/goodui/src/lib/world-map.ts +391 -0
- package/angular/projects/goodui/src/month-calendar.css +47 -0
- package/angular/projects/goodui/src/pdf-preview.css +25 -0
- package/angular/projects/goodui/src/progress.css +38 -0
- package/angular/projects/goodui/src/public-api.ts +74 -0
- package/angular/projects/goodui/src/range-slider.css +54 -0
- package/angular/projects/goodui/src/resizable.css +32 -0
- package/angular/projects/goodui/src/rich-text-editor.css +33 -0
- package/angular/projects/goodui/src/select-font.css +16 -0
- package/angular/projects/goodui/src/signature-pad.css +14 -0
- package/angular/projects/goodui/src/styles.css +1105 -0
- package/angular/projects/goodui/src/timeline.css +138 -0
- package/angular/projects/goodui/src/tokens.generated.css +754 -0
- package/design/component-map.json +2233 -0
- package/design-tokens/penpot.tokens.json +3339 -0
- package/design.md +452 -0
- package/guides/README.md +17 -0
- package/guides/components/action-bar.md +43 -0
- package/guides/components/action-group.md +43 -0
- package/guides/components/action-menu.md +22 -0
- package/guides/components/alert.md +28 -0
- package/guides/components/assistant-panel.md +50 -0
- package/guides/components/avatar-menu.md +34 -0
- package/guides/components/badge.md +39 -0
- package/guides/components/bar-chart.md +40 -0
- package/guides/components/breadcrumbs.md +37 -0
- package/guides/components/button.md +40 -0
- package/guides/components/calendar.md +166 -0
- package/guides/components/card.md +62 -0
- package/guides/components/chart-axis.md +5 -0
- package/guides/components/chart-bar.md +5 -0
- package/guides/components/chart-data.md +58 -0
- package/guides/components/chart-histogram.md +16 -0
- package/guides/components/chart-line.md +5 -0
- package/guides/components/chart-scatter.md +14 -0
- package/guides/components/checkbox.md +36 -0
- package/guides/components/code-block.md +35 -0
- package/guides/components/color-controls.md +22 -0
- package/guides/components/column.md +5 -0
- package/guides/components/columns.md +13 -0
- package/guides/components/date-input.md +62 -0
- package/guides/components/detail-list.md +25 -0
- package/guides/components/dropdown.md +48 -0
- package/guides/components/error-page.md +31 -0
- package/guides/components/expandable.md +36 -0
- package/guides/components/form.md +49 -0
- package/guides/components/group.md +41 -0
- package/guides/components/histogram.md +45 -0
- package/guides/components/icon.md +13 -0
- package/guides/components/image-input.md +34 -0
- package/guides/components/input-phone.md +45 -0
- package/guides/components/input.md +59 -0
- package/guides/components/line-chart.md +37 -0
- package/guides/components/link.md +31 -0
- package/guides/components/listbox.md +109 -0
- package/guides/components/main-menu.md +11 -0
- package/guides/components/main-view.md +21 -0
- package/guides/components/modal.md +58 -0
- package/guides/components/month-calendar.md +88 -0
- package/guides/components/notifications.md +76 -0
- package/guides/components/number-input.md +21 -0
- package/guides/components/pdf-preview.md +38 -0
- package/guides/components/pin-input.md +37 -0
- package/guides/components/progress.md +41 -0
- package/guides/components/radio-group.md +41 -0
- package/guides/components/range-slider.md +42 -0
- package/guides/components/rating.md +39 -0
- package/guides/components/resizable-pane.md +3 -0
- package/guides/components/resizable.md +75 -0
- package/guides/components/rich-text-editor.md +113 -0
- package/guides/components/scatter-chart.md +43 -0
- package/guides/components/search.md +9 -0
- package/guides/components/select-font.md +16 -0
- package/guides/components/select.md +65 -0
- package/guides/components/settings.md +11 -0
- package/guides/components/sidebar.md +47 -0
- package/guides/components/signature-pad.md +45 -0
- package/guides/components/sparkline.md +31 -0
- package/guides/components/status-icon.md +32 -0
- package/guides/components/submenus.md +30 -0
- package/guides/components/subnav.md +54 -0
- package/guides/components/switch.md +48 -0
- package/guides/components/table.md +256 -0
- package/guides/components/tabs.md +46 -0
- package/guides/components/textarea.md +44 -0
- package/guides/components/theme-toggle.md +33 -0
- package/guides/components/timeline-section.md +7 -0
- package/guides/components/timeline-step.md +12 -0
- package/guides/components/timeline.md +179 -0
- package/guides/components/topbar.md +83 -0
- package/guides/components/typography.md +155 -0
- package/guides/components/world-map.md +72 -0
- package/guides/contributing/design-to-code.md +261 -0
- package/guides/deployment/drone.md +77 -0
- package/guides/examples/user-registration.md +11 -0
- package/guides/foundations/naming.md +7 -0
- package/guides/foundations/tokens.md +203 -0
- package/guides/intro.md +80 -0
- package/guides/layout/app-layout.md +64 -0
- package/guides/layout/layout-rules.md +16 -0
- package/homepage/src/app/examples/calendar-workspace/calendar-workspace-page.html +22 -0
- package/homepage/src/app/examples/calendar-workspace/calendar-workspace-page.ts +111 -0
- package/homepage/src/app/examples/calendar-workspace/source-code.generated.ts +3 -0
- package/homepage/src/app/examples/case-studies/cloudhoster/billing-page.html +166 -0
- package/homepage/src/app/examples/case-studies/cloudhoster/billing-page.ts +134 -0
- package/homepage/src/app/examples/case-studies/cloudhoster/cloudhoster-store.ts +92 -0
- package/homepage/src/app/examples/case-studies/cloudhoster/create-database-page.html +93 -0
- package/homepage/src/app/examples/case-studies/cloudhoster/create-database-page.ts +115 -0
- package/homepage/src/app/examples/case-studies/cloudhoster/database-detail-page.html +202 -0
- package/homepage/src/app/examples/case-studies/cloudhoster/database-detail-page.ts +143 -0
- package/homepage/src/app/examples/case-studies/cloudhoster/databases-page.html +70 -0
- package/homepage/src/app/examples/case-studies/cloudhoster/databases-page.ts +44 -0
- package/homepage/src/app/examples/case-studies/cloudhoster/home-page.html +70 -0
- package/homepage/src/app/examples/case-studies/cloudhoster/home-page.ts +32 -0
- package/homepage/src/app/examples/case-studies/cloudhoster/source-code.generated.ts +12 -0
- package/homepage/src/app/examples/case-studies/vpshoster/create-server-page.html +208 -0
- package/homepage/src/app/examples/case-studies/vpshoster/create-server-page.ts +214 -0
- package/homepage/src/app/examples/case-studies/vpshoster/overview-page.html +35 -0
- package/homepage/src/app/examples/case-studies/vpshoster/overview-page.ts +17 -0
- package/homepage/src/app/examples/case-studies/vpshoster/servers-page.html +111 -0
- package/homepage/src/app/examples/case-studies/vpshoster/servers-page.ts +206 -0
- package/homepage/src/app/examples/case-studies/vpshoster/source-code.generated.ts +6 -0
- package/homepage/src/app/examples/case-studies/vpshoster/vps-store.ts +92 -0
- package/homepage/src/app/examples/case-studies/webmailer/webmailer-page.html +35 -0
- package/homepage/src/app/examples/case-studies/webmailer/webmailer-page.ts +17 -0
- package/homepage/src/app/examples/error-pages/error-pages-example-page.html +27 -0
- package/homepage/src/app/examples/error-pages/error-pages-example-page.ts +34 -0
- package/homepage/src/app/examples/error-pages/not-found-page.html +8 -0
- package/homepage/src/app/examples/error-pages/not-found-page.ts +19 -0
- package/homepage/src/app/examples/error-pages/server-error-page.html +8 -0
- package/homepage/src/app/examples/error-pages/server-error-page.ts +20 -0
- package/homepage/src/app/examples/error-pages/source-code.generated.ts +7 -0
- package/homepage/src/app/examples/mail-compose/mail-compose-page.html +25 -0
- package/homepage/src/app/examples/mail-compose/mail-compose-page.ts +28 -0
- package/homepage/src/app/examples/mail-workspace/mail-workspace-page.html +59 -0
- package/homepage/src/app/examples/mail-workspace/mail-workspace-page.ts +128 -0
- package/homepage/src/app/examples/mail-workspace/source-code.generated.ts +3 -0
- package/homepage/src/app/examples/notifications/notifications-page.html +51 -0
- package/homepage/src/app/examples/notifications/notifications-page.ts +133 -0
- package/homepage/src/app/examples/notifications/source-code.generated.ts +3 -0
- package/homepage/src/app/examples/pdf-reader/pdf-reader-page.html +27 -0
- package/homepage/src/app/examples/pdf-reader/pdf-reader-page.ts +39 -0
- package/homepage/src/app/examples/pdf-reader/source-code.generated.ts +3 -0
- package/homepage/src/app/examples/user-registration/source-code.generated.ts +5 -0
- package/homepage/src/app/examples/user-registration/user-registration-example-page.html +11 -0
- package/homepage/src/app/examples/user-registration/user-registration-example-page.ts +21 -0
- package/homepage/src/app/examples/user-registration/user-registration-form.html +116 -0
- package/homepage/src/app/examples/user-registration/user-registration-form.ts +93 -0
- package/homepage/src/app/examples/user-registration/user-registration-page.html +11 -0
- package/homepage/src/app/examples/user-registration/user-registration-page.ts +23 -0
- package/package.json +2 -2
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, ElementRef, HostListener, computed, forwardRef, inject, input, output, signal, viewChild } from '@angular/core';
|
|
2
|
+
import { RouterLink } from '@angular/router';
|
|
3
|
+
import { GoodIconComponent } from './icon';
|
|
4
|
+
import { GoodMenuAction, GoodNotification, GoodSearchItem, GoodUser } from './models';
|
|
5
|
+
import { GoodThemeService } from './theme';
|
|
6
|
+
import { GoodAlertComponent } from './alert';
|
|
7
|
+
import { GoodBadgeComponent } from './badge';
|
|
8
|
+
import { GoodButtonComponent } from './button';
|
|
9
|
+
import { GoodLinkComponent } from './link';
|
|
10
|
+
import { GoodProgressComponent } from './progress';
|
|
11
|
+
import { GoodNotificationAction, GoodNotificationCenter, GoodNotificationEntry } from './notification-center';
|
|
12
|
+
import { LucideInfo } from '@lucide/angular';
|
|
13
|
+
|
|
14
|
+
@Component({
|
|
15
|
+
selector: 'good-search',
|
|
16
|
+
standalone: true,
|
|
17
|
+
imports: [GoodIconComponent, RouterLink],
|
|
18
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
19
|
+
template: `
|
|
20
|
+
<button #trigger type="button" class="good-action-button" aria-label="Search" (click)="open()"><good-icon name="search" /></button>
|
|
21
|
+
<dialog #dialog class="good-search-dialog" aria-label="Search" (keydown.escape)="close()" (close)="trigger.focus()">
|
|
22
|
+
<div class="good-dialog-heading"><strong>Search</strong><button type="button" class="good-action-button" aria-label="Close" (click)="close()"><good-icon name="close" /></button></div>
|
|
23
|
+
<label class="good-search-field"><good-icon name="search" /><input #searchInput type="search" placeholder="Search…" [value]="query()" (input)="query.set(searchInput.value)" /></label>
|
|
24
|
+
<div class="good-search-results">
|
|
25
|
+
@for (item of results(); track item.id) {
|
|
26
|
+
<a [routerLink]="item.route" (click)="close()"><strong>{{ item.label }}</strong>@if (item.description) {<small>{{ item.description }}</small>}</a>
|
|
27
|
+
} @empty { <p>No results</p> }
|
|
28
|
+
</div>
|
|
29
|
+
</dialog>
|
|
30
|
+
`,
|
|
31
|
+
host: { class: 'good-search' },
|
|
32
|
+
})
|
|
33
|
+
export class GoodSearchComponent {
|
|
34
|
+
readonly items = input<readonly GoodSearchItem[]>([]);
|
|
35
|
+
readonly query = signal('');
|
|
36
|
+
readonly results = computed(() => this.items().filter(item => `${item.label} ${item.description ?? ''}`.toLocaleLowerCase().includes(this.query().toLocaleLowerCase())));
|
|
37
|
+
private readonly dialog = viewChild.required<ElementRef<HTMLDialogElement>>('dialog');
|
|
38
|
+
private readonly searchInput = viewChild.required<ElementRef<HTMLInputElement>>('searchInput');
|
|
39
|
+
|
|
40
|
+
open(): void {
|
|
41
|
+
this.dialog().nativeElement.showModal();
|
|
42
|
+
queueMicrotask(() => this.searchInput().nativeElement.focus());
|
|
43
|
+
}
|
|
44
|
+
close(): void { this.dialog().nativeElement.close(); }
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@Component({
|
|
48
|
+
selector: 'good-notifications',
|
|
49
|
+
standalone: true,
|
|
50
|
+
imports: [GoodIconComponent, RouterLink, GoodAlertComponent, GoodBadgeComponent, GoodButtonComponent, GoodLinkComponent, GoodProgressComponent],
|
|
51
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
52
|
+
template: `
|
|
53
|
+
<button #trigger type="button" class="good-action-button" [attr.aria-label]="unreadCount() ? 'Notifications, ' + unreadCount() + ' unread' : 'Notifications'" (click)="open()">
|
|
54
|
+
<good-icon name="bell" />@if (unreadCount()) {
|
|
55
|
+
<good-badge class="good-notification-count" color="destructive" size="small" [label]="displayCount()" aria-hidden="true" />
|
|
56
|
+
}
|
|
57
|
+
</button>
|
|
58
|
+
<dialog #dialog class="good-notifications-dialog" aria-label="Notifications" (keydown.escape)="close()" (close)="trigger.focus()" (click)="onDialogClick($event)">
|
|
59
|
+
<div class="good-dialog-heading"><strong>Notifications</strong><button type="button" class="good-action-button" aria-label="Close" (click)="close()"><good-icon name="close" /></button></div>
|
|
60
|
+
<div class="good-notifications-list">
|
|
61
|
+
@for (row of panelItems(); track row.key) {
|
|
62
|
+
@if (row.kind === 'managed') {
|
|
63
|
+
@let item = row.value;
|
|
64
|
+
<div class="good-notification-entry" [attr.data-read]="item.read">
|
|
65
|
+
<good-alert [tone]="item.tone" [appearance]="item.appearance" size="small"
|
|
66
|
+
[title]="item.title" [message]="item.message ?? ''" [icon]="item.icon ?? infoIcon"
|
|
67
|
+
[dismissible]="true" closeLabel="Remove notification" (closed)="center.remove(item.id)">
|
|
68
|
+
@if (item.progress; as progress) {
|
|
69
|
+
<good-progress [mode]="progress.mode ?? 'determinate'" [appearance]="progress.appearance ?? 'solid'"
|
|
70
|
+
[size]="progress.size ?? 'small'" [value]="progress.value ?? 0"
|
|
71
|
+
[durationMs]="progress.durationMs ?? 5000" [loop]="progress.loop ?? true"
|
|
72
|
+
[title]="progress.title ?? ''" [showPercent]="progress.showPercent ?? true"
|
|
73
|
+
[color]="progress.color ?? (item.tone === 'neutral' ? 'secondary' : item.tone)"
|
|
74
|
+
[ariaLabel]="progress.ariaLabel ?? (item.title + ' progress')" />
|
|
75
|
+
}
|
|
76
|
+
<time class="good-notification-time" [attr.datetime]="isoDate(item.createdAt)">{{ formatDateTime(item.createdAt) }}</time>
|
|
77
|
+
<div goodAlertActions>
|
|
78
|
+
@for (action of item.actions ?? []; track action.label) {
|
|
79
|
+
@if (action.route) { <good-link [route]="action.route" (click)="activate(item, action)">{{ action.label }}</good-link> }
|
|
80
|
+
@else { <good-button size="small" variant="secondary" (click)="activate(item, action)">{{ action.label }}</good-button> }
|
|
81
|
+
}
|
|
82
|
+
@if (item.requireAcknowledgement && !item.read) {
|
|
83
|
+
<good-button size="small" (click)="center.acknowledge(item.id)">Acknowledge</good-button>
|
|
84
|
+
}
|
|
85
|
+
@else if (!item.read) {
|
|
86
|
+
<good-button size="small" variant="ghost" (click)="center.markRead(item.id)">Mark as read</good-button>
|
|
87
|
+
}
|
|
88
|
+
</div>
|
|
89
|
+
</good-alert>
|
|
90
|
+
</div>
|
|
91
|
+
} @else {
|
|
92
|
+
@let item = row.value;
|
|
93
|
+
@if (item.route) { <a class="good-notification-item" [routerLink]="item.route" (click)="close()"><strong>{{ item.title }}</strong><span>{{ item.description }}</span>@if (item.createdAt !== undefined) { <time class="good-notification-time" [attr.datetime]="isoDate(item.createdAt)">{{ formatDateTime(item.createdAt) }}</time> } @else if (item.time) { <small>{{ item.time }}</small> }</a> }
|
|
94
|
+
@else { <div class="good-notification-item"><strong>{{ item.title }}</strong><span>{{ item.description }}</span>@if (item.createdAt !== undefined) { <time class="good-notification-time" [attr.datetime]="isoDate(item.createdAt)">{{ formatDateTime(item.createdAt) }}</time> } @else if (item.time) { <small>{{ item.time }}</small> }</div> }
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
@if (!items().length && !center.inbox().length) { <p class="good-empty-state">No new messages</p> }
|
|
98
|
+
</div>
|
|
99
|
+
</dialog>
|
|
100
|
+
`,
|
|
101
|
+
host: { class: 'good-notifications' },
|
|
102
|
+
})
|
|
103
|
+
export class GoodNotificationsComponent {
|
|
104
|
+
readonly items = input<readonly GoodNotification[]>([]);
|
|
105
|
+
readonly center = inject(GoodNotificationCenter);
|
|
106
|
+
readonly infoIcon = LucideInfo;
|
|
107
|
+
readonly unreadCount = computed(() => this.items().filter(item => !item.read).length + this.center.unreadCount());
|
|
108
|
+
readonly displayCount = computed(() => this.unreadCount() > 99 ? '99+' : String(this.unreadCount()));
|
|
109
|
+
readonly panelItems = computed(() => [
|
|
110
|
+
...this.center.inbox().map(item => ({ kind: 'managed' as const, key: `managed-${item.id}`, timestamp: item.createdAt, value: item })),
|
|
111
|
+
...this.items().map(item => ({ kind: 'external' as const, key: `external-${item.id}`, timestamp: item.createdAt ?? Number.NEGATIVE_INFINITY, value: item })),
|
|
112
|
+
].sort((a, b) => b.timestamp - a.timestamp));
|
|
113
|
+
private readonly dialog = viewChild.required<ElementRef<HTMLDialogElement>>('dialog');
|
|
114
|
+
formatDateTime(timestamp: number): string {
|
|
115
|
+
return new Intl.DateTimeFormat(undefined, { dateStyle: 'medium', timeStyle: 'short' }).format(timestamp);
|
|
116
|
+
}
|
|
117
|
+
isoDate(timestamp: number): string { return new Date(timestamp).toISOString(); }
|
|
118
|
+
open(): void { this.dialog().nativeElement.showModal(); }
|
|
119
|
+
close(): void { this.dialog().nativeElement.close(); }
|
|
120
|
+
onDialogClick(event: MouseEvent): void {
|
|
121
|
+
const dialog = this.dialog().nativeElement;
|
|
122
|
+
if (event.target !== dialog) return;
|
|
123
|
+
const bounds = dialog.getBoundingClientRect();
|
|
124
|
+
if (event.clientX < bounds.left || event.clientX > bounds.right || event.clientY < bounds.top || event.clientY > bounds.bottom) this.close();
|
|
125
|
+
}
|
|
126
|
+
activate(item: GoodNotificationEntry, action: GoodNotificationAction): void {
|
|
127
|
+
action.run?.();
|
|
128
|
+
this.center.acknowledge(item.id);
|
|
129
|
+
if (action.route) this.close();
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
@Component({
|
|
134
|
+
selector: 'good-theme-toggle',
|
|
135
|
+
standalone: true,
|
|
136
|
+
imports: [GoodIconComponent],
|
|
137
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
138
|
+
template: `<button type="button" class="good-action-button" [attr.aria-label]="label()" [attr.title]="label()" (click)="theme.cycle()">
|
|
139
|
+
<good-icon [name]="icon()" />
|
|
140
|
+
</button>`,
|
|
141
|
+
host: { class: 'good-theme-toggle' },
|
|
142
|
+
})
|
|
143
|
+
export class GoodThemeToggleComponent {
|
|
144
|
+
readonly theme = inject(GoodThemeService);
|
|
145
|
+
readonly icon = computed(() => ({ light: 'sun', system: 'monitor', dark: 'moon' } as const)[this.theme.preference()]);
|
|
146
|
+
readonly label = computed(() => `Appearance: ${this.theme.preference()}. Switch to ${{ light: 'system', system: 'dark', dark: 'light' }[this.theme.preference()]} mode`);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
@Component({
|
|
150
|
+
selector: 'good-settings',
|
|
151
|
+
standalone: true,
|
|
152
|
+
imports: [GoodIconComponent, RouterLink],
|
|
153
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
154
|
+
template: `
|
|
155
|
+
<button type="button" class="good-action-button" aria-label="Settings" aria-haspopup="menu" [attr.aria-expanded]="open()" (click)="toggleMenu()"><good-icon name="settings" /></button>
|
|
156
|
+
@if (open()) { <div class="good-action-popover" role="menu" (keydown.escape)="closeMenu()">
|
|
157
|
+
<strong class="good-popover-title">Settings</strong>
|
|
158
|
+
@for (action of actions(); track action.id) {
|
|
159
|
+
@if (action.route) { <a role="menuitem" [routerLink]="action.route" (click)="open.set(false)">{{ action.label }}</a> }
|
|
160
|
+
@else { <button role="menuitem" type="button" (click)="run(action)">{{ action.label }}</button> }
|
|
161
|
+
}
|
|
162
|
+
</div> }
|
|
163
|
+
`,
|
|
164
|
+
host: { class: 'good-settings' },
|
|
165
|
+
})
|
|
166
|
+
export class GoodSettingsComponent {
|
|
167
|
+
readonly actions = input<readonly GoodMenuAction[]>([]);
|
|
168
|
+
readonly open = signal(false);
|
|
169
|
+
private readonly element: ElementRef<HTMLElement> = inject(ElementRef);
|
|
170
|
+
|
|
171
|
+
toggleMenu(): void {
|
|
172
|
+
this.open.set(!this.open());
|
|
173
|
+
if (this.open()) setTimeout(() => this.element.nativeElement.querySelector<HTMLElement>('[role="menuitem"]')?.focus());
|
|
174
|
+
}
|
|
175
|
+
closeMenu(): void { this.open.set(false); this.element.nativeElement.querySelector<HTMLElement>('[aria-haspopup="menu"]')?.focus(); }
|
|
176
|
+
run(action: GoodMenuAction): void { action.action?.(); this.closeMenu(); }
|
|
177
|
+
@HostListener('document:click', ['$event']) onDocumentClick(event: MouseEvent): void {
|
|
178
|
+
if (!this.element.nativeElement.contains(event.target as Node)) this.open.set(false);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
@Component({
|
|
183
|
+
selector: 'good-avatar-menu-item',
|
|
184
|
+
standalone: true,
|
|
185
|
+
imports: [GoodIconComponent, RouterLink, forwardRef(() => GoodAvatarMenuItemComponent)],
|
|
186
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
187
|
+
template: `
|
|
188
|
+
@if (action().separatorBefore) { <span class="good-avatar-separator" role="separator"></span> }
|
|
189
|
+
<div class="good-avatar-item-wrap" [class.good-is-open]="expanded()" (mouseenter)="openSubmenu()" (mouseleave)="expanded.set(false)" (keydown.escape)="onEscape($event)">
|
|
190
|
+
@if (action().children?.length) {
|
|
191
|
+
<button #trigger class="good-avatar-row" type="button" role="menuitem" aria-haspopup="menu" [attr.aria-expanded]="expanded()" [attr.aria-controls]="submenuId()" (click)="toggleSubmenu()" (keydown.arrowright)="openWithKeyboard($event)">
|
|
192
|
+
@if (action().icon) { <good-icon [name]="action().icon!" /> }
|
|
193
|
+
<span class="good-avatar-row-label">{{ action().label }}</span>
|
|
194
|
+
@if (action().detail) { <span class="good-avatar-row-detail">{{ action().detail }}</span> }
|
|
195
|
+
<good-icon class="good-avatar-chevron" name="chevron-right" />
|
|
196
|
+
</button>
|
|
197
|
+
@if (expanded()) {
|
|
198
|
+
<div class="good-avatar-submenu" [id]="submenuId()" role="menu" [attr.aria-label]="action().label">
|
|
199
|
+
@for (child of action().children; track child.id) {
|
|
200
|
+
<good-avatar-menu-item [action]="child" [path]="submenuId() + '-' + child.id" (closed)="closed.emit()" />
|
|
201
|
+
}
|
|
202
|
+
</div>
|
|
203
|
+
}
|
|
204
|
+
} @else if (action().route) {
|
|
205
|
+
<a class="good-avatar-row" [class.good-avatar-sign-out]="action().variant === 'sign-out'" role="menuitem" [routerLink]="action().route" (click)="closed.emit()">
|
|
206
|
+
@if (action().icon) { <good-icon [name]="action().icon!" /> }
|
|
207
|
+
<span class="good-avatar-row-label">{{ action().label }}</span>
|
|
208
|
+
@if (action().detail) { <span class="good-avatar-row-detail">{{ action().detail }}</span> }
|
|
209
|
+
</a>
|
|
210
|
+
} @else {
|
|
211
|
+
<button class="good-avatar-row" [class.good-avatar-sign-out]="action().variant === 'sign-out'" type="button" role="menuitem" (click)="run()">
|
|
212
|
+
@if (action().icon) { <good-icon [name]="action().icon!" /> }
|
|
213
|
+
<span class="good-avatar-row-label">{{ action().label }}</span>
|
|
214
|
+
@if (action().detail) { <span class="good-avatar-row-detail">{{ action().detail }}</span> }
|
|
215
|
+
</button>
|
|
216
|
+
}
|
|
217
|
+
</div>
|
|
218
|
+
`,
|
|
219
|
+
host: { class: 'good-avatar-menu-item' },
|
|
220
|
+
})
|
|
221
|
+
export class GoodAvatarMenuItemComponent {
|
|
222
|
+
readonly action = input.required<GoodMenuAction>();
|
|
223
|
+
readonly path = input.required<string>();
|
|
224
|
+
readonly closed = output<void>();
|
|
225
|
+
readonly expanded = signal(false);
|
|
226
|
+
readonly submenuId = computed(() => `good-avatar-${this.path()}`);
|
|
227
|
+
private readonly element: ElementRef<HTMLElement> = inject(ElementRef);
|
|
228
|
+
|
|
229
|
+
openSubmenu(): void { if (this.action().children?.length && matchMedia('(hover: hover)').matches) this.expanded.set(true); }
|
|
230
|
+
toggleSubmenu(): void {
|
|
231
|
+
if (matchMedia('(hover: hover)').matches) this.expanded.set(true);
|
|
232
|
+
else this.expanded.update(value => !value);
|
|
233
|
+
}
|
|
234
|
+
openWithKeyboard(event: Event): void {
|
|
235
|
+
event.preventDefault();
|
|
236
|
+
this.expanded.set(true);
|
|
237
|
+
queueMicrotask(() => this.element.nativeElement.querySelector<HTMLElement>('.good-avatar-submenu [role="menuitem"]')?.focus());
|
|
238
|
+
}
|
|
239
|
+
onEscape(event: Event): void {
|
|
240
|
+
if (!this.expanded()) return;
|
|
241
|
+
event.stopPropagation();
|
|
242
|
+
this.expanded.set(false);
|
|
243
|
+
this.element.nativeElement.querySelector<HTMLElement>('[aria-haspopup="menu"]')?.focus();
|
|
244
|
+
}
|
|
245
|
+
run(): void { this.action().action?.(); this.closed.emit(); }
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
@Component({
|
|
249
|
+
selector: 'good-avatar-menu',
|
|
250
|
+
standalone: true,
|
|
251
|
+
imports: [GoodAvatarMenuItemComponent],
|
|
252
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
253
|
+
template: `
|
|
254
|
+
<button type="button" class="good-avatar-button" aria-label="User menu" aria-haspopup="menu" [attr.aria-expanded]="open()" (click)="toggleMenu()">
|
|
255
|
+
@if (user()?.avatarUrl) { <img [src]="user()!.avatarUrl" alt="" /> } @else { <span>{{ initials() }}</span> }
|
|
256
|
+
</button>
|
|
257
|
+
@if (open()) { <div class="good-avatar-popover" role="menu" aria-label="User menu" (keydown.escape)="closeMenu()">
|
|
258
|
+
<div class="good-avatar-identity" role="none">
|
|
259
|
+
<span class="good-avatar-identity-picture">@if (user()?.avatarUrl) { <img [src]="user()!.avatarUrl" alt="" /> } @else { {{ initials() }} }</span>
|
|
260
|
+
<span class="good-avatar-identity-copy"><strong>{{ user()?.name ?? 'User' }}</strong><small>{{ user()?.email }}</small></span>
|
|
261
|
+
@if (user()?.badge) { <span class="good-avatar-badge">{{ user()?.badge }}</span> }
|
|
262
|
+
</div>
|
|
263
|
+
@for (action of actions(); track action.id) {
|
|
264
|
+
@if (action.variant !== 'sign-out') { <good-avatar-menu-item [action]="action" [path]="action.id" (closed)="closeMenu()" /> }
|
|
265
|
+
}
|
|
266
|
+
<span class="good-avatar-separator" role="separator"></span>
|
|
267
|
+
<label class="good-avatar-theme-row"><span>Dark Mode</span><input type="checkbox" role="switch" [checked]="theme.preference() === 'dark'" (change)="theme.setTheme($any($event.target).checked ? 'dark' : 'light')" /><span class="good-avatar-switch" aria-hidden="true"></span></label>
|
|
268
|
+
@for (action of actions(); track action.id) {
|
|
269
|
+
@if (action.variant === 'sign-out') { <good-avatar-menu-item [action]="action" [path]="action.id" (closed)="closeMenu()" /> }
|
|
270
|
+
}
|
|
271
|
+
</div> }
|
|
272
|
+
`,
|
|
273
|
+
host: { class: 'good-avatar-menu' },
|
|
274
|
+
})
|
|
275
|
+
export class GoodAvatarMenuComponent {
|
|
276
|
+
readonly user = input<GoodUser | null>(null);
|
|
277
|
+
readonly actions = input<readonly GoodMenuAction[]>([]);
|
|
278
|
+
readonly open = signal(false);
|
|
279
|
+
readonly theme = inject(GoodThemeService);
|
|
280
|
+
readonly initials = computed(() => this.user()?.initials ?? this.user()?.name.split(/\s+/).slice(0, 2).map(part => part[0]).join('').toUpperCase() ?? '?');
|
|
281
|
+
private readonly element: ElementRef<HTMLElement> = inject(ElementRef);
|
|
282
|
+
|
|
283
|
+
toggleMenu(): void {
|
|
284
|
+
this.open.set(!this.open());
|
|
285
|
+
if (this.open()) setTimeout(() => this.element.nativeElement.querySelector<HTMLElement>('[role="menuitem"]')?.focus());
|
|
286
|
+
}
|
|
287
|
+
closeMenu(): void { this.open.set(false); this.element.nativeElement.querySelector<HTMLElement>('[aria-haspopup="menu"]')?.focus(); }
|
|
288
|
+
@HostListener('document:click', ['$event']) onDocumentClick(event: MouseEvent): void {
|
|
289
|
+
if (!this.element.nativeElement.contains(event.target as Node)) this.open.set(false);
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
@Component({
|
|
294
|
+
selector: 'good-main-menu',
|
|
295
|
+
standalone: true,
|
|
296
|
+
imports: [GoodSearchComponent, GoodNotificationsComponent, GoodThemeToggleComponent, GoodSettingsComponent, GoodAvatarMenuComponent],
|
|
297
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
298
|
+
template: `
|
|
299
|
+
@if (showSearch()) { <good-search [items]="searchItems()" /> }
|
|
300
|
+
@if (showNotifications()) { <good-notifications [items]="notifications()" /> }
|
|
301
|
+
@if (showThemeToggle()) { <good-theme-toggle /> }
|
|
302
|
+
@if (showSettings()) { <good-settings [actions]="settingsActions()" /> }
|
|
303
|
+
@if (showAvatar()) { <good-avatar-menu [user]="user()" [actions]="avatarActions()" /> }
|
|
304
|
+
`,
|
|
305
|
+
host: { class: 'good-main-menu' },
|
|
306
|
+
})
|
|
307
|
+
export class GoodMainMenuComponent {
|
|
308
|
+
readonly user = input<GoodUser | null>(null);
|
|
309
|
+
readonly notifications = input<readonly GoodNotification[]>([]);
|
|
310
|
+
readonly searchItems = input<readonly GoodSearchItem[]>([]);
|
|
311
|
+
readonly settingsActions = input<readonly GoodMenuAction[]>([]);
|
|
312
|
+
readonly avatarActions = input<readonly GoodMenuAction[]>([]);
|
|
313
|
+
readonly showSearch = input(true);
|
|
314
|
+
readonly showNotifications = input(true);
|
|
315
|
+
readonly showThemeToggle = input(true);
|
|
316
|
+
readonly showSettings = input(false);
|
|
317
|
+
readonly showAvatar = input(true);
|
|
318
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, input, output, signal } from '@angular/core';
|
|
2
|
+
import { LucideDynamicIcon, LucideInfo, LucideX } from '@lucide/angular';
|
|
3
|
+
import { GoodButtonIcon } from './models';
|
|
4
|
+
|
|
5
|
+
export type GoodAlertTone = 'neutral' | 'info' | 'success' | 'brand' | 'destructive' | 'warning';
|
|
6
|
+
export type GoodAlertAppearance = 'default' | 'mono' | 'outline' | 'light';
|
|
7
|
+
export type GoodAlertSize = 'small' | 'default' | 'large';
|
|
8
|
+
|
|
9
|
+
@Component({
|
|
10
|
+
selector: 'good-alert',
|
|
11
|
+
standalone: true,
|
|
12
|
+
imports: [LucideDynamicIcon],
|
|
13
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
14
|
+
host: {
|
|
15
|
+
class: 'good-alert',
|
|
16
|
+
'[attr.data-tone]': 'tone()',
|
|
17
|
+
'[attr.data-appearance]': 'appearance()',
|
|
18
|
+
'[attr.data-size]': 'size()',
|
|
19
|
+
'[attr.role]': 'tone() === "destructive" ? "alert" : "status"',
|
|
20
|
+
'[attr.aria-hidden]': 'hidden() ? "true" : null',
|
|
21
|
+
},
|
|
22
|
+
template: `
|
|
23
|
+
@if (!hidden()) {
|
|
24
|
+
<div class="good-alert-frame">
|
|
25
|
+
@if (showIcon()) { <svg class="good-alert-icon" [lucideIcon]="icon()" [size]="iconSize()" aria-hidden="true"></svg> }
|
|
26
|
+
<div class="good-alert-content">
|
|
27
|
+
@if (title()) { <strong class="good-alert-title">{{ title() }}</strong> }
|
|
28
|
+
@if (message()) { <p class="good-alert-message">{{ message() }}</p> }
|
|
29
|
+
<ng-content />
|
|
30
|
+
<div class="good-alert-actions"><ng-content select="[goodAlertActions]" /></div>
|
|
31
|
+
</div>
|
|
32
|
+
@if (dismissible()) {
|
|
33
|
+
<button class="good-alert-close" type="button" [attr.aria-label]="closeLabel()" (click)="dismiss()">
|
|
34
|
+
<svg [lucideIcon]="closeIcon" [size]="iconSize()" aria-hidden="true"></svg>
|
|
35
|
+
</button>
|
|
36
|
+
}
|
|
37
|
+
</div>
|
|
38
|
+
}
|
|
39
|
+
`,
|
|
40
|
+
})
|
|
41
|
+
export class GoodAlertComponent {
|
|
42
|
+
readonly tone = input<GoodAlertTone>('neutral');
|
|
43
|
+
readonly appearance = input<GoodAlertAppearance>('default');
|
|
44
|
+
readonly size = input<GoodAlertSize>('default');
|
|
45
|
+
readonly title = input('');
|
|
46
|
+
readonly message = input('');
|
|
47
|
+
readonly icon = input<GoodButtonIcon>(LucideInfo);
|
|
48
|
+
readonly showIcon = input(true);
|
|
49
|
+
readonly dismissible = input(false);
|
|
50
|
+
readonly closeLabel = input('Dismiss alert');
|
|
51
|
+
readonly closed = output<void>();
|
|
52
|
+
readonly hidden = signal(false);
|
|
53
|
+
readonly closeIcon = LucideX;
|
|
54
|
+
readonly iconSize = () => ({ small: 16, default: 18, large: 20 })[this.size()];
|
|
55
|
+
|
|
56
|
+
dismiss(): void {
|
|
57
|
+
this.hidden.set(true);
|
|
58
|
+
this.closed.emit();
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, ElementRef, inject, input, signal, viewChild } from '@angular/core';
|
|
2
|
+
import { NavigationEnd, Router } from '@angular/router';
|
|
3
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
|
+
import { filter } from 'rxjs';
|
|
5
|
+
import { GoodSidebarContainerComponent } from './sidebar';
|
|
6
|
+
import { GoodTopbarComponent, GoodTopbarMenuContainerComponent, GoodTopbarMobileMenuMode } from './topbar';
|
|
7
|
+
import { GoodMainViewComponent } from './main-view';
|
|
8
|
+
import { GoodMenuAction, GoodNotification, GoodSearchItem, GoodSidebarSection, GoodTopbarItem, GoodUser } from './models';
|
|
9
|
+
import { GoodNotificationHostComponent } from './notification-host';
|
|
10
|
+
|
|
11
|
+
@Component({
|
|
12
|
+
selector: 'good-app-layout',
|
|
13
|
+
standalone: true,
|
|
14
|
+
imports: [GoodSidebarContainerComponent, GoodTopbarComponent, GoodTopbarMenuContainerComponent, GoodMainViewComponent, GoodNotificationHostComponent],
|
|
15
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
16
|
+
template: `
|
|
17
|
+
<good-sidebar-container class="good-desktop-sidebar" [brand]="brand()" [brandLogoSrc]="brandLogoSrc()" [brandLogoDarkSrc]="brandLogoDarkSrc()" [sections]="sidebarSections()" [activeRoute]="activeRoute()" />
|
|
18
|
+
<div class="good-app-main">
|
|
19
|
+
<good-topbar [brand]="brand()" [brandLogoSrc]="brandLogoSrc()" [brandLogoDarkSrc]="brandLogoDarkSrc()" [brandMarkSrc]="brandMarkSrc()" [brandMarkDarkSrc]="brandMarkDarkSrc()" [showBrandIcon]="showBrandIcon()" [showMobileBrand]="showMobileBrand()" [items]="topbarItems()" [activeRoute]="activeRoute()" [mobileMenuMode]="mobileTopbarMenuMode()"
|
|
20
|
+
[user]="user()" [notifications]="notifications()" [searchItems]="searchItems()" [settingsActions]="settingsActions()" [avatarActions]="avatarActions()" [showThemeToggle]="showThemeToggle()" [showSettings]="showSettings()"
|
|
21
|
+
(menuToggle)="openDrawer()" />
|
|
22
|
+
<div class="good-app-page"><ng-content /></div>
|
|
23
|
+
</div>
|
|
24
|
+
<dialog #drawer class="good-sidebar-drawer" aria-label="Navigation" (click)="onBackdropClick($event)" (close)="onDrawerClose()">
|
|
25
|
+
<good-sidebar-container [brand]="brand()" [brandLogoSrc]="brandLogoSrc()" [brandLogoDarkSrc]="brandLogoDarkSrc()" [sections]="sidebarSections()" [activeRoute]="activeRoute()" />
|
|
26
|
+
@if (topbarItems().length && mobileTopbarMenuMode() === 'hidden') {
|
|
27
|
+
<nav class="good-drawer-topbar-nav" aria-label="More navigation">
|
|
28
|
+
<strong>Menu</strong><good-topbar-menu-container [items]="topbarItems()" [activeRoute]="activeRoute()" />
|
|
29
|
+
</nav>
|
|
30
|
+
}
|
|
31
|
+
<button type="button" class="good-drawer-close" aria-label="Close sidebar" (click)="closeDrawer()">Close</button>
|
|
32
|
+
</dialog>
|
|
33
|
+
<good-notification-host />
|
|
34
|
+
`,
|
|
35
|
+
host: { class: 'good-app-layout' },
|
|
36
|
+
})
|
|
37
|
+
export class GoodAppLayoutComponent {
|
|
38
|
+
private readonly router = inject(Router);
|
|
39
|
+
private readonly drawer = viewChild.required<ElementRef<HTMLDialogElement>>('drawer');
|
|
40
|
+
private returnFocus: HTMLElement | null = null;
|
|
41
|
+
|
|
42
|
+
readonly brand = input('GOODUI');
|
|
43
|
+
readonly brandLogoSrc = input('');
|
|
44
|
+
readonly brandLogoDarkSrc = input('');
|
|
45
|
+
readonly brandMarkSrc = input('');
|
|
46
|
+
readonly brandMarkDarkSrc = input('');
|
|
47
|
+
readonly showBrandIcon = input(false);
|
|
48
|
+
readonly showMobileBrand = input(true);
|
|
49
|
+
readonly sidebarSections = input<readonly GoodSidebarSection[]>([]);
|
|
50
|
+
readonly topbarItems = input<readonly GoodTopbarItem[]>([]);
|
|
51
|
+
readonly mobileTopbarMenuMode = input<GoodTopbarMobileMenuMode>('hidden');
|
|
52
|
+
readonly user = input<GoodUser | null>(null);
|
|
53
|
+
readonly notifications = input<readonly GoodNotification[]>([]);
|
|
54
|
+
readonly searchItems = input<readonly GoodSearchItem[]>([]);
|
|
55
|
+
readonly settingsActions = input<readonly GoodMenuAction[]>([]);
|
|
56
|
+
readonly showThemeToggle = input(true);
|
|
57
|
+
readonly showSettings = input(false);
|
|
58
|
+
readonly avatarActions = input<readonly GoodMenuAction[]>([]);
|
|
59
|
+
readonly activeRoute = signal('/');
|
|
60
|
+
|
|
61
|
+
constructor() {
|
|
62
|
+
this.activeRoute.set(this.router.url.split(/[?#]/)[0] || '/');
|
|
63
|
+
this.router.events.pipe(filter((event): event is NavigationEnd => event instanceof NavigationEnd), takeUntilDestroyed())
|
|
64
|
+
.subscribe(event => {
|
|
65
|
+
this.activeRoute.set(event.urlAfterRedirects.split(/[?#]/)[0] || '/');
|
|
66
|
+
if (this.drawer()?.nativeElement.open) this.closeDrawer();
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
openDrawer(): void {
|
|
71
|
+
this.returnFocus = document.activeElement as HTMLElement;
|
|
72
|
+
this.drawer().nativeElement.showModal();
|
|
73
|
+
}
|
|
74
|
+
closeDrawer(): void { this.drawer().nativeElement.close(); }
|
|
75
|
+
onBackdropClick(event: MouseEvent): void {
|
|
76
|
+
if (event.target === this.drawer().nativeElement) this.closeDrawer();
|
|
77
|
+
}
|
|
78
|
+
onDrawerClose(): void { this.returnFocus?.focus(); }
|
|
79
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { DOCUMENT } from '@angular/common';
|
|
2
|
+
import { ChangeDetectionStrategy, Component, ElementRef, booleanAttribute, computed, contentChild, effect, inject, input, model } from '@angular/core';
|
|
3
|
+
import { LucideChevronUp, LucidePanelRight, LucideX } from '@lucide/angular';
|
|
4
|
+
import { GoodButtonComponent } from './button';
|
|
5
|
+
|
|
6
|
+
export type GoodAssistantMainPadding = 'default' | 'none';
|
|
7
|
+
export type GoodAssistantPanelAppearance = 'default' | 'soft';
|
|
8
|
+
|
|
9
|
+
@Component({
|
|
10
|
+
selector: 'good-assistant-main', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush,
|
|
11
|
+
host: { class: 'good-assistant-main', '[attr.data-padding]': 'padding()' },
|
|
12
|
+
template: '<ng-content />',
|
|
13
|
+
})
|
|
14
|
+
export class GoodAssistantMainComponent {
|
|
15
|
+
readonly padding = input<GoodAssistantMainPadding>('default');
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@Component({
|
|
19
|
+
selector: 'good-assistant-header', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush,
|
|
20
|
+
host: { class: 'good-assistant-header' },
|
|
21
|
+
template: '<header><ng-content /></header>',
|
|
22
|
+
})
|
|
23
|
+
export class GoodAssistantHeaderComponent {}
|
|
24
|
+
|
|
25
|
+
@Component({
|
|
26
|
+
selector: 'good-assistant-body', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush,
|
|
27
|
+
host: { class: 'good-assistant-body' },
|
|
28
|
+
template: '<ng-content />',
|
|
29
|
+
})
|
|
30
|
+
export class GoodAssistantBodyComponent {}
|
|
31
|
+
|
|
32
|
+
@Component({
|
|
33
|
+
selector: 'good-assistant-footer', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush,
|
|
34
|
+
host: { class: 'good-assistant-footer' },
|
|
35
|
+
template: '<footer><ng-content /></footer>',
|
|
36
|
+
})
|
|
37
|
+
export class GoodAssistantFooterComponent {}
|
|
38
|
+
|
|
39
|
+
/** Optional compact content. Its presence selects the docked mobile presentation. */
|
|
40
|
+
@Component({
|
|
41
|
+
selector: 'good-assistant-mobile', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush,
|
|
42
|
+
host: { class: 'good-assistant-mobile' },
|
|
43
|
+
template: '<ng-content />',
|
|
44
|
+
})
|
|
45
|
+
export class GoodAssistantMobileComponent {}
|
|
46
|
+
|
|
47
|
+
let nextAssistantPanelId = 0;
|
|
48
|
+
|
|
49
|
+
/** A primary workspace with a contextual companion surface. */
|
|
50
|
+
@Component({
|
|
51
|
+
selector: 'good-assistant-panel',
|
|
52
|
+
standalone: true,
|
|
53
|
+
imports: [GoodButtonComponent],
|
|
54
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
55
|
+
host: {
|
|
56
|
+
class: 'good-assistant-panel',
|
|
57
|
+
'[attr.data-mobile-mode]': 'mobileMode()',
|
|
58
|
+
'[attr.data-appearance]': 'appearance()',
|
|
59
|
+
'[attr.data-open]': 'open()',
|
|
60
|
+
'[style.--good-assistant-width]': 'width()',
|
|
61
|
+
},
|
|
62
|
+
template: `
|
|
63
|
+
<ng-content select="good-assistant-main" />
|
|
64
|
+
<div class="good-assistant-backdrop" (click)="close()" aria-hidden="true"></div>
|
|
65
|
+
<good-button class="good-assistant-launcher" variant="outline" [icon]="panelIcon"
|
|
66
|
+
[iconOnly]="true" [ariaLabel]="'Open ' + label()" (click)="openPanel()" />
|
|
67
|
+
<aside class="good-assistant-surface" [id]="panelId" [attr.aria-label]="label()"
|
|
68
|
+
[attr.role]="isMobile() && open() ? 'dialog' : 'complementary'"
|
|
69
|
+
[attr.aria-modal]="isMobile() && open() ? 'true' : null"
|
|
70
|
+
(keydown)="onKeydown($event)">
|
|
71
|
+
<good-button class="good-assistant-close" variant="ghost" size="small" [icon]="closeIcon"
|
|
72
|
+
[iconOnly]="true" [ariaLabel]="'Close ' + label()" (click)="close()" />
|
|
73
|
+
<ng-content select="good-assistant-header" />
|
|
74
|
+
<ng-content select="good-assistant-body" />
|
|
75
|
+
<ng-content select="good-assistant-footer" />
|
|
76
|
+
</aside>
|
|
77
|
+
<div class="good-assistant-dock">
|
|
78
|
+
<ng-content select="good-assistant-mobile" />
|
|
79
|
+
<good-button variant="ghost" size="small" [icon]="expandIcon" [iconOnly]="true"
|
|
80
|
+
[ariaLabel]="'Expand ' + label()" (click)="openPanel()" />
|
|
81
|
+
</div>
|
|
82
|
+
`,
|
|
83
|
+
})
|
|
84
|
+
export class GoodAssistantPanelComponent {
|
|
85
|
+
private readonly document = inject(DOCUMENT);
|
|
86
|
+
private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);
|
|
87
|
+
private origin: HTMLElement | null = null;
|
|
88
|
+
readonly panelIcon = LucidePanelRight;
|
|
89
|
+
readonly closeIcon = LucideX;
|
|
90
|
+
readonly expandIcon = LucideChevronUp;
|
|
91
|
+
readonly panelId = `good-assistant-panel-${++nextAssistantPanelId}`;
|
|
92
|
+
|
|
93
|
+
readonly label = input('Assistant panel');
|
|
94
|
+
readonly appearance = input<GoodAssistantPanelAppearance>('default');
|
|
95
|
+
readonly width = input('300px');
|
|
96
|
+
readonly hideOnMobile = input(false, { transform: booleanAttribute });
|
|
97
|
+
readonly open = model(false);
|
|
98
|
+
readonly mobileContent = contentChild(GoodAssistantMobileComponent);
|
|
99
|
+
readonly mobileMode = computed(() => this.hideOnMobile() ? 'hidden' : this.mobileContent() ? 'dock' : 'drawer');
|
|
100
|
+
|
|
101
|
+
constructor() {
|
|
102
|
+
effect(() => {
|
|
103
|
+
if (!this.open() || !this.isMobile() || this.hideOnMobile()) return;
|
|
104
|
+
this.document.defaultView?.requestAnimationFrame(() =>
|
|
105
|
+
this.host.nativeElement.querySelector<HTMLElement>('.good-assistant-close button')?.focus());
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
isMobile(): boolean { return this.document.defaultView?.matchMedia('(max-width: 700px)').matches ?? false; }
|
|
110
|
+
|
|
111
|
+
openPanel(): void {
|
|
112
|
+
this.origin = this.document.activeElement as HTMLElement | null;
|
|
113
|
+
this.open.set(true);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
close(): void {
|
|
117
|
+
this.open.set(false);
|
|
118
|
+
queueMicrotask(() => this.origin?.isConnected && this.origin.focus());
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
onKeydown(event: KeyboardEvent): void {
|
|
122
|
+
if (!this.isMobile() || !this.open()) return;
|
|
123
|
+
if (event.key === 'Escape') { event.preventDefault(); this.close(); return; }
|
|
124
|
+
if (event.key !== 'Tab') return;
|
|
125
|
+
const surface = this.host.nativeElement.querySelector<HTMLElement>('.good-assistant-surface');
|
|
126
|
+
const focusable = [...(surface?.querySelectorAll<HTMLElement>('button:not([disabled]), a[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])') ?? [])]
|
|
127
|
+
.filter(element => element.getClientRects().length > 0);
|
|
128
|
+
if (!focusable.length) return;
|
|
129
|
+
const first = focusable[0], last = focusable[focusable.length - 1];
|
|
130
|
+
if (event.shiftKey && this.document.activeElement === first) { event.preventDefault(); last.focus(); }
|
|
131
|
+
else if (!event.shiftKey && this.document.activeElement === last) { event.preventDefault(); first.focus(); }
|
|
132
|
+
}
|
|
133
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, computed, input, output } from '@angular/core';
|
|
2
|
+
import { LucideDynamicIcon, LucideX } from '@lucide/angular';
|
|
3
|
+
import { GoodButtonIcon } from './models';
|
|
4
|
+
|
|
5
|
+
export type GoodBadgeColor = 'primary' | 'secondary' | 'destructive' | 'warning' | 'success' | 'info' | 'text';
|
|
6
|
+
export type GoodBadgeVariant = 'solid' | 'outline' | 'light';
|
|
7
|
+
export type GoodBadgeShape = 'pill' | 'square' | 'circle';
|
|
8
|
+
export type GoodBadgeSize = 'small' | 'medium' | 'default' | 'large';
|
|
9
|
+
|
|
10
|
+
@Component({
|
|
11
|
+
selector: 'good-badge',
|
|
12
|
+
standalone: true,
|
|
13
|
+
imports: [LucideDynamicIcon],
|
|
14
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
15
|
+
host: { class: 'good-badge' },
|
|
16
|
+
template: `
|
|
17
|
+
<span class="good-badge-content" [attr.data-color]="color()" [attr.data-variant]="variant()"
|
|
18
|
+
[attr.data-shape]="shape()" [attr.data-size]="size()">
|
|
19
|
+
@if (icon(); as iconData) { <svg class="good-badge-icon" [lucideIcon]="iconData" [size]="iconSize()" aria-hidden="true"></svg> }
|
|
20
|
+
@else if (iconSrc(); as source) { <img class="good-badge-icon" [src]="source" alt="" /> }
|
|
21
|
+
<span class="good-badge-label">{{ label() }}</span>
|
|
22
|
+
@if (removable()) {
|
|
23
|
+
<button class="good-badge-remove" type="button" [attr.aria-label]="removeLabel() || 'Remove ' + label()"
|
|
24
|
+
(click)="onRemove($event)"><svg [lucideIcon]="removeIcon" [size]="iconSize()" aria-hidden="true"></svg></button>
|
|
25
|
+
}
|
|
26
|
+
</span>
|
|
27
|
+
`,
|
|
28
|
+
})
|
|
29
|
+
export class GoodBadgeComponent {
|
|
30
|
+
readonly label = input.required<string>();
|
|
31
|
+
readonly color = input<GoodBadgeColor>('primary');
|
|
32
|
+
readonly variant = input<GoodBadgeVariant>('solid');
|
|
33
|
+
readonly shape = input<GoodBadgeShape>('pill');
|
|
34
|
+
readonly size = input<GoodBadgeSize>('default');
|
|
35
|
+
readonly icon = input<GoodButtonIcon>();
|
|
36
|
+
readonly iconSrc = input<string>();
|
|
37
|
+
readonly removable = input(false);
|
|
38
|
+
readonly removeLabel = input('');
|
|
39
|
+
readonly removed = output<void>();
|
|
40
|
+
readonly removeIcon = LucideX;
|
|
41
|
+
readonly iconSize = computed(() => ({ small: 12, medium: 14, default: 14, large: 16 })[this.size()]);
|
|
42
|
+
|
|
43
|
+
onRemove(event: MouseEvent): void {
|
|
44
|
+
event.stopPropagation();
|
|
45
|
+
this.removed.emit();
|
|
46
|
+
}
|
|
47
|
+
}
|