premium-react-loaders 1.0.1 → 1.1.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 (128) hide show
  1. package/dist/components/progress/ProgressBar.d.ts +2 -0
  2. package/dist/components/progress/ProgressBar.d.ts.map +1 -1
  3. package/dist/components/progress/ProgressCircle.d.ts +2 -1
  4. package/dist/components/progress/ProgressCircle.d.ts.map +1 -1
  5. package/dist/components/progress/ProgressRing.d.ts +2 -1
  6. package/dist/components/progress/ProgressRing.d.ts.map +1 -1
  7. package/dist/components/progress/ProgressSteps.d.ts +16 -0
  8. package/dist/components/progress/ProgressSteps.d.ts.map +1 -0
  9. package/dist/components/progress/index.d.ts +1 -0
  10. package/dist/components/progress/index.d.ts.map +1 -1
  11. package/dist/components/pulse/TypingIndicator.d.ts +16 -0
  12. package/dist/components/pulse/TypingIndicator.d.ts.map +1 -0
  13. package/dist/components/pulse/index.d.ts +1 -0
  14. package/dist/components/pulse/index.d.ts.map +1 -1
  15. package/dist/components/skeleton/SkeletonForm.d.ts +16 -0
  16. package/dist/components/skeleton/SkeletonForm.d.ts.map +1 -0
  17. package/dist/components/skeleton/SkeletonText.d.ts +1 -1
  18. package/dist/components/skeleton/SkeletonText.d.ts.map +1 -1
  19. package/dist/components/skeleton/index.d.ts +1 -0
  20. package/dist/components/skeleton/index.d.ts.map +1 -1
  21. package/dist/components/spinner/SpinnerDots.d.ts.map +1 -1
  22. package/dist/components/spinner/SpinnerPulse.d.ts +15 -0
  23. package/dist/components/spinner/SpinnerPulse.d.ts.map +1 -0
  24. package/dist/components/spinner/SpinnerRing.d.ts +1 -0
  25. package/dist/components/spinner/SpinnerRing.d.ts.map +1 -1
  26. package/dist/components/spinner/SpinnerWave.d.ts +15 -0
  27. package/dist/components/spinner/SpinnerWave.d.ts.map +1 -0
  28. package/dist/components/spinner/index.d.ts +2 -0
  29. package/dist/components/spinner/index.d.ts.map +1 -1
  30. package/dist/index.cjs +23 -13
  31. package/dist/index.cjs.map +1 -1
  32. package/dist/index.d.ts +1 -1
  33. package/dist/index.js +23 -13
  34. package/dist/index.js.map +1 -1
  35. package/dist/index13.cjs +54 -35
  36. package/dist/index13.cjs.map +1 -1
  37. package/dist/index13.js +56 -37
  38. package/dist/index13.js.map +1 -1
  39. package/dist/index14.cjs +23 -11
  40. package/dist/index14.cjs.map +1 -1
  41. package/dist/index14.js +23 -11
  42. package/dist/index14.js.map +1 -1
  43. package/dist/index15.cjs +10 -32
  44. package/dist/index15.cjs.map +1 -1
  45. package/dist/index15.js +10 -32
  46. package/dist/index15.js.map +1 -1
  47. package/dist/index16.cjs +41 -24
  48. package/dist/index16.cjs.map +1 -1
  49. package/dist/index16.js +42 -25
  50. package/dist/index16.js.map +1 -1
  51. package/dist/index17.cjs +24 -37
  52. package/dist/index17.cjs.map +1 -1
  53. package/dist/index17.js +24 -37
  54. package/dist/index17.js.map +1 -1
  55. package/dist/index18.cjs +48 -58
  56. package/dist/index18.cjs.map +1 -1
  57. package/dist/index18.js +49 -59
  58. package/dist/index18.js.map +1 -1
  59. package/dist/index19.cjs +41 -83
  60. package/dist/index19.cjs.map +1 -1
  61. package/dist/index19.js +42 -84
  62. package/dist/index19.js.map +1 -1
  63. package/dist/index20.cjs +54 -87
  64. package/dist/index20.cjs.map +1 -1
  65. package/dist/index20.js +55 -88
  66. package/dist/index20.js.map +1 -1
  67. package/dist/index21.cjs +73 -27
  68. package/dist/index21.cjs.map +1 -1
  69. package/dist/index21.js +76 -30
  70. package/dist/index21.js.map +1 -1
  71. package/dist/index22.cjs +98 -31
  72. package/dist/index22.cjs.map +1 -1
  73. package/dist/index22.js +100 -33
  74. package/dist/index22.js.map +1 -1
  75. package/dist/index23.cjs +104 -33
  76. package/dist/index23.cjs.map +1 -1
  77. package/dist/index23.js +107 -36
  78. package/dist/index23.js.map +1 -1
  79. package/dist/index24.cjs +108 -48
  80. package/dist/index24.cjs.map +1 -1
  81. package/dist/index24.js +110 -50
  82. package/dist/index24.js.map +1 -1
  83. package/dist/index25.cjs +55 -16
  84. package/dist/index25.cjs.map +1 -1
  85. package/dist/index25.js +54 -15
  86. package/dist/index25.js.map +1 -1
  87. package/dist/index26.cjs +62 -0
  88. package/dist/index26.cjs.map +1 -0
  89. package/dist/index26.js +62 -0
  90. package/dist/index26.js.map +1 -0
  91. package/dist/index27.cjs +64 -0
  92. package/dist/index27.cjs.map +1 -0
  93. package/dist/index27.js +64 -0
  94. package/dist/index27.js.map +1 -0
  95. package/dist/index28.cjs +61 -0
  96. package/dist/index28.cjs.map +1 -0
  97. package/dist/index28.js +61 -0
  98. package/dist/index28.js.map +1 -0
  99. package/dist/index29.cjs +71 -0
  100. package/dist/index29.cjs.map +1 -0
  101. package/dist/index29.js +71 -0
  102. package/dist/index29.js.map +1 -0
  103. package/dist/index3.cjs +1 -1
  104. package/dist/index3.js +1 -1
  105. package/dist/index30.cjs +18 -0
  106. package/dist/index30.cjs.map +1 -0
  107. package/dist/index30.js +18 -0
  108. package/dist/index30.js.map +1 -0
  109. package/dist/index4.cjs +63 -3
  110. package/dist/index4.cjs.map +1 -1
  111. package/dist/index4.js +64 -4
  112. package/dist/index4.js.map +1 -1
  113. package/dist/index6.cjs +2 -1
  114. package/dist/index6.cjs.map +1 -1
  115. package/dist/index6.js +2 -1
  116. package/dist/index6.js.map +1 -1
  117. package/dist/premium-react-loaders.css +32 -0
  118. package/dist/types/progress.d.ts +32 -1
  119. package/dist/types/progress.d.ts.map +1 -1
  120. package/dist/types/pulse.d.ts +13 -0
  121. package/dist/types/pulse.d.ts.map +1 -1
  122. package/dist/types/skeleton.d.ts +19 -0
  123. package/dist/types/skeleton.d.ts.map +1 -1
  124. package/dist/types/spinner.d.ts +18 -0
  125. package/dist/types/spinner.d.ts.map +1 -1
  126. package/dist/utils/colors.d.ts +14 -1
  127. package/dist/utils/colors.d.ts.map +1 -1
  128. package/package.json +1 -1
