siesa-ui-kit 1.0.11 → 1.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 (101) hide show
  1. package/dist/components/Button/icons.d.ts +6 -5
  2. package/dist/components/Button/icons.d.ts.map +1 -1
  3. package/dist/components/Dropdown/Dropdown.d.ts +68 -9
  4. package/dist/components/Dropdown/Dropdown.d.ts.map +1 -1
  5. package/dist/components/Dropdown/Dropdown.types.d.ts +18 -0
  6. package/dist/components/Dropdown/Dropdown.types.d.ts.map +1 -1
  7. package/dist/components/Dropdown/icons.d.ts +3 -0
  8. package/dist/components/Dropdown/icons.d.ts.map +1 -1
  9. package/dist/components/DropdownItemCollapsible/DropdownItemCollapsible.d.ts.map +1 -1
  10. package/dist/components/DropdownItemCollapsible/DropdownItemCollapsible.types.d.ts +21 -0
  11. package/dist/components/DropdownItemCollapsible/DropdownItemCollapsible.types.d.ts.map +1 -1
  12. package/dist/components/LookupField/LookupField.d.ts +6 -0
  13. package/dist/components/LookupField/LookupField.d.ts.map +1 -0
  14. package/dist/components/LookupField/LookupField.types.d.ts +274 -0
  15. package/dist/components/LookupField/LookupField.types.d.ts.map +1 -0
  16. package/dist/components/LookupField/__stories__/DocComponents.d.ts +37 -0
  17. package/dist/components/LookupField/__stories__/DocComponents.d.ts.map +1 -0
  18. package/dist/components/LookupField/__stories__/mocks/browser.d.ts +2 -0
  19. package/dist/components/LookupField/__stories__/mocks/browser.d.ts.map +1 -0
  20. package/dist/components/LookupField/__stories__/mocks/data.d.ts +38 -0
  21. package/dist/components/LookupField/__stories__/mocks/data.d.ts.map +1 -0
  22. package/dist/components/LookupField/__stories__/mocks/handlers.d.ts +3 -0
  23. package/dist/components/LookupField/__stories__/mocks/handlers.d.ts.map +1 -0
  24. package/dist/components/LookupField/hooks/index.d.ts +10 -0
  25. package/dist/components/LookupField/hooks/index.d.ts.map +1 -0
  26. package/dist/components/LookupField/hooks/useClickOutside.d.ts +11 -0
  27. package/dist/components/LookupField/hooks/useClickOutside.d.ts.map +1 -0
  28. package/dist/components/LookupField/hooks/useDebouncedSearch.d.ts +2 -0
  29. package/dist/components/LookupField/hooks/useDebouncedSearch.d.ts.map +1 -0
  30. package/dist/components/LookupField/hooks/useFloatingDropdown.d.ts +38 -0
  31. package/dist/components/LookupField/hooks/useFloatingDropdown.d.ts.map +1 -0
  32. package/dist/components/LookupField/hooks/useKeyboardNavigation.d.ts +16 -0
  33. package/dist/components/LookupField/hooks/useKeyboardNavigation.d.ts.map +1 -0
  34. package/dist/components/LookupField/hooks/useTranslationSafe.d.ts +9 -0
  35. package/dist/components/LookupField/hooks/useTranslationSafe.d.ts.map +1 -0
  36. package/dist/components/LookupField/hooks/useVirtualList.d.ts +40 -0
  37. package/dist/components/LookupField/hooks/useVirtualList.d.ts.map +1 -0
  38. package/dist/components/LookupField/index.d.ts +7 -0
  39. package/dist/components/LookupField/index.d.ts.map +1 -0
  40. package/dist/components/LookupField/parts/LiveRegion.d.ts +6 -0
  41. package/dist/components/LookupField/parts/LiveRegion.d.ts.map +1 -0
  42. package/dist/components/LookupField/parts/SearchInput.d.ts +11 -0
  43. package/dist/components/LookupField/parts/SearchInput.d.ts.map +1 -0
  44. package/dist/components/LookupField/services/api.d.ts +23 -0
  45. package/dist/components/LookupField/services/api.d.ts.map +1 -0
  46. package/dist/components/LookupField/services/api.types.d.ts +74 -0
  47. package/dist/components/LookupField/services/api.types.d.ts.map +1 -0
  48. package/dist/components/LookupField/services/index.d.ts +4 -0
  49. package/dist/components/LookupField/services/index.d.ts.map +1 -0
  50. package/dist/components/LookupField/types/filter.types.d.ts +51 -0
  51. package/dist/components/LookupField/types/filter.types.d.ts.map +1 -0
  52. package/dist/components/LookupField/utils/cn.d.ts +3 -0
  53. package/dist/components/LookupField/utils/cn.d.ts.map +1 -0
  54. package/dist/components/LookupField/utils/filterBuilder.d.ts +35 -0
  55. package/dist/components/LookupField/utils/filterBuilder.d.ts.map +1 -0
  56. package/dist/components/LookupField/utils/index.d.ts +4 -0
  57. package/dist/components/LookupField/utils/index.d.ts.map +1 -0
  58. package/dist/components/LookupField/utils/templateInterpolation.d.ts +13 -0
  59. package/dist/components/LookupField/utils/templateInterpolation.d.ts.map +1 -0
  60. package/dist/components/Navbar/Navbar.d.ts.map +1 -1
  61. package/dist/components/Navbar/Navbar.types.d.ts +46 -1
  62. package/dist/components/Navbar/Navbar.types.d.ts.map +1 -1
  63. package/dist/components/NavigationRailGroup/NavigationRailGroup.d.ts +122 -0
  64. package/dist/components/NavigationRailGroup/NavigationRailGroup.d.ts.map +1 -0
  65. package/dist/components/NavigationRailGroup/NavigationRailGroup.types.d.ts +139 -0
  66. package/dist/components/NavigationRailGroup/NavigationRailGroup.types.d.ts.map +1 -0
  67. package/dist/components/NavigationRailGroup/icons.d.ts +33 -0
  68. package/dist/components/NavigationRailGroup/icons.d.ts.map +1 -0
  69. package/dist/components/NavigationRailGroup/index.d.ts +4 -0
  70. package/dist/components/NavigationRailGroup/index.d.ts.map +1 -0
  71. package/dist/components/NavigationRailItem/NavigationRailItem.d.ts.map +1 -1
  72. package/dist/components/NavigationRailItem/NavigationRailItem.types.d.ts +14 -0
  73. package/dist/components/NavigationRailItem/NavigationRailItem.types.d.ts.map +1 -1
  74. package/dist/components/NavigationRailTypes/NavigationRailTypes.d.ts.map +1 -1
  75. package/dist/components/NavigationRailTypes/NavigationRailTypes.types.d.ts +49 -0
  76. package/dist/components/NavigationRailTypes/NavigationRailTypes.types.d.ts.map +1 -1
  77. package/dist/components/NavigationRailTypes/icons.d.ts +15 -29
  78. package/dist/components/NavigationRailTypes/icons.d.ts.map +1 -1
  79. package/dist/components/Select/Select.d.ts.map +1 -1
  80. package/dist/components/Select/icons.d.ts +6 -2
  81. package/dist/components/Select/icons.d.ts.map +1 -1
  82. package/dist/index.d.ts +38 -0
  83. package/dist/index.d.ts.map +1 -1
  84. package/dist/siesa-ui-kit.cjs +489 -238
  85. package/dist/siesa-ui-kit.cjs.map +1 -1
  86. package/dist/siesa-ui-kit.mjs +12302 -1519
  87. package/dist/siesa-ui-kit.mjs.map +1 -1
  88. package/dist/style.css +1 -1
  89. package/dist/views/LayoutBase/LayoutBase.d.ts +73 -0
  90. package/dist/views/LayoutBase/LayoutBase.d.ts.map +1 -0
  91. package/dist/views/LayoutBase/LayoutBase.types.d.ts +99 -0
  92. package/dist/views/LayoutBase/LayoutBase.types.d.ts.map +1 -0
  93. package/dist/views/LayoutBase/index.d.ts +3 -0
  94. package/dist/views/LayoutBase/index.d.ts.map +1 -0
  95. package/dist/views/ListView/ListView.d.ts +18 -12
  96. package/dist/views/ListView/ListView.d.ts.map +1 -1
  97. package/dist/views/ListView/ListView.types.d.ts +31 -94
  98. package/dist/views/ListView/ListView.types.d.ts.map +1 -1
  99. package/dist/views/ListView/index.d.ts +1 -1
  100. package/dist/views/ListView/index.d.ts.map +1 -1
  101. package/package.json +20 -1
