@sendoutcards/quantum-design-ui 1.6.5 → 1.6.9

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
@@ -8,7 +8,7 @@ import LazyLoad from 'react-lazyload';
8
8
  import useResizeObserver from 'use-resize-observer';
9
9
  import ContentLoader from 'react-content-loader';
10
10
  import InfiniteScroll from 'react-infinite-scroller';
11
- import { Page as Page$1 } from 'framer';
11
+ import { Page as Page$1, AnimatePresence as AnimatePresence$1 } from 'framer';
12
12
  import { HexColorPicker } from 'react-colorful';
13
13
  import { EyeDropper } from 'react-eyedrop';
14
14
 
@@ -10990,22 +10990,7 @@ var Text = function (_a) {
10990
10990
  };
10991
10991
 
10992
10992
  var mapSizeType = function (size, sizeMap) {
10993
- switch (size) {
10994
- case 'xSmall':
10995
- return sizeMap.xSmall;
10996
-
10997
- case 'small':
10998
- return sizeMap.small;
10999
-
11000
- case 'medium':
11001
- return sizeMap.medium;
11002
-
11003
- case 'large':
11004
- return sizeMap.large;
11005
-
11006
- case 'xLarge':
11007
- return sizeMap.xLarge;
11008
- }
10993
+ return sizeMap[size];
11009
10994
  };
11010
10995
 
11011
10996
  var computeTextTypeFromIconLinkSize = function (size) {
@@ -11324,9 +11309,33 @@ var styles$H = {
11324
11309
  };
11325
11310
  var templateObject_1$J;
11326
11311
 
11312
+ var convertTextColorToIconColor = function (textColor) {
11313
+ switch (textColor) {
11314
+ case 'primaryBody':
11315
+ return 'primaryBodyText';
11316
+
11317
+ case 'primaryHeading':
11318
+ return 'primaryHeadingText';
11319
+
11320
+ case 'inverseBody':
11321
+ return 'inverseBodyText';
11322
+
11323
+ case 'inverseHeading':
11324
+ return 'inverseHeadingText';
11325
+
11326
+ default:
11327
+ return textColor;
11328
+ }
11329
+ };
11330
+
11327
11331
  var Badge = function (_a) {
11328
11332
  var item = _a.item,
11329
- backgroundColor = _a.backgroundColor;
11333
+ backgroundColor = _a.backgroundColor,
11334
+ icon = _a.icon,
11335
+ _b = _a.size,
11336
+ size = _b === void 0 ? 'small' : _b,
11337
+ _c = _a.color,
11338
+ color = _c === void 0 ? 'inverseBody' : _c;
11330
11339
 
11331
11340
  var parseItem = function (item) {
11332
11341
  var toInt = parseInt(item);
@@ -11352,9 +11361,21 @@ var Badge = function (_a) {
11352
11361
  horizontal: 'x_5'
11353
11362
  } : 'x0',
11354
11363
  borderRadius: "small"
11355
- }, jsx(Text, {
11364
+ }, icon && jsx(Div, {
11365
+ alignItems: "center",
11366
+ style: {
11367
+ lineHeight: 0
11368
+ },
11369
+ inset: {
11370
+ right: 'x1'
11371
+ }
11372
+ }, jsx(Icon, {
11373
+ name: icon,
11374
+ primaryColor: convertTextColorToIconColor(color),
11375
+ size: size
11376
+ })), jsx(Text, {
11356
11377
  type: "footnote",
11357
- color: "inverseBody",
11378
+ color: color,
11358
11379
  weight: 'semiBold'
11359
11380
  }, parseItem(item)));
11360
11381
  };
@@ -11401,12 +11422,12 @@ var Bar = function (_a) {
11401
11422
  });
11402
11423
  };
11403
11424
 
11404
- var _emotionSourceMap2$r = process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFJd0QiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgX19tYWtlVGVtcGxhdGVPYmplY3QgfSBmcm9tIFwidHNsaWJcIjtcclxuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vY29yZSc7XHJcbmV4cG9ydCBkZWZhdWx0IHtcclxuICAgIGZsZXhTdHlsZXM6IGZ1bmN0aW9uIChnZW5lcmF0ZWRTdHlsZXMpIHsgcmV0dXJuIGNzcyh0ZW1wbGF0ZU9iamVjdF8xIHx8ICh0ZW1wbGF0ZU9iamVjdF8xID0gX19tYWtlVGVtcGxhdGVPYmplY3QoW1wiXFxuICAgIFwiLCBcIlxcbiAgICBmb250LXNpemU6IGluaGVyaXQ7XFxuICAgIGRpc3BsYXk6IGZsZXg7XFxuICBcIl0sIFtcIlxcbiAgICBcIiwgXCJcXG4gICAgZm9udC1zaXplOiBpbmhlcml0O1xcbiAgICBkaXNwbGF5OiBmbGV4O1xcbiAgXCJdKSksIGdlbmVyYXRlZFN0eWxlcyk7IH0sXHJcbiAgICBmbGV4SXRlbVN0eWxlczogZnVuY3Rpb24gKGdlbmVyYXRlZFN0eWxlcykgeyByZXR1cm4gY3NzKHRlbXBsYXRlT2JqZWN0XzIgfHwgKHRlbXBsYXRlT2JqZWN0XzIgPSBfX21ha2VUZW1wbGF0ZU9iamVjdChbXCJcXG4gICAgXCIsIFwiXFxuICAgIGRpc3BsYXk6IGZsZXg7XFxuICAgIHdpZHRoOiAxMDAlO1xcbiAgXCJdLCBbXCJcXG4gICAgXCIsIFwiXFxuICAgIGRpc3BsYXk6IGZsZXg7XFxuICAgIHdpZHRoOiAxMDAlO1xcbiAgXCJdKSksIGdlbmVyYXRlZFN0eWxlcyk7IH0sXHJcbn07XHJcbnZhciB0ZW1wbGF0ZU9iamVjdF8xLCB0ZW1wbGF0ZU9iamVjdF8yO1xyXG4vLyMgc291cmNlTWFwcGluZ1VSTD1zdHlsZXMuanMubWFwIl19 */";
11425
+ var _emotionSourceMap2$r = process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFJd0QiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgX19tYWtlVGVtcGxhdGVPYmplY3QgfSBmcm9tIFwidHNsaWJcIjtcclxuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vY29yZSc7XHJcbmV4cG9ydCBkZWZhdWx0IHtcclxuICAgIGZsZXhTdHlsZXM6IGZ1bmN0aW9uIChnZW5lcmF0ZWRTdHlsZXMpIHsgcmV0dXJuIGNzcyh0ZW1wbGF0ZU9iamVjdF8xIHx8ICh0ZW1wbGF0ZU9iamVjdF8xID0gX19tYWtlVGVtcGxhdGVPYmplY3QoW1wiXFxuICAgIFwiLCBcIlxcbiAgICBmb250LXNpemU6IGluaGVyaXQ7XFxuICBcIl0sIFtcIlxcbiAgICBcIiwgXCJcXG4gICAgZm9udC1zaXplOiBpbmhlcml0O1xcbiAgXCJdKSksIGdlbmVyYXRlZFN0eWxlcyk7IH0sXHJcbiAgICBmbGV4SXRlbVN0eWxlczogZnVuY3Rpb24gKGdlbmVyYXRlZFN0eWxlcykgeyByZXR1cm4gY3NzKHRlbXBsYXRlT2JqZWN0XzIgfHwgKHRlbXBsYXRlT2JqZWN0XzIgPSBfX21ha2VUZW1wbGF0ZU9iamVjdChbXCJcXG4gICAgXCIsIFwiXFxuICAgIGRpc3BsYXk6IGZsZXg7XFxuICAgIHdpZHRoOiAxMDAlO1xcbiAgXCJdLCBbXCJcXG4gICAgXCIsIFwiXFxuICAgIGRpc3BsYXk6IGZsZXg7XFxuICAgIHdpZHRoOiAxMDAlO1xcbiAgXCJdKSksIGdlbmVyYXRlZFN0eWxlcyk7IH0sXHJcbn07XHJcbnZhciB0ZW1wbGF0ZU9iamVjdF8xLCB0ZW1wbGF0ZU9iamVjdF8yO1xyXG4vLyMgc291cmNlTWFwcGluZ1VSTD1zdHlsZXMuanMubWFwIl19 */";
11405
11426
 
