@linzjs/lui 17.36.12 → 17.37.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/LuiModal/LuiModal.d.ts +2 -0
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/dist/lui.css +6 -1
- package/dist/lui.css.map +1 -1
- package/dist/lui.esm.js +6 -3
- package/dist/lui.esm.js.map +1 -1
- package/dist/scss/Components/Modal/modal.scss +8 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [17.37.0](https://github.com/linz/lui/compare/v17.36.12...v17.37.0) (2023-03-06)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* added optional help button to modal header ([#872](https://github.com/linz/lui/issues/872)) ([07baded](https://github.com/linz/lui/commit/07baded35af9229f31a5eab65d5dbbc8a8eea63c))
|
|
7
|
+
|
|
1
8
|
## [17.36.12](https://github.com/linz/lui/compare/v17.36.11...v17.36.12) (2023-03-05)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -6,6 +6,7 @@ interface ILuiModal {
|
|
|
6
6
|
className?: string;
|
|
7
7
|
maxWidth?: boolean;
|
|
8
8
|
headingText?: string;
|
|
9
|
+
helpLink?: string;
|
|
9
10
|
lowContrast?: boolean;
|
|
10
11
|
preventAutoFocus?: boolean;
|
|
11
12
|
appendToElement?: () => HTMLElement;
|
|
@@ -17,6 +18,7 @@ export declare const LuiAlertModal: React.FC<React.PropsWithChildren<{
|
|
|
17
18
|
export declare const LuiAlertModalButtons: React.FC<React.PropsWithChildren<unknown>>;
|
|
18
19
|
interface IModalHeader {
|
|
19
20
|
headingText?: string;
|
|
21
|
+
helpLink?: string;
|
|
20
22
|
onClose?: () => void;
|
|
21
23
|
}
|
|
22
24
|
export declare const LuiModalHeader: React.FC<React.PropsWithChildren<IModalHeader>>;
|
package/dist/index.js
CHANGED
|
@@ -42418,7 +42418,7 @@ var LuiModal = function (props) {
|
|
|
42418
42418
|
parentSelector: props.appendToElement
|
|
42419
42419
|
})),
|
|
42420
42420
|
React__default["default"].createElement("div", { ref: node, className: clsx$1('lui-modal lui-box-shadow', props.maxWidth && 'lui-max-width', props.headingText && 'lui-modal-no-padding', props.className) },
|
|
42421
|
-
props.headingText && (React__default["default"].createElement(LuiModalHeader, { headingText: props.headingText, onClose: props.onClose })),
|
|
42421
|
+
props.headingText && (React__default["default"].createElement(LuiModalHeader, { headingText: props.headingText, helpLink: props.helpLink, onClose: props.onClose })),
|
|
42422
42422
|
React__default["default"].createElement("div", { className: clsx$1(props.headingText && 'lui-modal-container'), ref: function (element) {
|
|
42423
42423
|
if (!props.preventAutoFocus &&
|
|
42424
42424
|
element &&
|
|
@@ -42440,8 +42440,11 @@ var LuiAlertModalButtons = function (props) {
|
|
|
42440
42440
|
var LuiModalHeader = function (props) {
|
|
42441
42441
|
return (React__default["default"].createElement("header", { className: "lui-modal-header" }, props.headingText && (React__default["default"].createElement("div", { className: "lui-modal-header-title" },
|
|
42442
42442
|
React__default["default"].createElement("h1", null, props.headingText),
|
|
42443
|
-
|
|
42444
|
-
React__default["default"].createElement("
|
|
42443
|
+
React__default["default"].createElement("div", { className: "lui-modal-header-buttons" },
|
|
42444
|
+
props.helpLink && (React__default["default"].createElement("button", { className: "lui-modal-header-help-btn", onClick: function () { return window.open(props.helpLink); } },
|
|
42445
|
+
React__default["default"].createElement("i", { className: "material-icons-round lui-modal-header-btn-size" }, "help_outline"))),
|
|
42446
|
+
props.onClose && (React__default["default"].createElement("button", { className: "lui-modal-header-close-btn", onClick: props.onClose },
|
|
42447
|
+
React__default["default"].createElement("i", { className: "material-icons-round lui-modal-header-btn-size" }, "close"))))))));
|
|
42445
42448
|
};
|
|
42446
42449
|
|
|
42447
42450
|
var css_248z$6 = "@keyframes react-loading-skeleton {\n 100% {\n transform: translateX(100%);\n }\n}\n\n.react-loading-skeleton {\n --base-color: #ebebeb;\n --highlight-color: #f5f5f5;\n --animation-duration: 1.5s;\n --animation-direction: normal;\n --pseudo-element-display: block; /* Enable animation */\n\n background-color: var(--base-color);\n\n width: 100%;\n border-radius: 0.25rem;\n display: inline-flex;\n line-height: 1;\n\n position: relative;\n overflow: hidden;\n z-index: 1; /* Necessary for overflow: hidden to work correctly in Safari */\n}\n\n.react-loading-skeleton::after {\n content: ' ';\n display: var(--pseudo-element-display);\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n height: 100%;\n background-repeat: no-repeat;\n background-image: linear-gradient(\n 90deg,\n var(--base-color),\n var(--highlight-color),\n var(--base-color)\n );\n transform: translateX(-100%);\n\n animation-name: react-loading-skeleton;\n animation-direction: var(--animation-direction);\n animation-duration: var(--animation-duration);\n animation-timing-function: ease-in-out;\n animation-iteration-count: infinite;\n}\n";
|