@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
@@ -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"}
@@ -0,0 +1,48 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { IconBadge } from './IconBadge';
3
+ import { IconHeart, IconBell, IconStar, IconCheck, IconSettings, IconShield } from '@tabler/icons-react';
4
+ const meta = {
5
+ title: 'Components/Misc/IconBadge',
6
+ component: IconBadge,
7
+ parameters: {
8
+ layout: 'centered',
9
+ docs: {
10
+ description: {
11
+ component: 'The IconBadge component is just a colored icon wrapped in a circular background.',
12
+ },
13
+ },
14
+ },
15
+ argTypes: {
16
+ icon: {
17
+ control: { type: 'select' },
18
+ options: ['Heart', 'Bell', 'Star', 'Check', 'Settings', 'Shield'],
19
+ mapping: {
20
+ Heart: _jsx(IconHeart, { size: 20 }),
21
+ Bell: _jsx(IconBell, { size: 20 }),
22
+ Star: _jsx(IconStar, { size: 20 }),
23
+ Check: _jsx(IconCheck, { size: 20 }),
24
+ Settings: _jsx(IconSettings, { size: 20 }),
25
+ Shield: _jsx(IconShield, { size: 20 }),
26
+ },
27
+ description: 'The icon element to display inside the badge',
28
+ table: {
29
+ type: { summary: 'ReactNode' },
30
+ },
31
+ },
32
+ color: {
33
+ control: { type: 'select' },
34
+ options: ['blue', 'green', 'yellow', 'red', 'purple', 'salmon', 'gray'],
35
+ description: 'Primitive color for the badge background and icon',
36
+ table: {
37
+ type: { summary: "'blue' | 'green' | 'yellow' | 'red' | 'purple' | 'salmon' | 'gray'" },
38
+ },
39
+ },
40
+ },
41
+ };
42
+ export default meta;
43
+ export const Default = {
44
+ args: {
45
+ icon: _jsx(IconHeart, { size: 20 }),
46
+ color: 'blue',
47
+ },
48
+ };
@@ -8,7 +8,7 @@ class FormulaParser {
8
8
  this.current = 0;
9
9
  }
