premium-react-loaders 1.2.0 → 1.3.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 (135) hide show
  1. package/dist/components/overlay/LoaderOverlay.d.ts.map +1 -1
  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.map +1 -1
  6. package/dist/components/pulse/PulseBars.d.ts.map +1 -1
  7. package/dist/components/pulse/PulseDots.d.ts.map +1 -1
  8. package/dist/components/pulse/PulseWave.d.ts.map +1 -1
  9. package/dist/components/pulse/TypingIndicator.d.ts.map +1 -1
  10. package/dist/components/skeleton/Skeleton.d.ts.map +1 -1
  11. package/dist/components/skeleton/SkeletonAvatar.d.ts.map +1 -1
  12. package/dist/components/skeleton/SkeletonCard.d.ts.map +1 -1
  13. package/dist/components/skeleton/SkeletonForm.d.ts.map +1 -1
  14. package/dist/components/skeleton/SkeletonImage.d.ts.map +1 -1
  15. package/dist/components/skeleton/SkeletonList.d.ts.map +1 -1
  16. package/dist/components/skeleton/SkeletonPage.d.ts.map +1 -1
  17. package/dist/components/skeleton/SkeletonTable.d.ts.map +1 -1
  18. package/dist/components/skeleton/SkeletonText.d.ts.map +1 -1
  19. package/dist/components/spinner/SpinnerBars.d.ts.map +1 -1
  20. package/dist/components/spinner/SpinnerCircle.d.ts.map +1 -1
  21. package/dist/components/spinner/SpinnerDots.d.ts.map +1 -1
  22. package/dist/components/spinner/SpinnerGrid.d.ts.map +1 -1
  23. package/dist/components/spinner/SpinnerPulse.d.ts.map +1 -1
  24. package/dist/components/spinner/SpinnerRing.d.ts.map +1 -1
  25. package/dist/components/spinner/SpinnerWave.d.ts.map +1 -1
  26. package/dist/index10.cjs +14 -2
  27. package/dist/index10.cjs.map +1 -1
  28. package/dist/index10.js +14 -2
  29. package/dist/index10.js.map +1 -1
  30. package/dist/index11.cjs +16 -2
  31. package/dist/index11.cjs.map +1 -1
  32. package/dist/index11.js +16 -2
  33. package/dist/index11.js.map +1 -1
  34. package/dist/index12.cjs +16 -2
  35. package/dist/index12.cjs.map +1 -1
  36. package/dist/index12.js +16 -2
  37. package/dist/index12.js.map +1 -1
  38. package/dist/index13.cjs +12 -2
  39. package/dist/index13.cjs.map +1 -1
  40. package/dist/index13.js +12 -2
  41. package/dist/index13.js.map +1 -1
  42. package/dist/index14.cjs +15 -2
  43. package/dist/index14.cjs.map +1 -1
  44. package/dist/index14.js +16 -3
  45. package/dist/index14.js.map +1 -1
  46. package/dist/index15.cjs +15 -2
  47. package/dist/index15.cjs.map +1 -1
  48. package/dist/index15.js +16 -3
  49. package/dist/index15.js.map +1 -1
  50. package/dist/index16.cjs +15 -2
  51. package/dist/index16.cjs.map +1 -1
  52. package/dist/index16.js +16 -3
  53. package/dist/index16.js.map +1 -1
  54. package/dist/index17.cjs +13 -2
  55. package/dist/index17.cjs.map +1 -1
  56. package/dist/index17.js +14 -3
  57. package/dist/index17.js.map +1 -1
  58. package/dist/index18.cjs +17 -4
  59. package/dist/index18.cjs.map +1 -1
  60. package/dist/index18.js +18 -5
  61. package/dist/index18.js.map +1 -1
  62. package/dist/index19.cjs +15 -2
  63. package/dist/index19.cjs.map +1 -1
  64. package/dist/index19.js +16 -3
  65. package/dist/index19.js.map +1 -1
  66. package/dist/index20.cjs +15 -2
  67. package/dist/index20.cjs.map +1 -1
  68. package/dist/index20.js +16 -3
  69. package/dist/index20.js.map +1 -1
  70. package/dist/index21.cjs +14 -3
  71. package/dist/index21.cjs.map +1 -1
  72. package/dist/index21.js +15 -4
  73. package/dist/index21.js.map +1 -1
  74. package/dist/index22.cjs +13 -2
  75. package/dist/index22.cjs.map +1 -1
  76. package/dist/index22.js +14 -3
  77. package/dist/index22.js.map +1 -1
  78. package/dist/index23.cjs +14 -3
  79. package/dist/index23.cjs.map +1 -1
  80. package/dist/index23.js +15 -4
  81. package/dist/index23.js.map +1 -1
  82. package/dist/index24.cjs +16 -2
  83. package/dist/index24.cjs.map +1 -1
  84. package/dist/index24.js +16 -2
  85. package/dist/index24.js.map +1 -1
  86. package/dist/index25.cjs +13 -2
  87. package/dist/index25.cjs.map +1 -1
  88. package/dist/index25.js +14 -3
  89. package/dist/index25.js.map +1 -1
  90. package/dist/index26.cjs +15 -4
  91. package/dist/index26.cjs.map +1 -1
  92. package/dist/index26.js +16 -5
  93. package/dist/index26.js.map +1 -1
  94. package/dist/index27.cjs +15 -4
  95. package/dist/index27.cjs.map +1 -1
  96. package/dist/index27.js +16 -5
  97. package/dist/index27.js.map +1 -1
  98. package/dist/index28.cjs +13 -2
  99. package/dist/index28.cjs.map +1 -1
  100. package/dist/index28.js +14 -3
  101. package/dist/index28.js.map +1 -1
  102. package/dist/index29.cjs +14 -2
  103. package/dist/index29.cjs.map +1 -1
  104. package/dist/index29.js +14 -2
  105. package/dist/index29.js.map +1 -1
  106. package/dist/index31.cjs +84 -0
  107. package/dist/index31.cjs.map +1 -1
  108. package/dist/index31.js +85 -1
  109. package/dist/index31.js.map +1 -1
  110. package/dist/index5.cjs +14 -2
  111. package/dist/index5.cjs.map +1 -1
  112. package/dist/index5.js +14 -2
  113. package/dist/index5.js.map +1 -1
  114. package/dist/index6.cjs +14 -2
  115. package/dist/index6.cjs.map +1 -1
  116. package/dist/index6.js +14 -2
  117. package/dist/index6.js.map +1 -1
  118. package/dist/index7.cjs +16 -2
  119. package/dist/index7.cjs.map +1 -1
  120. package/dist/index7.js +16 -2
  121. package/dist/index7.js.map +1 -1
  122. package/dist/index8.cjs +14 -2
  123. package/dist/index8.cjs.map +1 -1
  124. package/dist/index8.js +14 -2
  125. package/dist/index8.js.map +1 -1
  126. package/dist/index9.cjs +16 -2
  127. package/dist/index9.cjs.map +1 -1
  128. package/dist/index9.js +16 -2
  129. package/dist/index9.js.map +1 -1
  130. package/dist/premium-react-loaders.css +136 -4
  131. package/dist/types/common.d.ts +6 -0
  132. package/dist/types/common.d.ts.map +1 -1
  133. package/dist/utils/hooks.d.ts +9 -0
  134. package/dist/utils/hooks.d.ts.map +1 -1
  135. package/package.json +1 -1
