@forgedevstack/bear 1.1.4 → 1.1.8

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 (146) hide show
  1. package/README.md +19 -0
  2. package/dist/components/Anchor/Anchor.cjs +1 -1
  3. package/dist/components/Anchor/Anchor.js +37 -45
  4. package/dist/components/Anchor/Anchor.utils.cjs +1 -0
  5. package/dist/components/Anchor/Anchor.utils.d.ts +2 -0
  6. package/dist/components/Anchor/Anchor.utils.js +12 -0
  7. package/dist/components/Autocomplete/Autocomplete.cjs +1 -1
  8. package/dist/components/Autocomplete/Autocomplete.js +60 -67
  9. package/dist/components/Autocomplete/Autocomplete.utils.cjs +1 -0
  10. package/dist/components/Autocomplete/Autocomplete.utils.d.ts +2 -0
  11. package/dist/components/Autocomplete/Autocomplete.utils.js +12 -0
  12. package/dist/components/BackTop/BackTop.cjs +1 -1
  13. package/dist/components/BackTop/BackTop.js +10 -11
  14. package/dist/components/Button/Button.cjs +1 -1
  15. package/dist/components/Button/Button.constants.cjs +2 -2
  16. package/dist/components/Button/Button.constants.d.ts +1 -0
  17. package/dist/components/Button/Button.constants.js +12 -5
  18. package/dist/components/Button/Button.d.ts +0 -27
  19. package/dist/components/Button/Button.js +93 -105
  20. package/dist/components/Button/Button.types.d.ts +1 -0
  21. package/dist/components/Button/Button.utils.cjs +1 -0
  22. package/dist/components/Button/Button.utils.d.ts +2 -0
  23. package/dist/components/Button/Button.utils.js +5 -0
  24. package/dist/components/Button/useSpotlight.cjs +1 -0
  25. package/dist/components/Button/useSpotlight.d.ts +21 -0
  26. package/dist/components/Button/useSpotlight.js +28 -0
  27. package/dist/components/Chart/Chart.cjs +1 -1
  28. package/dist/components/Chart/Chart.const.cjs +1 -0
  29. package/dist/components/Chart/Chart.const.js +21 -0
  30. package/dist/components/Chart/Chart.js +55 -71
  31. package/dist/components/Chart/Chart.utils.cjs +1 -0
  32. package/dist/components/Chart/Chart.utils.js +5 -0
  33. package/dist/components/Confetti/Confetti.cjs +1 -1
  34. package/dist/components/Confetti/Confetti.js +37 -34
  35. package/dist/components/ContextMenu/ContextMenu.cjs +1 -1
  36. package/dist/components/ContextMenu/ContextMenu.js +31 -30
  37. package/dist/components/ContextMenu/ContextMenu.utils.cjs +1 -0
  38. package/dist/components/ContextMenu/ContextMenu.utils.d.ts +5 -0
  39. package/dist/components/ContextMenu/ContextMenu.utils.js +4 -0
  40. package/dist/components/CountdownTimer/CountdownTimer.cjs +1 -1
  41. package/dist/components/CountdownTimer/CountdownTimer.js +62 -71
  42. package/dist/components/CountdownTimer/CountdownTimer.utils.cjs +1 -0
  43. package/dist/components/CountdownTimer/CountdownTimer.utils.d.ts +3 -0
  44. package/dist/components/CountdownTimer/CountdownTimer.utils.js +16 -0
  45. package/dist/components/Dock/Dock.cjs +1 -1
  46. package/dist/components/Dock/Dock.js +38 -43
  47. package/dist/components/Dock/Dock.utils.cjs +1 -0
  48. package/dist/components/Dock/Dock.utils.d.ts +1 -0
  49. package/dist/components/Dock/Dock.utils.js +10 -0
  50. package/dist/components/Dropdown/Dropdown.cjs +1 -1
  51. package/dist/components/Dropdown/Dropdown.js +59 -60
  52. package/dist/components/FileTree/FileTree.cjs +1 -1
  53. package/dist/components/FileTree/FileTree.js +20 -32
  54. package/dist/components/FileTree/FileTree.utils.cjs +1 -0
  55. package/dist/components/FileTree/FileTree.utils.d.ts +4 -0
  56. package/dist/components/FileTree/FileTree.utils.js +15 -0
  57. package/dist/components/GradientText/GradientText.cjs +1 -1
  58. package/dist/components/GradientText/GradientText.js +27 -29
  59. package/dist/components/Icon/icons/bear.cjs +1 -0
  60. package/dist/components/Icon/icons/bear.d.ts +12 -0
  61. package/dist/components/Icon/icons/bear.js +47 -0
  62. package/dist/components/Icon/index.cjs +1 -1
  63. package/dist/components/Icon/index.d.ts +18 -0
  64. package/dist/components/Icon/index.js +17 -15
  65. package/dist/components/InfiniteScroll/InfiniteScroll.cjs +1 -1
  66. package/dist/components/InfiniteScroll/InfiniteScroll.const.cjs +1 -1
  67. package/dist/components/InfiniteScroll/InfiniteScroll.const.js +6 -7
  68. package/dist/components/InfiniteScroll/InfiniteScroll.js +41 -41
  69. package/dist/components/MentionsInput/MentionsInput.cjs +1 -1
  70. package/dist/components/MentionsInput/MentionsInput.js +64 -68
  71. package/dist/components/MentionsInput/MentionsInput.utils.cjs +1 -0
  72. package/dist/components/MentionsInput/MentionsInput.utils.d.ts +2 -0
  73. package/dist/components/MentionsInput/MentionsInput.utils.js +9 -0
  74. package/dist/components/PageNav/PageNav.cjs +1 -0
  75. package/dist/components/PageNav/PageNav.const.cjs +1 -0
  76. package/dist/components/PageNav/PageNav.const.d.ts +22 -0
  77. package/dist/components/PageNav/PageNav.const.js +42 -0
  78. package/dist/components/PageNav/PageNav.d.ts +3 -0
  79. package/dist/components/PageNav/PageNav.js +81 -0
  80. package/dist/components/PageNav/PageNav.types.d.ts +17 -0
  81. package/dist/components/PageNav/index.d.ts +2 -0
  82. package/dist/components/Progress/Progress.cjs +1 -1
  83. package/dist/components/Progress/Progress.js +6 -6
  84. package/dist/components/PropsPlayground/PropsPlayground.cjs +1 -0
  85. package/dist/components/PropsPlayground/PropsPlayground.const.cjs +1 -0
  86. package/dist/components/PropsPlayground/PropsPlayground.const.d.ts +11 -0
  87. package/dist/components/PropsPlayground/PropsPlayground.const.js +23 -0
  88. package/dist/components/PropsPlayground/PropsPlayground.d.ts +3 -0
  89. package/dist/components/PropsPlayground/PropsPlayground.js +221 -0
  90. package/dist/components/PropsPlayground/PropsPlayground.types.d.ts +29 -0
  91. package/dist/components/PropsPlayground/PropsPlayground.utils.cjs +1 -0
  92. package/dist/components/PropsPlayground/PropsPlayground.utils.d.ts +2 -0
  93. package/dist/components/PropsPlayground/PropsPlayground.utils.js +9 -0
  94. package/dist/components/PropsPlayground/index.d.ts +2 -0
  95. package/dist/components/Select/Select.cjs +1 -1
  96. package/dist/components/Select/Select.js +28 -30
  97. package/dist/components/SignPad/SignPad.cjs +1 -1
  98. package/dist/components/SignPad/SignPad.js +24 -24
  99. package/dist/components/Skeleton/Skeleton.cjs +1 -1
  100. package/dist/components/Skeleton/Skeleton.js +89 -94
  101. package/dist/components/Skeleton/Skeleton.utils.cjs +1 -0
  102. package/dist/components/Skeleton/Skeleton.utils.d.ts +1 -0
  103. package/dist/components/Skeleton/Skeleton.utils.js +10 -0
  104. package/dist/components/SliderRange/SliderRange.cjs +1 -1
  105. package/dist/components/SliderRange/SliderRange.js +61 -63
  106. package/dist/components/SliderRange/SliderRange.utils.cjs +1 -0
  107. package/dist/components/SliderRange/SliderRange.utils.d.ts +1 -0
  108. package/dist/components/SliderRange/SliderRange.utils.js +7 -0
  109. package/dist/components/Spotlight/Spotlight.cjs +1 -1
  110. package/dist/components/Spotlight/Spotlight.js +62 -73
  111. package/dist/components/Spotlight/Spotlight.utils.cjs +1 -0
  112. package/dist/components/Spotlight/Spotlight.utils.d.ts +3 -0
  113. package/dist/components/Spotlight/Spotlight.utils.js +18 -0
  114. package/dist/components/Tabs/Tabs.cjs +1 -1
  115. package/dist/components/Tabs/Tabs.js +39 -38
  116. package/dist/components/Tabs/Tabs.types.d.ts +3 -1
  117. package/dist/components/Toast/Toast.cjs +1 -1
  118. package/dist/components/Toast/Toast.js +18 -17
  119. package/dist/components/Toast/Toast.utils.cjs +1 -0
  120. package/dist/components/Toast/Toast.utils.d.ts +1 -0
  121. package/dist/components/Toast/Toast.utils.js +4 -0
  122. package/dist/components/Tooltip/Tooltip.cjs +1 -1
  123. package/dist/components/Tooltip/Tooltip.js +10 -11
  124. package/dist/components/Tour/Tour.cjs +1 -1
  125. package/dist/components/Tour/Tour.js +1 -2
  126. package/dist/components/VirtualList/VirtualList.cjs +1 -1
  127. package/dist/components/VirtualList/VirtualList.js +38 -43
  128. package/dist/components/index.cjs +1 -1
  129. package/dist/components/index.d.ts +4 -0
  130. package/dist/components/index.js +66 -62
  131. package/dist/hooks/index.cjs +1 -1
  132. package/dist/hooks/index.d.ts +2 -0
  133. package/dist/hooks/index.js +60 -58
  134. package/dist/hooks/useResizeObserver/index.d.ts +2 -0
  135. package/dist/hooks/useResizeObserver/useResizeObserver.cjs +1 -0
  136. package/dist/hooks/useResizeObserver/useResizeObserver.d.ts +3 -0
  137. package/dist/hooks/useResizeObserver/useResizeObserver.js +20 -0
  138. package/dist/hooks/useResizeObserver/useResizeObserver.types.d.ts +8 -0
  139. package/dist/icons.cjs +1 -0
  140. package/dist/icons.d.ts +2 -0
  141. package/dist/icons.js +6 -0
  142. package/dist/index.cjs +1 -1
  143. package/dist/index.js +175 -169
  144. package/dist/styles/_base.css +7 -3
  145. package/dist/styles.css +1 -1
  146. package/package.json +6 -1
