@causw/core 0.0.11 → 0.0.13

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/dist/components/Avatar/Avatar.d.cts +2 -2
  2. package/dist/components/Avatar/Avatar.d.mts +2 -2
  3. package/dist/components/Avatar/Avatar.styles.d.cts +3 -3
  4. package/dist/components/Avatar/Avatar.styles.d.cts.map +1 -1
  5. package/dist/components/Avatar/Avatar.styles.d.mts +3 -3
  6. package/dist/components/BottomNavigation/BottomNavigation.cjs +78 -0
  7. package/dist/components/BottomNavigation/BottomNavigation.d.cts +48 -0
  8. package/dist/components/BottomNavigation/BottomNavigation.d.cts.map +1 -0
  9. package/dist/components/BottomNavigation/BottomNavigation.d.mts +49 -0
  10. package/dist/components/BottomNavigation/BottomNavigation.d.mts.map +1 -0
  11. package/dist/components/BottomNavigation/BottomNavigation.mjs +78 -0
  12. package/dist/components/BottomNavigation/BottomNavigation.mjs.map +1 -0
  13. package/dist/components/BottomNavigation/BottomNavigation.styles.cjs +26 -0
  14. package/dist/components/BottomNavigation/BottomNavigation.styles.d.cts +57 -0
  15. package/dist/components/BottomNavigation/BottomNavigation.styles.d.cts.map +1 -0
  16. package/dist/components/BottomNavigation/BottomNavigation.styles.d.mts +57 -0
  17. package/dist/components/BottomNavigation/BottomNavigation.styles.d.mts.map +1 -0
  18. package/dist/components/BottomNavigation/BottomNavigation.styles.mjs +26 -0
  19. package/dist/components/BottomNavigation/BottomNavigation.styles.mjs.map +1 -0
  20. package/dist/components/BottomNavigation/hooks/useBottomNavigationContext.cjs +22 -0
  21. package/dist/components/BottomNavigation/hooks/useBottomNavigationContext.mjs +19 -0
  22. package/dist/components/BottomNavigation/hooks/useBottomNavigationContext.mjs.map +1 -0
  23. package/dist/components/BottomNavigation/index.d.mts +1 -0
  24. package/dist/components/BottomSheet/BottomSheet.cjs +94 -0
  25. package/dist/components/BottomSheet/BottomSheet.d.cts +69 -0
  26. package/dist/components/BottomSheet/BottomSheet.d.cts.map +1 -0
  27. package/dist/components/BottomSheet/BottomSheet.d.mts +69 -0
  28. package/dist/components/BottomSheet/BottomSheet.d.mts.map +1 -0
  29. package/dist/components/BottomSheet/BottomSheet.mjs +93 -0
  30. package/dist/components/BottomSheet/BottomSheet.mjs.map +1 -0
  31. package/dist/components/BottomSheet/BottomSheet.styles.cjs +21 -0
  32. package/dist/components/BottomSheet/BottomSheet.styles.d.cts +54 -0
  33. package/dist/components/BottomSheet/BottomSheet.styles.d.cts.map +1 -0
  34. package/dist/components/BottomSheet/BottomSheet.styles.d.mts +54 -0
  35. package/dist/components/BottomSheet/BottomSheet.styles.d.mts.map +1 -0
  36. package/dist/components/BottomSheet/BottomSheet.styles.mjs +21 -0
  37. package/dist/components/BottomSheet/BottomSheet.styles.mjs.map +1 -0
  38. package/dist/components/BottomSheet/index.d.mts +1 -0
  39. package/dist/components/Box/Box.styles.d.cts +3 -3
  40. package/dist/components/Box/Box.styles.d.cts.map +1 -1
  41. package/dist/components/Button/Button.d.cts +2 -2
  42. package/dist/components/Button/Button.styles.d.mts +3 -3
  43. package/dist/components/CTAButton/CTAButton.d.cts +2 -2
  44. package/dist/components/CTAButton/CTAButton.styles.d.mts +3 -3
  45. package/dist/components/Calendar/Calendar.cjs +191 -0
  46. package/dist/components/Calendar/Calendar.d.cts +40 -0
  47. package/dist/components/Calendar/Calendar.d.cts.map +1 -0
  48. package/dist/components/Calendar/Calendar.d.mts +40 -0
  49. package/dist/components/Calendar/Calendar.d.mts.map +1 -0
  50. package/dist/components/Calendar/Calendar.mjs +190 -0
  51. package/dist/components/Calendar/Calendar.mjs.map +1 -0
  52. package/dist/components/Calendar/Calendar.styles.cjs +121 -0
  53. package/dist/components/Calendar/Calendar.styles.d.cts +269 -0
  54. package/dist/components/Calendar/Calendar.styles.d.cts.map +1 -0
  55. package/dist/components/Calendar/Calendar.styles.d.mts +269 -0
  56. package/dist/components/Calendar/Calendar.styles.d.mts.map +1 -0
  57. package/dist/components/Calendar/Calendar.styles.mjs +120 -0
  58. package/dist/components/Calendar/Calendar.styles.mjs.map +1 -0
  59. package/dist/components/Calendar/index.d.mts +1 -0
  60. package/dist/components/Checkbox/Checkbox.d.cts +4 -4
  61. package/dist/components/Checkbox/Checkbox.d.cts.map +1 -1
  62. package/dist/components/Checkbox/Checkbox.d.mts +4 -4
  63. package/dist/components/Checkbox/Checkbox.d.mts.map +1 -1
  64. package/dist/components/Checkbox/Checkbox.styles.d.cts +3 -3
  65. package/dist/components/Checkbox/Checkbox.styles.d.mts +3 -3
  66. package/dist/components/Chip/Chip.d.cts +2 -2
  67. package/dist/components/Chip/Chip.d.mts +2 -2
  68. package/dist/components/Chip/Chip.styles.d.cts +3 -3
  69. package/dist/components/Chip/Chip.styles.d.cts.map +1 -1
  70. package/dist/components/Chip/Chip.styles.d.mts +3 -3
  71. package/dist/components/Dialog/Dialog.d.cts +13 -13
  72. package/dist/components/Drawer/Drawer.cjs +41 -0
  73. package/dist/components/Drawer/Drawer.d.cts +29 -0
  74. package/dist/components/Drawer/Drawer.d.cts.map +1 -0
  75. package/dist/components/Drawer/Drawer.d.mts +29 -0
  76. package/dist/components/Drawer/Drawer.d.mts.map +1 -0
  77. package/dist/components/Drawer/Drawer.mjs +40 -0
  78. package/dist/components/Drawer/Drawer.mjs.map +1 -0
  79. package/dist/components/Drawer/Drawer.styles.cjs +23 -0
  80. package/dist/components/Drawer/Drawer.styles.d.cts +36 -0
  81. package/dist/components/Drawer/Drawer.styles.d.cts.map +1 -0
  82. package/dist/components/Drawer/Drawer.styles.d.mts +36 -0
  83. package/dist/components/Drawer/Drawer.styles.d.mts.map +1 -0
  84. package/dist/components/Drawer/Drawer.styles.mjs +23 -0
  85. package/dist/components/Drawer/Drawer.styles.mjs.map +1 -0
  86. package/dist/components/Drawer/index.d.mts +1 -0
  87. package/dist/components/Dropdown/Dropdown.d.cts +3 -3
  88. package/dist/components/Dropdown/Dropdown.d.mts +3 -3
  89. package/dist/components/Dropdown/Dropdown.styles.d.cts +3 -3
  90. package/dist/components/Dropdown/Dropdown.styles.d.mts +3 -3
  91. package/dist/components/Field/Field.d.cts +5 -5
  92. package/dist/components/Field/Field.d.cts.map +1 -1
  93. package/dist/components/Float/Float.styles.d.cts +3 -3
  94. package/dist/components/Float/Float.styles.d.mts +3 -3
  95. package/dist/components/FloatingActionButton/FloatingActionButton.d.cts +2 -2
  96. package/dist/components/FloatingActionButton/FloatingActionButton.d.mts +2 -2
  97. package/dist/components/FloatingActionButton/FloatingActionButton.styles.d.cts +3 -3
  98. package/dist/components/FloatingActionButton/FloatingActionButton.styles.d.mts +3 -3
  99. package/dist/components/Grid/Grid.styles.d.cts +3 -3
  100. package/dist/components/Grid/Grid.styles.d.mts +3 -3
  101. package/dist/components/HStack/HStack.d.cts +2 -2
  102. package/dist/components/HStack/HStack.d.mts +2 -2
  103. package/dist/components/Modal/Modal.d.cts +7 -7
  104. package/dist/components/Modal/Modal.d.mts +7 -7
  105. package/dist/components/Modal/Modal.styles.d.cts +3 -3
  106. package/dist/components/Modal/Modal.styles.d.mts +3 -3
  107. package/dist/components/Primitive/Primitive.d.cts +16 -16
  108. package/dist/components/Radio/Radio.d.cts +3 -3
  109. package/dist/components/RatioChart/RatioChart.d.cts +5 -5
  110. package/dist/components/RatioChart/RatioChart.d.mts +5 -5
  111. package/dist/components/RatioChart/RatioChartEditor.d.cts +2 -2
  112. package/dist/components/RatioChart/RatioChartEditor.d.mts +2 -2
  113. package/dist/components/Select/Select.d.cts +5 -5
  114. package/dist/components/Select/Select.d.mts +5 -5
  115. package/dist/components/Select/Select.styles.d.cts +3 -3
  116. package/dist/components/Select/Select.styles.d.mts +3 -3
  117. package/dist/components/Select/Select.styles.d.mts.map +1 -1
  118. package/dist/components/Separator/Separator.styles.d.cts +3 -3
  119. package/dist/components/Separator/Separator.styles.d.mts +3 -3
  120. package/dist/components/Separator/Separator.styles.d.mts.map +1 -1
  121. package/dist/components/Sidebar/Sidebar.cjs +95 -0
  122. package/dist/components/Sidebar/Sidebar.d.cts +64 -0
  123. package/dist/components/Sidebar/Sidebar.d.cts.map +1 -0
  124. package/dist/components/Sidebar/Sidebar.d.mts +65 -0
  125. package/dist/components/Sidebar/Sidebar.d.mts.map +1 -0
  126. package/dist/components/Sidebar/Sidebar.mjs +95 -0
  127. package/dist/components/Sidebar/Sidebar.mjs.map +1 -0
  128. package/dist/components/Sidebar/Sidebar.styles.cjs +32 -0
  129. package/dist/components/Sidebar/Sidebar.styles.d.cts +75 -0
  130. package/dist/components/Sidebar/Sidebar.styles.d.cts.map +1 -0
  131. package/dist/components/Sidebar/Sidebar.styles.d.mts +75 -0
  132. package/dist/components/Sidebar/Sidebar.styles.d.mts.map +1 -0
  133. package/dist/components/Sidebar/Sidebar.styles.mjs +32 -0
  134. package/dist/components/Sidebar/Sidebar.styles.mjs.map +1 -0
  135. package/dist/components/Sidebar/hooks/useSidebarContext.cjs +22 -0
  136. package/dist/components/Sidebar/hooks/useSidebarContext.d.cts +5 -0
  137. package/dist/components/Sidebar/hooks/useSidebarContext.d.cts.map +1 -0
  138. package/dist/components/Sidebar/hooks/useSidebarContext.d.mts +7 -0
  139. package/dist/components/Sidebar/hooks/useSidebarContext.d.mts.map +1 -0
  140. package/dist/components/Sidebar/hooks/useSidebarContext.mjs +19 -0
  141. package/dist/components/Sidebar/hooks/useSidebarContext.mjs.map +1 -0
  142. package/dist/components/Sidebar/index.d.mts +2 -0
  143. package/dist/components/Spacer/Spacer.styles.d.cts +3 -3
  144. package/dist/components/Spacer/Spacer.styles.d.mts +3 -3
  145. package/dist/components/Stack/Stack.styles.d.cts +3 -3
  146. package/dist/components/Stack/Stack.styles.d.cts.map +1 -1
  147. package/dist/components/Tab/Tab.d.cts +6 -6
  148. package/dist/components/Tab/Tab.d.mts +6 -6
  149. package/dist/components/Tab/Tab.styles.d.cts +3 -3
  150. package/dist/components/Tab/Tab.styles.d.mts +3 -3
  151. package/dist/components/Text/Text.d.cts +1 -1
  152. package/dist/components/Text/Text.d.mts +1 -1
  153. package/dist/components/Text/Text.styles.d.mts +3 -3
  154. package/dist/components/TextArea/TextArea.d.cts +4 -4
  155. package/dist/components/TextArea/TextArea.d.mts +4 -4
  156. package/dist/components/TextArea/TextArea.styles.d.mts +3 -3
  157. package/dist/components/TextInput/TextInput.d.cts +2 -2
  158. package/dist/components/TextInput/TextInput.d.mts +2 -2
  159. package/dist/components/TextInput/TextInput.styles.d.mts +3 -3
  160. package/dist/components/Toast/Toast.d.cts +5 -5
  161. package/dist/components/Toast/Toast.d.cts.map +1 -1
  162. package/dist/components/Toast/Toast.d.mts +3 -3
  163. package/dist/components/Toast/Toast.styles.d.cts +3 -3
  164. package/dist/components/Toast/Toast.styles.d.mts +3 -3
  165. package/dist/components/Toggle/Toggle.d.cts +4 -4
  166. package/dist/components/Toggle/Toggle.d.mts +4 -4
  167. package/dist/components/Toggle/Toggle.d.mts.map +1 -1
  168. package/dist/components/Toggle/Toggle.styles.d.mts +3 -3
  169. package/dist/components/VStack/VStack.d.cts +2 -2
  170. package/dist/components/VStack/VStack.d.mts +2 -2
  171. package/dist/components/index.d.mts +12 -1
  172. package/dist/hooks/bottomSheet/useBottomSheet.cjs +15 -0
  173. package/dist/hooks/bottomSheet/useBottomSheet.mjs +13 -0
  174. package/dist/hooks/bottomSheet/useBottomSheet.mjs.map +1 -0
  175. package/dist/index.cjs +10 -0
  176. package/dist/index.d.cts +7 -1
  177. package/dist/index.d.mts +7 -1
  178. package/dist/index.mjs +6 -1
  179. package/package.json +2 -2
