@forgedevstack/bear 1.1.4 → 1.1.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 (179) hide show
  1. package/README.md +21 -2
  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/BearLogo/BearLogo.d.ts +2 -7
  15. package/dist/components/BearLogo/BearLogo.types.d.ts +15 -0
  16. package/dist/components/BearLogo/EmberLogo.d.ts +1 -8
  17. package/dist/components/BearLogo/index.d.ts +1 -2
  18. package/dist/components/Biometric/Biometric.cjs +1 -0
  19. package/dist/components/Biometric/Biometric.d.ts +3 -0
  20. package/dist/components/Biometric/Biometric.js +123 -0
  21. package/dist/components/Biometric/Biometric.types.d.ts +35 -0
  22. package/dist/components/Biometric/BiometricIcon.cjs +1 -0
  23. package/dist/components/Biometric/BiometricIcon.d.ts +3 -0
  24. package/dist/components/Biometric/BiometricIcon.js +45 -0
  25. package/dist/components/Biometric/index.d.ts +3 -0
  26. package/dist/components/Biometric/useBiometric.cjs +1 -0
  27. package/dist/components/Biometric/useBiometric.d.ts +2 -0
  28. package/dist/components/Biometric/useBiometric.js +21 -0
  29. package/dist/components/Button/Button.cjs +1 -1
  30. package/dist/components/Button/Button.constants.cjs +2 -2
  31. package/dist/components/Button/Button.constants.d.ts +1 -0
  32. package/dist/components/Button/Button.constants.js +12 -5
  33. package/dist/components/Button/Button.d.ts +0 -27
  34. package/dist/components/Button/Button.js +93 -105
  35. package/dist/components/Button/Button.types.d.ts +1 -0
  36. package/dist/components/Button/Button.utils.cjs +1 -0
  37. package/dist/components/Button/Button.utils.d.ts +2 -0
  38. package/dist/components/Button/Button.utils.js +5 -0
  39. package/dist/components/Button/useSpotlight.cjs +1 -0
  40. package/dist/components/Button/useSpotlight.d.ts +21 -0
  41. package/dist/components/Button/useSpotlight.js +28 -0
  42. package/dist/components/Chart/Chart.cjs +1 -1
  43. package/dist/components/Chart/Chart.const.cjs +1 -0
  44. package/dist/components/Chart/Chart.const.js +21 -0
  45. package/dist/components/Chart/Chart.js +55 -71
  46. package/dist/components/Chart/Chart.utils.cjs +1 -0
  47. package/dist/components/Chart/Chart.utils.js +5 -0
  48. package/dist/components/Confetti/Confetti.cjs +1 -1
  49. package/dist/components/Confetti/Confetti.js +37 -34
  50. package/dist/components/ContextMenu/ContextMenu.cjs +1 -1
  51. package/dist/components/ContextMenu/ContextMenu.js +31 -30
  52. package/dist/components/ContextMenu/ContextMenu.utils.cjs +1 -0
  53. package/dist/components/ContextMenu/ContextMenu.utils.d.ts +5 -0
  54. package/dist/components/ContextMenu/ContextMenu.utils.js +4 -0
  55. package/dist/components/CountdownTimer/CountdownTimer.cjs +1 -1
  56. package/dist/components/CountdownTimer/CountdownTimer.js +62 -71
  57. package/dist/components/CountdownTimer/CountdownTimer.utils.cjs +1 -0
  58. package/dist/components/CountdownTimer/CountdownTimer.utils.d.ts +3 -0
  59. package/dist/components/CountdownTimer/CountdownTimer.utils.js +16 -0
  60. package/dist/components/DateRangePicker/DateRangePicker.cjs +1 -1
  61. package/dist/components/DateRangePicker/DateRangePicker.const.cjs +1 -1
  62. package/dist/components/DateRangePicker/DateRangePicker.const.js +12 -13
  63. package/dist/components/DateRangePicker/DateRangePicker.js +107 -81
  64. package/dist/components/Dock/Dock.cjs +1 -1
  65. package/dist/components/Dock/Dock.js +38 -43
  66. package/dist/components/Dock/Dock.utils.cjs +1 -0
  67. package/dist/components/Dock/Dock.utils.d.ts +1 -0
  68. package/dist/components/Dock/Dock.utils.js +10 -0
  69. package/dist/components/Dropdown/Dropdown.cjs +1 -1
  70. package/dist/components/Dropdown/Dropdown.js +77 -74
  71. package/dist/components/FileTree/FileTree.cjs +1 -1
  72. package/dist/components/FileTree/FileTree.js +20 -32
  73. package/dist/components/FileTree/FileTree.utils.cjs +1 -0
  74. package/dist/components/FileTree/FileTree.utils.d.ts +4 -0
  75. package/dist/components/FileTree/FileTree.utils.js +15 -0
  76. package/dist/components/GradientText/GradientText.cjs +1 -1
  77. package/dist/components/GradientText/GradientText.js +27 -29
  78. package/dist/components/Icon/icons/bear.cjs +1 -0
  79. package/dist/components/Icon/icons/bear.d.ts +12 -0
  80. package/dist/components/Icon/icons/bear.js +47 -0
  81. package/dist/components/Icon/index.cjs +1 -1
  82. package/dist/components/Icon/index.d.ts +18 -0
  83. package/dist/components/Icon/index.js +17 -15
  84. package/dist/components/InfiniteScroll/InfiniteScroll.cjs +1 -1
  85. package/dist/components/InfiniteScroll/InfiniteScroll.const.cjs +1 -1
  86. package/dist/components/InfiniteScroll/InfiniteScroll.const.js +6 -7
  87. package/dist/components/InfiniteScroll/InfiniteScroll.js +41 -41
  88. package/dist/components/Input/Input.cjs +1 -1
  89. package/dist/components/Input/Input.js +153 -101
  90. package/dist/components/Input/Input.types.d.ts +8 -2
  91. package/dist/components/Input/index.d.ts +1 -1
  92. package/dist/components/MentionsInput/MentionsInput.cjs +1 -1
  93. package/dist/components/MentionsInput/MentionsInput.js +64 -68
  94. package/dist/components/MentionsInput/MentionsInput.utils.cjs +1 -0
  95. package/dist/components/MentionsInput/MentionsInput.utils.d.ts +2 -0
  96. package/dist/components/MentionsInput/MentionsInput.utils.js +9 -0
  97. package/dist/components/PageNav/PageNav.cjs +1 -0
  98. package/dist/components/PageNav/PageNav.const.cjs +1 -0
  99. package/dist/components/PageNav/PageNav.const.d.ts +22 -0
  100. package/dist/components/PageNav/PageNav.const.js +42 -0
  101. package/dist/components/PageNav/PageNav.d.ts +3 -0
  102. package/dist/components/PageNav/PageNav.js +81 -0
  103. package/dist/components/PageNav/PageNav.types.d.ts +17 -0
  104. package/dist/components/PageNav/index.d.ts +2 -0
  105. package/dist/components/Popover/Popover.cjs +1 -1
  106. package/dist/components/Popover/Popover.js +76 -76
  107. package/dist/components/Progress/Progress.cjs +1 -1
  108. package/dist/components/Progress/Progress.js +6 -6
  109. package/dist/components/PropsPlayground/PropsPlayground.cjs +1 -0
  110. package/dist/components/PropsPlayground/PropsPlayground.const.cjs +1 -0
  111. package/dist/components/PropsPlayground/PropsPlayground.const.d.ts +11 -0
  112. package/dist/components/PropsPlayground/PropsPlayground.const.js +23 -0
  113. package/dist/components/PropsPlayground/PropsPlayground.d.ts +3 -0
  114. package/dist/components/PropsPlayground/PropsPlayground.js +221 -0
  115. package/dist/components/PropsPlayground/PropsPlayground.types.d.ts +29 -0
  116. package/dist/components/PropsPlayground/PropsPlayground.utils.cjs +1 -0
  117. package/dist/components/PropsPlayground/PropsPlayground.utils.d.ts +2 -0
  118. package/dist/components/PropsPlayground/PropsPlayground.utils.js +9 -0
  119. package/dist/components/PropsPlayground/index.d.ts +2 -0
  120. package/dist/components/Select/Select.cjs +1 -1
  121. package/dist/components/Select/Select.js +54 -53
  122. package/dist/components/SignPad/SignPad.cjs +1 -1
  123. package/dist/components/SignPad/SignPad.js +24 -24
  124. package/dist/components/Skeleton/Skeleton.cjs +1 -1
  125. package/dist/components/Skeleton/Skeleton.js +89 -94
  126. package/dist/components/Skeleton/Skeleton.utils.cjs +1 -0
  127. package/dist/components/Skeleton/Skeleton.utils.d.ts +1 -0
  128. package/dist/components/Skeleton/Skeleton.utils.js +10 -0
  129. package/dist/components/SliderRange/SliderRange.cjs +1 -1
  130. package/dist/components/SliderRange/SliderRange.js +61 -63
  131. package/dist/components/SliderRange/SliderRange.utils.cjs +1 -0
  132. package/dist/components/SliderRange/SliderRange.utils.d.ts +1 -0
  133. package/dist/components/SliderRange/SliderRange.utils.js +7 -0
  134. package/dist/components/Spotlight/Spotlight.cjs +1 -1
  135. package/dist/components/Spotlight/Spotlight.js +62 -73
  136. package/dist/components/Spotlight/Spotlight.utils.cjs +1 -0
  137. package/dist/components/Spotlight/Spotlight.utils.d.ts +3 -0
  138. package/dist/components/Spotlight/Spotlight.utils.js +18 -0
  139. package/dist/components/Tabs/TabList.cjs +1 -0
  140. package/dist/components/Tabs/TabList.d.ts +3 -0
  141. package/dist/components/Tabs/TabList.js +69 -0
  142. package/dist/components/Tabs/TabPanel.cjs +1 -0
  143. package/dist/components/Tabs/TabPanel.d.ts +3 -0
  144. package/dist/components/Tabs/TabPanel.js +13 -0
  145. package/dist/components/Tabs/Tabs.cjs +1 -1
  146. package/dist/components/Tabs/Tabs.d.ts +2 -27
  147. package/dist/components/Tabs/Tabs.js +43 -61
  148. package/dist/components/Tabs/Tabs.types.d.ts +7 -1
  149. package/dist/components/Tabs/index.d.ts +3 -1
  150. package/dist/components/Toast/Toast.cjs +1 -1
  151. package/dist/components/Toast/Toast.js +18 -17
  152. package/dist/components/Toast/Toast.utils.cjs +1 -0
  153. package/dist/components/Toast/Toast.utils.d.ts +1 -0
  154. package/dist/components/Toast/Toast.utils.js +4 -0
  155. package/dist/components/Tooltip/Tooltip.cjs +1 -1
  156. package/dist/components/Tooltip/Tooltip.js +10 -11
  157. package/dist/components/Tour/Tour.cjs +1 -1
  158. package/dist/components/Tour/Tour.js +1 -2
  159. package/dist/components/VirtualList/VirtualList.cjs +1 -1
  160. package/dist/components/VirtualList/VirtualList.js +38 -43
  161. package/dist/components/index.cjs +1 -1
  162. package/dist/components/index.d.ts +9 -2
  163. package/dist/components/index.js +311 -300
  164. package/dist/hooks/index.cjs +1 -1
  165. package/dist/hooks/index.d.ts +2 -0
  166. package/dist/hooks/index.js +60 -58
  167. package/dist/hooks/useResizeObserver/index.d.ts +2 -0
  168. package/dist/hooks/useResizeObserver/useResizeObserver.cjs +1 -0
  169. package/dist/hooks/useResizeObserver/useResizeObserver.d.ts +3 -0
  170. package/dist/hooks/useResizeObserver/useResizeObserver.js +20 -0
  171. package/dist/hooks/useResizeObserver/useResizeObserver.types.d.ts +8 -0
  172. package/dist/icons.cjs +1 -0
  173. package/dist/icons.d.ts +2 -0
  174. package/dist/icons.js +6 -0
  175. package/dist/index.cjs +1 -1
  176. package/dist/index.js +397 -384
  177. package/dist/styles/_base.css +7 -3
  178. package/dist/styles.css +1 -1
  179. package/package.json +6 -1
