@causw/core 0.0.12 → 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 (169) 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.mts +3 -3
  5. package/dist/components/BottomNavigation/BottomNavigation.cjs +78 -0
  6. package/dist/components/BottomNavigation/BottomNavigation.d.cts +48 -0
  7. package/dist/components/BottomNavigation/BottomNavigation.d.cts.map +1 -0
  8. package/dist/components/BottomNavigation/BottomNavigation.d.mts +49 -0
  9. package/dist/components/BottomNavigation/BottomNavigation.d.mts.map +1 -0
  10. package/dist/components/BottomNavigation/BottomNavigation.mjs +78 -0
  11. package/dist/components/BottomNavigation/BottomNavigation.mjs.map +1 -0
  12. package/dist/components/BottomNavigation/BottomNavigation.styles.cjs +26 -0
  13. package/dist/components/BottomNavigation/BottomNavigation.styles.d.cts +57 -0
  14. package/dist/components/BottomNavigation/BottomNavigation.styles.d.cts.map +1 -0
  15. package/dist/components/BottomNavigation/BottomNavigation.styles.d.mts +57 -0
  16. package/dist/components/BottomNavigation/BottomNavigation.styles.d.mts.map +1 -0
  17. package/dist/components/BottomNavigation/BottomNavigation.styles.mjs +26 -0
  18. package/dist/components/BottomNavigation/BottomNavigation.styles.mjs.map +1 -0
  19. package/dist/components/BottomNavigation/hooks/useBottomNavigationContext.cjs +22 -0
  20. package/dist/components/BottomNavigation/hooks/useBottomNavigationContext.mjs +19 -0
  21. package/dist/components/BottomNavigation/hooks/useBottomNavigationContext.mjs.map +1 -0
  22. package/dist/components/BottomNavigation/index.d.mts +1 -0
  23. package/dist/components/BottomSheet/BottomSheet.cjs +94 -0
  24. package/dist/components/BottomSheet/BottomSheet.d.cts +69 -0
  25. package/dist/components/BottomSheet/BottomSheet.d.cts.map +1 -0
  26. package/dist/components/BottomSheet/BottomSheet.d.mts +69 -0
  27. package/dist/components/BottomSheet/BottomSheet.d.mts.map +1 -0
  28. package/dist/components/BottomSheet/BottomSheet.mjs +93 -0
  29. package/dist/components/BottomSheet/BottomSheet.mjs.map +1 -0
  30. package/dist/components/BottomSheet/BottomSheet.styles.cjs +21 -0
  31. package/dist/components/BottomSheet/BottomSheet.styles.d.cts +54 -0
  32. package/dist/components/BottomSheet/BottomSheet.styles.d.cts.map +1 -0
  33. package/dist/components/BottomSheet/BottomSheet.styles.d.mts +54 -0
  34. package/dist/components/BottomSheet/BottomSheet.styles.d.mts.map +1 -0
  35. package/dist/components/BottomSheet/BottomSheet.styles.mjs +21 -0
  36. package/dist/components/BottomSheet/BottomSheet.styles.mjs.map +1 -0
  37. package/dist/components/BottomSheet/index.d.mts +1 -0
  38. package/dist/components/Box/Box.styles.d.mts +3 -3
  39. package/dist/components/Button/Button.d.cts +2 -2
  40. package/dist/components/Button/Button.d.mts +2 -2
  41. package/dist/components/Button/Button.styles.d.mts +3 -3
  42. package/dist/components/CTAButton/CTAButton.d.cts +2 -2
  43. package/dist/components/CTAButton/CTAButton.d.mts +2 -2
  44. package/dist/components/CTAButton/CTAButton.styles.d.cts +3 -3
  45. package/dist/components/CTAButton/CTAButton.styles.d.mts +3 -3
  46. package/dist/components/Calendar/Calendar.cjs +191 -0
  47. package/dist/components/Calendar/Calendar.d.cts +40 -0
  48. package/dist/components/Calendar/Calendar.d.cts.map +1 -0
  49. package/dist/components/Calendar/Calendar.d.mts +40 -0
  50. package/dist/components/Calendar/Calendar.d.mts.map +1 -0
  51. package/dist/components/Calendar/Calendar.mjs +190 -0
  52. package/dist/components/Calendar/Calendar.mjs.map +1 -0
  53. package/dist/components/Calendar/Calendar.styles.cjs +121 -0
  54. package/dist/components/Calendar/Calendar.styles.d.cts +269 -0
  55. package/dist/components/Calendar/Calendar.styles.d.cts.map +1 -0
  56. package/dist/components/Calendar/Calendar.styles.d.mts +269 -0
  57. package/dist/components/Calendar/Calendar.styles.d.mts.map +1 -0
  58. package/dist/components/Calendar/Calendar.styles.mjs +120 -0
  59. package/dist/components/Calendar/Calendar.styles.mjs.map +1 -0
  60. package/dist/components/Calendar/index.d.mts +1 -0
  61. package/dist/components/Checkbox/Checkbox.d.cts +4 -4
  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.mts +3 -3
  65. package/dist/components/Chip/Chip.d.cts +2 -2
  66. package/dist/components/Chip/Chip.styles.d.cts +3 -3
  67. package/dist/components/Dialog/Dialog.d.cts +5 -5
  68. package/dist/components/Dialog/Dialog.styles.d.cts +3 -3
  69. package/dist/components/Dialog/Dialog.styles.d.cts.map +1 -1
  70. package/dist/components/Drawer/Drawer.cjs +41 -0
  71. package/dist/components/Drawer/Drawer.d.cts +29 -0
  72. package/dist/components/Drawer/Drawer.d.cts.map +1 -0
  73. package/dist/components/Drawer/Drawer.d.mts +29 -0
  74. package/dist/components/Drawer/Drawer.d.mts.map +1 -0
  75. package/dist/components/Drawer/Drawer.mjs +40 -0
  76. package/dist/components/Drawer/Drawer.mjs.map +1 -0
  77. package/dist/components/Drawer/Drawer.styles.cjs +23 -0
  78. package/dist/components/Drawer/Drawer.styles.d.cts +36 -0
  79. package/dist/components/Drawer/Drawer.styles.d.cts.map +1 -0
  80. package/dist/components/Drawer/Drawer.styles.d.mts +36 -0
  81. package/dist/components/Drawer/Drawer.styles.d.mts.map +1 -0
  82. package/dist/components/Drawer/Drawer.styles.mjs +23 -0
  83. package/dist/components/Drawer/Drawer.styles.mjs.map +1 -0
  84. package/dist/components/Drawer/index.d.mts +1 -0
  85. package/dist/components/Dropdown/Dropdown.d.cts +3 -3
  86. package/dist/components/Field/Field.d.mts +5 -5
  87. package/dist/components/Float/Float.styles.d.cts +3 -3
  88. package/dist/components/Float/Float.styles.d.mts +3 -3
  89. package/dist/components/FloatingActionButton/FloatingActionButton.d.cts +2 -2
  90. package/dist/components/FloatingActionButton/FloatingActionButton.d.mts +2 -2
  91. package/dist/components/FloatingActionButton/FloatingActionButton.styles.d.cts +3 -3
  92. package/dist/components/FloatingActionButton/FloatingActionButton.styles.d.mts +3 -3
  93. package/dist/components/Grid/Grid.styles.d.cts +3 -3
  94. package/dist/components/Grid/Grid.styles.d.mts +3 -3
  95. package/dist/components/HStack/HStack.d.cts +2 -2
  96. package/dist/components/HStack/HStack.d.mts +2 -2
  97. package/dist/components/Modal/Modal.d.cts +7 -7
  98. package/dist/components/Modal/Modal.d.mts +7 -7
  99. package/dist/components/Modal/Modal.styles.d.cts +3 -3
  100. package/dist/components/Modal/Modal.styles.d.mts +3 -3
  101. package/dist/components/Primitive/Primitive.d.cts +16 -16
  102. package/dist/components/Radio/Radio.d.cts +3 -3
  103. package/dist/components/Radio/Radio.d.cts.map +1 -1
  104. package/dist/components/Radio/Radio.d.mts +3 -3
  105. package/dist/components/Radio/Radio.d.mts.map +1 -1
  106. package/dist/components/RatioChart/RatioChart.d.cts +5 -5
  107. package/dist/components/RatioChart/RatioChartEditor.d.cts +2 -2
  108. package/dist/components/Select/Select.d.cts +5 -5
  109. package/dist/components/Select/Select.styles.d.cts +3 -3
  110. package/dist/components/Separator/Separator.styles.d.mts +3 -3
  111. package/dist/components/Sidebar/Sidebar.cjs +95 -0
  112. package/dist/components/Sidebar/Sidebar.d.cts +64 -0
  113. package/dist/components/Sidebar/Sidebar.d.cts.map +1 -0
  114. package/dist/components/Sidebar/Sidebar.d.mts +65 -0
  115. package/dist/components/Sidebar/Sidebar.d.mts.map +1 -0
  116. package/dist/components/Sidebar/Sidebar.mjs +95 -0
  117. package/dist/components/Sidebar/Sidebar.mjs.map +1 -0
  118. package/dist/components/Sidebar/Sidebar.styles.cjs +32 -0
  119. package/dist/components/Sidebar/Sidebar.styles.d.cts +75 -0
  120. package/dist/components/Sidebar/Sidebar.styles.d.cts.map +1 -0
  121. package/dist/components/Sidebar/Sidebar.styles.d.mts +75 -0
  122. package/dist/components/Sidebar/Sidebar.styles.d.mts.map +1 -0
  123. package/dist/components/Sidebar/Sidebar.styles.mjs +32 -0
  124. package/dist/components/Sidebar/Sidebar.styles.mjs.map +1 -0
  125. package/dist/components/Sidebar/hooks/useSidebarContext.cjs +22 -0
  126. package/dist/components/Sidebar/hooks/useSidebarContext.d.cts +5 -0
  127. package/dist/components/Sidebar/hooks/useSidebarContext.d.cts.map +1 -0
  128. package/dist/components/Sidebar/hooks/useSidebarContext.d.mts +7 -0
  129. package/dist/components/Sidebar/hooks/useSidebarContext.d.mts.map +1 -0
  130. package/dist/components/Sidebar/hooks/useSidebarContext.mjs +19 -0
  131. package/dist/components/Sidebar/hooks/useSidebarContext.mjs.map +1 -0
  132. package/dist/components/Sidebar/index.d.mts +2 -0
  133. package/dist/components/Spacer/Spacer.styles.d.cts +3 -3
  134. package/dist/components/Spacer/Spacer.styles.d.cts.map +1 -1
  135. package/dist/components/Spacer/Spacer.styles.d.mts +3 -3
  136. package/dist/components/Stack/Stack.styles.d.mts +3 -3
  137. package/dist/components/Tab/Tab.d.cts +6 -6
  138. package/dist/components/Tab/Tab.d.mts +6 -6
  139. package/dist/components/Tab/Tab.styles.d.cts +3 -3
  140. package/dist/components/Tab/Tab.styles.d.mts +3 -3
  141. package/dist/components/Text/Text.d.cts +1 -1
  142. package/dist/components/Text/Text.d.mts +1 -1
  143. package/dist/components/Text/Text.styles.d.cts +3 -3
  144. package/dist/components/Text/Text.styles.d.mts +3 -3
  145. package/dist/components/TextArea/TextArea.d.cts +4 -4
  146. package/dist/components/TextArea/TextArea.d.mts +4 -4
  147. package/dist/components/TextArea/TextArea.d.mts.map +1 -1
  148. package/dist/components/TextArea/TextArea.styles.d.mts +3 -3
  149. package/dist/components/TextInput/TextInput.d.cts +2 -2
  150. package/dist/components/TextInput/TextInput.d.mts +2 -2
  151. package/dist/components/TextInput/TextInput.styles.d.cts +3 -3
  152. package/dist/components/TextInput/TextInput.styles.d.mts +3 -3
  153. package/dist/components/Toast/Toast.d.cts +3 -3
  154. package/dist/components/Toast/Toast.d.mts +3 -3
  155. package/dist/components/Toast/Toast.styles.d.cts +3 -3
  156. package/dist/components/Toast/Toast.styles.d.mts +3 -3
  157. package/dist/components/Toggle/Toggle.d.cts +4 -4
  158. package/dist/components/Toggle/Toggle.d.mts +4 -4
  159. package/dist/components/Toggle/Toggle.styles.d.cts +3 -3
  160. package/dist/components/VStack/VStack.d.mts +2 -2
  161. package/dist/components/index.d.mts +12 -1
  162. package/dist/hooks/bottomSheet/useBottomSheet.cjs +15 -0
  163. package/dist/hooks/bottomSheet/useBottomSheet.mjs +13 -0
  164. package/dist/hooks/bottomSheet/useBottomSheet.mjs.map +1 -0
  165. package/dist/index.cjs +10 -0
  166. package/dist/index.d.cts +7 -1
  167. package/dist/index.d.mts +7 -1
  168. package/dist/index.mjs +6 -1
  169. package/package.json +1 -1
