@nice-digital/nds-hero 4.1.2 → 4.1.3-alpha-node-update.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/es/Hero.d.ts +14 -14
- package/es/Hero.js +25 -25
- package/package.json +5 -5
package/es/Hero.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import "../scss/hero.scss";
|
|
3
|
-
export interface HeroProps {
|
|
4
|
-
[prop: string]: unknown;
|
|
5
|
-
header?: React.ReactNode;
|
|
6
|
-
title: React.ReactNode;
|
|
7
|
-
intro?: React.ReactNode;
|
|
8
|
-
description?: React.ReactNode;
|
|
9
|
-
actions?: React.ReactNode;
|
|
10
|
-
image?: string;
|
|
11
|
-
isDark?: boolean;
|
|
12
|
-
className?: string;
|
|
13
|
-
}
|
|
14
|
-
export declare const Hero: React.FC<HeroProps>;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "../scss/hero.scss";
|
|
3
|
+
export interface HeroProps {
|
|
4
|
+
[prop: string]: unknown;
|
|
5
|
+
header?: React.ReactNode;
|
|
6
|
+
title: React.ReactNode;
|
|
7
|
+
intro?: React.ReactNode;
|
|
8
|
+
description?: React.ReactNode;
|
|
9
|
+
actions?: React.ReactNode;
|
|
10
|
+
image?: string;
|
|
11
|
+
isDark?: boolean;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const Hero: React.FC<HeroProps>;
|
package/es/Hero.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
-
var t = {};
|
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
-
t[p] = s[p];
|
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
-
t[p[i]] = s[p[i]];
|
|
10
|
-
}
|
|
11
|
-
return t;
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.Hero = void 0;
|
|
18
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
-
const classnames_1 = __importDefault(require("classnames"));
|
|
20
|
-
require("../scss/hero.scss");
|
|
21
|
-
const Hero = (props) => {
|
|
22
|
-
const { actions, header, intro, description, title, image, isDark = false, className } = props, rest = __rest(props, ["actions", "header", "intro", "description", "title", "image", "isDark", "className"]);
|
|
23
|
-
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: (0, classnames_1.default)(["hero", { "hero--dark": isDark }, className]), "data-component": "hero" }, rest, { children: [(0, jsx_runtime_1.jsxs)("div",
|
|
24
|
-
};
|
|
25
|
-
exports.Hero = Hero;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Hero = void 0;
|
|
18
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
20
|
+
require("../scss/hero.scss");
|
|
21
|
+
const Hero = (props) => {
|
|
22
|
+
const { actions, header, intro, description, title, image, isDark = false, className } = props, rest = __rest(props, ["actions", "header", "intro", "description", "title", "image", "isDark", "className"]);
|
|
23
|
+
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: (0, classnames_1.default)(["hero", { "hero--dark": isDark }, className]), "data-component": "hero" }, rest, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "hero__container", children: [header && header, (0, jsx_runtime_1.jsxs)("div", { className: "hero__body", children: [(0, jsx_runtime_1.jsx)("h1", { className: "hero__title", children: title }), intro && (0, jsx_runtime_1.jsx)("p", { className: "hero__intro", children: intro }), description && (0, jsx_runtime_1.jsx)("p", { className: "hero__description", children: description }), actions && (0, jsx_runtime_1.jsx)("div", { className: "hero__actions", children: actions })] })] }), image && ((0, jsx_runtime_1.jsx)("div", { className: "hero__image-container", style: { backgroundImage: `url(${image})` } }))] })));
|
|
24
|
+
};
|
|
25
|
+
exports.Hero = Hero;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nice-digital/nds-hero",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.3-alpha-node-update.0",
|
|
4
4
|
"description": "Hero component for the NICE Design System",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"hero"
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"url": "https://github.com/nice-digital/nice-design-system/issues"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@nice-digital/nds-core": "^4.0.
|
|
37
|
+
"@nice-digital/nds-core": "^4.0.17-alpha-node-update.0",
|
|
38
38
|
"classnames": "^2.3.1"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"@testing-library/react": "^13.4.0",
|
|
47
47
|
"@testing-library/user-event": "^14.4.3",
|
|
48
48
|
"@types/jest": "^29.2.2",
|
|
49
|
-
"@types/node": "
|
|
50
|
-
"typescript": "^
|
|
49
|
+
"@types/node": "22.19.0",
|
|
50
|
+
"typescript": "^5.9.3"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "1b7a4a13183120071b022adecd2fcf4eebefbb6c"
|
|
53
53
|
}
|