@forgedevstack/bear 1.0.8 → 1.0.9

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 (193) hide show
  1. package/dist/components/ActivityItem/ActivityItem.cjs +1 -1
  2. package/dist/components/ActivityItem/ActivityItem.js +1 -0
  3. package/dist/components/Alert/Alert.const.cjs +1 -1
  4. package/dist/components/Alert/Alert.const.js +3 -2
  5. package/dist/components/AppBar/AppBar.cjs +1 -1
  6. package/dist/components/AppBar/AppBar.js +3 -2
  7. package/dist/components/Badge/Badge.cjs +1 -1
  8. package/dist/components/Badge/Badge.js +15 -14
  9. package/dist/components/BearLogo/EmberLogo.cjs +1 -1
  10. package/dist/components/BearLogo/EmberLogo.js +3 -2
  11. package/dist/components/BottomNavigation/BottomNavigation.cjs +1 -1
  12. package/dist/components/BottomNavigation/BottomNavigation.js +3 -2
  13. package/dist/components/Carousel/Carousel.cjs +1 -1
  14. package/dist/components/Carousel/Carousel.const.cjs +1 -0
  15. package/dist/components/Carousel/Carousel.const.d.ts +12 -0
  16. package/dist/components/Carousel/Carousel.const.js +9 -0
  17. package/dist/components/Carousel/Carousel.d.ts +14 -3
  18. package/dist/components/Carousel/Carousel.js +222 -75
  19. package/dist/components/Carousel/Carousel.types.d.ts +32 -2
  20. package/dist/components/Carousel/index.d.ts +1 -1
  21. package/dist/components/Chip/Chip.cjs +1 -1
  22. package/dist/components/Chip/Chip.js +3 -2
  23. package/dist/components/CodeEditor/CodeEditor.cjs +5 -0
  24. package/dist/components/CodeEditor/CodeEditor.const.cjs +1 -0
  25. package/dist/components/CodeEditor/CodeEditor.const.d.ts +21 -0
  26. package/dist/components/CodeEditor/CodeEditor.const.js +119 -0
  27. package/dist/components/CodeEditor/CodeEditor.d.ts +22 -0
  28. package/dist/components/CodeEditor/CodeEditor.js +250 -0
  29. package/dist/components/CodeEditor/CodeEditor.types.d.ts +80 -0
  30. package/dist/components/CodeEditor/CodeEditor.utils.cjs +1 -0
  31. package/dist/components/CodeEditor/CodeEditor.utils.d.ts +6 -0
  32. package/dist/components/CodeEditor/CodeEditor.utils.js +75 -0
  33. package/dist/components/CodeEditor/index.d.ts +2 -0
  34. package/dist/components/Columns/Columns.cjs +1 -1
  35. package/dist/components/Columns/Columns.js +9 -8
  36. package/dist/components/CountdownTimer/CountdownTimer.cjs +1 -0
  37. package/dist/components/CountdownTimer/CountdownTimer.const.cjs +1 -0
  38. package/dist/components/CountdownTimer/CountdownTimer.const.d.ts +27 -0
  39. package/dist/components/CountdownTimer/CountdownTimer.const.js +35 -0
  40. package/dist/components/CountdownTimer/CountdownTimer.d.ts +7 -0
  41. package/dist/components/CountdownTimer/CountdownTimer.js +115 -0
  42. package/dist/components/CountdownTimer/CountdownTimer.types.d.ts +56 -0
  43. package/dist/components/CountdownTimer/index.d.ts +2 -0
  44. package/dist/components/Cropper/Cropper.cjs +1 -0
  45. package/dist/components/Cropper/Cropper.const.cjs +1 -0
  46. package/dist/components/Cropper/Cropper.const.d.ts +31 -0
  47. package/dist/components/Cropper/Cropper.const.js +33 -0
  48. package/dist/components/Cropper/Cropper.d.ts +21 -0
  49. package/dist/components/Cropper/Cropper.js +362 -0
  50. package/dist/components/Cropper/Cropper.types.d.ts +72 -0
  51. package/dist/components/Cropper/index.d.ts +2 -0
  52. package/dist/components/DataTable/DataTable.cjs +1 -1
  53. package/dist/components/DataTable/DataTable.js +5 -4
  54. package/dist/components/Divider/Divider.cjs +1 -1
  55. package/dist/components/Divider/Divider.js +15 -14
  56. package/dist/components/Dock/Dock.cjs +1 -0
  57. package/dist/components/Dock/Dock.const.cjs +1 -0
  58. package/dist/components/Dock/Dock.const.d.ts +25 -0
  59. package/dist/components/Dock/Dock.const.js +22 -0
  60. package/dist/components/Dock/Dock.d.ts +7 -0
  61. package/dist/components/Dock/Dock.js +144 -0
  62. package/dist/components/Dock/Dock.types.d.ts +42 -0
  63. package/dist/components/Dock/index.d.ts +2 -0
  64. package/dist/components/EmptyState/EmptyState.cjs +1 -1
  65. package/dist/components/EmptyState/EmptyState.js +7 -6
  66. package/dist/components/GradientText/GradientText.cjs +1 -0
  67. package/dist/components/GradientText/GradientText.const.cjs +1 -0
  68. package/dist/components/GradientText/GradientText.const.d.ts +15 -0
  69. package/dist/components/GradientText/GradientText.const.js +36 -0
  70. package/dist/components/GradientText/GradientText.d.ts +7 -0
  71. package/dist/components/GradientText/GradientText.js +52 -0
  72. package/dist/components/GradientText/GradientText.types.d.ts +27 -0
  73. package/dist/components/GradientText/index.d.ts +2 -0
  74. package/dist/components/Highlight/Highlight.cjs +1 -1
  75. package/dist/components/Highlight/Highlight.const.cjs +1 -0
  76. package/dist/components/Highlight/Highlight.const.d.ts +8 -0
  77. package/dist/components/Highlight/Highlight.const.js +15 -0
  78. package/dist/components/Highlight/Highlight.d.ts +4 -0
  79. package/dist/components/Highlight/Highlight.js +32 -24
  80. package/dist/components/Highlight/Highlight.types.d.ts +9 -1
  81. package/dist/components/Highlight/index.d.ts +1 -1
  82. package/dist/components/Icon/Icon.cjs +1 -1
  83. package/dist/components/Icon/Icon.js +17 -16
  84. package/dist/components/Icon/index.cjs +1 -1
  85. package/dist/components/Icon/index.js +12 -11
  86. package/dist/components/Kbd/Kbd.cjs +1 -1
  87. package/dist/components/Kbd/Kbd.js +17 -16
  88. package/dist/components/Map/Map.cjs +1 -0
  89. package/dist/components/Map/Map.const.cjs +1 -0
  90. package/dist/components/Map/Map.const.d.ts +20 -0
  91. package/dist/components/Map/Map.const.js +26 -0
  92. package/dist/components/Map/Map.d.ts +20 -0
  93. package/dist/components/Map/Map.js +259 -0
  94. package/dist/components/Map/Map.types.d.ts +81 -0
  95. package/dist/components/Map/index.d.ts +2 -0
  96. package/dist/components/Marquee/Marquee.cjs +1 -0
  97. package/dist/components/Marquee/Marquee.const.cjs +1 -0
  98. package/dist/components/Marquee/Marquee.const.d.ts +11 -0
  99. package/dist/components/Marquee/Marquee.const.js +12 -0
  100. package/dist/components/Marquee/Marquee.d.ts +7 -0
  101. package/dist/components/Marquee/Marquee.js +106 -0
  102. package/dist/components/Marquee/Marquee.types.d.ts +32 -0
  103. package/dist/components/Marquee/index.d.ts +2 -0
  104. package/dist/components/Masonry/Masonry.cjs +1 -0
  105. package/dist/components/Masonry/Masonry.const.cjs +1 -0
  106. package/dist/components/Masonry/Masonry.const.d.ts +9 -0
  107. package/dist/components/Masonry/Masonry.const.js +9 -0
  108. package/dist/components/Masonry/Masonry.d.ts +7 -0
  109. package/dist/components/Masonry/Masonry.js +51 -0
  110. package/dist/components/Masonry/Masonry.types.d.ts +21 -0
  111. package/dist/components/Masonry/index.d.ts +2 -0
  112. package/dist/components/NavigableSelect/NavigableSelect.cjs +1 -0
  113. package/dist/components/NavigableSelect/NavigableSelect.const.cjs +1 -0
  114. package/dist/components/NavigableSelect/NavigableSelect.const.d.ts +23 -0
  115. package/dist/components/NavigableSelect/NavigableSelect.const.js +33 -0
  116. package/dist/components/NavigableSelect/NavigableSelect.d.ts +7 -0
  117. package/dist/components/NavigableSelect/NavigableSelect.js +361 -0
  118. package/dist/components/NavigableSelect/NavigableSelect.types.d.ts +56 -0
  119. package/dist/components/NavigableSelect/index.d.ts +2 -0
  120. package/dist/components/Progress/Progress.cjs +1 -1
  121. package/dist/components/Progress/Progress.js +3 -2
  122. package/dist/components/RichEditor/components/ToolbarButton/ToolbarButton.cjs +1 -1
  123. package/dist/components/RichEditor/components/ToolbarButton/ToolbarButton.js +3 -2
  124. package/dist/components/ScrollArea/ScrollArea.cjs +1 -1
  125. package/dist/components/ScrollArea/ScrollArea.js +3 -2
  126. package/dist/components/Sidebar/Sidebar.cjs +1 -1
  127. package/dist/components/Sidebar/Sidebar.js +13 -12
  128. package/dist/components/Spinner/Spinner.cjs +1 -1
  129. package/dist/components/Spinner/Spinner.js +3 -2
  130. package/dist/components/Spotlight/Spotlight.cjs +1 -0
  131. package/dist/components/Spotlight/Spotlight.const.cjs +1 -0
  132. package/dist/components/Spotlight/Spotlight.const.d.ts +18 -0
  133. package/dist/components/Spotlight/Spotlight.const.js +9 -0
  134. package/dist/components/Spotlight/Spotlight.d.ts +7 -0
  135. package/dist/components/Spotlight/Spotlight.js +220 -0
  136. package/dist/components/Spotlight/Spotlight.types.d.ts +51 -0
  137. package/dist/components/Spotlight/index.d.ts +2 -0
  138. package/dist/components/StatCard/StatCard.cjs +1 -1
  139. package/dist/components/StatCard/StatCard.js +9 -8
  140. package/dist/components/Statistic/Statistic.cjs +1 -1
  141. package/dist/components/Statistic/Statistic.js +7 -6
  142. package/dist/components/Switch/Switch.cjs +1 -1
  143. package/dist/components/Switch/Switch.js +11 -10
  144. package/dist/components/TimePicker/components/TimePickerColumnsDropdown/TimePickerColumnsDropdown.cjs +1 -1
  145. package/dist/components/TimePicker/components/TimePickerColumnsDropdown/TimePickerColumnsDropdown.js +16 -15
  146. package/dist/components/TimePicker/helpers/ClockFaceSvg.cjs +1 -1
  147. package/dist/components/TimePicker/helpers/ClockFaceSvg.js +13 -12
  148. package/dist/components/Transition/Transition.cjs +1 -0
  149. package/dist/components/Transition/Transition.const.cjs +1 -0
  150. package/dist/components/Transition/Transition.const.d.ts +15 -0
  151. package/dist/components/Transition/Transition.const.js +73 -0
  152. package/dist/components/Transition/Transition.d.ts +37 -0
  153. package/dist/components/Transition/Transition.js +107 -0
  154. package/dist/components/Transition/Transition.types.d.ts +69 -0
  155. package/dist/components/Transition/index.d.ts +2 -0
  156. package/dist/components/Typewriter/Typewriter.cjs +1 -0
  157. package/dist/components/Typewriter/Typewriter.const.cjs +1 -0
  158. package/dist/components/Typewriter/Typewriter.const.d.ts +22 -0
  159. package/dist/components/Typewriter/Typewriter.const.js +11 -0
  160. package/dist/components/Typewriter/Typewriter.d.ts +7 -0
  161. package/dist/components/Typewriter/Typewriter.js +88 -0
  162. package/dist/components/Typewriter/Typewriter.types.d.ts +32 -0
  163. package/dist/components/Typewriter/index.d.ts +2 -0
  164. package/dist/components/Watermark/Watermark.cjs +1 -0
  165. package/dist/components/Watermark/Watermark.const.cjs +1 -0
  166. package/dist/components/Watermark/Watermark.const.d.ts +30 -0
  167. package/dist/components/Watermark/Watermark.const.js +18 -0
  168. package/dist/components/Watermark/Watermark.d.ts +7 -0
  169. package/dist/components/Watermark/Watermark.js +96 -0
  170. package/dist/components/Watermark/Watermark.types.d.ts +35 -0
  171. package/dist/components/Watermark/index.d.ts +2 -0
  172. package/dist/components/index.cjs +1 -1
  173. package/dist/components/index.d.ts +27 -1
  174. package/dist/components/index.js +231 -204
  175. package/dist/hooks/index.cjs +1 -1
  176. package/dist/hooks/index.d.ts +4 -0
  177. package/dist/hooks/index.js +24 -19
  178. package/dist/hooks/useAnimate.cjs +1 -0
  179. package/dist/hooks/useAnimate.d.ts +61 -0
  180. package/dist/hooks/useAnimate.js +125 -0
  181. package/dist/hooks/useResponsive.cjs +1 -0
  182. package/dist/hooks/useResponsive.d.ts +35 -0
  183. package/dist/hooks/useResponsive.js +74 -0
  184. package/dist/index.cjs +1 -1
  185. package/dist/index.js +324 -290
  186. package/dist/styles.css +1 -1
  187. package/dist/utils/createSlots.cjs +1 -0
  188. package/dist/utils/createSlots.d.ts +70 -0
  189. package/dist/utils/createSlots.js +65 -0
  190. package/dist/utils/index.cjs +1 -1
  191. package/dist/utils/index.d.ts +2 -0
  192. package/dist/utils/index.js +4 -2
  193. package/package.json +1 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("../../utils/cn.cjs"),m=({icon:s,iconBg:r="rgba(16, 185, 129, 0.2)",title:a,description:i,user:t,time:l,onClick:c,className:n,...x})=>e.jsxs("div",{className:d.cn("flex items-start gap-4 p-4 hover:bg-slate-700/30 dark:hover:bg-slate-700/30 rounded-xl transition-colors cursor-pointer",n),onClick:c,...x,children:[e.jsx("div",{className:"flex items-center justify-center w-10 h-10 rounded-xl flex-shrink-0",style:{background:r},children:s}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-gray-900 dark:text-white font-medium truncate",children:a}),e.jsx("p",{className:"text-gray-500 dark:text-slate-400 text-sm truncate",children:i})]}),e.jsxs("div",{className:"text-right flex-shrink-0",children:[e.jsx("p",{className:"text-gray-500 dark:text-slate-400 text-sm",children:l}),t&&e.jsx("p",{className:"text-gray-400 dark:text-slate-500 text-xs",children:t})]})]});exports.ActivityItem=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("../../utils/cn.cjs");require("react");const m=({icon:s,iconBg:r="rgba(16, 185, 129, 0.2)",title:a,description:i,user:t,time:l,onClick:c,className:n,...x})=>e.jsxs("div",{className:d.cn("flex items-start gap-4 p-4 hover:bg-slate-700/30 dark:hover:bg-slate-700/30 rounded-xl transition-colors cursor-pointer",n),onClick:c,...x,children:[e.jsx("div",{className:"flex items-center justify-center w-10 h-10 rounded-xl flex-shrink-0",style:{background:r},children:s}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-gray-900 dark:text-white font-medium truncate",children:a}),e.jsx("p",{className:"text-gray-500 dark:text-slate-400 text-sm truncate",children:i})]}),e.jsxs("div",{className:"text-right flex-shrink-0",children:[e.jsx("p",{className:"text-gray-500 dark:text-slate-400 text-sm",children:l}),t&&e.jsx("p",{className:"text-gray-400 dark:text-slate-500 text-xs",children:t})]})]});exports.ActivityItem=m;