10
10
  parse(expression) {
11
- const hasMathOperators = /[*\/+\-()=]/.test(expression);
11
+ const hasMathOperators = /[*\/+\-()=_]/.test(expression);
12
12
  if (!hasMathOperators) {
13
13
  return [{ type: 'default', value: expression }];
14
14
  }
@@ -121,7 +121,7 @@ const FormulaRenderer = ({ nodes, weight, size, color }) => {
121
121
  case 'operator':
122
122
  return (_jsx(Text, { weight: weight, size: size, color: color, mx: "0.25rem", children: node.value === '*' ? '×' : node.value }, index));
123
123
  case 'subscript':
124
- return (_jsxs(Text, { weight: weight, size: size, color: color, children: [node.value, _jsx("sub", { children: `(${node.subscript})` })] }, index));
124
+ return (_jsxs(Text, { weight: weight, size: size, color: color, children: [node.value, _jsx("sub", { children: node.subscript })] }, index));
125
125
  case 'fraction':
126
126
  return (_jsx(Fraction, { color: color, weight: weight, size: size, numerator: _jsx(FormulaRenderer, { nodes: node.numerator || [], weight: weight, size: size, color: color }), denominator: _jsx(FormulaRenderer, { nodes: node.denominator || [], weight: weight, size: size, color: color }) }, index));
127
127
  default:
@@ -0,0 +1,10 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { Formula } from './Formula';
3
+ declare const meta: Meta<typeof Formula>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;
7
+ export declare const Operations: Story;
8
+ export declare const StructuringEquations: Story;
9
+ export declare const CustomOverrides: Story;
10
+ //# sourceMappingURL=Formula.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Formula.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Typography/Formula/Formula.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,OAAO,CAyC9B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAOrB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAUxB,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,KAsBlC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAW7B,CAAC"}
@@ -0,0 +1,85 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Formula } from './Formula';
3
+ import { Stack } from '../../Layout/Stack/Stack';
4
+ import { primary } from '../../../constants/colors';
5
+ const meta = {
6
+ title: 'Components/Typography/Formula',
7
+ component: Formula,
8
+ parameters: {
9
+ layout: 'centered',
10
+ },
11
+ argTypes: {
12
+ expression: {
13
+ control: { type: 'text' },
14
+ description: 'The mathematical expression string to parse and render',
15
+ table: {
16
+ type: { summary: 'string' },
17
+ },
18
+ },
19
+ size: {
20
+ control: { type: 'select' },
21
+ options: ['xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl'],
22
+ description: 'Override for the font size',
23
+ table: {
24
+ type: { summary: "'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl'" },
25
+ defaultValue: { summary: 'From "body" text variant' },
26
+ },
27
+ },
28
+ weight: {
29
+ control: { type: 'select' },
30
+ options: ['light', 'regular', 'medium', 'semibold', 'bold'],
31
+ description: 'Override for the font weight',
32
+ table: {
33
+ type: { summary: "'light' | 'regular' | 'medium' | 'semibold' | 'bold'" },
34
+ defaultValue: { summary: 'From "body" text variant' },
35
+ },
36
+ },
37
+ color: {
38
+ control: { type: 'color' },
39
+ description: 'Override for the text color',
40
+ table: {
41
+ type: { summary: 'string' },
42
+ defaultValue: { summary: 'From "body" text variant' },
43
+ },
44
+ },
45
+ },
46
+ };
47
+ export default meta;
48
+ export const Default = {
49
+ args: {
50
+ expression: 'x + y = z',
51
+ size: undefined,
52
+ weight: undefined,
53
+ color: undefined,
54
+ },
55
+ };
56
+ export const Operations = {
57
+ render: () => (_jsxs(Stack, { gap: "1rem", children: [_jsx(Formula, { expression: "a + b" }), _jsx(Formula, { expression: "a - b" }), _jsx(Formula, { expression: "a * b" }), _jsx(Formula, { expression: "a / b" }), _jsx(Formula, { expression: "Revenue_a * Revenue_b" })] })),
58
+ };
59
+ export const StructuringEquations = {
60
+ parameters: {
61
+ docs: {
62
+ source: {
63
+ code: `{/* b/c as fraction, then add a */}
64
+ <Formula expression="a + b / c" />
65
+
66
+ {/* (a + b) as the numerator */}
67
+ <Formula expression="(a + b) / c" />
68
+
69
+ {/* complex numerator and denominator */}
70
+ <Formula expression="(a + b) / (c + d)" />`,
71
+ },
72
+ },
73
+ },
74
+ render: () => (_jsxs(Stack, { gap: "1rem", children: [_jsx(Formula, { expression: "a + b / c" }), _jsx(Formula, { expression: "(a + b) / c" }), _jsx(Formula, { expression: "(a + b) / (c + d)" })] })),
75
+ };
76
+ export const CustomOverrides = {
77
+ parameters: {
78
+ docs: {
79
+ source: {
80
+ code: `<Formula expression="(a + b) / c" size="xl" weight="semibold" color={primary[200]} />`,
81
+ },
82
+ },
83
+ },
84
+ render: () => (_jsx(Formula, { expression: "(a + b) / c", size: "xl", weight: "semibold", color: primary[200] })),
85
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"Fraction.d.ts","sourceRoot":"","sources":["../../../../src/components/Typography/Fraction/Fraction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,UAAU,aAAc,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,GAAG,QAAQ,CAAC;IACpE,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B;AAED,QAAA,MAAM,QAAQ,GAAI,0DAAmE,aAAa,4CAajG,CAAC;AAEF,OAAO,EAAE,QAAQ,EAAE,CAAC"}
1
+ {"version":3,"file":"Fraction.d.ts","sourceRoot":"","sources":["../../../../src/components/Typography/Fraction/Fraction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAQ,SAAS,EAAE,MAAM,cAAc,CAAC;AAG/C,UAAU,aAAc,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,GAAG,QAAQ,CAAC;IACpE,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B;AAED,QAAA,MAAM,QAAQ,GAAI,0DAAmE,aAAa,4CAajG,CAAC;AAEF,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { Fraction } from './Fraction';
3
+ declare const meta: Meta<typeof Fraction>;
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 CustomOverrides: Story;
9
+ //# sourceMappingURL=Fraction.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Fraction.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Typography/Fraction/Fraction.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAItC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,QAAQ,CAyD/B,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,QAAQ,EAAE,KAStB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAW7B,CAAC"}