@softwareone/spi-sv5-library 1.14.2 → 1.14.3

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/README.md CHANGED
@@ -43,7 +43,7 @@ Install only what you use:
43
43
 
44
44
  <Button onclick={() => (showModal = true)}>Open modal</Button>
45
45
 
46
- <Modal bind:showModal title="Hello">
46
+ <Modal bind:show={showModal} title="Hello">
47
47
  <p>Modal content goes here.</p>
48
48
  </Modal>
49
49
  ```
@@ -169,7 +169,7 @@ import { ... } from '@softwareone/spi-sv5-library/table';
169
169
  </script>
170
170
 
171
171
  <Modal
172
- bind:showModal
172
+ bind:show={showModal}
173
173
  title="Confirm action"
174
174
  width="xs" <!-- 'xs' | 'md' | 'lg' | 'xl' -->
175
175
  >
@@ -5,7 +5,7 @@
5
5
  title: string;
6
6
  confirmationText: string;
7
7
  confirmButtonText?: string;
8
- showModal?: boolean;
8
+ show?: boolean;
9
9
  onconfirm: () => Promise<string | void> | string | void;
10
10
  onclose?: VoidFunction;
11
11
  }
@@ -14,7 +14,7 @@
14
14
  title,
15
15
  confirmationText,
16
16
  confirmButtonText = 'Proceed',
17
- showModal = $bindable(false),
17
+ show = $bindable(false),
18
18
  onconfirm,
19
19
  onclose
20
20
  }: Props = $props();
@@ -26,7 +26,7 @@
26
26
 
27
27
  const error = await onconfirm();
28
28
  if (error === undefined) {
29
- showModal = false;
29
+ show = false;
30
30
  } else {
31
31
  addToast({ message: error, type: 'danger' });
32
32
  }
@@ -35,7 +35,7 @@
35
35
  };
36
36
  </script>
37
37
 
38
- <Modal {title} bind:showModal {onclose}>
38
+ <Modal {title} bind:show {onclose}>
39
39
  <Spinner show={isLoading} />
40
40
  <p>{confirmationText}</p>
41
41
  {#snippet footer()}
@@ -2,10 +2,10 @@ interface Props {
2
2
  title: string;
3
3
  confirmationText: string;
4
4
  confirmButtonText?: string;
5
- showModal?: boolean;
5
+ show?: boolean;
6
6
  onconfirm: () => Promise<string | void> | string | void;
7
7
  onclose?: VoidFunction;
8
8
  }
9
- declare const Confirmation: import("svelte").Component<Props, {}, "showModal">;
9
+ declare const Confirmation: import("svelte").Component<Props, {}, "show">;
10
10
  type Confirmation = ReturnType<typeof Confirmation>;
11
11
  export default Confirmation;
@@ -4,7 +4,7 @@
4
4
  interface Props {
5
5
  confirmationName?: string;
6
6
  enableDoubleConfirmation?: boolean;
7
- showModal?: boolean;
7
+ show?: boolean;
8
8
  ondelete: () => Promise<string | void> | string | void;
9
9
  onclose?: VoidFunction;
10
10
  }
@@ -12,7 +12,7 @@
12
12
  let {
13
13
  confirmationName = '',
14
14
  enableDoubleConfirmation = false,
15
- showModal = $bindable(false),
15
+ show = $bindable(false),
16
16
  ondelete,
17
17
  onclose
18
18
  }: Props = $props();
@@ -29,7 +29,7 @@
29
29
 
30
30
  const error = await ondelete();
31
31
  if (error === undefined) {
32
- showModal = false;
32
+ show = false;
33
33
  } else {
34
34
  addToast({ message: error, type: 'danger' });
35
35
  }
@@ -38,7 +38,7 @@
38
38
  };
39
39
  </script>
40
40
 
41
- <Modal title="Delete confirmation" bind:showModal {onclose}>
41
+ <Modal title="Delete confirmation" bind:show {onclose}>
42
42
  <Spinner show={isLoading} />
43
43
  <div class="content">
44
44
  <p>{confirmationText}</p>
@@ -1,10 +1,10 @@
1
1
  interface Props {
2
2
  confirmationName?: string;
3
3
  enableDoubleConfirmation?: boolean;
4
- showModal?: boolean;
4
+ show?: boolean;
5
5
  ondelete: () => Promise<string | void> | string | void;
6
6
  onclose?: VoidFunction;
7
7
  }
8
- declare const DeleteConfirmation: import("svelte").Component<Props, {}, "showModal">;
8
+ declare const DeleteConfirmation: import("svelte").Component<Props, {}, "show">;
9
9
  type DeleteConfirmation = ReturnType<typeof DeleteConfirmation>;
10
10
  export default DeleteConfirmation;
@@ -8,7 +8,7 @@
8
8
 
9
9
  let {
10
10
  // eslint-disable-next-line no-useless-assignment
11
- showModal = $bindable(false),
11
+ show = $bindable(false),
12
12
  title,
13
13
  width = 'xs',
14
14
  errorIcon,
@@ -20,7 +20,7 @@
20
20
  }: ModalProps = $props();
21
21
 
22
22
  const onHandleClose = () => {
23
- showModal = false;
23
+ show = false;
24
24
  onclose?.();
25
25
  };
26
26
  </script>
@@ -1,4 +1,4 @@
1
1
  import type { ModalProps } from './types.js';
2
- declare const Modal: import("svelte").Component<ModalProps, {}, "showModal">;
2
+ declare const Modal: import("svelte").Component<ModalProps, {}, "show">;
3
3
  type Modal = ReturnType<typeof Modal>;
4
4
  export default Modal;
@@ -1,6 +1,6 @@
1
1
  import type { Snippet } from 'svelte';
2
2
  export interface ModalProps extends ModalHeaderProps, ModalFooterProps {
3
- showModal?: boolean;
3
+ show?: boolean;
4
4
  width?: WidthModal;
5
5
  children?: Snippet;
6
6
  onclose?: VoidFunction;
@@ -48,7 +48,7 @@
48
48
 
49
49
  {#if show}
50
50
  {#if asModal}
51
- <Modal bind:showModal={show} width="xs" hideHeader>
51
+ <Modal bind:show width="xs" hideHeader>
52
52
  <div class="modal-processing-content">
53
53
  {@render processingContent()}
54
54
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softwareone/spi-sv5-library",
3
- "version": "1.14.2",
3
+ "version": "1.14.3",
4
4
  "description": "Svelte components",
5
5
  "keywords": [
6
6
  "svelte",