@sikka/hawa 0.0.56 → 0.0.58

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 (70) hide show
  1. package/es/index.es.js +1 -1
  2. package/lib/index.js +1 -1
  3. package/package.json +2 -2
  4. package/src/blocks/Payment/SelectPayment.js +1 -1
  5. package/src/elements/DraggableCard.js +0 -2
  6. package/src/elements/HawaColorPicker.js +0 -3
  7. package/src/elements/HawaPhoneInput.js +4 -4
  8. package/src/elements/HawaPopMenu.js +0 -1
  9. package/src/elements/HawaTable.js +173 -97
  10. package/src/index.js +0 -2
  11. package/storybook-static/0.58b40425.iframe.bundle.js +3 -0
  12. package/storybook-static/{0.6124c2748d3e65e1b2cb.manager.bundle.js.LICENSE.txt → 0.58b40425.iframe.bundle.js.LICENSE.txt} +0 -0
  13. package/storybook-static/0.58b40425.iframe.bundle.js.map +1 -0
  14. package/storybook-static/1.8a994862.iframe.bundle.js +1 -0
  15. package/storybook-static/10.265ea9add491253ee249.manager.bundle.js +2 -0
  16. package/storybook-static/{0.b6e074ad.iframe.bundle.js.LICENSE.txt → 10.265ea9add491253ee249.manager.bundle.js.LICENSE.txt} +0 -0
  17. package/storybook-static/11.849df77e390cb885446a.manager.bundle.js +1 -0
  18. package/storybook-static/12.145180cacdb73a1c41fa.manager.bundle.js +2 -0
  19. package/storybook-static/{5.deb43d3a68375c09581a.manager.bundle.js.LICENSE.txt → 12.145180cacdb73a1c41fa.manager.bundle.js.LICENSE.txt} +0 -0
  20. package/storybook-static/13.575f17b8db12e674bbfd.manager.bundle.js +1 -0
  21. package/storybook-static/14.46316235b334885ad26e.manager.bundle.js +1 -0
  22. package/storybook-static/15.f91ba9c8a1383d676abf.manager.bundle.js +2 -0
  23. package/storybook-static/{8.bfd0b85fcee1d5b82b2a.manager.bundle.js.LICENSE.txt → 15.f91ba9c8a1383d676abf.manager.bundle.js.LICENSE.txt} +0 -0
  24. package/storybook-static/16.126410c9b7b02fbc5c26.manager.bundle.js +1 -0
  25. package/storybook-static/2.427819b2.iframe.bundle.js +1 -0
  26. package/storybook-static/6.0a3ea46a.iframe.bundle.js +3 -0
  27. package/storybook-static/{6.98a925e3.iframe.bundle.js.LICENSE.txt → 6.0a3ea46a.iframe.bundle.js.LICENSE.txt} +0 -0
  28. package/storybook-static/6.0a3ea46a.iframe.bundle.js.map +1 -0
  29. package/storybook-static/7.9cd3bcaf.iframe.bundle.js +1 -0
  30. package/storybook-static/8.52752021.iframe.bundle.js +1 -0
  31. package/storybook-static/9.6bf309ed.iframe.bundle.js +3 -0
  32. package/storybook-static/{9.c0a47b6b.iframe.bundle.js.LICENSE.txt → 9.6bf309ed.iframe.bundle.js.LICENSE.txt} +0 -0
  33. package/storybook-static/9.6bf309ed.iframe.bundle.js.map +1 -0
  34. package/storybook-static/iframe.html +1 -1
  35. package/storybook-static/index.html +1 -1
  36. package/storybook-static/{main.5a189b21151a4a9bac2a.manager.bundle.js → main.20ee7e8a2af7ee58cc1f.manager.bundle.js} +1 -1
  37. package/storybook-static/main.89a5002b.iframe.bundle.js +1 -0
  38. package/storybook-static/project.json +1 -1
  39. package/storybook-static/{runtime~main.e7e3ab5b.iframe.bundle.js → runtime~main.6b765954.iframe.bundle.js} +1 -1
  40. package/storybook-static/runtime~main.84749e9163e4b198514f.manager.bundle.js +1 -0
  41. package/storybook-static/vendors~main.8be71844.iframe.bundle.js +76 -0
  42. package/storybook-static/{vendors~main.2f76ed42.iframe.bundle.js.LICENSE.txt → vendors~main.8be71844.iframe.bundle.js.LICENSE.txt} +1 -7
  43. package/storybook-static/vendors~main.8be71844.iframe.bundle.js.map +1 -0
  44. package/storybook-static/vendors~main.bf986892b9b6ed78a230.manager.bundle.js +2 -0
  45. package/storybook-static/{vendors~main.276217ab3ce7975228ae.manager.bundle.js.LICENSE.txt → vendors~main.bf986892b9b6ed78a230.manager.bundle.js.LICENSE.txt} +0 -0
  46. package/src/Hooks.js +0 -61
  47. package/src/theme/HawaTheme.js +0 -941
  48. package/src/theme/index.js +0 -2
  49. package/storybook-static/0.6124c2748d3e65e1b2cb.manager.bundle.js +0 -2
  50. package/storybook-static/0.b6e074ad.iframe.bundle.js +0 -3
  51. package/storybook-static/0.b6e074ad.iframe.bundle.js.map +0 -1
  52. package/storybook-static/1.bd6511f086504dd70145.manager.bundle.js +0 -1
  53. package/storybook-static/1.c5cb37d9.iframe.bundle.js +0 -1
  54. package/storybook-static/2.c8f6dc2b.iframe.bundle.js +0 -1
  55. package/storybook-static/5.deb43d3a68375c09581a.manager.bundle.js +0 -2
  56. package/storybook-static/6.249b7db6e23f6b9cadb6.manager.bundle.js +0 -1
  57. package/storybook-static/6.98a925e3.iframe.bundle.js +0 -3
  58. package/storybook-static/6.98a925e3.iframe.bundle.js.map +0 -1
  59. package/storybook-static/7.d8516dca49008e2c4ff3.manager.bundle.js +0 -1
  60. package/storybook-static/7.f0b4b36c.iframe.bundle.js +0 -1
  61. package/storybook-static/8.bfd0b85fcee1d5b82b2a.manager.bundle.js +0 -2
  62. package/storybook-static/8.d6b26a40.iframe.bundle.js +0 -1
  63. package/storybook-static/9.c0a47b6b.iframe.bundle.js +0 -3
  64. package/storybook-static/9.c0a47b6b.iframe.bundle.js.map +0 -1
  65. package/storybook-static/9.d54acbbe1e3658f1423d.manager.bundle.js +0 -1
  66. package/storybook-static/main.f7b63ca5.iframe.bundle.js +0 -1
  67. package/storybook-static/runtime~main.ecdccec302ff88ae42db.manager.bundle.js +0 -1
  68. package/storybook-static/vendors~main.276217ab3ce7975228ae.manager.bundle.js +0 -2
  69. package/storybook-static/vendors~main.2f76ed42.iframe.bundle.js +0 -76
  70. package/storybook-static/vendors~main.2f76ed42.iframe.bundle.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.0.56",
