@marktiderman/genesis-ui-native 2.3.0 → 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.
@@ -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,
@@ -1900,37 +1933,6 @@ function NativeSearchBar({
1900
1933
  }
1901
1934
  );
1902
1935
  }
1903
- function resolveRefreshControl() {
1904
- try {
1905
- const rn = __require("react-native");
1906
- return rn.RefreshControl;
1907
- } catch {
1908
- return null;
1909
- }
1910
- }
1911
- var useGenesisThemeRef = (() => {
1912
- try {
1913
- const provider = __require("@marktiderman/genesis-design-system/providers/native");
1914
- return provider.useGenesisTheme ?? null;
1915
- } catch {
1916
- return null;
1917
- }
1918
- })();
1919
- function NativeRefreshControl(props) {
1920
- const RC = resolveRefreshControl();
1921
- const theme = useGenesisThemeRef ? useGenesisThemeRef() : null;
1922
- const themePrimary = theme?.colors?.primary;
1923
- if (!RC) return null;
1924
- return /* @__PURE__ */ jsx(
1925
- RC,
1926
- {
1927
- tintColor: props.tintColor ?? themePrimary,
1928
- colors: props.colors ?? (themePrimary ? [themePrimary] : void 0),
1929
- ...props,
1930
- testID: props.testID ?? "native-refresh-control"
1931
- }
1932
- );
1933
- }
1934
1936
  var FILL = { position: "absolute", top: 0, right: 0, bottom: 0, left: 0 };
1935
1937
  function NativeAvatar({
1936
1938
  className,
@@ -2630,6 +2632,6 @@ function NativeImage({
2630
2632
  );
2631
2633
  }
2632
2634
 
2633
- 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, NativeRefreshControl, NativeSearchBar, NativeSegmentedControl, NativeSheet, NativeSheetProvider, NativeSheetScrollView, NativeSlider, NativeStepper, NativeTabs, NativeTabsContent, NativeTabsList, NativeTabsTrigger, NativeTimePicker, NativeToastProvider, NativeToggle, NativeTooltip, NativeTooltipContent, NativeTooltipTrigger, Stack, spaceScale, spacingClass, toggleVariants, useLiquidGlass, useReduceTransparency, useToast };
2634
- //# sourceMappingURL=chunk-W7BK3ARU.js.map
2635
- //# sourceMappingURL=chunk-W7BK3ARU.js.map
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