@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
@@ -0,0 +1,56 @@
1
+ import { ReactNode } from 'react';
2
+ export type NavigableSelectSize = 'sm' | 'md' | 'lg';
3
+ export interface NavigableSelectOption {
4
+ /** Unique option value */
5
+ value: string;
6
+ /** Display label */
7
+ label: string;
8
+ /** Optional description */
9
+ description?: string;
10
+ /** Optional icon */
11
+ icon?: ReactNode;
12
+ /** Whether option is disabled */
13
+ disabled?: boolean;
14
+ /** Optional group name */
15
+ group?: string;
16
+ }
17
+ export interface NavigableSelectProps {
18
+ /** Available options */
19
+ options: NavigableSelectOption[];
20
+ /** Selected value(s) — string for single, string[] for multiple */
21
+ value?: string | string[];
22
+ /** Default value (uncontrolled) */
23
+ defaultValue?: string | string[];
24
+ /** Called when selection changes */
25
+ onChange?: (value: string | string[]) => void;
26
+ /** Allow multiple selections */
27
+ multiple?: boolean;
28
+ /** Enable search/filter */
29
+ searchable?: boolean;
30
+ /** Placeholder text */
31
+ placeholder?: string;
32
+ /** Label text */
33
+ label?: string;
34
+ /** Helper text */
35
+ helperText?: string;
36
+ /** Error message */
37
+ error?: string;
38
+ /** Whether select is disabled */
39
+ disabled?: boolean;
40
+ /** Component size */
41
+ size?: NavigableSelectSize;
42
+ /** Whether select is full width */
43
+ fullWidth?: boolean;
44
+ /** Maximum visible options before scrolling */
45
+ maxVisible?: number;
46
+ /** Maximum selections in multiple mode */
47
+ maxSelections?: number;
48
+ /** Empty state text */
49
+ emptyText?: string;
50
+ /** Custom class name */
51
+ className?: string;
52
+ /** Custom style */
53
+ style?: React.CSSProperties;
54
+ /** Test ID */
55
+ testId?: string;
56
+ }
@@ -0,0 +1,2 @@
1
+ export { NavigableSelect } from './NavigableSelect';
2
+ export type { NavigableSelectProps, NavigableSelectOption, NavigableSelectSize } from './NavigableSelect.types';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("../../utils/cn.cjs"),m={sm:"bear-h-1.5",md:"bear-h-2.5",lg:"bear-h-4"},f={default:"bear-bg-pink-500",success:"bear-bg-green-500",warning:"bear-bg-yellow-500",danger:"bear-bg-red-500",info:"bear-bg-blue-500"},x=({value:n,max:b=100,size:l="md",color:o="default",showLabel:i=!1,labelPosition:d="outside",striped:r=!1,animated:c=!1,indeterminate:a=!1,className:g,testId:u})=>{const s=Math.min(100,Math.max(0,n/b*100));return e.jsxs("div",{className:t.cn("bear-w-full",g),"data-testid":u,children:[i&&d==="outside"&&e.jsxs("div",{className:"bear-flex bear-justify-between bear-mb-1",children:[e.jsx("span",{className:"bear-text-sm bear-font-medium bear-text-gray-700 dark:bear-text-gray-200",children:"Progress"}),e.jsxs("span",{className:"bear-text-sm bear-font-medium bear-text-gray-700 dark:bear-text-gray-200",children:[Math.round(s),"%"]})]}),e.jsx("div",{className:t.cn("bear-w-full bear-bg-gray-200 dark:bear-bg-gray-700 bear-rounded-full bear-overflow-hidden",m[l]),children:e.jsx("div",{className:t.cn("bear-h-full bear-rounded-full bear-transition-all bear-duration-300 bear-ease-out","bear-flex bear-items-center bear-justify-center",f[o],r&&"bear-bg-stripes",c&&"bear-animate-stripes",a&&"bear-animate-indeterminate"),style:{width:a?"50%":`${s}%`,backgroundSize:r?"1rem 1rem":void 0,backgroundImage:r?"linear-gradient(45deg, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent)":void 0},role:"progressbar","aria-valuenow":a?void 0:n,"aria-valuemin":0,"aria-valuemax":b,children:i&&d==="inside"&&l==="lg"&&!a&&e.jsxs("span",{className:"bear-text-xs bear-font-medium bear-text-white",children:[Math.round(s),"%"]})})})]})};exports.Progress=x;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("../../utils/cn.cjs");require("react");const m={sm:"bear-h-1.5",md:"bear-h-2.5",lg:"bear-h-4"},f={default:"bear-bg-pink-500",success:"bear-bg-green-500",warning:"bear-bg-yellow-500",danger:"bear-bg-red-500",info:"bear-bg-blue-500"},x=({value:n,max:b=100,size:l="md",color:o="default",showLabel:i=!1,labelPosition:d="outside",striped:r=!1,animated:c=!1,indeterminate:a=!1,className:g,testId:u})=>{const s=Math.min(100,Math.max(0,n/b*100));return e.jsxs("div",{className:t.cn("bear-w-full",g),"data-testid":u,children:[i&&d==="outside"&&e.jsxs("div",{className:"bear-flex bear-justify-between bear-mb-1",children:[e.jsx("span",{className:"bear-text-sm bear-font-medium bear-text-gray-700 dark:bear-text-gray-200",children:"Progress"}),e.jsxs("span",{className:"bear-text-sm bear-font-medium bear-text-gray-700 dark:bear-text-gray-200",children:[Math.round(s),"%"]})]}),e.jsx("div",{className:t.cn("bear-w-full bear-bg-gray-200 dark:bear-bg-gray-700 bear-rounded-full bear-overflow-hidden",m[l]),children:e.jsx("div",{className:t.cn("bear-h-full bear-rounded-full bear-transition-all bear-duration-300 bear-ease-out","bear-flex bear-items-center bear-justify-center",f[o],r&&"bear-bg-stripes",c&&"bear-animate-stripes",a&&"bear-animate-indeterminate"),style:{width:a?"50%":`${s}%`,backgroundSize:r?"1rem 1rem":void 0,backgroundImage:r?"linear-gradient(45deg, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent)":void 0},role:"progressbar","aria-valuenow":a?void 0:n,"aria-valuemin":0,"aria-valuemax":b,children:i&&d==="inside"&&l==="lg"&&!a&&e.jsxs("span",{className:"bear-text-xs bear-font-medium bear-text-white",children:[Math.round(s),"%"]})})})]})};exports.Progress=x;
@@ -1,5 +1,6 @@
1
1
  import { jsxs as a, jsx as t } from "react/jsx-runtime";
2
2
  import { cn as b } from "../../utils/cn.js";
