@linzjs/lui 17.39.2 → 17.41.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 CHANGED
@@ -1,3 +1,17 @@
1
+ # [17.41.0](https://github.com/linz/lui/compare/v17.40.0...v17.41.0) (2023-03-08)
2
+
3
+
4
+ ### Features
5
+
6
+ * added alternate modal header style ([#878](https://github.com/linz/lui/issues/878)) ([1f11909](https://github.com/linz/lui/commit/1f11909eddf8fb53ededf9e474737fdb4f393f46))
7
+
8
+ # [17.40.0](https://github.com/linz/lui/compare/v17.39.2...v17.40.0) (2023-03-07)
9
+
10
+
11
+ ### Features
12
+
13
+ * expose allowHTML and interactive tippy properties ([#876](https://github.com/linz/lui/issues/876)) ([a1d86c3](https://github.com/linz/lui/commit/a1d86c35f6fd4648045700f15f50b827699dc23b))
14
+
1
15
  ## [17.39.2](https://github.com/linz/lui/compare/v17.39.1...v17.39.2) (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 {};
@@ -10,5 +10,7 @@ export interface ILuiTooltipProperties {
10
10
  animation?: boolean;
11
11
  followCursor?: boolean;
12
12
  mode?: 'default' | 'info' | 'error';
13
+ interactive?: boolean;
14
+ allowHTML?: boolean;
13
15
  }
14
16
  export declare const LuiTooltip: (props: ILuiTooltipProperties) => JSX.Element;
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
 
@@ -47260,7 +47262,7 @@ styleInject(css_248z$4);
47260
47262
  var id = 0;
47261
47263
  var getKey = function () { return id++; };
47262
47264
  var LuiTooltip = function (props) {
47263
- var children = props.children, message = props.message, placement = props.placement, trigger = props.trigger, _a = props.animation, animation = _a === void 0 ? true : _a, _b = props.followCursor, followCursor$1 = _b === void 0 ? false : _b, _c = props.mode, mode = _c === void 0 ? 'default' : _c;
47265
+ var children = props.children, message = props.message, placement = props.placement, trigger = props.trigger, _a = props.animation, animation = _a === void 0 ? true : _a, _b = props.followCursor, followCursor$1 = _b === void 0 ? false : _b, _c = props.mode, mode = _c === void 0 ? 'default' : _c, _d = props.interactive, interactive = _d === void 0 ? false : _d, _e = props.allowHTML, allowHTML = _e === void 0 ? false : _e;
47264
47266
  var id = "LuiToolTip_".concat(React$1.useMemo(getKey, []));
47265
47267
  if (typeof message !== 'string') {
47266
47268
  throw new Error('LuiTooltip message must be a string!');
@@ -47275,6 +47277,8 @@ var LuiTooltip = function (props) {
47275
47277
  offset: [0, 18],
47276
47278
  animation: animation,
47277
47279
  followCursor: followCursor$1,
47280
+ interactive: interactive,
47281
+ allowHTML: allowHTML,
47278
47282
  plugins: [followCursor]
47279
47283
  });
47280
47284
  return function () {