@gouvfr-lasuite/ui-kit 0.18.6 → 0.18.7

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
@@ -42,7 +42,7 @@ declare type AccessRoleDropdownProps = {
42
42
  canUpdate?: boolean;
43
43
  isOpen?: boolean;
44
44
  onOpenChange?: (isOpen: boolean) => void;
45
- roleTopMessage?: string;
45
+ roleTopMessage?: DropdownMenuProps["topMessage"];
46
46
  };
47
47
 
48
48
  export declare type AddShareUserListProps<UserType> = {
@@ -522,6 +522,7 @@ export declare const DropdownMenu: ({ options, isOpen, onOpenChange, children, s
522
522
 
523
523
  export declare type DropdownMenuOption = {
524
524
  label: string;
525
+ subText?: string;
525
526
  icon?: ReactNode;
526
527
  callback?: () => void | Promise<unknown>;
527
528
  isDisabled?: boolean;
@@ -538,7 +539,7 @@ export declare type DropdownMenuProps = {
538
539
  selectedValues?: string[];
539
540
  onSelectValue?: (value: string) => void;
540
541
  isOpen?: boolean;
541
- topMessage?: string;
542
+ topMessage?: string | ReactNode;
542
543
  shouldCloseOnInteractOutside?: (element: Element) => boolean;
543
544
  };
544
545
 
@@ -1229,6 +1230,7 @@ export declare const locales: {
1229
1230
  ok: string;
1230
1231
  shareButton: string;
1231
1232
  modalTitle: string;
1233
+ modalAriaLabel: string;
1232
1234
  access: {
1233
1235
  delete: string;
1234
1236
  };
@@ -1262,6 +1264,10 @@ export declare const locales: {
1262
1264
  title: string;
1263
1265
  description: string;
1264
1266
  };
1267
+ authenticated: {
1268
+ title: string;
1269
+ description: string;
1270
+ };
1265
1271
  restricted: {
1266
1272
  title: string;
1267
1273
  description: string;
@@ -1393,6 +1399,7 @@ export declare const locales: {
1393
1399
  copyLink: string;
1394
1400
  ok: string;
1395
1401
  modalTitle: string;
1402
+ modalAriaLabel: string;
1396
1403
  shareButton: string;
1397
1404
  access: {
1398
1405
  delete: string;
@@ -1431,6 +1438,10 @@ export declare const locales: {
1431
1438
  title: string;
1432
1439
  description: string;
1433
1440
  };
1441
+ authenticated: {
1442
+ title: string;
1443
+ description: string;
1444
+ };
1434
1445
  };
1435
1446
  };
1436
1447
  role: {
@@ -1561,12 +1572,13 @@ export declare const QuickSearchInput: ({ loading, inputValue, onFilter, placeho
1561
1572
 
1562
1573
  export declare const QuickSearchItem: ({ children, onSelect, id, }: PropsWithChildren<Props>) => JSX.Element;
1563
1574
 
1564
- export declare const QuickSearchItemTemplate: ({ alwaysShowRight, left, right, }: QuickSearchItemTemplateProps) => JSX.Element;
1575
+ export declare const QuickSearchItemTemplate: ({ alwaysShowRight, left, right, testId, }: QuickSearchItemTemplateProps) => JSX.Element;
1565
1576
 
1566
1577
  export declare type QuickSearchItemTemplateProps = {
1567
1578
  alwaysShowRight?: boolean;
1568
1579
  left: ReactNode;
1569
1580
  right?: ReactNode;
1581
+ testId?: string;
1570
1582
  };
1571
1583
 
1572
1584
  export declare type QuickSearchProps = {
@@ -1617,7 +1629,7 @@ export declare type ShareInvitationItemProps<UserType, InvitationType> = {
1617
1629
  showMoreActionsButton?: boolean;
1618
1630
  };
1619
1631
 
1620
- export declare const ShareMemberItem: <UserType, AccessType>({ accessData, roles, updateRole, deleteAccess, canUpdate, roleTopMessage, }: ShareMemberItemProps<UserType, AccessType>) => JSX.Element;
1632
+ export declare const ShareMemberItem: <UserType, AccessType>({ accessData, accessRoleKey, roles, updateRole, deleteAccess, canUpdate, roleTopMessage, }: ShareMemberItemProps<UserType, AccessType>) => JSX.Element;
1621
1633
 
1622
1634
  export declare type ShareMemberItemProps<UserType, AccessType> = {
1623
1635
  accessData: AccessData<UserType, AccessType>;
@@ -1625,18 +1637,20 @@ export declare type ShareMemberItemProps<UserType, AccessType> = {
1625
1637
  updateRole?: (access: AccessData<UserType, AccessType>, role: string) => void;
1626
1638
  deleteAccess?: (access: AccessData<UserType, AccessType>) => void;
1627
1639
  canUpdate?: boolean;
1628
- roleTopMessage?: string;
1640
+ roleTopMessage?: DropdownMenuProps["topMessage"];
1641
+ accessRoleKey?: keyof AccessData<UserType, AccessType>;
1629
1642
  };
1630
1643
 
1631
1644
  export declare const ShareModal: <UserType, InvitationType, AccessType>({ searchUsersResult, children, outsideSearchContent, accesses: members, invitations, hasNextMembers, canUpdate, canView, hasNextInvitations, hideInvitations, hideMembers, cannotViewChildren, customTranslations, ...props }: PropsWithChildren<ShareModalProps<UserType, InvitationType, AccessType>>) => JSX.Element;
1632
1645
 
1633
1646
  declare type ShareModalAccessProps<UserType, AccessType> = {
1634
1647
  accesses?: AccessData<UserType, AccessType>[];
1648
+ accessRoleKey?: keyof AccessData<UserType, AccessType>;
1635
1649
  hasNextMembers?: boolean;
1636
1650
  onLoadNextMembers?: () => void;
1637
1651
  onDeleteAccess?: (access: AccessData<UserType, AccessType>) => void;
1638
1652
  onUpdateAccess?: (access: AccessData<UserType, AccessType>, role: string) => void;
1639
- accessRoleTopMessage?: (access: AccessData<UserType, AccessType>) => string | undefined;
1653
+ accessRoleTopMessage?: (access: AccessData<UserType, AccessType>) => string | ReactNode | undefined;
1640
1654
  };
1641
1655
 
1642
1656
  export declare const ShareModalCopyLinkFooter: ({ onCopyLink, onOk, }: ShareModalCopyLinkFooterProps) => JSX.Element;
@@ -1664,6 +1678,8 @@ declare type ShareModalLinkSettingsProps = {
1664
1678
  linkRole?: "reader" | "editor";
1665
1679
  showLinkRole?: boolean;
1666
1680
  onUpdateLinkRole?: (value: string) => void;
1681
+ topLinkReachMessage?: DropdownMenuProps["topMessage"];
1682
+ topLinkRoleMessage?: DropdownMenuProps["topMessage"];
1667
1683
  };
1668
1684
 
1669
1685
  /**
@@ -1805,11 +1821,11 @@ export declare type TreeProviderProps<T> = {
1805
1821
  onLoadChildren?: (id: string, page: number) => Promise<PaginatedChildrenResult<T>>;
1806
1822
  };
1807
1823
 
1808
- export declare const TreeView: <T>({ initialOpenState, dndRootElement, selectedNodeId, rootNodeId, renderNode, canDrop, canDrag, afterMove, beforeMove, rowProps, }: TreeViewProps<T>) => JSX.Element | undefined;
1824
+ export declare const TreeView: <T>({ initialOpenState, dndRootElement, selectedNodeId, rootNodeId, renderNode, canDrop, canDrag, afterMove, beforeMove, paddingTop, paddingBottom, rowProps, }: TreeViewProps<T>) => JSX.Element | undefined;
1809
1825
 
1810
1826
  export declare type TreeViewDataType<T> = BaseTreeViewData<T>;
1811
1827
 
1812
- export declare const TreeViewItem: <T>({ children, itemProps, onClick, onKeyDown, node, dragHandle, style, forceLoading, }: PropsWithChildren<TreeViewNodeProps<T>>) => JSX.Element;
1828
+ export declare const TreeViewItem: <T>({ children, itemProps, testId, onClick, onKeyDown, node, dragHandle, style, forceLoading, }: PropsWithChildren<TreeViewNodeProps<T>>) => JSX.Element;
1813
1829
 
1814
1830
  export declare enum TreeViewMoveModeEnum {
1815
1831
  FIRST_CHILD = "first-child",
@@ -1832,6 +1848,7 @@ export declare type TreeViewNodeProps<T> = NodeRendererProps<TreeDataItem<T>> &
1832
1848
  onClick?: () => void;
1833
1849
  onKeyDown?: (e: default_2.KeyboardEvent) => void;
1834
1850
  forceLoading?: boolean;
1851
+ testId?: string;
1835
1852
  };
1836
1853
 
1837
1854
  export declare enum TreeViewNodeTypeEnum {
@@ -1856,6 +1873,8 @@ export declare type TreeViewProps<T> = {
1856
1873
  beforeMove?: (result: TreeViewMoveResult, moveCallback: () => void) => void;
1857
1874
  afterMove?: (result: TreeViewMoveResult) => void;
1858
1875
  renderNode: (props: NodeRendererProps<TreeDataItem<T>>) => React.ReactNode;
1876
+ paddingTop?: number;
1877
+ paddingBottom?: number;
1859
1878
  rowProps?: React.HTMLAttributes<HTMLDivElement>;
1860
1879
  };
1861
1880