@ecohouse/ui 0.1.17 → 0.1.19
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 +941 -174
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +53 -2
- package/dist/index.d.ts +53 -2
- package/dist/index.js +941 -176
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Range/Range.stories.tsx +128 -0
- package/src/components/Range/Range.test.ts +78 -0
- package/src/components/Range/Range.tsx +755 -0
- package/src/components/Range/Range.types.ts +35 -0
- package/src/components/Range/Range.utils.ts +56 -0
- package/src/components/Range/index.ts +2 -0
- package/src/components/StatCard/StatCard.tsx +14 -3
- package/src/components/index.ts +3 -0
- package/src/icons/CottageCard/CottageCardIcons.tsx +8 -1
- package/src/icons/CottageCard/CottageCardIcons.web.tsx +8 -1
- package/src/index.ts +10 -1
- package/src/primitives/FavoritesButton/FavoritesButton.stories.tsx +60 -0
- package/src/primitives/FavoritesButton/FavoritesButton.tsx +120 -0
- package/src/primitives/FavoritesButton/index.ts +2 -0
- package/src/primitives/index.ts +2 -0
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { forwardRef, useRef, useMemo, useState, useCallback, useEffect, useLayoutEffect, isValidElement, cloneElement } from 'react';
|
|
2
|
-
import { Pressable, View, Text, StyleSheet, Platform, Image, Animated, Easing, TouchableOpacity, TextInput, ScrollView } from 'react-native';
|
|
2
|
+
import { Pressable, View, Text, StyleSheet, Platform, Image, Animated, Easing, TouchableOpacity, TextInput, ScrollView, PanResponder } from 'react-native';
|
|
3
3
|
import Svg14, { Path } from 'react-native-svg';
|
|
4
4
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
@@ -476,11 +476,18 @@ var CARD_LOCATION_DOT_PATH = "M6.49967 5.95833C7.24755 5.95833 7.85384 5.35205 7
|
|
|
476
476
|
var GUESTS_PATH = "M8.20008 8.14683C8.5558 7.83892 8.84111 7.45809 9.03666 7.03018C9.23221 6.60227 9.33342 6.1373 9.33342 5.66683C9.33342 4.78277 8.98223 3.93493 8.3571 3.30981C7.73198 2.68469 6.88414 2.3335 6.00008 2.3335C5.11603 2.3335 4.26818 2.68469 3.64306 3.30981C3.01794 3.93493 2.66675 4.78277 2.66675 5.66683C2.66674 6.1373 2.76795 6.60227 2.9635 7.03018C3.15905 7.45809 3.44436 7.83892 3.80008 8.14683C2.86684 8.56942 2.07506 9.25185 1.5194 10.1125C0.963745 10.9732 0.667729 11.9757 0.666748 13.0002C0.666748 13.177 0.736986 13.3465 0.86201 13.4716C0.987034 13.5966 1.1566 13.6668 1.33341 13.6668C1.51023 13.6668 1.6798 13.5966 1.80482 13.4716C1.92984 13.3465 2.00008 13.177 2.00008 13.0002C2.00008 11.9393 2.42151 10.9219 3.17165 10.1717C3.9218 9.42159 4.93922 9.00016 6.00008 9.00016C7.06095 9.00016 8.07836 9.42159 8.82851 10.1717C9.57865 10.9219 10.0001 11.9393 10.0001 13.0002C10.0001 13.177 10.0703 13.3465 10.1953 13.4716C10.3204 13.5966 10.4899 13.6668 10.6667 13.6668C10.8436 13.6668 11.0131 13.5966 11.1382 13.4716C11.2632 13.3465 11.3334 13.177 11.3334 13.0002C11.3324 11.9757 11.0364 10.9732 10.4808 10.1125C9.92511 9.25185 9.13332 8.56942 8.20008 8.14683ZM6.00008 7.66683C5.60452 7.66683 5.21784 7.54953 4.88894 7.32977C4.56004 7.11001 4.3037 6.79765 4.15232 6.4322C4.00095 6.06674 3.96134 5.66461 4.03851 5.27665C4.11568 4.88869 4.30616 4.53232 4.58587 4.25262C4.86557 3.97291 5.22194 3.78243 5.6099 3.70526C5.99786 3.62809 6.4 3.6677 6.76545 3.81907C7.1309 3.97045 7.44326 4.22679 7.66302 4.55569C7.88278 4.88459 8.00008 5.27127 8.00008 5.66683C8.00008 6.19726 7.78937 6.70597 7.4143 7.08104C7.03922 7.45612 6.53051 7.66683 6.00008 7.66683ZM12.4934 7.88016C12.9201 7.39972 13.1988 6.8062 13.2959 6.17106C13.3931 5.53591 13.3047 4.88621 13.0413 4.30016C12.7778 3.71411 12.3506 3.21669 11.8111 2.86778C11.2715 2.51886 10.6426 2.33332 10.0001 2.3335C9.82327 2.3335 9.6537 2.40373 9.52868 2.52876C9.40365 2.65378 9.33342 2.82335 9.33342 3.00016C9.33342 3.17697 9.40365 3.34654 9.52868 3.47157C9.6537 3.59659 9.82327 3.66683 10.0001 3.66683C10.5305 3.66683 11.0392 3.87754 11.4143 4.25262C11.7894 4.62769 12.0001 5.1364 12.0001 5.66683C11.9991 6.01699 11.9063 6.36076 11.7308 6.66378C11.5553 6.96679 11.3033 7.21842 11.0001 7.3935C10.9012 7.45051 10.8187 7.53194 10.7603 7.62999C10.702 7.72804 10.6697 7.83943 10.6667 7.9535C10.664 8.06667 10.69 8.17869 10.7425 8.279C10.795 8.37931 10.8722 8.4646 10.9667 8.52683L11.2267 8.70016L11.3134 8.74683C12.117 9.12797 12.795 9.73082 13.2674 10.4844C13.7398 11.2379 13.9871 12.1108 13.9801 13.0002C13.9801 13.177 14.0503 13.3465 14.1753 13.4716C14.3004 13.5966 14.4699 13.6668 14.6467 13.6668C14.8236 13.6668 14.9931 13.5966 15.1182 13.4716C15.2432 13.3465 15.3134 13.177 15.3134 13.0002C15.3189 11.9771 15.0626 10.9697 14.5691 10.0735C14.0755 9.17741 13.361 8.42237 12.4934 7.88016Z";
|
|
477
477
|
var BEDROOMS_PATH = "M4.66675 8.33333C5.06231 8.33333 5.44899 8.21604 5.77789 7.99627C6.10679 7.77651 6.36313 7.46415 6.51451 7.0987C6.66588 6.73325 6.70549 6.33111 6.62832 5.94315C6.55115 5.55519 6.36067 5.19882 6.08096 4.91912C5.80126 4.63941 5.44489 4.44893 5.05693 4.37176C4.66897 4.29459 4.26683 4.3342 3.90138 4.48557C3.53593 4.63695 3.22357 4.89329 3.00381 5.22219C2.78405 5.55109 2.66675 5.93777 2.66675 6.33333C2.66675 6.86377 2.87746 7.37247 3.25253 7.74755C3.62761 8.12262 4.13632 8.33333 4.66675 8.33333ZM4.66675 5.66667C4.7986 5.66667 4.9275 5.70577 5.03713 5.77902C5.14676 5.85227 5.23221 5.95639 5.28267 6.07821C5.33313 6.20003 5.34633 6.33407 5.32061 6.46339C5.29488 6.59271 5.23139 6.7115 5.13815 6.80474C5.04492 6.89797 4.92613 6.96147 4.79681 6.98719C4.66749 7.01291 4.53344 6.99971 4.41163 6.94925C4.28981 6.89879 4.18569 6.81335 4.11244 6.70371C4.03918 6.59408 4.00008 6.46519 4.00008 6.33333C4.00008 6.15652 4.07032 5.98695 4.19534 5.86193C4.32037 5.7369 4.48994 5.66667 4.66675 5.66667ZM13.3334 4.33333H8.00008C7.82327 4.33333 7.6537 4.40357 7.52868 4.5286C7.40365 4.65362 7.33342 4.82319 7.33342 5V9H2.00008V3.66667C2.00008 3.48986 1.92984 3.32029 1.80482 3.19526C1.6798 3.07024 1.51023 3 1.33341 3C1.1566 3 0.987034 3.07024 0.86201 3.19526C0.736986 3.32029 0.666748 3.48986 0.666748 3.66667V12.3333C0.666748 12.5101 0.736986 12.6797 0.86201 12.8047C0.987034 12.9298 1.1566 13 1.33341 13C1.51023 13 1.6798 12.9298 1.80482 12.8047C1.92984 12.6797 2.00008 12.5101 2.00008 12.3333V10.3333H14.0001V12.3333C14.0001 12.5101 14.0703 12.6797 14.1953 12.8047C14.3204 12.9298 14.4899 13 14.6667 13C14.8436 13 15.0131 12.9298 15.1382 12.8047C15.2632 12.6797 15.3334 12.5101 15.3334 12.3333V6.33333C15.3334 5.8029 15.1227 5.29419 14.7476 4.91912C14.3726 4.54405 13.8638 4.33333 13.3334 4.33333ZM14.0001 9H8.66675V5.66667H13.3334C13.5102 5.66667 13.6798 5.7369 13.8048 5.86193C13.9298 5.98695 14.0001 6.15652 14.0001 6.33333V9Z";
|
|
478
478
|
var BATHROOMS_PATH = "M14.6667 7.99999H3.33341V4.27343C3.33108 4.03335 3.39444 3.7972 3.51664 3.59053C3.63885 3.38386 3.81525 3.21454 4.02675 3.10091C4.26062 2.97416 4.52713 2.92047 4.79184 2.94677C4.65711 3.35481 4.63797 3.79218 4.73654 4.21043C4.83511 4.62868 5.04755 5.01147 5.35031 5.3164L6.05737 6.02343C6.11926 6.08535 6.19274 6.13447 6.27362 6.16798C6.3545 6.20149 6.44118 6.21874 6.52873 6.21874C6.61627 6.21874 6.70296 6.20149 6.78384 6.16798C6.86471 6.13447 6.93819 6.08535 7.00008 6.02343L9.35686 3.66666C9.41877 3.60477 9.46789 3.53129 9.5014 3.45041C9.53492 3.36954 9.55217 3.28285 9.55217 3.19531C9.55217 3.10776 9.53492 3.02108 9.5014 2.9402C9.46789 2.85932 9.41877 2.78584 9.35686 2.72395L8.64982 2.01692C8.2563 1.62517 7.73578 1.38688 7.18209 1.34501C6.6284 1.30314 6.07796 1.46045 5.63001 1.78857C5.22612 1.63083 4.78981 1.57415 4.35902 1.62346C3.92824 1.67277 3.51602 1.82658 3.15823 2.07151C2.80043 2.31644 2.50789 2.64507 2.30605 3.02883C2.1042 3.41258 1.99917 3.83984 2.00008 4.27343V7.99999H1.33341C1.1566 7.99999 0.987034 8.07023 0.86201 8.19526C0.736986 8.32028 0.666748 8.48985 0.666748 8.66666C0.666748 8.84347 0.736986 9.01304 0.86201 9.13806C0.987034 9.26309 1.1566 9.33333 1.33341 9.33333H2.00008V11.3333C2.00135 11.7456 2.1302 12.1473 2.36893 12.4834C2.60766 12.8195 2.94458 13.0735 3.33341 13.2104V14C3.33341 14.1768 3.40365 14.3464 3.52868 14.4714C3.6537 14.5964 3.82327 14.6667 4.00008 14.6667C4.17689 14.6667 4.34646 14.5964 4.47149 14.4714C4.59651 14.3464 4.66675 14.1768 4.66675 14V13.3333H11.3334V14C11.3334 14.1768 11.4037 14.3464 11.5287 14.4714C11.6537 14.5964 11.8233 14.6667 12.0001 14.6667C12.1769 14.6667 12.3465 14.5964 12.4715 14.4714C12.5965 14.3464 12.6667 14.1768 12.6667 14V13.2105C13.0556 13.0735 13.3925 12.8195 13.6312 12.4834C13.87 12.1473 13.9988 11.7456 14.0001 11.3333V9.33333H14.6667C14.8436 9.33333 15.0131 9.26309 15.1382 9.13806C15.2632 9.01304 15.3334 8.84347 15.3334 8.66666C15.3334 8.48985 15.2632 8.32028 15.1382 8.19526C15.0131 8.07023 14.8436 7.99999 14.6667 7.99999ZM6.29305 2.95963C6.48074 2.77244 6.735 2.66731 7.00008 2.66731C7.26516 2.66731 7.51943 2.77244 7.70711 2.95963L7.94279 3.19531L6.52875 4.60937L6.29307 4.37369C6.10577 4.18606 6.00058 3.93178 6.00058 3.66666C6.00057 3.40155 6.10576 3.14727 6.29305 2.95963ZM12.6667 11.3333C12.6666 11.5101 12.5964 11.6796 12.4714 11.8046C12.3464 11.9296 12.1769 11.9999 12.0001 12H4.00008C3.82331 11.9999 3.65381 11.9296 3.52881 11.8046C3.40381 11.6796 3.33353 11.5101 3.33341 11.3333V9.33333H12.6667V11.3333Z";
|
|
479
|
-
function SaveHeartIcon({
|
|
479
|
+
function SaveHeartIcon({
|
|
480
|
+
size = 16,
|
|
481
|
+
color = colors.white,
|
|
482
|
+
strokeWidth = 2,
|
|
483
|
+
fillOpacity = 0
|
|
484
|
+
}) {
|
|
480
485
|
return /* @__PURE__ */ jsx(Svg14, { width: size, height: size, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ jsx(
|
|
481
486
|
Path,
|
|
482
487
|
{
|
|
483
488
|
d: SAVE_HEART_PATH,
|
|
489
|
+
fill: color,
|
|
490
|
+
fillOpacity,
|
|
484
491
|
stroke: color,
|
|
485
492
|
strokeWidth,
|
|
486
493
|
strokeLinecap: "round",
|
|
@@ -1386,6 +1393,85 @@ var styles = StyleSheet.create({
|
|
|
1386
1393
|
flex: 1
|
|
1387
1394
|
}
|
|
1388
1395
|
});
|
|
1396
|
+
var ICON_SIZE2 = 16;
|
|
1397
|
+
var BACKGROUND_COLOR = "#09090966";
|
|
1398
|
+
var webBlurStyle = Platform.OS === "web" ? {
|
|
1399
|
+
backdropFilter: "blur(10px)",
|
|
1400
|
+
WebkitBackdropFilter: "blur(10px)"
|
|
1401
|
+
} : {};
|
|
1402
|
+
var FavoritesButton = forwardRef(
|
|
1403
|
+
function FavoritesButton2({
|
|
1404
|
+
value,
|
|
1405
|
+
defaultValue = false,
|
|
1406
|
+
onValueChange,
|
|
1407
|
+
disabled = false,
|
|
1408
|
+
style,
|
|
1409
|
+
className,
|
|
1410
|
+
accessibilityLabel,
|
|
1411
|
+
hitSlop = 8,
|
|
1412
|
+
...rest
|
|
1413
|
+
}, forwardedRef) {
|
|
1414
|
+
const buttonRef = useRef(null);
|
|
1415
|
+
const isControlled = typeof value === "boolean";
|
|
1416
|
+
const [uncontrolledValue, setUncontrolledValue] = useState(defaultValue);
|
|
1417
|
+
const isActive = isControlled ? value : uncontrolledValue;
|
|
1418
|
+
const setButtonRef = useMemo(() => mergeRefs(buttonRef, forwardedRef), [forwardedRef]);
|
|
1419
|
+
useApplyWebClassName(buttonRef, className?.trim() || void 0);
|
|
1420
|
+
const handlePress = () => {
|
|
1421
|
+
const nextValue = !isActive;
|
|
1422
|
+
if (!isControlled) setUncontrolledValue(nextValue);
|
|
1423
|
+
onValueChange?.(nextValue);
|
|
1424
|
+
};
|
|
1425
|
+
return /* @__PURE__ */ jsx(
|
|
1426
|
+
Pressable,
|
|
1427
|
+
{
|
|
1428
|
+
...rest,
|
|
1429
|
+
ref: setButtonRef,
|
|
1430
|
+
accessibilityLabel: accessibilityLabel ?? (isActive ? "Remove from favorites" : "Add to favorites"),
|
|
1431
|
+
accessibilityRole: "togglebutton",
|
|
1432
|
+
accessibilityState: { checked: isActive, disabled },
|
|
1433
|
+
disabled,
|
|
1434
|
+
hitSlop,
|
|
1435
|
+
onPress: handlePress,
|
|
1436
|
+
style: ({ pressed }) => [
|
|
1437
|
+
styles2.button,
|
|
1438
|
+
webBlurStyle,
|
|
1439
|
+
pressed && styles2.pressed,
|
|
1440
|
+
disabled && styles2.disabled,
|
|
1441
|
+
style
|
|
1442
|
+
],
|
|
1443
|
+
children: /* @__PURE__ */ jsx(
|
|
1444
|
+
SaveHeartIcon,
|
|
1445
|
+
{
|
|
1446
|
+
color: isActive ? colors.red : colors.white,
|
|
1447
|
+
fillOpacity: isActive ? 1 : 0,
|
|
1448
|
+
size: ICON_SIZE2,
|
|
1449
|
+
strokeWidth: 2
|
|
1450
|
+
}
|
|
1451
|
+
)
|
|
1452
|
+
}
|
|
1453
|
+
);
|
|
1454
|
+
}
|
|
1455
|
+
);
|
|
1456
|
+
var styles2 = StyleSheet.create({
|
|
1457
|
+
button: {
|
|
1458
|
+
padding: 12,
|
|
1459
|
+
gap: 10,
|
|
1460
|
+
alignItems: "center",
|
|
1461
|
+
justifyContent: "center",
|
|
1462
|
+
alignSelf: "flex-start",
|
|
1463
|
+
borderRadius: 39,
|
|
1464
|
+
borderWidth: 1,
|
|
1465
|
+
borderColor: colors.whiteAlpha10,
|
|
1466
|
+
backgroundColor: BACKGROUND_COLOR
|
|
1467
|
+
},
|
|
1468
|
+
pressed: {
|
|
1469
|
+
opacity: 0.8
|
|
1470
|
+
},
|
|
1471
|
+
disabled: {
|
|
1472
|
+
opacity: 0.5
|
|
1473
|
+
}
|
|
1474
|
+
});
|
|
1389
1475
|
|
|
1390
1476
|
// src/primitives/BrandLogo/brandLogoPaths.ts
|
|
1391
1477
|
var BRAND_LOGO_PATHS = [
|
|
@@ -1545,7 +1631,7 @@ var Avatar = forwardRef(function Avatar2({
|
|
|
1545
1631
|
}, [isOpen, closeAndFocusTrigger]);
|
|
1546
1632
|
const hasImage = Boolean(imageUrl) && !imageFailed;
|
|
1547
1633
|
const resolvedAccessibilityLabel = accessibilityLabel ?? [name, email].filter(Boolean).join(", ");
|
|
1548
|
-
return /* @__PURE__ */ jsxs(View, { ref: wrapperRef, style: [
|
|
1634
|
+
return /* @__PURE__ */ jsxs(View, { ref: wrapperRef, style: [styles3.wrapper, isOpen && styles3.wrapperOpen], children: [
|
|
1549
1635
|
/* @__PURE__ */ jsxs(
|
|
1550
1636
|
Pressable,
|
|
1551
1637
|
{
|
|
@@ -1557,25 +1643,25 @@ var Avatar = forwardRef(function Avatar2({
|
|
|
1557
1643
|
accessibilityRole: isInteractive ? "button" : void 0,
|
|
1558
1644
|
accessibilityLabel: resolvedAccessibilityLabel,
|
|
1559
1645
|
accessibilityState: isInteractive ? { disabled, expanded: hasMenu ? isOpen : void 0 } : void 0,
|
|
1560
|
-
style: [
|
|
1646
|
+
style: [styles3.root, disabled && styles3.disabled, style],
|
|
1561
1647
|
children: [
|
|
1562
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
1648
|
+
/* @__PURE__ */ jsx(View, { style: styles3.imageWrap, children: hasImage ? /* @__PURE__ */ jsx(
|
|
1563
1649
|
Image,
|
|
1564
1650
|
{
|
|
1565
1651
|
source: { uri: imageUrl ?? void 0 },
|
|
1566
|
-
style:
|
|
1652
|
+
style: styles3.image,
|
|
1567
1653
|
onError: () => setImageFailed(true)
|
|
1568
1654
|
}
|
|
1569
|
-
) : /* @__PURE__ */ jsx(View, { style:
|
|
1570
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
1571
|
-
/* @__PURE__ */ jsx(Text, { style:
|
|
1572
|
-
email ? /* @__PURE__ */ jsx(Text, { style:
|
|
1655
|
+
) : /* @__PURE__ */ jsx(View, { style: styles3.imageFallback, children: /* @__PURE__ */ jsx(UserIcon, { size: FALLBACK_ICON_SIZE, color: colors.primary }) }) }),
|
|
1656
|
+
/* @__PURE__ */ jsxs(View, { style: styles3.textColumn, children: [
|
|
1657
|
+
/* @__PURE__ */ jsx(Text, { style: styles3.name, numberOfLines: 1, children: name }),
|
|
1658
|
+
email ? /* @__PURE__ */ jsx(Text, { style: styles3.email, numberOfLines: 1, children: email }) : null
|
|
1573
1659
|
] }),
|
|
1574
|
-
showChevron ? /* @__PURE__ */ jsx(View, { style: [
|
|
1660
|
+
showChevron ? /* @__PURE__ */ jsx(View, { style: [styles3.chevronSlot, isOpen && styles3.chevronOpen], children: /* @__PURE__ */ jsx(ChevronDownIcon, { size: CHEVRON_SIZE, color: isOpen ? colors.primary : colors.grey100 }) }) : null
|
|
1575
1661
|
]
|
|
1576
1662
|
}
|
|
1577
1663
|
),
|
|
1578
|
-
hasMenu && isOpen ? /* @__PURE__ */ jsx(View, { style: [
|
|
1664
|
+
hasMenu && isOpen ? /* @__PURE__ */ jsx(View, { style: [styles3.menu, menuWidth != null && { right: void 0, width: menuWidth }], children: resolvedMenuItems.map((item) => {
|
|
1579
1665
|
const itemKey = item.key ?? item.label;
|
|
1580
1666
|
return /* @__PURE__ */ jsx(
|
|
1581
1667
|
MenuItem,
|
|
@@ -1592,7 +1678,7 @@ var Avatar = forwardRef(function Avatar2({
|
|
|
1592
1678
|
}) }) : null
|
|
1593
1679
|
] });
|
|
1594
1680
|
});
|
|
1595
|
-
var
|
|
1681
|
+
var styles3 = StyleSheet.create({
|
|
1596
1682
|
wrapper: {
|
|
1597
1683
|
position: "relative",
|
|
1598
1684
|
alignSelf: "flex-start"
|
|
@@ -1677,8 +1763,8 @@ var styles2 = StyleSheet.create({
|
|
|
1677
1763
|
})
|
|
1678
1764
|
}
|
|
1679
1765
|
});
|
|
1680
|
-
var
|
|
1681
|
-
var
|
|
1766
|
+
var ICON_SIZE3 = 20;
|
|
1767
|
+
var webBlurStyle2 = Platform.OS === "web" ? {
|
|
1682
1768
|
backdropFilter: "blur(10.3px)",
|
|
1683
1769
|
WebkitBackdropFilter: "blur(10.3px)"
|
|
1684
1770
|
} : {};
|
|
@@ -1708,22 +1794,22 @@ var Badge = forwardRef(function Badge2({ label, variant = "default", icon: Icon2
|
|
|
1708
1794
|
...rest,
|
|
1709
1795
|
ref: setContainerRef,
|
|
1710
1796
|
style: [
|
|
1711
|
-
|
|
1797
|
+
styles4.base,
|
|
1712
1798
|
{ backgroundColor: preset.backgroundColor },
|
|
1713
|
-
preset.border ?
|
|
1714
|
-
preset.blur ?
|
|
1799
|
+
preset.border ? styles4.transparentBorder : null,
|
|
1800
|
+
preset.blur ? webBlurStyle2 : null,
|
|
1715
1801
|
style
|
|
1716
1802
|
],
|
|
1717
1803
|
accessibilityRole: "text",
|
|
1718
1804
|
accessibilityLabel: accessibilityLabel ?? label,
|
|
1719
1805
|
children: [
|
|
1720
|
-
Icon2 ? /* @__PURE__ */ jsx(View, { style:
|
|
1721
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
1806
|
+
Icon2 ? /* @__PURE__ */ jsx(View, { style: styles4.iconSlot, children: /* @__PURE__ */ jsx(Icon2, { size: ICON_SIZE3, color: preset.iconColor }) }) : null,
|
|
1807
|
+
/* @__PURE__ */ jsx(Text, { style: [styles4.label, Platform.OS === "android" ? styles4.labelAndroid : null], children: label })
|
|
1722
1808
|
]
|
|
1723
1809
|
}
|
|
1724
1810
|
);
|
|
1725
1811
|
});
|
|
1726
|
-
var
|
|
1812
|
+
var styles4 = StyleSheet.create({
|
|
1727
1813
|
base: {
|
|
1728
1814
|
flexDirection: "row",
|
|
1729
1815
|
alignItems: "center",
|
|
@@ -1744,8 +1830,8 @@ var styles3 = StyleSheet.create({
|
|
|
1744
1830
|
borderStyle: "solid"
|
|
1745
1831
|
},
|
|
1746
1832
|
iconSlot: {
|
|
1747
|
-
width:
|
|
1748
|
-
height:
|
|
1833
|
+
width: ICON_SIZE3,
|
|
1834
|
+
height: ICON_SIZE3,
|
|
1749
1835
|
alignItems: "center",
|
|
1750
1836
|
justifyContent: "center",
|
|
1751
1837
|
flexShrink: 0
|
|
@@ -1759,7 +1845,7 @@ var styles3 = StyleSheet.create({
|
|
|
1759
1845
|
}
|
|
1760
1846
|
});
|
|
1761
1847
|
var BUTTON_SIZE = 32;
|
|
1762
|
-
var
|
|
1848
|
+
var webBlurStyle3 = Platform.OS === "web" ? {
|
|
1763
1849
|
backdropFilter: "blur(20px)",
|
|
1764
1850
|
WebkitBackdropFilter: "blur(20px)"
|
|
1765
1851
|
} : {};
|
|
@@ -1796,7 +1882,7 @@ var Counter = forwardRef(function Counter2({
|
|
|
1796
1882
|
if (!isControlled) setUncontrolledValue(next);
|
|
1797
1883
|
onValueChange?.(next);
|
|
1798
1884
|
};
|
|
1799
|
-
return /* @__PURE__ */ jsxs(View, { ...rest, ref: setContainerRef, style: [
|
|
1885
|
+
return /* @__PURE__ */ jsxs(View, { ...rest, ref: setContainerRef, style: [styles5.base, style], children: [
|
|
1800
1886
|
/* @__PURE__ */ jsx(
|
|
1801
1887
|
Pressable,
|
|
1802
1888
|
{
|
|
@@ -1806,11 +1892,11 @@ var Counter = forwardRef(function Counter2({
|
|
|
1806
1892
|
accessibilityRole: "button",
|
|
1807
1893
|
accessibilityLabel: "Decrease value",
|
|
1808
1894
|
accessibilityState: { disabled: decrementDisabled },
|
|
1809
|
-
style: [
|
|
1895
|
+
style: [styles5.button, webBlurStyle3, decrementDisabled && styles5.buttonDisabled],
|
|
1810
1896
|
children: /* @__PURE__ */ jsx(MinusIcon, {})
|
|
1811
1897
|
}
|
|
1812
1898
|
),
|
|
1813
|
-
/* @__PURE__ */ jsx(Text, { style:
|
|
1899
|
+
/* @__PURE__ */ jsx(Text, { style: styles5.value, children: resolvedValue }),
|
|
1814
1900
|
/* @__PURE__ */ jsx(
|
|
1815
1901
|
Pressable,
|
|
1816
1902
|
{
|
|
@@ -1820,13 +1906,13 @@ var Counter = forwardRef(function Counter2({
|
|
|
1820
1906
|
accessibilityRole: "button",
|
|
1821
1907
|
accessibilityLabel: "Increase value",
|
|
1822
1908
|
accessibilityState: { disabled: incrementDisabled },
|
|
1823
|
-
style: [
|
|
1909
|
+
style: [styles5.button, webBlurStyle3, incrementDisabled && styles5.buttonDisabled],
|
|
1824
1910
|
children: /* @__PURE__ */ jsx(PlusIcon, {})
|
|
1825
1911
|
}
|
|
1826
1912
|
)
|
|
1827
1913
|
] });
|
|
1828
1914
|
});
|
|
1829
|
-
var
|
|
1915
|
+
var styles5 = StyleSheet.create({
|
|
1830
1916
|
base: {
|
|
1831
1917
|
flexDirection: "row",
|
|
1832
1918
|
alignItems: "center",
|
|
@@ -1850,7 +1936,7 @@ var styles4 = StyleSheet.create({
|
|
|
1850
1936
|
color: colors.white
|
|
1851
1937
|
}
|
|
1852
1938
|
});
|
|
1853
|
-
var
|
|
1939
|
+
var ICON_SIZE4 = 20;
|
|
1854
1940
|
var ANIMATION_DURATION = 200;
|
|
1855
1941
|
var OPTION_HORIZONTAL_PADDING = 16;
|
|
1856
1942
|
var SegmentedToggle = forwardRef(
|
|
@@ -1917,9 +2003,9 @@ var SegmentedToggle = forwardRef(
|
|
|
1917
2003
|
onLayout?.(event);
|
|
1918
2004
|
},
|
|
1919
2005
|
style: [
|
|
1920
|
-
|
|
1921
|
-
fullWidth ?
|
|
1922
|
-
disabled &&
|
|
2006
|
+
styles6.base,
|
|
2007
|
+
fullWidth ? styles6.fullWidth : styles6.contentWidth,
|
|
2008
|
+
disabled && styles6.disabled,
|
|
1923
2009
|
style
|
|
1924
2010
|
],
|
|
1925
2011
|
accessibilityRole: "radiogroup",
|
|
@@ -1929,7 +2015,7 @@ var SegmentedToggle = forwardRef(
|
|
|
1929
2015
|
{
|
|
1930
2016
|
pointerEvents: "none",
|
|
1931
2017
|
style: [
|
|
1932
|
-
|
|
2018
|
+
styles6.activeIndicator,
|
|
1933
2019
|
{ width: optionWidth, transform: [{ translateX: indicatorTranslateX }] }
|
|
1934
2020
|
]
|
|
1935
2021
|
}
|
|
@@ -1948,8 +2034,8 @@ var SegmentedToggle = forwardRef(
|
|
|
1948
2034
|
accessibilityLabel: label,
|
|
1949
2035
|
accessibilityState: { selected, disabled },
|
|
1950
2036
|
style: [
|
|
1951
|
-
|
|
1952
|
-
fullWidth ?
|
|
2037
|
+
styles6.option,
|
|
2038
|
+
fullWidth ? styles6.optionFullWidth : optionWidth > 0 && { minWidth: optionWidth }
|
|
1953
2039
|
],
|
|
1954
2040
|
children: /* @__PURE__ */ jsxs(
|
|
1955
2041
|
View,
|
|
@@ -1963,10 +2049,10 @@ var SegmentedToggle = forwardRef(
|
|
|
1963
2049
|
return nextWidths;
|
|
1964
2050
|
});
|
|
1965
2051
|
},
|
|
1966
|
-
style:
|
|
2052
|
+
style: styles6.optionContent,
|
|
1967
2053
|
children: [
|
|
1968
|
-
Icon2 ? /* @__PURE__ */ jsx(Icon2, { size:
|
|
1969
|
-
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [
|
|
2054
|
+
Icon2 ? /* @__PURE__ */ jsx(Icon2, { size: ICON_SIZE4, color: iconColor }) : null,
|
|
2055
|
+
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [styles6.label, { color: labelColor }], children: label })
|
|
1970
2056
|
]
|
|
1971
2057
|
}
|
|
1972
2058
|
)
|
|
@@ -1979,7 +2065,7 @@ var SegmentedToggle = forwardRef(
|
|
|
1979
2065
|
);
|
|
1980
2066
|
}
|
|
1981
2067
|
);
|
|
1982
|
-
var
|
|
2068
|
+
var styles6 = StyleSheet.create({
|
|
1983
2069
|
base: {
|
|
1984
2070
|
height: 44,
|
|
1985
2071
|
flexDirection: "row",
|
|
@@ -2037,7 +2123,7 @@ var defaultLanguageOptions = [
|
|
|
2037
2123
|
];
|
|
2038
2124
|
var CONTROL_WIDTH = 90;
|
|
2039
2125
|
var CONTROL_HEIGHT = 35;
|
|
2040
|
-
var
|
|
2126
|
+
var ICON_SIZE5 = 16;
|
|
2041
2127
|
var LanguageSwitcher = forwardRef(
|
|
2042
2128
|
function LanguageSwitcher2({
|
|
2043
2129
|
options = defaultLanguageOptions,
|
|
@@ -2117,7 +2203,7 @@ var LanguageSwitcher = forwardRef(
|
|
|
2117
2203
|
{
|
|
2118
2204
|
...rest,
|
|
2119
2205
|
ref: setWrapperRef,
|
|
2120
|
-
style: [
|
|
2206
|
+
style: [styles7.wrapper, isOpen && styles7.wrapperOpen, disabled && styles7.disabled, style],
|
|
2121
2207
|
children: [
|
|
2122
2208
|
/* @__PURE__ */ jsxs(
|
|
2123
2209
|
Pressable,
|
|
@@ -2132,17 +2218,17 @@ var LanguageSwitcher = forwardRef(
|
|
|
2132
2218
|
onHoverIn: () => setTriggerHovered(true),
|
|
2133
2219
|
onHoverOut: () => setTriggerHovered(false),
|
|
2134
2220
|
style: ({ pressed }) => [
|
|
2135
|
-
|
|
2136
|
-
(triggerHovered || pressed || isOpen) &&
|
|
2221
|
+
styles7.trigger,
|
|
2222
|
+
(triggerHovered || pressed || isOpen) && styles7.triggerActive
|
|
2137
2223
|
],
|
|
2138
2224
|
children: [
|
|
2139
|
-
/* @__PURE__ */ jsx(GlobeIcon, { size:
|
|
2140
|
-
/* @__PURE__ */ jsx(Text, { style:
|
|
2141
|
-
/* @__PURE__ */ jsx(View, { style: [
|
|
2225
|
+
/* @__PURE__ */ jsx(GlobeIcon, { size: ICON_SIZE5, color: colors.white, strokeWidth: 2 }),
|
|
2226
|
+
/* @__PURE__ */ jsx(Text, { style: styles7.triggerLabel, numberOfLines: 1, children: selectedOption?.label ?? "" }),
|
|
2227
|
+
/* @__PURE__ */ jsx(View, { style: [styles7.chevron, isOpen && styles7.chevronOpen], children: /* @__PURE__ */ jsx(ChevronDownIcon, { size: ICON_SIZE5, color: colors.white, strokeWidth: 2 }) })
|
|
2142
2228
|
]
|
|
2143
2229
|
}
|
|
2144
2230
|
),
|
|
2145
|
-
isOpen && options.length > 0 ? /* @__PURE__ */ jsx(View, { style:
|
|
2231
|
+
isOpen && options.length > 0 ? /* @__PURE__ */ jsx(View, { style: styles7.menu, accessibilityRole: "menu", children: options.map((option) => {
|
|
2146
2232
|
const selected = option.value === selectedValue;
|
|
2147
2233
|
return /* @__PURE__ */ jsx(
|
|
2148
2234
|
Pressable,
|
|
@@ -2154,10 +2240,10 @@ var LanguageSwitcher = forwardRef(
|
|
|
2154
2240
|
onHoverIn: () => setHoveredValue(option.value),
|
|
2155
2241
|
onHoverOut: () => setHoveredValue(null),
|
|
2156
2242
|
style: ({ pressed }) => [
|
|
2157
|
-
|
|
2158
|
-
selected ?
|
|
2243
|
+
styles7.item,
|
|
2244
|
+
selected ? styles7.itemSelected : (hoveredValue === option.value || pressed) && styles7.itemHovered
|
|
2159
2245
|
],
|
|
2160
|
-
children: /* @__PURE__ */ jsx(Text, { style: [
|
|
2246
|
+
children: /* @__PURE__ */ jsx(Text, { style: [styles7.itemLabel, selected && styles7.itemLabelSelected], children: option.label })
|
|
2161
2247
|
},
|
|
2162
2248
|
option.value
|
|
2163
2249
|
);
|
|
@@ -2167,7 +2253,7 @@ var LanguageSwitcher = forwardRef(
|
|
|
2167
2253
|
);
|
|
2168
2254
|
}
|
|
2169
2255
|
);
|
|
2170
|
-
var
|
|
2256
|
+
var styles7 = StyleSheet.create({
|
|
2171
2257
|
wrapper: {
|
|
2172
2258
|
position: "relative",
|
|
2173
2259
|
width: CONTROL_WIDTH,
|
|
@@ -2200,8 +2286,8 @@ var styles6 = StyleSheet.create({
|
|
|
2200
2286
|
color: colors.white
|
|
2201
2287
|
},
|
|
2202
2288
|
chevron: {
|
|
2203
|
-
width:
|
|
2204
|
-
height:
|
|
2289
|
+
width: ICON_SIZE5,
|
|
2290
|
+
height: ICON_SIZE5,
|
|
2205
2291
|
flexShrink: 0,
|
|
2206
2292
|
alignItems: "center",
|
|
2207
2293
|
justifyContent: "center"
|
|
@@ -2243,8 +2329,17 @@ var styles6 = StyleSheet.create({
|
|
|
2243
2329
|
color: colors.primary
|
|
2244
2330
|
}
|
|
2245
2331
|
});
|
|
2246
|
-
var
|
|
2247
|
-
var StatCard = forwardRef(function StatCard2({
|
|
2332
|
+
var ICON_SIZE6 = 28;
|
|
2333
|
+
var StatCard = forwardRef(function StatCard2({
|
|
2334
|
+
label,
|
|
2335
|
+
icon: Icon2,
|
|
2336
|
+
iconProps,
|
|
2337
|
+
iconSize = ICON_SIZE6,
|
|
2338
|
+
style,
|
|
2339
|
+
className,
|
|
2340
|
+
accessibilityLabel,
|
|
2341
|
+
...rest
|
|
2342
|
+
}, forwardedRef) {
|
|
2248
2343
|
const containerRef = useRef(null);
|
|
2249
2344
|
const resolvedClassName = className?.trim() || void 0;
|
|
2250
2345
|
const setContainerRef = useMemo(() => mergeRefs(containerRef, forwardedRef), [forwardedRef]);
|
|
@@ -2254,17 +2349,17 @@ var StatCard = forwardRef(function StatCard2({ label, icon: Icon2, style, classN
|
|
|
2254
2349
|
{
|
|
2255
2350
|
...rest,
|
|
2256
2351
|
ref: setContainerRef,
|
|
2257
|
-
style: [
|
|
2352
|
+
style: [styles8.base, style],
|
|
2258
2353
|
accessibilityRole: "text",
|
|
2259
2354
|
accessibilityLabel: accessibilityLabel ?? label,
|
|
2260
2355
|
children: [
|
|
2261
|
-
/* @__PURE__ */ jsx(Icon2, { size:
|
|
2262
|
-
/* @__PURE__ */ jsx(Text, { style:
|
|
2356
|
+
/* @__PURE__ */ jsx(Icon2, { ...iconProps, size: iconSize, color: iconProps?.color ?? colors.white }),
|
|
2357
|
+
/* @__PURE__ */ jsx(Text, { style: styles8.label, children: label })
|
|
2263
2358
|
]
|
|
2264
2359
|
}
|
|
2265
2360
|
);
|
|
2266
2361
|
});
|
|
2267
|
-
var
|
|
2362
|
+
var styles8 = StyleSheet.create({
|
|
2268
2363
|
base: {
|
|
2269
2364
|
width: 204.5,
|
|
2270
2365
|
minHeight: 114,
|
|
@@ -2350,7 +2445,7 @@ var Button = forwardRef(
|
|
|
2350
2445
|
useApplyWebClassName(textRef, textClassName);
|
|
2351
2446
|
const iconNode = customIcon ?? /* @__PURE__ */ jsx(ArrowRightIcon, { size: metrics.iconSize, color: preset.iconColor });
|
|
2352
2447
|
const containerStyle = [
|
|
2353
|
-
|
|
2448
|
+
styles9.base,
|
|
2354
2449
|
{
|
|
2355
2450
|
minHeight: metrics.minHeight,
|
|
2356
2451
|
borderRadius: metrics.borderRadius,
|
|
@@ -2361,16 +2456,16 @@ var Button = forwardRef(
|
|
|
2361
2456
|
paddingRight: hasIcon ? metrics.paddingRightWithIcon : metrics.paddingRight,
|
|
2362
2457
|
gap: hasIcon ? metrics.gap : 0
|
|
2363
2458
|
},
|
|
2364
|
-
hasIcon ?
|
|
2365
|
-
disabled &&
|
|
2459
|
+
hasIcon ? styles9.contentWithIcon : styles9.contentWithoutIcon,
|
|
2460
|
+
disabled && styles9.disabled,
|
|
2366
2461
|
style
|
|
2367
2462
|
];
|
|
2368
2463
|
const labelStyle = [
|
|
2369
|
-
|
|
2464
|
+
styles9.label,
|
|
2370
2465
|
metrics.text,
|
|
2371
2466
|
{ color: preset.textColor },
|
|
2372
|
-
Platform.OS === "android" ?
|
|
2373
|
-
!hasIcon &&
|
|
2467
|
+
Platform.OS === "android" ? styles9.labelAndroid : null,
|
|
2468
|
+
!hasIcon && styles9.labelCentered,
|
|
2374
2469
|
textStyle
|
|
2375
2470
|
];
|
|
2376
2471
|
return /* @__PURE__ */ jsxs(
|
|
@@ -2391,7 +2486,7 @@ var Button = forwardRef(
|
|
|
2391
2486
|
View,
|
|
2392
2487
|
{
|
|
2393
2488
|
style: [
|
|
2394
|
-
|
|
2489
|
+
styles9.iconContainer,
|
|
2395
2490
|
{
|
|
2396
2491
|
width: metrics.iconContainerSize,
|
|
2397
2492
|
height: metrics.iconContainerSize,
|
|
@@ -2407,7 +2502,7 @@ var Button = forwardRef(
|
|
|
2407
2502
|
);
|
|
2408
2503
|
}
|
|
2409
2504
|
);
|
|
2410
|
-
var
|
|
2505
|
+
var styles9 = StyleSheet.create({
|
|
2411
2506
|
base: {
|
|
2412
2507
|
flexDirection: "row",
|
|
2413
2508
|
alignItems: "center",
|
|
@@ -2491,13 +2586,13 @@ var Checkbox = forwardRef(function Checkbox2({
|
|
|
2491
2586
|
accessibilityRole: "checkbox",
|
|
2492
2587
|
accessibilityLabel: resolvedAccessibilityLabel,
|
|
2493
2588
|
accessibilityState: { checked: isActive, disabled },
|
|
2494
|
-
style: [
|
|
2589
|
+
style: [styles10.root, disabled && styles10.disabled, style],
|
|
2495
2590
|
children: [
|
|
2496
2591
|
/* @__PURE__ */ jsx(
|
|
2497
2592
|
View,
|
|
2498
2593
|
{
|
|
2499
2594
|
style: [
|
|
2500
|
-
|
|
2595
|
+
styles10.box,
|
|
2501
2596
|
{
|
|
2502
2597
|
backgroundColor: chrome.backgroundColor,
|
|
2503
2598
|
borderColor: chrome.borderColor
|
|
@@ -2506,12 +2601,12 @@ var Checkbox = forwardRef(function Checkbox2({
|
|
|
2506
2601
|
children: isActive ? /* @__PURE__ */ jsx(CheckIcon, { size: CHECK_SIZE, color: colors.primary, strokeWidth: CHECK_STROKE }) : null
|
|
2507
2602
|
}
|
|
2508
2603
|
),
|
|
2509
|
-
labelContent != null && labelContent !== false ? typeof labelContent === "string" || typeof labelContent === "number" ? /* @__PURE__ */ jsx(Text, { style: [
|
|
2604
|
+
labelContent != null && labelContent !== false ? typeof labelContent === "string" || typeof labelContent === "number" ? /* @__PURE__ */ jsx(Text, { style: [styles10.label, labelStyle], children: labelContent }) : labelContent : null
|
|
2510
2605
|
]
|
|
2511
2606
|
}
|
|
2512
2607
|
);
|
|
2513
2608
|
});
|
|
2514
|
-
var
|
|
2609
|
+
var styles10 = StyleSheet.create({
|
|
2515
2610
|
root: {
|
|
2516
2611
|
flexDirection: "row",
|
|
2517
2612
|
alignItems: "center",
|
|
@@ -2609,7 +2704,7 @@ var DEFAULT_WIDTH = 380;
|
|
|
2609
2704
|
var TRIGGER_HEIGHT = 44;
|
|
2610
2705
|
var TRIGGER_RADIUS = 60;
|
|
2611
2706
|
var MENU_RADIUS2 = 20;
|
|
2612
|
-
var
|
|
2707
|
+
var ICON_SIZE7 = 20;
|
|
2613
2708
|
var NAV_ICON_SIZE = 20;
|
|
2614
2709
|
var DAY_CELL_HEIGHT = 44;
|
|
2615
2710
|
var DAY_CIRCLE_SIZE = 44;
|
|
@@ -2762,9 +2857,9 @@ var DatePicker = forwardRef(
|
|
|
2762
2857
|
{
|
|
2763
2858
|
...rest,
|
|
2764
2859
|
ref: setRootRef,
|
|
2765
|
-
style: [
|
|
2860
|
+
style: [styles11.root, isOpen && styles11.rootOpen, disabled && styles11.disabled, style],
|
|
2766
2861
|
accessibilityState: { disabled, expanded: isOpen },
|
|
2767
|
-
children: /* @__PURE__ */ jsxs(View, { style: [
|
|
2862
|
+
children: /* @__PURE__ */ jsxs(View, { style: [styles11.triggerWrap, isOpen && styles11.triggerWrapOpen], children: [
|
|
2768
2863
|
/* @__PURE__ */ jsxs(
|
|
2769
2864
|
Pressable,
|
|
2770
2865
|
{
|
|
@@ -2775,17 +2870,17 @@ var DatePicker = forwardRef(
|
|
|
2775
2870
|
accessibilityLabel: resolvedAccessibilityLabel,
|
|
2776
2871
|
accessibilityState: { disabled, expanded: isOpen },
|
|
2777
2872
|
style: [
|
|
2778
|
-
|
|
2873
|
+
styles11.trigger,
|
|
2779
2874
|
{ borderColor: triggerBorderColor, backgroundColor: colors.grey700 }
|
|
2780
2875
|
],
|
|
2781
2876
|
children: [
|
|
2782
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
2783
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
2877
|
+
/* @__PURE__ */ jsx(Text, { style: [styles11.triggerText, { color: triggerTextColor }], numberOfLines: 1, children: triggerLabel }),
|
|
2878
|
+
/* @__PURE__ */ jsx(View, { style: styles11.iconSlot, children: /* @__PURE__ */ jsx(CalendarOutlineIcon, { size: ICON_SIZE7, color: colors.grey100 }) })
|
|
2784
2879
|
]
|
|
2785
2880
|
}
|
|
2786
2881
|
),
|
|
2787
|
-
isOpen ? /* @__PURE__ */ jsxs(View, { style: [
|
|
2788
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
2882
|
+
isOpen ? /* @__PURE__ */ jsxs(View, { style: [styles11.menu, calendarStyle], children: [
|
|
2883
|
+
/* @__PURE__ */ jsxs(View, { style: styles11.calendarHeader, children: [
|
|
2789
2884
|
/* @__PURE__ */ jsx(
|
|
2790
2885
|
Pressable,
|
|
2791
2886
|
{
|
|
@@ -2793,11 +2888,11 @@ var DatePicker = forwardRef(
|
|
|
2793
2888
|
hitSlop: 8,
|
|
2794
2889
|
accessibilityRole: "button",
|
|
2795
2890
|
accessibilityLabel: "Previous month",
|
|
2796
|
-
style:
|
|
2891
|
+
style: styles11.navButton,
|
|
2797
2892
|
children: /* @__PURE__ */ jsx(ChevronLeftIcon, { size: NAV_ICON_SIZE, color: colors.white })
|
|
2798
2893
|
}
|
|
2799
2894
|
),
|
|
2800
|
-
/* @__PURE__ */ jsxs(Text, { style:
|
|
2895
|
+
/* @__PURE__ */ jsxs(Text, { style: styles11.monthHeading, children: [
|
|
2801
2896
|
monthNames[visibleMonth.getMonth()],
|
|
2802
2897
|
" ",
|
|
2803
2898
|
visibleMonth.getFullYear()
|
|
@@ -2809,13 +2904,13 @@ var DatePicker = forwardRef(
|
|
|
2809
2904
|
hitSlop: 8,
|
|
2810
2905
|
accessibilityRole: "button",
|
|
2811
2906
|
accessibilityLabel: "Next month",
|
|
2812
|
-
style:
|
|
2813
|
-
children: /* @__PURE__ */ jsx(View, { style:
|
|
2907
|
+
style: styles11.navButton,
|
|
2908
|
+
children: /* @__PURE__ */ jsx(View, { style: styles11.navIconMirror, children: /* @__PURE__ */ jsx(ChevronLeftIcon, { size: NAV_ICON_SIZE, color: colors.white }) })
|
|
2814
2909
|
}
|
|
2815
2910
|
)
|
|
2816
2911
|
] }),
|
|
2817
2912
|
/* @__PURE__ */ jsxs(View, { children: [
|
|
2818
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
2913
|
+
/* @__PURE__ */ jsx(View, { style: styles11.weekdayRow, children: weekdayLabels.map((weekdayLabel, index) => /* @__PURE__ */ jsx(View, { style: styles11.dayCellWrap, children: /* @__PURE__ */ jsx(Text, { style: styles11.weekdayText, children: weekdayLabel }) }, `${weekdayLabel}-${index}`)) }),
|
|
2819
2914
|
weeks.map((week, weekIndex) => {
|
|
2820
2915
|
let rangeHighlightStyle = null;
|
|
2821
2916
|
if (isRange && rangeValue.start && rangeValue.end) {
|
|
@@ -2852,13 +2947,13 @@ var DatePicker = forwardRef(
|
|
|
2852
2947
|
return /* @__PURE__ */ jsxs(
|
|
2853
2948
|
View,
|
|
2854
2949
|
{
|
|
2855
|
-
style: [
|
|
2950
|
+
style: [styles11.weekRow, weekIndex > 0 && styles11.weekRowSpaced],
|
|
2856
2951
|
children: [
|
|
2857
2952
|
rangeHighlightStyle ? /* @__PURE__ */ jsx(
|
|
2858
2953
|
View,
|
|
2859
2954
|
{
|
|
2860
2955
|
pointerEvents: "none",
|
|
2861
|
-
style: [
|
|
2956
|
+
style: [styles11.rangeHighlight, rangeHighlightStyle]
|
|
2862
2957
|
}
|
|
2863
2958
|
) : null,
|
|
2864
2959
|
week.map((day, dayIndex) => {
|
|
@@ -2881,7 +2976,7 @@ var DatePicker = forwardRef(
|
|
|
2881
2976
|
onHoverOut: () => setHoveredDayKey((current) => current === dayKey ? null : current),
|
|
2882
2977
|
onPressIn: () => setHoveredDayKey(dayKey),
|
|
2883
2978
|
onPressOut: () => setHoveredDayKey((current) => current === dayKey ? null : current),
|
|
2884
|
-
style:
|
|
2979
|
+
style: styles11.dayCellWrap,
|
|
2885
2980
|
accessibilityRole: "button",
|
|
2886
2981
|
accessibilityLabel: formatValue(day),
|
|
2887
2982
|
accessibilityState: {
|
|
@@ -2893,14 +2988,14 @@ var DatePicker = forwardRef(
|
|
|
2893
2988
|
View,
|
|
2894
2989
|
{
|
|
2895
2990
|
style: [
|
|
2896
|
-
|
|
2897
|
-
isSelectedEndpoint &&
|
|
2898
|
-
isHovered &&
|
|
2991
|
+
styles11.dayCircle,
|
|
2992
|
+
isSelectedEndpoint && styles11.dayCircleSelected,
|
|
2993
|
+
isHovered && styles11.dayCircleHovered
|
|
2899
2994
|
],
|
|
2900
|
-
children: /* @__PURE__ */ jsx(Text, { style: [
|
|
2995
|
+
children: /* @__PURE__ */ jsx(Text, { style: [styles11.dayText, { color: dayTextColor }], children: day.getDate() })
|
|
2901
2996
|
}
|
|
2902
2997
|
),
|
|
2903
|
-
isToday && !isSelectedEndpoint ? /* @__PURE__ */ jsx(View, { style:
|
|
2998
|
+
isToday && !isSelectedEndpoint ? /* @__PURE__ */ jsx(View, { style: styles11.todayDot }) : null
|
|
2904
2999
|
]
|
|
2905
3000
|
},
|
|
2906
3001
|
dayIndex
|
|
@@ -2918,7 +3013,7 @@ var DatePicker = forwardRef(
|
|
|
2918
3013
|
);
|
|
2919
3014
|
}
|
|
2920
3015
|
);
|
|
2921
|
-
var
|
|
3016
|
+
var styles11 = StyleSheet.create({
|
|
2922
3017
|
root: {
|
|
2923
3018
|
width: DEFAULT_WIDTH,
|
|
2924
3019
|
gap: 8,
|
|
@@ -2954,8 +3049,8 @@ var styles10 = StyleSheet.create({
|
|
|
2954
3049
|
minWidth: 0
|
|
2955
3050
|
},
|
|
2956
3051
|
iconSlot: {
|
|
2957
|
-
width:
|
|
2958
|
-
height:
|
|
3052
|
+
width: ICON_SIZE7,
|
|
3053
|
+
height: ICON_SIZE7,
|
|
2959
3054
|
alignItems: "center",
|
|
2960
3055
|
justifyContent: "center",
|
|
2961
3056
|
flexShrink: 0
|
|
@@ -3197,13 +3292,13 @@ var Input = forwardRef(function Input2({
|
|
|
3197
3292
|
});
|
|
3198
3293
|
useApplyWebClassName(rootRef, className);
|
|
3199
3294
|
useApplyWebClassName(inputRef, inputClassName);
|
|
3200
|
-
return /* @__PURE__ */ jsxs(View, { ref: rootRef, style: [
|
|
3201
|
-
showLabel && label ? /* @__PURE__ */ jsx(Text, { style: [
|
|
3295
|
+
return /* @__PURE__ */ jsxs(View, { ref: rootRef, style: [styles12.root, disabled && styles12.disabled, style], children: [
|
|
3296
|
+
showLabel && label ? /* @__PURE__ */ jsx(Text, { style: [styles12.label, { color: chrome.labelColor }], children: label }) : null,
|
|
3202
3297
|
/* @__PURE__ */ jsxs(
|
|
3203
3298
|
View,
|
|
3204
3299
|
{
|
|
3205
3300
|
style: [
|
|
3206
|
-
|
|
3301
|
+
styles12.field,
|
|
3207
3302
|
{
|
|
3208
3303
|
height: metrics.height,
|
|
3209
3304
|
borderRadius: metrics.borderRadius,
|
|
@@ -3218,7 +3313,7 @@ var Input = forwardRef(function Input2({
|
|
|
3218
3313
|
fieldStyle
|
|
3219
3314
|
],
|
|
3220
3315
|
children: [
|
|
3221
|
-
hasLeftIcon ? /* @__PURE__ */ jsx(View, { style: [
|
|
3316
|
+
hasLeftIcon ? /* @__PURE__ */ jsx(View, { style: [styles12.iconSlot, { width: metrics.iconSize, height: metrics.iconSize }], children: leftIconNode }) : null,
|
|
3222
3317
|
/* @__PURE__ */ jsx(
|
|
3223
3318
|
TextInput,
|
|
3224
3319
|
{
|
|
@@ -3242,11 +3337,11 @@ var Input = forwardRef(function Input2({
|
|
|
3242
3337
|
onBlur?.(event);
|
|
3243
3338
|
},
|
|
3244
3339
|
style: [
|
|
3245
|
-
|
|
3340
|
+
styles12.input,
|
|
3246
3341
|
metrics.text,
|
|
3247
3342
|
{ color: chrome.textColor },
|
|
3248
|
-
Platform.OS === "web" ?
|
|
3249
|
-
Platform.OS === "android" ?
|
|
3343
|
+
Platform.OS === "web" ? styles12.inputWeb : null,
|
|
3344
|
+
Platform.OS === "android" ? styles12.inputAndroid : null,
|
|
3250
3345
|
inputStyle
|
|
3251
3346
|
],
|
|
3252
3347
|
accessibilityLabel: resolvedAccessibilityLabel,
|
|
@@ -3258,20 +3353,20 @@ var Input = forwardRef(function Input2({
|
|
|
3258
3353
|
{
|
|
3259
3354
|
onPress: onRightIconPress,
|
|
3260
3355
|
disabled,
|
|
3261
|
-
style: [
|
|
3356
|
+
style: [styles12.iconSlot, { width: metrics.iconSize, height: metrics.iconSize }],
|
|
3262
3357
|
accessibilityRole: "button",
|
|
3263
3358
|
accessibilityLabel: rightIconAccessibilityLabel,
|
|
3264
3359
|
hitSlop: 8,
|
|
3265
3360
|
children: rightIconNode
|
|
3266
3361
|
}
|
|
3267
|
-
) : /* @__PURE__ */ jsx(View, { style: [
|
|
3362
|
+
) : /* @__PURE__ */ jsx(View, { style: [styles12.iconSlot, { width: metrics.iconSize, height: metrics.iconSize }], children: rightIconNode }) : null
|
|
3268
3363
|
]
|
|
3269
3364
|
}
|
|
3270
3365
|
),
|
|
3271
|
-
showHint && hint ? /* @__PURE__ */ jsx(Text, { style: [
|
|
3366
|
+
showHint && hint ? /* @__PURE__ */ jsx(Text, { style: [styles12.hint, { color: chrome.hintColor }], children: hint }) : null
|
|
3272
3367
|
] });
|
|
3273
3368
|
});
|
|
3274
|
-
var
|
|
3369
|
+
var styles12 = StyleSheet.create({
|
|
3275
3370
|
root: {
|
|
3276
3371
|
width: DEFAULT_WIDTH2,
|
|
3277
3372
|
gap: 8,
|
|
@@ -3314,7 +3409,7 @@ var TRIGGER_RADIUS2 = 60;
|
|
|
3314
3409
|
var MENU_RADIUS3 = 24;
|
|
3315
3410
|
var MENU_MAX_LIST_HEIGHT = 248;
|
|
3316
3411
|
var ITEM_RADIUS2 = 12;
|
|
3317
|
-
var
|
|
3412
|
+
var ICON_SIZE8 = 20;
|
|
3318
3413
|
var CHIP_GAP = 6;
|
|
3319
3414
|
var FALLBACK_ELLIPSIS_WIDTH = 20;
|
|
3320
3415
|
function itemBackground(state) {
|
|
@@ -3387,25 +3482,25 @@ function MultiValueChips({ options, disabled, onRemove }) {
|
|
|
3387
3482
|
const next = Math.ceil(event.nativeEvent.layout.width);
|
|
3388
3483
|
setEllipsisWidth((current) => current === next ? current : next);
|
|
3389
3484
|
};
|
|
3390
|
-
return /* @__PURE__ */ jsxs(View, { style:
|
|
3391
|
-
/* @__PURE__ */ jsxs(View, { pointerEvents: "none", style:
|
|
3485
|
+
return /* @__PURE__ */ jsxs(View, { style: styles13.multiValueRoot, children: [
|
|
3486
|
+
/* @__PURE__ */ jsxs(View, { pointerEvents: "none", style: styles13.measureRow, children: [
|
|
3392
3487
|
options.map((option) => /* @__PURE__ */ jsxs(
|
|
3393
3488
|
View,
|
|
3394
3489
|
{
|
|
3395
|
-
style:
|
|
3490
|
+
style: styles13.chip,
|
|
3396
3491
|
onLayout: (event) => handleChipLayout(option.value, event),
|
|
3397
3492
|
children: [
|
|
3398
|
-
/* @__PURE__ */ jsx(Text, { style:
|
|
3399
|
-
/* @__PURE__ */ jsx(Text, { style:
|
|
3493
|
+
/* @__PURE__ */ jsx(Text, { style: styles13.chipLabel, numberOfLines: 1, children: option.label }),
|
|
3494
|
+
/* @__PURE__ */ jsx(Text, { style: styles13.chipRemove, children: "\xD7" })
|
|
3400
3495
|
]
|
|
3401
3496
|
},
|
|
3402
3497
|
`measure-${option.value}`
|
|
3403
3498
|
)),
|
|
3404
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
3499
|
+
/* @__PURE__ */ jsx(View, { style: styles13.ellipsis, onLayout: handleEllipsisLayout, children: /* @__PURE__ */ jsx(Text, { style: styles13.ellipsisText, children: "..." }) })
|
|
3405
3500
|
] }),
|
|
3406
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
3407
|
-
visible.map((option) => /* @__PURE__ */ jsxs(View, { style:
|
|
3408
|
-
/* @__PURE__ */ jsx(Text, { style:
|
|
3501
|
+
/* @__PURE__ */ jsxs(View, { style: styles13.chipsRow, onLayout: handleContainerLayout, children: [
|
|
3502
|
+
visible.map((option) => /* @__PURE__ */ jsxs(View, { style: styles13.chip, children: [
|
|
3503
|
+
/* @__PURE__ */ jsx(Text, { style: styles13.chipLabel, numberOfLines: 1, children: option.label }),
|
|
3409
3504
|
/* @__PURE__ */ jsx(
|
|
3410
3505
|
Pressable,
|
|
3411
3506
|
{
|
|
@@ -3417,11 +3512,11 @@ function MultiValueChips({ options, disabled, onRemove }) {
|
|
|
3417
3512
|
hitSlop: 6,
|
|
3418
3513
|
accessibilityRole: "button",
|
|
3419
3514
|
accessibilityLabel: `Remove ${option.label}`,
|
|
3420
|
-
children: /* @__PURE__ */ jsx(Text, { style:
|
|
3515
|
+
children: /* @__PURE__ */ jsx(Text, { style: styles13.chipRemove, children: "\xD7" })
|
|
3421
3516
|
}
|
|
3422
3517
|
)
|
|
3423
3518
|
] }, option.value)),
|
|
3424
|
-
hasOverflow ? /* @__PURE__ */ jsx(View, { style:
|
|
3519
|
+
hasOverflow ? /* @__PURE__ */ jsx(View, { style: styles13.ellipsis, children: /* @__PURE__ */ jsx(Text, { style: styles13.ellipsisText, children: "..." }) }) : null
|
|
3425
3520
|
] })
|
|
3426
3521
|
] });
|
|
3427
3522
|
}
|
|
@@ -3630,7 +3725,7 @@ var Select = forwardRef(
|
|
|
3630
3725
|
setOpen
|
|
3631
3726
|
]);
|
|
3632
3727
|
const leftIconNode = renderStatefulIcon(leftIcon, UserIcon, {
|
|
3633
|
-
size:
|
|
3728
|
+
size: ICON_SIZE8,
|
|
3634
3729
|
color: error ? colors.red : isOpen ? colors.primary : colors.grey100
|
|
3635
3730
|
});
|
|
3636
3731
|
const hasLeftIcon = showLeftIcon || leftIcon != null;
|
|
@@ -3645,11 +3740,11 @@ var Select = forwardRef(
|
|
|
3645
3740
|
{
|
|
3646
3741
|
...rest,
|
|
3647
3742
|
ref: setRootRef,
|
|
3648
|
-
style: [
|
|
3743
|
+
style: [styles13.root, isOpen && styles13.rootOpen, disabled && styles13.disabled, style],
|
|
3649
3744
|
accessibilityState: { disabled, expanded: isOpen },
|
|
3650
3745
|
children: [
|
|
3651
|
-
showLabel && label ? /* @__PURE__ */ jsx(Text, { style: [
|
|
3652
|
-
/* @__PURE__ */ jsxs(View, { style: [
|
|
3746
|
+
showLabel && label ? /* @__PURE__ */ jsx(Text, { style: [styles13.label, { color: labelColor }], children: label }) : null,
|
|
3747
|
+
/* @__PURE__ */ jsxs(View, { style: [styles13.triggerWrap, isOpen && styles13.triggerWrapOpen], children: [
|
|
3653
3748
|
/* @__PURE__ */ jsxs(
|
|
3654
3749
|
Pressable,
|
|
3655
3750
|
{
|
|
@@ -3660,29 +3755,29 @@ var Select = forwardRef(
|
|
|
3660
3755
|
accessibilityLabel: resolvedAccessibilityLabel,
|
|
3661
3756
|
accessibilityState: { disabled, expanded: isOpen },
|
|
3662
3757
|
style: [
|
|
3663
|
-
|
|
3758
|
+
styles13.trigger,
|
|
3664
3759
|
{
|
|
3665
3760
|
borderColor: triggerBorderColor,
|
|
3666
3761
|
backgroundColor: colors.grey700
|
|
3667
3762
|
}
|
|
3668
3763
|
],
|
|
3669
3764
|
children: [
|
|
3670
|
-
hasLeftIcon ? /* @__PURE__ */ jsx(View, { style:
|
|
3671
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
3765
|
+
hasLeftIcon ? /* @__PURE__ */ jsx(View, { style: styles13.iconSlot, children: leftIconNode }) : null,
|
|
3766
|
+
/* @__PURE__ */ jsx(View, { style: styles13.triggerContent, children: multiple && hasValue ? /* @__PURE__ */ jsx(
|
|
3672
3767
|
MultiValueChips,
|
|
3673
3768
|
{
|
|
3674
3769
|
options: selectedOptions,
|
|
3675
3770
|
disabled,
|
|
3676
3771
|
onRemove: handleRemoveChip
|
|
3677
3772
|
}
|
|
3678
|
-
) : /* @__PURE__ */ jsx(Text, { style: [
|
|
3679
|
-
/* @__PURE__ */ jsx(View, { style: [
|
|
3773
|
+
) : /* @__PURE__ */ jsx(Text, { style: [styles13.triggerText, { color: triggerTextColor }], numberOfLines: 1, children: multiple ? placeholder : singleLabel }) }),
|
|
3774
|
+
/* @__PURE__ */ jsx(View, { style: [styles13.iconSlot, isOpen && styles13.chevronOpen], children: /* @__PURE__ */ jsx(ChevronDownIcon, { size: ICON_SIZE8, color: isOpen ? colors.primary : colors.grey100 }) })
|
|
3680
3775
|
]
|
|
3681
3776
|
}
|
|
3682
3777
|
),
|
|
3683
|
-
isOpen ? /* @__PURE__ */ jsxs(View, { style:
|
|
3684
|
-
showSearch ? /* @__PURE__ */ jsxs(View, { style:
|
|
3685
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
3778
|
+
isOpen ? /* @__PURE__ */ jsxs(View, { style: styles13.menu, children: [
|
|
3779
|
+
showSearch ? /* @__PURE__ */ jsxs(View, { style: styles13.searchField, children: [
|
|
3780
|
+
/* @__PURE__ */ jsx(View, { style: styles13.iconSlot, children: /* @__PURE__ */ jsx(SearchIcon, { size: ICON_SIZE8, color: colors.grey100 }) }),
|
|
3686
3781
|
/* @__PURE__ */ jsx(
|
|
3687
3782
|
TextInput,
|
|
3688
3783
|
{
|
|
@@ -3693,9 +3788,9 @@ var Select = forwardRef(
|
|
|
3693
3788
|
placeholder: searchPlaceholder,
|
|
3694
3789
|
placeholderTextColor: colors.grey100,
|
|
3695
3790
|
style: [
|
|
3696
|
-
|
|
3697
|
-
Platform.OS === "web" ?
|
|
3698
|
-
Platform.OS === "android" ?
|
|
3791
|
+
styles13.searchInput,
|
|
3792
|
+
Platform.OS === "web" ? styles13.searchInputWeb : null,
|
|
3793
|
+
Platform.OS === "android" ? styles13.searchInputAndroid : null
|
|
3699
3794
|
],
|
|
3700
3795
|
accessibilityLabel: searchPlaceholder
|
|
3701
3796
|
}
|
|
@@ -3704,12 +3799,12 @@ var Select = forwardRef(
|
|
|
3704
3799
|
/* @__PURE__ */ jsxs(
|
|
3705
3800
|
ScrollView,
|
|
3706
3801
|
{
|
|
3707
|
-
style:
|
|
3708
|
-
contentContainerStyle:
|
|
3802
|
+
style: styles13.optionList,
|
|
3803
|
+
contentContainerStyle: styles13.optionListContent,
|
|
3709
3804
|
keyboardShouldPersistTaps: "handled",
|
|
3710
3805
|
showsVerticalScrollIndicator: false,
|
|
3711
3806
|
children: [
|
|
3712
|
-
loading ? /* @__PURE__ */ jsx(View, { style:
|
|
3807
|
+
loading ? /* @__PURE__ */ jsx(View, { style: styles13.statusRow, children: /* @__PURE__ */ jsx(Text, { style: styles13.statusText, children: "Loading..." }) }) : filteredOptions.length === 0 ? /* @__PURE__ */ jsx(View, { style: styles13.statusRow, children: /* @__PURE__ */ jsx(Text, { style: styles13.statusText, children: emptyText }) }) : null,
|
|
3713
3808
|
!loading && filteredOptions.map((option) => {
|
|
3714
3809
|
const isSelected = selectedValues.includes(option.value);
|
|
3715
3810
|
const isHovered = hoveredValue === option.value;
|
|
@@ -3726,14 +3821,14 @@ var Select = forwardRef(
|
|
|
3726
3821
|
accessibilityRole: multiple ? "checkbox" : "button",
|
|
3727
3822
|
accessibilityState: { selected: isSelected, checked: isSelected, disabled },
|
|
3728
3823
|
style: [
|
|
3729
|
-
|
|
3824
|
+
styles13.item,
|
|
3730
3825
|
{
|
|
3731
3826
|
backgroundColor: itemBackground(visualState)
|
|
3732
3827
|
}
|
|
3733
3828
|
],
|
|
3734
3829
|
children: [
|
|
3735
|
-
multiple ? /* @__PURE__ */ jsx(View, { pointerEvents: "none", style:
|
|
3736
|
-
/* @__PURE__ */ jsx(Text, { style:
|
|
3830
|
+
multiple ? /* @__PURE__ */ jsx(View, { pointerEvents: "none", style: styles13.itemCheckbox, children: /* @__PURE__ */ jsx(Checkbox, { value: isSelected, variant: "light" }) }) : null,
|
|
3831
|
+
/* @__PURE__ */ jsx(Text, { style: styles13.itemLabel, numberOfLines: 1, children: option.label })
|
|
3737
3832
|
]
|
|
3738
3833
|
},
|
|
3739
3834
|
option.value
|
|
@@ -3744,13 +3839,13 @@ var Select = forwardRef(
|
|
|
3744
3839
|
)
|
|
3745
3840
|
] }) : null
|
|
3746
3841
|
] }),
|
|
3747
|
-
showHint && hint ? /* @__PURE__ */ jsx(Text, { style: [
|
|
3842
|
+
showHint && hint ? /* @__PURE__ */ jsx(Text, { style: [styles13.hint, { color: hintColor }], children: hint }) : null
|
|
3748
3843
|
]
|
|
3749
3844
|
}
|
|
3750
3845
|
);
|
|
3751
3846
|
}
|
|
3752
3847
|
);
|
|
3753
|
-
var
|
|
3848
|
+
var styles13 = StyleSheet.create({
|
|
3754
3849
|
root: {
|
|
3755
3850
|
width: DEFAULT_WIDTH3,
|
|
3756
3851
|
gap: 8,
|
|
@@ -3840,8 +3935,8 @@ var styles12 = StyleSheet.create({
|
|
|
3840
3935
|
lineHeight: 16
|
|
3841
3936
|
},
|
|
3842
3937
|
iconSlot: {
|
|
3843
|
-
width:
|
|
3844
|
-
height:
|
|
3938
|
+
width: ICON_SIZE8,
|
|
3939
|
+
height: ICON_SIZE8,
|
|
3845
3940
|
alignItems: "center",
|
|
3846
3941
|
justifyContent: "center",
|
|
3847
3942
|
flexShrink: 0
|
|
@@ -4012,13 +4107,13 @@ var Textarea = forwardRef(function Textarea2({
|
|
|
4012
4107
|
const resolvedAccessibilityLabel = accessibilityLabel ?? (showLabel ? void 0 : label);
|
|
4013
4108
|
useApplyWebClassName(rootRef, className);
|
|
4014
4109
|
useApplyWebClassName(inputRef, inputClassName);
|
|
4015
|
-
return /* @__PURE__ */ jsxs(View, { ref: rootRef, style: [
|
|
4016
|
-
showLabel && label ? /* @__PURE__ */ jsx(Text, { style: [
|
|
4110
|
+
return /* @__PURE__ */ jsxs(View, { ref: rootRef, style: [styles14.root, disabled && styles14.disabled, style], children: [
|
|
4111
|
+
showLabel && label ? /* @__PURE__ */ jsx(Text, { style: [styles14.label, { color: chrome.labelColor }], children: label }) : null,
|
|
4017
4112
|
/* @__PURE__ */ jsx(
|
|
4018
4113
|
View,
|
|
4019
4114
|
{
|
|
4020
4115
|
style: [
|
|
4021
|
-
|
|
4116
|
+
styles14.field,
|
|
4022
4117
|
{
|
|
4023
4118
|
borderColor: chrome.borderColor,
|
|
4024
4119
|
backgroundColor: chrome.backgroundColor
|
|
@@ -4050,11 +4145,11 @@ var Textarea = forwardRef(function Textarea2({
|
|
|
4050
4145
|
onBlur?.(event);
|
|
4051
4146
|
},
|
|
4052
4147
|
style: [
|
|
4053
|
-
|
|
4148
|
+
styles14.input,
|
|
4054
4149
|
textareaTypography.field,
|
|
4055
4150
|
{ color: chrome.textColor },
|
|
4056
|
-
Platform.OS === "web" ?
|
|
4057
|
-
Platform.OS === "android" ?
|
|
4151
|
+
Platform.OS === "web" ? styles14.inputWeb : null,
|
|
4152
|
+
Platform.OS === "android" ? styles14.inputAndroid : null,
|
|
4058
4153
|
inputStyle
|
|
4059
4154
|
],
|
|
4060
4155
|
accessibilityLabel: resolvedAccessibilityLabel,
|
|
@@ -4063,10 +4158,10 @@ var Textarea = forwardRef(function Textarea2({
|
|
|
4063
4158
|
)
|
|
4064
4159
|
}
|
|
4065
4160
|
),
|
|
4066
|
-
showHint && hint ? /* @__PURE__ */ jsx(Text, { style: [
|
|
4161
|
+
showHint && hint ? /* @__PURE__ */ jsx(Text, { style: [styles14.hint, { color: chrome.hintColor }], children: hint }) : null
|
|
4067
4162
|
] });
|
|
4068
4163
|
});
|
|
4069
|
-
var
|
|
4164
|
+
var styles14 = StyleSheet.create({
|
|
4070
4165
|
root: {
|
|
4071
4166
|
width: DEFAULT_WIDTH4,
|
|
4072
4167
|
gap: 8,
|
|
@@ -4166,13 +4261,13 @@ var Toggle = forwardRef(function Toggle2({
|
|
|
4166
4261
|
accessibilityRole: "switch",
|
|
4167
4262
|
accessibilityLabel: resolvedAccessibilityLabel,
|
|
4168
4263
|
accessibilityState: { checked: isActive, disabled },
|
|
4169
|
-
style: [
|
|
4264
|
+
style: [styles15.pressable, disabled && styles15.disabled, style],
|
|
4170
4265
|
children: [
|
|
4171
4266
|
/* @__PURE__ */ jsx(
|
|
4172
4267
|
Animated.View,
|
|
4173
4268
|
{
|
|
4174
4269
|
style: [
|
|
4175
|
-
|
|
4270
|
+
styles15.track,
|
|
4176
4271
|
{
|
|
4177
4272
|
backgroundColor: trackBackgroundColor
|
|
4178
4273
|
}
|
|
@@ -4181,7 +4276,7 @@ var Toggle = forwardRef(function Toggle2({
|
|
|
4181
4276
|
Animated.View,
|
|
4182
4277
|
{
|
|
4183
4278
|
style: [
|
|
4184
|
-
|
|
4279
|
+
styles15.thumb,
|
|
4185
4280
|
{
|
|
4186
4281
|
transform: [{ translateX: thumbTranslateX }]
|
|
4187
4282
|
}
|
|
@@ -4190,12 +4285,12 @@ var Toggle = forwardRef(function Toggle2({
|
|
|
4190
4285
|
)
|
|
4191
4286
|
}
|
|
4192
4287
|
),
|
|
4193
|
-
labelContent != null && labelContent !== false ? typeof labelContent === "string" || typeof labelContent === "number" ? /* @__PURE__ */ jsx(Text, { style: [
|
|
4288
|
+
labelContent != null && labelContent !== false ? typeof labelContent === "string" || typeof labelContent === "number" ? /* @__PURE__ */ jsx(Text, { style: [styles15.label, labelStyle], children: labelContent }) : labelContent : null
|
|
4194
4289
|
]
|
|
4195
4290
|
}
|
|
4196
4291
|
);
|
|
4197
4292
|
});
|
|
4198
|
-
var
|
|
4293
|
+
var styles15 = StyleSheet.create({
|
|
4199
4294
|
pressable: {
|
|
4200
4295
|
flexDirection: "row",
|
|
4201
4296
|
alignItems: "center",
|
|
@@ -4270,21 +4365,21 @@ var RatingInput = forwardRef(
|
|
|
4270
4365
|
{
|
|
4271
4366
|
...rest,
|
|
4272
4367
|
ref: setContainerRef,
|
|
4273
|
-
style: [
|
|
4368
|
+
style: [styles16.root, disabled && styles16.disabled, style],
|
|
4274
4369
|
children: [
|
|
4275
|
-
showValue ? /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [
|
|
4370
|
+
showValue ? /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [styles16.value, valueStyle], children: selectedValue.toFixed(precision) }) : null,
|
|
4276
4371
|
/* @__PURE__ */ jsx(
|
|
4277
4372
|
View,
|
|
4278
4373
|
{
|
|
4279
4374
|
accessibilityRole: readOnly ? "image" : "radiogroup",
|
|
4280
4375
|
accessibilityLabel: resolvedAccessibilityLabel,
|
|
4281
4376
|
accessibilityState: { disabled },
|
|
4282
|
-
style: [
|
|
4377
|
+
style: [styles16.stars, { gap: resolvedStarGap }],
|
|
4283
4378
|
children: Array.from({ length: STAR_COUNT }, (_, index) => {
|
|
4284
4379
|
const starValue = index + 1;
|
|
4285
4380
|
const isSelected = starValue <= selectedStarCount;
|
|
4286
4381
|
const icon = isSelected ? /* @__PURE__ */ jsx(StarFilledIcon, { size: iconWidth, height: iconHeight }) : /* @__PURE__ */ jsx(StarIcon, { size: iconWidth, height: iconHeight });
|
|
4287
|
-
const itemStyle = [
|
|
4382
|
+
const itemStyle = [styles16.starItem, { width: size, height: size }];
|
|
4288
4383
|
if (readOnly) {
|
|
4289
4384
|
return /* @__PURE__ */ jsx(View, { style: itemStyle, children: icon }, starValue);
|
|
4290
4385
|
}
|
|
@@ -4310,7 +4405,7 @@ var RatingInput = forwardRef(
|
|
|
4310
4405
|
);
|
|
4311
4406
|
}
|
|
4312
4407
|
);
|
|
4313
|
-
var
|
|
4408
|
+
var styles16 = StyleSheet.create({
|
|
4314
4409
|
root: {
|
|
4315
4410
|
flexDirection: "row",
|
|
4316
4411
|
alignItems: "center",
|
|
@@ -4374,19 +4469,19 @@ var CommentCard = forwardRef(
|
|
|
4374
4469
|
setExpanded(next);
|
|
4375
4470
|
onExpandedChange?.(next);
|
|
4376
4471
|
};
|
|
4377
|
-
return /* @__PURE__ */ jsxs(View, { ...rest, ref: setContainerRef, style: [
|
|
4378
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
4379
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
4472
|
+
return /* @__PURE__ */ jsxs(View, { ...rest, ref: setContainerRef, style: [styles17.root, style], children: [
|
|
4473
|
+
/* @__PURE__ */ jsxs(View, { style: styles17.header, children: [
|
|
4474
|
+
/* @__PURE__ */ jsx(View, { style: styles17.avatar, children: hasImage ? /* @__PURE__ */ jsx(
|
|
4380
4475
|
Image,
|
|
4381
4476
|
{
|
|
4382
4477
|
source: { uri: imageUrl ?? void 0 },
|
|
4383
|
-
style:
|
|
4478
|
+
style: styles17.avatarImage,
|
|
4384
4479
|
onError: () => setImageFailed(true)
|
|
4385
4480
|
}
|
|
4386
4481
|
) : /* @__PURE__ */ jsx(UserIcon, { size: 20, color: colors.primary }) }),
|
|
4387
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
4388
|
-
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style:
|
|
4389
|
-
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style:
|
|
4482
|
+
/* @__PURE__ */ jsxs(View, { style: styles17.identity, children: [
|
|
4483
|
+
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: styles17.name, children: userName }),
|
|
4484
|
+
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: styles17.date, children: date })
|
|
4390
4485
|
] }),
|
|
4391
4486
|
/* @__PURE__ */ jsx(RatingInput, { value: rating, readOnly: true, showValue: false, size: 16 })
|
|
4392
4487
|
] }),
|
|
@@ -4394,7 +4489,7 @@ var CommentCard = forwardRef(
|
|
|
4394
4489
|
Text,
|
|
4395
4490
|
{
|
|
4396
4491
|
numberOfLines: expanded ? void 0 : maxCommentLines,
|
|
4397
|
-
style: [
|
|
4492
|
+
style: [styles17.comment, commentStyle],
|
|
4398
4493
|
children: commentText
|
|
4399
4494
|
}
|
|
4400
4495
|
),
|
|
@@ -4407,14 +4502,14 @@ var CommentCard = forwardRef(
|
|
|
4407
4502
|
hitSlop: 6,
|
|
4408
4503
|
onHoverIn: () => setActionHovered(true),
|
|
4409
4504
|
onHoverOut: () => setActionHovered(false),
|
|
4410
|
-
style:
|
|
4505
|
+
style: styles17.action,
|
|
4411
4506
|
children: /* @__PURE__ */ jsx(
|
|
4412
4507
|
Text,
|
|
4413
4508
|
{
|
|
4414
4509
|
style: [
|
|
4415
|
-
|
|
4416
|
-
expanded &&
|
|
4417
|
-
actionHovered && (expanded ?
|
|
4510
|
+
styles17.actionText,
|
|
4511
|
+
expanded && styles17.closeActionText,
|
|
4512
|
+
actionHovered && (expanded ? styles17.closeActionTextHovered : styles17.openActionTextHovered)
|
|
4418
4513
|
],
|
|
4419
4514
|
children: expanded ? readLessLabel : readMoreLabel
|
|
4420
4515
|
}
|
|
@@ -4424,7 +4519,7 @@ var CommentCard = forwardRef(
|
|
|
4424
4519
|
] });
|
|
4425
4520
|
}
|
|
4426
4521
|
);
|
|
4427
|
-
var
|
|
4522
|
+
var styles17 = StyleSheet.create({
|
|
4428
4523
|
root: {
|
|
4429
4524
|
width: CARD_WIDTH,
|
|
4430
4525
|
minHeight: CARD_MIN_HEIGHT,
|
|
@@ -4490,6 +4585,676 @@ var styles16 = StyleSheet.create({
|
|
|
4490
4585
|
}
|
|
4491
4586
|
});
|
|
4492
4587
|
|
|
4493
|
-
|
|
4588
|
+
// src/components/Range/Range.utils.ts
|
|
4589
|
+
function decimals(value) {
|
|
4590
|
+
const [coefficient, exponentText = "0"] = Math.abs(value).toString().toLowerCase().split("e");
|
|
4591
|
+
const [, fraction = ""] = coefficient.split(".");
|
|
4592
|
+
return Math.max(0, fraction.length - Number(exponentText));
|
|
4593
|
+
}
|
|
4594
|
+
function clampAndSnap(value, min, max, step) {
|
|
4595
|
+
const clamped = Math.min(max, Math.max(min, value));
|
|
4596
|
+
const snapped = min + Math.round((clamped - min) / step) * step;
|
|
4597
|
+
const precision = Math.min(15, Math.max(decimals(min), decimals(step)));
|
|
4598
|
+
return Number(Math.min(max, Math.max(min, snapped)).toFixed(precision));
|
|
4599
|
+
}
|
|
4600
|
+
function clampRangeValue(value, min, max) {
|
|
4601
|
+
return Math.min(max, Math.max(min, value));
|
|
4602
|
+
}
|
|
4603
|
+
function snapRangeDelta(start, delta, step) {
|
|
4604
|
+
const steps = Math.round(Math.abs(delta) / step) * Math.sign(delta);
|
|
4605
|
+
const precision = Math.min(15, Math.max(decimals(start), decimals(step)));
|
|
4606
|
+
return Number((start + steps * step).toFixed(precision));
|
|
4607
|
+
}
|
|
4608
|
+
function parseRangeDraft(draft, parseValue) {
|
|
4609
|
+
if (!draft.trim()) return { kind: "empty" };
|
|
4610
|
+
const parsed = parseValue(draft);
|
|
4611
|
+
if (parsed === void 0 || !Number.isFinite(parsed)) return { kind: "invalid" };
|
|
4612
|
+
return { kind: "value", value: parsed };
|
|
4613
|
+
}
|
|
4614
|
+
function normalizeRangeValue(value, min, max) {
|
|
4615
|
+
const from = typeof value.from === "number" && Number.isFinite(value.from) ? clampRangeValue(value.from, min, max) : void 0;
|
|
4616
|
+
const to = typeof value.to === "number" && Number.isFinite(value.to) ? clampRangeValue(value.to, min, max) : void 0;
|
|
4617
|
+
if (from !== void 0 && to !== void 0 && from > to) {
|
|
4618
|
+
return { from: to, to: from };
|
|
4619
|
+
}
|
|
4620
|
+
return { from, to };
|
|
4621
|
+
}
|
|
4622
|
+
var DEFAULT_WIDTH5 = 347;
|
|
4623
|
+
var TRACK_HEIGHT2 = 4;
|
|
4624
|
+
var TRACK_HORIZONTAL_INSET = 20;
|
|
4625
|
+
var THUMB_SIZE2 = 20;
|
|
4626
|
+
var INPUT_WIDTH = 120;
|
|
4627
|
+
function defaultParseValue(value) {
|
|
4628
|
+
const normalized = value.replace(/[\s,]/g, "");
|
|
4629
|
+
if (!normalized) return void 0;
|
|
4630
|
+
const parsed = Number(normalized);
|
|
4631
|
+
return Number.isFinite(parsed) ? parsed : void 0;
|
|
4632
|
+
}
|
|
4633
|
+
function valuesEqual(a, b) {
|
|
4634
|
+
return a.from === b.from && a.to === b.to;
|
|
4635
|
+
}
|
|
4636
|
+
var Range = forwardRef(function Range2({
|
|
4637
|
+
min = 0,
|
|
4638
|
+
max = 100,
|
|
4639
|
+
step = 1,
|
|
4640
|
+
value,
|
|
4641
|
+
defaultValue = {},
|
|
4642
|
+
onValueChange,
|
|
4643
|
+
fromPlaceholder = "\u054D\u056F\u057D\u0561\u056E",
|
|
4644
|
+
toPlaceholder = "\u0544\u056B\u0576\u0579\u0587",
|
|
4645
|
+
currency = "\u058F",
|
|
4646
|
+
fromAccessibilityLabel = fromPlaceholder,
|
|
4647
|
+
toAccessibilityLabel = toPlaceholder,
|
|
4648
|
+
disabled = false,
|
|
4649
|
+
formatValue = String,
|
|
4650
|
+
parseValue = defaultParseValue,
|
|
4651
|
+
style,
|
|
4652
|
+
className,
|
|
4653
|
+
onLayout,
|
|
4654
|
+
...rest
|
|
4655
|
+
}, forwardedRef) {
|
|
4656
|
+
const rootRef = useRef(null);
|
|
4657
|
+
const fromThumbRef = useRef(null);
|
|
4658
|
+
const toThumbRef = useRef(null);
|
|
4659
|
+
const setRootRef = useMemo(() => mergeRefs(rootRef, forwardedRef), [forwardedRef]);
|
|
4660
|
+
const lowerBound = Math.min(min, max);
|
|
4661
|
+
const upperBound = Math.max(min, max);
|
|
4662
|
+
const safeStep = Number.isFinite(step) && step > 0 ? step : 1;
|
|
4663
|
+
const isControlled = value !== void 0;
|
|
4664
|
+
const [uncontrolledValue, setUncontrolledValue] = useState(
|
|
4665
|
+
() => normalizeRangeValue(defaultValue, lowerBound, upperBound)
|
|
4666
|
+
);
|
|
4667
|
+
const resolvedValue = normalizeRangeValue(
|
|
4668
|
+
isControlled ? value : uncontrolledValue,
|
|
4669
|
+
lowerBound,
|
|
4670
|
+
upperBound
|
|
4671
|
+
);
|
|
4672
|
+
const latestValueRef = useRef(resolvedValue);
|
|
4673
|
+
const [trackWidth, setTrackWidth] = useState(DEFAULT_WIDTH5);
|
|
4674
|
+
const [fromDraft, setFromDraft] = useState(
|
|
4675
|
+
resolvedValue.from === void 0 ? "" : formatValue(resolvedValue.from)
|
|
4676
|
+
);
|
|
4677
|
+
const [toDraft, setToDraft] = useState(
|
|
4678
|
+
resolvedValue.to === void 0 ? "" : formatValue(resolvedValue.to)
|
|
4679
|
+
);
|
|
4680
|
+
const [editingField, setEditingField] = useState(null);
|
|
4681
|
+
const [focusedThumb, setFocusedThumb] = useState(null);
|
|
4682
|
+
const dragStartRef = useRef({ from: lowerBound, to: upperBound });
|
|
4683
|
+
const nativeDragTargetRef = useRef(null);
|
|
4684
|
+
const pointerDragRef = useRef(null);
|
|
4685
|
+
useApplyWebClassName(rootRef, className?.trim() || void 0);
|
|
4686
|
+
useEffect(() => {
|
|
4687
|
+
if (editingField !== "from") {
|
|
4688
|
+
setFromDraft(resolvedValue.from === void 0 ? "" : formatValue(resolvedValue.from));
|
|
4689
|
+
}
|
|
4690
|
+
}, [editingField, formatValue, resolvedValue.from]);
|
|
4691
|
+
useEffect(() => {
|
|
4692
|
+
if (editingField !== "to") {
|
|
4693
|
+
setToDraft(resolvedValue.to === void 0 ? "" : formatValue(resolvedValue.to));
|
|
4694
|
+
}
|
|
4695
|
+
}, [editingField, formatValue, resolvedValue.to]);
|
|
4696
|
+
useEffect(() => {
|
|
4697
|
+
const nextValue = { from: resolvedValue.from, to: resolvedValue.to };
|
|
4698
|
+
const changedOutsideInteraction = !valuesEqual(nextValue, latestValueRef.current);
|
|
4699
|
+
latestValueRef.current = nextValue;
|
|
4700
|
+
if (!changedOutsideInteraction) return;
|
|
4701
|
+
if (editingField === "from") {
|
|
4702
|
+
setFromDraft(nextValue.from === void 0 ? "" : formatValue(nextValue.from));
|
|
4703
|
+
}
|
|
4704
|
+
if (editingField === "to") {
|
|
4705
|
+
setToDraft(nextValue.to === void 0 ? "" : formatValue(nextValue.to));
|
|
4706
|
+
}
|
|
4707
|
+
}, [editingField, formatValue, resolvedValue.from, resolvedValue.to]);
|
|
4708
|
+
useEffect(() => {
|
|
4709
|
+
if (isControlled) return;
|
|
4710
|
+
setUncontrolledValue((current) => {
|
|
4711
|
+
const normalized = normalizeRangeValue(current, lowerBound, upperBound);
|
|
4712
|
+
return valuesEqual(current, normalized) ? current : normalized;
|
|
4713
|
+
});
|
|
4714
|
+
}, [isControlled, lowerBound, upperBound]);
|
|
4715
|
+
const emitValue = useCallback(
|
|
4716
|
+
(nextValue) => {
|
|
4717
|
+
const normalized = normalizeRangeValue(nextValue, lowerBound, upperBound);
|
|
4718
|
+
if (valuesEqual(normalized, latestValueRef.current)) return;
|
|
4719
|
+
latestValueRef.current = normalized;
|
|
4720
|
+
if (!isControlled) setUncontrolledValue(normalized);
|
|
4721
|
+
onValueChange?.(normalized);
|
|
4722
|
+
},
|
|
4723
|
+
[isControlled, lowerBound, onValueChange, upperBound]
|
|
4724
|
+
);
|
|
4725
|
+
const updateFrom = useCallback(
|
|
4726
|
+
(next) => {
|
|
4727
|
+
const current = latestValueRef.current;
|
|
4728
|
+
const maximum = current.to ?? upperBound;
|
|
4729
|
+
const snapped = next === void 0 ? void 0 : clampAndSnap(next, lowerBound, upperBound, safeStep);
|
|
4730
|
+
emitValue({
|
|
4731
|
+
...current,
|
|
4732
|
+
from: snapped === void 0 ? void 0 : clampRangeValue(snapped, lowerBound, maximum)
|
|
4733
|
+
});
|
|
4734
|
+
},
|
|
4735
|
+
[emitValue, lowerBound, safeStep, upperBound]
|
|
4736
|
+
);
|
|
4737
|
+
const updateTo = useCallback(
|
|
4738
|
+
(next) => {
|
|
4739
|
+
const current = latestValueRef.current;
|
|
4740
|
+
const minimum = current.from ?? lowerBound;
|
|
4741
|
+
const snapped = next === void 0 ? void 0 : clampAndSnap(next, lowerBound, upperBound, safeStep);
|
|
4742
|
+
emitValue({
|
|
4743
|
+
...current,
|
|
4744
|
+
to: snapped === void 0 ? void 0 : clampRangeValue(snapped, minimum, upperBound)
|
|
4745
|
+
});
|
|
4746
|
+
},
|
|
4747
|
+
[emitValue, lowerBound, safeStep, upperBound]
|
|
4748
|
+
);
|
|
4749
|
+
const updateFromInput = useCallback(
|
|
4750
|
+
(next) => {
|
|
4751
|
+
const current = latestValueRef.current;
|
|
4752
|
+
const maximum = current.to ?? upperBound;
|
|
4753
|
+
emitValue({
|
|
4754
|
+
...current,
|
|
4755
|
+
from: next === void 0 ? void 0 : clampRangeValue(next, lowerBound, maximum)
|
|
4756
|
+
});
|
|
4757
|
+
},
|
|
4758
|
+
[emitValue, lowerBound, upperBound]
|
|
4759
|
+
);
|
|
4760
|
+
const updateToInput = useCallback(
|
|
4761
|
+
(next) => {
|
|
4762
|
+
const current = latestValueRef.current;
|
|
4763
|
+
const minimum = current.from ?? lowerBound;
|
|
4764
|
+
emitValue({
|
|
4765
|
+
...current,
|
|
4766
|
+
to: next === void 0 ? void 0 : clampRangeValue(next, minimum, upperBound)
|
|
4767
|
+
});
|
|
4768
|
+
},
|
|
4769
|
+
[emitValue, lowerBound, upperBound]
|
|
4770
|
+
);
|
|
4771
|
+
const span = upperBound - lowerBound;
|
|
4772
|
+
const thumbTravel = Math.max(0, trackWidth - TRACK_HORIZONTAL_INSET * 2 - THUMB_SIZE2);
|
|
4773
|
+
const effectiveFrom = resolvedValue.from ?? lowerBound;
|
|
4774
|
+
const effectiveTo = resolvedValue.to ?? upperBound;
|
|
4775
|
+
const valueToOffset = useCallback(
|
|
4776
|
+
(next) => span === 0 ? 0 : (next - lowerBound) / span * thumbTravel,
|
|
4777
|
+
[lowerBound, span, thumbTravel]
|
|
4778
|
+
);
|
|
4779
|
+
const deltaToValue = useCallback(
|
|
4780
|
+
(delta) => thumbTravel === 0 || span === 0 ? 0 : delta / thumbTravel * span,
|
|
4781
|
+
[span, thumbTravel]
|
|
4782
|
+
);
|
|
4783
|
+
const fromOffset = valueToOffset(effectiveFrom);
|
|
4784
|
+
const toOffset = valueToOffset(effectiveTo);
|
|
4785
|
+
const fromPanResponder = useMemo(
|
|
4786
|
+
() => PanResponder.create({
|
|
4787
|
+
onStartShouldSetPanResponder: () => !disabled,
|
|
4788
|
+
onMoveShouldSetPanResponder: () => !disabled,
|
|
4789
|
+
onPanResponderGrant: () => {
|
|
4790
|
+
dragStartRef.current = { from: effectiveFrom, to: effectiveTo };
|
|
4791
|
+
nativeDragTargetRef.current = effectiveFrom === effectiveTo ? null : "from";
|
|
4792
|
+
},
|
|
4793
|
+
onPanResponderMove: (_, gesture) => {
|
|
4794
|
+
if (!nativeDragTargetRef.current && gesture.dx !== 0) {
|
|
4795
|
+
nativeDragTargetRef.current = gesture.dx < 0 ? "from" : "to";
|
|
4796
|
+
}
|
|
4797
|
+
const delta = deltaToValue(gesture.dx);
|
|
4798
|
+
if (nativeDragTargetRef.current === "to") {
|
|
4799
|
+
updateToInput(snapRangeDelta(dragStartRef.current.to, delta, safeStep));
|
|
4800
|
+
} else if (nativeDragTargetRef.current === "from") {
|
|
4801
|
+
updateFromInput(snapRangeDelta(dragStartRef.current.from, delta, safeStep));
|
|
4802
|
+
}
|
|
4803
|
+
},
|
|
4804
|
+
onPanResponderRelease: () => {
|
|
4805
|
+
nativeDragTargetRef.current = null;
|
|
4806
|
+
},
|
|
4807
|
+
onPanResponderTerminate: () => {
|
|
4808
|
+
nativeDragTargetRef.current = null;
|
|
4809
|
+
}
|
|
4810
|
+
}),
|
|
4811
|
+
[deltaToValue, disabled, effectiveFrom, effectiveTo, safeStep, updateFromInput, updateToInput]
|
|
4812
|
+
);
|
|
4813
|
+
const toPanResponder = useMemo(
|
|
4814
|
+
() => PanResponder.create({
|
|
4815
|
+
onStartShouldSetPanResponder: () => !disabled,
|
|
4816
|
+
onMoveShouldSetPanResponder: () => !disabled,
|
|
4817
|
+
onPanResponderGrant: () => {
|
|
4818
|
+
dragStartRef.current = { from: effectiveFrom, to: effectiveTo };
|
|
4819
|
+
nativeDragTargetRef.current = effectiveFrom === effectiveTo ? null : "to";
|
|
4820
|
+
},
|
|
4821
|
+
onPanResponderMove: (_, gesture) => {
|
|
4822
|
+
if (!nativeDragTargetRef.current && gesture.dx !== 0) {
|
|
4823
|
+
nativeDragTargetRef.current = gesture.dx < 0 ? "from" : "to";
|
|
4824
|
+
}
|
|
4825
|
+
const delta = deltaToValue(gesture.dx);
|
|
4826
|
+
if (nativeDragTargetRef.current === "from") {
|
|
4827
|
+
updateFromInput(snapRangeDelta(dragStartRef.current.from, delta, safeStep));
|
|
4828
|
+
} else if (nativeDragTargetRef.current === "to") {
|
|
4829
|
+
updateToInput(snapRangeDelta(dragStartRef.current.to, delta, safeStep));
|
|
4830
|
+
}
|
|
4831
|
+
},
|
|
4832
|
+
onPanResponderRelease: () => {
|
|
4833
|
+
nativeDragTargetRef.current = null;
|
|
4834
|
+
},
|
|
4835
|
+
onPanResponderTerminate: () => {
|
|
4836
|
+
nativeDragTargetRef.current = null;
|
|
4837
|
+
}
|
|
4838
|
+
}),
|
|
4839
|
+
[deltaToValue, disabled, effectiveFrom, effectiveTo, safeStep, updateFromInput, updateToInput]
|
|
4840
|
+
);
|
|
4841
|
+
const beginPointerDrag = (target, currentValue, event) => {
|
|
4842
|
+
if (disabled) return;
|
|
4843
|
+
event.stopPropagation();
|
|
4844
|
+
const pointerId = event.nativeEvent.pointerId;
|
|
4845
|
+
const node = event.currentTarget;
|
|
4846
|
+
node.focus?.();
|
|
4847
|
+
node.setPointerCapture?.(pointerId);
|
|
4848
|
+
pointerDragRef.current = {
|
|
4849
|
+
target,
|
|
4850
|
+
pointerId,
|
|
4851
|
+
startPageX: event.nativeEvent.pageX,
|
|
4852
|
+
startValue: currentValue,
|
|
4853
|
+
coincident: effectiveFrom === effectiveTo
|
|
4854
|
+
};
|
|
4855
|
+
};
|
|
4856
|
+
const movePointerDrag = (event) => {
|
|
4857
|
+
const drag = pointerDragRef.current;
|
|
4858
|
+
if (!drag || drag.pointerId !== event.nativeEvent.pointerId) return;
|
|
4859
|
+
const deltaX = event.nativeEvent.pageX - drag.startPageX;
|
|
4860
|
+
const nextValue = snapRangeDelta(drag.startValue, deltaToValue(deltaX), safeStep);
|
|
4861
|
+
if (drag.coincident && deltaX !== 0) {
|
|
4862
|
+
drag.target = deltaX < 0 ? "from" : "to";
|
|
4863
|
+
drag.coincident = false;
|
|
4864
|
+
}
|
|
4865
|
+
const target = drag.target;
|
|
4866
|
+
if (target === "from") updateFromInput(nextValue);
|
|
4867
|
+
else updateToInput(nextValue);
|
|
4868
|
+
};
|
|
4869
|
+
const endPointerDrag = (event) => {
|
|
4870
|
+
const drag = pointerDragRef.current;
|
|
4871
|
+
if (!drag || drag.pointerId !== event.nativeEvent.pointerId) return;
|
|
4872
|
+
const node = event.currentTarget;
|
|
4873
|
+
if (node.hasPointerCapture?.(drag.pointerId)) node.releasePointerCapture?.(drag.pointerId);
|
|
4874
|
+
pointerDragRef.current = null;
|
|
4875
|
+
};
|
|
4876
|
+
const handleAccessibilityAction = (event, current, update) => {
|
|
4877
|
+
if (disabled) return;
|
|
4878
|
+
if (event.nativeEvent.actionName === "increment") update(current + safeStep);
|
|
4879
|
+
if (event.nativeEvent.actionName === "decrement") update(current - safeStep);
|
|
4880
|
+
};
|
|
4881
|
+
const handleWebKeyDown = (event, current, minimum, maximum, update) => {
|
|
4882
|
+
if (disabled) return;
|
|
4883
|
+
const key = event.nativeEvent?.key ?? event.key;
|
|
4884
|
+
let nextValue;
|
|
4885
|
+
if (key === "ArrowRight" || key === "ArrowUp") nextValue = current + safeStep;
|
|
4886
|
+
if (key === "ArrowLeft" || key === "ArrowDown") nextValue = current - safeStep;
|
|
4887
|
+
if (key === "Home") nextValue = minimum;
|
|
4888
|
+
if (key === "End") nextValue = maximum;
|
|
4889
|
+
if (nextValue === void 0) return;
|
|
4890
|
+
event.preventDefault();
|
|
4891
|
+
event.stopPropagation();
|
|
4892
|
+
update(nextValue);
|
|
4893
|
+
};
|
|
4894
|
+
const commitDraft = (draft, update) => {
|
|
4895
|
+
const result = parseRangeDraft(draft, parseValue);
|
|
4896
|
+
if (result.kind === "empty") update(void 0);
|
|
4897
|
+
if (result.kind === "value") update(result.value);
|
|
4898
|
+
};
|
|
4899
|
+
const changeFromDraft = (draft) => {
|
|
4900
|
+
setFromDraft(draft);
|
|
4901
|
+
const result = parseRangeDraft(draft, parseValue);
|
|
4902
|
+
if (result.kind === "empty") updateFromInput(void 0);
|
|
4903
|
+
if (result.kind === "value") updateFromInput(result.value);
|
|
4904
|
+
};
|
|
4905
|
+
const changeToDraft = (draft) => {
|
|
4906
|
+
setToDraft(draft);
|
|
4907
|
+
const result = parseRangeDraft(draft, parseValue);
|
|
4908
|
+
if (result.kind === "empty") updateToInput(void 0);
|
|
4909
|
+
if (result.kind === "value") updateToInput(result.value);
|
|
4910
|
+
};
|
|
4911
|
+
const focusWebThumb = (target) => {
|
|
4912
|
+
if (Platform.OS !== "web") return;
|
|
4913
|
+
const node = target === "from" ? fromThumbRef.current : toThumbRef.current;
|
|
4914
|
+
node?.focus?.();
|
|
4915
|
+
};
|
|
4916
|
+
const updateNearestFromTrack = (locationX) => {
|
|
4917
|
+
if (disabled || thumbTravel === 0 || span === 0) return;
|
|
4918
|
+
const offset = Math.min(
|
|
4919
|
+
thumbTravel,
|
|
4920
|
+
Math.max(0, locationX - TRACK_HORIZONTAL_INSET - THUMB_SIZE2 / 2)
|
|
4921
|
+
);
|
|
4922
|
+
const nextValue = clampAndSnap(
|
|
4923
|
+
lowerBound + offset / thumbTravel * span,
|
|
4924
|
+
lowerBound,
|
|
4925
|
+
upperBound,
|
|
4926
|
+
safeStep
|
|
4927
|
+
);
|
|
4928
|
+
const fromDistance = Math.abs(nextValue - effectiveFrom);
|
|
4929
|
+
const toDistance = Math.abs(nextValue - effectiveTo);
|
|
4930
|
+
if (effectiveFrom === effectiveTo && fromDistance === toDistance) {
|
|
4931
|
+
if (nextValue < effectiveFrom) {
|
|
4932
|
+
focusWebThumb("from");
|
|
4933
|
+
updateFrom(nextValue);
|
|
4934
|
+
}
|
|
4935
|
+
if (nextValue > effectiveTo) {
|
|
4936
|
+
focusWebThumb("to");
|
|
4937
|
+
updateTo(nextValue);
|
|
4938
|
+
}
|
|
4939
|
+
} else if (fromDistance <= toDistance) {
|
|
4940
|
+
focusWebThumb("from");
|
|
4941
|
+
updateFrom(nextValue);
|
|
4942
|
+
} else {
|
|
4943
|
+
focusWebThumb("to");
|
|
4944
|
+
updateTo(nextValue);
|
|
4945
|
+
}
|
|
4946
|
+
};
|
|
4947
|
+
const handleTrackPress = (event) => {
|
|
4948
|
+
updateNearestFromTrack(event.nativeEvent.locationX);
|
|
4949
|
+
};
|
|
4950
|
+
const handleTrackLayout = (event) => {
|
|
4951
|
+
setTrackWidth(event.nativeEvent.layout.width);
|
|
4952
|
+
};
|
|
4953
|
+
const fromValueText = `${formatValue(effectiveFrom)}${currency ? ` ${currency}` : ""}`;
|
|
4954
|
+
const toValueText = `${formatValue(effectiveTo)}${currency ? ` ${currency}` : ""}`;
|
|
4955
|
+
return /* @__PURE__ */ jsxs(
|
|
4956
|
+
View,
|
|
4957
|
+
{
|
|
4958
|
+
...rest,
|
|
4959
|
+
ref: setRootRef,
|
|
4960
|
+
onLayout,
|
|
4961
|
+
style: [styles18.root, disabled && styles18.disabled, style],
|
|
4962
|
+
children: [
|
|
4963
|
+
/* @__PURE__ */ jsxs(
|
|
4964
|
+
Pressable,
|
|
4965
|
+
{
|
|
4966
|
+
accessible: false,
|
|
4967
|
+
disabled,
|
|
4968
|
+
focusable: false,
|
|
4969
|
+
onLayout: handleTrackLayout,
|
|
4970
|
+
onPointerDown: Platform.OS === "web" ? (event) => {
|
|
4971
|
+
event.preventDefault();
|
|
4972
|
+
updateNearestFromTrack(event.nativeEvent.offsetX);
|
|
4973
|
+
} : void 0,
|
|
4974
|
+
onPress: Platform.OS === "web" ? void 0 : handleTrackPress,
|
|
4975
|
+
style: styles18.sliderPlane,
|
|
4976
|
+
tabIndex: -1,
|
|
4977
|
+
children: [
|
|
4978
|
+
/* @__PURE__ */ jsx(View, { pointerEvents: "none", style: styles18.track }),
|
|
4979
|
+
/* @__PURE__ */ jsx(
|
|
4980
|
+
View,
|
|
4981
|
+
{
|
|
4982
|
+
pointerEvents: "none",
|
|
4983
|
+
style: [
|
|
4984
|
+
styles18.activeTrack,
|
|
4985
|
+
{
|
|
4986
|
+
left: TRACK_HORIZONTAL_INSET + fromOffset,
|
|
4987
|
+
width: toOffset - fromOffset + THUMB_SIZE2
|
|
4988
|
+
}
|
|
4989
|
+
]
|
|
4990
|
+
}
|
|
4991
|
+
),
|
|
4992
|
+
/* @__PURE__ */ jsx(
|
|
4993
|
+
View,
|
|
4994
|
+
{
|
|
4995
|
+
ref: fromThumbRef,
|
|
4996
|
+
...Platform.OS === "web" ? {
|
|
4997
|
+
onPointerCancel: endPointerDrag,
|
|
4998
|
+
onPointerDown: (event) => beginPointerDrag("from", effectiveFrom, event),
|
|
4999
|
+
onLostPointerCapture: endPointerDrag,
|
|
5000
|
+
onPointerMove: movePointerDrag,
|
|
5001
|
+
onPointerUp: endPointerDrag,
|
|
5002
|
+
onBlur: () => setFocusedThumb(null),
|
|
5003
|
+
onFocus: () => setFocusedThumb("from"),
|
|
5004
|
+
onKeyDown: (event) => handleWebKeyDown(event, effectiveFrom, lowerBound, effectiveTo, updateFromInput)
|
|
5005
|
+
} : fromPanResponder.panHandlers,
|
|
5006
|
+
"aria-disabled": disabled,
|
|
5007
|
+
"aria-valuemax": effectiveTo,
|
|
5008
|
+
"aria-valuemin": lowerBound,
|
|
5009
|
+
"aria-valuenow": effectiveFrom,
|
|
5010
|
+
"aria-valuetext": fromValueText,
|
|
5011
|
+
accessible: true,
|
|
5012
|
+
accessibilityActions: [{ name: "increment" }, { name: "decrement" }],
|
|
5013
|
+
accessibilityLabel: fromAccessibilityLabel,
|
|
5014
|
+
accessibilityRole: "adjustable",
|
|
5015
|
+
accessibilityState: { disabled },
|
|
5016
|
+
accessibilityValue: {
|
|
5017
|
+
min: lowerBound,
|
|
5018
|
+
max: effectiveTo,
|
|
5019
|
+
now: effectiveFrom,
|
|
5020
|
+
text: fromValueText
|
|
5021
|
+
},
|
|
5022
|
+
focusable: !disabled,
|
|
5023
|
+
onAccessibilityAction: (event) => handleAccessibilityAction(event, effectiveFrom, updateFromInput),
|
|
5024
|
+
pointerEvents: disabled ? "none" : "auto",
|
|
5025
|
+
style: [
|
|
5026
|
+
styles18.thumb,
|
|
5027
|
+
Platform.OS === "web" && styles18.thumbWeb,
|
|
5028
|
+
focusedThumb === "from" && Platform.OS === "web" && styles18.thumbFocusedWeb,
|
|
5029
|
+
{ left: TRACK_HORIZONTAL_INSET + fromOffset }
|
|
5030
|
+
],
|
|
5031
|
+
tabIndex: disabled ? -1 : 0
|
|
5032
|
+
}
|
|
5033
|
+
),
|
|
5034
|
+
/* @__PURE__ */ jsx(
|
|
5035
|
+
View,
|
|
5036
|
+
{
|
|
5037
|
+
ref: toThumbRef,
|
|
5038
|
+
...Platform.OS === "web" ? {
|
|
5039
|
+
onPointerCancel: endPointerDrag,
|
|
5040
|
+
onPointerDown: (event) => beginPointerDrag("to", effectiveTo, event),
|
|
5041
|
+
onLostPointerCapture: endPointerDrag,
|
|
5042
|
+
onPointerMove: movePointerDrag,
|
|
5043
|
+
onPointerUp: endPointerDrag,
|
|
5044
|
+
onBlur: () => setFocusedThumb(null),
|
|
5045
|
+
onFocus: () => setFocusedThumb("to"),
|
|
5046
|
+
onKeyDown: (event) => handleWebKeyDown(event, effectiveTo, effectiveFrom, upperBound, updateToInput)
|
|
5047
|
+
} : toPanResponder.panHandlers,
|
|
5048
|
+
"aria-disabled": disabled,
|
|
5049
|
+
"aria-valuemax": upperBound,
|
|
5050
|
+
"aria-valuemin": effectiveFrom,
|
|
5051
|
+
"aria-valuenow": effectiveTo,
|
|
5052
|
+
"aria-valuetext": toValueText,
|
|
5053
|
+
accessible: true,
|
|
5054
|
+
accessibilityActions: [{ name: "increment" }, { name: "decrement" }],
|
|
5055
|
+
accessibilityLabel: toAccessibilityLabel,
|
|
5056
|
+
accessibilityRole: "adjustable",
|
|
5057
|
+
accessibilityState: { disabled },
|
|
5058
|
+
accessibilityValue: {
|
|
5059
|
+
min: effectiveFrom,
|
|
5060
|
+
max: upperBound,
|
|
5061
|
+
now: effectiveTo,
|
|
5062
|
+
text: toValueText
|
|
5063
|
+
},
|
|
5064
|
+
focusable: !disabled,
|
|
5065
|
+
onAccessibilityAction: (event) => handleAccessibilityAction(event, effectiveTo, updateToInput),
|
|
5066
|
+
pointerEvents: disabled ? "none" : "auto",
|
|
5067
|
+
style: [
|
|
5068
|
+
styles18.thumb,
|
|
5069
|
+
Platform.OS === "web" && styles18.thumbWeb,
|
|
5070
|
+
focusedThumb === "to" && Platform.OS === "web" && styles18.thumbFocusedWeb,
|
|
5071
|
+
{ left: TRACK_HORIZONTAL_INSET + toOffset }
|
|
5072
|
+
],
|
|
5073
|
+
tabIndex: disabled ? -1 : 0
|
|
5074
|
+
}
|
|
5075
|
+
)
|
|
5076
|
+
]
|
|
5077
|
+
}
|
|
5078
|
+
),
|
|
5079
|
+
/* @__PURE__ */ jsxs(View, { style: styles18.inputs, children: [
|
|
5080
|
+
/* @__PURE__ */ jsx(
|
|
5081
|
+
RangeInput,
|
|
5082
|
+
{
|
|
5083
|
+
accessibilityLabel: fromAccessibilityLabel,
|
|
5084
|
+
currency,
|
|
5085
|
+
disabled,
|
|
5086
|
+
focused: editingField === "from",
|
|
5087
|
+
onChangeText: changeFromDraft,
|
|
5088
|
+
onCommit: () => {
|
|
5089
|
+
setEditingField(null);
|
|
5090
|
+
commitDraft(fromDraft, updateFromInput);
|
|
5091
|
+
},
|
|
5092
|
+
onFocus: () => setEditingField("from"),
|
|
5093
|
+
placeholder: fromPlaceholder,
|
|
5094
|
+
value: fromDraft
|
|
5095
|
+
}
|
|
5096
|
+
),
|
|
5097
|
+
/* @__PURE__ */ jsx(
|
|
5098
|
+
RangeInput,
|
|
5099
|
+
{
|
|
5100
|
+
accessibilityLabel: toAccessibilityLabel,
|
|
5101
|
+
currency,
|
|
5102
|
+
disabled,
|
|
5103
|
+
focused: editingField === "to",
|
|
5104
|
+
onChangeText: changeToDraft,
|
|
5105
|
+
onCommit: () => {
|
|
5106
|
+
setEditingField(null);
|
|
5107
|
+
commitDraft(toDraft, updateToInput);
|
|
5108
|
+
},
|
|
5109
|
+
onFocus: () => setEditingField("to"),
|
|
5110
|
+
placeholder: toPlaceholder,
|
|
5111
|
+
value: toDraft
|
|
5112
|
+
}
|
|
5113
|
+
)
|
|
5114
|
+
] })
|
|
5115
|
+
]
|
|
5116
|
+
}
|
|
5117
|
+
);
|
|
5118
|
+
});
|
|
5119
|
+
function RangeInput({
|
|
5120
|
+
accessibilityLabel,
|
|
5121
|
+
currency,
|
|
5122
|
+
disabled,
|
|
5123
|
+
focused,
|
|
5124
|
+
onChangeText,
|
|
5125
|
+
onCommit,
|
|
5126
|
+
onFocus,
|
|
5127
|
+
placeholder,
|
|
5128
|
+
value
|
|
5129
|
+
}) {
|
|
5130
|
+
return /* @__PURE__ */ jsxs(View, { style: [styles18.inputField, focused && styles18.inputFieldFocused], children: [
|
|
5131
|
+
/* @__PURE__ */ jsx(
|
|
5132
|
+
TextInput,
|
|
5133
|
+
{
|
|
5134
|
+
"aria-disabled": disabled,
|
|
5135
|
+
accessibilityLabel,
|
|
5136
|
+
accessibilityState: { disabled },
|
|
5137
|
+
editable: !disabled,
|
|
5138
|
+
inputMode: "decimal",
|
|
5139
|
+
onBlur: onCommit,
|
|
5140
|
+
onChangeText,
|
|
5141
|
+
onFocus,
|
|
5142
|
+
onSubmitEditing: onCommit,
|
|
5143
|
+
placeholder,
|
|
5144
|
+
placeholderTextColor: colors.grey150,
|
|
5145
|
+
returnKeyType: "done",
|
|
5146
|
+
style: [styles18.input, Platform.OS === "web" && styles18.inputWeb],
|
|
5147
|
+
tabIndex: disabled ? -1 : void 0,
|
|
5148
|
+
value
|
|
5149
|
+
}
|
|
5150
|
+
),
|
|
5151
|
+
/* @__PURE__ */ jsx(View, { style: styles18.currencySlot, children: /* @__PURE__ */ jsx(Text, { style: styles18.currency, children: currency }) })
|
|
5152
|
+
] });
|
|
5153
|
+
}
|
|
5154
|
+
var styles18 = StyleSheet.create({
|
|
5155
|
+
root: {
|
|
5156
|
+
width: DEFAULT_WIDTH5,
|
|
5157
|
+
gap: 15,
|
|
5158
|
+
alignSelf: "flex-start"
|
|
5159
|
+
},
|
|
5160
|
+
disabled: {
|
|
5161
|
+
opacity: 0.6
|
|
5162
|
+
},
|
|
5163
|
+
sliderPlane: {
|
|
5164
|
+
width: "100%",
|
|
5165
|
+
height: THUMB_SIZE2,
|
|
5166
|
+
position: "relative"
|
|
5167
|
+
},
|
|
5168
|
+
track: {
|
|
5169
|
+
position: "absolute",
|
|
5170
|
+
top: 8,
|
|
5171
|
+
left: 0,
|
|
5172
|
+
width: "100%",
|
|
5173
|
+
height: TRACK_HEIGHT2,
|
|
5174
|
+
borderRadius: 16,
|
|
5175
|
+
backgroundColor: colors.grey600
|
|
5176
|
+
},
|
|
5177
|
+
activeTrack: {
|
|
5178
|
+
position: "absolute",
|
|
5179
|
+
top: 8,
|
|
5180
|
+
height: TRACK_HEIGHT2,
|
|
5181
|
+
borderRadius: 16,
|
|
5182
|
+
backgroundColor: colors.primary
|
|
5183
|
+
},
|
|
5184
|
+
thumb: {
|
|
5185
|
+
position: "absolute",
|
|
5186
|
+
top: 0,
|
|
5187
|
+
width: THUMB_SIZE2,
|
|
5188
|
+
height: THUMB_SIZE2,
|
|
5189
|
+
borderRadius: 32,
|
|
5190
|
+
borderWidth: 2,
|
|
5191
|
+
borderColor: colors.primary,
|
|
5192
|
+
backgroundColor: colors.white
|
|
5193
|
+
},
|
|
5194
|
+
thumbWeb: {
|
|
5195
|
+
cursor: "grab",
|
|
5196
|
+
touchAction: "none"
|
|
5197
|
+
},
|
|
5198
|
+
thumbFocusedWeb: {
|
|
5199
|
+
outlineColor: colors.white,
|
|
5200
|
+
outlineOffset: 2,
|
|
5201
|
+
outlineStyle: "solid",
|
|
5202
|
+
outlineWidth: 2
|
|
5203
|
+
},
|
|
5204
|
+
inputs: {
|
|
5205
|
+
width: "100%",
|
|
5206
|
+
height: 44,
|
|
5207
|
+
flexDirection: "row",
|
|
5208
|
+
alignItems: "center",
|
|
5209
|
+
justifyContent: "space-between"
|
|
5210
|
+
},
|
|
5211
|
+
inputField: {
|
|
5212
|
+
width: INPUT_WIDTH,
|
|
5213
|
+
height: 44,
|
|
5214
|
+
paddingVertical: 12,
|
|
5215
|
+
paddingHorizontal: 16,
|
|
5216
|
+
flexDirection: "row",
|
|
5217
|
+
alignItems: "center",
|
|
5218
|
+
gap: 10,
|
|
5219
|
+
borderWidth: 1,
|
|
5220
|
+
borderColor: colors.grey700,
|
|
5221
|
+
borderRadius: 60,
|
|
5222
|
+
backgroundColor: colors.grey700
|
|
5223
|
+
},
|
|
5224
|
+
inputFieldFocused: {
|
|
5225
|
+
borderColor: colors.primary
|
|
5226
|
+
},
|
|
5227
|
+
input: {
|
|
5228
|
+
minWidth: 0,
|
|
5229
|
+
flex: 1,
|
|
5230
|
+
margin: 0,
|
|
5231
|
+
padding: 0,
|
|
5232
|
+
fontFamily: fonts.sans,
|
|
5233
|
+
fontSize: 12,
|
|
5234
|
+
fontWeight: "400",
|
|
5235
|
+
lineHeight: 16,
|
|
5236
|
+
letterSpacing: 0.36,
|
|
5237
|
+
color: colors.white
|
|
5238
|
+
},
|
|
5239
|
+
inputWeb: {
|
|
5240
|
+
outlineStyle: "none"
|
|
5241
|
+
},
|
|
5242
|
+
currencySlot: {
|
|
5243
|
+
width: 20,
|
|
5244
|
+
height: 20,
|
|
5245
|
+
alignItems: "center",
|
|
5246
|
+
justifyContent: "center",
|
|
5247
|
+
flexShrink: 0
|
|
5248
|
+
},
|
|
5249
|
+
currency: {
|
|
5250
|
+
fontFamily: fonts.sans,
|
|
5251
|
+
fontSize: 16,
|
|
5252
|
+
fontWeight: "600",
|
|
5253
|
+
lineHeight: 22,
|
|
5254
|
+
color: colors.white
|
|
5255
|
+
}
|
|
5256
|
+
});
|
|
5257
|
+
|
|
5258
|
+
export { AreaExpandIcon, ArrowRightIcon, Avatar, BRAND_LOGO_COLORS, BRAND_LOGO_DEFAULT_HEIGHT, BRAND_LOGO_DEFAULT_WIDTH, Badge, BagIcon, BathroomsIcon, BedroomsIcon, BellIcon, BrandLogo, BuildingIcon, Button, CalendarIcon, CalendarOutlineIcon, CameraIcon, CardLocationIcon, CheckBadgeIcon, CheckIcon, CheckSuccessIcon, Checkbox, ChevronDownIcon, ChevronLeftIcon, ClockFilledIcon, ClockIcon, CommentCard, CopyIcon, Counter, DatePicker, FacebookIcon, FavoritesButton, FiltersIcon, GlobeIcon, GuestsIcon, HeartIcon, HelpCircleIcon, HomeIcon, Icon, Input, InstagramIcon, KeyIcon, LanguageSwitcher, LayoutGridIcon, LinkedInIcon, ListViewIcon, LocationPinIcon, LogOutIcon, MailIcon, MapViewIcon, MenuIcon, MenuItem, MinusIcon, NavigateIcon, PhoneIcon, PlusIcon, QrCodeIcon, Range, RatingInput, RatingStarIcon, SaveHeartIcon, SearchIcon, SegmentedToggle, Select, SettingsIcon, ShareIcon, ShowIcon, SidebarIcon, SortIcon, StarFilledIcon, StarIcon, StatCard, Textarea, Toggle, TooltipArrowIcon, UserIcon, UsersAltIcon, VideoIcon, WhatsAppIcon, avatarTypography, badgeTypography, buttonTypography, colors, commentCardTypography, counterTypography, datePickerTypography, defaultLanguageOptions, fonts, getIconsByGroup, grey, iconGroupNames, iconGroups, iconNames, icons, inputTypography, languageSwitcherTypography, ratingTypography, segmentedToggleTypography, selectTypography, statCardTypography, textareaTypography };
|
|
4494
5259
|
//# sourceMappingURL=index.js.map
|
|
4495
5260
|
//# sourceMappingURL=index.js.map
|