@sendoutcards/quantum-design-ui 1.8.39-alpha.1 → 1.8.39-alpha.3

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
@@ -1,4 +1,4 @@
1
- import React, { useState, useEffect, createContext, useContext, useCallback, useMemo, useRef, useLayoutEffect, useImperativeHandle } from 'react';
1
+ import React, { useState, useEffect, createContext, useRef, useCallback, useContext, useMemo, useLayoutEffect, useImperativeHandle } from 'react';
2
2
  import { jsx, ThemeProvider, Global, css, useTheme } from '@emotion/react';
3
3
  import Color$1 from 'color';
4
4
  import { motion, useMotionValue, useTransform, animate, AnimatePresence, useElementScroll, AnimateSharedLayout, useAnimation } from 'framer-motion';
@@ -12351,6 +12351,12 @@ var styles$R = {
12351
12351
  var templateObject_1$V;
12352
12352
 
12353
12353
  var useOutsideClick = function (ref, handler, targetIdBypass) {
12354
+ // Store handler in a ref so we can access latest version without dependency
12355
+ var handlerRef = useRef(handler);
12356
+ // Update ref when handler changes
12357
+ useEffect(function () {
12358
+ handlerRef.current = handler;
12359
+ }, [handler]);
12354
12360
  useEffect(function () {
12355
12361
  var listener = function (event) {
12356
12362
  // Do nothing if clicking ref's element or descendent elements
@@ -12369,7 +12375,7 @@ var useOutsideClick = function (ref, handler, targetIdBypass) {
12369
12375
  if (!(ref === null || ref === void 0 ? void 0 : ref.current) || (ref === null || ref === void 0 ? void 0 : ref.current.contains(event.target))) {
12370
12376
  return;
12371
12377
  }
12372
- handler(event);
12378
+ handlerRef.current(event);
12373
12379
  };
12374
12380
  document.addEventListener('mousedown', listener);
12375
12381
  document.addEventListener('touchstart', listener);
@@ -12377,20 +12383,22 @@ var useOutsideClick = function (ref, handler, targetIdBypass) {
12377
12383
  document.removeEventListener('mousedown', listener);
12378
12384
  document.removeEventListener('touchstart', listener);
12379
12385
  };
12380
- },
12381
- // Add ref and handler to effect dependencies
12382
- // It's worth noting that because passed in handler is a new ...
12383
- // ... function on every render that will cause this effect ...
12384
- // ... callback/cleanup to run every render. It's not a big deal ...
12385
- // ... but to optimize you can wrap handler in useCallback before ...
12386
- // ... passing it into this hook.
12387
- [ref, handler, targetIdBypass]);
12386
+ }, [ref, targetIdBypass]);
12388
12387
  };
12389
12388
 
12390
- var Div = /*#__PURE__*/React.forwardRef(function (props, ref) {
12391
- var rest = __rest(props, []);
12389
+ var Div = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (props, ref) {
12390
+ var onMouseEvent = props.onMouseEvent,
12391
+ onClick = props.onClick,
12392
+ rest = __rest(props, ["onMouseEvent", "onClick"]);
12392
12393
  var entities = useEntities();
12393
12394
  var generatedDivStyles = generateStyles(props, entities);
12395
+ var handleClick = useCallback(function (e) {
12396
+ if (onMouseEvent) {
12397
+ onMouseEvent(e);
12398
+ } else {
12399
+ onClick === null || onClick === void 0 ? void 0 : onClick();
12400
+ }
12401
+ }, [onMouseEvent, onClick]);
12394
12402
  useOutsideClick(ref, function () {
12395
12403
  props.outsideClick && props.outsideClick();
12396
12404
  }, props.clickElementBypass);
@@ -12398,17 +12406,11 @@ var Div = /*#__PURE__*/React.forwardRef(function (props, ref) {
12398
12406
  key: props.motionKey,
12399
12407
  ref: ref,
12400
12408
  animate: process.env.NODE_ENV === 'test' ? undefined : props.animate,
12401
- onClick: props.onMouseEvent ? function (e) {
12402
- var _a;
12403
- return (_a = props.onMouseEvent) === null || _a === void 0 ? void 0 : _a.call(props, e);
12404
- } : function () {
12405
- var _a;
12406
- return (_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props);
12407
- },
12409
+ onClick: handleClick,
12408
12410
  css: styles$R.divStyles(generatedDivStyles),
12409
12411
  className: "".concat(props.className ? props.className : '')
12410
12412
  }, rest), props.children);
12411
- });
12413
+ }));
12412
12414
 
