@nice-digital/nds-page-header 4.0.11 → 4.0.13

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.11",
3
+ "version": "4.0.13",
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.11"
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": "93f93e071f41bd750b2e87183556c59e8d0a3c6c"
52
+ "gitHead": "af6e9e657f3a31c6d35b7a1fb2dfddae2b2a833b"
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 {
@@ -116,10 +130,7 @@
116
130
  margin: 0;
117
131
  }
118
132
 
119
- &__second-section {
120
- @include media-queries.mq($from: md) {
121
- border-left: 2px solid colours.$page-header-second-section-border-colour;
122
- padding-left: utils.rem(spacing.$medium);
123
- }
133
+ &__full-width-container {
134
+ @include layout.fullWidthContainer();
124
135
  }
125
136
  }