@taiv/ui 1.12.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 (101) 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/Layout/AutoGrid/AutoGrid.stories.d.ts +7 -0
  20. package/dist/components/Layout/AutoGrid/AutoGrid.stories.d.ts.map +1 -0
  21. package/dist/components/Layout/AutoGrid/AutoGrid.stories.js +78 -0
  22. package/dist/components/Layout/Box/Box.d.ts +1 -3
  23. package/dist/components/Layout/Box/Box.d.ts.map +1 -1
  24. package/dist/components/Layout/Box/Box.js +2 -2
  25. package/dist/components/Layout/Box/Box.stories.d.ts +1 -2
  26. package/dist/components/Layout/Box/Box.stories.d.ts.map +1 -1
  27. package/dist/components/Layout/Box/Box.stories.js +27 -98
  28. package/dist/components/Layout/Card/Card.d.ts +1 -1
  29. package/dist/components/Layout/Card/Card.d.ts.map +1 -1
  30. package/dist/components/Layout/Card/Card.js +2 -2
  31. package/dist/components/Layout/Card/Card.stories.d.ts +10 -0
  32. package/dist/components/Layout/Card/Card.stories.d.ts.map +1 -0
  33. package/dist/components/Layout/Card/Card.stories.js +91 -0
  34. package/dist/components/Layout/Center/Center.d.ts +2 -3
  35. package/dist/components/Layout/Center/Center.d.ts.map +1 -1
  36. package/dist/components/Layout/Center/Center.js +2 -2
  37. package/dist/components/Layout/Center/Center.stories.d.ts +8 -0
  38. package/dist/components/Layout/Center/Center.stories.d.ts.map +1 -0
  39. package/dist/components/Layout/Center/Center.stories.js +69 -0
  40. package/dist/components/Layout/Divider/Divider.stories.d.ts +7 -0
  41. package/dist/components/Layout/Divider/Divider.stories.d.ts.map +1 -0
  42. package/dist/components/Layout/Divider/Divider.stories.js +67 -0
  43. package/dist/components/Layout/Frame/Frame.stories.d.ts +8 -0
  44. package/dist/components/Layout/Frame/Frame.stories.d.ts.map +1 -0
  45. package/dist/components/Layout/Frame/Frame.stories.js +77 -0
  46. package/dist/components/Layout/Grid/Grid.stories.d.ts +8 -0
  47. package/dist/components/Layout/Grid/Grid.stories.d.ts.map +1 -0
  48. package/dist/components/Layout/Grid/Grid.stories.js +71 -0
  49. package/dist/components/Layout/Group/Group.stories.d.ts +10 -0
  50. package/dist/components/Layout/Group/Group.stories.d.ts.map +1 -0
  51. package/dist/components/Layout/Group/Group.stories.js +113 -0
  52. package/dist/components/Layout/Loader/Loader.stories.d.ts +10 -0
  53. package/dist/components/Layout/Loader/Loader.stories.d.ts.map +1 -0
  54. package/dist/components/Layout/Loader/Loader.stories.js +67 -0
  55. package/dist/components/Layout/SectionCard/SectionCard.d.ts +3 -5
  56. package/dist/components/Layout/SectionCard/SectionCard.d.ts.map +1 -1
  57. package/dist/components/Layout/SectionCard/SectionCard.js +3 -8
  58. package/dist/components/Layout/SectionCard/SectionCard.stories.d.ts +9 -0
  59. package/dist/components/Layout/SectionCard/SectionCard.stories.d.ts.map +1 -0
  60. package/dist/components/Layout/SectionCard/SectionCard.stories.js +98 -0
  61. package/dist/components/Layout/Stack/Stack.stories.d.ts +1 -2
  62. package/dist/components/Layout/Stack/Stack.stories.d.ts.map +1 -1
  63. package/dist/components/Layout/Stack/Stack.stories.js +46 -66
  64. package/dist/components/Layout/Tabs/Tabs.d.ts +2 -4
  65. package/dist/components/Layout/Tabs/Tabs.d.ts.map +1 -1
  66. package/dist/components/Layout/Tabs/Tabs.js +2 -2
  67. package/dist/components/Layout/Tabs/Tabs.stories.d.ts +9 -0
  68. package/dist/components/Layout/Tabs/Tabs.stories.d.ts.map +1 -0
  69. package/dist/components/Layout/Tabs/Tabs.stories.js +140 -0
  70. package/dist/components/Misc/IconBadge/IconBadge.stories.d.ts +7 -0
  71. package/dist/components/Misc/IconBadge/IconBadge.stories.d.ts.map +1 -0
  72. package/dist/components/Misc/IconBadge/IconBadge.stories.js +48 -0
  73. package/dist/components/Typography/Formula/Formula.js +2 -2
  74. package/dist/components/Typography/Formula/Formula.stories.d.ts +10 -0
  75. package/dist/components/Typography/Formula/Formula.stories.d.ts.map +1 -0
  76. package/dist/components/Typography/Formula/Formula.stories.js +85 -0
  77. package/dist/components/Typography/Fraction/Fraction.d.ts.map +1 -1
  78. package/dist/components/Typography/Fraction/Fraction.stories.d.ts +9 -0
  79. package/dist/components/Typography/Fraction/Fraction.stories.d.ts.map +1 -0
  80. package/dist/components/Typography/Fraction/Fraction.stories.js +86 -0
  81. package/dist/components/Typography/Text/Text.d.ts.map +1 -1
  82. package/dist/components/Typography/Text/Text.js +6 -0
  83. package/dist/components/Typography/Text/Text.stories.d.ts +10 -0
  84. package/dist/components/Typography/Text/Text.stories.d.ts.map +1 -0
  85. package/dist/components/Typography/Text/Text.stories.js +101 -0
  86. package/dist/components/Typography/Title/Title.stories.d.ts +9 -0
  87. package/dist/components/Typography/Title/Title.stories.d.ts.map +1 -0
  88. package/dist/components/Typography/Title/Title.stories.js +98 -0
  89. package/dist/constants/colors.d.ts +1 -0
  90. package/dist/constants/colors.d.ts.map +1 -1
  91. package/dist/constants/colors.js +1 -0
  92. package/dist/docs/AIGeneratedBanner.d.ts +2 -0
  93. package/dist/docs/AIGeneratedBanner.d.ts.map +1 -0
  94. package/dist/docs/AIGeneratedBanner.js +5 -0
  95. package/dist/docs/design/Colors.stories.d.ts +7 -0
  96. package/dist/docs/design/Colors.stories.d.ts.map +1 -0
  97. package/dist/docs/design/Colors.stories.js +28 -0
  98. package/dist/docs/hooks/Copy.stories.d.ts +6 -0
  99. package/dist/docs/hooks/Copy.stories.d.ts.map +1 -0
  100. package/dist/docs/hooks/Copy.stories.js +61 -0
  101. package/package.json +6 -6
