@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.
Files changed (79) hide show
  1. package/es/index.es.js +1 -1
  2. package/lib/index.js +1 -1
  3. package/package.json +1 -1
  4. package/src/blocks/Account/UserProfileForm.js +3 -4
  5. package/src/blocks/Account/UserSettingsForm.js +3 -7
  6. package/src/blocks/AuthForms/NewPasswordForm.js +57 -38
  7. package/src/blocks/AuthForms/ResetPasswordForm.js +36 -39
  8. package/src/blocks/AuthForms/SignInForm.js +73 -65
  9. package/src/blocks/AuthForms/SignUpForm.js +61 -44
  10. package/src/blocks/Payment/ChargeWalletForm.js +1 -1
  11. package/src/blocks/Payment/CreditCardForm.js +1 -1
  12. package/src/blocks/Payment/PayWithWallet.js +1 -1
  13. package/src/blocks/Payment/SelectPayment.js +1 -1
  14. package/src/blocks/Pricing/PricingPlans.js +57 -0
  15. package/src/{ui → elements}/ActionButton.js +0 -0
  16. package/src/elements/AdaptiveButton.js +32 -0
  17. package/src/{ui → elements}/AutoCompleteField.js +0 -0
  18. package/src/{ui → elements}/DragDropImages.js +0 -0
  19. package/src/{ui → elements}/Hawa.js +0 -0
  20. package/src/{ui → elements}/HawaAlert.js +1 -1
  21. package/src/elements/HawaAppBar.js +139 -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/elements/HawaListItem.js +21 -0
  26. package/src/{ui → elements}/HawaLogoButton.js +0 -0
  27. package/src/elements/HawaPricingCard.js +133 -0
  28. package/src/{ui → elements}/HawaRadio.js +1 -1
  29. package/src/elements/HawaSettingsRow.js +27 -0
  30. package/src/elements/HawaSwitch.js +6 -0
  31. package/src/{ui → elements}/HawaTextArea.js +0 -0
  32. package/src/elements/HawaTextField.js +26 -0
  33. package/src/{ui → elements}/HawaTypography.js +0 -0
  34. package/src/{ui → elements}/RadioBox.js +0 -0
  35. package/src/{ui → elements}/Row.js +0 -0
  36. package/src/{ui → elements}/SelectedField.js +0 -0
  37. package/src/{ui → elements}/StyledTooltip.js +0 -0
  38. package/src/{ui → elements}/TabPanel.js +0 -0
  39. package/src/{ui → elements}/index.js +3 -1
  40. package/src/layout/HawaAppLayout.js +246 -0
  41. package/src/layout/index.js +1 -0
  42. package/src/stories/BlocksStories/Account/UserSettings.stories.js +36 -2
  43. package/src/stories/BlocksStories/Auth/NewPassword.stories.js +2 -1
  44. package/src/stories/BlocksStories/Auth/ResetPassword.stories.js +1 -2
  45. package/src/stories/BlocksStories/Auth/SignUp.stories.js +1 -0
  46. package/src/stories/BlocksStories/Pricing/BillingPlans.stories.js +63 -0
  47. package/src/stories/BlocksStories/Pricing/LandingPlans.stories.js +63 -0
  48. package/src/stories/ElementsStories/AdaptiveButton.stories.js +51 -0
  49. package/src/stories/{UIStories → ElementsStories}/Alert.stories.js +1 -1
  50. package/src/stories/{UIStories → ElementsStories}/InputLabel.stories.js +1 -1
  51. package/src/stories/ElementsStories/ItemCard.stories.js +18 -0
  52. package/src/stories/{UIStories → ElementsStories}/LogoButtons.stories.js +1 -1
  53. package/src/stories/ElementsStories/PricingCard.stories.js +91 -0
  54. package/src/stories/ElementsStories/RadioSelector.stories.js +36 -0
  55. package/src/stories/ElementsStories/SettingsRow.stories.js +63 -0
  56. package/src/stories/{UIStories → ElementsStories}/TextField.stories.js +1 -1
  57. package/src/stories/LayoutStories/AppBar.stories.js +29 -0
  58. package/src/stories/LayoutStories/AppLayout.stories.js +52 -0
  59. package/src/stories/LayoutStories/Box.stories.js +4 -13
  60. package/src/styles.css +1 -0
  61. package/storybook-static/iframe.html +1 -1
  62. package/storybook-static/index.html +1 -1
  63. package/storybook-static/main.66955578.iframe.bundle.js +1 -0
  64. package/storybook-static/vendors~main.b4186832.iframe.bundle.js +76 -0
  65. package/storybook-static/{vendors~main.f8d30727.iframe.bundle.js.LICENSE.txt → vendors~main.b4186832.iframe.bundle.js.LICENSE.txt} +0 -0
  66. package/storybook-static/vendors~main.b4186832.iframe.bundle.js.map +1 -0
  67. package/src/stories/UIStories/ActionButton.stories.js +0 -41
  68. package/src/stories/UIStories/AdaptiveButton.stories.js +0 -76
  69. package/src/stories/UIStories/CheckBox.stories.js +0 -34
  70. package/src/stories/UIStories/RadioSelector.stories.js +0 -24
  71. package/src/stories/UIStories/SettingsRow.stories.js +0 -51
  72. package/src/themes/HawaProvider.js +0 -192
  73. package/src/themes/QawaimTheme.js +0 -199
  74. package/src/ui/AdaptiveButton.js +0 -131
  75. package/src/ui/HawaSettingsRow.js +0 -45
  76. package/src/ui/HawaTextField.js +0 -160
  77. package/storybook-static/main.a9a16923.iframe.bundle.js +0 -1
  78. package/storybook-static/vendors~main.f8d30727.iframe.bundle.js +0 -76
  79. package/storybook-static/vendors~main.f8d30727.iframe.bundle.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vendors~main.b4186832.iframe.bundle.js","sources":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A","sourceRoot":""}
