@dimasbaguspm/versaur 0.0.16 → 0.0.18

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 (78) hide show
  1. package/dist/{js → assets}/styles.css +37 -0
  2. package/dist/js/bottom-sheet-BRv-oJL-.js +646 -0
  3. package/dist/js/description-list-DZQF212Z.js +1786 -0
  4. package/dist/js/email-input-BIbrfs5q.js +1731 -0
  5. package/dist/js/forms/index.js +16 -16
  6. package/dist/js/index.js +44 -41
  7. package/dist/js/overlays/index.js +3 -4
  8. package/dist/js/primitive/index.js +12 -11
  9. package/dist/js/providers/index.js +5 -0
  10. package/dist/js/snackbar-DH8jCh2V.js +50 -0
  11. package/dist/js/use-snackbars-oPoF7J5t.js +94 -0
  12. package/dist/types/feedbacks/loading-indicator/index.d.ts +2 -1
  13. package/dist/types/forms/chip-multiple-input/chip-multiple-input.atoms.d.ts +10 -0
  14. package/dist/types/forms/chip-multiple-input/chip-multiple-input.d.ts +5 -0
  15. package/dist/types/forms/chip-multiple-input/index.d.ts +2 -0
  16. package/dist/types/forms/{chip-input → chip-multiple-input}/types.d.ts +16 -4
  17. package/dist/types/forms/chip-single-input/chip-single-input.atoms.d.ts +10 -0
  18. package/dist/types/forms/chip-single-input/chip-single-input.d.ts +5 -0
  19. package/dist/types/forms/chip-single-input/index.d.ts +2 -0
  20. package/dist/types/forms/chip-single-input/types.d.ts +67 -0
  21. package/dist/types/forms/date-single-picker-input/date-single-picker-input.d.ts +1 -8
  22. package/dist/types/forms/date-single-picker-input/index.d.ts +1 -1
  23. package/dist/types/forms/date-single-picker-input/types.d.ts +12 -66
  24. package/dist/types/forms/email-input/email-input.d.ts +8 -0
  25. package/dist/types/forms/email-input/index.d.ts +2 -0
  26. package/dist/types/forms/email-input/types.d.ts +6 -0
  27. package/dist/types/forms/index.d.ts +5 -2
  28. package/dist/types/forms/price-input/index.d.ts +2 -0
  29. package/dist/types/forms/price-input/price-input.d.ts +6 -0
  30. package/dist/types/forms/price-input/types.d.ts +15 -0
  31. package/dist/types/forms/price-input/use-price-input.d.ts +6 -0
  32. package/dist/types/forms/search-input/index.d.ts +2 -0
  33. package/dist/types/forms/search-input/search-input.d.ts +8 -0
  34. package/dist/types/forms/search-input/types.d.ts +35 -0
  35. package/dist/types/forms/segment-multiple-input/types.d.ts +1 -5
  36. package/dist/types/forms/segment-single-input/types.d.ts +1 -5
  37. package/dist/types/forms/switch-input/index.d.ts +2 -3
  38. package/dist/types/forms/time-picker-input/time-picker-input.d.ts +4 -4
  39. package/dist/types/forms/time-picker-input/types.d.ts +2 -38
  40. package/dist/types/index.d.ts +1 -0
  41. package/dist/types/layouts/page-layout/index.d.ts +2 -1
  42. package/dist/types/overlays/menu/index.d.ts +2 -2
  43. package/dist/types/overlays/modal/types.d.ts +1 -1
  44. package/dist/types/primitive/anchor/types.d.ts +8 -2
  45. package/dist/types/primitive/description-list/description-list.atoms.d.ts +13 -0
  46. package/dist/types/primitive/description-list/description-list.d.ts +6 -0
  47. package/dist/types/primitive/description-list/index.d.ts +2 -0
  48. package/dist/types/primitive/description-list/types.d.ts +46 -0
  49. package/dist/types/primitive/index.d.ts +1 -0
  50. package/dist/types/providers/index.d.ts +1 -0
  51. package/dist/types/providers/snackbars-provider/index.d.ts +3 -0
  52. package/dist/types/providers/snackbars-provider/provider.d.ts +7 -0
  53. package/dist/types/providers/snackbars-provider/types.d.ts +28 -0
  54. package/dist/types/providers/snackbars-provider/use-snackbars-queue.d.ts +9 -0
  55. package/dist/types/providers/snackbars-provider/use-snackbars.d.ts +4 -0
  56. package/dist/{js → utils}/enforce-subpath-import.js +61 -51
  57. package/package.json +8 -4
  58. package/dist/js/bottom-sheet-Difan0U1.js +0 -340
  59. package/dist/js/calendar-CUjVZ7Ap.js +0 -811
  60. package/dist/js/menu-Bm-yPIMN.js +0 -310
  61. package/dist/js/switch-input-Bx6_2zG9.js +0 -2035
  62. package/dist/js/tile-BjhJ5Mvl.js +0 -939
  63. package/dist/types/forms/calculator-input/calculator-input.atoms.d.ts +0 -11
  64. package/dist/types/forms/calculator-input/calculator-input.d.ts +0 -8
  65. package/dist/types/forms/calculator-input/index.d.ts +0 -1
  66. package/dist/types/forms/calculator-input/types.d.ts +0 -51
  67. package/dist/types/forms/chip-input/chip-input.atoms.d.ts +0 -10
  68. package/dist/types/forms/chip-input/chip-input.d.ts +0 -5
  69. package/dist/types/forms/chip-input/index.d.ts +0 -2
  70. package/dist/types/forms/date-range-picker-input/date-range-picker-input.d.ts +0 -10
  71. package/dist/types/forms/date-range-picker-input/index.d.ts +0 -2
  72. package/dist/types/forms/date-range-picker-input/types.d.ts +0 -64
  73. package/dist/types/forms/date-range-picker-input/use-date-range-picker.d.ts +0 -13
  74. package/dist/types/forms/date-single-picker-input/date-single-picker-input.atoms.d.ts +0 -13
  75. package/dist/types/forms/date-single-picker-input/date-single-picker-input.docked.d.ts +0 -14
  76. package/dist/types/forms/date-single-picker-input/date-single-picker-input.modal.d.ts +0 -15
  77. package/dist/types/forms/date-single-picker-input/use-date-single-picker.d.ts +0 -10
  78. package/dist/types/forms/time-picker-input/time-picker-input.atoms.d.ts +0 -15
