@ndwnu/design-system 7.0.1 → 8.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 (37) hide show
  1. package/fesm2022/ndwnu-design-system.mjs +508 -222
  2. package/fesm2022/ndwnu-design-system.mjs.map +1 -1
  3. package/lib/components/avatar/avatar.component.d.ts +9 -0
  4. package/lib/components/avatar/avatar.model.d.ts +2 -0
  5. package/lib/components/avatar/index.d.ts +2 -0
  6. package/lib/components/edit-bar/edit-bar-actions/edit-bar-actions.component.d.ts +5 -0
  7. package/lib/components/edit-bar/edit-bar-message/edit-bar-message.component.d.ts +5 -0
  8. package/lib/components/edit-bar/edit-bar.component.d.ts +15 -0
  9. package/lib/components/edit-bar/edit-bar.model.d.ts +2 -0
  10. package/lib/components/edit-bar/index.d.ts +4 -0
  11. package/lib/components/form-field/file-upload/file-upload.component.d.ts +7 -0
  12. package/lib/components/form-field/input/input.directive.d.ts +2 -0
  13. package/lib/components/form-field/month-input/month-input.component.d.ts +1 -0
  14. package/lib/components/index.d.ts +4 -1
  15. package/lib/components/layout/layout.component.d.ts +2 -1
  16. package/lib/components/main-navigation/main-navigation.component.d.ts +4 -2
  17. package/lib/components/main-navigation/main-navigation.imports.d.ts +2 -1
  18. package/lib/components/main-navigation/main-navigation.model.d.ts +1 -0
  19. package/lib/components/splitter/index.d.ts +1 -0
  20. package/lib/components/splitter/splitter.component.d.ts +69 -0
  21. package/lib/components/summary-card/index.d.ts +0 -1
  22. package/lib/components/summary-card/summary-card.component.d.ts +1 -1
  23. package/lib/components/summary-card/summary-card.model.d.ts +0 -1
  24. package/package.json +1 -1
  25. package/styles/base/_variables.scss +7 -0
  26. package/styles/base/typography.stories.ts +1 -1
  27. package/styles/components/_divider.scss +6 -8
  28. package/styles/components/_edit-bar.scss +97 -0
  29. package/styles/components/_input.scss +25 -1
  30. package/styles/components/_link.scss +1 -0
  31. package/styles/components/_summary-card.scss +18 -66
  32. package/styles/components/index.scss +1 -0
  33. package/styles/components/link.stories.ts +1 -1
  34. package/styles/layout/_grid.scss +45 -1
  35. package/styles/layout/grid.stories.ts +50 -28
  36. package/styles/storybook/_reset.scss +1 -0
  37. package/lib/components/summary-card/summary-card-avatar/summary-card-avatar.component.d.ts +0 -8
