@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.
- package/dist/assets/assets.d.ts +5 -0
- package/dist/assets/assets.d.ts.map +1 -0
- package/dist/assets/assets.js +18 -0
- package/dist/assets/icons.d.ts +6 -0
- package/dist/assets/icons.d.ts.map +1 -0
- package/dist/assets/icons.js +57 -0
- package/dist/components/Info/Modals/Modal/Modal.stories.d.ts +7 -0
- package/dist/components/Info/Modals/Modal/Modal.stories.d.ts.map +1 -0
- package/dist/components/Info/Modals/Modal/Modal.stories.js +61 -0
- package/dist/components/Info/Modals/Modals.stories.d.ts +16 -0
- package/dist/components/Info/Modals/Modals.stories.d.ts.map +1 -0
- package/dist/components/Info/Modals/Modals.stories.js +101 -0
- package/dist/components/Info/Notifications/Notifications.stories.d.ts +10 -0
- package/dist/components/Info/Notifications/Notifications.stories.d.ts.map +1 -0
- package/dist/components/Info/Notifications/Notifications.stories.js +106 -0
- package/dist/components/Inputs/Buttons/Button/Button.stories.d.ts +1 -0
- package/dist/components/Inputs/Buttons/Button/Button.stories.d.ts.map +1 -1
- package/dist/components/Inputs/Buttons/Button/Button.stories.js +50 -44
- package/dist/components/Inputs/Controls/SegmentedControl/SegmentedControl.d.ts +26 -0
- package/dist/components/Inputs/Controls/SegmentedControl/SegmentedControl.d.ts.map +1 -0
- package/dist/components/Inputs/Controls/SegmentedControl/SegmentedControl.js +41 -0
- package/dist/components/Inputs/Controls/SegmentedControl/SegmentedControl.stories.d.ts +13 -0
- package/dist/components/Inputs/Controls/SegmentedControl/SegmentedControl.stories.d.ts.map +1 -0
- package/dist/components/Inputs/Controls/SegmentedControl/SegmentedControl.stories.js +231 -0
- package/dist/components/Layout/AutoGrid/AutoGrid.stories.d.ts +7 -0
- package/dist/components/Layout/AutoGrid/AutoGrid.stories.d.ts.map +1 -0
- package/dist/components/Layout/AutoGrid/AutoGrid.stories.js +78 -0
- package/dist/components/Layout/Box/Box.d.ts +1 -3
- package/dist/components/Layout/Box/Box.d.ts.map +1 -1
- package/dist/components/Layout/Box/Box.js +2 -2
- package/dist/components/Layout/Box/Box.stories.d.ts +1 -2
- package/dist/components/Layout/Box/Box.stories.d.ts.map +1 -1
- package/dist/components/Layout/Box/Box.stories.js +27 -98
- package/dist/components/Layout/Card/Card.d.ts +1 -1
- package/dist/components/Layout/Card/Card.d.ts.map +1 -1
- package/dist/components/Layout/Card/Card.js +2 -2
- package/dist/components/Layout/Card/Card.stories.d.ts +10 -0
- package/dist/components/Layout/Card/Card.stories.d.ts.map +1 -0
- package/dist/components/Layout/Card/Card.stories.js +91 -0
- package/dist/components/Layout/Center/Center.d.ts +2 -3
- package/dist/components/Layout/Center/Center.d.ts.map +1 -1
- package/dist/components/Layout/Center/Center.js +2 -2
- package/dist/components/Layout/Center/Center.stories.d.ts +8 -0
- package/dist/components/Layout/Center/Center.stories.d.ts.map +1 -0
- package/dist/components/Layout/Center/Center.stories.js +69 -0
- package/dist/components/Layout/Divider/Divider.stories.d.ts +7 -0
- package/dist/components/Layout/Divider/Divider.stories.d.ts.map +1 -0
- package/dist/components/Layout/Divider/Divider.stories.js +67 -0
- package/dist/components/Layout/Frame/Frame.stories.d.ts +8 -0
- package/dist/components/Layout/Frame/Frame.stories.d.ts.map +1 -0
- package/dist/components/Layout/Frame/Frame.stories.js +77 -0
- package/dist/components/Layout/Grid/Grid.stories.d.ts +8 -0
- package/dist/components/Layout/Grid/Grid.stories.d.ts.map +1 -0
- package/dist/components/Layout/Grid/Grid.stories.js +71 -0
- package/dist/components/Layout/Group/Group.stories.d.ts +10 -0
- package/dist/components/Layout/Group/Group.stories.d.ts.map +1 -0
- package/dist/components/Layout/Group/Group.stories.js +113 -0
- package/dist/components/Layout/Loader/Loader.stories.d.ts +10 -0
- package/dist/components/Layout/Loader/Loader.stories.d.ts.map +1 -0
- package/dist/components/Layout/Loader/Loader.stories.js +67 -0
- package/dist/components/Layout/SectionCard/SectionCard.d.ts +3 -5
- package/dist/components/Layout/SectionCard/SectionCard.d.ts.map +1 -1
- package/dist/components/Layout/SectionCard/SectionCard.js +3 -8
- package/dist/components/Layout/SectionCard/SectionCard.stories.d.ts +9 -0
- package/dist/components/Layout/SectionCard/SectionCard.stories.d.ts.map +1 -0
- package/dist/components/Layout/SectionCard/SectionCard.stories.js +98 -0
- package/dist/components/Layout/Stack/Stack.stories.d.ts +1 -2
- package/dist/components/Layout/Stack/Stack.stories.d.ts.map +1 -1
- package/dist/components/Layout/Stack/Stack.stories.js +46 -66
- package/dist/components/Layout/Tabs/Tabs.d.ts +2 -4
- package/dist/components/Layout/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/Layout/Tabs/Tabs.js +2 -2
- package/dist/components/Layout/Tabs/Tabs.stories.d.ts +9 -0
- package/dist/components/Layout/Tabs/Tabs.stories.d.ts.map +1 -0
- package/dist/components/Layout/Tabs/Tabs.stories.js +140 -0
- package/dist/components/Misc/IconBadge/IconBadge.stories.d.ts +7 -0
- package/dist/components/Misc/IconBadge/IconBadge.stories.d.ts.map +1 -0
- package/dist/components/Misc/IconBadge/IconBadge.stories.js +48 -0
- package/dist/components/Typography/Formula/Formula.js +2 -2
- package/dist/components/Typography/Formula/Formula.stories.d.ts +10 -0
- package/dist/components/Typography/Formula/Formula.stories.d.ts.map +1 -0
- package/dist/components/Typography/Formula/Formula.stories.js +85 -0
- package/dist/components/Typography/Fraction/Fraction.d.ts.map +1 -1
- package/dist/components/Typography/Fraction/Fraction.stories.d.ts +9 -0
- package/dist/components/Typography/Fraction/Fraction.stories.d.ts.map +1 -0
- package/dist/components/Typography/Fraction/Fraction.stories.js +86 -0
- package/dist/components/Typography/Text/Text.d.ts.map +1 -1
- package/dist/components/Typography/Text/Text.js +6 -0
- package/dist/components/Typography/Text/Text.stories.d.ts +10 -0
- package/dist/components/Typography/Text/Text.stories.d.ts.map +1 -0
- package/dist/components/Typography/Text/Text.stories.js +101 -0
- package/dist/components/Typography/Title/Title.stories.d.ts +9 -0
- package/dist/components/Typography/Title/Title.stories.d.ts.map +1 -0
- package/dist/components/Typography/Title/Title.stories.js +98 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -0
- package/dist/constants/colors.d.ts +1 -0
- package/dist/constants/colors.d.ts.map +1 -1
- package/dist/constants/colors.js +1 -0
- package/dist/docs/AIGeneratedBanner.d.ts +2 -0
- package/dist/docs/AIGeneratedBanner.d.ts.map +1 -0
- package/dist/docs/AIGeneratedBanner.js +5 -0
- package/dist/docs/design/Colors.stories.d.ts +7 -0
- package/dist/docs/design/Colors.stories.d.ts.map +1 -0
- package/dist/docs/design/Colors.stories.js +28 -0
- package/dist/docs/hooks/Copy.stories.d.ts +6 -0
- package/dist/docs/hooks/Copy.stories.d.ts.map +1 -0
- package/dist/docs/hooks/Copy.stories.js +61 -0
- package/package.json +6 -6
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Card } from './Card';
|
|
3
|
+
import { AutoGrid } from '../AutoGrid/AutoGrid';
|
|
4
|
+
import { Title } from '../../Typography/Title/Title';
|
|
5
|
+
import { primary } from '../../../constants/colors';
|
|
6
|
+
const meta = {
|
|
7
|
+
title: 'Components/Layout/Card',
|
|
8
|
+
component: Card,
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: 'centered',
|
|
11
|
+
},
|
|
12
|
+
argTypes: {
|
|
13
|
+
children: {
|
|
14
|
+
control: false,
|
|
15
|
+
description: 'The content to display inside the card',
|
|
16
|
+
table: {
|
|
17
|
+
type: { summary: 'ReactNode' },
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
radius: {
|
|
21
|
+
control: { type: 'select' },
|
|
22
|
+
options: ['xs', 'sm', 'md', 'lg', 'xl'],
|
|
23
|
+
description: 'Border radius of the card',
|
|
24
|
+
table: {
|
|
25
|
+
type: { summary: "'xs' | 'sm' | 'md' | 'lg' | 'xl' | string | number" },
|
|
26
|
+
defaultValue: { summary: "'20px'" },
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
withBorder: {
|
|
30
|
+
control: { type: 'boolean' },
|
|
31
|
+
description: 'Show/hide card border',
|
|
32
|
+
table: {
|
|
33
|
+
type: { summary: 'boolean' },
|
|
34
|
+
defaultValue: { summary: 'true' },
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
animate: {
|
|
38
|
+
control: { type: 'boolean' },
|
|
39
|
+
description: 'Enable a lifting hover animation',
|
|
40
|
+
table: {
|
|
41
|
+
type: { summary: 'boolean' },
|
|
42
|
+
defaultValue: { summary: 'false' },
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
sx: {
|
|
46
|
+
control: { type: 'object' },
|
|
47
|
+
description: 'Custom styles to override with if necessary. Targets the root card element.',
|
|
48
|
+
table: {
|
|
49
|
+
type: { summary: 'Record<string, CSSObject>' },
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
export default meta;
|
|
55
|
+
export const Default = {
|
|
56
|
+
args: {
|
|
57
|
+
children: undefined,
|
|
58
|
+
animate: false,
|
|
59
|
+
radius: '20px',
|
|
60
|
+
withBorder: true,
|
|
61
|
+
},
|
|
62
|
+
decorators: [
|
|
63
|
+
(Story) => (_jsx("div", { style: { width: '400px' }, children: _jsx(Story, {}) })),
|
|
64
|
+
],
|
|
65
|
+
render: (args) => (_jsxs(Card, { ...args, children: [_jsx(Title, { variant: "cardHeader", children: "Card Title" }), _jsx(Title, { variant: "cardSubheader", children: "This is a basic card component that provides a clean container for grouping related content." })] })),
|
|
66
|
+
};
|
|
67
|
+
export const Animation = {
|
|
68
|
+
render: () => (_jsx("div", { style: { width: '400px' }, children: _jsxs(Card, { animate: true, children: [_jsx(Title, { variant: "cardHeader", children: "Hover over me" }), _jsx(Title, { variant: "cardSubheader", children: "This card lifts and enhances on hover." })] }) })),
|
|
69
|
+
};
|
|
70
|
+
export const WithAutoGrid = {
|
|
71
|
+
render: () => (_jsx("div", { style: { width: '700px' }, children: _jsx(AutoGrid, { cols: 3, spacing: "md", children: [1, 2, 3, 4, 5, 6].map((item) => (_jsxs(Card, { animate: true, children: [_jsxs(Title, { variant: "cardHeader", children: ["Card ", item] }), _jsx(Title, { variant: "cardSubheader", children: "Card content" })] }, item))) }) })),
|
|
72
|
+
};
|
|
73
|
+
export const CustomStyling = {
|
|
74
|
+
decorators: [
|
|
75
|
+
(Story) => (_jsx("div", { style: { width: '400px' }, children: _jsx(Story, {}) })),
|
|
76
|
+
],
|
|
77
|
+
render: () => (_jsxs(Card, { withBorder: false, sx: { background: primary[25], border: `1px solid ${primary[50]}` }, children: [_jsx(Title, { variant: "cardHeader", children: "Custom Card" }), _jsx(Title, { variant: "cardSubheader", children: "Styled with a custom background color and border." })] })),
|
|
78
|
+
parameters: {
|
|
79
|
+
docs: {
|
|
80
|
+
source: {
|
|
81
|
+
code: `<Card
|
|
82
|
+
withBorder={false}
|
|
83
|
+
sx={{ background: primary[25], border: '1px solid ${primary[50]}' }}
|
|
84
|
+
>
|
|
85
|
+
<Title variant="cardHeader">Custom Card</Title>
|
|
86
|
+
<Text>Styled with a custom background color and border.</Text>
|
|
87
|
+
</Card>`,
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { CenterProps as MantineCenterProps } from '@mantine/core';
|
|
2
|
-
import { CSSObject } from '@mantine/styles';
|
|
3
2
|
interface CenterProps extends MantineCenterProps {
|
|
4
3
|
width?: string | number;
|
|
5
|
-
|
|
4
|
+
height?: string | number;
|
|
6
5
|
}
|
|
7
|
-
declare const Center: ({ width,
|
|
6
|
+
declare const Center: ({ width, height, ...props }: CenterProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
export { Center };
|
|
9
8
|
//# sourceMappingURL=Center.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Center.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/Center/Center.tsx"],"names":[],"mappings":"AACA,OAAO,EAA2B,WAAW,IAAI,kBAAkB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"Center.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/Center/Center.tsx"],"names":[],"mappings":"AACA,OAAO,EAA2B,WAAW,IAAI,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAE3F,UAAU,WAAY,SAAQ,kBAAkB;IAC9C,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC1B;AAED,QAAA,MAAM,MAAM,GAAI,6BAA6B,WAAW,4CAEvD,CAAC;AAEF,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Center as MantineCenter } from '@mantine/core';
|
|
3
|
-
const Center = ({ width,
|
|
4
|
-
return _jsx(MantineCenter, { w: width,
|
|
3
|
+
const Center = ({ width, height, ...props }) => {
|
|
4
|
+
return _jsx(MantineCenter, { w: width, h: height, ...props });
|
|
5
5
|
};
|
|
6
6
|
export { Center };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Center } from './Center';
|
|
3
|
+
declare const meta: Meta<typeof Center>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const CenteringLayouts: Story;
|
|
8
|
+
//# sourceMappingURL=Center.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Center.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/Center/Center.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAMlC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CAsC7B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAcrB,CAAC;AASF,eAAO,MAAM,gBAAgB,EAAE,KAkB9B,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Center } from './Center';
|
|
3
|
+
import { Text } from '../../Typography/Text/Text';
|
|
4
|
+
import { neutral } from '../../../constants/colors';
|
|
5
|
+
import { Title } from '../../Typography/Title/Title';
|
|
6
|
+
import { Card, Stack } from '../../..';
|
|
7
|
+
const meta = {
|
|
8
|
+
title: 'Components/Layout/Center',
|
|
9
|
+
component: Center,
|
|
10
|
+
parameters: {
|
|
11
|
+
layout: 'centered',
|
|
12
|
+
},
|
|
13
|
+
argTypes: {
|
|
14
|
+
children: {
|
|
15
|
+
control: false,
|
|
16
|
+
description: 'Content within the container to center',
|
|
17
|
+
table: {
|
|
18
|
+
type: { summary: 'ReactNode' },
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
width: {
|
|
22
|
+
control: { type: 'text' },
|
|
23
|
+
description: 'Width of the center container',
|
|
24
|
+
table: {
|
|
25
|
+
type: { summary: 'string | number' },
|
|
26
|
+
defaultValue: { summary: 'auto' },
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
height: {
|
|
30
|
+
control: { type: 'text' },
|
|
31
|
+
description: 'Height of the center container',
|
|
32
|
+
table: {
|
|
33
|
+
type: { summary: 'string | number' },
|
|
34
|
+
defaultValue: { summary: 'auto' },
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
sx: {
|
|
38
|
+
control: { type: 'object' },
|
|
39
|
+
description: 'Custom styles applied to the root element',
|
|
40
|
+
table: {
|
|
41
|
+
type: { summary: 'CSSObject' },
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
export default meta;
|
|
47
|
+
export const Default = {
|
|
48
|
+
args: {
|
|
49
|
+
children: undefined,
|
|
50
|
+
width: '400px',
|
|
51
|
+
height: '400px',
|
|
52
|
+
sx: {
|
|
53
|
+
backgroundColor: neutral[25],
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
render: (args) => (_jsx(Center, { ...args, children: _jsx(Text, { children: "Centered Content" }) })),
|
|
57
|
+
};
|
|
58
|
+
const SampleCard = ({ title, description }) => (_jsxs(Card, { animate: true, children: [_jsx(Title, { variant: "cardHeader", children: title }), _jsx(Title, { variant: "cardSubheader", children: description })] }));
|
|
59
|
+
export const CenteringLayouts = {
|
|
60
|
+
args: {
|
|
61
|
+
height: '500px',
|
|
62
|
+
width: '700px',
|
|
63
|
+
sx: {
|
|
64
|
+
backgroundColor: neutral[25],
|
|
65
|
+
border: `1px dashed ${neutral[50]}`,
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
render: (args) => (_jsx(Center, { ...args, children: _jsxs(Stack, { spacing: "md", sx: { width: '300px' }, children: [_jsx(SampleCard, { title: "Card 1", description: "Centered layout" }), _jsx(SampleCard, { title: "Card 2", description: "Centered layout" }), _jsx(SampleCard, { title: "Card 3", description: "Centered layout" })] }) })),
|
|
69
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Divider } from './Divider';
|
|
3
|
+
declare const meta: Meta<typeof Divider>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
//# sourceMappingURL=Divider.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Divider.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/Divider/Divider.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,OAAO,CAiD9B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAqBrB,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Divider } from './Divider';
|
|
3
|
+
import { Text } from '../../Typography/Text/Text';
|
|
4
|
+
import { Stack } from '../Stack/Stack';
|
|
5
|
+
const meta = {
|
|
6
|
+
title: 'Components/Layout/Divider',
|
|
7
|
+
component: Divider,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'centered',
|
|
10
|
+
},
|
|
11
|
+
argTypes: {
|
|
12
|
+
orientation: {
|
|
13
|
+
control: { type: 'select' },
|
|
14
|
+
options: ['horizontal', 'vertical'],
|
|
15
|
+
description: 'Orientation of the divider (WIP)',
|
|
16
|
+
table: {
|
|
17
|
+
type: { summary: "'horizontal' | 'vertical'" },
|
|
18
|
+
defaultValue: { summary: "'horizontal'" },
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
size: {
|
|
22
|
+
control: { type: 'select' },
|
|
23
|
+
options: ['xs', 'sm', 'md', 'lg', 'xl'],
|
|
24
|
+
description: 'Thickness of the divider',
|
|
25
|
+
table: {
|
|
26
|
+
type: { summary: "'xs' | 'sm' | 'md' | 'lg' | 'xl' | string | number" },
|
|
27
|
+
defaultValue: { summary: "'md'" },
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
color: {
|
|
31
|
+
control: { type: 'color' },
|
|
32
|
+
description: 'Color of the divider',
|
|
33
|
+
table: {
|
|
34
|
+
type: { summary: 'string' },
|
|
35
|
+
defaultValue: { summary: 'neutral[50]' },
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
width: {
|
|
39
|
+
control: { type: 'text' },
|
|
40
|
+
description: 'Custom width override',
|
|
41
|
+
table: {
|
|
42
|
+
type: { summary: 'string | number' },
|
|
43
|
+
defaultValue: { summary: "'100%'" },
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
styles: {
|
|
47
|
+
control: { type: 'object' },
|
|
48
|
+
description: 'Custom styles override - use this sparingly',
|
|
49
|
+
table: {
|
|
50
|
+
type: { summary: 'Record<string, CSSObject>' },
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
export default meta;
|
|
56
|
+
export const Default = {
|
|
57
|
+
args: {
|
|
58
|
+
size: undefined,
|
|
59
|
+
color: undefined,
|
|
60
|
+
width: undefined,
|
|
61
|
+
orientation: undefined,
|
|
62
|
+
},
|
|
63
|
+
decorators: [
|
|
64
|
+
(Story) => (_jsx("div", { style: { width: '400px' }, children: _jsx(Story, {}) })),
|
|
65
|
+
],
|
|
66
|
+
render: (args) => (_jsxs(Stack, { children: [_jsx(Text, { children: "Content above" }), _jsx(Divider, { ...args }), _jsx(Text, { children: "Content below" })] })),
|
|
67
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Frame } from './Frame';
|
|
3
|
+
declare const meta: Meta<typeof Frame>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const UseCases: Story;
|
|
8
|
+
//# sourceMappingURL=Frame.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Frame.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/Frame/Frame.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAUhC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,KAAK,CA4C5B,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,KAqDtB,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Frame } from './Frame';
|
|
3
|
+
import { Text } from '../../Typography/Text/Text';
|
|
4
|
+
import { Stack } from '../Stack/Stack';
|
|
5
|
+
import { Button } from '../../Inputs/Buttons/Button/Button';
|
|
6
|
+
import { neutral } from '../../../constants/colors';
|
|
7
|
+
import { Card } from '../Card/Card';
|
|
8
|
+
import { Title } from '../../Typography/Title/Title';
|
|
9
|
+
import { TextInput } from '../../Inputs/TextInputs/TextInput/TextInput';
|
|
10
|
+
import { Group } from '../Group/Group';
|
|
11
|
+
const meta = {
|
|
12
|
+
title: 'Components/Layout/Frame',
|
|
13
|
+
component: Frame,
|
|
14
|
+
parameters: {
|
|
15
|
+
layout: 'centered',
|
|
16
|
+
},
|
|
17
|
+
argTypes: {
|
|
18
|
+
title: {
|
|
19
|
+
control: { type: 'text' },
|
|
20
|
+
description: 'Section header title',
|
|
21
|
+
table: {
|
|
22
|
+
type: { summary: 'string' },
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
subtitle: {
|
|
26
|
+
control: { type: 'text' },
|
|
27
|
+
description: 'Optional subtitle below the title',
|
|
28
|
+
table: {
|
|
29
|
+
type: { summary: 'string' },
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
children: {
|
|
33
|
+
control: false,
|
|
34
|
+
description: 'Content displayed below the header',
|
|
35
|
+
table: {
|
|
36
|
+
type: { summary: 'ReactNode' },
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
width: {
|
|
40
|
+
control: { type: 'text' },
|
|
41
|
+
description: 'Width of the frame',
|
|
42
|
+
table: {
|
|
43
|
+
type: { summary: 'string | number' },
|
|
44
|
+
defaultValue: { summary: "'100%'" },
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
styles: {
|
|
48
|
+
control: { type: 'object' },
|
|
49
|
+
description: 'Custom styles override - use this sparingly',
|
|
50
|
+
table: {
|
|
51
|
+
type: { summary: 'Record<string, CSSObject>' },
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
export default meta;
|
|
57
|
+
export const Default = {
|
|
58
|
+
args: {
|
|
59
|
+
children: undefined,
|
|
60
|
+
title: 'Frame Title',
|
|
61
|
+
subtitle: 'Optional subtitle text',
|
|
62
|
+
width: '500px',
|
|
63
|
+
},
|
|
64
|
+
render: (args) => (_jsx(Frame, { ...args, children: _jsx("div", { style: {
|
|
65
|
+
backgroundColor: neutral[25],
|
|
66
|
+
border: `1px dashed ${neutral[50]}`,
|
|
67
|
+
borderRadius: '8px',
|
|
68
|
+
padding: '2rem',
|
|
69
|
+
display: 'flex',
|
|
70
|
+
alignItems: 'center',
|
|
71
|
+
justifyContent: 'center',
|
|
72
|
+
minHeight: '150px',
|
|
73
|
+
}, children: _jsx(Text, { children: "Frame Content" }) }) })),
|
|
74
|
+
};
|
|
75
|
+
export const UseCases = {
|
|
76
|
+
render: () => (_jsxs(Stack, { gap: "3rem", sx: { width: '500px' }, children: [_jsx(Frame, { title: "User Details", subtitle: "Enter your user details", children: _jsxs(Stack, { gap: "1.6rem", children: [_jsx(TextInput, { label: "Name", placeholder: "Enter your name", type: "text", fullWidth: true }), _jsx(TextInput, { label: "Email", placeholder: "Enter your email", type: "email", fullWidth: true }), _jsxs(Group, { children: [_jsx(Button, { variant: "primary", children: "Save" }), _jsx(Button, { variant: "secondary", children: "Cancel" })] })] }) }), _jsx(Frame, { title: "Your Items", subtitle: "View your recent items", children: _jsx(Stack, { gap: "sm", children: [1, 2, 3].map((item) => (_jsxs(Card, { children: [_jsxs(Title, { variant: "cardHeader", children: ["Item ", item] }), _jsxs(Title, { variant: "cardSubheader", children: ["Description for item ", item] })] }, item))) }) }), _jsx(Frame, { title: "Stats This Week", children: _jsxs("div", { style: { display: 'flex', gap: '1rem', alignItems: 'stretch' }, children: [_jsxs("div", { style: { textAlign: 'center', padding: '1rem', backgroundColor: neutral[25], borderRadius: '8px', flex: 1 }, children: [_jsx(Text, { size: "xl", weight: "bold", children: "42" }), _jsx(Text, { size: "sm", color: neutral[100], children: "Ads Played" })] }), _jsxs("div", { style: { textAlign: 'center', padding: '1rem', backgroundColor: neutral[25], borderRadius: '8px', flex: 1 }, children: [_jsx(Text, { size: "xl", weight: "bold", children: "1.2K" }), _jsx(Text, { size: "sm", color: neutral[100], children: "Impressions" })] }), _jsxs("div", { style: { textAlign: 'center', padding: '1rem', backgroundColor: neutral[25], borderRadius: '8px', flex: 1 }, children: [_jsx(Text, { size: "xl", weight: "bold", children: "89%" }), _jsx(Text, { size: "sm", color: neutral[100], children: "Revenue Growth" })] })] }) })] })),
|
|
77
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Grid } from './Grid';
|
|
3
|
+
declare const meta: Meta<typeof Grid>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const ColumnSpans: Story;
|
|
8
|
+
//# sourceMappingURL=Grid.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Grid.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/Grid/Grid.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAO9B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,IAAI,CA+C3B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AASnC,eAAO,MAAM,OAAO,EAAE,KA4BrB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAuBzB,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Grid } from './Grid';
|
|
3
|
+
import { Card } from '../Card/Card';
|
|
4
|
+
import { Title } from '../../Typography/Title/Title';
|
|
5
|
+
import { Stack } from '../Stack/Stack';
|
|
6
|
+
const meta = {
|
|
7
|
+
title: 'Components/Layout/Grid',
|
|
8
|
+
component: Grid,
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: 'centered',
|
|
11
|
+
},
|
|
12
|
+
argTypes: {
|
|
13
|
+
children: {
|
|
14
|
+
control: false,
|
|
15
|
+
description: 'Content for the Grid - each child node should also be within a <Grid.Col> element',
|
|
16
|
+
table: {
|
|
17
|
+
type: { summary: 'ReactNode' },
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
gutter: {
|
|
21
|
+
control: { type: 'select' },
|
|
22
|
+
options: ['xs', 'sm', 'md', 'lg', 'xl'],
|
|
23
|
+
description: 'Spacing between columns',
|
|
24
|
+
table: {
|
|
25
|
+
type: { summary: "'xs' | 'sm' | 'md' | 'lg' | 'xl' | number" },
|
|
26
|
+
defaultValue: { summary: "'md'" },
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
align: {
|
|
30
|
+
control: { type: 'select' },
|
|
31
|
+
options: ['flex-start', 'center', 'flex-end', 'stretch', 'baseline'],
|
|
32
|
+
description: 'Vertical alignment of grid items',
|
|
33
|
+
table: {
|
|
34
|
+
type: { summary: "'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline'" },
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
justify: {
|
|
38
|
+
control: { type: 'select' },
|
|
39
|
+
options: ['flex-start', 'center', 'flex-end', 'space-between', 'space-around', 'space-evenly'],
|
|
40
|
+
description: 'Horizontal alignment of grid items',
|
|
41
|
+
table: {
|
|
42
|
+
type: { summary: "'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly'" },
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
styles: {
|
|
46
|
+
control: { type: 'object' },
|
|
47
|
+
description: 'Custom styles to override with if necessary',
|
|
48
|
+
table: {
|
|
49
|
+
type: { summary: 'Record<string, CSSObject>' },
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
export default meta;
|
|
55
|
+
const SampleCard = ({ title, description }) => (_jsxs(Card, { animate: true, children: [_jsx(Title, { variant: "cardHeader", children: title }), _jsx(Title, { variant: "cardSubheader", children: description })] }));
|
|
56
|
+
export const Default = {
|
|
57
|
+
args: {
|
|
58
|
+
children: undefined,
|
|
59
|
+
gutter: undefined,
|
|
60
|
+
align: undefined,
|
|
61
|
+
justify: undefined,
|
|
62
|
+
styles: undefined,
|
|
63
|
+
},
|
|
64
|
+
decorators: [
|
|
65
|
+
(Story) => (_jsx("div", { style: { width: '700px' }, children: _jsx(Story, {}) })),
|
|
66
|
+
],
|
|
67
|
+
render: (args) => (_jsxs(Grid, { ...args, children: [_jsx(Grid.Col, { span: 4, children: _jsx(SampleCard, { title: "Column 1", description: "span={4}" }) }), _jsx(Grid.Col, { span: 4, children: _jsx(SampleCard, { title: "Column 2", description: "span={4}" }) }), _jsx(Grid.Col, { span: 4, children: _jsx(SampleCard, { title: "Column 3", description: "span={4}" }) })] })),
|
|
68
|
+
};
|
|
69
|
+
export const ColumnSpans = {
|
|
70
|
+
render: () => (_jsxs(Stack, { spacing: "md", sx: { width: '700px' }, children: [_jsxs(Grid, { gutter: "md", children: [_jsx(Grid.Col, { span: 6, children: _jsx(SampleCard, { title: "Column 1", description: "span={6}" }) }), _jsx(Grid.Col, { span: 6, children: _jsx(SampleCard, { title: "Column 2", description: "span={6}" }) })] }), _jsxs(Grid, { gutter: "md", children: [_jsx(Grid.Col, { span: 8, children: _jsx(SampleCard, { title: "Main Content", description: "span={8}" }) }), _jsx(Grid.Col, { span: 4, children: _jsx(SampleCard, { title: "Sidebar", description: "span={4}" }) })] }), _jsxs(Grid, { gutter: "md", children: [_jsx(Grid.Col, { span: 4, children: _jsx(SampleCard, { title: "Column 1", description: "span={4}" }) }), _jsx(Grid.Col, { span: 4, children: _jsx(SampleCard, { title: "Column 2", description: "span={4}" }) }), _jsx(Grid.Col, { span: 4, children: _jsx(SampleCard, { title: "Column 3", description: "span={4}" }) })] }), _jsxs(Grid, { gutter: "md", children: [_jsx(Grid.Col, { span: 3, children: _jsx(SampleCard, { title: "Left", description: "span={3}" }) }), _jsx(Grid.Col, { span: 6, children: _jsx(SampleCard, { title: "Center", description: "span={6}" }) }), _jsx(Grid.Col, { span: 3, children: _jsx(SampleCard, { title: "Right", description: "span={3}" }) })] })] })),
|
|
71
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Group } from './Group';
|
|
3
|
+
declare const meta: Meta<typeof Group>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const PositionAlign: Story;
|
|
8
|
+
export declare const WrapItems: Story;
|
|
9
|
+
export declare const GrowItems: Story;
|
|
10
|
+
//# sourceMappingURL=Group.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Group.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/Group/Group.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,CA8E5B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAQnC,eAAO,MAAM,OAAO,EAAE,KA0BrB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAc3B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAuBvB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAUvB,CAAC"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Group } from './Group';
|
|
3
|
+
import { Text } from '../../Typography/Text/Text';
|
|
4
|
+
import { Card } from '../Card/Card';
|
|
5
|
+
import { Stack } from '../Stack/Stack';
|
|
6
|
+
import { neutral } from '../../../constants/colors';
|
|
7
|
+
const meta = {
|
|
8
|
+
title: 'Components/Layout/Group',
|
|
9
|
+
component: Group,
|
|
10
|
+
parameters: {
|
|
11
|
+
layout: 'centered',
|
|
12
|
+
},
|
|
13
|
+
argTypes: {
|
|
14
|
+
children: {
|
|
15
|
+
control: false,
|
|
16
|
+
description: 'Content to arrange horizontally',
|
|
17
|
+
table: {
|
|
18
|
+
type: { summary: 'ReactNode' },
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
position: {
|
|
22
|
+
control: { type: 'select' },
|
|
23
|
+
options: ['left', 'center', 'right', 'apart'],
|
|
24
|
+
description: 'Horizontal alignment of children',
|
|
25
|
+
table: {
|
|
26
|
+
type: { summary: "'left' | 'center' | 'right' | 'apart'" },
|
|
27
|
+
defaultValue: { summary: "'left'" },
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
align: {
|
|
31
|
+
control: { type: 'select' },
|
|
32
|
+
options: ['stretch', 'center', 'flex-start', 'flex-end'],
|
|
33
|
+
description: 'Vertical alignment of children',
|
|
34
|
+
table: {
|
|
35
|
+
type: { summary: "'stretch' | 'center' | 'flex-start' | 'flex-end'" },
|
|
36
|
+
defaultValue: { summary: "'stretch'" },
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
gap: {
|
|
40
|
+
control: { type: 'text' },
|
|
41
|
+
description: 'Spacing between items',
|
|
42
|
+
table: {
|
|
43
|
+
type: { summary: 'string' },
|
|
44
|
+
defaultValue: { summary: '16px' },
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
noWrap: {
|
|
48
|
+
control: { type: 'boolean' },
|
|
49
|
+
description: 'Prevent items from wrapping to new lines',
|
|
50
|
+
table: {
|
|
51
|
+
type: { summary: 'boolean' },
|
|
52
|
+
defaultValue: { summary: 'false' },
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
grow: {
|
|
56
|
+
control: { type: 'boolean' },
|
|
57
|
+
description: 'Whether children grow to fill available space',
|
|
58
|
+
table: {
|
|
59
|
+
type: { summary: 'boolean' },
|
|
60
|
+
defaultValue: { summary: 'false' },
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
width: {
|
|
64
|
+
control: { type: 'text' },
|
|
65
|
+
description: 'Custom width override',
|
|
66
|
+
table: {
|
|
67
|
+
type: { summary: 'string | number' },
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
h: {
|
|
71
|
+
control: { type: 'text' },
|
|
72
|
+
description: 'Custom height override - use this sparingly',
|
|
73
|
+
table: {
|
|
74
|
+
type: { summary: 'string | number' },
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
styles: {
|
|
78
|
+
control: { type: 'object' },
|
|
79
|
+
description: 'Custom styles override - use this sparingly',
|
|
80
|
+
table: {
|
|
81
|
+
type: { summary: 'Record<string, CSSObject>' },
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
export default meta;
|
|
87
|
+
const SampleCard = ({ label }) => (_jsx(Card, { styles: { root: { overflow: 'hidden' } }, children: _jsx(Text, { truncate: "end", weight: "bold", children: label }) }));
|
|
88
|
+
export const Default = {
|
|
89
|
+
args: {
|
|
90
|
+
children: undefined,
|
|
91
|
+
gap: undefined,
|
|
92
|
+
position: undefined,
|
|
93
|
+
align: undefined,
|
|
94
|
+
grow: false,
|
|
95
|
+
noWrap: false,
|
|
96
|
+
width: undefined,
|
|
97
|
+
h: undefined,
|
|
98
|
+
styles: undefined,
|
|
99
|
+
},
|
|
100
|
+
decorators: [
|
|
101
|
+
(Story) => (_jsx("div", { style: { width: '500px', backgroundColor: neutral[25], padding: '2rem' }, children: _jsx(Story, {}) })),
|
|
102
|
+
],
|
|
103
|
+
render: (args) => (_jsxs(Group, { ...args, children: [_jsx(SampleCard, { label: "Item 1" }), _jsx(SampleCard, { label: "Item 2" }), _jsx(SampleCard, { label: "Item 3" })] })),
|
|
104
|
+
};
|
|
105
|
+
export const PositionAlign = {
|
|
106
|
+
render: () => (_jsx(Stack, { spacing: "md", sx: { width: '500px' }, children: ['left', 'center', 'right', 'apart'].map((pos) => (_jsxs("div", { children: [_jsx(Text, { variant: "label", mb: "sm", children: _jsxs("code", { children: ["position=", '"' + pos + '"'] }) }), _jsxs(Group, { position: pos, spacing: "sm", sx: { backgroundColor: neutral[25], padding: '0.5rem' }, children: [_jsx(SampleCard, { label: "A" }), _jsx(SampleCard, { label: "B" })] })] }, pos))) })),
|
|
107
|
+
};
|
|
108
|
+
export const WrapItems = {
|
|
109
|
+
render: () => (_jsxs(Stack, { gap: "4rem", children: [_jsxs("div", { children: [_jsxs(Text, { variant: "label", mb: "sm", children: [_jsxs("code", { children: ["noWrap=", '{false}'] }), " (default, will continue to grow vertically)"] }), _jsxs(Group, { sx: { backgroundColor: neutral[25], padding: '0.5rem', width: '250px' }, children: [_jsx(SampleCard, { label: "First" }), _jsx(SampleCard, { label: "Second" }), _jsx(SampleCard, { label: "Third" }), _jsx(SampleCard, { label: "Fourth" })] })] }), _jsxs("div", { children: [_jsxs(Text, { variant: "label", mb: "sm", children: [_jsxs("code", { children: ["noWrap=", '{true}'] }), ", combined with ", _jsx("code", { children: "overflow='hidden'" }), " on the card and ", _jsx("code", { children: "truncate='end'" }), " on the text"] }), _jsxs(Group, { noWrap: true, spacing: "sm", sx: { backgroundColor: neutral[25], padding: '0.5rem', width: '250px' }, children: [_jsx(SampleCard, { label: "First" }), _jsx(SampleCard, { label: "Second" }), _jsx(SampleCard, { label: "Third" }), _jsx(SampleCard, { label: "Fourth" })] })] })] })),
|
|
110
|
+
};
|
|
111
|
+
export const GrowItems = {
|
|
112
|
+
render: () => (_jsxs("div", { children: [_jsx(Text, { variant: "label", mb: "sm", children: _jsxs("code", { children: ["grow=", '{true}'] }) }), _jsxs(Group, { grow: true, spacing: "sm", sx: { backgroundColor: neutral[25], padding: '0.5rem', width: '400px' }, children: [_jsx(SampleCard, { label: "A" }), _jsx(SampleCard, { label: "B" })] })] })),
|
|
113
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Loader } from './Loader';
|
|
3
|
+
declare const meta: Meta<typeof Loader>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const LoadingNotification: Story;
|
|
8
|
+
export declare const ButtonLoading: Story;
|
|
9
|
+
export declare const CenteredLoader: Story;
|
|
10
|
+
//# sourceMappingURL=Loader.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Loader.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/Loader/Loader.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AASlC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CAiB7B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAyBF,eAAO,MAAM,mBAAmB,EAAE,KAKjC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAK3B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAiB5B,CAAC"}
|