@telicent-oss/ds 4.4.2 → 5.0.0

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/ds.d.ts CHANGED
@@ -24,8 +24,8 @@ import { AvatarProps } from '@mui/material';
24
24
  import { AxiosInstance } from 'axios';
25
25
  import { BackdropClasses } from '@mui/material';
26
26
  import { BackdropProps } from '@mui/material';
27
- import { BadgeClasses } from '@mui/material';
28
- import { BadgeProps } from '@mui/material';
27
+ import { BadgeOwnProps } from '@mui/material';
28
+ import { BadgeProps as BadgeProps_2 } from '@mui/material/Badge';
29
29
  import { BaseSelectProps } from '@mui/material';
30
30
  import { BottomNavigationActionClasses } from '@mui/material';
31
31
  import { BottomNavigationActionProps } from '@mui/material';
@@ -56,6 +56,7 @@ import { CardOwnProps } from '@mui/material';
56
56
  import { CardProps as CardProps_2 } from '@mui/material/Card';
57
57
  import { CheckboxClasses } from '@mui/material';
58
58
  import { CheckboxProps } from '@mui/material';
59
+ import { ChevronLeft as ChevronLeftIcon } from '@telicent-oss/mui-icons-material';
59
60
  import { ChevronRight as ChevronRightIcon } from '@telicent-oss/mui-icons-material';
60
61
  import { ChipClasses } from '@mui/material';
61
62
  import { ChipProps as ChipProps_2 } from '@mui/material';
@@ -94,7 +95,6 @@ import { DividerClasses } from '@mui/material';
94
95
  import { dividerClasses } from '@mui/material/Divider';
95
96
  import { DividerProps } from '@mui/material';
96
97
  import { DividerProps as DividerProps_3 } from '@mui/material/Divider';
97
- import { DrawerClasses } from '@mui/material';
98
98
  import { DrawerProps as DrawerProps_2 } from '@mui/material';
99
99
  import { DrawerProps as DrawerProps_3 } from '@mui/material/Drawer';
100
100
  import { ElementType } from 'react';
@@ -166,7 +166,7 @@ import { ListItemAvatarClasses } from '@mui/material';
166
166
  import { ListItemAvatarProps } from '@mui/material';
167
167
  import { ListItemButtonClasses } from '@mui/material';
168
168
  import { ListItemButtonProps } from '@mui/material';
169
- import { ListItemButtonProps as ListItemButtonProps_2 } from '@mui/material/ListItemButton';
169
+ import { ListItemButtonTypeMap } from '@mui/material/ListItemButton';
170
170
  import { ListItemClasses } from '@mui/material';
171
171
  import { ListItemIconClasses } from '@mui/material';
172
172
  import { ListItemIconProps } from '@mui/material';
@@ -421,22 +421,18 @@ export declare const AppSwitchLibrarySchema: default_2.ZodObject<{
421
421
  id: default_2.ZodString;
422
422
  name: default_2.ZodString;
423
423
  url: default_2.ZodString;
424
- /** @deprecated Use `iconDark` and `iconLight` for theme-aware icons. */
425
- icon: default_2.ZodOptional<default_2.ZodString>;
426
424
  iconDark: default_2.ZodOptional<default_2.ZodString>;
427
425
  iconLight: default_2.ZodOptional<default_2.ZodString>;
428
426
  }, "strip", default_2.ZodTypeAny, {
429
427
  id: string;
430
428
  url: string;
431
429
  name: string;
432
- icon?: string | undefined;
433
430
  iconDark?: string | undefined;
434
431
  iconLight?: string | undefined;
435
432
  }, {
436
433
  id: string;
437
434
  url: string;
438
435
  name: string;
439
- icon?: string | undefined;
440
436
  iconDark?: string | undefined;
441
437
  iconLight?: string | undefined;
442
438
  }>;
@@ -544,6 +540,10 @@ declare type AutocompleteOption = {
544
540
  isRecentSearch: boolean;
545
541
  };
546
542
 
543
+ export declare const Badge: default_3.FC<BadgeProps>;
544
+
545
+ export declare type BadgeProps = BadgeProps_2;
546
+
547
547
  export declare const base64Codec: Codec;
