@ndwnu/design-system 7.0.1 → 7.1.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.
@@ -8,7 +8,7 @@ export declare class CollapsibleComponent {
8
8
  private readonly uuid;
9
9
  readonly toggleUuid: string;
10
10
  readonly sectionUuid: string;
11
- animationState: import("@angular/core").Signal<"open" | "closed">;
11
+ animationState: import("@angular/core").Signal<"closed" | "open">;
12
12
  toggle(): void;
13
13
  static ɵfac: i0.ɵɵFactoryDeclaration<CollapsibleComponent, never>;
14
14
  static ɵcmp: i0.ɵɵComponentDeclaration<CollapsibleComponent, "ndw-collapsible", never, { "index": { "alias": "index"; "required": true; "isSignal": true; }; "title": { "alias": "title"; "required": true; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "expanded": { "alias": "expanded"; "required": false; "isSignal": true; }; }, { "expanded": "expandedChange"; }, never, ["*"], true, never>;
@@ -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
  }
@@ -9,6 +9,7 @@ export * from './card';
9
9
  export * from './collapsible';
10
10
  export * from './dashboard-card';
11
11
  export * from './dropdown';
12
+ export * from './edit-bar';
12
13
  export * from './form-field';
13
14
  export * from './icon';
14
15
  export * from './layout';
@@ -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<"gray" | "green" | "blue" | "yellow">;
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 NgTemplateOutlet | typeof IconComponent | typeof NgClass | typeof TooltipDirective | typeof BadgeComponent | typeof CdkPortalOutlet | typeof MainNavigationMenuComponent | typeof OverlayModule | typeof PillComponent | typeof RouterLink)[];
@@ -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';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ndwnu/design-system",
3
- "version": "7.0.1",
3
+ "version": "7.1.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;
@@ -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
+ }
@@ -1,8 +1,23 @@
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
21
  overflow: hidden;
7
22
 
8
23
  display: grid;
@@ -100,10 +115,6 @@
100
115
  text-decoration: none;
101
116
  font-family: var(--ndw-font-family-heading);
102
117
 
103
- &:hover {
104
- text-decoration: underline;
105
- }
106
-
107
118
  &:after {
108
119
  content: '';
109
120
  position: absolute;
@@ -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';
@@ -5,6 +5,8 @@
5
5
  }
6
6
 
7
7
  .grid {
8
+ $grid-columns-2xs: 2;
9
+ $grid-columns-xs: 4;
8
10
  $grid-columns-sm: 6;
9
11
  $grid-columns-md: 12;
10
12
 
@@ -18,13 +20,55 @@
18
20
  min-width: min-content;
19
21
  max-width: $ndw-screen-md;
20
22
 
23
+ &--no-padding {
24
+ padding: 0;
25
+ }
26
+
21
27
  @for $i from 1 through $grid-columns-md {
22
28
  .column-#{$i} {
23
- // Use min to make sure we don't span more columns than available
24
29
  @include column(min($i, var(--grid-columns)));
25
30
  }
26
31
  }
27
32
 
