@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/{chunk-KJYQA5OY.js → chunk-N73KHOZ4.js} +13 -13
- package/dist/chunk-N73KHOZ4.js.map +1 -0
- package/dist/index.cjs +35 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -9
- package/dist/index.d.ts +11 -9
- package/dist/index.js +32 -14
- package/dist/index.js.map +1 -1
- package/dist/web/index.cjs +38 -78
- package/dist/web/index.cjs.map +1 -1
- package/dist/web/index.css +9 -30
- package/dist/web/index.css.map +1 -1
- package/dist/web/index.d.cts +1 -3
- package/dist/web/index.d.ts +1 -3
- package/dist/web/index.js +38 -78
- package/dist/web/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/CountryCodeSelector.tsx +3 -1
- package/src/components/Input.tsx +2 -2
- package/src/components/PhoneInput.tsx +23 -9
- package/src/components/Select.tsx +9 -1
- package/src/theme/tokens.ts +8 -8
- package/src/web/components/Modal.tsx +2 -1
- package/src/web/components/Table.stories.tsx +2 -2
- package/src/web/components/drawer-scroll.css +11 -2
- package/src/web/components/sonner-toast.css +1 -1
- package/src/web/components/table/TablePrimitives.tsx +3 -15
- package/src/web/components/table/TableScrollArea.tsx +1 -12
- package/src/web/components/table/constants.ts +0 -8
- package/src/web/components/table/index.ts +0 -3
- package/src/web/components/table-scroll.css +0 -27
- package/src/web/layout/BuildingSelect.tsx +46 -6
- package/dist/chunk-KJYQA5OY.js.map +0 -1
- package/src/web/components/table/use-horizontal-scroll-state.ts +0 -72
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:
|
|
527
|
+
readonly height: 1;
|
|
526
528
|
};
|
|
527
|
-
readonly shadowOpacity: 0.
|
|
528
|
-
readonly shadowRadius:
|
|
529
|
-
readonly elevation:
|
|
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:
|
|
537
|
+
readonly height: 2;
|
|
536
538
|
};
|
|
537
|
-
readonly shadowOpacity: 0.
|
|
538
|
-
readonly shadowRadius:
|
|
539
|
-
readonly elevation:
|
|
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:
|
|
527
|
+
readonly height: 1;
|
|
526
528
|
};
|
|
527
|
-
readonly shadowOpacity: 0.
|
|
528
|
-
readonly shadowRadius:
|
|
529
|
-
readonly elevation:
|
|
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:
|
|
537
|
+
readonly height: 2;
|
|
536
538
|
};
|
|
537
|
-
readonly shadowOpacity: 0.
|
|
538
|
-
readonly shadowRadius:
|
|
539
|
-
readonly elevation:
|
|
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-
|
|
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_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
|
|
68
|
+
var INPUT_OUTLINE_WIDTH2 = 2;
|
|
69
69
|
function createOutlineStyle(ringColor) {
|
|
70
70
|
return {
|
|
71
|
-
borderRadius: radii.lg +
|
|
72
|
-
borderWidth:
|
|
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 +
|
|
83
|
-
borderWidth:
|
|
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(
|
|
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 =
|
|
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: "
|
|
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
|