@ks-digital/designsystem-angular 0.0.1-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +43 -0
  3. package/dist/README.md +43 -0
  4. package/dist/components/checkbox/checkbox.d.ts +4 -0
  5. package/dist/components/checkbox/checkbox.d.ts.map +1 -0
  6. package/dist/components/checkbox/index.d.ts +2 -0
  7. package/dist/components/checkbox/index.d.ts.map +1 -0
  8. package/dist/components/colors.d.ts +27 -0
  9. package/dist/components/colors.d.ts.map +1 -0
  10. package/dist/components/common-inputs.d.ts +15 -0
  11. package/dist/components/common-inputs.d.ts.map +1 -0
  12. package/dist/components/field/field.d.ts +15 -0
  13. package/dist/components/field/field.d.ts.map +1 -0
  14. package/dist/components/field/index.d.ts +2 -0
  15. package/dist/components/field/index.d.ts.map +1 -0
  16. package/dist/components/fieldset/fieldset-description.d.ts +3 -0
  17. package/dist/components/fieldset/fieldset-description.d.ts.map +1 -0
  18. package/dist/components/fieldset/fieldset-legend.d.ts +3 -0
  19. package/dist/components/fieldset/fieldset-legend.d.ts.map +1 -0
  20. package/dist/components/fieldset/fieldset.d.ts +3 -0
  21. package/dist/components/fieldset/fieldset.d.ts.map +1 -0
  22. package/dist/components/fieldset/index.d.ts +4 -0
  23. package/dist/components/fieldset/index.d.ts.map +1 -0
  24. package/dist/components/label/index.d.ts +2 -0
  25. package/dist/components/label/index.d.ts.map +1 -0
  26. package/dist/components/label/label.d.ts +4 -0
  27. package/dist/components/label/label.d.ts.map +1 -0
  28. package/dist/components/paragraph/index.d.ts +2 -0
  29. package/dist/components/paragraph/index.d.ts.map +1 -0
  30. package/dist/components/paragraph/paragraph.d.ts +3 -0
  31. package/dist/components/paragraph/paragraph.d.ts.map +1 -0
  32. package/dist/components/validation-message/index.d.ts +2 -0
  33. package/dist/components/validation-message/index.d.ts.map +1 -0
  34. package/dist/components/validation-message/validation-message.d.ts +3 -0
  35. package/dist/components/validation-message/validation-message.d.ts.map +1 -0
  36. package/dist/index.d.ts +7 -0
  37. package/dist/index.d.ts.map +1 -0
  38. package/dist/index.js +1 -0
  39. package/dist/package.json +48 -0
  40. package/dist/utils/random-id.d.ts +2 -0
  41. package/dist/utils/random-id.d.ts.map +1 -0
  42. package/package.json +48 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 KS Digital
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,43 @@
1
+ # 🚧 KS Digital Designsystem for Angular
2
+
3
+ > This is an experimental POC as for now
4
+
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
+
7
+ ## Installation (WIP)
8
+
9
+ Install the required packages using your preferred package manager:
10
+
11
+ ```bash
12
+ pnpm add @ks-digital/designsystem-angular @ks-digital/designsystem-themes
13
+ ```
14
+
15
+ ## Setup
16
+
17
+ ### 1. Include the Inter Font
18
+
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
+
21
+ ```html
22
+ <link
23
+ href="https://static.fiks.ks.no/googlefonts/googleapis/css2?family=Inter&display=swap"
24
+ rel="stylesheet"
25
+ />
26
+ ```
27
+
28
+ ### 2. Import Base Styles and Themes
29
+
30
+ Import the base styles and the theme you want to use in your application:
31
+
32
+ ```javascript
33
+ import '@ks-digital/designsystem-themes/base.css'
34
+ import '@ks-digital/designsystem-themes/ledsagerbevis.css'
35
+ ```
36
+
37
+ ### 3. Use Components
38
+
39
+ To be written.
40
+
41
+ ## Example
42
+
43
+ A complete example setup is available in the `angular-demo` located under the `apps` folder.
package/dist/README.md ADDED
@@ -0,0 +1,43 @@
1
+ # 🚧 KS Digital Designsystem for Angular
2
+
3
+ > This is an experimental POC as for now
4
+
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
+
7
+ ## Installation (WIP)
8
+
9
+ Install the required packages using your preferred package manager:
10
+
11
+ ```bash
12
+ pnpm add @ks-digital/designsystem-angular @ks-digital/designsystem-themes
13
+ ```
14
+
15
+ ## Setup
16
+
17
+ ### 1. Include the Inter Font
18
+
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
+
21
+ ```html
22
+ <link
23
+ href="https://static.fiks.ks.no/googlefonts/googleapis/css2?family=Inter&display=swap"
24
+ rel="stylesheet"
25
+ />
26
+ ```
27
+
28
+ ### 2. Import Base Styles and Themes
29
+
30
+ Import the base styles and the theme you want to use in your application:
31
+
32
+ ```javascript
33
+ import '@ks-digital/designsystem-themes/base.css'
34
+ import '@ks-digital/designsystem-themes/ledsagerbevis.css'
35
+ ```
36
+
37
+ ### 3. Use Components
38
+
39
+ To be written.
40
+
41
+ ## Example
42
+
43
+ A complete example setup is available in the `angular-demo` located under the `apps` folder.
@@ -0,0 +1,4 @@
1
+ export declare class Checkbox {
2
+ id: import('@angular/core').ModelSignal<string | undefined>;
3
+ }
4
+ //# sourceMappingURL=checkbox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/checkbox/checkbox.ts"],"names":[],"mappings":"AAGA,qBAaa,QAAQ;IACnB,EAAE,0DAAkB;CACrB"}
@@ -0,0 +1,2 @@
1
+ export { Checkbox } from './checkbox';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/checkbox/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ Lifted from https://github.com/digdir/designsystemet/blob/main/packages/react/src/colors.ts
3
+ **/
4
+ declare const emptyObjectSymbol: unique symbol;
5
+ type EmptyObject = {
6
+ [emptyObjectSymbol]?: never;
7
+ };
8
+ /**
9
+ * Base interface for available colors in the design system.
10
+ * The CLI will generate augmentations of this interface to allow
11
+ * type safety of custom color names.
12
+ */
13
+ export interface MainAndSupportColors {
14
+ }
15
+ /**
16
+ * If {@link MainAndSupportColors} has been extended to include color names, return T,
17
+ * otherwise return the arbitrary string type.
18
+ */
19
+ type ColorWithFallback<T> = MainAndSupportColors extends EmptyObject ? string : T;
20
+ export type SeverityInfo = 'info';
21
+ export type SeveritySuccess = 'success';
22
+ export type SeverityWarning = 'warning';
23
+ export type SeverityDanger = 'danger';
24
+ export type SeverityColors = SeverityInfo | SeveritySuccess | SeverityWarning | SeverityDanger;
25
+ export type Color = ColorWithFallback<'neutral' | keyof MainAndSupportColors>;
26
+ export {};
27
+ //# sourceMappingURL=colors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/components/colors.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,CAAC,MAAM,iBAAiB,EAAE,OAAO,MAAM,CAAA;AAC9C,KAAK,WAAW,GAAG;IAAE,CAAC,iBAAiB,CAAC,CAAC,EAAE,KAAK,CAAA;CAAE,CAAA;AAElD;;;;GAIG;AAGH,MAAM,WAAW,oBAAoB;CAAI;AAEzC;;;GAGG;AACH,KAAK,iBAAiB,CAAC,CAAC,IAAI,oBAAoB,SAAS,WAAW,GAChE,MAAM,GACN,CAAC,CAAA;AAEL,MAAM,MAAM,YAAY,GAAG,MAAM,CAAA;AACjC,MAAM,MAAM,eAAe,GAAG,SAAS,CAAA;AACvC,MAAM,MAAM,eAAe,GAAG,SAAS,CAAA;AACvC,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAA;AACrC,MAAM,MAAM,cAAc,GACtB,YAAY,GACZ,eAAe,GACf,eAAe,GACf,cAAc,CAAA;AAElB,MAAM,MAAM,KAAK,GAAG,iBAAiB,CAAC,SAAS,GAAG,MAAM,oBAAoB,CAAC,CAAA"}
@@ -0,0 +1,15 @@
1
+ export type Size = 'sm' | 'md' | 'lg' | 'xl';
2
+ export declare class CommonInputs {
3
+ /**
4
+ * Changes size for descendant Designsystemet components. Select from predefined sizes.
5
+ * @attribute data-size
6
+ */
7
+ dataSize: import('@angular/core').InputSignal<Size | undefined>;
8
+ /**
9
+ * Changes color for descendant Designsystemet components.
10
+ * Select from predefined colors and colors defined using theme.designsystemet.no.
11
+ * @attribute data-color
12
+ */
13
+ dataColor: import('@angular/core').InputSignal<string | undefined>;
14
+ }
15
+ //# sourceMappingURL=common-inputs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common-inputs.d.ts","sourceRoot":"","sources":["../../src/components/common-inputs.ts"],"names":[],"mappings":"AAWA,MAAM,MAAM,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAE5C,qBACa,YAAY;IACrB;;;OAGG;IACH,QAAQ,wDAAiD;IAEzD;;;;OAIG;IACH,SAAS,0DAAmD;CAC/D"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Use the Field component to connect inputs and labels
3
+ */
4
+ export declare class Field {
5
+ /**
6
+ * Position of toggle inputs (radio, checkbox, switch) in field
7
+ * @default start
8
+ */
9
+ position: import('@angular/core').InputSignal<"start" | "end">;
10
+ private input;
11
+ private label;
12
+ private readonly id;
13
+ constructor();
14
+ }
15
+ //# sourceMappingURL=field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../src/components/field/field.ts"],"names":[],"mappings":"AAaA;;GAEG;AACH,qBAca,KAAK;IACd;;;OAGG;IACH,QAAQ,uDAAkC;IAE1C,OAAO,CAAC,KAAK,CAAyB;IACtC,OAAO,CAAC,KAAK,CAAsB;IACnC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAqB;;CAc3C"}
@@ -0,0 +1,2 @@
1
+ export { Field } from './field';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/field/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare class FieldsetDescription {
2
+ }
3
+ //# sourceMappingURL=fieldset-description.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fieldset-description.d.ts","sourceRoot":"","sources":["../../../src/components/fieldset/fieldset-description.ts"],"names":[],"mappings":"AAEA,qBAKa,mBAAmB;CAC/B"}
@@ -0,0 +1,3 @@
1
+ export declare class FieldsetLegend {
2
+ }
3
+ //# sourceMappingURL=fieldset-legend.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fieldset-legend.d.ts","sourceRoot":"","sources":["../../../src/components/fieldset/fieldset-legend.ts"],"names":[],"mappings":"AAEA,qBAQa,cAAc;CAAI"}
@@ -0,0 +1,3 @@
1
+ export declare class Fieldset {
2
+ }
3
+ //# sourceMappingURL=fieldset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fieldset.d.ts","sourceRoot":"","sources":["../../../src/components/fieldset/fieldset.ts"],"names":[],"mappings":"AAEA,qBAQa,QAAQ;CAAI"}
@@ -0,0 +1,4 @@
1
+ export { Fieldset } from './fieldset';
2
+ export { FieldsetDescription } from './fieldset-description';
3
+ export { FieldsetLegend } from './fieldset-legend';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/fieldset/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { Label } from './label';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/label/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare class Label {
2
+ for: import('@angular/core').ModelSignal<string | undefined>;
3
+ }
4
+ //# sourceMappingURL=label.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../src/components/label/label.ts"],"names":[],"mappings":"AAGA,qBAQa,KAAK;IAChB,GAAG,0DAAkB;CACtB"}
@@ -0,0 +1,2 @@
1
+ export { Paragraph } from './paragraph';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/paragraph/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare class Paragraph {
2
+ }
3
+ //# sourceMappingURL=paragraph.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paragraph.d.ts","sourceRoot":"","sources":["../../../src/components/paragraph/paragraph.ts"],"names":[],"mappings":"AAEA,qBAOa,SAAS;CAAG"}
@@ -0,0 +1,2 @@
1
+ export { ValidationMessage } from './validation-message';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/validation-message/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare class ValidationMessage {
2
+ }
3
+ //# sourceMappingURL=validation-message.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation-message.d.ts","sourceRoot":"","sources":["../../../src/components/validation-message/validation-message.ts"],"names":[],"mappings":"AAEA,qBAQa,iBAAiB;CAAI"}
@@ -0,0 +1,7 @@
1
+ export * from './components/checkbox';
2
+ export * from './components/field';
3
+ export * from './components/fieldset';
4
+ export * from './components/label';
5
+ export * from './components/paragraph';
6
+ export * from './components/validation-message';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,cAAc,wBAAwB,CAAA;AACtC,cAAc,iCAAiC,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "@ks-digital/designsystem-angular",
3
+ "repository": {
4
+ "type": "git",
5
+ "url": "https://github.com/ks-no/designsystem.git",
6
+ "directory": "packages/angular"
7
+ },
8
+ "version": "0.0.1-alpha.5",
9
+ "license": "MIT",
10
+ "private": false,
11
+ "publishConfig": {
12
+ "access": "public"
13
+ },
14
+ "type": "module",
15
+ "main": "./dist/index.js",
16
+ "types": "./dist/index.d.ts",
17
+ "exports": {
18
+ ".": {
19
+ "types": "./dist/index.d.ts",
20
+ "import": "./dist/index.js",
21
+ "require": "./dist/index.js"
22
+ }
23
+ },
24
+ "files": [
25
+ "./dist"
26
+ ],
27
+ "dependencies": {
28
+ "@digdir/designsystemet-css": "1.0.5"
29
+ },
30
+ "peerDependencies": {
31
+ "@angular/common": ">=19.0.0",
32
+ "@angular/core": ">=19.0.0",
33
+ "@angular/platform-browser": ">=19.0.0",
34
+ "@angular/platform-server": ">=19.0.0"
35
+ },
36
+ "devDependencies": {
37
+ "@analogjs/vite-plugin-angular": "~1.17.1",
38
+ "@analogjs/vitest-angular": "~1.17.1",
39
+ "@angular-eslint/builder": "^20.0.0",
40
+ "@angular-eslint/bundled-angular-compiler": "^20.0.0",
41
+ "@angular-eslint/eslint-plugin": "^20.0.0",
42
+ "@angular-eslint/eslint-plugin-template": "^20.0.0",
43
+ "@angular-eslint/schematics": "^20.0.0",
44
+ "@angular-eslint/template-parser": "^20.0.0",
45
+ "@testing-library/angular": "^17.4.0",
46
+ "angular-eslint": "^20.0.0"
47
+ }
48
+ }
@@ -0,0 +1,2 @@
1
+ export declare const randomId: () => string;
2
+ //# sourceMappingURL=random-id.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"random-id.d.ts","sourceRoot":"","sources":["../../src/utils/random-id.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,cAEpB,CAAA"}
package/package.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "@ks-digital/designsystem-angular",
3
+ "repository": {
4
+ "type": "git",
5
+ "url": "https://github.com/ks-no/designsystem.git",
6
+ "directory": "packages/angular"
7
+ },
8
+ "version": "0.0.1-alpha.5",
9
+ "license": "MIT",
10
+ "private": false,
11
+ "publishConfig": {
12
+ "access": "public"
13
+ },
14
+ "type": "module",
15
+ "main": "./dist/index.js",
16
+ "types": "./dist/index.d.ts",
17
+ "exports": {
18
+ ".": {
19
+ "types": "./dist/index.d.ts",
20
+ "import": "./dist/index.js",
21
+ "require": "./dist/index.js"
22
+ }
23
+ },
24
+ "files": [
25
+ "./dist"
26
+ ],
27
+ "dependencies": {
28
+ "@digdir/designsystemet-css": "1.0.5"
29
+ },
30
+ "peerDependencies": {
31
+ "@angular/common": ">=19.0.0",
32
+ "@angular/core": ">=19.0.0",
33
+ "@angular/platform-browser": ">=19.0.0",
34
+ "@angular/platform-server": ">=19.0.0"
35
+ },
36
+ "devDependencies": {
37
+ "@analogjs/vite-plugin-angular": "~1.17.1",
38
+ "@analogjs/vitest-angular": "~1.17.1",
39
+ "@angular-eslint/builder": "^20.0.0",
40
+ "@angular-eslint/bundled-angular-compiler": "^20.0.0",
41
+ "@angular-eslint/eslint-plugin": "^20.0.0",
42
+ "@angular-eslint/eslint-plugin-template": "^20.0.0",
43
+ "@angular-eslint/schematics": "^20.0.0",
44
+ "@angular-eslint/template-parser": "^20.0.0",
45
+ "@testing-library/angular": "^17.4.0",
46
+ "angular-eslint": "^20.0.0"
47
+ }
48
+ }