@daffodil/design 0.92.3 → 0.93.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/README.md +4 -4
- package/beacon/README.md +61 -0
- package/beacon/src/beacon-theme.scss +61 -0
- package/breadcrumb/README.md +13 -35
- package/button/README.md +28 -50
- package/card/README.md +8 -22
- package/card/src/card/stroked/stroked-theme.scss +8 -1
- package/card/src/card-base-theme.scss +12 -1
- package/container/README.md +4 -26
- package/fesm2022/daffodil-design-accordion.mjs +15 -15
- package/fesm2022/daffodil-design-accordion.mjs.map +1 -1
- package/fesm2022/daffodil-design-article.mjs +30 -30
- package/fesm2022/daffodil-design-article.mjs.map +1 -1
- package/fesm2022/daffodil-design-beacon.mjs +48 -0
- package/fesm2022/daffodil-design-beacon.mjs.map +1 -0
- package/fesm2022/daffodil-design-breadcrumb.mjs +20 -20
- package/fesm2022/daffodil-design-breadcrumb.mjs.map +1 -1
- package/fesm2022/daffodil-design-button.mjs +37 -49
- package/fesm2022/daffodil-design-button.mjs.map +1 -1
- package/fesm2022/daffodil-design-callout.mjs +22 -22
- package/fesm2022/daffodil-design-callout.mjs.map +1 -1
- package/fesm2022/daffodil-design-card.mjs +31 -31
- package/fesm2022/daffodil-design-card.mjs.map +1 -1
- package/fesm2022/daffodil-design-checkbox.mjs +13 -13
- package/fesm2022/daffodil-design-checkbox.mjs.map +1 -1
- package/fesm2022/daffodil-design-container.mjs +7 -7
- package/fesm2022/daffodil-design-container.mjs.map +1 -1
- package/fesm2022/daffodil-design-form-field.mjs +13 -12
- package/fesm2022/daffodil-design-form-field.mjs.map +1 -1
- package/fesm2022/daffodil-design-form.mjs +9 -9
- package/fesm2022/daffodil-design-form.mjs.map +1 -1
- package/fesm2022/daffodil-design-hero.mjs +22 -22
- package/fesm2022/daffodil-design-hero.mjs.map +1 -1
- package/fesm2022/daffodil-design-image.mjs +8 -8
- package/fesm2022/daffodil-design-image.mjs.map +1 -1
- package/fesm2022/daffodil-design-input.mjs +12 -11
- package/fesm2022/daffodil-design-input.mjs.map +1 -1
- package/fesm2022/daffodil-design-link-set.mjs +16 -16
- package/fesm2022/daffodil-design-link-set.mjs.map +1 -1
- package/fesm2022/daffodil-design-list.mjs +20 -17
- package/fesm2022/daffodil-design-list.mjs.map +1 -1
- package/fesm2022/daffodil-design-loading-icon.mjs +7 -7
- package/fesm2022/daffodil-design-loading-icon.mjs.map +1 -1
- package/fesm2022/daffodil-design-media-gallery.mjs +13 -13
- package/fesm2022/daffodil-design-media-gallery.mjs.map +1 -1
- package/fesm2022/daffodil-design-menu.mjs +20 -20
- package/fesm2022/daffodil-design-menu.mjs.map +1 -1
- package/fesm2022/daffodil-design-modal.mjs +33 -27
- package/fesm2022/daffodil-design-modal.mjs.map +1 -1
- package/fesm2022/daffodil-design-native-select.mjs +5 -3
- package/fesm2022/daffodil-design-native-select.mjs.map +1 -1
- package/fesm2022/daffodil-design-navbar.mjs +9 -9
- package/fesm2022/daffodil-design-navbar.mjs.map +1 -1
- package/fesm2022/daffodil-design-notification.mjs +16 -16
- package/fesm2022/daffodil-design-notification.mjs.map +1 -1
- package/fesm2022/daffodil-design-paginator.mjs +8 -8
- package/fesm2022/daffodil-design-paginator.mjs.map +1 -1
- package/fesm2022/daffodil-design-progress-bar.mjs +11 -11
- package/fesm2022/daffodil-design-progress-bar.mjs.map +1 -1
- package/fesm2022/daffodil-design-quantity-field.mjs +13 -13
- package/fesm2022/daffodil-design-quantity-field.mjs.map +1 -1
- package/fesm2022/daffodil-design-radio.mjs +16 -16
- package/fesm2022/daffodil-design-radio.mjs.map +1 -1
- package/fesm2022/daffodil-design-select.mjs +11 -11
- package/fesm2022/daffodil-design-select.mjs.map +1 -1
- package/fesm2022/daffodil-design-sidebar.mjs +36 -30
- package/fesm2022/daffodil-design-sidebar.mjs.map +1 -1
- package/fesm2022/daffodil-design-spinner.mjs +8 -8
- package/fesm2022/daffodil-design-spinner.mjs.map +1 -1
- package/fesm2022/daffodil-design-switch.mjs +3 -3
- package/fesm2022/daffodil-design-switch.mjs.map +1 -1
- package/fesm2022/daffodil-design-tabs.mjs +17 -25
- package/fesm2022/daffodil-design-tabs.mjs.map +1 -1
- package/fesm2022/daffodil-design-tag.mjs +43 -35
- package/fesm2022/daffodil-design-tag.mjs.map +1 -1
- package/fesm2022/daffodil-design-testing.mjs +19 -0
- package/fesm2022/daffodil-design-testing.mjs.map +1 -0
- package/fesm2022/daffodil-design-text-snippet.mjs +3 -3
- package/fesm2022/daffodil-design-text-snippet.mjs.map +1 -1
- package/fesm2022/daffodil-design-textarea.mjs +3 -3
- package/fesm2022/daffodil-design-textarea.mjs.map +1 -1
- package/fesm2022/daffodil-design-toast.mjs +22 -22
- package/fesm2022/daffodil-design-toast.mjs.map +1 -1
- package/fesm2022/daffodil-design-tree.mjs +27 -25
- package/fesm2022/daffodil-design-tree.mjs.map +1 -1
- package/fesm2022/daffodil-design-youtube-player.mjs +22 -11
- package/fesm2022/daffodil-design-youtube-player.mjs.map +1 -1
- package/fesm2022/daffodil-design.mjs +126 -160
- package/fesm2022/daffodil-design.mjs.map +1 -1
- package/form/README.md +15 -6
- package/hero/README.md +14 -49
- package/image/README.md +6 -29
- package/input/README.md +8 -34
- package/list/README.md +29 -55
- package/list/src/list-theme.scss +16 -2
- package/media-gallery/README.md +36 -43
- package/menu/README.md +24 -55
- package/menu/src/menu-theme.scss +12 -2
- package/modal/README.md +15 -45
- package/native-select/README.md +8 -6
- package/navbar/README.md +18 -27
- package/notification/README.md +14 -49
- package/package.json +1 -1
- package/paginator/README.md +11 -31
- package/paginator/src/paginator-theme.scss +16 -2
- package/progress-bar/README.md +14 -41
- package/scss/global.scss +25 -2
- package/scss/theme.scss +2 -0
- package/select/README.md +5 -6
- package/select/src/select-theme.scss +10 -2
- package/sidebar/README.md +1 -1
- package/spinner/README.md +15 -9
- package/switch/README.md +17 -6
- package/tabs/README.md +39 -39
- package/tag/README.md +31 -31
- package/tag/src/tag-theme.scss +100 -3
- package/textarea/README.md +9 -7
- package/toast/README.md +55 -52
- package/tree/README.md +12 -43
- package/tree/src/tree-theme.scss +8 -4
- package/{accordion/index.d.ts → types/daffodil-design-accordion.d.ts} +1 -1
- package/types/daffodil-design-beacon.d.ts +26 -0
- package/{button/index.d.ts → types/daffodil-design-button.d.ts} +7 -8
- package/{input/index.d.ts → types/daffodil-design-input.d.ts} +4 -1
- package/{list/index.d.ts → types/daffodil-design-list.d.ts} +4 -1
- package/{menu/index.d.ts → types/daffodil-design-menu.d.ts} +3 -3
- package/{modal/index.d.ts → types/daffodil-design-modal.d.ts} +11 -5
- package/{native-select/index.d.ts → types/daffodil-design-native-select.d.ts} +3 -1
- package/{sidebar/index.d.ts → types/daffodil-design-sidebar.d.ts} +9 -3
- package/{tabs/index.d.ts → types/daffodil-design-tabs.d.ts} +0 -6
- package/types/daffodil-design-tag.d.ts +80 -0
- package/types/daffodil-design-testing.d.ts +11 -0
- package/{tree/index.d.ts → types/daffodil-design-tree.d.ts} +2 -0
- package/{youtube-player/index.d.ts → types/daffodil-design-youtube-player.d.ts} +15 -0
- package/{index.d.ts → types/daffodil-design.d.ts} +25 -67
- package/tag/index.d.ts +0 -71
- /package/{article/index.d.ts → types/daffodil-design-article.d.ts} +0 -0
- /package/{breadcrumb/index.d.ts → types/daffodil-design-breadcrumb.d.ts} +0 -0
- /package/{callout/index.d.ts → types/daffodil-design-callout.d.ts} +0 -0
- /package/{card/index.d.ts → types/daffodil-design-card.d.ts} +0 -0
- /package/{checkbox/index.d.ts → types/daffodil-design-checkbox.d.ts} +0 -0
- /package/{container/index.d.ts → types/daffodil-design-container.d.ts} +0 -0
- /package/{form-field/index.d.ts → types/daffodil-design-form-field.d.ts} +0 -0
- /package/{form/index.d.ts → types/daffodil-design-form.d.ts} +0 -0
- /package/{hero/index.d.ts → types/daffodil-design-hero.d.ts} +0 -0
- /package/{image/index.d.ts → types/daffodil-design-image.d.ts} +0 -0
- /package/{link-set/index.d.ts → types/daffodil-design-link-set.d.ts} +0 -0
- /package/{loading-icon/index.d.ts → types/daffodil-design-loading-icon.d.ts} +0 -0
- /package/{media-gallery/index.d.ts → types/daffodil-design-media-gallery.d.ts} +0 -0
- /package/{navbar/index.d.ts → types/daffodil-design-navbar.d.ts} +0 -0
- /package/{notification/index.d.ts → types/daffodil-design-notification.d.ts} +0 -0
- /package/{paginator/index.d.ts → types/daffodil-design-paginator.d.ts} +0 -0
- /package/{progress-bar/index.d.ts → types/daffodil-design-progress-bar.d.ts} +0 -0
- /package/{quantity-field/index.d.ts → types/daffodil-design-quantity-field.d.ts} +0 -0
- /package/{radio/index.d.ts → types/daffodil-design-radio.d.ts} +0 -0
- /package/{select/index.d.ts → types/daffodil-design-select.d.ts} +0 -0
- /package/{spinner/index.d.ts → types/daffodil-design-spinner.d.ts} +0 -0
- /package/{switch/index.d.ts → types/daffodil-design-switch.d.ts} +0 -0
- /package/{text-snippet/index.d.ts → types/daffodil-design-text-snippet.d.ts} +0 -0
- /package/{textarea/index.d.ts → types/daffodil-design-textarea.d.ts} +0 -0
- /package/{toast/index.d.ts → types/daffodil-design-toast.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-design-spinner.mjs","sources":["../../../libs/design/spinner/src/spinner-label/spinner-label.directive.ts","../../../libs/design/spinner/src/spinner.component.ts","../../../libs/design/spinner/src/spinner.component.html","../../../libs/design/spinner/src/spinner.ts","../../../libs/design/spinner/src/daffodil-design-spinner.ts"],"sourcesContent":["import { Directive } from '@angular/core';\n\n/**\n * Labels are used to describe the loading state and provide context for users.\n * They are optional.\n *\n * @usage\n * ```html\n * <daff-spinner-label>Loading</daff-spinner-label>\n * ```\n */\n@Directive({\n /* eslint-disable-next-line @angular-eslint/directive-selector */\n selector: 'daff-spinner-label',\n})\nexport class DaffSpinnerLabelDirective {}\n","import {\n Component,\n ChangeDetectionStrategy,\n input,\n ContentChild,\n} from '@angular/core';\n\nimport {\n DaffColorableDirective,\n DaffSizableDirective,\n DaffSizeAllType,\n} from '@daffodil/design';\n\nimport { DaffSpinnerLabelDirective } from './spinner-label/spinner-label.directive';\n\n/**\n * DaffSpinnerComponent is an animated indicator that lets users know content or action is being loaded.\n */\n@Component({\n selector: 'daff-spinner',\n templateUrl: './spinner.component.html',\n styleUrl: './spinner.component.scss',\n host: {\n class: 'daff-spinner',\n role: 'status',\n '[attr.aria-label]': '_ariaLabel',\n },\n hostDirectives: [\n {\n directive: DaffColorableDirective,\n inputs: ['color'],\n },\n {\n directive: DaffSizableDirective,\n inputs: ['size'],\n },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DaffSpinnerComponent {\n /**\n * @docs-private\n */\n @ContentChild(DaffSpinnerLabelDirective) _label: DaffSpinnerLabelDirective;\n\n private static readonly SIZE_MAP: Record<DaffSizeAllType, number> = {\n xs: 12,\n sm: 16,\n md: 32,\n lg: 40,\n xl: 48,\n };\n\n /**\n * The `aria-label` for the spinner. Defaults to \"loading\".\n */\n ariaLabel = input('loading', { alias: 'aria-label' });\n\n /**\n * @docs-private\n */\n get _ariaLabel() {\n if (!this._label) {\n return this.ariaLabel();\n }\n }\n\n /**\n * @docs-private\n *\n * The dimension (width/height) based on the size.\n */\n get dimension() {\n return DaffSpinnerComponent.SIZE_MAP[this.sizable.size];\n }\n\n constructor(\n private sizable: DaffSizableDirective<DaffSizeAllType>,\n ) {\n this.sizable.defaultSize = 'md';\n }\n}\n","<svg\n [attr.height]=\"dimension\"\n [attr.width]=\"dimension\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n aria-hidden=\"true\"\n class=\"daff-spinner__svg\">\n <circle class=\"daff-spinner__track\" cx=\"8\" cy=\"8\" r=\"7\" vector-effect=\"non-scaling-stroke\"></circle>\n <path class=\"daff-spinner__path\" d=\"M15 8a7.002 7.002 0 00-7-7\" vector-effect=\"non-scaling-stroke\"></path>\n</svg>\n@if (_label) {\n <div class=\"daff-spinner__label\">\n <ng-content select=\"daff-spinner-label\"></ng-content>\n </div>\n}","import { DaffSpinnerLabelDirective } from './spinner-label/spinner-label.directive';\nimport { DaffSpinnerComponent } from './spinner.component';\n\n/**\n * @docs-private\n */\nexport const DAFF_SPINNER_COMPONENTS = <const> [\n DaffSpinnerComponent,\n DaffSpinnerLabelDirective,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAEA;;;;;;;;AAQG;MAKU,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"daffodil-design-spinner.mjs","sources":["../../../libs/design/spinner/src/spinner-label/spinner-label.directive.ts","../../../libs/design/spinner/src/spinner.component.ts","../../../libs/design/spinner/src/spinner.component.html","../../../libs/design/spinner/src/spinner.ts","../../../libs/design/spinner/src/daffodil-design-spinner.ts"],"sourcesContent":["import { Directive } from '@angular/core';\n\n/**\n * Labels are used to describe the loading state and provide context for users.\n * They are optional.\n *\n * @usage\n * ```html\n * <daff-spinner-label>Loading</daff-spinner-label>\n * ```\n */\n@Directive({\n /* eslint-disable-next-line @angular-eslint/directive-selector */\n selector: 'daff-spinner-label',\n})\nexport class DaffSpinnerLabelDirective {}\n","import {\n Component,\n ChangeDetectionStrategy,\n input,\n ContentChild,\n} from '@angular/core';\n\nimport {\n DaffColorableDirective,\n DaffSizableDirective,\n DaffSizeAllType,\n} from '@daffodil/design';\n\nimport { DaffSpinnerLabelDirective } from './spinner-label/spinner-label.directive';\n\n/**\n * DaffSpinnerComponent is an animated indicator that lets users know content or action is being loaded.\n */\n@Component({\n selector: 'daff-spinner',\n templateUrl: './spinner.component.html',\n styleUrl: './spinner.component.scss',\n host: {\n class: 'daff-spinner',\n role: 'status',\n '[attr.aria-label]': '_ariaLabel',\n },\n hostDirectives: [\n {\n directive: DaffColorableDirective,\n inputs: ['color'],\n },\n {\n directive: DaffSizableDirective,\n inputs: ['size'],\n },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DaffSpinnerComponent {\n /**\n * @docs-private\n */\n @ContentChild(DaffSpinnerLabelDirective) _label: DaffSpinnerLabelDirective;\n\n private static readonly SIZE_MAP: Record<DaffSizeAllType, number> = {\n xs: 12,\n sm: 16,\n md: 32,\n lg: 40,\n xl: 48,\n };\n\n /**\n * The `aria-label` for the spinner. Defaults to \"loading\".\n */\n ariaLabel = input('loading', { alias: 'aria-label' });\n\n /**\n * @docs-private\n */\n get _ariaLabel() {\n if (!this._label) {\n return this.ariaLabel();\n }\n }\n\n /**\n * @docs-private\n *\n * The dimension (width/height) based on the size.\n */\n get dimension() {\n return DaffSpinnerComponent.SIZE_MAP[this.sizable.size];\n }\n\n constructor(\n private sizable: DaffSizableDirective<DaffSizeAllType>,\n ) {\n this.sizable.defaultSize = 'md';\n }\n}\n","<svg\n [attr.height]=\"dimension\"\n [attr.width]=\"dimension\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n aria-hidden=\"true\"\n class=\"daff-spinner__svg\">\n <circle class=\"daff-spinner__track\" cx=\"8\" cy=\"8\" r=\"7\" vector-effect=\"non-scaling-stroke\"></circle>\n <path class=\"daff-spinner__path\" d=\"M15 8a7.002 7.002 0 00-7-7\" vector-effect=\"non-scaling-stroke\"></path>\n</svg>\n@if (_label) {\n <div class=\"daff-spinner__label\">\n <ng-content select=\"daff-spinner-label\"></ng-content>\n </div>\n}","import { DaffSpinnerLabelDirective } from './spinner-label/spinner-label.directive';\nimport { DaffSpinnerComponent } from './spinner.component';\n\n/**\n * @docs-private\n */\nexport const DAFF_SPINNER_COMPONENTS = <const> [\n DaffSpinnerComponent,\n DaffSpinnerLabelDirective,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAEA;;;;;;;;AAQG;MAKU,yBAAyB,CAAA;iIAAzB,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;qHAAzB,yBAAyB,EAAA,YAAA,EAAA,IAAA,EA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B,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,ohBAAA,EAAA,MAAA,EAAA,CAAA,gqBAAA,CAAA,EAAA;;sBAM9C,YAAY;uBAAC,yBAAyB;;;AExCzC;;AAEG;AACI,MAAM,uBAAuB,GAAW;IAC7C,oBAAoB;IACpB,yBAAyB;;;ACR3B;;AAEG;;;;"}
|
|
@@ -70,10 +70,10 @@ class DaffSwitchComponent extends DaffSizableDirective {
|
|
|
70
70
|
this.toggled.emit(this.checked);
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
74
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
73
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffSwitchComponent, deps: [{ token: i1.DaffDisableableDirective }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
74
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: DaffSwitchComponent, isStandalone: true, selector: "daff-switch", inputs: { labelPosition: "labelPosition", disabled: "disabled", checked: "checked", id: "id" }, outputs: { toggled: "toggled" }, host: { properties: { "class.checked": "checked", "class.left": "labelPosition === \"left\"", "class.right": "labelPosition === \"right\"", "class.top": "labelPosition === \"top\"", "class.bottom": "labelPosition === \"bottom\"" }, classAttribute: "daff-switch" }, usesInheritance: true, hostDirectives: [{ directive: i1.DaffSizableDirective, inputs: ["size", "size"] }, { directive: i1.DaffDisableableDirective, inputs: ["disabled", "disabled"] }], ngImport: i0, template: "<label class=\"daff-switch__label\" [id]=\"labelId\" [for]=\"id\">\n <ng-content></ng-content>\n</label>\n\n<button class=\"daff-switch__toggle\"\n type=\"button\"\n role=\"switch\"\n (click)=\"onToggle()\"\n [attr.disabled]=\"disabled ? '' : null\"\n [attr.aria-checked]=\"checked ? true : false\"\n [attr.aria-labelledby]=\"labelId\"\n [attr.id]=\"id\">\n</button>", styles: [":host{display:flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host.left{flex-direction:row}:host.right{flex-direction:row-reverse}:host.top{flex-direction:column}:host.bottom{flex-direction:column-reverse}:host.left,:host.right{justify-content:space-between;width:fit-content}:host.top,:host.bottom{align-items:flex-start}:host.daff-disabled{opacity:.5;cursor:not-allowed}:host.daff-disabled .daff-switch__label{cursor:not-allowed}:host.daff-disabled .daff-switch__toggle{cursor:not-allowed}:host.checked .daff-switch__toggle:before{transform:translate(1.5rem)}:host.daff-sm .daff-switch__toggle{height:1.5rem;width:2.75rem}:host.daff-sm .daff-switch__toggle:before{height:1.125rem;width:1.125rem;inset-inline-start:.15rem}:host.daff-sm.checked .daff-switch__toggle:before{transform:translate(1.25rem)}.daff-switch__label{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-size:1rem;line-height:1rem}.daff-switch__toggle{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;appearance:none;display:flex;align-items:center;border:none;border-radius:1rem;height:2rem;width:3.5rem;margin:0;outline:none;padding:0;position:relative}.daff-switch__toggle:before{content:\"\";position:absolute;border-radius:1.5rem;height:1.625rem;width:1.625rem;inset-inline-start:.175rem;transition:transform .3s}.daff-switch__toggle:after{content:\"\";display:flex;border-radius:1rem;width:100%;outline-offset:1px;height:100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
75
75
|
}
|
|
76
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
76
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffSwitchComponent, decorators: [{
|
|
77
77
|
type: Component,
|
|
78
78
|
args: [{ selector: 'daff-switch', changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [
|
|
79
79
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-design-switch.mjs","sources":["../../../libs/design/switch/src/switch/label-position.ts","../../../libs/design/switch/src/switch/switch.component.ts","../../../libs/design/switch/src/switch/switch.component.html","../../../libs/design/switch/src/switch.ts","../../../libs/design/switch/src/daffodil-design-switch.ts"],"sourcesContent":["export type DaffSwitchLabelPosition = 'left' | 'right' | 'top' | 'bottom';\n\n/**\n * The position of the label relative to the switch.\n */\nexport enum DaffSwitchLabelPositionEnum {\n LEFT = 'left',\n RIGHT = 'right',\n TOP = 'top',\n BOTTOM = 'bottom',\n}\n","/* eslint-disable quote-props */\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n Output,\n} from '@angular/core';\n\nimport {\n DaffDisableable,\n DaffDisableableDirective,\n DaffSizableDirective,\n DaffSizeSmallType,\n} from '@daffodil/design';\n\nimport {\n DaffSwitchLabelPosition,\n DaffSwitchLabelPositionEnum,\n} from './label-position';\n\nlet switchIncrementalId = 0;\n\nexport type DaffSwitchSize = DaffSizeSmallType;\n\n/**\n * The switch component provides a way to toggle between two settings.\n *\n * ```html\n * <daff-switch>Label</daff-switch>\n * ```\n */\n@Component({\n selector: 'daff-switch',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './switch.component.html',\n styleUrls: ['./switch.component.scss'],\n hostDirectives: [\n {\n directive: DaffSizableDirective,\n inputs: ['size'],\n },\n {\n directive: DaffDisableableDirective,\n inputs: ['disabled'],\n },\n ],\n host: {\n 'class': 'daff-switch',\n '[class.checked]': 'checked',\n '[class.left]': 'labelPosition === \"left\"',\n '[class.right]': 'labelPosition === \"right\"',\n '[class.top]': 'labelPosition === \"top\"',\n '[class.bottom]': 'labelPosition === \"bottom\"',\n },\n})\nexport class DaffSwitchComponent extends DaffSizableDirective<DaffSwitchSize> implements DaffDisableable {\n /**\n * The position of the label relative to the switch.\n */\n @Input() labelPosition: DaffSwitchLabelPosition = DaffSwitchLabelPositionEnum.LEFT;\n\n constructor(private disabledDirective: DaffDisableableDirective) {\n super();\n }\n\n /**\n * Whether the switch is disabled.\n */\n @Input() get disabled() {\n return this.disabledDirective.disabled;\n }\n set disabled(value: any) {\n this.disabledDirective.disabled = coerceBooleanProperty(value);\n }\n\n /**\n * Current state of switch (on/off).\n */\n @Input() checked = false;\n\n /**\n * @docs-private\n */\n labelId: string = 'daff-switch-' + switchIncrementalId++ + '-label';\n\n /**\n * The unique id of the switch. Defaults to an autogenerated value. When using this,\n * it's your responsibility to ensure that the id for each switch is unique.\n *\n * It gets assigned to the `for` attribute on the `<label>` inside of the switch.\n */\n @Input() id = 'daff-switch-' + switchIncrementalId++;\n\n /**\n * Output event triggered when the switch has been toggled.\n */\n @Output() toggled = new EventEmitter<boolean>();\n\n /**\n * @docs-private\n */\n onToggle() {\n if (!this.disabled) {\n this.checked = !this.checked;\n this.toggled.emit(this.checked);\n }\n }\n}\n","<label class=\"daff-switch__label\" [id]=\"labelId\" [for]=\"id\">\n <ng-content></ng-content>\n</label>\n\n<button class=\"daff-switch__toggle\"\n type=\"button\"\n role=\"switch\"\n (click)=\"onToggle()\"\n [attr.disabled]=\"disabled ? '' : null\"\n [attr.aria-checked]=\"checked ? true : false\"\n [attr.aria-labelledby]=\"labelId\"\n [attr.id]=\"id\">\n</button>","import { DaffSwitchComponent } from './switch/switch.component';\n\n/**\n * @docs-private\n */\nexport const DAFF_SWITCH_COMPONENTS = <const> [\n DaffSwitchComponent,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAEA;;AAEG;AACH,IAAY,2BAKX;AALD,CAAA,UAAY,2BAA2B,EAAA;AACrC,IAAA,2BAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,2BAAA,CAAA,OAAA,CAAA,GAAA,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design/switch/src/switch/label-position.ts","../../../libs/design/switch/src/switch/switch.component.ts","../../../libs/design/switch/src/switch/switch.component.html","../../../libs/design/switch/src/switch.ts","../../../libs/design/switch/src/daffodil-design-switch.ts"],"sourcesContent":["export type DaffSwitchLabelPosition = 'left' | 'right' | 'top' | 'bottom';\n\n/**\n * The position of the label relative to the switch.\n */\nexport enum DaffSwitchLabelPositionEnum {\n LEFT = 'left',\n RIGHT = 'right',\n TOP = 'top',\n BOTTOM = 'bottom',\n}\n","/* eslint-disable quote-props */\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n Output,\n} from '@angular/core';\n\nimport {\n DaffDisableable,\n DaffDisableableDirective,\n DaffSizableDirective,\n DaffSizeSmallType,\n} from '@daffodil/design';\n\nimport {\n DaffSwitchLabelPosition,\n DaffSwitchLabelPositionEnum,\n} from './label-position';\n\nlet switchIncrementalId = 0;\n\nexport type DaffSwitchSize = DaffSizeSmallType;\n\n/**\n * The switch component provides a way to toggle between two settings.\n *\n * ```html\n * <daff-switch>Label</daff-switch>\n * ```\n */\n@Component({\n selector: 'daff-switch',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './switch.component.html',\n styleUrls: ['./switch.component.scss'],\n hostDirectives: [\n {\n directive: DaffSizableDirective,\n inputs: ['size'],\n },\n {\n directive: DaffDisableableDirective,\n inputs: ['disabled'],\n },\n ],\n host: {\n 'class': 'daff-switch',\n '[class.checked]': 'checked',\n '[class.left]': 'labelPosition === \"left\"',\n '[class.right]': 'labelPosition === \"right\"',\n '[class.top]': 'labelPosition === \"top\"',\n '[class.bottom]': 'labelPosition === \"bottom\"',\n },\n})\nexport class DaffSwitchComponent extends DaffSizableDirective<DaffSwitchSize> implements DaffDisableable {\n /**\n * The position of the label relative to the switch.\n */\n @Input() labelPosition: DaffSwitchLabelPosition = DaffSwitchLabelPositionEnum.LEFT;\n\n constructor(private disabledDirective: DaffDisableableDirective) {\n super();\n }\n\n /**\n * Whether the switch is disabled.\n */\n @Input() get disabled() {\n return this.disabledDirective.disabled;\n }\n set disabled(value: any) {\n this.disabledDirective.disabled = coerceBooleanProperty(value);\n }\n\n /**\n * Current state of switch (on/off).\n */\n @Input() checked = false;\n\n /**\n * @docs-private\n */\n labelId: string = 'daff-switch-' + switchIncrementalId++ + '-label';\n\n /**\n * The unique id of the switch. Defaults to an autogenerated value. When using this,\n * it's your responsibility to ensure that the id for each switch is unique.\n *\n * It gets assigned to the `for` attribute on the `<label>` inside of the switch.\n */\n @Input() id = 'daff-switch-' + switchIncrementalId++;\n\n /**\n * Output event triggered when the switch has been toggled.\n */\n @Output() toggled = new EventEmitter<boolean>();\n\n /**\n * @docs-private\n */\n onToggle() {\n if (!this.disabled) {\n this.checked = !this.checked;\n this.toggled.emit(this.checked);\n }\n }\n}\n","<label class=\"daff-switch__label\" [id]=\"labelId\" [for]=\"id\">\n <ng-content></ng-content>\n</label>\n\n<button class=\"daff-switch__toggle\"\n type=\"button\"\n role=\"switch\"\n (click)=\"onToggle()\"\n [attr.disabled]=\"disabled ? '' : null\"\n [attr.aria-checked]=\"checked ? true : false\"\n [attr.aria-labelledby]=\"labelId\"\n [attr.id]=\"id\">\n</button>","import { DaffSwitchComponent } from './switch/switch.component';\n\n/**\n * @docs-private\n */\nexport const DAFF_SWITCH_COMPONENTS = <const> [\n DaffSwitchComponent,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAEA;;AAEG;AACH,IAAY,2BAKX;AALD,CAAA,UAAY,2BAA2B,EAAA;AACrC,IAAA,2BAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,2BAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,2BAAA,CAAA,KAAA,CAAA,GAAA,KAAW;AACX,IAAA,2BAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACnB,CAAC,EALW,2BAA2B,KAA3B,2B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A,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,mBAAmB,0oBCzDhC,wXAYS,EAAA,MAAA,EAAA,CAAA,6jDAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FD6CI,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAxB/B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,aAAa,EAAA,eAAA,EACN,uBAAuB,CAAC,MAAM,EAAA,cAAA,EAG/B;AACd,wBAAA;AACE,4BAAA,SAAS,EAAE,oBAAoB;4BAC/B,MAAM,EAAE,CAAC,MAAM,CAAC;AACjB,yBAAA;AACD,wBAAA;AACE,4BAAA,SAAS,EAAE,wBAAwB;4BACnC,MAAM,EAAE,CAAC,UAAU,CAAC;AACrB,yBAAA;qBACF,EAAA,IAAA,EACK;AACJ,wBAAA,OAAO,EAAE,aAAa;AACtB,wBAAA,iBAAiB,EAAE,SAAS;AAC5B,wBAAA,cAAc,EAAE,0BAA0B;AAC1C,wBAAA,eAAe,EAAE,2BAA2B;AAC5C,wBAAA,aAAa,EAAE,yBAAyB;AACxC,wBAAA,gBAAgB,EAAE,4BAA4B;AAC/C,qBAAA,EAAA,QAAA,EAAA,wXAAA,EAAA,MAAA,EAAA,CAAA,6jDAAA,CAAA,EAAA;;sBAMA;;sBASA;;sBAUA;;sBAaA;;sBAKA;;;AEhGH;;AAEG;AACI,MAAM,sBAAsB,GAAW;IAC5C,mBAAmB;;;ACNrB;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { TemplateRef, Input, ViewChild, ChangeDetectionStrategy, Component, ContentChild, ViewEncapsulation, EventEmitter, ViewChildren, ContentChildren, Output
|
|
2
|
+
import { TemplateRef, Input, ViewChild, ChangeDetectionStrategy, Component, ContentChild, ViewEncapsulation, EventEmitter, ViewChildren, ContentChildren, Output } from '@angular/core';
|
|
3
3
|
import * as i1 from '@daffodil/design';
|
|
4
4
|
import { DaffDisableableDirective, DaffPrefixDirective, DaffSuffixDirective, DaffSelectableDirective } from '@daffodil/design';
|
|
5
5
|
import * as i1$1 from '@angular/common';
|
|
@@ -47,8 +47,8 @@ class DaffTabComponent {
|
|
|
47
47
|
this.panelId = 'daff-tab-panel-' + tabId;
|
|
48
48
|
tabId++;
|
|
49
49
|
}
|
|
50
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
51
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
50
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTabComponent, deps: [{ token: i1.DaffDisableableDirective }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
51
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: DaffTabComponent, isStandalone: true, selector: "daff-tab", inputs: { id: "id" }, viewQueries: [{ propertyName: "contentRef", first: true, predicate: ["content"], descendants: true, read: TemplateRef, static: true }, { propertyName: "labelRef", first: true, predicate: ["label"], descendants: true, read: TemplateRef, static: true }], hostDirectives: [{ directive: i1.DaffDisableableDirective, inputs: ["disabled", "disabled"] }], ngImport: i0, template: `
|
|
52
52
|
<ng-template #label>
|
|
53
53
|
<ng-content select="daff-tab-label"></ng-content>
|
|
54
54
|
</ng-template>
|
|
@@ -57,7 +57,7 @@ class DaffTabComponent {
|
|
|
57
57
|
</ng-template>
|
|
58
58
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
59
59
|
}
|
|
60
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
60
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTabComponent, decorators: [{
|
|
61
61
|
type: Component,
|
|
62
62
|
args: [{
|
|
63
63
|
selector: 'daff-tab',
|
|
@@ -100,10 +100,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
100
100
|
* ```
|
|
101
101
|
*/
|
|
102
102
|
class DaffTabLabelComponent {
|
|
103
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
104
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
103
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTabLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
104
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: DaffTabLabelComponent, isStandalone: true, selector: "daff-tab-label", queries: [{ propertyName: "_prefix", first: true, predicate: DaffPrefixDirective, descendants: true }, { propertyName: "_suffix", first: true, predicate: DaffSuffixDirective, descendants: true }], ngImport: i0, template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<div class=\"daff-tab-label__content\">\n <ng-content></ng-content>\n</div>\n@if (_suffix) {\n <ng-content select=\"[daffSuffix]\"></ng-content>\n}", styles: [":host{display:flex;justify-content:center;align-items:center;gap:.5rem}.daff-tab-label__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:15rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
105
105
|
}
|
|
106
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
106
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTabLabelComponent, decorators: [{
|
|
107
107
|
type: Component,
|
|
108
108
|
args: [{ selector: 'daff-tab-label', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
109
109
|
DaffPrefixDirective,
|
|
@@ -153,10 +153,10 @@ class DaffTabPanelComponent {
|
|
|
153
153
|
this._ariaLabelledBy = this.tab.id;
|
|
154
154
|
this._id = this.tab.panelId;
|
|
155
155
|
}
|
|
156
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
157
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
156
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTabPanelComponent, deps: [{ token: DaffTabComponent }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
157
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: DaffTabPanelComponent, isStandalone: true, selector: "daff-tab-panel", host: { attributes: { "role": "tabpanel", "tabindex": "0" }, properties: { "attr.id": "tabPanelId", "attr.aria-labelledby": "ariaLabelledBy" }, classAttribute: "daff-tab-panel" }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, styles: [":host(.daff-tab-panel){display:block;padding:1rem 0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
158
158
|
}
|
|
159
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
159
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTabPanelComponent, decorators: [{
|
|
160
160
|
type: Component,
|
|
161
161
|
args: [{ selector: 'daff-tab-panel', template: `<ng-content></ng-content>`, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
162
162
|
'class': 'daff-tab-panel',
|
|
@@ -200,10 +200,10 @@ class DaffTabActivatorComponent {
|
|
|
200
200
|
focus() {
|
|
201
201
|
this.el.nativeElement.focus();
|
|
202
202
|
}
|
|
203
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
204
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
203
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTabActivatorComponent, deps: [{ token: i0.ElementRef }, { token: i1.DaffSelectableDirective }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
204
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: DaffTabActivatorComponent, isStandalone: true, selector: "button[daff-tab-activator],a[daff-tab-activator]", inputs: { tabActivatorId: "tabActivatorId", panelId: "panelId" }, host: { attributes: { "role": "tab" }, properties: { "attr.aria-selected": "ariaSelected", "attr.tabindex": "tabIndex", "attr.id": "tabActivatorId", "attr.aria-controls": "panelId" }, classAttribute: "daff-tab-activator" }, hostDirectives: [{ directive: i1.DaffSelectableDirective, inputs: ["selected", "selected"] }], ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, styles: [".daff-tab-activator{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-block;appearance:none;background:none;border:none;font-size:1rem;line-height:1.5rem;font-weight:500;height:3rem;margin:0;min-width:8rem;padding:.5rem 1.5rem;text-decoration:none;z-index:2}.daff-tab-activator[disabled]{cursor:not-allowed;opacity:.6}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
205
205
|
}
|
|
206
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
206
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTabActivatorComponent, decorators: [{
|
|
207
207
|
type: Component,
|
|
208
208
|
args: [{ selector: '' +
|
|
209
209
|
'button[daff-tab-activator]' + ',' +
|
|
@@ -268,12 +268,6 @@ class DaffTabsComponent {
|
|
|
268
268
|
* The tab that is selected on initial load. If it's not used, the first tab in the tablist will be selected by default.
|
|
269
269
|
*/
|
|
270
270
|
this.initiallySelected = null;
|
|
271
|
-
/**
|
|
272
|
-
* @docs-private
|
|
273
|
-
*
|
|
274
|
-
* aria-label for the tab.
|
|
275
|
-
*/
|
|
276
|
-
this.externalAriaLabel = null;
|
|
277
271
|
/**
|
|
278
272
|
* `aria-label` to label the tablist.
|
|
279
273
|
*/
|
|
@@ -392,13 +386,14 @@ class DaffTabsComponent {
|
|
|
392
386
|
const array = this._tabs.toArray();
|
|
393
387
|
this.select(array[array.length - 1].id);
|
|
394
388
|
}
|
|
395
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
396
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
389
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTabsComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$1.Location }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
390
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: DaffTabsComponent, isStandalone: true, selector: "daff-tabs", inputs: { initiallySelected: "initiallySelected", ariaLabel: ["aria-label", "ariaLabel"], linkMode: "linkMode", url: "url", queryParam: "queryParam" }, outputs: { tabChange: "tabChange" }, host: { properties: { "attr.aria-label": "null" }, classAttribute: "daff-tabs" }, queries: [{ propertyName: "_labels", predicate: DaffTabLabelComponent, descendants: true }, { propertyName: "_tabs", predicate: DaffTabComponent }], viewQueries: [{ propertyName: "_tabActivators", predicate: DaffTabActivatorComponent, descendants: true }], ngImport: i0, template: "<div class=\"daff-tabs__tab-list\"\n\trole=\"tablist\"\n\t[attr.aria-label]=\"ariaLabel\"\n\t(keydown.home)=\"selectFirst($event)\"\n\t(keydown.end)=\"selectLast($event)\">\n\t@for (tab of _tabs; track tab) {\n\t\t@if (linkMode && tab.disabled) {\n\t\t\t<button daff-tab-activator routerLinkActive\n\t\t\t\t[selected]=\"tab.id === selectedTab\"\n\t\t\t\t[panelId]=\"tab.panelId\"\n\t\t\t\t[disabled]=\"tab.disabled\"\n\t\t\t\t[tabActivatorId]=\"tab.id\"\n\t\t\t\t(keydown.arrowright)=\"next()\"\n\t\t\t\t(keydown.arrowleft)=\"previous()\">\n\t\t\t\t\t<ng-container *ngTemplateOutlet=\"tab.labelRef\"></ng-container>\n\t\t\t</button>\n\t\t} @else if (linkMode) {\n\t\t\t<a daff-tab-activator routerLinkActive\n\t\t\t\tclass=\"daff-ae daff_tabs__link\"\n\t\t\t\t[selected]=\"tab.id === selectedTab\"\n\t\t\t\t[routerLink]=\"url || currentPath\"\n\t\t\t\tqueryParamsHandling=\"merge\"\n\t\t\t\t[queryParams]=\"_buildQueryParams(tab.id)\"\n\t\t\t\t[panelId]=\"tab.panelId\"\n\t\t\t\t[tabActivatorId]=\"tab.id\"\n\t\t\t\t(keydown.arrowright)=\"next()\"\n\t\t\t\t(keydown.arrowleft)=\"previous()\"\n\t\t\t\t(isActiveChange)=\"$event && select(tab.id)\">\n\t\t\t\t\t<ng-container *ngTemplateOutlet=\"tab.labelRef\"></ng-container>\n\t\t\t</a>\n\t\t} @else {\n\t\t\t<button daff-tab-activator\n\t\t\t\t[selected]=\"tab.id === selectedTab\"\n\t\t\t\t(click)=\"select(tab.id)\"\n\t\t\t\t[panelId]=\"tab.panelId\"\n\t\t\t\t[disabled]=\"tab.disabled\"\n\t\t\t\t[tabActivatorId]=\"tab.id\"\n\t\t\t\t(keydown.arrowright)=\"next()\"\n\t\t\t\t(keydown.arrowleft)=\"previous()\">\n\t\t\t\t\t<ng-container *ngTemplateOutlet=\"tab.labelRef\"></ng-container>\n\t\t\t</button>\n\t\t}\n\t}\n</div>\n\n@for (tab of _tabs; track tab) {\n\t@if(tab.id === selectedTab ) {\n\t\t<ng-container *ngTemplateOutlet=\"tab.contentRef\"></ng-container>\n\t}\n}", styles: [":host(.daff-tabs){max-width:100%}.daff-tabs{display:block}.daff-tabs .daff-tabs__tab-list{display:flex;overflow-x:auto;scrollbar-width:thin;position:relative}.daff-tabs .daff-tabs__tab-list:after{content:\"\";position:absolute;height:.125rem;width:100%;bottom:0}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: DaffTabActivatorComponent, selector: "button[daff-tab-activator],a[daff-tab-activator]", inputs: ["tabActivatorId", "panelId"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
397
391
|
}
|
|
398
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
392
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTabsComponent, decorators: [{
|
|
399
393
|
type: Component,
|
|
400
394
|
args: [{ selector: 'daff-tabs', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
401
395
|
'class': 'daff-tabs',
|
|
396
|
+
'[attr.aria-label]': 'null',
|
|
402
397
|
}, imports: [
|
|
403
398
|
NgTemplateOutlet,
|
|
404
399
|
RouterLink,
|
|
@@ -407,9 +402,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
407
402
|
], template: "<div class=\"daff-tabs__tab-list\"\n\trole=\"tablist\"\n\t[attr.aria-label]=\"ariaLabel\"\n\t(keydown.home)=\"selectFirst($event)\"\n\t(keydown.end)=\"selectLast($event)\">\n\t@for (tab of _tabs; track tab) {\n\t\t@if (linkMode && tab.disabled) {\n\t\t\t<button daff-tab-activator routerLinkActive\n\t\t\t\t[selected]=\"tab.id === selectedTab\"\n\t\t\t\t[panelId]=\"tab.panelId\"\n\t\t\t\t[disabled]=\"tab.disabled\"\n\t\t\t\t[tabActivatorId]=\"tab.id\"\n\t\t\t\t(keydown.arrowright)=\"next()\"\n\t\t\t\t(keydown.arrowleft)=\"previous()\">\n\t\t\t\t\t<ng-container *ngTemplateOutlet=\"tab.labelRef\"></ng-container>\n\t\t\t</button>\n\t\t} @else if (linkMode) {\n\t\t\t<a daff-tab-activator routerLinkActive\n\t\t\t\tclass=\"daff-ae daff_tabs__link\"\n\t\t\t\t[selected]=\"tab.id === selectedTab\"\n\t\t\t\t[routerLink]=\"url || currentPath\"\n\t\t\t\tqueryParamsHandling=\"merge\"\n\t\t\t\t[queryParams]=\"_buildQueryParams(tab.id)\"\n\t\t\t\t[panelId]=\"tab.panelId\"\n\t\t\t\t[tabActivatorId]=\"tab.id\"\n\t\t\t\t(keydown.arrowright)=\"next()\"\n\t\t\t\t(keydown.arrowleft)=\"previous()\"\n\t\t\t\t(isActiveChange)=\"$event && select(tab.id)\">\n\t\t\t\t\t<ng-container *ngTemplateOutlet=\"tab.labelRef\"></ng-container>\n\t\t\t</a>\n\t\t} @else {\n\t\t\t<button daff-tab-activator\n\t\t\t\t[selected]=\"tab.id === selectedTab\"\n\t\t\t\t(click)=\"select(tab.id)\"\n\t\t\t\t[panelId]=\"tab.panelId\"\n\t\t\t\t[disabled]=\"tab.disabled\"\n\t\t\t\t[tabActivatorId]=\"tab.id\"\n\t\t\t\t(keydown.arrowright)=\"next()\"\n\t\t\t\t(keydown.arrowleft)=\"previous()\">\n\t\t\t\t\t<ng-container *ngTemplateOutlet=\"tab.labelRef\"></ng-container>\n\t\t\t</button>\n\t\t}\n\t}\n</div>\n\n@for (tab of _tabs; track tab) {\n\t@if(tab.id === selectedTab ) {\n\t\t<ng-container *ngTemplateOutlet=\"tab.contentRef\"></ng-container>\n\t}\n}", styles: [":host(.daff-tabs){max-width:100%}.daff-tabs{display:block}.daff-tabs .daff-tabs__tab-list{display:flex;overflow-x:auto;scrollbar-width:thin;position:relative}.daff-tabs .daff-tabs__tab-list:after{content:\"\";position:absolute;height:.125rem;width:100%;bottom:0}\n"] }]
|
|
408
403
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$1.Location }], propDecorators: { initiallySelected: [{
|
|
409
404
|
type: Input
|
|
410
|
-
}], externalAriaLabel: [{
|
|
411
|
-
type: HostBinding,
|
|
412
|
-
args: ['attr.aria-label']
|
|
413
405
|
}], ariaLabel: [{
|
|
414
406
|
type: Input,
|
|
415
407
|
args: ['aria-label']
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-design-tabs.mjs","sources":["../../../libs/design/tabs/src/tabs/tab/tab.component.ts","../../../libs/design/tabs/src/tabs/tab-label/tab-label.component.ts","../../../libs/design/tabs/src/tabs/tab-label/tab-label.component.html","../../../libs/design/tabs/src/tabs/tab-panel/tab-panel.component.ts","../../../libs/design/tabs/src/tabs/tab-activator/tab-activator.component.ts","../../../libs/design/tabs/src/tabs/tabs.component.ts","../../../libs/design/tabs/src/tabs/tabs.component.html","../../../libs/design/tabs/src/tabs.ts","../../../libs/design/tabs/src/daffodil-design-tabs.ts"],"sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n TemplateRef,\n ViewChild,\n Input,\n} from '@angular/core';\n\nimport {\n DaffDisableable,\n DaffDisableableDirective,\n} from '@daffodil/design';\n\nlet tabId = 1;\n\n/**\n * Tab is a single tab in the tablist that is used to group the label of a tab panel and the tab panel together.\n *\n * A `<daff-tab>` should include the DaffTabLabelComponent and DaffTabPanelComponent components in order to properly structure the UI.\n *\n * @example\n * ```html\n * <daff-tab>\n * \t<daff-tab-label>\n * \t\t<fa-icon [icon]=\"faInfoCircle\" daffPrefix></fa-icon>\n * \t\tTab 1\n * \t</daff-tab-label>\n * \t<daff-tab-panel>\n * \t\tTab 1 Panel\n * \t</daff-tab-panel>\n * </daff-tab>\n * ```\n */\n@Component({\n selector: 'daff-tab',\n template: `\n <ng-template #label>\n <ng-content select=\"daff-tab-label\"></ng-content>\n </ng-template>\n <ng-template #content>\n <ng-content select=\"daff-tab-panel\"></ng-content>\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [\n {\n directive: DaffDisableableDirective,\n inputs: ['disabled'],\n },\n ],\n})\nexport class DaffTabComponent implements DaffDisableable {\n\n /**\n * @docs-private\n *\n * Whether the tab is disabled.\n */\n get disabled() {\n return this.disabledDirective.disabled;\n }\n\n /**\n * @docs-private\n */\n @ViewChild('content', { read: TemplateRef, static: true }) contentRef: TemplateRef<any>;\n\n /**\n * @docs-private\n */\n @ViewChild('label', { read: TemplateRef, static: true }) labelRef: TemplateRef<any>;\n\n /**\n * A unique id for the tab component. Defaults to an autogenerated value. When using this,\n * it's your responsibility to ensure that the id for each tab is unique.\n */\n @Input() id = 'daff-tab-' + tabId;\n\n /**\n * @docs-private\n */\n panelId = 'daff-tab-panel-' + tabId;\n\n constructor(private disabledDirective: DaffDisableableDirective) {\n tabId++;\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n} from '@angular/core';\n\nimport {\n DaffPrefixDirective,\n DaffSuffixDirective,\n} from '@daffodil/design';\n\n/**\n * Tab label is the clicakble label that activates its corresponding tab panel. Labels can contain text, icons, or both.\n *\n * @example\n * ```html\n * <daff-tab-label>\n * <div daffPrefix></div>\n * Label\n * <div daffSuffix></div\n * </daff-tab-Label>\n * ```\n */\n@Component({\n selector: 'daff-tab-label',\n templateUrl: './tab-label.component.html',\n styleUrl: './tab-label.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n DaffPrefixDirective,\n DaffSuffixDirective,\n ],\n})\nexport class DaffTabLabelComponent {\n /**\n * @docs-private\n */\n @ContentChild(DaffPrefixDirective) _prefix: DaffPrefixDirective;\n\n /**\n * @docs-private\n */\n @ContentChild(DaffSuffixDirective) _suffix: DaffSuffixDirective;\n}\n","@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<div class=\"daff-tab-label__content\">\n <ng-content></ng-content>\n</div>\n@if (_suffix) {\n <ng-content select=\"[daffSuffix]\"></ng-content>\n}","/* eslint-disable quote-props */\nimport {\n Component,\n ChangeDetectionStrategy,\n} from '@angular/core';\n\nimport { DaffTabComponent } from '../tab/tab.component';\n\n/**\n * Tab panel is the content area displayed when a tab is active.\n *\n * @example\n * ```html\n * <daff-tab-panel>\n * <!-- Tab panel content goes here -->\n * </daff-tab-panel>\n * ```\n */\n@Component({\n selector: 'daff-tab-panel',\n template: `<ng-content></ng-content>`,\n styleUrl: './tab-panel.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'class': 'daff-tab-panel',\n 'role': 'tabpanel',\n 'tabindex': '0',\n '[attr.id]': 'tabPanelId',\n '[attr.aria-labelledby]': 'ariaLabelledBy',\n },\n})\nexport class DaffTabPanelComponent {\n private _id = '';\n\n /**\n * @docs-private\n *\n * Dynamically binds the tab panel's id to a unique value generated from the associated tab's panelId.\n */\n get tabPanelId() {\n return this._id;\n }\n\n private _ariaLabelledBy = '';\n\n /**\n * @docs-private\n */\n get ariaLabelledBy() {\n return this._ariaLabelledBy;\n }\n\n constructor(private tab: DaffTabComponent) {\n /**\n * Sets the value of `ariaLabelledBy` to the id of the tab component.\n */\n this._ariaLabelledBy = this.tab.id;\n\n this._id = this.tab.panelId;\n }\n}\n","/* eslint-disable quote-props */\nimport {\n Input,\n Component,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n ElementRef,\n} from '@angular/core';\n\nimport { DaffSelectableDirective } from '@daffodil/design';\n\n@Component({\n selector: '' +\n 'button[daff-tab-activator]' + ',' +\n 'a[daff-tab-activator]',\n template: `<ng-content></ng-content>`,\n styleUrl: './tab-activator.component.scss',\n hostDirectives: [\n {\n directive: DaffSelectableDirective,\n inputs: ['selected'],\n },\n ],\n host: {\n 'class': 'daff-tab-activator',\n 'role': 'tab',\n '[attr.aria-selected]': 'ariaSelected',\n '[attr.tabindex]': 'tabIndex',\n '[attr.id]': 'tabActivatorId',\n '[attr.aria-controls]': 'panelId',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class DaffTabActivatorComponent {\n /**\n * @docs-private\n *\n * Sets `aria-selected` to true if the component is selected and false if it's not selected.\n */\n get ariaSelected() {\n return this.selectableDirective.selected ? true : false;\n }\n\n /**\n * @docs-private\n *\n * Sets `tabindex` to `0` if the component is selected and `-1` if it's not selected.\n */\n get tabIndex() {\n return this.selectableDirective.selected ? '0' : '-1';\n }\n\n constructor(\n private el: ElementRef,\n private selectableDirective: DaffSelectableDirective,\n ) {\n }\n\n /**\n * The html id of the tab activator component\n */\n @Input() tabActivatorId = '';\n\n @Input() panelId = '';\n\n /**\n * Sets focus to the native element of the component.\n */\n focus() {\n this.el.nativeElement.focus();\n }\n}\n","/* eslint-disable quote-props */\nimport {\n Location,\n NgTemplateOutlet,\n} from '@angular/common';\nimport {\n Component,\n HostBinding,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n ContentChildren,\n QueryList,\n AfterContentInit,\n Input,\n Output,\n EventEmitter,\n ViewChildren,\n ChangeDetectorRef,\n OnInit,\n} from '@angular/core';\nimport {\n Params,\n RouterLink,\n RouterLinkActive,\n} from '@angular/router';\n\nimport { DaffTabComponent } from './tab/tab.component';\nimport { DaffTabActivatorComponent } from './tab-activator/tab-activator.component';\nimport { DaffTabLabelComponent } from './tab-label/tab-label.component';\n\n/**\n * Tabs provide a way to navigate between panels that display related content without leaving the page.\n *\n * @example\n * ```html\n * <daff-tabs aria-label=\"List of tabs\">\n * \t<daff-tab>\n * \t\t<daff-tab-label>\n * \t\t\t<fa-icon [icon]=\"faInfoCircle\" daffPrefix></fa-icon>\n * \t\t\tTab 1\n * \t\t</daff-tab-label>\n * \t\t<daff-tab-panel>\n * \t\t\tTab 1 Panel\n * \t\t</daff-tab-panel>\n * \t</daff-tab>\n * \t<daff-tab>\n * \t\t<daff-tab-label>\n * \t\t\tTab 2\n * \t\t\t<fa-icon [icon]=\"faInfoCircle\" daffSuffix></fa-icon>\n * \t\t</daff-tab-label>\n * \t\t<daff-tab-panel>\n * \t\t\tTab 2 Panel\n * \t\t</daff-tab-panel>\n * \t</daff-tab>\n * </daff-tabs>\n * ```\n */\n@Component({\n selector: 'daff-tabs',\n templateUrl: './tabs.component.html',\n styleUrl: './tabs.component.scss',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'class': 'daff-tabs',\n },\n imports: [\n NgTemplateOutlet,\n RouterLink,\n RouterLinkActive,\n DaffTabActivatorComponent,\n ],\n})\n\nexport class DaffTabsComponent implements AfterContentInit, OnInit {\n /**\n * @docs-private\n *\n * The currently selected tab. This property is dynamically updated when a user selects a tab.\n */\n selectedTab: string;\n\n /**\n * The tab that is selected on initial load. If it's not used, the first tab in the tablist will be selected by default.\n */\n @Input() initiallySelected: string = null;\n\n /**\n * @docs-private\n *\n * aria-label for the tab.\n */\n @HostBinding('attr.aria-label') private externalAriaLabel = null;\n\n /**\n * `aria-label` to label the tablist.\n */\n @Input('aria-label') ariaLabel = '';\n\n /**\n * Replace the tab buttons as links.\n */\n @Input() linkMode = false;\n\n /**\n * The URL to navigate to when the component is in link mode.\n * This component will set the specified query param.\n */\n @Input() url?: string;\n\n /**\n * The query parameter that the tabs component will use to set the tab value in link mode.\n */\n @Input() queryParam = 'tab';\n\n /**\n * Event emitted when tab selection changes.\n */\n @Output() tabChange = new EventEmitter<string>();\n\n /**\n * @docs-private\n */\n @ContentChildren(DaffTabLabelComponent, { descendants: true }) _labels: QueryList<DaffTabLabelComponent>;\n\n /**\n * @docs-private\n */\n @ContentChildren(DaffTabComponent) _tabs: QueryList<DaffTabComponent>;\n\n /**\n * @docs-private\n */\n @ViewChildren(DaffTabActivatorComponent) _tabActivators: QueryList<DaffTabActivatorComponent>;\n\n /**\n * @docs-private\n */\n get currentPath(): string {\n return this.location.path();\n }\n\n constructor(\n private cdRef: ChangeDetectorRef,\n private location: Location,\n ) {}\n\n private reset() {\n if(this.initiallySelected) {\n this.selectedTab = this.initiallySelected;\n }\n\n if (!this.selectedTab) {\n this.selectedTab = this._tabs.first.id;\n }\n }\n\n /**\n * @docs-private\n */\n ngOnInit(): void {\n this.location.onUrlChange(() => {\n // if the app is navigated away from the current page, reset the state\n if (this.linkMode && !this.location.isCurrentPathEqualTo(this.url, `${this.queryParam}=${this.selectedTab}`)) {\n this.selectedTab = null;\n this.reset();\n this.tabChange.emit(this.selectedTab);\n }\n });\n }\n\n /**\n * @docs-private\n */\n ngAfterContentInit() {\n this.reset();\n }\n\n /**\n * @docs-private\n *\n * Selects a tab and sets focus on the selected tab.\n */\n select(tabId: string) {\n const tabActivator = this._tabActivators.find(el => el.tabActivatorId === tabId);\n\n if (!tabActivator) {\n console.warn(`The tab '${tabId}' was not able to be selected because it does not exist. Check the id on your <daff-tab>s.`);\n return;\n }\n\n this.tabChange.emit(tabId);\n this.selectedTab = tabId;\n this.cdRef.markForCheck();\n\n tabActivator.focus();\n }\n\n /**\n * Navigates through the tabs based on the given offset.\n * Moves forward or backward in the tab array, wrapping around when necessary.\n */\n private navigateTabs(offset: number) {\n const array = this._tabs.toArray();\n let selectedIndex = array.findIndex(el => el.id === this.selectedTab);\n const startingIndex = selectedIndex;\n let newIndex;\n\n do {\n newIndex = (selectedIndex + offset + array.length) % array.length;\n selectedIndex = newIndex;\n } while (array[newIndex].disabled && selectedIndex !== startingIndex); // Skip disabled tabs\n\n this.select(array[newIndex].id);\n }\n\n /**\n * @docs-private\n */\n _buildQueryParams(tab: string): Params {\n return {\n [this.queryParam]: tab,\n };\n }\n\n /**\n * @docs-private\n *\n * Selects the previous tab and wraps around to the last tab if the first tab is currently selected.\n */\n previous() {\n this.navigateTabs(-1);\n }\n\n /**\n * @docs-private\n *\n * Selects the next tab and wraps around to the first tab if the last tab is currently selected.\n */\n next() {\n this.navigateTabs(1);\n }\n\n /**\n * @docs-private\n *\n * Selects the first tab.\n */\n selectFirst(event: KeyboardEvent | null) {\n event.preventDefault();\n this.select(this._tabs.toArray()[0].id);\n }\n\n /**\n * @docs-private\n *\n * Selects the last tab.\n */\n selectLast(event: KeyboardEvent | null) {\n event.preventDefault();\n const array = this._tabs.toArray();\n this.select(array[array.length - 1].id);\n }\n}\n","<div class=\"daff-tabs__tab-list\"\n\trole=\"tablist\"\n\t[attr.aria-label]=\"ariaLabel\"\n\t(keydown.home)=\"selectFirst($event)\"\n\t(keydown.end)=\"selectLast($event)\">\n\t@for (tab of _tabs; track tab) {\n\t\t@if (linkMode && tab.disabled) {\n\t\t\t<button daff-tab-activator routerLinkActive\n\t\t\t\t[selected]=\"tab.id === selectedTab\"\n\t\t\t\t[panelId]=\"tab.panelId\"\n\t\t\t\t[disabled]=\"tab.disabled\"\n\t\t\t\t[tabActivatorId]=\"tab.id\"\n\t\t\t\t(keydown.arrowright)=\"next()\"\n\t\t\t\t(keydown.arrowleft)=\"previous()\">\n\t\t\t\t\t<ng-container *ngTemplateOutlet=\"tab.labelRef\"></ng-container>\n\t\t\t</button>\n\t\t} @else if (linkMode) {\n\t\t\t<a daff-tab-activator routerLinkActive\n\t\t\t\tclass=\"daff-ae daff_tabs__link\"\n\t\t\t\t[selected]=\"tab.id === selectedTab\"\n\t\t\t\t[routerLink]=\"url || currentPath\"\n\t\t\t\tqueryParamsHandling=\"merge\"\n\t\t\t\t[queryParams]=\"_buildQueryParams(tab.id)\"\n\t\t\t\t[panelId]=\"tab.panelId\"\n\t\t\t\t[tabActivatorId]=\"tab.id\"\n\t\t\t\t(keydown.arrowright)=\"next()\"\n\t\t\t\t(keydown.arrowleft)=\"previous()\"\n\t\t\t\t(isActiveChange)=\"$event && select(tab.id)\">\n\t\t\t\t\t<ng-container *ngTemplateOutlet=\"tab.labelRef\"></ng-container>\n\t\t\t</a>\n\t\t} @else {\n\t\t\t<button daff-tab-activator\n\t\t\t\t[selected]=\"tab.id === selectedTab\"\n\t\t\t\t(click)=\"select(tab.id)\"\n\t\t\t\t[panelId]=\"tab.panelId\"\n\t\t\t\t[disabled]=\"tab.disabled\"\n\t\t\t\t[tabActivatorId]=\"tab.id\"\n\t\t\t\t(keydown.arrowright)=\"next()\"\n\t\t\t\t(keydown.arrowleft)=\"previous()\">\n\t\t\t\t\t<ng-container *ngTemplateOutlet=\"tab.labelRef\"></ng-container>\n\t\t\t</button>\n\t\t}\n\t}\n</div>\n\n@for (tab of _tabs; track tab) {\n\t@if(tab.id === selectedTab ) {\n\t\t<ng-container *ngTemplateOutlet=\"tab.contentRef\"></ng-container>\n\t}\n}","import { DaffTabComponent } from './tabs/tab/tab.component';\nimport { DaffTabLabelComponent } from './tabs/tab-label/tab-label.component';\nimport { DaffTabPanelComponent } from './tabs/tab-panel/tab-panel.component';\nimport { DaffTabsComponent } from './tabs/tabs.component';\n\n/**\n * @docs-private\n *\n * ```ts\n * import { DAFF_TABS_COMPONENTS } from '@daffodil/design/tabs';\n * ```\n */\nexport const DAFF_TABS_COMPONENTS = <const> [\n DaffTabsComponent,\n DaffTabLabelComponent,\n DaffTabPanelComponent,\n DaffTabComponent,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\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A,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;4FAIhB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAjB7B,SAAS;+BACE,WAAW,EAAA,aAAA,EAGN,iBAAiB,CAAC,IAAI,mBACpB,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,OAAO,EAAE,WAAW;qBACrB,EAAA,OAAA,EACQ;wBACP,gBAAgB;wBAChB,UAAU;wBACV,gBAAgB;wBAChB,yBAAyB;AAC1B,qBAAA,EAAA,QAAA,EAAA,myDAAA,EAAA,MAAA,EAAA,CAAA,0QAAA,CAAA,EAAA;;sBAcA;;sBAOA,WAAW;uBAAC,iBAAiB;;sBAK7B,KAAK;uBAAC,YAAY;;sBAKlB;;sBAMA;;sBAKA;;sBAKA;;sBAKA,eAAe;AAAC,gBAAA,IAAA,EAAA,CAAA,qBAAqB,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE;;sBAK5D,eAAe;uBAAC,gBAAgB;;sBAKhC,YAAY;uBAAC,yBAAyB;;;AEhIzC;;;;;;AAMG;AACI,MAAM,oBAAoB,GAAW;IAC1C,iBAAiB;IACjB,qBAAqB;IACrB,qBAAqB;IACrB,gBAAgB;;;AChBlB;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"daffodil-design-tabs.mjs","sources":["../../../libs/design/tabs/src/tabs/tab/tab.component.ts","../../../libs/design/tabs/src/tabs/tab-label/tab-label.component.ts","../../../libs/design/tabs/src/tabs/tab-label/tab-label.component.html","../../../libs/design/tabs/src/tabs/tab-panel/tab-panel.component.ts","../../../libs/design/tabs/src/tabs/tab-activator/tab-activator.component.ts","../../../libs/design/tabs/src/tabs/tabs.component.ts","../../../libs/design/tabs/src/tabs/tabs.component.html","../../../libs/design/tabs/src/tabs.ts","../../../libs/design/tabs/src/daffodil-design-tabs.ts"],"sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n TemplateRef,\n ViewChild,\n Input,\n} from '@angular/core';\n\nimport {\n DaffDisableable,\n DaffDisableableDirective,\n} from '@daffodil/design';\n\nlet tabId = 1;\n\n/**\n * Tab is a single tab in the tablist that is used to group the label of a tab panel and the tab panel together.\n *\n * A `<daff-tab>` should include the DaffTabLabelComponent and DaffTabPanelComponent components in order to properly structure the UI.\n *\n * @example\n * ```html\n * <daff-tab>\n * \t<daff-tab-label>\n * \t\t<fa-icon [icon]=\"faInfoCircle\" daffPrefix></fa-icon>\n * \t\tTab 1\n * \t</daff-tab-label>\n * \t<daff-tab-panel>\n * \t\tTab 1 Panel\n * \t</daff-tab-panel>\n * </daff-tab>\n * ```\n */\n@Component({\n selector: 'daff-tab',\n template: `\n <ng-template #label>\n <ng-content select=\"daff-tab-label\"></ng-content>\n </ng-template>\n <ng-template #content>\n <ng-content select=\"daff-tab-panel\"></ng-content>\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [\n {\n directive: DaffDisableableDirective,\n inputs: ['disabled'],\n },\n ],\n})\nexport class DaffTabComponent implements DaffDisableable {\n\n /**\n * @docs-private\n *\n * Whether the tab is disabled.\n */\n get disabled() {\n return this.disabledDirective.disabled;\n }\n\n /**\n * @docs-private\n */\n @ViewChild('content', { read: TemplateRef, static: true }) contentRef: TemplateRef<any>;\n\n /**\n * @docs-private\n */\n @ViewChild('label', { read: TemplateRef, static: true }) labelRef: TemplateRef<any>;\n\n /**\n * A unique id for the tab component. Defaults to an autogenerated value. When using this,\n * it's your responsibility to ensure that the id for each tab is unique.\n */\n @Input() id = 'daff-tab-' + tabId;\n\n /**\n * @docs-private\n */\n panelId = 'daff-tab-panel-' + tabId;\n\n constructor(private disabledDirective: DaffDisableableDirective) {\n tabId++;\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n} from '@angular/core';\n\nimport {\n DaffPrefixDirective,\n DaffSuffixDirective,\n} from '@daffodil/design';\n\n/**\n * Tab label is the clicakble label that activates its corresponding tab panel. Labels can contain text, icons, or both.\n *\n * @example\n * ```html\n * <daff-tab-label>\n * <div daffPrefix></div>\n * Label\n * <div daffSuffix></div\n * </daff-tab-Label>\n * ```\n */\n@Component({\n selector: 'daff-tab-label',\n templateUrl: './tab-label.component.html',\n styleUrl: './tab-label.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n DaffPrefixDirective,\n DaffSuffixDirective,\n ],\n})\nexport class DaffTabLabelComponent {\n /**\n * @docs-private\n */\n @ContentChild(DaffPrefixDirective) _prefix: DaffPrefixDirective;\n\n /**\n * @docs-private\n */\n @ContentChild(DaffSuffixDirective) _suffix: DaffSuffixDirective;\n}\n","@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<div class=\"daff-tab-label__content\">\n <ng-content></ng-content>\n</div>\n@if (_suffix) {\n <ng-content select=\"[daffSuffix]\"></ng-content>\n}","/* eslint-disable quote-props */\nimport {\n Component,\n ChangeDetectionStrategy,\n} from '@angular/core';\n\nimport { DaffTabComponent } from '../tab/tab.component';\n\n/**\n * Tab panel is the content area displayed when a tab is active.\n *\n * @example\n * ```html\n * <daff-tab-panel>\n * <!-- Tab panel content goes here -->\n * </daff-tab-panel>\n * ```\n */\n@Component({\n selector: 'daff-tab-panel',\n template: `<ng-content></ng-content>`,\n styleUrl: './tab-panel.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'class': 'daff-tab-panel',\n 'role': 'tabpanel',\n 'tabindex': '0',\n '[attr.id]': 'tabPanelId',\n '[attr.aria-labelledby]': 'ariaLabelledBy',\n },\n})\nexport class DaffTabPanelComponent {\n private _id = '';\n\n /**\n * @docs-private\n *\n * Dynamically binds the tab panel's id to a unique value generated from the associated tab's panelId.\n */\n get tabPanelId() {\n return this._id;\n }\n\n private _ariaLabelledBy = '';\n\n /**\n * @docs-private\n */\n get ariaLabelledBy() {\n return this._ariaLabelledBy;\n }\n\n constructor(private tab: DaffTabComponent) {\n /**\n * Sets the value of `ariaLabelledBy` to the id of the tab component.\n */\n this._ariaLabelledBy = this.tab.id;\n\n this._id = this.tab.panelId;\n }\n}\n","/* eslint-disable quote-props */\nimport {\n Input,\n Component,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n ElementRef,\n} from '@angular/core';\n\nimport { DaffSelectableDirective } from '@daffodil/design';\n\n@Component({\n selector: '' +\n 'button[daff-tab-activator]' + ',' +\n 'a[daff-tab-activator]',\n template: `<ng-content></ng-content>`,\n styleUrl: './tab-activator.component.scss',\n hostDirectives: [\n {\n directive: DaffSelectableDirective,\n inputs: ['selected'],\n },\n ],\n host: {\n 'class': 'daff-tab-activator',\n 'role': 'tab',\n '[attr.aria-selected]': 'ariaSelected',\n '[attr.tabindex]': 'tabIndex',\n '[attr.id]': 'tabActivatorId',\n '[attr.aria-controls]': 'panelId',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class DaffTabActivatorComponent {\n /**\n * @docs-private\n *\n * Sets `aria-selected` to true if the component is selected and false if it's not selected.\n */\n get ariaSelected() {\n return this.selectableDirective.selected ? true : false;\n }\n\n /**\n * @docs-private\n *\n * Sets `tabindex` to `0` if the component is selected and `-1` if it's not selected.\n */\n get tabIndex() {\n return this.selectableDirective.selected ? '0' : '-1';\n }\n\n constructor(\n private el: ElementRef,\n private selectableDirective: DaffSelectableDirective,\n ) {\n }\n\n /**\n * The html id of the tab activator component\n */\n @Input() tabActivatorId = '';\n\n @Input() panelId = '';\n\n /**\n * Sets focus to the native element of the component.\n */\n focus() {\n this.el.nativeElement.focus();\n }\n}\n","/* eslint-disable quote-props */\nimport {\n Location,\n NgTemplateOutlet,\n} from '@angular/common';\nimport {\n Component,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n ContentChildren,\n QueryList,\n AfterContentInit,\n Input,\n Output,\n EventEmitter,\n ViewChildren,\n ChangeDetectorRef,\n OnInit,\n} from '@angular/core';\nimport {\n Params,\n RouterLink,\n RouterLinkActive,\n} from '@angular/router';\n\nimport { DaffTabComponent } from './tab/tab.component';\nimport { DaffTabActivatorComponent } from './tab-activator/tab-activator.component';\nimport { DaffTabLabelComponent } from './tab-label/tab-label.component';\n\n/**\n * Tabs provide a way to navigate between panels that display related content without leaving the page.\n *\n * @example\n * ```html\n * <daff-tabs aria-label=\"List of tabs\">\n * \t<daff-tab>\n * \t\t<daff-tab-label>\n * \t\t\t<fa-icon [icon]=\"faInfoCircle\" daffPrefix></fa-icon>\n * \t\t\tTab 1\n * \t\t</daff-tab-label>\n * \t\t<daff-tab-panel>\n * \t\t\tTab 1 Panel\n * \t\t</daff-tab-panel>\n * \t</daff-tab>\n * \t<daff-tab>\n * \t\t<daff-tab-label>\n * \t\t\tTab 2\n * \t\t\t<fa-icon [icon]=\"faInfoCircle\" daffSuffix></fa-icon>\n * \t\t</daff-tab-label>\n * \t\t<daff-tab-panel>\n * \t\t\tTab 2 Panel\n * \t\t</daff-tab-panel>\n * \t</daff-tab>\n * </daff-tabs>\n * ```\n */\n@Component({\n selector: 'daff-tabs',\n templateUrl: './tabs.component.html',\n styleUrl: './tabs.component.scss',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'class': 'daff-tabs',\n '[attr.aria-label]': 'null',\n },\n imports: [\n NgTemplateOutlet,\n RouterLink,\n RouterLinkActive,\n DaffTabActivatorComponent,\n ],\n})\n\nexport class DaffTabsComponent implements AfterContentInit, OnInit {\n /**\n * @docs-private\n *\n * The currently selected tab. This property is dynamically updated when a user selects a tab.\n */\n selectedTab: string;\n\n /**\n * The tab that is selected on initial load. If it's not used, the first tab in the tablist will be selected by default.\n */\n @Input() initiallySelected: string = null;\n\n /**\n * `aria-label` to label the tablist.\n */\n @Input('aria-label') ariaLabel = '';\n\n /**\n * Replace the tab buttons as links.\n */\n @Input() linkMode = false;\n\n /**\n * The URL to navigate to when the component is in link mode.\n * This component will set the specified query param.\n */\n @Input() url?: string;\n\n /**\n * The query parameter that the tabs component will use to set the tab value in link mode.\n */\n @Input() queryParam = 'tab';\n\n /**\n * Event emitted when tab selection changes.\n */\n @Output() tabChange = new EventEmitter<string>();\n\n /**\n * @docs-private\n */\n @ContentChildren(DaffTabLabelComponent, { descendants: true }) _labels: QueryList<DaffTabLabelComponent>;\n\n /**\n * @docs-private\n */\n @ContentChildren(DaffTabComponent) _tabs: QueryList<DaffTabComponent>;\n\n /**\n * @docs-private\n */\n @ViewChildren(DaffTabActivatorComponent) _tabActivators: QueryList<DaffTabActivatorComponent>;\n\n /**\n * @docs-private\n */\n get currentPath(): string {\n return this.location.path();\n }\n\n constructor(\n private cdRef: ChangeDetectorRef,\n private location: Location,\n ) {}\n\n private reset() {\n if(this.initiallySelected) {\n this.selectedTab = this.initiallySelected;\n }\n\n if (!this.selectedTab) {\n this.selectedTab = this._tabs.first.id;\n }\n }\n\n /**\n * @docs-private\n */\n ngOnInit(): void {\n this.location.onUrlChange(() => {\n // if the app is navigated away from the current page, reset the state\n if (this.linkMode && !this.location.isCurrentPathEqualTo(this.url, `${this.queryParam}=${this.selectedTab}`)) {\n this.selectedTab = null;\n this.reset();\n this.tabChange.emit(this.selectedTab);\n }\n });\n }\n\n /**\n * @docs-private\n */\n ngAfterContentInit() {\n this.reset();\n }\n\n /**\n * @docs-private\n *\n * Selects a tab and sets focus on the selected tab.\n */\n select(tabId: string) {\n const tabActivator = this._tabActivators.find(el => el.tabActivatorId === tabId);\n\n if (!tabActivator) {\n console.warn(`The tab '${tabId}' was not able to be selected because it does not exist. Check the id on your <daff-tab>s.`);\n return;\n }\n\n this.tabChange.emit(tabId);\n this.selectedTab = tabId;\n this.cdRef.markForCheck();\n\n tabActivator.focus();\n }\n\n /**\n * Navigates through the tabs based on the given offset.\n * Moves forward or backward in the tab array, wrapping around when necessary.\n */\n private navigateTabs(offset: number) {\n const array = this._tabs.toArray();\n let selectedIndex = array.findIndex(el => el.id === this.selectedTab);\n const startingIndex = selectedIndex;\n let newIndex;\n\n do {\n newIndex = (selectedIndex + offset + array.length) % array.length;\n selectedIndex = newIndex;\n } while (array[newIndex].disabled && selectedIndex !== startingIndex); // Skip disabled tabs\n\n this.select(array[newIndex].id);\n }\n\n /**\n * @docs-private\n */\n _buildQueryParams(tab: string): Params {\n return {\n [this.queryParam]: tab,\n };\n }\n\n /**\n * @docs-private\n *\n * Selects the previous tab and wraps around to the last tab if the first tab is currently selected.\n */\n previous() {\n this.navigateTabs(-1);\n }\n\n /**\n * @docs-private\n *\n * Selects the next tab and wraps around to the first tab if the last tab is currently selected.\n */\n next() {\n this.navigateTabs(1);\n }\n\n /**\n * @docs-private\n *\n * Selects the first tab.\n */\n selectFirst(event: KeyboardEvent | null) {\n event.preventDefault();\n this.select(this._tabs.toArray()[0].id);\n }\n\n /**\n * @docs-private\n *\n * Selects the last tab.\n */\n selectLast(event: KeyboardEvent | null) {\n event.preventDefault();\n const array = this._tabs.toArray();\n this.select(array[array.length - 1].id);\n }\n}\n","<div class=\"daff-tabs__tab-list\"\n\trole=\"tablist\"\n\t[attr.aria-label]=\"ariaLabel\"\n\t(keydown.home)=\"selectFirst($event)\"\n\t(keydown.end)=\"selectLast($event)\">\n\t@for (tab of _tabs; track tab) {\n\t\t@if (linkMode && tab.disabled) {\n\t\t\t<button daff-tab-activator routerLinkActive\n\t\t\t\t[selected]=\"tab.id === selectedTab\"\n\t\t\t\t[panelId]=\"tab.panelId\"\n\t\t\t\t[disabled]=\"tab.disabled\"\n\t\t\t\t[tabActivatorId]=\"tab.id\"\n\t\t\t\t(keydown.arrowright)=\"next()\"\n\t\t\t\t(keydown.arrowleft)=\"previous()\">\n\t\t\t\t\t<ng-container *ngTemplateOutlet=\"tab.labelRef\"></ng-container>\n\t\t\t</button>\n\t\t} @else if (linkMode) {\n\t\t\t<a daff-tab-activator routerLinkActive\n\t\t\t\tclass=\"daff-ae daff_tabs__link\"\n\t\t\t\t[selected]=\"tab.id === selectedTab\"\n\t\t\t\t[routerLink]=\"url || currentPath\"\n\t\t\t\tqueryParamsHandling=\"merge\"\n\t\t\t\t[queryParams]=\"_buildQueryParams(tab.id)\"\n\t\t\t\t[panelId]=\"tab.panelId\"\n\t\t\t\t[tabActivatorId]=\"tab.id\"\n\t\t\t\t(keydown.arrowright)=\"next()\"\n\t\t\t\t(keydown.arrowleft)=\"previous()\"\n\t\t\t\t(isActiveChange)=\"$event && select(tab.id)\">\n\t\t\t\t\t<ng-container *ngTemplateOutlet=\"tab.labelRef\"></ng-container>\n\t\t\t</a>\n\t\t} @else {\n\t\t\t<button daff-tab-activator\n\t\t\t\t[selected]=\"tab.id === selectedTab\"\n\t\t\t\t(click)=\"select(tab.id)\"\n\t\t\t\t[panelId]=\"tab.panelId\"\n\t\t\t\t[disabled]=\"tab.disabled\"\n\t\t\t\t[tabActivatorId]=\"tab.id\"\n\t\t\t\t(keydown.arrowright)=\"next()\"\n\t\t\t\t(keydown.arrowleft)=\"previous()\">\n\t\t\t\t\t<ng-container *ngTemplateOutlet=\"tab.labelRef\"></ng-container>\n\t\t\t</button>\n\t\t}\n\t}\n</div>\n\n@for (tab of _tabs; track tab) {\n\t@if(tab.id === selectedTab ) {\n\t\t<ng-container *ngTemplateOutlet=\"tab.contentRef\"></ng-container>\n\t}\n}","import { DaffTabComponent } from './tabs/tab/tab.component';\nimport { DaffTabLabelComponent } from './tabs/tab-label/tab-label.component';\nimport { DaffTabPanelComponent } from './tabs/tab-panel/tab-panel.component';\nimport { DaffTabsComponent } from './tabs/tabs.component';\n\n/**\n * @docs-private\n *\n * ```ts\n * import { DAFF_TABS_COMPONENTS } from '@daffodil/design/tabs';\n * ```\n */\nexport const DAFF_TABS_COMPONENTS = <const> [\n DaffTabsComponent,\n DaffTabLabelComponent,\n DaffTabPanelComponent,\n DaffTabComponent,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.DaffTabComponent","i1"],"mappings":";;;;;;;;AAaA,IAAI,KAAK,GAAG,CAAC;A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AlB7B,SAAS;+BACE,WAAW,EAAA,aAAA,EAGN,iBAAiB,CAAC,IAAI,mBACpB,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,OAAO,EAAE,WAAW;AACpB,wBAAA,mBAAmB,EAAE,MAAM;qBAC5B,EAAA,OAAA,EACQ;wBACP,gBAAgB;wBAChB,UAAU;wBACV,gBAAgB;wBAChB,yBAAyB;AAC1B,qBAAA,EAAA,QAAA,EAAA,myDAAA,EAAA,MAAA,EAAA,CAAA,0QAAA,CAAA,EAAA;;sBAcA;;sBAKA,KAAK;uBAAC,YAAY;;sBAKlB;;sBAMA;;sBAKA;;sBAKA;;sBAKA,eAAe;AAAC,gBAAA,IAAA,EAAA,CAAA,qBAAqB,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE;;sBAK5D,eAAe;uBAAC,gBAAgB;;sBAKhC,YAAY;uBAAC,yBAAyB;;;AEzHzC;;;;;;AAMG;AACI,MAAM,oBAAoB,GAAW;IAC1C,iBAAiB;IACjB,qBAAqB;IACrB,qBAAqB;IACrB,gBAAgB;;;AChBlB;;AAEG;;;;"}
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
2
1
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { Directive, EventEmitter, Output, Input, ContentChild, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
|
|
2
|
+
import { Directive, EventEmitter, booleanAttribute, Output, Input, ContentChild, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
|
|
4
3
|
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
|
|
5
4
|
import { faTimes } from '@fortawesome/free-solid-svg-icons';
|
|
6
5
|
import * as i2 from '@daffodil/design';
|
|
7
|
-
import { DaffSizableDirective, DaffPrefixDirective, DaffArticleEncapsulatedDirective, DaffColorableDirective, DaffStatusableDirective } from '@daffodil/design';
|
|
6
|
+
import { DaffSizableDirective, DaffPrefixDirective, DaffArticleEncapsulatedDirective, DaffColorableDirective, DaffStatusableDirective, DaffDisableableDirective } from '@daffodil/design';
|
|
8
7
|
|
|
9
8
|
class DaffTagSizableDirective extends DaffSizableDirective {
|
|
10
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
11
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
9
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTagSizableDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
10
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: DaffTagSizableDirective, isStandalone: true, usesInheritance: true, ngImport: i0 }); }
|
|
12
11
|
}
|
|
13
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTagSizableDirective, decorators: [{
|
|
14
13
|
type: Directive,
|
|
15
14
|
args: [{}]
|
|
16
15
|
}] });
|
|
17
16
|
|
|
18
17
|
/**
|
|
19
|
-
*
|
|
18
|
+
* DaffTagComponent is an interactive indicator and filter that can be edited or removed, used to represent selections, categories, or applied filters.
|
|
20
19
|
*
|
|
21
20
|
* @example
|
|
22
21
|
* ```html
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
22
|
+
* <daff-tag [dismissible]="true" (closeTag)="onCloseTag()">
|
|
23
|
+
* <fa-icon daffPrefix [icon]="faCircleCheck"></fa-icon>
|
|
24
|
+
* Label
|
|
25
|
+
* </daff-tag>
|
|
27
26
|
* ```
|
|
28
27
|
*/
|
|
29
28
|
class DaffTagComponent {
|
|
30
29
|
/**
|
|
31
|
-
*
|
|
30
|
+
* @docs-private
|
|
31
|
+
*
|
|
32
|
+
* Internal function to access the disabled property of the DaffDisableableDirective.
|
|
32
33
|
*/
|
|
33
34
|
get disabled() {
|
|
34
|
-
return this.
|
|
35
|
-
}
|
|
36
|
-
set disabled(value) {
|
|
37
|
-
this._disabled = coerceBooleanProperty(value);
|
|
35
|
+
return this.disabledDirective.disabled;
|
|
38
36
|
}
|
|
39
|
-
/**
|
|
40
|
-
*
|
|
37
|
+
/**
|
|
38
|
+
* @deprecated Deprecated in version 0.93.0. Deprecated in version 0.93.1. Will be removed in version 0.96.0.
|
|
39
|
+
*
|
|
40
|
+
* Sets the status on the tag.
|
|
41
41
|
*/
|
|
42
|
-
get
|
|
43
|
-
return this.
|
|
42
|
+
get status() {
|
|
43
|
+
return this.statusable.status;
|
|
44
44
|
}
|
|
45
|
-
set
|
|
46
|
-
this.
|
|
45
|
+
set status(value) {
|
|
46
|
+
this.statusable.status = value;
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
49
|
* @docs-private
|
|
@@ -51,19 +51,24 @@ class DaffTagComponent {
|
|
|
51
51
|
* Internal handler for the close icon click.
|
|
52
52
|
*/
|
|
53
53
|
onCloseTag(event) {
|
|
54
|
-
if (this.
|
|
54
|
+
if (this.disabled) {
|
|
55
55
|
return;
|
|
56
56
|
}
|
|
57
57
|
this.closeTag.emit();
|
|
58
58
|
}
|
|
59
|
-
constructor(size) {
|
|
59
|
+
constructor(size, disabledDirective, statusable) {
|
|
60
60
|
this.size = size;
|
|
61
|
+
this.disabledDirective = disabledDirective;
|
|
62
|
+
this.statusable = statusable;
|
|
61
63
|
/**
|
|
62
64
|
* @docs-private
|
|
63
65
|
*/
|
|
64
66
|
this.faTimes = faTimes;
|
|
65
|
-
|
|
66
|
-
|
|
67
|
+
/**
|
|
68
|
+
* Whether the tag can be dismissed by the user.
|
|
69
|
+
* Displays a close icon if `true`.
|
|
70
|
+
*/
|
|
71
|
+
this.dismissible = false;
|
|
67
72
|
/**
|
|
68
73
|
* Emits when the tag is closed.
|
|
69
74
|
*/
|
|
@@ -73,10 +78,10 @@ class DaffTagComponent {
|
|
|
73
78
|
*/
|
|
74
79
|
this.size.defaultSize = 'md';
|
|
75
80
|
}
|
|
76
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
77
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
81
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTagComponent, deps: [{ token: DaffTagSizableDirective }, { token: i2.DaffDisableableDirective }, { token: i2.DaffStatusableDirective }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
82
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: DaffTagComponent, isStandalone: true, selector: "daff-tag", inputs: { status: "status", dismissible: ["dismissible", "dismissible", booleanAttribute] }, outputs: { closeTag: "closeTag" }, host: { properties: { "attr.aria-disabled": "disabled ? true : null", "class.dismissible": "dismissible" }, classAttribute: "daff-tag" }, queries: [{ propertyName: "_prefix", first: true, predicate: DaffPrefixDirective, descendants: true, static: true }], hostDirectives: [{ directive: i2.DaffArticleEncapsulatedDirective }, { directive: DaffTagSizableDirective, inputs: ["size", "size"] }, { directive: i2.DaffColorableDirective, inputs: ["color", "color"] }, { directive: i2.DaffStatusableDirective }, { directive: i2.DaffDisableableDirective, inputs: ["disabled", "disabled"] }], ngImport: i0, template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<div class=\"daff-tag__label\">\n <ng-content></ng-content>\n</div>\n@if (dismissible) {\n <button class=\"daff-tag__close-icon\" (click)=\"onCloseTag($event)\" aria-label=\"Dismiss\" [attr.tabindex]=\"disabled ? -1 : null\">\n <fa-icon [icon]=\"faTimes\" [fixedWidth]=\"true\"></fa-icon>\n </button>\n}\n", styles: [".daff-tag{display:inline-flex;align-items:center;cursor:default;justify-content:center;flex-wrap:nowrap;border-radius:.25rem;position:relative}.daff-tag.daff-sm{font-size:.875rem;line-height:1rem;gap:.375rem;padding:.5rem}.daff-tag.daff-sm .daff-tag__close-icon{font-size:.875rem;line-height:1rem}.daff-tag.daff-md{font-size:1rem;line-height:1rem;gap:.5rem;padding:.5rem}.daff-tag.daff-md .daff-tag__close-icon{font-size:1rem;line-height:1.25rem}.daff-tag.daff-lg{font-size:1.25rem;line-height:1.25rem;gap:.5rem;padding:.75rem}.daff-tag.daff-lg .daff-tag__close-icon{font-size:1.25rem;line-height:1.25rem}.daff-tag:after{content:\"\";border-radius:.25rem;position:absolute;width:100%;height:100%;opacity:0;pointer-events:none;transition:opacity .3s;z-index:0}@media(hover:hover){.daff-tag:hover:after{opacity:1}}.daff-tag.daff-disabled{cursor:not-allowed;opacity:.5}@media(hover:hover){.daff-tag.daff-disabled:hover:after{opacity:0}}.daff-tag.daff-disabled .daff-tag__close-icon{cursor:not-allowed}.daff-tag.dismissible{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.daff-tag .daff-tag__label,.daff-tag .daff-prefix,.daff-tag .daff-tag__close-icon{z-index:1}.daff-tag__close-icon{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:none;background:none;appearance:none;padding:0;position:relative;color:currentColor;margin:0}\n"], dependencies: [{ kind: "component", type: FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"], outputs: ["iconChange", "titleChange", "animationChange", "maskChange", "flipChange", "sizeChange", "pullChange", "borderChange", "inverseChange", "symbolChange", "rotateChange", "fixedWidthChange", "transformChange", "a11yRoleChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
78
83
|
}
|
|
79
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
84
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTagComponent, decorators: [{
|
|
80
85
|
type: Component,
|
|
81
86
|
args: [{ selector: 'daff-tag', hostDirectives: [
|
|
82
87
|
{ directive: DaffArticleEncapsulatedDirective },
|
|
@@ -90,24 +95,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
90
95
|
},
|
|
91
96
|
{
|
|
92
97
|
directive: DaffStatusableDirective,
|
|
93
|
-
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
directive: DaffDisableableDirective,
|
|
101
|
+
inputs: ['disabled'],
|
|
94
102
|
},
|
|
95
103
|
], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
96
104
|
class: 'daff-tag',
|
|
97
105
|
'[attr.aria-disabled]': 'disabled ? true : null',
|
|
98
|
-
'[disabled]': 'disabled',
|
|
99
106
|
'[class.dismissible]': 'dismissible',
|
|
100
107
|
}, imports: [
|
|
101
108
|
FaIconComponent,
|
|
102
109
|
DaffPrefixDirective,
|
|
103
|
-
], template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<div class=\"daff-tag__label\">\n <ng-content></ng-content>\n</div>\n@if (dismissible) {\n <button class=\"daff-tag__close-icon\" (click)=\"onCloseTag($event)\" aria-label=\"Dismiss\" [attr.tabindex]=\"disabled ? -1 : null\">\n <fa-icon [icon]=\"faTimes\"></fa-icon>\n </button>\n}\n", styles: [".daff-tag{display:inline-flex;align-items:center;justify-content:center;flex-wrap:nowrap;border-radius:.25rem;position:relative}.daff-tag.daff-sm{font-size:.875rem;line-height:1rem;gap:.375rem;padding:.5rem}.daff-tag.daff-sm .daff-tag__close-icon{font-size:.875rem;line-height:1rem}.daff-tag.daff-md{font-size:1rem;line-height:
|
|
104
|
-
}], ctorParameters: () => [{ type: DaffTagSizableDirective }], propDecorators: { _prefix: [{
|
|
110
|
+
], template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<div class=\"daff-tag__label\">\n <ng-content></ng-content>\n</div>\n@if (dismissible) {\n <button class=\"daff-tag__close-icon\" (click)=\"onCloseTag($event)\" aria-label=\"Dismiss\" [attr.tabindex]=\"disabled ? -1 : null\">\n <fa-icon [icon]=\"faTimes\" [fixedWidth]=\"true\"></fa-icon>\n </button>\n}\n", styles: [".daff-tag{display:inline-flex;align-items:center;cursor:default;justify-content:center;flex-wrap:nowrap;border-radius:.25rem;position:relative}.daff-tag.daff-sm{font-size:.875rem;line-height:1rem;gap:.375rem;padding:.5rem}.daff-tag.daff-sm .daff-tag__close-icon{font-size:.875rem;line-height:1rem}.daff-tag.daff-md{font-size:1rem;line-height:1rem;gap:.5rem;padding:.5rem}.daff-tag.daff-md .daff-tag__close-icon{font-size:1rem;line-height:1.25rem}.daff-tag.daff-lg{font-size:1.25rem;line-height:1.25rem;gap:.5rem;padding:.75rem}.daff-tag.daff-lg .daff-tag__close-icon{font-size:1.25rem;line-height:1.25rem}.daff-tag:after{content:\"\";border-radius:.25rem;position:absolute;width:100%;height:100%;opacity:0;pointer-events:none;transition:opacity .3s;z-index:0}@media(hover:hover){.daff-tag:hover:after{opacity:1}}.daff-tag.daff-disabled{cursor:not-allowed;opacity:.5}@media(hover:hover){.daff-tag.daff-disabled:hover:after{opacity:0}}.daff-tag.daff-disabled .daff-tag__close-icon{cursor:not-allowed}.daff-tag.dismissible{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.daff-tag .daff-tag__label,.daff-tag .daff-prefix,.daff-tag .daff-tag__close-icon{z-index:1}.daff-tag__close-icon{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:none;background:none;appearance:none;padding:0;position:relative;color:currentColor;margin:0}\n"] }]
|
|
111
|
+
}], ctorParameters: () => [{ type: DaffTagSizableDirective }, { type: i2.DaffDisableableDirective }, { type: i2.DaffStatusableDirective }], propDecorators: { _prefix: [{
|
|
105
112
|
type: ContentChild,
|
|
106
113
|
args: [DaffPrefixDirective, { static: true }]
|
|
107
|
-
}],
|
|
114
|
+
}], status: [{
|
|
108
115
|
type: Input
|
|
109
116
|
}], dismissible: [{
|
|
110
|
-
type: Input
|
|
117
|
+
type: Input,
|
|
118
|
+
args: [{ transform: booleanAttribute }]
|
|
111
119
|
}], closeTag: [{
|
|
112
120
|
type: Output
|
|
113
121
|
}] } });
|