@dimasbaguspm/versaur 0.0.26 → 0.0.27

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.
@@ -0,0 +1,32 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ import { VariantProps } from '../../utils/variants';
3
+ import { badgeGroupVariants } from './helpers';
4
+ /**
5
+ * Props for the BadgeGroup component
6
+ */
7
+ export interface BadgeGroupProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeGroupVariants> {
8
+ /**
9
+ * Children (should be Badge components)
10
+ */
11
+ children: ReactNode;
12
+ /**
13
+ * Alignment of badges within the group
14
+ * @default 'start'
15
+ */
16
+ alignment?: 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly';
17
+ /**
18
+ * Whether badges should be fluid (full width)
19
+ * @default false
20
+ */
21
+ fluid?: boolean;
22
+ /**
23
+ * Orientation of the badge group
24
+ * @default 'horizontal'
25
+ */
26
+ orientation?: 'horizontal' | 'vertical';
27
+ /**
28
+ * Size of the gap between badges
29
+ * @default 'md'
30
+ */
31
+ gap?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
32
+ }
@@ -1,5 +1,6 @@
1
1
  export * from './app-bar';
2
2
  export * from './bottom-bar';
3
+ export * from './badge-group';
3
4
  export * from './button-group';
4
5
  export * from './page-content';
5
6
  export * from './page-header';
@@ -0,0 +1,24 @@
1
+ import { CardProps } from './types';
2
+ /**
3
+ * Card component - A clickable container component for displaying structured information
4
+ *
5
+ * Features:
6
+ * - All cards are clickable by default with hover effects
7
+ * - Structured layout with avatar, title, subtitle, badge, and supplementary info
8
+ * - Multiple color variants with soft backgrounds
9
+ * - Configurable padding sizes and shapes
10
+ * - Built with accessibility in mind
11
+ *
12
+ * @example
13
+ * ```tsx
14
+ * <Card
15
+ * title="John Doe"
16
+ * subtitle="Software Engineer"
17
+ * avatar={<Avatar shape="rounded">JD</Avatar>}
18
+ * badge={<BadgeGroup><Badge color="secondary">Available</Badge></BadgeGroup>}
19
+ * supplementaryInfo="$2,847.32"
20
+ * onClick={handleClick}
21
+ * />
22
+ * ```
23
+ */
24
+ export declare const Card: import('react').ForwardRefExoticComponent<CardProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,2 @@
1
+ export { Card } from './card';
2
+ export type { CardProps } from './types';
@@ -0,0 +1,39 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ import { cardVariants } from './helpers';
4
+ /**
5
+ * Props for the Card component
6
+ */
7
+ export interface CardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title' | 'children'>, VariantProps<typeof cardVariants> {
8
+ /**
9
+ * Size variant affecting padding
10
+ * @default 'md'
11
+ */
12
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
13
+ /**
14
+ * Shape variant affecting border radius
15
+ * @default 'rounded'
16
+ */
17
+ shape?: 'rounded' | 'square';
18
+ /**
19
+ * Avatar element to display on the left side
20
+ */
21
+ avatar?: ReactNode;
22
+ /**
23
+ * Main title text
24
+ */
25
+ title: ReactNode;
26
+ /**
27
+ * Subtitle or description text
28
+ */
29
+ subtitle?: ReactNode;
30
+ /**
31
+ * Badge element to display in the header area
32
+ */
33
+ badge?: ReactNode;
34
+ /**
35
+ * Supplementary information to display on the right side
36
+ * Usually used for amounts, status, or additional info
37
+ */
38
+ supplementaryInfo?: ReactNode;
39
+ }
@@ -8,6 +8,7 @@ export * from './button-float';
8
8
  export * from './button-icon';
9
9
  export * from './calculator';
10
10
  export * from './calendar';
11
+ export * from './card';
11
12
  export * from './icon';
12
13
  export * from './no-results';
13
14
  export * from './snackbar';
@@ -28,6 +28,7 @@ const symbolToSubpath = {
28
28
  "TextAreaInput": "forms",
29
29
  "TimePickerInput": "forms",
30
30
  "AppBar": "layouts",
31
+ "BadgeGroup": "layouts",
31
32
  "BottomBar": "layouts",
32
33
  "ButtonGroup": "layouts",
33
34
  "FormLayout": "layouts",
@@ -53,6 +54,7 @@ const symbolToSubpath = {
53
54
  "ButtonIcon": "primitive",
54
55
  "Calculator": "primitive",
55
56
  "Calendar": "primitive",
57
+ "Card": "primitive",
56
58
  "DescriptionList": "primitive",
57
59
  "Icon": "primitive",
58
60
  "ImageCircle": "primitive",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dimasbaguspm/versaur",
3
- "version": "0.0.26",
3
+ "version": "0.0.27",
4
4
  "description": "React UI library with Tailwind CSS",
5
5
  "author": "Dimas Bagus Prayogo Mukti<dimas.bagus.pm@gmail.com>",
6
6
  "license": "MIT",