12413
12415
  var useWindowSize = function () {
12414
12416
  return useContext(WindowSizeContext);
@@ -12440,7 +12442,7 @@ var makeTextResponsive = function (size, callback, windowSize) {
12440
12442
  return callback(lastQuery);
12441
12443
  };
12442
12444
 
12443
- var Text = function (_a) {
12445
+ var Text = /*#__PURE__*/React.memo(function (_a) {
12444
12446
  var props = __rest(_a, []);
12445
12447
  var type = props.type,
12446
12448
  color = props.color,
@@ -12508,7 +12510,7 @@ var Text = function (_a) {
12508
12510
  inset: inset,
12509
12511
  outset: outset
12510
12512
  }, renderText) : renderText);
12511
- };
12513
+ });
12512
12514
 
12513
12515
  var mapSizeType = function (size, sizeMap) {
12514
12516
  return sizeMap[size];
@@ -12557,7 +12559,7 @@ var computeTextTypeFromInfoBlockSize = function (size) {
12557
12559
  });
12558
12560
  };
12559
12561
 
12560
- var Anchor = function (props) {
12562
+ var Anchor = /*#__PURE__*/React.memo(function (props) {
12561
12563
  var entities = useEntities();
12562
12564
  var _a = props.color,
12563
12565
  color = _a === void 0 ? 'primaryBody' : _a,
@@ -12567,29 +12569,32 @@ var Anchor = function (props) {
12567
12569
  _c = props.display,
12568
12570
  display = _c === void 0 ? 'inline-block' : _c,
12569
12571
  shouldDownload = props.shouldDownload,
12570
- rest = __rest(props, ["color", "size", "isDecorated", "display", "shouldDownload"]);
12572
+ onMouseEvent = props.onMouseEvent,
12573
+ onClick = props.onClick,
12574
+ rest = __rest(props, ["color", "size", "isDecorated", "display", "shouldDownload", "onMouseEvent", "onClick"]);
12571
12575
  var generatedDivStyles = generateStyles(__assign({
12572
12576
  display: display
12573
12577
  }, rest), entities);
12578
+ var handleClick = useCallback(function (e) {
12579
+ if (onMouseEvent) {
12580
+ onMouseEvent(e);
12581
+ } else {
12582
+ onClick === null || onClick === void 0 ? void 0 : onClick();
12583
+ }
12584
+ }, [onMouseEvent, onClick]);
12574
12585
  return jsx(motion.a, _extends({
12575
12586
  rel: "noopener noreferrer",
12576
12587
  target: rest.target
12577
12588
  }, rest, {
12578
12589
  href: rest.href,
12579
- onClick: rest.onMouseEvent ? function (e) {
12580
- var _a;
12581
- return (_a = rest.onMouseEvent) === null || _a === void 0 ? void 0 : _a.call(rest, e);
12582
- } : function () {
12583
- var _a;
12584
- return (_a = rest.onClick) === null || _a === void 0 ? void 0 : _a.call(rest);
12585
- },
12590
+ onClick: handleClick,
12586
12591
  download: shouldDownload,
12587
12592
  css: styles$T.anchorStyles(generatedDivStyles, entities, color, isDecorated)
12588
12593
  }), jsx(Text, {
12589
12594
  type: computeTextTypeFromSize(size),
12590
12595
  color: color
12591
12596
  }, rest.title || rest.children));
12592
- };
12597
+ });
12593
12598
 
12594
12599
  var styles$Q = {
12595
12600
  spanStyles: function (generatedStyles) {
@@ -12598,21 +12603,25 @@ var styles$Q = {
12598
12603
  };
12599
12604
  var templateObject_1$U;
12600
12605
 
12601
- var Span = function (props) {
12606
+ var Span = /*#__PURE__*/React.memo(function (props) {
12607
+ var onMouseEvent = props.onMouseEvent,
12608
+ onClick = props.onClick,
12609
+ rest = __rest(props, ["onMouseEvent", "onClick"]);
12602
12610
  var entities = useEntities();
12603
12611
  var generatedDivStyles = generateStyles(props, entities);
12604
- return jsx(motion.span, _extends({}, props, {
12605
- onClick: props.onMouseEvent ? function (e) {
12606
- var _a;
12607
- return (_a = props.onMouseEvent) === null || _a === void 0 ? void 0 : _a.call(props, e);
12608
- } : function () {
12609
- var _a;
12610
- return (_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props);
12611
- },
12612
+ var handleClick = useCallback(function (e) {
12613
+ if (onMouseEvent) {
12614
+ onMouseEvent(e);
12615
+ } else {
12616
+ onClick === null || onClick === void 0 ? void 0 : onClick();
12617
+ }
12618
+ }, [onMouseEvent, onClick]);
12619
+ return jsx(motion.span, _extends({}, rest, {
12620
+ onClick: handleClick,
12612
12621
  css: styles$Q.spanStyles(generatedDivStyles),
12613
- className: "".concat(props.className ? props.className : '')
12614
- }), props.children);
12615
- };
12622
+ className: "".concat(rest.className ? rest.className : '')
12623
+ }), rest.children);
12624
+ });
12616
12625
 
12617
12626
  var styles$P = {
12618
12627
  listContainer: function (orientation, alignment, listStyle, generatedStyles) {
@@ -12621,7 +12630,7 @@ var styles$P = {
12621
12630
  };
12622
12631
  var templateObject_1$T;
12623
12632
 
12624
- var List = /*#__PURE__*/React.forwardRef(function (props, ref) {
12633
+ var List = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (props, ref) {
12625
12634
  var _a = props.listStyle,
12626
12635
  listStyle = _a === void 0 ? 'none' : _a,
12627
12636
  rest = __rest(props, ["listStyle"]);
@@ -12632,7 +12641,7 @@ var List = /*#__PURE__*/React.forwardRef(function (props, ref) {
12632
12641
  className: "\n ".concat(rest.className ? rest.className : ''),
12633
12642
  ref: ref
12634
12643
  }), rest.children);
12635
- });
12644
+ }));
12636
12645
 
12637
12646
  var computeAvatarProperties = function (size, sizeMap) {
12638
12647
  return mapSizeType(size, sizeMap);
@@ -12879,20 +12888,24 @@ var styles$M = {
12879
12888
  };
12880
12889
  var templateObject_1$P;
12881
12890
 
12882
- var ListItem = function (props) {
12891
+ var ListItem = /*#__PURE__*/React.memo(function (props) {
12892
+ var onMouseEvent = props.onMouseEvent,
12893
+ onClick = props.onClick,
12894
+ rest = __rest(props, ["onMouseEvent", "onClick"]);
12883
12895
  var entities = useEntities();
12884
12896
  var generatedStyles = generateStyles(props, entities);
12885
- return jsx(motion.li, _extends({}, props, {
12886
- onClick: props.onMouseEvent ? function (e) {
12887
- var _a;
12888
- return (_a = props.onMouseEvent) === null || _a === void 0 ? void 0 : _a.call(props, e);
12889
- } : function () {
12890
- var _a;
12891
- return (_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props);
12892
- },
12893
- css: styles$M.listItem(generatedStyles, props.orientation, entities)
12894
- }), props.children);
12895
- };
12897
+ var handleClick = useCallback(function (e) {
12898
+ if (onMouseEvent) {
12899
+ onMouseEvent(e);
12900
+ } else {
12901
+ onClick === null || onClick === void 0 ? void 0 : onClick();
12902
+ }
12903
+ }, [onMouseEvent, onClick]);
12904
+ return jsx(motion.li, _extends({}, rest, {
12905
+ onClick: handleClick,
12906
+ css: styles$M.listItem(generatedStyles, rest.orientation, entities)
12907
+ }), rest.children);
12908
+ });
12896
12909
 
12897
12910
  var Bar = function (_a) {
12898
12911
  var height = _a.height,
@@ -12921,31 +12934,34 @@ var styles$L = {
12921
12934
  };
12922
12935
  var templateObject_1$O, templateObject_2$s;
12923
12936
 
12924
- var Flex = function (props) {
12937
+ var Flex = /*#__PURE__*/React.memo(function (props) {
12925
12938
  var entities = useEntities();
12926
12939
  var _a = props.display,
12927
12940
  display = _a === void 0 ? 'flex' : _a,
12928
- rest = __rest(props, ["display"]);
12941
+ onMouseEvent = props.onMouseEvent,
12942
+ onClick = props.onClick,
12943
+ rest = __rest(props, ["display", "onMouseEvent", "onClick"]);
12929
12944
  var generatedDivStyles = generateStyles(__assign({
12930
12945
  display: display
12931
12946
  }, rest), entities);
12932
12947
  var ref = useRef(null);
12948
+ var handleClick = useCallback(function (e) {
12949
+ if (onMouseEvent) {
12950
+ onMouseEvent(e);
12951
+ } else {
12952
+ onClick === null || onClick === void 0 ? void 0 : onClick();
12953
+ }
12954
+ }, [onMouseEvent, onClick]);
12933
12955
  useOutsideClick(ref, function () {
12934
- props.outsideClick && props.outsideClick();
12956
+ rest.outsideClick && rest.outsideClick();
12935
12957
  });
12936
12958
  return jsx(motion.main, _extends({}, rest, {
12937
12959
  ref: ref,
12938
- onClick: props.onMouseEvent ? function (e) {
12939
- var _a;
12940
- return (_a = props.onMouseEvent) === null || _a === void 0 ? void 0 : _a.call(props, e);
12941
- } : function () {
12942
- var _a;
12943
- return (_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props);
12944
- },
12960
+ onClick: handleClick,
12945
12961
  css: styles$L.flexStyles(generatedDivStyles),
12946
- className: "".concat(props.className ? props.className : '')
12947
- }), props.children);
12948
- };
12962
+ className: "".concat(rest.className ? rest.className : '')
12963
+ }), rest.children);
12964
+ });
12949
12965
 
12950
12966
  var LoadingSpinner = function (_a) {
12951
12967
  var size = _a.size,
@@ -13020,23 +13036,25 @@ var styles$K = {
13020
13036
  };
13021
13037
  var templateObject_1$M;
13022
13038
 
13023
- var Section = /*#__PURE__*/React.forwardRef(function (props, ref) {
13039
+ var Section = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (props, ref) {
13040
+ var onClick = props.onClick,
13041
+ rest = __rest(props, ["onClick"]);
13024
13042
  var entities = useEntities();
13025
13043
  var generatedDivStyles = generateStyles(props, entities);
13044
+ var handleClick = useCallback(function () {
13045
+ onClick === null || onClick === void 0 ? void 0 : onClick();
13046
+ }, [onClick]);
13026
13047
  useOutsideClick(ref, function () {
13027
- props.outsideClick && props.outsideClick();
13028
- }, props.clickElementBypass);
13029
- return jsx(motion.section, _extends({}, props, {
13048
+ rest.outsideClick && rest.outsideClick();
13049
+ }, rest.clickElementBypass);
13050
+ return jsx(motion.section, _extends({}, rest, {
13030
13051
  ref: ref,
13031
- animate: process.env.NODE_ENV === 'test' ? undefined : props.animate,
13032
- onClick: function () {
13033
- var _a;
13034
- return (_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props);
13035
- },
13052
+ animate: process.env.NODE_ENV === 'test' ? undefined : rest.animate,
13053
+ onClick: handleClick,
13036
13054
  css: styles$K.sectionStyles(generatedDivStyles),
13037
- className: "".concat(props.className ? props.className : '')
13038
- }), props.children);
13039
- });
13055
+ className: "".concat(rest.className ? rest.className : '')
13056
+ }), rest.children);
13057
+ }));
13040
13058
 