3
+ import "react";
3
4
  const f = {
4
5
  sm: "bear-h-1.5",
5
6
  md: "bear-h-2.5",
@@ -10,7 +11,7 @@ const f = {
10
11
  warning: "bear-bg-yellow-500",
11
12
  danger: "bear-bg-red-500",
12
13
  info: "bear-bg-blue-500"
13
- }, v = ({
14
+ }, y = ({
14
15
  value: n,
15
16
  max: l = 100,
16
17
  size: d = "md",
@@ -70,5 +71,5 @@ const f = {
70
71
  ] });
71
72
  };
72
73
  export {
73
- v as Progress
74
+ y as Progress
74
75
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),T=require("../../../../utils/cn.cjs"),t=require("../../RichEditor.const.cjs"),E=e=>{const{icon:i,title:_,active:n,onClick:r,disabled:o}=e;return c.jsx("button",{type:"button",title:_,onClick:r,disabled:o,className:T.cn("Bear-RichEditor__button",t.RICH_EDITOR_BUTTON_BASE_CLASSES,n?`Bear-RichEditor__button--active ${t.RICH_EDITOR_BUTTON_ACTIVE_CLASSES}`:t.RICH_EDITOR_BUTTON_INACTIVE_CLASSES,o&&`Bear-RichEditor__button--disabled ${t.RICH_EDITOR_BUTTON_DISABLED_CLASSES}`),children:i})};exports.ToolbarButton=E;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),T=require("../../../../utils/cn.cjs");require("react");const t=require("../../RichEditor.const.cjs"),u=o=>{const{icon:i,title:r,active:_,onClick:n,disabled:e}=o;return c.jsx("button",{type:"button",title:r,onClick:n,disabled:e,className:T.cn("Bear-RichEditor__button",t.RICH_EDITOR_BUTTON_BASE_CLASSES,_?`Bear-RichEditor__button--active ${t.RICH_EDITOR_BUTTON_ACTIVE_CLASSES}`:t.RICH_EDITOR_BUTTON_INACTIVE_CLASSES,e&&`Bear-RichEditor__button--disabled ${t.RICH_EDITOR_BUTTON_DISABLED_CLASSES}`),children:i})};exports.ToolbarButton=u;
@@ -1,7 +1,8 @@
1
1
  import { jsx as T } from "react/jsx-runtime";
2
2
  import { cn as S } from "../../../../utils/cn.js";
3
+ import "react";
3
4
  import { RICH_EDITOR_BUTTON_DISABLED_CLASSES as e, RICH_EDITOR_BUTTON_ACTIVE_CLASSES as n, RICH_EDITOR_BUTTON_INACTIVE_CLASSES as c, RICH_EDITOR_BUTTON_BASE_CLASSES as I } from "../../RichEditor.const.js";
