premium-react-loaders 1.0.2 → 1.2.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.
Files changed (143) hide show
  1. package/README.md +55 -6
  2. package/dist/components/progress/ProgressBar.d.ts.map +1 -1
  3. package/dist/components/progress/ProgressCircle.d.ts.map +1 -1
  4. package/dist/components/progress/ProgressRing.d.ts.map +1 -1
  5. package/dist/components/progress/ProgressSteps.d.ts +16 -0
  6. package/dist/components/progress/ProgressSteps.d.ts.map +1 -0
  7. package/dist/components/progress/index.d.ts +1 -0
  8. package/dist/components/progress/index.d.ts.map +1 -1
  9. package/dist/components/pulse/PulseBars.d.ts +2 -2
  10. package/dist/components/pulse/PulseBars.d.ts.map +1 -1
  11. package/dist/components/pulse/PulseDots.d.ts +2 -2
  12. package/dist/components/pulse/PulseDots.d.ts.map +1 -1
  13. package/dist/components/pulse/PulseWave.d.ts +2 -2
  14. package/dist/components/pulse/PulseWave.d.ts.map +1 -1
  15. package/dist/components/pulse/TypingIndicator.d.ts +16 -0
  16. package/dist/components/pulse/TypingIndicator.d.ts.map +1 -0
  17. package/dist/components/pulse/index.d.ts +1 -0
  18. package/dist/components/pulse/index.d.ts.map +1 -1
  19. package/dist/components/skeleton/SkeletonForm.d.ts +16 -0
  20. package/dist/components/skeleton/SkeletonForm.d.ts.map +1 -0
  21. package/dist/components/skeleton/index.d.ts +1 -0
  22. package/dist/components/skeleton/index.d.ts.map +1 -1
  23. package/dist/components/spinner/SpinnerBars.d.ts +2 -2
  24. package/dist/components/spinner/SpinnerBars.d.ts.map +1 -1
  25. package/dist/components/spinner/SpinnerCircle.d.ts +2 -1
  26. package/dist/components/spinner/SpinnerCircle.d.ts.map +1 -1
  27. package/dist/components/spinner/SpinnerDots.d.ts +2 -2
  28. package/dist/components/spinner/SpinnerDots.d.ts.map +1 -1
  29. package/dist/components/spinner/SpinnerGrid.d.ts +2 -2
  30. package/dist/components/spinner/SpinnerGrid.d.ts.map +1 -1
  31. package/dist/components/spinner/SpinnerPulse.d.ts +15 -0
  32. package/dist/components/spinner/SpinnerPulse.d.ts.map +1 -0
  33. package/dist/components/spinner/SpinnerRing.d.ts +3 -3
  34. package/dist/components/spinner/SpinnerRing.d.ts.map +1 -1
  35. package/dist/components/spinner/SpinnerWave.d.ts +15 -0
  36. package/dist/components/spinner/SpinnerWave.d.ts.map +1 -0
  37. package/dist/components/spinner/index.d.ts +2 -0
  38. package/dist/components/spinner/index.d.ts.map +1 -1
  39. package/dist/index.cjs +23 -13
  40. package/dist/index.cjs.map +1 -1
  41. package/dist/index.d.ts +1 -1
  42. package/dist/index.js +23 -13
  43. package/dist/index.js.map +1 -1
  44. package/dist/index13.cjs +54 -35
  45. package/dist/index13.cjs.map +1 -1
  46. package/dist/index13.js +56 -37
  47. package/dist/index13.js.map +1 -1
  48. package/dist/index14.cjs +29 -12
  49. package/dist/index14.cjs.map +1 -1
  50. package/dist/index14.js +30 -13
  51. package/dist/index14.js.map +1 -1
  52. package/dist/index15.cjs +19 -36
  53. package/dist/index15.cjs.map +1 -1
  54. package/dist/index15.js +19 -36
  55. package/dist/index15.js.map +1 -1
  56. package/dist/index16.cjs +47 -24
  57. package/dist/index16.cjs.map +1 -1
  58. package/dist/index16.js +48 -25
  59. package/dist/index16.js.map +1 -1
  60. package/dist/index17.cjs +29 -38
  61. package/dist/index17.cjs.map +1 -1
  62. package/dist/index17.js +29 -38
  63. package/dist/index17.js.map +1 -1
  64. package/dist/index18.cjs +52 -79
  65. package/dist/index18.cjs.map +1 -1
  66. package/dist/index18.js +54 -81
  67. package/dist/index18.js.map +1 -1
  68. package/dist/index19.cjs +45 -104
  69. package/dist/index19.cjs.map +1 -1
  70. package/dist/index19.js +46 -105
  71. package/dist/index19.js.map +1 -1
  72. package/dist/index20.cjs +58 -108
  73. package/dist/index20.cjs.map +1 -1
  74. package/dist/index20.js +60 -110
  75. package/dist/index20.js.map +1 -1
  76. package/dist/index21.cjs +79 -28
  77. package/dist/index21.cjs.map +1 -1
  78. package/dist/index21.js +82 -31
  79. package/dist/index21.js.map +1 -1
  80. package/dist/index22.cjs +106 -32
  81. package/dist/index22.cjs.map +1 -1
  82. package/dist/index22.js +108 -34
  83. package/dist/index22.js.map +1 -1
  84. package/dist/index23.cjs +112 -34
  85. package/dist/index23.cjs.map +1 -1
  86. package/dist/index23.js +115 -37
  87. package/dist/index23.js.map +1 -1
  88. package/dist/index24.cjs +108 -48
  89. package/dist/index24.cjs.map +1 -1
  90. package/dist/index24.js +110 -50
  91. package/dist/index24.js.map +1 -1
  92. package/dist/index25.cjs +59 -16
  93. package/dist/index25.cjs.map +1 -1
  94. package/dist/index25.js +58 -15
  95. package/dist/index25.js.map +1 -1
  96. package/dist/index26.cjs +66 -0
  97. package/dist/index26.cjs.map +1 -0
  98. package/dist/index26.js +66 -0
  99. package/dist/index26.js.map +1 -0
  100. package/dist/index27.cjs +69 -0
  101. package/dist/index27.cjs.map +1 -0
  102. package/dist/index27.js +69 -0
  103. package/dist/index27.js.map +1 -0
  104. package/dist/index28.cjs +65 -0
  105. package/dist/index28.cjs.map +1 -0
  106. package/dist/index28.js +65 -0
  107. package/dist/index28.js.map +1 -0
  108. package/dist/index29.cjs +71 -0
  109. package/dist/index29.cjs.map +1 -0
  110. package/dist/index29.js +71 -0
  111. package/dist/index29.js.map +1 -0
  112. package/dist/index3.cjs +1 -1
  113. package/dist/index3.js +1 -1
  114. package/dist/index30.cjs +18 -0
  115. package/dist/index30.cjs.map +1 -0
  116. package/dist/index30.js +18 -0
  117. package/dist/index30.js.map +1 -0
  118. package/dist/index31.cjs +42 -0
  119. package/dist/index31.cjs.map +1 -0
  120. package/dist/index31.js +42 -0
  121. package/dist/index31.js.map +1 -0
  122. package/dist/index4.cjs +10 -0
  123. package/dist/index4.cjs.map +1 -1
  124. package/dist/index4.js +10 -0
  125. package/dist/index4.js.map +1 -1
  126. package/dist/premium-react-loaders.css +299 -3
  127. package/dist/types/common.d.ts +14 -2
  128. package/dist/types/common.d.ts.map +1 -1
  129. package/dist/types/progress.d.ts +24 -1
  130. package/dist/types/progress.d.ts.map +1 -1
  131. package/dist/types/pulse.d.ts +13 -0
  132. package/dist/types/pulse.d.ts.map +1 -1
  133. package/dist/types/skeleton.d.ts +17 -0
  134. package/dist/types/skeleton.d.ts.map +1 -1
  135. package/dist/types/spinner.d.ts +18 -0
  136. package/dist/types/spinner.d.ts.map +1 -1
  137. package/dist/utils/colors.d.ts +2 -1
  138. package/dist/utils/colors.d.ts.map +1 -1
  139. package/dist/utils/hooks.d.ts +10 -0
  140. package/dist/utils/hooks.d.ts.map +1 -0
  141. package/dist/utils/index.d.ts +1 -0
  142. package/dist/utils/index.d.ts.map +1 -1
  143. package/package.json +1 -1
