@texturehq/edges 1.12.2 → 1.13.1
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.manifest.json +43 -30
- package/dist/index.cjs +8 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +587 -23
- package/dist/index.d.ts +587 -23
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/dist/{server-8T44SFVa.d.cts → server-BV15KAF4.d.cts} +1 -1
- package/dist/{server-8T44SFVa.d.ts → server-BV15KAF4.d.ts} +1 -1
- package/dist/server.cjs +1 -1
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +1 -1
- package/dist/server.js.map +1 -1
- package/dist/styles/utilities.css +2 -2
- package/dist/styles.css +40 -14
- package/dist/utilities.manifest.json +30 -2
- package/package.json +3 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Key, ValidationResult, BreadcrumbProps, BreadcrumbsProps, ButtonProps as ButtonProps$1, DateValue, CalendarProps as CalendarProps$1, CheckboxProps as CheckboxProps$1, CheckboxRenderProps, CheckboxGroupProps as CheckboxGroupProps$1, DisclosurePanelProps, DisclosureProps, DisclosureGroupProps, DateRangePickerProps as DateRangePickerProps$1, TextProps, FormProps, ListBoxProps as ListBoxProps$1, ListBoxItemProps, ModalOverlayProps, NumberFieldProps as NumberFieldProps$1, PopoverProps as PopoverProps$1, ProgressBarProps as ProgressBarProps$1, RadioProps, RadioGroupProps as RadioGroupProps$1, RangeCalendarProps as RangeCalendarProps$1, SelectProps as SelectProps$1, SwitchProps as SwitchProps$1, TabProps as TabProps$1, TabListProps as TabListProps$1, TabPanelProps, TabsProps as TabsProps$2, TextFieldProps as TextFieldProps$1, TimeFieldProps as TimeFieldProps$1, TimeValue, TooltipProps as TooltipProps$1 } from 'react-aria-components';
|
|
2
2
|
export { BreadcrumbProps, BreadcrumbsProps, DialogTrigger } from 'react-aria-components';
|
|
3
3
|
import * as React$1 from 'react';
|
|
4
|
-
import React__default, { HTMLAttributes, ReactNode, ComponentProps, CSSProperties, ComponentType, Component, ErrorInfo } from 'react';
|
|
5
|
-
import { F as FieldValue, B as BooleanFormat, a as FormattedValue, C as CurrentFormat, D as DateFormat, b as DistanceFormat, E as EnergyFormat, c as CurrencyFormat, N as NumberFormat, P as PhoneFormat, d as PowerFormat, e as FormatterFunction, R as ResistanceFormat, T as TemperatureUnitString, f as TemperatureUnit, g as TemperatureFormat, h as TextFormat, V as VoltageFormat, i as FieldFormat, j as BaseDataPoint, I as Icon, Y as YFormatType, k as TooltipData, l as IconName$2, m as ComponentFormatter, L as LayerSpec, n as CustomPinsSpec, G as GeoJsonLayerSpec, o as RasterLayerSpec, p as VectorLayerSpec, q as ClusteredVectorLayerSpec } from './server-
|
|
6
|
-
export { A as ActionItem, s as ActionMenu, r as ActionMenuProps, u as AppShell, t as AppShellProps, w as Avatar, v as AvatarProps, y as Badge, x as BadgeProps, aF as BaseFormat, am as ChartContext, ao as ChartMargin, K as CodeEditor, z as CodeEditorProps, H as CodeLanguage, J as CodeTheme, Z as ColorSpec, aC as ComponentFormatOptions, aM as CurrentUnit, aP as CustomFormat, O as DateField, M as DateFieldProps, aI as DateFormatStyle, aO as DistanceUnit, aJ as EnergyUnit, S as FileUpload, Q as FileUploadProps, U as Heading, a5 as InteractiveMap, _ as InteractiveMapProps, $ as LayerFeature, a0 as LayerStyle, W as Loader, X as Logo, a6 as MAP_TYPES, a1 as MapPoint, a9 as Meter, a8 as MeterProps, aK as PowerUnit, a2 as RenderType, aN as ResistanceUnit, ab as RichTextEditor, aa as RichTextEditorProps, ad as SegmentOption, ae as SegmentedControl, ac as SegmentedControlProps, ah as SideNav, af as SideNavItem, ag as SideNavProps, a7 as StaticMap, a3 as StaticMapProps, ai as TextLink, aG as TextTransform, aH as TextTruncatePosition, al as TooltipSeries, ak as TopNav, aj as TopNavProps, aL as VoltageUnit, at as YFormatSettings, a4 as ZoomStops, au as clearColorCache, av as createCategoryColorMap, ap as createXScale, aq as createYScale, ar as defaultMargin, aD as formatComponentValue, aw as getContrastingTextColor, ax as getDefaultChartColor, ay as getDefaultColors, az as getResolvedColor, aA as getThemeCategoricalColors, as as getYFormatSettings, aB as isLightColor, an as useChartContext, aE as useComponentFormatter } from './server-
|
|
4
|
+
import React__default, { RefObject, HTMLAttributes, ReactNode, ComponentProps, CSSProperties, ComponentType, Component, ErrorInfo } from 'react';
|
|
5
|
+
import { F as FieldValue, B as BooleanFormat, a as FormattedValue, C as CurrentFormat, D as DateFormat, b as DistanceFormat, E as EnergyFormat, c as CurrencyFormat, N as NumberFormat, P as PhoneFormat, d as PowerFormat, e as FormatterFunction, R as ResistanceFormat, T as TemperatureUnitString, f as TemperatureUnit, g as TemperatureFormat, h as TextFormat, V as VoltageFormat, i as FieldFormat, j as BaseDataPoint, I as Icon, Y as YFormatType, k as TooltipData, l as IconName$2, m as ComponentFormatter, L as LayerSpec, n as CustomPinsSpec, G as GeoJsonLayerSpec, o as RasterLayerSpec, p as VectorLayerSpec, q as ClusteredVectorLayerSpec } from './server-BV15KAF4.cjs';
|
|
6
|
+
export { A as ActionItem, s as ActionMenu, r as ActionMenuProps, u as AppShell, t as AppShellProps, w as Avatar, v as AvatarProps, y as Badge, x as BadgeProps, aF as BaseFormat, am as ChartContext, ao as ChartMargin, K as CodeEditor, z as CodeEditorProps, H as CodeLanguage, J as CodeTheme, Z as ColorSpec, aC as ComponentFormatOptions, aM as CurrentUnit, aP as CustomFormat, O as DateField, M as DateFieldProps, aI as DateFormatStyle, aO as DistanceUnit, aJ as EnergyUnit, S as FileUpload, Q as FileUploadProps, U as Heading, a5 as InteractiveMap, _ as InteractiveMapProps, $ as LayerFeature, a0 as LayerStyle, W as Loader, X as Logo, a6 as MAP_TYPES, a1 as MapPoint, a9 as Meter, a8 as MeterProps, aK as PowerUnit, a2 as RenderType, aN as ResistanceUnit, ab as RichTextEditor, aa as RichTextEditorProps, ad as SegmentOption, ae as SegmentedControl, ac as SegmentedControlProps, ah as SideNav, af as SideNavItem, ag as SideNavProps, a7 as StaticMap, a3 as StaticMapProps, ai as TextLink, aG as TextTransform, aH as TextTruncatePosition, al as TooltipSeries, ak as TopNav, aj as TopNavProps, aL as VoltageUnit, at as YFormatSettings, a4 as ZoomStops, au as clearColorCache, av as createCategoryColorMap, ap as createXScale, aq as createYScale, ar as defaultMargin, aD as formatComponentValue, aw as getContrastingTextColor, ax as getDefaultChartColor, ay as getDefaultColors, az as getResolvedColor, aA as getThemeCategoricalColors, as as getYFormatSettings, aB as isLightColor, an as useChartContext, aE as useComponentFormatter } from './server-BV15KAF4.cjs';
|
|
7
|
+
import { Virtualizer } from '@tanstack/react-virtual';
|
|
7
8
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
8
9
|
import { ScaleTime, ScaleLinear } from 'd3-scale';
|
|
9
10
|
import '@phosphor-icons/react';
|
|
@@ -742,8 +743,352 @@ declare function isExportSupported(type: ExportType): boolean;
|
|
|
742
743
|
*/
|
|
743
744
|
declare function getExportFormatName(type: ExportType): string;
|
|
744
745
|
|
|
746
|
+
/**
|
|
747
|
+
* Data Controls Types
|
|
748
|
+
*
|
|
749
|
+
* Core type definitions for client-side and server-side data filtering,
|
|
750
|
+
* sorting, faceting, and search operations.
|
|
751
|
+
*/
|
|
752
|
+
type FilterOperator = "eq" | "neq" | "in" | "nin" | "gt" | "gte" | "lt" | "lte" | "contains" | "startsWith" | "endsWith";
|
|
753
|
+
interface FilterCondition {
|
|
754
|
+
/** Field name (supports nested paths like 'user.profile.name') */
|
|
755
|
+
field: string;
|
|
756
|
+
/** Comparison operator */
|
|
757
|
+
operator: FilterOperator;
|
|
758
|
+
/** Value to compare against */
|
|
759
|
+
value: string | number | boolean | (string | number)[];
|
|
760
|
+
}
|
|
761
|
+
interface FilterGroup {
|
|
762
|
+
/** Logical operator combining conditions */
|
|
763
|
+
logic: "AND" | "OR";
|
|
764
|
+
/** Conditions or nested filter groups */
|
|
765
|
+
conditions: (FilterCondition | FilterGroup)[];
|
|
766
|
+
}
|
|
767
|
+
/** Root filter state - can be empty, a single group, or nested groups */
|
|
768
|
+
type FilterState = FilterGroup | null;
|
|
769
|
+
interface SortState {
|
|
770
|
+
/** Field to sort by (supports nested paths) */
|
|
771
|
+
field: string;
|
|
772
|
+
/** Sort direction */
|
|
773
|
+
direction: "asc" | "desc";
|
|
774
|
+
}
|
|
775
|
+
interface SearchConfig {
|
|
776
|
+
/** Search query string */
|
|
777
|
+
query: string;
|
|
778
|
+
/** Fields to search across */
|
|
779
|
+
fields: string[];
|
|
780
|
+
/** Use fuzzy matching (Fuse.js) - default true */
|
|
781
|
+
fuzzy?: boolean;
|
|
782
|
+
/** Fuse.js matching threshold (0.0 = perfect, 1.0 = anything) - default 0.3 */
|
|
783
|
+
threshold?: number;
|
|
784
|
+
}
|
|
785
|
+
type FacetType = "string" | "number" | "boolean" | "date";
|
|
786
|
+
interface FacetConfig {
|
|
787
|
+
/** Field name to facet on */
|
|
788
|
+
field: string;
|
|
789
|
+
/** Display label for the facet */
|
|
790
|
+
label: string;
|
|
791
|
+
/** Data type of the field */
|
|
792
|
+
type?: FacetType;
|
|
793
|
+
/** Optional: Provide predefined values for the facet (useful for enums) */
|
|
794
|
+
values?: Array<{
|
|
795
|
+
value: string | number;
|
|
796
|
+
label: string;
|
|
797
|
+
}>;
|
|
798
|
+
}
|
|
799
|
+
interface FacetCounts {
|
|
800
|
+
[field: string]: {
|
|
801
|
+
[value: string]: number;
|
|
802
|
+
};
|
|
803
|
+
}
|
|
804
|
+
/**
|
|
805
|
+
* Create a single filter condition
|
|
806
|
+
*/
|
|
807
|
+
declare function createFilter(field: string, operator: FilterOperator, value: string | number | boolean | (string | number)[]): FilterCondition;
|
|
808
|
+
/**
|
|
809
|
+
* Create a filter group from multiple conditions with AND logic
|
|
810
|
+
*/
|
|
811
|
+
declare function createFilters(conditions: FilterCondition[], logic?: "AND" | "OR"): FilterGroup;
|
|
812
|
+
/**
|
|
813
|
+
* Create an empty filter state
|
|
814
|
+
*/
|
|
815
|
+
declare function createEmptyFilter(): FilterGroup;
|
|
816
|
+
/**
|
|
817
|
+
* Check if a filter state is empty (no conditions)
|
|
818
|
+
*/
|
|
819
|
+
declare function isFilterEmpty(filter: FilterState): boolean;
|
|
820
|
+
/**
|
|
821
|
+
* Convert structured filter state to simple display chips
|
|
822
|
+
* Used for backward compatibility with existing FilterChips component
|
|
823
|
+
*/
|
|
824
|
+
interface FilterChip {
|
|
825
|
+
id: string;
|
|
826
|
+
label: string;
|
|
827
|
+
value: string;
|
|
828
|
+
}
|
|
829
|
+
declare function filterToChips(filter: FilterState, facetConfigs?: FacetConfig[]): FilterChip[];
|
|
830
|
+
/**
|
|
831
|
+
* Add a condition to a filter state
|
|
832
|
+
*/
|
|
833
|
+
declare function addFilterCondition(filter: FilterState, condition: FilterCondition): FilterGroup;
|
|
834
|
+
/**
|
|
835
|
+
* Remove a condition from a filter state by field
|
|
836
|
+
*/
|
|
837
|
+
declare function removeFilterCondition(filter: FilterState, field: string): FilterGroup;
|
|
838
|
+
/**
|
|
839
|
+
* Get all unique fields being filtered on
|
|
840
|
+
*/
|
|
841
|
+
declare function getFilterFields(filter: FilterState): string[];
|
|
842
|
+
|
|
843
|
+
interface UseClientDataControlsOptions<T> {
|
|
844
|
+
/** Raw data to process */
|
|
845
|
+
data: T[];
|
|
846
|
+
/** Filter state */
|
|
847
|
+
filters?: FilterState;
|
|
848
|
+
/** Sort state */
|
|
849
|
+
sort?: SortState | null;
|
|
850
|
+
/** Search configuration */
|
|
851
|
+
search?: SearchConfig | null;
|
|
852
|
+
/** Facet configurations */
|
|
853
|
+
facetConfigs?: FacetConfig[];
|
|
854
|
+
}
|
|
855
|
+
interface UseClientDataControlsResult<T> {
|
|
856
|
+
/** Processed data (filtered, sorted, searched) */
|
|
857
|
+
data: T[];
|
|
858
|
+
/** Facet counts computed from filtered data */
|
|
859
|
+
facetCounts: FacetCounts;
|
|
860
|
+
/** Number of results after filtering/searching */
|
|
861
|
+
resultCount: number;
|
|
862
|
+
}
|
|
863
|
+
/**
|
|
864
|
+
* useClientDataControls
|
|
865
|
+
*
|
|
866
|
+
* Client-side hook for filtering, sorting, searching, and faceting data.
|
|
867
|
+
* Uses memoization to avoid unnecessary recomputation.
|
|
868
|
+
*
|
|
869
|
+
* Operations are applied in this order:
|
|
870
|
+
* 1. Search (fuzzy or exact matching)
|
|
871
|
+
* 2. Filter (structured conditions)
|
|
872
|
+
* 3. Facet computation (on filtered data)
|
|
873
|
+
* 4. Sort
|
|
874
|
+
*
|
|
875
|
+
* @example
|
|
876
|
+
* ```tsx
|
|
877
|
+
* const { data, facetCounts, resultCount } = useClientDataControls({
|
|
878
|
+
* data: rawData,
|
|
879
|
+
* filters: createFilters([
|
|
880
|
+
* createFilter('department', 'in', ['Engineering', 'Sales'])
|
|
881
|
+
* ]),
|
|
882
|
+
* sort: { field: 'name', direction: 'asc' },
|
|
883
|
+
* search: { query: searchQuery, fields: ['name', 'email'] },
|
|
884
|
+
* facetConfigs: [
|
|
885
|
+
* { field: 'department', label: 'Department' },
|
|
886
|
+
* { field: 'status', label: 'Status' }
|
|
887
|
+
* ]
|
|
888
|
+
* });
|
|
889
|
+
* ```
|
|
890
|
+
*/
|
|
891
|
+
declare function useClientDataControls<T>({ data, filters, sort, search, facetConfigs, }: UseClientDataControlsOptions<T>): UseClientDataControlsResult<T>;
|
|
892
|
+
|
|
893
|
+
interface ServerDataState {
|
|
894
|
+
filters: FilterState;
|
|
895
|
+
sort: SortState | null;
|
|
896
|
+
search: SearchConfig | null;
|
|
897
|
+
}
|
|
898
|
+
interface UseServerDataControlsOptions {
|
|
899
|
+
/** Filter state */
|
|
900
|
+
filters: FilterState;
|
|
901
|
+
/** Sort state */
|
|
902
|
+
sort: SortState | null;
|
|
903
|
+
/** Search configuration */
|
|
904
|
+
search: SearchConfig | null;
|
|
905
|
+
/** Callback when state changes (debounced for search) */
|
|
906
|
+
onStateChange: (state: ServerDataState) => void;
|
|
907
|
+
/** Search debounce delay in ms (default: 300) */
|
|
908
|
+
searchDebounce?: number;
|
|
909
|
+
}
|
|
910
|
+
/**
|
|
911
|
+
* useServerDataControls
|
|
912
|
+
*
|
|
913
|
+
* Server-side hook that notifies the parent when filter/sort/search state changes.
|
|
914
|
+
* Search queries are debounced to avoid excessive API calls.
|
|
915
|
+
*
|
|
916
|
+
* This hook doesn't manipulate data - it just provides a clean way to:
|
|
917
|
+
* 1. Debounce search input
|
|
918
|
+
* 2. Notify when any state changes
|
|
919
|
+
* 3. Trigger server refetch
|
|
920
|
+
*
|
|
921
|
+
* @example
|
|
922
|
+
* ```tsx
|
|
923
|
+
* const [filters, setFilters] = useState(null);
|
|
924
|
+
* const [sort, setSort] = useState({ field: 'name', direction: 'asc' });
|
|
925
|
+
* const [search, setSearch] = useState({ query: '', fields: ['name'] });
|
|
926
|
+
*
|
|
927
|
+
* useServerDataControls({
|
|
928
|
+
* filters,
|
|
929
|
+
* sort,
|
|
930
|
+
* search,
|
|
931
|
+
* onStateChange: (state) => {
|
|
932
|
+
* // Refetch data with new parameters
|
|
933
|
+
* refetch({
|
|
934
|
+
* filters: state.filters,
|
|
935
|
+
* sort: state.sort,
|
|
936
|
+
* search: state.search?.query
|
|
937
|
+
* });
|
|
938
|
+
* }
|
|
939
|
+
* });
|
|
940
|
+
* ```
|
|
941
|
+
*/
|
|
942
|
+
declare function useServerDataControls({ filters, sort, search, onStateChange, searchDebounce, }: UseServerDataControlsOptions): void;
|
|
943
|
+
|
|
944
|
+
interface UseDataControlsClientOptions<T> {
|
|
945
|
+
mode: "client";
|
|
946
|
+
/** Raw data to process (required in client mode) */
|
|
947
|
+
data: T[];
|
|
948
|
+
/** Filter state */
|
|
949
|
+
filters?: FilterState;
|
|
950
|
+
/** Sort state */
|
|
951
|
+
sort?: SortState | null;
|
|
952
|
+
/** Search configuration */
|
|
953
|
+
search?: SearchConfig | null;
|
|
954
|
+
/** Facet configurations */
|
|
955
|
+
facetConfigs?: FacetConfig[];
|
|
956
|
+
}
|
|
957
|
+
interface UseDataControlsServerOptions<T> {
|
|
958
|
+
mode: "server";
|
|
959
|
+
/** Data from server (already filtered/sorted) */
|
|
960
|
+
data: T[];
|
|
961
|
+
/** Filter state */
|
|
962
|
+
filters: FilterState;
|
|
963
|
+
/** Sort state */
|
|
964
|
+
sort: SortState | null;
|
|
965
|
+
/** Search configuration */
|
|
966
|
+
search: SearchConfig | null;
|
|
967
|
+
/** Callback when state changes (required in server mode) */
|
|
968
|
+
onStateChange: (state: ServerDataState) => void;
|
|
969
|
+
/** Search debounce delay in ms (default: 300) */
|
|
970
|
+
searchDebounce?: number;
|
|
971
|
+
/** Result count from server */
|
|
972
|
+
resultCount?: number;
|
|
973
|
+
/** Facet counts from server */
|
|
974
|
+
facetCounts?: FacetCounts;
|
|
975
|
+
}
|
|
976
|
+
type UseDataControlsOptions<T> = UseDataControlsClientOptions<T> | UseDataControlsServerOptions<T>;
|
|
977
|
+
interface UseDataControlsResult<T> {
|
|
978
|
+
/** Processed data (client mode) or server data (server mode) */
|
|
979
|
+
data: T[];
|
|
980
|
+
/** Facet counts (computed in client mode, passed through in server mode) */
|
|
981
|
+
facetCounts: FacetCounts;
|
|
982
|
+
/** Result count (computed in client mode, passed through in server mode) */
|
|
983
|
+
resultCount: number;
|
|
984
|
+
}
|
|
985
|
+
/**
|
|
986
|
+
* useDataControls
|
|
987
|
+
*
|
|
988
|
+
* Unified hook for managing data filtering, sorting, searching, and faceting.
|
|
989
|
+
* Supports both client-side and server-side modes.
|
|
990
|
+
*
|
|
991
|
+
* **Client Mode:**
|
|
992
|
+
* - Processes data locally using pure functions
|
|
993
|
+
* - Computes facet counts automatically
|
|
994
|
+
* - Best for datasets < 5000 rows
|
|
995
|
+
*
|
|
996
|
+
* **Server Mode:**
|
|
997
|
+
* - Notifies parent when state changes (debounced for search)
|
|
998
|
+
* - Passes through server-provided data and counts
|
|
999
|
+
* - Best for large datasets or complex queries
|
|
1000
|
+
*
|
|
1001
|
+
* @example Client Mode
|
|
1002
|
+
* ```tsx
|
|
1003
|
+
* const { data, facetCounts, resultCount } = useDataControls({
|
|
1004
|
+
* mode: 'client',
|
|
1005
|
+
* data: rawData,
|
|
1006
|
+
* filters: createFilters([...]),
|
|
1007
|
+
* sort: { field: 'name', direction: 'asc' },
|
|
1008
|
+
* search: { query: searchQuery, fields: ['name', 'email'] },
|
|
1009
|
+
* facetConfigs: [{ field: 'department', label: 'Department' }]
|
|
1010
|
+
* });
|
|
1011
|
+
* ```
|
|
1012
|
+
*
|
|
1013
|
+
* @example Server Mode
|
|
1014
|
+
* ```tsx
|
|
1015
|
+
* const { data, facetCounts, resultCount } = useDataControls({
|
|
1016
|
+
* mode: 'server',
|
|
1017
|
+
* data: serverData, // Already filtered
|
|
1018
|
+
* filters,
|
|
1019
|
+
* sort,
|
|
1020
|
+
* search,
|
|
1021
|
+
* resultCount: totalCount,
|
|
1022
|
+
* facetCounts: serverFacets,
|
|
1023
|
+
* onStateChange: (state) => refetch(state)
|
|
1024
|
+
* });
|
|
1025
|
+
* ```
|
|
1026
|
+
*/
|
|
1027
|
+
declare function useDataControls<T>(options: UseDataControlsOptions<T>): UseDataControlsResult<T>;
|
|
1028
|
+
|
|
745
1029
|
declare function useDebounce<T>(value: T, delay?: number): T;
|
|
746
1030
|
|
|
1031
|
+
type LoadingState = "idle" | "loading" | "loading-more" | "error";
|
|
1032
|
+
interface UseInfiniteScrollOptions<T = unknown> {
|
|
1033
|
+
/** Array of items being displayed */
|
|
1034
|
+
items: T[];
|
|
1035
|
+
/** Callback to load more items (optional - if not provided, no infinite scroll) */
|
|
1036
|
+
onLoadMore?: () => void | Promise<void>;
|
|
1037
|
+
/** Whether there are more items to load */
|
|
1038
|
+
hasMore?: boolean;
|
|
1039
|
+
/** Auto-detects initial vs loading-more from items.length */
|
|
1040
|
+
isLoading?: boolean;
|
|
1041
|
+
/** Explicit loading state override (takes precedence) */
|
|
1042
|
+
loadingState?: LoadingState;
|
|
1043
|
+
/** Enable virtualization (default: true for 100+ items) */
|
|
1044
|
+
enableVirtualization?: boolean;
|
|
1045
|
+
/** Estimated size of each item in pixels */
|
|
1046
|
+
estimatedItemSize?: number;
|
|
1047
|
+
/** Number of items to render outside viewport */
|
|
1048
|
+
overscan?: number;
|
|
1049
|
+
/** Custom scroll element (defaults to parent) */
|
|
1050
|
+
scrollElement?: HTMLElement | null;
|
|
1051
|
+
/** Distance from bottom in pixels to trigger load */
|
|
1052
|
+
loadMoreThreshold?: number;
|
|
1053
|
+
}
|
|
1054
|
+
interface UseInfiniteScrollReturn {
|
|
1055
|
+
virtualizer: Virtualizer<HTMLElement, Element> | null;
|
|
1056
|
+
virtualItems: ReturnType<Virtualizer<HTMLElement, Element>["getVirtualItems"]>;
|
|
1057
|
+
computedLoadingState: LoadingState;
|
|
1058
|
+
isInitialLoad: boolean;
|
|
1059
|
+
isLoadingMore: boolean;
|
|
1060
|
+
scrollRef: RefObject<HTMLDivElement | null>;
|
|
1061
|
+
loadMoreRef: RefObject<HTMLDivElement | null>;
|
|
1062
|
+
scrollToIndex: (index: number, options?: {
|
|
1063
|
+
align?: "start" | "center" | "end";
|
|
1064
|
+
}) => void;
|
|
1065
|
+
scrollToTop: () => void;
|
|
1066
|
+
}
|
|
1067
|
+
/**
|
|
1068
|
+
* useInfiniteScroll
|
|
1069
|
+
*
|
|
1070
|
+
* Hook for implementing infinite scroll with optional virtualization.
|
|
1071
|
+
* Intelligently detects initial vs loading-more states from context.
|
|
1072
|
+
*
|
|
1073
|
+
* Features:
|
|
1074
|
+
* - Smart loading state detection (initial vs loading-more)
|
|
1075
|
+
* - Optional explicit state control
|
|
1076
|
+
* - TanStack Virtual integration for performance
|
|
1077
|
+
* - Intersection Observer for load triggering
|
|
1078
|
+
* - Configurable virtualization threshold
|
|
1079
|
+
*
|
|
1080
|
+
* @example
|
|
1081
|
+
* ```tsx
|
|
1082
|
+
* const { scrollRef, computedLoadingState, isLoadingMore } = useInfiniteScroll({
|
|
1083
|
+
* items,
|
|
1084
|
+
* onLoadMore: fetchNextPage,
|
|
1085
|
+
* hasMore: hasNextPage,
|
|
1086
|
+
* isLoading: isFetching,
|
|
1087
|
+
* });
|
|
1088
|
+
* ```
|
|
1089
|
+
*/
|
|
1090
|
+
declare function useInfiniteScroll<T = unknown>({ items, onLoadMore, hasMore, isLoading, loadingState, enableVirtualization, estimatedItemSize, overscan, scrollElement, loadMoreThreshold, }: UseInfiniteScrollOptions<T>): UseInfiniteScrollReturn;
|
|
1091
|
+
|
|
747
1092
|
/**
|
|
748
1093
|
* Hook for managing localStorage values with React state synchronization
|
|
749
1094
|
* @param key - The localStorage key
|
|
@@ -772,15 +1117,42 @@ type ActivityFeedVariant = "timeline" | "stacked";
|
|
|
772
1117
|
type ActivityFeedSize = "md" | "sm";
|
|
773
1118
|
type ActivityItemTone = "neutral" | "brand" | "success" | "warning" | "danger" | "info";
|
|
774
1119
|
type ActivityItemSurface = "minimal" | "subtle" | "solid";
|
|
775
|
-
interface ActivityFeedProps extends HTMLAttributes<HTMLDivElement> {
|
|
1120
|
+
interface ActivityFeedProps<T = unknown> extends HTMLAttributes<HTMLDivElement> {
|
|
776
1121
|
/** Visual style for the feed */
|
|
777
1122
|
variant?: ActivityFeedVariant;
|
|
778
1123
|
/** Density of the feed */
|
|
779
1124
|
size?: ActivityFeedSize;
|
|
780
|
-
/**
|
|
781
|
-
|
|
1125
|
+
/** Data-driven mode: array of items to render */
|
|
1126
|
+
items?: T[];
|
|
1127
|
+
/** Render function for each item (when using items array) */
|
|
1128
|
+
renderItem?: (item: T, index: number) => ReactNode;
|
|
1129
|
+
/** Children mode: manual ActivityItem components */
|
|
1130
|
+
children?: ReactNode;
|
|
1131
|
+
/** Loading & error UI gates */
|
|
1132
|
+
isLoading?: boolean;
|
|
1133
|
+
/** Explicit loading state override (takes precedence over auto-detection) */
|
|
1134
|
+
loadingState?: LoadingState;
|
|
1135
|
+
error?: string | null;
|
|
1136
|
+
/** Custom skeleton for initial loading state - matches your activity item structure */
|
|
1137
|
+
renderLoadingSkeleton?: () => ReactNode;
|
|
1138
|
+
/** Number of skeleton items to show during initial loading */
|
|
1139
|
+
loadingSkeletonCount?: number;
|
|
1140
|
+
/** Empty state */
|
|
1141
|
+
emptyMessage?: string;
|
|
1142
|
+
/** Infinite scroll */
|
|
1143
|
+
onLoadMore?: () => void | Promise<void>;
|
|
1144
|
+
hasMore?: boolean;
|
|
1145
|
+
/** Enable virtualization (default: true for 100+ items) */
|
|
1146
|
+
enableVirtualization?: boolean;
|
|
1147
|
+
/** Estimated size of each item in pixels */
|
|
1148
|
+
estimatedItemSize?: number;
|
|
1149
|
+
/** Custom loading indicator for loading-more state */
|
|
1150
|
+
loadingIndicator?: ReactNode;
|
|
1151
|
+
/** Height/maxHeight for scroll container */
|
|
1152
|
+
height?: string | number;
|
|
1153
|
+
maxHeight?: string | number;
|
|
782
1154
|
}
|
|
783
|
-
declare function ActivityFeed({ variant, size, className, children, ...rest }: ActivityFeedProps): react_jsx_runtime.JSX.Element;
|
|
1155
|
+
declare function ActivityFeed<T = unknown>({ variant, size, className, children, items, renderItem, isLoading, loadingState, error, renderLoadingSkeleton, loadingSkeletonCount, emptyMessage, onLoadMore, hasMore, enableVirtualization, estimatedItemSize, loadingIndicator, height, maxHeight, ...rest }: ActivityFeedProps<T>): react_jsx_runtime.JSX.Element;
|
|
784
1156
|
declare namespace ActivityFeed {
|
|
785
1157
|
var displayName: string;
|
|
786
1158
|
}
|
|
@@ -1281,7 +1653,7 @@ interface CheckboxProps extends Omit<CheckboxProps$1, "children"> {
|
|
|
1281
1653
|
children?: ReactNode | ((props: CheckboxRenderProps) => ReactNode);
|
|
1282
1654
|
/**
|
|
1283
1655
|
* Visual variant of the checkbox
|
|
1284
|
-
* @default "
|
|
1656
|
+
* @default "default"
|
|
1285
1657
|
*/
|
|
1286
1658
|
variant?: "default" | "brand";
|
|
1287
1659
|
}
|
|
@@ -1630,12 +2002,16 @@ interface SortOption {
|
|
|
1630
2002
|
label: string;
|
|
1631
2003
|
}
|
|
1632
2004
|
interface SortControlProps {
|
|
1633
|
-
/** Currently selected sort value */
|
|
2005
|
+
/** Currently selected sort value (field name) */
|
|
1634
2006
|
value: string;
|
|
1635
2007
|
/** Available sort options */
|
|
1636
2008
|
options: SortOption[];
|
|
1637
2009
|
/** Callback when sort selection changes */
|
|
1638
2010
|
onChange: (value: string) => void;
|
|
2011
|
+
/** Sort direction (optional, for enhanced mode) */
|
|
2012
|
+
direction?: "asc" | "desc";
|
|
2013
|
+
/** Callback when direction changes (optional, for enhanced mode) */
|
|
2014
|
+
onDirectionChange?: (direction: "asc" | "desc") => void;
|
|
1639
2015
|
/** Whether to show "Sort by:" label */
|
|
1640
2016
|
showLabel?: boolean;
|
|
1641
2017
|
/** Size variant */
|
|
@@ -1646,10 +2022,10 @@ interface SortControlProps {
|
|
|
1646
2022
|
/**
|
|
1647
2023
|
* SortControl
|
|
1648
2024
|
*
|
|
1649
|
-
* A dropdown for selecting sort order with optional
|
|
2025
|
+
* A dropdown for selecting sort order with optional direction toggle.
|
|
1650
2026
|
* Wraps Select component with consistent styling for data controls.
|
|
1651
2027
|
*
|
|
1652
|
-
*
|
|
2028
|
+
* **Basic Mode (backward compatible):**
|
|
1653
2029
|
* ```tsx
|
|
1654
2030
|
* <SortControl
|
|
1655
2031
|
* value={sortBy}
|
|
@@ -1658,11 +2034,24 @@ interface SortControlProps {
|
|
|
1658
2034
|
* { value: 'date', label: 'Date' }
|
|
1659
2035
|
* ]}
|
|
1660
2036
|
* onChange={setSortBy}
|
|
1661
|
-
*
|
|
2037
|
+
* />
|
|
2038
|
+
* ```
|
|
2039
|
+
*
|
|
2040
|
+
* **Enhanced Mode (with direction):**
|
|
2041
|
+
* ```tsx
|
|
2042
|
+
* <SortControl
|
|
2043
|
+
* value={sortField}
|
|
2044
|
+
* direction={sortDirection}
|
|
2045
|
+
* options={[
|
|
2046
|
+
* { value: 'name', label: 'Name' },
|
|
2047
|
+
* { value: 'date', label: 'Date' }
|
|
2048
|
+
* ]}
|
|
2049
|
+
* onChange={setSortField}
|
|
2050
|
+
* onDirectionChange={setSortDirection}
|
|
1662
2051
|
* />
|
|
1663
2052
|
* ```
|
|
1664
2053
|
*/
|
|
1665
|
-
declare function SortControl({ value, options, onChange, showLabel, size, className, }: SortControlProps): react_jsx_runtime.JSX.Element;
|
|
2054
|
+
declare function SortControl({ value, options, onChange, direction, onDirectionChange, showLabel, size, className, }: SortControlProps): react_jsx_runtime.JSX.Element;
|
|
1666
2055
|
|
|
1667
2056
|
interface DataControlsProps {
|
|
1668
2057
|
/** Search configuration */
|
|
@@ -1690,6 +2079,8 @@ interface DataControlsProps {
|
|
|
1690
2079
|
options: SortOption[];
|
|
1691
2080
|
onChange: (value: string) => void;
|
|
1692
2081
|
showLabel?: boolean;
|
|
2082
|
+
direction?: "asc" | "desc";
|
|
2083
|
+
onDirectionChange?: (direction: "asc" | "desc") => void;
|
|
1693
2084
|
};
|
|
1694
2085
|
/** Results count configuration */
|
|
1695
2086
|
resultsCount?: {
|
|
@@ -1697,6 +2088,12 @@ interface DataControlsProps {
|
|
|
1697
2088
|
label?: string;
|
|
1698
2089
|
isLoading?: boolean;
|
|
1699
2090
|
};
|
|
2091
|
+
/** Make controls sticky */
|
|
2092
|
+
sticky?: boolean;
|
|
2093
|
+
/** Sticky top offset - useful when stacking below sticky header (default: "0") */
|
|
2094
|
+
stickyTop?: string;
|
|
2095
|
+
/** Z-index for sticky positioning (default: 10) */
|
|
2096
|
+
zIndex?: number;
|
|
1700
2097
|
/** Additional CSS classes */
|
|
1701
2098
|
className?: string;
|
|
1702
2099
|
/** Inline styles */
|
|
@@ -1712,6 +2109,11 @@ interface DataControlsProps {
|
|
|
1712
2109
|
* All data operations (search, filter, sort) are handled server-side.
|
|
1713
2110
|
* This component is purely presentational and controlled.
|
|
1714
2111
|
*
|
|
2112
|
+
* **Features:**
|
|
2113
|
+
* - Optional sticky positioning for data-heavy pages
|
|
2114
|
+
* - Works with PageLayout sticky headers
|
|
2115
|
+
* - Configurable z-index and offset
|
|
2116
|
+
*
|
|
1715
2117
|
* **Responsive Behavior:**
|
|
1716
2118
|
* - Narrow containers (< 640px): Two rows - Row 1: inputs (search + filter icon), Row 2: outputs (results + sort + actions)
|
|
1717
2119
|
* - Wide containers (≥ 640px): Single row with all controls visible
|
|
@@ -1739,7 +2141,55 @@ interface DataControlsProps {
|
|
|
1739
2141
|
* ```
|
|
1740
2142
|
*/
|
|
1741
2143
|
declare function DataControls({ search, searchMobileMode: _searchMobileMode, // Deprecated: kept for backward compatibility
|
|
1742
|
-
filters, onRemoveFilter, onClearAllFilters, onManageFilters, maxVisibleFilterChips, sort, resultsCount, className, style, }: DataControlsProps): react_jsx_runtime.JSX.Element | null;
|
|
2144
|
+
filters, onRemoveFilter, onClearAllFilters, onManageFilters, maxVisibleFilterChips, sort, resultsCount, sticky, stickyTop, zIndex, className, style, }: DataControlsProps): react_jsx_runtime.JSX.Element | null;
|
|
2145
|
+
|
|
2146
|
+
interface FilterDialogProps {
|
|
2147
|
+
/** Whether the dialog is open */
|
|
2148
|
+
isOpen: boolean;
|
|
2149
|
+
/** Callback when dialog is closed */
|
|
2150
|
+
onClose: () => void;
|
|
2151
|
+
/** Facet configurations defining available filters */
|
|
2152
|
+
facetConfigs: FacetConfig[];
|
|
2153
|
+
/** Optional facet counts to display next to options */
|
|
2154
|
+
facetCounts?: FacetCounts;
|
|
2155
|
+
/** Current filter state */
|
|
2156
|
+
currentFilters: FilterState;
|
|
2157
|
+
/** Callback when filters are applied */
|
|
2158
|
+
onApply: (filters: FilterState) => void;
|
|
2159
|
+
/** Optional callback to clear all filters */
|
|
2160
|
+
onClear?: () => void;
|
|
2161
|
+
/** Dialog title */
|
|
2162
|
+
title?: string;
|
|
2163
|
+
}
|
|
2164
|
+
/**
|
|
2165
|
+
* FilterDialog
|
|
2166
|
+
*
|
|
2167
|
+
* A reusable dialog for applying structured filters to data.
|
|
2168
|
+
* Automatically renders appropriate UI based on facet type and configuration.
|
|
2169
|
+
*
|
|
2170
|
+
* **Supported Facet Types:**
|
|
2171
|
+
* - `string`: Checkbox group for multi-select
|
|
2172
|
+
* - `number`: Min/max range inputs
|
|
2173
|
+
* - `boolean`: Single checkbox
|
|
2174
|
+
*
|
|
2175
|
+
* @example
|
|
2176
|
+
* ```tsx
|
|
2177
|
+
* <FilterDialog
|
|
2178
|
+
* isOpen={isOpen}
|
|
2179
|
+
* onClose={() => setIsOpen(false)}
|
|
2180
|
+
* facetConfigs={[
|
|
2181
|
+
* { field: 'department', label: 'Department', type: 'string' },
|
|
2182
|
+
* { field: 'salary', label: 'Salary', type: 'number' }
|
|
2183
|
+
* ]}
|
|
2184
|
+
* facetCounts={{
|
|
2185
|
+
* department: { Engineering: 10, Sales: 5 }
|
|
2186
|
+
* }}
|
|
2187
|
+
* currentFilters={filters}
|
|
2188
|
+
* onApply={setFilters}
|
|
2189
|
+
* />
|
|
2190
|
+
* ```
|
|
2191
|
+
*/
|
|
2192
|
+
declare function FilterDialog({ isOpen, onClose, facetConfigs, facetCounts, currentFilters, onApply, onClear, title, }: FilterDialogProps): react_jsx_runtime.JSX.Element;
|
|
1743
2193
|
|
|
1744
2194
|
interface ResultsCountProps {
|
|
1745
2195
|
/** Number of results/items */
|
|
@@ -1865,7 +2315,13 @@ interface DataTableProps<T> {
|
|
|
1865
2315
|
customMobileRowRender?: (row: T, index: number) => ReactNode;
|
|
1866
2316
|
mobileBreakpoint?: MobileBreakpoint;
|
|
1867
2317
|
isLoading?: boolean;
|
|
2318
|
+
loadingState?: LoadingState;
|
|
1868
2319
|
loadingRowCount?: number;
|
|
2320
|
+
onLoadMore?: () => void | Promise<void>;
|
|
2321
|
+
hasMore?: boolean;
|
|
2322
|
+
enableVirtualization?: boolean;
|
|
2323
|
+
estimatedRowHeight?: number;
|
|
2324
|
+
loadingIndicator?: ReactNode;
|
|
1869
2325
|
stickyHeader?: boolean;
|
|
1870
2326
|
onRowClick?: (row: T) => void;
|
|
1871
2327
|
getRowId?: (row: T) => string;
|
|
@@ -2037,10 +2493,11 @@ declare function TextCell<T = any>({ value, row, context, prefix, suffix, emptyT
|
|
|
2037
2493
|
/**
|
|
2038
2494
|
* DataTable
|
|
2039
2495
|
*
|
|
2040
|
-
* Advanced table component with sorting, filtering, pagination, and
|
|
2041
|
-
* Supports custom cell renderers, column configurations,
|
|
2496
|
+
* Advanced table component with sorting, filtering, pagination, and infinite scroll.
|
|
2497
|
+
* Supports custom cell renderers, column configurations, multiple display densities,
|
|
2498
|
+
* and virtualization for large datasets.
|
|
2042
2499
|
*/
|
|
2043
|
-
declare function DataTable<T extends Record<string, unknown>>({ columns, data, className, density, width, height, maxHeight, layout, mobileRenderer, customMobileRowRender, mobileBreakpoint, isLoading, loadingRowCount, stickyHeader, onRowClick, getRowId, hideHeader, onSort, "aria-label": ariaLabel, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
2500
|
+
declare function DataTable<T extends Record<string, unknown>>({ columns, data, className, density, width, height, maxHeight, layout, mobileRenderer, customMobileRowRender, mobileBreakpoint, isLoading, loadingState, loadingRowCount, onLoadMore, hasMore, enableVirtualization, estimatedRowHeight, loadingIndicator, stickyHeader, onRowClick, getRowId, hideHeader, onSort, "aria-label": ariaLabel, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
2044
2501
|
|
|
2045
2502
|
interface MobileRowProps<T> {
|
|
2046
2503
|
row: T;
|
|
@@ -2313,7 +2770,7 @@ declare function getInputStateStyles(props: {
|
|
|
2313
2770
|
isInvalid?: boolean;
|
|
2314
2771
|
isDisabled?: boolean;
|
|
2315
2772
|
isFocused?: boolean;
|
|
2316
|
-
}): "border rounded-[var(--control-border-radius)]
|
|
2773
|
+
}): "border rounded-[var(--control-border-radius)] outline-none border-border-muted" | "border rounded-[var(--control-border-radius)] outline-none border-feedback-error-border shadow-[inset_0_0_0_1px_var(--color-feedback-error-border)]" | "border rounded-[var(--control-border-radius)] outline-none border-feedback-error-border" | "border rounded-[var(--control-border-radius)] outline-none border-border-focus shadow-[inset_0_0_0_1px_var(--color-border-focus)]" | "border rounded-[var(--control-border-radius)] outline-none border-border-default";
|
|
2317
2774
|
/**
|
|
2318
2775
|
* Generates background styles based on the transparent and disabled props.
|
|
2319
2776
|
* Uses Tailwind classes for consistent styling across light/dark modes.
|
|
@@ -2498,6 +2955,42 @@ declare namespace Grid {
|
|
|
2498
2955
|
}
|
|
2499
2956
|
declare function GridItem({ span, className, children, }: GridItemProps): react_jsx_runtime.JSX.Element;
|
|
2500
2957
|
|
|
2958
|
+
interface InfiniteScrollIndicatorProps {
|
|
2959
|
+
/** Current loading state - determines which indicator to show */
|
|
2960
|
+
state: "loading-more";
|
|
2961
|
+
/** Optional message to display with the spinner (for internationalization support) */
|
|
2962
|
+
message?: string;
|
|
2963
|
+
/** Additional CSS classes */
|
|
2964
|
+
className?: string;
|
|
2965
|
+
/** Custom loading indicator (replaces default) */
|
|
2966
|
+
customIndicator?: ReactNode;
|
|
2967
|
+
}
|
|
2968
|
+
/**
|
|
2969
|
+
* InfiniteScrollIndicator
|
|
2970
|
+
*
|
|
2971
|
+
* Lightweight composition component for displaying loading states in infinite scroll contexts.
|
|
2972
|
+
* Uses the Loader component for consistency.
|
|
2973
|
+
*
|
|
2974
|
+
* - For initial loading: Use component-specific Skeleton implementations
|
|
2975
|
+
* - For loading-more: Use this component at the bottom of lists/tables
|
|
2976
|
+
*
|
|
2977
|
+
* By default, shows only a spinner (no text) to avoid internationalization concerns.
|
|
2978
|
+
* Consuming applications can provide their own localized message via the `message` prop.
|
|
2979
|
+
*
|
|
2980
|
+
* Example usage:
|
|
2981
|
+
* ```tsx
|
|
2982
|
+
* // Default: spinner only (no i18n needed)
|
|
2983
|
+
* <InfiniteScrollIndicator state="loading-more" />
|
|
2984
|
+
*
|
|
2985
|
+
* // With localized text
|
|
2986
|
+
* <InfiniteScrollIndicator
|
|
2987
|
+
* state="loading-more"
|
|
2988
|
+
* message={t('loading.loadMore')}
|
|
2989
|
+
* />
|
|
2990
|
+
* ```
|
|
2991
|
+
*/
|
|
2992
|
+
declare function InfiniteScrollIndicator({ state, message, className, customIndicator, }: InfiniteScrollIndicatorProps): string | number | bigint | true | Iterable<ReactNode> | Promise<string | number | bigint | boolean | React$1.ReactPortal | React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null;
|
|
2993
|
+
|
|
2501
2994
|
type KpiFormatter = ComponentFormatter;
|
|
2502
2995
|
/**
|
|
2503
2996
|
* Kpi Component — Single metric display
|
|
@@ -2647,13 +3140,27 @@ interface ListProps<T = unknown> {
|
|
|
2647
3140
|
onHoverChange?: (id: string | null, item?: T) => void;
|
|
2648
3141
|
/** Loading & error UI gates */
|
|
2649
3142
|
isLoading?: boolean;
|
|
3143
|
+
/** Explicit loading state override (takes precedence over auto-detection) */
|
|
3144
|
+
loadingState?: LoadingState;
|
|
2650
3145
|
error?: string | null;
|
|
3146
|
+
/** Custom skeleton for initial loading state - matches your data structure */
|
|
3147
|
+
renderLoadingSkeleton?: () => ReactNode;
|
|
3148
|
+
/** Number of skeleton rows to show during initial loading */
|
|
3149
|
+
loadingSkeletonCount?: number;
|
|
2651
3150
|
/** Empty state */
|
|
2652
3151
|
emptyMessage?: string;
|
|
2653
3152
|
/** Density & dividers */
|
|
2654
3153
|
variant?: "dense" | "relaxed";
|
|
2655
3154
|
showDividers?: boolean;
|
|
2656
|
-
/**
|
|
3155
|
+
/** Infinite scroll */
|
|
3156
|
+
onLoadMore?: () => void | Promise<void>;
|
|
3157
|
+
hasMore?: boolean;
|
|
3158
|
+
/** Enable virtualization (default: true for 100+ items) */
|
|
3159
|
+
enableVirtualization?: boolean;
|
|
3160
|
+
/** Estimated size of each item in pixels */
|
|
3161
|
+
estimatedItemSize?: number;
|
|
3162
|
+
/** Custom loading indicator for loading-more state */
|
|
3163
|
+
loadingIndicator?: ReactNode;
|
|
2657
3164
|
/** ARIA */
|
|
2658
3165
|
"aria-label"?: string;
|
|
2659
3166
|
className?: string;
|
|
@@ -2663,7 +3170,8 @@ interface ListProps<T = unknown> {
|
|
|
2663
3170
|
* List
|
|
2664
3171
|
*
|
|
2665
3172
|
* A semantic wrapper and state manager for rows. Handles selection, hover,
|
|
2666
|
-
* keyboard navigation, and
|
|
3173
|
+
* keyboard navigation, accessibility, and infinite scroll with virtualization.
|
|
3174
|
+
* Composes with ListItem for visual rows.
|
|
2667
3175
|
*
|
|
2668
3176
|
* Example usage:
|
|
2669
3177
|
* ```tsx
|
|
@@ -2681,10 +3189,25 @@ interface ListProps<T = unknown> {
|
|
|
2681
3189
|
* {...rowProps}
|
|
2682
3190
|
* />
|
|
2683
3191
|
* )}
|
|
3192
|
+
* // Optional: Custom loading skeleton matching your data structure
|
|
3193
|
+
* renderLoadingSkeleton={() => (
|
|
3194
|
+
* <div className="flex items-center gap-3 px-4 py-3">
|
|
3195
|
+
* <Skeleton width={40} height={40} variant="circle" />
|
|
3196
|
+
* <div className="flex-1">
|
|
3197
|
+
* <Skeleton width="60%" height={16} />
|
|
3198
|
+
* <Skeleton width="40%" height={12} />
|
|
3199
|
+
* </div>
|
|
3200
|
+
* </div>
|
|
3201
|
+
* )}
|
|
3202
|
+
* loadingSkeletonCount={8}
|
|
3203
|
+
* // Infinite scroll
|
|
3204
|
+
* onLoadMore={loadMoreSites}
|
|
3205
|
+
* hasMore={hasMoreSites}
|
|
3206
|
+
* isLoading={isLoading}
|
|
2684
3207
|
* />
|
|
2685
3208
|
* ```
|
|
2686
3209
|
*/
|
|
2687
|
-
declare function List<T>({ items, renderItem, selectedId, onSelect, onHoverChange, isLoading, error, emptyMessage, variant, showDividers, "aria-label": ariaLabel, className, style, }: ListProps<T>): react_jsx_runtime.JSX.Element;
|
|
3210
|
+
declare function List<T>({ items, renderItem, selectedId, onSelect, onHoverChange, isLoading, loadingState, error, renderLoadingSkeleton, loadingSkeletonCount, emptyMessage, variant, showDividers, onLoadMore, hasMore, enableVirtualization, estimatedItemSize, loadingIndicator, "aria-label": ariaLabel, className, style, }: ListProps<T>): react_jsx_runtime.JSX.Element;
|
|
2688
3211
|
|
|
2689
3212
|
interface ListItemProps {
|
|
2690
3213
|
id: string;
|
|
@@ -3049,6 +3572,15 @@ declare function NumberField({ label, description, errorMessage, size, tooltip,
|
|
|
3049
3572
|
* </PageLayout.Content>
|
|
3050
3573
|
* </PageLayout>
|
|
3051
3574
|
*
|
|
3575
|
+
* With Sticky Header and Scrollable Content (data-heavy pages):
|
|
3576
|
+
* <PageLayout className="flex flex-col min-h-0">
|
|
3577
|
+
* <PageLayout.Header title="..." sticky={true} stickyTop="0" />
|
|
3578
|
+
* <DataControls sticky={true} stickyTop="120px" />
|
|
3579
|
+
* <PageLayout.ScrollableContent>
|
|
3580
|
+
* <DataTable data={data} columns={columns} />
|
|
3581
|
+
* </PageLayout.ScrollableContent>
|
|
3582
|
+
* </PageLayout>
|
|
3583
|
+
*
|
|
3052
3584
|
* Notes:
|
|
3053
3585
|
* - Router-agnostic: Breadcrumbs accept either structured items with a Link component, or a custom ReactNode.
|
|
3054
3586
|
* - Accessible: Header uses h1; Tabs are roving-`tablist`.
|
|
@@ -3056,6 +3588,9 @@ declare function NumberField({ label, description, errorMessage, size, tooltip,
|
|
|
3056
3588
|
* - Media support: Header can include hero images, maps, or other visual content.
|
|
3057
3589
|
* - Actions: Right-aligned on desktop, below subtitle on mobile.
|
|
3058
3590
|
* - Section nav: Automatically extracts navigation from Section children when withSectionNav is enabled.
|
|
3591
|
+
* - Sticky header support: Make headers sticky for data-heavy pages with scrollable content.
|
|
3592
|
+
* - ScrollableContent helper: Ensures proper overflow handling with sticky elements.
|
|
3593
|
+
* - Works with sticky DataControls: Configurable z-index and offset for complex layouts.
|
|
3059
3594
|
* - Styling: token-oriented utility classes (match to your Tailwind preset/tokens).
|
|
3060
3595
|
*/
|
|
3061
3596
|
type PageBreadcrumbItem = BreadcrumbItemProps & {
|
|
@@ -3075,6 +3610,7 @@ declare namespace PageLayout {
|
|
|
3075
3610
|
var Tabs: typeof Tabs$1;
|
|
3076
3611
|
var Content: typeof Content;
|
|
3077
3612
|
var Aside: typeof Aside$1;
|
|
3613
|
+
var ScrollableContent: typeof ScrollableContent;
|
|
3078
3614
|
}
|
|
3079
3615
|
type PageHeaderProps = {
|
|
3080
3616
|
title: React__default.ReactNode;
|
|
@@ -3090,9 +3626,15 @@ type PageHeaderProps = {
|
|
|
3090
3626
|
actions?: React__default.ReactNode[];
|
|
3091
3627
|
/** Optional slot to replace the default heading element */
|
|
3092
3628
|
headingAs?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
3629
|
+
/** Make header sticky at top of viewport */
|
|
3630
|
+
sticky?: boolean;
|
|
3631
|
+
/** Sticky top offset in pixels or CSS value (default: "0") */
|
|
3632
|
+
stickyTop?: string;
|
|
3633
|
+
/** Z-index for sticky positioning (default: 10) */
|
|
3634
|
+
zIndex?: number;
|
|
3093
3635
|
className?: string;
|
|
3094
3636
|
};
|
|
3095
|
-
declare function Header({ title, subtitle, breadcrumbs, breadcrumbsNode, meta, media, actions, headingAs, className, }: PageHeaderProps): react_jsx_runtime.JSX.Element;
|
|
3637
|
+
declare function Header({ title, subtitle, breadcrumbs, breadcrumbsNode, meta, media, actions, headingAs, sticky, stickyTop, zIndex, className, }: PageHeaderProps): react_jsx_runtime.JSX.Element;
|
|
3096
3638
|
type PageLayoutTab = {
|
|
3097
3639
|
id: string;
|
|
3098
3640
|
label: React__default.ReactNode;
|
|
@@ -3133,6 +3675,28 @@ type PageAsideProps = {
|
|
|
3133
3675
|
className?: string;
|
|
3134
3676
|
};
|
|
3135
3677
|
declare function Aside$1({ children, sticky, className }: PageAsideProps): react_jsx_runtime.JSX.Element;
|
|
3678
|
+
type PageScrollableContentProps = {
|
|
3679
|
+
children: React__default.ReactNode;
|
|
3680
|
+
className?: string;
|
|
3681
|
+
};
|
|
3682
|
+
/**
|
|
3683
|
+
* ScrollableContent
|
|
3684
|
+
*
|
|
3685
|
+
* Helper component for creating scrollable content areas within PageLayout.
|
|
3686
|
+
* Commonly used with sticky headers and controls for data-heavy pages.
|
|
3687
|
+
*
|
|
3688
|
+
* Example usage:
|
|
3689
|
+
* ```tsx
|
|
3690
|
+
* <PageLayout className="flex flex-col h-screen">
|
|
3691
|
+
* <PageLayout.Header sticky={true} />
|
|
3692
|
+
* <DataControls sticky={true} stickyTop="120px" />
|
|
3693
|
+
* <PageLayout.ScrollableContent>
|
|
3694
|
+
* <DataTable data={data} columns={columns} />
|
|
3695
|
+
* </PageLayout.ScrollableContent>
|
|
3696
|
+
* </PageLayout>
|
|
3697
|
+
* ```
|
|
3698
|
+
*/
|
|
3699
|
+
declare function ScrollableContent({ children, className }: PageScrollableContentProps): react_jsx_runtime.JSX.Element;
|
|
3136
3700
|
|
|
3137
3701
|
interface Place {
|
|
3138
3702
|
id: string;
|
|
@@ -3934,4 +4498,4 @@ interface ColorModeProviderProps {
|
|
|
3934
4498
|
}
|
|
3935
4499
|
declare const ColorModeProvider: React.FC<ColorModeProviderProps>;
|
|
3936
4500
|
|
|
3937
|
-
export { type Action, ActionCell, type ActionCellProps, ActivityFeed, ActivityFeedGroup, type ActivityFeedGroupProps, type ActivityFeedProps, type ActivityFeedSize, type ActivityFeedVariant, ActivityItem, type ActivityItemProps, type ActivityItemSurface, type ActivityItemTone, Alert, type AlertProps, AreaSeries, AutoMobileRenderer, Autocomplete, BREAKPOINTS, BarSeries, BaseDataPoint, type BaseInputProps, type BaseProps, BooleanCell, type BooleanCellProps, BooleanFormat, BreadcrumbItem, type BreadcrumbItemProps, Breadcrumbs, type Breakpoint, type BreakpointState, Button, Calendar, Card, CardContent, type CardContentProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, CardMedia, type CardMediaProps, CardMobileRenderer, type CardProps, type CardVariant, type CellAlignment, type CellComponent, type CellComponentProps, type CellContext, type CellEmphasis, ChartAxis, ChartBottomBar, ChartContainer, type ChartExportMetadata, ChartTooltip, Checkbox, CheckboxGroup, Chip, ClearButton, Collapse, CollapseContent, type CollapseContentProps, type CollapseDensity, CollapseHeader, type CollapseHeaderProps, CollapseItem, type CollapseItemProps, type CollapseProps, type CollapseVariant, ColorModeProvider, type Column, ComponentFormatter, Confirm, type ConfirmProps, CopyToClipboard, CurrencyFormat, CurrentFormat, CustomPinsSpec, DataControls, type Filter as DataControlsFilter, type DataControlsProps, type SortOption as DataControlsSortOption, DataTable, type DataTableProps, DateCell, type DateCellProps, DateFormat, DateRangePicker, Description, type DescriptionProps, Dialog, type DialogAction, type DialogFooterConfig, DialogHeader, type DialogHeaderConfig, type DialogHeaderProps, type DialogProps, DistanceFormat, Drawer, type DrawerProps, EmptyState, type EmptyStateAction, type EmptyStateAlignment, type EmptyStateProps, type EmptyStateSize, EnergyFormat, ErrorBoundary, type ExportType, FieldError, type FieldErrorProps, FieldFormat, FieldGroup, type FieldGroupProps, FieldValue, FilterChips, type FilterChipsProps, Form, FormatRegistry, FormattedValue, FormatterFunction, GeoJsonLayerSpec, Grid, type GridAlign, type GridCols, type GridFlow, type GridGap, type GridItemProps, type GridJustify, type GridProps, type GridSpan, Icon, Input, type InputProps, type InputStyleProps, InputWrapper, Kpi, KpiGroup, type KpiGroupAlign, type KpiGroupCols, type KpiGroupGap, type KpiGroupProps, type KpiOrientation, type KpiProps, type KpiSize, type KpiStatus, Label, type LabelProps, LayerSpec, LineSeries, type LinkBehavior, List, ListBox, ListBoxItem, ListItem, type ListItemProps, ListPane, type ListPaneProps, type ListProps, type MobileBreakpoint, type MobileConfig, type MobileRenderer, ModalBackdrop, type ModalBackdropProps, Notice, NoticeContainer, type NoticeContainerProps, type NoticeOptions, type NoticeProps, NoticeProvider, type NoticeProviderProps, type NoticeVariant, NumberCell, type NumberCellProps, NumberField, NumberFormat, type PageAsideProps, type PageBreadcrumbItem, type PageContentProps, type PageHeaderProps, PageLayout, type PageLayoutProps, PhoneFormat, PlaceSearch, Popover, PowerFormat, ProgressBar, Radio, RadioCard, RadioCardGroup, type RadioCardGroupProps, type RadioCardProps, RadioGroup, RangeCalendar, RasterLayerSpec, ResistanceFormat, type ResponsiveValue, ResultsCount, type ResultsCountProps, SKELETON_SIZES, SearchControl, type SearchControlProps, Section, SectionNav, type SectionNavItem, type SectionNavOrientation, type SectionNavProps, type SectionProps, type SectionSpacing, type SectionVariant, Select, SelectCell, type SelectCellProps, Skeleton, Slider, type SortConfig, SortControl, type SortControlProps, type SortDirection, SplitPane, type SplitPaneOrientation, type SplitPanePanelProps, type SplitPaneProps, type StatAlign, type StatFormatter, type StatItem, type StatLayout, StatList, type StatListProps, type StatThreshold, type StatTone, type StatValue, Switch, Tab, TabList, TabPanel, type TableDensity, type TableLayout, type TableWidth, Tabs, type TabsProps$1 as TabsProps, TemperatureFormat, TemperatureUnit, TemperatureUnitString, TextArea, TextAreaWithChips, TextCell, type TextCellProps, TextField, TextFormat, TimeField, ToggleButton, Tooltip, TooltipData, Tray, type TrayProps, type TrendPoint, type UseBreakpointReturn, VectorLayerSpec, VoltageFormat, YFormatType, autoScaleCurrent, autoScaleDistance, autoScaleEnergy, autoScalePower, autoScaleResistance, autoScaleVoltage, camelCaseToWords, capitalize, celsiusToFahrenheit, celsiusToKelvin, centimetersToInches, createFormat, enumToSentenceCase, exportChart, fahrenheitToCelsius, fahrenheitToKelvin, feetToMeters, feetToMiles, formatBoolean, formatCurrency, formatCurrent, formatDate, formatDistance, formatEmptyValue, formatEnergy, formatFieldValue, formatInternationalPhone, formatNumber, formatPhone, formatPhoneNumber, formatPower, formatResistance, formatTemperature, formatText, formatUSPhone, formatVoltage, getBadgeClasses, getBooleanBadgeVariant, getCellAlignmentClasses, getCellContainerClasses, getCellTextClasses, getDateParts, getExportFormatName, getFieldGroupStyles, getInputBackgroundStyles, getInputBaseStyles, getInputStateStyles, getNumericColorClasses, getSkeletonSize, inchesToCentimeters, isCustomPinsLayer, isExportSupported, isGeoJsonLayer, isNil, isRasterLayer, isVectorLayer, kelvinToCelsius, kelvinToFahrenheit, kilometersToMiles, layer, metersToFeet, metersToMiles, metersToYards, milesToFeet, milesToKilometers, milesToMeters, parseBoolean, resolveValue, snakeCaseToWords, temperatureStringToSymbol, toA, toActiveInactive, toAmps, toBoolean, toCelsius, toCentimeters, toCheckmark, toCompactNumber, toCurrency, toCustomDateFormat, toDateString, toEnabledDisabled, toFahrenheit, toFeet, toFloat, toFormattedNumber, toFullDateTime, toGW, toGWh, toGigawatts, toISOString, toInches, toInteger, toKA, toKV, toKW, toKelvin, toKiloamps, toKilohms, toKilometers, toKilovolts, toKilowatts, toLowerCase, toMA, toMV, toMW, toMWh, toMegawatts, toMegohms, toMeters, toMiles, toMilliamps, toMillimeters, toMilliohms, toMillivolts, toNauticalMiles, toOhms, toOnOff, toPercentage, toRelativeTime, toScientificNotation, toSecret, toSentenceCase, toTemperature, toTitleCase, toTrueFalse, toUpperCase, toV, toVolts, toW, toWatts, toWh, toYards, tokWh, truncateEnd, truncateMiddle, truncateStart, ucFirst, useBreakpoint, useColorMode, useDebounce, useInputFocus, useLocalStorage, useMediaQuery, useNotice, yardsToMeters };
|
|
4501
|
+
export { type Action, ActionCell, type ActionCellProps, ActivityFeed, ActivityFeedGroup, type ActivityFeedGroupProps, type ActivityFeedProps, type ActivityFeedSize, type ActivityFeedVariant, ActivityItem, type ActivityItemProps, type ActivityItemSurface, type ActivityItemTone, Alert, type AlertProps, AreaSeries, AutoMobileRenderer, Autocomplete, BREAKPOINTS, BarSeries, BaseDataPoint, type BaseInputProps, type BaseProps, BooleanCell, type BooleanCellProps, BooleanFormat, BreadcrumbItem, type BreadcrumbItemProps, Breadcrumbs, type Breakpoint, type BreakpointState, Button, Calendar, Card, CardContent, type CardContentProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, CardMedia, type CardMediaProps, CardMobileRenderer, type CardProps, type CardVariant, type CellAlignment, type CellComponent, type CellComponentProps, type CellContext, type CellEmphasis, ChartAxis, ChartBottomBar, ChartContainer, type ChartExportMetadata, ChartTooltip, Checkbox, CheckboxGroup, Chip, ClearButton, Collapse, CollapseContent, type CollapseContentProps, type CollapseDensity, CollapseHeader, type CollapseHeaderProps, CollapseItem, type CollapseItemProps, type CollapseProps, type CollapseVariant, ColorModeProvider, type Column, ComponentFormatter, Confirm, type ConfirmProps, CopyToClipboard, CurrencyFormat, CurrentFormat, CustomPinsSpec, DataControls, type Filter as DataControlsFilter, type DataControlsProps, type SortOption as DataControlsSortOption, DataTable, type DataTableProps, DateCell, type DateCellProps, DateFormat, DateRangePicker, Description, type DescriptionProps, Dialog, type DialogAction, type DialogFooterConfig, DialogHeader, type DialogHeaderConfig, type DialogHeaderProps, type DialogProps, DistanceFormat, Drawer, type DrawerProps, EmptyState, type EmptyStateAction, type EmptyStateAlignment, type EmptyStateProps, type EmptyStateSize, EnergyFormat, ErrorBoundary, type ExportType, type FacetConfig, type FacetCounts, type FacetType, FieldError, type FieldErrorProps, FieldFormat, FieldGroup, type FieldGroupProps, FieldValue, type FilterChip, FilterChips, type FilterChipsProps, type FilterCondition, FilterDialog, type FilterDialogProps, type FilterGroup, type FilterOperator, type FilterState, Form, FormatRegistry, FormattedValue, FormatterFunction, GeoJsonLayerSpec, Grid, type GridAlign, type GridCols, type GridFlow, type GridGap, type GridItemProps, type GridJustify, type GridProps, type GridSpan, Icon, InfiniteScrollIndicator, type InfiniteScrollIndicatorProps, Input, type InputProps, type InputStyleProps, InputWrapper, Kpi, KpiGroup, type KpiGroupAlign, type KpiGroupCols, type KpiGroupGap, type KpiGroupProps, type KpiOrientation, type KpiProps, type KpiSize, type KpiStatus, Label, type LabelProps, LayerSpec, LineSeries, type LinkBehavior, List, ListBox, ListBoxItem, ListItem, type ListItemProps, ListPane, type ListPaneProps, type ListProps, type LoadingState, type MobileBreakpoint, type MobileConfig, type MobileRenderer, ModalBackdrop, type ModalBackdropProps, Notice, NoticeContainer, type NoticeContainerProps, type NoticeOptions, type NoticeProps, NoticeProvider, type NoticeProviderProps, type NoticeVariant, NumberCell, type NumberCellProps, NumberField, NumberFormat, type PageAsideProps, type PageBreadcrumbItem, type PageContentProps, type PageHeaderProps, PageLayout, type PageLayoutProps, type PageScrollableContentProps, PhoneFormat, PlaceSearch, Popover, PowerFormat, ProgressBar, Radio, RadioCard, RadioCardGroup, type RadioCardGroupProps, type RadioCardProps, RadioGroup, RangeCalendar, RasterLayerSpec, ResistanceFormat, type ResponsiveValue, ResultsCount, type ResultsCountProps, SKELETON_SIZES, type SearchConfig, SearchControl, type SearchControlProps, Section, SectionNav, type SectionNavItem, type SectionNavOrientation, type SectionNavProps, type SectionProps, type SectionSpacing, type SectionVariant, Select, SelectCell, type SelectCellProps, Skeleton, Slider, type SortConfig, SortControl, type SortControlProps, type SortDirection, type SortState, SplitPane, type SplitPaneOrientation, type SplitPanePanelProps, type SplitPaneProps, type StatAlign, type StatFormatter, type StatItem, type StatLayout, StatList, type StatListProps, type StatThreshold, type StatTone, type StatValue, Switch, Tab, TabList, TabPanel, type TableDensity, type TableLayout, type TableWidth, Tabs, type TabsProps$1 as TabsProps, TemperatureFormat, TemperatureUnit, TemperatureUnitString, TextArea, TextAreaWithChips, TextCell, type TextCellProps, TextField, TextFormat, TimeField, ToggleButton, Tooltip, TooltipData, Tray, type TrayProps, type TrendPoint, type UseBreakpointReturn, type UseClientDataControlsOptions, type UseClientDataControlsResult, type UseDataControlsClientOptions, type UseDataControlsOptions, type UseDataControlsResult, type UseDataControlsServerOptions, type UseInfiniteScrollOptions, type UseInfiniteScrollReturn, type UseServerDataControlsOptions, VectorLayerSpec, VoltageFormat, YFormatType, addFilterCondition, autoScaleCurrent, autoScaleDistance, autoScaleEnergy, autoScalePower, autoScaleResistance, autoScaleVoltage, camelCaseToWords, capitalize, celsiusToFahrenheit, celsiusToKelvin, centimetersToInches, createEmptyFilter, createFilter, createFilters, createFormat, enumToSentenceCase, exportChart, fahrenheitToCelsius, fahrenheitToKelvin, feetToMeters, feetToMiles, filterToChips, formatBoolean, formatCurrency, formatCurrent, formatDate, formatDistance, formatEmptyValue, formatEnergy, formatFieldValue, formatInternationalPhone, formatNumber, formatPhone, formatPhoneNumber, formatPower, formatResistance, formatTemperature, formatText, formatUSPhone, formatVoltage, getBadgeClasses, getBooleanBadgeVariant, getCellAlignmentClasses, getCellContainerClasses, getCellTextClasses, getDateParts, getExportFormatName, getFieldGroupStyles, getFilterFields, getInputBackgroundStyles, getInputBaseStyles, getInputStateStyles, getNumericColorClasses, getSkeletonSize, inchesToCentimeters, isCustomPinsLayer, isExportSupported, isFilterEmpty, isGeoJsonLayer, isNil, isRasterLayer, isVectorLayer, kelvinToCelsius, kelvinToFahrenheit, kilometersToMiles, layer, metersToFeet, metersToMiles, metersToYards, milesToFeet, milesToKilometers, milesToMeters, parseBoolean, removeFilterCondition, resolveValue, snakeCaseToWords, temperatureStringToSymbol, toA, toActiveInactive, toAmps, toBoolean, toCelsius, toCentimeters, toCheckmark, toCompactNumber, toCurrency, toCustomDateFormat, toDateString, toEnabledDisabled, toFahrenheit, toFeet, toFloat, toFormattedNumber, toFullDateTime, toGW, toGWh, toGigawatts, toISOString, toInches, toInteger, toKA, toKV, toKW, toKelvin, toKiloamps, toKilohms, toKilometers, toKilovolts, toKilowatts, toLowerCase, toMA, toMV, toMW, toMWh, toMegawatts, toMegohms, toMeters, toMiles, toMilliamps, toMillimeters, toMilliohms, toMillivolts, toNauticalMiles, toOhms, toOnOff, toPercentage, toRelativeTime, toScientificNotation, toSecret, toSentenceCase, toTemperature, toTitleCase, toTrueFalse, toUpperCase, toV, toVolts, toW, toWatts, toWh, toYards, tokWh, truncateEnd, truncateMiddle, truncateStart, ucFirst, useBreakpoint, useClientDataControls, useColorMode, useDataControls, useDebounce, useInfiniteScroll, useInputFocus, useLocalStorage, useMediaQuery, useNotice, useServerDataControls, yardsToMeters };
|