@ks-digital/designsystem-angular 0.0.1-alpha.5 → 0.0.1-alpha.50
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 +23 -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/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 +59 -0
- package/fesm2022/ks-digital-designsystem-angular-breadcrumbs.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-button.mjs +72 -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-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 +209 -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 +183 -0
- package/fesm2022/ks-digital-designsystem-angular-search.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-spinner.mjs +87 -0
- package/fesm2022/ks-digital-designsystem-angular-spinner.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-suggestion.mjs +281 -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 +120 -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 +101 -31
- 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/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 +51 -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 +30 -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-error-summary.d.ts +14 -0
- package/types/ks-digital-designsystem-angular-forms.d.ts +71 -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 +84 -0
- package/types/ks-digital-designsystem-angular-spinner.d.ts +22 -0
- package/types/ks-digital-designsystem-angular-suggestion.d.ts +97 -0
- package/types/ks-digital-designsystem-angular-table.d.ts +43 -0
- package/types/ks-digital-designsystem-angular-tabs.d.ts +31 -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/components/checkbox/checkbox.d.ts +0 -4
- package/dist/components/checkbox/checkbox.d.ts.map +0 -1
- package/dist/components/checkbox/index.d.ts +0 -2
- package/dist/components/checkbox/index.d.ts.map +0 -1
- package/dist/components/colors.d.ts +0 -27
- package/dist/components/colors.d.ts.map +0 -1
- package/dist/components/common-inputs.d.ts +0 -15
- package/dist/components/common-inputs.d.ts.map +0 -1
- package/dist/components/field/field.d.ts +0 -15
- package/dist/components/field/field.d.ts.map +0 -1
- package/dist/components/field/index.d.ts +0 -2
- package/dist/components/field/index.d.ts.map +0 -1
- package/dist/components/fieldset/fieldset-description.d.ts +0 -3
- package/dist/components/fieldset/fieldset-description.d.ts.map +0 -1
- package/dist/components/fieldset/fieldset-legend.d.ts +0 -3
- package/dist/components/fieldset/fieldset-legend.d.ts.map +0 -1
- package/dist/components/fieldset/fieldset.d.ts +0 -3
- package/dist/components/fieldset/fieldset.d.ts.map +0 -1
- package/dist/components/fieldset/index.d.ts +0 -4
- package/dist/components/fieldset/index.d.ts.map +0 -1
- package/dist/components/label/index.d.ts +0 -2
- package/dist/components/label/index.d.ts.map +0 -1
- package/dist/components/label/label.d.ts +0 -4
- package/dist/components/label/label.d.ts.map +0 -1
- package/dist/components/paragraph/index.d.ts +0 -2
- package/dist/components/paragraph/index.d.ts.map +0 -1
- package/dist/components/paragraph/paragraph.d.ts +0 -3
- package/dist/components/paragraph/paragraph.d.ts.map +0 -1
- package/dist/components/validation-message/index.d.ts +0 -2
- package/dist/components/validation-message/index.d.ts.map +0 -1
- package/dist/components/validation-message/validation-message.d.ts +0 -3
- package/dist/components/validation-message/validation-message.d.ts.map +0 -1
- package/dist/index.d.ts +0 -7
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -1
- package/dist/package.json +0 -48
- package/dist/utils/random-id.d.ts +0 -2
- package/dist/utils/random-id.d.ts.map +0 -1
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,37 @@ 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`
|
package/alert/README.md
ADDED
package/button/README.md
ADDED
package/card/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" } : {}), alias: 'data-size' });
|
|
13
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: HostSize, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
14
|
+
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 });
|
|
15
|
+
}
|
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", 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" } : {}), alias: 'data-color' });
|
|
34
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: HostColor, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
35
|
+
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 });
|
|
36
|
+
}
|
|
37
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", 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" } : {}), alias: 'data-color' });
|
|
55
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: HostSeverityColors, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
56
|
+
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 });
|
|
57
|
+
}
|
|
58
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", 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,qDACvC,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,E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EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,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;;;ACjDM,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;;;;"}
|
|
@@ -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.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"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
12
|
+
}
|
|
13
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", 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;--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"] }]
|
|
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 /**\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;MAuCU,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,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAmChB,KAAK,EAAA,UAAA,EAAA,CAAA;kBAtCjB,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,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;;;AC7CH;;AAEG;;;;"}
|
|
@@ -0,0 +1,59 @@
|
|
|
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" } : {}), alias: 'aria-label' });
|
|
12
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: Breadcrumbs, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
13
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.6", 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
|
|
15
|
+
class="ds-breadcrumbs"
|
|
16
|
+
[attr.aria-label]="ariaLabel()"
|
|
17
|
+
role="navigation"
|
|
18
|
+
>
|
|
19
|
+
<ng-content />
|
|
20
|
+
</ds-breadcrumbs>
|
|
21
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
22
|
+
}
|
|
23
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: Breadcrumbs, decorators: [{
|
|
24
|
+
type: Component,
|
|
25
|
+
args: [{
|
|
26
|
+
selector: 'ksd-breadcrumbs',
|
|
27
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
28
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
29
|
+
template: `
|
|
30
|
+
<ds-breadcrumbs
|
|
31
|
+
class="ds-breadcrumbs"
|
|
32
|
+
[attr.aria-label]="ariaLabel()"
|
|
33
|
+
role="navigation"
|
|
34
|
+
>
|
|
35
|
+
<ng-content />
|
|
36
|
+
</ds-breadcrumbs>
|
|
37
|
+
`,
|
|
38
|
+
host: {
|
|
39
|
+
'[attr.aria-label]': 'null',
|
|
40
|
+
},
|
|
41
|
+
hostDirectives: [
|
|
42
|
+
{
|
|
43
|
+
directive: HostSize,
|
|
44
|
+
inputs: ['data-size'],
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
directive: HostColor,
|
|
48
|
+
inputs: ['data-color'],
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
}]
|
|
52
|
+
}], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }] } });
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Generated bundle index. Do not edit.
|
|
56
|
+
*/
|
|
57
|
+
|
|
58
|
+
export { Breadcrumbs };
|
|
59
|
+
//# 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\n class=\"ds-breadcrumbs\"\n [attr.aria-label]=\"ariaLabel()\"\n role=\"navigation\"\n >\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":";;;;;;MAuCa,WAAW,CAAA;AACtB;;AAEG;IACM,SAAS,GAAG,KAAK,CAAS,YAAY,sDAAI,KAAK,EAAE,YAAY,EAAA,CAAG;uGAJ9D,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAX,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,WAAW,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,YAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,EAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,QAAA,EAAA,MAAA,EAAA,CAAA,WAAA,EAAA,WAAA,CAAA,EAAA,EAAA,EAAA,SAAA,EAAA,EAAA,CAAA,SAAA,EAAA,MAAA,EAAA,CAAA,YAAA,EAAA,YAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAvBZ;;;;;;;;AAQT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAeU,WAAW,EAAA,UAAA,EAAA,CAAA;kBA3BvB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,iBAAiB;oBAC3B,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,OAAO,EAAE,CAAC,sBAAsB,CAAC;AACjC,oBAAA,QAAQ,EAAE;;;;;;;;AAQT,EAAA,CAAA;AACD,oBAAA,IAAI,EAAE;AACJ,wBAAA,mBAAmB,EAAE,MAAM;AAC5B,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;;;ACtCD;;AAEG;;;;"}
|
|
@@ -0,0 +1,72 @@
|
|
|
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" } : {}), 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" } : {}), transform: booleanAttribute });
|
|
20
|
+
/**
|
|
21
|
+
* Disables element
|
|
22
|
+
*/
|
|
23
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : {}), 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
|
+
|
|
27
|
+
*/
|
|
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: `
|
|
31
|
+
@if (loading()) {
|
|
32
|
+
<ksd-spinner aria-hidden="true" />
|
|
33
|
+
}
|
|
34
|
+
@if (!(loading() && icon())) {
|
|
35
|
+
<ng-content />
|
|
36
|
+
}
|
|
37
|
+
`, 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 });
|
|
38
|
+
}
|
|
39
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: Button, decorators: [{
|
|
40
|
+
type: Component,
|
|
41
|
+
args: [{ selector: 'button[ksd-button], a[ksd-button]', changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [
|
|
42
|
+
{
|
|
43
|
+
directive: HostSize,
|
|
44
|
+
inputs: ['data-size'],
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
directive: HostColor,
|
|
48
|
+
inputs: ['data-color'],
|
|
49
|
+
},
|
|
50
|
+
], imports: [Spinner], host: {
|
|
51
|
+
class: 'ds-button',
|
|
52
|
+
type: 'button',
|
|
53
|
+
'[attr.data-variant]': 'variant()',
|
|
54
|
+
'[attr.data-icon]': 'icon() || null',
|
|
55
|
+
'[attr.disabled]': 'disabled() ? true : null',
|
|
56
|
+
'[attr.aria-busy]': 'loading() ? true : null',
|
|
57
|
+
}, template: `
|
|
58
|
+
@if (loading()) {
|
|
59
|
+
<ksd-spinner aria-hidden="true" />
|
|
60
|
+
}
|
|
61
|
+
@if (!(loading() && icon())) {
|
|
62
|
+
<ng-content />
|
|
63
|
+
}
|
|
64
|
+
`, styles: [":host ::ng-deep>*{display:inline-flex}:host ::ng-deep ng-icon{font-size:var(--ng-icon-size, 1.3em)}\n"] }]
|
|
65
|
+
}], 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 }] }] } });
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Generated bundle index. Do not edit.
|
|
69
|
+
*/
|
|
70
|
+
|
|
71
|
+
export { Button };
|
|
72
|
+
//# 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 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 :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())) {\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\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":";;;;;;MAsDa,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;;;AAGG;IACM,IAAI,GAAG,KAAK,CAAC,KAAK,iDAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;uGA1BlD,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,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA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A;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,EAYS;;;;;;;AAOT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,uGAAA,CAAA,EAAA;;;ACpDH;;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" }] : []));
|
|
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.0.6", ngImport: i0, type: Card, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
41
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ 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: { 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.0.6", 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.0.6", ngImport: i0, type: CardBlock, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
67
|
+
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, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
68
|
+
}
|
|
69
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", 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","/**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AAA;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" } : {}), alias: 'data-removable' });
|
|
13
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: Chip, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
14
|
+
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, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
15
|
+
}
|
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", 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,0DAAI,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" } : {}), alias: 'data-variant' });
|
|
8
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: Details, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
9
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.6", 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.0.6", 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.0.6", ngImport: i0, type: DetailsContent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
35
|
+
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, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
36
|
+
}
|
|
37
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", 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.0.6", ngImport: i0, type: DetailsSummary, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
48
|
+
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, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
49
|
+
}
|
|
50
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", 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
|