@scripso-homepad/ui 0.4.14 → 0.4.15
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/{chunk-ANDWP4YU.js → chunk-3G3ZKFHX.js} +17 -4
- package/dist/chunk-3G3ZKFHX.js.map +1 -0
- package/dist/index.cjs +15 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/web/index.cjs +21 -4
- package/dist/web/index.cjs.map +1 -1
- package/dist/web/index.js +7 -3
- package/dist/web/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Input.tsx +9 -0
- package/src/theme/input.ts +11 -1
- package/src/web/components/Modal.tsx +5 -2
- package/src/web/components/table/TablePrimitives.tsx +2 -1
- package/dist/chunk-ANDWP4YU.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -48,7 +48,7 @@ interface InputProps extends TextInputProps {
|
|
|
48
48
|
/** When `secureTextEntry` is set, show a toggleable eye icon. Pass `false` to disable. */
|
|
49
49
|
showPasswordToggle?: boolean;
|
|
50
50
|
}
|
|
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;
|
|
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, multiline, textAlignVertical, ...props }: InputProps): react.JSX.Element;
|
|
52
52
|
|
|
53
53
|
type SelectOption = {
|
|
54
54
|
value: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -48,7 +48,7 @@ interface InputProps extends TextInputProps {
|
|
|
48
48
|
/** When `secureTextEntry` is set, show a toggleable eye icon. Pass `false` to disable. */
|
|
49
49
|
showPasswordToggle?: boolean;
|
|
50
50
|
}
|
|
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;
|
|
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, multiline, textAlignVertical, ...props }: InputProps): react.JSX.Element;
|
|
52
52
|
|
|
53
53
|
type SelectOption = {
|
|
54
54
|
value: 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-3G3ZKFHX.js';
|
|
2
|
+
export { Button, Input, Label, brand, buttonTypography, colors, emeraldGreen, fontSize, fontWeight, fonts, labelTypography, navy, radii, rubyRed, shadows, spacing, stormGray, typographyScale } from './chunk-3G3ZKFHX.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';
|
package/dist/web/index.cjs
CHANGED
|
@@ -28766,22 +28766,28 @@ var inputFieldMetrics = reactNative.StyleSheet.create({
|
|
|
28766
28766
|
input: {
|
|
28767
28767
|
flex: 1,
|
|
28768
28768
|
minWidth: 0,
|
|
28769
|
+
width: "100%",
|
|
28769
28770
|
fontFamily: fonts.sans,
|
|
28770
28771
|
fontSize: fontSize.md,
|
|
28771
28772
|
fontWeight: fontWeight.medium,
|
|
28772
|
-
lineHeight: INPUT_TEXT_LINE_HEIGHT,
|
|
28773
28773
|
paddingVertical: 0,
|
|
28774
28774
|
paddingHorizontal: 0,
|
|
28775
28775
|
margin: 0,
|
|
28776
28776
|
borderWidth: 0,
|
|
28777
28777
|
backgroundColor: colors.transparent,
|
|
28778
28778
|
...reactNative.Platform.OS === "android" ? { includeFontPadding: false } : null,
|
|
28779
|
+
...reactNative.Platform.OS === "ios" ? { lineHeight: INPUT_TEXT_LINE_HEIGHT, paddingVertical: 2 } : null,
|
|
28779
28780
|
...reactNative.Platform.OS === "web" ? {
|
|
28780
28781
|
alignSelf: "center",
|
|
28781
|
-
outlineStyle: "none"
|
|
28782
|
+
outlineStyle: "none",
|
|
28783
|
+
lineHeight: INPUT_TEXT_LINE_HEIGHT
|
|
28782
28784
|
} : {
|
|
28783
28785
|
alignSelf: "stretch"
|
|
28784
28786
|
}
|
|
28787
|
+
},
|
|
28788
|
+
/** Single-line: avoid Android lineHeight jump between placeholder and typed text. */
|
|
28789
|
+
inputSingleLine: {
|
|
28790
|
+
...reactNative.Platform.OS === "android" ? { textAlignVertical: "center" } : null
|
|
28785
28791
|
}
|
|
28786
28792
|
});
|
|
28787
28793
|
function hasClassList(node) {
|
|
@@ -28879,6 +28885,8 @@ function Input({
|
|
|
28879
28885
|
showPasswordToggle,
|
|
28880
28886
|
onFocus,
|
|
28881
28887
|
onBlur,
|
|
28888
|
+
multiline,
|
|
28889
|
+
textAlignVertical,
|
|
28882
28890
|
...props
|
|
28883
28891
|
}) {
|
|
28884
28892
|
const wrapperRef = react.useRef(null);
|
|
@@ -28895,6 +28903,7 @@ function Input({
|
|
|
28895
28903
|
const hasError = Boolean(error) || Boolean(invalid);
|
|
28896
28904
|
const passwordToggleEnabled = secureTextEntry === true && showPasswordToggle !== false && rightIcon == null;
|
|
28897
28905
|
const effectiveSecureTextEntry = passwordToggleEnabled ? !passwordVisible : secureTextEntry;
|
|
28906
|
+
const resolvedTextAlignVertical = textAlignVertical ?? (multiline ? "top" : "center");
|
|
28898
28907
|
const visualState = resolveInputVisualState({
|
|
28899
28908
|
focused,
|
|
28900
28909
|
error: hasError,
|
|
@@ -28954,12 +28963,16 @@ function Input({
|
|
|
28954
28963
|
ref: inputRef,
|
|
28955
28964
|
style: [
|
|
28956
28965
|
inputFieldMetrics.input,
|
|
28966
|
+
!multiline ? inputFieldMetrics.inputSingleLine : null,
|
|
28957
28967
|
fieldStyles.text,
|
|
28958
28968
|
style
|
|
28959
28969
|
],
|
|
28960
28970
|
placeholderTextColor: fieldStyles.placeholder,
|
|
28961
28971
|
editable,
|
|
28972
|
+
multiline,
|
|
28962
28973
|
secureTextEntry: effectiveSecureTextEntry,
|
|
28974
|
+
textAlign: "left",
|
|
28975
|
+
textAlignVertical: resolvedTextAlignVertical,
|
|
28963
28976
|
onFocus: handleFocus,
|
|
28964
28977
|
onBlur: handleBlur,
|
|
28965
28978
|
accessibilityState: { disabled: isDisabled },
|
|
@@ -30341,7 +30354,8 @@ function TableActionsCell({ className, children, ...props }) {
|
|
|
30341
30354
|
tableCellPaddingClassName,
|
|
30342
30355
|
tableBodyClassName,
|
|
30343
30356
|
tableStickyRightShadowClassName,
|
|
30344
|
-
|
|
30357
|
+
// Keep an opaque sticky background so scrolled cells never bleed through.
|
|
30358
|
+
disabled && "bg-white [&>*]:opacity-70",
|
|
30345
30359
|
className
|
|
30346
30360
|
),
|
|
30347
30361
|
...props,
|
|
@@ -31085,7 +31099,10 @@ function Modal({
|
|
|
31085
31099
|
"footer",
|
|
31086
31100
|
{
|
|
31087
31101
|
className: cn(
|
|
31088
|
-
footerLayout === "split" ? "grid w-full shrink-0 grid-cols-
|
|
31102
|
+
footerLayout === "split" ? "grid w-full shrink-0 grid-cols-1 gap-3 min-[400px]:grid-cols-2 min-[400px]:gap-4" : cn(
|
|
31103
|
+
"flex shrink-0 flex-col-reverse gap-3 sm:flex-row sm:gap-4",
|
|
31104
|
+
footerAlignClasses[footerAlign]
|
|
31105
|
+
)
|
|
31089
31106
|
),
|
|
31090
31107
|
children: [
|
|
31091
31108
|
/* @__PURE__ */ jsxRuntime.jsx(
|