premium-react-loaders 1.0.0 → 1.0.2

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.
Files changed (105) hide show
  1. package/README.md +49 -3
  2. package/dist/components/index.d.ts +1 -0
  3. package/dist/components/index.d.ts.map +1 -1
  4. package/dist/components/overlay/LoaderOverlay.d.ts +28 -0
  5. package/dist/components/overlay/LoaderOverlay.d.ts.map +1 -0
  6. package/dist/components/overlay/index.d.ts +2 -0
  7. package/dist/components/overlay/index.d.ts.map +1 -0
  8. package/dist/components/progress/ProgressBar.d.ts +2 -0
  9. package/dist/components/progress/ProgressBar.d.ts.map +1 -1
  10. package/dist/components/progress/ProgressCircle.d.ts +2 -1
  11. package/dist/components/progress/ProgressCircle.d.ts.map +1 -1
  12. package/dist/components/progress/ProgressRing.d.ts +2 -1
  13. package/dist/components/progress/ProgressRing.d.ts.map +1 -1
  14. package/dist/components/skeleton/SkeletonPage.d.ts +16 -0
  15. package/dist/components/skeleton/SkeletonPage.d.ts.map +1 -0
  16. package/dist/components/skeleton/SkeletonText.d.ts +1 -1
  17. package/dist/components/skeleton/SkeletonText.d.ts.map +1 -1
  18. package/dist/components/skeleton/index.d.ts +1 -0
  19. package/dist/components/skeleton/index.d.ts.map +1 -1
  20. package/dist/components/spinner/SpinnerDots.d.ts.map +1 -1
  21. package/dist/components/spinner/SpinnerRing.d.ts +1 -0
  22. package/dist/components/spinner/SpinnerRing.d.ts.map +1 -1
  23. package/dist/index.cjs +16 -12
  24. package/dist/index.cjs.map +1 -1
  25. package/dist/index.d.ts +1 -1
  26. package/dist/index.js +16 -12
  27. package/dist/index.js.map +1 -1
  28. package/dist/index12.cjs +126 -37
  29. package/dist/index12.cjs.map +1 -1
  30. package/dist/index12.js +127 -38
  31. package/dist/index12.js.map +1 -1
  32. package/dist/index13.cjs +23 -11
  33. package/dist/index13.cjs.map +1 -1
  34. package/dist/index13.js +23 -11
  35. package/dist/index13.js.map +1 -1
  36. package/dist/index14.cjs +10 -32
  37. package/dist/index14.cjs.map +1 -1
  38. package/dist/index14.js +10 -32
  39. package/dist/index14.js.map +1 -1
  40. package/dist/index15.cjs +41 -24
  41. package/dist/index15.cjs.map +1 -1
  42. package/dist/index15.js +42 -25
  43. package/dist/index15.js.map +1 -1
  44. package/dist/index16.cjs +24 -37
  45. package/dist/index16.cjs.map +1 -1
  46. package/dist/index16.js +24 -37
  47. package/dist/index16.js.map +1 -1
  48. package/dist/index17.cjs +48 -58
  49. package/dist/index17.cjs.map +1 -1
  50. package/dist/index17.js +49 -59
  51. package/dist/index17.js.map +1 -1
  52. package/dist/index18.cjs +49 -53
  53. package/dist/index18.cjs.map +1 -1
  54. package/dist/index18.js +51 -55
  55. package/dist/index18.js.map +1 -1
  56. package/dist/index19.cjs +32 -16
  57. package/dist/index19.cjs.map +1 -1
  58. package/dist/index19.js +33 -17
  59. package/dist/index19.js.map +1 -1
  60. package/dist/index20.cjs +104 -26
  61. package/dist/index20.cjs.map +1 -1
  62. package/dist/index20.js +107 -29
  63. package/dist/index20.js.map +1 -1
  64. package/dist/index21.cjs +21 -26
  65. package/dist/index21.cjs.map +1 -1
  66. package/dist/index21.js +21 -26
  67. package/dist/index21.js.map +1 -1
  68. package/dist/index22.cjs +10 -12
  69. package/dist/index22.cjs.map +1 -1
  70. package/dist/index22.js +11 -13
  71. package/dist/index22.js.map +1 -1
  72. package/dist/index23.cjs +62 -16
  73. package/dist/index23.cjs.map +1 -1
  74. package/dist/index23.js +61 -15
  75. package/dist/index23.js.map +1 -1
  76. package/dist/index24.cjs +71 -0
  77. package/dist/index24.cjs.map +1 -0
  78. package/dist/index24.js +71 -0
  79. package/dist/index24.js.map +1 -0
  80. package/dist/index25.cjs +18 -0
  81. package/dist/index25.cjs.map +1 -0
  82. package/dist/index25.js +18 -0
  83. package/dist/index25.js.map +1 -0
  84. package/dist/index3.cjs +1 -1
  85. package/dist/index3.js +1 -1
  86. package/dist/index4.cjs +63 -3
  87. package/dist/index4.cjs.map +1 -1
  88. package/dist/index4.js +64 -4
  89. package/dist/index4.js.map +1 -1
  90. package/dist/index6.cjs +2 -1
  91. package/dist/index6.cjs.map +1 -1
  92. package/dist/index6.js +2 -1
  93. package/dist/index6.js.map +1 -1
  94. package/dist/premium-react-loaders.css +101 -0
  95. package/dist/types/index.d.ts +1 -0
  96. package/dist/types/index.d.ts.map +1 -1
  97. package/dist/types/overlay.d.ts +24 -0
  98. package/dist/types/overlay.d.ts.map +1 -0
  99. package/dist/types/progress.d.ts +8 -0
  100. package/dist/types/progress.d.ts.map +1 -1
  101. package/dist/types/skeleton.d.ts +9 -0
  102. package/dist/types/skeleton.d.ts.map +1 -1
  103. package/dist/utils/colors.d.ts +14 -1
  104. package/dist/utils/colors.d.ts.map +1 -1
  105. package/package.json +7 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index17.cjs","sources":["../src/components/progress/ProgressBar.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { ProgressBarProps } from '../../types';\nimport { cn, normalizeSize } from '../../utils';\n\n/**\n * ProgressBar - Linear progress bar\n *\n * A horizontal progress bar that can be determinate (showing specific progress) or indeterminate (loading animation).\n *\n * @example\n * ```tsx\n * <ProgressBar value={75} showValue />\n * <ProgressBar indeterminate />\n * <ProgressBar value={50} height={8} color=\"#8b5cf6\" />\n * ```\n */\nexport const ProgressBar = forwardRef<HTMLDivElement, ProgressBarProps>(\n (\n {\n value = 0,\n indeterminate = false,\n showValue = false,\n height = '0.5rem',\n color = '#3b82f6',\n secondaryColor = '#e0e0e0',\n className,\n style,\n testId = 'progress-bar',\n visible = true,\n ariaLabel,\n ...rest\n },\n ref\n ) => {\n if (!visible) return null;\n\n const clampedValue = Math.min(100, Math.max(0, value));\n const progressLabel = ariaLabel || `Loading ${clampedValue}%`;\n\n return (\n <div\n ref={ref}\n data-testid={testId}\n className={cn('relative w-full overflow-hidden rounded-full', className)}\n style={{\n height: normalizeSize(height),\n backgroundColor: secondaryColor,\n ...style,\n }}\n role=\"progressbar\"\n aria-label={progressLabel}\n aria-valuenow={indeterminate ? undefined : clampedValue}\n aria-valuemin={0}\n aria-valuemax={100}\n {...rest}\n >\n {indeterminate ? (\n <div\n className=\"absolute h-full rounded-full\"\n style={{\n backgroundColor: color,\n animation: 'progress-indeterminate 1.5s ease-in-out infinite',\n width: '40%',\n }}\n />\n ) : (\n <div\n className=\"h-full rounded-full transition-all duration-300 ease-in-out\"\n style={{\n width: `${clampedValue}%`,\n backgroundColor: color,\n }}\n />\n )}\n {showValue && !indeterminate && (\n <span\n className=\"absolute inset-0 flex items-center justify-center text-xs font-medium\"\n style={{ color: clampedValue > 50 ? 'white' : color }}\n >\n {clampedValue}%\n </span>\n )}\n </div>\n );\n }\n);\n\nProgressBar.displayName = 'ProgressBar';\n"],"names":["forwardRef","jsxs","cn","normalizeSize","jsx"],"mappings":";;;;;;AAgBO,MAAM,cAAcA,MAAAA;AAAAA,EACzB,CACE;AAAA,IACE,QAAQ;AAAA,IACR,gBAAgB;AAAA,IAChB,YAAY;AAAA,IACZ,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,iBAAiB;AAAA,IACjB;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT,UAAU;AAAA,IACV;AAAA,IACA,GAAG;AAAA,EAAA,GAEL,QACG;AACH,QAAI,CAAC,QAAS,QAAO;AAErB,UAAM,eAAe,KAAK,IAAI,KAAK,KAAK,IAAI,GAAG,KAAK,CAAC;AACrD,UAAM,gBAAgB,aAAa,WAAW,YAAY;AAE1D,WACEC,2BAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,eAAa;AAAA,QACb,WAAWC,WAAAA,GAAG,gDAAgD,SAAS;AAAA,QACvE,OAAO;AAAA,UACL,QAAQC,OAAAA,cAAc,MAAM;AAAA,UAC5B,iBAAiB;AAAA,UACjB,GAAG;AAAA,QAAA;AAAA,QAEL,MAAK;AAAA,QACL,cAAY;AAAA,QACZ,iBAAe,gBAAgB,SAAY;AAAA,QAC3C,iBAAe;AAAA,QACf,iBAAe;AAAA,QACd,GAAG;AAAA,QAEH,UAAA;AAAA,UAAA,gBACCC,2BAAAA;AAAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,OAAO;AAAA,gBACL,iBAAiB;AAAA,gBACjB,WAAW;AAAA,gBACX,OAAO;AAAA,cAAA;AAAA,YACT;AAAA,UAAA,IAGFA,2BAAAA;AAAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,OAAO;AAAA,gBACL,OAAO,GAAG,YAAY;AAAA,gBACtB,iBAAiB;AAAA,cAAA;AAAA,YACnB;AAAA,UAAA;AAAA,UAGH,aAAa,CAAC,iBACbH,2BAAAA;AAAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,OAAO,EAAE,OAAO,eAAe,KAAK,UAAU,MAAA;AAAA,cAE7C,UAAA;AAAA,gBAAA;AAAA,gBAAa;AAAA,cAAA;AAAA,YAAA;AAAA,UAAA;AAAA,QAChB;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEA,YAAY,cAAc;;"}
1
+ {"version":3,"file":"index17.cjs","sources":["../src/components/spinner/SpinnerGrid.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { SpinnerGridProps } from '../../types';\nimport { cn, normalizeSize, getAnimationDuration, parseSizeToNumber } from '../../utils';\n\n/**\n * SpinnerGrid - Grid of fading squares\n *\n * A spinner with a grid of squares that fade in and out in a pattern.\n *\n * @example\n * ```tsx\n * <SpinnerGrid size={40} color=\"#3b82f6\" />\n * <SpinnerGrid size={48} gridSize={4} />\n * ```\n */\nexport const SpinnerGrid = forwardRef<HTMLDivElement, SpinnerGridProps>(\n (\n {\n size = 40,\n color = '#3b82f6',\n gridSize = 3,\n speed = 'normal',\n className,\n style,\n testId = 'spinner-grid',\n visible = true,\n ariaLabel = 'Loading...',\n ...rest\n },\n ref\n ) => {\n if (!visible) return null;\n\n const sizeValue = parseSizeToNumber(size, 40);\n const cellSize = Math.floor(sizeValue / gridSize) - 2;\n const animationDuration = getAnimationDuration(speed);\n\n return (\n <div\n ref={ref}\n data-testid={testId}\n className={cn('inline-flex items-center justify-center', className)}\n style={style}\n role=\"status\"\n aria-label={ariaLabel}\n aria-busy=\"true\"\n {...rest}\n >\n <div\n className=\"grid gap-0.5\"\n style={{\n width: normalizeSize(size),\n height: normalizeSize(size),\n gridTemplateColumns: `repeat(${gridSize}, 1fr)`,\n }}\n >\n {Array.from({ length: gridSize * gridSize }).map((_, index) => {\n const row = Math.floor(index / gridSize);\n const col = index % gridSize;\n const delay = (row + col) * 0.1;\n\n return (\n <div\n key={index}\n className=\"rounded-sm\"\n style={{\n width: `${cellSize}px`,\n height: `${cellSize}px`,\n backgroundColor: color,\n animation: `fade-pulse ${animationDuration} ease-in-out infinite`,\n animationDelay: `${delay}s`,\n }}\n />\n );\n })}\n </div>\n </div>\n );\n }\n);\n\nSpinnerGrid.displayName = 'SpinnerGrid';\n"],"names":["forwardRef","parseSizeToNumber","getAnimationDuration","jsx","cn","normalizeSize"],"mappings":";;;;;;AAeO,MAAM,cAAcA,MAAAA;AAAAA,EACzB,CACE;AAAA,IACE,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,QAAQ;AAAA,IACR;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,GAAG;AAAA,EAAA,GAEL,QACG;AACH,QAAI,CAAC,QAAS,QAAO;AAErB,UAAM,YAAYC,OAAAA,kBAAkB,MAAM,EAAE;AAC5C,UAAM,WAAW,KAAK,MAAM,YAAY,QAAQ,IAAI;AACpD,UAAM,oBAAoBC,OAAAA,qBAAqB,KAAK;AAEpD,WACEC,2BAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,eAAa;AAAA,QACb,WAAWC,WAAAA,GAAG,2CAA2C,SAAS;AAAA,QAClE;AAAA,QACA,MAAK;AAAA,QACL,cAAY;AAAA,QACZ,aAAU;AAAA,QACT,GAAG;AAAA,QAEJ,UAAAD,2BAAAA;AAAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAU;AAAA,YACV,OAAO;AAAA,cACL,OAAOE,OAAAA,cAAc,IAAI;AAAA,cACzB,QAAQA,OAAAA,cAAc,IAAI;AAAA,cAC1B,qBAAqB,UAAU,QAAQ;AAAA,YAAA;AAAA,YAGxC,UAAA,MAAM,KAAK,EAAE,QAAQ,WAAW,SAAA,CAAU,EAAE,IAAI,CAAC,GAAG,UAAU;AAC7D,oBAAM,MAAM,KAAK,MAAM,QAAQ,QAAQ;AACvC,oBAAM,MAAM,QAAQ;AACpB,oBAAM,SAAS,MAAM,OAAO;AAE5B,qBACEF,2BAAAA;AAAAA,gBAAC;AAAA,gBAAA;AAAA,kBAEC,WAAU;AAAA,kBACV,OAAO;AAAA,oBACL,OAAO,GAAG,QAAQ;AAAA,oBAClB,QAAQ,GAAG,QAAQ;AAAA,oBACnB,iBAAiB;AAAA,oBACjB,WAAW,cAAc,iBAAiB;AAAA,oBAC1C,gBAAgB,GAAG,KAAK;AAAA,kBAAA;AAAA,gBAC1B;AAAA,gBARK;AAAA,cAAA;AAAA,YAWX,CAAC;AAAA,UAAA;AAAA,QAAA;AAAA,MACH;AAAA,IAAA;AAAA,EAGN;AACF;AAEA,YAAY,cAAc;;"}
package/dist/index17.js CHANGED
@@ -1,81 +1,71 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
1
+ import { jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
- import { normalizeSize } from "./index4.js";
4
3
  import { cn } from "./index3.js";
5
- const ProgressBar = forwardRef(
4
+ import { normalizeSize, getAnimationDuration, parseSizeToNumber } from "./index4.js";
5
+ const SpinnerGrid = forwardRef(
6
6
  ({
7
- value = 0,
8
- indeterminate = false,
9
- showValue = false,
10
- height = "0.5rem",
7
+ size = 40,
11
8
  color = "#3b82f6",
12
- secondaryColor = "#e0e0e0",
9
+ gridSize = 3,
10
+ speed = "normal",
13
11
  className,
14
12
  style,
15
- testId = "progress-bar",
13
+ testId = "spinner-grid",
16
14
  visible = true,
17
- ariaLabel,
15
+ ariaLabel = "Loading...",
18
16
  ...rest
19
17
  }, ref) => {
20
18
  if (!visible) return null;
21
- const clampedValue = Math.min(100, Math.max(0, value));
22
- const progressLabel = ariaLabel || `Loading ${clampedValue}%`;
23
- return /* @__PURE__ */ jsxs(
19
+ const sizeValue = parseSizeToNumber(size, 40);
20
+ const cellSize = Math.floor(sizeValue / gridSize) - 2;
21
+ const animationDuration = getAnimationDuration(speed);
22
+ return /* @__PURE__ */ jsx(
24
23
  "div",
25
24
  {
26
25
  ref,
27
26
  "data-testid": testId,
28
- className: cn("relative w-full overflow-hidden rounded-full", className),
29
- style: {
30
- height: normalizeSize(height),
31
- backgroundColor: secondaryColor,
32
- ...style
33
- },
34
- role: "progressbar",
35
- "aria-label": progressLabel,
36
- "aria-valuenow": indeterminate ? void 0 : clampedValue,
37
- "aria-valuemin": 0,
38
- "aria-valuemax": 100,
27
+ className: cn("inline-flex items-center justify-center", className),
28
+ style,
29
+ role: "status",
30
+ "aria-label": ariaLabel,
31
+ "aria-busy": "true",
39
32
  ...rest,
40
- children: [
41
- indeterminate ? /* @__PURE__ */ jsx(
42
- "div",
43
- {
44
- className: "absolute h-full rounded-full",
45
- style: {
46
- backgroundColor: color,
47
- animation: "progress-indeterminate 1.5s ease-in-out infinite",
48
- width: "40%"
49
- }
50
- }
51
- ) : /* @__PURE__ */ jsx(
52
- "div",
53
- {
54
- className: "h-full rounded-full transition-all duration-300 ease-in-out",
55
- style: {
56
- width: `${clampedValue}%`,
57
- backgroundColor: color
58
- }
59
- }
60
- ),
61
- showValue && !indeterminate && /* @__PURE__ */ jsxs(
62
- "span",
63
- {
64
- className: "absolute inset-0 flex items-center justify-center text-xs font-medium",
65
- style: { color: clampedValue > 50 ? "white" : color },
66
- children: [
67
- clampedValue,
68
- "%"
69
- ]
70
- }
71
- )
72
- ]
33
+ children: /* @__PURE__ */ jsx(
34
+ "div",
35
+ {
36
+ className: "grid gap-0.5",
37
+ style: {
38
+ width: normalizeSize(size),
39
+ height: normalizeSize(size),
40
+ gridTemplateColumns: `repeat(${gridSize}, 1fr)`
41
+ },
42
+ children: Array.from({ length: gridSize * gridSize }).map((_, index) => {
43
+ const row = Math.floor(index / gridSize);
44
+ const col = index % gridSize;
45
+ const delay = (row + col) * 0.1;
46
+ return /* @__PURE__ */ jsx(
47
+ "div",
48
+ {
49
+ className: "rounded-sm",
50
+ style: {
51
+ width: `${cellSize}px`,
52
+ height: `${cellSize}px`,
53
+ backgroundColor: color,
54
+ animation: `fade-pulse ${animationDuration} ease-in-out infinite`,
55
+ animationDelay: `${delay}s`
56
+ }
57
+ },
58
+ index
59
+ );
60
+ })
61
+ }
62
+ )
73
63
  }
74
64
  );
75
65
  }
76
66
  );
77
- ProgressBar.displayName = "ProgressBar";
67
+ SpinnerGrid.displayName = "SpinnerGrid";
78
68
  export {
79
- ProgressBar
69
+ SpinnerGrid
80
70
  };
81
71
  //# sourceMappingURL=index17.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index17.js","sources":["../src/components/progress/ProgressBar.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { ProgressBarProps } from '../../types';\nimport { cn, normalizeSize } from '../../utils';\n\n/**\n * ProgressBar - Linear progress bar\n *\n * A horizontal progress bar that can be determinate (showing specific progress) or indeterminate (loading animation).\n *\n * @example\n * ```tsx\n * <ProgressBar value={75} showValue />\n * <ProgressBar indeterminate />\n * <ProgressBar value={50} height={8} color=\"#8b5cf6\" />\n * ```\n */\nexport const ProgressBar = forwardRef<HTMLDivElement, ProgressBarProps>(\n (\n {\n value = 0,\n indeterminate = false,\n showValue = false,\n height = '0.5rem',\n color = '#3b82f6',\n secondaryColor = '#e0e0e0',\n className,\n style,\n testId = 'progress-bar',\n visible = true,\n ariaLabel,\n ...rest\n },\n ref\n ) => {\n if (!visible) return null;\n\n const clampedValue = Math.min(100, Math.max(0, value));\n const progressLabel = ariaLabel || `Loading ${clampedValue}%`;\n\n return (\n <div\n ref={ref}\n data-testid={testId}\n className={cn('relative w-full overflow-hidden rounded-full', className)}\n style={{\n height: normalizeSize(height),\n backgroundColor: secondaryColor,\n ...style,\n }}\n role=\"progressbar\"\n aria-label={progressLabel}\n aria-valuenow={indeterminate ? undefined : clampedValue}\n aria-valuemin={0}\n aria-valuemax={100}\n {...rest}\n >\n {indeterminate ? (\n <div\n className=\"absolute h-full rounded-full\"\n style={{\n backgroundColor: color,\n animation: 'progress-indeterminate 1.5s ease-in-out infinite',\n width: '40%',\n }}\n />\n ) : (\n <div\n className=\"h-full rounded-full transition-all duration-300 ease-in-out\"\n style={{\n width: `${clampedValue}%`,\n backgroundColor: color,\n }}\n />\n )}\n {showValue && !indeterminate && (\n <span\n className=\"absolute inset-0 flex items-center justify-center text-xs font-medium\"\n style={{ color: clampedValue > 50 ? 'white' : color }}\n >\n {clampedValue}%\n </span>\n )}\n </div>\n );\n }\n);\n\nProgressBar.displayName = 'ProgressBar';\n"],"names":[],"mappings":";;;;AAgBO,MAAM,cAAc;AAAA,EACzB,CACE;AAAA,IACE,QAAQ;AAAA,IACR,gBAAgB;AAAA,IAChB,YAAY;AAAA,IACZ,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,iBAAiB;AAAA,IACjB;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT,UAAU;AAAA,IACV;AAAA,IACA,GAAG;AAAA,EAAA,GAEL,QACG;AACH,QAAI,CAAC,QAAS,QAAO;AAErB,UAAM,eAAe,KAAK,IAAI,KAAK,KAAK,IAAI,GAAG,KAAK,CAAC;AACrD,UAAM,gBAAgB,aAAa,WAAW,YAAY;AAE1D,WACE;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,eAAa;AAAA,QACb,WAAW,GAAG,gDAAgD,SAAS;AAAA,QACvE,OAAO;AAAA,UACL,QAAQ,cAAc,MAAM;AAAA,UAC5B,iBAAiB;AAAA,UACjB,GAAG;AAAA,QAAA;AAAA,QAEL,MAAK;AAAA,QACL,cAAY;AAAA,QACZ,iBAAe,gBAAgB,SAAY;AAAA,QAC3C,iBAAe;AAAA,QACf,iBAAe;AAAA,QACd,GAAG;AAAA,QAEH,UAAA;AAAA,UAAA,gBACC;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,OAAO;AAAA,gBACL,iBAAiB;AAAA,gBACjB,WAAW;AAAA,gBACX,OAAO;AAAA,cAAA;AAAA,YACT;AAAA,UAAA,IAGF;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,OAAO;AAAA,gBACL,OAAO,GAAG,YAAY;AAAA,gBACtB,iBAAiB;AAAA,cAAA;AAAA,YACnB;AAAA,UAAA;AAAA,UAGH,aAAa,CAAC,iBACb;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,OAAO,EAAE,OAAO,eAAe,KAAK,UAAU,MAAA;AAAA,cAE7C,UAAA;AAAA,gBAAA;AAAA,gBAAa;AAAA,cAAA;AAAA,YAAA;AAAA,UAAA;AAAA,QAChB;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEA,YAAY,cAAc;"}
1
+ {"version":3,"file":"index17.js","sources":["../src/components/spinner/SpinnerGrid.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { SpinnerGridProps } from '../../types';\nimport { cn, normalizeSize, getAnimationDuration, parseSizeToNumber } from '../../utils';\n\n/**\n * SpinnerGrid - Grid of fading squares\n *\n * A spinner with a grid of squares that fade in and out in a pattern.\n *\n * @example\n * ```tsx\n * <SpinnerGrid size={40} color=\"#3b82f6\" />\n * <SpinnerGrid size={48} gridSize={4} />\n * ```\n */\nexport const SpinnerGrid = forwardRef<HTMLDivElement, SpinnerGridProps>(\n (\n {\n size = 40,\n color = '#3b82f6',\n gridSize = 3,\n speed = 'normal',\n className,\n style,\n testId = 'spinner-grid',\n visible = true,\n ariaLabel = 'Loading...',\n ...rest\n },\n ref\n ) => {\n if (!visible) return null;\n\n const sizeValue = parseSizeToNumber(size, 40);\n const cellSize = Math.floor(sizeValue / gridSize) - 2;\n const animationDuration = getAnimationDuration(speed);\n\n return (\n <div\n ref={ref}\n data-testid={testId}\n className={cn('inline-flex items-center justify-center', className)}\n style={style}\n role=\"status\"\n aria-label={ariaLabel}\n aria-busy=\"true\"\n {...rest}\n >\n <div\n className=\"grid gap-0.5\"\n style={{\n width: normalizeSize(size),\n height: normalizeSize(size),\n gridTemplateColumns: `repeat(${gridSize}, 1fr)`,\n }}\n >\n {Array.from({ length: gridSize * gridSize }).map((_, index) => {\n const row = Math.floor(index / gridSize);\n const col = index % gridSize;\n const delay = (row + col) * 0.1;\n\n return (\n <div\n key={index}\n className=\"rounded-sm\"\n style={{\n width: `${cellSize}px`,\n height: `${cellSize}px`,\n backgroundColor: color,\n animation: `fade-pulse ${animationDuration} ease-in-out infinite`,\n animationDelay: `${delay}s`,\n }}\n />\n );\n })}\n </div>\n </div>\n );\n }\n);\n\nSpinnerGrid.displayName = 'SpinnerGrid';\n"],"names":[],"mappings":";;;;AAeO,MAAM,cAAc;AAAA,EACzB,CACE;AAAA,IACE,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,QAAQ;AAAA,IACR;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,GAAG;AAAA,EAAA,GAEL,QACG;AACH,QAAI,CAAC,QAAS,QAAO;AAErB,UAAM,YAAY,kBAAkB,MAAM,EAAE;AAC5C,UAAM,WAAW,KAAK,MAAM,YAAY,QAAQ,IAAI;AACpD,UAAM,oBAAoB,qBAAqB,KAAK;AAEpD,WACE;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,eAAa;AAAA,QACb,WAAW,GAAG,2CAA2C,SAAS;AAAA,QAClE;AAAA,QACA,MAAK;AAAA,QACL,cAAY;AAAA,QACZ,aAAU;AAAA,QACT,GAAG;AAAA,QAEJ,UAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAU;AAAA,YACV,OAAO;AAAA,cACL,OAAO,cAAc,IAAI;AAAA,cACzB,QAAQ,cAAc,IAAI;AAAA,cAC1B,qBAAqB,UAAU,QAAQ;AAAA,YAAA;AAAA,YAGxC,UAAA,MAAM,KAAK,EAAE,QAAQ,WAAW,SAAA,CAAU,EAAE,IAAI,CAAC,GAAG,UAAU;AAC7D,oBAAM,MAAM,KAAK,MAAM,QAAQ,QAAQ;AACvC,oBAAM,MAAM,QAAQ;AACpB,oBAAM,SAAS,MAAM,OAAO;AAE5B,qBACE;AAAA,gBAAC;AAAA,gBAAA;AAAA,kBAEC,WAAU;AAAA,kBACV,OAAO;AAAA,oBACL,OAAO,GAAG,QAAQ;AAAA,oBAClB,QAAQ,GAAG,QAAQ;AAAA,oBACnB,iBAAiB;AAAA,oBACjB,WAAW,cAAc,iBAAiB;AAAA,oBAC1C,gBAAgB,GAAG,KAAK;AAAA,kBAAA;AAAA,gBAC1B;AAAA,gBARK;AAAA,cAAA;AAAA,YAWX,CAAC;AAAA,UAAA;AAAA,QAAA;AAAA,MACH;AAAA,IAAA;AAAA,EAGN;AACF;AAEA,YAAY,cAAc;"}
package/dist/index18.cjs CHANGED
@@ -4,39 +4,39 @@ const jsxRuntime = require("react/jsx-runtime");
4
4
  const react = require("react");
5
5
  const colors = require("./index4.cjs");
6
6
  const classNames = require("./index3.cjs");
7
- const ProgressCircle = react.forwardRef(
7
+ const ProgressBar = react.forwardRef(
8
8
  ({
9
9
  value = 0,
10
10
  indeterminate = false,
11
11
  showValue = false,
12
- size = 60,
13
- thickness = 4,
12
+ height = "0.5rem",
14
13
  color = "#3b82f6",
15
14
  secondaryColor = "#e0e0e0",
15
+ gradient = false,
16
+ buffer,
17
+ speed = "normal",
16
18
  className,
17
19
  style,
18
- testId = "progress-circle",
20
+ testId = "progress-bar",
19
21
  visible = true,
20
22
  ariaLabel,
21
23
  ...rest
22
24
  }, ref) => {
23
25
  if (!visible) return null;
24
26
  const clampedValue = Math.min(100, Math.max(0, value));
25
- const sizeValue = typeof size === "number" ? size : parseInt(String(size), 10);
26
- const thicknessValue = typeof thickness === "number" ? thickness : parseInt(String(thickness), 10);
27
- const radius = (sizeValue - thicknessValue * 2) / 2;
28
- const circumference = 2 * Math.PI * radius;
29
- const strokeDashoffset = circumference - clampedValue / 100 * circumference;
27
+ const clampedBuffer = buffer !== void 0 ? Math.min(100, Math.max(0, buffer)) : void 0;
30
28
  const progressLabel = ariaLabel || `Loading ${clampedValue}%`;
29
+ const animationDuration = colors.getAnimationDuration(speed);
30
+ const gradientId = react.useMemo(() => `progress-bar-gradient-${Math.random().toString(36).substr(2, 9)}`, []);
31
31
  return /* @__PURE__ */ jsxRuntime.jsxs(
32
32
  "div",
33
33
  {
34
34
  ref,
35
35
  "data-testid": testId,
36
- className: classNames.cn("inline-flex items-center justify-center relative", className),
36
+ className: classNames.cn("relative w-full overflow-hidden rounded-full", className),
37
37
  style: {
38
- width: colors.normalizeSize(size),
39
- height: colors.normalizeSize(size),
38
+ height: colors.normalizeSize(height),
39
+ backgroundColor: secondaryColor,
40
40
  ...style
41
41
  },
42
42
  role: "progressbar",
@@ -46,51 +46,47 @@ const ProgressCircle = react.forwardRef(
46
46
  "aria-valuemax": 100,
47
47
  ...rest,
48
48
  children: [
49
- /* @__PURE__ */ jsxRuntime.jsxs(
50
- "svg",
49
+ gradient && !indeterminate && /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "0", height: "0", style: { position: "absolute" }, children: /* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsxs("linearGradient", { id: gradientId, x1: "0%", y1: "0%", x2: "100%", y2: "0%", children: [
50
+ /* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "0%", stopColor: color }),
51
+ /* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "100%", stopColor: secondaryColor || "#8b5cf6" })
52
+ ] }) }) }),
53
+ clampedBuffer !== void 0 && !indeterminate && /* @__PURE__ */ jsxRuntime.jsx(
54
+ "div",
51
55
  {
52
- className: classNames.cn(indeterminate && "animate-spinner-rotate"),
53
- width: sizeValue,
54
- height: sizeValue,
55
- viewBox: `0 0 ${sizeValue} ${sizeValue}`,
56
- children: [
57
- /* @__PURE__ */ jsxRuntime.jsx(
58
- "circle",
59
- {
60
- cx: sizeValue / 2,
61
- cy: sizeValue / 2,
62
- r: radius,
63
- fill: "none",
64
- stroke: secondaryColor,
65
- strokeWidth: thicknessValue
66
- }
67
- ),
68
- /* @__PURE__ */ jsxRuntime.jsx(
69
- "circle",
70
- {
71
- cx: sizeValue / 2,
72
- cy: sizeValue / 2,
73
- r: radius,
74
- fill: "none",
75
- stroke: color,
76
- strokeWidth: thicknessValue,
77
- strokeLinecap: "round",
78
- strokeDasharray: circumference,
79
- strokeDashoffset: indeterminate ? circumference * 0.75 : strokeDashoffset,
80
- transform: `rotate(-90 ${sizeValue / 2} ${sizeValue / 2})`,
81
- style: {
82
- transition: indeterminate ? "none" : "stroke-dashoffset 0.3s ease-in-out"
83
- }
84
- }
85
- )
86
- ]
56
+ className: "absolute h-full rounded-full opacity-30",
57
+ style: {
58
+ width: `${clampedBuffer}%`,
59
+ backgroundColor: color
60
+ }
61
+ }
62
+ ),
63
+ indeterminate ? /* @__PURE__ */ jsxRuntime.jsx(
64
+ "div",
65
+ {
66
+ className: "absolute h-full rounded-full",
67
+ style: {
68
+ backgroundColor: gradient ? `url(#${gradientId})` : color,
69
+ animation: `progress-indeterminate ${animationDuration} ease-in-out infinite`,
70
+ width: "40%"
71
+ }
72
+ }
73
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
74
+ "div",
75
+ {
76
+ className: "h-full rounded-full transition-all duration-300 ease-in-out",
77
+ style: {
78
+ width: `${clampedValue}%`,
79
+ background: gradient ? `url(#${gradientId})` : color
80
+ }
87
81
  }
88
82
  ),
89
83
  showValue && !indeterminate && /* @__PURE__ */ jsxRuntime.jsxs(
90
84
  "span",
91
85
  {
92
- className: "absolute text-sm font-medium",
93
- style: { color },
86
+ className: "absolute inset-0 flex items-center justify-center text-xs font-medium",
87
+ style: {
88
+ color: clampedValue > 50 ? colors.getContrastColor(color) : secondaryColor === "#e0e0e0" ? "#000000" : colors.getContrastColor(secondaryColor)
89
+ },
94
90
  children: [
95
91
  clampedValue,
96
92
  "%"
@@ -102,6 +98,6 @@ const ProgressCircle = react.forwardRef(
102
98
  );
103
99
  }
104
100
  );
105
- ProgressCircle.displayName = "ProgressCircle";
106
- exports.ProgressCircle = ProgressCircle;
101
+ ProgressBar.displayName = "ProgressBar";
102
+ exports.ProgressBar = ProgressBar;
107
103
  //# sourceMappingURL=index18.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index18.cjs","sources":["../src/components/progress/ProgressCircle.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { ProgressCircleProps } from '../../types';\nimport { cn, normalizeSize } from '../../utils';\n\n/**\n * ProgressCircle - SVG-based circular progress indicator\n *\n * A circular progress indicator that shows progress as a partial circle.\n *\n * @example\n * ```tsx\n * <ProgressCircle value={75} showValue />\n * <ProgressCircle value={50} size={80} thickness={6} />\n * <ProgressCircle indeterminate />\n * ```\n */\nexport const ProgressCircle = forwardRef<HTMLDivElement, ProgressCircleProps>(\n (\n {\n value = 0,\n indeterminate = false,\n showValue = false,\n size = 60,\n thickness = 4,\n color = '#3b82f6',\n secondaryColor = '#e0e0e0',\n className,\n style,\n testId = 'progress-circle',\n visible = true,\n ariaLabel,\n ...rest\n },\n ref\n ) => {\n if (!visible) return null;\n\n const clampedValue = Math.min(100, Math.max(0, value));\n const sizeValue = typeof size === 'number' ? size : parseInt(String(size), 10);\n const thicknessValue = typeof thickness === 'number' ? thickness : parseInt(String(thickness), 10);\n const radius = (sizeValue - thicknessValue * 2) / 2;\n const circumference = 2 * Math.PI * radius;\n const strokeDashoffset = circumference - (clampedValue / 100) * circumference;\n const progressLabel = ariaLabel || `Loading ${clampedValue}%`;\n\n return (\n <div\n ref={ref}\n data-testid={testId}\n className={cn('inline-flex items-center justify-center relative', className)}\n style={{\n width: normalizeSize(size),\n height: normalizeSize(size),\n ...style,\n }}\n role=\"progressbar\"\n aria-label={progressLabel}\n aria-valuenow={indeterminate ? undefined : clampedValue}\n aria-valuemin={0}\n aria-valuemax={100}\n {...rest}\n >\n <svg\n className={cn(indeterminate && 'animate-spinner-rotate')}\n width={sizeValue}\n height={sizeValue}\n viewBox={`0 0 ${sizeValue} ${sizeValue}`}\n >\n {/* Background circle */}\n <circle\n cx={sizeValue / 2}\n cy={sizeValue / 2}\n r={radius}\n fill=\"none\"\n stroke={secondaryColor}\n strokeWidth={thicknessValue}\n />\n {/* Progress circle */}\n <circle\n cx={sizeValue / 2}\n cy={sizeValue / 2}\n r={radius}\n fill=\"none\"\n stroke={color}\n strokeWidth={thicknessValue}\n strokeLinecap=\"round\"\n strokeDasharray={circumference}\n strokeDashoffset={indeterminate ? circumference * 0.75 : strokeDashoffset}\n transform={`rotate(-90 ${sizeValue / 2} ${sizeValue / 2})`}\n style={{\n transition: indeterminate ? 'none' : 'stroke-dashoffset 0.3s ease-in-out',\n }}\n />\n </svg>\n {showValue && !indeterminate && (\n <span\n className=\"absolute text-sm font-medium\"\n style={{ color }}\n >\n {clampedValue}%\n </span>\n )}\n </div>\n );\n }\n);\n\nProgressCircle.displayName = 'ProgressCircle';\n"],"names":["forwardRef","jsxs","cn","normalizeSize","jsx"],"mappings":";;;;;;AAgBO,MAAM,iBAAiBA,MAAAA;AAAAA,EAC5B,CACE;AAAA,IACE,QAAQ;AAAA,IACR,gBAAgB;AAAA,IAChB,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,YAAY;AAAA,IACZ,QAAQ;AAAA,IACR,iBAAiB;AAAA,IACjB;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT,UAAU;AAAA,IACV;AAAA,IACA,GAAG;AAAA,E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C;AAAA,kBAAA;AAAA,oBACC,IAAI,YAAY;AAAA,oBAChB,IAAI,YAAY;AAAA,oBAChB,GAAG;AAAA,oBACH,MAAK;AAAA,oBACL,QAAQ;AAAA,oBACR,aAAa;AAAA,oBACb,eAAc;AAAA,oBACd,iBAAiB;AAAA,oBACjB,kBAAkB,gBAAgB,gBAAgB,OAAO;AAAA,oBACzD,WAAW,cAAc,YAAY,CAAC,IAAI,YAAY,CAAC;AAAA,oBACvD,OAAO;AAAA,sBACL,YAAY,gBAAgB,SAAS;AAAA,oBAAA;AAAA,kBACvC;AAAA,gBAAA;AAAA,cACF;AAAA,YAAA;AAAA,UAAA;AAAA,UAED,aAAa,CAAC,iBACbH,2BAAAA;AAAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,OAAO,EAAE,MAAA;AAAA,cAER,UAAA;AAAA,gBAAA;AAAA,gBAAa;AAAA,cAAA;AAAA,YAAA;AAAA,UAAA;AAAA,QAChB;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEA,eAAe,cAAc;;"}
1
+ {"version":3,"file":"index18.cjs","sources":["../src/components/progress/ProgressBar.tsx"],"sourcesContent":["import { forwardRef, useMemo } from 'react';\nimport { ProgressBarProps } from '../../types';\nimport { cn, normalizeSize, getContrastColor, getAnimationDuration } from '../../utils';\n\n/**\n * ProgressBar - Linear progress bar\n *\n * A horizontal progress bar that can be determinate (showing specific progress) or indeterminate (loading animation).\n *\n * @example\n * ```tsx\n * <ProgressBar value={75} showValue />\n * <ProgressBar indeterminate />\n * <ProgressBar value={50} height={8} color=\"#8b5cf6\" />\n * <ProgressBar value={50} buffer={75} /> // YouTube-style buffering\n * <ProgressBar value={60} gradient /> // Gradient progress\n * ```\n */\nexport const ProgressBar = forwardRef<HTMLDivElement, ProgressBarProps>(\n (\n {\n value = 0,\n indeterminate = false,\n showValue = false,\n height = '0.5rem',\n color = '#3b82f6',\n secondaryColor = '#e0e0e0',\n gradient = false,\n buffer,\n speed = 'normal',\n className,\n style,\n testId = 'progress-bar',\n visible = true,\n ariaLabel,\n ...rest\n },\n ref\n ) => {\n if (!visible) return null;\n\n const clampedValue = Math.min(100, Math.max(0, value));\n const clampedBuffer = buffer !== undefined ? Math.min(100, Math.max(0, buffer)) : undefined;\n const progressLabel = ariaLabel || `Loading ${clampedValue}%`;\n const animationDuration = getAnimationDuration(speed);\n\n // Generate gradient ID for SVG-based gradient\n const gradientId = useMemo(() => `progress-bar-gradient-${Math.random().toString(36).substr(2, 9)}`, []);\n\n return (\n <div\n ref={ref}\n data-testid={testId}\n className={cn('relative w-full overflow-hidden rounded-full', className)}\n style={{\n height: normalizeSize(height),\n backgroundColor: secondaryColor,\n ...style,\n }}\n role=\"progressbar\"\n aria-label={progressLabel}\n aria-valuenow={indeterminate ? undefined : clampedValue}\n aria-valuemin={0}\n aria-valuemax={100}\n {...rest}\n >\n {/* Gradient SVG definition */}\n {gradient && !indeterminate && (\n <svg width=\"0\" height=\"0\" style={{ position: 'absolute' }}>\n <defs>\n <linearGradient id={gradientId} x1=\"0%\" y1=\"0%\" x2=\"100%\" y2=\"0%\">\n <stop offset=\"0%\" stopColor={color} />\n <stop offset=\"100%\" stopColor={secondaryColor || '#8b5cf6'} />\n </linearGradient>\n </defs>\n </svg>\n )}\n\n {/* Buffer indicator (shows behind main progress) */}\n {clampedBuffer !== undefined && !indeterminate && (\n <div\n className=\"absolute h-full rounded-full opacity-30\"\n style={{\n width: `${clampedBuffer}%`,\n backgroundColor: color,\n }}\n />\n )}\n\n {indeterminate ? (\n <div\n className=\"absolute h-full rounded-full\"\n style={{\n backgroundColor: gradient ? `url(#${gradientId})` : color,\n animation: `progress-indeterminate ${animationDuration} ease-in-out infinite`,\n width: '40%',\n }}\n />\n ) : (\n <div\n className=\"h-full rounded-full transition-all duration-300 ease-in-out\"\n style={{\n width: `${clampedValue}%`,\n background: gradient ? `url(#${gradientId})` : color,\n }}\n />\n )}\n\n {showValue && !indeterminate && (\n <span\n className=\"absolute inset-0 flex items-center justify-center text-xs font-medium\"\n style={{\n color: clampedValue > 50 ? getContrastColor(color) : secondaryColor === '#e0e0e0' ? '#000000' : getContrastColor(secondaryColor)\n }}\n >\n {clampedValue}%\n </span>\n )}\n </div>\n );\n }\n);\n\nProgressBar.displayName = 'ProgressBar';\n"],"names":["forwardRef","getAnimationDuration","useMemo","jsxs","cn","normalizeSize","jsx","getContrastColor"],"mappings":";;;;;;AAkBO,MAAM,cAAcA,MAAAA;AAAAA,EACzB,CACE;AAAA,IACE,QAAQ;AAAA,IACR,gBAAgB;AAAA,IAChB,YAAY;AAAA,IACZ,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,iBAAiB;AAAA,IACjB,WAAW;AAAA,IACX;AAAA,IACA,QAAQ;AAAA,IACR;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT,UAAU;AAAA,IACV;AAAA,IACA,GAAG;AAAA,EAAA,GAEL,QACG;AACH,QAAI,CAAC,QAAS,QAAO;AAErB,UAAM,eAAe,KAAK,IAAI,KAAK,KAAK,IAAI,GAAG,KAAK,CAAC;AACrD,UAAM,gBAAgB,WAAW,SAAY,KAAK,IAAI,KAAK,KAAK,IAAI,GAAG,MAAM,CAAC,IAAI;AAClF,UAAM,gBAAgB,aAAa,WAAW,YAAY;AAC1D,UAAM,oBAAoBC,OAAAA,qBAAqB,KAAK;AAGpD,UAAM,aAAaC,MAAAA,QAAQ,MAAM,yBAAyB,KAAK,SAAS,SAAS,EAAE,EAAE,OAAO,GAAG,CAAC,CAAC,IAAI,EAAE;AAEvG,WACEC,2BAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,eAAa;AAAA,QACb,WAAWC,WAAAA,GAAG,gDAAgD,SAAS;AAAA,QACvE,OAAO;AAAA,UACL,QAAQC,OAAAA,cAAc,MAAM;AAAA,UAC5B,iBAAiB;AAAA,UACjB,GAAG;AAAA,QAAA;AAAA,QAEL,MAAK;AAAA,QACL,cAAY;AAAA,QACZ,i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KAAK,IAAI,mBAAmB,YAAY,YAAYA,OAAAA,iBAAiB,cAAc;AAAA,cAAA;AAAA,cAGhI,UAAA;AAAA,gBAAA;AAAA,gBAAa;AAAA,cAAA;AAAA,YAAA;AAAA,UAAA;AAAA,QAChB;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEA,YAAY,cAAc;;"}
package/dist/index18.js CHANGED
@@ -1,40 +1,40 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
- import { forwardRef } from "react";
3
- import { normalizeSize } from "./index4.js";
2
+ import { forwardRef, useMemo } from "react";
3
+ import { normalizeSize, getAnimationDuration, getContrastColor } from "./index4.js";
4
4
  import { cn } from "./index3.js";
5
- const ProgressCircle = forwardRef(
5
+ const ProgressBar = forwardRef(
6
6
  ({
7
7
  value = 0,
8
8
  indeterminate = false,
9
9
  showValue = false,
10
- size = 60,
11
- thickness = 4,
10
+ height = "0.5rem",
12
11
  color = "#3b82f6",
13
12
  secondaryColor = "#e0e0e0",
13
+ gradient = false,
14
+ buffer,
15
+ speed = "normal",
14
16
  className,
15
17
  style,
16
- testId = "progress-circle",
18
+ testId = "progress-bar",
17
19
  visible = true,
18
20
  ariaLabel,
19
21
  ...rest
20
22
  }, ref) => {
21
23
  if (!visible) return null;
22
24
  const clampedValue = Math.min(100, Math.max(0, value));
23
- const sizeValue = typeof size === "number" ? size : parseInt(String(size), 10);
24
- const thicknessValue = typeof thickness === "number" ? thickness : parseInt(String(thickness), 10);
25
- const radius = (sizeValue - thicknessValue * 2) / 2;
26
- const circumference = 2 * Math.PI * radius;
27
- const strokeDashoffset = circumference - clampedValue / 100 * circumference;
25
+ const clampedBuffer = buffer !== void 0 ? Math.min(100, Math.max(0, buffer)) : void 0;
28
26
  const progressLabel = ariaLabel || `Loading ${clampedValue}%`;
27
+ const animationDuration = getAnimationDuration(speed);
28
+ const gradientId = useMemo(() => `progress-bar-gradient-${Math.random().toString(36).substr(2, 9)}`, []);
29
29
  return /* @__PURE__ */ jsxs(
30
30
  "div",
31
31
  {
32
32
  ref,
33
33
  "data-testid": testId,
34
- className: cn("inline-flex items-center justify-center relative", className),
34
+ className: cn("relative w-full overflow-hidden rounded-full", className),
35
35
  style: {
36
- width: normalizeSize(size),
37
- height: normalizeSize(size),
36
+ height: normalizeSize(height),
37
+ backgroundColor: secondaryColor,
38
38
  ...style
39
39
  },
40
40
  role: "progressbar",
@@ -44,51 +44,47 @@ const ProgressCircle = forwardRef(
44
44
  "aria-valuemax": 100,
45
45
  ...rest,
46
46
  children: [
47
- /* @__PURE__ */ jsxs(
48
- "svg",
47
+ gradient && !indeterminate && /* @__PURE__ */ jsx("svg", { width: "0", height: "0", style: { position: "absolute" }, children: /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs("linearGradient", { id: gradientId, x1: "0%", y1: "0%", x2: "100%", y2: "0%", children: [
48
+ /* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: color }),
49
+ /* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: secondaryColor || "#8b5cf6" })
50
+ ] }) }) }),
51
+ clampedBuffer !== void 0 && !indeterminate && /* @__PURE__ */ jsx(
52
+ "div",
49
53
  {
50
- className: cn(indeterminate && "animate-spinner-rotate"),
51
- width: sizeValue,
52
- height: sizeValue,
53
- viewBox: `0 0 ${sizeValue} ${sizeValue}`,
54
- children: [
55
- /* @__PURE__ */ jsx(
56
- "circle",
57
- {
58
- cx: sizeValue / 2,
59
- cy: sizeValue / 2,
60
- r: radius,
61
- fill: "none",
62
- stroke: secondaryColor,
63
- strokeWidth: thicknessValue
64
- }
65
- ),
66
- /* @__PURE__ */ jsx(
67
- "circle",
68
- {
69
- cx: sizeValue / 2,
70
- cy: sizeValue / 2,
71
- r: radius,
72
- fill: "none",
73
- stroke: color,
74
- strokeWidth: thicknessValue,
75
- strokeLinecap: "round",
76
- strokeDasharray: circumference,
77
- strokeDashoffset: indeterminate ? circumference * 0.75 : strokeDashoffset,
78
- transform: `rotate(-90 ${sizeValue / 2} ${sizeValue / 2})`,
79
- style: {
80
- transition: indeterminate ? "none" : "stroke-dashoffset 0.3s ease-in-out"
81
- }
82
- }
83
- )
84
- ]
54
+ className: "absolute h-full rounded-full opacity-30",
55
+ style: {
56
+ width: `${clampedBuffer}%`,
57
+ backgroundColor: color
58
+ }
59
+ }
60
+ ),
61
+ indeterminate ? /* @__PURE__ */ jsx(
62
+ "div",
63
+ {
64
+ className: "absolute h-full rounded-full",
65
+ style: {
66
+ backgroundColor: gradient ? `url(#${gradientId})` : color,
67
+ animation: `progress-indeterminate ${animationDuration} ease-in-out infinite`,
68
+ width: "40%"
69
+ }
70
+ }
71
+ ) : /* @__PURE__ */ jsx(
72
+ "div",
73
+ {
74
+ className: "h-full rounded-full transition-all duration-300 ease-in-out",
75
+ style: {
76
+ width: `${clampedValue}%`,
77
+ background: gradient ? `url(#${gradientId})` : color
78
+ }
85
79
  }
86
80
  ),
87
81
  showValue && !indeterminate && /* @__PURE__ */ jsxs(
88
82
  "span",
89
83
  {
90
- className: "absolute text-sm font-medium",
91
- style: { color },
84
+ className: "absolute inset-0 flex items-center justify-center text-xs font-medium",
85
+ style: {
86
+ color: clampedValue > 50 ? getContrastColor(color) : secondaryColor === "#e0e0e0" ? "#000000" : getContrastColor(secondaryColor)
87
+ },
92
88
  children: [
93
89
  clampedValue,
94
90
  "%"
@@ -100,8 +96,8 @@ const ProgressCircle = forwardRef(
100
96
  );
101
97
  }
102
98
  );
103
- ProgressCircle.displayName = "ProgressCircle";
99
+ ProgressBar.displayName = "ProgressBar";
104
100
  export {
105
- ProgressCircle
101
+ ProgressBar
106
102
  };
107
103
  //# sourceMappingURL=index18.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index18.js","sources":["../src/components/progress/ProgressCircle.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { ProgressCircleProps } from '../../types';\nimport { cn, normalizeSize } from '../../utils';\n\n/**\n * ProgressCircle - SVG-based circular progress indicator\n *\n * A circular progress indicator that shows progress as a partial circle.\n *\n * @example\n * ```tsx\n * <ProgressCircle value={75} showValue />\n * <ProgressCircle value={50} size={80} thickness={6} />\n * <ProgressCircle indeterminate />\n * ```\n */\nexport const ProgressCircle = forwardRef<HTMLDivElement, ProgressCircleProps>(\n (\n {\n value = 0,\n indeterminate = false,\n showValue = false,\n size = 60,\n thickness = 4,\n color = '#3b82f6',\n secondaryColor = '#e0e0e0',\n className,\n style,\n testId = 'progress-circle',\n visible = true,\n ariaLabel,\n ...rest\n },\n ref\n ) => {\n if (!visible) return null;\n\n const clampedValue = Math.min(100, Math.max(0, value));\n const sizeValue = typeof size === 'number' ? size : parseInt(String(size), 10);\n const thicknessValue = typeof thickness === 'number' ? thickness : parseInt(String(thickness), 10);\n const radius = (sizeValue - thicknessValue * 2) / 2;\n const circumference = 2 * Math.PI * radius;\n const strokeDashoffset = circumference - (clampedValue / 100) * circumference;\n const progressLabel = ariaLabel || `Loading ${clampedValue}%`;\n\n return (\n <div\n ref={ref}\n data-testid={testId}\n className={cn('inline-flex items-center justify-center relative', className)}\n style={{\n width: normalizeSize(size),\n height: normalizeSize(size),\n ...style,\n }}\n role=\"progressbar\"\n aria-label={progressLabel}\n aria-valuenow={indeterminate ? undefined : clampedValue}\n aria-valuemin={0}\n aria-valuemax={100}\n {...rest}\n >\n <svg\n className={cn(indeterminate && 'animate-spinner-rotate')}\n width={sizeValue}\n height={sizeValue}\n viewBox={`0 0 ${sizeValue} ${sizeValue}`}\n >\n {/* Background circle */}\n <circle\n cx={sizeValue / 2}\n cy={sizeValue / 2}\n r={radius}\n fill=\"none\"\n stroke={secondaryColor}\n strokeWidth={thicknessValue}\n />\n {/* Progress circle */}\n <circle\n cx={sizeValue / 2}\n cy={sizeValue / 2}\n r={radius}\n fill=\"none\"\n stroke={color}\n strokeWidth={thicknessValue}\n strokeLinecap=\"round\"\n strokeDasharray={circumference}\n strokeDashoffset={indeterminate ? circumference * 0.75 : strokeDashoffset}\n transform={`rotate(-90 ${sizeValue / 2} ${sizeValue / 2})`}\n style={{\n transition: indeterminate ? 'none' : 'stroke-dashoffset 0.3s ease-in-out',\n }}\n />\n </svg>\n {showValue && !indeterminate && (\n <span\n className=\"absolute text-sm font-medium\"\n style={{ color }}\n >\n {clampedValue}%\n </span>\n )}\n </div>\n );\n }\n);\n\nProgressCircle.displayName = 'ProgressCircle';\n"],"names":[],"mappings":";;;;AAgBO,MAAM,iBAAiB;AAAA,EAC5B,CACE;AAAA,IACE,QAAQ;AAAA,IACR,gBAAgB;AAAA,IAChB,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,YAAY;AAAA,IACZ,QAAQ;AAAA,IACR,iBAAiB;AAAA,IACjB;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT,UAAU;AAAA,IACV;AAAA,IACA,GAAG;AAAA,EAAA,GAEL,QACG;AACH,QAAI,CAAC,QAAS,QAAO;AAErB,UAAM,eAAe,KAAK,IAAI,KAAK,KAAK,IAAI,GAAG,KAAK,CAAC;AACrD,UAAM,YAAY,OAAO,SAAS,WAAW,OAAO,SAAS,OAAO,IAAI,GAAG,EAAE;AAC7E,UAAM,iBAAiB,OAAO,cAAc,WAAW,YAAY,SAAS,OAAO,SAAS,GAAG,EAAE;AACjG,UAAM,UAAU,YAAY,iBAAiB,KAAK;AAClD,UAAM,gBAAgB,IAAI,KAAK,KAAK;AACpC,UAAM,mBAAmB,gBAAiB,eAAe,MAAO;AAChE,UAAM,gBAAgB,aAAa,WAAW,YAAY;AAE1D,WACE;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,eAAa;AAAA,QACb,WAAW,GAAG,oDAAoD,SAAS;AAAA,QAC3E,OAAO;AAAA,UACL,OAAO,cAAc,IAAI;AAAA,UACzB,QAAQ,cAAc,IAAI;AAAA,UAC1B,GAAG;AAAA,QAAA;AAAA,QAEL,MAAK;AAAA,QACL,cAAY;AAAA,QACZ,iBAAe,gBAAgB,SAAY;AAAA,QAC3C,iBAAe;AAAA,QACf,iBAAe;AAAA,QACd,GAAG;AAAA,QAEJ,UAAA;AAAA,UAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAW,GAAG,iBAAiB,wBAAwB;AAAA,cACvD,OAAO;AAAA,cACP,QAAQ;AAAA,cACR,SAAS,OAAO,SAAS,IAAI,SAAS;AAAA,cAGtC,UAAA;AAAA,gBAAA;AAAA,kBAAC;AAAA,kBAAA;AAAA,oBACC,IAAI,YAAY;AAAA,oBAChB,IAAI,YAAY;AAAA,oBAChB,GAAG;AAAA,oBACH,MAAK;AAAA,oBACL,QAAQ;AAAA,oBACR,aAAa;AAAA,kBAAA;AAAA,gBAAA;AAAA,gBAGf;AAAA,kBAAC;AAAA,kBAAA;AAAA,oBACC,IAAI,YAAY;AAAA,oBAChB,IAAI,YAAY;AAAA,oBAChB,GAAG;AAAA,oBACH,MAAK;AAAA,oBACL,QAAQ;AAAA,oBACR,aAAa;AAAA,oBACb,eAAc;AAAA,oBACd,iBAAiB;AAAA,oBACjB,kBAAkB,gBAAgB,gBAAgB,OAAO;AAAA,oBACzD,WAAW,cAAc,YAAY,CAAC,IAAI,YAAY,CAAC;AAAA,oBACvD,OAAO;AAAA,sBACL,YAAY,gBAAgB,SAAS;AAAA,oBAAA;AAAA,kBACvC;AAAA,gBAAA;AAAA,cACF;AAAA,YAAA;AAAA,UAAA;AAAA,UAED,aAAa,CAAC,iBACb;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,OAAO,EAAE,MAAA;AAAA,cAER,UAAA;AAAA,gBAAA;AAAA,gBAAa;AAAA,cAAA;AAAA,YAAA;AAAA,UAAA;AAAA,QAChB;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEA,eAAe,cAAc;"}
1
+ {"version":3,"file":"index18.js","sources":["../src/components/progress/ProgressBar.tsx"],"sourcesContent":["import { forwardRef, useMemo } from 'react';\nimport { ProgressBarProps } from '../../types';\nimport { cn, normalizeSize, getContrastColor, getAnimationDuration } from '../../utils';\n\n/**\n * ProgressBar - Linear progress bar\n *\n * A horizontal progress bar that can be determinate (showing specific progress) or indeterminate (loading animation).\n *\n * @example\n * ```tsx\n * <ProgressBar value={75} showValue />\n * <ProgressBar indeterminate />\n * <ProgressBar value={50} height={8} color=\"#8b5cf6\" />\n * <ProgressBar value={50} buffer={75} /> // YouTube-style buffering\n * <ProgressBar value={60} gradient /> // Gradient progress\n * ```\n */\nexport const ProgressBar = forwardRef<HTMLDivElement, ProgressBarProps>(\n (\n {\n value = 0,\n indeterminate = false,\n showValue = false,\n height = '0.5rem',\n color = '#3b82f6',\n secondaryColor = '#e0e0e0',\n gradient = false,\n buffer,\n speed = 'normal',\n className,\n style,\n testId = 'progress-bar',\n visible = true,\n ariaLabel,\n ...rest\n },\n ref\n ) => {\n if (!visible) return null;\n\n const clampedValue = Math.min(100, Math.max(0, value));\n const clampedBuffer = buffer !== undefined ? Math.min(100, Math.max(0, buffer)) : undefined;\n const progressLabel = ariaLabel || `Loading ${clampedValue}%`;\n const animationDuration = getAnimationDuration(speed);\n\n // Generate gradient ID for SVG-based gradient\n const gradientId = useMemo(() => `progress-bar-gradient-${Math.random().toString(36).substr(2, 9)}`, []);\n\n return (\n <div\n ref={ref}\n data-testid={testId}\n className={cn('relative w-full overflow-hidden rounded-full', className)}\n style={{\n height: normalizeSize(height),\n backgroundColor: secondaryColor,\n ...style,\n }}\n role=\"progressbar\"\n aria-label={progressLabel}\n aria-valuenow={indeterminate ? undefined : clampedValue}\n aria-valuemin={0}\n aria-valuemax={100}\n {...rest}\n >\n {/* Gradient SVG definition */}\n {gradient && !indeterminate && (\n <svg width=\"0\" height=\"0\" style={{ position: 'absolute' }}>\n <defs>\n <linearGradient id={gradientId} x1=\"0%\" y1=\"0%\" x2=\"100%\" y2=\"0%\">\n <stop offset=\"0%\" stopColor={color} />\n <stop offset=\"100%\" stopColor={secondaryColor || '#8b5cf6'} />\n </linearGradient>\n </defs>\n </svg>\n )}\n\n {/* Buffer indicator (shows behind main progress) */}\n {clampedBuffer !== undefined && !indeterminate && (\n <div\n className=\"absolute h-full rounded-full opacity-30\"\n style={{\n width: `${clampedBuffer}%`,\n backgroundColor: color,\n }}\n />\n )}\n\n {indeterminate ? (\n <div\n className=\"absolute h-full rounded-full\"\n style={{\n backgroundColor: gradient ? `url(#${gradientId})` : color,\n animation: `progress-indeterminate ${animationDuration} ease-in-out infinite`,\n width: '40%',\n }}\n />\n ) : (\n <div\n className=\"h-full rounded-full transition-all duration-300 ease-in-out\"\n style={{\n width: `${clampedValue}%`,\n background: gradient ? `url(#${gradientId})` : color,\n }}\n />\n )}\n\n {showValue && !indeterminate && (\n <span\n className=\"absolute inset-0 flex items-center justify-center text-xs font-medium\"\n style={{\n color: clampedValue > 50 ? getContrastColor(color) : secondaryColor === '#e0e0e0' ? '#000000' : getContrastColor(secondaryColor)\n }}\n >\n {clampedValue}%\n </span>\n )}\n </div>\n );\n }\n);\n\nProgressBar.displayName = 'ProgressBar';\n"],"names":[],"mappings":";;;;AAkBO,MAAM,cAAc;AAAA,EACzB,CACE;AAAA,IACE,QAAQ;AAAA,IACR,gBAAgB;AAAA,IAChB,YAAY;AAAA,IACZ,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,iBAAiB;AAAA,IACjB,WAAW;AAAA,IACX;AAAA,IACA,QAAQ;AAAA,IACR;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT,UAAU;AAAA,IACV;AAAA,IACA,GAAG;AAAA,EAAA,GAEL,QACG;AACH,QAAI,CAAC,QAAS,QAAO;AAErB,UAAM,eAAe,KAAK,IAAI,KAAK,KAAK,IAAI,GAAG,KAAK,CAAC;AACrD,UAAM,gBAAgB,WAAW,SAAY,KAAK,IAAI,KAAK,KAAK,IAAI,GAAG,MAAM,CAAC,IAAI;AAClF,UAAM,gBAAgB,aAAa,WAAW,YAAY;AAC1D,UAAM,oBAAoB,qBAAqB,KAAK;AAGpD,UAAM,aAAa,QAAQ,MAAM,yBAAyB,KAAK,SAAS,SAAS,EAAE,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