@sikka/hawa 0.0.58 → 0.0.60

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 (51) hide show
  1. package/es/index.es.js +1 -1
  2. package/lib/index.js +1 -1
  3. package/package.json +3 -2
  4. package/src/blocks/Account/UserProfileForm.js +9 -5
  5. package/src/blocks/Account/UserSettingsForm.js +10 -5
  6. package/src/blocks/AuthForms/CodeConfirmation.js +5 -5
  7. package/src/blocks/AuthForms/NewPasswordForm.js +9 -5
  8. package/src/blocks/AuthForms/ResetPasswordForm.js +9 -5
  9. package/src/blocks/AuthForms/SignInForm.js +5 -10
  10. package/src/blocks/AuthForms/SignInPhone.js +4 -5
  11. package/src/blocks/AuthForms/SignUpForm.js +4 -10
  12. package/src/blocks/Misc/NotFound.js +1 -1
  13. package/src/blocks/Payment/ChargeWalletForm.js +9 -5
  14. package/src/blocks/Payment/CheckoutForm.js +6 -8
  15. package/src/blocks/Payment/Confirmation.js +19 -12
  16. package/src/blocks/Payment/CreditCardForm.js +6 -7
  17. package/src/blocks/Payment/Form/CForm.js +2 -12
  18. package/src/blocks/Payment/PayWithWallet.js +9 -5
  19. package/src/blocks/Payment/SelectPayment.js +4 -2
  20. package/src/blocks/Pricing/ComparingPlans.js +151 -0
  21. package/src/blocks/Pricing/PricingPlans.js +21 -12
  22. package/src/blocks/Pricing/index.js +1 -0
  23. package/src/elements/DragDropImages.js +2 -3
  24. package/src/elements/HawaButton.js +13 -6
  25. package/src/elements/HawaCheckbox.js +7 -10
  26. package/src/elements/HawaItemCard.js +38 -155
  27. package/src/elements/HawaModal.js +73 -0
  28. package/src/elements/HawaPanelTabs.js +17 -69
  29. package/src/elements/HawaPricingCard.js +51 -53
  30. package/src/elements/HawaRadio.js +32 -0
  31. package/src/elements/HawaRange.js +8 -16
  32. package/src/elements/HawaSettingsRow.js +2 -4
  33. package/src/elements/HawaTable.js +2 -6
  34. package/src/elements/HawaTabs.js +32 -0
  35. package/src/elements/HawaTooltip.js +2 -41
  36. package/src/elements/index.js +2 -2
  37. package/src/layout/HawaContainer.js +12 -0
  38. package/src/layout/index.js +1 -2
  39. package/storybook-static/iframe.html +1 -1
  40. package/storybook-static/main.dd9f34e9.iframe.bundle.js +1 -0
  41. package/storybook-static/project.json +1 -1
  42. package/storybook-static/vendors~main.7059fde5.iframe.bundle.js +76 -0
  43. package/storybook-static/{vendors~main.8be71844.iframe.bundle.js.LICENSE.txt → vendors~main.7059fde5.iframe.bundle.js.LICENSE.txt} +0 -0
  44. package/storybook-static/vendors~main.7059fde5.iframe.bundle.js.map +1 -0
  45. package/src/elements/ActionButton.js +0 -14
  46. package/src/elements/RadioBox.js +0 -29
  47. package/src/elements/ResponsiveButton.js +0 -34
  48. package/src/layout/HawaDrawer.js +0 -109
  49. package/storybook-static/main.89a5002b.iframe.bundle.js +0 -1
  50. package/storybook-static/vendors~main.8be71844.iframe.bundle.js +0 -76
  51. package/storybook-static/vendors~main.8be71844.iframe.bundle.js.map +0 -1
