@linzjs/lui 21.4.0 → 21.5.0
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/CHANGELOG.md +7 -0
- package/dist/components/LuiUpdateSplashModal/LuiUpdatesSplashModal.d.ts +18 -4
- package/dist/index.js +15 -3
- package/dist/index.js.map +1 -1
- package/dist/lui.css +9 -0
- package/dist/lui.css.map +1 -1
- package/dist/lui.esm.js +15 -3
- package/dist/lui.esm.js.map +1 -1
- package/dist/scss/Components/LuiUpdateSplashModal/splashModal.scss +9 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [21.5.0](https://github.com/linz/lui/compare/v21.4.0...v21.5.0) (2023-10-31)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* SURVEY-19904 allow LuiSplash video ([#1036](https://github.com/linz/lui/issues/1036)) ([e91bc44](https://github.com/linz/lui/commit/e91bc4476b238a92f042abc3dd674835d086f585))
|
|
7
|
+
|
|
1
8
|
# [21.4.0](https://github.com/linz/lui/compare/v21.3.1...v21.4.0) (2023-10-31)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -1,13 +1,27 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
interface
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
interface IFrameConfig {
|
|
3
|
+
url: string;
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
title: string;
|
|
7
|
+
iframeWrapperClass?: string;
|
|
8
|
+
iFrameProps?: Partial<JSX.IntrinsicElements['iframe']>;
|
|
9
|
+
}
|
|
10
|
+
declare type SplashModalProps = {
|
|
5
11
|
header: string;
|
|
6
12
|
wrapperClass?: string;
|
|
7
13
|
id: string;
|
|
8
14
|
releaseVersion: string;
|
|
9
15
|
enabled: boolean;
|
|
10
16
|
children?: ReactNode;
|
|
11
|
-
}
|
|
17
|
+
} & ({
|
|
18
|
+
bigImage: string;
|
|
19
|
+
smallImage: string;
|
|
20
|
+
iframe?: never;
|
|
21
|
+
} | {
|
|
22
|
+
bigImage?: never;
|
|
23
|
+
smallImage?: never;
|
|
24
|
+
iframe: IFrameConfig;
|
|
25
|
+
});
|
|
12
26
|
export declare const LuiUpdatesSplashModal: (props: SplashModalProps) => JSX.Element;
|
|
13
27
|
export {};
|
package/dist/index.js
CHANGED
|
@@ -42042,6 +42042,7 @@ var LuiUpdatesSplashModal = function (props) {
|
|
|
42042
42042
|
if (typeof process === 'undefined' || ((_a = process === null || process === void 0 ? void 0 : process.env) === null || _a === void 0 ? void 0 : _a.NODE_ENV) !== 'test') {
|
|
42043
42043
|
Modal.setAppElement('#root');
|
|
42044
42044
|
}
|
|
42045
|
+
var featureMedia = props.iframe ? (React__default["default"].createElement(FeatureIFrame, { iframeConfig: props.iframe })) : (React__default["default"].createElement(FeatureImages, { bigImage: props.bigImage, smallImage: props.smallImage }));
|
|
42045
42046
|
return (React__default["default"].createElement(Modal, { isOpen: props.enabled &&
|
|
42046
42047
|
showModal &&
|
|
42047
42048
|
props.releaseVersion.trim() !== currentVersion, shouldCloseOnEsc: true, onRequestClose: handleClose, shouldCloseOnOverlayClick: true, contentLabel: "Recent updates", className: "lui-splash-content lui-box-shadow", overlayClassName: "splash_overlay" },
|
|
@@ -42052,10 +42053,21 @@ var LuiUpdatesSplashModal = function (props) {
|
|
|
42052
42053
|
React__default["default"].createElement("h1", null, props.header)),
|
|
42053
42054
|
React__default["default"].createElement("button", { "aria-label": "Close dialog", onClick: handleClose },
|
|
42054
42055
|
React__default["default"].createElement(LuiIcon, { alt: "cross_icon", name: "ic_clear", status: "interactive", size: "md" }))),
|
|
42055
|
-
|
|
42056
|
-
React__default["default"].createElement("img", { className: "lui-hide-xs lui-hide-sm", alt: "What's new", src: props.bigImage }),
|
|
42057
|
-
React__default["default"].createElement("img", { className: "lui-hide-md lui-hide-lg lui-hide-xl", alt: "What's new", src: props.smallImage })),
|
|
42056
|
+
featureMedia,
|
|
42058
42057
|
React__default["default"].createElement("div", { className: 'lui-feature-text' }, props.children))));
|
|
42058
|
+
};
|
|
42059
|
+
var FeatureImages = function (_a) {
|
|
42060
|
+
var bigImage = _a.bigImage, smallImage = _a.smallImage;
|
|
42061
|
+
return (React__default["default"].createElement("div", { className: "lui-feature-img" },
|
|
42062
|
+
React__default["default"].createElement("img", { className: "lui-hide-xs lui-hide-sm", alt: "What's new", src: bigImage }),
|
|
42063
|
+
React__default["default"].createElement("img", { className: "lui-hide-md lui-hide-lg lui-hide-xl", alt: "What's new", src: smallImage })));
|
|
42064
|
+
};
|
|
42065
|
+
var FeatureIFrame = function (_a) {
|
|
42066
|
+
var iframeConfig = _a.iframeConfig;
|
|
42067
|
+
var wrapperClass = iframeConfig.iframeWrapperClass || 'iframe-wrapper';
|
|
42068
|
+
var iFrameProps = iframeConfig.iFrameProps ? iframeConfig.iFrameProps : {};
|
|
42069
|
+
return (React__default["default"].createElement("div", { className: wrapperClass },
|
|
42070
|
+
React__default["default"].createElement("iframe", __assign({ width: iframeConfig.width, height: iframeConfig.height, src: iframeConfig.url, title: iframeConfig.title }, iFrameProps))));
|
|
42059
42071
|
};
|
|
42060
42072
|
|
|
42061
42073
|
var LuiModal = function (props) {
|