@dimasbaguspm/versaur 0.0.27 → 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.
@@ -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,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
+ }
@@ -9,6 +9,7 @@ export * from './button-icon';
9
9
  export * from './calculator';
10
10
  export * from './calendar';
11
11
  export * from './card';
12
+ export * from './filter-chip';
12
13
  export * from './icon';
13
14
  export * from './no-results';
14
15
  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",
@@ -56,6 +57,7 @@ const symbolToSubpath = {
56
57
  "Calendar": "primitive",
57
58
  "Card": "primitive",
58
59
  "DescriptionList": "primitive",
60
+ "FilterChip": "primitive",
59
61
  "Icon": "primitive",
60
62
  "ImageCircle": "primitive",
61
63
  "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.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",