@sikka/hawa 0.0.38 → 0.0.40

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.
@@ -0,0 +1,47 @@
1
+ import React from "react";
2
+ import Container from "@mui/material/Container";
3
+ import PropTypes from "prop-types";
4
+ import Typography from "@mui/material/Typography";
5
+ import { Button } from "@mui/material";
6
+
7
+ export const NotFound = (props) => {
8
+ return (
9
+ <div
10
+ style={{
11
+ display: "flex",
12
+ flexDirection: "column",
13
+ alignItems: "center"
14
+ }}
15
+ >
16
+ <Typography variant="h2" fontWeight={700}>
17
+ 404
18
+ </Typography>
19
+ <Typography variant="h5" fontWeight={700}>
20
+ Page Not Found
21
+ </Typography>
22
+ <Container
23
+ style={{
24
+ maxWidth: 300,
25
+ marginTop: 10,
26
+ direction: props.lang === "ar" ? "rtl" : "ltr"
27
+ }}
28
+ maxWidth="xs"
29
+ >
30
+ <Typography textAlign={"center"}>
31
+ If you're lost please contact us help@sikka.io{" "}
32
+ </Typography>
33
+ <Button style={{ marginTop: 5 }} variant="contained">
34
+ Home
35
+ </Button>
36
+ </Container>
37
+ </div>
38
+ );
39
+ };
40
+ NotFound.propTypes = {
41
+ /**
42
+ * An object of all the texts in the blocks
43
+ */
44
+ texts: PropTypes.shape({
45
+ emailLabel: PropTypes.string
46
+ })
47
+ };
@@ -0,0 +1 @@
1
+ export * from "./NotFound.js";
@@ -1,6 +1,6 @@
1
1
  import React, { useState } from "react";
2
2
  import Container from "@mui/material/Container";
3
- import { HawaPricingCard, HawaRadio } from "../../elements";
3
+ import { HawaPricingCard, HawaPanelTabs } from "../../elements";
4
4
  import PropTypes from "prop-types";
5
5
 
6
6
  export const PricingPlans = (props) => {
@@ -16,7 +16,7 @@ export const PricingPlans = (props) => {
16
16
  marginBottom: 10
17
17
  }}
18
18
  >
19
- <HawaRadio
19
+ <HawaPanelTabs
20
20
  location="inPricing"
21
21
  handleChange={(e) => setCurrentCycle(e)}
22
22
  defaultValue="monthly"
@@ -28,7 +28,7 @@ export const PricingPlans = (props) => {
28
28
  ]}
29
29
  />
30
30
 
31
- <HawaRadio
31
+ <HawaPanelTabs
32
32
  location="inPricing"
