@czi-sds/components 22.9.0 → 22.9.1
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/dist/index.cjs.d.ts +1 -1
- package/dist/index.cjs.js +2 -1
- package/dist/index.esm.d.ts +1 -1
- package/dist/index.esm.js +2 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
package/dist/index.cjs.d.ts
CHANGED
|
@@ -1563,12 +1563,12 @@ declare function NavigationFooter({ hasInvertedStyle, images, logo, logoUrl, log
|
|
|
1563
1563
|
interface BaseNavigationHeaderPrimaryNavItem<T extends string> extends Record<string, unknown> {
|
|
1564
1564
|
key: T;
|
|
1565
1565
|
label: ReactNode;
|
|
1566
|
+
onClick?: (e: React.SyntheticEvent) => void;
|
|
1566
1567
|
}
|
|
1567
1568
|
interface TextNavigationHeaderPrimaryNavItem<T extends string> extends BaseNavigationHeaderPrimaryNavItem<T> {
|
|
1568
1569
|
itemType: "text";
|
|
1569
1570
|
tag?: string;
|
|
1570
1571
|
tagColor?: SdsTagColorType;
|
|
1571
|
-
onClick?: (e: React.SyntheticEvent) => void;
|
|
1572
1572
|
}
|
|
1573
1573
|
interface DropdownItem {
|
|
1574
1574
|
label: ReactNode;
|
package/dist/index.cjs.js
CHANGED
|
@@ -14687,13 +14687,14 @@ function NavigationHeaderPrimaryNav(_a) {
|
|
|
14687
14687
|
}, []);
|
|
14688
14688
|
return (jsxRuntime.jsx(StyledSection, { isNarrow: isNarrow, children: items.map(function (item) {
|
|
14689
14689
|
var _a, _b;
|
|
14690
|
-
var key = item.key, label = item.label, tag = item.tag, tagColor = item.tagColor, rest = __rest(item, ["key", "label", "tag", "tagColor"]);
|
|
14690
|
+
var key = item.key, label = item.label, tag = item.tag, tagColor = item.tagColor, parentOnClick = item.onClick, rest = __rest(item, ["key", "label", "tag", "tagColor", "onClick"]);
|
|
14691
14691
|
var isActive = key === value;
|
|
14692
14692
|
if (item.itemType === "dropdown" && !isNarrow) {
|
|
14693
14693
|
var dropdownItem = item;
|
|
14694
14694
|
return (jsxRuntime.jsxs(React.Fragment, { children: [jsxRuntime.jsx(PrimaryNavItem, __assign({}, rest, { itemType: item.itemType, ref: buttonRef, sdsStyle: "minimal", active: open, onClick: function (e) {
|
|
14695
14695
|
setAnchorEl(e.currentTarget);
|
|
14696
14696
|
onChange(key);
|
|
14697
|
+
parentOnClick === null || parentOnClick === void 0 ? void 0 : parentOnClick(e);
|
|
14697
14698
|
}, hasInvertedStyle: hasInvertedStyle, isNarrow: isNarrow, children: jsxRuntime.jsxs(StyledLabel, { itemType: item.itemType, active: open, hasInvertedStyle: hasInvertedStyle, isNarrow: isNarrow, children: [label, jsxRuntime.jsx(Icon, { sdsIcon: open ? "ChevronUp" : "ChevronDown", sdsSize: "xs" })] }) })), jsxRuntime.jsx(Menu, { anchorEl: anchorEl, open: open, onClose: onClose, slotProps: {
|
|
14698
14699
|
paper: {
|
|
14699
14700
|
style: {
|
package/dist/index.esm.d.ts
CHANGED
|
@@ -1563,12 +1563,12 @@ declare function NavigationFooter({ hasInvertedStyle, images, logo, logoUrl, log
|
|
|
1563
1563
|
interface BaseNavigationHeaderPrimaryNavItem<T extends string> extends Record<string, unknown> {
|
|
1564
1564
|
key: T;
|
|
1565
1565
|
label: ReactNode;
|
|
1566
|
+
onClick?: (e: React.SyntheticEvent) => void;
|
|
1566
1567
|
}
|
|
1567
1568
|
interface TextNavigationHeaderPrimaryNavItem<T extends string> extends BaseNavigationHeaderPrimaryNavItem<T> {
|
|
1568
1569
|
itemType: "text";
|
|
1569
1570
|
tag?: string;
|
|
1570
1571
|
tagColor?: SdsTagColorType;
|
|
1571
|
-
onClick?: (e: React.SyntheticEvent) => void;
|
|
1572
1572
|
}
|
|
1573
1573
|
interface DropdownItem {
|
|
1574
1574
|
label: ReactNode;
|
package/dist/index.esm.js
CHANGED
|
@@ -14664,13 +14664,14 @@ function NavigationHeaderPrimaryNav(_a) {
|
|
|
14664
14664
|
}, []);
|
|
14665
14665
|
return (jsx(StyledSection, { isNarrow: isNarrow, children: items.map(function (item) {
|
|
14666
14666
|
var _a, _b;
|
|
14667
|
-
var key = item.key, label = item.label, tag = item.tag, tagColor = item.tagColor, rest = __rest(item, ["key", "label", "tag", "tagColor"]);
|
|
14667
|
+
var key = item.key, label = item.label, tag = item.tag, tagColor = item.tagColor, parentOnClick = item.onClick, rest = __rest(item, ["key", "label", "tag", "tagColor", "onClick"]);
|
|
14668
14668
|
var isActive = key === value;
|
|
14669
14669
|
if (item.itemType === "dropdown" && !isNarrow) {
|
|
14670
14670
|
var dropdownItem = item;
|
|
14671
14671
|
return (jsxs(Fragment$1, { children: [jsx(PrimaryNavItem, __assign({}, rest, { itemType: item.itemType, ref: buttonRef, sdsStyle: "minimal", active: open, onClick: function (e) {
|
|
14672
14672
|
setAnchorEl(e.currentTarget);
|
|
14673
14673
|
onChange(key);
|
|
14674
|
+
parentOnClick === null || parentOnClick === void 0 ? void 0 : parentOnClick(e);
|
|
14674
14675
|
}, hasInvertedStyle: hasInvertedStyle, isNarrow: isNarrow, children: jsxs(StyledLabel, { itemType: item.itemType, active: open, hasInvertedStyle: hasInvertedStyle, isNarrow: isNarrow, children: [label, jsx(Icon, { sdsIcon: open ? "ChevronUp" : "ChevronDown", sdsSize: "xs" })] }) })), jsx(Menu, { anchorEl: anchorEl, open: open, onClose: onClose, slotProps: {
|
|
14675
14676
|
paper: {
|
|
14676
14677
|
style: {
|