@datacrest/dcuikit 0.1.4 → 0.1.6
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/build/components/Molecule/Card/Card.d.ts +1 -1
- package/build/components/Molecule/Card/const.d.ts +44 -0
- package/build/components/Molecule/Card/types.d.ts +26 -5
- package/build/components/Molecule/Dialog/index.d.ts +2 -1
- package/build/components/Molecule/Dropdown/types.d.ts +1 -1
- package/build/components/Molecule/Message/index.d.ts +4 -4
- package/build/components/Molecule/ProfileCard/ProfileCard.stories.d.ts +4 -0
- package/build/components/Molecule/ProfileCard/types.d.ts +5 -1
- package/build/components/Molecule/Table/index.d.ts +1 -1
- package/build/index.css +4 -4
- package/build/index.esm.css +4 -4
- package/build/index.esm.js +3 -3
- package/build/index.esm.js.map +1 -1
- package/build/index.js +6 -6
- package/build/index.js.map +1 -1
- package/build/tsconfig.prod.tsbuildinfo +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CardProps } from './types';
|
|
3
3
|
declare const Card: {
|
|
4
|
-
({ title, description, variant, size, image, footer,
|
|
4
|
+
({ title, description, children, variant, size, shadow, hoverEffect, borderRadius, image, imagePosition, imageHeight, badge, badgePosition, footer, header, padding, spacing, width, height, maxWidth, className, contentClassName, titleClassName, descriptionClassName, imageClassName, onClick, href, interactive, disabled, }: CardProps): React.JSX.Element;
|
|
5
5
|
displayName: string;
|
|
6
6
|
};
|
|
7
7
|
export default Card;
|
|
@@ -5,18 +5,62 @@ export declare const CARD_SIZES: {
|
|
|
5
5
|
readonly titleSize: "text-base sm:text-lg";
|
|
6
6
|
readonly descSize: "text-sm sm:text-base";
|
|
7
7
|
readonly imageHeight: "h-24 sm:h-32 md:h-36";
|
|
8
|
+
readonly spacing: "space-y-2";
|
|
8
9
|
};
|
|
9
10
|
readonly medium: {
|
|
10
11
|
readonly padding: "p-4 sm:p-5 md:p-6";
|
|
11
12
|
readonly titleSize: "text-lg sm:text-xl md:text-2xl";
|
|
12
13
|
readonly descSize: "text-sm sm:text-base md:text-lg";
|
|
13
14
|
readonly imageHeight: "h-32 sm:h-40 md:h-48 lg:h-56";
|
|
15
|
+
readonly spacing: "space-y-3";
|
|
14
16
|
};
|
|
15
17
|
readonly large: {
|
|
16
18
|
readonly padding: "p-5 sm:p-6 md:p-7 lg:p-8";
|
|
17
19
|
readonly titleSize: "text-xl sm:text-2xl md:text-3xl";
|
|
18
20
|
readonly descSize: "text-base sm:text-lg md:text-xl";
|
|
19
21
|
readonly imageHeight: "h-40 sm:h-48 md:h-56 lg:h-64";
|
|
22
|
+
readonly spacing: "space-y-4";
|
|
20
23
|
};
|
|
24
|
+
readonly custom: {
|
|
25
|
+
readonly padding: "";
|
|
26
|
+
readonly titleSize: "text-lg";
|
|
27
|
+
readonly descSize: "text-base";
|
|
28
|
+
readonly imageHeight: "";
|
|
29
|
+
readonly spacing: "space-y-3";
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export declare const CARD_SPACING: {
|
|
33
|
+
readonly none: "";
|
|
34
|
+
readonly sm: "space-y-2";
|
|
35
|
+
readonly md: "space-y-3";
|
|
36
|
+
readonly lg: "space-y-4";
|
|
37
|
+
};
|
|
38
|
+
export declare const CARD_SHADOWS: {
|
|
39
|
+
readonly none: "";
|
|
40
|
+
readonly sm: "shadow-sm";
|
|
41
|
+
readonly md: "shadow";
|
|
42
|
+
readonly lg: "shadow-md";
|
|
43
|
+
readonly xl: "shadow-lg";
|
|
44
|
+
};
|
|
45
|
+
export declare const CARD_HOVER_EFFECTS: {
|
|
46
|
+
readonly none: "";
|
|
47
|
+
readonly lift: "transition-transform duration-300 hover:-translate-y-1";
|
|
48
|
+
readonly glow: "transition-shadow duration-300 hover:shadow-glow";
|
|
49
|
+
readonly scale: "transition-transform duration-300 hover:scale-[1.02]";
|
|
50
|
+
readonly border: "transition-colors duration-300 hover:border-primary";
|
|
51
|
+
};
|
|
52
|
+
export declare const CARD_BORDER_RADIUS: {
|
|
53
|
+
readonly none: "rounded-none";
|
|
54
|
+
readonly sm: "rounded";
|
|
55
|
+
readonly md: "rounded-lg";
|
|
56
|
+
readonly lg: "rounded-xl";
|
|
57
|
+
readonly xl: "rounded-2xl";
|
|
58
|
+
readonly full: "rounded-3xl";
|
|
59
|
+
};
|
|
60
|
+
export declare const BADGE_POSITIONS: {
|
|
61
|
+
readonly 'top-right': "absolute right-4 top-4 z-10";
|
|
62
|
+
readonly 'top-left': "absolute left-4 top-4 z-10";
|
|
63
|
+
readonly 'bottom-right': "absolute right-4 bottom-4 z-10";
|
|
64
|
+
readonly 'bottom-left': "absolute left-4 bottom-4 z-10";
|
|
21
65
|
};
|
|
22
66
|
export declare const CARD_VARIANTS: Record<CardVariant, VariantStyles>;
|
|
@@ -1,18 +1,39 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
export type CardVariant = 'default' | 'gradiant';
|
|
3
|
-
export type CardSize = 'small' | 'medium' | 'large';
|
|
2
|
+
export type CardVariant = 'default' | 'gradiant' | 'outline' | 'solid' | 'glass';
|
|
3
|
+
export type CardSize = 'small' | 'medium' | 'large' | 'custom';
|
|
4
|
+
export type CardShadow = 'none' | 'sm' | 'md' | 'lg' | 'xl';
|
|
5
|
+
export type HoverEffect = 'none' | 'lift' | 'glow' | 'scale' | 'border';
|
|
6
|
+
export type BorderRadius = 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
4
7
|
export interface CardProps {
|
|
5
8
|
title?: string;
|
|
6
9
|
description?: string;
|
|
10
|
+
children?: ReactNode;
|
|
7
11
|
variant?: CardVariant;
|
|
8
12
|
size?: CardSize;
|
|
13
|
+
shadow?: CardShadow;
|
|
14
|
+
hoverEffect?: HoverEffect;
|
|
15
|
+
borderRadius?: BorderRadius;
|
|
9
16
|
image?: string;
|
|
17
|
+
imagePosition?: 'top' | 'background';
|
|
18
|
+
imageHeight?: string;
|
|
19
|
+
badge?: string | ReactNode;
|
|
20
|
+
badgePosition?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
|
|
10
21
|
footer?: ReactNode;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
22
|
+
header?: ReactNode;
|
|
23
|
+
padding?: string;
|
|
24
|
+
spacing?: 'none' | 'sm' | 'md' | 'lg';
|
|
14
25
|
width?: string | number;
|
|
15
26
|
height?: string | number;
|
|
27
|
+
maxWidth?: string | number;
|
|
28
|
+
className?: string;
|
|
29
|
+
contentClassName?: string;
|
|
30
|
+
titleClassName?: string;
|
|
31
|
+
descriptionClassName?: string;
|
|
32
|
+
imageClassName?: string;
|
|
33
|
+
onClick?: () => void;
|
|
34
|
+
href?: string;
|
|
35
|
+
interactive?: boolean;
|
|
36
|
+
disabled?: boolean;
|
|
16
37
|
}
|
|
17
38
|
interface BaseVariantStyles {
|
|
18
39
|
kind: CardVariant;
|
|
@@ -11,7 +11,7 @@ export type VariantStyle = {
|
|
|
11
11
|
trigger: string;
|
|
12
12
|
content: string;
|
|
13
13
|
};
|
|
14
|
-
export type VariantType = 'basic' | 'shadow';
|
|
14
|
+
export type VariantType = 'basic' | 'shadow-sm';
|
|
15
15
|
export type SizeType = 'small' | 'medium' | 'large';
|
|
16
16
|
export type DropdownOption = {
|
|
17
17
|
id: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
export type {
|
|
1
|
+
import { MessagePosition, MessageProps, MessageVariants } from './Message.types';
|
|
2
|
+
import { message, MessageOptions } from './MessageManager';
|
|
3
|
+
export { message, MessageVariants, MessagePosition };
|
|
4
|
+
export type { MessageProps, MessageOptions };
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { PROFILE_CARD_SIZES } from './const';
|
|
2
3
|
export interface DropdownItem {
|
|
3
4
|
name: string;
|
|
4
5
|
icon?: ReactNode;
|
|
5
6
|
link?: string;
|
|
6
7
|
isDisabled?: boolean;
|
|
8
|
+
onClick?: () => void;
|
|
7
9
|
}
|
|
8
10
|
export interface ProfileCardProps {
|
|
9
11
|
avatarUrl: string;
|
|
@@ -11,6 +13,8 @@ export interface ProfileCardProps {
|
|
|
11
13
|
email?: string;
|
|
12
14
|
position?: string;
|
|
13
15
|
dropdownItems?: DropdownItem[];
|
|
14
|
-
size?:
|
|
16
|
+
size?: (typeof PROFILE_CARD_SIZES)[keyof typeof PROFILE_CARD_SIZES];
|
|
15
17
|
className?: string;
|
|
18
|
+
isDropdownOpen?: boolean;
|
|
19
|
+
onToggleDropdown?: () => void;
|
|
16
20
|
}
|