package/dist/index24.js CHANGED
@@ -1,71 +1,131 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- import { forwardRef } from "react";
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { forwardRef, Fragment } from "react";
3
3
  import { cn } from "./index3.js";
4
- const LoaderOverlay = forwardRef(
4
+ const ProgressSteps = forwardRef(
5
5
  ({
6
- loading = false,
7
- loader,
8
- children,
9
- position = "fixed",
10
- backdropOpacity = 0.5,
11
- backdropColor = "#000000",
12
- blur = false,
6
+ steps,
7
+ currentStep,
8
+ labels,
9
+ showNumbers = true,
10
+ orientation = "horizontal",
11
+ connector = "line",
12
+ color = "#3b82f6",
13
+ completedColor,
14
+ activeColor,
15
+ inactiveColor = "#e0e0e0",
13
16
  className,
14
17
  style,
15
- testId = "loader-overlay",
16
- ariaLabel = "Loading content...",
17
- zIndex = 9999,
18
+ testId = "progress-steps",
19
+ visible = true,
20
+ ariaLabel = "Progress steps",
18
21
  ...rest
19
22
  }, ref) => {
20
- const backdropStyles = {
21
- backgroundColor: backdropColor,
22
- opacity: backdropOpacity,
23
- backdropFilter: blur ? "blur(4px)" : void 0,
24
- WebkitBackdropFilter: blur ? "blur(4px)" : void 0
23
+ if (!visible) return null;
24
+ const completed = completedColor || color;
25
+ const active = activeColor || color;
26
+ const getStepStatus = (index) => {
27
+ if (index < currentStep) return "completed";
28
+ if (index === currentStep) return "active";
29
+ return "inactive";
25
30
  };
26
- return /* @__PURE__ */ jsxs(
31
+ const getStepColor = (status) => {
32
+ if (status === "completed") return completed;
33
+ if (status === "active") return active;
34
+ return inactiveColor;
35
+ };
36
+ const getConnectorColor = (index) => {
37
+ return index < currentStep ? completed : inactiveColor;
38
+ };
39
+ const isHorizontal = orientation === "horizontal";
40
+ return /* @__PURE__ */ jsx(
27
41
  "div",
28
42
  {
29
43
  ref,
30
44
  "data-testid": testId,
31
- className: cn("relative", className),
45
+ className: cn(
46
+ "flex",
47
+ isHorizontal ? "flex-row items-center w-full" : "flex-col items-start",
48
+ className
49
+ ),
32
50
  style,
51
+ role: "progressbar",
52
+ "aria-label": ariaLabel,
53
+ "aria-valuenow": currentStep,
54
+ "aria-valuemin": 0,
55
+ "aria-valuemax": steps - 1,
33
56
  ...rest,
34
- children: [
35
- children,
36
- loading && /* @__PURE__ */ jsxs(
37
- "div",
38
- {
39
- className: cn(
40
- "inset-0 flex items-center justify-center",
41
- position === "fixed" ? "fixed" : "absolute"
42
- ),
43
- style: {
44
- zIndex
45
- },
46
- role: "status",
47
- "aria-label": ariaLabel,
48
- "aria-busy": "true",
49
- children: [
50
- /* @__PURE__ */ jsx(
51
- "div",
52
- {
53
- className: "absolute inset-0",
54
- style: backdropStyles,
55
- "aria-hidden": "true"
56
- }
57
+ children: Array.from({ length: steps }).map((_, index) => {
58
+ const status = getStepStatus(index);
59
+ const stepColor = getStepColor(status);
60
+ const showConnector = index < steps - 1 && connector === "line";
61
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
62
+ /* @__PURE__ */ jsxs(
63
+ "div",
64
+ {
65
+ className: cn(
66
+ "flex items-center",
67
+ isHorizontal ? "flex-col" : "flex-row gap-3"
57
68
  ),
58
- /* @__PURE__ */ jsx("div", { className: "relative z-10", children: loader })
59
- ]
60
- }
61
- )
62
- ]
69
+ children: [
70
+ /* @__PURE__ */ jsx(
71
+ "div",
72
+ {
73
+ className: "rounded-full flex items-center justify-center font-medium text-sm transition-colors",
74
+ style: {
75
+ width: "2rem",
76
+ height: "2rem",
77
+ backgroundColor: stepColor,
78
+ color: "#ffffff"
79
+ },
80
+ children: showNumbers && /* @__PURE__ */ jsx("span", { children: index + 1 })
81
+ }
82
+ ),
83
+ (labels == null ? void 0 : labels[index]) && /* @__PURE__ */ jsx(
84
+ "span",
85
+ {
86
+ className: cn(
87
+ "text-xs mt-1 transition-colors",
88
+ isHorizontal ? "text-center" : "text-left"
89
+ ),
90
+ style: {
91
+ color: status === "inactive" ? "#9ca3af" : "#374151",
92
+ maxWidth: isHorizontal ? "80px" : "none"
93
+ },
94
+ children: labels[index]
95
+ }
96
+ )
97
+ ]
98
+ }
99
+ ),
100
+ showConnector && /* @__PURE__ */ jsx(
101
+ "div",
102
+ {
103
+ className: "transition-colors",
104
+ style: {
105
+ backgroundColor: getConnectorColor(index),
106
+ ...isHorizontal ? {
107
+ height: "2px",
108
+ flex: 1,
109
+ marginLeft: "4px",
110
+ marginRight: "4px"
111
+ } : {
112
+ width: "2px",
113
+ height: "32px",
114
+ marginLeft: "15px",
115
+ marginTop: (labels == null ? void 0 : labels[index]) ? "4px" : "0",
116
+ marginBottom: "4px"
117
+ }
118
+ }
119
+ }
120
+ )
121
+ ] }, index);
122
+ })
63
123
  }
64
124
  );
65
125
  }
66
126
  );
67
- LoaderOverlay.displayName = "LoaderOverlay";
127
+ ProgressSteps.displayName = "ProgressSteps";
68
128
  export {
69
- LoaderOverlay
129
+ ProgressSteps
70
130
  };
71
131
  //# sourceMappingURL=index24.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index24.js","sources":["../src/components/overlay/LoaderOverlay.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { LoaderOverlayProps } from '../../types';\nimport { cn } from '../../utils';\n\n/**\n * LoaderOverlay - Overlay wrapper for displaying loaders over content\n *\n * A flexible overlay component that displays a loader over content during loading states.\n * Supports both full-screen and container-relative positioning.\n *\n * @example\n * ```tsx\n * // Full screen overlay\n * <LoaderOverlay loading={isLoading} loader={<SpinnerCircle />}>\n * <YourContent />\n * </LoaderOverlay>\n *\n * // Container overlay with custom backdrop\n * <LoaderOverlay\n * loading={isLoading}\n * loader={<SpinnerRing />}\n * position=\"absolute\"\n * backdropOpacity={0.7}\n * blur\n * >\n * <YourContent />\n * </LoaderOverlay>\n * ```\n */\nexport const LoaderOverlay = forwardRef<HTMLDivElement, LoaderOverlayProps>(\n (\n {\n loading = false,\n loader,\n children,\n position = 'fixed',\n backdropOpacity = 0.5,\n backdropColor = '#000000',\n blur = false,\n className,\n style,\n testId = 'loader-overlay',\n ariaLabel = 'Loading content...',\n zIndex = 9999,\n ...rest\n },\n ref\n ) => {\n const backdropStyles = {\n backgroundColor: backdropColor,\n opacity: backdropOpacity,\n backdropFilter: blur ? 'blur(4px)' : undefined,\n WebkitBackdropFilter: blur ? 'blur(4px)' : undefined,\n };\n\n return (\n <div\n ref={ref}\n data-testid={testId}\n className={cn('relative', className)}\n style={style}\n {...rest}\n >\n {children}\n\n {loading && (\n <div\n className={cn(\n 'inset-0 flex items-center justify-center',\n position === 'fixed' ? 'fixed' : 'absolute'\n )}\n style={{\n zIndex,\n }}\n role=\"status\"\n aria-label={ariaLabel}\n aria-busy=\"true\"\n >\n {/* Backdrop */}\n <div\n className=\"absolute inset-0\"\n style={backdropStyles}\n aria-hidden=\"true\"\n />\n\n {/* Loader */}\n <div className=\"relative z-10\">{loader}</div>\n </div>\n )}\n </div>\n );\n }\n);\n\nLoaderOverlay.displayName = 'LoaderOverlay';\n"],"names":[],"mappings":";;;AA6BO,MAAM,gBAAgB;AAAA,EAC3B,CACE;AAAA,IACE,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA,WAAW;AAAA,IACX,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,IAChB,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,SAAS;AAAA,IACT,GAAG;AAAA,EAAA,GAEL,QACG;AACH,UAAM,iBAAiB;AAAA,MACrB,iBAAiB;AAAA,MACjB,SAAS;AAAA,MACT,gBAAgB,OAAO,cAAc;AAAA,MACrC,sBAAsB,OAAO,cAAc;AAAA,IAAA;AAG7C,WACE;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,eAAa;AAAA,QACb,WAAW,GAAG,YAAY,SAAS;AAAA,QACnC;AAAA,QACC,GAAG;AAAA,QAEH,UAAA;AAAA,UAAA;AAAA,UAEA,WACC;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAW;AAAA,gBACT;AAAA,gBACA,aAAa,UAAU,UAAU;AAAA,cAAA;AAAA,cAEnC,OAAO;AAAA,gBACL;AAAA,cAAA;AAAA,cAEF,MAAK;AAAA,cACL,cAAY;AAAA,cACZ,aAAU;AAAA,cAGV,UAAA;AAAA,gBAAA;AAAA,kBAAC;AAAA,kBAAA;AAAA,oBACC,WAAU;AAAA,oBACV,OAAO;AAAA,oBACP,eAAY;AAAA,kBAAA;AAAA,gBAAA;AAAA,gBAId,oBAAC,OAAA,EAAI,WAAU,iBAAiB,UAAA,OAAA,CAAO;AAAA,cAAA;AAAA,YAAA;AAAA,UAAA;AAAA,QACzC;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEA,cAAc,cAAc;"}
1
+ {"version":3,"file":"index24.js","sources":["../src/components/progress/ProgressSteps.tsx"],"sourcesContent":["import { forwardRef, Fragment } from 'react';\nimport { ProgressStepsProps } from '../../types';\nimport { cn } from '../../utils';\n\n/**\n * ProgressSteps - Multi-step progress indicator\n *\n * A step-by-step progress indicator for wizards, forms, and workflows.\n *\n * @example\n * ```tsx\n * <ProgressSteps steps={4} currentStep={1} />\n * <ProgressSteps steps={5} currentStep={2} labels={['Info', 'Review', 'Payment', 'Confirm', 'Done']} />\n * <ProgressSteps steps={3} currentStep={1} orientation=\"vertical\" />\n * <ProgressSteps steps={4} currentStep={2} connector=\"none\" />\n * ```\n */\nexport const ProgressSteps = forwardRef<HTMLDivElement, ProgressStepsProps>(\n (\n {\n steps,\n currentStep,\n labels,\n showNumbers = true,\n orientation = 'horizontal',\n connector = 'line',\n color = '#3b82f6',\n completedColor,\n activeColor,\n inactiveColor = '#e0e0e0',\n className,\n style,\n testId = 'progress-steps',\n visible = true,\n ariaLabel = 'Progress steps',\n ...rest\n },\n ref\n ) => {\n if (!visible) return null;\n\n const completed = completedColor || color;\n const active = activeColor || color;\n\n const getStepStatus = (index: number): 'completed' | 'active' | 'inactive' => {\n if (index < currentStep) return 'completed';\n if (index === currentStep) return 'active';\n return 'inactive';\n };\n\n const getStepColor = (status: 'completed' | 'active' | 'inactive'): string => {\n if (status === 'completed') return completed;\n if (status === 'active') return active;\n return inactiveColor;\n };\n\n const getConnectorColor = (index: number): string => {\n return index < currentStep ? completed : inactiveColor;\n };\n\n const isHorizontal = orientation === 'horizontal';\n\n return (\n <div\n ref={ref}\n data-testid={testId}\n className={cn(\n 'flex',\n isHorizontal ? 'flex-row items-center w-full' : 'flex-col items-start',\n className\n )}\n style={style}\n role=\"progressbar\"\n aria-label={ariaLabel}\n aria-valuenow={currentStep}\n aria-valuemin={0}\n aria-valuemax={steps - 1}\n {...rest}\n >\n {Array.from({ length: steps }).map((_, index) => {\n const status = getStepStatus(index);\n const stepColor = getStepColor(status);\n const showConnector = index < steps - 1 && connector === 'line';\n\n return (\n <Fragment key={index}>\n {/* Step */}\n <div\n className={cn(\n 'flex items-center',\n isHorizontal ? 'flex-col' : 'flex-row gap-3'\n )}\n >\n {/* Step Circle */}\n <div\n className=\"rounded-full flex items-center justify-center font-medium text-sm transition-colors\"\n style={{\n width: '2rem',\n height: '2rem',\n backgroundColor: stepColor,\n color: '#ffffff',\n }}\n >\n {showNumbers && <span>{index + 1}</span>}\n </div>\n\n {/* Step Label */}\n {labels?.[index] && (\n <span\n className={cn(\n 'text-xs mt-1 transition-colors',\n isHorizontal ? 'text-center' : 'text-left'\n )}\n style={{\n color: status === 'inactive' ? '#9ca3af' : '#374151',\n maxWidth: isHorizontal ? '80px' : 'none',\n }}\n >\n {labels[index]}\n </span>\n )}\n </div>\n\n {/* Connector */}\n {showConnector && (\n <div\n className=\"transition-colors\"\n style={{\n backgroundColor: getConnectorColor(index),\n ...(isHorizontal\n ? {\n height: '2px',\n flex: 1,\n marginLeft: '4px',\n marginRight: '4px',\n }\n : {\n width: '2px',\n height: '32px',\n marginLeft: '15px',\n marginTop: labels?.[index] ? '4px' : '0',\n marginBottom: '4px',\n }),\n }}\n />\n )}\n </Fragment>\n );\n })}\n </div>\n );\n }\n);\n\nProgressSteps.displayName = 'ProgressSteps';\n"],"names":[],"mappings":";;;AAiBO,MAAM,gBAAgB;AAAA,EAC3B,CACE;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA,cAAc;AAAA,IACd,cAAc;AAAA,IACd,YAAY;AAAA,IACZ,QAAQ;AAAA,IACR;AAAA,IACA;AAAA,IACA,gBAAgB;AAAA,IAChB;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;AACpC,UAAM,SAAS,eAAe;AAE9B,UAAM,gBAAgB,CAAC,UAAuD;AAC5E,UAAI,QAAQ,YAAa,QAAO;AAChC,UAAI,UAAU,YAAa,QAAO;AAClC,aAAO;AAAA,IACT;AAEA,UAAM,eAAe,CAAC,WAAwD;AAC5E,UAAI,WAAW,YAAa,QAAO;AACnC,UAAI,WAAW,SAAU,QAAO;AAChC,aAAO;AAAA,IACT;AAEA,UAAM,oBAAoB,CAAC,UAA0B;AACnD,aAAO,QAAQ,cAAc,YAAY;AAAA,IAC3C;AAEA,UAAM,eAAe,gBAAgB;AAErC,WACE;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,eAAa;AAAA,QACb,WAAW;AAAA,UACT;AAAA,UACA,eAAe,iCAAiC;AAAA,UAChD;AAAA,QAAA;AAAA,QAEF;AAAA,QACA,MAAK;AAAA,QACL,cAAY;AAAA,QACZ,iBAAe;AAAA,QACf,iBAAe;AAAA,QACf,iBAAe,QAAQ;AAAA,QACtB,GAAG;AAAA,QAEH,UAAA,MAAM,KAAK,EAAE,QAAQ,MAAA,CAAO,EAAE,IAAI,CAAC,GAAG,UAAU;AAC/C,gBAAM,SAAS,cAAc,KAAK;AAClC,gBAAM,YAAY,aAAa,MAAM;AACrC,gBAAM,gBAAgB,QAAQ,QAAQ,KAAK,cAAc;AAEzD,sCACG,UAAA,EAEC,UAAA;AAAA,YAAA;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,WAAW;AAAA,kBACT;AAAA,kBACA,eAAe,aAAa;AAAA,gBAAA;AAAA,gBAI9B,UAAA;AAAA,kBAAA;AAAA,oBAAC;AAAA,oBAAA;AAAA,sBACC,WAAU;AAAA,sBACV,OAAO;AAAA,wBACL,OAAO;AAAA,wBACP,QAAQ;AAAA,wBACR,iBAAiB;AAAA,wBACjB,OAAO;AAAA,sBAAA;AAAA,sBAGR,UAAA,eAAe,oBAAC,QAAA,EAAM,UAAA,QAAQ,EAAA,CAAE;AAAA,oBAAA;AAAA,kBAAA;AAAA,mBAIlC,iCAAS,WACR;AAAA,oBAAC;AAAA,oBAAA;AAAA,sBACC,WAAW;AAAA,wBACT;AAAA,wBACA,eAAe,gBAAgB;AAAA,sBAAA;AAAA,sBAEjC,OAAO;AAAA,wBACL,OAAO,WAAW,aAAa,YAAY;AAAA,wBAC3C,UAAU,eAAe,SAAS;AAAA,sBAAA;AAAA,sBAGnC,iBAAO,KAAK;AAAA,oBAAA;AAAA,kBAAA;AAAA,gBACf;AAAA,cAAA;AAAA,YAAA;AAAA,YAKH,iBACC;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,WAAU;AAAA,gBACV,OAAO;AAAA,kBACL,iBAAiB,kBAAkB,KAAK;AAAA,kBACxC,GAAI,eACA;AAAA,oBACE,QAAQ;AAAA,oBACR,MAAM;AAAA,oBACN,YAAY;AAAA,oBACZ,aAAa;AAAA,kBAAA,IAEf;AAAA,oBACE,OAAO;AAAA,oBACP,QAAQ;AAAA,oBACR,YAAY;AAAA,oBACZ,YAAW,iCAAS,UAAS,QAAQ;AAAA,oBACrC,cAAc;AAAA,kBAAA;AAAA,gBAChB;AAAA,cACN;AAAA,YAAA;AAAA,UACF,EAAA,GA3DW,KA6Df;AAAA,QAEJ,CAAC;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;AAEA,cAAc,cAAc;"}
package/dist/index25.cjs CHANGED
@@ -1,18 +1,57 @@
1
1
  "use strict";
2
- Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- function r(e) {
4
- var t, f, n = "";
5
- if ("string" == typeof e || "number" == typeof e) n += e;
6
- else if ("object" == typeof e) if (Array.isArray(e)) {
7
- var o = e.length;
8
- for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
9
- } else for (f in e) e[f] && (n && (n += " "), n += f);
10
- return n;
11
- }
12
- function clsx() {
13
- for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
14
- return n;
15
- }
16
- exports.clsx = clsx;
17
- exports.default = clsx;
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ const react = require("react");
5
+ const colors = require("./index4.cjs");
6
+ const classNames = require("./index3.cjs");
7
+ const PulseDots = react.forwardRef(
8
+ ({
9
+ size = 40,
10
+ color = "#3b82f6",
11
+ dotCount = 3,
12
+ dotSize = 10,
13
+ speed = "normal",
14
+ className,
15
+ style,
16
+ testId = "pulse-dots",
17
+ visible = true,
18
+ ariaLabel = "Loading...",
19
+ ...rest
20
+ }, ref) => {
21
+ if (!visible) return null;
22
+ const animationDuration = colors.getAnimationDuration(speed);
23
+ return /* @__PURE__ */ jsxRuntime.jsx(
24
+ "div",
25
+ {
26
+ ref,
27
+ "data-testid": testId,
28
+ className: classNames.cn("inline-flex items-center justify-center gap-2", className),
29
+ style: {
30
+ height: colors.normalizeSize(size),
31
+ ...style
32
+ },
33
+ role: "status",
34
+ "aria-label": ariaLabel,
35
+ "aria-busy": "true",
36
+ ...rest,
37
+ children: Array.from({ length: dotCount }).map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(
38
+ "div",
39
+ {
40
+ className: "rounded-full",
41
+ style: {
42
+ width: colors.normalizeSize(dotSize),
43
+ height: colors.normalizeSize(dotSize),
44
+ backgroundColor: color,
45
+ animation: `pulse-bounce ${animationDuration} ease-in-out infinite`,
46
+ animationDelay: `${index * 0.15}s`
47
+ }
48
+ },
49
+ index
50
+ ))
51
+ }
52
+ );
53
+ }
54
+ );
55
+ PulseDots.displayName = "PulseDots";
56
+ exports.PulseDots = PulseDots;
18
57
  //# sourceMappingURL=index25.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index25.cjs","sources":["../node_modules/clsx/dist/clsx.mjs"],"sourcesContent":["function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;"],"names":[],"mappings":";;AAAA,SAAS,EAAE,GAAE;AAAC,MAAI,GAAE,GAAE,IAAE;AAAG,MAAG,YAAU,OAAO,KAAG,YAAU,OAAO,EAAE,MAAG;AAAA,WAAU,YAAU,OAAO,EAAE,KAAG,MAAM,QAAQ,CAAC,GAAE;AAAC,QAAI,IAAE,EAAE;AAAO,SAAI,IAAE,GAAE,IAAE,GAAE,IAAI,GAAE,CAAC,MAAI,IAAE,EAAE,EAAE,CAAC,CAAC,OAAK,MAAI,KAAG,MAAK,KAAG;AAAA,EAAE,MAAM,MAAI,KAAK,EAAE,GAAE,CAAC,MAAI,MAAI,KAAG,MAAK,KAAG;AAAG,SAAO;AAAC;AAAQ,SAAS,OAAM;AAAC,WAAQ,GAAE,GAAE,IAAE,GAAE,IAAE,IAAG,IAAE,UAAU,QAAO,IAAE,GAAE,IAAI,EAAC,IAAE,UAAU,CAAC,OAAK,IAAE,EAAE,CAAC,OAAK,MAAI,KAAG,MAAK,KAAG;AAAG,SAAO;AAAC;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index25.cjs","sources":["../src/components/pulse/PulseDots.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { PulseDotsProps } from '../../types';\nimport { cn, normalizeSize, getAnimationDuration } from '../../utils';\n\n/**\n * PulseDots - Bouncing dots loader\n *\n * A loader with bouncing dots that scale and fade in a sequence.\n *\n * @example\n * ```tsx\n * <PulseDots size={40} color=\"#3b82f6\" />\n * <PulseDots size={32} dotCount={5} speed=\"fast\" />\n * ```\n */\nexport const PulseDots = forwardRef<HTMLDivElement, PulseDotsProps>(\n (\n {\n size = 40,\n color = '#3b82f6',\n dotCount = 3,\n dotSize = 10,\n speed = 'normal',\n className,\n style,\n testId = 'pulse-dots',\n visible = true,\n ariaLabel = 'Loading...',\n ...rest\n },\n ref\n ) => {\n if (!visible) return null;\n\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-2', 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: dotCount }).map((_, index) => (\n <div\n key={index}\n className=\"rounded-full\"\n style={{\n width: normalizeSize(dotSize),\n height: normalizeSize(dotSize),\n backgroundColor: color,\n animation: `pulse-bounce ${animationDuration} ease-in-out infinite`,\n animationDelay: `${index * 0.15}s`,\n }}\n />\n ))}\n </div>\n );\n }\n);\n\nPulseDots.displayName = 'PulseDots';\n"],"names":["forwardRef","getAnimationDuration","jsx","cn","normalizeSize"],"mappings":";;;;;;AAeO,MAAM,YAAYA,MAAAA;AAAAA,EACvB,CACE;AAAA,IACE,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,UAAU;AAAA,IACV,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,oBAAoBC,OAAAA,qBAAqB,KAAK;AAEpD,WACEC,2BAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,eAAa;AAAA,QACb,WAAWC,WAAAA,GAAG,iDAAiD,SAAS;AAAA,QACxE,OAAO;AAAA,UACL,QAAQC,OAAAA,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,UAAU,EAAE,IAAI,CAAC,GAAG,UACxCF,2BAAAA;AAAAA,UAAC;AAAA,UAAA;AAAA,YAEC,WAAU;AAAA,YACV,OAAO;AAAA,cACL,OAAOE,OAAAA,cAAc,OAAO;AAAA,cAC5B,QAAQA,OAAAA,cAAc,OAAO;AAAA,cAC7B,iBAAiB;AAAA,cACjB,WAAW,gBAAgB,iBAAiB;AAAA,cAC5C,gBAAgB,GAAG,QAAQ,IAAI;AAAA,YAAA;AAAA,UACjC;AAAA,UARK;AAAA,QAAA,CAUR;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;AAEA,UAAU,cAAc;;"}
