@scripso-homepad/ui 0.4.3 → 0.4.5
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 -7
- 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 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Button.tsx +0 -3
- 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
|
@@ -57,7 +57,6 @@ var sizeConfig = {
|
|
|
57
57
|
paddingBottom: 8,
|
|
58
58
|
paddingLeft: 24,
|
|
59
59
|
paddingHorizontalCentered: 24,
|
|
60
|
-
minHeight: 52,
|
|
61
60
|
text: buttonTypography.lg,
|
|
62
61
|
iconContainerSize: 36,
|
|
63
62
|
iconContainerRadius: 12,
|
|
@@ -71,7 +70,6 @@ var sizeConfig = {
|
|
|
71
70
|
paddingBottom: 8,
|
|
72
71
|
paddingLeft: 16,
|
|
73
72
|
paddingHorizontalCentered: 16,
|
|
74
|
-
minHeight: 48,
|
|
75
73
|
text: buttonTypography.sm,
|
|
76
74
|
iconContainerSize: 32,
|
|
77
75
|
iconContainerRadius: 8,
|
|
@@ -109,7 +107,6 @@ function Button({
|
|
|
109
107
|
{
|
|
110
108
|
borderRadius: metrics.borderRadius,
|
|
111
109
|
backgroundColor: preset.backgroundColor,
|
|
112
|
-
minHeight: metrics.minHeight,
|
|
113
110
|
paddingTop: metrics.paddingTop,
|
|
114
111
|
paddingBottom: metrics.paddingBottom,
|
|
115
112
|
paddingLeft: hasIcon ? metrics.paddingLeft : metrics.paddingHorizontalCentered,
|
|
@@ -335,8 +332,6 @@ var selectFieldMetrics = StyleSheet.create({
|
|
|
335
332
|
flexDirection: "row",
|
|
336
333
|
alignItems: "center",
|
|
337
334
|
height: SELECT_HEIGHT,
|
|
338
|
-
minHeight: SELECT_HEIGHT,
|
|
339
|
-
maxHeight: SELECT_HEIGHT,
|
|
340
335
|
borderRadius: radii.lg,
|
|
341
336
|
padding: SELECT_PADDING,
|
|
342
337
|
gap: SELECT_INNER_GAP,
|
|
@@ -573,6 +568,7 @@ function Select({
|
|
|
573
568
|
invalid,
|
|
574
569
|
hint,
|
|
575
570
|
containerStyle,
|
|
571
|
+
fieldStyle,
|
|
576
572
|
className,
|
|
577
573
|
fieldClassName,
|
|
578
574
|
menuClassName,
|
|
@@ -603,7 +599,7 @@ function Select({
|
|
|
603
599
|
toValue: open ? 1 : 0,
|
|
604
600
|
duration: SELECT_CHEVRON_ROTATION_MS,
|
|
605
601
|
easing: Easing.out(Easing.ease),
|
|
606
|
-
useNativeDriver:
|
|
602
|
+
useNativeDriver: Platform.OS !== "web"
|
|
607
603
|
}).start();
|
|
608
604
|
}, [chevronRotation, open]);
|
|
609
605
|
const chevronRotate = chevronRotation.interpolate({
|
|
@@ -733,7 +729,7 @@ function Select({
|
|
|
733
729
|
accessibilityState: { disabled, expanded: open },
|
|
734
730
|
disabled,
|
|
735
731
|
onPress: open ? closeMenu : openMenu,
|
|
736
|
-
style: [selectFieldMetrics.container, fieldStyles.container],
|
|
732
|
+
style: [selectFieldMetrics.container, fieldStyles.container, fieldStyle],
|
|
737
733
|
children: [
|
|
738
734
|
leftIcon ? /* @__PURE__ */ jsx(View, { style: styles2.iconSlot, children: renderSelectIcon(leftIcon, fieldStyles.icon) }) : null,
|
|
739
735
|
/* @__PURE__ */ jsx(
|