@marktiderman/genesis-ui-native 2.3.1 → 2.4.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/dist/{chunk-H4Q7COTI.js → chunk-6TLBCRS6.js} +3 -3
- package/dist/{chunk-H4Q7COTI.js.map → chunk-6TLBCRS6.js.map} +1 -1
- package/dist/{chunk-Q445I7WO.js → chunk-7VSW3XWJ.js} +37 -4
- package/dist/chunk-7VSW3XWJ.js.map +1 -0
- package/dist/{chunk-W2UBJ56D.js → chunk-BPD5DCFP.js} +10 -2
- package/dist/chunk-BPD5DCFP.js.map +1 -0
- package/dist/components/index.d.ts +17 -3
- package/dist/components/index.js +2 -2
- package/dist/icons/lucide.d.ts +1 -1
- package/dist/icons/lucide.js +9 -1
- package/dist/icons/lucide.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/layouts/index.js +2 -2
- package/dist/{native-modules-BGO2MnFF.d.ts → native-modules-_Q5vIbd5.d.ts} +8 -0
- package/package.json +1 -1
- package/src/__tests__/native-modules-lists.test.tsx +1 -0
- package/src/components/__tests__/full-screen-modal.test.tsx +52 -0
- package/src/components/full-screen-modal.tsx +70 -0
- package/src/components/index.ts +3 -0
- package/src/icon-names.ts +8 -0
- package/src/icons/lucide.ts +16 -0
- package/dist/chunk-Q445I7WO.js.map +0 -1
- package/dist/chunk-W2UBJ56D.js.map +0 -1
|
@@ -3,7 +3,7 @@ import { useGenesisModules } from './chunk-EFXCJ5AN.js';
|
|
|
3
3
|
import { useThemeMode, useThemeRoles } from './chunk-Z3AQYVUA.js';
|
|
4
4
|
import { cn } from './chunk-OHZD7KRO.js';
|
|
5
5
|
import { __require } from './chunk-DGUM43GV.js';
|
|
6
|
-
import { View, Text, Platform, AccessibilityInfo, Animated, Pressable, ScrollView, Modal, Dimensions, TextInput, PanResponder, Image } from 'react-native';
|
|
6
|
+
import { View, Text, Platform, AccessibilityInfo, Animated, Pressable, ScrollView, Modal, StatusBar, Dimensions, TextInput, PanResponder, Image } from 'react-native';
|
|
7
7
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
8
8
|
import { createContext, useState, useEffect, useCallback, useMemo, useRef, useContext, Children, cloneElement, isValidElement } from 'react';
|
|
9
9
|
import { SafeAreaProvider, useSafeAreaInsets, SafeAreaInsetsContext } from 'react-native-safe-area-context';
|
|
@@ -531,6 +531,39 @@ function SheetBody({
|
|
|
531
531
|
const insets = useSafeAreaInsets();
|
|
532
532
|
return /* @__PURE__ */ jsx(View, { testID, accessibilityViewIsModal: true, onAccessibilityEscape, style: { ...style, paddingBottom: insets.bottom }, children });
|
|
533
533
|
}
|
|
534
|
+
var FULL_SCREEN_DARK = "#000000";
|
|
535
|
+
function NativeFullScreenModal({ open, onOpenChange, tone = "dark", children, testID = "native-full-screen-modal" }) {
|
|
536
|
+
const reducedMotion = useReducedMotion();
|
|
537
|
+
const roles = useThemeRoles();
|
|
538
|
+
const background = tone === "dark" ? FULL_SCREEN_DARK : tone === "app" ? roles.background : "transparent";
|
|
539
|
+
const close = () => onOpenChange(false);
|
|
540
|
+
return /* @__PURE__ */ jsxs(
|
|
541
|
+
Modal,
|
|
542
|
+
{
|
|
543
|
+
visible: open,
|
|
544
|
+
animationType: reducedMotion ? "none" : "fade",
|
|
545
|
+
transparent: true,
|
|
546
|
+
presentationStyle: "overFullScreen",
|
|
547
|
+
statusBarTranslucent: true,
|
|
548
|
+
navigationBarTranslucent: true,
|
|
549
|
+
onRequestClose: close,
|
|
550
|
+
testID,
|
|
551
|
+
children: [
|
|
552
|
+
tone !== "app" ? /* @__PURE__ */ jsx(StatusBar, { barStyle: "light-content", animated: true }) : null,
|
|
553
|
+
/* @__PURE__ */ jsx(SafeAreaProvider, { children: /* @__PURE__ */ jsx(
|
|
554
|
+
View,
|
|
555
|
+
{
|
|
556
|
+
testID: `${testID}-body`,
|
|
557
|
+
accessibilityViewIsModal: true,
|
|
558
|
+
onAccessibilityEscape: close,
|
|
559
|
+
style: { flex: 1, backgroundColor: background },
|
|
560
|
+
children
|
|
561
|
+
}
|
|
562
|
+
) })
|
|
563
|
+
]
|
|
564
|
+
}
|
|
565
|
+
);
|
|
566
|
+
}
|
|
534
567
|
var PopoverContext = createContext(null);
|
|
535
568
|
function NativePopover({
|
|
536
569
|
open: controlled,
|
|
@@ -2599,6 +2632,6 @@ function NativeImage({
|
|
|
2599
2632
|
);
|
|
2600
2633
|
}
|
|
2601
2634
|
|
|
2602
|
-
export { Box, Grid, Inline, NativeAccordion, NativeAccordionContent, NativeAccordionItem, NativeAccordionTrigger, NativeAvatar, NativeBanner, NativeChip, NativeChipGroup, NativeCombobox, NativeDatePicker, NativeDialog, NativeDialogContent, NativeDialogDescription, NativeDialogFooter, NativeDialogHeader, NativeDialogTitle, NativeDrawer, NativeDropdownMenu, NativeDropdownMenuContent, NativeDropdownMenuItem, NativeDropdownMenuTrigger, NativeGlassSurface, NativeHeaderCard, NativeImage, NativeInlineAlert, NativeNumberInput, NativePagination, NativePopover, NativePopoverContent, NativePopoverTrigger, NativeProgress, NativeRadioGroup, NativeRadioGroupItem, NativeRangeSlider, NativeSearchBar, NativeSegmentedControl, NativeSheet, NativeSheetProvider, NativeSheetScrollView, NativeSlider, NativeStepper, NativeTabs, NativeTabsContent, NativeTabsList, NativeTabsTrigger, NativeTimePicker, NativeToastProvider, NativeToggle, NativeTooltip, NativeTooltipContent, NativeTooltipTrigger, Stack, spaceScale, spacingClass, toggleVariants, useLiquidGlass, useReduceTransparency, useToast };
|
|
2603
|
-
//# sourceMappingURL=chunk-
|
|
2604
|
-
//# sourceMappingURL=chunk-
|
|
2635
|
+
export { Box, FULL_SCREEN_DARK, Grid, Inline, NativeAccordion, NativeAccordionContent, NativeAccordionItem, NativeAccordionTrigger, NativeAvatar, NativeBanner, NativeChip, NativeChipGroup, NativeCombobox, NativeDatePicker, NativeDialog, NativeDialogContent, NativeDialogDescription, NativeDialogFooter, NativeDialogHeader, NativeDialogTitle, NativeDrawer, NativeDropdownMenu, NativeDropdownMenuContent, NativeDropdownMenuItem, NativeDropdownMenuTrigger, NativeFullScreenModal, NativeGlassSurface, NativeHeaderCard, NativeImage, NativeInlineAlert, NativeNumberInput, NativePagination, NativePopover, NativePopoverContent, NativePopoverTrigger, NativeProgress, NativeRadioGroup, NativeRadioGroupItem, NativeRangeSlider, NativeSearchBar, NativeSegmentedControl, NativeSheet, NativeSheetProvider, NativeSheetScrollView, NativeSlider, NativeStepper, NativeTabs, NativeTabsContent, NativeTabsList, NativeTabsTrigger, NativeTimePicker, NativeToastProvider, NativeToggle, NativeTooltip, NativeTooltipContent, NativeTooltipTrigger, Stack, spaceScale, spacingClass, toggleVariants, useLiquidGlass, useReduceTransparency, useToast };
|
|
2636
|
+
//# sourceMappingURL=chunk-7VSW3XWJ.js.map
|
|
2637
|
+
//# sourceMappingURL=chunk-7VSW3XWJ.js.map
|