@@ -1 +1 @@
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,EAA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AAA,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;"}
1
+ {"version":3,"file":"index24.js","sources":["../src/components/progress/ProgressSteps.tsx"],"sourcesContent":["import { forwardRef, Fragment } from 'react';\nimport { ProgressStepsProps } from '../../types';\nimport { cn, useLoaderVisibility } 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 delay = 0,\n minDuration = 0,\n transition,\n className,\n style,\n testId = 'progress-steps',\n visible = true,\n ariaLabel = 'Progress steps',\n ...rest\n },\n ref\n ) => {\n const { shouldRender, opacity, transitionStyle } = useLoaderVisibility(\n visible,\n delay,\n minDuration,\n transition\n );\n\n if (!shouldRender) 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={{\n ...style,\n opacity,\n transition: transitionStyle,\n }}\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,QAAQ;AAAA,IACR,cAAc;AAAA,IACd;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,GAAG;AAAA,EAAA,GAEL,QACG;AACH,UAAM,EAAE,cAAc,SAAS,gBAAA,IAAoB;AAAA,MACjD;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAGF,QAAI,CAAC,aAAc,QAAO;AAE1B,UAAM,YAAY,kBAAkB;AACpC,UAAM,SAAS,eAAe;AAE9B,UAAM,gBAAgB,CAAC,UAAuD;AAC5E,UAAI,QAAQ,YAAa,QAAO;A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CAAS,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
@@ -14,6 +14,9 @@ const PulseDots = react.forwardRef(
14
14
  speed = "normal",
15
15
  reverse = false,
16
16
  respectMotionPreference = true,
17
+ delay = 0,
18
+ minDuration = 0,
19
+ transition,
17
20
  className,
18
21
  style,
19
22
  testId = "pulse-dots",
@@ -21,9 +24,15 @@ const PulseDots = react.forwardRef(
21
24
  ariaLabel = "Loading...",
22
25
  ...rest
23
26
  }, ref) => {
24
- if (!visible) return null;
25
27
  const prefersReducedMotion = hooks.useReducedMotion();
26
28
  const effectiveDuration = hooks.getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);
29
+ const { shouldRender, opacity, transitionStyle } = hooks.useLoaderVisibility(
30
+ visible,
31
+ delay,
32
+ minDuration,
33
+ transition
34
+ );
35
+ if (!shouldRender) return null;
27
36
  return /* @__PURE__ */ jsxRuntime.jsx(
28
37
  "div",
29
38
  {
@@ -32,7 +41,9 @@ const PulseDots = react.forwardRef(
32
41
  className: classNames.cn("inline-flex items-center justify-center gap-2", className),
33
42
  style: {
34
43
  height: colors.normalizeSize(size),
35
- ...style
44
+ ...style,
45
+ opacity,
46
+ transition: transitionStyle
36
47
  },
37
48
  role: "status",
38
49
  "aria-label": ariaLabel,
@@ -1 +1 @@
1
- {"version":3,"file":"index25.cjs","sources":["../src/components/pulse/PulseDots.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { PulseDotsProps } from '../../types';\nimport { cn, normalizeSize, useReducedMotion, getEffectiveDuration } 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=\"lg\" color=\"#3b82f6\" />\n * <PulseDots size=\"sm\" dotCount={5} speed=\"fast\" reverse />\n * ```\n */\nexport const PulseDots = forwardRef<HTMLDivElement, PulseDotsProps>(\n (\n {\n size = 'md',\n color = '#3b82f6',\n dotCount = 3,\n dotSize = 10,\n speed = 'normal',\n reverse = false,\n respectMotionPreference = true,\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 prefersReducedMotion = useReducedMotion();\n const effectiveDuration = getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);\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 ${effectiveDuration} ease-in-out infinite`,\n animationDelay: reverse ? `${(dotCount - index - 1) * 0.15}s` : `${index * 0.15}s`,\n }}\n />\n ))}\n </div>\n );\n }\n);\n\nPulseDots.displayName = 'PulseDots';\n"],"names":["forwardRef","useReducedMotion","getEffectiveDuration","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,UAAU;AAAA,IACV,0BAA0B;AAAA,IAC1B;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,uBAAuBC,MAAAA,iBAAA;AAC7B,UAAM,oBAAoBC,MAAAA,qBAAqB,OAAO,yBAAyB,oBAAoB;AAEnG,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,UAAU,IAAI,WAAW,QAAQ,KAAK,IAAI,MAAM,GAAG,QAAQ,IAAI;AAAA,YAAA;AAAA,UACjF;AAAA,UARK;AAAA,QAAA,CAUR;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;AAEA,UAAU,cAAc;;"}
1
+ {"version":3,"file":"index25.cjs","sources":["../src/components/pulse/PulseDots.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { PulseDotsProps } from '../../types';\nimport { cn, normalizeSize, useReducedMotion, getEffectiveDuration, useLoaderVisibility } 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=\"lg\" color=\"#3b82f6\" />\n * <PulseDots size=\"sm\" dotCount={5} speed=\"fast\" reverse />\n * ```\n */\nexport const PulseDots = forwardRef<HTMLDivElement, PulseDotsProps>(\n (\n {\n size = 'md',\n color = '#3b82f6',\n dotCount = 3,\n dotSize = 10,\n speed = 'normal',\n reverse = false,\n respectMotionPreference = true,\n delay = 0,\n minDuration = 0,\n transition,\n className,\n style,\n testId = 'pulse-dots',\n visible = true,\n ariaLabel = 'Loading...',\n ...rest\n },\n ref\n ) => {\n const prefersReducedMotion = useReducedMotion();\n const effectiveDuration = getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);\n const { shouldRender, opacity, transitionStyle } = useLoaderVisibility(\n visible,\n delay,\n minDuration,\n transition\n );\n\n if (!shouldRender) return null;\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 opacity,\n transition: transitionStyle,\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 ${effectiveDuration} ease-in-out infinite`,\n animationDelay: reverse ? `${(dotCount - index - 1) * 0.15}s` : `${index * 0.15}s`,\n }}\n />\n ))}\n </div>\n );\n }\n);\n\nPulseDots.displayName = 'PulseDots';\n"],"names":["forwardRef","useReducedMotion","getEffectiveDuration","useLoaderVisibility","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,UAAU;AAAA,IACV,0BAA0B;AAAA,IAC1B,QAAQ;AAAA,IACR,cAAc;AAAA,IACd;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,GAAG;AAAA,EAAA,GAEL,QACG;AACH,UAAM,uBAAuBC,MAAAA,iBAAA;AAC7B,UAAM,oBAAoBC,MAAAA,qBAAqB,OAAO,yBAAyB,oBAAoB;AACnG,UAAM,EAAE,cAAc,SAAS,gBAAA,IAAoBC,MAAAA;AAAAA,MACjD;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAGF,QAAI,CAAC,aAAc,QAAO;AAE1B,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,UACH;AAAA,UACA,YAAY;AAAA,QAAA;AAAA,QAEd,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,UAAU,IAAI,WAAW,QAAQ,KAAK,IAAI,MAAM,GAAG,QAAQ,IAAI;AAAA,YAAA;AAAA,UACjF;AAAA,UARK;AAAA,QAAA,CAUR;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;AAEA,UAAU,cAAc;;"}
package/dist/index25.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
- import { useReducedMotion, getEffectiveDuration } from "./index31.js";
3
+ import { useReducedMotion, useLoaderVisibility, getEffectiveDuration } from "./index31.js";
4
4
  import { normalizeSize } from "./index4.js";
5
5
  import { cn } from "./index3.js";
6
6
  const PulseDots = forwardRef(
@@ -12,6 +12,9 @@ const PulseDots = forwardRef(
12
12
  speed = "normal",
13
13
  reverse = false,
14
14
  respectMotionPreference = true,
15
+ delay = 0,
16
+ minDuration = 0,
17
+ transition,
15
18
  className,
16
19
  style,
17
20
  testId = "pulse-dots",
@@ -19,9 +22,15 @@ const PulseDots = forwardRef(
19
22
  ariaLabel = "Loading...",
20
23
  ...rest
21
24
  }, ref) => {
22
- if (!visible) return null;
23
25
  const prefersReducedMotion = useReducedMotion();
24
26
  const effectiveDuration = getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);
27
+ const { shouldRender, opacity, transitionStyle } = useLoaderVisibility(
28
+ visible,
29
+ delay,
30
+ minDuration,
31
+ transition
32
+ );
33
+ if (!shouldRender) return null;
25
34
  return /* @__PURE__ */ jsx(
26
35
  "div",
27
36
  {
@@ -30,7 +39,9 @@ const PulseDots = forwardRef(
30
39
  className: cn("inline-flex items-center justify-center gap-2", className),
31
40
  style: {
32
41
  height: normalizeSize(size),
33
- ...style
42
+ ...style,
43
+ opacity,
44
+ transition: transitionStyle
34
45
  },
35
46
  role: "status",
36
47
  "aria-label": ariaLabel,
@@ -1 +1 @@
1
- {"version":3,"file":"index25.js","sources":["../src/components/pulse/PulseDots.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { PulseDotsProps } from '../../types';\nimport { cn, normalizeSize, useReducedMotion, getEffectiveDuration } 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=\"lg\" color=\"#3b82f6\" />\n * <PulseDots size=\"sm\" dotCount={5} speed=\"fast\" reverse />\n * ```\n */\nexport const PulseDots = forwardRef<HTMLDivElement, PulseDotsProps>(\n (\n {\n size = 'md',\n color = '#3b82f6',\n dotCount = 3,\n dotSize = 10,\n speed = 'normal',\n reverse = false,\n respectMotionPreference = true,\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 prefersReducedMotion = useReducedMotion();\n const effectiveDuration = getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);\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 ${effectiveDuration} ease-in-out infinite`,\n animationDelay: reverse ? `${(dotCount - index - 1) * 0.15}s` : `${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,UAAU;AAAA,IACV,0BAA0B;AAAA,IAC1B;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,uBAAuB,iBAAA;AAC7B,UAAM,oBAAoB,qBAAqB,OAAO,yBAAyB,oBAAoB;AAEnG,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,UAAU,IAAI,WAAW,QAAQ,KAAK,IAAI,MAAM,GAAG,QAAQ,IAAI;AAAA,YAAA;AAAA,UACjF;AAAA,UARK;AAAA,QAAA,CAUR;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;AAEA,UAAU,cAAc;"}
1
+ {"version":3,"file":"index25.js","sources":["../src/components/pulse/PulseDots.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { PulseDotsProps } from '../../types';\nimport { cn, normalizeSize, useReducedMotion, getEffectiveDuration, useLoaderVisibility } 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=\"lg\" color=\"#3b82f6\" />\n * <PulseDots size=\"sm\" dotCount={5} speed=\"fast\" reverse />\n * ```\n */\nexport const PulseDots = forwardRef<HTMLDivElement, PulseDotsProps>(\n (\n {\n size = 'md',\n color = '#3b82f6',\n dotCount = 3,\n dotSize = 10,\n speed = 'normal',\n reverse = false,\n respectMotionPreference = true,\n delay = 0,\n minDuration = 0,\n transition,\n className,\n style,\n testId = 'pulse-dots',\n visible = true,\n ariaLabel = 'Loading...',\n ...rest\n },\n ref\n ) => {\n const prefersReducedMotion = useReducedMotion();\n const effectiveDuration = getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);\n const { shouldRender, opacity, transitionStyle } = useLoaderVisibility(\n visible,\n delay,\n minDuration,\n transition\n );\n\n if (!shouldRender) return null;\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 opacity,\n transition: transitionStyle,\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 ${effectiveDuration} ease-in-out infinite`,\n animationDelay: reverse ? `${(dotCount - index - 1) * 0.15}s` : `${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,UAAU;AAAA,IACV,0BAA0B;AAAA,IAC1B,QAAQ;AAAA,IACR,cAAc;AAAA,IACd;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,GAAG;AAAA,EAAA,GAEL,QACG;AACH,UAAM,uBAAuB,iBAAA;AAC7B,UAAM,oBAAoB,qBAAqB,OAAO,yBAAyB,oBAAoB;AACnG,UAAM,EAAE,cAAc,SAAS,gBAAA,IAAoB;AAAA,MACjD;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAGF,QAAI,CAAC,aAAc,QAAO;AAE1B,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,UACH;AAAA,UACA,YAAY;AAAA,QAAA;AAAA,QAEd,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,UAAU,IAAI,WAAW,QAAQ,KAAK,IAAI,MAAM,GAAG,QAAQ,IAAI;AAAA,YAAA;AAAA,UACjF;AAAA,UARK;AAAA,QAAA,CAUR;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;AAEA,UAAU,cAAc;"}
package/dist/index26.cjs CHANGED
@@ -13,6 +13,9 @@ const PulseWave = react.forwardRef(
13
13
  speed = "normal",
14
14
  reverse = false,
15
15
  respectMotionPreference = true,
16
+ delay = 0,
17
+ minDuration = 0,
18
+ transition,
16
19
  className,
17
20
  style,
18
21
  testId = "pulse-wave",
@@ -20,9 +23,15 @@ const PulseWave = react.forwardRef(
20
23
  ariaLabel = "Loading...",
21
24
  ...rest
22
25
  }, ref) => {
23
- if (!visible) return null;
24
26
  const prefersReducedMotion = hooks.useReducedMotion();
25
27
  const effectiveDuration = hooks.getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);
28
+ const { shouldRender, opacity, transitionStyle } = hooks.useLoaderVisibility(
29
+ visible,
30
+ delay,
31
+ minDuration,
32
+ transition
33
+ );
34
+ if (!shouldRender) return null;
26
35
  const sizeValue = colors.parseSizeToNumber(size, 40);
27
36
  const barWidth = Math.floor(sizeValue / (barCount * 2.5));
28
37
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -33,14 +42,16 @@ const PulseWave = react.forwardRef(
33
42
  className: classNames.cn("inline-flex items-end justify-center gap-1", className),
34
43
  style: {
35
44
  height: colors.normalizeSize(size),
36
- ...style
45
+ ...style,
46
+ opacity,
47
+ transition: transitionStyle
37
48
  },
38
49
  role: "status",
39
50
  "aria-label": ariaLabel,
40
51
  "aria-busy": "true",
41
52
  ...rest,
42
53
  children: Array.from({ length: barCount }).map((_, index) => {
43
- const delay = reverse ? (barCount - index - 1) / barCount * 0.5 : index / barCount * 0.5;
54
+ const delay2 = reverse ? (barCount - index - 1) / barCount * 0.5 : index / barCount * 0.5;
44
55
  return /* @__PURE__ */ jsxRuntime.jsx(
45
56
  "div",
46
57
  {
@@ -50,7 +61,7 @@ const PulseWave = react.forwardRef(
50
61
  height: "100%",
51
62
  backgroundColor: color,
52
63
  animation: `pulse-wave ${effectiveDuration} ease-in-out infinite`,
53
- animationDelay: `${delay}s`,
64
+ animationDelay: `${delay2}s`,
54
65
  transformOrigin: "bottom"
55
66
  }
56
67
  },
@@ -1 +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, parseSizeToNumber, useReducedMotion, getEffectiveDuration } 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=\"lg\" color=\"#3b82f6\" />\n * <PulseWave size=\"sm\" barCount={7} speed=\"slow\" reverse />\n * ```\n */\nexport const PulseWave = forwardRef<HTMLDivElement, PulseWaveProps>(\n (\n {\n size = 'md',\n color = '#3b82f6',\n barCount = 5,\n speed = 'normal',\n reverse = false,\n respectMotionPreference = true,\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 prefersReducedMotion = useReducedMotion();\n const effectiveDuration = getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);\n\n const sizeValue = parseSizeToNumber(size, 40);\n const barWidth = Math.floor(sizeValue / (barCount * 2.5));\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 = reverse ? ((barCount - index - 1) / barCount) * 0.5 : (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 ${effectiveDuration} 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","useReducedMotion","getEffectiveDuration","parseSizeToNumber","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,UAAU;AAAA,IACV,0BAA0B;AAAA,IAC1B;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,uBAAuBC,MAAAA,iBAAA;AAC7B,UAAM,oBAAoBC,MAAAA,qBAAqB,OAAO,yBAAyB,oBAAoB;AAEnG,UAAM,YAAYC,OAAAA,kBAAkB,MAAM,EAAE;AAC5C,UAAM,WAAW,KAAK,MAAM,aAAa,WAAW,IAAI;AAExD,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,QAAQ,WAAY,WAAW,QAAQ,KAAK,WAAY,MAAO,QAAQ,WAAY;AAEzF,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;;"}
1
+ {"version":3,"file":"index26.cjs","sources":["../src/components/pulse/PulseWave.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { PulseWaveProps } from '../../types';\nimport { cn, normalizeSize, parseSizeToNumber, useReducedMotion, getEffectiveDuration, useLoaderVisibility } 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=\"lg\" color=\"#3b82f6\" />\n * <PulseWave size=\"sm\" barCount={7} speed=\"slow\" reverse />\n * ```\n */\nexport const PulseWave = forwardRef<HTMLDivElement, PulseWaveProps>(\n (\n {\n size = 'md',\n color = '#3b82f6',\n barCount = 5,\n speed = 'normal',\n reverse = false,\n respectMotionPreference = true,\n delay = 0,\n minDuration = 0,\n transition,\n className,\n style,\n testId = 'pulse-wave',\n visible = true,\n ariaLabel = 'Loading...',\n ...rest\n },\n ref\n ) => {\n const prefersReducedMotion = useReducedMotion();\n const effectiveDuration = getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);\n const { shouldRender, opacity, transitionStyle } = useLoaderVisibility(\n visible,\n delay,\n minDuration,\n transition\n );\n\n if (!shouldRender) return null;\n\n const sizeValue = parseSizeToNumber(size, 40);\n const barWidth = Math.floor(sizeValue / (barCount * 2.5));\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 opacity,\n transition: transitionStyle,\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 = reverse ? ((barCount - index - 1) / barCount) * 0.5 : (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 ${effectiveDuration} 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","useReducedMotion","getEffectiveDuration","useLoaderVisibility","parseSizeTo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AAA,gBACL,OAAO,GAAG,QAAQ;AAAA,gBAClB,QAAQ;AAAA,gBACR,iBAAiB;AAAA,gBACjB,WAAW,cAAc,iBAAiB;AAAA,gBAC1C,gBAAgB,GAAGG,MAAK;AAAA,gBACxB,iBAAiB;AAAA,cAAA;AAAA,YACnB;AAAA,YATK;AAAA,UAAA;AAAA,QAYX,CAAC;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;AAEA,UAAU,cAAc;;"}
package/dist/index26.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
- import { useReducedMotion, getEffectiveDuration } from "./index31.js";
3
+ import { useReducedMotion, useLoaderVisibility, getEffectiveDuration } from "./index31.js";
4
4
  import { normalizeSize, parseSizeToNumber } from "./index4.js";
5
5
  import { cn } from "./index3.js";
6
6
  const PulseWave = forwardRef(
@@ -11,6 +11,9 @@ const PulseWave = forwardRef(
11
11
  speed = "normal",
12
12
  reverse = false,
13
13
  respectMotionPreference = true,
14
+ delay = 0,
15
+ minDuration = 0,
16
+ transition,
14
17
  className,
15
18
  style,
16
19
  testId = "pulse-wave",
@@ -18,9 +21,15 @@ const PulseWave = forwardRef(
18
21
  ariaLabel = "Loading...",
19
22
  ...rest
20
23
  }, ref) => {
21
- if (!visible) return null;
22
24
  const prefersReducedMotion = useReducedMotion();
23
25
  const effectiveDuration = getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);
26
+ const { shouldRender, opacity, transitionStyle } = useLoaderVisibility(
27
+ visible,
28
+ delay,
29
+ minDuration,
30
+ transition
31
+ );
32
+ if (!shouldRender) return null;
24
33
  const sizeValue = parseSizeToNumber(size, 40);
25
34
  const barWidth = Math.floor(sizeValue / (barCount * 2.5));
26
35
  return /* @__PURE__ */ jsx(
@@ -31,14 +40,16 @@ const PulseWave = forwardRef(
31
40
  className: cn("inline-flex items-end justify-center gap-1", className),
32
41
  style: {
33
42
  height: normalizeSize(size),
34
- ...style
43
+ ...style,
44
+ opacity,
45
+ transition: transitionStyle
35
46
  },
36
47
  role: "status",
37
48
  "aria-label": ariaLabel,
38
49
  "aria-busy": "true",
39
50
  ...rest,
40
51
  children: Array.from({ length: barCount }).map((_, index) => {
41
- const delay = reverse ? (barCount - index - 1) / barCount * 0.5 : index / barCount * 0.5;
52
+ const delay2 = reverse ? (barCount - index - 1) / barCount * 0.5 : index / barCount * 0.5;
42
53
  return /* @__PURE__ */ jsx(
43
54
  "div",
44
55
  {
@@ -48,7 +59,7 @@ const PulseWave = forwardRef(
48
59
  height: "100%",
49
60
  backgroundColor: color,
50
61
  animation: `pulse-wave ${effectiveDuration} ease-in-out infinite`,
51
- animationDelay: `${delay}s`,
62
+ animationDelay: `${delay2}s`,
52
63
  transformOrigin: "bottom"
53
64
  }
54
65
  },
@@ -1 +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, parseSizeToNumber, useReducedMotion, getEffectiveDuration } 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=\"lg\" color=\"#3b82f6\" />\n * <PulseWave size=\"sm\" barCount={7} speed=\"slow\" reverse />\n * ```\n */\nexport const PulseWave = forwardRef<HTMLDivElement, PulseWaveProps>(\n (\n {\n size = 'md',\n color = '#3b82f6',\n barCount = 5,\n speed = 'normal',\n reverse = false,\n respectMotionPreference = true,\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 prefersReducedMotion = useReducedMotion();\n const effectiveDuration = getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);\n\n const sizeValue = parseSizeToNumber(size, 40);\n const barWidth = Math.floor(sizeValue / (barCount * 2.5));\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 = reverse ? ((barCount - index - 1) / barCount) * 0.5 : (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 ${effectiveDuration} 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,UAAU;AAAA,IACV,0BAA0B;AAAA,IAC1B;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,uBAAuB,iBAAA;AAC7B,UAAM,oBAAoB,qBAAqB,OAAO,yBAAyB,oBAAoB;AAEnG,UAAM,YAAY,kBAAkB,MAAM,EAAE;AAC5C,UAAM,WAAW,KAAK,MAAM,aAAa,WAAW,IAAI;AAExD,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,QAAQ,WAAY,WAAW,QAAQ,KAAK,WAAY,MAAO,QAAQ,WAAY;AAEzF,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":"index26.js","sources":["../src/components/pulse/PulseWave.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { PulseWaveProps } from '../../types';\nimport { cn, normalizeSize, parseSizeToNumber, useReducedMotion, getEffectiveDuration, useLoaderVisibility } 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=\"lg\" color=\"#3b82f6\" />\n * <PulseWave size=\"sm\" barCount={7} speed=\"slow\" reverse />\n * ```\n */\nexport const PulseWave = forwardRef<HTMLDivElement, PulseWaveProps>(\n (\n {\n size = 'md',\n color = '#3b82f6',\n barCount = 5,\n speed = 'normal',\n reverse = false,\n respectMotionPreference = true,\n delay = 0,\n minDuration = 0,\n transition,\n className,\n style,\n testId = 'pulse-wave',\n visible = true,\n ariaLabel = 'Loading...',\n ...rest\n },\n ref\n ) => {\n const prefersReducedMotion = useReducedMotion();\n const effectiveDuration = getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);\n const { shouldRender, opacity, transitionStyle } = useLoaderVisibility(\n visible,\n delay,\n minDuration,\n transition\n );\n\n if (!shouldRender) return null;\n\n const sizeValue = parseSizeToNumber(size, 40);\n const barWidth = Math.floor(sizeValue / (barCount * 2.5));\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 opacity,\n transition: transitionStyle,\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 = reverse ? ((barCount - index - 1) / barCount) * 0.5 : (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 ${effectiveDuration} 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":["delay"],"mappings":";;;;;AAeO,MAAM,YAAY;AAAA,EACvB,CACE;AAAA,IACE,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,0BAA0B;AAAA,IAC1B,QAAQ;AAAA,IACR,cAAc;AAAA,IACd;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,GAAG;AAAA,EAAA,GAEL,QACG;AACH,UAAM,uBAAuB,iBAAA;AAC7B,UAAM,oBAAoB,qBAAqB,OAAO,yBAAyB,oBAAoB;AACnG,UAAM,EAAE,cAAc,SAAS,gBAAA,IAAoB;AAAA,MACjD;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAGF,QAAI,CAAC,aAAc,QAAO;AAE1B,UAAM,YAAY,kBAAkB,MAAM,EAAE;AAC5C,UAAM,WAAW,KAAK,MAAM,aAAa,WAAW,IAAI;AAExD,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,UACH;AAAA,UACA,YAAY;AAAA,QAAA;AAAA,QAEd,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,gBAAMA,SAAQ,WAAY,WAAW,QAAQ,KAAK,WAAY,MAAO,QAAQ,WAAY;AAEzF,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,GAAGA,MAAK;AAAA,gBACxB,iBAAiB;AAAA,cAAA;AAAA,YACnB;AAAA,YATK;AAAA,UAAA;AAAA,QAYX,CAAC;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;AAEA,UAAU,cAAc;"}
package/dist/index27.cjs CHANGED
@@ -13,6 +13,9 @@ const PulseBars = react.forwardRef(
13
13
  speed = "normal",
14
14
  reverse = false,
15
15
  respectMotionPreference = true,
16
+ delay = 0,
17
+ minDuration = 0,
18
+ transition,
16
19
  className,
17
20
  style,
18
21
  testId = "pulse-bars",
@@ -20,9 +23,15 @@ const PulseBars = react.forwardRef(
20
23
  ariaLabel = "Loading...",
21
24
  ...rest
22
25
  }, ref) => {
23
- if (!visible) return null;
24
26
  const prefersReducedMotion = hooks.useReducedMotion();
25
27
  const effectiveDuration = hooks.getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);
28
+ const { shouldRender, opacity, transitionStyle } = hooks.useLoaderVisibility(
29
+ visible,
30
+ delay,
31
+ minDuration,
32
+ transition
33
+ );
34
+ if (!shouldRender) return null;
26
35
  const sizeValue = colors.parseSizeToNumber(size, 40);
27
36
  const barWidth = Math.floor(sizeValue / (barCount * 2));
28
37
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -33,7 +42,9 @@ const PulseBars = react.forwardRef(
33
42
  className: classNames.cn("inline-flex items-center justify-center gap-1", className),
34
43
  style: {
35
44
  height: colors.normalizeSize(size),
36
- ...style
45
+ ...style,
46
+ opacity,
47
+ transition: transitionStyle
37
48
  },
38
49
  role: "status",
39
50
  "aria-label": ariaLabel,
@@ -42,7 +53,7 @@ const PulseBars = react.forwardRef(
42
53
  children: Array.from({ length: barCount }).map((_, index) => {
43
54
  const delays = [0, 0.2, 0.4, 0.1, 0.3, 0.5];
44
55
  const reversedDelays = [...delays].reverse();
45
- const delay = reverse ? reversedDelays[index % reversedDelays.length] : delays[index % delays.length];
56
+ const delay2 = reverse ? reversedDelays[index % reversedDelays.length] : delays[index % delays.length];
46
57
  return /* @__PURE__ */ jsxRuntime.jsx(
47
58
  "div",
48
59
  {
@@ -53,7 +64,7 @@ const PulseBars = react.forwardRef(
53
64
  height: "100%",
54
65
  backgroundColor: color,
55
66
  animation: `pulse-wave ${effectiveDuration} ease-in-out infinite`,
56
- animationDelay: `${delay}s`,
67
+ animationDelay: `${delay2}s`,
57
68
  transformOrigin: "center"
58
69
  }
59
70
  },
@@ -1 +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, parseSizeToNumber, useReducedMotion, getEffectiveDuration } 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=\"lg\" color=\"#3b82f6\" />\n * <PulseBars size=\"md\" barCount={6} speed=\"fast\" reverse />\n * ```\n */\nexport const PulseBars = forwardRef<HTMLDivElement, PulseBarsProps>(\n (\n {\n size = 'md',\n color = '#3b82f6',\n barCount = 4,\n speed = 'normal',\n reverse = false,\n respectMotionPreference = true,\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 prefersReducedMotion = useReducedMotion();\n const effectiveDuration = getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);\n\n const sizeValue = parseSizeToNumber(size, 40);\n const barWidth = Math.floor(sizeValue / (barCount * 2));\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 reversedDelays = [...delays].reverse();\n const delay = reverse ? reversedDelays[index % reversedDelays.length] : 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 ${effectiveDuration} 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","useReducedMotion","getEffectiveDuration","parseSizeToNumber","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,UAAU;AAAA,IACV,0BAA0B;AAAA,IAC1B;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,uBAAuBC,MAAAA,iBAAA;AAC7B,UAAM,oBAAoBC,MAAAA,qBAAqB,OAAO,yBAAyB,oBAAoB;AAEnG,UAAM,YAAYC,OAAAA,kBAAkB,MAAM,EAAE;AAC5C,UAAM,WAAW,KAAK,MAAM,aAAa,WAAW,EAAE;AAEtD,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,iBAAiB,CAAC,GAAG,MAAM,EAAE,QAAA;AACnC,gBAAM,QAAQ,UAAU,eAAe,QAAQ,eAAe,MAAM,IAAI,OAAO,QAAQ,OAAO,MAAM;AAEpG,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;;"}
1
+ {"version":3,"file":"index27.cjs","sources":["../src/components/pulse/PulseBars.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { PulseBarsProps } from '../../types';\nimport { cn, normalizeSize, parseSizeToNumber, useReducedMotion, getEffectiveDuration, useLoaderVisibility } 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=\"lg\" color=\"#3b82f6\" />\n * <PulseBars size=\"md\" barCount={6} speed=\"fast\" reverse />\n * ```\n */\nexport const PulseBars = forwardRef<HTMLDivElement, PulseBarsProps>(\n (\n {\n size = 'md',\n color = '#3b82f6',\n barCount = 4,\n speed = 'normal',\n reverse = false,\n respectMotionPreference = true,\n delay = 0,\n minDuration = 0,\n transition,\n className,\n style,\n testId = 'pulse-bars',\n visible = true,\n ariaLabel = 'Loading...',\n ...rest\n },\n ref\n ) => {\n const prefersReducedMotion = useReducedMotion();\n const effectiveDuration = getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);\n const { shouldRender, opacity, transitionStyle } = useLoaderVisibility(\n visible,\n delay,\n minDuration,\n transition\n );\n\n if (!shouldRender) return null;\n\n const sizeValue = parseSizeToNumber(size, 40);\n const barWidth = Math.floor(sizeValue / (barCount * 2));\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 opacity,\n transition: transitionStyle,\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 reversedDelays = [...delays].reverse();\n const delay = reverse ? reversedDelays[index % reversedDelays.length] : 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 ${effectiveDuration} 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","useReducedMotion","getEffectiveDuration","useLoaderVisibility","parseSizeToNumber","jsx","cn","normalizeSize","delay"],"mappings":";;;;;;;AAeO,MAAM,YAAYA,MAAAA;AAAAA,EACvB,CACE;AAAA,IACE,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,0BAA0B;AAAA,IAC1B,QAAQ;AAAA,IACR,cAAc;AAAA,IACd;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,GAAG;AAAA,EAAA,GAEL,QACG;AACH,UAAM,uBAAuBC,MAAAA,iBAAA;AAC7B,UAAM,oBAAoBC,MAAAA,qBAAqB,OAAO,yBAAyB,oBAAoB;AACnG,UAAM,EAAE,cAAc,SAAS,gBAAA,IAAoBC,MAAAA;AAAAA,MACjD;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAGF,QAAI,CAAC,aAAc,QAAO;AAE1B,UAAM,YAAYC,OAAAA,kBAAkB,MAAM,EAAE;AAC5C,UAAM,WAAW,KAAK,MAAM,aAAa,WAAW,EAAE;AAEtD,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,UACH;AAAA,UACA,YAAY;AAAA,QAAA;AAAA,QAEd,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,iBAAiB,CAAC,GAAG,MAAM,EAAE,QAAA;AACnC,gBAAMC,SAAQ,UAAU,eAAe,QAAQ,eAAe,MAAM,IAAI,OAAO,QAAQ,OAAO,MAAM;AAEpG,iBACEH,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,GAAGG,MAAK;AAAA,gBACxB,iBAAiB;AAAA,cAAA;AAAA,YACnB;AAAA,YAVK;AAAA,UAAA;AAAA,QAaX,CAAC;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;AAEA,UAAU,cAAc;;"}
package/dist/index27.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
- import { useReducedMotion, getEffectiveDuration } from "./index31.js";
3
+ import { useReducedMotion, useLoaderVisibility, getEffectiveDuration } from "./index31.js";
4
4
  import { normalizeSize, parseSizeToNumber } from "./index4.js";
5
5
  import { cn } from "./index3.js";
6
6
  const PulseBars = forwardRef(
@@ -11,6 +11,9 @@ const PulseBars = forwardRef(
11
11
  speed = "normal",
12
12
  reverse = false,
13
13
  respectMotionPreference = true,
14
+ delay = 0,
15
+ minDuration = 0,
16
+ transition,
14
17
  className,
15
18
  style,
16
19
  testId = "pulse-bars",
@@ -18,9 +21,15 @@ const PulseBars = forwardRef(
18
21
  ariaLabel = "Loading...",
19
22
  ...rest
20
23
  }, ref) => {
21
- if (!visible) return null;
22
24
  const prefersReducedMotion = useReducedMotion();
23
25
  const effectiveDuration = getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);
26
+ const { shouldRender, opacity, transitionStyle } = useLoaderVisibility(
27
+ visible,
28
+ delay,
29
+ minDuration,
30
+ transition
31
+ );
32
+ if (!shouldRender) return null;
24
33
  const sizeValue = parseSizeToNumber(size, 40);
25
34
  const barWidth = Math.floor(sizeValue / (barCount * 2));
26
35
  return /* @__PURE__ */ jsx(
@@ -31,7 +40,9 @@ const PulseBars = forwardRef(
31
40
  className: cn("inline-flex items-center justify-center gap-1", className),
32
41
  style: {
33
42
  height: normalizeSize(size),
34
- ...style
43
+ ...style,
44
+ opacity,
45
+ transition: transitionStyle
35
46
  },
36
47
  role: "status",
37
48
  "aria-label": ariaLabel,
@@ -40,7 +51,7 @@ const PulseBars = forwardRef(
40
51
  children: Array.from({ length: barCount }).map((_, index) => {
41
52
  const delays = [0, 0.2, 0.4, 0.1, 0.3, 0.5];
42
53
  const reversedDelays = [...delays].reverse();
43
- const delay = reverse ? reversedDelays[index % reversedDelays.length] : delays[index % delays.length];
54
+ const delay2 = reverse ? reversedDelays[index % reversedDelays.length] : delays[index % delays.length];
44
55
  return /* @__PURE__ */ jsx(
45
56
  "div",
46
57
  {
@@ -51,7 +62,7 @@ const PulseBars = forwardRef(
51
62
  height: "100%",
52
63
  backgroundColor: color,
53
64
  animation: `pulse-wave ${effectiveDuration} ease-in-out infinite`,
54
- animationDelay: `${delay}s`,
65
+ animationDelay: `${delay2}s`,
55
66
  transformOrigin: "center"
56
67
  }
57
68
  },
@@ -1 +1 @@
1
- {"version":3,"file":"index27.js","sources":["../src/components/pulse/PulseBars.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { PulseBarsProps } from '../../types';\nimport { cn, normalizeSize, parseSizeToNumber, useReducedMotion, getEffectiveDuration } 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=\"lg\" color=\"#3b82f6\" />\n * <PulseBars size=\"md\" barCount={6} speed=\"fast\" reverse />\n * ```\n */\nexport const PulseBars = forwardRef<HTMLDivElement, PulseBarsProps>(\n (\n {\n size = 'md',\n color = '#3b82f6',\n barCount = 4,\n speed = 'normal',\n reverse = false,\n respectMotionPreference = true,\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 prefersReducedMotion = useReducedMotion();\n const effectiveDuration = getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);\n\n const sizeValue = parseSizeToNumber(size, 40);\n const barWidth = Math.floor(sizeValue / (barCount * 2));\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 reversedDelays = [...delays].reverse();\n const delay = reverse ? reversedDelays[index % reversedDelays.length] : 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 ${effectiveDuration} 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":[],"mappings":";;;;;AAeO,MAAM,YAAY;AAAA,EACvB,CACE;AAAA,IACE,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,0BAA0B;AAAA,IAC1B;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,uBAAuB,iBAAA;AAC7B,UAAM,oBAAoB,qBAAqB,OAAO,yBAAyB,oBAAoB;AAEnG,UAAM,YAAY,kBAAkB,MAAM,EAAE;AAC5C,UAAM,WAAW,KAAK,MAAM,aAAa,WAAW,EAAE;AAEtD,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,SAAA,CAAU,EAAE,IAAI,CAAC,GAAG,UAAU;AAElD,gBAAM,SAAS,CAAC,GAAG,KAAK,KAAK,KAAK,KAAK,GAAG;AAC1C,gBAAM,iBAAiB,CAAC,GAAG,MAAM,EAAE,QAAA;AACnC,gBAAM,QAAQ,UAAU,eAAe,QAAQ,eAAe,MAAM,IAAI,OAAO,QAAQ,OAAO,MAAM;AAEpG,iBACE;AAAA,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;"}
1
+ {"version":3,"file":"index27.js","sources":["../src/components/pulse/PulseBars.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { PulseBarsProps } from '../../types';\nimport { cn, normalizeSize, parseSizeToNumber, useReducedMotion, getEffectiveDuration, useLoaderVisibility } 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=\"lg\" color=\"#3b82f6\" />\n * <PulseBars size=\"md\" barCount={6} speed=\"fast\" reverse />\n * ```\n */\nexport const PulseBars = forwardRef<HTMLDivElement, PulseBarsProps>(\n (\n {\n size = 'md',\n color = '#3b82f6',\n barCount = 4,\n speed = 'normal',\n reverse = false,\n respectMotionPreference = true,\n delay = 0,\n minDuration = 0,\n transition,\n className,\n style,\n testId = 'pulse-bars',\n visible = true,\n ariaLabel = 'Loading...',\n ...rest\n },\n ref\n ) => {\n const prefersReducedMotion = useReducedMotion();\n const effectiveDuration = getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);\n const { shouldRender, opacity, transitionStyle } = useLoaderVisibility(\n visible,\n delay,\n minDuration,\n transition\n );\n\n if (!shouldRender) return null;\n\n const sizeValue = parseSizeToNumber(size, 40);\n const barWidth = Math.floor(sizeValue / (barCount * 2));\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 opacity,\n transition: transitionStyle,\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 reversedDelays = [...delays].reverse();\n const delay = reverse ? reversedDelays[index % reversedDelays.length] : 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 ${effectiveDuration} 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":["delay"],"mappings":";;;;;AAeO,MAAM,YAAY;AAAA,EACvB,CACE;AAAA,IACE,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,UAAU;AAAA,I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AAA,gBAC1C,gBAAgB,GAAGA,MAAK;AAAA,gBACxB,iBAAiB;AAAA,cAAA;AAAA,YACnB;AAAA,YAVK;AAAA,UAAA;AAAA,QAaX,CAAC;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;AAEA,UAAU,cAAc;"}
package/dist/index28.cjs CHANGED
@@ -16,6 +16,9 @@ const TypingIndicator = react.forwardRef(
16
16
  speed = "normal",
17
17
  reverse = false,
18
18
  respectMotionPreference = true,
19
+ delay = 0,
20
+ minDuration = 0,
21
+ transition,
19
22
  className,
20
23
  style,
21
24
  testId = "typing-indicator",
@@ -23,9 +26,15 @@ const TypingIndicator = react.forwardRef(
23
26
  ariaLabel = "Typing...",
24
27
  ...rest
25
28
  }, ref) => {
26
- if (!visible) return null;
27
29
  const prefersReducedMotion = hooks.useReducedMotion();
28
30
  const effectiveDuration = hooks.getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);
31
+ const { shouldRender, opacity, transitionStyle } = hooks.useLoaderVisibility(
32
+ visible,
33
+ delay,
34
+ minDuration,
35
+ transition
36
+ );
37
+ if (!shouldRender) return null;
29
38
  const gapValue = colors.normalizeSize(gap);
30
39
  return /* @__PURE__ */ jsxRuntime.jsx(
31
40
  "div",
@@ -36,7 +45,9 @@ const TypingIndicator = react.forwardRef(
36
45
  style: {
37
46
  gap: gapValue,
38
47
  height: size ? colors.normalizeSize(size) : "auto",
39
- ...style
48
+ ...style,
49
+ opacity,
50
+ transition: transitionStyle
40
51
  },
41
52
  role: "status",
42
53
  "aria-label": ariaLabel,
@@ -1 +1 @@
1
- {"version":3,"file":"index28.cjs","sources":["../src/components/pulse/TypingIndicator.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { TypingIndicatorProps } from '../../types';\nimport { cn, normalizeSize, useReducedMotion, getEffectiveDuration } from '../../utils';\n\n/**\n * TypingIndicator - Chat typing indicator\n *\n * A loader for messaging/chat applications showing typing activity.\n *\n * @example\n * ```tsx\n * <TypingIndicator />\n * <TypingIndicator variant=\"fade\" />\n * <TypingIndicator dotCount={5} color=\"#3b82f6\" />\n * <TypingIndicator dotSize={10} gap={6} />\n * ```\n */\nexport const TypingIndicator = forwardRef<HTMLDivElement, TypingIndicatorProps>(\n (\n {\n size,\n color = '#3b82f6',\n dotCount = 3,\n dotSize = 8,\n gap = 4,\n variant = 'bounce',\n speed = 'normal',\n reverse = false,\n respectMotionPreference = true,\n className,\n style,\n testId = 'typing-indicator',\n visible = true,\n ariaLabel = 'Typing...',\n ...rest\n },\n ref\n ) => {\n if (!visible) return null;\n\n const prefersReducedMotion = useReducedMotion();\n const effectiveDuration = getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);\n const gapValue = normalizeSize(gap);\n\n return (\n <div\n ref={ref}\n data-testid={testId}\n className={cn('inline-flex items-center', className)}\n style={{\n gap: gapValue,\n height: size ? normalizeSize(size) : 'auto',\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: `typing-${variant} ${effectiveDuration} ease-in-out infinite`,\n animationDelay: reverse ? `${(dotCount - index - 1) * 0.2}s` : `${index * 0.2}s`,\n }}\n />\n ))}\n </div>\n );\n }\n);\n\nTypingIndicator.displayName = 'TypingIndicator';\n"],"names":["forwardRef","useReducedMotion","getEffectiveDuration","normalizeSize","jsx","cn"],"mappings":";;;;;;;AAiBO,MAAM,kBAAkBA,MAAAA;AAAAA,EAC7B,CACE;AAAA,IACE;AAAA,IACA,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,UAAU;AAAA,IACV,MAAM;AAAA,IACN,UAAU;AAAA,IACV,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,0BAA0B;AAAA,IAC1B;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,uBAAuBC,MAAAA,iBAAA;AAC7B,UAAM,oBAAoBC,MAAAA,qBAAqB,OAAO,yBAAyB,oBAAoB;AACnG,UAAM,WAAWC,OAAAA,cAAc,GAAG;AAElC,WACEC,2BAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,eAAa;AAAA,QACb,WAAWC,WAAAA,GAAG,4BAA4B,SAAS;AAAA,QACnD,OAAO;AAAA,UACL,KAAK;AAAA,UACL,QAAQ,OAAOF,qBAAc,IAAI,IAAI;AAAA,UACrC,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,UACxCC,2BAAAA;AAAAA,UAAC;AAAA,UAAA;AAAA,YAEC,WAAU;AAAA,YACV,OAAO;AAAA,cACL,OAAOD,OAAAA,cAAc,OAAO;AAAA,cAC5B,QAAQA,OAAAA,cAAc,OAAO;AAAA,cAC7B,iBAAiB;AAAA,cACjB,WAAW,UAAU,OAAO,IAAI,iBAAiB;AAAA,cACjD,gBAAgB,UAAU,IAAI,WAAW,QAAQ,KAAK,GAAG,MAAM,GAAG,QAAQ,GAAG;AAAA,YAAA;AAAA,UAC/E;AAAA,UARK;AAAA,QAAA,CAUR;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;AAEA,gBAAgB,cAAc;;"}
1
+ {"version":3,"file":"index28.cjs","sources":["../src/components/pulse/TypingIndicator.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { TypingIndicatorProps } from '../../types';\nimport { cn, normalizeSize, useReducedMotion, getEffectiveDuration, useLoaderVisibility } from '../../utils';\n\n/**\n * TypingIndicator - Chat typing indicator\n *\n * A loader for messaging/chat applications showing typing activity.\n *\n * @example\n * ```tsx\n * <TypingIndicator />\n * <TypingIndicator variant=\"fade\" />\n * <TypingIndicator dotCount={5} color=\"#3b82f6\" />\n * <TypingIndicator dotSize={10} gap={6} />\n * ```\n */\nexport const TypingIndicator = forwardRef<HTMLDivElement, TypingIndicatorProps>(\n (\n {\n size,\n color = '#3b82f6',\n dotCount = 3,\n dotSize = 8,\n gap = 4,\n variant = 'bounce',\n speed = 'normal',\n reverse = false,\n respectMotionPreference = true,\n delay = 0,\n minDuration = 0,\n transition,\n className,\n style,\n testId = 'typing-indicator',\n visible = true,\n ariaLabel = 'Typing...',\n ...rest\n },\n ref\n ) => {\n const prefersReducedMotion = useReducedMotion();\n const effectiveDuration = getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);\n const { shouldRender, opacity, transitionStyle } = useLoaderVisibility(\n visible,\n delay,\n minDuration,\n transition\n );\n\n if (!shouldRender) return null;\n const gapValue = normalizeSize(gap);\n\n return (\n <div\n ref={ref}\n data-testid={testId}\n className={cn('inline-flex items-center', className)}\n style={{\n gap: gapValue,\n height: size ? normalizeSize(size) : 'auto',\n ...style,\n opacity,\n transition: transitionStyle,\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: `typing-${variant} ${effectiveDuration} ease-in-out infinite`,\n animationDelay: reverse ? `${(dotCount - index - 1) * 0.2}s` : `${index * 0.2}s`,\n }}\n />\n ))}\n </div>\n );\n }\n);\n\nTypingIndicator.displayName = 'TypingIndicator';\n"],"names":["forwardRef","useReducedMotion","getEffectiveDuration","useLoaderVisibility","normalizeSize","jsx","cn"],"mappings":";;;;;;;AAiBO,MAAM,kBAAkBA,MAAAA;AAAAA,EAC7B,CACE;AAAA,IACE;AAAA,IACA,QAAQ;AAAA,IACR,WAAW;AA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Q,GAAG;AAAA,YAAA;AAAA,UAC/E;AAAA,UARK;AAAA,QAAA,CAUR;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;AAEA,gBAAgB,cAAc;;"}
package/dist/index28.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
- import { useReducedMotion, getEffectiveDuration } from "./index31.js";
3
+ import { useReducedMotion, useLoaderVisibility, getEffectiveDuration } from "./index31.js";
4
4
  import { normalizeSize } from "./index4.js";
5
5
  import { cn } from "./index3.js";
6
6
  const TypingIndicator = forwardRef(
@@ -14,6 +14,9 @@ const TypingIndicator = forwardRef(
14
14
  speed = "normal",
15
15
  reverse = false,
16
16
  respectMotionPreference = true,
17
+ delay = 0,
18
+ minDuration = 0,
19
+ transition,
17
20
  className,
18
21
  style,
19
22
  testId = "typing-indicator",
@@ -21,9 +24,15 @@ const TypingIndicator = forwardRef(
21
24
  ariaLabel = "Typing...",
22
25
  ...rest
23
26
  }, ref) => {
24
- if (!visible) return null;
25
27
  const prefersReducedMotion = useReducedMotion();
26
28
  const effectiveDuration = getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);
29
+ const { shouldRender, opacity, transitionStyle } = useLoaderVisibility(
30
+ visible,
31
+ delay,
32
+ minDuration,
33
+ transition
34
+ );
35
+ if (!shouldRender) return null;
27
36
  const gapValue = normalizeSize(gap);
28
37
  return /* @__PURE__ */ jsx(
29
38
  "div",
@@ -34,7 +43,9 @@ const TypingIndicator = forwardRef(
34
43
  style: {
35
44
  gap: gapValue,
36
45
  height: size ? normalizeSize(size) : "auto",
37
- ...style
46
+ ...style,
47
+ opacity,
48
+ transition: transitionStyle
38
49
  },
39
50
  role: "status",
40
51
  "aria-label": ariaLabel,
@@ -1 +1 @@
1
- {"version":3,"file":"index28.js","sources":["../src/components/pulse/TypingIndicator.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { TypingIndicatorProps } from '../../types';\nimport { cn, normalizeSize, useReducedMotion, getEffectiveDuration } from '../../utils';\n\n/**\n * TypingIndicator - Chat typing indicator\n *\n * A loader for messaging/chat applications showing typing activity.\n *\n * @example\n * ```tsx\n * <TypingIndicator />\n * <TypingIndicator variant=\"fade\" />\n * <TypingIndicator dotCount={5} color=\"#3b82f6\" />\n * <TypingIndicator dotSize={10} gap={6} />\n * ```\n */\nexport const TypingIndicator = forwardRef<HTMLDivElement, TypingIndicatorProps>(\n (\n {\n size,\n color = '#3b82f6',\n dotCount = 3,\n dotSize = 8,\n gap = 4,\n variant = 'bounce',\n speed = 'normal',\n reverse = false,\n respectMotionPreference = true,\n className,\n style,\n testId = 'typing-indicator',\n visible = true,\n ariaLabel = 'Typing...',\n ...rest\n },\n ref\n ) => {\n if (!visible) return null;\n\n const prefersReducedMotion = useReducedMotion();\n const effectiveDuration = getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);\n const gapValue = normalizeSize(gap);\n\n return (\n <div\n ref={ref}\n data-testid={testId}\n className={cn('inline-flex items-center', className)}\n style={{\n gap: gapValue,\n height: size ? normalizeSize(size) : 'auto',\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: `typing-${variant} ${effectiveDuration} ease-in-out infinite`,\n animationDelay: reverse ? `${(dotCount - index - 1) * 0.2}s` : `${index * 0.2}s`,\n }}\n />\n ))}\n </div>\n );\n }\n);\n\nTypingIndicator.displayName = 'TypingIndicator';\n"],"names":[],"mappings":";;;;;AAiBO,MAAM,kBAAkB;AAAA,EAC7B,CACE;AAAA,IACE;AAAA,IACA,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,UAAU;AAAA,IACV,MAAM;AAAA,IACN,UAAU;AAAA,IACV,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,0BAA0B;AAAA,IAC1B;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,uBAAuB,iBAAA;AAC7B,UAAM,oBAAoB,qBAAqB,OAAO,yBAAyB,oBAAoB;AACnG,UAAM,WAAW,cAAc,GAAG;AAElC,WACE;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,eAAa;AAAA,QACb,WAAW,GAAG,4BAA4B,SAAS;AAAA,QACnD,OAAO;AAAA,UACL,KAAK;AAAA,UACL,QAAQ,OAAO,cAAc,IAAI,IAAI;AAAA,UACrC,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,UAAU,OAAO,IAAI,iBAAiB;AAAA,cACjD,gBAAgB,UAAU,IAAI,WAAW,QAAQ,KAAK,GAAG,MAAM,GAAG,QAAQ,GAAG;AAAA,YAAA;AAAA,UAC/E;AAAA,UARK;AAAA,QAAA,CAUR;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;AAEA,gBAAgB,cAAc;"}
1
+ {"version":3,"file":"index28.js","sources":["../src/components/pulse/TypingIndicator.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { TypingIndicatorProps } from '../../types';\nimport { cn, normalizeSize, useReducedMotion, getEffectiveDuration, useLoaderVisibility } from '../../utils';\n\n/**\n * TypingIndicator - Chat typing indicator\n *\n * A loader for messaging/chat applications showing typing activity.\n *\n * @example\n * ```tsx\n * <TypingIndicator />\n * <TypingIndicator variant=\"fade\" />\n * <TypingIndicator dotCount={5} color=\"#3b82f6\" />\n * <TypingIndicator dotSize={10} gap={6} />\n * ```\n */\nexport const TypingIndicator = forwardRef<HTMLDivElement, TypingIndicatorProps>(\n (\n {\n size,\n color = '#3b82f6',\n dotCount = 3,\n dotSize = 8,\n gap = 4,\n variant = 'bounce',\n speed = 'normal',\n reverse = false,\n respectMotionPreference = true,\n delay = 0,\n minDuration = 0,\n transition,\n className,\n style,\n testId = 'typing-indicator',\n visible = true,\n ariaLabel = 'Typing...',\n ...rest\n },\n ref\n ) => {\n const prefersReducedMotion = useReducedMotion();\n const effectiveDuration = getEffectiveDuration(speed, respectMotionPreference, prefersReducedMotion);\n const { shouldRender, opacity, transitionStyle } = useLoaderVisibility(\n visible,\n delay,\n minDuration,\n transition\n );\n\n if (!shouldRender) return null;\n const gapValue = normalizeSize(gap);\n\n return (\n <div\n ref={ref}\n data-testid={testId}\n className={cn('inline-flex items-center', className)}\n style={{\n gap: gapValue,\n height: size ? normalizeSize(size) : 'auto',\n ...style,\n opacity,\n transition: transitionStyle,\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: `typing-${variant} ${effectiveDuration} ease-in-out infinite`,\n animationDelay: reverse ? `${(dotCount - index - 1) * 0.2}s` : `${index * 0.2}s`,\n }}\n />\n ))}\n </div>\n );\n }\n);\n\nTypingIndicator.displayName = 'TypingIndicator';\n"],"names":[],"mappings":";;;;;AAiBO,MAAM,kBAAkB;AAAA,EAC7B,CACE;AAAA,IACE;AAAA,IACA,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,UAAU;AAAA,IACV,MAAM;AAAA,IACN,UAAU;AAAA,IACV,QAAQ;A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