@sendoutcards/quantum-design-ui 1.7.64 → 1.7.67

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
@@ -12353,41 +12353,6 @@ var Capsule = function (_a) {
12353
12353
  }));
12354
12354
  };
12355
12355
 
12356
- var ColorThumbnail = function (_a) {
12357
- var backgroundColor = _a.backgroundColor,
12358
- isSelected = _a.isSelected,
12359
- onSelect = _a.onSelect,
12360
- _b = _a.thumbnailSize,
12361
- thumbnailSize = _b === void 0 ? '32px' : _b,
12362
- outset = _a.outset,
12363
- _c = _a.isRounded,
12364
- isRounded = _c === void 0 ? false : _c;
12365
- var selectedThumbnailSize = "calc(" + thumbnailSize + " / 2.75)";
12366
- return jsx(Flex, {
12367
- onClick: function () {
12368
- return onSelect(backgroundColor);
12369
- },
12370
- backgroundColor: backgroundColor,
12371
- whileHover: {
12372
- scale: 1.2
12373
- },
12374
- cursor: "pointer",
12375
- borderRadius: isRounded ? 'circle' : 'small',
12376
- width: thumbnailSize,
12377
- height: thumbnailSize,
12378
- minWidth: thumbnailSize,
12379
- outset: outset,
12380
- justifyContent: "center",
12381
- alignItems: "center"
12382
- }, isSelected && jsx(Div, {
12383
- backgroundColor: "foreground",
12384
- width: selectedThumbnailSize,
12385
- height: selectedThumbnailSize,
12386
- borderRadius: isRounded ? 'circle' : '3px',
12387
- boxShadow: "mediumLight"
12388
- }));
12389
- };
12390
-
12391
12356
  var computeButtonSizeProperties = function (size, sizeMap) {
12392
12357
  return mapSizeType(size, sizeMap);
12393
12358
  };
@@ -19711,16 +19676,16 @@ var DropperIcon = function (props) {
19711
19676
  };
19712
19677
 
