@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.cjs
CHANGED
|
@@ -36,9 +36,15 @@ var colors = {
|
|
|
36
36
|
primary: "#B46436",
|
|
37
37
|
black: "#000000",
|
|
38
38
|
white: "#ffffff",
|
|
39
|
+
whiteAlpha86: "#FFFFFFDB",
|
|
40
|
+
whiteAlpha40: "#FFFFFF66",
|
|
41
|
+
whiteAlpha20: "#FFFFFF33",
|
|
42
|
+
whiteAlpha10: "#FFFFFF1A",
|
|
43
|
+
whiteAlpha5: "#FFFFFF0D",
|
|
39
44
|
dark: "#090909",
|
|
40
45
|
red: "#A63E3E",
|
|
41
46
|
lightGrey: "#B7B7B7",
|
|
47
|
+
green: "#34A853",
|
|
42
48
|
primaryMuted: "#B464360F",
|
|
43
49
|
primaryHover: "#B4643633",
|
|
44
50
|
redMuted: "#A63E3E0F",
|
|
@@ -80,6 +86,34 @@ var buttonTypography = {
|
|
|
80
86
|
letterSpacing: 0.36
|
|
81
87
|
}
|
|
82
88
|
};
|
|
89
|
+
var badgeTypography = {
|
|
90
|
+
fontFamily: fonts.sans,
|
|
91
|
+
fontSize: 14,
|
|
92
|
+
fontWeight: "400",
|
|
93
|
+
lineHeight: 16,
|
|
94
|
+
letterSpacing: 0
|
|
95
|
+
};
|
|
96
|
+
var statCardTypography = {
|
|
97
|
+
fontFamily: fonts.sans,
|
|
98
|
+
fontSize: 16,
|
|
99
|
+
fontWeight: "500",
|
|
100
|
+
lineHeight: 16,
|
|
101
|
+
letterSpacing: 0
|
|
102
|
+
};
|
|
103
|
+
var segmentedToggleTypography = {
|
|
104
|
+
fontFamily: fonts.sans,
|
|
105
|
+
fontSize: 14,
|
|
106
|
+
fontWeight: "500",
|
|
107
|
+
lineHeight: 14,
|
|
108
|
+
letterSpacing: 0
|
|
109
|
+
};
|
|
110
|
+
var counterTypography = {
|
|
111
|
+
fontFamily: fonts.sans,
|
|
112
|
+
fontSize: 14,
|
|
113
|
+
fontWeight: "700",
|
|
114
|
+
lineHeight: 14,
|
|
115
|
+
letterSpacing: 0
|
|
116
|
+
};
|
|
83
117
|
var inputTypography = {
|
|
84
118
|
label: {
|
|
85
119
|
fontFamily: fonts.sans,
|
|
@@ -527,6 +561,21 @@ function MailIcon({ size = 20, color = colors.primary, strokeWidth = 2 }) {
|
|
|
527
561
|
) });
|
|
528
562
|
}
|
|
529
563
|
|
|
564
|
+
// src/icons/Minus/minusPath.ts
|
|
565
|
+
var MINUS_PATH = "M3.33337 8H12.6667";
|
|
566
|
+
function MinusIcon({ size = 16, color = colors.white, strokeWidth = 2 }) {
|
|
567
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Svg__default.default, { width: size, height: size, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
568
|
+
Svg.Path,
|
|
569
|
+
{
|
|
570
|
+
d: MINUS_PATH,
|
|
571
|
+
stroke: color,
|
|
572
|
+
strokeWidth,
|
|
573
|
+
strokeLinecap: "round",
|
|
574
|
+
strokeLinejoin: "round"
|
|
575
|
+
}
|
|
576
|
+
) });
|
|
577
|
+
}
|
|
578
|
+
|
|
530
579
|
// src/icons/Navigate/navigatePath.ts
|
|
531
580
|
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";
|
|
532
581
|
function NavigateIcon({ size = 20, color = colors.primary, strokeWidth = 2 }) {
|
|
@@ -557,6 +606,21 @@ function PhoneIcon({ size = 20, color = colors.primary, strokeWidth = 2 }) {
|
|
|
557
606
|
) });
|
|
558
607
|
}
|
|
559
608
|
|
|
609
|
+
// src/icons/Plus/plusPath.ts
|
|
610
|
+
var PLUS_PATH = "M8.00004 3.33325V12.6666M3.33337 7.99992H12.6667";
|
|
611
|
+
function PlusIcon({ size = 16, color = colors.white, strokeWidth = 2 }) {
|
|
612
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Svg__default.default, { width: size, height: size, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
613
|
+
Svg.Path,
|
|
614
|
+
{
|
|
615
|
+
d: PLUS_PATH,
|
|
616
|
+
stroke: color,
|
|
617
|
+
strokeWidth,
|
|
618
|
+
strokeLinecap: "round",
|
|
619
|
+
strokeLinejoin: "round"
|
|
620
|
+
}
|
|
621
|
+
) });
|
|
622
|
+
}
|
|
623
|
+
|
|
560
624
|
// src/icons/Search/searchPath.ts
|
|
561
625
|
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";
|
|
562
626
|
var SEARCH_HANDLE_PATH = "M17.5 17.5L13.875 13.875";
|
|
@@ -632,6 +696,21 @@ function ShowIcon({ size = 20, color = colors.primary, strokeWidth = 2 }) {
|
|
|
632
696
|
] });
|
|
633
697
|
}
|
|
634
698
|
|
|
699
|
+
// src/icons/Sidebar/sidebarPath.ts
|
|
700
|
+
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";
|
|
701
|
+
function SidebarIcon({ size = 20, color = colors.primary, strokeWidth = 2 }) {
|
|
702
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Svg__default.default, { width: size, height: size, viewBox: "0 0 20 20", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
703
|
+
Svg.Path,
|
|
704
|
+
{
|
|
705
|
+
d: SIDEBAR_PATH,
|
|
706
|
+
stroke: color,
|
|
707
|
+
strokeWidth,
|
|
708
|
+
strokeLinecap: "round",
|
|
709
|
+
strokeLinejoin: "round"
|
|
710
|
+
}
|
|
711
|
+
) });
|
|
712
|
+
}
|
|
713
|
+
|
|
635
714
|
// src/icons/User/userPath.ts
|
|
636
715
|
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";
|
|
637
716
|
function UserIcon({ size = 20, color = colors.primary, strokeWidth = 2 }) {
|
|
@@ -647,6 +726,12 @@ function UserIcon({ size = 20, color = colors.primary, strokeWidth = 2 }) {
|
|
|
647
726
|
) });
|
|
648
727
|
}
|
|
649
728
|
|
|
729
|
+
// src/icons/UsersAlt/usersAltPath.ts
|
|
730
|
+
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";
|
|
731
|
+
function UsersAltIcon({ size = 28, color = colors.white }) {
|
|
732
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Svg__default.default, { width: size, height: size, viewBox: "0 0 28 28", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(Svg.Path, { d: USERS_ALT_PATH, fill: color }) });
|
|
733
|
+
}
|
|
734
|
+
|
|
650
735
|
// src/icons/Video/videoPath.ts
|
|
651
736
|
var VIDEO_PATHS = [
|
|
652
737
|
"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",
|
|
@@ -690,12 +775,16 @@ var icons = {
|
|
|
690
775
|
linkedin: LinkedInIcon,
|
|
691
776
|
logOut: LogOutIcon,
|
|
692
777
|
mail: MailIcon,
|
|
778
|
+
minus: MinusIcon,
|
|
693
779
|
navigate: NavigateIcon,
|
|
694
780
|
phone: PhoneIcon,
|
|
781
|
+
plus: PlusIcon,
|
|
695
782
|
search: SearchIcon,
|
|
696
783
|
settings: SettingsIcon,
|
|
697
784
|
show: ShowIcon,
|
|
785
|
+
sidebar: SidebarIcon,
|
|
698
786
|
user: UserIcon,
|
|
787
|
+
usersAlt: UsersAltIcon,
|
|
699
788
|
video: VideoIcon
|
|
700
789
|
};
|
|
701
790
|
var iconNames = Object.keys(icons);
|
|
@@ -711,12 +800,14 @@ var iconGroups = {
|
|
|
711
800
|
"search",
|
|
712
801
|
"calendar",
|
|
713
802
|
"calendarOutline",
|
|
714
|
-
"heart"
|
|
803
|
+
"heart",
|
|
804
|
+
"minus",
|
|
805
|
+
"plus"
|
|
715
806
|
],
|
|
716
|
-
objects: ["bag", "building", "clock", "user", "video"],
|
|
807
|
+
objects: ["bag", "building", "clock", "user", "usersAlt", "video"],
|
|
717
808
|
communication: ["mail", "phone"],
|
|
718
809
|
social: ["facebook", "instagram", "linkedin"],
|
|
719
|
-
interface: ["layoutGrid", "settings", "helpCircle", "logOut"]
|
|
810
|
+
interface: ["layoutGrid", "sidebar", "settings", "helpCircle", "logOut"]
|
|
720
811
|
};
|
|
721
812
|
var iconGroupNames = Object.keys(iconGroups);
|
|
722
813
|
function getIconsByGroup(group) {
|
|
@@ -1093,7 +1184,394 @@ var styles2 = reactNative.StyleSheet.create({
|
|
|
1093
1184
|
})
|
|
1094
1185
|
}
|
|
1095
1186
|
});
|
|
1187
|
+
var ICON_SIZE2 = 20;
|
|
1188
|
+
var webBlurStyle = reactNative.Platform.OS === "web" ? {
|
|
1189
|
+
backdropFilter: "blur(10.3px)",
|
|
1190
|
+
WebkitBackdropFilter: "blur(10.3px)"
|
|
1191
|
+
} : {};
|
|
1096
1192
|
var variantConfig = {
|
|
1193
|
+
default: {
|
|
1194
|
+
backgroundColor: colors.grey750,
|
|
1195
|
+
iconColor: colors.white,
|
|
1196
|
+
border: false,
|
|
1197
|
+
blur: false
|
|
1198
|
+
},
|
|
1199
|
+
transparent: {
|
|
1200
|
+
backgroundColor: colors.whiteAlpha5,
|
|
1201
|
+
iconColor: colors.primary,
|
|
1202
|
+
border: true,
|
|
1203
|
+
blur: true
|
|
1204
|
+
}
|
|
1205
|
+
};
|
|
1206
|
+
var Badge = react.forwardRef(function Badge2({ label, variant = "default", icon: Icon2, style, className, accessibilityLabel, ...rest }, forwardedRef) {
|
|
1207
|
+
const containerRef = react.useRef(null);
|
|
1208
|
+
const preset = variantConfig[variant];
|
|
1209
|
+
const resolvedClassName = className?.trim() || void 0;
|
|
1210
|
+
const setContainerRef = react.useMemo(() => mergeRefs(containerRef, forwardedRef), [forwardedRef]);
|
|
1211
|
+
useApplyWebClassName(containerRef, resolvedClassName);
|
|
1212
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1213
|
+
reactNative.View,
|
|
1214
|
+
{
|
|
1215
|
+
...rest,
|
|
1216
|
+
ref: setContainerRef,
|
|
1217
|
+
style: [
|
|
1218
|
+
styles3.base,
|
|
1219
|
+
{ backgroundColor: preset.backgroundColor },
|
|
1220
|
+
preset.border ? styles3.transparentBorder : null,
|
|
1221
|
+
preset.blur ? webBlurStyle : null,
|
|
1222
|
+
style
|
|
1223
|
+
],
|
|
1224
|
+
accessibilityRole: "text",
|
|
1225
|
+
accessibilityLabel: accessibilityLabel ?? label,
|
|
1226
|
+
children: [
|
|
1227
|
+
Icon2 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles3.iconSlot, children: /* @__PURE__ */ jsxRuntime.jsx(Icon2, { size: ICON_SIZE2, color: preset.iconColor }) }) : null,
|
|
1228
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles3.label, reactNative.Platform.OS === "android" ? styles3.labelAndroid : null], children: label })
|
|
1229
|
+
]
|
|
1230
|
+
}
|
|
1231
|
+
);
|
|
1232
|
+
});
|
|
1233
|
+
var styles3 = reactNative.StyleSheet.create({
|
|
1234
|
+
base: {
|
|
1235
|
+
flexDirection: "row",
|
|
1236
|
+
alignItems: "center",
|
|
1237
|
+
alignSelf: "flex-start",
|
|
1238
|
+
minHeight: 44,
|
|
1239
|
+
paddingVertical: 12,
|
|
1240
|
+
paddingHorizontal: 16,
|
|
1241
|
+
gap: 12,
|
|
1242
|
+
borderRadius: 79,
|
|
1243
|
+
overflow: "hidden",
|
|
1244
|
+
borderWidth: 0,
|
|
1245
|
+
borderColor: "transparent",
|
|
1246
|
+
borderStyle: "solid"
|
|
1247
|
+
},
|
|
1248
|
+
transparentBorder: {
|
|
1249
|
+
borderWidth: 1,
|
|
1250
|
+
borderColor: colors.whiteAlpha5,
|
|
1251
|
+
borderStyle: "solid"
|
|
1252
|
+
},
|
|
1253
|
+
iconSlot: {
|
|
1254
|
+
width: ICON_SIZE2,
|
|
1255
|
+
height: ICON_SIZE2,
|
|
1256
|
+
alignItems: "center",
|
|
1257
|
+
justifyContent: "center",
|
|
1258
|
+
flexShrink: 0
|
|
1259
|
+
},
|
|
1260
|
+
label: {
|
|
1261
|
+
...badgeTypography,
|
|
1262
|
+
color: colors.white
|
|
1263
|
+
},
|
|
1264
|
+
labelAndroid: {
|
|
1265
|
+
includeFontPadding: false
|
|
1266
|
+
}
|
|
1267
|
+
});
|
|
1268
|
+
var BUTTON_SIZE = 32;
|
|
1269
|
+
var webBlurStyle2 = reactNative.Platform.OS === "web" ? {
|
|
1270
|
+
backdropFilter: "blur(20px)",
|
|
1271
|
+
WebkitBackdropFilter: "blur(20px)"
|
|
1272
|
+
} : {};
|
|
1273
|
+
function clamp(value, min, max) {
|
|
1274
|
+
return Math.max(min, max === void 0 ? value : Math.min(value, max));
|
|
1275
|
+
}
|
|
1276
|
+
var Counter = react.forwardRef(function Counter2({
|
|
1277
|
+
value,
|
|
1278
|
+
defaultValue,
|
|
1279
|
+
onValueChange,
|
|
1280
|
+
min = 1,
|
|
1281
|
+
max,
|
|
1282
|
+
step = 1,
|
|
1283
|
+
disabled = false,
|
|
1284
|
+
style,
|
|
1285
|
+
className,
|
|
1286
|
+
hitSlop,
|
|
1287
|
+
...rest
|
|
1288
|
+
}, forwardedRef) {
|
|
1289
|
+
const containerRef = react.useRef(null);
|
|
1290
|
+
const isControlled = value !== void 0;
|
|
1291
|
+
const [uncontrolledValue, setUncontrolledValue] = react.useState(
|
|
1292
|
+
() => clamp(defaultValue ?? min, min, max)
|
|
1293
|
+
);
|
|
1294
|
+
const resolvedValue = clamp(isControlled ? value : uncontrolledValue, min, max);
|
|
1295
|
+
const resolvedClassName = className?.trim() || void 0;
|
|
1296
|
+
const setContainerRef = react.useMemo(() => mergeRefs(containerRef, forwardedRef), [forwardedRef]);
|
|
1297
|
+
const decrementDisabled = disabled || resolvedValue <= min;
|
|
1298
|
+
const incrementDisabled = disabled || max !== void 0 && resolvedValue >= max;
|
|
1299
|
+
useApplyWebClassName(containerRef, resolvedClassName);
|
|
1300
|
+
const updateValue = (nextValue) => {
|
|
1301
|
+
const next = clamp(nextValue, min, max);
|
|
1302
|
+
if (next === resolvedValue) return;
|
|
1303
|
+
if (!isControlled) setUncontrolledValue(next);
|
|
1304
|
+
onValueChange?.(next);
|
|
1305
|
+
};
|
|
1306
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { ...rest, ref: setContainerRef, style: [styles4.base, style], children: [
|
|
1307
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1308
|
+
reactNative.Pressable,
|
|
1309
|
+
{
|
|
1310
|
+
disabled: decrementDisabled,
|
|
1311
|
+
hitSlop,
|
|
1312
|
+
onPress: () => updateValue(resolvedValue - step),
|
|
1313
|
+
accessibilityRole: "button",
|
|
1314
|
+
accessibilityLabel: "Decrease value",
|
|
1315
|
+
accessibilityState: { disabled: decrementDisabled },
|
|
1316
|
+
style: [styles4.button, webBlurStyle2, decrementDisabled && styles4.buttonDisabled],
|
|
1317
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(MinusIcon, {})
|
|
1318
|
+
}
|
|
1319
|
+
),
|
|
1320
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles4.value, children: resolvedValue }),
|
|
1321
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1322
|
+
reactNative.Pressable,
|
|
1323
|
+
{
|
|
1324
|
+
disabled: incrementDisabled,
|
|
1325
|
+
hitSlop,
|
|
1326
|
+
onPress: () => updateValue(resolvedValue + step),
|
|
1327
|
+
accessibilityRole: "button",
|
|
1328
|
+
accessibilityLabel: "Increase value",
|
|
1329
|
+
accessibilityState: { disabled: incrementDisabled },
|
|
1330
|
+
style: [styles4.button, webBlurStyle2, incrementDisabled && styles4.buttonDisabled],
|
|
1331
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(PlusIcon, {})
|
|
1332
|
+
}
|
|
1333
|
+
)
|
|
1334
|
+
] });
|
|
1335
|
+
});
|
|
1336
|
+
var styles4 = reactNative.StyleSheet.create({
|
|
1337
|
+
base: {
|
|
1338
|
+
flexDirection: "row",
|
|
1339
|
+
alignItems: "center",
|
|
1340
|
+
alignSelf: "flex-start",
|
|
1341
|
+
gap: 17
|
|
1342
|
+
},
|
|
1343
|
+
button: {
|
|
1344
|
+
width: BUTTON_SIZE,
|
|
1345
|
+
height: BUTTON_SIZE,
|
|
1346
|
+
alignItems: "center",
|
|
1347
|
+
justifyContent: "center",
|
|
1348
|
+
borderWidth: 1,
|
|
1349
|
+
borderColor: colors.whiteAlpha10,
|
|
1350
|
+
borderRadius: 39
|
|
1351
|
+
},
|
|
1352
|
+
buttonDisabled: {
|
|
1353
|
+
opacity: 0.25
|
|
1354
|
+
},
|
|
1355
|
+
value: {
|
|
1356
|
+
...counterTypography,
|
|
1357
|
+
color: colors.white
|
|
1358
|
+
}
|
|
1359
|
+
});
|
|
1360
|
+
var ICON_SIZE3 = 20;
|
|
1361
|
+
var ANIMATION_DURATION = 200;
|
|
1362
|
+
var SegmentedToggle = react.forwardRef(
|
|
1363
|
+
function SegmentedToggle2({
|
|
1364
|
+
options,
|
|
1365
|
+
value,
|
|
1366
|
+
defaultValue = options[0].value,
|
|
1367
|
+
onValueChange,
|
|
1368
|
+
fullWidth = true,
|
|
1369
|
+
disabled = false,
|
|
1370
|
+
style,
|
|
1371
|
+
className,
|
|
1372
|
+
hitSlop,
|
|
1373
|
+
onLayout,
|
|
1374
|
+
...rest
|
|
1375
|
+
}, forwardedRef) {
|
|
1376
|
+
const containerRef = react.useRef(null);
|
|
1377
|
+
const isControlled = value !== void 0;
|
|
1378
|
+
const [uncontrolledValue, setUncontrolledValue] = react.useState(defaultValue);
|
|
1379
|
+
const selectedValue = isControlled ? value : uncontrolledValue;
|
|
1380
|
+
const selectedIndex = Math.max(
|
|
1381
|
+
0,
|
|
1382
|
+
options.findIndex(({ value: optionValue }) => optionValue === selectedValue)
|
|
1383
|
+
);
|
|
1384
|
+
const resolvedClassName = className?.trim() || void 0;
|
|
1385
|
+
const setContainerRef = react.useMemo(() => mergeRefs(containerRef, forwardedRef), [forwardedRef]);
|
|
1386
|
+
const progress = react.useRef(new reactNative.Animated.Value(selectedIndex)).current;
|
|
1387
|
+
const [contentWidths, setContentWidths] = react.useState([0, 0]);
|
|
1388
|
+
const [containerWidth, setContainerWidth] = react.useState(0);
|
|
1389
|
+
const availableOptionWidth = Math.max(0, (containerWidth - 12) / 2);
|
|
1390
|
+
const widestContentWidth = Math.max(...contentWidths);
|
|
1391
|
+
const contentBasedOptionWidth = widestContentWidth > 0 ? widestContentWidth + 24 * 2 : 0;
|
|
1392
|
+
const optionWidth = fullWidth ? availableOptionWidth : contentBasedOptionWidth;
|
|
1393
|
+
const indicatorTranslateX = progress.interpolate({
|
|
1394
|
+
inputRange: [0, 1],
|
|
1395
|
+
outputRange: [0, optionWidth + 4]
|
|
1396
|
+
});
|
|
1397
|
+
useApplyWebClassName(containerRef, resolvedClassName);
|
|
1398
|
+
react.useEffect(() => {
|
|
1399
|
+
const animation = reactNative.Animated.timing(progress, {
|
|
1400
|
+
toValue: selectedIndex,
|
|
1401
|
+
duration: ANIMATION_DURATION,
|
|
1402
|
+
easing: reactNative.Easing.out(reactNative.Easing.cubic),
|
|
1403
|
+
useNativeDriver: true
|
|
1404
|
+
});
|
|
1405
|
+
animation.start();
|
|
1406
|
+
return () => animation.stop();
|
|
1407
|
+
}, [progress, selectedIndex]);
|
|
1408
|
+
const selectOption = (nextValue) => {
|
|
1409
|
+
if (disabled || nextValue === selectedValue) return;
|
|
1410
|
+
if (!isControlled) setUncontrolledValue(nextValue);
|
|
1411
|
+
onValueChange?.(nextValue);
|
|
1412
|
+
};
|
|
1413
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1414
|
+
reactNative.View,
|
|
1415
|
+
{
|
|
1416
|
+
...rest,
|
|
1417
|
+
ref: setContainerRef,
|
|
1418
|
+
onLayout: (event) => {
|
|
1419
|
+
const nextWidth = event.nativeEvent.layout.width;
|
|
1420
|
+
setContainerWidth(
|
|
1421
|
+
(currentWidth) => currentWidth === nextWidth ? currentWidth : nextWidth
|
|
1422
|
+
);
|
|
1423
|
+
onLayout?.(event);
|
|
1424
|
+
},
|
|
1425
|
+
style: [
|
|
1426
|
+
styles5.base,
|
|
1427
|
+
fullWidth ? styles5.fullWidth : styles5.contentWidth,
|
|
1428
|
+
disabled && styles5.disabled,
|
|
1429
|
+
style
|
|
1430
|
+
],
|
|
1431
|
+
accessibilityRole: "radiogroup",
|
|
1432
|
+
children: [
|
|
1433
|
+
optionWidth > 0 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1434
|
+
reactNative.Animated.View,
|
|
1435
|
+
{
|
|
1436
|
+
pointerEvents: "none",
|
|
1437
|
+
style: [
|
|
1438
|
+
styles5.activeIndicator,
|
|
1439
|
+
{ width: optionWidth, transform: [{ translateX: indicatorTranslateX }] }
|
|
1440
|
+
]
|
|
1441
|
+
}
|
|
1442
|
+
) : null,
|
|
1443
|
+
options.map(({ value: optionValue, label, icon: Icon2 }, index) => {
|
|
1444
|
+
const selected = optionValue === selectedValue;
|
|
1445
|
+
const iconColor = selected ? colors.primary : colors.whiteAlpha20;
|
|
1446
|
+
const labelColor = selected ? colors.whiteAlpha86 : colors.whiteAlpha40;
|
|
1447
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1448
|
+
reactNative.Pressable,
|
|
1449
|
+
{
|
|
1450
|
+
onPress: () => selectOption(optionValue),
|
|
1451
|
+
disabled,
|
|
1452
|
+
hitSlop,
|
|
1453
|
+
accessibilityRole: "radio",
|
|
1454
|
+
accessibilityLabel: label,
|
|
1455
|
+
accessibilityState: { selected, disabled },
|
|
1456
|
+
style: [
|
|
1457
|
+
styles5.option,
|
|
1458
|
+
fullWidth ? styles5.optionFullWidth : optionWidth > 0 && { minWidth: optionWidth }
|
|
1459
|
+
],
|
|
1460
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1461
|
+
reactNative.View,
|
|
1462
|
+
{
|
|
1463
|
+
onLayout: (event) => {
|
|
1464
|
+
const nextWidth = event.nativeEvent.layout.width;
|
|
1465
|
+
setContentWidths((currentWidths) => {
|
|
1466
|
+
if (currentWidths[index] === nextWidth) return currentWidths;
|
|
1467
|
+
const nextWidths = [currentWidths[0], currentWidths[1]];
|
|
1468
|
+
nextWidths[index] = nextWidth;
|
|
1469
|
+
return nextWidths;
|
|
1470
|
+
});
|
|
1471
|
+
},
|
|
1472
|
+
style: styles5.optionContent,
|
|
1473
|
+
children: [
|
|
1474
|
+
Icon2 ? /* @__PURE__ */ jsxRuntime.jsx(Icon2, { size: ICON_SIZE3, color: iconColor }) : null,
|
|
1475
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style: [styles5.label, { color: labelColor }], children: label })
|
|
1476
|
+
]
|
|
1477
|
+
}
|
|
1478
|
+
)
|
|
1479
|
+
},
|
|
1480
|
+
optionValue
|
|
1481
|
+
);
|
|
1482
|
+
})
|
|
1483
|
+
]
|
|
1484
|
+
}
|
|
1485
|
+
);
|
|
1486
|
+
}
|
|
1487
|
+
);
|
|
1488
|
+
var styles5 = reactNative.StyleSheet.create({
|
|
1489
|
+
base: {
|
|
1490
|
+
height: 44,
|
|
1491
|
+
flexDirection: "row",
|
|
1492
|
+
padding: 4,
|
|
1493
|
+
gap: 4,
|
|
1494
|
+
borderRadius: 60,
|
|
1495
|
+
backgroundColor: colors.grey700,
|
|
1496
|
+
overflow: "hidden"
|
|
1497
|
+
},
|
|
1498
|
+
fullWidth: {
|
|
1499
|
+
width: "100%",
|
|
1500
|
+
alignSelf: "stretch"
|
|
1501
|
+
},
|
|
1502
|
+
contentWidth: {
|
|
1503
|
+
alignSelf: "flex-start"
|
|
1504
|
+
},
|
|
1505
|
+
disabled: {
|
|
1506
|
+
opacity: 0.6
|
|
1507
|
+
},
|
|
1508
|
+
option: {
|
|
1509
|
+
zIndex: 1,
|
|
1510
|
+
flexDirection: "row",
|
|
1511
|
+
alignItems: "center",
|
|
1512
|
+
justifyContent: "center",
|
|
1513
|
+
paddingHorizontal: 24,
|
|
1514
|
+
borderRadius: 60
|
|
1515
|
+
},
|
|
1516
|
+
optionContent: {
|
|
1517
|
+
maxWidth: "100%",
|
|
1518
|
+
flexDirection: "row",
|
|
1519
|
+
alignItems: "center",
|
|
1520
|
+
gap: 12
|
|
1521
|
+
},
|
|
1522
|
+
optionFullWidth: {
|
|
1523
|
+
flex: 1,
|
|
1524
|
+
minWidth: 0
|
|
1525
|
+
},
|
|
1526
|
+
activeIndicator: {
|
|
1527
|
+
position: "absolute",
|
|
1528
|
+
top: 4,
|
|
1529
|
+
left: 4,
|
|
1530
|
+
height: 36,
|
|
1531
|
+
backgroundColor: colors.grey600,
|
|
1532
|
+
borderRadius: 60
|
|
1533
|
+
},
|
|
1534
|
+
label: {
|
|
1535
|
+
...segmentedToggleTypography,
|
|
1536
|
+
flexShrink: 1
|
|
1537
|
+
}
|
|
1538
|
+
});
|
|
1539
|
+
var ICON_SIZE4 = 28;
|
|
1540
|
+
var StatCard = react.forwardRef(function StatCard2({ label, icon: Icon2, style, className, accessibilityLabel, ...rest }, forwardedRef) {
|
|
1541
|
+
const containerRef = react.useRef(null);
|
|
1542
|
+
const resolvedClassName = className?.trim() || void 0;
|
|
1543
|
+
const setContainerRef = react.useMemo(() => mergeRefs(containerRef, forwardedRef), [forwardedRef]);
|
|
1544
|
+
useApplyWebClassName(containerRef, resolvedClassName);
|
|
1545
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1546
|
+
reactNative.View,
|
|
1547
|
+
{
|
|
1548
|
+
...rest,
|
|
1549
|
+
ref: setContainerRef,
|
|
1550
|
+
style: [styles6.base, style],
|
|
1551
|
+
accessibilityRole: "text",
|
|
1552
|
+
accessibilityLabel: accessibilityLabel ?? label,
|
|
1553
|
+
children: [
|
|
1554
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon2, { size: ICON_SIZE4, color: colors.white }),
|
|
1555
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles6.label, children: label })
|
|
1556
|
+
]
|
|
1557
|
+
}
|
|
1558
|
+
);
|
|
1559
|
+
});
|
|
1560
|
+
var styles6 = reactNative.StyleSheet.create({
|
|
1561
|
+
base: {
|
|
1562
|
+
width: 204.5,
|
|
1563
|
+
minHeight: 114,
|
|
1564
|
+
padding: 24,
|
|
1565
|
+
gap: 16,
|
|
1566
|
+
borderRadius: 20,
|
|
1567
|
+
backgroundColor: colors.grey750
|
|
1568
|
+
},
|
|
1569
|
+
label: {
|
|
1570
|
+
...statCardTypography,
|
|
1571
|
+
color: colors.whiteAlpha86
|
|
1572
|
+
}
|
|
1573
|
+
});
|
|
1574
|
+
var variantConfig2 = {
|
|
1097
1575
|
primary: {
|
|
1098
1576
|
backgroundColor: colors.primary,
|
|
1099
1577
|
textColor: colors.white,
|
|
@@ -1152,7 +1630,7 @@ var Button = react.forwardRef(
|
|
|
1152
1630
|
}, forwardedRef) {
|
|
1153
1631
|
const containerRef = react.useRef(null);
|
|
1154
1632
|
const textRef = react.useRef(null);
|
|
1155
|
-
const preset =
|
|
1633
|
+
const preset = variantConfig2[variant];
|
|
1156
1634
|
const metrics = sizeConfig[size];
|
|
1157
1635
|
const label = typeof children !== "undefined" ? children : title;
|
|
1158
1636
|
const hasCustomChildren = typeof children !== "undefined";
|
|
@@ -1165,7 +1643,7 @@ var Button = react.forwardRef(
|
|
|
1165
1643
|
useApplyWebClassName(textRef, textClassName);
|
|
1166
1644
|
const iconNode = customIcon ?? /* @__PURE__ */ jsxRuntime.jsx(ArrowRightIcon, { size: metrics.iconSize, color: preset.iconColor });
|
|
1167
1645
|
const containerStyle = [
|
|
1168
|
-
|
|
1646
|
+
styles7.base,
|
|
1169
1647
|
{
|
|
1170
1648
|
minHeight: metrics.minHeight,
|
|
1171
1649
|
borderRadius: metrics.borderRadius,
|
|
@@ -1176,15 +1654,15 @@ var Button = react.forwardRef(
|
|
|
1176
1654
|
paddingRight: hasIcon ? metrics.paddingRightWithIcon : metrics.paddingRight,
|
|
1177
1655
|
gap: hasIcon ? metrics.gap : 0
|
|
1178
1656
|
},
|
|
1179
|
-
disabled &&
|
|
1657
|
+
disabled && styles7.disabled,
|
|
1180
1658
|
style
|
|
1181
1659
|
];
|
|
1182
1660
|
const labelStyle = [
|
|
1183
|
-
|
|
1661
|
+
styles7.label,
|
|
1184
1662
|
metrics.text,
|
|
1185
1663
|
{ color: preset.textColor },
|
|
1186
|
-
reactNative.Platform.OS === "android" ?
|
|
1187
|
-
!hasIcon &&
|
|
1664
|
+
reactNative.Platform.OS === "android" ? styles7.labelAndroid : null,
|
|
1665
|
+
!hasIcon && styles7.labelCentered,
|
|
1188
1666
|
textStyle
|
|
1189
1667
|
];
|
|
1190
1668
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -1205,7 +1683,7 @@ var Button = react.forwardRef(
|
|
|
1205
1683
|
reactNative.View,
|
|
1206
1684
|
{
|
|
1207
1685
|
style: [
|
|
1208
|
-
|
|
1686
|
+
styles7.iconContainer,
|
|
1209
1687
|
{
|
|
1210
1688
|
width: metrics.iconContainerSize,
|
|
1211
1689
|
height: metrics.iconContainerSize,
|
|
@@ -1221,7 +1699,7 @@ var Button = react.forwardRef(
|
|
|
1221
1699
|
);
|
|
1222
1700
|
}
|
|
1223
1701
|
);
|
|
1224
|
-
var
|
|
1702
|
+
var styles7 = reactNative.StyleSheet.create({
|
|
1225
1703
|
base: {
|
|
1226
1704
|
flexDirection: "row",
|
|
1227
1705
|
alignItems: "center",
|
|
@@ -1299,13 +1777,13 @@ var Checkbox = react.forwardRef(function Checkbox2({
|
|
|
1299
1777
|
accessibilityRole: "checkbox",
|
|
1300
1778
|
accessibilityLabel: resolvedAccessibilityLabel,
|
|
1301
1779
|
accessibilityState: { checked: isActive, disabled },
|
|
1302
|
-
style: [
|
|
1780
|
+
style: [styles8.root, disabled && styles8.disabled, style],
|
|
1303
1781
|
children: [
|
|
1304
1782
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1305
1783
|
reactNative.View,
|
|
1306
1784
|
{
|
|
1307
1785
|
style: [
|
|
1308
|
-
|
|
1786
|
+
styles8.box,
|
|
1309
1787
|
{
|
|
1310
1788
|
backgroundColor: chrome.backgroundColor,
|
|
1311
1789
|
borderColor: chrome.borderColor
|
|
@@ -1314,12 +1792,12 @@ var Checkbox = react.forwardRef(function Checkbox2({
|
|
|
1314
1792
|
children: isActive ? /* @__PURE__ */ jsxRuntime.jsx(CheckIcon, { size: CHECK_SIZE, color: colors.primary, strokeWidth: CHECK_STROKE }) : null
|
|
1315
1793
|
}
|
|
1316
1794
|
),
|
|
1317
|
-
labelContent != null && labelContent !== false ? typeof labelContent === "string" || typeof labelContent === "number" ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
1795
|
+
labelContent != null && labelContent !== false ? typeof labelContent === "string" || typeof labelContent === "number" ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles8.label, labelStyle], children: labelContent }) : labelContent : null
|
|
1318
1796
|
]
|
|
1319
1797
|
}
|
|
1320
1798
|
);
|
|
1321
1799
|
});
|
|
1322
|
-
var
|
|
1800
|
+
var styles8 = reactNative.StyleSheet.create({
|
|
1323
1801
|
root: {
|
|
1324
1802
|
flexDirection: "row",
|
|
1325
1803
|
alignItems: "center",
|
|
@@ -1417,7 +1895,7 @@ var DEFAULT_WIDTH = 380;
|
|
|
1417
1895
|
var TRIGGER_HEIGHT = 44;
|
|
1418
1896
|
var TRIGGER_RADIUS = 60;
|
|
1419
1897
|
var MENU_RADIUS2 = 20;
|
|
1420
|
-
var
|
|
1898
|
+
var ICON_SIZE5 = 20;
|
|
1421
1899
|
var NAV_ICON_SIZE = 20;
|
|
1422
1900
|
var DAY_CELL_HEIGHT = 44;
|
|
1423
1901
|
var DAY_CIRCLE_SIZE = 44;
|
|
@@ -1569,9 +2047,9 @@ var DatePicker = react.forwardRef(
|
|
|
1569
2047
|
{
|
|
1570
2048
|
...rest,
|
|
1571
2049
|
ref: setRootRef,
|
|
1572
|
-
style: [
|
|
2050
|
+
style: [styles9.root, isOpen && styles9.rootOpen, disabled && styles9.disabled, style],
|
|
1573
2051
|
accessibilityState: { disabled, expanded: isOpen },
|
|
1574
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [
|
|
2052
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles9.triggerWrap, isOpen && styles9.triggerWrapOpen], children: [
|
|
1575
2053
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1576
2054
|
reactNative.Pressable,
|
|
1577
2055
|
{
|
|
@@ -1582,17 +2060,17 @@ var DatePicker = react.forwardRef(
|
|
|
1582
2060
|
accessibilityLabel: resolvedAccessibilityLabel,
|
|
1583
2061
|
accessibilityState: { disabled, expanded: isOpen },
|
|
1584
2062
|
style: [
|
|
1585
|
-
|
|
2063
|
+
styles9.trigger,
|
|
1586
2064
|
{ borderColor: triggerBorderColor, backgroundColor: colors.grey700 }
|
|
1587
2065
|
],
|
|
1588
2066
|
children: [
|
|
1589
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
1590
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
2067
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles9.triggerText, { color: triggerTextColor }], numberOfLines: 1, children: triggerLabel }),
|
|
2068
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles9.iconSlot, children: /* @__PURE__ */ jsxRuntime.jsx(CalendarOutlineIcon, { size: ICON_SIZE5, color: colors.grey100 }) })
|
|
1591
2069
|
]
|
|
1592
2070
|
}
|
|
1593
2071
|
),
|
|
1594
|
-
isOpen ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
1595
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
2072
|
+
isOpen ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles9.menu, children: [
|
|
2073
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles9.calendarHeader, children: [
|
|
1596
2074
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1597
2075
|
reactNative.Pressable,
|
|
1598
2076
|
{
|
|
@@ -1600,11 +2078,11 @@ var DatePicker = react.forwardRef(
|
|
|
1600
2078
|
hitSlop: 8,
|
|
1601
2079
|
accessibilityRole: "button",
|
|
1602
2080
|
accessibilityLabel: "Previous month",
|
|
1603
|
-
style:
|
|
2081
|
+
style: styles9.navButton,
|
|
1604
2082
|
children: /* @__PURE__ */ jsxRuntime.jsx(ChevronLeftIcon, { size: NAV_ICON_SIZE, color: colors.white })
|
|
1605
2083
|
}
|
|
1606
2084
|
),
|
|
1607
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.Text, { style:
|
|
2085
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.Text, { style: styles9.monthHeading, children: [
|
|
1608
2086
|
monthNames[visibleMonth.getMonth()],
|
|
1609
2087
|
" ",
|
|
1610
2088
|
visibleMonth.getFullYear()
|
|
@@ -1616,13 +2094,13 @@ var DatePicker = react.forwardRef(
|
|
|
1616
2094
|
hitSlop: 8,
|
|
1617
2095
|
accessibilityRole: "button",
|
|
1618
2096
|
accessibilityLabel: "Next month",
|
|
1619
|
-
style:
|
|
1620
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
2097
|
+
style: styles9.navButton,
|
|
2098
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles9.navIconMirror, children: /* @__PURE__ */ jsxRuntime.jsx(ChevronLeftIcon, { size: NAV_ICON_SIZE, color: colors.white }) })
|
|
1621
2099
|
}
|
|
1622
2100
|
)
|
|
1623
2101
|
] }),
|
|
1624
2102
|
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { children: [
|
|
1625
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
2103
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles9.weekdayRow, children: weekdayLabels.map((weekdayLabel, index) => /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles9.dayCellWrap, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles9.weekdayText, children: weekdayLabel }) }, `${weekdayLabel}-${index}`)) }),
|
|
1626
2104
|
weeks.map((week, weekIndex) => {
|
|
1627
2105
|
let rangeHighlightStyle = null;
|
|
1628
2106
|
if (isRange && rangeValue.start && rangeValue.end) {
|
|
@@ -1659,13 +2137,13 @@ var DatePicker = react.forwardRef(
|
|
|
1659
2137
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1660
2138
|
reactNative.View,
|
|
1661
2139
|
{
|
|
1662
|
-
style: [
|
|
2140
|
+
style: [styles9.weekRow, weekIndex > 0 && styles9.weekRowSpaced],
|
|
1663
2141
|
children: [
|
|
1664
2142
|
rangeHighlightStyle ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1665
2143
|
reactNative.View,
|
|
1666
2144
|
{
|
|
1667
2145
|
pointerEvents: "none",
|
|
1668
|
-
style: [
|
|
2146
|
+
style: [styles9.rangeHighlight, rangeHighlightStyle]
|
|
1669
2147
|
}
|
|
1670
2148
|
) : null,
|
|
1671
2149
|
week.map((day, dayIndex) => {
|
|
@@ -1688,7 +2166,7 @@ var DatePicker = react.forwardRef(
|
|
|
1688
2166
|
onHoverOut: () => setHoveredDayKey((current) => current === dayKey ? null : current),
|
|
1689
2167
|
onPressIn: () => setHoveredDayKey(dayKey),
|
|
1690
2168
|
onPressOut: () => setHoveredDayKey((current) => current === dayKey ? null : current),
|
|
1691
|
-
style:
|
|
2169
|
+
style: styles9.dayCellWrap,
|
|
1692
2170
|
accessibilityRole: "button",
|
|
1693
2171
|
accessibilityLabel: formatValue(day),
|
|
1694
2172
|
accessibilityState: {
|
|
@@ -1700,14 +2178,14 @@ var DatePicker = react.forwardRef(
|
|
|
1700
2178
|
reactNative.View,
|
|
1701
2179
|
{
|
|
1702
2180
|
style: [
|
|
1703
|
-
|
|
1704
|
-
isSelectedEndpoint &&
|
|
1705
|
-
isHovered &&
|
|
2181
|
+
styles9.dayCircle,
|
|
2182
|
+
isSelectedEndpoint && styles9.dayCircleSelected,
|
|
2183
|
+
isHovered && styles9.dayCircleHovered
|
|
1706
2184
|
],
|
|
1707
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
2185
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles9.dayText, { color: dayTextColor }], children: day.getDate() })
|
|
1708
2186
|
}
|
|
1709
2187
|
),
|
|
1710
|
-
isToday && !isSelectedEndpoint ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
2188
|
+
isToday && !isSelectedEndpoint ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles9.todayDot }) : null
|
|
1711
2189
|
]
|
|
1712
2190
|
},
|
|
1713
2191
|
dayIndex
|
|
@@ -1725,7 +2203,7 @@ var DatePicker = react.forwardRef(
|
|
|
1725
2203
|
);
|
|
1726
2204
|
}
|
|
1727
2205
|
);
|
|
1728
|
-
var
|
|
2206
|
+
var styles9 = reactNative.StyleSheet.create({
|
|
1729
2207
|
root: {
|
|
1730
2208
|
width: DEFAULT_WIDTH,
|
|
1731
2209
|
gap: 8,
|
|
@@ -1761,8 +2239,8 @@ var styles5 = reactNative.StyleSheet.create({
|
|
|
1761
2239
|
minWidth: 0
|
|
1762
2240
|
},
|
|
1763
2241
|
iconSlot: {
|
|
1764
|
-
width:
|
|
1765
|
-
height:
|
|
2242
|
+
width: ICON_SIZE5,
|
|
2243
|
+
height: ICON_SIZE5,
|
|
1766
2244
|
alignItems: "center",
|
|
1767
2245
|
justifyContent: "center",
|
|
1768
2246
|
flexShrink: 0
|
|
@@ -1985,13 +2463,13 @@ var Input = react.forwardRef(function Input2({
|
|
|
1985
2463
|
const rightIconNode = rightIcon ?? /* @__PURE__ */ jsxRuntime.jsx(ShowIcon, { size: metrics.iconSize, color: chrome.rightIconColor });
|
|
1986
2464
|
useApplyWebClassName(rootRef, className);
|
|
1987
2465
|
useApplyWebClassName(inputRef, inputClassName);
|
|
1988
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { ref: rootRef, style: [
|
|
1989
|
-
showLabel && label ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
2466
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { ref: rootRef, style: [styles10.root, disabled && styles10.disabled, style], children: [
|
|
2467
|
+
showLabel && label ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles10.label, { color: chrome.labelColor }], children: label }) : null,
|
|
1990
2468
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1991
2469
|
reactNative.View,
|
|
1992
2470
|
{
|
|
1993
2471
|
style: [
|
|
1994
|
-
|
|
2472
|
+
styles10.field,
|
|
1995
2473
|
{
|
|
1996
2474
|
height: metrics.height,
|
|
1997
2475
|
borderRadius: metrics.borderRadius,
|
|
@@ -2006,7 +2484,7 @@ var Input = react.forwardRef(function Input2({
|
|
|
2006
2484
|
fieldStyle
|
|
2007
2485
|
],
|
|
2008
2486
|
children: [
|
|
2009
|
-
hasLeftIcon ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [
|
|
2487
|
+
hasLeftIcon ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles10.iconSlot, { width: metrics.iconSize, height: metrics.iconSize }], children: leftIconNode }) : null,
|
|
2010
2488
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2011
2489
|
reactNative.TextInput,
|
|
2012
2490
|
{
|
|
@@ -2030,11 +2508,11 @@ var Input = react.forwardRef(function Input2({
|
|
|
2030
2508
|
onBlur?.(event);
|
|
2031
2509
|
},
|
|
2032
2510
|
style: [
|
|
2033
|
-
|
|
2511
|
+
styles10.input,
|
|
2034
2512
|
metrics.text,
|
|
2035
2513
|
{ color: chrome.textColor },
|
|
2036
|
-
reactNative.Platform.OS === "web" ?
|
|
2037
|
-
reactNative.Platform.OS === "android" ?
|
|
2514
|
+
reactNative.Platform.OS === "web" ? styles10.inputWeb : null,
|
|
2515
|
+
reactNative.Platform.OS === "android" ? styles10.inputAndroid : null,
|
|
2038
2516
|
inputStyle
|
|
2039
2517
|
],
|
|
2040
2518
|
accessibilityLabel: resolvedAccessibilityLabel,
|
|
@@ -2046,20 +2524,20 @@ var Input = react.forwardRef(function Input2({
|
|
|
2046
2524
|
{
|
|
2047
2525
|
onPress: onRightIconPress,
|
|
2048
2526
|
disabled,
|
|
2049
|
-
style: [
|
|
2527
|
+
style: [styles10.iconSlot, { width: metrics.iconSize, height: metrics.iconSize }],
|
|
2050
2528
|
accessibilityRole: "button",
|
|
2051
2529
|
accessibilityLabel: rightIconAccessibilityLabel,
|
|
2052
2530
|
hitSlop: 8,
|
|
2053
2531
|
children: rightIconNode
|
|
2054
2532
|
}
|
|
2055
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [
|
|
2533
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles10.iconSlot, { width: metrics.iconSize, height: metrics.iconSize }], children: rightIconNode }) : null
|
|
2056
2534
|
]
|
|
2057
2535
|
}
|
|
2058
2536
|
),
|
|
2059
|
-
showHint && hint ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
2537
|
+
showHint && hint ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles10.hint, { color: chrome.hintColor }], children: hint }) : null
|
|
2060
2538
|
] });
|
|
2061
2539
|
});
|
|
2062
|
-
var
|
|
2540
|
+
var styles10 = reactNative.StyleSheet.create({
|
|
2063
2541
|
root: {
|
|
2064
2542
|
width: DEFAULT_WIDTH2,
|
|
2065
2543
|
gap: 8,
|
|
@@ -2102,7 +2580,7 @@ var TRIGGER_RADIUS2 = 60;
|
|
|
2102
2580
|
var MENU_RADIUS3 = 24;
|
|
2103
2581
|
var MENU_MAX_LIST_HEIGHT = 248;
|
|
2104
2582
|
var ITEM_RADIUS2 = 12;
|
|
2105
|
-
var
|
|
2583
|
+
var ICON_SIZE6 = 20;
|
|
2106
2584
|
var CHIP_GAP = 6;
|
|
2107
2585
|
var FALLBACK_ELLIPSIS_WIDTH = 20;
|
|
2108
2586
|
function itemBackground(state) {
|
|
@@ -2175,25 +2653,25 @@ function MultiValueChips({ options, disabled, onRemove }) {
|
|
|
2175
2653
|
const next = Math.ceil(event.nativeEvent.layout.width);
|
|
2176
2654
|
setEllipsisWidth((current) => current === next ? current : next);
|
|
2177
2655
|
};
|
|
2178
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
2179
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { pointerEvents: "none", style:
|
|
2656
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles11.multiValueRoot, children: [
|
|
2657
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { pointerEvents: "none", style: styles11.measureRow, children: [
|
|
2180
2658
|
options.map((option) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2181
2659
|
reactNative.View,
|
|
2182
2660
|
{
|
|
2183
|
-
style:
|
|
2661
|
+
style: styles11.chip,
|
|
2184
2662
|
onLayout: (event) => handleChipLayout(option.value, event),
|
|
2185
2663
|
children: [
|
|
2186
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style:
|
|
2187
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style:
|
|
2664
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles11.chipLabel, numberOfLines: 1, children: option.label }),
|
|
2665
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles11.chipRemove, children: "\xD7" })
|
|
2188
2666
|
]
|
|
2189
2667
|
},
|
|
2190
2668
|
`measure-${option.value}`
|
|
2191
2669
|
)),
|
|
2192
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
2670
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles11.ellipsis, onLayout: handleEllipsisLayout, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles11.ellipsisText, children: "..." }) })
|
|
2193
2671
|
] }),
|
|
2194
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
2195
|
-
visible.map((option) => /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
2196
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style:
|
|
2672
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles11.chipsRow, onLayout: handleContainerLayout, children: [
|
|
2673
|
+
visible.map((option) => /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles11.chip, children: [
|
|
2674
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles11.chipLabel, numberOfLines: 1, children: option.label }),
|
|
2197
2675
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2198
2676
|
reactNative.Pressable,
|
|
2199
2677
|
{
|
|
@@ -2205,11 +2683,11 @@ function MultiValueChips({ options, disabled, onRemove }) {
|
|
|
2205
2683
|
hitSlop: 6,
|
|
2206
2684
|
accessibilityRole: "button",
|
|
2207
2685
|
accessibilityLabel: `Remove ${option.label}`,
|
|
2208
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style:
|
|
2686
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles11.chipRemove, children: "\xD7" })
|
|
2209
2687
|
}
|
|
2210
2688
|
)
|
|
2211
2689
|
] }, option.value)),
|
|
2212
|
-
hasOverflow ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
2690
|
+
hasOverflow ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles11.ellipsis, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles11.ellipsisText, children: "..." }) }) : null
|
|
2213
2691
|
] })
|
|
2214
2692
|
] });
|
|
2215
2693
|
}
|
|
@@ -2420,7 +2898,7 @@ var Select = react.forwardRef(
|
|
|
2420
2898
|
const leftIconNode = leftIcon ?? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2421
2899
|
UserIcon,
|
|
2422
2900
|
{
|
|
2423
|
-
size:
|
|
2901
|
+
size: ICON_SIZE6,
|
|
2424
2902
|
color: error ? colors.red : isOpen ? colors.primary : colors.grey100
|
|
2425
2903
|
}
|
|
2426
2904
|
);
|
|
@@ -2436,11 +2914,11 @@ var Select = react.forwardRef(
|
|
|
2436
2914
|
{
|
|
2437
2915
|
...rest,
|
|
2438
2916
|
ref: setRootRef,
|
|
2439
|
-
style: [
|
|
2917
|
+
style: [styles11.root, isOpen && styles11.rootOpen, disabled && styles11.disabled, style],
|
|
2440
2918
|
accessibilityState: { disabled, expanded: isOpen },
|
|
2441
2919
|
children: [
|
|
2442
|
-
showLabel && label ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
2443
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [
|
|
2920
|
+
showLabel && label ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles11.label, { color: labelColor }], children: label }) : null,
|
|
2921
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles11.triggerWrap, isOpen && styles11.triggerWrapOpen], children: [
|
|
2444
2922
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2445
2923
|
reactNative.Pressable,
|
|
2446
2924
|
{
|
|
@@ -2451,29 +2929,29 @@ var Select = react.forwardRef(
|
|
|
2451
2929
|
accessibilityLabel: resolvedAccessibilityLabel,
|
|
2452
2930
|
accessibilityState: { disabled, expanded: isOpen },
|
|
2453
2931
|
style: [
|
|
2454
|
-
|
|
2932
|
+
styles11.trigger,
|
|
2455
2933
|
{
|
|
2456
2934
|
borderColor: triggerBorderColor,
|
|
2457
2935
|
backgroundColor: colors.grey700
|
|
2458
2936
|
}
|
|
2459
2937
|
],
|
|
2460
2938
|
children: [
|
|
2461
|
-
hasLeftIcon ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
2462
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
2939
|
+
hasLeftIcon ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles11.iconSlot, children: leftIconNode }) : null,
|
|
2940
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles11.triggerContent, children: multiple && hasValue ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2463
2941
|
MultiValueChips,
|
|
2464
2942
|
{
|
|
2465
2943
|
options: selectedOptions,
|
|
2466
2944
|
disabled,
|
|
2467
2945
|
onRemove: handleRemoveChip
|
|
2468
2946
|
}
|
|
2469
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
2470
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [
|
|
2947
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles11.triggerText, { color: triggerTextColor }], numberOfLines: 1, children: multiple ? placeholder : singleLabel }) }),
|
|
2948
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles11.iconSlot, isOpen && styles11.chevronOpen], children: /* @__PURE__ */ jsxRuntime.jsx(ChevronDownIcon, { size: ICON_SIZE6, color: isOpen ? colors.primary : colors.grey100 }) })
|
|
2471
2949
|
]
|
|
2472
2950
|
}
|
|
2473
2951
|
),
|
|
2474
|
-
isOpen ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
2475
|
-
showSearch ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
2476
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
2952
|
+
isOpen ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles11.menu, children: [
|
|
2953
|
+
showSearch ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles11.searchField, children: [
|
|
2954
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles11.iconSlot, children: /* @__PURE__ */ jsxRuntime.jsx(SearchIcon, { size: ICON_SIZE6, color: colors.grey100 }) }),
|
|
2477
2955
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2478
2956
|
reactNative.TextInput,
|
|
2479
2957
|
{
|
|
@@ -2484,9 +2962,9 @@ var Select = react.forwardRef(
|
|
|
2484
2962
|
placeholder: searchPlaceholder,
|
|
2485
2963
|
placeholderTextColor: colors.grey100,
|
|
2486
2964
|
style: [
|
|
2487
|
-
|
|
2488
|
-
reactNative.Platform.OS === "web" ?
|
|
2489
|
-
reactNative.Platform.OS === "android" ?
|
|
2965
|
+
styles11.searchInput,
|
|
2966
|
+
reactNative.Platform.OS === "web" ? styles11.searchInputWeb : null,
|
|
2967
|
+
reactNative.Platform.OS === "android" ? styles11.searchInputAndroid : null
|
|
2490
2968
|
],
|
|
2491
2969
|
accessibilityLabel: searchPlaceholder
|
|
2492
2970
|
}
|
|
@@ -2495,12 +2973,12 @@ var Select = react.forwardRef(
|
|
|
2495
2973
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2496
2974
|
reactNative.ScrollView,
|
|
2497
2975
|
{
|
|
2498
|
-
style:
|
|
2499
|
-
contentContainerStyle:
|
|
2976
|
+
style: styles11.optionList,
|
|
2977
|
+
contentContainerStyle: styles11.optionListContent,
|
|
2500
2978
|
keyboardShouldPersistTaps: "handled",
|
|
2501
2979
|
showsVerticalScrollIndicator: false,
|
|
2502
2980
|
children: [
|
|
2503
|
-
loading ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
2981
|
+
loading ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles11.statusRow, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles11.statusText, children: "Loading..." }) }) : filteredOptions.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles11.statusRow, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles11.statusText, children: emptyText }) }) : null,
|
|
2504
2982
|
!loading && filteredOptions.map((option) => {
|
|
2505
2983
|
const isSelected = selectedValues.includes(option.value);
|
|
2506
2984
|
const isHovered = hoveredValue === option.value;
|
|
@@ -2517,14 +2995,14 @@ var Select = react.forwardRef(
|
|
|
2517
2995
|
accessibilityRole: multiple ? "checkbox" : "button",
|
|
2518
2996
|
accessibilityState: { selected: isSelected, checked: isSelected, disabled },
|
|
2519
2997
|
style: [
|
|
2520
|
-
|
|
2998
|
+
styles11.item,
|
|
2521
2999
|
{
|
|
2522
3000
|
backgroundColor: itemBackground(visualState)
|
|
2523
3001
|
}
|
|
2524
3002
|
],
|
|
2525
3003
|
children: [
|
|
2526
|
-
multiple ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { pointerEvents: "none", style:
|
|
2527
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style:
|
|
3004
|
+
multiple ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { pointerEvents: "none", style: styles11.itemCheckbox, children: /* @__PURE__ */ jsxRuntime.jsx(Checkbox, { value: isSelected, variant: "light" }) }) : null,
|
|
3005
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles11.itemLabel, numberOfLines: 1, children: option.label })
|
|
2528
3006
|
]
|
|
2529
3007
|
},
|
|
2530
3008
|
option.value
|
|
@@ -2535,13 +3013,13 @@ var Select = react.forwardRef(
|
|
|
2535
3013
|
)
|
|
2536
3014
|
] }) : null
|
|
2537
3015
|
] }),
|
|
2538
|
-
showHint && hint ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
3016
|
+
showHint && hint ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles11.hint, { color: hintColor }], children: hint }) : null
|
|
2539
3017
|
]
|
|
2540
3018
|
}
|
|
2541
3019
|
);
|
|
2542
3020
|
}
|
|
2543
3021
|
);
|
|
2544
|
-
var
|
|
3022
|
+
var styles11 = reactNative.StyleSheet.create({
|
|
2545
3023
|
root: {
|
|
2546
3024
|
width: DEFAULT_WIDTH3,
|
|
2547
3025
|
gap: 8,
|
|
@@ -2631,8 +3109,8 @@ var styles7 = reactNative.StyleSheet.create({
|
|
|
2631
3109
|
lineHeight: 16
|
|
2632
3110
|
},
|
|
2633
3111
|
iconSlot: {
|
|
2634
|
-
width:
|
|
2635
|
-
height:
|
|
3112
|
+
width: ICON_SIZE6,
|
|
3113
|
+
height: ICON_SIZE6,
|
|
2636
3114
|
alignItems: "center",
|
|
2637
3115
|
justifyContent: "center",
|
|
2638
3116
|
flexShrink: 0
|
|
@@ -2803,13 +3281,13 @@ var Textarea = react.forwardRef(function Textarea2({
|
|
|
2803
3281
|
const resolvedAccessibilityLabel = accessibilityLabel ?? (showLabel ? void 0 : label);
|
|
2804
3282
|
useApplyWebClassName(rootRef, className);
|
|
2805
3283
|
useApplyWebClassName(inputRef, inputClassName);
|
|
2806
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { ref: rootRef, style: [
|
|
2807
|
-
showLabel && label ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
3284
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { ref: rootRef, style: [styles12.root, disabled && styles12.disabled, style], children: [
|
|
3285
|
+
showLabel && label ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles12.label, { color: chrome.labelColor }], children: label }) : null,
|
|
2808
3286
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2809
3287
|
reactNative.View,
|
|
2810
3288
|
{
|
|
2811
3289
|
style: [
|
|
2812
|
-
|
|
3290
|
+
styles12.field,
|
|
2813
3291
|
{
|
|
2814
3292
|
borderColor: chrome.borderColor,
|
|
2815
3293
|
backgroundColor: chrome.backgroundColor
|
|
@@ -2841,11 +3319,11 @@ var Textarea = react.forwardRef(function Textarea2({
|
|
|
2841
3319
|
onBlur?.(event);
|
|
2842
3320
|
},
|
|
2843
3321
|
style: [
|
|
2844
|
-
|
|
3322
|
+
styles12.input,
|
|
2845
3323
|
textareaTypography.field,
|
|
2846
3324
|
{ color: chrome.textColor },
|
|
2847
|
-
reactNative.Platform.OS === "web" ?
|
|
2848
|
-
reactNative.Platform.OS === "android" ?
|
|
3325
|
+
reactNative.Platform.OS === "web" ? styles12.inputWeb : null,
|
|
3326
|
+
reactNative.Platform.OS === "android" ? styles12.inputAndroid : null,
|
|
2849
3327
|
inputStyle
|
|
2850
3328
|
],
|
|
2851
3329
|
accessibilityLabel: resolvedAccessibilityLabel,
|
|
@@ -2854,10 +3332,10 @@ var Textarea = react.forwardRef(function Textarea2({
|
|
|
2854
3332
|
)
|
|
2855
3333
|
}
|
|
2856
3334
|
),
|
|
2857
|
-
showHint && hint ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
3335
|
+
showHint && hint ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles12.hint, { color: chrome.hintColor }], children: hint }) : null
|
|
2858
3336
|
] });
|
|
2859
3337
|
});
|
|
2860
|
-
var
|
|
3338
|
+
var styles12 = reactNative.StyleSheet.create({
|
|
2861
3339
|
root: {
|
|
2862
3340
|
width: DEFAULT_WIDTH4,
|
|
2863
3341
|
gap: 8,
|
|
@@ -2900,7 +3378,7 @@ var TRACK_RADIUS = 43;
|
|
|
2900
3378
|
var TRACK_PADDING = 4;
|
|
2901
3379
|
var THUMB_SIZE = TRACK_HEIGHT - TRACK_PADDING * 2;
|
|
2902
3380
|
var THUMB_TRAVEL = TRACK_WIDTH - TRACK_PADDING * 2 - THUMB_SIZE;
|
|
2903
|
-
var
|
|
3381
|
+
var ANIMATION_DURATION2 = 300;
|
|
2904
3382
|
var Toggle = react.forwardRef(function Toggle2({
|
|
2905
3383
|
value,
|
|
2906
3384
|
defaultValue = false,
|
|
@@ -2927,7 +3405,7 @@ var Toggle = react.forwardRef(function Toggle2({
|
|
|
2927
3405
|
react.useEffect(() => {
|
|
2928
3406
|
reactNative.Animated.timing(progress, {
|
|
2929
3407
|
toValue: isActive ? 1 : 0,
|
|
2930
|
-
duration:
|
|
3408
|
+
duration: ANIMATION_DURATION2,
|
|
2931
3409
|
easing: reactNative.Easing.out(reactNative.Easing.ease),
|
|
2932
3410
|
useNativeDriver: false
|
|
2933
3411
|
}).start();
|
|
@@ -2957,13 +3435,13 @@ var Toggle = react.forwardRef(function Toggle2({
|
|
|
2957
3435
|
accessibilityRole: "switch",
|
|
2958
3436
|
accessibilityLabel: resolvedAccessibilityLabel,
|
|
2959
3437
|
accessibilityState: { checked: isActive, disabled },
|
|
2960
|
-
style: [
|
|
3438
|
+
style: [styles13.pressable, disabled && styles13.disabled, style],
|
|
2961
3439
|
children: [
|
|
2962
3440
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2963
3441
|
reactNative.Animated.View,
|
|
2964
3442
|
{
|
|
2965
3443
|
style: [
|
|
2966
|
-
|
|
3444
|
+
styles13.track,
|
|
2967
3445
|
{
|
|
2968
3446
|
backgroundColor: trackBackgroundColor
|
|
2969
3447
|
}
|
|
@@ -2972,7 +3450,7 @@ var Toggle = react.forwardRef(function Toggle2({
|
|
|
2972
3450
|
reactNative.Animated.View,
|
|
2973
3451
|
{
|
|
2974
3452
|
style: [
|
|
2975
|
-
|
|
3453
|
+
styles13.thumb,
|
|
2976
3454
|
{
|
|
2977
3455
|
transform: [{ translateX: thumbTranslateX }]
|
|
2978
3456
|
}
|
|
@@ -2981,12 +3459,12 @@ var Toggle = react.forwardRef(function Toggle2({
|
|
|
2981
3459
|
)
|
|
2982
3460
|
}
|
|
2983
3461
|
),
|
|
2984
|
-
labelContent != null && labelContent !== false ? typeof labelContent === "string" || typeof labelContent === "number" ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
3462
|
+
labelContent != null && labelContent !== false ? typeof labelContent === "string" || typeof labelContent === "number" ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles13.label, labelStyle], children: labelContent }) : labelContent : null
|
|
2985
3463
|
]
|
|
2986
3464
|
}
|
|
2987
3465
|
);
|
|
2988
3466
|
});
|
|
2989
|
-
var
|
|
3467
|
+
var styles13 = reactNative.StyleSheet.create({
|
|
2990
3468
|
pressable: {
|
|
2991
3469
|
flexDirection: "row",
|
|
2992
3470
|
alignItems: "center",
|
|
@@ -3017,6 +3495,7 @@ var styles9 = reactNative.StyleSheet.create({
|
|
|
3017
3495
|
|
|
3018
3496
|
exports.ArrowRightIcon = ArrowRightIcon;
|
|
3019
3497
|
exports.Avatar = Avatar;
|
|
3498
|
+
exports.Badge = Badge;
|
|
3020
3499
|
exports.BagIcon = BagIcon;
|
|
3021
3500
|
exports.BellIcon = BellIcon;
|
|
3022
3501
|
exports.BuildingIcon = BuildingIcon;
|
|
@@ -3030,6 +3509,7 @@ exports.Checkbox = Checkbox;
|
|
|
3030
3509
|
exports.ChevronDownIcon = ChevronDownIcon;
|
|
3031
3510
|
exports.ChevronLeftIcon = ChevronLeftIcon;
|
|
3032
3511
|
exports.ClockIcon = ClockIcon;
|
|
3512
|
+
exports.Counter = Counter;
|
|
3033
3513
|
exports.DatePicker = DatePicker;
|
|
3034
3514
|
exports.FacebookIcon = FacebookIcon;
|
|
3035
3515
|
exports.HeartIcon = HeartIcon;
|
|
@@ -3044,19 +3524,27 @@ exports.LinkedInIcon = LinkedInIcon;
|
|
|
3044
3524
|
exports.LogOutIcon = LogOutIcon;
|
|
3045
3525
|
exports.MailIcon = MailIcon;
|
|
3046
3526
|
exports.MenuItem = MenuItem;
|
|
3527
|
+
exports.MinusIcon = MinusIcon;
|
|
3047
3528
|
exports.NavigateIcon = NavigateIcon;
|
|
3048
3529
|
exports.PhoneIcon = PhoneIcon;
|
|
3530
|
+
exports.PlusIcon = PlusIcon;
|
|
3049
3531
|
exports.SearchIcon = SearchIcon;
|
|
3532
|
+
exports.SegmentedToggle = SegmentedToggle;
|
|
3050
3533
|
exports.Select = Select;
|
|
3051
3534
|
exports.SettingsIcon = SettingsIcon;
|
|
3052
3535
|
exports.ShowIcon = ShowIcon;
|
|
3536
|
+
exports.SidebarIcon = SidebarIcon;
|
|
3537
|
+
exports.StatCard = StatCard;
|
|
3053
3538
|
exports.Textarea = Textarea;
|
|
3054
3539
|
exports.Toggle = Toggle;
|
|
3055
3540
|
exports.UserIcon = UserIcon;
|
|
3541
|
+
exports.UsersAltIcon = UsersAltIcon;
|
|
3056
3542
|
exports.VideoIcon = VideoIcon;
|
|
3057
3543
|
exports.avatarTypography = avatarTypography;
|
|
3544
|
+
exports.badgeTypography = badgeTypography;
|
|
3058
3545
|
exports.buttonTypography = buttonTypography;
|
|
3059
3546
|
exports.colors = colors;
|
|
3547
|
+
exports.counterTypography = counterTypography;
|
|
3060
3548
|
exports.datePickerTypography = datePickerTypography;
|
|
3061
3549
|
exports.fonts = fonts;
|
|
3062
3550
|
exports.getIconsByGroup = getIconsByGroup;
|
|
@@ -3066,7 +3554,9 @@ exports.iconGroups = iconGroups;
|
|
|
3066
3554
|
exports.iconNames = iconNames;
|
|
3067
3555
|
exports.icons = icons;
|
|
3068
3556
|
exports.inputTypography = inputTypography;
|
|
3557
|
+
exports.segmentedToggleTypography = segmentedToggleTypography;
|
|
3069
3558
|
exports.selectTypography = selectTypography;
|
|
3559
|
+
exports.statCardTypography = statCardTypography;
|
|
3070
3560
|
exports.textareaTypography = textareaTypography;
|
|
3071
3561
|
//# sourceMappingURL=index.cjs.map
|
|
3072
3562
|
//# sourceMappingURL=index.cjs.map
|