@ecohouse/ui 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +497 -75
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +102 -4
- package/dist/index.d.ts +102 -4
- package/dist/index.js +491 -78
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Avatar/Avatar.stories.tsx +133 -0
- package/src/components/Avatar/Avatar.tsx +389 -0
- package/src/components/Avatar/index.ts +2 -0
- package/src/components/Select/Select.tsx +1 -1
- package/src/components/index.ts +3 -0
- package/src/icons/Calendar/CalendarIcon.tsx +21 -0
- package/src/icons/Calendar/CalendarIcon.web.tsx +27 -0
- package/src/icons/Calendar/calendarPath.ts +3 -0
- package/src/icons/Calendar/index.ts +1 -0
- package/src/icons/Heart/HeartIcon.tsx +23 -0
- package/src/icons/Heart/HeartIcon.web.tsx +29 -0
- package/src/icons/Heart/heartPath.ts +3 -0
- package/src/icons/Heart/index.ts +1 -0
- package/src/icons/HelpCircle/HelpCircleIcon.tsx +25 -0
- package/src/icons/HelpCircle/HelpCircleIcon.web.tsx +31 -0
- package/src/icons/HelpCircle/helpCirclePath.ts +3 -0
- package/src/icons/HelpCircle/index.ts +1 -0
- package/src/icons/LayoutGrid/LayoutGridIcon.tsx +25 -0
- package/src/icons/LayoutGrid/LayoutGridIcon.web.tsx +31 -0
- package/src/icons/LayoutGrid/index.ts +1 -0
- package/src/icons/LayoutGrid/layoutGridPath.ts +3 -0
- package/src/icons/LogOut/LogOutIcon.tsx +21 -0
- package/src/icons/LogOut/LogOutIcon.web.tsx +27 -0
- package/src/icons/LogOut/index.ts +1 -0
- package/src/icons/LogOut/logOutPath.ts +3 -0
- package/src/icons/Settings/SettingsIcon.tsx +21 -0
- package/src/icons/Settings/SettingsIcon.web.tsx +27 -0
- package/src/icons/Settings/index.ts +1 -0
- package/src/icons/Settings/settingsPath.ts +3 -0
- package/src/icons/Video/VideoIcon.tsx +24 -0
- package/src/icons/Video/VideoIcon.web.tsx +30 -0
- package/src/icons/Video/index.ts +1 -0
- package/src/icons/Video/videoPath.ts +5 -0
- package/src/icons/index.ts +7 -0
- package/src/icons/registry.ts +17 -2
- package/src/index.ts +11 -1
- package/src/theme/colors.ts +1 -0
- package/src/theme/index.ts +1 -0
- package/src/theme/typography.ts +25 -0
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { forwardRef, useRef, useMemo, useState, useCallback, useEffect, useLayoutEffect } from 'react';
|
|
2
|
-
import { Platform,
|
|
2
|
+
import { Platform, View, Pressable, Image, Text, StyleSheet, TouchableOpacity, TextInput, ScrollView, Animated, Easing } from 'react-native';
|
|
3
3
|
import Svg, { Path } from 'react-native-svg';
|
|
4
|
-
import {
|
|
4
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
|
-
// src/components/
|
|
6
|
+
// src/components/Avatar/Avatar.tsx
|
|
7
7
|
|
|
8
8
|
// src/icons/ArrowRight/arrowRightPath.ts
|
|
9
9
|
var ARROW_RIGHT_PATH = "M4.16667 10H15.8333M15.8333 10L10 4.16667M15.8333 10L10 15.8333";
|
|
@@ -35,6 +35,7 @@ var colors = {
|
|
|
35
35
|
lightGrey: "#B7B7B7",
|
|
36
36
|
primaryMuted: "#B464360F",
|
|
37
37
|
redMuted: "#A63E3E0F",
|
|
38
|
+
redHover: "#A63E3E33",
|
|
38
39
|
grey0: grey["0"],
|
|
39
40
|
grey50: grey["0.5"],
|
|
40
41
|
grey100: grey["1"],
|
|
@@ -118,6 +119,29 @@ var selectTypography = {
|
|
|
118
119
|
letterSpacing: 0.36
|
|
119
120
|
}
|
|
120
121
|
};
|
|
122
|
+
var avatarTypography = {
|
|
123
|
+
name: {
|
|
124
|
+
fontFamily: fonts.sans,
|
|
125
|
+
fontSize: 14,
|
|
126
|
+
fontWeight: "600",
|
|
127
|
+
lineHeight: 14,
|
|
128
|
+
letterSpacing: 0
|
|
129
|
+
},
|
|
130
|
+
email: {
|
|
131
|
+
fontFamily: fonts.sans,
|
|
132
|
+
fontSize: 12,
|
|
133
|
+
fontWeight: "400",
|
|
134
|
+
lineHeight: 12,
|
|
135
|
+
letterSpacing: 0
|
|
136
|
+
},
|
|
137
|
+
menuItem: {
|
|
138
|
+
fontFamily: fonts.sans,
|
|
139
|
+
fontSize: 12,
|
|
140
|
+
fontWeight: "600",
|
|
141
|
+
lineHeight: 12,
|
|
142
|
+
letterSpacing: 0
|
|
143
|
+
}
|
|
144
|
+
};
|
|
121
145
|
var textareaTypography = {
|
|
122
146
|
label: {
|
|
123
147
|
fontFamily: fonts.sans,
|
|
@@ -203,6 +227,21 @@ function BuildingIcon({ size = 20, color = colors.primary, strokeWidth = 2 }) {
|
|
|
203
227
|
) });
|
|
204
228
|
}
|
|
205
229
|
|
|
230
|
+
// src/icons/Calendar/calendarPath.ts
|
|
231
|
+
var CALENDAR_PATH = "M14 6.66668H2M14 8.33334V5.86668C14 4.74657 14 4.18652 13.782 3.7587C13.5903 3.38237 13.2843 3.07641 12.908 2.88466C12.4802 2.66668 11.9201 2.66668 10.8 2.66668H5.2C4.0799 2.66668 3.51984 2.66668 3.09202 2.88466C2.71569 3.07641 2.40973 3.38237 2.21799 3.7587C2 4.18652 2 4.74657 2 5.86668V11.4667C2 12.5868 2 13.1468 2.21799 13.5747C2.40973 13.951 2.71569 14.2569 3.09202 14.4487C3.51984 14.6667 4.0799 14.6667 5.2 14.6667H8M10.6667 1.33334V4.00001M5.33333 1.33334V4.00001M9.66667 12.6667L11 14L14 11";
|
|
232
|
+
function CalendarIcon({ size = 20, color = colors.primary, strokeWidth = 1.5 }) {
|
|
233
|
+
return /* @__PURE__ */ jsx(Svg, { width: size, height: size, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ jsx(
|
|
234
|
+
Path,
|
|
235
|
+
{
|
|
236
|
+
d: CALENDAR_PATH,
|
|
237
|
+
stroke: color,
|
|
238
|
+
strokeWidth,
|
|
239
|
+
strokeLinecap: "round",
|
|
240
|
+
strokeLinejoin: "round"
|
|
241
|
+
}
|
|
242
|
+
) });
|
|
243
|
+
}
|
|
244
|
+
|
|
206
245
|
// src/icons/Camera/cameraPath.ts
|
|
207
246
|
var CAMERA_PATH = "M9.48898 7H6.2002C5.08009 7 4.51962 7 4.0918 7.21799C3.71547 7.40973 3.40973 7.71547 3.21799 8.0918C3 8.51962 3 9.08009 3 10.2002V15.8002C3 16.9203 3 17.4796 3.21799 17.9074C3.40973 18.2837 3.71547 18.5905 4.0918 18.7822C4.5192 19 5.07899 19 6.19691 19H17.8031C18.921 19 19.48 19 19.9074 18.7822C20.2837 18.5905 20.5905 18.2837 20.7822 17.9074C21 17.48 21 16.921 21 15.8031V10.1969C21 9.07899 21 8.5192 20.7822 8.0918C20.5905 7.71547 20.2837 7.40973 19.9074 7.21799C19.4796 7 18.9203 7 17.8002 7H14.5108M9.48898 7H9.55078M9.48898 7C9.50151 7.00001 9.51468 7 9.52857 7L9.55078 7M9.48898 7C9.38286 6.99995 9.32339 6.99941 9.27637 6.99414C8.68878 6.92835 8.28578 6.36908 8.40918 5.79084C8.42066 5.73703 8.44336 5.66894 8.4883 5.53412L8.49023 5.52841C8.54156 5.37443 8.56723 5.29743 8.59558 5.22949C8.88586 4.53389 9.54322 4.06083 10.2949 4.00541C10.3683 4 10.449 4 10.6113 4H13.3886C13.5509 4 13.6322 4 13.7057 4.00541C14.4574 4.06083 15.114 4.53389 15.4043 5.22949C15.4326 5.29743 15.4584 5.37434 15.5098 5.52832C15.556 5.66699 15.5791 5.73636 15.5908 5.79093C15.7142 6.36917 15.3118 6.92835 14.7242 6.99414C14.6772 6.99941 14.6171 6.99995 14.5108 7M9.55078 7H14.449M14.449 7H14.5108M14.449 7L14.4712 7C14.4851 7 14.4983 7.00001 14.5108 7M12 16C10.3431 16 9 14.6569 9 13C9 11.3431 10.3431 10 12 10C13.6569 10 15 11.3431 15 13C15 14.6569 13.6569 16 12 16Z";
|
|
208
247
|
function CameraIcon({ size = 24, color = colors.primary, strokeWidth = 2 }) {
|
|
@@ -288,6 +327,42 @@ function FacebookIcon({ size = 20, color = colors.white }) {
|
|
|
288
327
|
return /* @__PURE__ */ jsx(Svg, { width: size, height: size, viewBox: "0 0 20 20", fill: "none", children: /* @__PURE__ */ jsx(Path, { d: FACEBOOK_PATH, fill: color }) });
|
|
289
328
|
}
|
|
290
329
|
|
|
330
|
+
// src/icons/Heart/heartPath.ts
|
|
331
|
+
var HEART_PATH = "M7.99547 3.42388C6.66257 1.8656 4.43987 1.44643 2.76984 2.87334C1.0998 4.30026 0.864686 6.68598 2.17617 8.3736C3.26659 9.77674 6.56656 12.7361 7.64811 13.6939C7.76911 13.801 7.82961 13.8546 7.90018 13.8757C7.96178 13.8941 8.02917 13.8941 8.09077 13.8757C8.16134 13.8546 8.22184 13.801 8.34284 13.6939C9.42439 12.7361 12.7244 9.77674 13.8148 8.3736C15.1263 6.68598 14.9199 4.28525 13.2211 2.87334C11.5224 1.46144 9.32838 1.8656 7.99547 3.42388Z";
|
|
332
|
+
function HeartIcon({ size = 20, color = colors.primary, strokeWidth = 1.5 }) {
|
|
333
|
+
return /* @__PURE__ */ jsx(Svg, { width: size, height: size, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ jsx(
|
|
334
|
+
Path,
|
|
335
|
+
{
|
|
336
|
+
d: HEART_PATH,
|
|
337
|
+
stroke: color,
|
|
338
|
+
strokeWidth,
|
|
339
|
+
strokeLinecap: "round",
|
|
340
|
+
strokeLinejoin: "round",
|
|
341
|
+
fillRule: "evenodd",
|
|
342
|
+
clipRule: "evenodd"
|
|
343
|
+
}
|
|
344
|
+
) });
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
// src/icons/HelpCircle/helpCirclePath.ts
|
|
348
|
+
var HELP_CIRCLE_PATH = "M6.99971 6.00149C7.11717 5.66757 7.34902 5.386 7.6542 5.20665C7.95937 5.0273 8.31817 4.96174 8.66705 5.02158C9.01593 5.08142 9.33238 5.2628 9.56034 5.5336C9.7883 5.8044 9.91306 6.14714 9.91254 6.50112C9.91254 7.50037 8.41365 8 8.41365 8M8.43298 10H8.43964M8.33304 13.3333C11.4627 13.3333 13.9997 10.7963 13.9997 7.66667C13.9997 4.53705 11.4627 2 8.33304 2C5.20343 2 2.66638 4.53705 2.66638 7.66667C2.66638 8.3 2.77027 8.90906 2.96196 9.47774C3.03409 9.69175 3.07016 9.79875 3.07666 9.88095C3.08309 9.96213 3.07823 10.019 3.05814 10.098C3.03781 10.1779 2.99291 10.261 2.9031 10.4272L1.81267 12.4456C1.65713 12.7335 1.57936 12.8774 1.59676 12.9885C1.61192 13.0853 1.66887 13.1705 1.75249 13.2215C1.84849 13.2801 2.01124 13.2632 2.33674 13.2296L5.75075 12.8767C5.85414 12.866 5.90583 12.8606 5.95295 12.8624C5.99929 12.8642 6.03201 12.8686 6.0772 12.879C6.12315 12.8896 6.18092 12.9118 6.29648 12.9564C6.92851 13.1999 7.61519 13.3333 8.33304 13.3333Z";
|
|
349
|
+
function HelpCircleIcon({
|
|
350
|
+
size = 20,
|
|
351
|
+
color = colors.primary,
|
|
352
|
+
strokeWidth = 1.5
|
|
353
|
+
}) {
|
|
354
|
+
return /* @__PURE__ */ jsx(Svg, { width: size, height: size, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ jsx(
|
|
355
|
+
Path,
|
|
356
|
+
{
|
|
357
|
+
d: HELP_CIRCLE_PATH,
|
|
358
|
+
stroke: color,
|
|
359
|
+
strokeWidth,
|
|
360
|
+
strokeLinecap: "round",
|
|
361
|
+
strokeLinejoin: "round"
|
|
362
|
+
}
|
|
363
|
+
) });
|
|
364
|
+
}
|
|
365
|
+
|
|
291
366
|
// src/icons/Home/homePath.ts
|
|
292
367
|
var HOME_PATH = "M1.66675 16.6667H3.33341M3.33341 16.6667H8.33341M3.33341 16.6667V9.54352C3.33341 9.09823 3.33341 8.87548 3.38756 8.66828C3.43554 8.48466 3.51491 8.31089 3.6215 8.15387C3.74178 7.97668 3.90895 7.82974 4.24406 7.53652L8.24538 4.03537C8.86662 3.49178 9.17726 3.21997 9.5271 3.11652C9.83559 3.02529 10.1644 3.02529 10.4729 3.11652C10.823 3.22005 11.1341 3.49212 11.7563 4.03652L15.7563 7.53652C16.0914 7.82974 16.2586 7.97668 16.3789 8.15387C16.4855 8.31089 16.5642 8.48466 16.6122 8.66828C16.6664 8.87548 16.6667 9.09824 16.6667 9.54352V16.6667M8.33341 16.6667H11.6667M8.33341 16.6667V13.3334C8.33341 12.4129 9.07961 11.6667 10.0001 11.6667C10.9206 11.6667 11.6667 12.4129 11.6667 13.3334V16.6667M11.6667 16.6667H16.6667M16.6667 16.6667H18.3334";
|
|
293
368
|
function HomeIcon({ size = 20, color = colors.primary, strokeWidth = 2 }) {
|
|
@@ -324,12 +399,46 @@ function KeyIcon({ size = 20, color = colors.primary, strokeWidth = 2 }) {
|
|
|
324
399
|
) });
|
|
325
400
|
}
|
|
326
401
|
|
|
402
|
+
// src/icons/LayoutGrid/layoutGridPath.ts
|
|
403
|
+
var LAYOUT_GRID_PATH = "M4.33333 4.33333H4.34M11.6667 4.33333H11.6733M4.33333 11.6667H4.34M8.66667 8.66667H8.67333M11.6667 11.6667H11.6733M11.3333 14H14V11.3333M9.33333 11V14M14 9.33333H11M10.4 6.66667H12.9333C13.3067 6.66667 13.4934 6.66667 13.636 6.594C13.7614 6.53009 13.8634 6.4281 13.9273 6.30266C14 6.16005 14 5.97337 14 5.6V3.06667C14 2.6933 14 2.50661 13.9273 2.36401C13.8634 2.23856 13.7614 2.13658 13.636 2.07266C13.4934 2 13.3067 2 12.9333 2H10.4C10.0266 2 9.83995 2 9.69734 2.07266C9.5719 2.13658 9.46991 2.23856 9.406 2.36401C9.33333 2.50661 9.33333 2.6933 9.33333 3.06667V5.6C9.33333 5.97337 9.33333 6.16005 9.406 6.30266C9.46991 6.4281 9.5719 6.53009 9.69734 6.594C9.83995 6.66667 10.0266 6.66667 10.4 6.66667ZM3.06667 6.66667H5.6C5.97337 6.66667 6.16005 6.66667 6.30266 6.594C6.4281 6.53009 6.53009 6.4281 6.594 6.30266C6.66667 6.16005 6.66667 5.97337 6.66667 5.6V3.06667C6.66667 2.6933 6.66667 2.50661 6.594 2.36401C6.53009 2.23856 6.4281 2.13658 6.30266 2.07266C6.16005 2 5.97337 2 5.6 2H3.06667C2.6933 2 2.50661 2 2.36401 2.07266C2.23856 2.13658 2.13658 2.23856 2.07266 2.36401C2 2.50661 2 2.6933 2 3.06667V5.6C2 5.97337 2 6.16005 2.07266 6.30266C2.13658 6.4281 2.23856 6.53009 2.36401 6.594C2.50661 6.66667 2.6933 6.66667 3.06667 6.66667ZM3.06667 14H5.6C5.97337 14 6.16005 14 6.30266 13.9273C6.4281 13.8634 6.53009 13.7614 6.594 13.636C6.66667 13.4934 6.66667 13.3067 6.66667 12.9333V10.4C6.66667 10.0266 6.66667 9.83995 6.594 9.69734C6.53009 9.5719 6.4281 9.46991 6.30266 9.406C6.16005 9.33333 5.97337 9.33333 5.6 9.33333H3.06667C2.6933 9.33333 2.50661 9.33333 2.36401 9.406C2.23856 9.46991 2.13658 9.5719 2.07266 9.69734C2 9.83995 2 10.0266 2 10.4V12.9333C2 13.3067 2 13.4934 2.07266 13.636C2.13658 13.7614 2.23856 13.8634 2.36401 13.9273C2.50661 14 2.6933 14 3.06667 14Z";
|
|
404
|
+
function LayoutGridIcon({
|
|
405
|
+
size = 20,
|
|
406
|
+
color = colors.primary,
|
|
407
|
+
strokeWidth = 1.5
|
|
408
|
+
}) {
|
|
409
|
+
return /* @__PURE__ */ jsx(Svg, { width: size, height: size, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ jsx(
|
|
410
|
+
Path,
|
|
411
|
+
{
|
|
412
|
+
d: LAYOUT_GRID_PATH,
|
|
413
|
+
stroke: color,
|
|
414
|
+
strokeWidth,
|
|
415
|
+
strokeLinecap: "round",
|
|
416
|
+
strokeLinejoin: "round"
|
|
417
|
+
}
|
|
418
|
+
) });
|
|
419
|
+
}
|
|
420
|
+
|
|
327
421
|
// src/icons/LinkedIn/linkedinPath.ts
|
|
328
422
|
var LINKEDIN_PATH = "M15.8333 2.50098C16.2754 2.50098 16.6993 2.67657 17.0118 2.98913C17.3244 3.30169 17.5 3.72562 17.5 4.16764V15.8343C17.5 16.2763 17.3244 16.7003 17.0118 17.0128C16.6993 17.3254 16.2754 17.501 15.8333 17.501H4.16667C3.72464 17.501 3.30072 17.3254 2.98816 17.0128C2.67559 16.7003 2.5 16.2763 2.5 15.8343V4.16764C2.5 3.72562 2.67559 3.30169 2.98816 2.98913C3.30072 2.67657 3.72464 2.50098 4.16667 2.50098H15.8333ZM15.4167 15.4176V11.001C15.4167 10.2805 15.1304 9.58948 14.621 9.08C14.1115 8.57053 13.4205 8.28431 12.7 8.28431C11.9917 8.28431 11.1667 8.71764 10.7667 9.36764V8.44264H8.44167V15.4176H10.7667V11.3093C10.7667 10.6676 11.2833 10.1426 11.925 10.1426C12.2344 10.1426 12.5312 10.2656 12.75 10.4844C12.9687 10.7031 13.0917 10.9999 13.0917 11.3093V15.4176H15.4167ZM5.73333 7.13431C6.10464 7.13431 6.46073 6.98681 6.72328 6.72426C6.98583 6.46171 7.13333 6.10561 7.13333 5.73431C7.13333 4.95931 6.50833 4.32598 5.73333 4.32598C5.35982 4.32598 5.0016 4.47435 4.73749 4.73847C4.47338 5.00258 4.325 5.3608 4.325 5.73431C4.325 6.50931 4.95833 7.13431 5.73333 7.13431ZM6.89167 15.4176V8.44264H4.58333V15.4176H6.89167Z";
|
|
329
423
|
function LinkedInIcon({ size = 20, color = colors.white }) {
|
|
330
424
|
return /* @__PURE__ */ jsx(Svg, { width: size, height: size, viewBox: "0 0 20 20", fill: "none", children: /* @__PURE__ */ jsx(Path, { d: LINKEDIN_PATH, fill: color }) });
|
|
331
425
|
}
|
|
332
426
|
|
|
427
|
+
// src/icons/LogOut/logOutPath.ts
|
|
428
|
+
var LOG_OUT_PATH = "M10.6667 4.66667L14 8L10.6667 11.3333M14 8H6M8 11.3333C8 11.5304 8 11.6289 7.99268 11.7143C7.91655 12.6013 7.26324 13.3312 6.39002 13.5049C6.30602 13.5216 6.20801 13.5324 6.01223 13.5542L5.3313 13.6299C4.30832 13.7435 3.7968 13.8004 3.39044 13.6703C2.84862 13.4969 2.40628 13.101 2.17412 12.5817C2 12.1921 2 11.6775 2 10.6482V5.3518C2 4.32251 2 3.80787 2.17412 3.41835C2.40628 2.89899 2.84862 2.50307 3.39044 2.32969C3.79681 2.19965 4.3083 2.25648 5.33129 2.37015L6.01223 2.44581C6.20808 2.46757 6.306 2.47845 6.39002 2.49515C7.26324 2.66877 7.91655 3.39869 7.99268 4.28574C8 4.37109 8 4.46962 8 4.66667";
|
|
429
|
+
function LogOutIcon({ size = 20, color = colors.red, strokeWidth = 1.5 }) {
|
|
430
|
+
return /* @__PURE__ */ jsx(Svg, { width: size, height: size, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ jsx(
|
|
431
|
+
Path,
|
|
432
|
+
{
|
|
433
|
+
d: LOG_OUT_PATH,
|
|
434
|
+
stroke: color,
|
|
435
|
+
strokeWidth,
|
|
436
|
+
strokeLinecap: "round",
|
|
437
|
+
strokeLinejoin: "round"
|
|
438
|
+
}
|
|
439
|
+
) });
|
|
440
|
+
}
|
|
441
|
+
|
|
333
442
|
// src/icons/Mail/mailPath.ts
|
|
334
443
|
var MAIL_PATH = "M3.33333 4.99984L8.42303 8.84339L8.42473 8.8448C8.98987 9.25924 9.27261 9.46658 9.5823 9.54668C9.85602 9.61748 10.1438 9.61748 10.4175 9.54668C10.7274 9.46651 11.011 9.25856 11.5771 8.84339C11.5771 8.84339 14.8417 6.33812 16.6667 4.99984M2.5 13.1667V6.83333C2.5 5.89991 2.5 5.43285 2.68166 5.07633C2.84144 4.76273 3.09623 4.50795 3.40983 4.34816C3.76635 4.1665 4.23341 4.1665 5.16683 4.1665H14.8335C15.7669 4.1665 16.233 4.1665 16.5895 4.34816C16.9031 4.50795 17.1587 4.76273 17.3185 5.07633C17.5 5.43251 17.5 5.899 17.5 6.8306V13.1695C17.5 14.1011 17.5 14.5669 17.3185 14.9231C17.1587 15.2367 16.9031 15.4919 16.5895 15.6517C16.2333 15.8332 15.7675 15.8332 14.8359 15.8332H5.16409C4.23249 15.8332 3.766 15.8332 3.40983 15.6517C3.09623 15.4919 2.84144 15.2367 2.68166 14.9231C2.5 14.5666 2.5 14.1001 2.5 13.1667Z";
|
|
335
444
|
function MailIcon({ size = 20, color = colors.primary, strokeWidth = 2 }) {
|
|
@@ -407,6 +516,21 @@ function SearchIcon({
|
|
|
407
516
|
] });
|
|
408
517
|
}
|
|
409
518
|
|
|
519
|
+
// src/icons/Settings/settingsPath.ts
|
|
520
|
+
var SETTINGS_PATH = "M8.00004 10C9.10461 10 10 9.10457 10 8C10 6.89543 9.10461 6 8.00004 6C6.89547 6 6.00004 6.89543 6.00004 8C6.00004 9.10457 6.89547 10 8.00004 10Z M12.4849 9.81818C12.4042 10.001 12.3801 10.2038 12.4158 10.4004C12.4514 10.597 12.5452 10.7784 12.6849 10.9212L12.7213 10.9576C12.834 11.0702 12.9234 11.2038 12.9844 11.351C13.0454 11.4981 13.0768 11.6559 13.0768 11.8152C13.0768 11.9744 13.0454 12.1322 12.9844 12.2793C12.9234 12.4265 12.834 12.5602 12.7213 12.6727C12.6087 12.7854 12.475 12.8748 12.3278 12.9358C12.1807 12.9968 12.023 13.0282 11.8637 13.0282C11.7044 13.0282 11.5467 12.9968 11.3995 12.9358C11.2524 12.8748 11.1187 12.7854 11.0061 12.6727L10.9697 12.6364C10.8269 12.4966 10.6455 12.4029 10.4489 12.3673C10.2523 12.3316 10.0495 12.3557 9.86671 12.4364C9.68745 12.5132 9.53458 12.6408 9.42689 12.8034C9.31921 12.966 9.26142 13.1565 9.26065 13.3515V13.4545C9.26065 13.776 9.13294 14.0843 8.90562 14.3116C8.67831 14.539 8.37 14.6667 8.04853 14.6667C7.72705 14.6667 7.41874 14.539 7.19143 14.3116C6.96411 14.0843 6.8364 13.776 6.8364 13.4545V13.4C6.83171 13.1994 6.76678 13.0048 6.65005 12.8416C6.53331 12.6784 6.37018 12.5541 6.18186 12.4848C5.99906 12.4042 5.79629 12.3801 5.59968 12.4158C5.40308 12.4514 5.22166 12.5451 5.07883 12.6849L5.04246 12.7212C4.92989 12.8339 4.79621 12.9233 4.64906 12.9843C4.50191 13.0453 4.34418 13.0767 4.18489 13.0767C4.0256 13.0767 3.86787 13.0453 3.72072 12.9843C3.57357 12.9233 3.43989 12.8339 3.32731 12.7212C3.21461 12.6086 3.12521 12.475 3.06421 12.3278C3.00321 12.1807 2.97181 12.0229 2.97181 11.8636C2.97181 11.7043 3.00321 11.5466 3.06421 11.3995C3.12521 11.2523 3.21461 11.1186 3.32731 11.0061L3.36368 10.9697C3.5034 10.8269 3.59712 10.6454 3.63277 10.4488C3.66842 10.2522 3.64435 10.0495 3.56368 9.86667C3.48685 9.68741 3.35929 9.53454 3.19669 9.42686C3.03409 9.31917 2.84355 9.26139 2.64853 9.26061H2.5455C2.22402 9.26061 1.91571 9.1329 1.6884 8.90559C1.46108 8.67827 1.33337 8.36996 1.33337 8.04849C1.33337 7.72701 1.46108 7.4187 1.6884 7.19139C1.91571 6.96407 2.22402 6.83637 2.5455 6.83637H2.60004C2.80064 6.83167 2.9952 6.76674 3.1584 6.65001C3.32161 6.53328 3.44593 6.37014 3.51519 6.18182C3.59587 5.99902 3.61993 5.79625 3.58429 5.59965C3.54864 5.40304 3.45491 5.22163 3.31519 5.07879L3.27883 5.04243C3.16613 4.92985 3.07672 4.79617 3.01573 4.64902C2.95473 4.50187 2.92333 4.34414 2.92333 4.18485C2.92333 4.02556 2.95473 3.86783 3.01573 3.72068C3.07672 3.57353 3.16613 3.43985 3.27883 3.32728C3.3914 3.21458 3.52509 3.12517 3.67223 3.06417C3.81938 3.00317 3.97711 2.97178 4.1364 2.97178C4.2957 2.97178 4.45343 3.00317 4.60057 3.06417C4.74772 3.12517 4.88141 3.21458 4.99398 3.32728L5.03034 3.36364C5.17318 3.50336 5.3546 3.59708 5.5512 3.63273C5.7478 3.66838 5.95058 3.64431 6.13337 3.56364H6.18186C6.36111 3.48681 6.51399 3.35925 6.62167 3.19665C6.72935 3.03405 6.78714 2.84351 6.78792 2.64849V2.54546C6.78792 2.22398 6.91562 1.91567 7.14294 1.68836C7.37026 1.46104 7.67857 1.33334 8.00004 1.33334C8.32151 1.33334 8.62982 1.46104 8.85714 1.68836C9.08446 1.91567 9.21216 2.22398 9.21216 2.54546V2.6C9.21294 2.79502 9.27073 2.98556 9.37841 3.14816C9.48609 3.31076 9.63897 3.43833 9.81822 3.51515C10.001 3.59583 10.2038 3.6199 10.4004 3.58425C10.597 3.5486 10.7784 3.45487 10.9213 3.31515L10.9576 3.27879C11.0702 3.16609 11.2039 3.07669 11.351 3.01569C11.4982 2.95469 11.6559 2.92329 11.8152 2.92329C11.9745 2.92329 12.1322 2.95469 12.2794 3.01569C12.4265 3.07669 12.5602 3.16609 12.6728 3.27879C12.7855 3.39136 12.8749 3.52505 12.9359 3.6722C12.9969 3.81935 13.0283 3.97707 13.0283 4.13637C13.0283 4.29566 12.9969 4.45339 12.9359 4.60054C12.8749 4.74769 12.7855 4.88137 12.6728 4.99394L12.6364 5.03031C12.4967 5.17314 12.403 5.35456 12.3673 5.55116C12.3317 5.74776 12.3557 5.95054 12.4364 6.13334V6.18182C12.5132 6.36107 12.6408 6.51395 12.8034 6.62163C12.966 6.72932 13.1565 6.7871 13.3516 6.78788H13.4546C13.7761 6.78788 14.0844 6.91559 14.3117 7.1429C14.539 7.37022 14.6667 7.67853 14.6667 8C14.6667 8.32148 14.539 8.62978 14.3117 8.8571C14.0844 9.08442 13.7761 9.21212 13.4546 9.21212H13.4C13.205 9.2129 13.0145 9.27069 12.8519 9.37837C12.6893 9.48605 12.5617 9.63893 12.4849 9.81818Z";
|
|
521
|
+
function SettingsIcon({ size = 20, color = colors.primary, strokeWidth = 1.5 }) {
|
|
522
|
+
return /* @__PURE__ */ jsx(Svg, { width: size, height: size, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ jsx(
|
|
523
|
+
Path,
|
|
524
|
+
{
|
|
525
|
+
d: SETTINGS_PATH,
|
|
526
|
+
stroke: color,
|
|
527
|
+
strokeWidth,
|
|
528
|
+
strokeLinecap: "round",
|
|
529
|
+
strokeLinejoin: "round"
|
|
530
|
+
}
|
|
531
|
+
) });
|
|
532
|
+
}
|
|
533
|
+
|
|
410
534
|
// src/icons/Show/showPath.ts
|
|
411
535
|
var SHOW_PATH = "M1.66669 10C1.66669 10 4.16669 4.16667 10 4.16667C15.8334 4.16667 18.3334 10 18.3334 10C18.3334 10 15.8334 15.8333 10 15.8333C4.16669 15.8333 1.66669 10 1.66669 10Z";
|
|
412
536
|
var SHOW_PUPIL_PATH = "M10 12.5C11.3807 12.5 12.5 11.3807 12.5 10C12.5 8.61929 11.3807 7.5 10 7.5C8.61929 7.5 7.5 8.61929 7.5 10C7.5 11.3807 8.61929 12.5 10 12.5Z";
|
|
@@ -450,36 +574,63 @@ function UserIcon({ size = 20, color = colors.primary, strokeWidth = 2 }) {
|
|
|
450
574
|
) });
|
|
451
575
|
}
|
|
452
576
|
|
|
577
|
+
// src/icons/Video/videoPath.ts
|
|
578
|
+
var VIDEO_PATHS = [
|
|
579
|
+
"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",
|
|
580
|
+
"M1.33337 6.53333C1.33337 5.41322 1.33337 4.85317 1.55136 4.42535C1.74311 4.04902 2.04907 3.74306 2.42539 3.55132C2.85322 3.33333 3.41327 3.33333 4.53337 3.33333H8.13337C9.25348 3.33333 9.81353 3.33333 10.2414 3.55132C10.6177 3.74306 10.9236 4.04902 11.1154 4.42535C11.3334 4.85317 11.3334 5.41322 11.3334 6.53333V9.46666C11.3334 10.5868 11.3334 11.1468 11.1154 11.5746C10.9236 11.951 10.6177 12.2569 10.2414 12.4487C9.81353 12.6667 9.25348 12.6667 8.13337 12.6667H4.53337C3.41327 12.6667 2.85322 12.6667 2.42539 12.4487C2.04907 12.2569 1.74311 11.951 1.55136 11.5746C1.33337 11.1468 1.33337 10.5868 1.33337 9.46666V6.53333Z"
|
|
581
|
+
];
|
|
582
|
+
function VideoIcon({ size = 20, color = colors.primary, strokeWidth = 1.5 }) {
|
|
583
|
+
return /* @__PURE__ */ jsx(Svg, { width: size, height: size, viewBox: "0 0 16 16", fill: "none", children: VIDEO_PATHS.map((path) => /* @__PURE__ */ jsx(
|
|
584
|
+
Path,
|
|
585
|
+
{
|
|
586
|
+
d: path,
|
|
587
|
+
stroke: color,
|
|
588
|
+
strokeWidth,
|
|
589
|
+
strokeLinecap: "round",
|
|
590
|
+
strokeLinejoin: "round"
|
|
591
|
+
},
|
|
592
|
+
path
|
|
593
|
+
)) });
|
|
594
|
+
}
|
|
595
|
+
|
|
453
596
|
// src/icons/registry.ts
|
|
454
597
|
var icons = {
|
|
455
598
|
arrowRight: ArrowRightIcon,
|
|
456
599
|
bag: BagIcon,
|
|
457
600
|
bell: BellIcon,
|
|
458
601
|
building: BuildingIcon,
|
|
602
|
+
calendar: CalendarIcon,
|
|
459
603
|
camera: CameraIcon,
|
|
460
604
|
check: CheckIcon,
|
|
461
605
|
checkBadge: CheckBadgeIcon,
|
|
462
606
|
chevronDown: ChevronDownIcon,
|
|
463
607
|
clock: ClockIcon,
|
|
464
608
|
facebook: FacebookIcon,
|
|
609
|
+
heart: HeartIcon,
|
|
610
|
+
helpCircle: HelpCircleIcon,
|
|
465
611
|
home: HomeIcon,
|
|
466
612
|
instagram: InstagramIcon,
|
|
467
613
|
key: KeyIcon,
|
|
614
|
+
layoutGrid: LayoutGridIcon,
|
|
468
615
|
linkedin: LinkedInIcon,
|
|
616
|
+
logOut: LogOutIcon,
|
|
469
617
|
mail: MailIcon,
|
|
470
618
|
navigate: NavigateIcon,
|
|
471
619
|
phone: PhoneIcon,
|
|
472
620
|
search: SearchIcon,
|
|
621
|
+
settings: SettingsIcon,
|
|
473
622
|
show: ShowIcon,
|
|
474
|
-
user: UserIcon
|
|
623
|
+
user: UserIcon,
|
|
624
|
+
video: VideoIcon
|
|
475
625
|
};
|
|
476
626
|
var iconNames = Object.keys(icons);
|
|
477
627
|
var iconGroups = {
|
|
478
628
|
navigation: ["arrowRight", "chevronDown", "home", "navigate"],
|
|
479
|
-
actions: ["show", "bell", "camera", "key", "check", "checkBadge", "search"],
|
|
480
|
-
objects: ["bag", "building", "clock", "user"],
|
|
629
|
+
actions: ["show", "bell", "camera", "key", "check", "checkBadge", "search", "calendar", "heart"],
|
|
630
|
+
objects: ["bag", "building", "clock", "user", "video"],
|
|
481
631
|
communication: ["mail", "phone"],
|
|
482
|
-
social: ["facebook", "instagram", "linkedin"]
|
|
632
|
+
social: ["facebook", "instagram", "linkedin"],
|
|
633
|
+
interface: ["layoutGrid", "settings", "helpCircle", "logOut"]
|
|
483
634
|
};
|
|
484
635
|
var iconGroupNames = Object.keys(iconGroups);
|
|
485
636
|
function getIconsByGroup(group) {
|
|
@@ -541,6 +692,268 @@ function useApplyWebClassName(ref, className, enabled = true) {
|
|
|
541
692
|
};
|
|
542
693
|
}, [ref, className, enabled]);
|
|
543
694
|
}
|
|
695
|
+
var IMAGE_SIZE = 48;
|
|
696
|
+
var CONTAINER_RADIUS = 71;
|
|
697
|
+
var CHEVRON_SIZE = 20;
|
|
698
|
+
var FALLBACK_ICON_SIZE = 20;
|
|
699
|
+
var MENU_RADIUS = 16;
|
|
700
|
+
var MENU_ITEM_RADIUS = 12;
|
|
701
|
+
var MENU_ITEM_ICON_SIZE = 16;
|
|
702
|
+
var Avatar = forwardRef(function Avatar2({
|
|
703
|
+
name,
|
|
704
|
+
email,
|
|
705
|
+
imageUrl,
|
|
706
|
+
onPress,
|
|
707
|
+
disabled = false,
|
|
708
|
+
showChevron = true,
|
|
709
|
+
menuItems,
|
|
710
|
+
open: openProp,
|
|
711
|
+
defaultOpen = false,
|
|
712
|
+
onOpenChange,
|
|
713
|
+
menuWidth,
|
|
714
|
+
style,
|
|
715
|
+
className,
|
|
716
|
+
accessibilityLabel,
|
|
717
|
+
hitSlop = 8,
|
|
718
|
+
...rest
|
|
719
|
+
}, forwardedRef) {
|
|
720
|
+
const wrapperRef = useRef(null);
|
|
721
|
+
const containerRef = useRef(null);
|
|
722
|
+
const setContainerRef = useMemo(() => mergeRefs(containerRef, forwardedRef), [forwardedRef]);
|
|
723
|
+
const [imageFailed, setImageFailed] = useState(false);
|
|
724
|
+
const [hoveredKey, setHoveredKey] = useState(null);
|
|
725
|
+
const hasMenu = Boolean(menuItems && menuItems.length > 0);
|
|
726
|
+
const isInteractive = onPress != null || hasMenu;
|
|
727
|
+
const isOpenControlled = typeof openProp === "boolean";
|
|
728
|
+
const [uncontrolledOpen, setUncontrolledOpen] = useState(defaultOpen);
|
|
729
|
+
const isOpen = hasMenu && (isOpenControlled ? openProp : uncontrolledOpen);
|
|
730
|
+
useApplyWebClassName(containerRef, className);
|
|
731
|
+
const setOpen = useCallback(
|
|
732
|
+
(next) => {
|
|
733
|
+
if (!isOpenControlled) setUncontrolledOpen(next);
|
|
734
|
+
onOpenChange?.(next);
|
|
735
|
+
if (!next) setHoveredKey(null);
|
|
736
|
+
},
|
|
737
|
+
[isOpenControlled, onOpenChange]
|
|
738
|
+
);
|
|
739
|
+
const focusTrigger = useCallback(() => {
|
|
740
|
+
const node = containerRef.current;
|
|
741
|
+
node?.focus?.();
|
|
742
|
+
}, []);
|
|
743
|
+
const closeAndFocusTrigger = useCallback(() => {
|
|
744
|
+
setOpen(false);
|
|
745
|
+
focusTrigger();
|
|
746
|
+
}, [focusTrigger, setOpen]);
|
|
747
|
+
const handlePress = (event) => {
|
|
748
|
+
onPress?.(event);
|
|
749
|
+
if (hasMenu) setOpen(!isOpen);
|
|
750
|
+
};
|
|
751
|
+
const handleItemPress = useCallback(
|
|
752
|
+
(item) => {
|
|
753
|
+
if (item.disabled) return;
|
|
754
|
+
item.onPress();
|
|
755
|
+
closeAndFocusTrigger();
|
|
756
|
+
},
|
|
757
|
+
[closeAndFocusTrigger]
|
|
758
|
+
);
|
|
759
|
+
useEffect(() => {
|
|
760
|
+
if (Platform.OS !== "web" || !isOpen) return;
|
|
761
|
+
const handlePointerDown = (event) => {
|
|
762
|
+
const wrapper = wrapperRef.current;
|
|
763
|
+
const target = event.target;
|
|
764
|
+
if (wrapper?.contains && target instanceof Node && !wrapper.contains(target)) {
|
|
765
|
+
setOpen(false);
|
|
766
|
+
}
|
|
767
|
+
};
|
|
768
|
+
document.addEventListener("mousedown", handlePointerDown);
|
|
769
|
+
document.addEventListener("touchstart", handlePointerDown);
|
|
770
|
+
return () => {
|
|
771
|
+
document.removeEventListener("mousedown", handlePointerDown);
|
|
772
|
+
document.removeEventListener("touchstart", handlePointerDown);
|
|
773
|
+
};
|
|
774
|
+
}, [isOpen, setOpen]);
|
|
775
|
+
useEffect(() => {
|
|
776
|
+
if (Platform.OS !== "web" || !isOpen) return;
|
|
777
|
+
const handleKeyDown = (event) => {
|
|
778
|
+
if (event.key === "Escape") {
|
|
779
|
+
event.preventDefault();
|
|
780
|
+
closeAndFocusTrigger();
|
|
781
|
+
}
|
|
782
|
+
};
|
|
783
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
784
|
+
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
785
|
+
}, [isOpen, closeAndFocusTrigger]);
|
|
786
|
+
const hasImage = Boolean(imageUrl) && !imageFailed;
|
|
787
|
+
const resolvedAccessibilityLabel = accessibilityLabel ?? [name, email].filter(Boolean).join(", ");
|
|
788
|
+
return /* @__PURE__ */ jsxs(View, { ref: wrapperRef, style: [styles.wrapper, isOpen && styles.wrapperOpen], children: [
|
|
789
|
+
/* @__PURE__ */ jsxs(
|
|
790
|
+
Pressable,
|
|
791
|
+
{
|
|
792
|
+
...rest,
|
|
793
|
+
ref: setContainerRef,
|
|
794
|
+
onPress: handlePress,
|
|
795
|
+
disabled: disabled || !isInteractive,
|
|
796
|
+
hitSlop: isInteractive ? hitSlop : void 0,
|
|
797
|
+
accessibilityRole: isInteractive ? "button" : void 0,
|
|
798
|
+
accessibilityLabel: resolvedAccessibilityLabel,
|
|
799
|
+
accessibilityState: isInteractive ? { disabled, expanded: hasMenu ? isOpen : void 0 } : void 0,
|
|
800
|
+
style: [styles.root, disabled && styles.disabled, style],
|
|
801
|
+
children: [
|
|
802
|
+
/* @__PURE__ */ jsx(View, { style: styles.imageWrap, children: hasImage ? /* @__PURE__ */ jsx(
|
|
803
|
+
Image,
|
|
804
|
+
{
|
|
805
|
+
source: { uri: imageUrl ?? void 0 },
|
|
806
|
+
style: styles.image,
|
|
807
|
+
onError: () => setImageFailed(true)
|
|
808
|
+
}
|
|
809
|
+
) : /* @__PURE__ */ jsx(View, { style: styles.imageFallback, children: /* @__PURE__ */ jsx(UserIcon, { size: FALLBACK_ICON_SIZE, color: colors.primary }) }) }),
|
|
810
|
+
/* @__PURE__ */ jsxs(View, { style: styles.textColumn, children: [
|
|
811
|
+
/* @__PURE__ */ jsx(Text, { style: styles.name, numberOfLines: 1, children: name }),
|
|
812
|
+
email ? /* @__PURE__ */ jsx(Text, { style: styles.email, numberOfLines: 1, children: email }) : null
|
|
813
|
+
] }),
|
|
814
|
+
showChevron ? /* @__PURE__ */ jsx(View, { style: [styles.chevronSlot, isOpen && styles.chevronOpen], children: /* @__PURE__ */ jsx(ChevronDownIcon, { size: CHEVRON_SIZE, color: isOpen ? colors.primary : colors.grey100 }) }) : null
|
|
815
|
+
]
|
|
816
|
+
}
|
|
817
|
+
),
|
|
818
|
+
hasMenu && isOpen ? /* @__PURE__ */ jsx(View, { style: [styles.menu, menuWidth != null && { right: void 0, width: menuWidth }], children: menuItems.map((item) => {
|
|
819
|
+
const itemKey = item.key ?? item.label;
|
|
820
|
+
const isHovered = hoveredKey === itemKey;
|
|
821
|
+
const backgroundColor = isHovered ? item.hoverColor ?? colors.grey600 : item.backgroundColor ?? "transparent";
|
|
822
|
+
return /* @__PURE__ */ jsxs(
|
|
823
|
+
Pressable,
|
|
824
|
+
{
|
|
825
|
+
onPress: () => handleItemPress(item),
|
|
826
|
+
disabled: item.disabled,
|
|
827
|
+
onHoverIn: () => setHoveredKey(itemKey),
|
|
828
|
+
onHoverOut: () => setHoveredKey((current) => current === itemKey ? null : current),
|
|
829
|
+
onPressIn: () => setHoveredKey(itemKey),
|
|
830
|
+
onPressOut: () => setHoveredKey((current) => current === itemKey ? null : current),
|
|
831
|
+
accessibilityRole: "menuitem",
|
|
832
|
+
accessibilityState: { disabled: item.disabled },
|
|
833
|
+
style: [
|
|
834
|
+
styles.menuItem,
|
|
835
|
+
{ backgroundColor },
|
|
836
|
+
item.disabled && styles.menuItemDisabled
|
|
837
|
+
],
|
|
838
|
+
children: [
|
|
839
|
+
item.icon ? /* @__PURE__ */ jsx(View, { style: styles.menuItemIcon, children: item.icon }) : null,
|
|
840
|
+
/* @__PURE__ */ jsx(Text, { style: styles.menuItemLabel, numberOfLines: 1, children: item.label })
|
|
841
|
+
]
|
|
842
|
+
},
|
|
843
|
+
itemKey
|
|
844
|
+
);
|
|
845
|
+
}) }) : null
|
|
846
|
+
] });
|
|
847
|
+
});
|
|
848
|
+
var styles = StyleSheet.create({
|
|
849
|
+
wrapper: {
|
|
850
|
+
position: "relative",
|
|
851
|
+
alignSelf: "flex-start"
|
|
852
|
+
},
|
|
853
|
+
wrapperOpen: {
|
|
854
|
+
zIndex: 20
|
|
855
|
+
},
|
|
856
|
+
root: {
|
|
857
|
+
flexDirection: "row",
|
|
858
|
+
alignItems: "center",
|
|
859
|
+
alignSelf: "flex-start",
|
|
860
|
+
gap: 12,
|
|
861
|
+
paddingTop: 4,
|
|
862
|
+
paddingBottom: 4,
|
|
863
|
+
paddingLeft: 4,
|
|
864
|
+
paddingRight: 12,
|
|
865
|
+
borderRadius: CONTAINER_RADIUS,
|
|
866
|
+
backgroundColor: colors.grey700
|
|
867
|
+
},
|
|
868
|
+
disabled: {
|
|
869
|
+
opacity: 0.6
|
|
870
|
+
},
|
|
871
|
+
imageWrap: {
|
|
872
|
+
width: IMAGE_SIZE,
|
|
873
|
+
height: IMAGE_SIZE,
|
|
874
|
+
borderRadius: IMAGE_SIZE / 2,
|
|
875
|
+
overflow: "hidden",
|
|
876
|
+
flexShrink: 0
|
|
877
|
+
},
|
|
878
|
+
image: {
|
|
879
|
+
width: IMAGE_SIZE,
|
|
880
|
+
height: IMAGE_SIZE
|
|
881
|
+
},
|
|
882
|
+
imageFallback: {
|
|
883
|
+
width: IMAGE_SIZE,
|
|
884
|
+
height: IMAGE_SIZE,
|
|
885
|
+
alignItems: "center",
|
|
886
|
+
justifyContent: "center",
|
|
887
|
+
backgroundColor: colors.grey600
|
|
888
|
+
},
|
|
889
|
+
textColumn: {
|
|
890
|
+
minWidth: 0,
|
|
891
|
+
flexShrink: 1,
|
|
892
|
+
gap: 3
|
|
893
|
+
},
|
|
894
|
+
name: {
|
|
895
|
+
...avatarTypography.name,
|
|
896
|
+
color: colors.white
|
|
897
|
+
},
|
|
898
|
+
email: {
|
|
899
|
+
...avatarTypography.email,
|
|
900
|
+
color: colors.grey0
|
|
901
|
+
},
|
|
902
|
+
chevronSlot: {
|
|
903
|
+
width: CHEVRON_SIZE,
|
|
904
|
+
height: CHEVRON_SIZE,
|
|
905
|
+
alignItems: "center",
|
|
906
|
+
justifyContent: "center",
|
|
907
|
+
flexShrink: 0
|
|
908
|
+
},
|
|
909
|
+
chevronOpen: {
|
|
910
|
+
transform: [{ rotate: "180deg" }]
|
|
911
|
+
},
|
|
912
|
+
menu: {
|
|
913
|
+
position: "absolute",
|
|
914
|
+
top: "100%",
|
|
915
|
+
left: 0,
|
|
916
|
+
right: 0,
|
|
917
|
+
marginTop: 8,
|
|
918
|
+
zIndex: 10,
|
|
919
|
+
borderRadius: MENU_RADIUS,
|
|
920
|
+
padding: 8,
|
|
921
|
+
gap: 8,
|
|
922
|
+
backgroundColor: colors.grey700,
|
|
923
|
+
...Platform.select({
|
|
924
|
+
web: {
|
|
925
|
+
boxShadow: `0 8px 24px ${colors.black}73`
|
|
926
|
+
},
|
|
927
|
+
default: {
|
|
928
|
+
elevation: 8
|
|
929
|
+
}
|
|
930
|
+
})
|
|
931
|
+
},
|
|
932
|
+
menuItem: {
|
|
933
|
+
minHeight: 40,
|
|
934
|
+
borderRadius: MENU_ITEM_RADIUS,
|
|
935
|
+
paddingVertical: 12,
|
|
936
|
+
paddingHorizontal: 12,
|
|
937
|
+
flexDirection: "row",
|
|
938
|
+
alignItems: "center",
|
|
939
|
+
gap: 8
|
|
940
|
+
},
|
|
941
|
+
menuItemDisabled: {
|
|
942
|
+
opacity: 0.5
|
|
943
|
+
},
|
|
944
|
+
menuItemIcon: {
|
|
945
|
+
width: MENU_ITEM_ICON_SIZE,
|
|
946
|
+
height: MENU_ITEM_ICON_SIZE,
|
|
947
|
+
alignItems: "center",
|
|
948
|
+
justifyContent: "center",
|
|
949
|
+
flexShrink: 0
|
|
950
|
+
},
|
|
951
|
+
menuItemLabel: {
|
|
952
|
+
...avatarTypography.menuItem,
|
|
953
|
+
color: colors.white,
|
|
954
|
+
flex: 1
|
|
955
|
+
}
|
|
956
|
+
});
|
|
544
957
|
var variantConfig = {
|
|
545
958
|
primary: {
|
|
546
959
|
backgroundColor: colors.primary,
|
|
@@ -613,7 +1026,7 @@ var Button = forwardRef(
|
|
|
613
1026
|
useApplyWebClassName(textRef, textClassName);
|
|
614
1027
|
const iconNode = customIcon ?? /* @__PURE__ */ jsx(ArrowRightIcon, { size: metrics.iconSize, color: preset.iconColor });
|
|
615
1028
|
const containerStyle = [
|
|
616
|
-
|
|
1029
|
+
styles2.base,
|
|
617
1030
|
{
|
|
618
1031
|
minHeight: metrics.minHeight,
|
|
619
1032
|
borderRadius: metrics.borderRadius,
|
|
@@ -624,15 +1037,15 @@ var Button = forwardRef(
|
|
|
624
1037
|
paddingRight: hasIcon ? metrics.paddingRightWithIcon : metrics.paddingRight,
|
|
625
1038
|
gap: hasIcon ? metrics.gap : 0
|
|
626
1039
|
},
|
|
627
|
-
disabled &&
|
|
1040
|
+
disabled && styles2.disabled,
|
|
628
1041
|
style
|
|
629
1042
|
];
|
|
630
1043
|
const labelStyle = [
|
|
631
|
-
|
|
1044
|
+
styles2.label,
|
|
632
1045
|
metrics.text,
|
|
633
1046
|
{ color: preset.textColor },
|
|
634
|
-
Platform.OS === "android" ?
|
|
635
|
-
!hasIcon &&
|
|
1047
|
+
Platform.OS === "android" ? styles2.labelAndroid : null,
|
|
1048
|
+
!hasIcon && styles2.labelCentered,
|
|
636
1049
|
textStyle
|
|
637
1050
|
];
|
|
638
1051
|
return /* @__PURE__ */ jsxs(
|
|
@@ -653,7 +1066,7 @@ var Button = forwardRef(
|
|
|
653
1066
|
View,
|
|
654
1067
|
{
|
|
655
1068
|
style: [
|
|
656
|
-
|
|
1069
|
+
styles2.iconContainer,
|
|
657
1070
|
{
|
|
658
1071
|
width: metrics.iconContainerSize,
|
|
659
1072
|
height: metrics.iconContainerSize,
|
|
@@ -669,7 +1082,7 @@ var Button = forwardRef(
|
|
|
669
1082
|
);
|
|
670
1083
|
}
|
|
671
1084
|
);
|
|
672
|
-
var
|
|
1085
|
+
var styles2 = StyleSheet.create({
|
|
673
1086
|
base: {
|
|
674
1087
|
flexDirection: "row",
|
|
675
1088
|
alignItems: "center",
|
|
@@ -747,13 +1160,13 @@ var Checkbox = forwardRef(function Checkbox2({
|
|
|
747
1160
|
accessibilityRole: "checkbox",
|
|
748
1161
|
accessibilityLabel: resolvedAccessibilityLabel,
|
|
749
1162
|
accessibilityState: { checked: isActive, disabled },
|
|
750
|
-
style: [
|
|
1163
|
+
style: [styles3.root, disabled && styles3.disabled, style],
|
|
751
1164
|
children: [
|
|
752
1165
|
/* @__PURE__ */ jsx(
|
|
753
1166
|
View,
|
|
754
1167
|
{
|
|
755
1168
|
style: [
|
|
756
|
-
|
|
1169
|
+
styles3.box,
|
|
757
1170
|
{
|
|
758
1171
|
backgroundColor: chrome.backgroundColor,
|
|
759
1172
|
borderColor: chrome.borderColor
|
|
@@ -762,12 +1175,12 @@ var Checkbox = forwardRef(function Checkbox2({
|
|
|
762
1175
|
children: isActive ? /* @__PURE__ */ jsx(CheckIcon, { size: CHECK_SIZE, color: colors.primary, strokeWidth: CHECK_STROKE }) : null
|
|
763
1176
|
}
|
|
764
1177
|
),
|
|
765
|
-
labelContent != null && labelContent !== false ? typeof labelContent === "string" || typeof labelContent === "number" ? /* @__PURE__ */ jsx(Text, { style: [
|
|
1178
|
+
labelContent != null && labelContent !== false ? typeof labelContent === "string" || typeof labelContent === "number" ? /* @__PURE__ */ jsx(Text, { style: [styles3.label, labelStyle], children: labelContent }) : labelContent : null
|
|
766
1179
|
]
|
|
767
1180
|
}
|
|
768
1181
|
);
|
|
769
1182
|
});
|
|
770
|
-
var
|
|
1183
|
+
var styles3 = StyleSheet.create({
|
|
771
1184
|
root: {
|
|
772
1185
|
flexDirection: "row",
|
|
773
1186
|
alignItems: "center",
|
|
@@ -915,13 +1328,13 @@ var Input = forwardRef(function Input2({
|
|
|
915
1328
|
const rightIconNode = rightIcon ?? /* @__PURE__ */ jsx(ShowIcon, { size: metrics.iconSize, color: chrome.rightIconColor });
|
|
916
1329
|
useApplyWebClassName(rootRef, className);
|
|
917
1330
|
useApplyWebClassName(inputRef, inputClassName);
|
|
918
|
-
return /* @__PURE__ */ jsxs(View, { ref: rootRef, style: [
|
|
919
|
-
showLabel && label ? /* @__PURE__ */ jsx(Text, { style: [
|
|
1331
|
+
return /* @__PURE__ */ jsxs(View, { ref: rootRef, style: [styles4.root, disabled && styles4.disabled, style], children: [
|
|
1332
|
+
showLabel && label ? /* @__PURE__ */ jsx(Text, { style: [styles4.label, { color: chrome.labelColor }], children: label }) : null,
|
|
920
1333
|
/* @__PURE__ */ jsxs(
|
|
921
1334
|
View,
|
|
922
1335
|
{
|
|
923
1336
|
style: [
|
|
924
|
-
|
|
1337
|
+
styles4.field,
|
|
925
1338
|
{
|
|
926
1339
|
height: metrics.height,
|
|
927
1340
|
borderRadius: metrics.borderRadius,
|
|
@@ -936,7 +1349,7 @@ var Input = forwardRef(function Input2({
|
|
|
936
1349
|
fieldStyle
|
|
937
1350
|
],
|
|
938
1351
|
children: [
|
|
939
|
-
hasLeftIcon ? /* @__PURE__ */ jsx(View, { style: [
|
|
1352
|
+
hasLeftIcon ? /* @__PURE__ */ jsx(View, { style: [styles4.iconSlot, { width: metrics.iconSize, height: metrics.iconSize }], children: leftIconNode }) : null,
|
|
940
1353
|
/* @__PURE__ */ jsx(
|
|
941
1354
|
TextInput,
|
|
942
1355
|
{
|
|
@@ -960,11 +1373,11 @@ var Input = forwardRef(function Input2({
|
|
|
960
1373
|
onBlur?.(event);
|
|
961
1374
|
},
|
|
962
1375
|
style: [
|
|
963
|
-
|
|
1376
|
+
styles4.input,
|
|
964
1377
|
metrics.text,
|
|
965
1378
|
{ color: chrome.textColor },
|
|
966
|
-
Platform.OS === "web" ?
|
|
967
|
-
Platform.OS === "android" ?
|
|
1379
|
+
Platform.OS === "web" ? styles4.inputWeb : null,
|
|
1380
|
+
Platform.OS === "android" ? styles4.inputAndroid : null,
|
|
968
1381
|
inputStyle
|
|
969
1382
|
],
|
|
970
1383
|
accessibilityLabel: resolvedAccessibilityLabel,
|
|
@@ -976,20 +1389,20 @@ var Input = forwardRef(function Input2({
|
|
|
976
1389
|
{
|
|
977
1390
|
onPress: onRightIconPress,
|
|
978
1391
|
disabled,
|
|
979
|
-
style: [
|
|
1392
|
+
style: [styles4.iconSlot, { width: metrics.iconSize, height: metrics.iconSize }],
|
|
980
1393
|
accessibilityRole: "button",
|
|
981
1394
|
accessibilityLabel: rightIconAccessibilityLabel,
|
|
982
1395
|
hitSlop: 8,
|
|
983
1396
|
children: rightIconNode
|
|
984
1397
|
}
|
|
985
|
-
) : /* @__PURE__ */ jsx(View, { style: [
|
|
1398
|
+
) : /* @__PURE__ */ jsx(View, { style: [styles4.iconSlot, { width: metrics.iconSize, height: metrics.iconSize }], children: rightIconNode }) : null
|
|
986
1399
|
]
|
|
987
1400
|
}
|
|
988
1401
|
),
|
|
989
|
-
showHint && hint ? /* @__PURE__ */ jsx(Text, { style: [
|
|
1402
|
+
showHint && hint ? /* @__PURE__ */ jsx(Text, { style: [styles4.hint, { color: chrome.hintColor }], children: hint }) : null
|
|
990
1403
|
] });
|
|
991
1404
|
});
|
|
992
|
-
var
|
|
1405
|
+
var styles4 = StyleSheet.create({
|
|
993
1406
|
root: {
|
|
994
1407
|
width: DEFAULT_WIDTH,
|
|
995
1408
|
gap: 8,
|
|
@@ -1029,7 +1442,7 @@ var styles3 = StyleSheet.create({
|
|
|
1029
1442
|
var DEFAULT_WIDTH2 = 308;
|
|
1030
1443
|
var TRIGGER_HEIGHT = 44;
|
|
1031
1444
|
var TRIGGER_RADIUS = 60;
|
|
1032
|
-
var
|
|
1445
|
+
var MENU_RADIUS2 = 24;
|
|
1033
1446
|
var MENU_MAX_LIST_HEIGHT = 248;
|
|
1034
1447
|
var ITEM_RADIUS = 12;
|
|
1035
1448
|
var ICON_SIZE = 20;
|
|
@@ -1105,25 +1518,25 @@ function MultiValueChips({ options, disabled, onRemove }) {
|
|
|
1105
1518
|
const next = Math.ceil(event.nativeEvent.layout.width);
|
|
1106
1519
|
setEllipsisWidth((current) => current === next ? current : next);
|
|
1107
1520
|
};
|
|
1108
|
-
return /* @__PURE__ */ jsxs(View, { style:
|
|
1109
|
-
/* @__PURE__ */ jsxs(View, { pointerEvents: "none", style:
|
|
1521
|
+
return /* @__PURE__ */ jsxs(View, { style: styles5.multiValueRoot, children: [
|
|
1522
|
+
/* @__PURE__ */ jsxs(View, { pointerEvents: "none", style: styles5.measureRow, children: [
|
|
1110
1523
|
options.map((option) => /* @__PURE__ */ jsxs(
|
|
1111
1524
|
View,
|
|
1112
1525
|
{
|
|
1113
|
-
style:
|
|
1526
|
+
style: styles5.chip,
|
|
1114
1527
|
onLayout: (event) => handleChipLayout(option.value, event),
|
|
1115
1528
|
children: [
|
|
1116
|
-
/* @__PURE__ */ jsx(Text, { style:
|
|
1117
|
-
/* @__PURE__ */ jsx(Text, { style:
|
|
1529
|
+
/* @__PURE__ */ jsx(Text, { style: styles5.chipLabel, numberOfLines: 1, children: option.label }),
|
|
1530
|
+
/* @__PURE__ */ jsx(Text, { style: styles5.chipRemove, children: "\xD7" })
|
|
1118
1531
|
]
|
|
1119
1532
|
},
|
|
1120
1533
|
`measure-${option.value}`
|
|
1121
1534
|
)),
|
|
1122
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
1535
|
+
/* @__PURE__ */ jsx(View, { style: styles5.ellipsis, onLayout: handleEllipsisLayout, children: /* @__PURE__ */ jsx(Text, { style: styles5.ellipsisText, children: "..." }) })
|
|
1123
1536
|
] }),
|
|
1124
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
1125
|
-
visible.map((option) => /* @__PURE__ */ jsxs(View, { style:
|
|
1126
|
-
/* @__PURE__ */ jsx(Text, { style:
|
|
1537
|
+
/* @__PURE__ */ jsxs(View, { style: styles5.chipsRow, onLayout: handleContainerLayout, children: [
|
|
1538
|
+
visible.map((option) => /* @__PURE__ */ jsxs(View, { style: styles5.chip, children: [
|
|
1539
|
+
/* @__PURE__ */ jsx(Text, { style: styles5.chipLabel, numberOfLines: 1, children: option.label }),
|
|
1127
1540
|
/* @__PURE__ */ jsx(
|
|
1128
1541
|
Pressable,
|
|
1129
1542
|
{
|
|
@@ -1135,11 +1548,11 @@ function MultiValueChips({ options, disabled, onRemove }) {
|
|
|
1135
1548
|
hitSlop: 6,
|
|
1136
1549
|
accessibilityRole: "button",
|
|
1137
1550
|
accessibilityLabel: `Remove ${option.label}`,
|
|
1138
|
-
children: /* @__PURE__ */ jsx(Text, { style:
|
|
1551
|
+
children: /* @__PURE__ */ jsx(Text, { style: styles5.chipRemove, children: "\xD7" })
|
|
1139
1552
|
}
|
|
1140
1553
|
)
|
|
1141
1554
|
] }, option.value)),
|
|
1142
|
-
hasOverflow ? /* @__PURE__ */ jsx(View, { style:
|
|
1555
|
+
hasOverflow ? /* @__PURE__ */ jsx(View, { style: styles5.ellipsis, children: /* @__PURE__ */ jsx(Text, { style: styles5.ellipsisText, children: "..." }) }) : null
|
|
1143
1556
|
] })
|
|
1144
1557
|
] });
|
|
1145
1558
|
}
|
|
@@ -1366,11 +1779,11 @@ var Select = forwardRef(
|
|
|
1366
1779
|
{
|
|
1367
1780
|
...rest,
|
|
1368
1781
|
ref: setRootRef,
|
|
1369
|
-
style: [
|
|
1782
|
+
style: [styles5.root, isOpen && styles5.rootOpen, disabled && styles5.disabled, style],
|
|
1370
1783
|
accessibilityState: { disabled, expanded: isOpen },
|
|
1371
1784
|
children: [
|
|
1372
|
-
showLabel && label ? /* @__PURE__ */ jsx(Text, { style: [
|
|
1373
|
-
/* @__PURE__ */ jsxs(View, { style: [
|
|
1785
|
+
showLabel && label ? /* @__PURE__ */ jsx(Text, { style: [styles5.label, { color: labelColor }], children: label }) : null,
|
|
1786
|
+
/* @__PURE__ */ jsxs(View, { style: [styles5.triggerWrap, isOpen && styles5.triggerWrapOpen], children: [
|
|
1374
1787
|
/* @__PURE__ */ jsxs(
|
|
1375
1788
|
Pressable,
|
|
1376
1789
|
{
|
|
@@ -1381,29 +1794,29 @@ var Select = forwardRef(
|
|
|
1381
1794
|
accessibilityLabel: resolvedAccessibilityLabel,
|
|
1382
1795
|
accessibilityState: { disabled, expanded: isOpen },
|
|
1383
1796
|
style: [
|
|
1384
|
-
|
|
1797
|
+
styles5.trigger,
|
|
1385
1798
|
{
|
|
1386
1799
|
borderColor: triggerBorderColor,
|
|
1387
1800
|
backgroundColor: colors.grey700
|
|
1388
1801
|
}
|
|
1389
1802
|
],
|
|
1390
1803
|
children: [
|
|
1391
|
-
hasLeftIcon ? /* @__PURE__ */ jsx(View, { style:
|
|
1392
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
1804
|
+
hasLeftIcon ? /* @__PURE__ */ jsx(View, { style: styles5.iconSlot, children: leftIconNode }) : null,
|
|
1805
|
+
/* @__PURE__ */ jsx(View, { style: styles5.triggerContent, children: multiple && hasValue ? /* @__PURE__ */ jsx(
|
|
1393
1806
|
MultiValueChips,
|
|
1394
1807
|
{
|
|
1395
1808
|
options: selectedOptions,
|
|
1396
1809
|
disabled,
|
|
1397
1810
|
onRemove: handleRemoveChip
|
|
1398
1811
|
}
|
|
1399
|
-
) : /* @__PURE__ */ jsx(Text, { style: [
|
|
1400
|
-
/* @__PURE__ */ jsx(View, { style: [
|
|
1812
|
+
) : /* @__PURE__ */ jsx(Text, { style: [styles5.triggerText, { color: triggerTextColor }], numberOfLines: 1, children: multiple ? placeholder : singleLabel }) }),
|
|
1813
|
+
/* @__PURE__ */ jsx(View, { style: [styles5.iconSlot, isOpen && styles5.chevronOpen], children: /* @__PURE__ */ jsx(ChevronDownIcon, { size: ICON_SIZE, color: isOpen ? colors.primary : colors.grey100 }) })
|
|
1401
1814
|
]
|
|
1402
1815
|
}
|
|
1403
1816
|
),
|
|
1404
|
-
isOpen ? /* @__PURE__ */ jsxs(View, { style:
|
|
1405
|
-
showSearch ? /* @__PURE__ */ jsxs(View, { style:
|
|
1406
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
1817
|
+
isOpen ? /* @__PURE__ */ jsxs(View, { style: styles5.menu, children: [
|
|
1818
|
+
showSearch ? /* @__PURE__ */ jsxs(View, { style: styles5.searchField, children: [
|
|
1819
|
+
/* @__PURE__ */ jsx(View, { style: styles5.iconSlot, children: /* @__PURE__ */ jsx(SearchIcon, { size: ICON_SIZE, color: colors.grey100 }) }),
|
|
1407
1820
|
/* @__PURE__ */ jsx(
|
|
1408
1821
|
TextInput,
|
|
1409
1822
|
{
|
|
@@ -1414,9 +1827,9 @@ var Select = forwardRef(
|
|
|
1414
1827
|
placeholder: searchPlaceholder,
|
|
1415
1828
|
placeholderTextColor: colors.grey100,
|
|
1416
1829
|
style: [
|
|
1417
|
-
|
|
1418
|
-
Platform.OS === "web" ?
|
|
1419
|
-
Platform.OS === "android" ?
|
|
1830
|
+
styles5.searchInput,
|
|
1831
|
+
Platform.OS === "web" ? styles5.searchInputWeb : null,
|
|
1832
|
+
Platform.OS === "android" ? styles5.searchInputAndroid : null
|
|
1420
1833
|
],
|
|
1421
1834
|
accessibilityLabel: searchPlaceholder
|
|
1422
1835
|
}
|
|
@@ -1425,12 +1838,12 @@ var Select = forwardRef(
|
|
|
1425
1838
|
/* @__PURE__ */ jsxs(
|
|
1426
1839
|
ScrollView,
|
|
1427
1840
|
{
|
|
1428
|
-
style:
|
|
1429
|
-
contentContainerStyle:
|
|
1841
|
+
style: styles5.optionList,
|
|
1842
|
+
contentContainerStyle: styles5.optionListContent,
|
|
1430
1843
|
keyboardShouldPersistTaps: "handled",
|
|
1431
1844
|
showsVerticalScrollIndicator: false,
|
|
1432
1845
|
children: [
|
|
1433
|
-
loading ? /* @__PURE__ */ jsx(View, { style:
|
|
1846
|
+
loading ? /* @__PURE__ */ jsx(View, { style: styles5.statusRow, children: /* @__PURE__ */ jsx(Text, { style: styles5.statusText, children: "Loading..." }) }) : filteredOptions.length === 0 ? /* @__PURE__ */ jsx(View, { style: styles5.statusRow, children: /* @__PURE__ */ jsx(Text, { style: styles5.statusText, children: emptyText }) }) : null,
|
|
1434
1847
|
!loading && filteredOptions.map((option) => {
|
|
1435
1848
|
const isSelected = selectedValues.includes(option.value);
|
|
1436
1849
|
const isHovered = hoveredValue === option.value;
|
|
@@ -1447,14 +1860,14 @@ var Select = forwardRef(
|
|
|
1447
1860
|
accessibilityRole: multiple ? "checkbox" : "button",
|
|
1448
1861
|
accessibilityState: { selected: isSelected, checked: isSelected, disabled },
|
|
1449
1862
|
style: [
|
|
1450
|
-
|
|
1863
|
+
styles5.item,
|
|
1451
1864
|
{
|
|
1452
1865
|
backgroundColor: itemBackground(visualState)
|
|
1453
1866
|
}
|
|
1454
1867
|
],
|
|
1455
1868
|
children: [
|
|
1456
|
-
multiple ? /* @__PURE__ */ jsx(View, { pointerEvents: "none", style:
|
|
1457
|
-
/* @__PURE__ */ jsx(Text, { style:
|
|
1869
|
+
multiple ? /* @__PURE__ */ jsx(View, { pointerEvents: "none", style: styles5.itemCheckbox, children: /* @__PURE__ */ jsx(Checkbox, { value: isSelected, variant: "light" }) }) : null,
|
|
1870
|
+
/* @__PURE__ */ jsx(Text, { style: styles5.itemLabel, numberOfLines: 1, children: option.label })
|
|
1458
1871
|
]
|
|
1459
1872
|
},
|
|
1460
1873
|
option.value
|
|
@@ -1465,13 +1878,13 @@ var Select = forwardRef(
|
|
|
1465
1878
|
)
|
|
1466
1879
|
] }) : null
|
|
1467
1880
|
] }),
|
|
1468
|
-
showHint && hint ? /* @__PURE__ */ jsx(Text, { style: [
|
|
1881
|
+
showHint && hint ? /* @__PURE__ */ jsx(Text, { style: [styles5.hint, { color: hintColor }], children: hint }) : null
|
|
1469
1882
|
]
|
|
1470
1883
|
}
|
|
1471
1884
|
);
|
|
1472
1885
|
}
|
|
1473
1886
|
);
|
|
1474
|
-
var
|
|
1887
|
+
var styles5 = StyleSheet.create({
|
|
1475
1888
|
root: {
|
|
1476
1889
|
width: DEFAULT_WIDTH2,
|
|
1477
1890
|
gap: 8,
|
|
@@ -1577,7 +1990,7 @@ var styles4 = StyleSheet.create({
|
|
|
1577
1990
|
right: 0,
|
|
1578
1991
|
marginTop: 8,
|
|
1579
1992
|
zIndex: 10,
|
|
1580
|
-
borderRadius:
|
|
1993
|
+
borderRadius: MENU_RADIUS2,
|
|
1581
1994
|
padding: 12,
|
|
1582
1995
|
gap: 8,
|
|
1583
1996
|
backgroundColor: colors.grey700,
|
|
@@ -1733,13 +2146,13 @@ var Textarea = forwardRef(function Textarea2({
|
|
|
1733
2146
|
const resolvedAccessibilityLabel = accessibilityLabel ?? (showLabel ? void 0 : label);
|
|
1734
2147
|
useApplyWebClassName(rootRef, className);
|
|
1735
2148
|
useApplyWebClassName(inputRef, inputClassName);
|
|
1736
|
-
return /* @__PURE__ */ jsxs(View, { ref: rootRef, style: [
|
|
1737
|
-
showLabel && label ? /* @__PURE__ */ jsx(Text, { style: [
|
|
2149
|
+
return /* @__PURE__ */ jsxs(View, { ref: rootRef, style: [styles6.root, disabled && styles6.disabled, style], children: [
|
|
2150
|
+
showLabel && label ? /* @__PURE__ */ jsx(Text, { style: [styles6.label, { color: chrome.labelColor }], children: label }) : null,
|
|
1738
2151
|
/* @__PURE__ */ jsx(
|
|
1739
2152
|
View,
|
|
1740
2153
|
{
|
|
1741
2154
|
style: [
|
|
1742
|
-
|
|
2155
|
+
styles6.field,
|
|
1743
2156
|
{
|
|
1744
2157
|
borderColor: chrome.borderColor,
|
|
1745
2158
|
backgroundColor: chrome.backgroundColor
|
|
@@ -1771,11 +2184,11 @@ var Textarea = forwardRef(function Textarea2({
|
|
|
1771
2184
|
onBlur?.(event);
|
|
1772
2185
|
},
|
|
1773
2186
|
style: [
|
|
1774
|
-
|
|
2187
|
+
styles6.input,
|
|
1775
2188
|
textareaTypography.field,
|
|
1776
2189
|
{ color: chrome.textColor },
|
|
1777
|
-
Platform.OS === "web" ?
|
|
1778
|
-
Platform.OS === "android" ?
|
|
2190
|
+
Platform.OS === "web" ? styles6.inputWeb : null,
|
|
2191
|
+
Platform.OS === "android" ? styles6.inputAndroid : null,
|
|
1779
2192
|
inputStyle
|
|
1780
2193
|
],
|
|
1781
2194
|
accessibilityLabel: resolvedAccessibilityLabel,
|
|
@@ -1784,10 +2197,10 @@ var Textarea = forwardRef(function Textarea2({
|
|
|
1784
2197
|
)
|
|
1785
2198
|
}
|
|
1786
2199
|
),
|
|
1787
|
-
showHint && hint ? /* @__PURE__ */ jsx(Text, { style: [
|
|
2200
|
+
showHint && hint ? /* @__PURE__ */ jsx(Text, { style: [styles6.hint, { color: chrome.hintColor }], children: hint }) : null
|
|
1788
2201
|
] });
|
|
1789
2202
|
});
|
|
1790
|
-
var
|
|
2203
|
+
var styles6 = StyleSheet.create({
|
|
1791
2204
|
root: {
|
|
1792
2205
|
width: DEFAULT_WIDTH3,
|
|
1793
2206
|
gap: 8,
|
|
@@ -1887,13 +2300,13 @@ var Toggle = forwardRef(function Toggle2({
|
|
|
1887
2300
|
accessibilityRole: "switch",
|
|
1888
2301
|
accessibilityLabel: resolvedAccessibilityLabel,
|
|
1889
2302
|
accessibilityState: { checked: isActive, disabled },
|
|
1890
|
-
style: [
|
|
2303
|
+
style: [styles7.pressable, disabled && styles7.disabled, style],
|
|
1891
2304
|
children: [
|
|
1892
2305
|
/* @__PURE__ */ jsx(
|
|
1893
2306
|
Animated.View,
|
|
1894
2307
|
{
|
|
1895
2308
|
style: [
|
|
1896
|
-
|
|
2309
|
+
styles7.track,
|
|
1897
2310
|
{
|
|
1898
2311
|
backgroundColor: trackBackgroundColor
|
|
1899
2312
|
}
|
|
@@ -1902,7 +2315,7 @@ var Toggle = forwardRef(function Toggle2({
|
|
|
1902
2315
|
Animated.View,
|
|
1903
2316
|
{
|
|
1904
2317
|
style: [
|
|
1905
|
-
|
|
2318
|
+
styles7.thumb,
|
|
1906
2319
|
{
|
|
1907
2320
|
transform: [{ translateX: thumbTranslateX }]
|
|
1908
2321
|
}
|
|
@@ -1911,12 +2324,12 @@ var Toggle = forwardRef(function Toggle2({
|
|
|
1911
2324
|
)
|
|
1912
2325
|
}
|
|
1913
2326
|
),
|
|
1914
|
-
labelContent != null && labelContent !== false ? typeof labelContent === "string" || typeof labelContent === "number" ? /* @__PURE__ */ jsx(Text, { style: [
|
|
2327
|
+
labelContent != null && labelContent !== false ? typeof labelContent === "string" || typeof labelContent === "number" ? /* @__PURE__ */ jsx(Text, { style: [styles7.label, labelStyle], children: labelContent }) : labelContent : null
|
|
1915
2328
|
]
|
|
1916
2329
|
}
|
|
1917
2330
|
);
|
|
1918
2331
|
});
|
|
1919
|
-
var
|
|
2332
|
+
var styles7 = StyleSheet.create({
|
|
1920
2333
|
pressable: {
|
|
1921
2334
|
flexDirection: "row",
|
|
1922
2335
|
alignItems: "center",
|
|
@@ -1945,6 +2358,6 @@ var styles6 = StyleSheet.create({
|
|
|
1945
2358
|
}
|
|
1946
2359
|
});
|
|
1947
2360
|
|
|
1948
|
-
export { ArrowRightIcon, BagIcon, BellIcon, BuildingIcon, Button, CameraIcon, CheckBadgeIcon, CheckIcon, Checkbox, ChevronDownIcon, ClockIcon, FacebookIcon, HomeIcon, Icon, Input, InstagramIcon, KeyIcon, LinkedInIcon, MailIcon, NavigateIcon, PhoneIcon, SearchIcon, Select, ShowIcon, Textarea, Toggle, UserIcon, buttonTypography, colors, fonts, getIconsByGroup, grey, iconGroupNames, iconGroups, iconNames, icons, inputTypography, selectTypography, textareaTypography };
|
|
2361
|
+
export { ArrowRightIcon, Avatar, BagIcon, BellIcon, BuildingIcon, Button, CalendarIcon, CameraIcon, CheckBadgeIcon, CheckIcon, Checkbox, ChevronDownIcon, ClockIcon, FacebookIcon, HeartIcon, HelpCircleIcon, HomeIcon, Icon, Input, InstagramIcon, KeyIcon, LayoutGridIcon, LinkedInIcon, LogOutIcon, MailIcon, NavigateIcon, PhoneIcon, SearchIcon, Select, SettingsIcon, ShowIcon, Textarea, Toggle, UserIcon, VideoIcon, avatarTypography, buttonTypography, colors, fonts, getIconsByGroup, grey, iconGroupNames, iconGroups, iconNames, icons, inputTypography, selectTypography, textareaTypography };
|
|
1949
2362
|
//# sourceMappingURL=index.js.map
|
|
1950
2363
|
//# sourceMappingURL=index.js.map
|