@dimasbaguspm/versaur 0.0.29 → 0.0.31

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.
Files changed (41) hide show
  1. package/dist/js/{bottom-sheet-BKd7WCCS.js → bottom-sheet-3W_vCYl6.js} +3 -2
  2. package/dist/js/{bottom-sheet-input-DrbGhcXv.js → bottom-sheet-input-CI-9wYa7.js} +634 -727
  3. package/dist/js/forms/index.js +1 -1
  4. package/dist/js/{image-rectangle-CF656HIm.js → image-rectangle-BpMI_fTE.js} +242 -542
  5. package/dist/js/index.js +27 -29
  6. package/dist/js/layouts/index.js +1 -1
  7. package/dist/js/navigation/index.js +1 -1
  8. package/dist/js/overlays/index.js +2 -2
  9. package/dist/js/primitive/index.js +15 -17
  10. package/dist/js/{tabs-DoiqKzR9.js → tabs-BOdkXJdy.js} +1 -1
  11. package/dist/js/{tooltip-D1-q8Ars.js → tooltip-C1P1eN0U.js} +65 -57
  12. package/dist/js/{top-bar-B4SZ2YZC.js → top-bar-sahvpzBv.js} +179 -166
  13. package/dist/types/forms/chip-multiple-input/chip-multiple-input.d.ts +2 -3
  14. package/dist/types/forms/chip-multiple-input/types.d.ts +1 -21
  15. package/dist/types/forms/chip-single-input/chip-single-input.d.ts +2 -3
  16. package/dist/types/forms/chip-single-input/types.d.ts +1 -9
  17. package/dist/types/layouts/page-header/page-header.atoms.d.ts +2 -1
  18. package/dist/types/layouts/page-header/page-header.d.ts +4 -0
  19. package/dist/types/layouts/page-header/types.d.ts +6 -0
  20. package/dist/types/overlays/menu/index.d.ts +1 -1
  21. package/dist/types/overlays/menu/menu.d.ts +4 -1
  22. package/dist/types/overlays/menu/types.d.ts +4 -2
  23. package/dist/types/overlays/menu/use-menu.d.ts +0 -1
  24. package/dist/types/primitive/button-menu/button-menu.d.ts +4 -0
  25. package/dist/types/primitive/button-menu/index.d.ts +2 -0
  26. package/dist/types/primitive/button-menu/types.d.ts +13 -0
  27. package/dist/types/primitive/card/card.atoms.d.ts +3 -0
  28. package/dist/types/primitive/card/card.d.ts +4 -23
  29. package/dist/types/primitive/card/types.d.ts +13 -2
  30. package/dist/types/primitive/index.d.ts +0 -2
  31. package/dist/utils/enforce-subpath-import.js +1 -2
  32. package/package.json +1 -1
  33. package/dist/types/primitive/calendar/calendar.atoms.d.ts +0 -13
  34. package/dist/types/primitive/calendar/calendar.d.ts +0 -8
  35. package/dist/types/primitive/calendar/index.d.ts +0 -2
  36. package/dist/types/primitive/calendar/types.d.ts +0 -54
  37. package/dist/types/primitive/calendar/use-calendar.d.ts +0 -18
  38. package/dist/types/primitive/description-list/description-list.atoms.d.ts +0 -13
  39. package/dist/types/primitive/description-list/description-list.d.ts +0 -6
  40. package/dist/types/primitive/description-list/index.d.ts +0 -2
  41. package/dist/types/primitive/description-list/types.d.ts +0 -46
@@ -1,5 +1,4 @@
1
- import { default as React } from 'react';
2
1
  import { ChipMultipleInputProps } from './types';
