@entropix/react-native 1.0.0 → 1.0.1

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.
Files changed (93) hide show
  1. package/dist/accordion.cjs +26 -0
  2. package/dist/accordion.d.cts +34 -0
  3. package/dist/accordion.d.ts +34 -0
  4. package/dist/accordion.js +5 -0
  5. package/dist/button.cjs +14 -0
  6. package/dist/button.d.cts +35 -0
  7. package/dist/button.d.ts +35 -0
  8. package/dist/button.js +5 -0
  9. package/dist/checkbox.cjs +14 -0
  10. package/dist/checkbox.d.cts +41 -0
  11. package/dist/checkbox.d.ts +41 -0
  12. package/dist/checkbox.js +5 -0
  13. package/dist/chunk-2SQB7RNT.cjs +110 -0
  14. package/dist/chunk-3MHE2C74.js +143 -0
  15. package/dist/chunk-45KMMZUT.js +131 -0
  16. package/dist/chunk-64DK6YFL.js +164 -0
  17. package/dist/chunk-73BDGPZT.js +89 -0
  18. package/dist/chunk-B5YFEA66.cjs +243 -0
  19. package/dist/chunk-BOUIB4OY.cjs +56 -0
  20. package/dist/chunk-C6HF6QXK.js +154 -0
  21. package/dist/chunk-CXQNNEPC.js +249 -0
  22. package/dist/chunk-EFRYMWJB.js +86 -0
  23. package/dist/chunk-FQUZIDVS.cjs +174 -0
  24. package/dist/chunk-G7WPUTB6.cjs +258 -0
  25. package/dist/chunk-HH3CEDSH.js +122 -0
  26. package/dist/chunk-IRQWSFCZ.cjs +156 -0
  27. package/dist/chunk-KU24A5PQ.js +92 -0
  28. package/dist/chunk-OMKUPSHJ.cjs +95 -0
  29. package/dist/chunk-P5NAXMSC.cjs +91 -0
  30. package/dist/chunk-PKDXWKLO.cjs +245 -0
  31. package/dist/chunk-PVTPOJRU.js +155 -0
  32. package/dist/chunk-Q7TEJ62Q.cjs +160 -0
  33. package/dist/chunk-THX22NZW.cjs +146 -0
  34. package/dist/chunk-UHVTF2Y4.js +172 -0
  35. package/dist/chunk-UYXJHKYK.cjs +166 -0
  36. package/dist/chunk-VP567WZL.js +237 -0
  37. package/dist/chunk-XBNX4SLA.js +105 -0
  38. package/dist/chunk-XND7AIKO.cjs +133 -0
  39. package/dist/chunk-XSOLJOBG.js +238 -0
  40. package/dist/chunk-Z2MBHXUQ.cjs +127 -0
  41. package/dist/chunk-ZPAOLIIG.cjs +88 -0
  42. package/dist/chunk-ZYOTKLBG.js +52 -0
  43. package/dist/dialog.cjs +38 -0
  44. package/dist/dialog.d.cts +83 -0
  45. package/dist/dialog.d.ts +83 -0
  46. package/dist/dialog.js +5 -0
  47. package/dist/index.cjs +187 -2084
  48. package/dist/index.d.cts +21 -672
  49. package/dist/index.d.ts +21 -672
  50. package/dist/index.js +15 -2045
  51. package/dist/input.cjs +14 -0
  52. package/dist/input.d.cts +57 -0
  53. package/dist/input.d.ts +57 -0
  54. package/dist/input.js +5 -0
  55. package/dist/layout.cjs +25 -0
  56. package/dist/layout.d.cts +108 -0
  57. package/dist/layout.d.ts +108 -0
  58. package/dist/layout.js +4 -0
  59. package/dist/menu.cjs +26 -0
  60. package/dist/menu.d.cts +34 -0
  61. package/dist/menu.d.ts +34 -0
  62. package/dist/menu.js +5 -0
  63. package/dist/radio.cjs +18 -0
  64. package/dist/radio.d.cts +55 -0
  65. package/dist/radio.d.ts +55 -0
  66. package/dist/radio.js +5 -0
  67. package/dist/select.cjs +26 -0
  68. package/dist/select.d.cts +86 -0
  69. package/dist/select.d.ts +86 -0
  70. package/dist/select.js +5 -0
  71. package/dist/switch.cjs +14 -0
  72. package/dist/switch.d.cts +27 -0
  73. package/dist/switch.d.ts +27 -0
  74. package/dist/switch.js +5 -0
  75. package/dist/tabs.cjs +26 -0
  76. package/dist/tabs.d.cts +33 -0
  77. package/dist/tabs.d.ts +33 -0
  78. package/dist/tabs.js +5 -0
  79. package/dist/textarea.cjs +14 -0
  80. package/dist/textarea.d.cts +55 -0
  81. package/dist/textarea.d.ts +55 -0
  82. package/dist/textarea.js +5 -0
  83. package/dist/theme.cjs +20 -0
  84. package/dist/theme.d.cts +59 -0
  85. package/dist/theme.d.ts +59 -0
  86. package/dist/theme.js +3 -0
  87. package/dist/toggle.cjs +18 -0
  88. package/dist/toggle.d.cts +41 -0
  89. package/dist/toggle.d.ts +41 -0
  90. package/dist/toggle.js +5 -0
  91. package/package.json +146 -4
  92. package/dist/index.cjs.map +0 -1
  93. package/dist/index.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,2047 +1,17 @@