@@ -3,23 +3,24 @@ interface IconProps {
3
3
  className?: string;
4
4
  }
5
5
  /**
6
- * Icono Plus (heroicons-micro/plus)
6
+ * Icono Plus (heroicons/plus)
7
7
  */
8
8
  export declare const PlusIcon: React.FC<IconProps>;
9
9
  /**
10
- * Icono ChevronDown (heroicons-micro/chevron-down)
10
+ * Icono ChevronDown (heroicons/chevron-down)
11
11
  */
12
12
  export declare const ChevronDownIcon: React.FC<IconProps>;
13
13
  /**
14
- * Icono ArrowRight (heroicons-micro/arrow-right)
14
+ * Icono ArrowRight (heroicons/arrow-right)
15
+ * @param {string} className Clases de Tailwind
15
16
  */
16
17
  export declare const ArrowRightIcon: React.FC<IconProps>;
17
18
  /**
18
- * Icono Check (heroicons-micro/check)
19
+ * Icono Check (heroicons/check)
19
20
  */
20
21
  export declare const CheckIcon: React.FC<IconProps>;
21
22
  /**
22
- * Icono X (heroicons-micro/x-mark)
23
+ * Icono X (heroicons/x-mark)
23
24
  */
24
25
  export declare const XIcon: React.FC<IconProps>;
25
26
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../src/components/Button/icons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,UAAU,SAAS;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CASxC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAa/C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAa9C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAazC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CASrC,CAAC"}
1
+ {"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../src/components/Button/icons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,UAAU,SAAS;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAExC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAE/C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAE9C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAEzC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAErC,CAAC"}
@@ -2,32 +2,91 @@ import React from 'react';
2
2
  import type { DropdownProps, DropdownItemProps, DropdownHeadingProps, DropdownDividerProps } from './Dropdown.types';
