@nar-bus/lena-ui-shared 1.3.7 → 1.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -26,6 +26,7 @@ import { default as L_2 } from 'leaflet';
26
26
  import * as LabelPrimitive from '@radix-ui/react-label';
27
27
  import { Layer } from 'leaflet';
28
28
  import { LeafletMouseEvent } from 'leaflet';
29
+ import { Locale } from 'date-fns';
29
30
  import { LucideIcon } from 'lucide-react';
30
31
  import { MultiPolygon } from 'geojson';
31
32
  import { NamedExoticComponent } from 'react';
@@ -135,7 +136,7 @@ export declare interface ApiResponse<T> {
135
136
  meta: MetaInfo;
136
137
  }
137
138
 
138
- export declare function AppHeader({ breadcrumbs, theme, onThemeChange, locale, onLocaleChange, user, isAuthenticated, onLogout, onLogin, homeHref, centerSlot, className, logo, sidebarCollapsed, onToggleSidebarCollapse, }: AppHeaderProps): JSX.Element;
139
+ export declare function AppHeader({ breadcrumbs, theme, onThemeChange, locale, onLocaleChange, user, isAuthenticated, onLogout, onLogin, homeHref, centerSlot, rightActionsSlot, className, logo, sidebarCollapsed, onToggleSidebarCollapse, }: AppHeaderProps): JSX.Element;
139
140
 
