@ecohouse/ui 0.1.5 → 0.1.7
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 +946 -102
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +349 -157
- package/dist/index.d.ts +349 -157
- package/dist/index.js +930 -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/CommentCard/CommentCard.stories.tsx +31 -0
- package/src/components/CommentCard/CommentCard.tsx +209 -0
- package/src/components/CommentCard/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/RatingInput/RatingInput.stories.tsx +41 -0
- package/src/components/RatingInput/RatingInput.tsx +168 -0
- package/src/components/RatingInput/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 +18 -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/Star/StarIcon.tsx +35 -0
- package/src/icons/Star/StarIcon.web.tsx +41 -0
- package/src/icons/Star/index.ts +2 -0
- package/src/icons/Star/starPath.ts +3 -0
- package/src/icons/StarFilled/StarFilledIcon.tsx +28 -0
- package/src/icons/StarFilled/StarFilledIcon.web.tsx +34 -0
- package/src/icons/StarFilled/index.ts +1 -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 +7 -0
- package/src/icons/registry.ts +18 -2
- package/src/index.ts +34 -1
- package/src/theme/colors.test.ts +6 -0
- package/src/theme/colors.ts +6 -0
- package/src/theme/index.ts +6 -0
- package/src/theme/typography.ts +77 -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,71 @@ 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
|
+
};
|
|
117
|
+
var ratingTypography = {
|
|
118
|
+
fontFamily: fonts.sans,
|
|
119
|
+
fontSize: 32,
|
|
120
|
+
fontWeight: "700",
|
|
121
|
+
lineHeight: 35.84,
|
|
122
|
+
letterSpacing: 0
|
|
123
|
+
};
|
|
124
|
+
var commentCardTypography = {
|
|
125
|
+
name: {
|
|
126
|
+
fontFamily: fonts.sans,
|
|
127
|
+
fontSize: 16,
|
|
128
|
+
fontWeight: "600",
|
|
129
|
+
lineHeight: 18,
|
|
130
|
+
letterSpacing: 0
|
|
131
|
+
},
|
|
132
|
+
date: {
|
|
133
|
+
fontFamily: fonts.sans,
|
|
134
|
+
fontSize: 14,
|
|
135
|
+
fontWeight: "400",
|
|
136
|
+
lineHeight: 16,
|
|
137
|
+
letterSpacing: 0
|
|
138
|
+
},
|
|
139
|
+
comment: {
|
|
140
|
+
fontFamily: fonts.sans,
|
|
141
|
+
fontSize: 14,
|
|
142
|
+
fontWeight: "400",
|
|
143
|
+
lineHeight: 19,
|
|
144
|
+
letterSpacing: 0
|
|
145
|
+
},
|
|
146
|
+
action: {
|
|
147
|
+
fontFamily: fonts.sans,
|
|
148
|
+
fontSize: 12,
|
|
149
|
+
fontWeight: "700",
|
|
150
|
+
lineHeight: 12,
|
|
151
|
+
letterSpacing: 0
|
|
152
|
+
}
|
|
153
|
+
};
|
|
83
154
|
var inputTypography = {
|
|
84
155
|
label: {
|
|
85
156
|
fontFamily: fonts.sans,
|
|
@@ -527,6 +598,21 @@ function MailIcon({ size = 20, color = colors.primary, strokeWidth = 2 }) {
|
|
|
527
598
|
) });
|
|
528
599
|
}
|
|
529
600
|
|
|
601
|
+
// src/icons/Minus/minusPath.ts
|
|
602
|
+
var MINUS_PATH = "M3.33337 8H12.6667";
|
|
603
|
+
function MinusIcon({ size = 16, color = colors.white, strokeWidth = 2 }) {
|
|
604
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Svg__default.default, { width: size, height: size, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
605
|
+
Svg.Path,
|
|
606
|
+
{
|
|
607
|
+
d: MINUS_PATH,
|
|
608
|
+
stroke: color,
|
|
609
|
+
strokeWidth,
|
|
610
|
+
strokeLinecap: "round",
|
|
611
|
+
strokeLinejoin: "round"
|
|
612
|
+
}
|
|
613
|
+
) });
|
|
614
|
+
}
|
|
615
|
+
|
|
530
616
|
// src/icons/Navigate/navigatePath.ts
|
|
531
617
|
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
618
|
function NavigateIcon({ size = 20, color = colors.primary, strokeWidth = 2 }) {
|
|
@@ -557,6 +643,21 @@ function PhoneIcon({ size = 20, color = colors.primary, strokeWidth = 2 }) {
|
|
|
557
643
|
) });
|
|
558
644
|
}
|
|
559
645
|
|
|
646
|
+
// src/icons/Plus/plusPath.ts
|
|
647
|
+
var PLUS_PATH = "M8.00004 3.33325V12.6666M3.33337 7.99992H12.6667";
|
|
648
|
+
function PlusIcon({ size = 16, color = colors.white, strokeWidth = 2 }) {
|
|
649
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Svg__default.default, { width: size, height: size, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
650
|
+
Svg.Path,
|
|
651
|
+
{
|
|
652
|
+
d: PLUS_PATH,
|
|
653
|
+
stroke: color,
|
|
654
|
+
strokeWidth,
|
|
655
|
+
strokeLinecap: "round",
|
|
656
|
+
strokeLinejoin: "round"
|
|
657
|
+
}
|
|
658
|
+
) });
|
|
659
|
+
}
|
|
660
|
+
|
|
560
661
|
// src/icons/Search/searchPath.ts
|
|
561
662
|
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
663
|
var SEARCH_HANDLE_PATH = "M17.5 17.5L13.875 13.875";
|
|
@@ -632,6 +733,62 @@ function ShowIcon({ size = 20, color = colors.primary, strokeWidth = 2 }) {
|
|
|
632
733
|
] });
|
|
633
734
|
}
|
|
634
735
|
|
|
736
|
+
// src/icons/Sidebar/sidebarPath.ts
|
|
737
|
+
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";
|
|
738
|
+
function SidebarIcon({ size = 20, color = colors.primary, strokeWidth = 2 }) {
|
|
739
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Svg__default.default, { width: size, height: size, viewBox: "0 0 20 20", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
740
|
+
Svg.Path,
|
|
741
|
+
{
|
|
742
|
+
d: SIDEBAR_PATH,
|
|
743
|
+
stroke: color,
|
|
744
|
+
strokeWidth,
|
|
745
|
+
strokeLinecap: "round",
|
|
746
|
+
strokeLinejoin: "round"
|
|
747
|
+
}
|
|
748
|
+
) });
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
// src/icons/Star/starPath.ts
|
|
752
|
+
var STAR_PATH = "M12.6112 2.09824C12.9186 1.47565 13.0722 1.16436 13.2808 1.0649C13.4623 0.978367 13.6732 0.978367 13.8546 1.0649C14.0632 1.16436 14.2169 1.47565 14.5242 2.09824L17.4398 8.00486C17.5305 8.18866 17.5759 8.28056 17.6422 8.35192C17.7009 8.41509 17.7713 8.46628 17.8495 8.50264C17.9378 8.54371 18.0392 8.55854 18.242 8.58818L24.7637 9.54142C25.4505 9.6418 25.7938 9.69199 25.9528 9.85973C26.091 10.0057 26.156 10.2062 26.1297 10.4055C26.0995 10.6346 25.8509 10.8767 25.3537 11.361L20.6363 15.9557C20.4893 16.0989 20.4157 16.1706 20.3683 16.2558C20.3263 16.3312 20.2993 16.4141 20.2889 16.4998C20.2772 16.5966 20.2945 16.6978 20.3292 16.9001L21.4423 23.39C21.5597 24.0745 21.6184 24.4167 21.5081 24.6198C21.4121 24.7965 21.2415 24.9205 21.0438 24.9571C20.8165 24.9992 20.5092 24.8376 19.8945 24.5144L14.0642 21.4483C13.8826 21.3527 13.7917 21.305 13.696 21.2862C13.6113 21.2696 13.5242 21.2696 13.4394 21.2862C13.3437 21.305 13.2529 21.3527 13.0713 21.4483L7.24094 24.5144C6.62626 24.8376 6.31892 24.9992 6.09167 24.9571C5.89395 24.9205 5.72334 24.7965 5.62736 24.6198C5.51704 24.4167 5.57574 24.0745 5.69314 23.39L6.80622 16.9001C6.84092 16.6978 6.85828 16.5966 6.84653 16.4998C6.83614 16.4141 6.80919 16.3312 6.76718 16.2558C6.71974 16.1706 6.64621 16.0989 6.49916 15.9557L1.78179 11.361C1.28459 10.8767 1.03599 10.6346 1.00574 10.4055C0.979423 10.2062 1.04445 10.0057 1.18271 9.85973C1.34162 9.69199 1.685 9.6418 2.37177 9.54142L8.89346 8.58818C9.09627 8.55854 9.19768 8.54371 9.286 8.50264C9.36419 8.46628 9.43459 8.41509 9.49329 8.35192C9.55958 8.28056 9.60495 8.18866 9.69567 8.00486L12.6112 2.09824Z";
|
|
753
|
+
function StarIcon({
|
|
754
|
+
active = false,
|
|
755
|
+
size = 28,
|
|
756
|
+
height,
|
|
757
|
+
color,
|
|
758
|
+
strokeWidth = 2
|
|
759
|
+
}) {
|
|
760
|
+
const resolvedColor = color ?? (active ? "#E38E5E" : colors.grey150);
|
|
761
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Svg__default.default, { width: size, height: height ?? size * 26 / 28, viewBox: "0 0 28 26", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
762
|
+
Svg.Path,
|
|
763
|
+
{
|
|
764
|
+
d: STAR_PATH,
|
|
765
|
+
fill: active ? resolvedColor : "none",
|
|
766
|
+
stroke: resolvedColor,
|
|
767
|
+
strokeWidth,
|
|
768
|
+
strokeLinecap: "round",
|
|
769
|
+
strokeLinejoin: "round"
|
|
770
|
+
}
|
|
771
|
+
) });
|
|
772
|
+
}
|
|
773
|
+
function StarFilledIcon({
|
|
774
|
+
size = 28,
|
|
775
|
+
height,
|
|
776
|
+
color = "#E38E5E",
|
|
777
|
+
strokeWidth = 2
|
|
778
|
+
}) {
|
|
779
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Svg__default.default, { width: size, height: height ?? size * 26 / 28, viewBox: "0 0 28 26", fill: color, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
780
|
+
Svg.Path,
|
|
781
|
+
{
|
|
782
|
+
d: STAR_PATH,
|
|
783
|
+
fill: color,
|
|
784
|
+
stroke: color,
|
|
785
|
+
strokeWidth,
|
|
786
|
+
strokeLinecap: "round",
|
|
787
|
+
strokeLinejoin: "round"
|
|
788
|
+
}
|
|
789
|
+
) });
|
|
790
|
+
}
|
|
791
|
+
|
|
635
792
|
// src/icons/User/userPath.ts
|
|
636
793
|
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
794
|
function UserIcon({ size = 20, color = colors.primary, strokeWidth = 2 }) {
|
|
@@ -647,6 +804,12 @@ function UserIcon({ size = 20, color = colors.primary, strokeWidth = 2 }) {
|
|
|
647
804
|
) });
|
|
648
805
|
}
|
|
649
806
|
|
|
807
|
+
// src/icons/UsersAlt/usersAltPath.ts
|
|
808
|
+
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";
|
|
809
|
+
function UsersAltIcon({ size = 28, color = colors.white }) {
|
|
810
|
+
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 }) });
|
|
811
|
+
}
|
|
812
|
+
|
|
650
813
|
// src/icons/Video/videoPath.ts
|
|
651
814
|
var VIDEO_PATHS = [
|
|
652
815
|
"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 +853,18 @@ var icons = {
|
|
|
690
853
|
linkedin: LinkedInIcon,
|
|
691
854
|
logOut: LogOutIcon,
|
|
692
855
|
mail: MailIcon,
|
|
856
|
+
minus: MinusIcon,
|
|
693
857
|
navigate: NavigateIcon,
|
|
694
858
|
phone: PhoneIcon,
|
|
859
|
+
plus: PlusIcon,
|
|
695
860
|
search: SearchIcon,
|
|
696
861
|
settings: SettingsIcon,
|
|
697
862
|
show: ShowIcon,
|
|
863
|
+
sidebar: SidebarIcon,
|
|
864
|
+
star: StarIcon,
|
|
865
|
+
starFilled: StarFilledIcon,
|
|
698
866
|
user: UserIcon,
|
|
867
|
+
usersAlt: UsersAltIcon,
|
|
699
868
|
video: VideoIcon
|
|
700
869
|
};
|
|
701
870
|
var iconNames = Object.keys(icons);
|
|
@@ -711,12 +880,16 @@ var iconGroups = {
|
|
|
711
880
|
"search",
|
|
712
881
|
"calendar",
|
|
713
882
|
"calendarOutline",
|
|
714
|
-
"heart"
|
|
883
|
+
"heart",
|
|
884
|
+
"star",
|
|
885
|
+
"starFilled",
|
|
886
|
+
"minus",
|
|
887
|
+
"plus"
|
|
715
888
|
],
|
|
716
|
-
objects: ["bag", "building", "clock", "user", "video"],
|
|
889
|
+
objects: ["bag", "building", "clock", "user", "usersAlt", "video"],
|
|
717
890
|
communication: ["mail", "phone"],
|
|
718
891
|
social: ["facebook", "instagram", "linkedin"],
|
|
719
|
-
interface: ["layoutGrid", "settings", "helpCircle", "logOut"]
|
|
892
|
+
interface: ["layoutGrid", "sidebar", "settings", "helpCircle", "logOut"]
|
|
720
893
|
};
|
|
721
894
|
var iconGroupNames = Object.keys(iconGroups);
|
|
722
895
|
function getIconsByGroup(group) {
|
|
@@ -1093,7 +1266,394 @@ var styles2 = reactNative.StyleSheet.create({
|
|
|
1093
1266
|
})
|
|
1094
1267
|
}
|
|
1095
1268
|
});
|
|
1269
|
+
var ICON_SIZE2 = 20;
|
|
1270
|
+
var webBlurStyle = reactNative.Platform.OS === "web" ? {
|
|
1271
|
+
backdropFilter: "blur(10.3px)",
|
|
1272
|
+
WebkitBackdropFilter: "blur(10.3px)"
|
|
1273
|
+
} : {};
|
|
1096
1274
|
var variantConfig = {
|
|
1275
|
+
default: {
|
|
1276
|
+
backgroundColor: colors.grey750,
|
|
1277
|
+
iconColor: colors.white,
|
|
1278
|
+
border: false,
|
|
1279
|
+
blur: false
|
|
1280
|
+
},
|
|
1281
|
+
transparent: {
|
|
1282
|
+
backgroundColor: colors.whiteAlpha5,
|
|
1283
|
+
iconColor: colors.primary,
|
|
1284
|
+
border: true,
|
|
1285
|
+
blur: true
|
|
1286
|
+
}
|
|
1287
|
+
};
|
|
1288
|
+
var Badge = react.forwardRef(function Badge2({ label, variant = "default", icon: Icon2, style, className, accessibilityLabel, ...rest }, forwardedRef) {
|
|
1289
|
+
const containerRef = react.useRef(null);
|
|
1290
|
+
const preset = variantConfig[variant];
|
|
1291
|
+
const resolvedClassName = className?.trim() || void 0;
|
|
1292
|
+
const setContainerRef = react.useMemo(() => mergeRefs(containerRef, forwardedRef), [forwardedRef]);
|
|
1293
|
+
useApplyWebClassName(containerRef, resolvedClassName);
|
|
1294
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1295
|
+
reactNative.View,
|
|
1296
|
+
{
|
|
1297
|
+
...rest,
|
|
1298
|
+
ref: setContainerRef,
|
|
1299
|
+
style: [
|
|
1300
|
+
styles3.base,
|
|
1301
|
+
{ backgroundColor: preset.backgroundColor },
|
|
1302
|
+
preset.border ? styles3.transparentBorder : null,
|
|
1303
|
+
preset.blur ? webBlurStyle : null,
|
|
1304
|
+
style
|
|
1305
|
+
],
|
|
1306
|
+
accessibilityRole: "text",
|
|
1307
|
+
accessibilityLabel: accessibilityLabel ?? label,
|
|
1308
|
+
children: [
|
|
1309
|
+
Icon2 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles3.iconSlot, children: /* @__PURE__ */ jsxRuntime.jsx(Icon2, { size: ICON_SIZE2, color: preset.iconColor }) }) : null,
|
|
1310
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles3.label, reactNative.Platform.OS === "android" ? styles3.labelAndroid : null], children: label })
|
|
1311
|
+
]
|
|
1312
|
+
}
|
|
1313
|
+
);
|
|
1314
|
+
});
|
|
1315
|
+
var styles3 = reactNative.StyleSheet.create({
|
|
1316
|
+
base: {
|
|
1317
|
+
flexDirection: "row",
|
|
1318
|
+
alignItems: "center",
|
|
1319
|
+
alignSelf: "flex-start",
|
|
1320
|
+
minHeight: 44,
|
|
1321
|
+
paddingVertical: 12,
|
|
1322
|
+
paddingHorizontal: 16,
|
|
1323
|
+
gap: 12,
|
|
1324
|
+
borderRadius: 79,
|
|
1325
|
+
overflow: "hidden",
|
|
1326
|
+
borderWidth: 0,
|
|
1327
|
+
borderColor: "transparent",
|
|
1328
|
+
borderStyle: "solid"
|
|
1329
|
+
},
|
|
1330
|
+
transparentBorder: {
|
|
1331
|
+
borderWidth: 1,
|
|
1332
|
+
borderColor: colors.whiteAlpha5,
|
|
1333
|
+
borderStyle: "solid"
|
|
1334
|
+
},
|
|
1335
|
+
iconSlot: {
|
|
1336
|
+
width: ICON_SIZE2,
|
|
1337
|
+
height: ICON_SIZE2,
|
|
1338
|
+
alignItems: "center",
|
|
1339
|
+
justifyContent: "center",
|
|
1340
|
+
flexShrink: 0
|
|
1341
|
+
},
|
|
1342
|
+
label: {
|
|
1343
|
+
...badgeTypography,
|
|
1344
|
+
color: colors.white
|
|
1345
|
+
},
|
|
1346
|
+
labelAndroid: {
|
|
1347
|
+
includeFontPadding: false
|
|
1348
|
+
}
|
|
1349
|
+
});
|
|
1350
|
+
var BUTTON_SIZE = 32;
|
|
1351
|
+
var webBlurStyle2 = reactNative.Platform.OS === "web" ? {
|
|
1352
|
+
backdropFilter: "blur(20px)",
|
|
1353
|
+
WebkitBackdropFilter: "blur(20px)"
|
|
1354
|
+
} : {};
|
|
1355
|
+
function clamp(value, min, max) {
|
|
1356
|
+
return Math.max(min, max === void 0 ? value : Math.min(value, max));
|
|
1357
|
+
}
|
|
1358
|
+
var Counter = react.forwardRef(function Counter2({
|
|
1359
|
+
value,
|
|
1360
|
+
defaultValue,
|
|
1361
|
+
onValueChange,
|
|
1362
|
+
min = 1,
|
|
1363
|
+
max,
|
|
1364
|
+
step = 1,
|
|
1365
|
+
disabled = false,
|
|
1366
|
+
style,
|
|
1367
|
+
className,
|
|
1368
|
+
hitSlop,
|
|
1369
|
+
...rest
|
|
1370
|
+
}, forwardedRef) {
|
|
1371
|
+
const containerRef = react.useRef(null);
|
|
1372
|
+
const isControlled = value !== void 0;
|
|
1373
|
+
const [uncontrolledValue, setUncontrolledValue] = react.useState(
|
|
1374
|
+
() => clamp(defaultValue ?? min, min, max)
|
|
1375
|
+
);
|
|
1376
|
+
const resolvedValue = clamp(isControlled ? value : uncontrolledValue, min, max);
|
|
1377
|
+
const resolvedClassName = className?.trim() || void 0;
|
|
1378
|
+
const setContainerRef = react.useMemo(() => mergeRefs(containerRef, forwardedRef), [forwardedRef]);
|
|
1379
|
+
const decrementDisabled = disabled || resolvedValue <= min;
|
|
1380
|
+
const incrementDisabled = disabled || max !== void 0 && resolvedValue >= max;
|
|
1381
|
+
useApplyWebClassName(containerRef, resolvedClassName);
|
|
1382
|
+
const updateValue = (nextValue) => {
|
|
1383
|
+
const next = clamp(nextValue, min, max);
|
|
1384
|
+
if (next === resolvedValue) return;
|
|
1385
|
+
if (!isControlled) setUncontrolledValue(next);
|
|
1386
|
+
onValueChange?.(next);
|
|
1387
|
+
};
|
|
1388
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { ...rest, ref: setContainerRef, style: [styles4.base, style], children: [
|
|
1389
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1390
|
+
reactNative.Pressable,
|
|
1391
|
+
{
|
|
1392
|
+
disabled: decrementDisabled,
|
|
1393
|
+
hitSlop,
|
|
1394
|
+
onPress: () => updateValue(resolvedValue - step),
|
|
1395
|
+
accessibilityRole: "button",
|
|
1396
|
+
accessibilityLabel: "Decrease value",
|
|
1397
|
+
accessibilityState: { disabled: decrementDisabled },
|
|
1398
|
+
style: [styles4.button, webBlurStyle2, decrementDisabled && styles4.buttonDisabled],
|
|
1399
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(MinusIcon, {})
|
|
1400
|
+
}
|
|
1401
|
+
),
|
|
1402
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles4.value, children: resolvedValue }),
|
|
1403
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1404
|
+
reactNative.Pressable,
|
|
1405
|
+
{
|
|
1406
|
+
disabled: incrementDisabled,
|
|
1407
|
+
hitSlop,
|
|
1408
|
+
onPress: () => updateValue(resolvedValue + step),
|
|
1409
|
+
accessibilityRole: "button",
|
|
1410
|
+
accessibilityLabel: "Increase value",
|
|
1411
|
+
accessibilityState: { disabled: incrementDisabled },
|
|
1412
|
+
style: [styles4.button, webBlurStyle2, incrementDisabled && styles4.buttonDisabled],
|
|
1413
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(PlusIcon, {})
|
|
1414
|
+
}
|
|
1415
|
+
)
|
|
1416
|
+
] });
|
|
1417
|
+
});
|
|
1418
|
+
var styles4 = reactNative.StyleSheet.create({
|
|
1419
|
+
base: {
|
|
1420
|
+
flexDirection: "row",
|
|
1421
|
+
alignItems: "center",
|
|
1422
|
+
alignSelf: "flex-start",
|
|
1423
|
+
gap: 17
|
|
1424
|
+
},
|
|
1425
|
+
button: {
|
|
1426
|
+
width: BUTTON_SIZE,
|
|
1427
|
+
height: BUTTON_SIZE,
|
|
1428
|
+
alignItems: "center",
|
|
1429
|
+
justifyContent: "center",
|
|
1430
|
+
borderWidth: 1,
|
|
1431
|
+
borderColor: colors.whiteAlpha10,
|
|
1432
|
+
borderRadius: 39
|
|
1433
|
+
},
|
|
1434
|
+
buttonDisabled: {
|
|
1435
|
+
opacity: 0.25
|
|
1436
|
+
},
|
|
1437
|
+
value: {
|
|
1438
|
+
...counterTypography,
|
|
1439
|
+
color: colors.white
|
|
1440
|
+
}
|
|
1441
|
+
});
|
|
1442
|
+
var ICON_SIZE3 = 20;
|
|
1443
|
+
var ANIMATION_DURATION = 200;
|
|
1444
|
+
var SegmentedToggle = react.forwardRef(
|
|
1445
|
+
function SegmentedToggle2({
|
|
1446
|
+
options,
|
|
1447
|
+
value,
|
|
1448
|
+
defaultValue = options[0].value,
|
|
1449
|
+
onValueChange,
|
|
1450
|
+
fullWidth = true,
|
|
1451
|
+
disabled = false,
|
|
1452
|
+
style,
|
|
1453
|
+
className,
|
|
1454
|
+
hitSlop,
|
|
1455
|
+
onLayout,
|
|
1456
|
+
...rest
|
|
1457
|
+
}, forwardedRef) {
|
|
1458
|
+
const containerRef = react.useRef(null);
|
|
1459
|
+
const isControlled = value !== void 0;
|
|
1460
|
+
const [uncontrolledValue, setUncontrolledValue] = react.useState(defaultValue);
|
|
1461
|
+
const selectedValue = isControlled ? value : uncontrolledValue;
|
|
1462
|
+
const selectedIndex = Math.max(
|
|
1463
|
+
0,
|
|
1464
|
+
options.findIndex(({ value: optionValue }) => optionValue === selectedValue)
|
|
1465
|
+
);
|
|
1466
|
+
const resolvedClassName = className?.trim() || void 0;
|
|
1467
|
+
const setContainerRef = react.useMemo(() => mergeRefs(containerRef, forwardedRef), [forwardedRef]);
|
|
1468
|
+
const progress = react.useRef(new reactNative.Animated.Value(selectedIndex)).current;
|
|
1469
|
+
const [contentWidths, setContentWidths] = react.useState([0, 0]);
|
|
1470
|
+
const [containerWidth, setContainerWidth] = react.useState(0);
|
|
1471
|
+
const availableOptionWidth = Math.max(0, (containerWidth - 12) / 2);
|
|
1472
|
+
const widestContentWidth = Math.max(...contentWidths);
|
|
1473
|
+
const contentBasedOptionWidth = widestContentWidth > 0 ? widestContentWidth + 24 * 2 : 0;
|
|
1474
|
+
const optionWidth = fullWidth ? availableOptionWidth : contentBasedOptionWidth;
|
|
1475
|
+
const indicatorTranslateX = progress.interpolate({
|
|
1476
|
+
inputRange: [0, 1],
|
|
1477
|
+
outputRange: [0, optionWidth + 4]
|
|
1478
|
+
});
|
|
1479
|
+
useApplyWebClassName(containerRef, resolvedClassName);
|
|
1480
|
+
react.useEffect(() => {
|
|
1481
|
+
const animation = reactNative.Animated.timing(progress, {
|
|
1482
|
+
toValue: selectedIndex,
|
|
1483
|
+
duration: ANIMATION_DURATION,
|
|
1484
|
+
easing: reactNative.Easing.out(reactNative.Easing.cubic),
|
|
1485
|
+
useNativeDriver: true
|
|
1486
|
+
});
|
|
1487
|
+
animation.start();
|
|
1488
|
+
return () => animation.stop();
|
|
1489
|
+
}, [progress, selectedIndex]);
|
|
1490
|
+
const selectOption = (nextValue) => {
|
|
1491
|
+
if (disabled || nextValue === selectedValue) return;
|
|
1492
|
+
if (!isControlled) setUncontrolledValue(nextValue);
|
|
1493
|
+
onValueChange?.(nextValue);
|
|
1494
|
+
};
|
|
1495
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1496
|
+
reactNative.View,
|
|
1497
|
+
{
|
|
1498
|
+
...rest,
|
|
1499
|
+
ref: setContainerRef,
|
|
1500
|
+
onLayout: (event) => {
|
|
1501
|
+
const nextWidth = event.nativeEvent.layout.width;
|
|
1502
|
+
setContainerWidth(
|
|
1503
|
+
(currentWidth) => currentWidth === nextWidth ? currentWidth : nextWidth
|
|
1504
|
+
);
|
|
1505
|
+
onLayout?.(event);
|
|
1506
|
+
},
|
|
1507
|
+
style: [
|
|
1508
|
+
styles5.base,
|
|
1509
|
+
fullWidth ? styles5.fullWidth : styles5.contentWidth,
|
|
1510
|
+
disabled && styles5.disabled,
|
|
1511
|
+
style
|
|
1512
|
+
],
|
|
1513
|
+
accessibilityRole: "radiogroup",
|
|
1514
|
+
children: [
|
|
1515
|
+
optionWidth > 0 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1516
|
+
reactNative.Animated.View,
|
|
1517
|
+
{
|
|
1518
|
+
pointerEvents: "none",
|
|
1519
|
+
style: [
|
|
1520
|
+
styles5.activeIndicator,
|
|
1521
|
+
{ width: optionWidth, transform: [{ translateX: indicatorTranslateX }] }
|
|
1522
|
+
]
|
|
1523
|
+
}
|
|
1524
|
+
) : null,
|
|
1525
|
+
options.map(({ value: optionValue, label, icon: Icon2 }, index) => {
|
|
1526
|
+
const selected = optionValue === selectedValue;
|
|
1527
|
+
const iconColor = selected ? colors.primary : colors.whiteAlpha20;
|
|
1528
|
+
const labelColor = selected ? colors.whiteAlpha86 : colors.whiteAlpha40;
|
|
1529
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1530
|
+
reactNative.Pressable,
|
|
1531
|
+
{
|
|
1532
|
+
onPress: () => selectOption(optionValue),
|
|
1533
|
+
disabled,
|
|
1534
|
+
hitSlop,
|
|
1535
|
+
accessibilityRole: "radio",
|
|
1536
|
+
accessibilityLabel: label,
|
|
1537
|
+
accessibilityState: { selected, disabled },
|
|
1538
|
+
style: [
|
|
1539
|
+
styles5.option,
|
|
1540
|
+
fullWidth ? styles5.optionFullWidth : optionWidth > 0 && { minWidth: optionWidth }
|
|
1541
|
+
],
|
|
1542
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1543
|
+
reactNative.View,
|
|
1544
|
+
{
|
|
1545
|
+
onLayout: (event) => {
|
|
1546
|
+
const nextWidth = event.nativeEvent.layout.width;
|
|
1547
|
+
setContentWidths((currentWidths) => {
|
|
1548
|
+
if (currentWidths[index] === nextWidth) return currentWidths;
|
|
1549
|
+
const nextWidths = [currentWidths[0], currentWidths[1]];
|
|
1550
|
+
nextWidths[index] = nextWidth;
|
|
1551
|
+
return nextWidths;
|
|
1552
|
+
});
|
|
1553
|
+
},
|
|
1554
|
+
style: styles5.optionContent,
|
|
1555
|
+
children: [
|
|
1556
|
+
Icon2 ? /* @__PURE__ */ jsxRuntime.jsx(Icon2, { size: ICON_SIZE3, color: iconColor }) : null,
|
|
1557
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style: [styles5.label, { color: labelColor }], children: label })
|
|
1558
|
+
]
|
|
1559
|
+
}
|
|
1560
|
+
)
|
|
1561
|
+
},
|
|
1562
|
+
optionValue
|
|
1563
|
+
);
|
|
1564
|
+
})
|
|
1565
|
+
]
|
|
1566
|
+
}
|
|
1567
|
+
);
|
|
1568
|
+
}
|
|
1569
|
+
);
|
|
1570
|
+
var styles5 = reactNative.StyleSheet.create({
|
|
1571
|
+
base: {
|
|
1572
|
+
height: 44,
|
|
1573
|
+
flexDirection: "row",
|
|
1574
|
+
padding: 4,
|
|
1575
|
+
gap: 4,
|
|
1576
|
+
borderRadius: 60,
|
|
1577
|
+
backgroundColor: colors.grey700,
|
|
1578
|
+
overflow: "hidden"
|
|
1579
|
+
},
|
|
1580
|
+
fullWidth: {
|
|
1581
|
+
width: "100%",
|
|
1582
|
+
alignSelf: "stretch"
|
|
1583
|
+
},
|
|
1584
|
+
contentWidth: {
|
|
1585
|
+
alignSelf: "flex-start"
|
|
1586
|
+
},
|
|
1587
|
+
disabled: {
|
|
1588
|
+
opacity: 0.6
|
|
1589
|
+
},
|
|
1590
|
+
option: {
|
|
1591
|
+
zIndex: 1,
|
|
1592
|
+
flexDirection: "row",
|
|
1593
|
+
alignItems: "center",
|
|
1594
|
+
justifyContent: "center",
|
|
1595
|
+
paddingHorizontal: 24,
|
|
1596
|
+
borderRadius: 60
|
|
1597
|
+
},
|
|
1598
|
+
optionContent: {
|
|
1599
|
+
maxWidth: "100%",
|
|
1600
|
+
flexDirection: "row",
|
|
1601
|
+
alignItems: "center",
|
|
1602
|
+
gap: 12
|
|
1603
|
+
},
|
|
1604
|
+
optionFullWidth: {
|
|
1605
|
+
flex: 1,
|
|
1606
|
+
minWidth: 0
|
|
1607
|
+
},
|
|
1608
|
+
activeIndicator: {
|
|
1609
|
+
position: "absolute",
|
|
1610
|
+
top: 4,
|
|
1611
|
+
left: 4,
|
|
1612
|
+
height: 36,
|
|
1613
|
+
backgroundColor: colors.grey600,
|
|
1614
|
+
borderRadius: 60
|
|
1615
|
+
},
|
|
1616
|
+
label: {
|
|
1617
|
+
...segmentedToggleTypography,
|
|
1618
|
+
flexShrink: 1
|
|
1619
|
+
}
|
|
1620
|
+
});
|
|
1621
|
+
var ICON_SIZE4 = 28;
|
|
1622
|
+
var StatCard = react.forwardRef(function StatCard2({ label, icon: Icon2, style, className, accessibilityLabel, ...rest }, forwardedRef) {
|
|
1623
|
+
const containerRef = react.useRef(null);
|
|
1624
|
+
const resolvedClassName = className?.trim() || void 0;
|
|
1625
|
+
const setContainerRef = react.useMemo(() => mergeRefs(containerRef, forwardedRef), [forwardedRef]);
|
|
1626
|
+
useApplyWebClassName(containerRef, resolvedClassName);
|
|
1627
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1628
|
+
reactNative.View,
|
|
1629
|
+
{
|
|
1630
|
+
...rest,
|
|
1631
|
+
ref: setContainerRef,
|
|
1632
|
+
style: [styles6.base, style],
|
|
1633
|
+
accessibilityRole: "text",
|
|
1634
|
+
accessibilityLabel: accessibilityLabel ?? label,
|
|
1635
|
+
children: [
|
|
1636
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon2, { size: ICON_SIZE4, color: colors.white }),
|
|
1637
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles6.label, children: label })
|
|
1638
|
+
]
|
|
1639
|
+
}
|
|
1640
|
+
);
|
|
1641
|
+
});
|
|
1642
|
+
var styles6 = reactNative.StyleSheet.create({
|
|
1643
|
+
base: {
|
|
1644
|
+
width: 204.5,
|
|
1645
|
+
minHeight: 114,
|
|
1646
|
+
padding: 24,
|
|
1647
|
+
gap: 16,
|
|
1648
|
+
borderRadius: 20,
|
|
1649
|
+
backgroundColor: colors.grey750
|
|
1650
|
+
},
|
|
1651
|
+
label: {
|
|
1652
|
+
...statCardTypography,
|
|
1653
|
+
color: colors.whiteAlpha86
|
|
1654
|
+
}
|
|
1655
|
+
});
|
|
1656
|
+
var variantConfig2 = {
|
|
1097
1657
|
primary: {
|
|
1098
1658
|
backgroundColor: colors.primary,
|
|
1099
1659
|
textColor: colors.white,
|
|
@@ -1152,7 +1712,7 @@ var Button = react.forwardRef(
|
|
|
1152
1712
|
}, forwardedRef) {
|
|
1153
1713
|
const containerRef = react.useRef(null);
|
|
1154
1714
|
const textRef = react.useRef(null);
|
|
1155
|
-
const preset =
|
|
1715
|
+
const preset = variantConfig2[variant];
|
|
1156
1716
|
const metrics = sizeConfig[size];
|
|
1157
1717
|
const label = typeof children !== "undefined" ? children : title;
|
|
1158
1718
|
const hasCustomChildren = typeof children !== "undefined";
|
|
@@ -1165,7 +1725,7 @@ var Button = react.forwardRef(
|
|
|
1165
1725
|
useApplyWebClassName(textRef, textClassName);
|
|
1166
1726
|
const iconNode = customIcon ?? /* @__PURE__ */ jsxRuntime.jsx(ArrowRightIcon, { size: metrics.iconSize, color: preset.iconColor });
|
|
1167
1727
|
const containerStyle = [
|
|
1168
|
-
|
|
1728
|
+
styles7.base,
|
|
1169
1729
|
{
|
|
1170
1730
|
minHeight: metrics.minHeight,
|
|
1171
1731
|
borderRadius: metrics.borderRadius,
|
|
@@ -1176,15 +1736,15 @@ var Button = react.forwardRef(
|
|
|
1176
1736
|
paddingRight: hasIcon ? metrics.paddingRightWithIcon : metrics.paddingRight,
|
|
1177
1737
|
gap: hasIcon ? metrics.gap : 0
|
|
1178
1738
|
},
|
|
1179
|
-
disabled &&
|
|
1739
|
+
disabled && styles7.disabled,
|
|
1180
1740
|
style
|
|
1181
1741
|
];
|
|
1182
1742
|
const labelStyle = [
|
|
1183
|
-
|
|
1743
|
+
styles7.label,
|
|
1184
1744
|
metrics.text,
|
|
1185
1745
|
{ color: preset.textColor },
|
|
1186
|
-
reactNative.Platform.OS === "android" ?
|
|
1187
|
-
!hasIcon &&
|
|
1746
|
+
reactNative.Platform.OS === "android" ? styles7.labelAndroid : null,
|
|
1747
|
+
!hasIcon && styles7.labelCentered,
|
|
1188
1748
|
textStyle
|
|
1189
1749
|
];
|
|
1190
1750
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -1205,7 +1765,7 @@ var Button = react.forwardRef(
|
|
|
1205
1765
|
reactNative.View,
|
|
1206
1766
|
{
|
|
1207
1767
|
style: [
|
|
1208
|
-
|
|
1768
|
+
styles7.iconContainer,
|
|
1209
1769
|
{
|
|
1210
1770
|
width: metrics.iconContainerSize,
|
|
1211
1771
|
height: metrics.iconContainerSize,
|
|
@@ -1221,7 +1781,7 @@ var Button = react.forwardRef(
|
|
|
1221
1781
|
);
|
|
1222
1782
|
}
|
|
1223
1783
|
);
|
|
1224
|
-
var
|
|
1784
|
+
var styles7 = reactNative.StyleSheet.create({
|
|
1225
1785
|
base: {
|
|
1226
1786
|
flexDirection: "row",
|
|
1227
1787
|
alignItems: "center",
|
|
@@ -1299,13 +1859,13 @@ var Checkbox = react.forwardRef(function Checkbox2({
|
|
|
1299
1859
|
accessibilityRole: "checkbox",
|
|
1300
1860
|
accessibilityLabel: resolvedAccessibilityLabel,
|
|
1301
1861
|
accessibilityState: { checked: isActive, disabled },
|
|
1302
|
-
style: [
|
|
1862
|
+
style: [styles8.root, disabled && styles8.disabled, style],
|
|
1303
1863
|
children: [
|
|
1304
1864
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1305
1865
|
reactNative.View,
|
|
1306
1866
|
{
|
|
1307
1867
|
style: [
|
|
1308
|
-
|
|
1868
|
+
styles8.box,
|
|
1309
1869
|
{
|
|
1310
1870
|
backgroundColor: chrome.backgroundColor,
|
|
1311
1871
|
borderColor: chrome.borderColor
|
|
@@ -1314,12 +1874,12 @@ var Checkbox = react.forwardRef(function Checkbox2({
|
|
|
1314
1874
|
children: isActive ? /* @__PURE__ */ jsxRuntime.jsx(CheckIcon, { size: CHECK_SIZE, color: colors.primary, strokeWidth: CHECK_STROKE }) : null
|
|
1315
1875
|
}
|
|
1316
1876
|
),
|
|
1317
|
-
labelContent != null && labelContent !== false ? typeof labelContent === "string" || typeof labelContent === "number" ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
1877
|
+
labelContent != null && labelContent !== false ? typeof labelContent === "string" || typeof labelContent === "number" ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles8.label, labelStyle], children: labelContent }) : labelContent : null
|
|
1318
1878
|
]
|
|
1319
1879
|
}
|
|
1320
1880
|
);
|
|
1321
1881
|
});
|
|
1322
|
-
var
|
|
1882
|
+
var styles8 = reactNative.StyleSheet.create({
|
|
1323
1883
|
root: {
|
|
1324
1884
|
flexDirection: "row",
|
|
1325
1885
|
alignItems: "center",
|
|
@@ -1417,7 +1977,7 @@ var DEFAULT_WIDTH = 380;
|
|
|
1417
1977
|
var TRIGGER_HEIGHT = 44;
|
|
1418
1978
|
var TRIGGER_RADIUS = 60;
|
|
1419
1979
|
var MENU_RADIUS2 = 20;
|
|
1420
|
-
var
|
|
1980
|
+
var ICON_SIZE5 = 20;
|
|
1421
1981
|
var NAV_ICON_SIZE = 20;
|
|
1422
1982
|
var DAY_CELL_HEIGHT = 44;
|
|
1423
1983
|
var DAY_CIRCLE_SIZE = 44;
|
|
@@ -1569,9 +2129,9 @@ var DatePicker = react.forwardRef(
|
|
|
1569
2129
|
{
|
|
1570
2130
|
...rest,
|
|
1571
2131
|
ref: setRootRef,
|
|
1572
|
-
style: [
|
|
2132
|
+
style: [styles9.root, isOpen && styles9.rootOpen, disabled && styles9.disabled, style],
|
|
1573
2133
|
accessibilityState: { disabled, expanded: isOpen },
|
|
1574
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [
|
|
2134
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles9.triggerWrap, isOpen && styles9.triggerWrapOpen], children: [
|
|
1575
2135
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1576
2136
|
reactNative.Pressable,
|
|
1577
2137
|
{
|
|
@@ -1582,17 +2142,17 @@ var DatePicker = react.forwardRef(
|
|
|
1582
2142
|
accessibilityLabel: resolvedAccessibilityLabel,
|
|
1583
2143
|
accessibilityState: { disabled, expanded: isOpen },
|
|
1584
2144
|
style: [
|
|
1585
|
-
|
|
2145
|
+
styles9.trigger,
|
|
1586
2146
|
{ borderColor: triggerBorderColor, backgroundColor: colors.grey700 }
|
|
1587
2147
|
],
|
|
1588
2148
|
children: [
|
|
1589
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
1590
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
2149
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles9.triggerText, { color: triggerTextColor }], numberOfLines: 1, children: triggerLabel }),
|
|
2150
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles9.iconSlot, children: /* @__PURE__ */ jsxRuntime.jsx(CalendarOutlineIcon, { size: ICON_SIZE5, color: colors.grey100 }) })
|
|
1591
2151
|
]
|
|
1592
2152
|
}
|
|
1593
2153
|
),
|
|
1594
|
-
isOpen ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
1595
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
2154
|
+
isOpen ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles9.menu, children: [
|
|
2155
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles9.calendarHeader, children: [
|
|
1596
2156
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1597
2157
|
reactNative.Pressable,
|
|
1598
2158
|
{
|
|
@@ -1600,11 +2160,11 @@ var DatePicker = react.forwardRef(
|
|
|
1600
2160
|
hitSlop: 8,
|
|
1601
2161
|
accessibilityRole: "button",
|
|
1602
2162
|
accessibilityLabel: "Previous month",
|
|
1603
|
-
style:
|
|
2163
|
+
style: styles9.navButton,
|
|
1604
2164
|
children: /* @__PURE__ */ jsxRuntime.jsx(ChevronLeftIcon, { size: NAV_ICON_SIZE, color: colors.white })
|
|
1605
2165
|
}
|
|
1606
2166
|
),
|
|
1607
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.Text, { style:
|
|
2167
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.Text, { style: styles9.monthHeading, children: [
|
|
1608
2168
|
monthNames[visibleMonth.getMonth()],
|
|
1609
2169
|
" ",
|
|
1610
2170
|
visibleMonth.getFullYear()
|
|
@@ -1616,13 +2176,13 @@ var DatePicker = react.forwardRef(
|
|
|
1616
2176
|
hitSlop: 8,
|
|
1617
2177
|
accessibilityRole: "button",
|
|
1618
2178
|
accessibilityLabel: "Next month",
|
|
1619
|
-
style:
|
|
1620
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
2179
|
+
style: styles9.navButton,
|
|
2180
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles9.navIconMirror, children: /* @__PURE__ */ jsxRuntime.jsx(ChevronLeftIcon, { size: NAV_ICON_SIZE, color: colors.white }) })
|
|
1621
2181
|
}
|
|
1622
2182
|
)
|
|
1623
2183
|
] }),
|
|
1624
2184
|
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { children: [
|
|
1625
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
2185
|
+
/* @__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
2186
|
weeks.map((week, weekIndex) => {
|
|
1627
2187
|
let rangeHighlightStyle = null;
|
|
1628
2188
|
if (isRange && rangeValue.start && rangeValue.end) {
|
|
@@ -1659,13 +2219,13 @@ var DatePicker = react.forwardRef(
|
|
|
1659
2219
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1660
2220
|
reactNative.View,
|
|
1661
2221
|
{
|
|
1662
|
-
style: [
|
|
2222
|
+
style: [styles9.weekRow, weekIndex > 0 && styles9.weekRowSpaced],
|
|
1663
2223
|
children: [
|
|
1664
2224
|
rangeHighlightStyle ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1665
2225
|
reactNative.View,
|
|
1666
2226
|
{
|
|
1667
2227
|
pointerEvents: "none",
|
|
1668
|
-
style: [
|
|
2228
|
+
style: [styles9.rangeHighlight, rangeHighlightStyle]
|
|
1669
2229
|
}
|
|
1670
2230
|
) : null,
|
|
1671
2231
|
week.map((day, dayIndex) => {
|
|
@@ -1688,7 +2248,7 @@ var DatePicker = react.forwardRef(
|
|
|
1688
2248
|
onHoverOut: () => setHoveredDayKey((current) => current === dayKey ? null : current),
|
|
1689
2249
|
onPressIn: () => setHoveredDayKey(dayKey),
|
|
1690
2250
|
onPressOut: () => setHoveredDayKey((current) => current === dayKey ? null : current),
|
|
1691
|
-
style:
|
|
2251
|
+
style: styles9.dayCellWrap,
|
|
1692
2252
|
accessibilityRole: "button",
|
|
1693
2253
|
accessibilityLabel: formatValue(day),
|
|
1694
2254
|
accessibilityState: {
|
|
@@ -1700,14 +2260,14 @@ var DatePicker = react.forwardRef(
|
|
|
1700
2260
|
reactNative.View,
|
|
1701
2261
|
{
|
|
1702
2262
|
style: [
|
|
1703
|
-
|
|
1704
|
-
isSelectedEndpoint &&
|
|
1705
|
-
isHovered &&
|
|
2263
|
+
styles9.dayCircle,
|
|
2264
|
+
isSelectedEndpoint && styles9.dayCircleSelected,
|
|
2265
|
+
isHovered && styles9.dayCircleHovered
|
|
1706
2266
|
],
|
|
1707
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
2267
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles9.dayText, { color: dayTextColor }], children: day.getDate() })
|
|
1708
2268
|
}
|
|
1709
2269
|
),
|
|
1710
|
-
isToday && !isSelectedEndpoint ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
2270
|
+
isToday && !isSelectedEndpoint ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles9.todayDot }) : null
|
|
1711
2271
|
]
|
|
1712
2272
|
},
|
|
1713
2273
|
dayIndex
|
|
@@ -1725,7 +2285,7 @@ var DatePicker = react.forwardRef(
|
|
|
1725
2285
|
);
|
|
1726
2286
|
}
|
|
1727
2287
|
);
|
|
1728
|
-
var
|
|
2288
|
+
var styles9 = reactNative.StyleSheet.create({
|
|
1729
2289
|
root: {
|
|
1730
2290
|
width: DEFAULT_WIDTH,
|
|
1731
2291
|
gap: 8,
|
|
@@ -1761,8 +2321,8 @@ var styles5 = reactNative.StyleSheet.create({
|
|
|
1761
2321
|
minWidth: 0
|
|
1762
2322
|
},
|
|
1763
2323
|
iconSlot: {
|
|
1764
|
-
width:
|
|
1765
|
-
height:
|
|
2324
|
+
width: ICON_SIZE5,
|
|
2325
|
+
height: ICON_SIZE5,
|
|
1766
2326
|
alignItems: "center",
|
|
1767
2327
|
justifyContent: "center",
|
|
1768
2328
|
flexShrink: 0
|
|
@@ -1985,13 +2545,13 @@ var Input = react.forwardRef(function Input2({
|
|
|
1985
2545
|
const rightIconNode = rightIcon ?? /* @__PURE__ */ jsxRuntime.jsx(ShowIcon, { size: metrics.iconSize, color: chrome.rightIconColor });
|
|
1986
2546
|
useApplyWebClassName(rootRef, className);
|
|
1987
2547
|
useApplyWebClassName(inputRef, inputClassName);
|
|
1988
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { ref: rootRef, style: [
|
|
1989
|
-
showLabel && label ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
2548
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { ref: rootRef, style: [styles10.root, disabled && styles10.disabled, style], children: [
|
|
2549
|
+
showLabel && label ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles10.label, { color: chrome.labelColor }], children: label }) : null,
|
|
1990
2550
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1991
2551
|
reactNative.View,
|
|
1992
2552
|
{
|
|
1993
2553
|
style: [
|
|
1994
|
-
|
|
2554
|
+
styles10.field,
|
|
1995
2555
|
{
|
|
1996
2556
|
height: metrics.height,
|
|
1997
2557
|
borderRadius: metrics.borderRadius,
|
|
@@ -2006,7 +2566,7 @@ var Input = react.forwardRef(function Input2({
|
|
|
2006
2566
|
fieldStyle
|
|
2007
2567
|
],
|
|
2008
2568
|
children: [
|
|
2009
|
-
hasLeftIcon ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [
|
|
2569
|
+
hasLeftIcon ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles10.iconSlot, { width: metrics.iconSize, height: metrics.iconSize }], children: leftIconNode }) : null,
|
|
2010
2570
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2011
2571
|
reactNative.TextInput,
|
|
2012
2572
|
{
|
|
@@ -2030,11 +2590,11 @@ var Input = react.forwardRef(function Input2({
|
|
|
2030
2590
|
onBlur?.(event);
|
|
2031
2591
|
},
|
|
2032
2592
|
style: [
|
|
2033
|
-
|
|
2593
|
+
styles10.input,
|
|
2034
2594
|
metrics.text,
|
|
2035
2595
|
{ color: chrome.textColor },
|
|
2036
|
-
reactNative.Platform.OS === "web" ?
|
|
2037
|
-
reactNative.Platform.OS === "android" ?
|
|
2596
|
+
reactNative.Platform.OS === "web" ? styles10.inputWeb : null,
|
|
2597
|
+
reactNative.Platform.OS === "android" ? styles10.inputAndroid : null,
|
|
2038
2598
|
inputStyle
|
|
2039
2599
|
],
|
|
2040
2600
|
accessibilityLabel: resolvedAccessibilityLabel,
|
|
@@ -2046,20 +2606,20 @@ var Input = react.forwardRef(function Input2({
|
|
|
2046
2606
|
{
|
|
2047
2607
|
onPress: onRightIconPress,
|
|
2048
2608
|
disabled,
|
|
2049
|
-
style: [
|
|
2609
|
+
style: [styles10.iconSlot, { width: metrics.iconSize, height: metrics.iconSize }],
|
|
2050
2610
|
accessibilityRole: "button",
|
|
2051
2611
|
accessibilityLabel: rightIconAccessibilityLabel,
|
|
2052
2612
|
hitSlop: 8,
|
|
2053
2613
|
children: rightIconNode
|
|
2054
2614
|
}
|
|
2055
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [
|
|
2615
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles10.iconSlot, { width: metrics.iconSize, height: metrics.iconSize }], children: rightIconNode }) : null
|
|
2056
2616
|
]
|
|
2057
2617
|
}
|
|
2058
2618
|
),
|
|
2059
|
-
showHint && hint ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
2619
|
+
showHint && hint ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles10.hint, { color: chrome.hintColor }], children: hint }) : null
|
|
2060
2620
|
] });
|
|
2061
2621
|
});
|
|
2062
|
-
var
|
|
2622
|
+
var styles10 = reactNative.StyleSheet.create({
|
|
2063
2623
|
root: {
|
|
2064
2624
|
width: DEFAULT_WIDTH2,
|
|
2065
2625
|
gap: 8,
|
|
@@ -2102,7 +2662,7 @@ var TRIGGER_RADIUS2 = 60;
|
|
|
2102
2662
|
var MENU_RADIUS3 = 24;
|
|
2103
2663
|
var MENU_MAX_LIST_HEIGHT = 248;
|
|
2104
2664
|
var ITEM_RADIUS2 = 12;
|
|
2105
|
-
var
|
|
2665
|
+
var ICON_SIZE6 = 20;
|
|
2106
2666
|
var CHIP_GAP = 6;
|
|
2107
2667
|
var FALLBACK_ELLIPSIS_WIDTH = 20;
|
|
2108
2668
|
function itemBackground(state) {
|
|
@@ -2175,25 +2735,25 @@ function MultiValueChips({ options, disabled, onRemove }) {
|
|
|
2175
2735
|
const next = Math.ceil(event.nativeEvent.layout.width);
|
|
2176
2736
|
setEllipsisWidth((current) => current === next ? current : next);
|
|
2177
2737
|
};
|
|
2178
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
2179
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { pointerEvents: "none", style:
|
|
2738
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles11.multiValueRoot, children: [
|
|
2739
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { pointerEvents: "none", style: styles11.measureRow, children: [
|
|
2180
2740
|
options.map((option) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2181
2741
|
reactNative.View,
|
|
2182
2742
|
{
|
|
2183
|
-
style:
|
|
2743
|
+
style: styles11.chip,
|
|
2184
2744
|
onLayout: (event) => handleChipLayout(option.value, event),
|
|
2185
2745
|
children: [
|
|
2186
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style:
|
|
2187
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style:
|
|
2746
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles11.chipLabel, numberOfLines: 1, children: option.label }),
|
|
2747
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles11.chipRemove, children: "\xD7" })
|
|
2188
2748
|
]
|
|
2189
2749
|
},
|
|
2190
2750
|
`measure-${option.value}`
|
|
2191
2751
|
)),
|
|
2192
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
2752
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles11.ellipsis, onLayout: handleEllipsisLayout, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles11.ellipsisText, children: "..." }) })
|
|
2193
2753
|
] }),
|
|
2194
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
2195
|
-
visible.map((option) => /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
2196
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style:
|
|
2754
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles11.chipsRow, onLayout: handleContainerLayout, children: [
|
|
2755
|
+
visible.map((option) => /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles11.chip, children: [
|
|
2756
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles11.chipLabel, numberOfLines: 1, children: option.label }),
|
|
2197
2757
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2198
2758
|
reactNative.Pressable,
|
|
2199
2759
|
{
|
|
@@ -2205,11 +2765,11 @@ function MultiValueChips({ options, disabled, onRemove }) {
|
|
|
2205
2765
|
hitSlop: 6,
|
|
2206
2766
|
accessibilityRole: "button",
|
|
2207
2767
|
accessibilityLabel: `Remove ${option.label}`,
|
|
2208
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style:
|
|
2768
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles11.chipRemove, children: "\xD7" })
|
|
2209
2769
|
}
|
|
2210
2770
|
)
|
|
2211
2771
|
] }, option.value)),
|
|
2212
|
-
hasOverflow ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
2772
|
+
hasOverflow ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles11.ellipsis, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles11.ellipsisText, children: "..." }) }) : null
|
|
2213
2773
|
] })
|
|
2214
2774
|
] });
|
|
2215
2775
|
}
|
|
@@ -2420,7 +2980,7 @@ var Select = react.forwardRef(
|
|
|
2420
2980
|
const leftIconNode = leftIcon ?? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2421
2981
|
UserIcon,
|
|
2422
2982
|
{
|
|
2423
|
-
size:
|
|
2983
|
+
size: ICON_SIZE6,
|
|
2424
2984
|
color: error ? colors.red : isOpen ? colors.primary : colors.grey100
|
|
2425
2985
|
}
|
|
2426
2986
|
);
|
|
@@ -2436,11 +2996,11 @@ var Select = react.forwardRef(
|
|
|
2436
2996
|
{
|
|
2437
2997
|
...rest,
|
|
2438
2998
|
ref: setRootRef,
|
|
2439
|
-
style: [
|
|
2999
|
+
style: [styles11.root, isOpen && styles11.rootOpen, disabled && styles11.disabled, style],
|
|
2440
3000
|
accessibilityState: { disabled, expanded: isOpen },
|
|
2441
3001
|
children: [
|
|
2442
|
-
showLabel && label ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
2443
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [
|
|
3002
|
+
showLabel && label ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles11.label, { color: labelColor }], children: label }) : null,
|
|
3003
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles11.triggerWrap, isOpen && styles11.triggerWrapOpen], children: [
|
|
2444
3004
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2445
3005
|
reactNative.Pressable,
|
|
2446
3006
|
{
|
|
@@ -2451,29 +3011,29 @@ var Select = react.forwardRef(
|
|
|
2451
3011
|
accessibilityLabel: resolvedAccessibilityLabel,
|
|
2452
3012
|
accessibilityState: { disabled, expanded: isOpen },
|
|
2453
3013
|
style: [
|
|
2454
|
-
|
|
3014
|
+
styles11.trigger,
|
|
2455
3015
|
{
|
|
2456
3016
|
borderColor: triggerBorderColor,
|
|
2457
3017
|
backgroundColor: colors.grey700
|
|
2458
3018
|
}
|
|
2459
3019
|
],
|
|
2460
3020
|
children: [
|
|
2461
|
-
hasLeftIcon ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
2462
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
3021
|
+
hasLeftIcon ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles11.iconSlot, children: leftIconNode }) : null,
|
|
3022
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles11.triggerContent, children: multiple && hasValue ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2463
3023
|
MultiValueChips,
|
|
2464
3024
|
{
|
|
2465
3025
|
options: selectedOptions,
|
|
2466
3026
|
disabled,
|
|
2467
3027
|
onRemove: handleRemoveChip
|
|
2468
3028
|
}
|
|
2469
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
2470
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [
|
|
3029
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles11.triggerText, { color: triggerTextColor }], numberOfLines: 1, children: multiple ? placeholder : singleLabel }) }),
|
|
3030
|
+
/* @__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
3031
|
]
|
|
2472
3032
|
}
|
|
2473
3033
|
),
|
|
2474
|
-
isOpen ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
2475
|
-
showSearch ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
2476
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
3034
|
+
isOpen ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles11.menu, children: [
|
|
3035
|
+
showSearch ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles11.searchField, children: [
|
|
3036
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles11.iconSlot, children: /* @__PURE__ */ jsxRuntime.jsx(SearchIcon, { size: ICON_SIZE6, color: colors.grey100 }) }),
|
|
2477
3037
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2478
3038
|
reactNative.TextInput,
|
|
2479
3039
|
{
|
|
@@ -2484,9 +3044,9 @@ var Select = react.forwardRef(
|
|
|
2484
3044
|
placeholder: searchPlaceholder,
|
|
2485
3045
|
placeholderTextColor: colors.grey100,
|
|
2486
3046
|
style: [
|
|
2487
|
-
|
|
2488
|
-
reactNative.Platform.OS === "web" ?
|
|
2489
|
-
reactNative.Platform.OS === "android" ?
|
|
3047
|
+
styles11.searchInput,
|
|
3048
|
+
reactNative.Platform.OS === "web" ? styles11.searchInputWeb : null,
|
|
3049
|
+
reactNative.Platform.OS === "android" ? styles11.searchInputAndroid : null
|
|
2490
3050
|
],
|
|
2491
3051
|
accessibilityLabel: searchPlaceholder
|
|
2492
3052
|
}
|
|
@@ -2495,12 +3055,12 @@ var Select = react.forwardRef(
|
|
|
2495
3055
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2496
3056
|
reactNative.ScrollView,
|
|
2497
3057
|
{
|
|
2498
|
-
style:
|
|
2499
|
-
contentContainerStyle:
|
|
3058
|
+
style: styles11.optionList,
|
|
3059
|
+
contentContainerStyle: styles11.optionListContent,
|
|
2500
3060
|
keyboardShouldPersistTaps: "handled",
|
|
2501
3061
|
showsVerticalScrollIndicator: false,
|
|
2502
3062
|
children: [
|
|
2503
|
-
loading ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
3063
|
+
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
3064
|
!loading && filteredOptions.map((option) => {
|
|
2505
3065
|
const isSelected = selectedValues.includes(option.value);
|
|
2506
3066
|
const isHovered = hoveredValue === option.value;
|
|
@@ -2517,14 +3077,14 @@ var Select = react.forwardRef(
|
|
|
2517
3077
|
accessibilityRole: multiple ? "checkbox" : "button",
|
|
2518
3078
|
accessibilityState: { selected: isSelected, checked: isSelected, disabled },
|
|
2519
3079
|
style: [
|
|
2520
|
-
|
|
3080
|
+
styles11.item,
|
|
2521
3081
|
{
|
|
2522
3082
|
backgroundColor: itemBackground(visualState)
|
|
2523
3083
|
}
|
|
2524
3084
|
],
|
|
2525
3085
|
children: [
|
|
2526
|
-
multiple ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { pointerEvents: "none", style:
|
|
2527
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style:
|
|
3086
|
+
multiple ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { pointerEvents: "none", style: styles11.itemCheckbox, children: /* @__PURE__ */ jsxRuntime.jsx(Checkbox, { value: isSelected, variant: "light" }) }) : null,
|
|
3087
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles11.itemLabel, numberOfLines: 1, children: option.label })
|
|
2528
3088
|
]
|
|
2529
3089
|
},
|
|
2530
3090
|
option.value
|
|
@@ -2535,13 +3095,13 @@ var Select = react.forwardRef(
|
|
|
2535
3095
|
)
|
|
2536
3096
|
] }) : null
|
|
2537
3097
|
] }),
|
|
2538
|
-
showHint && hint ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
3098
|
+
showHint && hint ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles11.hint, { color: hintColor }], children: hint }) : null
|
|
2539
3099
|
]
|
|
2540
3100
|
}
|
|
2541
3101
|
);
|
|
2542
3102
|
}
|
|
2543
3103
|
);
|
|
2544
|
-
var
|
|
3104
|
+
var styles11 = reactNative.StyleSheet.create({
|
|
2545
3105
|
root: {
|
|
2546
3106
|
width: DEFAULT_WIDTH3,
|
|
2547
3107
|
gap: 8,
|
|
@@ -2631,8 +3191,8 @@ var styles7 = reactNative.StyleSheet.create({
|
|
|
2631
3191
|
lineHeight: 16
|
|
2632
3192
|
},
|
|
2633
3193
|
iconSlot: {
|
|
2634
|
-
width:
|
|
2635
|
-
height:
|
|
3194
|
+
width: ICON_SIZE6,
|
|
3195
|
+
height: ICON_SIZE6,
|
|
2636
3196
|
alignItems: "center",
|
|
2637
3197
|
justifyContent: "center",
|
|
2638
3198
|
flexShrink: 0
|
|
@@ -2803,13 +3363,13 @@ var Textarea = react.forwardRef(function Textarea2({
|
|
|
2803
3363
|
const resolvedAccessibilityLabel = accessibilityLabel ?? (showLabel ? void 0 : label);
|
|
2804
3364
|
useApplyWebClassName(rootRef, className);
|
|
2805
3365
|
useApplyWebClassName(inputRef, inputClassName);
|
|
2806
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { ref: rootRef, style: [
|
|
2807
|
-
showLabel && label ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
3366
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { ref: rootRef, style: [styles12.root, disabled && styles12.disabled, style], children: [
|
|
3367
|
+
showLabel && label ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles12.label, { color: chrome.labelColor }], children: label }) : null,
|
|
2808
3368
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2809
3369
|
reactNative.View,
|
|
2810
3370
|
{
|
|
2811
3371
|
style: [
|
|
2812
|
-
|
|
3372
|
+
styles12.field,
|
|
2813
3373
|
{
|
|
2814
3374
|
borderColor: chrome.borderColor,
|
|
2815
3375
|
backgroundColor: chrome.backgroundColor
|
|
@@ -2841,11 +3401,11 @@ var Textarea = react.forwardRef(function Textarea2({
|
|
|
2841
3401
|
onBlur?.(event);
|
|
2842
3402
|
},
|
|
2843
3403
|
style: [
|
|
2844
|
-
|
|
3404
|
+
styles12.input,
|
|
2845
3405
|
textareaTypography.field,
|
|
2846
3406
|
{ color: chrome.textColor },
|
|
2847
|
-
reactNative.Platform.OS === "web" ?
|
|
2848
|
-
reactNative.Platform.OS === "android" ?
|
|
3407
|
+
reactNative.Platform.OS === "web" ? styles12.inputWeb : null,
|
|
3408
|
+
reactNative.Platform.OS === "android" ? styles12.inputAndroid : null,
|
|
2849
3409
|
inputStyle
|
|
2850
3410
|
],
|
|
2851
3411
|
accessibilityLabel: resolvedAccessibilityLabel,
|
|
@@ -2854,10 +3414,10 @@ var Textarea = react.forwardRef(function Textarea2({
|
|
|
2854
3414
|
)
|
|
2855
3415
|
}
|
|
2856
3416
|
),
|
|
2857
|
-
showHint && hint ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
3417
|
+
showHint && hint ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles12.hint, { color: chrome.hintColor }], children: hint }) : null
|
|
2858
3418
|
] });
|
|
2859
3419
|
});
|
|
2860
|
-
var
|
|
3420
|
+
var styles12 = reactNative.StyleSheet.create({
|
|
2861
3421
|
root: {
|
|
2862
3422
|
width: DEFAULT_WIDTH4,
|
|
2863
3423
|
gap: 8,
|
|
@@ -2900,7 +3460,7 @@ var TRACK_RADIUS = 43;
|
|
|
2900
3460
|
var TRACK_PADDING = 4;
|
|
2901
3461
|
var THUMB_SIZE = TRACK_HEIGHT - TRACK_PADDING * 2;
|
|
2902
3462
|
var THUMB_TRAVEL = TRACK_WIDTH - TRACK_PADDING * 2 - THUMB_SIZE;
|
|
2903
|
-
var
|
|
3463
|
+
var ANIMATION_DURATION2 = 300;
|
|
2904
3464
|
var Toggle = react.forwardRef(function Toggle2({
|
|
2905
3465
|
value,
|
|
2906
3466
|
defaultValue = false,
|
|
@@ -2927,7 +3487,7 @@ var Toggle = react.forwardRef(function Toggle2({
|
|
|
2927
3487
|
react.useEffect(() => {
|
|
2928
3488
|
reactNative.Animated.timing(progress, {
|
|
2929
3489
|
toValue: isActive ? 1 : 0,
|
|
2930
|
-
duration:
|
|
3490
|
+
duration: ANIMATION_DURATION2,
|
|
2931
3491
|
easing: reactNative.Easing.out(reactNative.Easing.ease),
|
|
2932
3492
|
useNativeDriver: false
|
|
2933
3493
|
}).start();
|
|
@@ -2957,13 +3517,13 @@ var Toggle = react.forwardRef(function Toggle2({
|
|
|
2957
3517
|
accessibilityRole: "switch",
|
|
2958
3518
|
accessibilityLabel: resolvedAccessibilityLabel,
|
|
2959
3519
|
accessibilityState: { checked: isActive, disabled },
|
|
2960
|
-
style: [
|
|
3520
|
+
style: [styles13.pressable, disabled && styles13.disabled, style],
|
|
2961
3521
|
children: [
|
|
2962
3522
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2963
3523
|
reactNative.Animated.View,
|
|
2964
3524
|
{
|
|
2965
3525
|
style: [
|
|
2966
|
-
|
|
3526
|
+
styles13.track,
|
|
2967
3527
|
{
|
|
2968
3528
|
backgroundColor: trackBackgroundColor
|
|
2969
3529
|
}
|
|
@@ -2972,7 +3532,7 @@ var Toggle = react.forwardRef(function Toggle2({
|
|
|
2972
3532
|
reactNative.Animated.View,
|
|
2973
3533
|
{
|
|
2974
3534
|
style: [
|
|
2975
|
-
|
|
3535
|
+
styles13.thumb,
|
|
2976
3536
|
{
|
|
2977
3537
|
transform: [{ translateX: thumbTranslateX }]
|
|
2978
3538
|
}
|
|
@@ -2981,12 +3541,12 @@ var Toggle = react.forwardRef(function Toggle2({
|
|
|
2981
3541
|
)
|
|
2982
3542
|
}
|
|
2983
3543
|
),
|
|
2984
|
-
labelContent != null && labelContent !== false ? typeof labelContent === "string" || typeof labelContent === "number" ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
3544
|
+
labelContent != null && labelContent !== false ? typeof labelContent === "string" || typeof labelContent === "number" ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles13.label, labelStyle], children: labelContent }) : labelContent : null
|
|
2985
3545
|
]
|
|
2986
3546
|
}
|
|
2987
3547
|
);
|
|
2988
3548
|
});
|
|
2989
|
-
var
|
|
3549
|
+
var styles13 = reactNative.StyleSheet.create({
|
|
2990
3550
|
pressable: {
|
|
2991
3551
|
flexDirection: "row",
|
|
2992
3552
|
alignItems: "center",
|
|
@@ -3014,9 +3574,276 @@ var styles9 = reactNative.StyleSheet.create({
|
|
|
3014
3574
|
color: colors.white
|
|
3015
3575
|
}
|
|
3016
3576
|
});
|
|
3577
|
+
var STAR_COUNT = 5;
|
|
3578
|
+
var BASE_ITEM_SIZE = 16;
|
|
3579
|
+
var ICON_WIDTH_RATIO = 12.57 / BASE_ITEM_SIZE;
|
|
3580
|
+
var ICON_HEIGHT_RATIO = 11.98 / BASE_ITEM_SIZE;
|
|
3581
|
+
var STAR_GAP_RATIO = 2 / BASE_ITEM_SIZE;
|
|
3582
|
+
function clamp2(value) {
|
|
3583
|
+
return Math.max(0, Math.min(value, STAR_COUNT));
|
|
3584
|
+
}
|
|
3585
|
+
var RatingInput = react.forwardRef(
|
|
3586
|
+
function RatingInput2({
|
|
3587
|
+
value,
|
|
3588
|
+
defaultValue = 0,
|
|
3589
|
+
onValueChange,
|
|
3590
|
+
showValue = true,
|
|
3591
|
+
precision = 1,
|
|
3592
|
+
size = 20,
|
|
3593
|
+
starGap,
|
|
3594
|
+
readOnly = false,
|
|
3595
|
+
disabled = false,
|
|
3596
|
+
style,
|
|
3597
|
+
valueStyle,
|
|
3598
|
+
className,
|
|
3599
|
+
hitSlop = 6,
|
|
3600
|
+
accessibilityLabel,
|
|
3601
|
+
...rest
|
|
3602
|
+
}, forwardedRef) {
|
|
3603
|
+
const containerRef = react.useRef(null);
|
|
3604
|
+
const setContainerRef = react.useMemo(() => mergeRefs(containerRef, forwardedRef), [forwardedRef]);
|
|
3605
|
+
const isControlled = value !== void 0;
|
|
3606
|
+
const [uncontrolledValue, setUncontrolledValue] = react.useState(() => clamp2(defaultValue));
|
|
3607
|
+
const selectedValue = clamp2(isControlled ? value : uncontrolledValue);
|
|
3608
|
+
const selectedStarCount = Math.round(selectedValue);
|
|
3609
|
+
const iconWidth = size * ICON_WIDTH_RATIO;
|
|
3610
|
+
const iconHeight = size * ICON_HEIGHT_RATIO;
|
|
3611
|
+
const resolvedStarGap = starGap ?? size * STAR_GAP_RATIO;
|
|
3612
|
+
const resolvedAccessibilityLabel = accessibilityLabel ?? (readOnly ? `${selectedValue} out of ${STAR_COUNT} stars` : "Rating");
|
|
3613
|
+
useApplyWebClassName(containerRef, className);
|
|
3614
|
+
const selectValue = (nextValue) => {
|
|
3615
|
+
if (disabled || nextValue === selectedValue) return;
|
|
3616
|
+
if (!isControlled) setUncontrolledValue(nextValue);
|
|
3617
|
+
onValueChange?.(nextValue);
|
|
3618
|
+
};
|
|
3619
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3620
|
+
reactNative.View,
|
|
3621
|
+
{
|
|
3622
|
+
...rest,
|
|
3623
|
+
ref: setContainerRef,
|
|
3624
|
+
style: [styles14.root, disabled && styles14.disabled, style],
|
|
3625
|
+
children: [
|
|
3626
|
+
showValue ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style: [styles14.value, valueStyle], children: selectedValue.toFixed(precision) }) : null,
|
|
3627
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3628
|
+
reactNative.View,
|
|
3629
|
+
{
|
|
3630
|
+
accessibilityRole: readOnly ? "image" : "radiogroup",
|
|
3631
|
+
accessibilityLabel: resolvedAccessibilityLabel,
|
|
3632
|
+
accessibilityState: { disabled },
|
|
3633
|
+
style: [styles14.stars, { gap: resolvedStarGap }],
|
|
3634
|
+
children: Array.from({ length: STAR_COUNT }, (_, index) => {
|
|
3635
|
+
const starValue = index + 1;
|
|
3636
|
+
const isSelected = starValue <= selectedStarCount;
|
|
3637
|
+
const icon = isSelected ? /* @__PURE__ */ jsxRuntime.jsx(StarFilledIcon, { size: iconWidth, height: iconHeight }) : /* @__PURE__ */ jsxRuntime.jsx(StarIcon, { size: iconWidth, height: iconHeight });
|
|
3638
|
+
const itemStyle = [styles14.starItem, { width: size, height: size }];
|
|
3639
|
+
if (readOnly) {
|
|
3640
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: itemStyle, children: icon }, starValue);
|
|
3641
|
+
}
|
|
3642
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3643
|
+
reactNative.Pressable,
|
|
3644
|
+
{
|
|
3645
|
+
disabled,
|
|
3646
|
+
hitSlop,
|
|
3647
|
+
onPress: () => selectValue(starValue),
|
|
3648
|
+
accessibilityRole: "radio",
|
|
3649
|
+
accessibilityLabel: `${starValue} star${starValue === 1 ? "" : "s"}`,
|
|
3650
|
+
accessibilityState: { checked: isSelected, disabled },
|
|
3651
|
+
style: itemStyle,
|
|
3652
|
+
children: icon
|
|
3653
|
+
},
|
|
3654
|
+
starValue
|
|
3655
|
+
);
|
|
3656
|
+
})
|
|
3657
|
+
}
|
|
3658
|
+
)
|
|
3659
|
+
]
|
|
3660
|
+
}
|
|
3661
|
+
);
|
|
3662
|
+
}
|
|
3663
|
+
);
|
|
3664
|
+
var styles14 = reactNative.StyleSheet.create({
|
|
3665
|
+
root: {
|
|
3666
|
+
flexDirection: "row",
|
|
3667
|
+
alignItems: "center",
|
|
3668
|
+
flexWrap: "nowrap",
|
|
3669
|
+
alignSelf: "flex-start",
|
|
3670
|
+
gap: 16
|
|
3671
|
+
},
|
|
3672
|
+
stars: {
|
|
3673
|
+
flexDirection: "row",
|
|
3674
|
+
alignItems: "center"
|
|
3675
|
+
},
|
|
3676
|
+
starItem: {
|
|
3677
|
+
alignItems: "center",
|
|
3678
|
+
justifyContent: "center"
|
|
3679
|
+
},
|
|
3680
|
+
value: {
|
|
3681
|
+
...ratingTypography,
|
|
3682
|
+
color: colors.white
|
|
3683
|
+
},
|
|
3684
|
+
disabled: {
|
|
3685
|
+
opacity: 0.5
|
|
3686
|
+
}
|
|
3687
|
+
});
|
|
3688
|
+
var CARD_WIDTH = 370;
|
|
3689
|
+
var CARD_MIN_HEIGHT = 173;
|
|
3690
|
+
var AVATAR_SIZE = 44;
|
|
3691
|
+
var CommentCard = react.forwardRef(
|
|
3692
|
+
function CommentCard2({
|
|
3693
|
+
userName,
|
|
3694
|
+
date,
|
|
3695
|
+
commentText,
|
|
3696
|
+
rating,
|
|
3697
|
+
imageUrl,
|
|
3698
|
+
maxCommentLines = 3,
|
|
3699
|
+
maxCommentLength = 111,
|
|
3700
|
+
readMoreLabel = "\u0534\u056B\u057F\u0565\u056C \u0561\u057E\u0565\u056C\u056B\u0576",
|
|
3701
|
+
readLessLabel = "\u0553\u0561\u056F\u0565\u056C",
|
|
3702
|
+
onExpandedChange,
|
|
3703
|
+
style,
|
|
3704
|
+
commentStyle,
|
|
3705
|
+
className,
|
|
3706
|
+
...rest
|
|
3707
|
+
}, forwardedRef) {
|
|
3708
|
+
const containerRef = react.useRef(null);
|
|
3709
|
+
const setContainerRef = react.useMemo(() => mergeRefs(containerRef, forwardedRef), [forwardedRef]);
|
|
3710
|
+
const [imageFailed, setImageFailed] = react.useState(false);
|
|
3711
|
+
const [expanded, setExpanded] = react.useState(false);
|
|
3712
|
+
const [actionHovered, setActionHovered] = react.useState(false);
|
|
3713
|
+
const hasImage = Boolean(imageUrl) && !imageFailed;
|
|
3714
|
+
const shouldShowAction = Array.from(commentText).length >= maxCommentLength;
|
|
3715
|
+
useApplyWebClassName(containerRef, className);
|
|
3716
|
+
react.useEffect(() => {
|
|
3717
|
+
setImageFailed(false);
|
|
3718
|
+
}, [imageUrl]);
|
|
3719
|
+
react.useEffect(() => {
|
|
3720
|
+
setExpanded(false);
|
|
3721
|
+
setActionHovered(false);
|
|
3722
|
+
}, [commentText, maxCommentLength, maxCommentLines]);
|
|
3723
|
+
const toggleExpanded = () => {
|
|
3724
|
+
const next = !expanded;
|
|
3725
|
+
setExpanded(next);
|
|
3726
|
+
onExpandedChange?.(next);
|
|
3727
|
+
};
|
|
3728
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { ...rest, ref: setContainerRef, style: [styles15.root, style], children: [
|
|
3729
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles15.header, children: [
|
|
3730
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles15.avatar, children: hasImage ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3731
|
+
reactNative.Image,
|
|
3732
|
+
{
|
|
3733
|
+
source: { uri: imageUrl ?? void 0 },
|
|
3734
|
+
style: styles15.avatarImage,
|
|
3735
|
+
onError: () => setImageFailed(true)
|
|
3736
|
+
}
|
|
3737
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(UserIcon, { size: 20, color: colors.primary }) }),
|
|
3738
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles15.identity, children: [
|
|
3739
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style: styles15.name, children: userName }),
|
|
3740
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style: styles15.date, children: date })
|
|
3741
|
+
] }),
|
|
3742
|
+
/* @__PURE__ */ jsxRuntime.jsx(RatingInput, { value: rating, readOnly: true, showValue: false, size: 16 })
|
|
3743
|
+
] }),
|
|
3744
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3745
|
+
reactNative.Text,
|
|
3746
|
+
{
|
|
3747
|
+
numberOfLines: expanded ? void 0 : maxCommentLines,
|
|
3748
|
+
style: [styles15.comment, commentStyle],
|
|
3749
|
+
children: commentText
|
|
3750
|
+
}
|
|
3751
|
+
),
|
|
3752
|
+
shouldShowAction ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3753
|
+
reactNative.Pressable,
|
|
3754
|
+
{
|
|
3755
|
+
onPress: toggleExpanded,
|
|
3756
|
+
accessibilityRole: "button",
|
|
3757
|
+
accessibilityState: { expanded },
|
|
3758
|
+
hitSlop: 6,
|
|
3759
|
+
onHoverIn: () => setActionHovered(true),
|
|
3760
|
+
onHoverOut: () => setActionHovered(false),
|
|
3761
|
+
style: styles15.action,
|
|
3762
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3763
|
+
reactNative.Text,
|
|
3764
|
+
{
|
|
3765
|
+
style: [
|
|
3766
|
+
styles15.actionText,
|
|
3767
|
+
expanded && styles15.closeActionText,
|
|
3768
|
+
actionHovered && (expanded ? styles15.closeActionTextHovered : styles15.openActionTextHovered)
|
|
3769
|
+
],
|
|
3770
|
+
children: expanded ? readLessLabel : readMoreLabel
|
|
3771
|
+
}
|
|
3772
|
+
)
|
|
3773
|
+
}
|
|
3774
|
+
) : null
|
|
3775
|
+
] });
|
|
3776
|
+
}
|
|
3777
|
+
);
|
|
3778
|
+
var styles15 = reactNative.StyleSheet.create({
|
|
3779
|
+
root: {
|
|
3780
|
+
width: CARD_WIDTH,
|
|
3781
|
+
minHeight: CARD_MIN_HEIGHT,
|
|
3782
|
+
padding: 16,
|
|
3783
|
+
gap: 12,
|
|
3784
|
+
borderRadius: 12,
|
|
3785
|
+
backgroundColor: colors.grey750
|
|
3786
|
+
},
|
|
3787
|
+
header: {
|
|
3788
|
+
flexDirection: "row",
|
|
3789
|
+
alignItems: "center",
|
|
3790
|
+
gap: 8
|
|
3791
|
+
},
|
|
3792
|
+
avatar: {
|
|
3793
|
+
width: AVATAR_SIZE,
|
|
3794
|
+
height: AVATAR_SIZE,
|
|
3795
|
+
flexShrink: 0,
|
|
3796
|
+
alignItems: "center",
|
|
3797
|
+
justifyContent: "center",
|
|
3798
|
+
overflow: "hidden",
|
|
3799
|
+
borderRadius: AVATAR_SIZE / 2,
|
|
3800
|
+
backgroundColor: colors.grey600
|
|
3801
|
+
},
|
|
3802
|
+
avatarImage: {
|
|
3803
|
+
width: AVATAR_SIZE,
|
|
3804
|
+
height: AVATAR_SIZE
|
|
3805
|
+
},
|
|
3806
|
+
identity: {
|
|
3807
|
+
minWidth: 0,
|
|
3808
|
+
flex: 1,
|
|
3809
|
+
gap: 4
|
|
3810
|
+
},
|
|
3811
|
+
name: {
|
|
3812
|
+
...commentCardTypography.name,
|
|
3813
|
+
color: colors.white
|
|
3814
|
+
},
|
|
3815
|
+
date: {
|
|
3816
|
+
...commentCardTypography.date,
|
|
3817
|
+
color: colors.grey0
|
|
3818
|
+
},
|
|
3819
|
+
comment: {
|
|
3820
|
+
...commentCardTypography.comment,
|
|
3821
|
+
color: colors.white
|
|
3822
|
+
},
|
|
3823
|
+
action: {
|
|
3824
|
+
alignSelf: "flex-start",
|
|
3825
|
+
marginTop: "auto",
|
|
3826
|
+
minHeight: 16,
|
|
3827
|
+
justifyContent: "center"
|
|
3828
|
+
},
|
|
3829
|
+
actionText: {
|
|
3830
|
+
...commentCardTypography.action,
|
|
3831
|
+
color: colors.white
|
|
3832
|
+
},
|
|
3833
|
+
closeActionText: {
|
|
3834
|
+
color: colors.primary
|
|
3835
|
+
},
|
|
3836
|
+
openActionTextHovered: {
|
|
3837
|
+
color: colors.primary
|
|
3838
|
+
},
|
|
3839
|
+
closeActionTextHovered: {
|
|
3840
|
+
color: colors.white
|
|
3841
|
+
}
|
|
3842
|
+
});
|
|
3017
3843
|
|
|
3018
3844
|
exports.ArrowRightIcon = ArrowRightIcon;
|
|
3019
3845
|
exports.Avatar = Avatar;
|
|
3846
|
+
exports.Badge = Badge;
|
|
3020
3847
|
exports.BagIcon = BagIcon;
|
|
3021
3848
|
exports.BellIcon = BellIcon;
|
|
3022
3849
|
exports.BuildingIcon = BuildingIcon;
|
|
@@ -3030,6 +3857,8 @@ exports.Checkbox = Checkbox;
|
|
|
3030
3857
|
exports.ChevronDownIcon = ChevronDownIcon;
|
|
3031
3858
|
exports.ChevronLeftIcon = ChevronLeftIcon;
|
|
3032
3859
|
exports.ClockIcon = ClockIcon;
|
|
3860
|
+
exports.CommentCard = CommentCard;
|
|
3861
|
+
exports.Counter = Counter;
|
|
3033
3862
|
exports.DatePicker = DatePicker;
|
|
3034
3863
|
exports.FacebookIcon = FacebookIcon;
|
|
3035
3864
|
exports.HeartIcon = HeartIcon;
|
|
@@ -3044,19 +3873,31 @@ exports.LinkedInIcon = LinkedInIcon;
|
|
|
3044
3873
|
exports.LogOutIcon = LogOutIcon;
|
|
3045
3874
|
exports.MailIcon = MailIcon;
|
|
3046
3875
|
exports.MenuItem = MenuItem;
|
|
3876
|
+
exports.MinusIcon = MinusIcon;
|
|
3047
3877
|
exports.NavigateIcon = NavigateIcon;
|
|
3048
3878
|
exports.PhoneIcon = PhoneIcon;
|
|
3879
|
+
exports.PlusIcon = PlusIcon;
|
|
3880
|
+
exports.RatingInput = RatingInput;
|
|
3049
3881
|
exports.SearchIcon = SearchIcon;
|
|
3882
|
+
exports.SegmentedToggle = SegmentedToggle;
|
|
3050
3883
|
exports.Select = Select;
|
|
3051
3884
|
exports.SettingsIcon = SettingsIcon;
|
|
3052
3885
|
exports.ShowIcon = ShowIcon;
|
|
3886
|
+
exports.SidebarIcon = SidebarIcon;
|
|
3887
|
+
exports.StarFilledIcon = StarFilledIcon;
|
|
3888
|
+
exports.StarIcon = StarIcon;
|
|
3889
|
+
exports.StatCard = StatCard;
|
|
3053
3890
|
exports.Textarea = Textarea;
|
|
3054
3891
|
exports.Toggle = Toggle;
|
|
3055
3892
|
exports.UserIcon = UserIcon;
|
|
3893
|
+
exports.UsersAltIcon = UsersAltIcon;
|
|
3056
3894
|
exports.VideoIcon = VideoIcon;
|
|
3057
3895
|
exports.avatarTypography = avatarTypography;
|
|
3896
|
+
exports.badgeTypography = badgeTypography;
|
|
3058
3897
|
exports.buttonTypography = buttonTypography;
|
|
3059
3898
|
exports.colors = colors;
|
|
3899
|
+
exports.commentCardTypography = commentCardTypography;
|
|
3900
|
+
exports.counterTypography = counterTypography;
|
|
3060
3901
|
exports.datePickerTypography = datePickerTypography;
|
|
3061
3902
|
exports.fonts = fonts;
|
|
3062
3903
|
exports.getIconsByGroup = getIconsByGroup;
|
|
@@ -3066,7 +3907,10 @@ exports.iconGroups = iconGroups;
|
|
|
3066
3907
|
exports.iconNames = iconNames;
|
|
3067
3908
|
exports.icons = icons;
|
|
3068
3909
|
exports.inputTypography = inputTypography;
|
|
3910
|
+
exports.ratingTypography = ratingTypography;
|
|
3911
|
+
exports.segmentedToggleTypography = segmentedToggleTypography;
|
|
3069
3912
|
exports.selectTypography = selectTypography;
|
|
3913
|
+
exports.statCardTypography = statCardTypography;
|
|
3070
3914
|
exports.textareaTypography = textareaTypography;
|
|
3071
3915
|
//# sourceMappingURL=index.cjs.map
|
|
3072
3916
|
//# sourceMappingURL=index.cjs.map
|