package/dist/index22.cjs CHANGED
@@ -2,61 +2,135 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
4
  const react = require("react");
5
+ const hooks = require("./index31.cjs");
5
6
  const colors = require("./index4.cjs");
6
7
  const classNames = require("./index3.cjs");
7
- const PulseWave = react.forwardRef(
8
+ const ProgressCircle = react.forwardRef(
8
9
  ({
9
- size = 40,
10
+ value = 0,
11
+ indeterminate = false,
12
+ showValue = false,
13
+ size = "lg",
14
+ thickness = 4,
10
15
  color = "#3b82f6",
11
- barCount = 5,
16
+ secondaryColor = "#e0e0e0",
17
+ buffer,
12
18
  speed = "normal",
19
+ reverse = false,
20
+ respectMotionPreference = true,
13
21
  className,
14
22
  style,
15
- testId = "pulse-wave",
23
+ testId = "progress-circle",
16
24
  visible = true,
17
- ariaLabel = "Loading...",
25
+ ariaLabel,
18
26
  ...rest
19
27
  }, ref) => {
20
28
  if (!visible) return null;
21
- const sizeValue = colors.parseSizeToNumber(size, 40);
22
- const barWidth = Math.floor(sizeValue / (barCount * 2.5));
23
- const animationDuration = colors.getAnimationDuration(speed);
24
- return /* @__PURE__ */ jsxRuntime.jsx(
29
+ const prefersReducedMotion = hooks.useReducedMotion();
30
+ const effectiveDuration = hooks.getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);
31
+ const clampedValue = Math.min(100, Math.max(0, value));
32
+ const clampedBuffer = buffer !== void 0 ? Math.min(100, Math.max(0, buffer)) : void 0;
33
+ const sizeValue = colors.parseSizeToNumber(size, 56);
34
+ const thicknessValue = colors.parseSizeToNumber(thickness, 4);
35
+ const radius = (sizeValue - thicknessValue * 2) / 2;
36
+ const circumference = 2 * Math.PI * radius;
37
+ const strokeDashoffset = circumference - clampedValue / 100 * circumference;
38
+ const bufferDashoffset = clampedBuffer !== void 0 ? circumference - clampedBuffer / 100 * circumference : void 0;
39
+ const progressLabel = ariaLabel || `Loading ${clampedValue}%`;
40
+ return /* @__PURE__ */ jsxRuntime.jsxs(
25
41
  "div",
26
42
  {
27
43
  ref,
28
44
  "data-testid": testId,
29
- className: classNames.cn("inline-flex items-end justify-center gap-1", className),
45
+ className: classNames.cn("inline-flex items-center justify-center relative", className),
30
46
  style: {
47
+ width: colors.normalizeSize(size),
31
48
  height: colors.normalizeSize(size),
32
49
  ...style
33
50
  },
34
- role: "status",
35
- "aria-label": ariaLabel,
36
- "aria-busy": "true",
51
+ role: "progressbar",
52
+ "aria-label": progressLabel,
53
+ "aria-valuenow": indeterminate ? void 0 : clampedValue,
54
+ "aria-valuemin": 0,
55
+ "aria-valuemax": 100,
37
56
  ...rest,
38
- children: Array.from({ length: barCount }).map((_, index) => {
39
- const delay = index / barCount * 0.5;
40
- return /* @__PURE__ */ jsxRuntime.jsx(
41
- "div",
57
+ children: [
58
+ /* @__PURE__ */ jsxRuntime.jsxs(
59
+ "svg",
42
60
  {
43
- className: "rounded-sm",
44
- style: {
45
- width: `${barWidth}px`,
46
- height: "100%",
47
- backgroundColor: color,
48
- animation: `pulse-wave ${animationDuration} ease-in-out infinite`,
49
- animationDelay: `${delay}s`,
50
- transformOrigin: "bottom"
51
- }
52
- },
53
- index
54
- );
55
- })
61
+ className: classNames.cn(indeterminate && "animate-spinner-rotate"),
62
+ width: sizeValue,
63
+ height: sizeValue,
64
+ viewBox: `0 0 ${sizeValue} ${sizeValue}`,
65
+ style: indeterminate ? {
66
+ animation: `spinner-rotate ${effectiveDuration} linear infinite`,
67
+ animationDirection: reverse ? "reverse" : "normal"
68
+ } : void 0,
69
+ children: [
70
+ /* @__PURE__ */ jsxRuntime.jsx(
71
+ "circle",
72
+ {
73
+ cx: sizeValue / 2,
74
+ cy: sizeValue / 2,
75
+ r: radius,
76
+ fill: "none",
77
+ stroke: secondaryColor,
78
+ strokeWidth: thicknessValue
79
+ }
80
+ ),
81
+ bufferDashoffset !== void 0 && !indeterminate && /* @__PURE__ */ jsxRuntime.jsx(
82
+ "circle",
83
+ {
84
+ cx: sizeValue / 2,
85
+ cy: sizeValue / 2,
86
+ r: radius,
87
+ fill: "none",
88
+ stroke: color,
89
+ strokeWidth: thicknessValue,
90
+ strokeLinecap: "round",
91
+ strokeDasharray: circumference,
92
+ strokeDashoffset: bufferDashoffset,
93
+ transform: `rotate(-90 ${sizeValue / 2} ${sizeValue / 2})`,
94
+ opacity: 0.3
95
+ }
96
+ ),
97
+ /* @__PURE__ */ jsxRuntime.jsx(
98
+ "circle",
99
+ {
100
+ cx: sizeValue / 2,
101
+ cy: sizeValue / 2,
102
+ r: radius,
103
+ fill: "none",
104
+ stroke: color,
105
+ strokeWidth: thicknessValue,
106
+ strokeLinecap: "round",
107
+ strokeDasharray: circumference,
108
+ strokeDashoffset: indeterminate ? circumference * 0.75 : strokeDashoffset,
109
+ transform: `rotate(-90 ${sizeValue / 2} ${sizeValue / 2})`,
110
+ style: {
111
+ transition: indeterminate ? "none" : "stroke-dashoffset 0.3s ease-in-out"
112
+ }
113
+ }
114
+ )
115
+ ]
116
+ }
117
+ ),
118
+ showValue && !indeterminate && /* @__PURE__ */ jsxRuntime.jsxs(
119
+ "span",
120
+ {
121
+ className: "absolute text-sm font-medium",
122
+ style: { color },
123
+ children: [
124
+ clampedValue,
125
+ "%"
126
+ ]
127
+ }
128
+ )
129
+ ]
56
130
  }
57
131
  );
58
132
  }
59
133
  );
