lawgic-dev-kit 0.11.6 → 0.11.7

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,4 +1,4 @@
1
- var p = { exports: {} };
1
+ var e = { exports: {} };
2
2
  export {
3
- p as __module
3
+ e as __module
4
4
  };
@@ -1,4 +1,4 @@
1
- var e = { exports: {} };
1
+ var p = { exports: {} };
2
2
  export {
3
- e as __module
3
+ p as __module
4
4
  };
@@ -1,3 +1,3 @@
1
1
  import { ProgressBarProps } from './ProgressBar.types';
2
- declare const ProgressBar: ({ progress, showPercentage, }: ProgressBarProps) => import("react/jsx-runtime").JSX.Element;
2
+ declare const ProgressBar: ({ progress, showPercentage, color, }: ProgressBarProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default ProgressBar;
@@ -1,23 +1,26 @@
1
1
  import { j as e } from "../../../_virtual/jsx-runtime.js";
2
- const r = ({
3
- progress: a,
4
- showPercentage: l = !1
2
+ import { resolveProgressBarColors as m } from "./ProgressBar.styles.js";
3
+ import { useTheme as d } from "../../../hooks/useTheme.js";
4
+ const x = ({
5
+ progress: r,
6
+ showPercentage: o = !1,
7
+ color: l
5
8
  }) => {
6
- const s = Math.min(Math.max(a, 0), 100);
9
+ const { defaultColorScheme: t } = d(), a = l || t, { bgColor: n, fillColor: i } = m(a), s = Math.min(Math.max(r, 0), 100);
7
10
  return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-12", children: [
8
- /* @__PURE__ */ e.jsx("div", { className: "w-full h-8 bg-blue-100 rounded-full", children: /* @__PURE__ */ e.jsx(
11
+ /* @__PURE__ */ e.jsx("div", { className: `w-full h-8 ${n} rounded-full`, children: /* @__PURE__ */ e.jsx(
9
12
  "div",
10
13
  {
11
- className: "h-full bg-blue-500 rounded-full transition-all duration-300 ease-in-out",
14
+ className: `h-full ${i} rounded-full transition-all duration-300 ease-in-out`,
12
15
  style: { width: `${s}%` }
13
16
  }
14
17
  ) }),
15
- l && /* @__PURE__ */ e.jsxs("span", { className: "text-sm text-gray-400 font-500", children: [
18
+ o && /* @__PURE__ */ e.jsxs("span", { className: "text-sm text-gray-400 font-500", children: [
16
19
  s,
17
20
  "%"
18
21
  ] })
19
22
  ] });
20
23
  };
21
24
  export {
22
- r as default
25
+ x as default
23
26
  };
@@ -0,0 +1,7 @@
1
+ import { Color } from '../../../types/styleValues';
2
+ interface ProgressBarColorConfig {
3
+ bgColor: string;
4
+ fillColor: string;
5
+ }
6
+ export declare const resolveProgressBarColors: (color: Color) => ProgressBarColorConfig;
7
+ export {};
@@ -0,0 +1,18 @@
1
+ const l = {
2
+ bgColor: "bg-blue-100",
3
+ fillColor: "bg-blue-500"
4
+ }, r = {
5
+ bgColor: "bg-aqua-100",
6
+ fillColor: "bg-aqua-500"
7
+ }, e = (o) => {
8
+ switch (o) {
9
+ case "aqua":
10
+ return r;
11
+ case "blue":
12
+ default:
13
+ return l;
14
+ }
15
+ };
16
+ export {
17
+ e as resolveProgressBarColors
18
+ };
@@ -1,4 +1,6 @@
1
+ import { Color } from '../../../types/styleValues';
1
2
  export interface ProgressBarProps {
2
3
  progress: number;
3
4
  showPercentage?: boolean;
5
+ color?: Color;
4
6
  }