package/dist/index25.js CHANGED
@@ -1,18 +1,57 @@
1
- function r(e) {
2
- var t, f, n = "";
3
- if ("string" == typeof e || "number" == typeof e) n += e;
4
- else if ("object" == typeof e) if (Array.isArray(e)) {
5
- var o = e.length;
6
- for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
7
- } else for (f in e) e[f] && (n && (n += " "), n += f);
8
- return n;
9
- }
10
- function clsx() {
11
- for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
12
- return n;
13
- }
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import { normalizeSize, getAnimationDuration } from "./index4.js";
4
+ import { cn } from "./index3.js";
5
+ const PulseDots = forwardRef(
6
+ ({
7
+ size = 40,
8
+ color = "#3b82f6",
9
+ dotCount = 3,
10
+ dotSize = 10,
11
+ speed = "normal",
12
+ className,
13
+ style,
14
+ testId = "pulse-dots",
15
+ visible = true,
16
+ ariaLabel = "Loading...",
17
+ ...rest
18
+ }, ref) => {
19
+ if (!visible) return null;
20
+ const animationDuration = getAnimationDuration(speed);
21
+ return /* @__PURE__ */ jsx(
22
+ "div",
23
+ {
24
+ ref,
25
+ "data-testid": testId,
26
+ className: cn("inline-flex items-center justify-center gap-2", className),
27
+ style: {
28
+ height: normalizeSize(size),
29
+ ...style
30
+ },
31
+ role: "status",
32
+ "aria-label": ariaLabel,
33
+ "aria-busy": "true",
34
+ ...rest,
35
+ children: Array.from({ length: dotCount }).map((_, index) => /* @__PURE__ */ jsx(
36
+ "div",
37
+ {
38
+ className: "rounded-full",
39
+ style: {
40
+ width: normalizeSize(dotSize),
41
+ height: normalizeSize(dotSize),
42
+ backgroundColor: color,
43
+ animation: `pulse-bounce ${animationDuration} ease-in-out infinite`,
44
+ animationDelay: `${index * 0.15}s`
45
+ }
46
+ },
47
+ index
48
+ ))
49
+ }
50
+ );
51
+ }
52
+ );
53
+ PulseDots.displayName = "PulseDots";
14
54
  export {
15
- clsx,
16
- clsx as default
55
+ PulseDots
17
56
  };