60
- PulseWave.displayName = "PulseWave";
61
- exports.PulseWave = PulseWave;
134
+ ProgressCircle.displayName = "ProgressCircle";
135
+ exports.ProgressCircle = ProgressCircle;
62
136
  //# sourceMappingURL=index22.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index22.cjs","sources":["../src/components/pulse/PulseWave.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { PulseWaveProps } from '../../types';\nimport { cn, normalizeSize, getAnimationDuration, parseSizeToNumber } from '../../utils';\n\n/**\n * PulseWave - Wave pattern loader\n *\n * A loader with bars that animate in a wave pattern.\n *\n * @example\n * ```tsx\n * <PulseWave size={40} color=\"#3b82f6\" />\n * <PulseWave size={32} barCount={7} speed=\"slow\" />\n * ```\n */\nexport const PulseWave = forwardRef<HTMLDivElement, PulseWaveProps>(\n (\n {\n size = 40,\n color = '#3b82f6',\n barCount = 5,\n speed = 'normal',\n className,\n style,\n testId = 'pulse-wave',\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 barWidth = Math.floor(sizeValue / (barCount * 2.5));\n const animationDuration = getAnimationDuration(speed);\n\n return (\n <div\n ref={ref}\n data-testid={testId}\n className={cn('inline-flex items-end justify-center gap-1', className)}\n style={{\n height: normalizeSize(size),\n ...style,\n }}\n role=\"status\"\n aria-label={ariaLabel}\n aria-busy=\"true\"\n {...rest}\n >\n {Array.from({ length: barCount }).map((_, index) => {\n const delay = (index / barCount) * 0.5;\n\n return (\n <div\n key={index}\n className=\"rounded-sm\"\n style={{\n width: `${barWidth}px`,\n height: '100%',\n backgroundColor: color,\n animation: `pulse-wave ${animationDuration} ease-in-out infinite`,\n animationDelay: `${delay}s`,\n transformOrigin: 'bottom',\n }}\n />\n );\n })}\n </div>\n );\n }\n);\n\nPulseWave.displayName = 'PulseWave';\n"],"names":["forwardRef","parse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"index22.cjs","sources":["../src/components/progress/ProgressCircle.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { ProgressCircleProps } from '../../types';\nimport { cn, normalizeSize, parseSizeToNumber, useReducedMotion, getEffectiveDuration } 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 speed=\"fast\" />\n * <ProgressCircle value={50} buffer={75} />\n * ```\n */\nexport const ProgressCircle = forwardRef<HTMLDivElement, ProgressCircleProps>(\n (\n {\n value = 0,\n indeterminate = false,\n showValue = false,\n size = 'lg',\n thickness = 4,\n color = '#3b82f6',\n secondaryColor = '#e0e0e0',\n buffer,\n speed = 'normal',\n reverse = false,\n respectMotionPreference = true,\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 prefersReducedMotion = useReducedMotion();\n const effectiveDuration = getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);\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 sizeValue = parseSizeToNumber(size, 56);\n const thicknessValue = parseSizeToNumber(thickness, 4);\n const radius = (sizeValue - thicknessValue * 2) / 2;\n const circumference = 2 * Math.PI * radius;\n const strokeDashoffset = circumference - (clampedValue / 100) * circumference;\n const bufferDashoffset = clampedBuffer !== undefined ? circumference - (clampedBuffer / 100) * circumference : undefined;\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 style={indeterminate ? {\n animation: `spinner-rotate ${effectiveDuration} linear infinite`,\n animationDirection: reverse ? 'reverse' : 'normal',\n } : undefined}\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 {/* Buffer circle (behind progress) */}\n {bufferDashoffset !== undefined && !indeterminate && (\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={bufferDashoffset}\n transform={`rotate(-90 ${sizeValue / 2} ${sizeValue / 2})`}\n opacity={0.3}\n />\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","useReducedMotion","getEffectiveDuration","parseSizeToNumber","jsxs","cn","normalizeSize","jsx"],"mappings":";;;;;;;AAiBO,MAAM,iBAAiBA,MAAAA;AAAAA,EAC5B,CACE;AAAA,IACE,QAAQ;AAAA,IACR,gBAAgB;AAAA,IAChB,YAAY;AAAA,IACZ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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;;"}
