@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,86 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Fraction } from './Fraction';
3
+ import { Stack } from '../../Layout/Stack/Stack';
4
+ import { primary } from '../../../constants/colors';
5
+ const meta = {
6
+ title: 'Components/Typography/Fraction',
7
+ component: Fraction,
8
+ parameters: {
9
+ layout: 'centered',
10
+ },
11
+ argTypes: {
12
+ numerator: {
13
+ control: { type: 'text' },
14
+ description: 'The content to display in the numerator',
15
+ table: {
16
+ type: { summary: 'ReactNode' },
17
+ },
18
+ },
19
+ denominator: {
20
+ control: { type: 'text' },
21
+ description: 'The content to display in the denominator',
22
+ table: {
23
+ type: { summary: 'ReactNode' },
24
+ },
25
+ },
26
+ variant: {
27
+ control: { type: 'select' },
28
+ options: ['body', 'subtle', 'label', 'caption'],
29
+ description: 'The preset variant to use for styling',
30
+ table: {
31
+ type: { summary: "'body' | 'subtle' | 'label' | 'caption'" },
32
+ defaultValue: { summary: "'body'" },
33
+ },
34
+ },
35
+ size: {
36
+ control: { type: 'select' },
37
+ options: ['xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl'],
38
+ description: 'Override for the font size',
39
+ table: {
40
+ type: { summary: "'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl'" },
41
+ defaultValue: { summary: 'Set by variant' },
42
+ },
43
+ },
44
+ weight: {
45
+ control: { type: 'select' },
46
+ options: ['light', 'regular', 'medium', 'semibold', 'bold'],
47
+ description: 'Override for the font weight',
48
+ table: {
49
+ type: { summary: "'light' | 'regular' | 'medium' | 'semibold' | 'bold'" },
50
+ defaultValue: { summary: 'Set by variant' },
51
+ },
52
+ },
53
+ color: {
54
+ control: { type: 'color' },
55
+ description: 'Override for the text color',
56
+ table: {
57
+ type: { summary: 'string' },
58
+ defaultValue: { summary: 'Set by variant' },
59
+ },
60
+ },
61
+ },
62
+ };
63
+ export default meta;
64
+ export const Default = {
65
+ args: {
66
+ numerator: '1',
67
+ denominator: '2',
68
+ variant: undefined,
69
+ size: undefined,
70
+ weight: undefined,
71
+ color: undefined,
72
+ },
73
+ };
74
+ export const Variants = {
75
+ render: () => (_jsxs(Stack, { gap: "1.5rem", children: [_jsx(Fraction, { numerator: "1", denominator: "2", variant: "body" }), _jsx(Fraction, { numerator: "1", denominator: "2", variant: "subtle" }), _jsx(Fraction, { numerator: "1", denominator: "2", variant: "label" }), _jsx(Fraction, { numerator: "1", denominator: "2", variant: "caption" })] })),
76
+ };
77
+ export const CustomOverrides = {
78
+ parameters: {
79
+ docs: {
80
+ source: {
81
+ code: `<Fraction numerator="x + 1" denominator="y - 2" size="xl" weight="semibold" color={primary[200]} />`,
82
+ },
83
+ },
84
+ },
85
+ render: () => (_jsx(Fraction, { numerator: "x + 1", denominator: "y - 2", size: "xl", weight: "semibold", color: primary[200] })),
86
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../../src/components/Typography/Text/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAuB,SAAS,IAAI,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACnF,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE1E,MAAM,WAAW,SAAU,SAAQ,gBAAgB;IACjD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,OAAO,SAAS,CAAC;IACjC,IAAI,CAAC,EAAE,MAAM,OAAO,QAAQ,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,OAAO,UAAU,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,aAAa,CAAC;CACxB;AAED,QAAA,MAAM,IAAI,GAAI,8DAAuE,SAAS,4CAsC7F,CAAC;AAEF,OAAO,EAAE,IAAI,EAAE,CAAC"}
1
+ {"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../../src/components/Typography/Text/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAuB,SAAS,IAAI,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACnF,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAG1E,MAAM,WAAW,SAAU,SAAQ,gBAAgB;IACjD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,OAAO,SAAS,CAAC;IACjC,IAAI,CAAC,EAAE,MAAM,OAAO,QAAQ,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,OAAO,UAAU,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,aAAa,CAAC;CACxB;AAED,QAAA,MAAM,IAAI,GAAI,8DAAuE,SAAS,4CA2C7F,CAAC;AAEF,OAAO,EAAE,IAAI,EAAE,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Text as MantineText } from '@mantine/core';
3
3
  import { textStyle, fontSize, fontWeight } from '../../../constants/font';
4
+ import { error, neutral } from '../../../constants/colors';
4
5
  const Text = ({ variant = 'body', size, children, weight, color, styles, ...props }) => {
5
6
  const selectedVariant = textStyle[variant];
6
7
  const customSize = size ? fontSize[size] : {};
@@ -28,6 +29,11 @@ const Text = ({ variant = 'body', size, children, weight, color, styles, ...prop
28
29
  fontSize: '0.8em',
29
30
  marginLeft: '0.2em',
30
31
  },
32
+ '& code': {
33
+ color: error[200],
34
+ backgroundColor: neutral[50],
35
+ padding: '0.25em 0.5em',
36
+ },
31
37
  }, ...props, children: children }));
