@sikka/hawa 0.0.55 → 0.0.57

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 (71) hide show
  1. package/es/index.es.js +1 -1
  2. package/lib/index.js +1 -1
  3. package/package.json +2 -1
  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/HawaLogoButton.js +62 -8
  8. package/src/elements/HawaPhoneInput.js +4 -4
  9. package/src/elements/HawaPopMenu.js +0 -1
  10. package/src/elements/HawaTable.js +173 -97
  11. package/src/index.js +0 -2
  12. package/storybook-static/0.58b40425.iframe.bundle.js +3 -0
  13. package/storybook-static/{0.6124c2748d3e65e1b2cb.manager.bundle.js.LICENSE.txt → 0.58b40425.iframe.bundle.js.LICENSE.txt} +0 -0
  14. package/storybook-static/0.58b40425.iframe.bundle.js.map +1 -0
  15. package/storybook-static/1.8a994862.iframe.bundle.js +1 -0
  16. package/storybook-static/10.265ea9add491253ee249.manager.bundle.js +2 -0
  17. package/storybook-static/{0.b6e074ad.iframe.bundle.js.LICENSE.txt → 10.265ea9add491253ee249.manager.bundle.js.LICENSE.txt} +0 -0
  18. package/storybook-static/11.849df77e390cb885446a.manager.bundle.js +1 -0
  19. package/storybook-static/12.145180cacdb73a1c41fa.manager.bundle.js +2 -0
  20. package/storybook-static/{5.deb43d3a68375c09581a.manager.bundle.js.LICENSE.txt → 12.145180cacdb73a1c41fa.manager.bundle.js.LICENSE.txt} +0 -0
  21. package/storybook-static/13.575f17b8db12e674bbfd.manager.bundle.js +1 -0
  22. package/storybook-static/14.46316235b334885ad26e.manager.bundle.js +1 -0
  23. package/storybook-static/15.f91ba9c8a1383d676abf.manager.bundle.js +2 -0
  24. package/storybook-static/{8.bfd0b85fcee1d5b82b2a.manager.bundle.js.LICENSE.txt → 15.f91ba9c8a1383d676abf.manager.bundle.js.LICENSE.txt} +0 -0
  25. package/storybook-static/16.126410c9b7b02fbc5c26.manager.bundle.js +1 -0
  26. package/storybook-static/2.427819b2.iframe.bundle.js +1 -0
  27. package/storybook-static/6.0a3ea46a.iframe.bundle.js +3 -0
  28. package/storybook-static/{6.98a925e3.iframe.bundle.js.LICENSE.txt → 6.0a3ea46a.iframe.bundle.js.LICENSE.txt} +0 -0
  29. package/storybook-static/6.0a3ea46a.iframe.bundle.js.map +1 -0
  30. package/storybook-static/7.9cd3bcaf.iframe.bundle.js +1 -0
  31. package/storybook-static/8.52752021.iframe.bundle.js +1 -0
  32. package/storybook-static/9.6bf309ed.iframe.bundle.js +3 -0
  33. package/storybook-static/{9.c0a47b6b.iframe.bundle.js.LICENSE.txt → 9.6bf309ed.iframe.bundle.js.LICENSE.txt} +0 -0
  34. package/storybook-static/9.6bf309ed.iframe.bundle.js.map +1 -0
  35. package/storybook-static/iframe.html +1 -1
  36. package/storybook-static/index.html +1 -1
  37. package/storybook-static/{main.5a189b21151a4a9bac2a.manager.bundle.js → main.20ee7e8a2af7ee58cc1f.manager.bundle.js} +1 -1
  38. package/storybook-static/main.89a5002b.iframe.bundle.js +1 -0
  39. package/storybook-static/project.json +1 -1
  40. package/storybook-static/{runtime~main.e7e3ab5b.iframe.bundle.js → runtime~main.6b765954.iframe.bundle.js} +1 -1
  41. package/storybook-static/runtime~main.84749e9163e4b198514f.manager.bundle.js +1 -0
  42. package/storybook-static/vendors~main.8be71844.iframe.bundle.js +76 -0
  43. package/storybook-static/{vendors~main.8cb76571.iframe.bundle.js.LICENSE.txt → vendors~main.8be71844.iframe.bundle.js.LICENSE.txt} +1 -7
  44. package/storybook-static/vendors~main.8be71844.iframe.bundle.js.map +1 -0
  45. package/storybook-static/vendors~main.bf986892b9b6ed78a230.manager.bundle.js +2 -0
  46. package/storybook-static/{vendors~main.276217ab3ce7975228ae.manager.bundle.js.LICENSE.txt → vendors~main.bf986892b9b6ed78a230.manager.bundle.js.LICENSE.txt} +0 -0
  47. package/src/Hooks.js +0 -61
  48. package/src/theme/HawaTheme.js +0 -941
  49. package/src/theme/index.js +0 -2
  50. package/storybook-static/0.6124c2748d3e65e1b2cb.manager.bundle.js +0 -2
  51. package/storybook-static/0.b6e074ad.iframe.bundle.js +0 -3
  52. package/storybook-static/0.b6e074ad.iframe.bundle.js.map +0 -1
  53. package/storybook-static/1.bd6511f086504dd70145.manager.bundle.js +0 -1
  54. package/storybook-static/1.c5cb37d9.iframe.bundle.js +0 -1
  55. package/storybook-static/2.c8f6dc2b.iframe.bundle.js +0 -1
  56. package/storybook-static/5.deb43d3a68375c09581a.manager.bundle.js +0 -2
  57. package/storybook-static/6.249b7db6e23f6b9cadb6.manager.bundle.js +0 -1
  58. package/storybook-static/6.98a925e3.iframe.bundle.js +0 -3
  59. package/storybook-static/6.98a925e3.iframe.bundle.js.map +0 -1
  60. package/storybook-static/7.d8516dca49008e2c4ff3.manager.bundle.js +0 -1
  61. package/storybook-static/7.f0b4b36c.iframe.bundle.js +0 -1
  62. package/storybook-static/8.bfd0b85fcee1d5b82b2a.manager.bundle.js +0 -2
  63. package/storybook-static/8.d6b26a40.iframe.bundle.js +0 -1
  64. package/storybook-static/9.c0a47b6b.iframe.bundle.js +0 -3
  65. package/storybook-static/9.c0a47b6b.iframe.bundle.js.map +0 -1
  66. package/storybook-static/9.d54acbbe1e3658f1423d.manager.bundle.js +0 -1
  67. package/storybook-static/main.4a18d932.iframe.bundle.js +0 -1
  68. package/storybook-static/runtime~main.ecdccec302ff88ae42db.manager.bundle.js +0 -1
  69. package/storybook-static/vendors~main.276217ab3ce7975228ae.manager.bundle.js +0 -2
  70. package/storybook-static/vendors~main.8cb76571.iframe.bundle.js +0 -76
  71. package/storybook-static/vendors~main.8cb76571.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.55",
