diff --git a/.changeset/brush-default-styles.md b/.changeset/brush-default-styles.md new file mode 100644 index 0000000000..b38af1ed80 --- /dev/null +++ b/.changeset/brush-default-styles.md @@ -0,0 +1,5 @@ +--- +'layerchart': patch +--- + +fix(Brush): Style the region and handle cursors with CSS instead of Tailwind classes \ No newline at end of file diff --git a/.changeset/remove-tailwind-merge.md b/.changeset/remove-tailwind-merge.md new file mode 100644 index 0000000000..c6d6b5b0bd --- /dev/null +++ b/.changeset/remove-tailwind-merge.md @@ -0,0 +1,5 @@ +--- +'layerchart': patch +--- + +chore: Replace `tailwind-merge` with `clsx` (~42 KB smaller) diff --git a/docs/src/examples/components/Rule/data-x-band.svelte b/docs/src/examples/components/Rule/data-x-band.svelte index 16115089dd..78ef177323 100644 --- a/docs/src/examples/components/Rule/data-x-band.svelte +++ b/docs/src/examples/components/Rule/data-x-band.svelte @@ -41,6 +41,6 @@ - + diff --git a/packages/layerchart/package.json b/packages/layerchart/package.json index 8a25da2650..e04d0759db 100644 --- a/packages/layerchart/package.json +++ b/packages/layerchart/package.json @@ -73,8 +73,8 @@ "@dagrejs/dagre": "^2.0.4", "@layerstack/svelte-actions": "1.0.1-next.20", "@layerstack/svelte-state": "0.1.0-next.25", - "@layerstack/tailwind": "2.0.0-next.21", "@layerstack/utils": "2.0.0-next.19", + "clsx": "^2.1.1", "d3-array": "^3.2.4", "d3-chord": "^3.0.1", "d3-color": "^3.1.0", diff --git a/packages/layerchart/src/lib/components/AnnotationLine/AnnotationLine.base.svelte b/packages/layerchart/src/lib/components/AnnotationLine/AnnotationLine.base.svelte index bc75e18d0f..e98557f8a8 100644 --- a/packages/layerchart/src/lib/components/AnnotationLine/AnnotationLine.base.svelte +++ b/packages/layerchart/src/lib/components/AnnotationLine/AnnotationLine.base.svelte @@ -12,7 +12,7 @@ diff --git a/packages/layerchart/src/lib/components/AnnotationPoint/AnnotationPoint.base.svelte b/packages/layerchart/src/lib/components/AnnotationPoint/AnnotationPoint.base.svelte index 766def0106..14c476a719 100644 --- a/packages/layerchart/src/lib/components/AnnotationPoint/AnnotationPoint.base.svelte +++ b/packages/layerchart/src/lib/components/AnnotationPoint/AnnotationPoint.base.svelte @@ -22,7 +22,7 @@ import { isScaleBand } from '$lib/utils/scales.svelte.js'; import { getPointLabelLayout } from '$lib/utils/labelPlacement.js'; import { getPixelValue } from '../Text/Text.shared.svelte.js'; - import { cls } from '@layerstack/tailwind'; + import { clsx } from 'clsx'; import type { CircleProps } from '../Circle/Circle.shared.svelte.js'; import type { TextProps } from '../Text/Text.shared.svelte.js'; @@ -154,14 +154,14 @@ onmouseleave: onPointerLeave, ontouchend: onPointerLeave, ...props?.circle, - class: cls('lc-annotation-point', link && 'lc-annotation-point-ring', props?.circle?.class), + class: clsx('lc-annotation-point', link && 'lc-annotation-point-ring', props?.circle?.class), } as CircleProps); const resolvedLabelProps = $derived({ ...labelProps, z: height, ...props?.label, - class: cls('lc-annotation-point-label', props?.label?.class), + class: clsx('lc-annotation-point-label', props?.label?.class), } as TextProps); @@ -181,7 +181,7 @@ z2={height} type="straight" {...linkProps} - class={cls( + class={clsx( 'lc-annotation-point-link', typeof linkProps.class === 'string' ? linkProps.class : undefined )} diff --git a/packages/layerchart/src/lib/components/AnnotationRange/AnnotationRange.base.svelte b/packages/layerchart/src/lib/components/AnnotationRange/AnnotationRange.base.svelte index 4b6214ee2d..d6024135f5 100644 --- a/packages/layerchart/src/lib/components/AnnotationRange/AnnotationRange.base.svelte +++ b/packages/layerchart/src/lib/components/AnnotationRange/AnnotationRange.base.svelte @@ -15,7 +15,7 @@ diff --git a/packages/layerchart/src/lib/components/Arc/Arc.base.svelte b/packages/layerchart/src/lib/components/Arc/Arc.base.svelte index adca12847a..d3f897d5d4 100644 --- a/packages/layerchart/src/lib/components/Arc/Arc.base.svelte +++ b/packages/layerchart/src/lib/components/Arc/Arc.base.svelte @@ -11,7 +11,7 @@
(styles = _styles)} >
diff --git a/packages/layerchart/src/lib/components/Contour/Contour.base.svelte b/packages/layerchart/src/lib/components/Contour/Contour.base.svelte index e58b6613e2..25ca054a4b 100644 --- a/packages/layerchart/src/lib/components/Contour/Contour.base.svelte +++ b/packages/layerchart/src/lib/components/Contour/Contour.base.svelte @@ -11,7 +11,7 @@ - + {#if x} {@const splineProps = extractLayerProps(x, 'lc-grid-x-line')} @@ -96,7 +96,7 @@ {stroke} motion={c.tweenConfig} {...splineProps} - class={cls('lc-grid-x-radial-line', classes.line, splineProps?.class)} + class={clsx('lc-grid-x-radial-line', classes.line, splineProps?.class)} /> {:else} {/if} {/each} @@ -118,7 +118,7 @@ {stroke} {motion} {...splineProps} - class={cls('lc-grid-x-end-rule', classes.line, splineProps?.class)} + class={clsx('lc-grid-x-end-rule', classes.line, splineProps?.class)} /> {/if} @@ -135,7 +135,7 @@ {stroke} {motion} {...splineProps} - class={cls('lc-grid-y-radial-circle', classes.line, splineProps?.class)} + class={clsx('lc-grid-y-radial-circle', classes.line, splineProps?.class)} /> {:else} {#await import('../Spline/Spline.svelte') then { default: Spline }} @@ -147,7 +147,7 @@ motion={c.tweenConfig} curve={curveLinearClosed} {...splineProps} - class={cls('lc-grid-y-radial-line', classes.line, splineProps?.class)} + class={clsx('lc-grid-y-radial-line', classes.line, splineProps?.class)} /> {/await} {/if} @@ -160,7 +160,7 @@ {stroke} {motion} {...splineProps} - class={cls('lc-grid-y-rule', classes.line, splineProps?.class)} + class={clsx('lc-grid-y-rule', classes.line, splineProps?.class)} /> {/if} {/each} @@ -175,7 +175,7 @@ {stroke} {motion} {...splineProps} - class={cls('lc-grid-y-radial-circle', classes.line, splineProps?.class)} + class={clsx('lc-grid-y-radial-circle', classes.line, splineProps?.class)} /> {:else} {@const yEnd = @@ -190,7 +190,7 @@ {stroke} {motion} {...splineProps} - class={cls('lc-grid-y-end-rule', classes.line, splineProps?.class)} + class={clsx('lc-grid-y-end-rule', classes.line, splineProps?.class)} /> {/if} {/if} diff --git a/packages/layerchart/src/lib/components/Grid/GridWalls.svelte b/packages/layerchart/src/lib/components/Grid/GridWalls.svelte index c34904a1d9..86275f27a5 100644 --- a/packages/layerchart/src/lib/components/Grid/GridWalls.svelte +++ b/packages/layerchart/src/lib/components/Grid/GridWalls.svelte @@ -5,7 +5,7 @@ --> - + {#if geo.projection} {@const polygon = geoVoronoi().hull(points)} - +