package/dist/index22.js CHANGED
@@ -1,62 +1,136 @@
1
- import { jsx } from "react/jsx-runtime";
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
- import { normalizeSize, getAnimationDuration, parseSizeToNumber } from "./index4.js";
3
+ import { useReducedMotion, getEffectiveDuration } from "./index31.js";
4
+ import { normalizeSize, parseSizeToNumber } from "./index4.js";
4
5
  import { cn } from "./index3.js";
5
- const PulseWave = forwardRef(
6
+ const ProgressCircle = forwardRef(
6
7
  ({
7
- size = 40,
8
+ value = 0,
9
+ indeterminate = false,
10
+ showValue = false,
11
+ size = "lg",
12
+ thickness = 4,
8
13
  color = "#3b82f6",
9
- barCount = 5,
14
+ secondaryColor = "#e0e0e0",
15
+ buffer,
10
16
  speed = "normal",
17
+ reverse = false,
18
+ respectMotionPreference = true,
11
19
  className,
12
20
  style,
13
- testId = "pulse-wave",
21
+ testId = "progress-circle",
14
22
  visible = true,
15
- ariaLabel = "Loading...",
23
+ ariaLabel,
16
24
  ...rest
17
25
  }, ref) => {
18
26
  if (!visible) return null;
19
- const sizeValue = parseSizeToNumber(size, 40);
20
- const barWidth = Math.floor(sizeValue / (barCount * 2.5));
21
- const animationDuration = getAnimationDuration(speed);
22
- return /* @__PURE__ */ jsx(
27
+ const prefersReducedMotion = useReducedMotion();
28
+ const effectiveDuration = getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);
29
+ const clampedValue = Math.min(100, Math.max(0, value));
30
+ const clampedBuffer = buffer !== void 0 ? Math.min(100, Math.max(0, buffer)) : void 0;
31
+ const sizeValue = parseSizeToNumber(size, 56);
32
+ const thicknessValue = parseSizeToNumber(thickness, 4);
33
+ const radius = (sizeValue - thicknessValue * 2) / 2;
34
+ const circumference = 2 * Math.PI * radius;
35
+ const strokeDashoffset = circumference - clampedValue / 100 * circumference;
36
+ const bufferDashoffset = clampedBuffer !== void 0 ? circumference - clampedBuffer / 100 * circumference : void 0;
37
+ const progressLabel = ariaLabel || `Loading ${clampedValue}%`;
38
+ return /* @__PURE__ */ jsxs(
23
39
  "div",
24
40
  {
25
41
  ref,
26
42
  "data-testid": testId,
27
- className: cn("inline-flex items-end justify-center gap-1", className),
43
+ className: cn("inline-flex items-center justify-center relative", className),
28
44
  style: {
45
+ width: normalizeSize(size),
29
46
  height: normalizeSize(size),
30
47
  ...style
31
48
  },
32
- role: "status",
33
- "aria-label": ariaLabel,
34
- "aria-busy": "true",
49
+ role: "progressbar",
50
+ "aria-label": progressLabel,
51
+ "aria-valuenow": indeterminate ? void 0 : clampedValue,
52
+ "aria-valuemin": 0,
53
+ "aria-valuemax": 100,
35
54
  ...rest,
36
- children: Array.from({ length: barCount }).map((_, index) => {
37
- const delay = index / barCount * 0.5;
38
- return /* @__PURE__ */ jsx(
39
- "div",
55
+ children: [
56
+ /* @__PURE__ */ jsxs(
57
+ "svg",
40
58
  {
41
- className: "rounded-sm",
42
- style: {
43
- width: `${barWidth}px`,
44
- height: "100%",
45
- backgroundColor: color,
46
- animation: `pulse-wave ${animationDuration} ease-in-out infinite`,
47
- animationDelay: `${delay}s`,
48
- transformOrigin: "bottom"
49
- }
50
- },
51
- index
52
- );
53
- })
59
+ className: cn(indeterminate && "animate-spinner-rotate"),
60
+ width: sizeValue,
61
+ height: sizeValue,
62
+ viewBox: `0 0 ${sizeValue} ${sizeValue}`,
63
+ style: indeterminate ? {
64
+ animation: `spinner-rotate ${effectiveDuration} linear infinite`,
65
+ animationDirection: reverse ? "reverse" : "normal"
66
+ } : void 0,
67
+ children: [
68
+ /* @__PURE__ */ jsx(
69
+ "circle",
70
+ {
71
+ cx: sizeValue / 2,
72
+ cy: sizeValue / 2,
73
+ r: radius,
74
+ fill: "none",
75
+ stroke: secondaryColor,
76
+ strokeWidth: thicknessValue
77
+ }
78
+ ),
79
+ bufferDashoffset !== void 0 && !indeterminate && /* @__PURE__ */ jsx(
80
+ "circle",
81
+ {
82
+ cx: sizeValue / 2,
83
+ cy: sizeValue / 2,
84
+ r: radius,
85
+ fill: "none",
86
+ stroke: color,
87
+ strokeWidth: thicknessValue,
88
+ strokeLinecap: "round",
89
+ strokeDasharray: circumference,
90
+ strokeDashoffset: bufferDashoffset,
91
+ transform: `rotate(-90 ${sizeValue / 2} ${sizeValue / 2})`,
92
+ opacity: 0.3
93
+ }
94
+ ),
95
+ /* @__PURE__ */ jsx(
96
+ "circle",
97
+ {
98
+ cx: sizeValue / 2,
99
+ cy: sizeValue / 2,
100
+ r: radius,
101
+ fill: "none",
102
+ stroke: color,
103
+ strokeWidth: thicknessValue,
104
+ strokeLinecap: "round",
105
+ strokeDasharray: circumference,
106
+ strokeDashoffset: indeterminate ? circumference * 0.75 : strokeDashoffset,
107
+ transform: `rotate(-90 ${sizeValue / 2} ${sizeValue / 2})`,
108
+ style: {
109
+ transition: indeterminate ? "none" : "stroke-dashoffset 0.3s ease-in-out"
110
+ }
111
+ }
112
+ )
113
+ ]
114
+ }
115
+ ),
116
+ showValue && !indeterminate && /* @__PURE__ */ jsxs(
117
+ "span",
118
+ {
119
+ className: "absolute text-sm font-medium",
120
+ style: { color },
121
+ children: [
122
+ clampedValue,
123
+ "%"
124
+ ]
125
+ }
126
+ )
127
+ ]
54
128
  }
55
129
  );
56
130
  }
57
131
  );
