@dimasbaguspm/versaur 0.0.27 → 0.0.29

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-DCwLmjiX.js → bottom-sheet-BKd7WCCS.js} +168 -152
  2. package/dist/js/{bottom-sheet-input-D14wjCoC.js → bottom-sheet-input-DrbGhcXv.js} +255 -244
  3. package/dist/js/forms/index.js +1 -1
  4. package/dist/js/{image-rectangle-BGLYH2Gl.js → image-rectangle-CF656HIm.js} +432 -274
  5. package/dist/js/index.js +63 -59
  6. package/dist/js/layouts/index.js +9 -8
  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 +22 -19
  10. package/dist/js/{tabs-C0hcpxNk.js → tabs-DoiqKzR9.js} +1 -1
  11. package/dist/js/{tooltip-DlbAOUeP.js → tooltip-D1-q8Ars.js} +16 -16
  12. package/dist/js/{top-bar-BA88ij4M.js → top-bar-B4SZ2YZC.js} +166 -104
  13. package/dist/types/forms/drawer-input/types.d.ts +1 -1
  14. package/dist/types/layouts/filter-chip-group/filter-chip-group.d.ts +27 -0
  15. package/dist/types/layouts/filter-chip-group/index.d.ts +2 -0
  16. package/dist/types/layouts/filter-chip-group/types.d.ts +32 -0
  17. package/dist/types/layouts/index.d.ts +1 -0
  18. package/dist/types/overlays/bottom-sheet/types.d.ts +4 -0
  19. package/dist/types/overlays/drawer/types.d.ts +5 -13
  20. package/dist/types/overlays/modal/types.d.ts +14 -4
  21. package/dist/types/primitive/attribute/attribute.d.ts +10 -0
  22. package/dist/types/primitive/attribute/index.d.ts +2 -0
  23. package/dist/types/primitive/attribute/types.d.ts +14 -0
  24. package/dist/types/primitive/attribute-list/attribute.atoms.d.ts +5 -0
  25. package/dist/types/primitive/attribute-list/attribute.d.ts +4 -0
  26. package/dist/types/primitive/attribute-list/index.d.ts +2 -0
  27. package/dist/types/primitive/attribute-list/types.d.ts +24 -0
  28. package/dist/types/primitive/filter-chip/filter-chip.d.ts +3 -0
  29. package/dist/types/primitive/filter-chip/index.d.ts +2 -0
  30. package/dist/types/primitive/filter-chip/types.d.ts +35 -0
  31. package/dist/types/primitive/index.d.ts +3 -0
  32. package/dist/utils/enforce-subpath-import.js +4 -0
  33. package/package.json +1 -1
@@ -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,10 @@
1
+ import { AttributeProps } from './types';
2
+ /**
3
+ * Attribute component for Versaur UI
4
+ *
5
+ * A simple component that displays a title and content in a structured format.
6
+ *
7
+ * Usage:
8
+ * <Attribute title="Name">John Doe</Attribute>
9
+ */
10
+ export declare const Attribute: import('react').ForwardRefExoticComponent<AttributeProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,2 @@
1
+ export { Attribute } from './attribute';
2
+ export type { AttributeProps } from './types';
@@ -0,0 +1,14 @@
1
+ import { ReactNode, HTMLAttributes } from 'react';
2
+ /**
3
+ * Props for the Attribute component
4
+ */
5
+ export interface AttributeProps extends HTMLAttributes<HTMLDivElement> {
6
+ /**
7
+ * The attribute title (displayed as h4)
8
+ */
9
+ title: string;
10
+ /**
11
+ * The attribute content (displayed as p)
12
+ */
13
+ children: ReactNode;
14
+ }
@@ -0,0 +1,5 @@
1
+ import { AttributeListItemProps } from './types';
2
+ /**
3
+ * AttributeList.Item atom
4
+ */
5
+ export declare const AttributeListItem: import('react').ForwardRefExoticComponent<AttributeListItemProps & import('react').RefAttributes<HTMLLIElement>>;
@@ -0,0 +1,4 @@
1
+ import { AttributeListProps } from './types';
2
+ export declare const AttributeList: import('react').ForwardRefExoticComponent<AttributeListProps & import('react').RefAttributes<HTMLUListElement>> & {
3
+ Item: import('react').ForwardRefExoticComponent<import('./types').AttributeListItemProps & import('react').RefAttributes<HTMLLIElement>>;
4
+ };
@@ -0,0 +1,2 @@
1
+ export { AttributeList } from './attribute';
2
+ export type { AttributeListProps, AttributeListItemProps } from './types';
@@ -0,0 +1,24 @@
1
+ import { ReactNode, HTMLAttributes } from 'react';
2
+ import { AttributeProps } from '../attribute/types';
3
+ /**
4
+ * Props for the AttributeList root component
5
+ */
6
+ export interface AttributeListProps extends HTMLAttributes<HTMLUListElement> {
7
+ /**
8
+ * Number of grid columns (default: 4)
9
+ */
10
+ columns?: number;
11
+ /**
12
+ * Children should be AttributeList.Item elements
13
+ */
14
+ children: ReactNode;
15
+ }
16
+ /**
17
+ * Props for AttributeList.Item
18
+ */
19
+ export interface AttributeListItemProps extends Omit<HTMLAttributes<HTMLLIElement>, 'title' | 'children'>, Pick<AttributeProps, 'title' | 'children'> {
20
+ /**
21
+ * Number of grid columns to span (default: 1)
22
+ */
23
+ span?: number;
24
+ }
@@ -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
+ }
@@ -1,5 +1,7 @@
1
1
  export * from './alert';
2
2
  export * from './anchor';
3
+ export * from './attribute';
4
+ export * from './attribute-list';
3
5
  export * from './avatar';
4
6
  export * from './badge';
5
7
  export * from './brand';
@@ -9,6 +11,7 @@ export * from './button-icon';
9
11
  export * from './calculator';
10
12
  export * from './calendar';
11
13
  export * from './card';
14
+ export * from './filter-chip';
12
15
  export * from './icon';
13
16
  export * from './no-results';
14
17
  export * from './snackbar';
@@ -31,6 +31,7 @@ const symbolToSubpath = {
31
31
  "BadgeGroup": "layouts",
32
32
  "BottomBar": "layouts",
33
33
  "ButtonGroup": "layouts",
34
+ "FilterChipGroup": "layouts",
34
35
  "FormLayout": "layouts",
35
36
  "PageContent": "layouts",
36
37
  "PageHeader": "layouts",
@@ -46,6 +47,8 @@ const symbolToSubpath = {
46
47
  "Tooltip": "overlays",
47
48
  "Alert": "primitive",
48
49
  "Anchor": "primitive",
50
+ "Attribute": "primitive",
51
+ "AttributeList": "primitive",
49
52
  "Avatar": "primitive",
50
53
  "Badge": "primitive",
51
54
  "Brand": "primitive",
@@ -56,6 +59,7 @@ const symbolToSubpath = {
56
59
  "Calendar": "primitive",
57
60
  "Card": "primitive",
58
61
  "DescriptionList": "primitive",
62
+ "FilterChip": "primitive",
59
63
  "Icon": "primitive",
60
64
  "ImageCircle": "primitive",
61
65
  "ImageSquare": "primitive",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dimasbaguspm/versaur",
3
- "version": "0.0.27",
3
+ "version": "0.0.29",
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",