@linzjs/lui 17.16.3 → 17.18.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 +9 -0
- package/dist/assets/icons/maori_land.svg +1 -0
- package/dist/assets/svg-content.tsx +6 -0
- package/dist/components/LuiStaticMessage/LuiStaticMessage.d.ts +3 -2
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/lui.esm.js +6 -2
- package/dist/lui.esm.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
# [17.18.0](https://github.com/linz/lui/compare/v17.17.0...v17.18.0) (2022-10-13)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* Added ability to overwrite icon displayed on LuiStaticMessage ([#784](https://github.com/linz/lui/issues/784)) ([86690d2](https://github.com/linz/lui/commit/86690d2504d0369c80e775f560ea596b7a37d4c1))
|
|
7
|
+
|
|
8
|
+
# [17.17.0](https://github.com/linz/lui/compare/v17.16.3...v17.17.0) (2022-10-13)
|
|
9
|
+
|
|
1
10
|
## [17.16.3](https://github.com/linz/lui/compare/v17.16.2...v17.16.3) (2022-10-12)
|
|
2
11
|
|
|
3
12
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M19.1 4.9C17.1 3 14.8 2 12 2S6.9 3 4.9 4.9C3 6.9 2 9.2 2 12s1 5.1 2.9 7.1c2 2 4.3 2.9 7.1 2.9s5.1-1 7.1-2.9S22 14.8 22 12s-1-5.1-2.9-7.1Zm-5.9 10.8H12V9.5l-2.2 6.2H8.7L6.6 9.5c.1.9.1 1.8.1 2.6v3.6H5.5V8.3h1.7l2.1 5.9 2.1-5.9h1.7v7.4h.1Zm1.9 0V8.3h1.2v6.4h3.2v1h-4.4Z" fill="#000"/></svg>
|
|
@@ -511,6 +511,12 @@ iconMap['ic_manage_adjust'] = (
|
|
|
511
511
|
</svg>
|
|
512
512
|
);
|
|
513
513
|
|
|
514
|
+
iconMap['ic_maori_land'] = (
|
|
515
|
+
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
516
|
+
<path d="M19.1 4.9C17.1 3 14.8 2 12 2S6.9 3 4.9 4.9C3 6.9 2 9.2 2 12s1 5.1 2.9 7.1c2 2 4.3 2.9 7.1 2.9s5.1-1 7.1-2.9S22 14.8 22 12s-1-5.1-2.9-7.1Zm-5.9 10.8H12V9.5l-2.2 6.2H8.7L6.6 9.5c.1.9.1 1.8.1 2.6v3.6H5.5V8.3h1.7l2.1 5.9 2.1-5.9h1.7v7.4h.1Zm1.9 0V8.3h1.2v6.4h3.2v1h-4.4Z" />
|
|
517
|
+
</svg>
|
|
518
|
+
);
|
|
519
|
+
|
|
514
520
|
iconMap['ic_mark_linking'] = (
|
|
515
521
|
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
516
522
|
<path d="M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2Zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8Zm3-8c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3Z" />
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
export interface ILuiStaticMessage {
|
|
3
3
|
level: 'success' | 'info' | 'warning' | 'error';
|
|
4
4
|
closable?: boolean;
|
|
5
|
+
icon?: string;
|
|
5
6
|
className?: string;
|
|
6
|
-
children?:
|
|
7
|
+
children?: ReactNode;
|
|
7
8
|
}
|
|
8
9
|
export declare const LuiStaticMessage: (props: ILuiStaticMessage) => JSX.Element;
|
package/dist/index.js
CHANGED
|
@@ -328,6 +328,8 @@ iconMap['ic_log_out'] = (React__default["default"].createElement("svg", { viewBo
|
|
|
328
328
|
iconMap['ic_manage_adjust'] = (React__default["default"].createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
|
|
329
329
|
React__default["default"].createElement("path", { d: "M13.02 19.93v2.02c2.01-.2 3.84-1 5.32-2.21l-1.42-1.43a7.941 7.941 0 0 1-3.9 1.62ZM4.03 12c0-4.05 3.03-7.41 6.95-7.93V2.05C5.95 2.58 2.03 6.84 2.03 12c0 5.16 3.92 9.42 8.95 9.95v-2.02c-3.92-.52-6.95-3.88-6.95-7.93Zm15.92-1h2.02c-.2-2.01-1-3.84-2.21-5.32l-1.43 1.43c.86 1.1 1.44 2.43 1.62 3.89Zm-1.61-6.74a9.981 9.981 0 0 0-5.32-2.21v2.02c1.46.18 2.79.76 3.9 1.62l1.42-1.43Zm-.01 12.64 1.43 1.42A9.949 9.949 0 0 0 21.97 13h-2.02a7.941 7.941 0 0 1-1.62 3.9Z" }),
|
|
330
330
|
React__default["default"].createElement("path", { d: "M12 7c2.1 0 4 1.61 4 4.1 0 1.66-1.33 3.63-4 5.9-2.67-2.27-4-4.24-4-5.9C8 8.61 9.9 7 12 7Zm-1.07 3.93a1.071 1.071 0 0 0 2.14 0 1.071 1.071 0 0 0-2.14 0Z" })));
|
|
331
|
+
iconMap['ic_maori_land'] = (React__default["default"].createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
|
|
332
|
+
React__default["default"].createElement("path", { d: "M19.1 4.9C17.1 3 14.8 2 12 2S6.9 3 4.9 4.9C3 6.9 2 9.2 2 12s1 5.1 2.9 7.1c2 2 4.3 2.9 7.1 2.9s5.1-1 7.1-2.9S22 14.8 22 12s-1-5.1-2.9-7.1Zm-5.9 10.8H12V9.5l-2.2 6.2H8.7L6.6 9.5c.1.9.1 1.8.1 2.6v3.6H5.5V8.3h1.7l2.1 5.9 2.1-5.9h1.7v7.4h.1Zm1.9 0V8.3h1.2v6.4h3.2v1h-4.4Z" })));
|
|
331
333
|
iconMap['ic_mark_linking'] = (React__default["default"].createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
|
|
332
334
|
React__default["default"].createElement("path", { d: "M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2Zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8Zm3-8c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3Z" })));
|
|
333
335
|
iconMap['ic_marks'] = (React__default["default"].createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
|
|
@@ -526,9 +528,11 @@ var LuiBannerContent = function (props) {
|
|
|
526
528
|
|
|
527
529
|
var LuiStaticMessage = function (props) {
|
|
528
530
|
var _a = React.useState(true), display = _a[0], setDisplay = _a[1];
|
|
529
|
-
var
|
|
531
|
+
var iconName = props.icon
|
|
532
|
+
? props.icon
|
|
533
|
+
: "ic_".concat(getMaterialIconForLevel(props.level));
|
|
530
534
|
return display ? (React__default["default"].createElement("div", { className: clsx("lui-msg-".concat(props.level), props.className), "data-testid": 'static-message-container' },
|
|
531
|
-
React__default["default"].createElement(LuiIcon, { name:
|
|
535
|
+
React__default["default"].createElement(LuiIcon, { name: iconName, alt: "".concat(props.level, " static icon"), size: "lg", className: "lui-msg-status-icon" }),
|
|
532
536
|
props.children,
|
|
533
537
|
(props.closable === undefined || props.closable) && (React__default["default"].createElement("button", { "aria-label": "Close dialog", onClick: function () {
|
|
534
538
|
setDisplay(false);
|