@sudobility/building_blocks 0.0.17 β†’ 0.0.18

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.
@@ -4,3 +4,4 @@ export * from './footer';
4
4
  export * from './layout';
5
5
  export * from './settings';
6
6
  export * from './subscription';
7
+ export * from './pages';
@@ -0,0 +1,137 @@
1
+ import React, { type ReactNode, type ComponentType } from 'react';
2
+ /**
3
+ * Configuration for a content section with a list
4
+ */
5
+ export interface PrivacySectionWithList {
6
+ /** Section title */
7
+ title: string;
8
+ /** Optional description before the list */
9
+ description?: string;
10
+ /** List items */
11
+ items: string[];
12
+ }
13
+ /**
14
+ * Configuration for a content section with paragraph text
15
+ */
16
+ export interface PrivacySectionWithContent {
17
+ /** Section title */
18
+ title: string;
19
+ /** Paragraph content */
20
+ content: string;
21
+ }
22
+ /**
23
+ * Configuration for a subsection (h3 level)
24
+ */
25
+ export interface PrivacySubsection {
26
+ /** Subsection title */
27
+ title: string;
28
+ /** List items */
29
+ items: string[];
30
+ }
31
+ /**
32
+ * Contact information configuration
33
+ */
34
+ export interface PrivacyContactInfo {
35
+ /** Email label (e.g., "Email:") */
36
+ emailLabel: string;
37
+ /** Email address */
38
+ email: string;
39
+ /** Website label (e.g., "Website:") */
40
+ websiteLabel: string;
41
+ /** Website URL */
42
+ websiteUrl: string;
43
+ /** Data Protection Officer label */
44
+ dpoLabel: string;
45
+ /** DPO email */
46
+ dpoEmail: string;
47
+ /** GDPR section title */
48
+ gdprTitle: string;
49
+ /** GDPR section content */
50
+ gdprContent: string;
51
+ }
52
+ /**
53
+ * All text content for the privacy policy page
54
+ */
55
+ export interface PrivacyPolicyPageText {
56
+ /** Page heading */
57
+ heading: string;
58
+ /** Last updated label */
59
+ lastUpdatedLabel: string;
60
+ /** Introduction section */
61
+ introduction: PrivacySectionWithContent;
62
+ /** Information We Collect section */
63
+ informationWeCollect: {
64
+ title: string;
65
+ youProvide: PrivacySubsection;
66
+ automatic: PrivacySubsection;
67
+ };
68
+ /** How We Use Your Information section */
69
+ howWeUse: PrivacySectionWithList;
70
+ /** Information Sharing section */
71
+ informationSharing: PrivacySectionWithList;
72
+ /** Data Security section */
73
+ dataSecurity: PrivacySectionWithList;
74
+ /** Data Retention section */
75
+ dataRetention: PrivacySectionWithContent;
76
+ /** Your Privacy Rights section */
77
+ privacyRights: PrivacySectionWithList;
78
+ /** Web3 Considerations section (optional) */
79
+ web3Considerations?: PrivacySectionWithList;
80
+ /** International Transfers section */
81
+ internationalTransfers: PrivacySectionWithContent;
82
+ /** Children's Privacy section */
83
+ childrensPrivacy: PrivacySectionWithContent;
84
+ /** Cookies section */
85
+ cookies: PrivacySectionWithContent;
86
+ /** Changes to Policy section */
87
+ changes: PrivacySectionWithContent;
88
+ /** Contact section */
89
+ contact: {
90
+ title: string;
91
+ description: string;
92
+ info: PrivacyContactInfo;
93
+ };
94
+ }
95
+ /**
96
+ * Props for AppPrivacyPolicyPage component
97
+ */
98
+ export interface AppPrivacyPolicyPageProps {
99
+ /** All text content (must be provided by consumer) */
100
+ text: PrivacyPolicyPageText;
101
+ /** Current date for "last updated" display */
102
+ lastUpdatedDate?: string;
103
+ /** Optional wrapper component for the page layout */
104
+ PageWrapper?: ComponentType<{
105
+ children: ReactNode;
106
+ }>;
107
+ /** Optional className for the container */
108
+ className?: string;
109
+ }
110
+ /**
111
+ * AppPrivacyPolicyPage - A reusable privacy policy page component
112
+ *
113
+ * Displays a comprehensive privacy policy with:
114
+ * - Standard legal sections
115
+ * - Optional Web3-specific considerations
116
+ * - Contact information with GDPR notice
117
+ *
118
+ * All text content must be provided by the consumer app.
119
+ *
120
+ * @example
121
+ * ```tsx
122
+ * <AppPrivacyPolicyPage
123
+ * text={{
124
+ * heading: "Privacy Policy",
125
+ * lastUpdatedLabel: "Last updated",
126
+ * introduction: {
127
+ * title: "Introduction",
128
+ * content: "We respect your privacy..."
129
+ * },
130
+ * // ... other sections
131
+ * }}
132
+ * lastUpdatedDate="January 1, 2025"
133
+ * />
134
+ * ```
135
+ */
136
+ export declare const AppPrivacyPolicyPage: React.FC<AppPrivacyPolicyPageProps>;
137
+ export default AppPrivacyPolicyPage;
@@ -0,0 +1,116 @@
1
+ import React, { type ComponentType, type ReactNode } from 'react';
2
+ import type { LinkComponentProps } from '../../types';
3
+ /**
4
+ * Configuration for a single sitemap link
5
+ */
6
+ export interface SitemapLink {
7
+ /** URL path */
8
+ path: string;
9
+ /** Display label */
10
+ label: string;
11
+ /** Optional description */
12
+ description?: string;
13
+ }
14
+ /**
15
+ * Configuration for a sitemap section
16
+ */
17
+ export interface SitemapSection {
18
+ /** Section title */
19
+ title: string;
20
+ /** Section icon type (optional) */
21
+ icon?: 'home' | 'document' | 'envelope' | 'cog' | 'language';
22
+ /** Links in this section */
23
+ links: SitemapLink[];
24
+ }
25
+ /**
26
+ * Configuration for a language option
27
+ */
28
+ export interface LanguageOption {
29
+ /** Language code (e.g., 'en', 'es') */
30
+ code: string;
31
+ /** Display name */
32
+ name: string;
33
+ /** Flag emoji */
34
+ flag: string;
35
+ }
36
+ /**
37
+ * Configuration for quick action buttons
38
+ */
39
+ export interface QuickLink {
40
+ /** URL path */
41
+ path: string;
42
+ /** Display label */
43
+ label: string;
44
+ /** Button variant */
45
+ variant: 'primary' | 'secondary' | 'outline';
46
+ /** Optional icon */
47
+ icon?: 'envelope' | 'document';
48
+ }
49
+ /**
50
+ * Text content for the sitemap page
51
+ */
52
+ export interface SitemapPageText {
53
+ /** Page title */
54
+ title: string;
55
+ /** Page subtitle */
56
+ subtitle: string;
57
+ /** Languages section title */
58
+ languagesSectionTitle: string;
59
+ /** Languages section description */
60
+ languagesDescription: string;
61
+ /** Quick links section title */
62
+ quickLinksTitle: string;
63
+ }
64
+ /**
65
+ * Props for AppSitemapPage component
66
+ */
67
+ export interface AppSitemapPageProps {
68
+ /** All text content (must be provided by consumer) */
69
+ text: SitemapPageText;
70
+ /** Sitemap sections */
71
+ sections: SitemapSection[];
72
+ /** Available languages */
73
+ languages: LanguageOption[];
74
+ /** Quick action links */
75
+ quickLinks?: QuickLink[];
76
+ /** Custom Link component for navigation */
77
+ LinkComponent: ComponentType<LinkComponentProps & {
78
+ language?: string;
79
+ }>;
80
+ /** Optional wrapper component for the page layout */
81
+ PageWrapper?: ComponentType<{
82
+ children: ReactNode;
83
+ }>;
84
+ /** Optional className for the container */
85
+ className?: string;
86
+ }
87
+ /**
88
+ * AppSitemapPage - A reusable sitemap page component
89
+ *
90
+ * Displays a comprehensive sitemap with:
91
+ * - Language selector
92
+ * - Organized sections with links
93
+ * - Quick action buttons
94
+ *
95
+ * All text content must be provided by the consumer app.
96
+ *
97
+ * @example
98
+ * ```tsx
99
+ * <AppSitemapPage
100
+ * text={{
101
+ * title: "Sitemap",
102
+ * subtitle: "Explore all pages",
103
+ * languagesSectionTitle: "Languages",
104
+ * languagesDescription: "Available in multiple languages",
105
+ * quickLinksTitle: "Quick Links"
106
+ * }}
107
+ * sections={[
108
+ * { title: "Main", icon: "home", links: [{ path: "/", label: "Home" }] }
109
+ * ]}
110
+ * languages={[{ code: "en", name: "English", flag: "πŸ‡ΊπŸ‡Έ" }]}
111
+ * LinkComponent={LocalizedLink}
112
+ * />
113
+ * ```
114
+ */
115
+ export declare const AppSitemapPage: React.FC<AppSitemapPageProps>;
116
+ export default AppSitemapPage;
@@ -0,0 +1,107 @@
1
+ import React, { type ReactNode, type ComponentType } from 'react';
2
+ /**
3
+ * Configuration for a section with paragraph content
4
+ */
5
+ export interface TermsSectionWithContent {
6
+ /** Section title */
7
+ title: string;
8
+ /** Paragraph content (can include HTML for links) */
9
+ content: string;
10
+ /** Whether content contains HTML that should be rendered */
11
+ isHtml?: boolean;
12
+ }
13
+ /**
14
+ * Configuration for a section with a list
15
+ */
16
+ export interface TermsSectionWithList {
17
+ /** Section title */
18
+ title: string;
19
+ /** Optional description before the list */
20
+ description?: string;
21
+ /** List items */
22
+ items: string[];
23
+ /** Optional additional content after the list */
24
+ additionalContent?: string;
25
+ }
26
+ /**
27
+ * Contact information configuration
28
+ */
29
+ export interface TermsContactInfo {
30
+ /** Email label (e.g., "Email:") */
31
+ emailLabel: string;
32
+ /** Email address */
33
+ email: string;
34
+ /** Website label (e.g., "Website:") */
35
+ websiteLabel: string;
36
+ /** Website URL */
37
+ websiteUrl: string;
38
+ }
39
+ /**
40
+ * All text content for the terms of service page
41
+ */
42
+ export interface TermsOfServicePageText {
43
+ /** Page title */
44
+ title: string;
45
+ /** Last updated text (with placeholder for date) */
46
+ lastUpdated: string;
47
+ /** All sections in order */
48
+ sections: Array<TermsSectionWithContent | TermsSectionWithList>;
49
+ /** Contact information */
50
+ contact: {
51
+ /** Section title */
52
+ title: string;
53
+ /** Section description */
54
+ description: string;
55
+ /** Whether description contains HTML */
56
+ isHtml?: boolean;
57
+ /** Contact details */
58
+ info: TermsContactInfo;
59
+ };
60
+ }
61
+ /**
62
+ * Props for AppTermsOfServicePage component
63
+ */
64
+ export interface AppTermsOfServicePageProps {
65
+ /** All text content (must be provided by consumer) */
66
+ text: TermsOfServicePageText;
67
+ /** Current date for "last updated" display */
68
+ lastUpdatedDate?: string;
69
+ /** Optional wrapper component for the page layout */
70
+ PageWrapper?: ComponentType<{
71
+ children: ReactNode;
72
+ }>;
73
+ /** Optional className for the container */
74
+ className?: string;
75
+ }
76
+ /**
77
+ * AppTermsOfServicePage - A reusable terms of service page component
78
+ *
79
+ * Displays a comprehensive terms of service document with:
80
+ * - Flexible section structure (content or list-based)
81
+ * - Contact information
82
+ * - Support for HTML content in specific sections
83
+ *
84
+ * All text content must be provided by the consumer app.
85
+ *
86
+ * @example
87
+ * ```tsx
88
+ * <AppTermsOfServicePage
89
+ * text={{
90
+ * title: "Terms of Service",
91
+ * lastUpdated: "Last updated: {{date}}",
92
+ * sections: [
93
+ * { title: "Acceptance", content: "By using..." },
94
+ * { title: "User Responsibilities", items: ["Item 1", "Item 2"] }
95
+ * ],
96
+ * contact: {
97
+ * title: "Contact",
98
+ * description: "Questions?",
99
+ * info: { emailLabel: "Email:", email: "support@example.com", ... }
100
+ * }
101
+ * }}
102
+ * lastUpdatedDate="January 1, 2025"
103
+ * />
104
+ * ```
105
+ */
106
+ export declare const AppTermsOfServicePage: React.FC<AppTermsOfServicePageProps>;
107
+ export default AppTermsOfServicePage;
@@ -0,0 +1,6 @@
1
+ export { AppSitemapPage } from './app-sitemap-page';
2
+ export type { AppSitemapPageProps, SitemapPageText, SitemapSection, SitemapLink, LanguageOption, QuickLink, } from './app-sitemap-page';
3
+ export { AppPrivacyPolicyPage } from './app-privacy-policy-page';
4
+ export type { AppPrivacyPolicyPageProps, PrivacyPolicyPageText, PrivacySectionWithList, PrivacySectionWithContent, PrivacySubsection, PrivacyContactInfo, } from './app-privacy-policy-page';
5
+ export { AppTermsOfServicePage } from './app-terms-of-service-page';
6
+ export type { AppTermsOfServicePageProps, TermsOfServicePageText, TermsSectionWithContent, TermsSectionWithList, TermsContactInfo, } from './app-terms-of-service-page';