548
548
 
549
549
  export declare type BaseProps = Omit<TypographyProps_2, "variant" | "paragraph">;
@@ -590,10 +590,6 @@ export declare interface BasicMapProperties {
590
590
  center: number[];
591
591
  layers?: LayerConfig[];
592
592
  controls?: Partial<MapControlsConfig>;
593
- /**
594
- * @deprecated Use `layers` instead. This prop will be removed in a future release.
595
- */
596
- mapStyleOptions?: LegacyMapConfig;
597
593
  markers: MarkerFeature[];
598
594
  polygons: PolygonFeature[];
599
595
  onFeatureClick?: OnFeatureClick;
@@ -700,6 +696,8 @@ declare type CardProps = Omit<CardProps_2, "classes" | "raised"> & Partial<{
700
696
 
701
697
  export declare const Checkbox: default_3.FC<CustomCheckboxProps>;
702
698
 
699
+ export { ChevronLeftIcon }
700
+
703
701
  export { ChevronRightIcon }
704
702
 
705
703
  export declare const Chip: default_3.FC<ChipProps>;
@@ -903,8 +901,13 @@ export declare interface DraggableFloatingPanelProps extends HTMLAttributes<HTML
903
901
 
904
902
  export declare const DragHandleIcon: default_3.FC<SvgIconProps>;
905
903
 
906
- export declare const Drawer: default_3.ForwardRefExoticComponent<DrawerProps & default_3.RefAttributes<DrawerController>>;
904
+ /**
905
+ * A controlled side sheet: MUI's Drawer under the DS theme. The caller owns
906
+ * `open` and `onClose`, and Escape and a backdrop click both call `onClose`.
907
+ */
908
+ export declare const Drawer: default_3.FC<DrawerProps>;
907
909
 
910
+ /** @deprecated Part of the deprecated `InsetDrawer` (ADR-0005). */
908
911
  export declare interface DrawerController {
909
912
  openDrawer(): void;
910
913
  closeDrawer(): void;
@@ -921,12 +924,13 @@ declare interface DrawerPresentationalProps extends Omit<DrawerProps_3, "PaperPr
921
924
  id?: string;
922
925
  }
923
926
 
924
- export declare interface DrawerProps extends Omit<DrawerPresentationalProps, "open" | "onClose" | "ref"> {
925
- /** (default: true) */
926
- initialOpen?: boolean;
927
- onVisibilityChange?: (open: boolean) => void;
928
- PaperSx?: SxProps<Theme>;
929
- }
927
+ export declare type DrawerProps = DrawerProps_3 & {
928
+ /**
929
+ * Width of a left or right panel, in px when a number. The theme caps it
930
+ * at the viewport, so a fixed width never runs off a narrow screen.
931
+ */
932
+ width?: number | string;
933
+ };
930
934
 
931
935
  export declare const DropdownButton: default_3.FC<DropdownButtonProps>;
932
936
 
@@ -957,6 +961,37 @@ export declare type ENCODE_SEARCH_PARAMS_MODES_Type = z.infer<typeof ENCODE_SEAR
957
961
  */
958
962
  export declare const ensureFaIconPath: (faIcon: string) => Promise<string | undefined>;
959
963
 
964
+ export declare const EntityList: <T>({ items, columns, getItemKey, getItemHref, getItemLabel, onItemClick, ariaLabelledBy, ariaLabel, initialSort, isLoading, defaultPageSize, pageSizeOptions, renderEmpty, }: EntityListProps<T>) => JSX.Element;
965
+
966
+ declare type EntityListBaseProps<T> = {
967
+ items: T[];
968
+ columns: EntityListColumn<T>[];
969
+ getItemKey: (item: T) => string | number;
970
+ getItemHref?: (item: T) => string;
971
+ getItemLabel?: (item: T) => string;
972
+ onItemClick?: (item: T, href: string) => void;
973
+ initialSort?: {
974
+ key: string;
975
+ direction: SortDirection;
976
+ };
977
+ isLoading?: boolean;
978
+ defaultPageSize?: number;
979
+ pageSizeOptions?: number[];
980
+ renderEmpty?: () => ReactNode;
981
+ };
982
+
983
+ export declare type EntityListColumn<T> = {
984
+ key: string;
985
+ header: string;
986
+ render: (item: T) => ReactNode;
987
+ getSortValue?: (item: T) => SortValue;
988
+ flex?: number;
989
+ width?: number | string;
990
+ align?: "left" | "right";
991
+ };
992
+
993
+ export declare type EntityListProps<T> = EntityListBaseProps<T> & LabellingProps;
994
+
960
995
  export declare const ErrorFallback: default_3.FC<ErrorFallbackProps>;
961
996
 
962
997
  export declare type ErrorFallbackProps = Omit<ErrorFallbackWrapperProps, "children"> & ErrorFallbackTextProps;
@@ -1289,6 +1324,19 @@ declare const generateComponentOverrides: (uiTheme: UITheme) => {
1289
1324
  };
1290
1325
  };
1291
1326
  };