11406
- var _emotionSourceMap$H = process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFHb0QiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgX19tYWtlVGVtcGxhdGVPYmplY3QgfSBmcm9tIFwidHNsaWJcIjtcclxuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vY29yZSc7XHJcbmV4cG9ydCBkZWZhdWx0IHtcclxuICAgIGZsZXhTdHlsZXM6IGZ1bmN0aW9uIChnZW5lcmF0ZWRTdHlsZXMpIHsgcmV0dXJuIGNzcyh0ZW1wbGF0ZU9iamVjdF8xIHx8ICh0ZW1wbGF0ZU9iamVjdF8xID0gX19tYWtlVGVtcGxhdGVPYmplY3QoW1wiXFxuICAgIFwiLCBcIlxcbiAgICBmb250LXNpemU6IGluaGVyaXQ7XFxuICAgIGRpc3BsYXk6IGZsZXg7XFxuICBcIl0sIFtcIlxcbiAgICBcIiwgXCJcXG4gICAgZm9udC1zaXplOiBpbmhlcml0O1xcbiAgICBkaXNwbGF5OiBmbGV4O1xcbiAgXCJdKSksIGdlbmVyYXRlZFN0eWxlcyk7IH0sXHJcbiAgICBmbGV4SXRlbVN0eWxlczogZnVuY3Rpb24gKGdlbmVyYXRlZFN0eWxlcykgeyByZXR1cm4gY3NzKHRlbXBsYXRlT2JqZWN0XzIgfHwgKHRlbXBsYXRlT2JqZWN0XzIgPSBfX21ha2VUZW1wbGF0ZU9iamVjdChbXCJcXG4gICAgXCIsIFwiXFxuICAgIGRpc3BsYXk6IGZsZXg7XFxuICAgIHdpZHRoOiAxMDAlO1xcbiAgXCJdLCBbXCJcXG4gICAgXCIsIFwiXFxuICAgIGRpc3BsYXk6IGZsZXg7XFxuICAgIHdpZHRoOiAxMDAlO1xcbiAgXCJdKSksIGdlbmVyYXRlZFN0eWxlcyk7IH0sXHJcbn07XHJcbnZhciB0ZW1wbGF0ZU9iamVjdF8xLCB0ZW1wbGF0ZU9iamVjdF8yO1xyXG4vLyMgc291cmNlTWFwcGluZ1VSTD1zdHlsZXMuanMubWFwIl19 */";
11427
+ var _emotionSourceMap$H = process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFHb0QiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgX19tYWtlVGVtcGxhdGVPYmplY3QgfSBmcm9tIFwidHNsaWJcIjtcclxuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vY29yZSc7XHJcbmV4cG9ydCBkZWZhdWx0IHtcclxuICAgIGZsZXhTdHlsZXM6IGZ1bmN0aW9uIChnZW5lcmF0ZWRTdHlsZXMpIHsgcmV0dXJuIGNzcyh0ZW1wbGF0ZU9iamVjdF8xIHx8ICh0ZW1wbGF0ZU9iamVjdF8xID0gX19tYWtlVGVtcGxhdGVPYmplY3QoW1wiXFxuICAgIFwiLCBcIlxcbiAgICBmb250LXNpemU6IGluaGVyaXQ7XFxuICBcIl0sIFtcIlxcbiAgICBcIiwgXCJcXG4gICAgZm9udC1zaXplOiBpbmhlcml0O1xcbiAgXCJdKSksIGdlbmVyYXRlZFN0eWxlcyk7IH0sXHJcbiAgICBmbGV4SXRlbVN0eWxlczogZnVuY3Rpb24gKGdlbmVyYXRlZFN0eWxlcykgeyByZXR1cm4gY3NzKHRlbXBsYXRlT2JqZWN0XzIgfHwgKHRlbXBsYXRlT2JqZWN0XzIgPSBfX21ha2VUZW1wbGF0ZU9iamVjdChbXCJcXG4gICAgXCIsIFwiXFxuICAgIGRpc3BsYXk6IGZsZXg7XFxuICAgIHdpZHRoOiAxMDAlO1xcbiAgXCJdLCBbXCJcXG4gICAgXCIsIFwiXFxuICAgIGRpc3BsYXk6IGZsZXg7XFxuICAgIHdpZHRoOiAxMDAlO1xcbiAgXCJdKSksIGdlbmVyYXRlZFN0eWxlcyk7IH0sXHJcbn07XHJcbnZhciB0ZW1wbGF0ZU9iamVjdF8xLCB0ZW1wbGF0ZU9iamVjdF8yO1xyXG4vLyMgc291cmNlTWFwcGluZ1VSTD1zdHlsZXMuanMubWFwIl19 */";
11407
11428
  var styles$F = {
11408
11429
  flexStyles: function (generatedStyles) {
11409
- return /*#__PURE__*/css(templateObject_1$H || (templateObject_1$H = __makeTemplateObject(["\n ", "\n font-size: inherit;\n display: flex;\n " + _emotionSourceMap$H], ["\n ", "\n font-size: inherit;\n display: flex;\n " + _emotionSourceMap$H])), generatedStyles);
11430
+ return /*#__PURE__*/css(templateObject_1$H || (templateObject_1$H = __makeTemplateObject(["\n ", "\n font-size: inherit;\n " + _emotionSourceMap$H], ["\n ", "\n font-size: inherit;\n " + _emotionSourceMap$H])), generatedStyles);
11410
11431
  },
11411
11432
  flexItemStyles: function (generatedStyles) {
11412
11433
  return /*#__PURE__*/css(templateObject_2$r || (templateObject_2$r = __makeTemplateObject(["\n ", "\n display: flex;\n width: 100%;\n " + _emotionSourceMap2$r], ["\n ", "\n display: flex;\n width: 100%;\n " + _emotionSourceMap2$r])), generatedStyles);
@@ -11416,12 +11437,19 @@ var templateObject_1$H, templateObject_2$r;
11416
11437
 
11417
11438
  var Flex = function (props) {
11418
11439
  var entities = useEntities();
11419
- var generatedDivStyles = generateStyles(props, entities);
11440
+
11441
+ var _a = props.display,
11442
+ display = _a === void 0 ? 'flex' : _a,
11443
+ rest = __rest(props, ["display"]);
11444
+
11445
+ var generatedDivStyles = generateStyles(__assign({
11446
+ display: display
11447
+ }, rest), entities);
11420
11448
  var ref = useRef(null);
11421
11449
  useOutsideClick(ref, function () {
11422
11450
  props.outsideClick && props.outsideClick();
11423
11451
  });
11424
- return jsx(motion.main, _extends({}, props, {
11452
+ return jsx(motion.main, _extends({}, rest, {
11425
11453
  ref: ref,
11426
11454
  onClick: props.onMouseEvent ? function (e) {
11427
11455
  var _a;
@@ -11690,7 +11718,8 @@ var Tooltip = function (_a) {
11690
11718
  direction = _a.direction,
11691
11719
  _b = _a.background,
11692
11720
  background = _b === void 0 ? 'light' : _b,
11693
- repositionTooltip = _a.repositionTooltip;
11721
+ repositionTooltip = _a.repositionTooltip,
11722
+ zIndex = _a.zIndex;
11694
11723
  var tooltip = useEntities().tooltip;
11695
11724
  var backgroundColor = background === 'light' ? tooltip.lightBackgroundColor : tooltip.darkBackgroundColor ? tooltip.darkBackgroundColor : tooltip.lightBackgroundColor; // TODO this is because the dark bg color is set from a color swatch which can alter through the theme, come up with fix when colors get sorted out
11696
11725
 
@@ -11701,7 +11730,8 @@ var Tooltip = function (_a) {
11701
11730
  vertical: 'x_5',
11702
11731
  horizontal: 'x1'
11703
11732
  },
11704
- boxShadow: tooltip.boxShadow
11733
+ boxShadow: tooltip.boxShadow,
11734
+ zIndex: zIndex
11705
11735
  }, jsx(Text, {
11706
11736
  type: "footnote",
11707
11737
  color: background === 'light' ? 'primaryBody' : 'inverseBody',
@@ -12080,7 +12110,8 @@ var Overlay = function (_a) {
12080
12110
  exit = _a.exit,
12081
12111
  variants = _a.variants,
12082
12112
  transition = _a.transition,
12083
- motionKey = _a.motionKey;
12113
+ motionKey = _a.motionKey,
12114
+ position = _a.position;
12084
12115
  var hocs = useEntities().hocs;
12085
12116
  return jsx(Div, {
12086
12117
  motionKey: motionKey,
@@ -12093,7 +12124,7 @@ var Overlay = function (_a) {
12093
12124
  display: "flex",
12094
12125
  justifyContent: "center",
12095
12126
  alignItems: "center",
12096
- position: "fixed",
12127
+ position: position !== null && position !== void 0 ? position : 'fixed',
12097
12128
  top: "0",
12098
12129
  left: "0",
12099
12130
  width: "100%",
@@ -16018,13 +16049,9 @@ var DownloadButton = function (_a) {
16018
16049
  var StackedCards = function (_a) {
16019
16050
  var size = _a.size,
16020
16051
  _b = _a.stackCount,
16021
- stackCount = _b === void 0 ? 7 : _b,
16052
+ stackCount = _b === void 0 ? 3 : _b,
16022
16053
  children = _a.children;
16023
16054
  var stackCountArr = Array.from(Array(stackCount).keys());
16024
- var cardPositionStyles = {
16025
- position: 'absolute',
16026
- transformOrigin: 'center top'
16027
- };
16028
16055
 
16029
16056
  var getDimensionsFromSize = function () {
16030
16057
  if (typeof size === 'object') {
@@ -16054,217 +16081,98 @@ var StackedCards = function (_a) {
16054
16081
 
16055
16082
  return jsx(Flex, {
16056
16083
  position: "relative",
16057
- justifyContent: 'center',
16058
- alignContent: "center"
16084
+ justifyContent: 'flex-start',
16085
+ alignContent: "center",
16086
+ width: getDimensionsFromSize().width + stackCountArr.length * 8 + "px",
16087
+ height: getDimensionsFromSize().height + "px"
16059
16088
  }, stackCountArr.map(function (_, index) {
16060
- var offset = 11 - stackCountArr.length;
16061
- return jsx(Card, _extends({
16089
+ index += 1;
16090
+ return jsx(Card, {
16062
16091
  key: index,
16063
16092
  backgroundColor: "foreground",
16064
- style: {
16065
- padding: 0
16066
- },
16067
16093
  width: getDimensionsFromSize().width + "px",
16068
16094
  height: getDimensionsFromSize().height + "px",
16069
- transform: "scale(" + (index + offset) / 10 + ") translate(100%, -50%)"
16070
- }, cardPositionStyles), index === stackCountArr.length - 1 && children);
16095
+ style: {
16096
+ scale: 1 - index / 10,
16097
+ translateY: '-50%'
16098
+ },
16099
+ position: "absolute",
16100
+ left: index * 8 + "px",
16101
+ top: '50%',
16102
+ boxShadow: "mediumLight",
16103
+ zIndex: stackCountArr.length - index
16104
+ }, index === stackCountArr.length - 1 && children);
16071
16105
  }));
16072
16106
  };
16073
16107
 
16074
16108
  var ConfigurationCard = function (_a) {
16075
- var _b = _a.graphic,
16076
- graphic = _b === void 0 ? 'addressed' : _b,
16077
- _c = _a.title,
16078
- title = _c === void 0 ? 'Blank Envelopes' : _c,
16079
- _d = _a.description,
16080
- description = _d === void 0 ? 'Address and send yourself' : _d,
16081
- _e = _a.cost,
16082
- cost = _e === void 0 ? 0.29 : _e,
16109
+ var graphic = _a.graphic,
16110
+ title = _a.title,
16111
+ description = _a.description,
16112
+ cost = _a.cost,
16083
16113
  isSelected = _a.isSelected,
16084
16114
  onSelect = _a.onSelect,
16085
- _f = _a.layout,
16086
- layout = _f === void 0 ? 'horizontal' : _f,
16087
- configurationId = _a.configurationId;
16088
-
16089
- var handleIsSelected = function () {
16090
- onSelect(configurationId);
16091
- };
16092
-
16093
- return jsx(Flex, {
16094
- onClick: handleIsSelected,
16115
+ _b = _a.layout,
16116
+ layout = _b === void 0 ? 'horizontal' : _b,
16117
+ configurationId = _a.configurationId,
16118
+ itemPriceTitle = _a.itemPriceTitle;
16119
+ var hasNoGraphic = graphic !== 'none';
16120
+ return jsx(Card, {
16121
+ onClick: function () {
16122
+ return onSelect(configurationId);
16123
+ },
16095
16124
  width: layout === 'horizontal' ? '100%' : 'initial',
16096
16125
  flexDirection: layout === 'vertical' ? 'column' : 'row',
16097
- position: "relative"
16098
- }, isSelected && jsx(Div, {
16099
- right: "x1",
16100
- position: "absolute",
16101
- top: "x1"
16102
- }, jsx(AnimatedCheckMark, null)), jsx(Div, {
16126
+ position: "relative",
16127
+ boxShadow: "mediumDark",
16128
+ backgroundColor: graphic === 'none' ? 'background' : 'foreground',
16129
+ cursor: "pointer",
16130
+ inset: {
16131
+ vertical: 'x4',
16132
+ horizontal: 'x1'
16133
+ },
16134
+ borderWidth: "default",
16135
+ borderRadius: "default",
16103
16136
  borderStyle: "solid",
16104
16137
  borderColor: isSelected ? {
16105
16138
  swatch: 'success',
16106
16139
  shade: 'base'
16107
16140
  } : 'transparent',
16108
- borderWidth: "default",
16109
- borderRadius: "default",
16110
- width: "100%",
16111
- height: "100%",
16112
- boxShadow: "mediumDark",
16113
- inset: {
16114
- left: 'x2',
16115
- vertical: 'x4'
16116
- }
16117
- }, jsx(Flex, {
16118
- justifyContent: "space-between",
16119
- height: "100%"
16120
- }, jsx(HStack, {
16121
- justify: "flex-start",
16122
- gap: "x3"
16141
+ minWidth: "420px"
16123
16142
  }, jsx(Div, {
16124
- height: "100%"
16125
- }, jsx(Card, {
16126
- width: "75px",
16127
- height: "50px"
16128
- }, graphic)), jsx(Div, null, jsx(Text, {
16129
- weight: "bold",
16130
- type: "largeBody"
16131
- }, title, jsx(Text, {
16132
- type: "footnote"
16133
- }, description)))), jsx(Div, {
16134
- outset: "x2",
16135
- position: "relative",
16136
- justifyContent: "flex-end"
16137
- }, cost && jsx(Div, {
16138
- width: "100%"
16139
- }, jsx(Text, {
16140
- type: "caption"
16141
- }, "$", cost, " per envelope"))))));
16142
- };
16143
-
16144
- var QuantitySlider = function (_a) {
16145
- var quantity = _a.quantity,
16146
- min = _a.min,
16147
- max = _a.max,
16148
- setQuantity = _a.setQuantity,
16149
- salePrice = _a.salePrice,
16150
- unitPrice = _a.unitPrice,
16151
- sliderFill = _a.sliderFill,
16152
- quantityDescription = _a.quantityDescription,
16153
- width = _a.width;
16154
- return jsx(Div, null, jsx(Text, {
16155
- type: "subtitle",
16156
- weight: "bold",
16157
- color: "primaryHeading",
16158
- content: quantity + " " + quantityDescription,
16159
- alignment: "center",
16160
- style: {
16161
- letterSpacing: '1px'
16162
- }
16163
- }), salePrice ? jsx(React.Fragment, null, jsx(Text, {
16164
- type: "caption",
16165
- color: "primaryHeading",
16166
- content: "Sale",
16167
- alignment: "center",
16168
- style: {
16169
- letterSpacing: '1px'
16170
- }
16171
- }), jsx(Flex, {
16172
- justifyContent: "center"
16173
- }, jsx(Spacer, {
16174
- orientation: "horizontal",
16175
- space: "x1"
16176
- }), jsx(Text, {
16177
- type: "caption",
16178
- color: "primaryHeading",
16179
- weight: "semiBold",
16180
- content: "$" + (unitPrice === null || unitPrice === void 0 ? void 0 : unitPrice.toFixed(2)),
16181
- isStrikeThrough: true,
16182
- alignment: "center",
16183
- style: {
16184
- letterSpacing: '1px'
16185
- }
16186
- }), jsx(Spacer, {
16187
- orientation: "horizontal",
16188
- space: "x1"
16143
+ right: "x1",
16144
+ position: "absolute",
16145
+ top: "x1"
16146
+ }, isSelected && hasNoGraphic ? jsx(AnimatedCheckMark, null) : (graphic === 'none' && !isSelected || isSelected) && jsx(Icon, {
16147
+ name: "information",
16148
+ size: "small",
16149
+ primaryColor: "secondaryBrand"
16150
+ })), jsx(Flex, {
16151
+ justifyContent: "space-between",
16152
+ alignItems: "center",
16153
+ width: "100%",
16154
+ flexDirection: layout === 'horizontal' ? 'row' : 'column'
16155
+ }, jsx(StackedCards, {
16156
+ size: "small",
16157
+ stackCount: 3
16189
16158
  }), jsx(Text, {
16190
- type: "largeBody",
16191
- color: "danger",
16192
16159
  weight: "bold",
16193
- content: "$" + salePrice.toFixed(2) + " /each",
16194
- style: {
16195
- letterSpacing: '1px'
16196
- }
16197
- }))) : jsx(Text, {
16198
- type: "body",
16199
- color: "primaryHeading",
16200
- weight: "semiBold",
16201
- content: "$" + (unitPrice === null || unitPrice === void 0 ? void 0 : unitPrice.toFixed(2)) + " /each",
16202
- alignment: "center",
16203
- style: {
16204
- letterSpacing: '1px'
16205
- }
16206
- }), jsx(Slider, {
16207
- min: min,
16208
- max: max,
16209
- value: quantity,
16210
- setValue: function (quantity) {
16211
- return setQuantity(quantity);
16212
- },
16213
- width: width,
16214
- activeColor: sliderFill
16215
- }));
16216
- };
16217
-
16218
- var FeatureBadge = function (_a) {
16219
- var title = _a.title,
16220
- backgroundColor = _a.backgroundColor,
16221
- iconColor = _a.iconColor,
16222
- textColor = _a.textColor,
16223
- size = _a.size,
16224
- icon = _a.icon,
16225
- onClick = _a.onClick;
16226
- return jsx(Flex, {
16227
- backgroundColor: backgroundColor ? {
16228
- swatch: backgroundColor,
16229
- shade: 'base'
16230
- } : {
16231
- swatch: 'success',
16232
- shade: 'base'
16233
- },
16234
- inset: icon ? {
16235
- left: 'x1',
16236
- vertical: 'x1',
16237
- right: 'x2'
16238
- } : 'x2',
16239
- borderRadius: "medium",
16240
- style: {
16241
- display: 'inline-flex'
16242
- },
16243
- justifyContent: "flex-start",
16244
- alignItems: "center",
16245
- onClick: onClick,
16246
- cursor: onClick ? 'pointer' : 'initial'
16247
- }, icon && jsx(Div, {
16248
- alignItems: "center",
16249
- style: {
16250
- lineHeight: 0
16160
+ type: {
16161
+ xSmall: 'body',
16162
+ medium: 'largeBody'
16251
16163
  },
16252
- inset: {
16253
- right: 'x1'
16254
- }
16255
- }, jsx(Icon, {
16256
- name: icon,
16257
- primaryColor: iconColor !== null && iconColor !== void 0 ? iconColor : 'inverseHeadingText',
16258
- size: size !== null && size !== void 0 ? size : 'small'
16259
- })), jsx(Text, {
16260
- style: {
16261
- lineHeight: 0,
16262
- letterSpacing: 0.5
16164
+ whiteSpace: "nowrap"
16165
+ }, title, jsx(Text, {
16166
+ type: {
16167
+ xSmall: 'footnote',
16168
+ medium: 'caption'
16263
16169
  },
16264
- type: "caption",
16265
- color: textColor !== null && textColor !== void 0 ? textColor : 'inverseHeading',
16266
- weight: "bold"
16267
- }, title));
16170
+ whiteSpace: "nowrap"
16171
+ }, description)), cost && jsx(Text, {
16172
+ type: "footnote",
16173
+ whiteSpace: "nowrap",
16174
+ content: " $" + (typeof cost === 'number' ? "" + cost.toFixed(2) : cost) + " " + itemPriceTitle
16175
+ })));
16268
16176
  };
16269
16177
 
16270
16178
  var _emotionSourceMap2$a = process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFJdUIiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgX19tYWtlVGVtcGxhdGVPYmplY3QgfSBmcm9tIFwidHNsaWJcIjtcclxuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vY29yZSc7XHJcbmV4cG9ydCBkZWZhdWx0IHtcclxuICAgIHVzZXJDYXJkQ29udGFpbmVyOiBjc3ModGVtcGxhdGVPYmplY3RfMSB8fCAodGVtcGxhdGVPYmplY3RfMSA9IF9fbWFrZVRlbXBsYXRlT2JqZWN0KFtcIlxcbiAgICBkaXNwbGF5OiBmbGV4O1xcbiAgICBqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtc3RhcnQ7XFxuICAgIGFsaWduLWl0ZW1zOiBjZW50ZXI7XFxuICBcIl0sIFtcIlxcbiAgICBkaXNwbGF5OiBmbGV4O1xcbiAgICBqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtc3RhcnQ7XFxuICAgIGFsaWduLWl0ZW1zOiBjZW50ZXI7XFxuICBcIl0pKSksXHJcbiAgICB1c2VySW5mb0NvbnRhaW5lcjogY3NzKHRlbXBsYXRlT2JqZWN0XzIgfHwgKHRlbXBsYXRlT2JqZWN0XzIgPSBfX21ha2VUZW1wbGF0ZU9iamVjdChbXCJcXG4gICAgcGFkZGluZy1sZWZ0OiAxNnB4O1xcbiAgXCJdLCBbXCJcXG4gICAgcGFkZGluZy1sZWZ0OiAxNnB4O1xcbiAgXCJdKSkpLFxyXG59O1xyXG52YXIgdGVtcGxhdGVPYmplY3RfMSwgdGVtcGxhdGVPYmplY3RfMjtcclxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9c3R5bGVzLmpzLm1hcCJdfQ== */";
@@ -18474,6 +18382,7 @@ var Pill = function (_a) {
18474
18382
  items = _a.items,
18475
18383
  _b = _a.flexDirection,
18476
18384
  flexDirection = _b === void 0 ? 'row' : _b,
18385
+ boxShadow = _a.boxShadow,
18477
18386
  children = _a.children;
18478
18387
 
18479
18388
  var _c = useState(-1),
@@ -18498,7 +18407,8 @@ var Pill = function (_a) {
18498
18407
  inset: {
18499
18408
  horizontal: 'x1'
18500
18409
  },
18501
- flexDirection: flexDirection
18410
+ flexDirection: flexDirection,
18411
+ boxShadow: boxShadow
18502
18412
  }, children, jsx(Flex, {
18503
18413
  flexDirection: "row"
18504
18414
  }, items.map(function (item, index) {
@@ -20184,14 +20094,16 @@ var PromotionWidget = function (_a) {
20184
20094
  _c = _a.width,
20185
20095
  width = _c === void 0 ? '100%' : _c,
20186
20096
  type = _a.type,
20187
- buttonSize = _a.buttonSize;
20097
+ children = _a.children,
20098
+ _d = _a.backgroundColor,
20099
+ backgroundColor = _d === void 0 ? 'background' : _d;
20188
20100
  var widget = useEntities().widget;
20189
20101
  var widgetProperties = widget[type];
20190
20102
  return jsx(Card, {
20191
20103
  display: "flex",
20192
20104
  justifyItems: "start",
20193
20105
  borderRadius: "default",
20194
- backgroundColor: "background",
20106
+ backgroundColor: backgroundColor,
20195
20107
  inset: "x4",
20196
20108
  width: width,
20197
20109
  minWidth: minWidth
@@ -20217,13 +20129,152 @@ var PromotionWidget = function (_a) {
20217
20129
  type: "caption"
20218
20130
  }, description)), jsx(Flex, {
20219
20131
  justifyContent: "flex-start"
20220
- }, jsx(Button, {
20221
- type: type,
20132
+ }, primaryAction && jsx(Button, {
20133
+ type: "success",
20222
20134
  onClick: function () {
20223
20135
  return primaryAction.onClick();
20136
+ }
20137
+ }, primaryAction.title), children)));
20138
+ };
20139
+
20140
+ var QuantitySlider = function (_a) {
20141
+ var quantity = _a.quantity,
20142
+ min = _a.min,
20143
+ max = _a.max,
20144
+ setQuantity = _a.setQuantity,
20145
+ salePrice = _a.salePrice,
20146
+ unitPrice = _a.unitPrice,
20147
+ sliderFill = _a.sliderFill,
20148
+ quantityDescription = _a.quantityDescription,
20149
+ width = _a.width,
20150
+ hasIncrement = _a.hasIncrement;
20151
+ return jsx(Flex, {
20152
+ justifyContent: "center",
20153
+ flexDirection: "column"
20154
+ }, jsx(Text, {
20155
+ type: "subtitle",
20156
+ weight: "bold",
20157
+ color: "primaryHeading",
20158
+ content: quantity + " " + quantityDescription,
20159
+ alignment: "center",
20160
+ style: {
20161
+ letterSpacing: '1px'
20162
+ }
20163
+ }), salePrice ? jsx(React.Fragment, null, jsx(Text, {
20164
+ type: "caption",
20165
+ color: "primaryHeading",
20166
+ content: "Sale",
20167
+ alignment: "center",
20168
+ style: {
20169
+ letterSpacing: '1px'
20170
+ }
20171
+ }), jsx(Flex, {
20172
+ justifyContent: "center"
20173
+ }, jsx(Spacer, {
20174
+ orientation: "horizontal",
20175
+ space: "x1"
20176
+ }), jsx(Text, {
20177
+ type: "caption",
20178
+ color: "primaryHeading",
20179
+ weight: "semiBold",
20180
+ content: "$" + (unitPrice === null || unitPrice === void 0 ? void 0 : unitPrice.toFixed(2)),
20181
+ isStrikeThrough: true,
20182
+ alignment: "center",
20183
+ style: {
20184
+ letterSpacing: '1px'
20185
+ }
20186
+ }), jsx(Spacer, {
20187
+ orientation: "horizontal",
20188
+ space: "x1"
20189
+ }), jsx(Text, {
20190
+ type: "largeBody",
20191
+ color: "danger",
20192
+ weight: "bold",
20193
+ content: "$" + salePrice.toFixed(2) + " /each",
20194
+ style: {
20195
+ letterSpacing: '1px'
20196
+ }
20197
+ }))) : jsx(Text, {
20198
+ type: "body",
20199
+ color: "primaryHeading",
20200
+ weight: "semiBold",
20201
+ content: "$" + (unitPrice === null || unitPrice === void 0 ? void 0 : unitPrice.toFixed(2)) + " /each",
20202
+ alignment: "center",
20203
+ style: {
20204
+ letterSpacing: '1px'
20205
+ }
20206
+ }), hasIncrement ? jsx(Div, {
20207
+ width: "370px"
20208
+ }, jsx(Spacer, {
20209
+ orientation: "vertical",
20210
+ space: "x2"
20211
+ }), jsx(IncrementSetting, {
20212
+ title: "",
20213
+ min: min,
20214
+ max: max,
20215
+ value: quantity,
20216
+ layout: "inline",
20217
+ setValue: function (quantity) {
20218
+ return setQuantity(quantity);
20219
+ },
20220
+ activeColor: sliderFill,
20221
+ inputWidth: width
20222
+ })) : jsx(Slider, {
20223
+ min: min,
20224
+ max: max,
20225
+ value: quantity,
20226
+ setValue: function (quantity) {
20227
+ return setQuantity(quantity);
20228
+ },
20229
+ width: width,
20230
+ activeColor: sliderFill
20231
+ }));
20232
+ };
20233
+
20234
+ var FeatureBadge = function (_a) {
20235
+ var title = _a.title,
20236
+ _b = _a.backgroundColor,
20237
+ backgroundColor = _b === void 0 ? 'success' : _b,
20238
+ _c = _a.color,
20239
+ color = _c === void 0 ? 'inverseBody' : _c,
20240
+ size = _a.size,
20241
+ icon = _a.icon,
20242
+ onClick = _a.onClick;
20243
+ var hocs = useEntities().hocs;
20244
+ return jsx(Flex, {
20245
+ backgroundColor: hocs.colors.swatches[backgroundColor].base,
20246
+ inset: icon ? {
20247
+ left: 'x1',
20248
+ vertical: 'x1',
20249
+ right: 'x2'
20250
+ } : 'x2',
20251
+ borderRadius: "medium",
20252
+ display: "inline-flex",
20253
+ justifyContent: "flex-start",
20254
+ alignItems: "center",
20255
+ onClick: onClick,
20256
+ cursor: onClick ? 'pointer' : 'initial'
20257
+ }, icon && jsx(Div, {
20258
+ alignItems: "center",
20259
+ style: {
20260
+ lineHeight: 0
20224
20261
  },
20225
- size: buttonSize
20226
- }, primaryAction.title))));
20262
+ inset: {
20263
+ right: 'x1'
20264
+ }
20265
+ }, jsx(Icon, {
20266
+ name: icon,
20267
+ primaryColor: convertTextColorToIconColor(color),
20268
+ size: size !== null && size !== void 0 ? size : 'small'
20269
+ })), jsx(Text, {
20270
+ style: {
20271
+ lineHeight: 0,
20272
+ letterSpacing: 0.5
20273
+ },
20274
+ type: "caption",
20275
+ color: color,
20276
+ weight: "bold"
20277
+ }, title));
20227
20278
  };
20228
20279
 
20229
20280
  var _emotionSourceMap = process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFHd0IiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgX19tYWtlVGVtcGxhdGVPYmplY3QgfSBmcm9tIFwidHNsaWJcIjtcclxuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vY29yZSc7XHJcbmV4cG9ydCBkZWZhdWx0IHtcclxuICAgIHRodW1ibmFpbENvbnRhaW5lcjogY3NzKHRlbXBsYXRlT2JqZWN0XzEgfHwgKHRlbXBsYXRlT2JqZWN0XzEgPSBfX21ha2VUZW1wbGF0ZU9iamVjdChbXCJcIl0sIFtcIlwiXSkpKSxcclxufTtcclxudmFyIHRlbXBsYXRlT2JqZWN0XzE7XHJcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPXN0eWxlcy5qcy5tYXAiXX0= */";
@@ -20578,10 +20629,7 @@ var AffiliateShareWidget = function (_a) {
20578
20629
  title: "Share the $97 Postcard Program",
20579
20630
  type: "secondary",
20580
20631
  description: "",
20581
- primaryAction: {
20582
- onClick: function () {},
20583
- title: 'Action Title'
20584
- }
20632
+ backgroundColor: "foreground"
20585
20633
  }, jsx(Clipboard, {
20586
20634
  copyText: shareLink
20587
20635
  }));
@@ -20599,16 +20647,14 @@ var BulkSend = function (_a) {
20599
20647
  salePrice = _a.salePrice,
20600
20648
  title = _a.title,
20601
20649
  description = _a.description,
20602
- configurationListTitle = _a.configurationListTitle,
20603
- configurationListSubtitle = _a.configurationListSubtitle,
20604
- configurationListTag = _a.configurationListTag,
20605
- configurationList = _a.configurationList,
20606
- activeConfigurationId = _a.activeConfigurationId,
20607
- setActiveConfigurationId = _a.setActiveConfigurationId,
20650
+ configurationSections = _a.configurationSections,
20608
20651
  isActive = _a.isActive,
20609
20652
  setIsActive = _a.setIsActive,
20610
20653
  addDialog = _a.addDialog,
20611
- removeDialog = _a.removeDialog;
20654
+ removeDialog = _a.removeDialog,
20655
+ hasIncrement = _a.hasIncrement,
20656
+ isConfigurable = _a.isConfigurable,
20657
+ disableMessage = _a.disableMessage;
20612
20658
 
20613
20659
  var _b = React.useState(false),
20614
20660
  isAddDialogOpen = _b[0],
@@ -20619,7 +20665,9 @@ var BulkSend = function (_a) {
20619
20665
  setIsRemoveDialogOpen = _c[1];
20620
20666
 
20621
20667
  var clearBulkOption = function () {
20622
- setActiveConfigurationId('');
20668
+ configurationSections.forEach(function (section) {
20669
+ return section.setActiveConfigurationId('');
20670
+ });
20623
20671
  setIsActive(false);
20624
20672
  };
20625
20673
 
@@ -20631,6 +20679,14 @@ var BulkSend = function (_a) {
20631
20679
  setIsAddDialogOpen(true);
20632
20680
  };
20633
20681
 
20682
+ var overlayVariants = {
20683
+ open: {
20684
+ opacity: 0.5
20685
+ },
20686
+ closed: {
20687
+ opacity: 0
20688
+ }
20689
+ };
20634
20690
  return jsx(Flex, {
20635
20691
  inset: "x3",
20636
20692
  flexDirection: {
@@ -20645,14 +20701,17 @@ var BulkSend = function (_a) {
20645
20701
  title: addDialog.accept.title,
20646
20702
  onClick: function () {
20647
20703
  setIsActive(true);
20648
- setIsAddDialogOpen(false);
20704
+ setIsAddDialogOpen(!isAddDialogOpen);
20649
20705
  addDialog.accept.onClick();
20650
20706
  }
20651
20707
  },
20652
20708
  decline: {
20653
20709
  title: 'Cancel',
20654
20710
  onClick: function () {
20655
- setIsAddDialogOpen(false);
20711
+ var _a;
20712
+
20713
+ setIsAddDialogOpen(!isAddDialogOpen);
20714
+ (_a = addDialog.decline) === null || _a === void 0 ? void 0 : _a.onClick();
20656
20715
  }
20657
20716
  },
20658
20717
  requireScroll: false
@@ -20665,13 +20724,16 @@ var BulkSend = function (_a) {
20665
20724
  onClick: function () {
20666
20725
  clearBulkOption();
20667
20726
  removeDialog.accept.onClick();
20668
- setIsRemoveDialogOpen(false);
20727
+ setIsRemoveDialogOpen(!isRemoveDialogOpen);
20669
20728
  }
20670
20729
  },
20671
20730
  decline: {
20672
20731
  title: 'Cancel',
20673
20732
  onClick: function () {
20674
- return setIsRemoveDialogOpen(false);
20733
+ var _a;
20734
+
20735
+ (_a = removeDialog.decline) === null || _a === void 0 ? void 0 : _a.onClick();
20736
+ setIsRemoveDialogOpen(!isRemoveDialogOpen);
20675
20737
  }
20676
20738
  },
20677
20739
  requireScroll: false
@@ -20691,39 +20753,41 @@ var BulkSend = function (_a) {
20691
20753
  xSmall: 2,
20692
20754
  medium: 0
20693
20755
  }
20694
- }, jsx(Div, {
20756
+ }, jsx(AnimatePresence$1, null, !isConfigurable && jsx(Overlay, {
20757
+ variants: overlayVariants,
20758
+ initial: 'closed',
20759
+ animate: !isConfigurable ? 'open' : 'closed',
20760
+ exit: 'closed',
20761
+ zIndex: 1
20762
+ })), jsx(Div, {
20695
20763
  outset: {
20696
20764
  bottom: 'x3'
20697
- }
20698
- }, jsx(Text, {
20699
- type: {
20700
- xSmall: 'largeBody',
20701
- medium: 'subtitle',
20702
- large: 'title'
20703
20765
  },
20704
- weight: "bold",
20705
- color: "primaryHeading",
20706
- content: title
20707
- }), jsx(Text, {
20708
- type: {
20709
- xSmall: 'caption',
20710
- medium: 'body',
20711
- large: 'largeBody'
20766
+ position: "relative"
20767
+ }, jsx(AnimatePresence$1, null, !isConfigurable && jsx(Flex, {
20768
+ position: "absolute",
20769
+ top: "-32px",
20770
+ initial: {
20771
+ opacity: 0
20712
20772
  },
20713
- content: description
20714
- })), isActive && jsx(Flex, {
20715
- flexDirection: "column",
20716
- maxWidth: "450px"
20717
- }, jsx(Div, {
20718
- outset: {
20719
- bottom: 'x3'
20773
+ animate: !isConfigurable ? {
20774
+ opacity: 1
20775
+ } : {
20776
+ opacity: 0
20777
+ },
20778
+ exit: {
20779
+ opacity: 0
20780
+ },
20781
+ transition: {
20782
+ delay: 0.3,
20783
+ duration: 0.3
20720
20784
  }
20721
- }, configurationListTag && jsx(Text, {
20722
- type: "caption",
20723
- color: "secondaryBrand",
20724
- weight: "semiBold",
20725
- content: configurationListTag
20726
- }), jsx(Text, {
20785
+ }, jsx(Tooltip, {
20786
+ title: disableMessage,
20787
+ direction: "bottom",
20788
+ background: "light",
20789
+ zIndex: 2
20790
+ }))), jsx(Text, {
20727
20791
  type: {
20728
20792
  xSmall: 'largeBody',
20729
20793
  medium: 'subtitle',
@@ -20731,35 +20795,72 @@ var BulkSend = function (_a) {
20731
20795
  },
20732
20796
  weight: "bold",
20733
20797
  color: "primaryHeading",
20734
- content: configurationListTitle,
20735
- lineHeight: 1.4,
20736
- outset: {
20737
- bottom: 'x1'
20738
- }
20798
+ content: title
20739
20799
  }), jsx(Text, {
20740
20800
  type: {
20741
20801
  xSmall: 'caption',
20742
20802
  medium: 'body',
20743
20803
  large: 'largeBody'
20744
20804
  },
20745
- content: configurationListSubtitle
20746
- })), configurationList.map(function (config, index) {
20747
- return jsx(React.Fragment, null, jsx(ConfigurationCard, {
20748
- key: index,
20749
- graphic: config.graphicType,
20750
- title: config.configurationTitle,
20751
- configurationId: config.configurationId,
20752
- description: config.configurationDescription,
20753
- onSelect: function () {
20754
- setActiveConfigurationId(config.configurationId);
20805
+ content: description
20806
+ })), isActive && isConfigurable ? jsx(React.Fragment, null, configurationSections.map(function (section, index) {
20807
+ return jsx(React.Fragment, null, jsx(Flex, {
20808
+ flexDirection: "column",
20809
+ maxWidth: "480px",
20810
+ key: index
20811
+ }, jsx(Div, {
20812
+ outset: {
20813
+ bottom: 'x3'
20814
+ }
20815
+ }, section.tag && jsx(Text, {
20816
+ type: "caption",
20817
+ color: "secondaryBrand",
20818
+ weight: "semiBold",
20819
+ content: section.tag
20820
+ }), jsx(Text, {
20821
+ type: {
20822
+ xSmall: 'largeBody',
20823
+ medium: 'subtitle',
20824
+ large: 'title'
20755
20825
  },
20756
- isSelected: config.configurationId === activeConfigurationId,
20757
- cost: config.configurationPrice
20758
- }), jsx(Spacer, {
20759
- orientation: "vertical",
20760
- space: "x2"
20761
- }));
20762
- }))), jsx(Flex, {
20826
+ weight: "bold",
20827
+ color: "primaryHeading",
20828
+ content: section.title,
20829
+ lineHeight: 1.4,
20830
+ outset: {
20831
+ bottom: 'x1'
20832
+ }
20833
+ }), jsx(Text, {
20834
+ type: {
20835
+ xSmall: 'caption',
20836
+ medium: 'body',
20837
+ large: 'largeBody'
20838
+ },
20839
+ content: section.description
20840
+ })), jsx(VStack, {
20841
+ gap: "x1"
20842
+ }, section.configurationList.map(function (config, index) {
20843
+ return jsx(ConfigurationCard, {
20844
+ key: index,
20845
+ graphic: config.graphicType,
20846
+ title: config.configurationTitle,
20847
+ configurationId: config.configurationId,
20848
+ description: config.configurationDescription,
20849
+ onSelect: function () {
20850
+ section.setActiveConfigurationId(config.configurationId);
20851
+ },
20852
+ isSelected: false,
20853
+ cost: config.configurationPrice,
20854
+ itemPriceTitle: config.configurationItemPriceTitle
20855
+ });
20856
+ })), index !== configurationSections.length - 1 && jsx(Div, {
20857
+ outset: {
20858
+ vertical: 'x2'
20859
+ }
20860
+ }, jsx(Separator, {
20861
+ orientation: "horizontal"
20862
+ }))));
20863
+ })) : !isConfigurable && undefined), jsx(Flex, {
20763
20864
  width: {
20764
20865
  xSmall: '100%',
20765
20866
  medium: '50%'
@@ -20771,7 +20872,7 @@ var BulkSend = function (_a) {
20771
20872
  xSmall: 1,
20772
20873
  medium: 0
20773
20874
  }
20774
- }, jsx(Flex, null, jsx(QuantitySlider, {
20875
+ }, jsx(QuantitySlider, {
20775
20876
  unitPrice: unitPrice,
20776
20877
  salePrice: salePrice,
20777
20878
  quantityDescription: quantityDescription,
@@ -20782,8 +20883,9 @@ var BulkSend = function (_a) {
20782
20883
  setQuantity: function (quantity) {
20783
20884
  return setQuantity(quantity);
20784
20885
  },
20785
- sliderFill: sliderFill
20786
- })), jsx(Flex, {
20886
+ sliderFill: sliderFill,
20887
+ hasIncrement: hasIncrement
20888
+ }), jsx(Flex, {
20787
20889
  outset: {
20788
20890
  top: 'x4'
20789
20891
  }
@@ -20791,7 +20893,7 @@ var BulkSend = function (_a) {
20791
20893
  type: "secondary",
20792
20894
  size: "medium",
20793
20895
  title: isActive ? 'Remove Bulk Option' : 'Add Bulk Option',
20794
- onClick: isActive ? handleSetRemoveDialog : handleSetAddDialog,
20896
+ onClick: isActive && isConfigurable ? handleSetRemoveDialog : !isConfigurable ? undefined : handleSetAddDialog,
20795
20897
  fullWidth: true,
20796
20898
  outlined: true
20797
20899
  }))));
@@ -1,7 +1,13 @@
1
1
  import { FC } from 'react';
2
+ import { TextColor } from "../typography/text";
2
3
  import { BackgroundColor } from "../../helpers/hoc-types/hocBaseUnion";
4
+ import { IconType } from '../iconography/types';
5
+ import { SizeType } from "../../types/global";
3
6
  export declare type BadgeProps = {
4
7
  item: string;
5
8
  backgroundColor?: BackgroundColor;
9
+ icon?: IconType;
10
+ size?: SizeType;
11
+ color?: TextColor;
6
12
  };
7
13
  export declare const Badge: FC<BadgeProps>;
@@ -1,6 +1,6 @@
1
1
  export declare type BorderStyles = 'none' | 'hidden' | 'dotted' | 'dashed' | 'solid' | 'double' | 'groove' | 'ridge' | 'inset' | 'outset' | 'initial' | 'inherit';
2
2
  export declare type Cursor = 'pointer' | 'auto' | 'text' | 'zoom-out' | 'zoom-in' | 'initial' | 'inherit' | 'move' | 'row-resize' | 'col-resize' | 'nesw-resize' | 'nwse-resize' | 'not-allowed';
3
- export declare type Display = 'relative' | 'absolute' | 'inline' | 'inline-block' | 'flex' | 'grid' | 'none' | 'contents';
3
+ export declare type Display = 'relative' | 'absolute' | 'inline' | 'inline-block' | 'flex' | 'grid' | 'none' | 'contents' | 'inline-flex';
4
4
  export declare type Position = 'absolute' | 'fixed' | 'sticky' | 'relative' | 'static';
5
5
  declare type FlexBaseValues = 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'initial' | 'inherit';
6
6
  export declare type CSSGridBaseValues = 'start' | 'end' | 'space-evenly' | 'center';
@@ -0,0 +1,3 @@
1
+ import { TextColor } from "../../atoms/typography/text";
2
+ import { IconColors } from "../../exports/atoms";
3
+ export declare const convertTextColorToIconColor: (textColor: TextColor) => IconColors;
@@ -1,6 +1,6 @@
1
1
  import { FC } from 'react';
2
2
  export declare type ConfigurationCardProps = {
3
- graphic: 'blank' | 'addressed' | 'withStamp';
3
+ graphic: 'blank' | 'addressed' | 'withStamp' | 'none';
4
4
  title: string;
5
5
  description: string;
6
6
  cost?: number | string;
@@ -8,5 +8,6 @@ export declare type ConfigurationCardProps = {
8
8
  onSelect: (configurationId: string) => void;
9
9
  layout?: 'horizontal' | 'vertical';
10
10
  configurationId: string;
11
+ itemPriceTitle?: string;
11
12
  };
12
13
  export declare const ConfigurationCard: FC<ConfigurationCardProps>;
@@ -1,14 +1,13 @@
1
1
  import { FC } from 'react';
2
2
  import { TextColor } from "../../atoms/typography/text";
3
3
  import { SizeType } from "../../types/global";
4
- import { IconColors, IconType } from "../../exports/atoms";
4
+ import { IconType } from "../../exports/atoms";
5
5
  import { HOCSwatchColorKeys } from "../../helpers/hoc-types/entityValueTypes";
6
6
  export declare type FeatureBadgeProps = {
7
7
  title: string;
8
8
  backgroundColor?: HOCSwatchColorKeys;
9
9
  icon?: IconType;
10
- iconColor?: IconColors;
11
- textColor?: TextColor;
10
+ color?: TextColor;
12
11
  size?: SizeType;
13
12
  onClick?: () => void;
14
13
  };
@@ -1,6 +1,9 @@
1
1
  import { FC } from 'react';
2
2
  import { HOCMotionProps } from "../../helpers/hoc-types/hocMotionTypes";
3
+ import { Responsive } from "../../helpers/hoc-types/entityValueTypes";
4
+ import { Position } from "../../helpers/hoc-types/cssValueTypes";
3
5
  export declare type OverlayPropTypes = {
4
6
  zIndex?: number;
7
+ position?: Responsive<Position> | Position;
5
8
  } & HOCMotionProps;
6
9
  export declare const Overlay: FC<OverlayPropTypes>;
@@ -10,5 +10,6 @@ export declare type QuantitySliderProps = {
10
10
  unitPrice: number;
11
11
  quantityDescription?: string;
12
12
  width: number;
13
+ hasIncrement?: boolean;
13
14
  };
14
15
  export declare const QuantitySlider: FC<QuantitySliderProps>;
@@ -5,6 +5,7 @@ export declare type TooltipProps = {
5
5
  direction: DirectionType;
6
6
  background?: ColorModeType;
7
7
  repositionTooltip?: boolean;
8
+ zIndex?: number;
8
9
  };
9
10
  export declare type DirectionType = 'left' | 'right' | 'top' | 'bottom';
10
11
  export declare const Tooltip: FC<TooltipProps>;
@@ -1,9 +1,11 @@
1
1
  import { FC } from 'react';
2
2
  import { IconType, IconColors, orientation } from "../../exports/atoms";
3
+ import { Shadows } from "../../helpers/hoc-types/entityValueTypes";
3
4
  export declare type PillProps = {
4
5
  title?: string;
5
6
  items: PillItemsType[];
6
7
  flexDirection?: 'row' | 'row-reverse';
8
+ boxShadow?: Shadows;
7
9
  };
8
10
  export declare type PillItemsType = {
9
11
  title: string;
@@ -1,10 +1,12 @@
1
1
  import { FC } from 'react';
2
2
  import { SizeType, ThemeMode } from "../../types/global";
3
+ import { BackgroundColor } from "../../helpers/hoc-types/hocBaseUnion";
3
4
  export declare type PromotionWidgetProps = {
4
5
  title: string;
5
6
  description: string;
6
7
  capsuleTitle: string;
7
- primaryAction: {
8
+ backgroundColor?: BackgroundColor;
9
+ primaryAction?: {
8
10
  onClick: () => void;
9
11
  title: string;
10
12
  };
@@ -1,12 +1,21 @@
1
1
  import { FC } from 'react';
2
2
  import { SliderProgressColor } from "../../../../exports/molecules";
3
3
  import { ConfirmDialogProps } from "../../../../exports/organisms";
4
+ export declare type ConfigurationOptionSection = {
5
+ title: string;
6
+ description: string;
7
+ tag?: string;
8
+ activeConfigurationId: string;
9
+ setActiveConfigurationId: (configurationId: string) => void;
10
+ configurationList: ConfigurationListOption[];
11
+ };
4
12
  declare type ConfigurationListOption = {
5
- graphicType: 'blank' | 'addressed' | 'withStamp';
13
+ graphicType: 'blank' | 'addressed' | 'withStamp' | 'none';
6
14
  configurationId: string;
7
15
  configurationTitle: string;
8
16
  configurationDescription: string;
9
17
  configurationPrice?: number;
18
+ configurationItemPriceTitle?: string;
10
19
  };
11
20
  export declare type BulkSendProps = {
12
21
  quantity: number;
@@ -16,21 +25,19 @@ export declare type BulkSendProps = {
16
25
  maxQuantity: number;
17
26
  sliderFill: SliderProgressColor;
18
27
  sliderWidth: number;
19
- activeConfigurationId: string;
20
- setActiveConfigurationId: (activeConfigurationId: string) => void;
21
28
  unitPrice: number;
22
29
  salePrice?: number;
23
30
  title: string;
24
31
  description: string;
25
- configurationListTitle: string;
26
- configurationListSubtitle: string;
27
- configurationListTag?: string;
28
- configurationList: ConfigurationListOption[];
32
+ configurationSections: ConfigurationOptionSection[];
29
33
  isDisabled?: boolean;
30
34
  isActive: boolean;
31
35
  setIsActive: (isActive: boolean) => void;
32
36
  addDialog?: ConfirmDialogProps;
33
37
  removeDialog?: ConfirmDialogProps;
38
+ hasIncrement?: boolean;
39
+ isConfigurable?: boolean;
40
+ disableMessage: string;
34
41
  };
35
42
  export declare const BulkSend: FC<BulkSendProps>;
36
43
  export {};
@@ -2,3 +2,4 @@ import { Meta } from '@storybook/react/types-6-0';
2
2
  declare const _default: Meta<import("@storybook/react/types-6-0").Args>;
3
3
  export default _default;
4
4
  export declare const ConfigurationCardWithCallback: any;
5
+ export declare const ConfigurationInfoCard: any;
@@ -2,5 +2,4 @@ import { SliderProps } from "../../exports/molecules";
2
2
  import { Meta, Story } from '@storybook/react/types-6-0';
3
3
  declare const _default: Meta<import("@storybook/react/types-6-0").Args>;
4
4
  export default _default;
5
- export declare const Left: Story<SliderProps>;
6
- export declare const Center: Story<SliderProps>;
5
+ export declare const Primary: Story<SliderProps>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sendoutcards/quantum-design-ui",
3
- "version": "1.6.5",
3
+ "version": "1.6.9",
4
4
  "description": "UI component library for Quantum Design System",
5
5
  "module": "dist/index.es.js",
6
6
  "jsnext:main": "dist/index.es.js",