4
- const B = (o) => {
5
+ const b = (o) => {
5
6
  const { icon: _, title: i, active: r, onClick: E, disabled: t } = o;
6
7
  return /* @__PURE__ */ T(
7
8
  "button",
@@ -21,5 +22,5 @@ const B = (o) => {
21
22
  );
22
23
  };
23
24
  export {
24
- B as ToolbarButton
25
+ b as ToolbarButton
25
26
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),u=require("../../utils/cn.cjs"),w=({children:b,className:l,orientation:a="vertical",scrollbarSize:o="md",scrollbarVariant:t="default",maxHeight:r,maxWidth:e})=>{const s={sm:"[&::-webkit-scrollbar]:bear-w-1 [&::-webkit-scrollbar]:bear-h-1",md:"[&::-webkit-scrollbar]:bear-w-2 [&::-webkit-scrollbar]:bear-h-2",lg:"[&::-webkit-scrollbar]:bear-w-3 [&::-webkit-scrollbar]:bear-h-3"},c={default:"[&::-webkit-scrollbar-track]:bear-bg-zinc-800 [&::-webkit-scrollbar-thumb]:bear-bg-zinc-600 [&::-webkit-scrollbar-thumb]:bear-rounded-full [&::-webkit-scrollbar-thumb]:hover:bear-bg-zinc-500",minimal:"[&::-webkit-scrollbar-track]:bear-bg-transparent [&::-webkit-scrollbar-thumb]:bear-bg-zinc-700 [&::-webkit-scrollbar-thumb]:bear-rounded-full",hidden:"[&::-webkit-scrollbar]:bear-hidden bear-scrollbar-none"},i={vertical:"bear-overflow-y-auto bear-overflow-x-hidden",horizontal:"bear-overflow-x-auto bear-overflow-y-hidden",both:"bear-overflow-auto"};return n.jsx("div",{className:u.cn(i[a],s[o],c[t],l),style:{maxHeight:typeof r=="number"?`${r}px`:r,maxWidth:typeof e=="number"?`${e}px`:e},children:b})};exports.ScrollArea=w;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),u=require("../../utils/cn.cjs");require("react");const w=({children:b,className:l,orientation:a="vertical",scrollbarSize:o="md",scrollbarVariant:t="default",maxHeight:r,maxWidth:e})=>{const s={sm:"[&::-webkit-scrollbar]:bear-w-1 [&::-webkit-scrollbar]:bear-h-1",md:"[&::-webkit-scrollbar]:bear-w-2 [&::-webkit-scrollbar]:bear-h-2",lg:"[&::-webkit-scrollbar]:bear-w-3 [&::-webkit-scrollbar]:bear-h-3"},c={default:"[&::-webkit-scrollbar-track]:bear-bg-zinc-800 [&::-webkit-scrollbar-thumb]:bear-bg-zinc-600 [&::-webkit-scrollbar-thumb]:bear-rounded-full [&::-webkit-scrollbar-thumb]:hover:bear-bg-zinc-500",minimal:"[&::-webkit-scrollbar-track]:bear-bg-transparent [&::-webkit-scrollbar-thumb]:bear-bg-zinc-700 [&::-webkit-scrollbar-thumb]:bear-rounded-full",hidden:"[&::-webkit-scrollbar]:bear-hidden bear-scrollbar-none"},i={vertical:"bear-overflow-y-auto bear-overflow-x-hidden",horizontal:"bear-overflow-x-auto bear-overflow-y-hidden",both:"bear-overflow-auto"};return n.jsx("div",{className:u.cn(i[a],s[o],c[t],l),style:{maxHeight:typeof r=="number"?`${r}px`:r,maxWidth:typeof e=="number"?`${e}px`:e},children:b})};exports.ScrollArea=w;
@@ -1,6 +1,7 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
2
  import { cn as n } from "../../utils/cn.js";
3
- const k = ({
3
+ import "react";
4
+ const m = ({
4
5
  children: b,
5
6
  className: l,
6
7
  orientation: a = "vertical",
@@ -40,5 +41,5 @@ const k = ({
40
41
  );
41
42
  };
42
43
  export {
43
- k as ScrollArea
44
+ m as ScrollArea
44
45
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("../../utils/cn.cjs"),t=require("../Icon/index.cjs"),p=require("./components/SidebarItem/SidebarItem.cjs"),a=require("./Sidebar.const.cjs"),L=S=>{const{items:b,collapsed:r=!1,onCollapsedChange:d,width:_=a.SIDEBAR_WIDTH,collapsedWidth:I=a.SIDEBAR_COLLAPSED_WIDTH,header:o,footer:c,showHeader:E=!0,activeItemId:h,onItemClick:u,activeVariant:f="fill",fullHeight:A=!1,variant:s="default",position:l="left",className:C,style:x,testId:B,id:R}=S,m=r?I:_,v=l==="left"?"bear-border-r":"bear-border-l",D=E&&o;return e.jsxs("aside",{id:R,"data-testid":B,className:i.cn("Bear-Sidebar",`Bear-Sidebar--${s}`,r&&"Bear-Sidebar--collapsed","bear-flex bear-flex-col bear-h-full bear-transition-all bear-duration-300",A&&"bear-min-h-full",s==="default"&&v,a.SIDEBAR_VARIANT_STYLES[s],C),style:{width:m,...x},children:[D&&e.jsxs("div",{className:i.cn("Bear-Sidebar__header",a.SIDEBAR_HEADER_CLASSES),children:[!r&&o,d&&e.jsx("button",{type:"button",onClick:()=>d(!r),className:i.cn("Bear-Sidebar__toggle",a.SIDEBAR_TOGGLE_CLASSES),"aria-label":r?"Expand sidebar":"Collapse sidebar",children:r?l==="left"?e.jsx(t.ChevronRightIcon,{size:a.SIDEBAR_TOGGLE_ICON_SIZE}):e.jsx(t.ChevronLeftIcon,{size:a.SIDEBAR_TOGGLE_ICON_SIZE}):l==="left"?e.jsx(t.ChevronLeftIcon,{size:a.SIDEBAR_TOGGLE_ICON_SIZE}):e.jsx(t.ChevronRightIcon,{size:a.SIDEBAR_TOGGLE_ICON_SIZE})})]}),e.jsx("nav",{className:"Bear-Sidebar__nav bear-flex-1 bear-overflow-y-auto bear-px-2 bear-py-3 bear-space-y-1 bear-min-h-0",children:b.map(n=>e.jsx(p.SidebarItem,{item:n,isActive:n.id===h,collapsed:r,onClick:u,activeVariant:f},n.id))}),c&&e.jsx("div",{className:i.cn("Bear-Sidebar__footer",a.SIDEBAR_FOOTER_CLASSES),children:r?null:c})]})};exports.Sidebar=L;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("../../utils/cn.cjs");require("react");const t=require("../Icon/index.cjs"),p=require("./components/SidebarItem/SidebarItem.cjs"),a=require("./Sidebar.const.cjs"),L=S=>{const{items:b,collapsed:r=!1,onCollapsedChange:d,width:_=a.SIDEBAR_WIDTH,collapsedWidth:I=a.SIDEBAR_COLLAPSED_WIDTH,header:o,footer:c,showHeader:E=!0,activeItemId:h,onItemClick:u,activeVariant:f="fill",fullHeight:A=!1,variant:s="default",position:l="left",className:C,style:x,testId:B,id:R}=S,m=r?I:_,v=l==="left"?"bear-border-r":"bear-border-l",D=E&&o;return e.jsxs("aside",{id:R,"data-testid":B,className:i.cn("Bear-Sidebar",`Bear-Sidebar--${s}`,r&&"Bear-Sidebar--collapsed","bear-flex bear-flex-col bear-h-full bear-transition-all bear-duration-300",A&&"bear-min-h-full",s==="default"&&v,a.SIDEBAR_VARIANT_STYLES[s],C),style:{width:m,...x},children:[D&&e.jsxs("div",{className:i.cn("Bear-Sidebar__header",a.SIDEBAR_HEADER_CLASSES),children:[!r&&o,d&&e.jsx("button",{type:"button",onClick:()=>d(!r),className:i.cn("Bear-Sidebar__toggle",a.SIDEBAR_TOGGLE_CLASSES),"aria-label":r?"Expand sidebar":"Collapse sidebar",children:r?l==="left"?e.jsx(t.ChevronRightIcon,{size:a.SIDEBAR_TOGGLE_ICON_SIZE}):e.jsx(t.ChevronLeftIcon,{size:a.SIDEBAR_TOGGLE_ICON_SIZE}):l==="left"?e.jsx(t.ChevronLeftIcon,{size:a.SIDEBAR_TOGGLE_ICON_SIZE}):e.jsx(t.ChevronRightIcon,{size:a.SIDEBAR_TOGGLE_ICON_SIZE})})]}),e.jsx("nav",{className:"Bear-Sidebar__nav bear-flex-1 bear-overflow-y-auto bear-px-2 bear-py-3 bear-space-y-1 bear-min-h-0",children:b.map(n=>e.jsx(p.SidebarItem,{item:n,isActive:n.id===h,collapsed:r,onClick:u,activeVariant:f},n.id))}),c&&e.jsx("div",{className:i.cn("Bear-Sidebar__footer",a.SIDEBAR_FOOTER_CLASSES),children:r?null:c})]})};exports.Sidebar=L;
@@ -1,20 +1,21 @@
1
1
  import { jsxs as b, jsx as a } from "react/jsx-runtime";
2
2
  import { cn as r } from "../../utils/cn.js";
3
+ import "react";
3
4
  import { ChevronRightIcon as c, ChevronLeftIcon as S } from "../Icon/index.js";
4
5
  import { SidebarItem as N } from "./components/SidebarItem/SidebarItem.js";
5
6
  import { SIDEBAR_WIDTH as T, SIDEBAR_COLLAPSED_WIDTH as y, SIDEBAR_TOGGLE_ICON_SIZE as i, SIDEBAR_TOGGLE_CLASSES as H, SIDEBAR_HEADER_CLASSES as O, SIDEBAR_FOOTER_CLASSES as g, SIDEBAR_VARIANT_STYLES as w } from "./Sidebar.const.js";
6
- const V = (f) => {
7
+ const F = (f) => {
7
8
  const {
8
- items: _,
9
+ items: m,
9
10
  collapsed: e = !1,
10
11
  onCollapsedChange: d,
11
- width: h = T,
12
- collapsedWidth: m = y,
12
+ width: _ = T,
13
+ collapsedWidth: h = y,
13
14
  header: s,
14
15
  footer: n,
15
- showHeader: E = !0,
16
- activeItemId: I,
17
- onItemClick: p,
16
+ showHeader: p = !0,
17
+ activeItemId: E,
18
+ onItemClick: I,
18
19
  activeVariant: A = "fill",
19
20
  fullHeight: B = !1,
20
21
  variant: l = "default",
@@ -23,7 +24,7 @@ const V = (f) => {
23
24
  style: C,
24
25
  testId: v,
25
26
  id: D
26
- } = f, R = e ? m : h, L = t === "left" ? "bear-border-r" : "bear-border-l", x = E && s;
27
+ } = f, R = e ? h : _, L = t === "left" ? "bear-border-r" : "bear-border-l", x = p && s;
27
28
  return /* @__PURE__ */ b(
28
29
  "aside",
29
30
  {
@@ -54,13 +55,13 @@ const V = (f) => {
54
55
  }
55
56
  )
56
57
  ] }),
57
- /* @__PURE__ */ a("nav", { className: "Bear-Sidebar__nav bear-flex-1 bear-overflow-y-auto bear-px-2 bear-py-3 bear-space-y-1 bear-min-h-0", children: _.map((o) => /* @__PURE__ */ a(
58
+ /* @__PURE__ */ a("nav", { className: "Bear-Sidebar__nav bear-flex-1 bear-overflow-y-auto bear-px-2 bear-py-3 bear-space-y-1 bear-min-h-0", children: m.map((o) => /* @__PURE__ */ a(
58
59
  N,
59
60
  {
60
61
  item: o,
61
- isActive: o.id === I,
62
+ isActive: o.id === E,
62
63
  collapsed: e,
63
- onClick: p,
64
+ onClick: I,
64
65
  activeVariant: A
65
66
  },
66
67
  o.id
@@ -71,5 +72,5 @@ const V = (f) => {
71
72
  );
72
73
  };
73
74
  export {
74
- V as Sidebar
75
+ F as Sidebar
75
76
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("../../utils/cn.cjs"),t={xs:"bear-w-3 bear-h-3",sm:"bear-w-4 bear-h-4",md:"bear-w-6 bear-h-6",lg:"bear-w-8 bear-h-8",xl:"bear-w-10 bear-h-10"},c=({size:r="md",className:n,color:a="currentColor",label:s="Loading"})=>e.jsxs("svg",{className:i.cn("Bear-Spinner",`Bear-Spinner--${r}`,"bear-animate-spin",t[r],n),viewBox:"0 0 24 24",fill:"none","aria-label":s,role:"status",children:[e.jsx("circle",{className:"Bear-Spinner__track bear-opacity-25",cx:"12",cy:"12",r:"10",stroke:a,strokeWidth:"4"}),e.jsx("path",{className:"Bear-Spinner__arc bear-opacity-75",fill:a,d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]});exports.Spinner=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("../../utils/cn.cjs");require("react");const t={xs:"bear-w-3 bear-h-3",sm:"bear-w-4 bear-h-4",md:"bear-w-6 bear-h-6",lg:"bear-w-8 bear-h-8",xl:"bear-w-10 bear-h-10"},c=({size:r="md",className:n,color:a="currentColor",label:s="Loading"})=>e.jsxs("svg",{className:i.cn("Bear-Spinner",`Bear-Spinner--${r}`,"bear-animate-spin",t[r],n),viewBox:"0 0 24 24",fill:"none","aria-label":s,role:"status",children:[e.jsx("circle",{className:"Bear-Spinner__track bear-opacity-25",cx:"12",cy:"12",r:"10",stroke:a,strokeWidth:"4"}),e.jsx("path",{className:"Bear-Spinner__arc bear-opacity-75",fill:a,d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]});exports.Spinner=c;
@@ -1,12 +1,13 @@
1
1
  import { jsxs as i, jsx as a } from "react/jsx-runtime";
2
2
  import { cn as t } from "../../utils/cn.js";
3
+ import "react";
3
4
  const c = {
4
5
  xs: "bear-w-3 bear-h-3",
5
6
  sm: "bear-w-4 bear-h-4",
6
7
  md: "bear-w-6 bear-h-6",
7
8
  lg: "bear-w-8 bear-h-8",
8
9
  xl: "bear-w-10 bear-h-10"
9
- }, b = ({
10
+ }, m = ({
10
11
  size: r = "md",
11
12
  className: s,
12
13
  color: e = "currentColor",
@@ -49,5 +50,5 @@ const c = {
49
50
  }
50
51
  );
51
52
  export {
52
- b as Spinner
53
+ m as Spinner
53
54
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),b=require("react"),m=require("../../utils/cn.cjs"),x=require("./Spotlight.const.cjs"),R=(s,l)=>{var i,p;const n=l.toLowerCase();return!!(s.label.toLowerCase().includes(n)||(i=s.description)!=null&&i.toLowerCase().includes(n)||(p=s.keywords)!=null&&p.some(y=>y.toLowerCase().includes(n)))},E=(s,l)=>{if(!l)return s;const n=s.toLowerCase().indexOf(l.toLowerCase());return n===-1?s:r.jsxs(r.Fragment,{children:[s.slice(0,n),r.jsx("mark",{className:"Bear-Spotlight__highlight bear-bg-yellow-200 dark:bear-bg-yellow-800 bear-text-inherit bear-rounded-sm bear-px-0.5",children:s.slice(n,n+l.length)}),s.slice(n+l.length)]})},U=s=>{const{actions:l,open:n,onOpenChange:i,placeholder:p=x.DEFAULT_PLACEHOLDER,shortcutKey:y=x.DEFAULT_SHORTCUT_KEY,shortcutMod:v=!0,nothingFoundMessage:L=x.DEFAULT_NOTHING_FOUND,highlightMatches:S=!0,limit:f=x.DEFAULT_LIMIT,filter:k,className:B,style:D,testId:T}=s,[I,A]=b.useState(!1),[o,j]=b.useState(""),[h,u]=b.useState(0),N=b.useRef(null),C=b.useRef(null),g=n??I,d=b.useCallback(e=>{A(e),i==null||i(e),e||(j(""),u(0))},[i]);b.useEffect(()=>{const e=a=>{(v?a.metaKey||a.ctrlKey:!0)&&a.key.toLowerCase()===y.toLowerCase()&&(a.preventDefault(),d(!g)),a.key==="Escape"&&g&&d(!1)};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[y,v,g,d]),b.useEffect(()=>{g&&setTimeout(()=>{var e;return(e=N.current)==null?void 0:e.focus()},x.FOCUS_DELAY)},[g]);const c=b.useMemo(()=>k?k(o,l).slice(0,f):o?l.filter(e=>R(e,o)).slice(0,f):l.slice(0,f),[l,o,k,f]),O=b.useMemo(()=>{const e=new Map;return c.forEach(a=>{const t=a.group||"";e.has(t)||e.set(t,[]),e.get(t).push(a)}),e},[c]),M=b.useCallback(e=>{if(e.key==="ArrowDown")e.preventDefault(),u(a=>Math.min(a+1,c.length-1));else if(e.key==="ArrowUp")e.preventDefault(),u(a=>Math.max(a-1,0));else if(e.key==="Enter"&&c[h]){e.preventDefault();const a=c[h];a.disabled||(a.onTrigger(),d(!1))}},[c,h,d]);if(b.useEffect(()=>{const e=C.current;if(!e)return;const a=e.querySelector('[data-active="true"]');a==null||a.scrollIntoView({block:"nearest"})},[h]),!g)return null;let _=-1;return r.jsxs("div",{className:m.cn("Bear-Spotlight","bear-fixed bear-inset-0 bear-flex bear-items-start bear-justify-center bear-pt-[15vh]"),style:{zIndex:x.SPOTLIGHT_Z_INDEX},"data-testid":T,children:[r.jsx("div",{className:"Bear-Spotlight__backdrop bear-absolute bear-inset-0 bear-bg-black/50 dark:bear-bg-black/70 bear-backdrop-blur-sm",onClick:()=>d(!1),"aria-hidden":"true"}),r.jsxs("div",{className:m.cn("Bear-Spotlight__dialog","bear-relative bear-w-full bear-max-w-[560px] bear-mx-4","bear-bg-white dark:bear-bg-gray-900","bear-rounded-xl bear-shadow-2xl","bear-border bear-border-gray-200 dark:bear-border-gray-700","bear-overflow-hidden",B),style:D,role:"dialog","aria-label":"Search",children:[r.jsxs("div",{className:"Bear-Spotlight__search bear-flex bear-items-center bear-gap-3 bear-px-4 bear-py-3 bear-border-b bear-border-gray-200 dark:bear-border-gray-700",children:[r.jsxs("svg",{width:20,height:20,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"bear-text-gray-400 dark:bear-text-gray-500 bear-shrink-0",children:[r.jsx("circle",{cx:"11",cy:"11",r:"8"}),r.jsx("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]}),r.jsx("input",{ref:N,type:"text",value:o,onChange:e=>{j(e.target.value),u(0)},onKeyDown:M,placeholder:p,className:m.cn("Bear-Spotlight__input","bear-flex-1 bear-bg-transparent bear-outline-none bear-text-base","bear-text-gray-900 dark:bear-text-white","placeholder:bear-text-gray-400 dark:placeholder:bear-text-gray-500"),autoComplete:"off",spellCheck:!1}),r.jsx("kbd",{className:"bear-hidden sm:bear-inline-flex bear-items-center bear-px-1.5 bear-py-0.5 bear-rounded bear-text-[10px] bear-font-mono bear-text-gray-400 dark:bear-text-gray-500 bear-bg-gray-100 dark:bear-bg-gray-800 bear-border bear-border-gray-200 dark:bear-border-gray-700",children:"ESC"})]}),r.jsxs("div",{ref:C,className:"Bear-Spotlight__results bear-max-h-[400px] bear-overflow-y-auto bear-py-2",role:"listbox",children:[c.length===0&&r.jsx("div",{className:"Bear-Spotlight__empty bear-px-4 bear-py-8 bear-text-center bear-text-gray-500 dark:bear-text-gray-400 bear-text-sm",children:L}),Array.from(O.entries()).map(([e,a])=>r.jsxs("div",{className:"Bear-Spotlight__group",children:[e&&r.jsx("div",{className:"Bear-Spotlight__group-title bear-px-4 bear-py-1.5 bear-text-xs bear-font-semibold bear-uppercase bear-tracking-wider bear-text-gray-400 dark:bear-text-gray-500",children:e}),a.map(t=>{_++;const w=_===h,F=_;return r.jsxs("button",{className:m.cn("Bear-Spotlight__action","bear-w-full bear-flex bear-items-center bear-gap-3 bear-px-4 bear-py-2.5 bear-text-left bear-cursor-pointer","bear-transition-colors bear-duration-100",w?"bear-bg-gray-100 dark:bear-bg-gray-800":"hover:bear-bg-gray-50 dark:hover:bear-bg-gray-800/50",t.disabled&&"bear-opacity-50 bear-cursor-not-allowed"),"data-active":w,onMouseEnter:()=>u(F),onClick:()=>{t.disabled||(t.onTrigger(),d(!1))},role:"option","aria-selected":w,"aria-disabled":t.disabled,children:[t.icon&&r.jsx("span",{className:"Bear-Spotlight__action-icon bear-text-gray-500 dark:bear-text-gray-400 bear-shrink-0",children:t.icon}),r.jsxs("div",{className:"Bear-Spotlight__action-body bear-flex-1 bear-min-w-0",children:[r.jsx("div",{className:"Bear-Spotlight__action-label bear-text-sm bear-font-medium bear-text-gray-900 dark:bear-text-white bear-truncate",children:S?E(t.label,o):t.label}),t.description&&r.jsx("div",{className:"Bear-Spotlight__action-desc bear-text-xs bear-text-gray-500 dark:bear-text-gray-400 bear-truncate",children:S?E(t.description,o):t.description})]}),t.rightSection&&r.jsx("span",{className:"Bear-Spotlight__action-right bear-shrink-0",children:t.rightSection})]},t.id)})]},e))]}),r.jsxs("div",{className:"Bear-Spotlight__footer bear-border-t bear-border-gray-200 dark:bear-border-gray-700 bear-px-4 bear-py-2 bear-flex bear-items-center bear-gap-4 bear-text-[11px] bear-text-gray-400 dark:bear-text-gray-500",children:[r.jsxs("span",{className:"bear-flex bear-items-center bear-gap-1",children:[r.jsx("kbd",{className:"bear-px-1 bear-rounded bear-bg-gray-100 dark:bear-bg-gray-800 bear-border bear-border-gray-200 dark:bear-border-gray-700",children:"↑↓"}),"navigate"]}),r.jsxs("span",{className:"bear-flex bear-items-center bear-gap-1",children:[r.jsx("kbd",{className:"bear-px-1 bear-rounded bear-bg-gray-100 dark:bear-bg-gray-800 bear-border bear-border-gray-200 dark:bear-border-gray-700",children:"↵"}),"select"]}),r.jsxs("span",{className:"bear-flex bear-items-center bear-gap-1",children:[r.jsx("kbd",{className:"bear-px-1 bear-rounded bear-bg-gray-100 dark:bear-bg-gray-800 bear-border bear-border-gray-200 dark:bear-border-gray-700",children:"esc"}),"close"]})]})]})]})};exports.Spotlight=U;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T="k",E="Search...",L="No results found",_=10,D=9999,U=50;exports.DEFAULT_LIMIT=_;exports.DEFAULT_NOTHING_FOUND=L;exports.DEFAULT_PLACEHOLDER=E;exports.DEFAULT_SHORTCUT_KEY=T;exports.FOCUS_DELAY=U;exports.SPOTLIGHT_Z_INDEX=D;
@@ -0,0 +1,18 @@
1
+ /** Default shortcut key */
2
+ export declare const DEFAULT_SHORTCUT_KEY = "k";
3
+ /** Default placeholder */
4
+ export declare const DEFAULT_PLACEHOLDER = "Search...";
5
+ /** Default nothing found message */
6
+ export declare const DEFAULT_NOTHING_FOUND = "No results found";
7
+ /** Default result limit */
8
+ export declare const DEFAULT_LIMIT = 10;
9
+ /** Backdrop z-index */
10
+ export declare const SPOTLIGHT_Z_INDEX = 9999;
11
+ /** Top offset for dialog (percentage of viewport height) */
12
+ export declare const DIALOG_TOP_OFFSET = "15vh";
13
+ /** Max dialog width in pixels */
14
+ export declare const DIALOG_MAX_WIDTH = 560;
15
+ /** Max results height in pixels */
16
+ export declare const RESULTS_MAX_HEIGHT = 400;
17
+ /** Focus delay after open in ms */
18
+ export declare const FOCUS_DELAY = 50;
@@ -0,0 +1,9 @@
1
+ const T = "k", o = "Search...", E = "No results found", L = 10, _ = 9999, s = 50;
2
+ export {
3
+ L as DEFAULT_LIMIT,
4
+ E as DEFAULT_NOTHING_FOUND,
5
+ o as DEFAULT_PLACEHOLDER,
6
+ T as DEFAULT_SHORTCUT_KEY,
7
+ s as FOCUS_DELAY,
8
+ _ as SPOTLIGHT_Z_INDEX
9
+ };
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ import { SpotlightProps } from './Spotlight.types';
3
+ /**
4
+ * Spotlight - macOS-style search overlay (Cmd+K).
5
+ * Supports grouped actions, highlighting, keyboard navigation, and theming via BearProvider.
6
+ */
7
+ export declare const Spotlight: FC<SpotlightProps>;
@@ -0,0 +1,220 @@
1
+ import { jsxs as b, jsx as t, Fragment as G } from "react/jsx-runtime";
2
+ import { useState as w, useRef as E, useCallback as D, useEffect as v, useMemo as T } from "react";
3
+ import { cn as m } from "../../utils/cn.js";
4
+ import { DEFAULT_PLACEHOLDER as P, DEFAULT_SHORTCUT_KEY as Y, DEFAULT_NOTHING_FOUND as z, DEFAULT_LIMIT as Q, FOCUS_DELAY as V, SPOTLIGHT_Z_INDEX as W } from "./Spotlight.const.js";
5
+ const X = (l, s) => {
6
+ var o, u;
7
+ const i = s.toLowerCase();
8
+ return !!(l.label.toLowerCase().includes(i) || (o = l.description) != null && o.toLowerCase().includes(i) || (u = l.keywords) != null && u.some((y) => y.toLowerCase().includes(i)));
9
+ }, I = (l, s) => {
10
+ if (!s) return l;
11
+ const i = l.toLowerCase().indexOf(s.toLowerCase());
12
+ return i === -1 ? l : /* @__PURE__ */ b(G, { children: [
13
+ l.slice(0, i),
14
+ /* @__PURE__ */ t("mark", { className: "Bear-Spotlight__highlight bear-bg-yellow-200 dark:bear-bg-yellow-800 bear-text-inherit bear-rounded-sm bear-px-0.5", children: l.slice(i, i + s.length) }),
15
+ l.slice(i + s.length)
16
+ ] });
17
+ }, ee = (l) => {
18
+ const {
19
+ actions: s,
20
+ open: i,
21
+ onOpenChange: o,
22
+ placeholder: u = P,
23
+ shortcutKey: y = Y,
24
+ shortcutMod: N = !0,
25
+ nothingFoundMessage: A = z,
26
+ highlightMatches: S = !0,
27
+ limit: x = Q,
28
+ filter: f,
29
+ className: O,
30
+ style: M,
31
+ testId: F
32
+ } = l, [U, K] = w(!1), [n, L] = w(""), [p, h] = w(0), B = E(null), C = E(null), g = i ?? U, d = D(
33
+ (e) => {
34
+ K(e), o == null || o(e), e || (L(""), h(0));
35
+ },
36
+ [o]
37
+ );
38
+ v(() => {
39
+ const e = (r) => {
40
+ (N ? r.metaKey || r.ctrlKey : !0) && r.key.toLowerCase() === y.toLowerCase() && (r.preventDefault(), d(!g)), r.key === "Escape" && g && d(!1);
41
+ };
42
+ return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
43
+ }, [y, N, g, d]), v(() => {
44
+ g && setTimeout(() => {
45
+ var e;
46
+ return (e = B.current) == null ? void 0 : e.focus();
47
+ }, V);
48
+ }, [g]);
49
+ const c = T(() => f ? f(n, s).slice(0, x) : n ? s.filter((e) => X(e, n)).slice(0, x) : s.slice(0, x), [s, n, f, x]), R = T(() => {
50
+ const e = /* @__PURE__ */ new Map();
51
+ return c.forEach((r) => {
52
+ const a = r.group || "";
53
+ e.has(a) || e.set(a, []), e.get(a).push(r);
54
+ }), e;
55
+ }, [c]), H = D(
56
+ (e) => {
57
+ if (e.key === "ArrowDown")
58
+ e.preventDefault(), h((r) => Math.min(r + 1, c.length - 1));
59
+ else if (e.key === "ArrowUp")
60
+ e.preventDefault(), h((r) => Math.max(r - 1, 0));
61
+ else if (e.key === "Enter" && c[p]) {
62
+ e.preventDefault();
63
+ const r = c[p];
64
+ r.disabled || (r.onTrigger(), d(!1));
65
+ }
66
+ },
67
+ [c, p, d]
68
+ );
69
+ if (v(() => {
70
+ const e = C.current;
71
+ if (!e) return;
72
+ const r = e.querySelector('[data-active="true"]');
73
+ r == null || r.scrollIntoView({ block: "nearest" });
74
+ }, [p]), !g) return null;
75
+ let k = -1;
76
+ return /* @__PURE__ */ b(
77
+ "div",
78
+ {
79
+ className: m(
80
+ "Bear-Spotlight",
81
+ "bear-fixed bear-inset-0 bear-flex bear-items-start bear-justify-center bear-pt-[15vh]"
82
+ ),
83
+ style: { zIndex: W },
84
+ "data-testid": F,
85
+ children: [
86
+ /* @__PURE__ */ t(
87
+ "div",
88
+ {
89
+ className: "Bear-Spotlight__backdrop bear-absolute bear-inset-0 bear-bg-black/50 dark:bear-bg-black/70 bear-backdrop-blur-sm",
90
+ onClick: () => d(!1),
91
+ "aria-hidden": "true"
92
+ }
93
+ ),
94
+ /* @__PURE__ */ b(
95
+ "div",
96
+ {
97
+ className: m(
98
+ "Bear-Spotlight__dialog",
99
+ "bear-relative bear-w-full bear-max-w-[560px] bear-mx-4",
100
+ "bear-bg-white dark:bear-bg-gray-900",
101
+ "bear-rounded-xl bear-shadow-2xl",
102
+ "bear-border bear-border-gray-200 dark:bear-border-gray-700",
103
+ "bear-overflow-hidden",
104
+ O
105
+ ),
106
+ style: M,
107
+ role: "dialog",
108
+ "aria-label": "Search",
109
+ children: [
110
+ /* @__PURE__ */ b("div", { className: "Bear-Spotlight__search bear-flex bear-items-center bear-gap-3 bear-px-4 bear-py-3 bear-border-b bear-border-gray-200 dark:bear-border-gray-700", children: [
111
+ /* @__PURE__ */ b(
112
+ "svg",
113
+ {
114
+ width: 20,
115
+ height: 20,
116
+ viewBox: "0 0 24 24",
117
+ fill: "none",
118
+ stroke: "currentColor",
119
+ strokeWidth: 2,
120
+ className: "bear-text-gray-400 dark:bear-text-gray-500 bear-shrink-0",
121
+ children: [
122
+ /* @__PURE__ */ t("circle", { cx: "11", cy: "11", r: "8" }),
123
+ /* @__PURE__ */ t("line", { x1: "21", y1: "21", x2: "16.65", y2: "16.65" })
124
+ ]
125
+ }
126
+ ),
127
+ /* @__PURE__ */ t(
128
+ "input",
129
+ {
130
+ ref: B,
131
+ type: "text",
132
+ value: n,
133
+ onChange: (e) => {
134
+ L(e.target.value), h(0);
135
+ },
136
+ onKeyDown: H,
137
+ placeholder: u,
138
+ className: m(
139
+ "Bear-Spotlight__input",
140
+ "bear-flex-1 bear-bg-transparent bear-outline-none bear-text-base",
141
+ "bear-text-gray-900 dark:bear-text-white",
142
+ "placeholder:bear-text-gray-400 dark:placeholder:bear-text-gray-500"
143
+ ),
144
+ autoComplete: "off",
145
+ spellCheck: !1
146
+ }
147
+ ),
148
+ /* @__PURE__ */ t("kbd", { className: "bear-hidden sm:bear-inline-flex bear-items-center bear-px-1.5 bear-py-0.5 bear-rounded bear-text-[10px] bear-font-mono bear-text-gray-400 dark:bear-text-gray-500 bear-bg-gray-100 dark:bear-bg-gray-800 bear-border bear-border-gray-200 dark:bear-border-gray-700", children: "ESC" })
149
+ ] }),
150
+ /* @__PURE__ */ b(
151
+ "div",
152
+ {
153
+ ref: C,
154
+ className: "Bear-Spotlight__results bear-max-h-[400px] bear-overflow-y-auto bear-py-2",
155
+ role: "listbox",
156
+ children: [
157
+ c.length === 0 && /* @__PURE__ */ t("div", { className: "Bear-Spotlight__empty bear-px-4 bear-py-8 bear-text-center bear-text-gray-500 dark:bear-text-gray-400 bear-text-sm", children: A }),
158
+ Array.from(R.entries()).map(([e, r]) => /* @__PURE__ */ b("div", { className: "Bear-Spotlight__group", children: [
159
+ e && /* @__PURE__ */ t("div", { className: "Bear-Spotlight__group-title bear-px-4 bear-py-1.5 bear-text-xs bear-font-semibold bear-uppercase bear-tracking-wider bear-text-gray-400 dark:bear-text-gray-500", children: e }),
160
+ r.map((a) => {
161
+ k++;
162
+ const _ = k === p, j = k;
163
+ return /* @__PURE__ */ b(
164
+ "button",
165
+ {
166
+ className: m(
167
+ "Bear-Spotlight__action",
168
+ "bear-w-full bear-flex bear-items-center bear-gap-3 bear-px-4 bear-py-2.5 bear-text-left bear-cursor-pointer",
169
+ "bear-transition-colors bear-duration-100",
170
+ _ ? "bear-bg-gray-100 dark:bear-bg-gray-800" : "hover:bear-bg-gray-50 dark:hover:bear-bg-gray-800/50",
171
+ a.disabled && "bear-opacity-50 bear-cursor-not-allowed"
172
+ ),
173
+ "data-active": _,
174
+ onMouseEnter: () => h(j),
175
+ onClick: () => {
176
+ a.disabled || (a.onTrigger(), d(!1));
177
+ },
178
+ role: "option",
179
+ "aria-selected": _,
180
+ "aria-disabled": a.disabled,
181
+ children: [
182
+ a.icon && /* @__PURE__ */ t("span", { className: "Bear-Spotlight__action-icon bear-text-gray-500 dark:bear-text-gray-400 bear-shrink-0", children: a.icon }),
183
+ /* @__PURE__ */ b("div", { className: "Bear-Spotlight__action-body bear-flex-1 bear-min-w-0", children: [
184
+ /* @__PURE__ */ t("div", { className: "Bear-Spotlight__action-label bear-text-sm bear-font-medium bear-text-gray-900 dark:bear-text-white bear-truncate", children: S ? I(a.label, n) : a.label }),
185
+ a.description && /* @__PURE__ */ t("div", { className: "Bear-Spotlight__action-desc bear-text-xs bear-text-gray-500 dark:bear-text-gray-400 bear-truncate", children: S ? I(a.description, n) : a.description })
186
+ ] }),
187
+ a.rightSection && /* @__PURE__ */ t("span", { className: "Bear-Spotlight__action-right bear-shrink-0", children: a.rightSection })
188
+ ]
189
+ },
190
+ a.id
191
+ );
192
+ })
193
+ ] }, e))
194
+ ]
195
+ }
196
+ ),
197
+ /* @__PURE__ */ b("div", { className: "Bear-Spotlight__footer bear-border-t bear-border-gray-200 dark:bear-border-gray-700 bear-px-4 bear-py-2 bear-flex bear-items-center bear-gap-4 bear-text-[11px] bear-text-gray-400 dark:bear-text-gray-500", children: [
198
+ /* @__PURE__ */ b("span", { className: "bear-flex bear-items-center bear-gap-1", children: [
199
+ /* @__PURE__ */ t("kbd", { className: "bear-px-1 bear-rounded bear-bg-gray-100 dark:bear-bg-gray-800 bear-border bear-border-gray-200 dark:bear-border-gray-700", children: "↑↓" }),
200
+ "navigate"
201
+ ] }),
202
+ /* @__PURE__ */ b("span", { className: "bear-flex bear-items-center bear-gap-1", children: [
203
+ /* @__PURE__ */ t("kbd", { className: "bear-px-1 bear-rounded bear-bg-gray-100 dark:bear-bg-gray-800 bear-border bear-border-gray-200 dark:bear-border-gray-700", children: "↵" }),
204
+ "select"
205
+ ] }),
206
+ /* @__PURE__ */ b("span", { className: "bear-flex bear-items-center bear-gap-1", children: [
207
+ /* @__PURE__ */ t("kbd", { className: "bear-px-1 bear-rounded bear-bg-gray-100 dark:bear-bg-gray-800 bear-border bear-border-gray-200 dark:bear-border-gray-700", children: "esc" }),
208
+ "close"
209
+ ] })
210
+ ] })
211
+ ]
212
+ }
213
+ )
214
+ ]
215
+ }
216
+ );
217
+ };
218
+ export {
219
+ ee as Spotlight
220
+ };
@@ -0,0 +1,51 @@
1
+ import { ReactNode } from 'react';
2
+ export interface SpotlightAction {
3
+ /** Unique ID */
4
+ id: string;
5
+ /** Display label */
6
+ label: string;
7
+ /** Description text */
8
+ description?: string;
9
+ /** Left icon */
10
+ icon?: ReactNode;
11
+ /** Right-side content (e.g. shortcut badge) */
12
+ rightSection?: ReactNode;
13
+ /** Group/category name */
14
+ group?: string;
15
+ /** Keywords for search matching */
16
+ keywords?: string[];
17
+ /** Callback when selected */
18
+ onTrigger: () => void;
19
+ /** Whether action is disabled */
20
+ disabled?: boolean;
21
+ /** Nested actions (submenu) */
22
+ children?: SpotlightAction[];
23
+ }
24
+ export interface SpotlightProps {
25
+ /** Available actions */
26
+ actions: SpotlightAction[];
27
+ /** Whether spotlight is open */
28
+ open?: boolean;
29
+ /** Callback when open changes */
30
+ onOpenChange?: (open: boolean) => void;
31
+ /** Search placeholder */
32
+ placeholder?: string;
33
+ /** Keyboard shortcut to trigger (default: 'k') */
34
+ shortcutKey?: string;
35
+ /** Whether shortcut needs Cmd/Ctrl */
36
+ shortcutMod?: boolean;
37
+ /** Nothing found message */
38
+ nothingFoundMessage?: string;
39
+ /** Whether to highlight matches */
40
+ highlightMatches?: boolean;
41
+ /** Limit number of results */
42
+ limit?: number;
43
+ /** Custom filter function */
44
+ filter?: (query: string, actions: SpotlightAction[]) => SpotlightAction[];
45
+ /** Custom class name */
46
+ className?: string;
47
+ /** Custom style */
48
+ style?: React.CSSProperties;
49
+ /** Test ID */
50
+ testId?: string;
51
+ }
@@ -0,0 +1,2 @@
1
+ export { Spotlight } from './Spotlight';
2
+ export type { SpotlightProps, SpotlightAction } from './Spotlight.types';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("../../utils/cn.cjs"),o=({title:s,value:i,color:t="#6366f1",icon:n,onClick:r,className:a,...l})=>e.jsxs("div",{className:d.cn("relative overflow-hidden rounded-2xl p-6 transition-transform hover:scale-105 cursor-pointer",a),style:{background:`linear-gradient(135deg, ${t}dd, ${t}99)`},onClick:r,...l,children:[e.jsx("div",{className:"absolute top-0 right-0 w-32 h-32 -mr-8 -mt-8 rounded-full opacity-20 bg-white"}),e.jsxs("div",{className:"relative z-10",children:[e.jsx("p",{className:"text-white/80 text-sm font-medium mb-1",children:s}),e.jsx("p",{className:"text-white text-3xl font-bold mb-4",children:i}),r&&e.jsxs("button",{className:"flex items-center gap-2 px-4 py-1.5 bg-white/20 hover:bg-white/30 rounded-full text-white text-sm font-medium transition-colors",children:[n,"View All"]})]})]});exports.StatCard=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("../../utils/cn.cjs");require("react");const o=({title:s,value:i,color:t="#6366f1",icon:n,onClick:r,className:a,...l})=>e.jsxs("div",{className:d.cn("relative overflow-hidden rounded-2xl p-6 transition-transform hover:scale-105 cursor-pointer",a),style:{background:`linear-gradient(135deg, ${t}dd, ${t}99)`},onClick:r,...l,children:[e.jsx("div",{className:"absolute top-0 right-0 w-32 h-32 -mr-8 -mt-8 rounded-full opacity-20 bg-white"}),e.jsxs("div",{className:"relative z-10",children:[e.jsx("p",{className:"text-white/80 text-sm font-medium mb-1",children:s}),e.jsx("p",{className:"text-white text-3xl font-bold mb-4",children:i}),r&&e.jsxs("button",{className:"flex items-center gap-2 px-4 py-1.5 bg-white/20 hover:bg-white/30 rounded-full text-white text-sm font-medium transition-colors",children:[n,"View All"]})]})]});exports.StatCard=o;
@@ -1,19 +1,20 @@
1
1
  import { jsxs as e, jsx as t } from "react/jsx-runtime";
2
2
  import { cn as n } from "../../utils/cn.js";
3
- const h = ({
3
+ import "react";
4
+ const p = ({
4
5
  title: l,
5
- value: s,
6
+ value: o,
6
7
  color: r = "#6366f1",
7
- icon: a,
8
+ icon: s,
8
9
  onClick: i,
9
- className: o,
10
+ className: a,
10
11
  ...d
11
12
  }) => /* @__PURE__ */ e(
12
13
  "div",
13
14
  {
14
15
  className: n(
15
16
  "relative overflow-hidden rounded-2xl p-6 transition-transform hover:scale-105 cursor-pointer",
16
- o
17
+ a
17
18
  ),
18
19
  style: { background: `linear-gradient(135deg, ${r}dd, ${r}99)` },
19
20
  onClick: i,
@@ -22,9 +23,9 @@ const h = ({
22
23
  /* @__PURE__ */ t("div", { className: "absolute top-0 right-0 w-32 h-32 -mr-8 -mt-8 rounded-full opacity-20 bg-white" }),
23
24
  /* @__PURE__ */ e("div", { className: "relative z-10", children: [
24
25
  /* @__PURE__ */ t("p", { className: "text-white/80 text-sm font-medium mb-1", children: l }),
25
- /* @__PURE__ */ t("p", { className: "text-white text-3xl font-bold mb-4", children: s }),
26
+ /* @__PURE__ */ t("p", { className: "text-white text-3xl font-bold mb-4", children: o }),
26
27
  i && /* @__PURE__ */ e("button", { className: "flex items-center gap-2 px-4 py-1.5 bg-white/20 hover:bg-white/30 rounded-full text-white text-sm font-medium transition-colors", children: [
27
- a,
28
+ s,
28
29
  "View All"
29
30
  ] })
30
31
  ] })
@@ -32,5 +33,5 @@ const h = ({
32
33
  }
33
34
  );
34
35
  export {
35
- h as StatCard
36
+ p as StatCard
36
37
  };