@@ -0,0 +1,151 @@
1
+ import React, { useState } from "react";
2
+ import { HawaPricingCard, HawaPanelTabs, HawaTabs } from "../../elements";
3
+ import PropTypes from "prop-types";
4
+
5
+ const CheckMark = () => (
6
+ <svg
7
+ class="w-5 h-5 text-green-500"
8
+ aria-hidden="true"
9
+ fill="currentColor"
10
+ viewBox="0 0 20 20"
11
+ xmlns="http://www.w3.org/2000/svg"
12
+ >
13
+ <path
14
+ fill-rule="evenodd"
15
+ d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z"
16
+ clip-rule="evenodd"
17
+ ></path>
18
+ </svg>
19
+ );
20
+
21
+ const UncheckMark = () => (
22
+ <svg
23
+ class="w-5 h-5 text-red-500"
24
+ aria-hidden="true"
25
+ fill="currentColor"
26
+ viewBox="0 0 20 20"
27
+ xmlns="http://www.w3.org/2000/svg"
28
+ >
29
+ <path
30
+ fill-rule="evenodd"
31
+ d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"
32
+ clip-rule="evenodd"
33
+ ></path>
34
+ </svg>
35
+ );
36
+
37
+ export const ComparingPlans = (props) => {
38
+ const [currentCurrency, setCurrentCurrency] = useState("sar");
39
+ const [currentCycle, setCurrentCycle] = useState("monthly");
40
+ let cycleOptions = [
41
+ { label: `Monthly`, value: `monthly` },
42
+ { label: `3 Months`, value: `3-months` },
43
+ { label: `6 Months`, value: `6-months` },
44
+ { label: `Annually`, value: `annually` }
45
+ ];
46
+ let currencyOptions = [
47
+ { label: `USD`, value: `usd` },
48
+ { label: `SAR`, value: `sar` }
49
+ ];
50
+ let activeTabStyle =
51
+ "inline-block py-3 px-4 text-white bg-blue-600 rounded-lg active";
52
+ let inactiveTabStyle =
53
+ "inline-block py-3 px-4 rounded-lg hover:text-gray-900 hover:bg-gray-100 dark:hover:bg-gray-800 dark:hover:text-white";
54
+ return (
55
+ <div id="detailed-pricing" class="overflow-x-auto w-full">
56
+ <div class="overflow-hidden min-w-max">
57
+ <div class="grid grid-cols-4 gap-x-16 p-4 text-sm font-medium text-gray-900 bg-gray-100 border-t border-b border-gray-200 dark:bg-gray-800 dark:border-gray-700 dark:text-white">
58
+ <div class="flex items-center"></div>
59
+ {props.plans.map((plan) => (
60
+ <div>{plan.title}</div>
61
+ ))}
62
+ </div>
63
+ {props.plans.map((plan) => {
64
+ return (
65
+ <div class="grid grid-cols-4 gap-x-16 py-5 px-4 text-sm text-gray-700 border-b border-gray-200 dark:border-gray-700">
66
+ <div class="text-gray-500 dark:text-gray-400">
67
+ Basic components (
68
+ <a href="#" class="text-blue-600 hover:underline">
69
+ view all
70
+ </a>
71
+ )
72
+ </div>
73
+ <CheckMark />
74
+ <CheckMark />
75
+ <CheckMark />
76
+ </div>
77
+ );
78
+ })}
79
+ <div class="grid grid-cols-4 gap-x-16 py-5 px-4 text-sm text-gray-700 border-b border-gray-200 dark:border-gray-700">
80
+ <div class="text-gray-500 dark:text-gray-400">
81
+ Application UI (
82
+ <a href="#" class="text-blue-600 hover:underline">
83
+ view demo
84
+ </a>
85
+ )
86
+ </div>
87
+ <UncheckMark />
88
+ <CheckMark />
89
+ <UncheckMark />
90
+ </div>
91
+ <div class="grid grid-cols-4 gap-x-16 py-5 px-4 text-sm text-gray-700 border-b border-gray-200 dark:border-gray-700">
92
+ <div class="text-gray-500 dark:text-gray-400">
93
+ Marketing UI pre-order
94
+ </div>
95
+ <UncheckMark />
96
+ <CheckMark />
97
+ <UncheckMark />
98
+ </div>
99
+ <div class="grid grid-cols-4 gap-x-16 py-5 px-4 text-sm text-gray-700 border-b border-gray-200 dark:border-gray-700">
100
+ <div class="text-gray-500 dark:text-gray-400"></div>
101
+ <div>
102
+ <a
103
+ href="#"
104
+ class="text-white block w-full bg-blue-600 hover:bg-blue-700 focus:ring-4 focus:ring-blue-200 font-medium rounded-lg text-sm px-4 py-2.5 text-center dark:focus:ring-blue-900"
105
+ >
106
+ Buy now
107
+ </a>
108
+ </div>
109
+ <div>
110
+ <a
111
+ href="#"
112
+ class="text-white block w-full bg-blue-600 hover:bg-blue-700 focus:ring-4 focus:ring-blue-200 font-medium rounded-lg text-sm px-4 py-2.5 text-center dark:focus:ring-blue-900"
113
+ >
114
+ Buy now
115
+ </a>
116
+ </div>
117
+ <div>
118
+ <a
119
+ href="#"
120
+ class="text-white block w-full bg-blue-600 hover:bg-blue-700 focus:ring-4 focus:ring-blue-200 font-medium rounded-lg text-sm px-4 py-2.5 text-center dark:focus:ring-blue-900"
121
+ >
122
+ Buy now
123
+ </a>
124
+ </div>
125
+ </div>
126
+ </div>
127
+ </div>
128
+ );
129
+ };
130
+
131
+ ComparingPlans.propTypes = {
132
+ /**
133
+ * An array of the pricing plans
134
+ */
135
+ plans: PropTypes.arrayOf(
136
+ PropTypes.shape({
137
+ title: PropTypes.string,
138
+ title_ar: PropTypes.string,
139
+ subtitle: PropTypes.string,
140
+ subtitle_ar: PropTypes.string,
141
+ price: PropTypes.number,
142
+ currency: PropTypes.string,
143
+ cycleText: PropTypes.string,
144
+ buttonText: PropTypes.string,
145
+ features: PropTypes.array,
146
+ features_ar: PropTypes.array,
147
+ selectedPlan: PropTypes.bool
148
+ })
149
+ ),
150
+ lang: PropTypes.string
151
+ };
@@ -1,10 +1,24 @@
1
1
  import React, { useState } from "react";
