@kud/ink-ui 0.19.0 → 0.19.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.
Files changed (2) hide show
  1. package/dist/index.js +3 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -662,7 +662,8 @@ var Tabs = ({ active, items }) => {
662
662
  text: item.count !== void 0 ? `${item.label} (${item.count})` : item.label,
663
663
  isActive: item.value === active
664
664
  }));
665
- const widthOf = (cell) => [...cell.marker].length + [...cell.text].length;
665
+ const gutterOf = (cell) => [...cell.marker].length;
666
+ const labelOf = (cell) => [...cell.text].length;
666
667
  return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", children: [
667
668
  /* @__PURE__ */ jsx(Box, { gap: 2, children: cells.map((cell) => /* @__PURE__ */ jsxs(Box, { children: [
668
669
  cell.marker ? /* @__PURE__ */ jsx(Text, { color: cell.markerColor, children: cell.marker }) : null,
@@ -676,7 +677,7 @@ var Tabs = ({ active, items }) => {
676
677
  }
677
678
  )
678
679
  ] }, cell.key)) }),
679
- /* @__PURE__ */ jsx(Box, { gap: 2, children: cells.map((cell) => /* @__PURE__ */ jsx(Text, { color: colors.accent, children: (cell.isActive ? "\u2500" : " ").repeat(widthOf(cell)) }, cell.key)) })
680
+ /* @__PURE__ */ jsx(Box, { gap: 2, children: cells.map((cell) => /* @__PURE__ */ jsx(Text, { color: colors.accent, children: " ".repeat(gutterOf(cell)) + (cell.isActive ? "\u2500" : " ").repeat(labelOf(cell)) }, cell.key)) })
680
681
  ] });
681
682
  };
682
683
  var useTabs = (items, { initial, isActive = true } = {}) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kud/ink-ui",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "description": "React component library for Ink CLIs",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",