oneslash-design-system 1.2.24 → 1.2.25

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 (81) hide show
  1. package/dist/components/alert.d.ts +4 -2
  2. package/dist/components/alert.jsx +18 -13
  3. package/dist/components/button.d.ts +2 -1
  4. package/dist/components/button.jsx +5 -2
  5. package/dist/components/checkBox.d.ts +2 -1
  6. package/dist/components/checkBox.jsx +13 -6
  7. package/dist/components/emptyBox.d.ts +2 -1
  8. package/dist/components/emptyBox.jsx +9 -4
  9. package/dist/components/icon.d.ts +12 -0
  10. package/dist/components/icon.jsx +30 -0
  11. package/dist/components/line.d.ts +7 -0
  12. package/dist/components/line.jsx +10 -0
  13. package/dist/components/menuItem.d.ts +2 -1
  14. package/dist/components/menuItem.jsx +9 -4
  15. package/dist/components/modal.d.ts +3 -2
  16. package/dist/components/modal.jsx +43 -23
  17. package/dist/components/radioGroup.d.ts +1 -0
  18. package/dist/components/radioGroup.jsx +4 -1
  19. package/dist/components/tab.d.ts +6 -1
  20. package/dist/components/tab.jsx +11 -9
  21. package/dist/components/tabsContainer.jsx +4 -1
  22. package/dist/components/tag.d.ts +6 -3
  23. package/dist/components/tag.jsx +88 -28
  24. package/dist/components/textField.d.ts +5 -2
  25. package/dist/components/textField.jsx +29 -16
  26. package/dist/components/textarea.d.ts +4 -2
  27. package/dist/components/textarea.jsx +31 -11
  28. package/dist/output.css +537 -446
  29. package/dist/stories/Alert.stories.d.ts +15 -0
  30. package/dist/stories/Alert.stories.jsx +121 -0
  31. package/dist/stories/Button.stories.d.ts +12 -0
  32. package/dist/stories/Button.stories.jsx +81 -0
  33. package/dist/stories/Checkbox.stories.d.ts +10 -0
  34. package/dist/stories/Checkbox.stories.jsx +45 -0
  35. package/dist/stories/EmptyBox.stories.d.ts +7 -0
  36. package/dist/stories/EmptyBox.stories.jsx +30 -0
  37. package/dist/stories/Icon.stories.d.ts +13 -0
  38. package/dist/stories/Icon.stories.jsx +130 -0
  39. package/dist/stories/IconButton.stories.d.ts +13 -0
  40. package/dist/stories/IconButton.stories.jsx +87 -0
  41. package/dist/stories/Line.stories.d.ts +9 -0
  42. package/dist/stories/Line.stories.jsx +64 -0
  43. package/dist/stories/Link.stories.d.ts +10 -0
  44. package/dist/stories/Link.stories.jsx +59 -0
  45. package/dist/stories/LoadingScreen.stories.d.ts +10 -0
  46. package/dist/stories/LoadingScreen.stories.jsx +39 -0
  47. package/dist/stories/Menu.stories.d.ts +8 -0
  48. package/dist/stories/Menu.stories.jsx +42 -0
  49. package/dist/stories/MenuItem.stories.d.ts +11 -0
  50. package/dist/stories/MenuItem.stories.jsx +62 -0
  51. package/dist/stories/Modal.stories.d.ts +10 -0
  52. package/dist/stories/Modal.stories.jsx +77 -0
  53. package/dist/stories/Navigation.stories.d.ts +7 -0
  54. package/dist/stories/Navigation.stories.jsx +31 -0
  55. package/dist/stories/Popover.stories.d.ts +7 -0
  56. package/dist/stories/Popover.stories.jsx +47 -0
  57. package/dist/stories/RadioGroup.stories.d.ts +8 -0
  58. package/dist/stories/RadioGroup.stories.jsx +53 -0
  59. package/dist/stories/Select.stories.d.ts +10 -0
  60. package/dist/stories/Select.stories.jsx +85 -0
  61. package/dist/stories/Tab.stories.d.ts +11 -0
  62. package/dist/stories/Tab.stories.jsx +63 -0
  63. package/dist/stories/Table.stories.d.ts +8 -0
  64. package/dist/stories/Table.stories.jsx +84 -0
  65. package/dist/stories/TabsContainer.stories.d.ts +10 -0
  66. package/dist/stories/TabsContainer.stories.jsx +52 -0
  67. package/dist/stories/Tag.stories.d.ts +17 -0
  68. package/dist/stories/Tag.stories.jsx +143 -0
  69. package/dist/stories/TextField.stories.d.ts +13 -0
  70. package/dist/stories/TextField.stories.jsx +96 -0
  71. package/dist/stories/Textarea.stories.d.ts +12 -0
  72. package/dist/stories/Textarea.stories.jsx +84 -0
  73. package/dist/stories/TimeStamp.stories.d.ts +16 -0
  74. package/dist/stories/TimeStamp.stories.jsx +140 -0
  75. package/dist/stories/Tooltip.stories.d.ts +9 -0
  76. package/dist/stories/Tooltip.stories.jsx +52 -0
  77. package/dist/stories/UserImage.stories.d.ts +10 -0
  78. package/dist/stories/UserImage.stories.jsx +46 -0
  79. package/dist/tailwind.config.js +1 -0
  80. package/dist/tsconfig.tsbuildinfo +1 -1
  81. package/package.json +10 -3
