@taiv/ui 1.11.0 → 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/assets.d.ts +5 -0
- package/dist/assets/assets.d.ts.map +1 -0
- package/dist/assets/assets.js +18 -0
- package/dist/assets/icons.d.ts +6 -0
- package/dist/assets/icons.d.ts.map +1 -0
- package/dist/assets/icons.js +57 -0
- package/dist/components/Info/Modals/Modal/Modal.stories.d.ts +7 -0
- package/dist/components/Info/Modals/Modal/Modal.stories.d.ts.map +1 -0
- package/dist/components/Info/Modals/Modal/Modal.stories.js +61 -0
- package/dist/components/Info/Modals/Modals.stories.d.ts +16 -0
- package/dist/components/Info/Modals/Modals.stories.d.ts.map +1 -0
- package/dist/components/Info/Modals/Modals.stories.js +101 -0
- package/dist/components/Info/Notifications/Notifications.stories.d.ts +10 -0
- package/dist/components/Info/Notifications/Notifications.stories.d.ts.map +1 -0
- package/dist/components/Info/Notifications/Notifications.stories.js +106 -0
- package/dist/components/Inputs/Buttons/Button/Button.stories.d.ts +1 -0
- package/dist/components/Inputs/Buttons/Button/Button.stories.d.ts.map +1 -1
- package/dist/components/Inputs/Buttons/Button/Button.stories.js +50 -44
- package/dist/components/Inputs/Controls/SegmentedControl/SegmentedControl.d.ts +26 -0
- package/dist/components/Inputs/Controls/SegmentedControl/SegmentedControl.d.ts.map +1 -0
- package/dist/components/Inputs/Controls/SegmentedControl/SegmentedControl.js +41 -0
- package/dist/components/Inputs/Controls/SegmentedControl/SegmentedControl.stories.d.ts +13 -0
- package/dist/components/Inputs/Controls/SegmentedControl/SegmentedControl.stories.d.ts.map +1 -0
- package/dist/components/Inputs/Controls/SegmentedControl/SegmentedControl.stories.js +231 -0
- package/dist/components/Layout/AutoGrid/AutoGrid.stories.d.ts +7 -0
- package/dist/components/Layout/AutoGrid/AutoGrid.stories.d.ts.map +1 -0
- package/dist/components/Layout/AutoGrid/AutoGrid.stories.js +78 -0
- package/dist/components/Layout/Box/Box.d.ts +1 -3
- package/dist/components/Layout/Box/Box.d.ts.map +1 -1
- package/dist/components/Layout/Box/Box.js +2 -2
- package/dist/components/Layout/Box/Box.stories.d.ts +1 -2
- package/dist/components/Layout/Box/Box.stories.d.ts.map +1 -1
- package/dist/components/Layout/Box/Box.stories.js +27 -98
- package/dist/components/Layout/Card/Card.d.ts +1 -1
- package/dist/components/Layout/Card/Card.d.ts.map +1 -1
- package/dist/components/Layout/Card/Card.js +2 -2
- package/dist/components/Layout/Card/Card.stories.d.ts +10 -0
- package/dist/components/Layout/Card/Card.stories.d.ts.map +1 -0
- package/dist/components/Layout/Card/Card.stories.js +91 -0
- package/dist/components/Layout/Center/Center.d.ts +2 -3
- package/dist/components/Layout/Center/Center.d.ts.map +1 -1
- package/dist/components/Layout/Center/Center.js +2 -2
- package/dist/components/Layout/Center/Center.stories.d.ts +8 -0
- package/dist/components/Layout/Center/Center.stories.d.ts.map +1 -0
- package/dist/components/Layout/Center/Center.stories.js +69 -0
- package/dist/components/Layout/Divider/Divider.stories.d.ts +7 -0
- package/dist/components/Layout/Divider/Divider.stories.d.ts.map +1 -0
- package/dist/components/Layout/Divider/Divider.stories.js +67 -0
- package/dist/components/Layout/Frame/Frame.stories.d.ts +8 -0
- package/dist/components/Layout/Frame/Frame.stories.d.ts.map +1 -0
- package/dist/components/Layout/Frame/Frame.stories.js +77 -0
- package/dist/components/Layout/Grid/Grid.stories.d.ts +8 -0
- package/dist/components/Layout/Grid/Grid.stories.d.ts.map +1 -0
- package/dist/components/Layout/Grid/Grid.stories.js +71 -0
- package/dist/components/Layout/Group/Group.stories.d.ts +10 -0
- package/dist/components/Layout/Group/Group.stories.d.ts.map +1 -0
- package/dist/components/Layout/Group/Group.stories.js +113 -0
- package/dist/components/Layout/Loader/Loader.stories.d.ts +10 -0
- package/dist/components/Layout/Loader/Loader.stories.d.ts.map +1 -0
- package/dist/components/Layout/Loader/Loader.stories.js +67 -0
- package/dist/components/Layout/SectionCard/SectionCard.d.ts +3 -5
- package/dist/components/Layout/SectionCard/SectionCard.d.ts.map +1 -1
- package/dist/components/Layout/SectionCard/SectionCard.js +3 -8
- package/dist/components/Layout/SectionCard/SectionCard.stories.d.ts +9 -0
- package/dist/components/Layout/SectionCard/SectionCard.stories.d.ts.map +1 -0
- package/dist/components/Layout/SectionCard/SectionCard.stories.js +98 -0
- package/dist/components/Layout/Stack/Stack.stories.d.ts +1 -2
- package/dist/components/Layout/Stack/Stack.stories.d.ts.map +1 -1
- package/dist/components/Layout/Stack/Stack.stories.js +46 -66
- package/dist/components/Layout/Tabs/Tabs.d.ts +2 -4
- package/dist/components/Layout/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/Layout/Tabs/Tabs.js +2 -2
- package/dist/components/Layout/Tabs/Tabs.stories.d.ts +9 -0
- package/dist/components/Layout/Tabs/Tabs.stories.d.ts.map +1 -0
- package/dist/components/Layout/Tabs/Tabs.stories.js +140 -0
- package/dist/components/Misc/IconBadge/IconBadge.stories.d.ts +7 -0
- package/dist/components/Misc/IconBadge/IconBadge.stories.d.ts.map +1 -0
- package/dist/components/Misc/IconBadge/IconBadge.stories.js +48 -0
- package/dist/components/Typography/Formula/Formula.js +2 -2
- package/dist/components/Typography/Formula/Formula.stories.d.ts +10 -0
- package/dist/components/Typography/Formula/Formula.stories.d.ts.map +1 -0
- package/dist/components/Typography/Formula/Formula.stories.js +85 -0
- package/dist/components/Typography/Fraction/Fraction.d.ts.map +1 -1
- package/dist/components/Typography/Fraction/Fraction.stories.d.ts +9 -0
- package/dist/components/Typography/Fraction/Fraction.stories.d.ts.map +1 -0
- package/dist/components/Typography/Fraction/Fraction.stories.js +86 -0
- package/dist/components/Typography/Text/Text.d.ts.map +1 -1
- package/dist/components/Typography/Text/Text.js +6 -0
- package/dist/components/Typography/Text/Text.stories.d.ts +10 -0
- package/dist/components/Typography/Text/Text.stories.d.ts.map +1 -0
- package/dist/components/Typography/Text/Text.stories.js +101 -0
- package/dist/components/Typography/Title/Title.stories.d.ts +9 -0
- package/dist/components/Typography/Title/Title.stories.d.ts.map +1 -0
- package/dist/components/Typography/Title/Title.stories.js +98 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -0
- package/dist/constants/colors.d.ts +1 -0
- package/dist/constants/colors.d.ts.map +1 -1
- package/dist/constants/colors.js +1 -0
- package/dist/docs/AIGeneratedBanner.d.ts +2 -0
- package/dist/docs/AIGeneratedBanner.d.ts.map +1 -0
- package/dist/docs/AIGeneratedBanner.js +5 -0
- package/dist/docs/design/Colors.stories.d.ts +7 -0
- package/dist/docs/design/Colors.stories.d.ts.map +1 -0
- package/dist/docs/design/Colors.stories.js +28 -0
- package/dist/docs/hooks/Copy.stories.d.ts +6 -0
- package/dist/docs/hooks/Copy.stories.d.ts.map +1 -0
- package/dist/docs/hooks/Copy.stories.js +61 -0
- package/package.json +6 -6
|
@@ -0,0 +1,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 @@
|
|
|
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.
|
|
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": "^
|
|
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": "^
|
|
39
|
-
"@storybook/addon-onboarding": "^
|
|
40
|
-
"@storybook/react-vite": "^
|
|
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": "^
|
|
44
|
+
"storybook": "^10.3.3",
|
|
45
45
|
"typescript": "^5.0.2"
|
|
46
46
|
},
|
|
47
47
|
"exports": {
|