2
- import { HawaPricingCard, HawaPanelTabs } from "../../elements";
2
+ import { HawaPricingCard, HawaPanelTabs, HawaTabs } from "../../elements";
3
3
  import PropTypes from "prop-types";
4
4
 
5
5
  export const PricingPlans = (props) => {
6
6
  const [currentCurrency, setCurrentCurrency] = useState("sar");
7
7
  const [currentCycle, setCurrentCycle] = useState("monthly");
8
+ let cycleOptions = [
9
+ { label: `Monthly`, value: `monthly` },
10
+ { label: `3 Months`, value: `3-months` },
11
+ { label: `6 Months`, value: `6-months` },
12
+ { label: `Annually`, value: `annually` }
13
+ ];
14
+ let currencyOptions = [
15
+ { label: `USD`, value: `usd` },
16
+ { label: `SAR`, value: `sar` }
17
+ ];
18
+ let activeTabStyle =
19
+ "inline-block py-3 px-4 text-white bg-blue-600 rounded-lg active";
20
+ let inactiveTabStyle =
21
+ "inline-block py-3 px-4 rounded-lg hover:text-gray-900 hover:bg-gray-100 dark:hover:bg-gray-800 dark:hover:text-white";
8
22
  return (
9
23
  <div>
10
24
  <div
@@ -15,28 +29,23 @@ export const PricingPlans = (props) => {
15
29
  marginBottom: 10
16
30
  }}
17
31
  >
18
- <HawaPanelTabs
19
- location="inPricing"
20
- handleChange={(e) => setCurrentCycle(e)}
21
- defaultValue="monthly"
32
+ <HawaTabs
33
+ defaultValue={currentCycle}
22
34
  options={[
23
35
  { label: `Monthly`, value: `monthly` },
24
36
  { label: `3 Months`, value: `3-months` },
25
37
  { label: `6 Months`, value: `6-months` },
26
38
  { label: `Annually`, value: `annually` }
27
39
  ]}
40
+ onChangeTab={(e) => setCurrentCycle(e)}
28
41
  />
29
-
30
- <HawaPanelTabs
31
- location="inPricing"
32
- handleChange={(e) => {
33
- setCurrentCurrency(e);
34
- }}
35
- defaultValue="sar"
42
+ <HawaTabs
43
+ defaultValue={currentCurrency}
36
44
  options={[
37
45
  { label: `USD`, value: `usd` },
38
46
  { label: `SAR`, value: `sar` }
39
47
  ]}
48
+ onChangeTab={(e) => setCurrentCurrency(e)}
40
49
  />
41
50
  </div>
42
51
 
@@ -1 +1,2 @@
1
1
  export * from "./PricingPlans";
2
+ export * from "./ComparingPlans";
@@ -157,9 +157,8 @@ export const DragDropImages = ({
157
157
  e.stopPropagation();
158
158
  onClearFiles(acceptedFiles);
159
159
  }}
160
- >
161
- Clear All
162
- </HawaButton>
160
+ text={"Clear All"}
161
+ />
163
162
  )}