@@ -1,115 +1,106 @@
1
- import { jsx as o, Fragment as J, jsxs as T } from "react/jsx-runtime";
2
- import { useMemo as K, useRef as Q, useCallback as W, useState as A, useEffect as X } from "react";
3
- import { cn as u } from "../../utils/cn.js";
4
- import { DEFAULT_SEPARATOR as $, DEFAULT_LABELS as ee, MS_PER_SECOND as h, UPDATE_INTERVAL as re, SEPARATOR_MARGIN as ae, SIZE_DIGIT_CLASSES as v, SIZE_LABEL_CLASSES as D, SIZE_GAP_CLASSES as M, MS_PER_MINUTE as R, MS_PER_HOUR as L, MS_PER_DAY as N, PAD_LENGTH as te } from "./CountdownTimer.const.js";
5
- const b = (a) => String(a).padStart(te, "0"), I = (a, t) => {
6
- const e = Math.max(0, a - t);
7
- return {
8
- days: Math.floor(e / N),
9
- hours: Math.floor(e % N / L),
10
- minutes: Math.floor(e % L / R),
11
- seconds: Math.floor(e % R / h),
12
- totalSeconds: Math.floor(e / h),
13
- isComplete: e <= 0
14
- };
15
- }, ie = (a) => {
1
+ import { jsx as t, Fragment as H, jsxs as C } from "react/jsx-runtime";
2
+ import { useMemo as V, useRef as q, useCallback as J, useState as E, useEffect as K } from "react";
3
+ import { cn as o } from "../../utils/cn.js";
4
+ import { DEFAULT_SEPARATOR as Q, DEFAULT_LABELS as W, MS_PER_SECOND as X, UPDATE_INTERVAL as Y, SEPARATOR_MARGIN as $, SIZE_DIGIT_CLASSES as T, SIZE_LABEL_CLASSES as A, SIZE_GAP_CLASSES as v } from "./CountdownTimer.const.js";
5
+ import { calcRemaining as D, pad as l } from "./CountdownTimer.utils.js";
6
+ const ne = (L) => {
16
7
  const {
17
- targetDate: t,
18
- duration: e,
19
- variant: _ = "default",
20
- size: c = "md",
21
- showDays: P = !0,
22
- showHours: k = !0,
23
- showMinutes: B = !0,
24
- showSeconds: F = !0,
25
- showLabels: U = !0,
26
- showSeparator: G = !0,
27
- separator: O = $,
28
- labels: S,
29
- onComplete: l,
30
- onTick: i,
31
- paused: w = !1,
32
- render: E,
33
- className: H,
34
- style: Z,
35
- testId: j
36
- } = a, d = K(() => ({ ...ee, ...S }), [S]), y = Q(!1), z = W(() => t ? new Date(t).getTime() : e ? Date.now() + e * h : Date.now(), [t, e]), [m] = A(z), [s, V] = A(() => I(m, Date.now()));
37
- if (X(() => {
38
- if (w) return;
39
- const r = () => {
40
- const p = I(m, Date.now());
41
- V(p), i == null || i(p), p.isComplete && !y.current && (y.current = !0, l == null || l());
8
+ targetDate: d,
9
+ duration: b,
10
+ variant: f = "default",
11
+ size: u = "md",
12
+ showDays: I = !0,
13
+ showHours: N = !0,
14
+ showMinutes: k = !0,
15
+ showSeconds: R = !0,
16
+ showLabels: B = !0,
17
+ showSeparator: P = !0,
18
+ separator: F = Q,
19
+ labels: w,
20
+ onComplete: s,
21
+ onTick: n,
22
+ paused: h = !1,
23
+ render: _,
24
+ className: M,
25
+ style: G,
26
+ testId: O
27
+ } = L, i = V(() => ({ ...W, ...w }), [w]), S = q(!1), U = J(() => d ? new Date(d).getTime() : b ? Date.now() + b * X : Date.now(), [d, b]), [c] = E(U), [r, Z] = E(() => D(c, Date.now()));
28
+ if (K(() => {
29
+ if (h) return;
30
+ const e = () => {
31
+ const p = D(c, Date.now());
32
+ Z(p), n == null || n(p), p.isComplete && !S.current && (S.current = !0, s == null || s());
42
33
  };
43
- r();
44
- const f = setInterval(r, re);
45
- return () => clearInterval(f);
46
- }, [m, w, l, i]), E) return /* @__PURE__ */ o(J, { children: E(s) });
47
- const x = v[c] ?? v.md, Y = D[c] ?? D.md, q = M[c] ?? M.md, n = [];
48
- P && n.push({ value: b(s.days), label: d.days }), k && n.push({ value: b(s.hours), label: d.hours }), B && n.push({ value: b(s.minutes), label: d.minutes }), F && n.push({ value: b(s.seconds), label: d.seconds });
49
- const g = _ === "card", C = _ === "flip";
50
- return /* @__PURE__ */ o(
34
+ e();
35
+ const g = setInterval(e, Y);
36
+ return () => clearInterval(g);
37
+ }, [c, h, s, n]), _) return /* @__PURE__ */ t(H, { children: _(r) });
38
+ const y = T[u] ?? T.md, j = A[u] ?? A.md, z = v[u] ?? v.md, a = [];
39
+ I && a.push({ value: l(r.days), label: i.days }), N && a.push({ value: l(r.hours), label: i.hours }), k && a.push({ value: l(r.minutes), label: i.minutes }), R && a.push({ value: l(r.seconds), label: i.seconds });
40
+ const m = f === "card", x = f === "flip";
41
+ return /* @__PURE__ */ t(
51
42
  "div",
52
43
  {
53
- className: u("Bear-CountdownTimer", "bear-flex bear-items-center", q, H),
54
- style: Z,
55
- "data-testid": j,
44
+ className: o("Bear-CountdownTimer", "bear-flex bear-items-center", z, M),
45
+ style: G,
46
+ "data-testid": O,
56
47
  role: "timer",
57
48
  "aria-label": "Countdown timer",
58
- children: n.map((r, f) => /* @__PURE__ */ T("div", { className: "Bear-CountdownTimer__segment bear-flex bear-items-center", children: [
59
- f > 0 && G && !g && /* @__PURE__ */ o(
49
+ children: a.map((e, g) => /* @__PURE__ */ C("div", { className: "Bear-CountdownTimer__segment bear-flex bear-items-center", children: [
50
+ g > 0 && P && !m && /* @__PURE__ */ t(
60
51
  "span",
61
52
  {
62
- className: u(
53
+ className: o(
63
54
  "Bear-CountdownTimer__separator",
64
- x,
65
- ae,
55
+ y,
56
+ $,
66
57
  "bear-text-gray-400 dark:bear-text-gray-500"
67
58
  ),
68
59
  "aria-hidden": "true",
69
- children: O
60
+ children: F
70
61
  }
71
62
  ),
72
- /* @__PURE__ */ T("div", { className: "Bear-CountdownTimer__unit bear-flex bear-flex-col bear-items-center", children: [
73
- /* @__PURE__ */ o(
63
+ /* @__PURE__ */ C("div", { className: "Bear-CountdownTimer__unit bear-flex bear-flex-col bear-items-center", children: [
64
+ /* @__PURE__ */ t(
74
65
  "div",
75
66
  {
76
- className: u(
67
+ className: o(
77
68
  "Bear-CountdownTimer__digit",
78
- x,
69
+ y,
79
70
  "bear-tabular-nums bear-tracking-wider",
80
- g && [
71
+ m && [
81
72
  "bear-px-3 bear-py-2 bear-rounded-lg",
82
73
  "bear-bg-gray-100 dark:bear-bg-gray-800",
83
74
  "bear-border bear-border-gray-200 dark:bear-border-gray-700"
84
75
  ],
85
- C && [
76
+ x && [
86
77
  "bear-px-3 bear-py-2 bear-rounded-lg",
87
78
  "bear-bg-gray-900 dark:bear-bg-gray-100",
88
79
  "bear-text-white dark:bear-text-gray-900",
89
80
  "bear-shadow-lg"
90
81
  ],
91
- !g && !C && "bear-text-[var(--bear-text-primary)]"
82
+ !m && !x && "bear-text-[var(--bear-text-primary)]"
92
83
  ),
93
- children: r.value
84
+ children: e.value
94
85
  }
95
86
  ),
96
- U && /* @__PURE__ */ o(
87
+ B && /* @__PURE__ */ t(
97
88
  "span",
98
89
  {
99
- className: u(
90
+ className: o(
100
91
  "Bear-CountdownTimer__label",
101
- Y,
92
+ j,
102
93
  "bear-mt-1 bear-uppercase bear-tracking-widest",
103
94
  "bear-text-gray-500 dark:bear-text-gray-400"
104
95
  ),
105
- children: r.label
96
+ children: e.label
106
97
  }
107
98
  )
108
99
  ] })
109
- ] }, r.label))
100
+ ] }, e.label))
110
101
  }
111
102
  );
112
103
  };
113
104
  export {
114
- ie as CountdownTimer
105
+ ne as CountdownTimer
115
106
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./CountdownTimer.const.cjs"),n=a=>String(a).padStart(o.PAD_LENGTH,"0"),_=(a,e)=>{const t=Math.max(0,a-e);return{days:Math.floor(t/o.MS_PER_DAY),hours:Math.floor(t%o.MS_PER_DAY/o.MS_PER_HOUR),minutes:Math.floor(t%o.MS_PER_HOUR/o.MS_PER_MINUTE),seconds:Math.floor(t%o.MS_PER_MINUTE/o.MS_PER_SECOND),totalSeconds:Math.floor(t/o.MS_PER_SECOND),isComplete:t<=0}};exports.calcRemaining=_;exports.pad=n;
@@ -0,0 +1,3 @@
1
+ import { CountdownTime } from './CountdownTimer.types';
2
+ export declare const pad: (n: number) => string;
3
+ export declare const calcRemaining: (target: number, now: number) => CountdownTime;
@@ -0,0 +1,16 @@
1
+ import { MS_PER_SECOND as a, MS_PER_MINUTE as r, MS_PER_HOUR as M, MS_PER_DAY as n, PAD_LENGTH as _ } from "./CountdownTimer.const.js";
2
+ const f = (t) => String(t).padStart(_, "0"), l = (t, s) => {
3
+ const o = Math.max(0, t - s);
4
+ return {
5
+ days: Math.floor(o / n),
6
+ hours: Math.floor(o % n / M),
7
+ minutes: Math.floor(o % M / r),
8
+ seconds: Math.floor(o % r / a),
9
+ totalSeconds: Math.floor(o / a),
10
+ isComplete: o <= 0
11
+ };
12
+ };
13
+ export {
14
+ l as calcRemaining,
15
+ f as pad
16
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react/jsx-runtime"),s=require("react"),o=require("../../utils/cn.cjs"),r=require("./Dock.const.cjs"),S=(c,i,a,t,d)=>{if(i<0)return t;const l=Math.abs(c-i);if(l>a)return t;const u=1-l/(a+1);return t+(d-t)*u},O=c=>{const{items:i,position:a="bottom",iconSize:t=r.DEFAULT_ICON_SIZE,magnifiedSize:d=r.DEFAULT_MAGNIFIED_SIZE,magnification:l=!0,magnificationDistance:u=r.DEFAULT_MAGNIFICATION_DISTANCE,showLabels:p=!0,className:h,style:D,testId:I}=c,[f,x]=s.useState(-1),[k,_]=s.useState(""),m=s.useRef(null),y=a==="left"||a==="right",N=s.useCallback((e,n)=>{x(e),_(n.label)},[]),v=s.useCallback(()=>{x(-1),_("")},[]);return b.jsx("div",{ref:m,className:o.cn("Bear-Dock","bear-flex bear-items-end bear-gap-1","bear-rounded-2xl bear-px-2 bear-py-1.5","bear-bg-white/80 dark:bear-bg-gray-900/80","bear-backdrop-blur-xl","bear-border bear-border-gray-200/50 dark:bear-border-gray-700/50","bear-shadow-lg",r.DOCK_POSITION_CLASSES[a],y&&"bear-items-center",h),style:{padding:r.DOCK_PADDING,zIndex:r.DOCK_Z_INDEX,...D},"data-testid":I,role:"toolbar","aria-label":"Dock",onMouseLeave:v,children:i.map((e,n)=>{const g=l?S(n,f,u,t,d):t;return b.jsxs("div",{className:"Bear-Dock__item bear-relative bear-flex bear-flex-col bear-items-center",children:[p&&f===n&&k&&b.jsx("div",{className:o.cn("Bear-Dock__tooltip","bear-absolute bear-whitespace-nowrap","bear-px-2 bear-py-1 bear-rounded-lg","bear-bg-gray-900 dark:bear-bg-gray-100","bear-text-white dark:bear-text-gray-900","bear-text-xs bear-font-medium","bear-shadow-md bear-pointer-events-none",r.TOOLTIP_POSITION_CLASSES[a]),role:"tooltip",children:e.label}),b.jsx("button",{className:o.cn("Bear-Dock__button","bear-flex bear-items-center bear-justify-center bear-rounded-xl","bear-transition-all bear-origin-bottom","hover:bear-cursor-pointer",e.active&&"bear-ring-2 bear-ring-offset-1",e.disabled&&"bear-opacity-40 bear-cursor-not-allowed"),style:{width:g,height:g,transitionDuration:`${r.SPRING_DURATION}ms`,transitionTimingFunction:"cubic-bezier(0.25, 0.1, 0.25, 1)"},onClick:e.disabled?void 0:e.onClick,onMouseEnter:()=>N(n,e),disabled:e.disabled,"aria-label":e.label,children:b.jsx("span",{className:o.cn("Bear-Dock__icon","bear-flex bear-items-center bear-justify-center","bear-w-full bear-h-full bear-rounded-xl","bear-transition-transform",e.active?"bear-bg-[var(--bear-primary-500)] bear-text-white":"bear-bg-gray-100 dark:bear-bg-gray-800"),style:{fontSize:g*r.ICON_SCALE_RATIO},children:e.icon})}),e.badge!==void 0&&b.jsx("span",{className:o.cn("Bear-Dock__badge","bear-absolute bear--top-1 bear--right-1","bear-min-w-[18px] bear-h-[18px]","bear-flex bear-items-center bear-justify-center","bear-rounded-full bear-text-[10px] bear-font-bold","bear-text-white bear-leading-none bear-px-1","bear-bg-[var(--bear-danger-500,#ef4444)]"),children:e.badge}),e.active&&a==="bottom"&&b.jsx("div",{className:o.cn("Bear-Dock__dot","bear-w-1 bear-h-1 bear-rounded-full bear-mt-0.5","bear-bg-[var(--bear-primary-500)]"),"aria-hidden":"true"})]},e.id)})})};exports.Dock=O;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),n=require("react"),t=require("../../utils/cn.cjs"),a=require("./Dock.const.cjs"),N=require("./Dock.utils.cjs"),O=u=>{const{items:g,position:b="bottom",iconSize:i=a.DEFAULT_ICON_SIZE,magnifiedSize:x=a.DEFAULT_MAGNIFIED_SIZE,magnification:_=!0,magnificationDistance:f=a.DEFAULT_MAGNIFICATION_DISTANCE,showLabels:p=!0,className:h,style:D,testId:I}=u,[l,c]=n.useState(-1),[k,d]=n.useState(""),m=n.useRef(null),y=b==="left"||b==="right",S=n.useCallback((e,o)=>{c(e),d(o.label)},[]),v=n.useCallback(()=>{c(-1),d("")},[]);return r.jsx("div",{ref:m,className:t.cn("Bear-Dock","bear-flex bear-items-end bear-gap-1","bear-rounded-2xl bear-px-2 bear-py-1.5","bear-bg-white/80 dark:bear-bg-gray-900/80","bear-backdrop-blur-xl","bear-border bear-border-gray-200/50 dark:bear-border-gray-700/50","bear-shadow-lg",a.DOCK_POSITION_CLASSES[b],y&&"bear-items-center",h),style:{padding:a.DOCK_PADDING,zIndex:a.DOCK_Z_INDEX,...D},"data-testid":I,role:"toolbar","aria-label":"Dock",onMouseLeave:v,children:g.map((e,o)=>{const s=_?N.getScale(o,l,f,i,x):i;return r.jsxs("div",{className:"Bear-Dock__item bear-relative bear-flex bear-flex-col bear-items-center",children:[p&&l===o&&k&&r.jsx("div",{className:t.cn("Bear-Dock__tooltip","bear-absolute bear-whitespace-nowrap","bear-px-2 bear-py-1 bear-rounded-lg","bear-bg-gray-900 dark:bear-bg-gray-100","bear-text-white dark:bear-text-gray-900","bear-text-xs bear-font-medium","bear-shadow-md bear-pointer-events-none",a.TOOLTIP_POSITION_CLASSES[b]),role:"tooltip",children:e.label}),r.jsx("button",{className:t.cn("Bear-Dock__button","bear-flex bear-items-center bear-justify-center bear-rounded-xl","bear-transition-all bear-origin-bottom","hover:bear-cursor-pointer",e.active&&"bear-ring-2 bear-ring-offset-1",e.disabled&&"bear-opacity-40 bear-cursor-not-allowed"),style:{width:s,height:s,transitionDuration:`${a.SPRING_DURATION}ms`,transitionTimingFunction:"cubic-bezier(0.25, 0.1, 0.25, 1)"},onClick:e.disabled?void 0:e.onClick,onMouseEnter:()=>S(o,e),disabled:e.disabled,"aria-label":e.label,children:r.jsx("span",{className:t.cn("Bear-Dock__icon","bear-flex bear-items-center bear-justify-center","bear-w-full bear-h-full bear-rounded-xl","bear-transition-transform",e.active?"bear-bg-[var(--bear-primary-500)] bear-text-white":"bear-bg-gray-100 dark:bear-bg-gray-800"),style:{fontSize:s*a.ICON_SCALE_RATIO},children:e.icon})}),e.badge!==void 0&&r.jsx("span",{className:t.cn("Bear-Dock__badge","bear-absolute bear--top-1 bear--right-1","bear-min-w-[18px] bear-h-[18px]","bear-flex bear-items-center bear-justify-center","bear-rounded-full bear-text-[10px] bear-font-bold","bear-text-white bear-leading-none bear-px-1","bear-bg-[var(--bear-danger-500,#ef4444)]"),children:e.badge}),e.active&&b==="bottom"&&r.jsx("div",{className:t.cn("Bear-Dock__dot","bear-w-1 bear-h-1 bear-rounded-full bear-mt-0.5","bear-bg-[var(--bear-primary-500)]"),"aria-hidden":"true"})]},e.id)})})};exports.Dock=O;
@@ -1,35 +1,30 @@
1
- import { jsx as t, jsxs as S } from "react/jsx-runtime";
2
- import { useState as p, useRef as w, useCallback as m } from "react";
3
- import { cn as b } from "../../utils/cn.js";
4
- import { DEFAULT_ICON_SIZE as O, DEFAULT_MAGNIFIED_SIZE as A, DEFAULT_MAGNIFICATION_DISTANCE as C, DOCK_Z_INDEX as E, DOCK_PADDING as T, TOOLTIP_POSITION_CLASSES as L, SPRING_DURATION as B, ICON_SCALE_RATIO as M, DOCK_POSITION_CLASSES as F } from "./Dock.const.js";
5
- const j = (l, n, r, a, s) => {
6
- if (n < 0) return a;
7
- const i = Math.abs(l - n);
8
- if (i > r) return a;
9
- const c = 1 - i / (r + 1);
10
- return a + (s - a) * c;
11
- }, z = (l) => {
1
+ import { jsx as r, jsxs as S } from "react/jsx-runtime";
2
+ import { useState as d, useRef as w, useCallback as c } from "react";
3
+ import { cn as a } from "../../utils/cn.js";
4
+ import { DEFAULT_ICON_SIZE as O, DEFAULT_MAGNIFIED_SIZE as A, DEFAULT_MAGNIFICATION_DISTANCE as C, DOCK_Z_INDEX as E, DOCK_PADDING as T, TOOLTIP_POSITION_CLASSES as L, SPRING_DURATION as B, ICON_SCALE_RATIO as z, DOCK_POSITION_CLASSES as F } from "./Dock.const.js";
5
+ import { getScale as M } from "./Dock.utils.js";
6
+ const K = (g) => {
12
7
  const {
13
- items: n,
14
- position: r = "bottom",
15
- iconSize: a = O,
16
- magnifiedSize: s = A,
17
- magnification: i = !0,
18
- magnificationDistance: c = C,
8
+ items: u,
9
+ position: b = "bottom",
10
+ iconSize: n = O,
11
+ magnifiedSize: p = A,
12
+ magnification: f = !0,
13
+ magnificationDistance: m = C,
19
14
  showLabels: _ = !0,
20
15
  className: h,
21
16
  style: x,
22
- testId: D
23
- } = l, [u, g] = p(-1), [I, f] = p(""), y = w(null), N = r === "left" || r === "right", k = m((e, o) => {
24
- g(e), f(o.label);
25
- }, []), v = m(() => {
26
- g(-1), f("");
17
+ testId: I
18
+ } = g, [i, l] = d(-1), [D, s] = d(""), y = w(null), N = b === "left" || b === "right", k = c((e, t) => {
19
+ l(e), s(t.label);
20
+ }, []), v = c(() => {
21
+ l(-1), s("");
27
22
  }, []);
28
- return /* @__PURE__ */ t(
23
+ return /* @__PURE__ */ r(
29
24
  "div",
30
25
  {
31
26
  ref: y,
32
- className: b(
27
+ className: a(
33
28
  "Bear-Dock",
34
29
  "bear-flex bear-items-end bear-gap-1",
35
30
  "bear-rounded-2xl bear-px-2 bear-py-1.5",
@@ -37,7 +32,7 @@ const j = (l, n, r, a, s) => {
37
32
  "bear-backdrop-blur-xl",
38
33
  "bear-border bear-border-gray-200/50 dark:bear-border-gray-700/50",
39
34
  "bear-shadow-lg",
40
- F[r],
35
+ F[b],
41
36
  N && "bear-items-center",
42
37
  h
43
38
  ),
@@ -46,21 +41,21 @@ const j = (l, n, r, a, s) => {
46
41
  zIndex: E,
47
42
  ...x
48
43
  },
49
- "data-testid": D,
44
+ "data-testid": I,
50
45
  role: "toolbar",
51
46
  "aria-label": "Dock",
52
47
  onMouseLeave: v,
53
- children: n.map((e, o) => {
54
- const d = i ? j(o, u, c, a, s) : a;
48
+ children: u.map((e, t) => {
49
+ const o = f ? M(t, i, m, n, p) : n;
55
50
  return /* @__PURE__ */ S(
56
51
  "div",
57
52
  {
58
53
  className: "Bear-Dock__item bear-relative bear-flex bear-flex-col bear-items-center",
59
54
  children: [
60
- _ && u === o && I && /* @__PURE__ */ t(
55
+ _ && i === t && D && /* @__PURE__ */ r(
61
56
  "div",
62
57
  {
63
- className: b(
58
+ className: a(
64
59
  "Bear-Dock__tooltip",
65
60
  "bear-absolute bear-whitespace-nowrap",
66
61
  "bear-px-2 bear-py-1 bear-rounded-lg",
@@ -68,16 +63,16 @@ const j = (l, n, r, a, s) => {
68
63
  "bear-text-white dark:bear-text-gray-900",
69
64
  "bear-text-xs bear-font-medium",
70
65
  "bear-shadow-md bear-pointer-events-none",
71
- L[r]
66
+ L[b]
72
67
  ),
73
68
  role: "tooltip",
74
69
  children: e.label
75
70
  }
76
71
  ),
77
- /* @__PURE__ */ t(
72
+ /* @__PURE__ */ r(
78
73
  "button",
79
74
  {
80
- className: b(
75
+ className: a(
81
76
  "Bear-Dock__button",
82
77
  "bear-flex bear-items-center bear-justify-center bear-rounded-xl",
83
78
  "bear-transition-all bear-origin-bottom",
@@ -86,32 +81,32 @@ const j = (l, n, r, a, s) => {
86
81
  e.disabled && "bear-opacity-40 bear-cursor-not-allowed"
87
82
  ),
88
83
  style: {
89
- width: d,
90
- height: d,
84
+ width: o,
85
+ height: o,
91
86
  transitionDuration: `${B}ms`,
92
87
  transitionTimingFunction: "cubic-bezier(0.25, 0.1, 0.25, 1)"
93
88
  },
94
89
  onClick: e.disabled ? void 0 : e.onClick,
95
- onMouseEnter: () => k(o, e),
90
+ onMouseEnter: () => k(t, e),
96
91
  disabled: e.disabled,
97
92
  "aria-label": e.label,
98
- children: /* @__PURE__ */ t(
93
+ children: /* @__PURE__ */ r(
99
94
  "span",
100
95
  {
101
- className: b(
96
+ className: a(
102
97
  "Bear-Dock__icon",
103
98
  "bear-flex bear-items-center bear-justify-center",
104
99
  "bear-w-full bear-h-full bear-rounded-xl",
105
100
  "bear-transition-transform",
106
101
  e.active ? "bear-bg-[var(--bear-primary-500)] bear-text-white" : "bear-bg-gray-100 dark:bear-bg-gray-800"
107
102
  ),
108
- style: { fontSize: d * M },
103
+ style: { fontSize: o * z },
109
104
  children: e.icon
110
105
  }
111
106
  )
112
107
  }
113
108
  ),
114
- e.badge !== void 0 && /* @__PURE__ */ t("span", { className: b(
109
+ e.badge !== void 0 && /* @__PURE__ */ r("span", { className: a(
115
110
  "Bear-Dock__badge",
116
111
  "bear-absolute bear--top-1 bear--right-1",
117
112
  "bear-min-w-[18px] bear-h-[18px]",
@@ -120,10 +115,10 @@ const j = (l, n, r, a, s) => {
120
115
  "bear-text-white bear-leading-none bear-px-1",
121
116
  "bear-bg-[var(--bear-danger-500,#ef4444)]"
122
117
  ), children: e.badge }),
123
- e.active && r === "bottom" && /* @__PURE__ */ t(
118
+ e.active && b === "bottom" && /* @__PURE__ */ r(
124
119
  "div",
125
120
  {
126
- className: b(
121
+ className: a(
127
122
  "Bear-Dock__dot",
128
123
  "bear-w-1 bear-h-1 bear-rounded-full bear-mt-0.5",
129
124
  "bear-bg-[var(--bear-primary-500)]"
@@ -140,5 +135,5 @@ const j = (l, n, r, a, s) => {
140
135
  );
141
136
  };
142
137
  export {
143
- z as Dock
138
+ K as Dock
144
139
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=(n,r,o,t,u)=>{if(r<0)return t;const c=Math.abs(n-r);if(c>o)return t;const e=1-c/(o+1);return t+(u-t)*e};exports.getScale=f;
@@ -0,0 +1 @@
1
+ export declare const getScale: (index: number, hoverIndex: number, distance: number, baseSize: number, maxSize: number) => number;
@@ -0,0 +1,10 @@
1
+ const g = (o, r, f, t, c) => {
2
+ if (r < 0) return t;
3
+ const n = Math.abs(o - r);
4
+ if (n > f) return t;
5
+ const u = 1 - n / (f + 1);
6
+ return t + (c - t) * u;
7
+ };
8
+ export {
9
+ g as getScale
10
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),r=require("react"),h=require("../../utils/cn.cjs"),_={xs:"bear-text-xs bear-py-1 bear-px-2",sm:"bear-text-sm bear-py-1.5 bear-px-3",md:"bear-text-sm bear-py-2 bear-px-3",lg:"bear-text-base bear-py-2.5 bear-px-4",xl:"bear-text-lg bear-py-3 bear-px-5"},B={"bottom-start":"bear-top-full bear-left-0 bear-mt-1","bottom-end":"bear-top-full bear-right-0 bear-mt-1",bottom:"bear-top-full bear-left-1/2 -bear-translate-x-1/2 bear-mt-1","top-start":"bear-bottom-full bear-left-0 bear-mb-1","top-end":"bear-bottom-full bear-right-0 bear-mb-1",top:"bear-bottom-full bear-left-1/2 -bear-translate-x-1/2 bear-mb-1",left:"bear-right-full bear-top-0 bear-mr-1",right:"bear-left-full bear-top-0 bear-ml-1"},K=({trigger:x,items:i,open:k,defaultOpen:N=!1,placement:S="bottom-start",offset:U=4,matchWidth:C=!1,minWidth:D=150,maxHeight:I=300,size:R="md",closeOnSelect:m=!0,closeOnClickOutside:v=!0,disabled:w=!1,onOpenChange:u,className:L,testId:A,...q})=>{var j;const[M,W]=r.useState(N),[o,d]=r.useState(-1),p=r.useRef(null),z=r.useRef(null),E=r.useRef(null),g=k!==void 0,b=g?k:M,f=r.useCallback(e=>{g||W(e),u==null||u(e)},[g,u]),F=r.useCallback(()=>{w||f(!b)},[w,b,f]),l=r.useCallback(()=>{f(!1),d(-1)},[f]),y=r.useCallback(e=>{var t;e.disabled||e.divider||e.header||((t=e.onClick)==null||t.call(e),m&&!e.items&&l())},[m,l]);r.useEffect(()=>{if(!v||!b)return;const e=t=>{p.current&&!p.current.contains(t.target)&&l()};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[b,v,l]),r.useEffect(()=>{if(!b)return;const e=i.filter(a=>!a.disabled&&!a.divider&&!a.header),t=a=>{switch(a.key){case"Escape":a.preventDefault(),l();break;case"ArrowDown":a.preventDefault(),d(c=>{const s=c+1;return s>=e.length?0:s});break;case"ArrowUp":a.preventDefault(),d(c=>{const s=c-1;return s<0?e.length-1:s});break;case"Enter":case" ":a.preventDefault(),o>=0&&o<e.length&&y(e[o]);break}};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[b,i,o,l,y]),r.useEffect(()=>{b||d(-1)},[b]);const P=(e,t)=>{if(e.divider)return n.jsx("div",{className:"bear-my-1 bear-mx-2 bear-h-px bear-bg-gray-200 dark:bear-bg-gray-700",role:"separator"},e.key);if(e.header)return n.jsx("div",{className:"bear-px-3 bear-py-1.5 bear-text-xs bear-font-semibold bear-uppercase bear-tracking-wider bear-text-gray-500 dark:bear-text-gray-400",children:e.label},e.key);const a=i.slice(0,t).filter(s=>!s.disabled&&!s.divider&&!s.header).length,c=o===a;return n.jsxs("button",{type:"button",role:"menuitem",disabled:e.disabled,onClick:()=>y(e),onMouseEnter:()=>d(a),className:h.cn("bear-w-full bear-flex bear-items-center bear-gap-2 bear-text-left bear-border-none bear-bg-transparent",_[R],"bear-transition-colors bear-cursor-pointer",c&&"bear-bg-gray-100 dark:bear-bg-gray-800",e.danger?"bear-text-red-600 dark:bear-text-red-400 hover:bear-bg-red-50 dark:hover:bear-bg-red-900/20":"bear-text-gray-700 dark:bear-text-gray-200 hover:bear-bg-gray-100 dark:hover:bear-bg-gray-800",e.disabled&&"bear-opacity-50 bear-cursor-not-allowed bear-pointer-events-none"),children:[e.icon&&n.jsx("span",{className:"bear-flex-shrink-0 bear-w-5 bear-h-5 bear-flex bear-items-center bear-justify-center",children:e.icon}),n.jsx("span",{className:"bear-flex-1",children:e.label}),e.trailing&&n.jsx("span",{className:"bear-flex-shrink-0 bear-text-gray-400",children:e.trailing}),e.items&&n.jsx("svg",{className:"bear-w-4 bear-h-4 bear-text-gray-400",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:n.jsx("polyline",{points:"9 18 15 12 9 6"})})]},e.key)},T=r.isValidElement(x)?r.cloneElement(x,{onClick:F,ref:E,"aria-expanded":b,"aria-haspopup":!0}):x;return n.jsxs("div",{ref:p,className:h.cn("bear-relative bear-inline-block",L),"data-testid":A,...q,children:[T,b&&n.jsx("div",{ref:z,role:"menu",className:h.cn("bear-absolute bear-z-50","bear-bg-white dark:bear-bg-gray-900","bear-border bear-border-gray-200 dark:bear-border-gray-700","bear-rounded-lg bear-shadow-lg","bear-py-1 bear-overflow-y-auto","bear-animate-in bear-fade-in-0 bear-zoom-in-95 bear-duration-100",B[S]),style:{minWidth:C?(j=E.current)==null?void 0:j.offsetWidth:D,maxHeight:I},children:i.map((e,t)=>P(e,t))})]})};exports.Dropdown=K;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react/jsx-runtime"),r=require("react"),y=require("../../utils/cn.cjs"),B=require("../../hooks/useClickOutside.cjs");require("../../context/BearProvider.cjs");require("../../hooks/useBearComponent/useBearComponent.cjs");const K={xs:"bear-text-xs bear-py-1 bear-px-2",sm:"bear-text-sm bear-py-1.5 bear-px-3",md:"bear-text-sm bear-py-2 bear-px-3",lg:"bear-text-base bear-py-2.5 bear-px-4",xl:"bear-text-lg bear-py-3 bear-px-5"},U={"bottom-start":"bear-top-full bear-left-0 bear-mt-1","bottom-end":"bear-top-full bear-right-0 bear-mt-1",bottom:"bear-top-full bear-left-1/2 -bear-translate-x-1/2 bear-mt-1","top-start":"bear-bottom-full bear-left-0 bear-mb-1","top-end":"bear-bottom-full bear-right-0 bear-mb-1",top:"bear-bottom-full bear-left-1/2 -bear-translate-x-1/2 bear-mb-1",left:"bear-right-full bear-top-0 bear-mr-1",right:"bear-left-full bear-top-0 bear-ml-1"},V=({trigger:x,items:i,open:k,defaultOpen:C=!1,placement:N="bottom-start",offset:Z=4,matchWidth:S=!1,minWidth:D=150,maxHeight:I=300,size:R="md",closeOnSelect:h=!0,closeOnClickOutside:m=!0,disabled:v=!1,onOpenChange:u,className:q,testId:A,...L})=>{var j;const[M,W]=r.useState(C),[o,d]=r.useState(-1),w=r.useRef(null),z=r.useRef(null),E=r.useRef(null),p=k!==void 0,t=p?k:M,f=r.useCallback(e=>{p||W(e),u==null||u(e)},[p,u]),F=r.useCallback(()=>{v||f(!t)},[v,t,f]),l=r.useCallback(()=>{f(!1),d(-1)},[f]),g=r.useCallback(e=>{var s;e.disabled||e.divider||e.header||((s=e.onClick)==null||s.call(e),h&&!e.items&&l())},[h,l]),P=r.useCallback(()=>{t&&m&&l()},[t,m,l]);B.useClickOutside(w,P),r.useEffect(()=>{if(!t)return;const e=i.filter(a=>!a.disabled&&!a.divider&&!a.header),s=a=>{switch(a.key){case"Escape":a.preventDefault(),l();break;case"ArrowDown":a.preventDefault(),d(c=>{const n=c+1;return n>=e.length?0:n});break;case"ArrowUp":a.preventDefault(),d(c=>{const n=c-1;return n<0?e.length-1:n});break;case"Enter":case" ":a.preventDefault(),o>=0&&o<e.length&&g(e[o]);break}};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[t,i,o,l,g]),r.useEffect(()=>{t||d(-1)},[t]);const T=(e,s)=>{if(e.divider)return b.jsx("div",{className:"bear-my-1 bear-mx-2 bear-h-px bear-bg-gray-200 dark:bear-bg-gray-700",role:"separator"},e.key);if(e.header)return b.jsx("div",{className:"bear-px-3 bear-py-1.5 bear-text-xs bear-font-semibold bear-uppercase bear-tracking-wider bear-text-gray-500 dark:bear-text-gray-400",children:e.label},e.key);const a=i.slice(0,s).filter(n=>!n.disabled&&!n.divider&&!n.header).length,c=o===a;return b.jsxs("button",{type:"button",role:"menuitem",disabled:e.disabled,onClick:()=>g(e),onMouseEnter:()=>d(a),className:y.cn("bear-w-full bear-flex bear-items-center bear-gap-2 bear-text-left bear-border-none bear-bg-transparent",K[R],"bear-transition-colors bear-cursor-pointer",c&&"bear-bg-gray-100 dark:bear-bg-gray-800",e.danger?"bear-text-red-600 dark:bear-text-red-400 hover:bear-bg-red-50 dark:hover:bear-bg-red-900/20":"bear-text-gray-700 dark:bear-text-gray-200 hover:bear-bg-gray-100 dark:hover:bear-bg-gray-800",e.disabled&&"bear-opacity-50 bear-cursor-not-allowed bear-pointer-events-none"),children:[e.icon&&b.jsx("span",{className:"bear-flex-shrink-0 bear-w-5 bear-h-5 bear-flex bear-items-center bear-justify-center",children:e.icon}),b.jsx("span",{className:"bear-flex-1",children:e.label}),e.trailing&&b.jsx("span",{className:"bear-flex-shrink-0 bear-text-gray-400",children:e.trailing}),e.items&&b.jsx("svg",{className:"bear-w-4 bear-h-4 bear-text-gray-400",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:b.jsx("polyline",{points:"9 18 15 12 9 6"})})]},e.key)},_=r.isValidElement(x)?r.cloneElement(x,{onClick:F,ref:E,"aria-expanded":t,"aria-haspopup":!0}):x;return b.jsxs("div",{ref:w,className:y.cn("bear-relative bear-inline-block",q),"data-testid":A,...L,children:[_,t&&b.jsx("div",{ref:z,role:"menu",className:y.cn("bear-absolute bear-z-50","bear-bg-white dark:bear-bg-gray-900","bear-border bear-border-gray-200 dark:bear-border-gray-700","bear-rounded-lg bear-shadow-lg","bear-py-1 bear-overflow-y-auto","bear-animate-in bear-fade-in-0 bear-zoom-in-95 bear-duration-100",U[N]),style:{minWidth:S?(j=E.current)==null?void 0:j.offsetWidth:D,maxHeight:I},children:i.map((e,s)=>T(e,s))})]})};exports.Dropdown=V;