@ndwnu/design-system 11.1.1 → 12.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.
- package/assets/images/logos/ndw-logo-short.svg +3 -3
- package/assets/images/logos/ndw-logo.svg +3 -3
- package/assets/images/logos/nwb-logo-short.svg +10 -10
- package/assets/images/logos/nwb-logo.svg +4 -4
- package/assets/images/map-button-icons.svg +91 -87
- package/fesm2022/ndwnu-design-system.mjs +1381 -1032
- package/fesm2022/ndwnu-design-system.mjs.map +1 -1
- package/index.d.ts +1335 -2
- package/package.json +9 -11
- package/styles/base/_material.scss +17 -0
- package/styles/base/index.scss +1 -0
- package/styles/components/_datepicker.scss +68 -21
- package/styles/components/_divider.scss +1 -1
- package/styles/components/_input.scss +2 -1
- package/styles/components/divider.stories.ts +1 -1
- package/styles/layout/_grid.scss +64 -0
- package/styles/layout/grid.stories.ts +69 -40
- package/lib/components/accordion/accordion.component.d.ts +0 -12
- package/lib/components/accordion/accordion.service.d.ts +0 -8
- package/lib/components/accordion/index.d.ts +0 -2
- package/lib/components/alert/alert.component.d.ts +0 -26
- package/lib/components/alert/alert.model.d.ts +0 -1
- package/lib/components/alert/index.d.ts +0 -2
- package/lib/components/avatar/avatar.component.d.ts +0 -9
- package/lib/components/avatar/avatar.model.d.ts +0 -2
- package/lib/components/avatar/index.d.ts +0 -2
- package/lib/components/badge/badge.component.d.ts +0 -18
- package/lib/components/badge/index.d.ts +0 -1
- package/lib/components/banner/banner.component.d.ts +0 -38
- package/lib/components/banner/banner.model.d.ts +0 -1
- package/lib/components/banner/index.d.ts +0 -2
- package/lib/components/breadcrumb/breadcrumb.component.d.ts +0 -6
- package/lib/components/breadcrumb/index.d.ts +0 -1
- package/lib/components/breadcrumb-group/breadcrumb-group.component.d.ts +0 -8
- package/lib/components/breadcrumb-group/index.d.ts +0 -1
- package/lib/components/button/button.directive.d.ts +0 -9
- package/lib/components/button/index.d.ts +0 -1
- package/lib/components/card/card-content/card-content.component.d.ts +0 -5
- package/lib/components/card/card-content/index.d.ts +0 -1
- package/lib/components/card/card-footer/card-footer.component.d.ts +0 -5
- package/lib/components/card/card-footer/index.d.ts +0 -1
- package/lib/components/card/card-header/card-header.component.d.ts +0 -11
- package/lib/components/card/card-header/index.d.ts +0 -1
- package/lib/components/card/card.animation.d.ts +0 -1
- package/lib/components/card/card.component.d.ts +0 -19
- package/lib/components/card/index.d.ts +0 -6
- package/lib/components/collapsible/collapsible.animation.d.ts +0 -1
- package/lib/components/collapsible/collapsible.component.d.ts +0 -17
- package/lib/components/collapsible/index.d.ts +0 -1
- package/lib/components/dashboard-card/dashboard-card.component.d.ts +0 -22
- package/lib/components/dashboard-card/index.d.ts +0 -1
- package/lib/components/dropdown/dropdown.component.d.ts +0 -22
- package/lib/components/dropdown/index.d.ts +0 -1
- package/lib/components/edit-bar/edit-bar-actions/edit-bar-actions.component.d.ts +0 -5
- package/lib/components/edit-bar/edit-bar-message/edit-bar-message.component.d.ts +0 -5
- package/lib/components/edit-bar/edit-bar.component.d.ts +0 -15
- package/lib/components/edit-bar/edit-bar.model.d.ts +0 -2
- package/lib/components/edit-bar/index.d.ts +0 -4
- package/lib/components/favorite/favorite.component.d.ts +0 -7
- package/lib/components/favorite/index.d.ts +0 -1
- package/lib/components/form-field/autosuggest/autosuggest-add-option/autosuggest-add-option.component.d.ts +0 -6
- package/lib/components/form-field/autosuggest/autosuggest-add-option/index.d.ts +0 -1
- package/lib/components/form-field/autosuggest/autosuggest-option/autosuggest-option.component.d.ts +0 -8
- package/lib/components/form-field/autosuggest/autosuggest-option/index.d.ts +0 -1
- package/lib/components/form-field/autosuggest/autosuggest-panel/autosuggest-panel.component.d.ts +0 -6
- package/lib/components/form-field/autosuggest/autosuggest-panel/index.d.ts +0 -1
- package/lib/components/form-field/autosuggest/autosuggest.directive.d.ts +0 -9
- package/lib/components/form-field/autosuggest/index.d.ts +0 -5
- package/lib/components/form-field/checkbox/checkbox.component.d.ts +0 -21
- package/lib/components/form-field/checkbox/index.d.ts +0 -1
- package/lib/components/form-field/checkbox-group/checkbox-group.component.d.ts +0 -7
- package/lib/components/form-field/checkbox-group/index.d.ts +0 -1
- package/lib/components/form-field/clear-search-button/clear-search-button.component.d.ts +0 -16
- package/lib/components/form-field/clear-search-button/index.d.ts +0 -1
- package/lib/components/form-field/datepicker/datepicker.component.d.ts +0 -7
- package/lib/components/form-field/datepicker/index.d.ts +0 -1
- package/lib/components/form-field/error/error.component.d.ts +0 -5
- package/lib/components/form-field/error/index.d.ts +0 -1
- package/lib/components/form-field/file-upload/file-upload-text.interface.d.ts +0 -4
- package/lib/components/form-field/file-upload/file-upload.component.d.ts +0 -47
- package/lib/components/form-field/file-upload/index.d.ts +0 -2
- package/lib/components/form-field/form-field.component.d.ts +0 -32
- package/lib/components/form-field/form-field.constant.d.ts +0 -1
- package/lib/components/form-field/form-field.model.d.ts +0 -7
- package/lib/components/form-field/index.d.ts +0 -17
- package/lib/components/form-field/info/index.d.ts +0 -1
- package/lib/components/form-field/info/info.component.d.ts +0 -5
- package/lib/components/form-field/input/index.d.ts +0 -1
- package/lib/components/form-field/input/input.directive.d.ts +0 -22
- package/lib/components/form-field/input-button/index.d.ts +0 -1
- package/lib/components/form-field/input-button/input-button.component.d.ts +0 -12
- package/lib/components/form-field/input-icon/index.d.ts +0 -1
- package/lib/components/form-field/input-icon/input-icon.component.d.ts +0 -5
- package/lib/components/form-field/month-input/date-validators.d.ts +0 -3
- package/lib/components/form-field/month-input/index.d.ts +0 -1
- package/lib/components/form-field/month-input/month-input-utils.d.ts +0 -6
- package/lib/components/form-field/month-input/month-input.component.d.ts +0 -47
- package/lib/components/form-field/option-group/index.d.ts +0 -3
- package/lib/components/form-field/option-group/option-group.component.d.ts +0 -29
- package/lib/components/form-field/option-group/option-group.model.d.ts +0 -1
- package/lib/components/form-field/option-group/option.component.d.ts +0 -10
- package/lib/components/form-field/picker-button/index.d.ts +0 -1
- package/lib/components/form-field/picker-button/picker-button.component.d.ts +0 -15
- package/lib/components/form-field/radio-button/index.d.ts +0 -1
- package/lib/components/form-field/radio-button/radio-button.component.d.ts +0 -20
- package/lib/components/form-field/radio-group/index.d.ts +0 -1
- package/lib/components/form-field/radio-group/radio-group.component.d.ts +0 -16
- package/lib/components/form-field/success/index.d.ts +0 -1
- package/lib/components/form-field/success/success.component.d.ts +0 -5
- package/lib/components/form-field/textarea/auto-grow.directive.d.ts +0 -22
- package/lib/components/form-field/textarea/index.d.ts +0 -2
- package/lib/components/form-field/textarea/max-char.directive.d.ts +0 -27
- package/lib/components/hoverable-list-item/hoverable-list-item.component.d.ts +0 -18
- package/lib/components/hoverable-list-item/hoverable-list-item.model.d.ts +0 -9
- package/lib/components/hoverable-list-item/index.d.ts +0 -2
- package/lib/components/icon/action-icon/action-icon.component.d.ts +0 -33
- package/lib/components/icon/action-icon/index.d.ts +0 -1
- package/lib/components/icon/icon.component.d.ts +0 -6
- package/lib/components/icon/index.d.ts +0 -2
- package/lib/components/index.d.ts +0 -42
- package/lib/components/key-value-list/index.d.ts +0 -1
- package/lib/components/key-value-list/key-value-list.component.d.ts +0 -6
- package/lib/components/layout/index.d.ts +0 -1
- package/lib/components/layout/layout.component.d.ts +0 -14
- package/lib/components/layout-banners/index.d.ts +0 -1
- package/lib/components/layout-banners/layout-banners.component.d.ts +0 -5
- package/lib/components/list/index.d.ts +0 -1
- package/lib/components/list/list.component.d.ts +0 -11
- package/lib/components/list-item/index.d.ts +0 -1
- package/lib/components/list-item/list-item.component.d.ts +0 -33
- package/lib/components/loader/index.d.ts +0 -1
- package/lib/components/loader/loader.component.d.ts +0 -5
- package/lib/components/main-navigation/index.d.ts +0 -2
- package/lib/components/main-navigation/main-navigation-header/index.d.ts +0 -1
- package/lib/components/main-navigation/main-navigation-header/main-navigation-header.component.d.ts +0 -15
- package/lib/components/main-navigation/main-navigation-menu/index.d.ts +0 -1
- package/lib/components/main-navigation/main-navigation-menu/main-navigation-menu.component.d.ts +0 -16
- package/lib/components/main-navigation/main-navigation.component.d.ts +0 -25
- package/lib/components/main-navigation/main-navigation.model.d.ts +0 -15
- package/lib/components/map-button/index.d.ts +0 -2
- package/lib/components/map-button/map-button.component.d.ts +0 -14
- package/lib/components/map-button/map-button.model.d.ts +0 -4
- package/lib/components/map-display/backgrounds.d.ts +0 -21
- package/lib/components/map-display/index.d.ts +0 -3
- package/lib/components/map-display/layers.d.ts +0 -10
- package/lib/components/map-display/map-display-option/index.d.ts +0 -2
- package/lib/components/map-display/map-display-option/map-display-option.component.d.ts +0 -11
- package/lib/components/map-display/map-display-option/map-display-option.model.d.ts +0 -14
- package/lib/components/map-display/map-display.component.d.ts +0 -30
- package/lib/components/map-legend/index.d.ts +0 -2
- package/lib/components/map-legend/map-legend-group/map-legend-group.component.d.ts +0 -9
- package/lib/components/map-legend/map-legend-option/map-legend-option.component.d.ts +0 -7
- package/lib/components/map-legend/map-legend.component.d.ts +0 -17
- package/lib/components/map-legend/map-legend.model.d.ts +0 -33
- package/lib/components/modal/index.d.ts +0 -7
- package/lib/components/modal/modal-content/index.d.ts +0 -1
- package/lib/components/modal/modal-content/modal-content.component.d.ts +0 -5
- package/lib/components/modal/modal-footer/index.d.ts +0 -1
- package/lib/components/modal/modal-footer/modal-footer.component.d.ts +0 -5
- package/lib/components/modal/modal-header/index.d.ts +0 -1
- package/lib/components/modal/modal-header/modal-header.component.d.ts +0 -7
- package/lib/components/modal/modal-ref.d.ts +0 -3
- package/lib/components/modal/modal.component.d.ts +0 -7
- package/lib/components/modal/modal.service.d.ts +0 -17
- package/lib/components/multi-select/checkbox-data.interface.d.ts +0 -8
- package/lib/components/multi-select/index.d.ts +0 -3
- package/lib/components/multi-select/multi-select.component.d.ts +0 -29
- package/lib/components/multi-select/select-all-text.interface.d.ts +0 -4
- package/lib/components/pill/index.d.ts +0 -1
- package/lib/components/pill/pill.component.d.ts +0 -6
- package/lib/components/popover/index.d.ts +0 -1
- package/lib/components/popover/popover-trigger.directive.d.ts +0 -29
- package/lib/components/router-breadcrumbs/index.d.ts +0 -1
- package/lib/components/router-breadcrumbs/router-breadcrumbs.component.d.ts +0 -6
- package/lib/components/splitter/index.d.ts +0 -1
- package/lib/components/splitter/splitter.component.d.ts +0 -69
- package/lib/components/summary-card/index.d.ts +0 -9
- package/lib/components/summary-card/summary-card-action/summary-card-action.component.d.ts +0 -11
- package/lib/components/summary-card/summary-card-actions/summary-card-actions.component.d.ts +0 -9
- package/lib/components/summary-card/summary-card-content/summary-card-content.component.d.ts +0 -5
- package/lib/components/summary-card/summary-card-header/summary-card-header.component.d.ts +0 -5
- package/lib/components/summary-card/summary-card-subtitle/summary-card-subtitle.component.d.ts +0 -5
- package/lib/components/summary-card/summary-card-tag/summary-card-tag.component.d.ts +0 -5
- package/lib/components/summary-card/summary-card-tags/summary-card-tags.component.d.ts +0 -5
- package/lib/components/summary-card/summary-card.component.d.ts +0 -5
- package/lib/components/summary-card/summary-card.model.d.ts +0 -1
- package/lib/components/switcher/index.d.ts +0 -2
- package/lib/components/switcher/model.d.ts +0 -6
- package/lib/components/switcher/switcher.component.d.ts +0 -26
- package/lib/components/tab/index.d.ts +0 -1
- package/lib/components/tab/tab.component.d.ts +0 -18
- package/lib/components/tab-group/index.d.ts +0 -1
- package/lib/components/tab-group/tab-group.component.d.ts +0 -16
- package/lib/components/table/ag-grid-theme.d.ts +0 -2
- package/lib/components/table/index.d.ts +0 -1
- package/lib/components/tag/index.d.ts +0 -1
- package/lib/components/tag/tag.component.d.ts +0 -18
- package/lib/components/toast/index.d.ts +0 -2
- package/lib/components/toast/toast-list/toast-list.component.d.ts +0 -17
- package/lib/components/toast/toast.component.d.ts +0 -20
- package/lib/components/toast/toast.service.d.ts +0 -32
- package/lib/components/tooltip/index.d.ts +0 -2
- package/lib/components/tooltip/tooltip.component.d.ts +0 -6
- package/lib/components/tooltip/tooltip.directive.d.ts +0 -19
- package/lib/models/aria.model.d.ts +0 -1
- package/lib/models/index.d.ts +0 -2
package/package.json
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ndwnu/design-system",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.1.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@angular/animations": "^
|
|
6
|
-
"@angular/cdk": "^
|
|
7
|
-
"@angular/common": "^
|
|
8
|
-
"@angular/core": "^
|
|
9
|
-
"@angular/forms": "^
|
|
10
|
-
"@angular/material": "^
|
|
11
|
-
"@angular/router": "^
|
|
12
|
-
"@ndwnu/core": "
|
|
13
|
-
"@storybook/addon-actions": "8.6.12",
|
|
14
|
-
"@storybook/angular": "8.6.12",
|
|
5
|
+
"@angular/animations": "^20.0.0",
|
|
6
|
+
"@angular/cdk": "^20.0.0",
|
|
7
|
+
"@angular/common": "^20.0.0",
|
|
8
|
+
"@angular/core": "^20.0.0",
|
|
9
|
+
"@angular/forms": "^20.0.0",
|
|
10
|
+
"@angular/material": "^20.0.0",
|
|
11
|
+
"@angular/router": "^20.0.0",
|
|
12
|
+
"@ndwnu/core": "2.1.0",
|
|
15
13
|
"ag-grid-angular": "^34.0.2",
|
|
16
14
|
"ag-grid-community": "^34.0.2",
|
|
17
15
|
"rxjs": "^7.8.0"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
@use '@angular/material' as mat;
|
|
2
|
+
|
|
3
|
+
html {
|
|
4
|
+
@include mat.theme(
|
|
5
|
+
(
|
|
6
|
+
color: mat.$orange-palette,
|
|
7
|
+
typography: (
|
|
8
|
+
plain-family: var(--ndw-font-family-body),
|
|
9
|
+
brand-family: var(--ndw-font-family-heading),
|
|
10
|
+
bold-weight: var(--ndw-font-weight-bold),
|
|
11
|
+
medium-weight: var(--ndw-font-weight-bold),
|
|
12
|
+
regular-weight: var(--ndw-font-weight-regular),
|
|
13
|
+
),
|
|
14
|
+
density: 0,
|
|
15
|
+
)
|
|
16
|
+
);
|
|
17
|
+
}
|
package/styles/base/index.scss
CHANGED
|
@@ -3,41 +3,88 @@
|
|
|
3
3
|
:root {
|
|
4
4
|
@include mat.datepicker-overrides(
|
|
5
5
|
(
|
|
6
|
-
|
|
7
|
-
calendar-
|
|
6
|
+
toggle-icon-color: var(--ndw-color-primary),
|
|
7
|
+
calendar-container-background-color: var(--ndw-color-grey-100),
|
|
8
|
+
calendar-container-elevation-shadow: var(--ndw-elevation-content),
|
|
9
|
+
calendar-container-shape: var(--ndw-border-radius-md),
|
|
8
10
|
calendar-text-font: var(--ndw-font-family-body),
|
|
9
11
|
calendar-text-size: var(--ndw-font-size-sm),
|
|
10
|
-
|
|
12
|
+
calendar-header-text-size: var(--ndw-font-size-sm),
|
|
13
|
+
calendar-body-label-text-size: var(--ndw-font-size-sm),
|
|
14
|
+
calendar-period-button-text-size: var(--ndw-font-size-sm),
|
|
15
|
+
calendar-date-text-color: var(--ndw-color-text),
|
|
16
|
+
calendar-date-today-outline-color: var(--ndw-color-secondary-200),
|
|
17
|
+
calendar-date-selected-state-background-color: var(--ndw-color-secondary-400),
|
|
18
|
+
calendar-date-today-selected-state-outline-color: var(--ndw-color-secondary-400),
|
|
19
|
+
calendar-date-preview-state-outline-color: var(--ndw-color-secondary-300),
|
|
20
|
+
calendar-date-hover-state-background-color: var(--ndw-color-secondary-300),
|
|
21
|
+
calendar-date-focus-state-background-color: var(--ndw-color-secondary-300),
|
|
11
22
|
)
|
|
12
23
|
);
|
|
13
24
|
|
|
14
|
-
mat-calendar
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
25
|
+
mat-calendar {
|
|
26
|
+
--range-preview-border: var(--ndw-border-size-sm) dashed var(--ndw-color-secondary-300);
|
|
27
|
+
|
|
28
|
+
.ndw-date-selected > :first-child {
|
|
29
|
+
background-color: var(--ndw-color-secondary-400) !important;
|
|
30
|
+
color: var(--ndw-color-white) !important;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.ndw-date-range-start {
|
|
34
|
+
background-color: var(--ndw-color-secondary-200);
|
|
35
|
+
border-top-left-radius: 50%;
|
|
36
|
+
border-bottom-left-radius: 50%;
|
|
37
|
+
}
|
|
18
38
|
|
|
19
|
-
|
|
20
|
-
|
|
39
|
+
.ndw-date-range-end {
|
|
40
|
+
background-color: var(--ndw-color-secondary-200);
|
|
41
|
+
border-top-right-radius: 50%;
|
|
42
|
+
border-bottom-right-radius: 50%;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.ndw-date-in-range {
|
|
46
|
+
background-color: var(--ndw-color-secondary-200);
|
|
47
|
+
}
|
|
21
48
|
|
|
22
|
-
|
|
23
|
-
background: var(--ndw-color-
|
|
49
|
+
.ndw-date-range-start-preview {
|
|
50
|
+
background-color: var(--ndw-color-secondary-100);
|
|
51
|
+
border-top-left-radius: 50%;
|
|
52
|
+
border-bottom-left-radius: 50%;
|
|
24
53
|
}
|
|
25
54
|
|
|
26
|
-
|
|
27
|
-
background: var(--ndw-color-
|
|
55
|
+
.ndw-date-range-end-preview {
|
|
56
|
+
background-color: var(--ndw-color-secondary-100);
|
|
57
|
+
border-top-right-radius: 50%;
|
|
58
|
+
border-bottom-right-radius: 50%;
|
|
28
59
|
}
|
|
29
60
|
|
|
30
|
-
|
|
31
|
-
background: var(--ndw-color-secondary-
|
|
32
|
-
|
|
33
|
-
|
|
61
|
+
.ndw-date-in-range-preview {
|
|
62
|
+
background-color: var(--ndw-color-secondary-100);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Add a dot below dates with the ndw-date-indicator class
|
|
66
|
+
.ndw-date-indicator > :first-child {
|
|
67
|
+
&::after {
|
|
68
|
+
content: '';
|
|
69
|
+
background: var(--ndw-color-primary);
|
|
70
|
+
position: absolute;
|
|
71
|
+
bottom: 2px;
|
|
72
|
+
left: calc(50% - 4px);
|
|
73
|
+
width: 8px;
|
|
74
|
+
height: 8px;
|
|
75
|
+
box-sizing: border-box;
|
|
76
|
+
border-radius: 4px;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
34
79
|
|
|
35
|
-
|
|
36
|
-
|
|
80
|
+
// Disable the month view when in 'month' mode
|
|
81
|
+
&.month-picker {
|
|
82
|
+
.mat-calendar-period-button {
|
|
83
|
+
pointer-events: none;
|
|
37
84
|
}
|
|
38
85
|
|
|
39
|
-
|
|
40
|
-
|
|
86
|
+
.mat-calendar-arrow {
|
|
87
|
+
display: none;
|
|
41
88
|
}
|
|
42
89
|
}
|
|
43
90
|
}
|
|
@@ -109,7 +109,8 @@
|
|
|
109
109
|
|
|
110
110
|
// When an ndwInput is contained in an input-container hide the
|
|
111
111
|
// ndwInput borders and instead put the borders on the container.
|
|
112
|
-
.input-container:has(> [ndwInput])
|
|
112
|
+
.input-container:has(> [ndwInput]),
|
|
113
|
+
.input-container:has(> ndw-datepicker > [ndwInput]) {
|
|
113
114
|
@include shared-style();
|
|
114
115
|
|
|
115
116
|
// When input has a ndw-input-icon enable the inline padding
|
package/styles/layout/_grid.scss
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
@use '../base/variables' as *;
|
|
2
2
|
|
|
3
|
+
$breakpoints: (
|
|
4
|
+
2xs: $ndw-screen-2xs,
|
|
5
|
+
xs: $ndw-screen-xs,
|
|
6
|
+
sm: $ndw-screen-sm,
|
|
7
|
+
md: $ndw-screen-md,
|
|
8
|
+
);
|
|
9
|
+
|
|
3
10
|
@mixin column($span) {
|
|
4
11
|
grid-column: span $span;
|
|
5
12
|
}
|
|
@@ -99,3 +106,60 @@
|
|
|
99
106
|
}
|
|
100
107
|
}
|
|
101
108
|
}
|
|
109
|
+
|
|
110
|
+
.ndw-c-grid {
|
|
111
|
+
display: flex;
|
|
112
|
+
flex-wrap: wrap;
|
|
113
|
+
container-type: inline-size;
|
|
114
|
+
container-name: ndw-c-grid;
|
|
115
|
+
|
|
116
|
+
@mixin ndw-c-col-span($size, $important: false) {
|
|
117
|
+
$flag: if($important, '!important', '');
|
|
118
|
+
flex: 0 0 calc((100% / 12) * #{$size}) #{$flag};
|
|
119
|
+
max-width: calc((100% / 12) * #{$size}) #{$flag};
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
@mixin ndw-c-breakpoint($name, $min-width) {
|
|
123
|
+
@container ndw-c-grid (min-width: #{$min-width}) {
|
|
124
|
+
@content;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
@for $i from 1 through 12 {
|
|
129
|
+
.ndw-c-col-#{$i} {
|
|
130
|
+
@include ndw-c-col-span($i, false);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
@each $name, $width in $breakpoints {
|
|
135
|
+
@include ndw-c-breakpoint($name, $width) {
|
|
136
|
+
@for $i from 1 through 12 {
|
|
137
|
+
.ndw-c-col-#{$name}-#{$i} {
|
|
138
|
+
@include ndw-c-col-span($i, true);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
$order-range: 0 1 2 3 4 5;
|
|
145
|
+
|
|
146
|
+
@each $i in $order-range {
|
|
147
|
+
.ndw-c-order-#{$i} {
|
|
148
|
+
order: $i !important;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
@each $name, $width in $breakpoints {
|
|
153
|
+
@container ndw-c-grid (min-width: #{$width}) {
|
|
154
|
+
@each $i in $order-range {
|
|
155
|
+
.ndw-c-order-#{$name}-#{$i} {
|
|
156
|
+
order: $i !important;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.ndw-c-col {
|
|
164
|
+
flex: 1 1 100%;
|
|
165
|
+
}
|
|
@@ -3,17 +3,19 @@ import { type Meta, type StoryObj } from '@storybook/angular';
|
|
|
3
3
|
interface StoryArgs {
|
|
4
4
|
columnClasses: string[][];
|
|
5
5
|
disablePadding?: boolean;
|
|
6
|
+
useContainerQueries?: boolean;
|
|
6
7
|
}
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
|
-
* Create a responsive grid layout with columns. There are multiple breakpoints
|
|
10
|
+
* Create a responsive grid layout with columns. There are multiple breakpoints based
|
|
11
|
+
* on the viewport size. Each breakpoint has a specific number of columns:
|
|
10
12
|
* - Above 1024px (sm): 12 columns
|
|
11
13
|
* - 768px-1024px (xs): 6 columns
|
|
12
14
|
* - 480px-768px (2xs): 4 columns
|
|
13
15
|
* - Below 480px: 2 columns
|
|
14
16
|
* - Maximum width: 1440px
|
|
15
17
|
*
|
|
16
|
-
* The grid needs a container element with the class `grid`. Column elements
|
|
18
|
+
* The grid needs a container element with the class `ndw-grid`. Column elements
|
|
17
19
|
* should have classes like:
|
|
18
20
|
* - `column-{span}`: all screen sizes
|
|
19
21
|
* - `column-2xs-{span}`: below 480px
|
|
@@ -26,8 +28,22 @@ interface StoryArgs {
|
|
|
26
28
|
* Use the viewport tool to see responsive behavior.
|
|
27
29
|
*
|
|
28
30
|
* ## Disable padding
|
|
31
|
+
*
|
|
29
32
|
* Sometimes you may want to disable padding on the columns, for example when using a card component.
|
|
30
33
|
* To do this, add the class `ndw-grid--no-padding` to the `.ndw-grid` element.
|
|
34
|
+
*
|
|
35
|
+
* ## Container grid
|
|
36
|
+
*
|
|
37
|
+
* It is also possible to use a container grid which uses breakpoints
|
|
38
|
+
* based on it's container instead of the viewport.
|
|
39
|
+
*
|
|
40
|
+
* There are a few notable differences when using a container grid:
|
|
41
|
+
* - Container queries are used instead of media queries.
|
|
42
|
+
* - The container element must have the `ndw-c-grid` class instead of `ndw-grid`.
|
|
43
|
+
* - The column classes are prefixed with `ndw-c-col-` instead of `column-`
|
|
44
|
+
* - The container grid always has 12 columns, regardless of the container size.
|
|
45
|
+
* - The container grid does not have padding on the outside of between columns.
|
|
46
|
+
* - The container grid uses flex layout instead of CSS grid.
|
|
31
47
|
*/
|
|
32
48
|
|
|
33
49
|
const meta: Meta<StoryArgs> = {
|
|
@@ -42,22 +58,26 @@ const meta: Meta<StoryArgs> = {
|
|
|
42
58
|
props,
|
|
43
59
|
styles: [
|
|
44
60
|
`
|
|
45
|
-
.ndw-grid > div
|
|
61
|
+
.ndw-grid > div,
|
|
62
|
+
.ndw-c-grid > div {
|
|
63
|
+
text-align: center;
|
|
46
64
|
background-color: var(--ndw-color-grey-300);
|
|
65
|
+
border: 1px solid var(--ndw-color-grey-400);
|
|
47
66
|
padding: var(--ndw-spacing-xs);
|
|
48
67
|
}
|
|
49
|
-
.ndw-grid
|
|
68
|
+
.ndw-grid,
|
|
69
|
+
.ndw-c-grid {
|
|
50
70
|
background-color: var(--ndw-color-grey-100);
|
|
51
71
|
margin-bottom: var(--ndw-spacing-xl);
|
|
52
72
|
}
|
|
53
73
|
`,
|
|
54
74
|
],
|
|
55
75
|
template: `
|
|
56
|
-
<div class="ndw-grid ${props.disablePadding ? 'ndw-grid--no-padding' : ''}">
|
|
76
|
+
<div class="${props.useContainerQueries ? 'ndw-c-grid' : 'ndw-grid'} ${props.disablePadding ? 'ndw-grid--no-padding' : ''}">
|
|
57
77
|
${props.columnClasses
|
|
58
78
|
.map(
|
|
59
79
|
(classes, index) =>
|
|
60
|
-
`<div class="${classes.join(' ')}">
|
|
80
|
+
`<div class="${classes.map((c) => `${props.useContainerQueries ? 'ndw-c-col-' : 'column-'}${c}`).join(' ')}">
|
|
61
81
|
${index + 1}
|
|
62
82
|
</div>`,
|
|
63
83
|
)
|
|
@@ -66,11 +86,23 @@ const meta: Meta<StoryArgs> = {
|
|
|
66
86
|
`,
|
|
67
87
|
}),
|
|
68
88
|
argTypes: {
|
|
89
|
+
disablePadding: {
|
|
90
|
+
description: 'Disable the inline padding on the grid.',
|
|
91
|
+
control: { type: 'boolean' },
|
|
92
|
+
table: { category: 'Grid configuration' },
|
|
93
|
+
},
|
|
69
94
|
columnClasses: {
|
|
70
95
|
description: 'Array of classes to apply to each column.',
|
|
96
|
+
table: {
|
|
97
|
+
category: 'Story inputs',
|
|
98
|
+
},
|
|
71
99
|
},
|
|
72
|
-
|
|
73
|
-
description: '
|
|
100
|
+
useContainerQueries: {
|
|
101
|
+
description: 'Use container queries instead of media queries for the grid.',
|
|
102
|
+
control: { type: 'boolean' },
|
|
103
|
+
table: {
|
|
104
|
+
category: 'Story inputs',
|
|
105
|
+
},
|
|
74
106
|
},
|
|
75
107
|
},
|
|
76
108
|
};
|
|
@@ -80,19 +112,21 @@ type Story = StoryObj<StoryArgs>;
|
|
|
80
112
|
export const Default: Story = {
|
|
81
113
|
args: {
|
|
82
114
|
columnClasses: [
|
|
83
|
-
['
|
|
84
|
-
['
|
|
85
|
-
['
|
|
86
|
-
['
|
|
87
|
-
['
|
|
88
|
-
['
|
|
89
|
-
['
|
|
90
|
-
['
|
|
91
|
-
['
|
|
92
|
-
['
|
|
93
|
-
['
|
|
94
|
-
['
|
|
115
|
+
['1', '2xs-4', 'xs-2', 'sm-1'],
|
|
116
|
+
['1', '2xs-4', 'xs-2', 'sm-1'],
|
|
117
|
+
['1', 'xs-2', 'sm-1'],
|
|
118
|
+
['1', 'xs-2', 'sm-1'],
|
|
119
|
+
['1', 'sm-1'],
|
|
120
|
+
['1', 'sm-1'],
|
|
121
|
+
['1'],
|
|
122
|
+
['1'],
|
|
123
|
+
['1'],
|
|
124
|
+
['1'],
|
|
125
|
+
['1'],
|
|
126
|
+
['1'],
|
|
95
127
|
],
|
|
128
|
+
disablePadding: false,
|
|
129
|
+
useContainerQueries: false,
|
|
96
130
|
},
|
|
97
131
|
};
|
|
98
132
|
|
|
@@ -102,38 +136,33 @@ export const Default: Story = {
|
|
|
102
136
|
export const ResponsiveColumns: Story = {
|
|
103
137
|
args: {
|
|
104
138
|
columnClasses: [
|
|
105
|
-
['
|
|
106
|
-
['
|
|
107
|
-
['
|
|
139
|
+
['12', 'sm-3', 'md-4'],
|
|
140
|
+
['12', 'sm-3', 'md-4'],
|
|
141
|
+
['12', 'sm-6', 'md-4'],
|
|
108
142
|
],
|
|
109
143
|
},
|
|
110
144
|
};
|
|
111
145
|
|
|
112
146
|
export const MixedColumnWidth: Story = {
|
|
113
147
|
args: {
|
|
114
|
-
columnClasses: [
|
|
115
|
-
['column-6'],
|
|
116
|
-
['column-2'],
|
|
117
|
-
['column-4'],
|
|
118
|
-
['column-2'],
|
|
119
|
-
['column-2'],
|
|
120
|
-
['column-2'],
|
|
121
|
-
['column-6'],
|
|
122
|
-
['column-12'],
|
|
123
|
-
],
|
|
148
|
+
columnClasses: [['6'], ['2'], ['4'], ['2'], ['2'], ['2'], ['6'], ['12']],
|
|
124
149
|
},
|
|
125
150
|
};
|
|
126
151
|
|
|
127
152
|
export const NoPadding: Story = {
|
|
128
153
|
args: {
|
|
154
|
+
columnClasses: [['6'], ['6'], ['2'], ['2'], ['2'], ['6']],
|
|
155
|
+
disablePadding: true,
|
|
156
|
+
},
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
export const ContainerQueryGrid: Story = {
|
|
160
|
+
args: {
|
|
161
|
+
useContainerQueries: true,
|
|
129
162
|
columnClasses: [
|
|
130
|
-
['
|
|
131
|
-
['
|
|
132
|
-
['
|
|
133
|
-
['column-2'],
|
|
134
|
-
['column-2'],
|
|
135
|
-
['column-6'],
|
|
163
|
+
['12', 'sm-6', 'md-4'],
|
|
164
|
+
['12', 'sm-6', 'md-4'],
|
|
165
|
+
['12', 'sm-12', 'md-4'],
|
|
136
166
|
],
|
|
137
|
-
disablePadding: true,
|
|
138
167
|
},
|
|
139
168
|
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
2
|
-
import { CollapsibleComponent } from '../collapsible';
|
|
3
|
-
import { ListComponent } from '../list';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class AccordionComponent extends ListComponent implements OnInit {
|
|
6
|
-
#private;
|
|
7
|
-
collapseOthers: import("@angular/core").InputSignal<boolean>;
|
|
8
|
-
collapsibles: import("@angular/core").Signal<readonly CollapsibleComponent[]>;
|
|
9
|
-
ngOnInit(): void;
|
|
10
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AccordionComponent, never>;
|
|
11
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AccordionComponent, "ndw-accordion", never, { "collapseOthers": { "alias": "collapseOthers"; "required": false; "isSignal": true; }; }, {}, ["collapsibles"], ["*"], true, never>;
|
|
12
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Subject } from 'rxjs';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class AccordionService {
|
|
4
|
-
expanded$: Subject<number>;
|
|
5
|
-
setExpandedCollapsible(index: number): void;
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AccordionService, never>;
|
|
7
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AccordionService>;
|
|
8
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { AriaLive } from '../../models';
|
|
2
|
-
import { AlertType } from './alert.model';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class AlertComponent {
|
|
5
|
-
/**
|
|
6
|
-
* Whether the alert is actionable, shows a close icon and a title.
|
|
7
|
-
*/
|
|
8
|
-
actionable: import("@angular/core").InputSignal<boolean>;
|
|
9
|
-
/**
|
|
10
|
-
* The title of the alert. Only used when actionable is true.
|
|
11
|
-
*/
|
|
12
|
-
title: import("@angular/core").InputSignal<string | undefined>;
|
|
13
|
-
/**
|
|
14
|
-
* Use info, info-grey, warning or critical to indicate the type of alert.
|
|
15
|
-
*/
|
|
16
|
-
type: import("@angular/core").InputSignal<AlertType>;
|
|
17
|
-
/**
|
|
18
|
-
* Use polite, assertive or off to indicate whether the alert is
|
|
19
|
-
* announced automatically by the screen reader.
|
|
20
|
-
*/
|
|
21
|
-
ariaLive: import("@angular/core").InputSignal<AriaLive>;
|
|
22
|
-
close: import("@angular/core").OutputEmitterRef<void>;
|
|
23
|
-
onClose(): void;
|
|
24
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AlertComponent, never>;
|
|
25
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AlertComponent, "ndw-alert", never, { "actionable": { "alias": "actionable"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "ariaLive": { "alias": "ariaLive"; "required": false; "isSignal": true; }; }, { "close": "close"; }, never, ["*"], true, never>;
|
|
26
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type AlertType = 'critical' | 'info' | 'info-grey' | 'warning';
|
|
@@ -1,9 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class BadgeComponent {
|
|
3
|
-
/**
|
|
4
|
-
* The value of the badge
|
|
5
|
-
*/
|
|
6
|
-
value: import("@angular/core").InputSignal<number | undefined>;
|
|
7
|
-
/**
|
|
8
|
-
* The aria label, used by screen readers to give context.
|
|
9
|
-
*/
|
|
10
|
-
ariaLabel: import("@angular/core").InputSignal<string | undefined>;
|
|
11
|
-
/**
|
|
12
|
-
* When true, the badge will display values above 99.
|
|
13
|
-
* When false (default), the badge will display values above 99 as a dot
|
|
14
|
-
*/
|
|
15
|
-
displayLargeNumbers: import("@angular/core").InputSignal<boolean>;
|
|
16
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<BadgeComponent, never>;
|
|
17
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<BadgeComponent, "ndw-badge", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "displayLargeNumbers": { "alias": "displayLargeNumbers"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
18
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './badge.component';
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { AfterViewInit, ElementRef } from '@angular/core';
|
|
2
|
-
import { AriaLive } from '../../models';
|
|
3
|
-
import { BannerType } from './banner.model';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class BannerComponent implements AfterViewInit {
|
|
6
|
-
/**
|
|
7
|
-
* The title of the banner.
|
|
8
|
-
*/
|
|
9
|
-
title: import("@angular/core").InputSignal<string>;
|
|
10
|
-
/**
|
|
11
|
-
* The message of the banner.
|
|
12
|
-
*/
|
|
13
|
-
message: import("@angular/core").InputSignal<string>;
|
|
14
|
-
/**
|
|
15
|
-
* The read more label if the message is truncated.
|
|
16
|
-
*/
|
|
17
|
-
readMoreLabel: import("@angular/core").InputSignal<string>;
|
|
18
|
-
/**
|
|
19
|
-
* Use info, info-grey, warning, positive or critical to indicate the type of banner.
|
|
20
|
-
*/
|
|
21
|
-
type: import("@angular/core").InputSignal<BannerType>;
|
|
22
|
-
/**
|
|
23
|
-
* Use polite, assertive or off to indicate whether the alert is
|
|
24
|
-
* announced automatically by the screen reader.
|
|
25
|
-
*/
|
|
26
|
-
ariaLive: import("@angular/core").InputSignal<AriaLive>;
|
|
27
|
-
/**
|
|
28
|
-
* Emits when the banner close button is clicked.
|
|
29
|
-
*/
|
|
30
|
-
close: import("@angular/core").OutputEmitterRef<void>;
|
|
31
|
-
textContent: import("@angular/core").Signal<ElementRef<any> | undefined>;
|
|
32
|
-
showReadMore: boolean;
|
|
33
|
-
ngAfterViewInit(): void;
|
|
34
|
-
onClose(event: MouseEvent): void;
|
|
35
|
-
private setReadMore;
|
|
36
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<BannerComponent, never>;
|
|
37
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<BannerComponent, "ndw-banner", never, { "title": { "alias": "title"; "required": true; "isSignal": true; }; "message": { "alias": "message"; "required": true; "isSignal": true; }; "readMoreLabel": { "alias": "readMoreLabel"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "ariaLive": { "alias": "ariaLive"; "required": false; "isSignal": true; }; }, { "close": "close"; }, never, never, true, never>;
|
|
38
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type BannerType = 'critical' | 'info' | 'info-grey' | 'warning' | 'positive';
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { CoreBreadcrumbComponent } from '@ndwnu/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class BreadcrumbComponent extends CoreBreadcrumbComponent {
|
|
4
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<BreadcrumbComponent, never>;
|
|
5
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<BreadcrumbComponent, "ndw-breadcrumb", never, {}, {}, never, ["*"], true, never>;
|
|
6
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './breadcrumb.component';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { CoreBreadcrumbGroupComponent } from '@ndwnu/core';
|
|
2
|
-
import { BreadcrumbComponent } from '../breadcrumb';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class BreadcrumbGroupComponent extends CoreBreadcrumbGroupComponent<BreadcrumbComponent> {
|
|
5
|
-
protected breadcrumbs: import("@angular/core").Signal<readonly BreadcrumbComponent[]>;
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<BreadcrumbGroupComponent, never>;
|
|
7
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<BreadcrumbGroupComponent, "ndw-breadcrumb-group", never, {}, {}, ["breadcrumbs"], never, true, never>;
|
|
8
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './breadcrumb-group.component';
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class ButtonDirective implements OnInit {
|
|
4
|
-
private readonly elementRef;
|
|
5
|
-
get element(): HTMLButtonElement;
|
|
6
|
-
ngOnInit(): void;
|
|
7
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ButtonDirective, never>;
|
|
8
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<ButtonDirective, "[ndwButton]", never, {}, {}, never, never, true, never>;
|
|
9
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './button.directive';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class CardContentComponent {
|
|
3
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CardContentComponent, never>;
|
|
4
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CardContentComponent, "ndw-card-content", never, {}, {}, never, ["*"], true, never>;
|
|
5
|
-
}
|