3
- export declare const ChipMultipleInput: React.ForwardRefExoticComponent<ChipMultipleInputProps & React.RefAttributes<HTMLDivElement>> & {
4
- Option: React.ForwardRefExoticComponent<import('./types').ChipMultipleInputOptionProps & React.RefAttributes<HTMLInputElement>>;
2
+ export declare const ChipMultipleInput: import('react').ForwardRefExoticComponent<ChipMultipleInputProps & import('react').RefAttributes<HTMLDivElement>> & {
3
+ Option: import('react').ForwardRefExoticComponent<import('./types').ChipMultipleInputOptionProps & import('react').RefAttributes<HTMLInputElement>>;
5
4
  };
@@ -17,7 +17,7 @@ export interface ChipMultipleInputProps extends Omit<InputHTMLAttributes<HTMLInp
17
17
  * Semantic variants: success, info, warning, danger
18
18
  * Each variant supports outline form for flexible design expression
19
19
  */
20
- variant?: 'primary' | 'secondary' | 'tertiary' | 'ghost' | 'neutral' | 'success' | 'info' | 'warning' | 'danger';
20
+ variant?: 'primary' | 'secondary' | 'tertiary' | 'ghost';
21
21
  /**
22
22
  * Label text to display above the chip group
23
23
  */
@@ -56,24 +56,4 @@ export interface ChipMultipleInputOptionProps extends Omit<InputHTMLAttributes<H
56
56
  * The value for this chip option
57
57
  */
58
58
  value: string;
59
- /**
60
- * Custom check icon or element. If not provided, no check is rendered unless defaultCheck is true
61
- */
62
- check?: React.ReactNode;
63
- /**
64
- * Show the default check icon if true (default: false). If both check and defaultCheck are provided, check takes precedence
65
- */
66
- defaultCheck?: boolean;
67
- /**
68
- * Disabled state for this option
69
- */
70
- disabled?: boolean;
71
- /**
72
- * Optional id for the input
73
- */
74
- id?: string;
75
- /**
76
- * Additional className for styling
77
- */
78
- className?: string;
79
59
  }
@@ -1,5 +1,4 @@
1
- import { default as React } from 'react';
2
1
  import { ChipSingleInputProps } from './types';
3
- export declare const ChipSingleInput: React.ForwardRefExoticComponent<ChipSingleInputProps & React.RefAttributes<HTMLDivElement>> & {
4
- Option: React.ForwardRefExoticComponent<import('./types').ChipSingleInputOptionProps & React.RefAttributes<HTMLInputElement>>;
2
+ export declare const ChipSingleInput: import('react').ForwardRefExoticComponent<ChipSingleInputProps & import('react').RefAttributes<HTMLDivElement>> & {
3
+ Option: import('react').ForwardRefExoticComponent<import('./types').ChipSingleInputOptionProps & import('react').RefAttributes<HTMLInputElement>>;
5
4
  };
@@ -17,7 +17,7 @@ export interface ChipSingleInputProps extends Omit<InputHTMLAttributes<HTMLInput
17
17
  * Semantic variants: success, info, warning, danger
18
18
  * Each variant supports outline form for flexible design expression
19
19
  */
20
- variant?: 'primary' | 'secondary' | 'tertiary' | 'ghost' | 'neutral' | 'success' | 'info' | 'warning' | 'danger';
20
+ variant?: 'primary' | 'secondary' | 'tertiary' | 'ghost';
21
21
  /**
22
22
  * Label text to display above the chip group
23
23
  */
@@ -56,12 +56,4 @@ export interface ChipSingleInputOptionProps extends Omit<InputHTMLAttributes<HTM
56
56
  * The value for this chip option
57
57
  */
58
58
  value: string;
59
- /**
60
- * Custom check icon or element. If not provided, no check is rendered unless defaultCheck is true
61
- */
62
- check?: React.ReactNode;
63
- /**
64
- * Show the default check icon if true (default: false). If both check and defaultCheck are provided, check takes precedence
65
- */
66
- defaultCheck?: boolean;
67
59
  }