@@ -0,0 +1,9 @@
1
+ import { AvatarStatus, AvatarColor } from './avatar.model';
2
+ import * as i0 from "@angular/core";
3
+ export declare class AvatarComponent {
4
+ status: import("@angular/core").InputSignal<AvatarStatus>;
5
+ initials: import("@angular/core").InputSignal<boolean>;
6
+ color: import("@angular/core").InputSignal<AvatarColor | undefined>;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<AvatarComponent, never>;
8
+ static ɵcmp: i0.ɵɵComponentDeclaration<AvatarComponent, "ndw-avatar", never, { "status": { "alias": "status"; "required": false; "isSignal": true; }; "initials": { "alias": "initials"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
9
+ }
@@ -0,0 +1,2 @@
1
+ export type AvatarStatus = 'approved' | 'open' | 'none';
2
+ export type AvatarColor = 'default' | 'blue' | 'purple' | 'red' | 'green' | 'yellow' | 'orange';
@@ -0,0 +1,2 @@
1
+ export * from './avatar.component';
2
+ export * from './avatar.model';
@@ -0,0 +1,5 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class EditBarActionsComponent {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<EditBarActionsComponent, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<EditBarActionsComponent, "ndw-edit-bar-actions", never, {}, {}, never, ["*"], true, never>;
5
+ }
@@ -0,0 +1,5 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class EditBarMessageComponent {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<EditBarMessageComponent, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<EditBarMessageComponent, "ndw-edit-bar-message", never, {}, {}, never, ["*"], true, never>;
5
+ }
@@ -0,0 +1,15 @@
1
+ import { AfterViewInit, ElementRef, OnDestroy } from '@angular/core';
2
+ import { EditBarPosition, EditBarWidth } from './edit-bar.model';
3
+ import * as i0 from "@angular/core";
4
+ export declare class EditBarComponent implements AfterViewInit, OnDestroy {
5
+ #private;
6
+ readonly grid: import("@angular/core").InputSignal<boolean>;
7
+ readonly position: import("@angular/core").InputSignal<EditBarPosition>;
8
+ readonly positionFixedWidth: import("@angular/core").InputSignal<EditBarWidth>;
9
+ readonly editBar: import("@angular/core").Signal<ElementRef<HTMLDivElement>>;
10
+ readonly height: import("@angular/core").WritableSignal<number | null>;
11
+ ngAfterViewInit(): void;
12
+ ngOnDestroy(): void;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<EditBarComponent, never>;
14
+ static ɵcmp: i0.ɵɵComponentDeclaration<EditBarComponent, "ndw-edit-bar", never, { "grid": { "alias": "grid"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "positionFixedWidth": { "alias": "positionFixedWidth"; "required": false; "isSignal": true; }; }, {}, never, ["ndw-edit-bar-message", "ndw-edit-bar-actions"], true, never>;
15
+ }
@@ -0,0 +1,2 @@
1
+ export type EditBarPosition = 'fixed' | 'sticky' | 'static' | 'absolute';
2
+ export type EditBarWidth = 'full' | 'layout';
@@ -0,0 +1,4 @@
1
+ export * from './edit-bar.component';
2
+ export * from './edit-bar.model';
3
+ export * from './edit-bar-actions/edit-bar-actions.component';
4
+ export * from './edit-bar-message/edit-bar-message.component';
@@ -35,6 +35,13 @@ export declare class FileUploadComponent implements ControlValueAccessor {
35
35
  private resetFile;
36
36
  private correctFileSize;
37
37
  private correctFileType;
38
+ /**
39
+ * Ensures that the provided File has a valid MIME type.
40
+ *
41
+ * NOTE: Some file extensions are not automatically mapped to a valid MIME type by the operating system.
42
+ * In such cases, the MIME_TYPE_MAP is used to assign the correct MIME type.
43
+ */
44
+ private ensureFileType;
38
45
  static ɵfac: i0.ɵɵFactoryDeclaration<FileUploadComponent, never>;
39
46
  static ɵcmp: i0.ɵɵComponentDeclaration<FileUploadComponent, "ndw-file-upload", never, { "allowedFileTypeRegex": { "alias": "allowedFileTypeRegex"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "fileUploadText": { "alias": "fileUploadText"; "required": false; "isSignal": true; }; "maxFileSizeInBytes": { "alias": "maxFileSizeInBytes"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "uploadDate": { "alias": "uploadDate"; "required": false; "isSignal": true; }; "draggingOver": { "alias": "draggingOver"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "incorrectFileSize": { "alias": "incorrectFileSize"; "required": false; "isSignal": true; }; "incorrectFileType": { "alias": "incorrectFileType"; "required": false; "isSignal": true; }; "selectedFile": { "alias": "selectedFile"; "required": false; "isSignal": true; }; "success": { "alias": "success"; "required": false; "isSignal": true; }; }, { "disabled": "disabledChange"; "draggingOver": "draggingOverChange"; "error": "errorChange"; "incorrectFileSize": "incorrectFileSizeChange"; "incorrectFileType": "incorrectFileTypeChange"; "selectedFile": "selectedFileChange"; "success": "successChange"; }, never, never, true, never>;
40
47
  }
@@ -3,6 +3,7 @@ import { AbstractControl } from '@angular/forms';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class InputDirective implements OnInit {
5
5
  set disabled(disabled: boolean);
6
+ get error(): boolean;
6
7
  set error(error: boolean);
7
8
  set success(success: boolean);
8
9
  set id(id: string);
@@ -13,6 +14,7 @@ export declare class InputDirective implements OnInit {
13
14
  get element(): HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;
14
15
  get control(): AbstractControl | null;
15
16
  ngOnInit(): void;
17
+ updateErrorAttribute(formFieldError?: boolean): void;
16
18
  private setSelectPlaceholderAttribute;
17
19
  private updateRequiredAttribute;
18
20
  static ɵfac: i0.ɵɵFactoryDeclaration<InputDirective, never>;
@@ -29,6 +29,7 @@ export declare class MonthInputComponent implements ControlValueAccessor, OnInit
29
29
  private onChange;
30
30
  constructor();
31
31
  ngOnInit(): void;
32
+ updateErrorAttribute(formFieldError?: boolean): void;
32
33
  writeValue(value: Date | null): void;
33
34
  registerOnChange(fn: (value: Date | null) => void): void;
34
35
  setDisabledState(isDisabled: boolean): void;
@@ -1,5 +1,6 @@
1
1
  export * from './accordion';
2
2
  export * from './alert';
3
+ export * from './avatar';
3
4
  export * from './badge';
4
5
  export * from './banner';
5
6
  export * from './breadcrumb';
@@ -9,6 +10,7 @@ export * from './card';
9
10
  export * from './collapsible';
10
11
  export * from './dashboard-card';
11
12
  export * from './dropdown';
13
+ export * from './edit-bar';
12
14
  export * from './form-field';
13
15
  export * from './icon';
14
16
  export * from './layout';
@@ -20,9 +22,10 @@ export * from './multi-select';
20
22
  export * from './pill';
21
23
  export * from './popover';
22
24
  export * from './router-breadcrumbs';
25
+ export * from './splitter';
26
+ export * from './summary-card';
23
27
  export * from './tab';
24
28
  export * from './tab-group';
25
29
  export * from './tag';
26
30
  export * from './toast';
27
31
  export * from './tooltip';
28
- export * from './summary-card';
@@ -9,6 +9,7 @@ export declare class LayoutComponent {
9
9
  menuFooterTexts: import("@angular/core").InputSignal<string[] | undefined>;
10
10
  topMenuItems: import("@angular/core").InputSignal<MenuItem[]>;
11
11
  version: import("@angular/core").InputSignal<string | undefined>;
12
+ environment: import("@angular/core").InputSignal<"local" | "staging" | "acceptance" | undefined>;
12
13
  static ɵfac: i0.ɵɵFactoryDeclaration<LayoutComponent, never>;
13
- static ɵcmp: i0.ɵɵComponentDeclaration<LayoutComponent, "ndw-layout", never, { "applicationName": { "alias": "applicationName"; "required": true; "isSignal": true; }; "bottomMenuItems": { "alias": "bottomMenuItems"; "required": false; "isSignal": true; }; "brand": { "alias": "brand"; "required": false; "isSignal": true; }; "isCollapsible": { "alias": "isCollapsible"; "required": false; "isSignal": true; }; "isExpanded": { "alias": "isExpanded"; "required": false; "isSignal": true; }; "menuFooterTexts": { "alias": "menuFooterTexts"; "required": false; "isSignal": true; }; "topMenuItems": { "alias": "topMenuItems"; "required": true; "isSignal": true; }; "version": { "alias": "version"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
14
+ static ɵcmp: i0.ɵɵComponentDeclaration<LayoutComponent, "ndw-layout", never, { "applicationName": { "alias": "applicationName"; "required": true; "isSignal": true; }; "bottomMenuItems": { "alias": "bottomMenuItems"; "required": false; "isSignal": true; }; "brand": { "alias": "brand"; "required": false; "isSignal": true; }; "isCollapsible": { "alias": "isCollapsible"; "required": false; "isSignal": true; }; "isExpanded": { "alias": "isExpanded"; "required": false; "isSignal": true; }; "menuFooterTexts": { "alias": "menuFooterTexts"; "required": false; "isSignal": true; }; "topMenuItems": { "alias": "topMenuItems"; "required": true; "isSignal": true; }; "version": { "alias": "version"; "required": false; "isSignal": true; }; "environment": { "alias": "environment"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
14
15
  }
@@ -2,7 +2,7 @@ import { ConnectedPosition } from '@angular/cdk/overlay';
2
2
  import { TemplatePortal } from '@angular/cdk/portal';
3
3
  import { AfterViewInit, ElementRef, OnDestroy, TemplateRef } from '@angular/core';
4
4
  import { MainNavigationMenuComponent } from '../main-navigation-menu';
5
- import { MenuItem, NdwBrand, SimpleMenuItem } from './main-navigation.model';
5
+ import { Environment, MenuItem, NdwBrand, SimpleMenuItem } from './main-navigation.model';
6
6
  import * as i0 from "@angular/core";
7
7
  export declare class MainNavigationComponent implements AfterViewInit, OnDestroy {
8
8
  #private;
@@ -13,6 +13,7 @@ export declare class MainNavigationComponent implements AfterViewInit, OnDestroy
13
13
  isCollapsible: import("@angular/core").InputSignal<boolean>;
14
14
  topMenuItems: import("@angular/core").InputSignal<MenuItem[]>;
15
15
  version: import("@angular/core").InputSignal<string | undefined>;
16
+ environment: import("@angular/core").InputSignal<Environment | undefined>;
16
17
  closeButtonLabel: import("@angular/core").InputSignal<string>;
17
18
  menuButtonLabel: import("@angular/core").InputSignal<string>;
18
19
  isExpanded: import("@angular/core").ModelSignal<boolean>;
@@ -21,6 +22,7 @@ export declare class MainNavigationComponent implements AfterViewInit, OnDestroy
21
22
  childMenuTemplate: import("@angular/core").Signal<TemplateRef<MainNavigationMenuComponent>>;
22
23
  isMobile: import("@angular/core").WritableSignal<boolean>;
23
24
  brandImagePath: import("@angular/core").Signal<string>;
25
+ environmentPillColor: import("@angular/core").Signal<"blue" | "green" | "yellow" | "gray">;
24
26
  activeId?: number;
25
27
  protected mobilePortal?: TemplatePortal<MainNavigationMenuComponent>;
26
28
  onMouseMove(event: MouseEvent): void;
@@ -38,5 +40,5 @@ export declare class MainNavigationComponent implements AfterViewInit, OnDestroy
38
40
  toggleMobileView(): void;
39
41
  toggleView(): void;
40
42
  static ɵfac: i0.ɵɵFactoryDeclaration<MainNavigationComponent, never>;
41
- static ɵcmp: i0.ɵɵComponentDeclaration<MainNavigationComponent, "ndw-main-navigation", never, { "applicationName": { "alias": "applicationName"; "required": true; "isSignal": true; }; "bottomMenuItems": { "alias": "bottomMenuItems"; "required": false; "isSignal": true; }; "brand": { "alias": "brand"; "required": false; "isSignal": true; }; "footerTexts": { "alias": "footerTexts"; "required": false; "isSignal": true; }; "isCollapsible": { "alias": "isCollapsible"; "required": false; "isSignal": true; }; "topMenuItems": { "alias": "topMenuItems"; "required": true; "isSignal": true; }; "version": { "alias": "version"; "required": false; "isSignal": true; }; "closeButtonLabel": { "alias": "closeButtonLabel"; "required": false; "isSignal": true; }; "menuButtonLabel": { "alias": "menuButtonLabel"; "required": false; "isSignal": true; }; "isExpanded": { "alias": "isExpanded"; "required": false; "isSignal": true; }; "isMobileExpanded": { "alias": "isMobileExpanded"; "required": false; "isSignal": true; }; }, { "isExpanded": "isExpandedChange"; "isMobileExpanded": "isMobileExpandedChange"; }, never, never, true, never>;
43
+ static ɵcmp: i0.ɵɵComponentDeclaration<MainNavigationComponent, "ndw-main-navigation", never, { "applicationName": { "alias": "applicationName"; "required": true; "isSignal": true; }; "bottomMenuItems": { "alias": "bottomMenuItems"; "required": false; "isSignal": true; }; "brand": { "alias": "brand"; "required": false; "isSignal": true; }; "footerTexts": { "alias": "footerTexts"; "required": false; "isSignal": true; }; "isCollapsible": { "alias": "isCollapsible"; "required": false; "isSignal": true; }; "topMenuItems": { "alias": "topMenuItems"; "required": true; "isSignal": true; }; "version": { "alias": "version"; "required": false; "isSignal": true; }; "environment": { "alias": "environment"; "required": false; "isSignal": true; }; "closeButtonLabel": { "alias": "closeButtonLabel"; "required": false; "isSignal": true; }; "menuButtonLabel": { "alias": "menuButtonLabel"; "required": false; "isSignal": true; }; "isExpanded": { "alias": "isExpanded"; "required": false; "isSignal": true; }; "isMobileExpanded": { "alias": "isMobileExpanded"; "required": false; "isSignal": true; }; }, { "isExpanded": "isExpandedChange"; "isMobileExpanded": "isMobileExpandedChange"; }, never, never, true, never>;
42
44
  }
@@ -6,4 +6,5 @@ import { BadgeComponent } from '../badge';
6
6
  import { IconComponent } from '../icon';
7
7
  import { MainNavigationMenuComponent } from '../main-navigation-menu';
8
8
  import { TooltipDirective } from '../tooltip';
9
- export declare const MAIN_NAVIGATION_IMPORTS: (typeof BadgeComponent | typeof IconComponent | typeof NgTemplateOutlet | typeof RouterLink | typeof NgClass | typeof TooltipDirective | typeof MainNavigationMenuComponent | typeof CdkPortalOutlet | typeof OverlayModule)[];
9
+ import { PillComponent } from '../pill';
10
+ export declare const MAIN_NAVIGATION_IMPORTS: (typeof BadgeComponent | typeof IconComponent | typeof NgClass | typeof NgTemplateOutlet | typeof RouterLink | typeof TooltipDirective | typeof MainNavigationMenuComponent | typeof PillComponent | typeof CdkPortalOutlet | typeof OverlayModule)[];
@@ -10,3 +10,4 @@ export interface MenuItem extends SimpleMenuItem {
10
10
  notifications?: number;
11
11
  }
12
12
  export type NdwBrand = 'NDW' | 'NWB';
13
+ export type Environment = 'local' | 'staging' | 'acceptance';
@@ -0,0 +1 @@
1
+ export * from './splitter.component';
@@ -0,0 +1,69 @@
1
+ import { Point } from '@angular/cdk/drag-drop';
2
+ import { AfterViewInit, OnDestroy } from '@angular/core';
3
+ import * as i0 from "@angular/core";
4
+ export declare class SplitterComponent implements AfterViewInit, OnDestroy {
5
+ readonly disabled: import("@angular/core").InputSignal<boolean>;
6
+ /**
7
+ * Optional width of the first panel (in pixels) when the component is initialized.
8
+ */
9
+ readonly initialPanelWidth: import("@angular/core").InputSignal<number | undefined>;
10
+ /**
11
+ * Minimum width of both panels (in pixels).
12
+ */
13
+ readonly minimumPanelWidth: import("@angular/core").InputSignal<number>;
14
+ protected readonly firstPanelWidth: import("@angular/core").WritableSignal<number>;
15
+ protected readonly secondPanelWidth: import("@angular/core").Signal<number>;
16
+ protected readonly isDragging: import("@angular/core").WritableSignal<boolean>;
17
+ private readonly container;
18
+ private readonly splitter;
19
+ private readonly cdkDrag;
20
+ private storedFirstPanelWidth;
21
+ /**
22
+ * Flag to indicate if the mouse click event should be
23
+ * ignored because the user is dragging the splitter.
24
+ */
25
+ private ignoreMouseClick;
26
+ /**
27
+ * Reactive object to store the dimensions of the drag elements.
28
+ * Updated by a resize observer on the container.
29
+ */
30
+ private readonly dragElementDimensions;
31
+ private readonly resizeObserver;
32
+ /**
33
+ * Available width for the panels, without considering the `minimumPanelWidth` input.
34
+ */
35
+ private readonly availableWidth;
36
+ /**
37
+ * Position of the drag handle when the component is initialized.
38
+ * The drag position is always relative to this starting position.
39
+ */
40
+ private readonly dragStartPosition;
41
+ /**
42
+ * Minimum panel width that is safe to use, considering the
43
+ * available container width and the `minimumPanelWidth` input.
44
+ */
45
+ protected readonly safeMinPanelWidth: import("@angular/core").Signal<number>;
46
+ /**
47
+ * Maximum panel width that is safe to use, considering the
48
+ * available container width and the `minimumPanelWidth
49
+ */
50
+ protected readonly safeMaxPanelWidth: import("@angular/core").Signal<number>;
51
+ constructor();
52
+ ngAfterViewInit(): void;
53
+ ngOnDestroy(): void;
54
+ protected constrainPosition: (userPointerPosition: Point) => {
55
+ x: number;
56
+ y: number;
57
+ };
58
+ protected onDragStarted(): void;
59
+ protected onDragEnded(): void;
60
+ protected onDragMoved(): void;
61
+ protected onSplitterMouseDown(): void;
62
+ protected onSplitterMouseUp(): void;
63
+ protected setDragPosition(position: number): void;
64
+ protected storeFirstPanelWidth(): void;
65
+ private setFirstPanelWidth;
66
+ private clampPanelWidth;
67
+ static ɵfac: i0.ɵɵFactoryDeclaration<SplitterComponent, never>;
68
+ static ɵcmp: i0.ɵɵComponentDeclaration<SplitterComponent, "ndw-splitter", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "initialPanelWidth": { "alias": "initialPanelWidth"; "required": false; "isSignal": true; }; "minimumPanelWidth": { "alias": "minimumPanelWidth"; "required": false; "isSignal": true; }; }, {}, never, ["[first-panel]", "[second-panel]"], true, never>;
69
+ }
@@ -2,7 +2,6 @@ export * from './summary-card.model';
2
2
  export * from './summary-card.component';
3
3
  export * from './summary-card-actions/summary-card-actions.component';
4
4
  export * from './summary-card-action/summary-card-action.component';
5
- export * from './summary-card-avatar/summary-card-avatar.component';
6
5
  export * from './summary-card-content/summary-card-content.component';
7
6
  export * from './summary-card-header/summary-card-header.component';
8
7
  export * from './summary-card-tags/summary-card-tags.component';
@@ -1,5 +1,5 @@
1
1
  import * as i0 from "@angular/core";
2
2
  export declare class SummaryCardComponent {
3
3
  static ɵfac: i0.ɵɵFactoryDeclaration<SummaryCardComponent, never>;
4
- static ɵcmp: i0.ɵɵComponentDeclaration<SummaryCardComponent, "ndw-summary-card", never, {}, {}, never, ["ndw-summary-card-avatar", "ndw-summary-card-header", "ndw-summary-card-content", "ndw-summary-card-tags"], true, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<SummaryCardComponent, "ndw-summary-card", never, {}, {}, never, ["ndw-avatar", "ndw-summary-card-header", "ndw-summary-card-content", "ndw-summary-card-tags"], true, never>;
5
5
  }
@@ -1,2 +1 @@
1
- export type SummaryVariant = 'default' | 'orange' | 'blue' | 'green' | 'yellow' | 'red' | 'purple';
2
1
  export type SummaryActionsView = 'visible' | 'popover' | 'auto';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ndwnu/design-system",
3
- "version": "7.0.1",
3
+ "version": "8.0.0",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": "~19.0.0",
6
6
  "@angular/cdk": "~19.0.0",
@@ -72,8 +72,15 @@
72
72
  /* Modal */
73
73
  --ndw-modal-width-sm: 31.25rem;
74
74
  --ndw-modal-width-md: 45rem;
75
+
76
+ /* Navigation */
77
+ --main-navigation-collapse-width: 2.75rem;
78
+ --main-navigation-expanded-width: 12.5rem;
79
+ --main-navigation-mobile-header-height: 6.25rem;
75
80
  }
76
81
 
77
82
  /* Screen sizes */
83
+ $ndw-screen-2xs: 480px;
84
+ $ndw-screen-xs: 768px;
78
85
  $ndw-screen-sm: 1024px;
79
86
  $ndw-screen-md: 1440px;
@@ -98,7 +98,7 @@ const meta: Meta<StoryArgs> = {
98
98
  <span>150%</span>
99
99
  <span>.${typography.class}</span>
100
100
  </div>
101
- `
101
+ `,
102
102
  )
103
103
  .join('')}
104
104
  </section>
@@ -1,12 +1,10 @@
1
- hr {
2
- &[ndwDivider] {
3
- background-color: var(--ndw-color-grey-300);
4
- border: none;
5
- height: var(--ndw-border-size-sm);
6
- margin: var(--ndw-spacing-xs) 0;
7
- }
1
+ hr[ndwDivider] {
2
+ background-color: var(--ndw-color-grey-300);
3
+ border: none;
4
+ height: var(--ndw-border-size-sm);
5
+ margin: var(--ndw-spacing-xs) 0;
8
6
 
9
- &[noMargin] {
7
+ & [noMargin] {
10
8
  margin-block: 0;
11
9
  }
12
10
  }
@@ -0,0 +1,97 @@
1
+ @use '../../styles/base/variables';
2
+
3
+ $min-width-sm: variables.$ndw-screen-sm + 0.1;
4
+
5
+ .ndw-edit-bar {
6
+ --left-position: 0;
7
+
8
+ display: block;
9
+ z-index: 2;
10
+ left: 0;
11
+ right: 0;
12
+ bottom: 0;
13
+
14
+ padding: var(--ndw-spacing-md);
15
+ border-block-start: 1px solid var(--ndw-color-grey-300);
16
+
17
+ background-color: var(--ndw-color-white);
18
+
19
+ &.ndw-edit-bar--fixed {
20
+ position: fixed;
21
+ left: var(--left-position);
22
+
23
+ @media screen and (min-width: $min-width-sm) {
24
+ [data-main-navigation-expanded='true'] & {
25
+ --left-position: var(--main-navigation-expanded-width);
26
+ }
27
+
28
+ [data-main-navigation-expanded='false'] & {
29
+ --left-position: var(--main-navigation-collapse-width);
30
+ }
31
+ }
32
+ }
33
+
34
+ &.ndw-edit-bar--full-width {
35
+ left: 0;
36
+ right: 0;
37
+ }
38
+
39
+ &.ndw-edit-bar--layout-width {
40
+ right: 0;
41
+ }
42
+
43
+ &.ndw-edit-bar--sticky {
44
+ position: sticky;
45
+ }
46
+
47
+ &.ndw-edit-bar--static {
48
+ position: static;
49
+ }
50
+
51
+ &.ndw-edit-bar--absolute {
52
+ position: absolute;
53
+ }
54
+
55
+ &.ndw-edit-bar--grid {
56
+ padding-inline: 0;
57
+ }
58
+
59
+ &__inner {
60
+ gap: var(--ndw-spacing-xs);
61
+ display: flex;
62
+ justify-content: space-between;
63
+ align-items: center;
64
+ flex-wrap: wrap;
65
+ }
66
+
67
+ .grid {
68
+ box-sizing: border-box;
69
+ }
70
+ }
71
+
72
+ .ndw-edit-bar-actions {
73
+ display: flex;
74
+ flex-wrap: wrap;
75
+ gap: var(--ndw-spacing-xs);
76
+ width: 100%;
77
+
78
+ > * {
79
+ flex: 1;
80
+ white-space: nowrap;
81
+ }
82
+
83
+ @media screen and (min-width: variables.$ndw-screen-xs) {
84
+ width: max-content;
85
+ margin-left: auto;
86
+
87
+ > * {
88
+ flex: unset;
89
+ }
90
+ }
91
+ }
92
+
93
+ .ndw-edit-bar-message {
94
+ display: block;
95
+ font-size: var(--ndw-font-size-sm);
96
+ color: var(--ndw-color-grey-700);
97
+ }
@@ -47,6 +47,10 @@
47
47
  background-color: var(--ndw-color-critical-100);
48
48
  border-color: var(--ndw-color-critical-500);
49
49
 
50
+ [ndwInput] {
51
+ background-color: var(--ndw-color-critical-100);
52
+ }
53
+
50
54
  &:hover {
51
55
  border-color: var(--ndw-color-grey-300);
52
56
  }
@@ -69,17 +73,37 @@
69
73
  color: var(--ndw-color-grey-500);
70
74
  pointer-events: none;
71
75
 
76
+ [ndwInput] {
77
+ background-color: var(--ndw-color-grey-100);
78
+ }
79
+
72
80
  ndw-icon {
73
- color: var(--ndw-color-grey-300);
81
+ color: var(--ndw-color-grey-500);
74
82
  }
75
83
  }
76
84
  }
77
85
 
86
+ .input-container:has(> [ndwInput][error]) {
87
+ background-color: var(--ndw-color-critical-100);
88
+ border-color: var(--ndw-color-critical-500);
89
+ }
90
+
78
91
  // Add input container right padding when select element is used
79
92
  .input-container:has(> select[ndwInput]) {
80
93
  padding-inline-end: var(--ndw-spacing-xs);
81
94
  }
82
95
 
96
+ .input-container[error]:has(> [ndwInput]:is(:active, :focus, :focus-visible)) {
97
+ background-color: var(--ndw-color-white);
98
+ }
99
+
100
+ .input-container[error]:has(> [ndwInput]:is(:active, :focus, :focus-visible)) {
101
+ background-color: var(--ndw-color-white);
102
+ select[ndwInput] {
103
+ background-color: var(--ndw-color-white);
104
+ }
105
+ }
106
+
83
107
  // When an ndwInput is contained in an input-container hide the
84
108
  // ndwInput borders and instead put the borders on the container.
85
109
  .input-container:has(> [ndwInput]) {
@@ -6,6 +6,7 @@
6
6
  border: 0;
7
7
 
8
8
  font-size: inherit;
9
+ font-family: var(--ndw-font-family-body);
9
10
  text-decoration: underline var(--ndw-border-size-sm) transparent;
10
11
  text-underline-offset: var(--ndw-border-size-md);
11
12
 
@@ -1,17 +1,30 @@
1
1
  .ndw-summary-card {
2
- display: block;
2
+ position: relative;
3
+ box-sizing: border-box;
4
+
5
+ display: grid;
6
+ gap: var(--ndw-spacing-md);
7
+ padding: var(--ndw-spacing-lg);
8
+ border: var(--ndw-border-size-sm) solid var(--ndw-color-white);
9
+ border-radius: var(--ndw-border-radius-md);
10
+
11
+ background-color: var(--ndw-color-white);
12
+ box-shadow: 0 var(--ndw-border-radius-xs) var(--ndw-border-radius-xs) 0 rgba(64, 78, 84, 0.05);
13
+ transition: var(--ndw-animation-speed-fast);
14
+
15
+ &:has(.ndw-summary-card-header a:hover) {
16
+ border: var(--ndw-border-size-sm) solid var(--ndw-color-grey-300);
17
+ box-shadow: 0 var(--ndw-border-radius-xs) var(--ndw-border-radius-md) 0 rgba(64, 78, 84, 0.2);
18
+ }
3
19
 
4
20
  &__wrapper {
5
- position: relative;
6
- overflow: hidden;
7
-
8
21
  display: grid;
9
22
  gap: var(--ndw-spacing-md);
10
23
  height: 100%;
11
24
  align-items: start;
12
25
  box-sizing: border-box;
13
26
 
14
- &:has(ndw-summary-card-avatar) {
27
+ &:has(ndw-avatar) {
15
28
  grid-template-columns: max-content 1fr;
16
29
  }
17
30
 
@@ -100,10 +113,6 @@
100
113
  text-decoration: none;
101
114
  font-family: var(--ndw-font-family-heading);
102
115
 
103
- &:hover {
104
- text-decoration: underline;
105
- }
106
-
107
116
  &:after {
108
117
  content: '';
109
118
  position: absolute;
@@ -129,63 +138,6 @@
129
138
  color: var(--ndw-color-grey-500);
130
139
  }
131
140
 
132
- .ndw-summary-card-avatar {
133
- display: grid;
134
- place-content: center;
135
- position: relative;
136
- width: 30px;
137
- aspect-ratio: 1 / 1;
138
- border-radius: 50%;
139
- font-size: var(--ndw-font-size-sm);
140
-
141
- &.ndw-summary-card-avatar--default {
142
- color: var(--ndw-color-grey-700);
143
- background-color: var(--ndw-color-grey-300);
144
- }
145
-
146
- &.ndw-summary-card-avatar--orange {
147
- color: var(--ndw-color-primary-700);
148
- background-color: var(--ndw-color-primary-050);
149
- }
150
-
151
- &.ndw-summary-card-avatar--blue {
152
- color: var(--ndw-color-info-500);
153
- background-color: var(--ndw-color-info-100);
154
- }
155
-
156
- &.ndw-summary-card-avatar--green {
157
- color: var(--ndw-color-positive-500);
158
- background-color: var(--ndw-color-positive-100);
159
- }
160
-
161
- &.ndw-summary-card-avatar--red {
162
- color: var(--ndw-color-critical-500);
163
- background-color: var(--ndw-color-critical-100);
164
- }
165
-
166
- &.ndw-summary-card-avatar--yellow {
167
- color: var(--ndw-color-warning-500);
168
- background-color: var(--ndw-color-warning-100);
169
- }
170
-
171
- &.ndw-summary-card-avatar--purple {
172
- color: var(--ndw-color-alternative-500);
173
- background-color: var(--ndw-color-alternative-100);
174
- }
175
-
176
- > img {
177
- display: block;
178
- width: 100%;
179
- height: 100%;
180
- object-fit: cover;
181
- border-radius: 50%;
182
- }
183
-
184
- ndw-icon {
185
- font-size: var(--ndw-font-size-lg);
186
- }
187
- }
188
-
189
141
  .ndw-summary-card-actions {
190
142
  flex: 1;
191
143
  display: flex;
@@ -2,6 +2,7 @@
2
2
  @forward 'card';
3
3
  @forward 'divider';
4
4
  @forward 'dropdown';
5
+ @forward 'edit-bar';
5
6
  @forward 'filter-button';
6
7
  @forward 'input';
7
8
  @forward 'label';
@@ -50,7 +50,7 @@ const meta: Meta<StoryArgs> = {
50
50
  title: 'Components/Link',
51
51
  decorators: [
52
52
  componentWrapperDecorator(
53
- (story) => `<div style="font-size: var(--ndw-font-size-sm);">${story}</div>`
53
+ (story) => `<div style="font-size: var(--ndw-font-size-sm);">${story}</div>`,
54
54
  ),
55
55
  moduleMetadata({
56
56
  imports: [IconComponent],