@vellira-ui/react-native 2.62.4 → 2.64.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.
- package/dist/index.js +14 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3215,7 +3215,7 @@ const createStyles$8 = (_theme) => StyleSheet.create({
|
|
|
3215
3215
|
});
|
|
3216
3216
|
//#endregion
|
|
3217
3217
|
//#region src/components/RadioGroup/Root/RadioGroupRoot.tsx
|
|
3218
|
-
const RadioGroupRoot = forwardRef(({ value, defaultValue = "", onValueChange, disabled = false, required = false, size = "md", color = "primary", orientation = "vertical", label, description, error, children, style, itemsStyle, labelStyle, descriptionStyle, errorStyle, accessibilityLabel, accessibilityHint, ...rest }, ref) => {
|
|
3218
|
+
const RadioGroupRoot = forwardRef(({ value, defaultValue = "", onValueChange, disabled = false, required = false, invalid = false, size = "md", color = "primary", orientation = "vertical", label, description, error, children, style, itemsStyle, labelStyle, descriptionStyle, errorStyle, accessibilityLabel, accessibilityHint, ...rest }, ref) => {
|
|
3219
3219
|
const { theme } = useTheme();
|
|
3220
3220
|
const styles = useThemeStyles(createStyles$8);
|
|
3221
3221
|
const radioGroupSizeTokens = theme.components.radioGroup.size[size];
|
|
@@ -3224,11 +3224,12 @@ const RadioGroupRoot = forwardRef(({ value, defaultValue = "", onValueChange, di
|
|
|
3224
3224
|
defaultValue,
|
|
3225
3225
|
onChange: onValueChange
|
|
3226
3226
|
});
|
|
3227
|
-
const
|
|
3227
|
+
const isInvalid = invalid || Boolean(error);
|
|
3228
3228
|
const resolvedAccessibilityLabel = accessibilityLabel ?? (typeof label === "string" ? label : void 0);
|
|
3229
3229
|
const resolvedAccessibilityHint = (accessibilityHint ?? [
|
|
3230
3230
|
typeof description === "string" ? description : void 0,
|
|
3231
3231
|
required ? "Required." : void 0,
|
|
3232
|
+
isInvalid && !error ? "Invalid." : void 0,
|
|
3232
3233
|
typeof error === "string" ? error : void 0
|
|
3233
3234
|
].filter(Boolean).join(" ")) || void 0;
|
|
3234
3235
|
return /* @__PURE__ */ jsx(FormField, {
|
|
@@ -3250,7 +3251,7 @@ const RadioGroupRoot = forwardRef(({ value, defaultValue = "", onValueChange, di
|
|
|
3250
3251
|
value: selectedValue,
|
|
3251
3252
|
disabled,
|
|
3252
3253
|
required,
|
|
3253
|
-
invalid,
|
|
3254
|
+
invalid: isInvalid,
|
|
3254
3255
|
size,
|
|
3255
3256
|
color,
|
|
3256
3257
|
onValueChange: setSelectedValue
|
|
@@ -6576,8 +6577,9 @@ const Checkbox = forwardRef(({ label, description, icon, indeterminateIcon, chec
|
|
|
6576
6577
|
const resolvedAccessibilityHint = [
|
|
6577
6578
|
accessibilityHint,
|
|
6578
6579
|
description,
|
|
6580
|
+
required ? "Required." : void 0,
|
|
6579
6581
|
error
|
|
6580
|
-
].filter(Boolean).join(" ");
|
|
6582
|
+
].filter((item) => Boolean(item)).join(" ");
|
|
6581
6583
|
const accessibilityChecked = indeterminate ? "mixed" : isChecked;
|
|
6582
6584
|
useEffect(() => {
|
|
6583
6585
|
devWarning(Boolean(resolvedAccessibilityLabel), "Checkbox: an accessible label must be provided through label or accessibilityLabel.");
|
|
@@ -6871,6 +6873,13 @@ const Input = forwardRef(({ label, description, value, defaultValue, onValueChan
|
|
|
6871
6873
|
const isInvalid = invalid || Boolean(error) || !hasOwnField && Boolean(field?.invalid);
|
|
6872
6874
|
const isDisabled = disabled || !hasOwnField && Boolean(field?.disabled);
|
|
6873
6875
|
const isRequired = required || !hasOwnField && Boolean(field?.required);
|
|
6876
|
+
const resolvedAccessibilityHint = [
|
|
6877
|
+
accessibilityHint,
|
|
6878
|
+
hasOwnField && typeof description === "string" ? description : void 0,
|
|
6879
|
+
isRequired ? "Required." : void 0,
|
|
6880
|
+
isInvalid ? "Invalid." : void 0,
|
|
6881
|
+
hasOwnField && typeof error === "string" ? error : void 0
|
|
6882
|
+
].filter((item) => Boolean(item)).join(" ");
|
|
6874
6883
|
const isReadOnly = readOnly || loading;
|
|
6875
6884
|
const showLoading = loading && !isDisabled;
|
|
6876
6885
|
const placeholderTextColor = isDisabled ? getDisabledPlaceholderTextColor(theme) : readOnly ? theme.components.input.readOnly.placeholder : inputState.placeholder;
|
|
@@ -6943,7 +6952,7 @@ const Input = forwardRef(({ label, description, value, defaultValue, onValueChan
|
|
|
6943
6952
|
testID,
|
|
6944
6953
|
placeholderTextColor,
|
|
6945
6954
|
accessibilityLabel: accessibilityLabel ?? label,
|
|
6946
|
-
accessibilityHint,
|
|
6955
|
+
accessibilityHint: resolvedAccessibilityHint || void 0,
|
|
6947
6956
|
accessibilityState: {
|
|
6948
6957
|
disabled: isDisabled,
|
|
6949
6958
|
busy: loading
|