@campxdev/react-blueprint 1.1.8 → 1.1.9
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/package.json +2 -2
- package/src/AppContent.tsx +6 -6
- package/src/assets/fonts/heebo/index.ts +2 -2
- package/src/assets/fonts/poppins/index.ts +5 -5
- package/src/assets/images/gif/index.ts +4 -0
- package/src/assets/images/gif/upload-file.gif +0 -0
- package/src/assets/images/gif/uploading-file.gif +0 -0
- package/src/components/Assets/ErrorPages/InternalServerError.tsx +7 -7
- package/src/components/Assets/ErrorPages/NoInternetConnection.tsx +7 -7
- package/src/components/Assets/ErrorPages/NoItemFound.tsx +7 -7
- package/src/components/Assets/ErrorPages/PageNotFound.tsx +5 -5
- package/src/components/Assets/ErrorPages/UnAuthorized.tsx +6 -6
- package/src/components/Assets/ErrorPages/styles.tsx +15 -15
- package/src/components/Assets/Icons/IconComponents/AcademicIcon.tsx +7 -1
- package/src/components/Assets/Icons/IconComponents/ActiveDevicesIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/AdminIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/AdministratorIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/AlertFilledIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/ArrowBackIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/AttachmentIcon.tsx +32 -0
- package/src/components/Assets/Icons/IconComponents/BulbIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/CampxFullLogoIcon.tsx +3 -3
- package/src/components/Assets/Icons/IconComponents/CampxIcon.tsx +2 -2
- package/src/components/Assets/Icons/IconComponents/CareerIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/CheckedCheckBoxIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/CheckedRadioIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/ClogWheelIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/CollapseIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/CrossIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/DashBoardIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/DeleteIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/DeviceIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/DocumentIcon.tsx +52 -0
- package/src/components/Assets/Icons/IconComponents/DownloadIcon.tsx +52 -0
- package/src/components/Assets/Icons/IconComponents/EditIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/ExamResultIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/ExcelIcon.tsx +56 -0
- package/src/components/Assets/Icons/IconComponents/ExpandIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/ExportIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/FilterIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/HelpIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/HomeIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/ImageIcon.tsx +44 -0
- package/src/components/Assets/Icons/IconComponents/InfoFilledIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/InfoIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/InstitutionsIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/LeftIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/LocationIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/LogoutIcon.tsx +2 -2
- package/src/components/Assets/Icons/IconComponents/NavigationIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/NoteIcon.tsx +7 -1
- package/src/components/Assets/Icons/IconComponents/NotificationIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/PdfIcon.tsx +52 -0
- package/src/components/Assets/Icons/IconComponents/ProductFeaturesIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/ProfileIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/RedirectIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/RedoIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/RightIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/SaveIcon.tsx +39 -39
- package/src/components/Assets/Icons/IconComponents/SearchIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/ShareIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/SuccessFilledIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/TicketsIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/UncheckCheckBoxIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/UncheckedRadioIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/ViewIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/VisibiityOffIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/VisibilityIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/WarningFilledIcon.tsx +1 -1
- package/src/components/Assets/Icons/Icons.tsx +12 -0
- package/src/components/Assets/export.ts +6 -6
- package/src/components/Charts/BarChart/BarChart.tsx +17 -19
- package/src/components/Charts/LineChart/LineChart.tsx +12 -14
- package/src/components/Charts/PieChart/PieChart.tsx +8 -8
- package/src/components/Charts/TreeMap/TreeMap.tsx +15 -15
- package/src/components/Charts/export.ts +4 -4
- package/src/components/Charts/types/types.ts +3 -3
- package/src/components/DataDisplay/Accordion/Accordion.tsx +2 -0
- package/src/components/DataDisplay/Avatar/Avatar.tsx +14 -3
- package/src/components/DataDisplay/Card/Card.tsx +18 -18
- package/src/components/DataDisplay/Card/styles.tsx +24 -25
- package/src/components/DataDisplay/Chips/Chips.tsx +14 -14
- package/src/components/DataDisplay/DataTable/DataTable.tsx +4 -1
- package/src/components/DataDisplay/DataTable/TablePagination.tsx +10 -10
- package/src/components/DataDisplay/SidePanel/SidePanel.tsx +1 -1
- package/src/components/DataDisplay/Typography/Typography.tsx +1 -1
- package/src/components/Feedback/Alert/Alert.tsx +8 -8
- package/src/components/Feedback/Snackbar/Snackbar.tsx +27 -27
- package/src/components/Feedback/Spinner/Spinner.tsx +2 -2
- package/src/components/Feedback/Tooltip/Tooltip.tsx +6 -6
- package/src/components/Feedback/Tutorial/Tutorial.tsx +45 -45
- package/src/components/Feedback/export.ts +5 -0
- package/src/components/Image/Image.tsx +8 -8
- package/src/components/Input/Button/Button.tsx +2 -2
- package/src/components/Input/DatePicker/DatePicker.tsx +18 -4
- package/src/components/Input/FormActions/FormActions.tsx +15 -4
- package/src/components/Input/FormControlWrapper/FormControlWrapper.tsx +20 -5
- package/src/components/Input/HelpButton/HelpButton.stories.tsx +9 -9
- package/src/components/Input/HelpButton/HelpButton.tsx +4 -4
- package/src/components/Input/IconButtons/IconButtons/DeleteButton.tsx +2 -2
- package/src/components/Input/IconButtons/IconButtons/EditButton.tsx +2 -2
- package/src/components/Input/IconButtons/IconButtons/RedirectButton.tsx +2 -2
- package/src/components/Input/IconButtons/IconButtons/ViewButton.tsx +2 -2
- package/src/components/Input/LabelWrapper/LabelWrapper.tsx +5 -5
- package/src/components/Input/MultiCheckBox/MultiCheckBox.tsx +6 -6
- package/src/components/Input/OtpInput/OtpInput.tsx +17 -17
- package/src/components/Input/PasswordField/PasswordField.tsx +8 -8
- package/src/components/Input/RadioGroup/RadioGroup.tsx +5 -5
- package/src/components/Input/SearchBar/SearchBar.tsx +20 -20
- package/src/components/Input/SingleCheckBox/SIngleCheckBox.tsx +5 -5
- package/src/components/Input/SingleSelect/SingleSelect.tsx +39 -6
- package/src/components/Input/Switch/Switch.tsx +1 -1
- package/src/components/Input/TextField/TextField.tsx +3 -3
- package/src/components/Input/TimePicker/TimePicker.tsx +18 -4
- package/src/components/Input/components/FetchingOptionsLoader.tsx +3 -3
- package/src/components/Input/styles.tsx +6 -6
- package/src/components/Layout/AppHeader/AppHeader.tsx +10 -12
- package/src/components/Layout/AppHeader/AppHeaderActions/CogWheelMenu.tsx +5 -5
- package/src/components/Layout/AppHeader/AppHeaderActions/HeaderActions.tsx +6 -6
- package/src/components/Layout/AppHeader/AppHeaderActions/SwitchInstitution.tsx +37 -37
- package/src/components/Layout/AppHeader/AppHeaderActions/UserBox.tsx +28 -28
- package/src/components/Layout/AppHeader/styles/styles.tsx +24 -24
- package/src/components/Layout/PageHeader/PageHeader.tsx +8 -3
- package/src/components/Layout/TabsLayout/Tabs.tsx +16 -16
- package/src/components/Layout/TabsLayout/TabsLayout.tsx +6 -6
- package/src/components/Layout/export.ts +4 -0
- package/src/components/Navigation/Breadcrumbs/Breadcrumbs.tsx +35 -23
- package/src/components/Navigation/ConfirmDialog/ConfirmDialog.tsx +43 -48
- package/src/components/Navigation/Dialog/Dialog.tsx +33 -0
- package/src/components/Navigation/DialogButton/DialogButton.tsx +17 -81
- package/src/components/Navigation/DropDownMenu/DropDownButton.tsx +4 -4
- package/src/components/Navigation/DropDownMenu/DropDownIcon.tsx +4 -4
- package/src/components/Navigation/DropDownMenu/DropDownMenu.tsx +8 -8
- package/src/components/Navigation/DropDownMenu/DropdownMenuItem.tsx +3 -3
- package/src/components/Navigation/DropDownMenu/styles.tsx +13 -13
- package/src/components/Navigation/PreviewFiles/PreviewFiles.tsx +165 -0
- package/src/components/Navigation/Sidebar/Components.tsx +18 -18
- package/src/components/Navigation/Sidebar/MenuItem.tsx +1 -1
- package/src/components/Navigation/Sidebar/SubMenuItem.tsx +2 -1
- package/src/components/Navigation/Sidebar/interfaces.ts +1 -1
- package/src/components/Navigation/Sidebar/styles.tsx +64 -64
- package/src/components/Navigation/Stepper/Stepper.tsx +5 -5
- package/src/components/Navigation/Stepper/StepperComponents.tsx +15 -15
- package/src/components/Navigation/TabsContainer/TabsContainer.tsx +4 -4
- package/src/components/Navigation/UploadDialog/LoadingUploadDialogContainer.tsx +23 -0
- package/src/components/Navigation/UploadDialog/Styles.tsx +34 -0
- package/src/components/Navigation/UploadDialog/UploadDialog.tsx +143 -0
- package/src/components/Navigation/UploadDialog/UploadDialogContainer.tsx +82 -0
- package/src/components/Navigation/{exports.ts → export.ts} +4 -0
- package/src/components/export.ts +7 -7
- package/src/index.tsx +2 -2
- package/src/store/activeStore.ts +1 -1
- package/src/stories/Assets/Icons.stories.tsx +6 -6
- package/src/stories/Charts/BarChart.stories.tsx +56 -56
- package/src/stories/Charts/LineChart.stories.tsx +49 -49
- package/src/stories/Charts/PieChart.stories.tsx +53 -53
- package/src/stories/Charts/Treemap.stories.tsx +122 -122
- package/src/stories/DataDisplay/AccordionGroup.stories.tsx +11 -12
- package/src/stories/DataDisplay/Card.stories.tsx +34 -34
- package/src/stories/DataDisplay/Chips.stories.tsx +10 -10
- package/src/stories/DataDisplay/CircularAvatar.stories.tsx +6 -6
- package/src/stories/DataDisplay/DataTable.stories.tsx +32 -32
- package/src/stories/DataDisplay/SidePanel.stories.tsx +14 -14
- package/src/stories/DataDisplay/SquareAvatar.stories.tsx +15 -15
- package/src/stories/DesignSystem/colorTokens.stories.tsx +10 -10
- package/src/stories/DesignSystem/typography.stories.tsx +19 -19
- package/src/stories/Feedback/Alert.stories.tsx +9 -9
- package/src/stories/Feedback/Snackbar.stories.tsx +11 -11
- package/src/stories/Feedback/Spinner.stories.tsx +4 -4
- package/src/stories/Feedback/Tooltip.stories.tsx +5 -5
- package/src/stories/Feedback/Tutorial.stories.tsx +13 -13
- package/src/stories/Input/Button.stories.tsx +26 -26
- package/src/stories/Input/DatePicker.stories.tsx +48 -8
- package/src/stories/Input/IconButtons.stories.tsx +6 -6
- package/src/stories/Input/MultiCheckBox.stories.tsx +15 -15
- package/src/stories/Input/OtpInput.stories.tsx +5 -5
- package/src/stories/Input/Password.stories.tsx +7 -7
- package/src/stories/Input/RadioGroup.stories.tsx +14 -14
- package/src/stories/Input/SearchBar.stories.tsx +10 -10
- package/src/stories/Input/SingleCheckBox.stories.tsx +7 -7
- package/src/stories/Input/SingleSelect.stories.tsx +47 -47
- package/src/stories/Input/Switch.stories.tsx +22 -22
- package/src/stories/Input/TextField.stories.tsx +47 -47
- package/src/stories/Input/TimePicker.stories.tsx +44 -7
- package/src/stories/Layout/AppHeader.stories.tsx +13 -13
- package/src/stories/Layout/TabsLayout.stories.tsx +24 -24
- package/src/stories/Navigation/ConfirmDialog.stories.tsx +12 -2
- package/src/stories/Navigation/DialogButton.stories.tsx +38 -45
- package/src/stories/Navigation/DropDownMenu.stories.tsx +24 -24
- package/src/stories/Navigation/FloatingSidebar.stories.tsx +23 -23
- package/src/stories/Navigation/ImportDialog.stories.tsx +45 -0
- package/src/stories/Navigation/PreviewFiles.stories.tsx +80 -0
- package/src/stories/Navigation/Stepper.stories.tsx +15 -15
- package/src/stories/Navigation/TabsContainer.stories.tsx +11 -11
- package/src/themes/MuiThemeProvider.tsx +3 -3
- package/src/themes/colorTokens/colorPalette.tsx +38 -38
- package/src/themes/colorTokens/darkColorTokens.tsx +1 -1
- package/src/themes/colorTokens/lightColorTokens.ts +1 -1
- package/src/themes/commonTheme.ts +13 -3
- package/src/themes/customCssBaseline.ts +2 -2
- package/src/themes/darkTheme.ts +4 -4
- package/src/themes/export.ts +3 -3
- package/src/themes/lightTheme.ts +4 -4
- package/src/utils/constants.ts +5 -5
- package/src/utils/logout.ts +8 -8
- package/src/components/Feedback/exports.ts +0 -5
- package/src/components/Layout/exports.ts +0 -4
- package/src/stories/Navigation/Breadcrumbs.stories.tsx +0 -34
- package/src/utils/campxAxios.ts +0 -18
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
import { GridColDef, GridColumnGroupingModel } from
|
|
2
|
-
import { Meta, StoryObj } from
|
|
3
|
-
import { DataTable } from
|
|
1
|
+
import { GridColDef, GridColumnGroupingModel } from '@mui/x-data-grid';
|
|
2
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
import { DataTable } from '../../components/DataDisplay/DataTable/DataTable';
|
|
4
4
|
// Make sure the path to your component is correct
|
|
5
5
|
|
|
6
6
|
const columns: GridColDef[] = [
|
|
7
|
-
{ field:
|
|
8
|
-
{ field:
|
|
9
|
-
{ field:
|
|
10
|
-
{ field:
|
|
7
|
+
{ field: 'id', headerName: 'ID', flex: 1 },
|
|
8
|
+
{ field: 'firstName', headerName: 'First name', flex: 3 },
|
|
9
|
+
{ field: 'lastName', headerName: 'Last name', flex: 3 },
|
|
10
|
+
{ field: 'age', headerName: 'Age', type: 'number', flex: 1 },
|
|
11
11
|
];
|
|
12
12
|
|
|
13
13
|
const rows = [
|
|
14
|
-
{ id: 1, lastName:
|
|
15
|
-
{ id: 2, lastName:
|
|
16
|
-
{ id: 3, lastName:
|
|
17
|
-
{ id: 4, lastName:
|
|
18
|
-
{ id: 5, lastName:
|
|
19
|
-
{ id: 6, lastName:
|
|
20
|
-
{ id: 7, lastName:
|
|
21
|
-
{ id: 8, lastName:
|
|
22
|
-
{ id: 9, lastName:
|
|
23
|
-
{ id: 10, lastName:
|
|
14
|
+
{ id: 1, lastName: 'Snow', firstName: 'Jon', age: 35 },
|
|
15
|
+
{ id: 2, lastName: 'Lannister', firstName: 'Cersei', age: 42 },
|
|
16
|
+
{ id: 3, lastName: 'Lannister', firstName: 'Jaime', age: 45 },
|
|
17
|
+
{ id: 4, lastName: 'Stark', firstName: 'Arya', age: 16 },
|
|
18
|
+
{ id: 5, lastName: 'Targaryen', firstName: 'Daenerys', age: null },
|
|
19
|
+
{ id: 6, lastName: 'Melisandre', firstName: null, age: 150 },
|
|
20
|
+
{ id: 7, lastName: 'Clifford', firstName: 'Ferrara', age: 44 },
|
|
21
|
+
{ id: 8, lastName: 'Frances', firstName: 'Rossini', age: 36 },
|
|
22
|
+
{ id: 9, lastName: 'Roxie', firstName: 'Harvey', age: 65 },
|
|
23
|
+
{ id: 10, lastName: 'Baratheon', firstName: 'Robert', age: 40 },
|
|
24
24
|
];
|
|
25
25
|
|
|
26
26
|
const columnGroupingModel: GridColumnGroupingModel = [
|
|
27
27
|
{
|
|
28
|
-
groupId:
|
|
29
|
-
headerName:
|
|
30
|
-
description:
|
|
31
|
-
children: [{ field:
|
|
28
|
+
groupId: 'full_name',
|
|
29
|
+
headerName: 'Full Name',
|
|
30
|
+
description: 'Full Name of Character',
|
|
31
|
+
children: [{ field: 'firstName' }, { field: 'lastName' }],
|
|
32
32
|
},
|
|
33
33
|
];
|
|
34
34
|
|
|
35
35
|
// Define the default export with Meta type including the component type
|
|
36
36
|
const meta: Meta<typeof DataTable> = {
|
|
37
|
-
title:
|
|
37
|
+
title: 'DataDisplay/DataTable',
|
|
38
38
|
component: DataTable,
|
|
39
39
|
argTypes: {
|
|
40
40
|
totalCount: {
|
|
41
|
-
control:
|
|
42
|
-
description:
|
|
41
|
+
control: 'number',
|
|
42
|
+
description: 'Total Number of rows',
|
|
43
43
|
},
|
|
44
44
|
limit: {
|
|
45
|
-
control:
|
|
46
|
-
description:
|
|
45
|
+
control: 'number',
|
|
46
|
+
description: 'Total Number of rows',
|
|
47
47
|
},
|
|
48
48
|
offset: {
|
|
49
|
-
control:
|
|
50
|
-
description:
|
|
49
|
+
control: 'number',
|
|
50
|
+
description: 'Total Number of rows',
|
|
51
51
|
},
|
|
52
52
|
onPageChange: {
|
|
53
|
-
action:
|
|
54
|
-
description:
|
|
53
|
+
action: 'onPageChange', // This will log actions in the actions panel of Storybook
|
|
54
|
+
description: 'Callback function when the page changes',
|
|
55
55
|
},
|
|
56
56
|
onLimitChange: {
|
|
57
|
-
action:
|
|
58
|
-
description:
|
|
57
|
+
action: 'onLimitChange', // This will log actions in the actions panel of Storybook
|
|
58
|
+
description: 'Callback function when the limit changes',
|
|
59
59
|
},
|
|
60
60
|
},
|
|
61
61
|
args: {
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { Meta } from
|
|
1
|
+
import { Meta } from '@storybook/react/*';
|
|
2
2
|
import {
|
|
3
3
|
SidePanel,
|
|
4
4
|
SidePanelProps,
|
|
5
|
-
} from
|
|
5
|
+
} from '../../components/DataDisplay/SidePanel/SidePanel';
|
|
6
6
|
|
|
7
7
|
export default {
|
|
8
|
-
title:
|
|
8
|
+
title: 'DataDisplay/SidePanel',
|
|
9
9
|
component: SidePanel,
|
|
10
|
-
tags: [
|
|
10
|
+
tags: ['autodocs'],
|
|
11
11
|
argTypes: {
|
|
12
12
|
children: {
|
|
13
|
-
control:
|
|
14
|
-
description:
|
|
13
|
+
control: 'text',
|
|
14
|
+
description: 'Content inside the Avatar component',
|
|
15
15
|
},
|
|
16
16
|
src: {
|
|
17
|
-
control:
|
|
18
|
-
description:
|
|
17
|
+
control: 'text',
|
|
18
|
+
description: 'Image source for the Avatar component',
|
|
19
19
|
},
|
|
20
20
|
variant: {
|
|
21
21
|
control: {
|
|
22
|
-
type:
|
|
23
|
-
options: [
|
|
22
|
+
type: 'select',
|
|
23
|
+
options: ['circular', 'rounded', 'square'],
|
|
24
24
|
},
|
|
25
|
-
description:
|
|
25
|
+
description: 'Variant of the Avatar component',
|
|
26
26
|
},
|
|
27
27
|
sx: {
|
|
28
|
-
control:
|
|
29
|
-
description:
|
|
28
|
+
control: 'object',
|
|
29
|
+
description: 'Custom styling for the Avatar component',
|
|
30
30
|
},
|
|
31
31
|
},
|
|
32
32
|
} as Meta<typeof SidePanel>;
|
|
@@ -34,6 +34,6 @@ export default {
|
|
|
34
34
|
export const withText = {
|
|
35
35
|
render: (args: SidePanelProps) => <SidePanel {...args} />,
|
|
36
36
|
args: {
|
|
37
|
-
children:
|
|
37
|
+
children: 'SS',
|
|
38
38
|
},
|
|
39
39
|
};
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
// Import React and other necessary elements
|
|
2
2
|
|
|
3
|
-
import { Meta } from
|
|
3
|
+
import { Meta } from '@storybook/react';
|
|
4
4
|
import {
|
|
5
5
|
SquareAvatar,
|
|
6
6
|
SquareAvatarProps,
|
|
7
|
-
} from
|
|
7
|
+
} from '../../components/DataDisplay/Avatar/Avatar';
|
|
8
8
|
|
|
9
9
|
// Define the default export with Meta type including the component type
|
|
10
10
|
export default {
|
|
11
|
-
title:
|
|
11
|
+
title: 'DataDisplay/SquareAvatar',
|
|
12
12
|
component: SquareAvatar,
|
|
13
|
-
tags: [
|
|
13
|
+
tags: ['autodocs'],
|
|
14
14
|
argTypes: {
|
|
15
15
|
children: {
|
|
16
|
-
control:
|
|
17
|
-
description:
|
|
16
|
+
control: 'text',
|
|
17
|
+
description: 'Content inside the SquareAvatar component',
|
|
18
18
|
},
|
|
19
19
|
src: {
|
|
20
|
-
control:
|
|
21
|
-
description:
|
|
20
|
+
control: 'text',
|
|
21
|
+
description: 'Image source for the SquareAvatar component',
|
|
22
22
|
},
|
|
23
23
|
variant: {
|
|
24
24
|
control: {
|
|
25
|
-
type:
|
|
26
|
-
options: [
|
|
25
|
+
type: 'select',
|
|
26
|
+
options: ['circular', 'rounded', 'square'],
|
|
27
27
|
},
|
|
28
|
-
description:
|
|
28
|
+
description: 'Variant of the SquareAvatar component',
|
|
29
29
|
},
|
|
30
30
|
sx: {
|
|
31
|
-
control:
|
|
32
|
-
description:
|
|
31
|
+
control: 'object',
|
|
32
|
+
description: 'Custom styling for the SquareAvatar component',
|
|
33
33
|
},
|
|
34
34
|
},
|
|
35
35
|
} as Meta<typeof SquareAvatar>;
|
|
@@ -38,13 +38,13 @@ export default {
|
|
|
38
38
|
export const withText = {
|
|
39
39
|
render: (args: SquareAvatarProps) => <SquareAvatar {...args} />,
|
|
40
40
|
args: {
|
|
41
|
-
text:
|
|
41
|
+
text: 'SQC01',
|
|
42
42
|
},
|
|
43
43
|
};
|
|
44
44
|
|
|
45
45
|
export const withImage = {
|
|
46
46
|
render: (args: SquareAvatarProps) => <SquareAvatar {...args} />,
|
|
47
47
|
args: {
|
|
48
|
-
src:
|
|
48
|
+
src: 'https://images.unsplash.com/photo-1534528741775-53994a69daeb?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwyNzM3ODF8MHwxfGFsbHwxfHx8fHx8fHwxNjM4MjM2MDg0&ixlib=rb-1.2.1&q=80&w=400',
|
|
49
49
|
},
|
|
50
50
|
};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { Typography } from
|
|
2
|
-
import { DarkColorTokens } from
|
|
3
|
-
import { LightColorTokens } from
|
|
1
|
+
import { Typography } from '../../components/DataDisplay/Typography/Typography';
|
|
2
|
+
import { DarkColorTokens } from '../../themes/colorTokens/darkColorTokens';
|
|
3
|
+
import { LightColorTokens } from '../../themes/colorTokens/lightColorTokens';
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
|
-
title:
|
|
6
|
+
title: 'Design System/Color Palette',
|
|
7
7
|
parameters: {
|
|
8
8
|
controls: { hideNoControlsWarning: true },
|
|
9
9
|
},
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
const ColorBox = ({ color, name }: { color: string; name: string }) => (
|
|
13
|
-
<div style={{ display:
|
|
13
|
+
<div style={{ display: 'flex', alignItems: 'center', marginBottom: 20 }}>
|
|
14
14
|
<div
|
|
15
15
|
style={{
|
|
16
16
|
width: 60,
|
|
17
17
|
height: 60,
|
|
18
18
|
backgroundColor: color,
|
|
19
19
|
marginRight: 10,
|
|
20
|
-
border:
|
|
20
|
+
border: '1px solid #ddd',
|
|
21
21
|
borderRadius: 5,
|
|
22
22
|
}}
|
|
23
23
|
/>
|
|
@@ -51,10 +51,10 @@ const PaletteDisplay = ({
|
|
|
51
51
|
export const ColorPalettes = () => (
|
|
52
52
|
<div
|
|
53
53
|
style={{
|
|
54
|
-
display:
|
|
55
|
-
gridTemplateColumns:
|
|
56
|
-
gap:
|
|
57
|
-
padding:
|
|
54
|
+
display: 'grid',
|
|
55
|
+
gridTemplateColumns: 'repeat(6, 1fr)',
|
|
56
|
+
gap: '20px',
|
|
57
|
+
padding: '20px',
|
|
58
58
|
}}
|
|
59
59
|
>
|
|
60
60
|
<div>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// src/stories/Typography.stories.jsx
|
|
2
|
-
import { Stack } from
|
|
3
|
-
import { Typography } from
|
|
2
|
+
import { Stack } from '@mui/material';
|
|
3
|
+
import { Typography } from '../../components/DataDisplay/Typography/Typography';
|
|
4
4
|
|
|
5
5
|
// Update path as necessary
|
|
6
6
|
|
|
7
7
|
export default {
|
|
8
|
-
title:
|
|
8
|
+
title: 'Design System/Typography',
|
|
9
9
|
component: Typography,
|
|
10
10
|
};
|
|
11
11
|
|
|
@@ -19,11 +19,11 @@ const TypographyDisplay = ({
|
|
|
19
19
|
text: string;
|
|
20
20
|
}) => (
|
|
21
21
|
<div style={{ marginBottom: 20 }}>
|
|
22
|
-
<Typography variant={variant} style={{ margin:
|
|
22
|
+
<Typography variant={variant} style={{ margin: '10px 0' }}>
|
|
23
23
|
{text}
|
|
24
24
|
</Typography>
|
|
25
|
-
<div style={{ fontSize:
|
|
26
|
-
Font: {fontInfo.family}, Weight: {fontInfo.weight}, FontSize:{
|
|
25
|
+
<div style={{ fontSize: '12px', color: '#666' }}>
|
|
26
|
+
Font: {fontInfo.family}, Weight: {fontInfo.weight}, FontSize:{' '}
|
|
27
27
|
{fontInfo.size}
|
|
28
28
|
</div>
|
|
29
29
|
</div>
|
|
@@ -33,52 +33,52 @@ export const TypographyStyles = () => (
|
|
|
33
33
|
<Stack>
|
|
34
34
|
<TypographyDisplay
|
|
35
35
|
variant="h6"
|
|
36
|
-
fontInfo={{ family:
|
|
36
|
+
fontInfo={{ family: 'Poppins', weight: '800', size: '24px' }}
|
|
37
37
|
text="Heading 6 (h6) - Lorem ipsum dolor sit."
|
|
38
38
|
/>
|
|
39
39
|
<TypographyDisplay
|
|
40
40
|
variant="subtitle1"
|
|
41
|
-
fontInfo={{ family:
|
|
41
|
+
fontInfo={{ family: 'Poppins', weight: '600', size: '18px' }}
|
|
42
42
|
text="Subtitle 1 (subtitle1) - Lorem ipsum dolor sit."
|
|
43
43
|
/>
|
|
44
44
|
<TypographyDisplay
|
|
45
45
|
variant="subtitle2"
|
|
46
|
-
fontInfo={{ family:
|
|
46
|
+
fontInfo={{ family: 'Poppins', weight: '500', size: '16px' }}
|
|
47
47
|
text="Subtitle 2 (subtitle2) - Lorem ipsum dolor sit."
|
|
48
48
|
/>
|
|
49
49
|
<TypographyDisplay
|
|
50
50
|
variant="subtitle3"
|
|
51
|
-
fontInfo={{ family:
|
|
51
|
+
fontInfo={{ family: 'Poppins', weight: '400', size: '14px' }}
|
|
52
52
|
text="Subtitle 3 (subtitle3) - Lorem ipsum dolor sit."
|
|
53
53
|
/>
|
|
54
54
|
<TypographyDisplay
|
|
55
55
|
variant="body1"
|
|
56
|
-
fontInfo={{ family:
|
|
56
|
+
fontInfo={{ family: 'Heebo', weight: '600', size: '16px' }}
|
|
57
57
|
text="Body 1 (body1) - Lorem ipsum dolor sit."
|
|
58
58
|
/>
|
|
59
59
|
<TypographyDisplay
|
|
60
60
|
variant="body2"
|
|
61
|
-
fontInfo={{ family:
|
|
61
|
+
fontInfo={{ family: 'Heebo', weight: '400', size: '14px' }}
|
|
62
62
|
text="Body 2 (body2) - Lorem ipsum dolor sit."
|
|
63
63
|
/>
|
|
64
64
|
<TypographyDisplay
|
|
65
65
|
variant="caption"
|
|
66
|
-
fontInfo={{ family:
|
|
66
|
+
fontInfo={{ family: 'Heebo', weight: '400', size: '12px' }}
|
|
67
67
|
text="Caption (caption) - Lorem ipsum dolor sit."
|
|
68
68
|
/>
|
|
69
69
|
<TypographyDisplay
|
|
70
|
-
variant={
|
|
71
|
-
fontInfo={{ family:
|
|
70
|
+
variant={'label1' as any}
|
|
71
|
+
fontInfo={{ family: 'Heebo', weight: '400', size: '14px' }}
|
|
72
72
|
text="Label 1 (label1) - Lorem ipsum dolor sit."
|
|
73
73
|
/>
|
|
74
74
|
<TypographyDisplay
|
|
75
|
-
variant={
|
|
76
|
-
fontInfo={{ family:
|
|
75
|
+
variant={'label2' as any}
|
|
76
|
+
fontInfo={{ family: 'Poppins', weight: '400', size: '12px' }}
|
|
77
77
|
text="Label 2 (label2) - Lorem ipsum dolor sit."
|
|
78
78
|
/>
|
|
79
79
|
<TypographyDisplay
|
|
80
|
-
variant={
|
|
81
|
-
fontInfo={{ family:
|
|
80
|
+
variant={'button1' as any}
|
|
81
|
+
fontInfo={{ family: 'Poppins', weight: '600', size: '14px' }}
|
|
82
82
|
text="Button 1 (button1) - Lorem ipsum dolor sit."
|
|
83
83
|
/>
|
|
84
84
|
</Stack>
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { Meta, StoryObj } from
|
|
2
|
-
import { Alert } from
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Alert } from '../../components/export';
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
|
-
title:
|
|
5
|
+
title: 'Feedback/Alert',
|
|
6
6
|
component: Alert,
|
|
7
|
-
tags: [
|
|
7
|
+
tags: ['autodocs'],
|
|
8
8
|
argTypes: {
|
|
9
9
|
severity: {
|
|
10
10
|
control: {
|
|
11
|
-
type:
|
|
12
|
-
options: [
|
|
11
|
+
type: 'select',
|
|
12
|
+
options: ['success', 'info', 'warning', 'error'],
|
|
13
13
|
},
|
|
14
14
|
},
|
|
15
|
-
message: { control:
|
|
15
|
+
message: { control: 'text' },
|
|
16
16
|
},
|
|
17
17
|
} as Meta<typeof Alert>;
|
|
18
18
|
|
|
19
19
|
export const AlertSuccess: StoryObj<typeof Alert> = {
|
|
20
20
|
render: (args) => <Alert {...args} />,
|
|
21
21
|
args: {
|
|
22
|
-
severity:
|
|
23
|
-
message:
|
|
22
|
+
severity: 'success',
|
|
23
|
+
message: 'Success Message Comes Here',
|
|
24
24
|
},
|
|
25
25
|
};
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { Meta, StoryObj } from
|
|
2
|
-
import { Snackbar } from
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Snackbar } from '../../components/export';
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
|
-
title:
|
|
5
|
+
title: 'Feedback/Snackbar',
|
|
6
6
|
component: Snackbar,
|
|
7
|
-
tags: [
|
|
7
|
+
tags: ['autodocs'],
|
|
8
8
|
argTypes: {
|
|
9
9
|
severity: {
|
|
10
10
|
control: {
|
|
11
|
-
type:
|
|
12
|
-
options: [
|
|
11
|
+
type: 'select',
|
|
12
|
+
options: ['success', 'info', 'warning', 'error'],
|
|
13
13
|
},
|
|
14
14
|
},
|
|
15
|
-
message: { control:
|
|
16
|
-
open: { control:
|
|
17
|
-
onClose: { action:
|
|
15
|
+
message: { control: 'text' },
|
|
16
|
+
open: { control: 'boolean' },
|
|
17
|
+
onClose: { action: 'closed' },
|
|
18
18
|
},
|
|
19
19
|
} as Meta<typeof Snackbar>;
|
|
20
20
|
|
|
21
21
|
export const SnackbarSuccess: StoryObj<typeof Snackbar> = {
|
|
22
22
|
render: (args) => <Snackbar {...args} />,
|
|
23
23
|
args: {
|
|
24
|
-
severity:
|
|
25
|
-
message:
|
|
24
|
+
severity: 'success',
|
|
25
|
+
message: 'Success or error or info or warning',
|
|
26
26
|
open: true,
|
|
27
27
|
},
|
|
28
28
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// Import React and other necessary elements
|
|
2
|
-
import { Meta } from
|
|
3
|
-
import { Spinner } from
|
|
2
|
+
import { Meta } from '@storybook/react';
|
|
3
|
+
import { Spinner } from '../../components/export';
|
|
4
4
|
|
|
5
5
|
// Make sure your TextField import is correct
|
|
6
6
|
|
|
7
7
|
// Define the default export with Meta type including the component type
|
|
8
8
|
export default {
|
|
9
|
-
title:
|
|
9
|
+
title: 'Feedback/Spinner',
|
|
10
10
|
component: Spinner,
|
|
11
|
-
tags: [
|
|
11
|
+
tags: ['autodocs'],
|
|
12
12
|
argTypes: {},
|
|
13
13
|
} as Meta<typeof Spinner>;
|
|
14
14
|
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { Meta, StoryObj } from
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
2
|
import {
|
|
3
3
|
Button,
|
|
4
4
|
Icons,
|
|
5
5
|
Tooltip,
|
|
6
6
|
ToolTipContent,
|
|
7
|
-
} from
|
|
7
|
+
} from '../../components/export';
|
|
8
8
|
|
|
9
9
|
export default {
|
|
10
|
-
title:
|
|
10
|
+
title: 'Feedback/Tooltip',
|
|
11
11
|
component: Tooltip,
|
|
12
|
-
tags: [
|
|
12
|
+
tags: ['autodocs'],
|
|
13
13
|
argTypes: {
|
|
14
14
|
icon: { control: false },
|
|
15
|
-
message: { control:
|
|
15
|
+
message: { control: 'text' },
|
|
16
16
|
},
|
|
17
17
|
} as Meta<typeof Tooltip>;
|
|
18
18
|
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { Meta, StoryObj } from
|
|
2
|
-
import { Tutorial, Typography } from
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Tutorial, Typography } from '../../components/export';
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
|
-
title:
|
|
5
|
+
title: 'Feedback/Tutorial',
|
|
6
6
|
component: Tutorial,
|
|
7
7
|
parameters: {
|
|
8
8
|
controls: {
|
|
9
|
-
exclude: [
|
|
9
|
+
exclude: ['children'],
|
|
10
10
|
},
|
|
11
11
|
},
|
|
12
12
|
argTypes: {
|
|
13
13
|
iconPosition: {
|
|
14
|
-
control: { type:
|
|
15
|
-
options: [
|
|
16
|
-
defaultValue:
|
|
14
|
+
control: { type: 'radio' },
|
|
15
|
+
options: ['left', 'right'],
|
|
16
|
+
defaultValue: 'right',
|
|
17
17
|
},
|
|
18
|
-
tourName: { control:
|
|
19
|
-
steps: { control:
|
|
18
|
+
tourName: { control: 'text' },
|
|
19
|
+
steps: { control: 'object' },
|
|
20
20
|
},
|
|
21
21
|
} as Meta<typeof Tutorial>;
|
|
22
22
|
|
|
@@ -26,13 +26,13 @@ export const PrimaryTutorial: StoryObj<typeof Tutorial> = {
|
|
|
26
26
|
{/* Placeholder elements for the tutorial */}
|
|
27
27
|
<div
|
|
28
28
|
className="tutorial-target"
|
|
29
|
-
style={{ margin:
|
|
29
|
+
style={{ margin: '20px', border: '2px solid blue', padding: '10px' }}
|
|
30
30
|
>
|
|
31
31
|
Target 1: This element is the first target of the tutorial.
|
|
32
32
|
</div>
|
|
33
33
|
<div
|
|
34
34
|
className="next-target"
|
|
35
|
-
style={{ margin:
|
|
35
|
+
style={{ margin: '20px', border: '2px solid green', padding: '10px' }}
|
|
36
36
|
>
|
|
37
37
|
Target 2: This element is the next target of the tutorial.
|
|
38
38
|
</div>
|
|
@@ -41,11 +41,11 @@ export const PrimaryTutorial: StoryObj<typeof Tutorial> = {
|
|
|
41
41
|
</div>
|
|
42
42
|
),
|
|
43
43
|
args: {
|
|
44
|
-
tourName:
|
|
44
|
+
tourName: 'Active Batches',
|
|
45
45
|
showProgress: false,
|
|
46
46
|
steps: [
|
|
47
47
|
{
|
|
48
|
-
target:
|
|
48
|
+
target: '.tutorial-target',
|
|
49
49
|
content: (
|
|
50
50
|
<>
|
|
51
51
|
<div>
|
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
// Import React and other necessary elements
|
|
2
|
-
import { Meta } from
|
|
3
|
-
import { Button, ButtonProps } from
|
|
2
|
+
import { Meta } from '@storybook/react';
|
|
3
|
+
import { Button, ButtonProps } from '../../components/Input/Button/Button';
|
|
4
4
|
|
|
5
5
|
// Make sure your TextField import is correct
|
|
6
6
|
|
|
7
7
|
// Define the default export with Meta type including the component type
|
|
8
8
|
export default {
|
|
9
|
-
title:
|
|
9
|
+
title: 'Input/Button',
|
|
10
10
|
component: Button,
|
|
11
|
-
tags: [
|
|
11
|
+
tags: ['autodocs'],
|
|
12
12
|
parameters: {
|
|
13
13
|
design: {
|
|
14
|
-
type:
|
|
15
|
-
url:
|
|
14
|
+
type: 'figma',
|
|
15
|
+
url: 'https://www.figma.com/design/S5t9x8kNHEuzBGv6305qLf/Srikanth-PlayGround?node-id=2-20', // Replace with your actual Figma link
|
|
16
16
|
},
|
|
17
17
|
},
|
|
18
18
|
argTypes: {
|
|
19
19
|
variant: {
|
|
20
|
-
control:
|
|
21
|
-
options: [
|
|
22
|
-
description:
|
|
20
|
+
control: 'select',
|
|
21
|
+
options: ['contained', 'outlined', 'text', 'string'],
|
|
22
|
+
description: 'The Button Variant to use',
|
|
23
23
|
},
|
|
24
24
|
children: {
|
|
25
|
-
control:
|
|
26
|
-
description:
|
|
25
|
+
control: 'text',
|
|
26
|
+
description: 'text in button',
|
|
27
27
|
},
|
|
28
28
|
color: {
|
|
29
|
-
control:
|
|
30
|
-
options: [
|
|
31
|
-
description:
|
|
29
|
+
control: 'select',
|
|
30
|
+
options: ['primary', 'secondary'],
|
|
31
|
+
description: 'The Button Variant to use',
|
|
32
32
|
},
|
|
33
33
|
disabled: {
|
|
34
|
-
control:
|
|
35
|
-
description:
|
|
34
|
+
control: 'boolean',
|
|
35
|
+
description: 'Disabled Button',
|
|
36
36
|
defaultValue: false,
|
|
37
37
|
},
|
|
38
38
|
loading: {
|
|
39
|
-
control:
|
|
40
|
-
description:
|
|
39
|
+
control: 'boolean',
|
|
40
|
+
description: 'Loading Button',
|
|
41
41
|
defaultValue: false,
|
|
42
42
|
},
|
|
43
43
|
},
|
|
@@ -47,18 +47,18 @@ export default {
|
|
|
47
47
|
export const Primary = {
|
|
48
48
|
render: (args: ButtonProps) => <Button {...args} />,
|
|
49
49
|
args: {
|
|
50
|
-
color:
|
|
51
|
-
variant:
|
|
52
|
-
children:
|
|
50
|
+
color: 'primary',
|
|
51
|
+
variant: 'contained',
|
|
52
|
+
children: 'Primary Button',
|
|
53
53
|
},
|
|
54
54
|
};
|
|
55
55
|
|
|
56
56
|
export const Secondary = {
|
|
57
57
|
render: (args: ButtonProps) => <Button {...args} />,
|
|
58
58
|
args: {
|
|
59
|
-
color:
|
|
60
|
-
variant:
|
|
61
|
-
children:
|
|
59
|
+
color: 'secondary',
|
|
60
|
+
variant: 'contained',
|
|
61
|
+
children: 'Secondary Button',
|
|
62
62
|
},
|
|
63
63
|
};
|
|
64
64
|
|
|
@@ -66,7 +66,7 @@ export const Disabled = {
|
|
|
66
66
|
render: (args: ButtonProps) => <Button {...args} />,
|
|
67
67
|
args: {
|
|
68
68
|
disabled: true,
|
|
69
|
-
variant:
|
|
70
|
-
children:
|
|
69
|
+
variant: 'contained',
|
|
70
|
+
children: 'Disabled Button',
|
|
71
71
|
},
|
|
72
72
|
};
|