@linzjs/lui 16.2.3 → 16.2.6

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,24 @@
1
+ ## [16.2.6](https://github.com/linz/lui/compare/v16.2.5...v16.2.6) (2022-03-31)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Remove GlobalHeader from Lui ([#644](https://github.com/linz/lui/issues/644)) ([8385cc4](https://github.com/linz/lui/commit/8385cc4fb315f1a6b22b5d500917a9be559eda02))
7
+
8
+ ## [16.2.5](https://github.com/linz/lui/compare/v16.2.4...v16.2.5) (2022-03-31)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * updating to accept classname (also convert from FC) ([#640](https://github.com/linz/lui/issues/640)) ([9b4aa50](https://github.com/linz/lui/commit/9b4aa50ba2aca8f1aca049f23c0566d881e6c2a0))
14
+
15
+ ## [16.2.4](https://github.com/linz/lui/compare/v16.2.3...v16.2.4) (2022-03-29)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * wrong type for mandatory ([#639](https://github.com/linz/lui/issues/639)) ([f6fdffa](https://github.com/linz/lui/commit/f6fdffa936345fe701e32e709dc9e185290997d7))
21
+
1
22
  ## [16.2.3](https://github.com/linz/lui/compare/v16.2.2...v16.2.3) (2022-03-28)
2
23
 
3
24
 
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M15.5 14h-.79l-.28-.27a6.5 6.5 0 0 0 1.48-5.34c-.47-2.78-2.79-5-5.59-5.34a6.505 6.505 0 0 0-7.27 7.27c.34 2.8 2.56 5.12 5.34 5.59a6.5 6.5 0 0 0 5.34-1.48l.27.28v.79l4.25 4.25c.41.41 1.08.41 1.49 0 .41-.41.41-1.08 0-1.49L15.5 14Zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14Z" /></svg>
@@ -587,6 +587,12 @@ iconMap['ic_saved_area_interest'] = (
587
587
  </svg>
588
588
  );
589
589
 
590
+ iconMap['ic_search'] = (
591
+ <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
592
+ <path d="M15.5 14h-.79l-.28-.27a6.5 6.5 0 0 0 1.48-5.34c-.47-2.78-2.79-5-5.59-5.34a6.505 6.505 0 0 0-7.27 7.27c.34 2.8 2.56 5.12 5.34 5.59a6.5 6.5 0 0 0 5.34-1.48l.27.28v.79l4.25 4.25c.41.41 1.08.41 1.49 0 .41-.41.41-1.08 0-1.49L15.5 14Zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14Z" />
593
+ </svg>
594
+ );
595
+
590
596
  iconMap['ic_send'] = (
591
597
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
592
598
  <path d="M1.5 21v-6.984L16.5 12l-15-2.016V3l21 9z" />
@@ -1,10 +1,10 @@
1
1
  import { ReactNode } from 'react';
2
- declare type Props = {
2
+ declare type ILuiBanner = {
3
3
  level: 'success' | 'info' | 'warning' | 'error';
4
4
  children: ReactNode;
5
5
  className?: string;
6
6
  };
7
7
  export declare function getMaterialIconForLevel(level: 'success' | 'info' | 'warning' | 'error'): "info" | "warning" | "error" | "check_circle";
8
- export declare const LuiBanner: (props: Props) => JSX.Element;
9
- export declare const LuiBannerContent: (props: Props) => JSX.Element;
8
+ export declare const LuiBanner: (props: ILuiBanner) => JSX.Element;
9
+ export declare const LuiBannerContent: (props: ILuiBanner) => JSX.Element;
10
10
  export {};
@@ -8,6 +8,6 @@ export interface LuiCheckboxProps {
8
8
  error?: string;
9
9
  inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
10
10
  className?: string;
11
- mandatory?: string;
11
+ mandatory?: boolean;
12
12
  }
13
13
  export declare const LuiCheckboxInput: (props: LuiCheckboxProps) => JSX.Element;
@@ -1,5 +1,8 @@
1
1
  import React from 'react';
2
- export declare const LuiStaticMessage: React.FC<{
2
+ export interface ILuiStaticMessage {
3
3
  level: 'success' | 'info' | 'warning' | 'error';
4
4
  closable?: boolean;
5
- }>;
5
+ className?: string;
6
+ children?: React.ReactNode;
7
+ }
8
+ export declare const LuiStaticMessage: (props: ILuiStaticMessage) => JSX.Element;
package/dist/index.js CHANGED
@@ -348,6 +348,8 @@ iconMap['ic_save_download'] = (React__default["default"].createElement("svg", {
348
348
  React__default["default"].createElement("path", { d: "M19 13v5c0 .55-.45 1-1 1H6c-.55 0-1-.45-1-1v-5c0-.55-.45-1-1-1s-1 .45-1 1v6c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-6c0-.55-.45-1-1-1s-1 .45-1 1Zm-6-.33 1.88-1.88a.996.996 0 1 1 1.41 1.41l-3.59 3.59a.996.996 0 0 1-1.41 0L7.7 12.2a.996.996 0 1 1 1.41-1.41L11 12.67V4c0-.55.45-1 1-1s1 .45 1 1v8.67Z" })));
349
349
  iconMap['ic_saved_area_interest'] = (React__default["default"].createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
350
350
  React__default["default"].createElement("path", { d: "M5 14H3v4c0 1.1.9 2 2 2h4v-2H5v-4Zm0-8h4V4H5c-1.1 0-2 .9-2 2v4h2V6Zm14-2h-4v2h4v4h2V6c0-1.1-.9-2-2-2Zm0 14h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4Zm-5.027-2.36-1.94-1.13-1.94 1.13a.502.502 0 0 1-.74-.55l.51-2.2-1.69-1.46c-.33-.29-.16-.84.28-.88l2.23-.19.88-2.06c.17-.4.75-.4.92 0l.88 2.06 2.23.19a.5.5 0 0 1 .28.88l-1.69 1.46.51 2.2a.49.49 0 0 1-.72.55Z" })));
351
+ iconMap['ic_search'] = (React__default["default"].createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
352
+ React__default["default"].createElement("path", { d: "M15.5 14h-.79l-.28-.27a6.5 6.5 0 0 0 1.48-5.34c-.47-2.78-2.79-5-5.59-5.34a6.505 6.505 0 0 0-7.27 7.27c.34 2.8 2.56 5.12 5.34 5.59a6.5 6.5 0 0 0 5.34-1.48l.27.28v.79l4.25 4.25c.41.41 1.08.41 1.49 0 .41-.41.41-1.08 0-1.49L15.5 14Zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14Z" })));
351
353
  iconMap['ic_send'] = (React__default["default"].createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" },
352
354
  React__default["default"].createElement("path", { d: "M1.5 21v-6.984L16.5 12l-15-2.016V3l21 9z" })));