@@ -0,0 +1,15 @@
1
+ import { InputHTMLAttributes } from 'react';
2
+ import { TextInputProps } from '../text-input/types';
3
+ /**
4
+ * Props for PriceInput component
5
+ * @property value - The price value as a string (raw, unformatted)
6
+ * @property onChange - Called when the value changes (returns raw string)
7
+ * @property allowNegative - Optional: allow negative values (default: false)
8
+ * @property inputProps - Optional: custom input attributes
9
+ */
10
+ export interface PriceInputProps extends Omit<TextInputProps, 'type' | 'value' | 'onChange'> {
11
+ value: string;
12
+ onChange: (value: string) => void;
13
+ allowNegative?: boolean;
14
+ inputProps?: InputHTMLAttributes<HTMLInputElement>;
15
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * usePriceInputSync synchronizes the local input value with the parent value
3
+ * @param value - The parent value (string or number)
4
+ * @param setRawValue - Setter for local raw value
5
+ */
6
+ export declare function usePriceInputSync(value: string | number, setRawValue: (val: string) => void): void;
@@ -0,0 +1,2 @@
1
+ export { SearchInput } from './search-input';
2
+ export type { SearchInputProps } from './types';
@@ -0,0 +1,8 @@
1
+ import { SearchInputProps } from './types';
2
+ /**
3
+ * SearchInput component for Versaur UI
4
+ *
5
+ * A styled input field for search, extending TextInput and enforcing HTML search input standards
6
+ * Follows browser standards and accessibility best practices
7
+ */
8
+ export declare const SearchInput: import('react').ForwardRefExoticComponent<SearchInputProps & import('react').RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,35 @@
1
+ import { TextInputProps } from '../text-input/types';
2
+ /**
3
+ * Props for the SearchInput component
4
+ * Extends TextInputProps and enforces type='search' with proper HTML search attributes
5
+ */
6
+ export interface SearchInputProps extends Omit<TextInputProps, 'type'> {
7
+ /**
8
+ * The value of the input
9
+ */
10
+ value?: string;
11
+ /**
12
+ * Callback when the value changes
13
+ */
14
+ onChange?: React.ChangeEventHandler<HTMLInputElement>;
15
+ /**
16
+ * Placeholder text for the search input
17
+ */
18
+ placeholder?: string;
19
+ /**
20
+ * Whether the input is disabled
21
+ */
22
+ disabled?: boolean;
23
+ /**
24
+ * Whether to show the clear button (native search input feature)
25
+ */
26
+ allowClear?: boolean;
27
+ /**
28
+ * Autocomplete behavior for the search input
29
+ */
30
+ autoComplete?: string;
31
+ /**
32
+ * Spellcheck for the search input
33
+ */
34
+ spellCheck?: boolean;
35
+ }
@@ -9,15 +9,11 @@ export interface SegmentMultipleInputProps extends Omit<InputHTMLAttributes<HTML
9
9
  * Semantic variants: success, info, warning, danger
10
10
  * Each variant supports outline form for flexible design expression
11
11
  */
12
- 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';
12
+ variant?: 'primary' | 'secondary' | 'tertiary' | 'ghost' | 'neutral' | 'success' | 'info' | 'warning' | 'danger';
13
13
  /**
14
14
  * Size variant for the segment inputs
15
15
  */
16
16
  size?: 'sm' | 'md' | 'lg';
17
- /**
18
- * If true, options will fill the parent width equally
19
- */
20
- fullWidth?: boolean;
21
17
  /**
22
18
  * Label text to display above the segment group
23
19
  */
@@ -9,15 +9,11 @@ export interface SegmentSingleInputProps extends Omit<InputHTMLAttributes<HTMLIn
9
9
  * Semantic variants: success, info, warning, danger
10
10
  * Each variant supports outline form for flexible design expression
11
11
  */
12
- 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';
12
+ variant?: 'primary' | 'secondary' | 'tertiary' | 'ghost' | 'neutral' | 'success' | 'info' | 'warning' | 'danger';
13
13
  /**
14
14
  * Size variant for the segment inputs
15
15
  */
16
16
  size?: 'sm' | 'md' | 'lg';
17
- /**
18
- * If true, the segment group and its options will fill the parent width
19
- */
20
- fullWidth?: boolean;
21
17
  /**
22
18
  * Label text to display above the segment group
23
19
  */
@@ -1,3 +1,2 @@
1
- export * from './switch-input';
2
- export * from './switch-input.atoms';
3
- export * from './types';
1
+ export { SwitchInput } from './switch-input';
2
+ export type * from './types';
@@ -1,9 +1,9 @@
1
- import { default as React } from 'react';
2
1
  import { TimePickerInputProps } from './types';
3
2
  /**
4
3
  * TimePickerInput component for Versaur UI
5
4
  *
6
- * Provides a modal-based time picker with hour, minute, and AM/PM selection
7
- * Follows Material 3 guidelines (no clock UI)
5
+ * Renders a visually accessible text input
6
+ *
7
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/time
8
8
  */
9
- export declare const TimePickerInput: React.FC<TimePickerInputProps>;
9
+ export declare const TimePickerInput: import('react').ForwardRefExoticComponent<TimePickerInputProps & import('react').RefAttributes<HTMLInputElement>>;
@@ -1,47 +1,11 @@
1
- import { ReactNode } from 'react';
2
- import { ModalRootProps } from '../../overlays/modal';
1
+ import { TextInputProps } from '../text-input';
3
2
  /**
4
3
  * Props for the TimePickerInput component
5
4
  */
6
- export interface TimePickerInputProps {
7
- /**
8
- * The selected time value in 12-hour format (e.g., '02:30 PM')
9
- */
5
+ export interface TimePickerInputProps extends Omit<TextInputProps, 'type' | 'value' | 'onChange'> {
10
6
  value: string;
11
7
  /**
12
8
  * Called when the time value changes
13
9
  */
14
10
  onChange: (value: string) => void;
15
- /**
16
- * Optional label for the input
17
- */
18
- label?: ReactNode;
19
- /**
20
- * Optional helper text below the input
21
- */
22
- helperText?: ReactNode;
23
- /**
24
- * Whether the input is disabled
25
- */
26
- disabled?: boolean;
27
- /**
28
- * Optional error message
29
- */
30
- error?: ReactNode;
31
- /**
32
- * Whether to decide the modal placement'
33
- */
34
- placement?: ModalRootProps['placement'];
35
- /**
36
- * Optional: ARIA label for dialog
37
- */
38
- 'aria-label'?: string;
39
- /**
40
- * Optional: ARIA labelledby for dialog
41
- */
42
- 'aria-labelledby'?: string;
43
- /**
44
- * Optional: ARIA describedby for dialog
45
- */
46
- 'aria-describedby'?: string;
47
11
  }
@@ -4,3 +4,4 @@ export * from './forms';
4
4
  export * from './overlays';
5
5
  export * from './primitive';
6
6
  export * from './navigation';
7
+ export * from './providers';
@@ -1 +1,2 @@
1
- export * from './page-layout';
1
+ export { PageLayout } from './page-layout';
2
+ export type * from './types';
@@ -1,2 +1,2 @@
1
- export * from './menu';
2
- export * from './types';
1
+ export { Menu } from './menu';
2
+ export type * from './types';
@@ -2,7 +2,7 @@ import { HTMLAttributes } from 'react';
2
2
  /**
3
3
  * Modal component prop types
4
4
  */
5
- export type ModalSize = 'sm' | 'md' | 'lg';
5
+ export type ModalSize = 'sm' | 'md' | 'lg' | 'fit-content';
6
6
  export type ModalPlacement = 'top' | 'center';
7
7
  /**
8
8
  * Modal compound root
@@ -10,10 +10,16 @@ export interface AnchorProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
10
10
  color?: 'primary' | 'secondary' | 'ghost' | 'danger' | 'neutral';
11
11
  /**
12
12
  * Font size utility (default: 'base')
13
+ * See: https://tailwindcss.com/docs/font-size
13
14
  */
14
- fontSize?: string;
15
+ fontSize?: 'xs' | 'sm' | 'base' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl' | '8xl' | '9xl' | 'inherit' | undefined;
15
16
  /**
16
17
  * Font weight utility (default: 'medium')
18
+ * See: https://tailwindcss.com/docs/font-weight
17
19
  */
18
- fontWeight?: string;
20
+ fontWeight?: 'thin' | 'extralight' | 'light' | 'normal' | 'medium' | 'semibold' | 'bold' | 'extrabold' | 'black' | 'inherit' | undefined;
21
+ /**
22
+ * If true, removes underline style from anchor
23
+ */
24
+ quiet?: boolean;
19
25
  }
@@ -0,0 +1,13 @@
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>>;
@@ -0,0 +1,6 @@
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
+ };
@@ -0,0 +1,2 @@
1
+ export { DescriptionList } from './description-list';
2
+ export * from './types';
@@ -0,0 +1,46 @@
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
+ }
@@ -13,3 +13,4 @@ export * from './snackbar';
13
13
  export * from './table';