32
38
  };
33
39
  export { Text };
@@ -0,0 +1,10 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { Text } from './Text';
3
+ declare const meta: Meta<typeof Text>;
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
+ export declare const WithFormatting: Story;
10
+ //# sourceMappingURL=Text.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Text.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Typography/Text/Text.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAI9B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,IAAI,CA+D3B,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,KAoB7B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAM5B,CAAC"}
@@ -0,0 +1,101 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Text } from './Text';
3
+ import { Stack } from '../../Layout/Stack/Stack';
4
+ import { primary } from '../../../constants/colors';
5
+ const meta = {
6
+ title: 'Components/Typography/Text',
7
+ component: Text,
8
+ parameters: {
9
+ layout: 'centered',
10
+ docs: {
11
+ description: {
12
+ component: "[View Mantine Docs](https://v6.mantine.dev/core/text/)\n\nThe Text component is a customizable wrapper around Mantine's Text component that provides consistent typography styling across your application. It extends Mantine v6's TextProps while adding custom variants, sizes, and weights.",
13
+ },
14
+ },
15
+ },
16
+ argTypes: {
17
+ variant: {
18
+ control: { type: 'select' },
19
+ options: ['body', 'subtle', 'label', 'caption'],
20
+ description: 'The preset variant to use for styling',
21
+ table: {
22
+ type: { summary: "'body' | 'subtle' | 'label' | 'caption'" },
23
+ defaultValue: { summary: "'body'" },
24
+ },
25
+ },
26
+ size: {
27
+ control: { type: 'select' },
28
+ options: ['xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl'],
29
+ description: 'Override for the font size',
30
+ table: {
31
+ type: { summary: "'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl'" },
32
+ defaultValue: { summary: 'Set by variant' },
33
+ },
34
+ },
35
+ weight: {
36
+ control: { type: 'select' },
37
+ options: ['light', 'regular', 'medium', 'semibold', 'bold'],
38
+ description: 'Override for the font weight',
39
+ table: {
40
+ type: { summary: "'light' | 'regular' | 'medium' | 'semibold' | 'bold'" },
41
+ defaultValue: { summary: 'Set by variant' },
42
+ },
43
+ },
44
+ color: {
45
+ control: { type: 'color' },
46
+ description: 'Override for the text color',
47
+ table: {
48
+ type: { summary: 'string' },
49
+ defaultValue: { summary: 'Set by variant' },
50
+ },
51
+ },
52
+ children: {
53
+ control: { type: 'text' },
54
+ description: 'The text content to render',
55
+ table: {
56
+ type: { summary: 'ReactNode' },
57
+ },
58
+ },
59
+ styles: {
60
+ control: { type: 'object' },
61
+ description: 'Override for other styling - use this sparingly',
62
+ table: {
63
+ type: { summary: 'CSSProperties' },
64
+ },
65
+ },
66
+ },
67
+ };
68
+ export default meta;
69
+ export const Default = {
70
+ args: {
71
+ children: 'This is a sample text',
72
+ variant: undefined,
73
+ size: undefined,
74
+ weight: undefined,
75
+ color: undefined,
76
+ styles: undefined,
77
+ },
78
+ };
79
+ export const Variants = {
80
+ render: () => (_jsxs(Stack, { gap: "1rem", children: [_jsx(Text, { variant: "body", children: "This is body text" }), _jsx(Text, { variant: "subtle", children: "This is subtle text" }), _jsx(Text, { variant: "label", children: "This is label text" }), _jsx(Text, { variant: "caption", children: "This is caption text" })] })),
81
+ };
82
+ export const CustomOverrides = {
83
+ parameters: {
84
+ docs: {
85
+ source: {
86
+ code: `<Text size="xl" weight="semibold" color={primary[200]}>
87
+ Custom size, weight, and color
88
+ </Text>`,
89
+ },
90
+ },
91
+ },
92
+ args: {
93
+ size: 'xl',
94
+ weight: 'semibold',
95
+ color: primary[200],
96
+ },
97
+ render: (args) => (_jsx(Text, { ...args, children: "Custom size, weight, and color" })),
98
+ };
99
+ export const WithFormatting = {
100
+ render: () => (_jsxs(Text, { children: ["This sentence has ", _jsx("b", { children: "bold text" }), ", ", _jsx("i", { children: "italic text" }), ", ", _jsx("code", { children: "inline code" }), ", and text with a subscript like ", _jsx("sub", { children: "this" }), "."] })),
101
+ };
@@ -0,0 +1,9 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { Title } from './Title';
3
+ declare const meta: Meta<typeof Title>;
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=Title.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Title.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Typography/Title/Title.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAIhC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,KAAK,CA+D5B,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,KAWtB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAoB7B,CAAC"}
@@ -0,0 +1,98 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Title } from './Title';
3
+ import { Stack } from '../../Layout/Stack/Stack';
4
+ import { primary } from '../../../constants/colors';
5
+ const meta = {
6
+ title: 'Components/Typography/Title',
7
+ component: Title,
8
+ parameters: {
9
+ layout: 'centered',
10
+ docs: {
11
+ description: {
12
+ component: "[View Mantine Docs](https://v6.mantine.dev/core/title/)\n\nThe Title component utilizes our heading variants to render semantic HTML heading elements with consistent styling. For body text, see the Text component instead.",
13
+ },
14
+ },
15
+ },
16
+ argTypes: {
17
+ variant: {
18
+ control: { type: 'select' },
19
+ options: ['header', 'sectionHeader', 'subheader', 'sectionSubheader', 'cardHeader', 'cardSubheader'],
20
+ description: 'The preset variant to use for styling',
21
+ table: {
22
+ type: { summary: "'header' | 'sectionHeader' | 'subheader' | 'sectionSubheader' | 'cardHeader' | 'cardSubheader'" },
23
+ defaultValue: { summary: "'sectionHeader'" },
24
+ },
25
+ },
26
+ size: {
27
+ control: { type: 'select' },
28
+ options: ['xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl'],
29
+ description: 'Override for the font size',
30
+ table: {
31
+ type: { summary: "'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl'" },
32
+ defaultValue: { summary: 'Set by variant' },
33
+ },
34
+ },
35
+ weight: {
36
+ control: { type: 'select' },
37
+ options: ['light', 'regular', 'medium', 'semibold', 'bold'],
38
+ description: 'Override for the font weight',
39
+ table: {
40
+ type: { summary: "'light' | 'regular' | 'medium' | 'semibold' | 'bold'" },
41
+ defaultValue: { summary: 'Set by variant' },
42
+ },
43
+ },
44
+ color: {
45
+ control: { type: 'color' },
46
+ description: 'Override for the text color',
47
+ table: {
48
+ type: { summary: 'string' },
49
+ defaultValue: { summary: 'Set by variant' },
50
+ },
51
+ },
52
+ children: {
53
+ control: { type: 'text' },
54
+ description: 'The title content to render',
55
+ table: {
56
+ type: { summary: 'ReactNode' },
57
+ },
58
+ },
59
+ styles: {
60
+ control: { type: 'object' },
61
+ description: 'Override for other styling - use this sparingly',
62
+ table: {
63
+ type: { summary: 'CSSProperties' },
64
+ },
65
+ },
66
+ },
67
+ };
68
+ export default meta;
69
+ export const Default = {
70
+ args: {
71
+ children: 'Sample Title',
72
+ variant: undefined,
73
+ size: undefined,
74
+ weight: undefined,
75
+ color: undefined,
76
+ styles: undefined,
77
+ },
78
+ };
79
+ export const Variants = {
80
+ render: () => (_jsxs(Stack, { gap: "1rem", children: [_jsx(Title, { variant: "header", children: "Header" }), _jsx(Title, { variant: "sectionHeader", children: "Section Header" }), _jsx(Title, { variant: "subheader", children: "Subheader" }), _jsx(Title, { variant: "sectionSubheader", children: "Section Subheader" }), _jsx(Title, { variant: "cardHeader", children: "Card Header" }), _jsx(Title, { variant: "cardSubheader", children: "Card Subheader" })] })),
81
+ };
82
+ export const CustomOverrides = {
83
+ parameters: {
84
+ docs: {
85
+ source: {
86
+ code: `<Title size="xl" weight="semibold" color={primary[200]}>
87
+ Custom size, weight, and color
88
+ </Title>`,
89
+ },
90
+ },
91
+ },
92
+ args: {
93
+ size: 'xl',
94
+ weight: 'semibold',
95
+ color: primary[200],
96
+ },
97
+ render: (args) => (_jsx(Title, { ...args, children: "Custom size, weight, and color" })),
98
+ };
@@ -1,3 +1,4 @@
1
+ export declare const black = "#000000";
1
2
  export declare const white = "#FFFFFF";
