@kud/ink-ui 0.11.0 → 0.12.0

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/dist/index.d.ts CHANGED
@@ -223,8 +223,10 @@ declare const ToggleSwitch: ({ on, label, onColor, offColor, }: ToggleSwitchProp
223
223
  type ProgressBarProps = {
224
224
  value: number;
225
225
  width?: number;
226
+ color?: string;
227
+ trackColor?: string;
226
228
  };
227
- declare const ProgressBar: ({ value, width }: ProgressBarProps) => React.JSX.Element;
229
+ declare const ProgressBar: ({ value, width, color, trackColor, }: ProgressBarProps) => React.JSX.Element;
228
230
 
229
231
  type StatusVariant = "success" | "error" | "warning" | "info";
230
232
 
package/dist/index.js CHANGED
@@ -601,12 +601,17 @@ var ToggleSwitch = ({
601
601
  label !== void 0 && /* @__PURE__ */ jsx(Text, { color: on ? onColor : void 0, dimColor: !on, children: label })
602
602
  ] });
603
603
  };
604
- var ProgressBar = ({ value, width = 20 }) => {
604
+ var ProgressBar = ({
605
+ value,
606
+ width = 20,
607
+ color = colors.accent,
608
+ trackColor = "#2b323d"
609
+ }) => {
605
610
  const clamped = Math.max(0, Math.min(100, value));
606
611
  const filled = Math.round(clamped / 100 * width);
607
612
  return /* @__PURE__ */ jsxs(Text, { children: [
608
- /* @__PURE__ */ jsx(Text, { color: colors.accent, children: "\u2588".repeat(filled) }),
609
- /* @__PURE__ */ jsx(Text, { dimColor: true, children: "\u2591".repeat(width - filled) })
613
+ /* @__PURE__ */ jsx(Text, { color, children: "\u2588".repeat(filled) }),
614
+ /* @__PURE__ */ jsx(Text, { color: trackColor, children: "\u2588".repeat(width - filled) })
610
615
  ] });
611
616
  };
612
617
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kud/ink-ui",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "React component library for Ink CLIs",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",