@dimasbaguspm/versaur 0.0.26 → 0.0.28

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 (33) hide show
  1. package/dist/js/{bottom-sheet-input-1C3Up2xF.js → bottom-sheet-input-BIbHW5ME.js} +255 -244
  2. package/dist/js/{bottom-sheet-CQw_O-4W.js → bottom-sheet-tOKkkgJA.js} +169 -153
  3. package/dist/js/forms/index.js +1 -1
  4. package/dist/js/{image-rectangle--Sy82Ff9.js → image-rectangle-C1zMt0DR.js} +319 -199
  5. package/dist/js/index.js +68 -64
  6. package/dist/js/layouts/index.js +8 -6
  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 +17 -15
  10. package/dist/js/{tabs-CoNG51E1.js → tabs-CtPlBMP4.js} +1 -1
  11. package/dist/js/{tooltip-BbTHXz6h.js → tooltip-C_riAXZP.js} +16 -16
  12. package/dist/js/top-bar-BqLv8_hy.js +731 -0
  13. package/dist/types/forms/drawer-input/types.d.ts +1 -1
  14. package/dist/types/layouts/badge-group/badge-group.d.ts +27 -0
  15. package/dist/types/layouts/badge-group/index.d.ts +2 -0
  16. package/dist/types/layouts/badge-group/types.d.ts +32 -0
  17. package/dist/types/layouts/filter-chip-group/filter-chip-group.d.ts +27 -0
  18. package/dist/types/layouts/filter-chip-group/index.d.ts +2 -0
  19. package/dist/types/layouts/filter-chip-group/types.d.ts +32 -0
  20. package/dist/types/layouts/index.d.ts +2 -0
  21. package/dist/types/overlays/bottom-sheet/types.d.ts +4 -0
  22. package/dist/types/overlays/drawer/types.d.ts +5 -13
  23. package/dist/types/overlays/modal/types.d.ts +14 -4
  24. package/dist/types/primitive/card/card.d.ts +24 -0
  25. package/dist/types/primitive/card/index.d.ts +2 -0
  26. package/dist/types/primitive/card/types.d.ts +39 -0
  27. package/dist/types/primitive/filter-chip/filter-chip.d.ts +3 -0
  28. package/dist/types/primitive/filter-chip/index.d.ts +2 -0
  29. package/dist/types/primitive/filter-chip/types.d.ts +35 -0
  30. package/dist/types/primitive/index.d.ts +2 -0
  31. package/dist/utils/enforce-subpath-import.js +4 -0
  32. package/package.json +1 -1
  33. package/dist/js/top-bar-BjE0FiE8.js +0 -607
