@sikka/hawa 0.0.51 → 0.0.53

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 (37) 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/elements/DragDropImages.js +34 -26
  5. package/src/elements/HawaAccordian.js +0 -16
  6. package/src/elements/HawaItemCard.js +0 -1
  7. package/src/elements/HawaLogoButton.js +1 -1
  8. package/src/elements/HawaPhoneInput.js +2 -6
  9. package/src/elements/HawaPopMenu.js +82 -38
  10. package/src/elements/HawaPricingCard.js +102 -120
  11. package/src/elements/HawaRange.js +28 -12
  12. package/src/elements/HawaSearchBar.js +5 -7
  13. package/src/elements/HawaSettingsRow.js +4 -5
  14. package/src/elements/HawaTypography.js +1 -2
  15. package/src/elements/PinInput.js +14 -22
  16. package/src/elements/RadioBox.js +27 -27
  17. package/src/elements/SelectedField.js +43 -43
  18. package/src/elements/TabPanel.js +13 -16
  19. package/src/layout/HawaAppLayout.js +238 -238
  20. package/src/layout/HawaAppLayout2.js +239 -239
  21. package/src/layout/index.js +1 -1
  22. package/storybook-static/{1.1afe453d.iframe.bundle.js → 1.c5cb37d9.iframe.bundle.js} +0 -0
  23. package/storybook-static/{2.e7f8eecc.iframe.bundle.js → 2.c8f6dc2b.iframe.bundle.js} +0 -0
  24. package/storybook-static/{6.b22bfe7f.iframe.bundle.js → 6.98a925e3.iframe.bundle.js} +3 -3
  25. package/storybook-static/{6.b22bfe7f.iframe.bundle.js.LICENSE.txt → 6.98a925e3.iframe.bundle.js.LICENSE.txt} +0 -0
  26. package/storybook-static/6.98a925e3.iframe.bundle.js.map +1 -0
  27. package/storybook-static/iframe.html +1 -1
  28. package/storybook-static/main.d1517396.iframe.bundle.js +1 -0
  29. package/storybook-static/project.json +1 -1
  30. package/storybook-static/{runtime~main.0e8a2888.iframe.bundle.js → runtime~main.e7e3ab5b.iframe.bundle.js} +1 -1
  31. package/storybook-static/vendors~main.f32ea22a.iframe.bundle.js +76 -0
  32. package/storybook-static/{vendors~main.8ab765cf.iframe.bundle.js.LICENSE.txt → vendors~main.f32ea22a.iframe.bundle.js.LICENSE.txt} +0 -10
  33. package/storybook-static/vendors~main.f32ea22a.iframe.bundle.js.map +1 -0
  34. package/storybook-static/6.b22bfe7f.iframe.bundle.js.map +0 -1
  35. package/storybook-static/main.030838f5.iframe.bundle.js +0 -1
  36. package/storybook-static/vendors~main.8ab765cf.iframe.bundle.js +0 -76
  37. package/storybook-static/vendors~main.8ab765cf.iframe.bundle.js.map +0 -1
@@ -1,19 +1,18 @@
1
1
  import React from "react";
2
2
  import PropTypes from "prop-types";
3
- import Checkbox from "@mui/material/Checkbox";
4
- import Container from "@mui/material/Container";
5
3
  import { HawaTypography } from "./HawaTypography";
6
4
  import { HawaTextField } from "./HawaTextField";
7
5
  import { HawaPanelTabs } from "./HawaPanelTabs";
8
6
  import { HawaSwitch } from "./HawaSwitch";
9
7
  import { HawaColorPicker } from "./HawaColorPicker";
10
8
  import { HawaRange } from "./HawaRange";
9
+ import { HawaCheckbox } from "./HawaCheckbox";
11
10
 
