@ks-digital/designsystem-angular 0.0.1-alpha.7 → 0.0.1-alpha.70
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 +28 -11
- 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 +82 -0
- package/fesm2022/ks-digital-designsystem-angular-__internals.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-alert.mjs +34 -0
- package/fesm2022/ks-digital-designsystem-angular-alert.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-breadcrumbs.mjs +51 -0
- package/fesm2022/ks-digital-designsystem-angular-breadcrumbs.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-button.mjs +74 -0
- package/fesm2022/ks-digital-designsystem-angular-button.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-card.mjs +86 -0
- package/fesm2022/ks-digital-designsystem-angular-card.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-chip.mjs +43 -0
- package/fesm2022/ks-digital-designsystem-angular-chip.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-details.mjs +64 -0
- package/fesm2022/ks-digital-designsystem-angular-details.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-dialog.mjs +48 -0
- package/fesm2022/ks-digital-designsystem-angular-dialog.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-dropdown.mjs +46 -0
- package/fesm2022/ks-digital-designsystem-angular-dropdown.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-error-summary.mjs +49 -0
- package/fesm2022/ks-digital-designsystem-angular-error-summary.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-forms.mjs +227 -0
- package/fesm2022/ks-digital-designsystem-angular-forms.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-heading.mjs +40 -0
- package/fesm2022/ks-digital-designsystem-angular-heading.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-link.mjs +31 -0
- package/fesm2022/ks-digital-designsystem-angular-link.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-pagination.mjs +143 -0
- package/fesm2022/ks-digital-designsystem-angular-pagination.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-paragraph.mjs +25 -0
- package/fesm2022/ks-digital-designsystem-angular-paragraph.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-popover.mjs +46 -0
- package/fesm2022/ks-digital-designsystem-angular-popover.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-search.mjs +159 -0
- package/fesm2022/ks-digital-designsystem-angular-search.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-skeleton.mjs +35 -0
- package/fesm2022/ks-digital-designsystem-angular-skeleton.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-spinner.mjs +104 -0
- package/fesm2022/ks-digital-designsystem-angular-spinner.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-suggestion.mjs +375 -0
- package/fesm2022/ks-digital-designsystem-angular-suggestion.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-table.mjs +105 -0
- package/fesm2022/ks-digital-designsystem-angular-table.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-tabs.mjs +148 -0
- package/fesm2022/ks-digital-designsystem-angular-tabs.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-tag.mjs +38 -0
- package/fesm2022/ks-digital-designsystem-angular-tag.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-validation-message.mjs +25 -0
- package/fesm2022/ks-digital-designsystem-angular-validation-message.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular.mjs +7 -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 +113 -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 +50 -0
- package/types/ks-digital-designsystem-angular-alert.d.ts +12 -0
- package/types/ks-digital-designsystem-angular-breadcrumbs.d.ts +13 -0
- package/types/ks-digital-designsystem-angular-button.d.ts +32 -0
- package/types/ks-digital-designsystem-angular-card.d.ts +24 -0
- package/types/ks-digital-designsystem-angular-chip.d.ts +15 -0
- package/types/ks-digital-designsystem-angular-details.d.ts +20 -0
- package/types/ks-digital-designsystem-angular-dialog.d.ts +18 -0
- package/types/ks-digital-designsystem-angular-dropdown.d.ts +13 -0
- package/types/ks-digital-designsystem-angular-error-summary.d.ts +14 -0
- package/types/ks-digital-designsystem-angular-forms.d.ts +81 -0
- package/types/ks-digital-designsystem-angular-heading.d.ts +19 -0
- package/types/ks-digital-designsystem-angular-link.d.ts +9 -0
- package/types/ks-digital-designsystem-angular-pagination.d.ts +58 -0
- package/types/ks-digital-designsystem-angular-paragraph.d.ts +8 -0
- package/types/ks-digital-designsystem-angular-popover.d.ts +13 -0
- package/types/ks-digital-designsystem-angular-search.d.ts +76 -0
- package/types/ks-digital-designsystem-angular-skeleton.d.ts +18 -0
- package/types/ks-digital-designsystem-angular-spinner.d.ts +23 -0
- package/types/ks-digital-designsystem-angular-suggestion.d.ts +132 -0
- package/types/ks-digital-designsystem-angular-table.d.ts +43 -0
- package/types/ks-digital-designsystem-angular-tabs.d.ts +65 -0
- package/types/ks-digital-designsystem-angular-tag.d.ts +15 -0
- package/types/ks-digital-designsystem-angular-validation-message.d.ts +8 -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
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
#
|
|
1
|
+
# KS Digital Designsystem for Angular
|
|
2
2
|
|
|
3
|
-
> This is
|
|
3
|
+
> ⚠ This library is currently experimental. However, we actively use and test it in internal applications, and we strive to keep it stable at all times.
|
|
4
4
|
|
|
5
5
|
This library provides Angular components for KS Digital, designed to align closely with the components from [Designsystemet.no](https://www.designsystemet.no/komponenter).
|
|
6
6
|
|
|
7
|
-
## Installation
|
|
7
|
+
## Installation
|
|
8
8
|
|
|
9
9
|
Install the required packages using your preferred package manager:
|
|
10
10
|
|
|
@@ -19,25 +19,42 @@ pnpm add @ks-digital/designsystem-angular @ks-digital/designsystem-themes
|
|
|
19
19
|
Add the Inter font to your `index.html`. This API supports the same parameters as the Google Fonts API, allowing you to customize the font weights as needed:
|
|
20
20
|
|
|
21
21
|
```html
|
|
22
|
-
<link
|
|
23
|
-
href="https://static.fiks.ks.no/googlefonts/googleapis/css2?family=Inter&display=swap"
|
|
24
|
-
rel="stylesheet"
|
|
25
|
-
/>
|
|
22
|
+
<link href="https://static.fiks.ks.no/googlefonts/googleapis/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet" />
|
|
26
23
|
```
|
|
27
24
|
|
|
28
25
|
### 2. Import Base Styles and Themes
|
|
29
26
|
|
|
30
27
|
Import the base styles and the theme you want to use in your application:
|
|
31
28
|
|
|
32
|
-
```
|
|
33
|
-
import '@ks-digital/designsystem-themes/base.css'
|
|
34
|
-
import '@ks-digital/designsystem-themes/
|
|
29
|
+
```css
|
|
30
|
+
@import url('@ks-digital/designsystem-themes/base.css');
|
|
31
|
+
@import url('@ks-digital/designsystem-themes/ksdigital.css');
|
|
35
32
|
```
|
|
36
33
|
|
|
37
34
|
### 3. Use Components
|
|
38
35
|
|
|
39
|
-
|
|
36
|
+
```ts
|
|
37
|
+
import { Button } from '@ks-digital/designsystem-angular'
|
|
38
|
+
|
|
39
|
+
@Component({
|
|
40
|
+
imports: [Button],
|
|
41
|
+
template: `
|
|
42
|
+
<button ksd-button>
|
|
43
|
+
Click me
|
|
44
|
+
</button>
|
|
45
|
+
`,
|
|
46
|
+
})
|
|
47
|
+
```
|
|
40
48
|
|
|
41
49
|
## Example
|
|
42
50
|
|
|
43
51
|
A complete example setup is available in the `angular-demo` located under the `apps` folder.
|
|
52
|
+
|
|
53
|
+
## Development
|
|
54
|
+
|
|
55
|
+
`pnpm nx run @ks-digital/designsystem-angular:storybook`
|
|
56
|
+
|
|
57
|
+
## Update snapshots
|
|
58
|
+
|
|
59
|
+
In folder `apps/angular-demo-e2e`:
|
|
60
|
+
`docker compose run --rm update-snapshots`
|
package/alert/README.md
ADDED
package/button/README.md
ADDED
package/card/README.md
ADDED
package/dialog/README.md
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, Directive, isDevMode } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Applies data-size attribute to host-element.
|
|
6
|
+
*/
|
|
7
|
+
class HostSize {
|
|
8
|
+
/**
|
|
9
|
+
* Changes size for descendant Designsystemet components. Select from predefined sizes.
|
|
10
|
+
* @attribute data-size
|
|
11
|
+
*/
|
|
12
|
+
dataSize = input(undefined, { ...(ngDevMode ? { debugName: "dataSize" } : /* istanbul ignore next */ {}), alias: 'data-size' });
|
|
13
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: HostSize, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
14
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.8", 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 });
|
|
15
|
+
}
|
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: HostSize, decorators: [{
|
|
17
|
+
type: Directive,
|
|
18
|
+
args: [{
|
|
19
|
+
host: {
|
|
20
|
+
'[attr.data-size]': 'dataSize() || null',
|
|
21
|
+
},
|
|
22
|
+
}]
|
|
23
|
+
}], propDecorators: { dataSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "data-size", required: false }] }] } });
|
|
24
|
+
/**
|
|
25
|
+
* Applies data-color attribute to host-element for all colors, including severity colors.
|
|
26
|
+
*/
|
|
27
|
+
class HostColor {
|
|
28
|
+
/**
|
|
29
|
+
* Changes color for descendant Designsystemet components.
|
|
30
|
+
* Select from predefined colors and colors defined in theme.
|
|
31
|
+
* @attribute data-color
|
|
32
|
+
*/
|
|
33
|
+
dataColor = input(undefined, { ...(ngDevMode ? { debugName: "dataColor" } : /* istanbul ignore next */ {}), alias: 'data-color' });
|
|
34
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: HostColor, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
35
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.8", 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 });
|
|
36
|
+
}
|
|
37
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: HostColor, decorators: [{
|
|
38
|
+
type: Directive,
|
|
39
|
+
args: [{
|
|
40
|
+
host: {
|
|
41
|
+
'[attr.data-color]': 'dataColor() || null',
|
|
42
|
+
},
|
|
43
|
+
}]
|
|
44
|
+
}], propDecorators: { dataColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "data-color", required: false }] }] } });
|
|
45
|
+
/**
|
|
46
|
+
* Applies data-color attribute to host-element for severity colors.
|
|
47
|
+
*/
|
|
48
|
+
class HostSeverityColors {
|
|
49
|
+
/**
|
|
50
|
+
* Changes color for descendant Designsystemet components.
|
|
51
|
+
* Select from predefined colors and colors defined in theme.
|
|
52
|
+
* @attribute data-color
|
|
53
|
+
*/
|
|
54
|
+
dataColor = input(undefined, { ...(ngDevMode ? { debugName: "dataColor" } : /* istanbul ignore next */ {}), alias: 'data-color' });
|
|
55
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: HostSeverityColors, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
56
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.8", 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 });
|
|
57
|
+
}
|
|
58
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: HostSeverityColors, decorators: [{
|
|
59
|
+
type: Directive,
|
|
60
|
+
args: [{
|
|
61
|
+
host: {
|
|
62
|
+
'[attr.data-color]': 'dataColor() || null',
|
|
63
|
+
},
|
|
64
|
+
}]
|
|
65
|
+
}], propDecorators: { dataColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "data-color", required: false }] }] } });
|
|
66
|
+
|
|
67
|
+
const logIfDevMode = ({ component, message, }) => {
|
|
68
|
+
if (isDevMode()) {
|
|
69
|
+
console.log(`[${component}] ${message}`);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
const randomId = () => {
|
|
74
|
+
return `${Math.random().toString(36).slice(2, 7)}`;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Generated bundle index. Do not edit.
|
|
79
|
+
*/
|
|
80
|
+
|
|
81
|
+
export { HostColor, HostSeverityColors, HostSize, logIfDevMode, randomId };
|
|
82
|
+
//# sourceMappingURL=ks-digital-designsystem-angular-__internals.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
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":["import { Directive, input } from '@angular/core'\nimport {\n ColorDefinitions,\n SeverityColorDefinitions,\n Size,\n} from '@ks-digital/designsystem-themes/types'\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<Size>(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":";;;AAOA;;AAEG;MAMU,QAAQ,CAAA;AACnB;;;AAGG;IACM,QAAQ,GAAG,KAAK,CAAO,SAAS,gFACvC,KAAK,EAAE,WAAW,EAAA,CAClB;uGAPS,QAAQ,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAR,QAAQ,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,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,gBAAA,EAAA,oBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAR,QAAQ,EAAA,UAAA,EAAA,CAAA;kBALpB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,IAAI,EAAE;AACJ,wBAAA,kBAAkB,EAAE,oBAAoB;AACzC,qBAAA;AACF,iBAAA;;AAWD;;AAEG;MAMU,SAAS,CAAA;AACpB;;;;AAIG;IACM,SAAS,GAAG,KAAK,CAExB,SAAS,iFAAI,KAAK,EAAE,YAAY,EAAA,CAAG;uGAR1B,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAT,SAAS,EAAA,YAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA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,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;;;;"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import * as i1 from '@ks-digital/designsystem-angular/__internals';
|
|
4
|
+
import { HostSize, HostSeverityColors } from '@ks-digital/designsystem-angular/__internals';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Alerts are used to inform users about important information, warnings, errors, or success.
|
|
8
|
+
*/
|
|
9
|
+
class Alert {
|
|
10
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Alert, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", 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}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
12
|
+
}
|
|
13
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Alert, decorators: [{
|
|
14
|
+
type: Component,
|
|
15
|
+
args: [{ selector: 'ksd-alert', changeDetection: ChangeDetectionStrategy.OnPush, template: ` <ng-content />`, host: {
|
|
16
|
+
class: 'ds-alert',
|
|
17
|
+
}, hostDirectives: [
|
|
18
|
+
{
|
|
19
|
+
directive: HostSize,
|
|
20
|
+
inputs: ['data-size'],
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
directive: HostSeverityColors,
|
|
24
|
+
inputs: ['data-color'],
|
|
25
|
+
},
|
|
26
|
+
], styles: [":host{display:block}\n"] }]
|
|
27
|
+
}] });
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Generated bundle index. Do not edit.
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
export { Alert };
|
|
34
|
+
//# sourceMappingURL=ks-digital-designsystem-angular-alert.mjs.map
|
|
@@ -0,0 +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 { ChangeDetectionStrategy, 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 changeDetection: ChangeDetectionStrategy.OnPush,\n template: ` <ng-content />`,\n host: {\n class: 'ds-alert',\n },\n styles: `\n :host {\n display: block;\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;MAwBU,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,yQApBN,CAAA,eAAA,CAAiB,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,wBAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAoBhB,KAAK,EAAA,UAAA,EAAA,CAAA;kBAvBjB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,WAAW,mBACJ,uBAAuB,CAAC,MAAM,EAAA,QAAA,EACrC,iBAAiB,EAAA,IAAA,EACrB;AACJ,wBAAA,KAAK,EAAE,UAAU;qBAClB,EAAA,cAAA,EAMe;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,wBAAA,CAAA,EAAA;;;AC9BH;;AAEG;;;;"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import '@digdir/designsystemet-web';
|
|
4
|
+
import * as i1 from '@ks-digital/designsystem-angular/__internals';
|
|
5
|
+
import { HostSize, HostColor } from '@ks-digital/designsystem-angular/__internals';
|
|
6
|
+
|
|
7
|
+
class Breadcrumbs {
|
|
8
|
+
/**
|
|
9
|
+
* Sets the screen reader label for the pagination
|
|
10
|
+
*/
|
|
11
|
+
ariaLabel = input('Du er her:', { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: 'aria-label' });
|
|
12
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Breadcrumbs, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
13
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: Breadcrumbs, isStandalone: true, selector: "ksd-breadcrumbs", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.aria-label": "null" } }, hostDirectives: [{ directive: i1.HostSize, inputs: ["data-size", "data-size"] }, { directive: i1.HostColor, inputs: ["data-color", "data-color"] }], ngImport: i0, template: `
|
|
14
|
+
<ds-breadcrumbs class="ds-breadcrumbs" [attr.aria-label]="ariaLabel()">
|
|
15
|
+
<ng-content />
|
|
16
|
+
</ds-breadcrumbs>
|
|
17
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
18
|
+
}
|
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Breadcrumbs, decorators: [{
|
|
20
|
+
type: Component,
|
|
21
|
+
args: [{
|
|
22
|
+
selector: 'ksd-breadcrumbs',
|
|
23
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
24
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
25
|
+
template: `
|
|
26
|
+
<ds-breadcrumbs class="ds-breadcrumbs" [attr.aria-label]="ariaLabel()">
|
|
27
|
+
<ng-content />
|
|
28
|
+
</ds-breadcrumbs>
|
|
29
|
+
`,
|
|
30
|
+
host: {
|
|
31
|
+
'[attr.aria-label]': 'null',
|
|
32
|
+
},
|
|
33
|
+
hostDirectives: [
|
|
34
|
+
{
|
|
35
|
+
directive: HostSize,
|
|
36
|
+
inputs: ['data-size'],
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
directive: HostColor,
|
|
40
|
+
inputs: ['data-color'],
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
}]
|
|
44
|
+
}], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }] } });
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Generated bundle index. Do not edit.
|
|
48
|
+
*/
|
|
49
|
+
|
|
50
|
+
export { Breadcrumbs };
|
|
51
|
+
//# sourceMappingURL=ks-digital-designsystem-angular-breadcrumbs.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ks-digital-designsystem-angular-breadcrumbs.mjs","sources":["../../../../packages/angular/breadcrumbs/src/breadcrumbs.ts","../../../../packages/angular/breadcrumbs/src/ks-digital-designsystem-angular-breadcrumbs.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n input,\n} from '@angular/core'\nimport '@digdir/designsystemet-web'\nimport {\n HostColor,\n HostSize,\n} from '@ks-digital/designsystem-angular/__internals'\n\n@Component({\n selector: 'ksd-breadcrumbs',\n changeDetection: ChangeDetectionStrategy.OnPush,\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n template: `\n <ds-breadcrumbs class=\"ds-breadcrumbs\" [attr.aria-label]=\"ariaLabel()\">\n <ng-content />\n </ds-breadcrumbs>\n `,\n host: {\n '[attr.aria-label]': 'null',\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 Breadcrumbs {\n /**\n * Sets the screen reader label for the pagination\n */\n readonly ariaLabel = input<string>('Du er her:', { alias: 'aria-label' })\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAmCa,WAAW,CAAA;AACtB;;AAEG;IACM,SAAS,GAAG,KAAK,CAAS,YAAY,iFAAI,KAAK,EAAE,YAAY,EAAA,CAAG;uGAJ9D,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;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wBAAA;AACE,4BAAA,SAAS,EAAE,SAAS;4BACpB,MAAM,EAAE,CAAC,YAAY,CAAC;AACvB,yBAAA;AACF,qBAAA;AACF,iBAAA;;;AClCD;;AAEG;;;;"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, booleanAttribute, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import * as i1 from '@ks-digital/designsystem-angular/__internals';
|
|
4
|
+
import { HostSize, HostColor } from '@ks-digital/designsystem-angular/__internals';
|
|
5
|
+
import { Spinner } from '@ks-digital/designsystem-angular/spinner';
|
|
6
|
+
|
|
7
|
+
class Button {
|
|
8
|
+
/**
|
|
9
|
+
* Specify which variant to use
|
|
10
|
+
* @default 'primary'
|
|
11
|
+
*/
|
|
12
|
+
variant = input('primary', { ...(ngDevMode ? { debugName: "variant" } : /* istanbul ignore next */ {}), alias: 'data-variant' });
|
|
13
|
+
/**
|
|
14
|
+
* Toggle loading state.
|
|
15
|
+
* Pass an element if you want to display a custom loader.
|
|
16
|
+
*
|
|
17
|
+
* @default false
|
|
18
|
+
*/
|
|
19
|
+
loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
20
|
+
/**
|
|
21
|
+
* Disables element
|
|
22
|
+
*/
|
|
23
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
24
|
+
/**
|
|
25
|
+
* If this is a button with only an icon. When combined with loading, a spinner will be shown instead of the icon.
|
|
26
|
+
* @deprecated Use `data-icon` instead.
|
|
27
|
+
*/
|
|
28
|
+
icon = input(false, { ...(ngDevMode ? { debugName: "icon" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
29
|
+
/** If this is a button with only an icon. When combined with loading, a spinner will be shown instead of the icon. */
|
|
30
|
+
dataIcon = input(false, { ...(ngDevMode ? { debugName: "dataIcon" } : /* istanbul ignore next */ {}), transform: booleanAttribute,
|
|
31
|
+
alias: 'data-icon' });
|
|
32
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Button, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
33
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", 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 }, dataIcon: { classPropertyName: "dataIcon", publicName: "data-icon", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-variant": "variant()", "attr.data-icon": "icon() || dataIcon() || 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: `
|
|
34
|
+
@if (loading()) {
|
|
35
|
+
<ksd-spinner aria-hidden="true" />
|
|
36
|
+
}
|
|
37
|
+
@if (!(loading() && (icon() || dataIcon()))) {
|
|
38
|
+
<ng-content />
|
|
39
|
+
}
|
|
40
|
+
`, isInline: true, styles: [":host ::ng-deep>*{display:inline-flex}:host ::ng-deep ng-icon{font-size:var(--ng-icon-size, 1.3em)}\n"], dependencies: [{ kind: "component", type: Spinner, selector: "ksd-spinner", inputs: ["aria-label", "aria-hidden", "data-size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
41
|
+
}
|
|
42
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Button, decorators: [{
|
|
43
|
+
type: Component,
|
|
44
|
+
args: [{ selector: 'button[ksd-button], a[ksd-button]', changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [
|
|
45
|
+
{
|
|
46
|
+
directive: HostSize,
|
|
47
|
+
inputs: ['data-size'],
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
directive: HostColor,
|
|
51
|
+
inputs: ['data-color'],
|
|
52
|
+
},
|
|
53
|
+
], imports: [Spinner], host: {
|
|
54
|
+
class: 'ds-button',
|
|
55
|
+
'[attr.data-variant]': 'variant()',
|
|
56
|
+
'[attr.data-icon]': 'icon() || dataIcon() || null',
|
|
57
|
+
'[attr.disabled]': 'disabled() ? true : null',
|
|
58
|
+
'[attr.aria-busy]': 'loading() ? true : null',
|
|
59
|
+
}, template: `
|
|
60
|
+
@if (loading()) {
|
|
61
|
+
<ksd-spinner aria-hidden="true" />
|
|
62
|
+
}
|
|
63
|
+
@if (!(loading() && (icon() || dataIcon()))) {
|
|
64
|
+
<ng-content />
|
|
65
|
+
}
|
|
66
|
+
`, styles: [":host ::ng-deep>*{display:inline-flex}:host ::ng-deep ng-icon{font-size:var(--ng-icon-size, 1.3em)}\n"] }]
|
|
67
|
+
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "data-variant", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], dataIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "data-icon", required: false }] }] } });
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Generated bundle index. Do not edit.
|
|
71
|
+
*/
|
|
72
|
+
|
|
73
|
+
export { Button };
|
|
74
|
+
//# sourceMappingURL=ks-digital-designsystem-angular-button.mjs.map
|
|
@@ -0,0 +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":["import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n input,\n} 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 changeDetection: ChangeDetectionStrategy.OnPush,\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 '[attr.data-variant]': 'variant()',\n '[attr.data-icon]': 'icon() || dataIcon() || 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 :host ::ng-deep ng-icon {\n font-size: var(--ng-icon-size, 1.3em);\n }\n `,\n\n template: `\n @if (loading()) {\n <ksd-spinner aria-hidden=\"true\" />\n }\n @if (!(loading() && (icon() || dataIcon()))) {\n <ng-content />\n }\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. When combined with loading, a spinner will be shown instead of the icon.\n * @deprecated Use `data-icon` instead.\n */\n readonly icon = input(false, { transform: booleanAttribute })\n\n /** If this is a button with only an icon. When combined with loading, a spinner will be shown instead of the icon. */\n readonly dataIcon = input(false, {\n transform: booleanAttribute,\n alias: 'data-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,CAAA;kBAzClB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,mCAAmC,EAAA,eAAA,EAC5B,uBAAuB,CAAC,MAAM,EAAA,cAAA,EAC/B;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,qBAAqB,EAAE,WAAW;AAClC,wBAAA,kBAAkB,EAAE,8BAA8B;AAClD,wBAAA,iBAAiB,EAAE,0BAA0B;AAC7C,wBAAA,kBAAkB,EAAE,yBAAyB;qBAC9C,EAAA,QAAA,EAYS;;;;;;;AAOT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,uGAAA,CAAA,EAAA;;;ACnDH;;AAEG;;;;"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, inject, ElementRef, DestroyRef, afterNextRender, Directive, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import * as i1 from '@ks-digital/designsystem-angular/__internals';
|
|
4
|
+
import { randomId, HostSize, HostColor } from '@ks-digital/designsystem-angular/__internals';
|
|
5
|
+
|
|
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
|
+
class Card {
|
|
10
|
+
/**
|
|
11
|
+
* Change the background color of the card
|
|
12
|
+
* @default 'default'
|
|
13
|
+
*/
|
|
14
|
+
variant = input('default', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
15
|
+
el = inject(ElementRef);
|
|
16
|
+
destroyRef = inject(DestroyRef);
|
|
17
|
+
generatedId = `ksd-card-link-${randomId()}`;
|
|
18
|
+
originalId = null;
|
|
19
|
+
constructor() {
|
|
20
|
+
afterNextRender(() => {
|
|
21
|
+
const card = this.el.nativeElement;
|
|
22
|
+
const link = card.querySelector(SELECTOR_LINK);
|
|
23
|
+
const skip = !link || link.parentElement?.closest(SELECTOR_SKIP);
|
|
24
|
+
if (card.hasAttribute(ATTR_CLICKDELEGATE) || skip)
|
|
25
|
+
return;
|
|
26
|
+
this.originalId = link.id || null;
|
|
27
|
+
link.id = link.id || this.generatedId;
|
|
28
|
+
card.setAttribute(ATTR_CLICKDELEGATE, link.id);
|
|
29
|
+
this.destroyRef.onDestroy(() => {
|
|
30
|
+
if (this.originalId) {
|
|
31
|
+
link.id = this.originalId;
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
link.removeAttribute('id');
|
|
35
|
+
}
|
|
36
|
+
card.removeAttribute(ATTR_CLICKDELEGATE);
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Card, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
41
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.8", type: Card, isStandalone: true, selector: "[ksd-card]", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, host: { 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 });
|
|
42
|
+
}
|
|
43
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Card, decorators: [{
|
|
44
|
+
type: Directive,
|
|
45
|
+
args: [{
|
|
46
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
47
|
+
selector: '[ksd-card]',
|
|
48
|
+
hostDirectives: [
|
|
49
|
+
{
|
|
50
|
+
directive: HostSize,
|
|
51
|
+
inputs: ['data-size'],
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
directive: HostColor,
|
|
55
|
+
inputs: ['data-color'],
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
host: {
|
|
59
|
+
class: 'ds-card',
|
|
60
|
+
'[attr.data-variant]': 'variant()',
|
|
61
|
+
},
|
|
62
|
+
}]
|
|
63
|
+
}], ctorParameters: () => [], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }] } });
|
|
64
|
+
|
|
65
|
+
class CardBlock {
|
|
66
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CardBlock, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
67
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: CardBlock, isStandalone: true, selector: "[ksd-card-block]", host: { classAttribute: "ds-card__block" }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
68
|
+
}
|
|
69
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CardBlock, decorators: [{
|
|
70
|
+
type: Component,
|
|
71
|
+
args: [{
|
|
72
|
+
selector: '[ksd-card-block]',
|
|
73
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
74
|
+
host: {
|
|
75
|
+
class: 'ds-card__block',
|
|
76
|
+
},
|
|
77
|
+
template: `<ng-content />`,
|
|
78
|
+
}]
|
|
79
|
+
}] });
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Generated bundle index. Do not edit.
|
|
83
|
+
*/
|
|
84
|
+
|
|
85
|
+
export { Card, CardBlock };
|
|
86
|
+
//# sourceMappingURL=ks-digital-designsystem-angular-card.mjs.map
|
|
@@ -0,0 +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 {\n afterNextRender,\n DestroyRef,\n Directive,\n ElementRef,\n inject,\n input,\n} from '@angular/core'\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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAcA,MAAM,kBAAkB,GAAG,uBAAuB;AAClD,MAAM,aAAa,GAAG,0BAA0B;AAChD,MAAM,aAAa,GACjB,2EAA2E;MAoBhE,IAAI,CAAA;AACf;;;AAGG;AACI,IAAA,OAAO,GAAG,KAAK,CAAuB,SAAS,8EAAC;AAC/C,IAAA,EAAE,GAAG,MAAM,CAA0B,UAAU,CAAC;AAChD,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAC/B,IAAA,WAAW,GAAG,CAAA,cAAA,EAAiB,QAAQ,EAAE,EAAE;IAC3C,UAAU,GAAkB,IAAI;AAExC,IAAA,WAAA,GAAA;QACE,eAAe,CAAC,MAAK;AACnB,YAAA,MAAM,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa;YAClC,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAoB,aAAa,CAAC;AACjE,YAAA,MAAM,IAAI,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC,aAAa,CAAC;AAEhE,YAAA,IAAI,IAAI,CAAC,YAAY,CAAC,kBAAkB,CAAC,IAAI,IAAI;gBAAE;YAEnD,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,EAAE,IAAI,IAAI;YACjC,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,IAAI,IAAI,CAAC,WAAW;YACrC,IAAI,CAAC,YAAY,CAAC,kBAAkB,EAAE,IAAI,CAAC,EAAE,CAAC;AAE9C,YAAA,IAAI,CAAC,UAAU,CA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ACE,4BAAA,SAAS,EAAE,SAAS;4BACpB,MAAM,EAAE,CAAC,YAAY,CAAC;AACvB,yBAAA;AACF,qBAAA;AACD,oBAAA,IAAI,EAAE;AACJ,wBAAA,KAAK,EAAE,SAAS;AAChB,wBAAA,qBAAqB,EAAE,WAAW;AACnC,qBAAA;AACF,iBAAA;;;MC1BY,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,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAEf,SAAS,EAAA,UAAA,EAAA,CAAA;kBARrB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,kBAAkB;oBAC5B,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,IAAI,EAAE;AACJ,wBAAA,KAAK,EAAE,gBAAgB;AACxB,qBAAA;AACD,oBAAA,QAAQ,EAAE,CAAA,cAAA,CAAgB;AAC3B,iBAAA;;;ACTD;;AAEG;;;;"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import * as i1 from '@ks-digital/designsystem-angular/__internals';
|
|
4
|
+
import { HostSize, HostColor } from '@ks-digital/designsystem-angular/__internals';
|
|
5
|
+
|
|
6
|
+
class Chip {
|
|
7
|
+
/**
|
|
8
|
+
* Whether the chip is removable or not. If true, a remove icon will be displayed.
|
|
9
|
+
* If using this, you should add an aria-label as well, e.g "Slett {item}"
|
|
10
|
+
* @attribute data-removable
|
|
11
|
+
*/
|
|
12
|
+
dataRemovable = input(false, { ...(ngDevMode ? { debugName: "dataRemovable" } : /* istanbul ignore next */ {}), alias: 'data-removable' });
|
|
13
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Chip, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
14
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", 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, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
15
|
+
}
|
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Chip, decorators: [{
|
|
17
|
+
type: Component,
|
|
18
|
+
args: [{
|
|
19
|
+
selector: 'label[ksd-chip], button[ksd-chip]',
|
|
20
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
21
|
+
template: `<ng-content />`,
|
|
22
|
+
host: {
|
|
23
|
+
class: 'ds-chip',
|
|
24
|
+
},
|
|
25
|
+
hostDirectives: [
|
|
26
|
+
{
|
|
27
|
+
directive: HostSize,
|
|
28
|
+
inputs: ['data-size'],
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
directive: HostColor,
|
|
32
|
+
inputs: ['data-color'],
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
}]
|
|
36
|
+
}], propDecorators: { dataRemovable: [{ type: i0.Input, args: [{ isSignal: true, alias: "data-removable", required: false }] }] } });
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Generated bundle index. Do not edit.
|
|
40
|
+
*/
|
|
41
|
+
|
|
42
|
+
export { Chip };
|
|
43
|
+
//# sourceMappingURL=ks-digital-designsystem-angular-chip.mjs.map
|
|
@@ -0,0 +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 { 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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAwBa,IAAI,CAAA;AACf;;;;AAIG;IACH,aAAa,GAAG,KAAK,CAAU,KAAK,qFAAI,KAAK,EAAE,gBAAgB,EAAA,CAAG;uGANvD,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,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAef,IAAI,EAAA,UAAA,EAAA,CAAA;kBAlBhB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,mCAAmC;oBAC7C,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,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;;;ACvBD;;AAEG;;;;"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, Directive, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import * as i1 from '@ks-digital/designsystem-angular/__internals';
|
|
4
|
+
import { HostSize, HostColor } from '@ks-digital/designsystem-angular/__internals';
|
|
5
|
+
|
|
6
|
+
class Details {
|
|
7
|
+
dataVariant = input('default', { ...(ngDevMode ? { debugName: "dataVariant" } : /* istanbul ignore next */ {}), alias: 'data-variant' });
|
|
8
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Details, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
9
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.8", type: Details, isStandalone: true, selector: "details[ksd-details]", inputs: { dataVariant: { classPropertyName: "dataVariant", publicName: "data-variant", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-variant": "dataVariant()" }, classAttribute: "ds-details" }, hostDirectives: [{ directive: i1.HostSize, inputs: ["data-size", "data-size"] }, { directive: i1.HostColor, inputs: ["data-color", "data-color"] }], ngImport: i0 });
|
|
10
|
+
}
|
|
11
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Details, decorators: [{
|
|
12
|
+
type: Directive,
|
|
13
|
+
args: [{
|
|
14
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
15
|
+
selector: 'details[ksd-details]',
|
|
16
|
+
hostDirectives: [
|
|
17
|
+
{
|
|
18
|
+
directive: HostSize,
|
|
19
|
+
inputs: ['data-size'],
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
directive: HostColor,
|
|
23
|
+
inputs: ['data-color'],
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
host: {
|
|
27
|
+
class: 'ds-details',
|
|
28
|
+
'[attr.data-variant]': 'dataVariant()',
|
|
29
|
+
},
|
|
30
|
+
}]
|
|
31
|
+
}], propDecorators: { dataVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "data-variant", required: false }] }] } });
|
|
32
|
+
|
|
33
|
+
class DetailsContent {
|
|
34
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DetailsContent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
35
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: DetailsContent, isStandalone: true, selector: "ksd-details-content", ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
36
|
+
}
|
|
37
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DetailsContent, decorators: [{
|
|
38
|
+
type: Component,
|
|
39
|
+
args: [{
|
|
40
|
+
selector: 'ksd-details-content',
|
|
41
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
42
|
+
template: `<ng-content />`,
|
|
43
|
+
}]
|
|
44
|
+
}] });
|
|
45
|
+
|
|
46
|
+
class DetailsSummary {
|
|
47
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DetailsSummary, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
48
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: DetailsSummary, isStandalone: true, selector: "ksd-details-summary", ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
49
|
+
}
|
|
50
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DetailsSummary, decorators: [{
|
|
51
|
+
type: Component,
|
|
52
|
+
args: [{
|
|
53
|
+
selector: 'ksd-details-summary',
|
|
54
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
55
|
+
template: `<ng-content />`,
|
|
56
|
+
}]
|
|
57
|
+
}] });
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Generated bundle index. Do not edit.
|
|
61
|
+
*/
|
|
62
|
+
|
|
63
|
+
export { Details, DetailsContent, DetailsSummary };
|
|
64
|
+
//# sourceMappingURL=ks-digital-designsystem-angular-details.mjs.map
|