13041
13059
  var styles$J = {
13042
13060
  asideStyles: function (generatedStyles) {
@@ -13045,28 +13063,32 @@ var styles$J = {
13045
13063
  };
13046
13064
  var templateObject_1$L;
13047
13065
 
13048
- var Aside = /*#__PURE__*/React.forwardRef(function (props, ref) {
13066
+ var Aside = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (props, ref) {
13067
+ var onMouseEvent = props.onMouseEvent,
13068
+ onClick = props.onClick,
13069
+ rest = __rest(props, ["onMouseEvent", "onClick"]);
13049
13070
  var entities = useEntities();
13050
13071
  var generatedDivStyles = generateStyles(props, entities);
13072
+ var handleClick = useCallback(function (e) {
13073
+ if (onMouseEvent) {
13074
+ onMouseEvent(e);
13075
+ } else {
13076
+ onClick === null || onClick === void 0 ? void 0 : onClick();
13077
+ }
13078
+ }, [onMouseEvent, onClick]);
13051
13079
  useOutsideClick(ref, function () {
13052
- props.outsideClick && props.outsideClick();
13080
+ rest.outsideClick && rest.outsideClick();
13053
13081
  });
13054
- return jsx(motion.aside, _extends({}, props, {
13082
+ return jsx(motion.aside, _extends({}, rest, {
13055
13083
  ref: ref,
13056
- animate: process.env.NODE_ENV === 'test' ? undefined : props.animate,
13057
- onClick: props.onMouseEvent ? function (e) {
13058
- var _a;
13059
- return (_a = props.onMouseEvent) === null || _a === void 0 ? void 0 : _a.call(props, e);
13060
- } : function () {
13061
- var _a;
13062
- return (_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props);
13063
- },
13084
+ animate: process.env.NODE_ENV === 'test' ? undefined : rest.animate,
13085
+ onClick: handleClick,
13064
13086
  css: styles$J.asideStyles(generatedDivStyles),
13065
- className: "".concat(props.className ? props.className : '')
13066
- }), props.children);
13067
- });
13087
+ className: "".concat(rest.className ? rest.className : '')
13088
+ }), rest.children);
13089
+ }));
13068
13090
 
