@scripso-homepad/ui 0.4.23 → 0.4.25

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.d.cts CHANGED
@@ -70,6 +70,8 @@ interface SelectBaseProps {
70
70
  fieldClassName?: string;
71
71
  menuClassName?: string;
72
72
  labelClassName?: string;
73
+ /** Styles merged into the field label. */
74
+ labelStyles?: StyleProp<TextStyle>;
73
75
  errorClassName?: string;
74
76
  hintClassName?: string;
75
77
  /** Shorter option rows for compact filter-style dropdowns. */
@@ -91,7 +93,7 @@ interface MultipleSelectProps extends SelectBaseProps {
91
93
  onValueChange?: (value: string[]) => void;
92
94
  }
93
95
  type SelectProps = SingleSelectProps | MultipleSelectProps;
94
- declare function Select({ label, placeholder, value, onValueChange, options, leftIcon, multiple, disabled, error, invalid, hint, containerStyle, fieldStyle, className, fieldClassName, menuClassName, labelClassName, errorClassName, hintClassName, compact, allowDeselect, }: SelectProps): react.JSX.Element;
96
+ declare function Select({ label, placeholder, value, onValueChange, options, leftIcon, multiple, disabled, error, invalid, hint, containerStyle, fieldStyle, className, fieldClassName, menuClassName, labelClassName, labelStyles, errorClassName, hintClassName, compact, allowDeselect, }: SelectProps): react.JSX.Element;
95
97
 
96
98
  interface PhoneInputProps extends Omit<TextInputProps, "style"> {
97
99
  label?: string;
@@ -522,21 +524,21 @@ declare const shadows: {
522
524
  readonly shadowColor: "#082640";
523
525
  readonly shadowOffset: {
524
526
  readonly width: 0;
525
- readonly height: 4;
527
+ readonly height: 1;
526
528
  };
527
- readonly shadowOpacity: 0.05;
528
- readonly shadowRadius: 20;
529
- readonly elevation: 2;
529
+ readonly shadowOpacity: 0.06;
530
+ readonly shadowRadius: 4;
531
+ readonly elevation: 1;
530
532
  };
531
533
  readonly cardLg: {
532
534
  readonly shadowColor: "#082640";
533
535
  readonly shadowOffset: {
534
536
  readonly width: 0;
535
- readonly height: 4;
537
+ readonly height: 2;
536
538
  };
537
- readonly shadowOpacity: 0.1;
538
- readonly shadowRadius: 20;
539
- readonly elevation: 4;
539
+ readonly shadowOpacity: 0.08;
540
+ readonly shadowRadius: 6;
541
+ readonly elevation: 2;
540
542
  };
541
543
  };
542
544
 
package/dist/index.d.ts CHANGED
@@ -70,6 +70,8 @@ interface SelectBaseProps {
70
70
  fieldClassName?: string;
71
71
  menuClassName?: string;
72
72
  labelClassName?: string;
73
+ /** Styles merged into the field label. */
74
+ labelStyles?: StyleProp<TextStyle>;
73
75
  errorClassName?: string;
74
76
  hintClassName?: string;
75
77
  /** Shorter option rows for compact filter-style dropdowns. */
@@ -91,7 +93,7 @@ interface MultipleSelectProps extends SelectBaseProps {
91
93
  onValueChange?: (value: string[]) => void;
92
94
  }
93
95
  type SelectProps = SingleSelectProps | MultipleSelectProps;
94
- declare function Select({ label, placeholder, value, onValueChange, options, leftIcon, multiple, disabled, error, invalid, hint, containerStyle, fieldStyle, className, fieldClassName, menuClassName, labelClassName, errorClassName, hintClassName, compact, allowDeselect, }: SelectProps): react.JSX.Element;
96
+ declare function Select({ label, placeholder, value, onValueChange, options, leftIcon, multiple, disabled, error, invalid, hint, containerStyle, fieldStyle, className, fieldClassName, menuClassName, labelClassName, labelStyles, errorClassName, hintClassName, compact, allowDeselect, }: SelectProps): react.JSX.Element;
95
97
 
96
98
  interface PhoneInputProps extends Omit<TextInputProps, "style"> {
97
99
  label?: string;
@@ -522,21 +524,21 @@ declare const shadows: {
522
524
  readonly shadowColor: "#082640";
523
525
  readonly shadowOffset: {
524
526
  readonly width: 0;
525
- readonly height: 4;
527
+ readonly height: 1;
526
528
  };
527
- readonly shadowOpacity: 0.05;
528
- readonly shadowRadius: 20;
529
- readonly elevation: 2;
529
+ readonly shadowOpacity: 0.06;
530
+ readonly shadowRadius: 4;
531
+ readonly elevation: 1;
530
532
  };
531
533
  readonly cardLg: {
532
534
  readonly shadowColor: "#082640";
533
535
  readonly shadowOffset: {
534
536
  readonly width: 0;
535
- readonly height: 4;
537
+ readonly height: 2;
536
538
  };
537
- readonly shadowOpacity: 0.1;
538
- readonly shadowRadius: 20;
539
- readonly elevation: 4;
539
+ readonly shadowOpacity: 0.08;
540
+ readonly shadowRadius: 6;
541
+ readonly elevation: 2;
540
542
  };
541
543
  };
542
544
 
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-KJYQA5OY.js';
2
- export { Button, Input, Label, brand, buttonTypography, colors, emeraldGreen, fontSize, fontWeight, fonts, labelTypography, navy, radii, rubyRed, shadows, spacing, stormGray, typographyScale } from './chunk-KJYQA5OY.js';
1
+ import { spacing, colors, fontWeight, fontSize, fonts, radii, INPUT_HEIGHT, INPUT_OUTLINE_WIDTH, INPUT_ICON_GAP, useApplyWebClassName, resolveInputVisualState, Label, getInputFieldStyles, inputFieldMetrics } from './chunk-N73KHOZ4.js';
2
+ export { Button, Input, Label, brand, buttonTypography, colors, emeraldGreen, fontSize, fontWeight, fonts, labelTypography, navy, radii, rubyRed, shadows, spacing, stormGray, typographyScale } from './chunk-N73KHOZ4.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, Image, TextInput, Dimensions } from 'react-native';
5
5
  import Svg2, { Path } from 'react-native-svg';
@@ -65,11 +65,11 @@ var selectValueTypography = {
65
65
  letterSpacing: 0,
66
66
  textAlign: "left"
67
67
  };
68
- var INPUT_OUTLINE_WIDTH = 2;
68
+ var INPUT_OUTLINE_WIDTH2 = 2;
69
69
  function createOutlineStyle(ringColor) {
70
70
  return {
71
- borderRadius: radii.lg + INPUT_OUTLINE_WIDTH,
72
- borderWidth: INPUT_OUTLINE_WIDTH,
71
+ borderRadius: radii.lg + INPUT_OUTLINE_WIDTH2,
72
+ borderWidth: INPUT_OUTLINE_WIDTH2,
73
73
  borderColor: ringColor,
74
74
  padding: 0,
75
75
  backgroundColor: colors.transparent,
@@ -79,8 +79,8 @@ function createOutlineStyle(ringColor) {
79
79
  };
80
80
  }
81
81
  var defaultOutline = {
82
- borderRadius: radii.lg + INPUT_OUTLINE_WIDTH,
83
- borderWidth: INPUT_OUTLINE_WIDTH,
82
+ borderRadius: radii.lg + INPUT_OUTLINE_WIDTH2,
83
+ borderWidth: INPUT_OUTLINE_WIDTH2,
84
84
  borderColor: colors.transparent,
85
85
  padding: 0,
86
86
  backgroundColor: colors.transparent,
@@ -481,6 +481,7 @@ function Select({
481
481
  fieldClassName,
482
482
  menuClassName,
483
483
  labelClassName,
484
+ labelStyles,
484
485
  errorClassName,
485
486
  hintClassName,
486
487
  compact = false,
@@ -620,7 +621,15 @@ function Select({
620
621
  });
621
622
  const dropdownTop = anchor ? resolveSelectDropdownTop(anchor, dropdownHeight) : 0;
622
623
  return /* @__PURE__ */ jsxs(View, { ref: wrapperRef, style: [styles.wrapper, containerStyle], children: [
623
- label ? /* @__PURE__ */ jsx(Label, { disabled: isEffectivelyDisabled, style: styles.label, className: labelClassName, children: label }) : null,
624
+ label ? /* @__PURE__ */ jsx(
625
+ Label,
626
+ {
627
+ disabled: isEffectivelyDisabled,
628
+ style: [styles.label, labelStyles],
629
+ className: labelClassName,
630
+ children: label
631
+ }
632
+ ) : null,
624
633
  /* @__PURE__ */ jsx(View, { style: fieldStyles.outline, children: /* @__PURE__ */ jsxs(
625
634
  Pressable,
626
635
  {
@@ -920,7 +929,7 @@ var DROPDOWN_HEIGHT = 186;
920
929
  var DROPDOWN_PADDING = 8;
921
930
  var OPTION_GAP = 10;
922
931
  var OPTION_HEIGHT = 35;
923
- var TRIGGER_HEIGHT = 52;
932
+ var TRIGGER_HEIGHT = INPUT_HEIGHT;
924
933
  var CHEVRON_SIZE = 16;
925
934
  function resolveDropdownTop(anchor) {
926
935
  const windowHeight = Dimensions.get("window").height;
@@ -1127,6 +1136,13 @@ var styles3 = StyleSheet.create({
1127
1136
  color: colors.slateBlue
1128
1137
  }
1129
1138
  });
1139
+ var countryOutlineSlot = {
1140
+ borderRadius: radii.lg + INPUT_OUTLINE_WIDTH,
1141
+ borderWidth: INPUT_OUTLINE_WIDTH,
1142
+ borderColor: colors.transparent,
1143
+ padding: 0,
1144
+ backgroundColor: colors.transparent
1145
+ };
1130
1146
  function sanitizePhoneDigits(value) {
1131
1147
  return value.replace(/\D/g, "");
1132
1148
  }
@@ -1187,7 +1203,7 @@ function PhoneInput({
1187
1203
  }
1188
1204
  ) : null,
1189
1205
  /* @__PURE__ */ jsxs(View, { style: styles4.row, children: [
1190
- /* @__PURE__ */ jsx(
1206
+ /* @__PURE__ */ jsx(View, { style: [countryOutlineSlot, styles4.countryOutline], children: /* @__PURE__ */ jsx(
1191
1207
  CountryCodeSelector,
1192
1208
  {
1193
1209
  value: countryCode,
@@ -1195,7 +1211,7 @@ function PhoneInput({
1195
1211
  disabled: isDisabled,
1196
1212
  style: styles4.countrySelector
1197
1213
  }
1198
- ),
1214
+ ) }),
1199
1215
  /* @__PURE__ */ jsx(View, { style: [phoneFieldStyles.outline, styles4.phoneOutline], children: /* @__PURE__ */ jsx(
1200
1216
  View,
1201
1217
  {
@@ -1237,12 +1253,14 @@ var styles4 = StyleSheet.create({
1237
1253
  },
1238
1254
  row: {
1239
1255
  flexDirection: "row",
1240
- alignItems: "flex-start",
1256
+ alignItems: "center",
1241
1257
  gap: INPUT_ICON_GAP
1242
1258
  },
1259
+ countryOutline: {
1260
+ flexShrink: 0
1261
+ },
1243
1262
  countrySelector: {
1244
- flexShrink: 0,
1245
- alignSelf: "flex-start"
1263
+ flexShrink: 0
1246
1264
  },
1247
1265
  phoneOutline: {
1248
1266
  flex: 1