@sikka/hawa 0.0.59 → 0.0.61
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.
- package/es/index.es.js +1 -1
- package/lib/index.js +1 -1
- package/package.json +2 -2
- package/src/blocks/Pricing/ComparingPlans.js +151 -0
- package/src/blocks/Pricing/PricingPlans.js +21 -12
- package/src/blocks/Pricing/index.js +1 -0
- package/src/elements/HawaCheckbox.js +7 -10
- package/src/elements/HawaModal.js +73 -0
- package/src/elements/HawaPricingCard.js +51 -53
- package/src/elements/HawaRange.js +8 -16
- package/src/elements/HawaSettingsRow.js +2 -2
- package/src/elements/HawaTable.js +2 -6
- package/src/elements/HawaTabs.js +32 -0
- package/src/elements/index.js +2 -0
- package/src/layout/index.js +0 -2
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/main.dd9f34e9.iframe.bundle.js +1 -0
- package/storybook-static/project.json +1 -1
- package/storybook-static/vendors~main.7059fde5.iframe.bundle.js +76 -0
- package/storybook-static/{vendors~main.305b437b.iframe.bundle.js.LICENSE.txt → vendors~main.7059fde5.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/vendors~main.7059fde5.iframe.bundle.js.map +1 -0
- package/src/layout/HawaDrawer.js +0 -109
- package/storybook-static/main.e6b8be7f.iframe.bundle.js +0 -1
- package/storybook-static/vendors~main.305b437b.iframe.bundle.js +0 -76
- package/storybook-static/vendors~main.305b437b.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.
|
|
3
|
+
"version": "0.0.61",
|
|
4
4
|
"description": "UI Kit",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.es.js",
|
|
@@ -69,7 +69,6 @@
|
|
|
69
69
|
"react-color": "^2.19.3",
|
|
70
70
|
"react-dnd": "^15.1.2",
|
|
71
71
|
"react-dom": "^17.0.1",
|
|
72
|
-
"react-dropzone": "^12.0.4",
|
|
73
72
|
"react-hook-form": "^7.28.0",
|
|
74
73
|
"react-phone-input-2": "^2.15.1",
|
|
75
74
|
"react-select": "^5.3.2",
|
|
@@ -85,6 +84,7 @@
|
|
|
85
84
|
},
|
|
86
85
|
"dependencies": {
|
|
87
86
|
"flowbite": "^1.5.3",
|
|
87
|
+
"react-dropzone": "^12.0.4",
|
|
88
88
|
"react-icons": "^4.6.0"
|
|
89
89
|
}
|
|
90
90
|
}
|
|
@@ -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
|
-
<
|
|
19
|
-
|
|
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
|
-
|
|
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,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
|
|
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
|
-
|
|
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
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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>
|
|
@@ -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
|
+
};
|
|
@@ -22,52 +22,51 @@ export const HawaPricingCard = (props) => {
|
|
|
22
22
|
let featuresMapping = isArabic ? props.features_ar : props.features;
|
|
23
23
|
let chipSpacing = isArabic ? { left: 10 } : { right: 10 };
|
|
24
24
|
return (
|
|
25
|
-
<div>
|
|
26
|
-
<
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
<
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
<
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
>
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
})}
|
|
25
|
+
<div class="mx-1 p-4 w-full max-w-sm bg-white rounded-lg border shadow-md sm:p-8 dark:bg-gray-800 dark:border-gray-700">
|
|
26
|
+
<h5 class="mb-4 text-xl font-medium text-gray-500 dark:text-gray-400">
|
|
27
|
+
{isArabic ? props.title_ar : props.title}
|
|
28
|
+
</h5>
|
|
29
|
+
<div class="flex items-baseline text-gray-900 dark:text-white">
|
|
30
|
+
<span class="font-semibold text-sm">
|
|
31
|
+
{" "}
|
|
32
|
+
{currencyMapping[props.currency?.toLowerCase()]}
|
|
33
|
+
</span>
|
|
34
|
+
<span class="text-5xl font-extrabold tracking-tight">
|
|
35
|
+
{props.price}
|
|
36
|
+
</span>
|
|
37
|
+
<span class="ml-1 text-xl font-normal text-gray-500 dark:text-gray-400">
|
|
38
|
+
/{" "}
|
|
39
|
+
{isArabic
|
|
40
|
+
? cycleTextsArabic[props.cycleText]
|
|
41
|
+
: cycleTextsEnglish[props.cycleText]}
|
|
42
|
+
</span>
|
|
43
|
+
</div>
|
|
44
|
+
<ul role="list" class="my-7 space-y-5">
|
|
45
|
+
{featuresMapping?.map((feature) => {
|
|
46
|
+
return (
|
|
47
|
+
<li class="flex space-x-3">
|
|
48
|
+
<svg
|
|
49
|
+
aria-hidden="true"
|
|
50
|
+
class="flex-shrink-0 w-5 h-5 text-blue-600 dark:text-blue-500"
|
|
51
|
+
fill="currentColor"
|
|
52
|
+
viewBox="0 0 20 20"
|
|
53
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
54
|
+
>
|
|
55
|
+
<title>Check icon</title>
|
|
56
|
+
<path
|
|
57
|
+
fill-rule="evenodd"
|
|
58
|
+
d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z"
|
|
59
|
+
clip-rule="evenodd"
|
|
60
|
+
></path>
|
|
61
|
+
</svg>
|
|
62
|
+
<span class="text-base font-normal leading-tight text-gray-500 dark:text-gray-400">
|
|
63
|
+
{feature}
|
|
64
|
+
</span>
|
|
65
|
+
</li>
|
|
66
|
+
);
|
|
67
|
+
})}
|
|
69
68
|
|
|
70
|
-
|
|
69
|
+
{/* <li class="flex space-x-3 line-through decoration-gray-500">
|
|
71
70
|
<svg
|
|
72
71
|
aria-hidden="true"
|
|
73
72
|
class="flex-shrink-0 w-5 h-5 text-gray-400 dark:text-gray-500"
|
|
@@ -86,14 +85,13 @@ export const HawaPricingCard = (props) => {
|
|
|
86
85
|
Sketch Files
|
|
87
86
|
</span>
|
|
88
87
|
</li> */}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
</div>
|
|
88
|
+
</ul>
|
|
89
|
+
<button
|
|
90
|
+
type="button"
|
|
91
|
+
class="text-white bg-blue-600 hover:bg-blue-700 focus:ring-4 focus:outline-none focus:ring-blue-200 dark:focus:ring-blue-900 font-medium rounded-lg text-sm px-5 py-2.5 inline-flex justify-center w-full text-center"
|
|
92
|
+
>
|
|
93
|
+
{props.buttonText}
|
|
94
|
+
</button>
|
|
97
95
|
</div>
|
|
98
96
|
|
|
99
97
|
// <Container
|
|
@@ -3,23 +3,15 @@ import PropTypes from "prop-types";
|
|
|
3
3
|
|
|
4
4
|
export const HawaRange = (props) => {
|
|
5
5
|
return (
|
|
6
|
-
// <Stack spacing={2} direction="row" alignItems="center" style={props.style}>
|
|
7
|
-
// {props.startElement}
|
|
8
|
-
// <Slider
|
|
9
|
-
// size="small"
|
|
10
|
-
// aria-label="Volume"
|
|
11
|
-
// value={props.value}
|
|
12
|
-
// onChange={props.handleChange}
|
|
13
|
-
// />
|
|
14
|
-
// {props.endElement}
|
|
15
|
-
// </Stack>
|
|
16
6
|
<div>
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
7
|
+
{props.label && (
|
|
8
|
+
<label
|
|
9
|
+
for="default-range"
|
|
10
|
+
class="block mb-2 text-sm font-medium text-gray-900 dark:text-gray-300"
|
|
11
|
+
>
|
|
12
|
+
{props.label}
|
|
13
|
+
</label>
|
|
14
|
+
)}
|
|
23
15
|
<div className="flex flex-row justify-center items-center w-fit">
|
|
24
16
|
<div className="mr-2">{props.startElement}</div>{" "}
|
|
25
17
|
<input
|
|
@@ -6,7 +6,7 @@ import { HawaSwitch } from "./HawaSwitch";
|
|
|
6
6
|
import { HawaColorPicker } from "./HawaColorPicker";
|
|
7
7
|
import { HawaRange } from "./HawaRange";
|
|
8
8
|
import { HawaCheckbox } from "./HawaCheckbox";
|
|
9
|
-
import {
|
|
9
|
+
import { HawaTabs } from "./HawaTabs";
|
|
10
10
|
|
|
11
11
|
export const HawaSettingsRow = (props) => {
|
|
12
12
|
return (
|
|
@@ -17,7 +17,7 @@ export const HawaSettingsRow = (props) => {
|
|
|
17
17
|
{props.settingsType === "boolean" && <HawaSwitch {...props} />}
|
|
18
18
|
{props.settingsType === "range" && <HawaRange {...props} />}
|
|
19
19
|
{props.settingsType === "color" && <HawaColorPicker {...props} />}
|
|
20
|
-
{props.settingsType === "radio" && <
|
|
20
|
+
{props.settingsType === "radio" && <HawaTabs {...props} />}
|
|
21
21
|
</div>
|
|
22
22
|
);
|
|
23
23
|
};
|
|
@@ -52,13 +52,9 @@ export const HawaTable = (props) => {
|
|
|
52
52
|
>
|
|
53
53
|
{props.actions.map((act) => (
|
|
54
54
|
<HawaButton
|
|
55
|
-
style={{ margin: 2 }}
|
|
56
|
-
variant="outlined"
|
|
57
|
-
size="small"
|
|
58
55
|
onClick={() => props.handleActionClick(singleRow)}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
</HawaButton>
|
|
56
|
+
text={act}
|
|
57
|
+
/>
|
|
62
58
|
))}
|
|
63
59
|
</td>
|
|
64
60
|
)}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
|
|
3
|
+
export const HawaTabs = (props) => {
|
|
4
|
+
const [selectedOption, setSelectedOption] = useState(props.defaultValue);
|
|
5
|
+
let activeTabStyle =
|
|
6
|
+
"inline-block py-2 px-4 text-white bg-blue-600 rounded-lg active";
|
|
7
|
+
let inactiveTabStyle =
|
|
8
|
+
"inline-block py-2 px-4 rounded-lg hover:text-gray-900 hover:bg-gray-100 dark:hover:bg-gray-800 dark:hover:text-white";
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<div>
|
|
12
|
+
<ul className="bg-gray-100 w-fit rounded-lg flex flex-wrap text-sm font-medium text-center text-gray-500 dark:text-gray-400">
|
|
13
|
+
{props.options.map((opt) => (
|
|
14
|
+
<li className="mr-2">
|
|
15
|
+
<button
|
|
16
|
+
aria-current="page"
|
|
17
|
+
onClick={() => {
|
|
18
|
+
setSelectedOption(opt.value);
|
|
19
|
+
props.onChangeTab(opt.value);
|
|
20
|
+
}}
|
|
21
|
+
className={
|
|
22
|
+
selectedOption === opt.value ? activeTabStyle : inactiveTabStyle
|
|
23
|
+
}
|
|
24
|
+
>
|
|
25
|
+
{opt.label}
|
|
26
|
+
</button>
|
|
27
|
+
</li>
|
|
28
|
+
))}
|
|
29
|
+
</ul>
|
|
30
|
+
</div>
|
|
31
|
+
);
|
|
32
|
+
};
|
package/src/elements/index.js
CHANGED
package/src/layout/index.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
export * from "./Box";
|
|
2
|
-
// export * from "./HawaAppLayout";
|
|
3
2
|
export * from "./HawaDialog";
|
|
4
3
|
export * from "./HawaPageControls";
|
|
5
4
|
export * from "./HawaBottomAppBar";
|
|
6
|
-
export * from "./HawaDrawer";
|
|
7
5
|
export * from "./HawaLayout";
|
|
8
6
|
export * from "./HawaContainer";
|
|
@@ -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.6b765954.iframe.bundle.js"></script><script src="vendors~main.
|
|
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.6b765954.iframe.bundle.js"></script><script src="vendors~main.7059fde5.iframe.bundle.js"></script><script src="main.dd9f34e9.iframe.bundle.js"></script></body></html>
|