@dimasbaguspm/versaur 0.0.25 → 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.
- package/dist/js/{bottom-sheet-CCDa5VGo.js → bottom-sheet-DCwLmjiX.js} +189 -170
- package/dist/js/{bottom-sheet-input-DsgPp5zI.js → bottom-sheet-input-D14wjCoC.js} +34 -35
- package/dist/js/forms/index.js +1 -1
- package/dist/js/{image-rectangle-GA3oWX7A.js → image-rectangle-BGLYH2Gl.js} +416 -241
- package/dist/js/index.js +68 -67
- package/dist/js/layouts/index.js +9 -8
- package/dist/js/navigation/index.js +1 -1
- package/dist/js/overlays/index.js +2 -2
- package/dist/js/primitive/index.js +17 -17
- package/dist/js/{tabs-p6g9kN0N.js → tabs-C0hcpxNk.js} +5 -6
- package/dist/js/{tooltip-CDdl1U3A.js → tooltip-DlbAOUeP.js} +16 -16
- package/dist/js/{top-bar-PpiWsgeR.js → top-bar-BA88ij4M.js} +232 -171
- package/dist/types/layouts/badge-group/badge-group.d.ts +27 -0
- package/dist/types/layouts/badge-group/index.d.ts +2 -0
- package/dist/types/layouts/badge-group/types.d.ts +32 -0
- package/dist/types/layouts/index.d.ts +1 -0
- package/dist/types/overlays/drawer/drawer.atoms.d.ts +5 -2
- package/dist/types/overlays/drawer/drawer.d.ts +2 -0
- package/dist/types/overlays/drawer/types.d.ts +1 -16
- package/dist/types/primitive/card/card.d.ts +24 -0
- package/dist/types/primitive/card/index.d.ts +2 -0
- package/dist/types/primitive/card/types.d.ts +39 -0
- package/dist/types/primitive/index.d.ts +1 -0
- package/dist/utils/enforce-subpath-import.js +2 -0
- package/package.json +1 -1
- package/dist/js/text-CRsIInRA.js +0 -127
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { BadgeGroupProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* BadgeGroup provides layout management for badges with control over
|
|
4
|
+
* positioning, alignment, and fluid behavior
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* <BadgeGroup alignment="center" gap="sm">
|
|
8
|
+
* <Badge variant="primary">Save</Badge>
|
|
9
|
+
* <Badge variant="ghost">Cancel</Badge>
|
|
10
|
+
* </BadgeGroup>
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* // Vertical badge group
|
|
14
|
+
* <BadgeGroup orientation="vertical" fluid>
|
|
15
|
+
* <Badge variant="primary">Save</Badge>
|
|
16
|
+
* <Badge variant="secondary">Save as Draft</Badge>
|
|
17
|
+
* <Badge variant="ghost">Cancel</Badge>
|
|
18
|
+
* </BadgeGroup>
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* // Fluid badges with space between
|
|
22
|
+
* <BadgeGroup alignment="between" fluid>
|
|
23
|
+
* <Badge variant="ghost">Back</Badge>
|
|
24
|
+
* <Badge variant="primary">Next</Badge>
|
|
25
|
+
* </BadgeGroup>
|
|
26
|
+
*/
|
|
27
|
+
export declare const BadgeGroup: import('react').ForwardRefExoticComponent<BadgeGroupProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -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,15 +1,18 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { DrawerHeaderProps, DrawerBodyProps, DrawerFooterProps,
|
|
2
|
+
import { DrawerHeaderProps, DrawerBodyProps, DrawerFooterProps, DrawerHeaderTabProps } from './types';
|
|
3
|
+
import { ButtonIconProps, TextProps } from '../../primitive';
|
|
3
4
|
/**
|
|
4
5
|
* DrawerOverlay - Background overlay that appears behind the drawer
|
|
5
6
|
* Always provides a dark blurred background to help users focus on the drawer content
|
|
6
7
|
*/
|
|
7
|
-
export declare const DrawerOverlay: React.ForwardRefExoticComponent<
|
|
8
|
+
export declare const DrawerOverlay: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
9
|
/**
|
|
9
10
|
* DrawerHeader - Header section of the drawer
|
|
10
11
|
* Typically contains the title and close button
|
|
11
12
|
*/
|
|
12
13
|
export declare const DrawerHeader: React.ForwardRefExoticComponent<DrawerHeaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
export declare const DrawerTitle: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLElement>>;
|
|
15
|
+
export declare const DrawerCloseButton: React.ForwardRefExoticComponent<Partial<ButtonIconProps> & React.RefAttributes<HTMLButtonElement>>;
|
|
13
16
|
export declare const DrawerTab: React.ForwardRefExoticComponent<DrawerHeaderTabProps & React.RefAttributes<HTMLDivElement>>;
|
|
14
17
|
/**
|
|
15
18
|
* DrawerBody - Main content area of the drawer
|
|
@@ -11,6 +11,8 @@ export declare const DrawerRoot: React.FC<DrawerProps>;
|
|
|
11
11
|
*/
|
|
12
12
|
export declare const Drawer: React.FC<DrawerProps> & {
|
|
13
13
|
Header: React.ForwardRefExoticComponent<import('./types').DrawerHeaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
Title: React.ForwardRefExoticComponent<import('../..').TextProps & React.RefAttributes<HTMLElement>>;
|
|
15
|
+
CloseButton: React.ForwardRefExoticComponent<Partial<import('../..').ButtonIconProps> & React.RefAttributes<HTMLButtonElement>>;
|
|
14
16
|
Tab: React.ForwardRefExoticComponent<import('./types').DrawerHeaderTabProps & React.RefAttributes<HTMLDivElement>>;
|
|
15
17
|
Body: React.ForwardRefExoticComponent<import('./types').DrawerBodyProps & React.RefAttributes<HTMLDivElement>>;
|
|
16
18
|
Footer: React.ForwardRefExoticComponent<import('./types').DrawerFooterProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -57,8 +57,6 @@ export interface DrawerProps extends ComponentPropsWithoutRef<'div'>, OverlayPor
|
|
|
57
57
|
transitionType?: DrawerTransitionType;
|
|
58
58
|
/** Children components */
|
|
59
59
|
children: ReactNode;
|
|
60
|
-
/** Additional CSS classes */
|
|
61
|
-
className?: string;
|
|
62
60
|
}
|
|
63
61
|
/**
|
|
64
62
|
* Props for the DrawerHeader component
|
|
@@ -78,8 +76,6 @@ export interface DrawerHeaderTabProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
78
76
|
export interface DrawerBodyProps extends ComponentPropsWithoutRef<'div'> {
|
|
79
77
|
/** Children components */
|
|
80
78
|
children: ReactNode;
|
|
81
|
-
/** Additional CSS classes */
|
|
82
|
-
className?: string;
|
|
83
79
|
}
|
|
84
80
|
/**
|
|
85
81
|
* Props for the DrawerFooter component
|
|
@@ -87,19 +83,8 @@ export interface DrawerBodyProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
87
83
|
export interface DrawerFooterProps extends ComponentPropsWithoutRef<'div'> {
|
|
88
84
|
/** Children components */
|
|
89
85
|
children: ReactNode;
|
|
90
|
-
/** Additional CSS classes */
|
|
91
|
-
className?: string;
|
|
92
|
-
/**
|
|
93
|
-
* Enable responsive flex behavior
|
|
94
|
-
* When true (default): on small screens children expand (flex-grow), on larger screens children are right-aligned and sized to content
|
|
95
|
-
* When false: children behavior is not modified by responsive rules
|
|
96
|
-
*/
|
|
97
|
-
responsiveFlex?: boolean;
|
|
98
86
|
}
|
|
99
87
|
/**
|
|
100
88
|
* Props for the DrawerOverlay component
|
|
101
89
|
*/
|
|
102
|
-
export
|
|
103
|
-
/** Additional CSS classes */
|
|
104
|
-
className?: string;
|
|
105
|
-
}
|
|
90
|
+
export type DrawerOverlayProps = ComponentPropsWithoutRef<'div'>;
|
|
@@ -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,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
|
+
}
|
|
@@ -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
package/dist/js/text-CRsIInRA.js
DELETED
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import { c as u, j as b, a as y } from "./index-DOdDlCoL.js";
|
|
2
|
-
import { forwardRef as w } from "react";
|
|
3
|
-
const j = u("", {
|
|
4
|
-
variants: {
|
|
5
|
-
color: {
|
|
6
|
-
primary: "text-primary",
|
|
7
|
-
secondary: "text-secondary",
|
|
8
|
-
tertiary: "text-tertiary",
|
|
9
|
-
ghost: "text-ghost",
|
|
10
|
-
neutral: "text-ghost",
|
|
11
|
-
success: "text-success",
|
|
12
|
-
info: "text-info",
|
|
13
|
-
warning: "text-warning",
|
|
14
|
-
danger: "text-danger",
|
|
15
|
-
inherit: "",
|
|
16
|
-
gray: "text-gray-500",
|
|
17
|
-
black: "text-black",
|
|
18
|
-
white: "text-white"
|
|
19
|
-
},
|
|
20
|
-
hasUnderline: {
|
|
21
|
-
true: "underline",
|
|
22
|
-
false: ""
|
|
23
|
-
},
|
|
24
|
-
isCapitalize: {
|
|
25
|
-
true: "capitalize",
|
|
26
|
-
false: ""
|
|
27
|
-
},
|
|
28
|
-
align: {
|
|
29
|
-
left: "text-left",
|
|
30
|
-
center: "text-center",
|
|
31
|
-
right: "text-right",
|
|
32
|
-
justify: "text-justify"
|
|
33
|
-
},
|
|
34
|
-
italic: {
|
|
35
|
-
true: "italic",
|
|
36
|
-
false: ""
|
|
37
|
-
},
|
|
38
|
-
clamp: {
|
|
39
|
-
1: "line-clamp-1",
|
|
40
|
-
2: "line-clamp-2",
|
|
41
|
-
3: "line-clamp-3",
|
|
42
|
-
4: "line-clamp-4",
|
|
43
|
-
5: "line-clamp-5",
|
|
44
|
-
none: ""
|
|
45
|
-
},
|
|
46
|
-
ellipsis: {
|
|
47
|
-
true: "truncate",
|
|
48
|
-
false: ""
|
|
49
|
-
},
|
|
50
|
-
as: {
|
|
51
|
-
h1: "font-bold text-4xl leading-loose",
|
|
52
|
-
h2: "font-semibold text-3xl leading-relaxed",
|
|
53
|
-
h3: "font-medium text-2xl leading-relaxed",
|
|
54
|
-
h4: "font-bold text-xl leading-normal",
|
|
55
|
-
h5: "font-semibold text-lg leading-normal",
|
|
56
|
-
h6: "font-medium text-base leading-normal",
|
|
57
|
-
p: "font-normal text-base leading-normal",
|
|
58
|
-
span: "font-normal text-base leading-normal",
|
|
59
|
-
label: "font-normal text-xs leading-normal"
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
defaultVariants: {
|
|
63
|
-
color: "neutral",
|
|
64
|
-
hasUnderline: !1,
|
|
65
|
-
isCapitalize: !1,
|
|
66
|
-
align: "left",
|
|
67
|
-
italic: !1,
|
|
68
|
-
clamp: "none",
|
|
69
|
-
ellipsis: !1,
|
|
70
|
-
as: "span"
|
|
71
|
-
}
|
|
72
|
-
}), v = w(
|
|
73
|
-
({
|
|
74
|
-
as: e = "span",
|
|
75
|
-
color: l = "ghost",
|
|
76
|
-
hasUnderline: n = !1,
|
|
77
|
-
isCapitalize: s = !1,
|
|
78
|
-
align: i = "left",
|
|
79
|
-
italic: r = !1,
|
|
80
|
-
clamp: o = "none",
|
|
81
|
-
ellipsis: x = !1,
|
|
82
|
-
fontSize: t,
|
|
83
|
-
fontWeight: a,
|
|
84
|
-
className: c,
|
|
85
|
-
children: f,
|
|
86
|
-
...d
|
|
87
|
-
}, m) => {
|
|
88
|
-
const g = [
|
|
89
|
-
"h1",
|
|
90
|
-
"h2",
|
|
91
|
-
"h3",
|
|
92
|
-
"h4",
|
|
93
|
-
"h5",
|
|
94
|
-
"h6",
|
|
95
|
-
"p",
|
|
96
|
-
"span",
|
|
97
|
-
"label"
|
|
98
|
-
].includes(e) ? e : "span", h = t ? `text-${t}` : "", p = a ? `font-${a}` : "";
|
|
99
|
-
return /* @__PURE__ */ b.jsx(
|
|
100
|
-
e,
|
|
101
|
-
{
|
|
102
|
-
ref: m,
|
|
103
|
-
className: y(
|
|
104
|
-
j({
|
|
105
|
-
color: l,
|
|
106
|
-
hasUnderline: n,
|
|
107
|
-
isCapitalize: s,
|
|
108
|
-
align: i,
|
|
109
|
-
italic: r,
|
|
110
|
-
clamp: o,
|
|
111
|
-
ellipsis: x,
|
|
112
|
-
// @ts-expect-error - `as` is not a valid variant
|
|
113
|
-
as: g
|
|
114
|
-
}),
|
|
115
|
-
h,
|
|
116
|
-
p,
|
|
117
|
-
c
|
|
118
|
-
),
|
|
119
|
-
...d,
|
|
120
|
-
children: f
|
|
121
|
-
}
|
|
122
|
-
);
|
|
123
|
-
}
|
|
124
|
-
);
|
|
125
|
-
export {
|
|
126
|
-
v as T
|
|
127
|
-
};
|