@@ -1,7 +1,7 @@
1
1
  import { PrimitiveProps } from "../Primitive/Primitive.cjs";
2
2
  import { AvatarVariants } from "./Avatar.styles.cjs";
3
3
  import * as React$1 from "react";
4
- import * as react_jsx_runtime29 from "react/jsx-runtime";
4
+ import * as react_jsx_runtime36 from "react/jsx-runtime";
5
5
 
6
6
  //#region src/components/Avatar/Avatar.d.ts
7
7
  interface AvatarProps extends Omit<React$1.ComponentPropsWithoutRef<'span'>, 'alt'>, PrimitiveProps, AvatarVariants {
@@ -17,7 +17,7 @@ declare const Avatar: {
17
17
  className,
18
18
  fallback,
19
19
  ...props
20
- }: AvatarProps): react_jsx_runtime29.JSX.Element;
20
+ }: AvatarProps): react_jsx_runtime36.JSX.Element;
21
21
  displayName: string;
22
22
  };
23
23
  //#endregion
@@ -2,7 +2,7 @@ import { PrimitiveProps } from "../Primitive/Primitive.mjs";
2
2
  import "../Primitive/index.mjs";
3
3
  import { AvatarVariants } from "./Avatar.styles.mjs";
4
4
  import * as React$1 from "react";
