@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.
@@ -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 Alert from "../lib/components/Alert";
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, Alert },
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 Modals = () => {
22
+ export const Default = () => {
23
23
  const [showModal, setShowModal] = useState(false);
24
- const [showAlert, setShowAlert] = useState(false);
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>Add Label</h2>
37
+ <Typography style="h2">They're creepy & they're kooky</Typography>
39
38
  </Modal.Header>
40
39
  <Modal.Body>
41
- Somewhere out in space live The Herculoids! Zok, the laser-ray dragon!
42
- Igoo, the giant rock ape! Tundro, the tremendous! Gloop and Gleep, the
43
- formless, fearless wonders! With Zandor, their leader, and his wife,
44
- Tara, and son, Dorno, they team up to protect their planet from
45
- sinister invaders! All-strong! All-brave! All-heroes! They're The
46
- Herculoids!
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-4">
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
- <Alert
63
- isOpen={showAlert}
64
- onClose={() => setShowAlert(false)}
65
- onSubmit={() => setShowAlert(false)}
66
- message="Are you sure you want to continue? All of your unsaved changes will be
67
- lost."
68
- title="You have unsaved changes!"
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
  };
@@ -9,7 +9,7 @@ export default {
9
9
  layout: "padded",
10
10
  docs: {
11
11
  description: {
12
- component: '`import { PageLoader } from "@bigbinary/neetoui";`',
12
+ component: '`import { PageLoader } from "@bigbinary/neetoui/v2";`',
13
13
  },
14
14
  },
15
15
  },
@@ -9,7 +9,7 @@ export default {
9
9
  layout: "padded",
10
10
  docs: {
11
11
  description: {
12
- component: '`import { Pagination } from "@bigbinary/neetoui";`',
12
+ component: '`import { Pagination } from "@bigbinary/neetoui/v2";`',
13
13
  },
14
14
  },
15
15
  },
@@ -12,9 +12,9 @@ export default {
12
12
  layout: "padded",
13
13
  docs: {
14
14
  description: {
15
- component: '`import { Pane } from "@bigbinary/neetoui";`'
16
- }
17
- }
15
+ component: '`import { Pane } from "@bigbinary/neetoui/v2";`',
16
+ },
17
+ },
18
18
  },
19
19
  };
20
20
 
@@ -9,7 +9,7 @@ export default {
9
9
  layout: "padded",
10
10
  docs: {
11
11
  description: {
12
- component: '`import { Radio } from "@bigbinary/neetoui";`',
12
+ component: '`import { Radio } from "@bigbinary/neetoui/v2";`',
13
13
  },
14
14
  },
15
15
  },
@@ -9,7 +9,7 @@ export default {
9
9
  layout: "padded",
10
10
  docs: {
11
11
  description: {
12
- component: '`import { Select } from "@bigbinary/neetoui";`',
12
+ component: '`import { Select } from "@bigbinary/neetoui/v2";`',
13
13
  },
14
14
  },
15
15
  },
@@ -9,7 +9,7 @@ export default {
9
9
  layout: "padded",
10
10
  docs: {
11
11
  description: {
12
- component: '`import { Switch } from "@bigbinary/neetoui";`',
12
+ component: '`import { Switch } from "@bigbinary/neetoui/v2";`',
13
13
  },
14
14
  },
15
15
  },
@@ -9,9 +9,9 @@ export default {
9
9
  layout: "padded",
10
10
  docs: {
11
11
  description: {
12
- component: '`import { Tab } from "@bigbinary/neetoui";`'
13
- }
14
- }
12
+ component: '`import { Tab } from "@bigbinary/neetoui/v2";`',
13
+ },
14
+ },
15
15
  },
16
16
  };
17
17
 
@@ -10,9 +10,9 @@ export default {
10
10
  layout: "padded",
11
11
  docs: {
12
12
  description: {
13
- component: '`import { Tag } from "@bigbinary/neetoui";`'
14
- }
15
- }
13
+ component: '`import { Tag } from "@bigbinary/neetoui/v2";`',
14
+ },
15
+ },
16
16
  },
17
17
  };
18
18
 
@@ -9,7 +9,7 @@ export default {
9
9
  layout: "padded",
10
10
  docs: {
11
11
  description: {
12
- component: '`import { Textarea } from "@bigbinary/neetoui";`',
12
+ component: '`import { Textarea } from "@bigbinary/neetoui/v2";`',
13
13
  },
14
14
  },
15
15
  },
@@ -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
  };
@@ -11,9 +11,9 @@ export default {
11
11
  layout: "padded",
12
12
  docs: {
13
13
  description: {
14
- component: '`import { Tooltip } from "@bigbinary/neetoui";`'
15
- }
16
- }
14
+ component: '`import { Tooltip } from "@bigbinary/neetoui/v2";`',
15
+ },
16
+ },
17
17
  },
18
18
  };
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">
@@ -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: ["tw-flex", "tw-space-x-6", "tw-gap-8", "tw-p-4"],
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
  };