@ks-digital/designsystem-angular 0.0.1-alpha.34 → 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 (49) 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 +15 -13
  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 +10 -6
  18. package/fesm2022/ks-digital-designsystem-angular-pagination.mjs.map +1 -1
  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 +23 -19
  31. package/types/ks-digital-designsystem-angular-__internals.d.ts +69 -0
  32. package/{alert/index.d.ts → types/ks-digital-designsystem-angular-alert.d.ts} +1 -5
  33. package/{button/index.d.ts → types/ks-digital-designsystem-angular-button.d.ts} +1 -1
  34. package/{card/index.d.ts → types/ks-digital-designsystem-angular-card.d.ts} +1 -1
  35. package/{chip/index.d.ts → types/ks-digital-designsystem-angular-chip.d.ts} +1 -1
  36. package/types/ks-digital-designsystem-angular-details.d.ts +25 -0
  37. package/{forms/index.d.ts → types/ks-digital-designsystem-angular-forms.d.ts} +5 -4
  38. package/types/ks-digital-designsystem-angular-link.d.ts +9 -0
  39. package/{pagination/index.d.ts → types/ks-digital-designsystem-angular-pagination.d.ts} +1 -1
  40. package/{popover/index.d.ts → types/ks-digital-designsystem-angular-popover.d.ts} +2 -4
  41. package/{search/index.d.ts → types/ks-digital-designsystem-angular-search.d.ts} +1 -1
  42. package/types/ks-digital-designsystem-angular-spinner.d.ts +25 -0
  43. package/{tabs/index.d.ts → types/ks-digital-designsystem-angular-tabs.d.ts} +2 -2
  44. package/__internals/index.d.ts +0 -28
  45. package/details/index.d.ts +0 -26
  46. package/spinner/index.d.ts +0 -25
  47. /package/{paragraph/index.d.ts → types/ks-digital-designsystem-angular-paragraph.d.ts} +0 -0
  48. /package/{validation-message/index.d.ts → types/ks-digital-designsystem-angular-validation-message.d.ts} +0 -0
  49. /package/{index.d.ts → types/ks-digital-designsystem-angular.d.ts} +0 -0
@@ -3,30 +3,94 @@ import { input, Directive, isDevMode } from '@angular/core';
3
3
 
4
4
  /* eslint-disable @angular-eslint/no-input-rename */
5
5
  /**
6
- * We use input aliasing to bridge the gap between Angular's camelCase property naming convention and our HTML data attributes.
7
- * This approach allows us to use valid HTML data attributes as documented by Designsystemet while maintaining
8
- * proper TypeScript intellisense support.
9
- *
10
- * Todo: Some components are using only a subset of colors, e.g., SeverityColors for Alert. We should reconsider this directive
6
+ * @deprecated Use individual directives instead
11
7
  */
12
8
  class CommonInputs {
13
9
  /**
14
10
  * Changes size for descendant Designsystemet components. Select from predefined sizes.
15
11
  * @attribute data-size
16
12
  */
17
- dataSize = input(undefined, ...(ngDevMode ? [{ debugName: "dataSize", alias: 'data-size' }] : [{ alias: 'data-size' }]));
13
+ dataSize = input(undefined, { ...(ngDevMode ? { debugName: "dataSize" } : {}), alias: 'data-size' });
18
14
  /**
19
15
  * Changes color for descendant Designsystemet components.
20
- * Select from predefined colors and colors defined using theme.designsystemet.no.
16
+ * Select from predefined colors and colors defined in theme.
21
17
  * @attribute data-color
22
18
  */
23
- dataColor = input(undefined, ...(ngDevMode ? [{ debugName: "dataColor", alias: 'data-color' }] : [{ alias: 'data-color' }]));
24
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: CommonInputs, deps: [], target: i0.ɵɵFactoryTarget.Directive });
25
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.9", type: CommonInputs, isStandalone: true, inputs: { dataSize: { classPropertyName: "dataSize", publicName: "data-size", isSignal: true, isRequired: false, transformFunction: null }, dataColor: { classPropertyName: "dataColor", publicName: "data-color", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
19
+ dataColor = input(undefined, { ...(ngDevMode ? { debugName: "dataColor" } : {}), alias: 'data-color' });
20
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: CommonInputs, deps: [], target: i0.ɵɵFactoryTarget.Directive });
21
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.6", type: CommonInputs, isStandalone: true, inputs: { dataSize: { classPropertyName: "dataSize", publicName: "data-size", isSignal: true, isRequired: false, transformFunction: null }, dataColor: { classPropertyName: "dataColor", publicName: "data-color", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-size": "dataSize() || null", "attr.data-color": "dataColor() || null" } }, ngImport: i0 });
26
22
  }
27
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: CommonInputs, decorators: [{
28
- type: Directive
23
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: CommonInputs, decorators: [{
24
+ type: Directive,
25
+ args: [{
26
+ host: {
27
+ '[attr.data-size]': 'dataSize() || null',
28
+ '[attr.data-color]': 'dataColor() || null',
29
+ },
30
+ }]
29
31
  }], propDecorators: { dataSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "data-size", required: false }] }], dataColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "data-color", required: false }] }] } });
32
+ /**
33
+ * Applies data-size attribute to host-element.
34
+ */
35
+ class HostSize {
36
+ /**
37
+ * Changes size for descendant Designsystemet components. Select from predefined sizes.
38
+ * @attribute data-size
39
+ */
40
+ dataSize = input(undefined, { ...(ngDevMode ? { debugName: "dataSize" } : {}), alias: 'data-size' });
41
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: HostSize, deps: [], target: i0.ɵɵFactoryTarget.Directive });
42
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.6", type: HostSize, isStandalone: true, inputs: { dataSize: { classPropertyName: "dataSize", publicName: "data-size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-size": "dataSize() || null" } }, ngImport: i0 });
43
+ }
44
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: HostSize, decorators: [{
45
+ type: Directive,
46
+ args: [{
47
+ host: {
48
+ '[attr.data-size]': 'dataSize() || null',
49
+ },
50
+ }]
51
+ }], propDecorators: { dataSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "data-size", required: false }] }] } });
52
+ /**
53
+ * Applies data-color attribute to host-element for all colors, including severity colors.
54
+ */
55
+ class HostColor {
56
+ /**
57
+ * Changes color for descendant Designsystemet components.
58
+ * Select from predefined colors and colors defined in theme.
59
+ * @attribute data-color
60
+ */
61
+ dataColor = input(undefined, { ...(ngDevMode ? { debugName: "dataColor" } : {}), alias: 'data-color' });
62
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: HostColor, deps: [], target: i0.ɵɵFactoryTarget.Directive });
63
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.6", type: HostColor, isStandalone: true, inputs: { dataColor: { classPropertyName: "dataColor", publicName: "data-color", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-color": "dataColor() || null" } }, ngImport: i0 });
64
+ }
65
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: HostColor, decorators: [{
66
+ type: Directive,
67
+ args: [{
68
+ host: {
69
+ '[attr.data-color]': 'dataColor() || null',
70
+ },
71
+ }]
72
+ }], propDecorators: { dataColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "data-color", required: false }] }] } });
73
+ /**
74
+ * Applies data-color attribute to host-element for severity colors.
75
+ */
76
+ class HostSeverityColors {
77
+ /**
78
+ * Changes color for descendant Designsystemet components.
79
+ * Select from predefined colors and colors defined in theme.
80
+ * @attribute data-color
81
+ */
82
+ dataColor = input(undefined, { ...(ngDevMode ? { debugName: "dataColor" } : {}), alias: 'data-color' });
83
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: HostSeverityColors, deps: [], target: i0.ɵɵFactoryTarget.Directive });
84
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.6", type: HostSeverityColors, isStandalone: true, inputs: { dataColor: { classPropertyName: "dataColor", publicName: "data-color", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-color": "dataColor() || null" } }, ngImport: i0 });
85
+ }
86
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: HostSeverityColors, decorators: [{
87
+ type: Directive,
88
+ args: [{
89
+ host: {
90
+ '[attr.data-color]': 'dataColor() || null',
91
+ },
92
+ }]
93
+ }], propDecorators: { dataColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "data-color", required: false }] }] } });
30
94
 
