@scripso-homepad/ui 0.4.28 → 0.4.30
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 +10 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -2
- package/dist/index.d.ts +8 -2
- package/dist/index.js +10 -5
- package/dist/index.js.map +1 -1
- package/dist/web/index.cjs +23 -6
- package/dist/web/index.cjs.map +1 -1
- package/dist/web/index.d.cts +3 -1
- package/dist/web/index.d.ts +3 -1
- package/dist/web/index.js +23 -6
- package/dist/web/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/CountryCodeSelector.tsx +9 -3
- package/src/components/PhoneInput.tsx +6 -0
- package/src/web/components/ConfirmModal.tsx +1 -1
- package/src/web/components/Drawer.tsx +25 -3
- package/src/web/layout/AppHeader.tsx +5 -0
- package/src/web/layout/SidebarNavItem.tsx +3 -1
package/dist/index.d.cts
CHANGED
|
@@ -101,6 +101,8 @@ interface PhoneInputProps extends Omit<TextInputProps, "style"> {
|
|
|
101
101
|
onCountryCodeChange?: (countryCode: string) => void;
|
|
102
102
|
error?: string;
|
|
103
103
|
hint?: string;
|
|
104
|
+
/** Outer field height for country trigger + national number. Defaults to shared input height. */
|
|
105
|
+
height?: number;
|
|
104
106
|
containerStyle?: StyleProp<ViewStyle>;
|
|
105
107
|
style?: StyleProp<TextStyle>;
|
|
106
108
|
className?: string;
|
|
@@ -111,7 +113,7 @@ interface PhoneInputProps extends Omit<TextInputProps, "style"> {
|
|
|
111
113
|
errorClassName?: string;
|
|
112
114
|
hintClassName?: string;
|
|
113
115
|
}
|
|
114
|
-
declare function PhoneInput({ label, countryCode, onCountryCodeChange, error, hint, containerStyle, style, className, labelClassName, labelStyles, inputClassName, errorClassName, hintClassName, editable, onFocus, onBlur, onChangeText, ...props }: PhoneInputProps): react.JSX.Element;
|
|
116
|
+
declare function PhoneInput({ label, countryCode, onCountryCodeChange, error, hint, height, containerStyle, style, className, labelClassName, labelStyles, inputClassName, errorClassName, hintClassName, editable, onFocus, onBlur, onChangeText, ...props }: PhoneInputProps): react.JSX.Element;
|
|
115
117
|
|
|
116
118
|
type Country = {
|
|
117
119
|
code: string;
|
|
@@ -128,10 +130,14 @@ interface CountryCodeSelectorProps {
|
|
|
128
130
|
/** Country list (defaults to built-in list). */
|
|
129
131
|
options?: Country[];
|
|
130
132
|
disabled?: boolean;
|
|
133
|
+
/** Outer trigger height. Defaults to shared input height. */
|
|
134
|
+
height?: number;
|
|
135
|
+
/** Trigger border color. Defaults to shared input border token. */
|
|
136
|
+
borderColor?: string;
|
|
131
137
|
style?: StyleProp<ViewStyle>;
|
|
132
138
|
className?: string;
|
|
133
139
|
}
|
|
134
|
-
declare function CountryCodeSelector({ value, onValueChange, options, disabled, style, className, }: CountryCodeSelectorProps): react.JSX.Element;
|
|
140
|
+
declare function CountryCodeSelector({ value, onValueChange, options, disabled, height, borderColor, style, className, }: CountryCodeSelectorProps): react.JSX.Element;
|
|
135
141
|
|
|
136
142
|
type CountryFlagProps = {
|
|
137
143
|
code: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -101,6 +101,8 @@ interface PhoneInputProps extends Omit<TextInputProps, "style"> {
|
|
|
101
101
|
onCountryCodeChange?: (countryCode: string) => void;
|
|
102
102
|
error?: string;
|
|
103
103
|
hint?: string;
|
|
104
|
+
/** Outer field height for country trigger + national number. Defaults to shared input height. */
|
|
105
|
+
height?: number;
|
|
104
106
|
containerStyle?: StyleProp<ViewStyle>;
|
|
105
107
|
style?: StyleProp<TextStyle>;
|
|
106
108
|
className?: string;
|
|
@@ -111,7 +113,7 @@ interface PhoneInputProps extends Omit<TextInputProps, "style"> {
|
|
|
111
113
|
errorClassName?: string;
|
|
112
114
|
hintClassName?: string;
|
|
113
115
|
}
|
|
114
|
-
declare function PhoneInput({ label, countryCode, onCountryCodeChange, error, hint, containerStyle, style, className, labelClassName, labelStyles, inputClassName, errorClassName, hintClassName, editable, onFocus, onBlur, onChangeText, ...props }: PhoneInputProps): react.JSX.Element;
|
|
116
|
+
declare function PhoneInput({ label, countryCode, onCountryCodeChange, error, hint, height, containerStyle, style, className, labelClassName, labelStyles, inputClassName, errorClassName, hintClassName, editable, onFocus, onBlur, onChangeText, ...props }: PhoneInputProps): react.JSX.Element;
|
|
115
117
|
|
|
116
118
|
type Country = {
|
|
117
119
|
code: string;
|
|
@@ -128,10 +130,14 @@ interface CountryCodeSelectorProps {
|
|
|
128
130
|
/** Country list (defaults to built-in list). */
|
|
129
131
|
options?: Country[];
|
|
130
132
|
disabled?: boolean;
|
|
133
|
+
/** Outer trigger height. Defaults to shared input height. */
|
|
134
|
+
height?: number;
|
|
135
|
+
/** Trigger border color. Defaults to shared input border token. */
|
|
136
|
+
borderColor?: string;
|
|
131
137
|
style?: StyleProp<ViewStyle>;
|
|
132
138
|
className?: string;
|
|
133
139
|
}
|
|
134
|
-
declare function CountryCodeSelector({ value, onValueChange, options, disabled, style, className, }: CountryCodeSelectorProps): react.JSX.Element;
|
|
140
|
+
declare function CountryCodeSelector({ value, onValueChange, options, disabled, height, borderColor, style, className, }: CountryCodeSelectorProps): react.JSX.Element;
|
|
135
141
|
|
|
136
142
|
type CountryFlagProps = {
|
|
137
143
|
code: string;
|
package/dist/index.js
CHANGED
|
@@ -945,6 +945,8 @@ function CountryCodeSelector({
|
|
|
945
945
|
onValueChange,
|
|
946
946
|
options = countries,
|
|
947
947
|
disabled = false,
|
|
948
|
+
height = TRIGGER_HEIGHT,
|
|
949
|
+
borderColor = colors.stormGray50,
|
|
948
950
|
style,
|
|
949
951
|
className
|
|
950
952
|
}) {
|
|
@@ -970,8 +972,8 @@ function CountryCodeSelector({
|
|
|
970
972
|
}
|
|
971
973
|
function handleOpen() {
|
|
972
974
|
if (disabled) return;
|
|
973
|
-
triggerRef.current?.measureInWindow((x, y, width,
|
|
974
|
-
setAnchor({ x, y, width, height });
|
|
975
|
+
triggerRef.current?.measureInWindow((x, y, width, height2) => {
|
|
976
|
+
setAnchor({ x, y, width, height: height2 });
|
|
975
977
|
setOpen(true);
|
|
976
978
|
});
|
|
977
979
|
}
|
|
@@ -1024,6 +1026,7 @@ function CountryCodeSelector({
|
|
|
1024
1026
|
onPress: handleOpen,
|
|
1025
1027
|
style: [
|
|
1026
1028
|
styles3.trigger,
|
|
1029
|
+
{ height, borderColor },
|
|
1027
1030
|
disabled ? styles3.triggerDisabled : styles3.triggerEnabled,
|
|
1028
1031
|
Platform.OS === "web" ? styles3.triggerWeb : null
|
|
1029
1032
|
],
|
|
@@ -1073,15 +1076,14 @@ var styles3 = StyleSheet.create({
|
|
|
1073
1076
|
height: TRIGGER_HEIGHT,
|
|
1074
1077
|
borderRadius: radii.lg,
|
|
1075
1078
|
borderWidth: 1,
|
|
1076
|
-
|
|
1079
|
+
paddingHorizontal: spacing.lg,
|
|
1080
|
+
paddingVertical: 0,
|
|
1077
1081
|
gap: spacing.sm
|
|
1078
1082
|
},
|
|
1079
1083
|
triggerEnabled: {
|
|
1080
|
-
borderColor: colors.stormGray50,
|
|
1081
1084
|
backgroundColor: colors.white
|
|
1082
1085
|
},
|
|
1083
1086
|
triggerDisabled: {
|
|
1084
|
-
borderColor: colors.stormGray50,
|
|
1085
1087
|
backgroundColor: colors.stormGray50
|
|
1086
1088
|
},
|
|
1087
1089
|
triggerWeb: {
|
|
@@ -1152,6 +1154,7 @@ function PhoneInput({
|
|
|
1152
1154
|
onCountryCodeChange,
|
|
1153
1155
|
error,
|
|
1154
1156
|
hint,
|
|
1157
|
+
height = INPUT_HEIGHT,
|
|
1155
1158
|
containerStyle,
|
|
1156
1159
|
style,
|
|
1157
1160
|
className,
|
|
@@ -1209,6 +1212,7 @@ function PhoneInput({
|
|
|
1209
1212
|
value: countryCode,
|
|
1210
1213
|
onValueChange: onCountryCodeChange,
|
|
1211
1214
|
disabled: isDisabled,
|
|
1215
|
+
height,
|
|
1212
1216
|
style: styles4.countrySelector
|
|
1213
1217
|
}
|
|
1214
1218
|
) }),
|
|
@@ -1218,6 +1222,7 @@ function PhoneInput({
|
|
|
1218
1222
|
style: [
|
|
1219
1223
|
inputFieldMetrics.containerBase,
|
|
1220
1224
|
inputFieldMetrics.container,
|
|
1225
|
+
{ height },
|
|
1221
1226
|
phoneFieldStyles.container,
|
|
1222
1227
|
styles4.phoneField
|
|
1223
1228
|
],
|