@@ -0,0 +1,123 @@
1
+ import { jsxs as c, Fragment as _, jsx as r } from "react/jsx-runtime";
2
+ import { useCallback as j } from "react";
3
+ import { cn as n } from "../../utils/cn.js";
4
+ import { BiometricIcon as M } from "./BiometricIcon.js";
5
+ import { useBiometric as w } from "./useBiometric.js";
6
+ const D = { sm: 48, md: 72, lg: 96, xl: 128 }, A = { sm: 80, md: 120, lg: 160, xl: 200 }, g = {
7
+ idle: "bear-text-gray-500 dark:bear-text-gray-400",
8
+ scanning: "bear-text-bear-500 dark:bear-text-bear-400",
9
+ success: "bear-text-green-500 dark:bear-text-green-400",
10
+ error: "bear-text-red-500 dark:bear-text-red-400"
11
+ }, i = {
12
+ idle: "var(--bear-border-default)",
13
+ scanning: "var(--bear-primary-500, #ec4899)",
14
+ success: "var(--bear-success-500, #22c55e)",
15
+ error: "var(--bear-danger-500, #ef4444)"
16
+ }, q = ({
17
+ type: l = "fingerprint",
18
+ size: u = "md",
19
+ status: o,
20
+ label: p,
21
+ successLabel: f = "Verified",
22
+ errorLabel: y = "Try again",
23
+ scanningLabel: x = "Scanning...",
24
+ onScan: a,
25
+ onSuccess: v,
26
+ onError: k,
27
+ disabled: s = !1,
28
+ animated: t = !0,
29
+ className: C,
30
+ testId: h
31
+ }) => {
32
+ const { status: B, scan: d } = w({
33
+ onSuccess: v,
34
+ onError: k
35
+ }), e = o ?? B, N = D[u], m = A[u], b = e === "scanning" ? x : e === "success" ? f : e === "error" ? y : p, z = j(() => {
36
+ s || e === "scanning" || (a == null || a(), o === void 0 && d());
37
+ }, [s, e, a, o, d]);
38
+ return /* @__PURE__ */ c(
39
+ "div",
40
+ {
41
+ className: n("Bear-Biometric bear-flex bear-flex-col bear-items-center bear-gap-3", C),
42
+ "data-testid": h,
43
+ "data-status": e,
44
+ "data-type": l,
45
+ children: [
46
+ /* @__PURE__ */ c(
47
+ "button",
48
+ {
49
+ type: "button",
50
+ disabled: s || e === "scanning",
51
+ onClick: z,
52
+ className: n(
53
+ "Bear-Biometric__trigger bear-relative bear-flex bear-items-center bear-justify-center bear-rounded-full bear-border-0 bear-cursor-pointer bear-outline-none",
54
+ "bear-transition-all bear-duration-300",
55
+ "focus-visible:bear-ring-2 focus-visible:bear-ring-bear-500 focus-visible:bear-ring-offset-2",
56
+ g[e],
57
+ s && "bear-opacity-40 bear-cursor-not-allowed"
58
+ ),
59
+ style: {
60
+ width: m,
61
+ height: m,
62
+ backgroundColor: "var(--bear-bg-secondary)"
63
+ },
64
+ "aria-label": b ?? "Authenticate",
65
+ children: [
66
+ t && e === "scanning" && /* @__PURE__ */ c(_, { children: [
67
+ /* @__PURE__ */ r(
68
+ "span",
69
+ {
70
+ className: "bear-absolute bear-inset-0 bear-rounded-full bear-animate-ping bear-opacity-20",
71
+ style: { backgroundColor: i[e] }
72
+ }
73
+ ),
74
+ /* @__PURE__ */ r(
75
+ "span",
76
+ {
77
+ className: "bear-absolute bear-inset-2 bear-rounded-full bear-animate-ping bear-opacity-10",
78
+ style: { backgroundColor: i[e], animationDelay: "0.3s" }
79
+ }
80
+ )
81
+ ] }),
82
+ /* @__PURE__ */ r(
83
+ "span",
84
+ {
85
+ className: n(
86
+ "bear-absolute bear-inset-0 bear-rounded-full bear-border-2 bear-transition-colors bear-duration-300",
87
+ e === "scanning" && t && "bear-animate-spin"
88
+ ),
89
+ style: {
90
+ borderColor: i[e],
91
+ borderStyle: e === "scanning" ? "dashed" : "solid",
92
+ animationDuration: e === "scanning" ? "3s" : void 0
93
+ }
94
+ }
95
+ ),
96
+ t && e === "success" && /* @__PURE__ */ r(
97
+ "span",
98
+ {
99
+ className: "bear-absolute bear-inset-0 bear-rounded-full bear-opacity-10",
100
+ style: { backgroundColor: i.success }
101
+ }
102
+ ),
103
+ /* @__PURE__ */ r(M, { type: l, size: N, status: e, animated: t })
104
+ ]
105
+ }
106
+ ),
107
+ b && /* @__PURE__ */ r(
108
+ "span",
109
+ {
110
+ className: n(
111
+ "Bear-Biometric__label bear-text-sm bear-font-medium bear-transition-colors bear-duration-300",
112
+ g[e]
113
+ ),
114
+ children: b
115
+ }
116
+ )
117
+ ]
118
+ }
119
+ );
120
+ };
121
+ export {
122
+ q as Biometric
123
+ };
@@ -0,0 +1,35 @@
1
+ export type BiometricType = 'fingerprint' | 'face' | 'iris';
2
+ export type BiometricStatus = 'idle' | 'scanning' | 'success' | 'error';
3
+ export interface BiometricProps {
4
+ type?: BiometricType;
5
+ size?: 'sm' | 'md' | 'lg' | 'xl';
6
+ status?: BiometricStatus;
7
+ label?: string;
8
+ successLabel?: string;
9
+ errorLabel?: string;
10
+ scanningLabel?: string;
11
+ onScan?: () => void;
12
+ onSuccess?: () => void;
13
+ onError?: () => void;
14
+ disabled?: boolean;
15
+ animated?: boolean;
16
+ className?: string;
17
+ testId?: string;
18
+ }
19
+ export interface BiometricIconProps {
20
+ type: BiometricType;
21
+ size: number;
22
+ status: BiometricStatus;
23
+ animated: boolean;
24
+ }
25
+ export interface UseBiometricOptions {
26
+ scanDuration?: number;
27
+ successDuration?: number;
28
+ onSuccess?: () => void;
29
+ onError?: () => void;
30
+ }
31
+ export interface UseBiometricReturn {
32
+ status: BiometricStatus;
33
+ scan: () => void;
34
+ reset: () => void;
35
+ }
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),n=require("../../utils/cn.cjs");require("react");const i=({size:o})=>r.jsxs("svg",{width:o,height:o,viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("path",{d:"M32 8C20.954 8 12 16.954 12 28v8",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",opacity:"0.3"}),r.jsx("path",{d:"M52 28v8c0 11.046-8.954 20-20 20",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",opacity:"0.3"}),r.jsx("path",{d:"M18 24c0-7.732 6.268-14 14-14s14 6.268 14 14",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",opacity:"0.5"}),r.jsx("path",{d:"M18 24v12c0 7.732 6.268 14 14 14",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",opacity:"0.5"}),r.jsx("path",{d:"M46 24v12c0 4.418-2.239 8.313-5.644 10.607",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",opacity:"0.5"}),r.jsx("path",{d:"M24 22c0-4.418 3.582-8 8-8s8 3.582 8 8",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",opacity:"0.7"}),r.jsx("path",{d:"M24 22v14c0 4.418 3.582 8 8 8s8-3.582 8-8V22",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",opacity:"0.7"}),r.jsx("path",{d:"M28 22c0-2.209 1.791-4 4-4s4 1.791 4 4v14c0 2.209-1.791 4-4 4s-4-1.791-4-4V22z",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round"}),r.jsx("path",{d:"M32 22v14",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round"})]}),a=({size:o})=>r.jsxs("svg",{width:o,height:o,viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("path",{d:"M12 20V12h8",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"}),r.jsx("path",{d:"M52 20V12h-8",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"}),r.jsx("path",{d:"M12 44v8h8",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"}),r.jsx("path",{d:"M52 44v8h-8",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"}),r.jsx("circle",{cx:"24",cy:"28",r:"2.5",fill:"currentColor"}),r.jsx("circle",{cx:"40",cy:"28",r:"2.5",fill:"currentColor"}),r.jsx("path",{d:"M26 40c1.5 2 3.5 3 6 3s4.5-1 6-3",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round"}),r.jsx("path",{d:"M28 34h8",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",opacity:"0.5"})]}),d=({size:o})=>r.jsxs("svg",{width:o,height:o,viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("ellipse",{cx:"32",cy:"32",rx:"24",ry:"14",stroke:"currentColor",strokeWidth:"2.5",opacity:"0.4"}),r.jsx("circle",{cx:"32",cy:"32",r:"10",stroke:"currentColor",strokeWidth:"2.5",opacity:"0.7"}),r.jsx("circle",{cx:"32",cy:"32",r:"5",fill:"currentColor",opacity:"0.9"}),r.jsx("circle",{cx:"34",cy:"30",r:"1.5",fill:"var(--bear-bg-primary, #fff)"}),r.jsx("path",{d:"M8 32c6-12 16-18 24-18s18 6 24 18",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",opacity:"0.3"}),r.jsx("path",{d:"M8 32c6 12 16 18 24 18s18-6 24-18",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",opacity:"0.3"})]}),k={fingerprint:i,face:a,iris:d},p=({type:o,size:t,status:e,animated:s})=>{const c=k[o];return r.jsx("div",{className:n.cn("Bear-Biometric__icon bear-relative bear-flex bear-items-center bear-justify-center",s&&e==="scanning"&&"bear-animate-pulse"),children:r.jsx(c,{size:t})})};exports.BiometricIcon=p;
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { BiometricIconProps } from './Biometric.types';
3
+ export declare const BiometricIcon: FC<BiometricIconProps>;
@@ -0,0 +1,45 @@
1
+ import { jsx as r, jsxs as t } from "react/jsx-runtime";
2
+ import { cn as s } from "../../utils/cn.js";
3
+ import "react";
4
+ const a = ({ size: o }) => /* @__PURE__ */ t("svg", { width: o, height: o, viewBox: "0 0 64 64", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
5
+ /* @__PURE__ */ r("path", { d: "M32 8C20.954 8 12 16.954 12 28v8", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", opacity: "0.3" }),
6
+ /* @__PURE__ */ r("path", { d: "M52 28v8c0 11.046-8.954 20-20 20", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", opacity: "0.3" }),
7
+ /* @__PURE__ */ r("path", { d: "M18 24c0-7.732 6.268-14 14-14s14 6.268 14 14", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", opacity: "0.5" }),
8
+ /* @__PURE__ */ r("path", { d: "M18 24v12c0 7.732 6.268 14 14 14", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", opacity: "0.5" }),
9
+ /* @__PURE__ */ r("path", { d: "M46 24v12c0 4.418-2.239 8.313-5.644 10.607", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", opacity: "0.5" }),
10
+ /* @__PURE__ */ r("path", { d: "M24 22c0-4.418 3.582-8 8-8s8 3.582 8 8", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", opacity: "0.7" }),
11
+ /* @__PURE__ */ r("path", { d: "M24 22v14c0 4.418 3.582 8 8 8s8-3.582 8-8V22", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", opacity: "0.7" }),
12
+ /* @__PURE__ */ r("path", { d: "M28 22c0-2.209 1.791-4 4-4s4 1.791 4 4v14c0 2.209-1.791 4-4 4s-4-1.791-4-4V22z", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round" }),
13
+ /* @__PURE__ */ r("path", { d: "M32 22v14", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round" })
14
+ ] }), d = ({ size: o }) => /* @__PURE__ */ t("svg", { width: o, height: o, viewBox: "0 0 64 64", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
15
+ /* @__PURE__ */ r("path", { d: "M12 20V12h8", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" }),
16
+ /* @__PURE__ */ r("path", { d: "M52 20V12h-8", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" }),
17
+ /* @__PURE__ */ r("path", { d: "M12 44v8h8", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" }),
18
+ /* @__PURE__ */ r("path", { d: "M52 44v8h-8", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" }),
19
+ /* @__PURE__ */ r("circle", { cx: "24", cy: "28", r: "2.5", fill: "currentColor" }),
20
+ /* @__PURE__ */ r("circle", { cx: "40", cy: "28", r: "2.5", fill: "currentColor" }),
21
+ /* @__PURE__ */ r("path", { d: "M26 40c1.5 2 3.5 3 6 3s4.5-1 6-3", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round" }),
22
+ /* @__PURE__ */ r("path", { d: "M28 34h8", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", opacity: "0.5" })
23
+ ] }), p = ({ size: o }) => /* @__PURE__ */ t("svg", { width: o, height: o, viewBox: "0 0 64 64", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
24
+ /* @__PURE__ */ r("ellipse", { cx: "32", cy: "32", rx: "24", ry: "14", stroke: "currentColor", strokeWidth: "2.5", opacity: "0.4" }),
25
+ /* @__PURE__ */ r("circle", { cx: "32", cy: "32", r: "10", stroke: "currentColor", strokeWidth: "2.5", opacity: "0.7" }),
26
+ /* @__PURE__ */ r("circle", { cx: "32", cy: "32", r: "5", fill: "currentColor", opacity: "0.9" }),
27
+ /* @__PURE__ */ r("circle", { cx: "34", cy: "30", r: "1.5", fill: "var(--bear-bg-primary, #fff)" }),
28
+ /* @__PURE__ */ r("path", { d: "M8 32c6-12 16-18 24-18s18 6 24 18", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", opacity: "0.3" }),
29
+ /* @__PURE__ */ r("path", { d: "M8 32c6 12 16 18 24 18s18-6 24-18", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", opacity: "0.3" })
30
+ ] }), k = { fingerprint: a, face: d, iris: p }, C = ({ type: o, size: e, status: c, animated: n }) => {
31
+ const i = k[o];
32
+ return /* @__PURE__ */ r(
33
+ "div",
34
+ {
35
+ className: s(
36
+ "Bear-Biometric__icon bear-relative bear-flex bear-items-center bear-justify-center",
37
+ n && c === "scanning" && "bear-animate-pulse"
38
+ ),
39
+ children: /* @__PURE__ */ r(i, { size: e })
40
+ }
41
+ );
42
+ };
43
+ export {
44
+ C as BiometricIcon
45
+ };
@@ -0,0 +1,3 @@
1
+ export { Biometric } from './Biometric';
2
+ export { useBiometric } from './useBiometric';
3
+ export type { BiometricProps, BiometricType, BiometricStatus, UseBiometricOptions, UseBiometricReturn } from './Biometric.types';
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react"),d=(o={})=>{const{scanDuration:a=2e3,successDuration:r=1500,onSuccess:c,onError:u}=o,[i,e]=s.useState("idle"),t=s.useRef(),n=s.useCallback(()=>{t.current&&clearTimeout(t.current)},[]),l=s.useCallback(()=>{n(),e("idle")},[n]),m=s.useCallback(()=>{i!=="scanning"&&(n(),e("scanning"),t.current=setTimeout(()=>{Math.random()>.2?(e("success"),c==null||c(),t.current=setTimeout(()=>e("idle"),r)):(e("error"),u==null||u(),t.current=setTimeout(()=>e("idle"),r))},a))},[i,n,a,r,c,u]);return{status:i,scan:m,reset:l}};exports.useBiometric=d;
@@ -0,0 +1,2 @@
1
+ import { UseBiometricOptions, UseBiometricReturn } from './Biometric.types';
2
+ export declare const useBiometric: (options?: UseBiometricOptions) => UseBiometricReturn;
@@ -0,0 +1,21 @@
1
+ import { useState as f, useRef as d, useCallback as i } from "react";
2
+ const S = (a = {}) => {
3
+ const {
4
+ scanDuration: o = 2e3,
5
+ successDuration: r = 1500,
6
+ onSuccess: s,
7
+ onError: c
8
+ } = a, [u, e] = f("idle"), t = d(), n = i(() => {
9
+ t.current && clearTimeout(t.current);
10
+ }, []), l = i(() => {
11
+ n(), e("idle");
12
+ }, [n]), m = i(() => {
13
+ u !== "scanning" && (n(), e("scanning"), t.current = setTimeout(() => {
14
+ Math.random() > 0.2 ? (e("success"), s == null || s(), t.current = setTimeout(() => e("idle"), r)) : (e("error"), c == null || c(), t.current = setTimeout(() => e("idle"), r));
15
+ }, o));
16
+ }, [u, n, o, r, s, c]);
17
+ return { status: u, scan: m, reset: l };
18
+ };
19
+ export {
20
+ S as useBiometric
21
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),r=require("react"),g=require("../../utils/cn.cjs"),ae=require("../Spinner/Spinner.cjs"),w=require("../Typography/Typography.cjs"),oe=require("../../hooks/useBearStyles.cjs");require("../../hooks/useBearComponent/useBearComponent.cjs");const se=require("../../context/BearProvider.cjs"),o=require("./Button.constants.cjs"),O=x=>x in o.BUTTON_VARIANT,E=r.forwardRef((x,l)=>{var k,q;const{variant:e="primary",size:f="md",loading:c=!1,loadingText:_,fullWidth:M=!1,icon:p,iconPosition:C="left",leftIcon:P,rightIcon:U,textVariant:S="inherit",spotlight:u=!1,spotlightColor:z="rgba(255, 255, 255, 0.35)",spotlightSize:h=150,disabled:D,className:L,children:Z,testId:F,bis:H,style:X,onMouseMove:B,onMouseEnter:m,onMouseLeave:y,...Y}=x,W=D||c,v=oe.useBearStyles(H,X),R=P??(p&&C==="left"?p:void 0),$=U??(p&&C==="right"?p:void 0),s=r.useContext(se.BearContext),N=((q=(k=s==null?void 0:s.components)==null?void 0:k.Button)==null?void 0:q.root)||{},j=(s==null?void 0:s.customVariants)||{},T=!O(e)&&e in j,a=T?j[e]:null,b=r.useRef(null),[A,I]=r.useState({x:-1e3,y:-1e3}),[G,V]=r.useState(!1),J=r.useCallback(t=>{if(u&&b.current){const d=b.current.getBoundingClientRect(),re=t.clientX-d.left,ne=t.clientY-d.top;I({x:re,y:ne})}B==null||B(t)},[u,B]),K=r.useCallback(t=>{if(u&&(V(!0),b.current)){const d=b.current.getBoundingClientRect();I({x:t.clientX-d.left,y:t.clientY-d.top})}m==null||m(t)},[u,m]),Q=r.useCallback(t=>{V(!1),I({x:-1e3,y:-1e3}),y==null||y(t)},[y]),i=o.VARIANT_DEFAULTS[e]||o.VARIANT_DEFAULTS.primary,ee=r.useMemo(()=>T&&a?{backgroundColor:`var(--bear-${e}-bg, ${a.bg})`,color:a.text||"#ffffff",borderColor:a.border,"--bear-ring-color":a.ring||a.bg,...N,...v}:{backgroundColor:`var(--bear-btn-${e}-bg, ${i.bg})`,color:e==="outline"||e==="ghost"?`var(--bear-btn-${e}-text, ${i.text||"inherit"})`:"white",borderColor:e==="outline"?`var(--bear-btn-${e}-border, ${i.border||i.bg})`:void 0,"--bear-ring-color":`var(--bear-btn-${e}-ring, ${i.ring})`,...N,...v},[e,i,N,v,T,a]),te=r.useCallback(t=>{b.current=t,typeof l=="function"?l(t):l&&(l.current=t)},[l]);return n.jsxs("button",{ref:te,disabled:W,"aria-busy":c||void 0,style:ee,className:g.cn("Bear-Button","bear-inline-flex bear-items-center bear-justify-center bear-font-medium bear-rounded-lg bear-transition-all bear-duration-200 bear-outline-none bear-relative bear-overflow-hidden",o.BUTTON_SIZE[f],O(e)?o.BUTTON_VARIANT[e]:"bear-btn-custom bear-text-white focus:bear-ring-2 focus:bear-ring-offset-2 disabled:bear-opacity-50 disabled:bear-cursor-not-allowed hover:bear-brightness-110 active:bear-brightness-95",M&&"bear-w-full",c&&"bear-cursor-wait",L),"data-testid":F,onMouseMove:J,onMouseEnter:K,onMouseLeave:Q,...Y,children:[u&&n.jsx("span",{className:"Bear-Button__spotlight","aria-hidden":"true",style:{position:"absolute",pointerEvents:"none",left:0,top:0,width:h,height:h,borderRadius:"50%",background:`radial-gradient(circle at center, ${z} 0%, transparent 70%)`,opacity:G?1:0,transform:`translate(${A.x-h/2}px, ${A.y-h/2}px)`,transition:"opacity 0.15s ease-out",zIndex:1,mixBlendMode:"overlay"}}),c&&n.jsxs("span",{className:g.cn("Bear-Button__loading bear-inline-flex bear-items-center bear-gap-2 bear-relative bear-z-10",!_&&"bear-absolute"),children:[n.jsx(ae.Spinner,{size:f==="xs"?"xs":"sm",className:"Bear-Button__spinner"}),_&&n.jsx(w.Typography,{variant:S,className:"Bear-Button__text",children:_})]}),n.jsxs("span",{className:g.cn("Bear-Button__content bear-inline-flex bear-items-center bear-gap-inherit bear-relative bear-z-10",c&&"bear-invisible"),children:[R&&n.jsx("span",{className:g.cn("Bear-Button__icon Bear-Button__icon--left bear-inline-flex bear-shrink-0",o.BUTTON_ICON_SIZE[f]),children:R}),n.jsx(w.Typography,{variant:S,className:"Bear-Button__text",children:Z}),$&&n.jsx("span",{className:g.cn("Bear-Button__icon Bear-Button__icon--right bear-inline-flex bear-shrink-0",o.BUTTON_ICON_SIZE[f]),children:$})]})]})});E.displayName="Button";exports.Button=E;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),g=require("react"),s=require("../../utils/cn.cjs"),Q=require("../Spinner/Spinner.cjs"),j=require("../Typography/Typography.cjs"),X=require("../../hooks/useBearStyles.cjs");require("../../hooks/useBearComponent/useBearComponent.cjs");const ee=require("../../context/BearProvider.cjs"),n=require("./Button.constants.cjs"),q=require("./Button.utils.cjs"),re=require("./useSpotlight.cjs"),O=g.forwardRef((V,i)=>{var C,$;const{variant:e="primary",size:l="md",loading:c=!1,loadingText:h,fullWidth:E=!1,icon:b,iconPosition:_="left",leftIcon:w,rightIcon:A,textVariant:y="inherit",iconOnly:v=!1,spotlight:x=!1,spotlightColor:R="rgba(255, 255, 255, 0.35)",spotlightSize:u=150,disabled:U,className:k,children:z,testId:L,bis:P,style:Z,onMouseMove:D,onMouseEnter:F,onMouseLeave:H,...W}=V,Y=U||c,p=X.useBearStyles(P,Z),N=w??(b&&_==="left"?b:void 0),T=A??(b&&_==="right"?b:void 0),a=g.useContext(ee.BearContext),f=(($=(C=a==null?void 0:a.components)==null?void 0:C.Button)==null?void 0:$.root)||{},I=(a==null?void 0:a.customVariants)||{},B=!q.isBuiltInVariant(e)&&e in I,t=B?I[e]:null,{spotlightRef:S,position:M,isHovered:G,handlers:m}=re.useSpotlight({enabled:x,onMouseMove:D,onMouseEnter:F,onMouseLeave:H}),o=n.VARIANT_DEFAULTS[e]||n.VARIANT_DEFAULTS.primary,J=g.useMemo(()=>B&&t?{backgroundColor:`var(--bear-${e}-bg, ${t.bg})`,color:t.text||"#ffffff",borderColor:t.border,"--bear-ring-color":t.ring||t.bg,...f,...p}:{backgroundColor:`var(--bear-btn-${e}-bg, ${o.bg})`,color:e==="outline"||e==="ghost"?`var(--bear-btn-${e}-text, ${o.text||"inherit"})`:"white",borderColor:e==="outline"?`var(--bear-btn-${e}-border, ${o.border||o.bg})`:void 0,"--bear-ring-color":`var(--bear-btn-${e}-ring, ${o.ring})`,...f,...p},[e,o,f,p,B,t]),K=g.useCallback(d=>{S.current=d,typeof i=="function"?i(d):i&&(i.current=d)},[i,S]);return r.jsxs("button",{ref:K,disabled:Y,"aria-busy":c||void 0,style:J,className:s.cn("Bear-Button","bear-inline-flex bear-items-center bear-justify-center bear-font-medium bear-rounded-lg bear-transition-all bear-duration-200 bear-outline-none bear-relative bear-overflow-hidden",v?n.BUTTON_ICON_ONLY_SIZE[l]:n.BUTTON_SIZE[l],v&&"bear-rounded-lg",q.isBuiltInVariant(e)?n.BUTTON_VARIANT[e]:"bear-btn-custom bear-text-white focus:bear-ring-2 focus:bear-ring-offset-2 disabled:bear-opacity-50 disabled:bear-cursor-not-allowed hover:bear-brightness-110 active:bear-brightness-95",E&&"bear-w-full",c&&"bear-cursor-wait",k),"data-testid":L,onMouseMove:m.handleMouseMove,onMouseEnter:m.handleMouseEnter,onMouseLeave:m.handleMouseLeave,...W,children:[x&&r.jsx("span",{className:s.cn("Bear-Button__spotlight","bear-absolute bear-left-0 bear-top-0 bear-rounded-full bear-pointer-events-none bear-z-[1]","bear-transition-opacity bear-duration-150 bear-ease-out",G?"bear-opacity-100":"bear-opacity-0"),"aria-hidden":"true",style:{width:u,height:u,background:`radial-gradient(circle at center, ${R} 0%, transparent 70%)`,transform:`translate(${M.x-u/2}px, ${M.y-u/2}px)`,mixBlendMode:"overlay"}}),c&&r.jsxs("span",{className:s.cn("Bear-Button__loading bear-inline-flex bear-items-center bear-gap-2 bear-relative bear-z-10",!h&&"bear-absolute"),children:[r.jsx(Q.Spinner,{size:l==="xs"?"xs":"sm",className:"Bear-Button__spinner"}),h&&r.jsx(j.Typography,{variant:y,className:"Bear-Button__text",children:h})]}),r.jsxs("span",{className:s.cn("Bear-Button__content bear-inline-flex bear-items-center bear-gap-inherit bear-relative bear-z-10",c&&"bear-invisible"),children:[N&&r.jsx("span",{className:s.cn("Bear-Button__icon Bear-Button__icon--left bear-inline-flex bear-shrink-0",n.BUTTON_ICON_SIZE[l]),children:N}),r.jsx(j.Typography,{variant:y,className:"Bear-Button__text",children:z}),T&&r.jsx("span",{className:s.cn("Bear-Button__icon Bear-Button__icon--right bear-inline-flex bear-shrink-0",n.BUTTON_ICON_SIZE[l]),children:T})]})]})});O.displayName="Button";exports.Button=O;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r={xs:"bear-px-2 bear-py-1 bear-text-xs bear-gap-1",sm:"bear-px-3 bear-py-1.5 bear-text-sm bear-gap-1.5",md:"bear-px-4 bear-py-2 bear-text-sm bear-gap-2",lg:"bear-px-5 bear-py-2.5 bear-text-base bear-gap-2",xl:"bear-px-6 bear-py-3 bear-text-lg bear-gap-2.5"},e={xs:"[&_svg]:bear-w-3 [&_svg]:bear-h-3",sm:"[&_svg]:bear-w-4 [&_svg]:bear-h-4",md:"[&_svg]:bear-w-5 [&_svg]:bear-h-5",lg:"[&_svg]:bear-w-5 [&_svg]:bear-h-5",xl:"[&_svg]:bear-w-6 [&_svg]:bear-h-6"},a={primary:`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r={xs:"bear-px-2 bear-py-1 bear-text-xs bear-gap-1",sm:"bear-px-3 bear-py-1.5 bear-text-sm bear-gap-1.5",md:"bear-px-4 bear-py-2 bear-text-sm bear-gap-2",lg:"bear-px-5 bear-py-2.5 bear-text-base bear-gap-2",xl:"bear-px-6 bear-py-3 bear-text-lg bear-gap-2.5"},e={xs:"bear-w-6 bear-h-6 bear-p-0",sm:"bear-w-8 bear-h-8 bear-p-0",md:"bear-w-10 bear-h-10 bear-p-0",lg:"bear-w-12 bear-h-12 bear-p-0",xl:"bear-w-14 bear-h-14 bear-p-0"},a={xs:"[&_svg]:bear-w-3 [&_svg]:bear-h-3",sm:"[&_svg]:bear-w-4 [&_svg]:bear-h-4",md:"[&_svg]:bear-w-5 [&_svg]:bear-h-5",lg:"[&_svg]:bear-w-5 [&_svg]:bear-h-5",xl:"[&_svg]:bear-w-6 [&_svg]:bear-h-6"},b={primary:`
2
2
  bear-btn-primary
3
3
  bear-text-white bear-relative bear-overflow-hidden
4
4
  focus:bear-ring-2 focus:bear-ring-offset-2
@@ -44,4 +44,4 @@
44
44
  bear-text-white bear-relative bear-overflow-hidden
45
45
  focus:bear-ring-2 focus:bear-ring-offset-2
46
46
  disabled:bear-opacity-50 disabled:bear-cursor-not-allowed
47
- `},b={primary:{bg:"var(--bear-primary-500)",hover:"var(--bear-primary-600)",active:"var(--bear-primary-700)",ring:"var(--bear-primary-500)"},secondary:{bg:"var(--bear-secondary-500)",hover:"var(--bear-secondary-600)",active:"var(--bear-secondary-700)",ring:"var(--bear-secondary-500)"},success:{bg:"var(--bear-success-500)",hover:"var(--bear-success-600)",active:"var(--bear-success-700)",ring:"var(--bear-success-500)"},warning:{bg:"var(--bear-warning-500)",hover:"var(--bear-warning-600)",active:"var(--bear-warning-700)",ring:"var(--bear-warning-500)"},danger:{bg:"var(--bear-danger-500)",hover:"var(--bear-danger-600)",active:"var(--bear-danger-700)",ring:"var(--bear-danger-500)"},info:{bg:"var(--bear-info-500)",hover:"var(--bear-info-600)",active:"var(--bear-info-700)",ring:"var(--bear-info-500)"},error:{bg:"var(--bear-danger-500)",hover:"var(--bear-danger-600)",active:"var(--bear-danger-700)",ring:"var(--bear-danger-500)"},ghost:{bg:"transparent",hover:"var(--bear-neutral-100)",active:"var(--bear-neutral-200)",text:"var(--bear-text-primary)",ring:"var(--bear-neutral-500)"},outline:{bg:"transparent",hover:"var(--bear-primary-50)",active:"var(--bear-primary-100)",border:"var(--bear-primary-500)",text:"var(--bear-primary-500)",ring:"var(--bear-primary-500)"}};exports.BUTTON_ICON_SIZE=e;exports.BUTTON_SIZE=r;exports.BUTTON_VARIANT=a;exports.VARIANT_DEFAULTS=b;
47
+ `},o={primary:{bg:"var(--bear-primary-500)",hover:"var(--bear-primary-600)",active:"var(--bear-primary-700)",ring:"var(--bear-primary-500)"},secondary:{bg:"var(--bear-secondary-500)",hover:"var(--bear-secondary-600)",active:"var(--bear-secondary-700)",ring:"var(--bear-secondary-500)"},success:{bg:"var(--bear-success-500)",hover:"var(--bear-success-600)",active:"var(--bear-success-700)",ring:"var(--bear-success-500)"},warning:{bg:"var(--bear-warning-500)",hover:"var(--bear-warning-600)",active:"var(--bear-warning-700)",ring:"var(--bear-warning-500)"},danger:{bg:"var(--bear-danger-500)",hover:"var(--bear-danger-600)",active:"var(--bear-danger-700)",ring:"var(--bear-danger-500)"},info:{bg:"var(--bear-info-500)",hover:"var(--bear-info-600)",active:"var(--bear-info-700)",ring:"var(--bear-info-500)"},error:{bg:"var(--bear-danger-500)",hover:"var(--bear-danger-600)",active:"var(--bear-danger-700)",ring:"var(--bear-danger-500)"},ghost:{bg:"transparent",hover:"var(--bear-neutral-100)",active:"var(--bear-neutral-200)",text:"var(--bear-text-primary)",ring:"var(--bear-neutral-500)"},outline:{bg:"transparent",hover:"var(--bear-primary-50)",active:"var(--bear-primary-100)",border:"var(--bear-primary-500)",text:"var(--bear-primary-500)",ring:"var(--bear-primary-500)"}};exports.BUTTON_ICON_ONLY_SIZE=e;exports.BUTTON_ICON_SIZE=a;exports.BUTTON_SIZE=r;exports.BUTTON_VARIANT=b;exports.VARIANT_DEFAULTS=o;
@@ -1,5 +1,6 @@
1
1
  import { BearSize, BearVariant } from '../../types';
2
2
  export declare const BUTTON_SIZE: Record<BearSize, string>;
3
+ export declare const BUTTON_ICON_ONLY_SIZE: Record<BearSize, string>;
3
4
  export declare const BUTTON_ICON_SIZE: Record<BearSize, string>;
4
5
  /**
5
6
  * Button variants using CSS variables for full customization
@@ -5,12 +5,18 @@ const r = {
5
5
  lg: "bear-px-5 bear-py-2.5 bear-text-base bear-gap-2",
6
6
  xl: "bear-px-6 bear-py-3 bear-text-lg bear-gap-2.5"
7
7
  }, e = {
8
+ xs: "bear-w-6 bear-h-6 bear-p-0",
9
+ sm: "bear-w-8 bear-h-8 bear-p-0",
10
+ md: "bear-w-10 bear-h-10 bear-p-0",
11
+ lg: "bear-w-12 bear-h-12 bear-p-0",
12
+ xl: "bear-w-14 bear-h-14 bear-p-0"
13
+ }, a = {
8
14
  xs: "[&_svg]:bear-w-3 [&_svg]:bear-h-3",
9
15
  sm: "[&_svg]:bear-w-4 [&_svg]:bear-h-4",
10
16
  md: "[&_svg]:bear-w-5 [&_svg]:bear-h-5",
11
17
  lg: "[&_svg]:bear-w-5 [&_svg]:bear-h-5",
12
18
  xl: "[&_svg]:bear-w-6 [&_svg]:bear-h-6"
13
- }, a = {
19
+ }, b = {
14
20
  primary: `
15
21
  bear-btn-primary
16
22
  bear-text-white bear-relative bear-overflow-hidden
@@ -66,7 +72,7 @@ const r = {
66
72
  focus:bear-ring-2 focus:bear-ring-offset-2
67
73
  disabled:bear-opacity-50 disabled:bear-cursor-not-allowed
68
74
  `
69
- }, b = {
75
+ }, o = {
70
76
  primary: { bg: "var(--bear-primary-500)", hover: "var(--bear-primary-600)", active: "var(--bear-primary-700)", ring: "var(--bear-primary-500)" },
71
77
  secondary: { bg: "var(--bear-secondary-500)", hover: "var(--bear-secondary-600)", active: "var(--bear-secondary-700)", ring: "var(--bear-secondary-500)" },
72
78
  success: { bg: "var(--bear-success-500)", hover: "var(--bear-success-600)", active: "var(--bear-success-700)", ring: "var(--bear-success-500)" },
@@ -78,8 +84,9 @@ const r = {
78
84
  outline: { bg: "transparent", hover: "var(--bear-primary-50)", active: "var(--bear-primary-100)", border: "var(--bear-primary-500)", text: "var(--bear-primary-500)", ring: "var(--bear-primary-500)" }
79
85
  };
80
86
  export {
81
- e as BUTTON_ICON_SIZE,
87
+ e as BUTTON_ICON_ONLY_SIZE,
88
+ a as BUTTON_ICON_SIZE,
82
89
  r as BUTTON_SIZE,
83
- a as BUTTON_VARIANT,
84
- b as VARIANT_DEFAULTS
90
+ b as BUTTON_VARIANT,
91
+ o as VARIANT_DEFAULTS
85
92
  };
@@ -1,29 +1,2 @@
1
1
  import { ButtonProps } from './Button.types';
2
- /**
3
- * Button component with multiple variants, sizes, states, and effects.
4
- *
5
- * Features:
6
- * - Fully themeable via BearProvider
7
- * - Mouse-follow spotlight hover effect
8
- * - CSS variable-based colors for easy customization
9
- * - Component overrides via useBearComponent
10
- *
11
- * @example
12
- * ```tsx
13
- * // Basic usage
14
- * <Button variant="primary" size="md">
15
- * Click me
16
- * </Button>
17
- *
18
- * // With spotlight hover effect
19
- * <Button variant="primary" spotlight>
20
- * Hover me
21
- * </Button>
22
- *
23
- * // With icons
24
- * <Button variant="outline" leftIcon={<Icon />}>
25
- * With Icon
26
- * </Button>
27
- * ```
28
- */
29
2
  export declare const Button: import('react').ForwardRefExoticComponent<ButtonProps & import('react').RefAttributes<HTMLButtonElement>>;