13069
- var VStack = function (_a) {
13091
+ var VStack = /*#__PURE__*/React.memo(function (_a) {
13070
13092
  var children = _a.children,
13071
13093
  gap = _a.gap,
13072
13094
  justifyContent = _a.justifyContent,
@@ -13090,9 +13112,9 @@ var VStack = function (_a) {
13090
13112
  inset: inset,
13091
13113
  outset: outset
13092
13114
  }, children);
13093
- };
13115
+ });
13094
13116
 
13095
- var HStack = function (_a) {
13117
+ var HStack = /*#__PURE__*/React.memo(function (_a) {
13096
13118
  var children = _a.children,
13097
13119
  gap = _a.gap,
13098
13120
  _b = _a.justify,
@@ -13105,7 +13127,9 @@ var HStack = function (_a) {
13105
13127
  outset = _a.outset,
13106
13128
  _e = _a.childWidth,
13107
13129
  childWidth = _e === void 0 ? 'initial' : _e;
13108
- var childrenArray = React.Children.toArray(children);
13130
+ var childrenArray = useMemo(function () {
13131
+ return React.Children.toArray(children);
13132
+ }, [children]);
13109
13133
  return jsx(Flex, {
13110
13134
  width: "auto",
13111
13135
  inset: inset,
@@ -13127,7 +13151,7 @@ var HStack = function (_a) {
13127
13151
  }
13128
13152
  return jsx(React.Fragment, null);
13129
13153
  }));
13130
- };
13154
+ });
13131
13155
 
