@daffodil/design 0.94.1-rc.0 → 0.95.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.
Files changed (170) hide show
  1. package/README.md +1 -2
  2. package/accordion/src/accordion-theme.scss +4 -4
  3. package/article/README.md +4 -27
  4. package/article/src/article-theme.scss +14 -14
  5. package/badge/src/badge-theme.scss +0 -6
  6. package/button/README.md +0 -4
  7. package/button/src/button/basic/button-theme.scss +17 -42
  8. package/button/src/button/button-base.scss +12 -3
  9. package/button/src/button/flat/flat-theme.scss +14 -12
  10. package/button/src/button/icon/icon-theme.scss +19 -40
  11. package/button/src/button/stroked/stroked-theme.scss +22 -36
  12. package/card/src/card/stroked/stroked-theme.scss +1 -1
  13. package/card/src/card-base.scss +0 -1
  14. package/fesm2022/daffodil-design-accordion.mjs +285 -188
  15. package/fesm2022/daffodil-design-accordion.mjs.map +1 -1
  16. package/fesm2022/daffodil-design-article.mjs +578 -340
  17. package/fesm2022/daffodil-design-article.mjs.map +1 -1
  18. package/fesm2022/daffodil-design-badge.mjs +166 -84
  19. package/fesm2022/daffodil-design-badge.mjs.map +1 -1
  20. package/fesm2022/daffodil-design-beacon.mjs +109 -47
  21. package/fesm2022/daffodil-design-beacon.mjs.map +1 -1
  22. package/fesm2022/daffodil-design-breadcrumb.mjs +384 -277
  23. package/fesm2022/daffodil-design-breadcrumb.mjs.map +1 -1
  24. package/fesm2022/daffodil-design-button.mjs +541 -408
  25. package/fesm2022/daffodil-design-button.mjs.map +1 -1
  26. package/fesm2022/daffodil-design-callout.mjs +349 -224
  27. package/fesm2022/daffodil-design-callout.mjs.map +1 -1
  28. package/fesm2022/daffodil-design-card.mjs +496 -327
  29. package/fesm2022/daffodil-design-card.mjs.map +1 -1
  30. package/fesm2022/daffodil-design-checkbox.mjs +373 -313
  31. package/fesm2022/daffodil-design-checkbox.mjs.map +1 -1
  32. package/fesm2022/daffodil-design-container.mjs +103 -60
  33. package/fesm2022/daffodil-design-container.mjs.map +1 -1
  34. package/fesm2022/daffodil-design-form-field.mjs +441 -352
  35. package/fesm2022/daffodil-design-form-field.mjs.map +1 -1
  36. package/fesm2022/daffodil-design-form.mjs +155 -57
  37. package/fesm2022/daffodil-design-form.mjs.map +1 -1
  38. package/fesm2022/daffodil-design-hero.mjs +349 -234
  39. package/fesm2022/daffodil-design-hero.mjs.map +1 -1
  40. package/fesm2022/daffodil-design-image-lite.mjs +60 -0
  41. package/fesm2022/daffodil-design-image-lite.mjs.map +1 -0
  42. package/fesm2022/daffodil-design-image.mjs +245 -107
  43. package/fesm2022/daffodil-design-image.mjs.map +1 -1
  44. package/fesm2022/daffodil-design-input.mjs +217 -164
  45. package/fesm2022/daffodil-design-input.mjs.map +1 -1
  46. package/fesm2022/daffodil-design-list.mjs +308 -170
  47. package/fesm2022/daffodil-design-list.mjs.map +1 -1
  48. package/fesm2022/daffodil-design-media-gallery.mjs +351 -278
  49. package/fesm2022/daffodil-design-media-gallery.mjs.map +1 -1
  50. package/fesm2022/daffodil-design-menu.mjs +525 -417
  51. package/fesm2022/daffodil-design-menu.mjs.map +1 -1
  52. package/fesm2022/daffodil-design-modal.mjs +680 -450
  53. package/fesm2022/daffodil-design-modal.mjs.map +1 -1
  54. package/fesm2022/daffodil-design-native-select.mjs +175 -166
  55. package/fesm2022/daffodil-design-native-select.mjs.map +1 -1
  56. package/fesm2022/daffodil-design-navbar.mjs +145 -68
  57. package/fesm2022/daffodil-design-navbar.mjs.map +1 -1
  58. package/fesm2022/daffodil-design-notification.mjs +376 -226
  59. package/fesm2022/daffodil-design-notification.mjs.map +1 -1
  60. package/fesm2022/daffodil-design-paginator.mjs +296 -192
  61. package/fesm2022/daffodil-design-paginator.mjs.map +1 -1
  62. package/fesm2022/daffodil-design-progress-bar.mjs +243 -157
  63. package/fesm2022/daffodil-design-progress-bar.mjs.map +1 -1
  64. package/fesm2022/daffodil-design-radio.mjs +382 -300
  65. package/fesm2022/daffodil-design-radio.mjs.map +1 -1
  66. package/fesm2022/daffodil-design-select.mjs +424 -364
  67. package/fesm2022/daffodil-design-select.mjs.map +1 -1
  68. package/fesm2022/daffodil-design-sidebar.mjs +874 -887
  69. package/fesm2022/daffodil-design-sidebar.mjs.map +1 -1
  70. package/fesm2022/daffodil-design-spinner.mjs +156 -99
  71. package/fesm2022/daffodil-design-spinner.mjs.map +1 -1
  72. package/fesm2022/daffodil-design-switch.mjs +176 -106
  73. package/fesm2022/daffodil-design-switch.mjs.map +1 -1
  74. package/fesm2022/daffodil-design-tabs.mjs +685 -427
  75. package/fesm2022/daffodil-design-tabs.mjs.map +1 -1
  76. package/fesm2022/daffodil-design-tag.mjs +251 -133
  77. package/fesm2022/daffodil-design-tag.mjs.map +1 -1
  78. package/fesm2022/daffodil-design-testing.mjs +4 -16
  79. package/fesm2022/daffodil-design-testing.mjs.map +1 -1
  80. package/fesm2022/daffodil-design-text-snippet.mjs +140 -54
  81. package/fesm2022/daffodil-design-text-snippet.mjs.map +1 -1
  82. package/fesm2022/daffodil-design-textarea.mjs +170 -150
  83. package/fesm2022/daffodil-design-textarea.mjs.map +1 -1
  84. package/fesm2022/daffodil-design-toast.mjs +658 -481
  85. package/fesm2022/daffodil-design-toast.mjs.map +1 -1
  86. package/fesm2022/daffodil-design-tree.mjs +456 -469
  87. package/fesm2022/daffodil-design-tree.mjs.map +1 -1
  88. package/fesm2022/daffodil-design-youtube-player.mjs +168 -115
  89. package/fesm2022/daffodil-design-youtube-player.mjs.map +1 -1
  90. package/fesm2022/daffodil-design.mjs +1628 -1650
  91. package/fesm2022/daffodil-design.mjs.map +1 -1
  92. package/form-field/README.md +0 -4
  93. package/form-field/src/form-field-theme.scss +12 -4
  94. package/image/README.md +4 -0
  95. package/image-lite/README.md +58 -0
  96. package/image-lite/src/image-theme.scss +18 -0
  97. package/list/src/list-base.scss +3 -4
  98. package/list/src/list-theme.scss +6 -5
  99. package/media-gallery/README.md +1 -1
  100. package/media-gallery/src/media-gallery-theme.scss +3 -3
  101. package/menu/src/menu-theme.scss +6 -2
  102. package/notification/src/notification-theme.scss +10 -10
  103. package/package.json +1 -1
  104. package/scss/global.scss +17 -11
  105. package/scss/theme.scss +2 -18
  106. package/scss/theming/_get-palette.scss +0 -3
  107. package/scss/theming/_index.scss +0 -1
  108. package/scss/theming/_light-dark.scss +2 -2
  109. package/scss/theming/_theme-css-variables.scss +1 -1
  110. package/scss/theming/create-theme/_create-theme.scss +2 -2
  111. package/scss/theming/get-font-colors/_get-font-colors.scss +7 -25
  112. package/scss/theming/get-font-colors/_get-font-colors.spec.scss +0 -12
  113. package/scss/typography/_classes.scss +0 -6
  114. package/scss/typography/_index.scss +0 -1
  115. package/scss/typography/mixins/_sizes.scss +0 -1
  116. package/scss/typography/utilities/_variables.scss +3 -0
  117. package/select/src/select-theme.scss +10 -14
  118. package/switch/src/switch-theme.scss +2 -2
  119. package/tabs/src/tabs-theme.scss +4 -4
  120. package/types/daffodil-design-accordion.d.ts +92 -67
  121. package/types/daffodil-design-article.d.ts +49 -56
  122. package/types/daffodil-design-badge.d.ts +56 -33
  123. package/types/daffodil-design-beacon.d.ts +35 -14
  124. package/types/daffodil-design-breadcrumb.d.ts +89 -85
  125. package/types/daffodil-design-button.d.ts +128 -146
  126. package/types/daffodil-design-callout.d.ts +55 -39
  127. package/types/daffodil-design-card.d.ts +66 -56
  128. package/types/daffodil-design-checkbox.d.ts +211 -167
  129. package/types/daffodil-design-container.d.ts +17 -16
  130. package/types/daffodil-design-form-field.d.ts +273 -240
  131. package/types/daffodil-design-form.d.ts +21 -21
  132. package/types/daffodil-design-hero.d.ts +55 -39
  133. package/types/daffodil-design-image-lite.d.ts +17 -0
  134. package/types/daffodil-design-image.d.ts +89 -55
  135. package/types/daffodil-design-input.d.ts +86 -72
  136. package/types/daffodil-design-list.d.ts +49 -43
  137. package/types/daffodil-design-media-gallery.d.ts +176 -148
  138. package/types/daffodil-design-menu.d.ts +177 -169
  139. package/types/daffodil-design-modal.d.ts +205 -205
  140. package/types/daffodil-design-native-select.d.ts +94 -84
  141. package/types/daffodil-design-navbar.d.ts +34 -24
  142. package/types/daffodil-design-notification.d.ts +82 -67
  143. package/types/daffodil-design-paginator.d.ts +140 -118
  144. package/types/daffodil-design-progress-bar.d.ts +92 -74
  145. package/types/daffodil-design-radio.d.ts +183 -144
  146. package/types/daffodil-design-select.d.ts +207 -178
  147. package/types/daffodil-design-sidebar.d.ts +270 -253
  148. package/types/daffodil-design-spinner.d.ts +49 -36
  149. package/types/daffodil-design-switch.d.ts +77 -46
  150. package/types/daffodil-design-tabs.d.ts +248 -198
  151. package/types/daffodil-design-tag.d.ts +91 -56
  152. package/types/daffodil-design-testing.d.ts +1 -3
  153. package/types/daffodil-design-text-snippet.d.ts +48 -37
  154. package/types/daffodil-design-textarea.d.ts +88 -79
  155. package/types/daffodil-design-toast.d.ts +175 -183
  156. package/types/daffodil-design-tree.d.ts +186 -169
  157. package/types/daffodil-design-youtube-player.d.ts +56 -52
  158. package/types/daffodil-design.d.ts +614 -695
  159. package/button/src/button/raised/raised-theme.scss +0 -92
  160. package/button/src/button/underline/underline-theme.scss +0 -141
  161. package/fesm2022/daffodil-design-link-set.mjs +0 -160
  162. package/fesm2022/daffodil-design-link-set.mjs.map +0 -1
  163. package/fesm2022/daffodil-design-quantity-field.mjs +0 -364
  164. package/fesm2022/daffodil-design-quantity-field.mjs.map +0 -1
  165. package/link-set/README.md +0 -86
  166. package/quantity-field/README.md +0 -63
  167. package/scss/theming/_configure-theme.scss +0 -120
  168. package/scss/typography/mixins/_font-weight.scss +0 -14
  169. package/types/daffodil-design-link-set.d.ts +0 -72
  170. package/types/daffodil-design-quantity-field.d.ts +0 -171
