@ks-digital/designsystem-angular 0.0.1-alpha.33 → 0.0.1-alpha.37

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 (50) hide show
  1. package/fesm2022/ks-digital-designsystem-angular-__internals.mjs +77 -13
  2. package/fesm2022/ks-digital-designsystem-angular-__internals.mjs.map +1 -1
  3. package/fesm2022/ks-digital-designsystem-angular-alert.mjs +11 -12
  4. package/fesm2022/ks-digital-designsystem-angular-alert.mjs.map +1 -1
  5. package/fesm2022/ks-digital-designsystem-angular-button.mjs +17 -12
  6. package/fesm2022/ks-digital-designsystem-angular-button.mjs.map +1 -1
  7. package/fesm2022/ks-digital-designsystem-angular-card.mjs +13 -9
  8. package/fesm2022/ks-digital-designsystem-angular-card.mjs.map +1 -1
  9. package/fesm2022/ks-digital-designsystem-angular-chip.mjs +11 -7
  10. package/fesm2022/ks-digital-designsystem-angular-chip.mjs.map +1 -1
  11. package/fesm2022/ks-digital-designsystem-angular-details.mjs +22 -27
  12. package/fesm2022/ks-digital-designsystem-angular-details.mjs.map +1 -1
  13. package/fesm2022/ks-digital-designsystem-angular-forms.mjs +60 -46
  14. package/fesm2022/ks-digital-designsystem-angular-forms.mjs.map +1 -1
  15. package/fesm2022/ks-digital-designsystem-angular-link.mjs +31 -0
  16. package/fesm2022/ks-digital-designsystem-angular-link.mjs.map +1 -0
  17. package/fesm2022/ks-digital-designsystem-angular-pagination.mjs +36 -0
  18. package/fesm2022/ks-digital-designsystem-angular-pagination.mjs.map +1 -0
  19. package/fesm2022/ks-digital-designsystem-angular-paragraph.mjs +3 -3
  20. package/fesm2022/ks-digital-designsystem-angular-popover.mjs +20 -18
  21. package/fesm2022/ks-digital-designsystem-angular-popover.mjs.map +1 -1
  22. package/fesm2022/ks-digital-designsystem-angular-search.mjs +21 -17
  23. package/fesm2022/ks-digital-designsystem-angular-search.mjs.map +1 -1
  24. package/fesm2022/ks-digital-designsystem-angular-spinner.mjs +19 -20
  25. package/fesm2022/ks-digital-designsystem-angular-spinner.mjs.map +1 -1
  26. package/fesm2022/ks-digital-designsystem-angular-tabs.mjs +26 -18
  27. package/fesm2022/ks-digital-designsystem-angular-tabs.mjs.map +1 -1
  28. package/fesm2022/ks-digital-designsystem-angular-validation-message.mjs +3 -3
  29. package/link/README.md +3 -0
  30. package/package.json +26 -18
  31. package/pagination/README.md +3 -0
  32. package/types/ks-digital-designsystem-angular-__internals.d.ts +69 -0
  33. package/{alert/index.d.ts → types/ks-digital-designsystem-angular-alert.d.ts} +1 -5
  34. package/{button/index.d.ts → types/ks-digital-designsystem-angular-button.d.ts} +1 -1
  35. package/{card/index.d.ts → types/ks-digital-designsystem-angular-card.d.ts} +1 -1
  36. package/{chip/index.d.ts → types/ks-digital-designsystem-angular-chip.d.ts} +1 -1
  37. package/types/ks-digital-designsystem-angular-details.d.ts +25 -0
  38. package/{forms/index.d.ts → types/ks-digital-designsystem-angular-forms.d.ts} +5 -4
  39. package/types/ks-digital-designsystem-angular-link.d.ts +9 -0
  40. package/types/ks-digital-designsystem-angular-pagination.d.ts +9 -0
  41. package/{popover/index.d.ts → types/ks-digital-designsystem-angular-popover.d.ts} +2 -4
  42. package/{search/index.d.ts → types/ks-digital-designsystem-angular-search.d.ts} +1 -1
  43. package/types/ks-digital-designsystem-angular-spinner.d.ts +25 -0
  44. package/{tabs/index.d.ts → types/ks-digital-designsystem-angular-tabs.d.ts} +2 -2
  45. package/__internals/index.d.ts +0 -28
  46. package/details/index.d.ts +0 -26
  47. package/spinner/index.d.ts +0 -25
  48. /package/{paragraph/index.d.ts → types/ks-digital-designsystem-angular-paragraph.d.ts} +0 -0
  49. /package/{validation-message/index.d.ts → types/ks-digital-designsystem-angular-validation-message.d.ts} +0 -0
  50. /package/{index.d.ts → types/ks-digital-designsystem-angular.d.ts} +0 -0
@@ -1,15 +1,16 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { input, booleanAttribute, output, signal, computed, viewChild, effect, Component } from '@angular/core';
3
3
  import { autoUpdate, computePosition, offset, flip, shift } from '@floating-ui/dom';
4
+ import * as i1 from '@ks-digital/designsystem-angular/__internals';
5
+ import { HostSize, HostColor } from '@ks-digital/designsystem-angular/__internals';
4
6
 
