@dimasbaguspm/versaur 0.0.45 → 0.0.47

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 (39) hide show
  1. package/dist/js/forms/index.js +18 -20
  2. package/dist/js/image-rectangle-B4nXH4Q5.js +2581 -0
  3. package/dist/js/index.js +72 -77
  4. package/dist/js/layouts/index.js +1 -1
  5. package/dist/js/navigation/index.js +1 -1
  6. package/dist/js/overlays/index.js +5 -6
  7. package/dist/js/primitive/index.js +28 -30
  8. package/dist/js/{tabs-D5aWU0pC.js → tabs-BAzThVka.js} +1 -1
  9. package/dist/js/{bottom-sheet-input-CxLwoZLr.js → time-picker-input-JBEgDV2V.js} +875 -800
  10. package/dist/js/tooltip-D6fUigp2.js +691 -0
  11. package/dist/js/{top-bar-vvLnMBwo.js → top-bar-Dx0JVXms.js} +1 -1
  12. package/dist/types/forms/index.d.ts +7 -9
  13. package/dist/types/forms/pin-field/index.d.ts +2 -0
  14. package/dist/types/forms/pin-field/pin-field.d.ts +9 -0
  15. package/dist/types/forms/pin-field/types.d.ts +86 -0
  16. package/dist/types/primitive/index.d.ts +0 -2
  17. package/dist/utils/enforce-subpath-import.js +1 -5
  18. package/package.json +1 -1
  19. package/dist/js/bottom-sheet-QdQ5L8Wo.js +0 -615
  20. package/dist/js/image-rectangle-BijhERaV.js +0 -2884
  21. package/dist/js/tooltip-D80OXyWL.js +0 -81
  22. package/dist/types/forms/bottom-sheet-input/bottom-sheet-input.d.ts +0 -7
  23. package/dist/types/forms/bottom-sheet-input/index.d.ts +0 -2
  24. package/dist/types/forms/bottom-sheet-input/types.d.ts +0 -17
  25. package/dist/types/forms/drawer-input/drawer-input.d.ts +0 -6
  26. package/dist/types/forms/drawer-input/index.d.ts +0 -2
  27. package/dist/types/forms/drawer-input/types.d.ts +0 -18
  28. package/dist/types/forms/modal-input/index.d.ts +0 -2
  29. package/dist/types/forms/modal-input/modal-input.d.ts +0 -6
  30. package/dist/types/forms/modal-input/types.d.ts +0 -18
  31. package/dist/types/primitive/button-float/button-float.d.ts +0 -8
  32. package/dist/types/primitive/button-float/index.d.ts +0 -2
  33. package/dist/types/primitive/button-float/types.d.ts +0 -31
  34. package/dist/types/primitive/button-float/use-floating-position.d.ts +0 -12
  35. package/dist/types/primitive/calculator/calculator.atoms.d.ts +0 -2
  36. package/dist/types/primitive/calculator/calculator.d.ts +0 -2
  37. package/dist/types/primitive/calculator/index.d.ts +0 -2
  38. package/dist/types/primitive/calculator/types.d.ts +0 -29
  39. 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,2 @@
1
+ export { PinField } from './pin-field';
2
+ export type { PinFieldProps } from './types';
@@ -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
+ }
@@ -10,9 +10,7 @@ export * from './brand';
10
10
  export * from './button';
11
11
  export * from './button-menu';
12
12
  export * from './button-menu-icon';
13
- export * from './button-float';
14
13
  export * from './button-icon';
15
- export * from './calculator';
16
14
  export * from './card';
17
15
  export * from './filter-chip';
18
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
- "ModalInput": "forms",
15
+ "PinField": "forms",
18
16
  "PriceInput": "forms",
19
17
  "RadioInput": "forms",
20
18
  "SearchInput": "forms",
@@ -56,11 +54,9 @@ const symbolToSubpath = {
56
54
  "Badge": "primitive",
57
55
  "Brand": "primitive",
58
56
  "Button": "primitive",
59
- "ButtonFloat": "primitive",
60
57
  "ButtonIcon": "primitive",
61
58
  "ButtonMenu": "primitive",
62
59
  "ButtonMenuIcon": "primitive",
63
- "Calculator": "primitive",
64
60
  "Card": "primitive",
65
61
  "FilterChip": "primitive",
66
62
  "Heading": "primitive",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dimasbaguspm/versaur",
3
- "version": "0.0.45",
3
+ "version": "0.0.47",
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",