@ims360/svelte-ivory 0.4.13 → 0.4.14

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.
@@ -32,14 +32,14 @@
32
32
  <script lang="ts">
33
33
  interface Props extends ModalProps {
34
34
  /** If you don't want the title and close button to be included you can overwrite the default modal */
35
- modal?: Snippet;
35
+ inner?: Snippet;
36
36
  }
37
37
 
38
38
  let {
39
39
  class: clazz = 'flex flex-col',
40
40
  title,
41
41
  children,
42
- modal,
42
+ inner,
43
43
  closeOnOutsideClick = true,
44
44
  variant,
45
45
  innerClass,
@@ -49,9 +49,7 @@
49
49
  let dialog = $state<Dialog>();
50
50
 
51
51
  export const close = () => dialog?.close();
52
-
53
52
  export const open = () => dialog?.open();
54
-
55
53
  export const isOpen = () => dialog?.isOpen();
56
54
 
57
55
  export const toggle = () => {
@@ -74,11 +72,11 @@
74
72
  onclose={() => {
75
73
  if (closeOnOutsideClick) close();
76
74
  }}
77
- class={merge('flex h-full w-full flex-col items-center justify-center p-8 lg:p-12 xl:p-16')}
75
+ class="flex h-full w-full flex-col items-center justify-center p-2 sm:p-4 md:p-8 lg:p-12 xl:p-16"
78
76
  >
79
- {#if modal}
80
- <div {...rest} {onclick} class="modal-content transition-all ease-in-out">
81
- {@render modal()}
77
+ {#if inner}
78
+ <div {...rest} {onclick} class={merge('modal-content transition-all ease-in-out', clazz)}>
79
+ {@render inner()}
82
80
  </div>
83
81
  {:else}
84
82
  <div
@@ -22,7 +22,7 @@ export type ModalProps = {
22
22
  };
23
23
  interface Props extends ModalProps {
24
24
  /** If you don't want the title and close button to be included you can overwrite the default modal */
25
- modal?: Snippet;
25
+ inner?: Snippet;
26
26
  }
27
27
  /** A modal, comes with a title, close button and different variants per default. */
28
28
  declare const Modal: import("svelte").Component<Props, {
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/layout/modal/Modal.svelte.ts"],"names":[],"mapp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IAC7C,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;SAIK;IACL,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,0DAA0D;IAC1D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACzB,OAAO,CAAC,EAAE,iBAAiB,CAAC,cAAc,CAAC,CAAC;CAC/C,CAAC;AAEF,UAAU,KAAM,SAAQ,UAAU;IAC9B,sGAAsG;IACtG,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB;AAuFL,oFAAoF;AACpF,QAAA,MAAM,KAAK;;;;;MAAwC,CAAC;AACpD,KAAK,KAAK,GAAG,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC;AACtC,eAAe,KAAK,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ims360/svelte-ivory",
3
- "version": "0.4.13",
3
+ "version": "0.4.14",
4
4
  "keywords": [
5
5
  "svelte"
6
6
  ],
@@ -32,14 +32,14 @@
32
32
  <script lang="ts">
33
33
  interface Props extends ModalProps {
34
34
  /** If you don't want the title and close button to be included you can overwrite the default modal */
35
- modal?: Snippet;
35
+ inner?: Snippet;
36
36
  }
37
37
 
38
38
  let {
39
39
  class: clazz = 'flex flex-col',
40
40
  title,
41
41
  children,
42
- modal,
42
+ inner,
43
43
  closeOnOutsideClick = true,
44
44
  variant,
45
45
  innerClass,
@@ -49,9 +49,7 @@
49
49
  let dialog = $state<Dialog>();
50
50
 
51
51
  export const close = () => dialog?.close();
52
-
53
52
  export const open = () => dialog?.open();
54
-
55
53
  export const isOpen = () => dialog?.isOpen();
56
54
 
57
55
  export const toggle = () => {
@@ -74,11 +72,11 @@
74
72
  onclose={() => {
75
73
  if (closeOnOutsideClick) close();
76
74
  }}
77
- class={merge('flex h-full w-full flex-col items-center justify-center p-8 lg:p-12 xl:p-16')}
75
+ class="flex h-full w-full flex-col items-center justify-center p-2 sm:p-4 md:p-8 lg:p-12 xl:p-16"
78
76
  >
79
- {#if modal}
80
- <div {...rest} {onclick} class="modal-content transition-all ease-in-out">
81
- {@render modal()}
77
+ {#if inner}
78
+ <div {...rest} {onclick} class={merge('modal-content transition-all ease-in-out', clazz)}>
79
+ {@render inner()}
82
80
  </div>
83
81
  {:else}
84
82
  <div