@ndwnu/design-system 9.1.0 → 10.0.0

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 (61) hide show
  1. package/assets/images/map-button-icons.svg +84 -34
  2. package/fesm2022/ndwnu-design-system.mjs +2125 -2401
  3. package/fesm2022/ndwnu-design-system.mjs.map +1 -1
  4. package/lib/components/accordion/accordion.component.d.ts +3 -3
  5. package/lib/components/breadcrumb/breadcrumb.component.d.ts +3 -5
  6. package/lib/components/breadcrumb-group/breadcrumb-group.component.d.ts +2 -1
  7. package/lib/components/collapsible/collapsible.component.d.ts +3 -1
  8. package/lib/components/dropdown/dropdown.component.d.ts +1 -1
  9. package/lib/components/form-field/autosuggest/autosuggest-add-option/autosuggest-add-option.component.d.ts +4 -6
  10. package/lib/components/form-field/autosuggest/autosuggest-option/autosuggest-option.component.d.ts +6 -17
  11. package/lib/components/form-field/autosuggest/autosuggest-option/index.d.ts +0 -1
  12. package/lib/components/form-field/autosuggest/autosuggest-panel/autosuggest-panel.component.d.ts +4 -35
  13. package/lib/components/form-field/autosuggest/autosuggest-panel/index.d.ts +1 -0
  14. package/lib/components/form-field/autosuggest/autosuggest.directive.d.ts +6 -68
  15. package/lib/components/form-field/autosuggest/index.d.ts +4 -4
  16. package/lib/components/form-field/form-field.model.d.ts +1 -0
  17. package/lib/components/form-field/month-input/date-validators.d.ts +3 -0
  18. package/lib/components/form-field/month-input/month-input-utils.d.ts +2 -1
  19. package/lib/components/form-field/month-input/month-input.component.d.ts +4 -1
  20. package/lib/components/form-field/option-group/option.component.d.ts +2 -1
  21. package/lib/components/form-field/radio-button/radio-button.component.d.ts +4 -3
  22. package/lib/components/form-field/radio-group/radio-group.component.d.ts +0 -2
  23. package/lib/components/index.d.ts +4 -0
  24. package/lib/components/list/index.d.ts +1 -0
  25. package/lib/components/list/list.component.d.ts +11 -0
  26. package/lib/components/list-item/index.d.ts +1 -0
  27. package/lib/components/list-item/list-item.component.d.ts +34 -0
  28. package/lib/components/main-navigation/main-navigation-header/main-navigation-header.component.d.ts +1 -1
  29. package/lib/components/map-button/map-button.component.d.ts +3 -3
  30. package/lib/components/map-button/map-button.model.d.ts +2 -2
  31. package/lib/components/map-display/map-display.component.d.ts +1 -1
  32. package/lib/components/map-legend/index.d.ts +2 -0
  33. package/lib/components/map-legend/map-legend-group/map-legend-group.component.d.ts +9 -0
  34. package/lib/components/map-legend/map-legend-option/map-legend-option.component.d.ts +7 -0
  35. package/lib/components/map-legend/map-legend.component.d.ts +17 -0
  36. package/lib/components/map-legend/map-legend.model.d.ts +33 -0
  37. package/lib/components/multi-select/checkbox-data.interface.d.ts +3 -0
  38. package/lib/components/multi-select/multi-select.component.d.ts +2 -1
  39. package/lib/components/popover/popover-trigger.directive.d.ts +3 -1
  40. package/lib/components/router-breadcrumbs/router-breadcrumbs.component.d.ts +2 -11
  41. package/lib/components/tab-group/tab-group.component.d.ts +2 -1
  42. package/lib/components/table/ag-grid-theme.d.ts +2 -0
  43. package/lib/components/table/index.d.ts +1 -0
  44. package/lib/components/toast/toast-list/toast-list.component.d.ts +17 -0
  45. package/lib/components/toast/toast.component.d.ts +16 -17
  46. package/lib/components/toast/toast.service.d.ts +26 -7
  47. package/lib/models/index.d.ts +1 -0
  48. package/package.json +4 -2
  49. package/styles/base/_colors.scss +3 -1
  50. package/styles/base/_variables.scss +1 -0
  51. package/styles/base/colors.stories.model.ts +28 -92
  52. package/styles/base/colors.stories.ts +13 -3
  53. package/styles/base/typography.stories.ts +4 -9
  54. package/styles/components/_divider.scss +1 -1
  55. package/styles/components/_input.scss +0 -4
  56. package/styles/components/_map.scss +114 -0
  57. package/styles/components/_table.scss +8 -0
  58. package/styles/components/index.scss +2 -0
  59. package/lib/components/form-field/autosuggest/autosuggest-option/autosuggest-option.model.d.ts +0 -5
  60. package/lib/components/form-field/autosuggest/autosuggest-option/base-autosuggest-option.component.d.ts +0 -26
  61. package/styles/base/colors.stories.utils.ts +0 -58
