@tanishraj/ui-kit 1.0.8 → 1.1.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/globals.css +58 -0
- package/dist/index.cjs.js +0 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +256 -0
- package/dist/index.es.js +0 -1
- package/dist/index.es.js.map +1 -1
- package/package.json +18 -11
- package/readme.md +47 -3
- package/dist/.storybook/StorybookThemeProvider.d.ts +0 -6
- package/dist/.storybook/main.d.ts +0 -3
- package/dist/.storybook/preview.d.ts +0 -3
- package/dist/eslint.config.d.mts +0 -2
- package/dist/setupTests.d.ts +0 -0
- package/dist/src/components/Alert/Alert.d.ts +0 -11
- package/dist/src/components/Alert/Alert.stories.d.ts +0 -10
- package/dist/src/components/Alert/Alert.styles.d.ts +0 -35
- package/dist/src/components/Alert/Alert.test.d.ts +0 -1
- package/dist/src/components/Alert/index.d.ts +0 -2
- package/dist/src/components/Alert/types.d.ts +0 -6
- package/dist/src/components/Avatar/Avatar.d.ts +0 -17
- package/dist/src/components/Avatar/Avatar.stories.d.ts +0 -11
- package/dist/src/components/Avatar/Avatar.styles.d.ts +0 -23
- package/dist/src/components/Avatar/Avatar.test.d.ts +0 -1
- package/dist/src/components/Avatar/index.d.ts +0 -2
- package/dist/src/components/Avatar/types.d.ts +0 -14
- package/dist/src/components/AvatarGroup/AvatarGroup.d.ts +0 -3
- package/dist/src/components/AvatarGroup/AvatarGroup.stories.d.ts +0 -9
- package/dist/src/components/AvatarGroup/AvatarGroup.styles.d.ts +0 -8
- package/dist/src/components/AvatarGroup/AvatarGroup.test.d.ts +0 -1
- package/dist/src/components/AvatarGroup/index.d.ts +0 -2
- package/dist/src/components/AvatarGroup/types.d.ts +0 -17
- package/dist/src/components/Badge/Badge.d.ts +0 -7
- package/dist/src/components/Badge/Badge.stories.d.ts +0 -10
- package/dist/src/components/Badge/Badge.styles.d.ts +0 -14
- package/dist/src/components/Badge/Badge.test.d.ts +0 -1
- package/dist/src/components/Badge/index.d.ts +0 -2
- package/dist/src/components/Badge/types.d.ts +0 -7
- package/dist/src/components/Button/Button.d.ts +0 -10
- package/dist/src/components/Button/Button.stories.d.ts +0 -12
- package/dist/src/components/Button/Button.styles.d.ts +0 -15
- package/dist/src/components/Button/Button.test.d.ts +0 -1
- package/dist/src/components/Button/index.d.ts +0 -2
- package/dist/src/components/Button/types.d.ts +0 -6
- package/dist/src/components/ButtonGroup/ButtonGroup.d.ts +0 -3
- package/dist/src/components/ButtonGroup/ButtonGroup.stories.d.ts +0 -12
- package/dist/src/components/ButtonGroup/ButtonGroup.styles.d.ts +0 -11
- package/dist/src/components/ButtonGroup/ButtonGroup.test.d.ts +0 -1
- package/dist/src/components/ButtonGroup/index.d.ts +0 -2
- package/dist/src/components/ButtonGroup/types.d.ts +0 -15
- package/dist/src/components/OrganizationChart/OrganizationChart.d.ts +0 -2
- package/dist/src/components/OrganizationChart/OrganizationChart.stories.d.ts +0 -7
- package/dist/src/components/OrganizationChart/OrganizationChart.styles.d.ts +0 -5
- package/dist/src/components/OrganizationChart/OrganizationChart.test.d.ts +0 -1
- package/dist/src/components/OrganizationChart/index.d.ts +0 -2
- package/dist/src/components/OrganizationChart/mockData.d.ts +0 -4
- package/dist/src/components/OrganizationChart/types.d.ts +0 -62
- package/dist/src/components/OrganizationChart/utils.d.ts +0 -10
- package/dist/src/components/OrganizationChart/utils.test.d.ts +0 -1
- package/dist/src/components/index.d.ts +0 -7
- package/dist/src/hooks/index.d.ts +0 -2
- package/dist/src/hooks/useTheme.d.ts +0 -5
- package/dist/src/hooks/useToggle.d.ts +0 -1
- package/dist/src/index.d.ts +0 -3
- package/dist/src/providers/index.d.ts +0 -1
- package/dist/src/providers/theme/ThemeProvider.d.ts +0 -11
- package/dist/src/providers/theme/context.d.ts +0 -6
- package/dist/src/providers/theme/index.d.ts +0 -3
- package/dist/src/providers/theme/types.d.ts +0 -4
- package/dist/src/utils/classNames.d.ts +0 -2
- package/dist/src/utils/index.d.ts +0 -2
- package/dist/src/utils/types.d.ts +0 -3
- package/dist/vite.config.d.mts +0 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanishraj/ui-kit",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "A production-ready React component library with modern tooling, Storybook docs, and TypeScript support.",
|
|
5
5
|
"author": "Tanishraj",
|
|
6
6
|
"license": "MIT",
|
|
@@ -12,20 +12,20 @@
|
|
|
12
12
|
"url": "https://github.com/tanishraj/ui-kit/issues"
|
|
13
13
|
},
|
|
14
14
|
"homepage": "https://github.com/tanishraj/ui-kit#readme",
|
|
15
|
-
"main": "dist/index.cjs",
|
|
16
|
-
"module": "dist/index.js",
|
|
15
|
+
"main": "dist/index.cjs.js",
|
|
16
|
+
"module": "dist/index.es.js",
|
|
17
17
|
"types": "dist/index.d.ts",
|
|
18
18
|
"type": "module",
|
|
19
19
|
"exports": {
|
|
20
20
|
".": {
|
|
21
21
|
"types": "./dist/index.d.ts",
|
|
22
|
-
"import": "./dist/index.js",
|
|
23
|
-
"require": "./dist/index.cjs"
|
|
22
|
+
"import": "./dist/index.es.js",
|
|
23
|
+
"require": "./dist/index.cjs.js"
|
|
24
24
|
},
|
|
25
25
|
"./globals.css": {
|
|
26
|
-
"import": "./dist/
|
|
27
|
-
"require": "./dist/
|
|
28
|
-
"default": "./dist/
|
|
26
|
+
"import": "./dist/globals.css",
|
|
27
|
+
"require": "./dist/globals.css",
|
|
28
|
+
"default": "./dist/globals.css"
|
|
29
29
|
},
|
|
30
30
|
"./theme-primary.css": {
|
|
31
31
|
"import": "./dist/themes/primary.css",
|
|
@@ -34,7 +34,13 @@
|
|
|
34
34
|
},
|
|
35
35
|
"./theme-secondary.css": {
|
|
36
36
|
"import": "./dist/themes/secondary.css",
|
|
37
|
-
"require": "./dist/themes/secondary.css"
|
|
37
|
+
"require": "./dist/themes/secondary.css",
|
|
38
|
+
"default": "./dist/themes/secondary.css"
|
|
39
|
+
},
|
|
40
|
+
"./themes/*": {
|
|
41
|
+
"import": "./dist/themes/*.css",
|
|
42
|
+
"require": "./dist/themes/*.css",
|
|
43
|
+
"default": "./dist/themes/*.css"
|
|
38
44
|
}
|
|
39
45
|
},
|
|
40
46
|
"publishConfig": {
|
|
@@ -44,8 +50,8 @@
|
|
|
44
50
|
"dist"
|
|
45
51
|
],
|
|
46
52
|
"scripts": {
|
|
47
|
-
"build": "rm -rf dist && vite build && npm run copy:theme",
|
|
48
|
-
"copy:theme": "mkdir -p dist/themes && cp src/themes/primary.css dist/themes/primary.css && cp src/themes/secondary.css dist/themes/secondary.css",
|
|
53
|
+
"build": "rm -rf dist && vite build && npm run copy:theme && rm -rf dist/src",
|
|
54
|
+
"copy:theme": "mkdir -p dist/themes && cp src/themes/primary.css dist/themes/primary.css && cp src/themes/secondary.css dist/themes/secondary.css && cp src/styles/globals.css dist/globals.css",
|
|
49
55
|
"prepublishOnly": "npm run build",
|
|
50
56
|
"test": "vitest",
|
|
51
57
|
"test:watch": "vitest --watch",
|
|
@@ -73,6 +79,7 @@
|
|
|
73
79
|
"devDependencies": {
|
|
74
80
|
"@chromatic-com/storybook": "^5.2.1",
|
|
75
81
|
"@eslint/js": "^9.14.0",
|
|
82
|
+
"@microsoft/api-extractor": "^7.58.9",
|
|
76
83
|
"@storybook/addon-docs": "^10.4.2",
|
|
77
84
|
"@storybook/addon-onboarding": "^10.4.2",
|
|
78
85
|
"@storybook/addon-vitest": "10.4.2",
|
package/readme.md
CHANGED
|
@@ -63,20 +63,64 @@ import {
|
|
|
63
63
|
AvatarGroup,
|
|
64
64
|
} from '@tanishraj/ui-kit';
|
|
65
65
|
import '@tanishraj/ui-kit/globals.css';
|
|
66
|
+
import '@tanishraj/ui-kit/theme-primary.css';
|
|
66
67
|
|
|
67
68
|
export function Demo() {
|
|
68
69
|
return <Button variant="primary">Get Started</Button>;
|
|
69
70
|
}
|
|
70
71
|
```
|
|
71
72
|
|
|
72
|
-
|
|
73
|
+
## Setup for app consumers
|
|
74
|
+
|
|
75
|
+
The library is built to be consumed like a standard React UI package:
|
|
76
|
+
|
|
77
|
+
1. Install dependency
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
npm install @tanishraj/ui-kit
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
2. Import global styles once (usually near your app entry):
|
|
84
|
+
|
|
85
|
+
```ts
|
|
86
|
+
import '@tanishraj/ui-kit/globals.css';
|
|
87
|
+
import '@tanishraj/ui-kit/theme-primary.css'; // or theme-secondary.css
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
3. Use component APIs directly from the package.
|
|
91
|
+
|
|
92
|
+
```tsx
|
|
93
|
+
import { Button, Avatar } from '@tanishraj/ui-kit';
|
|
94
|
+
|
|
95
|
+
export default function Demo() {
|
|
96
|
+
return (
|
|
97
|
+
<div className="flex items-center gap-4">
|
|
98
|
+
<Button variant="primary" size="md">
|
|
99
|
+
Primary Button
|
|
100
|
+
</Button>
|
|
101
|
+
<Avatar initials="AB" name="Amit B." variant="primary" />
|
|
102
|
+
</div>
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Theme file options
|
|
73
108
|
|
|
74
109
|
```ts
|
|
75
110
|
import '@tanishraj/ui-kit/theme-primary.css';
|
|
76
|
-
// Optional:
|
|
77
|
-
|
|
111
|
+
// Optional: use another packaged theme
|
|
112
|
+
import '@tanishraj/ui-kit/theme-secondary.css';
|
|
78
113
|
```
|
|
79
114
|
|
|
115
|
+
You can also import through:
|
|
116
|
+
|
|
117
|
+
```ts
|
|
118
|
+
import '@tanishraj/ui-kit/themes/primary.css';
|
|
119
|
+
import '@tanishraj/ui-kit/themes/secondary.css';
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
If your app uses a custom design token strategy, import one packaged theme and override required CSS variables in your own stylesheet after the theme import.
|
|
123
|
+
|
|
80
124
|
## Component Library API
|
|
81
125
|
|
|
82
126
|
- Components are exported from the package entrypoint in a single import surface.
|
package/dist/eslint.config.d.mts
DELETED
package/dist/setupTests.d.ts
DELETED
|
File without changes
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { FC, ReactNode, SVGProps } from 'react';
|
|
2
|
-
import { VariantProps } from 'class-variance-authority';
|
|
3
|
-
import { RemoveNull } from '../../utils';
|
|
4
|
-
import { alertWrapperStyles } from './Alert.styles';
|
|
5
|
-
export interface AlertProps extends RemoveNull<VariantProps<typeof alertWrapperStyles>> {
|
|
6
|
-
title?: string;
|
|
7
|
-
icon?: FC<SVGProps<SVGSVGElement>>;
|
|
8
|
-
children?: ReactNode;
|
|
9
|
-
onClose?: () => void;
|
|
10
|
-
}
|
|
11
|
-
export declare const Alert: FC<AlertProps>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
-
import { AlertProps } from './Alert';
|
|
3
|
-
declare const meta: Meta<AlertProps>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<AlertProps>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const AlertSize: Story;
|
|
8
|
-
export declare const AlertVariant: Story;
|
|
9
|
-
export declare const AlertApperance: Story;
|
|
10
|
-
export declare const AlertFilledInverted: Story;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
export declare const alertWrapperStyles: (props?: ({
|
|
2
|
-
appearance?: "filled" | "outline" | "dashed" | null | undefined;
|
|
3
|
-
variant?: "default" | "primary" | "info" | "success" | "warning" | "danger" | null | undefined;
|
|
4
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
5
|
-
inverted?: boolean | null | undefined;
|
|
6
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
-
export declare const alertContentWrapperStyles: (props?: ({
|
|
8
|
-
variant?: "default" | "primary" | "info" | "success" | "warning" | "danger" | null | undefined;
|
|
9
|
-
appearance?: "filled" | "outline" | "dashed" | null | undefined;
|
|
10
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
11
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
12
|
-
export declare const alertTitleStyles: (props?: ({
|
|
13
|
-
appearance?: "filled" | "outline" | "dashed" | null | undefined;
|
|
14
|
-
variant?: "default" | "primary" | "info" | "success" | "warning" | "danger" | null | undefined;
|
|
15
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
16
|
-
inverted?: boolean | null | undefined;
|
|
17
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
18
|
-
export declare const alertDescriptionStyles: (props?: ({
|
|
19
|
-
appearance?: "filled" | "outline" | "dashed" | null | undefined;
|
|
20
|
-
variant?: "default" | "primary" | "info" | "success" | "warning" | "danger" | null | undefined;
|
|
21
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
22
|
-
inverted?: boolean | null | undefined;
|
|
23
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
24
|
-
export declare const alertIconStyles: (props?: ({
|
|
25
|
-
appearance?: "filled" | "outline" | "dashed" | null | undefined;
|
|
26
|
-
variant?: "default" | "primary" | "info" | "success" | "warning" | "danger" | null | undefined;
|
|
27
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
28
|
-
inverted?: boolean | null | undefined;
|
|
29
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
30
|
-
export declare const alertCloseButtonStyles: (props?: ({
|
|
31
|
-
appearance?: "filled" | "outline" | "dashed" | null | undefined;
|
|
32
|
-
variant?: "default" | "primary" | "info" | "success" | "warning" | "danger" | null | undefined;
|
|
33
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
34
|
-
inverted?: boolean | null | undefined;
|
|
35
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { VariantProps } from 'class-variance-authority';
|
|
2
|
-
import { RemoveNull } from '../../utils';
|
|
3
|
-
import { alertWrapperStyles } from './Alert.styles';
|
|
4
|
-
export type AlertVariants = RemoveNull<VariantProps<typeof alertWrapperStyles>>['variant'];
|
|
5
|
-
export type AlertAppearances = RemoveNull<VariantProps<typeof alertWrapperStyles>>['appearance'];
|
|
6
|
-
export type AlertSizes = RemoveNull<VariantProps<typeof alertWrapperStyles>>['size'];
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { FC, HTMLAttributes } from 'react';
|
|
2
|
-
import { VariantProps } from 'class-variance-authority';
|
|
3
|
-
import { avatarContainerStyles } from './Avatar.styles';
|
|
4
|
-
import { AvatarIcon, AvatarImage, AvatarSizes, AvatarShapes, AvatarVariants, AvatarStatus, AvatarStatusPosition } from './types';
|
|
5
|
-
export interface AvatarProps extends HTMLAttributes<HTMLSpanElement>, Omit<VariantProps<typeof avatarContainerStyles>, 'stroke'> {
|
|
6
|
-
icon?: AvatarIcon;
|
|
7
|
-
img?: AvatarImage;
|
|
8
|
-
initials?: string;
|
|
9
|
-
status?: AvatarStatus;
|
|
10
|
-
statusPosition?: AvatarStatusPosition;
|
|
11
|
-
size?: AvatarSizes;
|
|
12
|
-
shape?: AvatarShapes;
|
|
13
|
-
variant?: AvatarVariants;
|
|
14
|
-
inverted?: boolean;
|
|
15
|
-
stroke?: boolean;
|
|
16
|
-
}
|
|
17
|
-
export declare const Avatar: FC<AvatarProps>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
-
import { AvatarProps } from './Avatar';
|
|
3
|
-
declare const meta: Meta<AvatarProps>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<AvatarProps>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const Variants: Story;
|
|
8
|
-
export declare const Sizes: Story;
|
|
9
|
-
export declare const Shapes: Story;
|
|
10
|
-
export declare const WithStroke: Story;
|
|
11
|
-
export declare const Status: Story;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export declare const avatarContainerStyles: (props?: ({
|
|
2
|
-
size?: "sm" | "md" | "lg" | "xs" | null | undefined;
|
|
3
|
-
variant?: "default" | "primary" | "info" | "success" | "warning" | "danger" | null | undefined;
|
|
4
|
-
shape?: "circle" | "square" | null | undefined;
|
|
5
|
-
inverted?: boolean | null | undefined;
|
|
6
|
-
stroke?: boolean | null | undefined;
|
|
7
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
|
-
export declare const avatarImageStyles: (props?: ({
|
|
9
|
-
shape?: "circle" | "square" | null | undefined;
|
|
10
|
-
size?: "sm" | "md" | "lg" | "xs" | null | undefined;
|
|
11
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
12
|
-
export declare const avatarTextStyles: (props?: ({
|
|
13
|
-
size?: "sm" | "md" | "lg" | "xs" | null | undefined;
|
|
14
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
15
|
-
export declare const avatarIconStyles: (props?: ({
|
|
16
|
-
size?: "sm" | "md" | "lg" | "xs" | null | undefined;
|
|
17
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
18
|
-
export declare const avatarStatusStyles: (props?: ({
|
|
19
|
-
status?: "primary" | "info" | "success" | "warning" | "danger" | null | undefined;
|
|
20
|
-
shape?: "circle" | "square" | null | undefined;
|
|
21
|
-
position?: "top-right" | "top-left" | "bottom-right" | "bottom-left" | null | undefined;
|
|
22
|
-
size?: "sm" | "md" | "lg" | "xs" | null | undefined;
|
|
23
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { FC, SVGProps } from 'react';
|
|
2
|
-
import { VariantProps } from 'class-variance-authority';
|
|
3
|
-
import { RemoveNull } from '../../utils';
|
|
4
|
-
import { avatarContainerStyles, avatarStatusStyles } from './Avatar.styles';
|
|
5
|
-
export type AvatarSizes = RemoveNull<VariantProps<typeof avatarContainerStyles>>['size'];
|
|
6
|
-
export type AvatarShapes = RemoveNull<VariantProps<typeof avatarContainerStyles>>['shape'];
|
|
7
|
-
export type AvatarVariants = RemoveNull<VariantProps<typeof avatarContainerStyles>>['variant'];
|
|
8
|
-
export type AvatarStatus = RemoveNull<VariantProps<typeof avatarStatusStyles>['status']>;
|
|
9
|
-
export type AvatarStatusPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
10
|
-
export type AvatarIcon = FC<SVGProps<SVGSVGElement>>;
|
|
11
|
-
export type AvatarImage = {
|
|
12
|
-
src: string;
|
|
13
|
-
alt: string;
|
|
14
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
-
import { AvatarGroupProps } from './types';
|
|
3
|
-
declare const meta: Meta<AvatarGroupProps>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<AvatarGroupProps>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const Variants: Story;
|
|
8
|
-
export declare const Sizes: Story;
|
|
9
|
-
export declare const Shapes: Story;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare const avatarGroupStyles: (props?: ({
|
|
2
|
-
size?: "sm" | "md" | "lg" | "xs" | null | undefined;
|
|
3
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
4
|
-
export declare const avatarGroupCounterStyles: (props?: ({
|
|
5
|
-
variant?: "default" | "primary" | "info" | "success" | "warning" | "danger" | null | undefined;
|
|
6
|
-
size?: "sm" | "md" | "lg" | "xs" | null | undefined;
|
|
7
|
-
shape?: "circle" | "square" | null | undefined;
|
|
8
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { HTMLAttributes } from 'react';
|
|
2
|
-
import { VariantProps } from 'class-variance-authority';
|
|
3
|
-
import { RemoveNull } from '../../utils';
|
|
4
|
-
import { AvatarProps, AvatarVariants } from '../Avatar';
|
|
5
|
-
import { avatarContainerStyles } from '../Avatar/Avatar.styles';
|
|
6
|
-
export type AvatarGroupSizes = RemoveNull<VariantProps<typeof avatarContainerStyles>>['size'];
|
|
7
|
-
export type AvatarGroupShapes = RemoveNull<VariantProps<typeof avatarContainerStyles>>['shape'];
|
|
8
|
-
export type AvatarGroupItem = Omit<AvatarProps, 'size' | 'shape' | 'inverted' | 'stroke' | 'className'>;
|
|
9
|
-
export interface AvatarGroupProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
10
|
-
items?: AvatarGroupItem[];
|
|
11
|
-
size?: AvatarGroupSizes;
|
|
12
|
-
variant?: AvatarVariants;
|
|
13
|
-
shape?: AvatarGroupShapes;
|
|
14
|
-
max?: number;
|
|
15
|
-
inverted?: boolean;
|
|
16
|
-
stroke?: boolean;
|
|
17
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { FC, HTMLAttributes, SVGProps } from 'react';
|
|
2
|
-
import { VariantProps } from 'class-variance-authority';
|
|
3
|
-
import { badgeVariants } from './Badge.styles';
|
|
4
|
-
export interface BadgeProps extends HTMLAttributes<HTMLSpanElement>, Omit<VariantProps<typeof badgeVariants>, 'appearance'> {
|
|
5
|
-
icon?: FC<SVGProps<SVGSVGElement>>;
|
|
6
|
-
}
|
|
7
|
-
export declare const Badge: FC<BadgeProps>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
-
import { BadgeProps } from './Badge';
|
|
3
|
-
declare const meta: Meta<BadgeProps>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<BadgeProps>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const Variant: Story;
|
|
8
|
-
export declare const Size: Story;
|
|
9
|
-
export declare const Shape: Story;
|
|
10
|
-
export declare const Appearance: Story;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export declare const badgeVariants: (props?: ({
|
|
2
|
-
variant?: "default" | "primary" | "info" | "success" | "warning" | "danger" | null | undefined;
|
|
3
|
-
appearance?: "icon" | "dots" | "text" | null | undefined;
|
|
4
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
5
|
-
shape?: "circle" | "square" | null | undefined;
|
|
6
|
-
inverted?: boolean | null | undefined;
|
|
7
|
-
hasIcon?: boolean | null | undefined;
|
|
8
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
|
-
export declare const badgeIconStyles: (props?: ({
|
|
10
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
11
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
12
|
-
export declare const badgeTextStyles: (props?: ({
|
|
13
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
14
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { VariantProps } from 'class-variance-authority';
|
|
2
|
-
import { RemoveNull } from '../../utils';
|
|
3
|
-
import { badgeVariants } from './Badge.styles';
|
|
4
|
-
export type BadgeVariants = RemoveNull<VariantProps<typeof badgeVariants>>['variant'];
|
|
5
|
-
export type BadgeAppearances = RemoveNull<VariantProps<typeof badgeVariants>>['appearance'];
|
|
6
|
-
export type BadgeSizes = RemoveNull<VariantProps<typeof badgeVariants>>['size'];
|
|
7
|
-
export type BadgeShapes = RemoveNull<VariantProps<typeof badgeVariants>>['shape'];
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ComponentPropsWithRef, FC, ReactNode, SVGProps } from 'react';
|
|
2
|
-
import { VariantProps } from 'class-variance-authority';
|
|
3
|
-
import { RemoveNull } from '../../utils';
|
|
4
|
-
import { buttonStyles } from './Button.styles';
|
|
5
|
-
export interface ButtonProps extends ComponentPropsWithRef<'button'>, RemoveNull<Omit<VariantProps<typeof buttonStyles>, 'disabled'>> {
|
|
6
|
-
children: ReactNode;
|
|
7
|
-
leadingIcon?: FC<SVGProps<SVGSVGElement>>;
|
|
8
|
-
trailingIcon?: FC<SVGProps<SVGSVGElement>>;
|
|
9
|
-
}
|
|
10
|
-
export declare const Button: FC<ButtonProps>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
-
import { ButtonProps } from './Button';
|
|
3
|
-
declare const meta: Meta<ButtonProps>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<ButtonProps>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const ButtonSizes: Story;
|
|
8
|
-
export declare const ButtonStates: Story;
|
|
9
|
-
export declare const ButtonLoading: Story;
|
|
10
|
-
export declare const ButtonDisabled: Story;
|
|
11
|
-
export declare const ButtonInverted: Story;
|
|
12
|
-
export declare const ButtonIcon: Story;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare const buttonStyles: (props?: ({
|
|
2
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
3
|
-
variant?: "default" | "primary" | "info" | "success" | "warning" | "danger" | null | undefined;
|
|
4
|
-
appearance?: "filled" | "outline" | "dashed" | "ghost" | null | undefined;
|
|
5
|
-
disabled?: boolean | null | undefined;
|
|
6
|
-
loading?: boolean | null | undefined;
|
|
7
|
-
fullWidth?: boolean | null | undefined;
|
|
8
|
-
inverted?: boolean | null | undefined;
|
|
9
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
10
|
-
export declare const buttonSpinnerStyles: (props?: ({
|
|
11
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
12
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
13
|
-
export declare const buttonIconStyle: (props?: ({
|
|
14
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
15
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { VariantProps } from 'class-variance-authority';
|
|
2
|
-
import { RemoveNull } from '../../utils';
|
|
3
|
-
import { buttonStyles } from './Button.styles';
|
|
4
|
-
export type ButtonVariants = RemoveNull<VariantProps<typeof buttonStyles>>['variant'];
|
|
5
|
-
export type ButtonAppearances = RemoveNull<VariantProps<typeof buttonStyles>>['appearance'];
|
|
6
|
-
export type ButtonSizes = RemoveNull<VariantProps<typeof buttonStyles>>['size'];
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
-
import { ButtonGroupProps } from './types';
|
|
3
|
-
declare const meta: Meta<ButtonGroupProps>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<ButtonGroupProps>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const Variants: Story;
|
|
8
|
-
export declare const Appearances: Story;
|
|
9
|
-
export declare const Sizes: Story;
|
|
10
|
-
export declare const Orientations: Story;
|
|
11
|
-
export declare const Loading: Story;
|
|
12
|
-
export declare const Inverted: Story;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare const buttonGroupStyles: (props?: ({
|
|
2
|
-
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
3
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
4
|
-
export declare const buttonGroupItemStyles: (props?: ({
|
|
5
|
-
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
6
|
-
position?: "single" | "first" | "middle" | "last" | null | undefined;
|
|
7
|
-
fullWidth?: boolean | null | undefined;
|
|
8
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
|
-
export declare const buttonGroupItemInnerStyles: (props?: ({
|
|
10
|
-
fullWidth?: boolean | null | undefined;
|
|
11
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
import { ButtonProps, ButtonSizes } from '../Button';
|
|
3
|
-
export type ButtonGroupOrientation = 'horizontal' | 'vertical';
|
|
4
|
-
export type ButtonGroupSizes = ButtonSizes;
|
|
5
|
-
export interface ButtonGroupItem extends Omit<ButtonProps, 'children' | 'ref' | 'className'> {
|
|
6
|
-
children?: ReactNode;
|
|
7
|
-
id?: string;
|
|
8
|
-
}
|
|
9
|
-
export interface ButtonGroupProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'className'> {
|
|
10
|
-
buttons?: ButtonGroupItem[];
|
|
11
|
-
orientation?: ButtonGroupOrientation;
|
|
12
|
-
size?: ButtonGroupSizes;
|
|
13
|
-
inverted?: boolean;
|
|
14
|
-
role?: 'group' | string;
|
|
15
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
-
import { OrganizationChart } from './OrganizationChart';
|
|
3
|
-
declare const meta: Meta<typeof OrganizationChart>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof OrganizationChart>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const FiftyNodesFiveLevels: Story;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare const ORGANIZATION_CHART_NODE_WIDTH = 445;
|
|
2
|
-
export declare const ORGANIZATION_CHART_NODE_HEIGHT = 215;
|
|
3
|
-
export declare const organizationChartWrapperClassName = "relative h-full w-full min-h-0 min-w-0 overflow-hidden rounded-md bg-default";
|
|
4
|
-
export declare const organizationChartEmptyStateClassName = "flex h-full min-h-60 w-full min-w-0 items-center justify-center rounded-md border border-default bg-default p-6 text-base text-caption";
|
|
5
|
-
export declare const organizationChartZoomIndicatorClassName = "pointer-events-none absolute bottom-6 right-6 z-10 rounded-full bg-black/85 px-3.5 py-2 text-sm font-semibold tracking-[0.5px] text-white shadow-lg backdrop-blur-sm";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|