@ks-digital/designsystem-angular 0.0.1-alpha.8 → 0.0.1-alpha.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -12
- package/__internals/README.md +3 -0
- package/alert/README.md +3 -0
- package/breadcrumbs/README.md +3 -0
- package/button/README.md +3 -0
- package/card/README.md +3 -0
- package/details/README.md +3 -0
- package/dialog/README.md +3 -0
- package/dropdown/README.md +3 -0
- package/error-summary/README.md +3 -0
- package/fesm2022/ks-digital-designsystem-angular-__internals.mjs +152 -0
- package/fesm2022/ks-digital-designsystem-angular-__internals.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-alert.mjs +60 -0
- package/fesm2022/ks-digital-designsystem-angular-alert.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-breadcrumbs.mjs +87 -0
- package/fesm2022/ks-digital-designsystem-angular-breadcrumbs.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-button.mjs +200 -0
- package/fesm2022/ks-digital-designsystem-angular-button.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-card.mjs +137 -0
- package/fesm2022/ks-digital-designsystem-angular-card.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-chip.mjs +77 -0
- package/fesm2022/ks-digital-designsystem-angular-chip.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-details.mjs +149 -0
- package/fesm2022/ks-digital-designsystem-angular-details.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-dialog.mjs +107 -0
- package/fesm2022/ks-digital-designsystem-angular-dialog.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-dropdown.mjs +148 -0
- package/fesm2022/ks-digital-designsystem-angular-dropdown.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-error-summary.mjs +84 -0
- package/fesm2022/ks-digital-designsystem-angular-error-summary.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-forms.mjs +514 -0
- package/fesm2022/ks-digital-designsystem-angular-forms.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-heading.mjs +70 -0
- package/fesm2022/ks-digital-designsystem-angular-heading.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-link.mjs +60 -0
- package/fesm2022/ks-digital-designsystem-angular-link.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-pagination.mjs +471 -0
- package/fesm2022/ks-digital-designsystem-angular-pagination.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-paragraph.mjs +42 -0
- package/fesm2022/ks-digital-designsystem-angular-paragraph.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-popover.mjs +148 -0
- package/fesm2022/ks-digital-designsystem-angular-popover.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-search.mjs +281 -0
- package/fesm2022/ks-digital-designsystem-angular-search.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-skeleton.mjs +79 -0
- package/fesm2022/ks-digital-designsystem-angular-skeleton.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-spinner.mjs +183 -0
- package/fesm2022/ks-digital-designsystem-angular-spinner.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-suggestion.mjs +639 -0
- package/fesm2022/ks-digital-designsystem-angular-suggestion.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-table.mjs +248 -0
- package/fesm2022/ks-digital-designsystem-angular-table.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-tabs.mjs +325 -0
- package/fesm2022/ks-digital-designsystem-angular-tabs.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-tag.mjs +85 -0
- package/fesm2022/ks-digital-designsystem-angular-tag.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-validation-message.mjs +43 -0
- package/fesm2022/ks-digital-designsystem-angular-validation-message.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular.mjs +2 -0
- package/fesm2022/ks-digital-designsystem-angular.mjs.map +1 -0
- package/forms/README.md +3 -0
- package/heading/README.md +3 -0
- package/link/README.md +3 -0
- package/package.json +114 -28
- package/pagination/README.md +3 -0
- package/paragraph/README.md +3 -0
- package/popover/README.md +3 -0
- package/search/README.md +3 -0
- package/skeleton/README.md +3 -0
- package/spinner/README.md +3 -0
- package/suggestion/README.md +3 -0
- package/table/README.md +3 -0
- package/tabs/README.md +3 -0
- package/tag/README.md +3 -0
- package/types/ks-digital-designsystem-angular-__internals.d.ts +64 -0
- package/types/ks-digital-designsystem-angular-alert.d.ts +21 -0
- package/types/ks-digital-designsystem-angular-breadcrumbs.d.ts +29 -0
- package/types/ks-digital-designsystem-angular-button.d.ts +67 -0
- package/types/ks-digital-designsystem-angular-card.d.ts +39 -0
- package/types/ks-digital-designsystem-angular-chip.d.ts +30 -0
- package/types/ks-digital-designsystem-angular-details.d.ts +34 -0
- package/types/ks-digital-designsystem-angular-dialog.d.ts +40 -0
- package/types/ks-digital-designsystem-angular-dropdown.d.ts +44 -0
- package/types/ks-digital-designsystem-angular-error-summary.d.ts +17 -0
- package/types/ks-digital-designsystem-angular-forms.d.ts +146 -0
- package/types/ks-digital-designsystem-angular-heading.d.ts +22 -0
- package/types/ks-digital-designsystem-angular-link.d.ts +18 -0
- package/types/ks-digital-designsystem-angular-pagination.d.ts +141 -0
- package/types/ks-digital-designsystem-angular-paragraph.d.ts +5 -0
- package/types/ks-digital-designsystem-angular-popover.d.ts +44 -0
- package/types/ks-digital-designsystem-angular-search.d.ts +100 -0
- package/types/ks-digital-designsystem-angular-skeleton.d.ts +21 -0
- package/types/ks-digital-designsystem-angular-spinner.d.ts +42 -0
- package/types/ks-digital-designsystem-angular-suggestion.d.ts +198 -0
- package/types/ks-digital-designsystem-angular-table.d.ts +68 -0
- package/types/ks-digital-designsystem-angular-tabs.d.ts +105 -0
- package/types/ks-digital-designsystem-angular-tag.d.ts +30 -0
- package/types/ks-digital-designsystem-angular-validation-message.d.ts +5 -0
- package/types/ks-digital-designsystem-angular.d.ts +2 -0
- package/validation-message/README.md +3 -0
- package/dist/README.md +0 -43
- package/dist/fesm2022/ks-digital-designsystem-angular.mjs +0 -195
- package/dist/fesm2022/ks-digital-designsystem-angular.mjs.map +0 -1
- package/dist/index.d.ts +0 -75
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, Directive, ElementRef, afterNextRender, inject, input } from "@angular/core";
|
|
3
|
+
import "@digdir/designsystemet-web/clickdelegatefor";
|
|
4
|
+
import * as i1 from "@ks-digital/designsystem-angular/__internals";
|
|
5
|
+
import { HostColor, HostSize, randomId } from "@ks-digital/designsystem-angular/__internals";
|
|
6
|
+
const ATTR_CLICKDELEGATE = "data-clickdelegatefor";
|
|
7
|
+
const SELECTOR_LINK = ":is(h1,h2,h3,h4,h5,h6) a";
|
|
8
|
+
const SELECTOR_SKIP = "a,button,label,details,dialog,[role=\"button\"],[popover],[contenteditable]";
|
|
9
|
+
var Card = class Card {
|
|
10
|
+
variant = input("default", ...ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []);
|
|
11
|
+
el = inject(ElementRef);
|
|
12
|
+
destroyRef = inject(DestroyRef);
|
|
13
|
+
generatedId = `ksd-card-link-${randomId()}`;
|
|
14
|
+
originalId = null;
|
|
15
|
+
constructor() {
|
|
16
|
+
afterNextRender(() => {
|
|
17
|
+
const card = this.el.nativeElement;
|
|
18
|
+
const link = card.querySelector(SELECTOR_LINK);
|
|
19
|
+
const skip = !link || link.parentElement?.closest(SELECTOR_SKIP);
|
|
20
|
+
if (card.hasAttribute(ATTR_CLICKDELEGATE) || skip) return;
|
|
21
|
+
this.originalId = link.id || null;
|
|
22
|
+
link.id = link.id || this.generatedId;
|
|
23
|
+
card.setAttribute(ATTR_CLICKDELEGATE, link.id);
|
|
24
|
+
this.destroyRef.onDestroy(() => {
|
|
25
|
+
if (this.originalId) link.id = this.originalId;
|
|
26
|
+
else link.removeAttribute("id");
|
|
27
|
+
card.removeAttribute(ATTR_CLICKDELEGATE);
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
32
|
+
minVersion: "12.0.0",
|
|
33
|
+
version: "22.2.2",
|
|
34
|
+
ngImport: i0,
|
|
35
|
+
type: Card,
|
|
36
|
+
deps: [],
|
|
37
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
38
|
+
});
|
|
39
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
40
|
+
minVersion: "17.1.0",
|
|
41
|
+
version: "22.2.2",
|
|
42
|
+
type: Card,
|
|
43
|
+
isStandalone: true,
|
|
44
|
+
selector: "[ksd-card]",
|
|
45
|
+
inputs: { variant: {
|
|
46
|
+
classPropertyName: "variant",
|
|
47
|
+
publicName: "variant",
|
|
48
|
+
isSignal: true,
|
|
49
|
+
isRequired: false,
|
|
50
|
+
transformFunction: null
|
|
51
|
+
} },
|
|
52
|
+
host: {
|
|
53
|
+
properties: { "attr.data-variant": "variant()" },
|
|
54
|
+
classAttribute: "ds-card"
|
|
55
|
+
},
|
|
56
|
+
hostDirectives: [{
|
|
57
|
+
directive: i1.HostSize,
|
|
58
|
+
inputs: ["data-size", "data-size"]
|
|
59
|
+
}, {
|
|
60
|
+
directive: i1.HostColor,
|
|
61
|
+
inputs: ["data-color", "data-color"]
|
|
62
|
+
}],
|
|
63
|
+
ngImport: i0
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
67
|
+
minVersion: "12.0.0",
|
|
68
|
+
version: "22.2.2",
|
|
69
|
+
ngImport: i0,
|
|
70
|
+
type: Card,
|
|
71
|
+
decorators: [{
|
|
72
|
+
type: Directive,
|
|
73
|
+
args: [{
|
|
74
|
+
selector: "[ksd-card]",
|
|
75
|
+
hostDirectives: [{
|
|
76
|
+
directive: HostSize,
|
|
77
|
+
inputs: ["data-size"]
|
|
78
|
+
}, {
|
|
79
|
+
directive: HostColor,
|
|
80
|
+
inputs: ["data-color"]
|
|
81
|
+
}],
|
|
82
|
+
host: {
|
|
83
|
+
class: "ds-card",
|
|
84
|
+
"[attr.data-variant]": "variant()"
|
|
85
|
+
}
|
|
86
|
+
}]
|
|
87
|
+
}],
|
|
88
|
+
ctorParameters: () => [],
|
|
89
|
+
propDecorators: { variant: [{
|
|
90
|
+
type: i0.Input,
|
|
91
|
+
args: [{
|
|
92
|
+
isSignal: true,
|
|
93
|
+
alias: "variant",
|
|
94
|
+
required: false
|
|
95
|
+
}]
|
|
96
|
+
}] }
|
|
97
|
+
});
|
|
98
|
+
var CardBlock = class CardBlock {
|
|
99
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
100
|
+
minVersion: "12.0.0",
|
|
101
|
+
version: "22.2.2",
|
|
102
|
+
ngImport: i0,
|
|
103
|
+
type: CardBlock,
|
|
104
|
+
deps: [],
|
|
105
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
106
|
+
});
|
|
107
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
108
|
+
minVersion: "14.0.0",
|
|
109
|
+
version: "22.2.2",
|
|
110
|
+
type: CardBlock,
|
|
111
|
+
isStandalone: true,
|
|
112
|
+
selector: "[ksd-card-block]",
|
|
113
|
+
host: { classAttribute: "ds-card__block" },
|
|
114
|
+
ngImport: i0,
|
|
115
|
+
template: `<ng-content />`,
|
|
116
|
+
isInline: true,
|
|
117
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
118
|
+
});
|
|
119
|
+
};
|
|
120
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
121
|
+
minVersion: "12.0.0",
|
|
122
|
+
version: "22.2.2",
|
|
123
|
+
ngImport: i0,
|
|
124
|
+
type: CardBlock,
|
|
125
|
+
decorators: [{
|
|
126
|
+
type: Component,
|
|
127
|
+
args: [{
|
|
128
|
+
selector: "[ksd-card-block]",
|
|
129
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
130
|
+
host: { class: "ds-card__block" },
|
|
131
|
+
template: `<ng-content />`
|
|
132
|
+
}]
|
|
133
|
+
}]
|
|
134
|
+
});
|
|
135
|
+
export { Card, CardBlock };
|
|
136
|
+
|
|
137
|
+
//# sourceMappingURL=ks-digital-designsystem-angular-card.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ks-digital-designsystem-angular-card.mjs","names":[],"sources":["../../../../packages/angular/card/src/card.ts","../../../../packages/angular/card/src/card-block.ts"],"sourcesContent":["import {\n afterNextRender,\n DestroyRef,\n Directive,\n ElementRef,\n inject,\n input,\n} from '@angular/core'\nimport '@digdir/designsystemet-web/clickdelegatefor'\nimport {\n HostColor,\n HostSize,\n randomId,\n} from '@ks-digital/designsystem-angular/__internals'\n\nconst ATTR_CLICKDELEGATE = 'data-clickdelegatefor'\nconst SELECTOR_LINK = ':is(h1,h2,h3,h4,h5,h6) a'\nconst SELECTOR_SKIP =\n 'a,button,label,details,dialog,[role=\"button\"],[popover],[contenteditable]'\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[ksd-card]',\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 },\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 el = inject<ElementRef<HTMLElement>>(ElementRef)\n private destroyRef = inject(DestroyRef)\n private generatedId = `ksd-card-link-${randomId()}`\n private originalId: string | null = null\n\n constructor() {\n afterNextRender(() => {\n const card = this.el.nativeElement\n const link = card.querySelector<HTMLAnchorElement>(SELECTOR_LINK)\n const skip = !link || link.parentElement?.closest(SELECTOR_SKIP)\n\n if (card.hasAttribute(ATTR_CLICKDELEGATE) || skip) return\n\n this.originalId = link.id || null\n link.id = link.id || this.generatedId\n card.setAttribute(ATTR_CLICKDELEGATE, link.id)\n\n this.destroyRef.onDestroy(() => {\n if (this.originalId) {\n link.id = this.originalId\n } else {\n link.removeAttribute('id')\n }\n card.removeAttribute(ATTR_CLICKDELEGATE)\n })\n })\n }\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core'\n\n@Component({\n selector: '[ksd-card-block]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'ds-card__block',\n },\n template: `<ng-content />`,\n})\nexport class CardBlock {}\n"],"mappings":";;;;;AAeA,MAAM,qBAAqB;AAC3B,MAAM,gBAAgB;AACtB,MAAM,gBACJ;AAoBF,IAAa,OAAb,MAAa,KAAI;CAKR,UAAU,MAA4B,WAAU,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAC/C,KAAK,OAAgC,UAAU;CAC/C,aAAa,OAAO,UAAU;CAC9B,cAAc,iBAAiB,SAAQ;CACvC,aAA4B;CAEpC,cAAA;EACE,sBAAqB;GACnB,MAAM,OAAO,KAAK,GAAG;GACrB,MAAM,OAAO,KAAK,cAAiC,aAAa;GAChE,MAAM,OAAO,CAAC,QAAQ,KAAK,eAAe,QAAQ,aAAa;GAE/D,IAAI,KAAK,aAAa,kBAAkB,KAAK,MAAM;GAEnD,KAAK,aAAa,KAAK,MAAM;GAC7B,KAAK,KAAK,KAAK,MAAM,KAAK;GAC1B,KAAK,aAAa,oBAAoB,KAAK,EAAE;GAE7C,KAAK,WAAW,gBAAe;IAC7B,IAAI,KAAK,YACP,KAAK,KAAK,KAAK;SAEf,KAAK,gBAAgB,IAAI;IAE3B,KAAK,gBAAgB,kBAAkB;GACzC,CAAC;EACH,CAAC;CACH;CAhCW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAI,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAA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BAAiB,wBAAwB;GACzC,MAAM,EACJ,OAAO,iBACR;GACD,UAAU;EACX,CAAA"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, input } from "@angular/core";
|
|
3
|
+
import * as i1 from "@ks-digital/designsystem-angular/__internals";
|
|
4
|
+
import { HostColor, HostSize } from "@ks-digital/designsystem-angular/__internals";
|
|
5
|
+
var Chip = class Chip {
|
|
6
|
+
dataRemovable = input(false, {
|
|
7
|
+
...ngDevMode ? { debugName: "dataRemovable" } : /* istanbul ignore next */ {},
|
|
8
|
+
alias: "data-removable"
|
|
9
|
+
});
|
|
10
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
11
|
+
minVersion: "12.0.0",
|
|
12
|
+
version: "22.2.2",
|
|
13
|
+
ngImport: i0,
|
|
14
|
+
type: Chip,
|
|
15
|
+
deps: [],
|
|
16
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
17
|
+
});
|
|
18
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
19
|
+
minVersion: "17.1.0",
|
|
20
|
+
version: "22.2.2",
|
|
21
|
+
type: Chip,
|
|
22
|
+
isStandalone: true,
|
|
23
|
+
selector: "label[ksd-chip], button[ksd-chip]",
|
|
24
|
+
inputs: { dataRemovable: {
|
|
25
|
+
classPropertyName: "dataRemovable",
|
|
26
|
+
publicName: "data-removable",
|
|
27
|
+
isSignal: true,
|
|
28
|
+
isRequired: false,
|
|
29
|
+
transformFunction: null
|
|
30
|
+
} },
|
|
31
|
+
host: { classAttribute: "ds-chip" },
|
|
32
|
+
hostDirectives: [{
|
|
33
|
+
directive: i1.HostSize,
|
|
34
|
+
inputs: ["data-size", "data-size"]
|
|
35
|
+
}, {
|
|
36
|
+
directive: i1.HostColor,
|
|
37
|
+
inputs: ["data-color", "data-color"]
|
|
38
|
+
}],
|
|
39
|
+
ngImport: i0,
|
|
40
|
+
template: `<ng-content />`,
|
|
41
|
+
isInline: true,
|
|
42
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
46
|
+
minVersion: "12.0.0",
|
|
47
|
+
version: "22.2.2",
|
|
48
|
+
ngImport: i0,
|
|
49
|
+
type: Chip,
|
|
50
|
+
decorators: [{
|
|
51
|
+
type: Component,
|
|
52
|
+
args: [{
|
|
53
|
+
selector: "label[ksd-chip], button[ksd-chip]",
|
|
54
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
55
|
+
template: `<ng-content />`,
|
|
56
|
+
host: { class: "ds-chip" },
|
|
57
|
+
hostDirectives: [{
|
|
58
|
+
directive: HostSize,
|
|
59
|
+
inputs: ["data-size"]
|
|
60
|
+
}, {
|
|
61
|
+
directive: HostColor,
|
|
62
|
+
inputs: ["data-color"]
|
|
63
|
+
}]
|
|
64
|
+
}]
|
|
65
|
+
}],
|
|
66
|
+
propDecorators: { dataRemovable: [{
|
|
67
|
+
type: i0.Input,
|
|
68
|
+
args: [{
|
|
69
|
+
isSignal: true,
|
|
70
|
+
alias: "data-removable",
|
|
71
|
+
required: false
|
|
72
|
+
}]
|
|
73
|
+
}] }
|
|
74
|
+
});
|
|
75
|
+
export { Chip };
|
|
76
|
+
|
|
77
|
+
//# sourceMappingURL=ks-digital-designsystem-angular-chip.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ks-digital-designsystem-angular-chip.mjs","names":[],"sources":["../../../../packages/angular/chip/src/chip.ts"],"sourcesContent":["import { ChangeDetectionStrategy, 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 changeDetection: ChangeDetectionStrategy.OnPush,\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 dataRemovable = input<boolean>(false, { alias: 'data-removable' })\n}\n"],"mappings":";;;;AAwBA,IAAa,OAAb,MAAa,KAAI;CAMf,gBAAgB,MAAe,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,gBAAA,+BAAA,CAAA;EAAI,OAAO;CAAgB,CAAA;CANpD,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAI,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAJ,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAI,cAAA;EAAA,UAAA;EAAA,QAAA,EAAA,eAAA;GAAA,mBAAA;GAAA,YAAA;GAAA,UAAA;GAAA,YAAA;GAAA,mBAAA;EAAA,EAAA;EAAA,MAAA,EAAA,gBAAA,UAAA;EAAA,gBAAA,CAAA;GAAA,WAAA,GAAA;GAAA,QAAA,CAAA,aAAA,WAAA;EAAA,GAAA;GAAA,WAAA,GAAA;GAAA,QAAA,CAAA,cAAA,YAAA;EAAA,CAAA;EAAA,UAAA;EAAA,UAfL;EAAgB,UAAA;EAAA,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAef,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAI,YAAA,CAAA;EAlBhB,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,iBAAiB,wBAAwB;GACzC,UAAU;GACV,MAAM,EACJ,OAAO,UACR;GACD,gBAAgB,CACd;IACE,WAAW;IACX,QAAQ,CAAC,WAAW;GACrB,GACD;IACE,WAAW;IACX,QAAQ,CAAC,YAAY;GACtB,CACF;EACF,CAAA"}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, Directive, input } from "@angular/core";
|
|
3
|
+
import "@digdir/designsystemet-web/details";
|
|
4
|
+
import * as i1 from "@ks-digital/designsystem-angular/__internals";
|
|
5
|
+
import { HostColor, HostSize } from "@ks-digital/designsystem-angular/__internals";
|
|
6
|
+
var Details = class Details {
|
|
7
|
+
dataVariant = input("default", {
|
|
8
|
+
...ngDevMode ? { debugName: "dataVariant" } : /* istanbul ignore next */ {},
|
|
9
|
+
alias: "data-variant"
|
|
10
|
+
});
|
|
11
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
12
|
+
minVersion: "12.0.0",
|
|
13
|
+
version: "22.2.2",
|
|
14
|
+
ngImport: i0,
|
|
15
|
+
type: Details,
|
|
16
|
+
deps: [],
|
|
17
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
18
|
+
});
|
|
19
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
20
|
+
minVersion: "17.1.0",
|
|
21
|
+
version: "22.2.2",
|
|
22
|
+
type: Details,
|
|
23
|
+
isStandalone: true,
|
|
24
|
+
selector: "details[ksd-details]",
|
|
25
|
+
inputs: { dataVariant: {
|
|
26
|
+
classPropertyName: "dataVariant",
|
|
27
|
+
publicName: "data-variant",
|
|
28
|
+
isSignal: true,
|
|
29
|
+
isRequired: false,
|
|
30
|
+
transformFunction: null
|
|
31
|
+
} },
|
|
32
|
+
host: {
|
|
33
|
+
properties: { "attr.data-variant": "dataVariant()" },
|
|
34
|
+
classAttribute: "ds-details"
|
|
35
|
+
},
|
|
36
|
+
hostDirectives: [{
|
|
37
|
+
directive: i1.HostSize,
|
|
38
|
+
inputs: ["data-size", "data-size"]
|
|
39
|
+
}, {
|
|
40
|
+
directive: i1.HostColor,
|
|
41
|
+
inputs: ["data-color", "data-color"]
|
|
42
|
+
}],
|
|
43
|
+
ngImport: i0
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
47
|
+
minVersion: "12.0.0",
|
|
48
|
+
version: "22.2.2",
|
|
49
|
+
ngImport: i0,
|
|
50
|
+
type: Details,
|
|
51
|
+
decorators: [{
|
|
52
|
+
type: Directive,
|
|
53
|
+
args: [{
|
|
54
|
+
selector: "details[ksd-details]",
|
|
55
|
+
hostDirectives: [{
|
|
56
|
+
directive: HostSize,
|
|
57
|
+
inputs: ["data-size"]
|
|
58
|
+
}, {
|
|
59
|
+
directive: HostColor,
|
|
60
|
+
inputs: ["data-color"]
|
|
61
|
+
}],
|
|
62
|
+
host: {
|
|
63
|
+
class: "ds-details",
|
|
64
|
+
"[attr.data-variant]": "dataVariant()"
|
|
65
|
+
}
|
|
66
|
+
}]
|
|
67
|
+
}],
|
|
68
|
+
propDecorators: { dataVariant: [{
|
|
69
|
+
type: i0.Input,
|
|
70
|
+
args: [{
|
|
71
|
+
isSignal: true,
|
|
72
|
+
alias: "data-variant",
|
|
73
|
+
required: false
|
|
74
|
+
}]
|
|
75
|
+
}] }
|
|
76
|
+
});
|
|
77
|
+
var DetailsContent = class DetailsContent {
|
|
78
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
79
|
+
minVersion: "12.0.0",
|
|
80
|
+
version: "22.2.2",
|
|
81
|
+
ngImport: i0,
|
|
82
|
+
type: DetailsContent,
|
|
83
|
+
deps: [],
|
|
84
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
85
|
+
});
|
|
86
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
87
|
+
minVersion: "14.0.0",
|
|
88
|
+
version: "22.2.2",
|
|
89
|
+
type: DetailsContent,
|
|
90
|
+
isStandalone: true,
|
|
91
|
+
selector: "ksd-details-content",
|
|
92
|
+
ngImport: i0,
|
|
93
|
+
template: `<ng-content />`,
|
|
94
|
+
isInline: true,
|
|
95
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
99
|
+
minVersion: "12.0.0",
|
|
100
|
+
version: "22.2.2",
|
|
101
|
+
ngImport: i0,
|
|
102
|
+
type: DetailsContent,
|
|
103
|
+
decorators: [{
|
|
104
|
+
type: Component,
|
|
105
|
+
args: [{
|
|
106
|
+
selector: "ksd-details-content",
|
|
107
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
108
|
+
template: `<ng-content />`
|
|
109
|
+
}]
|
|
110
|
+
}]
|
|
111
|
+
});
|
|
112
|
+
var DetailsSummary = class DetailsSummary {
|
|
113
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
114
|
+
minVersion: "12.0.0",
|
|
115
|
+
version: "22.2.2",
|
|
116
|
+
ngImport: i0,
|
|
117
|
+
type: DetailsSummary,
|
|
118
|
+
deps: [],
|
|
119
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
120
|
+
});
|
|
121
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
122
|
+
minVersion: "14.0.0",
|
|
123
|
+
version: "22.2.2",
|
|
124
|
+
type: DetailsSummary,
|
|
125
|
+
isStandalone: true,
|
|
126
|
+
selector: "ksd-details-summary",
|
|
127
|
+
ngImport: i0,
|
|
128
|
+
template: `<ng-content />`,
|
|
129
|
+
isInline: true,
|
|
130
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
131
|
+
});
|
|
132
|
+
};
|
|
133
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
134
|
+
minVersion: "12.0.0",
|
|
135
|
+
version: "22.2.2",
|
|
136
|
+
ngImport: i0,
|
|
137
|
+
type: DetailsSummary,
|
|
138
|
+
decorators: [{
|
|
139
|
+
type: Component,
|
|
140
|
+
args: [{
|
|
141
|
+
selector: "ksd-details-summary",
|
|
142
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
143
|
+
template: `<ng-content />`
|
|
144
|
+
}]
|
|
145
|
+
}]
|
|
146
|
+
});
|
|
147
|
+
export { Details, DetailsContent, DetailsSummary };
|
|
148
|
+
|
|
149
|
+
//# sourceMappingURL=ks-digital-designsystem-angular-details.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ks-digital-designsystem-angular-details.mjs","names":[],"sources":["../../../../packages/angular/details/src/details.ts","../../../../packages/angular/details/src/details-content.ts","../../../../packages/angular/details/src/details-summary.ts"],"sourcesContent":["import { Directive, input } from '@angular/core'\nimport '@digdir/designsystemet-web/details'\nimport {\n HostColor,\n HostSize,\n} from '@ks-digital/designsystem-angular/__internals'\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'details[ksd-details]',\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-details',\n '[attr.data-variant]': 'dataVariant()',\n },\n})\nexport class Details {\n readonly dataVariant = input<'default' | 'tinted'>('default', {\n alias: 'data-variant',\n })\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core'\n\n@Component({\n selector: 'ksd-details-content',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `<ng-content />`,\n})\nexport class DetailsContent {}\n","import { ChangeDetectionStrategy, Component } from '@angular/core'\n\n@Component({\n selector: 'ksd-details-summary',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `<ng-content />`,\n})\nexport class DetailsSummary {}\n"],"mappings":";;;;;AAyBA,IAAa,UAAb,MAAa,QAAO;CACT,cAAc,MAA4B,WAAS;EAAA,GAAA,YAAA,EAAA,WAAA,cAAA,+BAAA,CAAA;EAC1D,OAAO;CAAc,CAAA;CAFZ,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAO,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAP,OAAA,OAAA,GAAA,qBAAA;EAAA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,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAc,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAd,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAc,cAAA;EAAA,UAAA;EAAA,UAAA;EAAA,UAFf;EAAgB,UAAA;EAAA,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAEf,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAc,YAAA,CAAA;EAL1B,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,iBAAiB,wBAAwB;GACzC,UAAU;EACX,CAAA"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Directive, input } from "@angular/core";
|
|
3
|
+
import "@digdir/designsystemet-web/dialog";
|
|
4
|
+
import "@digdir/designsystemet-web/invokers";
|
|
5
|
+
import * as i1 from "@ks-digital/designsystem-angular/__internals";
|
|
6
|
+
import { HostColor, HostSize } from "@ks-digital/designsystem-angular/__internals";
|
|
7
|
+
var Dialog = class Dialog {
|
|
8
|
+
placement = input(void 0, {
|
|
9
|
+
...ngDevMode ? { debugName: "placement" } : /* istanbul ignore next */ {},
|
|
10
|
+
alias: "data-placement"
|
|
11
|
+
});
|
|
12
|
+
closedBy = input(void 0, {
|
|
13
|
+
...ngDevMode ? { debugName: "closedBy" } : /* istanbul ignore next */ {},
|
|
14
|
+
alias: "closedby"
|
|
15
|
+
});
|
|
16
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
17
|
+
minVersion: "12.0.0",
|
|
18
|
+
version: "22.2.2",
|
|
19
|
+
ngImport: i0,
|
|
20
|
+
type: Dialog,
|
|
21
|
+
deps: [],
|
|
22
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
23
|
+
});
|
|
24
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
25
|
+
minVersion: "17.1.0",
|
|
26
|
+
version: "22.2.2",
|
|
27
|
+
type: Dialog,
|
|
28
|
+
isStandalone: true,
|
|
29
|
+
selector: "dialog[ksd-dialog]",
|
|
30
|
+
inputs: {
|
|
31
|
+
placement: {
|
|
32
|
+
classPropertyName: "placement",
|
|
33
|
+
publicName: "data-placement",
|
|
34
|
+
isSignal: true,
|
|
35
|
+
isRequired: false,
|
|
36
|
+
transformFunction: null
|
|
37
|
+
},
|
|
38
|
+
closedBy: {
|
|
39
|
+
classPropertyName: "closedBy",
|
|
40
|
+
publicName: "closedby",
|
|
41
|
+
isSignal: true,
|
|
42
|
+
isRequired: false,
|
|
43
|
+
transformFunction: null
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
host: {
|
|
47
|
+
properties: {
|
|
48
|
+
"attr.data-placement": "placement() || undefined",
|
|
49
|
+
"attr.closedby": "closedBy() || null"
|
|
50
|
+
},
|
|
51
|
+
classAttribute: "ds-dialog"
|
|
52
|
+
},
|
|
53
|
+
hostDirectives: [{
|
|
54
|
+
directive: i1.HostSize,
|
|
55
|
+
inputs: ["data-size", "data-size"]
|
|
56
|
+
}, {
|
|
57
|
+
directive: i1.HostColor,
|
|
58
|
+
inputs: ["data-color", "data-color"]
|
|
59
|
+
}],
|
|
60
|
+
ngImport: i0
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
64
|
+
minVersion: "12.0.0",
|
|
65
|
+
version: "22.2.2",
|
|
66
|
+
ngImport: i0,
|
|
67
|
+
type: Dialog,
|
|
68
|
+
decorators: [{
|
|
69
|
+
type: Directive,
|
|
70
|
+
args: [{
|
|
71
|
+
selector: "dialog[ksd-dialog]",
|
|
72
|
+
hostDirectives: [{
|
|
73
|
+
directive: HostSize,
|
|
74
|
+
inputs: ["data-size"]
|
|
75
|
+
}, {
|
|
76
|
+
directive: HostColor,
|
|
77
|
+
inputs: ["data-color"]
|
|
78
|
+
}],
|
|
79
|
+
host: {
|
|
80
|
+
class: "ds-dialog",
|
|
81
|
+
"[attr.data-placement]": "placement() || undefined",
|
|
82
|
+
"[attr.closedby]": "closedBy() || null"
|
|
83
|
+
}
|
|
84
|
+
}]
|
|
85
|
+
}],
|
|
86
|
+
propDecorators: {
|
|
87
|
+
placement: [{
|
|
88
|
+
type: i0.Input,
|
|
89
|
+
args: [{
|
|
90
|
+
isSignal: true,
|
|
91
|
+
alias: "data-placement",
|
|
92
|
+
required: false
|
|
93
|
+
}]
|
|
94
|
+
}],
|
|
95
|
+
closedBy: [{
|
|
96
|
+
type: i0.Input,
|
|
97
|
+
args: [{
|
|
98
|
+
isSignal: true,
|
|
99
|
+
alias: "closedby",
|
|
100
|
+
required: false
|
|
101
|
+
}]
|
|
102
|
+
}]
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
export { Dialog };
|
|
106
|
+
|
|
107
|
+
//# sourceMappingURL=ks-digital-designsystem-angular-dialog.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ks-digital-designsystem-angular-dialog.mjs","names":[],"sources":["../../../../packages/angular/dialog/src/dialog.ts"],"sourcesContent":["import { Directive, input } from '@angular/core'\nimport '@digdir/designsystemet-web/dialog'\n// dialog.js reacts to `command` events but does not load the polyfill itself\nimport '@digdir/designsystemet-web/invokers'\nimport {\n HostColor,\n HostSize,\n} from '@ks-digital/designsystem-angular/__internals'\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'dialog[ksd-dialog]',\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-dialog',\n '[attr.data-placement]': 'placement() || undefined',\n '[attr.closedby]': 'closedBy() || null',\n },\n})\nexport class Dialog {\n /** Controls where the dialog appears relative to the viewport edge. Useful for drawer/side-panel variants. */\n readonly placement = input<'bottom' | 'top' | 'left' | 'right' | undefined>(\n undefined,\n { alias: 'data-placement' },\n )\n\n /**\n * Controls which interactions close the dialog.\n * - `any` — closes on backdrop click or Escape key\n * - `closerequest` — closes on Escape key only\n * - `none` — the dialog cannot be closed by the user without an explicit close button\n */\n readonly closedBy = input<'any' | 'closerequest' | 'none' | undefined>(\n undefined,\n { alias: 'closedby' },\n )\n}\n"],"mappings":";;;;;;AA4BA,IAAa,SAAb,MAAa,OAAM;CAER,YAAY,MACnB,QAAS;EAAA,GAAA,YAAA,EAAA,WAAA,YAAA,+BAAA,CAAA;EACP,OAAO;CAAgB,CAAA;CASlB,WAAW,MAClB,QAAS;EAAA,GAAA,YAAA,EAAA,WAAA,WAAA,+BAAA,CAAA;EACP,OAAO;CAAU,CAAA;CAfV,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAM,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAN,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAM,cAAA;EAAA,UAAA;EAAA,QAAA;GAAA,WAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,UAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;EAAA;EAAA,MAAA;GAAA,YAAA;IAAA,uBAAA;IAAA,iBAAA;GAAA;GAAA,gBAAA;EAAA;EAAA,gBAAA,CAAA;GAAA,WAAA,GAAA;GAAA,QAAA,CAAA,aAAA,WAAA;EAAA,GAAA;GAAA,WAAA,GAAA;GAAA,QAAA,CAAA,cAAA,YAAA;EAAA,CAAA;EAAA,UAAA;CAAA,CAAA;;AAAN,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAM,YAAA,CAAA;EAnBlB,MAAA;EAAU,MAAA,CAAA;GAET,UAAU;GACV,gBAAgB,CACd;IACE,WAAW;IACX,QAAQ,CAAC,WAAW;GACrB,GACD;IACE,WAAW;IACX,QAAQ,CAAC,YAAY;GACtB,CACF;GACD,MAAM;IACJ,OAAO;IACP,yBAAyB;IACzB,mBAAmB;GACpB;EACF,CAAA"}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Directive, booleanAttribute, input } from "@angular/core";
|
|
3
|
+
import "@digdir/designsystemet-web/popover";
|
|
4
|
+
import * as i1 from "@ks-digital/designsystem-angular/__internals";
|
|
5
|
+
import { HostColor, HostSize } from "@ks-digital/designsystem-angular/__internals";
|
|
6
|
+
var Dropdown = class Dropdown {
|
|
7
|
+
autoPlacement = input(true, {
|
|
8
|
+
...ngDevMode ? { debugName: "autoPlacement" } : /* istanbul ignore next */ {},
|
|
9
|
+
transform: booleanAttribute
|
|
10
|
+
});
|
|
11
|
+
variant = input("default", {
|
|
12
|
+
...ngDevMode ? { debugName: "variant" } : /* istanbul ignore next */ {},
|
|
13
|
+
alias: "data-variant"
|
|
14
|
+
});
|
|
15
|
+
placement = input("top", {
|
|
16
|
+
...ngDevMode ? { debugName: "placement" } : /* istanbul ignore next */ {},
|
|
17
|
+
alias: "data-placement"
|
|
18
|
+
});
|
|
19
|
+
popover = input("auto", {
|
|
20
|
+
...ngDevMode ? { debugName: "popover" } : /* istanbul ignore next */ {},
|
|
21
|
+
alias: "popover"
|
|
22
|
+
});
|
|
23
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
24
|
+
minVersion: "12.0.0",
|
|
25
|
+
version: "22.2.2",
|
|
26
|
+
ngImport: i0,
|
|
27
|
+
type: Dropdown,
|
|
28
|
+
deps: [],
|
|
29
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
30
|
+
});
|
|
31
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
32
|
+
minVersion: "17.1.0",
|
|
33
|
+
version: "22.2.2",
|
|
34
|
+
type: Dropdown,
|
|
35
|
+
isStandalone: true,
|
|
36
|
+
selector: "[ksd-dropdown]",
|
|
37
|
+
inputs: {
|
|
38
|
+
autoPlacement: {
|
|
39
|
+
classPropertyName: "autoPlacement",
|
|
40
|
+
publicName: "autoPlacement",
|
|
41
|
+
isSignal: true,
|
|
42
|
+
isRequired: false,
|
|
43
|
+
transformFunction: null
|
|
44
|
+
},
|
|
45
|
+
variant: {
|
|
46
|
+
classPropertyName: "variant",
|
|
47
|
+
publicName: "data-variant",
|
|
48
|
+
isSignal: true,
|
|
49
|
+
isRequired: false,
|
|
50
|
+
transformFunction: null
|
|
51
|
+
},
|
|
52
|
+
placement: {
|
|
53
|
+
classPropertyName: "placement",
|
|
54
|
+
publicName: "data-placement",
|
|
55
|
+
isSignal: true,
|
|
56
|
+
isRequired: false,
|
|
57
|
+
transformFunction: null
|
|
58
|
+
},
|
|
59
|
+
popover: {
|
|
60
|
+
classPropertyName: "popover",
|
|
61
|
+
publicName: "popover",
|
|
62
|
+
isSignal: true,
|
|
63
|
+
isRequired: false,
|
|
64
|
+
transformFunction: null
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
host: {
|
|
68
|
+
properties: {
|
|
69
|
+
"attr.data-variant": "variant()",
|
|
70
|
+
"attr.data-placement": "placement()",
|
|
71
|
+
"attr.data-autoplacement": "autoPlacement()",
|
|
72
|
+
"attr.popover": "popover()"
|
|
73
|
+
},
|
|
74
|
+
classAttribute: "ds-popover ds-dropdown"
|
|
75
|
+
},
|
|
76
|
+
hostDirectives: [{
|
|
77
|
+
directive: i1.HostSize,
|
|
78
|
+
inputs: ["data-size", "data-size"]
|
|
79
|
+
}, {
|
|
80
|
+
directive: i1.HostColor,
|
|
81
|
+
inputs: ["data-color", "data-color"]
|
|
82
|
+
}],
|
|
83
|
+
ngImport: i0
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
87
|
+
minVersion: "12.0.0",
|
|
88
|
+
version: "22.2.2",
|
|
89
|
+
ngImport: i0,
|
|
90
|
+
type: Dropdown,
|
|
91
|
+
decorators: [{
|
|
92
|
+
type: Directive,
|
|
93
|
+
args: [{
|
|
94
|
+
selector: "[ksd-dropdown]",
|
|
95
|
+
hostDirectives: [{
|
|
96
|
+
directive: HostSize,
|
|
97
|
+
inputs: ["data-size"]
|
|
98
|
+
}, {
|
|
99
|
+
directive: HostColor,
|
|
100
|
+
inputs: ["data-color"]
|
|
101
|
+
}],
|
|
102
|
+
host: {
|
|
103
|
+
class: "ds-popover ds-dropdown",
|
|
104
|
+
"[attr.data-variant]": "variant()",
|
|
105
|
+
"[attr.data-placement]": "placement()",
|
|
106
|
+
"[attr.data-autoplacement]": "autoPlacement()",
|
|
107
|
+
"[attr.popover]": "popover()"
|
|
108
|
+
}
|
|
109
|
+
}]
|
|
110
|
+
}],
|
|
111
|
+
propDecorators: {
|
|
112
|
+
autoPlacement: [{
|
|
113
|
+
type: i0.Input,
|
|
114
|
+
args: [{
|
|
115
|
+
isSignal: true,
|
|
116
|
+
alias: "autoPlacement",
|
|
117
|
+
required: false
|
|
118
|
+
}]
|
|
119
|
+
}],
|
|
120
|
+
variant: [{
|
|
121
|
+
type: i0.Input,
|
|
122
|
+
args: [{
|
|
123
|
+
isSignal: true,
|
|
124
|
+
alias: "data-variant",
|
|
125
|
+
required: false
|
|
126
|
+
}]
|
|
127
|
+
}],
|
|
128
|
+
placement: [{
|
|
129
|
+
type: i0.Input,
|
|
130
|
+
args: [{
|
|
131
|
+
isSignal: true,
|
|
132
|
+
alias: "data-placement",
|
|
133
|
+
required: false
|
|
134
|
+
}]
|
|
135
|
+
}],
|
|
136
|
+
popover: [{
|
|
137
|
+
type: i0.Input,
|
|
138
|
+
args: [{
|
|
139
|
+
isSignal: true,
|
|
140
|
+
alias: "popover",
|
|
141
|
+
required: false
|
|
142
|
+
}]
|
|
143
|
+
}]
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
export { Dropdown };
|
|
147
|
+
|
|
148
|
+
//# sourceMappingURL=ks-digital-designsystem-angular-dropdown.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ks-digital-designsystem-angular-dropdown.mjs","names":[],"sources":["../../../../packages/angular/dropdown/src/dropdown.ts"],"sourcesContent":["import { booleanAttribute, Directive, input } from '@angular/core'\nimport '@digdir/designsystemet-web/popover'\nimport {\n HostColor,\n HostSize,\n} from '@ks-digital/designsystem-angular/__internals'\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[ksd-dropdown]',\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-popover ds-dropdown',\n '[attr.data-variant]': 'variant()',\n '[attr.data-placement]': 'placement()',\n '[attr.data-autoplacement]': 'autoPlacement()',\n '[attr.popover]': 'popover()',\n },\n})\nexport class Dropdown {\n readonly autoPlacement = input(true, { transform: booleanAttribute })\n readonly variant = input<'tinted' | 'default'>('default', {\n alias: 'data-variant',\n })\n\n // Todo: replace with centralized types\n readonly placement = input<\n | 'bottom'\n | 'bottom-end'\n | 'bottom-start'\n | 'left'\n | 'left-end'\n | 'left-start'\n | 'right'\n | 'right-end'\n | 'right-start'\n | 'top'\n | 'top-end'\n | 'top-start'\n >('top', { alias: 'data-placement' })\n\n readonly popover = input<'auto' | 'manual'>('auto', { alias: 'popover' })\n}\n"],"mappings":";;;;;AA4BA,IAAa,WAAb,MAAa,SAAQ;CACV,gBAAgB,MAAM,MAAI;EAAA,GAAA,YAAA,EAAA,WAAA,gBAAA,+BAAA,CAAA;EAAI,WAAW;CAAgB,CAAA;CACzD,UAAU,MAA4B,WAAS;EAAA,GAAA,YAAA,EAAA,WAAA,UAAA,+BAAA,CAAA;EACtD,OAAO;CAAc,CAAA;CAId,YAAY,MAanB,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,YAAA,+B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