@sendoutcards/quantum-design-ui 1.8.11 → 1.8.12
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
|
@@ -12310,6 +12310,7 @@ var useOutsideClick = function (ref, handler, targetIdBypass) {
|
|
|
12310
12310
|
};
|
|
12311
12311
|
|
|
12312
12312
|
var Div = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
12313
|
+
var rest = __rest(props, []);
|
|
12313
12314
|
var entities = useEntities();
|
|
12314
12315
|
var generatedDivStyles = generateStyles(props, entities);
|
|
12315
12316
|
useOutsideClick(ref, function () {
|
|
@@ -12328,7 +12329,7 @@ var Div = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
12328
12329
|
},
|
|
12329
12330
|
css: styles$R.divStyles(generatedDivStyles),
|
|
12330
12331
|
className: "" + (props.className ? props.className : '')
|
|
12331
|
-
}), props.children);
|
|
12332
|
+
}, rest), props.children);
|
|
12332
12333
|
});
|
|
12333
12334
|
|
|
12334
12335
|
var useWindowSize = function () {
|
|
@@ -12404,50 +12405,51 @@ var Text = function (_a) {
|
|
|
12404
12405
|
lineHeight = props.lineHeight,
|
|
12405
12406
|
whiteSpace = props.whiteSpace,
|
|
12406
12407
|
isInline = props.isInline,
|
|
12407
|
-
style = props.style
|
|
12408
|
+
style = props.style,
|
|
12409
|
+
rest = __rest(props, ["type", "color", "children", "content", "alignment", "isItalic", "isStrikeThrough", "outset", "inset", "weight", "lineHeight", "whiteSpace", "isInline", "style"]);
|
|
12408
12410
|
var text = useEntities().text;
|
|
12409
12411
|
var width = useWindowSize().width;
|
|
12410
12412
|
var getText = useCallback(function (type) {
|
|
12411
12413
|
switch (type) {
|
|
12412
12414
|
case 'heroTitle':
|
|
12413
|
-
return jsx("h1", {
|
|
12415
|
+
return jsx("h1", _extends({
|
|
12414
12416
|
style: style,
|
|
12415
12417
|
css: styles$S.heroTitle(text, color, weight, alignment, isItalic, isStrikeThrough, lineHeight, whiteSpace, isInline)
|
|
12416
|
-
}, children || content);
|
|
12418
|
+
}, rest), children || content);
|
|
12417
12419
|
case 'title':
|
|
12418
|
-
return jsx("h2", {
|
|
12420
|
+
return jsx("h2", _extends({
|
|
12419
12421
|
style: style,
|
|
12420
12422
|
css: styles$S.title(text, color, weight, alignment, isItalic, isStrikeThrough, lineHeight, whiteSpace, isInline)
|
|
12421
|
-
}, children || content);
|
|
12423
|
+
}, rest), children || content);
|
|
12422
12424
|
case 'subtitle':
|
|
12423
|
-
return jsx("h3", {
|
|
12425
|
+
return jsx("h3", _extends({
|
|
12424
12426
|
style: style,
|
|
12425
12427
|
css: styles$S.subtitle(text, color, weight, alignment, isItalic, isStrikeThrough, lineHeight, whiteSpace, isInline)
|
|
12426
|
-
}, children || content);
|
|
12428
|
+
}, rest), children || content);
|
|
12427
12429
|
case 'largeBody':
|
|
12428
|
-
return jsx("p", {
|
|
12430
|
+
return jsx("p", _extends({
|
|
12429
12431
|
style: style,
|
|
12430
12432
|
css: styles$S.largeBody(text, color, weight, alignment, isItalic, isStrikeThrough, lineHeight, whiteSpace, isInline)
|
|
12431
|
-
}, children || content);
|
|
12433
|
+
}, rest), children || content);
|
|
12432
12434
|
case 'body':
|
|
12433
|
-
return jsx("p", {
|
|
12435
|
+
return jsx("p", _extends({
|
|
12434
12436
|
style: style,
|
|
12435
12437
|
css: styles$S.body(text, color, weight, alignment, isItalic, isStrikeThrough, lineHeight, whiteSpace, isInline)
|
|
12436
|
-
}, children || content);
|
|
12438
|
+
}, rest), children || content);
|
|
12437
12439
|
case 'caption':
|
|
12438
|
-
return jsx("p", {
|
|
12440
|
+
return jsx("p", _extends({
|
|
12439
12441
|
style: style,
|
|
12440
12442
|
css: styles$S.caption(text, color, weight, alignment, isItalic, isStrikeThrough, lineHeight, whiteSpace, isInline)
|
|
12441
|
-
}, children || content);
|
|
12443
|
+
}, rest), children || content);
|
|
12442
12444
|
case 'footnote':
|
|
12443
|
-
return jsx("p", {
|
|
12445
|
+
return jsx("p", _extends({
|
|
12444
12446
|
style: style,
|
|
12445
12447
|
css: styles$S.footnote(text, color, weight, alignment, isItalic, isStrikeThrough, lineHeight, whiteSpace, isInline)
|
|
12446
|
-
}, children || content);
|
|
12448
|
+
}, rest), children || content);
|
|
12447
12449
|
default:
|
|
12448
12450
|
return;
|
|
12449
12451
|
}
|
|
12450
|
-
}, [color, weight, alignment, isItalic, isStrikeThrough, lineHeight, content, text, children, whiteSpace, isInline, style]);
|
|
12452
|
+
}, [color, weight, alignment, isItalic, isStrikeThrough, lineHeight, content, text, children, whiteSpace, isInline, style, rest]);
|
|
12451
12453
|
var renderText = useMemo(function () {
|
|
12452
12454
|
return makeTextResponsive(type, getText, width);
|
|
12453
12455
|
}, [width, getText, type]);
|
|
@@ -13567,10 +13569,11 @@ var Overlay = function (_a) {
|
|
|
13567
13569
|
motionKey = _a.motionKey,
|
|
13568
13570
|
position = _a.position,
|
|
13569
13571
|
_b = _a.pinned,
|
|
13570
|
-
pinned = _b === void 0 ? 'center' : _b
|
|
13572
|
+
pinned = _b === void 0 ? 'center' : _b,
|
|
13573
|
+
rest = __rest(_a, ["children", "zIndex", "animate", "initial", "exit", "variants", "transition", "motionKey", "position", "pinned"]);
|
|
13571
13574
|
var hocs = useEntities().hocs;
|
|
13572
13575
|
var pinnedPosition = pinned === 'top' ? 'flex-start' : pinned === 'bottom' ? 'flex-end' : 'center';
|
|
13573
|
-
return jsx(Div, {
|
|
13576
|
+
return jsx(Div, _extends({
|
|
13574
13577
|
motionKey: motionKey,
|
|
13575
13578
|
variants: variants,
|
|
13576
13579
|
animate: animate,
|
|
@@ -13588,7 +13591,7 @@ var Overlay = function (_a) {
|
|
|
13588
13591
|
backgroundColor: Color$1(hocs.colors.swatches.grayScale._800).rgb().alpha(0.98).toString(),
|
|
13589
13592
|
overflow: "hidden",
|
|
13590
13593
|
transition: transition
|
|
13591
|
-
}, children);
|
|
13594
|
+
}, rest), children);
|
|
13592
13595
|
};
|
|
13593
13596
|
|
|
13594
13597
|
var Circle = function (_a) {
|
|
@@ -14967,7 +14970,8 @@ var Dialog = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
14967
14970
|
_e = props.borderRadius,
|
|
14968
14971
|
borderRadius = _e === void 0 ? 'default' : _e,
|
|
14969
14972
|
_f = props.pinned,
|
|
14970
|
-
pinned = _f === void 0 ? 'center' : _f
|
|
14973
|
+
pinned = _f === void 0 ? 'center' : _f,
|
|
14974
|
+
rest = __rest(props, ["zIndex", "isOpen", "onClose", "maxWidth", "maxHeight", "bgElementSelector", "isFullScreen", "closeButtonId", "insetOverride", "height", "width", "children", "shouldScroll", "borderRadius", "pinned"]);
|
|
14971
14975
|
var pinnedRadius = pinned === 'bottom' ? {
|
|
14972
14976
|
top: borderRadius,
|
|
14973
14977
|
bottom: 'none'
|
|
@@ -14975,7 +14979,7 @@ var Dialog = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
14975
14979
|
bottom: borderRadius,
|
|
14976
14980
|
top: 'none'
|
|
14977
14981
|
} : borderRadius;
|
|
14978
|
-
return jsx(AnimatePresence, null, isOpen && jsx(Overlay, {
|
|
14982
|
+
return jsx(AnimatePresence, null, isOpen && jsx(Overlay, _extends({
|
|
14979
14983
|
variants: overlayVariants,
|
|
14980
14984
|
animate: isOpen ? 'open' : 'closed',
|
|
14981
14985
|
initial: 'closed',
|
|
@@ -14983,7 +14987,7 @@ var Dialog = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
14983
14987
|
exit: 'closed',
|
|
14984
14988
|
bgElementSelector: bgElementSelector,
|
|
14985
14989
|
pinned: pinned
|
|
14986
|
-
}, jsx(Div, {
|
|
14990
|
+
}, rest), jsx(Div, {
|
|
14987
14991
|
ref: ref,
|
|
14988
14992
|
outsideClick: onClose,
|
|
14989
14993
|
variants: dialogVariants,
|
|
@@ -20059,7 +20063,8 @@ var ConfirmDialog = function (_a) {
|
|
|
20059
20063
|
maxWidth = _c === void 0 ? '552px' : _c,
|
|
20060
20064
|
_d = _a.hasStackedActions,
|
|
20061
20065
|
hasStackedActions = _d === void 0 ? false : _d,
|
|
20062
|
-
maxHeight = _a.maxHeight
|
|
20066
|
+
maxHeight = _a.maxHeight,
|
|
20067
|
+
rest = __rest(_a, ["additionalLink", "accept", "decline", "title", "description", "zIndex", "isOpen", "primaryAction", "onClose", "requireScroll", "maxWidth", "hasStackedActions", "maxHeight"]);
|
|
20063
20068
|
var isPrimaryAccept = primaryAction === 'accept' ? true : false;
|
|
20064
20069
|
var _e = useState(false),
|
|
20065
20070
|
hasScrolled = _e[0],
|
|
@@ -20069,13 +20074,13 @@ var ConfirmDialog = function (_a) {
|
|
|
20069
20074
|
setHasScrolled(true);
|
|
20070
20075
|
}
|
|
20071
20076
|
};
|
|
20072
|
-
return jsx(Dialog, {
|
|
20077
|
+
return jsx(Dialog, _extends({
|
|
20073
20078
|
isOpen: isOpen,
|
|
20074
20079
|
zIndex: zIndex,
|
|
20075
20080
|
onClose: onClose,
|
|
20076
20081
|
maxWidth: maxWidth,
|
|
20077
20082
|
maxHeight: maxHeight
|
|
20078
|
-
}, jsx(Flex, {
|
|
20083
|
+
}, rest), jsx(Flex, {
|
|
20079
20084
|
flexDirection: "column"
|
|
20080
20085
|
}, jsx(Text, {
|
|
20081
20086
|
weight: "semiBold",
|
|
@@ -10,4 +10,4 @@ export declare type OverlayPropTypes = {
|
|
|
10
10
|
children?: React.ReactNode;
|
|
11
11
|
pinned?: PinnedType;
|
|
12
12
|
} & HOCMotionProps;
|
|
13
|
-
export declare const Overlay: ({ children, zIndex, animate, initial, exit, variants, transition, motionKey, position, pinned, }: OverlayPropTypes) => JSX.Element;
|
|
13
|
+
export declare const Overlay: ({ children, zIndex, animate, initial, exit, variants, transition, motionKey, position, pinned, ...rest }: OverlayPropTypes) => JSX.Element;
|