@@ -13,6 +13,6 @@ export interface DrawerInputContextValue {
13
13
  * @property {(open: boolean) => void} onOpenChange - Callback for drawer open state change
14
14
  * @property {React.ReactNode} children - Drawer content
15
15
  */
16
- export interface DrawerInputProps extends Omit<TextInputProps, 'readOnly' | 'children'>, Pick<DrawerProps, 'size' | 'position'> {
16
+ export interface DrawerInputProps extends Omit<TextInputProps, 'readOnly' | 'children'>, Pick<DrawerProps, 'size' | 'position' | 'disableEscapeKeyDown' | 'disableOverlayClickToClose'> {
17
17
  children: (ctx: DrawerInputContextValue) => ReactNode;
18
18
  }
@@ -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,2 @@
1
+ export { BadgeGroup } from './badge-group';
2
+ export type { BadgeGroupProps } from './types';
@@ -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
+ }
@@ -0,0 +1,27 @@
1
+ import { FilterChipGroupProps } from './types';
2
+ /**
3
+ * FilterChipGroup provides layout management for filter chips with control over
4
+ * positioning, alignment, and fluid behavior
5
+ *
6
+ * @example
7
+ * <FilterChipGroup alignment="center" gap="sm">
8
+ * <FilterChip active>Category 1</FilterChip>
9
+ * <FilterChip>Category 2</FilterChip>
10
+ * </FilterChipGroup>
11
+ *
12
+ * @example
13
+ * // Vertical filter chip group
14
+ * <FilterChipGroup orientation="vertical" fluid>
15
+ * <FilterChip active>Category 1</FilterChip>
16
+ * <FilterChip>Category 2</FilterChip>
17
+ * <FilterChip>Category 3</FilterChip>
18
+ * </FilterChipGroup>
19
+ *
20
+ * @example
21
+ * // Fluid filter chips with space between
22
+ * <FilterChipGroup alignment="between" fluid>
23
+ * <FilterChip>Clear All</FilterChip>
24
+ * <FilterChip active>Apply</FilterChip>
25
+ * </FilterChipGroup>
26
+ */
27
+ export declare const FilterChipGroup: import('react').ForwardRefExoticComponent<FilterChipGroupProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,2 @@
1
+ export { FilterChipGroup } from './filter-chip-group';
2
+ export type { FilterChipGroupProps } from './types';
@@ -0,0 +1,32 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ import { VariantProps } from '../../utils/variants';
3
+ import { filterChipGroupVariants } from './helpers';
4
+ /**
5
+ * Props for the FilterChipGroup component
6
+ */
7
+ export interface FilterChipGroupProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof filterChipGroupVariants> {
8
+ /**
9
+ * Children (should be FilterChip components)
10
+ */
11
+ children: ReactNode;
12
+ /**
13
+ * Alignment of filter chips within the group
14
+ * @default 'start'
15
+ */
16
+ alignment?: 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly';
17
+ /**
18
+ * Whether filter chips should be fluid (full width)
19
+ * @default false
20
+ */
21
+ fluid?: boolean;
22
+ /**
23
+ * Orientation of the filter chip group
24
+ * @default 'horizontal'
25
+ */
26
+ orientation?: 'horizontal' | 'vertical';
27
+ /**
28
+ * Size of the gap between filter chips
29
+ * @default 'md'
30
+ */
31
+ gap?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
32
+ }
@@ -1,6 +1,8 @@
1
1
  export * from './app-bar';
2
2
  export * from './bottom-bar';
3
+ export * from './badge-group';
3
4
  export * from './button-group';
5
+ export * from './filter-chip-group';
4
6
  export * from './page-content';
5
7
  export * from './page-header';
6
8
  export * from './page-layout';
@@ -12,6 +12,10 @@ export interface BottomSheetProps extends HTMLAttributes<HTMLDivElement>, Overla
12
12
  * Called when the backdrop is clicked (should close the sheet)
13
13
  */
14
14
  onClose: () => void;
15
+ /**
16
+ * Whether to disable overlay click to close
17
+ */
18
+ disableOverlayClickToClose?: boolean;
15
19
  /**
16
20
  * Content of the bottom sheet
17
21
  */
@@ -38,23 +38,15 @@ export interface DrawerContextValue {
38
38
  variant: DrawerVariant;
39
39
  /** Drawer transition type */
40
40
  transitionType: DrawerTransitionType;
41
+ /** Whether to disable overlay click to close */
42
+ disableOverlayClickToClose: boolean;
43
+ /** Whether to disable escape key down */
44
+ disableEscapeKeyDown: boolean;
41
45
  }
42
46
  /**
43
47
  * Props for the Drawer component (controlled component)
44
48
  */
45
- export interface DrawerProps extends ComponentPropsWithoutRef<'div'>, OverlayPortalProps {
46
- /** Whether the drawer is open (required - controlled component) */
47
- isOpen: boolean;
48
- /** Callback when the drawer should close */
49
- onClose: (open: boolean) => void;
50
- /** Drawer position */
51
- position?: DrawerPosition;
52
- /** Drawer size */
53
- size?: DrawerSize;
54
- /** Drawer variant */
55
- variant?: DrawerVariant;
56
- /** Drawer transition type */
57
- transitionType?: DrawerTransitionType;
49
+ export interface DrawerProps extends ComponentPropsWithoutRef<'div'>, OverlayPortalProps, Partial<Omit<DrawerContextValue, 'isOpen' | 'onClose'>>, Pick<DrawerContextValue, 'isOpen' | 'onClose'> {
58
50
  /** Children components */
59
51
  children: ReactNode;
60
52
  }
@@ -6,17 +6,27 @@ import { HTMLAttributes, ReactNode } from 'react';
6
6
  export type ModalSize = 'sm' | 'md' | 'lg' | 'fit-content';
7
7
  export type ModalPlacement = 'top' | 'center';
8
8
  /**
9
- * Modal compound root
9
+ * Context for the Modal compound component
10
+ * Provides shared state and functions across all modal sub-components
10
11
  */
11
- export interface ModalRootProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'>, OverlayPortalProps {
12
+ export interface ModalContextValue {
12
13
  /** Controls whether the modal is open */
13
14
  isOpen: boolean;
14
15
  /** Function to close the modal */
15
16
  onClose: () => void;
16
17
  /** Modal size variant */
17
- size?: ModalSize;
18
+ size: ModalSize;
18
19
  /** Modal placement variant */
19
- placement?: ModalPlacement;
20
+ placement: ModalPlacement;
21
+ /** Whether to disable overlay click to close */
22
+ disableOverlayClickToClose: boolean;
23
+ /** Whether to disable escape key down */
24
+ disableEscapeKeyDown: boolean;
25
+ }
26
+ /**
27
+ * Modal compound root
28
+ */
29
+ export interface ModalRootProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'>, OverlayPortalProps, Partial<Omit<ModalContextValue, 'isOpen' | 'onClose'>>, Pick<ModalContextValue, 'isOpen' | 'onClose'> {
20
30
  /** Children (Modal compound parts) */
21
31
  children: ReactNode;
22
32
  }
@@ -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,2 @@
1
+ export { Card } from './card';
2
+ export type { CardProps } from './types';
@@ -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
+ }
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { FilterChipProps } from './types';
3
+ export declare const FilterChip: React.ForwardRefExoticComponent<FilterChipProps & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,2 @@
1
+ export { FilterChip } from './filter-chip';
2
+ export type { FilterChipProps } from './types';
@@ -0,0 +1,35 @@
1
+ import { ButtonHTMLAttributes } from 'react';
2
+ /**
3
+ * FilterChipProps defines the props for the FilterChip component
4
+ * @property variant - Visual style variant based on Versaur color system
5
+ * @property size - Size of the chip (sm, md, lg)
6
+ * @property disabled - Whether the chip is disabled
7
+ * @property onRemove - Callback when the remove icon is clicked
8
+ * @property label - The text content of the chip
9
+ */
10
+ export interface FilterChipProps extends ButtonHTMLAttributes<HTMLButtonElement> {
11
+ /**
12
+ * Visual style variant supporting Versaur color system
13
+ * Core variants: primary (coral), secondary (sage), tertiary (mist), ghost (slate), neutral (light gray)
14
+ * Semantic variants: success, info, warning, danger
15
+ * Each variant supports outline forms for flexible design expression
16
+ */
17
+ variant?: 'primary' | 'primary-outline' | 'secondary' | 'secondary-outline' | 'tertiary' | 'tertiary-outline' | 'ghost' | 'ghost-outline' | 'neutral' | 'neutral-outline' | 'success' | 'success-outline' | 'info' | 'info-outline' | 'warning' | 'warning-outline' | 'danger' | 'danger-outline';
18
+ /**
19
+ * Size of the chip
20
+ * sm: 28px height, compact for dense layouts
21
+ * md: 32px height, standard for most use cases
22
+ * lg: 36px height, prominent for important filters
23
+ */
24
+ size?: 'sm' | 'md' | 'lg';
25
+ /**
26
+ * Whether the chip is disabled
27
+ * When true, the chip becomes non-interactive and visually dimmed
28
+ */
29
+ disabled?: boolean;
30
+ /**
31
+ * The text content of the chip
32
+ * This will be displayed as the main content
33
+ */
34
+ children: string;
35
+ }
@@ -8,6 +8,8 @@ export * from './button-float';
8
8
  export * from './button-icon';
9
9
  export * from './calculator';
10
10
  export * from './calendar';
11
+ export * from './card';
12
+ export * from './filter-chip';
11
13
  export * from './icon';
12
14
  export * from './no-results';
13
15
  export * from './snackbar';
@@ -28,8 +28,10 @@ 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",
34
+ "FilterChipGroup": "layouts",
33
35
  "FormLayout": "layouts",
34
36
  "PageContent": "layouts",
35
37
  "PageHeader": "layouts",
@@ -53,7 +55,9 @@ const symbolToSubpath = {
53
55
  "ButtonIcon": "primitive",
54
56
  "Calculator": "primitive",
55
57
  "Calendar": "primitive",
58
+ "Card": "primitive",
56
59
  "DescriptionList": "primitive",
60
+ "FilterChip": "primitive",
57
61
  "Icon": "primitive",
58
62
  "ImageCircle": "primitive",
59
63
  "ImageSquare": "primitive",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dimasbaguspm/versaur",
3
- "version": "0.0.26",
3
+ "version": "0.0.28",
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",