@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 +3 -1
- package/dist/index.js +8 -3
- package/package.json +1 -1
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 = ({
|
|
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
|
|
609
|
-
/* @__PURE__ */ jsx(Text, {
|
|
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
|
|