@dimasbaguspm/versaur 0.0.19 → 0.0.21
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/README.md +22 -6
- package/dist/js/bottom-sheet-Eqduh3eY.js +495 -0
- package/dist/js/{selectable-multiple-input-CJXfqy1Z.js → bottom-sheet-input-DFGibm1I.js} +591 -476
- package/dist/js/forms/index.js +20 -17
- package/dist/js/{image-rectangle-CLU-GVtw.js → image-rectangle-C6cgL8R9.js} +354 -404
- package/dist/js/index.js +61 -53
- package/dist/js/layouts/index.js +5 -4
- package/dist/js/overlays/index.js +6 -4
- package/dist/js/primitive/index.js +15 -13
- package/dist/js/side-bar-BUACYQUo.js +397 -0
- package/dist/js/text-CRsIInRA.js +127 -0
- package/dist/js/tooltip-CDdl1U3A.js +148 -0
- package/dist/types/forms/bottom-sheet-input/bottom-sheet-input.d.ts +7 -0
- package/dist/types/forms/bottom-sheet-input/index.d.ts +2 -0
- package/dist/types/forms/bottom-sheet-input/types.d.ts +17 -0
- package/dist/types/forms/drawer-input/drawer-input.d.ts +6 -0
- package/dist/types/forms/drawer-input/index.d.ts +2 -0
- package/dist/types/forms/drawer-input/types.d.ts +18 -0
- package/dist/types/forms/index.d.ts +3 -0
- package/dist/types/forms/modal-input/index.d.ts +2 -0
- package/dist/types/forms/modal-input/modal-input.d.ts +6 -0
- package/dist/types/forms/modal-input/types.d.ts +18 -0
- package/dist/types/layouts/index.d.ts +1 -0
- package/dist/types/layouts/side-bar/index.d.ts +2 -0
- package/dist/types/layouts/side-bar/side-bar.atoms.d.ts +3 -0
- package/dist/types/layouts/side-bar/side-bar.d.ts +5 -0
- package/dist/types/layouts/side-bar/types.d.ts +42 -0
- package/dist/types/overlays/bottom-sheet/types.d.ts +2 -1
- package/dist/types/overlays/drawer/types.d.ts +2 -1
- package/dist/types/overlays/index.d.ts +1 -0
- package/dist/types/overlays/menu/menu.atoms.d.ts +5 -10
- package/dist/types/overlays/menu/menu.d.ts +2 -6
- package/dist/types/overlays/menu/types.d.ts +9 -14
- package/dist/types/overlays/menu/use-menu.d.ts +0 -1
- package/dist/types/overlays/modal/modal.d.ts +14 -5
- package/dist/types/overlays/modal/types.d.ts +7 -20
- package/dist/types/overlays/tooltip/index.d.ts +2 -0
- package/dist/types/overlays/tooltip/tooltip.d.ts +5 -0
- package/dist/types/overlays/tooltip/types.d.ts +33 -0
- package/dist/types/overlays/tooltip/use-tooltip-position.d.ts +8 -0
- package/dist/types/primitive/icon/types.d.ts +1 -1
- package/dist/types/primitive/index.d.ts +1 -0
- package/dist/types/primitive/no-results/index.d.ts +2 -0
- package/dist/types/primitive/no-results/no-results.d.ts +15 -0
- package/dist/types/primitive/no-results/types.d.ts +30 -0
- package/dist/types/primitive/table/table.atoms.d.ts +4 -6
- package/dist/types/primitive/table/table.d.ts +2 -1
- package/dist/types/primitive/table/types.d.ts +7 -4
- package/dist/utils/enforce-subpath-import.js +6 -0
- package/package.json +1 -1
- package/dist/js/bottom-sheet-BRv-oJL-.js +0 -646
- package/dist/js/form-layout-4ASWdXn8.js +0 -302
- package/dist/types/overlays/modal/use-escape-close.d.ts +0 -6
- package/dist/types/overlays/modal/use-focus-trap.d.ts +0 -6
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { DetailedHTMLProps, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Tooltip position options
|
|
4
|
+
* 'auto' (default): browser chooses best position, prefers bottom
|
|
5
|
+
* 'top', 'bottom', 'left', 'right': force position
|
|
6
|
+
*/
|
|
7
|
+
export type TooltipPosition = 'auto' | 'top' | 'bottom' | 'left' | 'right';
|
|
8
|
+
/**
|
|
9
|
+
* TooltipRootProps: Props for Tooltip root
|
|
10
|
+
* Extends native div props, but allows ReactNode for content
|
|
11
|
+
*/
|
|
12
|
+
export interface TooltipRootProps extends Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, 'content'> {
|
|
13
|
+
/**
|
|
14
|
+
* The content to show inside the tooltip
|
|
15
|
+
*/
|
|
16
|
+
content: ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* The element that triggers the tooltip (usually a child)
|
|
19
|
+
*/
|
|
20
|
+
children: ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* Position of the tooltip relative to the trigger (default: 'auto')
|
|
23
|
+
*/
|
|
24
|
+
position?: TooltipPosition;
|
|
25
|
+
/**
|
|
26
|
+
* Optional: delay in ms before showing the tooltip
|
|
27
|
+
*/
|
|
28
|
+
delay?: number;
|
|
29
|
+
/**
|
|
30
|
+
* Optional: className for the tooltip popover
|
|
31
|
+
*/
|
|
32
|
+
popoverClassName?: string;
|
|
33
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
import { TooltipPosition } from './types';
|
|
3
|
+
type TooltipPositionRef = {
|
|
4
|
+
position: TooltipPosition;
|
|
5
|
+
ref: RefObject<HTMLDivElement | null>;
|
|
6
|
+
};
|
|
7
|
+
export declare function useTooltipPositionRef(preferred?: TooltipPosition): TooltipPositionRef;
|
|
8
|
+
export {};
|
|
@@ -23,7 +23,7 @@ export type IconProps = Omit<React.SVGProps<SVGSVGElement>, 'children'> & {
|
|
|
23
23
|
/**
|
|
24
24
|
* Color variant
|
|
25
25
|
*/
|
|
26
|
-
color?: 'primary' | 'secondary' | 'tertiary' | 'ghost' | 'neutral' | 'success' | 'info' | 'warning' | 'danger' | 'inherit';
|
|
26
|
+
color?: 'primary' | 'secondary' | 'tertiary' | 'ghost' | 'neutral' | 'success' | 'info' | 'warning' | 'danger' | 'black' | 'gray' | 'white' | 'inherit';
|
|
27
27
|
/**
|
|
28
28
|
* Size of the icon
|
|
29
29
|
*/
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { NoResultsProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* NoResults component for Versaur UI
|
|
5
|
+
* Displays an empty state with icon, title, subtitle, and optional action
|
|
6
|
+
* Uses semantic HTML structure with proper headings and landmarks
|
|
7
|
+
* @example
|
|
8
|
+
* <NoResults
|
|
9
|
+
* icon={SearchIcon}
|
|
10
|
+
* title="No results found"
|
|
11
|
+
* subtitle="Try adjusting your search criteria"
|
|
12
|
+
* action={<Button onClick={clearSearch}>Clear filters</Button>}
|
|
13
|
+
* />
|
|
14
|
+
*/
|
|
15
|
+
export declare const NoResults: React.ForwardRefExoticComponent<NoResultsProps & React.RefAttributes<HTMLElement>>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ReactNode, HTMLAttributes, ComponentType } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* NoResultsProps defines the props for the NoResults component
|
|
4
|
+
* @property icon - Icon component to display (typically from lucide-react)
|
|
5
|
+
* @property title - Main heading text for the no results state
|
|
6
|
+
* @property subtitle - Secondary descriptive text
|
|
7
|
+
* @property action - Optional action element (typically a Button)
|
|
8
|
+
*/
|
|
9
|
+
export interface NoResultsProps extends HTMLAttributes<HTMLElement> {
|
|
10
|
+
/**
|
|
11
|
+
* Icon to display at the top of the no results state
|
|
12
|
+
* Should be a Lucide icon component
|
|
13
|
+
*/
|
|
14
|
+
icon: ComponentType;
|
|
15
|
+
/**
|
|
16
|
+
* Main heading text that describes the empty state
|
|
17
|
+
*/
|
|
18
|
+
title: string;
|
|
19
|
+
/**
|
|
20
|
+
* Secondary descriptive text that provides more context
|
|
21
|
+
* Can be a string or ReactNode for more complex content
|
|
22
|
+
*/
|
|
23
|
+
subtitle?: string | ReactNode;
|
|
24
|
+
/**
|
|
25
|
+
* Optional action element to render below the content
|
|
26
|
+
* Typically a Button component for user interaction
|
|
27
|
+
*/
|
|
28
|
+
action?: ReactNode;
|
|
29
|
+
hasGrayBackground?: boolean;
|
|
30
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TableHeaderProps, TableBodyProps, TableFooterProps, TableRowProps,
|
|
1
|
+
import { TableHeaderProps, TableBodyProps, TableFooterProps, TableRowProps, TableHeaderItemProps, TableRowItemProps } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* Table.Header renders the table header row (grid-based, ARIA role)
|
|
4
4
|
*/
|
|
@@ -15,8 +15,6 @@ declare const TableFooter: import('react').ForwardRefExoticComponent<TableFooter
|
|
|
15
15
|
* Table.Row renders a table row (grid-based, ARIA role)
|
|
16
16
|
*/
|
|
17
17
|
declare const TableRow: import('react').ForwardRefExoticComponent<TableRowProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
declare const TableColumn: import('react').ForwardRefExoticComponent<TableColumnProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
22
|
-
export { TableHeader, TableBody, TableFooter, TableRow, TableColumn };
|
|
18
|
+
declare const TableRowItem: import('react').ForwardRefExoticComponent<TableRowItemProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
19
|
+
declare const TableHeaderItem: import('react').ForwardRefExoticComponent<TableHeaderItemProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
20
|
+
export { TableHeader, TableBody, TableFooter, TableRow, TableRowItem, TableHeaderItem, };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { TableProps } from './types';
|
|
2
2
|
export declare const Table: import('react').ForwardRefExoticComponent<TableProps & import('react').RefAttributes<HTMLDivElement>> & {
|
|
3
3
|
Header: import('react').ForwardRefExoticComponent<import('./types').TableHeaderProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
4
|
+
HeaderItem: import('react').ForwardRefExoticComponent<import('./types').TableHeaderItemProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
4
5
|
Body: import('react').ForwardRefExoticComponent<import('./types').TableBodyProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
5
6
|
Footer: import('react').ForwardRefExoticComponent<import('./types').TableFooterProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
6
7
|
Row: import('react').ForwardRefExoticComponent<import('./types').TableRowProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
7
|
-
|
|
8
|
+
RowItem: import('react').ForwardRefExoticComponent<import('./types').TableRowItemProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
8
9
|
};
|
|
@@ -5,19 +5,20 @@ import { HTMLAttributes, ReactNode, TableHTMLAttributes } from 'react';
|
|
|
5
5
|
export interface TableProps extends TableHTMLAttributes<HTMLTableElement> {
|
|
6
6
|
/** Table children (Header, Body, Footer, etc) */
|
|
7
7
|
children: ReactNode;
|
|
8
|
-
|
|
8
|
+
/** Maximum number of columns in the table */
|
|
9
|
+
columns: number;
|
|
9
10
|
}
|
|
10
11
|
/**
|
|
11
12
|
* Context value for Table
|
|
12
13
|
*/
|
|
13
14
|
export interface TableContextValue {
|
|
14
|
-
|
|
15
|
+
columns: number;
|
|
15
16
|
}
|
|
16
17
|
/**
|
|
17
18
|
* TableHeaderProps for <Table.Header>
|
|
18
19
|
*/
|
|
19
|
-
export interface TableHeaderProps extends
|
|
20
|
-
children:
|
|
20
|
+
export interface TableHeaderProps extends HTMLAttributes<HTMLDivElement> {
|
|
21
|
+
children: ReactNode;
|
|
21
22
|
}
|
|
22
23
|
/**
|
|
23
24
|
* TableBodyProps for <Table.Body>
|
|
@@ -49,3 +50,5 @@ export interface TableColumnProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
49
50
|
/** Horizontal alignment of cell content (left, center, right). Default: left */
|
|
50
51
|
align?: 'left' | 'center' | 'right';
|
|
51
52
|
}
|
|
53
|
+
export type TableHeaderItemProps = Omit<TableColumnProps, 'as'>;
|
|
54
|
+
export type TableRowItemProps = Omit<TableColumnProps, 'as'>;
|
|
@@ -7,11 +7,14 @@ const symbolToSubpath = {
|
|
|
7
7
|
"LoadingIndicator": "feedbacks",
|
|
8
8
|
"ProgressIndicator": "feedbacks",
|
|
9
9
|
"Skeleton": "feedbacks",
|
|
10
|
+
"BottomSheetInput": "forms",
|
|
10
11
|
"CheckboxInput": "forms",
|
|
11
12
|
"ChipMultipleInput": "forms",
|
|
12
13
|
"ChipSingleInput": "forms",
|
|
13
14
|
"DateSinglePickerInput": "forms",
|
|
15
|
+
"DrawerInput": "forms",
|
|
14
16
|
"EmailInput": "forms",
|
|
17
|
+
"ModalInput": "forms",
|
|
15
18
|
"PriceInput": "forms",
|
|
16
19
|
"RadioInput": "forms",
|
|
17
20
|
"SearchInput": "forms",
|
|
@@ -28,6 +31,7 @@ const symbolToSubpath = {
|
|
|
28
31
|
"BottomBar": "layouts",
|
|
29
32
|
"FormLayout": "layouts",
|
|
30
33
|
"PageLayout": "layouts",
|
|
34
|
+
"SideBar": "layouts",
|
|
31
35
|
"TopBar": "layouts",
|
|
32
36
|
"Breadcrumbs": "navigation",
|
|
33
37
|
"Tabs": "navigation",
|
|
@@ -35,6 +39,7 @@ const symbolToSubpath = {
|
|
|
35
39
|
"Drawer": "overlays",
|
|
36
40
|
"Menu": "overlays",
|
|
37
41
|
"Modal": "overlays",
|
|
42
|
+
"Tooltip": "overlays",
|
|
38
43
|
"Alert": "primitive",
|
|
39
44
|
"Anchor": "primitive",
|
|
40
45
|
"Avatar": "primitive",
|
|
@@ -51,6 +56,7 @@ const symbolToSubpath = {
|
|
|
51
56
|
"ImageSquare": "primitive",
|
|
52
57
|
"ImageRectangle": "primitive",
|
|
53
58
|
"BaseImage": "primitive",
|
|
59
|
+
"NoResults": "primitive",
|
|
54
60
|
"Snackbar": "primitive",
|
|
55
61
|
"Table": "primitive",
|
|
56
62
|
"Text": "primitive",
|