3
+ "version": "0.0.58",
4
4
  "description": "UI Kit",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.es.js",
@@ -26,6 +26,7 @@
26
26
  "@storybook/addon-docs": "^6.5.8",
27
27
  "@storybook/addon-essentials": "^6.5.8",
28
28
  "@storybook/addon-links": "^6.5.8",
29
+ "@storybook/addon-postcss": "^2.0.0",
29
30
  "@storybook/addons": "^6.5.8",
30
31
  "@storybook/react": "^6.5.8",
31
32
  "@storybook/storybook-deployer": "^2.8.11",
@@ -43,7 +44,6 @@
43
44
  "react-color": "^2.19.3",
44
45
  "react-dnd": "^15.1.2",
45
46
  "react-dom": "^17.0.1",
46
- "react-dropzone": "^12.0.4",
47
47
  "react-hook-form": "^7.28.0",
48
48
  "react-phone-input-2": "^2.15.1",
49
49
  "react-select": "^5.3.2",
@@ -4,7 +4,7 @@ import { HawaTypography, HawaLogoButton } from "../../elements";
4
4
 
5
5
  export const SelectPayment = (props) => {
6
6
  return (
7
- <div className="flex flex-col bg-blue-300 rounded-xl p-4">
7
+ <div className="flex flex-col w-1/3 bg-blue-300 rounded-xl p-4">
8
8
  <HawaTypography align="center">Choose Payment Method</HawaTypography>
9
9
  {props.viaWallet && (
10
10
  <HawaLogoButton
@@ -4,8 +4,6 @@ export const DraggableCard = (props) => {
4
4
  return (
5
5
  <div className="flex flex-row bg-blue-300 rounded-xl p-4">
6
6
  <button
7
- id="dropdownMenuIconButton"
8
- data-dropdown-toggle="dropdownDots"
9
7
  class="inline-flex items-center p-2 text-sm font-medium text-center text-gray-900 bg-white rounded-lg hover:bg-gray-100 focus:ring-4 focus:outline-none dark:text-white focus:ring-gray-50 dark:bg-gray-800 dark:hover:bg-gray-700 dark:focus:ring-gray-600"
10
8
  type="button"
11
9
  >
@@ -34,13 +34,11 @@ import PropTypes from "prop-types";
34
34
  // }
35
35
  // `;
36
36
  export const HawaColorPicker = (props) => {
37
- // const theme = useTheme();
38
37
  return (
39
38
  <div style={{ display: "flex", flexDirection: "row" }}>
40
39
  {/* <ColorText
41
40
  type={"text"}
42
41
  value={props.color}
43
- // borderRadius={theme.allBorderRadius}
44
42
  onChange={props.handleChange}
45
43
  />
46
44
  <div style={{ width: 10 }} />
@@ -48,7 +46,6 @@ export const HawaColorPicker = (props) => {
48
46
  type={"color"}
49
47
  value={props.color}
50
48
  onChange={props.handleChange}
51
- // borderRadius={theme.allBorderRadius}
52
49
  /> */}
53
50
  </div>
54
51
  );
@@ -1,5 +1,5 @@
1
- import PhoneInput from "react-phone-input-2";
2
- import "react-phone-input-2/lib/material.css";
1
+ // import PhoneInput from "react-phone-input-2";
2
+ // import "react-phone-input-2/lib/material.css";
3
3
 
4
4
  export default function HawaPhoneInput(props) {
5
5
  const {
@@ -31,7 +31,7 @@ export default function HawaPhoneInput(props) {
31
31
  />
32
32
 
33
33
  {/* {label && <InputLabel>{props.label}</InputLabel>} */}
34
- <PhoneInput
34
+ {/* <PhoneInput
35
35
  country={country ?? null}
36
36
  onChange={(e) => onChange(e)}
37
37
  value={value ?? value}
@@ -55,7 +55,7 @@ export default function HawaPhoneInput(props) {
55
55
  // containerClass="bg-orange-900"
56
56
  // containerClass="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
57
57
  {...rest}
58
- />
58
+ /> */}
59
59
  </div>
60
60
  );
61
61
  }
@@ -76,7 +76,6 @@ export const HawaPopMenu = (props) => {
76
76
  // PaperProps={{
77
77
  // style: {
78
78
  // boxShadow: "none",
79
- // borderRadius: theme.allBorderRadius,
80
79
  // border: `1px solid ${theme.primaryActionColor}`
81
80
  // }
82
81
  // }}
@@ -1,113 +1,189 @@
1
1
  import React from "react";
2
- import Table from "@mui/material/Table";
3
- import TableBody from "@mui/material/TableBody";
4
- import TableCell from "@mui/material/TableCell";
5
- import TableContainer from "@mui/material/TableContainer";
6
- import TableHead from "@mui/material/TableHead";
7
- import TableRow from "@mui/material/TableRow";
8
2
  import PropTypes from "prop-types";
9
- import { Button } from "@mui/material";
3
+ import { HawaButton } from "./HawaButton";
10
4
 
11
5
  export const HawaTable = (props) => {
12
6
  let isArabic = props.lang === "ar";
13
7
  return (
14
- <TableContainer style={{ direction: isArabic ? "rtl" : "ltr" }}>
15
- <Table aria-label="a dense table">
16
- <TableHead>
17
- <TableRow>
18
- {props.columns.map((col, i) => (
19
- <TableCell
20
- align={isArabic ? "right" : "left"}
21
- key={i}
22
- style={{ fontWeight: 700 }}
23
- variant={
24
- i > 0 ? (isArabic ? "borderedRight" : "borderedLeft") : "body"
25
- }
26
- >
27
- {col}
28
- </TableCell>
29
- ))}
30
- {props.actions && (
31
- <TableCell
32
- align={isArabic ? "right" : "left"}
33
- style={{ fontWeight: 700 }}
34
- variant={isArabic ? "borderedRight" : "borderedLeft"}
35
- >
36
- Actions
37
- </TableCell>
38
- )}
39
- </TableRow>
40
- </TableHead>
41
-
42
- <TableBody>
43
- {props.rows ? (
44
- props.rows.map((singleRow, j) => (
45
- <TableRow key={j}>
46
- {singleRow.map((r, i) => (
47
- <TableCell
48
- align={isArabic ? "right" : "left"}
49
- key={i}
50
- component="th"
51
- scope="row"
52
- variant={
53
- i > 0
54
- ? isArabic
55
- ? "borderedRight"
56
- : "borderedLeft"
57
- : "body"
58
- }
59
- >
60
- {r}
61
- </TableCell>
8
+ <>
9
+ <div>
10
+ <div class="overflow-x-auto relative rounded-xl">
11
+ <table class="w-full text-sm text-left text-gray-500 dark:text-gray-400">
12
+ <thead class="text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400">
13
+ <tr>
14
+ {props.columns.map((col, i) => (
15
+ <th key={i} scope="col" class="py-3 px-6">
16
+ {col}
17
+ </th>
62
18
  ))}
63
19
  {props.actions && (
64
- <TableCell
65
- align={isArabic ? "right" : "left"}
66
- style={{ fontWeight: 700 }}
67
- variant={isArabic ? "borderedRight" : "borderedLeft"}
20
+ <th scope="col" class="py-3 px-6">
21
+ actions
22
+ </th>
23
+ )}
24
+ </tr>
25
+ </thead>
26
+ <tbody>
27
+ {props.rows ? (
28
+ props.rows.map((singleRow, j) => (
29
+ <tr
30
+ class="bg-white border-b dark:bg-gray-800 dark:border-gray-700"
31
+ key={j}
68
32
  >
69
- {props.actions.map((act) => (
70
- <Button
71
- style={{ margin: 2 }}
72
- variant="outlined"
73
- size="small"
74
- onClick={() => props.handleActionClick(singleRow)}
33
+ {singleRow.map((r, i) => {
34
+ if (i === 0) {
35
+ return (
36
+ <th
37
+ scope="row"
38
+ class="py-4 px-6 font-medium text-gray-900 whitespace-nowrap dark:text-white"
39
+ >
40
+ {r}{" "}
41
+ </th>
42
+ );
43
+ } else {
44
+ return <td class="py-4 px-6">{r}</td>;
45
+ }
46
+ })}
47
+ {props.actions && (
48
+ <td
49
+ align={isArabic ? "right" : "left"}
50
+ style={{ fontWeight: 700 }}
51
+ variant={isArabic ? "borderedRight" : "borderedLeft"}
75
52
  >
76
- {act}
77
- </Button>
78
- ))}
79
- </TableCell>
80
- )}
53
+ {props.actions.map((act) => (
54
+ <HawaButton
55
+ style={{ margin: 2 }}
56
+ variant="outlined"
57
+ size="small"
58
+ onClick={() => props.handleActionClick(singleRow)}
59
+ >
60
+ {act}
61
+ </HawaButton>
62
+ ))}
63
+ </td>
64
+ )}
65
+ </tr>
66
+ ))
67
+ ) : (
68
+ <tr>
69
+ <td colspan={props.columns.length}>
70
+ <div className="w-full p-5 text-center bg-white">
71
+ {props.noDataText}
72
+ </div>
73
+ </td>
74
+ </tr>
75
+ )}
76
+ </tbody>
77
+ </table>
78
+ </div>
79
+ </div>
80
+
81
+ {/* <TableContainer style={{ direction: isArabic ? "rtl" : "ltr" }}>
82
+ <Table aria-label="a dense table">
83
+ <TableHead>
84
+ <TableRow>
85
+ {props.columns.map((col, i) => (
86
+ <TableCell
87
+ align={isArabic ? "right" : "left"}
88
+ key={i}
89
+ style={{ fontWeight: 700 }}
90
+ variant={
91
+ i > 0
92
+ ? isArabic
93
+ ? "borderedRight"
94
+ : "borderedLeft"
95
+ : "body"
96
+ }
97
+ >
98
+ {col}
99
+ </TableCell>
100
+ ))}
101
+ {props.actions && (
102
+ <TableCell
103
+ align={isArabic ? "right" : "left"}
104
+ style={{ fontWeight: 700 }}
105
+ variant={isArabic ? "borderedRight" : "borderedLeft"}
106
+ >
107
+ Actions
108
+ </TableCell>
109
+ )}
110
+ </TableRow>
111
+ </TableHead>
112
+
113
+ <TableBody>
114
+ {props.rows ? (
115
+ props.rows.map((singleRow, j) => (
116
+ <TableRow key={j}>
117
+ {singleRow.map((r, i) => (
118
+ <TableCell
119
+ align={isArabic ? "right" : "left"}
120
+ key={i}
121
+ component="th"
122
+ scope="row"
123
+ variant={
124
+ i > 0
125
+ ? isArabic
126
+ ? "borderedRight"
127
+ : "borderedLeft"
128
+ : "body"
129
+ }
130
+ >
131
+ {r}
132
+ </TableCell>
133
+ ))}
134
+ {props.actions && (
135
+ <TableCell
136
+ align={isArabic ? "right" : "left"}
137
+ style={{ fontWeight: 700 }}
138
+ variant={isArabic ? "borderedRight" : "borderedLeft"}
139
+ >
140
+ {props.actions.map((act) => (
141
+ <Button
142
+ style={{ margin: 2 }}
143
+ variant="outlined"
144
+ size="small"
145
+ onClick={() => props.handleActionClick(singleRow)}
146
+ >
147
+ {act}
148
+ </Button>
149
+ ))}
150
+ </TableCell>
151
+ )}
152
+ </TableRow>
153
+ ))
154
+ ) : (
155
+ <TableRow align="center">
156
+ <TableCell align={"center"} component="th" colSpan={6}>
157
+ {props.noDataText}
158
+ </TableCell>
81
159
  </TableRow>
82
- ))
83
- ) : (
84
- <TableRow align="center">
85
- <TableCell align={"center"} component="th" colSpan={6}>
86
- {props.noDataText}
87
- </TableCell>
160
+ )}
161
+ </TableBody>
162
+ {props.end && (
163
+ <TableRow>
164
+ {props.end.map((e, k) => (
165
+ <TableCell
166
+ align={isArabic ? "right" : "left"}
167
+ style={{ fontWeight: 700 }}
168
+ key={k}
169
+ component="th"
170
+ scope="row"
171
+ variant={
172
+ k > 0
173
+ ? isArabic
174
+ ? "borderedRight"
175
+ : "borderedLeft"
176
+ : "body"
177
+ }
178
+ >
179
+ {e}
180
+ </TableCell>
181
+ ))}
88
182
  </TableRow>
89
183
  )}
90
- </TableBody>
91
- {props.end && (
92
- <TableRow>
93
- {props.end.map((e, k) => (
94
- <TableCell
95
- align={isArabic ? "right" : "left"}
96
- style={{ fontWeight: 700 }}
97
- key={k}
98
- component="th"
99
- scope="row"
100
- variant={
101
- k > 0 ? (isArabic ? "borderedRight" : "borderedLeft") : "body"
102
- }
103
- >
104
- {e}
105
- </TableCell>
106
- ))}
107
- </TableRow>
108
- )}
109
- </Table>
110
- </TableContainer>
184
+ </Table>
185
+ </TableContainer> */}
186
+ </>
111
187
  );
112
188
  };
113
189
  HawaTable.propTypes = {
package/src/index.js CHANGED
@@ -1,5 +1,3 @@
1
1
  export * from "./blocks";
2
2
  export * from "./elements";
3
3
  export * from "./layout";
4
- export * from "./theme";
5
- export * from "./Hooks"