@sikka/hawa 0.0.11 → 0.0.14

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.
Files changed (84) hide show
  1. package/es/index.es.js +1 -1
  2. package/lib/index.js +1 -1
  3. package/package.json +3 -3
  4. package/src/blocks/Account/{UserProfile.js → UserProfileForm.js} +16 -7
  5. package/src/blocks/Account/UserSettingsForm.js +13 -0
  6. package/src/blocks/Account/index.js +2 -2
  7. package/src/blocks/AuthForms/NewPasswordForm.js +1 -1
  8. package/src/blocks/AuthForms/ResetPasswordForm.js +1 -1
  9. package/src/blocks/AuthForms/SignInForm.js +10 -11
  10. package/src/blocks/AuthForms/SignUpForm.js +2 -1
  11. package/src/blocks/Payment/ChargeWalletForm.js +40 -37
  12. package/src/blocks/Payment/CreditCardForm.js +50 -45
  13. package/src/blocks/Payment/PayWithWallet.js +17 -7
  14. package/src/blocks/Payment/SelectPayment.js +8 -9
  15. package/src/blocks/Pricing/PricingPlans.js +47 -0
  16. package/src/{ui → elements}/ActionButton.js +0 -0
  17. package/src/elements/AdaptiveButton.js +32 -0
  18. package/src/{ui → elements}/AutoCompleteField.js +0 -0
  19. package/src/{ui → elements}/DragDropImages.js +0 -0
  20. package/src/{ui → elements}/Hawa.js +0 -0
  21. package/src/{ui → elements}/HawaAlert.js +0 -0
  22. package/src/{ui → elements}/HawaButton.js +0 -0
  23. package/src/{ui → elements}/HawaCheckbox.js +0 -0
  24. package/src/{ui → elements}/HawaInputLabel.js +0 -0
  25. package/src/{ui → elements}/HawaLogoButton.js +0 -0
  26. package/src/elements/HawaPricingCard.js +115 -0
  27. package/src/elements/HawaRadio.js +30 -0
  28. package/src/elements/HawaSettingsRow.js +27 -0
  29. package/src/elements/HawaSwitch.js +6 -0
  30. package/src/{ui → elements}/HawaTextArea.js +0 -0
  31. package/src/{ui → elements}/HawaTextField.js +0 -0
  32. package/src/{ui → elements}/HawaTypography.js +0 -0
  33. package/src/{ui → elements}/RadioBox.js +0 -0
  34. package/src/{ui → elements}/Row.js +0 -0
  35. package/src/{ui → elements}/SelectedField.js +0 -0
  36. package/src/{ui → elements}/StyledTooltip.js +0 -0
  37. package/src/{ui → elements}/TabPanel.js +0 -0
  38. package/src/{ui → elements}/index.js +1 -1
  39. package/src/stories/BlocksStories/Account/UserProfile.stories.js +21 -0
  40. package/src/stories/BlocksStories/Account/UserSettings.stories.js +55 -0
  41. package/src/stories/BlocksStories/Auth/NewPassword.stories.js +60 -0
  42. package/src/stories/BlocksStories/Auth/ResetPassword.stories.js +59 -0
  43. package/src/stories/BlocksStories/Auth/SignIn.stories.js +89 -0
  44. package/src/stories/BlocksStories/Auth/SignUp.stories.js +90 -0
  45. package/src/stories/BlocksStories/Payment/ChargeWallet.stories.js +30 -0
  46. package/src/stories/BlocksStories/Payment/PayWithCreditCard.stories.js +37 -0
  47. package/src/stories/BlocksStories/Payment/PayWithWallet.stories.js +17 -0
  48. package/src/stories/BlocksStories/{PaymentForm.stories.js → Payment/PaymentSelection.stories.js} +12 -23
  49. package/src/stories/BlocksStories/Pricing/BillingPlans.stories.js +46 -0
  50. package/src/stories/BlocksStories/Pricing/LandingPlans.stories.js +45 -0
  51. package/src/stories/ElementsStories/AdaptiveButton.stories.js +51 -0
  52. package/src/stories/{UIStories → ElementsStories}/Alert.stories.js +1 -1
  53. package/src/stories/{UIStories → ElementsStories}/InputLabel.stories.js +1 -1
  54. package/src/stories/ElementsStories/ItemCard.stories.js +18 -0
  55. package/src/stories/ElementsStories/LogoButtons.stories.js +73 -0
  56. package/src/stories/ElementsStories/PricingCard.stories.js +91 -0
  57. package/src/stories/ElementsStories/RadioSelector.stories.js +36 -0
  58. package/src/stories/ElementsStories/SettingsRow.stories.js +63 -0
  59. package/src/stories/{UIStories → ElementsStories}/TextField.stories.js +1 -1
  60. package/src/stories/LayoutStories/Box.stories.js +10 -24
  61. package/src/styles.css +1 -0
  62. package/storybook-static/iframe.html +1 -1
  63. package/storybook-static/index.html +1 -1
  64. package/storybook-static/main.e382d866.iframe.bundle.js +1 -0
  65. package/storybook-static/vendors~main.5eab66d3.iframe.bundle.js +76 -0
  66. package/storybook-static/{vendors~main.f8d30727.iframe.bundle.js.LICENSE.txt → vendors~main.5eab66d3.iframe.bundle.js.LICENSE.txt} +0 -0
  67. package/storybook-static/vendors~main.5eab66d3.iframe.bundle.js.map +1 -0
  68. package/src/blocks/Account/UserSettings.js +0 -14
  69. package/src/stories/BlocksStories/AuthForm.stories.js +0 -171
  70. package/src/stories/BlocksStories/UserForm.stories.js +0 -27
  71. package/src/stories/UIStories/ActionButton.stories.js +0 -41
  72. package/src/stories/UIStories/AdaptiveButton.stories.js +0 -76
  73. package/src/stories/UIStories/CheckBox.stories.js +0 -34
  74. package/src/stories/UIStories/LogoButtons.stories.js +0 -86
  75. package/src/stories/UIStories/RadioSelector.stories.js +0 -50
  76. package/src/stories/UIStories/SettingsRow.stories.js +0 -51
  77. package/src/themes/HawaProvider.js +0 -192
  78. package/src/themes/QawaimTheme.js +0 -199
  79. package/src/ui/AdaptiveButton.js +0 -131
  80. package/src/ui/HawaRadio.js +0 -64
  81. package/src/ui/HawaSettingsRow.js +0 -45
  82. package/storybook-static/main.b00949db.iframe.bundle.js +0 -1
  83. package/storybook-static/vendors~main.f8d30727.iframe.bundle.js +0 -76
  84. package/storybook-static/vendors~main.f8d30727.iframe.bundle.js.map +0 -1