31
95
  const logIfDevMode = ({ component, message, }) => {
32
96
  if (isDevMode()) {
@@ -42,5 +106,5 @@ const randomId = () => {
42
106
  * Generated bundle index. Do not edit.
43
107
  */
44
108
 
45
- export { CommonInputs, logIfDevMode, randomId };
109
+ export { CommonInputs, HostColor, HostSeverityColors, HostSize, logIfDevMode, randomId };
46
110
  //# sourceMappingURL=ks-digital-designsystem-angular-__internals.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ks-digital-designsystem-angular-__internals.mjs","sources":["../../../../packages/angular/__internals/src/common-inputs.ts","../../../../packages/angular/__internals/src/log-if-devmode.ts","../../../../packages/angular/__internals/src/random-id.ts","../../../../packages/angular/__internals/src/ks-digital-designsystem-angular-__internals.ts"],"sourcesContent":["/* eslint-disable @angular-eslint/no-input-rename */\n\n/**\n * We use input aliasing to bridge the gap between Angular's camelCase property naming convention and our HTML data attributes.\n * This approach allows us to use valid HTML data attributes as documented by Designsystemet while maintaining\n * proper TypeScript intellisense support.\n *\n * Todo: Some components are using only a subset of colors, e.g., SeverityColors for Alert. We should reconsider this directive\n */\n\nimport { Directive, input } from '@angular/core'\nimport type { Color, Size } from '@digdir/designsystemet/types'\nexport type { Color, SeverityColors, Size } from '@digdir/designsystemet/types'\n\n@Directive()\nexport class CommonInputs {\n /**\n * Changes size for descendant Designsystemet components. Select from predefined sizes.\n * @attribute data-size\n */\n dataSize = input<Size>(undefined, { alias: 'data-size' })\n\n /**\n * Changes color for descendant Designsystemet components.\n * Select from predefined colors and colors defined using theme.designsystemet.no.\n * @attribute data-color\n */\n dataColor = input<Color>(undefined, { alias: 'data-color' })\n}\n","import { isDevMode } from '@angular/core'\n\nexport const logIfDevMode = ({\n component,\n message,\n}: {\n component: string\n message: string\n}) => {\n if (isDevMode()) {\n console.log(`[${component}] ${message}`)\n }\n}\n","export const randomId = () => {\n return `${Math.random().toString(36).slice(2, 7)}`\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;AAEA;;;;;;AAMG;MAOU,YAAY,CAAA;AACvB;;;AAGG;AACH,IAAA,QAAQ,GAAG,KAAK,CAAO,SAAS,4CAAI,KAAK,EAAE,WAAW,EAAA,CAAA,GAAA,CAApB,EAAE,KAAK,EAAE,WAAW,EAAE,GAAC;AAEzD;;;;AAIG;AACH,IAAA,SAAS,GAAG,KAAK,CAAQ,SAAS,6CAAI,KAAK,EAAE,YAAY,EAAA,CAAA,GAAA,CAArB,EAAE,KAAK,EAAE,YAAY,EAAE,GAAC;uGAZjD,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAZ,YAAY,EAAA,YAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,WAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,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,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBADxB;;;ACZM,MAAM,YAAY,GAAG,CAAC,EAC3B,SAAS,EACT,OAAO,GAIR,KAAI;IACH,IAAI,SAAS,EAAE,EAAE;QACf,OAAO,CAAC,GAAG,CAAC,CAAA,CAAA,EAAI,SAAS,CAAA,EAAA,EAAK,OAAO,CAAA,CAAE,CAAC;IAC1C;AACF;;ACZO,MAAM,QAAQ,GAAG,MAAK;AAC3B,IAAA,OAAO,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE;AACpD;;ACFA;;AAEG;;;;"}
1
+ {"version":3,"file":"ks-digital-designsystem-angular-__internals.mjs","sources":["../../../../packages/angular/__internals/src/host-directives.ts","../../../../packages/angular/__internals/src/log-if-devmode.ts","../../../../packages/angular/__internals/src/random-id.ts","../../../../packages/angular/__internals/src/ks-digital-designsystem-angular-__internals.ts"],"sourcesContent":["/* eslint-disable @angular-eslint/no-input-rename */\n\nimport { Directive, input } from '@angular/core'\nimport {\n ColorDefinitions,\n SeverityColorDefinitions,\n SizeDefinition,\n} from '@ks-digital/designsystem-themes/types'\n\n/**\n * @deprecated Use individual directives instead\n */\n@Directive({\n host: {\n '[attr.data-size]': 'dataSize() || null',\n '[attr.data-color]': 'dataColor() || null',\n },\n})\nexport class CommonInputs {\n /**\n * Changes size for descendant Designsystemet components. Select from predefined sizes.\n * @attribute data-size\n */\n readonly dataSize = input<keyof SizeDefinition>(undefined, {\n alias: 'data-size',\n })\n\n /**\n * Changes color for descendant Designsystemet components.\n * Select from predefined colors and colors defined in theme.\n * @attribute data-color\n */\n readonly dataColor = input<keyof ColorDefinitions>(undefined, {\n alias: 'data-color',\n })\n}\n\n/**\n * Applies data-size attribute to host-element.\n */\n@Directive({\n host: {\n '[attr.data-size]': 'dataSize() || null',\n },\n})\nexport class HostSize {\n /**\n * Changes size for descendant Designsystemet components. Select from predefined sizes.\n * @attribute data-size\n */\n readonly dataSize = input<keyof SizeDefinition>(undefined, {\n alias: 'data-size',\n })\n}\n\n/**\n * Applies data-color attribute to host-element for all colors, including severity colors.\n */\n@Directive({\n host: {\n '[attr.data-color]': 'dataColor() || null',\n },\n})\nexport class HostColor {\n /**\n * Changes color for descendant Designsystemet components.\n * Select from predefined colors and colors defined in theme.\n * @attribute data-color\n */\n readonly dataColor = input<\n keyof ColorDefinitions | keyof SeverityColorDefinitions\n >(undefined, { alias: 'data-color' })\n}\n\n/**\n * Applies data-color attribute to host-element for severity colors.\n */\n@Directive({\n host: {\n '[attr.data-color]': 'dataColor() || null',\n },\n})\nexport class HostSeverityColors {\n /**\n * Changes color for descendant Designsystemet components.\n * Select from predefined colors and colors defined in theme.\n * @attribute data-color\n */\n readonly dataColor = input<keyof SeverityColorDefinitions>(undefined, {\n alias: 'data-color',\n })\n}\n","import { isDevMode } from '@angular/core'\n\nexport const logIfDevMode = ({\n component,\n message,\n}: {\n component: string\n message: string\n}) => {\n if (isDevMode()) {\n console.log(`[${component}] ${message}`)\n }\n}\n","export const randomId = () => {\n return `${Math.random().toString(36).slice(2, 7)}`\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;AASA;;AAEG;MAOU,YAAY,CAAA;AACvB;;;AAGG;IACM,QAAQ,GAAG,KAAK,CAAuB,SAAS,qDACvD,KAAK,EAAE,WAAW,EAAA,CAClB;AAEF;;;;AAIG;IACM,SAAS,GAAG,KAAK,CAAyB,SAAS,sDAC1D,KAAK,EAAE,YAAY,EAAA,CACnB;uGAhBS,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAZ,YAAY,EAAA,YAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,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EAAA,UAAA,EAAA,EAAA,iBAAA,EAAA,qBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAL9B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,IAAI,EAAE;AACJ,wBAAA,mBAAmB,EAAE,qBAAqB;AAC3C,qBAAA;AACF,iBAAA;;;AC/EM,MAAM,YAAY,GAAG,CAAC,EAC3B,SAAS,EACT,OAAO,GAIR,KAAI;IACH,IAAI,SAAS,EAAE,EAAE;QACf,OAAO,CAAC,GAAG,CAAC,CAAA,CAAA,EAAI,SAAS,CAAA,EAAA,EAAK,OAAO,CAAA,CAAE,CAAC;IAC1C;AACF;;ACZO,MAAM,QAAQ,GAAG,MAAK;AAC3B,IAAA,OAAO,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE;AACpD;;ACFA;;AAEG;;;;"}
@@ -1,31 +1,30 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, Component } from '@angular/core';
2
+ import { Component } from '@angular/core';
3
3
  import * as i1 from '@ks-digital/designsystem-angular/__internals';
4
- import { CommonInputs } from '@ks-digital/designsystem-angular/__internals';
4
+ import { HostSize, HostSeverityColors } from '@ks-digital/designsystem-angular/__internals';
5
5
 
6
6
  /**
7
7
  * Alerts are used to inform users about important information, warnings, errors, or success.
8
8
  */
9
9
  class Alert {
10
- /**
11
- * The color variant of the alert.
12
- */
13
- /* eslint-disable-next-line @angular-eslint/no-input-rename */
14
- dataColor = input(undefined, ...(ngDevMode ? [{ debugName: "dataColor", alias: 'data-color' }] : [{ alias: 'data-color' }]));
15
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Alert, deps: [], target: i0.ɵɵFactoryTarget.Component });
16
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.9", type: Alert, isStandalone: true, selector: "ksd-alert", inputs: { dataColor: { classPropertyName: "dataColor", publicName: "data-color", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "ds-alert" }, hostDirectives: [{ directive: i1.CommonInputs, inputs: ["data-size", "data-size"] }], ngImport: i0, template: ` <ng-content />`, isInline: true, styles: [":host{display:block;--dsc-alert-icon-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M128,24A104,104,0,1,0,232,128A104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z'/%3E%3C/svg%3E\")}:host[data-color=warning]{--dsc-alert-icon-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M120,136V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0ZM232,91.55v72.9a15.86,15.86,0,0,1-4.69,11.31l-51.55,51.55A15.86,15.86,0,0,1,164.45,232H91.55a15.86,15.86,0,0,1-11.31-4.69L28.69,175.76A15.86,15.86,0,0,1,24,164.45V91.55a15.86,15.86,0,0,1,4.69-11.31L80.24,28.69A15.86,15.86,0,0,1,91.55,24h72.9a15.86,15.86,0,0,1,11.31,4.69l51.55,51.55A15.86,15.86,0,0,1,232,91.55Zm-16,0L164.45,40H91.55L40,91.55v72.9L91.55,216h72.9L216,164.45ZM128,160a12,12,0,1,0,12,12A12,12,0,0,0,128,160Z'/%3E%3C/svg%3E\")}:host[data-color=success]{--dsc-alert-icon-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z'%3E%3C/path%3E%3C/svg%3E\")}:host[data-color=danger]{--dsc-alert-icon-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M165.66,101.66,139.31,128l26.35,26.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z'%3E%3C/path%3E%3C/svg%3E\")}\n"] });
10
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: Alert, deps: [], target: i0.ɵɵFactoryTarget.Component });
11
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.6", type: Alert, isStandalone: true, selector: "ksd-alert", host: { classAttribute: "ds-alert" }, hostDirectives: [{ directive: i1.HostSize, inputs: ["data-size", "data-size"] }, { directive: i1.HostSeverityColors, inputs: ["data-color", "data-color"] }], ngImport: i0, template: ` <ng-content />`, isInline: true, styles: [":host{display:block;--dsc-alert-icon-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M128,24A104,104,0,1,0,232,128A104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z'/%3E%3C/svg%3E\")}:host[data-color=warning]{--dsc-alert-icon-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M120,136V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0ZM232,91.55v72.9a15.86,15.86,0,0,1-4.69,11.31l-51.55,51.55A15.86,15.86,0,0,1,164.45,232H91.55a15.86,15.86,0,0,1-11.31-4.69L28.69,175.76A15.86,15.86,0,0,1,24,164.45V91.55a15.86,15.86,0,0,1,4.69-11.31L80.24,28.69A15.86,15.86,0,0,1,91.55,24h72.9a15.86,15.86,0,0,1,11.31,4.69l51.55,51.55A15.86,15.86,0,0,1,232,91.55Zm-16,0L164.45,40H91.55L40,91.55v72.9L91.55,216h72.9L216,164.45ZM128,160a12,12,0,1,0,12,12A12,12,0,0,0,128,160Z'/%3E%3C/svg%3E\")}:host[data-color=success]{--dsc-alert-icon-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z'%3E%3C/path%3E%3C/svg%3E\")}:host[data-color=danger]{--dsc-alert-icon-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M165.66,101.66,139.31,128l26.35,26.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z'%3E%3C/path%3E%3C/svg%3E\")}\n"] });
17
12
  }
