@nethru/ui 1.0.23 → 1.0.25
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.
|
@@ -8,6 +8,9 @@ export default function ReferenceChipList({
|
|
|
8
8
|
sx,
|
|
9
9
|
...props
|
|
10
10
|
}) {
|
|
11
|
+
const handleClick = (id, event) => {
|
|
12
|
+
if (onClick) onClick(id, event);
|
|
13
|
+
};
|
|
11
14
|
return /*#__PURE__*/_jsx(Stack, {
|
|
12
15
|
direction: "row",
|
|
13
16
|
gap: 0.5,
|
|
@@ -20,7 +23,7 @@ export default function ReferenceChipList({
|
|
|
20
23
|
return reference.href ? /*#__PURE__*/_jsx(Link, {
|
|
21
24
|
href: reference.href,
|
|
22
25
|
underline: "none",
|
|
23
|
-
onClick:
|
|
26
|
+
onClick: event => handleClick(reference.id, event),
|
|
24
27
|
children: /*#__PURE__*/_jsx(ReferenceChip, {
|
|
25
28
|
name: reference.name,
|
|
26
29
|
sx: chipStyles,
|
|
@@ -28,7 +31,7 @@ export default function ReferenceChipList({
|
|
|
28
31
|
})
|
|
29
32
|
}, index) : /*#__PURE__*/_jsx(ReferenceChip, {
|
|
30
33
|
name: reference.name,
|
|
31
|
-
onClick:
|
|
34
|
+
onClick: event => handleClick(reference.id, event),
|
|
32
35
|
sx: {
|
|
33
36
|
cursor: 'default',
|
|
34
37
|
...chipStyles
|
|
@@ -48,7 +51,7 @@ function ReferenceChip({
|
|
|
48
51
|
label: name,
|
|
49
52
|
size: "small",
|
|
50
53
|
sx: {
|
|
51
|
-
fontSize: '
|
|
54
|
+
fontSize: '13px',
|
|
52
55
|
...sx
|
|
53
56
|
},
|
|
54
57
|
...props
|
|
@@ -91,7 +91,7 @@ function updateActiveItems(draft, menu, href) {
|
|
|
91
91
|
function updateActiveSection(sections) {
|
|
92
92
|
if (!sections) return;
|
|
93
93
|
for (let section of sections) {
|
|
94
|
-
if (section.href ===
|
|
94
|
+
if (href.indexOf(section.href) === 0) {
|
|
95
95
|
draft.activeSecondaryItem = section.id;
|
|
96
96
|
return true;
|
|
97
97
|
}
|
|
@@ -104,7 +104,7 @@ function updateActiveItems(draft, menu, href) {
|
|
|
104
104
|
function updateActiveSubmenuItems(id, submenu) {
|
|
105
105
|
if (!submenu) return;
|
|
106
106
|
for (let item of submenu) {
|
|
107
|
-
if (item.href ===
|
|
107
|
+
if (href.indexOf(item.href) === 0) {
|
|
108
108
|
if (!(id in draft.menuTrees)) draft.menuTrees[id] = emptyState();
|
|
109
109
|
draft.activeSecondaryItem = item.id;
|
|
110
110
|
return true;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nethru/ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.25",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"files": [
|
|
6
6
|
"/dist"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"immer": "^10.0.3",
|
|
26
26
|
"react": "^18.2.0",
|
|
27
27
|
"react-dom": "^18.2.0",
|
|
28
|
-
"react-router-dom": "^6.20.
|
|
28
|
+
"react-router-dom": "^6.20.1",
|
|
29
29
|
"react-scripts": "5.0.1"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|