@@ -0,0 +1,90 @@
1
+ import React from "react";
2
+ import { SignUpForm } from "../../../blocks/AuthForms";
3
+
4
+ export default {
5
+ title: "Blocks/Auth/Sign Up",
6
+ component: [SignUpForm],
7
+ argTypes: {
8
+ viaGoogle: {
9
+ default: true,
10
+ control: "boolean",
11
+ description: "Display the sign in via Google button",
12
+ table: { defaultValue: { summary: true } }
13
+ },
14
+ viaTwitter: {
15
+ default: true,
16
+ control: "boolean",
17
+ description: "Display the sign in via Twitter button",
18
+ table: { defaultValue: { summary: true } }
19
+ },
20
+ viaGithub: {
21
+ default: true,
22
+ control: "boolean",
23
+ description: "Display the sign in via Github button",
24
+ table: { defaultValue: { summary: true } }
25
+ },
26
+ showError: {
27
+ default: false,
28
+ control: "boolean",
29
+ description: "Display the error when auth fails",
30
+ table: { defaultValue: { summary: true } }
31
+ },
32
+ errorTitle: {
33
+ default: " ",
34
+ control: "text",
35
+ description: "The error text for the auth failure",
36
+ table: { defaultValue: { summary: "" } }
37
+ },
38
+ errorText: {
39
+ default: "Something went wrong",
40
+ control: "text",
41
+ description: "The error text for the auth failure",
42
+ table: { defaultValue: { summary: "Something went wrong" } }
43
+ }
44
+ }
45
+ };
46
+
47
+ const SignUpTemplate = (args) => {
48
+ return (
49
+ <SignUpForm
50
+ {...args}
51
+ texts={{
52
+ fullNameLabel: "Full Name",
53
+ fullNamePlaceholder: "Fulan AlFulani",
54
+ emailLabel: "Email",
55
+ emailPlaceholder: "Enter your email",
56
+ emailRequiredText: "Email is required",
57
+ emailInvalidText: "Invalid email address",
58
+ passwordLabel: "Password",
59
+ passwordPlaceholder: "Minimum 8 characters",
60
+ passwordRequiredText: "Password is required",
61
+ passwordTooShortText: "Password too short",
62
+ forgotPasswordText: "Forgot password?",
63
+ newUserText: "New user?",
64
+ signUpText: "Sign up",
65
+ signInText: "Sign in",
66
+ googleButtonLabel: "Sign in with Google",
67
+ githubButtonLabel: "Sign in with Github",
68
+ twitterButtonLabel: "Sign in with Twitter"
69
+ }}
70
+ error={args.showError}
71
+ viaGoogle={args.viaGoogle}
72
+ viaGithub={args.viaGithub}
73
+ viaTwitter={args.viaTwitter}
74
+ handleSignUp={() => console.log("singing up via email")}
75
+ handleGoogleSignUp={() => console.log("signing up via google")}
76
+ handleGithubSignUp={() => console.log("signing up via github")}
77
+ handleTwitterSignUp={() => console.log("signing up via Twitter")}
78
+ handleRouteToSignIn={() => console.log("switching to sign in")}
79
+ />
80
+ );
81
+ };
82
+ export const SignUp = SignUpTemplate.bind({});
83
+ SignUp.args = {
84
+ viaGoogle: true,
85
+ viaGithub: true,
86
+ viaTwitter: true,
87
+ showError: false,
88
+ errorTitle: "Error",
89
+ errorText: "Something went wrong"
90
+ };
@@ -0,0 +1,30 @@
1
+ import React from "react";
2
+ import { ChargeWalletForm } from "../../../blocks/Payment";
3
+
4
+ export default {
5
+ title: "Blocks/Payment/Charge Wallet",
6
+ component: [ChargeWalletForm],
7
+ argTypes: {
8
+ viaWallet: { control: "boolean" },
9
+ viaApplePay: { control: "boolean" },
10
+ viaGooglePay: { control: "boolean" },
11
+ viaSTCPay: { control: "boolean" },
12
+ viaCreditCard: { control: "boolean" },
13
+ viaPayPal: { control: "boolean" }
14
+ },
15
+ args: {
16
+ viaWallet: true,
17
+ viaMada: true,
18
+ viaApplePay: true,
19
+ viaGooglePay: true,
20
+ viaSTCPay: true,
21
+ viaCreditCard: true,
22
+ viaPayPal: true
23
+ }
24
+ };
25
+
26
+ export const ChargeWallet = (args) => {
27
+ return <ChargeWalletForm {...args} />;
28
+ };
29
+
30
+ ChargeWallet.args = { currency: "SAR" };
@@ -0,0 +1,37 @@
1
+ import React from "react";
2
+ import { CreditCardForm } from "../../../blocks/Payment";
3
+
4
+ export default {
5
+ title: "Blocks/Payment/Pay Via Credit Card",
6
+ component: [CreditCardForm],
7
+ argTypes: {
8
+ theme: {
9
+ options: ["primary", "secondary", "default"],
10
+ control: { type: "select" }
11
+ },
12
+ viaWallet: { control: "boolean" },
13
+ viaApplePay: { control: "boolean" },
14
+ viaGooglePay: { control: "boolean" },
15
+ viaSTCPay: { control: "boolean" },
16
+ viaCreditCard: { control: "boolean" },
17
+ viaPayPal: { control: "boolean" }
18
+ },
19
+ args: {
20
+ theme: "primary",
21
+ viaWallet: true,
22
+ viaMada: true,
23
+ viaApplePay: true,
24
+ viaGooglePay: true,
25
+ viaSTCPay: true,
26
+ viaCreditCard: true,
27
+ viaPayPal: true
28
+ }
29
+ };
30
+
31
+ export const PayViaCreditCard = (args) => {
32
+ return <CreditCardForm theme={args.theme} />;
33
+ };
34
+
35
+ PayViaCreditCard.args = {
36
+ theme: "secondary"
37
+ };
@@ -0,0 +1,17 @@
1
+ import React from "react";
2
+ import { PayWithWallet } from "../../../blocks/Payment";
3
+
4
+ export default {
5
+ title: "Blocks/Payment/Pay Via Wallet",
6
+ component: [PayWithWallet],
7
+ argTypes: {
8
+ walletBalance: { control: "number" }
9
+ },
10
+ args: {
11
+ walletBalance: 20
12
+ }
13
+ };
14
+
15
+ export const PayViaWallet = (args) => {
16
+ return <PayWithWallet {...args} />;
17
+ };
@@ -1,14 +1,9 @@
1
1
  import React from "react";
