@linzjs/lui 17.40.0 → 17.41.1

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 CHANGED
@@ -1,3 +1,17 @@
1
+ ## [17.41.1](https://github.com/linz/lui/compare/v17.41.0...v17.41.1) (2023-03-09)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * update LuiHeaderV2 dropdown border and shadow based on figma design ([#879](https://github.com/linz/lui/issues/879)) ([76f2cac](https://github.com/linz/lui/commit/76f2cacb937cd35eb4ed9882c9ad8e3e7821d9cf))
7
+
8
+ # [17.41.0](https://github.com/linz/lui/compare/v17.40.0...v17.41.0) (2023-03-08)
9
+
10
+
11
+ ### Features
12
+
13
+ * added alternate modal header style ([#878](https://github.com/linz/lui/issues/878)) ([1f11909](https://github.com/linz/lui/commit/1f11909eddf8fb53ededf9e474737fdb4f393f46))
14
+
1
15
  # [17.40.0](https://github.com/linz/lui/compare/v17.39.2...v17.40.0) (2023-03-07)
2
16
 
3
17
 
@@ -10,6 +10,7 @@ interface ILuiModal {
10
10
  lowContrast?: boolean;
11
11
  preventAutoFocus?: boolean;
12
12
  appendToElement?: () => HTMLElement;
13
+ headerStyle?: 'light' | 'default';
13
14
  }
14
15
  export declare const LuiModal: React.FC<React.PropsWithChildren<ILuiModal>>;
15
16
  export declare const LuiAlertModal: React.FC<React.PropsWithChildren<{
@@ -20,6 +21,7 @@ interface IModalHeader {
20
21
  headingText?: string;
21
22
  helpLink?: string;
22
23
  onClose?: () => void;
24
+ style?: 'light' | 'default';
23
25
  }
24
26
  export declare const LuiModalHeader: React.FC<React.PropsWithChildren<IModalHeader>>;
25
27
  export {};
package/dist/index.js CHANGED
@@ -42426,7 +42426,7 @@ var LuiModal = function (props) {
42426
42426
  parentSelector: props.appendToElement
42427
42427
  })),
42428
42428
  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) },
42429
- props.headingText && (React__default["default"].createElement(LuiModalHeader, { headingText: props.headingText, helpLink: props.helpLink, onClose: props.onClose })),
42429
+ props.headingText && (React__default["default"].createElement(LuiModalHeader, { headingText: props.headingText, helpLink: props.helpLink, onClose: props.onClose, style: props.headerStyle })),
42430
42430
  React__default["default"].createElement("div", { className: clsx$1(props.headingText && 'lui-modal-container'), ref: function (element) {
42431
42431
  if (!props.preventAutoFocus &&
42432
42432
  element &&
@@ -42446,12 +42446,14 @@ var LuiAlertModalButtons = function (props) {
42446
42446
  return React__default["default"].createElement("div", { className: "modal-btn-row" }, props.children);
42447
42447
  };
42448
42448
  var LuiModalHeader = function (props) {
42449
- return (React__default["default"].createElement("header", { className: "lui-modal-header" }, props.headingText && (React__default["default"].createElement("div", { className: "lui-modal-header-title" },
42449
+ var _a;
42450
+ var headerStyle = (_a = props.style) !== null && _a !== void 0 ? _a : 'default';
42451
+ return (React__default["default"].createElement("header", { className: "lui-modal-header-".concat(headerStyle) }, props.headingText && (React__default["default"].createElement("div", { className: "lui-modal-header-title" },
42450
42452
  React__default["default"].createElement("h1", null, props.headingText),
42451
42453
  React__default["default"].createElement("div", { className: "lui-modal-header-buttons" },
42452
42454
  props.helpLink && (React__default["default"].createElement("button", { className: "lui-modal-header-help-btn", onClick: function () { return window.open(props.helpLink); } },
42453
42455
  React__default["default"].createElement(LuiIcon, { name: "ic_help_outline", alt: "Help", size: "lg" }))),
42454
- props.onClose && (React__default["default"].createElement("button", { className: "lui-modal-header-close-btn", onClick: props.onClose },
42456
+ headerStyle === 'default' && props.onClose && (React__default["default"].createElement("button", { className: "lui-modal-header-close-btn", onClick: props.onClose },
42455
42457
  React__default["default"].createElement(LuiIcon, { name: "ic_clear", alt: "Help", size: "lg" }))))))));
42456
42458
  };
42457
42459