@scripso-homepad/ui 0.4.3 → 0.4.4
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.cjs +3 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Select.tsx +5 -2
- package/src/theme/select.ts +0 -2
package/dist/index.d.cts
CHANGED
|
@@ -63,6 +63,7 @@ interface SelectBaseProps {
|
|
|
63
63
|
invalid?: boolean;
|
|
64
64
|
hint?: string;
|
|
65
65
|
containerStyle?: StyleProp<ViewStyle>;
|
|
66
|
+
fieldStyle?: StyleProp<ViewStyle>;
|
|
66
67
|
className?: string;
|
|
67
68
|
fieldClassName?: string;
|
|
68
69
|
menuClassName?: string;
|
|
@@ -81,7 +82,7 @@ interface MultipleSelectProps extends SelectBaseProps {
|
|
|
81
82
|
onValueChange?: (value: string[]) => void;
|
|
82
83
|
}
|
|
83
84
|
type SelectProps = SingleSelectProps | MultipleSelectProps;
|
|
84
|
-
declare function Select({ label, placeholder, value, onValueChange, options, leftIcon, multiple, disabled, error, invalid, hint, containerStyle, className, fieldClassName, menuClassName, labelClassName, errorClassName, hintClassName, }: SelectProps): react.JSX.Element;
|
|
85
|
+
declare function Select({ label, placeholder, value, onValueChange, options, leftIcon, multiple, disabled, error, invalid, hint, containerStyle, fieldStyle, className, fieldClassName, menuClassName, labelClassName, errorClassName, hintClassName, }: SelectProps): react.JSX.Element;
|
|
85
86
|
|
|
86
87
|
interface PhoneInputProps extends Omit<TextInputProps, "style"> {
|
|
87
88
|
label?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -63,6 +63,7 @@ interface SelectBaseProps {
|
|
|
63
63
|
invalid?: boolean;
|
|
64
64
|
hint?: string;
|
|
65
65
|
containerStyle?: StyleProp<ViewStyle>;
|
|
66
|
+
fieldStyle?: StyleProp<ViewStyle>;
|
|
66
67
|
className?: string;
|
|
67
68
|
fieldClassName?: string;
|
|
68
69
|
menuClassName?: string;
|
|
@@ -81,7 +82,7 @@ interface MultipleSelectProps extends SelectBaseProps {
|
|
|
81
82
|
onValueChange?: (value: string[]) => void;
|
|
82
83
|
}
|
|
83
84
|
type SelectProps = SingleSelectProps | MultipleSelectProps;
|
|
84
|
-
declare function Select({ label, placeholder, value, onValueChange, options, leftIcon, multiple, disabled, error, invalid, hint, containerStyle, className, fieldClassName, menuClassName, labelClassName, errorClassName, hintClassName, }: SelectProps): react.JSX.Element;
|
|
85
|
+
declare function Select({ label, placeholder, value, onValueChange, options, leftIcon, multiple, disabled, error, invalid, hint, containerStyle, fieldStyle, className, fieldClassName, menuClassName, labelClassName, errorClassName, hintClassName, }: SelectProps): react.JSX.Element;
|
|
85
86
|
|
|
86
87
|
interface PhoneInputProps extends Omit<TextInputProps, "style"> {
|
|
87
88
|
label?: string;
|
package/dist/index.js
CHANGED
|
@@ -335,8 +335,6 @@ var selectFieldMetrics = StyleSheet.create({
|
|
|
335
335
|
flexDirection: "row",
|
|
336
336
|
alignItems: "center",
|
|
337
337
|
height: SELECT_HEIGHT,
|
|
338
|
-
minHeight: SELECT_HEIGHT,
|
|
339
|
-
maxHeight: SELECT_HEIGHT,
|
|
340
338
|
borderRadius: radii.lg,
|
|
341
339
|
padding: SELECT_PADDING,
|
|
342
340
|
gap: SELECT_INNER_GAP,
|
|
@@ -573,6 +571,7 @@ function Select({
|
|
|
573
571
|
invalid,
|
|
574
572
|
hint,
|
|
575
573
|
containerStyle,
|
|
574
|
+
fieldStyle,
|
|
576
575
|
className,
|
|
577
576
|
fieldClassName,
|
|
578
577
|
menuClassName,
|
|
@@ -603,7 +602,7 @@ function Select({
|
|
|
603
602
|
toValue: open ? 1 : 0,
|
|
604
603
|
duration: SELECT_CHEVRON_ROTATION_MS,
|
|
605
604
|
easing: Easing.out(Easing.ease),
|
|
606
|
-
useNativeDriver:
|
|
605
|
+
useNativeDriver: Platform.OS !== "web"
|
|
607
606
|
}).start();
|
|
608
607
|
}, [chevronRotation, open]);
|
|
609
608
|
const chevronRotate = chevronRotation.interpolate({
|
|
@@ -733,7 +732,7 @@ function Select({
|
|
|
733
732
|
accessibilityState: { disabled, expanded: open },
|
|
734
733
|
disabled,
|
|
735
734
|
onPress: open ? closeMenu : openMenu,
|
|
736
|
-
style: [selectFieldMetrics.container, fieldStyles.container],
|
|
735
|
+
style: [selectFieldMetrics.container, fieldStyles.container, fieldStyle],
|
|
737
736
|
children: [
|
|
738
737
|
leftIcon ? /* @__PURE__ */ jsx(View, { style: styles2.iconSlot, children: renderSelectIcon(leftIcon, fieldStyles.icon) }) : null,
|
|
739
738
|
/* @__PURE__ */ jsx(
|