33
33
  handleChange={(e) => {
34
34
  setCurrentCurrency(e);
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ import Chip from "@mui/material/Chip";
3
+
4
+ export const HawaChip = (props) => {
5
+ return <Chip {...props} />;
6
+ };
@@ -3,7 +3,7 @@ import Button from "@mui/material/Button";
3
3
  import Container from "@mui/material/Container";
4
4
  import PropTypes from "prop-types";
5
5
 
6
- export const HawaRadio = (props) => {
6
+ export const HawaPanelTabs = (props) => {
7
7
  const [value, setValue] = useState(props.defaultValue);
8
8
  return (
9
9
  <Container variant={props.location || "panelTabs"}>
@@ -29,7 +29,8 @@ export const HawaRadio = (props) => {
29
29
  </Container>
30
30
  );
31
31
  };
32
- HawaRadio.propTypes = {
32
+
33
+ HawaPanelTabs.propTypes = {
33
34
  lang: PropTypes.string,
34
35
  options: PropTypes.arrayOf(
35
36
  PropTypes.shape({
@@ -4,7 +4,7 @@ import Checkbox from "@mui/material/Checkbox";
4
4
  import Container from "@mui/material/Container";
5
5
  import { HawaTypography } from "./HawaTypography";
6
6
  import { HawaTextField } from "./HawaTextField";
7
- import { HawaRadio } from "./HawaRadio";
7
+ import { HawaPanelTabs } from "./HawaPanelTabs";
8
8
  import { HawaSwitch } from "./HawaSwitch";
9
9
  import { HawaColorPicker } from "./HawaColorPicker";
10
10
  import { HawaRange } from "./HawaRange";
@@ -19,7 +19,7 @@ export const HawaSettingsRow = (props) => {
19
19
  {props.settingsType === "range" && <HawaRange {...props} />}
20
20
  {props.settingsType === "color" && <HawaColorPicker {...props} />}
21
21
  {props.settingsType === "radio" && (
22
- <HawaRadio location="inSettings" {...props} />
22
+ <HawaPanelTabs location="inSettings" {...props} />
23
23
  )}
24
24
  </Container>
25
25
  );
@@ -2,7 +2,8 @@ export * from "./AdaptiveButton";
2
2
  export * from "./ActionButton";
3
3
  export * from "./HawaSnackbar";
4
4
  export * from "./HawaCheckbox";
5
- export * from "./HawaRadio";
5
+ export * from "./HawaPanelTabs";
6
+ export * from "./HawaChip";
6
7
  export * from "./HawaItemCard";
7
8
  export * from "./HawaPricingCard";
8
9
  export * from "./HawaSettingsRow";
@@ -11,7 +12,6 @@ export * from "./HawaButton";
11
12
  export * from "./HawaSelect";
12
13
  export * from "./HawaRange";
13
14
  export * from "./HawaTextField";
14
- export * from "./HawaTextArea";
15
15
  export * from "./HawaInputLabel";
16
16
  export * from "./HawaTypography";
17
17
  export * from "./HawaAlert";
package/src/index.js CHANGED
@@ -2,3 +2,4 @@ export * from "./blocks";
2
2
  export * from "./elements";
3
3
  export * from "./layout";
4
4
  export * from "./theme";
5
+ export * from "./Hooks"
@@ -22,7 +22,6 @@ export const HawaAppBar = (props) => {
22
22
  const handleCloseNavMenu = () => setAnchorElNav(null);
23
23
  const handleCloseUserMenu = () => setAnchorElUser(null);
24
24
 
25
- console.log("theme is ", theme);
26
25
  return (
27
26
  <AppBar position="static" variant="appbar">
28
27
  <Container variant="appbar">
@@ -6,15 +6,22 @@ export const CreateHawaTheme = (
6
6
  primaryActionColor,
7
7
  primaryLayoutColor,
8
8
  primaryActionTextColor,
9
- mainFont
10
- ) =>
11
- createTheme({
9
+ mainFont,
10
+ breakpointsValues
11
+ ) => {
12
+ console.log("achra achraf", breakpointsValues);
13
+ return createTheme({
12
14
  typography: { fontFamily: ["IBMPlex", "Roboto"].join(",") },
13
15
  palette: {
14
16
  primary: {
15
17
  main: primaryActionColor
16
18
  }
17
19
  },
20
+ breakpoints: {
21
+ values: breakpointsValues
22
+ ? breakpointsValues
23
+ : { xs: 0, sm: 600, md: 900, lg: 1200, xl: 1536 }
24
+ },
18
25
  components: {
19
26
  MuiStack: {
20
27
  variants: [
@@ -147,13 +154,13 @@ export const CreateHawaTheme = (
147
154
  paddingLeft: 10,
148
155
  borderRadius: allBorderRadius,
149
156
  "&:hover": { outline: `1px solid ${primaryActionColor}` },
150
- "&:focus": { outline: `1px solid ${primaryActionColor}` },
157
+ "&:focus": { outline: `1px solid ${primaryActionColor}` }
151
158
  },
152
159
  input: {
153
160
  margin: 0,
154
161
  border: "none",
155
162
  padding: 10,
156
- ":focus": { border: "none" },
163
+ ":focus": { border: "none" }
157
164
  }
158
165
  },
159
166
  variants: [
@@ -164,19 +171,18 @@ export const CreateHawaTheme = (
164
171
  { display: "none" },
165
172
  "& input[type=number]": { MozAppearance: "textfield" }
166
173
  }
167
- },
174
+ },
168
175
  {
169
- props : {variant : "pin"},
170
- style:{
176
+ props: { variant: "pin" },
177
+ style: {
171
178
  height: 60,
172
- width : 50,
173
- textAlign:"center",
179
+ width: 50,
180
+ textAlign: "center",
174
181
  "& input::-webkit-outer-spin-button, & input::-webkit-inner-spin-button":
175
182
  { display: "none" },
176
183
  "& input[type=number]": { MozAppearance: "textfield" }
177
- },
184
+ }
178
185
  }
179
-
180
186
  ]
181
187
  },
182
188
  MuiDialog: {
@@ -715,34 +721,34 @@ export const CreateHawaTheme = (
715
721
  ]
716
722
  },
717
723
 
718
- MuiTextField : {
719
- styleOverrides:{
724
+ MuiTextField: {
725
+ styleOverrides: {
720
726
  root: {
721
727
  backgroundColor: "white",
722
728
  paddingRight: 10,
723
729
  paddingLeft: 10,
724
730
  borderRadius: allBorderRadius,
725
731
  "&:hover": { outline: `1px solid ${primaryActionColor}` },
726
- "&:focus": { outline: `1px solid ${primaryActionColor}` },
727
- },
732
+ "&:focus": { outline: `1px solid ${primaryActionColor}` }
733
+ }
728
734
  },
729
735
  variants: [
730
736
  {
731
- props : {variant : "pinInput"},
732
- style:{
737
+ props: { variant: "pinInput" },
738
+ style: {
733
739
  height: 60,
734
- width : 50,
735
- textAlign:"center",
740
+ width: 50,
741
+ textAlign: "center",
736
742
  "& input::-webkit-outer-spin-button, & input::-webkit-inner-spin-button":
737
743
  { display: "none" },
738
744
  "& input[type=number]": { MozAppearance: "textfield" }
739
- },
745
+ }
740
746
  }
741
747
  ]
742
748
  }
743
-
744
749
  }
745
750
  });
751
+ };
746
752
 
747
753
  export const UpdateHawaTheme = (
748
754
  theme,
@@ -361,4 +361,4 @@
361
361
 
362
362
 
363
363
 
364
- 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.9be73be4.iframe.bundle.js"></script><script src="vendors~main.826e89a1.iframe.bundle.js"></script><script src="main.2a7fa838.iframe.bundle.js"></script></body></html>
364
+ 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.9be73be4.iframe.bundle.js"></script><script src="vendors~main.40879e99.iframe.bundle.js"></script><script src="main.066fa5c5.iframe.bundle.js"></script></body></html>