@sudobility/marketing-components-rn 1.0.0 → 1.0.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.
@@ -25,10 +25,14 @@ export const InternalLink: React.FC<InternalLinkProps> = ({
25
25
  }) => (
26
26
  <Pressable
27
27
  onPress={() => onPress?.(to)}
28
- accessibilityRole="link"
29
- accessibilityLabel={typeof children === 'string' ? `Navigate to ${children}` : undefined}
28
+ accessibilityRole='link'
29
+ accessibilityLabel={
30
+ typeof children === 'string' ? `Navigate to ${children}` : undefined
31
+ }
30
32
  >
31
- <Text className={cn('underline font-medium', linkVariants[variant], className)}>
33
+ <Text
34
+ className={cn('underline font-medium', linkVariants[variant], className)}
35
+ >
32
36
  {children}
33
37
  </Text>
34
38
  </Pressable>
@@ -107,11 +111,11 @@ export const TopicClusterLinks: React.FC<TopicClusterLinksProps> = ({
107
111
  <View className={cn('flex-row flex-wrap gap-2', className)} {...props}>
108
112
  {Object.entries(links).map(([key, url], index) => (
109
113
  <React.Fragment key={key}>
110
- <InternalLink to={url} variant="primary" onPress={onLinkPress}>
114
+ <InternalLink to={url} variant='primary' onPress={onLinkPress}>
111
115
  {texts[key]}
112
116
  </InternalLink>
113
117
  {index < Object.keys(links).length - 1 && (
114
- <Text className="text-gray-400"> • </Text>
118
+ <Text className='text-gray-400'> • </Text>
115
119
  )}
116
120
  </React.Fragment>
117
121
  ))}
@@ -143,8 +147,8 @@ export const RelatedLinks: React.FC<RelatedLinksProps> = ({
143
147
  )}
144
148
  {...props}
145
149
  >
146
- <View className="flex-row flex-wrap items-center gap-2">
147
- <Text className="text-sm font-medium text-blue-900 dark:text-blue-200">
150
+ <View className='flex-row flex-wrap items-center gap-2'>
151
+ <Text className='text-sm font-medium text-blue-900 dark:text-blue-200'>
148
152
  {title}
149
153
  </Text>
150
154
  {links.map((link, index) => (
@@ -157,7 +161,7 @@ export const RelatedLinks: React.FC<RelatedLinksProps> = ({
157
161
  {link.text}
158
162
  </InternalLink>
159
163
  {index < links.length - 1 && (
160
- <Text className="text-gray-400"> • </Text>
164
+ <Text className='text-gray-400'> • </Text>
161
165
  )}
162
166
  </React.Fragment>
163
167
  ))}
@@ -165,7 +169,10 @@ export const RelatedLinks: React.FC<RelatedLinksProps> = ({
165
169
  </View>
166
170
  );
167
171
 
168
- export const generateContextualLinks = (pageType: string, _userStatus?: string) => {
172
+ export const generateContextualLinks = (
173
+ pageType: string,
174
+ _userStatus?: string
175
+ ) => {
169
176
  const baseLinks: Record<string, Array<{ text: string; url: string }>> = {
170
177
  homepage: [
171
178
  { text: 'How it works', url: '/document#getting-started' },
package/src/NpsSurvey.tsx CHANGED
@@ -23,8 +23,8 @@ export const NpsSurvey: React.FC<NpsSurveyProps> = ({
23
23
  <Pressable
24
24
  onPress={disabled ? undefined : onPress}
25
25
  disabled={disabled}
26
- accessibilityRole="button"
27
- accessibilityLabel="NPS Survey"
26
+ accessibilityRole='button'
27
+ accessibilityLabel='NPS Survey'
28
28
  accessibilityState={{ disabled }}
29
29
  className={cn(
30
30
  'p-4 rounded-lg border',
@@ -37,7 +37,7 @@ export const NpsSurvey: React.FC<NpsSurveyProps> = ({
37
37
  {...props}
38
38
  >
39
39
  {children || (
40
- <Text className="text-gray-900 dark:text-white">
40
+ <Text className='text-gray-900 dark:text-white'>
41
41
  NpsSurvey Component
42
42
  </Text>
43
43
  )}
@@ -26,11 +26,11 @@ export const SalesReport: React.FC<SalesReportProps> = ({
26
26
  disabled && 'opacity-50',
27
27
  className
28
28
  )}
29
- accessibilityLabel="Sales Report"
29
+ accessibilityLabel='Sales Report'
30
30
  {...props}
31
31
  >
32
32
  {children || (
33
- <Text className="text-gray-900 dark:text-white">
33
+ <Text className='text-gray-900 dark:text-white'>
34
34
  SalesReport Component
35
35
  </Text>
36
36
  )}
@@ -23,8 +23,8 @@ export const TestimonialSlider: React.FC<TestimonialSliderProps> = ({
23
23
  <Pressable
24
24
  onPress={disabled ? undefined : onPress}
25
25
  disabled={disabled}
26
- accessibilityRole="button"
27
- accessibilityLabel="Testimonial Slider"
26
+ accessibilityRole='button'
27
+ accessibilityLabel='Testimonial Slider'
28
28
  accessibilityState={{ disabled }}
29
29
  className={cn(
30
30
  'p-4 rounded-lg border',
@@ -37,7 +37,7 @@ export const TestimonialSlider: React.FC<TestimonialSliderProps> = ({
37
37
  {...props}
38
38
  >
39
39
  {children || (
40
- <Text className="text-gray-900 dark:text-white">
40
+ <Text className='text-gray-900 dark:text-white'>
41
41
  TestimonialSlider Component
42
42
  </Text>
43
43
  )}
@@ -42,36 +42,40 @@ interface UseCaseCardProps {
42
42
  }
43
43
 
44
44
  const UseCaseCard: React.FC<UseCaseCardProps> = ({ useCase }) => {
45
- const iconColor = useCase.color ? colorClasses[useCase.color] : colorClasses.blue;
46
- const bulletColor = useCase.color ? bulletColors[useCase.color] : bulletColors.blue;
45
+ const iconColor = useCase.color
46
+ ? colorClasses[useCase.color]
47
+ : colorClasses.blue;
48
+ const bulletColor = useCase.color
49
+ ? bulletColors[useCase.color]
50
+ : bulletColors.blue;
47
51
 
48
52
  return (
49
- <View className="bg-white dark:bg-gray-800 rounded-xl p-6 border border-gray-200 dark:border-gray-700 mb-4 mx-2">
53
+ <View className='bg-white dark:bg-gray-800 rounded-xl p-6 border border-gray-200 dark:border-gray-700 mb-4 mx-2'>
50
54
  <View className={cn('mb-4', iconColor)}>{useCase.icon}</View>
51
55
 
52
- <Text className="text-xl font-semibold text-gray-900 dark:text-white mb-3">
56
+ <Text className='text-xl font-semibold text-gray-900 dark:text-white mb-3'>
53
57
  {useCase.title}
54
58
  </Text>
55
59
 
56
- <Text className="text-gray-600 dark:text-gray-300 mb-4">
60
+ <Text className='text-gray-600 dark:text-gray-300 mb-4'>
57
61
  {useCase.description}
58
62
  </Text>
59
63
 
60
64
  {useCase.examples && useCase.examples.length > 0 && (
61
65
  <View>
62
- <Text className="text-sm font-semibold text-gray-700 dark:text-gray-300 mb-2">
66
+ <Text className='text-sm font-semibold text-gray-700 dark:text-gray-300 mb-2'>
63
67
  Examples:
64
68
  </Text>
65
- <View className="gap-1">
69
+ <View className='gap-1'>
66
70
  {useCase.examples.map((example, exampleIndex) => (
67
- <View key={exampleIndex} className="flex-row items-start">
71
+ <View key={exampleIndex} className='flex-row items-start'>
68
72
  <View
69
73
  className={cn(
70
74
  'w-1.5 h-1.5 rounded-full mt-2 mr-2',
71
75
  bulletColor
72
76
  )}
73
77
  />
74
- <Text className="text-sm text-gray-600 dark:text-gray-400 flex-1">
78
+ <Text className='text-sm text-gray-600 dark:text-gray-400 flex-1'>
75
79
  {example}
76
80
  </Text>
77
81
  </View>
@@ -98,14 +102,14 @@ export const UseCaseGrid: React.FC<UseCaseGridProps> = ({
98
102
  return (
99
103
  <View className={cn('py-8 px-4', className)} {...props}>
100
104
  {(title || description) && (
101
- <View className="items-center mb-8">
105
+ <View className='items-center mb-8'>
102
106
  {title && (
103
- <Text className="text-2xl font-bold text-gray-900 dark:text-white mb-4 text-center">
107
+ <Text className='text-2xl font-bold text-gray-900 dark:text-white mb-4 text-center'>
104
108
  {title}
105
109
  </Text>
106
110
  )}
107
111
  {description && (
108
- <Text className="text-lg text-gray-600 dark:text-gray-300 text-center max-w-lg">
112
+ <Text className='text-lg text-gray-600 dark:text-gray-300 text-center max-w-lg'>
109
113
  {description}
110
114
  </Text>
111
115
  )}
@@ -30,48 +30,43 @@ export const WelcomeScreen: React.FC<WelcomeScreenProps> = ({
30
30
  }) => {
31
31
  return (
32
32
  <View
33
- className={cn(
34
- 'flex-1 items-center justify-center px-6 py-12',
35
- className
36
- )}
33
+ className={cn('flex-1 items-center justify-center px-6 py-12', className)}
37
34
  {...props}
38
35
  >
39
- {illustration && (
40
- <View className="mb-8">{illustration}</View>
41
- )}
36
+ {illustration && <View className='mb-8'>{illustration}</View>}
42
37
 
43
38
  {subtitle && (
44
- <Text className="text-sm font-medium text-blue-600 dark:text-blue-400 mb-2 uppercase tracking-wide">
39
+ <Text className='text-sm font-medium text-blue-600 dark:text-blue-400 mb-2 uppercase tracking-wide'>
45
40
  {subtitle}
46
41
  </Text>
47
42
  )}
48
43
 
49
- <Text className="text-3xl font-bold text-gray-900 dark:text-white text-center mb-4">
44
+ <Text className='text-3xl font-bold text-gray-900 dark:text-white text-center mb-4'>
50
45
  {title}
51
46
  </Text>
52
47
 
53
48
  {description && (
54
- <Text className="text-base text-gray-600 dark:text-gray-400 text-center mb-8 max-w-sm">
49
+ <Text className='text-base text-gray-600 dark:text-gray-400 text-center mb-8 max-w-sm'>
55
50
  {description}
56
51
  </Text>
57
52
  )}
58
53
 
59
- <View className="w-full max-w-xs gap-3">
54
+ <View className='w-full max-w-xs gap-3'>
60
55
  <Button
61
- variant="primary"
62
- size="lg"
56
+ variant='primary'
57
+ size='lg'
63
58
  onPress={onPrimaryPress}
64
- className="w-full"
59
+ className='w-full'
65
60
  >
66
61
  {primaryButtonText}
67
62
  </Button>
68
63
 
69
64
  {secondaryButtonText && (
70
65
  <Button
71
- variant="ghost"
72
- size="lg"
66
+ variant='ghost'
67
+ size='lg'
73
68
  onPress={onSecondaryPress}
74
- className="w-full"
69
+ className='w-full'
75
70
  >
76
71
  {secondaryButtonText}
77
72
  </Button>
package/src/index.ts CHANGED
@@ -6,7 +6,10 @@
6
6
  export { CrmDashboard, type CrmDashboardProps } from './CrmDashboard';
7
7
  export { CtaBanner, type CtaBannerProps } from './CtaBanner';
8
8
  export { FeatureListItem, type FeatureListItemProps } from './FeatureListItem';
9
- export { FeatureSpotlight, type FeatureSpotlightProps } from './FeatureSpotlight';
9
+ export {
10
+ FeatureSpotlight,
11
+ type FeatureSpotlightProps,
12
+ } from './FeatureSpotlight';
10
13
  export {
11
14
  HeroBannerWithBadge,
12
15
  type HeroBannerWithBadgeProps,
@@ -23,7 +26,10 @@ export {
23
26
  } from './InternalLinkClusters';
24
27
  export { NpsSurvey, type NpsSurveyProps } from './NpsSurvey';
25
28
  export { SalesReport, type SalesReportProps } from './SalesReport';
26
- export { TestimonialSlider, type TestimonialSliderProps } from './TestimonialSlider';
29
+ export {
30
+ TestimonialSlider,
31
+ type TestimonialSliderProps,
32
+ } from './TestimonialSlider';
27
33
  export {
28
34
  UseCaseGrid,
29
35
  type UseCaseGridProps,