@hemerson/design-system 0.7.0 → 0.8.0
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.
|
@@ -19,9 +19,11 @@ export interface DateInputProps extends Omit<InputHTMLAttributes<HTMLInputElemen
|
|
|
19
19
|
calendarLabel?: string;
|
|
20
20
|
previousMonthLabel?: string;
|
|
21
21
|
nextMonthLabel?: string;
|
|
22
|
+
/** Keeps the label for screen readers only, e.g. for a field inside a table cell. */
|
|
23
|
+
hideLabel?: boolean;
|
|
22
24
|
}
|
|
23
25
|
/**
|
|
24
26
|
* A date field: type day/month/year, or pick from a glass calendar. The value is "yyyy-mm-dd",
|
|
25
27
|
* and with `name` a hidden input carries it, so forms read it like a native date input.
|
|
26
28
|
*/
|
|
27
|
-
export declare function DateInput({ label, value, defaultValue, onChange, min, max, hint, error, locale, weekStartsOn, calendarLabel, previousMonthLabel, nextMonthLabel, name, id, disabled, required, placeholder, className, ...rest }: DateInputProps): import("react").JSX.Element;
|
|
29
|
+
export declare function DateInput({ label, value, defaultValue, onChange, min, max, hint, error, locale, weekStartsOn, calendarLabel, previousMonthLabel, nextMonthLabel, hideLabel, name, id, disabled, required, placeholder, className, ...rest }: DateInputProps): import("react").JSX.Element;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { type InputHTMLAttributes, type ReactNode } from "react";
|
|
2
2
|
export interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
3
|
+
/** Keeps the label for screen readers only, e.g. for a field inside a table cell. */
|
|
4
|
+
hideLabel?: boolean;
|
|
3
5
|
/** Always visible, written as a noun ("Beneficiário"). */
|
|
4
6
|
label: ReactNode;
|
|
5
7
|
hint?: ReactNode;
|
|
@@ -5,6 +5,8 @@ export interface SelectOption {
|
|
|
5
5
|
disabled?: boolean;
|
|
6
6
|
}
|
|
7
7
|
export interface SelectProps extends SelectHTMLAttributes<HTMLSelectElement> {
|
|
8
|
+
/** Keeps the label for screen readers only, e.g. for a field inside a table cell. */
|
|
9
|
+
hideLabel?: boolean;
|
|
8
10
|
label: ReactNode;
|
|
9
11
|
options: SelectOption[];
|
|
10
12
|
/** Shown as a disabled first option. */
|
|
@@ -13,8 +13,10 @@ export interface TypeaheadProps extends Omit<InputHTMLAttributes<HTMLInputElemen
|
|
|
13
13
|
error?: ReactNode;
|
|
14
14
|
/** Locale for matching without case. Default "pt-BR". */
|
|
15
15
|
locale?: string;
|
|
16
|
+
/** Keeps the label for screen readers only, e.g. for a field inside a table cell. */
|
|
17
|
+
hideLabel?: boolean;
|
|
16
18
|
}
|
|
17
19
|
/** The suggestions that contain the text, those that start with it first. */
|
|
18
20
|
export declare function matchSuggestions(suggestions: string[], text: string, locale?: string, max?: number): string[];
|
|
19
21
|
/** A text field that suggests values as you type, in a glass list. Free text is still allowed. */
|
|
20
|
-
export declare function Typeahead({ label, value, defaultValue, onChange, suggestions, maxSuggestions, hint, error, locale, id, className, disabled, ...rest }: TypeaheadProps): import("react").JSX.Element;
|
|
22
|
+
export declare function Typeahead({ label, value, defaultValue, onChange, suggestions, maxSuggestions, hint, error, locale, hideLabel, id, className, disabled, ...rest }: TypeaheadProps): import("react").JSX.Element;
|