3
+ "version": "0.0.57",
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",
@@ -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,7 +1,4 @@
1
1
  import React from "react";
2
- import GitHubIcon from "@mui/icons-material/GitHub";
3
- import TwitterIcon from "@mui/icons-material/Twitter";
4
- import WalletIcon from "@mui/icons-material/AccountBalanceWallet";
5
2
  import PropTypes from "prop-types";
6
3
 
7
4
  export const HawaLogoButton = (props) => {
@@ -18,10 +15,48 @@ export const HawaLogoButton = (props) => {
18
15
  );
19
16
  break;
20
17
  case "github":
21
- logoElement = <GitHubIcon />;
18
+ logoElement = (
19
+ <svg
20
+ width="32px"
21
+ height="32px"
22
+ viewBox="0 0 32 32"
23
+ xmlns="http://www.w3.org/2000/svg"
24
+ className="w-7 h-7"
25
+ >
26
+ <path d="M16 0.396c-8.839 0-16 7.167-16 16 0 7.073 4.584 13.068 10.937 15.183 0.803 0.151 1.093-0.344 1.093-0.772 0-0.38-0.009-1.385-0.015-2.719-4.453 0.964-5.391-2.151-5.391-2.151-0.729-1.844-1.781-2.339-1.781-2.339-1.448-0.989 0.115-0.968 0.115-0.968 1.604 0.109 2.448 1.645 2.448 1.645 1.427 2.448 3.744 1.74 4.661 1.328 0.14-1.031 0.557-1.74 1.011-2.135-3.552-0.401-7.287-1.776-7.287-7.907 0-1.751 0.62-3.177 1.645-4.297-0.177-0.401-0.719-2.031 0.141-4.235 0 0 1.339-0.427 4.4 1.641 1.281-0.355 2.641-0.532 4-0.541 1.36 0.009 2.719 0.187 4 0.541 3.043-2.068 4.381-1.641 4.381-1.641 0.859 2.204 0.317 3.833 0.161 4.235 1.015 1.12 1.635 2.547 1.635 4.297 0 6.145-3.74 7.5-7.296 7.891 0.556 0.479 1.077 1.464 1.077 2.959 0 2.14-0.020 3.864-0.020 4.385 0 0.416 0.28 0.916 1.104 0.755 6.4-2.093 10.979-8.093 10.979-15.156 0-8.833-7.161-16-16-16z" />
27
+ </svg>
28
+ );
22
29
  break;
23
30
  case "twitter":
24
- logoElement = <TwitterIcon />;
31
+ logoElement = (
32
+ <svg
33
+ version="1.1"
34
+ xmlns="http://www.w3.org/2000/svg"
35
+ // xmlns:xlink="http://www.w3.org/1999/xlink"
36
+ x="0px"
37
+ y="0px"
38
+ className="w-5 h-5"
39
+ viewBox="0 0 512.002 512.002"
40
+ // style="enable-background:new 0 0 512.002 512.002;"
41
+ // xml:space="preserve"
42
+ >
43
+ <path
44
+ // style="fill:#73A1FB;"
45
+ d="M500.398,94.784c-8.043,3.567-16.313,6.578-24.763,9.023c10.004-11.314,17.631-24.626,22.287-39.193
46
+ c1.044-3.265-0.038-6.839-2.722-8.975c-2.681-2.137-6.405-2.393-9.356-0.644c-17.945,10.643-37.305,18.292-57.605,22.764
47
+ c-20.449-19.981-48.222-31.353-76.934-31.353c-60.606,0-109.913,49.306-109.913,109.91c0,4.773,0.302,9.52,0.9,14.201
48
+ c-75.206-6.603-145.124-43.568-193.136-102.463c-1.711-2.099-4.347-3.231-7.046-3.014c-2.7,0.211-5.127,1.734-6.491,4.075
49
+ c-9.738,16.709-14.886,35.82-14.886,55.265c0,26.484,9.455,51.611,26.158,71.246c-5.079-1.759-10.007-3.957-14.711-6.568
50
+ c-2.525-1.406-5.607-1.384-8.116,0.054c-2.51,1.439-4.084,4.084-4.151,6.976c-0.012,0.487-0.012,0.974-0.012,1.468
51
+ c0,39.531,21.276,75.122,53.805,94.52c-2.795-0.279-5.587-0.684-8.362-1.214c-2.861-0.547-5.802,0.456-7.731,2.638
52
+ c-1.932,2.18-2.572,5.219-1.681,7.994c12.04,37.591,43.039,65.24,80.514,73.67c-31.082,19.468-66.626,29.665-103.939,29.665
53
+ c-7.786,0-15.616-0.457-23.279-1.364c-3.807-0.453-7.447,1.795-8.744,5.416c-1.297,3.622,0.078,7.66,3.316,9.736
54
+ c47.935,30.735,103.361,46.98,160.284,46.98c111.903,0,181.907-52.769,220.926-97.037c48.657-55.199,76.562-128.261,76.562-200.451
55
+ c0-3.016-0.046-6.061-0.139-9.097c19.197-14.463,35.724-31.967,49.173-52.085c2.043-3.055,1.822-7.094-0.545-9.906
56
+ C507.7,94.204,503.76,93.294,500.398,94.784z"
57
+ />
58
+ </svg>
59
+ );
25
60
  break;
26
61
  case "mada":
27
62
  logoElement = (
@@ -78,7 +113,26 @@ export const HawaLogoButton = (props) => {
78
113
  );
79
114
  break;
80
115
  case "wallet":
81
- logoElement = <WalletIcon />;
116
+ logoElement = (
117
+ <svg
118
+ version="1.1"
119
+ xmlns="http://www.w3.org/2000/svg"
120
+ viewBox="0 0 223 223"
121
+ className="h-6 w-6"
122
+ >
123
+ <g>
124
+ <path
125
+ d="M223,94.5c0-6.075-4.925-11-11-11h-63c-6.075,0-11,4.925-11,11v33c0,6.075,4.925,11,11,11h63c6.075,0,11-4.925,11-11V94.5z
126
+ M169.515,123.967c-7.082,0-12.823-5.741-12.823-12.823c0-7.082,5.741-12.823,12.823-12.823c7.082,0,12.823,5.741,12.823,12.823
127
+ C182.338,118.225,176.597,123.967,169.515,123.967z"
128
+ />
129
+ <path
130
+ d="M123.509,68.5H205v-33c0-8.271-6.395-15-14.667-15h-175C7.062,20.5,0,27.229,0,35.5v152c0,8.271,7.062,15,15.333,15h175
131
+ c8.271,0,14.667-6.729,14.667-15v-34h-81.342L123.509,68.5z"
132
+ />
133
+ </g>
134
+ </svg>
135
+ );
82
136
  break;
83
137
 
84
138
  default:
@@ -91,11 +145,11 @@ export const HawaLogoButton = (props) => {
91
145
  // variant="withLogo"
92
146
  className="bg-white rounded-xl my-2 h-11 flex max-w-sm w-full flex-row justify-center align-middle"
93
147
  >
94
- <div className="h-full w-1/2 flex flex-row justify-end items-center">
148
+ <div className="h-full flex flex-row justify-end items-center">
95
149
  {logoElement}
96
150
  </div>
97
151
  <div style={{ width: 10 }} />
98
- <div className="h-full w-1/2 flex flex-col justify-center items-start">
152
+ <div className="h-full flex flex-col justify-center items-start">
99
153
  {props.buttonText}
100
154
  </div>
101
155
  </button>
@@ -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"