13132
13156
  var Card = function (props) {
13133
13157
  var _a, _b;
@@ -13761,26 +13785,30 @@ var DragBox = /*#__PURE__*/React.forwardRef(function (_a, ref) {
13761
13785
  });
13762
13786
  });
13763
13787
 
13764
- var FlexItem = function (props) {
13788
+ var FlexItem = /*#__PURE__*/React.memo(function (props) {
13789
+ var onMouseEvent = props.onMouseEvent,
13790
+ onClick = props.onClick,
13791
+ rest = __rest(props, ["onMouseEvent", "onClick"]);
13765
13792
  var entities = useEntities();
13766
13793
  var generatedDivStyles = generateStyles(props, entities);
13767
13794
  var ref = useRef(null);
13795
+ var handleClick = useCallback(function (e) {
13796
+ if (onMouseEvent) {
13797
+ onMouseEvent(e);
13798
+ } else {
13799
+ onClick === null || onClick === void 0 ? void 0 : onClick();
13800
+ }
13801
+ }, [onMouseEvent, onClick]);
13768
13802
  useOutsideClick(ref, function () {
13769
- props.outsideClick && props.outsideClick();
13803
+ rest.outsideClick && rest.outsideClick();
13770
13804
  });
13771
- return jsx(motion.section, _extends({}, props, {
13805
+ return jsx(motion.section, _extends({}, rest, {
13772
13806
  ref: ref,
13773
- onClick: props.onMouseEvent ? function (e) {
13774
- var _a;
13775
- return (_a = props.onMouseEvent) === null || _a === void 0 ? void 0 : _a.call(props, e);
13776
- } : function () {
13777
- var _a;
13778
- return (_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props);
13779
- },
13807
+ onClick: handleClick,
13780
13808
  css: styles$L.flexItemStyles(generatedDivStyles),
13781
- className: "".concat(props.className ? props.className : '')
13782
- }), props.children);
13783
- };
13809
+ className: "".concat(rest.className ? rest.className : '')
13810
+ }), rest.children);
13811
+ });
13784
13812
 
