@grupor5/raya 0.2.6 → 0.2.8

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.
package/dist/index.d.mts CHANGED
@@ -5,7 +5,7 @@ export { StrokeColorToken, StrokeDirection, StrokeToken, componentStrokes, creat
5
5
  export { badgeTokens } from './tokens/badge.mjs';
6
6
  export { tagTokens } from './tokens/tag.mjs';
7
7
  import * as react_jsx_runtime from 'react/jsx-runtime';
8
- import { ReactNode } from 'react';
8
+ import React__default, { ReactNode } from 'react';
9
9
  export { classNames } from './utils/classNames.mjs';
10
10
  export { cn } from './utils/cn.mjs';
11
11
  export { Badge, BadgeProps, badgeVariants } from './atoms/badge/index.mjs';
@@ -27,6 +27,7 @@ export { Step, StepContent, StepDescription, StepLabel, Stepper, StepperAPI, use
27
27
  export { Dropdown, DropdownProps } from './molecules/dropdown/index.mjs';
28
28
  export { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from './molecules/accordion/index.mjs';
29
29
  export { ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent } from './molecules/chart/index.mjs';
30
+ export { Grid, GridItem, GridItemProps, GridProps, ResponsiveValue } from './molecules/grid/index.mjs';
30
31
  export { useModal } from './hooks/useModal.mjs';
31
32
  import 'clsx';
32
33
  import 'class-variance-authority/dist/types';
@@ -66,6 +67,112 @@ interface ModalProps {
66
67
  }
67
68
  declare function Modal({ open, onClose, children }: ModalProps): react_jsx_runtime.JSX.Element | null;
68
69
 
70
+ /**
71
+ * Navigation item interface
72
+ */
73
+ interface NavigationItem {
74
+ id: string;
75
+ label: string;
76
+ icon?: React__default.ReactNode;
77
+ path: string;
78
+ badge?: string | number;
79
+ children?: NavigationItem[];
80
+ isCollapsible?: boolean;
81
+ }
82
+ /**
83
+ * Brand information interface
84
+ */
85
+ interface BrandInfo {
86
+ logo?: React__default.ReactNode;
87
+ name: string;
88
+ tagline?: string;
89
+ }
90
+ /**
91
+ * Sidebar component props
92
+ */
93
+ interface SidebarProps {
94
+ /** Brand information displayed at the top */
95
+ brand: BrandInfo;
96
+ /** Navigation items */
97
+ navigation: NavigationItem[];
98
+ /** Current active path */
99
+ currentPath?: string;
100
+ /** Whether the sidebar is collapsed */
101
+ collapsed?: boolean;
102
+ /** Callback when navigation item is clicked */
103
+ onNavigate?: (item: NavigationItem) => void;
104
+ /** Callback when collapse toggle is clicked */
105
+ onToggleCollapse?: () => void;
106
+ /** Custom className */
107
+ className?: string;
108
+ /** Data test id for testing */
109
+ 'data-testid'?: string;
110
+ }
111
+ /**
112
+ * # Sidebar - Navigation Organismo
113
+ *
114
+ * ## 🚨 GRID SYSTEM COMPLIANCE
115
+ *
116
+ * Este componente está diseñado para ocupar **2 columnas** en el grid system del Raya Design System.
117
+ * Debe usarse dentro de un Grid container para mantener la consistencia de layouts.
118
+ *
119
+ * ### Features
120
+ * - **Grid Integration**: Ocupa exactamente 2 columnas del sistema de grid
121
+ * - **Responsive Behavior**: Se adapta a diferentes breakpoints
122
+ * - **Navigation System**: Soporte para navegación jerárquica y badges
123
+ * - **Brand Display**: Logo y información de marca
124
+ * - **Collapsible**: Opción de colapsar para ahorrar espacio
125
+ * - **Accessibility**: ARIA labels y navegación por teclado
126
+ *
127
+ * ### Grid Usage
128
+ * ```tsx
129
+ * <Grid cols={12} margin>
130
+ * <GridItem span={{ mobile: 12, desktop: 2 }}>
131
+ * <Sidebar {...props} />
132
+ * </GridItem>
133
+ * <GridItem span={{ mobile: 12, desktop: 10 }}>
134
+ * <MainContent />
135
+ * </GridItem>
136
+ * </Grid>
137
+ * ```
138
+ *
139
+ * @example
140
+ * ```tsx
141
+ * // Basic sidebar with navigation
142
+ * <Sidebar
143
+ * brand={{ name: "Manta Seguros" }}
144
+ * navigation={[
145
+ * { id: "dashboard", label: "Dashboard", icon: <HomeIcon />, path: "/" },
146
+ * { id: "products", label: "Productos", icon: <ProductIcon />, path: "/products" },
147
+ * ]}
148
+ * currentPath="/dashboard"
149
+ * onNavigate={(item) => navigate(item.path)}
150
+ * />
151
+ * ```
152
+ *
153
+ * @example
154
+ * ```tsx
155
+ * // Sidebar with hierarchical navigation
156
+ * <Sidebar
157
+ * brand={{ name: "Admin Panel", tagline: "Management System" }}
158
+ * navigation={[
159
+ * {
160
+ * id: "products",
161
+ * label: "Productos",
162
+ * icon: <ProductIcon />,
163
+ * path: "/products",
164
+ * isCollapsible: true,
165
+ * children: [
166
+ * { id: "all-products", label: "Todos", path: "/products" },
167
+ * { id: "categories", label: "Categorías", path: "/products/categories" }
168
+ * ]
169
+ * }
170
+ * ]}
171
+ * />
172
+ * ```
173
+ */
174
+ declare const Sidebar: React__default.ForwardRefExoticComponent<SidebarProps & React__default.RefAttributes<HTMLDivElement>>;
175
+
69
176
  interface AuthLayoutProps {
70
177
  children: ReactNode;
71
178
  }
@@ -77,4 +184,4 @@ interface IconProps extends React.SVGProps<SVGSVGElement> {
77
184
  color?: string;
78
185
  }
79
186
 
80
- export { AuthLayout, type IconProps, Modal, type Size, ThemeProvider, useTheme };
187
+ export { AuthLayout, type BrandInfo, type IconProps, Modal, type NavigationItem, Sidebar, type SidebarProps, type Size, ThemeProvider, useTheme };
package/dist/index.d.ts CHANGED
@@ -5,7 +5,7 @@ export { StrokeColorToken, StrokeDirection, StrokeToken, componentStrokes, creat
5
5
  export { badgeTokens } from './tokens/badge.js';
6
6
  export { tagTokens } from './tokens/tag.js';
7
7
  import * as react_jsx_runtime from 'react/jsx-runtime';
8
- import { ReactNode } from 'react';
8
+ import React__default, { ReactNode } from 'react';
9
9
  export { classNames } from './utils/classNames.js';
10
10
  export { cn } from './utils/cn.js';
11
11
  export { Badge, BadgeProps, badgeVariants } from './atoms/badge/index.js';
@@ -27,6 +27,7 @@ export { Step, StepContent, StepDescription, StepLabel, Stepper, StepperAPI, use
27
27
  export { Dropdown, DropdownProps } from './molecules/dropdown/index.js';
28
28
  export { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from './molecules/accordion/index.js';
29
29
  export { ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent } from './molecules/chart/index.js';
30
+ export { Grid, GridItem, GridItemProps, GridProps, ResponsiveValue } from './molecules/grid/index.js';
30
31
  export { useModal } from './hooks/useModal.js';
31
32
  import 'clsx';
32
33
  import 'class-variance-authority/dist/types';
@@ -66,6 +67,112 @@ interface ModalProps {
66
67
  }
67
68
  declare function Modal({ open, onClose, children }: ModalProps): react_jsx_runtime.JSX.Element | null;
68
69
 
70
+ /**
71
+ * Navigation item interface
72
+ */
73
+ interface NavigationItem {
74
+ id: string;
75
+ label: string;
76
+ icon?: React__default.ReactNode;
77
+ path: string;
78
+ badge?: string | number;
79
+ children?: NavigationItem[];
80
+ isCollapsible?: boolean;
81
+ }
82
+ /**
83
+ * Brand information interface
84
+ */
85
+ interface BrandInfo {
86
+ logo?: React__default.ReactNode;
87
+ name: string;
88
+ tagline?: string;
89
+ }
90
+ /**
91
+ * Sidebar component props
92
+ */
93
+ interface SidebarProps {
94
+ /** Brand information displayed at the top */
95
+ brand: BrandInfo;
96
+ /** Navigation items */
97
+ navigation: NavigationItem[];
98
+ /** Current active path */
99
+ currentPath?: string;
100
+ /** Whether the sidebar is collapsed */
101
+ collapsed?: boolean;
102
+ /** Callback when navigation item is clicked */
103
+ onNavigate?: (item: NavigationItem) => void;
104
+ /** Callback when collapse toggle is clicked */
105
+ onToggleCollapse?: () => void;
106
+ /** Custom className */
107
+ className?: string;
108
+ /** Data test id for testing */
109
+ 'data-testid'?: string;
110
+ }
111
+ /**
112
+ * # Sidebar - Navigation Organismo
113
+ *
114
+ * ## 🚨 GRID SYSTEM COMPLIANCE
115
+ *
116
+ * Este componente está diseñado para ocupar **2 columnas** en el grid system del Raya Design System.
117
+ * Debe usarse dentro de un Grid container para mantener la consistencia de layouts.
118
+ *
119
+ * ### Features
120
+ * - **Grid Integration**: Ocupa exactamente 2 columnas del sistema de grid
121
+ * - **Responsive Behavior**: Se adapta a diferentes breakpoints
122
+ * - **Navigation System**: Soporte para navegación jerárquica y badges
123
+ * - **Brand Display**: Logo y información de marca
124
+ * - **Collapsible**: Opción de colapsar para ahorrar espacio
125
+ * - **Accessibility**: ARIA labels y navegación por teclado
126
+ *
127
+ * ### Grid Usage
128
+ * ```tsx
129
+ * <Grid cols={12} margin>
130
+ * <GridItem span={{ mobile: 12, desktop: 2 }}>
131
+ * <Sidebar {...props} />
132
+ * </GridItem>
133
+ * <GridItem span={{ mobile: 12, desktop: 10 }}>
134
+ * <MainContent />
135
+ * </GridItem>
136
+ * </Grid>
137
+ * ```
138
+ *
139
+ * @example
140
+ * ```tsx
141
+ * // Basic sidebar with navigation
142
+ * <Sidebar
143
+ * brand={{ name: "Manta Seguros" }}
144
+ * navigation={[
145
+ * { id: "dashboard", label: "Dashboard", icon: <HomeIcon />, path: "/" },
146
+ * { id: "products", label: "Productos", icon: <ProductIcon />, path: "/products" },
147
+ * ]}
148
+ * currentPath="/dashboard"
149
+ * onNavigate={(item) => navigate(item.path)}
150
+ * />
151
+ * ```
152
+ *
153
+ * @example
154
+ * ```tsx
155
+ * // Sidebar with hierarchical navigation
156
+ * <Sidebar
157
+ * brand={{ name: "Admin Panel", tagline: "Management System" }}
158
+ * navigation={[
159
+ * {
160
+ * id: "products",
161
+ * label: "Productos",
162
+ * icon: <ProductIcon />,
163
+ * path: "/products",
164
+ * isCollapsible: true,
165
+ * children: [
166
+ * { id: "all-products", label: "Todos", path: "/products" },
167
+ * { id: "categories", label: "Categorías", path: "/products/categories" }
168
+ * ]
169
+ * }
170
+ * ]}
171
+ * />
172
+ * ```
173
+ */
174
+ declare const Sidebar: React__default.ForwardRefExoticComponent<SidebarProps & React__default.RefAttributes<HTMLDivElement>>;
175
+
69
176
  interface AuthLayoutProps {
70
177
  children: ReactNode;
71
178
  }
@@ -77,4 +184,4 @@ interface IconProps extends React.SVGProps<SVGSVGElement> {
77
184
  color?: string;
78
185
  }
79
186
 
80
- export { AuthLayout, type IconProps, Modal, type Size, ThemeProvider, useTheme };
187
+ export { AuthLayout, type BrandInfo, type IconProps, Modal, type NavigationItem, Sidebar, type SidebarProps, type Size, ThemeProvider, useTheme };
package/dist/index.js CHANGED
@@ -2613,10 +2613,363 @@ function getPayloadConfigFromPayload(config, payload, key) {
2613
2613
  }
2614
2614
  return configLabelKey in config ? config[configLabelKey] : config[key];
2615
2615
  }
2616
+ var getColsClasses = (cols) => {
2617
+ if (typeof cols === "number") {
2618
+ return `grid-cols-${cols}`;
2619
+ }
2620
+ if (typeof cols === "object" && cols !== null) {
2621
+ const classes = [];
2622
+ if (cols.mobile) {
2623
+ classes.push(`grid-cols-${cols.mobile}`);
2624
+ }
2625
+ if (cols.tablet) {
2626
+ classes.push(`md:grid-cols-${cols.tablet}`);
2627
+ }
2628
+ if (cols.desktop) {
2629
+ classes.push(`lg:grid-cols-${cols.desktop}`);
2630
+ }
2631
+ return classes.join(" ");
2632
+ }
2633
+ return "grid-cols-4 md:grid-cols-8 lg:grid-cols-12";
2634
+ };
2635
+ var getGapClasses = (gap) => {
2636
+ if (typeof gap === "string") {
2637
+ const gapMap = {
2638
+ xs: "gap-1",
2639
+ // 4px
2640
+ s: "gap-2",
2641
+ // 8px
2642
+ m: "gap-4",
2643
+ // 16px
2644
+ l: "gap-6",
2645
+ // 24px
2646
+ xl: "gap-8"
2647
+ // 32px
2648
+ };
2649
+ return gapMap[gap] || "gap-4";
2650
+ }
2651
+ if (typeof gap === "object" && gap !== null) {
2652
+ const gapMap = {
2653
+ xs: "1",
2654
+ s: "2",
2655
+ m: "4",
2656
+ l: "6",
2657
+ xl: "8"
2658
+ };
2659
+ const classes = [];
2660
+ if (gap.mobile) {
2661
+ classes.push(`gap-${gapMap[gap.mobile] || "4"}`);
2662
+ }
2663
+ if (gap.tablet) {
2664
+ classes.push(`md:gap-${gapMap[gap.tablet] || "5"}`);
2665
+ }
2666
+ if (gap.desktop) {
2667
+ classes.push(`lg:gap-${gapMap[gap.desktop] || "6"}`);
2668
+ }
2669
+ return classes.join(" ");
2670
+ }
2671
+ return "gap-4 md:gap-5 lg:gap-6";
2672
+ };
2673
+ var getSpanClasses = (span) => {
2674
+ if (typeof span === "number") {
2675
+ return `col-span-${span}`;
2676
+ }
2677
+ if (typeof span === "object" && span !== null) {
2678
+ const classes = [];
2679
+ if (span.mobile) {
2680
+ classes.push(`col-span-${span.mobile}`);
2681
+ }
2682
+ if (span.tablet) {
2683
+ classes.push(`md:col-span-${span.tablet}`);
2684
+ }
2685
+ if (span.desktop) {
2686
+ classes.push(`lg:col-span-${span.desktop}`);
2687
+ }
2688
+ return classes.join(" ");
2689
+ }
2690
+ return "";
2691
+ };
2692
+ var getRowSpanClasses = (rowSpan) => {
2693
+ if (typeof rowSpan === "number") {
2694
+ return `row-span-${rowSpan}`;
2695
+ }
2696
+ if (typeof rowSpan === "object" && rowSpan !== null) {
2697
+ const classes = [];
2698
+ if (rowSpan.mobile) {
2699
+ classes.push(`row-span-${rowSpan.mobile}`);
2700
+ }
2701
+ if (rowSpan.tablet) {
2702
+ classes.push(`md:row-span-${rowSpan.tablet}`);
2703
+ }
2704
+ if (rowSpan.desktop) {
2705
+ classes.push(`lg:row-span-${rowSpan.desktop}`);
2706
+ }
2707
+ return classes.join(" ");
2708
+ }
2709
+ return "";
2710
+ };
2711
+ var getColPositionClasses = (colStart, colEnd) => {
2712
+ const classes = [];
2713
+ if (colStart) {
2714
+ if (typeof colStart === "number") {
2715
+ classes.push(`col-start-${colStart}`);
2716
+ } else if (typeof colStart === "object") {
2717
+ if (colStart.mobile) classes.push(`col-start-${colStart.mobile}`);
2718
+ if (colStart.tablet) classes.push(`md:col-start-${colStart.tablet}`);
2719
+ if (colStart.desktop) classes.push(`lg:col-start-${colStart.desktop}`);
2720
+ }
2721
+ }
2722
+ if (colEnd) {
2723
+ if (typeof colEnd === "number") {
2724
+ classes.push(`col-end-${colEnd}`);
2725
+ } else if (typeof colEnd === "object") {
2726
+ if (colEnd.mobile) classes.push(`col-end-${colEnd.mobile}`);
2727
+ if (colEnd.tablet) classes.push(`md:col-end-${colEnd.tablet}`);
2728
+ if (colEnd.desktop) classes.push(`lg:col-end-${colEnd.desktop}`);
2729
+ }
2730
+ }
2731
+ return classes.join(" ");
2732
+ };
2733
+ var Grid = React17__namespace.default.forwardRef(
2734
+ (_a, ref) => {
2735
+ var _b = _a, {
2736
+ container = true,
2737
+ cols,
2738
+ gap,
2739
+ margin = false,
2740
+ className,
2741
+ children,
2742
+ "aria-label": ariaLabel,
2743
+ "data-testid": dataTestId
2744
+ } = _b, props = __objRest(_b, [
2745
+ "container",
2746
+ "cols",
2747
+ "gap",
2748
+ "margin",
2749
+ "className",
2750
+ "children",
2751
+ "aria-label",
2752
+ "data-testid"
2753
+ ]);
2754
+ const gridClasses = cn(
2755
+ // Base grid styles
2756
+ container && "grid",
2757
+ // Maximum width containers following design system
2758
+ "max-w-grid-mobile",
2759
+ // Mobile: 412px max-width
2760
+ "md:max-w-grid-tablet",
2761
+ // Tablet: 834px max-width
2762
+ "lg:max-w-grid-desktop",
2763
+ // Desktop: 1440px max-width
2764
+ // Center containers when margin is enabled
2765
+ margin && "mx-auto",
2766
+ // Column configuration
2767
+ getColsClasses(cols),
2768
+ // Gap configuration
2769
+ getGapClasses(gap),
2770
+ // Padding configuration (follows design system)
2771
+ margin && "px-4 md:px-5 lg:px-6",
2772
+ // Custom classes
2773
+ className
2774
+ );
2775
+ return /* @__PURE__ */ jsxRuntime.jsx(
2776
+ "div",
2777
+ __spreadProps(__spreadValues({
2778
+ ref,
2779
+ className: gridClasses,
2780
+ "aria-label": ariaLabel,
2781
+ "data-testid": dataTestId
2782
+ }, props), {
2783
+ children
2784
+ })
2785
+ );
2786
+ }
2787
+ );
2788
+ Grid.displayName = "Grid";
2789
+ var GridItem = React17__namespace.default.forwardRef(
2790
+ (_a, ref) => {
2791
+ var _b = _a, {
2792
+ span,
2793
+ rowSpan,
2794
+ colStart,
2795
+ colEnd,
2796
+ className,
2797
+ children,
2798
+ "data-testid": dataTestId
2799
+ } = _b, props = __objRest(_b, [
2800
+ "span",
2801
+ "rowSpan",
2802
+ "colStart",
2803
+ "colEnd",
2804
+ "className",
2805
+ "children",
2806
+ "data-testid"
2807
+ ]);
2808
+ const itemClasses = cn(
2809
+ // Span configuration
2810
+ getSpanClasses(span),
2811
+ // Row span configuration
2812
+ getRowSpanClasses(rowSpan),
2813
+ // Position configuration
2814
+ getColPositionClasses(colStart, colEnd),
2815
+ // Custom classes
2816
+ className
2817
+ );
2818
+ return /* @__PURE__ */ jsxRuntime.jsx(
2819
+ "div",
2820
+ __spreadProps(__spreadValues({
2821
+ ref,
2822
+ className: itemClasses,
2823
+ "data-testid": dataTestId
2824
+ }, props), {
2825
+ children
2826
+ })
2827
+ );
2828
+ }
2829
+ );
2830
+ GridItem.displayName = "GridItem";
2616
2831
  function Modal({ open, onClose, children }) {
2617
2832
  if (!open) return null;
2618
2833
  return /* @__PURE__ */ jsxRuntime.jsx("div", { style: { position: "fixed", top: 0, left: 0, right: 0, bottom: 0, background: "rgba(0,0,0,0.5)" }, onClick: onClose, children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { margin: "100px auto", background: "#fff", padding: 24, borderRadius: 8, minWidth: 320 }, onClick: (e) => e.stopPropagation(), children }) });
2619
2834
  }
2835
+ var NavigationItemComponent = ({ item, isActive, onNavigate, collapsed = false, level = 0 }) => {
2836
+ var _a;
2837
+ const [isExpanded, setIsExpanded] = React17__namespace.default.useState(false);
2838
+ const hasChildren = item.children && item.children.length > 0;
2839
+ const handleClick = () => {
2840
+ if (hasChildren && item.isCollapsible) {
2841
+ setIsExpanded(!isExpanded);
2842
+ } else {
2843
+ onNavigate == null ? void 0 : onNavigate(item);
2844
+ }
2845
+ };
2846
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
2847
+ /* @__PURE__ */ jsxRuntime.jsx(
2848
+ Button,
2849
+ {
2850
+ variant: isActive ? "secondary" : "ghost",
2851
+ size: "sm",
2852
+ onClick: handleClick,
2853
+ className: cn(
2854
+ "w-full justify-start text-left font-normal h-10",
2855
+ level > 0 && "ml-4",
2856
+ isActive && "bg-primary-100 text-primary-900 font-medium"
2857
+ ),
2858
+ "data-testid": `nav-item-${item.id}`,
2859
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between w-full", children: [
2860
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
2861
+ item.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("text-gray-500", isActive && "text-primary-600"), children: item.icon }),
2862
+ !collapsed && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm", children: item.label })
2863
+ ] }),
2864
+ !collapsed && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
2865
+ item.badge && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "bg-red-500 text-white text-xs px-2 py-1 rounded-full min-w-[20px] text-center", children: item.badge }),
2866
+ hasChildren && item.isCollapsible && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(
2867
+ "text-gray-400 transition-transform",
2868
+ isExpanded && "rotate-90"
2869
+ ), children: "\u25B6" })
2870
+ ] })
2871
+ ] })
2872
+ }
2873
+ ),
2874
+ hasChildren && isExpanded && !collapsed && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-1", children: (_a = item.children) == null ? void 0 : _a.map((child) => /* @__PURE__ */ jsxRuntime.jsx(
2875
+ NavigationItemComponent,
2876
+ {
2877
+ item: child,
2878
+ isActive: child.path === item.path,
2879
+ onNavigate,
2880
+ collapsed,
2881
+ level: level + 1
2882
+ },
2883
+ child.id
2884
+ )) })
2885
+ ] });
2886
+ };
2887
+ var Sidebar = React17__namespace.default.forwardRef(
2888
+ (_a, ref) => {
2889
+ var _b = _a, {
2890
+ brand,
2891
+ navigation,
2892
+ currentPath,
2893
+ collapsed = false,
2894
+ onNavigate,
2895
+ onToggleCollapse,
2896
+ className,
2897
+ "data-testid": dataTestId
2898
+ } = _b, props = __objRest(_b, [
2899
+ "brand",
2900
+ "navigation",
2901
+ "currentPath",
2902
+ "collapsed",
2903
+ "onNavigate",
2904
+ "onToggleCollapse",
2905
+ "className",
2906
+ "data-testid"
2907
+ ]);
2908
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2909
+ "div",
2910
+ __spreadProps(__spreadValues({
2911
+ ref,
2912
+ className: cn(
2913
+ "h-full bg-white border-r border-gray-200 flex flex-col",
2914
+ "transition-all duration-300",
2915
+ collapsed ? "w-16" : "w-full",
2916
+ className
2917
+ ),
2918
+ "data-testid": dataTestId
2919
+ }, props), {
2920
+ children: [
2921
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(
2922
+ "p-4 border-b border-gray-100",
2923
+ collapsed && "px-2"
2924
+ ), children: [
2925
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
2926
+ brand.logo && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0", children: brand.logo }),
2927
+ !collapsed && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
2928
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "subheading-md", className: "text-gray-900 font-bold truncate", children: brand.name }),
2929
+ brand.tagline && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body-xs", className: "text-gray-500 truncate", children: brand.tagline })
2930
+ ] })
2931
+ ] }),
2932
+ onToggleCollapse && /* @__PURE__ */ jsxRuntime.jsxs(
2933
+ Button,
2934
+ {
2935
+ variant: "ghost",
2936
+ size: "sm",
2937
+ onClick: onToggleCollapse,
2938
+ className: cn(
2939
+ "mt-3 w-full h-8",
2940
+ collapsed && "w-8 mx-auto"
2941
+ ),
2942
+ "data-testid": "sidebar-toggle",
2943
+ children: [
2944
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(
2945
+ "transition-transform",
2946
+ collapsed && "rotate-180"
2947
+ ), children: "\u25C0" }),
2948
+ !collapsed && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-2 text-xs", children: "Colapsar" })
2949
+ ]
2950
+ }
2951
+ )
2952
+ ] }),
2953
+ /* @__PURE__ */ jsxRuntime.jsx("nav", { className: "flex-1 p-4 space-y-2 overflow-y-auto", children: navigation.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
2954
+ NavigationItemComponent,
2955
+ {
2956
+ item,
2957
+ isActive: currentPath === item.path,
2958
+ onNavigate,
2959
+ collapsed
2960
+ },
2961
+ item.id
2962
+ )) }),
2963
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(
2964
+ "p-4 border-t border-gray-100",
2965
+ collapsed && "px-2"
2966
+ ), children: !collapsed && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body-xs", className: "text-gray-400 text-center", children: "\xA9 2024 Design System" }) })
2967
+ ]
2968
+ })
2969
+ );
2970
+ }
2971
+ );
2972
+ Sidebar.displayName = "Sidebar";
2620
2973
  function AuthLayout({ children }) {
2621
2974
  return /* @__PURE__ */ jsxRuntime.jsx("div", { style: { minHeight: "100vh", display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ jsxRuntime.jsx("main", { children }) });
2622
2975
  }
@@ -2659,6 +3012,8 @@ exports.Form = Form;
2659
3012
  exports.FormField = FormField;
2660
3013
  exports.FormLabel = FormLabel;
2661
3014
  exports.FormMessage = FormMessage;
3015
+ exports.Grid = Grid;
3016
+ exports.GridItem = GridItem;
2662
3017
  exports.Input = Input;
2663
3018
  exports.Label = Label;
2664
3019
  exports.Modal = Modal;
@@ -2666,6 +3021,7 @@ exports.Paragraph = Paragraph;
2666
3021
  exports.ProgressBar = ProgressBar;
2667
3022
  exports.RadioGroup = RadioGroup;
2668
3023
  exports.RadioGroupItem = RadioGroupItem;
3024
+ exports.Sidebar = Sidebar;
2669
3025
  exports.Step = Step;
2670
3026
  exports.StepContent = StepContent;
2671
3027
  exports.StepDescription = StepDescription;