33
+ @media screen and (max-width: $ndw-screen-2xs) {
34
+ --grid-columns: #{$grid-columns-2xs};
35
+ --grid-spacing: var(--ndw-spacing-sm);
36
+
37
+ @for $i from 1 through $grid-columns-md {
38
+ .column-xs-#{$i},
39
+ .column-sm-#{$i},
40
+ .column-md-#{$i} {
41
+ display: none;
42
+ }
43
+ }
44
+
45
+ @for $i from 1 through $grid-columns-2xs {
46
+ .column-2xs-#{$i} {
47
+ @include column($i);
48
+ display: initial;
49
+ }
50
+ }
51
+ }
52
+
53
+ @media screen and (max-width: $ndw-screen-xs) {
54
+ --grid-columns: #{$grid-columns-xs};
55
+ --grid-spacing: var(--ndw-spacing-sm);
56
+
57
+ @for $i from 1 through $grid-columns-md {
58
+ .column-sm-#{$i},
59
+ .column-md-#{$i} {
60
+ display: none;
61
+ }
62
+ }
63
+
64
+ @for $i from 1 through $grid-columns-xs {
65
+ .column-xs-#{$i} {
66
+ @include column($i);
67
+ display: initial;
68
+ }
69
+ }
70
+ }
71
+
28
72
  @media screen and (max-width: $ndw-screen-sm) {
29
73
  --grid-columns: #{$grid-columns-sm};
30
74
  --grid-spacing: var(--ndw-spacing-md);
@@ -2,29 +2,34 @@ import { type Meta, type StoryObj } from '@storybook/angular';
2
2
 
3
3
  interface StoryArgs {
4
4
  columnClasses: string[][];
5
+ disablePadding?: boolean;
5
6
  }
6
7
 
7
8
  /**
8
- * Create a grid layout with columns. There is one responsive breakpoint at 1024px
9
- * screen width;
10
- * - Above 1024px, the grid has 12 columns.
11
- * - Below 1024px, the grid has 6 columns.
12
- * - The grid has a maximum width of 1440px.
9
+ * Create a responsive grid layout with columns. There are multiple breakpoints:
10
+ * - Above 1024px (sm): 12 columns
11
+ * - 768px-1024px (xs): 6 columns
12
+ * - 480px-768px (2xs): 4 columns
13
+ * - Below 480px: 2 columns
14
+ * - Maximum width: 1440px
13
15
  *
14
- * The grid needs a container element with the class `grid` and each column element
15
- * should have a `column-{span}`, `column-sm-{span}` or `column-md-{span}`
16
- * class where `{span}` is the number of grid columns the element should span.
16
+ * The grid needs a container element with the class `grid`. Column elements
17
+ * should have classes like:
18
+ * - `column-{span}`: all screen sizes
19
+ * - `column-2xs-{span}`: below 480px
20
+ * - `column-xs-{span}`: 480px-768px
21
+ * - `column-sm-{span}`: 768px-1024px
22
+ * - `column-md-{span}`: above 1024px
17
23
  *
18
- * `column-{span}` classes set the column width for all screen sizes. Different column
19
- * widths can be set for different screen sizes using `column-sm-{span}` and
20
- * `column-md-{span}` classes. Columns with only a `column-md-{span}` class will
21
- * only be visible on screen widths above 1024px.
24
+ * Where `{span}` is the number of columns to span.
22
25
  *
23
- * When viewing a specific story, use the viewport tool to see how the grid layout
24
- * responds to different screen sizes.
26
+ * Use the viewport tool to see responsive behavior.
25
27
  *
26
- * The colors of the background and grid columns are for illustrative purposes.
28
+ * ## Disable padding
29
+ * Sometimes you may want to disable padding on the columns, for example when using a card component.
30
+ * To do this, add the class `grid--no-padding` to the `.grid` element.
27
31
  */
32
+
28
33
  const meta: Meta<StoryArgs> = {
29
34
  tags: ['autodocs', 'ndw', 'ntm', 'nwb'],
30
35
  title: 'Core/Grid',
@@ -48,7 +53,7 @@ const meta: Meta<StoryArgs> = {
48
53
  `,
49
54
  ],
50
55
  template: `
51
- <div class="grid">
56
+ <div class="grid ${props.disablePadding ? 'grid--no-padding' : ''}">
52
57
  ${props.columnClasses
53
58
  .map(
54
59
  (classes, index) =>
@@ -64,6 +69,9 @@ const meta: Meta<StoryArgs> = {
64
69
  columnClasses: {
65
70
  description: 'Array of classes to apply to each column.',
66
71
  },
72
+ disablePadding: {
73
+ description: 'Disable the inline padding on the grid.',
74
+ },
67
75
  },
68
76
  };
69
77
  export default meta;
@@ -72,10 +80,10 @@ type Story = StoryObj<StoryArgs>;
72
80
  export const Default: Story = {
73
81
  args: {
74
82
  columnClasses: [
75
- ['column-sm-1', 'column-md-1'],
76
- ['column-sm-1', 'column-md-1'],
77
- ['column-sm-1', 'column-md-1'],
78
- ['column-sm-1', 'column-md-1'],
83
+ ['column-2xs-1', 'column-xs-1', 'column-sm-1', 'column-md-1'],
84
+ ['column-2xs-1', 'column-xs-1', 'column-sm-1', 'column-md-1'],
85
+ ['column-xs-1', 'column-sm-1', 'column-md-1'],
86
+ ['column-xs-1', 'column-sm-1', 'column-md-1'],
79
87
  ['column-sm-1', 'column-md-1'],
80
88
  ['column-sm-1', 'column-md-1'],
81
89
  ['column-md-1'],
@@ -91,12 +99,12 @@ export const Default: Story = {
91
99
  /**
92
100
  * Use the viewport button to see different column sizes for different screen sizes.
93
101
  */
94
- export const ChangeOnMobile: Story = {
102
+ export const ResponsiveColumns: Story = {
95
103
  args: {
96
104
  columnClasses: [
97
- ['column-md-4', 'column-sm-3'],
98
- ['column-md-4', 'column-sm-3'],
99
- ['column-md-4', 'column-sm-6'],
105
+ ['column-12', 'column-md-4', 'column-sm-3'],
106
+ ['column-12', 'column-md-4', 'column-sm-3'],
107
+ ['column-12', 'column-md-4', 'column-sm-6'],
100
108
  ],
101
109
  },
102
110
  };
@@ -104,14 +112,28 @@ export const ChangeOnMobile: Story = {
104
112
  export const MixedColumnWidth: Story = {
105
113
  args: {
106
114
  columnClasses: [
107
- ['column-3'],
108
- ['column-3'],
115
+ ['column-6'],
116
+ ['column-2'],
109
117
  ['column-4'],
110
118
  ['column-2'],
111
119
  ['column-2'],
112
- ['column-4'],
120
+ ['column-2'],
113
121
  ['column-6'],
114
122
  ['column-12'],
115
123
  ],
116
124
  },
117
125
  };
126
+
127
+ export const NoPadding: Story = {
128
+ args: {
129
+ columnClasses: [
130
+ ['column-6'],
131
+ ['column-6'],
132
+ ['column-2'],
133
+ ['column-2'],
134
+ ['column-2'],
135
+ ['column-6'],
136
+ ],
137
+ disablePadding: true,
138
+ },
139
+ };