@dimasbaguspm/versaur 0.0.60 → 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-CCvXv24a.js → image-rectangle-BwT5taeR.js} +694 -634
- package/dist/js/index.js +63 -61
- 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 +27 -25
- package/dist/js/{tabs-BQs53hHL.js → tabs-FDdFo4WV.js} +1 -1
- package/dist/js/{time-picker-input-Disd231b.js → time-picker-input-DMNSwm-p.js} +854 -642
- package/dist/js/tooltip-BGJUYNL0.js +625 -0
- package/dist/js/{top-bar-DMBbEIlR.js → top-bar-ChNgZEQx.js} +157 -187
- package/dist/types/forms/textarea-input/index.d.ts +1 -1
- package/dist/types/forms/textarea-input/textarea-input.atoms.d.ts +53 -0
- package/dist/types/forms/textarea-input/textarea-input.d.ts +1 -0
- package/dist/types/forms/textarea-input/types.d.ts +28 -0
- package/dist/types/forms/textarea-input/use-textarea-formatting.d.ts +21 -0
- 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/formatted-text/formatted-text.d.ts +10 -0
- package/dist/types/primitive/formatted-text/index.d.ts +3 -0
- package/dist/types/primitive/formatted-text/types.d.ts +19 -0
- package/dist/types/primitive/heading/types.d.ts +9 -12
- package/dist/types/primitive/index.d.ts +1 -0
- 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/dist/utils/enforce-subpath-import.js +2 -0
- package/package.json +2 -1
- package/dist/js/tooltip-Dpx3TpR6.js +0 -693
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { TextAreaInput } from './textarea-input';
|
|
2
|
-
export type { TextAreaInputProps } from './types';
|
|
2
|
+
export type { TextAreaInputProps, FormatType, FormatState } from './types';
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { FormatType } from './types';
|
|
3
|
+
import { IconProps } from '../../primitive/icon';
|
|
4
|
+
/**
|
|
5
|
+
* Props for the TextAreaInputToolbarButton component
|
|
6
|
+
*/
|
|
7
|
+
export interface TextAreaInputToolbarButtonProps {
|
|
8
|
+
/**
|
|
9
|
+
* The format type this button applies
|
|
10
|
+
*/
|
|
11
|
+
format: FormatType;
|
|
12
|
+
/**
|
|
13
|
+
* Whether this format is currently active
|
|
14
|
+
*/
|
|
15
|
+
isActive: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Icon component to render
|
|
18
|
+
*/
|
|
19
|
+
icon: IconProps['as'];
|
|
20
|
+
/**
|
|
21
|
+
* Accessible label for the button
|
|
22
|
+
*/
|
|
23
|
+
label: string;
|
|
24
|
+
/**
|
|
25
|
+
* Whether the button is disabled
|
|
26
|
+
*/
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Click handler
|
|
30
|
+
*/
|
|
31
|
+
onClick: (format: FormatType) => void;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Individual toolbar button for formatting actions
|
|
35
|
+
*/
|
|
36
|
+
export declare const TextAreaInputToolbarButton: React.ForwardRefExoticComponent<TextAreaInputToolbarButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
37
|
+
/**
|
|
38
|
+
* Props for the TextAreaInputToolbar component
|
|
39
|
+
*/
|
|
40
|
+
export interface TextAreaInputToolbarProps {
|
|
41
|
+
/**
|
|
42
|
+
* Child toolbar buttons
|
|
43
|
+
*/
|
|
44
|
+
children: React.ReactNode;
|
|
45
|
+
/**
|
|
46
|
+
* Additional CSS classes
|
|
47
|
+
*/
|
|
48
|
+
className?: string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Container for formatting toolbar buttons
|
|
52
|
+
*/
|
|
53
|
+
export declare const TextAreaInputToolbar: React.ForwardRefExoticComponent<TextAreaInputToolbarProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -5,6 +5,7 @@ import { TextAreaInputProps } from './types';
|
|
|
5
5
|
*
|
|
6
6
|
* Uses contentEditable div for robust multi-line text input with better control
|
|
7
7
|
* Provides error states, disabled, and readOnly support
|
|
8
|
+
* Supports rich text formatting with an optional toolbar
|
|
8
9
|
* Follows browser standards and accessibility best practices
|
|
9
10
|
*/
|
|
10
11
|
export declare const TextAreaInput: React.ForwardRefExoticComponent<TextAreaInputProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,4 +1,23 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Available formatting options for rich text editing
|
|
4
|
+
*/
|
|
5
|
+
export type FormatType = 'bold' | 'italic' | 'underline' | 'strikethrough' | 'h1' | 'h2' | 'h3' | 'orderedList' | 'unorderedList' | 'link';
|
|
6
|
+
/**
|
|
7
|
+
* State of active formats in the current selection
|
|
8
|
+
*/
|
|
9
|
+
export interface FormatState {
|
|
10
|
+
bold: boolean;
|
|
11
|
+
italic: boolean;
|
|
12
|
+
underline: boolean;
|
|
13
|
+
strikethrough: boolean;
|
|
14
|
+
h1: boolean;
|
|
15
|
+
h2: boolean;
|
|
16
|
+
h3: boolean;
|
|
17
|
+
orderedList: boolean;
|
|
18
|
+
unorderedList: boolean;
|
|
19
|
+
link: boolean;
|
|
20
|
+
}
|
|
2
21
|
/**
|
|
3
22
|
* Props for the TextAreaInput component
|
|
4
23
|
*/
|
|
@@ -52,4 +71,13 @@ export interface TextAreaInputProps extends Omit<HTMLAttributes<HTMLDivElement>,
|
|
|
52
71
|
* Whether the textarea is required
|
|
53
72
|
*/
|
|
54
73
|
required?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Whether to show the formatting toolbar
|
|
76
|
+
* @default false
|
|
77
|
+
*/
|
|
78
|
+
showToolbar?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Allowed formatting options (if not specified, all are allowed)
|
|
81
|
+
*/
|
|
82
|
+
allowedFormats?: FormatType[];
|
|
55
83
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FormatType } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Custom hook for managing rich text formatting in TextAreaInput
|
|
4
|
+
*
|
|
5
|
+
* Handles toolbar state, format application, and selection tracking
|
|
6
|
+
*/
|
|
7
|
+
export declare const useTextAreaFormatting: (enabled: boolean, contentRef: React.RefObject<HTMLDivElement | null>) => {
|
|
8
|
+
formatState: {
|
|
9
|
+
bold: boolean;
|
|
10
|
+
italic: boolean;
|
|
11
|
+
underline: boolean;
|
|
12
|
+
strikethrough: boolean;
|
|
13
|
+
h1: boolean;
|
|
14
|
+
h2: boolean;
|
|
15
|
+
h3: boolean;
|
|
16
|
+
orderedList: boolean;
|
|
17
|
+
unorderedList: boolean;
|
|
18
|
+
link: boolean;
|
|
19
|
+
};
|
|
20
|
+
handleFormatClick: (format: FormatType) => void;
|
|
21
|
+
};
|
|
@@ -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'>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { FormattedTextProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* FormattedText component for Versaur UI
|
|
5
|
+
*
|
|
6
|
+
* Displays rich HTML content with consistent formatting styles
|
|
7
|
+
* Matches the styling used in TextAreaInput with toolbar formatting
|
|
8
|
+
* Should be used with sanitized HTML content to prevent XSS attacks
|
|
9
|
+
*/
|
|
10
|
+
export declare const FormattedText: React.ForwardRefExoticComponent<FormattedTextProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Props for the FormattedText component
|
|
4
|
+
*/
|
|
5
|
+
export interface FormattedTextProps extends HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
/**
|
|
7
|
+
* The HTML content to display (should be sanitized if from user input)
|
|
8
|
+
*/
|
|
9
|
+
content: string;
|
|
10
|
+
/**
|
|
11
|
+
* Whether to allow the content to be scrollable
|
|
12
|
+
* @default false
|
|
13
|
+
*/
|
|
14
|
+
scrollable?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Maximum height for scrollable content (in rem units)
|
|
17
|
+
*/
|
|
18
|
+
maxHeight?: number;
|
|
19
|
+
}
|
|
@@ -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'
|
|
@@ -59,6 +59,8 @@ const symbolToSubpath = {
|
|
|
59
59
|
"ButtonMenuIcon": "primitive",
|
|
60
60
|
"Card": "primitive",
|
|
61
61
|
"FilterChip": "primitive",
|
|
62
|
+
"FormattedText": "primitive",
|
|
63
|
+
"formattedContentStyles": "primitive",
|
|
62
64
|
"Heading": "primitive",
|
|
63
65
|
"Hr": "primitive",
|
|
64
66
|
"Icon": "primitive",
|
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",
|