@@ -0,0 +1,78 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { AutoGrid } from './AutoGrid';
3
+ import { Card } from '../Card/Card';
4
+ import { Title } from '../../Typography/Title/Title';
5
+ const meta = {
6
+ title: 'Components/Layout/AutoGrid',
7
+ component: AutoGrid,
8
+ parameters: {
9
+ layout: 'centered',
10
+ docs: {
11
+ description: {
12
+ component: "[View Mantine Docs](https://v6.mantine.dev/core/simple-grid/)\n\nThe AutoGrid component is a responsive grid where each item takes an equal amount of space. It extends Mantine v6's SimpleGrid component and provides automatic column distribution with customizable spacing.",
13
+ },
14
+ },
15
+ },
16
+ argTypes: {
17
+ children: {
18
+ control: false,
19
+ description: 'Content for the AutoGrid - each child node is a grid item',
20
+ table: {
21
+ type: { summary: 'ReactNode' },
22
+ },
23
+ },
24
+ cols: {
25
+ control: { type: 'number' },
26
+ description: 'Number of columns in each row',
27
+ table: {
28
+ type: { summary: 'number | ResponsiveObject' },
29
+ defaultValue: { summary: '1' },
30
+ },
31
+ },
32
+ spacing: {
33
+ control: { type: 'select' },
34
+ options: ['xs', 'sm', 'md', 'lg', 'xl'],
35
+ description: 'Horizontal spacing between items',
36
+ table: {
37
+ type: { summary: "'xs' | 'sm' | 'md' | 'lg' | 'xl' | number" },
38
+ defaultValue: { summary: "'md'" },
39
+ },
40
+ },
41
+ verticalSpacing: {
42
+ control: { type: 'select' },
43
+ options: ['xs', 'sm', 'md', 'lg', 'xl'],
44
+ description: 'Vertical spacing between items',
45
+ table: {
46
+ type: { summary: "'xs' | 'sm' | 'md' | 'lg' | 'xl' | number" },
47
+ },
48
+ },
49
+ styles: {
50
+ control: { type: 'object' },
51
+ description: 'Custom styles to override with if necessary',
52
+ table: {
53
+ type: { summary: 'Record<string, CSSObject>' },
54
+ },
55
+ },
56
+ },
57
+ };
58
+ export default meta;
59
+ const SampleCard = ({ title, description }) => (_jsxs(Card, { animate: true, padding: "lg", children: [_jsx(Title, { variant: "cardHeader", children: title }), _jsx(Title, { variant: "cardSubheader", children: description })] }));
60
+ const items = [
61
+ { id: 1, title: 'Item 1', description: 'Grid item content' },
62
+ { id: 2, title: 'Item 2', description: 'Grid item content' },
63
+ { id: 3, title: 'Item 3', description: 'Grid item content' },
64
+ { id: 4, title: 'Item 4', description: 'Grid item content' },
65
+ { id: 5, title: 'Item 5', description: 'Grid item content' },
66
+ { id: 6, title: 'Item 6', description: 'Grid item content' },
67
+ ];
68
+ export const Default = {
69
+ args: {
70
+ children: undefined,
71
+ cols: 3,
72
+ spacing: 'md',
73
+ },
74
+ decorators: [
75
+ (Story) => (_jsx("div", { style: { width: '700px' }, children: _jsx(Story, {}) })),
76
+ ],
77
+ render: (args) => (_jsx(AutoGrid, { ...args, children: items.map((item) => (_jsx(SampleCard, { title: item.title, description: item.description }, item.id))) })),
78
+ };
@@ -1,10 +1,8 @@
1
1
  import { BoxProps as MantineBoxProps } from '@mantine/core';
