@ims360/svelte-ivory 0.4.17 → 0.4.19

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.
@@ -31,7 +31,7 @@
31
31
  <Checkbox {checked} />
32
32
  {label}
33
33
  </button>
34
- <input class="hidden" {...form.as('checkbox')} {checked} />
34
+ <input class="hidden" {...form.as('checkbox')} />
35
35
  {#if description}
36
36
  <p class="text-surface-700-300">{description}</p>
37
37
  {/if}
@@ -9,7 +9,7 @@
9
9
  </script>
10
10
 
11
11
  <div class={['flex flex-col gap-2', clazz]} {...props}>
12
- <input {...form.as('checkbox')} class="hidden" {value} />
12
+ <input {...form.as('checkbox')} class="hidden" />
13
13
  <button
14
14
  type="button"
15
15
  class="flex flex-row items-center gap-2"
@@ -10,7 +10,7 @@
10
10
  export type DrawerProps = {
11
11
  class?: string;
12
12
  title?: string | Snippet;
13
- children: Snippet;
13
+ children?: Snippet;
14
14
  placement?: DrawerPlacement;
15
15
  closeOnOutsideClick?: boolean;
16
16
  /** Overwrites entire content of the drawer */
@@ -76,7 +76,7 @@
76
76
  <X class="h-full w-auto transition-[stroke-width] group-hover:stroke-3" />
77
77
  </button>
78
78
  </div>
79
- {@render children()}
79
+ {@render children?.()}
80
80
  {/if}
81
81
  </div>
82
82
  </Dialog>
@@ -3,7 +3,7 @@ export type DrawerPlacement = 'left' | 'right';
3
3
  export type DrawerProps = {
4
4
  class?: string;
5
5
  title?: string | Snippet;
6
- children: Snippet;
6
+ children?: Snippet;
7
7
  placement?: DrawerPlacement;
8
8
  closeOnOutsideClick?: boolean;
9
9
  /** Overwrites entire content of the drawer */
@@ -1 +1 @@
1
- {"version":3,"file":"Drawer.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/layout/drawer/Drawer.svelte.ts"],"names":[],"mappings":"AAKI,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAItC,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,OAAO,CAAC;AAE/C,MAAM,MAAM,WAAW,GAAG;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,8CAA8C;IAC9C,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AA8DN,QAAA,MAAM,MAAM;;;;;MAAwC,CAAC;AACrD,KAAK,MAAM,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC;AACxC,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"Drawer.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/layout/drawer/Drawer.svelte.ts"],"names":[],"mappings":"AAKI,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAItC,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,OAAO,CAAC;AAE/C,MAAM,MAAM,WAAW,GAAG;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,8CAA8C;IAC9C,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AA8DN,QAAA,MAAM,MAAM;;;;;MAAwC,CAAC;AACrD,KAAK,MAAM,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC;AACxC,eAAe,MAAM,CAAC"}
@@ -44,7 +44,9 @@
44
44
  let popover = $state<Popover>();
45
45
 
46
46
  let currentTimeout: number;
47
- function onmouseenter() {
47
+ function onpointerenter(e: PointerEvent) {
48
+ if (e.pointerType === 'touch') return;
49
+
48
50
  clearTimeout(currentTimeout);
49
51
  if (timeout === 0) {
50
52
  popover?.open();
@@ -55,7 +57,9 @@
55
57
  }
56
58
  }
57
59
 
58
- function onmouseleave() {
60
+ function onpointerleave(e: PointerEvent) {
61
+ if (e.pointerType === 'touch') return;
62
+
59
63
  clearTimeout(currentTimeout);
60
64
  popover?.close();
61
65
  }
@@ -71,8 +75,8 @@
71
75
  {...rest}
72
76
  {href}
73
77
  bind:this={target}
74
- {onmouseenter}
75
- {onmouseleave}
78
+ {onpointerenter}
79
+ {onpointerleave}
76
80
  >
77
81
  {@render children?.()}
78
82
  </svelte:element>
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/layout/tooltip/Tooltip.svelte.ts"],"names":[],"mappings":"AAGI,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAgB,EAAE,KAAK,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE3E,MAAM,WAAW,YAAY;IACzB,OAAO,CAAC,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAC;IACzC,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iCAAiC;IACjC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;IAC1B,sCAAsC;IACtC,YAAY,CAAC,EAAE,UAAU,CAAC;IAC1B,2EAA2E;IAC3E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,SAAS,CAAC,EAAE,gBAAgB,CAAC;CAChC;AAmDL,kEAAkE;AAClE,QAAA,MAAM,OAAO,kDAAwC,CAAC;AACtD,KAAK,OAAO,GAAG,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC;AAC1C,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"Tooltip.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/layout/tooltip/Tooltip.svelte.ts"],"names":[],"mappings":"AAGI,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAgB,EAAE,KAAK,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE3E,MAAM,WAAW,YAAY;IACzB,OAAO,CAAC,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAC;IACzC,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iCAAiC;IACjC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;IAC1B,sCAAsC;IACtC,YAAY,CAAC,EAAE,UAAU,CAAC;IAC1B,2EAA2E;IAC3E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,SAAS,CAAC,EAAE,gBAAgB,CAAC;CAChC;AAuDL,kEAAkE;AAClE,QAAA,MAAM,OAAO,kDAAwC,CAAC;AACtD,KAAK,OAAO,GAAG,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC;AAC1C,eAAe,OAAO,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ims360/svelte-ivory",
3
- "version": "0.4.17",
3
+ "version": "0.4.19",
4
4
  "keywords": [
5
5
  "svelte"
6
6
  ],
@@ -31,7 +31,7 @@
31
31
  <Checkbox {checked} />
32
32
  {label}
33
33
  </button>
34
- <input class="hidden" {...form.as('checkbox')} {checked} />
34
+ <input class="hidden" {...form.as('checkbox')} />
35
35
  {#if description}
36
36
  <p class="text-surface-700-300">{description}</p>
37
37
  {/if}
@@ -9,7 +9,7 @@
9
9
  </script>
10
10
 
11
11
  <div class={['flex flex-col gap-2', clazz]} {...props}>
12
- <input {...form.as('checkbox')} class="hidden" {value} />
12
+ <input {...form.as('checkbox')} class="hidden" />
13
13
  <button
14
14
  type="button"
15
15
  class="flex flex-row items-center gap-2"
@@ -10,7 +10,7 @@
10
10
  export type DrawerProps = {
11
11
  class?: string;
12
12
  title?: string | Snippet;
13
- children: Snippet;
13
+ children?: Snippet;
14
14
  placement?: DrawerPlacement;
15
15
  closeOnOutsideClick?: boolean;
16
16
  /** Overwrites entire content of the drawer */
@@ -76,7 +76,7 @@
76
76
  <X class="h-full w-auto transition-[stroke-width] group-hover:stroke-3" />
77
77
  </button>
78
78
  </div>
79
- {@render children()}
79
+ {@render children?.()}
80
80
  {/if}
81
81
  </div>
82
82
  </Dialog>
@@ -44,7 +44,9 @@
44
44
  let popover = $state<Popover>();
45
45
 
46
46
  let currentTimeout: number;
47
- function onmouseenter() {
47
+ function onpointerenter(e: PointerEvent) {
48
+ if (e.pointerType === 'touch') return;
49
+
48
50
  clearTimeout(currentTimeout);
49
51
  if (timeout === 0) {
50
52
  popover?.open();
@@ -55,7 +57,9 @@
55
57
  }
56
58
  }
57
59
 
58
- function onmouseleave() {
60
+ function onpointerleave(e: PointerEvent) {
61
+ if (e.pointerType === 'touch') return;
62
+
59
63
  clearTimeout(currentTimeout);
60
64
  popover?.close();
61
65
  }
@@ -71,8 +75,8 @@
71
75
  {...rest}
72
76
  {href}
73
77
  bind:this={target}
74
- {onmouseenter}
75
- {onmouseleave}
78
+ {onpointerenter}
79
+ {onpointerleave}
76
80
  >
77
81
  {@render children?.()}
78
82
  </svelte:element>