@sendoutcards/quantum-design-ui 1.7.43 → 1.7.46
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 +82 -34
- package/dist/src/organisms/banner/banner.d.ts +1 -0
- package/dist/src/organisms/configurationCard/configurationCard.d.ts +7 -4
- package/dist/src/organisms/upsaleDialog/upsaleDialog.d.ts +14 -1
- package/dist/src/organisms/upsaleDialog/upsaleOptions.d.ts +14 -2
- package/dist/src/portfolios/soc/affiliateUpsalePromotionWidget/affiliateUpsalePromotionWidget.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -17176,12 +17176,20 @@ var Banner = function (_a) {
|
|
|
17176
17176
|
var icon = _a.icon,
|
|
17177
17177
|
message = _a.message,
|
|
17178
17178
|
status = _a.status,
|
|
17179
|
-
children = _a.children
|
|
17179
|
+
children = _a.children,
|
|
17180
|
+
_b = _a.outlined,
|
|
17181
|
+
outlined = _b === void 0 ? true : _b;
|
|
17180
17182
|
return jsx(Div, {
|
|
17181
17183
|
backgroundColor: {
|
|
17182
17184
|
swatch: status === 'success' ? 'success' : status === 'warning' ? 'warning' : 'danger',
|
|
17183
|
-
shade: 'base'
|
|
17185
|
+
shade: outlined ? '_1000' : 'base'
|
|
17184
17186
|
},
|
|
17187
|
+
borderWidth: outlined ? 'default' : undefined,
|
|
17188
|
+
borderStyle: outlined ? 'solid' : undefined,
|
|
17189
|
+
borderColor: outlined ? {
|
|
17190
|
+
swatch: status === 'success' ? 'success' : status === 'warning' ? 'warning' : 'danger',
|
|
17191
|
+
shade: 'base'
|
|
17192
|
+
} : undefined,
|
|
17185
17193
|
width: "100%",
|
|
17186
17194
|
inset: {
|
|
17187
17195
|
vertical: 'x2',
|
|
@@ -17200,10 +17208,10 @@ var Banner = function (_a) {
|
|
|
17200
17208
|
}, jsx(Icon, {
|
|
17201
17209
|
name: icon,
|
|
17202
17210
|
size: "small",
|
|
17203
|
-
primaryColor:
|
|
17211
|
+
primaryColor: outlined ? 'primaryBodyText' : 'inverseHeadingText'
|
|
17204
17212
|
})), message && jsx(Text, {
|
|
17205
17213
|
content: message,
|
|
17206
|
-
color:
|
|
17214
|
+
color: outlined ? 'primaryBody' : 'inverseHeading',
|
|
17207
17215
|
type: {
|
|
17208
17216
|
xSmall: 'footnote',
|
|
17209
17217
|
small: 'caption'
|
|
@@ -21535,26 +21543,29 @@ var ConfigurationCard = function (_a) {
|
|
|
21535
21543
|
stackedCardImage = _a.stackedCardImage,
|
|
21536
21544
|
layout = _a.layout,
|
|
21537
21545
|
_c = _a.type,
|
|
21538
|
-
type = _c === void 0 ? 'addon' : _c
|
|
21546
|
+
type = _c === void 0 ? 'addon' : _c,
|
|
21547
|
+
isFeatured = _a.isFeatured,
|
|
21548
|
+
_d = _a.backgroundColor,
|
|
21549
|
+
backgroundColor = _d === void 0 ? 'background' : _d;
|
|
21539
21550
|
|
|
21540
|
-
var
|
|
21541
|
-
isSelected =
|
|
21542
|
-
setIsSelected =
|
|
21551
|
+
var _e = useState(false),
|
|
21552
|
+
isSelected = _e[0],
|
|
21553
|
+
setIsSelected = _e[1];
|
|
21543
21554
|
|
|
21544
21555
|
var hasNoGraphic = graphic === 'none';
|
|
21545
21556
|
var width = useWindowSize().width;
|
|
21546
21557
|
var responsiveLayout = width < 420 ? 'vertical' : layout;
|
|
21547
21558
|
return jsx(Flex, {
|
|
21548
21559
|
onClick: function () {
|
|
21549
|
-
onSelect(configurationId);
|
|
21560
|
+
onSelect === null || onSelect === void 0 ? void 0 : onSelect(configurationId);
|
|
21550
21561
|
setIsSelected(!isSelected);
|
|
21551
21562
|
},
|
|
21552
21563
|
position: "relative",
|
|
21553
21564
|
boxShadow: "mediumDark",
|
|
21554
|
-
backgroundColor: graphic === 'none' && type !== 'upsale' ?
|
|
21565
|
+
backgroundColor: graphic === 'none' && type !== 'upsale' ? backgroundColor : type === 'upsale' ? isSelected ? {
|
|
21555
21566
|
swatch: 'primaryBrand',
|
|
21556
21567
|
shade: 'base'
|
|
21557
|
-
} :
|
|
21568
|
+
} : backgroundColor : backgroundColor,
|
|
21558
21569
|
cursor: "pointer",
|
|
21559
21570
|
inset: {
|
|
21560
21571
|
vertical: 'x4',
|
|
@@ -21575,14 +21586,14 @@ var ConfigurationCard = function (_a) {
|
|
|
21575
21586
|
name: "information",
|
|
21576
21587
|
size: "small",
|
|
21577
21588
|
primaryColor: "secondaryBrand"
|
|
21578
|
-
}) : type === 'upsale' && jsx(Capsule, {
|
|
21589
|
+
}) : type === 'upsale' && isFeatured ? jsx(Capsule, {
|
|
21579
21590
|
backgroundColor: !isSelected && type === 'upsale' ? {
|
|
21580
21591
|
swatch: 'primaryBrand',
|
|
21581
21592
|
shade: 'base'
|
|
21582
21593
|
} : 'background',
|
|
21583
21594
|
fontColor: isSelected && type === 'upsale' ? 'primaryBody' : 'inverseBody',
|
|
21584
21595
|
title: "Popular"
|
|
21585
|
-
})), jsx(Flex, {
|
|
21596
|
+
}) : jsx(React.Fragment, null)), jsx(Flex, {
|
|
21586
21597
|
justifyContent: "flex-start",
|
|
21587
21598
|
alignItems: "center",
|
|
21588
21599
|
width: "100%",
|
|
@@ -21598,7 +21609,7 @@ var ConfigurationCard = function (_a) {
|
|
|
21598
21609
|
height: 75,
|
|
21599
21610
|
stackCount: 5,
|
|
21600
21611
|
backgroundImage: stackedCardImage
|
|
21601
|
-
})) : !isSelected && type === 'upsale' ? jsx(Div, {
|
|
21612
|
+
})) : graphic === 'none' ? jsx(React.Fragment, null) : !isSelected && type === 'upsale' ? jsx(Div, {
|
|
21602
21613
|
width: "x3",
|
|
21603
21614
|
height: "x3",
|
|
21604
21615
|
borderRadius: "circle",
|
|
@@ -21623,10 +21634,7 @@ var ConfigurationCard = function (_a) {
|
|
|
21623
21634
|
color: isSelected && type === 'upsale' ? 'inverseBody' : 'primaryBody',
|
|
21624
21635
|
alignment: responsiveLayout ? 'center' : 'left',
|
|
21625
21636
|
weight: "bold",
|
|
21626
|
-
type:
|
|
21627
|
-
xSmall: 'largeBody',
|
|
21628
|
-
medium: 'subtitle'
|
|
21629
|
-
},
|
|
21637
|
+
type: "largeBody",
|
|
21630
21638
|
content: title
|
|
21631
21639
|
}), jsx(Text, {
|
|
21632
21640
|
color: isSelected && type === 'upsale' ? 'inverseBody' : 'primaryBody',
|
|
@@ -21640,20 +21648,20 @@ var ConfigurationCard = function (_a) {
|
|
|
21640
21648
|
outset: responsiveLayout ? 'x0' : {
|
|
21641
21649
|
left: 'auto'
|
|
21642
21650
|
},
|
|
21643
|
-
inset: "
|
|
21651
|
+
inset: "x_5",
|
|
21644
21652
|
alignItems: "center"
|
|
21645
21653
|
}, jsx(Text, {
|
|
21646
21654
|
color: isSelected && type === 'upsale' ? 'inverseBody' : 'primaryBody',
|
|
21647
|
-
weight: type === 'upsale' ? 'bold' : 'regular',
|
|
21648
21655
|
lineHeight: 1,
|
|
21656
|
+
weight: "semiBold",
|
|
21649
21657
|
inset: "0",
|
|
21650
|
-
type:
|
|
21651
|
-
content:
|
|
21658
|
+
type: "body",
|
|
21659
|
+
content: (typeof cost === 'number' ? "$" + cost.toFixed(2) : cost) + " "
|
|
21652
21660
|
}), jsx(Text, {
|
|
21653
21661
|
color: isSelected && type === 'upsale' ? 'inverseBody' : 'primaryBody',
|
|
21654
21662
|
lineHeight: 1,
|
|
21655
21663
|
inset: "0",
|
|
21656
|
-
type: "
|
|
21664
|
+
type: "body",
|
|
21657
21665
|
content: itemPriceTitle,
|
|
21658
21666
|
whiteSpace: "nowrap"
|
|
21659
21667
|
}))));
|
|
@@ -21667,7 +21675,11 @@ var UpsaleOptions = function (_a) {
|
|
|
21667
21675
|
showCheckoutView = _a.showCheckoutView,
|
|
21668
21676
|
handleShouldShowCheckoutView = _a.handleShouldShowCheckoutView,
|
|
21669
21677
|
children = _a.children,
|
|
21670
|
-
activeSelectedOption = _a.activeSelectedOption
|
|
21678
|
+
activeSelectedOption = _a.activeSelectedOption,
|
|
21679
|
+
extraLink = _a.extraLink,
|
|
21680
|
+
_b = _a.defaultNumOptionsShown,
|
|
21681
|
+
defaultNumOptionsShown = _b === void 0 ? selectableOptions.length : _b,
|
|
21682
|
+
submitAction = _a.submitAction;
|
|
21671
21683
|
var shouldShowCheckoutScreen = selectedOption && showCheckoutView;
|
|
21672
21684
|
return jsx(Div, {
|
|
21673
21685
|
height: "100%",
|
|
@@ -21713,17 +21725,34 @@ var UpsaleOptions = function (_a) {
|
|
|
21713
21725
|
isSelected: true
|
|
21714
21726
|
})), children) : jsx(VStack, {
|
|
21715
21727
|
gap: "x2"
|
|
21716
|
-
}, selectableOptions.
|
|
21728
|
+
}, selectableOptions.filter(function (_, index) {
|
|
21729
|
+
return index < defaultNumOptionsShown;
|
|
21730
|
+
}).map(function (option, index) {
|
|
21717
21731
|
var _a;
|
|
21718
21732
|
|
|
21719
21733
|
return jsx(RadioOptionCard, _extends({}, option, {
|
|
21720
21734
|
key: index,
|
|
21735
|
+
optionId: option.optionId,
|
|
21721
21736
|
onSelect: function () {
|
|
21722
21737
|
return handleSelectedOption(option.optionId);
|
|
21723
21738
|
},
|
|
21724
21739
|
isSelected: (_a = (activeSelectedOption && selectedOption) === option.optionId) !== null && _a !== void 0 ? _a : false
|
|
21725
21740
|
}));
|
|
21726
|
-
}))
|
|
21741
|
+
})), extraLink && jsx(Anchor, {
|
|
21742
|
+
title: extraLink.title,
|
|
21743
|
+
onClick: extraLink.onClick,
|
|
21744
|
+
href: extraLink.href,
|
|
21745
|
+
size: "small",
|
|
21746
|
+
color: "primaryBody",
|
|
21747
|
+
outset: "0 auto"
|
|
21748
|
+
}), submitAction && jsx(Button, {
|
|
21749
|
+
title: submitAction.title,
|
|
21750
|
+
type: submitAction.type,
|
|
21751
|
+
onClick: submitAction.onClick,
|
|
21752
|
+
fullWidth: submitAction.isFullWidth,
|
|
21753
|
+
disabled: submitAction.isDisabled,
|
|
21754
|
+
size: "large"
|
|
21755
|
+
}))));
|
|
21727
21756
|
};
|
|
21728
21757
|
|
|
21729
21758
|
var SOC_FRONT_Z_INDEX = 103;
|
|
@@ -21749,7 +21778,11 @@ var UpsaleDialog = function (_a) {
|
|
|
21749
21778
|
successComponent = _a.successComponent,
|
|
21750
21779
|
upsaleContentTitle = _a.upsaleContentTitle,
|
|
21751
21780
|
_c = _a.sponsorId,
|
|
21752
|
-
sponsorId = _c === void 0 ? '9070' : _c
|
|
21781
|
+
sponsorId = _c === void 0 ? '9070' : _c,
|
|
21782
|
+
extraLink = _a.extraLink,
|
|
21783
|
+
defaultNumOptionsShown = _a.defaultNumOptionsShown,
|
|
21784
|
+
submitAction = _a.submitAction,
|
|
21785
|
+
acceptSelectedAction = _a.acceptSelectedAction;
|
|
21753
21786
|
|
|
21754
21787
|
var _d = React.useState(false),
|
|
21755
21788
|
shouldShowCheckoutView = _d[0],
|
|
@@ -21771,6 +21804,15 @@ var UpsaleDialog = function (_a) {
|
|
|
21771
21804
|
};
|
|
21772
21805
|
|
|
21773
21806
|
var activeSelectedOption = findOption(selectedOption);
|
|
21807
|
+
|
|
21808
|
+
var handleOnClick = function () {
|
|
21809
|
+
if (acceptSelectedAction) {
|
|
21810
|
+
acceptSelectedAction.onClick();
|
|
21811
|
+
} else {
|
|
21812
|
+
setShouldShowCheckoutView(true);
|
|
21813
|
+
}
|
|
21814
|
+
};
|
|
21815
|
+
|
|
21774
21816
|
return jsx(Dialog, {
|
|
21775
21817
|
ref: ref,
|
|
21776
21818
|
isOpen: isOpen,
|
|
@@ -21844,7 +21886,14 @@ var UpsaleDialog = function (_a) {
|
|
|
21844
21886
|
handleShouldShowCheckoutView: function (value) {
|
|
21845
21887
|
return setShouldShowCheckoutView(value);
|
|
21846
21888
|
},
|
|
21847
|
-
activeSelectedOption: activeSelectedOption[0]
|
|
21889
|
+
activeSelectedOption: activeSelectedOption[0],
|
|
21890
|
+
extraLink: {
|
|
21891
|
+
title: extraLink === null || extraLink === void 0 ? void 0 : extraLink.title,
|
|
21892
|
+
onClick: extraLink === null || extraLink === void 0 ? void 0 : extraLink.onClick,
|
|
21893
|
+
href: extraLink === null || extraLink === void 0 ? void 0 : extraLink.href
|
|
21894
|
+
},
|
|
21895
|
+
defaultNumOptionsShown: defaultNumOptionsShown,
|
|
21896
|
+
submitAction: submitAction
|
|
21848
21897
|
}, children), !shouldShowCheckoutView && jsx(Flex, {
|
|
21849
21898
|
justifyContent: "center",
|
|
21850
21899
|
position: isMobile ? 'fixed' : 'relative',
|
|
@@ -21859,11 +21908,9 @@ var UpsaleDialog = function (_a) {
|
|
|
21859
21908
|
}, jsx(Button, {
|
|
21860
21909
|
type: 'primary',
|
|
21861
21910
|
size: "large",
|
|
21862
|
-
title: 'Continue to Checkout',
|
|
21911
|
+
title: acceptSelectedAction ? acceptSelectedAction.title : 'Continue to Checkout',
|
|
21863
21912
|
disabled: !selectedOption.length,
|
|
21864
|
-
onClick:
|
|
21865
|
-
return setShouldShowCheckoutView(true);
|
|
21866
|
-
}
|
|
21913
|
+
onClick: handleOnClick
|
|
21867
21914
|
}))), !isMobile && jsx(Div, {
|
|
21868
21915
|
width: "x3",
|
|
21869
21916
|
order: 2
|
|
@@ -22643,7 +22690,8 @@ var AffiliateUpsalePromotionWidget = function (_a) {
|
|
|
22643
22690
|
_b = _a.minWidth,
|
|
22644
22691
|
minWidth = _b === void 0 ? '320px' : _b,
|
|
22645
22692
|
_c = _a.width,
|
|
22646
|
-
width = _c === void 0 ? '100%' : _c
|
|
22693
|
+
width = _c === void 0 ? '100%' : _c,
|
|
22694
|
+
buttonOnclick = _a.buttonOnclick;
|
|
22647
22695
|
|
|
22648
22696
|
var openInNewTab = function (url) {
|
|
22649
22697
|
var newWindow = window.open(url, '_blank', 'noopener,noreferrer');
|
|
@@ -22659,7 +22707,7 @@ var AffiliateUpsalePromotionWidget = function (_a) {
|
|
|
22659
22707
|
title: title,
|
|
22660
22708
|
description: description,
|
|
22661
22709
|
buttonTitle: buttonTitle,
|
|
22662
|
-
buttonOnclick: function () {
|
|
22710
|
+
buttonOnclick: buttonOnclick ? buttonOnclick : function () {
|
|
22663
22711
|
return openInNewTab(url);
|
|
22664
22712
|
}
|
|
22665
22713
|
};
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
|
-
|
|
2
|
+
import { HOCColorKeysWithSwatch } from "../../helpers/hoc-types/entityValueTypes";
|
|
3
|
+
declare type ConfigurationCardType = 'addon' | 'info' | 'upsale';
|
|
3
4
|
export declare type ConfigurationCardProps = {
|
|
4
5
|
graphic?: 'blank' | 'addressed' | 'withStamp' | 'none' | React.ReactNode;
|
|
5
6
|
title: string;
|
|
6
|
-
description
|
|
7
|
+
description?: string;
|
|
7
8
|
cost?: number | string;
|
|
8
|
-
isSelected
|
|
9
|
-
onSelect
|
|
9
|
+
isSelected?: boolean;
|
|
10
|
+
onSelect?: (configurationId: string) => void;
|
|
10
11
|
configurationId: string;
|
|
11
12
|
itemPriceTitle?: string;
|
|
12
13
|
stackedCardImage?: string;
|
|
13
14
|
layout?: 'horizontal' | 'vertical';
|
|
14
15
|
type?: ConfigurationCardType;
|
|
16
|
+
isFeatured?: boolean;
|
|
17
|
+
backgroundColor?: HOCColorKeysWithSwatch;
|
|
15
18
|
};
|
|
16
19
|
export declare const ConfigurationCard: FC<ConfigurationCardProps>;
|
|
17
20
|
export {};
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
|
-
import { UpsaleOptionsType } from './upsaleOptions';
|
|
2
|
+
import { UpsaleOptionsType, SubmitOptionType } from './upsaleOptions';
|
|
3
3
|
import { Responsive, LiteralUnion, HOCSpacingKeys } from "../../helpers/hoc-types/entityValueTypes";
|
|
4
|
+
export declare type ExtraLinkType = {
|
|
5
|
+
title: string;
|
|
6
|
+
onClick?: () => void;
|
|
7
|
+
href?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare type AcceptSelectedOptionType = {
|
|
10
|
+
title: string;
|
|
11
|
+
onClick: () => void;
|
|
12
|
+
};
|
|
4
13
|
export declare type UpsaleDialogProps = {
|
|
5
14
|
title: string;
|
|
6
15
|
description: string;
|
|
@@ -19,5 +28,9 @@ export declare type UpsaleDialogProps = {
|
|
|
19
28
|
successComponent?: React.ReactNode;
|
|
20
29
|
upsaleContentTitle?: string;
|
|
21
30
|
sponsorId?: string;
|
|
31
|
+
extraLink?: ExtraLinkType;
|
|
32
|
+
defaultNumOptionsShown?: number;
|
|
33
|
+
submitAction?: SubmitOptionType;
|
|
34
|
+
acceptSelectedAction?: AcceptSelectedOptionType;
|
|
22
35
|
} & UpsaleOptionsType;
|
|
23
36
|
export declare const UpsaleDialog: FC<UpsaleDialogProps>;
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
|
+
import { AnchorProps } from "../../exports/atoms";
|
|
3
|
+
import { ButtonType } from "../../exports/molecules";
|
|
4
|
+
export declare type SubmitOptionType = {
|
|
5
|
+
title: string;
|
|
6
|
+
type?: ButtonType;
|
|
7
|
+
onClick: (optionId?: string) => void;
|
|
8
|
+
isFullWidth?: boolean;
|
|
9
|
+
isDisabled?: boolean;
|
|
10
|
+
};
|
|
2
11
|
export declare type UpsaleOptionType = {
|
|
3
12
|
title: string;
|
|
4
13
|
subtitle?: string;
|
|
@@ -13,9 +22,12 @@ export declare type UpsaleOptionsType = {
|
|
|
13
22
|
children: React.ReactNode;
|
|
14
23
|
activeSelectedOption?: UpsaleOptionType;
|
|
15
24
|
};
|
|
16
|
-
declare type UpsaleOptionsProps =
|
|
25
|
+
declare type UpsaleOptionsProps = {
|
|
17
26
|
showCheckoutView: boolean;
|
|
27
|
+
extraLink?: AnchorProps;
|
|
28
|
+
defaultNumOptionsShown?: number;
|
|
18
29
|
handleShouldShowCheckoutView: (value: boolean) => void;
|
|
19
|
-
|
|
30
|
+
submitAction?: SubmitOptionType;
|
|
31
|
+
} & UpsaleOptionsType;
|
|
20
32
|
export declare const UpsaleOptions: FC<UpsaleOptionsProps>;
|
|
21
33
|
export {};
|
package/dist/src/portfolios/soc/affiliateUpsalePromotionWidget/affiliateUpsalePromotionWidget.d.ts
CHANGED
|
@@ -3,5 +3,6 @@ export declare type AffiliateUpsalePromotionWidgetProps = {
|
|
|
3
3
|
type: 'customer' | 'freeAffiliate' | 'proAffiliate';
|
|
4
4
|
width?: string;
|
|
5
5
|
minWidth?: string;
|
|
6
|
+
buttonOnclick?: () => void;
|
|
6
7
|
};
|
|
7
8
|
export declare const AffiliateUpsalePromotionWidget: FC<AffiliateUpsalePromotionWidgetProps>;
|