@nice-digital/nds-a-z-list 4.0.17 → 4.0.18-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/AZList.d.ts +17 -17
- package/es/AZList.js +27 -27
- package/package.json +5 -5
package/es/AZList.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import "../scss/a-z-list.scss";
|
|
3
|
-
export interface AZListProps {
|
|
4
|
-
alphabet: React.ElementType;
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
className?: string;
|
|
7
|
-
[prop: string]: unknown;
|
|
8
|
-
}
|
|
9
|
-
export interface AZListItemProps {
|
|
10
|
-
id?: string;
|
|
11
|
-
title: string;
|
|
12
|
-
children: React.ReactNode;
|
|
13
|
-
className?: string;
|
|
14
|
-
[prop: string]: unknown;
|
|
15
|
-
}
|
|
16
|
-
export declare const AZList: React.FC<AZListProps>;
|
|
17
|
-
export declare const AZListItem: React.FC<AZListItemProps>;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "../scss/a-z-list.scss";
|
|
3
|
+
export interface AZListProps {
|
|
4
|
+
alphabet: React.ElementType;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
[prop: string]: unknown;
|
|
8
|
+
}
|
|
9
|
+
export interface AZListItemProps {
|
|
10
|
+
id?: string;
|
|
11
|
+
title: string;
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
className?: string;
|
|
14
|
+
[prop: string]: unknown;
|
|
15
|
+
}
|
|
16
|
+
export declare const AZList: React.FC<AZListProps>;
|
|
17
|
+
export declare const AZListItem: React.FC<AZListItemProps>;
|
package/es/AZList.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.AZListItem = exports.AZList = void 0;
|
|
15
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
|
-
require("../scss/a-z-list.scss");
|
|
17
|
-
const AZList = (props) => {
|
|
18
|
-
const { alphabet: Alphabet, children, className } = props, attrs = __rest(props, ["alphabet", "children", "className"]);
|
|
19
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Alphabet, { className: "a-z-list__alphabet" }), (0, jsx_runtime_1.jsx)("ol", Object.assign({ className: ["a-z-list", className].join(" "), "data-component": "a-z-list" }, attrs, { children: children }))] }));
|
|
20
|
-
};
|
|
21
|
-
exports.AZList = AZList;
|
|
22
|
-
const AZListItem = (props) => {
|
|
23
|
-
const { id, title, children, className } = props, attrs = __rest(props, ["id", "title", "children", "className"]);
|
|
24
|
-
const itemId = id || title.replace(" ", "").toLowerCase();
|
|
25
|
-
return ((0, jsx_runtime_1.jsxs)("li", Object.assign({ className: ["a-z-list__item", className].join(" ") }, attrs, { children: [(0, jsx_runtime_1.jsx)("h2",
|
|
26
|
-
};
|
|
27
|
-
exports.AZListItem = AZListItem;
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.AZListItem = exports.AZList = void 0;
|
|
15
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
|
+
require("../scss/a-z-list.scss");
|
|
17
|
+
const AZList = (props) => {
|
|
18
|
+
const { alphabet: Alphabet, children, className } = props, attrs = __rest(props, ["alphabet", "children", "className"]);
|
|
19
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Alphabet, { className: "a-z-list__alphabet" }), (0, jsx_runtime_1.jsx)("ol", Object.assign({ className: ["a-z-list", className].join(" "), "data-component": "a-z-list" }, attrs, { children: children }))] }));
|
|
20
|
+
};
|
|
21
|
+
exports.AZList = AZList;
|
|
22
|
+
const AZListItem = (props) => {
|
|
23
|
+
const { id, title, children, className } = props, attrs = __rest(props, ["id", "title", "children", "className"]);
|
|
24
|
+
const itemId = id || title.replace(" ", "").toLowerCase();
|
|
25
|
+
return ((0, jsx_runtime_1.jsxs)("li", Object.assign({ className: ["a-z-list__item", className].join(" ") }, attrs, { children: [(0, jsx_runtime_1.jsx)("h2", { className: "a-z-list__item-heading", id: itemId, children: title }), children] })));
|
|
26
|
+
};
|
|
27
|
+
exports.AZListItem = AZListItem;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nice-digital/nds-a-z-list",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.18-alpha-node-update.0",
|
|
4
4
|
"description": "A to Z list component for the NICE Design System",
|
|
5
5
|
"main": "es/AZList.js",
|
|
6
6
|
"types": "es/AZList.d.ts",
|
|
@@ -32,15 +32,15 @@
|
|
|
32
32
|
"homepage": "https://design-system.nice.org.uk/",
|
|
33
33
|
"license": "MIT",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@nice-digital/nds-core": "^4.0.
|
|
35
|
+
"@nice-digital/nds-core": "^4.0.17-alpha-node-update.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@testing-library/jest-dom": "^5.16.5",
|
|
39
39
|
"@testing-library/react": "^13.4.0",
|
|
40
40
|
"@testing-library/user-event": "^14.4.3",
|
|
41
41
|
"@types/jest": "^29.2.2",
|
|
42
|
-
"@types/node": "
|
|
43
|
-
"typescript": "^
|
|
42
|
+
"@types/node": "22.19.0",
|
|
43
|
+
"typescript": "^5.9.3"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "1b7a4a13183120071b022adecd2fcf4eebefbb6c"
|
|
46
46
|
}
|