@masmarino/gabarit 3.1.1 → 4.0.1
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 +31 -25
- package/alert/README.md +1 -1
- package/app-shell/README.md +11 -4
- package/auth-activate/README.md +1 -1
- package/auth-login/README.md +1 -1
- package/auth-register/README.md +1 -1
- package/auth-reset-password/README.md +1 -1
- package/card/README.md +11 -12
- package/disclosure/README.md +1 -1
- package/empty-state/README.md +1 -1
- package/fesm2022/masmarino-gabarit-accordion.mjs +10 -10
- package/fesm2022/masmarino-gabarit-accordion.mjs.map +1 -1
- package/fesm2022/masmarino-gabarit-alert.mjs +5 -5
- package/fesm2022/masmarino-gabarit-alert.mjs.map +1 -1
- package/fesm2022/masmarino-gabarit-app-shell.mjs +10 -10
- package/fesm2022/masmarino-gabarit-app-shell.mjs.map +1 -1
- package/fesm2022/masmarino-gabarit-auth-activate.mjs +3 -3
- package/fesm2022/masmarino-gabarit-auth-login.mjs +3 -3
- package/fesm2022/masmarino-gabarit-auth-register.mjs +5 -5
- package/fesm2022/masmarino-gabarit-auth-register.mjs.map +1 -1
- package/fesm2022/masmarino-gabarit-auth-reset-password.mjs +3 -3
- package/fesm2022/masmarino-gabarit-auth.mjs +16 -16
- package/fesm2022/masmarino-gabarit-auth.mjs.map +1 -1
- package/fesm2022/masmarino-gabarit-autocomplete.mjs +5 -5
- package/fesm2022/masmarino-gabarit-autocomplete.mjs.map +1 -1
- package/fesm2022/masmarino-gabarit-avatar-group.mjs +5 -5
- package/fesm2022/masmarino-gabarit-avatar-group.mjs.map +1 -1
- package/fesm2022/masmarino-gabarit-avatar.mjs +3 -3
- package/fesm2022/masmarino-gabarit-badge.mjs +3 -3
- package/fesm2022/masmarino-gabarit-bar-chart.mjs +6 -6
- package/fesm2022/masmarino-gabarit-breadcrumb.mjs +3 -3
- package/fesm2022/masmarino-gabarit-button.mjs +3 -3
- package/fesm2022/masmarino-gabarit-card.mjs +13 -29
- package/fesm2022/masmarino-gabarit-card.mjs.map +1 -1
- package/fesm2022/masmarino-gabarit-chart.mjs +23 -23
- package/fesm2022/masmarino-gabarit-chart.mjs.map +1 -1
- package/fesm2022/masmarino-gabarit-checkbox-group.mjs +3 -3
- package/fesm2022/masmarino-gabarit-checkbox.mjs +3 -3
- package/fesm2022/masmarino-gabarit-command-palette.mjs +10 -10
- package/fesm2022/masmarino-gabarit-command-palette.mjs.map +1 -1
- package/fesm2022/masmarino-gabarit-confirm-danger-modal.mjs +3 -3
- package/fesm2022/masmarino-gabarit-copy-button.mjs +5 -5
- package/fesm2022/masmarino-gabarit-copy-button.mjs.map +1 -1
- package/fesm2022/masmarino-gabarit-copy-field.mjs +3 -3
- package/fesm2022/masmarino-gabarit-date-picker.mjs +10 -10
- package/fesm2022/masmarino-gabarit-date-picker.mjs.map +1 -1
- package/fesm2022/masmarino-gabarit-description-list.mjs +3 -3
- package/fesm2022/masmarino-gabarit-dimension-card.mjs +3 -3
- package/fesm2022/masmarino-gabarit-disclosure.mjs +6 -6
- package/fesm2022/masmarino-gabarit-disclosure.mjs.map +1 -1
- package/fesm2022/masmarino-gabarit-divider.mjs +3 -3
- package/fesm2022/masmarino-gabarit-docs.mjs +27 -28
- package/fesm2022/masmarino-gabarit-docs.mjs.map +1 -1
- package/fesm2022/masmarino-gabarit-drawer.mjs +5 -5
- package/fesm2022/masmarino-gabarit-drawer.mjs.map +1 -1
- package/fesm2022/masmarino-gabarit-empty-state.mjs +5 -5
- package/fesm2022/masmarino-gabarit-empty-state.mjs.map +1 -1
- package/fesm2022/masmarino-gabarit-file-upload.mjs +3 -3
- package/fesm2022/masmarino-gabarit-format.mjs +9 -9
- package/fesm2022/masmarino-gabarit-funnel-chart.mjs +3 -3
- package/fesm2022/masmarino-gabarit-gauge-bar.mjs +3 -3
- package/fesm2022/masmarino-gabarit-git-field.mjs +5 -5
- package/fesm2022/masmarino-gabarit-git-field.mjs.map +1 -1
- package/fesm2022/masmarino-gabarit-icon-marker.mjs +3 -3
- package/fesm2022/masmarino-gabarit-icon.mjs +6 -6
- package/fesm2022/masmarino-gabarit-input.mjs +3 -3
- package/fesm2022/masmarino-gabarit-job-graph.mjs +5 -5
- package/fesm2022/masmarino-gabarit-job-graph.mjs.map +1 -1
- package/fesm2022/masmarino-gabarit-job-status.mjs +3 -3
- package/fesm2022/masmarino-gabarit-line-chart.mjs +6 -6
- package/fesm2022/masmarino-gabarit-list-card.mjs +5 -5
- package/fesm2022/masmarino-gabarit-list-card.mjs.map +1 -1
- package/fesm2022/masmarino-gabarit-list-row.mjs +5 -5
- package/fesm2022/masmarino-gabarit-list-row.mjs.map +1 -1
- package/fesm2022/masmarino-gabarit-list-toolbar.mjs +3 -3
- package/fesm2022/masmarino-gabarit-menu.mjs +11 -11
- package/fesm2022/masmarino-gabarit-menu.mjs.map +1 -1
- package/fesm2022/masmarino-gabarit-mfa-enrollment.mjs +13 -14
- package/fesm2022/masmarino-gabarit-mfa-enrollment.mjs.map +1 -1
- package/fesm2022/masmarino-gabarit-mfa-settings.mjs +7 -8
- package/fesm2022/masmarino-gabarit-mfa-settings.mjs.map +1 -1
- package/fesm2022/masmarino-gabarit-modal.mjs +5 -5
- package/fesm2022/masmarino-gabarit-modal.mjs.map +1 -1
- package/fesm2022/masmarino-gabarit-nav-tabs.mjs +10 -10
- package/fesm2022/masmarino-gabarit-nav-tabs.mjs.map +1 -1
- package/fesm2022/masmarino-gabarit-notification-dot.mjs +3 -3
- package/fesm2022/masmarino-gabarit-page-header.mjs +5 -5
- package/fesm2022/masmarino-gabarit-page-header.mjs.map +1 -1
- package/fesm2022/masmarino-gabarit-page-layout.mjs +5 -5
- package/fesm2022/masmarino-gabarit-page-layout.mjs.map +1 -1
- package/fesm2022/masmarino-gabarit-pagination.mjs +3 -3
- package/fesm2022/masmarino-gabarit-panel.mjs +5 -5
- package/fesm2022/masmarino-gabarit-panel.mjs.map +1 -1
- package/fesm2022/masmarino-gabarit-passkey-settings.mjs +7 -9
- package/fesm2022/masmarino-gabarit-passkey-settings.mjs.map +1 -1
- package/fesm2022/masmarino-gabarit-pie-chart.mjs +3 -3
- package/fesm2022/masmarino-gabarit-popover.mjs +5 -5
- package/fesm2022/masmarino-gabarit-popover.mjs.map +1 -1
- package/fesm2022/masmarino-gabarit-radio-group.mjs +3 -3
- package/fesm2022/masmarino-gabarit-save-status.mjs +3 -3
- package/fesm2022/masmarino-gabarit-search-bar.mjs +5 -5
- package/fesm2022/masmarino-gabarit-search-bar.mjs.map +1 -1
- package/fesm2022/masmarino-gabarit-secret-reveal.mjs +3 -3
- package/fesm2022/masmarino-gabarit-segmented-control.mjs +3 -3
- package/fesm2022/masmarino-gabarit-select.mjs +5 -5
- package/fesm2022/masmarino-gabarit-select.mjs.map +1 -1
- package/fesm2022/masmarino-gabarit-skeleton-list.mjs +7 -26
- package/fesm2022/masmarino-gabarit-skeleton-list.mjs.map +1 -1
- package/fesm2022/masmarino-gabarit-skeleton.mjs +3 -3
- package/fesm2022/masmarino-gabarit-slider.mjs +3 -3
- package/fesm2022/masmarino-gabarit-sparkline.mjs +5 -5
- package/fesm2022/masmarino-gabarit-sparkline.mjs.map +1 -1
- package/fesm2022/masmarino-gabarit-spinner.mjs +3 -3
- package/fesm2022/masmarino-gabarit-stat-grid.mjs +5 -5
- package/fesm2022/masmarino-gabarit-stat-grid.mjs.map +1 -1
- package/fesm2022/masmarino-gabarit-stat-tile.mjs +8 -8
- package/fesm2022/masmarino-gabarit-stat-tile.mjs.map +1 -1
- package/fesm2022/masmarino-gabarit-stepper.mjs +3 -3
- package/fesm2022/masmarino-gabarit-switch.mjs +3 -3
- package/fesm2022/masmarino-gabarit-table.mjs +3 -3
- package/fesm2022/masmarino-gabarit-tabs.mjs +8 -8
- package/fesm2022/masmarino-gabarit-tabs.mjs.map +1 -1
- package/fesm2022/masmarino-gabarit-tag-input.mjs +3 -3
- package/fesm2022/masmarino-gabarit-tag.mjs +3 -3
- package/fesm2022/masmarino-gabarit-textarea.mjs +3 -3
- package/fesm2022/masmarino-gabarit-timeline-chart.mjs +6 -6
- package/fesm2022/masmarino-gabarit-toaster.mjs +8 -8
- package/fesm2022/masmarino-gabarit-toaster.mjs.map +1 -1
- package/fesm2022/masmarino-gabarit-tooltip.mjs +5 -5
- package/fesm2022/masmarino-gabarit-tooltip.mjs.map +1 -1
- package/fesm2022/masmarino-gabarit-tree.mjs +5 -5
- package/fesm2022/masmarino-gabarit-tree.mjs.map +1 -1
- package/fesm2022/masmarino-gabarit-user-chip.mjs +3 -3
- package/fesm2022/masmarino-gabarit.mjs +1 -1
- package/fesm2022/masmarino-gabarit.mjs.map +1 -1
- package/git-field/README.md +2 -2
- package/list-row/README.md +3 -5
- package/modal/README.md +1 -1
- package/nav-tabs/README.md +3 -2
- package/package.json +1 -1
- package/page-header/README.md +2 -2
- package/page-layout/README.md +1 -1
- package/panel/README.md +2 -3
- package/skeleton-list/README.md +1 -2
- package/src/lib/tokens/_base.scss +5 -6
- package/src/lib/tokens/_depth.scss +1 -1
- package/src/lib/tokens/_glass.scss +87 -0
- package/src/lib/tokens/_grounds.scss +283 -0
- package/src/lib/tokens/_semantic.scss +0 -2
- package/src/lib/tokens/_themes.scss +93 -23
- package/src/lib/tokens/_utilities.scss +53 -13
- package/src/lib/tokens/index.scss +2 -0
- package/types/masmarino-gabarit-card.d.ts +1 -8
- package/types/masmarino-gabarit-disclosure.d.ts +1 -1
- package/types/masmarino-gabarit-git-field.d.ts +1 -1
- package/types/masmarino-gabarit-skeleton-list.d.ts +0 -6
- package/types/masmarino-gabarit.d.ts +3 -3
|
@@ -21,7 +21,7 @@ var EmptyState = class EmptyState {
|
|
|
21
21
|
}
|
|
22
22
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
23
23
|
minVersion: "12.0.0",
|
|
24
|
-
version: "22.2.
|
|
24
|
+
version: "22.2.6",
|
|
25
25
|
ngImport: i0,
|
|
26
26
|
type: EmptyState,
|
|
27
27
|
deps: [],
|
|
@@ -29,7 +29,7 @@ var EmptyState = class EmptyState {
|
|
|
29
29
|
});
|
|
30
30
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
31
31
|
minVersion: "17.0.0",
|
|
32
|
-
version: "22.2.
|
|
32
|
+
version: "22.2.6",
|
|
33
33
|
type: EmptyState,
|
|
34
34
|
isStandalone: true,
|
|
35
35
|
selector: "gbt-empty-state",
|
|
@@ -107,7 +107,7 @@ var EmptyState = class EmptyState {
|
|
|
107
107
|
}],
|
|
108
108
|
ngImport: i0,
|
|
109
109
|
template: "<div\n class=\"gbt-empty-state\"\n [attr.data-size]=\"size() === 'default' ? null : size()\"\n [attr.data-tone]=\"tone() === 'default' ? null : tone()\"\n>\n @if (illustration()) {\n <div class=\"gbt-empty-state__illustration\" aria-hidden=\"true\">\n @switch (illustration()) {\n @case ('folder') {\n <svg\n viewBox=\"0 0 96 96\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <rect x=\"16\" y=\"38\" width=\"64\" height=\"40\" rx=\"4\" />\n <path d=\"M16 38 v-8a4 4 0 0 1 4-4h16l8 8h28a4 4 0 0 1 4 4\" />\n <rect\n x=\"34\"\n y=\"14\"\n width=\"16\"\n height=\"20\"\n rx=\"2\"\n transform=\"rotate(-8 42 24)\"\n opacity=\"0.55\"\n />\n <rect\n x=\"50\"\n y=\"16\"\n width=\"16\"\n height=\"20\"\n rx=\"2\"\n transform=\"rotate(6 58 26)\"\n opacity=\"0.55\"\n />\n </svg>\n }\n @case ('star') {\n <svg\n viewBox=\"0 0 96 96\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path\n d=\"M48,18 L55.6,37.5 L76.5,38.7 L60.4,52 L65.6,72.3 L48,61 L30.4,72.3 L35.6,52 L19.5,38.7 L40.4,37.5 Z\"\n />\n <path d=\"M78,14 L81,20 L78,26 L75,20 Z\" opacity=\"0.55\" />\n <path d=\"M16,64 L19,70 L16,76 L13,70 Z\" opacity=\"0.55\" />\n </svg>\n }\n @case ('checklist') {\n <svg\n viewBox=\"0 0 96 96\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <rect x=\"24\" y=\"18\" width=\"48\" height=\"64\" rx=\"6\" />\n <rect x=\"38\" y=\"12\" width=\"20\" height=\"10\" rx=\"3\" />\n <line x1=\"34\" y1=\"38\" x2=\"62\" y2=\"38\" />\n <path d=\"M32 50 l4 4 l8-8\" />\n <line x1=\"46\" y1=\"52\" x2=\"62\" y2=\"52\" />\n <line x1=\"34\" y1=\"66\" x2=\"62\" y2=\"66\" opacity=\"0.55\" />\n </svg>\n }\n @case ('merge') {\n <svg\n viewBox=\"0 0 96 96\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <circle cx=\"24\" cy=\"22\" r=\"7\" />\n <circle cx=\"72\" cy=\"22\" r=\"7\" />\n <circle cx=\"48\" cy=\"76\" r=\"8\" />\n <path d=\"M24 29 V50 Q24 69 39 72\" />\n <path d=\"M72 29 V50 Q72 69 57 72\" />\n </svg>\n }\n @case ('pipeline') {\n <svg\n viewBox=\"0 0 96 96\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <circle cx=\"22\" cy=\"68\" r=\"12\" />\n <path d=\"M17 60 L29 68 L17 76 Z\" fill=\"currentColor\" stroke=\"none\" />\n <path d=\"M29 58 L44 38\" />\n <circle cx=\"50\" cy=\"30\" r=\"10\" />\n <path d=\"M56 38 L70 54\" />\n <circle cx=\"76\" cy=\"62\" r=\"10\" />\n </svg>\n }\n @case ('tag') {\n <svg\n viewBox=\"0 0 96 96\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"M18 20 H54 L82 48 L54 76 H18 Q14 76 14 72 V24 Q14 20 18 20 Z\" />\n <circle cx=\"34\" cy=\"36\" r=\"5\" />\n </svg>\n }\n @case ('book') {\n <svg\n viewBox=\"0 0 96 96\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"M48 26 Q34 16 16 20 V72 Q34 68 48 78 Q62 68 80 72 V20 Q62 16 48 26 Z\" />\n <line x1=\"24\" y1=\"32\" x2=\"40\" y2=\"30\" />\n <line x1=\"24\" y1=\"42\" x2=\"40\" y2=\"40\" />\n <line x1=\"56\" y1=\"30\" x2=\"72\" y2=\"32\" />\n <line x1=\"56\" y1=\"40\" x2=\"72\" y2=\"42\" />\n </svg>\n }\n @case ('server') {\n <svg\n viewBox=\"0 0 96 96\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <rect x=\"14\" y=\"16\" width=\"68\" height=\"26\" rx=\"5\" />\n <rect x=\"14\" y=\"54\" width=\"68\" height=\"26\" rx=\"5\" />\n <circle cx=\"26\" cy=\"29\" r=\"3\" fill=\"currentColor\" stroke=\"none\" />\n <circle cx=\"26\" cy=\"67\" r=\"3\" fill=\"currentColor\" stroke=\"none\" />\n <line x1=\"38\" y1=\"29\" x2=\"70\" y2=\"29\" opacity=\"0.55\" />\n <line x1=\"38\" y1=\"67\" x2=\"70\" y2=\"67\" opacity=\"0.55\" />\n </svg>\n }\n }\n </div>\n } @else if (icon()) {\n <div class=\"gbt-empty-state__icon\" aria-hidden=\"true\"><gbt-icon [name]=\"icon()!\" /></div>\n }\n @switch (headingLevel()) {\n @case (1) {\n <h1\n #headingEl\n class=\"gbt-empty-state__heading\"\n [attr.id]=\"headingId()\"\n [attr.tabindex]=\"headingFocusable() ? -1 : null\"\n >\n <ng-container *ngTemplateOutlet=\"headingText\" />\n </h1>\n }\n @case (2) {\n <h2\n #headingEl\n class=\"gbt-empty-state__heading\"\n [attr.id]=\"headingId()\"\n [attr.tabindex]=\"headingFocusable() ? -1 : null\"\n >\n <ng-container *ngTemplateOutlet=\"headingText\" />\n </h2>\n }\n @case (3) {\n <h3\n #headingEl\n class=\"gbt-empty-state__heading\"\n [attr.id]=\"headingId()\"\n [attr.tabindex]=\"headingFocusable() ? -1 : null\"\n >\n <ng-container *ngTemplateOutlet=\"headingText\" />\n </h3>\n }\n @case (4) {\n <h4\n #headingEl\n class=\"gbt-empty-state__heading\"\n [attr.id]=\"headingId()\"\n [attr.tabindex]=\"headingFocusable() ? -1 : null\"\n >\n <ng-container *ngTemplateOutlet=\"headingText\" />\n </h4>\n }\n @case (5) {\n <h5\n #headingEl\n class=\"gbt-empty-state__heading\"\n [attr.id]=\"headingId()\"\n [attr.tabindex]=\"headingFocusable() ? -1 : null\"\n >\n <ng-container *ngTemplateOutlet=\"headingText\" />\n </h5>\n }\n @case (6) {\n <h6\n #headingEl\n class=\"gbt-empty-state__heading\"\n [attr.id]=\"headingId()\"\n [attr.tabindex]=\"headingFocusable() ? -1 : null\"\n >\n <ng-container *ngTemplateOutlet=\"headingText\" />\n </h6>\n }\n @default {\n <p\n #headingEl\n class=\"gbt-empty-state__heading\"\n [attr.id]=\"headingId()\"\n [attr.tabindex]=\"headingFocusable() ? -1 : null\"\n >\n <ng-container *ngTemplateOutlet=\"headingText\" />\n </p>\n }\n }\n @if (message()) {\n <p class=\"gbt-empty-state__message\">{{ message() }}</p>\n }\n <div class=\"gbt-empty-state__action\">\n <ng-content />\n </div>\n</div>\n<ng-template #headingText>{{ heading() }}</ng-template>\n",
|
|
110
|
-
styles: [":host{display:block}.gbt-empty-state{display:flex;flex-direction:column;align-items:center;text-align:center;gap:.75rem;padding:3rem 1.5rem}.gbt-empty-state__illustration{width:6rem;height:6rem;color:var(--text-discret)}.gbt-empty-state__illustration svg{width:100%;height:100%}.gbt-empty-state__heading{font-family:var(--gbt-font-display, var(--font-display));margin:0;font-size:1rem;font-weight:600;color:var(--text-primary)}.gbt-empty-state__heading:focus{outline:none}.gbt-empty-state__message{margin:0;max-width:32rem;color:var(--text-secondary);font-size:.875rem}.gbt-empty-state__action:empty{display:none}.gbt-empty-state__icon{display:inline-flex;flex:none;align-items:center;justify-content:center;box-sizing:border-box;width:3.25rem;height:3.25rem;border-radius:50%;background:
|
|
110
|
+
styles: [":host{display:block}.gbt-empty-state{display:flex;flex-direction:column;align-items:center;text-align:center;gap:.75rem;padding:3rem 1.5rem}.gbt-empty-state__illustration{width:6rem;height:6rem;color:var(--text-discret)}.gbt-empty-state__illustration svg{width:100%;height:100%}.gbt-empty-state__heading{font-family:var(--gbt-font-display, var(--font-display));margin:0;font-size:1rem;font-weight:600;color:var(--text-primary)}.gbt-empty-state__heading:focus{outline:none}.gbt-empty-state__message{margin:0;max-width:32rem;color:var(--text-secondary);font-size:.875rem}.gbt-empty-state__action:empty{display:none}.gbt-empty-state__icon{display:inline-flex;flex:none;align-items:center;justify-content:center;box-sizing:border-box;width:3.25rem;height:3.25rem;border-radius:50%;background:var(--gbt-glass-thin);box-shadow:var(--gbt-glass-rim-light);color:var(--text-secondary);font-size:1.375rem}.gbt-empty-state[data-size=compact]{gap:.25rem;padding:2rem 1.5rem 2.25rem}.gbt-empty-state[data-size=compact] .gbt-empty-state__illustration{width:4rem;height:4rem;margin-bottom:.25rem}.gbt-empty-state[data-size=compact] .gbt-empty-state__icon{width:2.5rem;height:2.5rem;margin-bottom:.5rem;font-size:.875rem}.gbt-empty-state[data-size=compact] .gbt-empty-state__heading{font-size:.9375rem;line-height:1.5rem}.gbt-empty-state[data-size=compact] .gbt-empty-state__message{max-width:28rem;font-size:.8125rem;line-height:1.25rem}.gbt-empty-state[data-size=compact] .gbt-empty-state__action{margin-top:.5rem}.gbt-empty-state[data-tone=error] .gbt-empty-state__icon{background:var(--color-error-bg);color:var(--color-error-bg-text)}.gbt-empty-state[data-tone=error] .gbt-empty-state__illustration{color:var(--color-error-text)}\n"],
|
|
111
111
|
dependencies: [{
|
|
112
112
|
kind: "component",
|
|
113
113
|
type: Icon,
|
|
@@ -128,7 +128,7 @@ var EmptyState = class EmptyState {
|
|
|
128
128
|
};
|
|
129
129
|
i0.ɵɵngDeclareClassMetadata({
|
|
130
130
|
minVersion: "12.0.0",
|
|
131
|
-
version: "22.2.
|
|
131
|
+
version: "22.2.6",
|
|
132
132
|
ngImport: i0,
|
|
133
133
|
type: EmptyState,
|
|
134
134
|
decorators: [{
|
|
@@ -139,7 +139,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
139
139
|
imports: [Icon, NgTemplateOutlet],
|
|
140
140
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
141
141
|
template: "<div\n class=\"gbt-empty-state\"\n [attr.data-size]=\"size() === 'default' ? null : size()\"\n [attr.data-tone]=\"tone() === 'default' ? null : tone()\"\n>\n @if (illustration()) {\n <div class=\"gbt-empty-state__illustration\" aria-hidden=\"true\">\n @switch (illustration()) {\n @case ('folder') {\n <svg\n viewBox=\"0 0 96 96\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <rect x=\"16\" y=\"38\" width=\"64\" height=\"40\" rx=\"4\" />\n <path d=\"M16 38 v-8a4 4 0 0 1 4-4h16l8 8h28a4 4 0 0 1 4 4\" />\n <rect\n x=\"34\"\n y=\"14\"\n width=\"16\"\n height=\"20\"\n rx=\"2\"\n transform=\"rotate(-8 42 24)\"\n opacity=\"0.55\"\n />\n <rect\n x=\"50\"\n y=\"16\"\n width=\"16\"\n height=\"20\"\n rx=\"2\"\n transform=\"rotate(6 58 26)\"\n opacity=\"0.55\"\n />\n </svg>\n }\n @case ('star') {\n <svg\n viewBox=\"0 0 96 96\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path\n d=\"M48,18 L55.6,37.5 L76.5,38.7 L60.4,52 L65.6,72.3 L48,61 L30.4,72.3 L35.6,52 L19.5,38.7 L40.4,37.5 Z\"\n />\n <path d=\"M78,14 L81,20 L78,26 L75,20 Z\" opacity=\"0.55\" />\n <path d=\"M16,64 L19,70 L16,76 L13,70 Z\" opacity=\"0.55\" />\n </svg>\n }\n @case ('checklist') {\n <svg\n viewBox=\"0 0 96 96\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <rect x=\"24\" y=\"18\" width=\"48\" height=\"64\" rx=\"6\" />\n <rect x=\"38\" y=\"12\" width=\"20\" height=\"10\" rx=\"3\" />\n <line x1=\"34\" y1=\"38\" x2=\"62\" y2=\"38\" />\n <path d=\"M32 50 l4 4 l8-8\" />\n <line x1=\"46\" y1=\"52\" x2=\"62\" y2=\"52\" />\n <line x1=\"34\" y1=\"66\" x2=\"62\" y2=\"66\" opacity=\"0.55\" />\n </svg>\n }\n @case ('merge') {\n <svg\n viewBox=\"0 0 96 96\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <circle cx=\"24\" cy=\"22\" r=\"7\" />\n <circle cx=\"72\" cy=\"22\" r=\"7\" />\n <circle cx=\"48\" cy=\"76\" r=\"8\" />\n <path d=\"M24 29 V50 Q24 69 39 72\" />\n <path d=\"M72 29 V50 Q72 69 57 72\" />\n </svg>\n }\n @case ('pipeline') {\n <svg\n viewBox=\"0 0 96 96\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <circle cx=\"22\" cy=\"68\" r=\"12\" />\n <path d=\"M17 60 L29 68 L17 76 Z\" fill=\"currentColor\" stroke=\"none\" />\n <path d=\"M29 58 L44 38\" />\n <circle cx=\"50\" cy=\"30\" r=\"10\" />\n <path d=\"M56 38 L70 54\" />\n <circle cx=\"76\" cy=\"62\" r=\"10\" />\n </svg>\n }\n @case ('tag') {\n <svg\n viewBox=\"0 0 96 96\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"M18 20 H54 L82 48 L54 76 H18 Q14 76 14 72 V24 Q14 20 18 20 Z\" />\n <circle cx=\"34\" cy=\"36\" r=\"5\" />\n </svg>\n }\n @case ('book') {\n <svg\n viewBox=\"0 0 96 96\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"M48 26 Q34 16 16 20 V72 Q34 68 48 78 Q62 68 80 72 V20 Q62 16 48 26 Z\" />\n <line x1=\"24\" y1=\"32\" x2=\"40\" y2=\"30\" />\n <line x1=\"24\" y1=\"42\" x2=\"40\" y2=\"40\" />\n <line x1=\"56\" y1=\"30\" x2=\"72\" y2=\"32\" />\n <line x1=\"56\" y1=\"40\" x2=\"72\" y2=\"42\" />\n </svg>\n }\n @case ('server') {\n <svg\n viewBox=\"0 0 96 96\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <rect x=\"14\" y=\"16\" width=\"68\" height=\"26\" rx=\"5\" />\n <rect x=\"14\" y=\"54\" width=\"68\" height=\"26\" rx=\"5\" />\n <circle cx=\"26\" cy=\"29\" r=\"3\" fill=\"currentColor\" stroke=\"none\" />\n <circle cx=\"26\" cy=\"67\" r=\"3\" fill=\"currentColor\" stroke=\"none\" />\n <line x1=\"38\" y1=\"29\" x2=\"70\" y2=\"29\" opacity=\"0.55\" />\n <line x1=\"38\" y1=\"67\" x2=\"70\" y2=\"67\" opacity=\"0.55\" />\n </svg>\n }\n }\n </div>\n } @else if (icon()) {\n <div class=\"gbt-empty-state__icon\" aria-hidden=\"true\"><gbt-icon [name]=\"icon()!\" /></div>\n }\n @switch (headingLevel()) {\n @case (1) {\n <h1\n #headingEl\n class=\"gbt-empty-state__heading\"\n [attr.id]=\"headingId()\"\n [attr.tabindex]=\"headingFocusable() ? -1 : null\"\n >\n <ng-container *ngTemplateOutlet=\"headingText\" />\n </h1>\n }\n @case (2) {\n <h2\n #headingEl\n class=\"gbt-empty-state__heading\"\n [attr.id]=\"headingId()\"\n [attr.tabindex]=\"headingFocusable() ? -1 : null\"\n >\n <ng-container *ngTemplateOutlet=\"headingText\" />\n </h2>\n }\n @case (3) {\n <h3\n #headingEl\n class=\"gbt-empty-state__heading\"\n [attr.id]=\"headingId()\"\n [attr.tabindex]=\"headingFocusable() ? -1 : null\"\n >\n <ng-container *ngTemplateOutlet=\"headingText\" />\n </h3>\n }\n @case (4) {\n <h4\n #headingEl\n class=\"gbt-empty-state__heading\"\n [attr.id]=\"headingId()\"\n [attr.tabindex]=\"headingFocusable() ? -1 : null\"\n >\n <ng-container *ngTemplateOutlet=\"headingText\" />\n </h4>\n }\n @case (5) {\n <h5\n #headingEl\n class=\"gbt-empty-state__heading\"\n [attr.id]=\"headingId()\"\n [attr.tabindex]=\"headingFocusable() ? -1 : null\"\n >\n <ng-container *ngTemplateOutlet=\"headingText\" />\n </h5>\n }\n @case (6) {\n <h6\n #headingEl\n class=\"gbt-empty-state__heading\"\n [attr.id]=\"headingId()\"\n [attr.tabindex]=\"headingFocusable() ? -1 : null\"\n >\n <ng-container *ngTemplateOutlet=\"headingText\" />\n </h6>\n }\n @default {\n <p\n #headingEl\n class=\"gbt-empty-state__heading\"\n [attr.id]=\"headingId()\"\n [attr.tabindex]=\"headingFocusable() ? -1 : null\"\n >\n <ng-container *ngTemplateOutlet=\"headingText\" />\n </p>\n }\n }\n @if (message()) {\n <p class=\"gbt-empty-state__message\">{{ message() }}</p>\n }\n <div class=\"gbt-empty-state__action\">\n <ng-content />\n </div>\n</div>\n<ng-template #headingText>{{ heading() }}</ng-template>\n",
|
|
142
|
-
styles: [":host{display:block}.gbt-empty-state{display:flex;flex-direction:column;align-items:center;text-align:center;gap:.75rem;padding:3rem 1.5rem}.gbt-empty-state__illustration{width:6rem;height:6rem;color:var(--text-discret)}.gbt-empty-state__illustration svg{width:100%;height:100%}.gbt-empty-state__heading{font-family:var(--gbt-font-display, var(--font-display));margin:0;font-size:1rem;font-weight:600;color:var(--text-primary)}.gbt-empty-state__heading:focus{outline:none}.gbt-empty-state__message{margin:0;max-width:32rem;color:var(--text-secondary);font-size:.875rem}.gbt-empty-state__action:empty{display:none}.gbt-empty-state__icon{display:inline-flex;flex:none;align-items:center;justify-content:center;box-sizing:border-box;width:3.25rem;height:3.25rem;border-radius:50%;background:
|
|
142
|
+
styles: [":host{display:block}.gbt-empty-state{display:flex;flex-direction:column;align-items:center;text-align:center;gap:.75rem;padding:3rem 1.5rem}.gbt-empty-state__illustration{width:6rem;height:6rem;color:var(--text-discret)}.gbt-empty-state__illustration svg{width:100%;height:100%}.gbt-empty-state__heading{font-family:var(--gbt-font-display, var(--font-display));margin:0;font-size:1rem;font-weight:600;color:var(--text-primary)}.gbt-empty-state__heading:focus{outline:none}.gbt-empty-state__message{margin:0;max-width:32rem;color:var(--text-secondary);font-size:.875rem}.gbt-empty-state__action:empty{display:none}.gbt-empty-state__icon{display:inline-flex;flex:none;align-items:center;justify-content:center;box-sizing:border-box;width:3.25rem;height:3.25rem;border-radius:50%;background:var(--gbt-glass-thin);box-shadow:var(--gbt-glass-rim-light);color:var(--text-secondary);font-size:1.375rem}.gbt-empty-state[data-size=compact]{gap:.25rem;padding:2rem 1.5rem 2.25rem}.gbt-empty-state[data-size=compact] .gbt-empty-state__illustration{width:4rem;height:4rem;margin-bottom:.25rem}.gbt-empty-state[data-size=compact] .gbt-empty-state__icon{width:2.5rem;height:2.5rem;margin-bottom:.5rem;font-size:.875rem}.gbt-empty-state[data-size=compact] .gbt-empty-state__heading{font-size:.9375rem;line-height:1.5rem}.gbt-empty-state[data-size=compact] .gbt-empty-state__message{max-width:28rem;font-size:.8125rem;line-height:1.25rem}.gbt-empty-state[data-size=compact] .gbt-empty-state__action{margin-top:.5rem}.gbt-empty-state[data-tone=error] .gbt-empty-state__icon{background:var(--color-error-bg);color:var(--color-error-bg-text)}.gbt-empty-state[data-tone=error] .gbt-empty-state__illustration{color:var(--color-error-text)}\n"]
|
|
143
143
|
}]
|
|
144
144
|
}],
|
|
145
145
|
propDecorators: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"masmarino-gabarit-empty-state.mjs","names":[],"sources":["../../../projects/gabarit/empty-state/empty-state.ts","../../../projects/gabarit/empty-state/empty-state.html"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n booleanAttribute,\n input,\n viewChild,\n} from '@angular/core'\nimport { NgTemplateOutlet } from '@angular/common'\nimport { Icon } from '@masmarino/gabarit/icon'\n\nexport type EmptyStateIllustration =\n 'folder' | 'star' | 'checklist' | 'merge' | 'pipeline' | 'tag' | 'book' | 'server'\n\nexport type EmptyStateSize = 'default' | 'compact'\nexport type EmptyStateTone = 'default' | 'error'\nexport type EmptyStateHeadingLevel = 1 | 2 | 3 | 4 | 5 | 6\n\n@Component({\n selector: 'gbt-empty-state',\n standalone: true,\n imports: [Icon, NgTemplateOutlet],\n templateUrl: './empty-state.html',\n styleUrl: './empty-state.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class EmptyState {\n illustration = input<EmptyStateIllustration | null | undefined>(null)\n heading = input.required<string>()\n message = input<string>('')\n\n icon = input<string | null>(null)\n size = input<EmptyStateSize>('default')\n tone = input<EmptyStateTone>('default')\n headingLevel = input<EmptyStateHeadingLevel | null>(null)\n headingId = input<string | null>(null)\n headingFocusable = input(false, { transform: booleanAttribute })\n\n private readonly headingEl = viewChild<ElementRef<HTMLElement>>('headingEl')\n\n focusHeading(): void {\n this.headingEl()?.nativeElement.focus()\n }\n}\n","<div\n class=\"gbt-empty-state\"\n [attr.data-size]=\"size() === 'default' ? null : size()\"\n [attr.data-tone]=\"tone() === 'default' ? null : tone()\"\n>\n @if (illustration()) {\n <div class=\"gbt-empty-state__illustration\" aria-hidden=\"true\">\n @switch (illustration()) {\n @case ('folder') {\n <svg\n viewBox=\"0 0 96 96\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <rect x=\"16\" y=\"38\" width=\"64\" height=\"40\" rx=\"4\" />\n <path d=\"M16 38 v-8a4 4 0 0 1 4-4h16l8 8h28a4 4 0 0 1 4 4\" />\n <rect\n x=\"34\"\n y=\"14\"\n width=\"16\"\n height=\"20\"\n rx=\"2\"\n transform=\"rotate(-8 42 24)\"\n opacity=\"0.55\"\n />\n <rect\n x=\"50\"\n y=\"16\"\n width=\"16\"\n height=\"20\"\n rx=\"2\"\n transform=\"rotate(6 58 26)\"\n opacity=\"0.55\"\n />\n </svg>\n }\n @case ('star') {\n <svg\n viewBox=\"0 0 96 96\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path\n d=\"M48,18 L55.6,37.5 L76.5,38.7 L60.4,52 L65.6,72.3 L48,61 L30.4,72.3 L35.6,52 L19.5,38.7 L40.4,37.5 Z\"\n />\n <path d=\"M78,14 L81,20 L78,26 L75,20 Z\" opacity=\"0.55\" />\n <path d=\"M16,64 L19,70 L16,76 L13,70 Z\" opacity=\"0.55\" />\n </svg>\n }\n @case ('checklist') {\n <svg\n viewBox=\"0 0 96 96\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <rect x=\"24\" y=\"18\" width=\"48\" height=\"64\" rx=\"6\" />\n <rect x=\"38\" y=\"12\" width=\"20\" height=\"10\" rx=\"3\" />\n <line x1=\"34\" y1=\"38\" x2=\"62\" y2=\"38\" />\n <path d=\"M32 50 l4 4 l8-8\" />\n <line x1=\"46\" y1=\"52\" x2=\"62\" y2=\"52\" />\n <line x1=\"34\" y1=\"66\" x2=\"62\" y2=\"66\" opacity=\"0.55\" />\n </svg>\n }\n @case ('merge') {\n <svg\n viewBox=\"0 0 96 96\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <circle cx=\"24\" cy=\"22\" r=\"7\" />\n <circle cx=\"72\" cy=\"22\" r=\"7\" />\n <circle cx=\"48\" cy=\"76\" r=\"8\" />\n <path d=\"M24 29 V50 Q24 69 39 72\" />\n <path d=\"M72 29 V50 Q72 69 57 72\" />\n </svg>\n }\n @case ('pipeline') {\n <svg\n viewBox=\"0 0 96 96\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <circle cx=\"22\" cy=\"68\" r=\"12\" />\n <path d=\"M17 60 L29 68 L17 76 Z\" fill=\"currentColor\" stroke=\"none\" />\n <path d=\"M29 58 L44 38\" />\n <circle cx=\"50\" cy=\"30\" r=\"10\" />\n <path d=\"M56 38 L70 54\" />\n <circle cx=\"76\" cy=\"62\" r=\"10\" />\n </svg>\n }\n @case ('tag') {\n <svg\n viewBox=\"0 0 96 96\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"M18 20 H54 L82 48 L54 76 H18 Q14 76 14 72 V24 Q14 20 18 20 Z\" />\n <circle cx=\"34\" cy=\"36\" r=\"5\" />\n </svg>\n }\n @case ('book') {\n <svg\n viewBox=\"0 0 96 96\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"M48 26 Q34 16 16 20 V72 Q34 68 48 78 Q62 68 80 72 V20 Q62 16 48 26 Z\" />\n <line x1=\"24\" y1=\"32\" x2=\"40\" y2=\"30\" />\n <line x1=\"24\" y1=\"42\" x2=\"40\" y2=\"40\" />\n <line x1=\"56\" y1=\"30\" x2=\"72\" y2=\"32\" />\n <line x1=\"56\" y1=\"40\" x2=\"72\" y2=\"42\" />\n </svg>\n }\n @case ('server') {\n <svg\n viewBox=\"0 0 96 96\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <rect x=\"14\" y=\"16\" width=\"68\" height=\"26\" rx=\"5\" />\n <rect x=\"14\" y=\"54\" width=\"68\" height=\"26\" rx=\"5\" />\n <circle cx=\"26\" cy=\"29\" r=\"3\" fill=\"currentColor\" stroke=\"none\" />\n <circle cx=\"26\" cy=\"67\" r=\"3\" fill=\"currentColor\" stroke=\"none\" />\n <line x1=\"38\" y1=\"29\" x2=\"70\" y2=\"29\" opacity=\"0.55\" />\n <line x1=\"38\" y1=\"67\" x2=\"70\" y2=\"67\" opacity=\"0.55\" />\n </svg>\n }\n }\n </div>\n } @else if (icon()) {\n <div class=\"gbt-empty-state__icon\" aria-hidden=\"true\"><gbt-icon [name]=\"icon()!\" /></div>\n }\n @switch (headingLevel()) {\n @case (1) {\n <h1\n #headingEl\n class=\"gbt-empty-state__heading\"\n [attr.id]=\"headingId()\"\n [attr.tabindex]=\"headingFocusable() ? -1 : null\"\n >\n <ng-container *ngTemplateOutlet=\"headingText\" />\n </h1>\n }\n @case (2) {\n <h2\n #headingEl\n class=\"gbt-empty-state__heading\"\n [attr.id]=\"headingId()\"\n [attr.tabindex]=\"headingFocusable() ? -1 : null\"\n >\n <ng-container *ngTemplateOutlet=\"headingText\" />\n </h2>\n }\n @case (3) {\n <h3\n #headingEl\n class=\"gbt-empty-state__heading\"\n [attr.id]=\"headingId()\"\n [attr.tabindex]=\"headingFocusable() ? -1 : null\"\n >\n <ng-container *ngTemplateOutlet=\"headingText\" />\n </h3>\n }\n @case (4) {\n <h4\n #headingEl\n class=\"gbt-empty-state__heading\"\n [attr.id]=\"headingId()\"\n [attr.tabindex]=\"headingFocusable() ? -1 : null\"\n >\n <ng-container *ngTemplateOutlet=\"headingText\" />\n </h4>\n }\n @case (5) {\n <h5\n #headingEl\n class=\"gbt-empty-state__heading\"\n [attr.id]=\"headingId()\"\n [attr.tabindex]=\"headingFocusable() ? -1 : null\"\n >\n <ng-container *ngTemplateOutlet=\"headingText\" />\n </h5>\n }\n @case (6) {\n <h6\n #headingEl\n class=\"gbt-empty-state__heading\"\n [attr.id]=\"headingId()\"\n [attr.tabindex]=\"headingFocusable() ? -1 : null\"\n >\n <ng-container *ngTemplateOutlet=\"headingText\" />\n </h6>\n }\n @default {\n <p\n #headingEl\n class=\"gbt-empty-state__heading\"\n [attr.id]=\"headingId()\"\n [attr.tabindex]=\"headingFocusable() ? -1 : null\"\n >\n <ng-container *ngTemplateOutlet=\"headingText\" />\n </p>\n }\n }\n @if (message()) {\n <p class=\"gbt-empty-state__message\">{{ message() }}</p>\n }\n <div class=\"gbt-empty-state__action\">\n <ng-content />\n </div>\n</div>\n<ng-template #headingText>{{ heading() }}</ng-template>\n"],"mappings":";;;;AA0BA,IAAa,aAAb,MAAa,WAAU;CACrB,eAAe,MAAiD,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,eAAA,CAAA,+BAAA,CAAA,CAAA;CACrE,UAAU,MAAM,SAAkB,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAClC,UAAU,MAAc,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAE3B,OAAO,MAAqB,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CACjC,OAAO,MAAsB,WAAU,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CACvC,OAAO,MAAsB,WAAU,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CACvC,eAAe,MAAqC,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,eAAA,CAAA,+BAAA,CAAA,CAAA;CACzD,YAAY,MAAqB,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CACtC,mBAAmB,MAAM,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,mBAAA,+BAAA,CAAA;EAAI,WAAW;CAAgB,CAAA;CAE5C,YAAY,UAAmC,aAAY,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAE5E,eAAY;EACV,KAAK,UAAS,CAAE,EAAE,cAAc,MAAK;CACvC;CAhBW,OAAA,OAAA,GAA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OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,kBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,aAAW,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"masmarino-gabarit-empty-state.mjs","names":[],"sources":["../../../projects/gabarit/empty-state/empty-state.ts","../../../projects/gabarit/empty-state/empty-state.html"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n booleanAttribute,\n input,\n viewChild,\n} from '@angular/core'\nimport { NgTemplateOutlet } from '@angular/common'\nimport { Icon } from '@masmarino/gabarit/icon'\n\nexport type EmptyStateIllustration =\n 'folder' | 'star' | 'checklist' | 'merge' | 'pipeline' | 'tag' | 'book' | 'server'\n\nexport type EmptyStateSize = 'default' | 'compact'\nexport type EmptyStateTone = 'default' | 'error'\nexport type EmptyStateHeadingLevel = 1 | 2 | 3 | 4 | 5 | 6\n\n@Component({\n selector: 'gbt-empty-state',\n standalone: true,\n imports: [Icon, NgTemplateOutlet],\n templateUrl: './empty-state.html',\n styleUrl: './empty-state.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class EmptyState {\n illustration = input<EmptyStateIllustration | null | undefined>(null)\n heading = input.required<string>()\n message = input<string>('')\n\n icon = input<string | null>(null)\n size = input<EmptyStateSize>('default')\n tone = input<EmptyStateTone>('default')\n headingLevel = input<EmptyStateHeadingLevel | null>(null)\n headingId = input<string | null>(null)\n headingFocusable = input(false, { transform: booleanAttribute })\n\n private readonly headingEl = viewChild<ElementRef<HTMLElement>>('headingEl')\n\n focusHeading(): void {\n this.headingEl()?.nativeElement.focus()\n }\n}\n","<div\n class=\"gbt-empty-state\"\n [attr.data-size]=\"size() === 'default' ? null : size()\"\n [attr.data-tone]=\"tone() === 'default' ? null : tone()\"\n>\n @if (illustration()) {\n <div class=\"gbt-empty-state__illustration\" aria-hidden=\"true\">\n @switch (illustration()) {\n @case ('folder') {\n <svg\n viewBox=\"0 0 96 96\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <rect x=\"16\" y=\"38\" width=\"64\" height=\"40\" rx=\"4\" />\n <path d=\"M16 38 v-8a4 4 0 0 1 4-4h16l8 8h28a4 4 0 0 1 4 4\" />\n <rect\n x=\"34\"\n y=\"14\"\n width=\"16\"\n height=\"20\"\n rx=\"2\"\n transform=\"rotate(-8 42 24)\"\n opacity=\"0.55\"\n />\n <rect\n x=\"50\"\n y=\"16\"\n width=\"16\"\n height=\"20\"\n rx=\"2\"\n transform=\"rotate(6 58 26)\"\n opacity=\"0.55\"\n />\n </svg>\n }\n @case ('star') {\n <svg\n viewBox=\"0 0 96 96\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path\n d=\"M48,18 L55.6,37.5 L76.5,38.7 L60.4,52 L65.6,72.3 L48,61 L30.4,72.3 L35.6,52 L19.5,38.7 L40.4,37.5 Z\"\n />\n <path d=\"M78,14 L81,20 L78,26 L75,20 Z\" opacity=\"0.55\" />\n <path d=\"M16,64 L19,70 L16,76 L13,70 Z\" opacity=\"0.55\" />\n </svg>\n }\n @case ('checklist') {\n <svg\n viewBox=\"0 0 96 96\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <rect x=\"24\" y=\"18\" width=\"48\" height=\"64\" rx=\"6\" />\n <rect x=\"38\" y=\"12\" width=\"20\" height=\"10\" rx=\"3\" />\n <line x1=\"34\" y1=\"38\" x2=\"62\" y2=\"38\" />\n <path d=\"M32 50 l4 4 l8-8\" />\n <line x1=\"46\" y1=\"52\" x2=\"62\" y2=\"52\" />\n <line x1=\"34\" y1=\"66\" x2=\"62\" y2=\"66\" opacity=\"0.55\" />\n </svg>\n }\n @case ('merge') {\n <svg\n viewBox=\"0 0 96 96\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <circle cx=\"24\" cy=\"22\" r=\"7\" />\n <circle cx=\"72\" cy=\"22\" r=\"7\" />\n <circle cx=\"48\" cy=\"76\" r=\"8\" />\n <path d=\"M24 29 V50 Q24 69 39 72\" />\n <path d=\"M72 29 V50 Q72 69 57 72\" />\n </svg>\n }\n @case ('pipeline') {\n <svg\n viewBox=\"0 0 96 96\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <circle cx=\"22\" cy=\"68\" r=\"12\" />\n <path d=\"M17 60 L29 68 L17 76 Z\" fill=\"currentColor\" stroke=\"none\" />\n <path d=\"M29 58 L44 38\" />\n <circle cx=\"50\" cy=\"30\" r=\"10\" />\n <path d=\"M56 38 L70 54\" />\n <circle cx=\"76\" cy=\"62\" r=\"10\" />\n </svg>\n }\n @case ('tag') {\n <svg\n viewBox=\"0 0 96 96\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"M18 20 H54 L82 48 L54 76 H18 Q14 76 14 72 V24 Q14 20 18 20 Z\" />\n <circle cx=\"34\" cy=\"36\" r=\"5\" />\n </svg>\n }\n @case ('book') {\n <svg\n viewBox=\"0 0 96 96\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"M48 26 Q34 16 16 20 V72 Q34 68 48 78 Q62 68 80 72 V20 Q62 16 48 26 Z\" />\n <line x1=\"24\" y1=\"32\" x2=\"40\" y2=\"30\" />\n <line x1=\"24\" y1=\"42\" x2=\"40\" y2=\"40\" />\n <line x1=\"56\" y1=\"30\" x2=\"72\" y2=\"32\" />\n <line x1=\"56\" y1=\"40\" x2=\"72\" y2=\"42\" />\n </svg>\n }\n @case ('server') {\n <svg\n viewBox=\"0 0 96 96\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <rect x=\"14\" y=\"16\" width=\"68\" height=\"26\" rx=\"5\" />\n <rect x=\"14\" y=\"54\" width=\"68\" height=\"26\" rx=\"5\" />\n <circle cx=\"26\" cy=\"29\" r=\"3\" fill=\"currentColor\" stroke=\"none\" />\n <circle cx=\"26\" cy=\"67\" r=\"3\" fill=\"currentColor\" stroke=\"none\" />\n <line x1=\"38\" y1=\"29\" x2=\"70\" y2=\"29\" opacity=\"0.55\" />\n <line x1=\"38\" y1=\"67\" x2=\"70\" y2=\"67\" opacity=\"0.55\" />\n </svg>\n }\n }\n </div>\n } @else if (icon()) {\n <div class=\"gbt-empty-state__icon\" aria-hidden=\"true\"><gbt-icon [name]=\"icon()!\" /></div>\n }\n @switch (headingLevel()) {\n @case (1) {\n <h1\n #headingEl\n class=\"gbt-empty-state__heading\"\n [attr.id]=\"headingId()\"\n [attr.tabindex]=\"headingFocusable() ? -1 : null\"\n >\n <ng-container *ngTemplateOutlet=\"headingText\" />\n </h1>\n }\n @case (2) {\n <h2\n #headingEl\n class=\"gbt-empty-state__heading\"\n [attr.id]=\"headingId()\"\n [attr.tabindex]=\"headingFocusable() ? -1 : null\"\n >\n <ng-container *ngTemplateOutlet=\"headingText\" />\n </h2>\n }\n @case (3) {\n <h3\n #headingEl\n class=\"gbt-empty-state__heading\"\n [attr.id]=\"headingId()\"\n [attr.tabindex]=\"headingFocusable() ? -1 : null\"\n >\n <ng-container *ngTemplateOutlet=\"headingText\" />\n </h3>\n }\n @case (4) {\n <h4\n #headingEl\n class=\"gbt-empty-state__heading\"\n [attr.id]=\"headingId()\"\n [attr.tabindex]=\"headingFocusable() ? -1 : null\"\n >\n <ng-container *ngTemplateOutlet=\"headingText\" />\n </h4>\n }\n @case (5) {\n <h5\n #headingEl\n class=\"gbt-empty-state__heading\"\n [attr.id]=\"headingId()\"\n [attr.tabindex]=\"headingFocusable() ? -1 : null\"\n >\n <ng-container *ngTemplateOutlet=\"headingText\" />\n </h5>\n }\n @case (6) {\n <h6\n #headingEl\n class=\"gbt-empty-state__heading\"\n [attr.id]=\"headingId()\"\n [attr.tabindex]=\"headingFocusable() ? -1 : null\"\n >\n <ng-container *ngTemplateOutlet=\"headingText\" />\n </h6>\n }\n @default {\n <p\n #headingEl\n class=\"gbt-empty-state__heading\"\n [attr.id]=\"headingId()\"\n [attr.tabindex]=\"headingFocusable() ? -1 : null\"\n >\n <ng-container *ngTemplateOutlet=\"headingText\" />\n </p>\n }\n }\n @if (message()) {\n <p class=\"gbt-empty-state__message\">{{ message() }}</p>\n }\n <div class=\"gbt-empty-state__action\">\n <ng-content />\n </div>\n</div>\n<ng-template #headingText>{{ heading() }}</ng-template>\n"],"mappings":";;;;AA0BA,IAAa,aAAb,MAAa,WAAU;CACrB,eAAe,MAAiD,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,eAAA,CAAA,+BAAA,CAAA,CAAA;CACrE,UAAU,MAAM,SAAkB,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAClC,UAAU,MAAc,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,C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A,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,SAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,MAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,MAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,MAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,cAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,kBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,aAAW,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
|
@@ -99,7 +99,7 @@ var FileUpload = class FileUpload {
|
|
|
99
99
|
}
|
|
100
100
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
101
101
|
minVersion: "12.0.0",
|
|
102
|
-
version: "22.2.
|
|
102
|
+
version: "22.2.6",
|
|
103
103
|
ngImport: i0,
|
|
104
104
|
type: FileUpload,
|
|
105
105
|
deps: [],
|
|
@@ -107,7 +107,7 @@ var FileUpload = class FileUpload {
|
|
|
107
107
|
});
|
|
108
108
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
109
109
|
minVersion: "17.0.0",
|
|
110
|
-
version: "22.2.
|
|
110
|
+
version: "22.2.6",
|
|
111
111
|
type: FileUpload,
|
|
112
112
|
isStandalone: true,
|
|
113
113
|
selector: "gbt-file-upload",
|
|
@@ -216,7 +216,7 @@ var FileUpload = class FileUpload {
|
|
|
216
216
|
};
|
|
217
217
|
i0.ɵɵngDeclareClassMetadata({
|
|
218
218
|
minVersion: "12.0.0",
|
|
219
|
-
version: "22.2.
|
|
219
|
+
version: "22.2.6",
|
|
220
220
|
ngImport: i0,
|
|
221
221
|
type: FileUpload,
|
|
222
222
|
decorators: [{
|
|
@@ -188,7 +188,7 @@ var GbtRelativeTimePipe = class GbtRelativeTimePipe {
|
|
|
188
188
|
}
|
|
189
189
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
190
190
|
minVersion: "12.0.0",
|
|
191
|
-
version: "22.2.
|
|
191
|
+
version: "22.2.6",
|
|
192
192
|
ngImport: i0,
|
|
193
193
|
type: GbtRelativeTimePipe,
|
|
194
194
|
deps: [],
|
|
@@ -196,7 +196,7 @@ var GbtRelativeTimePipe = class GbtRelativeTimePipe {
|
|
|
196
196
|
});
|
|
197
197
|
static ɵpipe = i0.ɵɵngDeclarePipe({
|
|
198
198
|
minVersion: "14.0.0",
|
|
199
|
-
version: "22.2.
|
|
199
|
+
version: "22.2.6",
|
|
200
200
|
ngImport: i0,
|
|
201
201
|
type: GbtRelativeTimePipe,
|
|
202
202
|
isStandalone: true,
|
|
@@ -205,7 +205,7 @@ var GbtRelativeTimePipe = class GbtRelativeTimePipe {
|
|
|
205
205
|
};
|
|
206
206
|
i0.ɵɵngDeclareClassMetadata({
|
|
207
207
|
minVersion: "12.0.0",
|
|
208
|
-
version: "22.2.
|
|
208
|
+
version: "22.2.6",
|
|
209
209
|
ngImport: i0,
|
|
210
210
|
type: GbtRelativeTimePipe,
|
|
211
211
|
decorators: [{
|
|
@@ -225,7 +225,7 @@ var GbtBytesPipe = class GbtBytesPipe {
|
|
|
225
225
|
}
|
|
226
226
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
227
227
|
minVersion: "12.0.0",
|
|
228
|
-
version: "22.2.
|
|
228
|
+
version: "22.2.6",
|
|
229
229
|
ngImport: i0,
|
|
230
230
|
type: GbtBytesPipe,
|
|
231
231
|
deps: [],
|
|
@@ -233,7 +233,7 @@ var GbtBytesPipe = class GbtBytesPipe {
|
|
|
233
233
|
});
|
|
234
234
|
static ɵpipe = i0.ɵɵngDeclarePipe({
|
|
235
235
|
minVersion: "14.0.0",
|
|
236
|
-
version: "22.2.
|
|
236
|
+
version: "22.2.6",
|
|
237
237
|
ngImport: i0,
|
|
238
238
|
type: GbtBytesPipe,
|
|
239
239
|
isStandalone: true,
|
|
@@ -242,7 +242,7 @@ var GbtBytesPipe = class GbtBytesPipe {
|
|
|
242
242
|
};
|
|
243
243
|
i0.ɵɵngDeclareClassMetadata({
|
|
244
244
|
minVersion: "12.0.0",
|
|
245
|
-
version: "22.2.
|
|
245
|
+
version: "22.2.6",
|
|
246
246
|
ngImport: i0,
|
|
247
247
|
type: GbtBytesPipe,
|
|
248
248
|
decorators: [{
|
|
@@ -261,7 +261,7 @@ var GbtDateTimePipe = class GbtDateTimePipe {
|
|
|
261
261
|
}
|
|
262
262
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
263
263
|
minVersion: "12.0.0",
|
|
264
|
-
version: "22.2.
|
|
264
|
+
version: "22.2.6",
|
|
265
265
|
ngImport: i0,
|
|
266
266
|
type: GbtDateTimePipe,
|
|
267
267
|
deps: [],
|
|
@@ -269,7 +269,7 @@ var GbtDateTimePipe = class GbtDateTimePipe {
|
|
|
269
269
|
});
|
|
270
270
|
static ɵpipe = i0.ɵɵngDeclarePipe({
|
|
271
271
|
minVersion: "14.0.0",
|
|
272
|
-
version: "22.2.
|
|
272
|
+
version: "22.2.6",
|
|
273
273
|
ngImport: i0,
|
|
274
274
|
type: GbtDateTimePipe,
|
|
275
275
|
isStandalone: true,
|
|
@@ -278,7 +278,7 @@ var GbtDateTimePipe = class GbtDateTimePipe {
|
|
|
278
278
|
};
|
|
279
279
|
i0.ɵɵngDeclareClassMetadata({
|
|
280
280
|
minVersion: "12.0.0",
|
|
281
|
-
version: "22.2.
|
|
281
|
+
version: "22.2.6",
|
|
282
282
|
ngImport: i0,
|
|
283
283
|
type: GbtDateTimePipe,
|
|
284
284
|
decorators: [{
|
|
@@ -52,7 +52,7 @@ var FunnelChart = class FunnelChart {
|
|
|
52
52
|
}, ...ngDevMode ? [{ debugName: "tableRows" }] : /* istanbul ignore next */ []);
|
|
53
53
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
54
54
|
minVersion: "12.0.0",
|
|
55
|
-
version: "22.2.
|
|
55
|
+
version: "22.2.6",
|
|
56
56
|
ngImport: i0,
|
|
57
57
|
type: FunnelChart,
|
|
58
58
|
deps: [],
|
|
@@ -60,7 +60,7 @@ var FunnelChart = class FunnelChart {
|
|
|
60
60
|
});
|
|
61
61
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
62
62
|
minVersion: "17.0.0",
|
|
63
|
-
version: "22.2.
|
|
63
|
+
version: "22.2.6",
|
|
64
64
|
type: FunnelChart,
|
|
65
65
|
isStandalone: true,
|
|
66
66
|
selector: "gbt-funnel-chart",
|
|
@@ -153,7 +153,7 @@ var FunnelChart = class FunnelChart {
|
|
|
153
153
|
};
|
|
154
154
|
i0.ɵɵngDeclareClassMetadata({
|
|
155
155
|
minVersion: "12.0.0",
|
|
156
|
-
version: "22.2.
|
|
156
|
+
version: "22.2.6",
|
|
157
157
|
ngImport: i0,
|
|
158
158
|
type: FunnelChart,
|
|
159
159
|
decorators: [{
|
|
@@ -31,7 +31,7 @@ var GaugeBar = class GaugeBar {
|
|
|
31
31
|
}, ...ngDevMode ? [{ debugName: "severityLabel" }] : /* istanbul ignore next */ []);
|
|
32
32
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
33
33
|
minVersion: "12.0.0",
|
|
34
|
-
version: "22.2.
|
|
34
|
+
version: "22.2.6",
|
|
35
35
|
ngImport: i0,
|
|
36
36
|
type: GaugeBar,
|
|
37
37
|
deps: [],
|
|
@@ -39,7 +39,7 @@ var GaugeBar = class GaugeBar {
|
|
|
39
39
|
});
|
|
40
40
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
41
41
|
minVersion: "17.0.0",
|
|
42
|
-
version: "22.2.
|
|
42
|
+
version: "22.2.6",
|
|
43
43
|
type: GaugeBar,
|
|
44
44
|
isStandalone: true,
|
|
45
45
|
selector: "gbt-gauge-bar",
|
|
@@ -102,7 +102,7 @@ var GaugeBar = class GaugeBar {
|
|
|
102
102
|
};
|
|
103
103
|
i0.ɵɵngDeclareClassMetadata({
|
|
104
104
|
minVersion: "12.0.0",
|
|
105
|
-
version: "22.2.
|
|
105
|
+
version: "22.2.6",
|
|
106
106
|
ngImport: i0,
|
|
107
107
|
type: GaugeBar,
|
|
108
108
|
decorators: [{
|
|
@@ -81,7 +81,7 @@ var GitField = class GitField {
|
|
|
81
81
|
drawing = DRAWING;
|
|
82
82
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
83
83
|
minVersion: "12.0.0",
|
|
84
|
-
version: "22.2.
|
|
84
|
+
version: "22.2.6",
|
|
85
85
|
ngImport: i0,
|
|
86
86
|
type: GitField,
|
|
87
87
|
deps: [],
|
|
@@ -89,7 +89,7 @@ var GitField = class GitField {
|
|
|
89
89
|
});
|
|
90
90
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
91
91
|
minVersion: "17.0.0",
|
|
92
|
-
version: "22.2.
|
|
92
|
+
version: "22.2.6",
|
|
93
93
|
type: GitField,
|
|
94
94
|
isStandalone: true,
|
|
95
95
|
selector: "gbt-git-field",
|
|
@@ -99,13 +99,13 @@ var GitField = class GitField {
|
|
|
99
99
|
},
|
|
100
100
|
ngImport: i0,
|
|
101
101
|
template: "<div class=\"gbt-git-field__wash gbt-git-field__wash--a\"></div>\n<div class=\"gbt-git-field__wash gbt-git-field__wash--b\"></div>\n<svg\n class=\"gbt-git-field__svg\"\n [attr.viewBox]=\"'0 0 ' + width + ' ' + height\"\n preserveAspectRatio=\"xMaxYMid slice\"\n focusable=\"false\"\n>\n <g class=\"gbt-git-field__track\">\n @for (offset of tiles; track offset) {\n <g [attr.transform]=\"'translate(' + offset + ' 0)'\">\n @for (line of drawing.lines; track $index) {\n <path class=\"gbt-git-field__line\" [attr.data-color]=\"line.color\" [attr.d]=\"line.d\" />\n }\n @for (pulse of drawing.pulses; track $index) {\n <path\n class=\"gbt-git-field__pulse\"\n [attr.data-color]=\"pulse.color\"\n [attr.d]=\"pulse.d\"\n pathLength=\"1000\"\n [style.animation-duration.s]=\"pulse.duration\"\n [style.animation-delay.s]=\"pulse.delay\"\n />\n }\n @for (commit of drawing.commits; track $index) {\n <circle\n class=\"gbt-git-field__commit\"\n [class.is-hollow]=\"commit.hollow\"\n [attr.data-color]=\"commit.color\"\n [attr.cx]=\"commit.x\"\n [attr.cy]=\"commit.y\"\n r=\"4.5\"\n [style.animation-delay.s]=\"commit.delay\"\n />\n }\n </g>\n }\n </g>\n</svg>\n",
|
|
102
|
-
styles: [":host{
|
|
102
|
+
styles: [":host{position:absolute;inset:0;z-index:0;overflow:hidden;pointer-events:none}.gbt-git-field__svg{-webkit-mask-image:radial-gradient(ellipse 42% 55% at 50% 50%,transparent 0%,rgba(0,0,0,.25) 55%,#000 100%);mask-image:radial-gradient(ellipse 42% 55% at 50% 50%,transparent 0%,rgba(0,0,0,.25) 55%,#000 100%)}@media(max-width:47.99rem){:host{opacity:.5}}.gbt-git-field__wash{position:absolute;width:60%;aspect-ratio:1;border-radius:50%;filter:blur(80px);opacity:.35;will-change:transform}.gbt-git-field__wash--a{top:-30%;right:10%;background:var(--accent);animation:wash-a 26s ease-in-out infinite alternate}.gbt-git-field__wash--b{right:-20%;bottom:-45%;background:var(--color-info-vivid-base);animation:wash-b 32s ease-in-out infinite alternate}@keyframes wash-a{to{transform:translate3d(-18%,20%,0) scale(1.15)}}@keyframes wash-b{to{transform:translate3d(-25%,-15%,0) scale(.9)}}.gbt-git-field__svg{position:absolute;inset:0;width:100%;height:100%}.gbt-git-field__track{transform-box:fill-box;animation:field-pan 120s linear infinite}@keyframes field-pan{to{transform:translate3d(-50%,0,0)}}[data-color=brand]{--c: var(--accent)}[data-color=brand-2]{--c: var(--color-warning-vivid-base)}[data-color=indigo]{--c: var(--color-info-vivid-base)}[data-color=patina]{--c: var(--color-success-vivid-base)}.gbt-git-field__line{fill:none;stroke:var(--c);stroke-width:1.5;stroke-opacity:.45}.gbt-git-field__pulse{fill:none;stroke:var(--c);stroke-width:2.5;stroke-linecap:round;stroke-dasharray:70 930;animation:pulse-run 10s linear infinite}@keyframes pulse-run{0%{stroke-dashoffset:1000}to{stroke-dashoffset:0}}.gbt-git-field__commit{fill:var(--c);stroke:var(--c);stroke-width:1.5;transform-box:fill-box;transform-origin:center;opacity:.55;animation:commit-blink 6s ease-in-out infinite}.gbt-git-field__commit.is-hollow{fill:var(--bg-panel)}@keyframes commit-blink{0%,70%,to{opacity:.55;transform:none}80%{opacity:1;transform:scale(1.5)}}@media(prefers-reduced-motion:reduce){.gbt-git-field__wash,.gbt-git-field__track,.gbt-git-field__pulse,.gbt-git-field__commit{animation:none}}\n"],
|
|
103
103
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
104
104
|
});
|
|
105
105
|
};
|
|
106
106
|
i0.ɵɵngDeclareClassMetadata({
|
|
107
107
|
minVersion: "12.0.0",
|
|
108
|
-
version: "22.2.
|
|
108
|
+
version: "22.2.6",
|
|
109
109
|
ngImport: i0,
|
|
110
110
|
type: GitField,
|
|
111
111
|
decorators: [{
|
|
@@ -118,7 +118,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
118
118
|
"aria-hidden": "true"
|
|
119
119
|
},
|
|
120
120
|
template: "<div class=\"gbt-git-field__wash gbt-git-field__wash--a\"></div>\n<div class=\"gbt-git-field__wash gbt-git-field__wash--b\"></div>\n<svg\n class=\"gbt-git-field__svg\"\n [attr.viewBox]=\"'0 0 ' + width + ' ' + height\"\n preserveAspectRatio=\"xMaxYMid slice\"\n focusable=\"false\"\n>\n <g class=\"gbt-git-field__track\">\n @for (offset of tiles; track offset) {\n <g [attr.transform]=\"'translate(' + offset + ' 0)'\">\n @for (line of drawing.lines; track $index) {\n <path class=\"gbt-git-field__line\" [attr.data-color]=\"line.color\" [attr.d]=\"line.d\" />\n }\n @for (pulse of drawing.pulses; track $index) {\n <path\n class=\"gbt-git-field__pulse\"\n [attr.data-color]=\"pulse.color\"\n [attr.d]=\"pulse.d\"\n pathLength=\"1000\"\n [style.animation-duration.s]=\"pulse.duration\"\n [style.animation-delay.s]=\"pulse.delay\"\n />\n }\n @for (commit of drawing.commits; track $index) {\n <circle\n class=\"gbt-git-field__commit\"\n [class.is-hollow]=\"commit.hollow\"\n [attr.data-color]=\"commit.color\"\n [attr.cx]=\"commit.x\"\n [attr.cy]=\"commit.y\"\n r=\"4.5\"\n [style.animation-delay.s]=\"commit.delay\"\n />\n }\n </g>\n }\n </g>\n</svg>\n",
|
|
121
|
-
styles: [":host{
|
|
121
|
+
styles: [":host{position:absolute;inset:0;z-index:0;overflow:hidden;pointer-events:none}.gbt-git-field__svg{-webkit-mask-image:radial-gradient(ellipse 42% 55% at 50% 50%,transparent 0%,rgba(0,0,0,.25) 55%,#000 100%);mask-image:radial-gradient(ellipse 42% 55% at 50% 50%,transparent 0%,rgba(0,0,0,.25) 55%,#000 100%)}@media(max-width:47.99rem){:host{opacity:.5}}.gbt-git-field__wash{position:absolute;width:60%;aspect-ratio:1;border-radius:50%;filter:blur(80px);opacity:.35;will-change:transform}.gbt-git-field__wash--a{top:-30%;right:10%;background:var(--accent);animation:wash-a 26s ease-in-out infinite alternate}.gbt-git-field__wash--b{right:-20%;bottom:-45%;background:var(--color-info-vivid-base);animation:wash-b 32s ease-in-out infinite alternate}@keyframes wash-a{to{transform:translate3d(-18%,20%,0) scale(1.15)}}@keyframes wash-b{to{transform:translate3d(-25%,-15%,0) scale(.9)}}.gbt-git-field__svg{position:absolute;inset:0;width:100%;height:100%}.gbt-git-field__track{transform-box:fill-box;animation:field-pan 120s linear infinite}@keyframes field-pan{to{transform:translate3d(-50%,0,0)}}[data-color=brand]{--c: var(--accent)}[data-color=brand-2]{--c: var(--color-warning-vivid-base)}[data-color=indigo]{--c: var(--color-info-vivid-base)}[data-color=patina]{--c: var(--color-success-vivid-base)}.gbt-git-field__line{fill:none;stroke:var(--c);stroke-width:1.5;stroke-opacity:.45}.gbt-git-field__pulse{fill:none;stroke:var(--c);stroke-width:2.5;stroke-linecap:round;stroke-dasharray:70 930;animation:pulse-run 10s linear infinite}@keyframes pulse-run{0%{stroke-dashoffset:1000}to{stroke-dashoffset:0}}.gbt-git-field__commit{fill:var(--c);stroke:var(--c);stroke-width:1.5;transform-box:fill-box;transform-origin:center;opacity:.55;animation:commit-blink 6s ease-in-out infinite}.gbt-git-field__commit.is-hollow{fill:var(--bg-panel)}@keyframes commit-blink{0%,70%,to{opacity:.55;transform:none}80%{opacity:1;transform:scale(1.5)}}@media(prefers-reduced-motion:reduce){.gbt-git-field__wash,.gbt-git-field__track,.gbt-git-field__pulse,.gbt-git-field__commit{animation:none}}\n"]
|
|
122
122
|
}]
|
|
123
123
|
}]
|
|
124
124
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"masmarino-gabarit-git-field.mjs","names":[],"sources":["../../../projects/gabarit/git-field/git-field.ts","../../../projects/gabarit/git-field/git-field.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component } from '@angular/core'\n\n/** Width and height of one tile of the drawing; two tiles side by side scroll by one width and loop without a seam. */\nconst W = 1600\nconst H = 560\nconst LANES = 7\nconst laneY = (lane: number) => 50 + lane * ((H - 100) / (LANES - 1))\n\n// Each lane has a colour of the family: the rust accent, the amber, the indigo and the patina green.\nconst COLORS = ['brand', 'indigo', 'patina', 'brand-2', 'indigo', 'patina', 'brand'] as const\ntype Color = (typeof COLORS)[number]\n\ninterface Line {\n d: string\n color: Color\n}\n\ninterface Commit {\n x: number\n y: number\n color: Color\n hollow: boolean\n /** Seconds of delay of its blink, so that the commits do not all light up together. */\n delay: number\n}\n\ninterface Pulse {\n d: string\n color: Color\n duration: number\n delay: number\n}\n\n/** A small seeded generator: the drawing is the same on the server and in the browser, so hydration keeps it. */\nfunction random(seed: number): () => number {\n let state = seed\n return () => {\n state = (state + 0x6d2b79f5) | 0\n let t = Math.imul(state ^ (state >>> 15), 1 | state)\n t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t\n return ((t ^ (t >>> 14)) >>> 0) / 4294967296\n }\n}\n\n/**\n * A commit graph drawn across the tile: one straight line per lane, branches that leave a lane for the next one and\n * merge back, commits along them. Every line is straight at both edges, so the second tile carries on the first.\n */\nfunction draw(): { lines: Line[]; commits: Commit[]; pulses: Pulse[] } {\n const next = random(20261004)\n const lines: Line[] = []\n const commits: Commit[] = []\n const pulses: Pulse[] = []\n\n for (let lane = 0; lane < LANES; lane++) {\n const y = laneY(lane)\n const color = COLORS[lane]\n lines.push({ d: `M0 ${y}H${W}`, color })\n for (let x = 40 + next() * 120; x < W - 30; x += 110 + next() * 170) {\n commits.push({ x, y, color, hollow: next() < 0.3, delay: next() * 6 })\n }\n if (lane % 2 === 0) {\n pulses.push({\n d: `M0 ${y}H${W}`,\n color,\n duration: 7 + next() * 6,\n delay: -next() * 10,\n })\n }\n }\n\n // Branches: from a lane to its neighbour and back, never crossing the tile's edges.\n for (let n = 0; n < 9; n++) {\n const lane = Math.floor(next() * LANES)\n const to = lane === 0 ? 1 : lane === LANES - 1 ? LANES - 2 : lane + (next() < 0.5 ? -1 : 1)\n const x0 = 80 + next() * (W - 520)\n const length = 140 + next() * 220\n const [y0, y1] = [laneY(lane), laneY(to)]\n const color = COLORS[to]\n lines.push({\n d: `M${x0} ${y0}C${x0 + 50} ${y0} ${x0 + 40} ${y1} ${x0 + 90} ${y1}H${x0 + 90 + length}C${x0 + 140 + length} ${y1} ${x0 + 130 + length} ${y0} ${x0 + 180 + length} ${y0}`,\n color,\n })\n commits.push({\n x: x0 + 90 + length / 2,\n y: y1,\n color,\n hollow: false,\n delay: next() * 6,\n })\n }\n return { lines, commits, pulses }\n}\n\nconst DRAWING = draw()\n\n/**\n * An animated commit graph on the
|
|
1
|
+
{"version":3,"file":"masmarino-gabarit-git-field.mjs","names":[],"sources":["../../../projects/gabarit/git-field/git-field.ts","../../../projects/gabarit/git-field/git-field.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component } from '@angular/core'\n\n/** Width and height of one tile of the drawing; two tiles side by side scroll by one width and loop without a seam. */\nconst W = 1600\nconst H = 560\nconst LANES = 7\nconst laneY = (lane: number) => 50 + lane * ((H - 100) / (LANES - 1))\n\n// Each lane has a colour of the family: the rust accent, the amber, the indigo and the patina green.\nconst COLORS = ['brand', 'indigo', 'patina', 'brand-2', 'indigo', 'patina', 'brand'] as const\ntype Color = (typeof COLORS)[number]\n\ninterface Line {\n d: string\n color: Color\n}\n\ninterface Commit {\n x: number\n y: number\n color: Color\n hollow: boolean\n /** Seconds of delay of its blink, so that the commits do not all light up together. */\n delay: number\n}\n\ninterface Pulse {\n d: string\n color: Color\n duration: number\n delay: number\n}\n\n/** A small seeded generator: the drawing is the same on the server and in the browser, so hydration keeps it. */\nfunction random(seed: number): () => number {\n let state = seed\n return () => {\n state = (state + 0x6d2b79f5) | 0\n let t = Math.imul(state ^ (state >>> 15), 1 | state)\n t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t\n return ((t ^ (t >>> 14)) >>> 0) / 4294967296\n }\n}\n\n/**\n * A commit graph drawn across the tile: one straight line per lane, branches that leave a lane for the next one and\n * merge back, commits along them. Every line is straight at both edges, so the second tile carries on the first.\n */\nfunction draw(): { lines: Line[]; commits: Commit[]; pulses: Pulse[] } {\n const next = random(20261004)\n const lines: Line[] = []\n const commits: Commit[] = []\n const pulses: Pulse[] = []\n\n for (let lane = 0; lane < LANES; lane++) {\n const y = laneY(lane)\n const color = COLORS[lane]\n lines.push({ d: `M0 ${y}H${W}`, color })\n for (let x = 40 + next() * 120; x < W - 30; x += 110 + next() * 170) {\n commits.push({ x, y, color, hollow: next() < 0.3, delay: next() * 6 })\n }\n if (lane % 2 === 0) {\n pulses.push({\n d: `M0 ${y}H${W}`,\n color,\n duration: 7 + next() * 6,\n delay: -next() * 10,\n })\n }\n }\n\n // Branches: from a lane to its neighbour and back, never crossing the tile's edges.\n for (let n = 0; n < 9; n++) {\n const lane = Math.floor(next() * LANES)\n const to = lane === 0 ? 1 : lane === LANES - 1 ? LANES - 2 : lane + (next() < 0.5 ? -1 : 1)\n const x0 = 80 + next() * (W - 520)\n const length = 140 + next() * 220\n const [y0, y1] = [laneY(lane), laneY(to)]\n const color = COLORS[to]\n lines.push({\n d: `M${x0} ${y0}C${x0 + 50} ${y0} ${x0 + 40} ${y1} ${x0 + 90} ${y1}H${x0 + 90 + length}C${x0 + 140 + length} ${y1} ${x0 + 130 + length} ${y0} ${x0 + 180 + length} ${y0}`,\n color,\n })\n commits.push({\n x: x0 + 90 + length / 2,\n y: y1,\n color,\n hollow: false,\n delay: next() * 6,\n })\n }\n return { lines, commits, pulses }\n}\n\nconst DRAWING = draw()\n\n/**\n * An animated commit graph on the page's ground, behind a centred panel (the `[auth-backdrop]` slot of the sign-in\n * pages) or a dark band: lanes that drift slowly sideways, their commits blinking in turn and pushes running along\n * some of them, over two soft fields of colour. Decoration only: hidden from assistive technology, under the content,\n * and still when reduced motion is asked for. It fills its nearest positioned ancestor.\n */\n@Component({\n selector: 'gbt-git-field',\n templateUrl: './git-field.html',\n styleUrl: './git-field.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'gbt-git-field',\n 'aria-hidden': 'true',\n },\n})\nexport class GitField {\n protected readonly width = W\n protected readonly height = H\n protected readonly tiles = [0, W]\n protected readonly drawing = DRAWING\n}\n","<div class=\"gbt-git-field__wash gbt-git-field__wash--a\"></div>\n<div class=\"gbt-git-field__wash gbt-git-field__wash--b\"></div>\n<svg\n class=\"gbt-git-field__svg\"\n [attr.viewBox]=\"'0 0 ' + width + ' ' + height\"\n preserveAspectRatio=\"xMaxYMid slice\"\n focusable=\"false\"\n>\n <g class=\"gbt-git-field__track\">\n @for (offset of tiles; track offset) {\n <g [attr.transform]=\"'translate(' + offset + ' 0)'\">\n @for (line of drawing.lines; track $index) {\n <path class=\"gbt-git-field__line\" [attr.data-color]=\"line.color\" [attr.d]=\"line.d\" />\n }\n @for (pulse of drawing.pulses; track $index) {\n <path\n class=\"gbt-git-field__pulse\"\n [attr.data-color]=\"pulse.color\"\n [attr.d]=\"pulse.d\"\n pathLength=\"1000\"\n [style.animation-duration.s]=\"pulse.duration\"\n [style.animation-delay.s]=\"pulse.delay\"\n />\n }\n @for (commit of drawing.commits; track $index) {\n <circle\n class=\"gbt-git-field__commit\"\n [class.is-hollow]=\"commit.hollow\"\n [attr.data-color]=\"commit.color\"\n [attr.cx]=\"commit.x\"\n [attr.cy]=\"commit.y\"\n r=\"4.5\"\n [style.animation-delay.s]=\"commit.delay\"\n />\n }\n </g>\n }\n </g>\n</svg>\n"],"mappings":";;AAGA,MAAM,IAAI;AACV,MAAM,IAAI;AACV,MAAM,QAAQ;AACd,MAAM,SAAS,SAAiB,KAAK,QAAS,MAAY;AAG1D,MAAM,SAAS;CAAC;CAAS;CAAU;CAAU;CAAW;CAAU;CAAU;AAAO;AAyBnF,SAAS,OAAO,MAAY;CAC1B,IAAI,QAAQ;CACZ,aAAY;EACV,QAAS,QAAQ,aAAc;EAC/B,IAAI,IAAI,KAAK,KAAK,QAAS,UAAU,IAAK,IAAI,KAAK;EACnD,IAAK,IAAI,KAAK,KAAK,IAAK,MAAM,GAAI,KAAK,CAAC,IAAK;EAC7C,SAAS,IAAK,MAA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AAM,OAAM,GAAI,GAAE,GAAI,KAAK,MAAM,OAAM,GAAI;GACrK;EACD,CAAA;EACD,QAAQ,KAAK;GACX,GAAG,KAAK,KAAK,SAAS;GACtB,GAAG;GACH;GACA,QAAQ;GACR,OAAO,KAAI,IAAK;EACjB,CAAA;CACH;CACA,OAAO;EAAE;EAAO;EAAS;CAAM;AACjC;AAEA,MAAM,UAAU,KAAI;AAkBpB,IAAa,WAAb,MAAa,SAAQ;CACA,QAAQ;CACR,SAAS;CACT,QAAQ,CAAC,GAAG,CAAC;CACb,UAAU;CAJlB,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAQ,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAR,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAQ,cAAA;EAAA,UAAA;EAAA,MAAA;GAAA,YAAA,EAAA,eAAA,OAAA;GAAA,gBAAA;EAAA;EAAA,UAAA;EAAA,UChHrB;EAuCA,QAAA,CAAA,2hEAAA;EAAA,iBAAA,GAAA,wBAAA;CAAA,CAAA;;ADyEa,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAQ,YAAA,CAAA;EAVpB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAe,iBAGR,wBAAwB;GAAM,MACzC;IACJ,OAAO;IACP,eAAe;GAChB;GAAA,UAAA;GAAA,QAAA,CAAA,2hEAAA;EAAA,CAAA"}
|
|
@@ -10,7 +10,7 @@ var IconMarker = class IconMarker {
|
|
|
10
10
|
label = input(null, ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
11
11
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
12
12
|
minVersion: "12.0.0",
|
|
13
|
-
version: "22.2.
|
|
13
|
+
version: "22.2.6",
|
|
14
14
|
ngImport: i0,
|
|
15
15
|
type: IconMarker,
|
|
16
16
|
deps: [],
|
|
@@ -18,7 +18,7 @@ var IconMarker = class IconMarker {
|
|
|
18
18
|
});
|
|
19
19
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
20
20
|
minVersion: "17.1.0",
|
|
21
|
-
version: "22.2.
|
|
21
|
+
version: "22.2.6",
|
|
22
22
|
type: IconMarker,
|
|
23
23
|
isStandalone: true,
|
|
24
24
|
selector: "gbt-icon-marker",
|
|
@@ -80,7 +80,7 @@ var IconMarker = class IconMarker {
|
|
|
80
80
|
};
|
|
81
81
|
i0.ɵɵngDeclareClassMetadata({
|
|
82
82
|
minVersion: "12.0.0",
|
|
83
|
-
version: "22.2.
|
|
83
|
+
version: "22.2.6",
|
|
84
84
|
ngImport: i0,
|
|
85
85
|
type: IconMarker,
|
|
86
86
|
decorators: [{
|
|
@@ -189,7 +189,7 @@ var IconRegistry = class IconRegistry {
|
|
|
189
189
|
}
|
|
190
190
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
191
191
|
minVersion: "12.0.0",
|
|
192
|
-
version: "22.2.
|
|
192
|
+
version: "22.2.6",
|
|
193
193
|
ngImport: i0,
|
|
194
194
|
type: IconRegistry,
|
|
195
195
|
deps: [],
|
|
@@ -197,7 +197,7 @@ var IconRegistry = class IconRegistry {
|
|
|
197
197
|
});
|
|
198
198
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
199
199
|
minVersion: "12.0.0",
|
|
200
|
-
version: "22.2.
|
|
200
|
+
version: "22.2.6",
|
|
201
201
|
ngImport: i0,
|
|
202
202
|
type: IconRegistry,
|
|
203
203
|
providedIn: "root"
|
|
@@ -205,7 +205,7 @@ var IconRegistry = class IconRegistry {
|
|
|
205
205
|
};
|
|
206
206
|
i0.ɵɵngDeclareClassMetadata({
|
|
207
207
|
minVersion: "12.0.0",
|
|
208
|
-
version: "22.2.
|
|
208
|
+
version: "22.2.6",
|
|
209
209
|
ngImport: i0,
|
|
210
210
|
type: IconRegistry,
|
|
211
211
|
decorators: [{
|
|
@@ -223,7 +223,7 @@ var Icon = class Icon {
|
|
|
223
223
|
}, ...ngDevMode ? [{ debugName: "svgContent" }] : /* istanbul ignore next */ []);
|
|
224
224
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
225
225
|
minVersion: "12.0.0",
|
|
226
|
-
version: "22.2.
|
|
226
|
+
version: "22.2.6",
|
|
227
227
|
ngImport: i0,
|
|
228
228
|
type: Icon,
|
|
229
229
|
deps: [],
|
|
@@ -231,7 +231,7 @@ var Icon = class Icon {
|
|
|
231
231
|
});
|
|
232
232
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
233
233
|
minVersion: "17.0.0",
|
|
234
|
-
version: "22.2.
|
|
234
|
+
version: "22.2.6",
|
|
235
235
|
type: Icon,
|
|
236
236
|
isStandalone: true,
|
|
237
237
|
selector: "gbt-icon",
|
|
@@ -266,7 +266,7 @@ var Icon = class Icon {
|
|
|
266
266
|
};
|
|
267
267
|
i0.ɵɵngDeclareClassMetadata({
|
|
268
268
|
minVersion: "12.0.0",
|
|
269
|
-
version: "22.2.
|
|
269
|
+
version: "22.2.6",
|
|
270
270
|
ngImport: i0,
|
|
271
271
|
type: Icon,
|
|
272
272
|
decorators: [{
|
|
@@ -83,7 +83,7 @@ var GbtInput = class GbtInput {
|
|
|
83
83
|
}
|
|
84
84
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
85
85
|
minVersion: "12.0.0",
|
|
86
|
-
version: "22.2.
|
|
86
|
+
version: "22.2.6",
|
|
87
87
|
ngImport: i0,
|
|
88
88
|
type: GbtInput,
|
|
89
89
|
deps: [],
|
|
@@ -91,7 +91,7 @@ var GbtInput = class GbtInput {
|
|
|
91
91
|
});
|
|
92
92
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
93
93
|
minVersion: "17.0.0",
|
|
94
|
-
version: "22.2.
|
|
94
|
+
version: "22.2.6",
|
|
95
95
|
type: GbtInput,
|
|
96
96
|
isStandalone: true,
|
|
97
97
|
selector: "gbt-input",
|
|
@@ -278,7 +278,7 @@ var GbtInput = class GbtInput {
|
|
|
278
278
|
};
|
|
279
279
|
i0.ɵɵngDeclareClassMetadata({
|
|
280
280
|
minVersion: "12.0.0",
|
|
281
|
-
version: "22.2.
|
|
281
|
+
version: "22.2.6",
|
|
282
282
|
ngImport: i0,
|
|
283
283
|
type: GbtInput,
|
|
284
284
|
decorators: [{
|