@daffodil/design 0.78.0 → 0.79.0
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/atoms/form/form-field/form-field/form-field.component.d.ts +1 -1
- package/button/README.md +3 -3
- package/button/button/basic/button.component.d.ts +28 -0
- package/button/button/button-base.directive.d.ts +51 -0
- package/button/button/flat/flat.component.d.ts +28 -0
- package/button/button/icon/icon.component.d.ts +24 -0
- package/button/button/raised/raised.component.d.ts +28 -0
- package/button/button/stroked/stroked.component.d.ts +28 -0
- package/button/button/underline/underline.component.d.ts +28 -0
- package/button/button.d.ts +7 -2
- package/button/button.module.d.ts +8 -3
- package/button/public_api.d.ts +6 -1
- package/button/src/button/basic/button-theme.scss +145 -0
- package/button/src/button/button-base.scss +79 -0
- package/button/src/button/flat/flat-theme.scss +143 -0
- package/button/src/button/icon/icon-theme.scss +141 -0
- package/button/src/button/raised/raised-theme.scss +120 -0
- package/button/src/button/stroked/stroked-theme.scss +158 -0
- package/button/src/button/underline/underline-theme.scss +93 -0
- package/card/card.module.d.ts +1 -1
- package/container/container.module.d.ts +1 -1
- package/core/statusable/statusable.d.ts +5 -3
- package/core/statusable/statusable.directive.d.ts +6 -4
- package/esm2022/accordion/accordion/animation/accordion-animation.mjs +1 -4
- package/esm2022/atoms/form/form-field/form-field/form-field.component.mjs +2 -2
- package/esm2022/button/button/basic/button.component.mjs +48 -0
- package/esm2022/button/button/button-base.directive.mjs +105 -0
- package/esm2022/button/button/flat/flat.component.mjs +48 -0
- package/esm2022/button/button/icon/icon.component.mjs +44 -0
- package/esm2022/button/button/raised/raised.component.mjs +48 -0
- package/esm2022/button/button/stroked/stroked.component.mjs +48 -0
- package/esm2022/button/button/underline/underline.component.mjs +48 -0
- package/esm2022/button/button.mjs +12 -2
- package/esm2022/button/button.module.mjs +34 -4
- package/esm2022/button/examples/basic-button/basic-button.component.mjs +4 -6
- package/esm2022/button/examples/flat-button/flat-button.component.mjs +4 -6
- package/esm2022/button/examples/icon-button/icon-button.component.mjs +4 -6
- package/esm2022/button/examples/raised-button/raised-button.component.mjs +4 -6
- package/esm2022/button/examples/sizeable-button/sizeable-button.component.mjs +2 -2
- package/esm2022/button/examples/statusable-button/statusable-button.component.mjs +3 -3
- package/esm2022/button/examples/stroked-button/stroked-button.component.mjs +4 -6
- package/esm2022/button/examples/underline-button/underline-button.component.mjs +4 -6
- package/esm2022/button/public_api.mjs +7 -2
- package/esm2022/callout/examples/callout-text-alignment/callout-text-alignment.component.mjs +5 -7
- package/esm2022/callout/examples/callout-theming/callout-theming.component.mjs +5 -7
- package/esm2022/callout/examples/callout-with-grid/callout-with-grid.component.mjs +5 -6
- package/esm2022/callout/examples/compact-callout/compact-callout.component.mjs +4 -6
- package/esm2022/card/card.module.mjs +2 -2
- package/esm2022/card/examples/basic-card/basic-card.component.mjs +4 -6
- package/esm2022/card/examples/card-orientation/card-orientation.component.mjs +5 -7
- package/esm2022/checkbox/examples/basic-checkbox/basic-checkbox.component.mjs +4 -5
- package/esm2022/checkbox/examples/checkbox-set/checkbox-set.component.mjs +4 -5
- package/esm2022/container/container.module.mjs +2 -2
- package/esm2022/core/statusable/statusable.directive.mjs +7 -5
- package/esm2022/core/statusable/statusable.mjs +3 -2
- package/esm2022/hero/examples/compact-hero/compact-hero.component.mjs +4 -6
- package/esm2022/hero/examples/hero-text-alignment/hero-text-alignment.component.mjs +5 -7
- package/esm2022/hero/examples/hero-theming/hero-theming.component.mjs +5 -7
- package/esm2022/hero/examples/hero-with-grid/hero-with-grid.component.mjs +4 -6
- package/esm2022/hero/hero.module.mjs +2 -2
- package/esm2022/image/image.module.mjs +2 -2
- package/esm2022/link-set/link-set.module.mjs +2 -2
- package/esm2022/list/list.module.mjs +2 -2
- package/esm2022/loading-icon/examples/examples.mjs +1 -3
- package/esm2022/loading-icon/examples/loading-icon-color/loading-icon-color.component.mjs +2 -2
- package/esm2022/loading-icon/loading-icon/loading-icon.component.mjs +5 -20
- package/esm2022/loading-icon/loading-icon.module.mjs +2 -2
- package/esm2022/media-gallery/helpers/media-gallery-token.mjs +7 -3
- package/esm2022/media-gallery/media-gallery.module.mjs +2 -2
- package/esm2022/media-gallery/thumbnail/thumbnail-compat.token.mjs +8 -3
- package/esm2022/menu/examples/basic-menu/basic-menu.component.mjs +5 -7
- package/esm2022/modal/examples/basic-modal/basic-modal.component.mjs +4 -6
- package/esm2022/modal/examples/basic-modal/modal-content.component.mjs +4 -6
- package/esm2022/modal/modal-header/modal-header.component.mjs +4 -6
- package/esm2022/modal/modal.module.mjs +2 -2
- package/esm2022/navbar/examples/basic-navbar/basic-navbar.component.mjs +4 -6
- package/esm2022/navbar/examples/contained-navbar/contained-navbar.component.mjs +4 -6
- package/esm2022/navbar/examples/navbar-theming/navbar-theming.component.mjs +5 -7
- package/esm2022/navbar/examples/raised-navbar/raised-navbar.component.mjs +4 -6
- package/esm2022/navbar/navbar.module.mjs +2 -2
- package/esm2022/notification/examples/default-notification/default-notification.component.mjs +1 -3
- package/esm2022/notification/examples/notification-orientations/notification-orientations.component.mjs +1 -3
- package/esm2022/notification/examples/notification-status/notification-status.component.mjs +3 -5
- package/esm2022/notification/examples/notification-with-actions/notification-with-actions.component.mjs +4 -5
- package/esm2022/notification/notification/notification.component.mjs +3 -3
- package/esm2022/notification/notification.module.mjs +2 -2
- package/esm2022/paginator/paginator.module.mjs +2 -2
- package/esm2022/progress-bar/progress-bar.module.mjs +2 -2
- package/esm2022/sidebar/examples/over-and-under-sidebars/over-and-under-sidebars.component.mjs +5 -6
- package/esm2022/sidebar/sidebar-viewport/scroll-token/scroll.token.mjs +9 -3
- package/esm2022/sidebar/sidebar-viewport/sidebar-viewport.component.mjs +3 -3
- package/esm2022/sidebar/sidebar.module.mjs +2 -2
- package/esm2022/tabs/daffodil-design-tabs.mjs +5 -0
- package/esm2022/tabs/examples/basic-tabs/basic-tabs.component.mjs +22 -0
- package/esm2022/tabs/examples/custom-select-tabs/custom-select-tabs.component.mjs +34 -0
- package/esm2022/tabs/examples/daffodil-design-tabs-examples.mjs +5 -0
- package/esm2022/tabs/examples/disabled-tabs/disabled-tabs.component.mjs +22 -0
- package/esm2022/tabs/examples/index.mjs +2 -0
- package/esm2022/tabs/examples/initially-select-tab/initially-select-tab.component.mjs +22 -0
- package/esm2022/tabs/examples/public_api.mjs +11 -0
- package/esm2022/tabs/index.mjs +2 -0
- package/esm2022/tabs/public_api.mjs +6 -0
- package/esm2022/tabs/tabs/tab/tab.component.mjs +86 -0
- package/esm2022/tabs/tabs/tab-activator/tab-activator.component.mjs +83 -0
- package/esm2022/tabs/tabs/tab-label/tab-label.component.mjs +33 -0
- package/esm2022/tabs/tabs/tab-panel/tab-panel.component.mjs +68 -0
- package/esm2022/tabs/tabs/tabs.component.mjs +161 -0
- package/esm2022/tabs/tabs.mjs +13 -0
- package/esm2022/text-snippet/daffodil-design-text-snippet.mjs +5 -0
- package/esm2022/text-snippet/examples/basic-text-snippet/basic-text-snippet.component.mjs +14 -0
- package/esm2022/text-snippet/examples/daffodil-design-text-snippet-examples.mjs +5 -0
- package/esm2022/text-snippet/examples/index.mjs +2 -0
- package/esm2022/text-snippet/examples/public_api.mjs +5 -0
- package/esm2022/text-snippet/index.mjs +2 -0
- package/esm2022/text-snippet/public_api.mjs +2 -0
- package/esm2022/text-snippet/text-snippet.component.mjs +46 -0
- package/esm2022/toast/examples/default-toast/default-toast.component.mjs +4 -6
- package/esm2022/toast/examples/toast-positions/toast-positions.component.mjs +4 -6
- package/esm2022/toast/examples/toast-status/toast-status.component.mjs +8 -10
- package/esm2022/toast/examples/toast-with-custom-duration/toast-with-custom-duration.component.mjs +4 -6
- package/esm2022/toast/options/daff-toast-options.mjs +7 -7
- package/esm2022/toast/toast/toast-provider.mjs +2 -2
- package/esm2022/toast/toast/toast-template.component.mjs +2 -2
- package/esm2022/toast/toast.module.mjs +2 -2
- package/esm2022/tree/tree.module.mjs +2 -2
- package/fesm2022/daffodil-design-accordion.mjs +0 -3
- package/fesm2022/daffodil-design-accordion.mjs.map +1 -1
- package/fesm2022/daffodil-design-button-examples.mjs +16 -16
- package/fesm2022/daffodil-design-button-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-button.mjs +305 -131
- package/fesm2022/daffodil-design-button.mjs.map +1 -1
- package/fesm2022/daffodil-design-callout-examples.mjs +12 -13
- package/fesm2022/daffodil-design-callout-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-card-examples.mjs +10 -12
- package/fesm2022/daffodil-design-card-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-card.mjs +1 -1
- package/fesm2022/daffodil-design-card.mjs.map +1 -1
- package/fesm2022/daffodil-design-checkbox-examples.mjs +5 -6
- package/fesm2022/daffodil-design-checkbox-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-container.mjs +1 -1
- package/fesm2022/daffodil-design-container.mjs.map +1 -1
- package/fesm2022/daffodil-design-hero-examples.mjs +11 -13
- package/fesm2022/daffodil-design-hero-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-hero.mjs +1 -1
- package/fesm2022/daffodil-design-hero.mjs.map +1 -1
- package/fesm2022/daffodil-design-image.mjs +1 -1
- package/fesm2022/daffodil-design-image.mjs.map +1 -1
- package/fesm2022/daffodil-design-link-set.mjs +1 -1
- package/fesm2022/daffodil-design-link-set.mjs.map +1 -1
- package/fesm2022/daffodil-design-list.mjs +1 -1
- package/fesm2022/daffodil-design-list.mjs.map +1 -1
- package/fesm2022/daffodil-design-loading-icon-examples.mjs +1 -13
- package/fesm2022/daffodil-design-loading-icon-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-loading-icon.mjs +5 -20
- package/fesm2022/daffodil-design-loading-icon.mjs.map +1 -1
- package/fesm2022/daffodil-design-media-gallery.mjs +14 -4
- package/fesm2022/daffodil-design-media-gallery.mjs.map +1 -1
- package/fesm2022/daffodil-design-menu-examples.mjs +3 -5
- package/fesm2022/daffodil-design-menu-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-modal-examples.mjs +5 -7
- package/fesm2022/daffodil-design-modal-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-modal.mjs +4 -5
- package/fesm2022/daffodil-design-modal.mjs.map +1 -1
- package/fesm2022/daffodil-design-navbar-examples.mjs +11 -13
- package/fesm2022/daffodil-design-navbar-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-navbar.mjs +1 -1
- package/fesm2022/daffodil-design-navbar.mjs.map +1 -1
- package/fesm2022/daffodil-design-notification-examples.mjs +5 -9
- package/fesm2022/daffodil-design-notification-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-notification.mjs +3 -3
- package/fesm2022/daffodil-design-notification.mjs.map +1 -1
- package/fesm2022/daffodil-design-paginator.mjs +1 -1
- package/fesm2022/daffodil-design-paginator.mjs.map +1 -1
- package/fesm2022/daffodil-design-progress-bar.mjs +1 -1
- package/fesm2022/daffodil-design-progress-bar.mjs.map +1 -1
- package/fesm2022/daffodil-design-sidebar-examples.mjs +4 -5
- package/fesm2022/daffodil-design-sidebar-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-sidebar.mjs +11 -5
- package/fesm2022/daffodil-design-sidebar.mjs.map +1 -1
- package/fesm2022/daffodil-design-tabs-examples.mjs +93 -0
- package/fesm2022/daffodil-design-tabs-examples.mjs.map +1 -0
- package/fesm2022/daffodil-design-tabs.mjs +431 -0
- package/fesm2022/daffodil-design-tabs.mjs.map +1 -0
- package/fesm2022/daffodil-design-text-snippet-examples.mjs +25 -0
- package/fesm2022/daffodil-design-text-snippet-examples.mjs.map +1 -0
- package/fesm2022/daffodil-design-text-snippet.mjs +53 -0
- package/fesm2022/daffodil-design-text-snippet.mjs.map +1 -0
- package/fesm2022/daffodil-design-toast-examples.mjs +13 -15
- package/fesm2022/daffodil-design-toast-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-toast.mjs +11 -10
- package/fesm2022/daffodil-design-toast.mjs.map +1 -1
- package/fesm2022/daffodil-design-tree.mjs +1 -1
- package/fesm2022/daffodil-design-tree.mjs.map +1 -1
- package/fesm2022/daffodil-design.mjs +9 -6
- package/fesm2022/daffodil-design.mjs.map +1 -1
- package/hero/hero.module.d.ts +1 -1
- package/image/README.md +4 -1
- package/image/image.module.d.ts +1 -1
- package/link-set/README.md +1 -1
- package/link-set/link-set.module.d.ts +1 -1
- package/list/list.module.d.ts +1 -1
- package/loading-icon/README.md +0 -5
- package/loading-icon/examples/examples.d.ts +2 -2
- package/loading-icon/loading-icon/loading-icon.component.d.ts +1 -9
- package/loading-icon/loading-icon.module.d.ts +1 -1
- package/media-gallery/README.md +4 -1
- package/media-gallery/helpers/media-gallery-token.d.ts +1 -2
- package/media-gallery/media-gallery.module.d.ts +1 -1
- package/media-gallery/thumbnail/thumbnail-compat.token.d.ts +1 -5
- package/modal/modal.module.d.ts +1 -1
- package/navbar/navbar.module.d.ts +1 -1
- package/notification/README.md +2 -2
- package/notification/notification/notification.component.d.ts +1 -1
- package/notification/notification.module.d.ts +1 -1
- package/notification/src/notification-theme.scss +17 -13
- package/package.json +1 -1
- package/paginator/paginator.module.d.ts +1 -1
- package/progress-bar/progress-bar.module.d.ts +1 -1
- package/scss/theme.scss +13 -1
- package/scss/theming/_configure-theme.scss +60 -2
- package/scss/theming/_theme-css-variables.scss +1 -1
- package/sidebar/sidebar-viewport/scroll-token/scroll.token.d.ts +1 -7
- package/sidebar/sidebar-viewport/sidebar-viewport.component.d.ts +1 -1
- package/sidebar/sidebar.module.d.ts +1 -1
- package/tabs/README.md +19 -0
- package/tabs/examples/basic-tabs/basic-tabs.component.d.ts +6 -0
- package/tabs/examples/custom-select-tabs/custom-select-tabs.component.d.ts +11 -0
- package/tabs/examples/disabled-tabs/disabled-tabs.component.d.ts +6 -0
- package/tabs/examples/index.d.ts +1 -0
- package/tabs/examples/initially-select-tab/initially-select-tab.component.d.ts +6 -0
- package/tabs/examples/public_api.d.ts +2 -0
- package/tabs/index.d.ts +1 -0
- package/tabs/public_api.d.ts +5 -0
- package/tabs/src/tabs-theme.scss +22 -0
- package/tabs/tabs/tab/tab.component.d.ts +57 -0
- package/tabs/tabs/tab-activator/tab-activator.component.d.ts +37 -0
- package/tabs/tabs/tab-label/tab-label.component.d.ts +19 -0
- package/tabs/tabs/tab-panel/tab-panel.component.d.ts +38 -0
- package/tabs/tabs/tabs.component.d.ts +104 -0
- package/tabs/tabs.d.ts +6 -0
- package/text-snippet/README.md +2 -0
- package/text-snippet/examples/basic-text-snippet/basic-text-snippet.component.d.ts +5 -0
- package/text-snippet/examples/index.d.ts +1 -0
- package/text-snippet/examples/public_api.d.ts +2 -0
- package/text-snippet/index.d.ts +1 -0
- package/text-snippet/public_api.d.ts +1 -0
- package/text-snippet/text-snippet.component.d.ts +19 -0
- package/toast/README.md +5 -5
- package/toast/options/daff-toast-options.d.ts +1 -3
- package/toast/src/toast-theme.scss +14 -10
- package/toast/toast/toast-provider.d.ts +1 -1
- package/toast/toast.module.d.ts +1 -1
- package/tree/tree.module.d.ts +1 -1
- package/button/button/button.component.d.ts +0 -80
- package/button/src/button-theme-variants/button.scss +0 -26
- package/button/src/button-theme-variants/flat.scss +0 -25
- package/button/src/button-theme-variants/icon.scss +0 -21
- package/button/src/button-theme-variants/raised.scss +0 -36
- package/button/src/button-theme-variants/stroked.scss +0 -28
- package/button/src/button-theme-variants/underline.scss +0 -9
- package/button/src/button-theme.scss +0 -574
- package/esm2022/button/button/button.component.mjs +0 -212
- package/esm2022/loading-icon/examples/loading-icon-diameter/loading-icon-diameter.component.mjs +0 -15
- package/loading-icon/examples/loading-icon-diameter/loading-icon-diameter.component.d.ts +0 -5
@@ -1,11 +1,11 @@
|
|
1
|
-
import {
|
1
|
+
import { CommonModule } from '@angular/common';
|
2
2
|
import * as i0 from '@angular/core';
|
3
|
-
import { Directive,
|
3
|
+
import { Directive, HostBinding, Input, Component, ViewEncapsulation, ChangeDetectionStrategy, NgModule } from '@angular/core';
|
4
4
|
import * as i2 from '@daffodil/design';
|
5
|
-
import { DaffSizableDirective, daffPrefixableMixin, daffSuffixableMixin,
|
6
|
-
import
|
7
|
-
import * as i3 from '@daffodil/design/loading-icon';
|
5
|
+
import { DaffSizableDirective, daffPrefixableMixin, daffSuffixableMixin, DaffArticleEncapsulatedDirective, DaffStatusableDirective, DaffColorableDirective, DaffPrefixSuffixModule } from '@daffodil/design';
|
6
|
+
import * as i1 from '@daffodil/design/loading-icon';
|
8
7
|
import { DAFF_LOADING_ICON_COMPONENTS } from '@daffodil/design/loading-icon';
|
8
|
+
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
9
9
|
|
10
10
|
class DaffButtonSizableDirective extends DaffSizableDirective {
|
11
11
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffButtonSizableDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
@@ -18,17 +18,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImpor
|
|
18
18
|
}]
|
19
19
|
}] });
|
20
20
|
|
21
|
-
/**
|
22
|
-
* List of classes to add to DaffButtonComponent instances based on host attributes to style as different variants.
|
23
|
-
*/
|
24
|
-
const BUTTON_HOST_ATTRIBUTES = [
|
25
|
-
'daff-button',
|
26
|
-
'daff-stroked-button',
|
27
|
-
'daff-raised-button',
|
28
|
-
'daff-flat-button',
|
29
|
-
'daff-icon-button',
|
30
|
-
'daff-underline-button',
|
31
|
-
];
|
32
21
|
/**
|
33
22
|
* An _elementRef and an instance of renderer2 are needed for the button mixins
|
34
23
|
*/
|
@@ -39,32 +28,18 @@ class DaffButtonBase {
|
|
39
28
|
}
|
40
29
|
}
|
41
30
|
const _daffButtonBase = daffPrefixableMixin(daffSuffixableMixin((DaffButtonBase)));
|
42
|
-
|
43
|
-
(function (DaffButtonTypeEnum) {
|
44
|
-
DaffButtonTypeEnum["Default"] = "daff-button";
|
45
|
-
DaffButtonTypeEnum["Stroked"] = "daff-stroked-button";
|
46
|
-
DaffButtonTypeEnum["Raised"] = "daff-raised-button";
|
47
|
-
DaffButtonTypeEnum["Flat"] = "daff-flat-button";
|
48
|
-
DaffButtonTypeEnum["Icon"] = "daff-icon-button";
|
49
|
-
DaffButtonTypeEnum["Underline"] = "daff-underline-button";
|
50
|
-
})(DaffButtonTypeEnum || (DaffButtonTypeEnum = {}));
|
51
|
-
/**
|
52
|
-
* @inheritdoc
|
53
|
-
*/
|
54
|
-
class DaffButtonComponent extends _daffButtonBase {
|
31
|
+
class DaffButtonBaseDirective extends _daffButtonBase {
|
55
32
|
constructor(elementRef, renderer, size) {
|
56
33
|
super(elementRef, renderer);
|
57
34
|
this.elementRef = elementRef;
|
58
35
|
this.renderer = renderer;
|
59
36
|
this.size = size;
|
60
37
|
this.loading = false;
|
38
|
+
/**
|
39
|
+
* Set the `tabindex` to 0.
|
40
|
+
*/
|
61
41
|
this.tabindex = 0;
|
62
42
|
this._disabled = false;
|
63
|
-
for (const attr of BUTTON_HOST_ATTRIBUTES) {
|
64
|
-
if (this._hasHostAttributes(attr)) {
|
65
|
-
elementRef.nativeElement.classList.add(attr);
|
66
|
-
}
|
67
|
-
}
|
68
43
|
/**
|
69
44
|
* Sets the default size of a button to medium.
|
70
45
|
*/
|
@@ -73,49 +48,6 @@ class DaffButtonComponent extends _daffButtonBase {
|
|
73
48
|
/**
|
74
49
|
* @docs-private
|
75
50
|
*/
|
76
|
-
ngOnInit() {
|
77
|
-
for (const attr of BUTTON_HOST_ATTRIBUTES) {
|
78
|
-
if (this._hasHostAttributes(attr)) {
|
79
|
-
this.buttonType = attr;
|
80
|
-
}
|
81
|
-
}
|
82
|
-
}
|
83
|
-
/**
|
84
|
-
* @docs-private
|
85
|
-
*/
|
86
|
-
get button() {
|
87
|
-
return this.buttonType === DaffButtonTypeEnum.Default || this.buttonType === undefined;
|
88
|
-
}
|
89
|
-
/**
|
90
|
-
* @docs-private
|
91
|
-
*/
|
92
|
-
get stroked() {
|
93
|
-
return this.buttonType === DaffButtonTypeEnum.Stroked;
|
94
|
-
}
|
95
|
-
/**
|
96
|
-
* @docs-private
|
97
|
-
*/
|
98
|
-
get raised() {
|
99
|
-
return this.buttonType === DaffButtonTypeEnum.Raised;
|
100
|
-
}
|
101
|
-
/**
|
102
|
-
* @docs-private
|
103
|
-
*/
|
104
|
-
get flat() {
|
105
|
-
return this.buttonType === DaffButtonTypeEnum.Flat;
|
106
|
-
}
|
107
|
-
/**
|
108
|
-
* @docs-private
|
109
|
-
*/
|
110
|
-
get icon() {
|
111
|
-
return this.buttonType === DaffButtonTypeEnum.Icon;
|
112
|
-
}
|
113
|
-
/**
|
114
|
-
* @docs-private
|
115
|
-
*/
|
116
|
-
get underline() {
|
117
|
-
return this.buttonType === DaffButtonTypeEnum.Underline;
|
118
|
-
}
|
119
51
|
get disabledClass() {
|
120
52
|
return this.disabled;
|
121
53
|
}
|
@@ -134,36 +66,20 @@ class DaffButtonComponent extends _daffButtonBase {
|
|
134
66
|
get ariaDisabled() {
|
135
67
|
return this.disabled ? true : null;
|
136
68
|
}
|
69
|
+
/**
|
70
|
+
* Set the `tabindex` to -1 if the button is disabled.
|
71
|
+
*/
|
137
72
|
get disabledTabIndex() {
|
138
73
|
return this.disabled ? -1 : this.tabindex;
|
139
74
|
}
|
140
|
-
|
141
|
-
|
142
|
-
}
|
143
|
-
/**
|
144
|
-
* Gets whether the button has one of the given attributes.
|
145
|
-
* */
|
146
|
-
_hasHostAttributes(...attributes) {
|
147
|
-
return attributes.some(attribute => this._getHostElement().hasAttribute(attribute));
|
148
|
-
}
|
149
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffButtonComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: DaffButtonSizableDirective }], target: i0.ɵɵFactoryTarget.Component }); }
|
150
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.2", type: DaffButtonComponent, isStandalone: true, selector: "button[daff-button],button[daff-stroked-button],button[daff-raised-button],button[daff-flat-button],button[daff-icon-button],button[daff-underline-button],a[daff-button],a[daff-stroked-button],a[daff-raised-button],a[daff-flat-button],a[daff-icon-button],a[daff-underline-button]", inputs: { loading: "loading", tabindex: "tabindex", disabled: "disabled" }, host: { properties: { "class.daff-button": "this.button", "class.daff-stroked-button": "this.stroked", "class.daff-raised-button": "this.raised", "class.daff-flat-button": "this.flat", "class.daff-icon-button": "this.icon", "class.daff-underline-button": "this.underline", "class.daff-button--disabled": "this.disabledClass", "attr.disabled": "this.disabledAttribute", "attr.aria-disabled": "this.ariaDisabled", "attr.tabindex": "this.disabledTabIndex" } }, usesInheritance: true, hostDirectives: [{ directive: i2.DaffArticleEncapsulatedDirective }, { directive: DaffButtonSizableDirective, inputs: ["size", "size"] }, { directive: i2.DaffStatusableDirective, inputs: ["status", "status"] }, { directive: i2.DaffColorableDirective, inputs: ["color", "color"] }], ngImport: i0, template: "<ng-container *ngIf=\"_prefix\">\n <ng-content select=\"[daffPrefix]\"></ng-content>\n</ng-container>\n<span class=\"daff-button__content\" *ngIf=\"!loading\"><ng-content></ng-content></span>\n<daff-loading-icon *ngIf=\"loading\" [diameter]=\"24\"></daff-loading-icon>\n<ng-container *ngIf=\"_suffix\">\n <ng-content select=\"[daffSuffix]\"></ng-content>\n</ng-container>", styles: [".daff-button,.daff-raised-button,.daff-stroked-button,.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:8px;appearance:none;border:none;border-radius:4px;position:relative;text-align:center;text-decoration:none;min-width:96px}.daff-button[disabled],.daff-button.daff-button--disabled,.daff-raised-button[disabled],.daff-raised-button.daff-button--disabled,.daff-stroked-button[disabled],.daff-stroked-button.daff-button--disabled,.daff-flat-button[disabled],.daff-flat-button.daff-button--disabled{cursor:not-allowed}.daff-button[disabled]:hover:after,.daff-button.daff-button--disabled:hover:after,.daff-raised-button[disabled]:hover:after,.daff-raised-button.daff-button--disabled:hover:after,.daff-stroked-button[disabled]:hover:after,.daff-stroked-button.daff-button--disabled:hover:after,.daff-flat-button[disabled]:hover:after,.daff-flat-button.daff-button--disabled:hover:after{opacity:0}.daff-button .daff-button__content,.daff-button .daff-prefix,.daff-button .daff-suffix,.daff-raised-button .daff-button__content,.daff-raised-button .daff-prefix,.daff-raised-button .daff-suffix,.daff-stroked-button .daff-button__content,.daff-stroked-button .daff-prefix,.daff-stroked-button .daff-suffix,.daff-flat-button .daff-button__content,.daff-flat-button .daff-prefix,.daff-flat-button .daff-suffix{z-index:2}.daff-button.daff-sm,.daff-raised-button.daff-sm,.daff-stroked-button.daff-sm,.daff-flat-button.daff-sm{font-size:.875rem;line-height:2rem;height:2rem;padding:0 1rem}.daff-button.daff-md,.daff-raised-button.daff-md,.daff-stroked-button.daff-md,.daff-flat-button.daff-md{font-size:1rem;line-height:3rem;height:3rem;padding:0 1.5rem}.daff-button.daff-lg,.daff-raised-button.daff-lg,.daff-stroked-button.daff-lg,.daff-flat-button.daff-lg{font-size:1.25rem;line-height:3.5rem;height:3.5rem;padding:0 1.5rem}.daff-button:after,.daff-flat-button:after{content:\"\";border-radius:4px;position:absolute;width:100%;height:100%;opacity:0;transition:opacity .3s}.daff-button:hover:after,.daff-button:active:after,.daff-flat-button:hover:after,.daff-flat-button:active:after{opacity:1}.daff-raised-button:after{content:\"\";border-radius:0;position:absolute;width:100%;height:100%;opacity:0;transition:opacity .3s}.daff-raised-button:hover:after,.daff-raised-button:active:after{opacity:1}.daff-stroked-button:after{content:\"\";border-radius:3px;position:absolute;width:100%;height:100%;opacity:0;transition:opacity .3s}.daff-stroked-button:hover:after,.daff-stroked-button:active:after{opacity:1}.daff-flat-button{background:none;border:none}.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:8px;appearance:none;border:none;border-radius:4px;position:relative;text-align:center;text-decoration:none;background:none;border:0;padding:0}.daff-icon-button[disabled],.daff-icon-button.daff-button--disabled{cursor:not-allowed}.daff-icon-button[disabled]:hover:after,.daff-icon-button.daff-button--disabled:hover:after{opacity:0}.daff-icon-button .daff-button__content,.daff-icon-button .daff-prefix,.daff-icon-button .daff-suffix{z-index:2}.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}.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:8px;appearance:none;border:none;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]:hover:after,.daff-underline-button.daff-button--disabled:hover:after{opacity:0}.daff-underline-button .daff-button__content,.daff-underline-button .daff-prefix,.daff-underline-button .daff-suffix{z-index:2}.daff-underline-button[disabled],.daff-underline-button.daff-button--disabled{cursor:not-allowed}.daff-underline-button[disabled]:hover:after,.daff-underline-button[disabled]:active:after,.daff-underline-button.daff-button--disabled:hover:after,.daff-underline-button.daff-button--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}.daff-underline-button.daff-md{font-size:1rem;height:1.5rem;padding:0 0 4px}.daff-underline-button.daff-lg{font-size:1.25rem;height:1.75rem;padding:0 0 8px}@keyframes underline-button-hover{0%{transform:translate(0)}50%{transform:translate(100%)}51%{transform:translate(-100%)}to{transform:translate(0)}}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: DaffPrefixSuffixModule }, { kind: "component", type: i3.DaffLoadingIconComponent, selector: "daff-loading-icon", inputs: ["diameter"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
75
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffButtonBaseDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: DaffButtonSizableDirective }], target: i0.ɵɵFactoryTarget.Directive }); }
|
76
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.2", type: DaffButtonBaseDirective, isStandalone: true, selector: "[daffButtonBase]", inputs: { loading: "loading", tabindex: "tabindex", disabled: "disabled" }, host: { properties: { "class.disabled": "this.disabledClass", "attr.disabled": "this.disabledAttribute", "attr.aria-disabled": "this.ariaDisabled", "attr.tabindex": "this.disabledTabIndex" } }, usesInheritance: true, hostDirectives: [{ directive: i2.DaffArticleEncapsulatedDirective }, { directive: DaffButtonSizableDirective, inputs: ["size", "size"] }, { directive: i2.DaffStatusableDirective, inputs: ["status", "status"] }, { directive: i2.DaffColorableDirective, inputs: ["color", "color"] }], ngImport: i0 }); }
|
151
77
|
}
|
152
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type:
|
153
|
-
type:
|
154
|
-
args: [{
|
155
|
-
|
156
|
-
|
157
|
-
'button[daff-raised-button]' + ',' +
|
158
|
-
'button[daff-flat-button]' + ',' +
|
159
|
-
'button[daff-icon-button]' + ',' +
|
160
|
-
'button[daff-underline-button]' + ',' +
|
161
|
-
'a[daff-button]' + ',' +
|
162
|
-
'a[daff-stroked-button]' + ',' +
|
163
|
-
'a[daff-raised-button]' + ',' +
|
164
|
-
'a[daff-flat-button]' + ',' +
|
165
|
-
'a[daff-icon-button]' + ',' +
|
166
|
-
'a[daff-underline-button]', hostDirectives: [
|
78
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffButtonBaseDirective, decorators: [{
|
79
|
+
type: Directive,
|
80
|
+
args: [{
|
81
|
+
selector: '[daffButtonBase]',
|
82
|
+
hostDirectives: [
|
167
83
|
{ directive: DaffArticleEncapsulatedDirective },
|
168
84
|
{
|
169
85
|
directive: DaffButtonSizableDirective,
|
@@ -177,32 +93,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImpor
|
|
177
93
|
directive: DaffColorableDirective,
|
178
94
|
inputs: ['color'],
|
179
95
|
},
|
180
|
-
],
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
], template: "<ng-container *ngIf=\"_prefix\">\n <ng-content select=\"[daffPrefix]\"></ng-content>\n</ng-container>\n<span class=\"daff-button__content\" *ngIf=\"!loading\"><ng-content></ng-content></span>\n<daff-loading-icon *ngIf=\"loading\" [diameter]=\"24\"></daff-loading-icon>\n<ng-container *ngIf=\"_suffix\">\n <ng-content select=\"[daffSuffix]\"></ng-content>\n</ng-container>", styles: [".daff-button,.daff-raised-button,.daff-stroked-button,.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:8px;appearance:none;border:none;border-radius:4px;position:relative;text-align:center;text-decoration:none;min-width:96px}.daff-button[disabled],.daff-button.daff-button--disabled,.daff-raised-button[disabled],.daff-raised-button.daff-button--disabled,.daff-stroked-button[disabled],.daff-stroked-button.daff-button--disabled,.daff-flat-button[disabled],.daff-flat-button.daff-button--disabled{cursor:not-allowed}.daff-button[disabled]:hover:after,.daff-button.daff-button--disabled:hover:after,.daff-raised-button[disabled]:hover:after,.daff-raised-button.daff-button--disabled:hover:after,.daff-stroked-button[disabled]:hover:after,.daff-stroked-button.daff-button--disabled:hover:after,.daff-flat-button[disabled]:hover:after,.daff-flat-button.daff-button--disabled:hover:after{opacity:0}.daff-button .daff-button__content,.daff-button .daff-prefix,.daff-button .daff-suffix,.daff-raised-button .daff-button__content,.daff-raised-button .daff-prefix,.daff-raised-button .daff-suffix,.daff-stroked-button .daff-button__content,.daff-stroked-button .daff-prefix,.daff-stroked-button .daff-suffix,.daff-flat-button .daff-button__content,.daff-flat-button .daff-prefix,.daff-flat-button .daff-suffix{z-index:2}.daff-button.daff-sm,.daff-raised-button.daff-sm,.daff-stroked-button.daff-sm,.daff-flat-button.daff-sm{font-size:.875rem;line-height:2rem;height:2rem;padding:0 1rem}.daff-button.daff-md,.daff-raised-button.daff-md,.daff-stroked-button.daff-md,.daff-flat-button.daff-md{font-size:1rem;line-height:3rem;height:3rem;padding:0 1.5rem}.daff-button.daff-lg,.daff-raised-button.daff-lg,.daff-stroked-button.daff-lg,.daff-flat-button.daff-lg{font-size:1.25rem;line-height:3.5rem;height:3.5rem;padding:0 1.5rem}.daff-button:after,.daff-flat-button:after{content:\"\";border-radius:4px;position:absolute;width:100%;height:100%;opacity:0;transition:opacity .3s}.daff-button:hover:after,.daff-button:active:after,.daff-flat-button:hover:after,.daff-flat-button:active:after{opacity:1}.daff-raised-button:after{content:\"\";border-radius:0;position:absolute;width:100%;height:100%;opacity:0;transition:opacity .3s}.daff-raised-button:hover:after,.daff-raised-button:active:after{opacity:1}.daff-stroked-button:after{content:\"\";border-radius:3px;position:absolute;width:100%;height:100%;opacity:0;transition:opacity .3s}.daff-stroked-button:hover:after,.daff-stroked-button:active:after{opacity:1}.daff-flat-button{background:none;border:none}.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:8px;appearance:none;border:none;border-radius:4px;position:relative;text-align:center;text-decoration:none;background:none;border:0;padding:0}.daff-icon-button[disabled],.daff-icon-button.daff-button--disabled{cursor:not-allowed}.daff-icon-button[disabled]:hover:after,.daff-icon-button.daff-button--disabled:hover:after{opacity:0}.daff-icon-button .daff-button__content,.daff-icon-button .daff-prefix,.daff-icon-button .daff-suffix{z-index:2}.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}.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:8px;appearance:none;border:none;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]:hover:after,.daff-underline-button.daff-button--disabled:hover:after{opacity:0}.daff-underline-button .daff-button__content,.daff-underline-button .daff-prefix,.daff-underline-button .daff-suffix{z-index:2}.daff-underline-button[disabled],.daff-underline-button.daff-button--disabled{cursor:not-allowed}.daff-underline-button[disabled]:hover:after,.daff-underline-button[disabled]:active:after,.daff-underline-button.daff-button--disabled:hover:after,.daff-underline-button.daff-button--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}.daff-underline-button.daff-md{font-size:1rem;height:1.5rem;padding:0 0 4px}.daff-underline-button.daff-lg{font-size:1.25rem;height:1.75rem;padding:0 0 8px}@keyframes underline-button-hover{0%{transform:translate(0)}50%{transform:translate(100%)}51%{transform:translate(-100%)}to{transform:translate(0)}}\n"] }]
|
185
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: DaffButtonSizableDirective }], propDecorators: { button: [{
|
186
|
-
type: HostBinding,
|
187
|
-
args: ['class.daff-button']
|
188
|
-
}], stroked: [{
|
189
|
-
type: HostBinding,
|
190
|
-
args: ['class.daff-stroked-button']
|
191
|
-
}], raised: [{
|
192
|
-
type: HostBinding,
|
193
|
-
args: ['class.daff-raised-button']
|
194
|
-
}], flat: [{
|
195
|
-
type: HostBinding,
|
196
|
-
args: ['class.daff-flat-button']
|
197
|
-
}], icon: [{
|
198
|
-
type: HostBinding,
|
199
|
-
args: ['class.daff-icon-button']
|
200
|
-
}], underline: [{
|
201
|
-
type: HostBinding,
|
202
|
-
args: ['class.daff-underline-button']
|
203
|
-
}], disabledClass: [{
|
96
|
+
],
|
97
|
+
standalone: true,
|
98
|
+
}]
|
99
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: DaffButtonSizableDirective }], propDecorators: { disabledClass: [{
|
204
100
|
type: HostBinding,
|
205
|
-
args: ['class.
|
101
|
+
args: ['class.disabled']
|
206
102
|
}], loading: [{
|
207
103
|
type: Input
|
208
104
|
}], tabindex: [{
|
@@ -220,14 +116,277 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImpor
|
|
220
116
|
args: ['attr.tabindex']
|
221
117
|
}] } });
|
222
118
|
|
119
|
+
/**
|
120
|
+
* DaffButtonComponent is a rectangular contained button with background color.
|
121
|
+
*
|
122
|
+
* ## Usage
|
123
|
+
* ```html
|
124
|
+
* <button daff-button>
|
125
|
+
* <div daffPrefix></div>
|
126
|
+
* Button
|
127
|
+
* <div daffSuffix></div>
|
128
|
+
* </button>
|
129
|
+
*
|
130
|
+
* <a href="/" daff-button>
|
131
|
+
* <div daffPrefix></div>
|
132
|
+
* Linked button
|
133
|
+
* <div daffSuffix></div>
|
134
|
+
* </a>
|
135
|
+
* ```
|
136
|
+
*/
|
137
|
+
class DaffButtonComponent extends DaffButtonBaseDirective {
|
138
|
+
constructor() {
|
139
|
+
super(...arguments);
|
140
|
+
/**
|
141
|
+
* @docs-private
|
142
|
+
*/
|
143
|
+
this.class = true;
|
144
|
+
}
|
145
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
146
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.2", type: DaffButtonComponent, isStandalone: true, selector: "button[daff-button],a[daff-button]", host: { properties: { "class.daff-button": "this.class" } }, usesInheritance: true, ngImport: i0, template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n@if (loading) {\n <daff-loading-icon class=\"daff-button__loading\"></daff-loading-icon>\n} @else {\n <span class=\"daff-button__content\"><ng-content></ng-content></span>\n}\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;min-width:96px}.daff-button[disabled],.daff-button.disabled{cursor:not-allowed}.daff-button .daff-button__content,.daff-button .daff-prefix,.daff-button .daff-suffix{z-index:2}.daff-button .daff-button__loading{max-width:1.5rem}.daff-button .daff-button__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daff-button:after{content:\"\";border-radius:4px;position:absolute;width:100%;height:100%;opacity:0;transition:opacity .3s}.daff-button:hover:after,.daff-button:active:after{opacity:1}.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: "ngmodule", type: DaffPrefixSuffixModule }, { kind: "component", type: i1.DaffLoadingIconComponent, selector: "daff-loading-icon" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
147
|
+
}
|
148
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffButtonComponent, decorators: [{
|
149
|
+
type: Component,
|
150
|
+
args: [{ selector: '' +
|
151
|
+
'button[daff-button]' + ',' +
|
152
|
+
'a[daff-button]', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
153
|
+
DaffPrefixSuffixModule,
|
154
|
+
DAFF_LOADING_ICON_COMPONENTS,
|
155
|
+
], template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n@if (loading) {\n <daff-loading-icon class=\"daff-button__loading\"></daff-loading-icon>\n} @else {\n <span class=\"daff-button__content\"><ng-content></ng-content></span>\n}\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;min-width:96px}.daff-button[disabled],.daff-button.disabled{cursor:not-allowed}.daff-button .daff-button__content,.daff-button .daff-prefix,.daff-button .daff-suffix{z-index:2}.daff-button .daff-button__loading{max-width:1.5rem}.daff-button .daff-button__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daff-button:after{content:\"\";border-radius:4px;position:absolute;width:100%;height:100%;opacity:0;transition:opacity .3s}.daff-button:hover:after,.daff-button:active:after{opacity:1}.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"] }]
|
156
|
+
}], propDecorators: { class: [{
|
157
|
+
type: HostBinding,
|
158
|
+
args: ['class.daff-button']
|
159
|
+
}] } });
|
160
|
+
|
161
|
+
/**
|
162
|
+
* DaffFlatButtonComponent is a rectangular contained button no background.
|
163
|
+
*
|
164
|
+
* ## Usage
|
165
|
+
* ```html
|
166
|
+
* <button daff-flat-button>
|
167
|
+
* <div daffPrefix></div>
|
168
|
+
* Flat Button
|
169
|
+
* <div daffSuffix></div>
|
170
|
+
* </button>
|
171
|
+
*
|
172
|
+
* <a href="/" daff-flat-button>
|
173
|
+
* <div daffPrefix></div>
|
174
|
+
* Linked flat button
|
175
|
+
* <div daffSuffix></div>
|
176
|
+
* </a>
|
177
|
+
* ```
|
178
|
+
*/
|
179
|
+
class DaffFlatButtonComponent extends DaffButtonBaseDirective {
|
180
|
+
constructor() {
|
181
|
+
super(...arguments);
|
182
|
+
/**
|
183
|
+
* @docs-private
|
184
|
+
*/
|
185
|
+
this.class = true;
|
186
|
+
}
|
187
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffFlatButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
188
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.2", type: DaffFlatButtonComponent, isStandalone: true, selector: "button[daff-flat-button],a[daff-flat-button]", host: { properties: { "class.daff-flat-button": "this.class" } }, usesInheritance: true, ngImport: i0, template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n@if (loading) {\n <daff-loading-icon class=\"daff-button__loading\"></daff-loading-icon>\n} @else {\n <span class=\"daff-button__content\"><ng-content></ng-content></span>\n}\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;min-width:96px;background:none;border:none}.daff-flat-button[disabled],.daff-flat-button.disabled{cursor:not-allowed}.daff-flat-button .daff-button__content,.daff-flat-button .daff-prefix,.daff-flat-button .daff-suffix{z-index:2}.daff-flat-button .daff-button__loading{max-width:1.5rem}.daff-flat-button .daff-button__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daff-flat-button:after{content:\"\";border-radius:4px;position:absolute;width:100%;height:100%;opacity:0;transition:opacity .3s}.daff-flat-button:hover:after,.daff-flat-button:active: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: "ngmodule", type: DaffPrefixSuffixModule }, { kind: "component", type: i1.DaffLoadingIconComponent, selector: "daff-loading-icon" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
189
|
+
}
|
190
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffFlatButtonComponent, decorators: [{
|
191
|
+
type: Component,
|
192
|
+
args: [{ selector: '' +
|
193
|
+
'button[daff-flat-button]' + ',' +
|
194
|
+
'a[daff-flat-button]', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
195
|
+
DaffPrefixSuffixModule,
|
196
|
+
DAFF_LOADING_ICON_COMPONENTS,
|
197
|
+
], template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n@if (loading) {\n <daff-loading-icon class=\"daff-button__loading\"></daff-loading-icon>\n} @else {\n <span class=\"daff-button__content\"><ng-content></ng-content></span>\n}\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;min-width:96px;background:none;border:none}.daff-flat-button[disabled],.daff-flat-button.disabled{cursor:not-allowed}.daff-flat-button .daff-button__content,.daff-flat-button .daff-prefix,.daff-flat-button .daff-suffix{z-index:2}.daff-flat-button .daff-button__loading{max-width:1.5rem}.daff-flat-button .daff-button__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daff-flat-button:after{content:\"\";border-radius:4px;position:absolute;width:100%;height:100%;opacity:0;transition:opacity .3s}.daff-flat-button:hover:after,.daff-flat-button:active: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"] }]
|
198
|
+
}], propDecorators: { class: [{
|
199
|
+
type: HostBinding,
|
200
|
+
args: ['class.daff-flat-button']
|
201
|
+
}] } });
|
202
|
+
|
203
|
+
/**
|
204
|
+
* DaffIconButtonComponent is an icon button used with icon fonts.
|
205
|
+
*
|
206
|
+
* ## Usage
|
207
|
+
* ```html
|
208
|
+
* <button daff-icon-button>
|
209
|
+
* <fa-icon [icon]="faPlus"></fa-icon>
|
210
|
+
* </button>
|
211
|
+
*
|
212
|
+
* <a href="/" daff-icon-button>
|
213
|
+
* <fa-icon [icon]="faPlus"></fa-icon>
|
214
|
+
* </a>
|
215
|
+
* ```
|
216
|
+
*/
|
217
|
+
class DaffIconButtonComponent extends DaffButtonBaseDirective {
|
218
|
+
constructor() {
|
219
|
+
super(...arguments);
|
220
|
+
/**
|
221
|
+
* @docs-private
|
222
|
+
*/
|
223
|
+
this.class = true;
|
224
|
+
}
|
225
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffIconButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
226
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.2", type: DaffIconButtonComponent, isStandalone: true, selector: "button[daff-icon-button],a[daff-icon-button]", host: { properties: { "class.daff-icon-button": "this.class" } }, usesInheritance: true, ngImport: i0, template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n@if (loading) {\n <daff-loading-icon class=\"daff-button__loading\"></daff-loading-icon>\n} @else {\n <span class=\"daff-button__content\"><ng-content></ng-content></span>\n}\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.disabled{cursor:not-allowed}.daff-icon-button .daff-button__content,.daff-icon-button .daff-prefix,.daff-icon-button .daff-suffix{z-index:2}.daff-icon-button .daff-button__loading{max-width:1.5rem}.daff-icon-button .daff-button__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.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: "ngmodule", type: DaffPrefixSuffixModule }, { kind: "component", type: i1.DaffLoadingIconComponent, selector: "daff-loading-icon" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
227
|
+
}
|
228
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffIconButtonComponent, decorators: [{
|
229
|
+
type: Component,
|
230
|
+
args: [{ selector: '' +
|
231
|
+
'button[daff-icon-button]' + ',' +
|
232
|
+
'a[daff-icon-button]', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
233
|
+
DaffPrefixSuffixModule,
|
234
|
+
DAFF_LOADING_ICON_COMPONENTS,
|
235
|
+
], template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n@if (loading) {\n <daff-loading-icon class=\"daff-button__loading\"></daff-loading-icon>\n} @else {\n <span class=\"daff-button__content\"><ng-content></ng-content></span>\n}\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.disabled{cursor:not-allowed}.daff-icon-button .daff-button__content,.daff-icon-button .daff-prefix,.daff-icon-button .daff-suffix{z-index:2}.daff-icon-button .daff-button__loading{max-width:1.5rem}.daff-icon-button .daff-button__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.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"] }]
|
236
|
+
}], propDecorators: { class: [{
|
237
|
+
type: HostBinding,
|
238
|
+
args: ['class.daff-icon-button']
|
239
|
+
}] } });
|
240
|
+
|
241
|
+
/**
|
242
|
+
* DaffRaisedButtonComponent is a rectangular contained button with background color and elevation.
|
243
|
+
*
|
244
|
+
* ## Usage
|
245
|
+
* ```html
|
246
|
+
* <button daff-raised-button>
|
247
|
+
* <div daffPrefix></div>
|
248
|
+
* Raised Button
|
249
|
+
* <div daffSuffix></div>
|
250
|
+
* </button>
|
251
|
+
*
|
252
|
+
* <a href="/" daff-raised-button>
|
253
|
+
* <div daffPrefix></div>
|
254
|
+
* Linked raised button
|
255
|
+
* <div daffSuffix></div>
|
256
|
+
* </a>
|
257
|
+
* ```
|
258
|
+
*/
|
259
|
+
class DaffRaisedButtonComponent extends DaffButtonBaseDirective {
|
260
|
+
constructor() {
|
261
|
+
super(...arguments);
|
262
|
+
/**
|
263
|
+
* @docs-private
|
264
|
+
*/
|
265
|
+
this.class = true;
|
266
|
+
}
|
267
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffRaisedButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
268
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.2", 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-loading-icon class=\"daff-button__loading\"></daff-loading-icon>\n} @else {\n <span class=\"daff-button__content\"><ng-content></ng-content></span>\n}\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;min-width:96px}.daff-raised-button[disabled],.daff-raised-button.disabled{cursor:not-allowed}.daff-raised-button .daff-button__content,.daff-raised-button .daff-prefix,.daff-raised-button .daff-suffix{z-index:2}.daff-raised-button .daff-button__loading{max-width:1.5rem}.daff-raised-button .daff-button__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daff-raised-button:after{content:\"\";border-radius:0;position:absolute;width:100%;height:100%;opacity:0;transition:opacity .3s}.daff-raised-button:hover:after,.daff-raised-button:active: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: "ngmodule", type: DaffPrefixSuffixModule }, { kind: "component", type: i1.DaffLoadingIconComponent, selector: "daff-loading-icon" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
269
|
+
}
|
270
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffRaisedButtonComponent, decorators: [{
|
271
|
+
type: Component,
|
272
|
+
args: [{ selector: '' +
|
273
|
+
'button[daff-raised-button]' + ',' +
|
274
|
+
'a[daff-raised-button]', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
275
|
+
DaffPrefixSuffixModule,
|
276
|
+
DAFF_LOADING_ICON_COMPONENTS,
|
277
|
+
], template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n@if (loading) {\n <daff-loading-icon class=\"daff-button__loading\"></daff-loading-icon>\n} @else {\n <span class=\"daff-button__content\"><ng-content></ng-content></span>\n}\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;min-width:96px}.daff-raised-button[disabled],.daff-raised-button.disabled{cursor:not-allowed}.daff-raised-button .daff-button__content,.daff-raised-button .daff-prefix,.daff-raised-button .daff-suffix{z-index:2}.daff-raised-button .daff-button__loading{max-width:1.5rem}.daff-raised-button .daff-button__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daff-raised-button:after{content:\"\";border-radius:0;position:absolute;width:100%;height:100%;opacity:0;transition:opacity .3s}.daff-raised-button:hover:after,.daff-raised-button:active: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"] }]
|
278
|
+
}], propDecorators: { class: [{
|
279
|
+
type: HostBinding,
|
280
|
+
args: ['class.daff-raised-button']
|
281
|
+
}] } });
|
282
|
+
|
283
|
+
/**
|
284
|
+
* DaffStrokedButtonComponent is a rectangular outlined button with no background color.
|
285
|
+
*
|
286
|
+
* ## Usage
|
287
|
+
* ```html
|
288
|
+
* <button daff-stroked-button>
|
289
|
+
* <div daffPrefix></div>
|
290
|
+
* Stroked Button
|
291
|
+
* <div daffSuffix></div>
|
292
|
+
* </button>
|
293
|
+
*
|
294
|
+
* <a href="/" daff-stroked-button>
|
295
|
+
* <div daffPrefix></div>
|
296
|
+
* Linked stroked button
|
297
|
+
* <div daffSuffix></div>
|
298
|
+
* </a>
|
299
|
+
* ```
|
300
|
+
*/
|
301
|
+
class DaffStrokedButtonComponent extends DaffButtonBaseDirective {
|
302
|
+
constructor() {
|
303
|
+
super(...arguments);
|
304
|
+
/**
|
305
|
+
* @docs-private
|
306
|
+
*/
|
307
|
+
this.class = true;
|
308
|
+
}
|
309
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffStrokedButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
310
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.2", type: DaffStrokedButtonComponent, isStandalone: true, selector: "button[daff-stroked-button],a[daff-stroked-button]", host: { properties: { "class.daff-stroked-button": "this.class" } }, usesInheritance: true, ngImport: i0, template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n@if (loading) {\n <daff-loading-icon class=\"daff-button__loading\"></daff-loading-icon>\n} @else {\n <span class=\"daff-button__content\"><ng-content></ng-content></span>\n}\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;min-width:96px}.daff-stroked-button[disabled],.daff-stroked-button.disabled{cursor:not-allowed}.daff-stroked-button .daff-button__content,.daff-stroked-button .daff-prefix,.daff-stroked-button .daff-suffix{z-index:2}.daff-stroked-button .daff-button__loading{max-width:1.5rem}.daff-stroked-button .daff-button__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daff-stroked-button:after{content:\"\";border-radius:3px;position:absolute;width:100%;height:100%;opacity:0;transition:opacity .3s}.daff-stroked-button:hover:after,.daff-stroked-button:active: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}\n"], dependencies: [{ kind: "ngmodule", type: DaffPrefixSuffixModule }, { kind: "component", type: i1.DaffLoadingIconComponent, selector: "daff-loading-icon" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
311
|
+
}
|
312
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffStrokedButtonComponent, decorators: [{
|
313
|
+
type: Component,
|
314
|
+
args: [{ selector: '' +
|
315
|
+
'button[daff-stroked-button]' + ',' +
|
316
|
+
'a[daff-stroked-button]', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
317
|
+
DaffPrefixSuffixModule,
|
318
|
+
DAFF_LOADING_ICON_COMPONENTS,
|
319
|
+
], template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n@if (loading) {\n <daff-loading-icon class=\"daff-button__loading\"></daff-loading-icon>\n} @else {\n <span class=\"daff-button__content\"><ng-content></ng-content></span>\n}\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;min-width:96px}.daff-stroked-button[disabled],.daff-stroked-button.disabled{cursor:not-allowed}.daff-stroked-button .daff-button__content,.daff-stroked-button .daff-prefix,.daff-stroked-button .daff-suffix{z-index:2}.daff-stroked-button .daff-button__loading{max-width:1.5rem}.daff-stroked-button .daff-button__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daff-stroked-button:after{content:\"\";border-radius:3px;position:absolute;width:100%;height:100%;opacity:0;transition:opacity .3s}.daff-stroked-button:hover:after,.daff-stroked-button:active: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}\n"] }]
|
320
|
+
}], propDecorators: { class: [{
|
321
|
+
type: HostBinding,
|
322
|
+
args: ['class.daff-stroked-button']
|
323
|
+
}] } });
|
324
|
+
|
325
|
+
/**
|
326
|
+
* DaffUnderlineButtonComponent is a borderless button with a custom underline style.
|
327
|
+
*
|
328
|
+
* ## Usage
|
329
|
+
* ```html
|
330
|
+
* <button daff-underline-button>
|
331
|
+
* <div daffPrefix></div>
|
332
|
+
* Underline Button
|
333
|
+
* <div daffSuffix></div>
|
334
|
+
* </button>
|
335
|
+
*
|
336
|
+
* <a href="/" daff-underline-button>
|
337
|
+
* <div daffPrefix></div>
|
338
|
+
* Linked underline button
|
339
|
+
* <div daffSuffix></div>
|
340
|
+
* </a>
|
341
|
+
* ```
|
342
|
+
*/
|
343
|
+
class DaffUnderlineButtonComponent extends DaffButtonBaseDirective {
|
344
|
+
constructor() {
|
345
|
+
super(...arguments);
|
346
|
+
/**
|
347
|
+
* @docs-private
|
348
|
+
*/
|
349
|
+
this.class = true;
|
350
|
+
}
|
351
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffUnderlineButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
352
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.2", type: DaffUnderlineButtonComponent, isStandalone: true, selector: "button[daff-underline-button],a[daff-underline-button]", host: { properties: { "class.daff-underline-button": "this.class" } }, usesInheritance: true, ngImport: i0, template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n@if (loading) {\n <daff-loading-icon class=\"daff-button__loading\"></daff-loading-icon>\n} @else {\n <span class=\"daff-button__content\"><ng-content></ng-content></span>\n}\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 .daff-button__content,.daff-underline-button .daff-prefix,.daff-underline-button .daff-suffix{z-index:2}.daff-underline-button .daff-button__loading{max-width:1.5rem}.daff-underline-button .daff-button__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daff-underline-button[disabled],.daff-underline-button.disabled{cursor:not-allowed}.daff-underline-button[disabled]:hover:after,.daff-underline-button[disabled]:active:after,.daff-underline-button.disabled:hover:after,.daff-underline-button.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}.daff-underline-button.daff-md{font-size:1rem;height:1.5rem;padding:0 0 4px}.daff-underline-button.daff-lg{font-size:1.25rem;height:1.75rem;padding:0 0 8px}@keyframes underline-button-hover{0%{transform:translate(0)}50%{transform:translate(100%)}51%{transform:translate(-100%)}to{transform:translate(0)}}\n"], dependencies: [{ kind: "ngmodule", type: DaffPrefixSuffixModule }, { kind: "component", type: i1.DaffLoadingIconComponent, selector: "daff-loading-icon" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
353
|
+
}
|
354
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffUnderlineButtonComponent, decorators: [{
|
355
|
+
type: Component,
|
356
|
+
args: [{ selector: '' +
|
357
|
+
'button[daff-underline-button]' + ',' +
|
358
|
+
'a[daff-underline-button]', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
359
|
+
DaffPrefixSuffixModule,
|
360
|
+
DAFF_LOADING_ICON_COMPONENTS,
|
361
|
+
], template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n@if (loading) {\n <daff-loading-icon class=\"daff-button__loading\"></daff-loading-icon>\n} @else {\n <span class=\"daff-button__content\"><ng-content></ng-content></span>\n}\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 .daff-button__content,.daff-underline-button .daff-prefix,.daff-underline-button .daff-suffix{z-index:2}.daff-underline-button .daff-button__loading{max-width:1.5rem}.daff-underline-button .daff-button__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daff-underline-button[disabled],.daff-underline-button.disabled{cursor:not-allowed}.daff-underline-button[disabled]:hover:after,.daff-underline-button[disabled]:active:after,.daff-underline-button.disabled:hover:after,.daff-underline-button.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}.daff-underline-button.daff-md{font-size:1rem;height:1.5rem;padding:0 0 4px}.daff-underline-button.daff-lg{font-size:1.25rem;height:1.75rem;padding:0 0 8px}@keyframes underline-button-hover{0%{transform:translate(0)}50%{transform:translate(100%)}51%{transform:translate(-100%)}to{transform:translate(0)}}\n"] }]
|
362
|
+
}], propDecorators: { class: [{
|
363
|
+
type: HostBinding,
|
364
|
+
args: ['class.daff-underline-button']
|
365
|
+
}] } });
|
366
|
+
|
223
367
|
/** @deprecated in favor of {@link DAFF_BUTTON_COMPONENTS} */
|
224
368
|
class DaffButtonModule {
|
225
369
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
226
370
|
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.2", ngImport: i0, type: DaffButtonModule, imports: [CommonModule,
|
227
|
-
DaffButtonComponent
|
371
|
+
DaffButtonComponent,
|
372
|
+
DaffFlatButtonComponent,
|
373
|
+
DaffIconButtonComponent,
|
374
|
+
DaffRaisedButtonComponent,
|
375
|
+
DaffStrokedButtonComponent,
|
376
|
+
DaffUnderlineButtonComponent], exports: [DaffButtonComponent,
|
377
|
+
DaffFlatButtonComponent,
|
378
|
+
DaffIconButtonComponent,
|
379
|
+
DaffRaisedButtonComponent,
|
380
|
+
DaffStrokedButtonComponent,
|
381
|
+
DaffUnderlineButtonComponent,
|
228
382
|
DaffPrefixSuffixModule] }); }
|
229
383
|
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffButtonModule, imports: [CommonModule,
|
230
|
-
DaffButtonComponent,
|
384
|
+
DaffButtonComponent,
|
385
|
+
DaffFlatButtonComponent,
|
386
|
+
DaffIconButtonComponent,
|
387
|
+
DaffRaisedButtonComponent,
|
388
|
+
DaffStrokedButtonComponent,
|
389
|
+
DaffUnderlineButtonComponent, DaffPrefixSuffixModule] }); }
|
231
390
|
}
|
232
391
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffButtonModule, decorators: [{
|
233
392
|
type: NgModule,
|
@@ -235,9 +394,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImpor
|
|
235
394
|
imports: [
|
236
395
|
CommonModule,
|
237
396
|
DaffButtonComponent,
|
397
|
+
DaffFlatButtonComponent,
|
398
|
+
DaffIconButtonComponent,
|
399
|
+
DaffRaisedButtonComponent,
|
400
|
+
DaffStrokedButtonComponent,
|
401
|
+
DaffUnderlineButtonComponent,
|
238
402
|
],
|
239
403
|
exports: [
|
240
404
|
DaffButtonComponent,
|
405
|
+
DaffFlatButtonComponent,
|
406
|
+
DaffIconButtonComponent,
|
407
|
+
DaffRaisedButtonComponent,
|
408
|
+
DaffStrokedButtonComponent,
|
409
|
+
DaffUnderlineButtonComponent,
|
241
410
|
DaffPrefixSuffixModule,
|
242
411
|
],
|
243
412
|
}]
|
@@ -246,11 +415,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImpor
|
|
246
415
|
const DAFF_BUTTON_COMPONENTS = [
|
247
416
|
DaffButtonComponent,
|
248
417
|
DaffPrefixSuffixModule,
|
418
|
+
DaffFlatButtonComponent,
|
419
|
+
DaffIconButtonComponent,
|
420
|
+
DaffRaisedButtonComponent,
|
421
|
+
DaffStrokedButtonComponent,
|
422
|
+
DaffUnderlineButtonComponent,
|
249
423
|
];
|
250
424
|
|
251
425
|
/**
|
252
426
|
* Generated bundle index. Do not edit.
|
253
427
|
*/
|
254
428
|
|
255
|
-
export { DAFF_BUTTON_COMPONENTS, DaffButtonComponent, DaffButtonModule, DaffButtonSizableDirective };
|
429
|
+
export { DAFF_BUTTON_COMPONENTS, DaffButtonComponent, DaffButtonModule, DaffButtonSizableDirective, DaffFlatButtonComponent, DaffIconButtonComponent, DaffRaisedButtonComponent, DaffStrokedButtonComponent, DaffUnderlineButtonComponent };
|
256
430
|
//# sourceMappingURL=daffodil-design-button.mjs.map
|