@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.
- package/dist/{js → assets}/styles.css +37 -0
- package/dist/js/bottom-sheet-BRv-oJL-.js +646 -0
- package/dist/js/description-list-DZQF212Z.js +1786 -0
- package/dist/js/email-input-BIbrfs5q.js +1731 -0
- package/dist/js/forms/index.js +16 -16
- package/dist/js/index.js +44 -41
- package/dist/js/overlays/index.js +3 -4
- package/dist/js/primitive/index.js +12 -11
- package/dist/js/providers/index.js +5 -0
- package/dist/js/snackbar-DH8jCh2V.js +50 -0
- package/dist/js/use-snackbars-oPoF7J5t.js +94 -0
- package/dist/types/feedbacks/loading-indicator/index.d.ts +2 -1
- package/dist/types/forms/chip-multiple-input/chip-multiple-input.atoms.d.ts +10 -0
- package/dist/types/forms/chip-multiple-input/chip-multiple-input.d.ts +5 -0
- package/dist/types/forms/chip-multiple-input/index.d.ts +2 -0
- package/dist/types/forms/{chip-input → chip-multiple-input}/types.d.ts +16 -4
- package/dist/types/forms/chip-single-input/chip-single-input.atoms.d.ts +10 -0
- package/dist/types/forms/chip-single-input/chip-single-input.d.ts +5 -0
- package/dist/types/forms/chip-single-input/index.d.ts +2 -0
- package/dist/types/forms/chip-single-input/types.d.ts +67 -0
- package/dist/types/forms/date-single-picker-input/date-single-picker-input.d.ts +1 -8
- package/dist/types/forms/date-single-picker-input/index.d.ts +1 -1
- package/dist/types/forms/date-single-picker-input/types.d.ts +12 -66
- package/dist/types/forms/email-input/email-input.d.ts +8 -0
- package/dist/types/forms/email-input/index.d.ts +2 -0
- package/dist/types/forms/email-input/types.d.ts +6 -0
- package/dist/types/forms/index.d.ts +5 -2
- package/dist/types/forms/price-input/index.d.ts +2 -0
- package/dist/types/forms/price-input/price-input.d.ts +6 -0
- package/dist/types/forms/price-input/types.d.ts +15 -0
- package/dist/types/forms/price-input/use-price-input.d.ts +6 -0
- package/dist/types/forms/search-input/index.d.ts +2 -0
- package/dist/types/forms/search-input/search-input.d.ts +8 -0
- package/dist/types/forms/search-input/types.d.ts +35 -0
- package/dist/types/forms/segment-multiple-input/types.d.ts +1 -5
- package/dist/types/forms/segment-single-input/types.d.ts +1 -5
- package/dist/types/forms/switch-input/index.d.ts +2 -3
- package/dist/types/forms/time-picker-input/time-picker-input.d.ts +4 -4
- package/dist/types/forms/time-picker-input/types.d.ts +2 -38
- package/dist/types/index.d.ts +1 -0
- package/dist/types/layouts/page-layout/index.d.ts +2 -1
- package/dist/types/overlays/menu/index.d.ts +2 -2
- package/dist/types/overlays/modal/types.d.ts +1 -1
- package/dist/types/primitive/anchor/types.d.ts +8 -2
- package/dist/types/primitive/description-list/description-list.atoms.d.ts +13 -0
- package/dist/types/primitive/description-list/description-list.d.ts +6 -0
- package/dist/types/primitive/description-list/index.d.ts +2 -0
- package/dist/types/primitive/description-list/types.d.ts +46 -0
- package/dist/types/primitive/index.d.ts +1 -0
- package/dist/types/providers/index.d.ts +1 -0
- package/dist/types/providers/snackbars-provider/index.d.ts +3 -0
- package/dist/types/providers/snackbars-provider/provider.d.ts +7 -0
- package/dist/types/providers/snackbars-provider/types.d.ts +28 -0
- package/dist/types/providers/snackbars-provider/use-snackbars-queue.d.ts +9 -0
- package/dist/types/providers/snackbars-provider/use-snackbars.d.ts +4 -0
- package/dist/{js → utils}/enforce-subpath-import.js +61 -51
- package/package.json +8 -4
- package/dist/js/bottom-sheet-Difan0U1.js +0 -340
- package/dist/js/calendar-CUjVZ7Ap.js +0 -811
- package/dist/js/menu-Bm-yPIMN.js +0 -310
- package/dist/js/switch-input-Bx6_2zG9.js +0 -2035
- package/dist/js/tile-BjhJ5Mvl.js +0 -939
- package/dist/types/forms/calculator-input/calculator-input.atoms.d.ts +0 -11
- package/dist/types/forms/calculator-input/calculator-input.d.ts +0 -8
- package/dist/types/forms/calculator-input/index.d.ts +0 -1
- package/dist/types/forms/calculator-input/types.d.ts +0 -51
- package/dist/types/forms/chip-input/chip-input.atoms.d.ts +0 -10
- package/dist/types/forms/chip-input/chip-input.d.ts +0 -5
- package/dist/types/forms/chip-input/index.d.ts +0 -2
- package/dist/types/forms/date-range-picker-input/date-range-picker-input.d.ts +0 -10
- package/dist/types/forms/date-range-picker-input/index.d.ts +0 -2
- package/dist/types/forms/date-range-picker-input/types.d.ts +0 -64
- package/dist/types/forms/date-range-picker-input/use-date-range-picker.d.ts +0 -13
- package/dist/types/forms/date-single-picker-input/date-single-picker-input.atoms.d.ts +0 -13
- package/dist/types/forms/date-single-picker-input/date-single-picker-input.docked.d.ts +0 -14
- package/dist/types/forms/date-single-picker-input/date-single-picker-input.modal.d.ts +0 -15
- package/dist/types/forms/date-single-picker-input/use-date-single-picker.d.ts +0 -10
- package/dist/types/forms/time-picker-input/time-picker-input.atoms.d.ts +0 -15
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { CalculatorInputProps } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* CalculatorInputField is the input field for CalculatorInput
|
|
4
|
-
*/
|
|
5
|
-
export interface CalculatorInputFieldProps extends Omit<CalculatorInputProps, 'onChange'> {
|
|
6
|
-
onChange: (value: number | '') => void;
|
|
7
|
-
onClick?: React.MouseEventHandler<HTMLInputElement>;
|
|
8
|
-
onFocus?: React.FocusEventHandler<HTMLInputElement>;
|
|
9
|
-
readOnly?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export declare const CalculatorInputField: import('react').ForwardRefExoticComponent<CalculatorInputFieldProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './calculator-input';
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { CalculatorProps } from '../../primitive/calculator';
|
|
2
|
-
import { ModalRootProps } from '../../overlays/modal';
|
|
3
|
-
/**
|
|
4
|
-
* Props for CalculatorInput component
|
|
5
|
-
*/
|
|
6
|
-
export interface CalculatorInputProps extends Omit<CalculatorProps, 'value' | 'onChange'> {
|
|
7
|
-
/**
|
|
8
|
-
* The value of the input (number or empty string)
|
|
9
|
-
*/
|
|
10
|
-
value: number | '';
|
|
11
|
-
/**
|
|
12
|
-
* Called when the value changes
|
|
13
|
-
*/
|
|
14
|
-
onChange: (value: number | '') => void;
|
|
15
|
-
/**
|
|
16
|
-
* Label text to display above the input
|
|
17
|
-
*/
|
|
18
|
-
label?: React.ReactNode;
|
|
19
|
-
/**
|
|
20
|
-
* Helper text to display below the input
|
|
21
|
-
*/
|
|
22
|
-
helperText?: React.ReactNode;
|
|
23
|
-
/**
|
|
24
|
-
* Error message for invalid state
|
|
25
|
-
*/
|
|
26
|
-
error?: React.ReactNode;
|
|
27
|
-
/**
|
|
28
|
-
* Placeholder text for the input
|
|
29
|
-
*/
|
|
30
|
-
placeholder?: string;
|
|
31
|
-
/**
|
|
32
|
-
* If true, disables the input
|
|
33
|
-
*/
|
|
34
|
-
disabled?: boolean;
|
|
35
|
-
/**
|
|
36
|
-
* Modal props for customizing the modal behavior
|
|
37
|
-
*/
|
|
38
|
-
modalProps?: Partial<ModalRootProps>;
|
|
39
|
-
/**
|
|
40
|
-
* Optional: ARIA label for dialog
|
|
41
|
-
*/
|
|
42
|
-
'aria-label'?: string;
|
|
43
|
-
/**
|
|
44
|
-
* Optional: ARIA labelledby for dialog
|
|
45
|
-
*/
|
|
46
|
-
'aria-labelledby'?: string;
|
|
47
|
-
/**
|
|
48
|
-
* Optional: ARIA describedby for dialog
|
|
49
|
-
*/
|
|
50
|
-
'aria-describedby'?: string;
|
|
51
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { ChipInputOptionProps } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* ChipInput.Option atom component
|
|
5
|
-
*
|
|
6
|
-
* Individual chip option for ChipInput
|
|
7
|
-
* Uses checkbox input pattern for multiple selection
|
|
8
|
-
* Supports leading icon and animated tick/check
|
|
9
|
-
*/
|
|
10
|
-
export declare const ChipOption: React.ForwardRefExoticComponent<ChipInputOptionProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { ChipInputProps } from './types';
|
|
3
|
-
export declare const ChipInput: React.ForwardRefExoticComponent<ChipInputProps & React.RefAttributes<HTMLDivElement>> & {
|
|
4
|
-
Option: React.ForwardRefExoticComponent<import('./types').ChipInputOptionProps & React.RefAttributes<HTMLInputElement>>;
|
|
5
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { DateRangePickerInputProps } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* DateRangePickerInput component for Versaur UI
|
|
5
|
-
*
|
|
6
|
-
* Styled like TextInput, but acts as a button to pick a date range
|
|
7
|
-
* Clicking opens a docked Calendar below the input (type='range')
|
|
8
|
-
* Strictly typed, accessible, and visually consistent with TextInput
|
|
9
|
-
*/
|
|
10
|
-
export declare const DateRangePickerInput: React.ForwardRefExoticComponent<DateRangePickerInputProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* ISO 8601 date string (YYYY-MM-DD)
|
|
4
|
-
*/
|
|
5
|
-
export type ISODateString = string;
|
|
6
|
-
/**
|
|
7
|
-
* Tuple for date range value: [start, end] (ISO 8601 or null)
|
|
8
|
-
*/
|
|
9
|
-
export type DateRangeValue = [ISODateString | null, ISODateString | null] | null;
|
|
10
|
-
/**
|
|
11
|
-
* Props for DateRangePickerInput
|
|
12
|
-
*/
|
|
13
|
-
export interface DateRangePickerInputProps {
|
|
14
|
-
/**
|
|
15
|
-
* The selected date range value (tuple of ISO 8601 strings or nulls)
|
|
16
|
-
*/
|
|
17
|
-
value: DateRangeValue;
|
|
18
|
-
/**
|
|
19
|
-
* Callback when the value changes
|
|
20
|
-
*/
|
|
21
|
-
onChange: (value: DateRangeValue) => void;
|
|
22
|
-
/**
|
|
23
|
-
* Label text to display above the input
|
|
24
|
-
*/
|
|
25
|
-
label?: ReactNode;
|
|
26
|
-
/**
|
|
27
|
-
* Optional content to display inside the input (left)
|
|
28
|
-
*/
|
|
29
|
-
leftContent?: ReactNode;
|
|
30
|
-
/**
|
|
31
|
-
* Optional content to display inside the input (right)
|
|
32
|
-
*/
|
|
33
|
-
rightContent?: ReactNode;
|
|
34
|
-
/**
|
|
35
|
-
* Helper text to display below the input
|
|
36
|
-
*/
|
|
37
|
-
helperText?: ReactNode;
|
|
38
|
-
/**
|
|
39
|
-
* Error message for invalid state
|
|
40
|
-
*/
|
|
41
|
-
error?: ReactNode;
|
|
42
|
-
/**
|
|
43
|
-
* Visual style variant supporting Versaur color system
|
|
44
|
-
*/
|
|
45
|
-
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';
|
|
46
|
-
/**
|
|
47
|
-
* Disabled state
|
|
48
|
-
*/
|
|
49
|
-
disabled?: boolean;
|
|
50
|
-
/**
|
|
51
|
-
* Placeholder text when no date is selected
|
|
52
|
-
*/
|
|
53
|
-
placeholder?: ReactNode;
|
|
54
|
-
/**
|
|
55
|
-
* Optional id for the input element
|
|
56
|
-
*/
|
|
57
|
-
id?: string;
|
|
58
|
-
/**
|
|
59
|
-
* Optional custom date formatter. If not provided, uses default format.
|
|
60
|
-
* @param date Date to format
|
|
61
|
-
* @returns Formatted date string
|
|
62
|
-
*/
|
|
63
|
-
formatDate?: (date?: Date) => string;
|
|
64
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Hook for managing open/close state and focus for DateRangePickerInput
|
|
3
|
-
*/
|
|
4
|
-
export declare function useDateRangePicker({ id }: {
|
|
5
|
-
id?: string;
|
|
6
|
-
}): {
|
|
7
|
-
open: boolean;
|
|
8
|
-
setOpen: import('react').Dispatch<import('react').SetStateAction<boolean>>;
|
|
9
|
-
inputId: string;
|
|
10
|
-
buttonRef: import('react').RefObject<HTMLButtonElement | null>;
|
|
11
|
-
handleKeyDown: (e: React.KeyboardEvent) => void;
|
|
12
|
-
handleMenuClose: () => void;
|
|
13
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { DateSinglePickerModalFooterProps, DateSinglePickerInputProps } from './types';
|
|
2
|
-
import { default as React } from 'react';
|
|
3
|
-
export interface DateSinglePickerTriggerProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'value'> {
|
|
4
|
-
leftContent?: React.ReactNode;
|
|
5
|
-
rightContent?: React.ReactNode;
|
|
6
|
-
hasError?: boolean;
|
|
7
|
-
variant?: DateSinglePickerInputProps['variant'];
|
|
8
|
-
value?: Date;
|
|
9
|
-
placeholder?: string;
|
|
10
|
-
formatDate?: (date?: Date) => string;
|
|
11
|
-
}
|
|
12
|
-
export declare const DateSinglePickerTrigger: React.ForwardRefExoticComponent<DateSinglePickerTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
13
|
-
export declare const DateSinglePickerModalFooter: ({ onCancel, onConfirm, confirmDisabled, }: DateSinglePickerModalFooterProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
interface DateSinglePickerDockedProps {
|
|
3
|
-
open: boolean;
|
|
4
|
-
value: Date | undefined;
|
|
5
|
-
onChange: (date: Date) => void;
|
|
6
|
-
inputId: string;
|
|
7
|
-
handleMenuClose: () => void;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Docked calendar atom for DateSinglePickerInput
|
|
11
|
-
* Handles Menu and Calendar rendering for docked type
|
|
12
|
-
*/
|
|
13
|
-
export declare const DateSinglePickerDocked: React.FC<DateSinglePickerDockedProps>;
|
|
14
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
interface DateSinglePickerModalProps {
|
|
3
|
-
open: boolean;
|
|
4
|
-
setOpen: (open: boolean) => void;
|
|
5
|
-
value: Date | undefined;
|
|
6
|
-
onChange: (date: Date) => void;
|
|
7
|
-
label?: string;
|
|
8
|
-
buttonRef: React.RefObject<HTMLButtonElement>;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Modal calendar atom for DateSinglePickerInput
|
|
12
|
-
* Handles Modal, Calendar, and ModalFooter for modal type
|
|
13
|
-
*/
|
|
14
|
-
export declare const DateSinglePickerModal: React.FC<DateSinglePickerModalProps>;
|
|
15
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare function useDateSinglePicker({ id }: {
|
|
2
|
-
id?: string;
|
|
3
|
-
}): {
|
|
4
|
-
open: boolean;
|
|
5
|
-
setOpen: import('react').Dispatch<import('react').SetStateAction<boolean>>;
|
|
6
|
-
inputId: string;
|
|
7
|
-
buttonRef: import('react').RefObject<HTMLButtonElement | null>;
|
|
8
|
-
handleKeyDown: (e: React.KeyboardEvent<HTMLButtonElement>) => void;
|
|
9
|
-
handleMenuClose: () => void;
|
|
10
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
export interface TimeFieldProps {
|
|
3
|
-
value: string;
|
|
4
|
-
onChange: (val: string) => void;
|
|
5
|
-
label: string;
|
|
6
|
-
'aria-label'?: string;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
}
|
|
9
|
-
export declare const TimeField: React.FC<TimeFieldProps>;
|
|
10
|
-
export interface AmPmSegmentProps {
|
|
11
|
-
value: 'AM' | 'PM';
|
|
12
|
-
onChange: (val: 'AM' | 'PM') => void;
|
|
13
|
-
disabled?: boolean;
|
|
14
|
-
}
|
|
15
|
-
export declare const AmPmSegment: React.FC<AmPmSegmentProps>;
|