@bigbinary/neetoui 2.0.46 → 2.0.50

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.
@@ -0,0 +1,117 @@
1
+ import React from "react";
2
+
3
+ import Button from "../lib/components/Button";
4
+ import Tooltip from "../lib/components/Tooltip";
5
+
6
+ export default {
7
+ title: "Overlays/Tooltip",
8
+ component: Tooltip,
9
+ subcomponents: { Button },
10
+ parameters: {
11
+ layout: "padded",
12
+ docs: {
13
+ description: {
14
+ component: '`import { Tooltip } from "@bigbinary/neetoui";`'
15
+ }
16
+ }
17
+ },
18
+ };
19
+
20
+ export const FollowCursor = (args) => {
21
+ return (
22
+ <div className="space-y-8 p-10">
23
+ <Tooltip
24
+ placement={"top"}
25
+ followCursor={"horizontal"}
26
+ content={"Content is string"}
27
+ >
28
+ <Button style="secondary" label="Follow Cursor" />
29
+ </Tooltip>
30
+ </div>
31
+ );
32
+ };
33
+
34
+ export const JSXContentInside = (args) => {
35
+ return (
36
+ <div className="space-y-8 p-10">
37
+ <Tooltip
38
+ placement={"top"}
39
+ trigger={"click"}
40
+ content={
41
+ <span>
42
+ Content is a <b>JSX</b> <u>Element</u>
43
+ </span>
44
+ }
45
+ >
46
+ <Button style="secondary" label="On Click" />
47
+ </Tooltip>
48
+ </div>
49
+ );
50
+ };
51
+
52
+ export const Placements = () => {
53
+ return (
54
+ <div className="space-y-8 p-10">
55
+ <div className="flex items-center justify-start gap-8">
56
+ <Tooltip placement={"top"} content={"Tooltip"}>
57
+ <Button style="secondary" label="top" />
58
+ </Tooltip>
59
+ <Tooltip placement={"top-start"} content={"Tooltip"}>
60
+ <Button style="secondary" label="top-start" />
61
+ </Tooltip>
62
+ <Tooltip placement={"top-end"} content={"Tooltip"}>
63
+ <Button style="secondary" label="top-end" />
64
+ </Tooltip>
65
+ </div>
66
+ <div className="flex items-center justify-start gap-8">
67
+ <Tooltip placement={"right"} content={"Tooltip"}>
68
+ <Button style="secondary" label="right" />
69
+ </Tooltip>
70
+ <Tooltip placement={"right-start"} content={"Tooltip"}>
71
+ <Button style="secondary" label="right-start" />
72
+ </Tooltip>
73
+ <Tooltip placement={"right-end"} content={"Tooltip"}>
74
+ <Button style="secondary" label="right-end" />
75
+ </Tooltip>
76
+ </div>
77
+ <div className="flex items-center justify-start gap-8">
78
+ <Tooltip placement={"bottom"} content={"Tooltip"}>
79
+ <Button style="secondary" label="bottom" />
80
+ </Tooltip>
81
+ <Tooltip placement={"bottom-start"} content={"Tooltip"}>
82
+ <Button style="secondary" label="bottom-start" />
83
+ </Tooltip>
84
+ <Tooltip placement={"bottom-end"} content={"Tooltip"}>
85
+ <Button style="secondary" label="bottom-end" />
86
+ </Tooltip>
87
+ </div>
88
+ <div className="flex items-center justify-start gap-8">
89
+ <Tooltip placement={"left"} content={"Tooltip"}>
90
+ <Button style="secondary" label="left" />
91
+ </Tooltip>
92
+ <Tooltip placement={"left-start"} content={"Tooltip"}>
93
+ <Button style="secondary" label="left-start" />
94
+ </Tooltip>
95
+ <Tooltip placement={"left-end"} content={"Tooltip"}>
96
+ <Button style="secondary" label="left-end" />
97
+ </Tooltip>
98
+ </div>
99
+ </div>
100
+ );
101
+ };
102
+
103
+ export const Themes = () => {
104
+ return (
105
+ <div className="space-y-8 p-10">
106
+ <h2 className="text-xl">Theme</h2>
107
+ <div className="flex flex-row flex-wrap items-center justify-start gap-8">
108
+ <Tooltip placement={"top"} content={"Tooltip"} theme={"dark"}>
109
+ <Button style="secondary" label="dark" />
110
+ </Tooltip>
111
+ <Tooltip placement={"top"} content={"Tooltip"} theme={"light"}>
112
+ <Button style="secondary" label="light" />
113
+ </Tooltip>
114
+ </div>
115
+ </div>
116
+ );
117
+ };
@@ -0,0 +1,134 @@
1
+ import React from "react";
2
+
3
+ import Typography from "../lib/components/Typography";
4
+
5
+ export default {
6
+ title: "Foundation/Typography",
7
+ component: Typography,
8
+ parameters: {
9
+ layout: "padded",
10
+ },
11
+ };
12
+
13
+ const Template = (args) => <Typography {...args}>Typography</Typography>;
14
+
15
+ export const Heading1 = Template.bind({});
16
+ Heading1.args = {
17
+ style: "h1",
18
+ };
19
+
20
+ export const Heading2 = Template.bind({});
21
+ Heading2.args = {
22
+ style: "h2",
23
+ };
24
+
25
+ export const Heading3 = Template.bind({});
26
+ Heading3.args = {
27
+ style: "h3",
28
+ };
29
+
30
+ export const Heading4 = Template.bind({});
31
+ Heading4.args = {
32
+ style: "h4",
33
+ };
34
+
35
+ export const Heading5 = Template.bind({});
36
+ Heading5.args = {
37
+ style: "h5",
38
+ };
39
+
40
+ export const Body1 = Template.bind({});
41
+ Body1.args = {
42
+ style: "body1",
43
+ };
44
+
45
+ export const Body2 = Template.bind({});
46
+ Body2.args = {
47
+ style: "body2",
48
+ };
49
+
50
+ export const Body3 = Template.bind({});
51
+ Body3.args = {
52
+ style: "body3",
53
+ };
54
+
55
+ export const AllVariants = (args) => {
56
+ return (
57
+ <>
58
+ <Typography className="mb-4" style="h1">
59
+ h1. Heading
60
+ </Typography>
61
+ <Typography className="mb-4" style="h2">
62
+ h2. Heading
63
+ </Typography>
64
+ <Typography className="mb-4" style="h3">
65
+ h3. Heading
66
+ </Typography>
67
+ <Typography className="mb-4" style="h4">
68
+ h4. Heading
69
+ </Typography>
70
+ <Typography className="mb-4" style="h5">
71
+ h5. Heading
72
+ </Typography>
73
+ <Typography className="mb-4" style="h6">
74
+ h6. Heading
75
+ </Typography>
76
+ <Typography className="mb-4" style="body1">
77
+ body1. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quos
78
+ blanditiis tenetur
79
+ </Typography>
80
+ <Typography className="mb-4" style="body2">
81
+ body2. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quos
82
+ blanditiis tenetur
83
+ </Typography>
84
+ <Typography className="mb-4" style="body3">
85
+ body3. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quos
86
+ blanditiis tenetur
87
+ </Typography>
88
+ <div className="mb-4">
89
+ <Typography style="body3" component="del">
90
+ Represents a range of text that has been deleted from a document.
91
+ </Typography>
92
+ </div>
93
+ <div className="mb-4">
94
+ <Typography style="body3" component="ins">
95
+ Represents a range of text that has been added to a document.
96
+ </Typography>
97
+ </div>
98
+ <div className="mb-4">
99
+ <Typography style="body3" component="u">
100
+ This is rendered by default as a simple solid underline.
101
+ </Typography>
102
+ </div>
103
+ <div className="mb-4">
104
+ <Typography style="body3" component="i">
105
+ Represents a range of text that is set off from the normal text for
106
+ some reason, such as idiomatic text, technical terms, taxonomical
107
+ designations, among others.
108
+ </Typography>
109
+ </div>
110
+ <div className="mb-4">
111
+ <Typography style="body3" component="em">
112
+ Marks text that has stress emphasis
113
+ </Typography>
114
+ </div>
115
+ <div className="mb-4">
116
+ <Typography style="body3" component="strong">
117
+ Indicates that its contents have strong importance, seriousness, or
118
+ urgency.
119
+ </Typography>
120
+ </div>
121
+ <div className="mb-4">
122
+ <Typography style="body3" component="b">
123
+ Used to draw the reader's attention to the element's contents, which
124
+ are not otherwise granted special importance.
125
+ </Typography>
126
+ </div>
127
+ <div className="mb-4">
128
+ <Typography style="h4" component="code">
129
+ Code
130
+ </Typography>
131
+ </div>
132
+ </>
133
+ );
134
+ };