1327
+ MuiDrawer: {
1328
+ styleOverrides: {
1329
+ paper: ({ ownerState }: DrawerProps_2 & Record<string, unknown> & {
1330
+ ownerState: DrawerProps_2 & Record<string, unknown>;
1331
+ } & {
1332
+ theme: Omit<Theme, "components">;
1333
+ }) => {
1334
+ maxWidth: string;
1335
+ } | {
1336
+ maxWidth?: undefined;
1337
+ };
1338
+ };
1339
+ };
1292
1340
  MuiCard: {
1293
1341
  variants: {
1294
1342
  props: {
@@ -1398,6 +1446,30 @@ declare const generateComponentOverrides: (uiTheme: UITheme) => {
1398
1446
  };
1399
1447
  };
1400
1448
  };
1449
+ MuiBadge: {
1450
+ styleOverrides: {
1451
+ badge: ({ theme }: BadgeOwnProps & CommonProps & Omit<DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "components" | "className" | "style" | "classes" | "children" | "sx" | "variant" | "slots" | "slotProps" | "color" | "invisible" | "anchorOrigin" | "badgeContent" | "componentsProps" | "max" | "overlap" | "showZero"> & {
1452
+ component?: ElementType;
1453
+ } & Record<string, unknown> & {
1454
+ ownerState: BadgeOwnProps & CommonProps & Omit<DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "components" | "className" | "style" | "classes" | "children" | "sx" | "variant" | "slots" | "slotProps" | "color" | "invisible" | "anchorOrigin" | "badgeContent" | "componentsProps" | "max" | "overlap" | "showZero"> & {
1455
+ component?: ElementType;
1456
+ } & Record<string, unknown>;
1457
+ } & {
1458
+ theme: Omit<Theme, "components">;
1459
+ }) => {
1460
+ pointerEvents: "none";
1461
+ "&.MuiBadge-standard": {
1462
+ minWidth: number;
1463
+ height: number;
1464
+ padding: string;
1465
+ borderRadius: number;
1466
+ fontSize: number;
1467
+ fontWeight: number;
1468
+ border: string;
1469
+ };
1470
+ };
1471
+ };
1472
+ };
1401
1473
  MuiAccordion: {
1402
1474
  defaultProps: {
1403
1475
  elevation: number;
@@ -1472,18 +1544,6 @@ declare const generateComponentOverrides: (uiTheme: UITheme) => {
1472
1544
  }>;
1473
1545
  }[] | undefined;
1474
1546
  } | undefined;
1475
- MuiBadge?: {
1476
- defaultProps?: ComponentsProps["MuiBadge"];
1477
- styleOverrides?: Partial<OverridesStyleRules<keyof BadgeClasses, "MuiBadge", Omit<Theme, "components">>> | undefined;
1478
- variants?: {
1479
- props: Partial<BadgeProps> | ((props: Partial<BadgeProps> & {
1480
- ownerState: Partial<BadgeProps>;
1481
- }) => boolean);
1482
- style: Interpolation< {
1483
- theme: Omit<Theme, "components">;
1484
- }>;
1485
- }[] | undefined;
1486
- } | undefined;
1487
1547
  MuiBottomNavigation?: {
1488
1548
  defaultProps?: ComponentsProps["MuiBottomNavigation"];
1489
1549
  styleOverrides?: Partial<OverridesStyleRules<"root", "MuiBottomNavigation", Omit<Theme, "components">>> | undefined;
@@ -1712,18 +1772,6 @@ declare const generateComponentOverrides: (uiTheme: UITheme) => {
1712
1772
  }>;
1713
1773
  }[] | undefined;
1714
1774
  } | undefined;