2
- import { CSSObject } from '@mantine/styles';
3
2
  interface BoxProps extends MantineBoxProps {
4
3
  width?: string | number;
5
4
  onClick?: () => void;
6
- styles?: Record<string, CSSObject>;
7
5
  }
8
- declare const Box: ({ width, styles, onClick, ...props }: BoxProps) => import("react/jsx-runtime").JSX.Element;
6
+ declare const Box: ({ width, onClick, ...props }: BoxProps) => import("react/jsx-runtime").JSX.Element;
9
7
  export { Box };
10
8
  //# sourceMappingURL=Box.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Box.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/Box/Box.tsx"],"names":[],"mappings":"AACA,OAAO,EAAqB,QAAQ,IAAI,eAAe,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,UAAU,QAAS,SAAQ,eAAe;IACxC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CACpC;AAED,QAAA,MAAM,GAAG,GAAI,sCAAsC,QAAQ,4CAE1D,CAAC;AAEF,OAAO,EAAE,GAAG,EAAE,CAAC"}
1
+ {"version":3,"file":"Box.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/Box/Box.tsx"],"names":[],"mappings":"AACA,OAAO,EAAqB,QAAQ,IAAI,eAAe,EAAE,MAAM,eAAe,CAAC;AAE/E,UAAU,QAAS,SAAQ,eAAe;IACxC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,QAAA,MAAM,GAAG,GAAI,8BAA8B,QAAQ,4CAElD,CAAC;AAEF,OAAO,EAAE,GAAG,EAAE,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Box as MantineBox } from '@mantine/core';
3
- const Box = ({ width, styles, onClick, ...props }) => {
4
- return _jsx(MantineBox, { w: width, styles: styles, onClick: onClick, ...props });
3
+ const Box = ({ width, onClick, ...props }) => {
4
+ return _jsx(MantineBox, { w: width, onClick: onClick, ...props });
5
5
  };
6
6
  export { Box };
@@ -4,6 +4,5 @@ declare const meta: Meta<typeof Box>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof meta>;
6
6
  export declare const Default: Story;
7
- export declare const Alignment: Story;
8
- export declare const CustomStyling: Story;
7
+ export declare const BoxStyling: Story;
9
8
  //# sourceMappingURL=Box.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Box.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/Box/Box.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAG5B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,GAAG,CA0B1B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAwBrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAqDvB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAyC3B,CAAC"}
1
+ {"version":3,"file":"Box.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/Box/Box.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAK5B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,GAAG,CAuB1B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KASrB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAgBxB,CAAC"}
@@ -1,121 +1,50 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Box } from './Box';
3
- import { Group } from '../Group/Group';
3
+ import { Text } from '../../Typography/Text/Text';
4
+ import { neutral } from '../../../constants/colors';
4
5
  const meta = {
5
- title: 'Layouts/Box',
6
+ title: 'Components/Layout/Box',
6
7
  component: Box,
8
+ parameters: {
9
+ layout: 'centered',
10
+ },
7
11
  argTypes: {
12
+ children: {
13
+ control: { type: 'text' },
14
+ description: 'Content to render inside the Box',
15
+ table: { type: { summary: 'ReactNode' } },
16
+ },
8
17
  width: {
9
18
  control: { type: 'text' },
10
19
  description: 'Custom width',
11
- table: {
12
- type: { summary: 'string | number' },
13
- },
14
- },
15
- styles: {
16
- control: { type: 'object' },
17
- description: 'Custom styles object',
18
- table: {
19
- type: { summary: 'Record<string, CSSObject>' },
20
- },
20
+ table: { type: { summary: 'string | number' } },
21
21
  },
22
22
  onClick: {
23
23
  action: 'clicked',
24
24
  description: 'Click handler function',
25
- table: {
26
- type: { summary: '() => void' },
27
- },
25
+ table: { type: { summary: '() => void' } },
28
26
  },
29
27
  },
30
28
  };
