@taiv/ui 1.11.0 → 1.13.0

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 (110) hide show
  1. package/dist/assets/assets.d.ts +5 -0
  2. package/dist/assets/assets.d.ts.map +1 -0
  3. package/dist/assets/assets.js +18 -0
  4. package/dist/assets/icons.d.ts +6 -0
  5. package/dist/assets/icons.d.ts.map +1 -0
  6. package/dist/assets/icons.js +57 -0
  7. package/dist/components/Info/Modals/Modal/Modal.stories.d.ts +7 -0
  8. package/dist/components/Info/Modals/Modal/Modal.stories.d.ts.map +1 -0
  9. package/dist/components/Info/Modals/Modal/Modal.stories.js +61 -0
  10. package/dist/components/Info/Modals/Modals.stories.d.ts +16 -0
  11. package/dist/components/Info/Modals/Modals.stories.d.ts.map +1 -0
  12. package/dist/components/Info/Modals/Modals.stories.js +101 -0
  13. package/dist/components/Info/Notifications/Notifications.stories.d.ts +10 -0
  14. package/dist/components/Info/Notifications/Notifications.stories.d.ts.map +1 -0
  15. package/dist/components/Info/Notifications/Notifications.stories.js +106 -0
  16. package/dist/components/Inputs/Buttons/Button/Button.stories.d.ts +1 -0
  17. package/dist/components/Inputs/Buttons/Button/Button.stories.d.ts.map +1 -1
  18. package/dist/components/Inputs/Buttons/Button/Button.stories.js +50 -44
  19. package/dist/components/Inputs/Controls/SegmentedControl/SegmentedControl.d.ts +26 -0
  20. package/dist/components/Inputs/Controls/SegmentedControl/SegmentedControl.d.ts.map +1 -0
  21. package/dist/components/Inputs/Controls/SegmentedControl/SegmentedControl.js +41 -0
  22. package/dist/components/Inputs/Controls/SegmentedControl/SegmentedControl.stories.d.ts +13 -0
  23. package/dist/components/Inputs/Controls/SegmentedControl/SegmentedControl.stories.d.ts.map +1 -0
  24. package/dist/components/Inputs/Controls/SegmentedControl/SegmentedControl.stories.js +231 -0
  25. package/dist/components/Layout/AutoGrid/AutoGrid.stories.d.ts +7 -0
  26. package/dist/components/Layout/AutoGrid/AutoGrid.stories.d.ts.map +1 -0
  27. package/dist/components/Layout/AutoGrid/AutoGrid.stories.js +78 -0
  28. package/dist/components/Layout/Box/Box.d.ts +1 -3
  29. package/dist/components/Layout/Box/Box.d.ts.map +1 -1
  30. package/dist/components/Layout/Box/Box.js +2 -2
  31. package/dist/components/Layout/Box/Box.stories.d.ts +1 -2
  32. package/dist/components/Layout/Box/Box.stories.d.ts.map +1 -1
  33. package/dist/components/Layout/Box/Box.stories.js +27 -98
  34. package/dist/components/Layout/Card/Card.d.ts +1 -1
  35. package/dist/components/Layout/Card/Card.d.ts.map +1 -1
  36. package/dist/components/Layout/Card/Card.js +2 -2
  37. package/dist/components/Layout/Card/Card.stories.d.ts +10 -0
  38. package/dist/components/Layout/Card/Card.stories.d.ts.map +1 -0
  39. package/dist/components/Layout/Card/Card.stories.js +91 -0
  40. package/dist/components/Layout/Center/Center.d.ts +2 -3
  41. package/dist/components/Layout/Center/Center.d.ts.map +1 -1
  42. package/dist/components/Layout/Center/Center.js +2 -2
  43. package/dist/components/Layout/Center/Center.stories.d.ts +8 -0
  44. package/dist/components/Layout/Center/Center.stories.d.ts.map +1 -0
  45. package/dist/components/Layout/Center/Center.stories.js +69 -0
  46. package/dist/components/Layout/Divider/Divider.stories.d.ts +7 -0
  47. package/dist/components/Layout/Divider/Divider.stories.d.ts.map +1 -0
  48. package/dist/components/Layout/Divider/Divider.stories.js +67 -0
  49. package/dist/components/Layout/Frame/Frame.stories.d.ts +8 -0
  50. package/dist/components/Layout/Frame/Frame.stories.d.ts.map +1 -0
  51. package/dist/components/Layout/Frame/Frame.stories.js +77 -0
  52. package/dist/components/Layout/Grid/Grid.stories.d.ts +8 -0
  53. package/dist/components/Layout/Grid/Grid.stories.d.ts.map +1 -0
  54. package/dist/components/Layout/Grid/Grid.stories.js +71 -0
  55. package/dist/components/Layout/Group/Group.stories.d.ts +10 -0
  56. package/dist/components/Layout/Group/Group.stories.d.ts.map +1 -0
  57. package/dist/components/Layout/Group/Group.stories.js +113 -0
  58. package/dist/components/Layout/Loader/Loader.stories.d.ts +10 -0
  59. package/dist/components/Layout/Loader/Loader.stories.d.ts.map +1 -0
  60. package/dist/components/Layout/Loader/Loader.stories.js +67 -0
  61. package/dist/components/Layout/SectionCard/SectionCard.d.ts +3 -5
  62. package/dist/components/Layout/SectionCard/SectionCard.d.ts.map +1 -1
  63. package/dist/components/Layout/SectionCard/SectionCard.js +3 -8
  64. package/dist/components/Layout/SectionCard/SectionCard.stories.d.ts +9 -0
  65. package/dist/components/Layout/SectionCard/SectionCard.stories.d.ts.map +1 -0
  66. package/dist/components/Layout/SectionCard/SectionCard.stories.js +98 -0
  67. package/dist/components/Layout/Stack/Stack.stories.d.ts +1 -2
  68. package/dist/components/Layout/Stack/Stack.stories.d.ts.map +1 -1
  69. package/dist/components/Layout/Stack/Stack.stories.js +46 -66
  70. package/dist/components/Layout/Tabs/Tabs.d.ts +2 -4
  71. package/dist/components/Layout/Tabs/Tabs.d.ts.map +1 -1
  72. package/dist/components/Layout/Tabs/Tabs.js +2 -2
  73. package/dist/components/Layout/Tabs/Tabs.stories.d.ts +9 -0
  74. package/dist/components/Layout/Tabs/Tabs.stories.d.ts.map +1 -0
  75. package/dist/components/Layout/Tabs/Tabs.stories.js +140 -0
  76. package/dist/components/Misc/IconBadge/IconBadge.stories.d.ts +7 -0
  77. package/dist/components/Misc/IconBadge/IconBadge.stories.d.ts.map +1 -0
  78. package/dist/components/Misc/IconBadge/IconBadge.stories.js +48 -0
  79. package/dist/components/Typography/Formula/Formula.js +2 -2
  80. package/dist/components/Typography/Formula/Formula.stories.d.ts +10 -0
  81. package/dist/components/Typography/Formula/Formula.stories.d.ts.map +1 -0
  82. package/dist/components/Typography/Formula/Formula.stories.js +85 -0
  83. package/dist/components/Typography/Fraction/Fraction.d.ts.map +1 -1
  84. package/dist/components/Typography/Fraction/Fraction.stories.d.ts +9 -0
  85. package/dist/components/Typography/Fraction/Fraction.stories.d.ts.map +1 -0
  86. package/dist/components/Typography/Fraction/Fraction.stories.js +86 -0
  87. package/dist/components/Typography/Text/Text.d.ts.map +1 -1
  88. package/dist/components/Typography/Text/Text.js +6 -0
  89. package/dist/components/Typography/Text/Text.stories.d.ts +10 -0
  90. package/dist/components/Typography/Text/Text.stories.d.ts.map +1 -0
  91. package/dist/components/Typography/Text/Text.stories.js +101 -0
  92. package/dist/components/Typography/Title/Title.stories.d.ts +9 -0
  93. package/dist/components/Typography/Title/Title.stories.d.ts.map +1 -0
  94. package/dist/components/Typography/Title/Title.stories.js +98 -0
  95. package/dist/components/index.d.ts +1 -0
  96. package/dist/components/index.d.ts.map +1 -1
  97. package/dist/components/index.js +1 -0
  98. package/dist/constants/colors.d.ts +1 -0
  99. package/dist/constants/colors.d.ts.map +1 -1
  100. package/dist/constants/colors.js +1 -0
  101. package/dist/docs/AIGeneratedBanner.d.ts +2 -0
  102. package/dist/docs/AIGeneratedBanner.d.ts.map +1 -0
  103. package/dist/docs/AIGeneratedBanner.js +5 -0
  104. package/dist/docs/design/Colors.stories.d.ts +7 -0
  105. package/dist/docs/design/Colors.stories.d.ts.map +1 -0
  106. package/dist/docs/design/Colors.stories.js +28 -0
  107. package/dist/docs/hooks/Copy.stories.d.ts +6 -0
  108. package/dist/docs/hooks/Copy.stories.d.ts.map +1 -0
  109. package/dist/docs/hooks/Copy.stories.js +61 -0
  110. package/package.json +6 -6
