@sikka/hawa 0.0.12 → 0.0.15
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/es/index.es.js +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
- package/src/blocks/Account/UserProfileForm.js +3 -4
- package/src/blocks/Account/UserSettingsForm.js +3 -7
- package/src/blocks/AuthForms/NewPasswordForm.js +57 -38
- package/src/blocks/AuthForms/ResetPasswordForm.js +36 -39
- package/src/blocks/AuthForms/SignInForm.js +73 -65
- package/src/blocks/AuthForms/SignUpForm.js +61 -44
- package/src/blocks/Payment/ChargeWalletForm.js +1 -1
- package/src/blocks/Payment/CreditCardForm.js +1 -1
- package/src/blocks/Payment/PayWithWallet.js +1 -1
- package/src/blocks/Payment/SelectPayment.js +1 -1
- package/src/blocks/Pricing/PricingPlans.js +57 -0
- package/src/{ui → elements}/ActionButton.js +0 -0
- package/src/elements/AdaptiveButton.js +32 -0
- package/src/{ui → elements}/AutoCompleteField.js +0 -0
- package/src/{ui → elements}/DragDropImages.js +0 -0
- package/src/{ui → elements}/Hawa.js +0 -0
- package/src/{ui → elements}/HawaAlert.js +1 -1
- package/src/elements/HawaAppBar.js +139 -0
- package/src/{ui → elements}/HawaButton.js +0 -0
- package/src/{ui → elements}/HawaCheckbox.js +0 -0
- package/src/{ui → elements}/HawaInputLabel.js +0 -0
- package/src/elements/HawaListItem.js +21 -0
- package/src/{ui → elements}/HawaLogoButton.js +0 -0
- package/src/elements/HawaPricingCard.js +133 -0
- package/src/{ui → elements}/HawaRadio.js +1 -1
- package/src/elements/HawaSettingsRow.js +27 -0
- package/src/elements/HawaSwitch.js +6 -0
- package/src/{ui → elements}/HawaTextArea.js +0 -0
- package/src/elements/HawaTextField.js +26 -0
- package/src/{ui → elements}/HawaTypography.js +0 -0
- package/src/{ui → elements}/RadioBox.js +0 -0
- package/src/{ui → elements}/Row.js +0 -0
- package/src/{ui → elements}/SelectedField.js +0 -0
- package/src/{ui → elements}/StyledTooltip.js +0 -0
- package/src/{ui → elements}/TabPanel.js +0 -0
- package/src/{ui → elements}/index.js +3 -1
- package/src/layout/HawaAppLayout.js +246 -0
- package/src/layout/index.js +1 -0
- package/src/stories/BlocksStories/Account/UserSettings.stories.js +36 -2
- package/src/stories/BlocksStories/Auth/NewPassword.stories.js +2 -1
- package/src/stories/BlocksStories/Auth/ResetPassword.stories.js +1 -2
- package/src/stories/BlocksStories/Auth/SignUp.stories.js +1 -0
- package/src/stories/BlocksStories/Pricing/BillingPlans.stories.js +63 -0
- package/src/stories/BlocksStories/Pricing/LandingPlans.stories.js +63 -0
- package/src/stories/ElementsStories/AdaptiveButton.stories.js +51 -0
- package/src/stories/{UIStories → ElementsStories}/Alert.stories.js +1 -1
- package/src/stories/{UIStories → ElementsStories}/InputLabel.stories.js +1 -1
- package/src/stories/ElementsStories/ItemCard.stories.js +18 -0
- package/src/stories/{UIStories → ElementsStories}/LogoButtons.stories.js +1 -1
- package/src/stories/ElementsStories/PricingCard.stories.js +91 -0
- package/src/stories/ElementsStories/RadioSelector.stories.js +36 -0
- package/src/stories/ElementsStories/SettingsRow.stories.js +63 -0
- package/src/stories/{UIStories → ElementsStories}/TextField.stories.js +1 -1
- package/src/stories/LayoutStories/AppBar.stories.js +29 -0
- package/src/stories/LayoutStories/AppLayout.stories.js +52 -0
- package/src/stories/LayoutStories/Box.stories.js +4 -13
- package/src/styles.css +1 -0
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/index.html +1 -1
- package/storybook-static/main.66955578.iframe.bundle.js +1 -0
- package/storybook-static/vendors~main.b4186832.iframe.bundle.js +76 -0
- package/storybook-static/{vendors~main.f8d30727.iframe.bundle.js.LICENSE.txt → vendors~main.b4186832.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/vendors~main.b4186832.iframe.bundle.js.map +1 -0
- package/src/stories/UIStories/ActionButton.stories.js +0 -41
- package/src/stories/UIStories/AdaptiveButton.stories.js +0 -76
- package/src/stories/UIStories/CheckBox.stories.js +0 -34
- package/src/stories/UIStories/RadioSelector.stories.js +0 -24
- package/src/stories/UIStories/SettingsRow.stories.js +0 -51
- package/src/themes/HawaProvider.js +0 -192
- package/src/themes/QawaimTheme.js +0 -199
- package/src/ui/AdaptiveButton.js +0 -131
- package/src/ui/HawaSettingsRow.js +0 -45
- package/src/ui/HawaTextField.js +0 -160
- package/storybook-static/main.a9a16923.iframe.bundle.js +0 -1
- package/storybook-static/vendors~main.f8d30727.iframe.bundle.js +0 -76
- package/storybook-static/vendors~main.f8d30727.iframe.bundle.js.map +0 -1
|
File without changes
|
|
File without changes
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export * from "./AdaptiveButton";
|
|
2
2
|
export * from "./ActionButton";
|
|
3
|
+
export * from "./HawaListItem";
|
|
4
|
+
export * from "./HawaAppBar";
|
|
3
5
|
export * from "./HawaCheckbox";
|
|
4
6
|
export * from "./HawaRadio";
|
|
5
|
-
|
|
7
|
+
export * from "./HawaPricingCard";
|
|
6
8
|
export * from "./HawaSettingsRow";
|
|
7
9
|
export * from "./HawaLogoButton";
|
|
8
10
|
export * from "./HawaButton";
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { styled, useTheme } from "@mui/material/styles";
|
|
3
|
+
import Box from "@mui/material/Box";
|
|
4
|
+
import MuiDrawer from "@mui/material/Drawer";
|
|
5
|
+
import MuiAppBar from "@mui/material/AppBar";
|
|
6
|
+
import Toolbar from "@mui/material/Toolbar";
|
|
7
|
+
import List from "@mui/material/List";
|
|
8
|
+
// import CssBaseline from "@mui/material/CssBaseline";
|
|
9
|
+
import Typography from "@mui/material/Typography";
|
|
10
|
+
import Divider from "@mui/material/Divider";
|
|
11
|
+
import IconButton from "@mui/material/IconButton";
|
|
12
|
+
import MenuIcon from "@mui/icons-material/Menu";
|
|
13
|
+
import ChevronLeftIcon from "@mui/icons-material/ChevronLeft";
|
|
14
|
+
import ChevronRightIcon from "@mui/icons-material/ChevronRight";
|
|
15
|
+
import ListItemButton from "@mui/material/ListItemButton";
|
|
16
|
+
import ListItemIcon from "@mui/material/ListItemIcon";
|
|
17
|
+
import ListItemText from "@mui/material/ListItemText";
|
|
18
|
+
import InboxIcon from "@mui/icons-material/MoveToInbox";
|
|
19
|
+
import MailIcon from "@mui/icons-material/Mail";
|
|
20
|
+
import { HawaListItem } from "../elements";
|
|
21
|
+
import Menu from "@mui/material/Menu";
|
|
22
|
+
import Container from "@mui/material/Container";
|
|
23
|
+
import Avatar from "@mui/material/Avatar";
|
|
24
|
+
import Button from "@mui/material/Button";
|
|
25
|
+
import Tooltip from "@mui/material/Tooltip";
|
|
26
|
+
import MenuItem from "@mui/material/MenuItem";
|
|
27
|
+
|
|
28
|
+
const drawerWidth = 240;
|
|
29
|
+
|
|
30
|
+
const openedMixin = (theme) => ({
|
|
31
|
+
width: drawerWidth,
|
|
32
|
+
transition: theme.transitions.create("width", {
|
|
33
|
+
easing: theme.transitions.easing.sharp,
|
|
34
|
+
duration: theme.transitions.duration.enteringScreen
|
|
35
|
+
}),
|
|
36
|
+
overflowX: "hidden"
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
const closedMixin = (theme) => ({
|
|
40
|
+
transition: theme.transitions.create("width", {
|
|
41
|
+
easing: theme.transitions.easing.sharp,
|
|
42
|
+
duration: theme.transitions.duration.leavingScreen
|
|
43
|
+
}),
|
|
44
|
+
overflowX: "hidden",
|
|
45
|
+
width: `calc(${theme.spacing(7)} + 1px)`,
|
|
46
|
+
[theme.breakpoints.up("sm")]: {
|
|
47
|
+
width: `calc(${theme.spacing(8)} + 1px)`
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
const DrawerHeader = styled("div")(({ theme }) => ({
|
|
52
|
+
display: "flex",
|
|
53
|
+
alignItems: "center",
|
|
54
|
+
justifyContent: "flex-end",
|
|
55
|
+
padding: theme.spacing(0, 1),
|
|
56
|
+
// necessary for content to be below app bar
|
|
57
|
+
...theme.mixins.toolbar
|
|
58
|
+
}));
|
|
59
|
+
|
|
60
|
+
const AppBar = styled(MuiAppBar, {
|
|
61
|
+
shouldForwardProp: (prop) => prop !== "open"
|
|
62
|
+
})(({ theme, open }) => ({
|
|
63
|
+
zIndex: theme.zIndex.drawer + 1,
|
|
64
|
+
transition: theme.transitions.create(["width", "margin"], {
|
|
65
|
+
easing: theme.transitions.easing.sharp,
|
|
66
|
+
duration: theme.transitions.duration.leavingScreen
|
|
67
|
+
}),
|
|
68
|
+
...(open && {
|
|
69
|
+
marginLeft: drawerWidth,
|
|
70
|
+
width: `calc(100% - ${drawerWidth}px)`,
|
|
71
|
+
transition: theme.transitions.create(["width", "margin"], {
|
|
72
|
+
easing: theme.transitions.easing.sharp,
|
|
73
|
+
duration: theme.transitions.duration.enteringScreen
|
|
74
|
+
})
|
|
75
|
+
})
|
|
76
|
+
}));
|
|
77
|
+
|
|
78
|
+
const Drawer = styled(MuiDrawer, {
|
|
79
|
+
shouldForwardProp: (prop) => prop !== "open"
|
|
80
|
+
})(({ theme, open }) => ({
|
|
81
|
+
width: drawerWidth,
|
|
82
|
+
flexShrink: 0,
|
|
83
|
+
whiteSpace: "nowrap",
|
|
84
|
+
boxSizing: "border-box",
|
|
85
|
+
...(open && {
|
|
86
|
+
...openedMixin(theme),
|
|
87
|
+
"& .MuiDrawer-paper": openedMixin(theme)
|
|
88
|
+
}),
|
|
89
|
+
...(!open && {
|
|
90
|
+
...closedMixin(theme),
|
|
91
|
+
"& .MuiDrawer-paper": closedMixin(theme)
|
|
92
|
+
})
|
|
93
|
+
}));
|
|
94
|
+
|
|
95
|
+
export function HawaAppLayout(props) {
|
|
96
|
+
const theme = useTheme();
|
|
97
|
+
const [open, setOpen] = React.useState(true);
|
|
98
|
+
|
|
99
|
+
const [anchorElNav, setAnchorElNav] = React.useState(null);
|
|
100
|
+
const [anchorElUser, setAnchorElUser] = React.useState(null);
|
|
101
|
+
|
|
102
|
+
const handleOpenNavMenu = (event) => {
|
|
103
|
+
setAnchorElNav(event.currentTarget);
|
|
104
|
+
};
|
|
105
|
+
const handleOpenUserMenu = (event) => {
|
|
106
|
+
setAnchorElUser(event.currentTarget);
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
const handleCloseNavMenu = () => {
|
|
110
|
+
setAnchorElNav(null);
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
const handleCloseUserMenu = () => {
|
|
114
|
+
setAnchorElUser(null);
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
const handleDrawerOpen = () => {
|
|
118
|
+
setOpen(true);
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
const handleDrawerClose = () => {
|
|
122
|
+
setOpen(false);
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
return (
|
|
126
|
+
<Box sx={{ display: "flex" }}>
|
|
127
|
+
{/* <CssBaseline /> */}
|
|
128
|
+
<AppBar variant="appbar" position="fixed" open={open}>
|
|
129
|
+
<Toolbar variant="appbar">
|
|
130
|
+
<IconButton
|
|
131
|
+
color="inherit"
|
|
132
|
+
aria-label="open drawer"
|
|
133
|
+
onClick={handleDrawerOpen}
|
|
134
|
+
edge="start"
|
|
135
|
+
sx={{
|
|
136
|
+
marginRight: 5,
|
|
137
|
+
...(open && { display: "none" })
|
|
138
|
+
}}
|
|
139
|
+
>
|
|
140
|
+
<MenuIcon />
|
|
141
|
+
</IconButton>
|
|
142
|
+
|
|
143
|
+
<div
|
|
144
|
+
style={{
|
|
145
|
+
// backgroundColor: "red",
|
|
146
|
+
display: "flex",
|
|
147
|
+
flexDirection: "row",
|
|
148
|
+
justifyContent: "space-between",
|
|
149
|
+
alignItems: "center",
|
|
150
|
+
width: "100%",
|
|
151
|
+
margin: 0
|
|
152
|
+
}}
|
|
153
|
+
>
|
|
154
|
+
<Typography variant="h6" noWrap component="div">
|
|
155
|
+
Page name here
|
|
156
|
+
</Typography>
|
|
157
|
+
|
|
158
|
+
<Box>
|
|
159
|
+
<Tooltip title="Open settings">
|
|
160
|
+
<IconButton onClick={handleOpenUserMenu} sx={{ p: 0 }}>
|
|
161
|
+
<Avatar alt="Remy Sharp" src="/static/images/avatar/2.jpg" />
|
|
162
|
+
</IconButton>
|
|
163
|
+
</Tooltip>
|
|
164
|
+
<Menu
|
|
165
|
+
sx={{ mt: "45px" }}
|
|
166
|
+
id="menu-appbar"
|
|
167
|
+
anchorEl={anchorElUser}
|
|
168
|
+
anchorOrigin={{
|
|
169
|
+
vertical: "top",
|
|
170
|
+
horizontal: "right"
|
|
171
|
+
}}
|
|
172
|
+
keepMounted
|
|
173
|
+
transformOrigin={{
|
|
174
|
+
vertical: "top",
|
|
175
|
+
horizontal: "right"
|
|
176
|
+
}}
|
|
177
|
+
open={Boolean(anchorElUser)}
|
|
178
|
+
onClose={handleCloseUserMenu}
|
|
179
|
+
>
|
|
180
|
+
{[2, 3, 4].map((setting) => (
|
|
181
|
+
<MenuItem key={setting} onClick={handleCloseUserMenu}>
|
|
182
|
+
<Typography textAlign="center">{setting}</Typography>
|
|
183
|
+
</MenuItem>
|
|
184
|
+
))}
|
|
185
|
+
</Menu>
|
|
186
|
+
</Box>
|
|
187
|
+
</div>
|
|
188
|
+
</Toolbar>
|
|
189
|
+
</AppBar>
|
|
190
|
+
<Drawer variant="permanent" open={open}>
|
|
191
|
+
<DrawerHeader>
|
|
192
|
+
{props.logo}
|
|
193
|
+
<IconButton onClick={handleDrawerClose}>
|
|
194
|
+
{theme.direction === "rtl" ? (
|
|
195
|
+
<ChevronRightIcon />
|
|
196
|
+
) : (
|
|
197
|
+
<ChevronLeftIcon />
|
|
198
|
+
)}
|
|
199
|
+
</IconButton>
|
|
200
|
+
</DrawerHeader>
|
|
201
|
+
<Divider />
|
|
202
|
+
<List>
|
|
203
|
+
{props.pages.map((t) => {
|
|
204
|
+
return (
|
|
205
|
+
<HawaListItem
|
|
206
|
+
open={open}
|
|
207
|
+
text={t.text}
|
|
208
|
+
selected={props.pageName.toLowerCase() === t.text}
|
|
209
|
+
// icon={<ChevronLeftIcon />}
|
|
210
|
+
icon={t.icon}
|
|
211
|
+
/>
|
|
212
|
+
);
|
|
213
|
+
})}
|
|
214
|
+
</List>
|
|
215
|
+
<Divider />
|
|
216
|
+
<List>
|
|
217
|
+
{["All mail", "Trash", "Spam"].map((text, index) => (
|
|
218
|
+
<ListItemButton
|
|
219
|
+
key={text}
|
|
220
|
+
sx={{
|
|
221
|
+
minHeight: 48,
|
|
222
|
+
justifyContent: open ? "initial" : "center",
|
|
223
|
+
px: 2.5
|
|
224
|
+
}}
|
|
225
|
+
>
|
|
226
|
+
<ListItemIcon
|
|
227
|
+
sx={{
|
|
228
|
+
minWidth: 0,
|
|
229
|
+
mr: open ? 3 : "auto",
|
|
230
|
+
justifyContent: "center"
|
|
231
|
+
}}
|
|
232
|
+
>
|
|
233
|
+
{index % 2 === 0 ? <InboxIcon /> : <MailIcon />}
|
|
234
|
+
</ListItemIcon>
|
|
235
|
+
<ListItemText primary={text} sx={{ opacity: open ? 1 : 0 }} />
|
|
236
|
+
</ListItemButton>
|
|
237
|
+
))}
|
|
238
|
+
</List>
|
|
239
|
+
</Drawer>
|
|
240
|
+
<Box sx={{ flexGrow: 1, p: 3 }}>
|
|
241
|
+
<DrawerHeader />
|
|
242
|
+
{props.children}
|
|
243
|
+
</Box>
|
|
244
|
+
</Box>
|
|
245
|
+
);
|
|
246
|
+
}
|
package/src/layout/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { UserSettingsForm } from "../../../blocks/Account";
|
|
3
|
+
import { HawaSettingsRow } from "../../../elements";
|
|
3
4
|
|
|
4
5
|
export default {
|
|
5
6
|
title: "Blocks/Account/User Settings",
|
|
@@ -11,9 +12,42 @@ export default {
|
|
|
11
12
|
}
|
|
12
13
|
}
|
|
13
14
|
};
|
|
14
|
-
|
|
15
15
|
export const UserSettings = (args) => {
|
|
16
|
-
return
|
|
16
|
+
return (
|
|
17
|
+
<UserSettingsForm {...args}>
|
|
18
|
+
<HawaSettingsRow settingsType="checkbox" settingsLabel="Hide Watermark" />
|
|
19
|
+
<HawaSettingsRow
|
|
20
|
+
settingsType="text"
|
|
21
|
+
placeholder="Your handle"
|
|
22
|
+
settingsLabel="Custom Handle"
|
|
23
|
+
/>
|
|
24
|
+
<HawaSettingsRow
|
|
25
|
+
handleChange={(e) => console.log("changing to ", e)}
|
|
26
|
+
settingsType="radio"
|
|
27
|
+
defaultValue="sar"
|
|
28
|
+
options={[
|
|
29
|
+
{ value: "sar", label: "SAR" },
|
|
30
|
+
{ value: "usd", label: "USD" }
|
|
31
|
+
]}
|
|
32
|
+
settingsLabel="Currency"
|
|
33
|
+
/>
|
|
34
|
+
<HawaSettingsRow
|
|
35
|
+
handleChange={(e) => console.log("changing to ", e)}
|
|
36
|
+
settingsType="radio"
|
|
37
|
+
defaultValue="en"
|
|
38
|
+
options={[
|
|
39
|
+
{ value: "en", label: "English" },
|
|
40
|
+
{ value: "ar", label: "Arabic" }
|
|
41
|
+
]}
|
|
42
|
+
settingsLabel="Language"
|
|
43
|
+
/>
|
|
44
|
+
<HawaSettingsRow
|
|
45
|
+
settingsType="boolean"
|
|
46
|
+
placeholder="Your handle"
|
|
47
|
+
settingsLabel="Show Analytics"
|
|
48
|
+
/>
|
|
49
|
+
</UserSettingsForm>
|
|
50
|
+
);
|
|
17
51
|
};
|
|
18
52
|
UserSettings.args = {
|
|
19
53
|
theme: "primary",
|
|
@@ -5,7 +5,6 @@ export default {
|
|
|
5
5
|
title: "Blocks/Auth/New Password",
|
|
6
6
|
component: [NewPasswordForm],
|
|
7
7
|
argTypes: {
|
|
8
|
-
|
|
9
8
|
showError: {
|
|
10
9
|
default: false,
|
|
11
10
|
control: "boolean",
|
|
@@ -41,6 +40,8 @@ const NewPasswordTemplate = (args) => {
|
|
|
41
40
|
passwordLabel: "Choose new password",
|
|
42
41
|
confirmPasswordPlaceholder: "Confirm password",
|
|
43
42
|
confirmPasswordLabel: "Confirm",
|
|
43
|
+
confirmPasswordRequiredText: "Confirmation is required",
|
|
44
|
+
passwordMatchError: "Password doesn't match",
|
|
44
45
|
forgotPasswordText: "Forgot password?",
|
|
45
46
|
newUserText: "New user?",
|
|
46
47
|
signUpText: "Sign up",
|
|
@@ -5,7 +5,6 @@ export default {
|
|
|
5
5
|
title: "Blocks/Auth/Reset Password",
|
|
6
6
|
component: [ResetPasswordForm],
|
|
7
7
|
argTypes: {
|
|
8
|
-
|
|
9
8
|
showError: {
|
|
10
9
|
default: false,
|
|
11
10
|
control: "boolean",
|
|
@@ -48,7 +47,7 @@ const ResetPasswordTemplate = (args) => {
|
|
|
48
47
|
twitterButtonLabel: "Sign in with Twitter"
|
|
49
48
|
}}
|
|
50
49
|
{...args}
|
|
51
|
-
handleResetPassword={() => console.log("resetting password")}
|
|
50
|
+
handleResetPassword={(e) => console.log("resetting password,", e)}
|
|
52
51
|
/>
|
|
53
52
|
);
|
|
54
53
|
};
|
|
@@ -51,6 +51,7 @@ const SignUpTemplate = (args) => {
|
|
|
51
51
|
texts={{
|
|
52
52
|
fullNameLabel: "Full Name",
|
|
53
53
|
fullNamePlaceholder: "Fulan AlFulani",
|
|
54
|
+
fullNameRequiredText: "Full Name is required",
|
|
54
55
|
emailLabel: "Email",
|
|
55
56
|
emailPlaceholder: "Enter your email",
|
|
56
57
|
emailRequiredText: "Email is required",
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { PricingPlans } from "../../../blocks/Pricing/PricingPlans";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: "Blocks/Pricing/In Billing",
|
|
6
|
+
component: [PricingPlans],
|
|
7
|
+
argTypes: {
|
|
8
|
+
lang: {
|
|
9
|
+
options: ["ar", "en"],
|
|
10
|
+
control: { type: "select" }
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
args: {
|
|
14
|
+
lang: "ar"
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const InBilling = (args) => {
|
|
19
|
+
return (
|
|
20
|
+
<PricingPlans
|
|
21
|
+
{...args}
|
|
22
|
+
plans={[
|
|
23
|
+
{
|
|
24
|
+
title: "Free",
|
|
25
|
+
title_ar: "تجريبي",
|
|
26
|
+
subtitle: "For everyone",
|
|
27
|
+
subtitle_ar: "للعرب",
|
|
28
|
+
price: 0,
|
|
29
|
+
currency: "SAR",
|
|
30
|
+
cycleText: "Monthly",
|
|
31
|
+
buttonText: "Select Plan",
|
|
32
|
+
features: ["one", "two", "three"],
|
|
33
|
+
features_ar: ["واحد", "اثنين", "ثلاثة"]
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
title: "Intro",
|
|
37
|
+
title_ar: "تجريبي",
|
|
38
|
+
subtitle: "For beginners",
|
|
39
|
+
subtitle_ar: "للعرب",
|
|
40
|
+
selectedPlan: true,
|
|
41
|
+
price: 10,
|
|
42
|
+
currency: "SAR",
|
|
43
|
+
cycleText: "Monthly",
|
|
44
|
+
buttonText: "Current Plan",
|
|
45
|
+
features: ["one", "two", "three"],
|
|
46
|
+
features_ar: ["واحد", "اثنين", "ثلاثة"]
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
title: "Pro",
|
|
50
|
+
title_ar: "تجريبي",
|
|
51
|
+
subtitle: "For professionals",
|
|
52
|
+
subtitle_ar: "للعرب",
|
|
53
|
+
price: 30,
|
|
54
|
+
currency: "SAR",
|
|
55
|
+
cycleText: "Monthly",
|
|
56
|
+
buttonText: "Select Plan",
|
|
57
|
+
features: ["one", "two", "three"],
|
|
58
|
+
features_ar: ["واحد", "اثنين", "ثلاثة"]
|
|
59
|
+
}
|
|
60
|
+
]}
|
|
61
|
+
/>
|
|
62
|
+
);
|
|
63
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { PricingPlans } from "../../../blocks/Pricing/PricingPlans";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: "Blocks/Pricing/In Landing",
|
|
6
|
+
component: [PricingPlans],
|
|
7
|
+
argTypes: {
|
|
8
|
+
lang: {
|
|
9
|
+
options: ["ar", "en"],
|
|
10
|
+
control: { type: "select" }
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
args: {
|
|
14
|
+
lang: "ar"
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const InLanding = (args) => {
|
|
19
|
+
return (
|
|
20
|
+
<PricingPlans
|
|
21
|
+
{...args}
|
|
22
|
+
plans={[
|
|
23
|
+
{
|
|
24
|
+
title: "Free",
|
|
25
|
+
title_ar: "تجريبي",
|
|
26
|
+
subtitle: "For everyone",
|
|
27
|
+
subtitle_ar: "للعرب",
|
|
28
|
+
price: 0,
|
|
29
|
+
currency: "SAR",
|
|
30
|
+
cycleText: "Monthly",
|
|
31
|
+
buttonText: "Select Plan",
|
|
32
|
+
features: ["one", "two", "three"],
|
|
33
|
+
features_ar: ["واحد", "اثنين", "ثلاثة"]
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
title: "Intro",
|
|
37
|
+
title_ar: "تجريبي",
|
|
38
|
+
subtitle: "For beginners",
|
|
39
|
+
subtitle_ar: "للعرب",
|
|
40
|
+
selectedPlan: false,
|
|
41
|
+
price: 10,
|
|
42
|
+
currency: "SAR",
|
|
43
|
+
cycleText: "Monthly",
|
|
44
|
+
buttonText: "Current Plan",
|
|
45
|
+
features: ["one", "two", "three"],
|
|
46
|
+
features_ar: ["واحد", "اثنين", "ثلاثة"]
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
title: "Pro",
|
|
50
|
+
title_ar: "تجريبي",
|
|
51
|
+
subtitle: "For professionals",
|
|
52
|
+
subtitle_ar: "للعرب",
|
|
53
|
+
price: 30,
|
|
54
|
+
currency: "SAR",
|
|
55
|
+
cycleText: "Monthly",
|
|
56
|
+
buttonText: "Select Plan",
|
|
57
|
+
features: ["one", "two", "three"],
|
|
58
|
+
features_ar: ["واحد", "اثنين", "ثلاثة"]
|
|
59
|
+
}
|
|
60
|
+
]}
|
|
61
|
+
/>
|
|
62
|
+
);
|
|
63
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Class } from "@mui/icons-material";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { AdaptiveButton } from "../../elements";
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: "Elements/Buttons/AdaptiveButton",
|
|
7
|
+
component: AdaptiveButton,
|
|
8
|
+
argTypes: {
|
|
9
|
+
buttonText: {
|
|
10
|
+
control: "text",
|
|
11
|
+
description: "The button text",
|
|
12
|
+
table: {
|
|
13
|
+
defaultValue: { summary: "Click" }
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
showText: {
|
|
17
|
+
control: "boolean",
|
|
18
|
+
// default: true,
|
|
19
|
+
description: "Boolean to show or hide the text",
|
|
20
|
+
table: {
|
|
21
|
+
defaultValue: { summary: true },
|
|
22
|
+
type: {
|
|
23
|
+
summary: "Use Case",
|
|
24
|
+
detail:
|
|
25
|
+
"Set this property to true in large screen and false on mobile"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
args: {
|
|
31
|
+
buttonText: "Click"
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const Template = (args) => {
|
|
36
|
+
return <AdaptiveButton {...args} />;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export const FullButton = Template.bind({});
|
|
40
|
+
FullButton.args = {
|
|
41
|
+
showText: true,
|
|
42
|
+
// buttonText: "Full Button",
|
|
43
|
+
icon: <Class />
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export const IconOnly = Template.bind({});
|
|
47
|
+
IconOnly.args = {
|
|
48
|
+
showText: false,
|
|
49
|
+
icon: <Class />,
|
|
50
|
+
buttonText: "test"
|
|
51
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Container } from "@mui/material";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { HawaCard } from "../../elements";
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: "Elements/Cards/Items",
|
|
7
|
+
component: [HawaCard],
|
|
8
|
+
argTypes: {
|
|
9
|
+
buttonLabel: {
|
|
10
|
+
control: "text",
|
|
11
|
+
description: "The text next to the logo"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const Items = (args) => {
|
|
17
|
+
return <HawaCard />;
|
|
18
|
+
};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { HawaPricingCard } from "../../elements";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: "Elements/Cards/Pricing",
|
|
6
|
+
component: [HawaPricingCard],
|
|
7
|
+
argTypes: {
|
|
8
|
+
title: {
|
|
9
|
+
control: "text",
|
|
10
|
+
description: "The title of the pricing package"
|
|
11
|
+
},
|
|
12
|
+
subtitle: {
|
|
13
|
+
control: "text",
|
|
14
|
+
description: "The subtitle of the pricing package"
|
|
15
|
+
},
|
|
16
|
+
price: {
|
|
17
|
+
control: "number",
|
|
18
|
+
description: "The price of the pricing package"
|
|
19
|
+
},
|
|
20
|
+
currency: {
|
|
21
|
+
control: "text",
|
|
22
|
+
description: "The currency of the price",
|
|
23
|
+
table: {
|
|
24
|
+
type: {
|
|
25
|
+
summary: "Examples",
|
|
26
|
+
detail: "$, SAR, ريال, دولار"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
cycleText: {
|
|
31
|
+
control: "text",
|
|
32
|
+
description: "The cycle period of the payment",
|
|
33
|
+
table: {
|
|
34
|
+
type: {
|
|
35
|
+
summary: "Examples",
|
|
36
|
+
detail: "Monthly, Annually, Quarterly, Every 3 Months, Every 6 Months"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
features: {
|
|
41
|
+
control: "array",
|
|
42
|
+
description: "An Array of strings for the package features"
|
|
43
|
+
},
|
|
44
|
+
lang: {
|
|
45
|
+
control: "text",
|
|
46
|
+
description: "The language of the card to change the direction",
|
|
47
|
+
table: {
|
|
48
|
+
type: {
|
|
49
|
+
summary: "Options",
|
|
50
|
+
detail: "ar, en"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
buttonText: {
|
|
55
|
+
control: "text",
|
|
56
|
+
description: "The text of the button"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
args: {
|
|
60
|
+
title: "Pro",
|
|
61
|
+
subtitle: "For small businesses",
|
|
62
|
+
price: 300,
|
|
63
|
+
currency: "$",
|
|
64
|
+
cycleText: "Monthly",
|
|
65
|
+
buttonText: "Select Plan"
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export const LTR = (args) => {
|
|
70
|
+
return (
|
|
71
|
+
<HawaPricingCard
|
|
72
|
+
{...args}
|
|
73
|
+
features={["Unlimited Menus", "Unlimited Items", "Custom Handle"]}
|
|
74
|
+
/>
|
|
75
|
+
);
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export const RTL = (args) => {
|
|
79
|
+
return (
|
|
80
|
+
<HawaPricingCard
|
|
81
|
+
lang="ar"
|
|
82
|
+
title="الإحترافي"
|
|
83
|
+
subtitle="للمنشئات الصغيرة"
|
|
84
|
+
price="300"
|
|
85
|
+
currency="ريال"
|
|
86
|
+
cycleText="كل 6 أشهر"
|
|
87
|
+
buttonText="إختر الباقة"
|
|
88
|
+
features={["قوائم لا محدودة", "عناصر لا محدودة", "أسم مخصص"]}
|
|
89
|
+
/>
|
|
90
|
+
);
|
|
91
|
+
};
|