@linzjs/lui 22.0.0 → 22.0.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 +7 -0
- package/dist/index.js +18 -6
- package/dist/index.js.map +1 -1
- package/dist/lui.css +8 -3
- package/dist/lui.css.map +1 -1
- package/dist/lui.esm.js +18 -6
- package/dist/lui.esm.js.map +1 -1
- package/dist/scss/Components/Modal/modal-v2.scss +10 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [22.0.1](https://github.com/linz/lui/compare/v22.0.0...v22.0.1) (2024-12-02)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* SRVPUW-1153 dialog styles incorrect ([#1179](https://github.com/linz/lui/issues/1179)) ([122e838](https://github.com/linz/lui/commit/122e83849070b43d80e5cc86626918c8a9f0d371))
|
|
7
|
+
|
|
1
8
|
# [22.0.0](https://github.com/linz/lui/compare/v21.54.1...v22.0.0) (2024-12-01)
|
|
2
9
|
|
|
3
10
|
## [21.54.1](https://github.com/linz/lui/compare/v21.54.0...v21.54.1) (2024-12-01)
|
package/dist/index.js
CHANGED
|
@@ -858,7 +858,7 @@ var LuiIcon = React.forwardRef(function (props, ref) {
|
|
|
858
858
|
return (React__default["default"].createElement("span", __assign({ ref: ref, className: clsx('LuiIcon', className, size && ICON_SIZES[size], status && ICON_STATUS[status]), "data-icon": name, title: title, "aria-label": alt }, spanProps, { style: customStyle }), iconSVG));
|
|
859
859
|
});
|
|
860
860
|
|
|
861
|
-
function getMaterialIconForLevel(level) {
|
|
861
|
+
function getMaterialIconForLevel$1(level) {
|
|
862
862
|
switch (level) {
|
|
863
863
|
case 'success':
|
|
864
864
|
return 'check_circle';
|
|
@@ -875,7 +875,7 @@ var LuiBanner = function (props) {
|
|
|
875
875
|
React__default["default"].createElement(LuiBannerContent, { level: props.level, className: props.className }, props.children)));
|
|
876
876
|
};
|
|
877
877
|
var LuiBannerContent = function (props) {
|
|
878
|
-
var materialIcon = getMaterialIconForLevel(props.level);
|
|
878
|
+
var materialIcon = getMaterialIconForLevel$1(props.level);
|
|
879
879
|
return (React__default["default"].createElement("div", { className: clsx("lui-msg-".concat(props.level, " lui-msg-dynamic-banner"), props.className) },
|
|
880
880
|
React__default["default"].createElement(LuiIcon, { name: "ic_".concat(materialIcon), alt: "".concat(props.level, " banner icon"), size: "lg", className: "lui-msg-status-icon" }),
|
|
881
881
|
React__default["default"].createElement("div", null, props.children)));
|
|
@@ -885,7 +885,7 @@ var LuiStaticMessage = function (props) {
|
|
|
885
885
|
var _a = React.useState(true), display = _a[0], setDisplay = _a[1];
|
|
886
886
|
var iconName = props.icon
|
|
887
887
|
? props.icon
|
|
888
|
-
: "ic_".concat(getMaterialIconForLevel(props.level));
|
|
888
|
+
: "ic_".concat(getMaterialIconForLevel$1(props.level));
|
|
889
889
|
return display ? (React__default["default"].createElement("div", { className: clsx("lui-msg-".concat(props.level), props.className), "data-testid": 'static-message-container' },
|
|
890
890
|
React__default["default"].createElement(LuiIcon, { name: iconName, alt: "".concat(props.level, " static icon"), size: "lg", className: "lui-msg-status-icon" }),
|
|
891
891
|
props.children,
|
|
@@ -42217,7 +42217,7 @@ var LuiModal = function (props) {
|
|
|
42217
42217
|
* @deprecated this is replaced by `LuiAlertModalV2`. [Migration notes](https://github.com/linz/Lui/pull/1127).
|
|
42218
42218
|
*/
|
|
42219
42219
|
var LuiAlertModal = function (props) {
|
|
42220
|
-
var materialIcon = getMaterialIconForLevel(props.level);
|
|
42220
|
+
var materialIcon = getMaterialIconForLevel$1(props.level);
|
|
42221
42221
|
var level = props.level, className = props.className, children = props.children, rest = __rest(props, ["level", "className", "children"]);
|
|
42222
42222
|
return (React__default["default"].createElement(LuiModal, __assign({}, rest, { className: clsx("lui-modal-".concat(level), className) }),
|
|
42223
42223
|
React__default["default"].createElement(LuiIcon, { name: "ic_".concat(materialIcon), alt: "".concat(level, " status icon"), size: "lg", className: "lui-msg-status-icon" }),
|
|
@@ -42344,6 +42344,18 @@ LuiModalV2.HeaderTitle = HeaderTitle;
|
|
|
42344
42344
|
var isProcess = typeof process !== 'undefined';
|
|
42345
42345
|
var isTest = isProcess && ((_a = process === null || process === void 0 ? void 0 : process.env) === null || _a === void 0 ? void 0 : _a.NODE_ENV) === 'test';
|
|
42346
42346
|
|
|
42347
|
+
var getMaterialIconForLevel = function (level) {
|
|
42348
|
+
switch (level) {
|
|
42349
|
+
case 'success':
|
|
42350
|
+
return 'ic_check_circle_outline';
|
|
42351
|
+
case 'info':
|
|
42352
|
+
return 'ic_info_outline';
|
|
42353
|
+
case 'warning':
|
|
42354
|
+
return 'ic_warning_outline';
|
|
42355
|
+
case 'error':
|
|
42356
|
+
return 'ic_error_outline';
|
|
42357
|
+
}
|
|
42358
|
+
};
|
|
42347
42359
|
var LuiAlertModalV2 = function (props) {
|
|
42348
42360
|
var level = props.level, className = props.className, children = props.children, rest = __rest(props, ["level", "className", "children"]);
|
|
42349
42361
|
var materialIcon = getMaterialIconForLevel(level);
|
|
@@ -42351,7 +42363,7 @@ var LuiAlertModalV2 = function (props) {
|
|
|
42351
42363
|
? level
|
|
42352
42364
|
: 'interactive';
|
|
42353
42365
|
return (React__default["default"].createElement(LuiModalV2, __assign({}, rest, { className: clsx("lui-modal-v2-alert lui-modal-v2-".concat(level), className), headingIcon: {
|
|
42354
|
-
name:
|
|
42366
|
+
name: materialIcon,
|
|
42355
42367
|
alt: "".concat(level, " status icon"),
|
|
42356
42368
|
size: 'md',
|
|
42357
42369
|
status: status
|
|
@@ -59919,7 +59931,7 @@ var LuiToastMessage$1 = function (_a) {
|
|
|
59919
59931
|
var _e = React.useState('lui-msg-toast-show'), className = _e[0], setClassname = _e[1];
|
|
59920
59932
|
var _f = React.useState(undefined), fadeOutTimer = _f[0], setFadeOutTimer = _f[1];
|
|
59921
59933
|
var _g = React.useState(undefined), removeTimer = _g[0], setRemoveTimer = _g[1];
|
|
59922
|
-
var materialIcon = getMaterialIconForLevel(level);
|
|
59934
|
+
var materialIcon = getMaterialIconForLevel$1(level);
|
|
59923
59935
|
var callOnCloseAfterDissolved = function () {
|
|
59924
59936
|
// This is so the caller can remove it from the dom
|
|
59925
59937
|
if (onClose) {
|