@@ -1,5 +1,6 @@
1
1
  import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
2
  import { cn as m } from "../../utils/cn.js";
3
+ import "react";
3
4
  const g = ({
4
5
  icon: a,
5
6
  iconBg: s = "rgba(16, 185, 129, 0.2)",
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../utils/cn.cjs"),a={filled:e=>r.cn("bear-text-white bear-alert-filled",e==="success"&&"bear-alert-filled-success",e==="info"&&"bear-alert-filled-info",e==="warning"&&"bear-alert-filled-warning",e==="error"&&"bear-alert-filled-error"),outlined:()=>"bear-bg-transparent bear-border",standard:()=>""},l={SEVERITY:"info",VARIANT:"standard",SHOW_ICON:!0,CLOSABLE:!1};exports.ALERT_DEFAULTS=l;exports.ALERT_VARIANT_CLASSES=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../utils/cn.cjs");require("react");const a={filled:e=>r.cn("bear-text-white bear-alert-filled",e==="success"&&"bear-alert-filled-success",e==="info"&&"bear-alert-filled-info",e==="warning"&&"bear-alert-filled-warning",e==="error"&&"bear-alert-filled-error"),outlined:()=>"bear-bg-transparent bear-border",standard:()=>""},l={SEVERITY:"info",VARIANT:"standard",SHOW_ICON:!0,CLOSABLE:!1};exports.ALERT_DEFAULTS=l;exports.ALERT_VARIANT_CLASSES=a;
@@ -1,5 +1,6 @@
1
1
  import { cn as e } from "../../utils/cn.js";
2
- const l = {
2
+ import "react";
3
+ const t = {
3
4
  filled: (r) => e(
4
5
  "bear-text-white bear-alert-filled",
5
6
  r === "success" && "bear-alert-filled-success",
@@ -17,5 +18,5 @@ const l = {
17
18
  };
18
19
  export {
19
20
  n as ALERT_DEFAULTS,
20
- l as ALERT_VARIANT_CLASSES
21
+ t as ALERT_VARIANT_CLASSES
21
22
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),m=require("../../utils/cn.cjs"),g=({children:a,position:t="sticky",variant:b="default",color:r="primary",className:s,leftContent:i,rightContent:l,centerContent:c,elevation:n=!0})=>{const d={fixed:"bear-fixed bear-top-0 bear-left-0 bear-right-0 bear-z-50",sticky:"bear-sticky bear-top-0 bear-z-50",static:"bear-static",relative:"bear-relative"},o={default:"",transparent:"bear-bg-transparent",blur:"bear-backdrop-blur-md"},p={default:"bear-bg-white bear-text-gray-900 dark:bear-bg-zinc-900 dark:bear-text-white",primary:"bear-bg-pink-600 bear-text-white",dark:"bear-bg-gray-900 bear-text-white dark:bear-bg-black"},x=n?"bear-shadow-md bear-border-b bear-border-gray-200/10":"";return e.jsx("header",{className:m.cn("Bear-AppBar","bear-w-full bear-h-16 bear-px-4 bear-flex bear-items-center",d[t],o[b],p[r],x,s),style:{backgroundColor:r==="primary"?"var(--bear-primary-600)":void 0},children:a??e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"bear-flex bear-items-center bear-gap-4",children:i}),e.jsx("div",{className:"bear-flex-1 bear-flex bear-items-center bear-justify-center",children:c}),e.jsx("div",{className:"bear-flex bear-items-center bear-gap-4",children:l})]})})};exports.AppBar=g;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),m=require("../../utils/cn.cjs");require("react");const u=({children:a,position:t="sticky",variant:b="default",color:r="primary",className:s,leftContent:i,rightContent:l,centerContent:c,elevation:n=!0})=>{const d={fixed:"bear-fixed bear-top-0 bear-left-0 bear-right-0 bear-z-50",sticky:"bear-sticky bear-top-0 bear-z-50",static:"bear-static",relative:"bear-relative"},o={default:"",transparent:"bear-bg-transparent",blur:"bear-backdrop-blur-md"},p={default:"bear-bg-white bear-text-gray-900 dark:bear-bg-zinc-900 dark:bear-text-white",primary:"bear-bg-pink-600 bear-text-white",dark:"bear-bg-gray-900 bear-text-white dark:bear-bg-black"},x=n?"bear-shadow-md bear-border-b bear-border-gray-200/10":"";return e.jsx("header",{className:m.cn("Bear-AppBar","bear-w-full bear-h-16 bear-px-4 bear-flex bear-items-center",d[t],o[b],p[r],x,s),style:{backgroundColor:r==="primary"?"var(--bear-primary-600)":void 0},children:a??e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"bear-flex bear-items-center bear-gap-4",children:i}),e.jsx("div",{className:"bear-flex-1 bear-flex bear-items-center bear-justify-center",children:c}),e.jsx("div",{className:"bear-flex bear-items-center bear-gap-4",children:l})]})})};exports.AppBar=u;
@@ -1,6 +1,7 @@
1
1
  import { jsx as e, jsxs as f, Fragment as x } from "react/jsx-runtime";
