@greatapps/common 1.1.205 → 1.1.207
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/components/ui/feedback/DefaultCircularProgress.mjs +30 -17
- package/dist/components/ui/feedback/DefaultCircularProgress.mjs.map +1 -1
- package/dist/components/ui/form/Input.mjs +1 -1
- package/dist/components/ui/form/Input.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/ui/feedback/DefaultCircularProgress.tsx +8 -0
- package/src/components/ui/form/Input.tsx +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import {
|
|
3
3
|
calculateRadius,
|
|
4
4
|
calculateCircumference,
|
|
@@ -25,22 +25,35 @@ function DefaultCircularProgress({
|
|
|
25
25
|
"aria-valuemin": 0,
|
|
26
26
|
"aria-valuemax": total,
|
|
27
27
|
"aria-label": "Progresso de exporta\xE7\xE3o",
|
|
28
|
-
children: /* @__PURE__ */
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
28
|
+
children: /* @__PURE__ */ jsxs("svg", { width: size, height: size, className: "absolute", children: [
|
|
29
|
+
/* @__PURE__ */ jsx(
|
|
30
|
+
"circle",
|
|
31
|
+
{
|
|
32
|
+
cx: size / 2,
|
|
33
|
+
cy: size / 2,
|
|
34
|
+
r: radius,
|
|
35
|
+
stroke: "var(--color-zinc-200)",
|
|
36
|
+
strokeWidth,
|
|
37
|
+
fill: "none"
|
|
38
|
+
}
|
|
39
|
+
),
|
|
40
|
+
/* @__PURE__ */ jsx(
|
|
41
|
+
"circle",
|
|
42
|
+
{
|
|
43
|
+
cx: size / 2,
|
|
44
|
+
cy: size / 2,
|
|
45
|
+
r: radius,
|
|
46
|
+
stroke: "var(--color-pages-300)",
|
|
47
|
+
strokeWidth,
|
|
48
|
+
fill: "none",
|
|
49
|
+
strokeDasharray: circumference,
|
|
50
|
+
strokeDashoffset: offset,
|
|
51
|
+
strokeLinecap: "round",
|
|
52
|
+
transform: `rotate(-90 ${size / 2} ${size / 2})`,
|
|
53
|
+
className: "transition-all duration-300 ease-in-out"
|
|
54
|
+
}
|
|
55
|
+
)
|
|
56
|
+
] })
|
|
44
57
|
}
|
|
45
58
|
);
|
|
46
59
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/ui/feedback/DefaultCircularProgress.tsx"],"sourcesContent":["import {\n calculateRadius,\n calculateCircumference,\n calculatePercentage,\n calculateCircularProgressOffset,\n} from \"../../../infra/utils/percentage\";\n\ninterface CircularProgressProps {\n current: number;\n total: number;\n size?: number;\n strokeWidth?: number;\n}\n\nexport default function DefaultCircularProgress({\n current,\n total,\n size = 62,\n strokeWidth = 3,\n}: CircularProgressProps) {\n const radius = calculateRadius(size, strokeWidth);\n const circumference = calculateCircumference(radius);\n const percentage = calculatePercentage(current, total);\n const offset = calculateCircularProgressOffset(percentage, circumference);\n\n return (\n <div\n className=\"relative flex items-center justify-center\"\n style={{ width: size, height: size }}\n role=\"progressbar\"\n aria-valuenow={current}\n aria-valuemin={0}\n aria-valuemax={total}\n aria-label=\"Progresso de exportação\"\n >\n <svg width={size} height={size} className=\"absolute\">\n <circle\n cx={size / 2}\n cy={size / 2}\n r={radius}\n stroke=\"var(--color-pages-300)\"\n strokeWidth={strokeWidth}\n fill=\"none\"\n strokeDasharray={circumference}\n strokeDashoffset={offset}\n strokeLinecap=\"round\"\n transform={`rotate(-90 ${size / 2} ${size / 2})`}\n className=\"transition-all duration-300 ease-in-out\"\n />\n </svg>\n </div>\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/ui/feedback/DefaultCircularProgress.tsx"],"sourcesContent":["import {\n calculateRadius,\n calculateCircumference,\n calculatePercentage,\n calculateCircularProgressOffset,\n} from \"../../../infra/utils/percentage\";\n\ninterface CircularProgressProps {\n current: number;\n total: number;\n size?: number;\n strokeWidth?: number;\n}\n\nexport default function DefaultCircularProgress({\n current,\n total,\n size = 62,\n strokeWidth = 3,\n}: CircularProgressProps) {\n const radius = calculateRadius(size, strokeWidth);\n const circumference = calculateCircumference(radius);\n const percentage = calculatePercentage(current, total);\n const offset = calculateCircularProgressOffset(percentage, circumference);\n\n return (\n <div\n className=\"relative flex items-center justify-center\"\n style={{ width: size, height: size }}\n role=\"progressbar\"\n aria-valuenow={current}\n aria-valuemin={0}\n aria-valuemax={total}\n aria-label=\"Progresso de exportação\"\n >\n <svg width={size} height={size} className=\"absolute\">\n <circle\n cx={size / 2}\n cy={size / 2}\n r={radius}\n stroke=\"var(--color-zinc-200)\"\n strokeWidth={strokeWidth}\n fill=\"none\"\n />\n <circle\n cx={size / 2}\n cy={size / 2}\n r={radius}\n stroke=\"var(--color-pages-300)\"\n strokeWidth={strokeWidth}\n fill=\"none\"\n strokeDasharray={circumference}\n strokeDashoffset={offset}\n strokeLinecap=\"round\"\n transform={`rotate(-90 ${size / 2} ${size / 2})`}\n className=\"transition-all duration-300 ease-in-out\"\n />\n </svg>\n </div>\n );\n}\n"],"mappings":"AAmCM,SACE,KADF;AAnCN;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AASQ,SAAR,wBAAyC;AAAA,EAC9C;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,cAAc;AAChB,GAA0B;AACxB,QAAM,SAAS,gBAAgB,MAAM,WAAW;AAChD,QAAM,gBAAgB,uBAAuB,MAAM;AACnD,QAAM,aAAa,oBAAoB,SAAS,KAAK;AACrD,QAAM,SAAS,gCAAgC,YAAY,aAAa;AAExE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAU;AAAA,MACV,OAAO,EAAE,OAAO,MAAM,QAAQ,KAAK;AAAA,MACnC,MAAK;AAAA,MACL,iBAAe;AAAA,MACf,iBAAe;AAAA,MACf,iBAAe;AAAA,MACf,cAAW;AAAA,MAEX,+BAAC,SAAI,OAAO,MAAM,QAAQ,MAAM,WAAU,YACxC;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,IAAI,OAAO;AAAA,YACX,IAAI,OAAO;AAAA,YACX,GAAG;AAAA,YACH,QAAO;AAAA,YACP;AAAA,YACA,MAAK;AAAA;AAAA,QACP;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,IAAI,OAAO;AAAA,YACX,IAAI,OAAO;AAAA,YACX,GAAG;AAAA,YACH,QAAO;AAAA,YACP;AAAA,YACA,MAAK;AAAA,YACL,iBAAiB;AAAA,YACjB,kBAAkB;AAAA,YAClB,eAAc;AAAA,YACd,WAAW,cAAc,OAAO,CAAC,IAAI,OAAO,CAAC;AAAA,YAC7C,WAAU;AAAA;AAAA,QACZ;AAAA,SACF;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/ui/form/Input.tsx"],"sourcesContent":["'use client';\n\nimport * as React from \"react\"\nimport { cn } from \"../../../infra/utils/clsx\"\n\nfunction Input({ className, type, ...props }: React.ComponentProps<\"input\">) {\n return (\n <input\n type={type}\n data-slot=\"input\"\n className={cn(\n \"outline-none\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Input }\n"],"mappings":";AAOI;AAJJ,SAAS,UAAU;AAEnB,SAAS,MAAM,EAAE,WAAW,MAAM,GAAG,MAAM,GAAkC;AAC3E,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/ui/form/Input.tsx"],"sourcesContent":["'use client';\n\nimport * as React from \"react\"\nimport { cn } from \"../../../infra/utils/clsx\"\n\nfunction Input({ className, type, ...props }: React.ComponentProps<\"input\">) {\n return (\n <input\n type={type}\n data-slot=\"input\"\n className={cn(\n \"outline-none disabled:opacity-50 disabled:placeholder:opacity-50\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Input }\n"],"mappings":";AAOI;AAJJ,SAAS,UAAU;AAEnB,SAAS,MAAM,EAAE,WAAW,MAAM,GAAG,MAAM,GAAkC;AAC3E,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;","names":[]}
|
package/package.json
CHANGED
|
@@ -34,6 +34,14 @@ export default function DefaultCircularProgress({
|
|
|
34
34
|
aria-label="Progresso de exportação"
|
|
35
35
|
>
|
|
36
36
|
<svg width={size} height={size} className="absolute">
|
|
37
|
+
<circle
|
|
38
|
+
cx={size / 2}
|
|
39
|
+
cy={size / 2}
|
|
40
|
+
r={radius}
|
|
41
|
+
stroke="var(--color-zinc-200)"
|
|
42
|
+
strokeWidth={strokeWidth}
|
|
43
|
+
fill="none"
|
|
44
|
+
/>
|
|
37
45
|
<circle
|
|
38
46
|
cx={size / 2}
|
|
39
47
|
cy={size / 2}
|