58
- PulseWave.displayName = "PulseWave";
132
+ ProgressCircle.displayName = "ProgressCircle";
59
133
  export {
60
- PulseWave
134
+ ProgressCircle
61
135
  };
62
136
  //# sourceMappingURL=index22.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index22.js","sources":["../src/components/pulse/PulseWave.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { PulseWaveProps } from '../../types';\nimport { cn, normalizeSize, getAnimationDuration, parseSizeToNumber } from '../../utils';\n\n/**\n * PulseWave - Wave pattern loader\n *\n * A loader with bars that animate in a wave pattern.\n *\n * @example\n * ```tsx\n * <PulseWave size={40} color=\"#3b82f6\" />\n * <PulseWave size={32} barCount={7} speed=\"slow\" />\n * ```\n */\nexport const PulseWave = forwardRef<HTMLDivElement, PulseWaveProps>(\n (\n {\n size = 40,\n color = '#3b82f6',\n barCount = 5,\n speed = 'normal',\n className,\n style,\n testId = 'pulse-wave',\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 barWidth = Math.floor(sizeValue / (barCount * 2.5));\n const animationDuration = getAnimationDuration(speed);\n\n return (\n <div\n ref={ref}\n data-testid={testId}\n className={cn('inline-flex items-end justify-center gap-1', className)}\n style={{\n height: normalizeSize(size),\n ...style,\n }}\n role=\"status\"\n aria-label={ariaLabel}\n aria-busy=\"true\"\n {...rest}\n >\n {Array.from({ length: barCount }).map((_, index) => {\n const delay = (index / barCount) * 0.5;\n\n return (\n <div\n key={index}\n className=\"rounded-sm\"\n style={{\n width: `${barWidth}px`,\n height: '100%',\n backgroundColor: color,\n animation: `pulse-wave ${animationDuration} ease-in-out infinite`,\n animationDelay: `${delay}s`,\n transformOrigin: 'bottom',\n }}\n />\n );\n })}\n </div>\n );\n }\n);\n\nPulseWave.displayName = 'PulseWave';\n"],"names":[],"mappings":";;;;AAeO,MAAM,YAAY;AAAA,EACvB,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,aAAa,WAAW,IAAI;AACxD,UAAM,oBAAoB,qBAAqB,KAAK;AAEpD,WACE;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,eAAa;AAAA,QACb,WAAW,GAAG,8CAA8C,SAAS;AAAA,QACrE,OAAO;AAAA,UACL,QAAQ,cAAc,IAAI;AAAA,UAC1B,GAAG;AAAA,QAAA;AAAA,QAEL,MAAK;AAAA,QACL,cAAY;AAAA,QACZ,aAAU;AAAA,QACT,GAAG;AAAA,QAEH,UAAA,MAAM,KAAK,EAAE,QAAQ,SAAA,CAAU,EAAE,IAAI,CAAC,GAAG,UAAU;AAClD,gBAAM,QAAS,QAAQ,WAAY;AAEnC,iBACE;AAAA,YAAC;AAAA,YAAA;AAAA,cAEC,WAAU;AAAA,cACV,OAAO;AAAA,gBACL,OAAO,GAAG,QAAQ;AAAA,gBAClB,QAAQ;AAAA,gBACR,iBAAiB;AAAA,gBACjB,WAAW,cAAc,iBAAiB;AAAA,gBAC1C,gBAAgB,GAAG,KAAK;AAAA,gBACxB,iBAAiB;AAAA,cAAA;AAAA,YACnB;AAAA,YATK;AAAA,UAAA;AAAA,QAYX,CAAC;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;AAEA,UAAU,cAAc;"}