14
14
  export * from './text';
15
15
  export * from './tile';
16
+ export * from './description-list';
@@ -0,0 +1 @@
1
+ export * from './snackbars-provider';
@@ -0,0 +1,3 @@
1
+ export { SnackbarsProvider } from './provider';
2
+ export { useSnackbars } from './use-snackbars';
3
+ export type * from './types';
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ import { SnackbarsProviderProps } from './types';
3
+ /**
4
+ * SnackbarsProvider manages a queue of snackbars and provides showSnack
5
+ * Placement: full width bottom for mobile, bottom left for desktop/tablet
6
+ */
7
+ export declare const SnackbarsProvider: FC<SnackbarsProviderProps>;
@@ -0,0 +1,28 @@
1
+ import { ReactNode } from 'react';
2
+ /**
3
+ * SnackbarQueueItem: Represents a snackbar in the queue
4
+ */
5
+ export interface SnackbarQueueItem {
6
+ /** Unique id for the snackbar */
7
+ id: string;
8
+ /** Message content */
9
+ message: ReactNode;
10
+ /** Color variant */
11
+ color?: 'success' | 'info' | 'warning' | 'danger';
12
+ /** Optional action element */
13
+ action?: ReactNode;
14
+ /** Optional duration in milliseconds */
15
+ duration?: number | null;
16
+ }
17
+ export type ShowSnackFunction = (color: SnackbarQueueItem['color'], message: ReactNode, options?: Partial<Omit<SnackbarQueueItem, 'id' | 'color' | 'message'>>) => void;
18
+ /**
19
+ * SnackbarsContextValue: Context value for snackbars
20
+ */
21
+ export interface SnackbarsContextValue {
22
+ /** Show a snackbar */
23
+ showSnack: ShowSnackFunction;
24
+ }
25
+ export interface SnackbarsProviderProps {
26
+ /** Children to render inside the provider */
27
+ children: ReactNode;
28
+ }
@@ -0,0 +1,9 @@
1
+ import { ShowSnackFunction, SnackbarQueueItem } from './types';
2
+ /**
3
+ * Custom hook to manage snackbar queue and auto-close logic
4
+ */
5
+ export declare function useSnackbarsQueue(): {
6
+ queue: SnackbarQueueItem[];
7
+ showSnack: ShowSnackFunction;
8
+ removeSnack: (id: string) => void;
9
+ };
@@ -0,0 +1,4 @@
1
+ /**
2
+ * useSnackbars: Access the snackbars context and showSnack function
3
+ */
4
+ export declare function useSnackbars(): import('./types').SnackbarsContextValue;
@@ -1,57 +1,65 @@
1
1
  /**
2
- * ESLint rule for Versaur: enforce sub-path imports for optimal tree-shaking (Flat config compatible)
2
+ * Auto-generated symbol-to-subpath mapping and ESLint rule for Versaur
3
+ * Run dist/utils/lint-rules.cjs to update
3
4
  */