18
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Alert, decorators: [{
13
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: Alert, decorators: [{
19
14
  type: Component,
20
15
  args: [{ selector: 'ksd-alert', template: ` <ng-content />`, host: {
21
16
  class: 'ds-alert',
22
17
  }, hostDirectives: [
23
18
  {
24
- directive: CommonInputs,
19
+ directive: HostSize,
25
20
  inputs: ['data-size'],
26
21
  },
22
+ {
23
+ directive: HostSeverityColors,
24
+ inputs: ['data-color'],
25
+ },
27
26
  ], styles: [":host{display:block;--dsc-alert-icon-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M128,24A104,104,0,1,0,232,128A104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z'/%3E%3C/svg%3E\")}:host[data-color=warning]{--dsc-alert-icon-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M120,136V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0ZM232,91.55v72.9a15.86,15.86,0,0,1-4.69,11.31l-51.55,51.55A15.86,15.86,0,0,1,164.45,232H91.55a15.86,15.86,0,0,1-11.31-4.69L28.69,175.76A15.86,15.86,0,0,1,24,164.45V91.55a15.86,15.86,0,0,1,4.69-11.31L80.24,28.69A15.86,15.86,0,0,1,91.55,24h72.9a15.86,15.86,0,0,1,11.31,4.69l51.55,51.55A15.86,15.86,0,0,1,232,91.55Zm-16,0L164.45,40H91.55L40,91.55v72.9L91.55,216h72.9L216,164.45ZM128,160a12,12,0,1,0,12,12A12,12,0,0,0,128,160Z'/%3E%3C/svg%3E\")}:host[data-color=success]{--dsc-alert-icon-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z'%3E%3C/path%3E%3C/svg%3E\")}:host[data-color=danger]{--dsc-alert-icon-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M165.66,101.66,139.31,128l26.35,26.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z'%3E%3C/path%3E%3C/svg%3E\")}\n"] }]
28
- }], propDecorators: { dataColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "data-color", required: false }] }] } });
27
+ }] });
29
28
 