@@ -11,6 +11,7 @@ export declare class MultiSelectComponent {
11
11
  readonly noResultText: import("@angular/core").InputSignal<string>;
12
12
  readonly chevron: import("@angular/core").InputSignal<boolean>;
13
13
  readonly disabled: import("@angular/core").InputSignal<boolean>;
14
+ readonly selectAmountHidden: import("@angular/core").InputSignal<boolean>;
14
15
  readonly selectAllText: import("@angular/core").InputSignal<SelectAllText>;
15
16
  readonly dataSource: import("@angular/core").ModelSignal<CheckboxData[]>;
16
17
  protected readonly lastCheckedElementId: import("@angular/core").ModelSignal<string | number | null | undefined>;
@@ -24,5 +25,5 @@ export declare class MultiSelectComponent {
24
25
  isOpenChanged(isOpen: boolean): void;
25
26
  private determineLastCheckedElement;
26
27
  static ɵfac: i0.ɵɵFactoryDeclaration<MultiSelectComponent, never>;
27
- static ɵcmp: i0.ɵɵComponentDeclaration<MultiSelectComponent, "ndw-multi-select", never, { "buttonText": { "alias": "buttonText"; "required": true; "isSignal": true; }; "searchLabel": { "alias": "searchLabel"; "required": false; "isSignal": true; }; "prefixIcon": { "alias": "prefixIcon"; "required": false; "isSignal": true; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; "isSignal": true; }; "noResultText": { "alias": "noResultText"; "required": false; "isSignal": true; }; "chevron": { "alias": "chevron"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "selectAllText": { "alias": "selectAllText"; "required": false; "isSignal": true; }; "dataSource": { "alias": "dataSource"; "required": false; "isSignal": true; }; "lastCheckedElementId": { "alias": "lastCheckedElementId"; "required": false; "isSignal": true; }; "searchInputValue": { "alias": "searchInputValue"; "required": false; "isSignal": true; }; }, { "dataSource": "dataSourceChange"; "lastCheckedElementId": "lastCheckedElementIdChange"; "searchInputValue": "searchInputValueChange"; }, never, never, true, never>;
28
+ static ɵcmp: i0.ɵɵComponentDeclaration<MultiSelectComponent, "ndw-multi-select", never, { "buttonText": { "alias": "buttonText"; "required": true; "isSignal": true; }; "searchLabel": { "alias": "searchLabel"; "required": false; "isSignal": true; }; "prefixIcon": { "alias": "prefixIcon"; "required": false; "isSignal": true; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; "isSignal": true; }; "noResultText": { "alias": "noResultText"; "required": false; "isSignal": true; }; "chevron": { "alias": "chevron"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "selectAmountHidden": { "alias": "selectAmountHidden"; "required": false; "isSignal": true; }; "selectAllText": { "alias": "selectAllText"; "required": false; "isSignal": true; }; "dataSource": { "alias": "dataSource"; "required": false; "isSignal": true; }; "lastCheckedElementId": { "alias": "lastCheckedElementId"; "required": false; "isSignal": true; }; "searchInputValue": { "alias": "searchInputValue"; "required": false; "isSignal": true; }; }, { "dataSource": "dataSourceChange"; "lastCheckedElementId": "lastCheckedElementIdChange"; "searchInputValue": "searchInputValueChange"; }, never, never, true, never>;
28
29
  }
@@ -1,8 +1,9 @@
1
1
  import { EventEmitter, OnDestroy, TemplateRef } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
+ type PopoverPosition = 'nextToTriggerButton' | 'overTriggerButton';
3
4
  export declare class PopoverTriggerDirective implements OnDestroy {
4
5
  popoverToggled: EventEmitter<boolean>;
5
- popoverPosition: import("@angular/core").InputSignal<string>;
6
+ popoverPosition: import("@angular/core").InputSignal<PopoverPosition>;
6
7
  popoverContent: import("@angular/core").InputSignal<TemplateRef<unknown>>;
7
8
  toggleOnClick: import("@angular/core").InputSignal<boolean>;
8
9
  isOpen: import("@angular/core").ModelSignal<boolean>;
@@ -25,3 +26,4 @@ export declare class PopoverTriggerDirective implements OnDestroy {
25
26
  static ɵfac: i0.ɵɵFactoryDeclaration<PopoverTriggerDirective, never>;
26
27
  static ɵdir: i0.ɵɵDirectiveDeclaration<PopoverTriggerDirective, "[ndwPopoverTrigger]", ["ndwPopoverTrigger"], { "popoverPosition": { "alias": "popoverPosition"; "required": false; "isSignal": true; }; "popoverContent": { "alias": "ndwPopoverTrigger"; "required": true; "isSignal": true; }; "toggleOnClick": { "alias": "toggleOnClick"; "required": false; "isSignal": true; }; "isOpen": { "alias": "isOpen"; "required": false; "isSignal": true; }; }, { "popoverToggled": "popoverToggled"; "isOpen": "isOpenChange"; }, never, never, true, never>;
27
28
  }
29
+ export {};
@@ -1,15 +1,6 @@
1
+ import { CoreRouterBreadcrumbsComponent } from '@ndwnu/core';
1
2
  import * as i0 from "@angular/core";
2
- interface RouteBreadcrumb {
3
- url: string;
4
- title: string;
5
- }
6
- export declare const breadcrumbRouteDataKey = "breadcrumb";
7
- export declare class RouterBreadcrumbsComponent {
8
- private readonly route;
9
- private readonly router;
10
- protected readonly breadcrumbs$: import("rxjs").Observable<RouteBreadcrumb[]>;
11
- private getBreadcrumbs;
3
+ export declare class RouterBreadcrumbsComponent extends CoreRouterBreadcrumbsComponent {
12
4
  static ɵfac: i0.ɵɵFactoryDeclaration<RouterBreadcrumbsComponent, never>;
13
5
  static ɵcmp: i0.ɵɵComponentDeclaration<RouterBreadcrumbsComponent, "ndw-router-breadcrumbs", never, {}, {}, never, never, true, never>;
14
6
  }
15
- export {};
@@ -5,9 +5,10 @@ export declare class TabGroupComponent {
5
5
  private readonly _tabButtons;
6
6
  tabs: import("@angular/core").Signal<TabComponent[]>;
7
7
  activeTab: import("@angular/core").ModelSignal<number>;
8
+ inlinePadding: import("@angular/core").InputSignal<number>;
8
9
  selectTab(index: number): void;
9
10
  onKeyDown(event: KeyboardEvent): void;
10
11
  private getNextEnabledIndex;
11
12
  static ɵfac: i0.ɵɵFactoryDeclaration<TabGroupComponent, never>;
12
- static ɵcmp: i0.ɵɵComponentDeclaration<TabGroupComponent, "ndw-tab-group", never, { "activeTab": { "alias": "activeTab"; "required": false; "isSignal": true; }; }, { "activeTab": "activeTabChange"; }, ["_tabs"], never, true, never>;
13
+ static ɵcmp: i0.ɵɵComponentDeclaration<TabGroupComponent, "ndw-tab-group", never, { "activeTab": { "alias": "activeTab"; "required": false; "isSignal": true; }; "inlinePadding": { "alias": "inlinePadding"; "required": false; "isSignal": true; }; }, { "activeTab": "activeTabChange"; }, ["_tabs"], never, true, never>;
13
14
  }
@@ -0,0 +1,2 @@
1
+ import type { ThemeDefaultParams } from 'ag-grid-community';
2
+ export declare const ndwAgGridTheme: Partial<ThemeDefaultParams>;
@@ -0,0 +1 @@
1
+ export * from './ag-grid-theme';
@@ -0,0 +1,17 @@
1
+ import { ToastComponent, ToastDimensions } from '../toast.component';
2
+ import { ToastService } from '../toast.service';
3
+ import * as i0 from "@angular/core";
4
+ export declare class ToastListComponent {
5
+ protected readonly toastService: ToastService;
6
+ protected readonly toastComponents: import("@angular/core").Signal<readonly ToastComponent[]>;
7
+ protected readonly toastDimensions: import("@angular/core").WritableSignal<Map<string, ToastDimensions>>;
8
+ protected readonly toastOffsetHeights: import("@angular/core").Signal<number[]>;
9
+ protected readonly firstToastHeight: import("@angular/core").Signal<number>;
10
+ protected readonly totalHeightExcludingGaps: import("@angular/core").Signal<number>;
11
+ protected readonly maxToastWidth: import("@angular/core").Signal<number>;
12
+ protected setToastDimensions(id: string, dimensions: ToastDimensions): void;
13
+ protected pause(): void;
14
+ protected resume(): void;
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<ToastListComponent, never>;
16
+ static ɵcmp: i0.ɵɵComponentDeclaration<ToastListComponent, "ndw-toast-list", never, {}, {}, never, never, true, never>;
17
+ }
@@ -1,20 +1,19 @@
1
- import { OnDestroy, OnInit } from '@angular/core';
1
+ import { AfterViewInit } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
- export declare class ToastComponent implements OnInit, OnDestroy {
4
- private readonly renderer;
5
- readonly message: import("@angular/core").InputSignal<string>;
6
- readonly close: import("@angular/core").OutputEmitterRef<void>;
7
- private readonly toastContainer;
8
- private readonly toastProgress;
9
- private interval;
10
- private timeout;
11
- ngOnInit(): void;
12
- ngOnDestroy(): void;
13
- open(): void;
14
- private updateProgressWidth;
15
- protected startFadeOut(): void;
16
- private clearInterval;
17
- private clearTimeout;
3
+ export interface ToastDimensions {
4
+ width: number;
5
+ height: number;
6
+ }
7
+ export declare class ToastComponent implements AfterViewInit {
8
+ #private;
9
+ message: import("@angular/core").InputSignal<string>;
10
+ id: import("@angular/core").InputSignal<string | undefined>;
11
+ duration: import("@angular/core").InputSignal<number>;
12
+ paused: import("@angular/core").InputSignal<boolean>;
13
+ showProgress: import("@angular/core").InputSignal<boolean>;
14
+ closed: import("@angular/core").OutputEmitterRef<void>;
15
+ elementDimensions: import("@angular/core").OutputEmitterRef<ToastDimensions>;
16
+ ngAfterViewInit(): void;
18
17
  static ɵfac: i0.ɵɵFactoryDeclaration<ToastComponent, never>;
19
- static ɵcmp: i0.ɵɵComponentDeclaration<ToastComponent, "ndw-toast", never, { "message": { "alias": "message"; "required": false; "isSignal": true; }; }, { "close": "close"; }, never, never, true, never>;
18
+ static ɵcmp: i0.ɵɵComponentDeclaration<ToastComponent, "ndw-toast", never, { "message": { "alias": "message"; "required": true; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "duration": { "alias": "duration"; "required": false; "isSignal": true; }; "paused": { "alias": "paused"; "required": false; "isSignal": true; }; "showProgress": { "alias": "showProgress"; "required": false; "isSignal": true; }; }, { "closed": "closed"; "elementDimensions": "elementDimensions"; }, never, never, true, never>;
20
19
  }
@@ -1,12 +1,31 @@
1
- import { OverlayRef } from '@angular/cdk/overlay';
1
+ import { Signal } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
+ type ToastId = string;
4
+ interface ToastData {
5
+ id: ToastId;
6
+ message: string;
7
+ duration: number;
8
+ remainingTime: number;
9
+ }
3
10
  export declare class ToastService {
4
- private readonly overlay;
5
- private isOpen;
6
- overlayRef?: OverlayRef;
7
- detach(): void;
8
- dispose(): void;
9
- open(message: string): void;
11
+ #private;
12
+ paused: Signal<boolean>;
13
+ get toasts(): Signal<ToastData[]>;
14
+ constructor();
15
+ /**
16
+ * Close a toast by its ID. If no ID is provided, all toasts will be closed.
17
+ */
18
+ close(id?: string): void;
19
+ /**
20
+ * Open a toast notification with the given message and optional duration.
21
+ * @param message The message to display in the toast.
22
+ * @param duration Optional duration in milliseconds for which the toast should be visible. Defaults to 5000ms.
23
+ * @returns The ID of the created toast. Can be used to close the toast.
24
+ */
25
+ open(message: string, duration?: number): `${string}-${string}-${string}-${string}-${string}`;
26
+ pause(): void;
27
+ resume(): void;
10
28
  static ɵfac: i0.ɵɵFactoryDeclaration<ToastService, never>;
11
29
  static ɵprov: i0.ɵɵInjectableDeclaration<ToastService>;
12
30
  }
31
+ export {};
@@ -1 +1,2 @@
1
+ export { Image } from '@ndwnu/core';
1
2
  export * from './aria.model';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ndwnu/design-system",
3
- "version": "9.1.0",
3
+ "version": "10.0.0",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": "^19.0.0",
6
6
  "@angular/cdk": "^19.0.0",
@@ -8,9 +8,11 @@
8
8
  "@angular/core": "^19.0.0",
9
9
  "@angular/forms": "^19.0.0",
10
10
  "@angular/router": "^19.0.0",
11
- "@ndwnu/core": "0.0.2-beta.1",
11
+ "@ndwnu/core": "0.0.3-beta.5",
12
12
  "@storybook/addon-actions": "8.6.12",
13
13
  "@storybook/angular": "8.6.12",
14
+ "ag-grid-angular": "^33.3.0",
15
+ "ag-grid-community": "^33.3.0",
14
16
  "rxjs": "^7.8.0"
15
17
  },
16
18
  "sideEffects": false,
@@ -8,6 +8,7 @@
8
8
  --_grey-300: 192, 5%, 82%;
9
9
  --_grey-200: 204, 11%, 91%;
10
10
  --_grey-100: 200, 16%, 96%;
11
+ --_grey-50: 0, 0%, 99%;
11
12
  --_white: 0, 0%, 100%;
12
13
 
13
14
  --ndw-color-grey-700: hsl(var(--_grey-700));
@@ -17,6 +18,7 @@
17
18
  --ndw-color-grey-300: hsl(var(--_grey-300));
18
19
  --ndw-color-grey-200: hsl(var(--_grey-200));
19
20
  --ndw-color-grey-100: hsl(var(--_grey-100));
21
+ --ndw-color-grey-50: hsl(var(--_grey-50));
20
22
  --ndw-color-white: hsl(var(--_white));
21
23
 
22
24
  // Primary
@@ -187,7 +189,7 @@
187
189
  --_primary-200: 176, 44%, 73%;
188
190
  --_primary-300: 176, 50%, 60%;
189
191
  --_primary-400: 176, 55%, 48%;
190
- --_primary-500: 176, 58%, 41%;
192
+ --_primary-500: 176, 53%, 33%;
191
193
  --_primary-600: 176, 60%, 34%;
192
194
  --_primary-700: 176, 68%, 21%;
193
195
  --_primary-800: 176, 68%, 13%;
@@ -28,6 +28,7 @@
28
28
  --ndw-elevation-content: 0 0.125rem 0.125rem 0 hsla(var(--_grey-600), 0.05);
29
29
  --ndw-elevation-dropdown: 0 0.25rem 1rem hsla(var(--_grey-600), 0.125);
30
30
  --ndw-elevation-popover: 0 0.5rem 1.25rem hsla(var(--_grey-600), 0.125);
31
+ --ndw-elevation-toast: 0 0.75rem 1.25rem hsla(var(--_grey-600), 0.125);
31
32
  --ndw-backdrop-color: var(--ndw-alpha-black-040);
32
33
 
33
34
  /* Animation */
@@ -1,16 +1,6 @@
1
- import { alphas, colors, header } from './colors.stories.utils';
1
+ import { ColorGroup } from '@ndwnu/core';
2
2
 
3
- interface ColorValue {
4
- value?: number;
5
- subName?: string;
6
- }
7
-
8
- export interface ColorGroup {
9
- name: string;
10
- colors: ColorValue[];
11
- }
12
-
13
- const primary: ColorGroup = {
3
+ export const PRIMARY: ColorGroup = {
14
4
  name: 'Primary',
15
5
  colors: [
16
6
  { value: 50 },
@@ -25,7 +15,7 @@ const primary: ColorGroup = {
25
15
  ],
26
16
  };
27
17
 
28
- const secondary: ColorGroup = {
18
+ export const SECONDARY: ColorGroup = {
29
19
  name: 'Secondary',
30
20
  colors: [
31
21
  { value: 50 },
@@ -39,14 +29,15 @@ const secondary: ColorGroup = {
39
29
  ],
40
30
  };
41
31
 
42
- const tertiary: ColorGroup = {
32
+ export const TERTIARY: ColorGroup = {
43
33
  name: 'Tertiary',
44
34
  colors: [{ value: 400 }, { value: 500 }],
45
35
  };
46
36
 
47
- const grey: ColorGroup = {
37
+ export const GREY: ColorGroup = {
48
38
  name: 'Grey',
49
39
  colors: [
40
+ { value: undefined, altName: 'White' },
50
41
  { value: 100 },
51
42
  { value: 200 },
52
43
  { value: 300 },
@@ -57,87 +48,32 @@ const grey: ColorGroup = {
57
48
  ],
58
49
  };
59
50
 
60
- const white: ColorGroup = {
61
- name: 'White',
62
- colors: [{ value: undefined }],
63
- };
64
-
65
- const links: ColorGroup = {
51
+ export const LINK: ColorGroup = {
66
52
  name: 'Link',
67
53
  colors: [{ value: 400 }, { value: 500 }],
68
54
  };
69
55
 
70
- const positive: ColorGroup = {
71
- name: 'Positive',
72
- colors: [{ value: 100 }, { value: 500 }, { value: 600 }],
73
- };
74
-
75
- const warning: ColorGroup = {
76
- name: 'Warning',
77
- colors: [{ value: 100 }, { value: 500 }, { value: 600 }],
78
- };
79
-
80
- const info: ColorGroup = {
81
- name: 'Info',
82
- colors: [{ value: 100 }, { value: 500 }],
83
- };
84
-
85
- const alternative: ColorGroup = {
86
- name: 'Alternative',
87
- colors: [{ value: 100 }, { value: 500 }],
56
+ export const NOTIFICATIONS: ColorGroup = {
57
+ name: 'Notifications',
58
+ colors: [
59
+ { value: 100, altName: 'Positive' },
60
+ { value: 500, altName: 'Positive' },
61
+ { value: 600, altName: 'Positive' },
62
+ { value: 100, altName: 'Warning' },
63
+ { value: 500, altName: 'Warning' },
64
+ { value: 600, altName: 'Warning' },
65
+ { value: 100, altName: 'Critical' },
66
+ { value: 200, altName: 'Critical' },
67
+ { value: 300, altName: 'Critical' },
68
+ { value: 500, altName: 'Critical' },
69
+ { value: 100, altName: 'Info' },
70
+ { value: 500, altName: 'Info' },
71
+ { value: 100, altName: 'Alternative' },
72
+ { value: 500, altName: 'Alternative' },
73
+ ],
88
74
  };
89
75
 
90
- const critical: ColorGroup = {
91
- name: 'Critical',
92
- colors: [{ value: 100 }, { value: 200 }, { value: 300 }, { value: 500 }],
76
+ export const ALPHAS: ColorGroup = {
77
+ name: 'Alphas',
78
+ alphas: ['Black-007', 'Black-015', 'Black-040', 'Primary-007', 'Primary-015'],
93
79
  };
94
-
95
- const alphaValues = ['Black-007', 'Black-015', 'Black-040', 'Primary-007', 'Primary-015'];
96
-
97
- // Todo - Update color values when switching between themes
98
- export const template = `
99
- <div class="sb">
100
- <div class="sb_content overview colors">
101
- <section>
102
- <h2 class="ndw-heading-md">Primary</h2>
103
- ${header(['Color', 'Name', 'Value', 'Variable'])}
104
- ${colors(primary)}
105
- </section>
106
- <section>
107
- <h2 class="ndw-heading-md">Secondary</h2>
108
- ${header(['Color', 'Name', 'Value', 'Variable'])}
109
- ${colors(secondary)}
110
- </section>
111
- <section>
112
- <h2 class="ndw-heading-md">Tertiary</h2>
113
- ${header(['Color', 'Name', 'Value', 'Variable'])}
114
- ${colors(tertiary)}
115
- </section>
116
- <section>
117
- <h2 class="ndw-heading-md">Grey</h2>
118
- ${header(['Color', 'Name', 'Value', 'Variable'])}
119
- ${colors(white)}
120
- ${colors(grey)}
121
- </section>
122
- <section>
123
- <h2 class="ndw-heading-md">Links</h2>
124
- ${header(['Color', 'Name', 'Value', 'Variable'])}
125
- ${colors(links)}
126
- </section>
127
- <section>
128
- <h2 class="ndw-heading-md">Notifications</h2>
129
- ${header(['Color', 'Name', 'Value', 'Variable'])}
130
- ${colors(positive)}
131
- ${colors(info)}
132
- ${colors(warning)}
133
- ${colors(critical)}
134
- ${colors(alternative)}
135
- </section>
136
- <section>
137
- <h2 class="ndw-heading-md">Alpha</h2>
138
- ${header(['Alpha', 'Name', 'Value', 'Variable'])}
139
- ${alphas(alphaValues)}
140
- </section>
141
- </div>
142
- </div>
143
- `;
@@ -1,11 +1,21 @@
1
+ import { template } from '@ndwnu/core';
1
2
  import { type Meta, type StoryObj } from '@storybook/angular';
2
3
 
3
- import { template } from './colors.stories.model';
4
+ import {
5
+ ALPHAS,
6
+ GREY,
7
+ LINK,
8
+ NOTIFICATIONS,
9
+ PRIMARY,
10
+ SECONDARY,
11
+ TERTIARY,
12
+ } from './colors.stories.model';
4
13
 
5
14
  const meta: Meta = {
6
15
  title: 'Core/Colors',
7
- tags: ['autodocs', 'ndw', 'nwb', 'ntm'],
8
- render: () => ({ template }),
16
+ render: () => ({
17
+ template: template([PRIMARY, SECONDARY, TERTIARY, GREY, LINK, NOTIFICATIONS, ALPHAS]),
18
+ }),
9
19
  } as Meta;
10
20
 
11
21
  export default meta;
@@ -1,16 +1,11 @@
1
+ import { TypographyVariant } from '@ndwnu/core';
1
2
  import { type Meta, type StoryObj } from '@storybook/angular';
2
3
 
3
4
  interface StoryArgs {
4
- typographyList: Typography[];
5
+ typographyList: TypographyVariant[];
5
6
  }
6
7
 
7
- interface Typography {
8
- fontSize: string;
9
- fontSizeInRem: string;
10
- class: string;
11
- }
12
-
13
- const typographyList: Typography[] = [
8
+ const typographyList: TypographyVariant[] = [
14
9
  {
15
10
  fontSize: '40px',
16
11
  fontSizeInRem: '2.5rem',
@@ -92,7 +87,7 @@ const meta: Meta<StoryArgs> = {
92
87
  </div>
93
88
  ${typographyList
94
89
  .map(
95
- (typography: Typography) => `
90
+ (typography: TypographyVariant) => `
96
91
  <div class="content ${typography.class}">
97
92
  <span>${typography.fontSize} / ${typography.fontSizeInRem}</span>
98
93
  <span>150%</span>
@@ -1,5 +1,5 @@
1
1
  hr[ndwDivider] {
2
- background-color: var(--ndw-color-grey-300);
2
+ background-color: var(--ndw-color-grey-200);
3
3
  border: none;
4
4
  height: var(--ndw-border-size-sm);
5
5
  margin: var(--ndw-spacing-xs) 0;
@@ -100,10 +100,6 @@
100
100
  padding-inline-end: var(--ndw-spacing-xs);
101
101
  }
102
102
 
103
- .input-container[error]:has(> [ndwInput]:is(:active, :focus, :focus-visible)) {
104
- background-color: var(--ndw-color-white);
105
- }
106
-
107
103
  .input-container[error]:has(> [ndwInput]:is(:active, :focus, :focus-visible)) {
108
104
  background-color: var(--ndw-color-white);
109
105
  select[ndwInput] {
@@ -0,0 +1,114 @@
1
+ @use '../base/typography' as *;
2
+
3
+ .map-control {
4
+ position: relative;
5
+ overflow: hidden;
6
+ display: inline-flex;
7
+ align-items: center;
8
+
9
+ height: 40px;
10
+ min-width: 40px;
11
+ line-height: 100%;
12
+
13
+ border: var(--ndw-border-size-sm) solid var(--ndw-color-grey-200);
14
+ border-radius: var(--ndw-border-radius-sm);
15
+ box-shadow: var(--ndw-elevation-content);
16
+
17
+ @include ndw-paragraph-bold-md;
18
+ color: var(--ndw-color-grey-500);
19
+ background-color: var(--ndw-color-white);
20
+ transition: var(--ndw-animation-speed-default);
21
+ will-change: background-color, color;
22
+
23
+ &:hover {
24
+ background-color: var(--ndw-color-grey-100);
25
+ }
26
+
27
+ &.active {
28
+ color: var(--ndw-color-primary-500);
29
+
30
+ ndw-icon {
31
+ font-variation-settings: 'FILL' 1;
32
+ }
33
+
34
+ .map-control__chevron {
35
+ rotate: 180deg;
36
+ }
37
+ }
38
+
39
+ &:disabled,
40
+ &.disabled {
41
+ pointer-events: none;
42
+ color: var(--ndw-color-grey-300);
43
+ }
44
+
45
+ .map-control__chevron {
46
+ pointer-events: none;
47
+ padding: 0.25rem;
48
+ color: var(--ndw-color-primary);
49
+
50
+ transition-property: rotate;
51
+ transition-duration: var(--ndw-animation-speed-fast);
52
+ transition-timing-function: ease-out;
53
+ transition-delay: 0s;
54
+ }
55
+
56
+ .content-wrapper:not(:empty) {
57
+ @include ndw-paragraph-bold-md;
58
+ line-height: 1rem;
59
+ padding-inline: var(--ndw-spacing-xs);
60
+ }
61
+
62
+ > button {
63
+ @include ndw-paragraph-bold-md;
64
+
65
+ border: none;
66
+ background: none;
67
+ padding: var(--ndw-spacing-xs);
68
+
69
+ color: var(--ndw-color-grey-600);
70
+ font-size: var(--ndw-font-size-sm);
71
+ font-weight: var(--ndw-font-weight-bold);
72
+
73
+ &:after {
74
+ content: '';
75
+ position: absolute;
76
+ inset: 0;
77
+ }
78
+ }
79
+ }
80
+
81
+ .map-control-dropdown {
82
+ display: grid;
83
+ grid-template-rows: max-content 1fr;
84
+ padding: var(--ndw-spacing-2xs);
85
+ width: 226px;
86
+
87
+ border: var(--ndw-border-size-sm) solid var(--ndw-color-grey-200);
88
+ border-radius: var(--ndw-border-radius-sm);
89
+ box-shadow: var(--ndw-elevation-dropdown);
90
+
91
+ background-color: var(--ndw-color-white);
92
+
93
+ &:not(.fixed) {
94
+ max-height: 380px;
95
+ }
96
+
97
+ header {
98
+ display: flex;
99
+ justify-content: space-between;
100
+ align-items: center;
101
+ gap: var(--ndw-spacing-xs);
102
+ padding: var(--ndw-spacing-xs) 0 var(--ndw-spacing-xs) var(--ndw-spacing-2xs);
103
+
104
+ h3 {
105
+ color: var(--ndw-color-grey-600);
106
+ margin-block: 0;
107
+ }
108
+ }
109
+
110
+ &__content {
111
+ flex: 1;
112
+ overflow-y: auto;
113
+ }
114
+ }
@@ -0,0 +1,8 @@
1
+ .ag-root-wrapper {
2
+ padding: var(--ndw-spacing-md);
3
+ box-shadow: var(--ndw-elevation-content);
4
+
5
+ .ag-header-cell-text {
6
+ text-transform: uppercase;
7
+ }
8
+ }
@@ -10,3 +10,5 @@
10
10
  @forward 'menu-button';
11
11
  @forward 'popover';
12
12
  @forward 'summary-card';
13
+ @forward 'table';
14
+ @forward 'map';
@@ -1,5 +0,0 @@
1
- import { AutosuggestOptionComponent } from './autosuggest-option.component';
2
- import { AutosuggestAddOptionComponent } from '../autosuggest-add-option';
3
- export type AutosuggestOption<T = string> = T;
4
- export type AutosuggestOptions<T = string> = AutosuggestOption<T>[];
5
- export type AutosuggestOptionComponentType<T> = AutosuggestOptionComponent<T> | AutosuggestAddOptionComponent<T>;
@@ -1,26 +0,0 @@
1
- import { FocusableOption, FocusOrigin } from '@angular/cdk/a11y';
2
- import { EventEmitter, OnDestroy } from '@angular/core';
3
- import { AutocompleteOptionSelectionChange } from './autosuggest-option.component';
4
- import * as i0 from "@angular/core";
5
- export declare abstract class BaseAutosuggestOptionComponent<T> implements FocusableOption, OnDestroy {
6
- readonly value: import("@angular/core").InputSignal<T | undefined>;
7
- readonly selectionChange: EventEmitter<AutocompleteOptionSelectionChange<T>>;
8
- protected _active: boolean;
9
- protected _selected: boolean;
10
- get active(): boolean;
11
- get selected(): boolean;
12
- private readonly element;
13
- private readonly changeDetectorRef;
14
- focus(_origin?: FocusOrigin, options?: FocusOptions): void;
15
- setActiveStyles(): void;
16
- setInactiveStyles(): void;
17
- select(emitEvent?: boolean): void;
18
- deselect(emitEvent?: boolean): void;
19
- handleKeydown(event: KeyboardEvent): void;
20
- selectViaInteraction(): void;
21
- protected abstract emitSelectionChangeEvent(isUserInput?: boolean): void;
22
- ngOnDestroy(): void;
23
- protected getHostElement(): HTMLElement;
24
- static ɵfac: i0.ɵɵFactoryDeclaration<BaseAutosuggestOptionComponent<any>, never>;
25
- static ɵcmp: i0.ɵɵComponentDeclaration<BaseAutosuggestOptionComponent<any>, "ng-component", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
26
- }