2
- import {
3
- SelectPayment,
4
- CreditCardForm,
5
- ChargeWalletForm,
6
- PayWithWallet
7
- } from "../../blocks/Payment";
2
+ import { SelectPayment } from "../../../blocks/Payment";
8
3
 
9
4
  export default {
10
- title: "Blocks/PaymentBlocks",
11
- component: [SelectPayment, CreditCardForm],
5
+ title: "Blocks/Payment/Payment Selection",
6
+ component: [SelectPayment],
12
7
  argTypes: {
13
8
  theme: {
14
9
  options: ["primary", "secondary", "default"],
@@ -33,7 +28,7 @@ export default {
33
28
  }
34
29
  };
35
30
 
36
- export const PaymentSelection = (args) => {
31
+ const PaymentSelectionTemplate = (args) => {
37
32
  return (
38
33
  <SelectPayment
39
34
  {...args}
@@ -54,18 +49,12 @@ export const PaymentSelection = (args) => {
54
49
  />
55
50
  );
56
51
  };
57
-
58
- export const PayViaWallet = (args) => {
59
- return <PayWithWallet theme={args.theme} />;
60
- };
61
- export const PayViaCreditCard = (args) => {
62
- return <CreditCardForm />;
63
- };
64
-
65
- export const ChargeWallet = (args) => {
66
- return <ChargeWalletForm currency="SAR" />;
67
- };
68
-
69
- ChargeWallet.args = {
70
- theme: "secondary"
52
+ export const PaymentSelection = PaymentSelectionTemplate.bind({});
53
+ PaymentSelection.args = {
54
+ viaGoogle: true,
55
+ viaGithub: true,
56
+ viaTwitter: true,
57
+ showError: false,
58
+ errorTitle: "Error",
59
+ errorText: "Something went wrong"
71
60
  };
@@ -0,0 +1,46 @@
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
+ };
9
+
10
+ export const InBilling = (args) => {
11
+ return (
12
+ <PricingPlans
13
+ {...args}
14
+ plans={[
15
+ {
16
+ title: "Free",
17
+ subtitle: "For everyone",
18
+ price: 0,
19
+ currency: "SAR",
20
+ cycleText: "Monthly",
21
+ buttonText: "Select Plan",
22
+ features: ["one", "two", "three"]
23
+ },
24
+ {
25
+ title: "Intro",
26
+ subtitle: "For beginners",
27
+ selectedPlan: true,
28
+ price: 10,
29
+ currency: "SAR",
30
+ cycleText: "Monthly",
31
+ buttonText: "Current Plan",
32
+ features: ["one", "two", "three"]
33
+ },
34
+ {
35
+ title: "Pro",
36
+ subtitle: "For professionals",
37
+ price: 30,
38
+ currency: "SAR",
39
+ cycleText: "Monthly",
40
+ buttonText: "Select Plan",
41
+ features: ["one", "two", "three"]
42
+ }
43
+ ]}
44
+ />
45
+ );
46
+ };
@@ -0,0 +1,45 @@
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
+ };
9
+
10
+ export const InLanding = (args) => {
11
+ return (
12
+ <PricingPlans
13
+ {...args}
14
+ plans={[
15
+ {
16
+ title: "Free",
17
+ subtitle: "For everyone",
18
+ price: 0,
19
+ currency: "SAR",
20
+ cycleText: "Monthly",
21
+ buttonText: "Select Plan",
22
+ features: ["one", "two", "three"]
23
+ },
24
+ {
25
+ title: "Intro",
26
+ subtitle: "For beginners",
27
+ price: 10,
28
+ currency: "SAR",
29
+ cycleText: "Monthly",
30
+ buttonText: "Select Plan",
31
+ features: ["one", "two", "three"]
32
+ },
33
+ {
34
+ title: "Pro",
35
+ subtitle: "For professionals",
36
+ price: 30,
37
+ currency: "SAR",
38
+ cycleText: "Monthly",
39
+ buttonText: "Select Plan",
40
+ features: ["one", "two", "three"]
41
+ }
42
+ ]}
43
+ />
44
+ );
45
+ };
@@ -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
+ };
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
 
3
- import { HawaAlert } from "../../ui";
3
+ import { HawaAlert } from "../../elements";
4
4
 
5
5
  const Template = (args) => {
6
6
  return (
@@ -1,5 +1,5 @@
1
1
  import { storiesOf } from "@storybook/react";
2
- import { HawaInputLabel } from "../../ui";
2
+ import { HawaInputLabel } from "../../elements";
3
3
 
4
4
  export default {
5
5
  title: "Components/InputLabel",
@@ -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,73 @@
1
+ import { Container } from "@mui/material";
2
+ import React from "react";
3
+ import { ActionButton, HawaLogoButton } from "../../elements";
4
+
5
+ export default {
6
+ title: "Elements/Buttons/LogoButtons",
7
+ component: HawaLogoButton,
8
+ argTypes: {
9
+ buttonLabel: {
10
+ control: "text",
11
+ description: "The text next to the logo"
12
+ },
13
+ logo: {
14
+ control: "select",
15
+ options: [
16
+ "google",
17
+ "twitter",
18
+ "github",
19
+ "paypal",
20
+ "applepay",
21
+ "googlepay",
22
+ "stcpay",
23
+ "mada",
24
+ "visa/master"
25
+ ],
26
+ description: "a brand name that will display the logo accordingly",
27
+ table: {
28
+ type: {
29
+ summary: "Examples",
30
+ detail: "google, twitter, github, paypal, applepay, googlepay"
31
+ }
32
+ }
33
+ }
34
+ }
35
+ };
36
+
37
+ const Template = (args) => {
38
+ return (
39
+ <Container maxWidth="xs" variant="plain">
40
+ <HawaLogoButton logo={args.logo} buttonText={args.buttonLabel} />
41
+ </Container>
42
+ );
43
+ };
44
+
45
+ export const Google = Template.bind({});
46
+ Google.args = { buttonLabel: "Sign in via Google", logo: "google" };
47
+
48
+ export const Twitter = Template.bind({});
49
+ Twitter.args = { buttonLabel: "Sign in via Twitter", logo: "twitter" };
50
+
51
+ export const Github = Template.bind({});
52
+ Github.args = { buttonLabel: "Sign in via Github", logo: "github" };
53
+
54
+ export const WalletPay = Template.bind({});
55
+ WalletPay.args = { buttonLabel: "Pay with Wallet", logo: "wallet" };
56
+
57
+ export const GooglePay = Template.bind({});
58
+ GooglePay.args = { buttonLabel: "Google Pay", logo: "googlepay" };
59
+
60
+ export const ApplePay = Template.bind({});
61
+ ApplePay.args = { buttonLabel: "Apple Pay", logo: "applepay" };
62
+
63
+ export const STCPay = Template.bind({});
64
+ STCPay.args = { buttonLabel: "STC Pay", logo: "stcpay" };
65
+
66
+ export const VisaMasterPay = Template.bind({});
67
+ VisaMasterPay.args = { buttonLabel: "Visa / Mastercard", logo: "visa/master" };
68
+
69
+ export const PayPal = Template.bind({});
70
+ PayPal.args = { buttonLabel: "PayPal", logo: "paypal" };
71
+
72
+ export const Mada = Template.bind({});
73
+ Mada.args = { buttonLabel: "Mada", logo: "mada" };
@@ -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
+ };
@@ -0,0 +1,36 @@
1
+ import React from "react";
2
+ import { HawaRadio } from "../../elements";
3
+
4
+ export default {
5
+ title: "Elements/Selections/Panel Tabs",
6
+ component: [HawaRadio],
7
+ argTypes: {
8
+ options: {
9
+ control: "array",
10
+ description: "An array of objects containing the option label and value",
11
+ table: {
12
+ type: {
13
+ summary: "Object Example",
14
+ detail: "{label: 'Option 1', value: 'option1'}"
15
+ }
16
+ }
17
+ }
18
+ },
19
+ args: {
20
+ options: 3
21
+ }
22
+ };
23
+
24
+ export const PanelTabs = (args) => {
25
+ let allOptions = Array.from({ length: args.options }, (v, i) => {
26
+ return { label: `Option ${i}`, value: `option${i}` };
27
+ });
28
+ return (
29
+ <HawaRadio
30
+ {...args}
31
+ handleChange={(e) => console.log("changing to ", e)}
32
+ defaultValue="option1"
33
+ options={allOptions}
34
+ />
35
+ );
36
+ };
@@ -0,0 +1,63 @@
1
+ import React from "react";
2
+ import { HawaSettingsRow } from "../../elements";
3
+
4
+ export default {
5
+ title: "Elements/Settings/Row",
6
+ component: [HawaSettingsRow],
7
+ parameters: {
8
+ backgrounds: {
9
+ default: 'twitter',
10
+ values: [
11
+ {
12
+ name: 'light',
13
+ value: '#00aced',
14
+ },
15
+ {
16
+ name: 'dark',
17
+ value: '#3b5998',
18
+ },
19
+ ],
20
+ },
21
+ // backgrounds: [{ name: "dark background", value: "#000", default: true }]
22
+ },
23
+ argTypes: {
24
+ settingsType: {
25
+ options: ["checkbox", "text", "radio"],
26
+ control: { type: "select" }
27
+ }
28
+ }
29
+ };
30
+
31
+ export const CheckboxSettings = (args) => <HawaSettingsRow {...args} />;
32
+ CheckboxSettings.args = {
33
+ settingsType: "checkbox",
34
+ settingsLabel: "Text Settings"
35
+ };
36
+ export const TextSettings = (args) => (
37
+ <HawaSettingsRow placeholder="Text here" {...args} />
38
+ );
39
+
40
+ TextSettings.args = {
41
+ settingsType: "text",
42
+ settingsLabel: "Text Settings"
43
+ };
44
+ export const RadioSettings = (args) => {
45
+ let allOptions = Array.from({ length: args.options }, (v, i) => {
46
+ return { label: `Option ${i}`, value: `option${i}` };
47
+ });
48
+ return (
49
+ <HawaSettingsRow
50
+ settingsType={args.settingsType}
51
+ settingsLabel={args.settingsLabel}
52
+ handleChange={(e) => console.log("changing to ", e)}
53
+ defaultValue="option1"
54
+ options={allOptions}
55
+ />
56
+ );
57
+ };
58
+
59
+ RadioSettings.args = {
60
+ options: 3,
61
+ settingsType: "radio",
62
+ settingsLabel: "Radio Settings"
63
+ };
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { HawaTextField } from "../../ui";
2
+ import { HawaTextField } from "../../elements";
3
3
 
4
4
  const Template = (args) => {
5
5
  return <HawaTextField {...args} />;