@rocket.chat/fuselage 0.32.0-dev.269 → 0.32.0-dev.270
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ReactNode, AllHTMLAttributes } from 'react';
|
|
1
|
+
import type { ReactNode, AllHTMLAttributes, HTMLAttributeAnchorTarget } from 'react';
|
|
2
2
|
declare type VariantType = 'neutral' | 'info' | 'success' | 'warning' | 'danger';
|
|
3
3
|
declare type BannerProps = {
|
|
4
4
|
actionable?: boolean;
|
|
@@ -6,12 +6,13 @@ declare type BannerProps = {
|
|
|
6
6
|
icon?: ReactNode;
|
|
7
7
|
inline?: boolean;
|
|
8
8
|
link?: string;
|
|
9
|
+
linkTarget?: HTMLAttributeAnchorTarget;
|
|
9
10
|
linkText?: string;
|
|
10
11
|
onAction?: () => void;
|
|
11
12
|
onClose?: () => void;
|
|
12
13
|
title?: string;
|
|
13
14
|
variant?: VariantType;
|
|
14
15
|
} & AllHTMLAttributes<HTMLElement>;
|
|
15
|
-
declare const Banner: ({ actionable, children, className, closeable, icon, inline, link, linkText, onAction, onClose, title, variant, ...props }: BannerProps) => JSX.Element;
|
|
16
|
+
declare const Banner: ({ actionable, children, className, closeable, icon, inline, link, linkText, linkTarget, onAction, onClose, title, variant, ...props }: BannerProps) => JSX.Element;
|
|
16
17
|
export default Banner;
|
|
17
18
|
//# sourceMappingURL=Banner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../../src/components/Banner/Banner.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../../src/components/Banner/Banner.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,SAAS,EACT,iBAAiB,EACjB,yBAAyB,EAC1B,MAAM,OAAO,CAAC;AAQf,aAAK,WAAW,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAUzE,aAAK,WAAW,GAAG;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,yBAAyB,CAAC;IACvC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB,GAAG,iBAAiB,CAAC,WAAW,CAAC,CAAC;AAEnC,QAAA,MAAM,MAAM,0IAeT,WAAW,gBAwEb,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -4799,7 +4799,7 @@ var variants = [
|
|
|
4799
4799
|
];
|
|
4800
4800
|
var Banner = function (_a) {
|
|
4801
4801
|
var _b, _c;
|
|
4802
|
-
var actionable = _a.actionable, children = _a.children, className = _a.className, closeable = _a.closeable, icon = _a.icon, _d = _a.inline, inline = _d === void 0 ? false : _d, link = _a.link, _e = _a.linkText, linkText = _e === void 0 ? 'More info' : _e, onAction = _a.onAction, onClose = _a.onClose, title = _a.title,
|
|
4802
|
+
var actionable = _a.actionable, children = _a.children, className = _a.className, closeable = _a.closeable, icon = _a.icon, _d = _a.inline, inline = _d === void 0 ? false : _d, link = _a.link, _e = _a.linkText, linkText = _e === void 0 ? 'More info' : _e, _f = _a.linkTarget, linkTarget = _f === void 0 ? '_blank' : _f, onAction = _a.onAction, onClose = _a.onClose, title = _a.title, _g = _a.variant, variant = _g === void 0 ? 'neutral' : _g, props = __rest(_a, ["actionable", "children", "className", "closeable", "icon", "inline", "link", "linkText", "linkTarget", "onAction", "onClose", "title", "variant"]);
|
|
4803
4803
|
(0,_hooks_useStyleSheet__WEBPACK_IMPORTED_MODULE_3__.useStyleSheet)();
|
|
4804
4804
|
(0,_hooks_useStyleSheet__WEBPACK_IMPORTED_MODULE_3__.useStyleSheet)(_Banner_styles_scss__WEBPACK_IMPORTED_MODULE_5__["default"]);
|
|
4805
4805
|
var ref = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
|
|
@@ -4826,7 +4826,7 @@ var Banner = function (_a) {
|
|
|
4826
4826
|
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: (0,_helpers_composeClassNames__WEBPACK_IMPORTED_MODULE_2__.composeClassNames)('rcx-banner__content')({ inline: inline }) },
|
|
4827
4827
|
title && (react__WEBPACK_IMPORTED_MODULE_1___default().createElement("h6", { className: (0,_helpers_composeClassNames__WEBPACK_IMPORTED_MODULE_2__.composeClassNames)('rcx-banner__title')({ inline: inline }) }, title)),
|
|
4828
4828
|
children,
|
|
4829
|
-
link && (react__WEBPACK_IMPORTED_MODULE_1___default().createElement("a", { href: link, target:
|
|
4829
|
+
link && (react__WEBPACK_IMPORTED_MODULE_1___default().createElement("a", { href: link, target: linkTarget, className: (0,_helpers_composeClassNames__WEBPACK_IMPORTED_MODULE_2__.composeClassNames)('rcx-banner__link')((_c = {}, _c[variant] = true, _c)) }, linkText))),
|
|
4830
4830
|
closeable && (react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: (0,_helpers_composeClassNames__WEBPACK_IMPORTED_MODULE_2__.composeClassNames)('rcx-banner__close-button')({ inline: inline }) },
|
|
4831
4831
|
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_Button__WEBPACK_IMPORTED_MODULE_4__.IconButton, { small: true, onClick: handleCloseButtonClick, icon: 'cross' })))));
|
|
4832
4832
|
};
|