@sendoutcards/quantum-design-ui 1.7.36 → 1.7.40
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 +143 -83
- package/dist/src/molecules/dialog/dialog.d.ts +1 -0
- package/dist/src/molecules/scrollable/scrollable.d.ts +1 -0
- package/dist/src/molecules/scrollable/styles.d.ts +1 -1
- package/dist/src/organisms/accordion/accordion.d.ts +3 -1
- package/dist/src/organisms/accordion/components/accordionHeading.d.ts +1 -1
- package/dist/src/organisms/upsaleDialog/upsaleDialog.d.ts +9 -2
- package/dist/src/organisms/upsaleDialog/upsaleOptions.d.ts +1 -9
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -13975,7 +13975,9 @@ var Dialog = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
13975
13975
|
closeButtonId = props.closeButtonId,
|
|
13976
13976
|
insetOverride = props.insetOverride,
|
|
13977
13977
|
height = props.height,
|
|
13978
|
-
children = props.children
|
|
13978
|
+
children = props.children,
|
|
13979
|
+
_c = props.shouldScroll,
|
|
13980
|
+
shouldScroll = _c === void 0 ? false : _c;
|
|
13979
13981
|
return jsx(AnimatePresence, null, isOpen && jsx(Overlay, {
|
|
13980
13982
|
variants: overlayVariants,
|
|
13981
13983
|
animate: isOpen ? 'open' : 'closed',
|
|
@@ -14000,10 +14002,16 @@ var Dialog = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
14000
14002
|
maxHeight: maxHeight,
|
|
14001
14003
|
width: isFullScreen ? '100%' : undefined,
|
|
14002
14004
|
height: isFullScreen ? 'calc(100vh - 16px )' : height
|
|
14005
|
+
}, shouldScroll ? jsx(Div, {
|
|
14006
|
+
height: 'calc(100vh - 32px)',
|
|
14007
|
+
overflowY: "auto"
|
|
14003
14008
|
}, children, onClose && jsx(CloseButton, {
|
|
14004
14009
|
id: closeButtonId,
|
|
14005
14010
|
onClose: onClose
|
|
14006
|
-
}))
|
|
14011
|
+
})) : jsx(React.Fragment, null, children, onClose && jsx(CloseButton, {
|
|
14012
|
+
id: closeButtonId,
|
|
14013
|
+
onClose: onClose
|
|
14014
|
+
})))));
|
|
14007
14015
|
});
|
|
14008
14016
|
|
|
14009
14017
|
var _emotionSourceMap5$2 = process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFZMEMiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgX19tYWtlVGVtcGxhdGVPYmplY3QgfSBmcm9tIFwidHNsaWJcIjtcclxuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vY29yZSc7XHJcbmV4cG9ydCBkZWZhdWx0IHtcclxuICAgIHNlbGVjdENvbnRhaW5lcjogY3NzKHRlbXBsYXRlT2JqZWN0XzEgfHwgKHRlbXBsYXRlT2JqZWN0XzEgPSBfX21ha2VUZW1wbGF0ZU9iamVjdChbXCJcXG4gICAgZGlzcGxheTogZmxleDtcXG4gICAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7XFxuICAgIGZsZXgtZGlyZWN0aW9uOiBjb2x1bW47XFxuICAgIHdpZHRoOiAxMDAlO1xcbiAgICBwb3NpdGlvbjogcmVsYXRpdmU7XFxuICBcIl0sIFtcIlxcbiAgICBkaXNwbGF5OiBmbGV4O1xcbiAgICBqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcXG4gICAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcXG4gICAgd2lkdGg6IDEwMCU7XFxuICAgIHBvc2l0aW9uOiByZWxhdGl2ZTtcXG4gIFwiXSkpKSxcclxuICAgIHNlbGVjdEJvZHk6IGZ1bmN0aW9uIChzZWxlY3RIZWlnaHQsIHNlbGVjdFdpZHRoKSB7IHJldHVybiB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GluZ1VSTD1zdHlsZXMuanMubWFwIl19 */";
|
|
@@ -14443,16 +14451,20 @@ var Checkbox = function (_a) {
|
|
|
14443
14451
|
}))));
|
|
14444
14452
|
};
|
|
14445
14453
|
|
|
14446
|
-
var _emotionSourceMap$s = process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
14454
|
+
var _emotionSourceMap$s = process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFHMEQiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgX19tYWtlVGVtcGxhdGVPYmplY3QgfSBmcm9tIFwidHNsaWJcIjtcclxuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vY29yZSc7XHJcbmV4cG9ydCBkZWZhdWx0IHtcclxuICAgIHNjcm9sbGFibGVDb250YWluZXI6IGZ1bmN0aW9uIChoYXNTY3JvbGxCYXIpIHsgcmV0dXJuIGNzcyh0ZW1wbGF0ZU9iamVjdF8xIHx8ICh0ZW1wbGF0ZU9iamVjdF8xID0gX19tYWtlVGVtcGxhdGVPYmplY3QoW1wiXFxuICAgIDo6LXdlYmtpdC1zY3JvbGxiYXIge1xcbiAgICAgIGRpc3BsYXk6IFwiLCBcIjtcXG4gICAgfVxcbiAgXCJdLCBbXCJcXG4gICAgOjotd2Via2l0LXNjcm9sbGJhciB7XFxuICAgICAgZGlzcGxheTogXCIsIFwiO1xcbiAgICB9XFxuICBcIl0pKSwgaGFzU2Nyb2xsQmFyID8gJ2F1dG8nIDogJ25vbmUnKTsgfSxcclxufTtcclxudmFyIHRlbXBsYXRlT2JqZWN0XzE7XHJcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPXN0eWxlcy5qcy5tYXAiXX0= */";
|
|
14447
14455
|
var styles$r = {
|
|
14448
|
-
scrollableContainer:
|
|
14456
|
+
scrollableContainer: function (hasScrollBar) {
|
|
14457
|
+
return /*#__PURE__*/css(templateObject_1$s || (templateObject_1$s = __makeTemplateObject(["\n ::-webkit-scrollbar {\n display: ", ";\n }\n " + _emotionSourceMap$s], ["\n ::-webkit-scrollbar {\n display: ", ";\n }\n " + _emotionSourceMap$s])), hasScrollBar ? 'auto' : 'none');
|
|
14458
|
+
}
|
|
14449
14459
|
};
|
|
14450
14460
|
var templateObject_1$s;
|
|
14451
14461
|
|
|
14452
14462
|
var Scrollable = function (_a) {
|
|
14453
14463
|
var maxHeight = _a.maxHeight,
|
|
14454
14464
|
onChange = _a.onChange,
|
|
14455
|
-
children = _a.children
|
|
14465
|
+
children = _a.children,
|
|
14466
|
+
_b = _a.hasScrollBar,
|
|
14467
|
+
hasScrollBar = _b === void 0 ? true : _b;
|
|
14456
14468
|
var ref = useRef(null);
|
|
14457
14469
|
var elementScroll = useElementScroll(ref);
|
|
14458
14470
|
var scrollYProgress = (process.env.NODE_ENV === 'test' ? {
|
|
@@ -14481,7 +14493,7 @@ var Scrollable = function (_a) {
|
|
|
14481
14493
|
bottom: 'x2'
|
|
14482
14494
|
},
|
|
14483
14495
|
overflow: "auto",
|
|
14484
|
-
css: styles$r.scrollableContainer
|
|
14496
|
+
css: styles$r.scrollableContainer(hasScrollBar)
|
|
14485
14497
|
}, children);
|
|
14486
14498
|
};
|
|
14487
14499
|
|
|
@@ -17593,7 +17605,9 @@ var templateObject_1$e, templateObject_2$5;
|
|
|
17593
17605
|
|
|
17594
17606
|
var AccordionContent = function (_a) {
|
|
17595
17607
|
var children = _a.children,
|
|
17596
|
-
onAnimationComplete = _a.onAnimationComplete
|
|
17608
|
+
onAnimationComplete = _a.onAnimationComplete,
|
|
17609
|
+
_b = _a.inset,
|
|
17610
|
+
inset = _b === void 0 ? 'x2_5' : _b;
|
|
17597
17611
|
return jsx(Div, {
|
|
17598
17612
|
key: "content",
|
|
17599
17613
|
initial: "collapsed",
|
|
@@ -17617,7 +17631,7 @@ var AccordionContent = function (_a) {
|
|
|
17617
17631
|
css: styles$e.accordionBody,
|
|
17618
17632
|
onAnimationComplete: onAnimationComplete
|
|
17619
17633
|
}, jsx(Flex, {
|
|
17620
|
-
inset:
|
|
17634
|
+
inset: inset !== null && inset !== void 0 ? inset : inset,
|
|
17621
17635
|
justifyContent: "flex-start",
|
|
17622
17636
|
alignItems: "center",
|
|
17623
17637
|
variants: {
|
|
@@ -17659,8 +17673,9 @@ var AccordionHeading = function (_a) {
|
|
|
17659
17673
|
var children = _a.children,
|
|
17660
17674
|
eventKey = _a.eventKey,
|
|
17661
17675
|
headingSize = _a.headingSize,
|
|
17662
|
-
|
|
17663
|
-
|
|
17676
|
+
onHeadingClick = _a.onHeadingClick,
|
|
17677
|
+
_b = _a.arrowLocation,
|
|
17678
|
+
arrowLocation = _b === void 0 ? 'right' : _b;
|
|
17664
17679
|
var context = useContext(AccordionContext);
|
|
17665
17680
|
var isActive = context.activeIndexes.some(function (i) {
|
|
17666
17681
|
return i === eventKey;
|
|
@@ -17703,8 +17718,9 @@ var AccordionHeading = function (_a) {
|
|
|
17703
17718
|
cursor: "pointer",
|
|
17704
17719
|
inset: "x1_5",
|
|
17705
17720
|
position: "relative",
|
|
17706
|
-
zIndex: 5
|
|
17707
|
-
|
|
17721
|
+
zIndex: 5,
|
|
17722
|
+
flexDirection: arrowLocation === 'left' ? 'row' : 'row-reverse'
|
|
17723
|
+
}, arrowLocation !== 'none' && jsx(Span, {
|
|
17708
17724
|
cursor: "pointer",
|
|
17709
17725
|
display: "flex",
|
|
17710
17726
|
justifyContent: "center",
|
|
@@ -17733,11 +17749,15 @@ var Accordion = function (_a) {
|
|
|
17733
17749
|
_d = _a.isExclusive,
|
|
17734
17750
|
isExclusive = _d === void 0 ? false : _d,
|
|
17735
17751
|
background = _a.background,
|
|
17736
|
-
_e = _a.
|
|
17737
|
-
|
|
17738
|
-
|
|
17739
|
-
|
|
17740
|
-
|
|
17752
|
+
_e = _a.isHeadingBackgroundInverse,
|
|
17753
|
+
isHeadingBackgroundInverse = _e === void 0 ? false : _e,
|
|
17754
|
+
stateOverride = _a.stateOverride,
|
|
17755
|
+
_f = _a.inset,
|
|
17756
|
+
inset = _f === void 0 ? {
|
|
17757
|
+
vertical: 'x2',
|
|
17758
|
+
horizontal: 'x1'
|
|
17759
|
+
} : _f,
|
|
17760
|
+
arrowLocation = _a.arrowLocation;
|
|
17741
17761
|
var defaultActiveIndexes = isExclusive ? defaultActiveKeys ? [defaultActiveKeys[0]] : [-1] : defaultActiveKeys ? __spreadArrays(defaultActiveKeys) : [-1];
|
|
17742
17762
|
|
|
17743
17763
|
var _g = useState(defaultActiveIndexes),
|
|
@@ -17753,10 +17773,7 @@ var Accordion = function (_a) {
|
|
|
17753
17773
|
return jsx(Div, {
|
|
17754
17774
|
backgroundColor: background,
|
|
17755
17775
|
borderRadius: "medium",
|
|
17756
|
-
inset:
|
|
17757
|
-
vertical: 'x2',
|
|
17758
|
-
horizontal: 'x1'
|
|
17759
|
-
}
|
|
17776
|
+
inset: inset
|
|
17760
17777
|
}, jsx(AccordionContext.Provider, {
|
|
17761
17778
|
value: {
|
|
17762
17779
|
activeIndexes: (_b = stateOverride === null || stateOverride === void 0 ? void 0 : stateOverride.activeIndexes) !== null && _b !== void 0 ? _b : activeIndexes,
|
|
@@ -17770,7 +17787,7 @@ var Accordion = function (_a) {
|
|
|
17770
17787
|
css: styles$e.accordionContainer
|
|
17771
17788
|
}, jsx(AccordionHeading, {
|
|
17772
17789
|
eventKey: section.key,
|
|
17773
|
-
|
|
17790
|
+
arrowLocation: arrowLocation,
|
|
17774
17791
|
isBackgroundInverse: isHeadingBackgroundInverse,
|
|
17775
17792
|
onHeadingClick: section.onHeadingClick
|
|
17776
17793
|
}, section.heading), jsx(AccordionBody, {
|
|
@@ -21521,15 +21538,8 @@ var UpsaleOptions = function (_a) {
|
|
|
21521
21538
|
removeSelectedOption = _a.removeSelectedOption,
|
|
21522
21539
|
showCheckoutView = _a.showCheckoutView,
|
|
21523
21540
|
handleShouldShowCheckoutView = _a.handleShouldShowCheckoutView,
|
|
21524
|
-
children = _a.children
|
|
21525
|
-
|
|
21526
|
-
var findOption = function (selectedOption) {
|
|
21527
|
-
return selectableOptions.filter(function (option) {
|
|
21528
|
-
return option.optionId === selectedOption;
|
|
21529
|
-
});
|
|
21530
|
-
};
|
|
21531
|
-
|
|
21532
|
-
var activeSelectedOption = findOption(selectedOption);
|
|
21541
|
+
children = _a.children,
|
|
21542
|
+
activeSelectedOption = _a.activeSelectedOption;
|
|
21533
21543
|
var shouldShowCheckoutScreen = selectedOption && showCheckoutView;
|
|
21534
21544
|
return jsx(Div, {
|
|
21535
21545
|
height: "100%",
|
|
@@ -21537,6 +21547,9 @@ var UpsaleOptions = function (_a) {
|
|
|
21537
21547
|
width: "100%"
|
|
21538
21548
|
}, jsx(Div, null, shouldShowCheckoutScreen && // Back Button
|
|
21539
21549
|
jsx(Div, {
|
|
21550
|
+
outset: {
|
|
21551
|
+
top: 'x4'
|
|
21552
|
+
},
|
|
21540
21553
|
position: "relative",
|
|
21541
21554
|
bottom: "25px",
|
|
21542
21555
|
right: "7px",
|
|
@@ -21568,33 +21581,21 @@ var UpsaleOptions = function (_a) {
|
|
|
21568
21581
|
space: "x2"
|
|
21569
21582
|
})), jsx(VStack, {
|
|
21570
21583
|
gap: "x2"
|
|
21571
|
-
}, shouldShowCheckoutScreen ? jsx(Div, null, jsx(RadioOptionCard, _extends({}, activeSelectedOption
|
|
21584
|
+
}, shouldShowCheckoutScreen && activeSelectedOption ? jsx(Div, null, jsx(RadioOptionCard, _extends({}, activeSelectedOption, {
|
|
21572
21585
|
isSelected: true
|
|
21573
21586
|
})), children) : jsx(VStack, {
|
|
21574
21587
|
gap: "x2"
|
|
21575
21588
|
}, selectableOptions.map(function (option, index) {
|
|
21589
|
+
var _a;
|
|
21590
|
+
|
|
21576
21591
|
return jsx(RadioOptionCard, _extends({}, option, {
|
|
21577
21592
|
key: index,
|
|
21578
21593
|
onSelect: function () {
|
|
21579
21594
|
return handleSelectedOption(option.optionId);
|
|
21580
21595
|
},
|
|
21581
|
-
isSelected: activeSelectedOption && selectedOption === option.optionId
|
|
21596
|
+
isSelected: (_a = (activeSelectedOption && selectedOption) === option.optionId) !== null && _a !== void 0 ? _a : false
|
|
21582
21597
|
}));
|
|
21583
|
-
})))
|
|
21584
|
-
width: '100%',
|
|
21585
|
-
justifyContent: "center",
|
|
21586
|
-
alignItems: "center",
|
|
21587
|
-
style: {
|
|
21588
|
-
margin: '1.5rem auto'
|
|
21589
|
-
}
|
|
21590
|
-
}, jsx(Button, {
|
|
21591
|
-
size: "large",
|
|
21592
|
-
title: "Continue to Checkout",
|
|
21593
|
-
disabled: !activeSelectedOption.length,
|
|
21594
|
-
onClick: function () {
|
|
21595
|
-
return handleShouldShowCheckoutView(!!activeSelectedOption.length);
|
|
21596
|
-
}
|
|
21597
|
-
}))));
|
|
21598
|
+
})))));
|
|
21598
21599
|
};
|
|
21599
21600
|
|
|
21600
21601
|
var SOC_FRONT_Z_INDEX = 103;
|
|
@@ -21604,14 +21605,10 @@ var UpsaleDialog = function (_a) {
|
|
|
21604
21605
|
checkoutTitle = _a.checkoutTitle,
|
|
21605
21606
|
checkoutDescription = _a.checkoutDescription,
|
|
21606
21607
|
selectableOptions = _a.selectableOptions,
|
|
21607
|
-
numSelectableOptionsShown = _a.numSelectableOptionsShown,
|
|
21608
21608
|
isOpen = _a.isOpen,
|
|
21609
21609
|
setIsDialogOpen = _a.setIsDialogOpen,
|
|
21610
|
-
_b = _a.optionFormLocation,
|
|
21611
|
-
optionFormLocation = _b === void 0 ? 'right' : _b,
|
|
21612
21610
|
submitAction = _a.submitAction,
|
|
21613
21611
|
upsaleContent = _a.upsaleContent,
|
|
21614
|
-
extraLink = _a.extraLink,
|
|
21615
21612
|
children = _a.children,
|
|
21616
21613
|
selectedOption = _a.selectedOption,
|
|
21617
21614
|
handleSelectedOption = _a.handleSelectedOption,
|
|
@@ -21619,10 +21616,13 @@ var UpsaleDialog = function (_a) {
|
|
|
21619
21616
|
insetOverride = _a.insetOverride,
|
|
21620
21617
|
maxWidth = _a.maxWidth,
|
|
21621
21618
|
maxHeight = _a.maxHeight,
|
|
21622
|
-
|
|
21623
|
-
zIndex =
|
|
21619
|
+
_b = _a.zIndex,
|
|
21620
|
+
zIndex = _b === void 0 ? SOC_FRONT_Z_INDEX : _b,
|
|
21624
21621
|
//Soc-frontend
|
|
21625
|
-
successComponent = _a.successComponent
|
|
21622
|
+
successComponent = _a.successComponent,
|
|
21623
|
+
upsaleContentTitle = _a.upsaleContentTitle,
|
|
21624
|
+
_c = _a.sponsorId,
|
|
21625
|
+
sponsorId = _c === void 0 ? '9070' : _c;
|
|
21626
21626
|
|
|
21627
21627
|
var _d = React.useState(false),
|
|
21628
21628
|
shouldShowCheckoutView = _d[0],
|
|
@@ -21636,6 +21636,14 @@ var UpsaleDialog = function (_a) {
|
|
|
21636
21636
|
var dialogFooterHeight = '170px';
|
|
21637
21637
|
var device = useWindowSize().width;
|
|
21638
21638
|
var isMobile = device <= 910;
|
|
21639
|
+
|
|
21640
|
+
var findOption = function (selectedOption) {
|
|
21641
|
+
return selectableOptions.filter(function (option) {
|
|
21642
|
+
return option.optionId === selectedOption;
|
|
21643
|
+
});
|
|
21644
|
+
};
|
|
21645
|
+
|
|
21646
|
+
var activeSelectedOption = findOption(selectedOption);
|
|
21639
21647
|
return jsx(Dialog, {
|
|
21640
21648
|
ref: ref,
|
|
21641
21649
|
isOpen: isOpen,
|
|
@@ -21646,7 +21654,8 @@ var UpsaleDialog = function (_a) {
|
|
|
21646
21654
|
insetOverride: insetOverride,
|
|
21647
21655
|
maxWidth: maxWidth,
|
|
21648
21656
|
maxHeight: maxHeight,
|
|
21649
|
-
height: isMobile ? 'unset' : '80%'
|
|
21657
|
+
height: isMobile ? 'unset' : '80%',
|
|
21658
|
+
shouldScroll: true
|
|
21650
21659
|
}, successComponent ? jsx(Flex, {
|
|
21651
21660
|
width: width + "px",
|
|
21652
21661
|
height: height + "px",
|
|
@@ -21688,17 +21697,17 @@ var UpsaleDialog = function (_a) {
|
|
|
21688
21697
|
overflowY: "hidden",
|
|
21689
21698
|
flexDirection: isMobile ? 'column' : 'row'
|
|
21690
21699
|
}, jsx(Flex, {
|
|
21700
|
+
flexWrap: "wrap",
|
|
21691
21701
|
inset: {
|
|
21692
21702
|
top: 'x3',
|
|
21693
21703
|
horizontal: 'x3'
|
|
21694
21704
|
},
|
|
21695
21705
|
overflowY: "auto",
|
|
21696
21706
|
width: isMobile ? '100%' : 'calc(50% - 12px)',
|
|
21697
|
-
order:
|
|
21707
|
+
order: 3
|
|
21698
21708
|
}, jsx(UpsaleOptions, {
|
|
21699
21709
|
selectableOptions: selectableOptions,
|
|
21700
21710
|
selectedOption: selectedOption,
|
|
21701
|
-
submitAction: submitAction,
|
|
21702
21711
|
handleSelectedOption: function (optionId) {
|
|
21703
21712
|
return handleSelectedOption(optionId);
|
|
21704
21713
|
},
|
|
@@ -21707,23 +21716,74 @@ var UpsaleDialog = function (_a) {
|
|
|
21707
21716
|
handleShouldShowCheckoutView: function (value) {
|
|
21708
21717
|
return setShouldShowCheckoutView(value);
|
|
21709
21718
|
},
|
|
21710
|
-
|
|
21711
|
-
|
|
21712
|
-
|
|
21719
|
+
activeSelectedOption: activeSelectedOption[0]
|
|
21720
|
+
}, children), jsx(Flex, {
|
|
21721
|
+
justifyContent: "center",
|
|
21722
|
+
position: isMobile ? 'fixed' : 'relative',
|
|
21723
|
+
bottom: isMobile ? '0' : 'unset',
|
|
21724
|
+
height: "100px",
|
|
21725
|
+
alignItems: "center",
|
|
21726
|
+
width: "100%",
|
|
21727
|
+
backgroundColor: isMobile ? 'foreground' : undefined,
|
|
21728
|
+
boxShadow: isMobile ? 'mediumDark' : undefined,
|
|
21729
|
+
zIndex: SOC_FRONT_Z_INDEX,
|
|
21730
|
+
left: "0"
|
|
21731
|
+
}, jsx(Button, {
|
|
21732
|
+
type: shouldShowCheckoutView && submitAction.type ? submitAction.type : 'primary',
|
|
21733
|
+
size: "large",
|
|
21734
|
+
title: shouldShowCheckoutView ? submitAction.title : 'Continue to Checkout',
|
|
21735
|
+
disabled: shouldShowCheckoutView ? submitAction.isDisabled : !selectedOption.length,
|
|
21736
|
+
onClick: shouldShowCheckoutView && submitAction ? function () {
|
|
21737
|
+
return submitAction.onClick();
|
|
21738
|
+
} : function () {
|
|
21739
|
+
return setShouldShowCheckoutView(true);
|
|
21740
|
+
}
|
|
21741
|
+
}))), !isMobile && jsx(Div, {
|
|
21713
21742
|
width: "x3",
|
|
21714
21743
|
order: 2
|
|
21715
21744
|
}), jsx(Flex, {
|
|
21716
21745
|
overflowY: "auto",
|
|
21717
21746
|
width: isMobile ? '100%' : 'calc(50% - 12px)',
|
|
21718
|
-
order:
|
|
21719
|
-
},
|
|
21747
|
+
order: 1
|
|
21748
|
+
}, jsx(Div, {
|
|
21749
|
+
width: "100%"
|
|
21750
|
+
}, jsx(Accordion, {
|
|
21751
|
+
defaultActiveKeys: [1],
|
|
21752
|
+
arrowLocation: "right",
|
|
21753
|
+
background: "background",
|
|
21754
|
+
inset: "x0",
|
|
21755
|
+
isExclusive: true,
|
|
21756
|
+
sections: [{
|
|
21757
|
+
body: jsx(React.Fragment, null, upsaleContent),
|
|
21758
|
+
heading: jsx(Div, {
|
|
21759
|
+
width: "100%",
|
|
21760
|
+
display: "flex",
|
|
21761
|
+
justifyContent: "space-between",
|
|
21762
|
+
alignItems: "center"
|
|
21763
|
+
}, jsx(Text, {
|
|
21764
|
+
weight: "bold",
|
|
21765
|
+
type: "caption",
|
|
21766
|
+
content: upsaleContentTitle
|
|
21767
|
+
}), jsx(Div, {
|
|
21768
|
+
width: "34px",
|
|
21769
|
+
height: "34px",
|
|
21770
|
+
borderRadius: "small",
|
|
21771
|
+
backgroundSize: "cover",
|
|
21772
|
+
backgroundPosition: "center",
|
|
21773
|
+
outset: {
|
|
21774
|
+
right: 'x2'
|
|
21775
|
+
}
|
|
21776
|
+
})),
|
|
21777
|
+
key: 1
|
|
21778
|
+
}]
|
|
21779
|
+
}))))), jsx(Div, {
|
|
21720
21780
|
backgroundColor: "foreground",
|
|
21721
21781
|
width: device <= 1367 ? '100%' : 'calc(100% - 10rem)',
|
|
21722
|
-
position:
|
|
21723
|
-
|
|
21782
|
+
position: isMobile ? 'relative' : 'absolute',
|
|
21783
|
+
bottom: isMobile ? dialogFooterHeight : 'x0',
|
|
21784
|
+
inset: isMobile ? 'x1' : {
|
|
21724
21785
|
bottom: 'x4'
|
|
21725
21786
|
},
|
|
21726
|
-
bottom: '0px',
|
|
21727
21787
|
left: "50%",
|
|
21728
21788
|
transform: "translateX(-50%)"
|
|
21729
21789
|
}, jsx(Separator, {
|
|
@@ -21744,7 +21804,7 @@ var UpsaleDialog = function (_a) {
|
|
|
21744
21804
|
size: "medium",
|
|
21745
21805
|
title: "Send a Free Postcard",
|
|
21746
21806
|
onClick: function () {
|
|
21747
|
-
return
|
|
21807
|
+
return window.open("https://www.sendoutcards.com/" + sponsorId + "/send/");
|
|
21748
21808
|
}
|
|
21749
21809
|
})))));
|
|
21750
21810
|
};
|
|
@@ -21754,7 +21814,7 @@ var ComparisonIncludesList = function (_a) {
|
|
|
21754
21814
|
isMinified = _a.isMinified;
|
|
21755
21815
|
return jsx(Card, {
|
|
21756
21816
|
backgroundColor: "background",
|
|
21757
|
-
inset: '
|
|
21817
|
+
inset: '1.5rem'
|
|
21758
21818
|
}, jsx(Div, {
|
|
21759
21819
|
width: "100%"
|
|
21760
21820
|
}, jsx(VStack, {
|
|
@@ -22898,27 +22958,27 @@ var PaperTypeModal = function (_a) {
|
|
|
22898
22958
|
};
|
|
22899
22959
|
|
|
22900
22960
|
var comparisonItems37 = [{
|
|
22961
|
+
title: '30 Monthly Card Sends (includes both Heartfelt and System Sends)',
|
|
22962
|
+
description: '$1.75 for each additional card over 30. Postage not included on any card sends',
|
|
22963
|
+
isIncluded: true
|
|
22964
|
+
}, {
|
|
22901
22965
|
title: 'Contact Manager',
|
|
22902
22966
|
description: 'Keep track of birthdays, special occasions, reminders, include notes if you choose, and get a history of every card sent.',
|
|
22903
22967
|
isIncluded: true
|
|
22904
22968
|
}, {
|
|
22905
|
-
title: '
|
|
22969
|
+
title: 'Unlimited Photo Postcards',
|
|
22906
22970
|
description: 'Send Unlimited 4x6 postcards - stamps included, mailed out when you hit SEND!',
|
|
22907
22971
|
isIncluded: false
|
|
22908
22972
|
}, {
|
|
22909
|
-
title: '
|
|
22973
|
+
title: 'Unlimited Heartfelt Prompting cards',
|
|
22910
22974
|
description: 'Send unlimited 5x7 greeting cards, stamps included. Mailed for you. Immediately!',
|
|
22911
22975
|
isIncluded: false
|
|
22912
22976
|
}, {
|
|
22913
|
-
title: '
|
|
22914
|
-
description: 'Our Automated sending process does all the work for you, schedule, send to one or multiple people, even take advantage of our drip campaign feature!',
|
|
22915
|
-
isIncluded: false
|
|
22916
|
-
}, {
|
|
22917
|
-
title: '30% off gifts',
|
|
22977
|
+
title: '20% off gifts',
|
|
22918
22978
|
description: '',
|
|
22919
|
-
isIncluded:
|
|
22979
|
+
isIncluded: true
|
|
22920
22980
|
}, {
|
|
22921
|
-
title: '30% shipping',
|
|
22981
|
+
title: '30% off shipping',
|
|
22922
22982
|
description: '',
|
|
22923
22983
|
isIncluded: false
|
|
22924
22984
|
}];
|
|
@@ -22943,7 +23003,7 @@ var comparisonItems97 = [{
|
|
|
22943
23003
|
description: '',
|
|
22944
23004
|
isIncluded: true
|
|
22945
23005
|
}, {
|
|
22946
|
-
title: '30% shipping',
|
|
23006
|
+
title: '30% off shipping',
|
|
22947
23007
|
description: '',
|
|
22948
23008
|
isIncluded: true
|
|
22949
23009
|
}];
|
|
@@ -22954,21 +23014,22 @@ var SubscriptionUpsaleDialog = function (_a) {
|
|
|
22954
23014
|
checkoutTitle = _a.checkoutTitle,
|
|
22955
23015
|
checkoutDescription = _a.checkoutDescription,
|
|
22956
23016
|
selectableOptions = _a.selectableOptions,
|
|
22957
|
-
|
|
23017
|
+
upsaleContentTitle = _a.upsaleContentTitle,
|
|
22958
23018
|
isOpen = _a.isOpen,
|
|
22959
23019
|
setIsDialogOpen = _a.setIsDialogOpen,
|
|
22960
23020
|
_b = _a.optionFormLocation,
|
|
22961
23021
|
optionFormLocation = _b === void 0 ? 'right' : _b,
|
|
22962
23022
|
submitAction = _a.submitAction,
|
|
22963
|
-
extraLink = _a.extraLink,
|
|
22964
23023
|
children = _a.children,
|
|
22965
23024
|
selectedOption = _a.selectedOption,
|
|
22966
23025
|
removeSelectedOption = _a.removeSelectedOption,
|
|
22967
23026
|
successComponent = _a.successComponent,
|
|
22968
23027
|
insetOverride = _a.insetOverride,
|
|
22969
|
-
handleSelectedOption = _a.handleSelectedOption
|
|
23028
|
+
handleSelectedOption = _a.handleSelectedOption,
|
|
23029
|
+
sponsorId = _a.sponsorId;
|
|
22970
23030
|
var device = useWindowSize().width;
|
|
22971
23031
|
return jsx("div", null, jsx(UpsaleDialog, {
|
|
23032
|
+
sponsorId: sponsorId,
|
|
22972
23033
|
title: title,
|
|
22973
23034
|
description: description,
|
|
22974
23035
|
checkoutTitle: checkoutTitle,
|
|
@@ -22980,8 +23041,7 @@ var SubscriptionUpsaleDialog = function (_a) {
|
|
|
22980
23041
|
},
|
|
22981
23042
|
submitAction: submitAction,
|
|
22982
23043
|
removeSelectedOption: removeSelectedOption,
|
|
22983
|
-
|
|
22984
|
-
numSelectableOptionsShown: numSelectableOptionsShown,
|
|
23044
|
+
upsaleContentTitle: upsaleContentTitle,
|
|
22985
23045
|
upsaleContent: jsx(ComparisonIncludesList, {
|
|
22986
23046
|
isMinified: device <= 1017,
|
|
22987
23047
|
items: selectedOption === '324132' //this is the item code for the 37 subscription
|
|
@@ -11,6 +11,7 @@ export declare type DialogProps = {
|
|
|
11
11
|
closeButtonId?: string;
|
|
12
12
|
insetOverride?: HOCSpacingKeys;
|
|
13
13
|
height?: Responsive<LiteralUnion<HOCSpacingKeys>> | LiteralUnion<HOCSpacingKeys>;
|
|
14
|
+
shouldScroll?: boolean;
|
|
14
15
|
};
|
|
15
16
|
export declare const Dialog: React.ForwardRefExoticComponent<DialogProps & {
|
|
16
17
|
children: React.ReactNode;
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
|
+
import { HOCSpacingKeys } from "../../helpers/hoc-types/entityValueTypes";
|
|
2
3
|
export declare type AccordionProps = {
|
|
3
4
|
defaultActiveKeys?: (number | string)[];
|
|
4
5
|
isExclusive?: boolean;
|
|
5
6
|
sections: AccordionSection[];
|
|
6
7
|
background?: 'background' | 'foreground';
|
|
7
8
|
isHeadingBackgroundInverse?: boolean;
|
|
8
|
-
|
|
9
|
+
arrowLocation?: 'right' | 'left';
|
|
9
10
|
/** Make sure duplicate keys are not created in the state if you are overriding */
|
|
10
11
|
/** TODO - Handle duplicate case in QDS and remove them */
|
|
11
12
|
stateOverride?: {
|
|
12
13
|
activeIndexes: (string | number)[];
|
|
13
14
|
setActiveIndexes: (activeIndexes: (string | number)[]) => void;
|
|
14
15
|
};
|
|
16
|
+
inset?: HOCSpacingKeys;
|
|
15
17
|
};
|
|
16
18
|
export declare type AccordionSection = {
|
|
17
19
|
key: number | string;
|
|
@@ -4,7 +4,7 @@ export declare type AccordionHeadingProps = {
|
|
|
4
4
|
eventKey: number | string;
|
|
5
5
|
headingSize?: SizeType;
|
|
6
6
|
background?: 'background' | 'foreground';
|
|
7
|
-
|
|
7
|
+
arrowLocation?: 'right' | 'left' | 'none';
|
|
8
8
|
isBackgroundInverse?: boolean;
|
|
9
9
|
onHeadingClick?: () => void;
|
|
10
10
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ButtonType } from "../../exports/molecules";
|
|
3
3
|
import { UpsaleOptionsType } from './upsaleOptions';
|
|
4
4
|
import { Responsive, LiteralUnion, HOCSpacingKeys } from "../../helpers/hoc-types/entityValueTypes";
|
|
5
5
|
export declare type UpsaleDialogProps = {
|
|
@@ -7,7 +7,12 @@ export declare type UpsaleDialogProps = {
|
|
|
7
7
|
description: string;
|
|
8
8
|
checkoutTitle: string;
|
|
9
9
|
checkoutDescription: string;
|
|
10
|
-
submitAction:
|
|
10
|
+
submitAction: {
|
|
11
|
+
title: string;
|
|
12
|
+
isDisabled: boolean;
|
|
13
|
+
onClick: () => void;
|
|
14
|
+
type?: ButtonType;
|
|
15
|
+
};
|
|
11
16
|
upsaleContent: React.ReactNode;
|
|
12
17
|
optionFormLocation?: 'right' | 'left';
|
|
13
18
|
isOpen: boolean;
|
|
@@ -19,5 +24,7 @@ export declare type UpsaleDialogProps = {
|
|
|
19
24
|
zIndex?: number;
|
|
20
25
|
insetOverride?: HOCSpacingKeys;
|
|
21
26
|
successComponent?: React.ReactNode;
|
|
27
|
+
upsaleContentTitle?: string;
|
|
28
|
+
sponsorId?: string;
|
|
22
29
|
} & UpsaleOptionsType;
|
|
23
30
|
export declare const UpsaleDialog: FC<UpsaleDialogProps>;
|
|
@@ -1,25 +1,17 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
|
-
import { OptionSubmitType } from "../../exports/organisms";
|
|
3
2
|
export declare type UpsaleOptionType = {
|
|
4
3
|
title: string;
|
|
5
4
|
subtitle?: string;
|
|
6
5
|
optionId: string;
|
|
7
6
|
isFeatured?: boolean;
|
|
8
7
|
};
|
|
9
|
-
declare type ExtraLinkType = {
|
|
10
|
-
title: string;
|
|
11
|
-
onClick?: () => void;
|
|
12
|
-
href?: string;
|
|
13
|
-
};
|
|
14
8
|
export declare type UpsaleOptionsType = {
|
|
15
9
|
selectableOptions: UpsaleOptionType[];
|
|
16
10
|
selectedOption: string;
|
|
17
11
|
handleSelectedOption: (optionId: string) => void;
|
|
18
12
|
removeSelectedOption: () => void;
|
|
19
|
-
submitAction: OptionSubmitType;
|
|
20
|
-
extraLink?: ExtraLinkType;
|
|
21
|
-
numSelectableOptionsShown?: number;
|
|
22
13
|
children: React.ReactNode;
|
|
14
|
+
activeSelectedOption?: UpsaleOptionType;
|
|
23
15
|
};
|
|
24
16
|
declare type UpsaleOptionsProps = UpsaleOptionsType & {
|
|
25
17
|
showCheckoutView: boolean;
|