@daffodil/design 0.92.3 → 0.93.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/accordion/README.md +4 -4
- package/beacon/README.md +61 -0
- package/beacon/src/beacon-theme.scss +61 -0
- package/breadcrumb/README.md +13 -35
- package/button/README.md +28 -50
- package/card/README.md +8 -22
- package/card/src/card/stroked/stroked-theme.scss +8 -1
- package/card/src/card-base-theme.scss +12 -1
- package/container/README.md +4 -26
- package/fesm2022/daffodil-design-accordion.mjs +15 -15
- package/fesm2022/daffodil-design-accordion.mjs.map +1 -1
- package/fesm2022/daffodil-design-article.mjs +30 -30
- package/fesm2022/daffodil-design-article.mjs.map +1 -1
- package/fesm2022/daffodil-design-beacon.mjs +48 -0
- package/fesm2022/daffodil-design-beacon.mjs.map +1 -0
- package/fesm2022/daffodil-design-breadcrumb.mjs +20 -20
- package/fesm2022/daffodil-design-breadcrumb.mjs.map +1 -1
- package/fesm2022/daffodil-design-button.mjs +37 -49
- package/fesm2022/daffodil-design-button.mjs.map +1 -1
- package/fesm2022/daffodil-design-callout.mjs +22 -22
- package/fesm2022/daffodil-design-callout.mjs.map +1 -1
- package/fesm2022/daffodil-design-card.mjs +31 -31
- package/fesm2022/daffodil-design-card.mjs.map +1 -1
- package/fesm2022/daffodil-design-checkbox.mjs +13 -13
- package/fesm2022/daffodil-design-checkbox.mjs.map +1 -1
- package/fesm2022/daffodil-design-container.mjs +7 -7
- package/fesm2022/daffodil-design-container.mjs.map +1 -1
- package/fesm2022/daffodil-design-form-field.mjs +13 -12
- package/fesm2022/daffodil-design-form-field.mjs.map +1 -1
- package/fesm2022/daffodil-design-form.mjs +9 -9
- package/fesm2022/daffodil-design-form.mjs.map +1 -1
- package/fesm2022/daffodil-design-hero.mjs +22 -22
- package/fesm2022/daffodil-design-hero.mjs.map +1 -1
- package/fesm2022/daffodil-design-image.mjs +8 -8
- package/fesm2022/daffodil-design-image.mjs.map +1 -1
- package/fesm2022/daffodil-design-input.mjs +12 -11
- package/fesm2022/daffodil-design-input.mjs.map +1 -1
- package/fesm2022/daffodil-design-link-set.mjs +16 -16
- package/fesm2022/daffodil-design-link-set.mjs.map +1 -1
- package/fesm2022/daffodil-design-list.mjs +20 -17
- package/fesm2022/daffodil-design-list.mjs.map +1 -1
- package/fesm2022/daffodil-design-loading-icon.mjs +7 -7
- package/fesm2022/daffodil-design-loading-icon.mjs.map +1 -1
- package/fesm2022/daffodil-design-media-gallery.mjs +13 -13
- package/fesm2022/daffodil-design-media-gallery.mjs.map +1 -1
- package/fesm2022/daffodil-design-menu.mjs +20 -20
- package/fesm2022/daffodil-design-menu.mjs.map +1 -1
- package/fesm2022/daffodil-design-modal.mjs +33 -27
- package/fesm2022/daffodil-design-modal.mjs.map +1 -1
- package/fesm2022/daffodil-design-native-select.mjs +5 -3
- package/fesm2022/daffodil-design-native-select.mjs.map +1 -1
- package/fesm2022/daffodil-design-navbar.mjs +9 -9
- package/fesm2022/daffodil-design-navbar.mjs.map +1 -1
- package/fesm2022/daffodil-design-notification.mjs +16 -16
- package/fesm2022/daffodil-design-notification.mjs.map +1 -1
- package/fesm2022/daffodil-design-paginator.mjs +8 -8
- package/fesm2022/daffodil-design-paginator.mjs.map +1 -1
- package/fesm2022/daffodil-design-progress-bar.mjs +11 -11
- package/fesm2022/daffodil-design-progress-bar.mjs.map +1 -1
- package/fesm2022/daffodil-design-quantity-field.mjs +13 -13
- package/fesm2022/daffodil-design-quantity-field.mjs.map +1 -1
- package/fesm2022/daffodil-design-radio.mjs +16 -16
- package/fesm2022/daffodil-design-radio.mjs.map +1 -1
- package/fesm2022/daffodil-design-select.mjs +11 -11
- package/fesm2022/daffodil-design-select.mjs.map +1 -1
- package/fesm2022/daffodil-design-sidebar.mjs +36 -30
- package/fesm2022/daffodil-design-sidebar.mjs.map +1 -1
- package/fesm2022/daffodil-design-spinner.mjs +8 -8
- package/fesm2022/daffodil-design-spinner.mjs.map +1 -1
- package/fesm2022/daffodil-design-switch.mjs +3 -3
- package/fesm2022/daffodil-design-switch.mjs.map +1 -1
- package/fesm2022/daffodil-design-tabs.mjs +17 -25
- package/fesm2022/daffodil-design-tabs.mjs.map +1 -1
- package/fesm2022/daffodil-design-tag.mjs +43 -35
- package/fesm2022/daffodil-design-tag.mjs.map +1 -1
- package/fesm2022/daffodil-design-testing.mjs +19 -0
- package/fesm2022/daffodil-design-testing.mjs.map +1 -0
- package/fesm2022/daffodil-design-text-snippet.mjs +3 -3
- package/fesm2022/daffodil-design-text-snippet.mjs.map +1 -1
- package/fesm2022/daffodil-design-textarea.mjs +3 -3
- package/fesm2022/daffodil-design-textarea.mjs.map +1 -1
- package/fesm2022/daffodil-design-toast.mjs +22 -22
- package/fesm2022/daffodil-design-toast.mjs.map +1 -1
- package/fesm2022/daffodil-design-tree.mjs +27 -25
- package/fesm2022/daffodil-design-tree.mjs.map +1 -1
- package/fesm2022/daffodil-design-youtube-player.mjs +22 -11
- package/fesm2022/daffodil-design-youtube-player.mjs.map +1 -1
- package/fesm2022/daffodil-design.mjs +126 -160
- package/fesm2022/daffodil-design.mjs.map +1 -1
- package/form/README.md +15 -6
- package/hero/README.md +14 -49
- package/image/README.md +6 -29
- package/input/README.md +8 -34
- package/list/README.md +29 -55
- package/list/src/list-theme.scss +16 -2
- package/media-gallery/README.md +36 -43
- package/menu/README.md +24 -55
- package/menu/src/menu-theme.scss +12 -2
- package/modal/README.md +15 -45
- package/native-select/README.md +8 -6
- package/navbar/README.md +18 -27
- package/notification/README.md +14 -49
- package/package.json +1 -1
- package/paginator/README.md +11 -31
- package/paginator/src/paginator-theme.scss +16 -2
- package/progress-bar/README.md +14 -41
- package/scss/global.scss +25 -2
- package/scss/theme.scss +2 -0
- package/select/README.md +5 -6
- package/select/src/select-theme.scss +10 -2
- package/sidebar/README.md +1 -1
- package/spinner/README.md +15 -9
- package/switch/README.md +17 -6
- package/tabs/README.md +39 -39
- package/tag/README.md +31 -31
- package/tag/src/tag-theme.scss +100 -3
- package/textarea/README.md +9 -7
- package/toast/README.md +55 -52
- package/tree/README.md +12 -43
- package/tree/src/tree-theme.scss +8 -4
- package/{accordion/index.d.ts → types/daffodil-design-accordion.d.ts} +1 -1
- package/types/daffodil-design-beacon.d.ts +26 -0
- package/{button/index.d.ts → types/daffodil-design-button.d.ts} +7 -8
- package/{input/index.d.ts → types/daffodil-design-input.d.ts} +4 -1
- package/{list/index.d.ts → types/daffodil-design-list.d.ts} +4 -1
- package/{menu/index.d.ts → types/daffodil-design-menu.d.ts} +3 -3
- package/{modal/index.d.ts → types/daffodil-design-modal.d.ts} +11 -5
- package/{native-select/index.d.ts → types/daffodil-design-native-select.d.ts} +3 -1
- package/{sidebar/index.d.ts → types/daffodil-design-sidebar.d.ts} +9 -3
- package/{tabs/index.d.ts → types/daffodil-design-tabs.d.ts} +0 -6
- package/types/daffodil-design-tag.d.ts +80 -0
- package/types/daffodil-design-testing.d.ts +11 -0
- package/{tree/index.d.ts → types/daffodil-design-tree.d.ts} +2 -0
- package/{youtube-player/index.d.ts → types/daffodil-design-youtube-player.d.ts} +15 -0
- package/{index.d.ts → types/daffodil-design.d.ts} +25 -67
- package/tag/index.d.ts +0 -71
- /package/{article/index.d.ts → types/daffodil-design-article.d.ts} +0 -0
- /package/{breadcrumb/index.d.ts → types/daffodil-design-breadcrumb.d.ts} +0 -0
- /package/{callout/index.d.ts → types/daffodil-design-callout.d.ts} +0 -0
- /package/{card/index.d.ts → types/daffodil-design-card.d.ts} +0 -0
- /package/{checkbox/index.d.ts → types/daffodil-design-checkbox.d.ts} +0 -0
- /package/{container/index.d.ts → types/daffodil-design-container.d.ts} +0 -0
- /package/{form-field/index.d.ts → types/daffodil-design-form-field.d.ts} +0 -0
- /package/{form/index.d.ts → types/daffodil-design-form.d.ts} +0 -0
- /package/{hero/index.d.ts → types/daffodil-design-hero.d.ts} +0 -0
- /package/{image/index.d.ts → types/daffodil-design-image.d.ts} +0 -0
- /package/{link-set/index.d.ts → types/daffodil-design-link-set.d.ts} +0 -0
- /package/{loading-icon/index.d.ts → types/daffodil-design-loading-icon.d.ts} +0 -0
- /package/{media-gallery/index.d.ts → types/daffodil-design-media-gallery.d.ts} +0 -0
- /package/{navbar/index.d.ts → types/daffodil-design-navbar.d.ts} +0 -0
- /package/{notification/index.d.ts → types/daffodil-design-notification.d.ts} +0 -0
- /package/{paginator/index.d.ts → types/daffodil-design-paginator.d.ts} +0 -0
- /package/{progress-bar/index.d.ts → types/daffodil-design-progress-bar.d.ts} +0 -0
- /package/{quantity-field/index.d.ts → types/daffodil-design-quantity-field.d.ts} +0 -0
- /package/{radio/index.d.ts → types/daffodil-design-radio.d.ts} +0 -0
- /package/{select/index.d.ts → types/daffodil-design-select.d.ts} +0 -0
- /package/{spinner/index.d.ts → types/daffodil-design-spinner.d.ts} +0 -0
- /package/{switch/index.d.ts → types/daffodil-design-switch.d.ts} +0 -0
- /package/{text-snippet/index.d.ts → types/daffodil-design-text-snippet.d.ts} +0 -0
- /package/{textarea/index.d.ts → types/daffodil-design-textarea.d.ts} +0 -0
- /package/{toast/index.d.ts → types/daffodil-design-toast.d.ts} +0 -0
|
@@ -32,14 +32,14 @@ class DaffBreadcrumbItemComponent {
|
|
|
32
32
|
this._active = value;
|
|
33
33
|
this.cdRef.detectChanges();
|
|
34
34
|
}
|
|
35
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
36
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
35
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffBreadcrumbItemComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
36
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: DaffBreadcrumbItemComponent, isStandalone: true, selector: "li[daffBreadcrumbItem]", host: { properties: { "attr.aria-current": "_active ? \"page\" : null" }, classAttribute: "daff-breadcrumb__item" }, viewQueries: [{ propertyName: "itemRef", first: true, predicate: ["item"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: `
|
|
37
37
|
<ng-template #item>
|
|
38
38
|
<ng-content></ng-content>
|
|
39
39
|
</ng-template>
|
|
40
40
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
41
41
|
}
|
|
42
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
42
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffBreadcrumbItemComponent, decorators: [{
|
|
43
43
|
type: Component,
|
|
44
44
|
args: [{
|
|
45
45
|
// eslint-disable-next-line @angular-eslint/component-selector
|
|
@@ -92,10 +92,10 @@ class DaffBreadcrumbMenuItemDirective {
|
|
|
92
92
|
this._focusableElement?.removeEventListener('click', this._clickHandler);
|
|
93
93
|
this._focusableElement?.classList.remove('daff-menu-item');
|
|
94
94
|
}
|
|
95
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
96
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
95
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffBreadcrumbMenuItemDirective, deps: [{ token: i0.ViewContainerRef }, { token: i1.DaffMenuService }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
96
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: DaffBreadcrumbMenuItemDirective, isStandalone: true, selector: "[daffBreadcrumbMenuItem]", providers: [provideDaffMenuItemToken(DaffBreadcrumbMenuItemDirective)], ngImport: i0 }); }
|
|
97
97
|
}
|
|
98
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
98
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffBreadcrumbMenuItemDirective, decorators: [{
|
|
99
99
|
type: Directive,
|
|
100
100
|
args: [{
|
|
101
101
|
selector: '[daffBreadcrumbMenuItem]',
|
|
@@ -149,11 +149,11 @@ class DaffBreadcrumbComponent {
|
|
|
149
149
|
/**
|
|
150
150
|
* @docs-private
|
|
151
151
|
*/
|
|
152
|
-
this._isMobile = signal(false, ...(ngDevMode ? [{ debugName: "_isMobile" }] : []));
|
|
152
|
+
this._isMobile = signal(false, ...(ngDevMode ? [{ debugName: "_isMobile" }] : /* istanbul ignore next */ []));
|
|
153
153
|
/**
|
|
154
154
|
* @docs-private
|
|
155
155
|
*/
|
|
156
|
-
this._breadcrumbItems = contentChildren(DaffBreadcrumbItemComponent, ...(ngDevMode ? [{ debugName: "_breadcrumbItems" }] : []));
|
|
156
|
+
this._breadcrumbItems = contentChildren(DaffBreadcrumbItemComponent, ...(ngDevMode ? [{ debugName: "_breadcrumbItems" }] : /* istanbul ignore next */ []));
|
|
157
157
|
/**
|
|
158
158
|
* @docs-private
|
|
159
159
|
*/
|
|
@@ -179,22 +179,22 @@ class DaffBreadcrumbComponent {
|
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
181
|
return { visible, menu };
|
|
182
|
-
}, ...(ngDevMode ? [{ debugName: "_partition" }] : []));
|
|
182
|
+
}, ...(ngDevMode ? [{ debugName: "_partition" }] : /* istanbul ignore next */ []));
|
|
183
183
|
/**
|
|
184
184
|
* @docs-private
|
|
185
185
|
*/
|
|
186
|
-
this._computedBreadcrumbItems = computed(() => this._partition().visible, ...(ngDevMode ? [{ debugName: "_computedBreadcrumbItems" }] : []));
|
|
186
|
+
this._computedBreadcrumbItems = computed(() => this._partition().visible, ...(ngDevMode ? [{ debugName: "_computedBreadcrumbItems" }] : /* istanbul ignore next */ []));
|
|
187
187
|
/**
|
|
188
188
|
* @docs-private
|
|
189
189
|
*/
|
|
190
|
-
this._desktopMenuItems = computed(() => this._partition().menu, ...(ngDevMode ? [{ debugName: "_desktopMenuItems" }] : []));
|
|
190
|
+
this._desktopMenuItems = computed(() => this._partition().menu, ...(ngDevMode ? [{ debugName: "_desktopMenuItems" }] : /* istanbul ignore next */ []));
|
|
191
191
|
/**
|
|
192
192
|
* @docs-private
|
|
193
193
|
*/
|
|
194
194
|
this._mobileMenuItems = computed(() => {
|
|
195
195
|
const items = this._breadcrumbItems();
|
|
196
196
|
return items.slice(0, items.length - 1);
|
|
197
|
-
}, ...(ngDevMode ? [{ debugName: "_mobileMenuItems" }] : []));
|
|
197
|
+
}, ...(ngDevMode ? [{ debugName: "_mobileMenuItems" }] : /* istanbul ignore next */ []));
|
|
198
198
|
}
|
|
199
199
|
/**
|
|
200
200
|
* @docs-private
|
|
@@ -218,10 +218,10 @@ class DaffBreadcrumbComponent {
|
|
|
218
218
|
this.breadcrumbItems.forEach(item => item.setActive(false));
|
|
219
219
|
this.breadcrumbItems.last.setActive(true);
|
|
220
220
|
}
|
|
221
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
222
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
221
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffBreadcrumbComponent, deps: [{ token: i0.DestroyRef }, { token: i1$1.BreakpointObserver }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
222
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: DaffBreadcrumbComponent, isStandalone: true, selector: "ol[daff-breadcrumb]", host: { classAttribute: "daff-breadcrumb" }, providers: [DaffMenuService], queries: [{ propertyName: "_breadcrumbItems", predicate: DaffBreadcrumbItemComponent, isSignal: true }, { propertyName: "breadcrumbItems", predicate: DaffBreadcrumbItemComponent }], viewQueries: [{ propertyName: "fullMenu", first: true, predicate: ["mobileMenu"], descendants: true, static: true }, { propertyName: "partialMenu", first: true, predicate: ["desktopMenu"], descendants: true, static: true }], hostDirectives: [{ directive: i2.DaffArticleEncapsulatedDirective }, { directive: i2.DaffSkeletonableDirective, inputs: ["skeleton", "skeleton"] }], ngImport: i0, template: "@for (breadcrumbItem of _computedBreadcrumbItems(); track breadcrumbItem) {\n\t@if (breadcrumbItem.type === 'breadcrumb') {\n\t\t<li class=\"daff-breadcrumb__item\"\n\t\t\t[class.active]=\"breadcrumbItem.item._active\">\n\t\t\t<ng-container *ngTemplateOutlet=\"breadcrumbItem.item.itemRef\"></ng-container>\n\t\t</li>\n\t} @else {\n\t\t<li class=\"daff-breadcrumb__item\"\n\t\t\t[class.on-mobile]=\"breadcrumbItem.target === 'mobileMenu'\"\n\t\t\t[class.on-desktop]=\"breadcrumbItem.target === 'desktopMenu'\">\n\t\t\t<button class=\"daff-breadcrumb__menu-activator\"\n\t\t\t\t[daffMenuActivator]=\"breadcrumbItem.target === 'mobileMenu' ? mobileMenu : desktopMenu\"\n\t\t\t\taria-label=\"Show more breadcrumb items\">...</button>\n\t\t</li>\n\t}\n}\n\n<ng-template #mobileMenu>\n\t<daff-menu>\n\t\t@for (breadcrumbItem of _mobileMenuItems(); track breadcrumbItem) {\n\t\t\t<ng-container daffBreadcrumbMenuItem [ngTemplateOutlet]=\"breadcrumbItem.itemRef\"></ng-container>\n\t\t}\n\t</daff-menu>\t\n</ng-template>\n\n<ng-template #desktopMenu>\n\t<daff-menu>\n\t\t@for (breadcrumbItem of _desktopMenuItems(); track breadcrumbItem) {\n\t\t\t<ng-container daffBreadcrumbMenuItem [ngTemplateOutlet]=\"breadcrumbItem.itemRef\"></ng-container>\n\t\t}\n\t</daff-menu>\t\n</ng-template>", styles: [".daff-breadcrumb{display:flex;flex-wrap:wrap;list-style:none;margin:0;padding:0}.daff-breadcrumb__item{font-size:1rem}.daff-breadcrumb__item a{text-decoration:none}@media(hover:hover){.daff-breadcrumb__item a:hover{text-decoration:underline}}.daff-breadcrumb__item.active{font-weight:500}.daff-breadcrumb__item:not(:last-child):after{content:\"/\";color:currentColor;font-weight:400;margin:0 .5rem}.daff-breadcrumb__item.on-mobile{display:inline-block}@media(min-width:480px){.daff-breadcrumb__item.on-mobile{display:none}}.daff-breadcrumb__item.on-desktop{display:none}@media(min-width:480px){.daff-breadcrumb__item.on-desktop{display:inline-block}}.daff-breadcrumb__item:nth-child(2),.daff-breadcrumb__item:nth-child(3),.daff-breadcrumb__item:nth-last-child(2){display:none}@media(min-width:480px){.daff-breadcrumb__item:nth-child(2),.daff-breadcrumb__item:nth-child(3),.daff-breadcrumb__item:nth-last-child(2){display:inline-block}}.daff-breadcrumb__menu-activator{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;appearance:none;background:none;border:none;margin:0;padding:0}.daff-breadcrumb.daff-skeleton{max-width:290px;display:flex;position:relative;height:1.5rem;width:100%;border-radius:0}.daff-breadcrumb.daff-skeleton:before{animation-name:loading;animation-duration:1s;animation-timing-function:linear;animation-iteration-count:infinite;animation-direction:alternate;content:\"\";height:1.5rem;width:100%;position:absolute;top:0;left:0}@keyframes loading{0%{opacity:.5}to{opacity:1}}.daff-breadcrumb.daff-skeleton .daff-breadcrumb__item{visibility:hidden}.daff-breadcrumb.daff-skeleton .daff-breadcrumb__item:after{content:unset}\n"], dependencies: [{ kind: "component", type: i1.DaffMenuComponent, selector: "daff-menu" }, { kind: "directive", type: i1.DaffMenuActivatorDirective, selector: "[daffMenuActivator]", inputs: ["daffMenuActivator", "id"], exportAs: ["daffMenuActivator"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: DaffBreadcrumbMenuItemDirective, selector: "[daffBreadcrumbMenuItem]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
223
223
|
}
|
|
224
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
224
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffBreadcrumbComponent, decorators: [{
|
|
225
225
|
type: Component,
|
|
226
226
|
args: [{ selector: 'ol[daff-breadcrumb]', hostDirectives: [
|
|
227
227
|
{ directive: DaffArticleEncapsulatedDirective },
|
|
@@ -235,7 +235,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
235
235
|
DAFF_MENU_COMPONENTS,
|
|
236
236
|
NgTemplateOutlet,
|
|
237
237
|
DaffBreadcrumbMenuItemDirective,
|
|
238
|
-
], providers: [DaffMenuService], template: "@for (breadcrumbItem of _computedBreadcrumbItems(); track breadcrumbItem) {\n\t@if (breadcrumbItem.type === 'breadcrumb') {\n\t\t<li class=\"daff-breadcrumb__item\"\n\t\t\t[class.active]=\"breadcrumbItem.item._active\">\n\t\t\t<ng-container *ngTemplateOutlet=\"breadcrumbItem.item.itemRef\"></ng-container>\n\t\t</li>\n\t} @else {\n\t\t<li class=\"daff-breadcrumb__item\"\n\t\t\t[class.on-mobile]=\"breadcrumbItem.target === 'mobileMenu'\"\n\t\t\t[class.on-desktop]=\"breadcrumbItem.target === 'desktopMenu'\">\n\t\t\t<button class=\"daff-breadcrumb__menu-activator\"\n\t\t\t\t[daffMenuActivator]=\"breadcrumbItem.target === 'mobileMenu' ? mobileMenu : desktopMenu\"\n\t\t\t\taria-label=\"Show more breadcrumb items\">...</button>\n\t\t</li>\n\t}\n}\n\n<ng-template #mobileMenu>\n\t<daff-menu>\n\t\t@for (breadcrumbItem of _mobileMenuItems(); track breadcrumbItem) {\n\t\t\t<ng-container daffBreadcrumbMenuItem [ngTemplateOutlet]=\"breadcrumbItem.itemRef\"></ng-container>\n\t\t}\n\t</daff-menu>\t\n</ng-template>\n\n<ng-template #desktopMenu>\n\t<daff-menu>\n\t\t@for (breadcrumbItem of _desktopMenuItems(); track breadcrumbItem) {\n\t\t\t<ng-container daffBreadcrumbMenuItem [ngTemplateOutlet]=\"breadcrumbItem.itemRef\"></ng-container>\n\t\t}\n\t</daff-menu>\t\n</ng-template>", styles: [".daff-breadcrumb{display:flex;flex-wrap:wrap;list-style:none;margin:0;padding:0}.daff-breadcrumb__item{font-size:1rem}.daff-breadcrumb__item a{text-decoration:none}.daff-breadcrumb__item a:hover{text-decoration:underline}.daff-breadcrumb__item.active{font-weight:500}.daff-breadcrumb__item:not(:last-child):after{content:\"/\";color:currentColor;font-weight:400;margin:0 .5rem}.daff-breadcrumb__item.on-mobile{display:inline-block}@media(min-width:480px){.daff-breadcrumb__item.on-mobile{display:none}}.daff-breadcrumb__item.on-desktop{display:none}@media(min-width:480px){.daff-breadcrumb__item.on-desktop{display:inline-block}}.daff-breadcrumb__item:nth-child(2),.daff-breadcrumb__item:nth-child(3),.daff-breadcrumb__item:nth-last-child(2){display:none}@media(min-width:480px){.daff-breadcrumb__item:nth-child(2),.daff-breadcrumb__item:nth-child(3),.daff-breadcrumb__item:nth-last-child(2){display:inline-block}}.daff-breadcrumb__menu-activator{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;appearance:none;background:none;border:none;margin:0;padding:0}.daff-breadcrumb.daff-skeleton{max-width:290px;display:flex;position:relative;height:1.5rem;width:100%;border-radius:0}.daff-breadcrumb.daff-skeleton:before{animation-name:loading;animation-duration:1s;animation-timing-function:linear;animation-iteration-count:infinite;animation-direction:alternate;content:\"\";height:1.5rem;width:100%;position:absolute;top:0;left:0}@keyframes loading{0%{opacity:.5}to{opacity:1}}.daff-breadcrumb.daff-skeleton .daff-breadcrumb__item{visibility:hidden}.daff-breadcrumb.daff-skeleton .daff-breadcrumb__item:after{content:unset}\n"] }]
|
|
238
|
+
], providers: [DaffMenuService], template: "@for (breadcrumbItem of _computedBreadcrumbItems(); track breadcrumbItem) {\n\t@if (breadcrumbItem.type === 'breadcrumb') {\n\t\t<li class=\"daff-breadcrumb__item\"\n\t\t\t[class.active]=\"breadcrumbItem.item._active\">\n\t\t\t<ng-container *ngTemplateOutlet=\"breadcrumbItem.item.itemRef\"></ng-container>\n\t\t</li>\n\t} @else {\n\t\t<li class=\"daff-breadcrumb__item\"\n\t\t\t[class.on-mobile]=\"breadcrumbItem.target === 'mobileMenu'\"\n\t\t\t[class.on-desktop]=\"breadcrumbItem.target === 'desktopMenu'\">\n\t\t\t<button class=\"daff-breadcrumb__menu-activator\"\n\t\t\t\t[daffMenuActivator]=\"breadcrumbItem.target === 'mobileMenu' ? mobileMenu : desktopMenu\"\n\t\t\t\taria-label=\"Show more breadcrumb items\">...</button>\n\t\t</li>\n\t}\n}\n\n<ng-template #mobileMenu>\n\t<daff-menu>\n\t\t@for (breadcrumbItem of _mobileMenuItems(); track breadcrumbItem) {\n\t\t\t<ng-container daffBreadcrumbMenuItem [ngTemplateOutlet]=\"breadcrumbItem.itemRef\"></ng-container>\n\t\t}\n\t</daff-menu>\t\n</ng-template>\n\n<ng-template #desktopMenu>\n\t<daff-menu>\n\t\t@for (breadcrumbItem of _desktopMenuItems(); track breadcrumbItem) {\n\t\t\t<ng-container daffBreadcrumbMenuItem [ngTemplateOutlet]=\"breadcrumbItem.itemRef\"></ng-container>\n\t\t}\n\t</daff-menu>\t\n</ng-template>", styles: [".daff-breadcrumb{display:flex;flex-wrap:wrap;list-style:none;margin:0;padding:0}.daff-breadcrumb__item{font-size:1rem}.daff-breadcrumb__item a{text-decoration:none}@media(hover:hover){.daff-breadcrumb__item a:hover{text-decoration:underline}}.daff-breadcrumb__item.active{font-weight:500}.daff-breadcrumb__item:not(:last-child):after{content:\"/\";color:currentColor;font-weight:400;margin:0 .5rem}.daff-breadcrumb__item.on-mobile{display:inline-block}@media(min-width:480px){.daff-breadcrumb__item.on-mobile{display:none}}.daff-breadcrumb__item.on-desktop{display:none}@media(min-width:480px){.daff-breadcrumb__item.on-desktop{display:inline-block}}.daff-breadcrumb__item:nth-child(2),.daff-breadcrumb__item:nth-child(3),.daff-breadcrumb__item:nth-last-child(2){display:none}@media(min-width:480px){.daff-breadcrumb__item:nth-child(2),.daff-breadcrumb__item:nth-child(3),.daff-breadcrumb__item:nth-last-child(2){display:inline-block}}.daff-breadcrumb__menu-activator{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;appearance:none;background:none;border:none;margin:0;padding:0}.daff-breadcrumb.daff-skeleton{max-width:290px;display:flex;position:relative;height:1.5rem;width:100%;border-radius:0}.daff-breadcrumb.daff-skeleton:before{animation-name:loading;animation-duration:1s;animation-timing-function:linear;animation-iteration-count:infinite;animation-direction:alternate;content:\"\";height:1.5rem;width:100%;position:absolute;top:0;left:0}@keyframes loading{0%{opacity:.5}to{opacity:1}}.daff-breadcrumb.daff-skeleton .daff-breadcrumb__item{visibility:hidden}.daff-breadcrumb.daff-skeleton .daff-breadcrumb__item:after{content:unset}\n"] }]
|
|
239
239
|
}], ctorParameters: () => [{ type: i0.DestroyRef }, { type: i1$1.BreakpointObserver }], propDecorators: { breadcrumbItems: [{
|
|
240
240
|
type: ContentChildren,
|
|
241
241
|
args: [DaffBreadcrumbItemComponent]
|
|
@@ -259,13 +259,13 @@ const DAFF_BREADCRUMB_COMPONENTS = [
|
|
|
259
259
|
* @deprecated in favor of {@link DAFF_BREADCRUMB_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.
|
|
260
260
|
*/
|
|
261
261
|
class DaffBreadcrumbModule {
|
|
262
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
263
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
262
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffBreadcrumbModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
263
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: DaffBreadcrumbModule, imports: [DaffBreadcrumbComponent,
|
|
264
264
|
DaffBreadcrumbItemComponent], exports: [DaffBreadcrumbComponent,
|
|
265
265
|
DaffBreadcrumbItemComponent] }); }
|
|
266
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
266
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffBreadcrumbModule, imports: [DaffBreadcrumbComponent] }); }
|
|
267
267
|
}
|
|
268
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
268
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffBreadcrumbModule, decorators: [{
|
|
269
269
|
type: NgModule,
|
|
270
270
|
args: [{
|
|
271
271
|
imports: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-design-breadcrumb.mjs","sources":["../../../libs/design/breadcrumb/src/breadcrumb-item/breadcrumb-item.component.ts","../../../libs/design/breadcrumb/src/breadcrumb-menu-item/breadcrumb-menu-item.directive.ts","../../../libs/design/breadcrumb/src/breadcrumb-render/to-render-type.ts","../../../libs/design/breadcrumb/src/breadcrumb/breadcrumb.component.ts","../../../libs/design/breadcrumb/src/breadcrumb/breadcrumb.component.html","../../../libs/design/breadcrumb/src/breadcrumb.ts","../../../libs/design/breadcrumb/src/breadcrumb.module.ts","../../../libs/design/breadcrumb/src/daffodil-design-breadcrumb.ts"],"sourcesContent":["/* eslint-disable quote-props */\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n TemplateRef,\n ViewChild,\n} from '@angular/core';\n\n\n/**\n * Represents each individual breadcrumb item. Must be used on a `<li>` element.\n *\n * @example\n * ```html\n * <li daffBreadcrumbItem>\n * <a routerLink=\"/\">Link</a>\n * </li>\n * ```\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'li[daffBreadcrumbItem]',\n template: `\n <ng-template #item>\n <ng-content></ng-content>\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'class': 'daff-breadcrumb__item',\n '[attr.aria-current]': '_active ? \"page\" : null',\n },\n})\nexport class DaffBreadcrumbItemComponent {\n /**\n * @docs-private\n */\n @ViewChild('item', { read: TemplateRef, static: true }) itemRef: TemplateRef<any>;\n\n /**\n * @docs-private\n */\n _active = false;\n\n constructor( private cdRef: ChangeDetectorRef ) {}\n\n /** Called by the DaffBreadcrumbComponent to set the active state */\n setActive(value: boolean) {\n this._active = value;\n\n this.cdRef.detectChanges();\n }\n}\n","import { FocusableOption } from '@angular/cdk/a11y';\nimport {\n AfterViewInit,\n Directive,\n EmbeddedViewRef,\n OnDestroy,\n ViewContainerRef,\n} from '@angular/core';\n\nimport {\n provideDaffMenuItemToken,\n DaffMenuService,\n} from '@daffodil/design/menu';\n\n/**\n * @docs-private\n *\n * Applied to an `ng-container` that projects breadcrumb item templates into `daff-menu`,\n * allowing breadcrumb items to take on `daff-menu-item` styling and behavior.\n */\n@Directive({\n selector: '[daffBreadcrumbMenuItem]',\n providers: [provideDaffMenuItemToken(DaffBreadcrumbMenuItemDirective)],\n})\nexport class DaffBreadcrumbMenuItemDirective implements FocusableOption, AfterViewInit, OnDestroy {\n private _focusableElement: HTMLElement | null = null;\n private _clickHandler = () => this._menuService.close();\n\n constructor(\n private _viewContainerRef: ViewContainerRef,\n private _menuService: DaffMenuService,\n ) {}\n\n /**\n * @docs-private\n */\n ngAfterViewInit() {\n this._focusableElement = this._findFocusableElement();\n this._focusableElement?.classList.add('daff-menu-item'); // For styling\n this._focusableElement?.addEventListener('click', this._clickHandler);\n }\n\n focus() {\n this._focusableElement?.focus(); // Allows `FocusKeyManager` to focus on the element\n }\n\n private _findFocusableElement(): HTMLElement | null {\n const view = <EmbeddedViewRef<unknown>>this._viewContainerRef.get(0);\n return view?.rootNodes.find((n): n is HTMLElement => n.nodeType === Node.ELEMENT_NODE) ?? null;\n }\n\n ngOnDestroy() {\n this._focusableElement?.removeEventListener('click', this._clickHandler);\n this._focusableElement?.classList.remove('daff-menu-item');\n }\n}\n","import { DaffBreadcrumbItemComponent } from '../public_api';\nimport { DaffBreadcrumbRender } from './breadcrumb-render.type';\n\n/**\n * Determines whether a breadcrumb item should be rendered in the breadcrumb trail.\n * Returns a {@link DaffBreadcrumbRender} when the item should be visible,\n * or `null` when the item should be collapsed into a menu.\n *\n * When there are fewer than 5 items, all items are rendered.\n * Otherwise, only the first 2 and last 2 items are rendered.\n */\nexport const toRenderType = (item: DaffBreadcrumbItemComponent, length: number, index: number): DaffBreadcrumbRender | null => {\n if(length < 5) {\n return { item, type: 'breadcrumb' };\n }\n\n switch(index) {\n case 0:\n case 1:\n case length - 1:\n case length - 2:\n return { item, type: 'breadcrumb' };\n default:\n return null;\n }\n};\n","/* eslint-disable quote-props */\nimport { BreakpointObserver } from '@angular/cdk/layout';\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n ContentChildren,\n QueryList,\n AfterContentInit,\n DestroyRef,\n ViewChild,\n contentChildren,\n computed,\n TemplateRef,\n signal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\nimport {\n DaffArticleEncapsulatedDirective,\n DaffSkeletonableDirective,\n DaffBreakpoints,\n} from '@daffodil/design';\nimport {\n DAFF_MENU_COMPONENTS,\n DaffMenuService,\n} from '@daffodil/design/menu';\n\nimport { DaffBreadcrumbItemComponent } from '../breadcrumb-item/breadcrumb-item.component';\nimport { DaffBreadcrumbMenuItemDirective } from '../breadcrumb-menu-item/breadcrumb-menu-item.directive';\nimport { DaffBreadcrumbRender } from '../breadcrumb-render/breadcrumb-render.type';\nimport { toRenderType } from '../breadcrumb-render/to-render-type';\n\n/**\n * Groups breadcrumb items. Must be applied to a native `<ol>` element.\n *\n * @example\n * ```html\n * <ol daff-breadcrumb>\n * <li daffBreadcrumbItem>\n * <a routerLink=\"/\">Home</a>\n * </li>\n * <li daffBreacrumbItem>\n * <span>Current page</span>\n * </li>\n * </ol>\n * ```\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'ol[daff-breadcrumb]',\n templateUrl: './breadcrumb.component.html',\n styleUrl: './breadcrumb.component.scss',\n hostDirectives: [\n { directive: DaffArticleEncapsulatedDirective },\n {\n directive: DaffSkeletonableDirective,\n inputs: ['skeleton'],\n },\n ],\n host: {\n 'class': 'daff-breadcrumb',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [\n DAFF_MENU_COMPONENTS,\n NgTemplateOutlet,\n DaffBreadcrumbMenuItemDirective,\n ],\n providers: [DaffMenuService],\n})\n\nexport class DaffBreadcrumbComponent implements AfterContentInit {\n\n constructor(\n private destroyRef: DestroyRef,\n private breakpointObserver: BreakpointObserver,\n ) {}\n\n /**\n * @docs-private\n */\n _isMobile = signal(false);\n\n /**\n * @docs-private\n */\n @ContentChildren(DaffBreadcrumbItemComponent) breadcrumbItems!: QueryList<DaffBreadcrumbItemComponent>;\n\n /**\n * @docs-private\n */\n @ViewChild('mobileMenu', { static: true }) fullMenu: TemplateRef<unknown>;\n\n /**\n * @docs-private\n */\n @ViewChild('desktopMenu', { static: true }) partialMenu: TemplateRef<unknown>;\n\n /**\n * @docs-private\n */\n _breadcrumbItems = contentChildren(DaffBreadcrumbItemComponent);\n\n /**\n * @docs-private\n */\n _partition = computed(() => {\n this._isMobile(); // signal rerenders breadcrumb on viewport change\n\n const items = this._breadcrumbItems();\n const visible: DaffBreadcrumbRender[] = [];\n const menu: DaffBreadcrumbItemComponent[] = [];\n\n for(let index = 0; index < items.length; index++) {\n const item = items[index];\n const res = toRenderType(item, items.length, index);\n if(res) {\n if(index === 0) {\n visible.push({ type: 'menu', target: 'mobileMenu' });\n }\n visible.push(res);\n } else {\n if(menu.length === 0) {\n visible.push({ type: 'menu', target: 'desktopMenu' });\n }\n menu.push(item);\n }\n }\n\n return { visible, menu };\n });\n\n /**\n * @docs-private\n */\n _computedBreadcrumbItems = computed(() => this._partition().visible);\n\n /**\n * @docs-private\n */\n _desktopMenuItems = computed(() => this._partition().menu);\n\n /**\n * @docs-private\n */\n _mobileMenuItems = computed(() => {\n const items = this._breadcrumbItems();\n return items.slice(0, items.length - 1);\n });\n\n /**\n * @docs-private\n */\n ngAfterContentInit() {\n this.updateActiveState();\n\n this.breadcrumbItems.changes\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.updateActiveState());\n\n this.breakpointObserver\n .observe([DaffBreakpoints.MOBILE])\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(result => {\n this._isMobile.set(!result.matches);\n });\n }\n\n private updateActiveState() {\n if (!this.breadcrumbItems.length) {\n return;\n }\n\n this.breadcrumbItems.forEach(item => item.setActive(false));\n\n this.breadcrumbItems.last.setActive(true);\n }\n}\n","@for (breadcrumbItem of _computedBreadcrumbItems(); track breadcrumbItem) {\n\t@if (breadcrumbItem.type === 'breadcrumb') {\n\t\t<li class=\"daff-breadcrumb__item\"\n\t\t\t[class.active]=\"breadcrumbItem.item._active\">\n\t\t\t<ng-container *ngTemplateOutlet=\"breadcrumbItem.item.itemRef\"></ng-container>\n\t\t</li>\n\t} @else {\n\t\t<li class=\"daff-breadcrumb__item\"\n\t\t\t[class.on-mobile]=\"breadcrumbItem.target === 'mobileMenu'\"\n\t\t\t[class.on-desktop]=\"breadcrumbItem.target === 'desktopMenu'\">\n\t\t\t<button class=\"daff-breadcrumb__menu-activator\"\n\t\t\t\t[daffMenuActivator]=\"breadcrumbItem.target === 'mobileMenu' ? mobileMenu : desktopMenu\"\n\t\t\t\taria-label=\"Show more breadcrumb items\">...</button>\n\t\t</li>\n\t}\n}\n\n<ng-template #mobileMenu>\n\t<daff-menu>\n\t\t@for (breadcrumbItem of _mobileMenuItems(); track breadcrumbItem) {\n\t\t\t<ng-container daffBreadcrumbMenuItem [ngTemplateOutlet]=\"breadcrumbItem.itemRef\"></ng-container>\n\t\t}\n\t</daff-menu>\t\n</ng-template>\n\n<ng-template #desktopMenu>\n\t<daff-menu>\n\t\t@for (breadcrumbItem of _desktopMenuItems(); track breadcrumbItem) {\n\t\t\t<ng-container daffBreadcrumbMenuItem [ngTemplateOutlet]=\"breadcrumbItem.itemRef\"></ng-container>\n\t\t}\n\t</daff-menu>\t\n</ng-template>","import { DaffBreadcrumbComponent } from './breadcrumb/breadcrumb.component';\nimport { DaffBreadcrumbItemComponent } from './breadcrumb-item/breadcrumb-item.component';\n\n/**\n * @docs-private\n */\nexport const DAFF_BREADCRUMB_COMPONENTS = <const> [\n DaffBreadcrumbComponent,\n DaffBreadcrumbItemComponent,\n];\n","import { NgModule } from '@angular/core';\n\nimport { DaffBreadcrumbComponent } from './breadcrumb/breadcrumb.component';\nimport { DaffBreadcrumbItemComponent } from './breadcrumb-item/breadcrumb-item.component';\n\n/**\n * @deprecated in favor of {@link DAFF_BREADCRUMB_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.\n */\n@NgModule({\n imports: [\n DaffBreadcrumbComponent,\n DaffBreadcrumbItemComponent,\n ],\n exports: [\n DaffBreadcrumbComponent,\n DaffBreadcrumbItemComponent,\n ],\n})\nexport class DaffBreadcrumbModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i3"],"mappings":";;;;;;;;;;AAAA;AAUA;;;;;;;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AAE,IAAI,EAAE;0FAKP,2BAA2B,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AErGhE;;AAEG;AACI,MAAM,0BAA0B,GAAW;IAChD,uBAAuB;IACvB,2BAA2B;;;ACH7B;;AAEG;MAWU,oBAAoB,CAAA;kIAApB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAApB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,YAR7B,uBAAuB;AACvB,YAAA,2BAA2B,aAG3B,uBAAuB;YACvB,2BAA2B,CAAA,EAAA,CAAA,CAAA;AAGlB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,YAR7B,uBAAuB,CAAA,EAAA,CAAA,CAAA;;4FAQd,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAVhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,uBAAuB;wBACvB,2BAA2B;AAC5B,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,uBAAuB;wBACvB,2BAA2B;AAC5B,qBAAA;AACF,iBAAA;;;ACjBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"daffodil-design-breadcrumb.mjs","sources":["../../../libs/design/breadcrumb/src/breadcrumb-item/breadcrumb-item.component.ts","../../../libs/design/breadcrumb/src/breadcrumb-menu-item/breadcrumb-menu-item.directive.ts","../../../libs/design/breadcrumb/src/breadcrumb-render/to-render-type.ts","../../../libs/design/breadcrumb/src/breadcrumb/breadcrumb.component.ts","../../../libs/design/breadcrumb/src/breadcrumb/breadcrumb.component.html","../../../libs/design/breadcrumb/src/breadcrumb.ts","../../../libs/design/breadcrumb/src/breadcrumb.module.ts","../../../libs/design/breadcrumb/src/daffodil-design-breadcrumb.ts"],"sourcesContent":["/* eslint-disable quote-props */\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n TemplateRef,\n ViewChild,\n} from '@angular/core';\n\n\n/**\n * Represents each individual breadcrumb item. Must be used on a `<li>` element.\n *\n * @example\n * ```html\n * <li daffBreadcrumbItem>\n * <a routerLink=\"/\">Link</a>\n * </li>\n * ```\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'li[daffBreadcrumbItem]',\n template: `\n <ng-template #item>\n <ng-content></ng-content>\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'class': 'daff-breadcrumb__item',\n '[attr.aria-current]': '_active ? \"page\" : null',\n },\n})\nexport class DaffBreadcrumbItemComponent {\n /**\n * @docs-private\n */\n @ViewChild('item', { read: TemplateRef, static: true }) itemRef: TemplateRef<any>;\n\n /**\n * @docs-private\n */\n _active = false;\n\n constructor( private cdRef: ChangeDetectorRef ) {}\n\n /** Called by the DaffBreadcrumbComponent to set the active state */\n setActive(value: boolean) {\n this._active = value;\n\n this.cdRef.detectChanges();\n }\n}\n","import { FocusableOption } from '@angular/cdk/a11y';\nimport {\n AfterViewInit,\n Directive,\n EmbeddedViewRef,\n OnDestroy,\n ViewContainerRef,\n} from '@angular/core';\n\nimport {\n provideDaffMenuItemToken,\n DaffMenuService,\n} from '@daffodil/design/menu';\n\n/**\n * @docs-private\n *\n * Applied to an `ng-container` that projects breadcrumb item templates into `daff-menu`,\n * allowing breadcrumb items to take on `daff-menu-item` styling and behavior.\n */\n@Directive({\n selector: '[daffBreadcrumbMenuItem]',\n providers: [provideDaffMenuItemToken(DaffBreadcrumbMenuItemDirective)],\n})\nexport class DaffBreadcrumbMenuItemDirective implements FocusableOption, AfterViewInit, OnDestroy {\n private _focusableElement: HTMLElement | null = null;\n private _clickHandler = () => this._menuService.close();\n\n constructor(\n private _viewContainerRef: ViewContainerRef,\n private _menuService: DaffMenuService,\n ) {}\n\n /**\n * @docs-private\n */\n ngAfterViewInit() {\n this._focusableElement = this._findFocusableElement();\n this._focusableElement?.classList.add('daff-menu-item'); // For styling\n this._focusableElement?.addEventListener('click', this._clickHandler);\n }\n\n focus() {\n this._focusableElement?.focus(); // Allows `FocusKeyManager` to focus on the element\n }\n\n private _findFocusableElement(): HTMLElement | null {\n const view = <EmbeddedViewRef<unknown>>this._viewContainerRef.get(0);\n return view?.rootNodes.find((n): n is HTMLElement => n.nodeType === Node.ELEMENT_NODE) ?? null;\n }\n\n ngOnDestroy() {\n this._focusableElement?.removeEventListener('click', this._clickHandler);\n this._focusableElement?.classList.remove('daff-menu-item');\n }\n}\n","import { DaffBreadcrumbItemComponent } from '../public_api';\nimport { DaffBreadcrumbRender } from './breadcrumb-render.type';\n\n/**\n * Determines whether a breadcrumb item should be rendered in the breadcrumb trail.\n * Returns a {@link DaffBreadcrumbRender} when the item should be visible,\n * or `null` when the item should be collapsed into a menu.\n *\n * When there are fewer than 5 items, all items are rendered.\n * Otherwise, only the first 2 and last 2 items are rendered.\n */\nexport const toRenderType = (item: DaffBreadcrumbItemComponent, length: number, index: number): DaffBreadcrumbRender | null => {\n if(length < 5) {\n return { item, type: 'breadcrumb' };\n }\n\n switch(index) {\n case 0:\n case 1:\n case length - 1:\n case length - 2:\n return { item, type: 'breadcrumb' };\n default:\n return null;\n }\n};\n","/* eslint-disable quote-props */\nimport { BreakpointObserver } from '@angular/cdk/layout';\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n ContentChildren,\n QueryList,\n AfterContentInit,\n DestroyRef,\n ViewChild,\n contentChildren,\n computed,\n TemplateRef,\n signal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\nimport {\n DaffArticleEncapsulatedDirective,\n DaffSkeletonableDirective,\n DaffBreakpoints,\n} from '@daffodil/design';\nimport {\n DAFF_MENU_COMPONENTS,\n DaffMenuService,\n} from '@daffodil/design/menu';\n\nimport { DaffBreadcrumbItemComponent } from '../breadcrumb-item/breadcrumb-item.component';\nimport { DaffBreadcrumbMenuItemDirective } from '../breadcrumb-menu-item/breadcrumb-menu-item.directive';\nimport { DaffBreadcrumbRender } from '../breadcrumb-render/breadcrumb-render.type';\nimport { toRenderType } from '../breadcrumb-render/to-render-type';\n\n/**\n * Groups breadcrumb items. Must be applied to a native `<ol>` element.\n *\n * @example\n * ```html\n * <ol daff-breadcrumb>\n * <li daffBreadcrumbItem>\n * <a routerLink=\"/\">Home</a>\n * </li>\n * <li daffBreacrumbItem>\n * <span>Current page</span>\n * </li>\n * </ol>\n * ```\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'ol[daff-breadcrumb]',\n templateUrl: './breadcrumb.component.html',\n styleUrl: './breadcrumb.component.scss',\n hostDirectives: [\n { directive: DaffArticleEncapsulatedDirective },\n {\n directive: DaffSkeletonableDirective,\n inputs: ['skeleton'],\n },\n ],\n host: {\n 'class': 'daff-breadcrumb',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [\n DAFF_MENU_COMPONENTS,\n NgTemplateOutlet,\n DaffBreadcrumbMenuItemDirective,\n ],\n providers: [DaffMenuService],\n})\n\nexport class DaffBreadcrumbComponent implements AfterContentInit {\n\n constructor(\n private destroyRef: DestroyRef,\n private breakpointObserver: BreakpointObserver,\n ) {}\n\n /**\n * @docs-private\n */\n _isMobile = signal(false);\n\n /**\n * @docs-private\n */\n @ContentChildren(DaffBreadcrumbItemComponent) breadcrumbItems!: QueryList<DaffBreadcrumbItemComponent>;\n\n /**\n * @docs-private\n */\n @ViewChild('mobileMenu', { static: true }) fullMenu: TemplateRef<unknown>;\n\n /**\n * @docs-private\n */\n @ViewChild('desktopMenu', { static: true }) partialMenu: TemplateRef<unknown>;\n\n /**\n * @docs-private\n */\n _breadcrumbItems = contentChildren(DaffBreadcrumbItemComponent);\n\n /**\n * @docs-private\n */\n _partition = computed(() => {\n this._isMobile(); // signal rerenders breadcrumb on viewport change\n\n const items = this._breadcrumbItems();\n const visible: DaffBreadcrumbRender[] = [];\n const menu: DaffBreadcrumbItemComponent[] = [];\n\n for(let index = 0; index < items.length; index++) {\n const item = items[index];\n const res = toRenderType(item, items.length, index);\n if(res) {\n if(index === 0) {\n visible.push({ type: 'menu', target: 'mobileMenu' });\n }\n visible.push(res);\n } else {\n if(menu.length === 0) {\n visible.push({ type: 'menu', target: 'desktopMenu' });\n }\n menu.push(item);\n }\n }\n\n return { visible, menu };\n });\n\n /**\n * @docs-private\n */\n _computedBreadcrumbItems = computed(() => this._partition().visible);\n\n /**\n * @docs-private\n */\n _desktopMenuItems = computed(() => this._partition().menu);\n\n /**\n * @docs-private\n */\n _mobileMenuItems = computed(() => {\n const items = this._breadcrumbItems();\n return items.slice(0, items.length - 1);\n });\n\n /**\n * @docs-private\n */\n ngAfterContentInit() {\n this.updateActiveState();\n\n this.breadcrumbItems.changes\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.updateActiveState());\n\n this.breakpointObserver\n .observe([DaffBreakpoints.MOBILE])\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(result => {\n this._isMobile.set(!result.matches);\n });\n }\n\n private updateActiveState() {\n if (!this.breadcrumbItems.length) {\n return;\n }\n\n this.breadcrumbItems.forEach(item => item.setActive(false));\n\n this.breadcrumbItems.last.setActive(true);\n }\n}\n","@for (breadcrumbItem of _computedBreadcrumbItems(); track breadcrumbItem) {\n\t@if (breadcrumbItem.type === 'breadcrumb') {\n\t\t<li class=\"daff-breadcrumb__item\"\n\t\t\t[class.active]=\"breadcrumbItem.item._active\">\n\t\t\t<ng-container *ngTemplateOutlet=\"breadcrumbItem.item.itemRef\"></ng-container>\n\t\t</li>\n\t} @else {\n\t\t<li class=\"daff-breadcrumb__item\"\n\t\t\t[class.on-mobile]=\"breadcrumbItem.target === 'mobileMenu'\"\n\t\t\t[class.on-desktop]=\"breadcrumbItem.target === 'desktopMenu'\">\n\t\t\t<button class=\"daff-breadcrumb__menu-activator\"\n\t\t\t\t[daffMenuActivator]=\"breadcrumbItem.target === 'mobileMenu' ? mobileMenu : desktopMenu\"\n\t\t\t\taria-label=\"Show more breadcrumb items\">...</button>\n\t\t</li>\n\t}\n}\n\n<ng-template #mobileMenu>\n\t<daff-menu>\n\t\t@for (breadcrumbItem of _mobileMenuItems(); track breadcrumbItem) {\n\t\t\t<ng-container daffBreadcrumbMenuItem [ngTemplateOutlet]=\"breadcrumbItem.itemRef\"></ng-container>\n\t\t}\n\t</daff-menu>\t\n</ng-template>\n\n<ng-template #desktopMenu>\n\t<daff-menu>\n\t\t@for (breadcrumbItem of _desktopMenuItems(); track breadcrumbItem) {\n\t\t\t<ng-container daffBreadcrumbMenuItem [ngTemplateOutlet]=\"breadcrumbItem.itemRef\"></ng-container>\n\t\t}\n\t</daff-menu>\t\n</ng-template>","import { DaffBreadcrumbComponent } from './breadcrumb/breadcrumb.component';\nimport { DaffBreadcrumbItemComponent } from './breadcrumb-item/breadcrumb-item.component';\n\n/**\n * @docs-private\n */\nexport const DAFF_BREADCRUMB_COMPONENTS = <const> [\n DaffBreadcrumbComponent,\n DaffBreadcrumbItemComponent,\n];\n","import { NgModule } from '@angular/core';\n\nimport { DaffBreadcrumbComponent } from './breadcrumb/breadcrumb.component';\nimport { DaffBreadcrumbItemComponent } from './breadcrumb-item/breadcrumb-item.component';\n\n/**\n * @deprecated in favor of {@link DAFF_BREADCRUMB_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.\n */\n@NgModule({\n imports: [\n DaffBreadcrumbComponent,\n DaffBreadcrumbItemComponent,\n ],\n exports: [\n DaffBreadcrumbComponent,\n DaffBreadcrumbItemComponent,\n ],\n})\nexport class DaffBreadcrumbModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i3"],"mappings":";;;;;;;;;;AAAA;AAUA;;;;;;;;;AASG;MAeU,2BAA2B,CAAA;AAWtC,IAAA,WAAA,CAAqB,KAAwB,EAAA;QAAxB,IAAA,CAAA,KAAK,GAAL,KAAK;AAL1B;;AAEG;QACH,IAAA,CAAA,OAAO,GAAG,KAAK;IAEkC;;AAGjD,IAAA,SAAS,CAAC,KAAc,EAAA;AACtB,QAAA,IAAI,CAAC,OAAO,GAAG,KAAK;AAEpB,QAAA,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE;IAC5B;iIAlBW,2BAA2B,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,iBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;qHAA3B,2BAA2B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,wBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,mBAAA,EAAA,2BAAA,EAAA,EAAA,cAAA,EAAA,uBAAA,EAAA,EAAA,WAAA,EAAA,CAAA,EAAA,YAAA,EAAA,SAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,MAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,IAAA,EAIX,WAAW,EAAA,MAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAf5B;;;;AAIT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAOU,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBAdvC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA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@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { CommonModule } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { Directive,
|
|
3
|
+
import { Directive, input, ContentChild, ChangeDetectionStrategy, ViewEncapsulation, Component, HostBinding, NgModule } from '@angular/core';
|
|
4
4
|
import { DaffSpinnerComponent } from '@daffodil/design/spinner';
|
|
5
|
-
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
6
5
|
import * as i2 from '@daffodil/design';
|
|
7
6
|
import { DaffSizableDirective, DaffPrefixDirective, DaffSuffixDirective, DaffArticleEncapsulatedDirective, DaffStatusableDirective, DaffColorableDirective, DaffDisableableDirective, DaffLoadableDirective } from '@daffodil/design';
|
|
8
7
|
|
|
9
8
|
class DaffButtonSizableDirective extends DaffSizableDirective {
|
|
10
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
11
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
9
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffButtonSizableDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
10
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: DaffButtonSizableDirective, isStandalone: true, usesInheritance: true, ngImport: i0 }); }
|
|
12
11
|
}
|
|
13
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffButtonSizableDirective, decorators: [{
|
|
14
13
|
type: Directive,
|
|
15
14
|
args: [{}]
|
|
16
15
|
}] });
|
|
@@ -23,7 +22,7 @@ class DaffButtonBaseDirective {
|
|
|
23
22
|
/**
|
|
24
23
|
* Sets the tabindex.
|
|
25
24
|
*/
|
|
26
|
-
this.tabindex = 0;
|
|
25
|
+
this.tabindex = input(0, ...(ngDevMode ? [{ debugName: "tabindex" }] : /* istanbul ignore next */ []));
|
|
27
26
|
/**
|
|
28
27
|
* Sets the default size of a button to medium.
|
|
29
28
|
*/
|
|
@@ -35,9 +34,6 @@ class DaffButtonBaseDirective {
|
|
|
35
34
|
get disabled() {
|
|
36
35
|
return this.disabledDirective.disabled;
|
|
37
36
|
}
|
|
38
|
-
set disabled(value) {
|
|
39
|
-
this.disabledDirective.disabled = coerceBooleanProperty(value);
|
|
40
|
-
}
|
|
41
37
|
/**
|
|
42
38
|
* @docs-private
|
|
43
39
|
*
|
|
@@ -54,10 +50,10 @@ class DaffButtonBaseDirective {
|
|
|
54
50
|
get buttonSize() {
|
|
55
51
|
return this.buttonSizable.size;
|
|
56
52
|
}
|
|
57
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
58
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
53
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffButtonBaseDirective, deps: [{ token: DaffButtonSizableDirective }, { token: i2.DaffDisableableDirective }, { token: i2.DaffLoadableDirective }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
54
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: DaffButtonBaseDirective, isStandalone: true, selector: "[daffButtonBase]", inputs: { tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.disabled": "disabled ? true : null", "attr.aria-disabled": "disabled ? true : null", "attr.tabindex": "disabled ? -1 : tabindex()" } }, queries: [{ propertyName: "_prefix", first: true, predicate: DaffPrefixDirective, descendants: true, static: true }, { propertyName: "_suffix", first: true, predicate: DaffSuffixDirective, descendants: true, static: true }], hostDirectives: [{ directive: i2.DaffArticleEncapsulatedDirective }, { directive: DaffButtonSizableDirective, inputs: ["size", "size"] }, { directive: i2.DaffStatusableDirective, inputs: ["status", "status"] }, { directive: i2.DaffColorableDirective, inputs: ["color", "color"] }, { directive: i2.DaffDisableableDirective, inputs: ["disabled", "disabled"] }, { directive: i2.DaffLoadableDirective, inputs: ["loading", "loading"] }], ngImport: i0 }); }
|
|
59
55
|
}
|
|
60
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
56
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffButtonBaseDirective, decorators: [{
|
|
61
57
|
type: Directive,
|
|
62
58
|
args: [{
|
|
63
59
|
selector: '[daffButtonBase]',
|
|
@@ -87,7 +83,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
87
83
|
host: {
|
|
88
84
|
'[attr.disabled]': 'disabled ? true : null',
|
|
89
85
|
'[attr.aria-disabled]': 'disabled ? true : null',
|
|
90
|
-
'[attr.tabindex]': 'disabled ? -1 :
|
|
86
|
+
'[attr.tabindex]': 'disabled ? -1 : tabindex()',
|
|
91
87
|
},
|
|
92
88
|
}]
|
|
93
89
|
}], ctorParameters: () => [{ type: DaffButtonSizableDirective }, { type: i2.DaffDisableableDirective }, { type: i2.DaffLoadableDirective }], propDecorators: { _prefix: [{
|
|
@@ -96,11 +92,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
96
92
|
}], _suffix: [{
|
|
97
93
|
type: ContentChild,
|
|
98
94
|
args: [DaffSuffixDirective, { static: true }]
|
|
99
|
-
}], tabindex: [{
|
|
100
|
-
type: Input
|
|
101
|
-
}], disabled: [{
|
|
102
|
-
type: Input
|
|
103
|
-
}] } });
|
|
95
|
+
}], tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }] } });
|
|
104
96
|
|
|
105
97
|
/**
|
|
106
98
|
* DaffButtonComponent is a rectangular contained button with background color.
|
|
@@ -127,22 +119,20 @@ class DaffButtonComponent extends DaffButtonBaseDirective {
|
|
|
127
119
|
/**
|
|
128
120
|
* Whether or not the button displays a shadow.
|
|
129
121
|
*/
|
|
130
|
-
this.elevated = false;
|
|
122
|
+
this.elevated = input(false, ...(ngDevMode ? [{ debugName: "elevated" }] : /* istanbul ignore next */ []));
|
|
131
123
|
}
|
|
132
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
133
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
124
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
125
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: DaffButtonComponent, isStandalone: true, selector: "button[daff-button],a[daff-button]", inputs: { elevated: { classPropertyName: "elevated", publicName: "elevated", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.elevated": "elevated()" }, classAttribute: "daff-button" }, usesInheritance: true, ngImport: i0, template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n@if (loading) {\n <daff-spinner class=\"daff-button__loading\" [size]=\"buttonSize\"></daff-spinner>\n}\n<span class=\"daff-button__content\">\n <ng-content></ng-content>\n</span>\n@if (_suffix) {\n <ng-content select=\"[daffSuffix]\"></ng-content>\n}", styles: [".daff-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-flex;justify-content:center;align-items:center;gap:.5rem;appearance:none;border:none;border-radius:.25rem;position:relative;text-align:center;text-decoration:none}.daff-button[disabled],.daff-button.daff-disabled{cursor:not-allowed;opacity:.5}.daff-button .daff-button__content,.daff-button .daff-prefix,.daff-button .daff-suffix{z-index:1}.daff-button .daff-button__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daff-button.daff-loading .daff-button__content,.daff-button.daff-loading .daff-prefix,.daff-button.daff-loading .daff-suffix{opacity:0}.daff-button.daff-loading .daff-button__loading{z-index:5;position:absolute}.daff-button:not(.daff-button[disabled],.daff-button.daff-disabled):after{content:\"\";border-radius:4px;position:absolute;width:100%;height:100%;opacity:0;pointer-events:none;transition:opacity .3s;z-index:0}.daff-button:not(.daff-button[disabled],.daff-button.daff-disabled):active:after{opacity:1}@media(hover:hover){.daff-button:not(.daff-button[disabled],.daff-button.daff-disabled):hover:after{opacity:1}}.daff-button.elevated{box-shadow:0 1px 5px -4px #00000080,0 4px 8px #0000000d}@media(hover:hover){.daff-button.elevated:hover{box-shadow:0 6px 12px #00000014,0 4px 6px #0000000a}}.daff-button.elevated[disabled]:hover,.daff-button.elevated.daff-disabled:hover{box-shadow:0 1px 5px -4px #00000080,0 4px 8px #0000000d}.daff-button.daff-sm{font-size:.875rem;line-height:2rem;height:2rem;padding:0 1rem}.daff-button.daff-md{font-size:1rem;line-height:3rem;height:3rem;padding:0 1.5rem}.daff-button.daff-lg{font-size:1.25rem;line-height:3.5rem;height:3.5rem;padding:0 1.5rem}\n"], dependencies: [{ kind: "component", type: DaffSpinnerComponent, selector: "daff-spinner", inputs: ["aria-label"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
134
126
|
}
|
|
135
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
127
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffButtonComponent, decorators: [{
|
|
136
128
|
type: Component,
|
|
137
129
|
args: [{ selector: 'button[daff-button]' + ',' + 'a[daff-button]', host: {
|
|
138
130
|
'class': 'daff-button',
|
|
139
|
-
'[class.elevated]': 'elevated',
|
|
131
|
+
'[class.elevated]': 'elevated()',
|
|
140
132
|
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
141
133
|
DaffSpinnerComponent,
|
|
142
134
|
], template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n@if (loading) {\n <daff-spinner class=\"daff-button__loading\" [size]=\"buttonSize\"></daff-spinner>\n}\n<span class=\"daff-button__content\">\n <ng-content></ng-content>\n</span>\n@if (_suffix) {\n <ng-content select=\"[daffSuffix]\"></ng-content>\n}", styles: [".daff-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-flex;justify-content:center;align-items:center;gap:.5rem;appearance:none;border:none;border-radius:.25rem;position:relative;text-align:center;text-decoration:none}.daff-button[disabled],.daff-button.daff-disabled{cursor:not-allowed;opacity:.5}.daff-button .daff-button__content,.daff-button .daff-prefix,.daff-button .daff-suffix{z-index:1}.daff-button .daff-button__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daff-button.daff-loading .daff-button__content,.daff-button.daff-loading .daff-prefix,.daff-button.daff-loading .daff-suffix{opacity:0}.daff-button.daff-loading .daff-button__loading{z-index:5;position:absolute}.daff-button:not(.daff-button[disabled],.daff-button.daff-disabled):after{content:\"\";border-radius:4px;position:absolute;width:100%;height:100%;opacity:0;pointer-events:none;transition:opacity .3s;z-index:0}.daff-button:not(.daff-button[disabled],.daff-button.daff-disabled):active:after{opacity:1}@media(hover:hover){.daff-button:not(.daff-button[disabled],.daff-button.daff-disabled):hover:after{opacity:1}}.daff-button.elevated{box-shadow:0 1px 5px -4px #00000080,0 4px 8px #0000000d}@media(hover:hover){.daff-button.elevated:hover{box-shadow:0 6px 12px #00000014,0 4px 6px #0000000a}}.daff-button.elevated[disabled]:hover,.daff-button.elevated.daff-disabled:hover{box-shadow:0 1px 5px -4px #00000080,0 4px 8px #0000000d}.daff-button.daff-sm{font-size:.875rem;line-height:2rem;height:2rem;padding:0 1rem}.daff-button.daff-md{font-size:1rem;line-height:3rem;height:3rem;padding:0 1.5rem}.daff-button.daff-lg{font-size:1.25rem;line-height:3.5rem;height:3.5rem;padding:0 1.5rem}\n"] }]
|
|
143
|
-
}], propDecorators: { elevated: [{
|
|
144
|
-
type: Input
|
|
145
|
-
}] } });
|
|
135
|
+
}], propDecorators: { elevated: [{ type: i0.Input, args: [{ isSignal: true, alias: "elevated", required: false }] }] } });
|
|
146
136
|
|
|
147
137
|
/**
|
|
148
138
|
* DaffFlatButtonComponent is a rectangular contained button no background.
|
|
@@ -163,10 +153,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
163
153
|
* ```
|
|
164
154
|
*/
|
|
165
155
|
class DaffFlatButtonComponent extends DaffButtonBaseDirective {
|
|
166
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
167
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
156
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffFlatButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
157
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: DaffFlatButtonComponent, isStandalone: true, selector: "button[daff-flat-button],a[daff-flat-button]", host: { classAttribute: "daff-flat-button" }, usesInheritance: true, ngImport: i0, template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n@if (loading) {\n <daff-spinner class=\"daff-button__loading\" [size]=\"buttonSize\"></daff-spinner>\n}\n<span class=\"daff-button__content\">\n <ng-content></ng-content>\n</span>\n@if (_suffix) {\n <ng-content select=\"[daffSuffix]\"></ng-content>\n}", styles: [".daff-flat-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-flex;justify-content:center;align-items:center;gap:.5rem;appearance:none;border-radius:.25rem;position:relative;text-align:center;text-decoration:none;background:none;border:none}.daff-flat-button[disabled],.daff-flat-button.daff-disabled{cursor:not-allowed;opacity:.5}.daff-flat-button .daff-button__content,.daff-flat-button .daff-prefix,.daff-flat-button .daff-suffix{z-index:1}.daff-flat-button .daff-button__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daff-flat-button.daff-loading .daff-button__content,.daff-flat-button.daff-loading .daff-prefix,.daff-flat-button.daff-loading .daff-suffix{opacity:0}.daff-flat-button.daff-loading .daff-button__loading{z-index:5;position:absolute}.daff-flat-button:not(.daff-flat-button[disabled],.daff-flat-button.daff-disabled):after{content:\"\";border-radius:4px;position:absolute;width:100%;height:100%;opacity:0;pointer-events:none;transition:opacity .3s;z-index:0}.daff-flat-button:not(.daff-flat-button[disabled],.daff-flat-button.daff-disabled):active:after{opacity:1}@media(hover:hover){.daff-flat-button:not(.daff-flat-button[disabled],.daff-flat-button.daff-disabled):hover:after{opacity:1}}.daff-flat-button.daff-sm{font-size:.875rem;line-height:2rem;height:2rem;padding:0 1rem}.daff-flat-button.daff-md{font-size:1rem;line-height:3rem;height:3rem;padding:0 1.5rem}.daff-flat-button.daff-lg{font-size:1.25rem;line-height:3.5rem;height:3.5rem;padding:0 1.5rem}\n"], dependencies: [{ kind: "component", type: DaffSpinnerComponent, selector: "daff-spinner", inputs: ["aria-label"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
168
158
|
}
|
|
169
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
159
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffFlatButtonComponent, decorators: [{
|
|
170
160
|
type: Component,
|
|
171
161
|
args: [{ selector: 'button[daff-flat-button]' + ',' + 'a[daff-flat-button]', host: {
|
|
172
162
|
class: 'daff-flat-button',
|
|
@@ -191,10 +181,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
191
181
|
*/
|
|
192
182
|
/* eslint-disable quote-props */
|
|
193
183
|
class DaffIconButtonComponent extends DaffButtonBaseDirective {
|
|
194
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
195
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
184
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffIconButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
185
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: DaffIconButtonComponent, isStandalone: true, selector: "button[daff-icon-button],a[daff-icon-button]", host: { classAttribute: "daff-icon-button" }, usesInheritance: true, ngImport: i0, template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n@if (loading) {\n <daff-spinner class=\"daff-button__loading\" [size]=\"buttonSize\"></daff-spinner>\n}\n<span class=\"daff-button__content\">\n <ng-content></ng-content>\n</span>\n@if (_suffix) {\n <ng-content select=\"[daffSuffix]\"></ng-content>\n}", styles: [".daff-icon-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-flex;justify-content:center;align-items:center;gap:.5rem;appearance:none;border:none;border-radius:.25rem;position:relative;text-align:center;text-decoration:none;background:none;border:0;padding:0}.daff-icon-button[disabled],.daff-icon-button.daff-disabled{cursor:not-allowed;opacity:.5}.daff-icon-button .daff-button__content,.daff-icon-button .daff-prefix,.daff-icon-button .daff-suffix{z-index:1}.daff-icon-button .daff-button__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daff-icon-button.daff-loading .daff-button__content,.daff-icon-button.daff-loading .daff-prefix,.daff-icon-button.daff-loading .daff-suffix{opacity:0}.daff-icon-button.daff-loading .daff-button__loading{z-index:5;position:absolute}.daff-icon-button.daff-sm{font-size:.875rem;line-height:2rem;height:2rem;width:2rem}.daff-icon-button.daff-md{font-size:1rem;line-height:3rem;height:3rem;width:3rem}.daff-icon-button.daff-lg{font-size:1.25rem;line-height:3.5rem;height:3.5rem;width:3.5rem}\n"], dependencies: [{ kind: "component", type: DaffSpinnerComponent, selector: "daff-spinner", inputs: ["aria-label"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
196
186
|
}
|
|
197
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
187
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffIconButtonComponent, decorators: [{
|
|
198
188
|
type: Component,
|
|
199
189
|
args: [{ selector: 'button[daff-icon-button]' + ',' + 'a[daff-icon-button]', host: {
|
|
200
190
|
'class': 'daff-icon-button',
|
|
@@ -231,10 +221,10 @@ class DaffRaisedButtonComponent extends DaffButtonBaseDirective {
|
|
|
231
221
|
*/
|
|
232
222
|
this.class = true;
|
|
233
223
|
}
|
|
234
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
235
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
224
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffRaisedButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
225
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: DaffRaisedButtonComponent, isStandalone: true, selector: "button[daff-raised-button],a[daff-raised-button]", host: { properties: { "class.daff-raised-button": "this.class" } }, usesInheritance: true, ngImport: i0, template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n@if (loading) {\n <daff-spinner class=\"daff-button__loading\" [size]=\"buttonSize\"></daff-spinner>\n}\n<span class=\"daff-button__content\">\n <ng-content></ng-content>\n</span>\n@if (_suffix) {\n <ng-content select=\"[daffSuffix]\"></ng-content>\n}", styles: [".daff-raised-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-flex;justify-content:center;align-items:center;gap:.5rem;appearance:none;border:none;border-radius:.25rem;position:relative;text-align:center;text-decoration:none}.daff-raised-button[disabled],.daff-raised-button.daff-disabled{cursor:not-allowed;opacity:.5}.daff-raised-button .daff-button__content,.daff-raised-button .daff-prefix,.daff-raised-button .daff-suffix{z-index:1}.daff-raised-button .daff-button__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daff-raised-button.daff-loading .daff-button__content,.daff-raised-button.daff-loading .daff-prefix,.daff-raised-button.daff-loading .daff-suffix{opacity:0}.daff-raised-button.daff-loading .daff-button__loading{z-index:5;position:absolute}.daff-raised-button:not(.daff-raised-button[disabled],.daff-raised-button.daff-disabled):after{content:\"\";border-radius:0;position:absolute;width:100%;height:100%;opacity:0;pointer-events:none;transition:opacity .3s;z-index:0}.daff-raised-button:not(.daff-raised-button[disabled],.daff-raised-button.daff-disabled):active:after{opacity:1}@media(hover:hover){.daff-raised-button:not(.daff-raised-button[disabled],.daff-raised-button.daff-disabled):hover:after{opacity:1}}.daff-raised-button.daff-sm{font-size:.875rem;line-height:2rem;height:2rem;padding:0 1rem}.daff-raised-button.daff-md{font-size:1rem;line-height:3rem;height:3rem;padding:0 1.5rem}.daff-raised-button.daff-lg{font-size:1.25rem;line-height:3.5rem;height:3.5rem;padding:0 1.5rem}\n"], dependencies: [{ kind: "component", type: DaffSpinnerComponent, selector: "daff-spinner", inputs: ["aria-label"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
236
226
|
}
|
|
237
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
227
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffRaisedButtonComponent, decorators: [{
|
|
238
228
|
type: Component,
|
|
239
229
|
args: [{ selector: 'button[daff-raised-button]' + ',' + 'a[daff-raised-button]', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
240
230
|
DaffSpinnerComponent,
|
|
@@ -269,12 +259,12 @@ class DaffStrokedButtonComponent extends DaffButtonBaseDirective {
|
|
|
269
259
|
/**
|
|
270
260
|
* Whether or not the button displays a shadow.
|
|
271
261
|
*/
|
|
272
|
-
this.elevated = false;
|
|
262
|
+
this.elevated = input(false, ...(ngDevMode ? [{ debugName: "elevated" }] : /* istanbul ignore next */ []));
|
|
273
263
|
}
|
|
274
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
275
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
264
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffStrokedButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
265
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: DaffStrokedButtonComponent, isStandalone: true, selector: "button[daff-stroked-button],a[daff-stroked-button]", inputs: { elevated: { classPropertyName: "elevated", publicName: "elevated", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.elevated": "elevated" }, classAttribute: "daff-stroked-button" }, usesInheritance: true, ngImport: i0, template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n@if (loading) {\n <daff-spinner class=\"daff-button__loading\" [size]=\"buttonSize\"></daff-spinner>\n}\n<span class=\"daff-button__content\">\n <ng-content></ng-content>\n</span>\n@if (_suffix) {\n <ng-content select=\"[daffSuffix]\"></ng-content>\n}", styles: [".daff-stroked-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-flex;justify-content:center;align-items:center;gap:.5rem;appearance:none;border:none;border-radius:.25rem;position:relative;text-align:center;text-decoration:none}.daff-stroked-button[disabled],.daff-stroked-button.daff-disabled{cursor:not-allowed;opacity:.5}.daff-stroked-button .daff-button__content,.daff-stroked-button .daff-prefix,.daff-stroked-button .daff-suffix{z-index:1}.daff-stroked-button .daff-button__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daff-stroked-button.daff-loading .daff-button__content,.daff-stroked-button.daff-loading .daff-prefix,.daff-stroked-button.daff-loading .daff-suffix{opacity:0}.daff-stroked-button.daff-loading .daff-button__loading{z-index:5;position:absolute}.daff-stroked-button:not(.daff-stroked-button[disabled],.daff-stroked-button.daff-disabled):after{content:\"\";border-radius:3px;position:absolute;width:100%;height:100%;opacity:0;pointer-events:none;transition:opacity .3s;z-index:0}.daff-stroked-button:not(.daff-stroked-button[disabled],.daff-stroked-button.daff-disabled):active:after{opacity:1}@media(hover:hover){.daff-stroked-button:not(.daff-stroked-button[disabled],.daff-stroked-button.daff-disabled):hover:after{opacity:1}}.daff-stroked-button.daff-sm{font-size:.875rem;line-height:2rem;height:2rem;padding:0 1rem}.daff-stroked-button.daff-md{font-size:1rem;line-height:3rem;height:3rem;padding:0 1.5rem}.daff-stroked-button.daff-lg{font-size:1.25rem;line-height:3.5rem;height:3.5rem;padding:0 1.5rem}.daff-stroked-button.elevated{box-shadow:0 1px 5px -4px #00000080,0 4px 8px #0000000d}@media(hover:hover){.daff-stroked-button.elevated:hover{box-shadow:0 6px 12px #00000014,0 4px 6px #0000000a}}.daff-stroked-button.elevated[disabled]:hover,.daff-stroked-button.elevated.daff-disabled:hover{box-shadow:0 1px 5px -4px #00000080,0 4px 8px #0000000d}\n"], dependencies: [{ kind: "component", type: DaffSpinnerComponent, selector: "daff-spinner", inputs: ["aria-label"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
276
266
|
}
|
|
277
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
267
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffStrokedButtonComponent, decorators: [{
|
|
278
268
|
type: Component,
|
|
279
269
|
args: [{ selector: 'button[daff-stroked-button]' + ',' + 'a[daff-stroked-button]', host: {
|
|
280
270
|
'class': 'daff-stroked-button',
|
|
@@ -282,9 +272,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
282
272
|
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
283
273
|
DaffSpinnerComponent,
|
|
284
274
|
], template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n@if (loading) {\n <daff-spinner class=\"daff-button__loading\" [size]=\"buttonSize\"></daff-spinner>\n}\n<span class=\"daff-button__content\">\n <ng-content></ng-content>\n</span>\n@if (_suffix) {\n <ng-content select=\"[daffSuffix]\"></ng-content>\n}", styles: [".daff-stroked-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-flex;justify-content:center;align-items:center;gap:.5rem;appearance:none;border:none;border-radius:.25rem;position:relative;text-align:center;text-decoration:none}.daff-stroked-button[disabled],.daff-stroked-button.daff-disabled{cursor:not-allowed;opacity:.5}.daff-stroked-button .daff-button__content,.daff-stroked-button .daff-prefix,.daff-stroked-button .daff-suffix{z-index:1}.daff-stroked-button .daff-button__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daff-stroked-button.daff-loading .daff-button__content,.daff-stroked-button.daff-loading .daff-prefix,.daff-stroked-button.daff-loading .daff-suffix{opacity:0}.daff-stroked-button.daff-loading .daff-button__loading{z-index:5;position:absolute}.daff-stroked-button:not(.daff-stroked-button[disabled],.daff-stroked-button.daff-disabled):after{content:\"\";border-radius:3px;position:absolute;width:100%;height:100%;opacity:0;pointer-events:none;transition:opacity .3s;z-index:0}.daff-stroked-button:not(.daff-stroked-button[disabled],.daff-stroked-button.daff-disabled):active:after{opacity:1}@media(hover:hover){.daff-stroked-button:not(.daff-stroked-button[disabled],.daff-stroked-button.daff-disabled):hover:after{opacity:1}}.daff-stroked-button.daff-sm{font-size:.875rem;line-height:2rem;height:2rem;padding:0 1rem}.daff-stroked-button.daff-md{font-size:1rem;line-height:3rem;height:3rem;padding:0 1.5rem}.daff-stroked-button.daff-lg{font-size:1.25rem;line-height:3.5rem;height:3.5rem;padding:0 1.5rem}.daff-stroked-button.elevated{box-shadow:0 1px 5px -4px #00000080,0 4px 8px #0000000d}@media(hover:hover){.daff-stroked-button.elevated:hover{box-shadow:0 6px 12px #00000014,0 4px 6px #0000000a}}.daff-stroked-button.elevated[disabled]:hover,.daff-stroked-button.elevated.daff-disabled:hover{box-shadow:0 1px 5px -4px #00000080,0 4px 8px #0000000d}\n"] }]
|
|
285
|
-
}], propDecorators: { elevated: [{
|
|
286
|
-
type: Input
|
|
287
|
-
}] } });
|
|
275
|
+
}], propDecorators: { elevated: [{ type: i0.Input, args: [{ isSignal: true, alias: "elevated", required: false }] }] } });
|
|
288
276
|
|
|
289
277
|
/**
|
|
290
278
|
* @deprecated Deprecated in version 0.92.0. Will be removed in version 1.0.0.
|
|
@@ -308,10 +296,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
308
296
|
*/
|
|
309
297
|
/* eslint-disable quote-props */
|
|
310
298
|
class DaffUnderlineButtonComponent extends DaffButtonBaseDirective {
|
|
311
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
312
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
299
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffUnderlineButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
300
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: DaffUnderlineButtonComponent, isStandalone: true, selector: "button[daff-underline-button],a[daff-underline-button]", host: { classAttribute: "daff-underline-button" }, usesInheritance: true, ngImport: i0, template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n@if (loading) {\n <daff-spinner class=\"daff-button__loading\" [size]=\"buttonSize\"></daff-spinner>\n}\n<span class=\"daff-button__content\">\n <ng-content></ng-content>\n</span>\n@if (_suffix) {\n <ng-content select=\"[daffSuffix]\"></ng-content>\n}", styles: [".daff-underline-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-flex;justify-content:center;align-items:center;gap:.5rem;appearance:none;border:none;border-radius:.25rem;position:relative;text-align:center;background:transparent;border:0;border-radius:0;line-height:1.25rem;overflow:hidden;text-decoration:none;vertical-align:middle}.daff-underline-button[disabled],.daff-underline-button.daff-disabled{cursor:not-allowed;opacity:.5}.daff-underline-button .daff-button__content,.daff-underline-button .daff-prefix,.daff-underline-button .daff-suffix{z-index:1}.daff-underline-button .daff-button__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daff-underline-button.daff-loading .daff-button__content,.daff-underline-button.daff-loading .daff-prefix,.daff-underline-button.daff-loading .daff-suffix{opacity:0}.daff-underline-button.daff-loading .daff-button__loading{z-index:5;position:absolute}.daff-underline-button[disabled],.daff-underline-button.daff-disabled{cursor:not-allowed}.daff-underline-button[disabled]:hover:after,.daff-underline-button[disabled]:active:after,.daff-underline-button.daff-disabled:hover:after,.daff-underline-button.daff-disabled:active:after{animation:none}.daff-underline-button:after{bottom:0;content:\"\";height:2px;left:0;opacity:1;position:absolute;width:100%}.daff-underline-button:hover:after{animation:none}@media(min-width:1024px){.daff-underline-button:hover:after{animation:underline-button-hover .7s ease}}.daff-underline-button.daff-sm{font-size:.875rem;height:1.25rem;padding:0 0 .25rem}.daff-underline-button.daff-md{font-size:1rem;height:1.5rem;padding:0 0 .25rem}.daff-underline-button.daff-lg{font-size:1.25rem;height:1.75rem;padding:0 0 .5rem}@keyframes underline-button-hover{0%{transform:translate(0)}50%{transform:translate(100%)}51%{transform:translate(-100%)}to{transform:translate(0)}}\n"], dependencies: [{ kind: "component", type: DaffSpinnerComponent, selector: "daff-spinner", inputs: ["aria-label"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
313
301
|
}
|
|
314
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
302
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffUnderlineButtonComponent, decorators: [{
|
|
315
303
|
type: Component,
|
|
316
304
|
args: [{ selector: 'button[daff-underline-button]' + ',' + 'a[daff-underline-button]', host: {
|
|
317
305
|
'class': 'daff-underline-button',
|
|
@@ -324,8 +312,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
324
312
|
* @deprecated in favor of {@link DAFF_BUTTON_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.
|
|
325
313
|
*/
|
|
326
314
|
class DaffButtonModule {
|
|
327
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
328
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
315
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
316
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: DaffButtonModule, imports: [CommonModule,
|
|
329
317
|
DaffButtonComponent,
|
|
330
318
|
DaffFlatButtonComponent,
|
|
331
319
|
DaffIconButtonComponent,
|
|
@@ -337,7 +325,7 @@ class DaffButtonModule {
|
|
|
337
325
|
DaffRaisedButtonComponent,
|
|
338
326
|
DaffStrokedButtonComponent,
|
|
339
327
|
DaffUnderlineButtonComponent] }); }
|
|
340
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
328
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffButtonModule, imports: [CommonModule,
|
|
341
329
|
DaffButtonComponent,
|
|
342
330
|
DaffFlatButtonComponent,
|
|
343
331
|
DaffIconButtonComponent,
|
|
@@ -345,7 +333,7 @@ class DaffButtonModule {
|
|
|
345
333
|
DaffStrokedButtonComponent,
|
|
346
334
|
DaffUnderlineButtonComponent] }); }
|
|
347
335
|
}
|
|
348
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
336
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffButtonModule, decorators: [{
|
|
349
337
|
type: NgModule,
|
|
350
338
|
args: [{
|
|
351
339
|
imports: [
|