1
+ {"version":3,"file":"index22.js","sources":["../src/components/progress/ProgressCircle.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { ProgressCircleProps } from '../../types';\nimport { cn, normalizeSize, parseSizeToNumber, useReducedMotion, getEffectiveDuration } 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 speed=\"fast\" />\n * <ProgressCircle value={50} buffer={75} />\n * ```\n */\nexport const ProgressCircle = forwardRef<HTMLDivElement, ProgressCircleProps>(\n (\n {\n value = 0,\n indeterminate = false,\n showValue = false,\n size = 'lg',\n thickness = 4,\n color = '#3b82f6',\n secondaryColor = '#e0e0e0',\n buffer,\n speed = 'normal',\n reverse = false,\n respectMotionPreference = true,\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 prefersReducedMotion = useReducedMotion();\n const effectiveDuration = getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);\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 sizeValue = parseSizeToNumber(size, 56);\n const thicknessValue = parseSizeToNumber(thickness, 4);\n const radius = (sizeValue - thicknessValue * 2) / 2;\n const circumference = 2 * Math.PI * radius;\n const strokeDashoffset = circumference - (clampedValue / 100) * circumference;\n const bufferDashoffset = clampedBuffer !== undefined ? circumference - (clampedBuffer / 100) * circumference : undefined;\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 style={indeterminate ? {\n animation: `spinner-rotate ${effectiveDuration} linear infinite`,\n animationDirection: reverse ? 'reverse' : 'normal',\n } : undefined}\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 {/* Buffer circle (behind progress) */}\n {bufferDashoffset !== undefined && !indeterminate && (\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={bufferDashoffset}\n transform={`rotate(-90 ${sizeValue / 2} ${sizeValue / 2})`}\n opacity={0.3}\n />\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":";;;;;AAiBO,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,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,0BAA0B;AAAA,IAC1B;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT,UAAU;AAAA,IACV;AAAA,IACA,GAAG;AAAA,EAAA,GAEL,QACG;AACH,QAAI,CAAC,QAAS,QAAO;AAErB,UAAM,uBAAuB,iBAAA;AAC7B,UAAM,oBAAoB,qBAAqB,OAAO,yBAAyB,oBAAoB;AAEnG,UAAM,eAAe,KAAK,IAAI,KAAK,KA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BAAA;AAAA,gBAAA;AAAA,gBAGd,qBAAqB,UAAa,CAAC,iBAClC;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;AAAA,oBAClB,WAAW,cAAc,YAAY,CAAC,IAAI,YAAY,CAAC;AAAA,oBACvD,SAAS;AAAA,kBAAA;AAAA,gBAAA;AAAA,gBAIb;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;"}
package/dist/index23.cjs CHANGED
@@ -2,63 +2,141 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
4
  const react = require("react");
5
+ const hooks = require("./index31.cjs");
5
6
  const colors = require("./index4.cjs");
6
7
  const classNames = require("./index3.cjs");
7
- const PulseBars = react.forwardRef(
8
+ const ProgressRing = react.forwardRef(
8
9
  ({
9
- size = 40,
10
+ value = 0,
11
+ indeterminate = false,
12
+ showValue = false,
13
+ size = "lg",
14
+ thickness = 4,
10
15
  color = "#3b82f6",
11
- barCount = 4,
16
+ secondaryColor = "#e0e0e0",
17
+ gradient = false,
18
+ buffer,
12
19
  speed = "normal",
20
+ reverse = false,
21
+ respectMotionPreference = true,
13
22
  className,
14
23
  style,
15
- testId = "pulse-bars",
24
+ testId = "progress-ring",
16
25
  visible = true,
17
- ariaLabel = "Loading...",
26
+ ariaLabel,
18
27
  ...rest
19
28
  }, ref) => {
20
29
  if (!visible) return null;
21
- const sizeValue = colors.parseSizeToNumber(size, 40);
22
- const barWidth = Math.floor(sizeValue / (barCount * 2));
23
- const animationDuration = colors.getAnimationDuration(speed);
24
- return /* @__PURE__ */ jsxRuntime.jsx(
30
+ const prefersReducedMotion = hooks.useReducedMotion();
31
+ const effectiveDuration = hooks.getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);
32
+ const clampedValue = Math.min(100, Math.max(0, value));
33
+ const clampedBuffer = buffer !== void 0 ? Math.min(100, Math.max(0, buffer)) : void 0;
34
+ const sizeValue = colors.parseSizeToNumber(size, 56);
35
+ const thicknessValue = colors.parseSizeToNumber(thickness, 4);
36
+ const radius = (sizeValue - thicknessValue * 2) / 2;
37
+ const circumference = 2 * Math.PI * radius;
38
+ const strokeDashoffset = circumference - clampedValue / 100 * circumference;
39
+ const bufferDashoffset = clampedBuffer !== void 0 ? circumference - clampedBuffer / 100 * circumference : void 0;
40
+ const progressLabel = ariaLabel || `Loading ${clampedValue}%`;
41
+ const gradientId = react.useMemo(() => `progress-gradient-${Math.random().toString(36).substr(2, 9)}`, []);
42
+ return /* @__PURE__ */ jsxRuntime.jsxs(
25
43
  "div",
26
44
  {
27
45
  ref,
28
46
  "data-testid": testId,
29
- className: classNames.cn("inline-flex items-center justify-center gap-1", className),
47
+ className: classNames.cn("inline-flex items-center justify-center relative", className),
30
48
  style: {
49
+ width: colors.normalizeSize(size),
31
50
  height: colors.normalizeSize(size),
32
51
  ...style
33
52
  },
34
- role: "status",
35
- "aria-label": ariaLabel,
36
- "aria-busy": "true",
53
+ role: "progressbar",
54
+ "aria-label": progressLabel,
55
+ "aria-valuenow": indeterminate ? void 0 : clampedValue,
56
+ "aria-valuemin": 0,
57
+ "aria-valuemax": 100,
37
58
  ...rest,
38
- children: Array.from({ length: barCount }).map((_, index) => {
39
- const delays = [0, 0.2, 0.4, 0.1, 0.3, 0.5];
40
- const delay = delays[index % delays.length];
41
- return /* @__PURE__ */ jsxRuntime.jsx(
42
- "div",
59
+ children: [
60
+ /* @__PURE__ */ jsxRuntime.jsxs(
61
+ "svg",
43
62
  {
44
- className: "rounded-sm",
45
- style: {
46
- width: `${barWidth}px`,
47
- minHeight: "30%",
48
- height: "100%",
49
- backgroundColor: color,
50
- animation: `pulse-wave ${animationDuration} ease-in-out infinite`,
51
- animationDelay: `${delay}s`,
52
- transformOrigin: "center"
53
- }
54
- },
55
- index
56
- );
57
- })
63
+ className: classNames.cn(indeterminate && "animate-spinner-rotate"),
64
+ width: sizeValue,
65
+ height: sizeValue,
66
+ viewBox: `0 0 ${sizeValue} ${sizeValue}`,
67
+ style: indeterminate ? {
68
+ animation: `spinner-rotate ${effectiveDuration} linear infinite`,
69
+ animationDirection: reverse ? "reverse" : "normal"
70
+ } : void 0,
71
+ children: [
72
+ gradient && /* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsxs("linearGradient", { id: gradientId, x1: "0%", y1: "0%", x2: "100%", y2: "100%", children: [
73
+ /* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "0%", stopColor: color }),
74
+ /* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "100%", stopColor: secondaryColor === "#e0e0e0" ? "#8b5cf6" : secondaryColor })
75
+ ] }) }),
76
+ /* @__PURE__ */ jsxRuntime.jsx(
77
+ "circle",
78
+ {
79
+ cx: sizeValue / 2,
80
+ cy: sizeValue / 2,
81
+ r: radius,
82
+ fill: "none",
83
+ stroke: gradient ? "#e0e0e0" : secondaryColor,
84
+ strokeWidth: thicknessValue
85
+ }
86
+ ),
87
+ bufferDashoffset !== void 0 && !indeterminate && /* @__PURE__ */ jsxRuntime.jsx(
88
+ "circle",
89
+ {
90
+ cx: sizeValue / 2,
91
+ cy: sizeValue / 2,
92
+ r: radius,
93
+ fill: "none",
94
+ stroke: gradient ? `url(#${gradientId})` : color,
95
+ strokeWidth: thicknessValue,
96
+ strokeLinecap: "round",
97
+ strokeDasharray: circumference,
98
+ strokeDashoffset: bufferDashoffset,
99
+ transform: `rotate(-90 ${sizeValue / 2} ${sizeValue / 2})`,
100
+ opacity: 0.3
101
+ }
102
+ ),
103
+ /* @__PURE__ */ jsxRuntime.jsx(
104
+ "circle",
105
+ {
106
+ cx: sizeValue / 2,
107
+ cy: sizeValue / 2,
108
+ r: radius,
109
+ fill: "none",
110
+ stroke: gradient ? `url(#${gradientId})` : color,
111
+ strokeWidth: thicknessValue,
112
+ strokeLinecap: "round",
113
+ strokeDasharray: circumference,
114
+ strokeDashoffset: indeterminate ? circumference * 0.75 : strokeDashoffset,
115
+ transform: `rotate(-90 ${sizeValue / 2} ${sizeValue / 2})`,
116
+ style: {
117
+ transition: indeterminate ? "none" : "stroke-dashoffset 0.3s ease-in-out"
118
+ }
119
+ }
120
+ )
121
+ ]
122
+ }
123
+ ),
124
+ showValue && !indeterminate && /* @__PURE__ */ jsxRuntime.jsxs(
125
+ "span",
126
+ {
127
+ className: "absolute text-sm font-semibold",
128
+ style: { color },
129
+ children: [
130
+ clampedValue,
131
+ "%"
132
+ ]
133
+ }
134
+ )
135
+ ]
58
136
  }
59
137
  );
60
138
  }
61
139
  );
62
- PulseBars.displayName = "PulseBars";
63
- exports.PulseBars = PulseBars;
140
+ ProgressRing.displayName = "ProgressRing";
141
+ exports.ProgressRing = ProgressRing;
64
142
  //# sourceMappingURL=index23.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index23.cjs","sources":["../src/components/pulse/PulseBars.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { PulseBarsProps } from '../../types';\nimport { cn, normalizeSize, getAnimationDuration, parseSizeToNumber } from '../../utils';\n\n/**\n * PulseBars - Equalizer-style bars loader\n *\n * A loader with bars that pulse like an audio equalizer.\n *\n * @example\n * ```tsx\n * <PulseBars size={40} color=\"#3b82f6\" />\n * <PulseBars size={48} barCount={6} speed=\"fast\" />\n * ```\n */\nexport const PulseBars = forwardRef<HTMLDivElement, PulseBarsProps>(\n (\n {\n size = 40,\n color = '#3b82f6',\n barCount = 4,\n speed = 'normal',\n className,\n style,\n testId = 'pulse-bars',\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 barWidth = Math.floor(sizeValue / (barCount * 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 gap-1', className)}\n style={{\n height: normalizeSize(size),\n ...style,\n }}\n role=\"status\"\n aria-label={ariaLabel}\n aria-busy=\"true\"\n {...rest}\n >\n {Array.from({ length: barCount }).map((_, index) => {\n // Random-looking delays for equalizer effect\n const delays = [0, 0.2, 0.4, 0.1, 0.3, 0.5];\n const delay = delays[index % delays.length];\n\n return (\n <div\n key={index}\n className=\"rounded-sm\"\n style={{\n width: `${barWidth}px`,\n minHeight: '30%',\n height: '100%',\n backgroundColor: color,\n animation: `pulse-wave ${animationDuration} ease-in-out infinite`,\n animationDelay: `${delay}s`,\n transformOrigin: 'center',\n }}\n />\n );\n })}\n </div>\n );\n }\n);\n\nPulseBars.displayName = 'PulseBars';\n"],"names":["forwardRef","parseSizeToNumber","getAnimationDuration","jsx","cn","normalizeSize"],"mappings":";;;;;;AAeO,MAAM,YAAYA,MAAAA;AAAAA,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"version":3,"file":"index23.cjs","sources":["../src/components/progress/ProgressRing.tsx"],"sourcesContent":["import { forwardRef, useMemo } from 'react';\nimport { ProgressRingProps } from '../../types';\nimport { cn, normalizeSize, parseSizeToNumber, useReducedMotion, getEffectiveDuration } from '../../utils';\n\n/**\n * ProgressRing - Ring-style progress with gradient option\n *\n * A circular progress ring with optional gradient colors.\n *\n * @example\n * ```tsx\n * <ProgressRing value={75} showValue />\n * <ProgressRing value={60} gradient secondaryColor=\"#8b5cf6\" />\n * <ProgressRing indeterminate speed=\"fast\" />\n * <ProgressRing value={50} buffer={75} />\n * ```\n */\nexport const ProgressRing = forwardRef<HTMLDivElement, ProgressRingProps>(\n (\n {\n value = 0,\n indeterminate = false,\n showValue = false,\n size = 'lg',\n thickness = 4,\n color = '#3b82f6',\n secondaryColor = '#e0e0e0',\n gradient = false,\n buffer,\n speed = 'normal',\n reverse = false,\n respectMotionPreference = true,\n className,\n style,\n testId = 'progress-ring',\n visible = true,\n ariaLabel,\n ...rest\n },\n ref\n ) => {\n if (!visible) return null;\n\n const prefersReducedMotion = useReducedMotion();\n const effectiveDuration = getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);\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 sizeValue = parseSizeToNumber(size, 56);\n const thicknessValue = parseSizeToNumber(thickness, 4);\n const radius = (sizeValue - thicknessValue * 2) / 2;\n const circumference = 2 * Math.PI * radius;\n const strokeDashoffset = circumference - (clampedValue / 100) * circumference;\n const bufferDashoffset = clampedBuffer !== undefined ? circumference - (clampedBuffer / 100) * circumference : undefined;\n const progressLabel = ariaLabel || `Loading ${clampedValue}%`;\n const gradientId = useMemo(() => `progress-gradient-${Math.random().toString(36).substr(2, 9)}`, []);\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 style={indeterminate ? {\n animation: `spinner-rotate ${effectiveDuration} linear infinite`,\n animationDirection: reverse ? 'reverse' : 'normal',\n } : undefined}\n >\n {gradient && (\n <defs>\n <linearGradient id={gradientId} x1=\"0%\" y1=\"0%\" x2=\"100%\" y2=\"100%\">\n <stop offset=\"0%\" stopColor={color} />\n <stop offset=\"100%\" stopColor={secondaryColor === '#e0e0e0' ? '#8b5cf6' : secondaryColor} />\n </linearGradient>\n </defs>\n )}\n {/* Background circle */}\n <circle\n cx={sizeValue / 2}\n cy={sizeValue / 2}\n r={radius}\n fill=\"none\"\n stroke={gradient ? '#e0e0e0' : secondaryColor}\n strokeWidth={thicknessValue}\n />\n {/* Buffer circle (behind progress) */}\n {bufferDashoffset !== undefined && !indeterminate && (\n <circle\n cx={sizeValue / 2}\n cy={sizeValue / 2}\n r={radius}\n fill=\"none\"\n stroke={gradient ? `url(#${gradientId})` : color}\n strokeWidth={thicknessValue}\n strokeLinecap=\"round\"\n strokeDasharray={circumference}\n strokeDashoffset={bufferDashoffset}\n transform={`rotate(-90 ${sizeValue / 2} ${sizeValue / 2})`}\n opacity={0.3}\n />\n )}\n {/* Progress circle */}\n <circle\n cx={sizeValue / 2}\n cy={sizeValue / 2}\n r={radius}\n fill=\"none\"\n stroke={gradient ? `url(#${gradientId})` : 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-semibold\"\n style={{ color }}\n >\n {clampedValue}%\n </span>\n )}\n </div>\n );\n }\n);\n\nProgressRing.displayName = 'ProgressRing';\n"],"names":["forwardRef","useReducedMotion","getEffectiveDuration","parseSizeToNumber","useMemo","jsxs","cn","normalizeSize","jsx"],"mappings":";;;;;;;AAiBO,MAAM,eAAeA,MAAAA;AAAAA,EAC1B,CACE;AAAA,IACE,QAAQ;AAAA,IACR,gBAAgB;AAAA,IAChB,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,YAAY;AAAA,IACZ,QAAQ;AAAA,IACR,iBAAiB;AAAA,IACjB,WAAW;AAAA,IACX;AAAA,IACA,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,0BAA0B;AAAA,IAC1B;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT,UAAU;AAAA,IACV;AAAA,IACA,GAAG;AAAA,EAAA,GAEL,QACG;AACH,QAAI,CAAC,QAAS,QAAO;AAErB,UAAM,uBAAuBC,MAAAA,iBAAA;AAC7B,UAAM,oBAAoBC,MAAAA,qBAAqB,OAAO,yBAAyB,oBAAoB;AAEnG,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,YAAYC,OAAAA,kBAAkB,MAAM,EAAE;AAC5C,UAAM,iBAAiBA,OAAAA,kBAAkB,WAAW,CAAC;AACrD,UAAM,UAAU,YAAY,iBAAiB,KAAK;AAClD,UAAM,gBAAgB,IAAI,KAAK,KAAK;AACpC,UAAM,mBAAmB,gBAAiB,eAAe,MAAO;AAChE,UAAM,mBAAmB,kBAAkB,SAAY,gBAAiB,gBAAgB,MAAO,gBAAgB;AAC/G,UAAM,gBAAgB,aAAa,WAAW,YAAY;AAC1D,UAAM,aAAaC,MAAAA,QAAQ,MAAM,q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