@nice-digital/nds-page-header 4.0.10 → 4.0.12

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/es/PageHeader.js CHANGED
@@ -33,6 +33,6 @@ const PageHeader = (props) => {
33
33
  // TODO: Refactor this into some sort of conditional component
34
34
  // e.g. https://dev.to/dailydevtips1/conditional-wrapping-in-react-46o5
35
35
  const PageHeaderContent = () => ((0, jsx_runtime_1.jsxs)(nds_grid_1.Grid, { children: [(0, jsx_runtime_1.jsxs)(nds_grid_1.GridItem, Object.assign({ md: { cols: mainSectionColumns } }, { children: [breadcrumbs && ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "page-header__breadcrumbs" }, { children: breadcrumbs }))), (0, jsx_runtime_1.jsxs)("h1", Object.assign({ className: `page-header__heading ${useAltHeading ? "page-header__heading--alt" : ""}` }, { children: [preheading && ((0, jsx_runtime_1.jsx)("span", Object.assign({ className: "page-header__pre-heading" }, { children: preheading }))), heading] })), lead && (0, jsx_runtime_1.jsx)("p", Object.assign({ className: "page-header__lead" }, { children: lead })), description && ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "page-header__description" }, { children: description }))), metadata && ((0, jsx_runtime_1.jsx)("ul", Object.assign({ className: "page-header__metadata" }, { children: metadata.map((metadatum, i) => ((0, jsx_runtime_1.jsx)("li", { children: metadatum }, i))) }))), cta && (0, jsx_runtime_1.jsx)("p", Object.assign({ className: "page-header__cta" }, { children: cta }))] })), secondSection ? ((0, jsx_runtime_1.jsx)(nds_grid_1.GridItem, Object.assign({ md: { cols: 3 }, className: "page-header__second-section" }, { children: secondSection }))) : null] }));
36
- return ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: `page-header ${variantClassname}`, "data-component": "page-header" }, rest, { children: isFullWidth ? ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "container" }, { children: (0, jsx_runtime_1.jsx)(PageHeaderContent, {}) }))) : ((0, jsx_runtime_1.jsx)(PageHeaderContent, {})) })));
36
+ return ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: `page-header ${variantClassname}`, "data-component": "page-header" }, rest, { children: isFullWidth ? ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "page-header__full-width-container" }, { children: (0, jsx_runtime_1.jsx)(PageHeaderContent, {}) }))) : ((0, jsx_runtime_1.jsx)(PageHeaderContent, {})) })));
37
37
  };
38
38
  exports.PageHeader = PageHeader;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nice-digital/nds-page-header",
3
- "version": "4.0.10",
3
+ "version": "4.0.12",
4
4
  "description": "Page header component for the NICE Design System",
5
5
  "keywords": [
6
6
  "header"
@@ -35,7 +35,7 @@
35
35
  "url": "https://github.com/nice-digital/nice-design-system/issues"
36
36
  },
37
37
  "dependencies": {
38
- "@nice-digital/nds-core": "^4.0.10"
38
+ "@nice-digital/nds-core": "^4.0.12"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "react": "^16 || ^17 || ^18",
@@ -49,5 +49,5 @@
49
49
  "@types/node": "^18.11.9",
50
50
  "typescript": "^4.8.4"
51
51
  },
52
- "gitHead": "cd7581927d2863c8990b0f84afa46bf133c5945f"
52
+ "gitHead": "3c4b73dbfe2e6e5756e68ead1fadf5d0749f0b99"
53
53
  }
@@ -71,11 +71,25 @@
71
71
  &--alt {
72
72
  @include typography.font-size(h1-alt);
73
73
  }
74
+
75
+ .page-header--full-width-light &,
76
+ .page-header--full-width-dark & {
77
+ margin-bottom: utils.rem(spacing.$large);
78
+ }
79
+ }
80
+
81
+ &__description {
82
+ @include typography.p();
74
83
  }
75
84
 
76
85
  &__lead {
77
86
  @include typography.font-size(lead);
78
87
  margin: utils.rem(0 0 spacing.$small 0);
88
+
89
+ .page-header--full-width-light &,
90
+ .page-header--full-width-dark & {
91
+ margin-bottom: utils.rem(spacing.$medium);
92
+ }
79
93
  }
80
94
 
81
95
  &__metadata {
@@ -122,4 +136,8 @@
122
136
  padding-left: utils.rem(spacing.$medium);
123
137
  }
124
138
  }
139
+
140
+ &__full-width-container {
141
+ @include layout.fullWidthContainer();
142
+ }
125
143
  }