4
5
 
5
6
  const symbolToSubpath = {
6
- // primitive
7
- Button: 'primitive',
8
- ButtonFloat: 'primitive',
9
- ButtonIcon: 'primitive',
10
- Anchor: 'primitive',
11
- Avatar: 'primitive',
12
- Badge: 'primitive',
13
- Brand: 'primitive',
14
- Calculator: 'primitive',
15
- Calendar: 'primitive',
16
- Icon: 'primitive',
17
- Snackbar: 'primitive',
18
- Table: 'primitive',
19
- Text: 'primitive',
20
- Tile: 'primitive',
21
- Alert: 'primitive',
22
- // overlays
23
- Drawer: 'overlays',
24
- Modal: 'overlays',
25
- Menu: 'overlays',
26
- BottomSheet: 'overlays',
27
- // navigation
28
- Tabs: 'navigation',
29
- Breadcrumbs: 'navigation',
30
- // layouts
31
- AppBar: 'layouts',
32
- BottomBar: 'layouts',
33
- FormLayout: 'layouts',
34
- PageLayout: 'layouts',
35
- TopBar: 'layouts',
36
- // feedbacks
37
- LoadingIndicator: 'feedbacks',
38
- ProgressIndicator: 'feedbacks',
39
- Skeleton: 'feedbacks',
40
- // forms
41
- CalculatorInput: 'forms',
42
- CheckboxInput: 'forms',
43
- ChipInput: 'forms',
44
- DateSinglePickerInput: 'forms',
45
- DateRangePickerInput: 'forms',
46
- RadioInput: 'forms',
47
- SegmentMultipleInput: 'forms',
48
- SegmentSingleInput: 'forms',
49
- SelectInput: 'forms',
50
- SwitchInput: 'forms',
51
- TextInput: 'forms',
52
- TextareaInput: 'forms',
53
- TimePickerInput: 'forms',
54
- }
7
+ "LoadingIndicator": "feedbacks",
8
+ "ProgressIndicator": "feedbacks",
9
+ "Skeleton": "feedbacks",
10
+ "CheckboxInput": "forms",
11
+ "ChipMultipleInput": "forms",
12
+ "ChipSingleInput": "forms",
13
+ "DateSinglePickerInput": "forms",
14
+ "EmailInput": "forms",
15
+ "PriceInput": "forms",
16
+ "RadioInput": "forms",
17
+ "SearchInput": "forms",
18
+ "SegmentMultipleInput": "forms",
19
+ "SegmentSingleInput": "forms",
20
+ "SelectInput": "forms",
21
+ "SwitchInput": "forms",
22
+ "TextInput": "forms",
23
+ "TextAreaInput": "forms",
24
+ "TimePickerInput": "forms",
25
+ "AppBar": "layouts",
26
+ "BottomBar": "layouts",
27
+ "FormLayout": "layouts",
28
+ "PageLayout": "layouts",
29
+ "TopBar": "layouts",
30
+ "Breadcrumbs": "navigation",
31
+ "Tabs": "navigation",
32
+ "BottomSheet": "overlays",
33
+ "Drawer": "overlays",
34
+ "Menu": "overlays",
35
+ "Modal": "overlays",
36
+ "Alert": "primitive",
37
+ "Anchor": "primitive",
38
+ "Avatar": "primitive",
39
+ "Badge": "primitive",
40
+ "Brand": "primitive",
41
+ "Button": "primitive",
42
+ "ButtonFloat": "primitive",
43
+ "ButtonIcon": "primitive",
44
+ "Calculator": "primitive",
45
+ "Calendar": "primitive",
46
+ "DescriptionList": "primitive",
47
+ "Icon": "primitive",
48
+ "Snackbar": "primitive",
49
+ "Table": "primitive",
50
+ "Text": "primitive",
51
+ "Tile": "primitive",
52
+ "SnackbarsProvider": "providers",
53
+ "useSnackbars": "providers",
54
+ "cn": "utils",
55
+ "cva": "utils",
56
+ "createVariants": "utils"
57
+ };
58
+
59
+ /**
60
+ * ESLint rule for Versaur: enforce sub-path imports for optimal tree-shaking (Flat config compatible)
61
+ * This file expects a symbolToSubpath object to be defined in the scope before it is loaded.
62
+ */
55
63
 