@@ -0,0 +1,67 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from 'react';
3
+ import { Loader } from './Loader';
4
+ import { Stack } from '../Stack/Stack';
5
+ import { Text } from '../../Typography/Text/Text';
6
+ import { Button } from '../../Inputs/Buttons/Button/Button';
7
+ import { Group } from '../Group/Group';
8
+ import { useNotifications } from '../../../hooks/useNotifications';
9
+ const meta = {
10
+ title: 'Components/Misc/Loader',
11
+ component: Loader,
12
+ parameters: {
13
+ layout: 'centered',
14
+ },
15
+ argTypes: {
16
+ size: {
17
+ control: { type: 'select' },
18
+ options: ['xs', 'sm', 'md', 'lg', 'xl'],
19
+ description: 'Size of the loader',
20
+ table: {
21
+ type: { summary: "'xs' | 'sm' | 'md' | 'lg' | 'xl' | number" },
22
+ defaultValue: { summary: "'md'" },
23
+ },
24
+ },
25
+ },
26
+ };
27
+ export default meta;
28
+ export const Default = {
29
+ args: {
30
+ size: 'md',
31
+ },
32
+ };
33
+ const LoadingNotificationDemo = () => {
34
+ const { show, showLoading, hide } = useNotifications();
35
+ const [isLoading, setIsLoading] = useState(false);
36
+ const handleSuccess = () => {
37
+ setIsLoading(true);
38
+ const id = showLoading({ message: 'Saving your changes...' });
39
+ setTimeout(() => {
40
+ hide(id);
41
+ show({ variant: 'success', message: 'Your changes have been saved.' });
42
+ setIsLoading(false);
43
+ }, 3000);
44
+ };
45
+ return (_jsx(Group, { gap: "0.5rem", children: _jsx(Button, { onClick: handleSuccess, loading: isLoading, children: "Save" }) }));
46
+ };
47
+ export const LoadingNotification = {
48
+ render: () => _jsx(LoadingNotificationDemo, {}),
49
+ parameters: {
50
+ docs: { source: { code: false } },
51
+ },
52
+ };
53
+ export const ButtonLoading = {
54
+ render: () => _jsx(Button, { loading: true, children: "Save" }),
55
+ parameters: {
56
+ docs: { source: { code: false } },
57
+ },
58
+ };
59
+ export const CenteredLoader = {
60
+ decorators: [
61
+ (Story) => (_jsx("div", { style: { width: '300px', padding: '3.2rem' }, children: _jsx(Story, {}) })),
62
+ ],
63
+ render: () => (_jsxs(Stack, { align: "center", children: [_jsx(Loader, {}), _jsx(Text, { variant: "subtle", children: " Loading data..." })] })),
64
+ parameters: {
65
+ docs: { source: { code: false } },
66
+ },
67
+ };
@@ -1,11 +1,9 @@
1
1
  import React from 'react';