@@ -1,4 +1,4 @@
1
- import { PageHeaderTopProps, PageHeaderBreadcrumbsProps, PageHeaderContentProps, PageHeaderBadgesProps, PageHeaderActionsProps, PageHeaderBottomProps } from './types';
1
+ import { PageHeaderTopProps, PageHeaderBreadcrumbsProps, PageHeaderContentProps, PageHeaderBadgesProps, PageHeaderActionsProps, PageHeaderBottomProps, PageHeaderMobileActionsProps } from './types';
2
2
  /**
3
3
  * PageHeaderTop - main header area containing breadcrumbs, content, and actions
4
4
  */
@@ -29,6 +29,7 @@ export declare const PageHeaderBadges: import('react').ForwardRefExoticComponent
29
29
  * PageHeaderActions - actions section for buttons and button groups
30
30
  */
31
31
  export declare const PageHeaderActions: import('react').ForwardRefExoticComponent<PageHeaderActionsProps & import('react').RefAttributes<HTMLDivElement>>;
32
+ export declare const PageHeaderMobileActions: import('react').ForwardRefExoticComponent<PageHeaderMobileActionsProps & import('react').RefAttributes<HTMLDivElement>>;
32
33
  /**
33
34
  * PageHeaderBottom - bottom section for tabs and filters
34
35
  */