56
64
  const rules = {
57
65
  meta: {
@@ -116,7 +124,9 @@ const rules = {
116
124
  },
117
125
  }
118
126
 
119
- // export array of config objects for flexible flat config usage
127
+
128
+
129
+ // Compose the config for ESLint Flat config usage
120
130
  export const versaurEnforceSubpathImport = [
121
131
  {
122
132
  plugins: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dimasbaguspm/versaur",
3
- "version": "0.0.16",
3
+ "version": "0.0.18",
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",
@@ -38,14 +38,18 @@
38
38
  "import": "./dist/js/overlays/index.js",
39
39
  "types": "./dist/types/overlays/index.d.ts"
40
40
  },
41
- "./styles.css": "./dist/js/styles.css",
42
- "./eslint-subpath-import": "./dist/js/enforce-subpath-import.js"
41
+ "./providers": {
42
+ "import": "./dist/js/providers/index.js",
43
+ "types": "./dist/types/providers/index.d.ts"
44
+ },
45
+ "./styles.css": "./dist/assets/styles.css",
46
+ "./eslint-subpath-import": "./dist/utils/enforce-subpath-import.js"
43
47
  },
44
48
  "files": [
45
49
  "dist"
46
50
  ],
47
51
  "scripts": {
48
- "build": "tsc && vite build",
52
+ "build": "tsc && vite build && node scripts/post-build.cjs",
49
53
  "typecheck": "tsc --noEmit",
50
54
  "lint": "eslint .",
51
55
  "lint:fix": "eslint . --fix",