layerchart 0.13.0 → 0.13.1

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.
@@ -1,5 +1,6 @@
1
- <script>import { getContext } from 'svelte';
2
- import { min, max } from 'd3-array';
1
+ <script>import { min, max } from 'd3-array';
2
+ import { getContext } from 'svelte';
3
+ import { cls } from 'svelte-ux/utils/styles';
3
4
  import { isScaleBand } from '../utils/scales';
4
5
  const { xRange, yScale, yRange } = getContext('LayerCake');
5
6
  export let x = false;
@@ -13,17 +14,17 @@ export let y = false;
13
14
  x2={max($xRange) || 0}
14
15
  y1={isScaleBand($yScale) ? max($yRange) : $yScale(0) || 0}
15
16
  y2={isScaleBand($yScale) ? max($yRange) : $yScale(0) || 0}
16
- class="baseline"
17
+ class={cls('stroke-gray-400', $$props.class)}
17
18
  />
18
19
  {/if}
19
20
 
20
21
  {#if y}
21
- <line x1={0} x2={0} y1={min($yRange) || 0} y2={max($yRange) || 0} class="baseline" />
22
+ <line
23
+ x1={0}
24
+ x2={0}
25
+ y1={min($yRange) || 0}
26
+ y2={max($yRange) || 0}
27
+ class={cls('stroke-gray-400', $$props.class)}
28
+ />
22
29
  {/if}
23
30
  </g>
24
-
25
- <style>
26
- .baseline {
27
- stroke: #777;
28
- }
29
- </style>
@@ -1,6 +1,7 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
2
  declare const __propDef: {
3
3
  props: {
4
+ [x: string]: any;
4
5
  x?: boolean;
5
6
  y?: boolean;
6
7
  };
@@ -1,4 +1,4 @@
1
- <script>import clsx from 'clsx';
1
+ <script>import { cls } from 'svelte-ux/utils/styles';
2
2
  export let label;
3
3
  export let value = undefined; // Can be pass as slot
4
4
  export let valueAlign = 'left';
@@ -9,10 +9,14 @@ export let valueAlign = 'left';
9
9
  </div>
10
10
 
11
11
  <div
12
- class={clsx('text-sm tabular-nums', {
13
- 'text-right': valueAlign === 'right',
14
- 'text-center': valueAlign === 'center'
15
- })}
12
+ class={cls(
13
+ 'text-sm tabular-nums',
14
+ {
15
+ 'text-right': valueAlign === 'right',
16
+ 'text-center': valueAlign === 'center'
17
+ },
18
+ $$props.class
19
+ )}
16
20
  >
17
21
  <slot>{value}</slot>
18
22
  </div>
@@ -1,6 +1,7 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
2
  declare const __propDef: {
3
3
  props: {
4
+ [x: string]: any;
4
5
  label: any;
5
6
  value?: any;
6
7
  valueAlign?: 'left' | 'right' | 'center';
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "author": "Sean Lynch <techniq35@gmail.com>",
4
4
  "license": "MIT",
5
5
  "repository": "techniq/layerchart",
6
- "version": "0.13.0",
6
+ "version": "0.13.1",
7
7
  "devDependencies": {
8
8
  "@rollup/plugin-dsv": "^3.0.2",
9
9
  "@sveltejs/adapter-vercel": "^1.0.5",