2
3
  export declare const gray: {
3
4
  readonly 25: "#F8FAFC";
@@ -1 +1 @@
1
- {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/constants/colors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,YAAY,CAAC;AAC/B,eAAO,MAAM,IAAI;;;;;;CAMP,CAAC;AACX,eAAO,MAAM,OAAO;;;;;;CAAO,CAAC;AAE5B,eAAO,MAAM,IAAI;;;;;;CAMP,CAAC;AACX,eAAO,MAAM,OAAO;;;;;;CAAO,CAAC;AAE5B,eAAO,MAAM,KAAK;;;;;;CAMR,CAAC;AACX,eAAO,MAAM,OAAO;;;;;;CAAQ,CAAC;AAE7B,eAAO,MAAM,MAAM;;;;;;CAMT,CAAC;AACX,eAAO,MAAM,OAAO;;;;;;CAAS,CAAC;AAE9B,eAAO,MAAM,GAAG;;;;;;CAMN,CAAC;AACX,eAAO,MAAM,KAAK;;;;;;CAAM,CAAC;AAGzB,eAAO,MAAM,MAAM;;;;CAIT,CAAC;AAEX,eAAO,MAAM,MAAM;;;;CAIT,CAAC;AAGX,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOT,CAAC;AAGX,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQb,CAAC"}
1
+ {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/constants/colors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,YAAY,CAAC;AAC/B,eAAO,MAAM,KAAK,YAAY,CAAC;AAE/B,eAAO,MAAM,IAAI;;;;;;CAMP,CAAC;AACX,eAAO,MAAM,OAAO;;;;;;CAAO,CAAC;AAE5B,eAAO,MAAM,IAAI;;;;;;CAMP,CAAC;AACX,eAAO,MAAM,OAAO;;;;;;CAAO,CAAC;AAE5B,eAAO,MAAM,KAAK;;;;;;CAMR,CAAC;AACX,eAAO,MAAM,OAAO;;;;;;CAAQ,CAAC;AAE7B,eAAO,MAAM,MAAM;;;;;;CAMT,CAAC;AACX,eAAO,MAAM,OAAO;;;;;;CAAS,CAAC;AAE9B,eAAO,MAAM,GAAG;;;;;;CAMN,CAAC;AACX,eAAO,MAAM,KAAK;;;;;;CAAM,CAAC;AAGzB,eAAO,MAAM,MAAM;;;;CAIT,CAAC;AAEX,eAAO,MAAM,MAAM;;;;CAIT,CAAC;AAGX,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOT,CAAC;AAGX,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQb,CAAC"}
@@ -1,3 +1,4 @@
1
+ export const black = '#000000';
1
2
  export const white = '#FFFFFF';
2
3
  export const gray = {
3
4
  25: '#F8FAFC',
@@ -0,0 +1,2 @@
1
+ export declare function AIGeneratedBanner(): import("react/jsx-runtime").JSX.Element;
2
+ //# sourceMappingURL=AIGeneratedBanner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AIGeneratedBanner.d.ts","sourceRoot":"","sources":["../../src/docs/AIGeneratedBanner.tsx"],"names":[],"mappings":"AAEA,wBAAgB,iBAAiB,4CAMhC"}
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Text } from "../components";
3
+ export function AIGeneratedBanner() {
4
+ return (_jsx("blockquote", { style: { marginBottom: '1rem' }, children: _jsxs(Text, { children: ["\uD83E\uDD16 ", _jsx("b", { children: "AI-generated:" }), " This doc was generated by AI and hasn't been human-edited yet."] }) }));
5
+ }
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ declare const meta: Meta;
3
+ export default meta;
4
+ type Story = StoryObj;
5
+ export declare const TaivLight: Story;
6
+ export declare const AdditionalPrimitives: Story;
7
+ //# sourceMappingURL=Colors.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Colors.stories.d.ts","sourceRoot":"","sources":["../../../src/docs/design/Colors.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAM5D,QAAA,MAAM,IAAI,EAAE,IAMX,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC;AAmDtB,eAAO,MAAM,SAAS,EAAE,KAcvB,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,KAOlC,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Group } from '../../components/Layout/Group/Group';
3
+ import { Stack } from '../../components/Layout/Stack/Stack';
4
+ import { Text } from '../../components/Typography/Text/Text';
5
+ import { colors, primitives } from '../../constants/colors';
6
+ const meta = {
7
+ title: 'Design/Colors',
8
+ tags: ['!dev'],
9
+ parameters: {
10
+ layout: 'centered',
11
+ },
12
+ };
13
+ export default meta;
14
+ const Swatch = ({ color, label }) => (_jsxs(Stack, { gap: "0.4rem", align: "center", children: [_jsx("div", { style: {
15
+ width: '64px',
16
+ height: '64px',
17
+ borderRadius: '8px',
18
+ backgroundColor: color,
19
+ border: '1px solid rgba(0,0,0,0.1)',
20
+ } }), _jsx(Text, { size: "xs", color: "dimmed", children: label }), _jsx(Text, { size: "xs", color: "dimmed", children: color })] }));
21
+ const ThemeRow = ({ semantic, primitive, shades, }) => (_jsxs(Stack, { gap: "0.8rem", children: [_jsxs(Group, { gap: "0.4rem", children: [_jsx(Text, { weight: "bold", children: semantic }), _jsxs(Text, { children: ["(", primitive, ")"] })] }), _jsx(Group, { gap: "1.6rem", children: Object.entries(shades).map(([shade, hex]) => (_jsx(Swatch, { color: hex, label: shade }, shade))) })] }));
22
+ const ColorRow = ({ name, shades }) => (_jsxs(Stack, { gap: "0.8rem", children: [_jsx(Text, { weight: "bold", transform: "capitalize", children: name }), _jsx(Group, { gap: "1.6rem", children: Object.entries(shades).map(([shade, hex]) => (_jsx(Swatch, { color: hex, label: shade }, shade))) })] }));
23
+ export const TaivLight = {
24
+ render: () => (_jsxs(Stack, { gap: "2.4rem", align: "flex-start", children: [_jsxs(Group, { gap: "1.6rem", children: [_jsx(Swatch, { color: "#000000", label: "black" }), _jsx(Swatch, { color: "#FFFFFF", label: "white" })] }), _jsx(ThemeRow, { semantic: "primary", primitive: "blue", shades: colors.primary }), _jsx(ThemeRow, { semantic: "neutral", primitive: "gray", shades: colors.neutral }), _jsx(ThemeRow, { semantic: "success", primitive: "green", shades: colors.success }), _jsx(ThemeRow, { semantic: "warning", primitive: "yellow", shades: colors.warning }), _jsx(ThemeRow, { semantic: "error", primitive: "red", shades: colors.error })] })),
25
+ };
26
+ export const AdditionalPrimitives = {
27
+ render: () => (_jsxs(Stack, { gap: "2.4rem", children: [_jsx(ColorRow, { name: "purple", shades: primitives.purple }), _jsx(ColorRow, { name: "salmon", shades: primitives.salmon })] })),
28
+ };
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ declare const meta: Meta;
3
+ export default meta;
4
+ type Story = StoryObj;
5
+ export declare const Default: Story;
6
+ //# sourceMappingURL=Copy.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Copy.stories.d.ts","sourceRoot":"","sources":["../../../src/docs/hooks/Copy.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAK5D,QAAA,MAAM,IAAI,EAAE,IAqCX,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC;AAuBtB,eAAO,MAAM,OAAO,EAAE,KAQrB,CAAC"}
@@ -0,0 +1,61 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useCopy } from '../../hooks/useCopy';
3
+ import { Button } from '../../components/Inputs/Buttons/Button/Button';
4
+ import { IconCopy } from '@tabler/icons-react';
5
+ const meta = {
6
+ title: 'Hooks/Copy',
7
+ tags: ['!dev'],
8
+ parameters: {
9
+ layout: 'centered',
10
+ },
11
+ argTypes: {
12
+ value: {
13
+ control: { type: 'text' },
14
+ description: 'The value to copy',
15
+ table: {
16
+ type: { summary: 'string' },
17
+ },
18
+ },
19
+ label: {
20
+ control: { type: 'text' },
21
+ description: 'Optional label for what the value is',
22
+ table: {
23
+ type: { summary: 'string' },
24
+ },
25
+ },
26
+ showNotification: {
27
+ control: { type: 'boolean' },
28
+ description: 'Show notification after copy',
29
+ table: {
30
+ type: { summary: 'boolean' },
31
+ defaultValue: { summary: 'true' },
32
+ },
33
+ },
34
+ notificationMessage: {
35
+ control: { type: 'text' },
36
+ description: 'Custom notification message override - use this sparingly',
37
+ table: {
38
+ type: { summary: 'string' },
39
+ },
40
+ },
41
+ },
42
+ };
43
+ export default meta;
44
+ const DefaultDemo = (args) => {
45
+ const { copy } = useCopy();
46
+ return (_jsxs(Button, { variant: "secondary", leftIcon: _jsx(IconCopy, {}), onClick: () => copy({
47
+ value: args.value,
48
+ label: args.label || undefined,
49
+ showNotification: args.showNotification,
50
+ notificationMessage: args.notificationMessage || undefined,
51
+ }), children: ["Copy ", args.label] }));
52
+ };
53
+ export const Default = {
54
+ args: {
55
+ value: '12345',
56
+ label: undefined,
57
+ showNotification: true,
58
+ notificationMessage: undefined,
59
+ },
60
+ render: (args) => _jsx(DefaultDemo, { ...args }),
61
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiv/ui",
3
- "version": "1.12.0",
3
+ "version": "1.13.0",
4
4
  "author": "Taiv",
5
5
  "description": "Taiv's web UI Toolkit built on Mantine v6",
6
6
  "main": "dist/index.js",
@@ -26,7 +26,7 @@
26
26
  "@mantine/hooks": "^6.0.0",
27
27
  "@mantine/modals": "^6.0.0",
28
28
  "@mantine/notifications": "^6.0.0",
29
- "@tabler/icons-react": "^2.47.0",
29
+ "@tabler/icons-react": "^3.41.1",
30
30
  "dayjs": "^1.11.18",
31
31
  "recharts": "^2.8.0"
32
32
  },
@@ -35,13 +35,13 @@
35
35
  "react-dom": "^17.0.0"
36
36
  },
37
37
  "devDependencies": {
38
- "@storybook/addon-docs": "^9.1.10",
39
- "@storybook/addon-onboarding": "^9.1.10",
40
- "@storybook/react-vite": "^9.1.10",
38
+ "@storybook/addon-docs": "^10.3.3",
39
+ "@storybook/addon-onboarding": "^10.3.3",
40
+ "@storybook/react-vite": "^10.3.3",
41
41
  "@types/react": "^17.0.87",
42
42
  "@types/react-dom": "^17.0.26",
43
43
  "chromatic": "^13.3.0",
44
- "storybook": "^9.1.10",
44
+ "storybook": "^10.3.3",
45
45
  "typescript": "^5.0.2"
46
46
  },
47
47
  "exports": {