@sendoutcards/quantum-design-ui 1.8.1 → 1.8.2
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
|
@@ -18186,13 +18186,9 @@ var AccountMenu = function (_a) {
|
|
|
18186
18186
|
};
|
|
18187
18187
|
|
|
18188
18188
|
var Banner = function (_a) {
|
|
18189
|
-
var
|
|
18190
|
-
|
|
18191
|
-
|
|
18192
|
-
children = _a.children,
|
|
18193
|
-
_b = _a.outlined,
|
|
18194
|
-
outlined = _b === void 0 ? true : _b,
|
|
18195
|
-
onClose = _a.onClose;
|
|
18189
|
+
var _b = _a.isOutlined,
|
|
18190
|
+
isOutlined = _b === void 0 ? true : _b,
|
|
18191
|
+
props = __rest(_a, ["isOutlined"]);
|
|
18196
18192
|
var _c = useState(false),
|
|
18197
18193
|
isHovering = _c[0],
|
|
18198
18194
|
setIsHovering = _c[1];
|
|
@@ -18201,13 +18197,13 @@ var Banner = function (_a) {
|
|
|
18201
18197
|
return jsx(Flex, {
|
|
18202
18198
|
width: "100%",
|
|
18203
18199
|
backgroundColor: {
|
|
18204
|
-
swatch: status === 'success' ? 'success' : status === 'warning' ? 'warning' : 'danger',
|
|
18205
|
-
shade:
|
|
18200
|
+
swatch: props.status === 'success' ? 'success' : props.status === 'warning' ? 'warning' : 'danger',
|
|
18201
|
+
shade: isOutlined ? '_1000' : 'base'
|
|
18206
18202
|
},
|
|
18207
|
-
borderWidth:
|
|
18208
|
-
borderStyle:
|
|
18209
|
-
borderColor:
|
|
18210
|
-
swatch: status === 'success' ? 'success' : status === 'warning' ? 'warning' : 'danger',
|
|
18203
|
+
borderWidth: isOutlined ? 'default' : undefined,
|
|
18204
|
+
borderStyle: isOutlined ? 'solid' : undefined,
|
|
18205
|
+
borderColor: isOutlined ? {
|
|
18206
|
+
swatch: props.status === 'success' ? 'success' : props.status === 'warning' ? 'warning' : 'danger',
|
|
18211
18207
|
shade: 'base'
|
|
18212
18208
|
} : undefined,
|
|
18213
18209
|
inset: {
|
|
@@ -18217,31 +18213,31 @@ var Banner = function (_a) {
|
|
|
18217
18213
|
borderRadius: "default",
|
|
18218
18214
|
justifyContent: "flex-start",
|
|
18219
18215
|
alignItems: "center"
|
|
18220
|
-
}, jsx(Flex, {
|
|
18216
|
+
}, props.bannerTitle ? jsx(Flex, {
|
|
18221
18217
|
width: "100%"
|
|
18222
|
-
}, icon && jsx(Flex, {
|
|
18218
|
+
}, props.bannerTitle.icon && jsx(Flex, {
|
|
18223
18219
|
justifyContent: "center",
|
|
18224
18220
|
alignItems: "center",
|
|
18225
18221
|
inset: {
|
|
18226
18222
|
horizontal: 'x1'
|
|
18227
18223
|
}
|
|
18228
18224
|
}, jsx(Icon, {
|
|
18229
|
-
name: icon,
|
|
18225
|
+
name: props.bannerTitle.icon,
|
|
18230
18226
|
size: "small",
|
|
18231
|
-
primaryColor:
|
|
18232
|
-
})),
|
|
18227
|
+
primaryColor: isOutlined ? 'primaryBodyText' : 'inverseHeadingText'
|
|
18228
|
+
})), jsx(Flex, {
|
|
18233
18229
|
width: "100%"
|
|
18234
18230
|
}, jsx(Text, {
|
|
18235
|
-
content: message,
|
|
18236
|
-
color:
|
|
18231
|
+
content: props.bannerTitle.message,
|
|
18232
|
+
color: isOutlined ? 'primaryBody' : 'inverseHeading',
|
|
18237
18233
|
type: {
|
|
18238
18234
|
xSmall: 'footnote',
|
|
18239
18235
|
small: 'caption'
|
|
18240
18236
|
}
|
|
18241
|
-
})))
|
|
18237
|
+
}))) : jsx(Flex, {
|
|
18242
18238
|
width: "100%",
|
|
18243
18239
|
alignItems: "center"
|
|
18244
|
-
}, children), onClose && jsx(Flex, {
|
|
18240
|
+
}, props.children), props.onClose && jsx(Flex, {
|
|
18245
18241
|
justifyContent: "flex-end",
|
|
18246
18242
|
alignItems: "center",
|
|
18247
18243
|
outset: {
|
|
@@ -18255,7 +18251,7 @@ var Banner = function (_a) {
|
|
|
18255
18251
|
return setIsHovering(false);
|
|
18256
18252
|
}
|
|
18257
18253
|
}, jsx(Flex, {
|
|
18258
|
-
onClick: onClose,
|
|
18254
|
+
onClick: props.onClose,
|
|
18259
18255
|
width: "40px",
|
|
18260
18256
|
height: "40px",
|
|
18261
18257
|
justifyContent: "center",
|
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IconType } from "../../atoms/iconography/types";
|
|
3
|
-
|
|
3
|
+
declare type BannerDetail = {
|
|
4
|
+
message: string;
|
|
4
5
|
icon?: IconType;
|
|
5
|
-
|
|
6
|
+
};
|
|
7
|
+
declare type StatusType = 'success' | 'warning' | 'danger';
|
|
8
|
+
declare type BaseBannerProps = {
|
|
6
9
|
status: StatusType;
|
|
7
|
-
|
|
8
|
-
children?: React.ReactNode;
|
|
10
|
+
isOutlined?: boolean;
|
|
9
11
|
onClose?: () => void;
|
|
10
12
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
+
declare type BannerWithTitle = BaseBannerProps & {
|
|
14
|
+
bannerTitle: BannerDetail;
|
|
15
|
+
children?: never;
|
|
16
|
+
};
|
|
17
|
+
declare type BannerWithChildren = BaseBannerProps & {
|
|
18
|
+
children: React.ReactNode;
|
|
19
|
+
bannerTitle?: never;
|
|
20
|
+
};
|
|
21
|
+
export declare type BannerProps = BannerWithTitle | BannerWithChildren;
|
|
22
|
+
export declare const Banner: ({ isOutlined, ...props }: BannerProps) => JSX.Element;
|
|
23
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,17 +0,0 @@
|
|
|
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>>;
|