@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.
@@ -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 { TextInputProps } from '../text-input/types';
1
+ import { TextInputAsButtonProps } from '../text-input-as-button/types';
2
2
  /**
3
3
  * Props for DateSinglePickerInput
4
- * Extends TextInputProps, but restricts type to 'date' and value to string
4
+ * Extends TextInputAsButtonProps for button-styled input behavior
5
5
  */
6
- export interface DateSinglePickerInputProps extends Omit<TextInputProps, 'type' | 'value' | 'onChange'> {
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,2 @@
1
+ export { TextInputAsButton } from './text-input-as-button';
2
+ export type { TextInputAsButtonProps } from './types';
@@ -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
+ }
@@ -21,6 +21,7 @@ const symbolToSubpath = {
21
21
  "SelectableSingleInput": "forms",
22
22
  "SwitchInput": "forms",
23
23
  "TextInput": "forms",
24
+ "TextInputAsButton": "forms",
24
25
  "TextAreaInput": "forms",
25
26
  "TimePickerInput": "forms",
26
27
  "AppBar": "layouts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dimasbaguspm/versaur",
3
- "version": "0.0.52",
3
+ "version": "0.0.54",
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",