@sendoutcards/quantum-design-ui 1.8.39 → 1.8.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.
Files changed (2) hide show
  1. package/dist/index.es.js +33 -29
  2. package/package.json +1 -1
package/dist/index.es.js CHANGED
@@ -12034,26 +12034,30 @@ const useOutsideClick = (ref, handler, targetIdBypass) => {
12034
12034
  };
12035
12035
 
12036
12036
  const Div = /*#__PURE__*/React.forwardRef((props, ref) => {
12037
- const rest = __rest(props, []);
12037
+ const {
12038
+ animate,
12039
+ children,
12040
+ className,
12041
+ clickElementBypass,
12042
+ motionKey,
12043
+ onClick,
12044
+ onMouseEvent,
12045
+ outsideClick
12046
+ } = props,
12047
+ rest = __rest(props, ["animate", "children", "className", "clickElementBypass", "motionKey", "onClick", "onMouseEvent", "outsideClick"]);
12038
12048
  const entities = useEntities();
12039
12049
  const generatedDivStyles = generateStyles(props, entities);
12040
12050
  useOutsideClick(ref, () => {
12041
- props.outsideClick && props.outsideClick();
12042
- }, props.clickElementBypass);
12043
- return jsx(motion.div, _extends({}, props, {
12044
- key: props.motionKey,
12051
+ outsideClick && outsideClick();
12052
+ }, clickElementBypass);
12053
+ return jsx(motion.div, _extends({}, rest, {
12054
+ key: motionKey,
12045
12055
  ref: ref,
12046
- animate: process.env.NODE_ENV === 'test' ? undefined : props.animate,
12047
- onClick: props.onMouseEvent ? e => {
12048
- var _a;
12049
- return (_a = props.onMouseEvent) === null || _a === void 0 ? void 0 : _a.call(props, e);
12050
- } : () => {
12051
- var _a;
12052
- return (_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props);
12053
- },
12056
+ animate: process.env.NODE_ENV === 'test' ? undefined : animate,
12057
+ onClick: onMouseEvent ? e => onMouseEvent === null || onMouseEvent === void 0 ? void 0 : onMouseEvent(e) : () => onClick === null || onClick === void 0 ? void 0 : onClick(),
12054
12058
  css: styles$R.divStyles(generatedDivStyles),
12055
- className: `${props.className ? props.className : ''}`
12056
- }, rest), props.children);
12059
+ className: `${className ? className : ''}`
12060
+ }), children);
12057
12061
  });
12058
12062
 
12059
12063
  const useWindowSize = () => {
@@ -12589,28 +12593,27 @@ var styles$L = {
12589
12593
  const Flex = props => {
12590
12594
  const entities = useEntities();
12591
12595
  const {
12592
- display = 'flex'
12596
+ display = 'flex',
12597
+ onClick,
12598
+ onMouseEvent,
12599
+ outsideClick,
12600
+ className,
12601
+ children
12593
12602
  } = props,
12594
- rest = __rest(props, ["display"]);
12595
- const generatedDivStyles = generateStyles(Object.assign({
12603
+ rest = __rest(props, ["display", "onClick", "onMouseEvent", "outsideClick", "className", "children"]);
12604
+ const generatedDivStyles = generateStyles(Object.assign(Object.assign({}, props), {
12596
12605
  display
12597
- }, rest), entities);
12606
+ }), entities);
12598
12607
  const ref = useRef(null);
12599
12608
  useOutsideClick(ref, () => {
12600
- props.outsideClick && props.outsideClick();
12609
+ outsideClick === null || outsideClick === void 0 ? void 0 : outsideClick();
12601
12610
  });
12602
12611
  return jsx(motion.main, _extends({}, rest, {
12603
12612
  ref: ref,
12604
- onClick: props.onMouseEvent ? e => {
12605
- var _a;
12606
- return (_a = props.onMouseEvent) === null || _a === void 0 ? void 0 : _a.call(props, e);
12607
- } : () => {
12608
- var _a;
12609
- return (_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props);
12610
- },
12613
+ onClick: onMouseEvent ? e => onMouseEvent === null || onMouseEvent === void 0 ? void 0 : onMouseEvent(e) : () => onClick === null || onClick === void 0 ? void 0 : onClick(),
12611
12614
  css: styles$L.flexStyles(generatedDivStyles),
12612
- className: `${props.className ? props.className : ''}`
12613
- }), props.children);
12615
+ className: `${className ? className : ''}`
12616
+ }), children);
12614
12617
  };
12615
12618
 
12616
12619
  function _EMOTION_STRINGIFIED_CSS_ERROR__$u() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
@@ -12783,6 +12786,7 @@ const HStack = ({
12783
12786
  if (child) {
12784
12787
  const isLastItem = i === childrenArray.length - 1;
12785
12788
  return jsx(Div, {
12789
+ key: i,
12786
12790
  outset: typeof gap === 'object' ? gap : {
12787
12791
  right: isLastItem ? 'x0' : gap,
12788
12792
  bottom: shouldWrap ? gap : 'x0'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sendoutcards/quantum-design-ui",
3
- "version": "1.8.39",
3
+ "version": "1.8.40",
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",