@@ -1,41 +0,0 @@
1
- import React from "react";
2
- import { ActionButton } from "../../ui";
3
-
4
- export default {
5
- title: "Elements/Buttons/ActionButton",
6
- component: ActionButton,
7
- argTypes: {
8
- theme: {
9
- options: ["primary", "secondary", "default"],
10
- control: { type: "select" }
11
- }
12
- }
13
- };
14
- const Template = (args) => {
15
- return <ActionButton text={args.buttonLabel} />;
16
- };
17
-
18
- Template.args = {
19
- showText: true,
20
- buttonLabel: "test",
21
- theme: "primary"
22
- };
23
- export const Primary = Template.bind({});
24
- Primary.args = {
25
- showText: true,
26
- buttonLabel: "test",
27
- theme: "primary"
28
- };
29
-
30
- export const Secondary = Template.bind({});
31
- Secondary.args = {
32
- showText: true,
33
- buttonLabel: "test",
34
- theme: "secondary"
35
- };
36
- export const Default = Template.bind({});
37
- Default.args = {
38
- showText: true,
39
- buttonLabel: "test",
40
- theme: "default"
41
- };
@@ -1,76 +0,0 @@
1
- import React from "react";
2
- import CastIcon from "@mui/icons-material/Cast";
3
- import { AdaptiveButton } from "../../ui";
4
-
5
- export default {
6
- title: "Elements/Buttons/AdaptiveButton",
7
- component: AdaptiveButton,
8
- argsTypes: {
9
- buttonLabel: { control: "text" },
10
- borderRadius: { control: "number" },
11
- buttonColor: { control: "color" },
12
- padding: { control: "number" },
13
- hintTitle: { control: "text" },
14
- hintContent: { control: "text" },
15
- theme: {
16
- options: ["primary", "secondary", "default"],
17
- control: { type: "select" }
18
- }
19
- },
20
- args: {
21
- hintTitle: "test",
22
- hintContent: "more test",
23
- buttonColor: "#f9f9f9",
24
- theme: "primary"
25
- }
26
- };
27
-
28
- const Template = (args) => {
29
- return <AdaptiveButton {...args} />;
30
- };
31
-
32
- export const FullButton = Template.bind({});
33
- FullButton.args = {
34
- // showText: true,
35
- // buttonLabel: "test",
36
- // borderRadius: 5,
37
- // icon: <CastIcon />,
38
- // textColor: "#000000",
39
- // buttonColor: "#f9f9f9",
40
- theme: "primary"
41
- // placeholder: "Example ...",
42
- // defaultValue: "This is default value",
43
- // inputLabel: "Text Field",
44
- // padding: 10
45
- };
46
-
47
- export const IconOnly = Template.bind({});
48
- IconOnly.args = {
49
- // showText: true,
50
- // buttonLabel: "test",
51
- // borderRadius: 5,
52
- // buttonColor: "#878787",
53
- // textColor: "#ffffff",
54
- // icon: <CastIcon />,
55
- theme: "primary"
56
-
57
- // placeholder: "Exemple ...",
58
- // defaultValue: "This is default value",
59
- // inputLabel: "Text Field",
60
- // padding: 10
61
- };
62
- export const Danger = Template.bind({});
63
- Danger.args = {
64
- // showText: true,
65
- // buttonLabel: "test",
66
- // borderRadius: 5,
67
- // buttonColor: "#c0c0c0",
68
- // danger: true,
69
- // icon: <CastIcon />,
70
- theme: "primary"
71
-
72
- // placeholder: "Exemple ...",
73
- // defaultValue: "This is default value",
74
- // inputLabel: "Text Field",
75
- // padding: 10
76
- };
@@ -1,34 +0,0 @@
1
- import React from "react";
2
- import { HawaCheckbox } from "../../ui";
3
-
4
- const Template = (args) => {
5
- return <HawaCheckbox {...args} />;
6
- };
7
-
8
- export default {
9
- title: "UI/Checkbox",
10
- component: HawaCheckbox,
11
- argsTypes: {
12
- defaultValue: {
13
- options: [true, false],
14
- control: { type: "radio" }
15
- }
16
- },
17
- args: {
18
- defaultValue: true,
19
- disabled: true
20
- }
21
- };
22
-
23
- export const Light = Template.bind({});
24
- export const Dark = Template.bind({});
25
-
26
- Light.args = {
27
- color: "red",
28
- defaultValue: false,
29
- label: "test"
30
- };
31
- Dark.args = {
32
- color: "gray",
33
- defaultValue: false
34
- };
@@ -1,24 +0,0 @@
1
- import React from "react";
2
- import { HawaRadio } from "../../ui";
3
-
4
- export default {
5
- title: "Elements/Selections/Radio Selector",
6
- component: [HawaRadio],
7
- argTypes: {},
8
- args: {}
9
- };
10
-
11
- export const RadioSelector = (args) => {
12
- return (
13
- <HawaRadio
14
- {...args}
15
- handleChange={(e) => console.log("changing to ", e)}
16
- defaultValue="option1"
17
- options={[
18
- { label: "Option 1", value: "option1" },
19
- { label: "Option 2", value: "option2" },
20
- { label: "Option 3", value: "option3" }
21
- ]}
22
- />
23
- );
24
- };
@@ -1,51 +0,0 @@
1
- import React from "react";
2
- import {
3
- SelectPayment,
4
- CreditCardForm,
5
- ChargeWalletForm,
6
- PayWithWallet
7
- } from "../../blocks/Payment";
8
- import { HawaSettingsRow } from "../../ui";
9
-
10
- export default {
11
- title: "UI/SettingsRow",
12
- component: [SelectPayment, CreditCardForm],
13
- argTypes: {
14
- theme: {
15
- options: ["primary", "secondary", "default"],
16
- control: { type: "select" }
17
- },
18
- type: {
19
- options: ["checkbox", "text", "default"],
20
- control: { type: "select" }
21
- }
22
- },
23
- args: {
24
- theme: "primary",
25
- type: "checkbox"
26
- }
27
- };
28
-
29
- const HawaSettingsRowTemplate = (args) => {
30
- return <HawaSettingsRow settingsType={args.type} />;
31
- };
32
-
33
- export const Checkbox = HawaSettingsRowTemplate.bind({});
34
- Checkbox.args = {
35
- theme: "primary",
36
- type: "checkbox"
37
- };
38
- export const Text = (args) => {
39
- return <HawaSettingsRow settingsType={args.type} />;
40
- };
41
- Text.args = {
42
- theme: "primary",
43
- type: "text"
44
- };
45
- export const Radio = (args) => {
46
- return <HawaSettingsRow settingsType={args.type} />;
47
- };
48
- Radio.args = {
49
- theme: "primary",
50
- type: "radio"
51
- };
@@ -1,192 +0,0 @@
1
- import { createTheme } from "@mui/system";
2
- // import { createContext } from "react";
3
-
4
- // //make the text color of the action buttons different from the text color of the layout
5
- // let allPrimaryBG = "#f90900";
6
- // let allPrimaryAction = "#B20D30";
7
- // export const defaultTheme = {
8
- // allPrimaryBG: "#f90900",
9
- // allPrimaryAction: "#138A36",
10
- // allBorderRadius: 10,
11
- // borderRadius: 10,
12
- // primaryColor: "blue",
13
- // secondaryColor: "grey",
14
- // // primaryActionColor: '#f72585', //Colors of the buttons
15
- // primaryActionColor: "grey", //Colors of the buttons
16
- // secondaryActionColor: "#4cc9f0", //Colors of the buttons
17
- // layoutColor: "#d3d4d9", //Colors of boxes and cards
18
- // textColor: "black", //Colors of text everywhere
19
- // inputColor: "white", //Color of input fields
20
- // lightBackground: "#FBF5F3", //
21
- // darkBackground: "#0F0E0E",
22
- // testcolor: "green",
23
- // margins: 10,
24
- // paddings: 10,
25
- // typography: {
26
- // fontFamily: ["IBMPlex"].join(","),
27
- // primary: { color: "black" },
28
- // secondary: { color: "white" }
29
- // },
30
- // logoButton: {
31
- // primary: {
32
- // borderRadius: 10,
33
- // backgroundColor: allPrimaryAction,
34
- // // margin: 10,
35
- // marginTop: 10,
36
- // padding: 30,
37
- // paddingTop: 0,
38
- // paddingBottom: 0,
39
- // border: "1px solid #ced4da",
40
- // height: 50,
41
- // "&:focus": {
42
- // borderColor: allPrimaryAction
43
- // }
44
- // },
45
- // secondary: {
46
- // borderRadius: 10,
47
- // backgroundColor: "#f90900",
48
- // marginTop: 10,
49
- // padding: 30,
50
- // paddingTop: 0,
51
- // paddingBottom: 0,
52
- // border: "1px solid #ced4da",
53
- // height: 50,
54
- // "&:focus": {
55
- // borderColor: "green"
56
- // }
57
- // }
58
- // },
59
- // actionButton: {
60
- // primary: {
61
- // borderRadius: 10,
62
- // // backgroundColor: "#f90900",
63
- // backgroundColor: allPrimaryAction,
64
- // color: "white",
65
- // margin: 10,
66
- // padding: 10,
67
- // border: "1px solid #ced4da",
68
- // fontSize: 16,
69
- // height: 50,
70
- // "&:focus": {
71
- // borderColor: "red"
72
- // }
73
- // },
74
- // secondary: {
75
- // borderRadius: 10,
76
- // margin: 10,
77
- // padding: 10,
78
- // backgroundColor: "#FF8811",
79
- // color: "black"
80
- // }
81
- // },
82
- // layout: {
83
- // primary: {
84
- // backgroundColor: "#d3d4d9",
85
- // color: "black",
86
- // margin: 10,
87
- // padding: 10,
88
- // borderRadius: 10
89
- // },
90
- // secondary: {
91
- // backgroundColor: "#001E3C",
92
- // // backgroundColor: "red",
93
- // color: "white",
94
- // margin: 10,
95
- // padding: 10,
96
- // borderRadius: 10
97
- // }
98
- // },
99
- // inputFields: {
100
- // primary: {
101
- // backgroundColor: "white",
102
- // borderRadius: 10,
103
- // padding: 10,
104
- // "&:hover": {
105
- // borderColor: "red",
106
- // borderWidth: 1,
107
- // outline: "1px solid black"
108
- // }
109
- // },
110
- // secondary: {
111
- // backgroundColor: "white",
112
- // borderRadius: 10,
113
- // padding: 10
114
- // }
115
- // },
116
- // alerts: {
117
- // primary: {
118
- // marginBottom: 10,
119
- // padding: 10,
120
- // borderRadius: 10
121
- // },
122
- // secondary: {
123
- // marginBottom: 10,
124
- // padding: 10,
125
- // borderRadius: 10
126
- // }
127
- // },
128
- // settingsRow: {
129
- // primary: {
130
- // display: "flex",
131
- // flexDirection: "row",
132
- // justifyContent: "space-between",
133
- // alignItems: "center",
134
- // backgroundColor: "#F5F5F5",
135
- // margin: 0,
136
- // padding: 10,
137
- // borderRadius: 10
138
- // },
139
- // secondary: {
140
- // display: "flex",
141
- // flexDirection: "row",
142
- // justifyContent: "space-between",
143
- // alignItems: "center",
144
- // backgroundColor: "blue",
145
- // margin: 0,
146
- // padding: 5,
147
- // borderRadius: 10
148
- // }
149
- // },
150
- // radioSelector: {
151
- // primary: {
152
- // padding: 10,
153
- // borderRadius: 10
154
- // },
155
- // secondary: {
156
- // padding: 10,
157
- // borderRadius: 10
158
- // }
159
- // }
160
- // };
161
-
162
- export const QawaimTheme = createTheme({
163
- components: {
164
- MuiButton: {
165
- variants: [
166
- {
167
- props: { variant: "withLogo" },
168
- style: {
169
- textTransform: "none",
170
- border: `2px solid blue`,
171
- backgroundColor: "red"
172
- }
173
- },
174
- {
175
- props: { variant: "dashed", color: "secondary" },
176
- style: {
177
- border: `4px dashed red`
178
- }
179
- }
180
- ]
181
- },
182
- MuiButton: {
183
- styleOverrides: {
184
- // Name of the slot
185
- root: {
186
- // Some CSS
187
- fontSize: "3rem"
188
- }
189
- }
190
- }
191
- }
192
- });
@@ -1,199 +0,0 @@
1
- import { createTheme } from "@mui/system";
2
- // import { createContext } from "react";
3
-
4
- // //make the text color of the action buttons different from the text color of the layout
5
- // let allPrimaryBG = "#f90900";
6
- // let allPrimaryAction = "#B20D30";
7
- // export const defaultTheme = {
8
- // allPrimaryBG: "#f90900",
9
- // allPrimaryAction: "#138A36",
10
- // allBorderRadius: 10,
11
- // borderRadius: 10,
12
- // primaryColor: "blue",
13
- // secondaryColor: "grey",
14
- // // primaryActionColor: '#f72585', //Colors of the buttons
15
- // primaryActionColor: "grey", //Colors of the buttons
16
- // secondaryActionColor: "#4cc9f0", //Colors of the buttons
17
- // layoutColor: "#d3d4d9", //Colors of boxes and cards
18
- // textColor: "black", //Colors of text everywhere
19
- // inputColor: "white", //Color of input fields
20
- // lightBackground: "#FBF5F3", //
21
- // darkBackground: "#0F0E0E",
22
- // testcolor: "green",
23
- // margins: 10,
24
- // paddings: 10,
25
- // typography: {
26
- // fontFamily: ["IBMPlex"].join(","),
27
- // primary: { color: "black" },
28
- // secondary: { color: "white" }
29
- // },
30
- // logoButton: {
31
- // primary: {
32
- // borderRadius: 10,
33
- // backgroundColor: allPrimaryAction,
34
- // // margin: 10,
35
- // marginTop: 10,
36
- // padding: 30,
37
- // paddingTop: 0,
38
- // paddingBottom: 0,
39
- // border: "1px solid #ced4da",
40
- // height: 50,
41
- // "&:focus": {
42
- // borderColor: allPrimaryAction
43
- // }
44
- // },
45
- // secondary: {
46
- // borderRadius: 10,
47
- // backgroundColor: "#f90900",
48
- // marginTop: 10,
49
- // padding: 30,
50
- // paddingTop: 0,
51
- // paddingBottom: 0,
52
- // border: "1px solid #ced4da",
53
- // height: 50,
54
- // "&:focus": {
55
- // borderColor: "green"
56
- // }
57
- // }
58
- // },
59
- // actionButton: {
60
- // primary: {
61
- // borderRadius: 10,
62
- // // backgroundColor: "#f90900",
63
- // backgroundColor: allPrimaryAction,
64
- // color: "white",
65
- // margin: 10,
66
- // padding: 10,
67
- // border: "1px solid #ced4da",
68
- // fontSize: 16,
69
- // height: 50,
70
- // "&:focus": {
71
- // borderColor: "red"
72
- // }
73
- // },
74
- // secondary: {
75
- // borderRadius: 10,
76
- // margin: 10,
77
- // padding: 10,
78
- // backgroundColor: "#FF8811",
79
- // color: "black"
80
- // }
81
- // },
82
- // layout: {
83
- // primary: {
84
- // backgroundColor: "#d3d4d9",
85
- // color: "black",
86
- // margin: 10,
87
- // padding: 10,
88
- // borderRadius: 10
89
- // },
90
- // secondary: {
91
- // backgroundColor: "#001E3C",
92
- // // backgroundColor: "red",
93
- // color: "white",
94
- // margin: 10,
95
- // padding: 10,
96
- // borderRadius: 10
97
- // }
98
- // },
99
- // inputFields: {
100
- // primary: {
101
- // backgroundColor: "white",
102
- // borderRadius: 10,
103
- // padding: 10,
104
- // "&:hover": {
105
- // borderColor: "red",
106
- // borderWidth: 1,
107
- // outline: "1px solid black"
108
- // }
109
- // },
110
- // secondary: {
111
- // backgroundColor: "white",
112
- // borderRadius: 10,
113
- // padding: 10
114
- // }
115
- // },
116
- // alerts: {
117
- // primary: {
118
- // marginBottom: 10,
119
- // padding: 10,
120
- // borderRadius: 10
121
- // },
122
- // secondary: {
123
- // marginBottom: 10,
124
- // padding: 10,
125
- // borderRadius: 10
126
- // }
127
- // },
128
- // settingsRow: {
129
- // primary: {
130
- // display: "flex",
131
- // flexDirection: "row",
132
- // justifyContent: "space-between",
133
- // alignItems: "center",
134
- // backgroundColor: "#F5F5F5",
135
- // margin: 0,
136
- // padding: 10,
137
- // borderRadius: 10
138
- // },
139
- // secondary: {
140
- // display: "flex",
141
- // flexDirection: "row",
142
- // justifyContent: "space-between",
143
- // alignItems: "center",
144
- // backgroundColor: "blue",
145
- // margin: 0,
146
- // padding: 5,
147
- // borderRadius: 10
148
- // }
149
- // },
150
- // radioSelector: {
151
- // primary: {
152
- // padding: 10,
153
- // borderRadius: 10
154
- // },
155
- // secondary: {
156
- // padding: 10,
157
- // borderRadius: 10
158
- // }
159
- // }
160
- // };
161
-
162
- export const QawaimTheme = createTheme({
163
- components: {
164
- MuiButton: {
165
- styleOverrides: {
166
- // Name of the slot
167
- root: {
168
- // Some CSS
169
- fontSize: "1rem"
170
- }
171
- },
172
- variants: [
173
- {
174
- props: { variant: "withLogo" },
175
- style: {
176
- textTransform: "none",
177
- border: `2px solid blue`,
178
- backgroundColor: "red"
179
- }
180
- },
181
- {
182
- props: { variant: "dashed", color: "secondary" },
183
- style: {
184
- border: `4px dashed red`
185
- }
186
- }
187
- ]
188
- },
189
- MuiButton: {
190
- styleOverrides: {
191
- // Name of the slot
192
- root: {
193
- // Some CSS
194
- fontSize: "3rem"
195
- }
196
- }
197
- }
198
- }
199
- });