@gouvfr-lasuite/ui-kit 0.18.0 → 0.18.2

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
@@ -691,6 +691,24 @@ export declare const Label: ({ children, text, ...props }: LabelHTMLAttributes<H
691
691
 
692
692
  export declare const LaGaufre: () => JSX.Element;
693
693
 
694
+ export declare const LaGaufreV2: ({ apiUrl, data, ...props }: LaGaufreV2Props) => JSX.Element;
695
+
696
+ export declare type LaGaufreV2Props = {
697
+ widgetPath: string;
698
+ apiUrl: string;
699
+ data?: ServicesResponse;
700
+ fontFamily?: string;
701
+ background?: string;
702
+ headerLogo?: string;
703
+ headerUrl?: string;
704
+ label?: string;
705
+ closeLabel?: string;
706
+ headerLabel?: string;
707
+ loadingText?: string;
708
+ newWindowLabelSuffix?: string;
709
+ showMoreLimit?: number;
710
+ };
711
+
694
712
  /**
695
713
  * A DropdownMenu specific to languages.
696
714
  *
@@ -700,15 +718,20 @@ export declare const LaGaufre: () => JSX.Element;
700
718
  * - `size`: The size of the CTA.
701
719
  * - `color`: The color of the CTA.
702
720
  */
703
- export declare const LanguagePicker: ({ languages, onChange, size, color, variant, fullWidth, }: LanguagePickerProps) => JSX.Element;
721
+ export declare const LanguagePicker: ({ languages, onChange, size, color, variant, fullWidth, compact: lightMode, }: LanguagePickerProps) => JSX.Element;
704
722
 
705
723
  export declare type LanguagePickerProps = {
706
- languages: DropdownMenuOption[];
724
+ languages: LanguagesOption[];
707
725
  onChange?: (language: string) => void;
708
726
  color?: ButtonProps["color"];
709
727
  variant?: ButtonProps["variant"];
710
728
  size?: ButtonProps["size"];
711
729
  fullWidth?: ButtonProps["fullWidth"];
730
+ compact?: boolean;
731
+ };
732
+
733
+ export declare type LanguagesOption = DropdownMenuOption & {
734
+ shortLabel?: string;
712
735
  };
713
736
 
714
737
  export declare const LeftPanel: ({ children, isOpen, hasHeader, }: PropsWithChildren<LeftPanelProps>) => JSX.Element;
@@ -861,7 +884,16 @@ export declare const locales: {
861
884
  };
862
885
  };
863
886
  };
887
+ laGaufre: {
888
+ label: string;
889
+ closeLabel: string;
890
+ loadingText: string;
891
+ newWindowLabelSuffix: string;
892
+ headerLabel: string;
893
+ };
864
894
  userMenu: {
895
+ term_of_service: string;
896
+ manage_account: string;
865
897
  open: string;
866
898
  close: string;
867
899
  accountSettings: string;
@@ -1015,12 +1047,21 @@ export declare const locales: {
1015
1047
  };
1016
1048
  };
1017
1049
  };
1050
+ laGaufre: {
1051
+ label: string;
1052
+ closeLabel: string;
1053
+ loadingText: string;
1054
+ newWindowLabelSuffix: string;
1055
+ headerLabel: string;
1056
+ };
1018
1057
  userMenu: {
1058
+ term_of_service: string;
1019
1059
  open: string;
1020
1060
  close: string;
1021
1061
  accountSettings: string;
1022
1062
  logout: string;
1023
1063
  dialogTitle: string;
1064
+ manage_account: string;
1024
1065
  };
1025
1066
  treeView: {
1026
1067
  viewMore: string;
@@ -1056,6 +1097,12 @@ export declare type OpenMap = {
1056
1097
  [id: string]: boolean;
1057
1098
  };
1058
1099
 
1100
+ declare type Organization = {
1101
+ name: string;
1102
+ type: string;
1103
+ siret: string;
1104
+ };
1105
+
1059
1106
  export declare type PaginatedChildrenResult<T> = {
1060
1107
  children?: TreeViewDataType<T>[];
1061
1108
  pagination?: BaseTreeViewData<T>["pagination"];
@@ -1145,6 +1192,19 @@ declare type SearchUserItemProps<UserType> = {
1145
1192
  user: UserData<UserType>;
1146
1193
  };
1147
1194
 
1195
+ export declare type Service = {
1196
+ name: string;
1197
+ url: string;
1198
+ maturity?: string;
1199
+ logo?: string;
1200
+ };
1201
+
1202
+ declare type ServicesResponse = {
1203
+ organization?: Organization;
1204
+ services: Service[];
1205
+ error?: unknown;
1206
+ };
1207
+
1148
1208
  export declare const ShareInvitationItem: <UserType, InvitationType>({ invitation, roles, updateRole, deleteInvitation, canUpdate, showMoreActionsButton, roleTopMessage, }: ShareInvitationItemProps<UserType, InvitationType>) => JSX.Element;
1149
1209
 
1150
1210
  export declare type ShareInvitationItemProps<UserType, InvitationType> = {
@@ -1461,7 +1521,15 @@ export declare const useResponsive: () => ResponsiveStates;
1461
1521
  * - `shouldCloseOnInteractOutside`: A function to call when the menu should be closed.
1462
1522
  * - `footerAction`: The child to render inside the footer.
1463
1523
  */
1464
- export declare const UserMenu: ({ user, settingsCTA, logout, isInitialOpen, shouldCloseOnInteractOutside, footerAction, }: UserMenuProps) => JSX.Element | null;
1524
+ export declare const UserMenu: ({ user, settingsCTA, logout, isInitialOpen, shouldCloseOnInteractOutside, termOfServiceUrl, footerAction, }: UserMenuProps) => JSX.Element | null;
1525
+
1526
+ export declare const UserMenuItem: ({ label, icon, onClick }: UserMenuItemProps) => JSX.Element;
1527
+
1528
+ declare type UserMenuItemProps = {
1529
+ label: string;
1530
+ icon: string;
1531
+ onClick?: () => void;
1532
+ };
1465
1533
 
1466
1534
  export declare type UserMenuProps = {
1467
1535
  user?: {
@@ -1470,6 +1538,7 @@ export declare type UserMenuProps = {
1470
1538
  } | null;
1471
1539
  settingsCTA?: string | (() => void);
1472
1540
  logout?: () => void;
1541
+ termOfServiceUrl?: string;
1473
1542
  isInitialOpen?: boolean;
1474
1543
  shouldCloseOnInteractOutside?: (element: Element) => boolean;
1475
1544
  footerAction?: ReactElement;