@sendoutcards/quantum-design-ui 1.8.19 → 1.8.20

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
@@ -13615,7 +13615,8 @@ var Overlay = function (_a) {
13615
13615
  backgroundVariant = _b === void 0 ? 'solid' : _b,
13616
13616
  _c = _a.pinned,
13617
13617
  pinned = _c === void 0 ? 'center' : _c,
13618
- rest = __rest(_a, ["children", "zIndex", "animate", "initial", "exit", "variants", "transition", "motionKey", "position", "backgroundVariant", "pinned"]);
13618
+ shouldScroll = _a.shouldScroll,
13619
+ rest = __rest(_a, ["children", "zIndex", "animate", "initial", "exit", "variants", "transition", "motionKey", "position", "backgroundVariant", "pinned", "shouldScroll"]);
13619
13620
  var hocs = useEntities().hocs;
13620
13621
  var pinnedPosition = pinned === 'top' ? 'flex-start' : pinned === 'bottom' ? 'flex-end' : 'center';
13621
13622
  return jsx(Div, _extends({
@@ -13638,7 +13639,7 @@ var Overlay = function (_a) {
13638
13639
  backdropFilter: 'blur(20px)'
13639
13640
  } : undefined,
13640
13641
  backgroundColor: backgroundVariant !== 'blur' ? Color$1(hocs.colors.swatches.grayScale._800).rgb().alpha(0.98).toString() : undefined,
13641
- overflow: "hidden",
13642
+ overflow: shouldScroll ? 'scroll' : 'hidden',
13642
13643
  transition: transition
13643
13644
  }, rest), children);
13644
13645
  };
@@ -15011,6 +15012,7 @@ var Dialog = /*#__PURE__*/React.forwardRef(function (props, ref) {
15011
15012
  isFullScreen = props.isFullScreen,
15012
15013
  closeButtonId = props.closeButtonId,
15013
15014
  insetOverride = props.insetOverride,
15015
+ outsetOverride = props.outsetOverride,
15014
15016
  height = props.height,
15015
15017
  width = props.width,
15016
15018
  children = props.children,
@@ -15022,7 +15024,7 @@ var Dialog = /*#__PURE__*/React.forwardRef(function (props, ref) {
15022
15024
  pinned = _f === void 0 ? 'center' : _f,
15023
15025
  _g = props.backgroundVariant,
15024
15026
  backgroundVariant = _g === void 0 ? 'solid' : _g,
15025
- rest = __rest(props, ["zIndex", "isOpen", "onClose", "maxWidth", "maxHeight", "bgElementSelector", "isFullScreen", "closeButtonId", "insetOverride", "height", "width", "children", "shouldScroll", "borderRadius", "pinned", "backgroundVariant"]);
15027
+ rest = __rest(props, ["zIndex", "isOpen", "onClose", "maxWidth", "maxHeight", "bgElementSelector", "isFullScreen", "closeButtonId", "insetOverride", "outsetOverride", "height", "width", "children", "shouldScroll", "borderRadius", "pinned", "backgroundVariant"]);
15026
15028
  var pinnedRadius = pinned === 'bottom' ? {
15027
15029
  top: borderRadius,
15028
15030
  bottom: 'none'
@@ -15038,7 +15040,8 @@ var Dialog = /*#__PURE__*/React.forwardRef(function (props, ref) {
15038
15040
  exit: 'closed',
15039
15041
  bgElementSelector: bgElementSelector,
15040
15042
  pinned: pinned,
15041
- backgroundVariant: backgroundVariant
15043
+ backgroundVariant: backgroundVariant,
15044
+ shouldScroll: shouldScroll
15042
15045
  }, rest), jsx(Div, {
15043
15046
  ref: ref,
15044
15047
  outsideClick: onClose,
@@ -15048,19 +15051,13 @@ var Dialog = /*#__PURE__*/React.forwardRef(function (props, ref) {
15048
15051
  borderRadius: pinnedRadius,
15049
15052
  boxShadow: dialog.boxShadow,
15050
15053
  inset: insetOverride !== null && insetOverride !== void 0 ? insetOverride : dialog.defaultInset,
15051
- outset: onClose ? {
15052
- vertical: 'x0',
15053
- horizontal: {
15054
- xSmall: 'x0',
15055
- small: 'x1'
15056
- }
15057
- } : 'x0',
15054
+ outset: outsetOverride !== null && outsetOverride !== void 0 ? outsetOverride : undefined,
15058
15055
  position: 'absolute',
15059
- bottom: 0,
15056
+ bottom: pinned === 'bottom' ? 0 : undefined,
15060
15057
  maxWidth: maxWidth,
15061
15058
  maxHeight: maxHeight,
15062
15059
  width: (_a = isFullScreen ? '100%' : undefined) !== null && _a !== void 0 ? _a : width,
15063
- height: isFullScreen ? 'calc(100vh - 16px )' : height
15060
+ height: isFullScreen || pinned === 'center' ? 'calc(100vh - 24px )' : height
15064
15061
  }, shouldScroll ? jsx(Div, {
15065
15062
  overflowY: "auto"
15066
15063
  }, children, onClose && jsx(CloseButton, {
@@ -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>>;
@@ -12,6 +12,7 @@ export declare type DialogProps = {
12
12
  isFullScreen?: boolean;
13
13
  closeButtonId?: string;
14
14
  insetOverride?: HOCSpacingKeys;
15
+ outsetOverride?: HOCSpacingKeys;
15
16
  height?: Height;
16
17
  width?: Width;
17
18
  shouldScroll?: boolean;
@@ -10,5 +10,6 @@ export declare type OverlayPropTypes = {
10
10
  children?: React.ReactNode;
11
11
  pinned?: PinnedType;
12
12
  backgroundVariant?: 'solid' | 'blur';
13
+ shouldScroll?: boolean;
13
14
  } & HOCMotionProps;
14
- export declare const Overlay: ({ children, zIndex, animate, initial, exit, variants, transition, motionKey, position, backgroundVariant, pinned, ...rest }: OverlayPropTypes) => JSX.Element;
15
+ export declare const Overlay: ({ children, zIndex, animate, initial, exit, variants, transition, motionKey, position, backgroundVariant, pinned, shouldScroll, ...rest }: OverlayPropTypes) => JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sendoutcards/quantum-design-ui",
3
- "version": "1.8.19",
3
+ "version": "1.8.20",
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",