12
11
  export const HawaSettingsRow = (props) => {
13
12
  return (
14
- <Container variant="settingsRow">
13
+ <div className="flex flex-row bg-white justify-between align-middle items-center p-2 rounded-xl my-2 h-14">
15
14
  <HawaTypography>{props.settingsLabel}</HawaTypography>
16
- {props.settingsType === "checkbox" && <Checkbox {...props} />}
15
+ {props.settingsType === "checkbox" && <HawaCheckbox {...props} />}
17
16
  {props.settingsType === "text" && <HawaTextField {...props} />}
18
17
  {props.settingsType === "boolean" && <HawaSwitch {...props} />}
19
18
  {props.settingsType === "range" && <HawaRange {...props} />}
@@ -21,7 +20,7 @@ export const HawaSettingsRow = (props) => {
21
20
  {props.settingsType === "radio" && (
22
21
  <HawaPanelTabs location="inSettings" {...props} />
23
22
  )}
24
- </Container>
23
+ </div>
25
24
  );
26
25
  };
27
26
 
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
- import Typography from "@mui/material/Typography";
3
2
 
4
3
  export const HawaTypography = (props) => {
5
- return <Typography {...props}>{props.children}</Typography>;
4
+ return <div {...props}>{props.children}</div>;
6
5
  };
@@ -1,14 +1,4 @@
1
- import {
2
- Input,
3
- makeStyles,
4
- TextField,
5
- InputLabel,
6
- Typography,
7
- Stack
8
- } from "@mui/material";
9
- import { object } from "prop-types";
10
1
  import React, { useEffect, useState } from "react";
11
- import { replaceAt } from "../util";
12
2
 
13
3
  export const HawaPinInput = ({
14
4
  children,
@@ -86,24 +76,25 @@ export const HawaPinInput = ({
86
76
  alignItems: "center"
87
77
  }}
88
78
  >
89
- {props.label && <InputLabel>{props.label}</InputLabel>}
79
+ {props.label && (
80
+ <label
81
+ for="first_name"
82
+ className="block mb-2 text-sm font-medium text-gray-900 dark:text-gray-300"
83
+ >
84
+ {props.label}
85
+ </label>
86
+ )}
87
+
90
88
  {props.helperText && (
91
- <Typography
89
+ <div
92
90
  style={{ marginBottom: !props.label && 10 }}
93
91
  variant="validation"
94
92
  >
95
93
  {props.helperText}
96
- </Typography>
94
+ </div>
97
95
  )}
98
96
  </div>
99
- <Stack
100
- direction={"row"}
101
- spacing={2}
102
- justifyContent="center"
103
- alignItems={"center"}
104
- >
105
- {childrenWithProps}
106
- </Stack>
97
+ <div>{childrenWithProps}</div>
107
98
  </div>
108
99
  </div>
109
100
  );
@@ -111,7 +102,8 @@ export const HawaPinInput = ({
111
102
 
112
103
  export const HawaPinInputField = (props) => {
113
104
  return (
114
- <Input
105
+ <input
106
+ className="w-12 rounded-lg mx-2"
115
107
  type={props.type && props.type == "alphanumeric" ? "text" : "number"}
116
108
  id={"pinInput" + props.index}
117
109
  defaultValue={props.defaultValue || ""}
@@ -1,29 +1,29 @@
1
- import React from "react";
2
- import { Controller, useFormContext } from "react-hook-form";
3
- import FormControlLabel from "@mui/material/FormControlLabel";
4
- import Checkbox from "@mui/material/Checkbox";
1
+ // import React from "react";
2
+ // import { Controller, useFormContext } from "react-hook-form";
3
+ // import FormControlLabel from "@mui/material/FormControlLabel";
4
+ // import Checkbox from "@mui/material/Checkbox";
5
5
 
6
- export const StyledRadioBox = (props) => {
7
- const { control } = useFormContext();
8
- const { name, defaultValue, rules, shouldUnregister } = props;
6
+ // export const StyledRadioBox = (props) => {
7
+ // const { control } = useFormContext();
8
+ // const { name, defaultValue, rules, shouldUnregister } = props;
9
9
 
10
- return (
11
- <React.Fragment>
12
- <Controller
13
- render={({ field }) => (
14
- <FormControlLabel
15
- control={<Checkbox />}
16
- {...props}
17
- {...field}
18
- checked={field.value}
19
- />
20
- )}
21
- name={name}
22
- rules={rules}
23
- control={control}
24
- defaultValue={defaultValue}
25
- shouldUnregister={shouldUnregister}
26
- />
27
- </React.Fragment>
28
- );
29
- };
10
+ // return (
11
+ // <React.Fragment>
12
+ // <Controller
13
+ // render={({ field }) => (
14
+ // <FormControlLabel
15
+ // control={<Checkbox />}
16
+ // {...props}
17
+ // {...field}
18
+ // checked={field.value}
19
+ // />
20
+ // )}
21
+ // name={name}
22
+ // rules={rules}
23
+ // control={control}
24
+ // defaultValue={defaultValue}
25
+ // shouldUnregister={shouldUnregister}
26
+ // />
27
+ // </React.Fragment>
28
+ // );
29
+ // };
@@ -1,46 +1,46 @@
1
- import React from "react";
2
- import { Controller, useFormContext } from "react-hook-form";
3
- import FormHelperText from "@mui/material/FormHelperText";
4
- import FormControl from "@mui/material/FormControl";
5
- import MenuItem from "@mui/material/MenuItem";
6
- import Select from "@mui/material/Select";
1
+ // import React from "react";
2
+ // import { Controller, useFormContext } from "react-hook-form";
3
+ // import FormHelperText from "@mui/material/FormHelperText";
4
+ // import FormControl from "@mui/material/FormControl";
5
+ // import MenuItem from "@mui/material/MenuItem";
6
+ // import Select from "@mui/material/Select";
7
7
 
8
- const MuiSelect = (props) => {
9
- const { name, options, required, error } = props;
10
- let isError = false;
11
- let errorMessage = "";
12
- if (error && error.hasOwnProperty(name)) {
13
- isError = true;
14
- errorMessage = error[name].message;
15
- }
8
+ // const MuiSelect = (props) => {
9
+ // const { name, options, required, error } = props;
10
+ // let isError = false;
11
+ // let errorMessage = "";
12
+ // if (error && error.hasOwnProperty(name)) {
13
+ // isError = true;
14
+ // errorMessage = error[name].message;
15
+ // }
16
16
 
17
- return (
18
- <FormControl fullWidth={true} error={isError}>
19
- {label} {required ? <span className="req-label">*</span> : null}
20
- <Select id={name} {...props}>
21
- <MenuItem value="">
22
- <em>None</em>
23
- </MenuItem>
24
- {options.map((item) => (
25
- <MenuItem key={item.id} value={item.id}>
26
- {item.label}
27
- </MenuItem>
28
- ))}
29
- </Select>
30
- <FormHelperText>{errorMessage}</FormHelperText>
31
- </FormControl>
32
- );
33
- };
17
+ // return (
18
+ // <FormControl fullWidth={true} error={isError}>
19
+ // {label} {required ? <span className="req-label">*</span> : null}
20
+ // <Select id={name} {...props}>
21
+ // <MenuItem value="">
22
+ // <em>None</em>
23
+ // </MenuItem>
24
+ // {options.map((item) => (
25
+ // <MenuItem key={item.id} value={item.id}>
26
+ // {item.label}
27
+ // </MenuItem>
28
+ // ))}
29
+ // </Select>
30
+ // <FormHelperText>{errorMessage}</FormHelperText>
31
+ // </FormControl>
32
+ // );
33
+ // };
34
34
 
35
- export const SelectField = (props) => {
36
- const { control } = useFormContext();
37
- return (
38
- <React.Fragment>
39
- <Controller
40
- control={control}
41
- render={(field) => <MuiSelect {...props} {...field} />}
42
- {...props}
43
- />
44
- </React.Fragment>
45
- );
46
- };
35
+ // export const SelectField = (props) => {
36
+ // const { control } = useFormContext();
37
+ // return (
38
+ // <React.Fragment>
39
+ // <Controller
40
+ // control={control}
41
+ // render={(field) => <MuiSelect {...props} {...field} />}
42
+ // {...props}
43
+ // />
44
+ // </React.Fragment>
45
+ // );
46
+ // };
@@ -1,33 +1,30 @@
1
1
  import React from "react";
2
- import { makeStyles } from "@mui/material/styles";
3
2
 
4
- const useStyles = makeStyles((theme) => ({
5
- panelsContainer: {
6
- height: "100%",
7
- width: "100%"
8
- },
9
- panel: {
10
- backgroundColor: "var(--lightGrey)",
11
- height: "100%",
12
- width: "100%",
13
- padding: 10
14
- }
15
- }));
3
+ // const useStyles = makeStyles((theme) => ({
4
+ // panelsContainer: {
5
+ // height: "100%",
6
+ // width: "100%"
7
+ // },
8
+ // panel: {
9
+ // backgroundColor: "var(--lightGrey)",
10
+ // height: "100%",
11
+ // width: "100%",
12
+ // padding: 10
13
+ // }
14
+ // }));
16
15
 
17
16
  export const TabPanel = (props) => {
18
- const classes = useStyles();
19
17
  const { children, value, index, ...other } = props;
20
18
  return (
21
19
  <div
22
20
  role="tabpanel"
23
- className={classes.panelsContainer}
24
21
  hidden={value !== index}
25
22
  id={`vertical-tabpanel-${index}`}
26
23
  aria-labelledby={`vertical-tab-${index}`}
27
24
  {...other}
28
25
  >
29
26
  {value === index && (
30
- <div className={classes.panel}>
27
+ <div>
31
28
  <span>{children}</span>
32
29
  </div>
33
30
  )}