@bigbinary/neetoui 2.0.89 → 2.0.93

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.
Files changed (36) hide show
  1. package/package.json +2 -2
  2. package/v2/formik.js +2 -2
  3. package/v2/index.js +2 -2
  4. package/v2/layouts.js +5 -5
  5. package/stories/Alert.stories.jsx +0 -38
  6. package/stories/Avatar.stories.jsx +0 -178
  7. package/stories/Button.stories.jsx +0 -451
  8. package/stories/Callout.stories.jsx +0 -37
  9. package/stories/Checkout.stories.jsx +0 -46
  10. package/stories/Color.stories.mdx +0 -170
  11. package/stories/Dropdown.stories.jsx +0 -104
  12. package/stories/Header.stories.jsx +0 -45
  13. package/stories/HelpersBorderColor.stories.mdx +0 -162
  14. package/stories/HelpersBoxShadows.stories.mdx +0 -83
  15. package/stories/HelpersColor.stories.mdx +0 -170
  16. package/stories/Iconography.stories.jsx +0 -120
  17. package/stories/Input.stories.jsx +0 -187
  18. package/stories/Introduction.stories.mdx +0 -103
  19. package/stories/Label.stories.jsx +0 -29
  20. package/stories/Layouts.stories.jsx +0 -246
  21. package/stories/MenuBar.stories.jsx +0 -119
  22. package/stories/Modal.stories.jsx +0 -183
  23. package/stories/PageLoader.stories.jsx +0 -41
  24. package/stories/Pagination.stories.jsx +0 -26
  25. package/stories/Pane.stories.jsx +0 -67
  26. package/stories/Radio.stories.jsx +0 -34
  27. package/stories/Select.stories.jsx +0 -162
  28. package/stories/Sidebar.stories.jsx +0 -123
  29. package/stories/SubHeader.stories.jsx +0 -39
  30. package/stories/Switch.stories.jsx +0 -52
  31. package/stories/Tab.stories.jsx +0 -71
  32. package/stories/Tag.stories.jsx +0 -149
  33. package/stories/Textarea.stories.jsx +0 -55
  34. package/stories/Toastr.stories.jsx +0 -63
  35. package/stories/Tooltip.stories.jsx +0 -137
  36. package/stories/Typography.stories.jsx +0 -134
