@leabankab/component-library 8.10.0 → 8.11.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/component-library.es.js +1572 -1565
- package/dist/component-library.es.js.map +1 -1
- package/dist/component-library.umd.js +2 -2
- package/dist/component-library.umd.js.map +1 -1
- package/dist/components/animations/index.d.ts +5 -2
- package/dist/components/animations/loader/loader.d.ts +43 -0
- package/dist/components/animations/pulse-animation/pulse-animation.d.ts +21 -0
- package/dist/components/animations/{illustrations → status-animation}/status-animation.d.ts +7 -6
- package/dist/components/feedback/alert-parts.d.ts +1 -1
- package/dist/index.css +1 -1
- package/dist/theme/tokens/text-styles.d.ts +1 -1
- package/package.json +1 -1
- package/dist/components/animations/icons/index.d.ts +0 -1
- package/dist/components/animations/illustrations/index.d.ts +0 -3
- package/dist/components/animations/illustrations/pulse-animation.d.ts +0 -16
- /package/dist/components/animations/{illustrations → check-animation}/check-animation.d.ts +0 -0
- /package/dist/components/animations/{icons → status-icon}/status-icon.d.ts +0 -0
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
1
|
+
export * from './check-animation/check-animation';
|
|
2
|
+
export * from './loader/loader';
|
|
3
|
+
export * from './pulse-animation/pulse-animation';
|
|
4
|
+
export * from './status-animation/status-animation';
|
|
5
|
+
export * from './status-icon/status-icon';
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { AnimationColor, AnimationSize } from '../shared';
|
|
2
|
+
export type LoaderStatus = "loading" | "done";
|
|
3
|
+
export type LoaderProps = {
|
|
4
|
+
/**
|
|
5
|
+
* `"loading"` shows the pulse. `"done"` cross-fades into the check and fires
|
|
6
|
+
* its one-time confetti.
|
|
7
|
+
* @default "loading"
|
|
8
|
+
*/
|
|
9
|
+
status?: LoaderStatus;
|
|
10
|
+
/**
|
|
11
|
+
* `"sm"` is 90px, `"lg"` 150px.
|
|
12
|
+
* @default "lg"
|
|
13
|
+
*/
|
|
14
|
+
size?: AnimationSize;
|
|
15
|
+
/**
|
|
16
|
+
* Colour of the pulse and of the check (and its halo).
|
|
17
|
+
* @default "primary"
|
|
18
|
+
*/
|
|
19
|
+
color?: AnimationColor;
|
|
20
|
+
/**
|
|
21
|
+
* Minimum time (ms) the pulse stays visible once mounted in the loading
|
|
22
|
+
* state, so a very fast response doesn't make the spinner flash. The check
|
|
23
|
+
* appears as soon as `status` is `"done"` *and* this minimum has elapsed.
|
|
24
|
+
*/
|
|
25
|
+
minLoadingMs?: number;
|
|
26
|
+
/**
|
|
27
|
+
* Visually-hidden status text announced while loading. Defaults to the
|
|
28
|
+
* translated word for "loading" in the `LeaProvider` language.
|
|
29
|
+
*/
|
|
30
|
+
loadingLabel?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Visually-hidden status text announced once done. Defaults to the translated
|
|
33
|
+
* word for "done".
|
|
34
|
+
*/
|
|
35
|
+
doneLabel?: string;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* The library's loading indicator: shows {@link PulseAnimation} while
|
|
39
|
+
* `status` is `"loading"`, then cross-fades into {@link CheckAnimation}
|
|
40
|
+
* (firing its one-time confetti) once `status` becomes `"done"`. Announces
|
|
41
|
+
* state changes politely and respects `prefers-reduced-motion`.
|
|
42
|
+
*/
|
|
43
|
+
export declare const Loader: ({ status, size, color, minLoadingMs, loadingLabel, doneLabel, }: LoaderProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AnimationColor, AnimationSize } from '../shared';
|
|
2
|
+
type PulseAnimationProps = {
|
|
3
|
+
/**
|
|
4
|
+
* `"sm"` is 90px, `"lg"` 150px.
|
|
5
|
+
* @default "lg"
|
|
6
|
+
*/
|
|
7
|
+
size?: AnimationSize;
|
|
8
|
+
/**
|
|
9
|
+
* Colour of the rings and the centre circle.
|
|
10
|
+
* @default "primary"
|
|
11
|
+
*/
|
|
12
|
+
color?: AnimationColor;
|
|
13
|
+
/**
|
|
14
|
+
* Accessible name for the spinner; defaults to the translated word for
|
|
15
|
+
* "loading" in the `LeaProvider` language. `Loader` hides the pulse from
|
|
16
|
+
* assistive tech and announces its own status text instead.
|
|
17
|
+
*/
|
|
18
|
+
label?: string;
|
|
19
|
+
};
|
|
20
|
+
export declare const PulseAnimation: ({ size, color, label, }: PulseAnimationProps) => import("react").JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -8,7 +8,7 @@ type StatusAnimationProps = {
|
|
|
8
8
|
*/
|
|
9
9
|
size?: AnimationSize;
|
|
10
10
|
/**
|
|
11
|
-
* Colour of the resulting check (and its halo).
|
|
11
|
+
* Colour of the pulse and of the resulting check (and its halo).
|
|
12
12
|
* @default "primary"
|
|
13
13
|
*/
|
|
14
14
|
color?: AnimationColor;
|
|
@@ -30,10 +30,11 @@ type StatusAnimationProps = {
|
|
|
30
30
|
doneLabel?: string;
|
|
31
31
|
};
|
|
32
32
|
/**
|
|
33
|
-
* A controlled loading → success indicator:
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
33
|
+
* A controlled loading → success indicator: the pulse while `loading`, then
|
|
34
|
+
* the check once `loading` becomes `false`.
|
|
35
|
+
*
|
|
36
|
+
* @deprecated Use {@link Loader}, which renders the same thing:
|
|
37
|
+
* `<Loader status={loading ? "loading" : "done"} />`.
|
|
37
38
|
*/
|
|
38
|
-
export declare const StatusAnimation: ({ loading,
|
|
39
|
+
export declare const StatusAnimation: ({ loading, ...rest }: StatusAnimationProps) => import("react").JSX.Element;
|
|
39
40
|
export {};
|
|
@@ -52,10 +52,10 @@ export declare function resolveAlert({ severity, color, variant, size, icon, act
|
|
|
52
52
|
"data-color": AlertColor;
|
|
53
53
|
"data-variant": AlertVariant;
|
|
54
54
|
"data-size": AlertSize;
|
|
55
|
+
title?: string | undefined | undefined;
|
|
55
56
|
className?: string | undefined | undefined;
|
|
56
57
|
slot?: string | undefined | undefined;
|
|
57
58
|
style?: import('react').CSSProperties | undefined;
|
|
58
|
-
title?: string | undefined | undefined;
|
|
59
59
|
onAnimationStart?: import('react').AnimationEventHandler<HTMLDivElement> | undefined;
|
|
60
60
|
onDragStart?: import('react').DragEventHandler<HTMLDivElement> | undefined;
|
|
61
61
|
onDragEnd?: import('react').DragEventHandler<HTMLDivElement> | undefined;
|