31
29
  export default meta;
32
30
  export const Default = {
33
31
  args: {
34
- children: 'Box lets you add inline styles with sx prop',
35
- },
36
- parameters: {
37
- docs: {
38
- source: {
39
- code: `<Box
40
- sx={(theme) => ({
41
- backgroundColor: theme.colorScheme === 'dark' ? theme.colors.dark[6] : theme.colors.gray[0],
42
- textAlign: 'center',
43
- padding: theme.spacing.xl,
44
- borderRadius: theme.radius.md,
45
- cursor: 'pointer',
46
- '&:hover': {
47
- backgroundColor: theme.colorScheme === 'dark' ? theme.colors.dark[5] : theme.colors.gray[1],
48
- },
49
- })}
50
- >
51
- Box lets you add inline styles with sx prop
52
- </Box>`,
53
- },
54
- },
55
- },
56
- };
57
- export const Alignment = {
58
- render: () => (_jsxs(Group, { gap: "2rem", children: [_jsx(Box, { sx: (theme) => ({
59
- backgroundColor: theme.colors.blue[0],
60
- padding: theme.spacing.md,
61
- borderRadius: theme.radius.md,
62
- textAlign: 'left',
63
- border: `1px solid ${theme.colors.blue[3]}`,
64
- }), children: "Left Aligned" }), _jsx(Box, { sx: (theme) => ({
65
- backgroundColor: theme.colors.green[0],
66
- padding: theme.spacing.md,
67
- borderRadius: theme.radius.md,
68
- textAlign: 'center',
69
- border: `1px solid ${theme.colors.green[3]}`,
70
- }), children: "Center Aligned" }), _jsx(Box, { sx: (theme) => ({
71
- backgroundColor: theme.colors.orange[0],
72
- padding: theme.spacing.md,
73
- borderRadius: theme.radius.md,
74
- textAlign: 'right',
75
- border: `1px solid ${theme.colors.orange[3]}`,
76
- }), children: "Right Aligned" })] })),
77
- parameters: {
78
- docs: {
79
- source: {
80
- code: `<Box
81
- sx={(theme) => ({
82
- textAlign: 'center',
83
- padding: theme.spacing.md,
84
- backgroundColor: theme.colors.blue[0],
85
- })}
86
- >
87
- Center Aligned Content
88
- </Box>`,
89
- },
32
+ children: 'Box is a styled div use it as a wrapper or for custom styling',
33
+ sx: {
34
+ backgroundColor: neutral[50],
35
+ padding: '2.4rem',
36
+ borderRadius: '8px',
90
37
  },
91
38
  },
92
39
  };
93
- export const CustomStyling = {
94
- render: () => (_jsxs(Group, { gap: "2rem", children: [_jsx(Box, { sx: (theme) => ({
95
- backgroundColor: theme.colors.red[0],
96
- color: theme.colors.red[9],
97
- padding: theme.spacing.lg,
98
- borderRadius: theme.radius.lg,
99
- border: `2px solid ${theme.colors.red[3]}`,
100
- boxShadow: theme.shadows.md,
101
- '&:hover': {
102
- transform: 'translateY(-2px)',
103
- boxShadow: theme.shadows.lg,
104
- },
105
- }), children: "Custom Styled Box" }), _jsx(Box, { sx: (theme) => ({
106
- background: `linear-gradient(45deg, ${theme.colors.violet[3]}, ${theme.colors.pink[3]})`,
107
- color: 'white',
108
- padding: theme.spacing.xl,
109
- borderRadius: theme.radius.xl,
110
- textAlign: 'center',
111
- fontWeight: 600,
112
- boxShadow: theme.shadows.xl,
113
- }), children: "Gradient Box" })] })),
40
+ export const BoxStyling = {
41
+ render: () => (_jsx(Box, { sx: {
42
+ backgroundColor: neutral[25],
43
+ padding: '2.4rem',
44
+ borderRadius: '8px',
45
+ border: `1px dashed ${neutral[100]}`,
46
+ }, children: _jsx(Text, { weight: "semibold", children: "This is a box that has been styled" }) })),
114
47
  parameters: {
115
- docs: {
116
- source: {
117
- code: false,
118
- },
119
- },
48
+ docs: { source: { code: false } },
120
49
  },
121
50
  };
@@ -4,5 +4,5 @@ export interface CardProps extends MantineCardProps {
4
4
  children: React.ReactNode;
5
5
  animate?: boolean;
6
6
  }
7
- export declare const Card: ({ children, animate, ...props }: CardProps) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const Card: ({ children, animate, p, radius, ...props }: CardProps) => import("react/jsx-runtime").JSX.Element;
8
8
  //# sourceMappingURL=Card.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/Card/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAuB,SAAS,IAAI,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEnF,MAAM,WAAW,SAAU,SAAQ,gBAAgB;IACjD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,IAAI,GAAI,iCAAyC,SAAS,4CAiBtE,CAAC"}
1
+ {"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/Card/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAuB,SAAS,IAAI,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEnF,MAAM,WAAW,SAAU,SAAQ,gBAAgB;IACjD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,IAAI,GAAI,4CAAoE,SAAS,4CAiBjG,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Card as MantineCard } from '@mantine/core';
3
- export const Card = ({ children, animate = false, ...props }) => {
3
+ export const Card = ({ children, animate = false, p = "2.4rem", radius = "20px", ...props }) => {
4
4
  const hoverAnimation = {
5
5
  style: { transition: 'transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out' },
6
6
  onMouseEnter: (e) => {
@@ -12,5 +12,5 @@ export const Card = ({ children, animate = false, ...props }) => {
12
12
  e.currentTarget.style.boxShadow = 'none';
13
13
  },
14
14
  };
15
- return (_jsx(MantineCard, { p: "1.8rem", radius: "20px", withBorder: true, ...(animate ? hoverAnimation : {}), ...props, children: children }));
15
+ return (_jsx(MantineCard, { p: p, radius: radius, withBorder: true, ...(animate ? hoverAnimation : {}), ...props, children: children }));
16
16
  };
@@ -0,0 +1,10 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { Card } from './Card';
3
+ declare const meta: Meta<typeof Card>;
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
+ export declare const CustomStyling: Story;
10
+ //# sourceMappingURL=Card.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Card.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/Card/Card.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAM9B,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;AAEnC,eAAO,MAAM,OAAO,EAAE,KAoBrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KASvB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAa1B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KA2B3B,CAAC"}
@@ -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
- styles?: Record<string, CSSObject>;
4
+ height?: string | number;
6
5
  }
7
- declare const Center: ({ width, styles, ...props }: CenterProps) => import("react/jsx-runtime").JSX.Element;
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;AAC3F,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,UAAU,WAAY,SAAQ,kBAAkB;IAC9C,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CACpC;AAED,QAAA,MAAM,MAAM,GAAI,6BAA6B,WAAW,4CAEvD,CAAC;AAEF,OAAO,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, styles, ...props }) => {
4
- return _jsx(MantineCenter, { w: width, styles: styles, ...props });
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"}