1715
- MuiDrawer?: {
1716
- defaultProps?: ComponentsProps["MuiDrawer"];
1717
- styleOverrides?: Partial<OverridesStyleRules<keyof DrawerClasses, "MuiDrawer", Omit<Theme, "components">>> | undefined;
1718
- variants?: {
1719
- props: Partial<DrawerProps_2> | ((props: Partial<DrawerProps_2> & {
1720
- ownerState: Partial<DrawerProps_2>;
1721
- }) => boolean);
1722
- style: Interpolation< {
1723
- theme: Omit<Theme, "components">;
1724
- }>;
1725
- }[] | undefined;
1726
- } | undefined;
1727
1775
  MuiAccordionActions?: {
1728
1776
  defaultProps?: ComponentsProps["MuiAccordionActions"];
1729
1777
  styleOverrides?: Partial<OverridesStyleRules<keyof AccordionActionsClasses, "MuiAccordionActions", Omit<Theme, "components">>> | undefined;
@@ -2703,6 +2751,21 @@ declare type InputText = TextFieldProps & {
2703
2751
  fullWidth?: boolean;
2704
2752
  };
2705
2753
 
2754
+ /**
2755
+ * @deprecated The map inset's ref-driven panel. Use the controlled `Drawer`
2756
+ * from `@telicent-oss/ds`, which takes `open` and `onClose` (ADR-0005).
2757
+ * Kept for existing consumers; removed in a later major.
2758
+ */
2759
+ export declare const InsetDrawer: default_3.ForwardRefExoticComponent<InsetDrawerProps & default_3.RefAttributes<DrawerController>>;
2760
+
2761
+ /** @deprecated Use the controlled `Drawer` from `@telicent-oss/ds` (ADR-0005). */
2762
+ export declare interface InsetDrawerProps extends Omit<DrawerPresentationalProps, "open" | "onClose" | "ref"> {
2763
+ /** (default: true) */
2764
+ initialOpen?: boolean;
2765
+ onVisibilityChange?: (open: boolean) => void;
2766
+ PaperSx?: SxProps<Theme>;
2767
+ }
2768
+
2706
2769
  export declare const InsetInMap: default_3.FC<RootPropsType & {
2707
2770
  content: default_3.ReactNode;
2708
2771
  children?: default_3.ReactNode;
@@ -2736,6 +2799,14 @@ export declare type LabeledSwitchProps = {
2736
2799
  ref?: Ref<HTMLButtonElement>;
2737
2800
  };
2738
2801
 
2802
+ declare type LabellingProps = {
2803
+ ariaLabel: string;
2804
+ ariaLabelledBy?: string;
2805
+ } | {
2806
+ ariaLabel?: string;
2807
+ ariaLabelledBy: string;
2808
+ };
2809
+
2739
2810
  export declare type LayerConfig = BaseRasterLayerConfig | BaseVectorTileLayerConfig | OverlayVectorLayerConfig;
2740
2811
 
2741
2812
  export declare type LayerMeta = {
@@ -2757,24 +2828,6 @@ export declare interface LayerWithOptionalSource extends default_6 {
2757
2828
  getSource?: () => SourceWithEvents | null;
2758
2829
  }
2759
2830
 
2760
- export declare type LegacyMapConfig = {
2761
- vectorStyles?: LegacyVectorStyle;
2762
- tileSets?: LegacyTileSet[];
2763
- };
2764
-
2765
- export declare type LegacyTileSet = {
2766
- label: string;
2767
- uri: string;
2768
- image: string;
2769
- attribution?: string;
2770
- };
2771
-
2772
- export declare type LegacyVectorStyle = {
2773
- label: string;
2774
- uri: string;
2775
- image: string;
2776
- };
2777
-
2778
2831
  export declare const LinearProgress: default_3.FC<LinearProgressProps_2>;
2779
2832
 
2780
2833
  export declare const Link: default_3.ForwardRefExoticComponent<Omit<LinkButtonProps, "ref"> & default_3.RefAttributes<HTMLButtonElement>>;
@@ -2787,7 +2840,7 @@ export { ListIcon }
2787
2840
 
2788
2841
  export declare const ListItem: default_3.FC<ListItemProps_2>;
2789
2842
 
2790
- export declare const ListItemButton: default_3.FC<ListItemButtonProps_2>;
2843
+ export declare const ListItemButton: ExtendButtonBase<ListItemButtonTypeMap< {}, "div">>;
2791
2844
 
2792
2845
  export declare const ListItemIcon: default_3.FC<ListItemIconProps_2>;
2793
2846
 
@@ -3708,6 +3761,10 @@ export declare type SnackbarProviderProps = SnackbarProviderProps_2;
3708
3761
 
3709
3762
  export declare type SnackbarType = "success" | "error" | "warning" | "info";
3710
3763
 
3764
+ export declare type SortDirection = "asc" | "desc";
3765
+
3766
+ export declare type SortValue = string | number | Date | null | undefined;
3767
+
3711
3768
  export declare interface SourceWithEvents {
3712
3769
  on(type: string, listener: (e: unknown) => void): void;
3713
3770
  }
@@ -3872,11 +3929,11 @@ declare type TeliTypeIconSizeProp = "xs" | "sm" | "base" | "lg";
3872
3929
  declare const Text_2: default_3.FC<TextProps>;
3873
3930
  export { Text_2 as Text }
3874
3931
 
3875
- export declare const TextField: default_3.ForwardRefExoticComponent<(Omit<OutlinedTextFieldProps & {
3932
+ export declare const TextField: default_3.ForwardRefExoticComponent<(Omit<StandardTextFieldProps & {
3876
3933
  errorText?: default_3.ReactNode;
3877
- }, "ref"> | Omit<FilledTextFieldProps & {
3934
+ }, "ref"> | Omit<OutlinedTextFieldProps & {
3878
3935
  errorText?: default_3.ReactNode;
3879
- }, "ref"> | Omit<StandardTextFieldProps & {
3936
+ }, "ref"> | Omit<FilledTextFieldProps & {
3880
3937
  errorText?: default_3.ReactNode;
3881
3938
  }, "ref">) & default_3.RefAttributes<HTMLInputElement>>;
3882
3939
 
@@ -4154,13 +4211,8 @@ declare type UIThemeProviderProps = default_3.PropsWithChildren & {
4154
4211
  dark?: boolean;
4155
4212
  };
4156
4213
 
4157
- /**
4158
- * Curated set of DS themes. `"DataNavy"` is deprecated (kept for backwards
4159
- * compatibility with apps that still pass it to `UIThemeProvider`) and is
4160
- * hidden from the Storybook theme selector — prefer any of the others for
4161
- * new work.
4162
- */
4163
- export declare const UIThemeSchema: default_2.ZodEnum<["DataNavy", "DocumentPink", "GraphOrange", "AdminBlue", "GeoGreen", "Blank"]>;
4214
+ /** Curated set of DS themes. */
4215
+ export declare const UIThemeSchema: default_2.ZodEnum<["DocumentPink", "GraphOrange", "AdminBlue", "GeoGreen", "Blank"]>;
4164
4216
 
4165
4217
  export declare const uriComponentCodec: Codec;
4166
4218
 
@@ -4177,6 +4229,7 @@ export declare const useDebounce: (value: any, delay?: number) => any;
4177
4229
  * @param onVisibilityChange
4178
4230
  * @returns
4179
4231
  */
4232
+ /** @deprecated Part of the deprecated `InsetDrawer` (ADR-0005). */
4180
4233
  export declare function useDrawer(args: {
4181
4234
  ref: ForwardedRef<DrawerController>;
4182
4235
  initialOpen: boolean;