@konstructio/ui 0.1.0-alpha.27 → 0.1.0-alpha.28

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.
@@ -1,30 +1,62 @@
1
- import { jsxs as i, jsx as a } from "react/jsx-runtime";
2
- import { cn as o } from "../../utils/index.js";
3
- import { progressBarProgress as l, progressBarVariants as d } from "./ProgressBar.variants.js";
4
- const f = ({
1
+ import { jsxs as i, jsx as e } from "react/jsx-runtime";
2
+ import { cn as s } from "../../utils/index.js";
3
+ import { progressBarProgress as f, progressBarVariants as N } from "./ProgressBar.variants.js";
4
+ const j = ({
5
+ backgroundBarClassName: t,
5
6
  label: r,
6
- theme: e,
7
- percent: s,
8
- status: t
9
- }) => /* @__PURE__ */ i("div", { className: "w-full", "data-theme": e, children: [
10
- /* @__PURE__ */ i("div", { className: o("flex", r ? "justify-between" : "justify-end"), children: [
11
- r ? /* @__PURE__ */ a("label", { className: "font-semibold", children: r }) : null,
12
- /* @__PURE__ */ i("span", { className: "font-semibold", children: [
13
- s,
14
- "%"
15
- ] })
16
- ] }),
17
- /* @__PURE__ */ a("div", { className: o(d()), children: /* @__PURE__ */ a(
18
- "div",
19
- {
20
- className: o(
21
- l({ status: t }),
22
- s > 0 && s < 99 ? "transition-width duration-500" : "transition-colors duration-0"
7
+ labelClassName: o,
8
+ labelWrapperClassName: l,
9
+ percent: a,
10
+ percentClassName: n,
11
+ progressBarClassName: d,
12
+ status: m,
13
+ theme: c,
14
+ wrapperClassName: h
15
+ }) => /* @__PURE__ */ i(
16
+ "div",
17
+ {
18
+ className: s("w-full text-inherit", h),
19
+ "data-theme": c,
20
+ children: [
21
+ /* @__PURE__ */ i(
22
+ "div",
23
+ {
24
+ className: s(
25
+ "flex font-semibold",
26
+ {
27
+ "justify-between": r,
28
+ "justify-end": !r
29
+ },
30
+ l
31
+ ),
32
+ children: [
33
+ r ? /* @__PURE__ */ e("label", { className: s(o), children: r }) : null,
34
+ /* @__PURE__ */ i("span", { className: s(n), children: [
35
+ a,
36
+ "%"
37
+ ] })
38
+ ]
39
+ }
23
40
  ),
24
- style: { width: `${s}%` }
25
- }
26
- ) })
27
- ] });
41
+ /* @__PURE__ */ e(
42
+ "div",
43
+ {
44
+ className: s(N({ className: t })),
45
+ children: /* @__PURE__ */ e(
46
+ "div",
47
+ {
48
+ className: s(
49
+ f({ status: m, className: d }),
50
+ a > 0 && a < 99 ? "transition-width duration-500" : "transition-colors duration-0"
51
+ ),
52
+ style: { width: `${a}%` }
53
+ }
54
+ )
55
+ }
56
+ )
57
+ ]
58
+ }
59
+ );
28
60
  export {
29
- f as ProgressBar
61
+ j as ProgressBar
30
62
  };
package/dist/index.d.ts CHANGED
@@ -433,11 +433,17 @@ export declare const PieChart: FC<Props_2>;
433
433
  export declare const ProgressBar: FC<ProgressBarProps>;
434
434
 
435
435
  declare interface ProgressBarProps extends VariantProps<typeof progressBarVariants> {
436
+ backgroundBarClassName?: string;
436
437
  className?: string;
437
438
  label?: string;
439
+ labelClassName?: string;
440
+ labelWrapperClassName?: string;
438
441
  percent: number;
439
- theme?: Theme;
442
+ percentClassName?: string;
443
+ progressBarClassName?: string;
440
444
  status?: 'success' | 'progress';
445
+ theme?: Theme;
446
+ wrapperClassName?: string;
441
447
  }
442
448
 
443
449
  declare const progressBarVariants: (props?: ClassProp | undefined) => string;
package/dist/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@konstructio/ui",
3
3
  "description": "A set of reusable and customizable React components built for konstruct.io",
4
4
  "private": false,
5
- "version": "0.1.0-alpha.26",
5
+ "version": "0.1.0-alpha.27",
6
6
  "type": "module",
7
7
  "license": "MIT",
8
8
  "main": "dist/index.js",
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@konstructio/ui",
3
3
  "description": "A set of reusable and customizable React components built for konstruct.io",
4
4
  "private": false,
5
- "version": "0.1.0-alpha.27",
5
+ "version": "0.1.0-alpha.28",
6
6
  "type": "module",
7
7
  "license": "MIT",
8
8
  "main": "dist/index.js",