@redacto.io/consent-sdk-react-native 3.1.0 → 4.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.
@@ -1,7 +1,9 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import React, { ReactNode } from 'react';
3
3
  import * as _tanstack_react_query from '@tanstack/react-query';
4
- import { StyleProp, ViewStyle, TextStyle, KeyboardTypeOptions } from 'react-native';
4
+ import * as react_native from 'react-native';
5
+ import { StyleProp, ViewStyle, TextStyle, KeyboardTypeOptions, DimensionValue, Animated } from 'react-native';
6
+ import * as lucide_react_native from 'lucide-react-native';
5
7
 
6
8
  type Workspace = {
7
9
  uuid: string;
@@ -24,6 +26,80 @@ type OrganizationDetail = {
24
26
  activated: boolean;
25
27
  allowed_domains: string[];
26
28
  };
29
+ type OrgBrandingTheme = {
30
+ primary: string;
31
+ secondary: string;
32
+ primary_contrast: string;
33
+ link: string;
34
+ surface: string;
35
+ text: string;
36
+ text_muted: string;
37
+ border: string;
38
+ success: string;
39
+ warning: string;
40
+ danger: string;
41
+ };
42
+ type OrgBrandingDetail = {
43
+ logo_url: string | null;
44
+ icon_url: string | null;
45
+ brand_name: string;
46
+ theme: OrgBrandingTheme;
47
+ hide_platform_branding: boolean;
48
+ };
49
+ type NotificationType = 'guardian_verification_request' | 'consent_expiry_warning' | 'new_consent_notice' | 'consent_withdrawal_confirmation' | 'data_request_status_update' | 'case_message' | 'grievance_status_update' | 'consent_regrant_prompt';
50
+ type NotificationCategory = 'consent' | 'request' | 'system';
51
+ type NotificationCTA = {
52
+ label: string;
53
+ style: 'primary' | 'secondary' | 'danger';
54
+ action_type: 'link' | 'acknowledge';
55
+ url?: string;
56
+ };
57
+ type Notification = {
58
+ uuid: string;
59
+ notification_type: NotificationType;
60
+ category: NotificationCategory;
61
+ title: string;
62
+ description: string;
63
+ is_read: boolean;
64
+ is_acknowledged: boolean;
65
+ source_type: string;
66
+ source_uuid: string | null;
67
+ request_type: string;
68
+ request_type_display?: string | null;
69
+ status_label: string;
70
+ status_label_display?: string | null;
71
+ ctas: NotificationCTA[];
72
+ created_at: string;
73
+ };
74
+ type NotificationSummary = {
75
+ total: number;
76
+ unread: number;
77
+ action_needed: number;
78
+ acknowledged: number;
79
+ };
80
+ type NotificationListResponse = {
81
+ data: Notification[];
82
+ total: number;
83
+ skip: number;
84
+ limit: number;
85
+ summary: NotificationSummary | null;
86
+ };
87
+ type UnreadCountResponse = {
88
+ count: number;
89
+ };
90
+ type NotificationActionResponse = {
91
+ message: string;
92
+ };
93
+ type NotificationQueryParams = {
94
+ category?: NotificationCategory;
95
+ notification_type?: NotificationType;
96
+ is_read?: boolean;
97
+ skip?: number;
98
+ limit?: number;
99
+ include_summary?: boolean;
100
+ language?: string;
101
+ };
102
+ type FilterTab = 'all' | 'consent' | 'request' | 'system';
27
103
  type DataElement = {
28
104
  uuid: string;
29
105
  name: string;
@@ -54,12 +130,23 @@ type GrievanceOptions = {
54
130
  value: GrievanceValue;
55
131
  label: string;
56
132
  };
133
+ /** Product-grouped purposes for the data principal's own consents (TECH-3712). */
134
+ type FormProductGroup = {
135
+ product_uuid: string;
136
+ product_name: string;
137
+ product_description: string | null;
138
+ nominator: NominatorInfo | null;
139
+ purposes: Purpose[];
140
+ };
57
141
  type FormData$1 = {
58
142
  uuid: string;
59
143
  name: string;
60
144
  contact: string;
61
145
  grievance_options: GrievanceOptions[];
146
+ /** Legacy flat list — retained for backwards compatibility. */
62
147
  purposes: RawPurposeWrapper[];
148
+ direct_groups?: FormProductGroup[];
149
+ nominated_groups?: FormProductGroup[];
63
150
  };
64
151
  declare enum RequestTypeEnum {
65
152
  ACCESS = "ACCESS",
@@ -103,6 +190,12 @@ type UserDataRequest = {
103
190
  };
104
191
  time_period: number | null;
105
192
  requestor_note: string;
193
+ /** ERASURE-only: also revoke the data principal's consent on fulfilment. */
194
+ revoke_consent_on_fulfilment?: boolean;
195
+ /** Product anchor for ACCESS / ERASURE / CORRECTION requests. */
196
+ product_uuid?: string;
197
+ /** Set when acting on behalf of a nominator for a nominated product group. */
198
+ data_principal_uuid?: string;
106
199
  };
107
200
  type CreateCaseResponse = {
108
201
  code: number;
@@ -327,31 +420,40 @@ type CaseDetailsTab = Readonly<{
327
420
  label: string;
328
421
  }>;
329
422
 
330
- type InternalPage = 'consent-manager' | 'form' | 'activity' | 'receipts' | 'case-details';
423
+ type InternalPage = 'home' | 'consent-manager' | 'form' | 'activity' | 'receipts' | 'case-details' | 'notifications';
331
424
  interface NavigationContextType {
332
425
  currentPage: InternalPage;
333
426
  navigateTo: (page: InternalPage) => void;
427
+ navigateBack: () => void;
334
428
  selectedCase: CaseRequest | null;
335
429
  setSelectedCase: (c: CaseRequest | null) => void;
336
430
  pendingCaseUuid: string | null;
337
431
  }
338
- declare function NavigationProvider({ children, initialPage }: {
432
+ declare function NavigationProvider({ children, initialPage, initialPendingCaseUuid, }: {
339
433
  children: ReactNode;
340
434
  initialPage?: InternalPage;
435
+ /** Deep-link target: resolve & open this case on first load (used with initialPage='case-details'). */
436
+ initialPendingCaseUuid?: string | null;
341
437
  }): react_jsx_runtime.JSX.Element;
342
438
  declare function useInternalNavigation(): NavigationContextType;
343
439
 
344
440
  interface RedactoPrivacyCenterProps {
345
441
  baseUrl: string;
346
442
  slug: string;
443
+ /**
444
+ * @deprecated The Privacy Center now themes itself from per-org branding.
445
+ * Accepted for backwards compatibility but ignored.
446
+ */
347
447
  theme?: 'light' | 'dark';
348
448
  accessToken: string;
349
449
  refreshToken: string;
350
450
  onError: (error: Error) => boolean;
351
451
  initialPage?: InternalPage;
452
+ /** Optional deep-link: open a specific case (use with initialPage='case-details'). */
453
+ initialCaseUuid?: string;
352
454
  onBack?: 'back' | 'signout';
353
455
  }
354
- declare function RedactoPrivacyCenter({ baseUrl, slug: _slug, theme, accessToken, refreshToken, onError, initialPage, onBack, }: RedactoPrivacyCenterProps): react_jsx_runtime.JSX.Element;
456
+ declare function RedactoPrivacyCenter({ baseUrl, slug, theme: _theme, accessToken, refreshToken, onError, initialPage, initialCaseUuid, onBack, }: RedactoPrivacyCenterProps): react_jsx_runtime.JSX.Element;
355
457
 
356
458
  declare function ConsentManager(): react_jsx_runtime.JSX.Element;
357
459
 
@@ -376,14 +478,48 @@ interface SideMenuProps {
376
478
  }
377
479
  declare function SideMenu({ onBack }?: SideMenuProps): react_jsx_runtime.JSX.Element;
378
480
 
481
+ type PageChromeMode = 'primary' | 'detail';
482
+ declare const DETAIL_PAGES: readonly ["case-details", "notifications"];
483
+ declare function getPageChromeMode(page: InternalPage): PageChromeMode;
484
+ declare function getListBottomInset(opts: {
485
+ /** Measured bottom safe-area inset. */
486
+ bottomInset: number;
487
+ hasTabBar: boolean;
488
+ hasFooter: boolean;
489
+ /** Extra space for pinned composers (e.g. Messages tab). */
490
+ extra?: number;
491
+ }): number;
492
+ declare function usePrivacyCenterInsets(opts?: {
493
+ hasTabBar?: boolean;
494
+ hasFooter?: boolean;
495
+ extra?: number;
496
+ }): {
497
+ listBottom: number;
498
+ bottomSafe: number;
499
+ keyboardOffset: number;
500
+ };
501
+
379
502
  interface NavbarProps {
503
+ mode?: PageChromeMode;
380
504
  onBack?: 'back' | 'signout';
381
505
  }
382
- declare function Navbar({ onBack }: NavbarProps): react_jsx_runtime.JSX.Element;
506
+ declare function Navbar({ mode, onBack }: NavbarProps): react_jsx_runtime.JSX.Element;
383
507
 
384
- declare function Footer(): react_jsx_runtime.JSX.Element;
508
+ type FooterProps = {
509
+ /** Tighter vertical padding for embedding inside the menu sheet. */
510
+ inline?: boolean;
511
+ };
512
+ /**
513
+ * "Powered by Redacto" platform attribution. Hidden when the org has opted out
514
+ * via branding.hide_platform_branding. Renders the Redacto logo (raster) next to
515
+ * the localized "Powered by" label, mirroring the web Privacy Center footer.
516
+ */
517
+ declare function Footer({ inline }: FooterProps): react_jsx_runtime.JSX.Element | null;
385
518
 
386
- declare function BottomTabBar(): react_jsx_runtime.JSX.Element;
519
+ interface BottomTabBarProps {
520
+ showFooter?: boolean;
521
+ }
522
+ declare function BottomTabBar({ showFooter }: BottomTabBarProps): react_jsx_runtime.JSX.Element;
387
523
 
388
524
  /**
389
525
  * Options for apiFetch function
@@ -462,6 +598,18 @@ declare function createConsentClient(baseUrl: string): {
462
598
  search?: string;
463
599
  language?: string;
464
600
  }, authToken?: string, options?: Omit<ApiFetchOptions, "getAuthToken">): Promise<unknown>;
601
+ /**
602
+ * Get purposes for a single product group (privacy center) — used to lazily
603
+ * "load more" purposes within an expanded product in the Consent Manager.
604
+ */
605
+ getGroupPurposes(baseRequest: BaseRequest, productUuid: string, params: {
606
+ offset?: number;
607
+ limit?: number;
608
+ status?: string;
609
+ search?: string;
610
+ language?: string;
611
+ nominator_uuid?: string;
612
+ }, authToken?: string, options?: Omit<ApiFetchOptions, "getAuthToken">): Promise<unknown>;
465
613
  /**
466
614
  * Manage consent (privacy center) - revoke, regrant, or renew
467
615
  */
@@ -510,6 +658,30 @@ declare function createConsentClient(baseUrl: string): {
510
658
  * Submit a document for a document request (privacy center)
511
659
  */
512
660
  submitDocumentForRequest(baseRequest: BaseRequest, caseUuid: string, requestEventUuid: string, documentUuid: string, body: string, authToken?: string, options?: Omit<ApiFetchOptions, "getAuthToken">): Promise<unknown>;
661
+ /**
662
+ * List notifications (paginated, with filters)
663
+ */
664
+ getNotifications(baseRequest: BaseRequest, params?: NotificationQueryParams, authToken?: string): Promise<NotificationListResponse>;
665
+ /**
666
+ * Get notification summary (aggregated counts only)
667
+ */
668
+ getNotificationSummary(baseRequest: BaseRequest, authToken?: string): Promise<NotificationSummary>;
669
+ /**
670
+ * Get unread notification count (lightweight, for the header badge)
671
+ */
672
+ getUnreadCount(baseRequest: BaseRequest, authToken?: string): Promise<UnreadCountResponse>;
673
+ /**
674
+ * Mark a single notification as read
675
+ */
676
+ markNotificationRead(baseRequest: BaseRequest, notificationUuid: string, authToken?: string): Promise<NotificationActionResponse>;
677
+ /**
678
+ * Mark all notifications as read
679
+ */
680
+ markAllNotificationsRead(baseRequest: BaseRequest, authToken?: string): Promise<NotificationActionResponse>;
681
+ /**
682
+ * Acknowledge a notification (sets is_read and is_acknowledged to true)
683
+ */
684
+ acknowledgeNotification(baseRequest: BaseRequest, notificationUuid: string, authToken?: string): Promise<NotificationActionResponse>;
513
685
  };
514
686
 
515
687
  interface BaseUrlContextValue {
@@ -614,14 +786,10 @@ interface AuthProviderProps {
614
786
  declare function AuthProvider({ children, accessToken: initialAccessToken, refreshToken: initialRefreshToken, onError }: AuthProviderProps): react_jsx_runtime.JSX.Element;
615
787
  declare function useAuth(): AuthContextType;
616
788
 
617
- type Theme = 'light' | 'dark';
618
- interface ThemeContextType {
619
- theme: Theme;
620
- setTheme: (theme: Theme) => void;
621
- colors: ThemeColors;
622
- }
623
789
  interface ThemeColors {
624
790
  background: string;
791
+ /** Page canvas. Flat mode keeps this equal to background. */
792
+ canvas: string;
625
793
  surface: string;
626
794
  text: string;
627
795
  textSecondary: string;
@@ -631,20 +799,148 @@ interface ThemeColors {
631
799
  error: string;
632
800
  success: string;
633
801
  warning: string;
802
+ /** Hyperlink / accent text color. Falls back to primary. */
803
+ link: string;
804
+ /** Secondary brand color. Falls back to primary. */
805
+ secondary: string;
806
+ /** Quiet gray app background that cards sit on. */
807
+ canvasSubtle: string;
808
+ /** Secondary surface fill — inset rows, pressed states, skeletons. */
809
+ surfaceAlt: string;
810
+ /** Separator lighter than `border` (used inside cards). */
811
+ hairline: string;
812
+ /** Soft tint of `primary` for icon tiles / active pills. */
813
+ primarySoft: string;
814
+ /** Foreground (icon/label) color used on `primarySoft`. */
815
+ primaryOn: string;
816
+ /** Informational accent (badges / info states). */
817
+ info: string;
818
+ /** Soft status tints for badges, empty states, and icon tiles. */
819
+ successSoft: string;
820
+ warningSoft: string;
821
+ errorSoft: string;
822
+ infoSoft: string;
823
+ /** Scrim behind modals / bottom sheets. */
824
+ overlay: string;
634
825
  }
635
- declare function ThemeProvider({ children, defaultTheme }: {
826
+ type BrandingMeta = {
827
+ logo_url: string | null;
828
+ icon_url: string | null;
829
+ brand_name: string;
830
+ hide_platform_branding: boolean;
831
+ };
832
+ interface ThemeContextType {
833
+ colors: ThemeColors;
834
+ /** Org branding metadata (logo, brand name). Null until/unless it resolves. */
835
+ branding: BrandingMeta | null;
836
+ /** True while org branding is being fetched (used to gate first paint). */
837
+ isLoading: boolean;
838
+ }
839
+ declare function ThemeProvider({ children, slug, baseUrl, }: {
636
840
  children: ReactNode;
637
- defaultTheme?: Theme;
841
+ slug?: string;
842
+ baseUrl?: string;
638
843
  }): react_jsx_runtime.JSX.Element;
639
844
  declare function useTheme(): ThemeContextType;
640
845
 
641
- type PCButtonVariant = 'primary' | 'outline' | 'ghost';
846
+ /**
847
+ * Curated icon registry. The whole Privacy Center draws icons through this one
848
+ * component so sizing, stroke weight and color stay consistent and the icon
849
+ * dependency (lucide-react-native) is encapsulated behind a stable public API.
850
+ *
851
+ * Keys are concrete (lucide-style) names; feature components choose which icon
852
+ * maps to which concept.
853
+ */
854
+ declare const REGISTRY: {
855
+ activity: React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
856
+ 'arrow-left': React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
857
+ ban: React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
858
+ 'badge-check': React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
859
+ bell: React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
860
+ 'bell-dot': React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
861
+ 'bell-ring': React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
862
+ 'bookmark-check': React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
863
+ calendar: React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
864
+ check: React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
865
+ 'check-check': React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
866
+ 'chevron-down': React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
867
+ 'chevron-left': React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
868
+ 'chevron-right': React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
869
+ 'chevron-up': React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
870
+ 'circle-alert': React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
871
+ 'circle-check': React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
872
+ 'circle-minus': React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
873
+ 'circle-x': React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
874
+ clock: React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
875
+ 'cloud-upload': React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
876
+ download: React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
877
+ 'ellipsis-vertical': React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
878
+ 'external-link': React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
879
+ eye: React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
880
+ 'eye-off': React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
881
+ file: React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
882
+ 'file-check': React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
883
+ 'file-pen': React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
884
+ 'file-text': React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
885
+ 'file-x': React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
886
+ globe: React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
887
+ history: React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
888
+ inbox: React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
889
+ languages: React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
890
+ 'list-filter': React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
891
+ lock: React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
892
+ 'log-out': React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
893
+ menu: React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
894
+ 'message-circle-warning': React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
895
+ 'message-square-text': React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
896
+ 'messages-square': React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
897
+ mic: React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
898
+ paperclip: React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
899
+ pencil: React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
900
+ plus: React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
901
+ 'receipt-text': React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
902
+ 'refresh-cw': React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
903
+ search: React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
904
+ send: React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
905
+ settings: React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
906
+ shield: React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
907
+ 'shield-check': React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
908
+ 'shield-x': React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
909
+ 'sliders-horizontal': React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
910
+ 'square-pen': React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
911
+ 'trash-2': React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
912
+ 'triangle-alert': React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
913
+ upload: React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
914
+ user: React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
915
+ 'user-round': React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
916
+ users: React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
917
+ x: React.ForwardRefExoticComponent<lucide_react_native.LucideProps & React.RefAttributes<SVGSVGElement>>;
918
+ };
919
+ type IconName = keyof typeof REGISTRY;
920
+ type IconProps = {
921
+ name: IconName;
922
+ /** Defaults to `iconSizes.md` (20). */
923
+ size?: number;
924
+ /** Defaults to the theme's primary text color. */
925
+ color?: string;
926
+ /** Lucide stroke weight. Defaults to 1.85 for a clean, modern line. */
927
+ strokeWidth?: number;
928
+ };
929
+ declare const Icon: React.FC<IconProps>;
930
+
931
+ type PCButtonVariant = 'primary' | 'outline' | 'ghost' | 'danger';
932
+ type PCButtonSize = 'sm' | 'md' | 'lg';
642
933
  type PCButtonProps = {
643
934
  onPress: () => void;
644
935
  title: string;
645
936
  variant?: PCButtonVariant;
937
+ size?: PCButtonSize;
646
938
  disabled?: boolean;
647
939
  loading?: boolean;
940
+ leftIcon?: IconName;
941
+ rightIcon?: IconName;
942
+ /** Stretch to fill the parent width. */
943
+ fullWidth?: boolean;
648
944
  style?: StyleProp<ViewStyle>;
649
945
  textStyle?: StyleProp<TextStyle>;
650
946
  };
@@ -660,6 +956,8 @@ type PCInputProps = {
660
956
  keyboardType?: KeyboardTypeOptions;
661
957
  secureTextEntry?: boolean;
662
958
  editable?: boolean;
959
+ /** Optional leading icon inside the field. */
960
+ leftIcon?: IconName;
663
961
  };
664
962
  declare const PCInput: React.FC<PCInputProps>;
665
963
 
@@ -706,7 +1004,12 @@ declare const PCLoader: React.FC<PCLoaderProps>;
706
1004
  type PCEmptyProps = {
707
1005
  title: string;
708
1006
  description?: string;
1007
+ /** Preferred: a named icon rendered in a neutral tile. */
1008
+ iconName?: IconName;
1009
+ /** Escape hatch: a custom icon node (kept for backward compatibility). */
709
1010
  icon?: React.ReactNode;
1011
+ /** Optional action (e.g. a PCButton). */
1012
+ action?: React.ReactNode;
710
1013
  };
711
1014
  declare const PCEmpty: React.FC<PCEmptyProps>;
712
1015
 
@@ -714,7 +1017,362 @@ type PCBadgeStatus = 'success' | 'warning' | 'error' | 'info' | 'pending' | 'sec
714
1017
  type PCBadgeProps = {
715
1018
  status: PCBadgeStatus;
716
1019
  label: string;
1020
+ icon?: IconName;
1021
+ /** Show a small leading status dot (in the badge's foreground color). */
1022
+ dot?: boolean;
717
1023
  };
718
1024
  declare const PCBadge: React.FC<PCBadgeProps>;
719
1025
 
720
- export { ActivitiesList, type Activity, type ActivityDetail, type ApiFetchOptions, type ApiResponse, type AuthContext, AuthProvider, type BaseRequest, BaseUrlProvider, BottomTabBar, CaseDetailsPage, type CaseDetailsTab, CaseHistory, type CaseHistoryDetail, type CaseMessage, type CaseRequest, type CaseStatusVariant, type ConsentAction, type ConsentDataElement, type ConsentHistoryStatusSummary, ConsentManager, ConsentStatusEnum, type CreateCaseResponse, type DataElement, type DocumentRequestMetadata, type DocumentRequestStatus, Footer, Form, type FormData$1 as FormData, FormPage, type GrievanceTypeElement, GrievanceTypeEnum, type InternalPage, type ManageConsentParams, type MessageDocument, type MessageType, Navbar, NavigationProvider, type NominatedPurposesGroup, type NominationData, type NominatorInfo, type OrganizationDetail, type OtpResponse, type OtpVerificationResponse, PCBadge, PCButton, PCCheckbox, PCEmpty, PCInput, PCLoader, PCModal, PCSelect, type Pagination, type PendingUpload, type ProductConsentHistoryGroup, type Purpose, RedactoPrivacyCenter, RequestTypeEnum, SideMenu, type TabId, ThemeProvider, type TokenExchangeResponse, type UpdateCorrectionDataItem, type UpdatePurpose, type UploadDocumentResponse, type UserConsent, type UserConsentDetail, type UserDataRequest, type Workspace, compareEmails, createCaseRequest, createConsentClient, createOtpServer as createOtp, decodeJwtToken, ensureValidToken, exchangeTokenServer as exchangeToken, fetchActivities, fetchCaseHistory, fetchProducts, fetchUserConsents, formatActivityType, getActivityTypeStatus, getCaseMessages, getFormData, isJwtExpired, manageConsent, sendCaseMessage, signOutPrivacyCenter, submitDocumentForRequest, uploadCaseDocument, useAuth, useBaseUrl, useCaseHistory, useCaseMessages, useInternalNavigation, useTheme, verifyOtpServer as verifyOtp };
1026
+ type PCAvatarProps = {
1027
+ name?: string | null;
1028
+ imageUrl?: string | null;
1029
+ size?: number;
1030
+ style?: StyleProp<ViewStyle>;
1031
+ };
1032
+ declare const PCAvatar: React.FC<PCAvatarProps>;
1033
+
1034
+ type BottomSheetProps = {
1035
+ visible: boolean;
1036
+ onClose: () => void;
1037
+ title?: string;
1038
+ children: React.ReactNode;
1039
+ };
1040
+ /**
1041
+ * Native-mobile bottom sheet built on RN core (`Modal` + `Animated` +
1042
+ * `PanResponder`) — no gesture-handler/reanimated dependency. Slides up from
1043
+ * the bottom, dims the backdrop, and supports swipe-down + backdrop-tap +
1044
+ * close-button dismissal.
1045
+ */
1046
+ declare const BottomSheet: React.FC<BottomSheetProps>;
1047
+
1048
+ type PCDividerProps = {
1049
+ inset?: boolean;
1050
+ style?: StyleProp<ViewStyle>;
1051
+ };
1052
+ declare const PCDivider: React.FC<PCDividerProps>;
1053
+
1054
+ type IconTileTone = 'primary' | 'neutral' | 'success' | 'warning' | 'danger' | 'info';
1055
+ type IconTileSize = 'sm' | 'md' | 'lg';
1056
+ type IconTileProps = {
1057
+ name: IconName;
1058
+ /** Semantic tint. Ignored when an explicit `color` is given. */
1059
+ tone?: IconTileTone;
1060
+ size?: IconTileSize;
1061
+ /** Explicit accent color (e.g. notification category color); overrides `tone`. */
1062
+ color?: string;
1063
+ style?: StyleProp<ViewStyle>;
1064
+ };
1065
+ /**
1066
+ * The core Soft Neutral motif: a softly tinted rounded square holding a single
1067
+ * icon. Anchors list rows, section headers, stat cards and notifications.
1068
+ */
1069
+ declare const IconTile: React.FC<IconTileProps>;
1070
+
1071
+ type PCPageTitleProps = {
1072
+ title: string;
1073
+ subtitle?: string;
1074
+ /** Small uppercase eyebrow above the title. */
1075
+ overline?: string;
1076
+ /** Optional leading icon (rendered in a tinted tile). */
1077
+ icon?: IconName;
1078
+ tone?: IconTileTone;
1079
+ trailing?: React.ReactNode;
1080
+ /** `large` renders an iOS-style big screen title (no icon tile, no overline). */
1081
+ variant?: 'default' | 'large';
1082
+ style?: StyleProp<ViewStyle>;
1083
+ };
1084
+ /**
1085
+ * Screen-level header. Thin wrapper over SectionHeader that adds the standard
1086
+ * top/bottom spacing. Prefer passing `icon`/`overline` for the icon-led look, or
1087
+ * `variant="large"` for the clean iOS large-title look.
1088
+ */
1089
+ declare const PCPageTitle: React.FC<PCPageTitleProps>;
1090
+
1091
+ type PCListRowProps = {
1092
+ title: string;
1093
+ subtitle?: string;
1094
+ onPress?: () => void;
1095
+ /** Leading content (typically an <IconTile />). */
1096
+ leading?: React.ReactNode;
1097
+ trailing?: React.ReactNode;
1098
+ showChevron?: boolean;
1099
+ style?: StyleProp<ViewStyle>;
1100
+ };
1101
+ declare const PCListRow: React.FC<PCListRowProps>;
1102
+
1103
+ type PCListSectionProps = {
1104
+ title?: string;
1105
+ children: React.ReactNode;
1106
+ style?: StyleProp<ViewStyle>;
1107
+ };
1108
+ declare const PCListSection: React.FC<PCListSectionProps>;
1109
+
1110
+ type SectionHeaderProps = {
1111
+ title: string;
1112
+ /** Small uppercase eyebrow shown above the title (replaces oversized page titles). */
1113
+ overline?: string;
1114
+ subtitle?: string;
1115
+ /** Optional leading icon rendered in a tinted tile. */
1116
+ icon?: IconName;
1117
+ tone?: IconTileTone;
1118
+ /** Right-aligned content (count, action, filter button). */
1119
+ trailing?: React.ReactNode;
1120
+ /**
1121
+ * `large` renders an iOS-style big screen title (no icon tile, no overline).
1122
+ * `default` keeps the compact icon-led header.
1123
+ */
1124
+ variant?: 'default' | 'large';
1125
+ style?: StyleProp<ViewStyle>;
1126
+ };
1127
+ /**
1128
+ * Icon-led header used at the top of screens and card groups. Pairs a small
1129
+ * uppercase overline with a compact title (and optional icon tile) instead of a
1130
+ * large text heading.
1131
+ */
1132
+ declare const SectionHeader: React.FC<SectionHeaderProps>;
1133
+
1134
+ type SkeletonProps = {
1135
+ width?: DimensionValue;
1136
+ height?: number;
1137
+ radius?: number;
1138
+ style?: StyleProp<ViewStyle>;
1139
+ };
1140
+ /** A single shimmering placeholder block. Compose several for list skeletons. */
1141
+ declare const Skeleton: React.FC<SkeletonProps>;
1142
+ /** Convenience: a card-shaped skeleton row (icon tile + two text lines). */
1143
+ declare const SkeletonRow: React.FC<{
1144
+ style?: StyleProp<ViewStyle>;
1145
+ }>;
1146
+
1147
+ type StatPillProps = {
1148
+ label: string;
1149
+ value: string | number;
1150
+ tone?: IconTileTone;
1151
+ icon?: IconName;
1152
+ onPress?: () => void;
1153
+ /** Highlights the pill (e.g. the active filter). */
1154
+ active?: boolean;
1155
+ style?: StyleProp<ViewStyle>;
1156
+ };
1157
+ /** Compact metric chip used in the notifications stat row and the home hub. */
1158
+ declare const StatPill: React.FC<StatPillProps>;
1159
+
1160
+ type PressScaleOptions = {
1161
+ /** Target scale while pressed. Default 0.97. */
1162
+ scale?: number;
1163
+ /** Optional target opacity while pressed (omit to keep opacity at 1). */
1164
+ opacity?: number;
1165
+ disabled?: boolean;
1166
+ };
1167
+ /**
1168
+ * Reusable press micro-interaction: a subtle spring scale (and optional fade)
1169
+ * on press-in/out. Implementation is intentionally hidden behind this hook so a
1170
+ * future swap to Reanimated wouldn't touch any call site.
1171
+ *
1172
+ * Spread the returned `animatedStyle` onto an `Animated.View` and wire
1173
+ * `onPressIn`/`onPressOut` to the Pressable.
1174
+ */
1175
+ declare function usePressScale(options?: PressScaleOptions): {
1176
+ animatedStyle: {
1177
+ opacity: Animated.Value;
1178
+ transform: {
1179
+ scale: Animated.Value;
1180
+ }[];
1181
+ } | {
1182
+ transform: {
1183
+ scale: Animated.Value;
1184
+ }[];
1185
+ opacity?: undefined;
1186
+ };
1187
+ onPressIn: () => void;
1188
+ onPressOut: () => void;
1189
+ };
1190
+
1191
+ type FadeInOptions = {
1192
+ /** Delay before the entrance starts (ms). Use index * step for staggered lists. */
1193
+ delay?: number;
1194
+ /** Initial downward offset that eases up to 0. Default 8. */
1195
+ translateY?: number;
1196
+ duration?: number;
1197
+ };
1198
+ /**
1199
+ * Subtle entrance: fade + small upward translate. Spread `animatedStyle` onto an
1200
+ * `Animated.View`. Cheap (native-driven opacity/transform) and safe inside lists
1201
+ * as long as it lives in a memoized row.
1202
+ */
1203
+ declare function useFadeIn(options?: FadeInOptions): {
1204
+ animatedStyle: {
1205
+ opacity: Animated.Value;
1206
+ transform: {
1207
+ translateY: Animated.AnimatedInterpolation<string | number>;
1208
+ }[];
1209
+ };
1210
+ };
1211
+
1212
+ /**
1213
+ * Drives a horizontally sliding indicator/pill for segmented controls and the
1214
+ * bottom tab bar. Returns an `Animated.Value` for `translateX`; multiply the
1215
+ * segment width by the active index outside and pass it in.
1216
+ */
1217
+ declare function useAnimatedTabIndicator(activeIndex: number, segmentWidth: number): {
1218
+ translateX: Animated.Value;
1219
+ };
1220
+
1221
+ type LayoutAnimationPreset = 'expandCollapse' | 'listReorder';
1222
+ /**
1223
+ * Animate the next layout pass (expand/collapse rows, list insert/remove).
1224
+ * Call immediately before the `setState` that changes layout.
1225
+ */
1226
+ declare function animateNextLayout(preset?: LayoutAnimationPreset): void;
1227
+
1228
+ declare const spacing: {
1229
+ readonly xs: 4;
1230
+ readonly sm: 8;
1231
+ readonly md: 12;
1232
+ readonly lg: 16;
1233
+ readonly xl: 24;
1234
+ readonly xxl: 32;
1235
+ readonly xxxl: 40;
1236
+ readonly huge: 56;
1237
+ };
1238
+ declare const section: {
1239
+ readonly sm: 24;
1240
+ readonly md: 32;
1241
+ readonly lg: 40;
1242
+ readonly xl: 56;
1243
+ };
1244
+ declare const listGap: {
1245
+ readonly item: 16;
1246
+ readonly section: 24;
1247
+ };
1248
+ declare const divider: {
1249
+ readonly hairline: number;
1250
+ readonly inset: 16;
1251
+ };
1252
+ declare const radii: {
1253
+ readonly xs: 4;
1254
+ readonly sm: 6;
1255
+ readonly md: 8;
1256
+ readonly lg: 12;
1257
+ readonly xl: 16;
1258
+ readonly xxl: 20;
1259
+ readonly pill: 9999;
1260
+ };
1261
+ declare const typography: {
1262
+ /** iOS-style large screen title. Big, bold, tight tracking. */
1263
+ readonly largeTitle: {
1264
+ readonly fontSize: 30;
1265
+ readonly fontWeight: "700";
1266
+ readonly lineHeight: 36;
1267
+ readonly letterSpacing: -0.6;
1268
+ };
1269
+ readonly display: {
1270
+ readonly fontSize: 28;
1271
+ readonly fontWeight: "700";
1272
+ readonly lineHeight: 36;
1273
+ readonly letterSpacing: -0.4;
1274
+ };
1275
+ readonly title: {
1276
+ readonly fontSize: 20;
1277
+ readonly fontWeight: "700";
1278
+ readonly lineHeight: 27;
1279
+ readonly letterSpacing: -0.3;
1280
+ };
1281
+ readonly heading: {
1282
+ readonly fontSize: 16;
1283
+ readonly fontWeight: "600";
1284
+ readonly lineHeight: 22;
1285
+ readonly letterSpacing: -0.2;
1286
+ };
1287
+ readonly subtitle: {
1288
+ readonly fontSize: 14;
1289
+ readonly fontWeight: "400";
1290
+ readonly lineHeight: 20;
1291
+ };
1292
+ readonly body: {
1293
+ readonly fontSize: 15;
1294
+ readonly fontWeight: "400";
1295
+ readonly lineHeight: 22;
1296
+ };
1297
+ readonly label: {
1298
+ readonly fontSize: 13;
1299
+ readonly fontWeight: "600";
1300
+ readonly lineHeight: 18;
1301
+ readonly letterSpacing: -0.1;
1302
+ };
1303
+ readonly caption: {
1304
+ readonly fontSize: 13;
1305
+ readonly fontWeight: "400";
1306
+ readonly lineHeight: 18;
1307
+ };
1308
+ readonly micro: {
1309
+ readonly fontSize: 11;
1310
+ readonly fontWeight: "500";
1311
+ readonly lineHeight: 14;
1312
+ readonly letterSpacing: 0.2;
1313
+ };
1314
+ readonly tabLabel: {
1315
+ readonly fontSize: 11;
1316
+ readonly fontWeight: "600";
1317
+ readonly lineHeight: 14;
1318
+ readonly letterSpacing: 0.1;
1319
+ };
1320
+ /** Small uppercase eyebrow that replaces big page titles. */
1321
+ readonly overline: {
1322
+ readonly fontSize: 11;
1323
+ readonly fontWeight: "700";
1324
+ readonly lineHeight: 14;
1325
+ readonly letterSpacing: 0.8;
1326
+ readonly textTransform: "uppercase";
1327
+ };
1328
+ };
1329
+ /** Tabular figures for stats/counts so numbers don't jitter. */
1330
+ declare const numericText: {
1331
+ fontVariant: TextStyle['fontVariant'];
1332
+ };
1333
+ declare const motion: {
1334
+ readonly fast: 140;
1335
+ readonly base: 220;
1336
+ readonly slow: 320;
1337
+ /** Shared easing curves (Material-ish). Use with Animated.timing({ easing }). */
1338
+ readonly easing: {
1339
+ readonly standard: react_native.EasingFunction;
1340
+ readonly decelerate: react_native.EasingFunction;
1341
+ readonly accelerate: react_native.EasingFunction;
1342
+ readonly emphasized: react_native.EasingFunction;
1343
+ };
1344
+ /** Spring config for press/scale micro-interactions (Animated.spring). */
1345
+ readonly spring: {
1346
+ readonly friction: 7;
1347
+ readonly tension: 120;
1348
+ };
1349
+ };
1350
+ /** Standard icon sizes for the <Icon> component. */
1351
+ declare const iconSizes: {
1352
+ readonly xs: 14;
1353
+ readonly sm: 16;
1354
+ readonly md: 20;
1355
+ readonly lg: 24;
1356
+ readonly xl: 32;
1357
+ };
1358
+ /** Square sizes for tinted IconTile accents (the core Soft Neutral motif). */
1359
+ declare const tile: {
1360
+ readonly sm: 32;
1361
+ readonly md: 40;
1362
+ readonly lg: 48;
1363
+ };
1364
+ declare const MIN_TAP_TARGET = 44;
1365
+ declare const DEFAULT_HIT_SLOP: {
1366
+ readonly top: 8;
1367
+ readonly bottom: 8;
1368
+ readonly left: 8;
1369
+ readonly right: 8;
1370
+ };
1371
+ /**
1372
+ * Soft Neutral elevation. Regular content cards stay quiet (`card`) — a single
1373
+ * subtle tier — while sheets/modals lift further. `sm/md/lg` are preserved for
1374
+ * backward compatibility (exported tokens / existing consumers).
1375
+ */
1376
+ declare const elevation: Record<'sm' | 'md' | 'lg' | 'card' | 'raised' | 'sheet' | 'fab', ViewStyle>;
1377
+
1378
+ export { ActivitiesList, type Activity, type ActivityDetail, type ApiFetchOptions, type ApiResponse, type AuthContext, AuthProvider, type BaseRequest, BaseUrlProvider, BottomSheet, BottomTabBar, CaseDetailsPage, type CaseDetailsTab, CaseHistory, type CaseHistoryDetail, type CaseMessage, type CaseRequest, type CaseStatusVariant, type ConsentAction, type ConsentDataElement, type ConsentHistoryStatusSummary, ConsentManager, ConsentStatusEnum, type CreateCaseResponse, DEFAULT_HIT_SLOP, DETAIL_PAGES, type DataElement, type DocumentRequestMetadata, type DocumentRequestStatus, type FilterTab, Footer, Form, type FormData$1 as FormData, FormPage, type GrievanceTypeElement, GrievanceTypeEnum, Icon, type IconName, type IconProps, IconTile, type IconTileSize, type IconTileTone, type InternalPage, MIN_TAP_TARGET, type ManageConsentParams, type MessageDocument, type MessageType, Navbar, NavigationProvider, type NominatedPurposesGroup, type NominationData, type NominatorInfo, type Notification, type NotificationCTA, type NotificationCategory, type NotificationListResponse, type NotificationSummary, type NotificationType, type OrgBrandingDetail, type OrgBrandingTheme, type OrganizationDetail, type OtpResponse, type OtpVerificationResponse, PCAvatar, PCBadge, PCButton, PCCheckbox, PCDivider, PCEmpty, PCInput, PCListRow, PCListSection, PCLoader, PCModal, PCPageTitle, PCSelect, type PageChromeMode, type Pagination, type PendingUpload, type ProductConsentHistoryGroup, type Purpose, RedactoPrivacyCenter, RequestTypeEnum, SectionHeader, SideMenu, Skeleton, SkeletonRow, StatPill, type TabId, ThemeProvider, type TokenExchangeResponse, type UpdateCorrectionDataItem, type UpdatePurpose, type UploadDocumentResponse, type UserConsent, type UserConsentDetail, type UserDataRequest, type Workspace, animateNextLayout, compareEmails, createCaseRequest, createConsentClient, createOtpServer as createOtp, decodeJwtToken, divider, elevation, ensureValidToken, exchangeTokenServer as exchangeToken, fetchActivities, fetchCaseHistory, fetchProducts, fetchUserConsents, formatActivityType, getActivityTypeStatus, getCaseMessages, getFormData, getListBottomInset, getPageChromeMode, iconSizes, isJwtExpired, listGap, manageConsent, motion, numericText, radii, section, sendCaseMessage, signOutPrivacyCenter, spacing, submitDocumentForRequest, tile, typography, uploadCaseDocument, useAnimatedTabIndicator, useAuth, useBaseUrl, useCaseHistory, useCaseMessages, useFadeIn, useInternalNavigation, usePressScale, usePrivacyCenterInsets, useTheme, verifyOtpServer as verifyOtp };