@@ -1,75 +1,96 @@
1
- import * as i0 from '@angular/core';
2
- import { viewChild, TemplateRef, input, ChangeDetectionStrategy, Component, contentChild, ViewEncapsulation, signal, output, contentChildren, viewChildren } from '@angular/core';
3
- import * as i1 from '@daffodil/design';
4
- import { DaffDisableableDirective, DaffPrefixDirective, DaffSuffixDirective, DaffSelectableDirective } from '@daffodil/design';
5
- import * as i1$1 from '@angular/common';
6
- import { NgTemplateOutlet } from '@angular/common';
7
- import { RouterLink, RouterLinkActive } from '@angular/router';
8
-
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, TemplateRef, ViewEncapsulation, contentChild, contentChildren, input, output, signal, viewChild, viewChildren } from "@angular/core";
3
+ import * as i1$1 from "@daffodil/design";
4
+ import { DaffDisableableDirective, DaffPrefixDirective, DaffSelectableDirective, DaffSuffixDirective } from "@daffodil/design";
5
+ import * as i1 from "@angular/common";
6
+ import { NgTemplateOutlet } from "@angular/common";
7
+ import { RouterLink, RouterLinkActive } from "@angular/router";
9
8
  let tabId = 1;
10
- /**
11
- * Tab is a single tab in the tablist that is used to group the label of a tab panel and the tab panel together.
12
- *
13
- * A `<daff-tab>` should include the DaffTabLabelComponent and DaffTabPanelComponent components in order to properly structure the UI.
14
- *
15
- * @example
16
- * ```html
17
- * <daff-tab>
18
- * <daff-tab-label>
19
- * <fa-icon [icon]="faInfoCircle" daffPrefix></fa-icon>
20
- * Tab 1
21
- * </daff-tab-label>
22
- * <daff-tab-panel>
23
- * Tab 1 Panel
24
- * </daff-tab-panel>
25
- * </daff-tab>
26
- * ```
27
- */
28
- class DaffTabComponent {
29
- /**
30
- * @docs-private
31
- *
32
- * Whether the tab is disabled.
33
- */
34
- get disabled() {
35
- return this.disabledDirective.disabled();
36
- }
37
- constructor(disabledDirective) {
38
- this.disabledDirective = disabledDirective;
39
- /**
40
- * @docs-private
41
- */
42
- this.contentRef = viewChild('content', { ...(ngDevMode ? { debugName: "contentRef" } : /* istanbul ignore next */ {}), read: TemplateRef });
43
- /**
44
- * @docs-private
45
- */
46
- this.labelRef = viewChild('label', { ...(ngDevMode ? { debugName: "labelRef" } : /* istanbul ignore next */ {}), read: TemplateRef });
47
- /**
48
- * A unique id for the tab component. Defaults to an autogenerated value. When using this,
49
- * it's your responsibility to ensure that the id for each tab is unique.
50
- */
51
- this.id = input('daff-tab-' + tabId, ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
52
- /**
53
- * @docs-private
54
- */
55
- this.panelId = 'daff-tab-panel-' + tabId;
56
- tabId++;
57
- }
58
- /** @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 }); }
59
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.9", type: DaffTabComponent, isStandalone: true, selector: "daff-tab", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "contentRef", first: true, predicate: ["content"], descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "labelRef", first: true, predicate: ["label"], descendants: true, read: TemplateRef, isSignal: true }], hostDirectives: [{ directive: i1.DaffDisableableDirective, inputs: ["disabled", "disabled"] }], ngImport: i0, template: `
9
+ var DaffTabComponent = class DaffTabComponent {
10
+ get disabled() {
11
+ return this.disabledDirective.disabled();
12
+ }
13
+ constructor(disabledDirective) {
14
+ this.disabledDirective = disabledDirective;
15
+ this.contentRef = viewChild("content", {
16
+ ...ngDevMode ? { debugName: "contentRef" } : /* istanbul ignore next */ {},
17
+ read: TemplateRef
18
+ });
19
+ this.labelRef = viewChild("label", {
20
+ ...ngDevMode ? { debugName: "labelRef" } : /* istanbul ignore next */ {},
21
+ read: TemplateRef
22
+ });
23
+ this.id = input("daff-tab-" + tabId, ...ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []);
24
+ this.panelId = "daff-tab-panel-" + tabId;
25
+ tabId++;
26
+ }
27
+ static {
28
+ this.ɵfac = i0.ɵɵngDeclareFactory({
29
+ minVersion: "12.0.0",
30
+ version: "22.2.4",
31
+ ngImport: i0,
32
+ type: DaffTabComponent,
33
+ deps: [{ token: i1$1.DaffDisableableDirective }],
34
+ target: i0.ɵɵFactoryTarget.Component
35
+ });
36
+ }
37
+ static {
38
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
39
+ minVersion: "17.2.0",
40
+ version: "22.2.4",
41
+ type: DaffTabComponent,
42
+ isStandalone: true,
43
+ selector: "daff-tab",
44
+ inputs: { id: {
45
+ classPropertyName: "id",
46
+ publicName: "id",
47
+ isSignal: true,
48
+ isRequired: false,
49
+ transformFunction: null
50
+ } },
51
+ viewQueries: [{
52
+ propertyName: "contentRef",
53
+ first: true,
54
+ predicate: ["content"],
55
+ descendants: true,
56
+ read: TemplateRef,
57
+ isSignal: true
58
+ }, {
59
+ propertyName: "labelRef",
60
+ first: true,
61
+ predicate: ["label"],
62
+ descendants: true,
63
+ read: TemplateRef,
64
+ isSignal: true
65
+ }],
66
+ hostDirectives: [{
67
+ directive: i1$1.DaffDisableableDirective,
68
+ inputs: ["disabled", "disabled"]
69
+ }],
70
+ ngImport: i0,
71
+ template: `
60
72
  <ng-template #label>
61
73
  <ng-content select="daff-tab-label"></ng-content>
62
74
  </ng-template>
63
75
  <ng-template #content>
64
76
  <ng-content select="daff-tab-panel"></ng-content>
65
77
  </ng-template>
66
- `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
67
- }
68
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTabComponent, decorators: [{
69
- type: Component,
70
- args: [{
71
- selector: 'daff-tab',
72
- template: `
78
+ `,
79
+ isInline: true,
80
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
81
+ });
82
+ }
83
+ };
84
+ i0.ɵɵngDeclareClassMetadata({
85
+ minVersion: "12.0.0",
86
+ version: "22.2.4",
87
+ ngImport: i0,
88
+ type: DaffTabComponent,
89
+ decorators: [{
90
+ type: Component,
91
+ args: [{
92
+ selector: "daff-tab",
93
+ template: `
73
94
  <ng-template #label>
74
95
  <ng-content select="daff-tab-label"></ng-content>
75
96
  </ng-template>
@@ -77,368 +98,605 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
77
98
  <ng-content select="daff-tab-panel"></ng-content>
78
99
  </ng-template>
79
100
  `,
80
- changeDetection: ChangeDetectionStrategy.OnPush,
81
- hostDirectives: [
82
- {
83
- directive: DaffDisableableDirective,
84
- inputs: ['disabled'],
85
- },
86
- ],
87
- }]
88
- }], ctorParameters: () => [{ type: i1.DaffDisableableDirective }], propDecorators: { contentRef: [{ type: i0.ViewChild, args: ['content', { ...{ read: TemplateRef }, isSignal: true }] }], labelRef: [{ type: i0.ViewChild, args: ['label', { ...{ read: TemplateRef }, isSignal: true }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }] } });
89
-
90
- /**
91
- * Tab label is the clicakble label that activates its corresponding tab panel. Labels can contain text, icons, or both.
92
- *
93
- * @example
94
- * ```html
95
- * <daff-tab-label>
96
- * <div daffPrefix></div>
97
- * Label
98
- * <div daffSuffix></div
99
- * </daff-tab-Label>
100
- * ```
101
- */
102
- class DaffTabLabelComponent {
103
- constructor() {
104
- /**
105
- * @docs-private
106
- */
107
- this._prefix = contentChild(DaffPrefixDirective, ...(ngDevMode ? [{ debugName: "_prefix" }] : /* istanbul ignore next */ []));
108
- /**
109
- * @docs-private
110
- */
111
- this._suffix = contentChild(DaffSuffixDirective, ...(ngDevMode ? [{ debugName: "_suffix" }] : /* istanbul ignore next */ []));
112
- }
113
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTabLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
114
- /** @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, isSignal: true }, { propertyName: "_suffix", first: true, predicate: DaffSuffixDirective, descendants: true, isSignal: 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 }); }
115
- }
116
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTabLabelComponent, decorators: [{
117
- type: Component,
118
- args: [{ selector: 'daff-tab-label', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
119
- DaffPrefixDirective,
120
- DaffSuffixDirective,
121
- ], 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"] }]
122
- }], propDecorators: { _prefix: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DaffPrefixDirective), { isSignal: true }] }], _suffix: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DaffSuffixDirective), { isSignal: true }] }] } });
123
-
124
- /**
125
- * Tab panel is the content area displayed when a tab is active.
126
- *
127
- * @example
128
- * ```html
129
- * <daff-tab-panel>
130
- * <!-- Tab panel content goes here -->
131
- * </daff-tab-panel>
132
- * ```
133
- */
134
- class DaffTabPanelComponent {
135
- /**
136
- * @docs-private
137
- *
138
- * Dynamically binds the tab panel's id to a unique value generated from the associated tab's panelId.
139
- */
140
- get tabPanelId() {
141
- return this._id;
142
- }
143
- /**
144
- * @docs-private
145
- */
146
- get ariaLabelledBy() {
147
- return this._ariaLabelledBy;
148
- }
149
- constructor(tab) {
150
- this.tab = tab;
151
- this._id = '';
152
- this._ariaLabelledBy = '';
153
- /**
154
- * Sets the value of `ariaLabelledBy` to the id of the tab component.
155
- */
156
- this._ariaLabelledBy = this.tab.id();
157
- this._id = this.tab.panelId;
158
- }
159
- /** @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 }); }
160
- /** @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 }); }
161
- }
162
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTabPanelComponent, decorators: [{
163
- type: Component,
164
- args: [{ selector: 'daff-tab-panel', template: `<ng-content></ng-content>`, changeDetection: ChangeDetectionStrategy.OnPush, host: {
165
- class: 'daff-tab-panel',
166
- role: 'tabpanel',
167
- tabindex: '0',
168
- '[attr.id]': 'tabPanelId',
169
- '[attr.aria-labelledby]': 'ariaLabelledBy',
170
- }, styles: [":host(.daff-tab-panel){display:block;padding:1rem 0}\n"] }]
171
- }], ctorParameters: () => [{ type: DaffTabComponent }] });
172
-
173
- class DaffTabActivatorComponent {
174
- /**
175
- * @docs-private
176
- *
177
- * Sets `aria-selected` to true if the component is selected and false if it's not selected.
178
- */
179
- get ariaSelected() {
180
- return this.selectableDirective.selected ? true : false;
181
- }
182
- /**
183
- * @docs-private
184
- *
185
- * Sets `tabindex` to `0` if the component is selected and `-1` if it's not selected.
186
- */
187
- get tabIndex() {
188
- return this.selectableDirective.selected ? '0' : '-1';
189
- }
190
- constructor(el, selectableDirective) {
191
- this.el = el;
192
- this.selectableDirective = selectableDirective;
193
- /**
194
- * The html id of the tab activator component
195
- */
196
- this.tabActivatorId = input('', ...(ngDevMode ? [{ debugName: "tabActivatorId" }] : /* istanbul ignore next */ []));
197
- this.panelId = input('', ...(ngDevMode ? [{ debugName: "panelId" }] : /* istanbul ignore next */ []));
198
- }
199
- /**
200
- * Sets focus to the native element of the component.
201
- */
202
- focus() {
203
- this.el.nativeElement.focus();
204
- }
205
- /** @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 }); }
206
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: DaffTabActivatorComponent, isStandalone: true, selector: "button[daff-tab-activator],a[daff-tab-activator]", inputs: { tabActivatorId: { classPropertyName: "tabActivatorId", publicName: "tabActivatorId", isSignal: true, isRequired: false, transformFunction: null }, panelId: { classPropertyName: "panelId", publicName: "panelId", isSignal: true, isRequired: false, transformFunction: null } }, 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 }); }
207
- }
208
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTabActivatorComponent, decorators: [{
209
- type: Component,
210
- args: [{ selector: '' +
211
- 'button[daff-tab-activator]' + ',' +
212
- 'a[daff-tab-activator]', template: `<ng-content></ng-content>`, hostDirectives: [
213
- {
214
- directive: DaffSelectableDirective,
215
- inputs: ['selected'],
216
- },
217
- ], host: {
218
- class: 'daff-tab-activator',
219
- role: 'tab',
220
- '[attr.aria-selected]': 'ariaSelected',
221
- '[attr.tabindex]': 'tabIndex',
222
- '[attr.id]': 'tabActivatorId()',
223
- '[attr.aria-controls]': 'panelId()',
224
- }, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, 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"] }]
225
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.DaffSelectableDirective }], propDecorators: { tabActivatorId: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabActivatorId", required: false }] }], panelId: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelId", required: false }] }] } });
226
-
227
- /**
228
- * Tabs provide a way to navigate between panels that display related content without leaving the page.
229
- *
230
- * @example
231
- * ```html
232
- * <daff-tabs aria-label="List of tabs">
233
- * <daff-tab>
234
- * <daff-tab-label>
235
- * <fa-icon [icon]="faInfoCircle" daffPrefix></fa-icon>
236
- * Tab 1
237
- * </daff-tab-label>
238
- * <daff-tab-panel>
239
- * Tab 1 Panel
240
- * </daff-tab-panel>
241
- * </daff-tab>
242
- * <daff-tab>
243
- * <daff-tab-label>
244
- * Tab 2
245
- * <fa-icon [icon]="faInfoCircle" daffSuffix></fa-icon>
246
- * </daff-tab-label>
247
- * <daff-tab-panel>
248
- * Tab 2 Panel
249
- * </daff-tab-panel>
250
- * </daff-tab>
251
- * </daff-tabs>
252
- * ```
253
- */
254
- class DaffTabsComponent {
255
- /**
256
- * @docs-private
257
- */
258
- get currentPath() {
259
- return this.location.path();
260
- }
261
- constructor(cdRef, location) {
262
- this.cdRef = cdRef;
263
- this.location = location;
264
- /**
265
- * @docs-private
266
- *
267
- * The currently selected tab. This property is dynamically updated when a user selects a tab.
268
- */
269
- this.selectedTab = signal(undefined, ...(ngDevMode ? [{ debugName: "selectedTab" }] : /* istanbul ignore next */ []));
270
- /**
271
- * The tab that is selected on initial load. If it's not used, the first tab in the tablist will be selected by default.
272
- */
273
- this.initiallySelected = input(null, ...(ngDevMode ? [{ debugName: "initiallySelected" }] : /* istanbul ignore next */ []));
274
- /**
275
- * `aria-label` to label the tablist.
276
- */
277
- this.ariaLabel = input('', { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: 'aria-label' });
278
- /**
279
- * Replace the tab buttons as links.
280
- */
281
- this.linkMode = input(false, ...(ngDevMode ? [{ debugName: "linkMode" }] : /* istanbul ignore next */ []));
282
- /**
283
- * The URL to navigate to when the component is in link mode.
284
- * This component will set the specified query param.
285
- */
286
- this.url = input(...(ngDevMode ? [undefined, { debugName: "url" }] : /* istanbul ignore next */ []));
287
- /**
288
- * The query parameter that the tabs component will use to set the tab value in link mode.
289
- */
290
- this.queryParam = input('tab', ...(ngDevMode ? [{ debugName: "queryParam" }] : /* istanbul ignore next */ []));
291
- /**
292
- * Event emitted when tab selection changes.
293
- */
294
- this.tabChange = output();
295
- /**
296
- * @docs-private
297
- */
298
- this._labels = contentChildren(DaffTabLabelComponent, { ...(ngDevMode ? { debugName: "_labels" } : /* istanbul ignore next */ {}), descendants: true });
299
- /**
300
- * @docs-private
301
- */
302
- this._tabs = contentChildren(DaffTabComponent, ...(ngDevMode ? [{ debugName: "_tabs" }] : /* istanbul ignore next */ []));
303
- /**
304
- * @docs-private
305
- */
306
- this._tabActivators = viewChildren(DaffTabActivatorComponent, ...(ngDevMode ? [{ debugName: "_tabActivators" }] : /* istanbul ignore next */ []));
307
- }
308
- reset() {
309
- if (this.initiallySelected()) {
310
- this.selectedTab.set(this.initiallySelected());
311
- }
312
- if (!this.selectedTab()) {
313
- this.selectedTab.set(this._tabs()[0].id());
314
- }
315
- }
316
- /**
317
- * @docs-private
318
- */
319
- ngOnInit() {
320
- this.location.onUrlChange(() => {
321
- // if the app is navigated away from the current page, reset the state
322
- if (this.linkMode() && !this.location.isCurrentPathEqualTo(this.url(), `${this.queryParam()}=${this.selectedTab()}`)) {
323
- this.selectedTab.set(null);
324
- this.reset();
325
- this.tabChange.emit(this.selectedTab());
326
- }
327
- });
328
- }
329
- /**
330
- * @docs-private
331
- */
332
- ngAfterContentInit() {
333
- this.reset();
334
- }
335
- /**
336
- * @docs-private
337
- *
338
- * Selects a tab and sets focus on the selected tab.
339
- */
340
- select(tabId) {
341
- const tabActivator = this._tabActivators().find(el => el.tabActivatorId() === tabId);
342
- if (!tabActivator) {
343
- console.warn(`The tab '${tabId}' was not able to be selected because it does not exist. Check the id on your <daff-tab>s.`);
344
- return;
345
- }
346
- this.tabChange.emit(tabId);
347
- this.selectedTab.set(tabId);
348
- this.cdRef.markForCheck();
349
- tabActivator.focus();
350
- }
351
- /**
352
- * Navigates through the tabs based on the given offset.
353
- * Moves forward or backward in the tab array, wrapping around when necessary.
354
- */
355
- navigateTabs(offset) {
356
- const array = this._tabs();
357
- let selectedIndex = array.findIndex(el => el.id() === this.selectedTab());
358
- const startingIndex = selectedIndex;
359
- let newIndex;
360
- do {
361
- newIndex = (selectedIndex + offset + array.length) % array.length;
362
- selectedIndex = newIndex;
363
- } while (array[newIndex].disabled && selectedIndex !== startingIndex); // Skip disabled tabs
364
- this.select(array[newIndex].id());
365
- }
366
- /**
367
- * @docs-private
368
- */
369
- _buildQueryParams(tab) {
370
- return {
371
- [this.queryParam()]: tab,
372
- };
373
- }
374
- /**
375
- * @docs-private
376
- *
377
- * Selects the previous tab and wraps around to the last tab if the first tab is currently selected.
378
- */
379
- previous() {
380
- this.navigateTabs(-1);
381
- }
382
- /**
383
- * @docs-private
384
- *
385
- * Selects the next tab and wraps around to the first tab if the last tab is currently selected.
386
- */
387
- next() {
388
- this.navigateTabs(1);
389
- }
390
- /**
391
- * @docs-private
392
- *
393
- * Selects the first tab.
394
- */
395
- selectFirst(event) {
396
- event.preventDefault();
397
- this.select(this._tabs()[0].id());
398
- }
399
- /**
400
- * @docs-private
401
- *
402
- * Selects the last tab.
403
- */
404
- selectLast(event) {
405
- event.preventDefault();
406
- const array = this._tabs();
407
- this.select(array[array.length - 1].id());
408
- }
409
- /** @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 }); }
410
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: DaffTabsComponent, isStandalone: true, selector: "daff-tabs", inputs: { initiallySelected: { classPropertyName: "initiallySelected", publicName: "initiallySelected", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, linkMode: { classPropertyName: "linkMode", publicName: "linkMode", isSignal: true, isRequired: false, transformFunction: null }, url: { classPropertyName: "url", publicName: "url", isSignal: true, isRequired: false, transformFunction: null }, queryParam: { classPropertyName: "queryParam", publicName: "queryParam", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { tabChange: "tabChange" }, host: { properties: { "attr.aria-label": "null" }, classAttribute: "daff-tabs" }, queries: [{ propertyName: "_labels", predicate: DaffTabLabelComponent, descendants: true, isSignal: true }, { propertyName: "_tabs", predicate: DaffTabComponent, isSignal: true }], viewQueries: [{ propertyName: "_tabActivators", predicate: DaffTabActivatorComponent, descendants: true, isSignal: 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}\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 }); }
411
- }
412
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffTabsComponent, decorators: [{
413
- type: Component,
414
- args: [{ selector: 'daff-tabs', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
415
- class: 'daff-tabs',
416
- '[attr.aria-label]': 'null',
417
- }, imports: [
418
- NgTemplateOutlet,
419
- RouterLink,
420
- RouterLinkActive,
421
- DaffTabActivatorComponent,
422
- ], 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}\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"] }]
423
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$1.Location }], propDecorators: { initiallySelected: [{ type: i0.Input, args: [{ isSignal: true, alias: "initiallySelected", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], linkMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "linkMode", required: false }] }], url: [{ type: i0.Input, args: [{ isSignal: true, alias: "url", required: false }] }], queryParam: [{ type: i0.Input, args: [{ isSignal: true, alias: "queryParam", required: false }] }], tabChange: [{ type: i0.Output, args: ["tabChange"] }], _labels: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => DaffTabLabelComponent), { ...{ descendants: true }, isSignal: true }] }], _tabs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => DaffTabComponent), { isSignal: true }] }], _tabActivators: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => DaffTabActivatorComponent), { isSignal: true }] }] } });
424
-
425
- /**
426
- * @docs-private
427
- *
428
- * ```ts
429
- * import { DAFF_TABS_COMPONENTS } from '@daffodil/design/tabs';
430
- * ```
431
- */
101
+ changeDetection: ChangeDetectionStrategy.OnPush,
102
+ hostDirectives: [{
103
+ directive: DaffDisableableDirective,
104
+ inputs: ["disabled"]
105
+ }]
106
+ }]
107
+ }],
108
+ ctorParameters: () => [{ type: i1$1.DaffDisableableDirective }],
109
+ propDecorators: {
110
+ contentRef: [{
111
+ type: i0.ViewChild,
112
+ args: ["content", {
113
+ read: TemplateRef,
114
+ isSignal: true
115
+ }]
116
+ }],
117
+ labelRef: [{
118
+ type: i0.ViewChild,
119
+ args: ["label", {
120
+ read: TemplateRef,
121
+ isSignal: true
122
+ }]
123
+ }],
124
+ id: [{
125
+ type: i0.Input,
126
+ args: [{
127
+ isSignal: true,
128
+ alias: "id",
129
+ required: false
130
+ }]
131
+ }]
132
+ }
133
+ });
134
+ var DaffTabLabelComponent = class DaffTabLabelComponent {
135
+ constructor() {
136
+ this._prefix = contentChild(DaffPrefixDirective, ...ngDevMode ? [{ debugName: "_prefix" }] : /* istanbul ignore next */ []);
137
+ this._suffix = contentChild(DaffSuffixDirective, ...ngDevMode ? [{ debugName: "_suffix" }] : /* istanbul ignore next */ []);
138
+ }
139
+ static {
140
+ this.ɵfac = i0.ɵɵngDeclareFactory({
141
+ minVersion: "12.0.0",
142
+ version: "22.2.4",
143
+ ngImport: i0,
144
+ type: DaffTabLabelComponent,
145
+ deps: [],
146
+ target: i0.ɵɵFactoryTarget.Component
147
+ });
148
+ }
149
+ static {
150
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
151
+ minVersion: "17.0.0",
152
+ version: "22.2.4",
153
+ type: DaffTabLabelComponent,
154
+ isStandalone: true,
155
+ selector: "daff-tab-label",
156
+ queries: [{
157
+ propertyName: "_prefix",
158
+ first: true,
159
+ predicate: DaffPrefixDirective,
160
+ descendants: true,
161
+ isSignal: true
162
+ }, {
163
+ propertyName: "_suffix",
164
+ first: true,
165
+ predicate: DaffSuffixDirective,
166
+ descendants: true,
167
+ isSignal: true
168
+ }],
169
+ ngImport: i0,
170
+ 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}",
171
+ 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"],
172
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
173
+ });
174
+ }
175
+ };
176
+ i0.ɵɵngDeclareClassMetadata({
177
+ minVersion: "12.0.0",
178
+ version: "22.2.4",
179
+ ngImport: i0,
180
+ type: DaffTabLabelComponent,
181
+ decorators: [{
182
+ type: Component,
183
+ args: [{
184
+ selector: "daff-tab-label",
185
+ changeDetection: ChangeDetectionStrategy.OnPush,
186
+ imports: [DaffPrefixDirective, DaffSuffixDirective],
187
+ 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}",
188
+ 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"]
189
+ }]
190
+ }],
191
+ propDecorators: {
192
+ _prefix: [{
193
+ type: i0.ContentChild,
194
+ args: [i0.forwardRef(() => DaffPrefixDirective), { isSignal: true }]
195
+ }],
196
+ _suffix: [{
197
+ type: i0.ContentChild,
198
+ args: [i0.forwardRef(() => DaffSuffixDirective), { isSignal: true }]
199
+ }]
200
+ }
201
+ });
202
+ var DaffTabPanelComponent = class DaffTabPanelComponent {
203
+ get tabPanelId() {
204
+ return this._id;
205
+ }
206
+ get ariaLabelledBy() {
207
+ return this._ariaLabelledBy;
208
+ }
209
+ constructor(tab) {
210
+ this.tab = tab;
211
+ this._id = "";
212
+ this._ariaLabelledBy = "";
213
+ this._ariaLabelledBy = this.tab.id();
214
+ this._id = this.tab.panelId;
215
+ }
216
+ static {
217
+ this.ɵfac = i0.ɵɵngDeclareFactory({
218
+ minVersion: "12.0.0",
219
+ version: "22.2.4",
220
+ ngImport: i0,
221
+ type: DaffTabPanelComponent,
222
+ deps: [{ token: DaffTabComponent }],
223
+ target: i0.ɵɵFactoryTarget.Component
224
+ });
225
+ }
226
+ static {
227
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
228
+ minVersion: "14.0.0",
229
+ version: "22.2.4",
230
+ type: DaffTabPanelComponent,
231
+ isStandalone: true,
232
+ selector: "daff-tab-panel",
233
+ host: {
234
+ attributes: {
235
+ "role": "tabpanel",
236
+ "tabindex": "0"
237
+ },
238
+ properties: {
239
+ "attr.id": "tabPanelId",
240
+ "attr.aria-labelledby": "ariaLabelledBy"
241
+ },
242
+ classAttribute: "daff-tab-panel"
243
+ },
244
+ ngImport: i0,
245
+ template: `<ng-content></ng-content>`,
246
+ isInline: true,
247
+ styles: [":host(.daff-tab-panel){display:block;padding:1rem 0}\n"],
248
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
249
+ });
250
+ }
251
+ };
252
+ i0.ɵɵngDeclareClassMetadata({
253
+ minVersion: "12.0.0",
254
+ version: "22.2.4",
255
+ ngImport: i0,
256
+ type: DaffTabPanelComponent,
257
+ decorators: [{
258
+ type: Component,
259
+ args: [{
260
+ selector: "daff-tab-panel",
261
+ template: `<ng-content></ng-content>`,
262
+ changeDetection: ChangeDetectionStrategy.OnPush,
263
+ host: {
264
+ class: "daff-tab-panel",
265
+ role: "tabpanel",
266
+ tabindex: "0",
267
+ "[attr.id]": "tabPanelId",
268
+ "[attr.aria-labelledby]": "ariaLabelledBy"
269
+ },
270
+ styles: [":host(.daff-tab-panel){display:block;padding:1rem 0}\n"]
271
+ }]
272
+ }],
273
+ ctorParameters: () => [{ type: DaffTabComponent }]
274
+ });
275
+ var DaffTabActivatorComponent = class DaffTabActivatorComponent {
276
+ get ariaSelected() {
277
+ return this.selectableDirective.selected ? true : false;
278
+ }
279
+ get tabIndex() {
280
+ return this.selectableDirective.selected ? "0" : "-1";
281
+ }
282
+ constructor(el, selectableDirective) {
283
+ this.el = el;
284
+ this.selectableDirective = selectableDirective;
285
+ this.tabActivatorId = input("", ...ngDevMode ? [{ debugName: "tabActivatorId" }] : /* istanbul ignore next */ []);
286
+ this.panelId = input("", ...ngDevMode ? [{ debugName: "panelId" }] : /* istanbul ignore next */ []);
287
+ }
288
+ focus() {
289
+ this.el.nativeElement.focus();
290
+ }
291
+ static {
292
+ this.ɵfac = i0.ɵɵngDeclareFactory({
293
+ minVersion: "12.0.0",
294
+ version: "22.2.4",
295
+ ngImport: i0,
296
+ type: DaffTabActivatorComponent,
297
+ deps: [{ token: i0.ElementRef }, { token: i1$1.DaffSelectableDirective }],
298
+ target: i0.ɵɵFactoryTarget.Component
299
+ });
300
+ }
301
+ static {
302
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
303
+ minVersion: "17.1.0",
304
+ version: "22.2.4",
305
+ type: DaffTabActivatorComponent,
306
+ isStandalone: true,
307
+ selector: "button[daff-tab-activator],a[daff-tab-activator]",
308
+ inputs: {
309
+ tabActivatorId: {
310
+ classPropertyName: "tabActivatorId",
311
+ publicName: "tabActivatorId",
312
+ isSignal: true,
313
+ isRequired: false,
314
+ transformFunction: null
315
+ },
316
+ panelId: {
317
+ classPropertyName: "panelId",
318
+ publicName: "panelId",
319
+ isSignal: true,
320
+ isRequired: false,
321
+ transformFunction: null
322
+ }
323
+ },
324
+ host: {
325
+ attributes: { "role": "tab" },
326
+ properties: {
327
+ "attr.aria-selected": "ariaSelected",
328
+ "attr.tabindex": "tabIndex",
329
+ "attr.id": "tabActivatorId()",
330
+ "attr.aria-controls": "panelId()"
331
+ },
332
+ classAttribute: "daff-tab-activator"
333
+ },
334
+ hostDirectives: [{
335
+ directive: i1$1.DaffSelectableDirective,
336
+ inputs: ["selected", "selected"]
337
+ }],
338
+ ngImport: i0,
339
+ template: `<ng-content></ng-content>`,
340
+ isInline: true,
341
+ 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"],
342
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
343
+ encapsulation: i0.ViewEncapsulation.None
344
+ });
345
+ }
346
+ };
347
+ i0.ɵɵngDeclareClassMetadata({
348
+ minVersion: "12.0.0",
349
+ version: "22.2.4",
350
+ ngImport: i0,
351
+ type: DaffTabActivatorComponent,
352
+ decorators: [{
353
+ type: Component,
354
+ args: [{
355
+ selector: "button[daff-tab-activator],a[daff-tab-activator]",
356
+ template: `<ng-content></ng-content>`,
357
+ hostDirectives: [{
358
+ directive: DaffSelectableDirective,
359
+ inputs: ["selected"]
360
+ }],
361
+ host: {
362
+ class: "daff-tab-activator",
363
+ role: "tab",
364
+ "[attr.aria-selected]": "ariaSelected",
365
+ "[attr.tabindex]": "tabIndex",
366
+ "[attr.id]": "tabActivatorId()",
367
+ "[attr.aria-controls]": "panelId()"
368
+ },
369
+ changeDetection: ChangeDetectionStrategy.OnPush,
370
+ encapsulation: ViewEncapsulation.None,
371
+ 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"]
372
+ }]
373
+ }],
374
+ ctorParameters: () => [{ type: i0.ElementRef }, { type: i1$1.DaffSelectableDirective }],
375
+ propDecorators: {
376
+ tabActivatorId: [{
377
+ type: i0.Input,
378
+ args: [{
379
+ isSignal: true,
380
+ alias: "tabActivatorId",
381
+ required: false
382
+ }]
383
+ }],
384
+ panelId: [{
385
+ type: i0.Input,
386
+ args: [{
387
+ isSignal: true,
388
+ alias: "panelId",
389
+ required: false
390
+ }]
391
+ }]
392
+ }
393
+ });
394
+ var DaffTabsComponent = class DaffTabsComponent {
395
+ get currentPath() {
396
+ return this.location.path();
397
+ }
398
+ constructor(cdRef, location) {
399
+ this.cdRef = cdRef;
400
+ this.location = location;
401
+ this.selectedTab = signal(void 0, ...ngDevMode ? [{ debugName: "selectedTab" }] : /* istanbul ignore next */ []);
402
+ this.initiallySelected = input(null, ...ngDevMode ? [{ debugName: "initiallySelected" }] : /* istanbul ignore next */ []);
403
+ this.ariaLabel = input("", {
404
+ ...ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {},
405
+ alias: "aria-label"
406
+ });
407
+ this.linkMode = input(false, ...ngDevMode ? [{ debugName: "linkMode" }] : /* istanbul ignore next */ []);
408
+ this.url = input(...ngDevMode ? [void 0, { debugName: "url" }] : /* istanbul ignore next */ []);
409
+ this.queryParam = input("tab", ...ngDevMode ? [{ debugName: "queryParam" }] : /* istanbul ignore next */ []);
410
+ this.tabChange = output();
411
+ this._labels = contentChildren(DaffTabLabelComponent, {
412
+ ...ngDevMode ? { debugName: "_labels" } : /* istanbul ignore next */ {},
413
+ descendants: true
414
+ });
415
+ this._tabs = contentChildren(DaffTabComponent, ...ngDevMode ? [{ debugName: "_tabs" }] : /* istanbul ignore next */ []);
416
+ this._tabActivators = viewChildren(DaffTabActivatorComponent, ...ngDevMode ? [{ debugName: "_tabActivators" }] : /* istanbul ignore next */ []);
417
+ }
418
+ reset() {
419
+ if (this.initiallySelected()) this.selectedTab.set(this.initiallySelected());
420
+ if (!this.selectedTab()) this.selectedTab.set(this._tabs()[0].id());
421
+ }
422
+ ngOnInit() {
423
+ this.location.onUrlChange(() => {
424
+ if (this.linkMode() && !this.location.isCurrentPathEqualTo(this.url(), `${this.queryParam()}=${this.selectedTab()}`)) {
425
+ this.selectedTab.set(null);
426
+ this.reset();
427
+ this.tabChange.emit(this.selectedTab());
428
+ }
429
+ });
430
+ }
431
+ ngAfterContentInit() {
432
+ this.reset();
433
+ }
434
+ select(tabId) {
435
+ const tabActivator = this._tabActivators().find((el) => el.tabActivatorId() === tabId);
436
+ if (!tabActivator) {
437
+ console.warn(`The tab '${tabId}' was not able to be selected because it does not exist. Check the id on your <daff-tab>s.`);
438
+ return;
439
+ }
440
+ this.tabChange.emit(tabId);
441
+ this.selectedTab.set(tabId);
442
+ this.cdRef.markForCheck();
443
+ tabActivator.focus();
444
+ }
445
+ navigateTabs(offset) {
446
+ const array = this._tabs();
447
+ let selectedIndex = array.findIndex((el) => el.id() === this.selectedTab());
448
+ const startingIndex = selectedIndex;
449
+ let newIndex;
450
+ do {
451
+ newIndex = (selectedIndex + offset + array.length) % array.length;
452
+ selectedIndex = newIndex;
453
+ } while (array[newIndex].disabled && selectedIndex !== startingIndex);
454
+ this.select(array[newIndex].id());
455
+ }
456
+ _buildQueryParams(tab) {
457
+ return { [this.queryParam()]: tab };
458
+ }
459
+ previous() {
460
+ this.navigateTabs(-1);
461
+ }
462
+ next() {
463
+ this.navigateTabs(1);
464
+ }
465
+ selectFirst(event) {
466
+ event.preventDefault();
467
+ this.select(this._tabs()[0].id());
468
+ }
469
+ selectLast(event) {
470
+ event.preventDefault();
471
+ const array = this._tabs();
472
+ this.select(array[array.length - 1].id());
473
+ }
474
+ static {
475
+ this.ɵfac = i0.ɵɵngDeclareFactory({
476
+ minVersion: "12.0.0",
477
+ version: "22.2.4",
478
+ ngImport: i0,
479
+ type: DaffTabsComponent,
480
+ deps: [{ token: i0.ChangeDetectorRef }, { token: i1.Location }],
481
+ target: i0.ɵɵFactoryTarget.Component
482
+ });
483
+ }
484
+ static {
485
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
486
+ minVersion: "17.0.0",
487
+ version: "22.2.4",
488
+ type: DaffTabsComponent,
489
+ isStandalone: true,
490
+ selector: "daff-tabs",
491
+ inputs: {
492
+ initiallySelected: {
493
+ classPropertyName: "initiallySelected",
494
+ publicName: "initiallySelected",
495
+ isSignal: true,
496
+ isRequired: false,
497
+ transformFunction: null
498
+ },
499
+ ariaLabel: {
500
+ classPropertyName: "ariaLabel",
501
+ publicName: "aria-label",
502
+ isSignal: true,
503
+ isRequired: false,
504
+ transformFunction: null
505
+ },
506
+ linkMode: {
507
+ classPropertyName: "linkMode",
508
+ publicName: "linkMode",
509
+ isSignal: true,
510
+ isRequired: false,
511
+ transformFunction: null
512
+ },
513
+ url: {
514
+ classPropertyName: "url",
515
+ publicName: "url",
516
+ isSignal: true,
517
+ isRequired: false,
518
+ transformFunction: null
519
+ },
520
+ queryParam: {
521
+ classPropertyName: "queryParam",
522
+ publicName: "queryParam",
523
+ isSignal: true,
524
+ isRequired: false,
525
+ transformFunction: null
526
+ }
527
+ },
528
+ outputs: { tabChange: "tabChange" },
529
+ host: {
530
+ properties: { "attr.aria-label": "null" },
531
+ classAttribute: "daff-tabs"
532
+ },
533
+ queries: [{
534
+ propertyName: "_labels",
535
+ predicate: DaffTabLabelComponent,
536
+ descendants: true,
537
+ isSignal: true
538
+ }, {
539
+ propertyName: "_tabs",
540
+ predicate: DaffTabComponent,
541
+ isSignal: true
542
+ }],
543
+ viewQueries: [{
544
+ propertyName: "_tabActivators",
545
+ predicate: DaffTabActivatorComponent,
546
+ descendants: true,
547
+ isSignal: true
548
+ }],
549
+ ngImport: i0,
550
+ template: "<div class=\"daff-tabs__tab-list\"\n role=\"tablist\"\n [attr.aria-label]=\"ariaLabel()\"\n (keydown.home)=\"selectFirst($event)\"\n (keydown.end)=\"selectLast($event)\">\n @for (tab of _tabs(); track tab) {\n @if (linkMode() && tab.disabled) {\n <button daff-tab-activator routerLinkActive\n [selected]=\"tab.id() === selectedTab()\"\n [panelId]=\"tab.panelId\"\n [disabled]=\"tab.disabled\"\n [tabActivatorId]=\"tab.id()\"\n (keydown.arrowright)=\"next()\"\n (keydown.arrowleft)=\"previous()\">\n <ng-container *ngTemplateOutlet=\"tab.labelRef()\"></ng-container>\n </button>\n } @else if (linkMode()) {\n <a daff-tab-activator routerLinkActive\n class=\"daff-ae daff_tabs__link\"\n [selected]=\"tab.id() === selectedTab()\"\n [routerLink]=\"url() || currentPath\"\n queryParamsHandling=\"merge\"\n [queryParams]=\"_buildQueryParams(tab.id())\"\n [panelId]=\"tab.panelId\"\n [tabActivatorId]=\"tab.id()\"\n (keydown.arrowright)=\"next()\"\n (keydown.arrowleft)=\"previous()\"\n (isActiveChange)=\"$event && select(tab.id())\">\n <ng-container *ngTemplateOutlet=\"tab.labelRef()\"></ng-container>\n </a>\n } @else {\n <button daff-tab-activator\n [selected]=\"tab.id() === selectedTab()\"\n (click)=\"select(tab.id())\"\n [panelId]=\"tab.panelId\"\n [disabled]=\"tab.disabled\"\n [tabActivatorId]=\"tab.id()\"\n (keydown.arrowright)=\"next()\"\n (keydown.arrowleft)=\"previous()\">\n <ng-container *ngTemplateOutlet=\"tab.labelRef()\"></ng-container>\n </button>\n }\n }\n</div>\n\n@for (tab of _tabs(); track tab) {\n @if(tab.id() === selectedTab() ) {\n <ng-container *ngTemplateOutlet=\"tab.contentRef()\"></ng-container>\n }\n}\n",
551
+ 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"],
552
+ dependencies: [
553
+ {
554
+ kind: "directive",
555
+ type: NgTemplateOutlet,
556
+ selector: "[ngTemplateOutlet]",
557
+ inputs: [
558
+ "ngTemplateOutletContext",
559
+ "ngTemplateOutlet",
560
+ "ngTemplateOutletInjector"
561
+ ]
562
+ },
563
+ {
564
+ kind: "directive",
565
+ type: RouterLink,
566
+ selector: "[routerLink]",
567
+ inputs: [
568
+ "target",
569
+ "queryParams",
570
+ "fragment",
571
+ "queryParamsHandling",
572
+ "state",
573
+ "info",
574
+ "relativeTo",
575
+ "preserveFragment",
576
+ "skipLocationChange",
577
+ "replaceUrl",
578
+ "browserUrl",
579
+ "routerLink"
580
+ ]
581
+ },
582
+ {
583
+ kind: "directive",
584
+ type: RouterLinkActive,
585
+ selector: "[routerLinkActive]",
586
+ inputs: [
587
+ "routerLinkActiveOptions",
588
+ "ariaCurrentWhenActive",
589
+ "routerLinkActive"
590
+ ],
591
+ outputs: ["isActiveChange"],
592
+ exportAs: ["routerLinkActive"]
593
+ },
594
+ {
595
+ kind: "component",
596
+ type: DaffTabActivatorComponent,
597
+ selector: "button[daff-tab-activator],a[daff-tab-activator]",
598
+ inputs: ["tabActivatorId", "panelId"]
599
+ }
600
+ ],
601
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
602
+ encapsulation: i0.ViewEncapsulation.None
603
+ });
604
+ }
605
+ };
606
+ i0.ɵɵngDeclareClassMetadata({
607
+ minVersion: "12.0.0",
608
+ version: "22.2.4",
609
+ ngImport: i0,
610
+ type: DaffTabsComponent,
611
+ decorators: [{
612
+ type: Component,
613
+ args: [{
614
+ selector: "daff-tabs",
615
+ encapsulation: ViewEncapsulation.None,
616
+ changeDetection: ChangeDetectionStrategy.OnPush,
617
+ host: {
618
+ class: "daff-tabs",
619
+ "[attr.aria-label]": "null"
620
+ },
621
+ imports: [
622
+ NgTemplateOutlet,
623
+ RouterLink,
624
+ RouterLinkActive,
625
+ DaffTabActivatorComponent
626
+ ],
627
+ template: "<div class=\"daff-tabs__tab-list\"\n role=\"tablist\"\n [attr.aria-label]=\"ariaLabel()\"\n (keydown.home)=\"selectFirst($event)\"\n (keydown.end)=\"selectLast($event)\">\n @for (tab of _tabs(); track tab) {\n @if (linkMode() && tab.disabled) {\n <button daff-tab-activator routerLinkActive\n [selected]=\"tab.id() === selectedTab()\"\n [panelId]=\"tab.panelId\"\n [disabled]=\"tab.disabled\"\n [tabActivatorId]=\"tab.id()\"\n (keydown.arrowright)=\"next()\"\n (keydown.arrowleft)=\"previous()\">\n <ng-container *ngTemplateOutlet=\"tab.labelRef()\"></ng-container>\n </button>\n } @else if (linkMode()) {\n <a daff-tab-activator routerLinkActive\n class=\"daff-ae daff_tabs__link\"\n [selected]=\"tab.id() === selectedTab()\"\n [routerLink]=\"url() || currentPath\"\n queryParamsHandling=\"merge\"\n [queryParams]=\"_buildQueryParams(tab.id())\"\n [panelId]=\"tab.panelId\"\n [tabActivatorId]=\"tab.id()\"\n (keydown.arrowright)=\"next()\"\n (keydown.arrowleft)=\"previous()\"\n (isActiveChange)=\"$event && select(tab.id())\">\n <ng-container *ngTemplateOutlet=\"tab.labelRef()\"></ng-container>\n </a>\n } @else {\n <button daff-tab-activator\n [selected]=\"tab.id() === selectedTab()\"\n (click)=\"select(tab.id())\"\n [panelId]=\"tab.panelId\"\n [disabled]=\"tab.disabled\"\n [tabActivatorId]=\"tab.id()\"\n (keydown.arrowright)=\"next()\"\n (keydown.arrowleft)=\"previous()\">\n <ng-container *ngTemplateOutlet=\"tab.labelRef()\"></ng-container>\n </button>\n }\n }\n</div>\n\n@for (tab of _tabs(); track tab) {\n @if(tab.id() === selectedTab() ) {\n <ng-container *ngTemplateOutlet=\"tab.contentRef()\"></ng-container>\n }\n}\n",
628
+ 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"]
629
+ }]
630
+ }],
631
+ ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1.Location }],
632
+ propDecorators: {
633
+ initiallySelected: [{
634
+ type: i0.Input,
635
+ args: [{
636
+ isSignal: true,
637
+ alias: "initiallySelected",
638
+ required: false
639
+ }]
640
+ }],
641
+ ariaLabel: [{
642
+ type: i0.Input,
643
+ args: [{
644
+ isSignal: true,
645
+ alias: "aria-label",
646
+ required: false
647
+ }]
648
+ }],
649
+ linkMode: [{
650
+ type: i0.Input,
651
+ args: [{
652
+ isSignal: true,
653
+ alias: "linkMode",
654
+ required: false
655
+ }]
656
+ }],
657
+ url: [{
658
+ type: i0.Input,
659
+ args: [{
660
+ isSignal: true,
661
+ alias: "url",
662
+ required: false
663
+ }]
664
+ }],
665
+ queryParam: [{
666
+ type: i0.Input,
667
+ args: [{
668
+ isSignal: true,
669
+ alias: "queryParam",
670
+ required: false
671
+ }]
672
+ }],
673
+ tabChange: [{
674
+ type: i0.Output,
675
+ args: ["tabChange"]
676
+ }],
677
+ _labels: [{
678
+ type: i0.ContentChildren,
679
+ args: [i0.forwardRef(() => DaffTabLabelComponent), {
680
+ descendants: true,
681
+ isSignal: true
682
+ }]
683
+ }],
684
+ _tabs: [{
685
+ type: i0.ContentChildren,
686
+ args: [i0.forwardRef(() => DaffTabComponent), { isSignal: true }]
687
+ }],
688
+ _tabActivators: [{
689
+ type: i0.ViewChildren,
690
+ args: [i0.forwardRef(() => DaffTabActivatorComponent), { isSignal: true }]
691
+ }]
692
+ }
693
+ });
432
694
  const DAFF_TABS_COMPONENTS = [
433
- DaffTabsComponent,
434
- DaffTabLabelComponent,
435
- DaffTabPanelComponent,
436
- DaffTabComponent,
695
+ DaffTabsComponent,
696
+ DaffTabLabelComponent,
697
+ DaffTabPanelComponent,
698
+ DaffTabComponent
437
699
  ];
438
-
439
- /**
440
- * Generated bundle index. Do not edit.
441
- */
442
-
443
700
  export { DAFF_TABS_COMPONENTS, DaffTabComponent, DaffTabLabelComponent, DaffTabPanelComponent, DaffTabsComponent };
444
- //# sourceMappingURL=daffodil-design-tabs.mjs.map
701
+
702
+ //# sourceMappingURL=daffodil-design-tabs.mjs.map