@scripso-homepad/ui 0.4.13 → 0.4.14
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/README.md +2 -1
- package/dist/{chunk-WFMQYYH6.js → chunk-ANDWP4YU.js} +12 -3
- package/dist/chunk-ANDWP4YU.js.map +1 -0
- package/dist/index.cjs +51 -39
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.js +43 -40
- package/dist/index.js.map +1 -1
- package/dist/web/index.cjs +30 -10
- package/dist/web/index.cjs.map +1 -1
- package/dist/web/index.d.cts +7 -2
- package/dist/web/index.d.ts +7 -2
- package/dist/web/index.js +21 -10
- package/dist/web/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Input.tsx +8 -1
- package/src/components/PhoneInput.tsx +37 -34
- package/src/web/components/TableActionsMenu.tsx +25 -6
- package/src/web/layout/AppHeader.tsx +15 -11
- package/dist/chunk-WFMQYYH6.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -40,13 +40,15 @@ interface InputProps extends TextInputProps {
|
|
|
40
40
|
/** Styles merged into the bordered field container. */
|
|
41
41
|
fieldStyle?: StyleProp<ViewStyle>;
|
|
42
42
|
labelClassName?: string;
|
|
43
|
+
/** Styles merged into the field label. */
|
|
44
|
+
labelStyles?: StyleProp<TextStyle>;
|
|
43
45
|
inputClassName?: string;
|
|
44
46
|
errorClassName?: string;
|
|
45
47
|
hintClassName?: string;
|
|
46
48
|
/** When `secureTextEntry` is set, show a toggleable eye icon. Pass `false` to disable. */
|
|
47
49
|
showPasswordToggle?: boolean;
|
|
48
50
|
}
|
|
49
|
-
declare function Input({ label, leftIcon, rightIcon, error, invalid, hint, containerStyle, style, className, fieldClassName, fieldStyle, labelClassName, inputClassName, errorClassName, hintClassName, editable, secureTextEntry, showPasswordToggle, onFocus, onBlur, ...props }: InputProps): react.JSX.Element;
|
|
51
|
+
declare function Input({ label, leftIcon, rightIcon, error, invalid, hint, containerStyle, style, className, fieldClassName, fieldStyle, labelClassName, labelStyles, inputClassName, errorClassName, hintClassName, editable, secureTextEntry, showPasswordToggle, onFocus, onBlur, ...props }: InputProps): react.JSX.Element;
|
|
50
52
|
|
|
51
53
|
type SelectOption = {
|
|
52
54
|
value: string;
|
|
@@ -96,11 +98,13 @@ interface PhoneInputProps extends Omit<TextInputProps, "style"> {
|
|
|
96
98
|
style?: StyleProp<TextStyle>;
|
|
97
99
|
className?: string;
|
|
98
100
|
labelClassName?: string;
|
|
101
|
+
/** Styles merged into the field label. */
|
|
102
|
+
labelStyles?: StyleProp<TextStyle>;
|
|
99
103
|
inputClassName?: string;
|
|
100
104
|
errorClassName?: string;
|
|
101
105
|
hintClassName?: string;
|
|
102
106
|
}
|
|
103
|
-
declare function PhoneInput({ label, countryCode, onCountryCodeChange, error, hint, containerStyle, style, className, labelClassName, inputClassName, errorClassName, hintClassName, editable, onFocus, onBlur, ...props }: PhoneInputProps): react.JSX.Element;
|
|
107
|
+
declare function PhoneInput({ label, countryCode, onCountryCodeChange, error, hint, containerStyle, style, className, labelClassName, labelStyles, inputClassName, errorClassName, hintClassName, editable, onFocus, onBlur, ...props }: PhoneInputProps): react.JSX.Element;
|
|
104
108
|
|
|
105
109
|
type Country = {
|
|
106
110
|
code: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -40,13 +40,15 @@ interface InputProps extends TextInputProps {
|
|
|
40
40
|
/** Styles merged into the bordered field container. */
|
|
41
41
|
fieldStyle?: StyleProp<ViewStyle>;
|
|
42
42
|
labelClassName?: string;
|
|
43
|
+
/** Styles merged into the field label. */
|
|
44
|
+
labelStyles?: StyleProp<TextStyle>;
|
|
43
45
|
inputClassName?: string;
|
|
44
46
|
errorClassName?: string;
|
|
45
47
|
hintClassName?: string;
|
|
46
48
|
/** When `secureTextEntry` is set, show a toggleable eye icon. Pass `false` to disable. */
|
|
47
49
|
showPasswordToggle?: boolean;
|
|
48
50
|
}
|
|
49
|
-
declare function Input({ label, leftIcon, rightIcon, error, invalid, hint, containerStyle, style, className, fieldClassName, fieldStyle, labelClassName, inputClassName, errorClassName, hintClassName, editable, secureTextEntry, showPasswordToggle, onFocus, onBlur, ...props }: InputProps): react.JSX.Element;
|
|
51
|
+
declare function Input({ label, leftIcon, rightIcon, error, invalid, hint, containerStyle, style, className, fieldClassName, fieldStyle, labelClassName, labelStyles, inputClassName, errorClassName, hintClassName, editable, secureTextEntry, showPasswordToggle, onFocus, onBlur, ...props }: InputProps): react.JSX.Element;
|
|
50
52
|
|
|
51
53
|
type SelectOption = {
|
|
52
54
|
value: string;
|
|
@@ -96,11 +98,13 @@ interface PhoneInputProps extends Omit<TextInputProps, "style"> {
|
|
|
96
98
|
style?: StyleProp<TextStyle>;
|
|
97
99
|
className?: string;
|
|
98
100
|
labelClassName?: string;
|
|
101
|
+
/** Styles merged into the field label. */
|
|
102
|
+
labelStyles?: StyleProp<TextStyle>;
|
|
99
103
|
inputClassName?: string;
|
|
100
104
|
errorClassName?: string;
|
|
101
105
|
hintClassName?: string;
|
|
102
106
|
}
|
|
103
|
-
declare function PhoneInput({ label, countryCode, onCountryCodeChange, error, hint, containerStyle, style, className, labelClassName, inputClassName, errorClassName, hintClassName, editable, onFocus, onBlur, ...props }: PhoneInputProps): react.JSX.Element;
|
|
107
|
+
declare function PhoneInput({ label, countryCode, onCountryCodeChange, error, hint, containerStyle, style, className, labelClassName, labelStyles, inputClassName, errorClassName, hintClassName, editable, onFocus, onBlur, ...props }: PhoneInputProps): react.JSX.Element;
|
|
104
108
|
|
|
105
109
|
type Country = {
|
|
106
110
|
code: string;
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { spacing, colors, fontWeight, fontSize, fonts, radii, INPUT_ICON_GAP, useApplyWebClassName, resolveInputVisualState, Label, getInputFieldStyles, inputFieldMetrics } from './chunk-
|
|
2
|
-
export { Button, Input, Label, brand, buttonTypography, colors, emeraldGreen, fontSize, fontWeight, fonts, labelTypography, navy, radii, rubyRed, shadows, spacing, stormGray, typographyScale } from './chunk-
|
|
1
|
+
import { spacing, colors, fontWeight, fontSize, fonts, radii, INPUT_ICON_GAP, useApplyWebClassName, resolveInputVisualState, Label, getInputFieldStyles, inputFieldMetrics } from './chunk-ANDWP4YU.js';
|
|
2
|
+
export { Button, Input, Label, brand, buttonTypography, colors, emeraldGreen, fontSize, fontWeight, fonts, labelTypography, navy, radii, rubyRed, shadows, spacing, stormGray, typographyScale } from './chunk-ANDWP4YU.js';
|
|
3
3
|
import { createContext, useRef, useState, useMemo, useEffect, useLayoutEffect, useContext, isValidElement, cloneElement } from 'react';
|
|
4
4
|
import { Platform, StyleSheet, Animated, Easing, View, Pressable, Text, Modal, ScrollView, TextInput, Dimensions } from 'react-native';
|
|
5
5
|
import Svg2, { Path } from 'react-native-svg';
|
|
@@ -1093,6 +1093,7 @@ function PhoneInput({
|
|
|
1093
1093
|
style,
|
|
1094
1094
|
className,
|
|
1095
1095
|
labelClassName,
|
|
1096
|
+
labelStyles,
|
|
1096
1097
|
inputClassName,
|
|
1097
1098
|
errorClassName,
|
|
1098
1099
|
hintClassName,
|
|
@@ -1125,7 +1126,15 @@ function PhoneInput({
|
|
|
1125
1126
|
}
|
|
1126
1127
|
const helperMessage = error ?? hint;
|
|
1127
1128
|
return /* @__PURE__ */ jsxs(View, { ref: wrapperRef, style: [styles3.wrapper, containerStyle], children: [
|
|
1128
|
-
label ? /* @__PURE__ */ jsx(
|
|
1129
|
+
label ? /* @__PURE__ */ jsx(
|
|
1130
|
+
Label,
|
|
1131
|
+
{
|
|
1132
|
+
disabled: isDisabled,
|
|
1133
|
+
className: labelClassName,
|
|
1134
|
+
style: labelStyles,
|
|
1135
|
+
children: label
|
|
1136
|
+
}
|
|
1137
|
+
) : null,
|
|
1129
1138
|
/* @__PURE__ */ jsxs(View, { style: styles3.row, children: [
|
|
1130
1139
|
/* @__PURE__ */ jsx(
|
|
1131
1140
|
CountryCodeSelector,
|
|
@@ -1136,38 +1145,36 @@ function PhoneInput({
|
|
|
1136
1145
|
style: styles3.countrySelector
|
|
1137
1146
|
}
|
|
1138
1147
|
),
|
|
1139
|
-
/* @__PURE__ */
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
] })
|
|
1170
|
-
] })
|
|
1148
|
+
/* @__PURE__ */ jsx(View, { style: [phoneFieldStyles.outline, styles3.phoneOutline], children: /* @__PURE__ */ jsx(
|
|
1149
|
+
View,
|
|
1150
|
+
{
|
|
1151
|
+
style: [
|
|
1152
|
+
inputFieldMetrics.container,
|
|
1153
|
+
phoneFieldStyles.container,
|
|
1154
|
+
styles3.phoneField
|
|
1155
|
+
],
|
|
1156
|
+
children: /* @__PURE__ */ jsx(
|
|
1157
|
+
TextInput,
|
|
1158
|
+
{
|
|
1159
|
+
ref: inputRef,
|
|
1160
|
+
style: [
|
|
1161
|
+
inputFieldMetrics.input,
|
|
1162
|
+
phoneFieldStyles.text,
|
|
1163
|
+
style
|
|
1164
|
+
],
|
|
1165
|
+
keyboardType: "phone-pad",
|
|
1166
|
+
placeholderTextColor: error ? colors.inputError : phoneFieldStyles.placeholder,
|
|
1167
|
+
editable,
|
|
1168
|
+
onFocus: handleFocus,
|
|
1169
|
+
onBlur: handleBlur,
|
|
1170
|
+
accessibilityState: { disabled: isDisabled },
|
|
1171
|
+
...props
|
|
1172
|
+
}
|
|
1173
|
+
)
|
|
1174
|
+
}
|
|
1175
|
+
) })
|
|
1176
|
+
] }),
|
|
1177
|
+
helperMessage ? /* @__PURE__ */ jsx(Text, { ref: helperRef, style: error ? styles3.error : styles3.hint, children: helperMessage }) : null
|
|
1171
1178
|
] });
|
|
1172
1179
|
}
|
|
1173
1180
|
var styles3 = StyleSheet.create({
|
|
@@ -1184,12 +1191,8 @@ var styles3 = StyleSheet.create({
|
|
|
1184
1191
|
flexShrink: 0,
|
|
1185
1192
|
alignSelf: "flex-start"
|
|
1186
1193
|
},
|
|
1187
|
-
phoneColumn: {
|
|
1188
|
-
flex: 1,
|
|
1189
|
-
gap: spacing.sm
|
|
1190
|
-
},
|
|
1191
1194
|
phoneOutline: {
|
|
1192
|
-
|
|
1195
|
+
flex: 1
|
|
1193
1196
|
},
|
|
1194
1197
|
phoneField: {
|
|
1195
1198
|
flex: 1
|