@mks2508/sidebar-headless 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/CHANGELOG.md +53 -53
  2. package/LICENSE +21 -21
  3. package/README.md +165 -165
  4. package/dist/components/BottomNavBar/MobileBottomNav.d.ts +65 -0
  5. package/dist/components/BottomNavBar/MobileBottomNav.d.ts.map +1 -0
  6. package/dist/components/BottomNavBar/MobileBottomNav.styles.d.ts +94 -0
  7. package/dist/components/BottomNavBar/MobileBottomNav.styles.d.ts.map +1 -0
  8. package/dist/components/BottomNavBar/index.d.ts +10 -0
  9. package/dist/components/BottomNavBar/index.d.ts.map +1 -0
  10. package/dist/components/BottomNavBar/types.d.ts +363 -0
  11. package/dist/components/BottomNavBar/types.d.ts.map +1 -0
  12. package/dist/components/BottomNavBar/useIOSSafariFix.d.ts +74 -0
  13. package/dist/components/BottomNavBar/useIOSSafariFix.d.ts.map +1 -0
  14. package/dist/components/Sidebar/Sidebar.constants.d.ts +285 -0
  15. package/dist/components/Sidebar/Sidebar.constants.d.ts.map +1 -0
  16. package/dist/components/Sidebar/Sidebar.d.ts +80 -0
  17. package/dist/components/Sidebar/Sidebar.d.ts.map +1 -0
  18. package/dist/components/Sidebar/Sidebar.styles.d.ts +77 -0
  19. package/dist/components/Sidebar/Sidebar.styles.d.ts.map +1 -0
  20. package/dist/components/Sidebar/Sidebar.types.d.ts +638 -0
  21. package/dist/components/Sidebar/Sidebar.types.d.ts.map +1 -0
  22. package/dist/components/Sidebar/SidebarContent.d.ts +46 -0
  23. package/dist/components/Sidebar/SidebarContent.d.ts.map +1 -0
  24. package/dist/components/Sidebar/SidebarContext.d.ts +87 -0
  25. package/dist/components/Sidebar/SidebarContext.d.ts.map +1 -0
  26. package/dist/components/Sidebar/SidebarFluidIndicator.d.ts +37 -0
  27. package/dist/components/Sidebar/SidebarFluidIndicator.d.ts.map +1 -0
  28. package/dist/components/Sidebar/SidebarIndicator.d.ts +59 -0
  29. package/dist/components/Sidebar/SidebarIndicator.d.ts.map +1 -0
  30. package/dist/components/Sidebar/SidebarItem.d.ts +82 -0
  31. package/dist/components/Sidebar/SidebarItem.d.ts.map +1 -0
  32. package/dist/components/Sidebar/SidebarNav.d.ts +48 -0
  33. package/dist/components/Sidebar/SidebarNav.d.ts.map +1 -0
  34. package/dist/components/Sidebar/SidebarSafeArea.d.ts +56 -0
  35. package/dist/components/Sidebar/SidebarSafeArea.d.ts.map +1 -0
  36. package/dist/components/Sidebar/SidebarSubContent.d.ts +10 -0
  37. package/dist/components/Sidebar/SidebarSubContent.d.ts.map +1 -0
  38. package/dist/components/Sidebar/SidebarSubLink.d.ts +18 -0
  39. package/dist/components/Sidebar/SidebarSubLink.d.ts.map +1 -0
  40. package/dist/components/Sidebar/SidebarToggle.d.ts +52 -0
  41. package/dist/components/Sidebar/SidebarToggle.d.ts.map +1 -0
  42. package/dist/components/Sidebar/SidebarTooltip.d.ts +26 -0
  43. package/dist/components/Sidebar/SidebarTooltip.d.ts.map +1 -0
  44. package/dist/components/Sidebar/TooltipTitle3D.d.ts +42 -0
  45. package/dist/components/Sidebar/TooltipTitle3D.d.ts.map +1 -0
  46. package/dist/components/Sidebar/TooltipTitle3DCrossfade.d.ts +46 -0
  47. package/dist/components/Sidebar/TooltipTitle3DCrossfade.d.ts.map +1 -0
  48. package/dist/components/Sidebar/TooltipTitleCylinder.d.ts +9 -0
  49. package/dist/components/Sidebar/TooltipTitleCylinder.d.ts.map +1 -0
  50. package/dist/components/Sidebar/hooks/useSidebarContext.d.ts +48 -0
  51. package/dist/components/Sidebar/hooks/useSidebarContext.d.ts.map +1 -0
  52. package/dist/components/Sidebar/hooks/useSidebarIndicator.d.ts +72 -0
  53. package/dist/components/Sidebar/hooks/useSidebarIndicator.d.ts.map +1 -0
  54. package/dist/components/Sidebar/hooks/useSidebarKeyboard.d.ts +51 -0
  55. package/dist/components/Sidebar/hooks/useSidebarKeyboard.d.ts.map +1 -0
  56. package/dist/components/Sidebar/hooks/useSubContent.d.ts +7 -0
  57. package/dist/components/Sidebar/hooks/useSubContent.d.ts.map +1 -0
  58. package/dist/components/Sidebar/hooks/useTitleHistory.d.ts +41 -0
  59. package/dist/components/Sidebar/hooks/useTitleHistory.d.ts.map +1 -0
  60. package/dist/components/Sidebar/hooks/useTooltipDirection.d.ts +29 -0
  61. package/dist/components/Sidebar/hooks/useTooltipDirection.d.ts.map +1 -0
  62. package/dist/components/Sidebar/hooks/useTooltipTransition.d.ts +60 -0
  63. package/dist/components/Sidebar/hooks/useTooltipTransition.d.ts.map +1 -0
  64. package/dist/components/Sidebar/index.d.ts +163 -0
  65. package/dist/components/Sidebar/index.d.ts.map +1 -0
  66. package/dist/components/Sidebar/sidebar-defaults.d.ts +54 -0
  67. package/dist/components/Sidebar/sidebar-defaults.d.ts.map +1 -0
  68. package/dist/components/animate-ui/components/base/switch.d.ts +11 -0
  69. package/dist/components/animate-ui/components/base/switch.d.ts.map +1 -0
  70. package/dist/components/animate-ui/primitives/base/switch.d.ts +23 -0
  71. package/dist/components/animate-ui/primitives/base/switch.d.ts.map +1 -0
  72. package/dist/components/fluid-hover-indicator-v2.d.ts +46 -0
  73. package/dist/components/fluid-hover-indicator-v2.d.ts.map +1 -0
  74. package/dist/components/fluid-hover-indicator.d.ts +28 -0
  75. package/dist/components/fluid-hover-indicator.d.ts.map +1 -0
  76. package/dist/components/ui/TextCylinder.d.ts +21 -0
  77. package/dist/components/ui/TextCylinder.d.ts.map +1 -0
  78. package/dist/components/ui/button.d.ts +11 -0
  79. package/dist/components/ui/button.d.ts.map +1 -0
  80. package/dist/components/ui/card.d.ts +10 -0
  81. package/dist/components/ui/card.d.ts.map +1 -0
  82. package/dist/components/ui/custom-icon.d.ts +45 -0
  83. package/dist/components/ui/custom-icon.d.ts.map +1 -0
  84. package/dist/components/ui/dotted-glow-background.d.ts +42 -0
  85. package/dist/components/ui/dotted-glow-background.d.ts.map +1 -0
  86. package/dist/components/ui/input.d.ts +4 -0
  87. package/dist/components/ui/input.d.ts.map +1 -0
  88. package/dist/components/ui/label.d.ts +5 -0
  89. package/dist/components/ui/label.d.ts.map +1 -0
  90. package/dist/components/ui/optimized-image.d.ts +12 -0
  91. package/dist/components/ui/optimized-image.d.ts.map +1 -0
  92. package/dist/components/ui/select.d.ts +16 -0
  93. package/dist/components/ui/select.d.ts.map +1 -0
  94. package/dist/components/ui/slider.d.ts +5 -0
  95. package/dist/components/ui/slider.d.ts.map +1 -0
  96. package/dist/components/ui/textarea.d.ts +4 -0
  97. package/dist/components/ui/textarea.d.ts.map +1 -0
  98. package/dist/{index.css → dist/index.css} +945 -908
  99. package/dist/dist/index.css.map +1 -0
  100. package/dist/hooks/use-controlled-state.d.ts +9 -0
  101. package/dist/hooks/use-controlled-state.d.ts.map +1 -0
  102. package/dist/hooks/use-fluid-animation.d.ts +18 -0
  103. package/dist/hooks/use-fluid-animation.d.ts.map +1 -0
  104. package/dist/hooks/use-liquid-glass.d.ts +40 -0
  105. package/dist/hooks/use-liquid-glass.d.ts.map +1 -0
  106. package/dist/hooks/use-sidebar-liquid-glass.d.ts +48 -0
  107. package/dist/hooks/use-sidebar-liquid-glass.d.ts.map +1 -0
  108. package/dist/hooks/use-text-cylinder.d.ts +67 -0
  109. package/dist/hooks/use-text-cylinder.d.ts.map +1 -0
  110. package/dist/index.cjs +14087 -0
  111. package/dist/index.cjs.map +1 -0
  112. package/dist/index.d.ts +10 -2231
  113. package/dist/index.d.ts.map +1 -0
  114. package/dist/index.js +13132 -52336
  115. package/dist/index.js.map +1 -1
  116. package/dist/lib/get-strict-context.d.ts +10 -0
  117. package/dist/lib/get-strict-context.d.ts.map +1 -0
  118. package/dist/lib/liquid-glass-presets.d.ts +43 -0
  119. package/dist/lib/liquid-glass-presets.d.ts.map +1 -0
  120. package/dist/lib/utils.d.ts +3 -0
  121. package/dist/lib/utils.d.ts.map +1 -0
  122. package/dist/types/sidebar-minimal.d.ts +21 -0
  123. package/dist/types/sidebar-minimal.d.ts.map +1 -0
  124. package/dist/utils/TooltipAnimationController.d.ts +122 -0
  125. package/dist/utils/TooltipAnimationController.d.ts.map +1 -0
  126. package/package.json +12 -6
  127. package/dist/MobileOptimizations.css +0 -570
  128. package/dist/index.css.map +0 -1
  129. package/dist/index.d.cts +0 -2235
  130. package/dist/tooltip-keyframes.css +0 -329
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @fileoverview MobileBottomNav component exports
3
+ * @description Centralized exports for the MobileBottomNav component system
4
+ * @module MobileBottomNav
5
+ */
6
+ export { MobileBottomNav, default } from "./MobileBottomNav";
7
+ export { NavVariant, NavSize, LabelPosition, AnimationType, NavItemState, IconSize, ZIndexLevel, BlurIntensity, type RootProps, type NavListProps, type NavItemProps, type NavContextValue, type SpringConfig, type TweenConfig, type AnimationConfig, type GlassConfig, type BaseNavProps, DEFAULT_ANIMATION_CONFIG, DEFAULT_GLASS_CONFIG, DEFAULT_SPRING_CONFIG, DEFAULT_TWEEN_CONFIG, } from "./types";
8
+ export { rootVariants, navListVariants, navItemVariants, iconVariants, labelVariants, badgeVariants, spacerVariants, type RootVariantProps, type NavListVariantProps, type NavItemVariantProps, type IconVariantProps, type LabelVariantProps, type BadgeVariantProps, type SpacerVariantProps, } from "./MobileBottomNav.styles";
9
+ export { useIOSSafariFix, useIOSFixedReset, detectIOSVersion, type IOSSafariFixConfig, } from "./useIOSSafariFix";
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/BottomNavBar/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAG5D,OAAO,EAEL,UAAU,EACV,OAAO,EACP,aAAa,EACb,aAAa,EACb,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,aAAa,EAEb,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,YAAY,EAEjB,wBAAwB,EACxB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,SAAS,CAAA;AAGhB,OAAO,EACL,YAAY,EACZ,eAAe,EACf,eAAe,EACf,YAAY,EACZ,aAAa,EACb,aAAa,EACb,cAAc,EACd,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,GACxB,MAAM,0BAA0B,CAAA;AAEjC,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,kBAAkB,GACxB,MAAM,mBAAmB,CAAA"}
@@ -0,0 +1,363 @@
1
+ import type React from "react";
2
+ /**
3
+ * @fileoverview Type definitions for MobileBottomNav component
4
+ * @module MobileBottomNav/types
5
+ * @version 1.0.0
6
+ */
7
+ import type { ReactNode, HTMLAttributes, ComponentPropsWithoutRef } from "react";
8
+ /**
9
+ * Visual variant of the navigation bar
10
+ * @enum {string}
11
+ * @description Defines the visual style of the bottom navigation
12
+ */
13
+ export declare enum NavVariant {
14
+ /** Glassmorphism effect with blur and transparency */
15
+ GLASS = "glass",
16
+ /** Solid background without transparency */
17
+ SOLID = "solid",
18
+ /** Transparent background - headless mode for custom styling */
19
+ HEADLESS = "headless"
20
+ }
21
+ /**
22
+ * Size preset for the navigation bar
23
+ * @enum {string}
24
+ * @description Controls the overall size and spacing of navigation elements
25
+ */
26
+ export declare enum NavSize {
27
+ /** Compact size - 56px height, smaller touch targets */
28
+ SMALL = "sm",
29
+ /** Default size - 72px height, optimal touch targets */
30
+ MEDIUM = "md",
31
+ /** Large size - 88px height, larger touch targets */
32
+ LARGE = "lg"
33
+ }
34
+ /**
35
+ * Position of the label relative to the icon
36
+ * @enum {string}
37
+ * @description Determines how labels are displayed in navigation items
38
+ */
39
+ export declare enum LabelPosition {
40
+ /** Label below the icon (default mobile pattern) */
41
+ BELOW = "below",
42
+ /** Label beside the icon (horizontal layout) */
43
+ BESIDE = "beside",
44
+ /** No label, icon only */
45
+ HIDDEN = "hidden"
46
+ }
47
+ /**
48
+ * Animation type for navigation interactions
49
+ * @enum {string}
50
+ * @description Defines the animation behavior for navigation items
51
+ */
52
+ export declare enum AnimationType {
53
+ /** Spring animation for natural feel */
54
+ SPRING = "spring",
55
+ /** Tween animation for precise timing */
56
+ TWEEN = "tween",
57
+ /** No animation */
58
+ NONE = "none"
59
+ }
60
+ /**
61
+ * State of a navigation item
62
+ * @enum {string}
63
+ * @description Represents the current state of a navigation item
64
+ */
65
+ export declare enum NavItemState {
66
+ /** Default inactive state */
67
+ INACTIVE = "inactive",
68
+ /** Currently selected/active item */
69
+ ACTIVE = "active",
70
+ /** Disabled and non-interactive */
71
+ DISABLED = "disabled"
72
+ }
73
+ /**
74
+ * Icon size preset
75
+ * @enum {number}
76
+ * @description Standard icon sizes in pixels
77
+ */
78
+ export declare enum IconSize {
79
+ /** Small icons - 18px */
80
+ SMALL = 18,
81
+ /** Medium icons - 24px (default) */
82
+ MEDIUM = 24,
83
+ /** Large icons - 28px */
84
+ LARGE = 28
85
+ }
86
+ /**
87
+ * Z-index levels for layering
88
+ * @enum {number}
89
+ * @description Consistent z-index values for proper stacking
90
+ */
91
+ export declare enum ZIndexLevel {
92
+ /** Below default content */
93
+ BELOW = 40,
94
+ /** Default navigation level */
95
+ DEFAULT = 50,
96
+ /** Above most content */
97
+ ELEVATED = 60,
98
+ /** Maximum elevation */
99
+ MAX = 100
100
+ }
101
+ /**
102
+ * Blur intensity for glassmorphism
103
+ * @enum {number}
104
+ * @description Backdrop blur values in pixels
105
+ */
106
+ export declare enum BlurIntensity {
107
+ /** Subtle blur - 8px */
108
+ LIGHT = 8,
109
+ /** Standard blur - 20px (default) */
110
+ MEDIUM = 20,
111
+ /** Heavy blur - 40px */
112
+ HEAVY = 40
113
+ }
114
+ /**
115
+ * Border radius preset for navigation
116
+ * @enum {string}
117
+ * @description Defines the border radius style
118
+ */
119
+ export declare enum NavBorderRadius {
120
+ /** No border radius */
121
+ NONE = "none",
122
+ /** Small radius - 8px */
123
+ SMALL = "sm",
124
+ /** Medium radius - 16px (default) */
125
+ MEDIUM = "md",
126
+ /** Large radius - 24px */
127
+ LARGE = "lg",
128
+ /** Extra large radius - 32px */
129
+ EXTRA_LARGE = "xl",
130
+ /** Full rounded (pill shape) */
131
+ FULL = "full"
132
+ }
133
+ /**
134
+ * Gap spacing preset for items
135
+ * @enum {number}
136
+ * @description Standard gap values in rem units
137
+ */
138
+ export declare enum NavGap {
139
+ /** No gap */
140
+ NONE = 0,
141
+ /** Extra small - 0.25rem (4px) */
142
+ EXTRA_SMALL = 0.25,
143
+ /** Small - 0.5rem (8px) */
144
+ SMALL = 0.5,
145
+ /** Medium - 1rem (16px) */
146
+ MEDIUM = 1,
147
+ /** Large - 1.5rem (24px) */
148
+ LARGE = 1.5,
149
+ /** Extra large - 2rem (32px) */
150
+ EXTRA_LARGE = 2
151
+ }
152
+ /**
153
+ * Spring animation configuration
154
+ * @interface SpringConfig
155
+ * @description Configuration for spring-based animations
156
+ */
157
+ export interface SpringConfig {
158
+ /** Spring stiffness (default: 400) */
159
+ stiffness: number;
160
+ /** Damping ratio (default: 30) */
161
+ damping: number;
162
+ /** Mass of the animated element (default: 1) */
163
+ mass: number;
164
+ }
165
+ /**
166
+ * Tween animation configuration
167
+ * @interface TweenConfig
168
+ * @description Configuration for tween-based animations
169
+ */
170
+ export interface TweenConfig {
171
+ /** Duration in seconds */
172
+ duration: number;
173
+ /** Easing function name */
174
+ ease: "linear" | "easeIn" | "easeOut" | "easeInOut";
175
+ }
176
+ /**
177
+ * Animation configuration union type
178
+ * @interface AnimationConfig
179
+ * @description Complete animation configuration options
180
+ */
181
+ export interface AnimationConfig {
182
+ /** Type of animation to use */
183
+ type: AnimationType;
184
+ /** Spring configuration (when type is SPRING) */
185
+ spring?: SpringConfig;
186
+ /** Tween configuration (when type is TWEEN) */
187
+ tween?: TweenConfig;
188
+ /** Scale factor for press animation */
189
+ pressScale?: number;
190
+ /** Scale factor for hover animation */
191
+ hoverScale?: number;
192
+ }
193
+ /**
194
+ * Glassmorphism style configuration
195
+ * @interface GlassConfig
196
+ * @description Configuration for glassmorphism visual effects
197
+ */
198
+ export interface GlassConfig {
199
+ /** Blur intensity in pixels */
200
+ blur: BlurIntensity | number;
201
+ /** Saturation percentage (100-200) */
202
+ saturation: number;
203
+ /** Background opacity (0-1) */
204
+ opacity: number;
205
+ /** Border opacity (0-1) */
206
+ borderOpacity: number;
207
+ }
208
+ /**
209
+ * Base props shared by all MobileBottomNav components
210
+ * @interface BaseNavProps
211
+ * @description Common properties for navigation components
212
+ */
213
+ export interface BaseNavProps {
214
+ /** Additional CSS classes */
215
+ className?: string;
216
+ /** Inline styles */
217
+ style?: React.CSSProperties;
218
+ /** Test ID for testing */
219
+ "data-testid"?: string;
220
+ }
221
+ /**
222
+ * Motion-specific props for components using Framer Motion
223
+ * @interface MotionProps
224
+ * @description Props that are specific to Framer Motion components
225
+ */
226
+ export interface MotionProps {
227
+ onDrag?: (event: MouseEvent | TouchEvent | PointerEvent, info: any) => void;
228
+ onDragStart?: (event: MouseEvent | TouchEvent | PointerEvent, info: any) => void;
229
+ onDragEnd?: (event: MouseEvent | TouchEvent | PointerEvent, info: any) => void;
230
+ drag?: boolean | "x" | "y";
231
+ dragConstraints?: any;
232
+ dragMomentum?: boolean;
233
+ dragElastic?: boolean;
234
+ dragPropagation?: boolean;
235
+ dragTransition?: any;
236
+ whileTap?: any;
237
+ whileHover?: any;
238
+ animate?: any;
239
+ initial?: any;
240
+ exit?: any;
241
+ transition?: any;
242
+ }
243
+ /**
244
+ * Root component props
245
+ * @interface RootProps
246
+ * @description Properties for the MobileBottomNav.Root component
247
+ */
248
+ export interface RootProps extends BaseNavProps, Omit<HTMLAttributes<HTMLElement>, "className" | "style" | keyof MotionProps> {
249
+ /** Child components (NavList, custom content) */
250
+ children: ReactNode;
251
+ /** Visual variant of the navigation */
252
+ variant?: NavVariant;
253
+ /** Size preset */
254
+ size?: NavSize;
255
+ /** Z-index level */
256
+ zIndex?: ZIndexLevel | number;
257
+ /** Show/hide the navigation */
258
+ visible?: boolean;
259
+ /** Glassmorphism configuration (only for GLASS variant) */
260
+ glassConfig?: Partial<GlassConfig>;
261
+ /** Animation configuration */
262
+ animationConfig?: Partial<AnimationConfig>;
263
+ /** ARIA label for accessibility */
264
+ "aria-label"?: string;
265
+ /** Use full width container (adds max-width and centers) */
266
+ full?: boolean;
267
+ /** Border radius preset or custom value */
268
+ rounded?: NavBorderRadius | number;
269
+ /** Gap between nav items (uses NavGap enum or custom rem value) */
270
+ gap?: NavGap | number;
271
+ }
272
+ /**
273
+ * Props for the NavList component
274
+ * @interface NavListProps
275
+ * @extends {BaseNavProps}
276
+ * @description Configuration for the navigation items container
277
+ */
278
+ export interface NavListProps extends BaseNavProps, Omit<ComponentPropsWithoutRef<"ul">, "className" | "style"> {
279
+ /** NavItem children */
280
+ children: ReactNode;
281
+ /** Gap between items (in rem or px) */
282
+ gap?: number;
283
+ /** Justify content alignment */
284
+ justify?: "start" | "center" | "end" | "around" | "between" | "evenly";
285
+ }
286
+ /**
287
+ * Props for the NavItem component
288
+ * @interface NavItemProps
289
+ * @extends {BaseNavProps}
290
+ * @extends {Omit<ComponentPropsWithoutRef<"button">, "className" | "style" | "children">}
291
+ * @description Configuration for individual navigation items
292
+ */
293
+ export interface NavItemProps extends BaseNavProps, Omit<ComponentPropsWithoutRef<"button">, "className" | "style" | "children"> {
294
+ /** Icon element to display */
295
+ icon: ReactNode;
296
+ /** Label text */
297
+ label: string;
298
+ /** Current state of the item */
299
+ state?: NavItemState;
300
+ /** Label position relative to icon */
301
+ labelPosition?: LabelPosition;
302
+ /** Click handler */
303
+ onClick?: () => void;
304
+ /** Href for navigation (renders as anchor) */
305
+ href?: string;
306
+ /** Icon size */
307
+ iconSize?: IconSize | number;
308
+ /** Show badge indicator */
309
+ badge?: ReactNode;
310
+ /** Accessible name override */
311
+ "aria-label"?: string;
312
+ }
313
+ /**
314
+ * Navigation context value
315
+ * @interface NavContextValue
316
+ * @description Shared context for navigation components
317
+ */
318
+ export interface NavContextValue {
319
+ /** Current variant */
320
+ variant: NavVariant;
321
+ /** Current size */
322
+ size: NavSize;
323
+ /** Animation configuration */
324
+ animationConfig: AnimationConfig;
325
+ /** Gap between items (inherited from Root) */
326
+ gap?: NavGap | number;
327
+ /** Currently active item ID */
328
+ activeItemId?: string;
329
+ /** Callback to set active item */
330
+ setActiveItem?: (id: string) => void;
331
+ }
332
+ /**
333
+ * Default spring animation configuration
334
+ * @constant
335
+ */
336
+ export declare const DEFAULT_SPRING_CONFIG: SpringConfig;
337
+ /**
338
+ * Default tween animation configuration
339
+ * @constant
340
+ */
341
+ export declare const DEFAULT_TWEEN_CONFIG: TweenConfig;
342
+ /**
343
+ * Default animation configuration
344
+ * @constant
345
+ */
346
+ export declare const DEFAULT_ANIMATION_CONFIG: AnimationConfig;
347
+ /**
348
+ * Default glassmorphism configuration
349
+ * @constant
350
+ */
351
+ export declare const DEFAULT_GLASS_CONFIG: GlassConfig;
352
+ /**
353
+ * Extract the value type from an enum
354
+ * @template T - Enum type
355
+ */
356
+ export type EnumValue<T> = T[keyof T];
357
+ /**
358
+ * Make specific keys optional
359
+ * @template T - Base type
360
+ * @template K - Keys to make optional
361
+ */
362
+ export type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
363
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/BottomNavBar/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,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EAAE,CAAC,CAAC,CAAC,CAAA"}
@@ -0,0 +1,74 @@
1
+ import type React from "react";
2
+ /**
3
+ * iOS version detection result
4
+ * @interface IOSVersion
5
+ */
6
+ interface IOSVersion {
7
+ /** Whether the device is running iOS */
8
+ isIOS: boolean;
9
+ /** Whether the browser is Safari */
10
+ isSafari: boolean;
11
+ /** Major iOS version number (e.g., 26 for iOS 26) */
12
+ majorVersion: number | null;
13
+ /** Minor iOS version number */
14
+ minorVersion: number | null;
15
+ /** Whether this is iOS 26 or later with known bugs */
16
+ hasViewportBugs: boolean;
17
+ }
18
+ /**
19
+ * Detects iOS version and Safari browser
20
+ * @returns {IOSVersion} iOS detection result
21
+ */
22
+ export declare function detectIOSVersion(): IOSVersion;
23
+ /**
24
+ * Configuration for iOS Safari fix
25
+ * @interface IOSSafariFixConfig
26
+ */
27
+ export interface IOSSafariFixConfig {
28
+ /** Enable scroll-based body fix (moves scroll from window to body) */
29
+ enableScrollFix?: boolean;
30
+ /** Enable keyboard visibility detection */
31
+ enableKeyboardFix?: boolean;
32
+ /** Callback when keyboard visibility changes */
33
+ onKeyboardVisibilityChange?: (visible: boolean) => void;
34
+ /** Enable debug logging */
35
+ debug?: boolean;
36
+ }
37
+ /**
38
+ * Hook to apply iOS Safari viewport bug fixes
39
+ *
40
+ * @param {IOSSafariFixConfig} config - Configuration options
41
+ * @returns {{ isKeyboardVisible: boolean; iosInfo: IOSVersion }} Hook state
42
+ *
43
+ * @example
44
+ * ```tsx
45
+ * const { isKeyboardVisible, iosInfo } = useIOSSafariFix({
46
+ * enableScrollFix: true,
47
+ * enableKeyboardFix: true,
48
+ * onKeyboardVisibilityChange: (visible) => console.log('Keyboard:', visible)
49
+ * });
50
+ * ```
51
+ */
52
+ export declare function useIOSSafariFix(config?: IOSSafariFixConfig): {
53
+ isKeyboardVisible: boolean;
54
+ iosInfo: IOSVersion;
55
+ };
56
+ /**
57
+ * Hook to force reset fixed element positioning after iOS viewport bugs
58
+ *
59
+ * @param {React.RefObject<HTMLElement>} elementRef - Ref to the fixed element
60
+ * @returns {{ forceReset: () => void }} Reset function
61
+ *
62
+ * @example
63
+ * ```tsx
64
+ * const navRef = useRef<HTMLElement>(null);
65
+ * const { forceReset } = useIOSFixedReset(navRef);
66
+ *
67
+ * // Call forceReset() after keyboard dismissal or scroll issues
68
+ * ```
69
+ */
70
+ export declare function useIOSFixedReset(elementRef: React.RefObject<HTMLElement | null>): {
71
+ forceReset: () => void;
72
+ };
73
+ export default useIOSSafariFix;
74
+ //# sourceMappingURL=useIOSSafariFix.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useIOSSafariFix.d.ts","sourceRoot":"","sources":["../../../src/components/BottomNavBar/useIOSSafariFix.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAmB9B;;;GAGG;AACH,UAAU,UAAU;IAClB,wCAAwC;IACxC,KAAK,EAAE,OAAO,CAAA;IACd,oCAAoC;IACpC,QAAQ,EAAE,OAAO,CAAA;IACjB,qDAAqD;IACrD,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,+BAA+B;IAC/B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,sDAAsD;IACtD,eAAe,EAAE,OAAO,CAAA;CACzB;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,UAAU,CAoC7C;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,sEAAsE;IACtE,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,2CAA2C;IAC3C,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,gDAAgD;IAChD,0BAA0B,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;IACvD,2BAA2B;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAAC,MAAM,GAAE,kBAAuB;;;EAyI9D;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC;;EAkB/E;AAED,eAAe,eAAe,CAAA"}