19713
19678
  var QuantumColorPicker = function (_a) {
19679
+ var _b;
19680
+
19714
19681
  var color = _a.color,
19715
19682
  onChange = _a.onChange,
19716
19683
  convertedColorCallback = _a.convertedColorCallback,
19717
- _b = _a.convertedColorType,
19718
- convertedColorType = _b === void 0 ? 'hex' : _b,
19719
- _c = _a.showEyeDropper,
19720
- showEyeDropper = _c === void 0 ? false : _c,
19721
- palettes = _a.palettes,
19722
- _d = _a.paletteTitle,
19723
- paletteTitle = _d === void 0 ? 'Presets' : _d;
19684
+ _c = _a.convertedColorType,
19685
+ convertedColorType = _c === void 0 ? 'hex' : _c,
19686
+ _d = _a.showEyeDropper,
19687
+ showEyeDropper = _d === void 0 ? false : _d,
19688
+ palette = _a.palette;
19724
19689
 
19725
19690
  var _e = useResizeObserver(),
19726
19691
  ref = _e.ref,
@@ -19794,11 +19759,11 @@ var QuantumColorPicker = function (_a) {
19794
19759
  return handleOnChange(formattedHexValue(value));
19795
19760
  },
19796
19761
  type: "text"
19797
- })), palettes && jsx(React.Fragment, null, jsx(Spacer, {
19762
+ })), palette && palette.colors && jsx(React.Fragment, null, jsx(Spacer, {
19798
19763
  space: "x1"
19799
19764
  }), jsx(Text, {
19800
19765
  type: "caption",
19801
- content: paletteTitle,
19766
+ content: (_b = palette.title) !== null && _b !== void 0 ? _b : 'Presets',
19802
19767
  color: "primaryBody",
19803
19768
  lineHeight: 1.2,
19804
19769
  inset: {
@@ -19810,21 +19775,25 @@ var QuantumColorPicker = function (_a) {
19810
19775
  css: styles$7.thumbnailContainer,
19811
19776
  overflowX: "auto",
19812
19777
  width: "100%",
19813
- height: "95px",
19814
19778
  justifyContent: "flex-start",
19815
19779
  flexWrap: 'wrap',
19816
- alignItems: "center"
19817
- }, palettes.map(function (palette, index) {
19780
+ alignItems: "center",
19781
+ inset: {
19782
+ bottom: '6px'
19783
+ }
19784
+ }, palette.colors.map(function (paletteColor, index) {
19818
19785
  return jsx(ColorThumbnail, {
19819
19786
  key: index,
19820
19787
  isRounded: true,
19821
- backgroundColor: palette,
19822
- isSelected: palette === color,
19788
+ isLoading: palette.isLoading,
19789
+ backgroundColor: paletteColor,
19790
+ isSelected: paletteColor === color,
19823
19791
  onSelect: function (value) {
19824
19792
  handleOnChange(formattedHexValue(value));
19825
19793
  },
19826
19794
  outset: {
19827
- horizontal: 'x1'
19795
+ horizontal: 'x1',
19796
+ top: 'x1'
19828
19797
  }
19829
19798
  });
19830
19799
  }))));
@@ -20203,7 +20172,9 @@ var PricingTile = function (_a) {
20203
20172
  hasShadow = _h === void 0 ? true : _h,
20204
20173
  disclaimer = _a.disclaimer,
20205
20174
  _j = _a.isSelected,
20206
- isSelected = _j === void 0 ? false : _j;
20175
+ isSelected = _j === void 0 ? false : _j,
20176
+ _k = _a.isFullLength,
20177
+ isFullLength = _k === void 0 ? false : _k;
20207
20178
  var hocs = useEntities().hocs;
20208
20179
 
20209
20180
  var getIconColorFromAccentColor = function (accentColor) {
@@ -20251,16 +20222,17 @@ var PricingTile = function (_a) {
20251
20222
 
20252
20223
  var featureTextColor = isFeatured ? featuredItemStyles.textColor === 'white' ? 'inverseBody' : 'primaryBody' : textColor === 'white' ? 'inverseBody' : 'primaryBody';
20253
20224
 
20254
- var _k = useState(false),
20255
- isDisclaimerOpen = _k[0],
20256
- setDisclaimerOpen = _k[1];
20225
+ var _l = useState(false),
20226
+ isDisclaimerOpen = _l[0],
20227
+ setDisclaimerOpen = _l[1];
20257
20228
 
20258
20229
  return jsx(Flex, {
20230
+ id: "pricingTileContainerQDS",
20259
20231
  inset: "x5",
20260
20232
  backgroundColor: isFeatured ? hocs.textColors[featuredItemStyles.backgroundColor] : hocs.textColors[backgroundColor],
20261
20233
  width: "100%",
20262
20234
  position: "relative",
20263
- height: "fit-content",
20235
+ height: isFullLength ? 'auto' : 'fit-content',
20264
20236
  borderStyle: 'solid',
20265
20237
  borderColor: isSelected ? {
20266
20238
  swatch: 'success',
@@ -20713,7 +20685,7 @@ var MobileView = function (_a) {
20713
20685
  setOpenSection(false);
20714
20686
  };
20715
20687
 
20716
- var section = links[currentSection];
20688
+ var section = links ? links[currentSection] : undefined;
20717
20689
 
20718
20690
  var isLinkType = function (valueToCheck) {
20719
20691
  var link = valueToCheck;
@@ -20737,7 +20709,7 @@ var MobileView = function (_a) {
20737
20709
  width: "100%"
20738
20710
  }, jsx(VStack, {
20739
20711
  gap: "x0"
20740
- }, links.map(function (item, i) {
20712
+ }, links && links.map(function (item, i) {
20741
20713
  return isLinkType(item) ? jsx(Anchor, _extends({
20742
20714
  inset: {
20743
20715
  horizontal: 'x3'
@@ -20779,7 +20751,7 @@ var MobileView = function (_a) {
20779
20751
  }
20780
20752
  }, jsx(Div, {
20781
20753
  width: "100%"
20782
- }, !isLinkType(section) && jsx(React.Fragment, null, jsx(Div, {
20754
+ }, section && !isLinkType(section) && jsx(React.Fragment, null, jsx(Div, {
20783
20755
  cursor: "pointer",
20784
20756
  display: "flex",
20785
20757
  width: "100%",
@@ -20906,24 +20878,24 @@ var StaticNavigation = function (_a) {
20906
20878
  horizontal: 'x3'
20907
20879
  },
20908
20880
  zIndex: zIndex
20909
- }, isMobile && jsx(Div, null, jsx(IconLink, {
20881
+ }, links && isMobile && jsx(Div, null, jsx(IconLink, {
20910
20882
  size: isOpen ? 'xSmall' : 'small',
20911
20883
  icon: isOpen ? 'close' : 'hamburger',
20912
20884
  onClick: function () {
20913
20885
  return setIsOpen(!isOpen);
20914
20886
  }
20915
- })), jsx(Logo, {
20887
+ })), !links && !isMobile && jsx("div", null), jsx(Logo, {
20916
20888
  brand: logo.brand,
20917
20889
  href: logo.href,
20918
20890
  onClick: logo.onClick,
20919
20891
  color: logo.color,
20920
20892
  width: isMobile ? '130px' : '200px'
20921
- }), !isMobile && jsx(Flex, {
20893
+ }), links && !isMobile && jsx(Flex, {
20922
20894
  height: "100%",
20923
20895
  width: "100%",
20924
20896
  alignItems: "center",
20925
20897
  justifyContent: "center"
20926
- }, links.map(function (link, index) {
20898
+ }, links && links.map(function (link, index) {
20927
20899
  return jsx(Div, {
20928
20900
  inset: {
20929
20901
  horizontal: size === 'large' ? 'x1' : 'x2'
@@ -20969,7 +20941,7 @@ var StaticNavigation = function (_a) {
20969
20941
  }, jsx(Div, {
20970
20942
  outset: "x3",
20971
20943
  ref: ref
20972
- }, links.map(function (link, index) {
20944
+ }, links && links.map(function (link, index) {
20973
20945
  return selectedTab === index && jsx(HStack, {
20974
20946
  key: index,
20975
20947
  gap: "x9",
@@ -21010,7 +20982,7 @@ var StaticNavigation = function (_a) {
21010
20982
  subLinkColor: column.linkColor ? column.linkColor : 'primaryBody'
21011
20983
  })));
21012
20984
  }));
21013
- })))), isMobile && jsx(Div, {
20985
+ })))), links && isMobile && jsx(Div, {
21014
20986
  height: "calc(100% - " + drawerOffset + "px)",
21015
20987
  position: "fixed",
21016
20988
  left: "0px",
@@ -22740,6 +22712,67 @@ var UploadButton = /*#__PURE__*/React.forwardRef(function (props, ref) {
22740
22712
  });
22741
22713
  var templateObject_1$2, templateObject_2, templateObject_3;
22742
22714
 
22715
+ var ColorThumbnailLoader = function (_a) {
22716
+ var diameter = _a.diameter,
22717
+ outset = _a.outset;
22718
+ var radius = diameter / 2;
22719
+ return jsx(Flex, {
22720
+ outset: outset
22721
+ }, jsx(Loader, {
22722
+ width: diameter,
22723
+ height: diameter
22724
+ }, jsx("circle", {
22725
+ cy: radius,
22726
+ cx: radius,
22727
+ r: radius
22728
+ })));
22729
+ };
22730
+
22731
+ var ColorThumbnail = function (_a) {
22732
+ var backgroundColor = _a.backgroundColor,
22733
+ isSelected = _a.isSelected,
22734
+ onSelect = _a.onSelect,
22735
+ _b = _a.thumbnailSize,
22736
+ thumbnailSize = _b === void 0 ? 32 : _b,
22737
+ outset = _a.outset,
22738
+ _c = _a.isRounded,
22739
+ isRounded = _c === void 0 ? false : _c,
22740
+ _d = _a.isLoading,
22741
+ isLoading = _d === void 0 ? false : _d;
22742
+ var selectedThumbnailSize = "calc(" + thumbnailSize + " / 2.75)";
22743
+
22744
+ if (isLoading) {
22745
+ return jsx(ColorThumbnailLoader, {
22746
+ diameter: thumbnailSize,
22747
+ outset: outset
22748
+ });
22749
+ }
22750
+
22751
+ return jsx(Flex, {
22752
+ onClick: function () {
22753
+ return onSelect(backgroundColor);
22754
+ },
22755
+ backgroundColor: backgroundColor,
22756
+ whileHover: {
22757
+ scale: 1.2
22758
+ },
22759
+ cursor: "pointer",
22760
+ borderRadius: isRounded ? 'circle' : 'small',
22761
+ width: thumbnailSize + "px",
22762
+ height: thumbnailSize + "px",
22763
+ minWidth: thumbnailSize + "px",
22764
+ outset: outset,
22765
+ justifyContent: "center",
22766
+ alignItems: "center"
22767
+ }, isSelected && jsx(Div, {
22768
+ backgroundColor: "foreground",
22769
+ width: selectedThumbnailSize,
22770
+ height: selectedThumbnailSize,
22771
+ borderRadius: isRounded ? 'circle' : '3px',
22772
+ boxShadow: "mediumLight"
22773
+ }));
22774
+ };
22775
+
22743
22776
  var _emotionSourceMap$1 = process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFHd0IiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgX19tYWtlVGVtcGxhdGVPYmplY3QgfSBmcm9tIFwidHNsaWJcIjtcclxuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vY29yZSc7XHJcbmV4cG9ydCBkZWZhdWx0IHtcclxuICAgIHRodW1ibmFpbENvbnRhaW5lcjogY3NzKHRlbXBsYXRlT2JqZWN0XzEgfHwgKHRlbXBsYXRlT2JqZWN0XzEgPSBfX21ha2VUZW1wbGF0ZU9iamVjdChbXCJcIl0sIFtcIlwiXSkpKSxcclxufTtcclxudmFyIHRlbXBsYXRlT2JqZWN0XzE7XHJcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPXN0eWxlcy5qcy5tYXAiXX0= */";
22744
22777
  var styles$1 = {
22745
22778
  thumbnailContainer: /*#__PURE__*/css(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject([";label:thumbnailContainer;" + _emotionSourceMap$1], [";label:thumbnailContainer;" + _emotionSourceMap$1])))
@@ -4,8 +4,9 @@ export declare type ColorThumbnailProps = {
4
4
  backgroundColor: string;
5
5
  isSelected: boolean;
6
6
  isRounded?: boolean;
7
- thumbnailSize?: string;
7
+ thumbnailSize?: number;
8
8
  outset?: SpacingDirection | LiteralUnion<HOCSpacingKeys>;
9
9
  onSelect: (fill: string) => void;
10
+ isLoading?: boolean;
10
11
  };
11
12
  export declare const ColorThumbnail: FC<ColorThumbnailProps>;
@@ -0,0 +1,8 @@
1
+ import { FC } from 'react';
2
+ import { HOCSpacingKeys, SpacingDirection, LiteralUnion } from "../../../helpers/hoc-types/entityValueTypes";
3
+ declare type ColorThumbnailLoaderProps = {
4
+ diameter: number;
5
+ outset?: SpacingDirection | LiteralUnion<HOCSpacingKeys>;
6
+ };
7
+ export declare const ColorThumbnailLoader: FC<ColorThumbnailLoaderProps>;
8
+ export {};
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import { HOCBaseProps } from "../../helpers/hoc-types/hocBasePropTypes";
3
+ import { HOCMotionProps } from "../../helpers/hoc-types/hocMotionTypes";
4
+ export declare type DivProps = {
5
+ children?: React.ReactNode;
6
+ outsideClick?: () => void;
7
+ clickElementBypass?: string;
8
+ } & HOCBaseProps & HOCMotionProps;
9
+ export declare const Companion: React.ForwardRefExoticComponent<{
10
+ children?: React.ReactNode;
11
+ outsideClick?: (() => void) | undefined;
12
+ clickElementBypass?: string | undefined;
13
+ } & HOCBaseProps & {
14
+ className?: string | undefined;
15
+ motionKey?: string | number | undefined;
16
+ id?: string | undefined;
17
+ } & import("framer-motion").MotionProps & React.RefAttributes<HTMLDivElement>>;
@@ -40,6 +40,7 @@ export declare type PricingTileProps = {
40
40
  hasShadow?: boolean;
41
41
  disclaimer?: Disclaimer;
42
42
  isSelected?: boolean;
43
+ isFullLength?: boolean;
43
44
  };
44
45
  export declare const PricingTile: FC<PricingTileProps>;
45
46
  export {};
@@ -10,7 +10,11 @@ export declare type QuantumColorPickerProps = {
10
10
  convertedColorCallback?: (color: ConvertedColorType) => void;
11
11
  convertedColorType?: 'hex' | 'rgb' | 'hsl';
12
12
  showEyeDropper?: boolean;
13
- palettes?: QuantumHex[];
14
- paletteTitle?: string;
13
+ palette?: {
14
+ title?: string;
15
+ colors: QuantumHex[];
16
+ isLoading?: boolean;
17
+ count?: number;
18
+ };
15
19
  };
16
20
  export declare const QuantumColorPicker: FC<QuantumColorPickerProps>;
@@ -2,7 +2,7 @@ import { FC } from 'react';
2
2
  import { DropdownLink, Link } from '../staticNavigation';
3
3
  declare type MobileViewProps = {
4
4
  isOpen: boolean;
5
- links: (DropdownLink | Link)[];
5
+ links?: (DropdownLink | Link)[];
6
6
  toggle: () => void;
7
7
  };
8
8
  export declare const MobileView: FC<MobileViewProps>;
@@ -28,7 +28,7 @@ export declare type StaticNavigationProps = {
28
28
  onClick?: () => void;
29
29
  };
30
30
  accountSection?: React.ReactNode;
31
- links: (DropdownLink | Link)[];
31
+ links?: (DropdownLink | Link)[];
32
32
  zIndex?: number;
33
33
  openValueOverride?: number;
34
34
  drawerOffset?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sendoutcards/quantum-design-ui",
3
- "version": "1.7.64",
3
+ "version": "1.7.67",
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",