@sendoutcards/quantum-design-ui 1.8.13 → 1.8.15
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.es.js
CHANGED
|
@@ -15081,7 +15081,8 @@ var OptionContent = function (props) {
|
|
|
15081
15081
|
} : {};
|
|
15082
15082
|
return jsx(React.Fragment, null, props.type === 'text' ? jsx(Text, _extends({
|
|
15083
15083
|
content: props.label,
|
|
15084
|
-
type: "caption"
|
|
15084
|
+
type: "caption",
|
|
15085
|
+
whiteSpace: "nowrap"
|
|
15085
15086
|
}, boldTextProp)) : props.type === 'graphic' ? jsx(Div, {
|
|
15086
15087
|
display: "flex",
|
|
15087
15088
|
justifyContent: "center",
|
|
@@ -15119,7 +15120,8 @@ var OptionContent = function (props) {
|
|
|
15119
15120
|
left: 'x1'
|
|
15120
15121
|
},
|
|
15121
15122
|
content: props.label.text,
|
|
15122
|
-
type: "caption"
|
|
15123
|
+
type: "caption",
|
|
15124
|
+
whiteSpace: "nowrap"
|
|
15123
15125
|
}, boldTextProp))));
|
|
15124
15126
|
};
|
|
15125
15127
|
|
|
@@ -17465,7 +17467,7 @@ var Logo = function (_a) {
|
|
|
17465
17467
|
color: color,
|
|
17466
17468
|
width: (_d = secondaryLogo === null || secondaryLogo === void 0 ? void 0 : secondaryLogo.width) !== null && _d !== void 0 ? _d : width,
|
|
17467
17469
|
type: "fullLogo"
|
|
17468
|
-
})), "
|
|
17470
|
+
})), "mechanism")));
|
|
17469
17471
|
};
|
|
17470
17472
|
|
|
17471
17473
|
var getDifference = function (currentDate, endDate) {
|
|
@@ -17757,7 +17759,7 @@ var LinkColumn = function (_a) {
|
|
|
17757
17759
|
}, jsx(VStack, {
|
|
17758
17760
|
gap: "x1_5"
|
|
17759
17761
|
}, linkColumn.links.map(function (subLink, index) {
|
|
17760
|
-
return jsx(Anchor, {
|
|
17762
|
+
return typeof subLink.title === 'string' ? jsx(Anchor, {
|
|
17761
17763
|
key: index,
|
|
17762
17764
|
color: subLinkColor,
|
|
17763
17765
|
cursor: 'pointer',
|
|
@@ -17766,7 +17768,14 @@ var LinkColumn = function (_a) {
|
|
|
17766
17768
|
target: subLink.target,
|
|
17767
17769
|
size: "small",
|
|
17768
17770
|
onClick: subLink.onClick
|
|
17769
|
-
})
|
|
17771
|
+
}) : jsx(Anchor, {
|
|
17772
|
+
key: index,
|
|
17773
|
+
cursor: 'pointer',
|
|
17774
|
+
href: subLink.href,
|
|
17775
|
+
target: subLink.target,
|
|
17776
|
+
size: "small",
|
|
17777
|
+
onClick: subLink.onClick
|
|
17778
|
+
}, subLink.title);
|
|
17770
17779
|
})))));
|
|
17771
17780
|
};
|
|
17772
17781
|
|
|
@@ -17807,7 +17816,7 @@ var DropDownMenu = function (_a) {
|
|
|
17807
17816
|
weight: "semiBold",
|
|
17808
17817
|
lineHeight: 1.2
|
|
17809
17818
|
}), linkColumn.links.map(function (link) {
|
|
17810
|
-
return link.icon ? jsx(IconLink, {
|
|
17819
|
+
return typeof link.title === 'string' ? link.icon ? jsx(IconLink, {
|
|
17811
17820
|
icon: link.icon,
|
|
17812
17821
|
title: link.title,
|
|
17813
17822
|
size: 'small',
|
|
@@ -17815,9 +17824,12 @@ var DropDownMenu = function (_a) {
|
|
|
17815
17824
|
}) : jsx(Anchor, {
|
|
17816
17825
|
title: link.title,
|
|
17817
17826
|
href: link.href,
|
|
17818
|
-
onClick: link.onClick
|
|
17827
|
+
onClick: link.onClick,
|
|
17819
17828
|
color: 'primaryBody'
|
|
17820
|
-
})
|
|
17829
|
+
}) : jsx(Anchor, {
|
|
17830
|
+
href: link.href,
|
|
17831
|
+
onClick: link.onClick
|
|
17832
|
+
}, link.title);
|
|
17821
17833
|
}))));
|
|
17822
17834
|
};
|
|
17823
17835
|
|
|
@@ -21491,18 +21503,23 @@ var MobileView = function (_a) {
|
|
|
21491
21503
|
}, jsx(VStack, {
|
|
21492
21504
|
gap: "x0"
|
|
21493
21505
|
}, links && links.map(function (item, i) {
|
|
21494
|
-
return isLinkType(item) ? jsx(Anchor, _extends({
|
|
21506
|
+
return isLinkType(item) ? typeof item.title === 'string' ? jsx(Anchor, _extends({
|
|
21495
21507
|
inset: {
|
|
21496
21508
|
horizontal: 'x3'
|
|
21497
21509
|
},
|
|
21498
21510
|
key: "pusher-anchor-" + i,
|
|
21499
21511
|
target: "_blank"
|
|
21500
21512
|
}, item, {
|
|
21513
|
+
title: item.title,
|
|
21501
21514
|
height: "70px",
|
|
21502
21515
|
display: "flex",
|
|
21503
21516
|
alignItems: "center",
|
|
21504
21517
|
style: borderBottom
|
|
21505
|
-
})) : jsx(
|
|
21518
|
+
})) : jsx(Anchor, {
|
|
21519
|
+
href: item.href,
|
|
21520
|
+
onClick: item.onClick,
|
|
21521
|
+
target: item.target
|
|
21522
|
+
}, item.title) : jsx(Div, {
|
|
21506
21523
|
cursor: "pointer",
|
|
21507
21524
|
display: "flex",
|
|
21508
21525
|
justifyContent: "space-between",
|
|
@@ -21575,7 +21592,7 @@ var AccordionSection = function (_a) {
|
|
|
21575
21592
|
body: jsx(Div, {
|
|
21576
21593
|
width: "100%"
|
|
21577
21594
|
}, links.map(function (link, i) {
|
|
21578
|
-
return jsx(Div, {
|
|
21595
|
+
return typeof link.title === 'string' ? jsx(Div, {
|
|
21579
21596
|
display: "flex",
|
|
21580
21597
|
alignItems: "center",
|
|
21581
21598
|
inset: {
|
|
@@ -21583,9 +21600,13 @@ var AccordionSection = function (_a) {
|
|
|
21583
21600
|
vertical: 'x1'
|
|
21584
21601
|
},
|
|
21585
21602
|
key: "accordion-section-" + i
|
|
21586
|
-
}, jsx(Anchor, _extends({
|
|
21603
|
+
}, jsx(Anchor, _extends({}, link, {
|
|
21604
|
+
title: link.title,
|
|
21587
21605
|
target: "_blank"
|
|
21588
|
-
}
|
|
21606
|
+
}))) : jsx(Anchor, {
|
|
21607
|
+
href: link.href,
|
|
21608
|
+
onClick: link.onClick
|
|
21609
|
+
}, link.title);
|
|
21589
21610
|
}))
|
|
21590
21611
|
};
|
|
21591
21612
|
}
|
|
@@ -21609,30 +21630,30 @@ var styles$6 = {
|
|
|
21609
21630
|
var templateObject_1$7;
|
|
21610
21631
|
|
|
21611
21632
|
var StaticNavigation = function (_a) {
|
|
21612
|
-
var _b;
|
|
21633
|
+
var _b, _c;
|
|
21613
21634
|
var accountSection = _a.accountSection,
|
|
21614
21635
|
logo = _a.logo,
|
|
21615
21636
|
links = _a.links,
|
|
21616
|
-
|
|
21617
|
-
zIndex =
|
|
21637
|
+
_d = _a.zIndex,
|
|
21638
|
+
zIndex = _d === void 0 ? 3 : _d,
|
|
21618
21639
|
openValueOverride = _a.openValueOverride,
|
|
21619
|
-
|
|
21620
|
-
drawerOffset =
|
|
21640
|
+
_e = _a.drawerOffset,
|
|
21641
|
+
drawerOffset = _e === void 0 ? 60 : _e,
|
|
21621
21642
|
isFrosted = _a.isFrosted,
|
|
21622
|
-
|
|
21623
|
-
var
|
|
21624
|
-
selectedTab =
|
|
21625
|
-
setSelectedTab =
|
|
21626
|
-
var
|
|
21627
|
-
isOpen =
|
|
21628
|
-
setIsOpen =
|
|
21629
|
-
var
|
|
21630
|
-
isMenuOpen =
|
|
21631
|
-
setIsMenuOpen =
|
|
21643
|
+
menuDropdownLinks = _a.menuDropdownLinks;
|
|
21644
|
+
var _f = useState(0),
|
|
21645
|
+
selectedTab = _f[0],
|
|
21646
|
+
setSelectedTab = _f[1];
|
|
21647
|
+
var _g = useState(false),
|
|
21648
|
+
isOpen = _g[0],
|
|
21649
|
+
setIsOpen = _g[1];
|
|
21650
|
+
var _h = React.useState(false),
|
|
21651
|
+
isMenuOpen = _h[0],
|
|
21652
|
+
setIsMenuOpen = _h[1];
|
|
21632
21653
|
var size = useDeviceSize().device;
|
|
21633
|
-
var
|
|
21634
|
-
ref =
|
|
21635
|
-
height =
|
|
21654
|
+
var _j = useResizeObserver(),
|
|
21655
|
+
ref = _j.ref,
|
|
21656
|
+
height = _j.height;
|
|
21636
21657
|
var hocs = useEntities().hocs;
|
|
21637
21658
|
var isDropdownLinkType = function (valueToCheck) {
|
|
21638
21659
|
var dropDownLink = valueToCheck;
|
|
@@ -21663,7 +21684,7 @@ var StaticNavigation = function (_a) {
|
|
|
21663
21684
|
alignItems: "center",
|
|
21664
21685
|
flexDirection: "row",
|
|
21665
21686
|
columnGap: "x1"
|
|
21666
|
-
},
|
|
21687
|
+
}, menuDropdownLinks && jsx(Div, {
|
|
21667
21688
|
maxWidth: "300px"
|
|
21668
21689
|
}, jsx("button", {
|
|
21669
21690
|
style: {
|
|
@@ -21681,14 +21702,21 @@ var StaticNavigation = function (_a) {
|
|
|
21681
21702
|
name: "promptingsIcon",
|
|
21682
21703
|
primaryColor: "primaryHeadingText",
|
|
21683
21704
|
size: "xSmall"
|
|
21684
|
-
}), jsx(
|
|
21705
|
+
}), jsx(Div, {
|
|
21706
|
+
style: {
|
|
21707
|
+
transform: isMenuOpen ? 'rotate(90deg)' : 'rotate(-90deg)',
|
|
21708
|
+
transition: 'transform 0.3s ease-in-out'
|
|
21709
|
+
}
|
|
21710
|
+
}, jsx(Icon, {
|
|
21685
21711
|
name: "chevron",
|
|
21686
|
-
orientation: 'down',
|
|
21687
21712
|
primaryColor: "primaryHeadingText",
|
|
21688
21713
|
size: "xSmall"
|
|
21689
|
-
}))), jsx(DropDownMenu,
|
|
21690
|
-
|
|
21691
|
-
|
|
21714
|
+
})))), jsx(DropDownMenu, {
|
|
21715
|
+
linkColumn: menuDropdownLinks.linkColumn,
|
|
21716
|
+
isOpen: isMenuOpen,
|
|
21717
|
+
top: (_b = menuDropdownLinks.top) !== null && _b !== void 0 ? _b : 40,
|
|
21718
|
+
left: menuDropdownLinks.left
|
|
21719
|
+
})), jsx(Logo, logo)), links && !isMobile && jsx(Flex, {
|
|
21692
21720
|
height: "100%",
|
|
21693
21721
|
width: "100%",
|
|
21694
21722
|
alignItems: "center",
|
|
@@ -21698,7 +21726,12 @@ var StaticNavigation = function (_a) {
|
|
|
21698
21726
|
inset: {
|
|
21699
21727
|
horizontal: size === 'large' ? 'x1' : 'x2'
|
|
21700
21728
|
}
|
|
21701
|
-
},
|
|
21729
|
+
}, 'href' in link && typeof link.title === 'string' ? jsx(NavigationLink, {
|
|
21730
|
+
title: link.title,
|
|
21731
|
+
isActive: selectedTab === index && isOpen,
|
|
21732
|
+
href: link.href,
|
|
21733
|
+
target: link.target
|
|
21734
|
+
}) : isDropdownLinkType(link) ? jsx(Div, {
|
|
21702
21735
|
onHoverStart: function () {
|
|
21703
21736
|
setIsOpen(true);
|
|
21704
21737
|
setSelectedTab(index);
|
|
@@ -21710,12 +21743,11 @@ var StaticNavigation = function (_a) {
|
|
|
21710
21743
|
}, jsx(NavigationLink, {
|
|
21711
21744
|
title: link.title,
|
|
21712
21745
|
isActive: selectedTab === index && isOpen
|
|
21713
|
-
})) : jsx(
|
|
21714
|
-
title: link.title,
|
|
21715
|
-
isActive: selectedTab === index && isOpen,
|
|
21746
|
+
})) : jsx(Anchor, {
|
|
21716
21747
|
href: link.href,
|
|
21748
|
+
onClick: link.onClick,
|
|
21717
21749
|
target: link.target
|
|
21718
|
-
}));
|
|
21750
|
+
}, link.title));
|
|
21719
21751
|
})), accountSection && jsx(Div, {
|
|
21720
21752
|
display: "flex"
|
|
21721
21753
|
}, accountSection)), jsx(Div, {
|
|
@@ -21732,7 +21764,7 @@ var StaticNavigation = function (_a) {
|
|
|
21732
21764
|
onClick: function () {
|
|
21733
21765
|
return setIsOpen(false);
|
|
21734
21766
|
},
|
|
21735
|
-
openValue: openValueOverride ? openValueOverride : (
|
|
21767
|
+
openValue: openValueOverride ? openValueOverride : (_c = height && height + 64 < 248 ? 248 : height && height + 64) !== null && _c !== void 0 ? _c : 280,
|
|
21736
21768
|
isTabHidden: true,
|
|
21737
21769
|
showTab: false,
|
|
21738
21770
|
zIndex: 10
|
|
@@ -21756,12 +21788,12 @@ var StaticNavigation = function (_a) {
|
|
|
21756
21788
|
onClick: featuredColumn.onClick,
|
|
21757
21789
|
href: featuredColumn.href,
|
|
21758
21790
|
target: featuredColumn.target
|
|
21759
|
-
}, jsx(Text, {
|
|
21791
|
+
}, typeof featuredColumn.title === 'string' ? jsx(Text, {
|
|
21760
21792
|
type: "body",
|
|
21761
21793
|
content: featuredColumn.title,
|
|
21762
21794
|
color: "primaryHeading",
|
|
21763
21795
|
weight: "semiBold"
|
|
21764
|
-
}));
|
|
21796
|
+
}) : featuredColumn.title);
|
|
21765
21797
|
})), jsx(Div, {
|
|
21766
21798
|
height: "160px"
|
|
21767
21799
|
}, jsx(Separator, {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
2
|
import { TextColor, IconType } from "../../exports/atoms";
|
|
3
|
-
import { LogoProps
|
|
3
|
+
import { LogoProps } from "../../exports/molecules";
|
|
4
4
|
export declare type Target = '_self' | '_blank' | '_parent' | '_top' | undefined;
|
|
5
5
|
export declare type Link = {
|
|
6
|
-
title:
|
|
6
|
+
title: React.ReactNode;
|
|
7
7
|
href: string;
|
|
8
8
|
onClick?: () => void;
|
|
9
9
|
icon?: IconType;
|
|
@@ -28,6 +28,10 @@ export declare type StaticNavigationProps = {
|
|
|
28
28
|
openValueOverride?: number;
|
|
29
29
|
drawerOffset?: number;
|
|
30
30
|
isFrosted?: boolean;
|
|
31
|
-
|
|
31
|
+
menuDropdownLinks?: {
|
|
32
|
+
linkColumn: LinkColumnType;
|
|
33
|
+
top?: number;
|
|
34
|
+
left?: number;
|
|
35
|
+
};
|
|
32
36
|
};
|
|
33
37
|
export declare const StaticNavigation: FC<StaticNavigationProps>;
|