18
57
  //# sourceMappingURL=index25.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index25.js","sources":["../node_modules/clsx/dist/clsx.mjs"],"sourcesContent":["function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;"],"names":[],"mappings":"AAAA,SAAS,EAAE,GAAE;AAAC,MAAI,GAAE,GAAE,IAAE;AAAG,MAAG,YAAU,OAAO,KAAG,YAAU,OAAO,EAAE,MAAG;AAAA,WAAU,YAAU,OAAO,EAAE,KAAG,MAAM,QAAQ,CAAC,GAAE;AAAC,QAAI,IAAE,EAAE;AAAO,SAAI,IAAE,GAAE,IAAE,GAAE,IAAI,GAAE,CAAC,MAAI,IAAE,EAAE,EAAE,CAAC,CAAC,OAAK,MAAI,KAAG,MAAK,KAAG;AAAA,EAAE,MAAM,MAAI,KAAK,EAAE,GAAE,CAAC,MAAI,MAAI,KAAG,MAAK,KAAG;AAAG,SAAO;AAAC;AAAQ,SAAS,OAAM;AAAC,WAAQ,GAAE,GAAE,IAAE,GAAE,IAAE,IAAG,IAAE,UAAU,QAAO,IAAE,GAAE,IAAI,EAAC,IAAE,UAAU,CAAC,OAAK,IAAE,EAAE,CAAC,OAAK,MAAI,KAAG,MAAK,KAAG;AAAG,SAAO;AAAC;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index25.js","sources":["../src/components/pulse/PulseDots.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { PulseDotsProps } from '../../types';\nimport { cn, normalizeSize, getAnimationDuration } from '../../utils';\n\n/**\n * PulseDots - Bouncing dots loader\n *\n * A loader with bouncing dots that scale and fade in a sequence.\n *\n * @example\n * ```tsx\n * <PulseDots size={40} color=\"#3b82f6\" />\n * <PulseDots size={32} dotCount={5} speed=\"fast\" />\n * ```\n */\nexport const PulseDots = forwardRef<HTMLDivElement, PulseDotsProps>(\n (\n {\n size = 40,\n color = '#3b82f6',\n dotCount = 3,\n dotSize = 10,\n speed = 'normal',\n className,\n style,\n testId = 'pulse-dots',\n visible = true,\n ariaLabel = 'Loading...',\n ...rest\n },\n ref\n ) => {\n if (!visible) return null;\n\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-2', 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: dotCount }).map((_, index) => (\n <div\n key={index}\n className=\"rounded-full\"\n style={{\n width: normalizeSize(dotSize),\n height: normalizeSize(dotSize),\n backgroundColor: color,\n animation: `pulse-bounce ${animationDuration} ease-in-out infinite`,\n animationDelay: `${index * 0.15}s`,\n }}\n />\n ))}\n </div>\n );\n }\n);\n\nPulseDots.displayName = 'PulseDots';\n"],"names":[],"mappings":";;;;AAeO,MAAM,YAAY;AAAA,EACvB,CACE;AAAA,IACE,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,UAAU;AAAA,IACV,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,oBAAoB,qBAAqB,KAAK;AAEpD,WACE;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,eAAa;AAAA,QACb,WAAW,GAAG,iDAAiD,SAAS;AAAA,QACxE,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,UAAU,EAAE,IAAI,CAAC,GAAG,UACxC;AAAA,UAAC;AAAA,UAAA;AAAA,YAEC,WAAU;AAAA,YACV,OAAO;AAAA,cACL,OAAO,cAAc,OAAO;AAAA,cAC5B,QAAQ,cAAc,OAAO;AAAA,cAC7B,iBAAiB;AAAA,cACjB,WAAW,gBAAgB,iBAAiB;AAAA,cAC5C,gBAAgB,GAAG,QAAQ,IAAI;AAAA,YAAA;AAAA,UACjC;AAAA,UARK;AAAA,QAAA,CAUR;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;AAEA,UAAU,cAAc;"}
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ const react = require("react");
5
+ const colors = require("./index4.cjs");
6
+ const classNames = require("./index3.cjs");
7
+ const PulseWave = react.forwardRef(
8
+ ({
9
+ size = 40,
10
+ color = "#3b82f6",
11
+ barCount = 5,
12
+ speed = "normal",
13
+ className,
14
+ style,
15
+ testId = "pulse-wave",
16
+ visible = true,
17
+ ariaLabel = "Loading...",
18
+ ...rest
19
+ }, ref) => {
20
+ 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(
25
+ "div",
26
+ {
27
+ ref,
28
+ "data-testid": testId,
29
+ className: classNames.cn("inline-flex items-end justify-center gap-1", className),
30
+ style: {
31
+ height: colors.normalizeSize(size),
32
+ ...style
33
+ },
34
+ role: "status",
35
+ "aria-label": ariaLabel,
36
+ "aria-busy": "true",
37
+ ...rest,
38
+ children: Array.from({ length: barCount }).map((_, index) => {
39
+ const delay = index / barCount * 0.5;
40
+ return /* @__PURE__ */ jsxRuntime.jsx(
41
+ "div",
42
+ {
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
+ })
56
+ }
57
+ );
58
+ }
59
+ );
60
+ PulseWave.displayName = "PulseWave";
61
+ exports.PulseWave = PulseWave;
62
+ //# sourceMappingURL=index26.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index26.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","parseSizeToNumber","getAnimationDuration","jsx","cn","normalizeSize"],"mappings":";;;;;;AAeO,MAAM,YAAYA,MAAAA;AAAAA,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,YAAYC,OAAAA,kBAAkB,MAAM,EAAE;AAC5C,UAAM,WAAW,KAAK,MAAM,aAAa,WAAW,IAAI;AACxD,UAAM,oBAAoBC,OAAAA,qBAAqB,KAAK;AAEpD,WACEC,2BAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,eAAa;AAAA,QACb,WAAWC,WAAAA,GAAG,8CAA8C,SAAS;AAAA,QACrE,OAAO;AAAA,UACL,QAAQC,OAAAA,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,iBACEF,2BAAAA;AAAAA,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;;"}
@@ -0,0 +1,62 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import { normalizeSize, getAnimationDuration, parseSizeToNumber } from "./index4.js";
4
+ import { cn } from "./index3.js";
5
+ const PulseWave = forwardRef(
6
+ ({
7
+ size = 40,
8
+ color = "#3b82f6",
9
+ barCount = 5,
10
+ speed = "normal",
11
+ className,
12
+ style,
13
+ testId = "pulse-wave",
14
+ visible = true,
15
+ ariaLabel = "Loading...",
16
+ ...rest
17
+ }, ref) => {
18
+ 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(
23
+ "div",
24
+ {
25
+ ref,
26
+ "data-testid": testId,
27
+ className: cn("inline-flex items-end justify-center gap-1", className),
28
+ style: {
29
+ height: normalizeSize(size),
30
+ ...style
31
+ },
32
+ role: "status",
33
+ "aria-label": ariaLabel,
34
+ "aria-busy": "true",
35
+ ...rest,
36
+ children: Array.from({ length: barCount }).map((_, index) => {
37
+ const delay = index / barCount * 0.5;
38
+ return /* @__PURE__ */ jsx(
39
+ "div",
40
+ {
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
+ })
54
+ }
55
+ );
56
+ }
57
+ );
58
+ PulseWave.displayName = "PulseWave";
59
+ export {
60
+ PulseWave
61
+ };
62
+ //# sourceMappingURL=index26.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index26.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;"}
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ const react = require("react");
5
+ const colors = require("./index4.cjs");
6
+ const classNames = require("./index3.cjs");
7
+ const PulseBars = react.forwardRef(
8
+ ({
9
+ size = 40,
10
+ color = "#3b82f6",
11
+ barCount = 4,
12
+ speed = "normal",
13
+ className,
14
+ style,
15
+ testId = "pulse-bars",
16
+ visible = true,
17
+ ariaLabel = "Loading...",
18
+ ...rest
19
+ }, ref) => {
20
+ 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(
25
+ "div",
26
+ {
27
+ ref,
28
+ "data-testid": testId,
29
+ className: classNames.cn("inline-flex items-center justify-center gap-1", className),
30
+ style: {
31
+ height: colors.normalizeSize(size),
32
+ ...style
33
+ },
34
+ role: "status",
35
+ "aria-label": ariaLabel,
36
+ "aria-busy": "true",
37
+ ...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",
43
+ {
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
+ })
58
+ }
59
+ );
60
+ }
61
+ );
62
+ PulseBars.displayName = "PulseBars";
63
+ exports.PulseBars = PulseBars;
64
+ //# sourceMappingURL=index27.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index27.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,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,YAAYC,OAAAA,kBAAkB,MAAM,EAAE;AAC5C,UAAM,WAAW,KAAK,MAAM,aAAa,WAAW,EAAE;AACtD,UAAM,oBAAoBC,OAAAA,qBAAqB,KAAK;AAEpD,WACEC,2BAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,eAAa;AAAA,QACb,WAAWC,WAAAA,GAAG,iDAAiD,SAAS;AAAA,QACxE,OAAO;AAAA,UACL,QAAQC,OAAAA,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;AAElD,gBAAM,SAAS,CAAC,GAAG,KAAK,KAAK,KAAK,KAAK,GAAG;AAC1C,gBAAM,QAAQ,OAAO,QAAQ,OAAO,MAAM;AAE1C,iBACEF,2BAAAA;AAAAA,YAAC;AAAA,YAAA;AAAA,cAEC,WAAU;AAAA,cACV,OAAO;AAAA,gBACL,OAAO,GAAG,QAAQ;AAAA,gBAClB,WAAW;AAAA,gBACX,QAAQ;AAAA,gBACR,iBAAiB;AAAA,gBACjB,WAAW,cAAc,iBAAiB;AAAA,gBAC1C,gBAAgB,GAAG,KAAK;AAAA,gBACxB,iBAAiB;AAAA,cAAA;AAAA,YACnB;AAAA,YAVK;AAAA,UAAA;AAAA,QAaX,CAAC;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;AAEA,UAAU,cAAc;;"}