353
355
  iconMap['ic_send_email_dart'] = (React__default["default"].createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
@@ -457,13 +459,13 @@ var LuiBannerContent = function (props) {
457
459
  var LuiStaticMessage = function (props) {
458
460
  var _a = React.useState(true), display = _a[0], setDisplay = _a[1];
459
461
  var materialIcon = getMaterialIconForLevel(props.level);
460
- return display ? (React__default["default"].createElement("div", { className: "lui-msg-" + props.level, "data-testid": 'static-message-container' },
462
+ return display ? (React__default["default"].createElement("div", { className: clsx("lui-msg-" + props.level, props.className), "data-testid": 'static-message-container' },
461
463
  React__default["default"].createElement(LuiIcon, { name: "ic_" + materialIcon, alt: props.level + " static icon", size: "lg", className: "lui-msg-status-icon" }),
462
464
  props.children,
463
465
  (props.closable === undefined || props.closable) && (React__default["default"].createElement("button", { "aria-label": "Close dialog", onClick: function () {
464
466
  setDisplay(false);
465
467
  } },
466
- React__default["default"].createElement(LuiIcon, { name: "ic_clear", alt: 'close', size: "md", className: "LuiStaticMsg-close" }))))) : null;
468
+ React__default["default"].createElement(LuiIcon, { name: "ic_clear", alt: 'close', size: "md", className: "LuiStaticMsg-close" }))))) : (React__default["default"].createElement(React__default["default"].Fragment, null));
467
469
  };
468
470
 
469
471
  var PlainButton = React__default["default"].forwardRef(function (props, ref) {
@@ -890,7 +892,7 @@ var LuiCheckboxInput = function (props) {
890
892
  'LuiCheckboxInput--isDisabled': !!props.isDisabled,
891
893
  }, props.className) },
892
894
  React__default["default"].createElement("label", { htmlFor: id, className: "LuiCheckboxInput-group" },
893
- props.mandatory && (React__default["default"].createElement("span", { className: "LuiCheckboxInput-mandatory" }, "*")),
895
+ props.mandatory && (React__default["default"].createElement("span", { "aria-label": "Required", className: "LuiCheckboxInput-mandatory" }, "*")),
894
896
  React__default["default"].createElement("input", __assign({ className: clsx('LuiCheckboxInput-input'), id: id, type: "checkbox", value: props.value, onChange: props.onChange, checked: props.isChecked, disabled: props.isDisabled }, props.inputProps)),
895
897
  React__default["default"].createElement("span", { className: "LuiCheckboxInput-label" },
896
898
  props.label,