@nar-bus/lena-ui-shared 1.3.7 → 1.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +17 -11
- package/dist/index.js +6198 -6051
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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';
|
|
@@ -1082,9 +1083,6 @@ declare type DateInput = number | string | Date | null | undefined;
|
|
|
1082
1083
|
|
|
1083
1084
|
declare type DateInput_2 = number | string | Date | null | undefined;
|
|
1084
1085
|
|
|
1085
|
-
/**
|
|
1086
|
-
* Shared date formatting utilities for detail pages and table cells
|
|
1087
|
-
*/
|
|
1088
1086
|
declare type DateInput_3 = number | string | Date | null | undefined;
|
|
1089
1087
|
|
|
1090
1088
|
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 +1381,7 @@ declare interface FileFieldProps<TFieldValues extends FieldValues> {
|
|
|
1383
1381
|
|
|
1384
1382
|
export declare const FILTER_CONTAINER_CLASSES = "flex flex-wrap items-center gap-2";
|
|
1385
1383
|
|
|
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;
|
|
1384
|
+
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
1385
|
|
|
1388
1386
|
export declare interface FilterableListLayoutProps {
|
|
1389
1387
|
/** FieldConfig array for FilterSidePanel + ActiveFiltersBar */
|
|
@@ -1419,6 +1417,8 @@ export declare interface FilterableListLayoutProps {
|
|
|
1419
1417
|
children: ReactNode;
|
|
1420
1418
|
/** Additional className for the outer container */
|
|
1421
1419
|
className?: string;
|
|
1420
|
+
/** Gradient theme for the filter panel header — matches LenaPanel gradient presets */
|
|
1421
|
+
gradient?: HeaderGradient;
|
|
1422
1422
|
}
|
|
1423
1423
|
|
|
1424
1424
|
export declare function FilterFieldRow({ fieldConfig, filter, onFilterChange }: FilterFieldRowProps): JSX.Element;
|
|
@@ -1441,12 +1441,16 @@ export declare interface FilterPanelLabels {
|
|
|
1441
1441
|
empty: string;
|
|
1442
1442
|
notEmpty: string;
|
|
1443
1443
|
select: string;
|
|
1444
|
+
datePlaceholder: string;
|
|
1445
|
+
multiSelectPlaceholder: string;
|
|
1446
|
+
minPlaceholder: string;
|
|
1447
|
+
maxPlaceholder: string;
|
|
1444
1448
|
yes: string;
|
|
1445
1449
|
no: string;
|
|
1446
1450
|
operators: Record<string, string>;
|
|
1447
1451
|
}
|
|
1448
1452
|
|
|
1449
|
-
export declare function FilterSidePanel({ open, onClose, fieldConfig, filters, onFiltersChange, }: FilterSidePanelProps): JSX.Element;
|
|
1453
|
+
export declare function FilterSidePanel({ open, onClose, fieldConfig, filters, onFiltersChange, gradient, }: FilterSidePanelProps): JSX.Element;
|
|
1450
1454
|
|
|
1451
1455
|
export declare interface FilterSidePanelProps {
|
|
1452
1456
|
open: boolean;
|
|
@@ -1454,6 +1458,8 @@ export declare interface FilterSidePanelProps {
|
|
|
1454
1458
|
fieldConfig: FieldConfig[];
|
|
1455
1459
|
filters: FilterState[];
|
|
1456
1460
|
onFiltersChange: (filters: FilterState[]) => void;
|
|
1461
|
+
/** Gradient theme for the panel header — matches LenaPanel gradient presets */
|
|
1462
|
+
gradient?: HeaderGradient;
|
|
1457
1463
|
}
|
|
1458
1464
|
|
|
1459
1465
|
export declare interface FilterState {
|
|
@@ -1476,17 +1482,17 @@ declare function Footer({ children, className }: LenaPanelFooterProps): JSX.Elem
|
|
|
1476
1482
|
/**
|
|
1477
1483
|
* Format backend timestamp to short datetime (e.g., "27 Oca 00:44")
|
|
1478
1484
|
*/
|
|
1479
|
-
export declare function formatBackendTimestamp(timestamp: number | string | null | undefined): string;
|
|
1485
|
+
export declare function formatBackendTimestamp(timestamp: number | string | null | undefined, locale?: Locale): string;
|
|
1480
1486
|
|
|
1481
1487
|
/**
|
|
1482
1488
|
* Format a timestamp to a short date string (e.g., "Jan 1, 2024")
|
|
1483
1489
|
*/
|
|
1484
|
-
export declare function formatDate(timestamp: DateInput_3): string;
|
|
1490
|
+
export declare function formatDate(timestamp: DateInput_3, locale?: Locale): string;
|
|
1485
1491
|
|
|
1486
1492
|
/**
|
|
1487
1493
|
* Format a timestamp to date with time (e.g., "Jan 1, 2024 14:30")
|
|
1488
1494
|
*/
|
|
1489
|
-
export declare function formatDateTime(timestamp: DateInput_3): string;
|
|
1495
|
+
export declare function formatDateTime(timestamp: DateInput_3, locale?: Locale): string;
|
|
1490
1496
|
|
|
1491
1497
|
/**
|
|
1492
1498
|
* Format a timestamp to compact date with time (e.g., "27.03.26 15:30")
|
|
@@ -1501,7 +1507,7 @@ export declare function formatDateTimeCompactFull(timestamp: DateInput_3): strin
|
|
|
1501
1507
|
/**
|
|
1502
1508
|
* Format a timestamp to full date with seconds (e.g., "Jan 1, 2024 14:30:45")
|
|
1503
1509
|
*/
|
|
1504
|
-
export declare function formatDateTimeFull(timestamp: DateInput_3): string;
|
|
1510
|
+
export declare function formatDateTimeFull(timestamp: DateInput_3, locale?: Locale): string;
|
|
1505
1511
|
|
|
1506
1512
|
/**
|
|
1507
1513
|
* Format a timestamp to ISO string (e.g., "2024-01-01T14:30:00Z")
|
|
@@ -1511,7 +1517,7 @@ export declare function formatISODate(timestamp: DateInput_3): string;
|
|
|
1511
1517
|
/**
|
|
1512
1518
|
* Format a timestamp to relative time (e.g., "2 hours ago")
|
|
1513
1519
|
*/
|
|
1514
|
-
export declare function formatRelativeTime(timestamp: DateInput_3, locale?:
|
|
1520
|
+
export declare function formatRelativeTime(timestamp: DateInput_3, locale?: Locale): string;
|
|
1515
1521
|
|
|
1516
1522
|
/**
|
|
1517
1523
|
* Format a timestamp to a short time string (e.g., "14:30")
|
|
@@ -2957,7 +2963,7 @@ export declare const TABLE_CELL_CLASSES = "px-2.5 py-1.5 text-xs";
|
|
|
2957
2963
|
|
|
2958
2964
|
export declare const TABLE_CONTAINER_CLASSES = "isolate rounded-lg border border-border/80 bg-card overflow-clip shadow-sm";
|
|
2959
2965
|
|
|
2960
|
-
export declare const TABLE_HEADER_CLASSES = "px-2 py-0.5 text-xs font-semibold
|
|
2966
|
+
export declare const TABLE_HEADER_CLASSES = "px-2 py-0.5 text-xs font-semibold tracking-wider transition-colors";
|
|
2961
2967
|
|
|
2962
2968
|
export declare const TABLE_HEADER_ROW_CLASSES = "hover:bg-transparent border-b border-border/80";
|
|
2963
2969
|
|