@@ -1,34 +0,0 @@
1
- import React from "react";
2
-
3
- import Radio from "../lib/components/Radio";
4
-
5
- export default {
6
- title: "Components/Radio",
7
- component: Radio,
8
- parameters: {
9
- layout: "padded",
10
- docs: {
11
- description: {
12
- component: '`import { Radio } from "@bigbinary/neetoui/v2";`',
13
- },
14
- },
15
- },
16
- };
17
-
18
- export const Options = () => {
19
- return (
20
- <Radio label="Radio Options" className="space-y-4">
21
- <Radio.Item label="option1" value="option1" />
22
- <Radio.Item label="option2" value="option2" />
23
- </Radio>
24
- );
25
- };
26
-
27
- export const OptionsStacked = () => {
28
- return (
29
- <Radio label="Radio Options Stacked" className="space-y-4" stacked>
30
- <Radio.Item label="option1" value="option1" />
31
- <Radio.Item label="option2" value="option2" />
32
- </Radio>
33
- );
34
- };
@@ -1,162 +0,0 @@
1
- import React, { useState } from "react";
2
-
3
- import Select from "../lib/components/Select";
4
-
5
- export default {
6
- title: "Components/Select",
7
- component: Select,
8
- parameters: {
9
- layout: "padded",
10
- docs: {
11
- description: {
12
- component: '`import { Select } from "@bigbinary/neetoui/v2";`',
13
- },
14
- },
15
- },
16
- };
17
-
18
- const Template = (args) => (
19
- <div className="p-4 mb-2">
20
- <Select {...args} />
21
- </div>
22
- );
23
-
24
- export const Single = Template.bind({});
25
- Single.args = {
26
- label: "Select",
27
- defaultValue: { value: "value3", label: "Value Three" },
28
- placeholder: "Select an Option",
29
- isDisabled: false,
30
- isClearable: true,
31
- isSearchable: true,
32
- name: "ValueList",
33
- options: [
34
- { value: "value1", label: "Value One" },
35
- { value: "value2", label: "Value Two" },
36
- { value: "value3", label: "Value Three" },
37
- { value: "value4", label: "Value Four" },
38
- { value: "value5", label: "Value Five" },
39
- ],
40
- };
41
-
42
- export const Multi = Template.bind({});
43
- Multi.args = {
44
- label: "Multi Select",
45
- isMulti: true,
46
- defaultValue: [
47
- { value: "value3", label: "Value Three" },
48
- { value: "value5", label: "Value Five" },
49
- ],
50
- placeholder: "Select an Option",
51
- name: "ValueList",
52
- options: [
53
- { value: "value1", label: "Value One" },
54
- { value: "value2", label: "Value Two" },
55
- { value: "value3", label: "Value Three" },
56
- { value: "value4", label: "Value Four" },
57
- { value: "value5", label: "Value Five" },
58
- ],
59
- };
60
-
61
- export const Grouped = Template.bind({});
62
- Grouped.args = {
63
- label: "Grouped Select",
64
- isMulti: true,
65
- defaultValue: [
66
- { value: "value3", label: "Value Three" },
67
- { value: "value7", label: "Value Seven" },
68
- ],
69
- placeholder: "Select an Option",
70
- name: "ValueList",
71
- options: [
72
- {
73
- label: "Group A",
74
- options: [
75
- { value: "value1", label: "Value One" },
76
- { value: "value2", label: "Value Two" },
77
- { value: "value3", label: "Value Three" },
78
- { value: "value4", label: "Value Four" },
79
- { value: "value5", label: "Value Five" },
80
- ],
81
- },
82
- {
83
- label: "Group B",
84
- options: [
85
- { value: "value6", label: "Value Six" },
86
- { value: "value7", label: "Value Seven" },
87
- { value: "value8", label: "Value Eight" },
88
- { value: "value9", label: "Value Nine" },
89
- { value: "value10", label: "Value Ten" },
90
- ],
91
- },
92
- ],
93
- };
94
-
95
- export const Creatable = () => {
96
- const [options, setOptions] = useState([
97
- { value: "value1", label: "Value One" },
98
- { value: "value2", label: "Value Two" },
99
- { value: "value3", label: "Value Three" },
100
- { value: "value4", label: "Value Four" },
101
- { value: "value5", label: "Value Five" },
102
- ]);
103
-
104
- return (
105
- <div className="p-4 mb-2">
106
- <Select
107
- label="Grouped Select"
108
- isCreateable
109
- defaultValue={[{ value: "value3", label: "Value Three" }]}
110
- placeholder="Select an Option"
111
- onCreateOption={(inputValue) =>
112
- setOptions([...options, { label: inputValue, value: inputValue }])
113
- }
114
- name="ValueList"
115
- defaultOptions={options}
116
- />
117
- </div>
118
- );
119
- };
120
-
121
- export const AllVariants = () => {
122
- return (
123
- <div className="w-full">
124
- <div className="p-6 space-y-6">
125
- <div className="p-4 space-y-8 border border-indigo-500 border-dashed">
126
- <h2 className="text-xl">Select/Large</h2>
127
- <div className="flex flex-row items-center justify-center space-x-8">
128
- <Select placeholder="Select Placeholder" />
129
- </div>
130
- <div className="flex flex-row items-center justify-center space-x-8">
131
- <Select placeholder="Select Placeholder" />
132
- </div>
133
- <div className="flex flex-row items-center justify-center space-x-8">
134
- <Select placeholder="Select Placeholder" isDisabled />
135
- </div>
136
- <div className="flex flex-row items-center justify-center space-x-8">
137
- <Select placeholder="Select Placeholder" error="This is an error" />
138
- </div>
139
- </div>
140
- <div className="p-4 space-y-8 border border-indigo-500 border-dashed">
141
- <h2 className="text-xl">Select/Small</h2>
142
- <div className="flex flex-row items-center justify-center space-x-8">
143
- <Select placeholder="Select Placeholder" size="small" />
144
- </div>
145
- <div className="flex flex-row items-center justify-center space-x-8">
146
- <Select placeholder="Select Placeholder" size="small" />
147
- </div>
148
- <div className="flex flex-row items-center justify-center space-x-8">
149
- <Select placeholder="Select Placeholder" size="small" isDisabled />
150
- </div>
151
- <div className="flex flex-row items-center justify-center space-x-8">
152
- <Select
153
- placeholder="Select Placeholder"
154
- size="small"
155
- error="This is an error"
156
- />
157
- </div>
158
- </div>
159
- </div>
160
- </div>
161
- );
162
- };
@@ -1,123 +0,0 @@
1
- import React, { useState } from "react";
2
- import { BrowserRouter as Router, Route, Switch } from "react-router-dom";
3
-
4
- import Sidebar from "../lib/components/layouts/Sidebar";
5
- import AppSwitcher from "../lib/components/layouts/AppSwitcher";
6
- import { NAV_LINKS, COMPONENT_MAPPING } from "../example/src/constants";
7
-
8
- export default {
9
- title: "Layouts/Sidebar",
10
- component: Sidebar,
11
- parameters: {
12
- layout: "fullscreen",
13
- docs: {
14
- description: {
15
- component: '`import { Sidebar } from "@bigbinary/neetoui/v2/layouts";`',
16
- },
17
- },
18
- },
19
- };
20
-
21
- const Template = (args) => {
22
- let ROUTER_LINKS = [];
23
- NAV_LINKS.map((navLink) => {
24
- if (navLink.items) {
25
- navLink.items.map((item) => {
26
- ROUTER_LINKS.push(item);
27
- });
28
- } else {
29
- ROUTER_LINKS.push(navLink);
30
- }
31
- });
32
- return (
33
- <Router>
34
- <div className="flex flex-row items-start justify-start">
35
- <Sidebar {...args} />
36
- <div className="relative flex flex-col flex-grow h-screen overflow-auto">
37
- <Switch>
38
- {ROUTER_LINKS &&
39
- ROUTER_LINKS.map(({ label, to }, index) => {
40
- return (
41
- <Route
42
- key={index}
43
- path={to}
44
- component={COMPONENT_MAPPING[label]}
45
- />
46
- );
47
- })}
48
- </Switch>
49
- </div>
50
- </div>
51
- </Router>
52
- );
53
- };
54
-
55
- export const Sidenav = Template.bind({});
56
- Sidenav.args = {
57
- organizationInfo: {
58
- name: "neetoUI",
59
- subdomain: "neetoui.netlify.app",
60
- },
61
- navLinks: NAV_LINKS,
62
- profileInfo: {
63
- name: "Kieran Miller",
64
- imageUrl: "https://randomuser.me/api/portraits/women/90.jpg",
65
- dropdownProps: [
66
- {
67
- label: "Edit",
68
- onClick: () => {},
69
- },
70
- {
71
- label: "Logout",
72
- onClick: () => {},
73
- },
74
- ],
75
- },
76
- showAppSwitcher: true,
77
- appName: "neetoUI",
78
- };
79
-
80
- export const SidebarWithAppSwitcher = (args) => {
81
- const [isAppSwitcherOpen, setIsAppSwitcherOpen] = useState(false);
82
-
83
- return (
84
- <Router>
85
- <Sidebar
86
- {...args}
87
- onAppSwitcherToggle={() => setIsAppSwitcherOpen((isOpen) => !isOpen)}
88
- toggleAppSwitcher={isAppSwitcherOpen}
89
- />
90
- <AppSwitcher
91
- isOpen={isAppSwitcherOpen}
92
- onClose={() => setIsAppSwitcherOpen(false)}
93
- v2
94
- />
95
- </Router>
96
- );
97
- };
98
-
99
- SidebarWithAppSwitcher.storyName = "Sidebar with AppSwitcher"
100
- SidebarWithAppSwitcher.args = {
101
- organizationInfo: {
102
- name: "neetoUI",
103
- subdomain: "neetoui.netlify.app",
104
- },
105
- navLinks: NAV_LINKS,
106
- profileInfo: {
107
- name: "Kieran Miller",
108
- email: "kieranmiller@gmail.com",
109
- imageUrl: "https://randomuser.me/api/portraits/women/90.jpg",
110
- dropdownProps: [
111
- {
112
- label: "Edit",
113
- onClick: () => {},
114
- },
115
- {
116
- label: "Logout",
117
- onClick: () => {},
118
- },
119
- ],
120
- },
121
- showAppSwitcher: true,
122
- appName: "neetoUI",
123
- };
@@ -1,39 +0,0 @@
1
- import React, { useState } from "react";
2
-
3
- import SubHeader from "../lib/components/layouts/SubHeader";
4
-
5
- export default {
6
- title: "Layouts/SubHeader",
7
- component: SubHeader,
8
- parameters: {
9
- layout: "padded",
10
- docs: {
11
- description: {
12
- component:
13
- '`import { SubHeader } from "@bigbinary/neetoui/v2/layouts";`',
14
- },
15
- },
16
- },
17
- };
18
-
19
- export const BasicUsage = () => {
20
- const [searchString, setSearchString] = useState("")
21
- return (
22
- <SubHeader
23
- searchProps={{
24
- value: searchString,
25
- onChange: (e) => setSearchString(e.target.value),
26
- }}
27
- deleteButtonProps={{
28
- count: 0,
29
- selectedIDs: [],
30
- onClick: () => {},
31
- }}
32
- disableButtonProps={{
33
- count: 0,
34
- selectedIDs: [],
35
- onClick: () => {},
36
- }}
37
- />
38
- )
39
- }
@@ -1,52 +0,0 @@
1
- import React from "react";
2
-
3
- import Switch from "../lib/components/Switch";
4
-
5
- export default {
6
- title: "Components/Switch",
7
- component: Switch,
8
- parameters: {
9
- layout: "padded",
10
- docs: {
11
- description: {
12
- component: '`import { Switch } from "@bigbinary/neetoui/v2";`',
13
- },
14
- },
15
- },
16
- };
17
-
18
- const Template = (args) => (
19
- <div className="p-4">
20
- <Switch {...args} />
21
- </div>
22
- );
23
-
24
- export const CheckedState = Template.bind({});
25
- CheckedState.args = {
26
- checked: true,
27
- };
28
-
29
- export const UncheckedState = Template.bind({});
30
- UncheckedState.args = {
31
- checked: false,
32
- };
33
-
34
- export const DisabledState = Template.bind({});
35
- DisabledState.args = {
36
- disabled: true,
37
- };
38
-
39
- export const WithLabel = Template.bind({});
40
- WithLabel.args = {
41
- label: "Switch Label Example",
42
- };
43
-
44
- export const WithCustomLabel = Template.bind({});
45
- WithCustomLabel.args = {
46
- label: <span className="neeto-ui-text-info">Custom Label Example</span>,
47
- };
48
-
49
- export const WithChangeListner = Template.bind({});
50
- WithChangeListner.args = {
51
- onChange: (e) => alert("Callback invoked"),
52
- };
@@ -1,71 +0,0 @@
1
- import React, { useState } from "react";
2
-
3
- import Tab from "../lib/components/Tab";
4
-
5
- export default {
6
- title: "Components/Tab",
7
- component: Tab,
8
- parameters: {
9
- layout: "padded",
10
- docs: {
11
- description: {
12
- component: '`import { Tab } from "@bigbinary/neetoui/v2";`',
13
- },
14
- },
15
- },
16
- };
17
-
18
- const Template = (args) => (
19
- <Tab {...args}>
20
- <Tab.Item active="true">Label</Tab.Item>
21
- <Tab.Item>Label</Tab.Item>
22
- </Tab>
23
- );
24
-
25
- export const Default = Template.bind({});
26
-
27
- export const Large = Template.bind({});
28
- Large.args = {
29
- size: "large",
30
- };
31
-
32
- export const LargeWithoutUnderline = Template.bind({});
33
- LargeWithoutUnderline.args = {
34
- size: "large",
35
- noUnderline: true,
36
- };
37
-
38
- export const TwoItems = () => {
39
- const [tab, setTab] = useState(true);
40
- return (
41
- <Tab>
42
- <Tab.Item active={tab} onClick={() => setTab(true)}>
43
- Label
44
- </Tab.Item>
45
- <Tab.Item active={!tab} onClick={() => setTab(false)}>
46
- Label
47
- </Tab.Item>
48
- </Tab>
49
- );
50
- };
51
-
52
- export const ThreeItems = () => {
53
- return (
54
- <Tab>
55
- <Tab.Item active>Label</Tab.Item>
56
- <Tab.Item>Label</Tab.Item>
57
- <Tab.Item>Label</Tab.Item>
58
- </Tab>
59
- );
60
- };
61
-
62
- export const FourItems = () => {
63
- return (
64
- <Tab>
65
- <Tab.Item active>Label</Tab.Item>
66
- <Tab.Item>Label</Tab.Item>
67
- <Tab.Item>Label</Tab.Item>
68
- <Tab.Item>Label</Tab.Item>
69
- </Tab>
70
- );
71
- };
@@ -1,149 +0,0 @@
1
- import React from "react";
2
- import { Favorite } from "@bigbinary/neeto-icons";
3
-
4
- import Tag from "../lib/components/Tag";
5
-
6
- export default {
7
- title: "Components/Tag",
8
- component: Tag,
9
- parameters: {
10
- layout: "padded",
11
- docs: {
12
- description: {
13
- component: '`import { Tag } from "@bigbinary/neetoui/v2";`',
14
- },
15
- },
16
- },
17
- };
18
-
19
- const Template = (args) => <Tag {...args} />;
20
-
21
- export const Default = Template.bind({});
22
- Default.args = {
23
- label: "Label",
24
- };
25
-
26
- export const TagColorStory = (props) => (
27
- <div className="p-6">
28
- <Tag {...props} />
29
- </div>
30
- );
31
-
32
- TagColorStory.storyName = "Tag with Color";
33
- TagColorStory.args = {
34
- color: "green",
35
- style: "outline",
36
- label: "Label",
37
- size: "large",
38
- onClose: null,
39
- };
40
-
41
- export const AllVariants = () => {
42
- const onClose = () => alert("onClose Triggered!");
43
-
44
- return (
45
- <div className="p-6">
46
- <div className="p-4 space-y-8 border border-indigo-500 border-dashed">
47
- <div className="flex flex-col p-2 space-y-6">
48
- <div className="flex flex-row items-start justify-start space-x-4">
49
- <h5>Outline Small: </h5>
50
- <Tag label="Label" />
51
- <Tag icon={Favorite} label="Label" />
52
- <Tag onClose={onClose} label="Label" />
53
- <Tag icon={Favorite} onClose={onClose} label="Label" />
54
- </div>
55
- <div className="flex flex-row items-start justify-start space-x-4">
56
- <h5>Outline Large: </h5>
57
- <Tag size="large" label="Label" />
58
- <Tag size="large" icon={Favorite} label="Label" />
59
- <Tag size="large" onClose={onClose} label="Label" />
60
- <Tag size="large" icon={Favorite} onClose={onClose} label="Label" />
61
- </div>
62
- <div className="flex flex-row items-start justify-start space-x-4">
63
- <h5>Colored Outline Large : </h5>
64
- <Tag
65
- style="outline"
66
- size="large"
67
- color="grey"
68
- icon={Favorite}
69
- onClose={onClose}
70
- label="Label"
71
- />
72
- <Tag style="outline" size="large" color="red" label="Label" />
73
- <Tag
74
- style="outline"
75
- size="large"
76
- color="green"
77
- icon={Favorite}
78
- label="Label"
79
- />
80
- <Tag
81
- style="outline"
82
- size="large"
83
- color="blue"
84
- onClose={onClose}
85
- label="Label"
86
- />
87
- <Tag
88
- style="outline"
89
- size="large"
90
- color="yellow"
91
- icon={Favorite}
92
- onClose={onClose}
93
- label="Label"
94
- />
95
- </div>
96
- <div className="flex flex-row items-start justify-start space-x-4">
97
- <h5>Solid Small: </h5>
98
- <Tag style="solid" label="Label" />
99
- <Tag style="solid" icon={Favorite} label="Label" />
100
- <Tag style="solid" onClose={onClose} label="Label" />
101
- <Tag
102
- style="solid"
103
- icon={Favorite}
104
- onClose={onClose}
105
- label="Label"
106
- />
107
- </div>
108
- <div className="flex flex-row items-start justify-start space-x-4">
109
- <h5>Solid Large : </h5>
110
- <Tag style="solid" size="large" label="Label" />
111
- <Tag style="solid" size="large" icon={Favorite} label="Label" />
112
- <Tag style="solid" size="large" onClose={onClose} label="Label" />
113
- <Tag
114
- style="solid"
115
- size="large"
116
- icon={Favorite}
117
- onClose={onClose}
118
- label="Label"
119
- />
120
- </div>
121
- <div className="flex flex-row items-start justify-start space-x-4">
122
- <h5>Solid With Colors : </h5>
123
- <Tag size="large" style="solid" label="Label" color="grey" />
124
- <Tag size="large" style="solid" label="Label" color="red" />
125
- <Tag size="large" style="solid" label="Label" color="green" />
126
- <Tag size="large" style="solid" label="Label" color="blue" />
127
- <Tag size="large" style="solid" label="Label" color="yellow" />
128
- </div>
129
- <div className="flex flex-row items-start justify-start space-x-4">
130
- <h5>With Indicator : </h5>
131
- <Tag label="Label" indicatorColor="green" />
132
- <Tag label="Label" indicatorColor="yellow" />
133
- <Tag label="Label" indicatorColor="blue" />
134
- <Tag label="Label" indicatorColor="red" />
135
- <Tag label="Label" indicatorColor="grey" />
136
- </div>
137
- <div className="flex flex-row items-start justify-start space-x-4">
138
- <h5>With Indicator Large : </h5>
139
- <Tag size="large" label="Label" indicatorColor="green" />
140
- <Tag size="large" label="Label" indicatorColor="yellow" />
141
- <Tag size="large" label="Label" indicatorColor="blue" />
142
- <Tag size="large" label="Label" indicatorColor="red" />
143
- <Tag size="large" label="Label" indicatorColor="grey" />
144
- </div>
145
- </div>
146
- </div>
147
- </div>
148
- );
149
- };
@@ -1,55 +0,0 @@
1
- import React, { useState } from "react";
2
-
3
- import Textarea from "../lib/components/Textarea";
4
-
5
- export default {
6
- title: "Components/Textarea",
7
- component: Textarea,
8
- parameters: {
9
- layout: "padded",
10
- docs: {
11
- description: {
12
- component: '`import { Textarea } from "@bigbinary/neetoui/v2";`',
13
- },
14
- },
15
- },
16
- };
17
-
18
- const Template = (args) => <Textarea {...args} />;
19
-
20
- export const BasicUsage = Template.bind({});
21
- BasicUsage.args = {
22
- label: "Textarea",
23
- placeholder: "Enter text",
24
- };
25
-
26
- export const Controlled = () => {
27
- const [value, setValue] = useState("BigBinary");
28
- return (
29
- <Textarea
30
- label="Controlled Input"
31
- value={value}
32
- onChange={(e) => setValue(e.target.value)}
33
- />
34
- );
35
- };
36
-
37
- export const Required = () => (
38
- <Textarea label="Required Textarea" required={true} />
39
- );
40
-
41
- export const Disabled = () => (
42
- <Textarea label="Disabled Textarea" disabled={true} />
43
- );
44
-
45
- export const Error = () => (
46
- <Textarea label="Error" error="Provide valid email" />
47
- );
48
-
49
- export const HelpText = () => (
50
- <Textarea label="Name" helpText="This is help text props to the component." />
51
- );
52
-
53
- export const NakedInput = () => (
54
- <Textarea label="Naked Textarea Field" nakedTextarea={true} />
55
- );