@dimasbaguspm/versaur 0.0.61 → 0.0.62
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/forms/index.js +1 -1
- package/dist/js/{image-rectangle-CLLXF8w_.js → image-rectangle-BwT5taeR.js} +484 -486
- package/dist/js/index.js +5 -5
- package/dist/js/layouts/index.js +1 -1
- package/dist/js/navigation/index.js +1 -1
- package/dist/js/overlays/index.js +2 -2
- package/dist/js/primitive/index.js +1 -1
- package/dist/js/{tabs-DeyqSghV.js → tabs-FDdFo4WV.js} +1 -1
- package/dist/js/{time-picker-input-B_cV6nlk.js → time-picker-input-DMNSwm-p.js} +1 -1
- package/dist/js/tooltip-BGJUYNL0.js +625 -0
- package/dist/js/{top-bar-BGJufFzt.js → top-bar-ChNgZEQx.js} +157 -187
- package/dist/types/overlays/drawer/drawer.atoms.d.ts +2 -7
- package/dist/types/overlays/drawer/drawer.d.ts +1 -1
- package/dist/types/overlays/drawer/types.d.ts +1 -11
- package/dist/types/overlays/modal/modal.atoms.d.ts +1 -5
- package/dist/types/overlays/modal/types.d.ts +1 -2
- package/dist/types/primitive/heading/types.d.ts +9 -12
- package/dist/types/primitive/text/text.d.ts +6 -3
- package/dist/types/primitive/text/types.d.ts +10 -18
- package/dist/types/primitive/tile/tile.d.ts +7 -1
- package/dist/types/primitive/tile/types.d.ts +6 -1
- package/package.json +2 -1
- package/dist/js/tooltip-C1TbSbNF.js +0 -693
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { DrawerHeaderProps, DrawerBodyProps, DrawerFooterProps, DrawerHeaderTabProps } from './types';
|
|
3
|
-
import { ButtonIconProps,
|
|
4
|
-
/**
|
|
5
|
-
* DrawerOverlay - Background overlay that appears behind the drawer
|
|
6
|
-
* Provides a dark blurred background to help users focus on the drawer content
|
|
7
|
-
*/
|
|
8
|
-
export declare const DrawerOverlay: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
3
|
+
import { ButtonIconProps, HeadingProps } from '../../primitive';
|
|
9
4
|
/**
|
|
10
5
|
* DrawerHeader - Header section of the drawer
|
|
11
6
|
* Uses semantic <header> element with proper ARIA labeling
|
|
@@ -15,7 +10,7 @@ export declare const DrawerHeader: React.ForwardRefExoticComponent<DrawerHeaderP
|
|
|
15
10
|
* DrawerTitle - Title element for the drawer header
|
|
16
11
|
* Automatically uses the titleId from context for ARIA labeling
|
|
17
12
|
*/
|
|
18
|
-
export declare const DrawerTitle: React.ForwardRefExoticComponent<
|
|
13
|
+
export declare const DrawerTitle: React.ForwardRefExoticComponent<HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
19
14
|
/**
|
|
20
15
|
* DrawerCloseButton - Close button for the drawer
|
|
21
16
|
* Triggers the onClose callback when clicked
|
|
@@ -11,7 +11,7 @@ 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<HTMLElement>>;
|
|
14
|
-
Title: React.ForwardRefExoticComponent<import('../..').
|
|
14
|
+
Title: React.ForwardRefExoticComponent<import('../..').HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
15
15
|
CloseButton: React.ForwardRefExoticComponent<Partial<import('../..').ButtonIconProps> & React.RefAttributes<HTMLButtonElement>>;
|
|
16
16
|
Tab: React.ForwardRefExoticComponent<import('./types').DrawerHeaderTabProps & React.RefAttributes<HTMLDivElement>>;
|
|
17
17
|
Body: React.ForwardRefExoticComponent<import('./types').DrawerBodyProps & React.RefAttributes<HTMLElement>>;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, HTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
import { OverlayPortalProps } from '../../utils/overlay-portal';
|
|
3
|
-
/**
|
|
4
|
-
* Drawer transition type options
|
|
5
|
-
*/
|
|
6
|
-
export type DrawerTransitionType = 'slide' | 'fade';
|
|
7
3
|
/**
|
|
8
4
|
* Drawer positioning options
|
|
9
5
|
*/
|
|
@@ -24,8 +20,6 @@ export interface DrawerContextValue {
|
|
|
24
20
|
position: DrawerPosition;
|
|
25
21
|
/** Drawer size */
|
|
26
22
|
size: DrawerSize;
|
|
27
|
-
/** Drawer transition type */
|
|
28
|
-
transitionType: DrawerTransitionType;
|
|
29
23
|
/** Whether to disable overlay click to close */
|
|
30
24
|
disableOverlayClickToClose: boolean;
|
|
31
25
|
/** Whether to disable escape key down */
|
|
@@ -38,7 +32,7 @@ export interface DrawerContextValue {
|
|
|
38
32
|
/**
|
|
39
33
|
* Props for the Drawer component (controlled component)
|
|
40
34
|
*/
|
|
41
|
-
export interface DrawerProps extends ComponentPropsWithoutRef<'
|
|
35
|
+
export interface DrawerProps extends Omit<ComponentPropsWithoutRef<'dialog'>, 'onClose' | 'open'>, OverlayPortalProps, Partial<Omit<DrawerContextValue, 'isOpen' | 'onClose'>>, Pick<DrawerContextValue, 'isOpen' | 'onClose'> {
|
|
42
36
|
/** Children components */
|
|
43
37
|
children: ReactNode;
|
|
44
38
|
}
|
|
@@ -72,7 +66,3 @@ export interface DrawerFooterProps extends ComponentPropsWithoutRef<'footer'> {
|
|
|
72
66
|
/** Children components */
|
|
73
67
|
children: ReactNode;
|
|
74
68
|
}
|
|
75
|
-
/**
|
|
76
|
-
* Props for the DrawerOverlay component
|
|
77
|
-
*/
|
|
78
|
-
export type DrawerOverlayProps = ComponentPropsWithoutRef<'div'>;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import { ModalHeaderProps, ModalFooterProps,
|
|
1
|
+
import { ModalHeaderProps, ModalFooterProps, ModalBodyProps } from './types';
|
|
2
2
|
export declare const ModalHeader: import('react').ForwardRefExoticComponent<ModalHeaderProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
3
3
|
export declare const ModalFooter: import('react').ForwardRefExoticComponent<ModalFooterProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
4
4
|
export declare const ModalBody: import('react').ForwardRefExoticComponent<ModalBodyProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
5
|
-
/**
|
|
6
|
-
* ModalOverlay atom: handles overlay rendering, click-to-close, and transitions
|
|
7
|
-
*/
|
|
8
|
-
export declare const ModalOverlay: import('react').ForwardRefExoticComponent<ModalOverlayProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -26,7 +26,7 @@ export interface ModalContextValue {
|
|
|
26
26
|
/**
|
|
27
27
|
* Modal compound root
|
|
28
28
|
*/
|
|
29
|
-
export interface ModalRootProps extends Omit<HTMLAttributes<
|
|
29
|
+
export interface ModalRootProps extends Omit<HTMLAttributes<HTMLDialogElement>, 'onClose' | 'children'>, OverlayPortalProps, Partial<Omit<ModalContextValue, 'isOpen' | 'onClose'>>, Pick<ModalContextValue, 'isOpen' | 'onClose'> {
|
|
30
30
|
/** Children (Modal compound parts) */
|
|
31
31
|
children: ReactNode;
|
|
32
32
|
}
|
|
@@ -42,4 +42,3 @@ export interface ModalFooterProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
42
42
|
export interface ModalBodyProps extends HTMLAttributes<HTMLDivElement> {
|
|
43
43
|
children: React.ReactNode;
|
|
44
44
|
}
|
|
45
|
-
export type ModalOverlayProps = Omit<HTMLAttributes<HTMLDivElement>, 'children'>;
|
|
@@ -1,33 +1,30 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
/**
|
|
3
3
|
* HeadingProps defines the props for the Heading component
|
|
4
|
-
* @property
|
|
4
|
+
* @property as - HTML heading element to render (h1-h6)
|
|
5
5
|
* @property color - Versaur color system (primary, secondary, tertiary, ghost, neutral, success, info, warning, danger)
|
|
6
|
-
* @property
|
|
7
|
-
* @property
|
|
6
|
+
* @property transform - Text transform helper
|
|
7
|
+
* @property decoration - Text decoration helper
|
|
8
8
|
* @property hasMargin - Whether to add margin bottom (mb-4)
|
|
9
9
|
* @property align - Text alignment
|
|
10
|
-
* @property italic - Whether to italicize the text
|
|
11
10
|
* @property clamp - Clamp lines (1-5) or none
|
|
12
11
|
* @property ellipsis - Whether to truncate text with ellipsis
|
|
13
12
|
* @property className - Additional CSS classes
|
|
14
13
|
* @property children - Text content
|
|
15
14
|
*/
|
|
16
15
|
export interface HeadingProps extends HTMLAttributes<HTMLHeadingElement> {
|
|
17
|
-
/**
|
|
18
|
-
|
|
16
|
+
/** HTML heading element to render (h1-h6) */
|
|
17
|
+
as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
19
18
|
/** Versaur color system */
|
|
20
19
|
color?: 'primary' | 'secondary' | 'tertiary' | 'ghost' | 'neutral' | 'success' | 'info' | 'warning' | 'danger' | 'inherit' | 'white' | 'black' | 'gray';
|
|
21
|
-
/**
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
|
|
20
|
+
/** Text transform helper */
|
|
21
|
+
transform?: 'none' | 'capitalize' | 'uppercase' | 'lowercase';
|
|
22
|
+
/** Text decoration helper */
|
|
23
|
+
decoration?: 'none' | 'underline' | 'line-through' | 'overline';
|
|
25
24
|
/** Add margin bottom (mb-4) */
|
|
26
25
|
hasMargin?: boolean;
|
|
27
26
|
/** Text alignment */
|
|
28
27
|
align?: 'left' | 'center' | 'right' | 'justify';
|
|
29
|
-
/** Italic text */
|
|
30
|
-
italic?: boolean;
|
|
31
28
|
/** Clamp lines (1-5) or none */
|
|
32
29
|
clamp?: 1 | 2 | 3 | 4 | 5 | 'none';
|
|
33
30
|
/** Ellipsis (truncate) */
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
1
2
|
import { TextProps } from './types';
|
|
2
3
|
/**
|
|
3
4
|
* Text component for Versaur UI
|
|
4
|
-
* Provides semantic typography, color,
|
|
5
|
-
* @example <Text as="
|
|
5
|
+
* Provides semantic typography, color, decoration, and transform support
|
|
6
|
+
* @example <Text as="p" color="primary" decoration="underline" transform="capitalize">bar</Text>
|
|
6
7
|
*/
|
|
7
|
-
|
|
8
|
+
type TextRef = HTMLParagraphElement | HTMLSpanElement | HTMLQuoteElement | HTMLLabelElement | HTMLElement;
|
|
9
|
+
export declare const Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<TextRef>>;
|
|
10
|
+
export {};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { HTMLAttributes, ElementType, ReactNode } from 'react';
|
|
2
2
|
/**
|
|
3
3
|
* TextProps defines the props for the Text component
|
|
4
|
-
* @property as - HTML element to render (
|
|
4
|
+
* @property as - HTML element to render (inline-friendly elements)
|
|
5
5
|
* @property color - Versaur color system (primary, secondary, tertiary, ghost, neutral, success, info, warning, danger)
|
|
6
|
-
* @property
|
|
7
|
-
* @property
|
|
6
|
+
* @property transform - Text transform helper (capitalize, uppercase, lowercase, or none)
|
|
7
|
+
* @property decoration - Text decoration helper (underline, line-through, overline, none)
|
|
8
8
|
* @property className - Additional CSS classes
|
|
9
9
|
* @property children - Text content
|
|
10
10
|
*/
|
|
11
11
|
export interface TextProps extends HTMLAttributes<HTMLElement> {
|
|
12
|
-
/** HTML element to render (
|
|
13
|
-
as?: ElementType
|
|
12
|
+
/** HTML element to render (inline-friendly elements) */
|
|
13
|
+
as?: Extract<ElementType, 'span' | 'p' | 'q' | 's' | 'strong' | 'em' | 'small' | 'label'>;
|
|
14
14
|
/** Versaur color system */
|
|
15
15
|
color?: 'primary' | 'secondary' | 'tertiary' | 'ghost' | 'neutral' | 'success' | 'info' | 'warning' | 'danger' | 'inherit' | 'white' | 'black' | 'gray';
|
|
16
|
-
/**
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
|
|
16
|
+
/** Text transform helper */
|
|
17
|
+
transform?: 'none' | 'capitalize' | 'uppercase' | 'lowercase';
|
|
18
|
+
/** Text decoration helper */
|
|
19
|
+
decoration?: 'none' | 'underline' | 'line-through' | 'overline';
|
|
20
20
|
/** Text alignment */
|
|
21
21
|
align?: 'left' | 'center' | 'right' | 'justify';
|
|
22
22
|
/** Italic text */
|
|
@@ -25,15 +25,7 @@ export interface TextProps extends HTMLAttributes<HTMLElement> {
|
|
|
25
25
|
clamp?: 1 | 2 | 3 | 4 | 5 | 'none';
|
|
26
26
|
/** Ellipsis (truncate) */
|
|
27
27
|
ellipsis?: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* If set, overrides the default font size from the `as` prop and design system
|
|
30
|
-
* See: https://tailwindcss.com/docs/font-size
|
|
31
|
-
*/
|
|
32
|
-
fontSize?: 'xs' | 'sm' | 'base' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl' | '8xl' | '9xl' | undefined;
|
|
33
|
-
/** Tailwind font weight utility (e.g., 'thin', 'extralight', 'light', 'normal', 'medium', 'semibold', 'bold', 'extrabold', 'black')
|
|
34
|
-
* If set, overrides the default font weight from the `as` prop and design system
|
|
35
|
-
* See: https://tailwindcss.com/docs/font-weight
|
|
36
|
-
*/
|
|
28
|
+
/** Font weight utility (matches Tailwind font-weight) */
|
|
37
29
|
fontWeight?: 'thin' | 'extralight' | 'light' | 'normal' | 'medium' | 'semibold' | 'bold' | 'extrabold' | 'black' | undefined;
|
|
38
30
|
/** Text content */
|
|
39
31
|
children: ReactNode;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
1
2
|
import { TileProps } from './types';
|
|
3
|
+
type TileComponent = React.ForwardRefExoticComponent<TileProps & React.RefAttributes<HTMLDivElement>> & {
|
|
4
|
+
/** Props type alias exposed as Tile.Props */
|
|
5
|
+
Props: TileProps;
|
|
6
|
+
};
|
|
2
7
|
/**
|
|
3
8
|
* Tile component - A flexible box container with various styling options
|
|
4
9
|
*
|
|
@@ -8,4 +13,5 @@ import { TileProps } from './types';
|
|
|
8
13
|
* - Rounded or square shapes
|
|
9
14
|
* - Accessible and semantic
|
|
10
15
|
*/
|
|
11
|
-
export declare const Tile:
|
|
16
|
+
export declare const Tile: TileComponent;
|
|
17
|
+
export {};
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import { HTMLAttributes } from 'react';
|
|
1
|
+
import { HTMLAttributes, JSX } from 'react';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
import { tileVariants } from './helpers';
|
|
4
4
|
/**
|
|
5
5
|
* Props for the Tile component
|
|
6
6
|
*/
|
|
7
7
|
export interface TileProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof tileVariants> {
|
|
8
|
+
/**
|
|
9
|
+
* Element type to render as
|
|
10
|
+
* @default 'div'
|
|
11
|
+
*/
|
|
12
|
+
as?: keyof Pick<JSX.IntrinsicElements, 'div' | 'section' | 'article' | 'aside'>;
|
|
8
13
|
/**
|
|
9
14
|
* Visual appearance variant
|
|
10
15
|
* @default 'white'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dimasbaguspm/versaur",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.62",
|
|
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",
|
|
@@ -109,6 +109,7 @@
|
|
|
109
109
|
"eslint-plugin-react-refresh": "0.4.20",
|
|
110
110
|
"eslint-plugin-storybook": "9.0.16",
|
|
111
111
|
"globals": "16.3.0",
|
|
112
|
+
"happy-dom": "20.0.11",
|
|
112
113
|
"jsdom": "26.1.0",
|
|
113
114
|
"lucide-react": "0.525.0",
|
|
114
115
|
"prettier": "3.5.1",
|