related-ui-components 1.3.0 → 1.3.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/lib/commonjs/app.js +19 -27
- package/lib/commonjs/app.js.map +1 -1
- package/lib/commonjs/components/Banner/README.md +3 -3
- package/lib/commonjs/components/Card/templates/README.md +3 -3
- package/lib/commonjs/components/Filters/Filters.js +13 -26
- package/lib/commonjs/components/Filters/Filters.js.map +1 -1
- package/lib/commonjs/components/Filters/README.md +1 -1
- package/lib/commonjs/components/ScratchCard/README.md +2 -2
- package/lib/commonjs/constants/BRANDS.js +2 -1
- package/lib/commonjs/constants/BRANDS.js.map +1 -1
- package/lib/module/app.js +21 -30
- package/lib/module/app.js.map +1 -1
- package/lib/module/components/Banner/README.md +3 -3
- package/lib/module/components/Card/templates/README.md +3 -3
- package/lib/module/components/Filters/Filters.js +13 -26
- package/lib/module/components/Filters/Filters.js.map +1 -1
- package/lib/module/components/Filters/README.md +1 -1
- package/lib/module/components/ScratchCard/README.md +2 -2
- package/lib/module/constants/BRANDS.js +2 -1
- package/lib/module/constants/BRANDS.js.map +1 -1
- package/lib/typescript/commonjs/app.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/Banner/Banner.d.ts +2 -2
- package/lib/typescript/commonjs/components/Banner/Banner.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/Banner/BannerWithDetails.d.ts +3 -3
- package/lib/typescript/commonjs/components/Banner/BannerWithDetails.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/Card/templates/DealCard.d.ts +2 -2
- package/lib/typescript/commonjs/components/Card/templates/DealCard.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/Card/templates/DealCardWithBackgroundImage.d.ts +2 -2
- package/lib/typescript/commonjs/components/Card/templates/DealCardWithBackgroundImage.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/Card/templates/SimpleTrendingCard.d.ts +2 -2
- package/lib/typescript/commonjs/components/Card/templates/SimpleTrendingCard.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/Card/types.d.ts +2 -2
- package/lib/typescript/commonjs/components/Card/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/Filters/Filters.d.ts +5 -3
- package/lib/typescript/commonjs/components/Filters/Filters.d.ts.map +1 -1
- package/lib/typescript/commonjs/constants/BRANDS.d.ts +8 -2
- package/lib/typescript/commonjs/constants/BRANDS.d.ts.map +1 -1
- package/lib/typescript/module/app.d.ts.map +1 -1
- package/lib/typescript/module/components/Banner/Banner.d.ts +2 -2
- package/lib/typescript/module/components/Banner/Banner.d.ts.map +1 -1
- package/lib/typescript/module/components/Banner/BannerWithDetails.d.ts +3 -3
- package/lib/typescript/module/components/Banner/BannerWithDetails.d.ts.map +1 -1
- package/lib/typescript/module/components/Card/templates/DealCard.d.ts +2 -2
- package/lib/typescript/module/components/Card/templates/DealCard.d.ts.map +1 -1
- package/lib/typescript/module/components/Card/templates/DealCardWithBackgroundImage.d.ts +2 -2
- package/lib/typescript/module/components/Card/templates/DealCardWithBackgroundImage.d.ts.map +1 -1
- package/lib/typescript/module/components/Card/templates/SimpleTrendingCard.d.ts +2 -2
- package/lib/typescript/module/components/Card/templates/SimpleTrendingCard.d.ts.map +1 -1
- package/lib/typescript/module/components/Card/types.d.ts +2 -2
- package/lib/typescript/module/components/Card/types.d.ts.map +1 -1
- package/lib/typescript/module/components/Filters/Filters.d.ts +5 -3
- package/lib/typescript/module/components/Filters/Filters.d.ts.map +1 -1
- package/lib/typescript/module/constants/BRANDS.d.ts +8 -2
- package/lib/typescript/module/constants/BRANDS.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/app.tsx +10 -18
- package/src/components/Banner/Banner.tsx +2 -2
- package/src/components/Banner/BannerWithDetails.tsx +3 -3
- package/src/components/Banner/README.md +3 -3
- package/src/components/Card/templates/DealCard.tsx +2 -2
- package/src/components/Card/templates/DealCardWithBackgroundImage.tsx +2 -2
- package/src/components/Card/templates/README.md +3 -3
- package/src/components/Card/templates/SimpleTrendingCard.tsx +2 -2
- package/src/components/Card/types.ts +2 -2
- package/src/components/Filters/Filters.tsx +454 -463
- package/src/components/Filters/README.md +1 -1
- package/src/components/ScratchCard/README.md +2 -2
- package/src/constants/BRANDS.ts +1 -0
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
TouchableOpacity,
|
|
6
6
|
ViewStyle,
|
|
7
7
|
TextStyle,
|
|
8
|
-
|
|
8
|
+
ImageSourcePropType,
|
|
9
9
|
DimensionValue,
|
|
10
10
|
View,
|
|
11
11
|
} from "react-native";
|
|
@@ -13,7 +13,7 @@ import { Card, CardFooter } from "../Card";
|
|
|
13
13
|
import { useTheme, ThemeType } from "../../theme";
|
|
14
14
|
|
|
15
15
|
export interface BannerProps {
|
|
16
|
-
backgroundImage:
|
|
16
|
+
backgroundImage: ImageSourcePropType;
|
|
17
17
|
buttonText?: string;
|
|
18
18
|
onButtonPress?: () => void;
|
|
19
19
|
onBannerPress?: () => void;
|
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
TextStyle,
|
|
9
9
|
ImageStyle,
|
|
10
10
|
TouchableOpacity,
|
|
11
|
-
|
|
11
|
+
ImageSourcePropType,
|
|
12
12
|
} from "react-native";
|
|
13
13
|
import { Card, CardContent } from "../Card";
|
|
14
14
|
import { useTheme, ThemeType } from "../../theme"; // Import ThemeType
|
|
15
15
|
|
|
16
16
|
interface BannerWithDetailsProps {
|
|
17
|
-
backgroundImage:
|
|
18
|
-
logoImage:
|
|
17
|
+
backgroundImage: ImageSourcePropType;
|
|
18
|
+
logoImage: ImageSourcePropType;
|
|
19
19
|
detailText: string;
|
|
20
20
|
onPress?: () => void;
|
|
21
21
|
containerStyle?: ViewStyle;
|
|
@@ -32,7 +32,7 @@ const MyComponent = () => {
|
|
|
32
32
|
|
|
33
33
|
| Prop | Type | Default | Description |
|
|
34
34
|
|------|------|---------|-------------|
|
|
35
|
-
| `backgroundImage` | `
|
|
35
|
+
| `backgroundImage` | `ImageSourcePropType` | Required | The background image to display in the banner |
|
|
36
36
|
| `buttonText` | `string` | `"Redeem"` | Text to display on the action button |
|
|
37
37
|
| `onButtonPress` | `() => void` | `undefined` | Function to execute when the button is pressed |
|
|
38
38
|
| `onBannerPress` | `() => void` | `undefined` | Function to execute when the banner (outside the button) is pressed |
|
|
@@ -83,8 +83,8 @@ const MyComponent = () => {
|
|
|
83
83
|
|
|
84
84
|
| Prop | Type | Default | Description |
|
|
85
85
|
|------|------|---------|-------------|
|
|
86
|
-
| `backgroundImage` | `
|
|
87
|
-
| `logoImage` | `
|
|
86
|
+
| `backgroundImage` | `ImageSourcePropType` | Required | The background image for the banner |
|
|
87
|
+
| `logoImage` | `ImageSourcePropType` | Required | The logo image to display in the centered card |
|
|
88
88
|
| `detailText` | `string` | Required | Text description to display in the details card |
|
|
89
89
|
| `onPress` | `() => void` | `undefined` | Function to execute when the banner is pressed |
|
|
90
90
|
| `containerStyle` | `ViewStyle` | `undefined` | Additional styles for the main container |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import {
|
|
3
|
-
|
|
3
|
+
ImageSourcePropType,
|
|
4
4
|
StyleProp,
|
|
5
5
|
ViewStyle,
|
|
6
6
|
View,
|
|
@@ -20,7 +20,7 @@ import CardFooter from "../CardFooter";
|
|
|
20
20
|
import LockOverlay from "../../LockOverlay/LockOverlay";
|
|
21
21
|
|
|
22
22
|
interface HorizontalDealCardProps {
|
|
23
|
-
imageSource:
|
|
23
|
+
imageSource: ImageSourcePropType;
|
|
24
24
|
variant?: "vertical" | "horizontal";
|
|
25
25
|
label?: string;
|
|
26
26
|
labelStyle?: StyleProp<TextStyle>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
2
|
import {
|
|
3
|
-
|
|
3
|
+
ImageSourcePropType,
|
|
4
4
|
StyleProp,
|
|
5
5
|
ViewStyle,
|
|
6
6
|
View,
|
|
@@ -20,7 +20,7 @@ import ProgressBar, {
|
|
|
20
20
|
import LockOverlay from "../../LockOverlay/LockOverlay";
|
|
21
21
|
|
|
22
22
|
interface DealCardProps {
|
|
23
|
-
backgroundImage:
|
|
23
|
+
backgroundImage: ImageSourcePropType;
|
|
24
24
|
label?: string;
|
|
25
25
|
labelStyle?: StyleProp<TextStyle>;
|
|
26
26
|
labelContainerStyle?: StyleProp<ViewStyle>;
|
|
@@ -40,7 +40,7 @@ const MyComponent = () => {
|
|
|
40
40
|
|
|
41
41
|
| Prop | Type | Default | Description |
|
|
42
42
|
|------|------|---------|-------------|
|
|
43
|
-
| `backgroundImage` | `
|
|
43
|
+
| `backgroundImage` | `ImageSourcePropType` | Required | The background image to display in the card |
|
|
44
44
|
| `icon` | `React.ReactNode` | `undefined` | Optional icon to display in the card header |
|
|
45
45
|
| `iconPosition` | `"left" \| "right"` | `"left"` | Position of the icon in the header |
|
|
46
46
|
| `shadowEffect` | `true \| false` | `true` | Shadow Effect displayed or not |
|
|
@@ -107,7 +107,7 @@ const MyComponent = () => {
|
|
|
107
107
|
|
|
108
108
|
| Prop | Type | Default | Description |
|
|
109
109
|
|------|------|---------|-------------|
|
|
110
|
-
| `backgroundImage` | `
|
|
110
|
+
| `backgroundImage` | `ImageSourcePropType` | Required | The background image to display in the card |
|
|
111
111
|
| `label` | `string` | `undefined` | Optional label text to display in the upper left corner |
|
|
112
112
|
| `labelStyle` | `StyleProp<TextStyle>` | `undefined` | Custom styles for the label text |
|
|
113
113
|
| `labelContainerStyle` | `StyleProp<ViewStyle>` | `undefined` | Custom styles for the label container |
|
|
@@ -193,7 +193,7 @@ const MyComponent = () => {
|
|
|
193
193
|
|
|
194
194
|
| Prop | Type | Default | Description |
|
|
195
195
|
|------|------|---------|-------------|
|
|
196
|
-
| `imageSource` | `
|
|
196
|
+
| `imageSource` | `ImageSourcePropType` | Required | The image to display in the card |
|
|
197
197
|
| `variant` | `"vertical" \| "horizontal"` | `"horizontal"` | Layout orientation of the card |
|
|
198
198
|
| `label` | `string` | `undefined` | Optional label text to display |
|
|
199
199
|
| `labelStyle` | `StyleProp<TextStyle>` | `undefined` | Custom styles for the label text |
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { ImageSourcePropType, StyleProp, ViewStyle } from "react-native";
|
|
3
3
|
import Card from "../Card";
|
|
4
4
|
import CardHeader from "../CardHeader";
|
|
5
5
|
import { LinearGradient } from "expo-linear-gradient";
|
|
6
6
|
|
|
7
7
|
interface SimpleTrendingCardProps {
|
|
8
|
-
backgroundImage:
|
|
8
|
+
backgroundImage: ImageSourcePropType;
|
|
9
9
|
icon?: React.ReactNode;
|
|
10
10
|
iconPosition?: "left" | "right";
|
|
11
11
|
onPress?: () => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Card/types.ts
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { StyleProp, ViewStyle, TextStyle, ImageStyle,
|
|
3
|
+
import { StyleProp, ViewStyle, TextStyle, ImageStyle, ImageSourcePropType } from 'react-native';
|
|
4
4
|
|
|
5
5
|
export interface CardProps {
|
|
6
6
|
children?: ReactNode;
|
|
@@ -16,7 +16,7 @@ export interface CardProps {
|
|
|
16
16
|
margin?: number | { horizontal?: number; vertical?: number };
|
|
17
17
|
padding?: number | { horizontal?: number; vertical?: number };
|
|
18
18
|
backgroundImage?: {
|
|
19
|
-
source:
|
|
19
|
+
source: ImageSourcePropType;
|
|
20
20
|
resizeMode?: 'cover' | 'contain' | 'stretch' | 'repeat' | 'center';
|
|
21
21
|
blurRadius?: number;
|
|
22
22
|
opacity?: number;
|