5
- import * as react_jsx_runtime33 from "react/jsx-runtime";
5
+ import * as react_jsx_runtime49 from "react/jsx-runtime";
6
6
 
7
7
  //#region src/components/Avatar/Avatar.d.ts
8
8
  interface AvatarProps extends Omit<React$1.ComponentPropsWithoutRef<'span'>, 'alt'>, PrimitiveProps, AvatarVariants {
@@ -18,7 +18,7 @@ declare const Avatar: {
18
18
  className,
19
19
  fallback,
20
20
  ...props
21
- }: AvatarProps): react_jsx_runtime33.JSX.Element;
21
+ }: AvatarProps): react_jsx_runtime49.JSX.Element;
22
22
  displayName: string;
23
23
  };
24
24
  //#endregion
@@ -1,8 +1,8 @@
1
- import * as tailwind_variants9 from "tailwind-variants";
1
+ import * as tailwind_variants19 from "tailwind-variants";
2
2
  import { VariantProps } from "tailwind-variants";
3
3
 
4
4
  //#region src/components/Avatar/Avatar.styles.d.ts
5
- declare const avatar: tailwind_variants9.TVReturnType<{
5
+ declare const avatar: tailwind_variants19.TVReturnType<{
6
6
  size: {
7
7
  xs: {
8
8
  root: string;
@@ -46,7 +46,7 @@ declare const avatar: tailwind_variants9.TVReturnType<{
46
46
  root: string;
47
47
  image: string;
48
48
  fallback: string;
49
- }, tailwind_variants9.TVReturnType<{
49
+ }, tailwind_variants19.TVReturnType<{
50
50
  size: {
51
51
  xs: {
52
52
  root: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.styles.d.cts","names":[],"sources":["../../../src/components/Avatar/Avatar.styles.ts"],"mappings":";;;;cAEa,MAAA,EA6BX,kBAAA,CA7BiB,YAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BjB,kBAAA,CAAA,YAAA;;;;;;;;;;;;;;;;;;;;;;;KAEU,cAAA,GAAiB,YAAA,QAAoB,MAAA"}
1
+ {"version":3,"file":"Avatar.styles.d.cts","names":[],"sources":["../../../src/components/Avatar/Avatar.styles.ts"],"mappings":";;;;cAEa,MAAA,EA6BX,mBAAA,CA7BiB,YAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BjB,mBAAA,CAAA,YAAA;;;;;;;;;;;;;;;;;;;;;;;KAEU,cAAA,GAAiB,YAAA,QAAoB,MAAA"}
@@ -1,8 +1,8 @@
1
- import * as tailwind_variants15 from "tailwind-variants";
1
+ import * as tailwind_variants25 from "tailwind-variants";
2
2
  import { VariantProps } from "tailwind-variants";
3
3
 
4
4
  //#region src/components/Avatar/Avatar.styles.d.ts
5
- declare const avatar: tailwind_variants15.TVReturnType<{
5
+ declare const avatar: tailwind_variants25.TVReturnType<{
6
6
  size: {
7
7
  xs: {
8
8
  root: string;
@@ -46,7 +46,7 @@ declare const avatar: tailwind_variants15.TVReturnType<{
46
46
  root: string;
47
47
  image: string;
48
48
  fallback: string;
49
- }, tailwind_variants15.TVReturnType<{
49
+ }, tailwind_variants25.TVReturnType<{
50
50
  size: {
51
51
  xs: {
52
52
  root: string;
@@ -0,0 +1,78 @@
1
+ 'use client';
2
+
3
+ const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
4
+ const require_Primitive = require('../Primitive/Primitive.cjs');
5
+ const require_BottomNavigation_styles = require('./BottomNavigation.styles.cjs');
6
+ const require_useBottomNavigationContext = require('./hooks/useBottomNavigationContext.cjs');
7
+ let react_jsx_runtime = require("react/jsx-runtime");
8
+
9
+ //#region src/components/BottomNavigation/BottomNavigation.tsx
10
+ const BottomNavigationRoot = ({ children, selected, onSelectChange, ...props }) => {
11
+ const { root } = require_BottomNavigation_styles.bottomNavigation();
12
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_useBottomNavigationContext.BottomNavigationContext.Provider, {
13
+ value: {
14
+ selected,
15
+ onSelectChange
16
+ },
17
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Primitive.Primitive.nav, {
18
+ className: root(),
19
+ ...props,
20
+ children
21
+ })
22
+ });
23
+ };
24
+ const BottomNavigationItem = ({ selected, value, children, onClick, ...props }) => {
25
+ const rootContext = require_useBottomNavigationContext.useBottomNavigationContext();
26
+ const isSelected = selected ?? (rootContext.selected !== void 0 && value !== void 0 ? rootContext.selected === value : false);
27
+ const { item } = require_BottomNavigation_styles.bottomNavigation({
28
+ selected: isSelected,
29
+ ...props
30
+ });
31
+ const handleClick = (e) => {
32
+ onClick?.(e);
33
+ if (!e.defaultPrevented && rootContext.onSelectChange && value !== void 0) rootContext.onSelectChange(value);
34
+ };
35
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_useBottomNavigationContext.BottomNavigationItemContext.Provider, {
36
+ value: { selected: isSelected },
37
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Primitive.Primitive.button, {
38
+ type: "button",
39
+ className: item(),
40
+ onClick: handleClick,
41
+ ...props,
42
+ children
43
+ })
44
+ });
45
+ };
46
+ const BottomNavigationIcon = ({ children, selected, ...props }) => {
47
+ const itemContext = require_useBottomNavigationContext.useBottomNavigationItemContext();
48
+ const { icon } = require_BottomNavigation_styles.bottomNavigation({
49
+ selected: selected ?? itemContext.selected,
50
+ ...props
51
+ });
52
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Primitive.Primitive.svg, {
53
+ asChild: true,
54
+ className: icon(),
55
+ ...props,
56
+ children
57
+ });
58
+ };
59
+ const BottomNavigationLabel = ({ children, selected, ...props }) => {
60
+ const itemContext = require_useBottomNavigationContext.useBottomNavigationItemContext();
61
+ const { label } = require_BottomNavigation_styles.bottomNavigation({
62
+ selected: selected ?? itemContext.selected,
63
+ ...props
64
+ });
65
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Primitive.Primitive.span, {
66
+ className: label(),
67
+ ...props,
68
+ children
69
+ });
70
+ };
71
+ const BottomNavigation = Object.assign(BottomNavigationRoot, {
72
+ Item: BottomNavigationItem,
73
+ Icon: BottomNavigationIcon,
74
+ Label: BottomNavigationLabel
75
+ });
76
+
77
+ //#endregion
78
+ exports.BottomNavigation = BottomNavigation;
@@ -0,0 +1,48 @@
1
+ import { PrimitiveProps } from "../Primitive/Primitive.cjs";
2
+ import { BottomNavigationVariants } from "./BottomNavigation.styles.cjs";
3
+ import { ComponentProps, SVGProps } from "react";
4
+ import * as react_jsx_runtime74 from "react/jsx-runtime";
5
+
6
+ //#region src/components/BottomNavigation/BottomNavigation.d.ts
7
+ interface BottomNavigationRootProps extends ComponentProps<'nav'>, PrimitiveProps {
8
+ selected?: string;
9
+ onSelectChange?: (value: string) => void;
10
+ }
11
+ interface BottomNavigationItemProps extends ComponentProps<'button'>, PrimitiveProps, Omit<BottomNavigationVariants, 'selected'> {
12
+ value?: string;
13
+ selected?: boolean;
14
+ children: React.ReactNode;
15
+ }
16
+ interface BottomNavigationIconProps extends SVGProps<SVGSVGElement>, PrimitiveProps, BottomNavigationVariants {
17
+ children: React.ReactNode;
18
+ }
19
+ interface BottomNavigationLabelProps extends ComponentProps<'span'>, PrimitiveProps, BottomNavigationVariants {
20
+ children: React.ReactNode;
21
+ }
22
+ declare const BottomNavigation: (({
23
+ children,
24
+ selected,
25
+ onSelectChange,
26
+ ...props
27
+ }: BottomNavigationRootProps) => react_jsx_runtime74.JSX.Element) & {
28
+ Item: ({
29
+ selected,
30
+ value,
31
+ children,
32
+ onClick,
33
+ ...props
34
+ }: BottomNavigationItemProps) => react_jsx_runtime74.JSX.Element;
35
+ Icon: ({
36
+ children,
37
+ selected,
38
+ ...props
39
+ }: BottomNavigationIconProps) => react_jsx_runtime74.JSX.Element;
40
+ Label: ({
41
+ children,
42
+ selected,
43
+ ...props
44
+ }: BottomNavigationLabelProps) => react_jsx_runtime74.JSX.Element;
45
+ };
46
+ //#endregion
47
+ export { BottomNavigation };
48
+ //# sourceMappingURL=BottomNavigation.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BottomNavigation.d.cts","names":[],"sources":["../../../src/components/BottomNavigation/BottomNavigation.tsx"],"mappings":";;;;;;UAgBiB,yBAAA,SACP,cAAA,SAAuB,cAAA;EAC/B,QAAA;EACA,cAAA,IAAkB,KAAA;AAAA;AAAA,UAmBV,yBAAA,SAEN,cAAA,YACA,cAAA,EACA,IAAA,CAAK,wBAAA;EACP,KAAA;EACA,QAAA;EACA,QAAA,EAAU,KAAA,CAAM,SAAA;AAAA;AAAA,UA6CR,yBAAA,SACA,QAAA,CAAS,aAAA,GAAgB,cAAA,EAAgB,wBAAA;EACjD,QAAA,EAAU,KAAA,CAAM,SAAA;AAAA;AAAA,UAoBR,0BAAA,SACA,cAAA,UAAwB,cAAA,EAAgB,wBAAA;EAChD,QAAA,EAAU,KAAA,CAAM,SAAA;AAAA;AAAA,cAoBL,gBAAA;EAAgB,QAAA;EAAA,QAAA;EAAA,cAAA;EAAA,GAAA;AAAA,GA3G1B,yBAAA,KAAyB,mBAAA,CAAA,GAAA,CAAA,OAAA;;;;;;;KA2BzB,yBAAA,KAAyB,mBAAA,CAAA,GAAA,CAAA,OAAA;;;;;KA6CzB,yBAAA,KAAyB,mBAAA,CAAA,GAAA,CAAA,OAAA;;;;;KAsBzB,0BAAA,KAA0B,mBAAA,CAAA,GAAA,CAAA,OAAA;AAAA"}
@@ -0,0 +1,49 @@
1
+ import { PrimitiveProps } from "../Primitive/Primitive.mjs";
2
+ import "../Primitive/index.mjs";
3
+ import { BottomNavigationVariants } from "./BottomNavigation.styles.mjs";
4
+ import { ComponentProps, SVGProps } from "react";
5
+ import * as react_jsx_runtime72 from "react/jsx-runtime";
6
+
7
+ //#region src/components/BottomNavigation/BottomNavigation.d.ts
8
+ interface BottomNavigationRootProps extends ComponentProps<'nav'>, PrimitiveProps {
9
+ selected?: string;
10
+ onSelectChange?: (value: string) => void;
11
+ }
12
+ interface BottomNavigationItemProps extends ComponentProps<'button'>, PrimitiveProps, Omit<BottomNavigationVariants, 'selected'> {
13
+ value?: string;
14
+ selected?: boolean;
15
+ children: React.ReactNode;
16
+ }
17
+ interface BottomNavigationIconProps extends SVGProps<SVGSVGElement>, PrimitiveProps, BottomNavigationVariants {
18
+ children: React.ReactNode;
19
+ }
20
+ interface BottomNavigationLabelProps extends ComponentProps<'span'>, PrimitiveProps, BottomNavigationVariants {
21
+ children: React.ReactNode;
22
+ }
23
+ declare const BottomNavigation: (({
24
+ children,
25
+ selected,
26
+ onSelectChange,
27
+ ...props
28
+ }: BottomNavigationRootProps) => react_jsx_runtime72.JSX.Element) & {
29
+ Item: ({
30
+ selected,
31
+ value,
32
+ children,
33
+ onClick,
34
+ ...props
35
+ }: BottomNavigationItemProps) => react_jsx_runtime72.JSX.Element;
36
+ Icon: ({
37
+ children,
38
+ selected,
39
+ ...props
40
+ }: BottomNavigationIconProps) => react_jsx_runtime72.JSX.Element;
41
+ Label: ({
42
+ children,
43
+ selected,
44
+ ...props
45
+ }: BottomNavigationLabelProps) => react_jsx_runtime72.JSX.Element;
46
+ };
47
+ //#endregion
48
+ export { BottomNavigation };
49
+ //# sourceMappingURL=BottomNavigation.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BottomNavigation.d.mts","names":[],"sources":["../../../src/components/BottomNavigation/BottomNavigation.tsx"],"mappings":";;;;;;;UAgBiB,yBAAA,SACP,cAAA,SAAuB,cAAA;EAC/B,QAAA;EACA,cAAA,IAAkB,KAAA;AAAA;AAAA,UAmBV,yBAAA,SAEN,cAAA,YACA,cAAA,EACA,IAAA,CAAK,wBAAA;EACP,KAAA;EACA,QAAA;EACA,QAAA,EAAU,KAAA,CAAM,SAAA;AAAA;AAAA,UA6CR,yBAAA,SACA,QAAA,CAAS,aAAA,GAAgB,cAAA,EAAgB,wBAAA;EACjD,QAAA,EAAU,KAAA,CAAM,SAAA;AAAA;AAAA,UAoBR,0BAAA,SACA,cAAA,UAAwB,cAAA,EAAgB,wBAAA;EAChD,QAAA,EAAU,KAAA,CAAM,SAAA;AAAA;AAAA,cAoBL,gBAAA;EAAgB,QAAA;EAAA,QAAA;EAAA,cAAA;EAAA,GAAA;AAAA,GA3G1B,yBAAA,KAAyB,mBAAA,CAAA,GAAA,CAAA,OAAA;;;;;;;KA2BzB,yBAAA,KAAyB,mBAAA,CAAA,GAAA,CAAA,OAAA;;;;;KA6CzB,yBAAA,KAAyB,mBAAA,CAAA,GAAA,CAAA,OAAA;;;;;KAsBzB,0BAAA,KAA0B,mBAAA,CAAA,GAAA,CAAA,OAAA;AAAA"}
@@ -0,0 +1,78 @@
1
+ 'use client';
2
+
3
+ import { Primitive } from "../Primitive/Primitive.mjs";
4
+ import { bottomNavigation } from "./BottomNavigation.styles.mjs";
5
+ import { BottomNavigationContext, BottomNavigationItemContext, useBottomNavigationContext, useBottomNavigationItemContext } from "./hooks/useBottomNavigationContext.mjs";
6
+ import { jsx } from "react/jsx-runtime";
7
+
8
+ //#region src/components/BottomNavigation/BottomNavigation.tsx
9
+ const BottomNavigationRoot = ({ children, selected, onSelectChange, ...props }) => {
10
+ const { root } = bottomNavigation();
11
+ return /* @__PURE__ */ jsx(BottomNavigationContext.Provider, {
12
+ value: {
13
+ selected,
14
+ onSelectChange
15
+ },
16
+ children: /* @__PURE__ */ jsx(Primitive.nav, {
17
+ className: root(),
18
+ ...props,
19
+ children
20
+ })
21
+ });
22
+ };
23
+ const BottomNavigationItem = ({ selected, value, children, onClick, ...props }) => {
24
+ const rootContext = useBottomNavigationContext();
25
+ const isSelected = selected ?? (rootContext.selected !== void 0 && value !== void 0 ? rootContext.selected === value : false);
26
+ const { item } = bottomNavigation({
27
+ selected: isSelected,
28
+ ...props
29
+ });
30
+ const handleClick = (e) => {
31
+ onClick?.(e);
32
+ if (!e.defaultPrevented && rootContext.onSelectChange && value !== void 0) rootContext.onSelectChange(value);
33
+ };
34
+ return /* @__PURE__ */ jsx(BottomNavigationItemContext.Provider, {
35
+ value: { selected: isSelected },
36
+ children: /* @__PURE__ */ jsx(Primitive.button, {
37
+ type: "button",
38
+ className: item(),
39
+ onClick: handleClick,
40
+ ...props,
41
+ children
42
+ })
43
+ });
44
+ };
45
+ const BottomNavigationIcon = ({ children, selected, ...props }) => {
46
+ const itemContext = useBottomNavigationItemContext();
47
+ const { icon } = bottomNavigation({
48
+ selected: selected ?? itemContext.selected,
49
+ ...props
50
+ });
51
+ return /* @__PURE__ */ jsx(Primitive.svg, {
52
+ asChild: true,
53
+ className: icon(),
54
+ ...props,
55
+ children
56
+ });
57
+ };
58
+ const BottomNavigationLabel = ({ children, selected, ...props }) => {
59
+ const itemContext = useBottomNavigationItemContext();
60
+ const { label } = bottomNavigation({
61
+ selected: selected ?? itemContext.selected,
62
+ ...props
63
+ });
64
+ return /* @__PURE__ */ jsx(Primitive.span, {
65
+ className: label(),
66
+ ...props,
67
+ children
68
+ });
69
+ };
70
+ const BottomNavigation = Object.assign(BottomNavigationRoot, {
71
+ Item: BottomNavigationItem,
72
+ Icon: BottomNavigationIcon,
73
+ Label: BottomNavigationLabel
74
+ });
75
+
76
+ //#endregion
77
+ export { BottomNavigation };
78
+ //# sourceMappingURL=BottomNavigation.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BottomNavigation.mjs","names":[],"sources":["../../../src/components/BottomNavigation/BottomNavigation.tsx"],"sourcesContent":["'use client';\n\nimport { ComponentProps, SVGProps } from 'react';\nimport {\n bottomNavigation,\n BottomNavigationVariants,\n} from './BottomNavigation.styles';\nimport { Primitive, PrimitiveProps } from '../Primitive';\n\nimport {\n BottomNavigationContext,\n useBottomNavigationContext,\n BottomNavigationItemContext,\n useBottomNavigationItemContext,\n} from './hooks/useBottomNavigationContext';\n\nexport interface BottomNavigationRootProps\n extends ComponentProps<'nav'>, PrimitiveProps {\n selected?: string;\n onSelectChange?: (value: string) => void;\n}\n\nconst BottomNavigationRoot = ({\n children,\n selected,\n onSelectChange,\n ...props\n}: BottomNavigationRootProps) => {\n const { root } = bottomNavigation();\n return (\n <BottomNavigationContext.Provider value={{ selected, onSelectChange }}>\n <Primitive.nav className={root()} {...props}>\n {children}\n </Primitive.nav>\n </BottomNavigationContext.Provider>\n );\n};\n\ninterface BottomNavigationItemProps\n extends\n ComponentProps<'button'>,\n PrimitiveProps,\n Omit<BottomNavigationVariants, 'selected'> {\n value?: string;\n selected?: boolean;\n children: React.ReactNode;\n}\n\nconst BottomNavigationItem = ({\n selected,\n value,\n children,\n onClick,\n ...props\n}: BottomNavigationItemProps) => {\n const rootContext = useBottomNavigationContext();\n\n const isSelected =\n selected ??\n (rootContext.selected !== undefined && value !== undefined\n ? rootContext.selected === value\n : false);\n\n const { item } = bottomNavigation({ selected: isSelected, ...props });\n\n const handleClick = (e: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(e);\n if (\n !e.defaultPrevented &&\n rootContext.onSelectChange &&\n value !== undefined\n ) {\n rootContext.onSelectChange(value);\n }\n };\n\n return (\n <BottomNavigationItemContext.Provider value={{ selected: isSelected }}>\n <Primitive.button\n type=\"button\"\n className={item()}\n onClick={handleClick}\n {...props}\n >\n {children}\n </Primitive.button>\n </BottomNavigationItemContext.Provider>\n );\n};\n\ninterface BottomNavigationIconProps\n extends SVGProps<SVGSVGElement>, PrimitiveProps, BottomNavigationVariants {\n children: React.ReactNode;\n}\n\nconst BottomNavigationIcon = ({\n children,\n selected,\n ...props\n}: BottomNavigationIconProps) => {\n const itemContext = useBottomNavigationItemContext();\n const isSelected = selected ?? itemContext.selected;\n\n const { icon } = bottomNavigation({ selected: isSelected, ...props });\n\n return (\n <Primitive.svg asChild className={icon()} {...props}>\n {children}\n </Primitive.svg>\n );\n};\n\ninterface BottomNavigationLabelProps\n extends ComponentProps<'span'>, PrimitiveProps, BottomNavigationVariants {\n children: React.ReactNode;\n}\n\nconst BottomNavigationLabel = ({\n children,\n selected,\n ...props\n}: BottomNavigationLabelProps) => {\n const itemContext = useBottomNavigationItemContext();\n const isSelected = selected ?? itemContext.selected;\n\n const { label } = bottomNavigation({ selected: isSelected, ...props });\n\n return (\n <Primitive.span className={label()} {...props}>\n {children}\n </Primitive.span>\n );\n};\n\nexport const BottomNavigation = Object.assign(BottomNavigationRoot, {\n Item: BottomNavigationItem,\n Icon: BottomNavigationIcon,\n Label: BottomNavigationLabel,\n});\n"],"mappings":";;;;;;;;AAsBA,MAAM,wBAAwB,EAC5B,UACA,UACA,gBACA,GAAG,YAC4B;CAC/B,MAAM,EAAE,SAAS,kBAAkB;AACnC,QACE,oBAAC,wBAAwB;EAAS,OAAO;GAAE;GAAU;GAAgB;YACnE,oBAAC,UAAU;GAAI,WAAW,MAAM;GAAE,GAAI;GACnC;IACa;GACiB;;AAcvC,MAAM,wBAAwB,EAC5B,UACA,OACA,UACA,SACA,GAAG,YAC4B;CAC/B,MAAM,cAAc,4BAA4B;CAEhD,MAAM,aACJ,aACC,YAAY,aAAa,UAAa,UAAU,SAC7C,YAAY,aAAa,QACzB;CAEN,MAAM,EAAE,SAAS,iBAAiB;EAAE,UAAU;EAAY,GAAG;EAAO,CAAC;CAErE,MAAM,eAAe,MAA2C;AAC9D,YAAU,EAAE;AACZ,MACE,CAAC,EAAE,oBACH,YAAY,kBACZ,UAAU,OAEV,aAAY,eAAe,MAAM;;AAIrC,QACE,oBAAC,4BAA4B;EAAS,OAAO,EAAE,UAAU,YAAY;YACnE,oBAAC,UAAU;GACT,MAAK;GACL,WAAW,MAAM;GACjB,SAAS;GACT,GAAI;GAEH;IACgB;GACkB;;AAS3C,MAAM,wBAAwB,EAC5B,UACA,UACA,GAAG,YAC4B;CAC/B,MAAM,cAAc,gCAAgC;CAGpD,MAAM,EAAE,SAAS,iBAAiB;EAAE,UAFjB,YAAY,YAAY;EAEe,GAAG;EAAO,CAAC;AAErE,QACE,oBAAC,UAAU;EAAI;EAAQ,WAAW,MAAM;EAAE,GAAI;EAC3C;GACa;;AASpB,MAAM,yBAAyB,EAC7B,UACA,UACA,GAAG,YAC6B;CAChC,MAAM,cAAc,gCAAgC;CAGpD,MAAM,EAAE,UAAU,iBAAiB;EAAE,UAFlB,YAAY,YAAY;EAEgB,GAAG;EAAO,CAAC;AAEtE,QACE,oBAAC,UAAU;EAAK,WAAW,OAAO;EAAE,GAAI;EACrC;GACc;;AAIrB,MAAa,mBAAmB,OAAO,OAAO,sBAAsB;CAClE,MAAM;CACN,MAAM;CACN,OAAO;CACR,CAAC"}
@@ -0,0 +1,26 @@
1
+ const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
+ let tailwind_variants = require("tailwind-variants");
3
+
4
+ //#region src/components/BottomNavigation/BottomNavigation.styles.ts
5
+ const bottomNavigation = (0, tailwind_variants.tv)({
6
+ slots: {
7
+ root: "fixed right-0 bottom-0 left-0 z-sticky flex h-15 items-center justify-between border-t border-gray-200 px-12 py-2 pb-safe",
8
+ item: "group flex flex-1 flex-col items-center justify-center gap-1 text-xs transition-colors",
9
+ icon: "w-5 h-5",
10
+ label: "typo-caption-12-semibold text-center"
11
+ },
12
+ variants: { selected: {
13
+ true: {
14
+ icon: "fill-gray-700",
15
+ label: "text-gray-600"
16
+ },
17
+ false: {
18
+ icon: "fill-gray-300 group-hover:fill-gray-500 group-active:fill-gray-500",
19
+ label: "text-gray-300 group-hover:text-gray-500 group-active:text-gray-500"
20
+ }
21
+ } },
22
+ defaultVariants: { selected: false }
23
+ });
24
+
25
+ //#endregion
26
+ exports.bottomNavigation = bottomNavigation;
@@ -0,0 +1,57 @@
1
+ import * as tailwind_variants47 from "tailwind-variants";
2
+ import { VariantProps } from "tailwind-variants";
3
+
4
+ //#region src/components/BottomNavigation/BottomNavigation.styles.d.ts
5
+ declare const bottomNavigation: tailwind_variants47.TVReturnType<{
6
+ selected: {
7
+ true: {
8
+ icon: string;
9
+ label: string;
10
+ };
11
+ false: {
12
+ icon: string;
13
+ label: string;
14
+ };
15
+ };
16
+ }, {
17
+ root: string;
18
+ item: string;
19
+ icon: string;
20
+ label: string;
21
+ }, undefined, {
22
+ selected: {
23
+ true: {
24
+ icon: string;
25
+ label: string;
26
+ };
27
+ false: {
28
+ icon: string;
29
+ label: string;
30
+ };
31
+ };
32
+ }, {
33
+ root: string;
34
+ item: string;
35
+ icon: string;
36
+ label: string;
37
+ }, tailwind_variants47.TVReturnType<{
38
+ selected: {
39
+ true: {
40
+ icon: string;
41
+ label: string;
42
+ };
43
+ false: {
44
+ icon: string;
45
+ label: string;
46
+ };
47
+ };
48
+ }, {
49
+ root: string;
50
+ item: string;
51
+ icon: string;
52
+ label: string;
53
+ }, undefined, unknown, unknown, undefined>>;
54
+ type BottomNavigationVariants = VariantProps<typeof bottomNavigation>;
55
+ //#endregion
56
+ export { BottomNavigationVariants };
57
+ //# sourceMappingURL=BottomNavigation.styles.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BottomNavigation.styles.d.cts","names":[],"sources":["../../../src/components/BottomNavigation/BottomNavigation.styles.ts"],"mappings":";;;;cAEa,gBAAA,EAuBX,mBAAA,CAvB2B,YAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuB3B,mBAAA,CAAA,YAAA;;;;;;;;;;;;;;;;;KAEU,wBAAA,GAA2B,YAAA,QAAoB,gBAAA"}
@@ -0,0 +1,57 @@
1
+ import * as tailwind_variants45 from "tailwind-variants";
2
+ import { VariantProps } from "tailwind-variants";
3
+
4
+ //#region src/components/BottomNavigation/BottomNavigation.styles.d.ts
5
+ declare const bottomNavigation: tailwind_variants45.TVReturnType<{
6
+ selected: {
7
+ true: {
8
+ icon: string;
9
+ label: string;
10
+ };
11
+ false: {
12
+ icon: string;
13
+ label: string;
14
+ };
15
+ };
16
+ }, {
17
+ root: string;
18
+ item: string;
19
+ icon: string;
20
+ label: string;
21
+ }, undefined, {
22
+ selected: {
23
+ true: {
24
+ icon: string;
25
+ label: string;
26
+ };
27
+ false: {
28
+ icon: string;
29
+ label: string;
30
+ };
31
+ };
32
+ }, {
33
+ root: string;
34
+ item: string;
35
+ icon: string;
36
+ label: string;
37
+ }, tailwind_variants45.TVReturnType<{
38
+ selected: {
39
+ true: {
40
+ icon: string;
41
+ label: string;
42
+ };
43
+ false: {
44
+ icon: string;
45
+ label: string;
46
+ };
47
+ };
48
+ }, {
49
+ root: string;
50
+ item: string;
51
+ icon: string;
52
+ label: string;
53
+ }, undefined, unknown, unknown, undefined>>;
54
+ type BottomNavigationVariants = VariantProps<typeof bottomNavigation>;
55
+ //#endregion
56
+ export { BottomNavigationVariants };
57
+ //# sourceMappingURL=BottomNavigation.styles.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BottomNavigation.styles.d.mts","names":[],"sources":["../../../src/components/BottomNavigation/BottomNavigation.styles.ts"],"mappings":";;;;cAEa,gBAAA,EAuBX,mBAAA,CAvB2B,YAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuB3B,mBAAA,CAAA,YAAA;;;;;;;;;;;;;;;;;KAEU,wBAAA,GAA2B,YAAA,QAAoB,gBAAA"}
@@ -0,0 +1,26 @@
1
+ import { tv } from "tailwind-variants";
2
+
3
+ //#region src/components/BottomNavigation/BottomNavigation.styles.ts
4
+ const bottomNavigation = tv({
5
+ slots: {
6
+ root: "fixed right-0 bottom-0 left-0 z-sticky flex h-15 items-center justify-between border-t border-gray-200 px-12 py-2 pb-safe",
7
+ item: "group flex flex-1 flex-col items-center justify-center gap-1 text-xs transition-colors",
8
+ icon: "w-5 h-5",
9
+ label: "typo-caption-12-semibold text-center"
10
+ },
11
+ variants: { selected: {
12
+ true: {
13
+ icon: "fill-gray-700",
14
+ label: "text-gray-600"
15
+ },
16
+ false: {
17
+ icon: "fill-gray-300 group-hover:fill-gray-500 group-active:fill-gray-500",
18
+ label: "text-gray-300 group-hover:text-gray-500 group-active:text-gray-500"
19
+ }
20
+ } },
21
+ defaultVariants: { selected: false }
22
+ });
23
+
24
+ //#endregion
25
+ export { bottomNavigation };
26
+ //# sourceMappingURL=BottomNavigation.styles.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BottomNavigation.styles.mjs","names":[],"sources":["../../../src/components/BottomNavigation/BottomNavigation.styles.ts"],"sourcesContent":["import { tv, VariantProps } from 'tailwind-variants';\n\nexport const bottomNavigation = tv({\n slots: {\n root: 'fixed right-0 bottom-0 left-0 z-sticky flex h-15 items-center justify-between border-t border-gray-200 px-12 py-2 pb-safe',\n item: 'group flex flex-1 flex-col items-center justify-center gap-1 text-xs transition-colors',\n icon: 'w-5 h-5',\n label: 'typo-caption-12-semibold text-center',\n },\n variants: {\n selected: {\n true: {\n icon: 'fill-gray-700',\n label: 'text-gray-600',\n },\n false: {\n icon: 'fill-gray-300 group-hover:fill-gray-500 group-active:fill-gray-500',\n label:\n 'text-gray-300 group-hover:text-gray-500 group-active:text-gray-500',\n },\n },\n },\n defaultVariants: {\n selected: false,\n },\n});\n\nexport type BottomNavigationVariants = VariantProps<typeof bottomNavigation>;\n"],"mappings":";;;AAEA,MAAa,mBAAmB,GAAG;CACjC,OAAO;EACL,MAAM;EACN,MAAM;EACN,MAAM;EACN,OAAO;EACR;CACD,UAAU,EACR,UAAU;EACR,MAAM;GACJ,MAAM;GACN,OAAO;GACR;EACD,OAAO;GACL,MAAM;GACN,OACE;GACH;EACF,EACF;CACD,iBAAiB,EACf,UAAU,OACX;CACF,CAAC"}
@@ -0,0 +1,22 @@
1
+ const require_rolldown_runtime = require('../../../_virtual/rolldown_runtime.cjs');
2
+ let react = require("react");
3
+
4
+ //#region src/components/BottomNavigation/hooks/useBottomNavigationContext.ts
5
+ const BottomNavigationContext = (0, react.createContext)(null);
6
+ const useBottomNavigationContext = () => {
7
+ const context = (0, react.useContext)(BottomNavigationContext);
8
+ if (!context) throw new Error("BottomNavigation compound components must be used within BottomNavigation");
9
+ return context;
10
+ };
11
+ const BottomNavigationItemContext = (0, react.createContext)(null);
12
+ const useBottomNavigationItemContext = () => {
13
+ const context = (0, react.useContext)(BottomNavigationItemContext);
14
+ if (!context) throw new Error("BottomNavigation Item compound components must be used within BottomNavigation.Item");
15
+ return context;
16
+ };
17
+
18
+ //#endregion
19
+ exports.BottomNavigationContext = BottomNavigationContext;
20
+ exports.BottomNavigationItemContext = BottomNavigationItemContext;
21
+ exports.useBottomNavigationContext = useBottomNavigationContext;
22
+ exports.useBottomNavigationItemContext = useBottomNavigationItemContext;
@@ -0,0 +1,19 @@
1
+ import { createContext, useContext } from "react";
2
+
3
+ //#region src/components/BottomNavigation/hooks/useBottomNavigationContext.ts
4
+ const BottomNavigationContext = createContext(null);
5
+ const useBottomNavigationContext = () => {
6
+ const context = useContext(BottomNavigationContext);
7
+ if (!context) throw new Error("BottomNavigation compound components must be used within BottomNavigation");
8
+ return context;
9
+ };
10
+ const BottomNavigationItemContext = createContext(null);
11
+ const useBottomNavigationItemContext = () => {
12
+ const context = useContext(BottomNavigationItemContext);
13
+ if (!context) throw new Error("BottomNavigation Item compound components must be used within BottomNavigation.Item");
14
+ return context;
15
+ };
16
+
17
+ //#endregion
18
+ export { BottomNavigationContext, BottomNavigationItemContext, useBottomNavigationContext, useBottomNavigationItemContext };
19
+ //# sourceMappingURL=useBottomNavigationContext.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useBottomNavigationContext.mjs","names":[],"sources":["../../../../src/components/BottomNavigation/hooks/useBottomNavigationContext.ts"],"sourcesContent":["import { createContext, useContext } from 'react';\n\nexport interface BottomNavigationContextValue {\n selected?: string;\n onSelectChange?: (value: string) => void;\n}\n\nexport const BottomNavigationContext =\n createContext<BottomNavigationContextValue | null>(null);\n\nexport const useBottomNavigationContext = () => {\n const context = useContext(BottomNavigationContext);\n if (!context) {\n throw new Error(\n 'BottomNavigation compound components must be used within BottomNavigation',\n );\n }\n return context;\n};\n\n// Item Context (for styling children)\nexport interface BottomNavigationItemContextValue {\n selected: boolean;\n}\n\nexport const BottomNavigationItemContext =\n createContext<BottomNavigationItemContextValue | null>(null);\n\nexport const useBottomNavigationItemContext = () => {\n const context = useContext(BottomNavigationItemContext);\n if (!context) {\n throw new Error(\n 'BottomNavigation Item compound components must be used within BottomNavigation.Item',\n );\n }\n return context;\n};\n"],"mappings":";;;AAOA,MAAa,0BACX,cAAmD,KAAK;AAE1D,MAAa,mCAAmC;CAC9C,MAAM,UAAU,WAAW,wBAAwB;AACnD,KAAI,CAAC,QACH,OAAM,IAAI,MACR,4EACD;AAEH,QAAO;;AAQT,MAAa,8BACX,cAAuD,KAAK;AAE9D,MAAa,uCAAuC;CAClD,MAAM,UAAU,WAAW,4BAA4B;AACvD,KAAI,CAAC,QACH,OAAM,IAAI,MACR,sFACD;AAEH,QAAO"}
@@ -0,0 +1 @@
1
+ import { BottomNavigation } from "./BottomNavigation.mjs";