@ecohouse/ui 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -3
- package/dist/index.cjs +592 -102
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +263 -162
- package/dist/index.d.ts +263 -162
- package/dist/index.js +582 -104
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Badge/Badge.stories.tsx +52 -0
- package/src/components/Badge/Badge.tsx +131 -0
- package/src/components/Badge/index.ts +2 -0
- package/src/components/Counter/Counter.stories.tsx +46 -0
- package/src/components/Counter/Counter.tsx +135 -0
- package/src/components/Counter/index.ts +2 -0
- package/src/components/SegmentedToggle/SegmentedToggle.stories.tsx +63 -0
- package/src/components/SegmentedToggle/SegmentedToggle.tsx +221 -0
- package/src/components/SegmentedToggle/index.ts +2 -0
- package/src/components/StatCard/StatCard.stories.tsx +20 -0
- package/src/components/StatCard/StatCard.tsx +61 -0
- package/src/components/StatCard/index.ts +2 -0
- package/src/components/index.ts +12 -0
- package/src/icons/Minus/MinusIcon.tsx +20 -0
- package/src/icons/Minus/MinusIcon.web.tsx +19 -0
- package/src/icons/Minus/index.ts +1 -0
- package/src/icons/Minus/minusPath.ts +1 -0
- package/src/icons/Plus/PlusIcon.tsx +20 -0
- package/src/icons/Plus/PlusIcon.web.tsx +19 -0
- package/src/icons/Plus/index.ts +1 -0
- package/src/icons/Plus/plusPath.ts +1 -0
- package/src/icons/Sidebar/SidebarIcon.tsx +21 -0
- package/src/icons/Sidebar/SidebarIcon.web.tsx +27 -0
- package/src/icons/Sidebar/index.ts +1 -0
- package/src/icons/Sidebar/sidebarPath.ts +3 -0
- package/src/icons/UsersAlt/UsersAltIcon.tsx +14 -0
- package/src/icons/UsersAlt/UsersAltIcon.web.tsx +13 -0
- package/src/icons/UsersAlt/index.ts +1 -0
- package/src/icons/UsersAlt/usersAltPath.ts +2 -0
- package/src/icons/index.ts +4 -0
- package/src/icons/registry.ts +12 -2
- package/src/index.ts +18 -0
- package/src/theme/colors.test.ts +6 -0
- package/src/theme/colors.ts +6 -0
- package/src/theme/index.ts +4 -0
- package/src/theme/typography.ts +36 -0
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { forwardRef, useRef, useMemo, useState, useCallback, useEffect, useLayoutEffect } from 'react';
|
|
2
|
-
import { Pressable, View, Text, StyleSheet, Platform, Image,
|
|
2
|
+
import { Pressable, View, Text, StyleSheet, Platform, Image, Animated, Easing, TouchableOpacity, TextInput, ScrollView } from 'react-native';
|
|
3
3
|
import Svg, { Path } from 'react-native-svg';
|
|
4
4
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
@@ -30,9 +30,15 @@ var colors = {
|
|
|
30
30
|
primary: "#B46436",
|
|
31
31
|
black: "#000000",
|
|
32
32
|
white: "#ffffff",
|
|
33
|
+
whiteAlpha86: "#FFFFFFDB",
|
|
34
|
+
whiteAlpha40: "#FFFFFF66",
|
|
35
|
+
whiteAlpha20: "#FFFFFF33",
|
|
36
|
+
whiteAlpha10: "#FFFFFF1A",
|
|
37
|
+
whiteAlpha5: "#FFFFFF0D",
|
|
33
38
|
dark: "#090909",
|
|
34
39
|
red: "#A63E3E",
|
|
35
40
|
lightGrey: "#B7B7B7",
|
|
41
|
+
green: "#34A853",
|
|
36
42
|
primaryMuted: "#B464360F",
|
|
37
43
|
primaryHover: "#B4643633",
|
|
38
44
|
redMuted: "#A63E3E0F",
|
|
@@ -74,6 +80,34 @@ var buttonTypography = {
|
|
|
74
80
|
letterSpacing: 0.36
|
|
75
81
|
}
|
|
76
82
|
};
|
|
83
|
+
var badgeTypography = {
|
|
84
|
+
fontFamily: fonts.sans,
|
|
85
|
+
fontSize: 14,
|
|
86
|
+
fontWeight: "400",
|
|
87
|
+
lineHeight: 16,
|
|
88
|
+
letterSpacing: 0
|
|
89
|
+
};
|
|
90
|
+
var statCardTypography = {
|
|
91
|
+
fontFamily: fonts.sans,
|
|
92
|
+
fontSize: 16,
|
|
93
|
+
fontWeight: "500",
|
|
94
|
+
lineHeight: 16,
|
|
95
|
+
letterSpacing: 0
|
|
96
|
+
};
|
|
97
|
+
var segmentedToggleTypography = {
|
|
98
|
+
fontFamily: fonts.sans,
|
|
99
|
+
fontSize: 14,
|
|
100
|
+
fontWeight: "500",
|
|
101
|
+
lineHeight: 14,
|
|
102
|
+
letterSpacing: 0
|
|
103
|
+
};
|
|
104
|
+
var counterTypography = {
|
|
105
|
+
fontFamily: fonts.sans,
|
|
106
|
+
fontSize: 14,
|
|
107
|
+
fontWeight: "700",
|
|
108
|
+
lineHeight: 14,
|
|
109
|
+
letterSpacing: 0
|
|
110
|
+
};
|
|
77
111
|
var inputTypography = {
|
|
78
112
|
label: {
|
|
79
113
|
fontFamily: fonts.sans,
|
|
@@ -521,6 +555,21 @@ function MailIcon({ size = 20, color = colors.primary, strokeWidth = 2 }) {
|
|
|
521
555
|
) });
|
|
522
556
|
}
|
|
523
557
|
|
|
558
|
+
// src/icons/Minus/minusPath.ts
|
|
559
|
+
var MINUS_PATH = "M3.33337 8H12.6667";
|
|
560
|
+
function MinusIcon({ size = 16, color = colors.white, strokeWidth = 2 }) {
|
|
561
|
+
return /* @__PURE__ */ jsx(Svg, { width: size, height: size, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ jsx(
|
|
562
|
+
Path,
|
|
563
|
+
{
|
|
564
|
+
d: MINUS_PATH,
|
|
565
|
+
stroke: color,
|
|
566
|
+
strokeWidth,
|
|
567
|
+
strokeLinecap: "round",
|
|
568
|
+
strokeLinejoin: "round"
|
|
569
|
+
}
|
|
570
|
+
) });
|
|
571
|
+
}
|
|
572
|
+
|
|
524
573
|
// src/icons/Navigate/navigatePath.ts
|
|
525
574
|
var NAVIGATE_PATH = "M5.691 14.2339C11.5836 17.7694 16.2976 13.0554 15.7084 4.21658C6.86968 3.62732 2.15584 8.34151 5.691 14.2339ZM5.691 14.2339C5.69093 14.2338 5.69107 14.234 5.691 14.2339ZM5.691 14.2339L4.16675 15.7576M5.691 14.2339L8.88079 11.0436";
|
|
526
575
|
function NavigateIcon({ size = 20, color = colors.primary, strokeWidth = 2 }) {
|
|
@@ -551,6 +600,21 @@ function PhoneIcon({ size = 20, color = colors.primary, strokeWidth = 2 }) {
|
|
|
551
600
|
) });
|
|
552
601
|
}
|
|
553
602
|
|
|
603
|
+
// src/icons/Plus/plusPath.ts
|
|
604
|
+
var PLUS_PATH = "M8.00004 3.33325V12.6666M3.33337 7.99992H12.6667";
|
|
605
|
+
function PlusIcon({ size = 16, color = colors.white, strokeWidth = 2 }) {
|
|
606
|
+
return /* @__PURE__ */ jsx(Svg, { width: size, height: size, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ jsx(
|
|
607
|
+
Path,
|
|
608
|
+
{
|
|
609
|
+
d: PLUS_PATH,
|
|
610
|
+
stroke: color,
|
|
611
|
+
strokeWidth,
|
|
612
|
+
strokeLinecap: "round",
|
|
613
|
+
strokeLinejoin: "round"
|
|
614
|
+
}
|
|
615
|
+
) });
|
|
616
|
+
}
|
|
617
|
+
|
|
554
618
|
// src/icons/Search/searchPath.ts
|
|
555
619
|
var SEARCH_CIRCLE_PATH = "M9.16667 15.8333C12.8486 15.8333 15.8333 12.8486 15.8333 9.16667C15.8333 5.48477 12.8486 2.5 9.16667 2.5C5.48477 2.5 2.5 5.48477 2.5 9.16667C2.5 12.8486 5.48477 15.8333 9.16667 15.8333Z";
|
|
556
620
|
var SEARCH_HANDLE_PATH = "M17.5 17.5L13.875 13.875";
|
|
@@ -626,6 +690,21 @@ function ShowIcon({ size = 20, color = colors.primary, strokeWidth = 2 }) {
|
|
|
626
690
|
] });
|
|
627
691
|
}
|
|
628
692
|
|
|
693
|
+
// src/icons/Sidebar/sidebarPath.ts
|
|
694
|
+
var SIDEBAR_PATH = "M12.5 2.5V17.5M6.5 2.5H13.5C14.9001 2.5 15.6002 2.5 16.135 2.77248C16.6054 3.01217 16.9878 3.39462 17.2275 3.86502C17.5 4.3998 17.5 5.09987 17.5 6.5V13.5C17.5 14.9001 17.5 15.6002 17.2275 16.135C16.9878 16.6054 16.6054 16.9878 16.135 17.2275C15.6002 17.5 14.9001 17.5 13.5 17.5H6.5C5.09987 17.5 4.3998 17.5 3.86502 17.2275C3.39462 16.9878 3.01217 16.6054 2.77248 16.135C2.5 15.6002 2.5 14.9001 2.5 13.5V6.5C2.5 5.09987 2.5 4.3998 2.77248 3.86502C3.01217 3.39462 3.39462 3.01217 3.86502 2.77248C4.3998 2.5 5.09987 2.5 6.5 2.5Z";
|
|
695
|
+
function SidebarIcon({ size = 20, color = colors.primary, strokeWidth = 2 }) {
|
|
696
|
+
return /* @__PURE__ */ jsx(Svg, { width: size, height: size, viewBox: "0 0 20 20", fill: "none", children: /* @__PURE__ */ jsx(
|
|
697
|
+
Path,
|
|
698
|
+
{
|
|
699
|
+
d: SIDEBAR_PATH,
|
|
700
|
+
stroke: color,
|
|
701
|
+
strokeWidth,
|
|
702
|
+
strokeLinecap: "round",
|
|
703
|
+
strokeLinejoin: "round"
|
|
704
|
+
}
|
|
705
|
+
) });
|
|
706
|
+
}
|
|
707
|
+
|
|
629
708
|
// src/icons/User/userPath.ts
|
|
630
709
|
var USER_PATH = "M15.8334 17.5C15.8334 14.2783 13.2217 11.6667 10 11.6667C6.77836 11.6667 4.16669 14.2783 4.16669 17.5M10 9.16667C8.15907 9.16667 6.66669 7.67428 6.66669 5.83333C6.66669 3.99238 8.15907 2.5 10 2.5C11.841 2.5 13.3334 3.99238 13.3334 5.83333C13.3334 7.67428 11.841 9.16667 10 9.16667Z";
|
|
631
710
|
function UserIcon({ size = 20, color = colors.primary, strokeWidth = 2 }) {
|
|
@@ -641,6 +720,12 @@ function UserIcon({ size = 20, color = colors.primary, strokeWidth = 2 }) {
|
|
|
641
720
|
) });
|
|
642
721
|
}
|
|
643
722
|
|
|
723
|
+
// src/icons/UsersAlt/usersAltPath.ts
|
|
724
|
+
var USERS_ALT_PATH = "M14.35 14.2566C14.9725 13.7177 15.4718 13.0513 15.814 12.3024C16.1562 11.5536 16.3333 10.7399 16.3333 9.91659C16.3333 8.36949 15.7187 6.88576 14.6248 5.7918C13.5308 4.69783 12.0471 4.08325 10.5 4.08325C8.95289 4.08325 7.46916 4.69783 6.3752 5.7918C5.28124 6.88576 4.66666 8.36949 4.66666 9.91659C4.66665 10.7399 4.84376 11.5536 5.18597 12.3024C5.52818 13.0513 6.02748 13.7177 6.64999 14.2566C5.01682 14.9961 3.6312 16.1904 2.6588 17.6966C1.6864 19.2027 1.16837 20.9571 1.16666 22.7499C1.16666 23.0593 1.28957 23.3561 1.50837 23.5749C1.72716 23.7937 2.0239 23.9166 2.33332 23.9166C2.64274 23.9166 2.93949 23.7937 3.15828 23.5749C3.37707 23.3561 3.49999 23.0593 3.49999 22.7499C3.49999 20.8934 4.23749 19.1129 5.55024 17.8002C6.863 16.4874 8.64347 15.7499 10.5 15.7499C12.3565 15.7499 14.137 16.4874 15.4497 17.8002C16.7625 19.1129 17.5 20.8934 17.5 22.7499C17.5 23.0593 17.6229 23.3561 17.8417 23.5749C18.0605 23.7937 18.3572 23.9166 18.6667 23.9166C18.9761 23.9166 19.2728 23.7937 19.4916 23.5749C19.7104 23.3561 19.8333 23.0593 19.8333 22.7499C19.8316 20.9571 19.3136 19.2027 18.3412 17.6966C17.3688 16.1904 15.9832 14.9961 14.35 14.2566ZM10.5 13.4166C9.80775 13.4166 9.13107 13.2113 8.55549 12.8267C7.97992 12.4421 7.53132 11.8955 7.26641 11.256C7.0015 10.6164 6.93219 9.9127 7.06724 9.23377C7.20229 8.55484 7.53563 7.9312 8.02512 7.44171C8.5146 6.95223 9.13824 6.61889 9.81717 6.48384C10.4961 6.34879 11.1998 6.4181 11.8394 6.68301C12.4789 6.94791 13.0255 7.39652 13.4101 7.97209C13.7947 8.54766 14 9.22435 14 9.91659C14 10.8448 13.6312 11.7351 12.9749 12.3915C12.3185 13.0478 11.4282 13.4166 10.5 13.4166ZM21.8633 13.7899C22.61 12.9491 23.0977 11.9105 23.2678 10.799C23.4378 9.68748 23.2831 8.55051 22.822 7.52492C22.361 6.49933 21.6134 5.62885 20.6692 5.01825C19.725 4.40764 18.6244 4.08295 17.5 4.08325C17.1906 4.08325 16.8938 4.20617 16.675 4.42496C16.4562 4.64375 16.3333 4.9405 16.3333 5.24992C16.3333 5.55934 16.4562 5.85608 16.675 6.07488C16.8938 6.29367 17.1906 6.41659 17.5 6.41659C18.4282 6.41659 19.3185 6.78533 19.9749 7.44171C20.6312 8.09809 21 8.98833 21 9.91659C20.9983 10.5294 20.8358 11.131 20.5287 11.6612C20.2216 12.1915 19.7807 12.6319 19.25 12.9383C19.077 13.038 18.9325 13.1805 18.8304 13.3521C18.7283 13.5237 18.6719 13.7186 18.6667 13.9183C18.6618 14.1163 18.7074 14.3123 18.7993 14.4879C18.8911 14.6634 19.0262 14.8127 19.1917 14.9216L19.6467 15.2249L19.7983 15.3066C21.2046 15.9736 22.391 17.0286 23.2178 18.3473C24.0446 19.666 24.4773 21.1935 24.465 22.7499C24.465 23.0593 24.5879 23.3561 24.8067 23.5749C25.0255 23.7937 25.3222 23.9166 25.6317 23.9166C25.9411 23.9166 26.2378 23.7937 26.4566 23.5749C26.6754 23.3561 26.7983 23.0593 26.7983 22.7499C26.8079 20.9596 26.3594 19.1965 25.4957 17.6283C24.632 16.0601 23.3816 14.7388 21.8633 13.7899Z";
|
|
725
|
+
function UsersAltIcon({ size = 28, color = colors.white }) {
|
|
726
|
+
return /* @__PURE__ */ jsx(Svg, { width: size, height: size, viewBox: "0 0 28 28", fill: "none", children: /* @__PURE__ */ jsx(Path, { d: USERS_ALT_PATH, fill: color }) });
|
|
727
|
+
}
|
|
728
|
+
|
|
644
729
|
// src/icons/Video/videoPath.ts
|
|
645
730
|
var VIDEO_PATHS = [
|
|
646
731
|
"M14.6667 5.95424C14.6667 5.55036 14.6667 5.34843 14.5868 5.25492C14.5175 5.17378 14.4136 5.13072 14.3072 5.13909C14.1846 5.14874 14.0418 5.29153 13.7563 5.57712L11.3334 7.99999L13.7563 10.4229C14.0418 10.7085 14.1846 10.8512 14.3072 10.8609C14.4136 10.8693 14.5175 10.8262 14.5868 10.7451C14.6667 10.6516 14.6667 10.4496 14.6667 10.0457V5.95424Z",
|
|
@@ -684,12 +769,16 @@ var icons = {
|
|
|
684
769
|
linkedin: LinkedInIcon,
|
|
685
770
|
logOut: LogOutIcon,
|
|
686
771
|
mail: MailIcon,
|
|
772
|
+
minus: MinusIcon,
|
|
687
773
|
navigate: NavigateIcon,
|
|
688
774
|
phone: PhoneIcon,
|
|
775
|
+
plus: PlusIcon,
|
|
689
776
|
search: SearchIcon,
|
|
690
777
|
settings: SettingsIcon,
|
|
691
778
|
show: ShowIcon,
|
|
779
|
+
sidebar: SidebarIcon,
|
|
692
780
|
user: UserIcon,
|
|
781
|
+
usersAlt: UsersAltIcon,
|
|
693
782
|
video: VideoIcon
|
|
694
783
|
};
|
|
695
784
|
var iconNames = Object.keys(icons);
|
|
@@ -705,12 +794,14 @@ var iconGroups = {
|
|
|
705
794
|
"search",
|
|
706
795
|
"calendar",
|
|
707
796
|
"calendarOutline",
|
|
708
|
-
"heart"
|
|
797
|
+
"heart",
|
|
798
|
+
"minus",
|
|
799
|
+
"plus"
|
|
709
800
|
],
|
|
710
|
-
objects: ["bag", "building", "clock", "user", "video"],
|
|
801
|
+
objects: ["bag", "building", "clock", "user", "usersAlt", "video"],
|
|
711
802
|
communication: ["mail", "phone"],
|
|
712
803
|
social: ["facebook", "instagram", "linkedin"],
|
|
713
|
-
interface: ["layoutGrid", "settings", "helpCircle", "logOut"]
|
|
804
|
+
interface: ["layoutGrid", "sidebar", "settings", "helpCircle", "logOut"]
|
|
714
805
|
};
|
|
715
806
|
var iconGroupNames = Object.keys(iconGroups);
|
|
716
807
|
function getIconsByGroup(group) {
|
|
@@ -1087,7 +1178,394 @@ var styles2 = StyleSheet.create({
|
|
|
1087
1178
|
})
|
|
1088
1179
|
}
|
|
1089
1180
|
});
|
|
1181
|
+
var ICON_SIZE2 = 20;
|
|
1182
|
+
var webBlurStyle = Platform.OS === "web" ? {
|
|
1183
|
+
backdropFilter: "blur(10.3px)",
|
|
1184
|
+
WebkitBackdropFilter: "blur(10.3px)"
|
|
1185
|
+
} : {};
|
|
1090
1186
|
var variantConfig = {
|
|
1187
|
+
default: {
|
|
1188
|
+
backgroundColor: colors.grey750,
|
|
1189
|
+
iconColor: colors.white,
|
|
1190
|
+
border: false,
|
|
1191
|
+
blur: false
|
|
1192
|
+
},
|
|
1193
|
+
transparent: {
|
|
1194
|
+
backgroundColor: colors.whiteAlpha5,
|
|
1195
|
+
iconColor: colors.primary,
|
|
1196
|
+
border: true,
|
|
1197
|
+
blur: true
|
|
1198
|
+
}
|
|
1199
|
+
};
|
|
1200
|
+
var Badge = forwardRef(function Badge2({ label, variant = "default", icon: Icon2, style, className, accessibilityLabel, ...rest }, forwardedRef) {
|
|
1201
|
+
const containerRef = useRef(null);
|
|
1202
|
+
const preset = variantConfig[variant];
|
|
1203
|
+
const resolvedClassName = className?.trim() || void 0;
|
|
1204
|
+
const setContainerRef = useMemo(() => mergeRefs(containerRef, forwardedRef), [forwardedRef]);
|
|
1205
|
+
useApplyWebClassName(containerRef, resolvedClassName);
|
|
1206
|
+
return /* @__PURE__ */ jsxs(
|
|
1207
|
+
View,
|
|
1208
|
+
{
|
|
1209
|
+
...rest,
|
|
1210
|
+
ref: setContainerRef,
|
|
1211
|
+
style: [
|
|
1212
|
+
styles3.base,
|
|
1213
|
+
{ backgroundColor: preset.backgroundColor },
|
|
1214
|
+
preset.border ? styles3.transparentBorder : null,
|
|
1215
|
+
preset.blur ? webBlurStyle : null,
|
|
1216
|
+
style
|
|
1217
|
+
],
|
|
1218
|
+
accessibilityRole: "text",
|
|
1219
|
+
accessibilityLabel: accessibilityLabel ?? label,
|
|
1220
|
+
children: [
|
|
1221
|
+
Icon2 ? /* @__PURE__ */ jsx(View, { style: styles3.iconSlot, children: /* @__PURE__ */ jsx(Icon2, { size: ICON_SIZE2, color: preset.iconColor }) }) : null,
|
|
1222
|
+
/* @__PURE__ */ jsx(Text, { style: [styles3.label, Platform.OS === "android" ? styles3.labelAndroid : null], children: label })
|
|
1223
|
+
]
|
|
1224
|
+
}
|
|
1225
|
+
);
|
|
1226
|
+
});
|
|
1227
|
+
var styles3 = StyleSheet.create({
|
|
1228
|
+
base: {
|
|
1229
|
+
flexDirection: "row",
|
|
1230
|
+
alignItems: "center",
|
|
1231
|
+
alignSelf: "flex-start",
|
|
1232
|
+
minHeight: 44,
|
|
1233
|
+
paddingVertical: 12,
|
|
1234
|
+
paddingHorizontal: 16,
|
|
1235
|
+
gap: 12,
|
|
1236
|
+
borderRadius: 79,
|
|
1237
|
+
overflow: "hidden",
|
|
1238
|
+
borderWidth: 0,
|
|
1239
|
+
borderColor: "transparent",
|
|
1240
|
+
borderStyle: "solid"
|
|
1241
|
+
},
|
|
1242
|
+
transparentBorder: {
|
|
1243
|
+
borderWidth: 1,
|
|
1244
|
+
borderColor: colors.whiteAlpha5,
|
|
1245
|
+
borderStyle: "solid"
|
|
1246
|
+
},
|
|
1247
|
+
iconSlot: {
|
|
1248
|
+
width: ICON_SIZE2,
|
|
1249
|
+
height: ICON_SIZE2,
|
|
1250
|
+
alignItems: "center",
|
|
1251
|
+
justifyContent: "center",
|
|
1252
|
+
flexShrink: 0
|
|
1253
|
+
},
|
|
1254
|
+
label: {
|
|
1255
|
+
...badgeTypography,
|
|
1256
|
+
color: colors.white
|
|
1257
|
+
},
|
|
1258
|
+
labelAndroid: {
|
|
1259
|
+
includeFontPadding: false
|
|
1260
|
+
}
|
|
1261
|
+
});
|
|
1262
|
+
var BUTTON_SIZE = 32;
|
|
1263
|
+
var webBlurStyle2 = Platform.OS === "web" ? {
|
|
1264
|
+
backdropFilter: "blur(20px)",
|
|
1265
|
+
WebkitBackdropFilter: "blur(20px)"
|
|
1266
|
+
} : {};
|
|
1267
|
+
function clamp(value, min, max) {
|
|
1268
|
+
return Math.max(min, max === void 0 ? value : Math.min(value, max));
|
|
1269
|
+
}
|
|
1270
|
+
var Counter = forwardRef(function Counter2({
|
|
1271
|
+
value,
|
|
1272
|
+
defaultValue,
|
|
1273
|
+
onValueChange,
|
|
1274
|
+
min = 1,
|
|
1275
|
+
max,
|
|
1276
|
+
step = 1,
|
|
1277
|
+
disabled = false,
|
|
1278
|
+
style,
|
|
1279
|
+
className,
|
|
1280
|
+
hitSlop,
|
|
1281
|
+
...rest
|
|
1282
|
+
}, forwardedRef) {
|
|
1283
|
+
const containerRef = useRef(null);
|
|
1284
|
+
const isControlled = value !== void 0;
|
|
1285
|
+
const [uncontrolledValue, setUncontrolledValue] = useState(
|
|
1286
|
+
() => clamp(defaultValue ?? min, min, max)
|
|
1287
|
+
);
|
|
1288
|
+
const resolvedValue = clamp(isControlled ? value : uncontrolledValue, min, max);
|
|
1289
|
+
const resolvedClassName = className?.trim() || void 0;
|
|
1290
|
+
const setContainerRef = useMemo(() => mergeRefs(containerRef, forwardedRef), [forwardedRef]);
|
|
1291
|
+
const decrementDisabled = disabled || resolvedValue <= min;
|
|
1292
|
+
const incrementDisabled = disabled || max !== void 0 && resolvedValue >= max;
|
|
1293
|
+
useApplyWebClassName(containerRef, resolvedClassName);
|
|
1294
|
+
const updateValue = (nextValue) => {
|
|
1295
|
+
const next = clamp(nextValue, min, max);
|
|
1296
|
+
if (next === resolvedValue) return;
|
|
1297
|
+
if (!isControlled) setUncontrolledValue(next);
|
|
1298
|
+
onValueChange?.(next);
|
|
1299
|
+
};
|
|
1300
|
+
return /* @__PURE__ */ jsxs(View, { ...rest, ref: setContainerRef, style: [styles4.base, style], children: [
|
|
1301
|
+
/* @__PURE__ */ jsx(
|
|
1302
|
+
Pressable,
|
|
1303
|
+
{
|
|
1304
|
+
disabled: decrementDisabled,
|
|
1305
|
+
hitSlop,
|
|
1306
|
+
onPress: () => updateValue(resolvedValue - step),
|
|
1307
|
+
accessibilityRole: "button",
|
|
1308
|
+
accessibilityLabel: "Decrease value",
|
|
1309
|
+
accessibilityState: { disabled: decrementDisabled },
|
|
1310
|
+
style: [styles4.button, webBlurStyle2, decrementDisabled && styles4.buttonDisabled],
|
|
1311
|
+
children: /* @__PURE__ */ jsx(MinusIcon, {})
|
|
1312
|
+
}
|
|
1313
|
+
),
|
|
1314
|
+
/* @__PURE__ */ jsx(Text, { style: styles4.value, children: resolvedValue }),
|
|
1315
|
+
/* @__PURE__ */ jsx(
|
|
1316
|
+
Pressable,
|
|
1317
|
+
{
|
|
1318
|
+
disabled: incrementDisabled,
|
|
1319
|
+
hitSlop,
|
|
1320
|
+
onPress: () => updateValue(resolvedValue + step),
|
|
1321
|
+
accessibilityRole: "button",
|
|
1322
|
+
accessibilityLabel: "Increase value",
|
|
1323
|
+
accessibilityState: { disabled: incrementDisabled },
|
|
1324
|
+
style: [styles4.button, webBlurStyle2, incrementDisabled && styles4.buttonDisabled],
|
|
1325
|
+
children: /* @__PURE__ */ jsx(PlusIcon, {})
|
|
1326
|
+
}
|
|
1327
|
+
)
|
|
1328
|
+
] });
|
|
1329
|
+
});
|
|
1330
|
+
var styles4 = StyleSheet.create({
|
|
1331
|
+
base: {
|
|
1332
|
+
flexDirection: "row",
|
|
1333
|
+
alignItems: "center",
|
|
1334
|
+
alignSelf: "flex-start",
|
|
1335
|
+
gap: 17
|
|
1336
|
+
},
|
|
1337
|
+
button: {
|
|
1338
|
+
width: BUTTON_SIZE,
|
|
1339
|
+
height: BUTTON_SIZE,
|
|
1340
|
+
alignItems: "center",
|
|
1341
|
+
justifyContent: "center",
|
|
1342
|
+
borderWidth: 1,
|
|
1343
|
+
borderColor: colors.whiteAlpha10,
|
|
1344
|
+
borderRadius: 39
|
|
1345
|
+
},
|
|
1346
|
+
buttonDisabled: {
|
|
1347
|
+
opacity: 0.25
|
|
1348
|
+
},
|
|
1349
|
+
value: {
|
|
1350
|
+
...counterTypography,
|
|
1351
|
+
color: colors.white
|
|
1352
|
+
}
|
|
1353
|
+
});
|
|
1354
|
+
var ICON_SIZE3 = 20;
|
|
1355
|
+
var ANIMATION_DURATION = 200;
|
|
1356
|
+
var SegmentedToggle = forwardRef(
|
|
1357
|
+
function SegmentedToggle2({
|
|
1358
|
+
options,
|
|
1359
|
+
value,
|
|
1360
|
+
defaultValue = options[0].value,
|
|
1361
|
+
onValueChange,
|
|
1362
|
+
fullWidth = true,
|
|
1363
|
+
disabled = false,
|
|
1364
|
+
style,
|
|
1365
|
+
className,
|
|
1366
|
+
hitSlop,
|
|
1367
|
+
onLayout,
|
|
1368
|
+
...rest
|
|
1369
|
+
}, forwardedRef) {
|
|
1370
|
+
const containerRef = useRef(null);
|
|
1371
|
+
const isControlled = value !== void 0;
|
|
1372
|
+
const [uncontrolledValue, setUncontrolledValue] = useState(defaultValue);
|
|
1373
|
+
const selectedValue = isControlled ? value : uncontrolledValue;
|
|
1374
|
+
const selectedIndex = Math.max(
|
|
1375
|
+
0,
|
|
1376
|
+
options.findIndex(({ value: optionValue }) => optionValue === selectedValue)
|
|
1377
|
+
);
|
|
1378
|
+
const resolvedClassName = className?.trim() || void 0;
|
|
1379
|
+
const setContainerRef = useMemo(() => mergeRefs(containerRef, forwardedRef), [forwardedRef]);
|
|
1380
|
+
const progress = useRef(new Animated.Value(selectedIndex)).current;
|
|
1381
|
+
const [contentWidths, setContentWidths] = useState([0, 0]);
|
|
1382
|
+
const [containerWidth, setContainerWidth] = useState(0);
|
|
1383
|
+
const availableOptionWidth = Math.max(0, (containerWidth - 12) / 2);
|
|
1384
|
+
const widestContentWidth = Math.max(...contentWidths);
|
|
1385
|
+
const contentBasedOptionWidth = widestContentWidth > 0 ? widestContentWidth + 24 * 2 : 0;
|
|
1386
|
+
const optionWidth = fullWidth ? availableOptionWidth : contentBasedOptionWidth;
|
|
1387
|
+
const indicatorTranslateX = progress.interpolate({
|
|
1388
|
+
inputRange: [0, 1],
|
|
1389
|
+
outputRange: [0, optionWidth + 4]
|
|
1390
|
+
});
|
|
1391
|
+
useApplyWebClassName(containerRef, resolvedClassName);
|
|
1392
|
+
useEffect(() => {
|
|
1393
|
+
const animation = Animated.timing(progress, {
|
|
1394
|
+
toValue: selectedIndex,
|
|
1395
|
+
duration: ANIMATION_DURATION,
|
|
1396
|
+
easing: Easing.out(Easing.cubic),
|
|
1397
|
+
useNativeDriver: true
|
|
1398
|
+
});
|
|
1399
|
+
animation.start();
|
|
1400
|
+
return () => animation.stop();
|
|
1401
|
+
}, [progress, selectedIndex]);
|
|
1402
|
+
const selectOption = (nextValue) => {
|
|
1403
|
+
if (disabled || nextValue === selectedValue) return;
|
|
1404
|
+
if (!isControlled) setUncontrolledValue(nextValue);
|
|
1405
|
+
onValueChange?.(nextValue);
|
|
1406
|
+
};
|
|
1407
|
+
return /* @__PURE__ */ jsxs(
|
|
1408
|
+
View,
|
|
1409
|
+
{
|
|
1410
|
+
...rest,
|
|
1411
|
+
ref: setContainerRef,
|
|
1412
|
+
onLayout: (event) => {
|
|
1413
|
+
const nextWidth = event.nativeEvent.layout.width;
|
|
1414
|
+
setContainerWidth(
|
|
1415
|
+
(currentWidth) => currentWidth === nextWidth ? currentWidth : nextWidth
|
|
1416
|
+
);
|
|
1417
|
+
onLayout?.(event);
|
|
1418
|
+
},
|
|
1419
|
+
style: [
|
|
1420
|
+
styles5.base,
|
|
1421
|
+
fullWidth ? styles5.fullWidth : styles5.contentWidth,
|
|
1422
|
+
disabled && styles5.disabled,
|
|
1423
|
+
style
|
|
1424
|
+
],
|
|
1425
|
+
accessibilityRole: "radiogroup",
|
|
1426
|
+
children: [
|
|
1427
|
+
optionWidth > 0 ? /* @__PURE__ */ jsx(
|
|
1428
|
+
Animated.View,
|
|
1429
|
+
{
|
|
1430
|
+
pointerEvents: "none",
|
|
1431
|
+
style: [
|
|
1432
|
+
styles5.activeIndicator,
|
|
1433
|
+
{ width: optionWidth, transform: [{ translateX: indicatorTranslateX }] }
|
|
1434
|
+
]
|
|
1435
|
+
}
|
|
1436
|
+
) : null,
|
|
1437
|
+
options.map(({ value: optionValue, label, icon: Icon2 }, index) => {
|
|
1438
|
+
const selected = optionValue === selectedValue;
|
|
1439
|
+
const iconColor = selected ? colors.primary : colors.whiteAlpha20;
|
|
1440
|
+
const labelColor = selected ? colors.whiteAlpha86 : colors.whiteAlpha40;
|
|
1441
|
+
return /* @__PURE__ */ jsx(
|
|
1442
|
+
Pressable,
|
|
1443
|
+
{
|
|
1444
|
+
onPress: () => selectOption(optionValue),
|
|
1445
|
+
disabled,
|
|
1446
|
+
hitSlop,
|
|
1447
|
+
accessibilityRole: "radio",
|
|
1448
|
+
accessibilityLabel: label,
|
|
1449
|
+
accessibilityState: { selected, disabled },
|
|
1450
|
+
style: [
|
|
1451
|
+
styles5.option,
|
|
1452
|
+
fullWidth ? styles5.optionFullWidth : optionWidth > 0 && { minWidth: optionWidth }
|
|
1453
|
+
],
|
|
1454
|
+
children: /* @__PURE__ */ jsxs(
|
|
1455
|
+
View,
|
|
1456
|
+
{
|
|
1457
|
+
onLayout: (event) => {
|
|
1458
|
+
const nextWidth = event.nativeEvent.layout.width;
|
|
1459
|
+
setContentWidths((currentWidths) => {
|
|
1460
|
+
if (currentWidths[index] === nextWidth) return currentWidths;
|
|
1461
|
+
const nextWidths = [currentWidths[0], currentWidths[1]];
|
|
1462
|
+
nextWidths[index] = nextWidth;
|
|
1463
|
+
return nextWidths;
|
|
1464
|
+
});
|
|
1465
|
+
},
|
|
1466
|
+
style: styles5.optionContent,
|
|
1467
|
+
children: [
|
|
1468
|
+
Icon2 ? /* @__PURE__ */ jsx(Icon2, { size: ICON_SIZE3, color: iconColor }) : null,
|
|
1469
|
+
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [styles5.label, { color: labelColor }], children: label })
|
|
1470
|
+
]
|
|
1471
|
+
}
|
|
1472
|
+
)
|
|
1473
|
+
},
|
|
1474
|
+
optionValue
|
|
1475
|
+
);
|
|
1476
|
+
})
|
|
1477
|
+
]
|
|
1478
|
+
}
|
|
1479
|
+
);
|
|
1480
|
+
}
|
|
1481
|
+
);
|
|
1482
|
+
var styles5 = StyleSheet.create({
|
|
1483
|
+
base: {
|
|
1484
|
+
height: 44,
|
|
1485
|
+
flexDirection: "row",
|
|
1486
|
+
padding: 4,
|
|
1487
|
+
gap: 4,
|
|
1488
|
+
borderRadius: 60,
|
|
1489
|
+
backgroundColor: colors.grey700,
|
|
1490
|
+
overflow: "hidden"
|
|
1491
|
+
},
|
|
1492
|
+
fullWidth: {
|
|
1493
|
+
width: "100%",
|
|
1494
|
+
alignSelf: "stretch"
|
|
1495
|
+
},
|
|
1496
|
+
contentWidth: {
|
|
1497
|
+
alignSelf: "flex-start"
|
|
1498
|
+
},
|
|
1499
|
+
disabled: {
|
|
1500
|
+
opacity: 0.6
|
|
1501
|
+
},
|
|
1502
|
+
option: {
|
|
1503
|
+
zIndex: 1,
|
|
1504
|
+
flexDirection: "row",
|
|
1505
|
+
alignItems: "center",
|
|
1506
|
+
justifyContent: "center",
|
|
1507
|
+
paddingHorizontal: 24,
|
|
1508
|
+
borderRadius: 60
|
|
1509
|
+
},
|
|
1510
|
+
optionContent: {
|
|
1511
|
+
maxWidth: "100%",
|
|
1512
|
+
flexDirection: "row",
|
|
1513
|
+
alignItems: "center",
|
|
1514
|
+
gap: 12
|
|
1515
|
+
},
|
|
1516
|
+
optionFullWidth: {
|
|
1517
|
+
flex: 1,
|
|
1518
|
+
minWidth: 0
|
|
1519
|
+
},
|
|
1520
|
+
activeIndicator: {
|
|
1521
|
+
position: "absolute",
|
|
1522
|
+
top: 4,
|
|
1523
|
+
left: 4,
|
|
1524
|
+
height: 36,
|
|
1525
|
+
backgroundColor: colors.grey600,
|
|
1526
|
+
borderRadius: 60
|
|
1527
|
+
},
|
|
1528
|
+
label: {
|
|
1529
|
+
...segmentedToggleTypography,
|
|
1530
|
+
flexShrink: 1
|
|
1531
|
+
}
|
|
1532
|
+
});
|
|
1533
|
+
var ICON_SIZE4 = 28;
|
|
1534
|
+
var StatCard = forwardRef(function StatCard2({ label, icon: Icon2, style, className, accessibilityLabel, ...rest }, forwardedRef) {
|
|
1535
|
+
const containerRef = useRef(null);
|
|
1536
|
+
const resolvedClassName = className?.trim() || void 0;
|
|
1537
|
+
const setContainerRef = useMemo(() => mergeRefs(containerRef, forwardedRef), [forwardedRef]);
|
|
1538
|
+
useApplyWebClassName(containerRef, resolvedClassName);
|
|
1539
|
+
return /* @__PURE__ */ jsxs(
|
|
1540
|
+
View,
|
|
1541
|
+
{
|
|
1542
|
+
...rest,
|
|
1543
|
+
ref: setContainerRef,
|
|
1544
|
+
style: [styles6.base, style],
|
|
1545
|
+
accessibilityRole: "text",
|
|
1546
|
+
accessibilityLabel: accessibilityLabel ?? label,
|
|
1547
|
+
children: [
|
|
1548
|
+
/* @__PURE__ */ jsx(Icon2, { size: ICON_SIZE4, color: colors.white }),
|
|
1549
|
+
/* @__PURE__ */ jsx(Text, { style: styles6.label, children: label })
|
|
1550
|
+
]
|
|
1551
|
+
}
|
|
1552
|
+
);
|
|
1553
|
+
});
|
|
1554
|
+
var styles6 = StyleSheet.create({
|
|
1555
|
+
base: {
|
|
1556
|
+
width: 204.5,
|
|
1557
|
+
minHeight: 114,
|
|
1558
|
+
padding: 24,
|
|
1559
|
+
gap: 16,
|
|
1560
|
+
borderRadius: 20,
|
|
1561
|
+
backgroundColor: colors.grey750
|
|
1562
|
+
},
|
|
1563
|
+
label: {
|
|
1564
|
+
...statCardTypography,
|
|
1565
|
+
color: colors.whiteAlpha86
|
|
1566
|
+
}
|
|
1567
|
+
});
|
|
1568
|
+
var variantConfig2 = {
|
|
1091
1569
|
primary: {
|
|
1092
1570
|
backgroundColor: colors.primary,
|
|
1093
1571
|
textColor: colors.white,
|
|
@@ -1146,7 +1624,7 @@ var Button = forwardRef(
|
|
|
1146
1624
|
}, forwardedRef) {
|
|
1147
1625
|
const containerRef = useRef(null);
|
|
1148
1626
|
const textRef = useRef(null);
|
|
1149
|
-
const preset =
|
|
1627
|
+
const preset = variantConfig2[variant];
|
|
1150
1628
|
const metrics = sizeConfig[size];
|
|
1151
1629
|
const label = typeof children !== "undefined" ? children : title;
|
|
1152
1630
|
const hasCustomChildren = typeof children !== "undefined";
|
|
@@ -1159,7 +1637,7 @@ var Button = forwardRef(
|
|
|
1159
1637
|
useApplyWebClassName(textRef, textClassName);
|
|
1160
1638
|
const iconNode = customIcon ?? /* @__PURE__ */ jsx(ArrowRightIcon, { size: metrics.iconSize, color: preset.iconColor });
|
|
1161
1639
|
const containerStyle = [
|
|
1162
|
-
|
|
1640
|
+
styles7.base,
|
|
1163
1641
|
{
|
|
1164
1642
|
minHeight: metrics.minHeight,
|
|
1165
1643
|
borderRadius: metrics.borderRadius,
|
|
@@ -1170,15 +1648,15 @@ var Button = forwardRef(
|
|
|
1170
1648
|
paddingRight: hasIcon ? metrics.paddingRightWithIcon : metrics.paddingRight,
|
|
1171
1649
|
gap: hasIcon ? metrics.gap : 0
|
|
1172
1650
|
},
|
|
1173
|
-
disabled &&
|
|
1651
|
+
disabled && styles7.disabled,
|
|
1174
1652
|
style
|
|
1175
1653
|
];
|
|
1176
1654
|
const labelStyle = [
|
|
1177
|
-
|
|
1655
|
+
styles7.label,
|
|
1178
1656
|
metrics.text,
|
|
1179
1657
|
{ color: preset.textColor },
|
|
1180
|
-
Platform.OS === "android" ?
|
|
1181
|
-
!hasIcon &&
|
|
1658
|
+
Platform.OS === "android" ? styles7.labelAndroid : null,
|
|
1659
|
+
!hasIcon && styles7.labelCentered,
|
|
1182
1660
|
textStyle
|
|
1183
1661
|
];
|
|
1184
1662
|
return /* @__PURE__ */ jsxs(
|
|
@@ -1199,7 +1677,7 @@ var Button = forwardRef(
|
|
|
1199
1677
|
View,
|
|
1200
1678
|
{
|
|
1201
1679
|
style: [
|
|
1202
|
-
|
|
1680
|
+
styles7.iconContainer,
|
|
1203
1681
|
{
|
|
1204
1682
|
width: metrics.iconContainerSize,
|
|
1205
1683
|
height: metrics.iconContainerSize,
|
|
@@ -1215,7 +1693,7 @@ var Button = forwardRef(
|
|
|
1215
1693
|
);
|
|
1216
1694
|
}
|
|
1217
1695
|
);
|
|
1218
|
-
var
|
|
1696
|
+
var styles7 = StyleSheet.create({
|
|
1219
1697
|
base: {
|
|
1220
1698
|
flexDirection: "row",
|
|
1221
1699
|
alignItems: "center",
|
|
@@ -1293,13 +1771,13 @@ var Checkbox = forwardRef(function Checkbox2({
|
|
|
1293
1771
|
accessibilityRole: "checkbox",
|
|
1294
1772
|
accessibilityLabel: resolvedAccessibilityLabel,
|
|
1295
1773
|
accessibilityState: { checked: isActive, disabled },
|
|
1296
|
-
style: [
|
|
1774
|
+
style: [styles8.root, disabled && styles8.disabled, style],
|
|
1297
1775
|
children: [
|
|
1298
1776
|
/* @__PURE__ */ jsx(
|
|
1299
1777
|
View,
|
|
1300
1778
|
{
|
|
1301
1779
|
style: [
|
|
1302
|
-
|
|
1780
|
+
styles8.box,
|
|
1303
1781
|
{
|
|
1304
1782
|
backgroundColor: chrome.backgroundColor,
|
|
1305
1783
|
borderColor: chrome.borderColor
|
|
@@ -1308,12 +1786,12 @@ var Checkbox = forwardRef(function Checkbox2({
|
|
|
1308
1786
|
children: isActive ? /* @__PURE__ */ jsx(CheckIcon, { size: CHECK_SIZE, color: colors.primary, strokeWidth: CHECK_STROKE }) : null
|
|
1309
1787
|
}
|
|
1310
1788
|
),
|
|
1311
|
-
labelContent != null && labelContent !== false ? typeof labelContent === "string" || typeof labelContent === "number" ? /* @__PURE__ */ jsx(Text, { style: [
|
|
1789
|
+
labelContent != null && labelContent !== false ? typeof labelContent === "string" || typeof labelContent === "number" ? /* @__PURE__ */ jsx(Text, { style: [styles8.label, labelStyle], children: labelContent }) : labelContent : null
|
|
1312
1790
|
]
|
|
1313
1791
|
}
|
|
1314
1792
|
);
|
|
1315
1793
|
});
|
|
1316
|
-
var
|
|
1794
|
+
var styles8 = StyleSheet.create({
|
|
1317
1795
|
root: {
|
|
1318
1796
|
flexDirection: "row",
|
|
1319
1797
|
alignItems: "center",
|
|
@@ -1411,7 +1889,7 @@ var DEFAULT_WIDTH = 380;
|
|
|
1411
1889
|
var TRIGGER_HEIGHT = 44;
|
|
1412
1890
|
var TRIGGER_RADIUS = 60;
|
|
1413
1891
|
var MENU_RADIUS2 = 20;
|
|
1414
|
-
var
|
|
1892
|
+
var ICON_SIZE5 = 20;
|
|
1415
1893
|
var NAV_ICON_SIZE = 20;
|
|
1416
1894
|
var DAY_CELL_HEIGHT = 44;
|
|
1417
1895
|
var DAY_CIRCLE_SIZE = 44;
|
|
@@ -1563,9 +2041,9 @@ var DatePicker = forwardRef(
|
|
|
1563
2041
|
{
|
|
1564
2042
|
...rest,
|
|
1565
2043
|
ref: setRootRef,
|
|
1566
|
-
style: [
|
|
2044
|
+
style: [styles9.root, isOpen && styles9.rootOpen, disabled && styles9.disabled, style],
|
|
1567
2045
|
accessibilityState: { disabled, expanded: isOpen },
|
|
1568
|
-
children: /* @__PURE__ */ jsxs(View, { style: [
|
|
2046
|
+
children: /* @__PURE__ */ jsxs(View, { style: [styles9.triggerWrap, isOpen && styles9.triggerWrapOpen], children: [
|
|
1569
2047
|
/* @__PURE__ */ jsxs(
|
|
1570
2048
|
Pressable,
|
|
1571
2049
|
{
|
|
@@ -1576,17 +2054,17 @@ var DatePicker = forwardRef(
|
|
|
1576
2054
|
accessibilityLabel: resolvedAccessibilityLabel,
|
|
1577
2055
|
accessibilityState: { disabled, expanded: isOpen },
|
|
1578
2056
|
style: [
|
|
1579
|
-
|
|
2057
|
+
styles9.trigger,
|
|
1580
2058
|
{ borderColor: triggerBorderColor, backgroundColor: colors.grey700 }
|
|
1581
2059
|
],
|
|
1582
2060
|
children: [
|
|
1583
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
1584
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
2061
|
+
/* @__PURE__ */ jsx(Text, { style: [styles9.triggerText, { color: triggerTextColor }], numberOfLines: 1, children: triggerLabel }),
|
|
2062
|
+
/* @__PURE__ */ jsx(View, { style: styles9.iconSlot, children: /* @__PURE__ */ jsx(CalendarOutlineIcon, { size: ICON_SIZE5, color: colors.grey100 }) })
|
|
1585
2063
|
]
|
|
1586
2064
|
}
|
|
1587
2065
|
),
|
|
1588
|
-
isOpen ? /* @__PURE__ */ jsxs(View, { style:
|
|
1589
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
2066
|
+
isOpen ? /* @__PURE__ */ jsxs(View, { style: styles9.menu, children: [
|
|
2067
|
+
/* @__PURE__ */ jsxs(View, { style: styles9.calendarHeader, children: [
|
|
1590
2068
|
/* @__PURE__ */ jsx(
|
|
1591
2069
|
Pressable,
|
|
1592
2070
|
{
|
|
@@ -1594,11 +2072,11 @@ var DatePicker = forwardRef(
|
|
|
1594
2072
|
hitSlop: 8,
|
|
1595
2073
|
accessibilityRole: "button",
|
|
1596
2074
|
accessibilityLabel: "Previous month",
|
|
1597
|
-
style:
|
|
2075
|
+
style: styles9.navButton,
|
|
1598
2076
|
children: /* @__PURE__ */ jsx(ChevronLeftIcon, { size: NAV_ICON_SIZE, color: colors.white })
|
|
1599
2077
|
}
|
|
1600
2078
|
),
|
|
1601
|
-
/* @__PURE__ */ jsxs(Text, { style:
|
|
2079
|
+
/* @__PURE__ */ jsxs(Text, { style: styles9.monthHeading, children: [
|
|
1602
2080
|
monthNames[visibleMonth.getMonth()],
|
|
1603
2081
|
" ",
|
|
1604
2082
|
visibleMonth.getFullYear()
|
|
@@ -1610,13 +2088,13 @@ var DatePicker = forwardRef(
|
|
|
1610
2088
|
hitSlop: 8,
|
|
1611
2089
|
accessibilityRole: "button",
|
|
1612
2090
|
accessibilityLabel: "Next month",
|
|
1613
|
-
style:
|
|
1614
|
-
children: /* @__PURE__ */ jsx(View, { style:
|
|
2091
|
+
style: styles9.navButton,
|
|
2092
|
+
children: /* @__PURE__ */ jsx(View, { style: styles9.navIconMirror, children: /* @__PURE__ */ jsx(ChevronLeftIcon, { size: NAV_ICON_SIZE, color: colors.white }) })
|
|
1615
2093
|
}
|
|
1616
2094
|
)
|
|
1617
2095
|
] }),
|
|
1618
2096
|
/* @__PURE__ */ jsxs(View, { children: [
|
|
1619
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
2097
|
+
/* @__PURE__ */ jsx(View, { style: styles9.weekdayRow, children: weekdayLabels.map((weekdayLabel, index) => /* @__PURE__ */ jsx(View, { style: styles9.dayCellWrap, children: /* @__PURE__ */ jsx(Text, { style: styles9.weekdayText, children: weekdayLabel }) }, `${weekdayLabel}-${index}`)) }),
|
|
1620
2098
|
weeks.map((week, weekIndex) => {
|
|
1621
2099
|
let rangeHighlightStyle = null;
|
|
1622
2100
|
if (isRange && rangeValue.start && rangeValue.end) {
|
|
@@ -1653,13 +2131,13 @@ var DatePicker = forwardRef(
|
|
|
1653
2131
|
return /* @__PURE__ */ jsxs(
|
|
1654
2132
|
View,
|
|
1655
2133
|
{
|
|
1656
|
-
style: [
|
|
2134
|
+
style: [styles9.weekRow, weekIndex > 0 && styles9.weekRowSpaced],
|
|
1657
2135
|
children: [
|
|
1658
2136
|
rangeHighlightStyle ? /* @__PURE__ */ jsx(
|
|
1659
2137
|
View,
|
|
1660
2138
|
{
|
|
1661
2139
|
pointerEvents: "none",
|
|
1662
|
-
style: [
|
|
2140
|
+
style: [styles9.rangeHighlight, rangeHighlightStyle]
|
|
1663
2141
|
}
|
|
1664
2142
|
) : null,
|
|
1665
2143
|
week.map((day, dayIndex) => {
|
|
@@ -1682,7 +2160,7 @@ var DatePicker = forwardRef(
|
|
|
1682
2160
|
onHoverOut: () => setHoveredDayKey((current) => current === dayKey ? null : current),
|
|
1683
2161
|
onPressIn: () => setHoveredDayKey(dayKey),
|
|
1684
2162
|
onPressOut: () => setHoveredDayKey((current) => current === dayKey ? null : current),
|
|
1685
|
-
style:
|
|
2163
|
+
style: styles9.dayCellWrap,
|
|
1686
2164
|
accessibilityRole: "button",
|
|
1687
2165
|
accessibilityLabel: formatValue(day),
|
|
1688
2166
|
accessibilityState: {
|
|
@@ -1694,14 +2172,14 @@ var DatePicker = forwardRef(
|
|
|
1694
2172
|
View,
|
|
1695
2173
|
{
|
|
1696
2174
|
style: [
|
|
1697
|
-
|
|
1698
|
-
isSelectedEndpoint &&
|
|
1699
|
-
isHovered &&
|
|
2175
|
+
styles9.dayCircle,
|
|
2176
|
+
isSelectedEndpoint && styles9.dayCircleSelected,
|
|
2177
|
+
isHovered && styles9.dayCircleHovered
|
|
1700
2178
|
],
|
|
1701
|
-
children: /* @__PURE__ */ jsx(Text, { style: [
|
|
2179
|
+
children: /* @__PURE__ */ jsx(Text, { style: [styles9.dayText, { color: dayTextColor }], children: day.getDate() })
|
|
1702
2180
|
}
|
|
1703
2181
|
),
|
|
1704
|
-
isToday && !isSelectedEndpoint ? /* @__PURE__ */ jsx(View, { style:
|
|
2182
|
+
isToday && !isSelectedEndpoint ? /* @__PURE__ */ jsx(View, { style: styles9.todayDot }) : null
|
|
1705
2183
|
]
|
|
1706
2184
|
},
|
|
1707
2185
|
dayIndex
|
|
@@ -1719,7 +2197,7 @@ var DatePicker = forwardRef(
|
|
|
1719
2197
|
);
|
|
1720
2198
|
}
|
|
1721
2199
|
);
|
|
1722
|
-
var
|
|
2200
|
+
var styles9 = StyleSheet.create({
|
|
1723
2201
|
root: {
|
|
1724
2202
|
width: DEFAULT_WIDTH,
|
|
1725
2203
|
gap: 8,
|
|
@@ -1755,8 +2233,8 @@ var styles5 = StyleSheet.create({
|
|
|
1755
2233
|
minWidth: 0
|
|
1756
2234
|
},
|
|
1757
2235
|
iconSlot: {
|
|
1758
|
-
width:
|
|
1759
|
-
height:
|
|
2236
|
+
width: ICON_SIZE5,
|
|
2237
|
+
height: ICON_SIZE5,
|
|
1760
2238
|
alignItems: "center",
|
|
1761
2239
|
justifyContent: "center",
|
|
1762
2240
|
flexShrink: 0
|
|
@@ -1979,13 +2457,13 @@ var Input = forwardRef(function Input2({
|
|
|
1979
2457
|
const rightIconNode = rightIcon ?? /* @__PURE__ */ jsx(ShowIcon, { size: metrics.iconSize, color: chrome.rightIconColor });
|
|
1980
2458
|
useApplyWebClassName(rootRef, className);
|
|
1981
2459
|
useApplyWebClassName(inputRef, inputClassName);
|
|
1982
|
-
return /* @__PURE__ */ jsxs(View, { ref: rootRef, style: [
|
|
1983
|
-
showLabel && label ? /* @__PURE__ */ jsx(Text, { style: [
|
|
2460
|
+
return /* @__PURE__ */ jsxs(View, { ref: rootRef, style: [styles10.root, disabled && styles10.disabled, style], children: [
|
|
2461
|
+
showLabel && label ? /* @__PURE__ */ jsx(Text, { style: [styles10.label, { color: chrome.labelColor }], children: label }) : null,
|
|
1984
2462
|
/* @__PURE__ */ jsxs(
|
|
1985
2463
|
View,
|
|
1986
2464
|
{
|
|
1987
2465
|
style: [
|
|
1988
|
-
|
|
2466
|
+
styles10.field,
|
|
1989
2467
|
{
|
|
1990
2468
|
height: metrics.height,
|
|
1991
2469
|
borderRadius: metrics.borderRadius,
|
|
@@ -2000,7 +2478,7 @@ var Input = forwardRef(function Input2({
|
|
|
2000
2478
|
fieldStyle
|
|
2001
2479
|
],
|
|
2002
2480
|
children: [
|
|
2003
|
-
hasLeftIcon ? /* @__PURE__ */ jsx(View, { style: [
|
|
2481
|
+
hasLeftIcon ? /* @__PURE__ */ jsx(View, { style: [styles10.iconSlot, { width: metrics.iconSize, height: metrics.iconSize }], children: leftIconNode }) : null,
|
|
2004
2482
|
/* @__PURE__ */ jsx(
|
|
2005
2483
|
TextInput,
|
|
2006
2484
|
{
|
|
@@ -2024,11 +2502,11 @@ var Input = forwardRef(function Input2({
|
|
|
2024
2502
|
onBlur?.(event);
|
|
2025
2503
|
},
|
|
2026
2504
|
style: [
|
|
2027
|
-
|
|
2505
|
+
styles10.input,
|
|
2028
2506
|
metrics.text,
|
|
2029
2507
|
{ color: chrome.textColor },
|
|
2030
|
-
Platform.OS === "web" ?
|
|
2031
|
-
Platform.OS === "android" ?
|
|
2508
|
+
Platform.OS === "web" ? styles10.inputWeb : null,
|
|
2509
|
+
Platform.OS === "android" ? styles10.inputAndroid : null,
|
|
2032
2510
|
inputStyle
|
|
2033
2511
|
],
|
|
2034
2512
|
accessibilityLabel: resolvedAccessibilityLabel,
|
|
@@ -2040,20 +2518,20 @@ var Input = forwardRef(function Input2({
|
|
|
2040
2518
|
{
|
|
2041
2519
|
onPress: onRightIconPress,
|
|
2042
2520
|
disabled,
|
|
2043
|
-
style: [
|
|
2521
|
+
style: [styles10.iconSlot, { width: metrics.iconSize, height: metrics.iconSize }],
|
|
2044
2522
|
accessibilityRole: "button",
|
|
2045
2523
|
accessibilityLabel: rightIconAccessibilityLabel,
|
|
2046
2524
|
hitSlop: 8,
|
|
2047
2525
|
children: rightIconNode
|
|
2048
2526
|
}
|
|
2049
|
-
) : /* @__PURE__ */ jsx(View, { style: [
|
|
2527
|
+
) : /* @__PURE__ */ jsx(View, { style: [styles10.iconSlot, { width: metrics.iconSize, height: metrics.iconSize }], children: rightIconNode }) : null
|
|
2050
2528
|
]
|
|
2051
2529
|
}
|
|
2052
2530
|
),
|
|
2053
|
-
showHint && hint ? /* @__PURE__ */ jsx(Text, { style: [
|
|
2531
|
+
showHint && hint ? /* @__PURE__ */ jsx(Text, { style: [styles10.hint, { color: chrome.hintColor }], children: hint }) : null
|
|
2054
2532
|
] });
|
|
2055
2533
|
});
|
|
2056
|
-
var
|
|
2534
|
+
var styles10 = StyleSheet.create({
|
|
2057
2535
|
root: {
|
|
2058
2536
|
width: DEFAULT_WIDTH2,
|
|
2059
2537
|
gap: 8,
|
|
@@ -2096,7 +2574,7 @@ var TRIGGER_RADIUS2 = 60;
|
|
|
2096
2574
|
var MENU_RADIUS3 = 24;
|
|
2097
2575
|
var MENU_MAX_LIST_HEIGHT = 248;
|
|
2098
2576
|
var ITEM_RADIUS2 = 12;
|
|
2099
|
-
var
|
|
2577
|
+
var ICON_SIZE6 = 20;
|
|
2100
2578
|
var CHIP_GAP = 6;
|
|
2101
2579
|
var FALLBACK_ELLIPSIS_WIDTH = 20;
|
|
2102
2580
|
function itemBackground(state) {
|
|
@@ -2169,25 +2647,25 @@ function MultiValueChips({ options, disabled, onRemove }) {
|
|
|
2169
2647
|
const next = Math.ceil(event.nativeEvent.layout.width);
|
|
2170
2648
|
setEllipsisWidth((current) => current === next ? current : next);
|
|
2171
2649
|
};
|
|
2172
|
-
return /* @__PURE__ */ jsxs(View, { style:
|
|
2173
|
-
/* @__PURE__ */ jsxs(View, { pointerEvents: "none", style:
|
|
2650
|
+
return /* @__PURE__ */ jsxs(View, { style: styles11.multiValueRoot, children: [
|
|
2651
|
+
/* @__PURE__ */ jsxs(View, { pointerEvents: "none", style: styles11.measureRow, children: [
|
|
2174
2652
|
options.map((option) => /* @__PURE__ */ jsxs(
|
|
2175
2653
|
View,
|
|
2176
2654
|
{
|
|
2177
|
-
style:
|
|
2655
|
+
style: styles11.chip,
|
|
2178
2656
|
onLayout: (event) => handleChipLayout(option.value, event),
|
|
2179
2657
|
children: [
|
|
2180
|
-
/* @__PURE__ */ jsx(Text, { style:
|
|
2181
|
-
/* @__PURE__ */ jsx(Text, { style:
|
|
2658
|
+
/* @__PURE__ */ jsx(Text, { style: styles11.chipLabel, numberOfLines: 1, children: option.label }),
|
|
2659
|
+
/* @__PURE__ */ jsx(Text, { style: styles11.chipRemove, children: "\xD7" })
|
|
2182
2660
|
]
|
|
2183
2661
|
},
|
|
2184
2662
|
`measure-${option.value}`
|
|
2185
2663
|
)),
|
|
2186
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
2664
|
+
/* @__PURE__ */ jsx(View, { style: styles11.ellipsis, onLayout: handleEllipsisLayout, children: /* @__PURE__ */ jsx(Text, { style: styles11.ellipsisText, children: "..." }) })
|
|
2187
2665
|
] }),
|
|
2188
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
2189
|
-
visible.map((option) => /* @__PURE__ */ jsxs(View, { style:
|
|
2190
|
-
/* @__PURE__ */ jsx(Text, { style:
|
|
2666
|
+
/* @__PURE__ */ jsxs(View, { style: styles11.chipsRow, onLayout: handleContainerLayout, children: [
|
|
2667
|
+
visible.map((option) => /* @__PURE__ */ jsxs(View, { style: styles11.chip, children: [
|
|
2668
|
+
/* @__PURE__ */ jsx(Text, { style: styles11.chipLabel, numberOfLines: 1, children: option.label }),
|
|
2191
2669
|
/* @__PURE__ */ jsx(
|
|
2192
2670
|
Pressable,
|
|
2193
2671
|
{
|
|
@@ -2199,11 +2677,11 @@ function MultiValueChips({ options, disabled, onRemove }) {
|
|
|
2199
2677
|
hitSlop: 6,
|
|
2200
2678
|
accessibilityRole: "button",
|
|
2201
2679
|
accessibilityLabel: `Remove ${option.label}`,
|
|
2202
|
-
children: /* @__PURE__ */ jsx(Text, { style:
|
|
2680
|
+
children: /* @__PURE__ */ jsx(Text, { style: styles11.chipRemove, children: "\xD7" })
|
|
2203
2681
|
}
|
|
2204
2682
|
)
|
|
2205
2683
|
] }, option.value)),
|
|
2206
|
-
hasOverflow ? /* @__PURE__ */ jsx(View, { style:
|
|
2684
|
+
hasOverflow ? /* @__PURE__ */ jsx(View, { style: styles11.ellipsis, children: /* @__PURE__ */ jsx(Text, { style: styles11.ellipsisText, children: "..." }) }) : null
|
|
2207
2685
|
] })
|
|
2208
2686
|
] });
|
|
2209
2687
|
}
|
|
@@ -2414,7 +2892,7 @@ var Select = forwardRef(
|
|
|
2414
2892
|
const leftIconNode = leftIcon ?? /* @__PURE__ */ jsx(
|
|
2415
2893
|
UserIcon,
|
|
2416
2894
|
{
|
|
2417
|
-
size:
|
|
2895
|
+
size: ICON_SIZE6,
|
|
2418
2896
|
color: error ? colors.red : isOpen ? colors.primary : colors.grey100
|
|
2419
2897
|
}
|
|
2420
2898
|
);
|
|
@@ -2430,11 +2908,11 @@ var Select = forwardRef(
|
|
|
2430
2908
|
{
|
|
2431
2909
|
...rest,
|
|
2432
2910
|
ref: setRootRef,
|
|
2433
|
-
style: [
|
|
2911
|
+
style: [styles11.root, isOpen && styles11.rootOpen, disabled && styles11.disabled, style],
|
|
2434
2912
|
accessibilityState: { disabled, expanded: isOpen },
|
|
2435
2913
|
children: [
|
|
2436
|
-
showLabel && label ? /* @__PURE__ */ jsx(Text, { style: [
|
|
2437
|
-
/* @__PURE__ */ jsxs(View, { style: [
|
|
2914
|
+
showLabel && label ? /* @__PURE__ */ jsx(Text, { style: [styles11.label, { color: labelColor }], children: label }) : null,
|
|
2915
|
+
/* @__PURE__ */ jsxs(View, { style: [styles11.triggerWrap, isOpen && styles11.triggerWrapOpen], children: [
|
|
2438
2916
|
/* @__PURE__ */ jsxs(
|
|
2439
2917
|
Pressable,
|
|
2440
2918
|
{
|
|
@@ -2445,29 +2923,29 @@ var Select = forwardRef(
|
|
|
2445
2923
|
accessibilityLabel: resolvedAccessibilityLabel,
|
|
2446
2924
|
accessibilityState: { disabled, expanded: isOpen },
|
|
2447
2925
|
style: [
|
|
2448
|
-
|
|
2926
|
+
styles11.trigger,
|
|
2449
2927
|
{
|
|
2450
2928
|
borderColor: triggerBorderColor,
|
|
2451
2929
|
backgroundColor: colors.grey700
|
|
2452
2930
|
}
|
|
2453
2931
|
],
|
|
2454
2932
|
children: [
|
|
2455
|
-
hasLeftIcon ? /* @__PURE__ */ jsx(View, { style:
|
|
2456
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
2933
|
+
hasLeftIcon ? /* @__PURE__ */ jsx(View, { style: styles11.iconSlot, children: leftIconNode }) : null,
|
|
2934
|
+
/* @__PURE__ */ jsx(View, { style: styles11.triggerContent, children: multiple && hasValue ? /* @__PURE__ */ jsx(
|
|
2457
2935
|
MultiValueChips,
|
|
2458
2936
|
{
|
|
2459
2937
|
options: selectedOptions,
|
|
2460
2938
|
disabled,
|
|
2461
2939
|
onRemove: handleRemoveChip
|
|
2462
2940
|
}
|
|
2463
|
-
) : /* @__PURE__ */ jsx(Text, { style: [
|
|
2464
|
-
/* @__PURE__ */ jsx(View, { style: [
|
|
2941
|
+
) : /* @__PURE__ */ jsx(Text, { style: [styles11.triggerText, { color: triggerTextColor }], numberOfLines: 1, children: multiple ? placeholder : singleLabel }) }),
|
|
2942
|
+
/* @__PURE__ */ jsx(View, { style: [styles11.iconSlot, isOpen && styles11.chevronOpen], children: /* @__PURE__ */ jsx(ChevronDownIcon, { size: ICON_SIZE6, color: isOpen ? colors.primary : colors.grey100 }) })
|
|
2465
2943
|
]
|
|
2466
2944
|
}
|
|
2467
2945
|
),
|
|
2468
|
-
isOpen ? /* @__PURE__ */ jsxs(View, { style:
|
|
2469
|
-
showSearch ? /* @__PURE__ */ jsxs(View, { style:
|
|
2470
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
2946
|
+
isOpen ? /* @__PURE__ */ jsxs(View, { style: styles11.menu, children: [
|
|
2947
|
+
showSearch ? /* @__PURE__ */ jsxs(View, { style: styles11.searchField, children: [
|
|
2948
|
+
/* @__PURE__ */ jsx(View, { style: styles11.iconSlot, children: /* @__PURE__ */ jsx(SearchIcon, { size: ICON_SIZE6, color: colors.grey100 }) }),
|
|
2471
2949
|
/* @__PURE__ */ jsx(
|
|
2472
2950
|
TextInput,
|
|
2473
2951
|
{
|
|
@@ -2478,9 +2956,9 @@ var Select = forwardRef(
|
|
|
2478
2956
|
placeholder: searchPlaceholder,
|
|
2479
2957
|
placeholderTextColor: colors.grey100,
|
|
2480
2958
|
style: [
|
|
2481
|
-
|
|
2482
|
-
Platform.OS === "web" ?
|
|
2483
|
-
Platform.OS === "android" ?
|
|
2959
|
+
styles11.searchInput,
|
|
2960
|
+
Platform.OS === "web" ? styles11.searchInputWeb : null,
|
|
2961
|
+
Platform.OS === "android" ? styles11.searchInputAndroid : null
|
|
2484
2962
|
],
|
|
2485
2963
|
accessibilityLabel: searchPlaceholder
|
|
2486
2964
|
}
|
|
@@ -2489,12 +2967,12 @@ var Select = forwardRef(
|
|
|
2489
2967
|
/* @__PURE__ */ jsxs(
|
|
2490
2968
|
ScrollView,
|
|
2491
2969
|
{
|
|
2492
|
-
style:
|
|
2493
|
-
contentContainerStyle:
|
|
2970
|
+
style: styles11.optionList,
|
|
2971
|
+
contentContainerStyle: styles11.optionListContent,
|
|
2494
2972
|
keyboardShouldPersistTaps: "handled",
|
|
2495
2973
|
showsVerticalScrollIndicator: false,
|
|
2496
2974
|
children: [
|
|
2497
|
-
loading ? /* @__PURE__ */ jsx(View, { style:
|
|
2975
|
+
loading ? /* @__PURE__ */ jsx(View, { style: styles11.statusRow, children: /* @__PURE__ */ jsx(Text, { style: styles11.statusText, children: "Loading..." }) }) : filteredOptions.length === 0 ? /* @__PURE__ */ jsx(View, { style: styles11.statusRow, children: /* @__PURE__ */ jsx(Text, { style: styles11.statusText, children: emptyText }) }) : null,
|
|
2498
2976
|
!loading && filteredOptions.map((option) => {
|
|
2499
2977
|
const isSelected = selectedValues.includes(option.value);
|
|
2500
2978
|
const isHovered = hoveredValue === option.value;
|
|
@@ -2511,14 +2989,14 @@ var Select = forwardRef(
|
|
|
2511
2989
|
accessibilityRole: multiple ? "checkbox" : "button",
|
|
2512
2990
|
accessibilityState: { selected: isSelected, checked: isSelected, disabled },
|
|
2513
2991
|
style: [
|
|
2514
|
-
|
|
2992
|
+
styles11.item,
|
|
2515
2993
|
{
|
|
2516
2994
|
backgroundColor: itemBackground(visualState)
|
|
2517
2995
|
}
|
|
2518
2996
|
],
|
|
2519
2997
|
children: [
|
|
2520
|
-
multiple ? /* @__PURE__ */ jsx(View, { pointerEvents: "none", style:
|
|
2521
|
-
/* @__PURE__ */ jsx(Text, { style:
|
|
2998
|
+
multiple ? /* @__PURE__ */ jsx(View, { pointerEvents: "none", style: styles11.itemCheckbox, children: /* @__PURE__ */ jsx(Checkbox, { value: isSelected, variant: "light" }) }) : null,
|
|
2999
|
+
/* @__PURE__ */ jsx(Text, { style: styles11.itemLabel, numberOfLines: 1, children: option.label })
|
|
2522
3000
|
]
|
|
2523
3001
|
},
|
|
2524
3002
|
option.value
|
|
@@ -2529,13 +3007,13 @@ var Select = forwardRef(
|
|
|
2529
3007
|
)
|
|
2530
3008
|
] }) : null
|
|
2531
3009
|
] }),
|
|
2532
|
-
showHint && hint ? /* @__PURE__ */ jsx(Text, { style: [
|
|
3010
|
+
showHint && hint ? /* @__PURE__ */ jsx(Text, { style: [styles11.hint, { color: hintColor }], children: hint }) : null
|
|
2533
3011
|
]
|
|
2534
3012
|
}
|
|
2535
3013
|
);
|
|
2536
3014
|
}
|
|
2537
3015
|
);
|
|
2538
|
-
var
|
|
3016
|
+
var styles11 = StyleSheet.create({
|
|
2539
3017
|
root: {
|
|
2540
3018
|
width: DEFAULT_WIDTH3,
|
|
2541
3019
|
gap: 8,
|
|
@@ -2625,8 +3103,8 @@ var styles7 = StyleSheet.create({
|
|
|
2625
3103
|
lineHeight: 16
|
|
2626
3104
|
},
|
|
2627
3105
|
iconSlot: {
|
|
2628
|
-
width:
|
|
2629
|
-
height:
|
|
3106
|
+
width: ICON_SIZE6,
|
|
3107
|
+
height: ICON_SIZE6,
|
|
2630
3108
|
alignItems: "center",
|
|
2631
3109
|
justifyContent: "center",
|
|
2632
3110
|
flexShrink: 0
|
|
@@ -2797,13 +3275,13 @@ var Textarea = forwardRef(function Textarea2({
|
|
|
2797
3275
|
const resolvedAccessibilityLabel = accessibilityLabel ?? (showLabel ? void 0 : label);
|
|
2798
3276
|
useApplyWebClassName(rootRef, className);
|
|
2799
3277
|
useApplyWebClassName(inputRef, inputClassName);
|
|
2800
|
-
return /* @__PURE__ */ jsxs(View, { ref: rootRef, style: [
|
|
2801
|
-
showLabel && label ? /* @__PURE__ */ jsx(Text, { style: [
|
|
3278
|
+
return /* @__PURE__ */ jsxs(View, { ref: rootRef, style: [styles12.root, disabled && styles12.disabled, style], children: [
|
|
3279
|
+
showLabel && label ? /* @__PURE__ */ jsx(Text, { style: [styles12.label, { color: chrome.labelColor }], children: label }) : null,
|
|
2802
3280
|
/* @__PURE__ */ jsx(
|
|
2803
3281
|
View,
|
|
2804
3282
|
{
|
|
2805
3283
|
style: [
|
|
2806
|
-
|
|
3284
|
+
styles12.field,
|
|
2807
3285
|
{
|
|
2808
3286
|
borderColor: chrome.borderColor,
|
|
2809
3287
|
backgroundColor: chrome.backgroundColor
|
|
@@ -2835,11 +3313,11 @@ var Textarea = forwardRef(function Textarea2({
|
|
|
2835
3313
|
onBlur?.(event);
|
|
2836
3314
|
},
|
|
2837
3315
|
style: [
|
|
2838
|
-
|
|
3316
|
+
styles12.input,
|
|
2839
3317
|
textareaTypography.field,
|
|
2840
3318
|
{ color: chrome.textColor },
|
|
2841
|
-
Platform.OS === "web" ?
|
|
2842
|
-
Platform.OS === "android" ?
|
|
3319
|
+
Platform.OS === "web" ? styles12.inputWeb : null,
|
|
3320
|
+
Platform.OS === "android" ? styles12.inputAndroid : null,
|
|
2843
3321
|
inputStyle
|
|
2844
3322
|
],
|
|
2845
3323
|
accessibilityLabel: resolvedAccessibilityLabel,
|
|
@@ -2848,10 +3326,10 @@ var Textarea = forwardRef(function Textarea2({
|
|
|
2848
3326
|
)
|
|
2849
3327
|
}
|
|
2850
3328
|
),
|
|
2851
|
-
showHint && hint ? /* @__PURE__ */ jsx(Text, { style: [
|
|
3329
|
+
showHint && hint ? /* @__PURE__ */ jsx(Text, { style: [styles12.hint, { color: chrome.hintColor }], children: hint }) : null
|
|
2852
3330
|
] });
|
|
2853
3331
|
});
|
|
2854
|
-
var
|
|
3332
|
+
var styles12 = StyleSheet.create({
|
|
2855
3333
|
root: {
|
|
2856
3334
|
width: DEFAULT_WIDTH4,
|
|
2857
3335
|
gap: 8,
|
|
@@ -2894,7 +3372,7 @@ var TRACK_RADIUS = 43;
|
|
|
2894
3372
|
var TRACK_PADDING = 4;
|
|
2895
3373
|
var THUMB_SIZE = TRACK_HEIGHT - TRACK_PADDING * 2;
|
|
2896
3374
|
var THUMB_TRAVEL = TRACK_WIDTH - TRACK_PADDING * 2 - THUMB_SIZE;
|
|
2897
|
-
var
|
|
3375
|
+
var ANIMATION_DURATION2 = 300;
|
|
2898
3376
|
var Toggle = forwardRef(function Toggle2({
|
|
2899
3377
|
value,
|
|
2900
3378
|
defaultValue = false,
|
|
@@ -2921,7 +3399,7 @@ var Toggle = forwardRef(function Toggle2({
|
|
|
2921
3399
|
useEffect(() => {
|
|
2922
3400
|
Animated.timing(progress, {
|
|
2923
3401
|
toValue: isActive ? 1 : 0,
|
|
2924
|
-
duration:
|
|
3402
|
+
duration: ANIMATION_DURATION2,
|
|
2925
3403
|
easing: Easing.out(Easing.ease),
|
|
2926
3404
|
useNativeDriver: false
|
|
2927
3405
|
}).start();
|
|
@@ -2951,13 +3429,13 @@ var Toggle = forwardRef(function Toggle2({
|
|
|
2951
3429
|
accessibilityRole: "switch",
|
|
2952
3430
|
accessibilityLabel: resolvedAccessibilityLabel,
|
|
2953
3431
|
accessibilityState: { checked: isActive, disabled },
|
|
2954
|
-
style: [
|
|
3432
|
+
style: [styles13.pressable, disabled && styles13.disabled, style],
|
|
2955
3433
|
children: [
|
|
2956
3434
|
/* @__PURE__ */ jsx(
|
|
2957
3435
|
Animated.View,
|
|
2958
3436
|
{
|
|
2959
3437
|
style: [
|
|
2960
|
-
|
|
3438
|
+
styles13.track,
|
|
2961
3439
|
{
|
|
2962
3440
|
backgroundColor: trackBackgroundColor
|
|
2963
3441
|
}
|
|
@@ -2966,7 +3444,7 @@ var Toggle = forwardRef(function Toggle2({
|
|
|
2966
3444
|
Animated.View,
|
|
2967
3445
|
{
|
|
2968
3446
|
style: [
|
|
2969
|
-
|
|
3447
|
+
styles13.thumb,
|
|
2970
3448
|
{
|
|
2971
3449
|
transform: [{ translateX: thumbTranslateX }]
|
|
2972
3450
|
}
|
|
@@ -2975,12 +3453,12 @@ var Toggle = forwardRef(function Toggle2({
|
|
|
2975
3453
|
)
|
|
2976
3454
|
}
|
|
2977
3455
|
),
|
|
2978
|
-
labelContent != null && labelContent !== false ? typeof labelContent === "string" || typeof labelContent === "number" ? /* @__PURE__ */ jsx(Text, { style: [
|
|
3456
|
+
labelContent != null && labelContent !== false ? typeof labelContent === "string" || typeof labelContent === "number" ? /* @__PURE__ */ jsx(Text, { style: [styles13.label, labelStyle], children: labelContent }) : labelContent : null
|
|
2979
3457
|
]
|
|
2980
3458
|
}
|
|
2981
3459
|
);
|
|
2982
3460
|
});
|
|
2983
|
-
var
|
|
3461
|
+
var styles13 = StyleSheet.create({
|
|
2984
3462
|
pressable: {
|
|
2985
3463
|
flexDirection: "row",
|
|
2986
3464
|
alignItems: "center",
|
|
@@ -3009,6 +3487,6 @@ var styles9 = StyleSheet.create({
|
|
|
3009
3487
|
}
|
|
3010
3488
|
});
|
|
3011
3489
|
|
|
3012
|
-
export { ArrowRightIcon, Avatar, BagIcon, BellIcon, BuildingIcon, Button, CalendarIcon, CalendarOutlineIcon, CameraIcon, CheckBadgeIcon, CheckIcon, Checkbox, ChevronDownIcon, ChevronLeftIcon, ClockIcon, DatePicker, FacebookIcon, HeartIcon, HelpCircleIcon, HomeIcon, Icon, Input, InstagramIcon, KeyIcon, LayoutGridIcon, LinkedInIcon, LogOutIcon, MailIcon, MenuItem, NavigateIcon, PhoneIcon, SearchIcon, Select, SettingsIcon, ShowIcon, Textarea, Toggle, UserIcon, VideoIcon, avatarTypography, buttonTypography, colors, datePickerTypography, fonts, getIconsByGroup, grey, iconGroupNames, iconGroups, iconNames, icons, inputTypography, selectTypography, textareaTypography };
|
|
3490
|
+
export { ArrowRightIcon, Avatar, Badge, BagIcon, BellIcon, BuildingIcon, Button, CalendarIcon, CalendarOutlineIcon, CameraIcon, CheckBadgeIcon, CheckIcon, Checkbox, ChevronDownIcon, ChevronLeftIcon, ClockIcon, Counter, DatePicker, FacebookIcon, HeartIcon, HelpCircleIcon, HomeIcon, Icon, Input, InstagramIcon, KeyIcon, LayoutGridIcon, LinkedInIcon, LogOutIcon, MailIcon, MenuItem, MinusIcon, NavigateIcon, PhoneIcon, PlusIcon, SearchIcon, SegmentedToggle, Select, SettingsIcon, ShowIcon, SidebarIcon, StatCard, Textarea, Toggle, UserIcon, UsersAltIcon, VideoIcon, avatarTypography, badgeTypography, buttonTypography, colors, counterTypography, datePickerTypography, fonts, getIconsByGroup, grey, iconGroupNames, iconGroups, iconNames, icons, inputTypography, segmentedToggleTypography, selectTypography, statCardTypography, textareaTypography };
|
|
3013
3491
|
//# sourceMappingURL=index.js.map
|
|
3014
3492
|
//# sourceMappingURL=index.js.map
|