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.
- package/dist/components/Button/icons.d.ts +6 -5
- package/dist/components/Button/icons.d.ts.map +1 -1
- package/dist/components/Dropdown/Dropdown.d.ts +68 -9
- package/dist/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/dist/components/Dropdown/Dropdown.types.d.ts +18 -0
- package/dist/components/Dropdown/Dropdown.types.d.ts.map +1 -1
- package/dist/components/Dropdown/icons.d.ts +3 -0
- package/dist/components/Dropdown/icons.d.ts.map +1 -1
- package/dist/components/DropdownItemCollapsible/DropdownItemCollapsible.d.ts.map +1 -1
- package/dist/components/DropdownItemCollapsible/DropdownItemCollapsible.types.d.ts +21 -0
- package/dist/components/DropdownItemCollapsible/DropdownItemCollapsible.types.d.ts.map +1 -1
- package/dist/components/LookupField/LookupField.d.ts +6 -0
- package/dist/components/LookupField/LookupField.d.ts.map +1 -0
- package/dist/components/LookupField/LookupField.types.d.ts +274 -0
- package/dist/components/LookupField/LookupField.types.d.ts.map +1 -0
- package/dist/components/LookupField/__stories__/DocComponents.d.ts +37 -0
- package/dist/components/LookupField/__stories__/DocComponents.d.ts.map +1 -0
- package/dist/components/LookupField/__stories__/mocks/browser.d.ts +2 -0
- package/dist/components/LookupField/__stories__/mocks/browser.d.ts.map +1 -0
- package/dist/components/LookupField/__stories__/mocks/data.d.ts +38 -0
- package/dist/components/LookupField/__stories__/mocks/data.d.ts.map +1 -0
- package/dist/components/LookupField/__stories__/mocks/handlers.d.ts +3 -0
- package/dist/components/LookupField/__stories__/mocks/handlers.d.ts.map +1 -0
- package/dist/components/LookupField/hooks/index.d.ts +10 -0
- package/dist/components/LookupField/hooks/index.d.ts.map +1 -0
- package/dist/components/LookupField/hooks/useClickOutside.d.ts +11 -0
- package/dist/components/LookupField/hooks/useClickOutside.d.ts.map +1 -0
- package/dist/components/LookupField/hooks/useDebouncedSearch.d.ts +2 -0
- package/dist/components/LookupField/hooks/useDebouncedSearch.d.ts.map +1 -0
- package/dist/components/LookupField/hooks/useFloatingDropdown.d.ts +38 -0
- package/dist/components/LookupField/hooks/useFloatingDropdown.d.ts.map +1 -0
- package/dist/components/LookupField/hooks/useKeyboardNavigation.d.ts +16 -0
- package/dist/components/LookupField/hooks/useKeyboardNavigation.d.ts.map +1 -0
- package/dist/components/LookupField/hooks/useTranslationSafe.d.ts +9 -0
- package/dist/components/LookupField/hooks/useTranslationSafe.d.ts.map +1 -0
- package/dist/components/LookupField/hooks/useVirtualList.d.ts +40 -0
- package/dist/components/LookupField/hooks/useVirtualList.d.ts.map +1 -0
- package/dist/components/LookupField/index.d.ts +7 -0
- package/dist/components/LookupField/index.d.ts.map +1 -0
- package/dist/components/LookupField/parts/LiveRegion.d.ts +6 -0
- package/dist/components/LookupField/parts/LiveRegion.d.ts.map +1 -0
- package/dist/components/LookupField/parts/SearchInput.d.ts +11 -0
- package/dist/components/LookupField/parts/SearchInput.d.ts.map +1 -0
- package/dist/components/LookupField/services/api.d.ts +23 -0
- package/dist/components/LookupField/services/api.d.ts.map +1 -0
- package/dist/components/LookupField/services/api.types.d.ts +74 -0
- package/dist/components/LookupField/services/api.types.d.ts.map +1 -0
- package/dist/components/LookupField/services/index.d.ts +4 -0
- package/dist/components/LookupField/services/index.d.ts.map +1 -0
- package/dist/components/LookupField/types/filter.types.d.ts +51 -0
- package/dist/components/LookupField/types/filter.types.d.ts.map +1 -0
- package/dist/components/LookupField/utils/cn.d.ts +3 -0
- package/dist/components/LookupField/utils/cn.d.ts.map +1 -0
- package/dist/components/LookupField/utils/filterBuilder.d.ts +35 -0
- package/dist/components/LookupField/utils/filterBuilder.d.ts.map +1 -0
- package/dist/components/LookupField/utils/index.d.ts +4 -0
- package/dist/components/LookupField/utils/index.d.ts.map +1 -0
- package/dist/components/LookupField/utils/templateInterpolation.d.ts +13 -0
- package/dist/components/LookupField/utils/templateInterpolation.d.ts.map +1 -0
- package/dist/components/Navbar/Navbar.d.ts.map +1 -1
- package/dist/components/Navbar/Navbar.types.d.ts +46 -1
- package/dist/components/Navbar/Navbar.types.d.ts.map +1 -1
- package/dist/components/NavigationRailGroup/NavigationRailGroup.d.ts +122 -0
- package/dist/components/NavigationRailGroup/NavigationRailGroup.d.ts.map +1 -0
- package/dist/components/NavigationRailGroup/NavigationRailGroup.types.d.ts +139 -0
- package/dist/components/NavigationRailGroup/NavigationRailGroup.types.d.ts.map +1 -0
- package/dist/components/NavigationRailGroup/icons.d.ts +33 -0
- package/dist/components/NavigationRailGroup/icons.d.ts.map +1 -0
- package/dist/components/NavigationRailGroup/index.d.ts +4 -0
- package/dist/components/NavigationRailGroup/index.d.ts.map +1 -0
- package/dist/components/NavigationRailItem/NavigationRailItem.d.ts.map +1 -1
- package/dist/components/NavigationRailItem/NavigationRailItem.types.d.ts +14 -0
- package/dist/components/NavigationRailItem/NavigationRailItem.types.d.ts.map +1 -1
- package/dist/components/NavigationRailTypes/NavigationRailTypes.d.ts.map +1 -1
- package/dist/components/NavigationRailTypes/NavigationRailTypes.types.d.ts +49 -0
- package/dist/components/NavigationRailTypes/NavigationRailTypes.types.d.ts.map +1 -1
- package/dist/components/NavigationRailTypes/icons.d.ts +15 -29
- package/dist/components/NavigationRailTypes/icons.d.ts.map +1 -1
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Select/icons.d.ts +6 -2
- package/dist/components/Select/icons.d.ts.map +1 -1
- package/dist/index.d.ts +38 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/siesa-ui-kit.cjs +489 -238
- package/dist/siesa-ui-kit.cjs.map +1 -1
- package/dist/siesa-ui-kit.mjs +12302 -1519
- package/dist/siesa-ui-kit.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/dist/views/LayoutBase/LayoutBase.d.ts +73 -0
- package/dist/views/LayoutBase/LayoutBase.d.ts.map +1 -0
- package/dist/views/LayoutBase/LayoutBase.types.d.ts +99 -0
- package/dist/views/LayoutBase/LayoutBase.types.d.ts.map +1 -0
- package/dist/views/LayoutBase/index.d.ts +3 -0
- package/dist/views/LayoutBase/index.d.ts.map +1 -0
- package/dist/views/ListView/ListView.d.ts +18 -12
- package/dist/views/ListView/ListView.d.ts.map +1 -1
- package/dist/views/ListView/ListView.types.d.ts +31 -94
- package/dist/views/ListView/ListView.types.d.ts.map +1 -1
- package/dist/views/ListView/index.d.ts +1 -1
- package/dist/views/ListView/index.d.ts.map +1 -1
- package/package.json +20 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Hook to detect clicks outside a referenced element.
|
|
4
|
+
* Uses mousedown for immediate detection.
|
|
5
|
+
*
|
|
6
|
+
* @param ref - Reference to the element to monitor
|
|
7
|
+
* @param handler - Callback when click outside occurs
|
|
8
|
+
* @param enabled - Whether the hook is active (default: true)
|
|
9
|
+
*/
|
|
10
|
+
export declare function useClickOutside<T extends HTMLElement>(ref: RefObject<T | null>, handler: (event: MouseEvent) => void, enabled?: boolean): void;
|
|
11
|
+
//# sourceMappingURL=useClickOutside.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useClickOutside.d.ts","sourceRoot":"","sources":["../../../../src/components/LookupField/hooks/useClickOutside.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAA0B,MAAM,OAAO,CAAA;AAE9D;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,WAAW,EACnD,GAAG,EAAE,SAAS,CAAC,CAAC,GAAG,IAAI,CAAC,EACxB,OAAO,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,EACpC,OAAO,GAAE,OAAc,GACtB,IAAI,CAoBN"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDebouncedSearch.d.ts","sourceRoot":"","sources":["../../../../src/components/LookupField/hooks/useDebouncedSearch.ts"],"names":[],"mappings":"AAIA,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,GAAE,MAAoB,GAAG,MAAM,CAcrF"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type Placement } from '@floating-ui/react';
|
|
2
|
+
export interface UseFloatingDropdownOptions {
|
|
3
|
+
placement?: Placement;
|
|
4
|
+
offsetPx?: number;
|
|
5
|
+
enabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Hook for dropdown positioning using @floating-ui/react.
|
|
9
|
+
* Handles viewport boundary detection and auto-positioning.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useFloatingDropdown({ placement, offsetPx, enabled, }?: UseFloatingDropdownOptions): {
|
|
12
|
+
refs: {
|
|
13
|
+
reference: import("react").MutableRefObject<import("@floating-ui/react-dom").ReferenceType | null>;
|
|
14
|
+
floating: React.MutableRefObject<HTMLElement | null>;
|
|
15
|
+
setReference: (node: import("@floating-ui/react-dom").ReferenceType | null) => void;
|
|
16
|
+
setFloating: (node: HTMLElement | null) => void;
|
|
17
|
+
} & import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
|
|
18
|
+
floatingStyles: import("react").CSSProperties;
|
|
19
|
+
context: {
|
|
20
|
+
x: number;
|
|
21
|
+
y: number;
|
|
22
|
+
placement: Placement;
|
|
23
|
+
strategy: import("@floating-ui/utils").Strategy;
|
|
24
|
+
middlewareData: import("@floating-ui/core").MiddlewareData;
|
|
25
|
+
isPositioned: boolean;
|
|
26
|
+
update: () => void;
|
|
27
|
+
floatingStyles: React.CSSProperties;
|
|
28
|
+
open: boolean;
|
|
29
|
+
onOpenChange: (open: boolean, event?: Event, reason?: import("@floating-ui/react").OpenChangeReason) => void;
|
|
30
|
+
events: import("@floating-ui/react").FloatingEvents;
|
|
31
|
+
dataRef: React.MutableRefObject<import("@floating-ui/react").ContextData>;
|
|
32
|
+
nodeId: string | undefined;
|
|
33
|
+
floatingId: string | undefined;
|
|
34
|
+
refs: import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
|
|
35
|
+
elements: import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=useFloatingDropdown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFloatingDropdown.d.ts","sourceRoot":"","sources":["../../../../src/components/LookupField/hooks/useFloatingDropdown.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,SAAS,EAAqB,MAAM,oBAAoB,CAAA;AAEhG,MAAM,WAAW,0BAA0B;IACzC,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,SAA0B,EAC1B,QAAY,EACZ,OAAc,GACf,GAAE,0BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BjC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface UseKeyboardNavigationOptions<TRecord> {
|
|
2
|
+
records: TRecord[];
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
onSelect: (record: TRecord) => void;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
onEscape: () => void;
|
|
7
|
+
onClear: () => void;
|
|
8
|
+
searchQuery: string;
|
|
9
|
+
}
|
|
10
|
+
export interface UseKeyboardNavigationResult {
|
|
11
|
+
highlightedIndex: number;
|
|
12
|
+
setHighlightedIndex: (index: number) => void;
|
|
13
|
+
handleKeyDown: (event: React.KeyboardEvent) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare function useKeyboardNavigation<TRecord>(options: UseKeyboardNavigationOptions<TRecord>): UseKeyboardNavigationResult;
|
|
16
|
+
//# sourceMappingURL=useKeyboardNavigation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useKeyboardNavigation.d.ts","sourceRoot":"","sources":["../../../../src/components/LookupField/hooks/useKeyboardNavigation.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,4BAA4B,CAAC,OAAO;IACnD,OAAO,EAAE,OAAO,EAAE,CAAA;IAClB,MAAM,EAAE,OAAO,CAAA;IACf,QAAQ,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAA;IACnC,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,2BAA2B;IAC1C,gBAAgB,EAAE,MAAM,CAAA;IACxB,mBAAmB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC5C,aAAa,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,KAAK,IAAI,CAAA;CACpD;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAC3C,OAAO,EAAE,4BAA4B,CAAC,OAAO,CAAC,GAC7C,2BAA2B,CAsF7B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { useTranslation } from 'react-i18next';
|
|
2
|
+
type TFunction = (key: string, params?: Record<string, unknown>) => string;
|
|
3
|
+
interface UseTranslationSafeResult {
|
|
4
|
+
t: TFunction;
|
|
5
|
+
i18n: ReturnType<typeof useTranslation>['i18n'] | null;
|
|
6
|
+
}
|
|
7
|
+
export declare function useTranslationSafe(): UseTranslationSafeResult;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=useTranslationSafe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTranslationSafe.d.ts","sourceRoot":"","sources":["../../../../src/components/LookupField/hooks/useTranslationSafe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AA6B9C,KAAK,SAAS,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,CAAA;AAE1E,UAAU,wBAAwB;IAChC,CAAC,EAAE,SAAS,CAAA;IACZ,IAAI,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,GAAG,IAAI,CAAA;CACvD;AAED,wBAAgB,kBAAkB,IAAI,wBAAwB,CAqB7D"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type VirtualItem } from '@tanstack/react-virtual';
|
|
2
|
+
import { type RefObject } from 'react';
|
|
3
|
+
export interface UseVirtualListOptions {
|
|
4
|
+
/** Total number of items in the list */
|
|
5
|
+
count: number;
|
|
6
|
+
/** Reference to the scrollable container element */
|
|
7
|
+
parentRef: RefObject<HTMLElement | null>;
|
|
8
|
+
/** Height of each item in pixels (default: 36) */
|
|
9
|
+
estimateSize?: number;
|
|
10
|
+
/** Number of extra items to render above/below viewport (default: 5) */
|
|
11
|
+
overscan?: number;
|
|
12
|
+
/** Enable/disable virtualization (default: true) */
|
|
13
|
+
enabled?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface UseVirtualListResult {
|
|
16
|
+
/** Array of virtual items currently visible (plus overscan) */
|
|
17
|
+
virtualItems: VirtualItem[];
|
|
18
|
+
/** Total height of all items for scrollbar sizing */
|
|
19
|
+
totalSize: number;
|
|
20
|
+
/** Scroll to a specific item index */
|
|
21
|
+
scrollToIndex: (index: number, options?: {
|
|
22
|
+
align?: 'start' | 'center' | 'end' | 'auto';
|
|
23
|
+
}) => void;
|
|
24
|
+
/** Measure element at index (for dynamic heights if needed) */
|
|
25
|
+
measureElement: (element: HTMLElement | null) => void;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Hook for virtualizing a list of items, rendering only visible items in the DOM.
|
|
29
|
+
* Wraps @tanstack/react-virtual with project-specific defaults.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```tsx
|
|
33
|
+
* const { virtualItems, totalSize } = useVirtualList({
|
|
34
|
+
* count: records.length,
|
|
35
|
+
* parentRef: scrollContainerRef,
|
|
36
|
+
* })
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export declare function useVirtualList({ count, parentRef, estimateSize, overscan, enabled, }: UseVirtualListOptions): UseVirtualListResult;
|
|
40
|
+
//# sourceMappingURL=useVirtualList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useVirtualList.d.ts","sourceRoot":"","sources":["../../../../src/components/LookupField/hooks/useVirtualList.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAC1E,OAAO,EAAE,KAAK,SAAS,EAAe,MAAM,OAAO,CAAA;AAQnD,MAAM,WAAW,qBAAqB;IACpC,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAA;IACb,oDAAoD;IACpD,SAAS,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;IACxC,kDAAkD;IAClD,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,wEAAwE;IACxE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,oDAAoD;IACpD,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,MAAM,WAAW,oBAAoB;IACnC,+DAA+D;IAC/D,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,qDAAqD;IACrD,SAAS,EAAE,MAAM,CAAA;IACjB,sCAAsC;IACtC,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;IACjG,+DAA+D;IAC/D,cAAc,EAAE,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAA;CACtD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,SAAS,EACT,YAAuC,EACvC,QAA2B,EAC3B,OAAc,GACf,EAAE,qBAAqB,GAAG,oBAAoB,CAc9C"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { LookupField } from './LookupField';
|
|
2
|
+
export type { LookupFieldProps, LookupRecord, LookupFieldRef, LookupFieldReadyData, } from './LookupField.types';
|
|
3
|
+
export { createFetcher } from './services/api';
|
|
4
|
+
export type { Fetcher, SearchRequest, SearchResponse, OrderBy, } from './services/api.types';
|
|
5
|
+
export { normalizeFilters, buildExpressiveFilter, mergeFilters, } from './utils/filterBuilder';
|
|
6
|
+
export type { FilterExpression, SimpleFilter, FilterCondition, } from './types/filter.types';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/LookupField/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAG3C,YAAY,EACV,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,oBAAoB,GACrB,MAAM,qBAAqB,CAAA;AAG5B,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAC9C,YAAY,EACV,OAAO,EACP,aAAa,EACb,cAAc,EACd,OAAO,GACR,MAAM,sBAAsB,CAAA;AAG7B,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,YAAY,GACb,MAAM,uBAAuB,CAAA;AAC9B,YAAY,EACV,gBAAgB,EAChB,YAAY,EACZ,eAAe,GAChB,MAAM,sBAAsB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LiveRegion.d.ts","sourceRoot":"","sources":["../../../../src/components/LookupField/parts/LiveRegion.tsx"],"names":[],"mappings":"AAAA,UAAU,eAAe;IACvB,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,wBAAgB,UAAU,CAAC,EAAE,OAAO,EAAE,EAAE,eAAe,2CAMtD"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface SearchInputProps {
|
|
2
|
+
value: string;
|
|
3
|
+
onChange: (value: string) => void;
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
listboxId?: string;
|
|
7
|
+
activeDescendantId?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const SearchInput: import("react").ForwardRefExoticComponent<SearchInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=SearchInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchInput.d.ts","sourceRoot":"","sources":["../../../../src/components/LookupField/parts/SearchInput.tsx"],"names":[],"mappings":"AAIA,UAAU,gBAAgB;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC5B;AAED,eAAO,MAAM,WAAW,+GAoCtB,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Fetcher } from './api.types';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a standard fetcher function for a given base URL.
|
|
4
|
+
* Use this helper for simple cases where you just need to specify the API base URL.
|
|
5
|
+
*
|
|
6
|
+
* @param baseUrl - Base URL for the API (e.g., '/api', 'https://api.example.com')
|
|
7
|
+
* @returns A fetcher function compatible with LookupField
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* // Simple usage
|
|
11
|
+
* const fetcher = createFetcher('/api')
|
|
12
|
+
* <LookupField entity="customers" fetcher={fetcher} />
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* // With authentication - wrap createFetcher or create custom fetcher
|
|
16
|
+
* const fetcher = createFetcher('/api', {
|
|
17
|
+
* headers: { Authorization: `Bearer ${token}` }
|
|
18
|
+
* })
|
|
19
|
+
*/
|
|
20
|
+
export declare function createFetcher(baseUrl: string, options?: {
|
|
21
|
+
headers?: Record<string, string>;
|
|
22
|
+
}): Fetcher;
|
|
23
|
+
//# sourceMappingURL=api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../src/components/LookupField/services/api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAiC,MAAM,aAAa,CAAA;AAOzE;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,GAC7C,OAAO,CA4BT"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { FilterExpression } from '../types/filter.types';
|
|
2
|
+
/**
|
|
3
|
+
* Custom fetcher function type for HTTP requests (FR29, FR31).
|
|
4
|
+
* Receives the entity name and request, returns the search response.
|
|
5
|
+
* Gives full control over URL construction, HTTP client, headers, etc.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* // Using fetch with custom URL and auth
|
|
9
|
+
* const fetcher: Fetcher = async (entity, request) => {
|
|
10
|
+
* const response = await fetch(`/api/v2/${entity}/search`, {
|
|
11
|
+
* method: 'POST',
|
|
12
|
+
* headers: {
|
|
13
|
+
* 'Content-Type': 'application/json',
|
|
14
|
+
* 'Authorization': `Bearer ${getToken()}`,
|
|
15
|
+
* },
|
|
16
|
+
* body: JSON.stringify(request),
|
|
17
|
+
* })
|
|
18
|
+
* if (!response.ok) throw new Error(`API Error: ${response.status}`)
|
|
19
|
+
* return response.json()
|
|
20
|
+
* }
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* // Using axios
|
|
24
|
+
* const fetcher: Fetcher = async (entity, request) => {
|
|
25
|
+
* const { data } = await axios.post(`/api/${entity}/search`, request)
|
|
26
|
+
* return data
|
|
27
|
+
* }
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* // Using the createFetcher helper for simple cases
|
|
31
|
+
* import { createFetcher } from 'siesa-ui-kit'
|
|
32
|
+
* const fetcher = createFetcher('/api')
|
|
33
|
+
*/
|
|
34
|
+
export type Fetcher = <TRecord = Record<string, unknown>>(entity: string, request: SearchRequest) => Promise<SearchResponse<TRecord>>;
|
|
35
|
+
/** Sort configuration for API requests (FR17) */
|
|
36
|
+
export interface OrderBy {
|
|
37
|
+
/** Field name to sort by */
|
|
38
|
+
field: string;
|
|
39
|
+
/** Sort direction */
|
|
40
|
+
direction: 'asc' | 'desc';
|
|
41
|
+
}
|
|
42
|
+
/** Request body for search API calls */
|
|
43
|
+
export interface SearchRequest {
|
|
44
|
+
/** Fields to return in the response (always includes 'Id' - PascalCase standard) */
|
|
45
|
+
fields: string[];
|
|
46
|
+
/** Search text (empty for initial load) */
|
|
47
|
+
search?: string;
|
|
48
|
+
/** Fields to search against (defaults to displayFields) */
|
|
49
|
+
searchFields?: string[];
|
|
50
|
+
/** Page number (1-indexed) */
|
|
51
|
+
page: number;
|
|
52
|
+
/** Records per page */
|
|
53
|
+
pageSize: number;
|
|
54
|
+
/** Filter conditions in expressive format */
|
|
55
|
+
filters?: FilterExpression;
|
|
56
|
+
/** Sort order for results */
|
|
57
|
+
orderBy?: OrderBy;
|
|
58
|
+
}
|
|
59
|
+
/** Response body from search API calls [UPDATED v0.4 - removed total] */
|
|
60
|
+
export interface SearchResponse<TRecord> {
|
|
61
|
+
/** Array of matching records */
|
|
62
|
+
data: TRecord[];
|
|
63
|
+
/** Current page number */
|
|
64
|
+
page: number;
|
|
65
|
+
/** Page size used */
|
|
66
|
+
pageSize: number;
|
|
67
|
+
}
|
|
68
|
+
/** Error thrown when API request fails */
|
|
69
|
+
export declare class ApiError extends Error {
|
|
70
|
+
readonly status: number;
|
|
71
|
+
readonly statusText: string;
|
|
72
|
+
constructor(message: string, status: number, statusText: string);
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=api.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.types.d.ts","sourceRoot":"","sources":["../../../../src/components/LookupField/services/api.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACtD,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,aAAa,KACnB,OAAO,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAA;AAErC,iDAAiD;AACjD,MAAM,WAAW,OAAO;IACtB,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,qBAAqB;IACrB,SAAS,EAAE,KAAK,GAAG,MAAM,CAAA;CAC1B;AAED,wCAAwC;AACxC,MAAM,WAAW,aAAa;IAC5B,oFAAoF;IACpF,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,2CAA2C;IAC3C,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,2DAA2D;IAC3D,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;IACvB,8BAA8B;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,uBAAuB;IACvB,QAAQ,EAAE,MAAM,CAAA;IAChB,6CAA6C;IAC7C,OAAO,CAAC,EAAE,gBAAgB,CAAA;IAC1B,6BAA6B;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,yEAAyE;AACzE,MAAM,WAAW,cAAc,CAAC,OAAO;IACrC,gCAAgC;IAChC,IAAI,EAAE,OAAO,EAAE,CAAA;IACf,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,qBAAqB;IACrB,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,0CAA0C;AAC1C,qBAAa,QAAS,SAAQ,KAAK;aAGf,MAAM,EAAE,MAAM;aACd,UAAU,EAAE,MAAM;gBAFlC,OAAO,EAAE,MAAM,EACC,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM;CAKrC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/LookupField/services/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Filter operators per FR6
|
|
3
|
+
* PascalCase enum keys per internal coding convention
|
|
4
|
+
*/
|
|
5
|
+
export declare enum FilterOperator {
|
|
6
|
+
In = "__in",
|
|
7
|
+
NotIn = "__notin",
|
|
8
|
+
Contains = "__contains",
|
|
9
|
+
GreaterThan = "__gt",
|
|
10
|
+
GreaterThanOrEqual = "__gte",
|
|
11
|
+
LessThan = "__lt",
|
|
12
|
+
LessThanOrEqual = "__lte"
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Value types for filter conditions
|
|
16
|
+
* Supports direct values and operator objects
|
|
17
|
+
*/
|
|
18
|
+
export type FilterValue = string | number | boolean | null | {
|
|
19
|
+
__in: (string | number)[];
|
|
20
|
+
} | {
|
|
21
|
+
__notin: (string | number)[];
|
|
22
|
+
} | {
|
|
23
|
+
__contains: string;
|
|
24
|
+
} | {
|
|
25
|
+
__gt: number;
|
|
26
|
+
} | {
|
|
27
|
+
__gte: number;
|
|
28
|
+
} | {
|
|
29
|
+
__lt: number;
|
|
30
|
+
} | {
|
|
31
|
+
__lte: number;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Single filter condition: { field: value }
|
|
35
|
+
*/
|
|
36
|
+
export interface FilterCondition {
|
|
37
|
+
[field: string]: FilterValue;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Expressive filter format per FR6
|
|
41
|
+
* Outer array = AND conditions
|
|
42
|
+
* Inner array = OR conditions
|
|
43
|
+
* Example: [[{a:1},{a:2}], [{b:true}]] = (a=1 OR a=2) AND (b=true)
|
|
44
|
+
*/
|
|
45
|
+
export type FilterExpression = FilterCondition[][];
|
|
46
|
+
/**
|
|
47
|
+
* Simple filter format: { field: value, field2: value2 }
|
|
48
|
+
* All conditions are ANDed together
|
|
49
|
+
*/
|
|
50
|
+
export type SimpleFilter = Record<string, FilterValue>;
|
|
51
|
+
//# sourceMappingURL=filter.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter.types.d.ts","sourceRoot":"","sources":["../../../../src/components/LookupField/types/filter.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,oBAAY,cAAc;IACxB,EAAE,SAAS;IACX,KAAK,YAAY;IACjB,QAAQ,eAAe;IACvB,WAAW,SAAS;IACpB,kBAAkB,UAAU;IAC5B,QAAQ,SAAS;IACjB,eAAe,UAAU;CAC1B;AAED;;;GAGG;AACH,MAAM,MAAM,WAAW,GACnB,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ;IAAE,IAAI,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAA;CAAE,GAC7B;IAAE,OAAO,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAA;CAAE,GAChC;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,GACtB;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GACjB;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAErB;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,CAAA;CAC7B;AAED;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG,eAAe,EAAE,EAAE,CAAA;AAElD;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cn.d.ts","sourceRoot":"","sources":["../../../../src/components/LookupField/utils/cn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAA;AAG5C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,CAElD"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { FilterExpression, SimpleFilter } from '../types/filter.types';
|
|
2
|
+
/**
|
|
3
|
+
* Type guard to check if filter is already in expressive format
|
|
4
|
+
* @param filter - Filter to check
|
|
5
|
+
* @returns true if filter is FilterExpression (array of arrays)
|
|
6
|
+
*/
|
|
7
|
+
export declare function isExpressiveFilter(filter: unknown): filter is FilterExpression;
|
|
8
|
+
/**
|
|
9
|
+
* Converts simple filter object to expressive format
|
|
10
|
+
* Each key-value pair becomes a separate AND condition
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* buildExpressiveFilter({ activo: true, tipo: "A" })
|
|
14
|
+
* // Returns: [[{ activo: true }], [{ tipo: "A" }]]
|
|
15
|
+
*
|
|
16
|
+
* @param simpleFilter - Simple filter object
|
|
17
|
+
* @returns Expressive filter format
|
|
18
|
+
*/
|
|
19
|
+
export declare function buildExpressiveFilter(simpleFilter: SimpleFilter): FilterExpression;
|
|
20
|
+
/**
|
|
21
|
+
* Normalizes filter input to expressive format
|
|
22
|
+
* Passes through expressive filters unchanged, converts simple filters
|
|
23
|
+
*
|
|
24
|
+
* @param filters - Simple or expressive filter (or undefined)
|
|
25
|
+
* @returns Expressive filter format or undefined
|
|
26
|
+
*/
|
|
27
|
+
export declare function normalizeFilters(filters?: SimpleFilter | FilterExpression): FilterExpression | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Merges multiple filter expressions with AND logic
|
|
30
|
+
*
|
|
31
|
+
* @param filters - Array of filter expressions to merge
|
|
32
|
+
* @returns Combined filter expression
|
|
33
|
+
*/
|
|
34
|
+
export declare function mergeFilters(...filters: (FilterExpression | undefined)[]): FilterExpression;
|
|
35
|
+
//# sourceMappingURL=filterBuilder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filterBuilder.d.ts","sourceRoot":"","sources":["../../../../src/components/LookupField/utils/filterBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAE3E;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,gBAAgB,CAE9E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,YAAY,EAAE,YAAY,GAAG,gBAAgB,CAElF;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,CAAC,EAAE,YAAY,GAAG,gBAAgB,GACxC,gBAAgB,GAAG,SAAS,CAI9B;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,GAAG,OAAO,EAAE,CAAC,gBAAgB,GAAG,SAAS,CAAC,EAAE,GAAG,gBAAgB,CAE3F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/LookupField/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAA;AACzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAC7D,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,EAChB,YAAY,GACb,MAAM,iBAAiB,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interpolates a template string with record field values.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* interpolateTemplate("{codigo} - {nombre}", { codigo: "C001", nombre: "Acme" })
|
|
6
|
+
* // Returns: "C001 - Acme"
|
|
7
|
+
*
|
|
8
|
+
* @param template - Template string with {fieldName} placeholders
|
|
9
|
+
* @param record - Record object with field values
|
|
10
|
+
* @returns Interpolated string with placeholders replaced by values
|
|
11
|
+
*/
|
|
12
|
+
export declare function interpolateTemplate<TRecord extends Record<string, unknown>>(template: string, record: TRecord): string;
|
|
13
|
+
//# sourceMappingURL=templateInterpolation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templateInterpolation.d.ts","sourceRoot":"","sources":["../../../../src/components/LookupField/utils/templateInterpolation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACzE,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,OAAO,GACd,MAAM,CAKR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Navbar.d.ts","sourceRoot":"","sources":["../../../src/components/Navbar/Navbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"Navbar.d.ts","sourceRoot":"","sources":["../../../src/components/Navbar/Navbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAalD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AACH,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAk1BxC,CAAC"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
+
import type { DropdownItemProps } from '../Dropdown/Dropdown.types';
|
|
3
|
+
import type { ButtonProps } from '../Button/Button.types';
|
|
2
4
|
/**
|
|
3
5
|
* Variante de dispositivo del Navbar
|
|
4
6
|
* - `responsive`: Se adapta automáticamente al viewport (por defecto)
|
|
@@ -18,7 +20,12 @@ export type NavbarVariant = 'responsive' | 'desktop' | 'tablet' | 'mobile';
|
|
|
18
20
|
* avatar: '/path/to/avatar.jpg',
|
|
19
21
|
* name: 'Juan Pérez',
|
|
20
22
|
* email: 'juan@ejemplo.com',
|
|
21
|
-
*
|
|
23
|
+
* menuItems: [
|
|
24
|
+
* { children: 'Account', icon: <UserIcon />, onClick: () => {} },
|
|
25
|
+
* { children: 'Settings', icon: <CogIcon />, onClick: () => {} },
|
|
26
|
+
* { isDivider: true },
|
|
27
|
+
* { children: 'Sign Out', onClick: () => {} },
|
|
28
|
+
* ],
|
|
22
29
|
* };
|
|
23
30
|
* ```
|
|
24
31
|
*/
|
|
@@ -40,10 +47,36 @@ export interface UserDropdownProps {
|
|
|
40
47
|
* Rol del usuario (alternativa a email, ej: "Administrador")
|
|
41
48
|
*/
|
|
42
49
|
role?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Items del menú dropdown de usuario
|
|
52
|
+
* Si no se proporciona, se usa un menú por defecto con Account, Notifications, Billing, Dark mode y Sign Out
|
|
53
|
+
*/
|
|
54
|
+
menuItems?: DropdownItemProps[];
|
|
43
55
|
/**
|
|
44
56
|
* Handler para click en el dropdown de usuario
|
|
57
|
+
* @deprecated Usar menuItems con onClick individuales en su lugar
|
|
45
58
|
*/
|
|
46
59
|
onMenuClick?: () => void;
|
|
60
|
+
/**
|
|
61
|
+
* Handler para la opción "Account" del menú por defecto
|
|
62
|
+
*/
|
|
63
|
+
onAccountClick?: () => void;
|
|
64
|
+
/**
|
|
65
|
+
* Handler para la opción "Notifications" del menú por defecto
|
|
66
|
+
*/
|
|
67
|
+
onNotificationsClick?: () => void;
|
|
68
|
+
/**
|
|
69
|
+
* Handler para la opción "Billing" del menú por defecto
|
|
70
|
+
*/
|
|
71
|
+
onBillingClick?: () => void;
|
|
72
|
+
/**
|
|
73
|
+
* Handler para la opción "Dark mode" del menú por defecto
|
|
74
|
+
*/
|
|
75
|
+
onDarkModeClick?: () => void;
|
|
76
|
+
/**
|
|
77
|
+
* Handler para la opción "Sign Out" del menú por defecto
|
|
78
|
+
*/
|
|
79
|
+
onSignOutClick?: () => void;
|
|
47
80
|
}
|
|
48
81
|
/**
|
|
49
82
|
* Configuración de badges de notificación
|
|
@@ -146,6 +179,18 @@ export interface NavbarProps {
|
|
|
146
179
|
* @default false
|
|
147
180
|
*/
|
|
148
181
|
hideActionButtons?: boolean;
|
|
182
|
+
/**
|
|
183
|
+
* Mostrar el botón de navegación en el leading (lado izquierdo)
|
|
184
|
+
* Solo visible en desktop/tablet
|
|
185
|
+
*
|
|
186
|
+
* @default false
|
|
187
|
+
*/
|
|
188
|
+
showNavigationButton?: boolean;
|
|
189
|
+
/**
|
|
190
|
+
* Props adicionales para el botón de navegación
|
|
191
|
+
* Permite personalizar el botón usando las props del componente Button
|
|
192
|
+
*/
|
|
193
|
+
navigationButtonProps?: Partial<ButtonProps>;
|
|
149
194
|
/**
|
|
150
195
|
* Elemento leading personalizado (reemplaza el botón de navegación por defecto)
|
|
151
196
|
* Solo visible en desktop/tablet
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Navbar.types.d.ts","sourceRoot":"","sources":["../../../src/components/Navbar/Navbar.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Navbar.types.d.ts","sourceRoot":"","sources":["../../../src/components/Navbar/Navbar.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE1D;;;;;;;;GAQG;AACH,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE3E;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,SAAS,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAEhC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IAEzB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAE5B;;OAEG;IACH,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAC;IAElC;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAE5B;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAE7B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;;OAKG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,YAAY,CAAC,EAAE,iBAAiB,CAAC;IAEjC;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,aAAa,CAAC,EAAE,kBAAkB,CAAC;IAEnC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IAExB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B;;;;;OAKG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B;;;OAGG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IAE7C;;;OAGG;IACH,aAAa,CAAC,EAAE,SAAS,CAAC;IAE1B;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;;;;OAKG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B;;;;;OAKG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAE/B;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAE3B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IAEzB;;OAEG;IACH,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAC;CACnC"}
|