@boostdev/design-system-react-native 0.3.0 → 0.5.0
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/CHANGELOG.md +44 -0
- package/README.md +10 -0
- package/dist/index.cjs +589 -536
- package/dist/index.d.cts +36 -5
- package/dist/index.d.ts +36 -5
- package/dist/index.js +442 -493
- package/package.json +1 -1
- package/src/components/interaction/Button/Button.spec.tsx +17 -0
- package/src/components/interaction/Button/Button.tsx +8 -2
- package/src/components/interaction/Dialog/Dialog.tsx +2 -9
- package/src/components/interaction/DropdownMenu/DropdownMenu.tsx +2 -13
- package/src/components/interaction/Rating/Rating.tsx +2 -1
- package/src/components/interaction/SideSheet/SideSheet.tsx +2 -11
- package/src/components/interaction/Toast/Toast.tsx +2 -9
- package/src/components/interaction/form/CheckboxGroup/CheckboxGroup.tsx +2 -1
- package/src/components/interaction/form/Combobox/Combobox.tsx +2 -10
- package/src/components/interaction/form/FileInput/FileInput.tsx +2 -1
- package/src/components/interaction/form/FormInput/FormInput.spec.tsx +11 -9
- package/src/components/interaction/form/FormInput/FormInput.tsx +4 -10
- package/src/components/interaction/form/NumberInput/NumberInput.tsx +2 -9
- package/src/components/interaction/form/RadioGroup/RadioGroup.tsx +2 -1
- package/src/components/interaction/form/SegmentedControl/SegmentedControl.mdx +17 -3
- package/src/components/interaction/form/SegmentedControl/SegmentedControl.spec.tsx +55 -0
- package/src/components/interaction/form/SegmentedControl/SegmentedControl.stories.tsx +9 -0
- package/src/components/interaction/form/SegmentedControl/SegmentedControl.tsx +10 -3
- package/src/components/interaction/form/Select/Select.tsx +2 -11
- package/src/components/interaction/form/Slider/Slider.tsx +2 -9
- package/src/components/interaction/form/Textarea/Textarea.tsx +2 -7
- package/src/components/interaction/form/atoms/Label.tsx +2 -1
- package/src/components/interaction/form/atoms/Message.tsx +2 -1
- package/src/components/layout/SectionHeader/SectionHeader.tsx +2 -1
- package/src/components/ui/Accordion/Accordion.tsx +2 -11
- package/src/components/ui/Alert/Alert.tsx +2 -1
- package/src/components/ui/Avatar/Avatar.tsx +2 -1
- package/src/components/ui/Badge/Badge.spec.tsx +28 -0
- package/src/components/ui/Badge/Badge.tsx +9 -3
- package/src/components/ui/Breadcrumb/Breadcrumb.tsx +2 -1
- package/src/components/ui/Calendar/Calendar.tsx +2 -8
- package/src/components/ui/Carousel/Carousel.tsx +2 -12
- package/src/components/ui/Collapsible/Collapsible.tsx +2 -12
- package/src/components/ui/DescriptionList/DescriptionList.tsx +2 -1
- package/src/components/ui/Link/Link.tsx +2 -1
- package/src/components/ui/NotificationBanner/NotificationBanner.tsx +2 -1
- package/src/components/ui/Pagination/Pagination.tsx +2 -1
- package/src/components/ui/Progress/Progress.tsx +2 -1
- package/src/components/ui/ProgressCircle/ProgressCircle.tsx +2 -1
- package/src/components/ui/Table/Table.tsx +2 -9
- package/src/components/ui/Tabs/Tabs.tsx +2 -10
- package/src/components/ui/Tooltip/Tooltip.tsx +2 -1
- package/src/components/ui/Typography/Typography.mdx +2 -0
- package/src/components/ui/Typography/Typography.spec.tsx +59 -0
- package/src/components/ui/Typography/Typography.tsx +18 -2
- package/src/index.ts +2 -0
- package/src/native/ScaledText.guard.spec.ts +25 -0
- package/src/native/ScaledText.spec.tsx +77 -0
- package/src/native/ScaledText.tsx +30 -0
- package/src/native/fontScale.spec.ts +35 -0
- package/src/native/fontScale.ts +15 -0
package/dist/index.js
CHANGED
|
@@ -72,10 +72,37 @@ function useReactNavigationTheme(overrides = {}) {
|
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
// src/
|
|
76
|
-
import {
|
|
75
|
+
// src/native/ScaledText.tsx
|
|
76
|
+
import { forwardRef } from "react";
|
|
77
|
+
import { StyleSheet, Text, TextInput } from "react-native";
|
|
78
|
+
|
|
79
|
+
// src/native/fontScale.ts
|
|
80
|
+
function maxFontScaleFor(fontSize) {
|
|
81
|
+
if (fontSize >= 60) return 1;
|
|
82
|
+
if (fontSize >= 26) return 1.3;
|
|
83
|
+
if (fontSize >= 20) return 1.5;
|
|
84
|
+
return 2;
|
|
85
|
+
}
|
|
86
|
+
var DEFAULT_FONT_SIZE = 14;
|
|
87
|
+
|
|
88
|
+
// src/native/ScaledText.tsx
|
|
77
89
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
78
|
-
|
|
90
|
+
function maxFontScaleForStyle(style, override) {
|
|
91
|
+
if (override !== void 0 && override !== null) return override;
|
|
92
|
+
const fontSize = StyleSheet.flatten(style)?.fontSize;
|
|
93
|
+
return maxFontScaleFor(typeof fontSize === "number" ? fontSize : DEFAULT_FONT_SIZE);
|
|
94
|
+
}
|
|
95
|
+
var ScaledText = forwardRef(function ScaledText2({ maxFontSizeMultiplier, style, ...rest }, ref) {
|
|
96
|
+
return /* @__PURE__ */ jsx2(Text, { ref, style, maxFontSizeMultiplier: maxFontScaleForStyle(style, maxFontSizeMultiplier), ...rest });
|
|
97
|
+
});
|
|
98
|
+
var ScaledTextInput = forwardRef(function ScaledTextInput2({ maxFontSizeMultiplier, style, ...rest }, ref) {
|
|
99
|
+
return /* @__PURE__ */ jsx2(TextInput, { ref, style, maxFontSizeMultiplier: maxFontScaleForStyle(style, maxFontSizeMultiplier), ...rest });
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
// src/components/ui/Typography/Typography.tsx
|
|
103
|
+
import { StyleSheet as StyleSheet2 } from "react-native";
|
|
104
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
105
|
+
var styles = StyleSheet2.create({
|
|
79
106
|
base: {
|
|
80
107
|
fontFamily: font.family.body,
|
|
81
108
|
fontWeight: font.weight.body
|
|
@@ -114,22 +141,30 @@ var accessibilityRoles = {
|
|
|
114
141
|
body: "text",
|
|
115
142
|
body_s: "text"
|
|
116
143
|
};
|
|
117
|
-
function Typography({
|
|
144
|
+
function Typography({
|
|
145
|
+
variant = "body",
|
|
146
|
+
children,
|
|
147
|
+
style,
|
|
148
|
+
maxFontSizeMultiplier,
|
|
149
|
+
numberOfLines
|
|
150
|
+
}) {
|
|
118
151
|
const { colors: colors2 } = useTheme();
|
|
119
|
-
return /* @__PURE__ */
|
|
120
|
-
|
|
152
|
+
return /* @__PURE__ */ jsx3(
|
|
153
|
+
ScaledText,
|
|
121
154
|
{
|
|
122
155
|
accessibilityRole: accessibilityRoles[variant],
|
|
123
156
|
style: [styles.base, styles[variant], { color: colors2.colorOnBg }, style],
|
|
157
|
+
maxFontSizeMultiplier,
|
|
158
|
+
numberOfLines,
|
|
124
159
|
children
|
|
125
160
|
}
|
|
126
161
|
);
|
|
127
162
|
}
|
|
128
163
|
|
|
129
164
|
// src/components/ui/Badge/Badge.tsx
|
|
130
|
-
import { StyleSheet as
|
|
131
|
-
import { jsx as
|
|
132
|
-
var styles2 =
|
|
165
|
+
import { StyleSheet as StyleSheet3, View } from "react-native";
|
|
166
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
167
|
+
var styles2 = StyleSheet3.create({
|
|
133
168
|
badge: {
|
|
134
169
|
alignSelf: "flex-start",
|
|
135
170
|
flexDirection: "row",
|
|
@@ -146,7 +181,7 @@ var styles2 = StyleSheet2.create({
|
|
|
146
181
|
lineHeight: font.size.bodyS
|
|
147
182
|
}
|
|
148
183
|
});
|
|
149
|
-
function Badge({ children, variant = "primary", style }) {
|
|
184
|
+
function Badge({ children, variant = "primary", style, maxFontSizeMultiplier }) {
|
|
150
185
|
const { colors: colors2 } = useTheme();
|
|
151
186
|
const variantColors = {
|
|
152
187
|
primary: { bg: colors2.colorInteractive, text: colors2.colorOnInteractive },
|
|
@@ -156,12 +191,12 @@ function Badge({ children, variant = "primary", style }) {
|
|
|
156
191
|
warning: { bg: colors2.colorWarning, text: colors2.colorOnWarning }
|
|
157
192
|
};
|
|
158
193
|
const { bg, text } = variantColors[variant];
|
|
159
|
-
return /* @__PURE__ */
|
|
194
|
+
return /* @__PURE__ */ jsx4(View, { style: [styles2.badge, { backgroundColor: bg }, style], children: /* @__PURE__ */ jsx4(ScaledText, { style: [styles2.text, { color: text }], maxFontSizeMultiplier, children }) });
|
|
160
195
|
}
|
|
161
196
|
|
|
162
197
|
// src/components/ui/Avatar/Avatar.tsx
|
|
163
|
-
import { StyleSheet as
|
|
164
|
-
import { jsx as
|
|
198
|
+
import { StyleSheet as StyleSheet4, View as View2, Image } from "react-native";
|
|
199
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
165
200
|
var sizeMap = {
|
|
166
201
|
small: { container: 32, fontSize: font.size.bodyS },
|
|
167
202
|
medium: { container: 48, fontSize: font.size.body },
|
|
@@ -170,7 +205,7 @@ var sizeMap = {
|
|
|
170
205
|
function getInitials(name) {
|
|
171
206
|
return name.split(" ").filter(Boolean).slice(0, 2).map((word) => word[0].toUpperCase()).join("");
|
|
172
207
|
}
|
|
173
|
-
var styles3 =
|
|
208
|
+
var styles3 = StyleSheet4.create({
|
|
174
209
|
container: {
|
|
175
210
|
borderRadius: border.radius.full,
|
|
176
211
|
overflow: "hidden",
|
|
@@ -191,18 +226,18 @@ function Avatar({ src, alt, name, size = "medium", style }) {
|
|
|
191
226
|
const { container, fontSize } = sizeMap[size];
|
|
192
227
|
const label = alt ?? name ?? "User avatar";
|
|
193
228
|
if (src) {
|
|
194
|
-
return /* @__PURE__ */
|
|
229
|
+
return /* @__PURE__ */ jsx5(
|
|
195
230
|
View2,
|
|
196
231
|
{
|
|
197
232
|
style: [styles3.container, { width: container, height: container }, style],
|
|
198
233
|
accessibilityLabel: label,
|
|
199
234
|
accessibilityRole: "image",
|
|
200
|
-
children: /* @__PURE__ */
|
|
235
|
+
children: /* @__PURE__ */ jsx5(Image, { source: { uri: src }, style: styles3.image })
|
|
201
236
|
}
|
|
202
237
|
);
|
|
203
238
|
}
|
|
204
239
|
const initials = name ? getInitials(name) : "";
|
|
205
|
-
return /* @__PURE__ */
|
|
240
|
+
return /* @__PURE__ */ jsx5(
|
|
206
241
|
View2,
|
|
207
242
|
{
|
|
208
243
|
style: [
|
|
@@ -212,8 +247,8 @@ function Avatar({ src, alt, name, size = "medium", style }) {
|
|
|
212
247
|
],
|
|
213
248
|
accessibilityLabel: label,
|
|
214
249
|
accessibilityRole: "image",
|
|
215
|
-
children: /* @__PURE__ */
|
|
216
|
-
|
|
250
|
+
children: /* @__PURE__ */ jsx5(
|
|
251
|
+
ScaledText,
|
|
217
252
|
{
|
|
218
253
|
style: [styles3.initials, { fontSize, color: colors2.colorOnBlue }],
|
|
219
254
|
importantForAccessibility: "no",
|
|
@@ -226,21 +261,21 @@ function Avatar({ src, alt, name, size = "medium", style }) {
|
|
|
226
261
|
}
|
|
227
262
|
|
|
228
263
|
// src/components/ui/Separator/Separator.tsx
|
|
229
|
-
import { StyleSheet as
|
|
230
|
-
import { jsx as
|
|
231
|
-
var styles4 =
|
|
264
|
+
import { StyleSheet as StyleSheet5, View as View3 } from "react-native";
|
|
265
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
266
|
+
var styles4 = StyleSheet5.create({
|
|
232
267
|
horizontal: {
|
|
233
|
-
height:
|
|
268
|
+
height: StyleSheet5.hairlineWidth,
|
|
234
269
|
width: "100%"
|
|
235
270
|
},
|
|
236
271
|
vertical: {
|
|
237
|
-
width:
|
|
272
|
+
width: StyleSheet5.hairlineWidth,
|
|
238
273
|
alignSelf: "stretch"
|
|
239
274
|
}
|
|
240
275
|
});
|
|
241
276
|
function Separator({ orientation = "horizontal", style }) {
|
|
242
277
|
const { colors: colors2 } = useTheme();
|
|
243
|
-
return /* @__PURE__ */
|
|
278
|
+
return /* @__PURE__ */ jsx6(
|
|
244
279
|
View3,
|
|
245
280
|
{
|
|
246
281
|
accessibilityRole: "none",
|
|
@@ -255,7 +290,7 @@ function Separator({ orientation = "horizontal", style }) {
|
|
|
255
290
|
|
|
256
291
|
// src/components/ui/Loading/Loading.tsx
|
|
257
292
|
import { ActivityIndicator } from "react-native";
|
|
258
|
-
import { jsx as
|
|
293
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
259
294
|
var rnSize = {
|
|
260
295
|
small: "small",
|
|
261
296
|
medium: "large",
|
|
@@ -263,7 +298,7 @@ var rnSize = {
|
|
|
263
298
|
};
|
|
264
299
|
function Loading({ size = "medium", accessibilityLabel = "Loading", style }) {
|
|
265
300
|
const { colors: colors2 } = useTheme();
|
|
266
|
-
return /* @__PURE__ */
|
|
301
|
+
return /* @__PURE__ */ jsx7(
|
|
267
302
|
ActivityIndicator,
|
|
268
303
|
{
|
|
269
304
|
size: rnSize[size],
|
|
@@ -276,14 +311,14 @@ function Loading({ size = "medium", accessibilityLabel = "Loading", style }) {
|
|
|
276
311
|
}
|
|
277
312
|
|
|
278
313
|
// src/components/ui/Progress/Progress.tsx
|
|
279
|
-
import { StyleSheet as
|
|
280
|
-
import { jsx as
|
|
314
|
+
import { StyleSheet as StyleSheet6, View as View4 } from "react-native";
|
|
315
|
+
import { jsx as jsx8, jsxs } from "react/jsx-runtime";
|
|
281
316
|
var trackHeight = {
|
|
282
317
|
small: 4,
|
|
283
318
|
medium: 8,
|
|
284
319
|
large: 12
|
|
285
320
|
};
|
|
286
|
-
var styles5 =
|
|
321
|
+
var styles5 = StyleSheet6.create({
|
|
287
322
|
container: {
|
|
288
323
|
width: "100%"
|
|
289
324
|
},
|
|
@@ -320,20 +355,20 @@ function Progress({
|
|
|
320
355
|
const height = trackHeight[size];
|
|
321
356
|
return /* @__PURE__ */ jsxs(View4, { style: [styles5.container, style], children: [
|
|
322
357
|
showLabel && /* @__PURE__ */ jsxs(View4, { style: styles5.labelRow, children: [
|
|
323
|
-
/* @__PURE__ */
|
|
324
|
-
/* @__PURE__ */ jsxs(
|
|
358
|
+
/* @__PURE__ */ jsx8(ScaledText, { style: [styles5.labelText, { color: colors2.colorOnBg }], children: label }),
|
|
359
|
+
/* @__PURE__ */ jsxs(ScaledText, { style: [styles5.labelText, { color: colors2.colorOnBgSubtle }], children: [
|
|
325
360
|
Math.round(percentage),
|
|
326
361
|
"%"
|
|
327
362
|
] })
|
|
328
363
|
] }),
|
|
329
|
-
/* @__PURE__ */
|
|
364
|
+
/* @__PURE__ */ jsx8(
|
|
330
365
|
View4,
|
|
331
366
|
{
|
|
332
367
|
style: [styles5.track, { height, backgroundColor: colors2.colorBgSubtle }],
|
|
333
368
|
accessibilityRole: "progressbar",
|
|
334
369
|
accessibilityLabel: label,
|
|
335
370
|
accessibilityValue: { min: 0, max, now: value },
|
|
336
|
-
children: /* @__PURE__ */
|
|
371
|
+
children: /* @__PURE__ */ jsx8(
|
|
337
372
|
View4,
|
|
338
373
|
{
|
|
339
374
|
style: [
|
|
@@ -349,9 +384,9 @@ function Progress({
|
|
|
349
384
|
|
|
350
385
|
// src/components/ui/Skeleton/Skeleton.tsx
|
|
351
386
|
import { useEffect, useRef } from "react";
|
|
352
|
-
import { Animated, StyleSheet as
|
|
353
|
-
import { jsx as
|
|
354
|
-
var styles6 =
|
|
387
|
+
import { Animated, StyleSheet as StyleSheet7 } from "react-native";
|
|
388
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
389
|
+
var styles6 = StyleSheet7.create({
|
|
355
390
|
skeleton: {
|
|
356
391
|
borderRadius: border.radius.xs,
|
|
357
392
|
overflow: "hidden"
|
|
@@ -370,7 +405,7 @@ function Skeleton({ style }) {
|
|
|
370
405
|
anim.start();
|
|
371
406
|
return () => anim.stop();
|
|
372
407
|
}, [opacity]);
|
|
373
|
-
return /* @__PURE__ */
|
|
408
|
+
return /* @__PURE__ */ jsx9(
|
|
374
409
|
Animated.View,
|
|
375
410
|
{
|
|
376
411
|
importantForAccessibility: "no-hide-descendants",
|
|
@@ -384,9 +419,9 @@ function Skeleton({ style }) {
|
|
|
384
419
|
}
|
|
385
420
|
|
|
386
421
|
// src/components/ui/Alert/Alert.tsx
|
|
387
|
-
import { StyleSheet as
|
|
388
|
-
import { jsx as
|
|
389
|
-
var styles7 =
|
|
422
|
+
import { StyleSheet as StyleSheet8, View as View5, Pressable } from "react-native";
|
|
423
|
+
import { jsx as jsx10, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
424
|
+
var styles7 = StyleSheet8.create({
|
|
390
425
|
alert: {
|
|
391
426
|
flexDirection: "row",
|
|
392
427
|
alignItems: "flex-start",
|
|
@@ -443,12 +478,12 @@ function Alert({
|
|
|
443
478
|
accessibilityLiveRegion: isUrgent ? "assertive" : "polite",
|
|
444
479
|
style: [styles7.alert, { backgroundColor: bg, borderStartWidth: spacing.s, borderStartColor: borderColor }, style],
|
|
445
480
|
children: [
|
|
446
|
-
icon && /* @__PURE__ */
|
|
481
|
+
icon && /* @__PURE__ */ jsx10(View5, { style: styles7.icon, children: icon }),
|
|
447
482
|
/* @__PURE__ */ jsxs2(View5, { style: styles7.content, children: [
|
|
448
|
-
title && /* @__PURE__ */
|
|
449
|
-
typeof resolvedChildren === "string" || typeof resolvedChildren === "number" ? /* @__PURE__ */
|
|
483
|
+
title && /* @__PURE__ */ jsx10(ScaledText, { style: [styles7.title, { color: text }], children: title }),
|
|
484
|
+
typeof resolvedChildren === "string" || typeof resolvedChildren === "number" ? /* @__PURE__ */ jsx10(ScaledText, { style: [styles7.body, { color: text }], children: resolvedChildren }) : resolvedChildren
|
|
450
485
|
] }),
|
|
451
|
-
onDismiss && /* @__PURE__ */
|
|
486
|
+
onDismiss && /* @__PURE__ */ jsx10(
|
|
452
487
|
Pressable,
|
|
453
488
|
{
|
|
454
489
|
onPress: onDismiss,
|
|
@@ -456,7 +491,7 @@ function Alert({
|
|
|
456
491
|
accessibilityLabel: "Dismiss alert",
|
|
457
492
|
accessibilityRole: "button",
|
|
458
493
|
hitSlop: 8,
|
|
459
|
-
children: /* @__PURE__ */
|
|
494
|
+
children: /* @__PURE__ */ jsx10(ScaledText, { style: { color: text, fontSize: 16 }, children: "\u2715" })
|
|
460
495
|
}
|
|
461
496
|
)
|
|
462
497
|
]
|
|
@@ -465,9 +500,9 @@ function Alert({
|
|
|
465
500
|
}
|
|
466
501
|
|
|
467
502
|
// src/components/ui/NotificationBanner/NotificationBanner.tsx
|
|
468
|
-
import { StyleSheet as
|
|
469
|
-
import { jsx as
|
|
470
|
-
var styles8 =
|
|
503
|
+
import { StyleSheet as StyleSheet9, View as View6, Pressable as Pressable2 } from "react-native";
|
|
504
|
+
import { jsx as jsx11, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
505
|
+
var styles8 = StyleSheet9.create({
|
|
471
506
|
banner: {
|
|
472
507
|
flexDirection: "row",
|
|
473
508
|
alignItems: "center",
|
|
@@ -512,9 +547,9 @@ function NotificationBanner({
|
|
|
512
547
|
accessibilityLiveRegion: isUrgent ? "assertive" : "polite",
|
|
513
548
|
style: [styles8.banner, { backgroundColor: bg, borderBottomWidth: 3, borderBottomColor: borderColor }, style],
|
|
514
549
|
children: [
|
|
515
|
-
/* @__PURE__ */
|
|
550
|
+
/* @__PURE__ */ jsx11(View6, { style: styles8.body, children: typeof resolvedChildren === "string" || typeof resolvedChildren === "number" ? /* @__PURE__ */ jsx11(ScaledText, { style: [styles8.content, { color: text }], children: resolvedChildren }) : resolvedChildren }),
|
|
516
551
|
action,
|
|
517
|
-
onDismiss && /* @__PURE__ */
|
|
552
|
+
onDismiss && /* @__PURE__ */ jsx11(
|
|
518
553
|
Pressable2,
|
|
519
554
|
{
|
|
520
555
|
onPress: onDismiss,
|
|
@@ -522,7 +557,7 @@ function NotificationBanner({
|
|
|
522
557
|
accessibilityLabel: "Dismiss notification",
|
|
523
558
|
accessibilityRole: "button",
|
|
524
559
|
hitSlop: 8,
|
|
525
|
-
children: /* @__PURE__ */
|
|
560
|
+
children: /* @__PURE__ */ jsx11(ScaledText, { style: { color: text, fontSize: 16 }, children: "\u2715" })
|
|
526
561
|
}
|
|
527
562
|
)
|
|
528
563
|
]
|
|
@@ -531,9 +566,9 @@ function NotificationBanner({
|
|
|
531
566
|
}
|
|
532
567
|
|
|
533
568
|
// src/components/ui/Link/Link.tsx
|
|
534
|
-
import { StyleSheet as
|
|
535
|
-
import { jsx as
|
|
536
|
-
var styles9 =
|
|
569
|
+
import { StyleSheet as StyleSheet10, Pressable as Pressable3, Linking } from "react-native";
|
|
570
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
571
|
+
var styles9 = StyleSheet10.create({
|
|
537
572
|
text: {
|
|
538
573
|
fontSize: font.size.body,
|
|
539
574
|
fontFamily: font.family.body,
|
|
@@ -552,22 +587,22 @@ function Link({ href, children, accessibilityLabel, style, onPress }) {
|
|
|
552
587
|
Linking.openURL(href);
|
|
553
588
|
}
|
|
554
589
|
};
|
|
555
|
-
return /* @__PURE__ */
|
|
590
|
+
return /* @__PURE__ */ jsx12(
|
|
556
591
|
Pressable3,
|
|
557
592
|
{
|
|
558
593
|
onPress: handlePress,
|
|
559
594
|
accessibilityRole: "link",
|
|
560
595
|
accessibilityLabel,
|
|
561
596
|
style: ({ pressed }) => pressed && styles9.pressed,
|
|
562
|
-
children: /* @__PURE__ */
|
|
597
|
+
children: /* @__PURE__ */ jsx12(ScaledText, { style: [styles9.text, { color: colors2.colorInteractiveOnBg }, style], children })
|
|
563
598
|
}
|
|
564
599
|
);
|
|
565
600
|
}
|
|
566
601
|
|
|
567
602
|
// src/components/ui/DescriptionList/DescriptionList.tsx
|
|
568
|
-
import { StyleSheet as
|
|
569
|
-
import { jsx as
|
|
570
|
-
var styles10 =
|
|
603
|
+
import { StyleSheet as StyleSheet11, View as View7 } from "react-native";
|
|
604
|
+
import { jsx as jsx13, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
605
|
+
var styles10 = StyleSheet11.create({
|
|
571
606
|
list: {
|
|
572
607
|
gap: spacing.m
|
|
573
608
|
},
|
|
@@ -589,16 +624,16 @@ var styles10 = StyleSheet10.create({
|
|
|
589
624
|
});
|
|
590
625
|
function DescriptionList({ items, style }) {
|
|
591
626
|
const { colors: colors2 } = useTheme();
|
|
592
|
-
return /* @__PURE__ */
|
|
593
|
-
/* @__PURE__ */
|
|
594
|
-
typeof item.description === "string" ? /* @__PURE__ */
|
|
627
|
+
return /* @__PURE__ */ jsx13(View7, { style: [styles10.list, style], accessibilityRole: "list", children: items.map((item, i) => /* @__PURE__ */ jsxs4(View7, { style: styles10.group, accessibilityRole: "listitem", children: [
|
|
628
|
+
/* @__PURE__ */ jsx13(ScaledText, { style: [styles10.term, { color: colors2.colorOnBgSubtle }], children: item.term }),
|
|
629
|
+
typeof item.description === "string" ? /* @__PURE__ */ jsx13(ScaledText, { style: [styles10.description, { color: colors2.colorOnBg }], children: item.description }) : /* @__PURE__ */ jsx13(View7, { children: item.description })
|
|
595
630
|
] }, i)) });
|
|
596
631
|
}
|
|
597
632
|
|
|
598
633
|
// src/components/ui/Breadcrumb/Breadcrumb.tsx
|
|
599
|
-
import { StyleSheet as
|
|
600
|
-
import { Fragment, jsx as
|
|
601
|
-
var styles11 =
|
|
634
|
+
import { StyleSheet as StyleSheet12, View as View8, Pressable as Pressable4 } from "react-native";
|
|
635
|
+
import { Fragment, jsx as jsx14, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
636
|
+
var styles11 = StyleSheet12.create({
|
|
602
637
|
container: {
|
|
603
638
|
flexDirection: "row",
|
|
604
639
|
flexWrap: "wrap",
|
|
@@ -621,7 +656,7 @@ var styles11 = StyleSheet11.create({
|
|
|
621
656
|
});
|
|
622
657
|
function Breadcrumb({ items, style }) {
|
|
623
658
|
const { colors: colors2 } = useTheme();
|
|
624
|
-
return /* @__PURE__ */
|
|
659
|
+
return /* @__PURE__ */ jsx14(
|
|
625
660
|
View8,
|
|
626
661
|
{
|
|
627
662
|
style: [styles11.container, style],
|
|
@@ -629,25 +664,25 @@ function Breadcrumb({ items, style }) {
|
|
|
629
664
|
accessibilityLabel: "Breadcrumb",
|
|
630
665
|
children: items.map((item, index) => {
|
|
631
666
|
const isLast = index === items.length - 1;
|
|
632
|
-
return /* @__PURE__ */
|
|
633
|
-
|
|
667
|
+
return /* @__PURE__ */ jsx14(View8, { style: { flexDirection: "row", alignItems: "center", minHeight: 44 }, children: isLast ? /* @__PURE__ */ jsx14(
|
|
668
|
+
ScaledText,
|
|
634
669
|
{
|
|
635
670
|
style: [styles11.itemText, { color: colors2.colorOnBg }],
|
|
636
671
|
accessibilityRole: "text",
|
|
637
672
|
children: item.label
|
|
638
673
|
}
|
|
639
674
|
) : /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
640
|
-
/* @__PURE__ */
|
|
675
|
+
/* @__PURE__ */ jsx14(
|
|
641
676
|
Pressable4,
|
|
642
677
|
{
|
|
643
678
|
onPress: item.onPress,
|
|
644
679
|
accessibilityRole: "link",
|
|
645
680
|
style: ({ pressed }) => pressed && styles11.pressed,
|
|
646
|
-
children: /* @__PURE__ */
|
|
681
|
+
children: /* @__PURE__ */ jsx14(ScaledText, { style: [styles11.itemText, { color: colors2.colorInteractiveOnBg }], children: item.label })
|
|
647
682
|
}
|
|
648
683
|
),
|
|
649
|
-
/* @__PURE__ */
|
|
650
|
-
|
|
684
|
+
/* @__PURE__ */ jsx14(
|
|
685
|
+
ScaledText,
|
|
651
686
|
{
|
|
652
687
|
style: [styles11.separator, { color: colors2.colorOnBgSubtle }],
|
|
653
688
|
importantForAccessibility: "no",
|
|
@@ -662,8 +697,8 @@ function Breadcrumb({ items, style }) {
|
|
|
662
697
|
}
|
|
663
698
|
|
|
664
699
|
// src/components/ui/ProgressCircle/ProgressCircle.tsx
|
|
665
|
-
import { StyleSheet as
|
|
666
|
-
import { jsx as
|
|
700
|
+
import { StyleSheet as StyleSheet13, View as View9 } from "react-native";
|
|
701
|
+
import { jsx as jsx15, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
667
702
|
var SIZE_PX = {
|
|
668
703
|
small: 40,
|
|
669
704
|
medium: 64,
|
|
@@ -679,7 +714,7 @@ var FONT_SIZE = {
|
|
|
679
714
|
medium: font.size.bodyS,
|
|
680
715
|
large: font.size.body
|
|
681
716
|
};
|
|
682
|
-
var styles12 =
|
|
717
|
+
var styles12 = StyleSheet13.create({
|
|
683
718
|
wrapper: {
|
|
684
719
|
alignItems: "center",
|
|
685
720
|
justifyContent: "center"
|
|
@@ -696,7 +731,7 @@ function HalfCircle({
|
|
|
696
731
|
color,
|
|
697
732
|
rotation
|
|
698
733
|
}) {
|
|
699
|
-
return /* @__PURE__ */
|
|
734
|
+
return /* @__PURE__ */ jsx15(
|
|
700
735
|
View9,
|
|
701
736
|
{
|
|
702
737
|
style: {
|
|
@@ -704,7 +739,7 @@ function HalfCircle({
|
|
|
704
739
|
height: size,
|
|
705
740
|
overflow: "hidden"
|
|
706
741
|
},
|
|
707
|
-
children: /* @__PURE__ */
|
|
742
|
+
children: /* @__PURE__ */ jsx15(
|
|
708
743
|
View9,
|
|
709
744
|
{
|
|
710
745
|
style: {
|
|
@@ -747,7 +782,7 @@ function ProgressCircle({
|
|
|
747
782
|
accessibilityLabel: label,
|
|
748
783
|
accessibilityValue: { min: 0, max, now: value },
|
|
749
784
|
children: [
|
|
750
|
-
/* @__PURE__ */
|
|
785
|
+
/* @__PURE__ */ jsx15(
|
|
751
786
|
View9,
|
|
752
787
|
{
|
|
753
788
|
style: {
|
|
@@ -760,7 +795,7 @@ function ProgressCircle({
|
|
|
760
795
|
}
|
|
761
796
|
}
|
|
762
797
|
),
|
|
763
|
-
/* @__PURE__ */
|
|
798
|
+
/* @__PURE__ */ jsx15(
|
|
764
799
|
View9,
|
|
765
800
|
{
|
|
766
801
|
style: {
|
|
@@ -770,7 +805,7 @@ function ProgressCircle({
|
|
|
770
805
|
start: px / 2,
|
|
771
806
|
overflow: "hidden"
|
|
772
807
|
},
|
|
773
|
-
children: /* @__PURE__ */
|
|
808
|
+
children: /* @__PURE__ */ jsx15(
|
|
774
809
|
HalfCircle,
|
|
775
810
|
{
|
|
776
811
|
size: px,
|
|
@@ -781,7 +816,7 @@ function ProgressCircle({
|
|
|
781
816
|
)
|
|
782
817
|
}
|
|
783
818
|
),
|
|
784
|
-
degrees > 180 && /* @__PURE__ */
|
|
819
|
+
degrees > 180 && /* @__PURE__ */ jsx15(
|
|
785
820
|
View9,
|
|
786
821
|
{
|
|
787
822
|
style: {
|
|
@@ -791,14 +826,14 @@ function ProgressCircle({
|
|
|
791
826
|
start: 0,
|
|
792
827
|
overflow: "hidden"
|
|
793
828
|
},
|
|
794
|
-
children: /* @__PURE__ */
|
|
829
|
+
children: /* @__PURE__ */ jsx15(
|
|
795
830
|
View9,
|
|
796
831
|
{
|
|
797
832
|
style: {
|
|
798
833
|
position: "absolute",
|
|
799
834
|
end: 0
|
|
800
835
|
},
|
|
801
|
-
children: /* @__PURE__ */
|
|
836
|
+
children: /* @__PURE__ */ jsx15(
|
|
802
837
|
HalfCircle,
|
|
803
838
|
{
|
|
804
839
|
size: px,
|
|
@@ -812,7 +847,7 @@ function ProgressCircle({
|
|
|
812
847
|
}
|
|
813
848
|
),
|
|
814
849
|
showValue && /* @__PURE__ */ jsxs6(
|
|
815
|
-
|
|
850
|
+
ScaledText,
|
|
816
851
|
{
|
|
817
852
|
style: [styles12.valueText, { fontSize: FONT_SIZE[size], color: colors2.colorOnBg }],
|
|
818
853
|
importantForAccessibility: "no",
|
|
@@ -830,9 +865,9 @@ function ProgressCircle({
|
|
|
830
865
|
|
|
831
866
|
// src/components/ui/Tooltip/Tooltip.tsx
|
|
832
867
|
import { useState } from "react";
|
|
833
|
-
import { StyleSheet as
|
|
834
|
-
import { jsx as
|
|
835
|
-
var styles13 =
|
|
868
|
+
import { StyleSheet as StyleSheet14, View as View10, Pressable as Pressable5 } from "react-native";
|
|
869
|
+
import { jsx as jsx16, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
870
|
+
var styles13 = StyleSheet14.create({
|
|
836
871
|
wrapper: {
|
|
837
872
|
position: "relative"
|
|
838
873
|
},
|
|
@@ -856,7 +891,7 @@ function Tooltip({ content, children, style }) {
|
|
|
856
891
|
const { colors: colors2 } = useTheme();
|
|
857
892
|
const [visible, setVisible] = useState(false);
|
|
858
893
|
return /* @__PURE__ */ jsxs7(View10, { style: [styles13.wrapper, style], children: [
|
|
859
|
-
/* @__PURE__ */
|
|
894
|
+
/* @__PURE__ */ jsx16(
|
|
860
895
|
Pressable5,
|
|
861
896
|
{
|
|
862
897
|
onLongPress: () => setVisible(true),
|
|
@@ -865,21 +900,21 @@ function Tooltip({ content, children, style }) {
|
|
|
865
900
|
children
|
|
866
901
|
}
|
|
867
902
|
),
|
|
868
|
-
visible && /* @__PURE__ */
|
|
903
|
+
visible && /* @__PURE__ */ jsx16(
|
|
869
904
|
View10,
|
|
870
905
|
{
|
|
871
906
|
style: [styles13.tooltip, { backgroundColor: colors2.colorOnBg }],
|
|
872
907
|
accessibilityRole: "text",
|
|
873
908
|
accessibilityLabel: content,
|
|
874
|
-
children: /* @__PURE__ */
|
|
909
|
+
children: /* @__PURE__ */ jsx16(ScaledText, { style: [styles13.text, { color: colors2.colorBg }], children: content })
|
|
875
910
|
}
|
|
876
911
|
)
|
|
877
912
|
] });
|
|
878
913
|
}
|
|
879
914
|
|
|
880
915
|
// src/components/ui/Pagination/Pagination.tsx
|
|
881
|
-
import { StyleSheet as
|
|
882
|
-
import { jsx as
|
|
916
|
+
import { StyleSheet as StyleSheet15, View as View11, Pressable as Pressable6 } from "react-native";
|
|
917
|
+
import { jsx as jsx17, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
883
918
|
function getPageRange(current, total) {
|
|
884
919
|
const delta = 1;
|
|
885
920
|
const range = [];
|
|
@@ -892,7 +927,7 @@ function getPageRange(current, total) {
|
|
|
892
927
|
}
|
|
893
928
|
return range;
|
|
894
929
|
}
|
|
895
|
-
var styles14 =
|
|
930
|
+
var styles14 = StyleSheet15.create({
|
|
896
931
|
container: {
|
|
897
932
|
flexDirection: "row",
|
|
898
933
|
alignItems: "center",
|
|
@@ -950,7 +985,7 @@ function Pagination({
|
|
|
950
985
|
accessibilityRole: "navigation",
|
|
951
986
|
accessibilityLabel: "Pagination",
|
|
952
987
|
children: [
|
|
953
|
-
/* @__PURE__ */
|
|
988
|
+
/* @__PURE__ */ jsx17(
|
|
954
989
|
Pressable6,
|
|
955
990
|
{
|
|
956
991
|
onPress: () => onPageChange(currentPage - 1),
|
|
@@ -963,12 +998,12 @@ function Pagination({
|
|
|
963
998
|
currentPage <= 1 && styles14.disabled,
|
|
964
999
|
pressed && !currentPage && styles14.pressed
|
|
965
1000
|
],
|
|
966
|
-
children: /* @__PURE__ */
|
|
1001
|
+
children: /* @__PURE__ */ jsx17(ScaledText, { style: [styles14.navText, { color: colors2.colorOnBg }], children: "\u2039" })
|
|
967
1002
|
}
|
|
968
1003
|
),
|
|
969
1004
|
pages.map(
|
|
970
|
-
(page, index) => page === "..." ? /* @__PURE__ */
|
|
971
|
-
|
|
1005
|
+
(page, index) => page === "..." ? /* @__PURE__ */ jsx17(
|
|
1006
|
+
ScaledText,
|
|
972
1007
|
{
|
|
973
1008
|
style: [styles14.ellipsis, { color: colors2.colorOnBgSubtle }],
|
|
974
1009
|
importantForAccessibility: "no",
|
|
@@ -976,7 +1011,7 @@ function Pagination({
|
|
|
976
1011
|
children: "..."
|
|
977
1012
|
},
|
|
978
1013
|
`ellipsis-${index}`
|
|
979
|
-
) : /* @__PURE__ */
|
|
1014
|
+
) : /* @__PURE__ */ jsx17(
|
|
980
1015
|
Pressable6,
|
|
981
1016
|
{
|
|
982
1017
|
onPress: () => onPageChange(page),
|
|
@@ -988,8 +1023,8 @@ function Pagination({
|
|
|
988
1023
|
currentPage === page && { backgroundColor: colors2.colorInteractive },
|
|
989
1024
|
pressed && styles14.pressed
|
|
990
1025
|
],
|
|
991
|
-
children: /* @__PURE__ */
|
|
992
|
-
|
|
1026
|
+
children: /* @__PURE__ */ jsx17(
|
|
1027
|
+
ScaledText,
|
|
993
1028
|
{
|
|
994
1029
|
style: [
|
|
995
1030
|
styles14.buttonText,
|
|
@@ -1005,7 +1040,7 @@ function Pagination({
|
|
|
1005
1040
|
page
|
|
1006
1041
|
)
|
|
1007
1042
|
),
|
|
1008
|
-
/* @__PURE__ */
|
|
1043
|
+
/* @__PURE__ */ jsx17(
|
|
1009
1044
|
Pressable6,
|
|
1010
1045
|
{
|
|
1011
1046
|
onPress: () => onPageChange(currentPage + 1),
|
|
@@ -1018,7 +1053,7 @@ function Pagination({
|
|
|
1018
1053
|
currentPage >= totalPages && styles14.disabled,
|
|
1019
1054
|
pressed && styles14.pressed
|
|
1020
1055
|
],
|
|
1021
|
-
children: /* @__PURE__ */
|
|
1056
|
+
children: /* @__PURE__ */ jsx17(ScaledText, { style: [styles14.navText, { color: colors2.colorOnBg }], children: "\u203A" })
|
|
1022
1057
|
}
|
|
1023
1058
|
)
|
|
1024
1059
|
]
|
|
@@ -1028,21 +1063,12 @@ function Pagination({
|
|
|
1028
1063
|
|
|
1029
1064
|
// src/components/ui/Collapsible/Collapsible.tsx
|
|
1030
1065
|
import { useCallback, useRef as useRef2, useState as useState2 } from "react";
|
|
1031
|
-
import {
|
|
1032
|
-
|
|
1033
|
-
View as View12,
|
|
1034
|
-
Text as Text13,
|
|
1035
|
-
Pressable as Pressable7,
|
|
1036
|
-
Animated as Animated2,
|
|
1037
|
-
LayoutAnimation,
|
|
1038
|
-
Platform,
|
|
1039
|
-
UIManager
|
|
1040
|
-
} from "react-native";
|
|
1041
|
-
import { jsx as jsx17, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1066
|
+
import { StyleSheet as StyleSheet16, View as View12, Pressable as Pressable7, Animated as Animated2, LayoutAnimation, Platform, UIManager } from "react-native";
|
|
1067
|
+
import { jsx as jsx18, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1042
1068
|
if (Platform.OS === "android" && UIManager.setLayoutAnimationEnabledExperimental) {
|
|
1043
1069
|
UIManager.setLayoutAnimationEnabledExperimental(true);
|
|
1044
1070
|
}
|
|
1045
|
-
var styles15 =
|
|
1071
|
+
var styles15 = StyleSheet16.create({
|
|
1046
1072
|
container: {
|
|
1047
1073
|
borderRadius: border.radius.m,
|
|
1048
1074
|
overflow: "hidden"
|
|
@@ -1126,8 +1152,8 @@ function Collapsible({
|
|
|
1126
1152
|
accessibilityState: { expanded: isOpen },
|
|
1127
1153
|
style: ({ pressed }) => [styles15.header, pressed && styles15.pressed],
|
|
1128
1154
|
children: [
|
|
1129
|
-
/* @__PURE__ */
|
|
1130
|
-
/* @__PURE__ */
|
|
1155
|
+
/* @__PURE__ */ jsx18(ScaledText, { style: [styles15.summaryText, { color: colors2.colorOnBg }], children: summary }),
|
|
1156
|
+
/* @__PURE__ */ jsx18(
|
|
1131
1157
|
Animated2.View,
|
|
1132
1158
|
{
|
|
1133
1159
|
testID: "bds-collapsible-chevron",
|
|
@@ -1139,7 +1165,7 @@ function Collapsible({
|
|
|
1139
1165
|
]
|
|
1140
1166
|
}
|
|
1141
1167
|
),
|
|
1142
|
-
isOpen && /* @__PURE__ */
|
|
1168
|
+
isOpen && /* @__PURE__ */ jsx18(View12, { style: styles15.content, children })
|
|
1143
1169
|
]
|
|
1144
1170
|
}
|
|
1145
1171
|
);
|
|
@@ -1147,20 +1173,12 @@ function Collapsible({
|
|
|
1147
1173
|
|
|
1148
1174
|
// src/components/ui/Accordion/Accordion.tsx
|
|
1149
1175
|
import { useState as useState3 } from "react";
|
|
1150
|
-
import {
|
|
1151
|
-
|
|
1152
|
-
View as View13,
|
|
1153
|
-
Text as Text14,
|
|
1154
|
-
Pressable as Pressable8,
|
|
1155
|
-
LayoutAnimation as LayoutAnimation2,
|
|
1156
|
-
Platform as Platform2,
|
|
1157
|
-
UIManager as UIManager2
|
|
1158
|
-
} from "react-native";
|
|
1159
|
-
import { jsx as jsx18, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1176
|
+
import { StyleSheet as StyleSheet17, View as View13, Pressable as Pressable8, LayoutAnimation as LayoutAnimation2, Platform as Platform2, UIManager as UIManager2 } from "react-native";
|
|
1177
|
+
import { jsx as jsx19, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1160
1178
|
if (Platform2.OS === "android" && UIManager2.setLayoutAnimationEnabledExperimental) {
|
|
1161
1179
|
UIManager2.setLayoutAnimationEnabledExperimental(true);
|
|
1162
1180
|
}
|
|
1163
|
-
var styles16 =
|
|
1181
|
+
var styles16 = StyleSheet17.create({
|
|
1164
1182
|
container: {
|
|
1165
1183
|
overflow: "hidden",
|
|
1166
1184
|
borderRadius: border.radius.s
|
|
@@ -1214,7 +1232,7 @@ function Accordion({
|
|
|
1214
1232
|
return allowMultiple ? [...prev, id] : [id];
|
|
1215
1233
|
});
|
|
1216
1234
|
};
|
|
1217
|
-
return /* @__PURE__ */
|
|
1235
|
+
return /* @__PURE__ */ jsx19(View13, { style: [styles16.container, style], children: items.map((item, index) => {
|
|
1218
1236
|
const isOpen = openIds.includes(item.id);
|
|
1219
1237
|
const isLast = index === items.length - 1;
|
|
1220
1238
|
return /* @__PURE__ */ jsxs10(
|
|
@@ -1239,9 +1257,9 @@ function Accordion({
|
|
|
1239
1257
|
pressed && !item.disabled && styles16.pressed
|
|
1240
1258
|
],
|
|
1241
1259
|
children: [
|
|
1242
|
-
/* @__PURE__ */
|
|
1243
|
-
/* @__PURE__ */
|
|
1244
|
-
|
|
1260
|
+
/* @__PURE__ */ jsx19(ScaledText, { style: [styles16.titleText, { color: colors2.colorOnBg }], children: typeof item.title === "string" ? item.title : item.title }),
|
|
1261
|
+
/* @__PURE__ */ jsx19(
|
|
1262
|
+
ScaledText,
|
|
1245
1263
|
{
|
|
1246
1264
|
style: [styles16.chevron, { color: colors2.colorOnBgSubtle }],
|
|
1247
1265
|
importantForAccessibility: "no",
|
|
@@ -1252,7 +1270,7 @@ function Accordion({
|
|
|
1252
1270
|
]
|
|
1253
1271
|
}
|
|
1254
1272
|
),
|
|
1255
|
-
isOpen && /* @__PURE__ */
|
|
1273
|
+
isOpen && /* @__PURE__ */ jsx19(View13, { style: styles16.panel, accessibilityRole: "summary", children: item.content })
|
|
1256
1274
|
]
|
|
1257
1275
|
},
|
|
1258
1276
|
item.id
|
|
@@ -1262,15 +1280,9 @@ function Accordion({
|
|
|
1262
1280
|
|
|
1263
1281
|
// src/components/ui/Tabs/Tabs.tsx
|
|
1264
1282
|
import { useState as useState4 } from "react";
|
|
1265
|
-
import {
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
Text as Text15,
|
|
1269
|
-
Pressable as Pressable9,
|
|
1270
|
-
ScrollView
|
|
1271
|
-
} from "react-native";
|
|
1272
|
-
import { jsx as jsx19, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1273
|
-
var styles17 = StyleSheet17.create({
|
|
1283
|
+
import { StyleSheet as StyleSheet18, View as View14, Pressable as Pressable9, ScrollView } from "react-native";
|
|
1284
|
+
import { jsx as jsx20, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1285
|
+
var styles17 = StyleSheet18.create({
|
|
1274
1286
|
container: {
|
|
1275
1287
|
overflow: "hidden"
|
|
1276
1288
|
},
|
|
@@ -1310,7 +1322,7 @@ function Tabs({
|
|
|
1310
1322
|
const { colors: colors2 } = useTheme();
|
|
1311
1323
|
const [activeTab, setActiveTab] = useState4(defaultTab ?? tabs[0]?.id);
|
|
1312
1324
|
return /* @__PURE__ */ jsxs11(View14, { style: [styles17.container, style], children: [
|
|
1313
|
-
/* @__PURE__ */
|
|
1325
|
+
/* @__PURE__ */ jsx20(
|
|
1314
1326
|
ScrollView,
|
|
1315
1327
|
{
|
|
1316
1328
|
horizontal: true,
|
|
@@ -1319,7 +1331,7 @@ function Tabs({
|
|
|
1319
1331
|
accessibilityRole: "tabbar",
|
|
1320
1332
|
children: tabs.map((tab) => {
|
|
1321
1333
|
const isActive = activeTab === tab.id;
|
|
1322
|
-
return /* @__PURE__ */
|
|
1334
|
+
return /* @__PURE__ */ jsx20(
|
|
1323
1335
|
Pressable9,
|
|
1324
1336
|
{
|
|
1325
1337
|
onPress: () => setActiveTab(tab.id),
|
|
@@ -1338,8 +1350,8 @@ function Tabs({
|
|
|
1338
1350
|
tab.disabled && styles17.disabled,
|
|
1339
1351
|
pressed && !tab.disabled && styles17.pressed
|
|
1340
1352
|
],
|
|
1341
|
-
children: /* @__PURE__ */
|
|
1342
|
-
|
|
1353
|
+
children: /* @__PURE__ */ jsx20(
|
|
1354
|
+
ScaledText,
|
|
1343
1355
|
{
|
|
1344
1356
|
style: [
|
|
1345
1357
|
styles17.tabLabel,
|
|
@@ -1360,21 +1372,15 @@ function Tabs({
|
|
|
1360
1372
|
tabs.map((tab) => {
|
|
1361
1373
|
const isActive = activeTab === tab.id;
|
|
1362
1374
|
if (!isActive) return null;
|
|
1363
|
-
return /* @__PURE__ */
|
|
1375
|
+
return /* @__PURE__ */ jsx20(View14, { style: styles17.panel, accessibilityRole: "tabpanel", children: tab.content }, tab.id);
|
|
1364
1376
|
})
|
|
1365
1377
|
] });
|
|
1366
1378
|
}
|
|
1367
1379
|
|
|
1368
1380
|
// src/components/ui/Table/Table.tsx
|
|
1369
|
-
import {
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
Text as Text16,
|
|
1373
|
-
ScrollView as ScrollView2,
|
|
1374
|
-
Pressable as Pressable10
|
|
1375
|
-
} from "react-native";
|
|
1376
|
-
import { jsx as jsx20, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1377
|
-
var styles18 = StyleSheet18.create({
|
|
1381
|
+
import { StyleSheet as StyleSheet19, View as View15, ScrollView as ScrollView2, Pressable as Pressable10 } from "react-native";
|
|
1382
|
+
import { jsx as jsx21, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1383
|
+
var styles18 = StyleSheet19.create({
|
|
1378
1384
|
wrapper: {
|
|
1379
1385
|
borderRadius: border.radius.s,
|
|
1380
1386
|
overflow: "hidden"
|
|
@@ -1450,15 +1456,15 @@ function Table({
|
|
|
1450
1456
|
if (sortKey !== col.key) return base;
|
|
1451
1457
|
return `${base}, currently ${sortDirection === "asc" ? "ascending" : "descending"}`;
|
|
1452
1458
|
};
|
|
1453
|
-
return /* @__PURE__ */
|
|
1459
|
+
return /* @__PURE__ */ jsx21(
|
|
1454
1460
|
ScrollView2,
|
|
1455
1461
|
{
|
|
1456
1462
|
horizontal: true,
|
|
1457
1463
|
showsHorizontalScrollIndicator: true,
|
|
1458
1464
|
style: [styles18.wrapper, { backgroundColor: colors2.colorBg }, style],
|
|
1459
1465
|
children: /* @__PURE__ */ jsxs12(View15, { children: [
|
|
1460
|
-
caption && /* @__PURE__ */
|
|
1461
|
-
/* @__PURE__ */
|
|
1466
|
+
caption && /* @__PURE__ */ jsx21(ScaledText, { style: [styles18.caption, { color: colors2.colorOnBgSubtle }], children: caption }),
|
|
1467
|
+
/* @__PURE__ */ jsx21(View15, { style: [styles18.headerRow, { backgroundColor: colors2.colorBgSubtle }], children: columns.map(
|
|
1462
1468
|
(col) => col.sortable ? /* @__PURE__ */ jsxs12(
|
|
1463
1469
|
Pressable10,
|
|
1464
1470
|
{
|
|
@@ -1467,9 +1473,9 @@ function Table({
|
|
|
1467
1473
|
accessibilityLabel: getSortLabel(col),
|
|
1468
1474
|
style: ({ pressed }) => [styles18.headerCell, pressed && styles18.pressed],
|
|
1469
1475
|
children: [
|
|
1470
|
-
/* @__PURE__ */
|
|
1471
|
-
/* @__PURE__ */
|
|
1472
|
-
|
|
1476
|
+
/* @__PURE__ */ jsx21(ScaledText, { style: [styles18.headerText, { color: colors2.colorOnBg }], children: col.header }),
|
|
1477
|
+
/* @__PURE__ */ jsx21(
|
|
1478
|
+
ScaledText,
|
|
1473
1479
|
{
|
|
1474
1480
|
style: [
|
|
1475
1481
|
styles18.sortIndicator,
|
|
@@ -1485,9 +1491,9 @@ function Table({
|
|
|
1485
1491
|
]
|
|
1486
1492
|
},
|
|
1487
1493
|
col.key
|
|
1488
|
-
) : /* @__PURE__ */
|
|
1494
|
+
) : /* @__PURE__ */ jsx21(View15, { style: styles18.headerCell, children: /* @__PURE__ */ jsx21(ScaledText, { style: [styles18.headerText, { color: colors2.colorOnBg }], children: col.header }) }, col.key)
|
|
1489
1495
|
) }),
|
|
1490
|
-
rows.map((row, rowIndex) => /* @__PURE__ */
|
|
1496
|
+
rows.map((row, rowIndex) => /* @__PURE__ */ jsx21(
|
|
1491
1497
|
View15,
|
|
1492
1498
|
{
|
|
1493
1499
|
style: [
|
|
@@ -1496,7 +1502,7 @@ function Table({
|
|
|
1496
1502
|
rowIndex % 2 === 1 && { backgroundColor: colors2.colorBgSubtle }
|
|
1497
1503
|
],
|
|
1498
1504
|
accessibilityRole: "none",
|
|
1499
|
-
children: columns.map((col) => /* @__PURE__ */
|
|
1505
|
+
children: columns.map((col) => /* @__PURE__ */ jsx21(View15, { style: styles18.cell, children: col.render ? typeof col.render(row) === "string" ? /* @__PURE__ */ jsx21(ScaledText, { style: [styles18.cellText, { color: colors2.colorOnBg }], children: col.render(row) }) : col.render(row) : /* @__PURE__ */ jsx21(ScaledText, { style: [styles18.cellText, { color: colors2.colorOnBg }], children: String(row[col.key] ?? "") }) }, col.key))
|
|
1500
1506
|
},
|
|
1501
1507
|
rowIndex
|
|
1502
1508
|
))
|
|
@@ -1507,13 +1513,8 @@ function Table({
|
|
|
1507
1513
|
|
|
1508
1514
|
// src/components/ui/Calendar/Calendar.tsx
|
|
1509
1515
|
import { useState as useState5 } from "react";
|
|
1510
|
-
import {
|
|
1511
|
-
|
|
1512
|
-
View as View16,
|
|
1513
|
-
Text as Text17,
|
|
1514
|
-
Pressable as Pressable11
|
|
1515
|
-
} from "react-native";
|
|
1516
|
-
import { jsx as jsx21, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1516
|
+
import { StyleSheet as StyleSheet20, View as View16, Pressable as Pressable11 } from "react-native";
|
|
1517
|
+
import { jsx as jsx22, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1517
1518
|
var DAYS = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
|
|
1518
1519
|
var DAY_LABELS = {
|
|
1519
1520
|
Su: "Sunday",
|
|
@@ -1556,7 +1557,7 @@ function getFirstDayOfMonth(year, month) {
|
|
|
1556
1557
|
return new Date(year, month, 1).getDay();
|
|
1557
1558
|
}
|
|
1558
1559
|
var DAY_SIZE = 44;
|
|
1559
|
-
var styles19 =
|
|
1560
|
+
var styles19 = StyleSheet20.create({
|
|
1560
1561
|
container: {
|
|
1561
1562
|
alignSelf: "flex-start"
|
|
1562
1563
|
},
|
|
@@ -1676,18 +1677,18 @@ function Calendar({
|
|
|
1676
1677
|
accessibilityLabel: `${MONTHS[viewMonth]} ${viewYear} calendar`,
|
|
1677
1678
|
children: [
|
|
1678
1679
|
/* @__PURE__ */ jsxs13(View16, { style: styles19.header, children: [
|
|
1679
|
-
/* @__PURE__ */
|
|
1680
|
+
/* @__PURE__ */ jsx22(
|
|
1680
1681
|
Pressable11,
|
|
1681
1682
|
{
|
|
1682
1683
|
onPress: () => navigate(-1),
|
|
1683
1684
|
accessibilityRole: "button",
|
|
1684
1685
|
accessibilityLabel: "Previous month",
|
|
1685
1686
|
style: ({ pressed }) => [styles19.navButton, pressed && styles19.pressed],
|
|
1686
|
-
children: /* @__PURE__ */
|
|
1687
|
+
children: /* @__PURE__ */ jsx22(ScaledText, { style: [styles19.navText, { color: colors2.colorOnBg }], children: "\u2039" })
|
|
1687
1688
|
}
|
|
1688
1689
|
),
|
|
1689
1690
|
/* @__PURE__ */ jsxs13(
|
|
1690
|
-
|
|
1691
|
+
ScaledText,
|
|
1691
1692
|
{
|
|
1692
1693
|
style: [styles19.monthYear, { color: colors2.colorOnBg }],
|
|
1693
1694
|
accessibilityRole: "text",
|
|
@@ -1699,34 +1700,34 @@ function Calendar({
|
|
|
1699
1700
|
]
|
|
1700
1701
|
}
|
|
1701
1702
|
),
|
|
1702
|
-
/* @__PURE__ */
|
|
1703
|
+
/* @__PURE__ */ jsx22(
|
|
1703
1704
|
Pressable11,
|
|
1704
1705
|
{
|
|
1705
1706
|
onPress: () => navigate(1),
|
|
1706
1707
|
accessibilityRole: "button",
|
|
1707
1708
|
accessibilityLabel: "Next month",
|
|
1708
1709
|
style: ({ pressed }) => [styles19.navButton, pressed && styles19.pressed],
|
|
1709
|
-
children: /* @__PURE__ */
|
|
1710
|
+
children: /* @__PURE__ */ jsx22(ScaledText, { style: [styles19.navText, { color: colors2.colorOnBg }], children: "\u203A" })
|
|
1710
1711
|
}
|
|
1711
1712
|
)
|
|
1712
1713
|
] }),
|
|
1713
|
-
/* @__PURE__ */
|
|
1714
|
-
|
|
1714
|
+
/* @__PURE__ */ jsx22(View16, { style: styles19.weekRow, children: DAYS.map((d) => /* @__PURE__ */ jsx22(View16, { style: styles19.weekday, children: /* @__PURE__ */ jsx22(
|
|
1715
|
+
ScaledText,
|
|
1715
1716
|
{
|
|
1716
1717
|
style: [styles19.weekdayText, { color: colors2.colorOnBgSubtle }],
|
|
1717
1718
|
accessibilityLabel: DAY_LABELS[d],
|
|
1718
1719
|
children: d
|
|
1719
1720
|
}
|
|
1720
1721
|
) }, d)) }),
|
|
1721
|
-
/* @__PURE__ */
|
|
1722
|
+
/* @__PURE__ */ jsx22(View16, { style: styles19.grid, children: rows.map((row, rowIndex) => /* @__PURE__ */ jsx22(View16, { style: styles19.dayRow, children: row.map((cell, colIndex) => {
|
|
1722
1723
|
if (!cell) {
|
|
1723
|
-
return /* @__PURE__ */
|
|
1724
|
+
return /* @__PURE__ */ jsx22(View16, { style: styles19.dayCell }, colIndex);
|
|
1724
1725
|
}
|
|
1725
1726
|
const date = new Date(viewYear, viewMonth, cell.day);
|
|
1726
1727
|
const isSelected = selected ? isSameDay(date, selected) : false;
|
|
1727
1728
|
const isToday = isSameDay(date, today);
|
|
1728
1729
|
const disabled = isOutOfRange(date, min, max);
|
|
1729
|
-
return /* @__PURE__ */
|
|
1730
|
+
return /* @__PURE__ */ jsx22(
|
|
1730
1731
|
Pressable11,
|
|
1731
1732
|
{
|
|
1732
1733
|
onPress: () => selectDay(cell.day),
|
|
@@ -1753,8 +1754,8 @@ function Calendar({
|
|
|
1753
1754
|
disabled && styles19.disabled,
|
|
1754
1755
|
pressed && !disabled && styles19.pressed
|
|
1755
1756
|
],
|
|
1756
|
-
children: /* @__PURE__ */
|
|
1757
|
-
|
|
1757
|
+
children: /* @__PURE__ */ jsx22(
|
|
1758
|
+
ScaledText,
|
|
1758
1759
|
{
|
|
1759
1760
|
style: [
|
|
1760
1761
|
styles19.dayText,
|
|
@@ -1777,18 +1778,11 @@ function Calendar({
|
|
|
1777
1778
|
|
|
1778
1779
|
// src/components/ui/Carousel/Carousel.tsx
|
|
1779
1780
|
import { useCallback as useCallback2, useRef as useRef3, useState as useState6 } from "react";
|
|
1780
|
-
import {
|
|
1781
|
-
|
|
1782
|
-
View as View17,
|
|
1783
|
-
Text as Text18,
|
|
1784
|
-
Pressable as Pressable12,
|
|
1785
|
-
ScrollView as ScrollView3,
|
|
1786
|
-
Dimensions
|
|
1787
|
-
} from "react-native";
|
|
1788
|
-
import { jsx as jsx22, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1781
|
+
import { StyleSheet as StyleSheet21, View as View17, Pressable as Pressable12, ScrollView as ScrollView3, Dimensions } from "react-native";
|
|
1782
|
+
import { jsx as jsx23, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1789
1783
|
var DOT_SIZE = 8;
|
|
1790
1784
|
var DOT_HIT_SIZE = 44;
|
|
1791
|
-
var styles20 =
|
|
1785
|
+
var styles20 = StyleSheet21.create({
|
|
1792
1786
|
container: {
|
|
1793
1787
|
width: "100%"
|
|
1794
1788
|
},
|
|
@@ -1868,7 +1862,7 @@ function Carousel({
|
|
|
1868
1862
|
accessibilityRole: "none",
|
|
1869
1863
|
accessibilityLabel: label,
|
|
1870
1864
|
children: [
|
|
1871
|
-
/* @__PURE__ */
|
|
1865
|
+
/* @__PURE__ */ jsx23(
|
|
1872
1866
|
ScrollView3,
|
|
1873
1867
|
{
|
|
1874
1868
|
ref: scrollRef,
|
|
@@ -1879,11 +1873,11 @@ function Carousel({
|
|
|
1879
1873
|
scrollEventThrottle: 16,
|
|
1880
1874
|
onLayout: (e) => setSlideWidth(e.nativeEvent.layout.width),
|
|
1881
1875
|
style: styles20.scrollView,
|
|
1882
|
-
children: items.map((item, index) => /* @__PURE__ */
|
|
1876
|
+
children: items.map((item, index) => /* @__PURE__ */ jsx23(View17, { style: [styles20.slide, { width: slideWidth }], children: item }, index))
|
|
1883
1877
|
}
|
|
1884
1878
|
),
|
|
1885
1879
|
/* @__PURE__ */ jsxs14(View17, { style: styles20.nav, children: [
|
|
1886
|
-
/* @__PURE__ */
|
|
1880
|
+
/* @__PURE__ */ jsx23(
|
|
1887
1881
|
Pressable12,
|
|
1888
1882
|
{
|
|
1889
1883
|
onPress: () => scrollTo(activeIndex - 1),
|
|
@@ -1896,10 +1890,10 @@ function Carousel({
|
|
|
1896
1890
|
activeIndex <= 0 && { opacity: 0.4 },
|
|
1897
1891
|
pressed && styles20.pressed
|
|
1898
1892
|
],
|
|
1899
|
-
children: /* @__PURE__ */
|
|
1893
|
+
children: /* @__PURE__ */ jsx23(ScaledText, { style: [styles20.navText, { color: colors2.colorOnBg }], children: "\u2039" })
|
|
1900
1894
|
}
|
|
1901
1895
|
),
|
|
1902
|
-
/* @__PURE__ */
|
|
1896
|
+
/* @__PURE__ */ jsx23(View17, { style: styles20.dots, children: items.map((_, index) => /* @__PURE__ */ jsx23(
|
|
1903
1897
|
Pressable12,
|
|
1904
1898
|
{
|
|
1905
1899
|
onPress: () => scrollTo(index),
|
|
@@ -1907,7 +1901,7 @@ function Carousel({
|
|
|
1907
1901
|
accessibilityLabel: `Go to slide ${index + 1}`,
|
|
1908
1902
|
accessibilityState: { selected: activeIndex === index },
|
|
1909
1903
|
style: styles20.dotWrapper,
|
|
1910
|
-
children: /* @__PURE__ */
|
|
1904
|
+
children: /* @__PURE__ */ jsx23(
|
|
1911
1905
|
View17,
|
|
1912
1906
|
{
|
|
1913
1907
|
style: [
|
|
@@ -1921,7 +1915,7 @@ function Carousel({
|
|
|
1921
1915
|
},
|
|
1922
1916
|
index
|
|
1923
1917
|
)) }),
|
|
1924
|
-
/* @__PURE__ */
|
|
1918
|
+
/* @__PURE__ */ jsx23(
|
|
1925
1919
|
Pressable12,
|
|
1926
1920
|
{
|
|
1927
1921
|
onPress: () => scrollTo(activeIndex + 1),
|
|
@@ -1934,7 +1928,7 @@ function Carousel({
|
|
|
1934
1928
|
activeIndex >= items.length - 1 && { opacity: 0.4 },
|
|
1935
1929
|
pressed && styles20.pressed
|
|
1936
1930
|
],
|
|
1937
|
-
children: /* @__PURE__ */
|
|
1931
|
+
children: /* @__PURE__ */ jsx23(ScaledText, { style: [styles20.navText, { color: colors2.colorOnBg }], children: "\u203A" })
|
|
1938
1932
|
}
|
|
1939
1933
|
)
|
|
1940
1934
|
] })
|
|
@@ -1944,8 +1938,8 @@ function Carousel({
|
|
|
1944
1938
|
}
|
|
1945
1939
|
|
|
1946
1940
|
// src/components/layout/Card/Card.tsx
|
|
1947
|
-
import { StyleSheet as
|
|
1948
|
-
import { jsx as
|
|
1941
|
+
import { StyleSheet as StyleSheet22, View as View18, Pressable as Pressable13 } from "react-native";
|
|
1942
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
1949
1943
|
var paddingMap = {
|
|
1950
1944
|
none: 0,
|
|
1951
1945
|
small: spacing.s,
|
|
@@ -1957,7 +1951,7 @@ var alignMap = {
|
|
|
1957
1951
|
center: "center",
|
|
1958
1952
|
end: "flex-end"
|
|
1959
1953
|
};
|
|
1960
|
-
var styles21 =
|
|
1954
|
+
var styles21 = StyleSheet22.create({
|
|
1961
1955
|
card: {
|
|
1962
1956
|
borderRadius: border.radius.m,
|
|
1963
1957
|
overflow: "hidden"
|
|
@@ -1992,7 +1986,7 @@ function Card({
|
|
|
1992
1986
|
alignItems: alignMap[textAlign]
|
|
1993
1987
|
};
|
|
1994
1988
|
if (onPress) {
|
|
1995
|
-
return /* @__PURE__ */
|
|
1989
|
+
return /* @__PURE__ */ jsx24(
|
|
1996
1990
|
Pressable13,
|
|
1997
1991
|
{
|
|
1998
1992
|
onPress,
|
|
@@ -2003,18 +1997,18 @@ function Card({
|
|
|
2003
1997
|
}
|
|
2004
1998
|
);
|
|
2005
1999
|
}
|
|
2006
|
-
return /* @__PURE__ */
|
|
2000
|
+
return /* @__PURE__ */ jsx24(View18, { style: [styles21.card, variantStyle, inner, style], children });
|
|
2007
2001
|
}
|
|
2008
2002
|
|
|
2009
2003
|
// src/components/layout/SectionHeader/SectionHeader.tsx
|
|
2010
|
-
import { StyleSheet as
|
|
2011
|
-
import { jsx as
|
|
2004
|
+
import { StyleSheet as StyleSheet23, View as View19 } from "react-native";
|
|
2005
|
+
import { jsx as jsx25, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2012
2006
|
var alignMap2 = {
|
|
2013
2007
|
start: "flex-start",
|
|
2014
2008
|
center: "center",
|
|
2015
2009
|
end: "flex-end"
|
|
2016
2010
|
};
|
|
2017
|
-
var titleStyles =
|
|
2011
|
+
var titleStyles = StyleSheet23.create({
|
|
2018
2012
|
small: {
|
|
2019
2013
|
fontSize: font.size.heading3,
|
|
2020
2014
|
fontFamily: font.family.heading,
|
|
@@ -2034,7 +2028,7 @@ var titleStyles = StyleSheet22.create({
|
|
|
2034
2028
|
lineHeight: lineHeight.heading1
|
|
2035
2029
|
}
|
|
2036
2030
|
});
|
|
2037
|
-
var styles22 =
|
|
2031
|
+
var styles22 = StyleSheet23.create({
|
|
2038
2032
|
container: {
|
|
2039
2033
|
gap: spacing.xxs
|
|
2040
2034
|
},
|
|
@@ -2054,23 +2048,23 @@ function SectionHeader({
|
|
|
2054
2048
|
const { colors: colors2 } = useTheme();
|
|
2055
2049
|
const align = alignMap2[alignment];
|
|
2056
2050
|
return /* @__PURE__ */ jsxs15(View19, { style: [styles22.container, { alignItems: align }, style], children: [
|
|
2057
|
-
/* @__PURE__ */
|
|
2058
|
-
|
|
2051
|
+
/* @__PURE__ */ jsx25(
|
|
2052
|
+
ScaledText,
|
|
2059
2053
|
{
|
|
2060
2054
|
accessibilityRole: "header",
|
|
2061
2055
|
style: [titleStyles[size], { color: colors2.colorOnBg }],
|
|
2062
2056
|
children: title
|
|
2063
2057
|
}
|
|
2064
2058
|
),
|
|
2065
|
-
subtitle && /* @__PURE__ */
|
|
2059
|
+
subtitle && /* @__PURE__ */ jsx25(ScaledText, { style: [styles22.subtitle, { color: colors2.colorOnBgSubtle }], children: subtitle })
|
|
2066
2060
|
] });
|
|
2067
2061
|
}
|
|
2068
2062
|
|
|
2069
2063
|
// src/components/layout/IconWrapper/IconWrapper.tsx
|
|
2070
2064
|
import { View as View20 } from "react-native";
|
|
2071
|
-
import { jsx as
|
|
2065
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
2072
2066
|
function IconWrapper({ children, style, accessibilityElementsHidden }) {
|
|
2073
|
-
return /* @__PURE__ */
|
|
2067
|
+
return /* @__PURE__ */ jsx26(
|
|
2074
2068
|
View20,
|
|
2075
2069
|
{
|
|
2076
2070
|
style: [{ alignItems: "center", justifyContent: "center" }, style],
|
|
@@ -2082,9 +2076,9 @@ function IconWrapper({ children, style, accessibilityElementsHidden }) {
|
|
|
2082
2076
|
}
|
|
2083
2077
|
|
|
2084
2078
|
// src/components/layout/ButtonGroup/ButtonGroup.tsx
|
|
2085
|
-
import { StyleSheet as
|
|
2086
|
-
import { jsx as
|
|
2087
|
-
var styles23 =
|
|
2079
|
+
import { StyleSheet as StyleSheet24, View as View21 } from "react-native";
|
|
2080
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
2081
|
+
var styles23 = StyleSheet24.create({
|
|
2088
2082
|
group: {
|
|
2089
2083
|
flexDirection: "row",
|
|
2090
2084
|
flexWrap: "wrap",
|
|
@@ -2097,7 +2091,7 @@ var styles23 = StyleSheet23.create({
|
|
|
2097
2091
|
});
|
|
2098
2092
|
function ButtonContainer({ children, variant, accessibilityLabel, style }) {
|
|
2099
2093
|
const isColumn = variant === "card" || variant === "modal";
|
|
2100
|
-
return /* @__PURE__ */
|
|
2094
|
+
return /* @__PURE__ */ jsx27(
|
|
2101
2095
|
View21,
|
|
2102
2096
|
{
|
|
2103
2097
|
accessibilityLabel,
|
|
@@ -2109,14 +2103,14 @@ function ButtonContainer({ children, variant, accessibilityLabel, style }) {
|
|
|
2109
2103
|
var ButtonGroup = ButtonContainer;
|
|
2110
2104
|
|
|
2111
2105
|
// src/components/interaction/Button/Button.tsx
|
|
2112
|
-
import { StyleSheet as
|
|
2113
|
-
import { jsx as
|
|
2106
|
+
import { StyleSheet as StyleSheet25, Pressable as Pressable14, View as View22 } from "react-native";
|
|
2107
|
+
import { jsx as jsx28, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2114
2108
|
var sizeTokens = {
|
|
2115
2109
|
small: { height: 36, px: spacing.m, fontSize: font.size.bodyS, radius: border.radius.full },
|
|
2116
2110
|
medium: { height: 48, px: spacing.m, fontSize: font.size.body, radius: border.radius.full },
|
|
2117
2111
|
large: { height: 56, px: spacing.xxl, fontSize: font.size.heading3, radius: border.radius.full }
|
|
2118
2112
|
};
|
|
2119
|
-
var styles24 =
|
|
2113
|
+
var styles24 = StyleSheet25.create({
|
|
2120
2114
|
pressable: {
|
|
2121
2115
|
flexDirection: "row",
|
|
2122
2116
|
alignItems: "center",
|
|
@@ -2127,7 +2121,9 @@ var styles24 = StyleSheet24.create({
|
|
|
2127
2121
|
label: {
|
|
2128
2122
|
fontFamily: font.family.body,
|
|
2129
2123
|
fontWeight: font.weight.semibold,
|
|
2130
|
-
includeFontPadding: false
|
|
2124
|
+
includeFontPadding: false,
|
|
2125
|
+
flexShrink: 1,
|
|
2126
|
+
textAlign: "center"
|
|
2131
2127
|
}
|
|
2132
2128
|
});
|
|
2133
2129
|
function Button({
|
|
@@ -2149,12 +2145,15 @@ function Button({
|
|
|
2149
2145
|
const outlineTextColor = colors2.colorInteractiveOnBg;
|
|
2150
2146
|
const isOutline = variant === "outline" || variant === "ghost";
|
|
2151
2147
|
const containerStyle = {
|
|
2152
|
-
height,
|
|
2148
|
+
minHeight: height,
|
|
2153
2149
|
paddingHorizontal: isIconOnly ? spacing.xs : px,
|
|
2154
2150
|
borderRadius: radius,
|
|
2155
2151
|
opacity: disabled ? 0.4 : 1,
|
|
2156
2152
|
// Icon-only: square with equal xs padding on both axes.
|
|
2157
2153
|
...isIconOnly && { aspectRatio: 1, paddingVertical: spacing.xs },
|
|
2154
|
+
// Icon-only keeps a fixed height (stays square); a text button gets vertical padding
|
|
2155
|
+
// instead, so a wrapped label grows the button from minHeight rather than clipping.
|
|
2156
|
+
...isIconOnly ? { height } : { paddingVertical: spacing.xxs },
|
|
2158
2157
|
...variant === "default" && { backgroundColor: primaryColor },
|
|
2159
2158
|
...isOutline && {
|
|
2160
2159
|
backgroundColor: "transparent",
|
|
@@ -2173,19 +2172,19 @@ function Button({
|
|
|
2173
2172
|
accessibilityState: { disabled },
|
|
2174
2173
|
style: ({ pressed }) => [styles24.pressable, containerStyle, pressed && { opacity: 0.75 }, style],
|
|
2175
2174
|
children: [
|
|
2176
|
-
iconStart && /* @__PURE__ */
|
|
2177
|
-
children && (isIconOnly ? children : /* @__PURE__ */
|
|
2178
|
-
iconEnd && /* @__PURE__ */
|
|
2175
|
+
iconStart && /* @__PURE__ */ jsx28(View22, { importantForAccessibility: "no-hide-descendants", accessibilityElementsHidden: true, children: iconStart }),
|
|
2176
|
+
children && (isIconOnly ? children : /* @__PURE__ */ jsx28(ScaledText, { style: [styles24.label, { fontSize, color: textColor }], children })),
|
|
2177
|
+
iconEnd && /* @__PURE__ */ jsx28(View22, { importantForAccessibility: "no-hide-descendants", children: iconEnd })
|
|
2179
2178
|
]
|
|
2180
2179
|
}
|
|
2181
2180
|
);
|
|
2182
2181
|
}
|
|
2183
2182
|
|
|
2184
2183
|
// src/components/interaction/Rating/Rating.tsx
|
|
2185
|
-
import { StyleSheet as
|
|
2186
|
-
import { jsx as
|
|
2184
|
+
import { StyleSheet as StyleSheet26, View as View23 } from "react-native";
|
|
2185
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
2187
2186
|
var STAR_SIZE = 24;
|
|
2188
|
-
var styles25 =
|
|
2187
|
+
var styles25 = StyleSheet26.create({
|
|
2189
2188
|
container: {
|
|
2190
2189
|
flexDirection: "row",
|
|
2191
2190
|
alignItems: "center"
|
|
@@ -2198,14 +2197,14 @@ var styles25 = StyleSheet25.create({
|
|
|
2198
2197
|
function Rating({ value, max = 5, style, accessibilityLabel }) {
|
|
2199
2198
|
const { colors: colors2 } = useTheme();
|
|
2200
2199
|
const label = accessibilityLabel ?? `${value} out of ${max} stars`;
|
|
2201
|
-
return /* @__PURE__ */
|
|
2200
|
+
return /* @__PURE__ */ jsx29(
|
|
2202
2201
|
View23,
|
|
2203
2202
|
{
|
|
2204
2203
|
style: [styles25.container, style],
|
|
2205
2204
|
accessibilityRole: "image",
|
|
2206
2205
|
accessibilityLabel: label,
|
|
2207
|
-
children: Array.from({ length: max }).map((_, i) => /* @__PURE__ */
|
|
2208
|
-
|
|
2206
|
+
children: Array.from({ length: max }).map((_, i) => /* @__PURE__ */ jsx29(
|
|
2207
|
+
ScaledText,
|
|
2209
2208
|
{
|
|
2210
2209
|
style: [
|
|
2211
2210
|
styles25.star,
|
|
@@ -2222,15 +2221,14 @@ function Rating({ value, max = 5, style, accessibilityLabel }) {
|
|
|
2222
2221
|
}
|
|
2223
2222
|
|
|
2224
2223
|
// src/components/interaction/form/Switch/Switch.tsx
|
|
2225
|
-
import { Switch as RNSwitch, View as View24, StyleSheet as
|
|
2224
|
+
import { Switch as RNSwitch, View as View24, StyleSheet as StyleSheet28 } from "react-native";
|
|
2226
2225
|
|
|
2227
2226
|
// src/components/interaction/form/atoms/Label.tsx
|
|
2228
|
-
import {
|
|
2229
|
-
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
2227
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
2230
2228
|
function Label({ label, style }) {
|
|
2231
2229
|
const { colors: colors2 } = useTheme();
|
|
2232
|
-
return /* @__PURE__ */
|
|
2233
|
-
|
|
2230
|
+
return /* @__PURE__ */ jsx30(
|
|
2231
|
+
ScaledText,
|
|
2234
2232
|
{
|
|
2235
2233
|
style: [
|
|
2236
2234
|
{
|
|
@@ -2248,9 +2246,9 @@ function Label({ label, style }) {
|
|
|
2248
2246
|
}
|
|
2249
2247
|
|
|
2250
2248
|
// src/components/interaction/form/atoms/Message.tsx
|
|
2251
|
-
import { StyleSheet as
|
|
2252
|
-
import { jsx as
|
|
2253
|
-
var styles26 =
|
|
2249
|
+
import { StyleSheet as StyleSheet27 } from "react-native";
|
|
2250
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
2251
|
+
var styles26 = StyleSheet27.create({
|
|
2254
2252
|
base: {
|
|
2255
2253
|
fontFamily: font.family.body,
|
|
2256
2254
|
fontSize: font.size.bodyS,
|
|
@@ -2261,8 +2259,8 @@ function Message({ message, type, style }) {
|
|
|
2261
2259
|
const { colors: colors2 } = useTheme();
|
|
2262
2260
|
if (!message) return null;
|
|
2263
2261
|
const color = type === "error" ? colors2.colorError : colors2.colorOnBgSubtle;
|
|
2264
|
-
return /* @__PURE__ */
|
|
2265
|
-
|
|
2262
|
+
return /* @__PURE__ */ jsx31(
|
|
2263
|
+
ScaledText,
|
|
2266
2264
|
{
|
|
2267
2265
|
accessibilityRole: type === "error" ? "alert" : "none",
|
|
2268
2266
|
accessibilityLiveRegion: type === "error" ? "assertive" : "polite",
|
|
@@ -2273,8 +2271,8 @@ function Message({ message, type, style }) {
|
|
|
2273
2271
|
}
|
|
2274
2272
|
|
|
2275
2273
|
// src/components/interaction/form/Switch/Switch.tsx
|
|
2276
|
-
import { jsx as
|
|
2277
|
-
var styles27 =
|
|
2274
|
+
import { jsx as jsx32, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2275
|
+
var styles27 = StyleSheet28.create({
|
|
2278
2276
|
container: {
|
|
2279
2277
|
gap: spacing.xxs
|
|
2280
2278
|
},
|
|
@@ -2296,7 +2294,7 @@ function Switch({
|
|
|
2296
2294
|
const { colors: colors2 } = useTheme();
|
|
2297
2295
|
return /* @__PURE__ */ jsxs17(View24, { style: [styles27.container, style], children: [
|
|
2298
2296
|
/* @__PURE__ */ jsxs17(View24, { style: styles27.row, children: [
|
|
2299
|
-
/* @__PURE__ */
|
|
2297
|
+
/* @__PURE__ */ jsx32(
|
|
2300
2298
|
RNSwitch,
|
|
2301
2299
|
{
|
|
2302
2300
|
value,
|
|
@@ -2309,18 +2307,18 @@ function Switch({
|
|
|
2309
2307
|
trackColor: { false: colors2.colorBgSubtle, true: colors2.colorBlueSubtle }
|
|
2310
2308
|
}
|
|
2311
2309
|
),
|
|
2312
|
-
/* @__PURE__ */
|
|
2310
|
+
/* @__PURE__ */ jsx32(Label, { label })
|
|
2313
2311
|
] }),
|
|
2314
|
-
/* @__PURE__ */
|
|
2315
|
-
/* @__PURE__ */
|
|
2312
|
+
/* @__PURE__ */ jsx32(Message, { type: "error", message: error }),
|
|
2313
|
+
/* @__PURE__ */ jsx32(Message, { type: "hint", message: hint })
|
|
2316
2314
|
] });
|
|
2317
2315
|
}
|
|
2318
2316
|
|
|
2319
2317
|
// src/components/interaction/form/Checkbox/Checkbox.tsx
|
|
2320
|
-
import { StyleSheet as
|
|
2321
|
-
import { jsx as
|
|
2318
|
+
import { StyleSheet as StyleSheet29, View as View25, Pressable as Pressable15 } from "react-native";
|
|
2319
|
+
import { jsx as jsx33, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2322
2320
|
var BOX = 22;
|
|
2323
|
-
var styles28 =
|
|
2321
|
+
var styles28 = StyleSheet29.create({
|
|
2324
2322
|
container: {
|
|
2325
2323
|
gap: spacing.xxs
|
|
2326
2324
|
},
|
|
@@ -2368,20 +2366,20 @@ function Checkbox({
|
|
|
2368
2366
|
disabled,
|
|
2369
2367
|
style: ({ pressed }) => [styles28.row, pressed && { opacity: 0.7 }, disabled && { opacity: 0.4 }],
|
|
2370
2368
|
children: [
|
|
2371
|
-
/* @__PURE__ */
|
|
2372
|
-
/* @__PURE__ */
|
|
2369
|
+
/* @__PURE__ */ jsx33(View25, { style: [styles28.box, { borderColor, backgroundColor: bgColor }], children: checked && /* @__PURE__ */ jsx33(Label, { label: "\u2713", style: [styles28.checkmark, { color: colors2.colorOnInteractive }] }) }),
|
|
2370
|
+
/* @__PURE__ */ jsx33(Label, { label })
|
|
2373
2371
|
]
|
|
2374
2372
|
}
|
|
2375
2373
|
),
|
|
2376
|
-
/* @__PURE__ */
|
|
2377
|
-
/* @__PURE__ */
|
|
2374
|
+
/* @__PURE__ */ jsx33(Message, { type: "error", message: error }),
|
|
2375
|
+
/* @__PURE__ */ jsx33(Message, { type: "hint", message: hint })
|
|
2378
2376
|
] });
|
|
2379
2377
|
}
|
|
2380
2378
|
|
|
2381
2379
|
// src/components/interaction/form/CheckboxGroup/CheckboxGroup.tsx
|
|
2382
|
-
import { StyleSheet as
|
|
2383
|
-
import { jsx as
|
|
2384
|
-
var styles29 =
|
|
2380
|
+
import { StyleSheet as StyleSheet30, View as View26 } from "react-native";
|
|
2381
|
+
import { jsx as jsx34, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2382
|
+
var styles29 = StyleSheet30.create({
|
|
2385
2383
|
container: {
|
|
2386
2384
|
gap: spacing.xs
|
|
2387
2385
|
},
|
|
@@ -2415,24 +2413,24 @@ function CheckboxGroup({
|
|
|
2415
2413
|
accessibilityRole: "none",
|
|
2416
2414
|
accessibilityLabel: legend,
|
|
2417
2415
|
children: [
|
|
2418
|
-
/* @__PURE__ */ jsxs19(
|
|
2416
|
+
/* @__PURE__ */ jsxs19(ScaledText, { style: [styles29.legend, { color: colors2.colorOnBg }], children: [
|
|
2419
2417
|
legend,
|
|
2420
|
-
required && /* @__PURE__ */
|
|
2418
|
+
required && /* @__PURE__ */ jsx34(ScaledText, { style: [styles29.required, { color: colors2.colorOnBgSubtle }], children: " *" })
|
|
2421
2419
|
] }),
|
|
2422
|
-
/* @__PURE__ */
|
|
2423
|
-
/* @__PURE__ */
|
|
2424
|
-
/* @__PURE__ */
|
|
2420
|
+
/* @__PURE__ */ jsx34(View26, { style: styles29.items, children }),
|
|
2421
|
+
/* @__PURE__ */ jsx34(Message, { type: "error", message: error }),
|
|
2422
|
+
/* @__PURE__ */ jsx34(Message, { type: "hint", message: hint })
|
|
2425
2423
|
]
|
|
2426
2424
|
}
|
|
2427
2425
|
);
|
|
2428
2426
|
}
|
|
2429
2427
|
|
|
2430
2428
|
// src/components/interaction/form/Radio/Radio.tsx
|
|
2431
|
-
import { StyleSheet as
|
|
2432
|
-
import { jsx as
|
|
2429
|
+
import { StyleSheet as StyleSheet31, View as View27, Pressable as Pressable16 } from "react-native";
|
|
2430
|
+
import { jsx as jsx35, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2433
2431
|
var DOT = 22;
|
|
2434
2432
|
var INNER = 10;
|
|
2435
|
-
var styles30 =
|
|
2433
|
+
var styles30 = StyleSheet31.create({
|
|
2436
2434
|
container: {
|
|
2437
2435
|
gap: spacing.xxs
|
|
2438
2436
|
},
|
|
@@ -2479,20 +2477,20 @@ function Radio({
|
|
|
2479
2477
|
disabled,
|
|
2480
2478
|
style: ({ pressed }) => [styles30.row, pressed && { opacity: 0.7 }, disabled && { opacity: 0.4 }],
|
|
2481
2479
|
children: [
|
|
2482
|
-
/* @__PURE__ */
|
|
2483
|
-
/* @__PURE__ */
|
|
2480
|
+
/* @__PURE__ */ jsx35(View27, { style: [styles30.outer, { borderColor }], children: checked && /* @__PURE__ */ jsx35(View27, { style: [styles30.inner, { backgroundColor: colors2.colorInteractive }] }) }),
|
|
2481
|
+
/* @__PURE__ */ jsx35(Label, { label })
|
|
2484
2482
|
]
|
|
2485
2483
|
}
|
|
2486
2484
|
),
|
|
2487
|
-
/* @__PURE__ */
|
|
2488
|
-
/* @__PURE__ */
|
|
2485
|
+
/* @__PURE__ */ jsx35(Message, { type: "error", message: error }),
|
|
2486
|
+
/* @__PURE__ */ jsx35(Message, { type: "hint", message: hint })
|
|
2489
2487
|
] });
|
|
2490
2488
|
}
|
|
2491
2489
|
|
|
2492
2490
|
// src/components/interaction/form/RadioGroup/RadioGroup.tsx
|
|
2493
|
-
import { StyleSheet as
|
|
2494
|
-
import { jsx as
|
|
2495
|
-
var styles31 =
|
|
2491
|
+
import { StyleSheet as StyleSheet32, View as View28 } from "react-native";
|
|
2492
|
+
import { jsx as jsx36, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2493
|
+
var styles31 = StyleSheet32.create({
|
|
2496
2494
|
container: {
|
|
2497
2495
|
gap: spacing.xs
|
|
2498
2496
|
},
|
|
@@ -2526,22 +2524,22 @@ function RadioGroup({
|
|
|
2526
2524
|
accessibilityRole: "radiogroup",
|
|
2527
2525
|
accessibilityLabel: legend,
|
|
2528
2526
|
children: [
|
|
2529
|
-
/* @__PURE__ */ jsxs21(
|
|
2527
|
+
/* @__PURE__ */ jsxs21(ScaledText, { style: [styles31.legend, { color: colors2.colorOnBg }], children: [
|
|
2530
2528
|
legend,
|
|
2531
|
-
required && /* @__PURE__ */
|
|
2529
|
+
required && /* @__PURE__ */ jsx36(ScaledText, { style: [styles31.required, { color: colors2.colorOnBgSubtle }], children: " *" })
|
|
2532
2530
|
] }),
|
|
2533
|
-
/* @__PURE__ */
|
|
2534
|
-
/* @__PURE__ */
|
|
2535
|
-
/* @__PURE__ */
|
|
2531
|
+
/* @__PURE__ */ jsx36(View28, { style: styles31.items, children }),
|
|
2532
|
+
/* @__PURE__ */ jsx36(Message, { type: "error", message: error }),
|
|
2533
|
+
/* @__PURE__ */ jsx36(Message, { type: "hint", message: hint })
|
|
2536
2534
|
]
|
|
2537
2535
|
}
|
|
2538
2536
|
);
|
|
2539
2537
|
}
|
|
2540
2538
|
|
|
2541
2539
|
// src/components/interaction/form/FileInput/FileInput.tsx
|
|
2542
|
-
import { StyleSheet as
|
|
2543
|
-
import { jsx as
|
|
2544
|
-
var styles32 =
|
|
2540
|
+
import { StyleSheet as StyleSheet33, View as View29, Pressable as Pressable17 } from "react-native";
|
|
2541
|
+
import { jsx as jsx37, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2542
|
+
var styles32 = StyleSheet33.create({
|
|
2545
2543
|
container: {
|
|
2546
2544
|
gap: spacing.xxs
|
|
2547
2545
|
},
|
|
@@ -2597,7 +2595,7 @@ function FileInput({
|
|
|
2597
2595
|
const { colors: colors2 } = useTheme();
|
|
2598
2596
|
const borderColor = error ? colors2.colorError : colors2.colorBgSubtle;
|
|
2599
2597
|
return /* @__PURE__ */ jsxs22(View29, { style: [styles32.container, style], testID: name, children: [
|
|
2600
|
-
/* @__PURE__ */
|
|
2598
|
+
/* @__PURE__ */ jsx37(
|
|
2601
2599
|
Label,
|
|
2602
2600
|
{
|
|
2603
2601
|
label: required ? `${label} *` : label
|
|
@@ -2621,37 +2619,30 @@ function FileInput({
|
|
|
2621
2619
|
disabled && { opacity: 0.4 }
|
|
2622
2620
|
],
|
|
2623
2621
|
children: [
|
|
2624
|
-
/* @__PURE__ */
|
|
2625
|
-
/* @__PURE__ */
|
|
2626
|
-
fileNames.length > 0 && /* @__PURE__ */
|
|
2627
|
-
accept && /* @__PURE__ */
|
|
2622
|
+
/* @__PURE__ */ jsx37(ScaledText, { style: [styles32.icon, { color: colors2.colorInteractive }], children: "\u2191" }),
|
|
2623
|
+
/* @__PURE__ */ jsx37(ScaledText, { style: [styles32.prompt, { color: colors2.colorOnBgSubtle }], children: fileNames.length > 0 ? "Selected files:" : "Tap to select file" }),
|
|
2624
|
+
fileNames.length > 0 && /* @__PURE__ */ jsx37(View29, { style: styles32.fileList, children: fileNames.map((fileName) => /* @__PURE__ */ jsx37(ScaledText, { style: [styles32.fileName, { color: colors2.colorOnBg }], children: fileName }, fileName)) }),
|
|
2625
|
+
accept && /* @__PURE__ */ jsx37(ScaledText, { style: [styles32.acceptHint, { color: colors2.colorOnBgSubtle }], children: accept })
|
|
2628
2626
|
]
|
|
2629
2627
|
}
|
|
2630
2628
|
),
|
|
2631
|
-
/* @__PURE__ */
|
|
2632
|
-
/* @__PURE__ */
|
|
2629
|
+
/* @__PURE__ */ jsx37(Message, { type: "error", message: error }),
|
|
2630
|
+
/* @__PURE__ */ jsx37(Message, { type: "hint", message: hint })
|
|
2633
2631
|
] });
|
|
2634
2632
|
}
|
|
2635
2633
|
|
|
2636
2634
|
// src/components/interaction/form/Combobox/Combobox.tsx
|
|
2637
2635
|
import { useState as useState7, useMemo as useMemo2 } from "react";
|
|
2638
|
-
import {
|
|
2639
|
-
StyleSheet as StyleSheet33,
|
|
2640
|
-
View as View30,
|
|
2641
|
-
TextInput,
|
|
2642
|
-
Pressable as Pressable18,
|
|
2643
|
-
Text as Text27,
|
|
2644
|
-
ScrollView as ScrollView4
|
|
2645
|
-
} from "react-native";
|
|
2636
|
+
import { StyleSheet as StyleSheet34, View as View30, Pressable as Pressable18, ScrollView as ScrollView4 } from "react-native";
|
|
2646
2637
|
|
|
2647
2638
|
// src/components/interaction/form/atoms/inputHelpers.ts
|
|
2648
2639
|
var OPTICAL_TEXT_SHIFT = -1.5;
|
|
2649
2640
|
|
|
2650
2641
|
// src/components/interaction/form/Combobox/Combobox.tsx
|
|
2651
|
-
import { jsx as
|
|
2642
|
+
import { jsx as jsx38, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2652
2643
|
var INPUT_HEIGHT = 44;
|
|
2653
2644
|
var MAX_DROPDOWN_HEIGHT = 200;
|
|
2654
|
-
var styles33 =
|
|
2645
|
+
var styles33 = StyleSheet34.create({
|
|
2655
2646
|
container: {
|
|
2656
2647
|
gap: spacing.xxs
|
|
2657
2648
|
},
|
|
@@ -2748,7 +2739,7 @@ function Combobox({
|
|
|
2748
2739
|
};
|
|
2749
2740
|
const borderColor = error ? colors2.colorError : colors2.colorOnBg;
|
|
2750
2741
|
return /* @__PURE__ */ jsxs23(View30, { style: [styles33.container, style], children: [
|
|
2751
|
-
/* @__PURE__ */
|
|
2742
|
+
/* @__PURE__ */ jsx38(Label, { label }),
|
|
2752
2743
|
/* @__PURE__ */ jsxs23(
|
|
2753
2744
|
View30,
|
|
2754
2745
|
{
|
|
@@ -2761,8 +2752,8 @@ function Combobox({
|
|
|
2761
2752
|
disabled && { opacity: 0.4 }
|
|
2762
2753
|
],
|
|
2763
2754
|
children: [
|
|
2764
|
-
/* @__PURE__ */
|
|
2765
|
-
|
|
2755
|
+
/* @__PURE__ */ jsx38(
|
|
2756
|
+
ScaledTextInput,
|
|
2766
2757
|
{
|
|
2767
2758
|
value: inputValue,
|
|
2768
2759
|
onChangeText: handleChangeText,
|
|
@@ -2780,7 +2771,7 @@ function Combobox({
|
|
|
2780
2771
|
]
|
|
2781
2772
|
}
|
|
2782
2773
|
),
|
|
2783
|
-
isOpen && filtered.length > 0 && /* @__PURE__ */
|
|
2774
|
+
isOpen && filtered.length > 0 && /* @__PURE__ */ jsx38(
|
|
2784
2775
|
ScrollView4,
|
|
2785
2776
|
{
|
|
2786
2777
|
style: [
|
|
@@ -2795,7 +2786,7 @@ function Combobox({
|
|
|
2795
2786
|
children: filtered.map((option) => {
|
|
2796
2787
|
const isSelected = option.value === value;
|
|
2797
2788
|
const isDisabled = option.disabled;
|
|
2798
|
-
return /* @__PURE__ */
|
|
2789
|
+
return /* @__PURE__ */ jsx38(
|
|
2799
2790
|
Pressable18,
|
|
2800
2791
|
{
|
|
2801
2792
|
onPress: () => !isDisabled && selectOption(option),
|
|
@@ -2809,8 +2800,8 @@ function Combobox({
|
|
|
2809
2800
|
pressed && !isDisabled && { backgroundColor: colors2.colorBgSubtle },
|
|
2810
2801
|
isDisabled && { opacity: 0.4 }
|
|
2811
2802
|
],
|
|
2812
|
-
children: /* @__PURE__ */
|
|
2813
|
-
|
|
2803
|
+
children: /* @__PURE__ */ jsx38(
|
|
2804
|
+
ScaledText,
|
|
2814
2805
|
{
|
|
2815
2806
|
style: [
|
|
2816
2807
|
styles33.optionText,
|
|
@@ -2831,20 +2822,21 @@ function Combobox({
|
|
|
2831
2822
|
]
|
|
2832
2823
|
}
|
|
2833
2824
|
),
|
|
2834
|
-
/* @__PURE__ */
|
|
2835
|
-
/* @__PURE__ */
|
|
2825
|
+
/* @__PURE__ */ jsx38(Message, { type: "error", message: error }),
|
|
2826
|
+
/* @__PURE__ */ jsx38(Message, { type: "hint", message: hint })
|
|
2836
2827
|
] });
|
|
2837
2828
|
}
|
|
2838
2829
|
|
|
2839
2830
|
// src/components/interaction/form/SegmentedControl/SegmentedControl.tsx
|
|
2840
2831
|
import { Children } from "react";
|
|
2841
|
-
import { StyleSheet as
|
|
2842
|
-
import { jsx as
|
|
2832
|
+
import { StyleSheet as StyleSheet35, View as View31, Pressable as Pressable19 } from "react-native";
|
|
2833
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
2843
2834
|
var TRACK_PADDING = spacing.xxxs;
|
|
2844
2835
|
var sizeTokens2 = {
|
|
2845
2836
|
small: { minHeight: 32, fontSize: font.size.bodyS, px: spacing.s, py: spacing.xxs },
|
|
2846
2837
|
medium: { minHeight: 44, fontSize: font.size.body, px: spacing.m, py: spacing.xs },
|
|
2847
|
-
large: { minHeight: 48, fontSize: font.size.body, px: spacing.m, py: spacing.s }
|
|
2838
|
+
large: { minHeight: 48, fontSize: font.size.body, px: spacing.m, py: spacing.s },
|
|
2839
|
+
xlarge: { minHeight: 56, fontSize: font.size.body, px: spacing.m, py: spacing.s }
|
|
2848
2840
|
};
|
|
2849
2841
|
var thumbShadow = {
|
|
2850
2842
|
shadowColor: "#000",
|
|
@@ -2853,7 +2845,7 @@ var thumbShadow = {
|
|
|
2853
2845
|
shadowRadius: 2,
|
|
2854
2846
|
elevation: 2
|
|
2855
2847
|
};
|
|
2856
|
-
var styles34 =
|
|
2848
|
+
var styles34 = StyleSheet35.create({
|
|
2857
2849
|
track: {
|
|
2858
2850
|
flexDirection: "row",
|
|
2859
2851
|
borderRadius: border.radius.full,
|
|
@@ -2888,7 +2880,7 @@ function SegmentedControl({
|
|
|
2888
2880
|
const items = Children.toArray(children);
|
|
2889
2881
|
const trackBg = colors2.colorBgSubtle;
|
|
2890
2882
|
const thumbBg = variant === "outline" ? colors2.colorBg : colors2.colorInteractive;
|
|
2891
|
-
return /* @__PURE__ */
|
|
2883
|
+
return /* @__PURE__ */ jsx39(
|
|
2892
2884
|
View31,
|
|
2893
2885
|
{
|
|
2894
2886
|
style: [styles34.track, { backgroundColor: trackBg }, style],
|
|
@@ -2904,7 +2896,7 @@ function SegmentedControl({
|
|
|
2904
2896
|
paddingVertical: py,
|
|
2905
2897
|
...isActive ? { backgroundColor: thumbBg, ...thumbShadow } : { backgroundColor: "transparent" }
|
|
2906
2898
|
};
|
|
2907
|
-
return /* @__PURE__ */
|
|
2899
|
+
return /* @__PURE__ */ jsx39(
|
|
2908
2900
|
Pressable19,
|
|
2909
2901
|
{
|
|
2910
2902
|
onPress: () => !disabled && onValueChange?.(index),
|
|
@@ -2918,7 +2910,16 @@ function SegmentedControl({
|
|
|
2918
2910
|
pressed && !disabled && { opacity: 0.7 },
|
|
2919
2911
|
disabled && { opacity: 0.4 }
|
|
2920
2912
|
],
|
|
2921
|
-
children: label !== null ? /* @__PURE__ */
|
|
2913
|
+
children: label !== null ? /* @__PURE__ */ jsx39(
|
|
2914
|
+
ScaledText,
|
|
2915
|
+
{
|
|
2916
|
+
style: [styles34.label, { fontSize, color: labelColor }],
|
|
2917
|
+
numberOfLines: 1,
|
|
2918
|
+
adjustsFontSizeToFit: true,
|
|
2919
|
+
minimumFontScale: 0.5,
|
|
2920
|
+
children: label
|
|
2921
|
+
}
|
|
2922
|
+
) : child
|
|
2922
2923
|
},
|
|
2923
2924
|
index
|
|
2924
2925
|
);
|
|
@@ -2929,12 +2930,8 @@ function SegmentedControl({
|
|
|
2929
2930
|
|
|
2930
2931
|
// src/components/interaction/form/FormInput/FormInput.tsx
|
|
2931
2932
|
import { useState as useState8 } from "react";
|
|
2932
|
-
import {
|
|
2933
|
-
|
|
2934
|
-
View as View32,
|
|
2935
|
-
TextInput as TextInput2
|
|
2936
|
-
} from "react-native";
|
|
2937
|
-
import { jsx as jsx39, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2933
|
+
import { StyleSheet as StyleSheet36, View as View32 } from "react-native";
|
|
2934
|
+
import { jsx as jsx40, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2938
2935
|
var INPUT_HEIGHT2 = 44;
|
|
2939
2936
|
var keyboardTypeMap = {
|
|
2940
2937
|
text: "default",
|
|
@@ -2945,16 +2942,16 @@ var keyboardTypeMap = {
|
|
|
2945
2942
|
number: "numeric",
|
|
2946
2943
|
search: "default"
|
|
2947
2944
|
};
|
|
2948
|
-
var styles35 =
|
|
2945
|
+
var styles35 = StyleSheet36.create({
|
|
2949
2946
|
container: {
|
|
2950
2947
|
gap: spacing.xxs
|
|
2951
2948
|
},
|
|
2952
2949
|
/**
|
|
2953
|
-
* The wrapper draws the pill border and provides
|
|
2950
|
+
* The wrapper draws the pill border and provides at least 44pt touch-target height.
|
|
2954
2951
|
* justifyContent: 'center' vertically centers the inner TextInput on both iOS and Android.
|
|
2955
2952
|
*/
|
|
2956
2953
|
inputWrapper: {
|
|
2957
|
-
|
|
2954
|
+
minHeight: INPUT_HEIGHT2,
|
|
2958
2955
|
justifyContent: "center",
|
|
2959
2956
|
borderWidth: 1,
|
|
2960
2957
|
borderRadius: border.radius.full
|
|
@@ -2994,8 +2991,8 @@ function FormInput({
|
|
|
2994
2991
|
const [focused, setFocused] = useState8(false);
|
|
2995
2992
|
const borderColor = error ? colors2.colorError : focused ? colors2.colorInteractive : colors2.colorOnBg;
|
|
2996
2993
|
return /* @__PURE__ */ jsxs24(View32, { style: [styles35.container, style], children: [
|
|
2997
|
-
/* @__PURE__ */
|
|
2998
|
-
/* @__PURE__ */
|
|
2994
|
+
/* @__PURE__ */ jsx40(Label, { label }),
|
|
2995
|
+
/* @__PURE__ */ jsx40(
|
|
2999
2996
|
View32,
|
|
3000
2997
|
{
|
|
3001
2998
|
style: [
|
|
@@ -3006,8 +3003,8 @@ function FormInput({
|
|
|
3006
3003
|
},
|
|
3007
3004
|
disabled && { opacity: 0.4 }
|
|
3008
3005
|
],
|
|
3009
|
-
children: /* @__PURE__ */
|
|
3010
|
-
|
|
3006
|
+
children: /* @__PURE__ */ jsx40(
|
|
3007
|
+
ScaledTextInput,
|
|
3011
3008
|
{
|
|
3012
3009
|
accessibilityLabel: typeof label === "string" ? label : name,
|
|
3013
3010
|
accessibilityState: { disabled },
|
|
@@ -3038,20 +3035,16 @@ function FormInput({
|
|
|
3038
3035
|
)
|
|
3039
3036
|
}
|
|
3040
3037
|
),
|
|
3041
|
-
/* @__PURE__ */
|
|
3042
|
-
/* @__PURE__ */
|
|
3038
|
+
/* @__PURE__ */ jsx40(Message, { type: "error", message: error }),
|
|
3039
|
+
/* @__PURE__ */ jsx40(Message, { type: "hint", message: hint })
|
|
3043
3040
|
] });
|
|
3044
3041
|
}
|
|
3045
3042
|
|
|
3046
3043
|
// src/components/interaction/form/Textarea/Textarea.tsx
|
|
3047
3044
|
import { useState as useState9 } from "react";
|
|
3048
|
-
import {
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
TextInput as TextInput3
|
|
3052
|
-
} from "react-native";
|
|
3053
|
-
import { jsx as jsx40, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3054
|
-
var styles36 = StyleSheet36.create({
|
|
3045
|
+
import { StyleSheet as StyleSheet37, View as View33 } from "react-native";
|
|
3046
|
+
import { jsx as jsx41, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3047
|
+
var styles36 = StyleSheet37.create({
|
|
3055
3048
|
container: {
|
|
3056
3049
|
gap: spacing.xxs
|
|
3057
3050
|
},
|
|
@@ -3086,9 +3079,9 @@ function Textarea({
|
|
|
3086
3079
|
const [focused, setFocused] = useState9(false);
|
|
3087
3080
|
const borderColor = error ? colors2.colorError : focused ? colors2.colorInteractive : colors2.colorOnBg;
|
|
3088
3081
|
return /* @__PURE__ */ jsxs25(View33, { style: [styles36.container, style], children: [
|
|
3089
|
-
/* @__PURE__ */
|
|
3090
|
-
/* @__PURE__ */
|
|
3091
|
-
|
|
3082
|
+
/* @__PURE__ */ jsx41(Label, { label }),
|
|
3083
|
+
/* @__PURE__ */ jsx41(
|
|
3084
|
+
ScaledTextInput,
|
|
3092
3085
|
{
|
|
3093
3086
|
accessibilityLabel: typeof label === "string" ? label : name,
|
|
3094
3087
|
accessibilityState: { disabled },
|
|
@@ -3120,24 +3113,16 @@ function Textarea({
|
|
|
3120
3113
|
]
|
|
3121
3114
|
}
|
|
3122
3115
|
),
|
|
3123
|
-
/* @__PURE__ */
|
|
3124
|
-
/* @__PURE__ */
|
|
3116
|
+
/* @__PURE__ */ jsx41(Message, { type: "error", message: error }),
|
|
3117
|
+
/* @__PURE__ */ jsx41(Message, { type: "hint", message: hint })
|
|
3125
3118
|
] });
|
|
3126
3119
|
}
|
|
3127
3120
|
|
|
3128
3121
|
// src/components/interaction/form/Select/Select.tsx
|
|
3129
3122
|
import { useState as useState10 } from "react";
|
|
3130
|
-
import {
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
Text as Text29,
|
|
3134
|
-
Pressable as Pressable20,
|
|
3135
|
-
Modal,
|
|
3136
|
-
FlatList,
|
|
3137
|
-
SafeAreaView
|
|
3138
|
-
} from "react-native";
|
|
3139
|
-
import { jsx as jsx41, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3140
|
-
var styles37 = StyleSheet37.create({
|
|
3123
|
+
import { StyleSheet as StyleSheet38, View as View34, Pressable as Pressable20, Modal, FlatList, SafeAreaView } from "react-native";
|
|
3124
|
+
import { jsx as jsx42, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3125
|
+
var styles37 = StyleSheet38.create({
|
|
3141
3126
|
container: {
|
|
3142
3127
|
gap: spacing.xxs
|
|
3143
3128
|
},
|
|
@@ -3226,7 +3211,7 @@ function Select({
|
|
|
3226
3211
|
setOpen(false);
|
|
3227
3212
|
};
|
|
3228
3213
|
return /* @__PURE__ */ jsxs26(View34, { style: [styles37.container, style], children: [
|
|
3229
|
-
/* @__PURE__ */
|
|
3214
|
+
/* @__PURE__ */ jsx42(Label, { label }),
|
|
3230
3215
|
/* @__PURE__ */ jsxs26(
|
|
3231
3216
|
Pressable20,
|
|
3232
3217
|
{
|
|
@@ -3245,8 +3230,8 @@ function Select({
|
|
|
3245
3230
|
disabled && { opacity: 0.4 }
|
|
3246
3231
|
],
|
|
3247
3232
|
children: [
|
|
3248
|
-
/* @__PURE__ */
|
|
3249
|
-
|
|
3233
|
+
/* @__PURE__ */ jsx42(
|
|
3234
|
+
ScaledText,
|
|
3250
3235
|
{
|
|
3251
3236
|
style: [
|
|
3252
3237
|
styles37.triggerText,
|
|
@@ -3257,25 +3242,25 @@ function Select({
|
|
|
3257
3242
|
children: displayText
|
|
3258
3243
|
}
|
|
3259
3244
|
),
|
|
3260
|
-
/* @__PURE__ */
|
|
3245
|
+
/* @__PURE__ */ jsx42(ScaledText, { style: [styles37.chevron, { color: colors2.colorOnBgSubtle }], "aria-hidden": true, children: "\u25BE" })
|
|
3261
3246
|
]
|
|
3262
3247
|
}
|
|
3263
3248
|
),
|
|
3264
|
-
/* @__PURE__ */
|
|
3249
|
+
/* @__PURE__ */ jsx42(
|
|
3265
3250
|
Modal,
|
|
3266
3251
|
{
|
|
3267
3252
|
visible: open,
|
|
3268
3253
|
transparent: true,
|
|
3269
3254
|
animationType: "slide",
|
|
3270
3255
|
onRequestClose: () => setOpen(false),
|
|
3271
|
-
children: /* @__PURE__ */
|
|
3256
|
+
children: /* @__PURE__ */ jsx42(
|
|
3272
3257
|
Pressable20,
|
|
3273
3258
|
{
|
|
3274
3259
|
style: styles37.overlay,
|
|
3275
3260
|
onPress: () => setOpen(false),
|
|
3276
3261
|
accessibilityRole: "button",
|
|
3277
3262
|
accessibilityLabel: "Close options",
|
|
3278
|
-
children: /* @__PURE__ */
|
|
3263
|
+
children: /* @__PURE__ */ jsx42(
|
|
3279
3264
|
Pressable20,
|
|
3280
3265
|
{
|
|
3281
3266
|
style: [styles37.sheet, { backgroundColor: colors2.colorBg }],
|
|
@@ -3283,26 +3268,26 @@ function Select({
|
|
|
3283
3268
|
},
|
|
3284
3269
|
children: /* @__PURE__ */ jsxs26(SafeAreaView, { children: [
|
|
3285
3270
|
/* @__PURE__ */ jsxs26(View34, { style: styles37.sheetHeader, children: [
|
|
3286
|
-
/* @__PURE__ */
|
|
3287
|
-
/* @__PURE__ */
|
|
3271
|
+
/* @__PURE__ */ jsx42(ScaledText, { style: [styles37.sheetTitle, { color: colors2.colorOnBg }], children: typeof label === "string" ? label : "Select" }),
|
|
3272
|
+
/* @__PURE__ */ jsx42(
|
|
3288
3273
|
Pressable20,
|
|
3289
3274
|
{
|
|
3290
3275
|
accessibilityRole: "button",
|
|
3291
3276
|
accessibilityLabel: "Close",
|
|
3292
3277
|
onPress: () => setOpen(false),
|
|
3293
3278
|
hitSlop: 8,
|
|
3294
|
-
children: /* @__PURE__ */
|
|
3279
|
+
children: /* @__PURE__ */ jsx42(ScaledText, { style: [styles37.closeText, { color: colors2.colorInteractive }], children: "Done" })
|
|
3295
3280
|
}
|
|
3296
3281
|
)
|
|
3297
3282
|
] }),
|
|
3298
|
-
/* @__PURE__ */
|
|
3283
|
+
/* @__PURE__ */ jsx42(
|
|
3299
3284
|
FlatList,
|
|
3300
3285
|
{
|
|
3301
3286
|
data: options,
|
|
3302
3287
|
keyExtractor: (item) => item.value,
|
|
3303
3288
|
renderItem: ({ item }) => {
|
|
3304
3289
|
const isSelected = item.value === value;
|
|
3305
|
-
return /* @__PURE__ */
|
|
3290
|
+
return /* @__PURE__ */ jsx42(
|
|
3306
3291
|
Pressable20,
|
|
3307
3292
|
{
|
|
3308
3293
|
accessibilityRole: "button",
|
|
@@ -3319,8 +3304,8 @@ function Select({
|
|
|
3319
3304
|
pressed && { opacity: 0.7 },
|
|
3320
3305
|
item.disabled && { opacity: 0.4 }
|
|
3321
3306
|
],
|
|
3322
|
-
children: /* @__PURE__ */
|
|
3323
|
-
|
|
3307
|
+
children: /* @__PURE__ */ jsx42(
|
|
3308
|
+
ScaledText,
|
|
3324
3309
|
{
|
|
3325
3310
|
style: [
|
|
3326
3311
|
styles37.optionText,
|
|
@@ -3344,22 +3329,18 @@ function Select({
|
|
|
3344
3329
|
)
|
|
3345
3330
|
}
|
|
3346
3331
|
),
|
|
3347
|
-
/* @__PURE__ */
|
|
3348
|
-
/* @__PURE__ */
|
|
3332
|
+
/* @__PURE__ */ jsx42(Message, { type: "error", message: error }),
|
|
3333
|
+
/* @__PURE__ */ jsx42(Message, { type: "hint", message: hint })
|
|
3349
3334
|
] });
|
|
3350
3335
|
}
|
|
3351
3336
|
|
|
3352
3337
|
// src/components/interaction/form/Slider/Slider.tsx
|
|
3353
3338
|
import { useState as useState11 } from "react";
|
|
3354
|
-
import {
|
|
3355
|
-
|
|
3356
|
-
View as View35,
|
|
3357
|
-
Text as Text30
|
|
3358
|
-
} from "react-native";
|
|
3359
|
-
import { jsx as jsx42, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3339
|
+
import { StyleSheet as StyleSheet39, View as View35 } from "react-native";
|
|
3340
|
+
import { jsx as jsx43, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3360
3341
|
var TRACK_HEIGHT = 6;
|
|
3361
3342
|
var THUMB_SIZE = 24;
|
|
3362
|
-
var styles38 =
|
|
3343
|
+
var styles38 = StyleSheet39.create({
|
|
3363
3344
|
container: {
|
|
3364
3345
|
gap: spacing.xxs
|
|
3365
3346
|
},
|
|
@@ -3463,8 +3444,8 @@ function Slider({
|
|
|
3463
3444
|
accessibilityState: { disabled },
|
|
3464
3445
|
children: [
|
|
3465
3446
|
/* @__PURE__ */ jsxs27(View35, { style: styles38.labelRow, children: [
|
|
3466
|
-
/* @__PURE__ */
|
|
3467
|
-
showValue && /* @__PURE__ */
|
|
3447
|
+
/* @__PURE__ */ jsx43(Label, { label }),
|
|
3448
|
+
showValue && /* @__PURE__ */ jsx43(ScaledText, { style: [styles38.valueText, { color: colors2.colorOnBg }], children: currentValue })
|
|
3468
3449
|
] }),
|
|
3469
3450
|
/* @__PURE__ */ jsxs27(
|
|
3470
3451
|
View35,
|
|
@@ -3476,7 +3457,7 @@ function Slider({
|
|
|
3476
3457
|
onResponderGrant: handleResponderGrant,
|
|
3477
3458
|
onResponderMove: handleResponderMove,
|
|
3478
3459
|
children: [
|
|
3479
|
-
/* @__PURE__ */
|
|
3460
|
+
/* @__PURE__ */ jsx43(View35, { style: [styles38.track, { backgroundColor: colors2.colorBgSubtle }], children: /* @__PURE__ */ jsx43(
|
|
3480
3461
|
View35,
|
|
3481
3462
|
{
|
|
3482
3463
|
style: [
|
|
@@ -3488,7 +3469,7 @@ function Slider({
|
|
|
3488
3469
|
]
|
|
3489
3470
|
}
|
|
3490
3471
|
) }),
|
|
3491
|
-
/* @__PURE__ */
|
|
3472
|
+
/* @__PURE__ */ jsx43(
|
|
3492
3473
|
View35,
|
|
3493
3474
|
{
|
|
3494
3475
|
style: [
|
|
@@ -3505,8 +3486,8 @@ function Slider({
|
|
|
3505
3486
|
]
|
|
3506
3487
|
}
|
|
3507
3488
|
),
|
|
3508
|
-
/* @__PURE__ */
|
|
3509
|
-
/* @__PURE__ */
|
|
3489
|
+
/* @__PURE__ */ jsx43(Message, { type: "error", message: error }),
|
|
3490
|
+
/* @__PURE__ */ jsx43(Message, { type: "hint", message: hint })
|
|
3510
3491
|
]
|
|
3511
3492
|
}
|
|
3512
3493
|
);
|
|
@@ -3514,16 +3495,10 @@ function Slider({
|
|
|
3514
3495
|
|
|
3515
3496
|
// src/components/interaction/form/NumberInput/NumberInput.tsx
|
|
3516
3497
|
import { useState as useState12 } from "react";
|
|
3517
|
-
import {
|
|
3518
|
-
|
|
3519
|
-
View as View36,
|
|
3520
|
-
TextInput as TextInput4,
|
|
3521
|
-
Text as Text31,
|
|
3522
|
-
Pressable as Pressable21
|
|
3523
|
-
} from "react-native";
|
|
3524
|
-
import { jsx as jsx43, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3498
|
+
import { StyleSheet as StyleSheet40, View as View36, Pressable as Pressable21 } from "react-native";
|
|
3499
|
+
import { jsx as jsx44, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3525
3500
|
var STEPPER_SIZE = 44;
|
|
3526
|
-
var styles39 =
|
|
3501
|
+
var styles39 = StyleSheet40.create({
|
|
3527
3502
|
container: {
|
|
3528
3503
|
gap: spacing.xxs
|
|
3529
3504
|
},
|
|
@@ -3613,9 +3588,9 @@ function NumberInput({
|
|
|
3613
3588
|
const canIncrease = max === void 0 || currentValue < max;
|
|
3614
3589
|
const borderColor = error ? colors2.colorError : colors2.colorOnBg;
|
|
3615
3590
|
return /* @__PURE__ */ jsxs28(View36, { style: [styles39.container, style], children: [
|
|
3616
|
-
/* @__PURE__ */
|
|
3591
|
+
/* @__PURE__ */ jsx44(Label, { label }),
|
|
3617
3592
|
/* @__PURE__ */ jsxs28(View36, { style: [styles39.inputRow, disabled && { opacity: 0.4 }], children: [
|
|
3618
|
-
/* @__PURE__ */
|
|
3593
|
+
/* @__PURE__ */ jsx44(
|
|
3619
3594
|
Pressable21,
|
|
3620
3595
|
{
|
|
3621
3596
|
accessibilityRole: "button",
|
|
@@ -3633,8 +3608,8 @@ function NumberInput({
|
|
|
3633
3608
|
pressed && { opacity: 0.7 },
|
|
3634
3609
|
(disabled || !canDecrease) && { opacity: 0.4 }
|
|
3635
3610
|
],
|
|
3636
|
-
children: /* @__PURE__ */
|
|
3637
|
-
|
|
3611
|
+
children: /* @__PURE__ */ jsx44(
|
|
3612
|
+
ScaledText,
|
|
3638
3613
|
{
|
|
3639
3614
|
style: [styles39.stepperText, { color: colors2.colorOnBg }],
|
|
3640
3615
|
"aria-hidden": true,
|
|
@@ -3643,7 +3618,7 @@ function NumberInput({
|
|
|
3643
3618
|
)
|
|
3644
3619
|
}
|
|
3645
3620
|
),
|
|
3646
|
-
/* @__PURE__ */
|
|
3621
|
+
/* @__PURE__ */ jsx44(
|
|
3647
3622
|
View36,
|
|
3648
3623
|
{
|
|
3649
3624
|
style: [
|
|
@@ -3653,8 +3628,8 @@ function NumberInput({
|
|
|
3653
3628
|
backgroundColor: colors2.colorBg
|
|
3654
3629
|
}
|
|
3655
3630
|
],
|
|
3656
|
-
children: /* @__PURE__ */
|
|
3657
|
-
|
|
3631
|
+
children: /* @__PURE__ */ jsx44(
|
|
3632
|
+
ScaledTextInput,
|
|
3658
3633
|
{
|
|
3659
3634
|
accessibilityLabel: label,
|
|
3660
3635
|
accessibilityState: { disabled },
|
|
@@ -3680,7 +3655,7 @@ function NumberInput({
|
|
|
3680
3655
|
)
|
|
3681
3656
|
}
|
|
3682
3657
|
),
|
|
3683
|
-
/* @__PURE__ */
|
|
3658
|
+
/* @__PURE__ */ jsx44(
|
|
3684
3659
|
Pressable21,
|
|
3685
3660
|
{
|
|
3686
3661
|
accessibilityRole: "button",
|
|
@@ -3698,8 +3673,8 @@ function NumberInput({
|
|
|
3698
3673
|
pressed && { opacity: 0.7 },
|
|
3699
3674
|
(disabled || !canIncrease) && { opacity: 0.4 }
|
|
3700
3675
|
],
|
|
3701
|
-
children: /* @__PURE__ */
|
|
3702
|
-
|
|
3676
|
+
children: /* @__PURE__ */ jsx44(
|
|
3677
|
+
ScaledText,
|
|
3703
3678
|
{
|
|
3704
3679
|
style: [styles39.stepperText, { color: colors2.colorOnBg }],
|
|
3705
3680
|
"aria-hidden": true,
|
|
@@ -3709,21 +3684,15 @@ function NumberInput({
|
|
|
3709
3684
|
}
|
|
3710
3685
|
)
|
|
3711
3686
|
] }),
|
|
3712
|
-
/* @__PURE__ */
|
|
3713
|
-
/* @__PURE__ */
|
|
3687
|
+
/* @__PURE__ */ jsx44(Message, { type: "error", message: error }),
|
|
3688
|
+
/* @__PURE__ */ jsx44(Message, { type: "hint", message: hint })
|
|
3714
3689
|
] });
|
|
3715
3690
|
}
|
|
3716
3691
|
|
|
3717
3692
|
// src/components/interaction/Dialog/Dialog.tsx
|
|
3718
|
-
import {
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
Pressable as Pressable22,
|
|
3722
|
-
Text as Text32,
|
|
3723
|
-
StyleSheet as StyleSheet40
|
|
3724
|
-
} from "react-native";
|
|
3725
|
-
import { jsx as jsx44, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3726
|
-
var styles40 = StyleSheet40.create({
|
|
3693
|
+
import { Modal as Modal2, View as View37, Pressable as Pressable22, StyleSheet as StyleSheet41 } from "react-native";
|
|
3694
|
+
import { jsx as jsx45, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3695
|
+
var styles40 = StyleSheet41.create({
|
|
3727
3696
|
overlay: {
|
|
3728
3697
|
flex: 1,
|
|
3729
3698
|
justifyContent: "center",
|
|
@@ -3779,7 +3748,7 @@ function Dialog({
|
|
|
3779
3748
|
style
|
|
3780
3749
|
}) {
|
|
3781
3750
|
const { colors: colors2 } = useTheme();
|
|
3782
|
-
return /* @__PURE__ */
|
|
3751
|
+
return /* @__PURE__ */ jsx45(
|
|
3783
3752
|
Modal2,
|
|
3784
3753
|
{
|
|
3785
3754
|
visible: isOpen,
|
|
@@ -3787,11 +3756,11 @@ function Dialog({
|
|
|
3787
3756
|
animationType: "fade",
|
|
3788
3757
|
onRequestClose: onClose,
|
|
3789
3758
|
children: /* @__PURE__ */ jsxs29(View37, { style: styles40.overlay, children: [
|
|
3790
|
-
/* @__PURE__ */
|
|
3759
|
+
/* @__PURE__ */ jsx45(
|
|
3791
3760
|
Pressable22,
|
|
3792
3761
|
{
|
|
3793
3762
|
testID: "bds-dialog-backdrop",
|
|
3794
|
-
style:
|
|
3763
|
+
style: StyleSheet41.absoluteFill,
|
|
3795
3764
|
onPress: onClose,
|
|
3796
3765
|
accessible: false,
|
|
3797
3766
|
importantForAccessibility: "no"
|
|
@@ -3804,7 +3773,7 @@ function Dialog({
|
|
|
3804
3773
|
accessibilityViewIsModal: true,
|
|
3805
3774
|
onAccessibilityEscape: onClose,
|
|
3806
3775
|
children: [
|
|
3807
|
-
/* @__PURE__ */
|
|
3776
|
+
/* @__PURE__ */ jsx45(
|
|
3808
3777
|
Pressable22,
|
|
3809
3778
|
{
|
|
3810
3779
|
style: styles40.closeButton,
|
|
@@ -3812,8 +3781,8 @@ function Dialog({
|
|
|
3812
3781
|
accessibilityRole: "button",
|
|
3813
3782
|
accessibilityLabel: "Close dialog",
|
|
3814
3783
|
hitSlop: 8,
|
|
3815
|
-
children: /* @__PURE__ */
|
|
3816
|
-
|
|
3784
|
+
children: /* @__PURE__ */ jsx45(
|
|
3785
|
+
ScaledText,
|
|
3817
3786
|
{
|
|
3818
3787
|
style: [styles40.closeText, { color: colors2.colorOnBgSubtle }],
|
|
3819
3788
|
"aria-hidden": true,
|
|
@@ -3822,7 +3791,7 @@ function Dialog({
|
|
|
3822
3791
|
)
|
|
3823
3792
|
}
|
|
3824
3793
|
),
|
|
3825
|
-
!!title && /* @__PURE__ */
|
|
3794
|
+
!!title && /* @__PURE__ */ jsx45(View37, { style: styles40.header, children: /* @__PURE__ */ jsx45(ScaledText, { style: [styles40.title, { color: colors2.colorOnGreySubtle }], children: title }) }),
|
|
3826
3795
|
children
|
|
3827
3796
|
]
|
|
3828
3797
|
}
|
|
@@ -3834,17 +3803,9 @@ function Dialog({
|
|
|
3834
3803
|
|
|
3835
3804
|
// src/components/interaction/SideSheet/SideSheet.tsx
|
|
3836
3805
|
import { useEffect as useEffect2, useRef as useRef4 } from "react";
|
|
3837
|
-
import {
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
Pressable as Pressable23,
|
|
3841
|
-
Text as Text33,
|
|
3842
|
-
Animated as Animated3,
|
|
3843
|
-
StyleSheet as StyleSheet41,
|
|
3844
|
-
Dimensions as Dimensions2
|
|
3845
|
-
} from "react-native";
|
|
3846
|
-
import { jsx as jsx45, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3847
|
-
var styles41 = StyleSheet41.create({
|
|
3806
|
+
import { Modal as Modal3, View as View38, Pressable as Pressable23, Animated as Animated3, StyleSheet as StyleSheet42, Dimensions as Dimensions2 } from "react-native";
|
|
3807
|
+
import { jsx as jsx46, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3808
|
+
var styles41 = StyleSheet42.create({
|
|
3848
3809
|
overlay: {
|
|
3849
3810
|
flex: 1,
|
|
3850
3811
|
justifyContent: "flex-end"
|
|
@@ -3933,7 +3894,7 @@ function SideSheet({
|
|
|
3933
3894
|
]).start();
|
|
3934
3895
|
}
|
|
3935
3896
|
}, [isOpen, slideAnim, backdropAnim, screenHeight]);
|
|
3936
|
-
return /* @__PURE__ */
|
|
3897
|
+
return /* @__PURE__ */ jsx46(
|
|
3937
3898
|
Modal3,
|
|
3938
3899
|
{
|
|
3939
3900
|
visible: isOpen,
|
|
@@ -3941,17 +3902,17 @@ function SideSheet({
|
|
|
3941
3902
|
animationType: "none",
|
|
3942
3903
|
onRequestClose: onClose,
|
|
3943
3904
|
children: /* @__PURE__ */ jsxs30(View38, { style: styles41.overlay, children: [
|
|
3944
|
-
/* @__PURE__ */
|
|
3905
|
+
/* @__PURE__ */ jsx46(
|
|
3945
3906
|
Animated3.View,
|
|
3946
3907
|
{
|
|
3947
3908
|
style: [
|
|
3948
|
-
|
|
3909
|
+
StyleSheet42.absoluteFill,
|
|
3949
3910
|
{ backgroundColor: "rgba(0, 0, 0, 0.5)", opacity: backdropAnim }
|
|
3950
3911
|
],
|
|
3951
|
-
children: /* @__PURE__ */
|
|
3912
|
+
children: /* @__PURE__ */ jsx46(
|
|
3952
3913
|
Pressable23,
|
|
3953
3914
|
{
|
|
3954
|
-
style:
|
|
3915
|
+
style: StyleSheet42.absoluteFill,
|
|
3955
3916
|
onPress: onClose,
|
|
3956
3917
|
testID: "bds-sidesheet-backdrop",
|
|
3957
3918
|
accessible: false,
|
|
@@ -3979,8 +3940,8 @@ function SideSheet({
|
|
|
3979
3940
|
{
|
|
3980
3941
|
style: [styles41.header, { borderBottomColor: colors2.colorBgSubtle }],
|
|
3981
3942
|
children: [
|
|
3982
|
-
!!title && /* @__PURE__ */
|
|
3983
|
-
/* @__PURE__ */
|
|
3943
|
+
!!title && /* @__PURE__ */ jsx46(ScaledText, { style: [styles41.title, { color: colors2.colorOnBg }], children: title }),
|
|
3944
|
+
/* @__PURE__ */ jsx46(
|
|
3984
3945
|
Pressable23,
|
|
3985
3946
|
{
|
|
3986
3947
|
style: styles41.closeButton,
|
|
@@ -3988,8 +3949,8 @@ function SideSheet({
|
|
|
3988
3949
|
accessibilityRole: "button",
|
|
3989
3950
|
accessibilityLabel: "Close side sheet",
|
|
3990
3951
|
hitSlop: 8,
|
|
3991
|
-
children: /* @__PURE__ */
|
|
3992
|
-
|
|
3952
|
+
children: /* @__PURE__ */ jsx46(
|
|
3953
|
+
ScaledText,
|
|
3993
3954
|
{
|
|
3994
3955
|
style: [styles41.closeText, { color: colors2.colorOnBgSubtle }],
|
|
3995
3956
|
"aria-hidden": true,
|
|
@@ -4001,7 +3962,7 @@ function SideSheet({
|
|
|
4001
3962
|
]
|
|
4002
3963
|
}
|
|
4003
3964
|
),
|
|
4004
|
-
/* @__PURE__ */
|
|
3965
|
+
/* @__PURE__ */ jsx46(View38, { style: styles41.body, testID: "bds-sidesheet-body", children })
|
|
4005
3966
|
]
|
|
4006
3967
|
}
|
|
4007
3968
|
)
|
|
@@ -4020,16 +3981,10 @@ import {
|
|
|
4020
3981
|
createContext as createContext2,
|
|
4021
3982
|
useContext as useContext2
|
|
4022
3983
|
} from "react";
|
|
4023
|
-
import {
|
|
4024
|
-
|
|
4025
|
-
Text as Text34,
|
|
4026
|
-
Pressable as Pressable24,
|
|
4027
|
-
Animated as Animated4,
|
|
4028
|
-
StyleSheet as StyleSheet42
|
|
4029
|
-
} from "react-native";
|
|
4030
|
-
import { jsx as jsx46, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3984
|
+
import { View as View39, Pressable as Pressable24, Animated as Animated4, StyleSheet as StyleSheet43 } from "react-native";
|
|
3985
|
+
import { jsx as jsx47, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
4031
3986
|
var ToastContext = createContext2(void 0);
|
|
4032
|
-
var styles42 =
|
|
3987
|
+
var styles42 = StyleSheet43.create({
|
|
4033
3988
|
container: {
|
|
4034
3989
|
position: "absolute",
|
|
4035
3990
|
top: 0,
|
|
@@ -4117,8 +4072,8 @@ function ToastItem({
|
|
|
4117
4072
|
accessibilityRole: "alert",
|
|
4118
4073
|
accessibilityLiveRegion: "polite",
|
|
4119
4074
|
children: [
|
|
4120
|
-
/* @__PURE__ */
|
|
4121
|
-
/* @__PURE__ */
|
|
4075
|
+
/* @__PURE__ */ jsx47(ScaledText, { style: [styles42.message, { color: text }], children: toast.message }),
|
|
4076
|
+
/* @__PURE__ */ jsx47(
|
|
4122
4077
|
Pressable24,
|
|
4123
4078
|
{
|
|
4124
4079
|
style: styles42.closeButton,
|
|
@@ -4126,7 +4081,7 @@ function ToastItem({
|
|
|
4126
4081
|
accessibilityRole: "button",
|
|
4127
4082
|
accessibilityLabel: "Dismiss",
|
|
4128
4083
|
hitSlop: 8,
|
|
4129
|
-
children: /* @__PURE__ */
|
|
4084
|
+
children: /* @__PURE__ */ jsx47(ScaledText, { style: [styles42.closeText, { color: text }], "aria-hidden": true, children: "\u2715" })
|
|
4130
4085
|
}
|
|
4131
4086
|
)
|
|
4132
4087
|
]
|
|
@@ -4146,15 +4101,15 @@ function ToastProvider({
|
|
|
4146
4101
|
setToasts((prev) => prev.filter((t) => t.id !== id));
|
|
4147
4102
|
}, []);
|
|
4148
4103
|
const value = useMemo3(() => ({ showToast }), [showToast]);
|
|
4149
|
-
return /* @__PURE__ */
|
|
4104
|
+
return /* @__PURE__ */ jsx47(ToastContext.Provider, { value, children: /* @__PURE__ */ jsxs31(View39, { style: [{ flex: 1 }, style], children: [
|
|
4150
4105
|
children,
|
|
4151
|
-
toasts.length > 0 && /* @__PURE__ */
|
|
4106
|
+
toasts.length > 0 && /* @__PURE__ */ jsx47(
|
|
4152
4107
|
View39,
|
|
4153
4108
|
{
|
|
4154
4109
|
style: styles42.container,
|
|
4155
4110
|
accessibilityRole: "summary",
|
|
4156
4111
|
accessibilityLabel: "Notifications",
|
|
4157
|
-
children: toasts.map((toast) => /* @__PURE__ */
|
|
4112
|
+
children: toasts.map((toast) => /* @__PURE__ */ jsx47(
|
|
4158
4113
|
ToastItem,
|
|
4159
4114
|
{
|
|
4160
4115
|
toast,
|
|
@@ -4176,19 +4131,9 @@ function useToast() {
|
|
|
4176
4131
|
|
|
4177
4132
|
// src/components/interaction/DropdownMenu/DropdownMenu.tsx
|
|
4178
4133
|
import React, { useState as useState14, useEffect as useEffect4, useRef as useRef6 } from "react";
|
|
4179
|
-
import {
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
Pressable as Pressable25,
|
|
4183
|
-
Text as Text35,
|
|
4184
|
-
FlatList as FlatList2,
|
|
4185
|
-
Animated as Animated5,
|
|
4186
|
-
StyleSheet as StyleSheet43,
|
|
4187
|
-
Dimensions as Dimensions3,
|
|
4188
|
-
SafeAreaView as SafeAreaView2
|
|
4189
|
-
} from "react-native";
|
|
4190
|
-
import { Fragment as Fragment2, jsx as jsx47, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
4191
|
-
var styles43 = StyleSheet43.create({
|
|
4134
|
+
import { Modal as Modal4, View as View40, Pressable as Pressable25, FlatList as FlatList2, Animated as Animated5, StyleSheet as StyleSheet44, Dimensions as Dimensions3, SafeAreaView as SafeAreaView2 } from "react-native";
|
|
4135
|
+
import { Fragment as Fragment2, jsx as jsx48, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
4136
|
+
var styles43 = StyleSheet44.create({
|
|
4192
4137
|
overlay: {
|
|
4193
4138
|
flex: 1,
|
|
4194
4139
|
justifyContent: "flex-end"
|
|
@@ -4288,7 +4233,7 @@ function DropdownMenu({
|
|
|
4288
4233
|
accessibilityRole: "button",
|
|
4289
4234
|
accessibilityLabel: title
|
|
4290
4235
|
}),
|
|
4291
|
-
/* @__PURE__ */
|
|
4236
|
+
/* @__PURE__ */ jsx48(
|
|
4292
4237
|
Modal4,
|
|
4293
4238
|
{
|
|
4294
4239
|
visible: open,
|
|
@@ -4296,17 +4241,17 @@ function DropdownMenu({
|
|
|
4296
4241
|
animationType: "none",
|
|
4297
4242
|
onRequestClose: () => setOpen(false),
|
|
4298
4243
|
children: /* @__PURE__ */ jsxs32(View40, { style: styles43.overlay, children: [
|
|
4299
|
-
/* @__PURE__ */
|
|
4244
|
+
/* @__PURE__ */ jsx48(
|
|
4300
4245
|
Animated5.View,
|
|
4301
4246
|
{
|
|
4302
4247
|
style: [
|
|
4303
|
-
|
|
4248
|
+
StyleSheet44.absoluteFill,
|
|
4304
4249
|
{ backgroundColor: "rgba(0, 0, 0, 0.5)", opacity: backdropAnim }
|
|
4305
4250
|
],
|
|
4306
|
-
children: /* @__PURE__ */
|
|
4251
|
+
children: /* @__PURE__ */ jsx48(
|
|
4307
4252
|
Pressable25,
|
|
4308
4253
|
{
|
|
4309
|
-
style:
|
|
4254
|
+
style: StyleSheet44.absoluteFill,
|
|
4310
4255
|
onPress: () => setOpen(false),
|
|
4311
4256
|
testID: "bds-dropdownmenu-backdrop",
|
|
4312
4257
|
accessible: false,
|
|
@@ -4315,7 +4260,7 @@ function DropdownMenu({
|
|
|
4315
4260
|
)
|
|
4316
4261
|
}
|
|
4317
4262
|
),
|
|
4318
|
-
/* @__PURE__ */
|
|
4263
|
+
/* @__PURE__ */ jsx48(
|
|
4319
4264
|
Animated5.View,
|
|
4320
4265
|
{
|
|
4321
4266
|
style: [
|
|
@@ -4336,16 +4281,16 @@ function DropdownMenu({
|
|
|
4336
4281
|
{ borderBottomColor: colors2.colorBgSubtle }
|
|
4337
4282
|
],
|
|
4338
4283
|
children: [
|
|
4339
|
-
/* @__PURE__ */
|
|
4340
|
-
/* @__PURE__ */
|
|
4284
|
+
/* @__PURE__ */ jsx48(ScaledText, { style: [styles43.sheetTitle, { color: colors2.colorOnBg }], children: title }),
|
|
4285
|
+
/* @__PURE__ */ jsx48(
|
|
4341
4286
|
Pressable25,
|
|
4342
4287
|
{
|
|
4343
4288
|
accessibilityRole: "button",
|
|
4344
4289
|
accessibilityLabel: "Close",
|
|
4345
4290
|
onPress: () => setOpen(false),
|
|
4346
4291
|
hitSlop: 8,
|
|
4347
|
-
children: /* @__PURE__ */
|
|
4348
|
-
|
|
4292
|
+
children: /* @__PURE__ */ jsx48(
|
|
4293
|
+
ScaledText,
|
|
4349
4294
|
{
|
|
4350
4295
|
style: [
|
|
4351
4296
|
styles43.closeText,
|
|
@@ -4359,13 +4304,13 @@ function DropdownMenu({
|
|
|
4359
4304
|
]
|
|
4360
4305
|
}
|
|
4361
4306
|
),
|
|
4362
|
-
/* @__PURE__ */
|
|
4307
|
+
/* @__PURE__ */ jsx48(
|
|
4363
4308
|
FlatList2,
|
|
4364
4309
|
{
|
|
4365
4310
|
data: items,
|
|
4366
4311
|
keyExtractor: (item) => item.id,
|
|
4367
4312
|
renderItem: ({ item }) => /* @__PURE__ */ jsxs32(Fragment2, { children: [
|
|
4368
|
-
item.separator && /* @__PURE__ */
|
|
4313
|
+
item.separator && /* @__PURE__ */ jsx48(
|
|
4369
4314
|
View40,
|
|
4370
4315
|
{
|
|
4371
4316
|
style: [
|
|
@@ -4389,7 +4334,7 @@ function DropdownMenu({
|
|
|
4389
4334
|
item.disabled && { opacity: 0.4 }
|
|
4390
4335
|
],
|
|
4391
4336
|
children: [
|
|
4392
|
-
!!item.icon && /* @__PURE__ */
|
|
4337
|
+
!!item.icon && /* @__PURE__ */ jsx48(
|
|
4393
4338
|
View40,
|
|
4394
4339
|
{
|
|
4395
4340
|
importantForAccessibility: "no-hide-descendants",
|
|
@@ -4397,8 +4342,8 @@ function DropdownMenu({
|
|
|
4397
4342
|
children: item.icon
|
|
4398
4343
|
}
|
|
4399
4344
|
),
|
|
4400
|
-
/* @__PURE__ */
|
|
4401
|
-
|
|
4345
|
+
/* @__PURE__ */ jsx48(
|
|
4346
|
+
ScaledText,
|
|
4402
4347
|
{
|
|
4403
4348
|
style: [
|
|
4404
4349
|
styles43.itemText,
|
|
@@ -4428,10 +4373,10 @@ import {
|
|
|
4428
4373
|
Modal as Modal5,
|
|
4429
4374
|
View as View41,
|
|
4430
4375
|
Pressable as Pressable26,
|
|
4431
|
-
StyleSheet as
|
|
4376
|
+
StyleSheet as StyleSheet45
|
|
4432
4377
|
} from "react-native";
|
|
4433
|
-
import { jsx as
|
|
4434
|
-
var styles44 =
|
|
4378
|
+
import { jsx as jsx49, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
4379
|
+
var styles44 = StyleSheet45.create({
|
|
4435
4380
|
wrapper: {
|
|
4436
4381
|
alignSelf: "flex-start"
|
|
4437
4382
|
},
|
|
@@ -4469,7 +4414,7 @@ function Popover({
|
|
|
4469
4414
|
accessibilityRole: "button",
|
|
4470
4415
|
accessibilityLabel: accessibilityLabel ?? "Open popover"
|
|
4471
4416
|
}),
|
|
4472
|
-
/* @__PURE__ */
|
|
4417
|
+
/* @__PURE__ */ jsx49(
|
|
4473
4418
|
Modal5,
|
|
4474
4419
|
{
|
|
4475
4420
|
visible: isOpen,
|
|
@@ -4477,18 +4422,18 @@ function Popover({
|
|
|
4477
4422
|
animationType: "fade",
|
|
4478
4423
|
onRequestClose: close,
|
|
4479
4424
|
children: /* @__PURE__ */ jsxs33(View41, { style: styles44.overlay, onAccessibilityEscape: close, children: [
|
|
4480
|
-
/* @__PURE__ */
|
|
4425
|
+
/* @__PURE__ */ jsx49(
|
|
4481
4426
|
Pressable26,
|
|
4482
4427
|
{
|
|
4483
4428
|
testID: "bds-popover-backdrop",
|
|
4484
|
-
style:
|
|
4429
|
+
style: StyleSheet45.absoluteFill,
|
|
4485
4430
|
onPress: close,
|
|
4486
4431
|
onAccessibilityTap: close,
|
|
4487
4432
|
accessibilityRole: "button",
|
|
4488
4433
|
accessibilityLabel: "Close popover"
|
|
4489
4434
|
}
|
|
4490
4435
|
),
|
|
4491
|
-
/* @__PURE__ */
|
|
4436
|
+
/* @__PURE__ */ jsx49(
|
|
4492
4437
|
View41,
|
|
4493
4438
|
{
|
|
4494
4439
|
style: [styles44.panel, { backgroundColor: colors2.colorBg }],
|
|
@@ -4536,6 +4481,8 @@ export {
|
|
|
4536
4481
|
Radio,
|
|
4537
4482
|
RadioGroup,
|
|
4538
4483
|
Rating,
|
|
4484
|
+
ScaledText,
|
|
4485
|
+
ScaledTextInput,
|
|
4539
4486
|
SectionHeader,
|
|
4540
4487
|
SegmentedControl,
|
|
4541
4488
|
Select,
|
|
@@ -4557,6 +4504,8 @@ export {
|
|
|
4557
4504
|
createReactNavigationTheme,
|
|
4558
4505
|
font,
|
|
4559
4506
|
lineHeight,
|
|
4507
|
+
maxFontScaleFor,
|
|
4508
|
+
maxFontScaleForStyle,
|
|
4560
4509
|
spacing,
|
|
4561
4510
|
useReactNavigationTheme,
|
|
4562
4511
|
useTheme,
|