@agregio-solutions/design-system 1.92.1 → 1.93.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.
@@ -0,0 +1,101 @@
1
+ import { default as React } from 'react';
2
+ import { Props as FormGroupWrapperProps } from '../../internal-components/FormGroupWrapper/FormGroupWrapper';
3
+ export type TimeUnit = "hours" | "minutes" | "seconds";
4
+ export type TimePickerValue = {
5
+ hours?: string;
6
+ minutes?: string;
7
+ seconds?: string;
8
+ };
9
+ export type Props = Omit<FormGroupWrapperProps, "children" | "description" | "className" | "style" | "characterCounter" | "htmlForId"> & {
10
+ /**
11
+ * The controlled value: an object with optional `hours`, `minutes`, `seconds` keys, each as a 2-digit padded
12
+ * string (e.g. `{ hours: "08", minutes: "34" }`). Use `null` for the initial empty state before any selection.
13
+ */
14
+ value: TimePickerValue | null;
15
+ /**
16
+ * Handler called every time a unit changes. Emits an object containing only the units that have a value.
17
+ */
18
+ onChange: (value: TimePickerValue) => void;
19
+ /**
20
+ * Units displayed and their visual order. Defaults to ["hours","minutes","seconds"].
21
+ */
22
+ units?: Array<TimeUnit>;
23
+ /**
24
+ * Step for the minutes options (1..30). Default 1.
25
+ */
26
+ minutesStep?: number;
27
+ /**
28
+ * Step for the seconds options (1..30). Default 1.
29
+ */
30
+ secondsStep?: number;
31
+ /**
32
+ * Whether the input is disabled.
33
+ */
34
+ isDisabled?: boolean;
35
+ /**
36
+ * Whether the input can be selected but not changed by the user.
37
+ * In read-only mode, the value is rendered as plain formatted text.
38
+ */
39
+ isReadOnly?: boolean;
40
+ /**
41
+ * Specifies the nature of the TimePicker (mainly to change the trigger border color and helperText color).
42
+ * If you do not pass a nature prop, the component will automatically set the nature based on the presence of success/error messages.
43
+ */
44
+ nature?: "default" | "negative" | "positive" | "warning";
45
+ /**
46
+ * Props to pass to the wrapper div (for example, style or className).
47
+ */
48
+ wrapperProps?: React.HTMLProps<HTMLDivElement>;
49
+ /**
50
+ * Accessible label used as a prefix for each Select trigger (e.g. "<aria-label> : Hours").
51
+ * Required when `label` is a ReactNode rather than a string.
52
+ */
53
+ "aria-label"?: string;
54
+ };
55
+ declare const TimePicker: React.ForwardRefExoticComponent<Omit<FormGroupWrapperProps, "className" | "style" | "children" | "description" | "htmlForId" | "characterCounter"> & {
56
+ /**
57
+ * The controlled value: an object with optional `hours`, `minutes`, `seconds` keys, each as a 2-digit padded
58
+ * string (e.g. `{ hours: "08", minutes: "34" }`). Use `null` for the initial empty state before any selection.
59
+ */
60
+ value: TimePickerValue | null;
61
+ /**
62
+ * Handler called every time a unit changes. Emits an object containing only the units that have a value.
63
+ */
64
+ onChange: (value: TimePickerValue) => void;
65
+ /**
66
+ * Units displayed and their visual order. Defaults to ["hours","minutes","seconds"].
67
+ */
68
+ units?: Array<TimeUnit>;
69
+ /**
70
+ * Step for the minutes options (1..30). Default 1.
71
+ */
72
+ minutesStep?: number;
73
+ /**
74
+ * Step for the seconds options (1..30). Default 1.
75
+ */
76
+ secondsStep?: number;
77
+ /**
78
+ * Whether the input is disabled.
79
+ */
80
+ isDisabled?: boolean;
81
+ /**
82
+ * Whether the input can be selected but not changed by the user.
83
+ * In read-only mode, the value is rendered as plain formatted text.
84
+ */
85
+ isReadOnly?: boolean;
86
+ /**
87
+ * Specifies the nature of the TimePicker (mainly to change the trigger border color and helperText color).
88
+ * If you do not pass a nature prop, the component will automatically set the nature based on the presence of success/error messages.
89
+ */
90
+ nature?: "default" | "negative" | "positive" | "warning";
91
+ /**
92
+ * Props to pass to the wrapper div (for example, style or className).
93
+ */
94
+ wrapperProps?: React.HTMLProps<HTMLDivElement>;
95
+ /**
96
+ * Accessible label used as a prefix for each Select trigger (e.g. "<aria-label> : Hours").
97
+ * Required when `label` is a ReactNode rather than a string.
98
+ */
99
+ "aria-label"?: string;
100
+ } & React.RefAttributes<HTMLDivElement>>;
101
+ export default TimePicker;