@bigbinary/neetoui 2.0.57 → 2.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/.storybook/preview.js +1 -0
- package/.storybook/v1.scss +15063 -0
- package/README.md +5 -1
- package/package.json +2 -4
- package/postcss.config.js +0 -11
- package/stories/Alert.stories.jsx +2 -2
- package/stories/Avatar.stories.jsx +3 -3
- package/stories/Button.stories.jsx +3 -4
- package/stories/Callout.stories.jsx +2 -6
- package/stories/Checkout.stories.jsx +1 -1
- package/stories/Color.stories.mdx +28 -28
- package/stories/Dropdown.stories.jsx +3 -3
- package/stories/Iconography.stories.jsx +68 -5
- package/stories/Input.stories.jsx +1 -1
- package/stories/Introduction.stories.mdx +6 -5
- package/stories/Label.stories.jsx +1 -1
- package/stories/Layouts.stories.jsx +2 -2
- package/stories/MenuBar.stories.jsx +1 -1
- package/stories/Modal.stories.jsx +135 -24
- package/stories/PageLoader.stories.jsx +1 -1
- package/stories/Pagination.stories.jsx +1 -1
- package/stories/Pane.stories.jsx +3 -3
- package/stories/Radio.stories.jsx +1 -1
- package/stories/Select.stories.jsx +1 -1
- package/stories/Switch.stories.jsx +1 -1
- package/stories/Tab.stories.jsx +3 -3
- package/stories/Tag.stories.jsx +3 -3
- package/stories/Textarea.stories.jsx +1 -1
- package/stories/Toastr.stories.jsx +3 -3
- package/stories/Tooltip.stories.jsx +3 -3
- package/stories/Typography.stories.jsx +9 -9
- package/tailwind.config.js +1 -41
- package/v2/formik.js +5 -5
- package/v2/index.js +6 -6
- package/v2/layouts.js +5 -5
- package/webpack.config.js +2 -8
- package/webpack.dev.config.js +2 -8
|
@@ -3,70 +3,181 @@ import { Check } from "@bigbinary/neeto-icons";
|
|
|
3
3
|
|
|
4
4
|
import Button from "../lib/components/Button";
|
|
5
5
|
import Modal from "../lib/components/Modal";
|
|
6
|
-
import
|
|
6
|
+
import Typography from "../lib/components/Typography";
|
|
7
7
|
|
|
8
8
|
export default {
|
|
9
9
|
title: "Overlays/Modal",
|
|
10
10
|
component: Modal,
|
|
11
|
-
subcomponents: { Button
|
|
11
|
+
subcomponents: { Button },
|
|
12
12
|
parameters: {
|
|
13
13
|
layout: "padded",
|
|
14
14
|
docs: {
|
|
15
15
|
description: {
|
|
16
|
-
component: '`import { Modal } from "@bigbinary/neetoui";`'
|
|
17
|
-
}
|
|
18
|
-
}
|
|
16
|
+
component: '`import { Modal } from "@bigbinary/neetoui/v2";`',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
19
|
},
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
export const
|
|
22
|
+
export const Default = () => {
|
|
23
23
|
const [showModal, setShowModal] = useState(false);
|
|
24
|
-
|
|
24
|
+
|
|
25
25
|
return (
|
|
26
26
|
<div className="w-full">
|
|
27
27
|
<div className="space-y-6">
|
|
28
28
|
<div className="w-1/2 space-y-8">
|
|
29
29
|
<div className="flex flex-row items-center justify-start space-x-6">
|
|
30
30
|
<Button label="Show Modal" onClick={() => setShowModal(true)} />
|
|
31
|
-
<Button label="Show Alert" onClick={() => setShowAlert(true)} />
|
|
32
31
|
</div>
|
|
33
32
|
</div>
|
|
34
33
|
</div>
|
|
35
34
|
|
|
36
35
|
<Modal isOpen={showModal} onClose={() => setShowModal(false)}>
|
|
37
36
|
<Modal.Header>
|
|
38
|
-
<h2>
|
|
37
|
+
<Typography style="h2">They're creepy & they're kooky</Typography>
|
|
39
38
|
</Modal.Header>
|
|
40
39
|
<Modal.Body>
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
40
|
+
<Typography style="body2" lineHeight="normal">
|
|
41
|
+
Somewhere out in space live The Herculoids! Zok, the laser-ray
|
|
42
|
+
dragon! Igoo, the giant rock ape! Tundro, the tremendous! Gloop and
|
|
43
|
+
Gleep, the formless, fearless wonders! With Zandor, their leader,
|
|
44
|
+
and his wife, Tara, and son, Dorno, they team up to protect their
|
|
45
|
+
planet from sinister invaders! All-strong! All-brave! All-heroes!
|
|
46
|
+
They're The Herculoids!
|
|
47
|
+
</Typography>
|
|
47
48
|
</Modal.Body>
|
|
48
|
-
<Modal.Footer className="space-x-
|
|
49
|
+
<Modal.Footer className="space-x-2">
|
|
49
50
|
<Button
|
|
50
51
|
icon={Check}
|
|
51
52
|
label="Continue"
|
|
52
53
|
onClick={() => setShowModal(false)}
|
|
54
|
+
size="large"
|
|
53
55
|
/>
|
|
54
56
|
<Button
|
|
55
57
|
style="text"
|
|
56
58
|
label="Cancel"
|
|
57
59
|
onClick={() => setShowModal(false)}
|
|
60
|
+
size="large"
|
|
61
|
+
/>
|
|
62
|
+
</Modal.Footer>
|
|
63
|
+
</Modal>
|
|
64
|
+
</div>
|
|
65
|
+
);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export const ModalSizing = () => {
|
|
69
|
+
const [showModalExtraSmall, setShowModalExtraSmall] = useState(false);
|
|
70
|
+
const [showModalSmall, setShowModalSmall] = useState(false);
|
|
71
|
+
const [showModalMedium, setShowModalMedium] = useState(false);
|
|
72
|
+
|
|
73
|
+
return (
|
|
74
|
+
<div className="w-full">
|
|
75
|
+
<div className="space-y-6">
|
|
76
|
+
<div className="w-1/2 space-y-8">
|
|
77
|
+
<div className="flex flex-row items-center justify-start space-x-6">
|
|
78
|
+
<Button
|
|
79
|
+
label="Extra Small"
|
|
80
|
+
onClick={() => setShowModalExtraSmall(true)}
|
|
81
|
+
/>
|
|
82
|
+
<Button label="Small" onClick={() => setShowModalSmall(true)} />
|
|
83
|
+
<Button label="Medium" onClick={() => setShowModalMedium(true)} />
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
|
|
88
|
+
<Modal
|
|
89
|
+
isOpen={showModalExtraSmall}
|
|
90
|
+
onClose={() => setShowModalExtraSmall(false)}
|
|
91
|
+
size="xs"
|
|
92
|
+
>
|
|
93
|
+
<Modal.Header>
|
|
94
|
+
<Typography style="h2">They're creepy & they're kooky</Typography>
|
|
95
|
+
</Modal.Header>
|
|
96
|
+
<Modal.Body>
|
|
97
|
+
<Typography style="body2" lineHeight="normal">
|
|
98
|
+
Somewhere out in space live The Herculoids! Zok, the laser-ray
|
|
99
|
+
dragon! Igoo, the giant rock ape! Tundro, the tremendous!
|
|
100
|
+
</Typography>
|
|
101
|
+
</Modal.Body>
|
|
102
|
+
<Modal.Footer className="space-x-2">
|
|
103
|
+
<Button
|
|
104
|
+
icon={Check}
|
|
105
|
+
size="large"
|
|
106
|
+
label="Continue"
|
|
107
|
+
onClick={() => setShowModalExtraSmall(false)}
|
|
108
|
+
/>
|
|
109
|
+
<Button
|
|
110
|
+
style="text"
|
|
111
|
+
size="large"
|
|
112
|
+
label="Cancel"
|
|
113
|
+
onClick={() => setShowModalExtraSmall(false)}
|
|
58
114
|
/>
|
|
59
115
|
</Modal.Footer>
|
|
60
116
|
</Modal>
|
|
61
117
|
|
|
62
|
-
<
|
|
63
|
-
isOpen={
|
|
64
|
-
onClose={() =>
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
118
|
+
<Modal
|
|
119
|
+
isOpen={showModalSmall}
|
|
120
|
+
onClose={() => setShowModalSmall(false)}
|
|
121
|
+
size="sm"
|
|
122
|
+
>
|
|
123
|
+
<Modal.Header>
|
|
124
|
+
<Typography style="h2">They're creepy & they're kooky</Typography>
|
|
125
|
+
</Modal.Header>
|
|
126
|
+
<Modal.Body>
|
|
127
|
+
<Typography style="body2" lineHeight="normal">
|
|
128
|
+
Somewhere out in space live The Herculoids! Zok, the laser-ray
|
|
129
|
+
dragon! Igoo, the giant rock ape! Tundro, the tremendous!
|
|
130
|
+
</Typography>
|
|
131
|
+
</Modal.Body>
|
|
132
|
+
<Modal.Footer className="space-x-2">
|
|
133
|
+
<Button
|
|
134
|
+
icon={Check}
|
|
135
|
+
size="large"
|
|
136
|
+
label="Continue"
|
|
137
|
+
onClick={() => setShowModalSmall(false)}
|
|
138
|
+
/>
|
|
139
|
+
<Button
|
|
140
|
+
style="text"
|
|
141
|
+
size="large"
|
|
142
|
+
label="Cancel"
|
|
143
|
+
onClick={() => setShowModalSmall(false)}
|
|
144
|
+
/>
|
|
145
|
+
</Modal.Footer>
|
|
146
|
+
</Modal>
|
|
147
|
+
|
|
148
|
+
<Modal
|
|
149
|
+
isOpen={showModalMedium}
|
|
150
|
+
onClose={() => setShowModalMedium(false)}
|
|
151
|
+
size="md"
|
|
152
|
+
>
|
|
153
|
+
<Modal.Header>
|
|
154
|
+
<Typography style="h2">They're creepy & they're kooky</Typography>
|
|
155
|
+
</Modal.Header>
|
|
156
|
+
<Modal.Body>
|
|
157
|
+
<Typography style="body2" lineHeight="normal">
|
|
158
|
+
Somewhere out in space live The Herculoids! Zok, the laser-ray
|
|
159
|
+
dragon! Igoo, the giant rock ape! Tundro, the tremendous! Gloop and
|
|
160
|
+
Gleep, the formless, fearless wonders! With Zandor, their leader,
|
|
161
|
+
and his wife, Tara, and son, Dorno, they team up to protect their
|
|
162
|
+
planet from sinister invaders! All-strong! All-brave! All-heroes!
|
|
163
|
+
They're The Herculoids!
|
|
164
|
+
</Typography>
|
|
165
|
+
</Modal.Body>
|
|
166
|
+
<Modal.Footer className="space-x-2">
|
|
167
|
+
<Button
|
|
168
|
+
icon={Check}
|
|
169
|
+
size="large"
|
|
170
|
+
label="Continue"
|
|
171
|
+
onClick={() => setShowModalMedium(false)}
|
|
172
|
+
/>
|
|
173
|
+
<Button
|
|
174
|
+
style="text"
|
|
175
|
+
size="large"
|
|
176
|
+
label="Cancel"
|
|
177
|
+
onClick={() => setShowModalMedium(false)}
|
|
178
|
+
/>
|
|
179
|
+
</Modal.Footer>
|
|
180
|
+
</Modal>
|
|
70
181
|
</div>
|
|
71
182
|
);
|
|
72
183
|
};
|
package/stories/Pane.stories.jsx
CHANGED
package/stories/Tab.stories.jsx
CHANGED
package/stories/Tag.stories.jsx
CHANGED
|
@@ -11,9 +11,9 @@ export default {
|
|
|
11
11
|
layout: "padded",
|
|
12
12
|
docs: {
|
|
13
13
|
description: {
|
|
14
|
-
component: '`import { Toastr } from "@bigbinary/neetoui";`'
|
|
15
|
-
}
|
|
16
|
-
}
|
|
14
|
+
component: '`import { Toastr } from "@bigbinary/neetoui/v2";`',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
17
|
},
|
|
18
18
|
subcomponents: { Button },
|
|
19
19
|
};
|
|
@@ -56,34 +56,34 @@ export const AllVariants = (args) => {
|
|
|
56
56
|
return (
|
|
57
57
|
<>
|
|
58
58
|
<Typography className="mb-4" style="h1">
|
|
59
|
-
h1. Heading
|
|
59
|
+
h1. Heading - 32px
|
|
60
60
|
</Typography>
|
|
61
61
|
<Typography className="mb-4" style="h2">
|
|
62
|
-
h2. Heading
|
|
62
|
+
h2. Heading - 24px
|
|
63
63
|
</Typography>
|
|
64
64
|
<Typography className="mb-4" style="h3">
|
|
65
|
-
h3. Heading
|
|
65
|
+
h3. Heading - 20px
|
|
66
66
|
</Typography>
|
|
67
67
|
<Typography className="mb-4" style="h4">
|
|
68
|
-
h4. Heading
|
|
68
|
+
h4. Heading - 16px
|
|
69
69
|
</Typography>
|
|
70
70
|
<Typography className="mb-4" style="h5">
|
|
71
|
-
h5. Heading
|
|
71
|
+
h5. Heading - 14px
|
|
72
72
|
</Typography>
|
|
73
73
|
<Typography className="mb-4" style="h6">
|
|
74
|
-
h6. Heading
|
|
74
|
+
h6. Heading - 12px
|
|
75
75
|
</Typography>
|
|
76
76
|
<Typography className="mb-4" style="body1">
|
|
77
77
|
body1. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quos
|
|
78
|
-
blanditiis tenetur
|
|
78
|
+
blanditiis tenetur - 16px
|
|
79
79
|
</Typography>
|
|
80
80
|
<Typography className="mb-4" style="body2">
|
|
81
81
|
body2. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quos
|
|
82
|
-
blanditiis tenetur
|
|
82
|
+
blanditiis tenetur - 14px
|
|
83
83
|
</Typography>
|
|
84
84
|
<Typography className="mb-4" style="body3">
|
|
85
85
|
body3. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quos
|
|
86
|
-
blanditiis tenetur
|
|
86
|
+
blanditiis tenetur - 12px
|
|
87
87
|
</Typography>
|
|
88
88
|
<div className="mb-4">
|
|
89
89
|
<Typography style="body3" component="del">
|
package/tailwind.config.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
prefix: "tw-",
|
|
3
2
|
purge: {
|
|
4
3
|
enabled: process.env.TAILWIND_ENV === "production" ? true : false,
|
|
5
4
|
content: [
|
|
@@ -12,46 +11,7 @@ module.exports = {
|
|
|
12
11
|
],
|
|
13
12
|
defaultExtractor: (content) => content.match(/[A-Za-z0-9-_:/]+/g) || [],
|
|
14
13
|
options: {
|
|
15
|
-
safelist: ["
|
|
14
|
+
safelist: ["flex", "space-x-6", "gap-8", "p-4"],
|
|
16
15
|
},
|
|
17
16
|
},
|
|
18
|
-
theme: {
|
|
19
|
-
extend: {
|
|
20
|
-
spacing: {
|
|
21
|
-
1.5: "0.375rem",
|
|
22
|
-
2.5: "0.625rem",
|
|
23
|
-
4.5: "1.125rem",
|
|
24
|
-
5: "1.25rem",
|
|
25
|
-
10: "2.5rem",
|
|
26
|
-
18: "4.5rem",
|
|
27
|
-
36: "8.5rem",
|
|
28
|
-
140: "35rem",
|
|
29
|
-
180: "45rem",
|
|
30
|
-
},
|
|
31
|
-
colors: {
|
|
32
|
-
orange: {
|
|
33
|
-
100: "#FFEDD5",
|
|
34
|
-
800: "#9A3412",
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
boxShadow: {
|
|
38
|
-
xs: "0 0 0 1px rgba(0, 0, 0, 0.05)",
|
|
39
|
-
},
|
|
40
|
-
zIndex: {
|
|
41
|
-
1: 1,
|
|
42
|
-
},
|
|
43
|
-
screens: {
|
|
44
|
-
sm: "768px",
|
|
45
|
-
md: "991px",
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
variants: {
|
|
50
|
-
borderColor: ["hover"],
|
|
51
|
-
boxShadow: ["hover"],
|
|
52
|
-
backgroundColor: ["hover", "active"],
|
|
53
|
-
color: ["hover", "active"],
|
|
54
|
-
margin: ["last"],
|
|
55
|
-
outline: ["focus"],
|
|
56
|
-
},
|
|
57
17
|
};
|