@gouvfr-lasuite/ui-kit 0.19.0 → 0.19.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
@@ -28,13 +28,21 @@ declare type AbstractSeparatorProps = {
28
28
  size?: string;
29
29
  };
30
30
 
31
+ /**
32
+ * Represents a user's access to a shared resource.
33
+ *
34
+ * @property is_explicit - When false, indicates inherited/implicit access that cannot be removed directly.
35
+ * @property can_delete - When false, prevents deletion of this access (e.g., last remaining access, current user).
36
+ */
31
37
  export declare type AccessData<UserType, T> = T & {
32
38
  id: string;
33
39
  role: string;
34
40
  user: UserData<UserType>;
41
+ is_explicit?: boolean;
42
+ can_delete?: boolean;
35
43
  };
36
44
 
37
- export declare const AccessRoleDropdown: ({ roles, onSelect, canUpdate, selectedRole, isOpen, onOpenChange, roleTopMessage, }: AccessRoleDropdownProps) => JSX.Element;
45
+ export declare const AccessRoleDropdown: ({ roles, onSelect, canUpdate, selectedRole, isOpen, onOpenChange, roleTopMessage, onDelete, }: AccessRoleDropdownProps) => JSX.Element;
38
46
 
39
47
  declare type AccessRoleDropdownProps = {
40
48
  selectedRole: string;
@@ -44,6 +52,7 @@ declare type AccessRoleDropdownProps = {
44
52
  isOpen?: boolean;
45
53
  onOpenChange?: (isOpen: boolean) => void;
46
54
  roleTopMessage?: DropdownMenuProps["topMessage"];
55
+ onDelete?: () => void;
47
56
  };
48
57
 
49
58
  export declare type AddShareUserListProps<UserType> = {
@@ -1142,10 +1151,18 @@ export declare const LaGaufre: () => JSX.Element;
1142
1151
 
1143
1152
  export declare const LaGaufreV2: MemoExoticComponent<({ apiUrl, data, ...props }: LaGaufreV2Props) => JSX.Element>;
1144
1153
 
1145
- export declare type LaGaufreV2Props = {
1146
- widgetPath: string;
1154
+ declare type LaGaufreV2API = {
1147
1155
  apiUrl: string;
1148
- data?: ServicesResponse;
1156
+ data?: never;
1157
+ };
1158
+
1159
+ declare type LaGaufreV2Data = {
1160
+ apiUrl?: never;
1161
+ data: ServicesResponse;
1162
+ };
1163
+
1164
+ export declare type LaGaufreV2Props = {
1165
+ widgetPath?: string;
1149
1166
  fontFamily?: string;
1150
1167
  background?: string;
1151
1168
  headerLogo?: string;
@@ -1158,7 +1175,7 @@ export declare type LaGaufreV2Props = {
1158
1175
  showMoreLimit?: number;
1159
1176
  viewMoreLabel?: string;
1160
1177
  viewLessLabel?: string;
1161
- };
1178
+ } & (LaGaufreV2API | LaGaufreV2Data);
1162
1179
 
1163
1180
  /**
1164
1181
  * A DropdownMenu specific to languages.
@@ -1605,7 +1622,7 @@ export { ModalSize }
1605
1622
 
1606
1623
  export { NodeRendererProps }
1607
1624
 
1608
- export declare const OnboardingModal: ({ isOpen, size, appName, mainTitle, steps, initialStep, footerLink, onSkip, onComplete, onClose, labels, }: OnboardingModalProps) => JSX.Element | null;
1625
+ export declare const OnboardingModal: ({ isOpen, size, appName, mainTitle, steps, initialStep, footerLink, hideContent, onSkip, onComplete, onClose, labels, }: OnboardingModalProps) => JSX.Element | null;
1609
1626
 
1610
1627
  export declare interface OnboardingModalProps {
1611
1628
  /** Whether the modal is open */
@@ -1636,6 +1653,8 @@ export declare interface OnboardingModalProps {
1636
1653
  onComplete: () => void;
1637
1654
  /** Callback when user clicks the close button */
1638
1655
  onClose: () => void;
1656
+ /** Hide the content/preview zone (text-only mode) */
1657
+ hideContent?: boolean;
1639
1658
  /** Custom labels for i18n */
1640
1659
  labels?: {
1641
1660
  skip?: string;
@@ -1655,7 +1674,7 @@ export declare interface OnboardingStep {
1655
1674
  /** Step description, visible only when the step is active */
1656
1675
  description?: string;
1657
1676
  /** Content displayed in the preview zone (image, video, component, etc.) */
1658
- content: ReactNode;
1677
+ content?: ReactNode;
1659
1678
  }
1660
1679
 
1661
1680
  export declare interface OnboardingStepItemProps {
@@ -1761,6 +1780,23 @@ export declare type QuickSearchProps = {
1761
1780
  children?: ReactNode;
1762
1781
  };
1763
1782
 
1783
+ export declare const ReleaseNoteModal: ({ steps, ...props }: ReleaseNoteModalProps) => JSX.Element;
1784
+
1785
+ export declare interface ReleaseNoteModalProps extends Omit<OnboardingModalProps, "hideContent" | "steps"> {
1786
+ steps: ReleaseNoteStep[];
1787
+ }
1788
+
1789
+ export declare interface ReleaseNoteStep {
1790
+ /** Icon displayed next to the step title */
1791
+ icon: ReactNode;
1792
+ /** Icon displayed when the step is active */
1793
+ activeIcon?: ReactNode;
1794
+ /** Step title */
1795
+ title: string;
1796
+ /** Step description, visible only when the step is active */
1797
+ description?: string;
1798
+ }
1799
+
1764
1800
  declare type ResponsiveStates = {
1765
1801
  isMobile: boolean;
1766
1802
  isTablet: boolean;
@@ -1786,7 +1822,7 @@ declare type ServicesResponse = {
1786
1822
  error?: unknown;
1787
1823
  };
1788
1824
 
1789
- export declare const ShareInvitationItem: <UserType, InvitationType>({ invitation, roles, updateRole, deleteInvitation, canUpdate, showMoreActionsButton, roleTopMessage, }: ShareInvitationItemProps<UserType, InvitationType>) => JSX.Element;
1825
+ export declare const ShareInvitationItem: <UserType, InvitationType>({ invitation, roles, updateRole, deleteInvitation, canUpdate, roleTopMessage, }: ShareInvitationItemProps<UserType, InvitationType>) => JSX.Element;
1790
1826
 
1791
1827
  export declare type ShareInvitationItemProps<UserType, InvitationType> = {
1792
1828
  invitation: InvitationData<UserType, InvitationType>;
@@ -1795,7 +1831,6 @@ export declare type ShareInvitationItemProps<UserType, InvitationType> = {
1795
1831
  deleteInvitation?: (invitation: InvitationData<UserType, InvitationType>) => void;
1796
1832
  canUpdate?: boolean;
1797
1833
  roleTopMessage?: string;
1798
- showMoreActionsButton?: boolean;
1799
1834
  };
1800
1835
 
1801
1836
  export declare const ShareMemberItem: <UserType, AccessType>({ accessData, accessRoleKey, roles, updateRole, deleteAccess, canUpdate, roleTopMessage, }: ShareMemberItemProps<UserType, AccessType>) => JSX.Element;