@sikka/hawa 0.0.44 → 0.0.45
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 +1 -1
- package/src/elements/HawaAccordian.js +103 -17
- package/src/elements/HawaAlert.js +19 -6
- package/src/elements/HawaCheckbox.js +25 -10
- package/src/elements/HawaChip.js +5 -2
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/main.aaee24e3.iframe.bundle.js +1 -0
- package/storybook-static/project.json +1 -1
- package/storybook-static/vendors~main.afb35182.iframe.bundle.js +76 -0
- package/storybook-static/{vendors~main.337d03df.iframe.bundle.js.LICENSE.txt → vendors~main.afb35182.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/vendors~main.afb35182.iframe.bundle.js.map +1 -0
- package/storybook-static/main.3795aede.iframe.bundle.js +0 -1
- package/storybook-static/vendors~main.337d03df.iframe.bundle.js +0 -76
- package/storybook-static/vendors~main.337d03df.iframe.bundle.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,25 +1,111 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import ExpandMore from "@mui/icons-material/ExpandMore";
|
|
3
|
-
import Typography from "@mui/material/Typography";
|
|
4
|
-
import Accordion from "@mui/material/Accordion";
|
|
5
|
-
import AccordionSummary from "@mui/material/AccordionSummary";
|
|
6
|
-
import AccordionDetails from "@mui/material/AccordionDetails";
|
|
7
2
|
import PropTypes from "prop-types";
|
|
3
|
+
import "flowbite";
|
|
8
4
|
|
|
9
|
-
|
|
5
|
+
const AccordionItem = (props) => {
|
|
6
|
+
let noRounding =
|
|
7
|
+
"flex items-center justify-between w-full p-5 font-medium text-left border border-gray-200 focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-800 dark:border-gray-700 hover:bg-gray-100 dark:hover:bg-gray-800 bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white";
|
|
8
|
+
let roundedTop =
|
|
9
|
+
"rounded-t-xl border-b-0 flex items-center justify-between w-full p-5 font-medium text-left border border-gray-200 focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-800 dark:border-gray-700 hover:bg-gray-100 dark:hover:bg-gray-800 bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white";
|
|
10
|
+
let roundedBottom =
|
|
11
|
+
"rounded-b-xl border-t-0 flex items-center justify-between w-full p-5 font-medium text-left border border-gray-200 focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-800 dark:border-gray-700 hover:bg-gray-100 dark:hover:bg-gray-800 bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white";
|
|
12
|
+
let accPaper =
|
|
13
|
+
"p-5 font-light border border-b-xl border-gray-200 dark:border-gray-700 dark:bg-gray-900";
|
|
14
|
+
let accPaperRounded =
|
|
15
|
+
"p-5 font-light border border-b-xl rounded-b-xl border-gray-200 dark:border-gray-700 dark:bg-gray-900";
|
|
10
16
|
return (
|
|
11
|
-
<
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
17
|
+
<div>
|
|
18
|
+
<h2 id={"accordion-collapse-heading-" + props.count}>
|
|
19
|
+
<button
|
|
20
|
+
type="button"
|
|
21
|
+
className={
|
|
22
|
+
props.count === 0 ? roundedTop : noRounding
|
|
23
|
+
// : props.count === -1
|
|
24
|
+
// ? roundedBottom
|
|
25
|
+
// : noRounding
|
|
26
|
+
}
|
|
27
|
+
data-accordion-target={"#accordion-collapse-body-" + props.count}
|
|
28
|
+
aria-expanded="true"
|
|
29
|
+
aria-controls={"accordion-collapse-body-" + props.count}
|
|
30
|
+
>
|
|
31
|
+
<span>What is Flowbite?</span>
|
|
32
|
+
<svg
|
|
33
|
+
data-accordion-icon=""
|
|
34
|
+
className="w-6 h-6 rotate-180 shrink-0"
|
|
35
|
+
fill="currentColor"
|
|
36
|
+
viewBox="0 0 20 20"
|
|
37
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
38
|
+
>
|
|
39
|
+
<path
|
|
40
|
+
fill-rule="evenodd"
|
|
41
|
+
d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"
|
|
42
|
+
clip-rule="evenodd"
|
|
43
|
+
></path>
|
|
44
|
+
</svg>
|
|
45
|
+
</button>
|
|
46
|
+
</h2>
|
|
47
|
+
<div
|
|
48
|
+
id={"accordion-collapse-body-" + props.count}
|
|
49
|
+
className=""
|
|
50
|
+
aria-labelledby={"accordion-collapse-heading-" + props.count}
|
|
16
51
|
>
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
52
|
+
<div className={props.count === -1 ? accPaperRounded : accPaper}>
|
|
53
|
+
<p className="mb-2 text-gray-500 dark:text-gray-400">
|
|
54
|
+
Flowbite is an open-source library of interactive components built
|
|
55
|
+
on top of Tailwind CSS including buttons, dropdowns, modals,
|
|
56
|
+
navbars, and more.
|
|
57
|
+
</p>
|
|
58
|
+
<p className="text-gray-500 dark:text-gray-400">
|
|
59
|
+
Check out this guide to learn how to{" "}
|
|
60
|
+
<a
|
|
61
|
+
href="/docs/getting-started/introduction/"
|
|
62
|
+
class="text-blue-600 dark:text-blue-500 hover:underline"
|
|
63
|
+
>
|
|
64
|
+
get started
|
|
65
|
+
</a>{" "}
|
|
66
|
+
and start developing websites even faster with components on top of
|
|
67
|
+
Tailwind CSS.
|
|
68
|
+
</p>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
);
|
|
73
|
+
};
|
|
74
|
+
export const HawaAccordian = (props) => {
|
|
75
|
+
let accordionContent = [
|
|
76
|
+
{ title: "etete", content: "teoite" },
|
|
77
|
+
{ title: "etete", content: "teoite" },
|
|
78
|
+
{ title: "etete", content: "teoite" },
|
|
79
|
+
{ title: "etete", content: "teoite" }
|
|
80
|
+
];
|
|
81
|
+
return (
|
|
82
|
+
<div id="accordion-collapse" data-accordion="collapse">
|
|
83
|
+
{accordionContent.map((acc, i) => {
|
|
84
|
+
return (
|
|
85
|
+
<AccordionItem
|
|
86
|
+
title={acc.title}
|
|
87
|
+
content={acc.content}
|
|
88
|
+
count={accordionContent.length - 1 === i ? -1 : i}
|
|
89
|
+
/>
|
|
90
|
+
);
|
|
91
|
+
})}
|
|
92
|
+
{/* <AccordionItem count={1} />
|
|
93
|
+
<AccordionItem count={2} />
|
|
94
|
+
<AccordionItem count={3} /> */}
|
|
95
|
+
</div>
|
|
96
|
+
|
|
97
|
+
// <Accordion elevation={0}>
|
|
98
|
+
// <AccordionSummary
|
|
99
|
+
// expandIcon={<ExpandMore />}
|
|
100
|
+
// aria-controls="panel1a-content"
|
|
101
|
+
// id="panel1a-header"
|
|
102
|
+
// >
|
|
103
|
+
// <Typography>{props.title}</Typography>
|
|
104
|
+
// </AccordionSummary>
|
|
105
|
+
// <AccordionDetails>
|
|
106
|
+
// <Typography>{props.content} </Typography>
|
|
107
|
+
// </AccordionDetails>
|
|
108
|
+
// </Accordion>
|
|
23
109
|
);
|
|
24
110
|
};
|
|
25
111
|
HawaAccordian.propTypes = {
|
|
@@ -1,14 +1,27 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import Alert from "@mui/material/Alert";
|
|
3
|
-
import AlertTitle from "@mui/material/AlertTitle";
|
|
4
2
|
import PropTypes from "prop-types";
|
|
5
3
|
|
|
6
4
|
export const HawaAlert = (props) => {
|
|
5
|
+
let severities = {
|
|
6
|
+
info: "text-blue-700 bg-blue-100 dark:bg-blue-200 dark:text-blue-800",
|
|
7
|
+
warning:
|
|
8
|
+
"text-yellow-700 bg-yellow-100 dark:bg-yellow-200 dark:text-yellow-800",
|
|
9
|
+
error: "text-red-700 bg-red-100 dark:bg-red-200 dark:text-red-800",
|
|
10
|
+
success: "text-green-700 bg-green-100 dark:bg-green-200 dark:text-green-800"
|
|
11
|
+
};
|
|
12
|
+
|
|
7
13
|
return (
|
|
8
|
-
<
|
|
9
|
-
{
|
|
10
|
-
|
|
11
|
-
|
|
14
|
+
<div
|
|
15
|
+
class={
|
|
16
|
+
"flex flex-col p-4 mb-4 text-sm rounded-lg" +
|
|
17
|
+
" " +
|
|
18
|
+
severities[props.severity]
|
|
19
|
+
}
|
|
20
|
+
role="alert"
|
|
21
|
+
>
|
|
22
|
+
<span class="font-medium">{props.title}</span>
|
|
23
|
+
<span>{" " + props.text}</span>
|
|
24
|
+
</div>
|
|
12
25
|
);
|
|
13
26
|
};
|
|
14
27
|
HawaAlert.propTypes = {
|
|
@@ -5,16 +5,31 @@ import Checkbox from "@mui/material/Checkbox";
|
|
|
5
5
|
export const HawaCheckbox = (props) => {
|
|
6
6
|
console.log("props : ", props);
|
|
7
7
|
return (
|
|
8
|
-
<
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
defaultChecked={props.defaultValue}
|
|
15
|
-
/>
|
|
16
|
-
}
|
|
8
|
+
<div class="flex items-center mb-4">
|
|
9
|
+
<input
|
|
10
|
+
id="default-checkbox"
|
|
11
|
+
type="checkbox"
|
|
12
|
+
value=""
|
|
13
|
+
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"
|
|
17
14
|
/>
|
|
18
|
-
|
|
15
|
+
<label
|
|
16
|
+
for="default-checkbox"
|
|
17
|
+
class="ml-2 text-sm font-medium text-gray-900 dark:text-gray-300"
|
|
18
|
+
>
|
|
19
|
+
Default checkbox
|
|
20
|
+
</label>
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
// <React.Fragment>
|
|
24
|
+
// <FormControlLabel
|
|
25
|
+
// label={props.label}
|
|
26
|
+
// control={
|
|
27
|
+
// <Checkbox
|
|
28
|
+
// style={{ color: props.color || null }}
|
|
29
|
+
// defaultChecked={props.defaultValue}
|
|
30
|
+
// />
|
|
31
|
+
// }
|
|
32
|
+
// />
|
|
33
|
+
// </React.Fragment>
|
|
19
34
|
);
|
|
20
35
|
};
|
package/src/elements/HawaChip.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import Chip from "@mui/material/Chip";
|
|
3
2
|
|
|
4
3
|
export const HawaChip = (props) => {
|
|
5
|
-
return
|
|
4
|
+
return (
|
|
5
|
+
<span class="bg-blue-100 text-blue-800 text-xs font-semibold mr-2 px-2.5 py-0.5 rounded dark:bg-blue-200 dark:text-blue-800">
|
|
6
|
+
{props.label}
|
|
7
|
+
</span>
|
|
8
|
+
);
|
|
6
9
|
};
|
|
@@ -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.0e8a2888.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.0e8a2888.iframe.bundle.js"></script><script src="vendors~main.afb35182.iframe.bundle.js"></script><script src="main.aaee24e3.iframe.bundle.js"></script></body></html>
|