3
3
  /**
4
4
  * Componente Dropdown del sistema de diseño Siesa
5
- * Basado en especificaciones de Figma con Tailwind CSS
5
+ *
6
+ * Menú desplegable implementado pixel-perfect según especificaciones de Figma (node 4194-15135).
7
+ * Soporta múltiples tipos de items: básicos, con iconos, con descripciones, con shortcuts, con headings y dividers.
8
+ *
9
+ * **Especificaciones de Figma:**
10
+ * - Trigger button: bg-white, border-border-primary, rounded-lg (8px), gap-2 (8px)
11
+ * - Menu: bg-background-secondary (#f4f4f5), shadow-lg, rounded-lg (8px), padding 4px, min-width 182px
12
+ * - Items: padding 16px horizontal, 8px vertical, rounded-lg, gap-3 (12px)
13
+ * - Typography: Label/Small (14px Bold) para trigger, Paragraph/Small (14px Regular) para items
14
+ * - Typography: Paragraph/Tiny (12px Regular) para headings y descripciones
15
+ *
16
+ * **Variantes:**
17
+ * - `default`: Botón con texto + icono chevron
18
+ * - `icon-only`: Solo icono chevron (36x36px) - ideal para espacios reducidos
19
+ *
20
+ * **Estados del trigger:**
21
+ * - Default: bg-white, text-content-secondary, border-border-primary
22
+ * - Hover: bg-background-secondary (#fafafa)
23
+ * - Focus: ring-2 ring-primary-custom-400 con offset-2
24
+ * - Disabled: opacity-50 con pointer-events-none
25
+ *
26
+ * **Estados de items:**
27
+ * - Default: text-content-primary
28
+ * - Hover: bg-background-secondary (#fafafa)
29
+ * - Selected: bg-primary-custom-100 (light) / bg-primary-custom-600/20 (dark)
30
+ *
31
+ * **Dark Mode:**
32
+ * - Trigger: dark:bg-dark-bg-primary, dark:hover:bg-gray-800
33
+ * - Menu: bg-background-secondary → dark:bg-dark-bg-primary
34
+ * - Items hover: dark:hover:bg-gray-800
35
+ * - Shadow: shadow-lg funciona en ambos modos
36
+ *
37
+ * **Funcionalidad:**
38
+ * - Cierre automático al hacer click fuera del dropdown
39
+ * - Cierre con tecla Escape
40
+ * - Modo controlado/no controlado (prop `open` + `onOpenChange`)
41
+ * - Callback `onClick` por item individual
6
42
  *
7
43
  * Mejores prácticas implementadas:
8
44
  * - Orden de modificadores: {responsive}:{dark}:{state}:{utility}
9
45
  * - Dark mode con estrategia 'class' (darkMode: 'class')
10
46
  * - Tokens de color consistentes con la documentación
11
47
  * - Type safety con TypeScript estricto
12
- * - Accesibilidad con ARIA labels y keyboard navigation
13
- * - Cierre automático al hacer click fuera
48
+ * - Accesibilidad con ARIA labels (aria-haspopup, aria-expanded)
49
+ * - Keyboard navigation (Escape para cerrar)
14
50
  *
15
51
  * @see docs/colors.md - Sistema de colores
16
- * @see docs/typography.md - Sistema tipográfico
52
+ * @see docs/typography.md - Sistema tipográfico (Label/Small, Paragraph/Small, Paragraph/Tiny)
17
53
  * @see docs/spacing.md - Sistema de espaciado
18
- * @see docs/shadows.md - Sistema de sombras
54
+ * @see docs/shadows.md - Sistema de sombras (shadow-lg)
55
+ * @see https://www.figma.com/design/5XNqf2YTxvwemxwo1LMQ6j/Siesa-UI-Kit?node-id=4194-15135 - Diseño Figma
19
56
  *
20
57
  * @example
21
58
  * ```tsx
59
+ * // Dropdown básico
22
60
  * <Dropdown
23
- * placeholder="Options"
61
+ * placeholder="Opciones"
24
62
  * items={[
25
- * { children: 'Account', icon: <UserIcon /> },
26
- * { children: 'Settings', icon: <CogIcon /> },
63
+ * { children: 'Cuenta', icon: <UserIcon /> },
64
+ * { children: 'Configuración', icon: <CogIcon /> },
27
65
  * { isDivider: true },
28
- * { children: 'Logout' },
66
+ * { children: 'Cerrar sesión' },
29
67
  * ]}
30
68
  * />
69
+ *
70
+ * // Dropdown con headings y descripciones
71
+ * <Dropdown
72
+ * placeholder="Menú"
73
+ * items={[
74
+ * { isHeading: true, children: 'Cuenta' },
75
+ * { children: 'Perfil', icon: <UserIcon />, description: 'Administra tu perfil' },
76
+ * { isDivider: true },
77
+ * { children: 'Deshacer', shortcut: '⌘ Z' },
78
+ * ]}
79
+ * />
80
+ *
81
+ * // Dropdown solo icono
82
+ * <Dropdown variant="icon-only" items={[...]} />
83
+ *
84
+ * // Dropdown controlado
85
+ * <Dropdown
86
+ * open={isOpen}
87
+ * onOpenChange={setIsOpen}
88
+ * items={[...]}
89
+ * />
31
90
  * ```
32
91
  */
