sy-ui-lib 1.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.
- package/README.md +89 -0
- package/dist/components/AdminBetSlip/AdminBetSlip.component.d.ts +32 -0
- package/dist/components/AdminBetSlip/AdminBetSlip.stories.d.ts +8 -0
- package/dist/components/AdminBetSlip/AdminBetSlip.types.d.ts +50 -0
- package/dist/components/AdminBetSlip/index.d.ts +3 -0
- package/dist/components/Avatar/Avatar.component.d.ts +18 -0
- package/dist/components/Avatar/Avatar.stories.d.ts +6 -0
- package/dist/components/Avatar/Avatar.types.d.ts +13 -0
- package/dist/components/Avatar/index.d.ts +3 -0
- package/dist/components/BannerCard/BannerCard.component.d.ts +3 -0
- package/dist/components/BannerCard/BannerCard.stories.d.ts +6 -0
- package/dist/components/BannerCard/BannerCard.types.d.ts +12 -0
- package/dist/components/BannerCard/index.d.ts +3 -0
- package/dist/components/BetSlip/BetSlip.component.d.ts +88 -0
- package/dist/components/BetSlip/BetSlip.stories.d.ts +13 -0
- package/dist/components/BetSlip/BetSlip.types.d.ts +51 -0
- package/dist/components/BetSlip/index.d.ts +3 -0
- package/dist/components/BetSlipModal/BetSlipModal.component.d.ts +24 -0
- package/dist/components/BetSlipModal/BetSlipModal.stories.d.ts +11 -0
- package/dist/components/BetSlipModal/BetSlipModal.types.d.ts +8 -0
- package/dist/components/BetSlipModal/index.d.ts +3 -0
- package/dist/components/Button/Button.component.d.ts +33 -0
- package/dist/components/Button/Button.stories.d.ts +18 -0
- package/dist/components/Button/Button.types.d.ts +29 -0
- package/dist/components/Button/index.d.ts +3 -0
- package/dist/components/Checkbox/Checkbox.component.d.ts +27 -0
- package/dist/components/Checkbox/Checkbox.stories.d.ts +12 -0
- package/dist/components/Checkbox/Checkbox.types.d.ts +16 -0
- package/dist/components/Checkbox/index.d.ts +3 -0
- package/dist/components/Chip/Chip.component.d.ts +21 -0
- package/dist/components/Chip/Chip.stories.d.ts +51 -0
- package/dist/components/Chip/Chip.types.d.ts +22 -0
- package/dist/components/Chip/index.d.ts +3 -0
- package/dist/components/Colors/Colors.component.d.ts +2 -0
- package/dist/components/Colors/Colors.stories.d.ts +6 -0
- package/dist/components/CommonMarketHeader/CommonMarketHeader.component.d.ts +3 -0
- package/dist/components/CommonMarketHeader/CommonMarketHeader.stories.d.ts +17 -0
- package/dist/components/CommonMarketHeader/CommonMarketHeader.types.d.ts +35 -0
- package/dist/components/CommonMarketHeader/index.d.ts +3 -0
- package/dist/components/CommonMarketRow/CommonMarketRow.component.d.ts +4 -0
- package/dist/components/CommonMarketRow/CommonMarketRow.stories.d.ts +9 -0
- package/dist/components/CommonMarketRow/CommonMarketRow.types.d.ts +151 -0
- package/dist/components/CommonMarketRow/CommonOddButton.component.d.ts +132 -0
- package/dist/components/CommonMarketRow/FancyOddsRow.component.d.ts +3 -0
- package/dist/components/CommonMarketRow/LayeredOddsRow.component.d.ts +3 -0
- package/dist/components/CommonMarketRow/PairOddsRow.component.d.ts +3 -0
- package/dist/components/CommonMarketRow/index.d.ts +3 -0
- package/dist/components/DatePicker/DatePicker.component.d.ts +28 -0
- package/dist/components/DatePicker/DatePicker.stories.d.ts +10 -0
- package/dist/components/DatePicker/DatePicker.types.d.ts +33 -0
- package/dist/components/DatePicker/index.d.ts +3 -0
- package/dist/components/Dropdown/Dropdown.component.d.ts +38 -0
- package/dist/components/Dropdown/Dropdown.stories.d.ts +10 -0
- package/dist/components/Dropdown/Dropdown.types.d.ts +26 -0
- package/dist/components/Dropdown/index.d.ts +3 -0
- package/dist/components/EventCard/EventCard.component.d.ts +48 -0
- package/dist/components/EventCard/EventCard.stories.d.ts +6 -0
- package/dist/components/EventCard/EventCard.types.d.ts +44 -0
- package/dist/components/EventCard/index.d.ts +3 -0
- package/dist/components/EventDisplayCard/EventDisplayCard.component.d.ts +24 -0
- package/dist/components/EventDisplayCard/EventDisplayCard.stories.d.ts +8 -0
- package/dist/components/EventDisplayCard/EventDisplayCard.types.d.ts +10 -0
- package/dist/components/EventDisplayCard/index.d.ts +3 -0
- package/dist/components/EventInfoCard/EventInfoCard.component.d.ts +38 -0
- package/dist/components/EventInfoCard/EventInfoCard.stories.d.ts +6 -0
- package/dist/components/EventInfoCard/EventInfoCard.types.d.ts +19 -0
- package/dist/components/EventInfoCard/index.d.ts +3 -0
- package/dist/components/FileUploader/FileUploader.component.d.ts +55 -0
- package/dist/components/FileUploader/FileUploader.stories.d.ts +8 -0
- package/dist/components/FileUploader/FileUploader.types.d.ts +23 -0
- package/dist/components/FileUploader/index.d.ts +3 -0
- package/dist/components/FlashNotification/FlashNotification.component.d.ts +34 -0
- package/dist/components/FlashNotification/FlashNotification.stories.d.ts +9 -0
- package/dist/components/FlashNotification/FlashNotification.types.d.ts +13 -0
- package/dist/components/FlashNotification/index.d.ts +3 -0
- package/dist/components/Icon/Icon.component.d.ts +20 -0
- package/dist/components/Icon/Icon.types.d.ts +43 -0
- package/dist/components/Icon/SvgIcons.d.ts +80 -0
- package/dist/components/Icon/index.d.ts +3 -0
- package/dist/components/ImageCard/ImageCard.component.d.ts +22 -0
- package/dist/components/ImageCard/ImageCard.stories.d.ts +9 -0
- package/dist/components/ImageCard/ImageCard.types.d.ts +8 -0
- package/dist/components/ImageCard/index.d.ts +3 -0
- package/dist/components/InputField/InputField.component.d.ts +28 -0
- package/dist/components/InputField/InputField.stories.d.ts +10 -0
- package/dist/components/InputField/InputField.types.d.ts +33 -0
- package/dist/components/InputField/index.d.ts +3 -0
- package/dist/components/Loader/Loader.component.d.ts +18 -0
- package/dist/components/Loader/Loader.stories.d.ts +14 -0
- package/dist/components/Loader/Loader.types.d.ts +8 -0
- package/dist/components/Loader/index.d.ts +3 -0
- package/dist/components/MaintenancePage/MaintenancePage.component.d.ts +37 -0
- package/dist/components/MaintenancePage/MaintenancePage.stories.d.ts +10 -0
- package/dist/components/MaintenancePage/MaintenancePage.types.d.ts +14 -0
- package/dist/components/MaintenancePage/index.d.ts +3 -0
- package/dist/components/Menu/Menu.component.d.ts +21 -0
- package/dist/components/Menu/Menu.stories.d.ts +7 -0
- package/dist/components/Menu/Menu.types.d.ts +24 -0
- package/dist/components/Menu/index.d.ts +3 -0
- package/dist/components/Modal/Modal.component.d.ts +39 -0
- package/dist/components/Modal/Modal.stories.d.ts +11 -0
- package/dist/components/Modal/Modal.types.d.ts +20 -0
- package/dist/components/Modal/index.d.ts +3 -0
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.component.d.ts +22 -0
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.stories.d.ts +10 -0
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.types.d.ts +22 -0
- package/dist/components/MultiSelectDropdown/index.d.ts +3 -0
- package/dist/components/NotFoundPage/NotFoundPage.component.d.ts +48 -0
- package/dist/components/NotFoundPage/NotFoundPage.stories.d.ts +11 -0
- package/dist/components/NotFoundPage/NotFoundPage.types.d.ts +13 -0
- package/dist/components/NotFoundPage/index.d.ts +3 -0
- package/dist/components/NotificationBanner/NotificationBanner.component.d.ts +39 -0
- package/dist/components/NotificationBanner/NotificationBanner.stories.d.ts +6 -0
- package/dist/components/NotificationBanner/NotificationBanner.types.d.ts +44 -0
- package/dist/components/NotificationBanner/index.d.ts +3 -0
- package/dist/components/NullState/NullState.component.d.ts +25 -0
- package/dist/components/NullState/NullState.stories.d.ts +14 -0
- package/dist/components/NullState/NullState.types.d.ts +22 -0
- package/dist/components/NullState/index.d.ts +3 -0
- package/dist/components/Pagination/Pagination.component.d.ts +23 -0
- package/dist/components/Pagination/Pagination.stories.d.ts +7 -0
- package/dist/components/Pagination/Pagination.types.d.ts +14 -0
- package/dist/components/Pagination/index.d.ts +3 -0
- package/dist/components/PasswordFieldGroup/PasswordFieldGroup.component.d.ts +28 -0
- package/dist/components/PasswordFieldGroup/PasswordFieldGroup.stories.d.ts +8 -0
- package/dist/components/PasswordFieldGroup/PasswordFieldGroup.types.d.ts +21 -0
- package/dist/components/PasswordFieldGroup/index.d.ts +3 -0
- package/dist/components/PhoneNumberInput/PhoneNumberInput.component.d.ts +38 -0
- package/dist/components/PhoneNumberInput/PhoneNumberInput.stories.d.ts +8 -0
- package/dist/components/PhoneNumberInput/PhoneNumberInput.types.d.ts +6 -0
- package/dist/components/PhoneNumberInput/index.d.ts +3 -0
- package/dist/components/ProgressBar/ProgressBar.component.d.ts +22 -0
- package/dist/components/ProgressBar/ProgressBar.stories.d.ts +9 -0
- package/dist/components/ProgressBar/ProgressBar.types.d.ts +12 -0
- package/dist/components/ProgressBar/index.d.ts +3 -0
- package/dist/components/RadioButton/RadioButton.component.d.ts +15 -0
- package/dist/components/RadioButton/RadioButton.stories.d.ts +8 -0
- package/dist/components/RadioButton/RadioButton.types.d.ts +31 -0
- package/dist/components/RadioButton/index.d.ts +3 -0
- package/dist/components/SearchBar/SearchBar.component.d.ts +18 -0
- package/dist/components/SearchBar/SearchBar.stories.d.ts +8 -0
- package/dist/components/SearchBar/SearchBar.types.d.ts +11 -0
- package/dist/components/SearchBar/index.d.ts +3 -0
- package/dist/components/Skeleton/Skeleton.component.d.ts +29 -0
- package/dist/components/Skeleton/Skeleton.stories.d.ts +6 -0
- package/dist/components/Skeleton/Skeleton.types.d.ts +26 -0
- package/dist/components/Skeleton/index.d.ts +3 -0
- package/dist/components/SnackBar/SnackBar.component.d.ts +47 -0
- package/dist/components/SnackBar/SnackBar.stories.d.ts +8 -0
- package/dist/components/SnackBar/SnackBar.types.d.ts +41 -0
- package/dist/components/SnackBar/SnackBarQueue.d.ts +9 -0
- package/dist/components/SnackBar/SnackbarFetcher.d.ts +34 -0
- package/dist/components/SnackBar/SnackbarProvider.d.ts +25 -0
- package/dist/components/SnackBar/index.d.ts +4 -0
- package/dist/components/StatsList/StatsList.component.d.ts +34 -0
- package/dist/components/StatsList/StatsList.stories.d.ts +11 -0
- package/dist/components/StatsList/StatsList.types.d.ts +39 -0
- package/dist/components/StatsList/index.d.ts +3 -0
- package/dist/components/StatusDisplayCard/StatusDisplayCard.component.d.ts +20 -0
- package/dist/components/StatusDisplayCard/StatusDisplayCard.stories.d.ts +30 -0
- package/dist/components/StatusDisplayCard/StatusDisplayCard.types.d.ts +17 -0
- package/dist/components/StatusDisplayCard/index.d.ts +3 -0
- package/dist/components/Svgs/LoaderSvg.d.ts +2 -0
- package/dist/components/Svgs/NotFoundSvg.d.ts +2 -0
- package/dist/components/Svgs/NullStateAdminSvg.d.ts +2 -0
- package/dist/components/Svgs/NullStateUserSvg.d.ts +2 -0
- package/dist/components/Svgs/UnderMaintenanceSvg.d.ts +2 -0
- package/dist/components/Svgs/index.d.ts +6 -0
- package/dist/components/Swiper/Swiper.component.d.ts +37 -0
- package/dist/components/Swiper/Swiper.stories.d.ts +32 -0
- package/dist/components/Swiper/Swiper.types.d.ts +46 -0
- package/dist/components/Swiper/index.d.ts +3 -0
- package/dist/components/TabList/TabList.component.d.ts +37 -0
- package/dist/components/TabList/TabList.stories.d.ts +16 -0
- package/dist/components/TabList/TabList.types.d.ts +27 -0
- package/dist/components/TabList/index.d.ts +3 -0
- package/dist/components/Table/Table.component.d.ts +47 -0
- package/dist/components/Table/Table.stories.d.ts +25 -0
- package/dist/components/Table/Table.types.d.ts +28 -0
- package/dist/components/Table/index.d.ts +3 -0
- package/dist/components/TimePicker/TimePicker.component.d.ts +22 -0
- package/dist/components/TimePicker/TimePicker.stories.d.ts +8 -0
- package/dist/components/TimePicker/TimePicker.types.d.ts +22 -0
- package/dist/components/TimePicker/index.d.ts +3 -0
- package/dist/components/TitleBar/TitleBar.component.d.ts +22 -0
- package/dist/components/TitleBar/TitleBar.stories.d.ts +8 -0
- package/dist/components/TitleBar/TitleBar.types.d.ts +10 -0
- package/dist/components/TitleBar/index.d.ts +3 -0
- package/dist/components/Toggle/Toggle.component.d.ts +22 -0
- package/dist/components/Toggle/Toggle.stories.d.ts +8 -0
- package/dist/components/Toggle/Toggle.types.d.ts +8 -0
- package/dist/components/Toggle/index.d.ts +3 -0
- package/dist/components/Tooltip/Tooltip.component.d.ts +19 -0
- package/dist/components/Tooltip/Tooltip.stories.d.ts +10 -0
- package/dist/components/Tooltip/Tooltip.types.d.ts +11 -0
- package/dist/components/Tooltip/index.d.ts +3 -0
- package/dist/components/TooltipExt/TooltipExt.component.d.ts +23 -0
- package/dist/components/TooltipExt/TooltipExt.stories.d.ts +19 -0
- package/dist/components/TooltipExt/TooltipExt.types.d.ts +11 -0
- package/dist/components/TooltipExt/index.d.ts +3 -0
- package/dist/components/Typography/Typography.component.d.ts +24 -0
- package/dist/components/Typography/Typography.stories.d.ts +8 -0
- package/dist/components/Typography/Typography.types.d.ts +54 -0
- package/dist/components/Typography/index.d.ts +3 -0
- package/dist/components/UserBetSlip/UserBetSlip.component.d.ts +45 -0
- package/dist/components/UserBetSlip/UserBetSlip.stories.d.ts +9 -0
- package/dist/components/UserBetSlip/UserBetSlip.types.d.ts +56 -0
- package/dist/components/UserBetSlip/index.d.ts +3 -0
- package/dist/components/WalletInfo/WalletInfo.component.d.ts +59 -0
- package/dist/components/WalletInfo/WalletInfo.stories.d.ts +7 -0
- package/dist/components/WalletInfo/WalletInfo.types.d.ts +25 -0
- package/dist/components/WalletInfo/index.d.ts +3 -0
- package/dist/components/ZIndex/ZIndex.component.d.ts +2 -0
- package/dist/components/ZIndex/ZIndex.stories.d.ts +5 -0
- package/dist/components/ZIndex/index.d.ts +2 -0
- package/dist/components/index.d.ts +50 -0
- package/dist/fonts/roboto-v48-latin-100.woff2 +0 -0
- package/dist/fonts/roboto-v48-latin-200.woff2 +0 -0
- package/dist/fonts/roboto-v48-latin-300.woff2 +0 -0
- package/dist/fonts/roboto-v48-latin-500.woff2 +0 -0
- package/dist/fonts/roboto-v48-latin-600.woff2 +0 -0
- package/dist/fonts/roboto-v48-latin-700.woff2 +0 -0
- package/dist/fonts/roboto-v48-latin-800.woff2 +0 -0
- package/dist/fonts/roboto-v48-latin-900.woff2 +0 -0
- package/dist/fonts/roboto-v48-latin-regular.woff2 +0 -0
- package/dist/images/404_Error_image.png +0 -0
- package/dist/images/female_avatar.png +0 -0
- package/dist/images/image_card.png +0 -0
- package/dist/images/loader.png +0 -0
- package/dist/images/male_avatar.png +0 -0
- package/dist/images/null_state_admin.png +0 -0
- package/dist/images/null_state_user.png +0 -0
- package/dist/images/under_maintenance.png +0 -0
- package/dist/index.cjs +59 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +15014 -0
- package/dist/utils/commonFunctionality/commonFunctionality.d.ts +13 -0
- package/dist/utils/commonFunctionality/commonFunctionality.types.d.ts +3 -0
- package/dist/utils/commonFunctionality/index.d.ts +2 -0
- package/dist/utils/constants.d.ts +44 -0
- package/dist/utils/countryCodes.d.ts +6 -0
- package/dist/utils/paginationUtils.d.ts +10 -0
- package/dist/utils/useScreenSize.d.ts +3 -0
- package/dist/vite-env.d.ts +1 -0
- package/package.json +61 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { MatchCardProps } from './EventCard.types';
|
|
2
|
+
/**
|
|
3
|
+
* EventCard Component
|
|
4
|
+
*
|
|
5
|
+
* Renders a card displaying match details, bet timers, and bet limits.
|
|
6
|
+
* Includes an interactive toggle to enable/disable the match or market,
|
|
7
|
+
* and a button to trigger edit actions.
|
|
8
|
+
*
|
|
9
|
+
* Behavior:
|
|
10
|
+
* - Displays match title and scheduled start time in the header.
|
|
11
|
+
* - Shows a toggle reflecting `isOn` state. Toggle calls `onToggle` when changed.
|
|
12
|
+
* - Bet Timer section displays waiting times (in seconds) for matchOdds, bookmaker, and fancy markets.
|
|
13
|
+
* - Bet Limits section shows min/max values for markets that support limits; for others, a "View" button is displayed.
|
|
14
|
+
* - Fully responsive: adjusts typography and layout based on screen size.
|
|
15
|
+
*
|
|
16
|
+
* Props:
|
|
17
|
+
* @param eventId Event Id unique for each event
|
|
18
|
+
* @param eventName Main match title displayed in the header (e.g., "Team A vs Team B").
|
|
19
|
+
* @param eventStartTime Scheduled start time of the match (displayed in header).
|
|
20
|
+
* @param betTiming API data containing bet waiting times and min/max limits for matchOdds, bookmaker, and fancy markets.
|
|
21
|
+
* @param betLimits Pre-computed min/max limits for supported markets.
|
|
22
|
+
* @param visible Controls the state of the toggle button. True = enabled, False = disabled
|
|
23
|
+
* @param onToggle Callback triggered when the toggle is clicked. Receives the new toggle state.
|
|
24
|
+
* @param onEdit Callback triggered when the Edit button is clicked.
|
|
25
|
+
* @param onView Callback triggered when a View button is clicked for a market without limits.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* <EventCard
|
|
29
|
+
* eventId="evt123"
|
|
30
|
+
* eventName="Manchester United vs Liverpool"
|
|
31
|
+
* eventStartTime="10:00 AM, 10 Feb 2026"
|
|
32
|
+
* betTiming={[
|
|
33
|
+
* { key: "matchOdds", label: "Match Odds", value: "5s" },
|
|
34
|
+
* { key: "bookmaker", label: "Bookmaker", value: "7s" },
|
|
35
|
+
* { key: "fancy", label: "Fancy", value: "3s" },
|
|
36
|
+
* ]}
|
|
37
|
+
* betLimits={
|
|
38
|
+
* matchOdds: { min: 10, max: 1000 },
|
|
39
|
+
* bookmaker: { min: 20, max: 2000 },
|
|
40
|
+
* }
|
|
41
|
+
* visible={true}
|
|
42
|
+
* onToggle={handleToggle}
|
|
43
|
+
* onEdit={handleEdit}
|
|
44
|
+
* onView={handleView}
|
|
45
|
+
* />
|
|
46
|
+
*/
|
|
47
|
+
declare const EventCard: React.FC<MatchCardProps>;
|
|
48
|
+
export default EventCard;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keys representing available betting markets.
|
|
3
|
+
*/
|
|
4
|
+
export type MarketKey = "matchOdds" | "bookmaker" | "fancy";
|
|
5
|
+
/**
|
|
6
|
+
* Configuration for a single market's betting parameters.
|
|
7
|
+
*/
|
|
8
|
+
export type BetMarketData = {
|
|
9
|
+
key: MarketKey;
|
|
10
|
+
value?: number;
|
|
11
|
+
label?: string;
|
|
12
|
+
};
|
|
13
|
+
export interface MatchCardProps {
|
|
14
|
+
eventId: string;
|
|
15
|
+
/** Main match title displayed in the header (e.g., "Team A vs Team B") */
|
|
16
|
+
eventName: string;
|
|
17
|
+
/** Scheduled start time of the match */
|
|
18
|
+
eventStartTime: string;
|
|
19
|
+
/** Array of bet waiting times for each market. */
|
|
20
|
+
betTiming: BetMarketData[];
|
|
21
|
+
/** Already computed min/max for supported markets */
|
|
22
|
+
betLimits: {
|
|
23
|
+
matchOdds: {
|
|
24
|
+
min: number;
|
|
25
|
+
max: number;
|
|
26
|
+
};
|
|
27
|
+
bookmaker: {
|
|
28
|
+
min: number;
|
|
29
|
+
max: number;
|
|
30
|
+
};
|
|
31
|
+
fancy?: {
|
|
32
|
+
min: number;
|
|
33
|
+
max: number;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
/** Controls the state of the toggle button. True = enabled, False = disabled */
|
|
37
|
+
visible: boolean;
|
|
38
|
+
/** Callback triggered when the toggle button is clicked, receives the new state */
|
|
39
|
+
onToggle: (eventId: string, value: boolean) => void;
|
|
40
|
+
/** Callback triggered when the Edit button is clicked */
|
|
41
|
+
onEdit: (eventId: string) => void;
|
|
42
|
+
/** Callback triggered when any "View" button is clicked for markets without limits */
|
|
43
|
+
onView: (eventId: string) => void;
|
|
44
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { EventDisplayCardProps } from './EventDisplayCard.types';
|
|
2
|
+
/**
|
|
3
|
+
* EventDisplayCard Component
|
|
4
|
+
*
|
|
5
|
+
* A reusable card layout to display an event or label with an icon,
|
|
6
|
+
* title, and optional action buttons on the right.
|
|
7
|
+
*
|
|
8
|
+
* Props:
|
|
9
|
+
* @param {string} iconName - The icon to be shown on the left.
|
|
10
|
+
* @param {string} title - The main heading or event label.
|
|
11
|
+
* @param {ButtonProps[]} [actions] - An optional array of button props to render CTAs.
|
|
12
|
+
*
|
|
13
|
+
* Example usage:
|
|
14
|
+
* <EventDisplayCard
|
|
15
|
+
* iconName="cricketBat"
|
|
16
|
+
* title="Bangladesh Emerg v/s South Africa Emerg"
|
|
17
|
+
* actions={[
|
|
18
|
+
* { text: "Details", iconName: "notes", variant: "secondary", size: "small", onClick: () => {} },
|
|
19
|
+
* { text: "Delete", variant: "danger", size: "small", onClick: () => {} },
|
|
20
|
+
* ]}
|
|
21
|
+
* />
|
|
22
|
+
*/
|
|
23
|
+
declare const EventDisplayCard: React.FC<EventDisplayCardProps>;
|
|
24
|
+
export default EventDisplayCard;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { default as EventDisplayCard } from './EventDisplayCard.component';
|
|
3
|
+
/** Storybook metadata for the Tooltip component */
|
|
4
|
+
declare const meta: Meta<typeof EventDisplayCard>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof EventDisplayCard>;
|
|
7
|
+
/** Default story showing tooltip on hover */
|
|
8
|
+
export declare const Default: Story;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ButtonProps, IconName } from '..';
|
|
2
|
+
/** Props for the EventDisplayCard component.*/
|
|
3
|
+
export interface EventDisplayCardProps {
|
|
4
|
+
/** Name of the icon to display on the left side.*/
|
|
5
|
+
iconName: IconName;
|
|
6
|
+
/** Title or label to be shown next to the icon.*/
|
|
7
|
+
title: string;
|
|
8
|
+
/** Optional array of buttons (CTAs) to render on the right side. */
|
|
9
|
+
actions?: ButtonProps[];
|
|
10
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { EventInfoCardProps } from './EventInfoCard.types';
|
|
2
|
+
/**
|
|
3
|
+
* EventInfoCard component
|
|
4
|
+
* Displays a sports/event summary card with competition info,
|
|
5
|
+
* live status, event timing, and a CTA to view event details.
|
|
6
|
+
* Behavior:
|
|
7
|
+
* - When `isLive` is `true`
|
|
8
|
+
* → The top chip shows "Live" in active state
|
|
9
|
+
* → The status chip shows `startStatus`
|
|
10
|
+
* - When `isLive` is `false`
|
|
11
|
+
* → The top chip appears in locked state
|
|
12
|
+
* → The status chip displays "Tomorrow"
|
|
13
|
+
* The component is fully responsive and adapts padding and spacing across base and medium screen sizes.
|
|
14
|
+
* @param {string} competition
|
|
15
|
+
* Name of the competition or tournament displayed in the header.
|
|
16
|
+
* @param {boolean} isLive
|
|
17
|
+
* Controls live/locked state styling and status chip behavior.
|
|
18
|
+
* @param {string} startStatus
|
|
19
|
+
* Text displayed in the start status chip (e.g. "Started", "Tomorrow").
|
|
20
|
+
* @param {string} title
|
|
21
|
+
* Main event title (e.g. team vs team).
|
|
22
|
+
* @param {string} time
|
|
23
|
+
* Scheduled start time of the event.
|
|
24
|
+
* @param {string} id
|
|
25
|
+
* Unique event identifier displayed at the bottom of the card.
|
|
26
|
+
* @example
|
|
27
|
+
* <EventInfoCard
|
|
28
|
+
* competition="ICC Mens T20 WC Warm Up Matches"
|
|
29
|
+
* isLive={true}
|
|
30
|
+
* startStatus="Started"
|
|
31
|
+
* title="Zimbabwe v Oman"
|
|
32
|
+
* time="08:30 PM"
|
|
33
|
+
* id="match-123"
|
|
34
|
+
* onClick={(id) => console.log(id)}
|
|
35
|
+
* />
|
|
36
|
+
*/
|
|
37
|
+
declare const EventInfoCard: React.FC<EventInfoCardProps>;
|
|
38
|
+
export default EventInfoCard;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { EventInfoCardProps } from './EventInfoCard.types';
|
|
3
|
+
declare const meta: Meta<EventInfoCardProps>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<EventInfoCardProps>;
|
|
6
|
+
export declare const Default: Story;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Props for the EventInfoCard component.
|
|
3
|
+
*/
|
|
4
|
+
export interface EventInfoCardProps {
|
|
5
|
+
/** Name of the competition or tournament */
|
|
6
|
+
competition: string;
|
|
7
|
+
/** Whether the event is live */
|
|
8
|
+
isLive: boolean;
|
|
9
|
+
/** Text displayed in the started status chip (e.g. "Started") */
|
|
10
|
+
startStatus: string;
|
|
11
|
+
/** Main event title (e.g. team vs team) */
|
|
12
|
+
title: string;
|
|
13
|
+
/** Event start time or scheduled time */
|
|
14
|
+
time: string;
|
|
15
|
+
/** Unique identifier for the event */
|
|
16
|
+
id: string;
|
|
17
|
+
/** Click handler triggered when View button is clicked */
|
|
18
|
+
onClick?: (id: string) => void;
|
|
19
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { UploadPaymentSlipProps } from './FileUploader.types';
|
|
2
|
+
/**
|
|
3
|
+
* FileUploader Component
|
|
4
|
+
*
|
|
5
|
+
* A reusable and accessible file upload component that supports both
|
|
6
|
+
* drag-and-drop and manual file selection. It validates file formats,
|
|
7
|
+
* handles a maximum file upload limit, and displays error messages.
|
|
8
|
+
*
|
|
9
|
+
* Props:
|
|
10
|
+
* @param {string} [id] – Unique identifier for the input element.
|
|
11
|
+
* @param {string} [name] – Name attribute for the input (useful for forms).
|
|
12
|
+
* @param {string} [label] – Label text displayed above the uploader.
|
|
13
|
+
* @param {boolean} [isRequired=false] – If true, appends an asterisk (*) to the label.
|
|
14
|
+
* @param {boolean} [hasError=false] – If true, marks the field as invalid and displays an error.
|
|
15
|
+
* @param {string} [errorMessage] – Custom error message to display when `hasError` is true.
|
|
16
|
+
* @param {boolean} [isDisabled=false] – Disables user interaction (drag, drop, browse).
|
|
17
|
+
* @param {function} [onChange] – Callback fired when selected files change.
|
|
18
|
+
* Receives a synthetic event similar to a native input change event:
|
|
19
|
+
* `(e: React.ChangeEvent<HTMLInputElement>) => void`.
|
|
20
|
+
* @param {string} instructionText – Instructional text shown before the clickable hyperlink (e.g., “Drag & drop your files or”).
|
|
21
|
+
* @param {string} hyperText – Clickable hyperlink text that opens the file browser (e.g., “browse”).
|
|
22
|
+
* @param {string} supportText – Text shown before the list of supported formats (e.g., “Supported formats”).
|
|
23
|
+
* @param {string[]} supportFormate – Array of allowed file extensions (e.g., ["jpg", "png", "pdf"]).
|
|
24
|
+
* @param {number} [maxFiles=10] – Maximum number of files allowed to be uploaded at once.
|
|
25
|
+
* @param {string} [maxLimitMessage="You have reached the maximum uploads limit."] –
|
|
26
|
+
* Message displayed when the user exceeds the upload limit.
|
|
27
|
+
* @param {string} [invalidFileMessage="Invalid file type."] –
|
|
28
|
+
* Message displayed when unsupported file types are uploaded.
|
|
29
|
+
*
|
|
30
|
+
* Features:
|
|
31
|
+
* - Supports drag-and-drop and manual file browsing
|
|
32
|
+
* - Validates file extensions
|
|
33
|
+
* - Restricts uploads based on a configurable maximum file count
|
|
34
|
+
* - Displays selected file names with remove icons
|
|
35
|
+
* - Handles disabled, required, and error states
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* Example usage:
|
|
39
|
+
* <FileUploader
|
|
40
|
+
* id="paymentSlip"
|
|
41
|
+
* name="paymentSlip"
|
|
42
|
+
* label="Upload Payment Slip"
|
|
43
|
+
* isRequired
|
|
44
|
+
* instructionText="Drag & drop your files or"
|
|
45
|
+
* hyperText="browse"
|
|
46
|
+
* supportText="Supported formats"
|
|
47
|
+
* supportFormate={["jpg", "jpeg", "png", "pdf"]}
|
|
48
|
+
* maxFiles={5}
|
|
49
|
+
* maxLimitMessage="You can upload a maximum of 5 files."
|
|
50
|
+
* invalidFileMessage="Only JPG, PNG, or PDF files are allowed."
|
|
51
|
+
* onChange={(e) => console.log("Files selected:", e.target.files)}
|
|
52
|
+
* />
|
|
53
|
+
*/
|
|
54
|
+
declare const FileUploader: React.FC<UploadPaymentSlipProps>;
|
|
55
|
+
export default FileUploader;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { default as FileUploader } from './FileUploader.component';
|
|
3
|
+
declare const meta: Meta<typeof FileUploader>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof FileUploader>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithError: Story;
|
|
8
|
+
export declare const Disabled: Story;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { InputFieldProps } from '../InputField';
|
|
2
|
+
export interface UploadPaymentSlipProps extends InputFieldProps {
|
|
3
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
4
|
+
/** Instructional text displayed before the browse link */
|
|
5
|
+
instructionText: string;
|
|
6
|
+
/** Text label preceding the supported format list */
|
|
7
|
+
supportText: string;
|
|
8
|
+
/** Array of supported file extensions (e.g., ["jpg", "png", "pdf"]) */
|
|
9
|
+
supportFormate: string[];
|
|
10
|
+
/** Maximum number of files that can be uploaded at once */
|
|
11
|
+
maxFiles?: number;
|
|
12
|
+
/** Custom message displayed when the max upload limit is reached */
|
|
13
|
+
maxLimitMessage?: string;
|
|
14
|
+
/** Custom message displayed when a file with an unsupported format is uploaded */
|
|
15
|
+
invalidFileMessage?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Maximum allowed file size in bytes.
|
|
18
|
+
* Example: `5 * 1024 * 1024` for a 5MB limit.
|
|
19
|
+
*/
|
|
20
|
+
maxFileSize: number;
|
|
21
|
+
/** Custom error message displayed when a selected file exceeds the `maxFileSize` limit.*/
|
|
22
|
+
maxFileSizeMessage?: string;
|
|
23
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { FlashNotificationProps } from './FlashNotification.types';
|
|
2
|
+
/**
|
|
3
|
+
* FlashNotification component
|
|
4
|
+
*
|
|
5
|
+
* A blinking notification banner used to display
|
|
6
|
+
* important system-level messages such as alerts,
|
|
7
|
+
* suspended states, or critical notices.
|
|
8
|
+
*
|
|
9
|
+
* @param {boolean} isVisible - Controls whether the notification is rendered.
|
|
10
|
+
* @param {object} typographyProps - Typography configuration for the message content.
|
|
11
|
+
* @param {string} typographyProps.text - Text to be displayed inside the notification.
|
|
12
|
+
* @param {string} [typographyProps.variant = "overline"] - Typography variant for the text.
|
|
13
|
+
* @param {string} [typographyProps.color = "white"] - Text color token.
|
|
14
|
+
* @param {FlashNotificationColor} [color = "error"] - Background and border color token.
|
|
15
|
+
*
|
|
16
|
+
* Example usage:
|
|
17
|
+
* <FlashNotification
|
|
18
|
+
* isVisible
|
|
19
|
+
* color="error"
|
|
20
|
+
* typographyProps={{ text: "ACCOUNT SUSPENDED" }}
|
|
21
|
+
* />
|
|
22
|
+
*
|
|
23
|
+
* <FlashNotification
|
|
24
|
+
* isVisible
|
|
25
|
+
* color="goldenYellow"
|
|
26
|
+
* typographyProps={{
|
|
27
|
+
* text: "SYSTEM PAUSED",
|
|
28
|
+
* variant: "h6",
|
|
29
|
+
* color: "black",
|
|
30
|
+
* }}
|
|
31
|
+
* />
|
|
32
|
+
*/
|
|
33
|
+
declare const FlashNotification: React.FC<FlashNotificationProps>;
|
|
34
|
+
export default FlashNotification;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite/*';
|
|
2
|
+
import { default as FlashNotification } from './FlashNotification.component';
|
|
3
|
+
declare const meta: Meta<typeof FlashNotification>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof FlashNotification>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Success: Story;
|
|
8
|
+
export declare const CustomTypography: Story;
|
|
9
|
+
export declare const Hidden: Story;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TypographyProps } from '../Typography';
|
|
2
|
+
/** Supported color tokens for FlashNotification background and border */
|
|
3
|
+
type FlashNotificationColor = "primary" | "secondary" | "error" | "success" | "black" | "smokyblack" | "slategray" | "neutralGray" | "babyBlue" | "watermelonRed" | "goldenYellow";
|
|
4
|
+
/** Props definition for FlashNotification component */
|
|
5
|
+
export interface FlashNotificationProps {
|
|
6
|
+
/** Controls whether the notification is rendered */
|
|
7
|
+
isVisible: boolean;
|
|
8
|
+
/** Typography configuration for the notification text */
|
|
9
|
+
typographyProps: Pick<TypographyProps, "text"> & Partial<Omit<TypographyProps, "text">>;
|
|
10
|
+
/** Background and border color token (defaults to "error") */
|
|
11
|
+
color?: FlashNotificationColor;
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IconProps } from './Icon.types';
|
|
3
|
+
/**
|
|
4
|
+
* Icon Component
|
|
5
|
+
*
|
|
6
|
+
* Renders SVG icon
|
|
7
|
+
* Can be used to display any svg icon from the icon gallery throughout the app with consistent styling.
|
|
8
|
+
*
|
|
9
|
+
* Props:
|
|
10
|
+
* @param {IconName} icon Name of the icon to be displayed (only predefined icons permitted)/s
|
|
11
|
+
* @param {number} size Size of the icon in pixels (supports 20 or 24). Defaults to 20
|
|
12
|
+
* @param {string} color Color of the icon (fill/stroke). Defaults to design system color
|
|
13
|
+
* @param {function} onClick If provided, icon becomes clickable and renders as a <button>
|
|
14
|
+
* @param {boolean} cursorPointer Enables pointer cursor styling when true. Defaults to true.
|
|
15
|
+
*
|
|
16
|
+
* Example usage:
|
|
17
|
+
* <Icon icon='view' size={24} size={20} color="smokyblack" onClick={()=> console.log("clicked")} />
|
|
18
|
+
*/
|
|
19
|
+
declare const Icon: React.FC<IconProps>;
|
|
20
|
+
export default Icon;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { icons } from './SvgIcons';
|
|
2
|
+
/**
|
|
3
|
+
* IconName is a union type of all valid icon names available in the `icons` object.
|
|
4
|
+
* This ensures type-safe usage of icon names throughout the app.
|
|
5
|
+
*/
|
|
6
|
+
export type IconName = keyof typeof icons;
|
|
7
|
+
/**
|
|
8
|
+
* IconSize defines the supported icon sizes in pixels.
|
|
9
|
+
*/
|
|
10
|
+
export type IconSize = 12 | 16 | 20 | 24;
|
|
11
|
+
/** A constant mapping of semantic color names to their corresponding CSS variable tokens */
|
|
12
|
+
export declare const iconColor: {
|
|
13
|
+
readonly primary: "--color-primary";
|
|
14
|
+
readonly secondary: "--color-secondary";
|
|
15
|
+
readonly success: "--color-success";
|
|
16
|
+
readonly error: "--color-error";
|
|
17
|
+
readonly black: "--color-black";
|
|
18
|
+
readonly smokyblack: "--color-smokyblack";
|
|
19
|
+
readonly slategray: "--color-slategray";
|
|
20
|
+
readonly brightgray: "--color-brightgray";
|
|
21
|
+
readonly offwhite: "--color-offwhite";
|
|
22
|
+
readonly white: "--color-white";
|
|
23
|
+
readonly goldenYellow: "--color-goldenYellow";
|
|
24
|
+
readonly neutralGray: "--color-neutralGray";
|
|
25
|
+
readonly techBlue: "--color-techBlue";
|
|
26
|
+
};
|
|
27
|
+
/** A union type representing all valid theme color names used in the iconColor map */
|
|
28
|
+
export type IconColor = keyof typeof iconColor;
|
|
29
|
+
/** Props associated with Icon Component */
|
|
30
|
+
export type IconProps = {
|
|
31
|
+
/** The name of the Icon to be rendered */
|
|
32
|
+
icon: IconName;
|
|
33
|
+
/** Optional size of the icon (in px). Defaults to 20 */
|
|
34
|
+
size?: IconSize;
|
|
35
|
+
/** Optional fill or stroke color. Defaults to icon's native color */
|
|
36
|
+
color?: IconColor;
|
|
37
|
+
/** Optional click handler for the icon */
|
|
38
|
+
onClick?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
39
|
+
/** Optional. Enables pointer cursor styling (default: true). */
|
|
40
|
+
cursorPointer?: boolean;
|
|
41
|
+
/** Optional Tailwind or custom class */
|
|
42
|
+
className?: string;
|
|
43
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { IconSize } from './Icon.types';
|
|
2
|
+
/**
|
|
3
|
+
* Storing Icons as key value pairs and Exporting a collection of SVG icons as react elements
|
|
4
|
+
*/
|
|
5
|
+
export declare const icons: {
|
|
6
|
+
logout: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
cancel: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
notes: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
search: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
secure: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
active: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
locked: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
suspended: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
bet: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
hide: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
view: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
back: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
upArrow: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
downArrow: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
forwardArrow: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
tv: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
addUser: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
calendar: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
caretDown: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
caretLeft: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
caretRight: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
caretUp: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
banking: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
edit: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
profile: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
downline: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
reports: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
bank: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
betlist: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
analysis: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
theme: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
loader: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
done: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
cricketBat: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
menu: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
handshake: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
searchFilter: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
filter: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
play: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
cricket: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
refresh: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
plus: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
minus: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
49
|
+
tennis: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
date: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
51
|
+
info: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
multiMarket: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
glob: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
54
|
+
notification: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
55
|
+
home: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
56
|
+
inPlay: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
57
|
+
upcoming: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
58
|
+
pin: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
59
|
+
pinned: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
60
|
+
soccer: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
61
|
+
specialMarket: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
62
|
+
doneFill: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
63
|
+
circlePlus: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
64
|
+
circleMinus: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
65
|
+
deposit: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
66
|
+
withdraw: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
67
|
+
upload: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
68
|
+
jpg: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
69
|
+
png: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
70
|
+
pdf: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
71
|
+
file: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
72
|
+
delete: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
73
|
+
letterB: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
74
|
+
letterF: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
75
|
+
graph: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
76
|
+
timer: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
77
|
+
casino: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
78
|
+
kabaddi: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
79
|
+
virtualEvents: (size: IconSize) => import("react/jsx-runtime").JSX.Element;
|
|
80
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ImageCardProps } from './ImageCard.types';
|
|
2
|
+
/**
|
|
3
|
+
* ImageCard component
|
|
4
|
+
*
|
|
5
|
+
* A clickable image card with:
|
|
6
|
+
* - Background image
|
|
7
|
+
* - Title label
|
|
8
|
+
* - Responsive sizing (mobile + desktop)
|
|
9
|
+
*
|
|
10
|
+
* @param imageUrl URL of the image to display.
|
|
11
|
+
* @param title Text displayed below the image.
|
|
12
|
+
* @param onClick Optional click handler for the card.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* <ImageCard
|
|
16
|
+
* imageUrl="/images/sample.png"
|
|
17
|
+
* title="Cricket"
|
|
18
|
+
* onClick={() => console.log("Card clicked")}
|
|
19
|
+
* />
|
|
20
|
+
*/
|
|
21
|
+
declare const ImageCard: React.FC<ImageCardProps>;
|
|
22
|
+
export default ImageCard;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite/*';
|
|
2
|
+
import { default as ImageCard } from './ImageCard.component';
|
|
3
|
+
declare const meta: Meta<typeof ImageCard>;
|
|
4
|
+
export default meta;
|
|
5
|
+
/** Type alias for a story object of ImageCard*/
|
|
6
|
+
type Story = StoryObj<typeof ImageCard>;
|
|
7
|
+
/** Default ImageCard without title prop.*/
|
|
8
|
+
export declare const Default: Story;
|
|
9
|
+
export declare const MultipleCards: Story;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { InputFieldProps } from './InputField.types';
|
|
2
|
+
/**
|
|
3
|
+
* InputField Component
|
|
4
|
+
*
|
|
5
|
+
* This component use for input field
|
|
6
|
+
*
|
|
7
|
+
* Props:
|
|
8
|
+
* @param {string} label The label text displayed above the input field.
|
|
9
|
+
* @param {string} id The HTML `id` attribute for the input
|
|
10
|
+
* @param {string} name The name of the input .
|
|
11
|
+
* @param {"text" | "email" | "number"} type The type of input
|
|
12
|
+
* @param {string} placeholder Text displayed inside the input when it's empty.
|
|
13
|
+
* @param {boolean} isRequired If field is mandatory then set 'true' otherwise default value is 'false'.
|
|
14
|
+
* @param {boolean} hasError would be more appropriate here Shows an error state with red border and error message when `true`.
|
|
15
|
+
* @param {string} errorMessage The message displayed when there's an error and `hasError` is `true`.
|
|
16
|
+
* @param {boolean} isDisabled Disables the input field when `true`.
|
|
17
|
+
* @param {string} value The current value of the input.
|
|
18
|
+
* @param {string} className Optional custom CSS classes to style the input.
|
|
19
|
+
* @param {void} onChange Handler function called when the input value changes.
|
|
20
|
+
* @param {string} iconName Give icon name for icon show in input field.
|
|
21
|
+
* @param {void} onClick Handler function on icon onclick event.
|
|
22
|
+
* @returns A styled div with label and input box the given props
|
|
23
|
+
*
|
|
24
|
+
* Example usage:
|
|
25
|
+
* <InputField type='text' label='Username' placeholder='Username' />
|
|
26
|
+
*/
|
|
27
|
+
declare const InputField: React.FC<InputFieldProps>;
|
|
28
|
+
export default InputField;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { InputFieldProps } from './InputField.types';
|
|
3
|
+
declare const meta: Meta<InputFieldProps>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<InputFieldProps>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const ErrorInput: Story;
|
|
8
|
+
export declare const Focused: Story;
|
|
9
|
+
export declare const Disabled: Story;
|
|
10
|
+
export declare const InputFieldWithIcon: Story;
|