2
2
  import { cn as g } from "../../utils/cn.js";
3
- const k = ({
3
+ import "react";
4
+ const u = ({
4
5
  children: a,
5
6
  position: t = "sticky",
6
7
  variant: b = "default",
@@ -49,5 +50,5 @@ const k = ({
49
50
  );
50
51
  };
51
52
  export {
52
- k as AppBar
53
+ u as AppBar
53
54
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),r=require("../../utils/cn.cjs"),e=require("./Badge.constants.cjs"),u=({variant:s="neutral",size:n="sm",pill:t=!1,dot:d=!1,className:l,children:o,testId:c,...i})=>a.jsxs("span",{className:r.cn("Bear-Badge","bear-inline-flex bear-items-center bear-gap-1.5 bear-font-medium",e.sizeClasses[n],e.variantClasses[s],t?"Bear-Badge--pill bear-rounded-full":"bear-rounded-md",l),"data-testid":c,...i,children:[d&&a.jsx("span",{className:r.cn("Bear-Badge__dot",e.BADGE_DOT_SIZE_CLASSES,"bear-rounded-full",e.dotVariantColors[s])}),a.jsx("span",{className:"Bear-Badge__content",children:o})]});exports.Badge=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),r=require("../../utils/cn.cjs");require("react");const e=require("./Badge.constants.cjs"),u=({variant:s="neutral",size:n="sm",pill:t=!1,dot:d=!1,className:l,children:o,testId:i,...c})=>a.jsxs("span",{className:r.cn("Bear-Badge","bear-inline-flex bear-items-center bear-gap-1.5 bear-font-medium",e.sizeClasses[n],e.variantClasses[s],t?"Bear-Badge--pill bear-rounded-full":"bear-rounded-md",l),"data-testid":i,...c,children:[d&&a.jsx("span",{className:r.cn("Bear-Badge__dot",e.BADGE_DOT_SIZE_CLASSES,"bear-rounded-full",e.dotVariantColors[s])}),a.jsx("span",{className:"Bear-Badge__content",children:o})]});exports.Badge=u;
@@ -1,13 +1,14 @@
1
1
  import { jsxs as i, jsx as a } from "react/jsx-runtime";
2
2
  import { cn as r } from "../../utils/cn.js";
3
- import { dotVariantColors as B, BADGE_DOT_SIZE_CLASSES as f, variantClasses as p, sizeClasses as c } from "./Badge.constants.js";
4
- const g = ({
3
+ import "react";
4
+ import { dotVariantColors as p, BADGE_DOT_SIZE_CLASSES as B, variantClasses as f, sizeClasses as c } from "./Badge.constants.js";
5
+ const x = ({
5
6
  variant: e = "neutral",
6
7
  size: s = "sm",
7
- pill: d = !1,
8
- dot: l = !1,
9
- className: n,
10
- children: t,
8
+ pill: t = !1,
9
+ dot: d = !1,
10
+ className: l,
11
+ children: n,
11
12
  testId: o,
12
13
  ...m
13
14
  }) => /* @__PURE__ */ i(
@@ -17,28 +18,28 @@ const g = ({
17
18
  "Bear-Badge",
18
19
  "bear-inline-flex bear-items-center bear-gap-1.5 bear-font-medium",
19
20
  c[s],
20
- p[e],
21
- d ? "Bear-Badge--pill bear-rounded-full" : "bear-rounded-md",
22
- n
21
+ f[e],
22
+ t ? "Bear-Badge--pill bear-rounded-full" : "bear-rounded-md",
23
+ l
23
24
  ),
24
25
  "data-testid": o,
25
26
  ...m,
26
27
  children: [
27
- l && /* @__PURE__ */ a(
28
+ d && /* @__PURE__ */ a(
28
29
  "span",
29
30
  {
30
31
  className: r(
31
32
  "Bear-Badge__dot",
32
- f,
33
+ B,
33
34
  "bear-rounded-full",
34
- B[e]
35
+ p[e]
35
36
  )
36
37
  }
37
38
  ),
38
- /* @__PURE__ */ a("span", { className: "Bear-Badge__content", children: t })
39
+ /* @__PURE__ */ a("span", { className: "Bear-Badge__content", children: n })
39
40
  ]
40
41
  }
41
42
  );
42
43
  export {
43
- g as Badge
44
+ x as Badge
44
45
  };
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("../../utils/cn.cjs"),t=({size:r=48,className:o,animated:s=!1})=>e.jsxs("svg",{width:r,height:r,viewBox:"0 0 100 100",fill:"none",className:l.cn("bear-logo",s&&"bear-animate-bear-glow",o),children:[e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:"emberFlameGrad",x1:"50%",y1:"100%",x2:"50%",y2:"0%",children:[e.jsx("stop",{offset:"0%",stopColor:"#ea580c"}),e.jsx("stop",{offset:"30%",stopColor:"#f97316"}),e.jsx("stop",{offset:"60%",stopColor:"#fb923c"}),e.jsx("stop",{offset:"100%",stopColor:"#fed7aa"})]}),e.jsxs("linearGradient",{id:"emberCoreGrad",x1:"50%",y1:"100%",x2:"50%",y2:"0%",children:[e.jsx("stop",{offset:"0%",stopColor:"#f97316"}),e.jsx("stop",{offset:"50%",stopColor:"#fbbf24"}),e.jsx("stop",{offset:"100%",stopColor:"#fef3c7"})]}),e.jsxs("filter",{id:"emberGlow",x:"-50%",y:"-50%",width:"200%",height:"200%",children:[e.jsx("feGaussianBlur",{stdDeviation:"3",result:"coloredBlur"}),e.jsxs("feMerge",{children:[e.jsx("feMergeNode",{in:"coloredBlur"}),e.jsx("feMergeNode",{in:"SourceGraphic"})]})]})]}),e.jsx("circle",{cx:"50",cy:"50",r:"45",fill:"#1a1a2e",stroke:"url(#emberFlameGrad)",strokeWidth:"2"}),e.jsx("path",{d:`M50 15
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("../../utils/cn.cjs");require("react");const t=({size:r=48,className:o,animated:s=!1})=>e.jsxs("svg",{width:r,height:r,viewBox:"0 0 100 100",fill:"none",className:l.cn("bear-logo",s&&"bear-animate-bear-glow",o),children:[e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:"emberFlameGrad",x1:"50%",y1:"100%",x2:"50%",y2:"0%",children:[e.jsx("stop",{offset:"0%",stopColor:"#ea580c"}),e.jsx("stop",{offset:"30%",stopColor:"#f97316"}),e.jsx("stop",{offset:"60%",stopColor:"#fb923c"}),e.jsx("stop",{offset:"100%",stopColor:"#fed7aa"})]}),e.jsxs("linearGradient",{id:"emberCoreGrad",x1:"50%",y1:"100%",x2:"50%",y2:"0%",children:[e.jsx("stop",{offset:"0%",stopColor:"#f97316"}),e.jsx("stop",{offset:"50%",stopColor:"#fbbf24"}),e.jsx("stop",{offset:"100%",stopColor:"#fef3c7"})]}),e.jsxs("filter",{id:"emberGlow",x:"-50%",y:"-50%",width:"200%",height:"200%",children:[e.jsx("feGaussianBlur",{stdDeviation:"3",result:"coloredBlur"}),e.jsxs("feMerge",{children:[e.jsx("feMergeNode",{in:"coloredBlur"}),e.jsx("feMergeNode",{in:"SourceGraphic"})]})]})]}),e.jsx("circle",{cx:"50",cy:"50",r:"45",fill:"#1a1a2e",stroke:"url(#emberFlameGrad)",strokeWidth:"2"}),e.jsx("path",{d:`M50 15
2
2
  C35 30 25 45 25 60
3
3
  C25 75 35 85 50 85
4
4
  C65 85 75 75 75 60
@@ -1,6 +1,7 @@
1
1
  import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
2
  import { cn as t } from "../../utils/cn.js";
3
- const c = ({
3
+ import "react";
4
+ const n = ({
4
5
  size: o = 48,
5
6
  className: l,
6
7
  animated: f = !1
@@ -87,5 +88,5 @@ const c = ({
87
88
  }
88
89
  );
89
90
  export {
90
- c as EmberLogo
91
+ n as EmberLogo
91
92
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),b=require("../../utils/cn.cjs"),u=({items:s,value:i,onChange:t,showLabels:n="active",variant:l="default",className:c})=>{const d={default:"bear-bg-zinc-900 bear-border-t bear-border-zinc-800",elevated:"bear-bg-zinc-900 bear-shadow-[0_-4px_20px_rgba(0,0,0,0.3)]",transparent:"bear-bg-zinc-900/80 bear-backdrop-blur-md bear-border-t bear-border-zinc-800/50"},o=e=>n===!0||n==="always"?!0:n==="active"?e:!1;return r.jsx("nav",{className:b.cn("bear-fixed bear-bottom-0 bear-left-0 bear-right-0 bear-z-50 bear-h-16 bear-flex bear-items-center bear-justify-around bear-px-2",d[l],c),children:s.map(e=>{const a=i===e.id;return r.jsxs("button",{onClick:()=>!e.disabled&&(t==null?void 0:t(e.id)),disabled:e.disabled,className:b.cn("bear-flex bear-flex-col bear-items-center bear-justify-center bear-flex-1 bear-h-full bear-py-2 bear-transition-all",a?"bear-text-pink-400":"bear-text-zinc-500 hover:bear-text-zinc-300",e.disabled&&"bear-opacity-50 bear-cursor-not-allowed"),children:[r.jsxs("div",{className:"bear-relative",children:[r.jsx("span",{className:b.cn("bear-transition-transform",a&&"bear-scale-110"),children:e.icon}),e.badge!==void 0&&r.jsx("span",{className:"bear-absolute -bear-top-1 -bear-right-1 bear-min-w-[16px] bear-h-4 bear-px-1 bear-flex bear-items-center bear-justify-center bear-text-xs bear-font-medium bear-bg-pink-500 bear-text-white bear-rounded-full",children:e.badge})]}),o(a)&&r.jsx("span",{className:b.cn("bear-text-xs bear-mt-1 bear-transition-all",a?"bear-font-medium":""),children:e.label})]},e.id)})})};exports.BottomNavigation=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),b=require("../../utils/cn.cjs");require("react");const u=({items:n,value:s,onChange:t,showLabels:i="active",variant:l="default",className:c})=>{const d={default:"bear-bg-zinc-900 bear-border-t bear-border-zinc-800",elevated:"bear-bg-zinc-900 bear-shadow-[0_-4px_20px_rgba(0,0,0,0.3)]",transparent:"bear-bg-zinc-900/80 bear-backdrop-blur-md bear-border-t bear-border-zinc-800/50"},o=e=>i===!0||i==="always"?!0:i==="active"?e:!1;return r.jsx("nav",{className:b.cn("bear-fixed bear-bottom-0 bear-left-0 bear-right-0 bear-z-50 bear-h-16 bear-flex bear-items-center bear-justify-around bear-px-2",d[l],c),children:n.map(e=>{const a=s===e.id;return r.jsxs("button",{onClick:()=>!e.disabled&&(t==null?void 0:t(e.id)),disabled:e.disabled,className:b.cn("bear-flex bear-flex-col bear-items-center bear-justify-center bear-flex-1 bear-h-full bear-py-2 bear-transition-all",a?"bear-text-pink-400":"bear-text-zinc-500 hover:bear-text-zinc-300",e.disabled&&"bear-opacity-50 bear-cursor-not-allowed"),children:[r.jsxs("div",{className:"bear-relative",children:[r.jsx("span",{className:b.cn("bear-transition-transform",a&&"bear-scale-110"),children:e.icon}),e.badge!==void 0&&r.jsx("span",{className:"bear-absolute -bear-top-1 -bear-right-1 bear-min-w-[16px] bear-h-4 bear-px-1 bear-flex bear-items-center bear-justify-center bear-text-xs bear-font-medium bear-bg-pink-500 bear-text-white bear-rounded-full",children:e.badge})]}),o(a)&&r.jsx("span",{className:b.cn("bear-text-xs bear-mt-1 bear-transition-all",a?"bear-font-medium":""),children:e.label})]},e.id)})})};exports.BottomNavigation=u;
@@ -1,6 +1,7 @@
1
1
  import { jsx as a, jsxs as l } from "react/jsx-runtime";
2
2
  import { cn as b } from "../../utils/cn.js";
3
- const p = ({
3
+ import "react";
4
+ const m = ({
4
5
  items: n,
5
6
  value: s,
6
7
  onChange: t,
@@ -45,5 +46,5 @@ const p = ({
45
46
  }) });
46
47
  };
47
48
  export {
48
- p as BottomNavigation
49
+ m as BottomNavigation
49
50
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),s=require("react"),b=require("../../utils/cn.cjs"),z=({children:M,autoPlay:l=0,showDots:I=!0,showArrows:T=!0,loop:c=!0,slidesToShow:n=1,gap:i=16,pauseOnHover:f=!0,onSlideChange:u,className:L,testId:$})=>{const[t,C]=s.useState(0),[x,m]=s.useState(!1),[y,E]=s.useState(null),[v,k]=s.useState(null),R=s.useRef(null),j=s.Children.toArray(M),d=j.length,o=Math.max(0,d-n);s.useEffect(()=>{if(l>0&&!x){const e=setInterval(()=>{g()},l);return()=>clearInterval(e)}},[l,x,t]);const h=e=>{let r=e;c?e<0?r=o:e>o&&(r=0):r=Math.max(0,Math.min(o,e)),C(r),u==null||u(r)},g=()=>h(t+1),w=()=>h(t-1),p=50,S=e=>{k(null),E(e.targetTouches[0].clientX)},q=e=>{k(e.targetTouches[0].clientX)},W=()=>{if(!y||!v)return;const e=y-v,r=e>p,X=e<-p;r?g():X&&w()},N=`calc((100% - ${i*(n-1)}px) / ${n})`;return a.jsxs("div",{ref:R,className:b.cn("bear-relative bear-overflow-hidden",L),onMouseEnter:()=>f&&m(!0),onMouseLeave:()=>f&&m(!1),onTouchStart:S,onTouchMove:q,onTouchEnd:W,"data-testid":$,children:[a.jsx("div",{className:"bear-flex bear-transition-transform bear-duration-500 bear-ease-out",style:{gap:`${i}px`,transform:`translateX(calc(-${t} * (${N} + ${i}px)))`},children:j.map((e,r)=>a.jsx("div",{className:"bear-shrink-0",style:{width:N},children:e},r))}),T&&d>n&&a.jsxs(a.Fragment,{children:[a.jsx("button",{onClick:w,disabled:!c&&t===0,className:b.cn("bear-absolute bear-left-2 bear-top-1/2 bear--translate-y-1/2","bear-w-10 bear-h-10 bear-rounded-full bear-flex bear-items-center bear-justify-center","bear-bg-white/90 dark:bear-bg-gray-800/90 bear-shadow-lg","bear-text-gray-700 dark:bear-text-gray-200","hover:bear-bg-white dark:hover:bear-bg-gray-700","bear-transition-all bear-z-10","disabled:bear-opacity-50 disabled:bear-cursor-not-allowed"),children:a.jsx("svg",{className:"bear-w-5 bear-h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),a.jsx("button",{onClick:g,disabled:!c&&t===o,className:b.cn("bear-absolute bear-right-2 bear-top-1/2 bear--translate-y-1/2","bear-w-10 bear-h-10 bear-rounded-full bear-flex bear-items-center bear-justify-center","bear-bg-white/90 dark:bear-bg-gray-800/90 bear-shadow-lg","bear-text-gray-700 dark:bear-text-gray-200","hover:bear-bg-white dark:hover:bear-bg-gray-700","bear-transition-all bear-z-10","disabled:bear-opacity-50 disabled:bear-cursor-not-allowed"),children:a.jsx("svg",{className:"bear-w-5 bear-h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})})]}),I&&d>n&&a.jsx("div",{className:"bear-flex bear-justify-center bear-gap-2 bear-mt-4",children:Array.from({length:o+1}).map((e,r)=>a.jsx("button",{onClick:()=>h(r),className:b.cn("bear-w-2.5 bear-h-2.5 bear-rounded-full bear-transition-all",r===t?"bear-bg-pink-500 bear-w-6":"bear-bg-gray-300 dark:bear-bg-gray-600 hover:bear-bg-gray-400 dark:hover:bear-bg-gray-500")},r))})]})};exports.Carousel=z;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),s=require("react"),i=require("../../utils/cn.cjs"),o=require("./Carousel.const.cjs"),le=({children:z,autoPlay:y=0,showDots:B=!0,showArrows:P=!0,loop:m=!0,slidesToShow:u=1,gap:x=16,pauseOnHover:_=!0,onSlideChange:k,transition:p="slide",transitionDuration:d=o.DEFAULT_TRANSITION_DURATION,indicator:v="dots",thumbnails:E,thumbnailSize:S=o.DEFAULT_THUMBNAIL_SIZE,keyboard:w=!0,draggable:A=!0,showProgress:G=!1,showCounter:X=!1,activeColor:h=o.DEFAULT_ACTIVE_COLOR,className:Z,style:q,testId:F})=>{const[t,H]=s.useState(0),[M,R]=s.useState(!1),[$,K]=s.useState(null),[C,O]=s.useState(null),[L,U]=s.useState(!1),V=s.useRef(null),I=s.useRef(null),N=s.Children.toArray(z),f=N.length,l=Math.max(0,f-u),n=s.useCallback(a=>{if(L)return;let e=a;m?a<0?e=l:a>l&&(e=0):e=Math.max(0,Math.min(l,a)),U(!0),H(e),k==null||k(e),setTimeout(()=>U(!1),d)},[L,m,l,k,d]),b=s.useCallback(()=>n(t+1),[n,t]),c=s.useCallback(()=>n(t-1),[n,t]);s.useEffect(()=>{if(y>0&&!M)return I.current=setInterval(b,y),()=>{I.current&&clearInterval(I.current)}},[y,M,b]);const Y=s.useCallback(a=>{w&&(a.key==="ArrowLeft"?c():a.key==="ArrowRight"&&b())},[w,c,b]),J=a=>{O(null),K(a.targetTouches[0].clientX)},Q=a=>{O(a.targetTouches[0].clientX)},ee=()=>{if(!$||!C)return;const a=$-C;a>o.MIN_SWIPE_DISTANCE?b():a<-o.MIN_SWIPE_DISTANCE&&c()},[T,j]=s.useState(!1),[W,ae]=s.useState(0),re=s.useCallback(a=>{A&&(j(!0),ae(a.clientX))},[A]),te=s.useCallback(a=>{if(!T)return;j(!1);const e=W-a.clientX;e>o.MIN_SWIPE_DISTANCE?b():e<-o.MIN_SWIPE_DISTANCE&&c()},[T,W,b,c]),D=`calc((100% - ${x*(u-1)}px) / ${u})`,se=a=>{const e=a===t,g=`${d}ms`;switch(p){case"fade":return{position:"absolute",inset:0,opacity:e?1:0,transition:`opacity ${g} ease-in-out`,zIndex:e?1:0,pointerEvents:e?"auto":"none"};case"zoom":return{position:"absolute",inset:0,opacity:e?1:0,transform:e?"scale(1)":"scale(0.85)",transition:`opacity ${g} ease, transform ${g} ease`,zIndex:e?1:0,pointerEvents:e?"auto":"none"};case"flip":return{position:"absolute",inset:0,opacity:e?1:0,transform:e?"rotateY(0deg)":"rotateY(90deg)",transition:`opacity ${g} ease, transform ${g} ease`,zIndex:e?1:0,pointerEvents:e?"auto":"none",backfaceVisibility:"hidden"};case"slide":default:return{}}},oe=p==="fade"||p==="zoom"||p==="flip";return r.jsxs("div",{ref:V,className:i.cn("bear-relative bear-overflow-hidden bear-outline-none",Z),style:q,onMouseEnter:()=>_&&R(!0),onMouseLeave:()=>{_&&R(!1),T&&j(!1)},onTouchStart:J,onTouchMove:Q,onTouchEnd:ee,onMouseDown:re,onMouseUp:te,onKeyDown:Y,tabIndex:w?0:void 0,"data-testid":F,role:"region","aria-label":"Carousel","aria-roledescription":"carousel",children:[G&&y>0&&r.jsx("div",{className:"bear-absolute bear-top-0 bear-left-0 bear-right-0 bear-z-20",style:{height:o.PROGRESS_BAR_HEIGHT},children:r.jsx("div",{className:"bear-h-full bear-transition-all bear-ease-linear",style:{width:`${(t+1)/f*100}%`,background:h,transition:`width ${d}ms ease`}})}),oe?r.jsx("div",{className:"bear-relative",style:{minHeight:200},children:N.map((a,e)=>r.jsx("div",{style:se(e),children:a},e))}):r.jsx("div",{className:"bear-flex",style:{gap:`${x}px`,transform:`translateX(calc(-${t} * (${D} + ${x}px)))`,transition:`transform ${d}ms cubic-bezier(0.25, 0.1, 0.25, 1)`},children:N.map((a,e)=>r.jsx("div",{className:"bear-shrink-0",style:{width:D},children:a},e))}),P&&f>u&&r.jsxs(r.Fragment,{children:[r.jsx("button",{onClick:c,disabled:!m&&t===0,className:i.cn("bear-absolute bear-left-2 bear-top-1/2 bear--translate-y-1/2","bear-rounded-full bear-flex bear-items-center bear-justify-center","bear-bg-white/90 dark:bear-bg-gray-800/90 bear-shadow-lg","bear-text-gray-700 dark:bear-text-gray-200","hover:bear-bg-white dark:hover:bear-bg-gray-700","bear-transition-all bear-z-10","disabled:bear-opacity-50 disabled:bear-cursor-not-allowed"),style:{width:o.ARROW_BUTTON_SIZE,height:o.ARROW_BUTTON_SIZE},"aria-label":"Previous slide",children:r.jsx("svg",{className:"bear-w-5 bear-h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),r.jsx("button",{onClick:b,disabled:!m&&t===l,className:i.cn("bear-absolute bear-right-2 bear-top-1/2 bear--translate-y-1/2","bear-rounded-full bear-flex bear-items-center bear-justify-center","bear-bg-white/90 dark:bear-bg-gray-800/90 bear-shadow-lg","bear-text-gray-700 dark:bear-text-gray-200","hover:bear-bg-white dark:hover:bear-bg-gray-700","bear-transition-all bear-z-10","disabled:bear-opacity-50 disabled:bear-cursor-not-allowed"),style:{width:o.ARROW_BUTTON_SIZE,height:o.ARROW_BUTTON_SIZE},"aria-label":"Next slide",children:r.jsx("svg",{className:"bear-w-5 bear-h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})})]}),X&&r.jsxs("div",{className:"bear-absolute bear-top-3 bear-right-3 bear-z-10 bear-bg-black/50 bear-text-white bear-text-xs bear-font-medium bear-px-2.5 bear-py-1 bear-rounded-full",children:[t+1," / ",f]}),B&&v!=="none"&&f>u&&r.jsx("div",{className:"bear-flex bear-justify-center bear-gap-2 bear-mt-4",children:v==="thumbnails"&&E?E.map((a,e)=>r.jsx("button",{onClick:()=>n(e),className:i.cn("bear-rounded bear-overflow-hidden bear-border-2 bear-transition-all",e===t?"bear-opacity-100 bear-scale-110":"bear-opacity-60 hover:bear-opacity-80"),style:{width:S,height:S,borderColor:e===t?h:"transparent"},"aria-label":`Go to slide ${e+1}`,children:r.jsx("img",{src:a,alt:"",className:"bear-w-full bear-h-full bear-object-cover"})},e)):v==="numbers"?Array.from({length:l+1}).map((a,e)=>r.jsx("button",{onClick:()=>n(e),className:i.cn("bear-w-7 bear-h-7 bear-rounded-full bear-text-xs bear-font-medium bear-transition-all","bear-flex bear-items-center bear-justify-center",e===t?"bear-text-white bear-shadow-md":"bear-bg-gray-200 dark:bear-bg-gray-600 bear-text-gray-600 dark:bear-text-gray-300 hover:bear-bg-gray-300 dark:hover:bear-bg-gray-500"),style:e===t?{background:h}:void 0,"aria-label":`Go to slide ${e+1}`,children:e+1},e)):v==="bars"?Array.from({length:l+1}).map((a,e)=>r.jsx("button",{onClick:()=>n(e),className:i.cn("bear-h-1 bear-rounded-full bear-transition-all",e===t?"bear-w-8":"bear-w-4 bear-bg-gray-300 dark:bear-bg-gray-600 hover:bear-bg-gray-400 dark:hover:bear-bg-gray-500"),style:e===t?{background:h}:void 0,"aria-label":`Go to slide ${e+1}`},e)):Array.from({length:l+1}).map((a,e)=>r.jsx("button",{onClick:()=>n(e),className:i.cn("bear-h-2.5 bear-rounded-full bear-transition-all",e===t?"bear-w-6":"bear-w-2.5 bear-bg-gray-300 dark:bear-bg-gray-600 hover:bear-bg-gray-400 dark:hover:bear-bg-gray-500"),style:e===t?{background:h}:void 0,"aria-label":`Go to slide ${e+1}`},e))})]})};exports.Carousel=le;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=500,_=50,I=48,A="var(--bear-primary-500)",E=40,R=3;exports.ARROW_BUTTON_SIZE=E;exports.DEFAULT_ACTIVE_COLOR=A;exports.DEFAULT_THUMBNAIL_SIZE=I;exports.DEFAULT_TRANSITION_DURATION=T;exports.MIN_SWIPE_DISTANCE=_;exports.PROGRESS_BAR_HEIGHT=R;
@@ -0,0 +1,12 @@
1
+ /** Default transition duration in ms */
2
+ export declare const DEFAULT_TRANSITION_DURATION = 500;
3
+ /** Min swipe distance to trigger navigation (px) */
4
+ export declare const MIN_SWIPE_DISTANCE = 50;
5
+ /** Default thumbnail size (px) */
6
+ export declare const DEFAULT_THUMBNAIL_SIZE = 48;
7
+ /** Default active color */
8
+ export declare const DEFAULT_ACTIVE_COLOR = "var(--bear-primary-500)";
9
+ /** Arrow button size (px) */
10
+ export declare const ARROW_BUTTON_SIZE = 40;
11
+ /** Progress bar height (px) */
12
+ export declare const PROGRESS_BAR_HEIGHT = 3;
@@ -0,0 +1,9 @@
1
+ const T = 500, _ = 50, I = 48, A = "var(--bear-primary-500)", E = 40, R = 3;
2
+ export {
3
+ E as ARROW_BUTTON_SIZE,
4
+ A as DEFAULT_ACTIVE_COLOR,
5
+ I as DEFAULT_THUMBNAIL_SIZE,
6
+ T as DEFAULT_TRANSITION_DURATION,
7
+ _ as MIN_SWIPE_DISTANCE,
8
+ R as PROGRESS_BAR_HEIGHT
9
+ };
@@ -1,14 +1,25 @@
1
1
  import { FC } from 'react';
2
2
  import { CarouselProps } from './Carousel.types';
3
3
  /**
4
- * Carousel - Sliding content carousel with touch support
4
+ * Carousel - Feature-rich sliding content carousel
5
+ *
6
+ * @description
7
+ * Supports slide, fade, zoom, and flip transitions, thumbnail indicators,
8
+ * keyboard navigation, drag/swipe, progress bar, and counter.
5
9
  *
6
10
  * @example
7
11
  * ```tsx
8
- * <Carousel autoPlay={5000} showDots showArrows>
12
+ * <Carousel
13
+ * autoPlay={5000}
14
+ * transition="fade"
15
+ * indicator="thumbnails"
16
+ * thumbnails={['/img1.jpg', '/img2.jpg']}
17
+ * showArrows
18
+ * showProgress
19
+ * keyboard
20
+ * >
9
21
  * <div>Slide 1</div>
10
22
  * <div>Slide 2</div>
11
- * <div>Slide 3</div>
12
23
  * </Carousel>
13
24
  * ```
14
25
  */
@@ -1,122 +1,269 @@
1
- import { jsxs as j, jsx as a, Fragment as D } from "react/jsx-runtime";
2
- import { useState as o, useRef as F, Children as P, useEffect as _ } from "react";
1
+ import { jsxs as M, jsx as t, Fragment as ce } from "react/jsx-runtime";
2
+ import { useState as n, useRef as X, Children as de, useCallback as c, useEffect as ue } from "react";
3
3
  import { cn as b } from "../../utils/cn.js";
4
- const K = ({
5
- children: I,
6
- autoPlay: l = 0,
7
- showDots: L = !0,
8
- showArrows: T = !0,
9
- loop: i = !0,
10
- slidesToShow: n = 1,
11
- gap: c = 16,
12
- pauseOnHover: g = !0,
13
- onSlideChange: d,
14
- className: $,
15
- testId: E
4
+ import { DEFAULT_TRANSITION_DURATION as he, MIN_SWIPE_DISTANCE as w, PROGRESS_BAR_HEIGHT as fe, DEFAULT_ACTIVE_COLOR as ge, ARROW_BUTTON_SIZE as N, DEFAULT_THUMBNAIL_SIZE as me } from "./Carousel.const.js";
5
+ const we = ({
6
+ children: F,
7
+ autoPlay: m = 0,
8
+ showDots: P = !0,
9
+ showArrows: H = !0,
10
+ loop: y = !0,
11
+ slidesToShow: d = 1,
12
+ gap: I = 16,
13
+ pauseOnHover: _ = !0,
14
+ onSlideChange: p,
15
+ transition: v = "slide",
16
+ transitionDuration: u = he,
17
+ indicator: k = "dots",
18
+ thumbnails: L,
19
+ thumbnailSize: R = me,
20
+ keyboard: T = !0,
21
+ draggable: j = !0,
22
+ showProgress: K = !1,
23
+ showCounter: V = !1,
24
+ activeColor: h = ge,
25
+ className: Y,
26
+ style: Z,
27
+ testId: q
16
28
  }) => {
17
- const [t, C] = o(0), [m, k] = o(!1), [v, R] = o(null), [y, x] = o(null), W = F(null), p = P.toArray(I), u = p.length, s = Math.max(0, u - n);
18
- _(() => {
19
- if (l > 0 && !m) {
20
- const e = setInterval(() => {
21
- f();
22
- }, l);
23
- return () => clearInterval(e);
29
+ const [a, J] = n(0), [z, C] = n(!1), [U, Q] = n(null), [D, S] = n(null), [G, O] = n(!1), ee = X(null), $ = X(null), x = de.toArray(F), f = x.length, s = Math.max(0, f - d), o = c(
30
+ (r) => {
31
+ if (G) return;
32
+ let e = r;
33
+ y ? r < 0 ? e = s : r > s && (e = 0) : e = Math.max(0, Math.min(s, r)), O(!0), J(e), p == null || p(e), setTimeout(() => O(!1), u);
34
+ },
35
+ [G, y, s, p, u]
36
+ ), l = c(() => o(a + 1), [o, a]), i = c(() => o(a - 1), [o, a]);
37
+ ue(() => {
38
+ if (m > 0 && !z)
39
+ return $.current = setInterval(l, m), () => {
40
+ $.current && clearInterval($.current);
41
+ };
42
+ }, [m, z, l]);
43
+ const re = c(
44
+ (r) => {
45
+ T && (r.key === "ArrowLeft" ? i() : r.key === "ArrowRight" && l());
46
+ },
47
+ [T, i, l]
48
+ ), ae = (r) => {
49
+ S(null), Q(r.targetTouches[0].clientX);
50
+ }, te = (r) => {
51
+ S(r.targetTouches[0].clientX);
52
+ }, se = () => {
53
+ if (!U || !D) return;
54
+ const r = U - D;
55
+ r > w ? l() : r < -w && i();
56
+ }, [E, A] = n(!1), [B, oe] = n(0), le = c(
57
+ (r) => {
58
+ j && (A(!0), oe(r.clientX));
59
+ },
60
+ [j]
61
+ ), ne = c(
62
+ (r) => {
63
+ if (!E) return;
64
+ A(!1);
65
+ const e = B - r.clientX;
66
+ e > w ? l() : e < -w && i();
67
+ },
68
+ [E, B, l, i]
69
+ ), W = `calc((100% - ${I * (d - 1)}px) / ${d})`, be = (r) => {
70
+ const e = r === a, g = `${u}ms`;
71
+ switch (v) {
72
+ case "fade":
73
+ return {
74
+ position: "absolute",
75
+ inset: 0,
76
+ opacity: e ? 1 : 0,
77
+ transition: `opacity ${g} ease-in-out`,
78
+ zIndex: e ? 1 : 0,
79
+ pointerEvents: e ? "auto" : "none"
80
+ };
81
+ case "zoom":
82
+ return {
83
+ position: "absolute",
84
+ inset: 0,
85
+ opacity: e ? 1 : 0,
86
+ transform: e ? "scale(1)" : "scale(0.85)",
87
+ transition: `opacity ${g} ease, transform ${g} ease`,
88
+ zIndex: e ? 1 : 0,
89
+ pointerEvents: e ? "auto" : "none"
90
+ };
91
+ case "flip":
92
+ return {
93
+ position: "absolute",
94
+ inset: 0,
95
+ opacity: e ? 1 : 0,
96
+ transform: e ? "rotateY(0deg)" : "rotateY(90deg)",
97
+ transition: `opacity ${g} ease, transform ${g} ease`,
98
+ zIndex: e ? 1 : 0,
99
+ pointerEvents: e ? "auto" : "none",
100
+ backfaceVisibility: "hidden"
101
+ };
102
+ case "slide":
103
+ default:
104
+ return {};
24
105
  }
25
- }, [l, m, t]);
26
- const h = (e) => {
27
- let r = e;
28
- i ? e < 0 ? r = s : e > s && (r = 0) : r = Math.max(0, Math.min(s, e)), C(r), d == null || d(r);
29
- }, f = () => h(t + 1), w = () => h(t - 1), N = 50, X = (e) => {
30
- x(null), R(e.targetTouches[0].clientX);
31
- }, z = (e) => {
32
- x(e.targetTouches[0].clientX);
33
- }, A = () => {
34
- if (!v || !y) return;
35
- const e = v - y, r = e > N, B = e < -N;
36
- r ? f() : B && w();
37
- }, M = `calc((100% - ${c * (n - 1)}px) / ${n})`;
38
- return /* @__PURE__ */ j(
106
+ }, ie = v === "fade" || v === "zoom" || v === "flip";
107
+ return /* @__PURE__ */ M(
39
108
  "div",
40
109
  {
41
- ref: W,
42
- className: b("bear-relative bear-overflow-hidden", $),
43
- onMouseEnter: () => g && k(!0),
44
- onMouseLeave: () => g && k(!1),
45
- onTouchStart: X,
46
- onTouchMove: z,
47
- onTouchEnd: A,
48
- "data-testid": E,
110
+ ref: ee,
111
+ className: b("bear-relative bear-overflow-hidden bear-outline-none", Y),
112
+ style: Z,
113
+ onMouseEnter: () => _ && C(!0),
114
+ onMouseLeave: () => {
115
+ _ && C(!1), E && A(!1);
116
+ },
117
+ onTouchStart: ae,
118
+ onTouchMove: te,
119
+ onTouchEnd: se,
120
+ onMouseDown: le,
121
+ onMouseUp: ne,
122
+ onKeyDown: re,
123
+ tabIndex: T ? 0 : void 0,
124
+ "data-testid": q,
125
+ role: "region",
126
+ "aria-label": "Carousel",
127
+ "aria-roledescription": "carousel",
49
128
  children: [
50
- /* @__PURE__ */ a(
129
+ K && m > 0 && /* @__PURE__ */ t(
51
130
  "div",
52
131
  {
53
- className: "bear-flex bear-transition-transform bear-duration-500 bear-ease-out",
54
- style: {
55
- gap: `${c}px`,
56
- transform: `translateX(calc(-${t} * (${M} + ${c}px)))`
57
- },
58
- children: p.map((e, r) => /* @__PURE__ */ a(
132
+ className: "bear-absolute bear-top-0 bear-left-0 bear-right-0 bear-z-20",
133
+ style: { height: fe },
134
+ children: /* @__PURE__ */ t(
59
135
  "div",
60
136
  {
61
- className: "bear-shrink-0",
62
- style: { width: M },
63
- children: e
64
- },
65
- r
66
- ))
137
+ className: "bear-h-full bear-transition-all bear-ease-linear",
138
+ style: {
139
+ width: `${(a + 1) / f * 100}%`,
140
+ background: h,
141
+ transition: `width ${u}ms ease`
142
+ }
143
+ }
144
+ )
67
145
  }
68
146
  ),
69
- T && u > n && /* @__PURE__ */ j(D, { children: [
70
- /* @__PURE__ */ a(
147
+ ie ? /* @__PURE__ */ t("div", { className: "bear-relative", style: { minHeight: 200 }, children: x.map((r, e) => /* @__PURE__ */ t("div", { style: be(e), children: r }, e)) }) : /* @__PURE__ */ t(
148
+ "div",
149
+ {
150
+ className: "bear-flex",
151
+ style: {
152
+ gap: `${I}px`,
153
+ transform: `translateX(calc(-${a} * (${W} + ${I}px)))`,
154
+ transition: `transform ${u}ms cubic-bezier(0.25, 0.1, 0.25, 1)`
155
+ },
156
+ children: x.map((r, e) => /* @__PURE__ */ t("div", { className: "bear-shrink-0", style: { width: W }, children: r }, e))
157
+ }
158
+ ),
159
+ H && f > d && /* @__PURE__ */ M(ce, { children: [
160
+ /* @__PURE__ */ t(
71
161
  "button",
72
162
  {
73
- onClick: w,
74
- disabled: !i && t === 0,
163
+ onClick: i,
164
+ disabled: !y && a === 0,
75
165
  className: b(
76
166
  "bear-absolute bear-left-2 bear-top-1/2 bear--translate-y-1/2",
77
- "bear-w-10 bear-h-10 bear-rounded-full bear-flex bear-items-center bear-justify-center",
167
+ "bear-rounded-full bear-flex bear-items-center bear-justify-center",
78
168
  "bear-bg-white/90 dark:bear-bg-gray-800/90 bear-shadow-lg",
79
169
  "bear-text-gray-700 dark:bear-text-gray-200",
80
170
  "hover:bear-bg-white dark:hover:bear-bg-gray-700",
81
171
  "bear-transition-all bear-z-10",
82
172
  "disabled:bear-opacity-50 disabled:bear-cursor-not-allowed"
83
173
  ),
84
- children: /* @__PURE__ */ a("svg", { className: "bear-w-5 bear-h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ a("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 19l-7-7 7-7" }) })
174
+ style: { width: N, height: N },
175
+ "aria-label": "Previous slide",
176
+ children: /* @__PURE__ */ t("svg", { className: "bear-w-5 bear-h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ t("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 19l-7-7 7-7" }) })
85
177
  }
86
178
  ),
87
- /* @__PURE__ */ a(
179
+ /* @__PURE__ */ t(
88
180
  "button",
89
181
  {
90
- onClick: f,
91
- disabled: !i && t === s,
182
+ onClick: l,
183
+ disabled: !y && a === s,
92
184
  className: b(
93
185
  "bear-absolute bear-right-2 bear-top-1/2 bear--translate-y-1/2",
94
- "bear-w-10 bear-h-10 bear-rounded-full bear-flex bear-items-center bear-justify-center",
186
+ "bear-rounded-full bear-flex bear-items-center bear-justify-center",
95
187
  "bear-bg-white/90 dark:bear-bg-gray-800/90 bear-shadow-lg",
96
188
  "bear-text-gray-700 dark:bear-text-gray-200",
97
189
  "hover:bear-bg-white dark:hover:bear-bg-gray-700",
98
190
  "bear-transition-all bear-z-10",
99
191
  "disabled:bear-opacity-50 disabled:bear-cursor-not-allowed"
100
192
  ),
101
- children: /* @__PURE__ */ a("svg", { className: "bear-w-5 bear-h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ a("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" }) })
193
+ style: { width: N, height: N },
194
+ "aria-label": "Next slide",
195
+ children: /* @__PURE__ */ t("svg", { className: "bear-w-5 bear-h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ t("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" }) })
102
196
  }
103
197
  )
104
198
  ] }),
105
- L && u > n && /* @__PURE__ */ a("div", { className: "bear-flex bear-justify-center bear-gap-2 bear-mt-4", children: Array.from({ length: s + 1 }).map((e, r) => /* @__PURE__ */ a(
199
+ V && /* @__PURE__ */ M("div", { className: "bear-absolute bear-top-3 bear-right-3 bear-z-10 bear-bg-black/50 bear-text-white bear-text-xs bear-font-medium bear-px-2.5 bear-py-1 bear-rounded-full", children: [
200
+ a + 1,
201
+ " / ",
202
+ f
203
+ ] }),
204
+ P && k !== "none" && f > d && /* @__PURE__ */ t("div", { className: "bear-flex bear-justify-center bear-gap-2 bear-mt-4", children: k === "thumbnails" && L ? L.map((r, e) => /* @__PURE__ */ t(
106
205
  "button",
107
206
  {
108
- onClick: () => h(r),
207
+ onClick: () => o(e),
109
208
  className: b(
110
- "bear-w-2.5 bear-h-2.5 bear-rounded-full bear-transition-all",
111
- r === t ? "bear-bg-pink-500 bear-w-6" : "bear-bg-gray-300 dark:bear-bg-gray-600 hover:bear-bg-gray-400 dark:hover:bear-bg-gray-500"
112
- )
209
+ "bear-rounded bear-overflow-hidden bear-border-2 bear-transition-all",
210
+ e === a ? "bear-opacity-100 bear-scale-110" : "bear-opacity-60 hover:bear-opacity-80"
211
+ ),
212
+ style: {
213
+ width: R,
214
+ height: R,
215
+ borderColor: e === a ? h : "transparent"
216
+ },
217
+ "aria-label": `Go to slide ${e + 1}`,
218
+ children: /* @__PURE__ */ t("img", { src: r, alt: "", className: "bear-w-full bear-h-full bear-object-cover" })
113
219
  },
114
- r
115
- )) })
220
+ e
221
+ )) : k === "numbers" ? Array.from({ length: s + 1 }).map((r, e) => /* @__PURE__ */ t(
222
+ "button",
223
+ {
224
+ onClick: () => o(e),
225
+ className: b(
226
+ "bear-w-7 bear-h-7 bear-rounded-full bear-text-xs bear-font-medium bear-transition-all",
227
+ "bear-flex bear-items-center bear-justify-center",
228
+ e === a ? "bear-text-white bear-shadow-md" : "bear-bg-gray-200 dark:bear-bg-gray-600 bear-text-gray-600 dark:bear-text-gray-300 hover:bear-bg-gray-300 dark:hover:bear-bg-gray-500"
229
+ ),
230
+ style: e === a ? { background: h } : void 0,
231
+ "aria-label": `Go to slide ${e + 1}`,
232
+ children: e + 1
233
+ },
234
+ e
235
+ )) : k === "bars" ? Array.from({ length: s + 1 }).map((r, e) => /* @__PURE__ */ t(
236
+ "button",
237
+ {
238
+ onClick: () => o(e),
239
+ className: b(
240
+ "bear-h-1 bear-rounded-full bear-transition-all",
241
+ e === a ? "bear-w-8" : "bear-w-4 bear-bg-gray-300 dark:bear-bg-gray-600 hover:bear-bg-gray-400 dark:hover:bear-bg-gray-500"
242
+ ),
243
+ style: e === a ? { background: h } : void 0,
244
+ "aria-label": `Go to slide ${e + 1}`
245
+ },
246
+ e
247
+ )) : (
248
+ /* Default dots */
249
+ Array.from({ length: s + 1 }).map((r, e) => /* @__PURE__ */ t(
250
+ "button",
251
+ {
252
+ onClick: () => o(e),
253
+ className: b(
254
+ "bear-h-2.5 bear-rounded-full bear-transition-all",
255
+ e === a ? "bear-w-6" : "bear-w-2.5 bear-bg-gray-300 dark:bear-bg-gray-600 hover:bear-bg-gray-400 dark:hover:bear-bg-gray-500"
256
+ ),
257
+ style: e === a ? { background: h } : void 0,
258
+ "aria-label": `Go to slide ${e + 1}`
259
+ },
260
+ e
261
+ ))
262
+ ) })
116
263
  ]
117
264
  }
118
265
  );
119
266
  };
120
267
  export {
121
- K as Carousel
268
+ we as Carousel
122
269
  };