@dimasbaguspm/versaur 0.0.44 → 0.0.46
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/forms/index.js +18 -20
- package/dist/js/{image-rectangle-DjuCYHbk.js → image-rectangle-B4nXH4Q5.js} +990 -1158
- package/dist/js/index.js +60 -64
- package/dist/js/layouts/index.js +1 -1
- package/dist/js/navigation/index.js +1 -1
- package/dist/js/overlays/index.js +5 -6
- package/dist/js/primitive/index.js +25 -26
- package/dist/js/{tabs-CiZ2DPDD.js → tabs-BAzThVka.js} +1 -1
- package/dist/js/{bottom-sheet-input-C9Ht9cxQ.js → time-picker-input-DrZ4dyEB.js} +875 -800
- package/dist/js/tooltip-D6fUigp2.js +691 -0
- package/dist/js/{top-bar-CKo6k1eW.js → top-bar-Dx0JVXms.js} +1 -1
- package/dist/types/forms/index.d.ts +7 -9
- package/dist/types/forms/pin-field/index.d.ts +2 -0
- package/dist/types/forms/pin-field/pin-field.d.ts +9 -0
- package/dist/types/forms/pin-field/types.d.ts +86 -0
- package/dist/types/primitive/action-card/action-card.atoms.d.ts +18 -0
- package/dist/types/primitive/action-card/action-card.d.ts +4 -0
- package/dist/types/primitive/action-card/index.d.ts +2 -0
- package/dist/types/primitive/action-card/types.d.ts +57 -0
- package/dist/types/primitive/brand/types.d.ts +1 -1
- package/dist/types/primitive/index.d.ts +1 -2
- package/dist/utils/enforce-subpath-import.js +2 -5
- package/package.json +1 -1
- package/dist/js/bottom-sheet-BSN0J8ji.js +0 -615
- package/dist/js/tooltip-nOXyn9AX.js +0 -81
- package/dist/types/forms/bottom-sheet-input/bottom-sheet-input.d.ts +0 -7
- package/dist/types/forms/bottom-sheet-input/index.d.ts +0 -2
- package/dist/types/forms/bottom-sheet-input/types.d.ts +0 -17
- package/dist/types/forms/drawer-input/drawer-input.d.ts +0 -6
- package/dist/types/forms/drawer-input/index.d.ts +0 -2
- package/dist/types/forms/drawer-input/types.d.ts +0 -18
- package/dist/types/forms/modal-input/index.d.ts +0 -2
- package/dist/types/forms/modal-input/modal-input.d.ts +0 -6
- package/dist/types/forms/modal-input/types.d.ts +0 -18
- package/dist/types/primitive/button-float/button-float.d.ts +0 -8
- package/dist/types/primitive/button-float/index.d.ts +0 -2
- package/dist/types/primitive/button-float/types.d.ts +0 -31
- package/dist/types/primitive/button-float/use-floating-position.d.ts +0 -12
- package/dist/types/primitive/calculator/calculator.atoms.d.ts +0 -2
- package/dist/types/primitive/calculator/calculator.d.ts +0 -2
- package/dist/types/primitive/calculator/index.d.ts +0 -2
- package/dist/types/primitive/calculator/types.d.ts +0 -29
- package/dist/types/primitive/calculator/use-calculator.d.ts +0 -11
|
@@ -2,19 +2,17 @@ export * from './checkbox-input';
|
|
|
2
2
|
export * from './chip-single-input';
|
|
3
3
|
export * from './chip-multiple-input';
|
|
4
4
|
export * from './date-single-picker-input';
|
|
5
|
+
export * from './email-input';
|
|
6
|
+
export * from './pin-field';
|
|
7
|
+
export * from './price-input';
|
|
5
8
|
export * from './radio-input';
|
|
9
|
+
export * from './search-input';
|
|
6
10
|
export * from './segment-single-input';
|
|
7
11
|
export * from './segment-multiple-input';
|
|
8
|
-
export * from './search-input';
|
|
9
12
|
export * from './select-input';
|
|
13
|
+
export * from './selectable-single-input';
|
|
14
|
+
export * from './selectable-multiple-input';
|
|
15
|
+
export * from './switch-input';
|
|
10
16
|
export * from './text-input';
|
|
11
17
|
export * from './textarea-input';
|
|
12
18
|
export * from './time-picker-input';
|
|
13
|
-
export * from './switch-input';
|
|
14
|
-
export * from './price-input';
|
|
15
|
-
export * from './email-input';
|
|
16
|
-
export * from './selectable-single-input';
|
|
17
|
-
export * from './selectable-multiple-input';
|
|
18
|
-
export * from './modal-input';
|
|
19
|
-
export * from './drawer-input';
|
|
20
|
-
export * from './bottom-sheet-input';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { PinFieldProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* PinField component for Versaur UI
|
|
5
|
+
*
|
|
6
|
+
* Provides a 6-digit PIN input field with automatic focus management
|
|
7
|
+
* Ensures only numeric input and follows accessibility best practices
|
|
8
|
+
*/
|
|
9
|
+
export declare const PinField: React.ForwardRefExoticComponent<PinFieldProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Props for the PinField component
|
|
4
|
+
*/
|
|
5
|
+
export interface PinFieldProps {
|
|
6
|
+
/**
|
|
7
|
+
* Visual style variant supporting Versaur color system
|
|
8
|
+
* Core variants: primary (coral), secondary (sage), tertiary (mist), ghost (slate), neutral (light gray)
|
|
9
|
+
* Semantic variants: success, info, warning, danger
|
|
10
|
+
* Each variant supports outline form for flexible design expression
|
|
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';
|
|
13
|
+
/**
|
|
14
|
+
* Label text to display above the pin field
|
|
15
|
+
*/
|
|
16
|
+
label?: ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* Helper text to display below the pin field
|
|
19
|
+
*/
|
|
20
|
+
helperText?: ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* Error message for invalid state
|
|
23
|
+
*/
|
|
24
|
+
error?: ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* Whether the component is disabled
|
|
27
|
+
*/
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Current value of the pin field (6 digits)
|
|
31
|
+
*/
|
|
32
|
+
value?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Default value for uncontrolled usage
|
|
35
|
+
*/
|
|
36
|
+
defaultValue?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Callback fired when the pin value changes
|
|
39
|
+
*/
|
|
40
|
+
onChange?: (value: string) => void;
|
|
41
|
+
/**
|
|
42
|
+
* Callback fired when the pin field is completed (all 6 digits entered)
|
|
43
|
+
*/
|
|
44
|
+
onComplete?: (value: string) => void;
|
|
45
|
+
/**
|
|
46
|
+
* Whether to automatically submit when complete
|
|
47
|
+
*/
|
|
48
|
+
autoSubmit?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Custom className for styling
|
|
51
|
+
*/
|
|
52
|
+
className?: string;
|
|
53
|
+
/**
|
|
54
|
+
* ID for the pin field group
|
|
55
|
+
*/
|
|
56
|
+
id?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Name attribute for form submission
|
|
59
|
+
*/
|
|
60
|
+
name?: string;
|
|
61
|
+
/**
|
|
62
|
+
* Whether the pin field is required
|
|
63
|
+
*/
|
|
64
|
+
required?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Whether to show the pin values as dots/asterisks for security
|
|
67
|
+
*/
|
|
68
|
+
secure?: boolean;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Props for individual pin input
|
|
72
|
+
*/
|
|
73
|
+
export interface PinInputProps {
|
|
74
|
+
value: string;
|
|
75
|
+
onChange: (value: string) => void;
|
|
76
|
+
onKeyDown: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
77
|
+
onFocus: () => void;
|
|
78
|
+
onPaste: (e: React.ClipboardEvent<HTMLInputElement>) => void;
|
|
79
|
+
disabled?: boolean;
|
|
80
|
+
error?: boolean;
|
|
81
|
+
variant: PinFieldProps['variant'];
|
|
82
|
+
secure?: boolean;
|
|
83
|
+
inputRef: (el: HTMLInputElement | null) => void;
|
|
84
|
+
index: number;
|
|
85
|
+
id: string;
|
|
86
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ActionCardGroupProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* ActionCard.Group - Container component for grouping multiple ActionCards
|
|
4
|
+
*
|
|
5
|
+
* Provides a clean container with proper spacing and borders for multiple ActionCards.
|
|
6
|
+
* ActionCards within a group are automatically spaced and can be configured with
|
|
7
|
+
* consistent sizing.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* <ActionCard.Group>
|
|
12
|
+
* <ActionCard icon={<WalletIcon />} title="Account Groups" badge={<Badge>Popular</Badge>} />
|
|
13
|
+
* <ActionCard icon={<TagsIcon />} title="Category Groups" />
|
|
14
|
+
* <ActionCard icon={<DatabaseIcon />} title="Backup & Restore" />
|
|
15
|
+
* </ActionCard.Group>
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare const ActionCardGroup: import('react').ForwardRefExoticComponent<ActionCardGroupProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ActionCardProps } from './types';
|
|
2
|
+
export declare const ActionCard: import('react').ForwardRefExoticComponent<ActionCardProps & import('react').RefAttributes<HTMLDivElement | HTMLButtonElement>> & {
|
|
3
|
+
Group: import('react').ForwardRefExoticComponent<import('./types').ActionCardGroupProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
4
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { actionCardVariants } from './helpers';
|
|
4
|
+
/**
|
|
5
|
+
* Props for the ActionCard component
|
|
6
|
+
*/
|
|
7
|
+
export interface ActionCardProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'title' | 'children'>, VariantProps<typeof actionCardVariants> {
|
|
8
|
+
/**
|
|
9
|
+
* Size variant affecting padding and spacing
|
|
10
|
+
* @default 'md'
|
|
11
|
+
*/
|
|
12
|
+
size?: 'sm' | 'md' | 'lg';
|
|
13
|
+
/**
|
|
14
|
+
* Icon element to display in the icon container
|
|
15
|
+
*/
|
|
16
|
+
icon?: ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* Main title text
|
|
19
|
+
*/
|
|
20
|
+
title: ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* Subtitle or description text
|
|
23
|
+
*/
|
|
24
|
+
subtitle?: ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* Badge element to display next to the title
|
|
27
|
+
*/
|
|
28
|
+
badge?: ReactNode;
|
|
29
|
+
/**
|
|
30
|
+
* Whether to show the chevron arrow
|
|
31
|
+
* @default true
|
|
32
|
+
*/
|
|
33
|
+
showArrow?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Is the action card a button or a div?
|
|
36
|
+
* @default 'button'
|
|
37
|
+
*/
|
|
38
|
+
as?: 'button' | 'div';
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Props for the ActionCard Group container
|
|
42
|
+
*/
|
|
43
|
+
export interface ActionCardGroupProps {
|
|
44
|
+
/**
|
|
45
|
+
* ActionCard components to display as a group
|
|
46
|
+
*/
|
|
47
|
+
children: ReactNode;
|
|
48
|
+
/**
|
|
49
|
+
* Additional CSS classes
|
|
50
|
+
*/
|
|
51
|
+
className?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Size variant for all cards in the group
|
|
54
|
+
* @default 'md'
|
|
55
|
+
*/
|
|
56
|
+
size?: 'sm' | 'md' | 'lg';
|
|
57
|
+
}
|
|
@@ -6,7 +6,7 @@ export interface BrandProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
6
6
|
/**
|
|
7
7
|
* The app name to display (predefined, default: 'spenicle')
|
|
8
8
|
*/
|
|
9
|
-
name: 'spenicle' | 'hub';
|
|
9
|
+
name: 'spenicle' | 'hub' | 'notunic';
|
|
10
10
|
/**
|
|
11
11
|
* The size of the brand icon and text
|
|
12
12
|
* @default 'md'
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './accordion';
|
|
2
|
+
export * from './action-card';
|
|
2
3
|
export * from './alert';
|
|
3
4
|
export * from './anchor';
|
|
4
5
|
export * from './attribute';
|
|
@@ -9,9 +10,7 @@ export * from './brand';
|
|
|
9
10
|
export * from './button';
|
|
10
11
|
export * from './button-menu';
|
|
11
12
|
export * from './button-menu-icon';
|
|
12
|
-
export * from './button-float';
|
|
13
13
|
export * from './button-icon';
|
|
14
|
-
export * from './calculator';
|
|
15
14
|
export * from './card';
|
|
16
15
|
export * from './filter-chip';
|
|
17
16
|
export * from './heading';
|
|
@@ -7,14 +7,12 @@ const symbolToSubpath = {
|
|
|
7
7
|
"LoadingIndicator": "feedbacks",
|
|
8
8
|
"ProgressIndicator": "feedbacks",
|
|
9
9
|
"Skeleton": "feedbacks",
|
|
10
|
-
"BottomSheetInput": "forms",
|
|
11
10
|
"CheckboxInput": "forms",
|
|
12
11
|
"ChipMultipleInput": "forms",
|
|
13
12
|
"ChipSingleInput": "forms",
|
|
14
13
|
"DateSinglePickerInput": "forms",
|
|
15
|
-
"DrawerInput": "forms",
|
|
16
14
|
"EmailInput": "forms",
|
|
17
|
-
"
|
|
15
|
+
"PinField": "forms",
|
|
18
16
|
"PriceInput": "forms",
|
|
19
17
|
"RadioInput": "forms",
|
|
20
18
|
"SearchInput": "forms",
|
|
@@ -47,6 +45,7 @@ const symbolToSubpath = {
|
|
|
47
45
|
"Modal": "overlays",
|
|
48
46
|
"Tooltip": "overlays",
|
|
49
47
|
"Accordion": "primitive",
|
|
48
|
+
"ActionCard": "primitive",
|
|
50
49
|
"Alert": "primitive",
|
|
51
50
|
"Anchor": "primitive",
|
|
52
51
|
"Attribute": "primitive",
|
|
@@ -55,11 +54,9 @@ const symbolToSubpath = {
|
|
|
55
54
|
"Badge": "primitive",
|
|
56
55
|
"Brand": "primitive",
|
|
57
56
|
"Button": "primitive",
|
|
58
|
-
"ButtonFloat": "primitive",
|
|
59
57
|
"ButtonIcon": "primitive",
|
|
60
58
|
"ButtonMenu": "primitive",
|
|
61
59
|
"ButtonMenuIcon": "primitive",
|
|
62
|
-
"Calculator": "primitive",
|
|
63
60
|
"Card": "primitive",
|
|
64
61
|
"FilterChip": "primitive",
|
|
65
62
|
"Heading": "primitive",
|