164
163
 
165
164
  {thumbs && showPreview ? (
@@ -1,17 +1,24 @@
1
1
  import React from "react";
2
+ import { HawaTooltip } from "./HawaTooltip";
2
3
 
3
4
  export const HawaButton = (props) => {
5
+ let iconStyle = "pr-2 flex flex-col justify-center items-center";
4
6
  let styles =
5
- "text-center text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center inline-flex items-center mr-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800";
7
+ "m-1 px-2.5 py-2.5 text-center text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm text-center inline-flex items-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800";
6
8
  if (props.fullWidth) {
7
9
  styles =
8
- "mt-2 w-full flex justify-center text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center inline-flex items-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800";
10
+ "my-1 w-full flex justify-center text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center inline-flex items-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800";
11
+ }
12
+ if (props.iconOnly) {
13
+ iconStyle = "flex flex-col justify-center items-center";
9
14
  }
10
15
  return (
11
- <button type="button" className={styles} {...props}>
12
- {props.icon ? <div class="mr-2 -ml-1 w-5 h-5">{props.icon}</div> : null}
13
-
14
- {props.children}
16
+ <button data-tooltip-target={props.tooltip} type="button" className={styles} {...props}>
17
+ {props.tooltip && (
18
+ <HawaTooltip tooltipID={props.tooltip} content={props.tooltip} />
19
+ )}
20
+ {props.icon ? <div className={iconStyle}>{props.icon}</div> : null}
21
+ {!props.iconOnly && props.text}
15
22
  </button>
16
23
  );
17
24
  };
@@ -1,21 +1,18 @@
1
1
  import React from "react";
2
2
 
3
3
  export const HawaCheckbox = (props) => {
4
- console.log("props : ", props);
5
4
  return (
6
- <div class="flex items-center mb-4">
5
+ <div className="flex items-center h-full p-2">
7
6
  <input
8
- id="default-checkbox"
9
7
  type="checkbox"
10
8
  value=""
11
- class="w-4 h-4 text-blue-600 bg-gray-100 rounded border-gray-300 focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600"
9
+ className="w-4 h-4 text-blue-600 bg-gray-100 rounded border-gray-300 focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600"
12
10
  />
13
- <label
14
- for="default-checkbox"
15
- class="ml-2 text-sm font-medium text-gray-900 dark:text-gray-300"
16
- >
17
- Default checkbox
18
- </label>
11
+ {props.label && (
12
+ <label className="ml-2 text-sm font-medium text-gray-900 dark:text-gray-300">
13
+ {props.label}
14
+ </label>
15
+ )}
19
16
  </div>
20
17
 
21
18
  // <React.Fragment>
@@ -2,177 +2,60 @@ import React from "react";
2
2
  import PropTypes from "prop-types";
3
3
 
4
4
  export const HawaItemCard = (props) => {
5
- let isArabic = props.lang === "ar";
6
- const handleParentClick = (e) => {
7
- e.stopPropagation();
8
- props.onCardClick();
9
- };
10
5
  return (
11
- <div
12
- // href="#"
13
- class="block pt-6 max-w-sm bg-white rounded-lg border border-gray-200 shadow-md dark:bg-gray-800 dark:border-gray-700 "
14
- >
15
- <div class="flex justify-end pr-6">
16
- <button
17
- id="dropdownButton"
18
- data-dropdown-toggle="dropdown"
19
- class="inline-block text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 focus:ring-4 focus:outline-none focus:ring-gray-200 dark:focus:ring-gray-700 rounded-lg text-sm"
20
- type="button"
21
- >
22
- <span class="sr-only">Open dropdown</span>
23
- <svg
24
- class="w-6 h-6"
25
- aria-hidden="true"
26
- fill="currentColor"
27
- viewBox="0 0 20 20"
28
- xmlns="http://www.w3.org/2000/svg"
29
- >
30
- <path d="M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z"></path>
31
- </svg>
32
- </button>
33
- <div
34
- id="dropdown"
35
- class="hidden z-10 w-44 text-base list-none bg-white rounded divide-y divide-gray-100 shadow dark:bg-gray-700"
36
- >
37
- <ul class="py-1" aria-labelledby="dropdownButton">
38
- <li>
39
- <a
40
- href="#"
41
- class="block py-2 px-4 text-sm text-gray-700 hover:bg-gray-100 dark:hover:bg-gray-600 dark:text-gray-200 dark:hover:text-white"
42
- >
43
- Edit
44
- </a>
45
- </li>
46
- <li>
47
- <a
48
- href="#"
49
- class="block py-2 px-4 text-sm text-gray-700 hover:bg-gray-100 dark:hover:bg-gray-600 dark:text-gray-200 dark:hover:text-white"
50
- >
51
- Export Data
52
- </a>
53
- </li>
54
- <li>
55
- <a
56
- href="#"
57
- class="block py-2 px-4 text-sm text-red-600 hover:bg-gray-100 dark:hover:bg-gray-600 dark:text-gray-200 dark:hover:text-white"
58
- >
59
- Delete
60
- </a>
61
- </li>
62
- </ul>
63
- </div>
64
- </div>
65
- <div class="px-6">
66
- <h5 class="mb-2 text-2xl font-bold tracking-tight text-gray-900 dark:text-white">
67
- Noteworthy technology acquisitions 2021
68
- </h5>
69
- <p class="font-normal text-gray-700 dark:text-gray-400">
70
- Here are the biggest enterprise technology acquisitions of 2021 so
71
- far, in reverse chronological order.
72
- </p>
73
- </div>
74
- <div className="p-3 mt-6 rounded-b-lg flex justify-end">
75
- <div class="inline-flex rounded-md shadow-sm" role="group">
76
- <button
77
- type="button"
78
- class="inline-flex items-center py-2 px-4 text-sm font-medium text-gray-900 bg-white rounded-l-lg border border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-2 focus:ring-blue-700 focus:text-blue-700 dark:bg-gray-700 dark:border-gray-600 dark:text-white dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-blue-500 dark:focus:text-white"
79
- >
80
- <svg
81
- aria-hidden="true"
82
- class="mr-0 w-4 h-4 fill-current"
83
- fill="currentColor"
84
- viewBox="0 0 20 20"
85
- xmlns="http://www.w3.org/2000/svg"
86
- >
87
- <path
88
- fill-rule="evenodd"
89
- d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-6-3a2 2 0 11-4 0 2 2 0 014 0zm-2 4a5 5 0 00-4.546 2.916A5.986 5.986 0 0010 16a5.986 5.986 0 004.546-2.084A5 5 0 0010 11z"
90
- clip-rule="evenodd"
91
- ></path>
92
- </svg>
93
- {/* Profile */}
94
- </button>
6
+ <div class="block pt-6 max-w-sm bg-white rounded-lg border border-gray-200 shadow-md dark:bg-gray-800 dark:border-gray-700 ">
7
+ {props.headerActions && (
8
+ <div class="flex justify-end pr-6">
95
9
  <button
10
+ id="dropdownButton"
11
+ data-dropdown-toggle="dropdown"
12
+ class="inline-block text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 focus:ring-4 focus:outline-none focus:ring-gray-200 dark:focus:ring-gray-700 rounded-lg text-sm"
96
13
  type="button"
97
- class="inline-flex items-center py-2 px-4 text-sm font-medium text-gray-900 bg-white border-t border-b border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-2 focus:ring-blue-700 focus:text-blue-700 dark:bg-gray-700 dark:border-gray-600 dark:text-white dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-blue-500 dark:focus:text-white"
98
14
  >
15
+ <span class="sr-only">Open dropdown</span>
99
16
  <svg
17
+ class="w-6 h-6"
100
18
  aria-hidden="true"
101
- class="mr-0 w-4 h-4 fill-current"
102
19
  fill="currentColor"
103
20
  viewBox="0 0 20 20"
104
21
  xmlns="http://www.w3.org/2000/svg"
105
22
  >
106
- <path d="M5 4a1 1 0 00-2 0v7.268a2 2 0 000 3.464V16a1 1 0 102 0v-1.268a2 2 0 000-3.464V4zM11 4a1 1 0 10-2 0v1.268a2 2 0 000 3.464V16a1 1 0 102 0V8.732a2 2 0 000-3.464V4zM16 3a1 1 0 011 1v7.268a2 2 0 010 3.464V16a1 1 0 11-2 0v-1.268a2 2 0 010-3.464V4a1 1 0 011-1z"></path>
23
+ <path d="M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z"></path>
107
24
  </svg>
108
- {/* Settings */}
109
25
  </button>
110
- <button
111
- type="button"
112
- class="inline-flex items-center py-2 px-4 text-sm font-medium text-gray-900 bg-white rounded-r-md border border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-2 focus:ring-blue-700 focus:text-blue-700 dark:bg-gray-700 dark:border-gray-600 dark:text-white dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-blue-500 dark:focus:text-white"
26
+ <div
27
+ id="dropdown"
28
+ class="hidden z-10 w-44 text-base list-none bg-white rounded divide-y divide-gray-100 shadow dark:bg-gray-700"
113
29
  >
114
- <svg
115
- aria-hidden="true"
116
- class="mr-0 w-4 h-4 fill-current"
117
- fill="currentColor"
118
- viewBox="0 0 20 20"
119
- xmlns="http://www.w3.org/2000/svg"
120
- >
121
- <path
122
- fill-rule="evenodd"
123
- d="M2 9.5A3.5 3.5 0 005.5 13H9v2.586l-1.293-1.293a1 1 0 00-1.414 1.414l3 3a1 1 0 001.414 0l3-3a1 1 0 00-1.414-1.414L11 15.586V13h2.5a4.5 4.5 0 10-.616-8.958 4.002 4.002 0 10-7.753 1.977A3.5 3.5 0 002 9.5zm9 3.5H9V8a1 1 0 012 0v5z"
124
- clip-rule="evenodd"
125
- ></path>
126
- </svg>
127
- {/* Downloads */}
128
- </button>
30
+ <ul class="py-1" aria-labelledby="dropdownButton">
31
+ {props.headerActions.map((action) => {
32
+ return (
33
+ <li>
34
+ <a
35
+ href="#"
36
+ class="block py-2 px-4 text-sm text-gray-700 hover:bg-gray-100 dark:hover:bg-gray-600 dark:text-gray-200 dark:hover:text-white"
37
+ >
38
+ {action.label}
39
+ </a>
40
+ </li>
41
+ );
42
+ })}
43
+ </ul>
44
+ </div>
129
45
  </div>
46
+ )}
47
+ <div class="px-6">
48
+ <h5 class="mb-2 text-2xl font-bold tracking-tight text-gray-900 dark:text-white">
49
+ {props.header}{" "}
50
+ </h5>
51
+ <p class="font-normal text-gray-700 dark:text-gray-400">
52
+ {props.content}
53
+ </p>
54
+ </div>
55
+ <div className="p-3 mt-6 rounded-b-lg flex justify-end">
56
+ {props.actions}
130
57
  </div>
131
58
  </div>
132
-
133
- // <Container
134
- // onClick={handleParentClick}
135
- // maxWidth="xs"
136
- // variant="card-container"
137
- // dataValue="parent"
138
- // // variant={props.selectedPlan ? "selected-plan-card" : "plan-card"}
139
- // style={{ direction: isArabic ? "rtl" : "ltr" }}
140
- // >
141
- // {props.header && (
142
- // <Container style={{ zIndex: 20 }} variant="card-header">
143
- // {props.headerActions && (
144
- // <div
145
- // style={{
146
- // margin: 0,
147
- // marginRight: -20,
148
- // marginLeft: -20,
149
- // marginBottom: -20,
150
- // // backgroundColor: "red",
151
- // display: "flex",
152
- // paddingTop: 5,
153
- // paddingLeft: 5,
154
- // paddingRight: 5,
155
- // justifyContent: "flex-end"
156
- // }}
157
- // >
158
- // {props.headerActions}
159
- // </div>
160
- // )}
161
- // {props.header}
162
- // </Container>
163
- // )}
164
- // {props.content && (
165
- // <Container style={{ zIndex: 20 }} variant="card-content">
166
- // {props.content}
167
- // </Container>
168
- // )}
169
-
170
- // {props.actions && (
171
- // <Container style={{ zIndex: 20 }} variant="card-actions">
172
- // {props.actions}
173
- // </Container>
174
- // )}
175
- // </Container>
176
59
  );
177
60
  };
178
61
  HawaItemCard.propTypes = {
@@ -0,0 +1,73 @@
1
+ import React from "react";
2
+ import "flowbite";
3
+
4
+ export const HawaModal = (props) => {
5
+ return (
6
+ <div
7
+ id={props.modalID}
8
+ tabindex="-1"
9
+ aria-hidden="true"
10
+ class="hidden overflow-y-auto overflow-x-hidden fixed top-0 right-0 left-0 z-50 w-full md:inset-0 h-modal md:h-full justify-center items-center"
11
+ >
12
+ <div class="relative p-4 w-full max-w-2xl h-full md:h-auto">
13
+ <div class="relative bg-white rounded-lg shadow dark:bg-gray-700">
14
+ <div class="flex justify-between items-start p-4 rounded-t border-b dark:border-gray-600">
15
+ <h3 class="text-xl font-semibold text-gray-900 dark:text-white">
16
+ Terms of Service
17
+ </h3>
18
+ <button
19
+ type="button"
20
+ class="text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-gray-600 dark:hover:text-white"
21
+ data-modal-toggle="defaultModal"
22
+ >
23
+ <svg
24
+ aria-hidden="true"
25
+ class="w-5 h-5"
26
+ fill="currentColor"
27
+ viewBox="0 0 20 20"
28
+ xmlns="http://www.w3.org/2000/svg"
29
+ >
30
+ <path
31
+ fill-rule="evenodd"
32
+ d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"
33
+ clip-rule="evenodd"
34
+ ></path>
35
+ </svg>
36
+ <span class="sr-only">Close modal</span>
37
+ </button>
38
+ </div>
39
+ <div class="p-6 space-y-6">
40
+ <p class="text-base leading-relaxed text-gray-500 dark:text-gray-400">
41
+ With less than a month to go before the European Union enacts new
42
+ consumer privacy laws for its citizens, companies around the world
43
+ are updating their terms of service agreements to comply.
44
+ </p>
45
+ <p class="text-base leading-relaxed text-gray-500 dark:text-gray-400">
46
+ The European Union’s General Data Protection Regulation (G.D.P.R.)
47
+ goes into effect on May 25 and is meant to ensure a common set of
48
+ data rights in the European Union. It requires organizations to
49
+ notify users as soon as possible of high-risk data breaches that
50
+ could personally affect them.
51
+ </p>
52
+ </div>
53
+ <div class="flex items-center p-6 space-x-2 rounded-b border-t border-gray-200 dark:border-gray-600">
54
+ <button
55
+ data-modal-toggle="defaultModal"
56
+ type="button"
57
+ class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
58
+ >
59
+ I accept
60
+ </button>
61
+ <button
62
+ data-modal-toggle="defaultModal"
63
+ type="button"
64
+ class="text-gray-500 bg-white hover:bg-gray-100 focus:ring-4 focus:outline-none focus:ring-blue-300 rounded-lg border border-gray-200 text-sm font-medium px-5 py-2.5 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-600"
65
+ >
66
+ Decline
67
+ </button>
68
+ </div>
69
+ </div>
70
+ </div>
71
+ </div>
72
+ );
73
+ };