@onsvisual/svelte-components 0.1.19 → 0.1.21

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.
@@ -70,8 +70,8 @@
70
70
  export let gap = 12;
71
71
 
72
72
  let gridClass = !colwidth || colwidth === "full" ? "" : `grid-${colwidth}`;
73
- let rowHeight = height === "full" ? "100vh" : !Number.isNaN(height) ? height + "px" : height;
74
- let gridGap = !Number.isNaN(gap) ? gap + "px" : gap;
73
+ let rowHeight = height === "full" ? "100vh" : typeof height === "number" ? height + "px" : height;
74
+ let gridGap = typeof gap === "number" ? gap + "px" : gap;
75
75
 
76
76
  const defs = {
77
77
  narrow: { w: 180, c: 4 },
@@ -95,7 +95,7 @@
95
95
  setContext("cols", cols);
96
96
  </script>
97
97
 
98
- <figure aria-label="{caption}" bind:clientWidth="{w}">
98
+ <figure aria-label="{caption}">
99
99
  <Container
100
100
  id="{id}"
101
101
  cls="{cls}"
@@ -109,7 +109,12 @@
109
109
  {#if title}
110
110
  <h2 class="section-title" class:ons-u-vh="{hideTitle}">{title}</h2>
111
111
  {/if}
112
- <div class="grid {gridClass}" style:grid-gap="{gridGap}" style:min-height="{rowHeight}">
112
+ <div
113
+ class="grid {gridClass}"
114
+ style:grid-gap="{gridGap}"
115
+ style:min-height="{rowHeight}"
116
+ bind:clientWidth="{w}"
117
+ >
113
118
  <slot />
114
119
  </div>
115
120
  </Container>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onsvisual/svelte-components",
3
- "version": "0.1.19",
3
+ "version": "0.1.21",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "homepage": "https://onsvisual.github.io/svelte-components",