@imj_media/ui 1.8.3 → 1.8.4

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 (35) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +1 -1
  3. package/dist/index.css +1 -1
  4. package/dist/index.esm.js +7777 -7164
  5. package/dist/index.esm.js.map +1 -1
  6. package/dist/index.js +33 -33
  7. package/dist/index.js.map +1 -1
  8. package/dist/modules/Lists/components/molecules/ListItemDefault.d.ts +3 -1
  9. package/dist/modules/Lists/components/molecules/ListItemDefault.d.ts.map +1 -1
  10. package/dist/modules/Sidebar/components/atoms/SidebarDivider.d.ts.map +1 -1
  11. package/dist/modules/Sidebar/components/atoms/SidebarSectionTitle.d.ts +2 -2
  12. package/dist/modules/Sidebar/components/molecules/SidebarDrilldownPanel.d.ts +20 -0
  13. package/dist/modules/Sidebar/components/molecules/SidebarDrilldownPanel.d.ts.map +1 -0
  14. package/dist/modules/Sidebar/components/molecules/SidebarMenuGroup.d.ts +3 -5
  15. package/dist/modules/Sidebar/components/molecules/SidebarMenuGroup.d.ts.map +1 -1
  16. package/dist/modules/Sidebar/components/molecules/SidebarUserProfile.d.ts +2 -7
  17. package/dist/modules/Sidebar/components/molecules/SidebarUserProfile.d.ts.map +1 -1
  18. package/dist/modules/Sidebar/components/molecules/SidebarWorkspaceCard.d.ts +3 -5
  19. package/dist/modules/Sidebar/components/molecules/SidebarWorkspaceCard.d.ts.map +1 -1
  20. package/dist/modules/Sidebar/components/molecules/index.d.ts +1 -0
  21. package/dist/modules/Sidebar/components/molecules/index.d.ts.map +1 -1
  22. package/dist/modules/Sidebar/components/organisms/Sidebar.d.ts +10 -25
  23. package/dist/modules/Sidebar/components/organisms/Sidebar.d.ts.map +1 -1
  24. package/dist/modules/Sidebar/index.d.ts +18 -9
  25. package/dist/modules/Sidebar/index.d.ts.map +1 -1
  26. package/dist/modules/Sidebar/stories/Sidebar.stories.d.ts +8 -0
  27. package/dist/modules/Sidebar/stories/Sidebar.stories.d.ts.map +1 -1
  28. package/dist/modules/Sidebar/stories/SidebarDrilldownPanel.stories.d.ts +18 -0
  29. package/dist/modules/Sidebar/stories/SidebarDrilldownPanel.stories.d.ts.map +1 -0
  30. package/dist/modules/Sidebar/types/index.d.ts +167 -28
  31. package/dist/modules/Sidebar/types/index.d.ts.map +1 -1
  32. package/dist/modules/Table/Table.d.ts.map +1 -1
  33. package/dist/modules/Table/hooks/useTableSelection.d.ts +5 -0
  34. package/dist/modules/Table/hooks/useTableSelection.d.ts.map +1 -1
  35. package/package.json +1 -1
@@ -1,8 +1,10 @@
1
- import { VisualSlotType, IconFontColor } from '../../../../shared/types/types';
1
+ import { VisualSlotType, IconFontColor, IconFontSize } from '../../../../shared/types/types';
2
2
  import { default as React } from 'react';
