@juspay/svelte-ui-components 2.84.1 → 2.85.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.
@@ -9,13 +9,20 @@
9
9
  statusDescription = '',
10
10
  buttonProperties,
11
11
  classes,
12
- onbuttonClick
12
+ onbuttonClick,
13
+ icon
13
14
  }: StatusProperties = $props();
14
15
  </script>
15
16
 
16
17
  <div class="background {classes ?? ''}">
17
18
  <div class="order-status">
18
- <div class="status-image"><Img src={statusIcon} alt="status" /></div>
19
+ <div class="status-image">
20
+ {#if icon}
21
+ {@render icon()}
22
+ {:else}
23
+ <Img src={statusIcon} alt="status" />
24
+ {/if}
25
+ </div>
19
26
  <div class="status-text">{statusText}</div>
20
27
  <div class="status-description">
21
28
  <!-- eslint-disable-next-line -->
@@ -1,10 +1,17 @@
1
+ import type { Snippet } from 'svelte';
1
2
  import type { ButtonProperties } from '../Button/properties';
2
3
  export type StatusProperties = StatusEventProperties & {
3
- statusIcon: string;
4
+ statusIcon?: string;
4
5
  statusText: string;
5
6
  statusDescription: string;
6
7
  buttonProperties?: ButtonProperties;
7
8
  classes?: string;
9
+ /**
10
+ * Custom media rendered instead of the default `statusIcon` image — e.g. a
11
+ * `LottiePlayer` for animated success/failure/in-progress states. Takes
12
+ * priority over `statusIcon` when provided.
13
+ */
14
+ icon?: Snippet;
8
15
  };
9
16
  export type StatusEventProperties = {
10
17
  onbuttonClick?: () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juspay/svelte-ui-components",
3
- "version": "2.84.1",
3
+ "version": "2.85.0",
4
4
  "description": "A themeable Svelte 5 UI component library with CSS custom property driven styling",
5
5
  "keywords": [
6
6
  "svelte",