@siyahi/ui 0.1.9-next.15 → 0.1.9-next.17

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.
package/README.md CHANGED
@@ -61,7 +61,7 @@ own code imports icons. A Next.js app compiles the same stylesheet through
61
61
 
62
62
  ### Also on GitHub releases
63
63
 
64
- Every merge to `main` also attaches both tarballs to a GitHub release
64
+ Each explicit release from `main` also attaches both tarballs to a GitHub release
65
65
  (`v<version>`, plus a rolling `next`). They are a fallback if npm is unreachable:
66
66
  `npm install --allow-remote=root https://github.com/jatinbansal1998/siyahi/releases/download/v<version>/siyahi-ui-<version>.tgz`.
67
67
 
@@ -19,7 +19,7 @@ function PanelGrid({ columns = 2, children, className }) {
19
19
  const ruled = surface === "ruled";
20
20
  return /* @__PURE__ */ jsx("div", {
21
21
  "data-slot": "panel-grid",
22
- className: cn("@container/panels", ruled && "overflow-hidden border-y", className),
22
+ className: cn("@container/panels", ruled && "overflow-clip border-y", className),
23
23
  children: /* @__PURE__ */ jsx("div", {
24
24
  className: cn("grid grid-cols-1", COLUMNS[columns], ruled ? "-mt-px -ml-px" : surface === "open" ? "gap-x-8 gap-y-6" : "gap-4"),
25
25
  children: Children.map(children, (child) => /* @__PURE__ */ jsx("div", {
@@ -124,7 +124,7 @@ function ChartFrame({ chart: Chart, children, horizontal = false, stackOffset, o
124
124
  throttledEvents: onClick ? [] : void 0,
125
125
  margin: {
126
126
  left: 0,
127
- right: xTicks ? endRoom(xFormatter, xTicks) : 8
127
+ right: !horizontal && xTicks ? endRoom(xFormatter, xTicks) : 8
128
128
  },
129
129
  children: [
130
130
  /* @__PURE__ */ jsx(CartesianGrid, {
@@ -145,7 +145,8 @@ function ChartFrame({ chart: Chart, children, horizontal = false, stackOffset, o
145
145
  axisLine: false,
146
146
  tickMargin: 8,
147
147
  tickFormatter: (value) => xFormatter(value),
148
- tick: xTickDetail ? fittedTick(data, xKey, xFormatter, xTickDetail, horizontal) : TICK,
148
+ tick: xTickDetail || xTicks ? fittedTick(data, xKey, xFormatter, xTickDetail, horizontal) : TICK,
149
+ ticks: xTicks,
149
150
  interval: 0
150
151
  })] }) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(XAxis, {
151
152
  dataKey: xKey,
@@ -49,6 +49,8 @@ export interface SeriesChartProps<T extends object, K extends keyof T> {
49
49
  /** The field the x axis reads: a month, an hour of day, a price bucket. One row per value; a repeated value is hidden behind the first. */
50
50
  xKey: K;
51
51
  series: ChartSeries<NoInfer<T>>;
52
+ /** Categories to label, or tick positions with xDomain. Every named tick is drawn; other rows keep their marks and tooltips. */
53
+ xTicks?: readonly T[K][];
52
54
  /** The x axis ticks, and the tooltip's heading unless xTooltipFormatter is set. Defaults to the value as text. */
53
55
  xFormatter?: (value: T[K]) => string;
54
56
  /** The tooltip's heading, when it should say more than a tick: "19:34:13 IST, 10 s average" against "19:34". */
@@ -83,8 +85,6 @@ export interface SeriesChartProps<T extends object, K extends keyof T> {
83
85
  export interface NumericXProps {
84
86
  /** The x axis runs over this range of the xKey field, which must hold numbers; without it the axis is one slot per row. */
85
87
  xDomain?: [number, number];
86
- /** Where the x axis puts its ticks, in the xKey field's units; give xDomain with it, so the axis is numeric. */
87
- xTicks?: readonly number[];
88
88
  }
89
89
  /**
90
90
  * How a line or an area's edge joins its points: "linear" draws straight segments, as measured samples should
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@siyahi/ui",
3
- "version": "0.1.9-next.15",
3
+ "version": "0.1.9-next.17",
4
4
  "description": "Stock shadcn/ui on Base UI and Tailwind v4, a finance theme, a few compositions and formatters.",
5
5
  "keywords": [
6
6
  "base-ui",