@linzjs/lui 21.26.3 → 21.27.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,10 @@
|
|
|
1
|
+
# [21.27.0](https://github.com/linz/lui/compare/v21.26.3...v21.27.0) (2024-04-24)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* adds optional dataTestId to LuiLoadingSpinner ([#1113](https://github.com/linz/lui/issues/1113)) ([dbad239](https://github.com/linz/lui/commit/dbad239e66b27300220c08b9cd8d094564724ed1))
|
|
7
|
+
|
|
1
8
|
## [21.26.3](https://github.com/linz/lui/compare/v21.26.2...v21.26.3) (2024-04-22)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -8,6 +8,8 @@ interface LuiMiniSpinnerProps {
|
|
|
8
8
|
divProps?: any;
|
|
9
9
|
}
|
|
10
10
|
export declare const LuiMiniSpinner: (props: LuiMiniSpinnerProps) => JSX.Element;
|
|
11
|
-
export declare const LuiLoadingSpinner: (
|
|
11
|
+
export declare const LuiLoadingSpinner: (props: {
|
|
12
|
+
dataTestId?: string;
|
|
13
|
+
}) => JSX.Element;
|
|
12
14
|
export declare function isChromatic(): boolean;
|
|
13
15
|
export {};
|
package/dist/index.js
CHANGED
|
@@ -31491,7 +31491,11 @@ var renderSettings = {
|
|
|
31491
31491
|
preserveAspectRatio: 'xMidYMid slice'
|
|
31492
31492
|
};
|
|
31493
31493
|
var LuiLoadingSpinnerBase = function (props) {
|
|
31494
|
-
|
|
31494
|
+
var testId = 'loading-spinner';
|
|
31495
|
+
if (props.dataTestId) {
|
|
31496
|
+
testId += "-".concat(props.dataTestId);
|
|
31497
|
+
}
|
|
31498
|
+
return (React__default["default"].createElement("div", { className: "LuiLoadingSpinnerBase", "data-testid": testId },
|
|
31495
31499
|
React__default["default"].createElement(LuiLottieLight, { animationData: props.animationData, loop: true, autoplay: autoplay, rendererSettings: renderSettings, style: style })));
|
|
31496
31500
|
};
|
|
31497
31501
|
/**
|
|
@@ -31509,8 +31513,8 @@ var LuiMiniSpinner = function (props) {
|
|
|
31509
31513
|
preserveAspectRatio: 'xMidYMid slice'
|
|
31510
31514
|
}, style: { height: props.size, width: props.size } })));
|
|
31511
31515
|
};
|
|
31512
|
-
var LuiLoadingSpinner = function () {
|
|
31513
|
-
return React__default["default"].createElement(LuiLoadingSpinnerBase, { animationData: loaderData });
|
|
31516
|
+
var LuiLoadingSpinner = function (props) {
|
|
31517
|
+
return (React__default["default"].createElement(LuiLoadingSpinnerBase, { animationData: loaderData, dataTestId: props.dataTestId }));
|
|
31514
31518
|
};
|
|
31515
31519
|
// this function was extracted from chromatic/isChromatic. It was causing TS issues for the consumer
|
|
31516
31520
|
function isChromatic() {
|