33
92
  export declare const Dropdown: React.FC<DropdownProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"Dropdown.d.ts","sourceRoot":"","sources":["../../../src/components/Dropdown/Dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AACxE,OAAO,KAAK,EACV,aAAa,EACb,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,kBAAkB,CAAC;AAK1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAqQ5C,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAqFpD,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA2B1D,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAsB1D,CAAC"}
1
+ {"version":3,"file":"Dropdown.d.ts","sourceRoot":"","sources":["../../../src/components/Dropdown/Dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AACxE,OAAO,KAAK,EACV,aAAa,EACb,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,kBAAkB,CAAC;AAK1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwFG;AACH,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CA6Q5C,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAoFpD,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA2B1D,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAsB1D,CAAC"}
@@ -48,6 +48,24 @@ export interface DropdownProps {
48
48
  * @default 'Options'
49
49
  */
50
50
  placeholder?: string;
51
+ /**
52
+ * Función para renderizar un trigger personalizado
53
+ * Recibe el estado isOpen y debe retornar un ReactNode
54
+ * Útil para casos de uso avanzados como menús de usuario con avatar
55
+ *
56
+ * @example
57
+ * ```tsx
58
+ * <Dropdown
59
+ * renderTrigger={(isOpen) => (
60
+ * <button className={isOpen ? 'active' : ''}>
61
+ * Custom Trigger
62
+ * </button>
63
+ * )}
64
+ * items={[...]}
65
+ * />
66
+ * ```
67
+ */
68
+ renderTrigger?: (isOpen: boolean) => ReactNode;
51
69
  }
52
70
  /**
53
71
  * Props del componente DropdownItem
@@ -1 +1 @@
1
- {"version":3,"file":"Dropdown.types.d.ts","sourceRoot":"","sources":["../../../src/components/Dropdown/Dropdown.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;;OAKG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;IAElC;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAE3B;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,C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pB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -7,4 +7,7 @@ export declare const CogIcon: () => import("react/jsx-runtime").JSX.Element;
7
7
  export declare const UserIcon: () => import("react/jsx-runtime").JSX.Element;
8
8
  export declare const BellIcon: () => import("react/jsx-runtime").JSX.Element;
9
9
  export declare const CreditCardIcon: () => import("react/jsx-runtime").JSX.Element;
10
+ export declare const MoonIcon: () => import("react/jsx-runtime").JSX.Element;
11
+ export declare const DocumentTextIcon: () => import("react/jsx-runtime").JSX.Element;
12
+ export declare const ArrowRightStartOnRectangleIcon: () => import("react/jsx-runtime").JSX.Element;
10
13
  //# sourceMappingURL=icons.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../src/components/Dropdown/icons.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,eAAe,+CAa3B,CAAC;AAEF,eAAO,MAAM,OAAO,+CAanB,CAAC;AAEF,eAAO,MAAM,QAAQ,+CASpB,CAAC;AAEF,eAAO,MAAM,QAAQ,+CAapB,CAAC;AAEF,eAAO,MAAM,cAAc,+CAU1B,CAAC"}
1
+ {"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../src/components/Dropdown/icons.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,eAAe,+CAa3B,CAAC;AAEF,eAAO,MAAM,OAAO,+CAanB,CAAC;AAEF,eAAO,MAAM,QAAQ,+CASpB,CAAC;AAEF,eAAO,MAAM,QAAQ,+CAapB,CAAC;AAEF,eAAO,MAAM,cAAc,+CAU1B,CAAC;AAEF,eAAO,MAAM,QAAQ,+CAapB,CAAC;AAEF,eAAO,MAAM,gBAAgB,+CAa5B,CAAC;AAEF,eAAO,MAAM,8BAA8B,+CAa1C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownItemCollapsible.d.ts","sourceRoot":"","sources":["../../../src/components/DropdownItemCollapsible/DropdownItemCollapsible.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,KAAK,EACV,4BAA4B,EAE7B,MAAM,iCAAiC,CAAC;AAGzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+FG;AACH,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,4BAA4B,CAqL1E,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
1
+ {"version":3,"file":"DropdownItemCollapsible.d.ts","sourceRoot":"","sources":["../../../src/components/DropdownItemCollapsible/DropdownItemCollapsible.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,KAAK,EACV,4BAA4B,EAE7B,MAAM,iCAAiC,CAAC;AAIzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+FG;AACH,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,4BAA4B,CAwM1E,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
@@ -61,6 +61,27 @@ export interface DropdownItemCollapsibleProps {
61
61
  * @default true
62
62
  */
63
63
  showDivider?: boolean;
64
+ /**
65
+ * Si el item está seleccionado (activo)
66
+ * Útil para NavigationRailTypes en modo expandido
67
+ * @default false
68
+ */
69
+ selected?: boolean;
70
+ /**
71
+ * Si mostrar un badge de notificación (dot rojo)
72
+ * @default false
73
+ */
74
+ badge?: boolean;
75
+ /**
76
+ * Número a mostrar en el badge (máximo 99+)
77
+ * Si se proporciona, se muestra en lugar del dot rojo
78
+ */
79
+ badgeCount?: number;
80
+ /**
81
+ * Color del badge ('red', 'blue', etc.)
82
+ * @default 'red'
83
+ */
84
+ badgeColor?: 'red' | 'blue' | 'amber' | 'green' | 'purple';
64
85
  /**
65
86
  * Clases CSS adicionales
66
87
  */
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownItemCollapsible.types.d.ts","sourceRoot":"","sources":["../../../src/components/DropdownItemCollapsible/DropdownItemCollapsible.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;;;GAIG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,iCAAiC,EAAE,CAAC;IAE/C;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAEvC;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAE3D;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,iCAAiC;IAChD;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IAExD;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
1
+ {"version":3,"file":"DropdownItemCollapsible.types.d.ts","sourceRoot":"","sources":["../../../src/components/DropdownItemCollapsible/DropdownItemCollapsible.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;;;GAIG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,iCAAiC,EAAE,CAAC;IAE/C;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAEvC;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAE3D;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,UAAU,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAC;IAE3D;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,iCAAiC;IAChD;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IAExD;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -0,0 +1,6 @@
1
+ import type { LookupFieldProps, LookupFieldRef, LookupRecord } from './LookupField.types';
2
+ import './LookupField.css';
3
+ export declare const LookupField: <TRecord extends LookupRecord = LookupRecord>(props: LookupFieldProps<TRecord> & {
4
+ ref?: React.Ref<LookupFieldRef<TRecord>>;
5
+ }) => React.ReactElement;
6
+ //# sourceMappingURL=LookupField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LookupField.d.ts","sourceRoot":"","sources":["../../../src/components/LookupField/LookupField.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AACzF,OAAO,mBAAmB,CAAA;AAogC1B,eAAO,MAAM,WAAW,EAAmC,CACzD,OAAO,SAAS,YAAY,GAAG,YAAY,EAE3C,KAAK,EAAE,gBAAgB,CAAC,OAAO,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAA;CAAE,KAC5E,KAAK,CAAC,YAAY,CAGtB"}
@@ -0,0 +1,274 @@
1
+ import type { FilterExpression, SimpleFilter } from './types/filter.types';
2
+ import type { Fetcher, OrderBy } from './services/api.types';
3
+ /** Generic record type - all records must have an Id (PascalCase standard) */
4
+ export interface LookupRecord {
5
+ Id: string;
6
+ [key: string]: unknown;
7
+ }
8
+ /** Data passed to onReady callback [UPDATED v0.4 - removed totalRecords] */
9
+ export interface LookupFieldReadyData {
10
+ /** Whether the first page of data has been loaded */
11
+ firstPageLoaded: boolean;
12
+ }
13
+ /** Imperative ref methods for programmatic control */
14
+ export interface LookupFieldRef<TRecord extends LookupRecord = LookupRecord> {
15
+ /** Clears the current selection */
16
+ clear: () => void;
17
+ /** Focuses the component trigger */
18
+ focus: () => void;
19
+ /** Forces a fresh data fetch from API */
20
+ reload: () => void;
21
+ /** Returns the currently selected record or null */
22
+ getValue: () => TRecord | null;
23
+ /** Programmatically selects a record by GUID */
24
+ setValue: (Id: string) => void;
25
+ /** Opens the dropdown programmatically */
26
+ open: () => void;
27
+ /** Closes the dropdown programmatically */
28
+ close: () => void;
29
+ /**
30
+ * Manually triggers validation and updates internal error state.
31
+ * Use this before form submission to validate required fields.
32
+ * Calls onValidationChange callback with the validation result.
33
+ * @returns true if valid (has selection or not required), false if invalid
34
+ */
35
+ validate: () => boolean;
36
+ }
37
+ /** Props for LookupField component */
38
+ export interface LookupFieldProps<TRecord extends LookupRecord = LookupRecord> {
39
+ /** Entity name for API endpoint (e.g., 'customers', 'products') */
40
+ entity: string;
41
+ /** Label displayed above the input. Optional when used in table columns where the column header provides the label. */
42
+ label?: string;
43
+ /** Fields to display in dropdown options */
44
+ displayFields: (keyof TRecord & string)[];
45
+ /** Currently selected record ID (GUID) or null */
46
+ value: string | null;
47
+ /** Callback when selection changes */
48
+ onChange: (record: TRecord | null, previousRecord: TRecord | null) => void;
49
+ /**
50
+ * Fetcher function for API requests (FR29, FR31).
51
+ * Receives entity name and request, returns the search response.
52
+ * Gives full control over URL construction, HTTP client, headers, etc.
53
+ *
54
+ * Use `createFetcher('/api')` helper for simple cases.
55
+ *
56
+ * @example
57
+ * // Using createFetcher helper
58
+ * import { createFetcher } from 'siesa-ui-kit'
59
+ * <LookupField fetcher={createFetcher('/api')} />
60
+ *
61
+ * @example
62
+ * // With auth token
63
+ * <LookupField
64
+ * fetcher={async (entity, request) => {
65
+ * const res = await fetch(`/api/${entity}/search`, {
66
+ * method: 'POST',
67
+ * headers: {
68
+ * 'Content-Type': 'application/json',
69
+ * Authorization: `Bearer ${token}`,
70
+ * },
71
+ * body: JSON.stringify(request),
72
+ * })
73
+ * return res.json()
74
+ * }}
75
+ * />
76
+ *
77
+ * @example
78
+ * // With axios
79
+ * <LookupField
80
+ * fetcher={async (entity, request) => {
81
+ * const { data } = await axios.post(`/api/${entity}/search`, request)
82
+ * return data
83
+ * }}
84
+ * />
85
+ */
86
+ fetcher: Fetcher;
87
+ /** Show clear button to reset selection (default: true) */
88
+ clearable?: boolean;
89
+ /** Placeholder text when no value selected */
90
+ placeholder?: string;
91
+ /** Additional CSS classes for root element */
92
+ className?: string;
93
+ /** Number of records per page (default: 10) */
94
+ pageSize?: number;
95
+ /** Callback triggered when an API error occurs */
96
+ onError?: (error: Error) => void;
97
+ /** Fields to search against (defaults to displayFields) */
98
+ searchFields?: (keyof TRecord & string)[];
99
+ /**
100
+ * Minimum number of characters required before search is triggered.
101
+ * When user types fewer characters, a message is shown prompting for more input.
102
+ * @default 1
103
+ */
104
+ minChars?: number;
105
+ /**
106
+ * Single field to display for selected value (priority 3).
107
+ * When set, only this field is shown in the trigger for the selected record.
108
+ * Priority order: renderSelected > displayTemplate > displayValue > all displayFields concatenated
109
+ */
110
+ displayValue?: keyof TRecord & string;
111
+ /**
112
+ * Template string with {field} placeholders for selected value display (priority 2).
113
+ * Example: "{codigo} - {nombre}" displays "C001 - Acme Corporation"
114
+ * Priority order: renderSelected > displayTemplate > displayValue > all displayFields concatenated
115
+ */
116
+ displayTemplate?: string;
117
+ /**
118
+ * Custom render function for selected value display (priority 1 - highest).
119
+ * Receives the selected record and returns the string to display.
120
+ * Priority order: renderSelected > displayTemplate > displayValue > all displayFields concatenated
121
+ */
122
+ renderSelected?: (record: TRecord) => string;
123
+ /**
124
+ * Static filters to apply to all API requests.
125
+ * Accepts simple object format: { activo: true, tipo: "A" }
126
+ * Or expressive AND/OR format: [[{a:1},{a:2}], [{b:true}]]
127
+ */
128
+ filters?: SimpleFilter | FilterExpression;
129
+ /**
130
+ * Function that returns dynamic filters.
131
+ * Called before each API request.
132
+ * Takes precedence over static `filters` prop when both provided.
133
+ */
134
+ getFilters?: () => SimpleFilter | FilterExpression;
135
+ /**
136
+ * Array of dependency values that trigger data reload when changed.
137
+ * Use with `getFilters` to implement cascading lookups.
138
+ *
139
+ * **IMPORTANT:** Values must be JSON-serializable (primitives, plain objects, arrays).
140
+ * Do not include functions, circular references, or non-serializable values.
141
+ *
142
+ * @example
143
+ * // Reload cities when countryId changes
144
+ * <LookupField
145
+ * entity="cities"
146
+ * getFilters={() => ({ countryId: selectedCountryId })}
147
+ * dependencies={[selectedCountryId]}
148
+ * />
149
+ */
150
+ dependencies?: unknown[];
151
+ /**
152
+ * Sort order for API results.
153
+ * If not specified, defaults to first displayField ascending.
154
+ *
155
+ * @example
156
+ * // Sort by name descending
157
+ * <LookupField orderBy={{ field: 'nombre', direction: 'desc' }} />
158
+ */
159
+ orderBy?: OrderBy;
160
+ /**
161
+ * Additional fields to request from API but not display in dropdown.
162
+ * These fields are available in the record passed to onChange and other callbacks.
163
+ * Useful for accessing related data for business logic.
164
+ *
165
+ * @example
166
+ * // Request email and phone for use in form logic
167
+ * <LookupField<Customer>
168
+ * entity="customers"
169
+ * displayFields={['codigo', 'nombre']}
170
+ * bindFields={['email', 'telefono', 'direccion']}
171
+ * onChange={(customer) => {
172
+ * console.log(customer?.email) // Available!
173
+ * }}
174
+ * />
175
+ */
176
+ bindFields?: (keyof TRecord & string)[];
177
+ /**
178
+ * Makes the component read-only.
179
+ * When true: selected value is displayed, dropdown cannot open, no clear button.
180
+ * Useful for displaying selected values in view-only forms.
181
+ * @default false
182
+ */
183
+ readOnly?: boolean;
184
+ /**
185
+ * Completely disables the component.
186
+ * When true:
187
+ * - Cannot receive focus or be clicked
188
+ * - Removed from tab navigation order (tabIndex=-1)
189
+ * - Shows dimmed/grayed appearance (opacity: 0.5)
190
+ * - Clear button is hidden
191
+ * - No events fire (onChange, onFocus, onBlur)
192
+ * - Validation is skipped (always valid)
193
+ *
194
+ * Use this for fields that are not applicable in the current context
195
+ * (e.g., City field disabled until Country is selected).
196
+ *
197
+ * Note: Different from `readOnly` which allows focus for accessibility
198
+ * but prevents editing. Use `readOnly` for view-only forms,
199
+ * use `disabled` for conditionally unavailable fields.
200
+ *
201
+ * @default false
202
+ */
203
+ disabled?: boolean;
204
+ /**
205
+ * Indicates validation error state.
206
+ * When true: red border styling applied, aria-invalid="true".
207
+ * Component remains interactive so user can fix the error.
208
+ * @default false
209
+ */
210
+ error?: boolean;
211
+ /**
212
+ * Callback when component receives focus.
213
+ * Fires only once when focus enters the component, not on internal focus changes.
214
+ */
215
+ onFocus?: (currentRecord: TRecord | null) => void;
216
+ /**
217
+ * Callback when component loses focus.
218
+ * Fires only when focus leaves the entire component, not on internal focus moves.
219
+ */
220
+ onBlur?: (currentRecord: TRecord | null) => void;
221
+ /**
222
+ * Callback when initial data loads.
223
+ * Provides data info and imperative ref for programmatic control.
224
+ * Fires only once per component mount.
225
+ */
226
+ onReady?: (data: LookupFieldReadyData, ref: LookupFieldRef<TRecord>) => void;
227
+ /**
228
+ * Callback when value prop contains a non-existent GUID.
229
+ * Use to handle cases where a controlled value no longer exists in the database.
230
+ */
231
+ onInvalidValue?: (Id: string) => void;
232
+ /**
233
+ * Override text displayed when no results are found.
234
+ * Bypasses i18n translation when provided.
235
+ * @default Uses i18n translation for 'noResults' key
236
+ */
237
+ noResultsText?: string;
238
+ /**
239
+ * Override placeholder text for the search input inside dropdown.
240
+ * Bypasses i18n translation when provided.
241
+ * @default Uses i18n translation for 'placeholder' key
242
+ */
243
+ searchPlaceholder?: string;
244
+ /**
245
+ * Marks the field as required for form validation.
246
+ * When true: shows asterisk indicator (unless showRequiredIndicator=false),
247
+ * enables validation on blur (unless validateOnBlur=false),
248
+ * and sets aria-required="true" for accessibility.
249
+ * @default false
250
+ */
251
+ required?: boolean;
252
+ /**
253
+ * Controls visibility of the required indicator (asterisk).
254
+ * When undefined, defaults to the value of `required` prop.
255
+ * Set to false to hide asterisk even when field is required.
256
+ * Set to true to show asterisk even when field is not required (unusual).
257
+ * @default undefined (follows `required` prop)
258
+ */
259
+ showRequiredIndicator?: boolean;
260
+ /**
261
+ * Enables automatic validation when component loses focus.
262
+ * When true and required, validates that a selection exists on blur.
263
+ * Set to false for manual-only validation via ref.validate().
264
+ * @default true
265
+ */
266
+ validateOnBlur?: boolean;
267
+ /**
268
+ * Callback fired when validation state changes.
269
+ * Receives true when validation passes, false when it fails.
270
+ * Useful for form-level validation state management.
271
+ */
272
+ onValidationChange?: (isValid: boolean) => void;
273
+ }
274
+ //# sourceMappingURL=LookupField.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LookupField.types.d.ts","sourceRoot":"","sources":["../../../src/components/LookupField/LookupField.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAC1E,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAE5D,8EAA8E;AAC9E,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB;AAED,4EAA4E;AAC5E,MAAM,WAAW,oBAAoB;IACnC,qDAAqD;IACrD,eAAe,EAAE,OAAO,CAAA;CACzB;AAED,sDAAsD;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EAAE,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAA;IAE5E;;;OAGG;IACH,cAAc,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IAErC;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IAEtB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAE1B;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;;;;OAMG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAE/B;;;;;OAKG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;IAExB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;CAChD"}
@@ -0,0 +1,37 @@
1
+ import type { ReactNode } from 'react';
2
+ type DocBoxType = 'how' | 'tip' | 'example' | 'warning' | 'code' | 'compare';
3
+ interface DocBoxProps {
4
+ type: DocBoxType;
5
+ title: string;
6
+ children: ReactNode;
7
+ }
8
+ export declare function DocBox({ type, title, children }: DocBoxProps): import("react/jsx-runtime").JSX.Element;
9
+ interface CodeBlockProps {
10
+ children: string;
11
+ }
12
+ export declare function CodeBlock({ children }: CodeBlockProps): import("react/jsx-runtime").JSX.Element;
13
+ interface DemoContainerProps {
14
+ title: string;
15
+ subtitle?: string;
16
+ children: ReactNode;
17
+ }
18
+ export declare function DemoContainer({ title, subtitle, children }: DemoContainerProps): import("react/jsx-runtime").JSX.Element;
19
+ interface DemoGridProps {
20
+ cols?: 1 | 2 | 3;
21
+ children: ReactNode;
22
+ }
23
+ export declare function DemoGrid({ cols, children }: DemoGridProps): import("react/jsx-runtime").JSX.Element;
24
+ interface PropCodeProps {
25
+ code: string;
26
+ }
27
+ export declare function PropCode({ code }: PropCodeProps): import("react/jsx-runtime").JSX.Element;
28
+ interface ResultBoxProps {
29
+ children: ReactNode;
30
+ }
31
+ export declare function ResultBox({ children }: ResultBoxProps): import("react/jsx-runtime").JSX.Element;
32
+ interface TestTipProps {
33
+ children: ReactNode;
34
+ }
35
+ export declare function TestTip({ children }: TestTipProps): import("react/jsx-runtime").JSX.Element;
36
+ export {};
37
+ //# sourceMappingURL=DocComponents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DocComponents.d.ts","sourceRoot":"","sources":["../../../../src/components/LookupField/__stories__/DocComponents.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,KAAK,UAAU,GAAG,KAAK,GAAG,KAAK,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAA;AAE5E,UAAU,WAAW;IACnB,IAAI,EAAE,UAAU,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,SAAS,CAAA;CACpB;AAoBD,wBAAgB,MAAM,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,WAAW,2CAO5D;AAED,UAAU,cAAc;IACtB,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,wBAAgB,SAAS,CAAC,EAAE,QAAQ,EAAE,EAAE,cAAc,2CAMrD;AAED,UAAU,kBAAkB;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,kBAAkB,2CAQ9E;AAED,UAAU,aAAa;IACrB,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IAChB,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,wBAAgB,QAAQ,CAAC,EAAE,IAAQ,EAAE,QAAQ,EAAE,EAAE,aAAa,2CAQ7D;AAED,UAAU,aAAa;IACrB,IAAI,EAAE,MAAM,CAAA;CACb;AAED,wBAAgB,QAAQ,CAAC,EAAE,IAAI,EAAE,EAAE,aAAa,2CAE/C;AAED,UAAU,cAAc;IACtB,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,wBAAgB,SAAS,CAAC,EAAE,QAAQ,EAAE,EAAE,cAAc,2CAErD;AAED,UAAU,YAAY;IACpB,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,wBAAgB,OAAO,CAAC,EAAE,QAAQ,EAAE,EAAE,YAAY,2CAMjD"}
@@ -0,0 +1,2 @@
1
+ export declare const worker: import("msw/browser").SetupWorker;
2
+ //# sourceMappingURL=browser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../../../../src/components/LookupField/__stories__/mocks/browser.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,MAAM,mCAA2B,CAAA"}
@@ -0,0 +1,38 @@
1
+ export interface Customer {
2
+ Id: string;
3
+ Codigo: string;
4
+ Nombre: string;
5
+ Email: string;
6
+ Ciudad: string;
7
+ Telefono: string;
8
+ Activo: boolean;
9
+ [key: string]: unknown;
10
+ }
11
+ export interface Product {
12
+ Id: string;
13
+ Codigo: string;
14
+ Nombre: string;
15
+ Precio: number;
16
+ PrecioDisplay: string;
17
+ Categoria: string;
18
+ [key: string]: unknown;
19
+ }
20
+ export interface City {
21
+ Id: string;
22
+ Codigo: string;
23
+ Nombre: string;
24
+ CountryId: string;
25
+ Activo: boolean;
26
+ [key: string]: unknown;
27
+ }
28
+ export interface Country {
29
+ Id: string;
30
+ Codigo: string;
31
+ Nombre: string;
32
+ [key: string]: unknown;
33
+ }
34
+ export declare const countries: Country[];
35
+ export declare const cities: City[];
36
+ export declare const customers: Customer[];
37
+ export declare const products: Product[];
38
+ //# sourceMappingURL=data.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../../../src/components/LookupField/__stories__/mocks/data.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,OAAO,CAAA;IACf,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB;AAED,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,aAAa,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,MAAM,CAAA;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB;AAED,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,OAAO,CAAA;IACf,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB;AAED,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB;AAED,eAAO,MAAM,SAAS,EAAE,OAAO,EAI9B,CAAA;AAED,eAAO,MAAM,MAAM,EAAE,IAAI,EAQxB,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,QAAQ,EAwI/B,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,OAAO,EAiE7B,CAAA"}
@@ -0,0 +1,3 @@
1
+ export declare const setSimulateError: (value: boolean) => void;
2
+ export declare const handlers: import("msw").HttpHandler[];
3
+ //# sourceMappingURL=handlers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../../../src/components/LookupField/__stories__/mocks/handlers.ts"],"names":[],"mappings":"AAqHA,eAAO,MAAM,gBAAgB,GAAI,OAAO,OAAO,SAE9C,CAAA;AAED,eAAO,MAAM,QAAQ,6BA2LpB,CAAA"}
@@ -0,0 +1,10 @@
1
+ export { useDebouncedSearch } from './useDebouncedSearch';
2
+ export { useKeyboardNavigation } from './useKeyboardNavigation';
3
+ export { useTranslationSafe } from './useTranslationSafe';
4
+ export { useClickOutside } from './useClickOutside';
5
+ export { useFloatingDropdown } from './useFloatingDropdown';
6
+ export { useVirtualList } from './useVirtualList';
7
+ export type { UseKeyboardNavigationOptions, UseKeyboardNavigationResult, } from './useKeyboardNavigation';
8
+ export type { UseFloatingDropdownOptions } from './useFloatingDropdown';
9
+ export type { UseVirtualListOptions, UseVirtualListResult } from './useVirtualList';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/LookupField/hooks/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,YAAY,EACV,4BAA4B,EAC5B,2BAA2B,GAC5B,MAAM,yBAAyB,CAAA;AAChC,YAAY,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAA;AACvE,YAAY,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA"}