3
3
  export interface ListItemDefaultProps {
4
4
  children: React.ReactNode;
5
5
  icon?: VisualSlotType;
6
+ /** Leading icon size (default `sm`). Trailing chevrons are rendered by the caller (e.g. `SidebarMenuItem` uses `xs` on the right only). */
7
+ iconSize?: IconFontSize;
6
8
  iconColor?: IconFontColor;
7
9
  iconDuotonePrimary?: IconFontColor;
8
10
  iconDuotoneSecondary?: IconFontColor;
@@ -1 +1 @@
1
- {"version":3,"file":"ListItemDefault.d.ts","sourceRoot":"","sources":["../../../../../src/modules/Lists/components/molecules/ListItemDefault.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,SAAS,CAAC,EAAE,aAAa,CAAC;IAE1B,kBAAkB,CAAC,EAAE,aAAa,CAAC;IACnC,oBAAoB,CAAC,EAAE,aAAa,CAAC;IACrC,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IACvB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAuE1D,CAAC"}
1
+ {"version":3,"file":"ListItemDefault.d.ts","sourceRoot":"","sources":["../../../../../src/modules/Lists/components/molecules/ListItemDefault.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACnF,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,2IAA2I;IAC3I,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,SAAS,CAAC,EAAE,aAAa,CAAC;IAE1B,kBAAkB,CAAC,EAAE,aAAa,CAAC;IACnC,oBAAoB,CAAC,EAAE,aAAa,CAAC;IACrC,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IACvB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAyE1D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SidebarDivider.d.ts","sourceRoot":"","sources":["../../../../../src/modules/Sidebar/components/atoms/SidebarDivider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAqBxD,CAAC"}
1
+ {"version":3,"file":"SidebarDivider.d.ts","sourceRoot":"","sources":["../../../../../src/modules/Sidebar/components/atoms/SidebarDivider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA2BxD,CAAC"}
@@ -4,8 +4,8 @@ import { SidebarSectionTitleProps } from '../../types';
4
4
  * ============================================
5
5
  * SIDEBAR SECTION TITLE - ATOM
6
6
  * ============================================
7
- * Título de sección para el sidebar.
8
- * Usado para dividir grupos de menús.
7
+ * Section label for the sidebar; groups menu blocks.
8
+ * Body XS Regular, tertiary, sentence case (no uppercase transform).
9
9
  */
10
10
  export declare const SidebarSectionTitle: React.FC<SidebarSectionTitleProps>;
11
11
  //# sourceMappingURL=SidebarSectionTitle.d.ts.map
@@ -0,0 +1,20 @@
1
+ import { default as React } from 'react';
2
+ import { SidebarDrilldownPanelProps } from '../../types';
3
+ /**
4
+ * Second-level sidebar region: back control, optional breadcrumb, and submenu rows.
5
+ * Presentation-only: routing and `href` handling belong to the host via `onActivateSubmenu`.
6
+ *
7
+ * @example
8
+ * ```tsx
9
+ * <SidebarDrilldownPanel
10
+ * expanded
11
+ * breadcrumbRootLabel="Campaigns"
12
+ * parentItem={{ title: "Tools", submenus: [{ title: "Map", href: "#/map" }] }}
13
+ * onBack={() => {}}
14
+ * isSubmenuActive={(s) => s.href === "#/map"}
15
+ * onActivateSubmenu={(s) => navigate(s.href)}
16
+ * />
17
+ * ```
18
+ */
19
+ export declare const SidebarDrilldownPanel: React.FC<SidebarDrilldownPanelProps>;
20
+ //# sourceMappingURL=SidebarDrilldownPanel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SidebarDrilldownPanel.d.ts","sourceRoot":"","sources":["../../../../../src/modules/Sidebar/components/molecules/SidebarDrilldownPanel.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,OAAO,KAAK,EACV,0BAA0B,EAE3B,MAAM,aAAa,CAAC;AAQrB;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,0BAA0B,CAqMtE,CAAC"}
@@ -1,11 +1,9 @@
1
1
  import { default as React } from 'react';
2
2
  import { SidebarMenuGroupProps } from '../../types';
3
3
  /**
4
- * ============================================
5
- * SIDEBAR MENU GROUP - MOLECULE
6
- * ============================================
7
- * Agrupa items del menú bajo un título de sección opcional.
8
- * Combina SidebarDivider y SidebarMenuItem.
4
+ * Groups menu rows under an optional section title (Figma section headers).
5
+ * With `collapsible`, the header toggles the item list (chevron up/down).
6
+ * When `collapsed`, titled groups render a plain divider (unless skipped) and items only.
9
7
  */
10
8
  export declare const SidebarMenuGroup: React.FC<SidebarMenuGroupProps>;
11
9
  //# sourceMappingURL=SidebarMenuGroup.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SidebarMenuGroup.d.ts","sourceRoot":"","sources":["../../../../../src/modules/Sidebar/components/molecules/SidebarMenuGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAGpD;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAc5D,CAAC"}
1
+ {"version":3,"file":"SidebarMenuGroup.d.ts","sourceRoot":"","sources":["../../../../../src/modules/Sidebar/components/molecules/SidebarMenuGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAIxC,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAGpD;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CA8G5D,CAAC"}
@@ -1,13 +1,8 @@
1
1
  import { default as React } from 'react';
2
2
  import { SidebarUserProfileProps } from '../../types';
3
3
  /**
4
- * ============================================
5
- * SIDEBAR USER PROFILE - MOLECULE
6
- * ============================================
7
- * Sección del perfil del usuario con avatar, nombre, rol
8
- * y botón de logout.
9
- *
10
- * Reutiliza el componente ListItemUser para mantener DRY.
4
+ * Sidebar user rail (avatar, name, subtitle) with an optional account menu in a border popover
5
+ * without arrow (`popoverArrow={false}`), aligned with Sidebar-Menu Figma `290:52422`.
11
6
  */
12
7
  export declare const SidebarUserProfile: React.FC<SidebarUserProfileProps>;
13
8
  //# sourceMappingURL=SidebarUserProfile.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SidebarUserProfile.d.ts","sourceRoot":"","sources":["../../../../../src/modules/Sidebar/components/molecules/SidebarUserProfile.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAKtD;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAwChE,CAAC"}
1
+ {"version":3,"file":"SidebarUserProfile.d.ts","sourceRoot":"","sources":["../../../../../src/modules/Sidebar/components/molecules/SidebarUserProfile.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAgBnD,OAAO,KAAK,EAEV,uBAAuB,EAExB,MAAM,aAAa,CAAC;AAsIrB;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAmEhE,CAAC"}
@@ -1,11 +1,9 @@
1
1
  import { default as React } from 'react';
2
2
  import { SidebarWorkspaceCardProps } from '../../types';
3
3
  /**
4
- * ============================================
5
- * SIDEBAR WORKSPACE CARD - MOLECULE
6
- * ============================================
7
- * Tarjeta que muestra información del workspace/proyecto actual
8
- * con acciones rápidas en hover.
4
+ * “Mesa de trabajo” surface for the sidebar rail (Figma Sidebar-Menu `_Storage Usage Widget`):
5
+ * gradient fill, dashed border, section label, icon + primary line + badge, divider, text CTAs.
6
+ * Icon + headline sit on one marquee track (vertically centered vs. badge); hover scrolls icon + title together (see `ui-sidebar-workspace-marquee-*` in shared styles).
9
7
  */
10
8
  export declare const SidebarWorkspaceCard: React.FC<SidebarWorkspaceCardProps>;
11
9
  //# sourceMappingURL=SidebarWorkspaceCard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SidebarWorkspaceCard.d.ts","sourceRoot":"","sources":["../../../../../src/modules/Sidebar/components/molecules/SidebarWorkspaceCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAKxC,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAMxD;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CA6HpE,CAAC"}
1
+ {"version":3,"file":"SidebarWorkspaceCard.d.ts","sourceRoot":"","sources":["../../../../../src/modules/Sidebar/components/molecules/SidebarWorkspaceCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAIxD;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CA8GpE,CAAC"}
@@ -1,3 +1,4 @@
1
+ export { SidebarDrilldownPanel } from './SidebarDrilldownPanel';
1
2
  export { SidebarMenuGroup } from './SidebarMenuGroup';
2
3
  export { SidebarUserProfile } from './SidebarUserProfile';
3
4
  export { SidebarWorkspaceCard } from './SidebarWorkspaceCard';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/Sidebar/components/molecules/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/Sidebar/components/molecules/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC"}
@@ -1,38 +1,23 @@
1
1
  import { default as React } from 'react';
2
2
  import { SidebarProps } from '../../types';
3
3
  /**
4
- * ============================================
5
- * SIDEBAR - ORGANISM
6
- * ============================================
7
- * Componente principal del sidebar que integra todos los
8
- * subcomponentes: logo, workspace card, menu groups y user profile.
9
- *
10
- * Sigue principios de Atomic Design y Screaming Architecture.
4
+ * Application sidebar aligned with the Sidebar-Menu Figma spec: 240px expanded, 56px collapsed,
5
+ * 12px rail padding, header row (logo + optional trailing), collapse control with shadow-03,
6
+ * scrollable menu region, workspace card below the menu (or sheet over profile when `workspace.workspaceSheet`),
7
+ * then profile and optional footer.
11
8
  *
12
9
  * @example
13
10
  * ```tsx
14
11
  * <Sidebar
15
12
  * logo="/logo.png"
16
- * workspace={{
17
- * title: "Mesa de trabajo",
18
- * projectId: "AR-0289-PRUEBA",
19
- * clientName: "ARON ALVAREZ",
20
- * status: { label: "Ganada", color: "success" }
21
- * }}
22
- * menuGroups={[
23
- * {
24
- * title: "CAMPAÑAS",
25
- * items: [
26
- * { id: "map", label: "Mapa", icon: faEarthAmericas },
27
- * { id: "list", label: "Lista de campañas", icon: faList }
28
- * ]
29
- * }
30
- * ]}
13
+ * headerTrailing={<NotificationsButton />}
14
+ * workspace={{ title: "Workspace", projectId: "PRJ-001" }}
15
+ * menuGroups={[ { title: "SECTION", items: [...] } ]}
31
16
  * userProfile={{
32
- * name: "Maria Ayala",
33
- * role: "Administrador",
34
- * avatarProps: { type: "people", src: "/avatar.jpg" }
17
+ * summary: { name: "Jane", subtitle: "Admin", avatarProps: { type: "people", src: "/a.jpg" } },
18
+ * menu: { onLogout: () => {} },
35
19
  * }}
20
+ * footer={<span>Legales · v1.0</span>}
36
21
  * />
37
22
  * ```
38
23
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Sidebar.d.ts","sourceRoot":"","sources":["../../../../../src/modules/Sidebar/components/organisms/Sidebar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAK3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAmF1C,CAAC"}
1
+ {"version":3,"file":"Sidebar.d.ts","sourceRoot":"","sources":["../../../../../src/modules/Sidebar/components/organisms/Sidebar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6E,MAAM,OAAO,CAAC;AAMlG,OAAO,KAAK,EAEV,YAAY,EAIb,MAAM,aAAa,CAAC;AAuBrB;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CA4Y1C,CAAC"}
@@ -20,7 +20,8 @@
20
20
  * │ ├── molecules/ # Combinación de atoms
21
21
  * │ │ ├── SidebarMenuGroup
22
22
  * │ │ ├── SidebarUserProfile
23
- * │ │ └── SidebarWorkspaceCard
23
+ * │ │ ├── SidebarWorkspaceCard
24
+ * │ │ └── SidebarDrilldownPanel
24
25
  * │ └── organisms/ # Componente completo
25
26
  * │ └── Sidebar
26
27
  * ├── types/
@@ -38,11 +39,10 @@
38
39
  * <Sidebar
39
40
  * logo="/logo.png"
40
41
  * workspace={{
41
- * title: "Mesa de trabajo",
42
42
  * badge: { label: 0 },
43
43
  * projectId: "AR-0289-PRUEBA2-ALEX-JUL-2025",
44
- * clientName: "ARON ALVAREZ",
45
- * status: { label: "Ganada", color: "success" }
44
+ * onOpen: () => {},
45
+ * onClose: () => {}
46
46
  * }}
47
47
  * menuGroups={[
48
48
  * {
@@ -55,14 +55,23 @@
55
55
  * }
56
56
  * ]}
57
57
  * userProfile={{
58
- * name: "Maria Ayala",
59
- * role: "Administrador",
60
- * avatarProps: { type: "people", src: "/avatar.jpg" }
58
+ * summary: {
59
+ * name: "Maria Ayala",
60
+ * subtitle: "Administrador",
61
+ * email: "maria@obp.com.mx",
62
+ * avatarProps: { type: "people", src: "/avatar.jpg" },
63
+ * presence: { label: "En linea" },
64
+ * },
65
+ * menu: {
66
+ * onSettings: () => {},
67
+ * darkMode: { checked: false, onChange: () => {} },
68
+ * onLogout: () => {},
69
+ * },
61
70
  * }}
62
71
  * />
63
72
  * ```
64
73
  */
65
74
  export { Sidebar } from './components';
66
- export { SidebarMenuItem, SidebarDivider, SidebarSectionTitle, SidebarMenuGroup, SidebarUserProfile, SidebarWorkspaceCard, } from './components';
67
- export type { SidebarProps, SidebarMenuItemProps, SidebarMenuGroupProps, SidebarDividerProps, SidebarSectionTitleProps, SidebarUserProfileProps, SidebarWorkspaceCardProps, SidebarBadge, SidebarIcon, } from './types';
75
+ export { SidebarMenuItem, SidebarDivider, SidebarSectionTitle, SidebarMenuGroup, SidebarUserProfile, SidebarWorkspaceCard, SidebarDrilldownPanel, } from './components';
76
+ export type { SidebarProps, SidebarMenuItemProps, SidebarMenuGroupProps, SidebarDividerProps, SidebarSectionTitleProps, SidebarUserProfileProps, SidebarUserProfileSummaryProps, SidebarUserProfileMenuProps, SidebarWorkspaceCardProps, SidebarWorkspaceConfig, SidebarBadge, SidebarIcon, SidebarDrilldownPanelProps, SidebarDrilldownParentItem, SidebarDrilldownSubmenuItem, SidebarDrilldownConfig, } from './types';
68
77
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/Sidebar/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAGvC,OAAO,EACL,eAAe,EACf,cAAc,EACd,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,cAAc,CAAC;AAGtB,YAAY,EACV,YAAY,EACZ,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,wBAAwB,EACxB,uBAAuB,EACvB,yBAAyB,EACzB,YAAY,EACZ,WAAW,GACZ,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/Sidebar/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwEG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAGvC,OAAO,EACL,eAAe,EACf,cAAc,EACd,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,cAAc,CAAC;AAGtB,YAAY,EACV,YAAY,EACZ,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,wBAAwB,EACxB,uBAAuB,EACvB,8BAA8B,EAC9B,2BAA2B,EAC3B,yBAAyB,EACzB,sBAAsB,EACtB,YAAY,EACZ,WAAW,EACX,0BAA0B,EAC1B,0BAA0B,EAC1B,2BAA2B,EAC3B,sBAAsB,GACvB,MAAM,SAAS,CAAC"}
@@ -13,6 +13,10 @@ type Story = StoryObj<typeof Sidebar>;
13
13
  * Ejemplo completo del Sidebar con todas las secciones
14
14
  */
15
15
  export declare const Default: Story;
16
+ /**
17
+ * Sidebar con drilldown: el área de menú muestra `SidebarDrilldownPanel` (volver / breadcrumb / submenús).
18
+ */
19
+ export declare const WithDrilldown: Story;
16
20
  /**
17
21
  * Sidebar sin workspace card
18
22
  */
@@ -21,6 +25,10 @@ export declare const WithoutWorkspace: Story;
21
25
  * Sidebar con settings section
22
26
  */
23
27
  export declare const WithSettings: Story;
28
+ /**
29
+ * Mesa de trabajo como hoja: fila «Mesa de trabajo» abre la misma tarjeta deslizándola sobre el perfil; «Cerrar» la oculta.
30
+ */
31
+ export declare const WorkspaceSheetOverProfile: Story;
24
32
  /**
25
33
  * MenuItem individual con diferentes estados
26
34
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Sidebar.stories.d.ts","sourceRoot":"","sources":["../../../../src/modules/Sidebar/stories/Sidebar.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EACL,OAAO,EAMR,MAAM,UAAU,CAAC;AAelB;;;;;GAKG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,OAAO,CA6B9B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,OAAO,CAAC,CAAC;AAuDtC;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,KAyCrB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,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ACH,eAAO,MAAM,kBAAkB,EAAE,KAgBhC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAe/B,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { SidebarDrilldownPanel } from '../index';
3
+ declare const meta: Meta<typeof SidebarDrilldownPanel>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof SidebarDrilldownPanel>;
6
+ /**
7
+ * Vista expandida: breadcrumb, filas completas y divisores del DS.
8
+ */
9
+ export declare const Expanded: Story;
10
+ /**
11
+ * Sin prefijo de breadcrumb (solo título del padre).
12
+ */
13
+ export declare const ExpandedWithoutRootCrumb: Story;
14
+ /**
15
+ * Barra colapsada: solo iconos y tooltips.
16
+ */
17
+ export declare const Collapsed: Story;
18
+ //# sourceMappingURL=SidebarDrilldownPanel.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SidebarDrilldownPanel.stories.d.ts","sourceRoot":"","sources":["../../../../src/modules/Sidebar/stories/SidebarDrilldownPanel.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAOjD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,qBAAqB,CAO5C,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAWpD;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,KAqBtB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,EAAE,KActC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,KAmBvB,CAAC"}
@@ -1,3 +1,5 @@
1
+ import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
2
+ import { ReactNode } from 'react';
1
3
  import { AvatarProps } from '../../Avatar/types';
2
4
  import { IconType } from '../../../shared/types/types';
3
5
  /**
@@ -87,6 +89,24 @@ export interface SidebarMenuGroupProps {
87
89
  title?: string;
88
90
  /** Items del menú */
89
91
  items: SidebarMenuItemProps[];
92
+ /**
93
+ * When true with `title`, section header toggles visibility (Figma collapsible blocks).
94
+ * When false, title uses a static divider row.
95
+ */
96
+ collapsible?: boolean;
97
+ /** Initial open state when `collapsible` is true. */
98
+ defaultExpanded?: boolean;
99
+ /**
100
+ * When true (narrow rail), section titles and collapsible headers are hidden; titled groups
101
+ * show a plain divider line only, then items.
102
+ */
103
+ collapsed?: boolean;
104
+ /**
105
+ * When the group has a `title`, omit the leading **plain** `SidebarDivider` when it would
106
+ * duplicate the rail divider below the header: collapsed rail (before items), or expanded
107
+ * collapsible section (before the chevron header).
108
+ */
109
+ skipLeadingPlainDivider?: boolean;
90
110
  /** Clases CSS adicionales */
91
111
  className?: string;
92
112
  }
@@ -97,49 +117,101 @@ export interface SidebarMenuGroupProps {
97
117
  * Props para la tarjeta de workspace/proyecto
98
118
  */
99
119
  export interface SidebarWorkspaceCardProps {
100
- /** Icono del workspace */
120
+ /** Leading icon (Figma: pen-to-square on brand). */
101
121
  icon?: SidebarIcon;
102
- /** Título del workspace */
103
- title: string;
104
- /** Badge con contador */
122
+ /**
123
+ * Small label above the campaign row (Figma Sidebar-Menu “Mesa de trabajo”, Body XS / tertiary).
124
+ */
125
+ sectionLabel?: string;
126
+ /**
127
+ * Primary campaign/project line (Body LG / brand). If `projectId` is set, it wins for display.
128
+ */
129
+ title?: string;
130
+ /** Badge with counter (Figma: brand pill on the right). */
105
131
  badge?: SidebarBadge;
106
- /** ID del proyecto */
132
+ /** Preferred source for the primary line when both `title` and `projectId` are used. */
107
133
  projectId?: string;
108
- /** Nombre del cliente */
109
- clientName?: string;
110
- /** Estado del proyecto */
111
- status?: {
112
- label: string;
113
- color: 'success' | 'warning' | 'danger' | 'info';
114
- };
115
- /** Mostrar botones de acción (hover) */
134
+ /**
135
+ * When false, hides the footer text actions even if `onOpen` / `onClose` are set.
136
+ * @defaultValue true
137
+ */
116
138
  showActions?: boolean;
117
- /** Handler para abrir */
118
- onOpen?: () => void;
119
- /** Handler para concluir */
139
+ /** Left CTA (Figma: “Cerrar”, danger text). */
120
140
  onClose?: () => void;
141
+ /** Right CTA (Figma: “Ver pauta”). */
142
+ onOpen?: () => void;
143
+ /** Copy for the close action. */
144
+ closeLabel?: string;
145
+ /** Copy for the primary action (e.g. open schedule). */
146
+ primaryActionLabel?: string;
147
+ /** Border style for the card surface (Figma “Mesa de trabajo” uses dashed). */
148
+ cardBorderStyle?: 'solid' | 'dashed';
121
149
  /** Clases CSS adicionales */
122
150
  className?: string;
123
151
  }
152
+ /**
153
+ * Workspace slot on {@link SidebarProps}: same props as the card plus optional sheet presentation.
154
+ */
155
+ export type SidebarWorkspaceConfig = SidebarWorkspaceCardProps & {
156
+ /**
157
+ * When `true` (expanded sidebar), the card is not rendered under the menu scroll area.
158
+ * A “Mesa de trabajo” trigger opens it as a sheet that slides up over the user profile rail.
159
+ */
160
+ workspaceSheet?: boolean;
161
+ /** Controlled sheet visibility (requires `onWorkspaceSheetOpenChange`). */
162
+ workspaceSheetOpen?: boolean;
163
+ onWorkspaceSheetOpenChange?: (open: boolean) => void;
164
+ };
124
165
  /**
125
166
  * ============================================
126
167
  * USER PROFILE PROPS
127
168
  * ============================================
128
- * Props para el perfil del usuario
169
+ * Grouped props for the sidebar user rail + account popover (Figma `290:52422`).
129
170
  */
130
- export interface SidebarUserProfileProps {
131
- /** Nombre del usuario */
171
+ /** Summary shown on the rail and in the popover header. */
172
+ export interface SidebarUserProfileSummaryProps {
173
+ /** Display name (rail primary line + popover header). */
132
174
  name: string;
133
- /** Rol del usuario */
134
- role?: string;
135
- /** Props del avatar */
175
+ /** Secondary line on the rail (e.g. role). */
176
+ subtitle?: string;
177
+ /**
178
+ * Secondary line in the popover header (e.g. email).
179
+ * Falls back to `subtitle` when omitted.
180
+ */
181
+ email?: string;
136
182
  avatarProps?: Omit<AvatarProps, 'type'> & {
137
183
  type?: AvatarProps['type'];
138
184
  src?: string;
139
185
  };
140
- /** Handler de logout */
186
+ /** Optional presence chip in the popover header (e.g. “En linea”). */
187
+ presence?: {
188
+ label: string;
189
+ };
190
+ }
191
+ /** Popover menu actions (ellipsis trigger). Omit entirely to hide the menu trigger. */
192
+ export interface SidebarUserProfileMenuProps {
193
+ onSettings?: () => void;
194
+ /** @defaultValue Configuración */
195
+ settingsLabel?: string;
196
+ darkMode?: {
197
+ checked: boolean;
198
+ onChange: (checked: boolean) => void;
199
+ /** @defaultValue Dark mode */
200
+ label?: string;
201
+ };
141
202
  onLogout?: () => void;
142
- /** Clases CSS adicionales */
203
+ /** @defaultValue Cerrar sesión */
204
+ logoutLabel?: string;
205
+ }
206
+ export interface SidebarUserProfileProps {
207
+ summary: SidebarUserProfileSummaryProps;
208
+ menu?: SidebarUserProfileMenuProps;
209
+ /**
210
+ * Popover anchor position relative to the menu trigger.
211
+ * Default `top-left`: panel above the trigger, left edges aligned (extends to the right).
212
+ * @defaultValue 'top-left'
213
+ */
214
+ menuPosition?: 'top' | 'top-left' | 'top-right' | 'bottom' | 'left' | 'right' | 'bottom-right' | 'bottom-center' | 'bottom-left';
143
215
  className?: string;
144
216
  }
145
217
  /**
@@ -150,22 +222,89 @@ export interface SidebarUserProfileProps {
150
222
  */
151
223
  export interface SidebarProps {
152
224
  /** Logo del sistema (URL o componente) */
153
- logo?: React.ReactNode | string;
225
+ logo?: ReactNode | string;
154
226
  /** Handler de click en logo */
155
227
  onLogoClick?: () => void;
156
- /** Tarjeta de workspace */
157
- workspace?: SidebarWorkspaceCardProps;
228
+ /**
229
+ * Trailing header slot (e.g. notifications icon + badge). Hidden when collapsed if you omit it.
230
+ */
231
+ headerTrailing?: ReactNode;
232
+ /** Workspace card (`SidebarWorkspaceCard`). Use `workspaceSheet` on the object for slide-over profile mode. */
233
+ workspace?: SidebarWorkspaceConfig;
158
234
  /** Grupos de menú */
159
235
  menuGroups?: SidebarMenuGroupProps[];
160
236
  /** Perfil del usuario */
161
237
  userProfile?: SidebarUserProfileProps;
238
+ /** Pie del rail (e.g. legales + versión). */
239
+ footer?: ReactNode;
162
240
  /** Estado colapsado */
163
241
  collapsed?: boolean;
164
242
  /** Handler para toggle de collapse */
165
243
  onToggleCollapse?: () => void;
166
244
  /** Clases CSS adicionales */
167
245
  className?: string;
168
- /** Ancho del sidebar (default: 248px) */
246
+ /** Expanded width in px (Figma: 240). */
169
247
  width?: number;
248
+ /** Collapsed width in px (Figma: 56). */
249
+ collapsedWidth?: number;
250
+ /**
251
+ * Second-level navigation: when `active`, renders `SidebarDrilldownPanel` instead of `menuGroups`.
252
+ * Logo, workspace (if not collapsed) and user profile behavior are unchanged.
253
+ */
254
+ drilldown?: SidebarDrilldownConfig;
170
255
  }
256
+ /**
257
+ * ============================================
258
+ * SIDEBAR DRILLDOWN PANEL (second-level nav)
259
+ * ============================================
260
+ * App-agnostic submenu list aligned with shell drilldown patterns.
261
+ */
262
+ /** Entry inside a drilldown parent item (no router coupling). */
263
+ export interface SidebarDrilldownSubmenuItem {
264
+ /** Stable key for lists; index-based fallback is used when omitted. */
265
+ id?: string;
266
+ /** Row label. */
267
+ title: string;
268
+ /** Font Awesome icon, legacy icon name, or omit for a neutral dot icon. */
269
+ icon?: IconDefinition | string;
270
+ /** Optional href for the host app (navigation stays in `onActivateSubmenu`). */
271
+ href?: string;
272
+ /** Optional side effect when the row is activated. */
273
+ onClick?: () => void;
274
+ }
275
+ /** Parent row that owns a drilldown submenu. */
276
+ export interface SidebarDrilldownParentItem {
277
+ title: string;
278
+ submenus?: SidebarDrilldownSubmenuItem[];
279
+ }
280
+ export interface SidebarDrilldownPanelProps {
281
+ /**
282
+ * When true, shows breadcrumb header and full-width rows.
283
+ * When false, shows icon-only actions with tooltips.
284
+ */
285
+ expanded: boolean;
286
+ parentItem: SidebarDrilldownParentItem;
287
+ /** First breadcrumb segment (e.g. product area). */
288
+ breadcrumbRootLabel: string;
289
+ /** Returns whether a submenu row should render as active/selected. */
290
+ isSubmenuActive?: (item: SidebarDrilldownSubmenuItem) => boolean;
291
+ /**
292
+ * When false, hides the root breadcrumb label and chevron before the parent title.
293
+ */
294
+ showBreadcrumbRoot?: boolean;
295
+ /** Invoked after optional `onClick` on the row; host handles `href` / routing. */
296
+ onActivateSubmenu?: (item: SidebarDrilldownSubmenuItem) => void;
297
+ /** Navigates back to the parent menu level. */
298
+ onBack: () => void;
299
+ /** Accessible label for the collapsed back control tooltip. */
300
+ backButtonTooltip?: string;
301
+ className?: string;
302
+ }
303
+ /**
304
+ * Drilldown mode for the Sidebar organism: same props as `SidebarDrilldownPanel` plus `active`.
305
+ * When `active` is true, menu groups are not rendered and the panel fills the menu region.
306
+ */
307
+ export type SidebarDrilldownConfig = {
308
+ active: boolean;
309
+ } & SidebarDrilldownPanelProps;
171
310
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/Sidebar/types/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD;;;;;;GAMG;AAEH;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC;AAEnC;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,0CAA0C;IAC1C,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,sBAAsB;IACtB,KAAK,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;IACtE,qBAAqB;IACrB,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CAC1B;AAED;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACnC,mCAAmC;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,sBAAsB;I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O,EACL,UAAU,EAKX,MAAM,sBAAsB,CAAC;AA8B9B,eAAO,MAAM,KAAK,GAAI,CAAC,EAAI,ulBA2CxB,UAAU,CAAC,CAAC,CAAC,4CAwhBf,CAAC"}
1
+ {"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../src/modules/Table/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAKX,MAAM,sBAAsB,CAAC;AA8B9B,eAAO,MAAM,KAAK,GAAI,CAAC,EAAI,ulBA2CxB,UAAU,CAAC,CAAC,CAAC,4CAyhBf,CAAC"}
@@ -2,6 +2,11 @@ import { RowConfig } from '../../../shared/types/table';
2
2
  export interface UseTableSelectionOptions<T> {
3
3
  /** Si devuelve false, la fila no se puede seleccionar (checkbox deshabilitado en UI). */
4
4
  isRowSelectable?: (row: RowConfig<T>) => boolean;
5
+ /**
6
+ * Called whenever the table selection ids change (initial mount included, with `[]` until rows are selected).
7
+ * Uses a ref so callers may pass an inline handler without re-running this effect every render.
8
+ */
9
+ onSelectionChange?: (selectedIds: (string | number)[]) => void;
5
10
  }
6
11
  export declare const useTableSelection: <T>(rows: RowConfig<T>[], multiple?: boolean, options?: UseTableSelectionOptions<T>) => {
7
12
  selectedIds: (string | number)[];
@@ -1 +1 @@
1
- {"version":3,"file":"useTableSelection.d.ts","sourceRoot":"","sources":["../../../../src/modules/Table/hooks/useTableSelection.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGjD,MAAM,WAAW,wBAAwB,CAAC,CAAC;IACzC,yFAAyF;IACzF,eAAe,CAAC,EAAE,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC;CAClD;AAED,eAAO,MAAM,iBAAiB,GAAI,CAAC,EACjC,MAAM,SAAS,CAAC,CAAC,CAAC,EAAE,EACpB,kBAAe,EACf,UAAU,wBAAwB,CAAC,CAAC,CAAC;;;;;2BA+B7B,SAAS,CAAC,CAAC,CAAC;+BAYR,OAAO;;sBAckB,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE;wBAK9C,MAAM,GAAG,MAAM;CAe1B,CAAC"}
1
+ {"version":3,"file":"useTableSelection.d.ts","sourceRoot":"","sources":["../../../../src/modules/Table/hooks/useTableSelection.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGjD,MAAM,WAAW,wBAAwB,CAAC,CAAC;IACzC,yFAAyF;IACzF,eAAe,CAAC,EAAE,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC;IACjD;;;OAGG;IACH,iBAAiB,CAAC,EAAE,CAAC,WAAW,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,KAAK,IAAI,CAAC;CAChE;AAED,eAAO,MAAM,iBAAiB,GAAI,CAAC,EACjC,MAAM,SAAS,CAAC,CAAC,CAAC,EAAE,EACpB,kBAAe,EACf,UAAU,wBAAwB,CAAC,CAAC,CAAC;;;;;2BAqC7B,SAAS,CAAC,CAAC,CAAC;+BAYR,OAAO;;sBAckB,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE;wBAK9C,MAAM,GAAG,MAAM;CAe1B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imj_media/ui",
3
- "version": "1.8.3",
3
+ "version": "1.8.4",
4
4
  "description": "Componentes UI",
5
5
  "author": {
6
6
  "name": "Oscar Rubio - IMJ",