@ultraviolet/ui 1.32.0 → 1.32.1
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/index.d.ts
CHANGED
|
@@ -1607,7 +1607,7 @@ type DateInputProps = Pick<ReactDatePickerProps<string, boolean>, 'locale' | 'on
|
|
|
1607
1607
|
excludeDates?: Date[];
|
|
1608
1608
|
id?: string;
|
|
1609
1609
|
labelDescription?: ReactNode;
|
|
1610
|
-
success?: string;
|
|
1610
|
+
success?: string | boolean;
|
|
1611
1611
|
helper?: string;
|
|
1612
1612
|
size?: 'small' | 'medium' | 'large';
|
|
1613
1613
|
readOnly?: boolean;
|
|
@@ -2065,7 +2065,7 @@ declare const NumberInputV2: react.ForwardRefExoticComponent<{
|
|
|
2065
2065
|
*/
|
|
2066
2066
|
labelDescription?: ReactNode;
|
|
2067
2067
|
error?: string | undefined;
|
|
2068
|
-
success?: string | undefined;
|
|
2068
|
+
success?: string | boolean | undefined;
|
|
2069
2069
|
helper?: ReactNode;
|
|
2070
2070
|
value?: string | number | undefined;
|
|
2071
2071
|
} & Pick<InputHTMLAttributes<HTMLInputElement>, "autoFocus" | "id" | "aria-label" | "onFocus" | "onBlur" | "onChange" | "max" | "min" | "name" | "disabled" | "step" | "placeholder" | "readOnly" | "required"> & react.RefAttributes<HTMLInputElement>>;
|
|
@@ -3021,7 +3021,6 @@ declare const TextInputV2: react.ForwardRefExoticComponent<{
|
|
|
3021
3021
|
'data-testid'?: string | undefined;
|
|
3022
3022
|
error?: string | undefined;
|
|
3023
3023
|
helper?: ReactNode;
|
|
3024
|
-
iconName?: ComponentProps<typeof Icon>['name'];
|
|
3025
3024
|
label?: string | undefined;
|
|
3026
3025
|
labelDescription?: ReactNode;
|
|
3027
3026
|
loading?: boolean | undefined;
|
|
@@ -3031,13 +3030,12 @@ declare const TextInputV2: react.ForwardRefExoticComponent<{
|
|
|
3031
3030
|
onChange?: ((newValue: string) => void) | undefined;
|
|
3032
3031
|
prefix?: ReactNode;
|
|
3033
3032
|
size?: "large" | "small" | "medium" | undefined;
|
|
3034
|
-
success?: string | undefined;
|
|
3033
|
+
success?: string | boolean | undefined;
|
|
3035
3034
|
suffix?: ReactNode;
|
|
3036
|
-
tabIndex?: number | undefined;
|
|
3037
3035
|
tooltip?: string | undefined;
|
|
3038
3036
|
type?: "text" | "email" | "password" | "url" | undefined;
|
|
3039
3037
|
value?: string | undefined;
|
|
3040
|
-
} & Pick<InputHTMLAttributes<HTMLInputElement>, "autoFocus" | "id" | "aria-label" | "onFocus" | "onBlur" | "name" | "disabled" | "placeholder" | "readOnly" | "required"> & react.RefAttributes<HTMLInputElement>>;
|
|
3038
|
+
} & Pick<InputHTMLAttributes<HTMLInputElement>, "autoFocus" | "id" | "tabIndex" | "aria-label" | "aria-labelledby" | "onFocus" | "onBlur" | "name" | "disabled" | "placeholder" | "readOnly" | "required"> & react.RefAttributes<HTMLInputElement>>;
|
|
3041
3039
|
|
|
3042
3040
|
declare const schedules: {
|
|
3043
3041
|
half: readonly ["00:00", "00:30", "01:00", "01:30", "02:00", "02:30", "03:00", "03:30", "04:00", "04:30", "05:00", "05:30", "06:00", "06:30", "07:00", "07:30", "08:00", "08:30", "09:00", "09:30", "10:00", "10:30", "11:00", "11:30", "12:00", "12:30", "13:00", "13:30", "14:00", "14:30", "15:00", "15:30", "16:00", "16:30", "17:00", "17:30", "18:00", "18:30", "19:00", "19:30", "20:00", "20:30", "21:00", "21:30", "22:00", "22:30", "23:00", "23:30"];
|
|
@@ -285,14 +285,14 @@ const NumberInputV2 = /*#__PURE__*/forwardRef(({
|
|
|
285
285
|
})]
|
|
286
286
|
})
|
|
287
287
|
})
|
|
288
|
-
}), error || success || helper ? jsx(Text, {
|
|
288
|
+
}), error || typeof success === 'string' || typeof helper === 'string' ? jsx(Text, {
|
|
289
289
|
variant: "caption",
|
|
290
290
|
as: "span",
|
|
291
291
|
prominence: !error && !success ? 'weak' : undefined,
|
|
292
292
|
sentiment: helperSentiment,
|
|
293
293
|
disabled: disabled || readOnly,
|
|
294
294
|
children: error || success || helper
|
|
295
|
-
}) : null]
|
|
295
|
+
}) : null, !error && !success && typeof helper !== 'string' && helper ? helper : null]
|
|
296
296
|
});
|
|
297
297
|
});
|
|
298
298
|
|
|
@@ -107,12 +107,13 @@ const TextInputV2 = /*#__PURE__*/forwardRef(({
|
|
|
107
107
|
type = 'text',
|
|
108
108
|
prefix,
|
|
109
109
|
suffix,
|
|
110
|
-
iconName,
|
|
111
110
|
size = 'large',
|
|
112
111
|
loading,
|
|
113
112
|
onRandomize,
|
|
114
113
|
minLength,
|
|
115
|
-
maxLength
|
|
114
|
+
maxLength,
|
|
115
|
+
'aria-labelledby': ariaLabelledBy,
|
|
116
|
+
'aria-label': ariaLabel
|
|
116
117
|
}, ref) => {
|
|
117
118
|
const localId = useId();
|
|
118
119
|
const [hasFocus, setHasFocus] = useState(false);
|
|
@@ -171,9 +172,6 @@ const TextInputV2 = /*#__PURE__*/forwardRef(({
|
|
|
171
172
|
disabled: disabled,
|
|
172
173
|
children: prefix
|
|
173
174
|
}) : prefix
|
|
174
|
-
}) : null, iconName ? jsx(Icon, {
|
|
175
|
-
name: iconName,
|
|
176
|
-
size: 16
|
|
177
175
|
}) : null, jsx(StyledInput, {
|
|
178
176
|
type: computedType,
|
|
179
177
|
"aria-invalid": !!error,
|
|
@@ -202,7 +200,9 @@ const TextInputV2 = /*#__PURE__*/forwardRef(({
|
|
|
202
200
|
},
|
|
203
201
|
readOnly: readOnly,
|
|
204
202
|
minLength: minLength,
|
|
205
|
-
maxLength: maxLength
|
|
203
|
+
maxLength: maxLength,
|
|
204
|
+
"aria-labelledby": ariaLabelledBy,
|
|
205
|
+
"aria-label": ariaLabel
|
|
206
206
|
}), success || error || loading || computedClearable ? jsxs(StateStack, {
|
|
207
207
|
direction: "row",
|
|
208
208
|
gap: 1,
|
|
@@ -270,7 +270,7 @@ const TextInputV2 = /*#__PURE__*/forwardRef(({
|
|
|
270
270
|
}) : null]
|
|
271
271
|
})
|
|
272
272
|
})
|
|
273
|
-
}), error || success || typeof helper === 'string' ? jsx(Text, {
|
|
273
|
+
}), error || typeof success === 'string' || typeof helper === 'string' ? jsx(Text, {
|
|
274
274
|
as: "p",
|
|
275
275
|
variant: "caption",
|
|
276
276
|
sentiment: sentiment,
|