30
29
  /**
31
30
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"ks-digital-designsystem-angular-alert.mjs","sources":["../../../../packages/angular/alert/src/alert.ts","../../../../packages/angular/alert/src/ks-digital-designsystem-angular-alert.ts"],"sourcesContent":["import { Component, input } from '@angular/core'\nimport {\n CommonInputs,\n SeverityColors,\n} from '@ks-digital/designsystem-angular/__internals'\n\n/**\n * Alerts are used to inform users about important information, warnings, errors, or success.\n */\n@Component({\n selector: 'ksd-alert',\n template: ` <ng-content />`,\n host: {\n class: 'ds-alert',\n },\n /**\n * Use Phosphor Icons\n */\n styles: `\n :host {\n display: block;\n --dsc-alert-icon-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M128,24A104,104,0,1,0,232,128A104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z'/%3E%3C/svg%3E\");\n }\n :host[data-color='warning'] {\n --dsc-alert-icon-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M120,136V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0ZM232,91.55v72.9a15.86,15.86,0,0,1-4.69,11.31l-51.55,51.55A15.86,15.86,0,0,1,164.45,232H91.55a15.86,15.86,0,0,1-11.31-4.69L28.69,175.76A15.86,15.86,0,0,1,24,164.45V91.55a15.86,15.86,0,0,1,4.69-11.31L80.24,28.69A15.86,15.86,0,0,1,91.55,24h72.9a15.86,15.86,0,0,1,11.31,4.69l51.55,51.55A15.86,15.86,0,0,1,232,91.55Zm-16,0L164.45,40H91.55L40,91.55v72.9L91.55,216h72.9L216,164.45ZM128,160a12,12,0,1,0,12,12A12,12,0,0,0,128,160Z'/%3E%3C/svg%3E\");\n }\n\n :host[data-color='success'] {\n --dsc-alert-icon-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z'%3E%3C/path%3E%3C/svg%3E\");\n }\n\n :host[data-color='danger'] {\n --dsc-alert-icon-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M165.66,101.66,139.31,128l26.35,26.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z'%3E%3C/path%3E%3C/svg%3E\");\n }\n `,\n hostDirectives: [\n {\n directive: CommonInputs,\n inputs: ['data-size'],\n },\n ],\n})\nexport class Alert {\n /**\n * The color variant of the alert.\n */\n /* eslint-disable-next-line @angular-eslint/no-input-rename */\n dataColor = input<SeverityColors>(undefined, { alias: 'data-color' })\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAMA;;AAEG;MAkCU,KAAK,CAAA;AAChB;;AAEG;;AAEH,IAAA,SAAS,GAAG,KAAK,CAAiB,SAAS,6CAAI,KAAK,EAAE,YAAY,EAAA,CAAA,GAAA,CAArB,EAAE,KAAK,EAAE,YAAY,EAAE,GAAC;uGAL1D,KAAK,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAL,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAK,kVA/BN,CAAA,eAAA,CAAiB,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,85DAAA,CAAA,EAAA,CAAA;;2FA+BhB,KAAK,EAAA,UAAA,EAAA,CAAA;kBAjCjB,SAAS;+BACE,WAAW,EAAA,QAAA,EACX,iBAAiB,EAAA,IAAA,EACrB;AACJ,wBAAA,KAAK,EAAE,UAAU;qBAClB,EAAA,cAAA,EAqBe;AACd,wBAAA;AACE,4BAAA,SAAS,EAAE,YAAY;4BACvB,MAAM,EAAE,CAAC,WAAW,CAAC;AACtB,yBAAA;AACF,qBAAA,EAAA,MAAA,EAAA,CAAA,85DAAA,CAAA,EAAA;;;ACxCH;;AAEG;;;;"}
1
+ {"version":3,"file":"ks-digital-designsystem-angular-alert.mjs","sources":["../../../../packages/angular/alert/src/alert.ts","../../../../packages/angular/alert/src/ks-digital-designsystem-angular-alert.ts"],"sourcesContent":["import { Component } from '@angular/core'\nimport {\n HostSeverityColors,\n HostSize,\n} from '@ks-digital/designsystem-angular/__internals'\n\n/**\n * Alerts are used to inform users about important information, warnings, errors, or success.\n */\n@Component({\n selector: 'ksd-alert',\n template: ` <ng-content />`,\n host: {\n class: 'ds-alert',\n },\n /**\n * Use Phosphor Icons\n */\n styles: `\n :host {\n display: block;\n --dsc-alert-icon-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M128,24A104,104,0,1,0,232,128A104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z'/%3E%3C/svg%3E\");\n }\n :host[data-color='warning'] {\n --dsc-alert-icon-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M120,136V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0ZM232,91.55v72.9a15.86,15.86,0,0,1-4.69,11.31l-51.55,51.55A15.86,15.86,0,0,1,164.45,232H91.55a15.86,15.86,0,0,1-11.31-4.69L28.69,175.76A15.86,15.86,0,0,1,24,164.45V91.55a15.86,15.86,0,0,1,4.69-11.31L80.24,28.69A15.86,15.86,0,0,1,91.55,24h72.9a15.86,15.86,0,0,1,11.31,4.69l51.55,51.55A15.86,15.86,0,0,1,232,91.55Zm-16,0L164.45,40H91.55L40,91.55v72.9L91.55,216h72.9L216,164.45ZM128,160a12,12,0,1,0,12,12A12,12,0,0,0,128,160Z'/%3E%3C/svg%3E\");\n }\n\n :host[data-color='success'] {\n --dsc-alert-icon-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z'%3E%3C/path%3E%3C/svg%3E\");\n }\n\n :host[data-color='danger'] {\n --dsc-alert-icon-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M165.66,101.66,139.31,128l26.35,26.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z'%3E%3C/path%3E%3C/svg%3E\");\n }\n `,\n hostDirectives: [\n {\n directive: HostSize,\n inputs: ['data-size'],\n },\n {\n directive: HostSeverityColors,\n inputs: ['data-color'],\n },\n ],\n})\nexport class Alert {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAMA;;AAEG;MAsCU,KAAK,CAAA;uGAAL,KAAK,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAL,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAK,yQAnCN,CAAA,eAAA,CAAiB,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,85DAAA,CAAA,EAAA,CAAA;;2FAmChB,KAAK,EAAA,UAAA,EAAA,CAAA;kBArCjB,SAAS;+BACE,WAAW,EAAA,QAAA,EACX,iBAAiB,EAAA,IAAA,EACrB;AACJ,wBAAA,KAAK,EAAE,UAAU;qBAClB,EAAA,cAAA,EAqBe;AACd,wBAAA;AACE,4BAAA,SAAS,EAAE,QAAQ;4BACnB,MAAM,EAAE,CAAC,WAAW,CAAC;AACtB,yBAAA;AACD,wBAAA;AACE,4BAAA,SAAS,EAAE,kBAAkB;4BAC7B,MAAM,EAAE,CAAC,YAAY,CAAC;AACvB,yBAAA;AACF,qBAAA,EAAA,MAAA,EAAA,CAAA,85DAAA,CAAA,EAAA;;;AC5CH;;AAEG;;;;"}
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { input, booleanAttribute, Component } from '@angular/core';
3
3
  import * as i1 from '@ks-digital/designsystem-angular/__internals';
4
- import { CommonInputs } from '@ks-digital/designsystem-angular/__internals';
4
+ import { HostSize, HostColor } from '@ks-digital/designsystem-angular/__internals';
5
5
  import { Spinner } from '@ks-digital/designsystem-angular/spinner';
6
6
 
7
7
  /* eslint-disable @angular-eslint/no-input-rename */
@@ -10,38 +10,40 @@ class Button {
10
10
  * Specify which variant to use
11
11
  * @default 'primary'
12
12
  */
13
- variant = input('primary', ...(ngDevMode ? [{ debugName: "variant", alias: 'data-variant' }] : [{
14
- alias: 'data-variant',
15
- }]));
13
+ variant = input('primary', { ...(ngDevMode ? { debugName: "variant" } : {}), alias: 'data-variant' });
16
14
  /**
17
15
  * Toggle loading state.
18
16
  * Pass an element if you want to display a custom loader.
19
17
  *
20
18
  * @default false
21
19
  */
22
- loading = input(false, ...(ngDevMode ? [{ debugName: "loading", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
20
+ loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : {}), transform: booleanAttribute });
23
21
  /**
24
22
  * Disables element
25
23
  */
26
- disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
24
+ disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : {}), transform: booleanAttribute });
27
25
  /**
28
26
  * If this is a button with only an icon
29
27
  */
30
- icon = input(false, ...(ngDevMode ? [{ debugName: "icon", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
31
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Button, deps: [], target: i0.ɵɵFactoryTarget.Component });
32
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: Button, isStandalone: true, selector: "button[ksd-button], a[ksd-button]", inputs: { variant: { classPropertyName: "variant", publicName: "data-variant", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "button" }, properties: { "attr.data-variant": "variant()", "attr.data-icon": "icon() || null", "attr.disabled": "disabled() ? true : null", "attr.aria-busy": "loading() ? true : null" }, classAttribute: "ds-button" }, hostDirectives: [{ directive: i1.CommonInputs, inputs: ["data-size", "data-size", "data-color", "data-color"] }], ngImport: i0, template: `
28
+ icon = input(false, { ...(ngDevMode ? { debugName: "icon" } : {}), transform: booleanAttribute });
29
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: Button, deps: [], target: i0.ɵɵFactoryTarget.Component });
30
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: Button, isStandalone: true, selector: "button[ksd-button], a[ksd-button]", inputs: { variant: { classPropertyName: "variant", publicName: "data-variant", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "button" }, properties: { "attr.data-variant": "variant()", "attr.data-icon": "icon() || null", "attr.disabled": "disabled() ? true : null", "attr.aria-busy": "loading() ? true : null" }, classAttribute: "ds-button" }, hostDirectives: [{ directive: i1.HostSize, inputs: ["data-size", "data-size"] }, { directive: i1.HostColor, inputs: ["data-color", "data-color"] }], ngImport: i0, template: `
33
31
  @if (loading()) {
34
32
  <ksd-spinner aria-hidden="true" />
35
33
  }
36
34
  <ng-content />
37
- `, isInline: true, styles: [":host ::ng-deep>*{display:inline-flex}\n"], dependencies: [{ kind: "component", type: Spinner, selector: "ksd-spinner", inputs: ["aria-label", "data-size", "data-color", "aria-hidden"] }] });
35
+ `, isInline: true, styles: [":host ::ng-deep>*{display:inline-flex}\n"], dependencies: [{ kind: "component", type: Spinner, selector: "ksd-spinner", inputs: ["aria-label", "aria-hidden", "data-size"] }] });
38
36
  }