2
- import { CardProps as MantineCardProps } from '@mantine/core';
3
- import { colors } from '../../../constants/colors';
4
- export interface SectionCardProps extends Omit<MantineCardProps, 'children'> {
2
+ import { CardProps } from '../Card/Card';
3
+ export interface SectionCardProps extends Omit<CardProps, 'children'> {
5
4
  title: string;
6
5
  subtitle?: string;
7
6
  children: React.ReactNode;
8
- color?: keyof typeof colors;
9
7
  }
10
- export declare const SectionCard: ({ title, subtitle, children, color, ...props }: SectionCardProps) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const SectionCard: ({ title, subtitle, children, ...props }: SectionCardProps) => import("react/jsx-runtime").JSX.Element;
11
9
  //# sourceMappingURL=SectionCard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SectionCard.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/SectionCard/SectionCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAuB,SAAS,IAAI,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACnF,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAInD,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC;IAC1E,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,OAAO,MAAM,CAAC;CAC7B;AAED,eAAO,MAAM,WAAW,GAAI,gDAA4D,gBAAgB,4CAsBvG,CAAC"}
1
+ {"version":3,"file":"SectionCard.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/SectionCard/SectionCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAQ,SAAS,EAAE,MAAM,cAAc,CAAC;AAK/C,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;IACnE,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAE3B;AAED,eAAO,MAAM,WAAW,GAAI,yCAAyC,gBAAgB,4CAcpF,CAAC"}
@@ -1,13 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Card as MantineCard } from '@mantine/core';
2
+ import { Card } from '../Card/Card';
3
3
  import { Stack } from '../Stack/Stack';
4
4
  import { Title } from '../../Typography/Title/Title';
5
5
  import { Box } from '../Box/Box';