@@ -0,0 +1,59 @@
1
+ import React from "react";
2
+ import Link from "../components/link";
3
+ var meta = {
4
+ title: "Components/Link",
5
+ component: Link,
6
+ argTypes: {
7
+ href: { control: "text" },
8
+ color: {
9
+ control: "select",
10
+ options: ["info", "error", "warning", "success"],
11
+ },
12
+ size: {
13
+ control: "select",
14
+ options: ["h1", "h2", "h3", "h4", "h5", "h6", "subtitle1", "subtitle2", "body1", "body2", "caption"],
15
+ },
16
+ openInNewTab: { control: "boolean" },
17
+ },
18
+ };
19
+ export default meta;
20
+ export var Info = {
21
+ args: {
22
+ href: "https://example.com",
23
+ children: "Info Link",
24
+ color: "info",
25
+ size: "body1",
26
+ },
27
+ };
28
+ export var Error = {
29
+ args: {
30
+ href: "https://example.com",
31
+ children: "Error Link",
32
+ color: "error",
33
+ size: "body1",
34
+ },
35
+ };
36
+ export var Warning = {
37
+ args: {
38
+ href: "https://example.com",
39
+ children: "Warning Link",
40
+ color: "warning",
41
+ size: "body1",
42
+ },
43
+ };
44
+ export var Success = {
45
+ args: {
46
+ href: "https://example.com",
47
+ children: "Success Link",
48
+ color: "success",
49
+ size: "body1",
50
+ },
51
+ };
52
+ export var AllColors = {
53
+ render: function () { return (<div style={{ display: "flex", gap: "16px" }}>
54
+ <Link href="https://example.com" color="info">Info</Link>
55
+ <Link href="https://example.com" color="error">Error</Link>
56
+ <Link href="https://example.com" color="warning">Warning</Link>
57
+ <Link href="https://example.com" color="success">Success</Link>
58
+ </div>); },
59
+ };
@@ -0,0 +1,10 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import LoadingScreen, { LoadingSmall } from "../components/loadingScreen";
3
+ declare const meta: Meta<typeof LoadingScreen>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof LoadingScreen>;
6
+ export declare const Default: Story;
7
+ export declare const Small: StoryObj<typeof LoadingSmall>;
8
+ export declare const Medium: StoryObj<typeof LoadingSmall>;
9
+ export declare const Large: StoryObj<typeof LoadingSmall>;
10
+ export declare const AllSizes: Story;
@@ -0,0 +1,39 @@
1
+ import React from "react";
2
+ import LoadingScreen, { LoadingSmall } from "../components/loadingScreen";
3
+ var meta = {
4
+ title: "Components/LoadingScreen",
5
+ component: LoadingScreen,
6
+ };
7
+ export default meta;
8
+ export var Default = {
9
+ decorators: [
10
+ function (Story) { return (<div style={{ height: "300px" }}>
11
+ <Story />
12
+ </div>); },
13
+ ],
14
+ };
15
+ export var Small = {
16
+ render: function () { return <LoadingSmall size="small"/>; },
17
+ };
18
+ export var Medium = {
19
+ render: function () { return <LoadingSmall size="medium"/>; },
20
+ };
21
+ export var Large = {
22
+ render: function () { return <LoadingSmall size="large"/>; },
23
+ };
24
+ export var AllSizes = {
25
+ render: function () { return (<div style={{ display: "flex", gap: "24px", alignItems: "center" }}>
26
+ <div>
27
+ <p style={{ marginBottom: "8px" }}>Small</p>
28
+ <LoadingSmall size="small"/>
29
+ </div>
30
+ <div>
31
+ <p style={{ marginBottom: "8px" }}>Medium</p>
32
+ <LoadingSmall size="medium"/>
33
+ </div>
34
+ <div>
35
+ <p style={{ marginBottom: "8px" }}>Large</p>
36
+ <LoadingSmall size="large"/>
37
+ </div>
38
+ </div>); },
39
+ };
@@ -0,0 +1,8 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import Menu from "../components/menu";
3
+ declare const meta: Meta<typeof Menu>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Menu>;
6
+ export declare const Default: Story;
7
+ export declare const WithSelectedItem: Story;
8
+ export declare const WithTags: Story;
@@ -0,0 +1,42 @@
1
+ import React from "react";
2
+ import Menu from "../components/menu";
3
+ import MenuItem from "../components/menuItem";
4
+ var meta = {
5
+ title: "Components/Menu",
6
+ component: Menu,
7
+ argTypes: {
8
+ width: { control: "text" },
9
+ },
10
+ };
11
+ export default meta;
12
+ export var Default = {
13
+ render: function (args) { return (<Menu {...args}>
14
+ <MenuItem label="Profile" iconName="User"/>
15
+ <MenuItem label="Settings" iconName="Settings"/>
16
+ <MenuItem label="Logout" iconName="LogOut"/>
17
+ </Menu>); },
18
+ args: {
19
+ width: 200,
20
+ },
21
+ };
22
+ export var WithSelectedItem = {
23
+ render: function (args) { return (<Menu {...args}>
24
+ <MenuItem label="Dashboard" iconName="Home"/>
25
+ <MenuItem label="Projects" iconName="Folder" isSelected/>
26
+ <MenuItem label="Team" iconName="Users"/>
27
+ <MenuItem label="Settings" iconName="Settings"/>
28
+ </Menu>); },
29
+ args: {
30
+ width: 200,
31
+ },
32
+ };
33
+ export var WithTags = {
34
+ render: function (args) { return (<Menu {...args}>
35
+ <MenuItem label="Inbox" iconName="Mail" tag={{ label: "12" }}/>
36
+ <MenuItem label="Notifications" iconName="Bell" tag={{ label: "New" }}/>
37
+ <MenuItem label="Messages" iconName="MessageSquare"/>
38
+ </Menu>); },
39
+ args: {
40
+ width: 220,
41
+ },
42
+ };
@@ -0,0 +1,11 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import MenuItem from "../components/menuItem";
3
+ declare const meta: Meta<typeof MenuItem>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof MenuItem>;
6
+ export declare const Default: Story;
7
+ export declare const Selected: Story;
8
+ export declare const WithRightIcon: Story;
9
+ export declare const WithTag: Story;
10
+ export declare const WithUserImage: Story;
11
+ export declare const LargeSize: Story;
@@ -0,0 +1,62 @@
1
+ import MenuItem from "../components/menuItem";
2
+ var meta = {
3
+ title: "Components/MenuItem",
4
+ component: MenuItem,
5
+ argTypes: {
6
+ label: { control: "text" },
7
+ iconName: { control: "text" },
8
+ isSelected: { control: "boolean" },
9
+ size: {
10
+ control: "select",
11
+ options: ["medium", "large"],
12
+ },
13
+ iconRight: { control: "text" },
14
+ },
15
+ };
16
+ export default meta;
17
+ export var Default = {
18
+ args: {
19
+ label: "Menu Item",
20
+ iconName: "File",
21
+ isSelected: false,
22
+ },
23
+ };
24
+ export var Selected = {
25
+ args: {
26
+ label: "Selected Item",
27
+ iconName: "Check",
28
+ isSelected: true,
29
+ },
30
+ };
31
+ export var WithRightIcon = {
32
+ args: {
33
+ label: "Expandable Item",
34
+ iconName: "Folder",
35
+ iconRight: "ChevronRight",
36
+ isSelected: false,
37
+ },
38
+ };
39
+ export var WithTag = {
40
+ args: {
41
+ label: "Notifications",
42
+ iconName: "Bell",
43
+ tag: { label: "5", iconName: "Star" },
44
+ isSelected: false,
45
+ },
46
+ };
47
+ export var WithUserImage = {
48
+ args: {
49
+ label: "John Doe",
50
+ userHandle: "johndoe",
51
+ userImgUrl: "",
52
+ isSelected: false,
53
+ },
54
+ };
55
+ export var LargeSize = {
56
+ args: {
57
+ label: "Large Menu Item",
58
+ iconName: "Settings",
59
+ size: "large",
60
+ isSelected: false,
61
+ },
62
+ };
@@ -0,0 +1,10 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import Modal from "../components/modal";
3
+ declare const meta: Meta<typeof Modal>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Modal>;
6
+ export declare const Default: Story;
7
+ export declare const Large: Story;
8
+ export declare const NoTitle: Story;
9
+ export declare const WithActions: Story;
10
+ export declare const LongContent: Story;
@@ -0,0 +1,77 @@
1
+ import React, { useState } from "react";
2
+ import Modal from "../components/modal";
3
+ import Button from "../components/button";
4
+ var meta = {
5
+ title: "Components/Modal",
6
+ component: Modal,
7
+ argTypes: {
8
+ title: { control: "text" },
9
+ size: {
10
+ control: "select",
11
+ options: ["small", "medium", "large"],
12
+ },
13
+ },
14
+ };
15
+ export default meta;
16
+ var ModalWrapper = function (args) {
17
+ var _a = useState(false), isOpen = _a[0], setIsOpen = _a[1];
18
+ return (<div>
19
+ <Button size="medium" type="primary" state="enabled" label="Open Modal" onClickButton={function () { return setIsOpen(true); }}/>
20
+ <Modal {...args} isOpen={isOpen} onClose={function () { return setIsOpen(false); }}>
21
+ {args.children}
22
+ </Modal>
23
+ </div>);
24
+ };
25
+ export var Default = {
26
+ render: function (args) { return <ModalWrapper {...args}/>; },
27
+ args: {
28
+ title: "Modal Title",
29
+ children: "This is the modal content. You can put any content here.",
30
+ size: "medium",
31
+ actions: (<div style={{ display: "flex", gap: "8px" }}>
32
+ <Button size="medium" type="tertiary" state="enabled" label="Cancel"/>
33
+ <Button size="medium" type="primary" state="enabled" label="Confirm"/>
34
+ </div>),
35
+ },
36
+ };
37
+ export var Large = {
38
+ render: function (args) { return <ModalWrapper {...args}/>; },
39
+ args: {
40
+ title: "Large Modal",
41
+ children: "This is a larger modal for more complex content.",
42
+ size: "large",
43
+ },
44
+ };
45
+ export var NoTitle = {
46
+ render: function (args) { return <ModalWrapper {...args}/>; },
47
+ args: {
48
+ children: "Modal without a title. Content goes directly here.",
49
+ size: "medium",
50
+ },
51
+ };
52
+ export var WithActions = {
53
+ render: function (args) { return <ModalWrapper {...args}/>; },
54
+ args: {
55
+ title: "Confirm Action",
56
+ children: "Are you sure you want to proceed with this action?",
57
+ size: "medium",
58
+ actions: (<div style={{ display: "flex", gap: "8px", justifyContent: "flex-end", width: "100%" }}>
59
+ <Button size="medium" type="tertiary" state="enabled" label="Cancel"/>
60
+ <Button size="medium" type="primary" state="enabled" label="Delete"/>
61
+ </div>),
62
+ },
63
+ };
64
+ var longContent = (<div>
65
+ {Array.from({ length: 30 }, function (_, i) { return (<p key={i}>
66
+ This is paragraph {i + 1}. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
67
+ Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
68
+ </p>); })}
69
+ </div>);
70
+ export var LongContent = {
71
+ render: function (args) { return <ModalWrapper {...args}/>; },
72
+ args: {
73
+ title: "Scrollable Modal",
74
+ children: longContent,
75
+ size: "medium",
76
+ },
77
+ };
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import Navigation from "../components/navigation";
3
+ declare const meta: Meta<typeof Navigation>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Navigation>;
6
+ export declare const Default: Story;
7
+ export declare const WithNestedItems: Story;
@@ -0,0 +1,31 @@
1
+ import React from "react";
2
+ import Navigation from "../components/navigation";
3
+ import MenuItem from "../components/menuItem";
4
+ var meta = {
5
+ title: "Components/Navigation",
6
+ component: Navigation,
7
+ };
8
+ export default meta;
9
+ export var Default = {
10
+ render: function () { return (<div style={{ height: "400px" }}>
11
+ <Navigation>
12
+ <MenuItem label="Home" iconName="Home" isSelected/>
13
+ <MenuItem label="Projects" iconName="Folder"/>
14
+ <MenuItem label="Team" iconName="Users"/>
15
+ <MenuItem label="Calendar" iconName="Calendar"/>
16
+ <MenuItem label="Settings" iconName="Settings"/>
17
+ </Navigation>
18
+ </div>); },
19
+ };
20
+ export var WithNestedItems = {
21
+ render: function () { return (<div style={{ height: "500px" }}>
22
+ <Navigation>
23
+ <MenuItem label="Dashboard" iconName="LayoutDashboard" isSelected/>
24
+ <MenuItem label="Projects" iconName="Folder" iconRight="ChevronRight"/>
25
+ <MenuItem label="Tasks" iconName="CheckSquare" tag={{ label: "5" }}/>
26
+ <MenuItem label="Messages" iconName="MessageSquare" tag={{ label: "12" }}/>
27
+ <MenuItem label="Reports" iconName="BarChart2"/>
28
+ <MenuItem label="Settings" iconName="Settings"/>
29
+ </Navigation>
30
+ </div>); },
31
+ };
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import Popover from "../components/popover";
3
+ declare const meta: Meta<typeof Popover>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Popover>;
6
+ export declare const Default: Story;
7
+ export declare const WithMenu: Story;
@@ -0,0 +1,47 @@
1
+ import React, { useState, useRef } from "react";
2
+ import Popover from "../components/popover";
3
+ import Button from "../components/button";
4
+ import Menu from "../components/menu";
5
+ import MenuItem from "../components/menuItem";
6
+ var meta = {
7
+ title: "Components/Popover",
8
+ component: Popover,
9
+ };
10
+ export default meta;
11
+ var PopoverWrapper = function () {
12
+ var _a = useState(false), open = _a[0], setOpen = _a[1];
13
+ var buttonRef = useRef(null);
14
+ return (<div style={{ padding: "100px" }}>
15
+ <div ref={buttonRef} style={{ display: "inline-block" }}>
16
+ <Button size="medium" type="primary" state="enabled" label="Open Popover" onClickButton={function () { return setOpen(!open); }}/>
17
+ </div>
18
+ <Popover open={open} anchorEl={buttonRef.current} onClose={function () { return setOpen(false); }}>
19
+ <div style={{ padding: "8px" }}>
20
+ <p>Popover content goes here</p>
21
+ </div>
22
+ </Popover>
23
+ </div>);
24
+ };
25
+ export var Default = {
26
+ render: function () { return <PopoverWrapper />; },
27
+ };
28
+ var PopoverWithMenuWrapper = function () {
29
+ var _a = useState(false), open = _a[0], setOpen = _a[1];
30
+ var buttonRef = useRef(null);
31
+ return (<div style={{ padding: "100px" }}>
32
+ <div ref={buttonRef} style={{ display: "inline-block" }}>
33
+ <Button size="medium" type="secondary" state="enabled" label="Actions" onClickButton={function () { return setOpen(!open); }}/>
34
+ </div>
35
+ <Popover open={open} anchorEl={buttonRef.current} onClose={function () { return setOpen(false); }}>
36
+ <Menu width={180}>
37
+ <MenuItem label="Edit" iconName="Edit" onClick={function () { return setOpen(false); }}/>
38
+ <MenuItem label="Duplicate" iconName="Copy" onClick={function () { return setOpen(false); }}/>
39
+ <MenuItem label="Archive" iconName="Archive" onClick={function () { return setOpen(false); }}/>
40
+ <MenuItem label="Delete" iconName="Trash2" onClick={function () { return setOpen(false); }}/>
41
+ </Menu>
42
+ </Popover>
43
+ </div>);
44
+ };
45
+ export var WithMenu = {
46
+ render: function () { return <PopoverWithMenuWrapper />; },
47
+ };
@@ -0,0 +1,8 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import RadioGroup from "../components/radioGroup";
3
+ declare const meta: Meta<typeof RadioGroup>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof RadioGroup>;
6
+ export declare const Vertical: Story;
7
+ export declare const Horizontal: Story;
8
+ export declare const PaymentOptions: Story;
@@ -0,0 +1,53 @@
1
+ import React, { useState } from "react";
2
+ import RadioGroup from "../components/radioGroup";
3
+ var meta = {
4
+ title: "Components/RadioGroup",
5
+ component: RadioGroup,
6
+ argTypes: {
7
+ direction: {
8
+ control: "select",
9
+ options: ["horizontal", "vertical"],
10
+ },
11
+ },
12
+ };
13
+ export default meta;
14
+ var RadioGroupWrapper = function (args) {
15
+ var _a = useState(args.selectedValue || "option1"), selected = _a[0], setSelected = _a[1];
16
+ return (<RadioGroup {...args} selectedValue={selected} onChange={setSelected}/>);
17
+ };
18
+ export var Vertical = {
19
+ render: function (args) { return <RadioGroupWrapper {...args}/>; },
20
+ args: {
21
+ options: [
22
+ { label: "Option 1", value: "option1" },
23
+ { label: "Option 2", value: "option2" },
24
+ { label: "Option 3", value: "option3" },
25
+ ],
26
+ selectedValue: "option1",
27
+ direction: "vertical",
28
+ },
29
+ };
30
+ export var Horizontal = {
31
+ render: function (args) { return <RadioGroupWrapper {...args}/>; },
32
+ args: {
33
+ options: [
34
+ { label: "Small", value: "small" },
35
+ { label: "Medium", value: "medium" },
36
+ { label: "Large", value: "large" },
37
+ ],
38
+ selectedValue: "medium",
39
+ direction: "horizontal",
40
+ },
41
+ };
42
+ export var PaymentOptions = {
43
+ render: function (args) { return <RadioGroupWrapper {...args}/>; },
44
+ args: {
45
+ options: [
46
+ { label: "Credit Card", value: "credit" },
47
+ { label: "PayPal", value: "paypal" },
48
+ { label: "Bank Transfer", value: "bank" },
49
+ ],
50
+ selectedValue: "credit",
51
+ direction: "vertical",
52
+ },
53
+ };
@@ -0,0 +1,10 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import Select from "../components/select";
3
+ declare const meta: Meta<typeof Select>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Select>;
6
+ export declare const Default: Story;
7
+ export declare const WithIcons: Story;
8
+ export declare const WithDecoIcon: Story;
9
+ export declare const Disabled: Story;
10
+ export declare const MultiSelect: Story;
@@ -0,0 +1,85 @@
1
+ import React, { useState } from "react";
2
+ import Select from "../components/select";
3
+ var meta = {
4
+ title: "Components/Select",
5
+ component: Select,
6
+ argTypes: {
7
+ placeholder: { control: "text" },
8
+ disabled: { control: "boolean" },
9
+ multiple: { control: "boolean" },
10
+ width: { control: "text" },
11
+ decoIconName: { control: "text" },
12
+ },
13
+ };
14
+ export default meta;
15
+ var SelectWrapper = function (args) {
16
+ var _a = useState(args.value || ""), value = _a[0], setValue = _a[1];
17
+ return <Select {...args} value={value} onChange={setValue}/>;
18
+ };
19
+ var MultiSelectWrapper = function (args) {
20
+ var _a = useState(args.value || []), values = _a[0], setValues = _a[1];
21
+ return <Select {...args} value={values} onChange={setValues}/>;
22
+ };
23
+ export var Default = {
24
+ render: function (args) { return <SelectWrapper {...args}/>; },
25
+ args: {
26
+ placeholder: "Select an option",
27
+ options: [
28
+ { value: "option1", label: "Option 1" },
29
+ { value: "option2", label: "Option 2" },
30
+ { value: "option3", label: "Option 3" },
31
+ ],
32
+ width: 200,
33
+ },
34
+ };
35
+ export var WithIcons = {
36
+ render: function (args) { return <SelectWrapper {...args}/>; },
37
+ args: {
38
+ placeholder: "Choose a status",
39
+ options: [
40
+ { value: "active", label: "Active", iconName: "CheckCircle" },
41
+ { value: "pending", label: "Pending", iconName: "Clock" },
42
+ { value: "inactive", label: "Inactive", iconName: "XCircle" },
43
+ ],
44
+ width: 200,
45
+ },
46
+ };
47
+ export var WithDecoIcon = {
48
+ render: function (args) { return <SelectWrapper {...args}/>; },
49
+ args: {
50
+ placeholder: "Select category",
51
+ decoIconName: "Folder",
52
+ options: [
53
+ { value: "work", label: "Work" },
54
+ { value: "personal", label: "Personal" },
55
+ { value: "other", label: "Other" },
56
+ ],
57
+ width: 200,
58
+ },
59
+ };
60
+ export var Disabled = {
61
+ render: function (args) { return <SelectWrapper {...args}/>; },
62
+ args: {
63
+ placeholder: "Disabled select",
64
+ disabled: true,
65
+ options: [
66
+ { value: "option1", label: "Option 1" },
67
+ { value: "option2", label: "Option 2" },
68
+ ],
69
+ width: 200,
70
+ },
71
+ };
72
+ export var MultiSelect = {
73
+ render: function (args) { return <MultiSelectWrapper {...args}/>; },
74
+ args: {
75
+ placeholder: "Select multiple",
76
+ multiple: true,
77
+ options: [
78
+ { value: "react", label: "React" },
79
+ { value: "vue", label: "Vue" },
80
+ { value: "angular", label: "Angular" },
81
+ { value: "svelte", label: "Svelte" },
82
+ ],
83
+ width: 250,
84
+ },
85
+ };
@@ -0,0 +1,11 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import Tab from "../components/tab";
3
+ declare const meta: Meta<typeof Tab>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Tab>;
6
+ export declare const Default: Story;
7
+ export declare const Selected: Story;
8
+ export declare const WithDecoIcon: Story;
9
+ export declare const WithActionIcon: Story;
10
+ export declare const WithBothIcons: Story;
11
+ export declare const TabGroup: Story;
@@ -0,0 +1,63 @@
1
+ import React, { useState } from "react";
2
+ import Tab from "../components/tab";
3
+ import TabsContainer from "../components/tabsContainer";
4
+ var meta = {
5
+ title: "Components/Tab",
6
+ component: Tab,
7
+ argTypes: {
8
+ label: { control: "text" },
9
+ isSelected: { control: "boolean" },
10
+ decoIcon: { control: "text" },
11
+ actionIcon: { control: "text" },
12
+ },
13
+ };
14
+ export default meta;
15
+ export var Default = {
16
+ args: {
17
+ label: "Tab Label",
18
+ isSelected: false,
19
+ onClickTab: function () { },
20
+ },
21
+ };
22
+ export var Selected = {
23
+ args: {
24
+ label: "Selected Tab",
25
+ isSelected: true,
26
+ onClickTab: function () { },
27
+ },
28
+ };
29
+ export var WithDecoIcon = {
30
+ args: {
31
+ label: "With Icon",
32
+ isSelected: false,
33
+ decoIcon: "Home",
34
+ onClickTab: function () { },
35
+ },
36
+ };
37
+ export var WithActionIcon = {
38
+ args: {
39
+ label: "With Action",
40
+ isSelected: false,
41
+ actionIcon: "X",
42
+ onClickTab: function () { },
43
+ },
44
+ };
45
+ export var WithBothIcons = {
46
+ args: {
47
+ label: "Full Tab",
48
+ isSelected: true,
49
+ decoIcon: "File",
50
+ actionIcon: "X",
51
+ onClickTab: function () { },
52
+ },
53
+ };
54
+ var TabGroupWrapper = function () {
55
+ var _a = useState(0), selected = _a[0], setSelected = _a[1];
56
+ var tabs = ["Overview", "Projects", "Tasks", "Settings"];
57
+ return (<TabsContainer>
58
+ {tabs.map(function (tab, index) { return (<Tab key={tab} label={tab} isSelected={selected === index} onClickTab={function () { return setSelected(index); }}/>); })}
59
+ </TabsContainer>);
60
+ };
61
+ export var TabGroup = {
62
+ render: function () { return <TabGroupWrapper />; },
63
+ };
@@ -0,0 +1,8 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import TableContainer from "../components/tableContainer";
3
+ declare const meta: Meta<typeof TableContainer>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof TableContainer>;
6
+ export declare const Default: Story;
7
+ export declare const FlexibleWidth: Story;
8
+ export declare const CenteredContent: Story;