@dimasbaguspm/versaur 0.0.52 → 0.0.54
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 +11 -10
- package/dist/js/index.js +47 -46
- package/dist/js/layouts/index.js +1 -1
- package/dist/js/{time-picker-input-BaM8Wdih.js → time-picker-input-DmJeWgNo.js} +623 -518
- package/dist/js/{top-bar-BMw3gFYA.js → top-bar-Dqje-W3G.js} +2 -2
- package/dist/types/forms/date-single-picker-input/types.d.ts +3 -3
- package/dist/types/forms/index.d.ts +1 -0
- package/dist/types/forms/text-input-as-button/index.d.ts +2 -0
- package/dist/types/forms/text-input-as-button/text-input-as-button.d.ts +10 -0
- package/dist/types/forms/text-input-as-button/types.d.ts +46 -0
- package/dist/utils/enforce-subpath-import.js +1 -0
- package/package.json +1 -1
|
@@ -385,7 +385,7 @@ const w = i(
|
|
|
385
385
|
}
|
|
386
386
|
);
|
|
387
387
|
}
|
|
388
|
-
), F = i("w-full", {
|
|
388
|
+
), F = i("w-full mb-4", {
|
|
389
389
|
variants: {
|
|
390
390
|
backgroundColor: {
|
|
391
391
|
white: "bg-white",
|
|
@@ -592,7 +592,7 @@ const w = i(
|
|
|
592
592
|
ra({ size: a, template: e }),
|
|
593
593
|
n
|
|
594
594
|
),
|
|
595
|
-
children: c
|
|
595
|
+
children: /* @__PURE__ */ t.jsx("div", { children: c })
|
|
596
596
|
}
|
|
597
597
|
)
|
|
598
598
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TextInputAsButtonProps } from '../text-input-as-button/types';
|
|
2
2
|
/**
|
|
3
3
|
* Props for DateSinglePickerInput
|
|
4
|
-
* Extends
|
|
4
|
+
* Extends TextInputAsButtonProps for button-styled input behavior
|
|
5
5
|
*/
|
|
6
|
-
export interface DateSinglePickerInputProps extends Omit<
|
|
6
|
+
export interface DateSinglePickerInputProps extends Omit<TextInputAsButtonProps, 'value' | 'onClick' | 'onChange'> {
|
|
7
7
|
/**
|
|
8
8
|
* The value of the input (ISO date string: YYYY-MM-DD)
|
|
9
9
|
*/
|
|
@@ -12,5 +12,6 @@ export * from './selectable-single-input';
|
|
|
12
12
|
export * from './selectable-multiple-input';
|
|
13
13
|
export * from './switch-input';
|
|
14
14
|
export * from './text-input';
|
|
15
|
+
export * from './text-input-as-button';
|
|
15
16
|
export * from './textarea-input';
|
|
16
17
|
export * from './time-picker-input';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TextInputAsButtonProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* TextInputAsButton component for Versaur UI
|
|
5
|
+
*
|
|
6
|
+
* A button that mimics the style of TextInput, useful for triggering modals, pickers, or custom inputs
|
|
7
|
+
* Renders as a button with the same visual style as TextInput, with a hidden input for form submission
|
|
8
|
+
* Follows browser standards and accessibility best practices with proper ARIA attributes
|
|
9
|
+
*/
|
|
10
|
+
export declare const TextInputAsButton: React.ForwardRefExoticComponent<TextInputAsButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Props for the TextInputAsButton component
|
|
4
|
+
*/
|
|
5
|
+
export interface TextInputAsButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'value'> {
|
|
6
|
+
/**
|
|
7
|
+
* Label text to display above the button
|
|
8
|
+
*/
|
|
9
|
+
label?: ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* Optional content to display inside the button (left)
|
|
12
|
+
*/
|
|
13
|
+
leftContent?: ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* Optional content to display inside the button (right)
|
|
16
|
+
*/
|
|
17
|
+
rightContent?: ReactNode;
|
|
18
|
+
/**
|
|
19
|
+
* Helper text to display below the button
|
|
20
|
+
*/
|
|
21
|
+
helperText?: ReactNode;
|
|
22
|
+
/**
|
|
23
|
+
* Error message for invalid state
|
|
24
|
+
*/
|
|
25
|
+
error?: ReactNode;
|
|
26
|
+
/**
|
|
27
|
+
* Display value to show in the button
|
|
28
|
+
*/
|
|
29
|
+
value?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Placeholder text when no value is present
|
|
32
|
+
*/
|
|
33
|
+
placeholder?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Whether the field is required
|
|
36
|
+
*/
|
|
37
|
+
required?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Name attribute for the hidden input
|
|
40
|
+
*/
|
|
41
|
+
name?: string;
|
|
42
|
+
/**
|
|
43
|
+
* ID for the component
|
|
44
|
+
*/
|
|
45
|
+
id?: string;
|
|
46
|
+
}
|