@sikka/hawa 0.0.13 → 0.0.16
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 +79 -43
- package/src/blocks/AuthForms/NewPasswordForm.js +57 -38
- package/src/blocks/AuthForms/ResetPasswordForm.js +36 -39
- package/src/blocks/AuthForms/SignInForm.js +76 -59
- package/src/blocks/AuthForms/SignUpForm.js +65 -44
- package/src/blocks/Payment/ChargeWalletForm.js +29 -20
- package/src/blocks/Pricing/PricingPlans.js +57 -0
- package/src/elements/HawaAlert.js +1 -1
- package/src/elements/HawaAppBar.js +139 -0
- package/src/elements/HawaListItem.js +21 -0
- package/src/elements/HawaPricingCard.js +133 -0
- package/src/elements/HawaRadio.js +1 -3
- package/src/elements/HawaTextField.js +15 -149
- package/src/elements/index.js +3 -1
- package/src/layout/HawaAppLayout.js +246 -0
- package/src/layout/index.js +1 -0
- package/src/stories/BlocksStories/Account/UserProfile.stories.js +25 -1
- 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/SignIn.stories.js +9 -1
- package/src/stories/BlocksStories/Auth/SignUp.stories.js +8 -0
- package/src/stories/BlocksStories/Payment/ChargeWallet.stories.js +6 -1
- package/src/stories/BlocksStories/Pricing/BillingPlans.stories.js +63 -0
- package/src/stories/BlocksStories/Pricing/LandingPlans.stories.js +63 -0
- package/src/stories/ElementsStories/PricingCard.stories.js +76 -12
- package/src/stories/LayoutStories/AppBar.stories.js +29 -0
- package/src/stories/LayoutStories/AppLayout.stories.js +52 -0
- 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.5eab66d3.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/blocks/Pricing/SignInForm.js +0 -126
- package/src/elements/HawaCard.js +0 -77
- package/storybook-static/main.00b064cb.iframe.bundle.js +0 -1
- package/storybook-static/vendors~main.5eab66d3.iframe.bundle.js +0 -76
- package/storybook-static/vendors~main.5eab66d3.iframe.bundle.js.map +0 -1
|
@@ -5,6 +5,13 @@ export default {
|
|
|
5
5
|
title: "Blocks/Auth/Sign Up",
|
|
6
6
|
component: [SignUpForm],
|
|
7
7
|
argTypes: {
|
|
8
|
+
lang: {
|
|
9
|
+
default: true,
|
|
10
|
+
control: "select",
|
|
11
|
+
options: ["ar", "en"],
|
|
12
|
+
description: "The language of the form",
|
|
13
|
+
table: { defaultValue: { summary: "en" } }
|
|
14
|
+
},
|
|
8
15
|
viaGoogle: {
|
|
9
16
|
default: true,
|
|
10
17
|
control: "boolean",
|
|
@@ -51,6 +58,7 @@ const SignUpTemplate = (args) => {
|
|
|
51
58
|
texts={{
|
|
52
59
|
fullNameLabel: "Full Name",
|
|
53
60
|
fullNamePlaceholder: "Fulan AlFulani",
|
|
61
|
+
fullNameRequiredText: "Full Name is required",
|
|
54
62
|
emailLabel: "Email",
|
|
55
63
|
emailPlaceholder: "Enter your email",
|
|
56
64
|
emailRequiredText: "Email is required",
|
|
@@ -24,7 +24,12 @@ export default {
|
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
export const ChargeWallet = (args) => {
|
|
27
|
-
return
|
|
27
|
+
return (
|
|
28
|
+
<ChargeWalletForm
|
|
29
|
+
handleChargeWallet={(e) => console.log("amount is ", e)}
|
|
30
|
+
{...args}
|
|
31
|
+
/>
|
|
32
|
+
);
|
|
28
33
|
};
|
|
29
34
|
|
|
30
35
|
ChargeWallet.args = { currency: "SAR" };
|
|
@@ -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
|
+
};
|
|
@@ -1,27 +1,91 @@
|
|
|
1
|
-
import { Container } from "@mui/material";
|
|
2
1
|
import React from "react";
|
|
3
|
-
import {
|
|
2
|
+
import { HawaPricingCard } from "../../elements";
|
|
4
3
|
|
|
5
4
|
export default {
|
|
6
5
|
title: "Elements/Cards/Pricing",
|
|
7
|
-
component: [
|
|
6
|
+
component: [HawaPricingCard],
|
|
8
7
|
argTypes: {
|
|
9
|
-
|
|
8
|
+
title: {
|
|
10
9
|
control: "text",
|
|
11
|
-
description: "The
|
|
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"
|
|
12
57
|
}
|
|
58
|
+
},
|
|
59
|
+
args: {
|
|
60
|
+
title: "Pro",
|
|
61
|
+
subtitle: "For small businesses",
|
|
62
|
+
price: 300,
|
|
63
|
+
currency: "$",
|
|
64
|
+
cycleText: "Monthly",
|
|
65
|
+
buttonText: "Select Plan"
|
|
13
66
|
}
|
|
14
67
|
};
|
|
15
68
|
|
|
16
|
-
export const
|
|
69
|
+
export const LTR = (args) => {
|
|
17
70
|
return (
|
|
18
|
-
<
|
|
19
|
-
|
|
20
|
-
subtitle="For small business"
|
|
21
|
-
price="300"
|
|
22
|
-
currency="SAR"
|
|
23
|
-
cycleText="Every 6 months"
|
|
71
|
+
<HawaPricingCard
|
|
72
|
+
{...args}
|
|
24
73
|
features={["Unlimited Menus", "Unlimited Items", "Custom Handle"]}
|
|
25
74
|
/>
|
|
26
75
|
);
|
|
27
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
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { HawaAppBar } from "../../elements";
|
|
3
|
+
|
|
4
|
+
const Template = (args) => {
|
|
5
|
+
return <HawaAppBar />;
|
|
6
|
+
};
|
|
7
|
+
export default {
|
|
8
|
+
title: "Layout/AppBar",
|
|
9
|
+
component: [HawaAppBar],
|
|
10
|
+
parameters: {
|
|
11
|
+
backgrounds: {
|
|
12
|
+
default: "light"
|
|
13
|
+
// values: [
|
|
14
|
+
// { name: "light", value: theme.lightBackground },
|
|
15
|
+
// { name: "dark", value: theme.darkBackground }
|
|
16
|
+
// ]
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export const Normal = Template.bind({});
|
|
22
|
+
Normal.args = {
|
|
23
|
+
size: "large",
|
|
24
|
+
showText: true,
|
|
25
|
+
buttonLabel: "test",
|
|
26
|
+
// padding: theme.paddings,
|
|
27
|
+
textColor: "#000000",
|
|
28
|
+
buttonColor: "#f9f9f9"
|
|
29
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { HawaAppLayout } from "../../layout";
|
|
3
|
+
|
|
4
|
+
const Template = (args) => {
|
|
5
|
+
return (
|
|
6
|
+
<HawaAppLayout
|
|
7
|
+
pageName="page1"
|
|
8
|
+
pages={[
|
|
9
|
+
{ text: "page1", icon: "fdd" },
|
|
10
|
+
{ text: "page2", icon: "huhu" },
|
|
11
|
+
{ text: "page3", icon: "test" }
|
|
12
|
+
]}
|
|
13
|
+
// pages={[
|
|
14
|
+
// <HawaListItem text="dd" />,
|
|
15
|
+
// <HawaListItem text="dd" />,
|
|
16
|
+
// <HawaListItem text="dd" />
|
|
17
|
+
// ]}
|
|
18
|
+
logo={
|
|
19
|
+
<img
|
|
20
|
+
height={40}
|
|
21
|
+
style={{ zIndex: 30, width: "100%" }}
|
|
22
|
+
src="https://xakher-images.s3.ap-southeast-1.amazonaws.com/sikka-logo.svg"
|
|
23
|
+
/>
|
|
24
|
+
}
|
|
25
|
+
>
|
|
26
|
+
the rest of the app here
|
|
27
|
+
</HawaAppLayout>
|
|
28
|
+
);
|
|
29
|
+
};
|
|
30
|
+
export default {
|
|
31
|
+
title: "Layout/AppLayout",
|
|
32
|
+
component: [HawaAppLayout],
|
|
33
|
+
parameters: {
|
|
34
|
+
backgrounds: {
|
|
35
|
+
default: "light"
|
|
36
|
+
// values: [
|
|
37
|
+
// { name: "light", value: theme.lightBackground },
|
|
38
|
+
// { name: "dark", value: theme.darkBackground }
|
|
39
|
+
// ]
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export const Normal = Template.bind({});
|
|
45
|
+
Normal.args = {
|
|
46
|
+
size: "large",
|
|
47
|
+
showText: true,
|
|
48
|
+
buttonLabel: "test",
|
|
49
|
+
// padding: theme.paddings,
|
|
50
|
+
textColor: "#000000",
|
|
51
|
+
buttonColor: "#f9f9f9"
|
|
52
|
+
};
|
package/src/styles.css
CHANGED
|
@@ -345,4 +345,4 @@
|
|
|
345
345
|
|
|
346
346
|
|
|
347
347
|
|
|
348
|
-
window['STORIES'] = [{"titlePrefix":"","directory":"./src","files":"**/*.stories.mdx","importPathMatcher":"^\\.[\\\\/](?:src(?:[\\\\/](?!\\.)(?:(?:(?!(?:^|[\\\\/])\\.).)*?)[\\\\/]|[\\\\/]|$)(?!\\.)(?=.)[^\\\\/]*?\\.stories\\.mdx)$"},{"titlePrefix":"","directory":"./src","files":"**/*.stories.@(js|jsx|ts|tsx)","importPathMatcher":"^\\.[\\\\/](?:src(?:[\\\\/](?!\\.)(?:(?:(?!(?:^|[\\\\/])\\.).)*?)[\\\\/]|[\\\\/]|$)(?!\\.)(?=.)[^\\\\/]*?\\.stories\\.(js|jsx|ts|tsx))$"}];</script><script src="runtime~main.f1ebae9b.iframe.bundle.js"></script><script src="vendors~main.
|
|
348
|
+
window['STORIES'] = [{"titlePrefix":"","directory":"./src","files":"**/*.stories.mdx","importPathMatcher":"^\\.[\\\\/](?:src(?:[\\\\/](?!\\.)(?:(?:(?!(?:^|[\\\\/])\\.).)*?)[\\\\/]|[\\\\/]|$)(?!\\.)(?=.)[^\\\\/]*?\\.stories\\.mdx)$"},{"titlePrefix":"","directory":"./src","files":"**/*.stories.@(js|jsx|ts|tsx)","importPathMatcher":"^\\.[\\\\/](?:src(?:[\\\\/](?!\\.)(?:(?:(?!(?:^|[\\\\/])\\.).)*?)[\\\\/]|[\\\\/]|$)(?!\\.)(?=.)[^\\\\/]*?\\.stories\\.(js|jsx|ts|tsx))$"}];</script><script src="runtime~main.f1ebae9b.iframe.bundle.js"></script><script src="vendors~main.b4186832.iframe.bundle.js"></script><script src="main.66955578.iframe.bundle.js"></script></body></html>
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
/* eslint-enable object-shorthand */
|
|
38
38
|
})
|
|
39
39
|
);
|
|
40
|
-
};</script><link rel="shortcut icon" href="/favicon.ico"/><link rel="icon" type="image/png" href="/hawa-icon.png" sizes="192x192"/><style>#root[hidden],
|
|
40
|
+
};</script><link rel="shortcut icon" href="/favicon.ico"/><link rel="icon" type="image/png" href="/hawa-icon.png" sizes="192x192"/><link rel="preconnect" href="https://fonts.googleapis.com"/><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin/><link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@100;200;300;400;500;600;700&display=swap" rel="stylesheet"/><style>#root[hidden],
|
|
41
41
|
#docs-root[hidden] {
|
|
42
42
|
display: none !important;
|
|
43
43
|
}</style></head><body><div id="root"></div><div id="docs-root"></div><script>window['CONFIG_TYPE'] = "PRODUCTION";
|