6
- export const SectionCard = ({ title, subtitle, children, color = 'primary', ...props }) => {
7
- return (_jsxs(MantineCard, { radius: "20px", shadow: "lg", withBorder: true, padding: 0, ...props, children: [_jsx(Box, { sx: {
8
- // background: `linear-gradient(to right, ${colors[color][300]}, ${colors[color][200]})`,
9
- backgroundColor: 'white',
10
- padding: '1.6rem 2rem 0 2rem',
11
- borderRadius: '20px 20px 0 0',
12
- }, children: _jsxs(Stack, { gap: "0.25rem", children: [_jsx(Title, { variant: "cardHeader", children: title }), subtitle && _jsx(Title, { variant: "cardSubheader", children: subtitle })] }) }), _jsx(Box, { sx: { padding: '2rem 3.2rem 3.2rem 3.2rem' }, children: children })] }));
6
+ export const SectionCard = ({ title, subtitle, children, ...props }) => {
7
+ return (_jsx(Card, { p: "2.4rem", ...props, children: _jsxs(Stack, { gap: "2rem", children: [_jsxs(Stack, { gap: "0", children: [_jsx(Title, { variant: "cardHeader", children: title }), subtitle && _jsx(Title, { variant: "cardSubheader", children: subtitle })] }), _jsx(Box, { children: children })] }) }));
13
8
  };
@@ -0,0 +1,9 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { SectionCard } from './SectionCard';
3
+ declare const meta: Meta<typeof SectionCard>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;
7
+ export declare const Animation: Story;
8
+ export declare const WithAutoGrid: Story;
9
+ //# sourceMappingURL=SectionCard.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SectionCard.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/SectionCard/SectionCard.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAS5C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,WAAW,CAsElC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAqBrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAQvB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAY1B,CAAC"}
@@ -0,0 +1,98 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { SectionCard } from './SectionCard';
3
+ import { AutoGrid } from '../AutoGrid/AutoGrid';
4
+ import { Text } from '../../Typography/Text/Text';
5
+ import { IconBadge } from '../../Misc/IconBadge/IconBadge';
6
+ import { IconEye } from '@tabler/icons-react';
7
+ import { Group } from '../Group/Group';
8
+ import { Title } from '../../Typography/Title/Title';
9
+ import { neutral } from '../../../constants/colors';
10
+ const meta = {
11
+ title: 'Components/Layout/SectionCard',
12
+ component: SectionCard,
13
+ parameters: {
14
+ layout: 'centered',
15
+ },
16
+ argTypes: {
17
+ title: {
18
+ control: { type: 'text' },
19
+ description: 'Main title displayed in the card header',
20
+ table: {
21
+ type: { summary: 'string' },
22
+ },
23
+ },
24
+ subtitle: {
25
+ control: { type: 'text' },
26
+ description: 'Optional subtitle displayed below the main title',
27
+ table: {
28
+ type: { summary: 'string' },
29
+ },
30
+ },
31
+ animate: {
32
+ control: { type: 'boolean' },
33
+ description: 'Enable a lifting hover animation',
34
+ table: {
35
+ type: { summary: 'boolean' },
36
+ defaultValue: { summary: 'false' },
37
+ },
38
+ },
39
+ children: {
40
+ control: false,
41
+ description: 'Content displayed in the card body',
42
+ table: {
43
+ type: { summary: 'ReactNode' },
44
+ },
45
+ },
46
+ radius: {
47
+ control: { type: 'text' },
48
+ description: 'Border radius of the card',
49
+ table: {
50
+ type: { summary: 'string | number' },
51
+ defaultValue: { summary: "'20px'" },
52
+ },
53
+ },
54
+ shadow: {
55
+ control: { type: 'select' },
56
+ options: ['xs', 'sm', 'md', 'lg', 'xl'],
57
+ description: 'Shadow depth of the card',
58
+ table: {
59
+ type: { summary: "'xs' | 'sm' | 'md' | 'lg' | 'xl'" },
60
+ defaultValue: { summary: "'lg'" },
61
+ },
62
+ },
63
+ p: {
64
+ control: { type: 'text' },
65
+ description: 'Padding of the card',
66
+ table: {
67
+ type: { summary: 'string | number' },
68
+ defaultValue: { summary: "'0.8rem'" },
69
+ },
70
+ },
71
+ withBorder: {
72
+ control: { type: 'boolean' },
73
+ description: 'Whether to show card border',
74
+ table: {
75
+ type: { summary: 'boolean' },
76
+ defaultValue: { summary: 'true' },
77
+ },
78
+ },
79
+ },
80
+ };
81
+ export default meta;
82
+ export const Default = {
83
+ args: {
84
+ children: undefined,
85
+ title: 'Impressions This Week',
86
+ subtitle: 'Total impressions at all locations',
87
+ },
88
+ decorators: [
89
+ (Story) => (_jsx("div", { style: { width: '400px' }, children: _jsx(Story, {}) })),
90
+ ],
91
+ render: (args) => (_jsx(SectionCard, { ...args, children: _jsxs(Group, { gap: "1rem", children: [_jsx(IconBadge, { icon: _jsx(IconEye, { size: 30 }), color: "salmon" }), _jsx(Title, { weight: "semibold", size: "2xl", color: neutral[200], children: "55,000" })] }) })),
92
+ };
93
+ export const Animation = {
94
+ render: () => (_jsx("div", { style: { width: '400px' }, children: _jsx(SectionCard, { title: "Example Card", subtitle: "With an example subtitle", animate: true, children: _jsx(Text, { variant: "subtle", children: "This card lifts on hover" }) }) })),
95
+ };
96
+ export const WithAutoGrid = {
97
+ render: () => (_jsx("div", { style: { width: '800px' }, children: _jsx(AutoGrid, { cols: 2, children: ['Example Card 1', 'Example Card 2', 'Example Card 3', 'Example Card 4'].map((label, i) => (_jsx(SectionCard, { title: label, subtitle: "With an example subtitle", animate: true, children: _jsx("div", {}) }, label))) }) })),
98
+ };
@@ -4,6 +4,5 @@ declare const meta: Meta<typeof Stack>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof meta>;
6
6
  export declare const Default: Story;
7
- export declare const JustifyAlignContent: Story;
8
- export declare const SpacingGap: Story;
7
+ export declare const PositionContent: Story;
9
8
  //# sourceMappingURL=Stack.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Stack.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/Stack/Stack.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAGhC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,KAAK,CAkD5B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAqBnC,eAAO,MAAM,OAAO,EAAE,KAarB,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KAmEjC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAwFxB,CAAC"}
1
+ {"version":3,"file":"Stack.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/Stack/Stack.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAMhC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,KAAK,CA6D5B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAQnC,eAAO,MAAM,OAAO,EAAE,KAwBrB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAgB7B,CAAC"}
@@ -1,51 +1,65 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Stack } from './Stack';
3
- import { Box } from '../Box/Box';
3
+ import { Text } from '../../Typography/Text/Text';
4
+ import { Card } from '../Card/Card';
5
+ import { Group } from '../Group/Group';
6
+ import { neutral } from '../../../constants/colors';
4
7
  const meta = {
5
- title: 'Layouts/Stack',
8
+ title: 'Components/Layout/Stack',
6
9
  component: Stack,
10
+ parameters: {
11
+ layout: 'centered',
12
+ },
7
13
  argTypes: {
8
- align: {
9
- control: { type: 'select' },
10
- options: ['stretch', 'center', 'flex-start', 'flex-end', 'baseline'],
11
- description: 'align-items CSS property',
14
+ children: {
15
+ control: false,
16
+ description: 'Content to arrange within the stack',
12
17
  table: {
13
- type: { summary: 'AlignItems' },
18
+ type: { summary: 'ReactNode' },
14
19
  },
15
20
  },
16
21
  justify: {
17
22
  control: { type: 'select' },
18
23
  options: ['flex-start', 'center', 'flex-end', 'space-between', 'space-around', 'space-evenly'],
19
- description: 'justify-content CSS property',
24
+ description: 'Vertical alignment',
20
25
  table: {
21
- type: { summary: 'JustifyContent' },
26
+ type: { summary: "'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly'" },
27
+ defaultValue: { summary: "'flex-start'" },
22
28
  },
23
29
  },
24
- spacing: {
30
+ align: {
25
31
  control: { type: 'select' },
26
- options: ['xs', 'sm', 'md', 'lg', 'xl'],
27
- description: 'Gap between items',
32
+ options: ['stretch', 'center', 'flex-start', 'flex-end', 'baseline'],
33
+ description: 'Horizontal alignment',
28
34
  table: {
29
- type: { summary: 'number | "xs" | "sm" | "md" | "lg" | "xl"' },
35
+ type: { summary: "'stretch' | 'center' | 'flex-start' | 'flex-end' | 'baseline'" },
36
+ defaultValue: { summary: "'stretch'" },
37
+ },
38
+ },
39
+ gap: {
40
+ control: { type: 'text' },
41
+ description: 'Spacing between items',
42
+ table: {
43
+ type: { summary: 'string' },
30
44
  },
31
45
  },
32
46
  width: {
33
47
  control: { type: 'text' },
34
- description: 'Custom width',
48
+ description: 'Custom width override',
35
49
  table: {
36
50
  type: { summary: 'string | number' },
37
51
  },
38
52
  },
39
- gap: {
53
+ h: {
40
54
  control: { type: 'text' },
41
- description: 'Custom gap value',
55
+ description: 'Custom height override',
42
56
  table: {
43
- type: { summary: 'string' },
57
+ type: { summary: 'string | number' },
44
58
  },
45
59
  },
46
60
  styles: {
47
61
  control: { type: 'object' },
48
- description: 'Custom styles object',
62
+ description: 'Custom styles override - use this sparingly',
49
63
  table: {
50
64
  type: { summary: 'Record<string, CSSObject>' },
51
65
  },
@@ -53,56 +67,22 @@ const meta = {
53
67
  },
54
68
  };
55
69
  export default meta;
56
- const SampleBox = ({ children, color = 'blue' }) => (_jsx(Box, { sx: (theme) => ({
57
- backgroundColor: theme.colors[color][0],
58
- color: theme.colors[color][9],
59
- padding: theme.spacing.md,
60
- borderRadius: theme.radius.md,
61
- border: `1px solid ${theme.colors[color][3]}`,
62
- textAlign: 'center',
63
- minHeight: '60px',
64
- display: 'flex',
65
- alignItems: 'center',
66
- justifyContent: 'center',
67
- }), children: children }));
70
+ const SampleCard = ({ label }) => (_jsx(Card, { children: _jsx(Text, { weight: "bold", children: label }) }));
68
71
  export const Default = {
69
72
  args: {
70
- align: 'stretch',
71
- justify: 'flex-start',
72
- spacing: 'md',
73
- },
74
- render: (args) => (_jsxs(Stack, { ...args, children: [_jsx(SampleBox, { color: "blue", children: "Item 1" }), _jsx(SampleBox, { color: "green", children: "Item 2" }), _jsx(SampleBox, { color: "orange", children: "Item 3" })] })),
75
- };
76
- export const JustifyAlignContent = {
77
- render: () => (_jsxs("div", { style: { display: 'flex', gap: '2rem', flexWrap: 'wrap' }, children: [_jsxs("div", { children: [_jsx("h4", { children: "Justify Content" }), _jsxs("div", { style: { display: 'flex', gap: '1rem', flexDirection: 'column' }, children: [_jsxs("div", { children: [_jsx("strong", { children: "flex-start" }), _jsxs(Stack, { justify: "flex-start", spacing: "sm", style: { height: '200px', border: '1px solid #ccc', padding: '1rem' }, children: [_jsx(SampleBox, { color: "blue", children: "Item 1" }), _jsx(SampleBox, { color: "green", children: "Item 2" })] })] }), _jsxs("div", { children: [_jsx("strong", { children: "center" }), _jsxs(Stack, { justify: "center", spacing: "sm", style: { height: '200px', border: '1px solid #ccc', padding: '1rem' }, children: [_jsx(SampleBox, { color: "blue", children: "Item 1" }), _jsx(SampleBox, { color: "green", children: "Item 2" })] })] }), _jsxs("div", { children: [_jsx("strong", { children: "space-between" }), _jsxs(Stack, { justify: "space-between", spacing: "sm", style: { height: '200px', border: '1px solid #ccc', padding: '1rem' }, children: [_jsx(SampleBox, { color: "blue", children: "Item 1" }), _jsx(SampleBox, { color: "green", children: "Item 2" })] })] })] })] }), _jsxs("div", { children: [_jsx("h4", { children: "Align Items" }), _jsxs("div", { style: { display: 'flex', gap: '1rem', flexDirection: 'column' }, children: [_jsxs("div", { children: [_jsx("strong", { children: "stretch" }), _jsxs(Stack, { align: "stretch", spacing: "sm", style: { height: '200px', border: '1px solid #ccc', padding: '1rem' }, children: [_jsx(SampleBox, { color: "blue", children: "Item 1" }), _jsx(SampleBox, { color: "green", children: "Item 2" })] })] }), _jsxs("div", { children: [_jsx("strong", { children: "center" }), _jsxs(Stack, { align: "center", spacing: "sm", style: { height: '200px', border: '1px solid #ccc', padding: '1rem' }, children: [_jsx(SampleBox, { color: "blue", children: "Item 1" }), _jsx(SampleBox, { color: "green", children: "Item 2" })] })] }), _jsxs("div", { children: [_jsx("strong", { children: "flex-end" }), _jsxs(Stack, { align: "flex-end", spacing: "sm", style: { height: '200px', border: '1px solid #ccc', padding: '1rem' }, children: [_jsx(SampleBox, { color: "blue", children: "Item 1" }), _jsx(SampleBox, { color: "green", children: "Item 2" })] })] })] })] })] })),
78
- parameters: {
79
- docs: {
80
- source: {
81
- code: `<Stack justify="center" align="center" spacing="md">
82
- <Box>Centered Item 1</Box>
83
- <Box>Centered Item 2</Box>
84
- </Stack>`,
85
- },
86
- },
73
+ children: undefined,
74
+ justify: undefined,
75
+ align: undefined,
76
+ gap: undefined,
77
+ h: undefined,
78
+ width: undefined,
79
+ styles: undefined,
87
80
  },
81
+ decorators: [
82
+ (Story) => (_jsx("div", { style: { width: '500px', backgroundColor: neutral[25], padding: '2rem' }, children: _jsx(Story, {}) })),
83
+ ],
84
+ render: (args) => (_jsxs(Stack, { ...args, children: [_jsx(SampleCard, { label: "Item 1" }), _jsx(SampleCard, { label: "Item 2" }), _jsx(SampleCard, { label: "Item 3" })] })),
88
85
  };
89
- export const SpacingGap = {
90
- render: () => (_jsxs("div", { style: { display: 'flex', gap: '2rem', flexDirection: 'column' }, children: [_jsxs("div", { children: [_jsx("h4", { children: "Theme Spacing" }), _jsxs("div", { style: { display: 'flex', gap: '1rem', flexWrap: 'wrap' }, children: [_jsxs("div", { children: [_jsx("strong", { children: "xs" }), _jsxs(Stack, { spacing: "xs", style: { border: '1px solid #ccc', padding: '1rem' }, children: [_jsx(SampleBox, { color: "blue", children: "Item 1" }), _jsx(SampleBox, { color: "green", children: "Item 2" }), _jsx(SampleBox, { color: "orange", children: "Item 3" })] })] }), _jsxs("div", { children: [_jsx("strong", { children: "sm" }), _jsxs(Stack, { spacing: "sm", style: { border: '1px solid #ccc', padding: '1rem' }, children: [_jsx(SampleBox, { color: "blue", children: "Item 1" }), _jsx(SampleBox, { color: "green", children: "Item 2" }), _jsx(SampleBox, { color: "orange", children: "Item 3" })] })] }), _jsxs("div", { children: [_jsx("strong", { children: "md" }), _jsxs(Stack, { spacing: "md", style: { border: '1px solid #ccc', padding: '1rem' }, children: [_jsx(SampleBox, { color: "blue", children: "Item 1" }), _jsx(SampleBox, { color: "green", children: "Item 2" }), _jsx(SampleBox, { color: "orange", children: "Item 3" })] })] }), _jsxs("div", { children: [_jsx("strong", { children: "lg" }), _jsxs(Stack, { spacing: "lg", style: { border: '1px solid #ccc', padding: '1rem' }, children: [_jsx(SampleBox, { color: "blue", children: "Item 1" }), _jsx(SampleBox, { color: "green", children: "Item 2" }), _jsx(SampleBox, { color: "orange", children: "Item 3" })] })] }), _jsxs("div", { children: [_jsx("strong", { children: "xl" }), _jsxs(Stack, { spacing: "xl", style: { border: '1px solid #ccc', padding: '1rem' }, children: [_jsx(SampleBox, { color: "blue", children: "Item 1" }), _jsx(SampleBox, { color: "green", children: "Item 2" }), _jsx(SampleBox, { color: "orange", children: "Item 3" })] })] })] })] }), _jsxs("div", { children: [_jsx("h4", { children: "Custom Gap" }), _jsxs("div", { style: { display: 'flex', gap: '1rem', flexWrap: 'wrap' }, children: [_jsxs("div", { children: [_jsx("strong", { children: "2rem" }), _jsxs(Stack, { gap: "2rem", style: { border: '1px solid #ccc', padding: '1rem' }, children: [_jsx(SampleBox, { color: "blue", children: "Item 1" }), _jsx(SampleBox, { color: "green", children: "Item 2" }), _jsx(SampleBox, { color: "orange", children: "Item 3" })] })] }), _jsxs("div", { children: [_jsx("strong", { children: "20px" }), _jsxs(Stack, { gap: "20px", style: { border: '1px solid #ccc', padding: '1rem' }, children: [_jsx(SampleBox, { color: "blue", children: "Item 1" }), _jsx(SampleBox, { color: "green", children: "Item 2" }), _jsx(SampleBox, { color: "orange", children: "Item 3" })] })] })] })] })] })),
91
- parameters: {
92
- docs: {
93
- source: {
94
- code: `<Stack spacing="lg">
95
- <Box>Item 1</Box>
96
- <Box>Item 2</Box>
97
- <Box>Item 3</Box>
98
- </Stack>
99
-
100
- <Stack gap="2rem">
101
- <Box>Item 1</Box>
102
- <Box>Item 2</Box>
103
- <Box>Item 3</Box>
104
- </Stack>`,
105
- },
106
- },
107
- },
86
+ export const PositionContent = {
87
+ render: () => (_jsx(Stack, { gap: "xl", justify: "flex-start", children: _jsx(Group, { children: ['flex-start', 'center', 'space-between'].map((val) => (_jsxs("div", { children: [_jsx(Text, { variant: "label", mb: "sm", children: _jsxs("code", { children: ["justify=", '"' + val + '"'] }) }), _jsxs(Stack, { justify: val, spacing: "sm", sx: { height: '200px', width: '200px', border: `1px dashed ${neutral[50]}`, padding: '0.5rem' }, children: [_jsx(SampleCard, { label: "A" }), _jsx(SampleCard, { label: "B" })] })] }, val))) }) })),
108
88
  };
@@ -1,15 +1,13 @@
1
1
  import React from 'react';
2
2
  import { TabsProps as MantineTabsProps } from '@mantine/core';
3
- export interface TabsProps extends Omit<MantineTabsProps, 'children' | 'onChange' | 'placement'> {
3
+ export interface TabsProps extends Omit<MantineTabsProps, 'children' | 'onChange'> {
4
4
  children: React.ReactNode;
5
5
  defaultValue?: string;
6
6
  value?: string;
7
7
  onChange?: (value: string | null) => void;
8
- orientation?: 'horizontal' | 'vertical';
9
- placement?: 'left' | 'right' | 'top' | 'bottom';
10
8
  variant?: 'default' | 'outline' | 'pills';
11
9
  }
12
- export declare const Tabs: (({ children, defaultValue, value, onChange, orientation, placement, variant, styles, ...props }: TabsProps) => import("react/jsx-runtime").JSX.Element) & {
10
+ export declare const Tabs: (({ children, defaultValue, value, onChange, variant, styles, ...props }: TabsProps) => import("react/jsx-runtime").JSX.Element) & {
13
11
  List: React.ForwardRefExoticComponent<import("@mantine/core").TabsListProps & React.RefAttributes<HTMLDivElement>>;
14
12
  Tab: React.ForwardRefExoticComponent<import("@mantine/core").TabProps & React.RefAttributes<HTMLButtonElement>>;
15
13
  Panel: React.ForwardRefExoticComponent<import("@mantine/core").TabsPanelProps & React.RefAttributes<HTMLDivElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/Tabs/Tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAuB,SAAS,IAAI,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAInF,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,gBAAgB,EAAE,UAAU,GAAG,UAAU,GAAG,WAAW,CAAC;IAC9F,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC1C,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;IAChD,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;CAC3C;AA+CD,eAAO,MAAM,IAAI,oGA7CyI,SAAS;;;;CAiDjK,CAAC"}
1
+ {"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/Tabs/Tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAuB,SAAS,IAAI,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAInF,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,gBAAgB,EAAE,UAAU,GAAG,UAAU,CAAC;IAChF,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC1C,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;CAC3C;AA+CD,eAAO,MAAM,IAAI,4EA7C0F,SAAS;;;;CAiDlH,CAAC"}
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Tabs as MantineTabs } from '@mantine/core';
3
3
  import { fontBase } from '../../../constants/font';
4
4
  import { colors } from '../../../constants/colors';
5
- const TabsComponent = ({ children, defaultValue, value, onChange, orientation = 'horizontal', placement = 'top', variant = 'default', styles, ...props }) => {
5
+ const TabsComponent = ({ children, defaultValue, value, onChange, variant = 'default', styles, ...props }) => {
6
6
  const style = {
7
7
  root: {
8
8
  width: '100%',
@@ -39,7 +39,7 @@ const TabsComponent = ({ children, defaultValue, value, onChange, orientation =
39
39
  },
40
40
  ...styles,
41
41
  };
42
- return (_jsx(MantineTabs, { styles: style, radius: "lg", defaultValue: defaultValue, value: value, orientation: orientation, variant: variant, ...props, children: children }));
42
+ return (_jsx(MantineTabs, { styles: style, radius: "lg", defaultValue: defaultValue, value: value, variant: variant, ...props, children: children }));
43
43
  };
44
44
  export const Tabs = Object.assign(TabsComponent, {
45
45
  List: MantineTabs.List,
@@ -0,0 +1,9 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { Tabs } from './Tabs';
3
+ declare const meta: Meta<typeof Tabs>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;
7
+ export declare const Variants: Story;
8
+ export declare const CustomStyling: Story;
9
+ //# sourceMappingURL=Tabs.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tabs.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/Tabs/Tabs.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAK9B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,IAAI,CA2D3B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAyBrB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KA4BtB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAyE3B,CAAC"}
@@ -0,0 +1,140 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Tabs } from './Tabs';
3
+ import { Stack } from '../Stack/Stack';
4
+ import { primary } from '../../../constants/colors';
5
+ import { Text } from '../../Typography/Text/Text';
6
+ const meta = {
7
+ title: 'Components/Layout/Tabs',
8
+ component: Tabs,
9
+ parameters: {
10
+ layout: 'centered',
11
+ docs: {
12
+ description: {
13
+ component: "[View Mantine Docs](https://v6.mantine.dev/core/tabs/)\n\nThe Tabs component organizes content into sections that users can switch between. It extends Mantine v6's Tabs component with custom styling and variant options.",
14
+ },
15
+ },
16
+ },
17
+ argTypes: {
18
+ children: {
19
+ control: false,
20
+ description: 'Tab content — composed of Tabs.List, Tabs.Tab, and Tabs.Panel',
21
+ table: {
22
+ type: { summary: 'ReactNode' },
23
+ },
24
+ },
25
+ variant: {
26
+ control: { type: 'select' },
27
+ options: ['default', 'outline', 'pills'],
28
+ description: 'The preset variant to use for styling',
29
+ table: {
30
+ type: { summary: "'default' | 'outline' | 'pills'" },
31
+ defaultValue: { summary: "'default'" },
32
+ },
33
+ },
34
+ defaultValue: {
35
+ control: { type: 'select' },
36
+ options: ['overview', 'details', 'settings'],
37
+ description: 'The default tab when the component is mounted',
38
+ table: {
39
+ type: { summary: 'string' },
40
+ },
41
+ },
42
+ value: {
43
+ control: { type: 'text' },
44
+ description: 'The currently active tab value',
45
+ table: {
46
+ type: { summary: 'string' },
47
+ },
48
+ },
49
+ onChange: {
50
+ action: 'changed',
51
+ description: 'Called when the active tab changes',
52
+ table: {
53
+ type: { summary: '(value: string | null) => void' },
54
+ },
55
+ },
56
+ styles: {
57
+ control: { type: 'object' },
58
+ description: 'Override for styling',
59
+ table: {
60
+ type: { summary: 'Record<string, CSSObject>' },
61
+ },
62
+ },
63
+ },
64
+ };
65
+ export default meta;
66
+ export const Default = {
67
+ args: {
68
+ children: undefined,
69
+ variant: 'default',
70
+ defaultValue: 'overview',
71
+ },
72
+ decorators: [
73
+ (Story) => (_jsx("div", { style: { width: '600px' }, children: _jsx(Story, {}) })),
74
+ ],
75
+ render: (args) => (_jsxs(Tabs, { ...args, children: [_jsxs(Tabs.List, { children: [_jsx(Tabs.Tab, { value: "overview", children: "Overview" }), _jsx(Tabs.Tab, { value: "details", children: "Details" }), _jsx(Tabs.Tab, { value: "settings", children: "Settings" })] }), _jsx(Tabs.Panel, { mt: "1.6rem", value: "overview", children: _jsx(Text, { variant: "subtle", children: "This is the tab panel for Overview" }) }), _jsx(Tabs.Panel, { mt: "1.6rem", value: "details", children: _jsx(Text, { variant: "subtle", children: "This is the tab panel for Details" }) }), _jsx(Tabs.Panel, { mt: "1.6rem", value: "settings", children: _jsx(Text, { variant: "subtle", children: "This is the tab panel for Settings" }) })] })),
76
+ };
77
+ export const Variants = {
78
+ render: () => (_jsxs(Stack, { spacing: "4.8rem", py: "2.4rem", sx: { width: '600px' }, children: [_jsx(Tabs, { defaultValue: "overview", variant: "default", children: _jsxs(Tabs.List, { children: [_jsx(Tabs.Tab, { value: "overview", children: "Default" }), _jsx(Tabs.Tab, { value: "details", children: "Tab 2" }), _jsx(Tabs.Tab, { value: "settings", children: "Tab 3" })] }) }), _jsx(Tabs, { defaultValue: "overview", variant: "outline", children: _jsxs(Tabs.List, { children: [_jsx(Tabs.Tab, { value: "overview", children: "Outline" }), _jsx(Tabs.Tab, { value: "details", children: "Tab 2" }), _jsx(Tabs.Tab, { value: "settings", children: "Tab 3" })] }) }), _jsx(Tabs, { defaultValue: "overview", variant: "pills", children: _jsxs(Tabs.List, { children: [_jsx(Tabs.Tab, { value: "overview", children: "Pills" }), _jsx(Tabs.Tab, { value: "details", children: "Tab 2" }), _jsx(Tabs.Tab, { value: "settings", children: "Tab 3" })] }) })] })),
79
+ };
80
+ export const CustomStyling = {
81
+ args: {
82
+ defaultValue: 'overview',
83
+ styles: {
84
+ root: {
85
+ background: primary[200],
86
+ padding: '2rem',
87
+ borderRadius: '12px',
88
+ },
89
+ tab: {
90
+ color: 'white',
91
+ '&:hover': {
92
+ color: 'white',
93
+ backgroundColor: primary[300],
94
+ },
95
+ '&[data-active]': {
96
+ color: 'white',
97
+ backgroundColor: primary[100],
98
+ },
99
+ },
100
+ panel: {
101
+ color: 'white',
102
+ },
103
+ },
104
+ },
105
+ decorators: [
106
+ (Story) => (_jsx("div", { style: { width: '600px' }, children: _jsx(Story, {}) })),
107
+ ],
108
+ render: (args) => (_jsxs(Tabs, { variant: "pills", ...args, children: [_jsxs(Tabs.List, { children: [_jsx(Tabs.Tab, { value: "overview", children: "Overview" }), _jsx(Tabs.Tab, { value: "details", children: "Details" })] }), _jsx(Tabs.Panel, { mt: "1.6rem", value: "overview", children: "Overview" }), _jsx(Tabs.Panel, { mt: "1.6rem", value: "details", children: "Details" })] })),
109
+ parameters: {
110
+ docs: {
111
+ source: {
112
+ code: `<Tabs
113
+ defaultValue="overview"
114
+ styles={{
115
+ root: {
116
+ background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
117
+ padding: '2rem',
118
+ borderRadius: '12px',
119
+ },
120
+ tab: {
121
+ color: 'rgba(255, 255, 255, 0.8)',
122
+ '&[data-active]': {
123
+ color: 'white',
124
+ backgroundColor: 'rgba(255, 255, 255, 0.2)',
125
+ },
126
+ },
127
+ panel: { color: 'white' },
128
+ }}
129
+ >
130
+ <Tabs.List>
131
+ <Tabs.Tab value="overview">Overview</Tabs.Tab>
132
+ <Tabs.Tab value="details">Details</Tabs.Tab>
133
+ </Tabs.List>
134
+ <Tabs.Panel value="overview">Overview content</Tabs.Panel>
135
+ <Tabs.Panel value="details">Details content</Tabs.Panel>
136
+ </Tabs>`,
137
+ },
138
+ },
139
+ },
140
+ };
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { IconBadge } from './IconBadge';
3
+ declare const meta: Meta<typeof IconBadge>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;
7
+ //# sourceMappingURL=IconBadge.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconBadge.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Misc/IconBadge/IconBadge.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,SAAS,CAsChC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC"}