39
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Button, decorators: [{
37
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: Button, decorators: [{
40
38
  type: Component,
41
39
  args: [{ selector: 'button[ksd-button], a[ksd-button]', hostDirectives: [
42
40
  {
43
- directive: CommonInputs,
44
- inputs: ['data-size', 'data-color'],
41
+ directive: HostSize,
42
+ inputs: ['data-size'],
43
+ },
44
+ {
45
+ directive: HostColor,
46
+ inputs: ['data-color'],
45
47
  },
46
48
  ], imports: [Spinner], host: {
47
49
  class: 'ds-button',
@@ -1 +1 @@
1
- {"version":3,"file":"ks-digital-designsystem-angular-button.mjs","sources":["../../../../packages/angular/button/src/button.ts","../../../../packages/angular/button/src/ks-digital-designsystem-angular-button.ts"],"sourcesContent":["/* eslint-disable @angular-eslint/no-input-rename */\nimport { booleanAttribute, Component, input } from '@angular/core'\nimport { CommonInputs } from '@ks-digital/designsystem-angular/__internals'\nimport { Spinner } from '@ks-digital/designsystem-angular/spinner'\n\n@Component({\n selector: 'button[ksd-button], a[ksd-button]',\n hostDirectives: [\n {\n directive: CommonInputs,\n inputs: ['data-size', 'data-color'],\n },\n ],\n imports: [Spinner],\n host: {\n class: 'ds-button',\n type: 'button',\n '[attr.data-variant]': 'variant()',\n '[attr.data-icon]': 'icon() || null',\n '[attr.disabled]': 'disabled() ? true : null',\n '[attr.aria-busy]': 'loading() ? true : null',\n },\n styles: `\n /* Ensure transcluded icons are aligned properly */\n :host ::ng-deep > * {\n display: inline-flex;\n }\n `,\n\n template: `\n @if (loading()) {\n <ksd-spinner aria-hidden=\"true\" />\n }\n <ng-content />\n `,\n})\nexport class Button {\n /**\n * Specify which variant to use\n * @default 'primary'\n */\n readonly variant = input<'primary' | 'secondary' | 'tertiary'>('primary', {\n alias: 'data-variant',\n })\n\n /**\n * Toggle loading state.\n * Pass an element if you want to display a custom loader.\n *\n * @default false\n */\n readonly loading = input(false, { transform: booleanAttribute })\n\n /**\n * Disables element\n */\n readonly disabled = input(false, { transform: booleanAttribute })\n\n /**\n * If this is a button with only an icon\n */\n readonly icon = input(false, { transform: booleanAttribute })\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAAA;MAoCa,MAAM,CAAA;AACjB;;;AAGG;IACM,OAAO,GAAG,KAAK,CAAuC,SAAS,2CACtE,KAAK,EAAE,cAAc,EAAA,CAAA,GAAA,CADmD;AACxE,YAAA,KAAK,EAAE,cAAc;AACtB,SAAA,CAAA,CAAA,CAAC;AAEF;;;;;AAKG;AACM,IAAA,OAAO,GAAG,KAAK,CAAC,KAAK,2CAAI,SAAS,EAAE,gBAAgB,EAAA,CAAA,GAAA,CAA7B,EAAE,SAAS,EAAE,gBAAgB,EAAE,GAAC;AAEhE;;AAEG;AACM,IAAA,QAAQ,GAAG,KAAK,CAAC,KAAK,4CAAI,SAAS,EAAE,gBAAgB,EAAA,CAAA,GAAA,CAA7B,EAAE,SAAS,EAAE,gBAAgB,EAAE,GAAC;AAEjE;;AAEG;AACM,IAAA,IAAI,GAAG,KAAK,CAAC,KAAK,wCAAI,SAAS,EAAE,gBAAgB,EAAA,CAAA,GAAA,CAA7B,EAAE,SAAS,EAAE,gBAAgB,EAAE,GAAC;uGAzBlD,MAAM,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAN,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAM,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,mCAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,cAAA,EAAA,QAAA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AA,CAAA;kBA/BlB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,mCAAmC,EAAA,cAAA,EAC7B;AACd,wBAAA;AACE,4BAAA,SAAS,EAAE,YAAY;AACvB,4BAAA,MAAM,EAAE,CAAC,WAAW,EAAE,YAAY,CAAC;AACpC,yBAAA;qBACF,EAAA,OAAA,EACQ,CAAC,OAAO,CAAC,EAAA,IAAA,EACZ;AACJ,wBAAA,KAAK,EAAE,WAAW;AAClB,wBAAA,IAAI,EAAE,QAAQ;AACd,wBAAA,qBAAqB,EAAE,WAAW;AAClC,wBAAA,kBAAkB,EAAE,gBAAgB;AACpC,wBAAA,iBAAiB,EAAE,0BAA0B;AAC7C,wBAAA,kBAAkB,EAAE,yBAAyB;qBAC9C,EAAA,QAAA,EAQS;;;;;AAKT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,0CAAA,CAAA,EAAA;;;AClCH;;AAEG;;;;"}
1
+ {"version":3,"file":"ks-digital-designsystem-angular-button.mjs","sources":["../../../../packages/angular/button/src/button.ts","../../../../packages/angular/button/src/ks-digital-designsystem-angular-button.ts"],"sourcesContent":["/* eslint-disable @angular-eslint/no-input-rename */\nimport { booleanAttribute, Component, input } from '@angular/core'\nimport {\n HostColor,\n HostSize,\n} from '@ks-digital/designsystem-angular/__internals'\nimport { Spinner } from '@ks-digital/designsystem-angular/spinner'\n\n@Component({\n selector: 'button[ksd-button], a[ksd-button]',\n hostDirectives: [\n {\n directive: HostSize,\n inputs: ['data-size'],\n },\n {\n directive: HostColor,\n inputs: ['data-color'],\n },\n ],\n imports: [Spinner],\n host: {\n class: 'ds-button',\n type: 'button',\n '[attr.data-variant]': 'variant()',\n '[attr.data-icon]': 'icon() || null',\n '[attr.disabled]': 'disabled() ? true : null',\n '[attr.aria-busy]': 'loading() ? true : null',\n },\n styles: `\n /* Ensure transcluded icons are aligned properly */\n :host ::ng-deep > * {\n display: inline-flex;\n }\n `,\n\n template: `\n @if (loading()) {\n <ksd-spinner aria-hidden=\"true\" />\n }\n <ng-content />\n `,\n})\nexport class Button {\n /**\n * Specify which variant to use\n * @default 'primary'\n */\n readonly variant = input<'primary' | 'secondary' | 'tertiary'>('primary', {\n alias: 'data-variant',\n })\n\n /**\n * Toggle loading state.\n * Pass an element if you want to display a custom loader.\n *\n * @default false\n */\n readonly loading = input(false, { transform: booleanAttribute })\n\n /**\n * Disables element\n */\n readonly disabled = input(false, { transform: booleanAttribute })\n\n /**\n * If this is a button with only an icon\n */\n readonly icon = input(false, { transform: booleanAttribute })\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAAA;MA2Ca,MAAM,CAAA;AACjB;;;AAGG;IACM,OAAO,GAAG,KAAK,CAAuC,SAAS,oDACtE,KAAK,EAAE,cAAc,EAAA,CACrB;AAEF;;;;;AAKG;IACM,OAAO,GAAG,KAAK,CAAC,KAAK,oDAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAEhE;;AAEG;IACM,QAAQ,GAAG,KAAK,CAAC,KAAK,qDAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAEjE;;AAEG;IACM,IAAI,GAAG,KAAK,CAAC,KAAK,iDAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;uGAzBlD,MAAM,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAN,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAM,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,mCAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,cAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,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,CAAA;kBAnClB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,mCAAmC,EAAA,cAAA,EAC7B;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;qBACF,EAAA,OAAA,EACQ,CAAC,OAAO,CAAC,EAAA,IAAA,EACZ;AACJ,wBAAA,KAAK,EAAE,WAAW;AAClB,wBAAA,IAAI,EAAE,QAAQ;AACd,wBAAA,qBAAqB,EAAE,WAAW;AAClC,wBAAA,kBAAkB,EAAE,gBAAgB;AACpC,wBAAA,iBAAiB,EAAE,0BAA0B;AAC7C,wBAAA,kBAAkB,EAAE,yBAAyB;qBAC9C,EAAA,QAAA,EAQS;;;;;AAKT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,0CAAA,CAAA,EAAA;;;ACzCH;;AAEG;;;;"}
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { input, inject, ElementRef, Component } from '@angular/core';
3
3
  import * as i1 from '@ks-digital/designsystem-angular/__internals';
4
- import { CommonInputs } from '@ks-digital/designsystem-angular/__internals';
4
+ import { HostSize, HostColor } from '@ks-digital/designsystem-angular/__internals';
5
5
 
6
6
  class Card {
7
7
  /**
@@ -25,18 +25,22 @@ class Card {
25
25
  link.click();
26
26
  }
27
27
  };
28
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Card, deps: [], target: i0.ɵɵFactoryTarget.Component });
29
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.9", type: Card, isStandalone: true, selector: "[ksd-card]", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "handleClick($event)" }, properties: { "attr.data-variant": "variant()" }, classAttribute: "ds-card" }, hostDirectives: [{ directive: i1.CommonInputs, inputs: ["data-size", "data-size", "data-color", "data-color"] }], ngImport: i0, template: ` <ng-content /> `, isInline: true });
28
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: Card, deps: [], target: i0.ɵɵFactoryTarget.Component });
29
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.6", type: Card, isStandalone: true, selector: "[ksd-card]", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "handleClick($event)" }, properties: { "attr.data-variant": "variant()" }, classAttribute: "ds-card" }, hostDirectives: [{ directive: i1.HostSize, inputs: ["data-size", "data-size"] }, { directive: i1.HostColor, inputs: ["data-color", "data-color"] }], ngImport: i0, template: ` <ng-content /> `, isInline: true });
30
30
  }
31
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Card, decorators: [{
31
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: Card, decorators: [{
32
32
  type: Component,
33
33
  args: [{
34
34
  selector: '[ksd-card]',
35
35
  template: ` <ng-content /> `,
36
36
  hostDirectives: [
37
37
  {
38
- directive: CommonInputs,
39
- inputs: ['data-size', 'data-color'],
38
+ directive: HostSize,
39
+ inputs: ['data-size'],
40
+ },
41
+ {
42
+ directive: HostColor,
43
+ inputs: ['data-color'],
40
44
  },
41
45
  ],
42
46
  host: {
@@ -48,10 +52,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImpor
48
52
  }], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }] } });
49
53
 
50
54
  class CardBlock {
51
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: CardBlock, deps: [], target: i0.ɵɵFactoryTarget.Component });
52
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: CardBlock, isStandalone: true, selector: "[ksd-card-block]", host: { classAttribute: "ds-card__block" }, ngImport: i0, template: `<ng-content />`, isInline: true });
55
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: CardBlock, deps: [], target: i0.ɵɵFactoryTarget.Component });
56
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.6", type: CardBlock, isStandalone: true, selector: "[ksd-card-block]", host: { classAttribute: "ds-card__block" }, ngImport: i0, template: `<ng-content />`, isInline: true });
53
57
  }
54
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: CardBlock, decorators: [{
58
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: CardBlock, decorators: [{
55
59
  type: Component,
56
60
  args: [{
57
61
  selector: '[ksd-card-block]',
@@ -1 +1 @@
1
- {"version":3,"file":"ks-digital-designsystem-angular-card.mjs","sources":["../../../../packages/angular/card/src/card.ts","../../../../packages/angular/card/src/card-block.ts","../../../../packages/angular/card/src/ks-digital-designsystem-angular-card.ts"],"sourcesContent":["import { Component, ElementRef, inject, input } from '@angular/core'\nimport { CommonInputs } from '@ks-digital/designsystem-angular/__internals'\n\n@Component({\n selector: '[ksd-card]',\n template: ` <ng-content /> `,\n hostDirectives: [\n {\n directive: CommonInputs,\n inputs: ['data-size', 'data-color'],\n },\n ],\n host: {\n class: 'ds-card',\n '[attr.data-variant]': 'variant()',\n '(click)': 'handleClick($event)',\n },\n})\nexport class Card {\n /**\n * Change the background color of the card\n * @default 'default'\n */\n public variant = input<'tinted' | 'default'>('default')\n private elementRef = inject(ElementRef)\n\n private projectedLink() {\n const el = this.elementRef.nativeElement\n return el?.querySelector(\n 'h1 a, h2 a, h3 a, h4 a, h5 a, h6 a',\n ) as HTMLAnchorElement | null\n }\n\n protected handleClick = (event: MouseEvent) => {\n const link = this.projectedLink()\n if (!link) return\n\n if (event.metaKey || event.ctrlKey) {\n window.open(link.href, '_blank', 'noopener,noreferrer')\n } else {\n link.click()\n }\n }\n}\n","import { Component } from '@angular/core'\n\n@Component({\n selector: '[ksd-card-block]',\n host: {\n class: 'ds-card__block',\n },\n template: `<ng-content />`,\n})\nexport class CardBlock {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAkBa,IAAI,CAAA;AACf;;;AAGG;AACI,IAAA,OAAO,GAAG,KAAK,CAAuB,SAAS,mDAAC;AAC/C,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;IAE/B,aAAa,GAAA;AACnB,QAAA,MAAM,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa;AACxC,QAAA,OAAO,EAAE,EAAE,aAAa,CACtB,oCAAoC,CACT;IAC/B;AAEU,IAAA,WAAW,GAAG,CAAC,KAAiB,KAAI;AAC5C,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,EAAE;AACjC,QAAA,IAAI,CAAC,IAAI;YAAE;QAEX,IAAI,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,EAAE;YAClC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,qBAAqB,CAAC;QACzD;aAAO;YACL,IAAI,CAAC,KAAK,EAAE;QACd;AACF,IAAA,CAAC;uGAxBU,IAAI,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAJ,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,IAAI,wcAbL,CAAA,gBAAA,CAAkB,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;2FAajB,IAAI,EAAA,UAAA,EAAA,CAAA;kBAfhB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,YAAY;AACtB,oBAAA,QAAQ,EAAE,CAAA,gBAAA,CAAkB;AAC5B,oBAAA,cAAc,EAAE;AACd,wBAAA;AACE,4BAAA,SAAS,EAAE,YAAY;AACvB,4BAAA,MAAM,EAAE,CAAC,WAAW,EAAE,YAAY,CAAC;AACpC,yBAAA;AACF,qBAAA;AACD,oBAAA,IAAI,EAAE;AACJ,wBAAA,KAAK,EAAE,SAAS;AAChB,wBAAA,qBAAqB,EAAE,WAAW;AAClC,wBAAA,SAAS,EAAE,qBAAqB;AACjC,qBAAA;AACF,iBAAA;;;MCRY,SAAS,CAAA;uGAAT,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAT,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,SAAS,wHAFV,CAAA,cAAA,CAAgB,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;2FAEf,SAAS,EAAA,UAAA,EAAA,CAAA;kBAPrB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,IAAI,EAAE;AACJ,wBAAA,KAAK,EAAE,gBAAgB;AACxB,qBAAA;AACD,oBAAA,QAAQ,EAAE,CAAA,cAAA,CAAgB;AAC3B,iBAAA;;;ACRD;;AAEG;;;;"}
1
+ {"version":3,"file":"ks-digital-designsystem-angular-card.mjs","sources":["../../../../packages/angular/card/src/card.ts","../../../../packages/angular/card/src/card-block.ts","../../../../packages/angular/card/src/ks-digital-designsystem-angular-card.ts"],"sourcesContent":["import { Component, ElementRef, inject, input } from '@angular/core'\nimport {\n HostColor,\n HostSize,\n} from '@ks-digital/designsystem-angular/__internals'\n\n@Component({\n selector: '[ksd-card]',\n template: ` <ng-content /> `,\n hostDirectives: [\n {\n directive: HostSize,\n inputs: ['data-size'],\n },\n {\n directive: HostColor,\n inputs: ['data-color'],\n },\n ],\n host: {\n class: 'ds-card',\n '[attr.data-variant]': 'variant()',\n '(click)': 'handleClick($event)',\n },\n})\nexport class Card {\n /**\n * Change the background color of the card\n * @default 'default'\n */\n public variant = input<'tinted' | 'default'>('default')\n private elementRef = inject(ElementRef)\n\n private projectedLink() {\n const el = this.elementRef.nativeElement\n return el?.querySelector(\n 'h1 a, h2 a, h3 a, h4 a, h5 a, h6 a',\n ) as HTMLAnchorElement | null\n }\n\n protected handleClick = (event: MouseEvent) => {\n const link = this.projectedLink()\n if (!link) return\n\n if (event.metaKey || event.ctrlKey) {\n window.open(link.href, '_blank', 'noopener,noreferrer')\n } else {\n link.click()\n }\n }\n}\n","import { Component } from '@angular/core'\n\n@Component({\n selector: '[ksd-card-block]',\n host: {\n class: 'ds-card__block',\n },\n template: `<ng-content />`,\n})\nexport class CardBlock {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAyBa,IAAI,CAAA;AACf;;;AAGG;AACI,IAAA,OAAO,GAAG,KAAK,CAAuB,SAAS,mDAAC;AAC/C,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;IAE/B,aAAa,GAAA;AACnB,QAAA,MAAM,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa;AACxC,QAAA,OAAO,EAAE,EAAE,aAAa,CACtB,oCAAoC,CACT;IAC/B;AAEU,IAAA,WAAW,GAAG,CAAC,KAAiB,KAAI;AAC5C,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,EAAE;AACjC,QAAA,IAAI,CAAC,IAAI;YAAE;QAEX,IAAI,KAAK,CAAC,OAAO,IA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AA,EAAA,SAAS,wHAFV,CAAA,cAAA,CAAgB,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;2FAEf,SAAS,EAAA,UAAA,EAAA,CAAA;kBAPrB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,IAAI,EAAE;AACJ,wBAAA,KAAK,EAAE,gBAAgB;AACxB,qBAAA;AACD,oBAAA,QAAQ,EAAE,CAAA,cAAA,CAAgB;AAC3B,iBAAA;;;ACRD;;AAEG;;;;"}
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { input, Component } from '@angular/core';
3
3
  import * as i1 from '@ks-digital/designsystem-angular/__internals';
4
- import { CommonInputs } from '@ks-digital/designsystem-angular/__internals';
4
+ import { HostSize, HostColor } from '@ks-digital/designsystem-angular/__internals';
5
5
 
6
6
  class Chip {
7
7
  /**
@@ -10,11 +10,11 @@ class Chip {
10
10
  * @attribute data-removable
11
11
  */
12
12
  // eslint-disable-next-line @angular-eslint/no-input-rename
13
- dataRemovable = input(false, ...(ngDevMode ? [{ debugName: "dataRemovable", alias: 'data-removable' }] : [{ alias: 'data-removable' }]));
14
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Chip, deps: [], target: i0.ɵɵFactoryTarget.Component });
15
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.9", type: Chip, isStandalone: true, selector: "label[ksd-chip], button[ksd-chip]", inputs: { dataRemovable: { classPropertyName: "dataRemovable", publicName: "data-removable", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "ds-chip" }, hostDirectives: [{ directive: i1.CommonInputs, inputs: ["data-size", "data-size", "data-color", "data-color"] }], ngImport: i0, template: `<ng-content />`, isInline: true });
13
+ dataRemovable = input(false, { ...(ngDevMode ? { debugName: "dataRemovable" } : {}), alias: 'data-removable' });
14
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: Chip, deps: [], target: i0.ɵɵFactoryTarget.Component });
15
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.6", type: Chip, isStandalone: true, selector: "label[ksd-chip], button[ksd-chip]", inputs: { dataRemovable: { classPropertyName: "dataRemovable", publicName: "data-removable", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "ds-chip" }, hostDirectives: [{ directive: i1.HostSize, inputs: ["data-size", "data-size"] }, { directive: i1.HostColor, inputs: ["data-color", "data-color"] }], ngImport: i0, template: `<ng-content />`, isInline: true });
16
16
  }
17
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Chip, decorators: [{
17
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: Chip, decorators: [{
18
18
  type: Component,
19
19
  args: [{
20
20
  selector: 'label[ksd-chip], button[ksd-chip]',
@@ -24,8 +24,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImpor
24
24
  },
25
25
  hostDirectives: [
26
26
  {
27
- directive: CommonInputs,
28
- inputs: ['data-size', 'data-color'],
27
+ directive: HostSize,
28
+ inputs: ['data-size'],
29
+ },
30
+ {
31
+ directive: HostColor,
32
+ inputs: ['data-color'],
29
33
  },
30
34
  ],
31
35
  }]
@@ -1 +1 @@
1
- {"version":3,"file":"ks-digital-designsystem-angular-chip.mjs","sources":["../../../../packages/angular/chip/src/chip.ts","../../../../packages/angular/chip/src/ks-digital-designsystem-angular-chip.ts"],"sourcesContent":["import { Component, input } from '@angular/core'\nimport { CommonInputs } from '@ks-digital/designsystem-angular/__internals'\n\n@Component({\n selector: 'label[ksd-chip], button[ksd-chip]',\n template: `<ng-content />`,\n host: {\n class: 'ds-chip',\n },\n hostDirectives: [\n {\n directive: CommonInputs,\n inputs: ['data-size', 'data-color'],\n },\n ],\n})\nexport class Chip {\n /**\n * Whether the chip is removable or not. If true, a remove icon will be displayed.\n * If using this, you should add an aria-label as well, e.g \"Slett {item}\"\n * @attribute data-removable\n */\n // eslint-disable-next-line @angular-eslint/no-input-rename\n dataRemovable = input<boolean>(false, { alias: 'data-removable' })\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAgBa,IAAI,CAAA;AACf;;;;AAIG;;AAEH,IAAA,aAAa,GAAG,KAAK,CAAU,KAAK,iDAAI,KAAK,EAAE,gBAAgB,EAAA,CAAA,GAAA,CAAzB,EAAE,KAAK,EAAE,gBAAgB,EAAE,GAAC;uGAPvD,IAAI,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAJ,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,IAAI,iZAXL,CAAA,cAAA,CAAgB,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;2FAWf,IAAI,EAAA,UAAA,EAAA,CAAA;kBAbhB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,mCAAmC;AAC7C,oBAAA,QAAQ,EAAE,CAAA,cAAA,CAAgB;AAC1B,oBAAA,IAAI,EAAE;AACJ,wBAAA,KAAK,EAAE,SAAS;AACjB,qBAAA;AACD,oBAAA,cAAc,EAAE;AACd,wBAAA;AACE,4BAAA,SAAS,EAAE,YAAY;AACvB,4BAAA,MAAM,EAAE,CAAC,WAAW,EAAE,YAAY,CAAC;AACpC,yBAAA;AACF,qBAAA;AACF,iBAAA;;;ACfD;;AAEG;;;;"}
1
+ {"version":3,"file":"ks-digital-designsystem-angular-chip.mjs","sources":["../../../../packages/angular/chip/src/chip.ts","../../../../packages/angular/chip/src/ks-digital-designsystem-angular-chip.ts"],"sourcesContent":["import { Component, input } from '@angular/core'\nimport {\n HostColor,\n HostSize,\n} from '@ks-digital/designsystem-angular/__internals'\n\n@Component({\n selector: 'label[ksd-chip], button[ksd-chip]',\n template: `<ng-content />`,\n host: {\n class: 'ds-chip',\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 Chip {\n /**\n * Whether the chip is removable or not. If true, a remove icon will be displayed.\n * If using this, you should add an aria-label as well, e.g \"Slett {item}\"\n * @attribute data-removable\n */\n // eslint-disable-next-line @angular-eslint/no-input-rename\n dataRemovable = input<boolean>(false, { alias: 'data-removable' })\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAuBa,IAAI,CAAA;AACf;;;;AAIG;;IAEH,aAAa,GAAG,KAAK,CAAU,KAAK,0DAAI,KAAK,EAAE,gBAAgB,EAAA,CAAG;uGAPvD,IAAI,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAJ,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,IAAI,obAfL,CAAA,cAAA,CAAgB,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;2FAef,IAAI,EAAA,UAAA,EAAA,CAAA;kBAjBhB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,mCAAmC;AAC7C,oBAAA,QAAQ,EAAE,CAAA,cAAA,CAAgB;AAC1B,oBAAA,IAAI,EAAE;AACJ,wBAAA,KAAK,EAAE,SAAS;AACjB,qBAAA;AACD,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;AACF,iBAAA;;;ACtBD;;AAEG;;;;"}
@@ -1,20 +1,10 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { input, output, viewChild, CUSTOM_ELEMENTS_SCHEMA, Component } from '@angular/core';
3
+ import * as i1 from '@ks-digital/designsystem-angular/__internals';
4
+ import { HostSize, HostColor } from '@ks-digital/designsystem-angular/__internals';
3
5
  import '@u-elements/u-details';
4
6
 
5
7
  class Details {
6
- dataSize = input(undefined, ...(ngDevMode ? [{ debugName: "dataSize",
7
- // eslint-disable-next-line @angular-eslint/no-input-rename
8
- alias: 'data-size' }] : [{
9
- // eslint-disable-next-line @angular-eslint/no-input-rename
10
- alias: 'data-size',
11
- }]));
12
- dataColor = input(undefined, ...(ngDevMode ? [{ debugName: "dataColor",
13
- // eslint-disable-next-line @angular-eslint/no-input-rename
14
- alias: 'data-color' }] : [{
15
- // eslint-disable-next-line @angular-eslint/no-input-rename
16
- alias: 'data-color',
17
- }]));
18
8
  variant = input('default', ...(ngDevMode ? [{ debugName: "variant" }] : []));
19
9
  defaultOpen = input(false, ...(ngDevMode ? [{ debugName: "defaultOpen" }] : []));
20
10
  open = input(undefined, ...(ngDevMode ? [{ debugName: "open" }] : []));
@@ -26,15 +16,13 @@ class Details {
26
16
  this.toggled.emit(event);
27
17
  }
28
18
  }
29
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Details, deps: [], target: i0.ɵɵFactoryTarget.Component });
30
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.9", type: Details, isStandalone: true, selector: "ksd-details", inputs: { dataSize: { classPropertyName: "dataSize", publicName: "data-size", isSignal: true, isRequired: false, transformFunction: null }, dataColor: { classPropertyName: "dataColor", publicName: "data-color", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, defaultOpen: { classPropertyName: "defaultOpen", publicName: "defaultOpen", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { toggled: "toggled" }, viewQueries: [{ propertyName: "detailsRef", first: true, predicate: ["detailsRef"], descendants: true, isSignal: true }], ngImport: i0, template: `
19
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: Details, deps: [], target: i0.ɵɵFactoryTarget.Component });
20
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.0.6", type: Details, isStandalone: true, selector: "ksd-details", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, defaultOpen: { classPropertyName: "defaultOpen", publicName: "defaultOpen", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { toggled: "toggled" }, viewQueries: [{ propertyName: "detailsRef", first: true, predicate: ["detailsRef"], descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.HostSize, inputs: ["data-size", "data-size"] }, { directive: i1.HostColor, inputs: ["data-color", "data-color"] }], ngImport: i0, template: `
31
21
  <u-details
32
22
  #detailsRef
33
23
  class="ds-details"
34
24
  [attr.data-variant]="variant()"
35
25
  [attr.open]="(open() ?? defaultOpen()) || undefined"
36
- [attr.data-color]="dataColor()"
37
- [attr.data-size]="dataSize()"
38
26
  (toggle)="onToggle($event)"
39
27
  >
40
28
  <u-summary>
@@ -46,16 +34,23 @@ class Details {
46
34
  </u-details>
47
35
  `, isInline: true, styles: [".ds-card>:host(:last-of-type)>.ds-details{border-bottom:0}.ds-card>:host(:first-of-type)>.ds-details{border-top:0}:host(:not(:first-of-type))>.ds-details{border-top:0;margin-top:0}\n"] });
48
36
  }
49
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Details, decorators: [{
37
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: Details, decorators: [{
50
38
  type: Component,
51
- args: [{ selector: 'ksd-details', schemas: [CUSTOM_ELEMENTS_SCHEMA], template: `
39
+ args: [{ selector: 'ksd-details', schemas: [CUSTOM_ELEMENTS_SCHEMA], hostDirectives: [
40
+ {
41
+ directive: HostSize,
42
+ inputs: ['data-size'],
43
+ },
44
+ {
45
+ directive: HostColor,
46
+ inputs: ['data-color'],
47
+ },
48
+ ], template: `
52
49
  <u-details
53
50
  #detailsRef
54
51
  class="ds-details"
55
52
  [attr.data-variant]="variant()"
56
53
  [attr.open]="(open() ?? defaultOpen()) || undefined"
57
- [attr.data-color]="dataColor()"
58
- [attr.data-size]="dataSize()"
59
54
  (toggle)="onToggle($event)"
60
55
  >
61
56
  <u-summary>
@@ -66,13 +61,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImpor
66
61
  </div>
67
62
  </u-details>
68
63
  `, styles: [".ds-card>:host(:last-of-type)>.ds-details{border-bottom:0}.ds-card>:host(:first-of-type)>.ds-details{border-top:0}:host(:not(:first-of-type))>.ds-details{border-top:0;margin-top:0}\n"] }]
69
- }], propDecorators: { dataSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "data-size", required: false }] }], dataColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "data-color", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], defaultOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultOpen", required: false }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }], toggled: [{ type: i0.Output, args: ["toggled"] }], detailsRef: [{ type: i0.ViewChild, args: ['detailsRef', { isSignal: true }] }] } });
64
+ }], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], defaultOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultOpen", required: false }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }], toggled: [{ type: i0.Output, args: ["toggled"] }], detailsRef: [{ type: i0.ViewChild, args: ['detailsRef', { isSignal: true }] }] } });
70
65
 