140
141
  export declare interface AppHeaderLogo {
141
142
  imageSrc?: string;
@@ -155,6 +156,8 @@ export declare interface AppHeaderProps {
155
156
  onLogin?: () => void;
156
157
  homeHref?: string;
157
158
  centerSlot?: ReactNode;
159
+ /** Optional slot rendered to the left of locale/theme/user controls */
160
+ rightActionsSlot?: ReactNode;
158
161
  className?: string;
159
162
  /** Optional logo displayed at the left side of the header */
160
163
  logo?: AppHeaderLogo;
@@ -1082,9 +1085,6 @@ declare type DateInput = number | string | Date | null | undefined;
1082
1085
 
1083
1086
  declare type DateInput_2 = number | string | Date | null | undefined;
1084
1087
 
1085
- /**
1086
- * Shared date formatting utilities for detail pages and table cells
1087
- */
1088
1088
  declare type DateInput_3 = number | string | Date | null | undefined;
1089
1089
 
1090
1090
  export declare function DateRangeField<TFieldValues extends FieldValues>({ name, control, label, description, required, placeholder, minDate, maxDate, dateFormat, disabled, className, cols, clearable, errorHint, }: DateRangeFieldProps<TFieldValues>): JSX.Element;
@@ -1383,7 +1383,7 @@ declare interface FileFieldProps<TFieldValues extends FieldValues> {
1383
1383
 
1384
1384
  export declare const FILTER_CONTAINER_CLASSES = "flex flex-wrap items-center gap-2";
1385
1385
 
1386
- export declare function FilterableListLayout({ fieldConfig, filters, onFiltersChange, filterPanelOpen, onFilterPanelToggle, searchValue, onSearchChange, searchPlaceholder, onRefresh, isRefreshing, activeFilterCount, toolbarStart, addButton, filterLabel, refreshLabel, children, className, }: FilterableListLayoutProps): JSX.Element;
1386
+ export declare function FilterableListLayout({ fieldConfig, filters, onFiltersChange, filterPanelOpen, onFilterPanelToggle, searchValue, onSearchChange, searchPlaceholder, onRefresh, isRefreshing, activeFilterCount, toolbarStart, addButton, filterLabel, refreshLabel, children, className, gradient, }: FilterableListLayoutProps): JSX.Element;
1387
1387
 
1388
1388
  export declare interface FilterableListLayoutProps {
1389
1389
  /** FieldConfig array for FilterSidePanel + ActiveFiltersBar */
@@ -1419,6 +1419,8 @@ export declare interface FilterableListLayoutProps {
1419
1419
  children: ReactNode;
1420
1420
  /** Additional className for the outer container */
1421
1421
  className?: string;
1422
+ /** Gradient theme for the filter panel header — matches LenaPanel gradient presets */
1423
+ gradient?: HeaderGradient;
1422
1424
  }
1423
1425
 
1424
1426
  export declare function FilterFieldRow({ fieldConfig, filter, onFilterChange }: FilterFieldRowProps): JSX.Element;
@@ -1441,12 +1443,16 @@ export declare interface FilterPanelLabels {
1441
1443
  empty: string;
1442
1444
  notEmpty: string;
1443
1445
  select: string;
1446
+ datePlaceholder: string;
1447
+ multiSelectPlaceholder: string;
1448
+ minPlaceholder: string;
1449
+ maxPlaceholder: string;
1444
1450
  yes: string;
1445
1451
  no: string;
1446
1452
  operators: Record<string, string>;
1447
1453
  }
1448
1454
 
1449
- export declare function FilterSidePanel({ open, onClose, fieldConfig, filters, onFiltersChange, }: FilterSidePanelProps): JSX.Element;
1455
+ export declare function FilterSidePanel({ open, onClose, fieldConfig, filters, onFiltersChange, gradient, }: FilterSidePanelProps): JSX.Element;
1450
1456
 
1451
1457
  export declare interface FilterSidePanelProps {
1452
1458
  open: boolean;
@@ -1454,6 +1460,8 @@ export declare interface FilterSidePanelProps {
1454
1460
  fieldConfig: FieldConfig[];
1455
1461
  filters: FilterState[];
1456
1462
  onFiltersChange: (filters: FilterState[]) => void;
1463
+ /** Gradient theme for the panel header — matches LenaPanel gradient presets */
1464
+ gradient?: HeaderGradient;
1457
1465
  }
1458
1466
 
1459
1467
  export declare interface FilterState {
@@ -1476,17 +1484,17 @@ declare function Footer({ children, className }: LenaPanelFooterProps): JSX.Elem
1476
1484
  /**
1477
1485
  * Format backend timestamp to short datetime (e.g., "27 Oca 00:44")
1478
1486
  */
1479
- export declare function formatBackendTimestamp(timestamp: number | string | null | undefined): string;
1487
+ export declare function formatBackendTimestamp(timestamp: number | string | null | undefined, locale?: Locale): string;
1480
1488
 
1481
1489
  /**
1482
1490
  * Format a timestamp to a short date string (e.g., "Jan 1, 2024")
1483
1491
  */
1484
- export declare function formatDate(timestamp: DateInput_3): string;
1492
+ export declare function formatDate(timestamp: DateInput_3, locale?: Locale): string;
1485
1493
 
1486
1494
  /**
1487
1495
  * Format a timestamp to date with time (e.g., "Jan 1, 2024 14:30")
1488
1496
  */
1489
- export declare function formatDateTime(timestamp: DateInput_3): string;
1497
+ export declare function formatDateTime(timestamp: DateInput_3, locale?: Locale): string;
1490
1498
 
1491
1499
  /**
1492
1500
  * Format a timestamp to compact date with time (e.g., "27.03.26 15:30")
@@ -1501,7 +1509,7 @@ export declare function formatDateTimeCompactFull(timestamp: DateInput_3): strin
1501
1509
  /**
1502
1510
  * Format a timestamp to full date with seconds (e.g., "Jan 1, 2024 14:30:45")
1503
1511
  */
1504
- export declare function formatDateTimeFull(timestamp: DateInput_3): string;
1512
+ export declare function formatDateTimeFull(timestamp: DateInput_3, locale?: Locale): string;
1505
1513
 
1506
1514
  /**
1507
1515
  * Format a timestamp to ISO string (e.g., "2024-01-01T14:30:00Z")
@@ -1511,7 +1519,7 @@ export declare function formatISODate(timestamp: DateInput_3): string;
1511
1519
  /**
1512
1520
  * Format a timestamp to relative time (e.g., "2 hours ago")
1513
1521
  */
1514
- export declare function formatRelativeTime(timestamp: DateInput_3, locale?: 'en' | 'tr'): string;
1522
+ export declare function formatRelativeTime(timestamp: DateInput_3, locale?: Locale): string;
1515
1523
 
1516
1524
  /**
1517
1525
  * Format a timestamp to a short time string (e.g., "14:30")
@@ -1638,6 +1646,21 @@ export declare type GradientPair = [topColor: string, bottomColor: string];
1638
1646
 
1639
1647
  declare function Header({ children, icon: Icon, iconClassName, subtitle, actions, gradient, className, }: LenaPanelHeaderProps): JSX.Element;
1640
1648
 
1649
+ export declare function HeaderCreateButton({ label, icon, children, contentClassName, className, }: HeaderCreateButtonProps): JSX.Element;
1650
+
1651
+ export declare interface HeaderCreateButtonProps {
1652
+ /** Button label text */
1653
+ label: string;
1654
+ /** Custom icon — defaults to Plus */
1655
+ icon?: ReactNode;
1656
+ /** DropdownMenu items rendered inside the dropdown content */
1657
+ children: ReactNode;
1658
+ /** Additional class for DropdownMenuContent */
1659
+ contentClassName?: string;
1660
+ /** Additional class for the trigger button */
1661
+ className?: string;
1662
+ }
1663
+
1641
1664
  export declare type HeaderGradient = 'teal' | 'navy' | 'cherry' | 'emerald' | 'amber' | 'violet' | 'rose' | 'indigo' | 'orange';
1642
1665
 
1643
1666
  export declare function HeaderQuickSearch({ placeholder, value, onValueChange, open, onOpenChange, loading, shortcutKey, shouldFilter, className, children, }: HeaderQuickSearchProps): JSX.Element;
@@ -2957,7 +2980,7 @@ export declare const TABLE_CELL_CLASSES = "px-2.5 py-1.5 text-xs";
2957
2980
 
2958
2981
  export declare const TABLE_CONTAINER_CLASSES = "isolate rounded-lg border border-border/80 bg-card overflow-clip shadow-sm";
2959
2982
 
2960
- export declare const TABLE_HEADER_CLASSES = "px-2 py-0.5 text-xs font-semibold uppercase tracking-wider transition-colors";
2983
+ export declare const TABLE_HEADER_CLASSES = "px-2 py-0.5 text-xs font-semibold tracking-wider transition-colors";
2961
2984
 
2962
2985
  export declare const TABLE_HEADER_ROW_CLASSES = "hover:bg-transparent border-b border-border/80";
2963
2986