@sikka/hawa 0.0.12 → 0.0.13
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 +1 -1
- package/src/blocks/AuthForms/ResetPasswordForm.js +1 -1
- package/src/blocks/AuthForms/SignInForm.js +2 -7
- package/src/blocks/AuthForms/SignUpForm.js +1 -1
- 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/SignInForm.js +126 -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 +0 -0
- package/src/{ui → elements}/HawaButton.js +0 -0
- package/src/elements/HawaCard.js +77 -0
- package/src/{ui → elements}/HawaCheckbox.js +0 -0
- package/src/{ui → elements}/HawaInputLabel.js +0 -0
- package/src/{ui → elements}/HawaLogoButton.js +0 -0
- package/src/{ui → elements}/HawaRadio.js +3 -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/{ui → elements}/HawaTextField.js +0 -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 +1 -1
- package/src/stories/BlocksStories/Account/UserSettings.stories.js +36 -2
- 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 +27 -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/Box.stories.js +4 -13
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/main.00b064cb.iframe.bundle.js +1 -0
- package/storybook-static/vendors~main.5eab66d3.iframe.bundle.js +76 -0
- package/storybook-static/{vendors~main.f8d30727.iframe.bundle.js.LICENSE.txt → vendors~main.5eab66d3.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/vendors~main.5eab66d3.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/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
|
@@ -2,7 +2,7 @@ export * from "./AdaptiveButton";
|
|
|
2
2
|
export * from "./ActionButton";
|
|
3
3
|
export * from "./HawaCheckbox";
|
|
4
4
|
export * from "./HawaRadio";
|
|
5
|
-
|
|
5
|
+
export * from "./HawaCard";
|
|
6
6
|
export * from "./HawaSettingsRow";
|
|
7
7
|
export * from "./HawaLogoButton";
|
|
8
8
|
export * from "./HawaButton";
|
|
@@ -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",
|
|
@@ -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,27 @@
|
|
|
1
|
+
import { Container } from "@mui/material";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { HawaCard } from "../../elements";
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: "Elements/Cards/Pricing",
|
|
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 Pricing = (args) => {
|
|
17
|
+
return (
|
|
18
|
+
<HawaCard
|
|
19
|
+
title="Pro"
|
|
20
|
+
subtitle="For small business"
|
|
21
|
+
price="300"
|
|
22
|
+
currency="SAR"
|
|
23
|
+
cycleText="Every 6 months"
|
|
24
|
+
features={["Unlimited Menus", "Unlimited Items", "Custom Handle"]}
|
|
25
|
+
/>
|
|
26
|
+
);
|
|
27
|
+
};
|
|
@@ -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,22 +1,13 @@
|
|
|
1
|
+
import { Container } from "@mui/material";
|
|
1
2
|
import React from "react";
|
|
2
3
|
import { Box } from "../../layout";
|
|
3
4
|
|
|
4
5
|
const Template = (args) => {
|
|
5
|
-
return
|
|
6
|
-
<>
|
|
7
|
-
<Box>Box 1</Box>
|
|
8
|
-
<Box>
|
|
9
|
-
<div style={{ backgroundColor: "white", padding: 10, color: "black" }}>
|
|
10
|
-
testing box in box
|
|
11
|
-
</div>
|
|
12
|
-
</Box>
|
|
13
|
-
<Box>Box 3</Box>
|
|
14
|
-
</>
|
|
15
|
-
);
|
|
6
|
+
return <Container variant="auth">test</Container>;
|
|
16
7
|
};
|
|
17
8
|
export default {
|
|
18
|
-
title: "Layout/
|
|
19
|
-
component: <
|
|
9
|
+
title: "Layout/Container",
|
|
10
|
+
component: <Container />,
|
|
20
11
|
parameters: {
|
|
21
12
|
backgrounds: {
|
|
22
13
|
default: "light"
|
|
@@ -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.5eab66d3.iframe.bundle.js"></script><script src="main.00b064cb.iframe.bundle.js"></script></body></html>
|