71
66
  class DetailsContent {
72
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: DetailsContent, deps: [], target: i0.ɵɵFactoryTarget.Component });
73
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: DetailsContent, isStandalone: true, selector: "ksd-details-content", ngImport: i0, template: `<ng-content />`, isInline: true });
67
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DetailsContent, deps: [], target: i0.ɵɵFactoryTarget.Component });
68
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.6", type: DetailsContent, isStandalone: true, selector: "ksd-details-content", ngImport: i0, template: `<ng-content />`, isInline: true });
74
69
  }
75
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: DetailsContent, decorators: [{
70
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DetailsContent, decorators: [{
76
71
  type: Component,
77
72
  args: [{
78
73
  selector: 'ksd-details-content',
@@ -81,10 +76,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImpor
81
76
  }] });
82
77
 
83
78
  class DetailsSummary {
84
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: DetailsSummary, deps: [], target: i0.ɵɵFactoryTarget.Component });
85
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: DetailsSummary, isStandalone: true, selector: "ksd-details-summary", ngImport: i0, template: `<ng-content />`, isInline: true });
79
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DetailsSummary, deps: [], target: i0.ɵɵFactoryTarget.Component });
80
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.6", type: DetailsSummary, isStandalone: true, selector: "ksd-details-summary", ngImport: i0, template: `<ng-content />`, isInline: true });
86
81
  }
87
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: DetailsSummary, decorators: [{
82
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DetailsSummary, decorators: [{
88
83
  type: Component,
89
84
  args: [{
90
85
  selector: 'ksd-details-summary',