@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
@@ -0,0 +1,48 @@
|
|
1
|
+
import { Component, ViewEncapsulation, ChangeDetectionStrategy, HostBinding, } from '@angular/core';
|
2
|
+
import { DaffPrefixSuffixModule } from '@daffodil/design';
|
3
|
+
import { DAFF_LOADING_ICON_COMPONENTS } from '@daffodil/design/loading-icon';
|
4
|
+
import { DaffButtonBaseDirective } from '../button-base.directive';
|
5
|
+
import * as i0 from "@angular/core";
|
6
|
+
import * as i1 from "@daffodil/design/loading-icon";
|
7
|
+
/**
|
8
|
+
* DaffButtonComponent is a rectangular contained button with background color.
|
9
|
+
*
|
10
|
+
* ## Usage
|
11
|
+
* ```html
|
12
|
+
* <button daff-button>
|
13
|
+
* <div daffPrefix></div>
|
14
|
+
* Button
|
15
|
+
* <div daffSuffix></div>
|
16
|
+
* </button>
|
17
|
+
*
|
18
|
+
* <a href="/" daff-button>
|
19
|
+
* <div daffPrefix></div>
|
20
|
+
* Linked button
|
21
|
+
* <div daffSuffix></div>
|
22
|
+
* </a>
|
23
|
+
* ```
|
24
|
+
*/
|
25
|
+
export class DaffButtonComponent extends DaffButtonBaseDirective {
|
26
|
+
constructor() {
|
27
|
+
super(...arguments);
|
28
|
+
/**
|
29
|
+
* @docs-private
|
30
|
+
*/
|
31
|
+
this.class = true;
|
32
|
+
}
|
33
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
34
|
+
/** @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 }); }
|
35
|
+
}
|
36
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffButtonComponent, decorators: [{
|
37
|
+
type: Component,
|
38
|
+
args: [{ selector: '' +
|
39
|
+
'button[daff-button]' + ',' +
|
40
|
+
'a[daff-button]', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
41
|
+
DaffPrefixSuffixModule,
|
42
|
+
DAFF_LOADING_ICON_COMPONENTS,
|
43
|
+
], 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"] }]
|
44
|
+
}], propDecorators: { class: [{
|
45
|
+
type: HostBinding,
|
46
|
+
args: ['class.daff-button']
|
47
|
+
}] } });
|
48
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnV0dG9uLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvZGVzaWduL2J1dHRvbi9zcmMvYnV0dG9uL2Jhc2ljL2J1dHRvbi5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL2Rlc2lnbi9idXR0b24vc3JjL2J1dHRvbi9idXR0b24tYmFzZS5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQ0wsU0FBUyxFQUNULGlCQUFpQixFQUNqQix1QkFBdUIsRUFDdkIsV0FBVyxHQUNaLE1BQU0sZUFBZSxDQUFDO0FBRXZCLE9BQU8sRUFBRSxzQkFBc0IsRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FBQzFELE9BQU8sRUFBRSw0QkFBNEIsRUFBRSxNQUFNLCtCQUErQixDQUFDO0F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dHRvbkNvbXBvbmVudCBleHRlbmRzIERhZmZCdXR0b25CYXNlRGlyZWN0aXZlIHtcbiAgLyoqXG4gICAqIEBkb2NzLXByaXZhdGVcbiAgICovXG4gIEBIb3N0QmluZGluZygnY2xhc3MuZGFmZi1idXR0b24nKSBjbGFzcyA9IHRydWU7XG59XG4iLCJAaWYgKF9wcmVmaXgpIHtcbiAgPG5nLWNvbnRlbnQgc2VsZWN0PVwiW2RhZmZQcmVmaXhdXCI+PC9uZy1jb250ZW50PlxufVxuQGlmIChsb2FkaW5nKSB7XG4gIDxkYWZmLWxvYWRpbmctaWNvbiBjbGFzcz1cImRhZmYtYnV0dG9uX19sb2FkaW5nXCI+PC9kYWZmLWxvYWRpbmctaWNvbj5cbn0gQGVsc2Uge1xuICA8c3BhbiBjbGFzcz1cImRhZmYtYnV0dG9uX19jb250ZW50XCI+PG5nLWNvbnRlbnQ+PC9uZy1jb250ZW50Pjwvc3Bhbj5cbn1cbkBpZiAoX3N1ZmZpeCkge1xuICA8bmctY29udGVudCBzZWxlY3Q9XCJbZGFmZlN1ZmZpeF1cIj48L25nLWNvbnRlbnQ+XG59Il19
|
@@ -0,0 +1,105 @@
|
|
1
|
+
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
2
|
+
import { ElementRef, HostBinding, Renderer2, Input, Directive, } from '@angular/core';
|
3
|
+
import { daffPrefixableMixin, daffSuffixableMixin, DaffArticleEncapsulatedDirective, DaffStatusableDirective, DaffColorableDirective, } from '@daffodil/design';
|
4
|
+
import { DaffButtonSizableDirective } from './button-sizable.directive';
|
5
|
+
import * as i0 from "@angular/core";
|
6
|
+
import * as i1 from "./button-sizable.directive";
|
7
|
+
import * as i2 from "@daffodil/design";
|
8
|
+
/**
|
9
|
+
* An _elementRef and an instance of renderer2 are needed for the button mixins
|
10
|
+
*/
|
11
|
+
class DaffButtonBase {
|
12
|
+
constructor(_elementRef, _renderer) {
|
13
|
+
this._elementRef = _elementRef;
|
14
|
+
this._renderer = _renderer;
|
15
|
+
}
|
16
|
+
}
|
17
|
+
const _daffButtonBase = daffPrefixableMixin(daffSuffixableMixin((DaffButtonBase)));
|
18
|
+
export class DaffButtonBaseDirective extends _daffButtonBase {
|
19
|
+
constructor(elementRef, renderer, size) {
|
20
|
+
super(elementRef, renderer);
|
21
|
+
this.elementRef = elementRef;
|
22
|
+
this.renderer = renderer;
|
23
|
+
this.size = size;
|
24
|
+
this.loading = false;
|
25
|
+
/**
|
26
|
+
* Set the `tabindex` to 0.
|
27
|
+
*/
|
28
|
+
this.tabindex = 0;
|
29
|
+
this._disabled = false;
|
30
|
+
/**
|
31
|
+
* Sets the default size of a button to medium.
|
32
|
+
*/
|
33
|
+
this.size.defaultSize = 'md';
|
34
|
+
}
|
35
|
+
/**
|
36
|
+
* @docs-private
|
37
|
+
*/
|
38
|
+
get disabledClass() {
|
39
|
+
return this.disabled;
|
40
|
+
}
|
41
|
+
/**
|
42
|
+
* The disabled state of the button.
|
43
|
+
*/
|
44
|
+
get disabled() {
|
45
|
+
return this._disabled || this.loading;
|
46
|
+
}
|
47
|
+
set disabled(value) {
|
48
|
+
this._disabled = coerceBooleanProperty(value);
|
49
|
+
}
|
50
|
+
get disabledAttribute() {
|
51
|
+
return this.disabled ? true : null;
|
52
|
+
}
|
53
|
+
get ariaDisabled() {
|
54
|
+
return this.disabled ? true : null;
|
55
|
+
}
|
56
|
+
/**
|
57
|
+
* Set the `tabindex` to -1 if the button is disabled.
|
58
|
+
*/
|
59
|
+
get disabledTabIndex() {
|
60
|
+
return this.disabled ? -1 : this.tabindex;
|
61
|
+
}
|
62
|
+
/** @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: i1.DaffButtonSizableDirective }], target: i0.ɵɵFactoryTarget.Directive }); }
|
63
|
+
/** @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: i1.DaffButtonSizableDirective, inputs: ["size", "size"] }, { directive: i2.DaffStatusableDirective, inputs: ["status", "status"] }, { directive: i2.DaffColorableDirective, inputs: ["color", "color"] }], ngImport: i0 }); }
|
64
|
+
}
|
65
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffButtonBaseDirective, decorators: [{
|
66
|
+
type: Directive,
|
67
|
+
args: [{
|
68
|
+
selector: '[daffButtonBase]',
|
69
|
+
hostDirectives: [
|
70
|
+
{ directive: DaffArticleEncapsulatedDirective },
|
71
|
+
{
|
72
|
+
directive: DaffButtonSizableDirective,
|
73
|
+
inputs: ['size'],
|
74
|
+
},
|
75
|
+
{
|
76
|
+
directive: DaffStatusableDirective,
|
77
|
+
inputs: ['status'],
|
78
|
+
},
|
79
|
+
{
|
80
|
+
directive: DaffColorableDirective,
|
81
|
+
inputs: ['color'],
|
82
|
+
},
|
83
|
+
],
|
84
|
+
standalone: true,
|
85
|
+
}]
|
86
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i1.DaffButtonSizableDirective }], propDecorators: { disabledClass: [{
|
87
|
+
type: HostBinding,
|
88
|
+
args: ['class.disabled']
|
89
|
+
}], loading: [{
|
90
|
+
type: Input
|
91
|
+
}], tabindex: [{
|
92
|
+
type: Input
|
93
|
+
}], disabled: [{
|
94
|
+
type: Input
|
95
|
+
}], disabledAttribute: [{
|
96
|
+
type: HostBinding,
|
97
|
+
args: ['attr.disabled']
|
98
|
+
}], ariaDisabled: [{
|
99
|
+
type: HostBinding,
|
100
|
+
args: ['attr.aria-disabled']
|
101
|
+
}], disabledTabIndex: [{
|
102
|
+
type: HostBinding,
|
103
|
+
args: ['attr.tabindex']
|
104
|
+
}] } });
|
105
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnV0dG9uLWJhc2UuZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vbGlicy9kZXNpZ24vYnV0dG9uL3NyYy9idXR0b24vYnV0dG9uLWJhc2UuZGlyZWN0aXZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxxQkFBcUIsRUFBRSxNQUFNLHVCQUF1QixDQUFDO0FBQzlELE9BQU8sRUFDTCxVQUFVLEVBQ1YsV0FBVyxFQUNYLFNBQVMsRUFDVCxLQUFLLEVBQ0wsU0FBUyxHQUNWLE1BQU0sZUFBZSxDQUFDO0FBRXZCLE9BQU8sRUFHTCxtQkFBbUIsRUFDbkIsbUJBQW1CLEVBQ25CLGdDQUFnQyxFQUNoQyx1QkFBdUIsRUFDdkIsc0JBQXNCLEdBQ3ZCLE1BQU0sa0JBQWtCLENBQUM7QUFFMUIsT0FBTyxFQUFFLDBCQUEwQixFQUFFLE1BQU0sNEJBQTRCLENBQUM7Ozs7QUFFeEU7O0dBRUc7QUFDSCxNQUFNLGNBQWM7SUFDbEIsWUFBbUIsV0FBdUIsRUFBUyxTQUFvQjtRQUFwRCxnQkFBVyxHQUFYLFdBQVcsQ0FBWTtRQUFTLGNBQVMsR0FBVCxTQUFTLENBQVc7SUFBRyxDQUFDO0NBQzVFO0FBRUQsTUFBTSxlQUFlLEdBQUcsbUJBQW1CLENBQUMsbUJBQW1CLENBQUMsQ0FBQyxjQUFjLENBQUMsQ0FBQyxDQUFDLENBQUM7QUFxQm5GLE1BQU0sT0FBTyx1QkFDWCxT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zLmRpc2FibGVkO1xuICB9XG5cbiAgQElucHV0KCkgbG9hZGluZyA9IGZhbHNlO1xuXG4gIC8qKlxuICAgKiBTZXQgdGhlIGB0YWJpbmRleGAgdG8gMC5cbiAgICovXG4gIEBJbnB1dCgpIHRhYmluZGV4ID0gMDtcblxuICBfZGlzYWJsZWQgPSBmYWxzZTtcblxuICAvKipcbiAgICogVGhlIGRpc2FibGVkIHN0YXRlIG9mIHRoZSBidXR0b24uXG4gICAqL1xuICBASW5wdXQoKSBnZXQgZGlzYWJsZWQoKSB7XG4gICAgcmV0dXJuIHRoaXMuX2Rpc2FibGVkIHx8IHRoaXMubG9hZGluZztcbiAgfVxuICBzZXQgZGlzYWJsZWQodmFsdWU6IGFueSkge1xuICAgIHRoaXMuX2Rpc2FibGVkID0gY29lcmNlQm9vbGVhblByb3BlcnR5KHZhbHVlKTtcbiAgfVxuXG4gIEBIb3N0QmluZGluZygnYXR0ci5kaXNhYmxlZCcpIGdldCBkaXNhYmxlZEF0dHJpYnV0ZSgpIHtcbiAgICByZXR1cm4gdGhpcy5kaXNhYmxlZCA/IHRydWUgOiBudWxsO1xuICB9XG5cbiAgQEhvc3RCaW5kaW5nKCdhdHRyLmFyaWEtZGlzYWJsZWQnKSBnZXQgYXJpYURpc2FibGVkKCkge1xuICAgIHJldHVybiB0aGlzLmRpc2FibGVkID8gdHJ1ZSA6IG51bGw7XG4gIH1cblxuICAvKipcbiAgICogU2V0IHRoZSBgdGFiaW5kZXhgIHRvIC0xIGlmIHRoZSBidXR0b24gaXMgZGlzYWJsZWQuXG4gICAqL1xuICBASG9zdEJpbmRpbmcoJ2F0dHIudGFiaW5kZXgnKSBnZXQgZGlzYWJsZWRUYWJJbmRleCgpIHtcbiAgICByZXR1cm4gdGhpcy5kaXNhYmxlZCA/IC0xIDogdGhpcy50YWJpbmRleDtcbiAgfVxufVxuIl19
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import { Component, ViewEncapsulation, ChangeDetectionStrategy, HostBinding, } from '@angular/core';
|
2
|
+
import { DaffPrefixSuffixModule } from '@daffodil/design';
|
3
|
+
import { DAFF_LOADING_ICON_COMPONENTS } from '@daffodil/design/loading-icon';
|
4
|
+
import { DaffButtonBaseDirective } from '../button-base.directive';
|
5
|
+
import * as i0 from "@angular/core";
|
6
|
+
import * as i1 from "@daffodil/design/loading-icon";
|
7
|
+
/**
|
8
|
+
* DaffFlatButtonComponent is a rectangular contained button no background.
|
9
|
+
*
|
10
|
+
* ## Usage
|
11
|
+
* ```html
|
12
|
+
* <button daff-flat-button>
|
13
|
+
* <div daffPrefix></div>
|
14
|
+
* Flat Button
|
15
|
+
* <div daffSuffix></div>
|
16
|
+
* </button>
|
17
|
+
*
|
18
|
+
* <a href="/" daff-flat-button>
|
19
|
+
* <div daffPrefix></div>
|
20
|
+
* Linked flat button
|
21
|
+
* <div daffSuffix></div>
|
22
|
+
* </a>
|
23
|
+
* ```
|
24
|
+
*/
|
25
|
+
export class DaffFlatButtonComponent extends DaffButtonBaseDirective {
|
26
|
+
constructor() {
|
27
|
+
super(...arguments);
|
28
|
+
/**
|
29
|
+
* @docs-private
|
30
|
+
*/
|
31
|
+
this.class = true;
|
32
|
+
}
|
33
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffFlatButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
34
|
+
/** @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 }); }
|
35
|
+
}
|
36
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffFlatButtonComponent, decorators: [{
|
37
|
+
type: Component,
|
38
|
+
args: [{ selector: '' +
|
39
|
+
'button[daff-flat-button]' + ',' +
|
40
|
+
'a[daff-flat-button]', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
41
|
+
DaffPrefixSuffixModule,
|
42
|
+
DAFF_LOADING_ICON_COMPONENTS,
|
43
|
+
], 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"] }]
|
44
|
+
}], propDecorators: { class: [{
|
45
|
+
type: HostBinding,
|
46
|
+
args: ['class.daff-flat-button']
|
47
|
+
}] } });
|
48
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmxhdC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL2Rlc2lnbi9idXR0b24vc3JjL2J1dHRvbi9mbGF0L2ZsYXQuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9kZXNpZ24vYnV0dG9uL3NyYy9idXR0b24vYnV0d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AnLi9mbGF0LmNvbXBvbmVudC5zY3NzJyxcbiAgZW5jYXBzdWxhdGlvbjogVmlld0VuY2Fwc3VsYXRpb24uTm9uZSxcbiAgY2hhbmdlRGV0ZWN0aW9uOiBDaGFuZ2VEZXRlY3Rpb25TdHJhdGVneS5PblB1c2gsXG4gIHN0YW5kYWxvbmU6IHRydWUsXG4gIGltcG9ydHM6IFtcbiAgICBEYWZmUHJlZml4U3VmZml4TW9kdWxlLFxuICAgIERBRkZfTE9BRElOR19JQ09OX0NPTVBPTkVOVFMsXG4gIF0sXG59KVxuZXhwb3J0IGNsYXNzIERhZmZGbGF0QnV0dG9uQ29tcG9uZW50XG4gIGV4dGVuZHMgRGFmZkJ1dHRvbkJhc2VEaXJlY3RpdmUge1xuXG4gIC8qKlxuICAgKiBAZG9jcy1wcml2YXRlXG4gICAqL1xuICBASG9zdEJpbmRpbmcoJ2NsYXNzLmRhZmYtZmxhdC1idXR0b24nKSBjbGFzcyA9IHRydWU7XG59XG4iLCJAaWYgKF9wcmVmaXgpIHtcbiAgPG5nLWNvbnRlbnQgc2VsZWN0PVwiW2RhZmZQcmVmaXhdXCI+PC9uZy1jb250ZW50PlxufVxuQGlmIChsb2FkaW5nKSB7XG4gIDxkYWZmLWxvYWRpbmctaWNvbiBjbGFzcz1cImRhZmYtYnV0dG9uX19sb2FkaW5nXCI+PC9kYWZmLWxvYWRpbmctaWNvbj5cbn0gQGVsc2Uge1xuICA8c3BhbiBjbGFzcz1cImRhZmYtYnV0dG9uX19jb250ZW50XCI+PG5nLWNvbnRlbnQ+PC9uZy1jb250ZW50Pjwvc3Bhbj5cbn1cbkBpZiAoX3N1ZmZpeCkge1xuICA8bmctY29udGVudCBzZWxlY3Q9XCJbZGFmZlN1ZmZpeF1cIj48L25nLWNvbnRlbnQ+XG59Il19
|
@@ -0,0 +1,44 @@
|
|
1
|
+
import { Component, ViewEncapsulation, ChangeDetectionStrategy, HostBinding, } from '@angular/core';
|
2
|
+
import { DaffPrefixSuffixModule } from '@daffodil/design';
|
3
|
+
import { DAFF_LOADING_ICON_COMPONENTS } from '@daffodil/design/loading-icon';
|
4
|
+
import { DaffButtonBaseDirective } from '../button-base.directive';
|
5
|
+
import * as i0 from "@angular/core";
|
6
|
+
import * as i1 from "@daffodil/design/loading-icon";
|
7
|
+
/**
|
8
|
+
* DaffIconButtonComponent is an icon button used with icon fonts.
|
9
|
+
*
|
10
|
+
* ## Usage
|
11
|
+
* ```html
|
12
|
+
* <button daff-icon-button>
|
13
|
+
* <fa-icon [icon]="faPlus"></fa-icon>
|
14
|
+
* </button>
|
15
|
+
*
|
16
|
+
* <a href="/" daff-icon-button>
|
17
|
+
* <fa-icon [icon]="faPlus"></fa-icon>
|
18
|
+
* </a>
|
19
|
+
* ```
|
20
|
+
*/
|
21
|
+
export class DaffIconButtonComponent extends DaffButtonBaseDirective {
|
22
|
+
constructor() {
|
23
|
+
super(...arguments);
|
24
|
+
/**
|
25
|
+
* @docs-private
|
26
|
+
*/
|
27
|
+
this.class = true;
|
28
|
+
}
|
29
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffIconButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
30
|
+
/** @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 }); }
|
31
|
+
}
|
32
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffIconButtonComponent, decorators: [{
|
33
|
+
type: Component,
|
34
|
+
args: [{ selector: '' +
|
35
|
+
'button[daff-icon-button]' + ',' +
|
36
|
+
'a[daff-icon-button]', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
37
|
+
DaffPrefixSuffixModule,
|
38
|
+
DAFF_LOADING_ICON_COMPONENTS,
|
39
|
+
], 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"] }]
|
40
|
+
}], propDecorators: { class: [{
|
41
|
+
type: HostBinding,
|
42
|
+
args: ['class.daff-icon-button']
|
43
|
+
}] } });
|
44
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWNvbi5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL2Rlc2lnbi9idXR0b24vc3JjL2J1dHRvbi9pY29uL2ljb24uY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9kZXNpZ24vYnV0dG9uL3NyYy9idXR0b24vYnV0dG9uLWJhc2UuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUNMLFNBQVMsRUFDVCxpQkFBaUIsRUFDakIsdUJBQXVCLEVBQ3ZCLFdBQVcsR0FDWixNQUFNLGVBQWUsQ0FBQztBQUV2QixPQUFPLEVBQUUsc0JBQXNCLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUMxRCxPQUFPLEVBQUUsNEJBQTRCLEVBQUUsTUFBTSwrQkFBK0IsQ0FBQztBQU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AgKiBAZG9jcy1wcml2YXRlXG4gICAqL1xuICBASG9zdEJpbmRpbmcoJ2NsYXNzLmRhZmYtaWNvbi1idXR0b24nKSBjbGFzcyA9IHRydWU7XG59XG4iLCJAaWYgKF9wcmVmaXgpIHtcbiAgPG5nLWNvbnRlbnQgc2VsZWN0PVwiW2RhZmZQcmVmaXhdXCI+PC9uZy1jb250ZW50PlxufVxuQGlmIChsb2FkaW5nKSB7XG4gIDxkYWZmLWxvYWRpbmctaWNvbiBjbGFzcz1cImRhZmYtYnV0dG9uX19sb2FkaW5nXCI+PC9kYWZmLWxvYWRpbmctaWNvbj5cbn0gQGVsc2Uge1xuICA8c3BhbiBjbGFzcz1cImRhZmYtYnV0dG9uX19jb250ZW50XCI+PG5nLWNvbnRlbnQ+PC9uZy1jb250ZW50Pjwvc3Bhbj5cbn1cbkBpZiAoX3N1ZmZpeCkge1xuICA8bmctY29udGVudCBzZWxlY3Q9XCJbZGFmZlN1ZmZpeF1cIj48L25nLWNvbnRlbnQ+XG59Il19
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import { Component, ViewEncapsulation, ChangeDetectionStrategy, HostBinding, } from '@angular/core';
|
2
|
+
import { DaffPrefixSuffixModule } from '@daffodil/design';
|
3
|
+
import { DAFF_LOADING_ICON_COMPONENTS } from '@daffodil/design/loading-icon';
|
4
|
+
import { DaffButtonBaseDirective } from '../button-base.directive';
|
5
|
+
import * as i0 from "@angular/core";
|
6
|
+
import * as i1 from "@daffodil/design/loading-icon";
|
7
|
+
/**
|
8
|
+
* DaffRaisedButtonComponent is a rectangular contained button with background color and elevation.
|
9
|
+
*
|
10
|
+
* ## Usage
|
11
|
+
* ```html
|
12
|
+
* <button daff-raised-button>
|
13
|
+
* <div daffPrefix></div>
|
14
|
+
* Raised Button
|
15
|
+
* <div daffSuffix></div>
|
16
|
+
* </button>
|
17
|
+
*
|
18
|
+
* <a href="/" daff-raised-button>
|
19
|
+
* <div daffPrefix></div>
|
20
|
+
* Linked raised button
|
21
|
+
* <div daffSuffix></div>
|
22
|
+
* </a>
|
23
|
+
* ```
|
24
|
+
*/
|
25
|
+
export class DaffRaisedButtonComponent extends DaffButtonBaseDirective {
|
26
|
+
constructor() {
|
27
|
+
super(...arguments);
|
28
|
+
/**
|
29
|
+
* @docs-private
|
30
|
+
*/
|
31
|
+
this.class = true;
|
32
|
+
}
|
33
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffRaisedButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
34
|
+
/** @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 }); }
|
35
|
+
}
|
36
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffRaisedButtonComponent, decorators: [{
|
37
|
+
type: Component,
|
38
|
+
args: [{ selector: '' +
|
39
|
+
'button[daff-raised-button]' + ',' +
|
40
|
+
'a[daff-raised-button]', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
41
|
+
DaffPrefixSuffixModule,
|
42
|
+
DAFF_LOADING_ICON_COMPONENTS,
|
43
|
+
], 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"] }]
|
44
|
+
}], propDecorators: { class: [{
|
45
|
+
type: HostBinding,
|
46
|
+
args: ['class.daff-raised-button']
|
47
|
+
}] } });
|
48
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmFpc2VkLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvZGVzaWduL2J1dHRvbi9zcmMvYnV0dG9uL3JhaXNlZC9yYWlzZWQuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9kZXNpZ24vYnV0dG9uL3NyYy9idXR0b24vYnV0dG9uLWJhc2UuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUNMLFNBQVMsRUFDVCxpQkFBaUIsRUFDakIsdUJBQXVCLEVBQ3ZCLFdBQVcsR0FDWixNQUFNLGVBQWUsQ0FBQztBQUV2QixPQUFPLEVBQUUsc0JBQXNCLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUMxRCxPQUFPLEVBQUUsNEJBQTRCLEVBQUUsTUFBTSwrQkFBK0IsQ0FBQztBQUU3RSxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQzs7O0FBRW5FOzs7Ozs7Ozs7Ozs7Ozs7OztHQWlCRztBQWdCSCxNQUFNLE9BQU8seUJBQ1gsU0FBUSx1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GlyZWN0aXZlIHtcblxuICAvKipcbiAgICogQGRvY3MtcHJpdmF0ZVxuICAgKi9cbiAgQEhvc3RCaW5kaW5nKCdjbGFzcy5kYWZmLXJhaXNlZC1idXR0b24nKSBjbGFzcyA9IHRydWU7XG59XG4iLCJAaWYgKF9wcmVmaXgpIHtcbiAgPG5nLWNvbnRlbnQgc2VsZWN0PVwiW2RhZmZQcmVmaXhdXCI+PC9uZy1jb250ZW50PlxufVxuQGlmIChsb2FkaW5nKSB7XG4gIDxkYWZmLWxvYWRpbmctaWNvbiBjbGFzcz1cImRhZmYtYnV0dG9uX19sb2FkaW5nXCI+PC9kYWZmLWxvYWRpbmctaWNvbj5cbn0gQGVsc2Uge1xuICA8c3BhbiBjbGFzcz1cImRhZmYtYnV0dG9uX19jb250ZW50XCI+PG5nLWNvbnRlbnQ+PC9uZy1jb250ZW50Pjwvc3Bhbj5cbn1cbkBpZiAoX3N1ZmZpeCkge1xuICA8bmctY29udGVudCBzZWxlY3Q9XCJbZGFmZlN1ZmZpeF1cIj48L25nLWNvbnRlbnQ+XG59Il19
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import { Component, ViewEncapsulation, ChangeDetectionStrategy, HostBinding, } from '@angular/core';
|
2
|
+
import { DaffPrefixSuffixModule } from '@daffodil/design';
|
3
|
+
import { DAFF_LOADING_ICON_COMPONENTS } from '@daffodil/design/loading-icon';
|
4
|
+
import { DaffButtonBaseDirective } from '../button-base.directive';
|
5
|
+
import * as i0 from "@angular/core";
|
6
|
+
import * as i1 from "@daffodil/design/loading-icon";
|
7
|
+
/**
|
8
|
+
* DaffStrokedButtonComponent is a rectangular outlined button with no background color.
|
9
|
+
*
|
10
|
+
* ## Usage
|
11
|
+
* ```html
|
12
|
+
* <button daff-stroked-button>
|
13
|
+
* <div daffPrefix></div>
|
14
|
+
* Stroked Button
|
15
|
+
* <div daffSuffix></div>
|
16
|
+
* </button>
|
17
|
+
*
|
18
|
+
* <a href="/" daff-stroked-button>
|
19
|
+
* <div daffPrefix></div>
|
20
|
+
* Linked stroked button
|
21
|
+
* <div daffSuffix></div>
|
22
|
+
* </a>
|
23
|
+
* ```
|
24
|
+
*/
|
25
|
+
export class DaffStrokedButtonComponent extends DaffButtonBaseDirective {
|
26
|
+
constructor() {
|
27
|
+
super(...arguments);
|
28
|
+
/**
|
29
|
+
* @docs-private
|
30
|
+
*/
|
31
|
+
this.class = true;
|
32
|
+
}
|
33
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffStrokedButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
34
|
+
/** @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 }); }
|
35
|
+
}
|
36
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffStrokedButtonComponent, decorators: [{
|
37
|
+
type: Component,
|
38
|
+
args: [{ selector: '' +
|
39
|
+
'button[daff-stroked-button]' + ',' +
|
40
|
+
'a[daff-stroked-button]', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
41
|
+
DaffPrefixSuffixModule,
|
42
|
+
DAFF_LOADING_ICON_COMPONENTS,
|
43
|
+
], 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"] }]
|
44
|
+
}], propDecorators: { class: [{
|
45
|
+
type: HostBinding,
|
46
|
+
args: ['class.daff-stroked-button']
|
47
|
+
}] } });
|
48
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Ryb2tlZC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL2Rlc2lnbi9idXR0b24vc3JjL2J1dHRvbi9zdHJva2VkL3N0cm9rZWQuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9kZXNpZ24vYnV0dG9uL3NyYy9idXR0b24vYnV0dG9uLWJhc2UuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxFQUNMLFNBQVMsRUFDVCxpQkFBaUIsRUFDakIsdUJBQXVCLEVBQ3ZCLFdBQVcsR0FDWixNQUFNLGVBQWUsQ0FBQztBQUV2QixPQUFPLEVBQUUsc0JBQXNCLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUMxRCxPQUFPLEVBQUUsNEJBQTRCLEVBQUUsTUFBTSwrQkFBK0IsQ0FBQztBQUU3RSxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQzs7O0FBRW5FOzs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19JQ09OX0NPTVBPTkVOVFMsXG4gIF0sXG59KVxuZXhwb3J0IGNsYXNzIERhZmZTdHJva2VkQnV0dG9uQ29tcG9uZW50XG4gIGV4dGVuZHMgRGFmZkJ1dHRvbkJhc2VEaXJlY3RpdmUge1xuXG4gIC8qKlxuICAgKiBAZG9jcy1wcml2YXRlXG4gICAqL1xuICBASG9zdEJpbmRpbmcoJ2NsYXNzLmRhZmYtc3Ryb2tlZC1idXR0b24nKSBjbGFzcyA9IHRydWU7XG59XG4iLCJAaWYgKF9wcmVmaXgpIHtcbiAgPG5nLWNvbnRlbnQgc2VsZWN0PVwiW2RhZmZQcmVmaXhdXCI+PC9uZy1jb250ZW50PlxufVxuQGlmIChsb2FkaW5nKSB7XG4gIDxkYWZmLWxvYWRpbmctaWNvbiBjbGFzcz1cImRhZmYtYnV0dG9uX19sb2FkaW5nXCI+PC9kYWZmLWxvYWRpbmctaWNvbj5cbn0gQGVsc2Uge1xuICA8c3BhbiBjbGFzcz1cImRhZmYtYnV0dG9uX19jb250ZW50XCI+PG5nLWNvbnRlbnQ+PC9uZy1jb250ZW50Pjwvc3Bhbj5cbn1cbkBpZiAoX3N1ZmZpeCkge1xuICA8bmctY29udGVudCBzZWxlY3Q9XCJbZGFmZlN1ZmZpeF1cIj48L25nLWNvbnRlbnQ+XG59Il19
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import { Component, ViewEncapsulation, ChangeDetectionStrategy, HostBinding, } from '@angular/core';
|
2
|
+
import { DaffPrefixSuffixModule } from '@daffodil/design';
|
3
|
+
import { DAFF_LOADING_ICON_COMPONENTS } from '@daffodil/design/loading-icon';
|
4
|
+
import { DaffButtonBaseDirective } from '../button-base.directive';
|
5
|
+
import * as i0 from "@angular/core";
|
6
|
+
import * as i1 from "@daffodil/design/loading-icon";
|
7
|
+
/**
|
8
|
+
* DaffUnderlineButtonComponent is a borderless button with a custom underline style.
|
9
|
+
*
|
10
|
+
* ## Usage
|
11
|
+
* ```html
|
12
|
+
* <button daff-underline-button>
|
13
|
+
* <div daffPrefix></div>
|
14
|
+
* Underline Button
|
15
|
+
* <div daffSuffix></div>
|
16
|
+
* </button>
|
17
|
+
*
|
18
|
+
* <a href="/" daff-underline-button>
|
19
|
+
* <div daffPrefix></div>
|
20
|
+
* Linked underline button
|
21
|
+
* <div daffSuffix></div>
|
22
|
+
* </a>
|
23
|
+
* ```
|
24
|
+
*/
|
25
|
+
export class DaffUnderlineButtonComponent extends DaffButtonBaseDirective {
|
26
|
+
constructor() {
|
27
|
+
super(...arguments);
|
28
|
+
/**
|
29
|
+
* @docs-private
|
30
|
+
*/
|
31
|
+
this.class = true;
|
32
|
+
}
|
33
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffUnderlineButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
34
|
+
/** @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 }); }
|
35
|
+
}
|
36
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffUnderlineButtonComponent, decorators: [{
|
37
|
+
type: Component,
|
38
|
+
args: [{ selector: '' +
|
39
|
+
'button[daff-underline-button]' + ',' +
|
40
|
+
'a[daff-underline-button]', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
41
|
+
DaffPrefixSuffixModule,
|
42
|
+
DAFF_LOADING_ICON_COMPONENTS,
|
43
|
+
], 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"] }]
|
44
|
+
}], propDecorators: { class: [{
|
45
|
+
type: HostBinding,
|
46
|
+
args: ['class.daff-underline-button']
|
47
|
+
}] } });
|
48
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidW5kZXJsaW5lLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvZGVzaWduL2J1dHRvbi9zcmMvYnV0dG9uL3VuZGVybGluZS91bmRlcmx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250ZW50Pjwvc3Bhbj5cbn1cbkBpZiAoX3N1ZmZpeCkge1xuICA8bmctY29udGVudCBzZWxlY3Q9XCJbZGFmZlN1ZmZpeF1cIj48L25nLWNvbnRlbnQ+XG59Il19
|
@@ -1,7 +1,17 @@
|
|
1
1
|
import { DaffPrefixSuffixModule } from '@daffodil/design';
|
2
|
-
import { DaffButtonComponent } from './button/button.component';
|
2
|
+
import { DaffButtonComponent } from './button/basic/button.component';
|
3
|
+
import { DaffFlatButtonComponent } from './button/flat/flat.component';
|
4
|
+
import { DaffIconButtonComponent } from './button/icon/icon.component';
|
5
|
+
import { DaffRaisedButtonComponent } from './button/raised/raised.component';
|
6
|
+
import { DaffStrokedButtonComponent } from './button/stroked/stroked.component';
|
7
|
+
import { DaffUnderlineButtonComponent } from './button/underline/underline.component';
|
3
8
|
export const DAFF_BUTTON_COMPONENTS = [
|
4
9
|
DaffButtonComponent,
|
5
10
|
DaffPrefixSuffixModule,
|
11
|
+
DaffFlatButtonComponent,
|
12
|
+
DaffIconButtonComponent,
|
13
|
+
DaffRaisedButtonComponent,
|
14
|
+
DaffStrokedButtonComponent,
|
15
|
+
DaffUnderlineButtonComponent,
|
6
16
|
];
|
7
|
-
//# sourceMappingURL=data:application/json;base64,
|
17
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnV0dG9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vbGlicy9kZXNpZ24vYnV0dG9uL3NyYy9idXR0b24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLHNCQUFzQixFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFFMUQsT0FBTyxFQUFFLG1CQUFtQixFQUFFLE1BQU0saUNBQWlDLENBQUM7QUFDdEUsT0FBTyxFQUFFLHVCQUF1QixFQUFFLE1BQU0sOEJBQThCLENBQUM7QUFDdkUsT0FBTyxFQ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0gZnJvbSAnLi9idXR0b24vdW5kZXJsaW5lL3VuZGVybGluZS5jb21wb25lbnQnO1xuXG5leHBvcnQgY29uc3QgREFGRl9CVVRUT05fQ09NUE9ORU5UUyA9IDxjb25zdD4gW1xuICBEYWZmQnV0dG9uQ29tcG9uZW50LFxuICBEYWZmUHJlZml4U3VmZml4TW9kdWxlLFxuICBEYWZmRmxhdEJ1dHRvbkNvbXBvbmVudCxcbiAgRGFmZkljb25CdXR0b25Db21wb25lbnQsXG4gIERhZmZSYWlzZWRCdXR0b25Db21wb25lbnQsXG4gIERhZmZTdHJva2VkQnV0dG9uQ29tcG9uZW50LFxuICBEYWZmVW5kZXJsaW5lQnV0dG9uQ29tcG9uZW50LFxuXTtcbiJdfQ==
|
@@ -1,16 +1,36 @@
|
|
1
1
|
import { CommonModule } from '@angular/common';
|
2
2
|
import { NgModule } from '@angular/core';
|
3
3
|
import { DaffPrefixSuffixModule } from '@daffodil/design';
|
4
|
-
import { DaffButtonComponent } from './button/button.component';
|
4
|
+
import { DaffButtonComponent } from './button/basic/button.component';
|
5
|
+
import { DaffFlatButtonComponent } from './button/flat/flat.component';
|
6
|
+
import { DaffIconButtonComponent } from './button/icon/icon.component';
|
7
|
+
import { DaffRaisedButtonComponent } from './button/raised/raised.component';
|
8
|
+
import { DaffStrokedButtonComponent } from './button/stroked/stroked.component';
|
9
|
+
import { DaffUnderlineButtonComponent } from './button/underline/underline.component';
|
5
10
|
import * as i0 from "@angular/core";
|
6
11
|
/** @deprecated in favor of {@link DAFF_BUTTON_COMPONENTS} */
|
7
12
|
export class DaffButtonModule {
|
8
13
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
9
14
|
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.2", ngImport: i0, type: DaffButtonModule, imports: [CommonModule,
|
10
|
-
DaffButtonComponent
|
15
|
+
DaffButtonComponent,
|
16
|
+
DaffFlatButtonComponent,
|
17
|
+
DaffIconButtonComponent,
|
18
|
+
DaffRaisedButtonComponent,
|
19
|
+
DaffStrokedButtonComponent,
|
20
|
+
DaffUnderlineButtonComponent], exports: [DaffButtonComponent,
|
21
|
+
DaffFlatButtonComponent,
|
22
|
+
DaffIconButtonComponent,
|
23
|
+
DaffRaisedButtonComponent,
|
24
|
+
DaffStrokedButtonComponent,
|
25
|
+
DaffUnderlineButtonComponent,
|
11
26
|
DaffPrefixSuffixModule] }); }
|
12
27
|
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffButtonModule, imports: [CommonModule,
|
13
|
-
DaffButtonComponent,
|
28
|
+
DaffButtonComponent,
|
29
|
+
DaffFlatButtonComponent,
|
30
|
+
DaffIconButtonComponent,
|
31
|
+
DaffRaisedButtonComponent,
|
32
|
+
DaffStrokedButtonComponent,
|
33
|
+
DaffUnderlineButtonComponent, DaffPrefixSuffixModule] }); }
|
14
34
|
}
|
15
35
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffButtonModule, decorators: [{
|
16
36
|
type: NgModule,
|
@@ -18,11 +38,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImpor
|
|
18
38
|
imports: [
|
19
39
|
CommonModule,
|
20
40
|
DaffButtonComponent,
|
41
|
+
DaffFlatButtonComponent,
|
42
|
+
DaffIconButtonComponent,
|
43
|
+
DaffRaisedButtonComponent,
|
44
|
+
DaffStrokedButtonComponent,
|
45
|
+
DaffUnderlineButtonComponent,
|
21
46
|
],
|
22
47
|
exports: [
|
23
48
|
DaffButtonComponent,
|
49
|
+
DaffFlatButtonComponent,
|
50
|
+
DaffIconButtonComponent,
|
51
|
+
DaffRaisedButtonComponent,
|
52
|
+
DaffStrokedButtonComponent,
|
53
|
+
DaffUnderlineButtonComponent,
|
24
54
|
DaffPrefixSuffixModule,
|
25
55
|
],
|
26
56
|
}]
|
27
57
|
}] });
|
28
|
-
//# sourceMappingURL=data:application/json;base64,
|
58
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnV0dG9uLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYnMvZGVzaWduL2J1dHRvbi9zcmMvYnV0dG9uLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDL0MsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUV6QyxPQUFPLEVBQUUsc0JBQXNCLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUUxRCxPQUFPLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQztBQUN0RSxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsTUFBTSw4QkFBOEIsQ0FBQztBQUN2RSxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsTUFBTSw4QkFBOEIsQ0FBQztBQUN2RSxPQUFPLEVBQUUseUJBQXlCLEVBQUUsTUFBTSxrQ0FBa0MsQ0FBQztBQUM3RSxPQUFPLEVBQUUsMEJBQTBCLEVBQUUsTUFBTSxvQ0FBb0MsQ0FBQztBQUNoRixPQUFPLEVBQUUsNEJBQTRCLEVBQUUsTUFBTSx3Q0FBd0MsQ0FBQzs7QUFFdEYsNkRBQTZEO0FBcUI3RCxNQUFNLE9BQU8sZ0JBQWdCO2lJQUFoQixnQkFBZ0I7a0lBQWhCLGdCQUFnQixZQWxCekIsWUFBWTtZQUNaLG1CQUFtQjtZQUNuQix1QkFBdUI7WUFDdkIsdUJBQXV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