@gaulatti/bleecker 0.1.33 → 0.1.35

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.
@@ -2,5 +2,5 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { CartesianGrid, Legend, ResponsiveContainer, Scatter as RechartsScatter, ScatterChart as RechartsScatterChart, Tooltip, XAxis, YAxis, ZAxis } from 'recharts';
3
3
  import { chartTheme } from './chart-theme.js';
4
4
  export function ScatterChart({ data, height = 350, series, showGrid = true, showLegend = true, xAxisLabel, yAxisLabel, xAxisTickFormatter, yAxisTickFormatter, tooltipFormatter }) {
5
- return (_jsx("div", { className: 'w-full', style: { height }, children: _jsx(ResponsiveContainer, { width: '100%', height: '100%', children: _jsxs(RechartsScatterChart, { margin: { top: 10, right: 20, bottom: xAxisLabel ? 25 : 5, left: yAxisLabel ? 20 : 0 }, children: [showGrid && _jsx(CartesianGrid, { stroke: chartTheme.grid.stroke, strokeDasharray: chartTheme.grid.strokeDasharray }), _jsx(XAxis, { type: 'number', dataKey: (entry) => entry[series[0].xKey], stroke: chartTheme.axis.stroke, tick: chartTheme.axis.tick, tickLine: false, axisLine: false, tickFormatter: xAxisTickFormatter, label: xAxisLabel ? { value: xAxisLabel, position: 'insideBottom', offset: -15, fill: 'var(--color-text-secondary)', fontSize: 12 } : undefined }), _jsx(YAxis, { type: 'number', dataKey: (entry) => entry[series[0].yKey], stroke: chartTheme.axis.stroke, tick: chartTheme.axis.tick, tickLine: false, axisLine: false, tickFormatter: yAxisTickFormatter, label: yAxisLabel ? { value: yAxisLabel, angle: -90, position: 'insideLeft', fill: 'var(--color-text-secondary)', fontSize: 12 } : undefined }), _jsx(ZAxis, { type: 'number', dataKey: (entry) => (series[0].zKey ? entry[series[0].zKey] : 1), range: [60, 400] }), _jsx(Tooltip, { ...chartTheme.tooltip, cursor: { strokeDasharray: '3 3' }, formatter: (value, name) => [tooltipFormatter && typeof value === 'number' ? tooltipFormatter(value) : value, name] }), showLegend && _jsx(Legend, { wrapperStyle: { paddingTop: '1rem' } }), series.map((s, i) => (_jsx(RechartsScatter, { name: s.name, data: s.data ?? data, fill: s.color ?? chartTheme.palette[i % chartTheme.palette.length] }, s.key)))] }) }) }));
5
+ return (_jsx("div", { className: 'w-full', style: { height }, children: _jsx(ResponsiveContainer, { width: '100%', height: '100%', children: _jsxs(RechartsScatterChart, { margin: { top: 10, right: 20, bottom: xAxisLabel ? 25 : 5, left: yAxisLabel ? 20 : 0 }, children: [showGrid && _jsx(CartesianGrid, { stroke: chartTheme.grid.stroke, strokeDasharray: chartTheme.grid.strokeDasharray }), _jsx(XAxis, { type: 'number', dataKey: series[0].xKey, stroke: chartTheme.axis.stroke, tick: chartTheme.axis.tick, tickLine: false, axisLine: false, tickFormatter: xAxisTickFormatter, label: xAxisLabel ? { value: xAxisLabel, position: 'insideBottom', offset: -15, fill: 'var(--color-text-secondary)', fontSize: 12 } : undefined }), _jsx(YAxis, { type: 'number', dataKey: series[0].yKey, stroke: chartTheme.axis.stroke, tick: chartTheme.axis.tick, tickLine: false, axisLine: false, tickFormatter: yAxisTickFormatter, label: yAxisLabel ? { value: yAxisLabel, angle: -90, position: 'insideLeft', fill: 'var(--color-text-secondary)', fontSize: 12 } : undefined }), _jsx(ZAxis, { type: 'number', dataKey: series[0].zKey, range: [60, 400] }), _jsx(Tooltip, { ...chartTheme.tooltip, cursor: { strokeDasharray: '3 3' }, formatter: (value, name) => [tooltipFormatter && typeof value === 'number' ? tooltipFormatter(value) : value, name] }), showLegend && _jsx(Legend, { wrapperStyle: { paddingTop: '1rem' } }), series.map((s, i) => (_jsx(RechartsScatter, { name: s.name, data: s.data ?? data, fill: s.color ?? chartTheme.palette[i % chartTheme.palette.length] }, s.key)))] }) }) }));
6
6
  }
@@ -3,10 +3,9 @@ import React from 'react';
3
3
  import { renderDefaultLink } from './nav-menu.js';
4
4
  import { cn } from '../utils/cn.js';
5
5
  export function Tabs({ activeTab, className, onChange, renderLink, tabs }) {
6
- const tabCount = tabs.length;
7
6
  return (_jsx("nav", { className: cn('-mb-px flex', className), "aria-label": 'Tabs', children: tabs.map((tab) => {
8
7
  const isActive = tab.id === activeTab;
9
- const tabClassName = cn('border-b-2 px-1 py-4 text-center text-sm font-medium transition-colors duration-400', tabCount > 0 && `w-1/${Math.min(tabCount, 6)}`, isActive
8
+ const tabClassName = cn('flex-1 border-b-2 px-1 py-4 text-center text-sm font-medium transition-colors duration-400', isActive
10
9
  ? 'border-sea text-sea dark:border-accent-blue dark:text-accent-blue'
11
10
  : 'border-transparent text-text-secondary hover:border-gray-300 hover:text-text-primary dark:text-text-secondary dark:hover:text-text-primary');
12
11
  if (tab.href) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gaulatti/bleecker",
3
- "version": "0.1.33",
3
+ "version": "0.1.35",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/gaulatti/bleecker"