5
- /* eslint-disable @angular-eslint/no-input-rename */
6
7
  class Popover {
7
8
  // use popoverId instead of id since id will be put on the angular element and not the popover-div
8
9
  popoverId = input.required(...(ngDevMode ? [{ debugName: "popoverId" }] : []));
9
10
  placement = input('top', ...(ngDevMode ? [{ debugName: "placement" }] : []));
10
- autoPlacement = input(true, ...(ngDevMode ? [{ debugName: "autoPlacement", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
11
+ autoPlacement = input(true, { ...(ngDevMode ? { debugName: "autoPlacement" } : {}), transform: booleanAttribute });
11
12
  // for controlled component
12
- open = input(undefined, ...(ngDevMode ? [{ debugName: "open", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
13
+ open = input(undefined, { ...(ngDevMode ? { debugName: "open" } : {}), transform: booleanAttribute });
13
14
  /*
14
15
  the naming here is different from Designsystemet
15
16
  since we need to use outputs for onOpen and onClose
@@ -19,10 +20,6 @@ class Popover {
19
20
  internalOpen = signal(false, ...(ngDevMode ? [{ debugName: "internalOpen" }] : []));
20
21
  controlledOpen = computed(() => this.open() ?? this.internalOpen(), ...(ngDevMode ? [{ debugName: "controlledOpen" }] : []));
21
22
  variant = input('default', ...(ngDevMode ? [{ debugName: "variant" }] : []));
22
- dataSize = input('md', ...(ngDevMode ? [{ debugName: "dataSize", alias: 'data-size' }] : [{ alias: 'data-size' }]));
23
- dataColor = input('neutral', ...(ngDevMode ? [{ debugName: "dataColor", alias: 'data-color' }] : [{
24
- alias: 'data-color',
25
- }]));
26
23
  popoverRef = viewChild('myPopover', ...(ngDevMode ? [{ debugName: "popoverRef" }] : []));
27
24
  // enable controlled component
28
25
  controlledComponent = effect((onCleanup) => {
@@ -55,7 +52,7 @@ class Popover {
55
52
  document.removeEventListener('click', handleClick, true);
56
53
  document.removeEventListener('keydown', handleKeydown);
57
54
  });
58
- }, ...(ngDevMode ? [{ debugName: "controlledComponent" }] : [{}]));
55
+ }, { ...(ngDevMode ? { debugName: "controlledComponent" } : {}) });
59
56
  positionPopover = effect(() => {
60
57
  const popover = this.popoverRef()?.nativeElement;
61
58
  const trigger = document.querySelector(`[popovertarget="${this.popoverId()}"]`);
@@ -81,7 +78,7 @@ class Popover {
81
78
  });
82
79
  });
83
80
  }
84
- }, ...(ngDevMode ? [{ debugName: "positionPopover" }] : [{}]));
81
+ }, { ...(ngDevMode ? { debugName: "positionPopover" } : {}) });
85
82
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
86
83
  arrowPseudoElement = {
87
84
  name: 'ArrowPseudoElement',
@@ -115,16 +112,14 @@ class Popover {
115
112
  return data;
116
113
  },
117
114
  };
118
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Popover, deps: [], target: i0.ɵɵFactoryTarget.Component });
119
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: Popover, isStandalone: true, selector: "ksd-popover", inputs: { popoverId: { classPropertyName: "popoverId", publicName: "popoverId", isSignal: true, isRequired: true, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, autoPlacement: { classPropertyName: "autoPlacement", publicName: "autoPlacement", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, dataSize: { classPropertyName: "dataSize", publicName: "data-size", isSignal: true, isRequired: false, transformFunction: null }, dataColor: { classPropertyName: "dataColor", publicName: "data-color", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { triggeredClose: "triggeredClose", triggeredOpen: "triggeredOpen" }, viewQueries: [{ propertyName: "popoverRef", first: true, predicate: ["myPopover"], descendants: true, isSignal: true }], ngImport: i0, template: `
115
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: Popover, deps: [], target: i0.ɵɵFactoryTarget.Component });
116
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: Popover, isStandalone: true, selector: "ksd-popover", inputs: { popoverId: { classPropertyName: "popoverId", publicName: "popoverId", isSignal: true, isRequired: true, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, autoPlacement: { classPropertyName: "autoPlacement", publicName: "autoPlacement", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { triggeredClose: "triggeredClose", triggeredOpen: "triggeredOpen" }, viewQueries: [{ propertyName: "popoverRef", first: true, predicate: ["myPopover"], descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.HostSize, inputs: ["data-size", "data-size"] }, { directive: i1.HostColor, inputs: ["data-color", "data-color"] }], ngImport: i0, template: `
120
117
  <div
121
118
  #myPopover
122
119
  popover="manual"
123
120
  class="ds-popover"
124
121
  data-testid="popover"
125
122
  [id]="popoverId()"
126
- [attr.data-size]="dataSize()"
127
- [attr.data-color]="dataColor()"
128
123
  [attr.data-variant]="variant()"
129
124
  >
130
125
  @if (controlledOpen()) {
@@ -133,10 +128,20 @@ class Popover {
133
128
  </div>
134
129
  `, isInline: true });
135
130
  }
136
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Popover, decorators: [{
131
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: Popover, decorators: [{
137
132
  type: Component,
138
133
  args: [{
139
134
  selector: 'ksd-popover',
135
+ hostDirectives: [
136
+ {
137
+ directive: HostSize,
138
+ inputs: ['data-size'],
139
+ },
140
+ {
141
+ directive: HostColor,
142
+ inputs: ['data-color'],
143
+ },
144
+ ],
140
145
  template: `
141
146
  <div
142
147
  #myPopover
@@ -144,8 +149,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImpor
144
149
  class="ds-popover"
145
150
  data-testid="popover"
146
151
  [id]="popoverId()"
147
- [attr.data-size]="dataSize()"
148
- [attr.data-color]="dataColor()"
149
152
  [attr.data-variant]="variant()"
150
153
  >
151
154
  @if (controlledOpen()) {
@@ -153,9 +156,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImpor
153
156
  }
154
157
  </div>
155
158
  `,
156
- imports: [],
157
159
  }]
158
- }], propDecorators: { popoverId: [{ type: i0.Input, args: [{ isSignal: true, alias: "popoverId", required: true }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], autoPlacement: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoPlacement", required: false }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }], triggeredClose: [{ type: i0.Output, args: ["triggeredClose"] }], triggeredOpen: [{ type: i0.Output, args: ["triggeredOpen"] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], dataSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "data-size", required: false }] }], dataColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "data-color", required: false }] }], popoverRef: [{ type: i0.ViewChild, args: ['myPopover', { isSignal: true }] }] } });
160
+ }], propDecorators: { popoverId: [{ type: i0.Input, args: [{ isSignal: true, alias: "popoverId", required: true }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], autoPlacement: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoPlacement", required: false }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }], triggeredClose: [{ type: i0.Output, args: ["triggeredClose"] }], triggeredOpen: [{ type: i0.Output, args: ["triggeredOpen"] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], popoverRef: [{ type: i0.ViewChild, args: ['myPopover', { isSignal: true }] }] } });
159
161
 
160
162
  /**
161
163
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"ks-digital-designsystem-angular-popover.mjs","sources":["../../../../packages/angular/popover/src/popover.ts","../../../../packages/angular/popover/src/ks-digital-designsystem-angular-popover.ts"],"sourcesContent":["/* eslint-disable @angular-eslint/no-input-rename */\n\nimport {\n booleanAttribute,\n Component,\n computed,\n effect,\n ElementRef,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core'\nimport {\n autoUpdate,\n computePosition,\n flip,\n MiddlewareState,\n offset,\n Placement,\n shift,\n} from '@floating-ui/dom'\nimport {\n Color,\n SeverityColors,\n Size,\n} from '@ks-digital/designsystem-angular/__internals'\n\n@Component({\n selector: 'ksd-popover',\n\n template: `\n <div\n #myPopover\n popover=\"manual\"\n class=\"ds-popover\"\n data-testid=\"popover\"\n [id]=\"popoverId()\"\n [attr.data-size]=\"dataSize()\"\n [attr.data-color]=\"dataColor()\"\n [attr.data-variant]=\"variant()\"\n >\n @if (controlledOpen()) {\n <ng-content />\n }\n </div>\n `,\n imports: [],\n})\nexport class Popover {\n // use popoverId instead of id since id will be put on the angular element and not the popover-div\n readonly popoverId = input.required<string>()\n readonly placement = input<Placement>('top')\n readonly autoPlacement = input(true, { transform: booleanAttribute })\n\n // for controlled component\n readonly open = input(undefined, { transform: booleanAttribute })\n /*\n the naming here is different from Designsystemet\n since we need to use outputs for onOpen and onClose\n */\n readonly triggeredClose = output()\n readonly triggeredOpen = output()\n\n protected readonly internalOpen = signal(false)\n protected readonly controlledOpen = computed(\n () => this.open() ?? this.internalOpen(),\n )\n\n readonly variant = input<'tinted' | 'default'>('default')\n readonly dataSize = input<Size>('md', { alias: 'data-size' })\n readonly dataColor = input<Color | SeverityColors>('neutral', {\n alias: 'data-color',\n })\n\n private popoverRef = viewChild<ElementRef>('myPopover')\n\n // enable controlled component\n controlledComponent = effect((onCleanup) => {\n const popover = this.popoverRef()?.nativeElement\n const handleClick = (event: MouseEvent) => {\n const el = event.target as Element | null\n const isTrigger = el?.closest?.(`[popovertarget=\"${this.popoverId()}\"]`)\n const isOutside = !isTrigger && !popover?.contains(el as Node)\n\n if (isTrigger) {\n event.preventDefault() // Prevent native Popover API\n this.internalOpen.update((open) => !open)\n this.triggeredOpen.emit()\n }\n if (isOutside) {\n this.internalOpen.set(false)\n this.triggeredClose.emit()\n }\n }\n\n const handleKeydown = (event: KeyboardEvent) => {\n if (event.key !== 'Escape' || !this.controlledOpen()) return\n event.preventDefault() // Prevent closing fullscreen in Safari\n this.internalOpen.set(false)\n this.triggeredClose.emit()\n }\n\n popover?.togglePopover?.(this.controlledOpen())\n document.addEventListener('click', handleClick, true) // Use capture to execute before React event API\n document.addEventListener('keydown', handleKeydown)\n\n onCleanup(() => {\n document.removeEventListener('click', handleClick, true)\n document.removeEventListener('keydown', handleKeydown)\n })\n }, {})\n\n positionPopover = effect(() => {\n const popover = this.popoverRef()?.nativeElement\n\n const trigger = document.querySelector(\n `[popovertarget=\"${this.popoverId()}\"]`,\n )\n const placement = this.placement()\n\n if (popover && trigger && this.controlledOpen()) {\n autoUpdate(trigger, popover, () => {\n computePosition(trigger, popover, {\n placement,\n strategy: 'fixed',\n middleware: [\n offset((data) => {\n // get pseudo element arrow size\n const styles = getComputedStyle(\n data.elements.floating,\n '::before',\n )\n return parseFloat(styles.height)\n }),\n ...(this.autoPlacement()\n ? [flip({ fallbackAxisSideDirection: 'start' }), shift()]\n : []),\n this.arrowPseudoElement,\n ],\n }).then(({ x, y }) => {\n popover.style.translate = `${x}px ${y}px`\n })\n })\n }\n }, {})\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n arrowPseudoElement: any = {\n name: 'ArrowPseudoElement',\n fn(data: MiddlewareState) {\n const { elements, rects, placement } = data\n\n let arrowX = `${Math.round(rects.reference.width / 2 + rects.reference.x - data.x)}px`\n let arrowY = `${Math.round(rects.reference.height / 2 + rects.reference.y - data.y)}px`\n\n if (rects.reference.width > rects.floating.width) {\n arrowX = `${Math.round(rects.floating.width / 2)}px`\n }\n\n if (rects.reference.height > rects.floating.height) {\n arrowY = `${Math.round(rects.floating.height / 2)}px`\n }\n\n switch (placement.split('-')[0]) {\n case 'top':\n arrowY = '100%'\n break\n case 'right':\n arrowX = '0'\n break\n case 'bottom':\n arrowY = '0'\n break\n case 'left':\n arrowX = '100%'\n break\n }\n\n elements.floating.setAttribute(\n 'data-placement',\n placement.split('-')[0] as string,\n ) // We only need top/left/right/bottom\n elements.floating.style.setProperty('--ds-popover-arrow-x', arrowX)\n elements.floating.style.setProperty('--ds-popover-arrow-y', arrowY)\n return data\n },\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;MAiDa,OAAO,CAAA;;AAET,IAAA,SAAS,GAAG,KAAK,CAAC,QAAQ,oDAAU;AACpC,IAAA,SAAS,GAAG,KAAK,CAAY,KAAK,qDAAC;AACnC,IAAA,aAAa,GAAG,KAAK,CAAC,IAAI,iDAAI,SAAS,EAAE,gBAAgB,EAAA,CAAA,GAAA,CAA7B,EAAE,SAAS,EAAE,gBAAgB,EAAE,GAAC;;AAG5D,IAAA,IAAI,GAAG,KAAK,CAAC,SAAS,wCAAI,SAAS,EAAE,gBAAgB,EAAA,CAAA,GAAA,CAA7B,EAAE,SAAS,EAAE,gBAAgB,EAAE,GAAC;AACjE;;;AAGE;IACO,cAAc,GAAG,MAAM,EAAE;IACzB,aAAa,GAAG,MAAM,EAAE;AAEd,IAAA,YAAY,GAAG,MAAM,CAAC,KAAK,wDAAC;AAC5B,IAAA,cAAc,GAAG,QAAQ,CAC1C,MAAM,IAAI,CAAC,IAAI,EAAE,IAAI,IAAI,CAAC,YAAY,EAAE,0DACzC;AAEQ,IAAA,OA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A,EAAA,OAAA,EAAA,EAAA,cAAA,EAAA,gBAAA,EAAA,aAAA,EAAA,eAAA,EAAA,EAAA,WAAA,EAAA,CAAA,EAAA,YAAA,EAAA,YAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,WAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAlBR;;;;;;;;;;;;;;;AAeT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;2FAGU,OAAO,EAAA,UAAA,EAAA,CAAA;kBArBnB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,aAAa;AAEvB,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;AAeT,EAAA,CAAA;AACD,oBAAA,OAAO,EAAE,EAAE;AACZ,iBAAA;+2BA2B4C,WAAW,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AC3ExD;;AAEG;;;;"}
1
+ {"version":3,"file":"ks-digital-designsystem-angular-popover.mjs","sources":["../../../../packages/angular/popover/src/popover.ts","../../../../packages/angular/popover/src/ks-digital-designsystem-angular-popover.ts"],"sourcesContent":["import {\n booleanAttribute,\n Component,\n computed,\n effect,\n ElementRef,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core'\nimport {\n autoUpdate,\n computePosition,\n flip,\n MiddlewareState,\n offset,\n Placement,\n shift,\n} from '@floating-ui/dom'\nimport {\n HostColor,\n HostSize,\n} from '@ks-digital/designsystem-angular/__internals'\n\n@Component({\n selector: 'ksd-popover',\n hostDirectives: [\n {\n directive: HostSize,\n inputs: ['data-size'],\n },\n {\n directive: HostColor,\n inputs: ['data-color'],\n },\n ],\n template: `\n <div\n #myPopover\n popover=\"manual\"\n class=\"ds-popover\"\n data-testid=\"popover\"\n [id]=\"popoverId()\"\n [attr.data-variant]=\"variant()\"\n >\n @if (controlledOpen()) {\n <ng-content />\n }\n </div>\n `,\n})\nexport class Popover {\n // use popoverId instead of id since id will be put on the angular element and not the popover-div\n readonly popoverId = input.required<string>()\n readonly placement = input<Placement>('top')\n readonly autoPlacement = input(true, { transform: booleanAttribute })\n\n // for controlled component\n readonly open = input(undefined, { transform: booleanAttribute })\n /*\n the naming here is different from Designsystemet\n since we need to use outputs for onOpen and onClose\n */\n readonly triggeredClose = output()\n readonly triggeredOpen = output()\n\n protected readonly internalOpen = signal(false)\n protected readonly controlledOpen = computed(\n () => this.open() ?? this.internalOpen(),\n )\n\n readonly variant = input<'tinted' | 'default'>('default')\n\n private popoverRef = viewChild<ElementRef>('myPopover')\n\n // enable controlled component\n controlledComponent = effect((onCleanup) => {\n const popover = this.popoverRef()?.nativeElement\n const handleClick = (event: MouseEvent) => {\n const el = event.target as Element | null\n const isTrigger = el?.closest?.(`[popovertarget=\"${this.popoverId()}\"]`)\n const isOutside = !isTrigger && !popover?.contains(el as Node)\n\n if (isTrigger) {\n event.preventDefault() // Prevent native Popover API\n this.internalOpen.update((open) => !open)\n this.triggeredOpen.emit()\n }\n if (isOutside) {\n this.internalOpen.set(false)\n this.triggeredClose.emit()\n }\n }\n\n const handleKeydown = (event: KeyboardEvent) => {\n if (event.key !== 'Escape' || !this.controlledOpen()) return\n event.preventDefault() // Prevent closing fullscreen in Safari\n this.internalOpen.set(false)\n this.triggeredClose.emit()\n }\n\n popover?.togglePopover?.(this.controlledOpen())\n document.addEventListener('click', handleClick, true) // Use capture to execute before React event API\n document.addEventListener('keydown', handleKeydown)\n\n onCleanup(() => {\n document.removeEventListener('click', handleClick, true)\n document.removeEventListener('keydown', handleKeydown)\n })\n }, {})\n\n positionPopover = effect(() => {\n const popover = this.popoverRef()?.nativeElement\n\n const trigger = document.querySelector(\n `[popovertarget=\"${this.popoverId()}\"]`,\n )\n const placement = this.placement()\n\n if (popover && trigger && this.controlledOpen()) {\n autoUpdate(trigger, popover, () => {\n computePosition(trigger, popover, {\n placement,\n strategy: 'fixed',\n middleware: [\n offset((data) => {\n // get pseudo element arrow size\n const styles = getComputedStyle(\n data.elements.floating,\n '::before',\n )\n return parseFloat(styles.height)\n }),\n ...(this.autoPlacement()\n ? [flip({ fallbackAxisSideDirection: 'start' }), shift()]\n : []),\n this.arrowPseudoElement,\n ],\n }).then(({ x, y }) => {\n popover.style.translate = `${x}px ${y}px`\n })\n })\n }\n }, {})\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n arrowPseudoElement: any = {\n name: 'ArrowPseudoElement',\n fn(data: MiddlewareState) {\n const { elements, rects, placement } = data\n\n let arrowX = `${Math.round(rects.reference.width / 2 + rects.reference.x - data.x)}px`\n let arrowY = `${Math.round(rects.reference.height / 2 + rects.reference.y - data.y)}px`\n\n if (rects.reference.width > rects.floating.width) {\n arrowX = `${Math.round(rects.floating.width / 2)}px`\n }\n\n if (rects.reference.height > rects.floating.height) {\n arrowY = `${Math.round(rects.floating.height / 2)}px`\n }\n\n switch (placement.split('-')[0]) {\n case 'top':\n arrowY = '100%'\n break\n case 'right':\n arrowX = '0'\n break\n case 'bottom':\n arrowY = '0'\n break\n case 'left':\n arrowX = '100%'\n break\n }\n\n elements.floating.setAttribute(\n 'data-placement',\n placement.split('-')[0] as string,\n ) // We only need top/left/right/bottom\n elements.floating.style.setProperty('--ds-popover-arrow-x', arrowX)\n elements.floating.style.setProperty('--ds-popover-arrow-y', arrowY)\n return data\n },\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAoDa,OAAO,CAAA;;AAET,IAAA,SAAS,GAAG,KAAK,CAAC,QAAQ,oDAAU;AACpC,IAAA,SAAS,GAAG,KAAK,CAAY,KAAK,qDAAC;IACnC,aAAa,GAAG,KAAK,CAAC,IAAI,0DAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;IAG5D,IAAI,GAAG,KAAK,CAAC,SAAS,iDAAI,SAA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A,EAAA,EAAA,QAAA,EAfR;;;;;;;;;;;;;AAaT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;2FAEU,OAAO,EAAA,UAAA,EAAA,CAAA;kBA3BnB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,cAAc,EAAE;AACd,wBAAA;AACE,4BAAA,SAAS,EAAE,QAAQ;4BACnB,MAAM,EAAE,CAAC,WAAW,CAAC;AACtB,yBAAA;AACD,wBAAA;AACE,4BAAA,SAAS,EAAE,SAAS;4BACpB,MAAM,EAAE,CAAC,YAAY,CAAC;AACvB,yBAAA;AACF,qBAAA;AACD,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;AAaT,EAAA,CAAA;AACF,iBAAA;2qBAuB4C,WAAW,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AC1ExD;;AAEG;;;;"}
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Directive, contentChild, afterNextRender, Component, input, output } from '@angular/core';
3
3
  import * as i1 from '@ks-digital/designsystem-angular/__internals';
4
- import { logIfDevMode, CommonInputs } from '@ks-digital/designsystem-angular/__internals';
4
+ import { logIfDevMode, HostSize, HostColor } from '@ks-digital/designsystem-angular/__internals';
5
5
 
6
6
  /**
7
7
  * Search input
@@ -9,10 +9,10 @@ import { logIfDevMode, CommonInputs } from '@ks-digital/designsystem-angular/__i
9
9
  * Used within Search to provide a search input.
10
10
  */
11
11
  class SearchInput {
12
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: SearchInput, deps: [], target: i0.ɵɵFactoryTarget.Directive });
13
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.9", type: SearchInput, isStandalone: true, selector: "input[ksd-search-input]", host: { attributes: { "type": "search", "placeholder": "" }, classAttribute: "ds-input" }, ngImport: i0 });
12
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: SearchInput, deps: [], target: i0.ɵɵFactoryTarget.Directive });
13
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.6", type: SearchInput, isStandalone: true, selector: "input[ksd-search-input]", host: { attributes: { "type": "search", "placeholder": "" }, classAttribute: "ds-input" }, ngImport: i0 });
14
14
  }
15
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: SearchInput, decorators: [{
15
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: SearchInput, decorators: [{
16
16
  type: Directive,
17
17
  args: [{
18
18
  // eslint-disable-next-line @angular-eslint/directive-selector
@@ -51,14 +51,14 @@ class Search {
51
51
  }
52
52
  });
53
53
  }
54
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Search, deps: [], target: i0.ɵɵFactoryTarget.Component });
55
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.9", type: Search, isStandalone: true, selector: "ksd-search", host: { classAttribute: "ds-search" }, queries: [{ propertyName: "input", first: true, predicate: SearchInput, descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.CommonInputs, inputs: ["data-size", "data-size", "data-color", "data-color"] }], ngImport: i0, template: `
54
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: Search, deps: [], target: i0.ɵɵFactoryTarget.Component });
55
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.0.6", type: Search, isStandalone: true, selector: "ksd-search", host: { classAttribute: "ds-search" }, queries: [{ propertyName: "input", first: true, predicate: SearchInput, descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.HostSize, inputs: ["data-size", "data-size"] }, { directive: i1.HostColor, inputs: ["data-color", "data-color"] }], ngImport: i0, template: `
56
56
  <ng-content select="[ksd-search-input]" />
57
57
  <ng-content select="[ksd-search-clear]" />
58
58
  <ng-content select="[ksd-search-button]" />
59
59
  `, isInline: true });
60
60
  }
61
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Search, decorators: [{
61
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: Search, decorators: [{
62
62
  type: Component,
63
63
  args: [{
64
64
  selector: 'ksd-search',
@@ -72,8 +72,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImpor
72
72
  },
73
73
  hostDirectives: [
74
74
  {
75
- directive: CommonInputs,
76
- inputs: ['data-size', 'data-color'],
75
+ directive: HostSize,
76
+ inputs: ['data-size'],
77
+ },
78
+ {
79
+ directive: HostColor,
80
+ inputs: ['data-color'],
77
81
  },
78
82
  ],
79
83
  }]
@@ -98,11 +102,11 @@ class SearchButton {
98
102
  /**
99
103
  * Aria label for the button
100
104
  */
101
- ariaLabel = input('', ...(ngDevMode ? [{ debugName: "ariaLabel", alias: 'aria-label' }] : [{ alias: 'aria-label' }]));
102
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: SearchButton, deps: [], target: i0.ɵɵFactoryTarget.Directive });
103
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.9", type: SearchButton, isStandalone: true, selector: "button[ksd-search-button]", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "submit" }, properties: { "attr.aria-label": "this.ariaLabel()", "attr.data-variant": "this.variant()" }, classAttribute: "ds-button" }, ngImport: i0 });
105
+ ariaLabel = input('', { ...(ngDevMode ? { debugName: "ariaLabel" } : {}), alias: 'aria-label' });
106
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: SearchButton, deps: [], target: i0.ɵɵFactoryTarget.Directive });
107
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.6", type: SearchButton, isStandalone: true, selector: "button[ksd-search-button]", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "submit" }, properties: { "attr.aria-label": "this.ariaLabel()", "attr.data-variant": "this.variant()" }, classAttribute: "ds-button" }, ngImport: i0 });
104
108
  }
105
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: SearchButton, decorators: [{
109
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: SearchButton, decorators: [{
106
110
  type: Directive,
107
111
  args: [{
108
112
  // eslint-disable-next-line @angular-eslint/directive-selector
@@ -133,7 +137,7 @@ class SearchClear {
133
137
  * Aria label for the button
134
138
  * @default 'Tøm'
135
139
  */
136
- ariaLabel = input('Tøm', ...(ngDevMode ? [{ debugName: "ariaLabel", alias: 'aria-label' }] : [{ alias: 'aria-label' }]));
140
+ ariaLabel = input('Tøm', { ...(ngDevMode ? { debugName: "ariaLabel" } : {}), alias: 'aria-label' });
137
141
  /**
138
142
  * Output to notify controlled forms that input should be cleared
139
143
  */
@@ -154,10 +158,10 @@ class SearchClear {
154
158
  this.clearInput.emit();
155
159
  inputElement.focus();
156
160
  }
157
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: SearchClear, deps: [], target: i0.ɵɵFactoryTarget.Directive });
158
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.9", type: SearchClear, isStandalone: true, selector: "button[ksd-search-clear]", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clearInput: "clearInput" }, host: { attributes: { "type": "reset" }, listeners: { "click": "handleClear($event)" }, properties: { "attr.data-variant": "'tertiary'", "attr.aria-label": "this.ariaLabel()" }, classAttribute: "ds-button" }, ngImport: i0 });
161
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: SearchClear, deps: [], target: i0.ɵɵFactoryTarget.Directive });
162
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.6", type: SearchClear, isStandalone: true, selector: "button[ksd-search-clear]", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clearInput: "clearInput" }, host: { attributes: { "type": "reset" }, listeners: { "click": "handleClear($event)" }, properties: { "attr.data-variant": "'tertiary'", "attr.aria-label": "this.ariaLabel()" }, classAttribute: "ds-button" }, ngImport: i0 });
159
163
  }
160
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: SearchClear, decorators: [{
164
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: SearchClear, decorators: [{
161
165
  type: Directive,
162
166
  args: [{
163
167
  // eslint-disable-next-line @angular-eslint/directive-selector
@@ -1 +1 @@
1
- {"version":3,"file":"ks-digital-designsystem-angular-search.mjs","sources":["../../../../packages/angular/search/src/search-input.ts","../../../../packages/angular/search/src/search.ts","../../../../packages/angular/search/src/search-button.ts","../../../../packages/angular/search/src/search-clear.ts","../../../../packages/angular/search/src/ks-digital-designsystem-angular-search.ts"],"sourcesContent":["import { Directive } from '@angular/core'\n\n/**\n * Search input\n *\n * Used within Search to provide a search input.\n */\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'input[ksd-search-input]',\n standalone: true,\n host: {\n class: 'ds-input',\n type: 'search',\n placeholder: '', // Need empty placeholder to enable show/hide for clear button\n },\n})\nexport class SearchInput {}\n","import { afterNextRender, Component, contentChild } from '@angular/core'\nimport {\n CommonInputs,\n logIfDevMode,\n} from '@ks-digital/designsystem-angular/__internals'\nimport { SearchInput } from './search-input'\n\n/**\n * Search Component\n *\n * Use to contain the search input and buttons.\n * Only `SearchInput` is required, while `SearchClear` and `SearchButton` are optional.\n *\n * @example\n * <div ksd-search>\n * <input ksd-search-input />\n * <button ksd-search-clear></button>\n * <button ksd-search-button></button>\n * </div>\n */\n@Component({\n selector: 'ksd-search',\n template: `\n <ng-content select=\"[ksd-search-input]\" />\n <ng-content select=\"[ksd-search-clear]\" />\n <ng-content select=\"[ksd-search-button]\" />\n `,\n host: {\n class: 'ds-search',\n },\n hostDirectives: [\n {\n directive: CommonInputs,\n inputs: ['data-size', 'data-color'],\n },\n ],\n})\nexport class Search {\n private readonly input = contentChild(SearchInput)\n\n constructor() {\n afterNextRender(() => {\n if (!this.input()) {\n logIfDevMode({\n component: 'Search',\n message:\n 'Missing required elements: ksd-search-input must be provided as child. Check imports and markup.',\n })\n }\n })\n }\n}\n","import { Directive, input } from '@angular/core'\n\n/**\n * Search button\n *\n * Used within Search to provide a submit button.\n *\n * @param {('primary' | 'secondary')} [variant] - Specify which button variant to use\n * @param {string} [aria-label] - Aria label for the button\n *\n */\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'button[ksd-search-button]',\n standalone: true,\n host: {\n class: 'ds-button',\n type: 'submit',\n '[attr.aria-label]': 'this.ariaLabel()',\n '[attr.data-variant]': 'this.variant()',\n },\n})\nexport class SearchButton {\n /**\n * Specify which button variant to use\n *\n * @default 'primary'\n */\n readonly variant = input<'primary' | 'secondary'>('primary')\n\n /**\n * Aria label for the button\n */\n readonly ariaLabel = input('', { alias: 'aria-label' })\n}\n","import { Directive, input, output } from '@angular/core'\n\n/**\n * Search clear button\n *\n * Used within Search to provide a clear button.\n *\n * @param {string} [aria-label] - Aria label for the button.\n *\n * @event clearInput - Emitted when the clear button is clicked.\n * Use this to notify controlled forms that the input should be cleared.\n *\n */\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'button[ksd-search-clear]',\n standalone: true,\n host: {\n class: 'ds-button',\n type: 'reset',\n '[attr.data-variant]': \"'tertiary'\",\n '[attr.aria-label]': 'this.ariaLabel()',\n '(click)': 'handleClear($event)',\n },\n})\nexport class SearchClear {\n /**\n * Aria label for the button\n * @default 'Tøm'\n */\n readonly ariaLabel = input('Tøm', { alias: 'aria-label' })\n\n /**\n * Output to notify controlled forms that input should be cleared\n */\n clearInput = output<void>()\n\n handleClear(e: Event): void {\n const target = e.target as HTMLButtonElement\n let inputElement: HTMLElement | null | undefined = null\n\n if (target instanceof HTMLElement) {\n inputElement = target.closest('.ds-search')?.querySelector('input')\n }\n\n if (!inputElement) throw new Error('Input is missing')\n\n if (!(inputElement instanceof HTMLInputElement)) {\n throw new Error('Input is not an input element')\n }\n\n e.preventDefault()\n inputElement.value = ''\n this.clearInput.emit()\n inputElement.focus()\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAEA;;;;AAIG;MAWU,WAAW,CAAA;uGAAX,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAX,WAAW,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,yBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,MAAA,EAAA,QAAA,EAAA,aAAA,EAAA,EAAA,EAAA,EAAA,cAAA,EAAA,UAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAX,WAAW,EAAA,UAAA,EAAA,CAAA;kBAVvB,SAAS;AAAC,YA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QAAA,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE;QACtB,YAAY,CAAC,KAAK,EAAE;IACtB;uGA9BW,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAX,WAAW,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,0BAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,YAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,UAAA,EAAA,YAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,MAAA,EAAA,OAAA,EAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,qBAAA,EAAA,EAAA,UAAA,EAAA,EAAA,mBAAA,EAAA,YAAA,EAAA,iBAAA,EAAA,kBAAA,EAAA,EAAA,cAAA,EAAA,WAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAX,WAAW,EAAA,UAAA,EAAA,CAAA;kBAZvB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;;AAET,oBAAA,QAAQ,EAAE,0BAA0B;AACpC,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE;AACJ,wBAAA,KAAK,EAAE,WAAW;AAClB,wBAAA,IAAI,EAAE,OAAO;AACb,wBAAA,qBAAqB,EAAE,YAAY;AACnC,wBAAA,mBAAmB,EAAE,kBAAkB;AACvC,wBAAA,SAAS,EAAE,qBAAqB;AACjC,qBAAA;AACF,iBAAA;;;ACxBD;;AAEG;;;;"}
1
+ {"version":3,"file":"ks-digital-designsystem-angular-search.mjs","sources":["../../../../packages/angular/search/src/search-input.ts","../../../../packages/angular/search/src/search.ts","../../../../packages/angular/search/src/search-button.ts","../../../../packages/angular/search/src/search-clear.ts","../../../../packages/angular/search/src/ks-digital-designsystem-angular-search.ts"],"sourcesContent":["import { Directive } from '@angular/core'\n\n/**\n * Search input\n *\n * Used within Search to provide a search input.\n */\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'input[ksd-search-input]',\n standalone: true,\n host: {\n class: 'ds-input',\n type: 'search',\n placeholder: '', // Need empty placeholder to enable show/hide for clear button\n },\n})\nexport class SearchInput {}\n","import { afterNextRender, Component, contentChild } from '@angular/core'\nimport {\n HostColor,\n HostSize,\n logIfDevMode,\n} from '@ks-digital/designsystem-angular/__internals'\nimport { SearchInput } from './search-input'\n\n/**\n * Search Component\n *\n * Use to contain the search input and buttons.\n * Only `SearchInput` is required, while `SearchClear` and `SearchButton` are optional.\n *\n * @example\n * <div ksd-search>\n * <input ksd-search-input />\n * <button ksd-search-clear></button>\n * <button ksd-search-button></button>\n * </div>\n */\n@Component({\n selector: 'ksd-search',\n template: `\n <ng-content select=\"[ksd-search-input]\" />\n <ng-content select=\"[ksd-search-clear]\" />\n <ng-content select=\"[ksd-search-button]\" />\n `,\n host: {\n class: 'ds-search',\n },\n hostDirectives: [\n {\n directive: HostSize,\n inputs: ['data-size'],\n },\n {\n directive: HostColor,\n inputs: ['data-color'],\n },\n ],\n})\nexport class Search {\n private readonly input = contentChild(SearchInput)\n\n constructor() {\n afterNextRender(() => {\n if (!this.input()) {\n logIfDevMode({\n component: 'Search',\n message:\n 'Missing required elements: ksd-search-input must be provided as child. Check imports and markup.',\n })\n }\n })\n }\n}\n","import { Directive, input } from '@angular/core'\n\n/**\n * Search button\n *\n * Used within Search to provide a submit button.\n *\n * @param {('primary' | 'secondary')} [variant] - Specify which button variant to use\n * @param {string} [aria-label] - Aria label for the button\n *\n */\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'button[ksd-search-button]',\n standalone: true,\n host: {\n class: 'ds-button',\n type: 'submit',\n '[attr.aria-label]': 'this.ariaLabel()',\n '[attr.data-variant]': 'this.variant()',\n },\n})\nexport class SearchButton {\n /**\n * Specify which button variant to use\n *\n * @default 'primary'\n */\n readonly variant = input<'primary' | 'secondary'>('primary')\n\n /**\n * Aria label for the button\n */\n readonly ariaLabel = input('', { alias: 'aria-label' })\n}\n","import { Directive, input, output } from '@angular/core'\n\n/**\n * Search clear button\n *\n * Used within Search to provide a clear button.\n *\n * @param {string} [aria-label] - Aria label for the button.\n *\n * @event clearInput - Emitted when the clear button is clicked.\n * Use this to notify controlled forms that the input should be cleared.\n *\n */\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'button[ksd-search-clear]',\n standalone: true,\n host: {\n class: 'ds-button',\n type: 'reset',\n '[attr.data-variant]': \"'tertiary'\",\n '[attr.aria-label]': 'this.ariaLabel()',\n '(click)': 'handleClear($event)',\n },\n})\nexport class SearchClear {\n /**\n * Aria label for the button\n * @default 'Tøm'\n */\n readonly ariaLabel = input('Tøm', { alias: 'aria-label' })\n\n /**\n * Output to notify controlled forms that input should be cleared\n */\n clearInput = output<void>()\n\n handleClear(e: Event): void {\n const target = e.target as HTMLButtonElement\n let inputElement: HTMLElement | null | undefined = null\n\n if (target instanceof HTMLElement) {\n inputElement = target.closest('.ds-search')?.querySelector('input')\n }\n\n if (!inputElement) throw new Error('Input is missing')\n\n if (!(inputElement instanceof HTMLInputElement)) {\n throw new Error('Input is not an input element')\n }\n\n e.preventDefault()\n inputElement.value = ''\n this.clearInput.emit()\n inputElement.focus()\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAEA;;;;AAIG;MAWU,WAAW,CAAA;uGAAX,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAX,WAAW,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,yBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,MAAA,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C,wBAAA,SAAS,EAAE,qBAAqB;AACjC,qBAAA;AACF,iBAAA;;;ACxBD;;AAEG;;;;"}
@@ -1,36 +1,31 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { input, booleanAttribute, Component } from '@angular/core';
3
+ import * as i1 from '@ks-digital/designsystem-angular/__internals';
4
+ import { HostColor } from '@ks-digital/designsystem-angular/__internals';
3
5
 
4
6
  /* eslint-disable @angular-eslint/no-input-rename */
5
7
  class Spinner {
6
8
  /**
7
9
  * Aria-label for the spinner
8
10
  */
9
- ariaLabel = input(undefined, ...(ngDevMode ? [{ debugName: "ariaLabel", alias: 'aria-label' }] : [{ alias: 'aria-label' }]));
11
+ ariaLabel = input(undefined, { ...(ngDevMode ? { debugName: "ariaLabel" } : {}), alias: 'aria-label' });
10
12
  /**
11
- * Aria-label for the spinner
12
- */
13
- dataSize = input(undefined, ...(ngDevMode ? [{ debugName: "dataSize", alias: 'data-size' }] : [{ alias: 'data-size' }]));
14
- /**
15
- * Aria-label for the spinner
13
+ * Aria-hidden for the spinner
16
14
  */
17
- dataColor = input(undefined, ...(ngDevMode ? [{ debugName: "dataColor", alias: 'data-color' }] : [{ alias: 'data-color' }]));
15
+ ariaHidden = input(undefined, { ...(ngDevMode ? { debugName: "ariaHidden" } : {}), transform: booleanAttribute,
16
+ alias: 'aria-hidden' });
18
17
  /**
19
- * Aria-hidden for the spinner
18
+ * Changes size for descendant Designsystemet components. Select from predefined sizes.
19
+ * @attribute data-size
20
20
  */
21
- ariaHidden = input(undefined, ...(ngDevMode ? [{ debugName: "ariaHidden", transform: booleanAttribute,
22
- alias: 'aria-hidden' }] : [{
23
- transform: booleanAttribute,
24
- alias: 'aria-hidden',
25
- }]));
26
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Spinner, deps: [], target: i0.ɵɵFactoryTarget.Component });
27
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.9", type: Spinner, isStandalone: true, selector: "ksd-spinner", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, dataSize: { classPropertyName: "dataSize", publicName: "data-size", isSignal: true, isRequired: false, transformFunction: null }, dataColor: { classPropertyName: "dataColor", publicName: "data-color", isSignal: true, isRequired: false, transformFunction: null }, ariaHidden: { classPropertyName: "ariaHidden", publicName: "aria-hidden", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
21
+ dataSize = input(undefined, { ...(ngDevMode ? { debugName: "dataSize" } : {}), alias: 'data-size' });
22
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: Spinner, deps: [], target: i0.ɵɵFactoryTarget.Component });
23
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.6", type: Spinner, isStandalone: true, selector: "ksd-spinner", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaHidden: { classPropertyName: "ariaHidden", publicName: "aria-hidden", isSignal: true, isRequired: false, transformFunction: null }, dataSize: { classPropertyName: "dataSize", publicName: "data-size", isSignal: true, isRequired: false, transformFunction: null } }, hostDirectives: [{ directive: i1.HostColor, inputs: ["data-color", "data-color"] }], ngImport: i0, template: `
28
24
  <svg
29
25
  class="ds-spinner"
30
26
  role="img"
31
27
  viewBox="0 0 50 50"
32
28
  [attr.data-size]="dataSize()"
33
- [attr.data-color]="dataColor()"
34
29
  >
35
30
  <circle
36
31
  class="ds-spinner__background"
@@ -51,7 +46,7 @@ class Spinner {
51
46
  </svg>
52
47
  `, isInline: true, styles: [":host{display:contents}\n"] });
53
48
  }
54
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Spinner, decorators: [{
49
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: Spinner, decorators: [{
55
50
  type: Component,
56
51
  args: [{ selector: 'ksd-spinner', template: `
57
52
  <svg
@@ -59,7 +54,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImpor
59
54
  role="img"
60
55
  viewBox="0 0 50 50"
61
56
  [attr.data-size]="dataSize()"
62
- [attr.data-color]="dataColor()"
63
57
  >
64
58
  <circle
65
59
  class="ds-spinner__background"
@@ -78,8 +72,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImpor
78
72
  stroke-width="5"
79
73
  />
80
74
  </svg>
81
- `, styles: [":host{display:contents}\n"] }]
82
- }], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], dataSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "data-size", required: false }] }], dataColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "data-color", required: false }] }], ariaHidden: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-hidden", required: false }] }] } });
75
+ `, hostDirectives: [
76
+ {
77
+ directive: HostColor,
78
+ inputs: ['data-color'],
79
+ },
80
+ ], styles: [":host{display:contents}\n"] }]
81
+ }], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaHidden: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-hidden", required: false }] }], dataSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "data-size", required: false }] }] } });
83
82
 