13785
13813
  var styles$B = {
13786
13814
  sideNav: function (navigationEntity) {
@@ -16241,10 +16269,14 @@ var Tabs = function (_a) {
16241
16269
  _d = _a.justify,
16242
16270
  justify = _d === void 0 ? 'flex-start' : _d,
16243
16271
  children = _a.children;
16244
- var tabChildren = React.Children.toArray(children);
16245
- var tabKeys = tabChildren.map(function (tabChild) {
16246
- return tabChild.props.tabKey;
16247
- });
16272
+ var tabChildren = useMemo(function () {
16273
+ return React.Children.toArray(children);
16274
+ }, [children]);
16275
+ var tabKeys = useMemo(function () {
16276
+ return tabChildren.map(function (tabChild) {
16277
+ return tabChild.props.tabKey;
16278
+ });
16279
+ }, [tabChildren]);
16248
16280
  var ref = useRef(null);
16249
16281
  var hocs = useEntities().hocs;
16250
16282
  var _e = useState(tabKeys.indexOf(defaultActiveKey) || 0),
@@ -16357,7 +16389,9 @@ var Stoplight = function (_a) {
16357
16389
  _d = _a.isCollapsible,
16358
16390
  isCollapsible = _d === void 0 ? false : _d,
16359
16391
  children = _a.children;
16360
- var stoplightChildren = React.Children.toArray(children);
16392
+ var stoplightChildren = useMemo(function () {
16393
+ return React.Children.toArray(children);
16394
+ }, [children]);
16361
16395
  var stoplightRef = useRef(null);
16362
16396
  var colorOption = useEntities().colorOption;
16363
16397
  var computeBorderRadiusFromSize = function (size) {
@@ -20616,8 +20650,12 @@ var AnimatedGrid = function (_a) {
20616
20650
  _j = _a.maxWidth,
20617
20651
  maxWidth = _j === void 0 ? 1000 : _j,
20618
20652
  children = _a.children;
20619
- var gridChildren = React.Children.toArray(children);
20620
- var numChildren = gridChildren.length + (gridImages ? gridImages.length : 0);
20653
+ var gridChildren = useMemo(function () {
20654
+ return React.Children.toArray(children);
20655
+ }, [children]);
20656
+ var numChildren = useMemo(function () {
20657
+ return gridChildren.length + (gridImages ? gridImages.length : 0);
20658
+ }, [gridChildren, gridImages]);
20621
20659
  var rowHeight = rowSize + gap;
20622
20660
  var colWidth = columnSize + gap;
20623
20661
  var numCols = Math.floor(maxWidth / colWidth);
@@ -13,4 +13,4 @@ export declare type AnchorProps = {
13
13
  target?: '_blank' | '_self' | '_parent' | '_top';
14
14
  shouldDownload?: boolean;
15
15
  } & HOCBaseProps & HOCMotionProps;
16
- export declare const Anchor: (props: AnchorProps) => React.JSX.Element;
16
+ export declare const Anchor: React.MemoExoticComponent<(props: AnchorProps) => React.JSX.Element>;
@@ -6,7 +6,7 @@ export declare type AsideProps = {
6
6
  outsideClick?: () => void;
7
7
  clickElementBypass?: string;
8
8
  } & HOCBaseProps & HOCMotionProps;
9
- export declare const Aside: React.ForwardRefExoticComponent<{
9
+ export declare const Aside: React.MemoExoticComponent<React.ForwardRefExoticComponent<{
10
10
  children?: React.ReactNode;
11
11
  outsideClick?: (() => void) | undefined;
12
12
  clickElementBypass?: string | undefined;
@@ -14,4 +14,4 @@ export declare const Aside: React.ForwardRefExoticComponent<{
14
14
  className?: string | undefined;
15
15
  motionKey?: string | number | undefined;
16
16
  id?: string | undefined;
17
- } & import("framer-motion").MotionProps & React.RefAttributes<HTMLElement>>;
17
+ } & import("framer-motion").MotionProps & React.RefAttributes<HTMLElement>>>;
@@ -7,7 +7,7 @@ export declare type DivProps = {
7
7
  clickElementBypass?: string;
8
8
  tabIndex?: number;
9
9
  } & HOCBaseProps & HOCMotionProps;
10
- export declare const Div: React.ForwardRefExoticComponent<{
10
+ export declare const Div: React.MemoExoticComponent<React.ForwardRefExoticComponent<{
11
11
  children?: React.ReactNode;
12
12
  outsideClick?: (() => void) | undefined;
13
13
  clickElementBypass?: string | undefined;
@@ -16,4 +16,4 @@ export declare const Div: React.ForwardRefExoticComponent<{
16
16
  className?: string | undefined;
17
17
  motionKey?: string | number | undefined;
18
18
  id?: string | undefined;
19
- } & import("framer-motion").MotionProps & React.RefAttributes<HTMLDivElement>>;
19
+ } & import("framer-motion").MotionProps & React.RefAttributes<HTMLDivElement>>>;
@@ -5,4 +5,4 @@ export declare type FlexProps = {
5
5
  children?: React.ReactNode;
6
6
  outsideClick?: () => void;
7
7
  } & HOCBaseProps & HOCMotionProps;
8
- export declare const Flex: (props: FlexProps) => React.JSX.Element;
8
+ export declare const Flex: React.MemoExoticComponent<(props: FlexProps) => React.JSX.Element>;
@@ -5,4 +5,4 @@ export declare type FlexItemPropTypes = {
5
5
  children?: React.ReactNode;
6
6
  outsideClick?: () => void;
7
7
  } & HOCBaseProps & HOCMotionProps;
8
- export declare const FlexItem: (props: FlexItemPropTypes) => React.JSX.Element;
8
+ export declare const FlexItem: React.MemoExoticComponent<(props: FlexItemPropTypes) => React.JSX.Element>;
@@ -11,4 +11,4 @@ export declare type HStackProps = {
11
11
  childWidth?: string;
12
12
  children?: React.ReactNode;
13
13
  };
14
- export declare const HStack: ({ children, gap, justify, alignItems, shouldWrap, inset, outset, childWidth, }: HStackProps) => React.JSX.Element;
14
+ export declare const HStack: React.MemoExoticComponent<({ children, gap, justify, alignItems, shouldWrap, inset, outset, childWidth, }: HStackProps) => React.JSX.Element>;
@@ -10,7 +10,7 @@ export declare type ListProps = {
10
10
  export declare type ListOrientation = 'vertical' | 'horizontal';
11
11
  export declare type AlignmentOptions = 'left' | 'center' | 'right';
12
12
  export declare type ListStyleType = 'disc' | 'none' | 'circle';
13
- export declare const List: React.ForwardRefExoticComponent<{
13
+ export declare const List: React.MemoExoticComponent<React.ForwardRefExoticComponent<{
14
14
  orientation: ListOrientation;
15
15
  alignment: AlignmentOptions;
16
16
  children?: React.ReactNode;
@@ -19,4 +19,4 @@ export declare const List: React.ForwardRefExoticComponent<{
19
19
  className?: string | undefined;
20
20
  motionKey?: string | number | undefined;
21
21
  id?: string | undefined;
22
- } & import("framer-motion").MotionProps & React.RefAttributes<HTMLUListElement>>;
22
+ } & import("framer-motion").MotionProps & React.RefAttributes<HTMLUListElement>>>;
@@ -10,4 +10,4 @@ export declare type ListItemProps = {
10
10
  initial?: string;
11
11
  transition?: {};
12
12
  } & HOCBaseProps & HOCMotionProps;
13
- export declare const ListItem: (props: ListItemProps) => React.JSX.Element;
13
+ export declare const ListItem: React.MemoExoticComponent<(props: ListItemProps) => React.JSX.Element>;
@@ -6,7 +6,7 @@ export declare type SectionProps = {
6
6
  outsideClick?: () => void;
7
7
  clickElementBypass?: string;
8
8
  } & HOCBaseProps & HOCMotionProps;
9
- export declare const Section: React.ForwardRefExoticComponent<{
9
+ export declare const Section: React.MemoExoticComponent<React.ForwardRefExoticComponent<{
10
10
  children?: React.ReactNode;
11
11
  outsideClick?: (() => void) | undefined;
12
12
  clickElementBypass?: string | undefined;
@@ -14,4 +14,4 @@ export declare const Section: React.ForwardRefExoticComponent<{
14
14
  className?: string | undefined;
15
15
  motionKey?: string | number | undefined;
16
16
  id?: string | undefined;
17
- } & import("framer-motion").MotionProps & React.RefAttributes<HTMLElement>>;
17
+ } & import("framer-motion").MotionProps & React.RefAttributes<HTMLElement>>>;
@@ -4,4 +4,4 @@ import { HOCMotionProps } from "../../helpers/hoc-types/hocMotionTypes";
4
4
  export declare type SpanProps = {
5
5
  children?: React.ReactNode;
6
6
  } & HOCBaseProps & HOCMotionProps;
7
- export declare const Span: (props: SpanProps) => React.JSX.Element;
7
+ export declare const Span: React.MemoExoticComponent<(props: SpanProps) => React.JSX.Element>;
@@ -23,4 +23,4 @@ export declare type WeightType = keyof typeof entities.text.weights;
23
23
  export declare type TextType = keyof typeof entities.text.types;
24
24
  export declare type TextColor = keyof typeof entities.text.colors;
25
25
  export declare type AlignmentType = 'left' | 'center' | 'right';
26
- export declare const Text: ({ ...props }: TextProps) => React.JSX.Element;
26
+ export declare const Text: React.MemoExoticComponent<({ ...props }: TextProps) => React.JSX.Element>;
@@ -14,4 +14,4 @@ export declare type VStackProps = {
14
14
  overflow?: Overflow;
15
15
  children?: React.ReactNode;
16
16
  };
17
- export declare const VStack: ({ children, gap, justifyContent, alignItems, alignContent, inset, outset, width, height, overflow, }: VStackProps) => React.JSX.Element;
17
+ export declare const VStack: React.MemoExoticComponent<({ children, gap, justifyContent, alignItems, alignContent, inset, outset, width, height, overflow, }: VStackProps) => React.JSX.Element>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sendoutcards/quantum-design-ui",
3
- "version": "1.8.39-alpha.1",
3
+ "version": "1.8.39-alpha.3",
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",