@@ -31,6 +31,10 @@ interface PageHeaderRootProps extends Omit<PageHeaderProps, 'title'> {
31
31
  * Simplified API: Action buttons/button groups
32
32
  */
33
33
  actions?: ReactNode;
34
+ /**
35
+ * Simplified API: Mobile action buttons/button groups
36
+ */
37
+ mobileActions?: ReactNode;
34
38
  /**
35
39
  * Simplified API: Bottom content (tabs, filters)
36
40
  */
@@ -44,6 +44,12 @@ export interface PageHeaderBadgesProps extends HTMLAttributes<HTMLDivElement> {
44
44
  export interface PageHeaderActionsProps extends HTMLAttributes<HTMLDivElement> {
45
45
  children: ReactNode;
46
46
  }
47
+ /**
48
+ * Props for PageHeaderMobileActions - mobile actions section
49
+ */
50
+ export interface PageHeaderMobileActionsProps extends HTMLAttributes<HTMLDivElement> {
51
+ children: ReactNode;
52
+ }
47
53
  /**
48
54
  * Props for PageHeaderBottom - bottom section (tabs, filters, etc.)
49
55
  */
@@ -1,2 +1,2 @@
1
1
  export { Menu } from './menu';
2
- export type * from './types';
2
+ export type { MenuProps, MenuSize } from './types';
@@ -1,3 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
  import { MenuProps } from './types';
3
- export declare const Menu: React.FC<MenuProps>;
3
+ export declare const Menu: React.FC<MenuProps> & {
4
+ Content: React.ForwardRefExoticComponent<import('./types').MenuContentProps & React.RefAttributes<HTMLUListElement>>;
5
+ Item: React.ForwardRefExoticComponent<import('./types').MenuItemProps & React.RefAttributes<HTMLLIElement>>;
6
+ };
@@ -1,4 +1,4 @@
1
- import { ButtonHTMLAttributes, HTMLAttributes, ReactNode } from 'react';
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
2
  export type MenuSize = 'sm' | 'md';
3
3
  /**
4
4
  * Props for Menu
@@ -25,7 +25,9 @@ export interface MenuContentProps extends HTMLAttributes<HTMLUListElement> {
25
25
  /**
26
26
  * Props for MenuItem
27
27
  */
28
- export interface MenuItemProps extends ButtonHTMLAttributes<HTMLButtonElement> {
28
+ export interface MenuItemProps extends HTMLAttributes<HTMLLIElement> {
29
29
  /** Item content */
30
30
  children: ReactNode;
31
+ /** Whether the item is disabled */
32
+ disabled?: boolean;
31
33
  }
@@ -1,2 +1 @@
1
1
  export declare function useMenuOutsideClick(isOpen: boolean, contentRef: React.RefObject<HTMLDivElement | null>, triggerRef: React.RefObject<HTMLButtonElement | null>, onOutsideClick: () => void): void;
2
- export declare function useMenuFocusFirstItem(isOpen: boolean, contentRef: React.RefObject<HTMLDivElement | null>): void;
@@ -0,0 +1,4 @@
1
+ import { ButtonMenuProps } from './types';
2
+ export declare const ButtonMenu: import('react').ForwardRefExoticComponent<ButtonMenuProps & import('react').RefAttributes<HTMLButtonElement>> & {
3
+ Item: import('react').ForwardRefExoticComponent<import('../../overlays/menu/types').MenuItemProps & import('react').RefAttributes<HTMLLIElement>>;
4
+ };
@@ -0,0 +1,2 @@
1
+ export { ButtonMenu } from './button-menu';
2
+ export type { ButtonMenuProps } from './types';
@@ -0,0 +1,13 @@
1
+ import { ReactNode } from 'react';
2
+ import { IconProps } from '../icon';
3
+ import { ButtonIconProps } from '../button-icon';
4
+ export interface ButtonMenuProps extends Omit<ButtonIconProps, 'content'>, Pick<IconProps, 'as'> {
5
+ /**
6
+ * Callback function triggered when the menu open state changes.
7
+ */
8
+ onOpenChange?: (isOpen: boolean) => void;
9
+ /**
10
+ * The content to be displayed inside the menu.
11
+ */
12
+ content: ReactNode;
13
+ }
@@ -0,0 +1,3 @@
1
+ import { CardListItemProps, CardListProps } from './types';
2
+ export declare const CardList: import('react').ForwardRefExoticComponent<CardListProps & import('react').RefAttributes<HTMLUListElement>>;
3
+ export declare const CardListItem: import('react').ForwardRefExoticComponent<CardListItemProps & import('react').RefAttributes<HTMLLIElement>>;
@@ -1,24 +1,5 @@
1
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>>;
2
+ export declare const Card: import('react').ForwardRefExoticComponent<CardProps & import('react').RefAttributes<HTMLButtonElement>> & {
3
+ List: import('react').ForwardRefExoticComponent<import('./types').CardListProps & import('react').RefAttributes<HTMLUListElement>>;
4
+ ListItem: import('react').ForwardRefExoticComponent<import('./types').CardListItemProps & import('react').RefAttributes<HTMLLIElement>>;
5
+ };
@@ -1,10 +1,10 @@
1
- import { HTMLAttributes, ReactNode } from 'react';
1
+ import { ButtonHTMLAttributes, ReactNode } from 'react';
2
2
  import { VariantProps } from 'class-variance-authority';
3
3
  import { cardVariants } from './helpers';
4
4
  /**
5
5
  * Props for the Card component
6
6
  */
7
- export interface CardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title' | 'children'>, VariantProps<typeof cardVariants> {
7
+ export interface CardProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'title' | 'children'>, VariantProps<typeof cardVariants> {
8
8
  /**
9
9
  * Size variant affecting padding
10
10
  * @default 'md'
@@ -36,4 +36,15 @@ export interface CardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'
36
36
  * Usually used for amounts, status, or additional info
37
37
  */
38
38
  supplementaryInfo?: ReactNode;
39
+ /**
40
+ * Whether the card is bordered
41
+ * @default false
42
+ */
43
+ bordered?: boolean;
39
44
  }
45
+ export type CardListProps = {
46
+ children: ReactNode;
47
+ };
48
+ export type CardListItemProps = {
49
+ children: ReactNode;
50
+ };
@@ -9,7 +9,6 @@ export * from './button';
9
9
  export * from './button-float';
10
10
  export * from './button-icon';
11
11
  export * from './calculator';
12
- export * from './calendar';
13
12
  export * from './card';
14
13
  export * from './filter-chip';
15
14
  export * from './icon';
@@ -18,5 +17,4 @@ export * from './snackbar';
18
17
  export * from './table';
19
18
  export * from './text';
20
19
  export * from './tile';
21
- export * from './description-list';
22
20
  export * from './image';
@@ -55,10 +55,9 @@ const symbolToSubpath = {
55
55
  "Button": "primitive",
56
56
  "ButtonFloat": "primitive",
57
57
  "ButtonIcon": "primitive",
58
+ "ButtonMenu": "primitive",
58
59
  "Calculator": "primitive",
59
- "Calendar": "primitive",
60
60
  "Card": "primitive",
61
- "DescriptionList": "primitive",
62
61
  "FilterChip": "primitive",
63
62
  "Icon": "primitive",
64
63
  "ImageCircle": "primitive",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dimasbaguspm/versaur",
3
- "version": "0.0.29",
3
+ "version": "0.0.31",
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",
@@ -1,13 +0,0 @@
1
- import { FC } from 'react';
2
- /**
3
- * CalendarHeader atom for Calendar component
4
- */
5
- export declare const CalendarHeader: FC;
6
- /**
7
- * CalendarWeekdays atom for Calendar component
8
- */
9
- export declare const CalendarWeekdays: React.FC;
10
- /**
11
- * CalendarDays atom: delegates to single or range atom based on context
12
- */
13
- export declare const CalendarDays: FC;
@@ -1,8 +0,0 @@
1
- import { default as React } from 'react';
2
- import { CalendarProps } from './types';
3
- /**
4
- * Calendar component (Compound Pattern)
5
- * Implements a month view date picker following Material 3 specs and Versaur standards
6
- */
7
- export declare const CalendarRoot: React.FC<CalendarProps>;
8
- export declare const Calendar: React.FC<CalendarProps>;
@@ -1,2 +0,0 @@
1
- export { Calendar } from './calendar';
2
- export type * from './types';
@@ -1,54 +0,0 @@
1
- /**
2
- * CalendarProps defines the props for the Calendar component
3
- * @property value - The selected date
4
- * @property onChange - Callback when a date is selected
5
- * @property className - Custom class for the calendar container
6
- */
7
- /**
8
- * Calendar selection type
9
- * - 'single': single date selection
10
- * - 'range': date range selection (start and end)
11
- */
12
- export type CalendarType = 'single' | 'range';
13
- /**
14
- * Calendar value type
15
- * - Date for single
16
- * - [Date | null, Date | null] for range
17
- */
18
- export type CalendarValue = Date | [Date | null, Date | null];
19
- /**
20
- * CalendarProps defines the props for the Calendar component
21
- * @property value - The selected date or range
22
- * @property onChange - Callback when a date or range is selected
23
- * @property className - Custom class for the calendar container
24
- * @property type - Selection type: 'single' or 'range'
25
- */
26
- export interface CalendarProps {
27
- /**
28
- * The selected date or range
29
- */
30
- value?: CalendarValue;
31
- /**
32
- * Callback when a date or range is selected
33
- */
34
- onChange?: (value: CalendarValue) => void;
35
- /**
36
- * Custom class for the calendar container
37
- */
38
- className?: string;
39
- /**
40
- * Selection type: 'single' or 'range'
41
- */
42
- type?: CalendarType;
43
- }
44
- /**
45
- * Props for CalendarHeader atom
46
- */
47
- export interface CalendarHeaderProps {
48
- value?: CalendarValue;
49
- year: number;
50
- month: number;
51
- onPrevMonth: () => void;
52
- onNextMonth: () => void;
53
- className?: string;
54
- }
@@ -1,18 +0,0 @@
1
- import { CalendarType, CalendarValue } from './types';
2
- export interface UseCalendarProps {
3
- value?: CalendarValue;
4
- type: CalendarType;
5
- onChange?: (value: CalendarValue) => void;
6
- initialYear: number;
7
- initialMonth: number;
8
- }
9
- export declare function useCalendar({ value: controlledValue, type, onChange, initialYear, initialMonth, }: UseCalendarProps): {
10
- year: number;
11
- month: number;
12
- value: CalendarValue | undefined;
13
- setMonth: import('react').Dispatch<import('react').SetStateAction<number>>;
14
- setYear: import('react').Dispatch<import('react').SetStateAction<number>>;
15
- onChange: (val: CalendarValue) => void;
16
- handlePrevMonth: () => void;
17
- handleNextMonth: () => void;
18
- };
@@ -1,13 +0,0 @@
1
- import { DescriptionListItemProps, DescriptionListTermProps, DescriptionListDetailsProps } from './types';
2
- /**
3
- * DescriptionList.Item atom
4
- */
5
- export declare const DescriptionListItem: import('react').ForwardRefExoticComponent<DescriptionListItemProps & import('react').RefAttributes<HTMLDivElement>>;
6
- /**
7
- * DescriptionList.Term atom
8
- */
9
- export declare const DescriptionListTerm: import('react').ForwardRefExoticComponent<DescriptionListTermProps & import('react').RefAttributes<HTMLElement>>;
10
- /**
11
- * DescriptionList.Details atom
12
- */
13
- export declare const DescriptionListDetails: import('react').ForwardRefExoticComponent<DescriptionListDetailsProps & import('react').RefAttributes<HTMLElement>>;
@@ -1,6 +0,0 @@
1
- import { DescriptionListProps } from './types';
2
- export declare const DescriptionList: import('react').ForwardRefExoticComponent<DescriptionListProps & import('react').RefAttributes<HTMLDListElement>> & {
3
- Item: import('react').ForwardRefExoticComponent<import('./types').DescriptionListItemProps & import('react').RefAttributes<HTMLDivElement>>;
4
- Term: import('react').ForwardRefExoticComponent<import('./types').DescriptionListTermProps & import('react').RefAttributes<HTMLElement>>;
5
- Details: import('react').ForwardRefExoticComponent<import('./types').DescriptionListDetailsProps & import('react').RefAttributes<HTMLElement>>;
6
- };
@@ -1,2 +0,0 @@
1
- export { DescriptionList } from './description-list';
2
- export * from './types';
@@ -1,46 +0,0 @@
1
- import { ReactNode, HTMLAttributes } from 'react';
2
- import { TextProps } from '../text';
3
- /**
4
- * Props for the DescriptionList root component
5
- */
6
- export interface DescriptionListProps extends HTMLAttributes<HTMLDListElement> {
7
- /**
8
- * Children should be DescriptionList.Item elements
9
- */
10
- children: ReactNode;
11
- }
12
- /**
13
- * Props for DescriptionList.Item
14
- */
15
- export interface DescriptionListItemProps extends HTMLAttributes<HTMLDivElement> {
16
- /**
17
- * Children should be DescriptionList.Term and DescriptionList.Details
18
- */
19
- children: ReactNode;
20
- /**
21
- * Number of grid columns to span (default: 4)
22
- */
23
- span?: number;
24
- }
25
- /**
26
- * Props for DescriptionList.Term
27
- */
28
- export interface DescriptionListTermProps extends Omit<HTMLAttributes<HTMLElement>, 'children'> {
29
- /**
30
- * Term label (required, string only)
31
- */
32
- children: string;
33
- }
34
- /**
35
- * Props for DescriptionList.Details
36
- */
37
- export interface DescriptionListDetailsProps extends Omit<HTMLAttributes<HTMLElement>, 'children'> {
38
- /**
39
- * Details value (required, string only)
40
- */
41
- children: string;
42
- /**
43
- * Text Color (default: 'black')
44
- */
45
- color?: TextProps['color'];
46
- }