@sendoutcards/quantum-design-ui 1.8.2 → 1.8.4
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
|
@@ -13562,8 +13562,11 @@ var Overlay = function (_a) {
|
|
|
13562
13562
|
variants = _a.variants,
|
|
13563
13563
|
transition = _a.transition,
|
|
13564
13564
|
motionKey = _a.motionKey,
|
|
13565
|
-
position = _a.position
|
|
13565
|
+
position = _a.position,
|
|
13566
|
+
_b = _a.pinned,
|
|
13567
|
+
pinned = _b === void 0 ? 'center' : _b;
|
|
13566
13568
|
var hocs = useEntities().hocs;
|
|
13569
|
+
var pinnedPosition = pinned === 'top' ? 'flex-start' : pinned === 'bottom' ? 'flex-end' : 'center';
|
|
13567
13570
|
return jsx(Div, {
|
|
13568
13571
|
motionKey: motionKey,
|
|
13569
13572
|
variants: variants,
|
|
@@ -13573,7 +13576,7 @@ var Overlay = function (_a) {
|
|
|
13573
13576
|
zIndex: zIndex,
|
|
13574
13577
|
display: "flex",
|
|
13575
13578
|
justifyContent: "center",
|
|
13576
|
-
alignItems:
|
|
13579
|
+
alignItems: pinnedPosition,
|
|
13577
13580
|
position: position !== null && position !== void 0 ? position : 'fixed',
|
|
13578
13581
|
top: "0",
|
|
13579
13582
|
left: "0",
|
|
@@ -14959,21 +14962,31 @@ var Dialog = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
14959
14962
|
_d = props.shouldScroll,
|
|
14960
14963
|
shouldScroll = _d === void 0 ? false : _d,
|
|
14961
14964
|
_e = props.borderRadius,
|
|
14962
|
-
borderRadius = _e === void 0 ? 'default' : _e
|
|
14965
|
+
borderRadius = _e === void 0 ? 'default' : _e,
|
|
14966
|
+
_f = props.pinned,
|
|
14967
|
+
pinned = _f === void 0 ? 'center' : _f;
|
|
14968
|
+
var pinnedRadius = pinned === 'bottom' ? {
|
|
14969
|
+
top: borderRadius,
|
|
14970
|
+
bottom: 'none'
|
|
14971
|
+
} : pinned === 'top' ? {
|
|
14972
|
+
bottom: borderRadius,
|
|
14973
|
+
top: 'none'
|
|
14974
|
+
} : borderRadius;
|
|
14963
14975
|
return jsx(AnimatePresence, null, isOpen && jsx(Overlay, {
|
|
14964
14976
|
variants: overlayVariants,
|
|
14965
14977
|
animate: isOpen ? 'open' : 'closed',
|
|
14966
14978
|
initial: 'closed',
|
|
14967
14979
|
zIndex: zIndex,
|
|
14968
14980
|
exit: 'closed',
|
|
14969
|
-
bgElementSelector: bgElementSelector
|
|
14981
|
+
bgElementSelector: bgElementSelector,
|
|
14982
|
+
pinned: pinned
|
|
14970
14983
|
}, jsx(Div, {
|
|
14971
14984
|
ref: ref,
|
|
14972
14985
|
outsideClick: onClose,
|
|
14973
14986
|
variants: dialogVariants,
|
|
14974
14987
|
css: styles$w.dialogContainer,
|
|
14975
14988
|
backgroundColor: dialog.backgroundColor,
|
|
14976
|
-
borderRadius:
|
|
14989
|
+
borderRadius: pinnedRadius,
|
|
14977
14990
|
boxShadow: dialog.boxShadow,
|
|
14978
14991
|
inset: insetOverride !== null && insetOverride !== void 0 ? insetOverride : dialog.defaultInset,
|
|
14979
14992
|
outset: onClose ? {
|
|
@@ -14983,6 +14996,8 @@ var Dialog = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
14983
14996
|
small: 'x1'
|
|
14984
14997
|
}
|
|
14985
14998
|
} : 'x0',
|
|
14999
|
+
position: 'absolute',
|
|
15000
|
+
bottom: 0,
|
|
14986
15001
|
maxWidth: maxWidth,
|
|
14987
15002
|
maxHeight: maxHeight,
|
|
14988
15003
|
width: (_a = isFullScreen ? '100%' : undefined) !== null && _a !== void 0 ? _a : width,
|
|
@@ -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>>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Responsive, LiteralUnion, HOCSpacingKeys } from "../../helpers/hoc-types/entityValueTypes";
|
|
3
3
|
import { Height, Width, BorderRadius } from "../../helpers/hoc-types/hocBaseUnion";
|
|
4
|
+
export declare type PinnedType = 'top' | 'center' | 'bottom';
|
|
4
5
|
export declare type DialogProps = {
|
|
5
6
|
zIndex?: number;
|
|
6
7
|
isOpen: boolean;
|
|
@@ -15,6 +16,7 @@ export declare type DialogProps = {
|
|
|
15
16
|
width?: Width;
|
|
16
17
|
shouldScroll?: boolean;
|
|
17
18
|
borderRadius?: BorderRadius;
|
|
19
|
+
pinned?: PinnedType;
|
|
18
20
|
};
|
|
19
21
|
export declare const Dialog: React.ForwardRefExoticComponent<DialogProps & {
|
|
20
22
|
children: React.ReactNode;
|
|
@@ -2,10 +2,12 @@ import React from 'react';
|
|
|
2
2
|
import { HOCMotionProps } from "../../helpers/hoc-types/hocMotionTypes";
|
|
3
3
|
import { Responsive } from "../../helpers/hoc-types/entityValueTypes";
|
|
4
4
|
import { Position } from "../../helpers/hoc-types/cssValueTypes";
|
|
5
|
+
import { PinnedType } from '../dialog/dialog';
|
|
5
6
|
export declare type OverlayPropTypes = {
|
|
6
7
|
zIndex?: number;
|
|
7
8
|
position?: Responsive<Position> | Position;
|
|
8
9
|
bgElementSelector?: string;
|
|
9
10
|
children?: React.ReactNode;
|
|
11
|
+
pinned?: PinnedType;
|
|
10
12
|
} & HOCMotionProps;
|
|
11
|
-
export declare const Overlay: ({ children, zIndex, animate, initial, exit, variants, transition, motionKey, position, }: OverlayPropTypes) => JSX.Element;
|
|
13
|
+
export declare const Overlay: ({ children, zIndex, animate, initial, exit, variants, transition, motionKey, position, pinned, }: OverlayPropTypes) => JSX.Element;
|