@@ -0,0 +1,95 @@
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_Sidebar_styles = require('./Sidebar.styles.cjs');
6
+ const require_useSidebarContext = require('./hooks/useSidebarContext.cjs');
7
+ let react_jsx_runtime = require("react/jsx-runtime");
8
+
9
+ //#region src/components/Sidebar/Sidebar.tsx
10
+ const SidebarRoot = ({ children, selected, onSelectChange, ...props }) => {
11
+ const { root } = require_Sidebar_styles.sidebar();
12
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_useSidebarContext.SidebarContext.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 SidebarHeader = ({ children, ...props }) => {
25
+ const { header } = require_Sidebar_styles.sidebar();
26
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Primitive.Primitive.div, {
27
+ className: header(),
28
+ ...props,
29
+ children
30
+ });
31
+ };
32
+ const SidebarContent = ({ children, ...props }) => {
33
+ const { content } = require_Sidebar_styles.sidebar();
34
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Primitive.Primitive.div, {
35
+ className: content(),
36
+ ...props,
37
+ children
38
+ });
39
+ };
40
+ const SidebarItem = ({ selected, value, children, onClick, ...props }) => {
41
+ const rootContext = require_useSidebarContext.useSidebarContext();
42
+ const isSelected = selected ?? (rootContext.selected !== void 0 && value !== void 0 ? rootContext.selected === value : false);
43
+ const { item } = require_Sidebar_styles.sidebar({ selected: isSelected });
44
+ const handleClick = (e) => {
45
+ onClick?.(e);
46
+ if (!e.defaultPrevented && rootContext.onSelectChange && value !== void 0) rootContext.onSelectChange(value);
47
+ };
48
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_useSidebarContext.SidebarItemContext.Provider, {
49
+ value: { selected: isSelected },
50
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Primitive.Primitive.button, {
51
+ type: "button",
52
+ className: item(),
53
+ onClick: handleClick,
54
+ ...props,
55
+ children
56
+ })
57
+ });
58
+ };
59
+ const SidebarItemIcon = ({ children, ...props }) => {
60
+ const { icon } = require_Sidebar_styles.sidebar({ selected: require_useSidebarContext.useSidebarItemContext().selected });
61
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Primitive.Primitive.svg, {
62
+ asChild: true,
63
+ className: icon(),
64
+ ...props,
65
+ children
66
+ });
67
+ };
68
+ const SidebarItemText = ({ children, ...props }) => {
69
+ const { text } = require_Sidebar_styles.sidebar({ selected: require_useSidebarContext.useSidebarItemContext().selected });
70
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Primitive.Primitive.span, {
71
+ className: text(),
72
+ ...props,
73
+ children
74
+ });
75
+ };
76
+ const SidebarFooter = ({ children, ...props }) => {
77
+ const { footer } = require_Sidebar_styles.sidebar();
78
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Primitive.Primitive.div, {
79
+ className: footer(),
80
+ ...props,
81
+ children
82
+ });
83
+ };
84
+ const sidebarBadgeClassName = require_Sidebar_styles.sidebar().badge();
85
+ const Sidebar = Object.assign(SidebarRoot, {
86
+ Header: SidebarHeader,
87
+ Content: SidebarContent,
88
+ Item: SidebarItem,
89
+ ItemIcon: SidebarItemIcon,
90
+ ItemText: SidebarItemText,
91
+ Footer: SidebarFooter
92
+ });
93
+
94
+ //#endregion
95
+ exports.Sidebar = Sidebar;
@@ -0,0 +1,64 @@
1
+ import { PrimitiveProps } from "../Primitive/Primitive.cjs";
2
+ import { SidebarVariants } from "./Sidebar.styles.cjs";
3
+ import { SidebarValue } from "./hooks/useSidebarContext.cjs";
4
+ import { ComponentProps, SVGProps } from "react";
5
+ import * as react_jsx_runtime67 from "react/jsx-runtime";
6
+
7
+ //#region src/components/Sidebar/Sidebar.d.ts
8
+ interface SidebarProps extends ComponentProps<'nav'>, PrimitiveProps {
9
+ children: React.ReactNode;
10
+ selected?: SidebarValue;
11
+ onSelectChange?: (value: SidebarValue) => void;
12
+ }
13
+ interface SidebarHeaderProps extends ComponentProps<'div'>, PrimitiveProps {
14
+ children: React.ReactNode;
15
+ }
16
+ interface SidebarContentProps extends ComponentProps<'div'>, PrimitiveProps {
17
+ children: React.ReactNode;
18
+ }
19
+ interface SidebarItemProps extends ComponentProps<'button'>, PrimitiveProps, Omit<SidebarVariants, 'selected'> {
20
+ value?: SidebarValue;
21
+ selected?: boolean;
22
+ }
23
+ interface SidebarItemIconProps extends SVGProps<SVGSVGElement>, PrimitiveProps {}
24
+ interface SidebarItemTextProps extends ComponentProps<'span'>, PrimitiveProps {}
25
+ interface SidebarFooterProps extends ComponentProps<'div'>, PrimitiveProps {
26
+ children: React.ReactNode;
27
+ }
28
+ declare const Sidebar: (({
29
+ children,
30
+ selected,
31
+ onSelectChange,
32
+ ...props
33
+ }: SidebarProps) => react_jsx_runtime67.JSX.Element) & {
34
+ Header: ({
35
+ children,
36
+ ...props
37
+ }: SidebarHeaderProps) => react_jsx_runtime67.JSX.Element;
38
+ Content: ({
39
+ children,
40
+ ...props
41
+ }: SidebarContentProps) => react_jsx_runtime67.JSX.Element;
42
+ Item: ({
43
+ selected,
44
+ value,
45
+ children,
46
+ onClick,
47
+ ...props
48
+ }: SidebarItemProps) => react_jsx_runtime67.JSX.Element;
49
+ ItemIcon: ({
50
+ children,
51
+ ...props
52
+ }: SidebarItemIconProps) => react_jsx_runtime67.JSX.Element;
53
+ ItemText: ({
54
+ children,
55
+ ...props
56
+ }: SidebarItemTextProps) => react_jsx_runtime67.JSX.Element;
57
+ Footer: ({
58
+ children,
59
+ ...props
60
+ }: SidebarFooterProps) => react_jsx_runtime67.JSX.Element;
61
+ };
62
+ //#endregion
63
+ export { Sidebar };
64
+ //# sourceMappingURL=Sidebar.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sidebar.d.cts","names":[],"sources":["../../../src/components/Sidebar/Sidebar.tsx"],"mappings":";;;;;;;UAgBiB,YAAA,SAAqB,cAAA,SAAuB,cAAA;EAC3D,QAAA,EAAU,KAAA,CAAM,SAAA;EAChB,QAAA,GAAW,YAAA;EACX,cAAA,IAAkB,KAAA,EAAO,YAAA;AAAA;AAAA,UAmBV,kBAAA,SACP,cAAA,SAAuB,cAAA;EAC/B,QAAA,EAAU,KAAA,CAAM,SAAA;AAAA;AAAA,UAaR,mBAAA,SAA4B,cAAA,SAAuB,cAAA;EAC3D,QAAA,EAAU,KAAA,CAAM,SAAA;AAAA;AAAA,UAaR,gBAAA,SAEN,cAAA,YACA,cAAA,EACA,IAAA,CAAK,eAAA;EACP,KAAA,GAAQ,YAAA;EACR,QAAA;AAAA;AAAA,UA4CQ,oBAAA,SACA,QAAA,CAAS,aAAA,GAAgB,cAAA;AAAA,UAWzB,oBAAA,SAA6B,cAAA,UAAwB,cAAA;AAAA,UAYrD,kBAAA,SAA2B,cAAA,SAAuB,cAAA;EAC1D,QAAA,EAAU,KAAA,CAAM,SAAA;AAAA;AAAA,cAaL,OAAA;EAAO,QAAA;EAAA,QAAA;EAAA,cAAA;EAAA,GAAA;AAAA,GAjIjB,YAAA,KAAY,mBAAA,CAAA,GAAA,CAAA,OAAA;;;;KAgBgC,kBAAA,KAAkB,mBAAA,CAAA,GAAA,CAAA,OAAA;;;;KAejB,mBAAA,KAAmB,mBAAA,CAAA,GAAA,CAAA,OAAA;;;;;;;KAwBhE,gBAAA,KAAgB,mBAAA,CAAA,GAAA,CAAA,OAAA;;;;KAsC8B,oBAAA,KAAoB,mBAAA,CAAA,GAAA,CAAA,OAAA;;;;KAWpB,oBAAA,KAAoB,mBAAA,CAAA,GAAA,CAAA,OAAA;;;;KActB,kBAAA,KAAkB,mBAAA,CAAA,GAAA,CAAA,OAAA;AAAA"}
@@ -0,0 +1,65 @@
1
+ import { PrimitiveProps } from "../Primitive/Primitive.mjs";
2
+ import "../Primitive/index.mjs";
3
+ import { SidebarVariants } from "./Sidebar.styles.mjs";
4
+ import { SidebarValue } from "./hooks/useSidebarContext.mjs";
5
+ import { ComponentProps, SVGProps } from "react";
6
+ import * as react_jsx_runtime65 from "react/jsx-runtime";
7
+
8
+ //#region src/components/Sidebar/Sidebar.d.ts
9
+ interface SidebarProps extends ComponentProps<'nav'>, PrimitiveProps {
10
+ children: React.ReactNode;
11
+ selected?: SidebarValue;
12
+ onSelectChange?: (value: SidebarValue) => void;
13
+ }
14
+ interface SidebarHeaderProps extends ComponentProps<'div'>, PrimitiveProps {
15
+ children: React.ReactNode;
16
+ }
17
+ interface SidebarContentProps extends ComponentProps<'div'>, PrimitiveProps {
18
+ children: React.ReactNode;
19
+ }
20
+ interface SidebarItemProps extends ComponentProps<'button'>, PrimitiveProps, Omit<SidebarVariants, 'selected'> {
21
+ value?: SidebarValue;
22
+ selected?: boolean;
23
+ }
24
+ interface SidebarItemIconProps extends SVGProps<SVGSVGElement>, PrimitiveProps {}
25
+ interface SidebarItemTextProps extends ComponentProps<'span'>, PrimitiveProps {}
26
+ interface SidebarFooterProps extends ComponentProps<'div'>, PrimitiveProps {
27
+ children: React.ReactNode;
28
+ }
29
+ declare const Sidebar: (({
30
+ children,
31
+ selected,
32
+ onSelectChange,
33
+ ...props
34
+ }: SidebarProps) => react_jsx_runtime65.JSX.Element) & {
35
+ Header: ({
36
+ children,
37
+ ...props
38
+ }: SidebarHeaderProps) => react_jsx_runtime65.JSX.Element;
39
+ Content: ({
40
+ children,
41
+ ...props
42
+ }: SidebarContentProps) => react_jsx_runtime65.JSX.Element;
43
+ Item: ({
44
+ selected,
45
+ value,
46
+ children,
47
+ onClick,
48
+ ...props
49
+ }: SidebarItemProps) => react_jsx_runtime65.JSX.Element;
50
+ ItemIcon: ({
51
+ children,
52
+ ...props
53
+ }: SidebarItemIconProps) => react_jsx_runtime65.JSX.Element;
54
+ ItemText: ({
55
+ children,
56
+ ...props
57
+ }: SidebarItemTextProps) => react_jsx_runtime65.JSX.Element;
58
+ Footer: ({
59
+ children,
60
+ ...props
61
+ }: SidebarFooterProps) => react_jsx_runtime65.JSX.Element;
62
+ };
63
+ //#endregion
64
+ export { Sidebar };
65
+ //# sourceMappingURL=Sidebar.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sidebar.d.mts","names":[],"sources":["../../../src/components/Sidebar/Sidebar.tsx"],"mappings":";;;;;;;;UAgBiB,YAAA,SAAqB,cAAA,SAAuB,cAAA;EAC3D,QAAA,EAAU,KAAA,CAAM,SAAA;EAChB,QAAA,GAAW,YAAA;EACX,cAAA,IAAkB,KAAA,EAAO,YAAA;AAAA;AAAA,UAmBV,kBAAA,SACP,cAAA,SAAuB,cAAA;EAC/B,QAAA,EAAU,KAAA,CAAM,SAAA;AAAA;AAAA,UAaR,mBAAA,SAA4B,cAAA,SAAuB,cAAA;EAC3D,QAAA,EAAU,KAAA,CAAM,SAAA;AAAA;AAAA,UAaR,gBAAA,SAEN,cAAA,YACA,cAAA,EACA,IAAA,CAAK,eAAA;EACP,KAAA,GAAQ,YAAA;EACR,QAAA;AAAA;AAAA,UA4CQ,oBAAA,SACA,QAAA,CAAS,aAAA,GAAgB,cAAA;AAAA,UAWzB,oBAAA,SAA6B,cAAA,UAAwB,cAAA;AAAA,UAYrD,kBAAA,SAA2B,cAAA,SAAuB,cAAA;EAC1D,QAAA,EAAU,KAAA,CAAM,SAAA;AAAA;AAAA,cAaL,OAAA;EAAO,QAAA;EAAA,QAAA;EAAA,cAAA;EAAA,GAAA;AAAA,GAjIjB,YAAA,KAAY,mBAAA,CAAA,GAAA,CAAA,OAAA;;;;KAgBgC,kBAAA,KAAkB,mBAAA,CAAA,GAAA,CAAA,OAAA;;;;KAejB,mBAAA,KAAmB,mBAAA,CAAA,GAAA,CAAA,OAAA;;;;;;;KAwBhE,gBAAA,KAAgB,mBAAA,CAAA,GAAA,CAAA,OAAA;;;;KAsC8B,oBAAA,KAAoB,mBAAA,CAAA,GAAA,CAAA,OAAA;;;;KAWpB,oBAAA,KAAoB,mBAAA,CAAA,GAAA,CAAA,OAAA;;;;KActB,kBAAA,KAAkB,mBAAA,CAAA,GAAA,CAAA,OAAA;AAAA"}
@@ -0,0 +1,95 @@
1
+ 'use client';
2
+
3
+ import { Primitive } from "../Primitive/Primitive.mjs";
4
+ import { sidebar } from "./Sidebar.styles.mjs";
5
+ import { SidebarContext, SidebarItemContext, useSidebarContext, useSidebarItemContext } from "./hooks/useSidebarContext.mjs";
6
+ import { jsx } from "react/jsx-runtime";
7
+
8
+ //#region src/components/Sidebar/Sidebar.tsx
9
+ const SidebarRoot = ({ children, selected, onSelectChange, ...props }) => {
10
+ const { root } = sidebar();
11
+ return /* @__PURE__ */ jsx(SidebarContext.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 SidebarHeader = ({ children, ...props }) => {
24
+ const { header } = sidebar();
25
+ return /* @__PURE__ */ jsx(Primitive.div, {
26
+ className: header(),
27
+ ...props,
28
+ children
29
+ });
30
+ };
31
+ const SidebarContent = ({ children, ...props }) => {
32
+ const { content } = sidebar();
33
+ return /* @__PURE__ */ jsx(Primitive.div, {
34
+ className: content(),
35
+ ...props,
36
+ children
37
+ });
38
+ };
39
+ const SidebarItem = ({ selected, value, children, onClick, ...props }) => {
40
+ const rootContext = useSidebarContext();
41
+ const isSelected = selected ?? (rootContext.selected !== void 0 && value !== void 0 ? rootContext.selected === value : false);
42
+ const { item } = sidebar({ selected: isSelected });
43
+ const handleClick = (e) => {
44
+ onClick?.(e);
45
+ if (!e.defaultPrevented && rootContext.onSelectChange && value !== void 0) rootContext.onSelectChange(value);
46
+ };
47
+ return /* @__PURE__ */ jsx(SidebarItemContext.Provider, {
48
+ value: { selected: isSelected },
49
+ children: /* @__PURE__ */ jsx(Primitive.button, {
50
+ type: "button",
51
+ className: item(),
52
+ onClick: handleClick,
53
+ ...props,
54
+ children
55
+ })
56
+ });
57
+ };
58
+ const SidebarItemIcon = ({ children, ...props }) => {
59
+ const { icon } = sidebar({ selected: useSidebarItemContext().selected });
60
+ return /* @__PURE__ */ jsx(Primitive.svg, {
61
+ asChild: true,
62
+ className: icon(),
63
+ ...props,
64
+ children
65
+ });
66
+ };
67
+ const SidebarItemText = ({ children, ...props }) => {
68
+ const { text } = sidebar({ selected: useSidebarItemContext().selected });
69
+ return /* @__PURE__ */ jsx(Primitive.span, {
70
+ className: text(),
71
+ ...props,
72
+ children
73
+ });
74
+ };
75
+ const SidebarFooter = ({ children, ...props }) => {
76
+ const { footer } = sidebar();
77
+ return /* @__PURE__ */ jsx(Primitive.div, {
78
+ className: footer(),
79
+ ...props,
80
+ children
81
+ });
82
+ };
83
+ const sidebarBadgeClassName = sidebar().badge();
84
+ const Sidebar = Object.assign(SidebarRoot, {
85
+ Header: SidebarHeader,
86
+ Content: SidebarContent,
87
+ Item: SidebarItem,
88
+ ItemIcon: SidebarItemIcon,
89
+ ItemText: SidebarItemText,
90
+ Footer: SidebarFooter
91
+ });
92
+
93
+ //#endregion
94
+ export { Sidebar };
95
+ //# sourceMappingURL=Sidebar.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sidebar.mjs","names":[],"sources":["../../../src/components/Sidebar/Sidebar.tsx"],"sourcesContent":["'use client';\n\nimport { ComponentProps, SVGProps } from 'react';\nimport { sidebar, SidebarVariants } from './Sidebar.styles';\nimport { Primitive, PrimitiveProps } from '../Primitive';\n\n// Root\nimport {\n SidebarContext,\n useSidebarContext,\n SidebarItemContext,\n useSidebarItemContext,\n SidebarValue,\n} from './hooks/useSidebarContext';\n\n// Root\nexport interface SidebarProps extends ComponentProps<'nav'>, PrimitiveProps {\n children: React.ReactNode;\n selected?: SidebarValue;\n onSelectChange?: (value: SidebarValue) => void;\n}\nconst SidebarRoot = ({\n children,\n selected,\n onSelectChange,\n ...props\n}: SidebarProps) => {\n const { root } = sidebar();\n return (\n <SidebarContext.Provider value={{ selected, onSelectChange }}>\n <Primitive.nav className={root()} {...props}>\n {children}\n </Primitive.nav>\n </SidebarContext.Provider>\n );\n};\n\n// Header\nexport interface SidebarHeaderProps\n extends ComponentProps<'div'>, PrimitiveProps {\n children: React.ReactNode;\n}\nconst SidebarHeader = ({ children, ...props }: SidebarHeaderProps) => {\n const { header } = sidebar();\n return (\n <Primitive.div className={header()} {...props}>\n {children}\n </Primitive.div>\n );\n};\n\n// Content\n\ninterface SidebarContentProps extends ComponentProps<'div'>, PrimitiveProps {\n children: React.ReactNode;\n}\n\nconst SidebarContent = ({ children, ...props }: SidebarContentProps) => {\n const { content } = sidebar();\n return (\n <Primitive.div className={content()} {...props}>\n {children}\n </Primitive.div>\n );\n};\n\n// Item\ninterface SidebarItemProps\n extends\n ComponentProps<'button'>,\n PrimitiveProps,\n Omit<SidebarVariants, 'selected'> {\n value?: SidebarValue;\n selected?: boolean;\n}\nconst SidebarItem = ({\n selected,\n value,\n children,\n onClick,\n ...props\n}: SidebarItemProps) => {\n const rootContext = useSidebarContext();\n\n const isSelected =\n selected ??\n (rootContext.selected !== undefined && value !== undefined\n ? rootContext.selected === value\n : false);\n\n const { item } = sidebar({ selected: isSelected });\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 <SidebarItemContext.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 </SidebarItemContext.Provider>\n );\n};\n\ninterface SidebarItemIconProps\n extends SVGProps<SVGSVGElement>, PrimitiveProps {}\nconst SidebarItemIcon = ({ children, ...props }: SidebarItemIconProps) => {\n const itemContext = useSidebarItemContext();\n const { icon } = sidebar({ selected: itemContext.selected });\n return (\n <Primitive.svg asChild className={icon()} {...props}>\n {children}\n </Primitive.svg>\n );\n};\n\ninterface SidebarItemTextProps extends ComponentProps<'span'>, PrimitiveProps {}\nconst SidebarItemText = ({ children, ...props }: SidebarItemTextProps) => {\n const itemContext = useSidebarItemContext();\n const { text } = sidebar({ selected: itemContext.selected });\n return (\n <Primitive.span className={text()} {...props}>\n {children}\n </Primitive.span>\n );\n};\n\n// Footer\ninterface SidebarFooterProps extends ComponentProps<'div'>, PrimitiveProps {\n children: React.ReactNode;\n}\nconst SidebarFooter = ({ children, ...props }: SidebarFooterProps) => {\n const { footer } = sidebar();\n return (\n <Primitive.div className={footer()} {...props}>\n {children}\n </Primitive.div>\n );\n};\n\nexport const sidebarBadgeClassName = sidebar().badge();\n\nexport const Sidebar = Object.assign(SidebarRoot, {\n Header: SidebarHeader,\n Content: SidebarContent,\n Item: SidebarItem,\n ItemIcon: SidebarItemIcon,\n ItemText: SidebarItemText,\n Footer: SidebarFooter,\n});\n"],"mappings":";;;;;;;;AAqBA,MAAM,eAAe,EACnB,UACA,UACA,gBACA,GAAG,YACe;CAClB,MAAM,EAAE,SAAS,SAAS;AAC1B,QACE,oBAAC,eAAe;EAAS,OAAO;GAAE;GAAU;GAAgB;YAC1D,oBAAC,UAAU;GAAI,WAAW,MAAM;GAAE,GAAI;GACnC;IACa;GACQ;;AAS9B,MAAM,iBAAiB,EAAE,UAAU,GAAG,YAAgC;CACpE,MAAM,EAAE,WAAW,SAAS;AAC5B,QACE,oBAAC,UAAU;EAAI,WAAW,QAAQ;EAAE,GAAI;EACrC;GACa;;AAUpB,MAAM,kBAAkB,EAAE,UAAU,GAAG,YAAiC;CACtE,MAAM,EAAE,YAAY,SAAS;AAC7B,QACE,oBAAC,UAAU;EAAI,WAAW,SAAS;EAAE,GAAI;EACtC;GACa;;AAapB,MAAM,eAAe,EACnB,UACA,OACA,UACA,SACA,GAAG,YACmB;CACtB,MAAM,cAAc,mBAAmB;CAEvC,MAAM,aACJ,aACC,YAAY,aAAa,UAAa,UAAU,SAC7C,YAAY,aAAa,QACzB;CAEN,MAAM,EAAE,SAAS,QAAQ,EAAE,UAAU,YAAY,CAAC;CAElD,MAAM,eAAe,MAA2C;AAC9D,YAAU,EAAE;AACZ,MACE,CAAC,EAAE,oBACH,YAAY,kBACZ,UAAU,OAEV,aAAY,eAAe,MAAM;;AAIrC,QACE,oBAAC,mBAAmB;EAAS,OAAO,EAAE,UAAU,YAAY;YAC1D,oBAAC,UAAU;GACT,MAAK;GACL,WAAW,MAAM;GACjB,SAAS;GACT,GAAI;GAEH;IACgB;GACS;;AAMlC,MAAM,mBAAmB,EAAE,UAAU,GAAG,YAAkC;CAExE,MAAM,EAAE,SAAS,QAAQ,EAAE,UADP,uBAAuB,CACM,UAAU,CAAC;AAC5D,QACE,oBAAC,UAAU;EAAI;EAAQ,WAAW,MAAM;EAAE,GAAI;EAC3C;GACa;;AAKpB,MAAM,mBAAmB,EAAE,UAAU,GAAG,YAAkC;CAExE,MAAM,EAAE,SAAS,QAAQ,EAAE,UADP,uBAAuB,CACM,UAAU,CAAC;AAC5D,QACE,oBAAC,UAAU;EAAK,WAAW,MAAM;EAAE,GAAI;EACpC;GACc;;AAQrB,MAAM,iBAAiB,EAAE,UAAU,GAAG,YAAgC;CACpE,MAAM,EAAE,WAAW,SAAS;AAC5B,QACE,oBAAC,UAAU;EAAI,WAAW,QAAQ;EAAE,GAAI;EACrC;GACa;;AAIpB,MAAa,wBAAwB,SAAS,CAAC,OAAO;AAEtD,MAAa,UAAU,OAAO,OAAO,aAAa;CAChD,QAAQ;CACR,SAAS;CACT,MAAM;CACN,UAAU;CACV,UAAU;CACV,QAAQ;CACT,CAAC"}
@@ -0,0 +1,32 @@
1
+ const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
+ let tailwind_variants = require("tailwind-variants");
3
+
4
+ //#region src/components/Sidebar/Sidebar.styles.ts
5
+ const sidebar = (0, tailwind_variants.tv)({
6
+ slots: {
7
+ root: "flex h-screen w-65 flex-col bg-white border-r border-gray-100",
8
+ header: "px-2.5 py-8",
9
+ content: "flex-1 overflow-y-auto px-2.5 py-2",
10
+ footer: "border-t border-gray-100 px-4 py-4",
11
+ item: "group w-full flex items-center gap-2 px-4.5 py-2 rounded-sm text-md transition-colors",
12
+ badge: "ml-auto px-2 py-0.5 text-sm rounded-sm bg-red-100 text-red-400",
13
+ icon: "w-4.5 h-4.5",
14
+ text: "text-md"
15
+ },
16
+ variants: { selected: {
17
+ true: {
18
+ item: "bg-gray-100",
19
+ text: "text-gray-700 typo-subtitle-16-bold",
20
+ icon: "fill-gray-600"
21
+ },
22
+ false: {
23
+ item: "hover:bg-gray-50 active:bg-gray-50",
24
+ text: "typo-body-16-medium text-gray-500 group-hover:text-gray-700 group-active:text-gray-700",
25
+ icon: "fill-gray-300 group-hover:fill-gray-600 group-active:fill-gray-600"
26
+ }
27
+ } },
28
+ defaultVariants: { selected: false }
29
+ });
30
+
31
+ //#endregion
32
+ exports.sidebar = sidebar;
@@ -0,0 +1,75 @@
1
+ import * as tailwind_variants27 from "tailwind-variants";
2
+ import { VariantProps } from "tailwind-variants";
3
+
4
+ //#region src/components/Sidebar/Sidebar.styles.d.ts
5
+ declare const sidebar: tailwind_variants27.TVReturnType<{
6
+ selected: {
7
+ true: {
8
+ item: string;
9
+ text: string;
10
+ icon: string;
11
+ };
12
+ false: {
13
+ item: string;
14
+ text: string;
15
+ icon: string;
16
+ };
17
+ };
18
+ }, {
19
+ root: string;
20
+ header: string;
21
+ content: string;
22
+ footer: string;
23
+ item: string;
24
+ badge: string;
25
+ icon: string;
26
+ text: string;
27
+ }, undefined, {
28
+ selected: {
29
+ true: {
30
+ item: string;
31
+ text: string;
32
+ icon: string;
33
+ };
34
+ false: {
35
+ item: string;
36
+ text: string;
37
+ icon: string;
38
+ };
39
+ };
40
+ }, {
41
+ root: string;
42
+ header: string;
43
+ content: string;
44
+ footer: string;
45
+ item: string;
46
+ badge: string;
47
+ icon: string;
48
+ text: string;
49
+ }, tailwind_variants27.TVReturnType<{
50
+ selected: {
51
+ true: {
52
+ item: string;
53
+ text: string;
54
+ icon: string;
55
+ };
56
+ false: {
57
+ item: string;
58
+ text: string;
59
+ icon: string;
60
+ };
61
+ };
62
+ }, {
63
+ root: string;
64
+ header: string;
65
+ content: string;
66
+ footer: string;
67
+ item: string;
68
+ badge: string;
69
+ icon: string;
70
+ text: string;
71
+ }, undefined, unknown, unknown, undefined>>;
72
+ type SidebarVariants = VariantProps<typeof sidebar>;
73
+ //#endregion
74
+ export { SidebarVariants };
75
+ //# sourceMappingURL=Sidebar.styles.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sidebar.styles.d.cts","names":[],"sources":["../../../src/components/Sidebar/Sidebar.styles.ts"],"mappings":";;;;cAEa,OAAA,EA4BX,mBAAA,CA5BkB,YAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BlB,mBAAA,CAAA,YAAA;;;;;;;;;;;;;;;;;;;;;;;KAEU,eAAA,GAAkB,YAAA,QAAoB,OAAA"}
@@ -0,0 +1,75 @@
1
+ import * as tailwind_variants27 from "tailwind-variants";
2
+ import { VariantProps } from "tailwind-variants";
3
+
4
+ //#region src/components/Sidebar/Sidebar.styles.d.ts
5
+ declare const sidebar: tailwind_variants27.TVReturnType<{
6
+ selected: {
7
+ true: {
8
+ item: string;
9
+ text: string;
10
+ icon: string;
11
+ };
12
+ false: {
13
+ item: string;
14
+ text: string;
15
+ icon: string;
16
+ };
17
+ };
18
+ }, {
19
+ root: string;
20
+ header: string;
21
+ content: string;
22
+ footer: string;
23
+ item: string;
24
+ badge: string;
25
+ icon: string;
26
+ text: string;
27
+ }, undefined, {
28
+ selected: {
29
+ true: {
30
+ item: string;
31
+ text: string;
32
+ icon: string;
33
+ };
34
+ false: {
35
+ item: string;
36
+ text: string;
37
+ icon: string;
38
+ };
39
+ };
40
+ }, {
41
+ root: string;
42
+ header: string;
43
+ content: string;
44
+ footer: string;
45
+ item: string;
46
+ badge: string;
47
+ icon: string;
48
+ text: string;
49
+ }, tailwind_variants27.TVReturnType<{
50
+ selected: {
51
+ true: {
52
+ item: string;
53
+ text: string;
54
+ icon: string;
55
+ };
56
+ false: {
57
+ item: string;
58
+ text: string;
59
+ icon: string;
60
+ };
61
+ };
62
+ }, {
63
+ root: string;
64
+ header: string;
65
+ content: string;
66
+ footer: string;
67
+ item: string;
68
+ badge: string;
69
+ icon: string;
70
+ text: string;
71
+ }, undefined, unknown, unknown, undefined>>;
72
+ type SidebarVariants = VariantProps<typeof sidebar>;
73
+ //#endregion
74
+ export { SidebarVariants };
75
+ //# sourceMappingURL=Sidebar.styles.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sidebar.styles.d.mts","names":[],"sources":["../../../src/components/Sidebar/Sidebar.styles.ts"],"mappings":";;;;cAEa,OAAA,EA4BX,mBAAA,CA5BkB,YAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BlB,mBAAA,CAAA,YAAA;;;;;;;;;;;;;;;;;;;;;;;KAEU,eAAA,GAAkB,YAAA,QAAoB,OAAA"}
@@ -0,0 +1,32 @@
1
+ import { tv } from "tailwind-variants";
2
+
3
+ //#region src/components/Sidebar/Sidebar.styles.ts
4
+ const sidebar = tv({
5
+ slots: {
6
+ root: "flex h-screen w-65 flex-col bg-white border-r border-gray-100",
7
+ header: "px-2.5 py-8",
8
+ content: "flex-1 overflow-y-auto px-2.5 py-2",
9
+ footer: "border-t border-gray-100 px-4 py-4",
10
+ item: "group w-full flex items-center gap-2 px-4.5 py-2 rounded-sm text-md transition-colors",
11
+ badge: "ml-auto px-2 py-0.5 text-sm rounded-sm bg-red-100 text-red-400",
12
+ icon: "w-4.5 h-4.5",
13
+ text: "text-md"
14
+ },
15
+ variants: { selected: {
16
+ true: {
17
+ item: "bg-gray-100",
18
+ text: "text-gray-700 typo-subtitle-16-bold",
19
+ icon: "fill-gray-600"
20
+ },
21
+ false: {
22
+ item: "hover:bg-gray-50 active:bg-gray-50",
23
+ text: "typo-body-16-medium text-gray-500 group-hover:text-gray-700 group-active:text-gray-700",
24
+ icon: "fill-gray-300 group-hover:fill-gray-600 group-active:fill-gray-600"
25
+ }
26
+ } },
27
+ defaultVariants: { selected: false }
28
+ });
29
+
30
+ //#endregion
31
+ export { sidebar };
32
+ //# sourceMappingURL=Sidebar.styles.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sidebar.styles.mjs","names":[],"sources":["../../../src/components/Sidebar/Sidebar.styles.ts"],"sourcesContent":["import { tv, VariantProps } from 'tailwind-variants';\n\nexport const sidebar = tv({\n slots: {\n root: 'flex h-screen w-65 flex-col bg-white border-r border-gray-100',\n header: 'px-2.5 py-8',\n content: 'flex-1 overflow-y-auto px-2.5 py-2',\n footer: 'border-t border-gray-100 px-4 py-4',\n item: 'group w-full flex items-center gap-2 px-4.5 py-2 rounded-sm text-md transition-colors',\n badge: 'ml-auto px-2 py-0.5 text-sm rounded-sm bg-red-100 text-red-400',\n icon: 'w-4.5 h-4.5',\n text: 'text-md',\n },\n variants: {\n selected: {\n true: {\n item: 'bg-gray-100',\n text: 'text-gray-700 typo-subtitle-16-bold',\n icon: 'fill-gray-600',\n },\n false: {\n item: 'hover:bg-gray-50 active:bg-gray-50',\n text: 'typo-body-16-medium text-gray-500 group-hover:text-gray-700 group-active:text-gray-700',\n icon: 'fill-gray-300 group-hover:fill-gray-600 group-active:fill-gray-600',\n },\n },\n },\n defaultVariants: {\n selected: false,\n },\n});\n\nexport type SidebarVariants = VariantProps<typeof sidebar>;\n"],"mappings":";;;AAEA,MAAa,UAAU,GAAG;CACxB,OAAO;EACL,MAAM;EACN,QAAQ;EACR,SAAS;EACT,QAAQ;EACR,MAAM;EACN,OAAO;EACP,MAAM;EACN,MAAM;EACP;CACD,UAAU,EACR,UAAU;EACR,MAAM;GACJ,MAAM;GACN,MAAM;GACN,MAAM;GACP;EACD,OAAO;GACL,MAAM;GACN,MAAM;GACN,MAAM;GACP;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/Sidebar/hooks/useSidebarContext.ts
5
+ const SidebarContext = (0, react.createContext)(null);
6
+ const useSidebarContext = () => {
7
+ const context = (0, react.useContext)(SidebarContext);
8
+ if (!context) throw new Error("Sidebar compound components must be used within Sidebar");
9
+ return context;
10
+ };
11
+ const SidebarItemContext = (0, react.createContext)(null);
12
+ const useSidebarItemContext = () => {
13
+ const context = (0, react.useContext)(SidebarItemContext);
14
+ if (!context) throw new Error("Sidebar Item compound components must be used within Sidebar.Item");
15
+ return context;
16
+ };
17
+
18
+ //#endregion
19
+ exports.SidebarContext = SidebarContext;
20
+ exports.SidebarItemContext = SidebarItemContext;
21
+ exports.useSidebarContext = useSidebarContext;
22
+ exports.useSidebarItemContext = useSidebarItemContext;
@@ -0,0 +1,5 @@
1
+ //#region src/components/Sidebar/hooks/useSidebarContext.d.ts
2
+ type SidebarValue = string | number;
3
+ //#endregion
4
+ export { SidebarValue };
5
+ //# sourceMappingURL=useSidebarContext.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSidebarContext.d.cts","names":[],"sources":["../../../../src/components/Sidebar/hooks/useSidebarContext.ts"],"mappings":";KAGY,YAAA"}
@@ -0,0 +1,7 @@
1
+ import "react";
2
+
3
+ //#region src/components/Sidebar/hooks/useSidebarContext.d.ts
4
+ type SidebarValue = string | number;
5
+ //#endregion
6
+ export { SidebarValue };
7
+ //# sourceMappingURL=useSidebarContext.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSidebarContext.d.mts","names":[],"sources":["../../../../src/components/Sidebar/hooks/useSidebarContext.ts"],"mappings":";;;KAGY,YAAA"}
@@ -0,0 +1,19 @@
1
+ import { createContext, useContext } from "react";
2
+
3
+ //#region src/components/Sidebar/hooks/useSidebarContext.ts
4
+ const SidebarContext = createContext(null);
5
+ const useSidebarContext = () => {
6
+ const context = useContext(SidebarContext);
7
+ if (!context) throw new Error("Sidebar compound components must be used within Sidebar");
8
+ return context;
9
+ };
10
+ const SidebarItemContext = createContext(null);
11
+ const useSidebarItemContext = () => {
12
+ const context = useContext(SidebarItemContext);
13
+ if (!context) throw new Error("Sidebar Item compound components must be used within Sidebar.Item");
14
+ return context;
15
+ };
16
+
17
+ //#endregion
18
+ export { SidebarContext, SidebarItemContext, useSidebarContext, useSidebarItemContext };
19
+ //# sourceMappingURL=useSidebarContext.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSidebarContext.mjs","names":[],"sources":["../../../../src/components/Sidebar/hooks/useSidebarContext.ts"],"sourcesContent":["import { createContext, useContext } from 'react';\n\n// Root Context\nexport type SidebarValue = string | number;\n\nexport interface SidebarContextValue {\n selected?: SidebarValue;\n onSelectChange?: (value: SidebarValue) => void;\n}\n\nexport const SidebarContext = createContext<SidebarContextValue | null>(null);\n\nexport const useSidebarContext = () => {\n const context = useContext(SidebarContext);\n if (!context) {\n throw new Error('Sidebar compound components must be used within Sidebar');\n }\n return context;\n};\n\n// Item Context\nexport interface SidebarItemContextValue {\n selected: boolean;\n}\n\nexport const SidebarItemContext = createContext<SidebarItemContextValue | null>(\n null,\n);\n\nexport const useSidebarItemContext = () => {\n const context = useContext(SidebarItemContext);\n if (!context) {\n throw new Error(\n 'Sidebar Item compound components must be used within Sidebar.Item',\n );\n }\n return context;\n};\n"],"mappings":";;;AAUA,MAAa,iBAAiB,cAA0C,KAAK;AAE7E,MAAa,0BAA0B;CACrC,MAAM,UAAU,WAAW,eAAe;AAC1C,KAAI,CAAC,QACH,OAAM,IAAI,MAAM,0DAA0D;AAE5E,QAAO;;AAQT,MAAa,qBAAqB,cAChC,KACD;AAED,MAAa,8BAA8B;CACzC,MAAM,UAAU,WAAW,mBAAmB;AAC9C,KAAI,CAAC,QACH,OAAM,IAAI,MACR,oEACD;AAEH,QAAO"}
@@ -0,0 +1,2 @@
1
+ import { SidebarVariants } from "./Sidebar.styles.mjs";
2
+ import { Sidebar } from "./Sidebar.mjs";
@@ -1,8 +1,8 @@
1
- import * as tailwind_variants11 from "tailwind-variants";
1
+ import * as tailwind_variants9 from "tailwind-variants";
2
2
  import { VariantProps } from "tailwind-variants";
3
3
 
4
4
  //#region src/components/Spacer/Spacer.styles.d.ts
5
- declare const spacer: tailwind_variants11.TVReturnType<{
5
+ declare const spacer: tailwind_variants9.TVReturnType<{
6
6
  size: {
7
7
  1: string;
8
8
  2: string;
@@ -30,7 +30,7 @@ declare const spacer: tailwind_variants11.TVReturnType<{
30
30
  24: string;
31
31
  auto: string;
32
32
  };
33
- }, undefined, tailwind_variants11.TVReturnType<{
33
+ }, undefined, tailwind_variants9.TVReturnType<{
34
34
  size: {
35
35
  1: string;
36
36
  2: string;