84
83
  /**
85
84
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"ks-digital-designsystem-angular-spinner.mjs","sources":["../../../../packages/angular/spinner/src/spinner.ts","../../../../packages/angular/spinner/src/ks-digital-designsystem-angular-spinner.ts"],"sourcesContent":["/* eslint-disable @angular-eslint/no-input-rename */\nimport { booleanAttribute, Component, input } from '@angular/core'\nimport { Size } from '@ks-digital/designsystem-angular/__internals'\n\n@Component({\n selector: 'ksd-spinner',\n styles: `\n :host {\n display: contents;\n }\n `,\n template: `\n <svg\n class=\"ds-spinner\"\n role=\"img\"\n viewBox=\"0 0 50 50\"\n [attr.data-size]=\"dataSize()\"\n [attr.data-color]=\"dataColor()\"\n >\n <circle\n class=\"ds-spinner__background\"\n cx=\"25\"\n cy=\"25\"\n r=\"20\"\n fill=\"none\"\n stroke-width=\"5\"\n />\n <circle\n class=\"ds-spinner__circle\"\n cx=\"25\"\n cy=\"25\"\n r=\"20\"\n fill=\"none\"\n stroke-width=\"5\"\n />\n </svg>\n `,\n})\nexport class Spinner {\n /**\n * Aria-label for the spinner\n */\n readonly ariaLabel = input<string>(undefined, { alias: 'aria-label' })\n\n /**\n * Aria-label for the spinner\n */\n readonly dataSize = input<Size>(undefined, { alias: 'data-size' })\n\n /**\n * Aria-label for the spinner\n */\n readonly dataColor = input<Size>(undefined, { alias: 'data-color' })\n\n /**\n * Aria-hidden for the spinner\n */\n readonly ariaHidden = input(undefined, {\n transform: booleanAttribute,\n alias: 'aria-hidden',\n })\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;MAsCa,OAAO,CAAA;AAClB;;AAEG;AACM,IAAA,SAAS,GAAG,KAAK,CAAS,SAAS,6CAAI,KAAK,EAAE,YAAY,EAAA,CAAA,GAAA,CAArB,EAAE,KAAK,EAAE,YAAY,EAAE,GAAC;AAEtE;;AAEG;AACM,IAAA,QAAQ,GAAG,KAAK,CAAO,SAAS,4CAAI,KAAK,EAAE,WAAW,EAAA,CAAA,GAAA,CAApB,EAAE,KAAK,EAAE,WAAW,EAAE,GAAC;AAElE;;AAEG;AACM,IAAA,SAAS,GAAG,KAAK,CAAO,SAAS,6CAAI,KAAK,EAAE,YAAY,EAAA,CAAA,GAAA,CAArB,EAAE,KAAK,EAAE,YAAY,EAAE,GAAC;AAEpE;;AAEG;AACM,IAAA,UAAU,GAAG,KAAK,CAAC,SAAS,EAAA,IAAA,SAAA,GAAA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A,CAAA,EAAA,CAAA;;2FAEU,OAAO,EAAA,UAAA,EAAA,CAAA;kBAlCnB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,aAAa,EAAA,QAAA,EAMb;;;;;;;;;;;;;;;;;;;;;;;;;AAyBT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,2BAAA,CAAA,EAAA;;;ACpCH;;AAEG;;;;"}
1
+ {"version":3,"file":"ks-digital-designsystem-angular-spinner.mjs","sources":["../../../../packages/angular/spinner/src/spinner.ts","../../../../packages/angular/spinner/src/ks-digital-designsystem-angular-spinner.ts"],"sourcesContent":["/* eslint-disable @angular-eslint/no-input-rename */\nimport { booleanAttribute, Component, input } from '@angular/core'\nimport { HostColor } from '@ks-digital/designsystem-angular/__internals'\nimport { SpinnerSize } from './spinner-sizes'\n\n@Component({\n selector: 'ksd-spinner',\n styles: `\n :host {\n display: contents;\n }\n `,\n template: `\n <svg\n class=\"ds-spinner\"\n role=\"img\"\n viewBox=\"0 0 50 50\"\n [attr.data-size]=\"dataSize()\"\n >\n <circle\n class=\"ds-spinner__background\"\n cx=\"25\"\n cy=\"25\"\n r=\"20\"\n fill=\"none\"\n stroke-width=\"5\"\n />\n <circle\n class=\"ds-spinner__circle\"\n cx=\"25\"\n cy=\"25\"\n r=\"20\"\n fill=\"none\"\n stroke-width=\"5\"\n />\n </svg>\n `,\n hostDirectives: [\n {\n directive: HostColor,\n inputs: ['data-color'],\n },\n ],\n})\nexport class Spinner {\n /**\n * Aria-label for the spinner\n */\n readonly ariaLabel = input<string>(undefined, { alias: 'aria-label' })\n\n /**\n * Aria-hidden for the spinner\n */\n readonly ariaHidden = input(undefined, {\n transform: booleanAttribute,\n alias: 'aria-hidden',\n })\n\n /**\n * Changes size for descendant Designsystemet components. Select from predefined sizes.\n * @attribute data-size\n */\n readonly dataSize = input<SpinnerSize>(undefined, {\n alias: 'data-size',\n })\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';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AAA,CAAA,YAAA,EAAA,YAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAhCR;;;;;;;;;;;;;;;;;;;;;;;;AAwBT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,2BAAA,CAAA,EAAA,CAAA;;2FAQU,OAAO,EAAA,UAAA,EAAA,CAAA;kBAvCnB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,aAAa,EAAA,QAAA,EAMb;;;;;;;;;;;;;;;;;;;;;;;;GAwBT,EAAA,cAAA,EACe;AACd,wBAAA;AACE,4BAAA,SAAS,EAAE,SAAS;4BACpB,MAAM,EAAE,CAAC,YAAY,CAAC;AACvB,yBAAA;AACF,qBAAA,EAAA,MAAA,EAAA,CAAA,2BAAA,CAAA,EAAA;;;AC1CH;;AAEG;;;;"}
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { input, inject, ElementRef, signal, computed, ChangeDetectionStrategy, Component, model, contentChildren, effect } from '@angular/core';
3
3
  import * as i1 from '@ks-digital/designsystem-angular/__internals';
4
- import { randomId, CommonInputs } from '@ks-digital/designsystem-angular/__internals';
4
+ import { randomId, HostSize, HostColor } from '@ks-digital/designsystem-angular/__internals';
5
5
 
6
6
  class TabsTab {
7
7
  /**
@@ -15,10 +15,10 @@ class TabsTab {
15
15
  tabs = inject(Tabs);
16
16
  isFocused = computed(() => this.tabs.focusedValue() === this.value(), ...(ngDevMode ? [{ debugName: "isFocused" }] : []));
17
17
  isSelected = computed(() => this.tabs.value() === this.value(), ...(ngDevMode ? [{ debugName: "isSelected" }] : []));
18
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: TabsTab, deps: [], target: i0.ɵɵFactoryTarget.Component });
19
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.9", type: TabsTab, isStandalone: true, selector: "button[ksd-tabs-tab]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "tab" }, listeners: { "click": "tabs.changeTab(value())", "keydown": "tabs.onKeyDown($event)" }, properties: { "id": "buttonId()", "attr.aria-controls": "ariaControls()", "attr.aria-selected": "isSelected()", "attr.tab-index": "isFocused() ? 0 : -1" }, classAttribute: "ds-button" }, hostDirectives: [{ directive: i1.CommonInputs, inputs: ["data-size", "data-size", "data-color", "data-color"] }], ngImport: i0, template: ` <ng-content /> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
18
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: TabsTab, deps: [], target: i0.ɵɵFactoryTarget.Component });
19
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.6", type: TabsTab, isStandalone: true, selector: "button[ksd-tabs-tab]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "tab" }, listeners: { "click": "tabs.changeTab(value())", "keydown": "tabs.onKeyDown($event)" }, properties: { "id": "buttonId()", "attr.aria-controls": "ariaControls()", "attr.aria-selected": "isSelected()", "attr.tab-index": "isFocused() ? 0 : -1" }, classAttribute: "ds-button" }, hostDirectives: [{ directive: i1.HostSize, inputs: ["data-size", "data-size"] }, { directive: i1.HostColor, inputs: ["data-color", "data-color"] }], ngImport: i0, template: ` <ng-content /> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
20
20
  }
21
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: TabsTab, decorators: [{
21
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: TabsTab, decorators: [{
22
22
  type: Component,
23
23
  args: [{
24
24
  selector: `button[ksd-tabs-tab]`,
@@ -37,8 +37,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImpor
37
37
  imports: [],
38
38
  hostDirectives: [
39
39
  {
40
- directive: CommonInputs,
41
- inputs: ['data-size', 'data-color'],
40
+ directive: HostSize,
41
+ inputs: ['data-size'],
42
+ },
43
+ {
44
+ directive: HostColor,
45
+ inputs: ['data-color'],
42
46
  },
43
47
  ],
44
48
  }]
@@ -48,7 +52,7 @@ class Tabs {
48
52
  defaultValue = input(...(ngDevMode ? [undefined, { debugName: "defaultValue" }] : []));
49
53
  value = model('', ...(ngDevMode ? [{ debugName: "value" }] : []));
50
54
  focusedValue = computed(() => this.tabs()[this.focusedIndex()]?.value(), ...(ngDevMode ? [{ debugName: "focusedValue" }] : []));
51
- tabs = contentChildren(TabsTab, ...(ngDevMode ? [{ debugName: "tabs", descendants: true }] : [{ descendants: true }]));
55
+ tabs = contentChildren(TabsTab, { ...(ngDevMode ? { debugName: "tabs" } : {}), descendants: true });
52
56
  focusedIndex = signal(0, ...(ngDevMode ? [{ debugName: "focusedIndex" }] : []));
53
57
  constructor() {
54
58
  effect(() => {
@@ -101,15 +105,15 @@ class Tabs {
101
105
  this.focusedIndex.set(index);
102
106
  this.tabs()[index]?.elementRef.nativeElement.focus();
103
107
  }
104
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Tabs, deps: [], target: i0.ɵɵFactoryTarget.Component });
105
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.9", type: Tabs, isStandalone: true, selector: "ksd-tabs", inputs: { defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, queries: [{ propertyName: "tabs", predicate: TabsTab, descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.CommonInputs, inputs: ["data-size", "data-size", "data-color", "data-color"] }], ngImport: i0, template: `
108
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: Tabs, deps: [], target: i0.ɵɵFactoryTarget.Component });
109
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.0.6", type: Tabs, isStandalone: true, selector: "ksd-tabs", inputs: { defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, queries: [{ propertyName: "tabs", predicate: TabsTab, descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.HostSize, inputs: ["data-size", "data-size"] }, { directive: i1.HostColor, inputs: ["data-color", "data-color"] }], ngImport: i0, template: `
106
110
  <div class="ds-tabs">
107
111
  <ng-content select="ksd-tabs-list" />
108
112
  <ng-content select="ksd-tabs-panel" />
109
113
  </div>
110
114
  `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
111
115
  }
112
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Tabs, decorators: [{
116
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: Tabs, decorators: [{
113
117
  type: Component,
114
118
  args: [{
115
119
  selector: `ksd-tabs`,
@@ -122,18 +126,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImpor
122
126
  changeDetection: ChangeDetectionStrategy.OnPush,
123
127
  hostDirectives: [
124
128
  {
125
- directive: CommonInputs,
126
- inputs: ['data-size', 'data-color'],
129
+ directive: HostSize,
130
+ inputs: ['data-size'],
131
+ },
132
+ {
133
+ directive: HostColor,
134
+ inputs: ['data-color'],
127
135
  },
128
136
  ],
129
137
  }]
130
138
  }], ctorParameters: () => [], propDecorators: { defaultValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultValue", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], tabs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => TabsTab), { ...{ descendants: true }, isSignal: true }] }] } });
131
139
 
132
140
  class TabsList {
133
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: TabsList, deps: [], target: i0.ɵɵFactoryTarget.Component });
134
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: TabsList, isStandalone: true, selector: "ksd-tabs-list", host: { attributes: { "role": "tablist" } }, ngImport: i0, template: `<ng-content select="button[ksd-tabs-tab]" />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
141
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: TabsList, deps: [], target: i0.ɵɵFactoryTarget.Component });
142
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.6", type: TabsList, isStandalone: true, selector: "ksd-tabs-list", host: { attributes: { "role": "tablist" } }, ngImport: i0, template: `<ng-content select="button[ksd-tabs-tab]" />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
135
143
  }
136
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: TabsList, decorators: [{
144
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: TabsList, decorators: [{
137
145
  type: Component,
138
146
  args: [{
139
147
  selector: `ksd-tabs-list`,
@@ -172,10 +180,10 @@ class TabsPanel {
172
180
  ngAfterContentInit() {
173
181
  this.hasTabbableElement.set(this.elementRef.nativeElement.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'));
174
182
  }
175
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: TabsPanel, deps: [], target: i0.ɵɵFactoryTarget.Component });
176
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.9", type: TabsPanel, isStandalone: true, selector: "ksd-tabs-panel", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "tabpanel" }, properties: { "id": "panelId()", "hidden": "!isSelected()", "attr.aria-labelledby": "labelledBy()", "tabIndex": "tabIndex()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
183
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: TabsPanel, deps: [], target: i0.ɵɵFactoryTarget.Component });
184
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.6", type: TabsPanel, isStandalone: true, selector: "ksd-tabs-panel", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "tabpanel" }, properties: { "id": "panelId()", "hidden": "!isSelected()", "attr.aria-labelledby": "labelledBy()", "tabIndex": "tabIndex()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
177
185
  }
178
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: TabsPanel, decorators: [{
186
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: TabsPanel, decorators: [{
179
187
  type: Component,
180
188
  args: [{
181
189
  selector: `ksd-tabs-panel`,