1
- import { createContext, useMemo, useContext, useCallback, useRef, useEffect, useState } from 'react';
2
- import { tokens } from '@entropix/tokens/native';
3
- import { tokens as tokens$1 } from '@entropix/tokens/native/light';
4
- import { tokens as tokens$2 } from '@entropix/tokens/native/dark';
5
- import { jsx, jsxs } from 'react/jsx-runtime';
6
- import { Pressable, Text, Animated, Modal, View, StyleSheet, TextInput, Dimensions } from 'react-native';
7
- import { useButton, useToggle, useDialog, useTabs, useAccordion, useMenu, useInput, useRadioGroup, useSelect } from '@entropix/core';
8
-
9
- // src/theme/theme-context.tsx
10
- var ThemeContext = createContext({
11
- mode: "light",
12
- brand: "default",
13
- tokens: tokens$1,
14
- baseTokens: tokens
15
- });
16
- var brandRegistry = {
17
- default: {
18
- light: tokens$1,
19
- dark: tokens$2
20
- }
21
- };
22
- function registerBrand(name, themes) {
23
- brandRegistry[name] = themes;
24
- }
25
- function EntropixProvider({
26
- mode = "light",
27
- brand = "default",
28
- tokens: tokenOverride,
29
- children
30
- }) {
31
- const value = useMemo(() => {
32
- let resolvedTokens;
33
- if (tokenOverride) {
34
- resolvedTokens = tokenOverride;
35
- } else {
36
- const brandThemes = brandRegistry[brand] ?? brandRegistry.default;
37
- resolvedTokens = brandThemes[mode] ?? brandThemes.light;
38
- }
39
- return {
40
- mode,
41
- brand,
42
- tokens: resolvedTokens,
43
- baseTokens: tokens
44
- };
45
- }, [mode, brand, tokenOverride]);
46
- return /* @__PURE__ */ jsx(ThemeContext.Provider, { value, children });
47
- }
48
- function useTheme() {
49
- return useContext(ThemeContext);
50
- }
51
-
52
- // src/utils/map-accessibility-to-rn.ts
53
- var RN_ROLE_MAP = {
54
- button: "button",
55
- checkbox: "checkbox",
56
- switch: "switch",
57
- dialog: "none",
58
- // Modal component handles dialog semantics
59
- alertdialog: "alert",
60
- link: "link",
61
- tab: "tab",
62
- tablist: "tablist",
63
- menu: "menu",
64
- menuitem: "menuitem",
65
- radio: "radio",
66
- radiogroup: "radiogroup",
67
- slider: "adjustable",
68
- spinbutton: "spinbutton",
69
- textbox: "text",
70
- combobox: "combobox",
71
- progressbar: "progressbar",
72
- alert: "alert",
73
- status: "text",
74
- tooltip: "text",
75
- none: "none",
76
- presentation: "none"
77
- };
78
- function mapAccessibilityToRN(props) {
79
- const result = { accessible: true };
80
- if (props.role) {
81
- result.accessibilityRole = RN_ROLE_MAP[props.role] ?? props.role;
82
- }
83
- if (props.label) {
84
- result.accessibilityLabel = props.label;
85
- }
86
- if (props.describedBy) {
87
- result.accessibilityHint = props.describedBy;
88
- }
89
- if (props.labelledBy) {
90
- result.accessibilityLabelledBy = props.labelledBy;
91
- }
92
- const state = {};
93
- let hasState = false;
94
- if (props.disabled !== void 0) {
95
- state.disabled = props.disabled;
96
- hasState = true;
97
- }
98
- if (props.expanded !== void 0) {
99
- state.expanded = props.expanded;
100
- hasState = true;
101
- }
102
- if (props.selected !== void 0) {
103
- state.selected = props.selected;
104
- hasState = true;
105
- }
106
- if (props.checked !== void 0) {
107
- state.checked = props.checked;
108
- hasState = true;
109
- }
110
- if (props.busy !== void 0) {
111
- state.busy = props.busy;
112
- hasState = true;
113
- }
114
- if (hasState) {
115
- result.accessibilityState = state;
116
- }
117
- if (props.valueNow !== void 0 || props.valueMin !== void 0 || props.valueMax !== void 0 || props.valueText !== void 0) {
118
- result.accessibilityValue = {};
119
- if (props.valueNow !== void 0)
120
- result.accessibilityValue.now = props.valueNow;
121
- if (props.valueMin !== void 0)
122
- result.accessibilityValue.min = props.valueMin;
123
- if (props.valueMax !== void 0)
124
- result.accessibilityValue.max = props.valueMax;
125
- if (props.valueText !== void 0)
126
- result.accessibilityValue.text = props.valueText;
127
- }
128
- if (props.live) {
129
- result.accessibilityLiveRegion = props.live === "off" ? "none" : props.live;
130
- }
131
- if (props.hidden) {
132
- result.accessibilityElementsHidden = true;
133
- result.importantForAccessibility = "no-hide-descendants";
134
- }
135
- return result;
136
- }
137
- function Button({
138
- onPress,
139
- disabled,
140
- loading,
141
- variant = "primary",
142
- size = "md",
143
- style,
144
- textStyle,
145
- children,
146
- ...rest
147
- }) {
148
- const { tokens: t, baseTokens: bt } = useTheme();
149
- const { isDisabled, isLoading, getButtonProps } = useButton({
150
- disabled,
151
- loading,
152
- onPress,
153
- elementType: "div"
154
- });
155
- const propGetterReturn = getButtonProps();
156
- const rnAccessibility = mapAccessibilityToRN(propGetterReturn.accessibility);
157
- const handlePress = useCallback(() => {
158
- propGetterReturn.onAction?.();
159
- }, [propGetterReturn.onAction]);
160
- const sizeStyles = getSizeStyle(size, bt);
161
- const variantStyles = getVariantStyle(variant, t);
162
- const labelColor = getVariantTextColor(variant, t);
163
- const isInactive = isDisabled || isLoading;
164
- return /* @__PURE__ */ jsx(
165
- Pressable,
166
- {
167
- ...rnAccessibility,
168
- ...rest,
169
- disabled: isInactive,
170
- onPress: isInactive ? void 0 : handlePress,
171
- style: [
172
- baseStyle,
173
- sizeStyles.container,
174
- variantStyles,
175
- isInactive && { opacity: 0.5 },
176
- style
177
- ],
178
- children: typeof children === "string" ? /* @__PURE__ */ jsx(
179
- Text,
180
- {
181
- style: [
182
- { color: labelColor, fontSize: sizeStyles.fontSize, fontWeight: "500" },
183
- textStyle
184
- ],
185
- children
186
- }
187
- ) : children
188
- }
189
- );
190
- }
191
- var baseStyle = {
192
- flexDirection: "row",
193
- alignItems: "center",
194
- justifyContent: "center"
195
- };
196
- function getSizeStyle(size, bt) {
197
- switch (size) {
198
- case "sm":
199
- return {
200
- container: {
201
- paddingVertical: bt.entropixSpacing1,
202
- paddingHorizontal: bt.entropixSpacing3,
203
- borderRadius: bt.entropixRadiusSm,
204
- gap: bt.entropixButtonGap
205
- },
206
- fontSize: bt.entropixFontSizeXs
207
- };
208
- case "lg":
209
- return {
210
- container: {
211
- paddingVertical: bt.entropixSpacing3,
212
- paddingHorizontal: bt.entropixSpacing6,
213
- borderRadius: bt.entropixRadiusLg,
214
- gap: bt.entropixButtonGap
215
- },
216
- fontSize: bt.entropixFontSizeBase
217
- };
218
- default:
219
- return {
220
- container: {
221
- paddingVertical: bt.entropixButtonPaddingY,
222
- paddingHorizontal: bt.entropixButtonPaddingX,
223
- borderRadius: bt.entropixButtonBorderRadius,
224
- gap: bt.entropixButtonGap
225
- },
226
- fontSize: bt.entropixButtonFontSize
227
- };
228
- }
229
- }
230
- function getVariantStyle(variant, t) {
231
- switch (variant) {
232
- case "primary":
233
- return { backgroundColor: t.entropixButtonPrimaryBg, borderWidth: 1, borderColor: t.entropixButtonPrimaryBorder };
234
- case "secondary":
235
- return { backgroundColor: t.entropixButtonSecondaryBg, borderWidth: 1, borderColor: t.entropixButtonSecondaryBorder };
236
- case "outline":
237
- return { backgroundColor: "transparent", borderWidth: 1, borderColor: t.entropixColorBorderDefault };
238
- case "ghost":
239
- return { backgroundColor: "transparent", borderWidth: 1, borderColor: "transparent" };
240
- case "danger":
241
- return { backgroundColor: t.entropixButtonDangerBg, borderWidth: 1, borderColor: t.entropixButtonDangerBorder };
242
- }
243
- }
244
- function getVariantTextColor(variant, t) {
245
- switch (variant) {
246
- case "primary":
247
- return t.entropixButtonPrimaryText;
248
- case "secondary":
249
- return t.entropixButtonSecondaryText;
250
- case "outline":
251
- case "ghost":
252
- return t.entropixColorTextPrimary;
253
- case "danger":
254
- return t.entropixButtonDangerText;
255
- }
256
- }
257
- function Toggle(props) {
258
- return /* @__PURE__ */ jsx(ToggleInner, { ...props, role: "checkbox" });
259
- }
260
- function ToggleInner({
261
- checked,
262
- defaultChecked,
263
- onChange,
264
- disabled,
265
- label,
266
- role = "checkbox",
267
- style,
268
- textStyle,
269
- children,
270
- ...rest
271
- }) {
272
- const { tokens: t, baseTokens: bt } = useTheme();
273
- const { isDisabled, getToggleProps } = useToggle({
274
- checked,
275
- defaultChecked,
276
- onChange,
277
- disabled,
278
- role
279
- });
280
- const propGetterReturn = getToggleProps();
281
- const rnAccessibility = mapAccessibilityToRN(propGetterReturn.accessibility);
282
- const isChecked = propGetterReturn.accessibility.checked === true;
283
- if (label) {
284
- rnAccessibility.accessibilityLabel = label;
285
- }
286
- const handlePress = useCallback(() => {
287
- propGetterReturn.onAction?.();
288
- }, [propGetterReturn.onAction]);
289
- return /* @__PURE__ */ jsx(
290
- Pressable,
291
- {
292
- ...rnAccessibility,
293
- ...rest,
294
- disabled: isDisabled,
295
- onPress: isDisabled ? void 0 : handlePress,
296
- style: [
297
- {
298
- flexDirection: "row",
299
- alignItems: "center",
300
- justifyContent: "center",
301
- paddingVertical: bt.entropixSpacing2,
302
- paddingHorizontal: bt.entropixSpacing3,
303
- borderWidth: 1,
304
- borderColor: isChecked ? "transparent" : t.entropixColorBorderDefault,
305
- borderRadius: bt.entropixRadiusMd,
306
- backgroundColor: isChecked ? t.entropixColorActionPrimaryDefault : t.entropixColorBgPrimary
307
- },
308
- isDisabled && { opacity: 0.5 },
309
- style
310
- ],
311
- children: typeof children === "string" ? /* @__PURE__ */ jsx(
312
- Text,
313
- {
314
- style: [
315
- {
316
- fontSize: bt.entropixFontSizeSm,
317
- fontWeight: "500",
318
- color: isChecked ? t.entropixColorTextInverse : t.entropixColorTextPrimary
319
- },
320
- textStyle
321
- ],
322
- children
323
- }
324
- ) : children != null ? children : /* @__PURE__ */ jsx(
325
- Text,
326
- {
327
- style: {
328
- fontSize: bt.entropixFontSizeSm,
329
- fontWeight: "500",
330
- color: isChecked ? t.entropixColorTextInverse : t.entropixColorTextPrimary
331
- },
332
- children: isChecked ? "On" : "Off"
333
- }
334
- )
335
- }
336
- );
337
- }
338
- var TRACK_WIDTH = 44;
339
- var TRACK_HEIGHT = 24;
340
- var TRACK_PADDING = 2;
341
- var THUMB_SIZE = TRACK_HEIGHT - TRACK_PADDING * 2;
342
- var THUMB_TRAVEL = TRACK_WIDTH - TRACK_PADDING * 2 - THUMB_SIZE;
343
- function Switch({
344
- checked,
345
- defaultChecked,
346
- onChange,
347
- disabled,
348
- label,
349
- style,
350
- ...rest
351
- }) {
352
- const { tokens: t, baseTokens: bt } = useTheme();
353
- const { isDisabled, getToggleProps } = useToggle({
354
- checked,
355
- defaultChecked,
356
- onChange,
357
- disabled,
358
- role: "switch"
359
- });
360
- const propGetterReturn = getToggleProps();
361
- const rnAccessibility = mapAccessibilityToRN(propGetterReturn.accessibility);
362
- const isChecked = propGetterReturn.accessibility.checked === true;
363
- if (label) {
364
- rnAccessibility.accessibilityLabel = label;
365
- }
366
- const handlePress = useCallback(() => {
367
- propGetterReturn.onAction?.();
368
- }, [propGetterReturn.onAction]);
369
- const thumbAnim = useRef(
370
- new Animated.Value(defaultChecked || checked ? THUMB_TRAVEL : 0)
371
- ).current;
372
- useEffect(() => {
373
- Animated.timing(thumbAnim, {
374
- toValue: isChecked ? THUMB_TRAVEL : 0,
375
- duration: 150,
376
- useNativeDriver: false
377
- }).start();
378
- }, [isChecked, thumbAnim]);
379
- return /* @__PURE__ */ jsx(
380
- Pressable,
381
- {
382
- ...rnAccessibility,
383
- ...rest,
384
- disabled: isDisabled,
385
- onPress: isDisabled ? void 0 : handlePress,
386
- style: [
387
- {
388
- width: TRACK_WIDTH,
389
- height: TRACK_HEIGHT,
390
- borderRadius: bt.entropixRadiusFull,
391
- backgroundColor: isChecked ? t.entropixColorActionPrimaryDefault : t.entropixColorGray300,
392
- padding: TRACK_PADDING,
393
- justifyContent: "center"
394
- },
395
- isDisabled && { opacity: 0.5 },
396
- style
397
- ],
398
- children: /* @__PURE__ */ jsx(
399
- Animated.View,
400
- {
401
- style: {
402
- width: THUMB_SIZE,
403
- height: THUMB_SIZE,
404
- borderRadius: bt.entropixRadiusFull,
405
- backgroundColor: t.entropixColorWhite,
406
- transform: [{ translateX: thumbAnim }]
407
- }
408
- }
409
- )
410
- }
411
- );
412
- }
413
- var DialogContext = createContext(null);
414
- function useDialogContext() {
415
- const context = useContext(DialogContext);
416
- if (!context) {
417
- throw new Error(
418
- "Dialog compound components must be used within a <Dialog> provider."
419
- );
420
- }
421
- return context;
422
- }
423
- function Dialog({
424
- children,
425
- isOpen,
426
- defaultOpen,
427
- onOpenChange,
428
- closeOnOverlayPress,
429
- closeOnEscape,
430
- modal,
431
- role
432
- }) {
433
- const dialog = useDialog({
434
- isOpen,
435
- defaultOpen,
436
- onOpenChange,
437
- closeOnOverlayPress,
438
- closeOnEscape,
439
- modal,
440
- role
441
- });
442
- return /* @__PURE__ */ jsx(DialogContext.Provider, { value: dialog, children });
443
- }
444
- function DialogTrigger({
445
- children,
446
- style,
447
- ...rest
448
- }) {
449
- const { getTriggerProps } = useDialogContext();
450
- const propGetterReturn = getTriggerProps();
451
- const rnAccessibility = mapAccessibilityToRN(propGetterReturn.accessibility);
452
- const handlePress = useCallback(() => {
453
- propGetterReturn.onAction?.();
454
- }, [propGetterReturn.onAction]);
455
- return /* @__PURE__ */ jsx(
456
- Pressable,
457
- {
458
- ...rnAccessibility,
459
- ...rest,
460
- onPress: handlePress,
461
- style,
462
- children
463
- }
464
- );
465
- }
466
- function DialogContent({
467
- children,
468
- style,
469
- cardStyle,
470
- animationType = "fade",
471
- transparent = true,
472
- ...rest
473
- }) {
474
- const { tokens: t, baseTokens: bt } = useTheme();
475
- const { isOpen, close, ids, getContentProps } = useDialogContext();
476
- const propGetterReturn = getContentProps();
477
- const rnAccessibility = mapAccessibilityToRN(propGetterReturn.accessibility);
478
- return /* @__PURE__ */ jsx(
479
- Modal,
480
- {
481
- visible: isOpen,
482
- transparent,
483
- animationType,
484
- onRequestClose: close,
485
- supportedOrientations: ["portrait", "landscape"],
486
- children: /* @__PURE__ */ jsx(
487
- View,
488
- {
489
- ...rest,
490
- style: [
491
- {
492
- flex: 1,
493
- justifyContent: "center",
494
- alignItems: "center",
495
- backgroundColor: "rgba(0, 0, 0, 0.5)"
496
- },
497
- style
498
- ],
499
- children: /* @__PURE__ */ jsx(
500
- View,
501
- {
502
- ...rnAccessibility,
503
- nativeID: ids.content,
504
- style: [
505
- {
506
- backgroundColor: t.entropixColorBgPrimary,
507
- borderRadius: bt.entropixRadiusLg,
508
- padding: bt.entropixSpacing6,
509
- width: "90%",
510
- maxWidth: 480,
511
- shadowColor: "#000",
512
- shadowOffset: { width: 0, height: 4 },
513
- shadowOpacity: 0.15,
514
- shadowRadius: 12,
515
- elevation: 8
516
- },
517
- cardStyle
518
- ],
519
- children
520
- }
521
- )
522
- }
523
- )
524
- }
525
- );
526
- }
527
- function DialogTitle({ children, style, ...rest }) {
528
- const { tokens: t, baseTokens: bt } = useTheme();
529
- const { ids } = useDialogContext();
530
- return /* @__PURE__ */ jsx(
531
- Text,
532
- {
533
- ...rest,
534
- nativeID: ids.title,
535
- style: [
536
- {
537
- fontSize: 18,
538
- fontWeight: "600",
539
- color: t.entropixColorTextPrimary,
540
- marginBottom: bt.entropixSpacing2
541
- },
542
- style
543
- ],
544
- accessibilityRole: "header",
545
- children
546
- }
547
- );
548
- }
549
- function DialogDescription({
550
- children,
551
- style,
552
- ...rest
553
- }) {
554
- const { tokens: t, baseTokens: bt } = useTheme();
555
- const { ids } = useDialogContext();
556
- return /* @__PURE__ */ jsx(
557
- Text,
558
- {
559
- ...rest,
560
- nativeID: ids.description,
561
- style: [
562
- {
563
- fontSize: bt.entropixFontSizeSm,
564
- color: t.entropixColorTextSecondary,
565
- lineHeight: 20,
566
- marginBottom: bt.entropixSpacing4
567
- },
568
- style
569
- ],
570
- children
571
- }
572
- );
573
- }
574
- function DialogClose({ children, style, ...rest }) {
575
- const { tokens: t, baseTokens: bt } = useTheme();
576
- const { getCloseProps } = useDialogContext();
577
- const propGetterReturn = getCloseProps();
578
- const rnAccessibility = mapAccessibilityToRN(propGetterReturn.accessibility);
579
- const handlePress = useCallback(() => {
580
- propGetterReturn.onAction?.();
581
- }, [propGetterReturn.onAction]);
582
- return /* @__PURE__ */ jsx(
583
- Pressable,
584
- {
585
- ...rnAccessibility,
586
- ...rest,
587
- onPress: handlePress,
588
- style: [
589
- {
590
- position: "absolute",
591
- top: bt.entropixSpacing3,
592
- right: bt.entropixSpacing3,
593
- width: 32,
594
- height: 32,
595
- alignItems: "center",
596
- justifyContent: "center",
597
- borderRadius: bt.entropixRadiusSm
598
- },
599
- style
600
- ],
601
- accessibilityRole: "button",
602
- children: children ?? /* @__PURE__ */ jsx(
603
- Text,
604
- {
605
- style: {
606
- fontSize: 16,
607
- color: t.entropixColorTextSecondary
608
- },
609
- children: "\u2715"
610
- }
611
- )
612
- }
613
- );
614
- }
615
- function DialogOverlay({ style, testID }) {
616
- const { isOpen, getOverlayProps } = useDialogContext();
617
- const propGetterReturn = getOverlayProps();
618
- const handlePress = useCallback(() => {
619
- propGetterReturn.onAction?.();
620
- }, [propGetterReturn.onAction]);
621
- if (!isOpen) return null;
622
- return /* @__PURE__ */ jsx(
623
- Pressable,
624
- {
625
- testID,
626
- accessible: false,
627
- importantForAccessibility: "no",
628
- onPress: propGetterReturn.onAction ? handlePress : void 0,
629
- style: [
630
- {
631
- ...StyleSheet.absoluteFillObject,
632
- backgroundColor: "rgba(0, 0, 0, 0.5)"
633
- },
634
- style
635
- ]
636
- }
637
- );
638
- }
639
- var TabsContext = createContext(null);
640
- function useTabsContext() {
641
- const context = useContext(TabsContext);
642
- if (!context) {
643
- throw new Error(
644
- "Tabs compound components must be used within a <Tabs> provider."
645
- );
646
- }
647
- return context;
648
- }
649
- function Tabs({ children, style, ...options }) {
650
- const tabs = useTabs(options);
651
- return /* @__PURE__ */ jsx(TabsContext.Provider, { value: tabs, children: /* @__PURE__ */ jsx(View, { style, children }) });
652
- }
653
- function TabList({ children, style }) {
654
- const { tokens: t, baseTokens: bt } = useTheme();
655
- const { getTabListProps } = useTabsContext();
656
- const propGetterReturn = getTabListProps();
657
- const rnAccessibility = mapAccessibilityToRN(propGetterReturn.accessibility);
658
- return /* @__PURE__ */ jsx(
659
- View,
660
- {
661
- ...rnAccessibility,
662
- style: [
663
- {
664
- flexDirection: "row",
665
- gap: bt.entropixSpacing1,
666
- borderBottomWidth: 1,
667
- borderBottomColor: t.entropixColorBorderDefault
668
- },
669
- style
670
- ],
671
- children
672
- }
673
- );
674
- }
675
- function Tab({ value, children, style, textStyle, ...rest }) {
676
- const { tokens: t, baseTokens: bt } = useTheme();
677
- const { getTabProps, selectedKey } = useTabsContext();
678
- const propGetterReturn = getTabProps(value);
679
- const rnAccessibility = mapAccessibilityToRN(propGetterReturn.accessibility);
680
- const isActive = selectedKey === value;
681
- const isDisabled = propGetterReturn.accessibility.disabled === true;
682
- const handlePress = useCallback(() => {
683
- propGetterReturn.onAction?.();
684
- }, [propGetterReturn.onAction]);
685
- return /* @__PURE__ */ jsx(
686
- Pressable,
687
- {
688
- ...rnAccessibility,
689
- ...rest,
690
- onPress: propGetterReturn.onAction ? handlePress : void 0,
691
- style: [
692
- {
693
- paddingVertical: bt.entropixSpacing2,
694
- paddingHorizontal: bt.entropixSpacing4,
695
- borderBottomWidth: 2,
696
- borderBottomColor: isActive ? t.entropixColorActionPrimaryDefault : "transparent"
697
- },
698
- isDisabled && { opacity: 0.5 },
699
- style
700
- ],
701
- children: typeof children === "string" ? /* @__PURE__ */ jsx(
702
- Text,
703
- {
704
- style: [
705
- {
706
- fontSize: bt.entropixFontSizeSm,
707
- fontWeight: "500",
708
- color: isActive ? t.entropixColorActionPrimaryDefault : t.entropixColorTextSecondary
709
- },
710
- textStyle
711
- ],
712
- children
713
- }
714
- ) : children
715
- }
716
- );
717
- }
718
- function TabPanel({ value, children, style }) {
719
- const { baseTokens: bt } = useTheme();
720
- const { getTabPanelProps, selectedKey } = useTabsContext();
721
- const propGetterReturn = getTabPanelProps(value);
722
- const rnAccessibility = mapAccessibilityToRN(propGetterReturn.accessibility);
723
- if (selectedKey !== value) return null;
724
- return /* @__PURE__ */ jsx(
725
- View,
726
- {
727
- ...rnAccessibility,
728
- style: [{ padding: bt.entropixSpacing4 }, style],
729
- children
730
- }
731
- );
732
- }
733
- var AccordionContext = createContext(null);
734
- function useAccordionContext() {
735
- const context = useContext(AccordionContext);
736
- if (!context) {
737
- throw new Error(
738
- "Accordion compound components must be used within an <Accordion> provider."
739
- );
740
- }
741
- return context;
742
- }
743
- var AccordionItemContext = createContext(null);
744
- function useAccordionItemContext() {
745
- const context = useContext(AccordionItemContext);
746
- if (context === null) {
747
- throw new Error(
748
- "AccordionTrigger and AccordionPanel must be used within an <AccordionItem>."
749
- );
750
- }
751
- return context;
752
- }
753
- function Accordion({ children, style, ...options }) {
754
- const { tokens: t, baseTokens: bt } = useTheme();
755
- const accordion = useAccordion(options);
756
- return /* @__PURE__ */ jsx(AccordionContext.Provider, { value: accordion, children: /* @__PURE__ */ jsx(
757
- View,
758
- {
759
- style: [
760
- {
761
- borderWidth: 1,
762
- borderColor: t.entropixColorBorderDefault,
763
- borderRadius: bt.entropixRadiusLg,
764
- overflow: "hidden"
765
- },
766
- style
767
- ],
768
- children
769
- }
770
- ) });
771
- }
772
- function AccordionItem({
773
- value,
774
- isLast = false,
775
- children,
776
- style
777
- }) {
778
- const { tokens: t } = useTheme();
779
- return /* @__PURE__ */ jsx(AccordionItemContext.Provider, { value, children: /* @__PURE__ */ jsx(
780
- View,
781
- {
782
- style: [
783
- {
784
- borderBottomWidth: isLast ? 0 : 1,
785
- borderBottomColor: t.entropixColorBorderDefault
786
- },
787
- style
788
- ],
789
- children
790
- }
791
- ) });
792
- }
793
- function AccordionTrigger({
794
- children,
795
- style,
796
- textStyle,
797
- ...rest
798
- }) {
799
- const { tokens: t, baseTokens: bt } = useTheme();
800
- const itemKey = useAccordionItemContext();
801
- const { getItemTriggerProps, isExpanded } = useAccordionContext();
802
- const propGetterReturn = getItemTriggerProps(itemKey);
803
- const rnAccessibility = mapAccessibilityToRN(propGetterReturn.accessibility);
804
- const expanded = isExpanded(itemKey);
805
- const handlePress = useCallback(() => {
806
- propGetterReturn.onAction?.();
807
- }, [propGetterReturn.onAction]);
808
- return /* @__PURE__ */ jsxs(
809
- Pressable,
810
- {
811
- ...rnAccessibility,
812
- ...rest,
813
- onPress: propGetterReturn.onAction ? handlePress : void 0,
814
- style: [
815
- {
816
- flexDirection: "row",
817
- alignItems: "center",
818
- justifyContent: "space-between",
819
- paddingVertical: bt.entropixSpacing4,
820
- paddingHorizontal: bt.entropixSpacing4
821
- },
822
- style
823
- ],
824
- children: [
825
- typeof children === "string" ? /* @__PURE__ */ jsx(
826
- Text,
827
- {
828
- style: [
829
- {
830
- fontSize: bt.entropixFontSizeSm,
831
- fontWeight: "500",
832
- color: t.entropixColorTextPrimary,
833
- flex: 1
834
- },
835
- textStyle
836
- ],
837
- children
838
- }
839
- ) : children,
840
- /* @__PURE__ */ jsx(
841
- Text,
842
- {
843
- style: {
844
- fontSize: 12,
845
- color: t.entropixColorTextSecondary,
846
- marginLeft: bt.entropixSpacing2
847
- },
848
- children: expanded ? "\u2212" : "+"
849
- }
850
- )
851
- ]
852
- }
853
- );
854
- }
855
- function AccordionPanel({ children, style }) {
856
- const { baseTokens: bt } = useTheme();
857
- const itemKey = useAccordionItemContext();
858
- const { getItemPanelProps, isExpanded } = useAccordionContext();
859
- const propGetterReturn = getItemPanelProps(itemKey);
860
- const rnAccessibility = mapAccessibilityToRN(propGetterReturn.accessibility);
861
- if (!isExpanded(itemKey)) return null;
862
- return /* @__PURE__ */ jsx(
863
- View,
864
- {
865
- ...rnAccessibility,
866
- style: [
867
- {
868
- paddingHorizontal: bt.entropixSpacing4,
869
- paddingBottom: bt.entropixSpacing4
870
- },
871
- style
872
- ],
873
- children
874
- }
875
- );
876
- }
877
- var MenuContext = createContext(null);
878
- function useMenuContext() {
879
- const context = useContext(MenuContext);
880
- if (!context) {
881
- throw new Error(
882
- "Menu compound components must be used within a <Menu> provider."
883
- );
884
- }
885
- return context;
886
- }
887
- function Menu({ children, ...options }) {
888
- const menu = useMenu(options);
889
- return /* @__PURE__ */ jsx(MenuContext.Provider, { value: menu, children });
890
- }
891
- function MenuTrigger({ children, style, ...rest }) {
892
- const { getTriggerProps } = useMenuContext();
893
- const propGetterReturn = getTriggerProps();
894
- const rnAccessibility = mapAccessibilityToRN(propGetterReturn.accessibility);
895
- const handlePress = useCallback(() => {
896
- propGetterReturn.onAction?.();
897
- }, [propGetterReturn.onAction]);
898
- return /* @__PURE__ */ jsx(
899
- Pressable,
900
- {
901
- ...rnAccessibility,
902
- ...rest,
903
- onPress: handlePress,
904
- style,
905
- children
906
- }
907
- );
908
- }
909
- function MenuContent({ children, style, testID }) {
910
- const { tokens: t, baseTokens: bt } = useTheme();
911
- const { isOpen, getMenuProps } = useMenuContext();
912
- const propGetterReturn = getMenuProps();
913
- const rnAccessibility = mapAccessibilityToRN(propGetterReturn.accessibility);
914
- if (!isOpen) return null;
915
- return /* @__PURE__ */ jsx(
916
- View,
917
- {
918
- ...rnAccessibility,
919
- testID,
920
- style: [
921
- {
922
- minWidth: 160,
923
- padding: bt.entropixSpacing1,
924
- backgroundColor: t.entropixColorBgPrimary,
925
- borderWidth: 1,
926
- borderColor: t.entropixColorBorderDefault,
927
- borderRadius: bt.entropixRadiusMd,
928
- shadowColor: "#000",
929
- shadowOffset: { width: 0, height: 2 },
930
- shadowOpacity: 0.1,
931
- shadowRadius: 8,
932
- elevation: 4
933
- },
934
- style
935
- ],
936
- children
937
- }
938
- );
939
- }
940
- function wrapStringChildren(children, style) {
941
- if (typeof children === "string" || typeof children === "number") {
942
- return /* @__PURE__ */ jsx(Text, { style, children });
943
- }
944
- return children;
945
- }
946
- function MenuItem({
947
- index,
948
- onSelect,
949
- disabled,
950
- children,
951
- style,
952
- textStyle,
953
- ...rest
954
- }) {
955
- const { tokens: t, baseTokens: bt } = useTheme();
956
- const { getItemProps } = useMenuContext();
957
- const propGetterReturn = getItemProps(index, { onSelect, disabled });
958
- const rnAccessibility = mapAccessibilityToRN(propGetterReturn.accessibility);
959
- const handlePress = useCallback(() => {
960
- propGetterReturn.onAction?.();
961
- }, [propGetterReturn.onAction]);
962
- return /* @__PURE__ */ jsx(
963
- Pressable,
964
- {
965
- ...rnAccessibility,
966
- ...rest,
967
- disabled,
968
- onPress: propGetterReturn.onAction ? handlePress : void 0,
969
- style: [
970
- {
971
- flexDirection: "row",
972
- alignItems: "center",
973
- paddingVertical: bt.entropixSpacing2,
974
- paddingHorizontal: bt.entropixSpacing3,
975
- borderRadius: bt.entropixRadiusSm,
976
- opacity: disabled ? 0.5 : 1
977
- },
978
- style
979
- ],
980
- children: wrapStringChildren(children, {
981
- fontSize: bt.entropixFontSizeSm,
982
- color: t.entropixColorTextPrimary,
983
- ...textStyle
984
- })
985
- }
986
- );
987
- }
988
- var KEYBOARD_TYPE_MAP = {
989
- text: "default",
990
- email: "email-address",
991
- password: "default",
992
- number: "numeric",
993
- tel: "phone-pad",
994
- url: "url",
995
- search: "default"
996
- };
997
- function Input({
998
- value,
999
- defaultValue,
1000
- onChange,
1001
- disabled,
1002
- readOnly,
1003
- required,
1004
- invalid,
1005
- label,
1006
- helperText,
1007
- errorMessage,
1008
- placeholder,
1009
- type = "text",
1010
- size = "md",
1011
- style,
1012
- inputStyle,
1013
- textStyle,
1014
- testID,
1015
- variant: _variant
1016
- }) {
1017
- const { tokens: t, baseTokens: bt } = useTheme();
1018
- const {
1019
- value: inputValue,
1020
- isDisabled,
1021
- isReadOnly,
1022
- isInvalid,
1023
- setValue,
1024
- getInputProps
1025
- } = useInput({
1026
- value,
1027
- defaultValue,
1028
- onChange,
1029
- disabled,
1030
- readOnly,
1031
- required,
1032
- invalid,
1033
- type,
1034
- placeholder
1035
- });
1036
- const propGetterReturn = getInputProps();
1037
- const rnAccessibility = mapAccessibilityToRN(propGetterReturn.accessibility);
1038
- const handleChangeText = useCallback(
1039
- (text) => {
1040
- setValue(text);
1041
- },
1042
- [setValue]
1043
- );
1044
- const sizeStyles = getSizeStyles(size, bt);
1045
- const showError = isInvalid && errorMessage;
1046
- return /* @__PURE__ */ jsxs(View, { style: [{ gap: bt.entropixSpacing1 }, style], children: [
1047
- label ? /* @__PURE__ */ jsxs(
1048
- Text,
1049
- {
1050
- style: [
1051
- {
1052
- fontSize: sizeStyles.labelFontSize,
1053
- fontWeight: "500",
1054
- color: t.entropixColorTextPrimary
1055
- },
1056
- textStyle
1057
- ],
1058
- children: [
1059
- label,
1060
- required ? " *" : ""
1061
- ]
1062
- }
1063
- ) : null,
1064
- /* @__PURE__ */ jsx(
1065
- TextInput,
1066
- {
1067
- ...rnAccessibility,
1068
- testID,
1069
- value: inputValue,
1070
- onChangeText: handleChangeText,
1071
- placeholder,
1072
- placeholderTextColor: t.entropixColorTextTertiary,
1073
- editable: !isDisabled && !isReadOnly,
1074
- secureTextEntry: type === "password",
1075
- keyboardType: KEYBOARD_TYPE_MAP[type] ?? "default",
1076
- style: [
1077
- {
1078
- paddingVertical: sizeStyles.paddingVertical,
1079
- paddingHorizontal: sizeStyles.paddingHorizontal,
1080
- fontSize: sizeStyles.fontSize,
1081
- borderWidth: 1,
1082
- borderColor: showError ? t.entropixColorBorderDanger : t.entropixColorBorderDefault,
1083
- borderRadius: bt.entropixRadiusMd,
1084
- backgroundColor: t.entropixColorBgPrimary,
1085
- color: t.entropixColorTextPrimary
1086
- },
1087
- isDisabled && { opacity: 0.5 },
1088
- inputStyle
1089
- ]
1090
- }
1091
- ),
1092
- showError ? /* @__PURE__ */ jsx(
1093
- Text,
1094
- {
1095
- style: [
1096
- {
1097
- fontSize: sizeStyles.helperFontSize,
1098
- color: t.entropixColorTextDanger
1099
- },
1100
- textStyle
1101
- ],
1102
- accessibilityRole: "alert",
1103
- accessibilityLiveRegion: "polite",
1104
- children: errorMessage
1105
- }
1106
- ) : helperText ? /* @__PURE__ */ jsx(
1107
- Text,
1108
- {
1109
- style: [
1110
- {
1111
- fontSize: sizeStyles.helperFontSize,
1112
- color: t.entropixColorTextSecondary
1113
- },
1114
- textStyle
1115
- ],
1116
- children: helperText
1117
- }
1118
- ) : null
1119
- ] });
1120
- }
1121
- function getSizeStyles(size, bt) {
1122
- switch (size) {
1123
- case "sm":
1124
- return {
1125
- paddingVertical: bt.entropixSpacing1,
1126
- paddingHorizontal: bt.entropixSpacing2,
1127
- fontSize: bt.entropixFontSizeXs,
1128
- labelFontSize: bt.entropixFontSizeXs,
1129
- helperFontSize: bt.entropixFontSizeXs - 1
1130
- };
1131
- case "lg":
1132
- return {
1133
- paddingVertical: bt.entropixSpacing3,
1134
- paddingHorizontal: bt.entropixSpacing4,
1135
- fontSize: bt.entropixFontSizeBase,
1136
- labelFontSize: bt.entropixFontSizeBase,
1137
- helperFontSize: bt.entropixFontSizeSm
1138
- };
1139
- default:
1140
- return {
1141
- paddingVertical: bt.entropixSpacing2,
1142
- paddingHorizontal: bt.entropixSpacing3,
1143
- fontSize: bt.entropixFontSizeSm,
1144
- labelFontSize: bt.entropixFontSizeSm,
1145
- helperFontSize: bt.entropixFontSizeXs
1146
- };
1147
- }
1148
- }
1149
- function Textarea({
1150
- value,
1151
- defaultValue,
1152
- onChange,
1153
- disabled,
1154
- readOnly,
1155
- required,
1156
- invalid,
1157
- label,
1158
- helperText,
1159
- errorMessage,
1160
- placeholder,
1161
- numberOfLines = 4,
1162
- size = "md",
1163
- style,
1164
- inputStyle,
1165
- textStyle,
1166
- testID
1167
- }) {
1168
- const { tokens: t, baseTokens: bt } = useTheme();
1169
- const {
1170
- value: inputValue,
1171
- isDisabled,
1172
- isReadOnly,
1173
- isInvalid,
1174
- setValue,
1175
- getInputProps
1176
- } = useInput({
1177
- value,
1178
- defaultValue,
1179
- onChange,
1180
- disabled,
1181
- readOnly,
1182
- required,
1183
- invalid,
1184
- type: "text",
1185
- placeholder
1186
- });
1187
- const propGetterReturn = getInputProps();
1188
- const rnAccessibility = mapAccessibilityToRN(propGetterReturn.accessibility);
1189
- const handleChangeText = useCallback(
1190
- (text) => {
1191
- setValue(text);
1192
- },
1193
- [setValue]
1194
- );
1195
- const sizeStyles = getSizeStyles2(size, bt);
1196
- const showError = isInvalid && errorMessage;
1197
- return /* @__PURE__ */ jsxs(View, { style: [{ gap: bt.entropixSpacing1 }, style], children: [
1198
- label ? /* @__PURE__ */ jsxs(
1199
- Text,
1200
- {
1201
- style: [
1202
- {
1203
- fontSize: sizeStyles.labelFontSize,
1204
- fontWeight: "500",
1205
- color: t.entropixColorTextPrimary
1206
- },
1207
- textStyle
1208
- ],
1209
- children: [
1210
- label,
1211
- required ? " *" : ""
1212
- ]
1213
- }
1214
- ) : null,
1215
- /* @__PURE__ */ jsx(
1216
- TextInput,
1217
- {
1218
- ...rnAccessibility,
1219
- testID,
1220
- value: inputValue,
1221
- onChangeText: handleChangeText,
1222
- placeholder,
1223
- placeholderTextColor: t.entropixColorTextTertiary,
1224
- editable: !isDisabled && !isReadOnly,
1225
- multiline: true,
1226
- numberOfLines,
1227
- textAlignVertical: "top",
1228
- style: [
1229
- {
1230
- paddingVertical: sizeStyles.paddingVertical,
1231
- paddingHorizontal: sizeStyles.paddingHorizontal,
1232
- fontSize: sizeStyles.fontSize,
1233
- borderWidth: 1,
1234
- borderColor: showError ? t.entropixColorBorderDanger : t.entropixColorBorderDefault,
1235
- borderRadius: bt.entropixRadiusMd,
1236
- backgroundColor: t.entropixColorBgPrimary,
1237
- color: t.entropixColorTextPrimary,
1238
- minHeight: numberOfLines * (sizeStyles.fontSize + 8)
1239
- },
1240
- isDisabled && { opacity: 0.5 },
1241
- inputStyle
1242
- ]
1243
- }
1244
- ),
1245
- showError ? /* @__PURE__ */ jsx(
1246
- Text,
1247
- {
1248
- style: [
1249
- {
1250
- fontSize: sizeStyles.helperFontSize,
1251
- color: t.entropixColorTextDanger
1252
- },
1253
- textStyle
1254
- ],
1255
- accessibilityRole: "alert",
1256
- accessibilityLiveRegion: "polite",
1257
- children: errorMessage
1258
- }
1259
- ) : helperText ? /* @__PURE__ */ jsx(
1260
- Text,
1261
- {
1262
- style: [
1263
- {
1264
- fontSize: sizeStyles.helperFontSize,
1265
- color: t.entropixColorTextSecondary
1266
- },
1267
- textStyle
1268
- ],
1269
- children: helperText
1270
- }
1271
- ) : null
1272
- ] });
1273
- }
1274
- function getSizeStyles2(size, bt) {
1275
- switch (size) {
1276
- case "sm":
1277
- return {
1278
- paddingVertical: bt.entropixSpacing1,
1279
- paddingHorizontal: bt.entropixSpacing2,
1280
- fontSize: bt.entropixFontSizeXs,
1281
- labelFontSize: bt.entropixFontSizeXs,
1282
- helperFontSize: bt.entropixFontSizeXs - 1
1283
- };
1284
- case "lg":
1285
- return {
1286
- paddingVertical: bt.entropixSpacing3,
1287
- paddingHorizontal: bt.entropixSpacing4,
1288
- fontSize: bt.entropixFontSizeBase,
1289
- labelFontSize: bt.entropixFontSizeBase,
1290
- helperFontSize: bt.entropixFontSizeSm
1291
- };
1292
- default:
1293
- return {
1294
- paddingVertical: bt.entropixSpacing2,
1295
- paddingHorizontal: bt.entropixSpacing3,
1296
- fontSize: bt.entropixFontSizeSm,
1297
- labelFontSize: bt.entropixFontSizeSm,
1298
- helperFontSize: bt.entropixFontSizeXs
1299
- };
1300
- }
1301
- }
1302
- function Checkbox({
1303
- checked,
1304
- defaultChecked,
1305
- onChange,
1306
- disabled,
1307
- indeterminate,
1308
- label,
1309
- size = "md",
1310
- style,
1311
- textStyle,
1312
- children,
1313
- ...rest
1314
- }) {
1315
- const { tokens: t, baseTokens: bt } = useTheme();
1316
- const { isChecked, isDisabled, getToggleProps } = useToggle({
1317
- checked,
1318
- defaultChecked,
1319
- onChange,
1320
- disabled,
1321
- role: "checkbox"
1322
- });
1323
- const propGetterReturn = getToggleProps();
1324
- const rnAccessibility = mapAccessibilityToRN(propGetterReturn.accessibility);
1325
- if (indeterminate) {
1326
- rnAccessibility.accessibilityState = {
1327
- ...rnAccessibility.accessibilityState,
1328
- checked: "mixed"
1329
- };
1330
- }
1331
- if (label) {
1332
- rnAccessibility.accessibilityLabel = label;
1333
- }
1334
- const handlePress = useCallback(() => {
1335
- propGetterReturn.onAction?.();
1336
- }, [propGetterReturn.onAction]);
1337
- const sizeStyles = getSizeStyles3(size, bt);
1338
- const isActive = indeterminate || isChecked;
1339
- return /* @__PURE__ */ jsxs(
1340
- Pressable,
1341
- {
1342
- ...rnAccessibility,
1343
- ...rest,
1344
- disabled: isDisabled,
1345
- onPress: isDisabled ? void 0 : handlePress,
1346
- style: [
1347
- {
1348
- flexDirection: "row",
1349
- alignItems: "center",
1350
- gap: bt.entropixSpacing2
1351
- },
1352
- isDisabled && { opacity: 0.5 },
1353
- style
1354
- ],
1355
- children: [
1356
- /* @__PURE__ */ jsx(
1357
- View,
1358
- {
1359
- style: {
1360
- width: sizeStyles.boxSize,
1361
- height: sizeStyles.boxSize,
1362
- borderWidth: 2,
1363
- borderColor: isActive ? t.entropixColorActionPrimaryDefault : t.entropixColorBorderDefault,
1364
- borderRadius: bt.entropixRadiusSm,
1365
- backgroundColor: isActive ? t.entropixColorActionPrimaryDefault : "transparent",
1366
- alignItems: "center",
1367
- justifyContent: "center"
1368
- },
1369
- children: indeterminate ? /* @__PURE__ */ jsx(
1370
- Text,
1371
- {
1372
- style: {
1373
- fontSize: sizeStyles.indicatorFontSize,
1374
- fontWeight: "700",
1375
- color: t.entropixColorTextInverse,
1376
- lineHeight: sizeStyles.boxSize - 2
1377
- },
1378
- children: "\u2013"
1379
- }
1380
- ) : isChecked ? /* @__PURE__ */ jsx(
1381
- Text,
1382
- {
1383
- style: {
1384
- fontSize: sizeStyles.indicatorFontSize,
1385
- fontWeight: "700",
1386
- color: t.entropixColorTextInverse,
1387
- lineHeight: sizeStyles.boxSize - 2
1388
- },
1389
- children: "\u2713"
1390
- }
1391
- ) : null
1392
- }
1393
- ),
1394
- typeof children === "string" ? /* @__PURE__ */ jsx(
1395
- Text,
1396
- {
1397
- style: [
1398
- {
1399
- fontSize: sizeStyles.fontSize,
1400
- color: t.entropixColorTextPrimary
1401
- },
1402
- textStyle
1403
- ],
1404
- children
1405
- }
1406
- ) : children != null ? children : label ? /* @__PURE__ */ jsx(
1407
- Text,
1408
- {
1409
- style: [
1410
- {
1411
- fontSize: sizeStyles.fontSize,
1412
- color: t.entropixColorTextPrimary
1413
- },
1414
- textStyle
1415
- ],
1416
- children: label
1417
- }
1418
- ) : null
1419
- ]
1420
- }
1421
- );
1422
- }
1423
- function getSizeStyles3(size, bt) {
1424
- switch (size) {
1425
- case "sm":
1426
- return {
1427
- boxSize: 16,
1428
- indicatorFontSize: 10,
1429
- fontSize: bt.entropixFontSizeXs
1430
- };
1431
- case "lg":
1432
- return {
1433
- boxSize: 24,
1434
- indicatorFontSize: 16,
1435
- fontSize: bt.entropixFontSizeBase
1436
- };
1437
- default:
1438
- return {
1439
- boxSize: 20,
1440
- indicatorFontSize: 13,
1441
- fontSize: bt.entropixFontSizeSm
1442
- };
1443
- }
1444
- }
1445
- var RadioGroupContext = createContext(null);
1446
- function useRadioGroupContext() {
1447
- const context = useContext(RadioGroupContext);
1448
- if (!context) {
1449
- throw new Error(
1450
- "Radio compound components must be used within a <RadioGroup> provider."
1451
- );
1452
- }
1453
- return context;
1454
- }
1455
- function RadioGroup({
1456
- label,
1457
- style,
1458
- textStyle,
1459
- children,
1460
- testID,
1461
- ...options
1462
- }) {
1463
- const { tokens: t, baseTokens: bt } = useTheme();
1464
- const radioGroup = useRadioGroup(options);
1465
- const propGetterReturn = radioGroup.getRadioGroupProps();
1466
- const rnAccessibility = mapAccessibilityToRN(propGetterReturn.accessibility);
1467
- if (label) {
1468
- rnAccessibility.accessibilityLabel = label;
1469
- }
1470
- return /* @__PURE__ */ jsx(RadioGroupContext.Provider, { value: radioGroup, children: /* @__PURE__ */ jsxs(
1471
- View,
1472
- {
1473
- ...rnAccessibility,
1474
- testID,
1475
- style: [
1476
- {
1477
- gap: bt.entropixSpacing2
1478
- },
1479
- style
1480
- ],
1481
- children: [
1482
- label ? /* @__PURE__ */ jsx(
1483
- Text,
1484
- {
1485
- style: [
1486
- {
1487
- fontSize: bt.entropixFontSizeSm,
1488
- fontWeight: "500",
1489
- color: t.entropixColorTextPrimary
1490
- },
1491
- textStyle
1492
- ],
1493
- children: label
1494
- }
1495
- ) : null,
1496
- children
1497
- ]
1498
- }
1499
- ) });
1500
- }
1501
- function RadioItem({
1502
- value,
1503
- disabled,
1504
- style,
1505
- textStyle,
1506
- children,
1507
- ...rest
1508
- }) {
1509
- const { tokens: t, baseTokens: bt } = useTheme();
1510
- const { getRadioProps } = useRadioGroupContext();
1511
- const propGetterReturn = getRadioProps(value, { disabled });
1512
- const rnAccessibility = mapAccessibilityToRN(propGetterReturn.accessibility);
1513
- const isChecked = propGetterReturn.accessibility.checked === true;
1514
- const isDisabled = propGetterReturn.accessibility.disabled === true;
1515
- const handlePress = useCallback(() => {
1516
- propGetterReturn.onAction?.();
1517
- }, [propGetterReturn.onAction]);
1518
- return /* @__PURE__ */ jsxs(
1519
- Pressable,
1520
- {
1521
- ...rnAccessibility,
1522
- ...rest,
1523
- disabled: isDisabled,
1524
- onPress: isDisabled ? void 0 : handlePress,
1525
- style: [
1526
- {
1527
- flexDirection: "row",
1528
- alignItems: "center",
1529
- gap: bt.entropixSpacing2
1530
- },
1531
- isDisabled && { opacity: 0.5 },
1532
- style
1533
- ],
1534
- children: [
1535
- /* @__PURE__ */ jsx(
1536
- View,
1537
- {
1538
- style: {
1539
- width: 20,
1540
- height: 20,
1541
- borderRadius: 10,
1542
- borderWidth: 2,
1543
- borderColor: isChecked ? t.entropixColorActionPrimaryDefault : t.entropixColorBorderDefault,
1544
- alignItems: "center",
1545
- justifyContent: "center"
1546
- },
1547
- children: isChecked ? /* @__PURE__ */ jsx(
1548
- View,
1549
- {
1550
- style: {
1551
- width: 10,
1552
- height: 10,
1553
- borderRadius: 5,
1554
- backgroundColor: t.entropixColorActionPrimaryDefault
1555
- }
1556
- }
1557
- ) : null
1558
- }
1559
- ),
1560
- typeof children === "string" ? /* @__PURE__ */ jsx(
1561
- Text,
1562
- {
1563
- style: [
1564
- {
1565
- fontSize: bt.entropixFontSizeSm,
1566
- color: t.entropixColorTextPrimary
1567
- },
1568
- textStyle
1569
- ],
1570
- children
1571
- }
1572
- ) : children
1573
- ]
1574
- }
1575
- );
1576
- }
1577
- var SelectContext = createContext(null);
1578
- function useSelectContext() {
1579
- const context = useContext(SelectContext);
1580
- if (!context) {
1581
- throw new Error(
1582
- "Select compound components must be used within a <Select> provider."
1583
- );
1584
- }
1585
- return context;
1586
- }
1587
- function Select({
1588
- label,
1589
- style,
1590
- textStyle,
1591
- children,
1592
- testID,
1593
- ...options
1594
- }) {
1595
- const { tokens: t, baseTokens: bt } = useTheme();
1596
- const select = useSelect(options);
1597
- return /* @__PURE__ */ jsx(SelectContext.Provider, { value: select, children: /* @__PURE__ */ jsxs(
1598
- View,
1599
- {
1600
- testID,
1601
- style: [{ gap: bt.entropixSpacing1 }, style],
1602
- children: [
1603
- label ? /* @__PURE__ */ jsx(
1604
- Text,
1605
- {
1606
- style: [
1607
- {
1608
- fontSize: bt.entropixFontSizeSm,
1609
- fontWeight: "500",
1610
- color: t.entropixColorTextPrimary
1611
- },
1612
- textStyle
1613
- ],
1614
- children: label
1615
- }
1616
- ) : null,
1617
- children
1618
- ]
1619
- }
1620
- ) });
1621
- }
1622
- function SelectTrigger({
1623
- placeholder = "Select...",
1624
- displayValue,
1625
- style,
1626
- textStyle,
1627
- ...rest
1628
- }) {
1629
- const { tokens: t, baseTokens: bt } = useTheme();
1630
- const { selectedValue, isDisabled, isOpen, getTriggerProps } = useSelectContext();
1631
- const propGetterReturn = getTriggerProps();
1632
- const rnAccessibility = mapAccessibilityToRN(propGetterReturn.accessibility);
1633
- const handlePress = useCallback(() => {
1634
- propGetterReturn.onAction?.();
1635
- }, [propGetterReturn.onAction]);
1636
- const hasValue = selectedValue !== "";
1637
- const label = displayValue ?? (hasValue ? selectedValue : placeholder);
1638
- return /* @__PURE__ */ jsxs(
1639
- Pressable,
1640
- {
1641
- ...rnAccessibility,
1642
- ...rest,
1643
- disabled: isDisabled,
1644
- onPress: isDisabled ? void 0 : handlePress,
1645
- style: [
1646
- {
1647
- flexDirection: "row",
1648
- alignItems: "center",
1649
- justifyContent: "space-between",
1650
- paddingVertical: bt.entropixSpacing2,
1651
- paddingHorizontal: bt.entropixSpacing3,
1652
- borderWidth: 1,
1653
- borderColor: isOpen ? t.entropixColorActionPrimaryDefault : t.entropixColorBorderDefault,
1654
- borderRadius: bt.entropixRadiusMd,
1655
- backgroundColor: t.entropixColorBgPrimary
1656
- },
1657
- isDisabled && { opacity: 0.5 },
1658
- style
1659
- ],
1660
- children: [
1661
- /* @__PURE__ */ jsx(
1662
- Text,
1663
- {
1664
- style: [
1665
- {
1666
- fontSize: bt.entropixFontSizeSm,
1667
- color: hasValue ? t.entropixColorTextPrimary : t.entropixColorTextTertiary,
1668
- flex: 1
1669
- },
1670
- textStyle
1671
- ],
1672
- numberOfLines: 1,
1673
- children: label
1674
- }
1675
- ),
1676
- /* @__PURE__ */ jsx(
1677
- Text,
1678
- {
1679
- style: {
1680
- fontSize: bt.entropixFontSizeXs,
1681
- color: t.entropixColorTextSecondary,
1682
- marginLeft: bt.entropixSpacing2
1683
- },
1684
- children: "\u25BC"
1685
- }
1686
- )
1687
- ]
1688
- }
1689
- );
1690
- }
1691
- function SelectContent({ children, style, testID }) {
1692
- const { tokens: t, baseTokens: bt } = useTheme();
1693
- const { isOpen, close, getListboxProps } = useSelectContext();
1694
- const propGetterReturn = getListboxProps();
1695
- const rnAccessibility = mapAccessibilityToRN(propGetterReturn.accessibility);
1696
- if (!isOpen) return null;
1697
- return /* @__PURE__ */ jsx(
1698
- Modal,
1699
- {
1700
- visible: isOpen,
1701
- transparent: true,
1702
- animationType: "fade",
1703
- onRequestClose: close,
1704
- children: /* @__PURE__ */ jsx(
1705
- Pressable,
1706
- {
1707
- style: {
1708
- flex: 1,
1709
- justifyContent: "center",
1710
- alignItems: "center",
1711
- backgroundColor: "rgba(0,0,0,0.3)"
1712
- },
1713
- onPress: close,
1714
- children: /* @__PURE__ */ jsx(
1715
- Pressable,
1716
- {
1717
- onPress: () => {
1718
- },
1719
- children: /* @__PURE__ */ jsx(
1720
- View,
1721
- {
1722
- ...rnAccessibility,
1723
- testID,
1724
- style: [
1725
- {
1726
- minWidth: 240,
1727
- maxHeight: 300,
1728
- padding: bt.entropixSpacing1,
1729
- backgroundColor: t.entropixColorBgPrimary,
1730
- borderWidth: 1,
1731
- borderColor: t.entropixColorBorderDefault,
1732
- borderRadius: bt.entropixRadiusMd,
1733
- shadowColor: "#000",
1734
- shadowOffset: { width: 0, height: 4 },
1735
- shadowOpacity: 0.15,
1736
- shadowRadius: 12,
1737
- elevation: 8
1738
- },
1739
- style
1740
- ],
1741
- children
1742
- }
1743
- )
1744
- }
1745
- )
1746
- }
1747
- )
1748
- }
1749
- );
1750
- }
1751
- function SelectOption({
1752
- value,
1753
- index,
1754
- disabled,
1755
- style,
1756
- textStyle,
1757
- children,
1758
- ...rest
1759
- }) {
1760
- const { tokens: t, baseTokens: bt } = useTheme();
1761
- const { getOptionProps } = useSelectContext();
1762
- const propGetterReturn = getOptionProps(value, index ?? 0, { disabled });
1763
- const rnAccessibility = mapAccessibilityToRN(propGetterReturn.accessibility);
1764
- const isSelected = propGetterReturn.accessibility.selected === true;
1765
- const handlePress = useCallback(() => {
1766
- propGetterReturn.onAction?.();
1767
- }, [propGetterReturn.onAction]);
1768
- return /* @__PURE__ */ jsx(
1769
- Pressable,
1770
- {
1771
- ...rnAccessibility,
1772
- ...rest,
1773
- disabled,
1774
- onPress: propGetterReturn.onAction ? handlePress : void 0,
1775
- style: [
1776
- {
1777
- flexDirection: "row",
1778
- alignItems: "center",
1779
- paddingVertical: bt.entropixSpacing2,
1780
- paddingHorizontal: bt.entropixSpacing3,
1781
- borderRadius: bt.entropixRadiusSm,
1782
- backgroundColor: isSelected ? t.entropixColorBgSecondary : "transparent"
1783
- },
1784
- disabled && { opacity: 0.5 },
1785
- style
1786
- ],
1787
- children: typeof children === "string" ? /* @__PURE__ */ jsx(
1788
- Text,
1789
- {
1790
- style: [
1791
- {
1792
- fontSize: bt.entropixFontSizeSm,
1793
- fontWeight: isSelected ? "600" : "400",
1794
- color: t.entropixColorTextPrimary
1795
- },
1796
- textStyle
1797
- ],
1798
- children
1799
- }
1800
- ) : children
1801
- }
1802
- );
1803
- }
1804
- var BREAKPOINTS = {
1805
- sm: 640,
1806
- md: 768,
1807
- lg: 1024,
1808
- xl: 1280,
1809
- "2xl": 1536
1810
- };
1811
- var BREAKPOINT_ORDER = ["base", "sm", "md", "lg", "xl", "2xl"];
1812
- function useBreakpoint() {
1813
- const getBreakpoint = useCallback(() => {
1814
- const { width } = Dimensions.get("window");
1815
- if (width >= BREAKPOINTS["2xl"]) return "2xl";
1816
- if (width >= BREAKPOINTS.xl) return "xl";
1817
- if (width >= BREAKPOINTS.lg) return "lg";
1818
- if (width >= BREAKPOINTS.md) return "md";
1819
- if (width >= BREAKPOINTS.sm) return "sm";
1820
- return "base";
1821
- }, []);
1822
- const [breakpoint, setBreakpoint] = useState(getBreakpoint);
1823
- useEffect(() => {
1824
- const subscription = Dimensions.addEventListener("change", ({ window }) => {
1825
- const width = window.width;
1826
- let next = "base";
1827
- if (width >= BREAKPOINTS["2xl"]) next = "2xl";
1828
- else if (width >= BREAKPOINTS.xl) next = "xl";
1829
- else if (width >= BREAKPOINTS.lg) next = "lg";
1830
- else if (width >= BREAKPOINTS.md) next = "md";
1831
- else if (width >= BREAKPOINTS.sm) next = "sm";
1832
- setBreakpoint((prev) => prev !== next ? next : prev);
1833
- });
1834
- return () => subscription.remove();
1835
- }, []);
1836
- return breakpoint;
1837
- }
1838
- function useBreakpointValue(breakpoint) {
1839
- const current = useBreakpoint();
1840
- const currentIndex = BREAKPOINT_ORDER.indexOf(current);
1841
- const targetIndex = BREAKPOINT_ORDER.indexOf(breakpoint);
1842
- return currentIndex >= targetIndex;
1843
- }
1844
- function useScreenDimensions() {
1845
- const [dimensions, setDimensions] = useState(() => Dimensions.get("window"));
1846
- useEffect(() => {
1847
- const subscription = Dimensions.addEventListener("change", ({ window }) => {
1848
- setDimensions(window);
1849
- });
1850
- return () => subscription.remove();
1851
- }, []);
1852
- return { width: dimensions.width, height: dimensions.height };
1853
- }
1854
- function Stack({
1855
- gap,
1856
- align,
1857
- fullWidth,
1858
- style,
1859
- children,
1860
- ...rest
1861
- }) {
1862
- const { baseTokens: bt } = useTheme();
1863
- const gapValue = getGapValue(gap, bt);
1864
- const alignMap = {
1865
- start: "flex-start",
1866
- center: "center",
1867
- end: "flex-end",
1868
- stretch: "stretch"
1869
- };
1870
- return /* @__PURE__ */ jsx(
1871
- View,
1872
- {
1873
- style: [
1874
- { flexDirection: "column" },
1875
- gapValue !== void 0 && { gap: gapValue },
1876
- gapValue === void 0 && { gap: bt.entropixSpaceLayoutStack },
1877
- align && { alignItems: alignMap[align] },
1878
- fullWidth && { width: "100%" },
1879
- style
1880
- ],
1881
- ...rest,
1882
- children
1883
- }
1884
- );
1885
- }
1886
- function getGapValue(gap, bt) {
1887
- if (!gap) return void 0;
1888
- switch (gap) {
1889
- case "none":
1890
- return 0;
1891
- case "xs":
1892
- return bt.entropixSpacing1;
1893
- case "sm":
1894
- return bt.entropixSpacing2;
1895
- case "md":
1896
- return bt.entropixSpacing4;
1897
- case "lg":
1898
- return bt.entropixSpacing6;
1899
- case "xl":
1900
- return bt.entropixSpacing8;
1901
- case "2xl":
1902
- return bt.entropixSpacing12;
1903
- }
1904
- }
1905
- function Inline({
1906
- gap,
1907
- align,
1908
- justify,
1909
- wrap,
1910
- style,
1911
- children,
1912
- ...rest
1913
- }) {
1914
- const { baseTokens: bt } = useTheme();
1915
- const gapValue = getGapValue2(gap, bt);
1916
- const alignMap = {
1917
- start: "flex-start",
1918
- center: "center",
1919
- end: "flex-end",
1920
- stretch: "stretch",
1921
- baseline: "baseline"
1922
- };
1923
- const justifyMap = {
1924
- start: "flex-start",
1925
- center: "center",
1926
- end: "flex-end",
1927
- between: "space-between",
1928
- around: "space-around"
1929
- };
1930
- return /* @__PURE__ */ jsx(
1931
- View,
1932
- {
1933
- style: [
1934
- {
1935
- flexDirection: "row",
1936
- alignItems: "center"
1937
- },
1938
- gapValue !== void 0 && { gap: gapValue },
1939
- gapValue === void 0 && { gap: bt.entropixSpaceLayoutInline },
1940
- align && { alignItems: alignMap[align] },
1941
- justify && { justifyContent: justifyMap[justify] },
1942
- wrap && { flexWrap: "wrap" },
1943
- style
1944
- ],
1945
- ...rest,
1946
- children
1947
- }
1948
- );
1949
- }
1950
- function getGapValue2(gap, bt) {
1951
- if (!gap) return void 0;
1952
- switch (gap) {
1953
- case "none":
1954
- return 0;
1955
- case "xs":
1956
- return bt.entropixSpacing1;
1957
- case "sm":
1958
- return bt.entropixSpacing2;
1959
- case "md":
1960
- return bt.entropixSpacing4;
1961
- case "lg":
1962
- return bt.entropixSpacing6;
1963
- case "xl":
1964
- return bt.entropixSpacing8;
1965
- case "2xl":
1966
- return bt.entropixSpacing12;
1967
- }
1968
- }
1969
- var maxWidthMap = {
1970
- xs: 480,
1971
- sm: 640,
1972
- md: 768,
1973
- lg: 1024,
1974
- xl: 1280,
1975
- full: void 0
1976
- };
1977
- function Container({
1978
- maxWidth = "lg",
1979
- center,
1980
- style,
1981
- children,
1982
- ...rest
1983
- }) {
1984
- const { baseTokens: bt } = useTheme();
1985
- const breakpoint = useBreakpoint();
1986
- const maxW = maxWidthMap[maxWidth];
1987
- let pageMargin = bt.entropixSpaceLayoutPageMargin;
1988
- if (breakpoint === "lg" || breakpoint === "xl" || breakpoint === "2xl") {
1989
- pageMargin = bt.entropixSpaceLayoutPageMarginLg;
1990
- } else if (breakpoint === "md") {
1991
- pageMargin = bt.entropixSpaceLayoutPageMarginMd;
1992
- }
1993
- return /* @__PURE__ */ jsx(
1994
- View,
1995
- {
1996
- style: [
1997
- {
1998
- width: "100%",
1999
- paddingHorizontal: pageMargin
2000
- },
2001
- maxW !== void 0 && { maxWidth: maxW, alignSelf: "center" },
2002
- center && { alignItems: "center" },
2003
- style
2004
- ],
2005
- ...rest,
2006
- children
2007
- }
2008
- );
2009
- }
2010
- function Divider({
2011
- orientation = "horizontal",
2012
- spacing,
2013
- style,
2014
- ...rest
2015
- }) {
2016
- const { tokens: t, baseTokens: bt } = useTheme();
2017
- const spacingMap = {
2018
- sm: bt.entropixSpacing2,
2019
- md: bt.entropixSpacing4,
2020
- lg: bt.entropixSpacing6
2021
- };
2022
- const spacingValue = spacing ? spacingMap[spacing] : 0;
2023
- const isVertical = orientation === "vertical";
2024
- const dividerStyle = isVertical ? {
2025
- width: 1,
2026
- alignSelf: "stretch",
2027
- backgroundColor: t.entropixColorBorderDefault,
2028
- marginHorizontal: spacingValue
2029
- } : {
2030
- height: 1,
2031
- width: "100%",
2032
- backgroundColor: t.entropixColorBorderDefault,
2033
- marginVertical: spacingValue
2034
- };
2035
- return /* @__PURE__ */ jsx(
2036
- View,
2037
- {
2038
- accessibilityRole: isVertical ? "none" : void 0,
2039
- style: [dividerStyle, style],
2040
- ...rest
2041
- }
2042
- );
2043
- }
2044
-
2045
- export { Accordion, AccordionItem, AccordionPanel, AccordionTrigger, BREAKPOINTS, Button, Checkbox, Container, Dialog, DialogClose, DialogContent, DialogDescription, DialogOverlay, DialogTitle, DialogTrigger, Divider, EntropixProvider, Inline, Input, Menu, MenuContent, MenuItem, MenuTrigger, RadioGroup, RadioItem, Select, SelectContent, SelectOption, SelectTrigger, Stack, Switch, Tab, TabList, TabPanel, Tabs, Textarea, Toggle, mapAccessibilityToRN, registerBrand, useBreakpoint, useBreakpointValue, useScreenDimensions, useTheme };
1
+ export { Input } from './chunk-UHVTF2Y4.js';
2
+ export { Textarea } from './chunk-64DK6YFL.js';
3
+ export { Checkbox } from './chunk-C6HF6QXK.js';
4
+ export { RadioGroup, RadioItem } from './chunk-3MHE2C74.js';
5
+ export { Select, SelectContent, SelectOption, SelectTrigger } from './chunk-XSOLJOBG.js';
6
+ export { BREAKPOINTS, Container, Divider, Inline, Stack, useBreakpoint, useBreakpointValue, useScreenDimensions } from './chunk-CXQNNEPC.js';
7
+ export { Button } from './chunk-45KMMZUT.js';
8
+ export { Toggle } from './chunk-KU24A5PQ.js';
9
+ export { Switch } from './chunk-EFRYMWJB.js';
10
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogOverlay, DialogTitle, DialogTrigger } from './chunk-VP567WZL.js';
11
+ export { Tab, TabList, TabPanel, Tabs } from './chunk-XBNX4SLA.js';
12
+ export { Accordion, AccordionItem, AccordionPanel, AccordionTrigger } from './chunk-PVTPOJRU.js';
13
+ export { Menu, MenuContent, MenuItem, MenuTrigger } from './chunk-HH3CEDSH.js';
14
+ export { mapAccessibilityToRN } from './chunk-73BDGPZT.js';
15
+ export { EntropixProvider, registerBrand, useTheme } from './chunk-ZYOTKLBG.js';
2046
16
  //# sourceMappingURL=index.js.map
2047
17
  //# sourceMappingURL=index.js.map